Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-10-28 14:39:53 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-10-28 14:39:53 +0400
commit15d139291fc1a52d50af36db0ab0d3af8093ea78 (patch)
tree0f423f6ba395cf50bd074fccbae7e95d5639c91d
parent9cc8a3049a5c0f927243c73bec540023ec5715bd (diff)
parent32644615988277ce60e0447f08d40ef67971bd88 (diff)
Merging r59178 through r60961 from trunk into soc-2011-tomato
-rw-r--r--CMakeLists.txt136
-rw-r--r--GNUmakefile9
-rw-r--r--SConstruct19
-rwxr-xr-xbuild_files/build_environment/install_deps.sh431
-rw-r--r--build_files/buildbot/config/user-config-mac-i386.py4
-rw-r--r--build_files/buildbot/config/user-config-mac-x86_64.py4
-rw-r--r--build_files/cmake/Modules/FindPythonLibsUnix.cmake1
-rw-r--r--build_files/cmake/macros.cmake76
-rw-r--r--build_files/scons/config/darwin-config.py15
-rw-r--r--build_files/scons/config/freebsd7-config.py210
-rw-r--r--build_files/scons/config/freebsd8-config.py2
-rw-r--r--build_files/scons/config/freebsd9-config.py2
-rw-r--r--build_files/scons/config/linux-config.py2
-rw-r--r--build_files/scons/tools/Blender.py25
-rw-r--r--build_files/scons/tools/btools.py6
-rw-r--r--doc/python_api/examples/bpy.props.5.py2
-rw-r--r--doc/python_api/examples/bpy.types.UIList.1.py (renamed from doc/python_api/examples/bpy.types.UIList.py)12
-rw-r--r--doc/python_api/examples/bpy.types.UIList.2.py160
-rw-r--r--doc/python_api/examples/bpy.types.WindowManager.popup_menu.py2
-rw-r--r--doc/python_api/examples/bpy.types.bpy_prop_collection.foreach_get.py11
-rw-r--r--doc/python_api/examples/bpy.types.bpy_prop_collection.foreach_set.py11
-rw-r--r--doc/python_api/rst/bge.logic.rst4
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_GameObject.rst6
-rw-r--r--doc/python_api/sphinx_doc_gen.py21
-rw-r--r--extern/bullet2/CMakeLists.txt32
-rw-r--r--extern/bullet2/patches/ghost_character.patch28
-rw-r--r--extern/bullet2/readme.txt3
-rw-r--r--extern/bullet2/src/BulletCollision/BroadphaseCollision/btDispatcher.h5
-rw-r--r--extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp2
-rw-r--r--extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h11
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionConfiguration.h2
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.cpp3
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h37
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp73
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.h20
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp9
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h13
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCompoundCollisionAlgorithm.cpp421
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCompoundCollisionAlgorithm.h90
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp1
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp18
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp1
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp32
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h14
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionDispatch/btHashedSimplePairCache.cpp278
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionDispatch/btHashedSimplePairCache.h174
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.cpp4
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.cpp4
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.h53
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp6
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp4
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.cpp8
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.h2
-rw-r--r--extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h4
-rw-r--r--extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h5
-rw-r--r--extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp4
-rw-r--r--extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h2
-rw-r--r--extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp29
-rw-r--r--extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h2
-rw-r--r--extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp3
-rw-r--r--extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h2
-rw-r--r--extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h2
-rw-r--r--extern/bullet2/src/BulletDynamics/Character/btCharacterControllerInterface.h3
-rw-r--r--extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.cpp167
-rw-r--r--extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.h6
-rw-r--r--extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h64
-rw-r--r--extern/bullet2/src/BulletDynamics/ConstraintSolver/btConstraintSolver.h16
-rw-r--r--extern/bullet2/src/BulletDynamics/ConstraintSolver/btFixedConstraint.cpp129
-rw-r--r--extern/bullet2/src/BulletDynamics/ConstraintSolver/btFixedConstraint.h49
-rw-r--r--extern/bullet2/src/BulletDynamics/ConstraintSolver/btGearConstraint.h98
-rw-r--r--extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h44
-rw-r--r--extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.h33
-rw-r--r--extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.h37
-rw-r--r--extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h22
-rw-r--r--extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp296
-rw-r--r--extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h31
-rwxr-xr-xextern/bullet2/src/BulletDynamics/ConstraintSolver/btSliderConstraint.h46
-rw-r--r--extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverBody.h13
-rw-r--r--extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverConstraint.h1
-rw-r--r--extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.cpp10
-rw-r--r--extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h64
-rw-r--r--extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp39
-rw-r--r--extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h15
-rw-r--r--extern/bullet2/src/BulletDynamics/Dynamics/btDynamicsWorld.h3
-rw-r--r--extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h4
-rw-r--r--extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp4
-rw-r--r--extern/bullet2/src/BulletDynamics/Featherstone/btMultiBody.cpp1009
-rw-r--r--extern/bullet2/src/BulletDynamics/Featherstone/btMultiBody.h466
-rw-r--r--extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyConstraint.cpp527
-rw-r--r--extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyConstraint.h166
-rw-r--r--extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyConstraintSolver.cpp795
-rw-r--r--extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyConstraintSolver.h85
-rw-r--r--extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyDynamicsWorld.cpp578
-rw-r--r--extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyDynamicsWorld.h56
-rw-r--r--extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyJointLimitConstraint.cpp133
-rw-r--r--extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyJointLimitConstraint.h44
-rw-r--r--extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyJointMotor.cpp89
-rw-r--r--extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyJointMotor.h47
-rw-r--r--extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyLink.h110
-rw-r--r--extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyLinkCollider.h92
-rw-r--r--extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyPoint2Point.cpp143
-rw-r--r--extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyPoint2Point.h60
-rw-r--r--extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodySolverConstraint.h82
-rw-r--r--extern/bullet2/src/BulletDynamics/MLCPSolvers/btDantzigLCP.cpp2079
-rw-r--r--extern/bullet2/src/BulletDynamics/MLCPSolvers/btDantzigLCP.h77
-rw-r--r--extern/bullet2/src/BulletDynamics/MLCPSolvers/btDantzigSolver.h112
-rw-r--r--extern/bullet2/src/BulletDynamics/MLCPSolvers/btMLCPSolver.cpp626
-rw-r--r--extern/bullet2/src/BulletDynamics/MLCPSolvers/btMLCPSolver.h81
-rw-r--r--extern/bullet2/src/BulletDynamics/MLCPSolvers/btMLCPSolverInterface.h33
-rw-r--r--extern/bullet2/src/BulletDynamics/MLCPSolvers/btPATHSolver.h151
-rw-r--r--extern/bullet2/src/BulletDynamics/MLCPSolvers/btSolveProjectedGaussSeidel.h80
-rw-r--r--extern/bullet2/src/BulletSoftBody/btSoftBody.cpp18
-rw-r--r--extern/bullet2/src/BulletSoftBody/btSoftBody.h2
-rw-r--r--extern/bullet2/src/BulletSoftBody/btSoftBodyHelpers.cpp6
-rw-r--r--extern/bullet2/src/BulletSoftBody/btSparseSDF.h17
-rw-r--r--extern/bullet2/src/LinearMath/btIDebugDraw.h138
-rw-r--r--extern/bullet2/src/LinearMath/btMatrix3x3.h31
-rw-r--r--extern/bullet2/src/LinearMath/btMatrixX.h504
-rw-r--r--extern/bullet2/src/LinearMath/btQuaternion.h42
-rw-r--r--extern/bullet2/src/LinearMath/btScalar.h78
-rw-r--r--extern/bullet2/src/LinearMath/btSerializer.cpp1583
-rw-r--r--extern/bullet2/src/LinearMath/btSerializer.h3
-rw-r--r--extern/bullet2/src/LinearMath/btVector3.cpp49
-rw-r--r--extern/bullet2/src/LinearMath/btVector3.h32
-rw-r--r--extern/bullet2/src/SConscript2
-rw-r--r--extern/bullet2/src/btBulletDynamicsCommon.h2
-rw-r--r--extern/libmv/CMakeLists.txt8
-rw-r--r--extern/libmv/SConscript3
-rwxr-xr-xextern/libmv/bundle.sh11
-rw-r--r--extern/libmv/libmv-capi.cc92
-rw-r--r--extern/libmv/libmv-capi.h10
-rw-r--r--extern/libmv/libmv-capi_intern.h59
-rw-r--r--extern/libmv/libmv-capi_stub.cc20
-rw-r--r--extern/libmv/libmv/multiview/euclidean_resection.cc28
-rw-r--r--extern/libmv/libmv/multiview/euclidean_resection.h26
-rw-r--r--extern/libmv/libmv/multiview/fundamental.cc91
-rw-r--r--extern/libmv/libmv/multiview/fundamental.h37
-rw-r--r--extern/libmv/libmv/multiview/homography.cc111
-rw-r--r--extern/libmv/libmv/multiview/homography.h39
-rw-r--r--extern/libmv/libmv/simple_pipeline/bundle.cc56
-rw-r--r--extern/libmv/libmv/simple_pipeline/keyframe_selection.cc178
-rw-r--r--extern/libmv/libmv/simple_pipeline/keyframe_selection.h2
-rw-r--r--extern/libmv/libmv/simple_pipeline/modal_solver.cc27
-rw-r--r--extern/libmv/libmv/simple_pipeline/pipeline.cc58
-rw-r--r--extern/libmv/libmv/simple_pipeline/pipeline.h10
-rw-r--r--extern/libmv/libmv/simple_pipeline/reconstruction.h11
-rw-r--r--extern/libmv/libmv/simple_pipeline/resect.cc17
-rw-r--r--extern/libmv/libmv/simple_pipeline/resect.h6
-rw-r--r--extern/libmv/libmv/simple_pipeline/tracks.cc6
-rw-r--r--extern/libmv/libmv/simple_pipeline/tracks.h13
-rw-r--r--extern/libmv/third_party/ceres/CMakeLists.txt19
-rw-r--r--extern/libmv/third_party/ceres/ChangeLog929
-rw-r--r--extern/libmv/third_party/ceres/SConscript2
-rwxr-xr-xextern/libmv/third_party/ceres/bundle.sh4
-rw-r--r--extern/libmv/third_party/ceres/files.txt17
-rw-r--r--extern/libmv/third_party/ceres/include/ceres/autodiff_cost_function.h9
-rw-r--r--extern/libmv/third_party/ceres/include/ceres/autodiff_local_parameterization.h2
-rw-r--r--extern/libmv/third_party/ceres/include/ceres/c_api.h141
-rw-r--r--extern/libmv/third_party/ceres/include/ceres/ceres.h5
-rw-r--r--extern/libmv/third_party/ceres/include/ceres/cost_function.h18
-rw-r--r--extern/libmv/third_party/ceres/include/ceres/covariance.h422
-rw-r--r--extern/libmv/third_party/ceres/include/ceres/dynamic_autodiff_cost_function.h81
-rw-r--r--extern/libmv/third_party/ceres/include/ceres/internal/autodiff.h25
-rw-r--r--extern/libmv/third_party/ceres/include/ceres/internal/fixed_array.h2
-rw-r--r--extern/libmv/third_party/ceres/include/ceres/internal/variadic_evaluate.h2
-rw-r--r--extern/libmv/third_party/ceres/include/ceres/iteration_callback.h12
-rw-r--r--extern/libmv/third_party/ceres/include/ceres/jet.h63
-rw-r--r--extern/libmv/third_party/ceres/include/ceres/loss_function.h11
-rw-r--r--extern/libmv/third_party/ceres/include/ceres/numeric_diff_cost_function.h28
-rw-r--r--extern/libmv/third_party/ceres/include/ceres/problem.h5
-rw-r--r--extern/libmv/third_party/ceres/include/ceres/sized_cost_function.h2
-rw-r--r--extern/libmv/third_party/ceres/include/ceres/solver.h225
-rw-r--r--extern/libmv/third_party/ceres/include/ceres/types.h99
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/blas.cc78
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/blas.h379
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/block_jacobi_preconditioner.cc12
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/block_jacobi_preconditioner.h9
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/block_random_access_crs_matrix.cc170
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/block_random_access_crs_matrix.h108
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/block_random_access_sparse_matrix.h1
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/block_sparse_matrix.cc43
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/block_sparse_matrix.h50
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/block_structure.cc51
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/c_api.cc188
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/cgnr_solver.cc2
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/cgnr_solver.h4
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/compressed_col_sparse_matrix_utils.cc118
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/compressed_col_sparse_matrix_utils.h142
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/compressed_row_sparse_matrix.cc276
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/compressed_row_sparse_matrix.h44
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/coordinate_descent_minimizer.h1
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/corrector.cc49
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/corrector.h8
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/covariance.cc (renamed from extern/libmv/third_party/ceres/internal/ceres/matrix_proto.h)42
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/covariance_impl.cc845
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/covariance_impl.h89
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/cxsparse.cc111
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/cxsparse.h46
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/dense_normal_cholesky_solver.cc69
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/dense_normal_cholesky_solver.h12
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/dense_qr_solver.cc81
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/dense_qr_solver.h14
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/dense_sparse_matrix.cc34
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/dense_sparse_matrix.h8
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/dogleg_strategy.cc24
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/dogleg_strategy.h6
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/graph_algorithms.h98
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/implicit_schur_complement.cc4
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/implicit_schur_complement.h3
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/incomplete_lq_factorization.cc239
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/incomplete_lq_factorization.h90
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/iterative_schur_complement_solver.cc25
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/iterative_schur_complement_solver.h6
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/lapack.cc157
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/lapack.h88
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/levenberg_marquardt_strategy.cc22
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/line_search.cc713
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/line_search.h158
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/line_search_direction.cc192
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/line_search_direction.h4
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/line_search_minimizer.cc107
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/linear_least_squares_problems.cc167
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/linear_least_squares_problems.h5
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/linear_solver.h8
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/low_rank_inverse_hessian.cc55
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/low_rank_inverse_hessian.h11
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/minimizer.h48
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/parameter_block.h4
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/parameter_block_ordering.cc26
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/parameter_block_ordering.h6
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/partitioned_matrix_view.cc33
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/partitioned_matrix_view.h4
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/preconditioner.cc4
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/preconditioner.h35
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/problem.cc4
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/problem_impl.cc11
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/problem_impl.h4
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/program_evaluator.h17
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/residual_block.cc3
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/schur_complement_solver.cc89
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/schur_complement_solver.h10
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/schur_eliminator.h20
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/schur_eliminator_impl.h69
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/schur_jacobi_preconditioner.cc6
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/schur_jacobi_preconditioner.h6
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/small_blas.h406
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/solver.cc217
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/solver_impl.cc566
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/solver_impl.h76
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/sparse_matrix.h7
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/sparse_normal_cholesky_solver.cc51
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/sparse_normal_cholesky_solver.h4
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/split.h29
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/suitesparse.cc112
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/suitesparse.h84
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/triplet_sparse_matrix.cc43
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/triplet_sparse_matrix.h8
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/trust_region_minimizer.cc155
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/trust_region_strategy.h24
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/types.cc83
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/visibility.cc2
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/visibility_based_preconditioner.cc4
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/visibility_based_preconditioner.h13
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/wall_time.cc2
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/wall_time.h2
-rw-r--r--extern/libmv/third_party/msinttypes/stdint.h12
-rw-r--r--extern/recastnavigation/recast-capi.cpp126
-rw-r--r--extern/recastnavigation/recast-capi.h5
-rw-r--r--intern/CMakeLists.txt6
-rw-r--r--intern/atomic/atomic_ops.h307
-rw-r--r--intern/bsp/intern/BOP_CarveInterface.cpp63
-rw-r--r--intern/cycles/CMakeLists.txt11
-rw-r--r--intern/cycles/SConscript2
-rw-r--r--intern/cycles/app/CMakeLists.txt23
-rw-r--r--intern/cycles/app/cycles_server.cpp22
-rw-r--r--intern/cycles/app/cycles_standalone.cpp (renamed from intern/cycles/app/cycles_test.cpp)50
-rw-r--r--intern/cycles/app/cycles_xml.cpp30
-rw-r--r--intern/cycles/app/cycles_xml.h22
-rw-r--r--intern/cycles/app/io_export_cycles_xml.py22
-rw-r--r--intern/cycles/blender/CCL_api.h22
-rw-r--r--intern/cycles/blender/CMakeLists.txt3
-rw-r--r--intern/cycles/blender/addon/__init__.py22
-rw-r--r--intern/cycles/blender/addon/engine.py22
-rw-r--r--intern/cycles/blender/addon/osl.py22
-rw-r--r--intern/cycles/blender/addon/presets.py24
-rw-r--r--intern/cycles/blender/addon/properties.py155
-rw-r--r--intern/cycles/blender/addon/ui.py169
-rw-r--r--intern/cycles/blender/blender_camera.cpp22
-rw-r--r--intern/cycles/blender/blender_curves.cpp631
-rw-r--r--intern/cycles/blender/blender_mesh.cpp38
-rw-r--r--intern/cycles/blender/blender_object.cpp36
-rw-r--r--intern/cycles/blender/blender_particles.cpp22
-rw-r--r--intern/cycles/blender/blender_python.cpp22
-rw-r--r--intern/cycles/blender/blender_session.cpp41
-rw-r--r--intern/cycles/blender/blender_session.h22
-rw-r--r--intern/cycles/blender/blender_shader.cpp54
-rw-r--r--intern/cycles/blender/blender_sync.cpp42
-rw-r--r--intern/cycles/blender/blender_sync.h25
-rw-r--r--intern/cycles/blender/blender_util.h22
-rw-r--r--intern/cycles/bvh/bvh.cpp8
-rw-r--r--intern/cycles/bvh/bvh_build.cpp28
-rw-r--r--intern/cycles/cmake/external_libs.cmake2
-rw-r--r--intern/cycles/device/device.cpp87
-rw-r--r--intern/cycles/device/device.h22
-rw-r--r--intern/cycles/device/device_cpu.cpp105
-rw-r--r--intern/cycles/device/device_cuda.cpp312
-rw-r--r--intern/cycles/device/device_intern.h22
-rw-r--r--intern/cycles/device/device_memory.h32
-rw-r--r--intern/cycles/device/device_multi.cpp26
-rw-r--r--intern/cycles/device/device_network.cpp27
-rw-r--r--intern/cycles/device/device_network.h30
-rw-r--r--intern/cycles/device/device_opencl.cpp70
-rw-r--r--intern/cycles/device/device_task.cpp24
-rw-r--r--intern/cycles/device/device_task.h29
-rw-r--r--intern/cycles/doc/license/Blender.txt17
-rw-r--r--intern/cycles/doc/license/CMakeLists.txt2
-rw-r--r--intern/cycles/doc/license/GPL.txt342
-rw-r--r--intern/cycles/doc/license/readme.txt24
-rw-r--r--intern/cycles/kernel/CMakeLists.txt41
-rw-r--r--intern/cycles/kernel/SConscript34
-rw-r--r--intern/cycles/kernel/closure/bsdf.h49
-rw-r--r--intern/cycles/kernel/closure/bsdf_hair.h279
-rw-r--r--intern/cycles/kernel/closure/bsdf_microfacet.h5
-rw-r--r--intern/cycles/kernel/closure/bsdf_oren_nayar.h22
-rw-r--r--intern/cycles/kernel/closure/bssrdf.h279
-rw-r--r--intern/cycles/kernel/closure/volume.h22
-rw-r--r--intern/cycles/kernel/kernel.cl57
-rw-r--r--intern/cycles/kernel/kernel.cpp41
-rw-r--r--intern/cycles/kernel/kernel.cu45
-rw-r--r--intern/cycles/kernel/kernel.h40
-rw-r--r--intern/cycles/kernel/kernel_accumulate.h26
-rw-r--r--intern/cycles/kernel/kernel_bvh.h206
-rw-r--r--intern/cycles/kernel/kernel_bvh_subsurface.h312
-rw-r--r--intern/cycles/kernel/kernel_bvh_traversal.h128
-rw-r--r--intern/cycles/kernel/kernel_camera.h22
-rw-r--r--intern/cycles/kernel/kernel_compat_cpu.h22
-rw-r--r--intern/cycles/kernel/kernel_compat_cuda.h39
-rw-r--r--intern/cycles/kernel/kernel_compat_opencl.h22
-rw-r--r--intern/cycles/kernel/kernel_curve.h28
-rw-r--r--intern/cycles/kernel/kernel_differential.h22
-rw-r--r--intern/cycles/kernel/kernel_displace.h22
-rw-r--r--intern/cycles/kernel/kernel_emission.h24
-rw-r--r--intern/cycles/kernel/kernel_film.h45
-rw-r--r--intern/cycles/kernel/kernel_globals.h26
-rw-r--r--intern/cycles/kernel/kernel_jitter.h26
-rw-r--r--intern/cycles/kernel/kernel_light.h22
-rw-r--r--intern/cycles/kernel/kernel_math.h22
-rw-r--r--intern/cycles/kernel/kernel_montecarlo.h71
-rw-r--r--intern/cycles/kernel/kernel_object.h22
-rw-r--r--intern/cycles/kernel/kernel_passes.h26
-rw-r--r--intern/cycles/kernel/kernel_path.h716
-rw-r--r--intern/cycles/kernel/kernel_path_state.h133
-rw-r--r--intern/cycles/kernel/kernel_primitive.h30
-rw-r--r--intern/cycles/kernel/kernel_random.h33
-rw-r--r--intern/cycles/kernel/kernel_shader.h176
-rw-r--r--intern/cycles/kernel/kernel_sse2.cpp44
-rw-r--r--intern/cycles/kernel/kernel_sse3.cpp44
-rw-r--r--intern/cycles/kernel/kernel_subsurface.h435
-rw-r--r--intern/cycles/kernel/kernel_textures.h22
-rw-r--r--intern/cycles/kernel/kernel_triangle.h22
-rw-r--r--intern/cycles/kernel/kernel_types.h108
-rw-r--r--intern/cycles/kernel/osl/osl_bssrdf.cpp82
-rw-r--r--intern/cycles/kernel/osl/osl_bssrdf.h7
-rw-r--r--intern/cycles/kernel/osl/osl_closures.cpp40
-rw-r--r--intern/cycles/kernel/osl/osl_closures.h11
-rw-r--r--intern/cycles/kernel/osl/osl_globals.h22
-rw-r--r--intern/cycles/kernel/osl/osl_services.cpp25
-rw-r--r--intern/cycles/kernel/osl/osl_services.h22
-rw-r--r--intern/cycles/kernel/osl/osl_shader.cpp84
-rw-r--r--intern/cycles/kernel/osl/osl_shader.h22
-rw-r--r--intern/cycles/kernel/shaders/CMakeLists.txt1
-rw-r--r--intern/cycles/kernel/shaders/SConscript2
-rw-r--r--intern/cycles/kernel/shaders/node_add_closure.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_ambient_occlusion.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_attribute.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_background.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_blackbody.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_brick_texture.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_brightness.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_bump.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_camera.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_checker_texture.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_color.h24
-rw-r--r--intern/cycles/kernel/shaders/node_combine_hsv.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_combine_rgb.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_convert_from_color.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_convert_from_float.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_convert_from_int.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_convert_from_normal.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_convert_from_point.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_convert_from_string.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_convert_from_vector.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_diffuse_bsdf.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_emission.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_environment_texture.osl24
-rw-r--r--intern/cycles/kernel/shaders/node_fresnel.h22
-rw-r--r--intern/cycles/kernel/shaders/node_fresnel.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_gamma.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_geometry.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_glass_bsdf.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_glossy_bsdf.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_gradient_texture.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_hair_bsdf.osl57
-rw-r--r--intern/cycles/kernel/shaders/node_hair_info.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_holdout.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_hsv.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_image_texture.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_invert.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_layer_weight.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_light_falloff.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_light_path.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_magic_texture.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_mapping.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_math.osl24
-rw-r--r--intern/cycles/kernel/shaders/node_mix.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_mix_closure.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_musgrave_texture.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_noise_texture.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_normal.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_normal_map.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_object_info.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_output_displacement.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_output_surface.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_output_volume.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_particle_info.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_refraction_bsdf.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_rgb_curves.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_rgb_ramp.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_separate_hsv.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_separate_rgb.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_set_normal.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_sky_texture.osl145
-rw-r--r--intern/cycles/kernel/shaders/node_subsurface_scattering.osl33
-rw-r--r--intern/cycles/kernel/shaders/node_tangent.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_texture.h22
-rw-r--r--intern/cycles/kernel/shaders/node_texture_coordinate.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_toon_bsdf.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_translucent_bsdf.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_transparent_bsdf.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_value.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_vector_curves.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_vector_math.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_vector_transform.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_velvet_bsdf.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_voronoi_texture.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_ward_bsdf.osl24
-rw-r--r--intern/cycles/kernel/shaders/node_wave_texture.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_wavelength.osl22
-rw-r--r--intern/cycles/kernel/shaders/node_wireframe.osl22
-rw-r--r--intern/cycles/kernel/shaders/oslutil.h58
-rw-r--r--intern/cycles/kernel/shaders/stdosl.h30
-rw-r--r--intern/cycles/kernel/svm/svm.h24
-rw-r--r--intern/cycles/kernel/svm/svm_attribute.h22
-rw-r--r--intern/cycles/kernel/svm/svm_brick.h22
-rw-r--r--intern/cycles/kernel/svm/svm_brightness.h22
-rw-r--r--intern/cycles/kernel/svm/svm_camera.h22
-rw-r--r--intern/cycles/kernel/svm/svm_checker.h22
-rw-r--r--intern/cycles/kernel/svm/svm_closure.h102
-rw-r--r--intern/cycles/kernel/svm/svm_convert.h22
-rw-r--r--intern/cycles/kernel/svm/svm_displace.h22
-rw-r--r--intern/cycles/kernel/svm/svm_fresnel.h22
-rw-r--r--intern/cycles/kernel/svm/svm_gamma.h22
-rw-r--r--intern/cycles/kernel/svm/svm_geometry.h22
-rw-r--r--intern/cycles/kernel/svm/svm_gradient.h22
-rw-r--r--intern/cycles/kernel/svm/svm_hsv.h22
-rw-r--r--intern/cycles/kernel/svm/svm_image.h22
-rw-r--r--intern/cycles/kernel/svm/svm_invert.h22
-rw-r--r--intern/cycles/kernel/svm/svm_light_path.h22
-rw-r--r--intern/cycles/kernel/svm/svm_magic.h22
-rw-r--r--intern/cycles/kernel/svm/svm_mapping.h22
-rw-r--r--intern/cycles/kernel/svm/svm_math.h22
-rw-r--r--intern/cycles/kernel/svm/svm_mix.h22
-rw-r--r--intern/cycles/kernel/svm/svm_musgrave.h22
-rw-r--r--intern/cycles/kernel/svm/svm_noisetex.h22
-rw-r--r--intern/cycles/kernel/svm/svm_normal.h22
-rw-r--r--intern/cycles/kernel/svm/svm_ramp.h22
-rw-r--r--intern/cycles/kernel/svm/svm_sepcomb_hsv.h22
-rw-r--r--intern/cycles/kernel/svm/svm_sepcomb_rgb.h22
-rw-r--r--intern/cycles/kernel/svm/svm_sky.h160
-rw-r--r--intern/cycles/kernel/svm/svm_tex_coord.h22
-rw-r--r--intern/cycles/kernel/svm/svm_texture.h22
-rw-r--r--intern/cycles/kernel/svm/svm_types.h42
-rw-r--r--intern/cycles/kernel/svm/svm_value.h22
-rw-r--r--intern/cycles/kernel/svm/svm_vector_transform.h22
-rw-r--r--intern/cycles/kernel/svm/svm_voronoi.h22
-rw-r--r--intern/cycles/kernel/svm/svm_wave.h22
-rw-r--r--intern/cycles/render/CMakeLists.txt5
-rw-r--r--intern/cycles/render/attribute.cpp39
-rw-r--r--intern/cycles/render/attribute.h22
-rw-r--r--intern/cycles/render/background.cpp22
-rw-r--r--intern/cycles/render/background.h22
-rw-r--r--intern/cycles/render/blackbody.h22
-rw-r--r--intern/cycles/render/bssrdf.cpp141
-rw-r--r--intern/cycles/render/bssrdf.h31
-rw-r--r--intern/cycles/render/buffers.cpp65
-rw-r--r--intern/cycles/render/buffers.h38
-rw-r--r--intern/cycles/render/camera.cpp23
-rw-r--r--intern/cycles/render/camera.h22
-rw-r--r--intern/cycles/render/curves.cpp56
-rw-r--r--intern/cycles/render/curves.h46
-rw-r--r--intern/cycles/render/film.cpp28
-rw-r--r--intern/cycles/render/film.h22
-rw-r--r--intern/cycles/render/graph.cpp22
-rw-r--r--intern/cycles/render/graph.h26
-rw-r--r--intern/cycles/render/image.cpp54
-rw-r--r--intern/cycles/render/image.h22
-rw-r--r--intern/cycles/render/integrator.cpp32
-rw-r--r--intern/cycles/render/integrator.h29
-rw-r--r--intern/cycles/render/light.cpp22
-rw-r--r--intern/cycles/render/light.h22
-rw-r--r--intern/cycles/render/mesh.cpp24
-rw-r--r--intern/cycles/render/mesh.h22
-rw-r--r--intern/cycles/render/mesh_displace.cpp22
-rw-r--r--intern/cycles/render/nodes.cpp353
-rw-r--r--intern/cycles/render/nodes.h43
-rw-r--r--intern/cycles/render/object.cpp29
-rw-r--r--intern/cycles/render/object.h22
-rw-r--r--intern/cycles/render/osl.cpp40
-rw-r--r--intern/cycles/render/osl.h22
-rw-r--r--intern/cycles/render/particles.cpp22
-rw-r--r--intern/cycles/render/particles.h22
-rw-r--r--intern/cycles/render/scene.cpp24
-rw-r--r--intern/cycles/render/scene.h23
-rw-r--r--intern/cycles/render/session.cpp34
-rw-r--r--intern/cycles/render/session.h31
-rw-r--r--intern/cycles/render/shader.cpp64
-rw-r--r--intern/cycles/render/shader.h24
-rw-r--r--intern/cycles/render/sky_model.cpp389
-rw-r--r--intern/cycles/render/sky_model.h454
-rw-r--r--intern/cycles/render/sky_model_data.h3866
-rw-r--r--intern/cycles/render/sobol.h22
-rw-r--r--intern/cycles/render/svm.cpp39
-rw-r--r--intern/cycles/render/svm.h24
-rw-r--r--intern/cycles/render/tables.cpp22
-rw-r--r--intern/cycles/render/tables.h22
-rw-r--r--intern/cycles/render/tile.cpp36
-rw-r--r--intern/cycles/render/tile.h53
-rw-r--r--intern/cycles/subd/subd_build.h22
-rw-r--r--intern/cycles/subd/subd_dice.cpp22
-rw-r--r--intern/cycles/subd/subd_dice.h22
-rw-r--r--intern/cycles/subd/subd_patch.cpp22
-rw-r--r--intern/cycles/subd/subd_patch.h22
-rw-r--r--intern/cycles/subd/subd_split.cpp22
-rw-r--r--intern/cycles/subd/subd_split.h22
-rw-r--r--intern/cycles/subd/subd_stencil.cpp22
-rw-r--r--intern/cycles/util/CMakeLists.txt4
-rw-r--r--intern/cycles/util/util_algorithm.h22
-rw-r--r--intern/cycles/util/util_args.h22
-rw-r--r--intern/cycles/util/util_boundbox.h22
-rw-r--r--intern/cycles/util/util_cache.cpp22
-rw-r--r--intern/cycles/util/util_cache.h22
-rw-r--r--intern/cycles/util/util_color.h22
-rw-r--r--intern/cycles/util/util_cuda.cpp22
-rw-r--r--intern/cycles/util/util_cuda.h22
-rw-r--r--intern/cycles/util/util_debug.h22
-rw-r--r--intern/cycles/util/util_dynlib.cpp22
-rw-r--r--intern/cycles/util/util_dynlib.h22
-rw-r--r--intern/cycles/util/util_foreach.h22
-rw-r--r--intern/cycles/util/util_function.h22
-rw-r--r--intern/cycles/util/util_hash.h22
-rw-r--r--intern/cycles/util/util_image.h22
-rw-r--r--intern/cycles/util/util_list.h22
-rw-r--r--intern/cycles/util/util_map.h22
-rw-r--r--intern/cycles/util/util_math.h40
-rw-r--r--intern/cycles/util/util_memarena.cpp61
-rw-r--r--intern/cycles/util/util_memarena.h48
-rw-r--r--intern/cycles/util/util_opengl.h27
-rw-r--r--intern/cycles/util/util_param.h22
-rw-r--r--intern/cycles/util/util_path.cpp22
-rw-r--r--intern/cycles/util/util_path.h22
-rw-r--r--intern/cycles/util/util_progress.h22
-rw-r--r--intern/cycles/util/util_set.h22
-rw-r--r--intern/cycles/util/util_stats.h22
-rw-r--r--intern/cycles/util/util_string.cpp22
-rw-r--r--intern/cycles/util/util_string.h22
-rw-r--r--intern/cycles/util/util_system.cpp22
-rw-r--r--intern/cycles/util/util_system.h22
-rw-r--r--intern/cycles/util/util_task.cpp172
-rw-r--r--intern/cycles/util/util_task.h77
-rw-r--r--intern/cycles/util/util_thread.h22
-rw-r--r--intern/cycles/util/util_time.cpp22
-rw-r--r--intern/cycles/util/util_time.h22
-rw-r--r--intern/cycles/util/util_transform.cpp22
-rw-r--r--intern/cycles/util/util_transform.h22
-rw-r--r--intern/cycles/util/util_types.h83
-rw-r--r--intern/cycles/util/util_vector.h22
-rw-r--r--intern/cycles/util/util_view.cpp22
-rw-r--r--intern/cycles/util/util_view.h22
-rw-r--r--intern/cycles/util/util_xml.h22
-rw-r--r--intern/elbeem/CMakeLists.txt5
-rw-r--r--intern/elbeem/SConscript2
-rw-r--r--intern/elbeem/intern/attributes.h25
-rw-r--r--intern/elbeem/intern/controlparticles.h23
-rw-r--r--intern/elbeem/intern/isosurface.h9
-rw-r--r--intern/elbeem/intern/mvmcoords.h18
-rw-r--r--intern/elbeem/intern/ntl_blenderdumper.h8
-rw-r--r--intern/elbeem/intern/ntl_bsptree.h7
-rw-r--r--intern/elbeem/intern/ntl_geometryclass.h8
-rw-r--r--intern/elbeem/intern/ntl_geometrymodel.h9
-rw-r--r--intern/elbeem/intern/ntl_geometryobject.h9
-rw-r--r--intern/elbeem/intern/ntl_geometryshader.h10
-rw-r--r--intern/elbeem/intern/ntl_lighting.h13
-rw-r--r--intern/elbeem/intern/ntl_matrices.h7
-rw-r--r--intern/elbeem/intern/ntl_ray.h21
-rw-r--r--intern/elbeem/intern/ntl_vector3dim.h9
-rw-r--r--intern/elbeem/intern/ntl_world.h15
-rw-r--r--intern/elbeem/intern/parametrizer.h9
-rw-r--r--intern/elbeem/intern/particletracer.cpp1
-rw-r--r--intern/elbeem/intern/particletracer.h15
-rw-r--r--intern/elbeem/intern/simulation_object.cpp12
-rw-r--r--intern/elbeem/intern/simulation_object.h9
-rw-r--r--intern/elbeem/intern/solver_class.h18
-rw-r--r--intern/elbeem/intern/solver_control.cpp9
-rw-r--r--intern/elbeem/intern/solver_control.h14
-rw-r--r--intern/elbeem/intern/solver_interface.cpp9
-rw-r--r--intern/elbeem/intern/solver_interface.h27
-rw-r--r--intern/elbeem/intern/solver_main.cpp6
-rw-r--r--intern/ghost/CMakeLists.txt9
-rw-r--r--intern/ghost/SConscript10
-rw-r--r--intern/ghost/intern/GHOST_DisplayManagerCocoa.mm9
-rw-r--r--intern/ghost/intern/GHOST_DisplayManagerSDL.cpp2
-rw-r--r--intern/ghost/intern/GHOST_EventManager.cpp3
-rw-r--r--intern/ghost/intern/GHOST_NDOFManager.h4
-rw-r--r--intern/ghost/intern/GHOST_NDOFManager3Dconnexion.c94
-rw-r--r--intern/ghost/intern/GHOST_NDOFManager3Dconnexion.h50
-rw-r--r--intern/ghost/intern/GHOST_NDOFManagerCocoa.h19
-rw-r--r--intern/ghost/intern/GHOST_NDOFManagerCocoa.mm41
-rw-r--r--intern/ghost/intern/GHOST_SystemCocoa.mm29
-rw-r--r--intern/ghost/intern/GHOST_SystemPathsX11.cpp53
-rw-r--r--intern/ghost/intern/GHOST_SystemSDL.cpp24
-rw-r--r--intern/ghost/intern/GHOST_SystemWin32.cpp67
-rw-r--r--intern/ghost/intern/GHOST_SystemX11.cpp6
-rw-r--r--intern/ghost/intern/GHOST_WindowCocoa.h4
-rw-r--r--intern/ghost/intern/GHOST_WindowSDL.cpp33
-rw-r--r--intern/ghost/intern/GHOST_WindowSDL.h2
-rw-r--r--intern/ghost/intern/GHOST_WindowWin32.cpp2
-rw-r--r--intern/ghost/intern/GHOST_WindowX11.cpp63
-rw-r--r--intern/ghost/test/CMakeLists.txt62
-rw-r--r--intern/ghost/test/gears/GHOST_Test.cpp5
-rw-r--r--intern/ghost/test/multitest/MultiTest.c4
-rw-r--r--intern/ghost/test/multitest/stubs.c (renamed from source/blender/compositor/operations/COM_RenderLayersAOOperation.cpp)25
-rw-r--r--intern/guardedalloc/CMakeLists.txt10
-rw-r--r--intern/guardedalloc/MEM_guardedalloc.h117
-rw-r--r--intern/guardedalloc/SConscript12
-rw-r--r--intern/guardedalloc/intern/mallocn.c1267
-rw-r--r--intern/guardedalloc/intern/mallocn_guarded_impl.c1114
-rw-r--r--intern/guardedalloc/intern/mallocn_intern.h132
-rw-r--r--intern/guardedalloc/intern/mallocn_lockfree_impl.c383
-rw-r--r--intern/guardedalloc/intern/mmap_win.c2
-rw-r--r--intern/guardedalloc/mmap_win.h4
-rw-r--r--intern/guardedalloc/test/simpletest/memtest.c4
-rw-r--r--intern/locale/boost_locale_wrapper.cpp2
-rw-r--r--intern/mikktspace/mikktspace.c4
-rw-r--r--intern/opencolorio/CMakeLists.txt2
-rw-r--r--intern/opencolorio/SConscript7
-rw-r--r--intern/opencolorio/fallback_impl.cc106
-rw-r--r--intern/opencolorio/gpu_shader_display_transform.glsl123
-rw-r--r--intern/opencolorio/ocio_capi.cc47
-rw-r--r--intern/opencolorio/ocio_capi.h74
-rw-r--r--intern/opencolorio/ocio_impl.cc114
-rw-r--r--intern/opencolorio/ocio_impl.h47
-rw-r--r--intern/opencolorio/ocio_impl_glsl.cc176
-rw-r--r--intern/rigidbody/rb_bullet_api.cpp6
-rw-r--r--intern/utfconv/utf_winfunc.c19
-rwxr-xr-xrelease/datafiles/blender_icons.sh7
-rw-r--r--release/datafiles/blender_icons.svg1281
-rw-r--r--release/datafiles/blender_icons16.pngbin240951 -> 240983 bytes
-rw-r--r--release/datafiles/blender_icons32.pngbin605550 -> 605580 bytes
-rw-r--r--release/datafiles/colormanagement/config.ocio537
-rw-r--r--release/datafiles/colormanagement/luts/film_response/agfa_advantix_100.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/agfa_advantix_200.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/agfa_advantix_400.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/agfa_agfachrome_ct_precisa_100.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/agfa_agfachrome_ct_precisa_200.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/agfa_agfachrome_rsx2_050.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/agfa_agfachrome_rsx2_100.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/agfa_agfachrome_rsx2_200.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_futura_100.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_futura_200.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_futura_400.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_futura_ii_100.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_futura_ii_200.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_futura_ii_400.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_hdc_100_plus.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_hdc_200_plus.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_hdc_400_plus.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_optima_ii_100.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_optima_ii_200.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_ultra_050.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_vista_100.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_vista_200.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_vista_400.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_vista_800.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/canon_optura_981111.slrr.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/canon_optura_981111.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/canon_optura_981113.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/canon_optura_981114.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/eastman_double_x_neg_12min.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/eastman_double_x_neg_4min.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/eastman_double_x_neg_5min.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/eastman_double_x_neg_6min.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/fujifilm_f-125.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/fujifilm_f-250.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/fujifilm_f-400.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/fujifilm_fci.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/fujifilm_fp2900z.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/kodak_dscs_3151.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/kodak_dscs_3152.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/kodak_dscs_3153.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/kodak_dscs_3154.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/kodak_dscs_3155.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/kodak_dscs_3156.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/kodak_ektachrome_100.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/kodak_ektachrome_100_plus.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/kodak_ektachrome_320t.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/kodak_ektachrome_400x.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/kodak_ektachrome_64.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/kodak_ektachrome_64t.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/kodak_ektachrome_e100s.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/kodak_gold_100.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/kodak_gold_200.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/kodak_kaf-2001.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/kodak_kaf-3000.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/kodak_kai-0311.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/kodak_kai-0372.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/kodak_kai-1010.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/kodak_kodachrome_200.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/kodak_kodachrome_25.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/kodak_kodachrome_64.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/kodak_max_zoom_800.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/kodak_portra_100t.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/kodak_portra_160nc.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/kodak_portra_160vc.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/kodak_portra_400nc.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/kodak_portra_400vc.spi1d1030
-rw-r--r--release/datafiles/colormanagement/luts/film_response/kodak_portra_800.spi1d1030
-rw-r--r--release/datafiles/preview_cycles.blendbin1192316 -> 1263660 bytes
-rw-r--r--release/datafiles/prvicons.pngbin13948 -> 15991 bytes
-rwxr-xr-xrelease/datafiles/prvicons.sh5
-rw-r--r--release/datafiles/prvicons.svg28828
-rw-r--r--release/datafiles/splash.pngbin115689 -> 220834 bytes
-rw-r--r--release/scripts/freestyle/style_modules/ChainingIterators.py6
-rw-r--r--release/scripts/freestyle/style_modules/PredicatesB1D.py2
-rw-r--r--release/scripts/freestyle/style_modules/PredicatesU1D.py14
-rw-r--r--release/scripts/freestyle/style_modules/parameter_editor.py235
-rw-r--r--release/scripts/freestyle/style_modules/shaders.py2
-rw-r--r--release/scripts/modules/addon_utils.py13
-rw-r--r--release/scripts/modules/bl_i18n_utils/bl_extract_messages.py15
-rw-r--r--release/scripts/modules/bl_i18n_utils/settings.py19
-rw-r--r--release/scripts/modules/bl_i18n_utils/utils.py11
-rw-r--r--release/scripts/modules/bl_i18n_utils/utils_spell_check.py4
-rw-r--r--release/scripts/modules/bpy/path.py3
-rw-r--r--release/scripts/modules/bpy/utils.py2
-rw-r--r--release/scripts/modules/bpy_extras/io_utils.py5
-rw-r--r--release/scripts/modules/bpy_extras/mesh_utils.py3
-rw-r--r--release/scripts/modules/bpy_extras/object_utils.py2
-rw-r--r--release/scripts/modules/bpy_types.py21
-rw-r--r--release/scripts/modules/rna_info.py59
-rw-r--r--release/scripts/modules/rna_keymap_ui.py13
-rw-r--r--release/scripts/presets/cycles/sampling/final.py8
-rw-r--r--release/scripts/presets/cycles/sampling/preview.py8
-rw-r--r--release/scripts/presets/keyconfig/3dsmax.py28
-rw-r--r--release/scripts/presets/keyconfig/maya.py124
-rw-r--r--release/scripts/presets/operator/wm.collada_export/sl_plus_open_sim_rigged.py (renamed from release/scripts/presets/operator/wm.collada_export/second_life_rigged.py)2
-rw-r--r--release/scripts/presets/operator/wm.collada_export/sl_plus_open_sim_static.py (renamed from release/scripts/presets/operator/wm.collada_export/second_life_static.py)2
-rw-r--r--release/scripts/startup/bl_operators/__init__.py1
-rw-r--r--release/scripts/startup/bl_operators/add_mesh_torus.py11
-rw-r--r--release/scripts/startup/bl_operators/mask.py34
-rw-r--r--release/scripts/startup/bl_operators/node.py18
-rw-r--r--release/scripts/startup/bl_operators/uvcalc_lightmap.py83
-rw-r--r--release/scripts/startup/bl_operators/uvcalc_smart_project.py115
-rw-r--r--release/scripts/startup/bl_operators/view3d.py32
-rw-r--r--release/scripts/startup/bl_operators/wm.py76
-rw-r--r--release/scripts/startup/bl_ui/__init__.py59
-rw-r--r--release/scripts/startup/bl_ui/properties_constraint.py31
-rw-r--r--release/scripts/startup/bl_ui/properties_data_armature.py9
-rw-r--r--release/scripts/startup/bl_ui/properties_data_bone.py15
-rw-r--r--release/scripts/startup/bl_ui/properties_data_camera.py4
-rw-r--r--release/scripts/startup/bl_ui/properties_data_curve.py4
-rw-r--r--release/scripts/startup/bl_ui/properties_data_mesh.py23
-rw-r--r--release/scripts/startup/bl_ui/properties_data_modifier.py8
-rw-r--r--release/scripts/startup/bl_ui/properties_freestyle.py10
-rw-r--r--release/scripts/startup/bl_ui/properties_game.py11
-rw-r--r--release/scripts/startup/bl_ui/properties_mask_common.py30
-rw-r--r--release/scripts/startup/bl_ui/properties_material.py8
-rw-r--r--release/scripts/startup/bl_ui/properties_object.py7
-rw-r--r--release/scripts/startup/bl_ui/properties_paint_common.py22
-rw-r--r--release/scripts/startup/bl_ui/properties_particle.py89
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_common.py37
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_fluid.py6
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py90
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_smoke.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_render.py29
-rw-r--r--release/scripts/startup/bl_ui/properties_render_layer.py3
-rw-r--r--release/scripts/startup/bl_ui/properties_scene.py4
-rw-r--r--release/scripts/startup/bl_ui/properties_texture.py10
-rw-r--r--release/scripts/startup/bl_ui/space_clip.py134
-rw-r--r--release/scripts/startup/bl_ui/space_dopesheet.py2
-rw-r--r--release/scripts/startup/bl_ui/space_image.py92
-rw-r--r--release/scripts/startup/bl_ui/space_info.py8
-rw-r--r--release/scripts/startup/bl_ui/space_node.py23
-rw-r--r--release/scripts/startup/bl_ui/space_outliner.py4
-rw-r--r--release/scripts/startup/bl_ui/space_sequencer.py45
-rw-r--r--release/scripts/startup/bl_ui/space_text.py12
-rw-r--r--release/scripts/startup/bl_ui/space_time.py15
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py7
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py105
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py199
-rw-r--r--release/scripts/startup/nodeitems_builtins.py1
-rw-r--r--release/scripts/templates_py/custom_nodes.py2
-rw-r--r--release/scripts/templates_py/operator_mesh_uv.py (renamed from release/scripts/templates_py/operator_uv.py)0
-rw-r--r--release/scripts/templates_py/operator_modal_timer.py10
-rw-r--r--release/scripts/templates_py/script_stub.py6
-rw-r--r--release/scripts/templates_py/ui_list.py112
-rw-r--r--release/scripts/templates_py/ui_list_simple.py82
-rw-r--r--release/text/readme.html14
-rw-r--r--source/CMakeLists.txt4
-rw-r--r--source/blender/CMakeLists.txt4
-rw-r--r--source/blender/SConscript3
-rw-r--r--source/blender/blenfont/intern/blf_font.c61
-rw-r--r--source/blender/blenfont/intern/blf_glyph.c62
-rw-r--r--source/blender/blenfont/intern/blf_internal_types.h4
-rw-r--r--source/blender/blenkernel/BKE_DerivedMesh.h16
-rw-r--r--source/blender/blenkernel/BKE_action.h62
-rw-r--r--source/blender/blenkernel/BKE_addon.h4
-rw-r--r--source/blender/blenkernel/BKE_anim.h2
-rw-r--r--source/blender/blenkernel/BKE_animsys.h7
-rw-r--r--source/blender/blenkernel/BKE_armature.h8
-rw-r--r--source/blender/blenkernel/BKE_blender.h16
-rw-r--r--source/blender/blenkernel/BKE_brush.h4
-rw-r--r--source/blender/blenkernel/BKE_ccg.h4
-rw-r--r--source/blender/blenkernel/BKE_cloth.h2
-rw-r--r--source/blender/blenkernel/BKE_curve.h27
-rw-r--r--source/blender/blenkernel/BKE_customdata.h4
-rw-r--r--source/blender/blenkernel/BKE_deform.h8
-rw-r--r--source/blender/blenkernel/BKE_displist.h2
-rw-r--r--source/blender/blenkernel/BKE_editmesh.h11
-rw-r--r--source/blender/blenkernel/BKE_editmesh_bvh.h2
-rw-r--r--source/blender/blenkernel/BKE_fcurve.h5
-rw-r--r--source/blender/blenkernel/BKE_idprop.h172
-rw-r--r--source/blender/blenkernel/BKE_key.h12
-rw-r--r--source/blender/blenkernel/BKE_lamp.h8
-rw-r--r--source/blender/blenkernel/BKE_lattice.h11
-rw-r--r--source/blender/blenkernel/BKE_library.h30
-rw-r--r--source/blender/blenkernel/BKE_mask.h5
-rw-r--r--source/blender/blenkernel/BKE_mball.h2
-rw-r--r--source/blender/blenkernel/BKE_mesh.h352
-rw-r--r--source/blender/blenkernel/BKE_modifier.h22
-rw-r--r--source/blender/blenkernel/BKE_navmesh_conversion.h4
-rw-r--r--source/blender/blenkernel/BKE_node.h36
-rw-r--r--source/blender/blenkernel/BKE_object.h8
-rw-r--r--source/blender/blenkernel/BKE_ocean.h4
-rw-r--r--source/blender/blenkernel/BKE_paint.h1
-rw-r--r--source/blender/blenkernel/BKE_particle.h3
-rw-r--r--source/blender/blenkernel/BKE_pbvh.h23
-rw-r--r--source/blender/blenkernel/BKE_pointcache.h2
-rw-r--r--source/blender/blenkernel/BKE_report.h13
-rw-r--r--source/blender/blenkernel/BKE_screen.h12
-rw-r--r--source/blender/blenkernel/BKE_sequencer.h3
-rw-r--r--source/blender/blenkernel/BKE_shrinkwrap.h6
-rw-r--r--source/blender/blenkernel/BKE_subsurf.h4
-rw-r--r--source/blender/blenkernel/BKE_text.h2
-rw-r--r--source/blender/blenkernel/BKE_texture.h7
-rw-r--r--source/blender/blenkernel/BKE_tracking.h39
-rw-r--r--source/blender/blenkernel/BKE_treehash.h52
-rw-r--r--source/blender/blenkernel/CMakeLists.txt4
-rw-r--r--source/blender/blenkernel/SConscript4
-rw-r--r--source/blender/blenkernel/intern/CCGSubSurf.c19
-rw-r--r--source/blender/blenkernel/intern/CCGSubSurf.h5
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.c162
-rw-r--r--source/blender/blenkernel/intern/action.c111
-rw-r--r--source/blender/blenkernel/intern/addon.c4
-rw-r--r--source/blender/blenkernel/intern/anim.c58
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c127
-rw-r--r--source/blender/blenkernel/intern/armature.c26
-rw-r--r--source/blender/blenkernel/intern/blender.c11
-rw-r--r--source/blender/blenkernel/intern/boids.c24
-rw-r--r--source/blender/blenkernel/intern/bpath.c27
-rw-r--r--source/blender/blenkernel/intern/brush.c11
-rw-r--r--source/blender/blenkernel/intern/bvhutils.c2
-rw-r--r--source/blender/blenkernel/intern/camera.c25
-rw-r--r--source/blender/blenkernel/intern/cdderivedmesh.c176
-rw-r--r--source/blender/blenkernel/intern/cloth.c113
-rw-r--r--source/blender/blenkernel/intern/collision.c5
-rw-r--r--source/blender/blenkernel/intern/colortools.c5
-rw-r--r--source/blender/blenkernel/intern/constraint.c94
-rw-r--r--source/blender/blenkernel/intern/context.c3
-rw-r--r--source/blender/blenkernel/intern/curve.c343
-rw-r--r--source/blender/blenkernel/intern/customdata.c116
-rw-r--r--source/blender/blenkernel/intern/deform.c115
-rw-r--r--source/blender/blenkernel/intern/depsgraph.c112
-rw-r--r--source/blender/blenkernel/intern/displist.c226
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c21
-rw-r--r--source/blender/blenkernel/intern/editderivedmesh.c105
-rw-r--r--source/blender/blenkernel/intern/editmesh.c23
-rw-r--r--source/blender/blenkernel/intern/editmesh_bvh.c21
-rw-r--r--source/blender/blenkernel/intern/effect.c5
-rw-r--r--source/blender/blenkernel/intern/fcurve.c64
-rw-r--r--source/blender/blenkernel/intern/font.c50
-rw-r--r--source/blender/blenkernel/intern/freestyle.c5
-rw-r--r--source/blender/blenkernel/intern/gpencil.c8
-rw-r--r--source/blender/blenkernel/intern/group.c4
-rw-r--r--source/blender/blenkernel/intern/idprop.c220
-rw-r--r--source/blender/blenkernel/intern/image.c21
-rw-r--r--source/blender/blenkernel/intern/key.c136
-rw-r--r--source/blender/blenkernel/intern/lattice.c89
-rw-r--r--source/blender/blenkernel/intern/library.c5
-rw-r--r--source/blender/blenkernel/intern/linestyle.c1
-rw-r--r--source/blender/blenkernel/intern/mask.c74
-rw-r--r--source/blender/blenkernel/intern/mask_rasterize.c20
-rw-r--r--source/blender/blenkernel/intern/material.c4
-rw-r--r--source/blender/blenkernel/intern/mball.c27
-rw-r--r--source/blender/blenkernel/intern/mesh.c2294
-rw-r--r--source/blender/blenkernel/intern/mesh_evaluate.c2301
-rw-r--r--source/blender/blenkernel/intern/mesh_validate.c662
-rw-r--r--source/blender/blenkernel/intern/modifier.c144
-rw-r--r--source/blender/blenkernel/intern/modifiers_bmesh.c5
-rw-r--r--source/blender/blenkernel/intern/movieclip.c1
-rw-r--r--source/blender/blenkernel/intern/multires.c21
-rw-r--r--source/blender/blenkernel/intern/navmesh_conversion.c5
-rw-r--r--source/blender/blenkernel/intern/node.c73
-rw-r--r--source/blender/blenkernel/intern/object.c298
-rw-r--r--source/blender/blenkernel/intern/object_deform.c11
-rw-r--r--source/blender/blenkernel/intern/ocean.c3
-rw-r--r--source/blender/blenkernel/intern/packedFile.c3
-rw-r--r--source/blender/blenkernel/intern/paint.c4
-rw-r--r--source/blender/blenkernel/intern/particle.c56
-rw-r--r--source/blender/blenkernel/intern/particle_system.c60
-rw-r--r--source/blender/blenkernel/intern/pbvh.c34
-rw-r--r--source/blender/blenkernel/intern/pbvh_bmesh.c388
-rw-r--r--source/blender/blenkernel/intern/pbvh_intern.h8
-rw-r--r--source/blender/blenkernel/intern/pointcache.c90
-rw-r--r--source/blender/blenkernel/intern/property.c5
-rw-r--r--source/blender/blenkernel/intern/rigidbody.c2
-rw-r--r--source/blender/blenkernel/intern/sca.c15
-rw-r--r--source/blender/blenkernel/intern/scene.c71
-rw-r--r--source/blender/blenkernel/intern/screen.c22
-rw-r--r--source/blender/blenkernel/intern/sequencer.c137
-rw-r--r--source/blender/blenkernel/intern/shrinkwrap.c40
-rw-r--r--source/blender/blenkernel/intern/smoke.c41
-rw-r--r--source/blender/blenkernel/intern/sound.c2
-rw-r--r--source/blender/blenkernel/intern/subsurf_ccg.c145
-rw-r--r--source/blender/blenkernel/intern/text.c34
-rw-r--r--source/blender/blenkernel/intern/texture.c90
-rw-r--r--source/blender/blenkernel/intern/tracking.c393
-rw-r--r--source/blender/blenkernel/intern/treehash.c164
-rw-r--r--source/blender/blenkernel/intern/writeffmpeg.c4
-rw-r--r--source/blender/blenlib/BLI_alloca.h1
-rw-r--r--source/blender/blenlib/BLI_array.h2
-rw-r--r--source/blender/blenlib/BLI_bitmap.h13
-rw-r--r--source/blender/blenlib/BLI_boxpack2d.h5
-rw-r--r--source/blender/blenlib/BLI_buffer.h24
-rw-r--r--source/blender/blenlib/BLI_callbacks.h8
-rw-r--r--source/blender/blenlib/BLI_compiler_attrs.h88
-rw-r--r--source/blender/blenlib/BLI_convexhull2d.h (renamed from source/blender/compositor/operations/COM_MixBlendOperation.h)37
-rw-r--r--source/blender/blenlib/BLI_dynstr.h14
-rw-r--r--source/blender/blenlib/BLI_edgehash.h94
-rw-r--r--source/blender/blenlib/BLI_endian_switch.h41
-rw-r--r--source/blender/blenlib/BLI_fileops.h6
-rw-r--r--source/blender/blenlib/BLI_fnmatch.h9
-rw-r--r--source/blender/blenlib/BLI_ghash.h179
-rw-r--r--source/blender/blenlib/BLI_jitter.h4
-rw-r--r--source/blender/blenlib/BLI_kdopbvh.h2
-rw-r--r--source/blender/blenlib/BLI_kdtree.h33
-rw-r--r--source/blender/blenlib/BLI_lasso.h6
-rw-r--r--source/blender/blenlib/BLI_linklist.h13
-rw-r--r--source/blender/blenlib/BLI_linklist_stack.h157
-rw-r--r--source/blender/blenlib/BLI_listbase.h5
-rw-r--r--source/blender/blenlib/BLI_math_base.h1
-rw-r--r--source/blender/blenlib/BLI_math_geom.h40
-rw-r--r--source/blender/blenlib/BLI_math_interp.h10
-rw-r--r--source/blender/blenlib/BLI_math_matrix.h7
-rw-r--r--source/blender/blenlib/BLI_math_rotation.h11
-rw-r--r--source/blender/blenlib/BLI_math_vector.h100
-rw-r--r--source/blender/blenlib/BLI_memarena.h56
-rw-r--r--source/blender/blenlib/BLI_mempool.h99
-rw-r--r--source/blender/blenlib/BLI_path_util.h27
-rw-r--r--source/blender/blenlib/BLI_scanfill.h32
-rw-r--r--source/blender/blenlib/BLI_smallhash.h32
-rw-r--r--source/blender/blenlib/BLI_sort.h (renamed from source/blender/compositor/operations/COM_MixBurnOperation.h)46
-rw-r--r--source/blender/blenlib/BLI_sort_utils.h61
-rw-r--r--source/blender/blenlib/BLI_strict_flags.h (renamed from source/blender/compositor/operations/COM_MixAddOperation.h)42
-rw-r--r--source/blender/blenlib/BLI_string.h157
-rw-r--r--source/blender/blenlib/BLI_string_utf8.h60
-rw-r--r--source/blender/blenlib/BLI_sys_types.h2
-rw-r--r--source/blender/blenlib/BLI_task.h108
-rw-r--r--source/blender/blenlib/BLI_threads.h33
-rw-r--r--source/blender/blenlib/BLI_utildefines.h8
-rw-r--r--source/blender/blenlib/BLI_winstuff.h1
-rw-r--r--source/blender/blenlib/CMakeLists.txt22
-rw-r--r--source/blender/blenlib/PIL_time.h38
-rw-r--r--source/blender/blenlib/PIL_time_utildefines.h96
-rw-r--r--source/blender/blenlib/intern/BLI_array.c2
-rw-r--r--source/blender/blenlib/intern/BLI_ghash.c793
-rw-r--r--source/blender/blenlib/intern/BLI_heap.c11
-rw-r--r--source/blender/blenlib/intern/BLI_kdopbvh.c70
-rw-r--r--source/blender/blenlib/intern/BLI_kdtree.c171
-rw-r--r--source/blender/blenlib/intern/BLI_linklist.c49
-rw-r--r--source/blender/blenlib/intern/BLI_memarena.c77
-rw-r--r--source/blender/blenlib/intern/BLI_mempool.c469
-rw-r--r--source/blender/blenlib/intern/boxpack2d.c51
-rw-r--r--source/blender/blenlib/intern/buffer.c4
-rw-r--r--source/blender/blenlib/intern/callbacks.c4
-rw-r--r--source/blender/blenlib/intern/convexhull2d.c338
-rw-r--r--source/blender/blenlib/intern/edgehash.c488
-rw-r--r--source/blender/blenlib/intern/fileops.c5
-rw-r--r--source/blender/blenlib/intern/gsqueue.c17
-rw-r--r--source/blender/blenlib/intern/lasso.c17
-rw-r--r--source/blender/blenlib/intern/listbase.c51
-rw-r--r--source/blender/blenlib/intern/math_base_inline.c11
-rw-r--r--source/blender/blenlib/intern/math_geom.c366
-rw-r--r--source/blender/blenlib/intern/math_geom_inline.c5
-rw-r--r--source/blender/blenlib/intern/math_interp.c4
-rw-r--r--source/blender/blenlib/intern/math_matrix.c40
-rw-r--r--source/blender/blenlib/intern/math_rotation.c42
-rw-r--r--source/blender/blenlib/intern/math_vector_inline.c65
-rw-r--r--source/blender/blenlib/intern/noise.c24
-rw-r--r--source/blender/blenlib/intern/path_util.c40
-rw-r--r--source/blender/blenlib/intern/quadric.c2
-rw-r--r--source/blender/blenlib/intern/rand.c16
-rw-r--r--source/blender/blenlib/intern/scanfill.c299
-rw-r--r--source/blender/blenlib/intern/smallhash.c19
-rw-r--r--source/blender/blenlib/intern/sort.c173
-rw-r--r--source/blender/blenlib/intern/sort_utils.c74
-rw-r--r--source/blender/blenlib/intern/storage.c1
-rw-r--r--source/blender/blenlib/intern/task.c424
-rw-r--r--source/blender/blenlib/intern/threads.c129
-rw-r--r--source/blender/blenloader/BLO_readfile.h5
-rw-r--r--source/blender/blenloader/CMakeLists.txt1
-rw-r--r--source/blender/blenloader/intern/readblenentry.c8
-rw-r--r--source/blender/blenloader/intern/readfile.c322
-rw-r--r--source/blender/blenloader/intern/undofile.c6
-rw-r--r--source/blender/blenloader/intern/versioning_defaults.c57
-rw-r--r--source/blender/blenloader/intern/versioning_legacy.c34
-rw-r--r--source/blender/blenloader/intern/writefile.c56
-rw-r--r--source/blender/bmesh/CMakeLists.txt13
-rw-r--r--source/blender/bmesh/bmesh.h57
-rw-r--r--source/blender/bmesh/bmesh_class.h31
-rw-r--r--source/blender/bmesh/bmesh_tools.h (renamed from source/blender/compositor/operations/COM_ConvertStraightToPremulOperation.h)51
-rw-r--r--source/blender/bmesh/intern/bmesh_construct.c177
-rw-r--r--source/blender/bmesh/intern/bmesh_construct.h18
-rw-r--r--source/blender/bmesh/intern/bmesh_core.c124
-rw-r--r--source/blender/bmesh/intern/bmesh_core.h15
-rw-r--r--source/blender/bmesh/intern/bmesh_edgeloop.c5
-rw-r--r--source/blender/bmesh/intern/bmesh_edgeloop.h2
-rw-r--r--source/blender/bmesh/intern/bmesh_inline.h2
-rw-r--r--source/blender/bmesh/intern/bmesh_iterators.c56
-rw-r--r--source/blender/bmesh/intern/bmesh_iterators.h28
-rw-r--r--source/blender/bmesh/intern/bmesh_log.c64
-rw-r--r--source/blender/bmesh/intern/bmesh_log.h15
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh.c204
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh.h26
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh_conv.c2
-rw-r--r--source/blender/bmesh/intern/bmesh_mods.c62
-rw-r--r--source/blender/bmesh/intern/bmesh_opdefines.c70
-rw-r--r--source/blender/bmesh/intern/bmesh_operator_api.h32
-rw-r--r--source/blender/bmesh/intern/bmesh_operator_api_inline.h84
-rw-r--r--source/blender/bmesh/intern/bmesh_operators.c222
-rw-r--r--source/blender/bmesh/intern/bmesh_operators_private.h2
-rw-r--r--source/blender/bmesh/intern/bmesh_polygon.c425
-rw-r--r--source/blender/bmesh/intern/bmesh_polygon.h51
-rw-r--r--source/blender/bmesh/intern/bmesh_queries.c157
-rw-r--r--source/blender/bmesh/intern/bmesh_queries.h6
-rw-r--r--source/blender/bmesh/intern/bmesh_walkers.c14
-rw-r--r--source/blender/bmesh/intern/bmesh_walkers.h4
-rw-r--r--source/blender/bmesh/intern/bmesh_walkers_impl.c195
-rw-r--r--source/blender/bmesh/operators/bmo_beautify.c359
-rw-r--r--source/blender/bmesh/operators/bmo_bevel.c1
-rw-r--r--source/blender/bmesh/operators/bmo_bisect_plane.c112
-rw-r--r--source/blender/bmesh/operators/bmo_bridge.c17
-rw-r--r--source/blender/bmesh/operators/bmo_connect.c14
-rw-r--r--source/blender/bmesh/operators/bmo_connect_nonplanar.c21
-rw-r--r--source/blender/bmesh/operators/bmo_create.c9
-rw-r--r--source/blender/bmesh/operators/bmo_dissolve.c78
-rw-r--r--source/blender/bmesh/operators/bmo_dupe.c200
-rw-r--r--source/blender/bmesh/operators/bmo_edgenet.c1023
-rw-r--r--source/blender/bmesh/operators/bmo_extrude.c20
-rw-r--r--source/blender/bmesh/operators/bmo_fill_attribute.c174
-rw-r--r--source/blender/bmesh/operators/bmo_fill_edgeloop.c2
-rw-r--r--source/blender/bmesh/operators/bmo_fill_grid.c311
-rw-r--r--source/blender/bmesh/operators/bmo_fill_holes.c122
-rw-r--r--source/blender/bmesh/operators/bmo_hull.c42
-rw-r--r--source/blender/bmesh/operators/bmo_inset.c445
-rw-r--r--source/blender/bmesh/operators/bmo_join_triangles.c35
-rw-r--r--source/blender/bmesh/operators/bmo_normals.c17
-rw-r--r--source/blender/bmesh/operators/bmo_poke.c6
-rw-r--r--source/blender/bmesh/operators/bmo_primitive.c54
-rw-r--r--source/blender/bmesh/operators/bmo_removedoubles.c70
-rw-r--r--source/blender/bmesh/operators/bmo_split_edges.c1
-rw-r--r--source/blender/bmesh/operators/bmo_subdivide.c2
-rw-r--r--source/blender/bmesh/operators/bmo_subdivide_edgering.c38
-rw-r--r--source/blender/bmesh/operators/bmo_symmetrize.c676
-rw-r--r--source/blender/bmesh/operators/bmo_triangulate.c39
-rw-r--r--source/blender/bmesh/operators/bmo_unsubdivide.c1
-rw-r--r--source/blender/bmesh/operators/bmo_utils.c19
-rw-r--r--source/blender/bmesh/operators/bmo_wireframe.c34
-rw-r--r--source/blender/bmesh/tools/bmesh_beautify.c445
-rw-r--r--source/blender/bmesh/tools/bmesh_beautify.h (renamed from source/blender/compositor/operations/COM_RenderLayersColorOperation.h)27
-rw-r--r--source/blender/bmesh/tools/bmesh_bevel.c61
-rw-r--r--source/blender/bmesh/tools/bmesh_bisect_plane.c415
-rw-r--r--source/blender/bmesh/tools/bmesh_bisect_plane.h (renamed from source/blender/compositor/operations/COM_RenderLayersCyclesOperation.h)25
-rw-r--r--source/blender/bmesh/tools/bmesh_decimate_collapse.c4
-rw-r--r--source/blender/bmesh/tools/bmesh_decimate_dissolve.c2
-rw-r--r--source/blender/bmesh/tools/bmesh_decimate_unsubdivide.c7
-rw-r--r--source/blender/bmesh/tools/bmesh_edgenet.c508
-rw-r--r--source/blender/bmesh/tools/bmesh_edgenet.h (renamed from source/blender/compositor/operations/COM_RenderLayersDepthProg.h)25
-rw-r--r--source/blender/bmesh/tools/bmesh_edgesplit.c6
-rw-r--r--source/blender/bmesh/tools/bmesh_triangulate.c16
-rw-r--r--source/blender/bmesh/tools/bmesh_triangulate.h6
-rw-r--r--source/blender/collada/AnimationExporter.cpp4
-rw-r--r--source/blender/collada/ArmatureExporter.cpp8
-rw-r--r--source/blender/collada/CameraExporter.cpp12
-rw-r--r--source/blender/collada/CameraExporter.h2
-rw-r--r--source/blender/collada/ControllerExporter.cpp4
-rw-r--r--source/blender/collada/DocumentImporter.cpp7
-rw-r--r--source/blender/collada/ExportSettings.h2
-rw-r--r--source/blender/collada/MeshImporter.cpp17
-rw-r--r--source/blender/collada/collada.cpp14
-rw-r--r--source/blender/collada/collada.h2
-rw-r--r--source/blender/collada/collada_utils.cpp2
-rw-r--r--source/blender/collada/version.conf1
-rw-r--r--source/blender/compositor/CMakeLists.txt129
-rw-r--r--source/blender/compositor/COM_compositor.h5
-rw-r--r--source/blender/compositor/COM_defines.h6
-rw-r--r--source/blender/compositor/intern/COM_Converter.cpp11
-rw-r--r--source/blender/compositor/intern/COM_Debug.cpp413
-rw-r--r--source/blender/compositor/intern/COM_Debug.h79
-rw-r--r--source/blender/compositor/intern/COM_ExecutionGroup.cpp28
-rw-r--r--source/blender/compositor/intern/COM_ExecutionGroup.h3
-rw-r--r--source/blender/compositor/intern/COM_ExecutionSystem.cpp15
-rw-r--r--source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp152
-rw-r--r--source/blender/compositor/intern/COM_ExecutionSystemHelper.h6
-rw-r--r--source/blender/compositor/intern/COM_MemoryBuffer.cpp11
-rw-r--r--source/blender/compositor/intern/COM_MemoryBuffer.h81
-rw-r--r--source/blender/compositor/intern/COM_NodeBase.h2
-rw-r--r--source/blender/compositor/intern/COM_NodeOperation.h3
-rw-r--r--source/blender/compositor/intern/COM_WorkScheduler.cpp3
-rw-r--r--source/blender/compositor/nodes/COM_AlphaOverNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_BlurNode.cpp1
-rw-r--r--source/blender/compositor/nodes/COM_ChannelMatteNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_ChromaMatteNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_ColorBalanceNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_ColorMatteNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_ColorRampNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_ColorToBWNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_CombineHSVANode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_CombineRGBANode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_CombineYCCANode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_CombineYUVANode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp3
-rw-r--r--source/blender/compositor/nodes/COM_DistanceMatteNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_FilterNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_GlareNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.cpp6
-rw-r--r--source/blender/compositor/nodes/COM_HueSaturationValueNode.cpp6
-rw-r--r--source/blender/compositor/nodes/COM_ImageNode.cpp25
-rw-r--r--source/blender/compositor/nodes/COM_ImageNode.h2
-rw-r--r--source/blender/compositor/nodes/COM_KeyingNode.cpp5
-rw-r--r--source/blender/compositor/nodes/COM_LuminanceMatteNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_MixNode.cpp19
-rw-r--r--source/blender/compositor/nodes/COM_OutputFileNode.cpp8
-rw-r--r--source/blender/compositor/nodes/COM_RenderLayersNode.cpp21
-rw-r--r--source/blender/compositor/nodes/COM_RenderLayersNode.h2
-rw-r--r--source/blender/compositor/nodes/COM_SeparateHSVANode.cpp3
-rw-r--r--source/blender/compositor/nodes/COM_SeparateRGBANode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_SeparateYCCANode.cpp3
-rw-r--r--source/blender/compositor/nodes/COM_SeparateYUVANode.cpp3
-rw-r--r--source/blender/compositor/nodes/COM_SplitViewerNode.cpp5
-rw-r--r--source/blender/compositor/nodes/COM_TranslateNode.cpp8
-rw-r--r--source/blender/compositor/nodes/COM_ZCombineNode.cpp2
-rw-r--r--source/blender/compositor/operations/COM_AlphaOverKeyOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_AlphaOverMixedOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ChangeHSVOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ChannelMatteOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ChromaMatteOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ColorMatteOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_CombineChannelsOperation.cpp76
-rw-r--r--source/blender/compositor/operations/COM_CombineChannelsOperation.h42
-rw-r--r--source/blender/compositor/operations/COM_ConvertColorToBWOperation.cpp47
-rw-r--r--source/blender/compositor/operations/COM_ConvertColorToBWOperation.h60
-rw-r--r--source/blender/compositor/operations/COM_ConvertColorToValueProg.cpp47
-rw-r--r--source/blender/compositor/operations/COM_ConvertColorToValueProg.h59
-rw-r--r--source/blender/compositor/operations/COM_ConvertColorToVectorOperation.cpp45
-rw-r--r--source/blender/compositor/operations/COM_ConvertColorToVectorOperation.h59
-rw-r--r--source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.cpp50
-rw-r--r--source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.h59
-rw-r--r--source/blender/compositor/operations/COM_ConvertOperation.cpp429
-rw-r--r--source/blender/compositor/operations/COM_ConvertOperation.h202
-rw-r--r--source/blender/compositor/operations/COM_ConvertPremulToStraightOperation.cpp60
-rw-r--r--source/blender/compositor/operations/COM_ConvertRGBToHSVOperation.cpp49
-rw-r--r--source/blender/compositor/operations/COM_ConvertRGBToHSVOperation.h60
-rw-r--r--source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.cpp70
-rw-r--r--source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.h68
-rw-r--r--source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.cpp48
-rw-r--r--source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.h59
-rw-r--r--source/blender/compositor/operations/COM_ConvertStraightToPremulOperation.cpp55
-rw-r--r--source/blender/compositor/operations/COM_ConvertValueToColorProg.cpp47
-rw-r--r--source/blender/compositor/operations/COM_ConvertValueToColorProg.h53
-rw-r--r--source/blender/compositor/operations/COM_ConvertValueToVectorOperation.cpp50
-rw-r--r--source/blender/compositor/operations/COM_ConvertValueToVectorOperation.h59
-rw-r--r--source/blender/compositor/operations/COM_ConvertVectorToColorOperation.cpp46
-rw-r--r--source/blender/compositor/operations/COM_ConvertVectorToColorOperation.h59
-rw-r--r--source/blender/compositor/operations/COM_ConvertVectorToValueOperation.cpp47
-rw-r--r--source/blender/compositor/operations/COM_ConvertVectorToValueOperation.h59
-rw-r--r--source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.cpp70
-rw-r--r--source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.h68
-rw-r--r--source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.cpp49
-rw-r--r--source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.h58
-rw-r--r--source/blender/compositor/operations/COM_DifferenceMatteOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_DistanceRGBMatteOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_DistanceYCCMatteOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp150
-rw-r--r--source/blender/compositor/operations/COM_FastGaussianBlurOperation.h7
-rw-r--r--source/blender/compositor/operations/COM_GlareGhostOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_GlareStreaksOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_ImageOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_InpaintOperation.cpp1
-rw-r--r--source/blender/compositor/operations/COM_LuminanceMatteOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_MapUVOperation.cpp26
-rw-r--r--source/blender/compositor/operations/COM_MixAddOperation.cpp51
-rw-r--r--source/blender/compositor/operations/COM_MixBaseOperation.cpp95
-rw-r--r--source/blender/compositor/operations/COM_MixBaseOperation.h81
-rw-r--r--source/blender/compositor/operations/COM_MixBlendOperation.cpp52
-rw-r--r--source/blender/compositor/operations/COM_MixBurnOperation.cpp90
-rw-r--r--source/blender/compositor/operations/COM_MixColorOperation.cpp68
-rw-r--r--source/blender/compositor/operations/COM_MixColorOperation.h45
-rw-r--r--source/blender/compositor/operations/COM_MixDarkenOperation.cpp60
-rw-r--r--source/blender/compositor/operations/COM_MixDarkenOperation.h45
-rw-r--r--source/blender/compositor/operations/COM_MixDifferenceOperation.cpp53
-rw-r--r--source/blender/compositor/operations/COM_MixDifferenceOperation.h45
-rw-r--r--source/blender/compositor/operations/COM_MixDivideOperation.cpp63
-rw-r--r--source/blender/compositor/operations/COM_MixDivideOperation.h45
-rw-r--r--source/blender/compositor/operations/COM_MixDodgeOperation.cpp95
-rw-r--r--source/blender/compositor/operations/COM_MixDodgeOperation.h45
-rw-r--r--source/blender/compositor/operations/COM_MixGlareOperation.cpp53
-rw-r--r--source/blender/compositor/operations/COM_MixGlareOperation.h45
-rw-r--r--source/blender/compositor/operations/COM_MixHueOperation.cpp67
-rw-r--r--source/blender/compositor/operations/COM_MixHueOperation.h45
-rw-r--r--source/blender/compositor/operations/COM_MixLightenOperation.cpp58
-rw-r--r--source/blender/compositor/operations/COM_MixLightenOperation.h44
-rw-r--r--source/blender/compositor/operations/COM_MixLinearLightOperation.cpp60
-rw-r--r--source/blender/compositor/operations/COM_MixLinearLightOperation.h45
-rw-r--r--source/blender/compositor/operations/COM_MixMultiplyOperation.cpp52
-rw-r--r--source/blender/compositor/operations/COM_MixMultiplyOperation.h45
-rw-r--r--source/blender/compositor/operations/COM_MixOperation.cpp848
-rw-r--r--source/blender/compositor/operations/COM_MixOperation.h197
-rw-r--r--source/blender/compositor/operations/COM_MixOverlayOperation.cpp69
-rw-r--r--source/blender/compositor/operations/COM_MixOverlayOperation.h45
-rw-r--r--source/blender/compositor/operations/COM_MixSaturationOperation.cpp64
-rw-r--r--source/blender/compositor/operations/COM_MixSaturationOperation.h45
-rw-r--r--source/blender/compositor/operations/COM_MixScreenOperation.cpp53
-rw-r--r--source/blender/compositor/operations/COM_MixScreenOperation.h44
-rw-r--r--source/blender/compositor/operations/COM_MixSoftLightOperation.cpp59
-rw-r--r--source/blender/compositor/operations/COM_MixSoftLightOperation.h45
-rw-r--r--source/blender/compositor/operations/COM_MixSubtractOperation.cpp51
-rw-r--r--source/blender/compositor/operations/COM_MixSubtractOperation.h45
-rw-r--r--source/blender/compositor/operations/COM_MixValueOperation.cpp58
-rw-r--r--source/blender/compositor/operations/COM_MixValueOperation.h44
-rw-r--r--source/blender/compositor/operations/COM_MultilayerImageOperation.cpp9
-rw-r--r--source/blender/compositor/operations/COM_MultilayerImageOperation.h8
-rw-r--r--source/blender/compositor/operations/COM_OutputFileOperation.cpp18
-rw-r--r--source/blender/compositor/operations/COM_PlaneTrackMaskOperation.cpp7
-rw-r--r--source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.cpp37
-rw-r--r--source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ReadBufferOperation.cpp34
-rw-r--r--source/blender/compositor/operations/COM_ReadBufferOperation.h5
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersAOOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersAlphaProg.cpp49
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersAlphaProg.h35
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersBaseProg.cpp178
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersColorOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersCyclesOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersDepthProg.cpp29
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersDiffuseOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersDiffuseOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersEmitOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersEmitOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersEnvironmentOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersEnvironmentOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersImageProg.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersImageProg.h34
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersIndirectOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersIndirectOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersMaterialIndexOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersMaterialIndexOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersMistOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersMistOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersNormalOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersNormalOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersObjectIndexOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersObjectIndexOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersProg.cpp361
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersProg.h (renamed from source/blender/compositor/operations/COM_RenderLayersBaseProg.h)103
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersReflectionOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersReflectionOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersRefractionOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersRefractionOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersShadowOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersShadowOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersSpecularOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersSpecularOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersSpeedOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersSpeedOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersUVOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersUVOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_SeparateChannelOperation.cpp47
-rw-r--r--source/blender/compositor/operations/COM_SeparateChannelOperation.h42
-rw-r--r--source/blender/compositor/operations/COM_SetColorOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_SetValueOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_SetVectorOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_TrackPositionOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ViewerOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_WrapOperation.cpp26
-rw-r--r--source/blender/compositor/operations/COM_WrapOperation.h8
-rw-r--r--source/blender/compositor/operations/COM_WriteBufferOperation.cpp20
-rw-r--r--source/blender/compositor/operations/COM_WriteBufferOperation.h3
-rw-r--r--source/blender/compositor/operations/COM_ZCombineOperation.h2
-rw-r--r--source/blender/datatoc/datatoc.c4
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c7
-rw-r--r--source/blender/editors/animation/anim_channels_edit.c42
-rw-r--r--source/blender/editors/animation/anim_filter.c55
-rw-r--r--source/blender/editors/animation/anim_ipo_utils.c2
-rw-r--r--source/blender/editors/animation/anim_markers.c57
-rw-r--r--source/blender/editors/animation/anim_ops.c10
-rw-r--r--source/blender/editors/animation/drivers.c38
-rw-r--r--source/blender/editors/animation/keyframes_edit.c2
-rw-r--r--source/blender/editors/animation/keyframing.c92
-rw-r--r--source/blender/editors/armature/BIF_retarget.h4
-rw-r--r--source/blender/editors/armature/armature_add.c6
-rw-r--r--source/blender/editors/armature/armature_edit.c6
-rw-r--r--source/blender/editors/armature/armature_naming.c35
-rw-r--r--source/blender/editors/armature/armature_ops.c32
-rw-r--r--source/blender/editors/armature/armature_skinning.c5
-rw-r--r--source/blender/editors/armature/armature_utils.c2
-rw-r--r--source/blender/editors/armature/editarmature_retarget.c46
-rw-r--r--source/blender/editors/armature/meshlaplacian.c2
-rw-r--r--source/blender/editors/armature/pose_edit.c30
-rw-r--r--source/blender/editors/armature/pose_lib.c2
-rw-r--r--source/blender/editors/armature/pose_select.c38
-rw-r--r--source/blender/editors/armature/pose_slide.c6
-rw-r--r--source/blender/editors/armature/reeb.c2
-rw-r--r--source/blender/editors/curve/CMakeLists.txt1
-rw-r--r--source/blender/editors/curve/curve_intern.h39
-rw-r--r--source/blender/editors/curve/curve_ops.c2
-rw-r--r--source/blender/editors/curve/editcurve.c2341
-rw-r--r--source/blender/editors/curve/editcurve_add.c812
-rw-r--r--source/blender/editors/curve/editfont.c2
-rw-r--r--source/blender/editors/curve/lorem.c1
-rw-r--r--source/blender/editors/datafiles/CMakeLists.txt10
-rw-r--r--source/blender/editors/gpencil/gpencil_edit.c15
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c10
-rw-r--r--source/blender/editors/include/BIF_glutil.h3
-rw-r--r--source/blender/editors/include/ED_anim_api.h36
-rw-r--r--source/blender/editors/include/ED_armature.h8
-rw-r--r--source/blender/editors/include/ED_clip.h8
-rw-r--r--source/blender/editors/include/ED_curve.h1
-rw-r--r--source/blender/editors/include/ED_keyframing.h1
-rw-r--r--source/blender/editors/include/ED_lattice.h5
-rw-r--r--source/blender/editors/include/ED_mask.h4
-rw-r--r--source/blender/editors/include/ED_mball.h3
-rw-r--r--source/blender/editors/include/ED_mesh.h40
-rw-r--r--source/blender/editors/include/ED_numinput.h7
-rw-r--r--source/blender/editors/include/ED_object.h19
-rw-r--r--source/blender/editors/include/ED_render.h2
-rw-r--r--source/blender/editors/include/ED_screen_types.h6
-rw-r--r--source/blender/editors/include/ED_sculpt.h4
-rw-r--r--source/blender/editors/include/ED_transform.h4
-rw-r--r--source/blender/editors/include/ED_util.h6
-rw-r--r--source/blender/editors/include/ED_uvedit.h2
-rw-r--r--source/blender/editors/include/ED_view3d.h13
-rw-r--r--source/blender/editors/include/UI_icons.h10
-rw-r--r--source/blender/editors/include/UI_interface.h37
-rw-r--r--source/blender/editors/include/UI_resources.h3
-rw-r--r--source/blender/editors/include/UI_view2d.h3
-rw-r--r--source/blender/editors/interface/CMakeLists.txt1
-rw-r--r--source/blender/editors/interface/interface.c61
-rw-r--r--source/blender/editors/interface/interface_anim.c2
-rw-r--r--source/blender/editors/interface/interface_draw.c6
-rw-r--r--source/blender/editors/interface/interface_eyedropper.c642
-rw-r--r--source/blender/editors/interface/interface_handlers.c814
-rw-r--r--source/blender/editors/interface/interface_intern.h12
-rw-r--r--source/blender/editors/interface/interface_layout.c42
-rw-r--r--source/blender/editors/interface/interface_ops.c379
-rw-r--r--source/blender/editors/interface/interface_regions.c45
-rw-r--r--source/blender/editors/interface/interface_templates.c573
-rw-r--r--source/blender/editors/interface/interface_widgets.c76
-rw-r--r--source/blender/editors/interface/resources.c21
-rw-r--r--source/blender/editors/interface/view2d.c11
-rw-r--r--source/blender/editors/interface/view2d_ops.c50
-rw-r--r--source/blender/editors/io/io_collada.c32
-rw-r--r--source/blender/editors/mask/SConscript3
-rw-r--r--source/blender/editors/mask/mask_add.c156
-rw-r--r--source/blender/editors/mask/mask_draw.c118
-rw-r--r--source/blender/editors/mask/mask_edit.c53
-rw-r--r--source/blender/editors/mask/mask_intern.h5
-rw-r--r--source/blender/editors/mask/mask_ops.c127
-rw-r--r--source/blender/editors/mask/mask_relationships.c1
-rw-r--r--source/blender/editors/mesh/CMakeLists.txt1
-rw-r--r--source/blender/editors/mesh/editface.c37
-rw-r--r--source/blender/editors/mesh/editmesh_add.c39
-rw-r--r--source/blender/editors/mesh/editmesh_bevel.c2
-rw-r--r--source/blender/editors/mesh/editmesh_bisect.c331
-rw-r--r--source/blender/editors/mesh/editmesh_extrude.c11
-rw-r--r--source/blender/editors/mesh/editmesh_inset.c16
-rw-r--r--source/blender/editors/mesh/editmesh_knife.c469
-rw-r--r--source/blender/editors/mesh/editmesh_loopcut.c13
-rw-r--r--source/blender/editors/mesh/editmesh_path.c3
-rw-r--r--source/blender/editors/mesh/editmesh_rip.c122
-rw-r--r--source/blender/editors/mesh/editmesh_select.c189
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c260
-rw-r--r--source/blender/editors/mesh/editmesh_utils.c206
-rw-r--r--source/blender/editors/mesh/mesh_intern.h2
-rw-r--r--source/blender/editors/mesh/mesh_navmesh.c16
-rw-r--r--source/blender/editors/mesh/mesh_ops.c8
-rw-r--r--source/blender/editors/mesh/meshtools.c36
-rw-r--r--source/blender/editors/metaball/mball_edit.c217
-rw-r--r--source/blender/editors/metaball/mball_intern.h1
-rw-r--r--source/blender/editors/metaball/mball_ops.c18
-rw-r--r--source/blender/editors/object/object_add.c64
-rw-r--r--source/blender/editors/object/object_bake.c123
-rw-r--r--source/blender/editors/object/object_edit.c132
-rw-r--r--source/blender/editors/object/object_group.c4
-rw-r--r--source/blender/editors/object/object_hook.c28
-rw-r--r--source/blender/editors/object/object_modifier.c4
-rw-r--r--source/blender/editors/object/object_relations.c97
-rw-r--r--source/blender/editors/object/object_shapekey.c12
-rw-r--r--source/blender/editors/object/object_transform.c89
-rw-r--r--source/blender/editors/object/object_vgroup.c491
-rw-r--r--source/blender/editors/physics/dynamicpaint_ops.c6
-rw-r--r--source/blender/editors/physics/particle_edit.c48
-rw-r--r--source/blender/editors/physics/physics_pointcache.c4
-rw-r--r--source/blender/editors/render/render_internal.c80
-rw-r--r--source/blender/editors/render/render_opengl.c27
-rw-r--r--source/blender/editors/render/render_preview.c7
-rw-r--r--source/blender/editors/render/render_shading.c52
-rw-r--r--source/blender/editors/screen/area.c9
-rw-r--r--source/blender/editors/screen/glutil.c62
-rw-r--r--source/blender/editors/screen/screen_edit.c30
-rw-r--r--source/blender/editors/screen/screen_ops.c112
-rw-r--r--source/blender/editors/screen/screendump.c18
-rw-r--r--source/blender/editors/sculpt_paint/paint_cursor.c103
-rw-r--r--source/blender/editors/sculpt_paint/paint_hide.c38
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c116
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c115
-rw-r--r--source/blender/editors/sculpt_paint/paint_intern.h3
-rw-r--r--source/blender/editors/sculpt_paint/paint_mask.c71
-rw-r--r--source/blender/editors/sculpt_paint/paint_ops.c34
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c13
-rw-r--r--source/blender/editors/sculpt_paint/paint_undo.c24
-rw-r--r--source/blender/editors/sculpt_paint/paint_utils.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c144
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c243
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_uv.c22
-rw-r--r--source/blender/editors/space_action/action_ops.c32
-rw-r--r--source/blender/editors/space_action/action_select.c80
-rw-r--r--source/blender/editors/space_api/spacetypes.c1
-rw-r--r--source/blender/editors/space_buttons/buttons_texture.c37
-rw-r--r--source/blender/editors/space_clip/clip_buttons.c15
-rw-r--r--source/blender/editors/space_clip/clip_draw.c114
-rw-r--r--source/blender/editors/space_clip/clip_editor.c52
-rw-r--r--source/blender/editors/space_clip/clip_graph_draw.c24
-rw-r--r--source/blender/editors/space_clip/clip_graph_ops.c57
-rw-r--r--source/blender/editors/space_clip/clip_intern.h9
-rw-r--r--source/blender/editors/space_clip/clip_ops.c81
-rw-r--r--source/blender/editors/space_clip/clip_utils.c28
-rw-r--r--source/blender/editors/space_clip/space_clip.c157
-rw-r--r--source/blender/editors/space_clip/tracking_ops.c185
-rw-r--r--source/blender/editors/space_clip/tracking_select.c28
-rw-r--r--source/blender/editors/space_console/console_ops.c1
-rw-r--r--source/blender/editors/space_console/space_console.c1
-rw-r--r--source/blender/editors/space_file/CMakeLists.txt4
-rw-r--r--source/blender/editors/space_file/SConscript3
-rw-r--r--source/blender/editors/space_file/file_intern.h2
-rw-r--r--source/blender/editors/space_file/file_ops.c4
-rw-r--r--source/blender/editors/space_file/file_panels.c2
-rw-r--r--source/blender/editors/space_file/filelist.c34
-rw-r--r--source/blender/editors/space_file/filesel.c56
-rw-r--r--source/blender/editors/space_file/fsmenu.c83
-rw-r--r--source/blender/editors/space_file/space_file.c9
-rw-r--r--source/blender/editors/space_graph/graph_draw.c2
-rw-r--r--source/blender/editors/space_graph/graph_edit.c51
-rw-r--r--source/blender/editors/space_graph/graph_ops.c17
-rw-r--r--source/blender/editors/space_graph/graph_select.c34
-rw-r--r--source/blender/editors/space_image/CMakeLists.txt4
-rw-r--r--source/blender/editors/space_image/SConscript2
-rw-r--r--source/blender/editors/space_image/image_buttons.c2
-rw-r--r--source/blender/editors/space_image/image_draw.c12
-rw-r--r--source/blender/editors/space_image/image_ops.c53
-rw-r--r--source/blender/editors/space_image/space_image.c13
-rw-r--r--source/blender/editors/space_info/info_stats.c10
-rw-r--r--source/blender/editors/space_info/textview.c13
-rw-r--r--source/blender/editors/space_info/textview.h4
-rw-r--r--source/blender/editors/space_logic/logic_ops.c5
-rw-r--r--source/blender/editors/space_logic/logic_window.c10
-rw-r--r--source/blender/editors/space_node/drawnode.c471
-rw-r--r--source/blender/editors/space_node/node_add.c14
-rw-r--r--source/blender/editors/space_node/node_buttons.c6
-rw-r--r--source/blender/editors/space_node/node_draw.c54
-rw-r--r--source/blender/editors/space_node/node_edit.c36
-rw-r--r--source/blender/editors/space_node/node_intern.h8
-rw-r--r--source/blender/editors/space_node/node_ops.c2
-rw-r--r--source/blender/editors/space_node/node_relationships.c42
-rw-r--r--source/blender/editors/space_node/node_select.c20
-rw-r--r--source/blender/editors/space_node/node_templates.c8
-rw-r--r--source/blender/editors/space_node/node_view.c69
-rw-r--r--source/blender/editors/space_node/space_node.c14
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.c386
-rw-r--r--source/blender/editors/space_outliner/outliner_edit.c8
-rw-r--r--source/blender/editors/space_outliner/outliner_select.c2
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.c7
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c121
-rw-r--r--source/blender/editors/space_outliner/space_outliner.c3
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c12
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c12
-rw-r--r--source/blender/editors/space_sequencer/sequencer_modifier.c4
-rw-r--r--source/blender/editors/space_sequencer/sequencer_select.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_view.c6
-rw-r--r--source/blender/editors/space_sequencer/space_sequencer.c10
-rw-r--r--source/blender/editors/space_text/space_text.c27
-rw-r--r--source/blender/editors/space_text/text_autocomplete.c1
-rw-r--r--source/blender/editors/space_text/text_draw.c22
-rw-r--r--source/blender/editors/space_text/text_intern.h5
-rw-r--r--source/blender/editors/space_text/text_ops.c59
-rw-r--r--source/blender/editors/space_view3d/drawarmature.c36
-rw-r--r--source/blender/editors/space_view3d/drawmesh.c16
-rw-r--r--source/blender/editors/space_view3d/drawobject.c657
-rw-r--r--source/blender/editors/space_view3d/drawvolume.c1
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c20
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c24
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c516
-rw-r--r--source/blender/editors/space_view3d/view3d_fly.c22
-rw-r--r--source/blender/editors/space_view3d/view3d_header.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_intern.h6
-rw-r--r--source/blender/editors/space_view3d/view3d_iterators.c15
-rw-r--r--source/blender/editors/space_view3d/view3d_ops.c13
-rw-r--r--source/blender/editors/space_view3d/view3d_project.c10
-rw-r--r--source/blender/editors/space_view3d/view3d_ruler.c4
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c52
-rw-r--r--source/blender/editors/space_view3d/view3d_snap.c18
-rw-r--r--source/blender/editors/space_view3d/view3d_view.c78
-rw-r--r--source/blender/editors/transform/transform.c1014
-rw-r--r--source/blender/editors/transform/transform.h122
-rw-r--r--source/blender/editors/transform/transform_constraints.c21
-rw-r--r--source/blender/editors/transform/transform_conversions.c250
-rw-r--r--source/blender/editors/transform/transform_generics.c69
-rw-r--r--source/blender/editors/transform/transform_input.c22
-rw-r--r--source/blender/editors/transform/transform_manipulator.c19
-rw-r--r--source/blender/editors/transform/transform_ops.c4
-rw-r--r--source/blender/editors/transform/transform_orientations.c38
-rw-r--r--source/blender/editors/transform/transform_snap.c161
-rw-r--r--source/blender/editors/util/crazyspace.c249
-rw-r--r--source/blender/editors/util/ed_util.c4
-rw-r--r--source/blender/editors/util/numinput.c8
-rw-r--r--source/blender/editors/uvedit/uvedit_draw.c14
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c56
-rw-r--r--source/blender/editors/uvedit/uvedit_parametrizer.c80
-rw-r--r--source/blender/editors/uvedit/uvedit_parametrizer.h2
-rw-r--r--source/blender/editors/uvedit/uvedit_smart_stitch.c43
-rw-r--r--source/blender/editors/uvedit/uvedit_unwrap_ops.c14
-rw-r--r--source/blender/freestyle/intern/application/Controller.cpp7
-rw-r--r--source/blender/freestyle/intern/application/Controller.h1
-rw-r--r--source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp14
-rw-r--r--source/blender/freestyle/intern/geometry/BBox.h6
-rw-r--r--source/blender/freestyle/intern/geometry/Noise.cpp6
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp2
-rw-r--r--source/blender/freestyle/intern/stroke/StrokeRep.cpp12
-rw-r--r--source/blender/freestyle/intern/stroke/StrokeShader.h2
-rw-r--r--source/blender/freestyle/intern/stroke/TextStrokeRenderer.cpp39
-rw-r--r--source/blender/freestyle/intern/stroke/TextStrokeRenderer.h49
-rw-r--r--source/blender/freestyle/intern/view_map/Functions0D.h4
-rw-r--r--source/blender/freestyle/intern/view_map/Functions1D.h2
-rw-r--r--source/blender/freestyle/intern/view_map/SteerableViewMap.h2
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMap.h2
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h2
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp2
-rw-r--r--source/blender/gpu/GPU_buffers.h9
-rw-r--r--source/blender/gpu/GPU_extensions.h1
-rw-r--r--source/blender/gpu/intern/gpu_buffers.c99
-rw-r--r--source/blender/gpu/intern/gpu_codegen.c6
-rw-r--r--source/blender/gpu/intern/gpu_draw.c2
-rw-r--r--source/blender/gpu/intern/gpu_extensions.c10
-rw-r--r--source/blender/gpu/intern/gpu_material.c9
-rw-r--r--source/blender/gpu/shaders/gpu_shader_material.glsl31
-rw-r--r--source/blender/imbuf/CMakeLists.txt5
-rw-r--r--source/blender/imbuf/IMB_colormanagement.h52
-rw-r--r--source/blender/imbuf/IMB_imbuf.h20
-rw-r--r--source/blender/imbuf/IMB_imbuf_types.h7
-rw-r--r--source/blender/imbuf/SConscript3
-rw-r--r--source/blender/imbuf/intern/IMB_allocimbuf.h4
-rw-r--r--source/blender/imbuf/intern/IMB_colormanagement_intern.h29
-rw-r--r--source/blender/imbuf/intern/IMB_filetype.h4
-rw-r--r--source/blender/imbuf/intern/IMB_indexer.h4
-rw-r--r--source/blender/imbuf/intern/IMB_metadata.h6
-rw-r--r--source/blender/imbuf/intern/allocimbuf.c108
-rw-r--r--source/blender/imbuf/intern/bmp.c4
-rw-r--r--source/blender/imbuf/intern/colormanagement.c407
-rw-r--r--source/blender/imbuf/intern/divers.c4
-rw-r--r--source/blender/imbuf/intern/filetype.c43
-rw-r--r--source/blender/imbuf/intern/imageprocess.c14
-rw-r--r--source/blender/imbuf/intern/indexer.c24
-rw-r--r--source/blender/imbuf/intern/indexer_dv.c4
-rw-r--r--source/blender/imbuf/intern/jpeg.c6
-rw-r--r--source/blender/imbuf/intern/metadata.c30
-rw-r--r--source/blender/imbuf/intern/oiio/CMakeLists.txt54
-rw-r--r--source/blender/imbuf/intern/oiio/SConscript49
-rw-r--r--source/blender/imbuf/intern/oiio/openimageio_api.cpp280
-rw-r--r--source/blender/imbuf/intern/oiio/openimageio_api.h (renamed from source/blender/compositor/operations/COM_ConvertPremulToStraightOperation.h)59
-rw-r--r--source/blender/imbuf/intern/readimage.c134
-rw-r--r--source/blender/imbuf/intern/tiff.c8
-rw-r--r--source/blender/imbuf/intern/util.c23
-rw-r--r--source/blender/imbuf/intern/writeimage.c2
-rw-r--r--source/blender/makesdna/DNA_ID.h2
-rw-r--r--source/blender/makesdna/DNA_color_types.h1
-rw-r--r--source/blender/makesdna/DNA_constraint_types.h6
-rw-r--r--source/blender/makesdna/DNA_curve_types.h5
-rw-r--r--source/blender/makesdna/DNA_customdata_types.h110
-rw-r--r--source/blender/makesdna/DNA_freestyle_types.h4
-rw-r--r--source/blender/makesdna/DNA_ipo_types.h2
-rw-r--r--source/blender/makesdna/DNA_key_types.h1
-rw-r--r--source/blender/makesdna/DNA_lattice_types.h4
-rw-r--r--source/blender/makesdna/DNA_linestyle_types.h4
-rw-r--r--source/blender/makesdna/DNA_mask_types.h9
-rw-r--r--source/blender/makesdna/DNA_mesh_types.h2
-rw-r--r--source/blender/makesdna/DNA_meshdata_types.h245
-rw-r--r--source/blender/makesdna/DNA_meta_types.h2
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h970
-rw-r--r--source/blender/makesdna/DNA_node_types.h45
-rw-r--r--source/blender/makesdna/DNA_object_types.h430
-rw-r--r--source/blender/makesdna/DNA_particle_types.h4
-rw-r--r--source/blender/makesdna/DNA_scene_types.h57
-rw-r--r--source/blender/makesdna/DNA_screen_types.h71
-rw-r--r--source/blender/makesdna/DNA_sensor_types.h3
-rw-r--r--source/blender/makesdna/DNA_space_types.h25
-rw-r--r--source/blender/makesdna/DNA_texture_types.h8
-rw-r--r--source/blender/makesdna/DNA_tracking_types.h23
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h3
-rw-r--r--source/blender/makesdna/DNA_view3d_types.h1
-rw-r--r--source/blender/makesdna/DNA_windowmanager_types.h324
-rw-r--r--source/blender/makesdna/intern/CMakeLists.txt10
-rw-r--r--source/blender/makesdna/intern/SConscript6
-rw-r--r--source/blender/makesdna/intern/dna_genfile.c2
-rw-r--r--source/blender/makesrna/RNA_access.h52
-rw-r--r--source/blender/makesrna/RNA_define.h10
-rw-r--r--source/blender/makesrna/RNA_enum_types.h2
-rw-r--r--source/blender/makesrna/RNA_types.h200
-rw-r--r--source/blender/makesrna/SConscript4
-rw-r--r--source/blender/makesrna/intern/CMakeLists.txt17
-rw-r--r--source/blender/makesrna/intern/SConscript5
-rw-r--r--source/blender/makesrna/intern/makesrna.c49
-rw-r--r--source/blender/makesrna/intern/rna_ID.c3
-rw-r--r--source/blender/makesrna/intern/rna_access.c244
-rw-r--r--source/blender/makesrna/intern/rna_action.c5
-rw-r--r--source/blender/makesrna/intern/rna_actuator.c4
-rw-r--r--source/blender/makesrna/intern/rna_animation.c3
-rw-r--r--source/blender/makesrna/intern/rna_animviz.c5
-rw-r--r--source/blender/makesrna/intern/rna_armature.c5
-rw-r--r--source/blender/makesrna/intern/rna_boid.c10
-rw-r--r--source/blender/makesrna/intern/rna_brush.c5
-rw-r--r--source/blender/makesrna/intern/rna_color.c85
-rw-r--r--source/blender/makesrna/intern/rna_constraint.c39
-rw-r--r--source/blender/makesrna/intern/rna_controller.c1
-rw-r--r--source/blender/makesrna/intern/rna_curve.c16
-rw-r--r--source/blender/makesrna/intern/rna_define.c42
-rw-r--r--source/blender/makesrna/intern/rna_dynamicpaint.c14
-rw-r--r--source/blender/makesrna/intern/rna_fcurve.c25
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c12
-rw-r--r--source/blender/makesrna/intern/rna_image_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_internal.h12
-rw-r--r--source/blender/makesrna/intern/rna_key.c14
-rw-r--r--source/blender/makesrna/intern/rna_lamp.c3
-rw-r--r--source/blender/makesrna/intern/rna_linestyle.c2
-rw-r--r--source/blender/makesrna/intern/rna_main_api.c11
-rw-r--r--source/blender/makesrna/intern/rna_mask.c6
-rw-r--r--source/blender/makesrna/intern/rna_material.c13
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c128
-rw-r--r--source/blender/makesrna/intern/rna_mesh_api.c61
-rw-r--r--source/blender/makesrna/intern/rna_mesh_utils.h8
-rw-r--r--source/blender/makesrna/intern/rna_meta.c8
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c21
-rw-r--r--source/blender/makesrna/intern/rna_nla.c7
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c374
-rw-r--r--source/blender/makesrna/intern/rna_object.c32
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c16
-rw-r--r--source/blender/makesrna/intern/rna_packedfile.c1
-rw-r--r--source/blender/makesrna/intern/rna_particle.c120
-rw-r--r--source/blender/makesrna/intern/rna_pose.c18
-rw-r--r--source/blender/makesrna/intern/rna_property.c4
-rw-r--r--source/blender/makesrna/intern/rna_render.c47
-rw-r--r--source/blender/makesrna/intern/rna_rigidbody.c33
-rw-r--r--source/blender/makesrna/intern/rna_rna.c12
-rw-r--r--source/blender/makesrna/intern/rna_scene.c171
-rw-r--r--source/blender/makesrna/intern/rna_scene_api.c6
-rw-r--r--source/blender/makesrna/intern/rna_screen.c3
-rw-r--r--source/blender/makesrna/intern/rna_sculpt_paint.c10
-rw-r--r--source/blender/makesrna/intern/rna_sensor.c34
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c23
-rw-r--r--source/blender/makesrna/intern/rna_smoke.c2
-rw-r--r--source/blender/makesrna/intern/rna_space.c106
-rw-r--r--source/blender/makesrna/intern/rna_test.c7
-rw-r--r--source/blender/makesrna/intern/rna_text.c11
-rw-r--r--source/blender/makesrna/intern/rna_texture.c28
-rw-r--r--source/blender/makesrna/intern/rna_tracking.c187
-rw-r--r--source/blender/makesrna/intern/rna_ui.c259
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c59
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c15
-rw-r--r--source/blender/makesrna/intern/rna_wm.c76
-rw-r--r--source/blender/makesrna/intern/rna_wm_api.c73
-rw-r--r--source/blender/modifiers/intern/MOD_array.c21
-rw-r--r--source/blender/modifiers/intern/MOD_bevel.c3
-rw-r--r--source/blender/modifiers/intern/MOD_boolean_util.c108
-rw-r--r--source/blender/modifiers/intern/MOD_boolean_util.h6
-rw-r--r--source/blender/modifiers/intern/MOD_build.c2
-rw-r--r--source/blender/modifiers/intern/MOD_decimate.c12
-rw-r--r--source/blender/modifiers/intern/MOD_displace.c2
-rw-r--r--source/blender/modifiers/intern/MOD_edgesplit.c1
-rw-r--r--source/blender/modifiers/intern/MOD_explode.c32
-rw-r--r--source/blender/modifiers/intern/MOD_meshcache_util.c4
-rw-r--r--source/blender/modifiers/intern/MOD_meshcache_util.h3
-rw-r--r--source/blender/modifiers/intern/MOD_particleinstance.c8
-rw-r--r--source/blender/modifiers/intern/MOD_skin.c18
-rw-r--r--source/blender/modifiers/intern/MOD_subsurf.c8
-rw-r--r--source/blender/modifiers/intern/MOD_triangulate.c3
-rw-r--r--source/blender/modifiers/intern/MOD_util.c24
-rw-r--r--source/blender/modifiers/intern/MOD_util.h1
-rw-r--r--source/blender/modifiers/intern/MOD_uvproject.c2
-rw-r--r--source/blender/modifiers/intern/MOD_warp.c2
-rw-r--r--source/blender/modifiers/intern/MOD_wave.c3
-rw-r--r--source/blender/modifiers/intern/MOD_weightvg_util.c2
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgproximity.c21
-rw-r--r--source/blender/nodes/CMakeLists.txt1
-rw-r--r--source/blender/nodes/NOD_common.h6
-rw-r--r--source/blender/nodes/NOD_composite.h2
-rw-r--r--source/blender/nodes/NOD_shader.h3
-rw-r--r--source/blender/nodes/NOD_static_types.h7
-rw-r--r--source/blender/nodes/NOD_texture.h2
-rw-r--r--source/blender/nodes/composite/node_composite_tree.c30
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_mapValue.c2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_outputFile.c17
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_scale.c19
-rw-r--r--source/blender/nodes/intern/node_exec.c4
-rw-r--r--source/blender/nodes/intern/node_util.c104
-rw-r--r--source/blender/nodes/shader/node_shader_tree.c9
-rw-r--r--source/blender/nodes/shader/node_shader_util.c14
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bsdf_hair.c66
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_gamma.c6
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_mapping.c15
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.c44
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_brick.c2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_checker.c2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_environment.c2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_gradient.c2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_image.c2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_magic.c2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_musgrave.c2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_noise.c2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_sky.c5
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_voronoi.c2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_wave.c2
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_common.c18
-rw-r--r--source/blender/python/bmesh/bmesh_py_ops_call.c26
-rw-r--r--source/blender/python/bmesh/bmesh_py_types.c75
-rw-r--r--source/blender/python/bmesh/bmesh_py_types.h6
-rw-r--r--source/blender/python/bmesh/bmesh_py_types_customdata.c15
-rw-r--r--source/blender/python/bmesh/bmesh_py_types_meshdata.c110
-rw-r--r--source/blender/python/bmesh/bmesh_py_types_meshdata.h4
-rw-r--r--source/blender/python/generic/blf_py_api.h6
-rw-r--r--source/blender/python/generic/idprop_py_api.c134
-rw-r--r--source/blender/python/generic/idprop_py_api.h2
-rw-r--r--source/blender/python/generic/py_capi_utils.c27
-rw-r--r--source/blender/python/generic/py_capi_utils.h6
-rw-r--r--source/blender/python/intern/CMakeLists.txt4
-rw-r--r--source/blender/python/intern/bpy.h1
-rw-r--r--source/blender/python/intern/bpy_app_ffmpeg.c4
-rw-r--r--source/blender/python/intern/bpy_app_handlers.c2
-rw-r--r--source/blender/python/intern/bpy_driver.c6
-rw-r--r--source/blender/python/intern/bpy_interface.c12
-rw-r--r--source/blender/python/intern/bpy_intern_string.h5
-rw-r--r--source/blender/python/intern/bpy_operator_wrap.c9
-rw-r--r--source/blender/python/intern/bpy_props.c34
-rw-r--r--source/blender/python/intern/bpy_rna.c85
-rw-r--r--source/blender/python/intern/bpy_rna_anim.c3
-rw-r--r--source/blender/python/intern/bpy_rna_anim.h5
-rw-r--r--source/blender/python/intern/bpy_rna_callback.h6
-rw-r--r--source/blender/python/intern/gpu.h9
-rw-r--r--source/blender/python/mathutils/mathutils.c2
-rw-r--r--source/blender/python/mathutils/mathutils_Euler.c2
-rw-r--r--source/blender/python/mathutils/mathutils_Euler.h2
-rw-r--r--source/blender/python/mathutils/mathutils_Matrix.c10
-rw-r--r--source/blender/python/mathutils/mathutils_Quaternion.c2
-rw-r--r--source/blender/python/mathutils/mathutils_Quaternion.h2
-rw-r--r--source/blender/python/mathutils/mathutils_Vector.c16
-rw-r--r--source/blender/python/mathutils/mathutils_Vector.h4
-rw-r--r--source/blender/python/mathutils/mathutils_geometry.c145
-rw-r--r--source/blender/quicktime/apple/qtkit_export.m14
-rw-r--r--source/blender/quicktime/apple/qtkit_import.m28
-rw-r--r--source/blender/render/CMakeLists.txt1
-rw-r--r--source/blender/render/extern/include/RE_multires_bake.h21
-rw-r--r--source/blender/render/extern/include/RE_pipeline.h8
-rw-r--r--source/blender/render/extern/include/RE_shader_ext.h3
-rw-r--r--source/blender/render/intern/include/render_types.h2
-rw-r--r--source/blender/render/intern/include/texture.h12
-rw-r--r--source/blender/render/intern/include/texture_ocean.h4
-rw-r--r--source/blender/render/intern/source/bake.c223
-rw-r--r--source/blender/render/intern/source/convertblender.c104
-rw-r--r--source/blender/render/intern/source/external_engine.c31
-rw-r--r--source/blender/render/intern/source/imagetexture.c2
-rw-r--r--source/blender/render/intern/source/multires_bake.c25
-rw-r--r--source/blender/render/intern/source/pipeline.c85
-rw-r--r--source/blender/render/intern/source/pixelshading.c8
-rw-r--r--source/blender/render/intern/source/pointdensity.c8
-rw-r--r--source/blender/render/intern/source/rayshade.c13
-rw-r--r--source/blender/render/intern/source/render_result.c2
-rw-r--r--source/blender/render/intern/source/render_texture.c2
-rw-r--r--source/blender/render/intern/source/rendercore.c57
-rw-r--r--source/blender/render/intern/source/shadbuf.c15
-rw-r--r--source/blender/render/intern/source/shadeinput.c10
-rw-r--r--source/blender/render/intern/source/shadeoutput.c4
-rw-r--r--source/blender/render/intern/source/sss.c2
-rw-r--r--source/blender/render/intern/source/texture_ocean.c4
-rw-r--r--source/blender/render/intern/source/volume_precache.c210
-rw-r--r--source/blender/render/intern/source/voxeldata.c2
-rw-r--r--source/blender/render/intern/source/zbuf.c2
-rw-r--r--source/blender/windowmanager/WM_api.h38
-rw-r--r--source/blender/windowmanager/WM_keymap.h8
-rw-r--r--source/blender/windowmanager/WM_types.h34
-rw-r--r--source/blender/windowmanager/intern/wm.c17
-rw-r--r--source/blender/windowmanager/intern/wm_cursors.c26
-rw-r--r--source/blender/windowmanager/intern/wm_dragdrop.c8
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c56
-rw-r--r--source/blender/windowmanager/intern/wm_files.c18
-rw-r--r--source/blender/windowmanager/intern/wm_gesture.c96
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c3
-rw-r--r--source/blender/windowmanager/intern/wm_jobs.c18
-rw-r--r--source/blender/windowmanager/intern/wm_keymap.c58
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c159
-rw-r--r--source/blender/windowmanager/intern/wm_playanim.c2
-rw-r--r--source/blender/windowmanager/intern/wm_subwindow.c9
-rw-r--r--source/blender/windowmanager/intern/wm_window.c12
-rw-r--r--source/blender/windowmanager/wm_subwindow.h1
-rw-r--r--source/blender/windowmanager/wm_window.h2
-rw-r--r--source/blenderplayer/CMakeLists.txt1
-rw-r--r--source/blenderplayer/bad_level_call_stubs/stubs.c15
-rw-r--r--source/creator/CMakeLists.txt13
-rw-r--r--source/creator/creator.c70
-rw-r--r--source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp4
-rw-r--r--source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp10
-rw-r--r--source/gameengine/Converter/BL_BlenderDataConversion.cpp5
-rw-r--r--source/gameengine/Converter/BL_ShapeDeformer.cpp12
-rw-r--r--source/gameengine/Converter/CMakeLists.txt1
-rw-r--r--source/gameengine/Converter/KX_ConvertActuators.cpp14
-rw-r--r--source/gameengine/Converter/KX_ConvertActuators.h1
-rw-r--r--source/gameengine/Converter/KX_ConvertSensors.cpp24
-rw-r--r--source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp37
-rw-r--r--source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp2
-rw-r--r--source/gameengine/GameLogic/SCA_IScene.cpp2
-rw-r--r--source/gameengine/GamePlayer/common/GPC_RenderTools.cpp19
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_Application.cpp4
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_ghost.cpp27
-rw-r--r--source/gameengine/Ketsji/BL_ActionManager.h4
-rw-r--r--source/gameengine/Ketsji/BL_BlenderShader.cpp1
-rw-r--r--source/gameengine/Ketsji/BL_BlenderShader.h8
-rw-r--r--source/gameengine/Ketsji/KX_BlenderMaterial.cpp6
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.cpp142
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.h16
-rw-r--r--source/gameengine/Ketsji/KX_KetsjiEngine.cpp1
-rw-r--r--source/gameengine/Ketsji/KX_Light.cpp16
-rw-r--r--source/gameengine/Ketsji/KX_Light.h4
-rw-r--r--source/gameengine/Ketsji/KX_PythonInit.cpp12
-rw-r--r--source/gameengine/Ketsji/KX_RaySensor.h4
-rw-r--r--source/gameengine/Ketsji/KX_Scene.cpp11
-rw-r--r--source/gameengine/Ketsji/KX_TouchEventManager.cpp65
-rw-r--r--source/gameengine/Rasterizer/RAS_BucketManager.cpp7
-rw-r--r--source/gameengine/Rasterizer/RAS_MeshObject.cpp69
-rw-r--r--source/gameengine/Rasterizer/RAS_MeshObject.h3
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp5
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.h1
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp6
-rw-r--r--source/tests/bl_run_operators.py3
1886 files changed, 159038 insertions, 54258 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6efef21afc1..c34fc5acb31 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -203,6 +203,7 @@ option(WITH_MOD_REMESH "Enable Remesh Modifier" ON)
option(WITH_MOD_OCEANSIM "Enable Ocean Modifier" OFF)
# Image format support
+option(WITH_OPENIMAGEIO "Enable OpenImageIO Support (http://www.openimageio.org)" OFF)
option(WITH_IMAGE_OPENEXR "Enable OpenEXR Support (http://www.openexr.com)" ON)
option(WITH_IMAGE_OPENJPEG "Enable OpenJpeg Support (http://www.openjpeg.org)" ON)
option(WITH_IMAGE_TIFF "Enable LibTIFF Support" ON)
@@ -261,7 +262,8 @@ mark_as_advanced(PYTHON_NUMPY_PATH)
# Cycles
option(WITH_CYCLES "Enable cycles Render Engine" ON)
-option(WITH_CYCLES_TEST "Build cycles test application" OFF)
+option(WITH_CYCLES_STANDALONE "Build cycles standalone application" OFF)
+option(WITH_CYCLES_STANDALONE_GUI "Build cycles standalone with GUI" OFF)
option(WITH_CYCLES_OSL "Build Cycles with OSL support" OFF)
option(WITH_CYCLES_CUDA_BINARIES "Build cycles CUDA binaries" OFF)
set(CYCLES_CUDA_BINARIES_ARCH sm_20 sm_21 sm_30 sm_35 CACHE STRING "CUDA architectures to build binaries for")
@@ -277,13 +279,14 @@ mark_as_advanced(LLVM_STATIC)
option(WITH_MEM_JEMALLOC "Enable malloc replacement (http://www.canonware.com/jemalloc)" OFF)
mark_as_advanced(WITH_MEM_JEMALLOC)
+# currently only used for BLI_mempool
+option(WITH_MEM_VALGRIND "Enable extended valgrind support for better reporting" OFF)
+mark_as_advanced(WITH_MEM_VALGRIND)
+
# Debug
option(WITH_CXX_GUARDEDALLOC "Enable GuardedAlloc for C++ memory allocation tracking (only enable for development)" OFF)
mark_as_advanced(WITH_CXX_GUARDEDALLOC)
-option(WITH_GUARDEDALLOC "Enable GuardedAlloc (DISABLE AT OWN RISK!)" ON)
-mark_as_advanced(WITH_GUARDEDALLOC)
-
option(WITH_ASSERT_ABORT "Call abort() when raising an assertion through BLI_assert()" OFF)
mark_as_advanced(WITH_ASSERT_ABORT)
@@ -305,7 +308,9 @@ if(APPLE)
endif()
execute_process(COMMAND uname -r OUTPUT_VARIABLE MAC_SYS) # check for actual system-version
- if(${MAC_SYS} MATCHES 12)
+ if(${MAC_SYS} MATCHES 13)
+ set(OSX_SYSTEM 10.9)
+ elseif(${MAC_SYS} MATCHES 12)
set(OSX_SYSTEM 10.8)
elseif(${MAC_SYS} MATCHES 11)
set(OSX_SYSTEM 10.7)
@@ -317,9 +322,22 @@ if(APPLE)
set(OSX_SYSTEM unsupported)
endif()
message(STATUS "Detected system-version: " ${OSX_SYSTEM})
-
+
+ # workaround for incorrect cmake xcode lookup for developer previews - XCODE_VERSION does not take xcode-select path into accout
+ # but would always look into /Applications/Xcode.app while dev versions are named Xcode<version>-DP<preview_number>
+ execute_process(COMMAND xcode-select --print-path OUTPUT_VARIABLE XCODE_CHECK OUTPUT_STRIP_TRAILING_WHITESPACE)
+ string(REPLACE "/Contents/Developer" "" XCODE_BUNDLE ${XCODE_CHECK}) # truncate to bundlepath in any case
+ message(STATUS "Xcode-bundle : " ${XCODE_BUNDLE})
+
if(${CMAKE_GENERATOR} MATCHES "Xcode")
+ if(${XCODE_VERSION} VERSION_GREATER 4.2) # earlier xcode has no bundled developer dir, no sense in getting xcode path from
+ string(SUBSTRING "${XCODE_CHECK}" 14 6 DP_NAME) # reduce to XCode name without dp extension
+ if(${DP_NAME} MATCHES Xcode5)
+ set(XCODE_VERSION 5)
+ endif()
+ endif()
+
##### cmake incompatibility with xcode 4.3 and higher #####
if(${XCODE_VERSION} MATCHES '') # cmake fails due looking for xcode in the wrong path, thus will be empty var
message(FATAL_ERROR "Xcode 4.3 and higher must be used with cmake 2.8-8 or higher")
@@ -343,15 +361,16 @@ if(APPLE)
if(${XCODE_VERSION} VERSION_LESS 4.3)
set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk CACHE PATH "" FORCE) # use guaranteed existing sdk
else()
- # note: i don't use xcode-select path on purpose, cause also /Applications/Xcode.app would be allowed
- # absolute pathes are more foolproof here !
- set(OSX_SYSROOT_PREFIX /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform)
+ # note: xcode-select path could be ambigous, cause /Applications/Xcode.app/Contents/Developer or /Applications/Xcode.app would be allowed
+ # so i use a selfcomposed bundlepath here
+ set(OSX_SYSROOT_PREFIX ${XCODE_BUNDLE}/Contents/Developer/Platforms/MacOSX.platform)
+ message(STATUS "OSX_SYSROOT_PREFIX: " ${OSX_SYSROOT_PREFIX})
set(OSX_DEVELOPER_PREFIX /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk) # use guaranteed existing sdk
set(CMAKE_OSX_SYSROOT ${OSX_SYSROOT_PREFIX}/${OSX_DEVELOPER_PREFIX} CACHE PATH "" FORCE)
endif()
if(NOT CMAKE_OSX_DEPLOYMENT_TARGET)
- set(CMAKE_OSX_DEPLOYMENT_TARGET "10.5" CACHE STRING "" FORCE) # 10.5 is our min. target, if you use higher sdk, weak linking happens
+ set(CMAKE_OSX_DEPLOYMENT_TARGET "10.5" CACHE STRING "" FORCE) # 10.5 is our min. target, if you use higher sdk, weak linking happens
endif()
if(NOT ${CMAKE_GENERATOR} MATCHES "Xcode")
@@ -373,7 +392,7 @@ endif()
#-----------------------------------------------------------------------------
# Check for conflicting/unsupported configurations
-if(NOT WITH_BLENDER AND NOT WITH_PLAYER AND NOT WITH_CYCLES_TEST)
+if(NOT WITH_BLENDER AND NOT WITH_PLAYER AND NOT WITH_CYCLES_STANDALONE)
message(FATAL_ERROR "At least one of WITH_BLENDER or WITH_PLAYER must be enabled, nothing to do!")
endif()
@@ -439,7 +458,7 @@ if(NOT WITH_BOOST)
set_and_warn(WITH_OPENAL OFF) # depends on AUDASPACE
set_and_warn(WITH_GAMEENGINE OFF) # depends on AUDASPACE
-elseif(WITH_CYCLES OR WITH_MOD_BOOLEAN OR WITH_AUDASPACE OR WITH_INTERNATIONAL)
+elseif(WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_MOD_BOOLEAN OR WITH_AUDASPACE OR WITH_INTERNATIONAL)
# Keep enabled
else()
# Enabled but we don't need it
@@ -771,43 +790,48 @@ if(UNIX AND NOT APPLE)
endif()
if(LLVM_DIRECTORY)
- FIND_PROGRAM(LLVM_CONFIG llvm-config-${LLVM_VERSION} HINTS ${LLVM_DIRECTORY}/bin NO_CMAKE_PATH)
+ find_program(LLVM_CONFIG llvm-config-${LLVM_VERSION} HINTS ${LLVM_DIRECTORY}/bin NO_CMAKE_PATH)
if(NOT LLVM_CONFIG)
- FIND_PROGRAM(LLVM_CONFIG llvm-config HINTS ${LLVM_DIRECTORY}/bin NO_CMAKE_PATH)
+ find_program(LLVM_CONFIG llvm-config HINTS ${LLVM_DIRECTORY}/bin NO_CMAKE_PATH)
endif()
else()
- FIND_PROGRAM(LLVM_CONFIG llvm-config-${LLVM_VERSION})
+ find_program(LLVM_CONFIG llvm-config-${LLVM_VERSION})
if(NOT LLVM_CONFIG)
- FIND_PROGRAM(LLVM_CONFIG llvm-config)
+ find_program(LLVM_CONFIG llvm-config)
endif()
endif()
- execute_process(COMMAND ${LLVM_CONFIG} --version
- OUTPUT_VARIABLE LLVM_VERSION
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- execute_process(COMMAND ${LLVM_CONFIG} --prefix
- OUTPUT_VARIABLE LLVM_DIRECTORY
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- execute_process(COMMAND ${LLVM_CONFIG} --libdir
- OUTPUT_VARIABLE LLVM_LIB_DIR
- OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+ if(NOT DEFINED LLVM_VERSION)
+ execute_process(COMMAND ${LLVM_CONFIG} --version
+ OUTPUT_VARIABLE LLVM_VERSION
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ set(LLVM_VERSION ${LLVM_VERSION} CACHE STRING "Version of LLVM to use")
+ endif()
+ if(NOT DEFINED LLVM_DIRECTORY)
+ execute_process(COMMAND ${LLVM_CONFIG} --prefix
+ OUTPUT_VARIABLE LLVM_DIRECTORY
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ set(LLVM_DIRECTORY ${LLVM_DIRECTORY} CACHE PATH "Path to the LLVM installation")
+ endif()
+ if(NOT DEFINED LLVM_LIBPATH)
+ execute_process(COMMAND ${LLVM_CONFIG} --libdir
+ OUTPUT_VARIABLE LLVM_LIBPATH
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ set(LLVM_LIBPATH ${LLVM_LIBPATH} CACHE PATH "Path to the LLVM library path")
+ endif()
if(LLVM_STATIC)
find_library(LLVM_LIBRARY
NAMES LLVMAnalysis # first of a whole bunch of libs to get
- PATHS ${LLVM_LIB_DIR})
+ PATHS ${LLVM_LIBPATH})
else()
find_library(LLVM_LIBRARY
NAMES LLVM-${LLVM_VERSION}
- PATHS ${LLVM_LIB_DIR})
+ PATHS ${LLVM_LIBPATH})
endif()
- message(STATUS "LLVM version = ${LLVM_VERSION}")
- message(STATUS "LLVM dir = ${LLVM_DIRECTORY}")
- message(STATUS "LLVM lib dir = ${LLVM_LIB_DIR}")
- set(LLVM_VERSION ${LLVM_VERSION} CACHE STRING "Version of LLVM to use")
- set(LLVM_DIRECTORY ${LLVM_DIRECTORY} CACHE PATH "Path to the LLVM installation")
- if(LLVM_LIBRARY AND LLVM_DIRECTORY AND LLVM_LIB_DIR)
+ if(LLVM_LIBRARY AND LLVM_DIRECTORY AND LLVM_LIBPATH)
if(LLVM_STATIC)
# if static LLVM libraries were requested, use llvm-config to generate
# the list of what libraries we need, and substitute that in the right
@@ -815,7 +839,7 @@ if(UNIX AND NOT APPLE)
execute_process(COMMAND ${LLVM_CONFIG} --libfiles
OUTPUT_VARIABLE LLVM_LIBRARY
OUTPUT_STRIP_TRAILING_WHITESPACE)
- string(REPLACE " " ";" LLVM_LIBRARY ${LLVM_LIBRARY})
+ string(REPLACE " " ";" LLVM_LIBRARY "${LLVM_LIBRARY}")
endif()
else()
message(FATAL_ERROR "LLVM not found.")
@@ -881,8 +905,6 @@ if(UNIX AND NOT APPLE)
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
if(NOT WITH_PYTHON_MODULE)
- # BSD's dont use libdl.so
- set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS} -ldl")
# binreloc is linux only
set(BINRELOC_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/binreloc/include)
set(WITH_BINRELOC ON)
@@ -1434,7 +1456,7 @@ elseif(WIN32)
if(WITH_LLVM)
set(LLVM_DIRECTORY ${LIBDIR}/llvm CACHE PATH "Path to the LLVM installation")
- set(LLVM_LIB_DIR ${LLVM_DIRECTORY}/lib)
+ set(LLVM_LIBPATH ${LLVM_DIRECTORY}/lib)
# Explicitly set llvm lib order.
#---- WARNING ON GCC ORDER OF LIBS IS IMPORTANT, DO NOT CHANGE! ---------
set(LLVM_LIBRARY LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMAnalysis LLVMArchive
@@ -1623,7 +1645,7 @@ elseif(APPLE)
endif()
if(WITH_JACK)
- set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -weak_framework jackmp")
+ set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -F/Library/Frameworks -weak_framework jackmp")
endif()
else()
@@ -1728,13 +1750,13 @@ elseif(APPLE)
OUTPUT_VARIABLE LLVM_DIRECTORY
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${LLVM_CONFIG} --libdir
- OUTPUT_VARIABLE LLVM_LIB_DIR
+ OUTPUT_VARIABLE LLVM_LIBPATH
OUTPUT_STRIP_TRAILING_WHITESPACE)
find_library(LLVM_LIBRARY
NAMES LLVMAnalysis # first of a whole bunch of libs to get
- PATHS ${LLVM_LIB_DIR})
+ PATHS ${LLVM_LIBPATH})
- if(LLVM_LIBRARY AND LLVM_DIRECTORY AND LLVM_LIB_DIR)
+ if(LLVM_LIBRARY AND LLVM_DIRECTORY AND LLVM_LIBPATH)
if(LLVM_STATIC)
# if static LLVM libraries were requested, use llvm-config to generate
# the list of what libraries we need, and substitute that in the right
@@ -1782,6 +1804,11 @@ elseif(APPLE)
set(CMAKE_C_FLAGS_RELEASE "-mdynamic-no-pic -fno-strict-aliasing")
set(CMAKE_CXX_FLAGS_RELEASE "-mdynamic-no-pic -fno-strict-aliasing")
endif()
+
+ if(${XCODE_VERSION} VERSION_EQUAL 5 OR ${XCODE_VERSION} VERSION_GREATER 5)
+ # Xcode 5 is always using CLANG, which has too low template depth of 128 for libmv
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=1024")
+ endif()
endif()
#-----------------------------------------------------------------------------
@@ -1799,22 +1826,22 @@ endif()
if(WITH_CYCLES)
if(NOT WITH_OPENIMAGEIO)
- message(FATAL_ERROR "Cycles reqires WITH_OPENIMAGEIO, the library may not have been found. Configure OIIO or disable WITH_CYCLES")
+ message(FATAL_ERROR "Cycles requires WITH_OPENIMAGEIO, the library may not have been found. Configure OIIO or disable WITH_CYCLES")
endif()
if(NOT WITH_BOOST)
- message(FATAL_ERROR "Cycles reqires WITH_BOOST, the library may not have been found. Configure BOOST or disable WITH_CYCLES")
+ message(FATAL_ERROR "Cycles requires WITH_BOOST, the library may not have been found. Configure BOOST or disable WITH_CYCLES")
endif()
if(WITH_CYCLES_OSL)
if(NOT WITH_LLVM)
- message(FATAL_ERROR "Cycles OSL reqires WITH_LLVM, the library may not have been found. Configure LLVM or disable WITH_CYCLES_OSL")
+ message(FATAL_ERROR "Cycles OSL requires WITH_LLVM, the library may not have been found. Configure LLVM or disable WITH_CYCLES_OSL")
endif()
endif()
endif()
if(WITH_INTERNATIONAL)
if(NOT WITH_BOOST)
- message(FATAL_ERROR "Internationalization reqires WITH_BOOST, the library may not have been found. Configure BOOST or disable WITH_INTERNATIONAL")
+ message(FATAL_ERROR "Internationalization requires WITH_BOOST, the library may not have been found. Configure BOOST or disable WITH_INTERNATIONAL")
endif()
endif()
@@ -2145,6 +2172,23 @@ endif()
set(CMAKE_C_FLAGS "${C_WARNINGS} ${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS}")
set(CMAKE_CXX_FLAGS "${CXX_WARNINGS} ${CMAKE_CXX_FLAGS} ${PLATFORM_CFLAGS}")
+# defined above, platform spesific but shared names
+mark_as_advanced(
+ CYCLES_OSL
+ OSL_LIB_EXEC
+ OSL_COMPILER
+ OSL_LIB_COMP
+ OSL_LIB_QUERY
+ OSL_INCLUDES
+)
+
+mark_as_advanced(
+ LLVM_CONFIG
+ LLVM_DIRECTORY
+ LLVM_LIBRARY
+ LLVM_VERSION
+)
+
#-------------------------------------------------------------------------------
# Global Defines
@@ -2235,10 +2279,12 @@ if(FIRST_RUN)
info_cfg_option(WITH_X11_XF86VMODE)
info_cfg_option(WITH_X11_XINPUT)
info_cfg_option(WITH_MEM_JEMALLOC)
+ info_cfg_option(WITH_MEM_VALGRIND)
info_cfg_option(WITH_SYSTEM_GLEW)
info_cfg_option(WITH_SYSTEM_OPENJPEG)
info_cfg_text("Image Formats:")
+ info_cfg_option(WITH_OPENIMAGEIO)
info_cfg_option(WITH_IMAGE_CINEON)
info_cfg_option(WITH_IMAGE_DDS)
info_cfg_option(WITH_IMAGE_HDR)
diff --git a/GNUmakefile b/GNUmakefile
index 0d97d8e7b07..417ff7770ed 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -182,8 +182,10 @@ help:
@echo " * check_spelling_c_qtc - same as check_spelling_c but outputs QtCreator tasks format"
@echo " * check_spelling_osl - check for spelling errors (OSL only)"
@echo " * check_spelling_py - check for spelling errors (Python only)"
+ @echo " * check_descriptions - check for duplicate/invalid descriptions"
@echo ""
@echo "Utilities (not associated with building blender)"
+ @echo " * icons - updates PNG icons from SVG files."
@echo " * tbz - create a compressed svn export 'blender_archive.tar.bz2'"
@echo ""
@echo "Documentation Targets (not associated with building blender)"
@@ -312,6 +314,9 @@ check_spelling_c_qtc:
check_spelling_osl:
cd $(BUILD_DIR) ; PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/spell_check_source.py $(BLENDER_DIR)/intern/cycles/kernel/shaders
+check_descriptions:
+ $(BUILD_DIR)/bin/blender --background -noaudio --factory-startup --python $(BLENDER_DIR)/source/tools/check_descriptions.py
+
# -----------------------------------------------------------------------------
# Utilities
#
@@ -322,6 +327,10 @@ tbz:
rm -rf blender_archive/
@echo "blender_archive.tar.bz2 written"
+icons:
+ $(BLENDER_DIR)/release/datafiles/blender_icons.sh
+ $(BLENDER_DIR)/release/datafiles/prvicons.sh
+
# -----------------------------------------------------------------------------
# Documentation
diff --git a/SConstruct b/SConstruct
index 0a7fa2aec9e..9f9eaa886a3 100644
--- a/SConstruct
+++ b/SConstruct
@@ -246,6 +246,7 @@ if 'blenderlite' in B.targets:
target_env_defs['WITH_BF_CYCLES'] = False
target_env_defs['WITH_BF_OPENAL'] = False
target_env_defs['WITH_BF_OPENEXR'] = False
+ target_env_defs['WITH_BF_PSD'] = False
target_env_defs['WITH_BF_OPENMP'] = False
target_env_defs['WITH_BF_ICONV'] = False
target_env_defs['WITH_BF_INTERNATIONAL'] = False
@@ -289,11 +290,14 @@ if env['OURPLATFORM']=='darwin':
print B.bc.OKGREEN + "Detected Xcode version: -- " + B.bc.ENDC + env['XCODE_CUR_VER'] + " --"
print "Available " + env['MACOSX_SDK_CHECK']
if not 'Mac OS X 10.6' in env['MACOSX_SDK_CHECK']:
- print B.bc.OKGREEN + "Auto-setting available MacOSX SDK -> " + B.bc.ENDC + "MacOSX10.7.sdk"
+ print B.bc.OKGREEN + "Building with user-defined OS X SDK ( Xcode 4.4 or newer )"
elif not 'Mac OS X 10.5' in env['MACOSX_SDK_CHECK']:
print B.bc.OKGREEN + "Auto-setting available MacOSX SDK -> " + B.bc.ENDC + "MacOSX10.6.sdk"
else:
print B.bc.OKGREEN + "Found recommended sdk :" + B.bc.ENDC + " using MacOSX10.5.sdk"
+
+ if env['XCODE_CUR_VER'] >= '5' and not (env['CXX'][:-2].endswith('4.6') or env['CXX'][:-2].endswith('4.8')):
+ env['CCFLAGS'].append('-ftemplate-depth=1024') # only valid for clang bundled with xcode 5
# for now, Mac builders must download and install the 3DxWare 10 Beta 4 driver framework from 3Dconnexion
# necessary header file lives here when installed:
@@ -314,12 +318,15 @@ if env['OURPLATFORM']=='darwin':
print "JackOSX install not found, disabling WITH_BF_JACK" # avoid build errors !
env['WITH_BF_JACK'] = 0
else:
- env.Append(LINKFLAGS=['-L/Library/Frameworks','-Xlinker','-weak_framework','-Xlinker','Jackmp'])
+ env.Append(LINKFLAGS=['-F/Library/Frameworks','-Xlinker','-weak_framework','-Xlinker','Jackmp'])
if env['WITH_BF_CYCLES_OSL'] == 1:
OSX_OSL_LIBPATH = Dir(env.subst(env['BF_OSL_LIBPATH'])).abspath
# we need 2 variants of passing the oslexec with the force_load option, string and list type atm
- env.Append(LINKFLAGS=['-L'+OSX_OSL_LIBPATH,'-loslcomp','-force_load '+ OSX_OSL_LIBPATH +'/liboslexec.a','-loslquery'])
+ if env['CC'][:-2].endswith('4.8'):
+ env.Append(LINKFLAGS=['-L'+OSX_OSL_LIBPATH,'-loslcomp','-loslexec','-loslquery'])
+ else:
+ env.Append(LINKFLAGS=['-L'+OSX_OSL_LIBPATH,'-loslcomp','-force_load '+ OSX_OSL_LIBPATH +'/liboslexec.a','-loslquery'])
env.Append(BF_PROGRAM_LINKFLAGS=['-Xlinker','-force_load','-Xlinker',OSX_OSL_LIBPATH +'/liboslexec.a'])
# Trying to get rid of eventually clashes, we export some explicite as local symbols
@@ -545,6 +552,7 @@ if B.targets != ['cudakernels']:
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_vertex.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_vsm_store_frag.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_vsm_store_vert.glsl")
+ data_to_c_simple("intern/opencolorio/gpu_shader_display_transform.glsl")
# --- blender ---
data_to_c_simple("release/datafiles/bfont.pfb")
@@ -903,6 +911,11 @@ for tp, tn, tf in os.walk('release/text'):
for f in tf:
textlist.append(tp+os.sep+f)
+# Font licenses
+textlist.append('release/datafiles/LICENSE-bfont.ttf.txt')
+if env['WITH_BF_INTERNATIONAL']:
+ textlist += ['release/datafiles/LICENSE-droidsans.ttf.txt', 'release/datafiles/LICENSE-bmonofont-i18n.ttf.txt']
+
textinstall = env.Install(dir=env['BF_INSTALLDIR'], source=textlist)
if env['OURPLATFORM']=='darwin':
diff --git a/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh
index ae16b4efaac..6daa3831c08 100755
--- a/build_files/build_environment/install_deps.sh
+++ b/build_files/build_environment/install_deps.sh
@@ -25,10 +25,10 @@
ARGS=$( \
getopt \
-o s:i:t:h \
---long source:,install:,tmp:,threads:,help,with-all,with-osl,with-opencollada,all-static,force-all,\
+--long source:,install:,tmp:,threads:,help,with-all,with-opencollada,all-static,force-all,\
force-python,force-numpy,force-boost,force-ocio,force-oiio,force-llvm,force-osl,force-opencollada,\
force-ffmpeg,skip-python,skip-numpy,skip-boost,skip-ocio,skip-oiio,skip-llvm,skip-osl,skip-ffmpeg,\
-skip-opencollada \
+skip-opencollada,required-numpy \
-- "$@" \
)
@@ -42,16 +42,13 @@ CWD=$PWD
# Do not install some optional, potentially conflicting libs by default...
WITH_ALL=false
-# Do not yet enable osl, use --with-osl (or --with-all) option to try it.
-WITH_OSL=false
-
# Do not yet enable opencollada, use --with-opencollada (or --with-all) option to try it.
WITH_OPENCOLLADA=false
# Try to link everything statically. Use this to produce portable versions of blender.
ALL_STATIC=false
-THREADS=`cat /proc/cpuinfo | grep cores | uniq | sed -e "s/.*: *\(.*\)/\\1/"`
+THREADS=`cat /proc/cpuinfo | grep processor | wc -l`
if [ -z "$THREADS" ]; then
THREADS=1
fi
@@ -63,7 +60,6 @@ or use --source/--install options, if you want to use other paths!
Number of threads for building: \$THREADS (automatically detected, use --threads=<nbr> to override it).
Full install: \$WITH_ALL (use --with-all option to enable it).
-Building OSL: \$WITH_OSL (use --with-osl option to enable it).
Building OpenCOLLADA: \$WITH_OPENCOLLADA (use --with-opencollada option to enable it).
All static linking: \$ALL_STATIC (use --all-static option to enable it).
@@ -96,10 +92,6 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
how your package system is set…).
Note this option also implies all other (more specific) --with-foo options below.
- --with-osl
- Try to install or build the OpenShadingLanguage libraries (and their dependencies).
- Still experimental!
-
--with-opencollada
Build and install the OpenCOLLADA libraries.
@@ -174,11 +166,15 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
Unconditionally skip OpenCOLLADA installation/building.
--skip-ffmpeg
- Unconditionally skip FFMpeg installation/building.\""
+ Unconditionally skip FFMpeg installation/building.
+
+ --required-numpy
+ Use this in case your distro features a valid python package, but no matching Numpy one.
+ It will force compilation of both python 3.3 and numpy 1.7.\""
##### Main Vars #####
-PYTHON_VERSION="3.3.0"
+PYTHON_VERSION="3.3.2"
PYTHON_VERSION_MIN="3.3"
PYTHON_SOURCE="http://python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.bz2"
PYTHON_FORCE_REBUILD=false
@@ -189,6 +185,7 @@ NUMPY_VERSION_MIN="1.7"
NUMPY_SOURCE="http://sourceforge.net/projects/numpy/files/NumPy/$NUMPY_VERSION/numpy-$NUMPY_VERSION.tar.gz"
NUMPY_FORCE_REBUILD=false
NUMPY_SKIP=false
+NUMPY_REQUIRED=false
BOOST_VERSION="1.51.0"
_boost_version_nodots=`echo "$BOOST_VERSION" | sed -r 's/\./_/g'`
@@ -196,7 +193,6 @@ BOOST_SOURCE="http://sourceforge.net/projects/boost/files/boost/$BOOST_VERSION/b
BOOST_VERSION_MIN="1.49"
BOOST_FORCE_REBUILD=false
BOOST_SKIP=false
-_need_boost_ldconfig=false
OCIO_VERSION="1.0.7"
OCIO_SOURCE="https://github.com/imageworks/OpenColorIO/tarball/v$OCIO_VERSION"
@@ -204,10 +200,10 @@ OCIO_VERSION_MIN="1.0"
OCIO_FORCE_REBUILD=false
OCIO_SKIP=false
-OPENEXR_VERSION="2.0.0"
+OPENEXR_VERSION="2.0.1"
OPENEXR_SOURCE="http://download.savannah.nongnu.org/releases/openexr/openexr-$OPENEXR_VERSION.tar.gz"
OPENEXR_VERSION_MIN="2.0"
-ILMBASE_VERSION="2.0.0"
+ILMBASE_VERSION="2.0.1"
ILMBASE_SOURCE="http://download.savannah.nongnu.org/releases/openexr/ilmbase-$ILMBASE_VERSION.tar.gz"
OPENEXR_FORCE_REBUILD=false
OPENEXR_SKIP=false
@@ -218,7 +214,6 @@ OIIO_SOURCE="https://github.com/OpenImageIO/oiio/archive/Release-$OIIO_VERSION.t
OIIO_VERSION_MIN="1.1"
OIIO_FORCE_REBUILD=false
OIIO_SKIP=false
-_need_oiio_ldconfig=false
LLVM_VERSION="3.1"
LLVM_VERSION_MIN="3.0"
@@ -230,6 +225,7 @@ LLVM_SKIP=false
# OSL needs to be compiled for now!
OSL_VERSION="1.3.2"
+OSL_VERSION_MIN=$OSL_VERSION
OSL_SOURCE="https://github.com/imageworks/OpenShadingLanguage/archive/Release-$OSL_VERSION.tar.gz"
OSL_FORCE_REBUILD=false
OSL_SKIP=false
@@ -237,7 +233,7 @@ OSL_SKIP=false
# Version??
OPENCOLLADA_VERSION="1.3"
OPENCOLLADA_SOURCE="https://github.com/KhronosGroup/OpenCOLLADA.git"
-OPENCOLLADA_REPO_UID="828b60384552b83e55d2af7055f07d2c40b4d3f4"
+OPENCOLLADA_REPO_UID="18da7f4109a8eafaa290a33f5550501cc4c8bae8"
OPENCOLLADA_FORCE_REBUILD=false
OPENCOLLADA_SKIP=false
@@ -251,6 +247,8 @@ _ffmpeg_list_sep=";"
# FFMPEG optional libs.
VORBIS_USE=false
VORBIS_DEV=""
+OGG_USE=false
+OGG_DEV=""
THEORA_USE=false
THEORA_DEV=""
XVID_USE=false
@@ -320,9 +318,6 @@ while true; do
--with-all)
WITH_ALL=true; shift; continue
;;
- --with-osl)
- WITH_OSL=true; shift; continue
- ;;
--with-opencollada)
WITH_OPENCOLLADA=true; shift; continue
;;
@@ -406,6 +401,9 @@ while true; do
--skip-ffmpeg)
FFMPEG_SKIP=true; shift; continue
;;
+ --required-numpy)
+ NUMPY_REQUIRED=true; shift; continue
+ ;;
--)
# no more arguments to parse
break
@@ -422,7 +420,6 @@ while true; do
done
if $WITH_ALL; then
- WITH_OSL=true
WITH_OPENCOLLADA=true
fi
@@ -552,6 +549,17 @@ _create_inst_shortcut() {
ln -s $_inst $_inst_shortcut
}
+# ldconfig
+run_ldconfig() {
+ _lib_path="$INST/$1/lib"
+ _ldconf_path="/etc/ld.so.conf.d/$1.conf"
+ INFO ""
+ INFO "Running ldconfig for $1..."
+ sudo sh -c "echo \"$_lib_path\" > $_ldconf_path"
+ sudo /sbin/ldconfig # XXX OpenSuse does not include sbin in command path with sudo!!!
+ INFO ""
+}
+
#### Build Python ####
_init_python() {
_src=$SRC/Python-$PYTHON_VERSION
@@ -567,7 +575,7 @@ clean_Python() {
compile_Python() {
# To be changed each time we make edits that would modify the compiled result!
- py_magic=0
+ py_magic=1
_init_python
# Clean install if needed!
@@ -591,7 +599,7 @@ compile_Python() {
cd $_src
- ./configure --prefix=$_inst --enable-ipv6 \
+ ./configure --prefix=$_inst --libdir=$_inst/lib --enable-ipv6 \
--enable-loadable-sqlite-extensions --with-dbmliborder=bdb \
--with-computed-gotos --with-pymalloc
@@ -631,11 +639,11 @@ clean_Numpy() {
compile_Numpy() {
# To be changed each time we make edits that would modify the compiled result!
- py_magic=0
+ numpy_magic=0
_init_numpy
# Clean install if needed!
- magic_compile_check numpy-$NUMPY_VERSION $py_magic
+ magic_compile_check numpy-$NUMPY_VERSION $numpy_magic
if [ $? -eq 1 -o $NUMPY_FORCE_REBUILD == true ]; then
clean_Numpy
fi
@@ -666,7 +674,7 @@ compile_Numpy() {
exit 1
fi
- magic_compile_set numpy-$NUMPY_VERSION $py_magic
+ magic_compile_set numpy-$NUMPY_VERSION $numpy_magic
cd $CWD
INFO "Done compiling Numpy-$NUMPY_VERSION!"
@@ -741,7 +749,7 @@ compile_Boost() {
fi
# Just always run it, much simpler this way!
- _need_boost_ldconfig=true
+ run_ldconfig "boost"
}
#### Build OCIO ####
@@ -847,7 +855,7 @@ clean_ILMBASE() {
compile_ILMBASE() {
# To be changed each time we make edits that would modify the compiled result!
- ilmbase_magic=5
+ ilmbase_magic=6
_init_ilmbase
# Clean install if needed!
@@ -925,15 +933,14 @@ EOF
ERROR "ILMBase-$ILMBASE_VERSION failed to compile, exiting"
exit 1
fi
+ cd $CWD
+ INFO "Done compiling ILMBase-$ILMBASE_VERSION!"
else
INFO "Own ILMBase-$ILMBASE_VERSION is up to date, nothing to do!"
INFO "If you want to force rebuild of this lib (and openexr), use the --force-openexr option."
fi
magic_compile_set ilmbase-$ILMBASE_VERSION $ilmbase_magic
-
- cd $CWD
- INFO "Done compiling ILMBase-$ILMBASE_VERSION!"
}
#### Build OpenEXR ####
@@ -951,7 +958,7 @@ clean_OPENEXR() {
compile_OPENEXR() {
# To be changed each time we make edits that would modify the compiled result!
- openexr_magic=10
+ openexr_magic=11
# Clean install if needed!
magic_compile_check openexr-$OPENEXR_VERSION $openexr_magic
@@ -1026,12 +1033,13 @@ compile_OPENEXR() {
TARGET_LINK_LIBRARIES ( IlmImfFuzzTest IlmImf Iex Imath Half IlmThread ${PTHREAD_LIB} ${Z_LIB})
--- a/IlmImfTest/CMakeLists.txt
+++ b/IlmImfTest/CMakeLists.txt
-@@ -19,22 +19,26 @@
+@@ -19,22 +19,28 @@
testCustomAttributes.cpp
testDeepScanLineBasic.cpp
testDeepScanLineHuge.cpp
+ testDeepScanLineMultipleRead.cpp
testDeepTiledBasic.cpp
++ testBadTypeAttributes.cpp
testExistingStreams.cpp
+ testFutureProofing.cpp
testHuf.cpp
@@ -1049,6 +1057,7 @@ compile_OPENEXR() {
testMultiView.cpp
testNativeFormat.cpp
+ testOptimized.cpp
++ testOptimizedInterleavePatterns.cpp
+ testPartHelper.cpp
testPreviewImage.cpp
testRgba.cpp
@@ -1145,7 +1154,7 @@ EOF
_with_built_openexr=true
# Just always run it, much simpler this way!
- _need_openexr_ldconfig=true
+ run_ldconfig "openexr"
}
#### Build OIIO ####
@@ -1408,7 +1417,7 @@ EOF
fi
# Just always run it, much simpler this way!
- _need_oiio_ldconfig=true
+ run_ldconfig "oiio"
}
#### Build LLVM ####
@@ -1426,7 +1435,7 @@ clean_LLVM() {
compile_LLVM() {
# To be changed each time we make edits that would modify the compiled result!
- llvm_magic=1
+ llvm_magic=2
_init_llvm
# Clean install if needed!
@@ -1531,7 +1540,7 @@ clean_OSL() {
compile_OSL() {
# To be changed each time we make edits that would modify the compiled result!
- osl_magic=10
+ osl_magic=11
_init_osl
# Clean install if needed!
@@ -1589,6 +1598,7 @@ compile_OSL() {
cmake_d="$cmake_d -D OPENIMAGEIOHOME=$INST/oiio"
fi
+ INFO "$LLVM_VERSION_FOUND"
if [ ! -z $LLVM_VERSION_FOUND ]; then
cmake_d="$cmake_d -D LLVM_VERSION=$LLVM_VERSION_FOUND"
if [ -d $INST/llvm ]; then
@@ -1633,7 +1643,7 @@ clean_OpenCOLLADA() {
compile_OpenCOLLADA() {
# To be changed each time we make edits that would modify the compiled results!
- opencollada_magic=7
+ opencollada_magic=8
_init_opencollada
# Clean install if needed!
@@ -1884,16 +1894,18 @@ install_DEB() {
# These libs should always be available in debian/ubuntu official repository...
OPENJPEG_DEV="libopenjpeg-dev"
VORBIS_DEV="libvorbis-dev"
+ OGG_DEV="libogg-dev"
THEORA_DEV="libtheora-dev"
_packages="gawk cmake cmake-curses-gui scons build-essential libjpeg-dev libpng-dev \
libfreetype6-dev libx11-dev libxi-dev wget libsqlite3-dev libbz2-dev \
libncurses5-dev libssl-dev liblzma-dev libreadline-dev $OPENJPEG_DEV \
- libopenal-dev libglew-dev yasm $THEORA_DEV $VORBIS_DEV \
+ libopenal-dev libglew-dev yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV \
libsdl1.2-dev libfftw3-dev patch bzip2"
OPENJPEG_USE=true
VORBIS_USE=true
+ OGG_USE=true
THEORA_USE=true
# Install newest libtiff-dev in debian/ubuntu.
@@ -1983,6 +1995,7 @@ install_DEB() {
if $PYTHON_SKIP; then
INFO "WARNING! Skipping Python installation, as requested..."
else
+ _do_compile=false
check_package_DEB python$PYTHON_VERSION_MIN-dev
if [ $? -eq 0 ]; then
install_packages_DEB python$PYTHON_VERSION_MIN-dev
@@ -1993,12 +2006,20 @@ install_DEB() {
check_package_DEB python$PYTHON_VERSION_MIN-numpy
if [ $? -eq 0 ]; then
install_packages_DEB python$PYTHON_VERSION_MIN-numpy
+ elif $NUMPY_REQUIRED; then
+ INFO "WARNING! Valid python package but no valid numpy package!"
+ INFO " Building both Python and Numpy from sources!"
+ _do_compile=true
else
- INFO "WARNING! Sorry, using python package but no numpy package available!"
+ INFO "WARNING! Sorry, using python package but no valid numpy package available!"
+ INFO " Use --required-numpy to force building of both Python and numpy."
fi
fi
- clean_Python
else
+ _do_compile=true
+ fi
+
+ if $_do_compile; then
compile_Python
INFO ""
if $NUMPY_SKIP; then
@@ -2006,6 +2027,8 @@ install_DEB() {
else
compile_Numpy
fi
+ else
+ clean_Python
fi
fi
@@ -2072,48 +2095,38 @@ install_DEB() {
fi
fi
- if $WITH_OSL; then
- have_llvm=false
+ have_llvm=false
- if $LLVM_SKIP; then
- INFO "WARNING! Skipping LLVM installation, as requested (this also implies skipping OSL!)..."
+ if $LLVM_SKIP; then
+ INFO "WARNING! Skipping LLVM installation, as requested (this also implies skipping OSL!)..."
+ else
+ INFO ""
+ check_package_version_ge_DEB llvm-dev $LLVM_VERSION_MIN
+ if [ $? -eq 0 ]; then
+ install_packages_DEB llvm-dev clang
+ have_llvm=true
+ LLVM_VERSION_FOUND="" # Using default one, no need to specify it!
+ clean_LLVM
else
+ install_packages_DEB libffi-dev
+ # LLVM can't find the debian ffi header dir
+ _FFI_INCLUDE_DIR=`dpkg -L libffi-dev | grep -e ".*/ffi.h" | sed -r 's/(.*)\/ffi.h/\1/'`
INFO ""
- check_package_DEB llvm-$LLVM_VERSION-dev
- if [ $? -eq 0 ]; then
- install_packages_DEB llvm-$LLVM_VERSION-dev clang
- have_llvm=true
- LLVM_VERSION_FOUND=$LLVM_VERSION
- clean_LLVM
- else
- check_package_DEB llvm-$LLVM_VERSION_MIN-dev
- if [ $? -eq 0 ]; then
- install_packages_DEB llvm-$LLVM_VERSION_MIN-dev clang
- have_llvm=true
- LLVM_VERSION_FOUND=$LLVM_VERSION_MIN
- clean_LLVM
- else
- install_packages_DEB libffi-dev
- # LLVM can't find the debian ffi header dir
- _FFI_INCLUDE_DIR=`dpkg -L libffi-dev | grep -e ".*/ffi.h" | sed -r 's/(.*)\/ffi.h/\1/'`
- INFO ""
- compile_LLVM
- have_llvm=true
- LLVM_VERSION_FOUND=$LLVM_VERSION
- fi
- fi
+ compile_LLVM
+ have_llvm=true
+ LLVM_VERSION_FOUND=$LLVM_VERSION
fi
+ fi
- if $OSL_SKIP; then
- INFO "WARNING! Skipping OpenShadingLanguage installation, as requested..."
- else
- if $have_llvm; then
- INFO ""
- install_packages_DEB flex bison libtbb-dev
- # No package currently!
- INFO ""
- compile_OSL
- fi
+ if $OSL_SKIP; then
+ INFO "WARNING! Skipping OpenShadingLanguage installation, as requested..."
+ else
+ if $have_llvm; then
+ INFO ""
+ install_packages_DEB flex bison libtbb-dev
+ # No package currently!
+ INFO ""
+ compile_OSL
fi
fi
@@ -2300,15 +2313,17 @@ install_RPM() {
# These libs should always be available in fedora/suse official repository...
OPENJPEG_DEV="openjpeg-devel"
VORBIS_DEV="libvorbis-devel"
+ OGG_DEV="libogg-devel"
THEORA_DEV="libtheora-devel"
_packages="gcc gcc-c++ make scons libtiff-devel freetype-devel libjpeg-devel\
libpng-devel libX11-devel libXi-devel wget ncurses-devel \
readline-devel $OPENJPEG_DEV openal-soft-devel \
- glew-devel yasm $THEORA_DEV $VORBIS_DEV patch"
+ glew-devel yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV patch"
OPENJPEG_USE=true
VORBIS_USE=true
+ OGG_USE=true
THEORA_USE=true
if [ $RPM = "FEDORA" -o $RPM = "RHEL" ]; then
@@ -2400,6 +2415,7 @@ install_RPM() {
if $PYTHON_SKIP; then
INFO "WARNING! Skipping Python installation, as requested..."
else
+ _do_compile=false
check_package_version_match_RPM python3-devel $PYTHON_VERSION_MIN
if [ $? -eq 0 ]; then
install_packages_RPM python3-devel
@@ -2410,12 +2426,20 @@ install_RPM() {
check_package_version_match_RPM python3-numpy $NUMPY_VERSION_MIN
if [ $? -eq 0 ]; then
install_packages_RPM python3-numpy
+ elif $NUMPY_REQUIRED; then
+ INFO "WARNING! Valid python package but no valid numpy package!"
+ INFO " Building both Python and Numpy from sources!"
+ _do_compile=true
else
- INFO "WARNING! Sorry, using python package but no numpy package available!"
+ INFO "WARNING! Sorry, using python package but no valid numpy package available!"
+ INFO " Use --required-numpy to force building of both Python and numpy."
fi
fi
- clean_Python
else
+ _do_compile=true
+ fi
+
+ if $_do_compile; then
compile_Python
INFO ""
if $NUMPY_SKIP; then
@@ -2423,6 +2447,8 @@ install_RPM() {
else
compile_Numpy
fi
+ else
+ clean_Python
fi
fi
@@ -2478,52 +2504,50 @@ install_RPM() {
fi
fi
- if $WITH_OSL; then
- have_llvm=false
+ have_llvm=false
- INFO ""
- if $LLVM_SKIP; then
- INFO "WARNING! Skipping LLVM installation, as requested (this also implies skipping OSL!)..."
- else
- # Problem compiling with LLVM 3.2 so match version 3.1 ...
- check_package_version_match_RPM llvm $LLVM_VERSION
- if [ $? -eq 0 ]; then
- if [ $RPM = "SUSE" ]; then
- install_packages_RPM llvm-devel llvm-clang-devel
- else
- install_packages_RPM llvm-devel clang-devel
- fi
- have_llvm=true
- LLVM_VERSION_FOUND=$LLVM_VERSION
- clean_LLVM
+ INFO ""
+ if $LLVM_SKIP; then
+ INFO "WARNING! Skipping LLVM installation, as requested (this also implies skipping OSL!)..."
+ else
+ # Problem compiling with LLVM 3.2 so match version 3.1 ...
+ check_package_version_match_RPM llvm $LLVM_VERSION
+ if [ $? -eq 0 ]; then
+ if [ $RPM = "SUSE" ]; then
+ install_packages_RPM llvm-devel llvm-clang-devel
else
- #
- # Better to compile it than use minimum version from repo...
- #
- install_packages_RPM libffi-devel
- # LLVM can't find the fedora ffi header dir...
- _FFI_INCLUDE_DIR=`rpm -ql libffi-devel | grep -e ".*/ffi.h" | sed -r 's/(.*)\/ffi.h/\1/'`
- INFO ""
- compile_LLVM
- have_llvm=true
- LLVM_VERSION_FOUND=$LLVM_VERSION
+ install_packages_RPM llvm-devel clang-devel
fi
+ have_llvm=true
+ LLVM_VERSION_FOUND=$LLVM_VERSION
+ clean_LLVM
+ else
+ #
+ # Better to compile it than use minimum version from repo...
+ #
+ install_packages_RPM libffi-devel
+ # LLVM can't find the fedora ffi header dir...
+ _FFI_INCLUDE_DIR=`rpm -ql libffi-devel | grep -e ".*/ffi.h" | sed -r 's/(.*)\/ffi.h/\1/'`
+ INFO ""
+ compile_LLVM
+ have_llvm=true
+ LLVM_VERSION_FOUND=$LLVM_VERSION
fi
+ fi
- if $OSL_SKIP; then
+ if $OSL_SKIP; then
+ INFO ""
+ INFO "WARNING! Skipping OpenShadingLanguage installation, as requested..."
+ else
+ if $have_llvm; then
+ # No package currently!
INFO ""
- INFO "WARNING! Skipping OpenShadingLanguage installation, as requested..."
- else
- if $have_llvm; then
- # No package currently!
- INFO ""
- install_packages_RPM flex bison git
- if [ $RPM = "FEDORA" -o $RPM = "RHEL" ]; then
- install_packages_RPM tbb-devel
- fi
- INFO ""
- compile_OSL
+ install_packages_RPM flex bison git
+ if [ $RPM = "FEDORA" -o $RPM = "RHEL" ]; then
+ install_packages_RPM tbb-devel
fi
+ INFO ""
+ compile_OSL
fi
fi
@@ -2627,13 +2651,15 @@ install_ARCH() {
# These libs should always be available in arch official repository...
OPENJPEG_DEV="openjpeg"
VORBIS_DEV="libvorbis"
+ OGG_DEV="libogg"
THEORA_DEV="libtheora"
_packages="base-devel scons cmake libxi glew libpng libtiff wget openal \
- $OPENJPEG_DEV $VORBIS_DEV $THEORA_DEV yasm sdl fftw"
+ $OPENJPEG_DEV $VORBIS_DEV $OGG_DEV $THEORA_DEV yasm sdl fftw"
OPENJPEG_USE=true
VORBIS_USE=true
+ OGG_USE=true
THEORA_USE=true
if $WITH_ALL; then
@@ -2682,6 +2708,7 @@ install_ARCH() {
if $PYTHON_SKIP; then
INFO "WARNING! Skipping Python installation, as requested..."
else
+ _do_compile=false
check_package_version_ge_ARCH python $PYTHON_VERSION_MIN
if [ $? -eq 0 ]; then
install_packages_ARCH python
@@ -2693,22 +2720,30 @@ install_ARCH() {
check_package_version_ge_ARCH python-numpy $NUMPY_VERSION_MIN
if [ $? -eq 0 ]; then
install_packages_ARCH python-numpy
- else
- INFO "WARNING! Sorry, using python package but no numpy package available!"
+ elif $NUMPY_REQUIRED; then
+ INFO "WARNING! Valid python package but no valid numpy package!"
+ INFO " Building both Python and Numpy from sources!"
+ _do_compile=true
+ else
+ INFO "WARNING! Sorry, using python package but no valid numpy package available!"
+ INFO " Use --required-numpy to force building of both Python and numpy."
fi
fi
fi
- clean_Python
else
+ _do_compile=true
+ fi
+
+ if $_do_compile; then
compile_Python
INFO ""
- if $WITH_NUMPY; then
- if $NUMPY_SKIP; then
- INFO "WARNING! Skipping NumPy installation, as requested..."
- else
- compile_Numpy
- fi
+ if $NUMPY_SKIP; then
+ INFO "WARNING! Skipping NumPy installation, as requested..."
+ else
+ compile_Numpy
fi
+ else
+ clean_Python
fi
fi
@@ -2765,49 +2800,47 @@ install_ARCH() {
fi
fi
- if $WITH_OSL; then
- have_llvm=false
+ have_llvm=false
- INFO ""
- if $LLVM_SKIP; then
- INFO "WARNING! Skipping LLVM installation, as requested (this also implies skipping OSL!)..."
+ INFO ""
+ if $LLVM_SKIP; then
+ INFO "WARNING! Skipping LLVM installation, as requested (this also implies skipping OSL!)..."
+ else
+ check_package_version_ge_ARCH llvm $LLVM_VERSION_MIN
+ if [ $? -eq 0 ]; then
+ install_packages_ARCH llvm clang
+ have_llvm=true
+ LLVM_VERSION=`check_package_version_ge_ARCH llvm $LLVM_VERSION_MIN`
+ LLVM_VERSION_FOUND=$LLVM_VERSION
+ clean_LLVM
else
- check_package_version_ge_ARCH llvm $LLVM_VERSION_MIN
+ install_packages_ARCH libffi
+ # LLVM can't find the arch ffi header dir...
+ _FFI_INCLUDE_DIR=`pacman -Ql libffi | grep -e ".*/ffi.h" | awk '{print $2}' | sed -r 's/(.*)\/ffi.h/\1/'`
+ # LLVM 3.1 needs python2 to build and arch defaults to python3
+ _PYTHON2_BIN="/usr/bin/python2"
+ INFO ""
+ compile_LLVM
+ have_llvm=true
+ LLVM_VERSION_FOUND=$LLVM_VERSION
+ fi
+ fi
+
+ if $OSL_SKIP; then
+ INFO ""
+ INFO "WARNING! Skipping OpenShadingLanguage installation, as requested..."
+ else
+ if $have_llvm; then
+ check_package_version_ge_ARCH openshadinglanguage $OSL_VERSION_MIN
if [ $? -eq 0 ]; then
- install_packages_ARCH llvm clang
- have_llvm=true
- LLVM_VERSION=`check_package_version_ge_ARCH llvm`
- LLVM_VERSION_FOUND=$LLVM_VERSION
- clean_LLVM
+ install_packages_ARCH openshadinglanguage
+ clean_OSL
else
- install_packages_ARCH libffi
- # LLVM can't find the arch ffi header dir...
- _FFI_INCLUDE_DIR=`pacman -Ql libffi | grep -e ".*/ffi.h" | awk '{print $2}' | sed -r 's/(.*)\/ffi.h/\1/'`
- # LLVM 3.1 needs python2 to build and arch defaults to python3
- _PYTHON2_BIN="/usr/bin/python2"
+ #XXX Note: will fail to build with LLVM 3.2!
INFO ""
- compile_LLVM
- have_llvm=true
- LLVM_VERSION_FOUND=$LLVM_VERSION
- fi
- fi
-
- if $OSL_SKIP; then
- INFO ""
- INFO "WARNING! Skipping OpenShadingLanguage installation, as requested..."
- else
- if $have_llvm; then
- check_package_version_ge_ARCH openshadinglanguage $OSL_VERSION_MIN
- if [ $? -eq 0 ]; then
- install_packages_ARCH openshadinglanguage
- clean_OSL
- else
- #XXX Note: will fail to build with LLVM 3.2!
- INFO ""
- install_packages_ARCH git intel-tbb
- INFO ""
- compile_OSL
- fi
+ install_packages_ARCH git intel-tbb
+ INFO ""
+ compile_OSL
fi
fi
fi
@@ -2889,6 +2922,10 @@ print_info_ffmpeglink() {
_packages="$_packages $VORBIS_DEV"
fi
+ if $OGG_USE; then
+ _packages="$_packages $OGG_DEV"
+ fi
+
if $XVID_USE; then
_packages="$_packages $XVID_DEV"
fi
@@ -2949,6 +2986,12 @@ print_info() {
fi
fi
+ if [ -d $INST/python-$PYTHON_VERSION_MIN ]; then
+ _1="-D PYTHON_ROOT_DIR=$INST/python-$PYTHON_VERSION_MIN"
+ INFO " $_1"
+ _buildargs="$_buildargs $_1"
+ fi
+
if [ -d $INST/boost ]; then
_1="-D BOOST_ROOT=$INST/boost"
_2="-D Boost_NO_SYSTEM_PATHS=ON"
@@ -2985,26 +3028,24 @@ print_info() {
_buildargs="$_buildargs $_1"
fi
- if $WITH_OSL; then
- _1="-D WITH_CYCLES_OSL=ON"
- _2="-D WITH_LLVM=ON"
- _3="-D LLVM_VERSION=$LLVM_VERSION_FOUND"
+ _1="-D WITH_CYCLES_OSL=ON"
+ _2="-D WITH_LLVM=ON"
+ _3="-D LLVM_VERSION=$LLVM_VERSION_FOUND"
+ INFO " $_1"
+ INFO " $_2"
+ INFO " $_3"
+ _buildargs="$_buildargs $_1 $_2 $_3"
+ if [ -d $INST/osl ]; then
+ _1="-D CYCLES_OSL=$INST/osl"
+ INFO " $_1"
+ _buildargs="$_buildargs $_1"
+ fi
+ if [ -d $INST/llvm ]; then
+ _1="-D LLVM_DIRECTORY=$INST/llvm"
+ _2="-D LLVM_STATIC=ON"
INFO " $_1"
INFO " $_2"
- INFO " $_3"
- _buildargs="$_buildargs $_1 $_2 $_3"
- if [ -d $INST/osl ]; then
- _1="-D CYCLES_OSL=$INST/osl"
- INFO " $_1"
- _buildargs="$_buildargs $_1"
- fi
- if [ -d $INST/llvm ]; then
- _1="-D LLVM_DIRECTORY=$INST/llvm"
- _2="-D LLVM_STATIC=ON"
- INFO " $_1"
- INFO " $_2"
- _buildargs="$_buildargs $_1 $_2"
- fi
+ _buildargs="$_buildargs $_1 $_2"
fi
if $WITH_OPENCOLLADA; then
@@ -3106,7 +3147,7 @@ print_info() {
fi
if $ALL_STATIC; then
- INFO "LLIB = ["xml2", "expat"] + LLIB"
+ INFO "LLIBS = [\""xml2"\", \""expat"\"] + LLIBS"
fi
INFO ""
@@ -3131,20 +3172,6 @@ else
exit 1
fi
-INFO ""
-INFO "Running ldconfig..."
-if [ $_need_boost_ldconfig == true ]; then
- sudo sh -c "echo \"$INST/boost/lib\" > /etc/ld.so.conf.d/boost.conf"
-fi
-if [ $_need_oiio_ldconfig == true ]; then
- sudo sh -c "echo \"$INST/oiio/lib\" > /etc/ld.so.conf.d/oiio.conf"
-fi
-if [ $_need_openexr_ldconfig == true ]; then
- sudo sh -c "echo \"$INST/openexr/lib\" > /etc/ld.so.conf.d/openexr.conf"
-fi
-sudo /sbin/ldconfig # XXX OpenSuse does not include sbin in command path with sudo!!!
-INFO ""
-
print_info | tee BUILD_NOTES.txt
INFO ""
INFO "This information has been written to BUILD_NOTES.txt"
diff --git a/build_files/buildbot/config/user-config-mac-i386.py b/build_files/buildbot/config/user-config-mac-i386.py
index 60f8b5705ac..ad0fbcc78da 100644
--- a/build_files/buildbot/config/user-config-mac-i386.py
+++ b/build_files/buildbot/config/user-config-mac-i386.py
@@ -34,6 +34,8 @@ elif cmd_res[:2]=='11':
MAC_CUR_VER='10.7'
elif cmd_res[:2]=='12':
MAC_CUR_VER='10.8'
+elif cmd_res[:2]=='13':
+ MAC_CUR_VER='10.9'
cmd = 'xcodebuild -version'
cmd_xcode=commands.getoutput(cmd)
XCODE_CUR_VER=cmd_xcode[6:][:3] # truncate output to major.minor version
@@ -367,7 +369,7 @@ if not WITH_OSX_STATICPYTHON:
#note to build succesfully on 10.3.9 SDK you need to patch 10.3.9 by adding the SystemStubs.a lib from 10.4
#for > 10.7.sdk, SystemStubs needs to be excluded (lib doesn't exist anymore)
-if MACOSX_SDK.endswith("10.7.sdk") or MACOSX_SDK.endswith("10.8.sdk"):
+if MACOSX_SDK.endswith("10.7.sdk") or MACOSX_SDK.endswith("10.8.sdk") or MACOSX_SDK.endswith("10.9.sdk"):
LLIBS = ['stdc++']
else:
LLIBS = ['stdc++', 'SystemStubs']
diff --git a/build_files/buildbot/config/user-config-mac-x86_64.py b/build_files/buildbot/config/user-config-mac-x86_64.py
index 4fab8d6d566..fb0a084cf4d 100644
--- a/build_files/buildbot/config/user-config-mac-x86_64.py
+++ b/build_files/buildbot/config/user-config-mac-x86_64.py
@@ -34,6 +34,8 @@ elif cmd_res[:2]=='11':
MAC_CUR_VER='10.7'
elif cmd_res[:2]=='12':
MAC_CUR_VER='10.8'
+elif cmd_res[:2]=='13':
+ MAC_CUR_VER='10.9'
cmd = 'xcodebuild -version'
cmd_xcode=commands.getoutput(cmd)
XCODE_CUR_VER=cmd_xcode[6:][:3] # truncate output to major.minor version
@@ -367,7 +369,7 @@ if not WITH_OSX_STATICPYTHON:
#note to build succesfully on 10.3.9 SDK you need to patch 10.3.9 by adding the SystemStubs.a lib from 10.4
#for > 10.7.sdk, SystemStubs needs to be excluded (lib doesn't exist anymore)
-if MACOSX_SDK.endswith("10.7.sdk") or MACOSX_SDK.endswith("10.8.sdk"):
+if MACOSX_SDK.endswith("10.7.sdk") or MACOSX_SDK.endswith("10.8.sdk") or MACOSX_SDK.endswith("10.9.sdk"):
LLIBS = ['stdc++']
else:
LLIBS = ['stdc++', 'SystemStubs']
diff --git a/build_files/cmake/Modules/FindPythonLibsUnix.cmake b/build_files/cmake/Modules/FindPythonLibsUnix.cmake
index 82f74373b8b..30019eb0b70 100644
--- a/build_files/cmake/Modules/FindPythonLibsUnix.cmake
+++ b/build_files/cmake/Modules/FindPythonLibsUnix.cmake
@@ -199,4 +199,5 @@ MARK_AS_ADVANCED(
PYTHON_INCLUDE_DIR
PYTHON_INCLUDE_CONFIG_DIR
PYTHON_LIBRARY
+ PYTHON_LIBPATH
)
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 854609f1665..fdc0fb63c8e 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -48,6 +48,24 @@ macro(list_insert_before
unset(_index)
endmacro()
+function (list_assert_duplicates
+ list_id
+ )
+
+ # message(STATUS "list data: ${list_id}")
+
+ list(LENGTH list_id _len_before)
+ list(REMOVE_DUPLICATES list_id)
+ list(LENGTH list_id _len_after)
+ # message(STATUS "list size ${_len_before} -> ${_len_after}")
+ if(NOT _len_before EQUAL _len_after)
+ message(FATAL_ERROR "duplicate found in list which should not contain duplicates: ${list_id}")
+ endif()
+ unset(_len_before)
+ unset(_len_after)
+endfunction()
+
+
# foo_bar.spam --> foo_barMySuffix.spam
macro(file_suffix
file_name_new file_name file_suffix
@@ -177,6 +195,11 @@ macro(blender_add_lib_nolist
# listed is helpful for IDE's (QtCreator/MSVC)
blender_source_group("${sources}")
+ list_assert_duplicates("${sources}")
+ list_assert_duplicates("${includes}")
+ # Not for system includes because they can resolve to the same path
+ # list_assert_duplicates("${includes_sys}")
+
endmacro()
@@ -243,7 +266,7 @@ macro(SETUP_LIBDIRS)
link_directories(${EXPAT_LIBPATH})
endif()
if(WITH_LLVM)
- link_directories(${LLVM_LIB_DIR})
+ link_directories(${LLVM_LIBPATH})
endif()
if(WITH_MEM_JEMALLOC)
link_directories(${JEMALLOC_LIBPATH})
@@ -387,7 +410,7 @@ macro(setup_liblinks
target_link_libraries(${target} ${PTHREADS_LIBRARIES})
endif()
- target_link_libraries(${target} ${PLATFORM_LINKLIBS})
+ target_link_libraries(${target} ${PLATFORM_LINKLIBS} ${CMAKE_DL_LIBS})
endmacro()
macro(TEST_SSE_SUPPORT
@@ -498,6 +521,7 @@ macro(remove_strict_flags)
remove_cc_flag("-Wredundant-decls")
remove_cc_flag("-Wundef")
remove_cc_flag("-Wshadow")
+ remove_cc_flag("-Wdouble-promotion")
remove_cc_flag("-Wold-style-definition")
remove_cc_flag("-Werror=[^ ]+")
remove_cc_flag("-Werror")
@@ -584,7 +608,8 @@ endmacro()
macro(get_blender_version)
# So cmake depends on BKE_blender.h, beware of inf-loops!
- CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/source/blender/blenkernel/BKE_blender.h ${CMAKE_BINARY_DIR}/source/blender/blenkernel/BKE_blender.h.done)
+ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/source/blender/blenkernel/BKE_blender.h
+ ${CMAKE_BINARY_DIR}/source/blender/blenkernel/BKE_blender.h.done)
file(STRINGS ${CMAKE_SOURCE_DIR}/source/blender/blenkernel/BKE_blender.h _contents REGEX "^#define[ \t]+BLENDER_.*$")
@@ -773,6 +798,9 @@ macro(data_to_c
COMMAND ${CMAKE_COMMAND} -E make_directory ${_file_to_path}
COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/datatoc ${file_from} ${file_to}
DEPENDS ${file_from} datatoc)
+
+ set_source_files_properties(${file_to} PROPERTIES GENERATED TRUE)
+
unset(_file_to_path)
endmacro()
@@ -796,7 +824,49 @@ macro(data_to_c_simple
COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/datatoc ${_file_from} ${_file_to}
DEPENDS ${_file_from} datatoc)
+ set_source_files_properties(${_file_to} PROPERTIES GENERATED TRUE)
+
unset(_file_from)
unset(_file_to)
unset(_file_to_path)
endmacro()
+
+# XXX Not used for now...
+macro(svg_to_png
+ file_from
+ file_to
+ dpi
+ list_to_add)
+
+ # remove ../'s
+ get_filename_component(_file_from ${CMAKE_CURRENT_SOURCE_DIR}/${file_from} REALPATH)
+ get_filename_component(_file_to ${CMAKE_CURRENT_SOURCE_DIR}/${file_to} REALPATH)
+
+ list(APPEND ${list_to_add} ${_file_to})
+
+ find_program(INKSCAPE_EXE inkscape)
+ mark_as_advanced(INKSCAPE_EXE)
+
+ if(INKSCAPE_EXE)
+ if(APPLE)
+ # in OS X app bundle, the binary is a shim that doesn't take any
+ # command line arguments, replace it with the actual binary
+ string(REPLACE "MacOS/Inkscape" "Resources/bin/inkscape" INKSCAPE_REAL_EXE ${INKSCAPE_EXE})
+ if(EXISTS "${INKSCAPE_REAL_EXE}")
+ set(INKSCAPE_EXE ${INKSCAPE_REAL_EXE})
+ endif()
+ endif()
+
+ add_custom_command(
+ OUTPUT ${_file_to}
+ COMMAND ${INKSCAPE_EXE} ${_file_from} --export-dpi=${dpi} --without-gui --export-png=${_file_to}
+ DEPENDS ${_file_from} ${INKSCAPE_EXE}
+ )
+ else()
+ message(WARNING "Inkscape not found, could not re-generate ${_file_to} from ${_file_from}!")
+ endif()
+
+ unset(_file_from)
+ unset(_file_to)
+
+endmacro()
diff --git a/build_files/scons/config/darwin-config.py b/build_files/scons/config/darwin-config.py
index f7192e3dd81..5a1069618b9 100644
--- a/build_files/scons/config/darwin-config.py
+++ b/build_files/scons/config/darwin-config.py
@@ -34,12 +34,20 @@ elif cmd_res[:2]=='11':
MAC_CUR_VER='10.7'
elif cmd_res[:2]=='12':
MAC_CUR_VER='10.8'
+elif cmd_res[:2]=='13':
+ MAC_CUR_VER='10.9'
cmd = 'xcodebuild -version'
cmd_xcode=commands.getoutput(cmd)
XCODE_CUR_VER=cmd_xcode[6:][:3] # truncate output to major.minor version
cmd = 'xcodebuild -showsdks'
cmd_sdk=commands.getoutput(cmd)
MACOSX_SDK_CHECK=cmd_sdk
+cmd = 'xcode-select --print-path'
+XCODE_SELECT_PATH=commands.getoutput(cmd)
+if XCODE_SELECT_PATH.endswith("/Contents/Developer"):
+ XCODE_BUNDLE=XCODE_SELECT_PATH[:-19]
+else:
+ XCODE_BUNDLE=XCODE_SELECT_PATH
if MACOSX_ARCHITECTURE == 'x86_64' or MACOSX_ARCHITECTURE == 'ppc64':
USE_QTKIT=True # Carbon quicktime is not available for 64bit
@@ -97,7 +105,7 @@ else :
LIBDIR = '${LCGDIR}'
if XCODE_CUR_VER >= '4.3': ## since version 4.3, XCode and developer dir are bundled ##
- MACOSX_SDK = '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform' + MACOSX_SDK
+ MACOSX_SDK = XCODE_BUNDLE + '/Contents/Developer/Platforms/MacOSX.platform' + MACOSX_SDK
#############################################################################
################### Dependency settings ##################
@@ -105,7 +113,7 @@ if XCODE_CUR_VER >= '4.3': ## since version 4.3, XCode and developer dir are bu
#Defaults openMP to true if compiler handles it ( only gcc 4.6.1 and newer )
# if your compiler does not have accurate suffix you may have to enable it by hand !
-if CC[:-2].endswith('4.6'):
+if CC[:-2].endswith('4.6') or CC[:-2].endswith('4.8'):
WITH_BF_OPENMP = True # multithreading for fluids, cloth, sculpt and smoke
else:
WITH_BF_OPENMP = False
@@ -348,6 +356,7 @@ CFLAGS = []
CXXFLAGS = []
CCFLAGS = ['-pipe','-funsigned-char']
+
CPPFLAGS = list(ARCH_FLAGS)
if WITH_GHOST_COCOA:
@@ -367,7 +376,7 @@ if not WITH_OSX_STATICPYTHON:
#note to build succesfully on 10.3.9 SDK you need to patch 10.3.9 by adding the SystemStubs.a lib from 10.4
#for > 10.7.sdk, SystemStubs needs to be excluded (lib doesn't exist anymore)
-if MACOSX_SDK.endswith("10.7.sdk") or MACOSX_SDK.endswith("10.8.sdk"):
+if MACOSX_SDK.endswith("10.7.sdk") or MACOSX_SDK.endswith("10.8.sdk") or MACOSX_SDK.endswith("10.9.sdk"):
LLIBS = ['stdc++']
else:
LLIBS = ['stdc++', 'SystemStubs']
diff --git a/build_files/scons/config/freebsd7-config.py b/build_files/scons/config/freebsd7-config.py
deleted file mode 100644
index 6c39039c4fb..00000000000
--- a/build_files/scons/config/freebsd7-config.py
+++ /dev/null
@@ -1,210 +0,0 @@
-CC = 'gcc44'
-CXX = 'g++44'
-
-LCGDIR = '../lib/freebsd7'
-LIBDIR = "${LCGDIR}"
-
-BF_PYTHON_ABI_FLAGS = ''
-BF_PYTHON = '/usr/local'
-BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
-BF_PYTHON_VERSION = '3.3'
-WITH_BF_STATICPYTHON = False
-BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}'
-BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
-BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}'
-BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}.a'
-
-WITH_BF_OPENAL = True
-WITH_BF_STATICOPENAL = False
-BF_OPENAL = '/usr/local'
-BF_OPENAL_INC = '${BF_OPENAL}/include'
-BF_OPENAL_LIB = 'openal'
-BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
-
-BF_CXX = '/usr/local'
-WITH_BF_STATICCXX = False
-BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
-
-WITH_BF_JACK = True
-BF_JACK = '/usr/local'
-BF_JACK_INC = '${BF_JACK}/include/jack'
-BF_JACK_LIB = 'jack'
-BF_JACK_LIBPATH = '${BF_JACK}/lib'
-
-WITH_BF_SNDFILE = True
-BF_SNDFILE = '/usr/local'
-BF_SNDFILE_INC = '${BF_SNDFILE}/include/sndfile'
-BF_SNDFILE_LIB = 'sndfile'
-BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
-
-WITH_BF_SDL = True
-BF_SDL = '/usr/local' #$(shell sdl-config --prefix)
-BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
-BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
-
-WITH_BF_OPENEXR = True
-WITH_BF_STATICOPENEXR = False
-BF_OPENEXR = '/usr/local'
-# when compiling with your own openexr lib you might need to set...
-# BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include'
-
-BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR'
-BF_OPENEXR_LIB = 'Half IlmImf Iex Imath '
-BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
-# BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
-
-WITH_BF_DDS = True
-
-WITH_BF_JPEG = True
-BF_JPEG = '/usr/local'
-BF_JPEG_INC = '${BF_JPEG}/include'
-BF_JPEG_LIB = 'jpeg'
-
-WITH_BF_PNG = True
-BF_PNG = '/usr/local'
-BF_PNG_INC = '${BF_PNG}/include'
-BF_PNG_LIB = 'png'
-
-WITH_BF_TIFF = True
-BF_TIFF = '/usr/local'
-BF_TIFF_INC = '${BF_TIFF}/include'
-BF_TIFF_LIB = 'tiff'
-
-WITH_BF_ZLIB = True
-BF_ZLIB = '/usr'
-BF_ZLIB_INC = '${BF_ZLIB}/include'
-BF_ZLIB_LIB = 'z'
-
-WITH_BF_INTERNATIONAL = True
-
-WITH_BF_GAMEENGINE = False
-WITH_BF_PLAYER = True
-WITH_BF_OCEANSIM = True
-
-WITH_BF_BULLET = True
-BF_BULLET = '#extern/bullet2/src'
-BF_BULLET_INC = '${BF_BULLET}'
-BF_BULLET_LIB = 'extern_bullet'
-
-BF_FREETYPE = '/usr/local'
-BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
-BF_FREETYPE_LIB = 'freetype'
-
-### XXX Find what this actually wants; it doesn't want libquicktime.
-WITH_BF_QUICKTIME = False
-BF_QUICKTIME = '/usr/local'
-BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
-
-WITH_BF_ICONV = True
-BF_ICONV = LIBDIR + "/iconv"
-BF_ICONV_INC = '${BF_ICONV}/include'
-BF_ICONV_LIB = 'iconv'
-BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
-
-WITH_BF_BINRELOC = True
-
-# enable ffmpeg support
-WITH_BF_FFMPEG = True
-BF_FFMPEG = '/usr/local'
-BF_FFMPEG_LIB = 'avformat avcodec swscale avutil avdevice'
-BF_FFMPEG_INC = '${BF_FFMPEG}/include'
-BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
-
-# enable ogg, vorbis and theora in ffmpeg
-WITH_BF_OGG = True
-BF_OGG = '/usr/local'
-BF_OGG_INC = '${BF_OGG}/include'
-BF_OGG_LIB = 'ogg vorbis vorbisenc theoraenc theoradec'
-
-WITH_BF_OPENJPEG = True
-BF_OPENJPEG = '#extern/libopenjpeg'
-BF_OPENJPEG_LIB = ''
-BF_OPENJPEG_INC = '${BF_OPENJPEG}'
-BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
-
-WITH_BF_FFTW3 = True
-BF_FFTW3 = LIBDIR + '/usr/local'
-BF_FFTW3_INC = '${BF_FFTW3}/include'
-BF_FFTW3_LIB = 'fftw3'
-BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
-
-WITH_BF_REDCODE = False
-BF_REDCODE = '#extern/libredcode'
-BF_REDCODE_LIB = ''
-# BF_REDCODE_INC = '${BF_REDCODE}/include'
-BF_REDCODE_INC = '${BF_REDCODE}/../' #C files request "libredcode/format.h" which is in "#extern/libredcode/format.h", stupid but compiles for now.
-BF_REDCODE_LIBPATH='${BF_REDCODE}/lib'
-
-# Mesa Libs should go here if your using them as well....
-WITH_BF_STATICOPENGL = False
-BF_OPENGL = '/usr/local'
-BF_OPENGL_INC = '${BF_OPENGL}/include'
-BF_OPENGL_LIB = 'GL GLU X11 Xi'
-BF_OPENGL_LIBPATH = '/usr/X11R6/lib'
-BF_OPENGL_LIB_STATIC = '${BF_OPENGL_LIBPATH}/libGL.a ${BF_OPENGL_LIBPATH}/libGLU.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a ${BF_OPENGL_LIBPATH}/libX11.a ${BF_OPENGL_LIBPATH}/libXi.a ${BF_OPENGL_LIBPATH}/libXext.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a'
-
-WITH_BF_COLLADA = False
-BF_COLLADA = '#source/blender/collada'
-BF_COLLADA_INC = '${BF_COLLADA}'
-BF_COLLADA_LIB = 'bf_collada'
-BF_OPENCOLLADA = '/usr'
-BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}'
-BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre buffer ftoa'
-BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib'
-BF_PCRE = '/usr/local'
-BF_PCRE_LIB = 'pcre'
-BF_PCRE_LIBPATH = '${BF_PCRE}/lib'
-BF_EXPAT = '/usr/local'
-BF_EXPAT_LIB = 'expat'
-BF_EXPAT_LIBPATH = '${BF_EXPAT}/lib'
-
-WITH_GHOST_XDND = False
-
-WITH_BF_OPENMP = True
-
-#Freestyle
-WITH_BF_FREESTYLE = True
-
-#Ray trace optimization
-WITH_BF_RAYOPTIMIZATION = True
-BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse','-pthread']
-
-CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFILE_SOURCE','-D_FILE_OFFSET_BITS=64','-D_LARGEFILE64_SOURCE']
-
-CPPFLAGS = []
-CXXFLAGS = []
-if WITH_BF_FFMPEG:
- # libavutil needs UINT64_C()
- CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
-REL_CFLAGS = []
-REL_CXXFLAGS = []
-REL_CCFLAGS = ['-DNDEBUG', '-O2']
-##BF_DEPEND = True
-##
-##AR = ar
-##ARFLAGS = ruv
-##ARFLAGSQUIET = ru
-##
-C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
-CC_WARN = ['-Wall']
-CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']
-
-
-##FIX_STUBS_WARNINGS = -Wno-unused
-
-LLIBS = ['util', 'c', 'm', 'pthread', 'stdc++']
-##LOPTS = --dynamic
-##DYNLDFLAGS = -shared $(LDFLAGS)
-
-BF_PROFILE = False
-BF_PROFILE_CCFLAGS = ['-pg','-g']
-BF_PROFILE_LINKFLAGS = ['-pg']
-
-BF_DEBUG = False
-BF_DEBUG_CCFLAGS = ['-g', '-D_DEBUG']
-
-BF_BUILDDIR = '../build/freebsd7'
-BF_INSTALLDIR='../install/freebsd7'
-
-#Link against pthread
-PLATFORM_LINKFLAGS = ['-pthread']
diff --git a/build_files/scons/config/freebsd8-config.py b/build_files/scons/config/freebsd8-config.py
index 3318e21bf1d..e94f61f7819 100644
--- a/build_files/scons/config/freebsd8-config.py
+++ b/build_files/scons/config/freebsd8-config.py
@@ -139,7 +139,7 @@ BF_REDCODE_LIBPATH='${BF_REDCODE}/lib'
WITH_BF_STATICOPENGL = False
BF_OPENGL = '/usr/local'
BF_OPENGL_INC = '${BF_OPENGL}/include'
-BF_OPENGL_LIB = 'GL GLU X11 Xi'
+BF_OPENGL_LIB = 'GL GLU X11 Xi Xxf86vm'
BF_OPENGL_LIBPATH = '/usr/X11R6/lib'
BF_OPENGL_LIB_STATIC = '${BF_OPENGL_LIBPATH}/libGL.a ${BF_OPENGL_LIBPATH}/libGLU.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a ${BF_OPENGL_LIBPATH}/libX11.a ${BF_OPENGL_LIBPATH}/libXi.a ${BF_OPENGL_LIBPATH}/libXext.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a'
diff --git a/build_files/scons/config/freebsd9-config.py b/build_files/scons/config/freebsd9-config.py
index b6c5c0d45eb..8535ececb24 100644
--- a/build_files/scons/config/freebsd9-config.py
+++ b/build_files/scons/config/freebsd9-config.py
@@ -139,7 +139,7 @@ BF_REDCODE_LIBPATH='${BF_REDCODE}/lib'
WITH_BF_STATICOPENGL = False
BF_OPENGL = '/usr/local'
BF_OPENGL_INC = '${BF_OPENGL}/include'
-BF_OPENGL_LIB = 'GL GLU X11 Xi'
+BF_OPENGL_LIB = 'GL GLU X11 Xi Xxf86vm'
BF_OPENGL_LIBPATH = '/usr/X11R6/lib'
BF_OPENGL_LIB_STATIC = '${BF_OPENGL_LIBPATH}/libGL.a ${BF_OPENGL_LIBPATH}/libGLU.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a ${BF_OPENGL_LIBPATH}/libX11.a ${BF_OPENGL_LIBPATH}/libXi.a ${BF_OPENGL_LIBPATH}/libXext.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a'
diff --git a/build_files/scons/config/linux-config.py b/build_files/scons/config/linux-config.py
index 6106142f8a9..93fa6137bb0 100644
--- a/build_files/scons/config/linux-config.py
+++ b/build_files/scons/config/linux-config.py
@@ -152,7 +152,7 @@ BF_REDCODE_LIBPATH='${BF_REDCODE}/lib'
WITH_BF_STATICOPENGL = False
BF_OPENGL = '/usr'
BF_OPENGL_INC = '${BF_OPENGL}/include'
-BF_OPENGL_LIB = 'GL GLU X11 Xi'
+BF_OPENGL_LIB = 'GL GLU X11 Xi Xxf86vm'
BF_OPENGL_LIBPATH = '/usr/X11R6/lib'
BF_OPENGL_LIB_STATIC = '${BF_OPENGL_LIBPATH}/libGL.a ${BF_OPENGL_LIBPATH}/libGLU.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a ${BF_OPENGL_LIBPATH}/libX11.a ${BF_OPENGL_LIBPATH}/libXi.a ${BF_OPENGL_LIBPATH}/libXext.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a'
diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py
index ee2399500d0..9bce91ba9a5 100644
--- a/build_files/scons/tools/Blender.py
+++ b/build_files/scons/tools/Blender.py
@@ -675,6 +675,15 @@ def AppIt(target=None, source=None, env=None):
cmd = 'unzip -q %s/release/%s -d %s/%s.app/Contents/MacOS/%s/python/'%(libdir,python_zip,installdir,binary,VERSION)
commands.getoutput(cmd)
+ if env['XCODE_CUR_VER'] >= 5:
+ # For OSX 10.9/Xcode5 subcomponents also must be codesigned. To make this work we need a plist in the versioned libdir
+ # We copy for now the plist from main bundle, note: Blender must be run once before codesigning to have the py caches generated and taken into account
+ # After this we can run: codesign -s IDENTITY blender.app --deep
+ cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/Resources/'%(installdir,binary, VERSION)
+ commands.getoutput(cmd)
+ cmd = 'cp %s/%s.app/Contents/Info.plist %s/%s.app/Contents/MacOS/%s/Resources'%(installdir,binary,installdir,binary, VERSION)
+ commands.getoutput(cmd)
+
cmd = 'chmod +x %s/%s.app/Contents/MacOS/%s'%(installdir,binary, binary)
commands.getoutput(cmd)
cmd = 'find %s/%s.app -name .svn -prune -exec rm -rf {} \;'%(installdir, binary)
@@ -683,15 +692,23 @@ def AppIt(target=None, source=None, env=None):
commands.getoutput(cmd)
cmd = 'find %s/%s.app -name __MACOSX -exec rm -rf {} \;'%(installdir, binary)
commands.getoutput(cmd)
- if env['CC'][:-2].endswith('4.6'): # for correct errorhandling with gcc 4.6.x we need the gcc.dylib to link, thus distribute in app-bundle
+ if env['CC'][:-2].endswith('4.6') or env['CC'][:-2].endswith('4.8'): # for correct errorhandling with gcc 4.6/4.8.x we need the gcc.dylib and gomp.dylib to link, thus distribute in app-bundle
cmd = 'mkdir %s/%s.app/Contents/MacOS/lib'%(installdir, binary)
commands.getoutput(cmd)
instname = env['BF_CXX']
- cmd = 'ditto --arch %s %s/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/lib/'%(osxarch, instname, installdir, binary)
+ cmd = 'ditto --arch %s %s/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/lib/'%(osxarch, instname, installdir, binary) # copy libgcc
+ commands.getoutput(cmd)
+ cmd = 'install_name_tool -id @executable_path/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/lib/libgcc_s.1.dylib'%(installdir, binary) # change id of libgcc
+ commands.getoutput(cmd)
+ cmd = 'ditto --arch %s %s/lib/libgomp.1.dylib %s/%s.app/Contents/MacOS/lib/'%(osxarch, instname, installdir, binary) # copy libgomp
+ commands.getoutput(cmd)
+ cmd = 'install_name_tool -id @executable_path/lib/libgomp.1.dylib %s/%s.app/Contents/MacOS/lib/libgomp.1.dylib'%(installdir, binary) # change id of libgomp
+ commands.getoutput(cmd)
+ cmd = 'install_name_tool -change %s/lib/libgcc_s.1.dylib @executable_path/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/lib/libgomp.1.dylib'%(instname, installdir, binary) # change ref to libgcc
commands.getoutput(cmd)
- cmd = 'install_name_tool -id @executable_path/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/lib/libgcc_s.1.dylib'%(installdir, binary)
+ cmd = 'install_name_tool -change %s/lib/libgcc_s.1.dylib @executable_path/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/%s'%(instname, installdir, binary, binary) # change ref to libgcc ( blender )
commands.getoutput(cmd)
- cmd = 'install_name_tool -change %s/lib/libgcc_s.1.dylib @executable_path/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/%s'%(instname, installdir, binary, binary)
+ cmd = 'install_name_tool -change %s/lib/libgomp.1.dylib @executable_path/lib/libgomp.1.dylib %s/%s.app/Contents/MacOS/%s'%(instname, installdir, binary, binary) # change ref to libgomp ( blender )
commands.getoutput(cmd)
# extract copy system python, be sure to update other build systems
diff --git a/build_files/scons/tools/btools.py b/build_files/scons/tools/btools.py
index 53dd99a7971..8f0d3ff590b 100644
--- a/build_files/scons/tools/btools.py
+++ b/build_files/scons/tools/btools.py
@@ -141,6 +141,8 @@ def validate_arguments(args, bc):
'WITH_GHOST_COCOA',
'WITH_GHOST_SDL',
'WITH_GHOST_XDND',
+ 'WITH_X11_XINPUT',
+ 'WITH_X11_XF86VMODE',
'BF_GHOST_DEBUG',
'USE_QTKIT',
'BF_FANCY', 'BF_QUIET', 'BF_LINE_OVERWRITE',
@@ -424,6 +426,8 @@ def read_opts(env, cfg, args):
('BF_OPENMP_LIBPATH', 'Path to OpenMP libraries (used when cross-compiling with older versions of WinGW)', ''),
(BoolVariable('WITH_GHOST_COCOA', 'Use Cocoa-framework if true', False)),
(BoolVariable('WITH_GHOST_SDL', 'Enable building blender against SDL for windowing rather then the native APIs', False)),
+ (BoolVariable('WITH_X11_XINPUT', 'Enable X11 Xinput (tablet support and unicode input)', True)),
+ (BoolVariable('WITH_X11_XF86VMODE', 'Enable X11 video mode switching', True)),
(BoolVariable('USE_QTKIT', 'Use QTKIT if true', False)),
('BF_OPENMP_LIB_STATIC', 'OpenMP static library', ''),
@@ -572,7 +576,7 @@ def read_opts(env, cfg, args):
('BF_CYCLES_CUDA_BINARIES_ARCH', 'CUDA architectures to compile binaries for', []),
(BoolVariable('WITH_BF_OIIO', 'Build with OpenImageIO', False)),
- (BoolVariable('WITH_BF_STATICOIIO', 'Staticly link to OpenImageIO', False)),
+ (BoolVariable('WITH_BF_STATICOIIO', 'Statically link to OpenImageIO', False)),
('BF_OIIO', 'OIIO root path', ''),
('BF_OIIO_INC', 'OIIO include path', ''),
('BF_OIIO_LIB', 'OIIO library', ''),
diff --git a/doc/python_api/examples/bpy.props.5.py b/doc/python_api/examples/bpy.props.5.py
index 1f61e33c30f..d2ace54de27 100644
--- a/doc/python_api/examples/bpy.props.5.py
+++ b/doc/python_api/examples/bpy.props.5.py
@@ -1,6 +1,6 @@
"""
Get/Set Example
-++++++++++++++
++++++++++++++++
Get/Set functions can be used for boolean, int, float, string and enum properties.
If these callbacks are defined the property will not be stored in the ID properties
diff --git a/doc/python_api/examples/bpy.types.UIList.py b/doc/python_api/examples/bpy.types.UIList.1.py
index 0f4ae0703cc..88f6b0999cd 100644
--- a/doc/python_api/examples/bpy.types.UIList.py
+++ b/doc/python_api/examples/bpy.types.UIList.1.py
@@ -1,6 +1,7 @@
"""
Basic UIList Example
-+++++++++++++++++++
+++++++++++++++++++++
+
This script is the UIList subclass used to show material slots, with a bunch of additional commentaries.
Notice the name of the class, this naming convention is similar as the one for panels or menus.
@@ -22,7 +23,10 @@ class MATERIAL_UL_matslots_example(bpy.types.UIList):
# active item of the collection).
# active_propname is the name of the active property (use 'getattr(active_data, active_propname)').
# index is index of the current item in the collection.
- def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
+ # flt_flag is the result of the filtering process for this item.
+ # Note: as index and flt_flag are optional arguments, you do not have to use/declare them here if you don't
+ # need them.
+ def draw_item(self, context, layout, data, item, icon, active_data, active_propname):
ob = data
slot = item
ma = slot.material
@@ -70,8 +74,8 @@ class UIListPanelExample(bpy.types.Panel):
# with no custom draw code, use "UI_UL_list").
layout.template_list("MATERIAL_UL_matslots_example", "", obj, "material_slots", obj, "active_material_index")
- # The second one can usually be left as an empty string. It's an additional ID used to distinguish lists in case you
- # use the same list several times in a given area.
+ # The second one can usually be left as an empty string.
+ # It's an additional ID used to distinguish lists in case you use the same list several times in a given area.
layout.template_list("MATERIAL_UL_matslots_example", "compact", obj, "material_slots",
obj, "active_material_index", type='COMPACT')
diff --git a/doc/python_api/examples/bpy.types.UIList.2.py b/doc/python_api/examples/bpy.types.UIList.2.py
new file mode 100644
index 00000000000..4e30e6895d6
--- /dev/null
+++ b/doc/python_api/examples/bpy.types.UIList.2.py
@@ -0,0 +1,160 @@
+"""
+Advanced UIList Example - Filtering and Reordering
+++++++++++++++++++++++++++++++++++++++++++++++++++
+This script is an extended version of the UIList subclass used to show vertex groups. It is not used 'as is',
+because iterating over all vertices in a 'draw' function is a very bad idea for UI performances! However, it's a good
+example of how to create/use filtering/reordering callbacks.
+"""
+import bpy
+
+
+class MESH_UL_vgroups_slow(bpy.types.UIList):
+ # Constants (flags)
+ # Be careful not to shadow FILTER_ITEM!
+ VGROUP_EMPTY = 1 << 0
+
+ # Custom properties, saved with .blend file.
+ use_filter_empty = bpy.props.BoolProperty(name="Filter Empty", default=False, options=set(),
+ description="Whether to filter empty vertex groups")
+ use_filter_empty_reverse = bpy.props.BoolProperty(name="Reverse Empty", default=False, options=set(),
+ description="Reverse empty filtering")
+ use_filter_name_reverse = bpy.props.BoolProperty(name="Reverse Name", default=False, options=set(),
+ description="Reverse name filtering")
+
+ # This allows us to have mutually exclusive options, which are also all disable-able!
+ def _gen_order_update(name1, name2):
+ def _u(self, ctxt):
+ if (getattr(self, name1)):
+ setattr(self, name2, False)
+ return _u
+ use_order_name = bpy.props.BoolProperty(name="Name", default=False, options=set(),
+ description="Sort groups by their name (case-insensitive)",
+ update=_gen_order_update("use_order_name", "use_order_importance"))
+ use_order_importance = bpy.props.BoolProperty(name="Importance", default=False, options=set(),
+ description="Sort groups by their average weight in the mesh",
+ update=_gen_order_update("use_order_importance", "use_order_name"))
+
+ # Usual draw item function.
+ def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index, flt_flag):
+ # Just in case, we do not use it here!
+ self.use_filter_invert = False
+
+ # assert(isinstance(item, bpy.types.VertexGroup)
+ vgroup = item
+ if self.layout_type in {'DEFAULT', 'COMPACT'}:
+ # Here we use one feature of new filtering feature: it can pass data to draw_item, through flt_flag
+ # parameter, which contains exactly what filter_items set in its filter list for this item!
+ # In this case, we show empty groups grayed out.
+ if flt_flag & self.VGROUP_EMPTY:
+ col = layout.column()
+ col.enabled = False
+ col.alignment = 'LEFT'
+ col.label(text=vgroup.name, translate=False, icon_value=icon)
+ else:
+ layout.label(text=vgroup.name, translate=False, icon_value=icon)
+ icon = 'LOCKED' if vgroup.lock_weight else 'UNLOCKED'
+ layout.prop(vgroup, "lock_weight", text="", icon=icon, emboss=False)
+ elif self.layout_type in {'GRID'}:
+ layout.alignment = 'CENTER'
+ if flt_flag & self.VGROUP_EMPTY:
+ layout.enabled = False
+ layout.label(text="", icon_value=icon)
+
+ def draw_filter(self, context, layout):
+ # Nothing much to say here, it's usual UI code...
+ row = layout.row()
+
+ subrow = row.row(align=True)
+ subrow.prop(self, "filter_name", text="")
+ icon = 'ZOOM_OUT' if self.use_filter_name_reverse else 'ZOOM_IN'
+ subrow.prop(self, "use_filter_name_reverse", text="", icon=icon)
+
+ subrow = row.row(align=True)
+ subrow.prop(self, "use_filter_empty", toggle=True)
+ icon = 'ZOOM_OUT' if self.use_filter_empty_reverse else 'ZOOM_IN'
+ subrow.prop(self, "use_filter_empty_reverse", text="", icon=icon)
+
+ row = layout.row(align=True)
+ row.label("Order by:")
+ row.prop(self, "use_order_name", toggle=True)
+ row.prop(self, "use_order_importance", toggle=True)
+ icon = 'TRIA_UP' if self.use_filter_orderby_invert else 'TRIA_DOWN'
+ row.prop(self, "use_filter_orderby_invert", text="", icon=icon)
+
+ def filter_items_empty_vgroups(self, context, vgroups):
+ # This helper function checks vgroups to find out whether they are empty, and what's their average weights.
+ # TODO: This should be RNA helper actually (a vgroup prop like "raw_data: ((vidx, vweight), etc.)").
+ # Too slow for python!
+ obj_data = context.active_object.data
+ ret = {vg.index: [True, 0.0] for vg in vgroups}
+ if hasattr(obj_data, "vertices"): # Mesh data
+ if obj_data.is_editmode:
+ import bmesh
+ bm = bmesh.from_edit_mesh(obj_data)
+ # only ever one deform weight layer
+ dvert_lay = bm.verts.layers.deform.active
+ fact = 1 / len(bm.verts)
+ if dvert_lay:
+ for v in bm.verts:
+ for vg_idx, vg_weight in v[dvert_lay].items():
+ ret[vg_idx][0] = False
+ ret[vg_idx][1] += vg_weight * fact
+ else:
+ fact = 1 / len(obj_data.vertices)
+ for v in obj_data.vertices:
+ for vg in v.groups:
+ ret[vg.group][0] = False
+ ret[vg.group][1] += vg.weight * fact
+ elif hasattr(obj_data, "points"): # Lattice data
+ # XXX no access to lattice editdata?
+ fact = 1 / len(obj_data.points)
+ for v in obj_data.points:
+ for vg in v.groups:
+ ret[vg.group][0] = False
+ ret[vg.group][1] += vg.weight * fact
+ return ret
+
+ def filter_items(self, context, data, propname):
+ # This function gets the collection property (as the usual tuple (data, propname)), and must return two lists:
+ # * The first one is for filtering, it must contain 32bit integers were self.bitflag_filter_item marks the
+ # matching item as filtered (i.e. to be shown), and 31 other bits are free for custom needs. Here we use the
+ # first one to mark VGROUP_EMPTY.
+ # * The second one is for reordering, it must return a list containing the new indices of the items (which
+ # gives us a mapping org_idx -> new_idx).
+ # Please note that the default UI_UL_list defines helper functions for common tasks (see its doc for more info).
+ # If you do not make filtering and/or ordering, return empty list(s) (this will be more efficient than
+ # returning full lists doing nothing!).
+ vgroups = getattr(data, propname)
+ helper_funcs = bpy.types.UI_UL_list
+
+ # Default return values.
+ flt_flags = []
+ flt_neworder = []
+
+ # Pre-compute of vgroups data, CPU-intensive. :/
+ vgroups_empty = self.filter_items_empty_vgroups(context, vgroups)
+
+ # Filtering by name
+ if self.filter_name:
+ flt_flags = helper_funcs.filter_items_by_name(self.filter_name, self.bitflag_filter_item, vgroups, "name",
+ reverse=self.use_filter_name_reverse)
+ if not flt_flags:
+ flt_flags = [self.bitflag_filter_item] * len(vgroups)
+
+ # Filter by emptiness.
+ for idx, vg in enumerate(vgroups):
+ if vgroups_empty[vg.index][0]:
+ flt_flags[idx] |= self.VGROUP_EMPTY
+ if self.use_filter_empty and self.use_filter_empty_reverse:
+ flt_flags[idx] &= ~self.bitflag_filter_item
+ elif self.use_filter_empty and not self.use_filter_empty_reverse:
+ flt_flags[idx] &= ~self.bitflag_filter_item
+
+ # Reorder by name or average weight.
+ if self.use_order_name:
+ flt_neworder = helper_funcs.sort_items_by_name(vgroups, "name")
+ elif self.use_order_importance:
+ _sort = [(idx, vgroups_empty[vg.index][1]) for idx, vg in enumerate(vgroups)]
+ flt_neworder = helper_funcs.sort_items_helper(_sort, lambda e: e[1], True)
+
+ return flt_flags, flt_neworder
diff --git a/doc/python_api/examples/bpy.types.WindowManager.popup_menu.py b/doc/python_api/examples/bpy.types.WindowManager.popup_menu.py
index df591521440..8d2e101be5f 100644
--- a/doc/python_api/examples/bpy.types.WindowManager.popup_menu.py
+++ b/doc/python_api/examples/bpy.types.WindowManager.popup_menu.py
@@ -1,6 +1,4 @@
"""
-Popup Menus
-+++++++++++
Popup menus can be useful for creating menus without having to register menu classes.
Note that they will not block the scripts execution, so the caller can't wait for user input.
diff --git a/doc/python_api/examples/bpy.types.bpy_prop_collection.foreach_get.py b/doc/python_api/examples/bpy.types.bpy_prop_collection.foreach_get.py
new file mode 100644
index 00000000000..05163b332a9
--- /dev/null
+++ b/doc/python_api/examples/bpy.types.bpy_prop_collection.foreach_get.py
@@ -0,0 +1,11 @@
+"""
+Only works for 'basic type' properties (bool, int and float)!
+Multi-dimensional arrays (like array of vectors) will be flattened into seq.
+"""
+
+collection.foreach_get(attr, some_seq)
+
+# Python equivalent
+for i in range(len(seq)):
+ some_seq[i] = getattr(collection[i], attr)
+
diff --git a/doc/python_api/examples/bpy.types.bpy_prop_collection.foreach_set.py b/doc/python_api/examples/bpy.types.bpy_prop_collection.foreach_set.py
new file mode 100644
index 00000000000..06ed4840b24
--- /dev/null
+++ b/doc/python_api/examples/bpy.types.bpy_prop_collection.foreach_set.py
@@ -0,0 +1,11 @@
+"""
+Only works for 'basic type' properties (bool, int and float)!
+seq must be uni-dimensional, multi-dimensional arrays (like array of vectors) will be re-created from it.
+"""
+
+collection.foreach_set(attr, some_seq)
+
+# Python equivalent
+for i in range(len(some_seq)):
+ setattr(collection[i], attr, some_seq[i])
+
diff --git a/doc/python_api/rst/bge.logic.rst b/doc/python_api/rst/bge.logic.rst
index 3a79d32d917..0ddae476e08 100644
--- a/doc/python_api/rst/bge.logic.rst
+++ b/doc/python_api/rst/bge.logic.rst
@@ -127,7 +127,9 @@ Variables
.. data:: joysticks
- A list of attached :class:`~bge.types.SCA_PythonJoystick`s. The list size is the maximum number of supported joysticks. If no joystick is available for a given slot, the slot is set to None.
+ A list of attached :class:`~bge.types.SCA_PythonJoystick`.
+ The list size is the maximum number of supported joysticks.
+ If no joystick is available for a given slot, the slot is set to None.
*****************
General functions
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_GameObject.rst b/doc/python_api/rst/bge_types/bge.types.KX_GameObject.rst
index 3be148556ef..5d699637eb7 100644
--- a/doc/python_api/rst/bge_types/bge.types.KX_GameObject.rst
+++ b/doc/python_api/rst/bge_types/bge.types.KX_GameObject.rst
@@ -134,6 +134,12 @@ base class --- :class:`SCA_IObject`
:type: :class:`KX_GameObject` or None
+ .. attribute:: collisionCallbacks
+
+ A list of callables to be run when a collision occurs.
+
+ :type: list
+
.. attribute:: scene
The object's scene. (read-only).
diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py
index 3152685485a..e95fa6fef35 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -466,7 +466,9 @@ ClassMethodDescriptorType = type(dict.__dict__['fromkeys'])
MethodDescriptorType = type(dict.get)
GetSetDescriptorType = type(int.real)
StaticMethodType = type(staticmethod(lambda: None))
-from types import MemberDescriptorType
+from types import (MemberDescriptorType,
+ MethodType,
+ )
_BPY_STRUCT_FAKE = "bpy_struct"
_BPY_PROP_COLLECTION_FAKE = "bpy_prop_collection"
@@ -482,6 +484,9 @@ def is_struct_seq(value):
def undocumented_message(module_name, type_name, identifier):
+ return "Undocumented"
+
+ """
if str(type_name).startswith('<module'):
preloadtitle = '%s.%s' % (module_name, identifier)
else:
@@ -494,6 +499,7 @@ def undocumented_message(module_name, type_name, identifier):
"&preload=Dev:2.5/Py/API/Generating_API_Reference/Contribute/Howto-message"
"&preloadtitle=%s>`_)\n\n" % preloadtitle)
return message
+ """
def range_str(val):
@@ -625,12 +631,12 @@ def pymethod2sphinx(ident, fw, identifier, py_func):
fw("\n")
-def pyfunc2sphinx(ident, fw, identifier, py_func, is_class=True):
+def pyfunc2sphinx(ident, fw, module_name, type_name, identifier, py_func, is_class=True):
'''
function or class method to sphinx
'''
- if type(py_func) == type(bpy.types.Space.draw_handler_add):
+ if type(py_func) == MethodType:
return
arg_str = inspect.formatargspec(*inspect.getargspec(py_func))
@@ -653,6 +659,11 @@ def pyfunc2sphinx(ident, fw, identifier, py_func, is_class=True):
write_indented_lines(ident + " ", fw, py_func.__doc__)
fw("\n")
+ if is_class:
+ write_example_ref(ident + " ", fw, module_name + "." + type_name + "." + identifier)
+ else:
+ write_example_ref(ident + " ", fw, module_name + "." + identifier)
+
def py_descr2sphinx(ident, fw, descr, module_name, type_name, identifier):
if identifier.startswith("_"):
@@ -863,7 +874,7 @@ def pymodule2sphinx(basepath, module_name, module, title):
for attribute, value, value_type in module_dir_value_type:
if value_type == types.FunctionType:
- pyfunc2sphinx("", fw, attribute, value, is_class=False)
+ pyfunc2sphinx("", fw, module_name, None, attribute, value, is_class=False)
elif value_type in (types.BuiltinMethodType, types.BuiltinFunctionType): # both the same at the moment but to be future proof
# note: can't get args from these, so dump the string as is
# this means any module used like this must have fully formatted docstrings.
@@ -1312,7 +1323,7 @@ def pyrna2sphinx(basepath):
py_func = None
for identifier, py_func in py_funcs:
- pyfunc2sphinx(" ", fw, identifier, py_func, is_class=True)
+ pyfunc2sphinx(" ", fw, "bpy.types", struct_id, identifier, py_func, is_class=True)
del py_funcs, py_func
py_funcs = struct.get_py_c_functions()
diff --git a/extern/bullet2/CMakeLists.txt b/extern/bullet2/CMakeLists.txt
index 02ca2cd3755..2b2c18c0685 100644
--- a/extern/bullet2/CMakeLists.txt
+++ b/extern/bullet2/CMakeLists.txt
@@ -67,6 +67,8 @@ set(SRC
src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp
src/BulletCollision/CollisionDispatch/btUnionFind.cpp
src/BulletCollision/CollisionDispatch/SphereTriangleDetector.cpp
+ src/BulletCollision/CollisionDispatch/btCompoundCompoundCollisionAlgorithm.cpp
+ src/BulletCollision/CollisionDispatch/btHashedSimplePairCache.cpp
src/BulletCollision/CollisionShapes/btBoxShape.cpp
src/BulletCollision/CollisionShapes/btBox2dShape.cpp
src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp
@@ -140,6 +142,7 @@ set(SRC
src/BulletDynamics/ConstraintSolver/btTypedConstraint.cpp
src/BulletDynamics/ConstraintSolver/btUniversalConstraint.cpp
src/BulletDynamics/ConstraintSolver/btGearConstraint.cpp
+ src/BulletDynamics/ConstraintSolver/btFixedConstraint.cpp
src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp
src/BulletDynamics/Dynamics/btRigidBody.cpp
src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp
@@ -147,6 +150,15 @@ set(SRC
src/BulletDynamics/Vehicle/btRaycastVehicle.cpp
src/BulletDynamics/Vehicle/btWheelInfo.cpp
src/BulletDynamics/Character/btKinematicCharacterController.cpp
+ src/BulletDynamics/Featherstone/btMultiBody.cpp
+ src/BulletDynamics/Featherstone/btMultiBodyConstraint.cpp
+ src/BulletDynamics/Featherstone/btMultiBodyConstraintSolver.cpp
+ src/BulletDynamics/Featherstone/btMultiBodyDynamicsWorld.cpp
+ src/BulletDynamics/Featherstone/btMultiBodyJointLimitConstraint.cpp
+ src/BulletDynamics/Featherstone/btMultiBodyJointMotor.cpp
+ src/BulletDynamics/Featherstone/btMultiBodyPoint2Point.cpp
+ src/BulletDynamics/MLCPSolvers/btDantzigLCP.cpp
+ src/BulletDynamics/MLCPSolvers/btMLCPSolver.cpp
src/BulletSoftBody/btSoftBody.cpp
src/BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.cpp
@@ -204,6 +216,8 @@ set(SRC
src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h
src/BulletCollision/CollisionDispatch/btUnionFind.h
src/BulletCollision/CollisionDispatch/SphereTriangleDetector.h
+ src/BulletCollision/CollisionDispatch/btCompoundCompoundCollisionAlgorithm.h
+ src/BulletCollision/CollisionDispatch/btHashedSimplePairCache.h
src/BulletCollision/CollisionShapes/btBoxShape.h
src/BulletCollision/CollisionShapes/btBox2dShape.h
src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h
@@ -308,6 +322,7 @@ set(SRC
src/BulletDynamics/ConstraintSolver/btTypedConstraint.h
src/BulletDynamics/ConstraintSolver/btUniversalConstraint.h
src/BulletDynamics/ConstraintSolver/btGearConstraint.h
+ src/BulletDynamics/ConstraintSolver/btFixedConstraint.h
src/BulletDynamics/Dynamics/btActionInterface.h
src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h
src/BulletDynamics/Dynamics/btDynamicsWorld.h
@@ -318,6 +333,22 @@ set(SRC
src/BulletDynamics/Vehicle/btWheelInfo.h
src/BulletDynamics/Character/btCharacterControllerInterface.h
src/BulletDynamics/Character/btKinematicCharacterController.h
+ src/BulletDynamics/Featherstone/btMultiBody.h
+ src/BulletDynamics/Featherstone/btMultiBodyConstraint.h
+ src/BulletDynamics/Featherstone/btMultiBodyConstraintSolver.h
+ src/BulletDynamics/Featherstone/btMultiBodyDynamicsWorld.h
+ src/BulletDynamics/Featherstone/btMultiBodyJointLimitConstraint.h
+ src/BulletDynamics/Featherstone/btMultiBodyJointMotor.h
+ src/BulletDynamics/Featherstone/btMultiBodyLink.h
+ src/BulletDynamics/Featherstone/btMultiBodyLinkCollider.h
+ src/BulletDynamics/Featherstone/btMultiBodyPoint2Point.h
+ src/BulletDynamics/Featherstone/btMultiBodySolverConstraint.h
+ src/BulletDynamics/MLCPSolvers/btDantzigLCP.h
+ src/BulletDynamics/MLCPSolvers/btDantzigSolver.h
+ src/BulletDynamics/MLCPSolvers/btMLCPSolver.h
+ src/BulletDynamics/MLCPSolvers/btMLCPSolverInterface.h
+ src/BulletDynamics/MLCPSolvers/btPATHSolver.h
+ src/BulletDynamics/MLCPSolvers/btSolveProjectedGaussSeidel.h
src/BulletSoftBody/btSoftBody.h
src/BulletSoftBody/btSoftBodyInternals.h
@@ -359,6 +390,7 @@ set(SRC
src/LinearMath/btTransformUtil.h
src/LinearMath/btVector3.h
src/LinearMath/btPolarDecomposition.h
+ src/LinearMath/btMatrixX.h
src/btBulletCollisionCommon.h
diff --git a/extern/bullet2/patches/ghost_character.patch b/extern/bullet2/patches/ghost_character.patch
deleted file mode 100644
index d4098cb8bc2..00000000000
--- a/extern/bullet2/patches/ghost_character.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Index: extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.cpp
-===================================================================
---- extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.cpp (revision 49183)
-+++ extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.cpp (working copy)
-@@ -77,6 +77,9 @@
- if (convexResult.m_hitCollisionObject == m_me)
- return btScalar(1.0);
-
-+ if (!convexResult.m_hitCollisionObject->hasContactResponse())
-+ return btScalar(1.0);
-+
- btVector3 hitNormalWorld;
- if (normalInWorldSpace)
- {
-@@ -173,7 +176,12 @@
- m_manifoldArray.resize(0);
-
- btBroadphasePair* collisionPair = &m_ghostObject->getOverlappingPairCache()->getOverlappingPairArray()[i];
--
-+ btCollisionObject* obj0 = static_cast<btCollisionObject*>(collisionPair->m_pProxy0->m_clientObject);
-+ btCollisionObject* obj1 = static_cast<btCollisionObject*>(collisionPair->m_pProxy1->m_clientObject);
-+
-+ if ((obj0 && !obj0->hasContactResponse()) || (obj1 && !obj1->hasContactResponse()))
-+ continue;
-+
- if (collisionPair->m_algorithm)
- collisionPair->m_algorithm->getAllContactManifolds(m_manifoldArray);
-
diff --git a/extern/bullet2/readme.txt b/extern/bullet2/readme.txt
index dd806d40fac..33430fc8ee3 100644
--- a/extern/bullet2/readme.txt
+++ b/extern/bullet2/readme.txt
@@ -7,8 +7,5 @@ Erwin
Apply patches/ghost_softbody.patch to prevent softbodies being hit by ghost objects.
Originally committed in blender svn revision: 43905.
-Apply patches/ghost_character.patch to prevent characters from colliding with ghost objects.
-Mitchell
-
Apply patches/convex_hull.patch to add access to the convex hull
operation, used in the BMesh convex hull operator.
diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDispatcher.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDispatcher.h
index 1ebb37797d9..89c307d14ca 100644
--- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDispatcher.h
+++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDispatcher.h
@@ -25,7 +25,6 @@ class btOverlappingPairCache;
struct btCollisionObjectWrapper;
class btPersistentManifold;
-class btStackAlloc;
class btPoolAllocator;
struct btDispatcherInfo
@@ -47,8 +46,7 @@ struct btDispatcherInfo
m_useEpa(true),
m_allowedCcdPenetration(btScalar(0.04)),
m_useConvexConservativeDistanceUtil(false),
- m_convexConservativeDistanceThreshold(0.0f),
- m_stackAllocator(0)
+ m_convexConservativeDistanceThreshold(0.0f)
{
}
@@ -64,7 +62,6 @@ struct btDispatcherInfo
btScalar m_allowedCcdPenetration;
bool m_useConvexConservativeDistanceUtil;
btScalar m_convexConservativeDistanceThreshold;
- btStackAlloc* m_stackAllocator;
};
///The btDispatcher interface class can be used in combination with broadphase to dispatch calculations for overlapping pairs.
diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp
index 041bbe05ae2..ae22dadc73a 100644
--- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp
+++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp
@@ -53,7 +53,7 @@ btHashedOverlappingPairCache::~btHashedOverlappingPairCache()
void btHashedOverlappingPairCache::cleanOverlappingPair(btBroadphasePair& pair,btDispatcher* dispatcher)
{
- if (pair.m_algorithm)
+ if (pair.m_algorithm && dispatcher)
{
{
pair.m_algorithm->~btCollisionAlgorithm();
diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h
index 7a3806c1d28..eee90e473a9 100644
--- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h
+++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h
@@ -96,6 +96,12 @@ class btHashedOverlappingPairCache : public btOverlappingPairCache
btOverlapFilterCallback* m_overlapFilterCallback;
bool m_blockedForChanges;
+protected:
+
+ btAlignedObjectArray<int> m_hashTable;
+ btAlignedObjectArray<int> m_next;
+ btOverlappingPairCallback* m_ghostPairCallback;
+
public:
btHashedOverlappingPairCache();
@@ -265,11 +271,6 @@ private:
virtual void sortOverlappingPairs(btDispatcher* dispatcher);
-protected:
-
- btAlignedObjectArray<int> m_hashTable;
- btAlignedObjectArray<int> m_next;
- btOverlappingPairCallback* m_ghostPairCallback;
};
diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionConfiguration.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionConfiguration.h
index f63e0923b78..66949849448 100644
--- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionConfiguration.h
+++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionConfiguration.h
@@ -18,7 +18,6 @@ subject to the following restrictions:
struct btCollisionAlgorithmCreateFunc;
-class btStackAlloc;
class btPoolAllocator;
///btCollisionConfiguration allows to configure Bullet collision detection
@@ -38,7 +37,6 @@ public:
virtual btPoolAllocator* getCollisionAlgorithmPool() = 0;
- virtual btStackAlloc* getStackAllocator() = 0;
virtual btCollisionAlgorithmCreateFunc* getCollisionAlgorithmCreateFunc(int proxyType0,int proxyType1) =0;
diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.cpp
index cf8ed59a541..d0924100058 100644
--- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.cpp
+++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.cpp
@@ -38,7 +38,8 @@ btCollisionObject::btCollisionObject()
m_hitFraction(btScalar(1.)),
m_ccdSweptSphereRadius(btScalar(0.)),
m_ccdMotionThreshold(btScalar(0.)),
- m_checkCollideWith(false)
+ m_checkCollideWith(false),
+ m_updateRevision(0)
{
m_worldTransform.setIdentity();
}
diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h
index 2f17967fe0f..89cad168210 100644
--- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h
+++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h
@@ -92,7 +92,11 @@ protected:
int m_internalType;
///users can point to their objects, m_userPointer is not used by Bullet, see setUserPointer/getUserPointer
- void* m_userObjectPointer;
+ union
+ {
+ void* m_userObjectPointer;
+ int m_userIndex;
+ };
///time of impact calculation
btScalar m_hitFraction;
@@ -106,6 +110,9 @@ protected:
/// If some object should have elaborate collision filtering by sub-classes
int m_checkCollideWith;
+ ///internal update revision number. It will be increased when the object changes. This allows some subsystems to perform lazy evaluation.
+ int m_updateRevision;
+
virtual bool checkCollideWithOverride(const btCollisionObject* /* co */) const
{
return true;
@@ -135,7 +142,8 @@ public:
CO_GHOST_OBJECT=4,
CO_SOFT_BODY=8,
CO_HF_FLUID=16,
- CO_USER_TYPE=32
+ CO_USER_TYPE=32,
+ CO_FEATHERSTONE_LINK=64
};
enum AnisotropicFrictionFlags
@@ -202,6 +210,7 @@ public:
virtual void setCollisionShape(btCollisionShape* collisionShape)
{
+ m_updateRevision++;
m_collisionShape = collisionShape;
m_rootCollisionShape = collisionShape;
}
@@ -257,6 +266,7 @@ public:
void setRestitution(btScalar rest)
{
+ m_updateRevision++;
m_restitution = rest;
}
btScalar getRestitution() const
@@ -265,6 +275,7 @@ public:
}
void setFriction(btScalar frict)
{
+ m_updateRevision++;
m_friction = frict;
}
btScalar getFriction() const
@@ -274,6 +285,7 @@ public:
void setRollingFriction(btScalar frict)
{
+ m_updateRevision++;
m_rollingFriction = frict;
}
btScalar getRollingFriction() const
@@ -300,6 +312,7 @@ public:
void setWorldTransform(const btTransform& worldTrans)
{
+ m_updateRevision++;
m_worldTransform = worldTrans;
}
@@ -332,16 +345,19 @@ public:
void setInterpolationWorldTransform(const btTransform& trans)
{
+ m_updateRevision++;
m_interpolationWorldTransform = trans;
}
void setInterpolationLinearVelocity(const btVector3& linvel)
{
+ m_updateRevision++;
m_interpolationLinearVelocity = linvel;
}
void setInterpolationAngularVelocity(const btVector3& angvel)
{
+ m_updateRevision++;
m_interpolationAngularVelocity = angvel;
}
@@ -431,13 +447,28 @@ public:
{
return m_userObjectPointer;
}
-
+
+ int getUserIndex() const
+ {
+ return m_userIndex;
+ }
///users can point to their objects, userPointer is not used by Bullet
void setUserPointer(void* userPointer)
{
m_userObjectPointer = userPointer;
}
+ ///users can point to their objects, userPointer is not used by Bullet
+ void setUserIndex(int index)
+ {
+ m_userIndex = index;
+ }
+
+ int getUpdateRevisionInternal() const
+ {
+ return m_updateRevision;
+ }
+
inline bool checkCollideWith(const btCollisionObject* co) const
{
diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp
index 4c09291692d..093c6f9b200 100644
--- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp
+++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp
@@ -31,11 +31,10 @@ subject to the following restrictions:
#include "BulletCollision/BroadphaseCollision/btDbvt.h"
#include "LinearMath/btAabbUtil2.h"
#include "LinearMath/btQuickprof.h"
-#include "LinearMath/btStackAlloc.h"
#include "LinearMath/btSerializer.h"
#include "BulletCollision/CollisionShapes/btConvexPolyhedron.h"
#include "BulletCollision/CollisionDispatch/btCollisionObjectWrapper.h"
-
+#include "BulletCollision/Gimpact/btGImpactShape.h"
//#define DISABLE_DBVT_COMPOUNDSHAPE_RAYCAST_ACCELERATION
@@ -73,8 +72,6 @@ m_broadphasePairCache(pairCache),
m_debugDrawer(0),
m_forceUpdateAllAabbs(true)
{
- m_stackAlloc = collisionConfiguration->getStackAllocator();
- m_dispatchInfo.m_stackAllocator = m_stackAlloc;
}
@@ -290,13 +287,19 @@ void btCollisionWorld::rayTestSingleInternal(const btTransform& rayFromTrans,con
btConvexShape* convexShape = (btConvexShape*) collisionShape;
btVoronoiSimplexSolver simplexSolver;
-#define USE_SUBSIMPLEX_CONVEX_CAST 1
-#ifdef USE_SUBSIMPLEX_CONVEX_CAST
- btSubsimplexConvexCast convexCaster(castShape,convexShape,&simplexSolver);
-#else
- //btGjkConvexCast convexCaster(castShape,convexShape,&simplexSolver);
+ btSubsimplexConvexCast subSimplexConvexCaster(castShape,convexShape,&simplexSolver);
+
+ btGjkConvexCast gjkConvexCaster(castShape,convexShape,&simplexSolver);
+
//btContinuousConvexCollision convexCaster(castShape,convexShape,&simplexSolver,0);
-#endif //#USE_SUBSIMPLEX_CONVEX_CAST
+ bool condition = true;
+ btConvexCast* convexCasterPtr = 0;
+ if (resultCallback.m_flags & btTriangleRaycastCallback::kF_UseSubSimplexConvexCastRaytest)
+ convexCasterPtr = &subSimplexConvexCaster;
+ else
+ convexCasterPtr = &gjkConvexCaster;
+
+ btConvexCast& convexCaster = *convexCasterPtr;
if (convexCaster.calcTimeOfImpact(rayFromTrans,rayToTrans,colObjWorldTransform,colObjWorldTransform,castResult))
{
@@ -328,34 +331,26 @@ void btCollisionWorld::rayTestSingleInternal(const btTransform& rayFromTrans,con
} else {
if (collisionShape->isConcave())
{
- // BT_PROFILE("rayTestConcave");
- if (collisionShape->getShapeType()==TRIANGLE_MESH_SHAPE_PROXYTYPE)
- {
- ///optimized version for btBvhTriangleMeshShape
- btBvhTriangleMeshShape* triangleMesh = (btBvhTriangleMeshShape*)collisionShape;
- btTransform worldTocollisionObject = colObjWorldTransform.inverse();
- btVector3 rayFromLocal = worldTocollisionObject * rayFromTrans.getOrigin();
- btVector3 rayToLocal = worldTocollisionObject * rayToTrans.getOrigin();
- //ConvexCast::CastResult
+ //ConvexCast::CastResult
struct BridgeTriangleRaycastCallback : public btTriangleRaycastCallback
{
btCollisionWorld::RayResultCallback* m_resultCallback;
const btCollisionObject* m_collisionObject;
- btTriangleMeshShape* m_triangleMesh;
+ const btConcaveShape* m_triangleMesh;
btTransform m_colObjWorldTransform;
BridgeTriangleRaycastCallback( const btVector3& from,const btVector3& to,
- btCollisionWorld::RayResultCallback* resultCallback, const btCollisionObject* collisionObject,btTriangleMeshShape* triangleMesh,const btTransform& colObjWorldTransform):
- //@BP Mod
- btTriangleRaycastCallback(from,to, resultCallback->m_flags),
- m_resultCallback(resultCallback),
- m_collisionObject(collisionObject),
- m_triangleMesh(triangleMesh),
- m_colObjWorldTransform(colObjWorldTransform)
- {
- }
+ btCollisionWorld::RayResultCallback* resultCallback, const btCollisionObject* collisionObject,const btConcaveShape* triangleMesh,const btTransform& colObjWorldTransform):
+ //@BP Mod
+ btTriangleRaycastCallback(from,to, resultCallback->m_flags),
+ m_resultCallback(resultCallback),
+ m_collisionObject(collisionObject),
+ m_triangleMesh(triangleMesh),
+ m_colObjWorldTransform(colObjWorldTransform)
+ {
+ }
virtual btScalar reportHit(const btVector3& hitNormalLocal, btScalar hitFraction, int partId, int triangleIndex )
@@ -378,10 +373,28 @@ void btCollisionWorld::rayTestSingleInternal(const btTransform& rayFromTrans,con
};
+ btTransform worldTocollisionObject = colObjWorldTransform.inverse();
+ btVector3 rayFromLocal = worldTocollisionObject * rayFromTrans.getOrigin();
+ btVector3 rayToLocal = worldTocollisionObject * rayToTrans.getOrigin();
+
+ // BT_PROFILE("rayTestConcave");
+ if (collisionShape->getShapeType()==TRIANGLE_MESH_SHAPE_PROXYTYPE)
+ {
+ ///optimized version for btBvhTriangleMeshShape
+ btBvhTriangleMeshShape* triangleMesh = (btBvhTriangleMeshShape*)collisionShape;
+
BridgeTriangleRaycastCallback rcb(rayFromLocal,rayToLocal,&resultCallback,collisionObjectWrap->getCollisionObject(),triangleMesh,colObjWorldTransform);
rcb.m_hitFraction = resultCallback.m_closestHitFraction;
triangleMesh->performRaycast(&rcb,rayFromLocal,rayToLocal);
- } else
+ }
+ else if(collisionShape->getShapeType()==GIMPACT_SHAPE_PROXYTYPE)
+ {
+ btGImpactMeshShape* concaveShape = (btGImpactMeshShape*)collisionShape;
+
+ BridgeTriangleRaycastCallback rcb(rayFromLocal,rayToLocal,&resultCallback,collisionObjectWrap->getCollisionObject(),concaveShape, colObjWorldTransform);
+ rcb.m_hitFraction = resultCallback.m_closestHitFraction;
+ concaveShape->processAllTrianglesRay(&rcb,rayFromLocal,rayToLocal);
+ }else
{
//generic (slower) case
btConcaveShape* concaveShape = (btConcaveShape*)collisionShape;
diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.h
index 9412242e8a3..b3fffdecd98 100644
--- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.h
+++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.h
@@ -1,6 +1,6 @@
/*
Bullet Continuous Collision Detection and Physics Library
-Copyright (c) 2003-2006 Erwin Coumans http://bulletphysics.com/Bullet/
+Copyright (c) 2003-2013 Erwin Coumans http://bulletphysics.org
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
@@ -18,13 +18,11 @@ subject to the following restrictions:
* @mainpage Bullet Documentation
*
* @section intro_sec Introduction
- * Bullet Collision Detection & Physics SDK
- *
* Bullet is a Collision Detection and Rigid Body Dynamics Library. The Library is Open Source and free for commercial use, under the ZLib license ( http://opensource.org/licenses/zlib-license.php ).
*
* The main documentation is Bullet_User_Manual.pdf, included in the source code distribution.
* There is the Physics Forum for feedback and general Collision Detection and Physics discussions.
- * Please visit http://www.bulletphysics.com
+ * Please visit http://www.bulletphysics.org
*
* @section install_sec Installation
*
@@ -32,7 +30,16 @@ subject to the following restrictions:
* You can download the Bullet Physics Library from the Google Code repository: http://code.google.com/p/bullet/downloads/list
*
* @subsection step2 Step 2: Building
- * Bullet main build system for all platforms is cmake, you can download http://www.cmake.org
+ * Bullet has multiple build systems, including premake, cmake and autotools. Premake and cmake support all platforms.
+ * Premake is included in the Bullet/build folder for Windows, Mac OSX and Linux.
+ * Under Windows you can click on Bullet/build/vs2010.bat to create Microsoft Visual Studio projects.
+ * On Mac OSX and Linux you can open a terminal and generate Makefile, codeblocks or Xcode4 projects:
+ * cd Bullet/build
+ * ./premake4_osx gmake or ./premake4_linux gmake or ./premake4_linux64 gmake or (for Mac) ./premake4_osx xcode4
+ * cd Bullet/build/gmake
+ * make
+ *
+ * An alternative to premake is cmake. You can download cmake from http://www.cmake.org
* cmake can autogenerate projectfiles for Microsoft Visual Studio, Apple Xcode, KDevelop and Unix Makefiles.
* The easiest is to run the CMake cmake-gui graphical user interface and choose the options and generate projectfiles.
* You can also use cmake in the command-line. Here are some examples for various platforms:
@@ -65,7 +72,6 @@ subject to the following restrictions:
#ifndef BT_COLLISION_WORLD_H
#define BT_COLLISION_WORLD_H
-class btStackAlloc;
class btCollisionShape;
class btConvexShape;
class btBroadphaseInterface;
@@ -91,8 +97,6 @@ protected:
btDispatcherInfo m_dispatchInfo;
- btStackAlloc* m_stackAlloc;
-
btBroadphaseInterface* m_broadphasePairCache;
btIDebugDraw* m_debugDrawer;
diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp
index 39b86a28918..991841ee20b 100644
--- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp
+++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp
@@ -11,6 +11,7 @@ subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
+
*/
#include "BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h"
@@ -22,6 +23,8 @@ subject to the following restrictions:
#include "btManifoldResult.h"
#include "BulletCollision/CollisionDispatch/btCollisionObjectWrapper.h"
+btShapePairCallback gCompoundChildShapePairCallback = 0;
+
btCompoundCollisionAlgorithm::btCompoundCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci,const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap,bool isSwapped)
:btActivatingCollisionAlgorithm(ci,body0Wrap,body1Wrap),
m_isSwapped(isSwapped),
@@ -129,6 +132,12 @@ public:
childShape->getAabb(newChildWorldTrans,aabbMin0,aabbMax0);
m_otherObjWrap->getCollisionShape()->getAabb(m_otherObjWrap->getWorldTransform(),aabbMin1,aabbMax1);
+ if (gCompoundChildShapePairCallback)
+ {
+ if (!gCompoundChildShapePairCallback(m_otherObjWrap->getCollisionShape(), childShape))
+ return;
+ }
+
if (TestAabbAgainstAabb2(aabbMin0,aabbMax0,aabbMin1,aabbMax1))
{
diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h
index b16fc524672..53675145637 100644
--- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h
+++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h
@@ -11,6 +11,7 @@ subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
+
*/
#ifndef BT_COMPOUND_COLLISION_ALGORITHM_H
@@ -28,6 +29,10 @@ class btDispatcher;
class btDispatcher;
class btCollisionObject;
+class btCollisionShape;
+typedef bool (*btShapePairCallback)(const btCollisionShape* pShape0, const btCollisionShape* pShape1);
+extern btShapePairCallback gCompoundChildShapePairCallback;
+
/// btCompoundCollisionAlgorithm supports collision between CompoundCollisionShapes and other collision shapes
class btCompoundCollisionAlgorithm : public btActivatingCollisionAlgorithm
{
@@ -37,6 +42,7 @@ class btCompoundCollisionAlgorithm : public btActivatingCollisionAlgorithm
class btPersistentManifold* m_sharedManifold;
bool m_ownsManifold;
+
int m_compoundShapeRevision;//to keep track of changes, so that childAlgorithm array can be updated
void removeChildAlgorithms();
@@ -49,6 +55,12 @@ public:
virtual ~btCompoundCollisionAlgorithm();
+ btCollisionAlgorithm* getChildAlgorithm (int n) const
+ {
+ return m_childCollisionAlgorithms[n];
+ }
+
+
virtual void processCollision (const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
@@ -63,6 +75,7 @@ public:
}
}
+
struct CreateFunc :public btCollisionAlgorithmCreateFunc
{
virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap)
diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCompoundCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCompoundCollisionAlgorithm.cpp
new file mode 100644
index 00000000000..a52dd34fe91
--- /dev/null
+++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCompoundCollisionAlgorithm.cpp
@@ -0,0 +1,421 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2013 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
+*/
+
+#include "btCompoundCompoundCollisionAlgorithm.h"
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+#include "BulletCollision/CollisionShapes/btCompoundShape.h"
+#include "BulletCollision/BroadphaseCollision/btDbvt.h"
+#include "LinearMath/btIDebugDraw.h"
+#include "LinearMath/btAabbUtil2.h"
+#include "BulletCollision/CollisionDispatch/btManifoldResult.h"
+#include "BulletCollision/CollisionDispatch/btCollisionObjectWrapper.h"
+
+
+btShapePairCallback gCompoundCompoundChildShapePairCallback = 0;
+
+btCompoundCompoundCollisionAlgorithm::btCompoundCompoundCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci,const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap,bool isSwapped)
+:btActivatingCollisionAlgorithm(ci,body0Wrap,body1Wrap),
+m_sharedManifold(ci.m_manifold)
+{
+ m_ownsManifold = false;
+
+ void* ptr = btAlignedAlloc(sizeof(btHashedSimplePairCache),16);
+ m_childCollisionAlgorithmCache= new(ptr) btHashedSimplePairCache();
+
+ const btCollisionObjectWrapper* col0ObjWrap = body0Wrap;
+ btAssert (col0ObjWrap->getCollisionShape()->isCompound());
+
+ const btCollisionObjectWrapper* col1ObjWrap = body1Wrap;
+ btAssert (col1ObjWrap->getCollisionShape()->isCompound());
+
+ const btCompoundShape* compoundShape0 = static_cast<const btCompoundShape*>(col0ObjWrap->getCollisionShape());
+ m_compoundShapeRevision0 = compoundShape0->getUpdateRevision();
+
+ const btCompoundShape* compoundShape1 = static_cast<const btCompoundShape*>(col1ObjWrap->getCollisionShape());
+ m_compoundShapeRevision1 = compoundShape1->getUpdateRevision();
+
+
+}
+
+
+btCompoundCompoundCollisionAlgorithm::~btCompoundCompoundCollisionAlgorithm()
+{
+ removeChildAlgorithms();
+ m_childCollisionAlgorithmCache->~btHashedSimplePairCache();
+ btAlignedFree(m_childCollisionAlgorithmCache);
+}
+
+void btCompoundCompoundCollisionAlgorithm::getAllContactManifolds(btManifoldArray& manifoldArray)
+{
+ int i;
+ btSimplePairArray& pairs = m_childCollisionAlgorithmCache->getOverlappingPairArray();
+ for (i=0;i<pairs.size();i++)
+ {
+ if (pairs[i].m_userPointer)
+ {
+
+ ((btCollisionAlgorithm*)pairs[i].m_userPointer)->getAllContactManifolds(manifoldArray);
+ }
+ }
+}
+
+
+void btCompoundCompoundCollisionAlgorithm::removeChildAlgorithms()
+{
+ btSimplePairArray& pairs = m_childCollisionAlgorithmCache->getOverlappingPairArray();
+
+ int numChildren = pairs.size();
+ int i;
+ for (i=0;i<numChildren;i++)
+ {
+ if (pairs[i].m_userPointer)
+ {
+ btCollisionAlgorithm* algo = (btCollisionAlgorithm*) pairs[i].m_userPointer;
+ algo->~btCollisionAlgorithm();
+ m_dispatcher->freeCollisionAlgorithm(algo);
+ }
+ }
+ m_childCollisionAlgorithmCache->removeAllPairs();
+}
+
+struct btCompoundCompoundLeafCallback : btDbvt::ICollide
+{
+ int m_numOverlapPairs;
+
+
+ const btCollisionObjectWrapper* m_compound0ColObjWrap;
+ const btCollisionObjectWrapper* m_compound1ColObjWrap;
+ btDispatcher* m_dispatcher;
+ const btDispatcherInfo& m_dispatchInfo;
+ btManifoldResult* m_resultOut;
+
+
+ class btHashedSimplePairCache* m_childCollisionAlgorithmCache;
+
+ btPersistentManifold* m_sharedManifold;
+
+ btCompoundCompoundLeafCallback (const btCollisionObjectWrapper* compound1ObjWrap,
+ const btCollisionObjectWrapper* compound0ObjWrap,
+ btDispatcher* dispatcher,
+ const btDispatcherInfo& dispatchInfo,
+ btManifoldResult* resultOut,
+ btHashedSimplePairCache* childAlgorithmsCache,
+ btPersistentManifold* sharedManifold)
+ :m_compound0ColObjWrap(compound1ObjWrap),m_compound1ColObjWrap(compound0ObjWrap),m_dispatcher(dispatcher),m_dispatchInfo(dispatchInfo),m_resultOut(resultOut),
+ m_childCollisionAlgorithmCache(childAlgorithmsCache),
+ m_sharedManifold(sharedManifold),
+ m_numOverlapPairs(0)
+ {
+
+ }
+
+
+
+
+ void Process(const btDbvtNode* leaf0,const btDbvtNode* leaf1)
+ {
+ m_numOverlapPairs++;
+
+
+ int childIndex0 = leaf0->dataAsInt;
+ int childIndex1 = leaf1->dataAsInt;
+
+
+ btAssert(childIndex0>=0);
+ btAssert(childIndex1>=0);
+
+
+ const btCompoundShape* compoundShape0 = static_cast<const btCompoundShape*>(m_compound0ColObjWrap->getCollisionShape());
+ btAssert(childIndex0<compoundShape0->getNumChildShapes());
+
+ const btCompoundShape* compoundShape1 = static_cast<const btCompoundShape*>(m_compound1ColObjWrap->getCollisionShape());
+ btAssert(childIndex1<compoundShape1->getNumChildShapes());
+
+ const btCollisionShape* childShape0 = compoundShape0->getChildShape(childIndex0);
+ const btCollisionShape* childShape1 = compoundShape1->getChildShape(childIndex1);
+
+ //backup
+ btTransform orgTrans0 = m_compound0ColObjWrap->getWorldTransform();
+ const btTransform& childTrans0 = compoundShape0->getChildTransform(childIndex0);
+ btTransform newChildWorldTrans0 = orgTrans0*childTrans0 ;
+
+ btTransform orgTrans1 = m_compound1ColObjWrap->getWorldTransform();
+ const btTransform& childTrans1 = compoundShape1->getChildTransform(childIndex1);
+ btTransform newChildWorldTrans1 = orgTrans1*childTrans1 ;
+
+
+ //perform an AABB check first
+ btVector3 aabbMin0,aabbMax0,aabbMin1,aabbMax1;
+ childShape0->getAabb(newChildWorldTrans0,aabbMin0,aabbMax0);
+ childShape1->getAabb(newChildWorldTrans1,aabbMin1,aabbMax1);
+
+ if (gCompoundCompoundChildShapePairCallback)
+ {
+ if (!gCompoundCompoundChildShapePairCallback(childShape0,childShape1))
+ return;
+ }
+
+ if (TestAabbAgainstAabb2(aabbMin0,aabbMax0,aabbMin1,aabbMax1))
+ {
+ btCollisionObjectWrapper compoundWrap0(this->m_compound0ColObjWrap,childShape0, m_compound0ColObjWrap->getCollisionObject(),newChildWorldTrans0,-1,childIndex0);
+ btCollisionObjectWrapper compoundWrap1(this->m_compound1ColObjWrap,childShape1,m_compound1ColObjWrap->getCollisionObject(),newChildWorldTrans1,-1,childIndex1);
+
+
+ btSimplePair* pair = m_childCollisionAlgorithmCache->findPair(childIndex0,childIndex1);
+
+ btCollisionAlgorithm* colAlgo = 0;
+
+ if (pair)
+ {
+ colAlgo = (btCollisionAlgorithm*)pair->m_userPointer;
+
+ } else
+ {
+ colAlgo = m_dispatcher->findAlgorithm(&compoundWrap0,&compoundWrap1,m_sharedManifold);
+ pair = m_childCollisionAlgorithmCache->addOverlappingPair(childIndex0,childIndex1);
+ btAssert(pair);
+ pair->m_userPointer = colAlgo;
+ }
+
+ btAssert(colAlgo);
+
+ const btCollisionObjectWrapper* tmpWrap0 = 0;
+ const btCollisionObjectWrapper* tmpWrap1 = 0;
+
+ tmpWrap0 = m_resultOut->getBody0Wrap();
+ tmpWrap1 = m_resultOut->getBody1Wrap();
+
+ m_resultOut->setBody0Wrap(&compoundWrap0);
+ m_resultOut->setBody1Wrap(&compoundWrap1);
+
+ m_resultOut->setShapeIdentifiersA(-1,childIndex0);
+ m_resultOut->setShapeIdentifiersB(-1,childIndex1);
+
+
+ colAlgo->processCollision(&compoundWrap0,&compoundWrap1,m_dispatchInfo,m_resultOut);
+
+ m_resultOut->setBody0Wrap(tmpWrap0);
+ m_resultOut->setBody1Wrap(tmpWrap1);
+
+
+
+ }
+ }
+};
+
+
+static DBVT_INLINE bool MyIntersect( const btDbvtAabbMm& a,
+ const btDbvtAabbMm& b, const btTransform& xform)
+{
+ btVector3 newmin,newmax;
+ btTransformAabb(b.Mins(),b.Maxs(),0.f,xform,newmin,newmax);
+ btDbvtAabbMm newb = btDbvtAabbMm::FromMM(newmin,newmax);
+ return Intersect(a,newb);
+}
+
+
+static inline void MycollideTT( const btDbvtNode* root0,
+ const btDbvtNode* root1,
+ const btTransform& xform,
+ btCompoundCompoundLeafCallback* callback)
+{
+
+ if(root0&&root1)
+ {
+ int depth=1;
+ int treshold=btDbvt::DOUBLE_STACKSIZE-4;
+ btAlignedObjectArray<btDbvt::sStkNN> stkStack;
+ stkStack.resize(btDbvt::DOUBLE_STACKSIZE);
+ stkStack[0]=btDbvt::sStkNN(root0,root1);
+ do {
+ btDbvt::sStkNN p=stkStack[--depth];
+ if(MyIntersect(p.a->volume,p.b->volume,xform))
+ {
+ if(depth>treshold)
+ {
+ stkStack.resize(stkStack.size()*2);
+ treshold=stkStack.size()-4;
+ }
+ if(p.a->isinternal())
+ {
+ if(p.b->isinternal())
+ {
+ stkStack[depth++]=btDbvt::sStkNN(p.a->childs[0],p.b->childs[0]);
+ stkStack[depth++]=btDbvt::sStkNN(p.a->childs[1],p.b->childs[0]);
+ stkStack[depth++]=btDbvt::sStkNN(p.a->childs[0],p.b->childs[1]);
+ stkStack[depth++]=btDbvt::sStkNN(p.a->childs[1],p.b->childs[1]);
+ }
+ else
+ {
+ stkStack[depth++]=btDbvt::sStkNN(p.a->childs[0],p.b);
+ stkStack[depth++]=btDbvt::sStkNN(p.a->childs[1],p.b);
+ }
+ }
+ else
+ {
+ if(p.b->isinternal())
+ {
+ stkStack[depth++]=btDbvt::sStkNN(p.a,p.b->childs[0]);
+ stkStack[depth++]=btDbvt::sStkNN(p.a,p.b->childs[1]);
+ }
+ else
+ {
+ callback->Process(p.a,p.b);
+ }
+ }
+ }
+ } while(depth);
+ }
+}
+
+void btCompoundCompoundCollisionAlgorithm::processCollision (const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
+{
+
+ const btCollisionObjectWrapper* col0ObjWrap = body0Wrap;
+ const btCollisionObjectWrapper* col1ObjWrap= body1Wrap;
+
+ btAssert (col0ObjWrap->getCollisionShape()->isCompound());
+ btAssert (col1ObjWrap->getCollisionShape()->isCompound());
+ const btCompoundShape* compoundShape0 = static_cast<const btCompoundShape*>(col0ObjWrap->getCollisionShape());
+ const btCompoundShape* compoundShape1 = static_cast<const btCompoundShape*>(col1ObjWrap->getCollisionShape());
+
+ ///btCompoundShape might have changed:
+ ////make sure the internal child collision algorithm caches are still valid
+ if ((compoundShape0->getUpdateRevision() != m_compoundShapeRevision0) || (compoundShape1->getUpdateRevision() != m_compoundShapeRevision1))
+ {
+ ///clear all
+ removeChildAlgorithms();
+ }
+
+
+ ///we need to refresh all contact manifolds
+ ///note that we should actually recursively traverse all children, btCompoundShape can nested more then 1 level deep
+ ///so we should add a 'refreshManifolds' in the btCollisionAlgorithm
+ {
+ int i;
+ btManifoldArray manifoldArray;
+ btSimplePairArray& pairs = m_childCollisionAlgorithmCache->getOverlappingPairArray();
+ for (i=0;i<pairs.size();i++)
+ {
+ if (pairs[i].m_userPointer)
+ {
+ btCollisionAlgorithm* algo = (btCollisionAlgorithm*) pairs[i].m_userPointer;
+ algo->getAllContactManifolds(manifoldArray);
+ for (int m=0;m<manifoldArray.size();m++)
+ {
+ if (manifoldArray[m]->getNumContacts())
+ {
+ resultOut->setPersistentManifold(manifoldArray[m]);
+ resultOut->refreshContactPoints();
+ resultOut->setPersistentManifold(0);
+ }
+ }
+ manifoldArray.resize(0);
+ }
+ }
+ }
+
+
+ const btDbvt* tree0 = compoundShape0->getDynamicAabbTree();
+ const btDbvt* tree1 = compoundShape1->getDynamicAabbTree();
+
+ btCompoundCompoundLeafCallback callback(col0ObjWrap,col1ObjWrap,this->m_dispatcher,dispatchInfo,resultOut,this->m_childCollisionAlgorithmCache,m_sharedManifold);
+
+
+ const btTransform xform=col0ObjWrap->getWorldTransform().inverse()*col1ObjWrap->getWorldTransform();
+ MycollideTT(tree0->m_root,tree1->m_root,xform,&callback);
+
+ //printf("#compound-compound child/leaf overlap =%d \r",callback.m_numOverlapPairs);
+
+ //remove non-overlapping child pairs
+
+ {
+ btAssert(m_removePairs.size()==0);
+
+ //iterate over all children, perform an AABB check inside ProcessChildShape
+ btSimplePairArray& pairs = m_childCollisionAlgorithmCache->getOverlappingPairArray();
+
+ int i;
+ btManifoldArray manifoldArray;
+
+
+
+
+
+ btVector3 aabbMin0,aabbMax0,aabbMin1,aabbMax1;
+
+ for (i=0;i<pairs.size();i++)
+ {
+ if (pairs[i].m_userPointer)
+ {
+ btCollisionAlgorithm* algo = (btCollisionAlgorithm*)pairs[i].m_userPointer;
+
+ {
+ btTransform orgTrans0;
+ const btCollisionShape* childShape0 = 0;
+
+ btTransform newChildWorldTrans0;
+ btTransform orgInterpolationTrans0;
+ childShape0 = compoundShape0->getChildShape(pairs[i].m_indexA);
+ orgTrans0 = col0ObjWrap->getWorldTransform();
+ orgInterpolationTrans0 = col0ObjWrap->getWorldTransform();
+ const btTransform& childTrans0 = compoundShape0->getChildTransform(pairs[i].m_indexA);
+ newChildWorldTrans0 = orgTrans0*childTrans0 ;
+ childShape0->getAabb(newChildWorldTrans0,aabbMin0,aabbMax0);
+ }
+
+ {
+ btTransform orgInterpolationTrans1;
+ const btCollisionShape* childShape1 = 0;
+ btTransform orgTrans1;
+ btTransform newChildWorldTrans1;
+
+ childShape1 = compoundShape1->getChildShape(pairs[i].m_indexB);
+ orgTrans1 = col1ObjWrap->getWorldTransform();
+ orgInterpolationTrans1 = col1ObjWrap->getWorldTransform();
+ const btTransform& childTrans1 = compoundShape1->getChildTransform(pairs[i].m_indexB);
+ newChildWorldTrans1 = orgTrans1*childTrans1 ;
+ childShape1->getAabb(newChildWorldTrans1,aabbMin1,aabbMax1);
+ }
+
+
+
+ if (!TestAabbAgainstAabb2(aabbMin0,aabbMax0,aabbMin1,aabbMax1))
+ {
+ algo->~btCollisionAlgorithm();
+ m_dispatcher->freeCollisionAlgorithm(algo);
+ m_removePairs.push_back(btSimplePair(pairs[i].m_indexA,pairs[i].m_indexB));
+ }
+ }
+ }
+ for (int i=0;i<m_removePairs.size();i++)
+ {
+ m_childCollisionAlgorithmCache->removeOverlappingPair(m_removePairs[i].m_indexA,m_removePairs[i].m_indexB);
+ }
+ m_removePairs.clear();
+ }
+
+}
+
+btScalar btCompoundCompoundCollisionAlgorithm::calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
+{
+ btAssert(0);
+ return 0.f;
+
+}
+
+
+
diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCompoundCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCompoundCollisionAlgorithm.h
new file mode 100644
index 00000000000..7e2d7ad7085
--- /dev/null
+++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCompoundCollisionAlgorithm.h
@@ -0,0 +1,90 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2013 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
+*/
+
+#ifndef BT_COMPOUND_COMPOUND_COLLISION_ALGORITHM_H
+#define BT_COMPOUND_COMPOUND_COLLISION_ALGORITHM_H
+
+#include "BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h"
+#include "BulletCollision/BroadphaseCollision/btDispatcher.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h"
+
+#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
+class btDispatcher;
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
+#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
+#include "LinearMath/btAlignedObjectArray.h"
+#include "BulletCollision/CollisionDispatch/btHashedSimplePairCache.h"
+class btDispatcher;
+class btCollisionObject;
+
+class btCollisionShape;
+typedef bool (*btShapePairCallback)(const btCollisionShape* pShape0, const btCollisionShape* pShape1);
+extern btShapePairCallback gCompoundCompoundChildShapePairCallback;
+
+/// btCompoundCompoundCollisionAlgorithm supports collision between two btCompoundCollisionShape shapes
+class btCompoundCompoundCollisionAlgorithm : public btActivatingCollisionAlgorithm
+{
+
+ class btHashedSimplePairCache* m_childCollisionAlgorithmCache;
+ btSimplePairArray m_removePairs;
+
+ class btPersistentManifold* m_sharedManifold;
+ bool m_ownsManifold;
+
+
+ int m_compoundShapeRevision0;//to keep track of changes, so that childAlgorithm array can be updated
+ int m_compoundShapeRevision1;
+
+ void removeChildAlgorithms();
+
+// void preallocateChildAlgorithms(const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap);
+
+public:
+
+ btCompoundCompoundCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci,const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap,bool isSwapped);
+
+ virtual ~btCompoundCompoundCollisionAlgorithm();
+
+
+
+ virtual void processCollision (const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ virtual void getAllContactManifolds(btManifoldArray& manifoldArray);
+
+
+ struct CreateFunc :public btCollisionAlgorithmCreateFunc
+ {
+ virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap)
+ {
+ void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btCompoundCompoundCollisionAlgorithm));
+ return new(mem) btCompoundCompoundCollisionAlgorithm(ci,body0Wrap,body1Wrap,false);
+ }
+ };
+
+ struct SwappedCreateFunc :public btCollisionAlgorithmCreateFunc
+ {
+ virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, const btCollisionObjectWrapper* body0Wrap,const btCollisionObjectWrapper* body1Wrap)
+ {
+ void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btCompoundCompoundCollisionAlgorithm));
+ return new(mem) btCompoundCompoundCollisionAlgorithm(ci,body0Wrap,body1Wrap,true);
+ }
+ };
+
+};
+
+#endif //BT_COMPOUND_COMPOUND_COLLISION_ALGORITHM_H
diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp
index 3e1afede1bf..4ec9ae71386 100644
--- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp
+++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp
@@ -132,7 +132,6 @@ void btConvex2dConvex2dAlgorithm ::processCollision (const btCollisionObjectWrap
input.m_maximumDistanceSquared*= input.m_maximumDistanceSquared;
}
- input.m_stackAlloc = dispatchInfo.m_stackAllocator;
input.m_transformA = body0Wrap->getWorldTransform();
input.m_transformB = body1Wrap->getWorldTransform();
diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp
index 18fde771b14..e23f5f7a88d 100644
--- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp
+++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp
@@ -76,21 +76,27 @@ void btConvexTriangleCallback::clearCache()
}
-
-void btConvexTriangleCallback::processTriangle(btVector3* triangle,int partId, int triangleIndex)
+void btConvexTriangleCallback::processTriangle(btVector3* triangle,int
+partId, int triangleIndex)
{
-
- //just for debugging purposes
- //printf("triangle %d",m_triangleCount++);
+ if (!TestTriangleAgainstAabb2(triangle, m_aabbMin, m_aabbMax))
+ {
+ return;
+ }
+
+ //just for debugging purposes
+ //printf("triangle %d",m_triangleCount++);
- //aabb filter is already applied!
+ const btCollisionObject* ob = const_cast<btCollisionObject*>(m_triBodyWrap->getCollisionObject());
btCollisionAlgorithmConstructionInfo ci;
ci.m_dispatcher1 = m_dispatcher;
//const btCollisionObject* ob = static_cast<btCollisionObject*>(m_triBodyWrap->getCollisionObject());
+
+
#if 0
///debug drawing of the overlapping triangles
diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp
index 62f98a846f4..7f2722aa463 100644
--- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp
+++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp
@@ -373,7 +373,6 @@ void btConvexConvexAlgorithm ::processCollision (const btCollisionObjectWrapper*
input.m_maximumDistanceSquared*= input.m_maximumDistanceSquared;
}
- input.m_stackAlloc = dispatchInfo.m_stackAllocator;
input.m_transformA = body0Wrap->getWorldTransform();
input.m_transformB = body1Wrap->getWorldTransform();
diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp
index 7faee6faf50..c3cacec4a4f 100644
--- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp
+++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp
@@ -19,6 +19,8 @@ subject to the following restrictions:
#include "BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h"
#include "BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h"
#include "BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h"
+#include "BulletCollision/CollisionDispatch/btCompoundCompoundCollisionAlgorithm.h"
+
#include "BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.h"
#include "BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.h"
#include "BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h"
@@ -32,7 +34,6 @@ subject to the following restrictions:
-#include "LinearMath/btStackAlloc.h"
#include "LinearMath/btPoolAllocator.h"
@@ -65,6 +66,10 @@ btDefaultCollisionConfiguration::btDefaultCollisionConfiguration(const btDefault
m_swappedConvexConcaveCreateFunc = new (mem)btConvexConcaveCollisionAlgorithm::SwappedCreateFunc;
mem = btAlignedAlloc(sizeof(btCompoundCollisionAlgorithm::CreateFunc),16);
m_compoundCreateFunc = new (mem)btCompoundCollisionAlgorithm::CreateFunc;
+
+ mem = btAlignedAlloc(sizeof(btCompoundCompoundCollisionAlgorithm::CreateFunc),16);
+ m_compoundCompoundCreateFunc = new (mem)btCompoundCompoundCollisionAlgorithm::CreateFunc;
+
mem = btAlignedAlloc(sizeof(btCompoundCollisionAlgorithm::SwappedCreateFunc),16);
m_swappedCompoundCreateFunc = new (mem)btCompoundCollisionAlgorithm::SwappedCreateFunc;
mem = btAlignedAlloc(sizeof(btEmptyAlgorithm::CreateFunc),16);
@@ -106,16 +111,6 @@ btDefaultCollisionConfiguration::btDefaultCollisionConfiguration(const btDefault
collisionAlgorithmMaxElementSize = btMax(collisionAlgorithmMaxElementSize,maxSize2);
collisionAlgorithmMaxElementSize = btMax(collisionAlgorithmMaxElementSize,maxSize3);
- if (constructionInfo.m_stackAlloc)
- {
- m_ownsStackAllocator = false;
- this->m_stackAlloc = constructionInfo.m_stackAlloc;
- } else
- {
- m_ownsStackAllocator = true;
- void* mem = btAlignedAlloc(sizeof(btStackAlloc),16);
- m_stackAlloc = new(mem)btStackAlloc(constructionInfo.m_defaultStackAllocatorSize);
- }
if (constructionInfo.m_persistentManifoldPool)
{
@@ -144,12 +139,6 @@ btDefaultCollisionConfiguration::btDefaultCollisionConfiguration(const btDefault
btDefaultCollisionConfiguration::~btDefaultCollisionConfiguration()
{
- if (m_ownsStackAllocator)
- {
- m_stackAlloc->destroy();
- m_stackAlloc->~btStackAlloc();
- btAlignedFree(m_stackAlloc);
- }
if (m_ownsCollisionAlgorithmPool)
{
m_collisionAlgorithmPool->~btPoolAllocator();
@@ -172,6 +161,9 @@ btDefaultCollisionConfiguration::~btDefaultCollisionConfiguration()
m_compoundCreateFunc->~btCollisionAlgorithmCreateFunc();
btAlignedFree( m_compoundCreateFunc);
+ m_compoundCompoundCreateFunc->~btCollisionAlgorithmCreateFunc();
+ btAlignedFree(m_compoundCompoundCreateFunc);
+
m_swappedCompoundCreateFunc->~btCollisionAlgorithmCreateFunc();
btAlignedFree( m_swappedCompoundCreateFunc);
@@ -275,6 +267,12 @@ btCollisionAlgorithmCreateFunc* btDefaultCollisionConfiguration::getCollisionAlg
return m_swappedConvexConcaveCreateFunc;
}
+
+ if (btBroadphaseProxy::isCompound(proxyType0) && btBroadphaseProxy::isCompound(proxyType1))
+ {
+ return m_compoundCompoundCreateFunc;
+ }
+
if (btBroadphaseProxy::isCompound(proxyType0))
{
return m_compoundCreateFunc;
diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h
index 474785bfc7d..2078420e198 100644
--- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h
+++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h
@@ -22,23 +22,19 @@ class btConvexPenetrationDepthSolver;
struct btDefaultCollisionConstructionInfo
{
- btStackAlloc* m_stackAlloc;
btPoolAllocator* m_persistentManifoldPool;
btPoolAllocator* m_collisionAlgorithmPool;
int m_defaultMaxPersistentManifoldPoolSize;
int m_defaultMaxCollisionAlgorithmPoolSize;
int m_customCollisionAlgorithmMaxElementSize;
- int m_defaultStackAllocatorSize;
int m_useEpaPenetrationAlgorithm;
btDefaultCollisionConstructionInfo()
- :m_stackAlloc(0),
- m_persistentManifoldPool(0),
+ :m_persistentManifoldPool(0),
m_collisionAlgorithmPool(0),
m_defaultMaxPersistentManifoldPoolSize(4096),
m_defaultMaxCollisionAlgorithmPoolSize(4096),
m_customCollisionAlgorithmMaxElementSize(0),
- m_defaultStackAllocatorSize(0),
m_useEpaPenetrationAlgorithm(true)
{
}
@@ -56,8 +52,6 @@ protected:
int m_persistentManifoldPoolSize;
- btStackAlloc* m_stackAlloc;
- bool m_ownsStackAllocator;
btPoolAllocator* m_persistentManifoldPool;
bool m_ownsPersistentManifoldPool;
@@ -75,6 +69,8 @@ protected:
btCollisionAlgorithmCreateFunc* m_convexConcaveCreateFunc;
btCollisionAlgorithmCreateFunc* m_swappedConvexConcaveCreateFunc;
btCollisionAlgorithmCreateFunc* m_compoundCreateFunc;
+ btCollisionAlgorithmCreateFunc* m_compoundCompoundCreateFunc;
+
btCollisionAlgorithmCreateFunc* m_swappedCompoundCreateFunc;
btCollisionAlgorithmCreateFunc* m_emptyCreateFunc;
btCollisionAlgorithmCreateFunc* m_sphereSphereCF;
@@ -105,10 +101,6 @@ public:
return m_collisionAlgorithmPool;
}
- virtual btStackAlloc* getStackAllocator()
- {
- return m_stackAlloc;
- }
virtual btVoronoiSimplexSolver* getSimplexSolver()
{
diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btHashedSimplePairCache.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btHashedSimplePairCache.cpp
new file mode 100644
index 00000000000..cfcca5654de
--- /dev/null
+++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btHashedSimplePairCache.cpp
@@ -0,0 +1,278 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+
+#include "btHashedSimplePairCache.h"
+
+
+#include <stdio.h>
+
+int gOverlappingSimplePairs = 0;
+int gRemoveSimplePairs =0;
+int gAddedSimplePairs =0;
+int gFindSimplePairs =0;
+
+
+
+
+btHashedSimplePairCache::btHashedSimplePairCache():
+ m_blockedForChanges(false)
+{
+ int initialAllocatedSize= 2;
+ m_overlappingPairArray.reserve(initialAllocatedSize);
+ growTables();
+}
+
+
+
+
+btHashedSimplePairCache::~btHashedSimplePairCache()
+{
+}
+
+
+
+
+
+
+void btHashedSimplePairCache::removeAllPairs()
+{
+ m_overlappingPairArray.clear();
+ m_hashTable.clear();
+ m_next.clear();
+
+ int initialAllocatedSize= 2;
+ m_overlappingPairArray.reserve(initialAllocatedSize);
+ growTables();
+}
+
+
+
+btSimplePair* btHashedSimplePairCache::findPair(int indexA, int indexB)
+{
+ gFindSimplePairs++;
+
+
+ /*if (indexA > indexB)
+ btSwap(indexA, indexB);*/
+
+ int hash = static_cast<int>(getHash(static_cast<unsigned int>(indexA), static_cast<unsigned int>(indexB)) & (m_overlappingPairArray.capacity()-1));
+
+ if (hash >= m_hashTable.size())
+ {
+ return NULL;
+ }
+
+ int index = m_hashTable[hash];
+ while (index != BT_SIMPLE_NULL_PAIR && equalsPair(m_overlappingPairArray[index], indexA, indexB) == false)
+ {
+ index = m_next[index];
+ }
+
+ if (index == BT_SIMPLE_NULL_PAIR)
+ {
+ return NULL;
+ }
+
+ btAssert(index < m_overlappingPairArray.size());
+
+ return &m_overlappingPairArray[index];
+}
+
+//#include <stdio.h>
+
+void btHashedSimplePairCache::growTables()
+{
+
+ int newCapacity = m_overlappingPairArray.capacity();
+
+ if (m_hashTable.size() < newCapacity)
+ {
+ //grow hashtable and next table
+ int curHashtableSize = m_hashTable.size();
+
+ m_hashTable.resize(newCapacity);
+ m_next.resize(newCapacity);
+
+
+ int i;
+
+ for (i= 0; i < newCapacity; ++i)
+ {
+ m_hashTable[i] = BT_SIMPLE_NULL_PAIR;
+ }
+ for (i = 0; i < newCapacity; ++i)
+ {
+ m_next[i] = BT_SIMPLE_NULL_PAIR;
+ }
+
+ for(i=0;i<curHashtableSize;i++)
+ {
+
+ const btSimplePair& pair = m_overlappingPairArray[i];
+ int indexA = pair.m_indexA;
+ int indexB = pair.m_indexB;
+
+ int hashValue = static_cast<int>(getHash(static_cast<unsigned int>(indexA),static_cast<unsigned int>(indexB)) & (m_overlappingPairArray.capacity()-1)); // New hash value with new mask
+ m_next[i] = m_hashTable[hashValue];
+ m_hashTable[hashValue] = i;
+ }
+
+
+ }
+}
+
+btSimplePair* btHashedSimplePairCache::internalAddPair(int indexA, int indexB)
+{
+
+ int hash = static_cast<int>(getHash(static_cast<unsigned int>(indexA),static_cast<unsigned int>(indexB)) & (m_overlappingPairArray.capacity()-1)); // New hash value with new mask
+
+
+ btSimplePair* pair = internalFindPair(indexA, indexB, hash);
+ if (pair != NULL)
+ {
+ return pair;
+ }
+
+ int count = m_overlappingPairArray.size();
+ int oldCapacity = m_overlappingPairArray.capacity();
+ void* mem = &m_overlappingPairArray.expandNonInitializing();
+
+ int newCapacity = m_overlappingPairArray.capacity();
+
+ if (oldCapacity < newCapacity)
+ {
+ growTables();
+ //hash with new capacity
+ hash = static_cast<int>(getHash(static_cast<unsigned int>(indexA),static_cast<unsigned int>(indexB)) & (m_overlappingPairArray.capacity()-1));
+ }
+
+ pair = new (mem) btSimplePair(indexA,indexB);
+
+ pair->m_userPointer = 0;
+
+ m_next[count] = m_hashTable[hash];
+ m_hashTable[hash] = count;
+
+ return pair;
+}
+
+
+
+void* btHashedSimplePairCache::removeOverlappingPair(int indexA, int indexB)
+{
+ gRemoveSimplePairs++;
+
+
+ /*if (indexA > indexB)
+ btSwap(indexA, indexB);*/
+
+ int hash = static_cast<int>(getHash(static_cast<unsigned int>(indexA),static_cast<unsigned int>(indexB)) & (m_overlappingPairArray.capacity()-1));
+
+ btSimplePair* pair = internalFindPair(indexA, indexB, hash);
+ if (pair == NULL)
+ {
+ return 0;
+ }
+
+
+ void* userData = pair->m_userPointer;
+
+
+ int pairIndex = int(pair - &m_overlappingPairArray[0]);
+ btAssert(pairIndex < m_overlappingPairArray.size());
+
+ // Remove the pair from the hash table.
+ int index = m_hashTable[hash];
+ btAssert(index != BT_SIMPLE_NULL_PAIR);
+
+ int previous = BT_SIMPLE_NULL_PAIR;
+ while (index != pairIndex)
+ {
+ previous = index;
+ index = m_next[index];
+ }
+
+ if (previous != BT_SIMPLE_NULL_PAIR)
+ {
+ btAssert(m_next[previous] == pairIndex);
+ m_next[previous] = m_next[pairIndex];
+ }
+ else
+ {
+ m_hashTable[hash] = m_next[pairIndex];
+ }
+
+ // We now move the last pair into spot of the
+ // pair being removed. We need to fix the hash
+ // table indices to support the move.
+
+ int lastPairIndex = m_overlappingPairArray.size() - 1;
+
+ // If the removed pair is the last pair, we are done.
+ if (lastPairIndex == pairIndex)
+ {
+ m_overlappingPairArray.pop_back();
+ return userData;
+ }
+
+ // Remove the last pair from the hash table.
+ const btSimplePair* last = &m_overlappingPairArray[lastPairIndex];
+ /* missing swap here too, Nat. */
+ int lastHash = static_cast<int>(getHash(static_cast<unsigned int>(last->m_indexA), static_cast<unsigned int>(last->m_indexB)) & (m_overlappingPairArray.capacity()-1));
+
+ index = m_hashTable[lastHash];
+ btAssert(index != BT_SIMPLE_NULL_PAIR);
+
+ previous = BT_SIMPLE_NULL_PAIR;
+ while (index != lastPairIndex)
+ {
+ previous = index;
+ index = m_next[index];
+ }
+
+ if (previous != BT_SIMPLE_NULL_PAIR)
+ {
+ btAssert(m_next[previous] == lastPairIndex);
+ m_next[previous] = m_next[lastPairIndex];
+ }
+ else
+ {
+ m_hashTable[lastHash] = m_next[lastPairIndex];
+ }
+
+ // Copy the last pair into the remove pair's spot.
+ m_overlappingPairArray[pairIndex] = m_overlappingPairArray[lastPairIndex];
+
+ // Insert the last pair into the hash table
+ m_next[pairIndex] = m_hashTable[lastHash];
+ m_hashTable[lastHash] = pairIndex;
+
+ m_overlappingPairArray.pop_back();
+
+ return userData;
+}
+//#include <stdio.h>
+
+
+
+
+
+
+
+
+
+
diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btHashedSimplePairCache.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btHashedSimplePairCache.h
new file mode 100644
index 00000000000..e88ef97e968
--- /dev/null
+++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btHashedSimplePairCache.h
@@ -0,0 +1,174 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_HASHED_SIMPLE_PAIR_CACHE_H
+#define BT_HASHED_SIMPLE_PAIR_CACHE_H
+
+
+
+#include "LinearMath/btAlignedObjectArray.h"
+
+const int BT_SIMPLE_NULL_PAIR=0xffffffff;
+
+struct btSimplePair
+{
+ btSimplePair(int indexA,int indexB)
+ :m_indexA(indexA),
+ m_indexB(indexB),
+ m_userPointer(0)
+ {
+ }
+
+ int m_indexA;
+ int m_indexB;
+ union
+ {
+ void* m_userPointer;
+ int m_userValue;
+ };
+};
+
+typedef btAlignedObjectArray<btSimplePair> btSimplePairArray;
+
+
+
+extern int gOverlappingSimplePairs;
+extern int gRemoveSimplePairs;
+extern int gAddedSimplePairs;
+extern int gFindSimplePairs;
+
+
+
+
+class btHashedSimplePairCache
+{
+ btSimplePairArray m_overlappingPairArray;
+
+ bool m_blockedForChanges;
+
+
+protected:
+
+ btAlignedObjectArray<int> m_hashTable;
+ btAlignedObjectArray<int> m_next;
+
+
+public:
+ btHashedSimplePairCache();
+ virtual ~btHashedSimplePairCache();
+
+ void removeAllPairs();
+
+ virtual void* removeOverlappingPair(int indexA,int indexB);
+
+ // Add a pair and return the new pair. If the pair already exists,
+ // no new pair is created and the old one is returned.
+ virtual btSimplePair* addOverlappingPair(int indexA,int indexB)
+ {
+ gAddedSimplePairs++;
+
+ return internalAddPair(indexA,indexB);
+ }
+
+
+ virtual btSimplePair* getOverlappingPairArrayPtr()
+ {
+ return &m_overlappingPairArray[0];
+ }
+
+ const btSimplePair* getOverlappingPairArrayPtr() const
+ {
+ return &m_overlappingPairArray[0];
+ }
+
+ btSimplePairArray& getOverlappingPairArray()
+ {
+ return m_overlappingPairArray;
+ }
+
+ const btSimplePairArray& getOverlappingPairArray() const
+ {
+ return m_overlappingPairArray;
+ }
+
+
+ btSimplePair* findPair(int indexA,int indexB);
+
+ int GetCount() const { return m_overlappingPairArray.size(); }
+
+ int getNumOverlappingPairs() const
+ {
+ return m_overlappingPairArray.size();
+ }
+private:
+
+ btSimplePair* internalAddPair(int indexA, int indexB);
+
+ void growTables();
+
+ SIMD_FORCE_INLINE bool equalsPair(const btSimplePair& pair, int indexA, int indexB)
+ {
+ return pair.m_indexA == indexA && pair.m_indexB == indexB;
+ }
+
+
+
+ SIMD_FORCE_INLINE unsigned int getHash(unsigned int indexA, unsigned int indexB)
+ {
+ int key = static_cast<int>(((unsigned int)indexA) | (((unsigned int)indexB) <<16));
+ // Thomas Wang's hash
+
+ key += ~(key << 15);
+ key ^= (key >> 10);
+ key += (key << 3);
+ key ^= (key >> 6);
+ key += ~(key << 11);
+ key ^= (key >> 16);
+ return static_cast<unsigned int>(key);
+ }
+
+
+
+
+
+ SIMD_FORCE_INLINE btSimplePair* internalFindPair(int proxyIdA , int proxyIdB, int hash)
+ {
+
+ int index = m_hashTable[hash];
+
+ while( index != BT_SIMPLE_NULL_PAIR && equalsPair(m_overlappingPairArray[index], proxyIdA, proxyIdB) == false)
+ {
+ index = m_next[index];
+ }
+
+ if ( index == BT_SIMPLE_NULL_PAIR )
+ {
+ return NULL;
+ }
+
+ btAssert(index < m_overlappingPairArray.size());
+
+ return &m_overlappingPairArray[index];
+ }
+
+
+};
+
+
+
+
+#endif //BT_HASHED_SIMPLE_PAIR_CACHE_H
+
+
diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.cpp
index 12f422f193f..0aa75f2bff3 100644
--- a/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.cpp
+++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.cpp
@@ -273,6 +273,8 @@ void btCompoundShape::calculatePrincipalAxisTransform(btScalar* masses, btTransf
+
+
void btCompoundShape::setLocalScaling(const btVector3& scaling)
{
@@ -283,7 +285,7 @@ void btCompoundShape::setLocalScaling(const btVector3& scaling)
// childScale = childScale * (childTrans.getBasis() * scaling);
childScale = childScale * scaling / m_localScaling;
m_children[i].m_childShape->setLocalScaling(childScale);
- childTrans.setOrigin((childTrans.getOrigin())*scaling);
+ childTrans.setOrigin((childTrans.getOrigin()) * scaling / m_localScaling);
updateChildTransform(i, childTrans,false);
}
diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.cpp
index 5e83087b320..2d83c8bfbac 100644
--- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.cpp
+++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.cpp
@@ -62,6 +62,10 @@ void btConeShape::setConeUpIndex(int upIndex)
default:
btAssert(0);
};
+
+ m_implicitShapeDimensions[m_coneIndices[0]] = m_radius;
+ m_implicitShapeDimensions[m_coneIndices[1]] = m_height;
+ m_implicitShapeDimensions[m_coneIndices[2]] = m_radius;
}
btVector3 btConeShape::coneLocalSupport(const btVector3& v) const
diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.h
index 5966ae48f11..4a0df0d558b 100644
--- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.h
+++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.h
@@ -90,6 +90,13 @@ public:
}
virtual void setLocalScaling(const btVector3& scaling);
+
+
+ virtual int calculateSerializeBufferSize() const;
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+ virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
+
};
@@ -104,19 +111,61 @@ class btConeShapeX : public btConeShape
return btVector3 (1,0,0);
}
+ //debugging
+ virtual const char* getName()const
+ {
+ return "ConeX";
+ }
+
+
};
///btConeShapeZ implements a Cone shape, around the Z axis
class btConeShapeZ : public btConeShape
{
- public:
- btConeShapeZ(btScalar radius,btScalar height);
+public:
+ btConeShapeZ(btScalar radius,btScalar height);
virtual btVector3 getAnisotropicRollingFrictionDirection() const
{
return btVector3 (0,0,1);
}
+ //debugging
+ virtual const char* getName()const
+ {
+ return "ConeZ";
+ }
+
+
};
+
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btConeShapeData
+{
+ btConvexInternalShapeData m_convexInternalShapeData;
+
+ int m_upIndex;
+
+ char m_padding[4];
+};
+
+SIMD_FORCE_INLINE int btConeShape::calculateSerializeBufferSize() const
+{
+ return sizeof(btConeShapeData);
+}
+
+///fills the dataBuffer and returns the struct name (and 0 on failure)
+SIMD_FORCE_INLINE const char* btConeShape::serialize(void* dataBuffer, btSerializer* serializer) const
+{
+ btConeShapeData* shapeData = (btConeShapeData*) dataBuffer;
+
+ btConvexInternalShape::serialize(&shapeData->m_convexInternalShapeData,serializer);
+
+ shapeData->m_upIndex = m_coneIndices[1];
+
+ return "btConeShapeData";
+}
+
#endif //BT_CONE_MINKOWSKI_H
diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp
index 9d40dfdd0dd..fb0d9fdb75a 100644
--- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp
+++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp
@@ -21,6 +21,7 @@ subject to the following restrictions:
#include "btTriangleShape.h"
#include "btSphereShape.h"
#include "btCylinderShape.h"
+#include "btConeShape.h"
#include "btCapsuleShape.h"
#include "btConvexHullShape.h"
#include "btConvexPointCloudShape.h"
@@ -336,6 +337,11 @@ btScalar btConvexShape::getMarginNonVirtual () const
btCylinderShape* cylShape = (btCylinderShape*)this;
return cylShape->getMarginNV();
}
+ case CONE_SHAPE_PROXYTYPE:
+ {
+ btConeShape* conShape = (btConeShape*)this;
+ return conShape->getMarginNV();
+ }
case CAPSULE_SHAPE_PROXYTYPE:
{
btCapsuleShape* capsuleShape = (btCapsuleShape*)this;
diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp
index 8d4080a63a6..26322791d04 100644
--- a/extern/bullet2/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp
+++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp
@@ -369,7 +369,7 @@ void btHeightfieldTerrainShape::processAllTriangles(btTriangleCallback* callback
getVertex(x+1,j+1,vertices[2]);
callback->processTriangle(vertices,x,j);
//second triangle
- getVertex(x,j,vertices[0]);
+ // getVertex(x,j,vertices[0]);//already got this vertex before, thanks to Danny Chapman
getVertex(x+1,j+1,vertices[1]);
getVertex(x,j+1,vertices[2]);
callback->processTriangle(vertices,x,j);
@@ -382,7 +382,7 @@ void btHeightfieldTerrainShape::processAllTriangles(btTriangleCallback* callback
callback->processTriangle(vertices,x,j);
//second triangle
getVertex(x+1,j,vertices[0]);
- getVertex(x,j+1,vertices[1]);
+ //getVertex(x,j+1,vertices[1]);
getVertex(x+1,j+1,vertices[2]);
callback->processTriangle(vertices,x,j);
}
diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.cpp
index 51a2f8a0739..5fbed334ec1 100644
--- a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.cpp
+++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.cpp
@@ -111,10 +111,10 @@ int btTriangleMesh::findOrAddVertex(const btVector3& vertex, bool removeDuplicat
return i/3;
}
}
- }
- m_3componentVertices.push_back((float)vertex.getX());
- m_3componentVertices.push_back((float)vertex.getY());
- m_3componentVertices.push_back((float)vertex.getZ());
+ }
+ m_3componentVertices.push_back(vertex.getX());
+ m_3componentVertices.push_back(vertex.getY());
+ m_3componentVertices.push_back(vertex.getZ());
m_indexedMeshes[0].m_numVertices++;
m_indexedMeshes[0].m_vertexBase = (unsigned char*)&m_3componentVertices[0];
return (m_3componentVertices.size()/3)-1;
diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.h
index 29d1b5cdaa4..0afc2321ff0 100644
--- a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.h
+++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.h
@@ -27,7 +27,7 @@ subject to the following restrictions:
class btTriangleMesh : public btTriangleIndexVertexArray
{
btAlignedObjectArray<btVector3> m_4componentVertices;
- btAlignedObjectArray<float> m_3componentVertices;
+ btAlignedObjectArray<btScalar> m_3componentVertices;
btAlignedObjectArray<unsigned int> m_32bitIndices;
btAlignedObjectArray<unsigned short int> m_16bitIndices;
diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h
index 72eb5aec461..29620abffb9 100644
--- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h
+++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h
@@ -17,7 +17,6 @@ subject to the following restrictions:
#ifndef BT_CONVEX_PENETRATION_DEPTH_H
#define BT_CONVEX_PENETRATION_DEPTH_H
-class btStackAlloc;
class btVector3;
#include "btSimplexSolverInterface.h"
class btConvexShape;
@@ -33,8 +32,7 @@ public:
const btConvexShape* convexA,const btConvexShape* convexB,
const btTransform& transA,const btTransform& transB,
btVector3& v, btVector3& pa, btVector3& pb,
- class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc
- ) = 0;
+ class btIDebugDraw* debugDraw) = 0;
};
diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h
index f958cc523ef..46ce1ab75e7 100644
--- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h
+++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h
@@ -19,7 +19,6 @@ subject to the following restrictions:
#include "LinearMath/btTransform.h"
#include "LinearMath/btVector3.h"
-class btStackAlloc;
/// This interface is made to be used by an iterative approach to do TimeOfImpact calculations
/// This interface allows to query for closest points and penetration depth between two (convex) objects
@@ -43,15 +42,13 @@ struct btDiscreteCollisionDetectorInterface
struct ClosestPointInput
{
ClosestPointInput()
- :m_maximumDistanceSquared(btScalar(BT_LARGE_FLOAT)),
- m_stackAlloc(0)
+ :m_maximumDistanceSquared(btScalar(BT_LARGE_FLOAT))
{
}
btTransform m_transformA;
btTransform m_transformB;
btScalar m_maximumDistanceSquared;
- btStackAlloc* m_stackAlloc;
};
virtual ~btDiscreteCollisionDetectorInterface() {};
diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp
index c6dc3f3a672..572ec36f563 100644
--- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp
+++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp
@@ -25,7 +25,7 @@ bool btGjkEpaPenetrationDepthSolver::calcPenDepth( btSimplexSolverInterface& sim
const btConvexShape* pConvexA, const btConvexShape* pConvexB,
const btTransform& transformA, const btTransform& transformB,
btVector3& v, btVector3& wWitnessOnA, btVector3& wWitnessOnB,
- class btIDebugDraw* debugDraw, btStackAlloc* stackAlloc )
+ class btIDebugDraw* debugDraw)
{
(void)debugDraw;
@@ -34,7 +34,7 @@ bool btGjkEpaPenetrationDepthSolver::calcPenDepth( btSimplexSolverInterface& sim
// const btScalar radialmargin(btScalar(0.));
- btVector3 guessVector(transformA.getOrigin()-transformB.getOrigin());
+ btVector3 guessVector(transformB.getOrigin()-transformA.getOrigin());
btGjkEpaSolver2::sResults results;
diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h
index a49689a1501..1ed6340af3b 100644
--- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h
+++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h
@@ -33,7 +33,7 @@ class btGjkEpaPenetrationDepthSolver : public btConvexPenetrationDepthSolver
const btConvexShape* pConvexA, const btConvexShape* pConvexB,
const btTransform& transformA, const btTransform& transformB,
btVector3& v, btVector3& wWitnessOnA, btVector3& wWitnessOnB,
- class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc );
+ class btIDebugDraw* debugDraw);
private :
diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp
index 8af16b9cf6f..8877579496b 100644
--- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp
+++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp
@@ -50,7 +50,8 @@ m_marginA(objectA->getMargin()),
m_marginB(objectB->getMargin()),
m_ignoreMargin(false),
m_lastUsedMethod(-1),
-m_catchDegeneracies(1)
+m_catchDegeneracies(1),
+m_fixContactNormalDirection(1)
{
}
btGjkPairDetector::btGjkPairDetector(const btConvexShape* objectA,const btConvexShape* objectB,int shapeTypeA,int shapeTypeB,btScalar marginA, btScalar marginB, btSimplexSolverInterface* simplexSolver,btConvexPenetrationDepthSolver* penetrationDepthSolver)
@@ -65,7 +66,8 @@ m_marginA(marginA),
m_marginB(marginB),
m_ignoreMargin(false),
m_lastUsedMethod(-1),
-m_catchDegeneracies(1)
+m_catchDegeneracies(1),
+m_fixContactNormalDirection(1)
{
}
@@ -353,7 +355,7 @@ void btGjkPairDetector::getClosestPointsNonVirtual(const ClosestPointInput& inpu
m_minkowskiA,m_minkowskiB,
localTransA,localTransB,
m_cachedSeparatingAxis, tmpPointOnA, tmpPointOnB,
- debugDraw,input.m_stackAlloc
+ debugDraw
);
@@ -438,6 +440,27 @@ void btGjkPairDetector::getClosestPointsNonVirtual(const ClosestPointInput& inpu
}
#endif
+ if (m_fixContactNormalDirection)
+ {
+ ///@workaround for sticky convex collisions
+ //in some degenerate cases (usually when the use uses very small margins)
+ //the contact normal is pointing the wrong direction
+ //so fix it now (until we can deal with all degenerate cases in GJK and EPA)
+ //contact normals need to point from B to A in all cases, so we can simply check if the contact normal really points from B to A
+ //We like to use a dot product of the normal against the difference of the centroids,
+ //once the centroid is available in the API
+ //until then we use the center of the aabb to approximate the centroid
+ btVector3 aabbMin,aabbMax;
+ m_minkowskiA->getAabb(localTransA,aabbMin,aabbMax);
+ btVector3 posA = (aabbMax+aabbMin)*btScalar(0.5);
+
+ m_minkowskiB->getAabb(localTransB,aabbMin,aabbMax);
+ btVector3 posB = (aabbMin+aabbMax)*btScalar(0.5);
+
+ btVector3 diff = posA-posB;
+ if (diff.dot(normalInB) < 0.f)
+ normalInB *= -1.f;
+ }
m_cachedSeparatingAxis = normalInB;
m_cachedSeparatingDistance = distance;
diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h
index f0043b8b9f2..feeae686213 100644
--- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h
+++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h
@@ -52,7 +52,7 @@ public:
int m_curIter;
int m_degenerateSimplex;
int m_catchDegeneracies;
-
+ int m_fixContactNormalDirection;
btGjkPairDetector(const btConvexShape* objectA,const btConvexShape* objectB,btSimplexSolverInterface* simplexSolver,btConvexPenetrationDepthSolver* penetrationDepthSolver);
btGjkPairDetector(const btConvexShape* objectA,const btConvexShape* objectB,int shapeTypeA,int shapeTypeB,btScalar marginA, btScalar marginB, btSimplexSolverInterface* simplexSolver,btConvexPenetrationDepthSolver* penetrationDepthSolver);
diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp
index fe31f08d61a..fa45f49037e 100644
--- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp
+++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp
@@ -26,11 +26,10 @@ bool btMinkowskiPenetrationDepthSolver::calcPenDepth(btSimplexSolverInterface& s
const btConvexShape* convexA,const btConvexShape* convexB,
const btTransform& transA,const btTransform& transB,
btVector3& v, btVector3& pa, btVector3& pb,
- class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc
+ class btIDebugDraw* debugDraw
)
{
- (void)stackAlloc;
(void)v;
bool check2d= convexA->isConvex2d() && convexB->isConvex2d();
diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h
index 6a8fe52f36f..fd533b4fc33 100644
--- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h
+++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h
@@ -32,7 +32,7 @@ public:
const btConvexShape* convexA,const btConvexShape* convexB,
const btTransform& transA,const btTransform& transB,
btVector3& v, btVector3& pa, btVector3& pb,
- class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc
+ class btIDebugDraw* debugDraw
);
};
diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h
index f012889a70e..3999d400503 100644
--- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h
+++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h
@@ -35,7 +35,7 @@ public:
kF_None = 0,
kF_FilterBackfaces = 1 << 0,
kF_KeepUnflippedNormal = 1 << 1, // Prevents returned face normal getting flipped when a ray hits a back-facing triangle
-
+ kF_UseSubSimplexConvexCastRaytest = 1 << 2, // Uses an approximate but faster ray versus convex intersection algorithm
kF_Terminator = 0xFFFFFFFF
};
unsigned int m_flags;
diff --git a/extern/bullet2/src/BulletDynamics/Character/btCharacterControllerInterface.h b/extern/bullet2/src/BulletDynamics/Character/btCharacterControllerInterface.h
index c81813c92be..dffb06dfe94 100644
--- a/extern/bullet2/src/BulletDynamics/Character/btCharacterControllerInterface.h
+++ b/extern/bullet2/src/BulletDynamics/Character/btCharacterControllerInterface.h
@@ -31,7 +31,7 @@ public:
virtual void setWalkDirection(const btVector3& walkDirection) = 0;
virtual void setVelocityForTimeInterval(const btVector3& velocity, btScalar timeInterval) = 0;
- virtual void reset () = 0;
+ virtual void reset ( btCollisionWorld* collisionWorld ) = 0;
virtual void warp (const btVector3& origin) = 0;
virtual void preStep ( btCollisionWorld* collisionWorld) = 0;
@@ -40,6 +40,7 @@ public:
virtual void jump () = 0;
virtual bool onGround () const = 0;
+ virtual void setUpInterpolate (bool value) = 0;
};
#endif //BT_CHARACTER_CONTROLLER_INTERFACE_H
diff --git a/extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.cpp b/extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.cpp
index 9db909a5469..8f1cd20bf45 100644
--- a/extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.cpp
+++ b/extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.cpp
@@ -14,6 +14,7 @@ subject to the following restrictions:
*/
+#include <stdio.h>
#include "LinearMath/btIDebugDraw.h"
#include "BulletCollision/CollisionDispatch/btGhostObject.h"
#include "BulletCollision/CollisionShapes/btMultiSphereShape.h"
@@ -79,7 +80,7 @@ public:
if (!convexResult.m_hitCollisionObject->hasContactResponse())
return btScalar(1.0);
-
+
btVector3 hitNormalWorld;
if (normalInWorldSpace)
{
@@ -149,7 +150,11 @@ btKinematicCharacterController::btKinematicCharacterController (btPairCachingGho
m_jumpSpeed = 10.0; // ?
m_wasOnGround = false;
m_wasJumping = false;
+ m_interpolateUp = true;
setMaxSlope(btRadians(45.0));
+ m_currentStepOffset = 0;
+ full_drop = false;
+ bounce_fix = false;
}
btKinematicCharacterController::~btKinematicCharacterController ()
@@ -190,9 +195,10 @@ bool btKinematicCharacterController::recoverFromPenetration ( btCollisionWorld*
m_manifoldArray.resize(0);
btBroadphasePair* collisionPair = &m_ghostObject->getOverlappingPairCache()->getOverlappingPairArray()[i];
+
btCollisionObject* obj0 = static_cast<btCollisionObject*>(collisionPair->m_pProxy0->m_clientObject);
- btCollisionObject* obj1 = static_cast<btCollisionObject*>(collisionPair->m_pProxy1->m_clientObject);
-
+ btCollisionObject* obj1 = static_cast<btCollisionObject*>(collisionPair->m_pProxy1->m_clientObject);
+
if ((obj0 && !obj0->hasContactResponse()) || (obj1 && !obj1->hasContactResponse()))
continue;
@@ -268,7 +274,10 @@ void btKinematicCharacterController::stepUp ( btCollisionWorld* world)
{
// we moved up only a fraction of the step height
m_currentStepOffset = m_stepHeight * callback.m_closestHitFraction;
- m_currentPosition.setInterpolate3 (m_currentPosition, m_targetPosition, callback.m_closestHitFraction);
+ if (m_interpolateUp == true)
+ m_currentPosition.setInterpolate3 (m_currentPosition, m_targetPosition, callback.m_closestHitFraction);
+ else
+ m_currentPosition = m_targetPosition;
}
m_verticalVelocity = 0.0;
m_verticalOffset = 0.0;
@@ -333,7 +342,8 @@ void btKinematicCharacterController::stepForwardAndStrafe ( btCollisionWorld* co
{
if (m_normalizedDirection.dot(m_touchingNormal) > btScalar(0.0))
{
- updateTargetPositionBasedOnCollision (m_touchingNormal);
+ //interferes with step movement
+ //updateTargetPositionBasedOnCollision (m_touchingNormal);
}
}
@@ -405,7 +415,8 @@ void btKinematicCharacterController::stepForwardAndStrafe ( btCollisionWorld* co
void btKinematicCharacterController::stepDown ( btCollisionWorld* collisionWorld, btScalar dt)
{
- btTransform start, end;
+ btTransform start, end, end_double;
+ bool runonce = false;
// phase 3: down
/*btScalar additionalDownStep = (m_wasOnGround && !onGround()) ? m_stepHeight : 0.0;
@@ -414,44 +425,124 @@ void btKinematicCharacterController::stepDown ( btCollisionWorld* collisionWorld
btVector3 gravity_drop = getUpAxisDirections()[m_upAxis] * downVelocity;
m_targetPosition -= (step_drop + gravity_drop);*/
+ btVector3 orig_position = m_targetPosition;
+
btScalar downVelocity = (m_verticalVelocity<0.f?-m_verticalVelocity:0.f) * dt;
- if(downVelocity > 0.0 && downVelocity < m_stepHeight
+
+ if(downVelocity > 0.0 && downVelocity > m_fallSpeed
&& (m_wasOnGround || !m_wasJumping))
- {
- downVelocity = m_stepHeight;
- }
+ downVelocity = m_fallSpeed;
btVector3 step_drop = getUpAxisDirections()[m_upAxis] * (m_currentStepOffset + downVelocity);
m_targetPosition -= step_drop;
- start.setIdentity ();
- end.setIdentity ();
+ btKinematicClosestNotMeConvexResultCallback callback (m_ghostObject, getUpAxisDirections()[m_upAxis], m_maxSlopeCosine);
+ callback.m_collisionFilterGroup = getGhostObject()->getBroadphaseHandle()->m_collisionFilterGroup;
+ callback.m_collisionFilterMask = getGhostObject()->getBroadphaseHandle()->m_collisionFilterMask;
- start.setOrigin (m_currentPosition);
- end.setOrigin (m_targetPosition);
+ btKinematicClosestNotMeConvexResultCallback callback2 (m_ghostObject, getUpAxisDirections()[m_upAxis], m_maxSlopeCosine);
+ callback2.m_collisionFilterGroup = getGhostObject()->getBroadphaseHandle()->m_collisionFilterGroup;
+ callback2.m_collisionFilterMask = getGhostObject()->getBroadphaseHandle()->m_collisionFilterMask;
- btKinematicClosestNotMeConvexResultCallback callback (m_ghostObject, getUpAxisDirections()[m_upAxis], m_maxSlopeCosine);
- callback.m_collisionFilterGroup = getGhostObject()->getBroadphaseHandle()->m_collisionFilterGroup;
- callback.m_collisionFilterMask = getGhostObject()->getBroadphaseHandle()->m_collisionFilterMask;
-
- if (m_useGhostObjectSweepTest)
+ while (1)
{
- m_ghostObject->convexSweepTest (m_convexShape, start, end, callback, collisionWorld->getDispatchInfo().m_allowedCcdPenetration);
- } else
- {
- collisionWorld->convexSweepTest (m_convexShape, start, end, callback, collisionWorld->getDispatchInfo().m_allowedCcdPenetration);
+ start.setIdentity ();
+ end.setIdentity ();
+
+ end_double.setIdentity ();
+
+ start.setOrigin (m_currentPosition);
+ end.setOrigin (m_targetPosition);
+
+ //set double test for 2x the step drop, to check for a large drop vs small drop
+ end_double.setOrigin (m_targetPosition - step_drop);
+
+ if (m_useGhostObjectSweepTest)
+ {
+ m_ghostObject->convexSweepTest (m_convexShape, start, end, callback, collisionWorld->getDispatchInfo().m_allowedCcdPenetration);
+
+ if (!callback.hasHit())
+ {
+ //test a double fall height, to see if the character should interpolate it's fall (full) or not (partial)
+ m_ghostObject->convexSweepTest (m_convexShape, start, end_double, callback2, collisionWorld->getDispatchInfo().m_allowedCcdPenetration);
+ }
+ } else
+ {
+ collisionWorld->convexSweepTest (m_convexShape, start, end, callback, collisionWorld->getDispatchInfo().m_allowedCcdPenetration);
+
+ if (!callback.hasHit())
+ {
+ //test a double fall height, to see if the character should interpolate it's fall (large) or not (small)
+ collisionWorld->convexSweepTest (m_convexShape, start, end_double, callback2, collisionWorld->getDispatchInfo().m_allowedCcdPenetration);
+ }
+ }
+
+ btScalar downVelocity2 = (m_verticalVelocity<0.f?-m_verticalVelocity:0.f) * dt;
+ bool has_hit = false;
+ if (bounce_fix == true)
+ has_hit = callback.hasHit() || callback2.hasHit();
+ else
+ has_hit = callback2.hasHit();
+
+ if(downVelocity2 > 0.0 && downVelocity2 < m_stepHeight && has_hit == true && runonce == false
+ && (m_wasOnGround || !m_wasJumping))
+ {
+ //redo the velocity calculation when falling a small amount, for fast stairs motion
+ //for larger falls, use the smoother/slower interpolated movement by not touching the target position
+
+ m_targetPosition = orig_position;
+ downVelocity = m_stepHeight;
+
+ btVector3 step_drop = getUpAxisDirections()[m_upAxis] * (m_currentStepOffset + downVelocity);
+ m_targetPosition -= step_drop;
+ runonce = true;
+ continue; //re-run previous tests
+ }
+ break;
}
- if (callback.hasHit())
+ if (callback.hasHit() || runonce == true)
{
// we dropped a fraction of the height -> hit floor
- m_currentPosition.setInterpolate3 (m_currentPosition, m_targetPosition, callback.m_closestHitFraction);
+
+ btScalar fraction = (m_currentPosition.getY() - callback.m_hitPointWorld.getY()) / 2;
+
+ //printf("hitpoint: %g - pos %g\n", callback.m_hitPointWorld.getY(), m_currentPosition.getY());
+
+ if (bounce_fix == true)
+ {
+ if (full_drop == true)
+ m_currentPosition.setInterpolate3 (m_currentPosition, m_targetPosition, callback.m_closestHitFraction);
+ else
+ //due to errors in the closestHitFraction variable when used with large polygons, calculate the hit fraction manually
+ m_currentPosition.setInterpolate3 (m_currentPosition, m_targetPosition, fraction);
+ }
+ else
+ m_currentPosition.setInterpolate3 (m_currentPosition, m_targetPosition, callback.m_closestHitFraction);
+
+ full_drop = false;
+
m_verticalVelocity = 0.0;
m_verticalOffset = 0.0;
m_wasJumping = false;
} else {
// we dropped the full height
+ full_drop = true;
+
+ if (bounce_fix == true)
+ {
+ downVelocity = (m_verticalVelocity<0.f?-m_verticalVelocity:0.f) * dt;
+ if (downVelocity > m_fallSpeed && (m_wasOnGround || !m_wasJumping))
+ {
+ m_targetPosition += step_drop; //undo previous target change
+ downVelocity = m_fallSpeed;
+ step_drop = getUpAxisDirections()[m_upAxis] * (m_currentStepOffset + downVelocity);
+ m_targetPosition -= step_drop;
+ }
+ }
+ //printf("full drop - %g, %g\n", m_currentPosition.getY(), m_targetPosition.getY());
+
m_currentPosition = m_targetPosition;
}
}
@@ -484,13 +575,24 @@ btScalar timeInterval
m_useWalkDirection = false;
m_walkDirection = velocity;
m_normalizedDirection = getNormalizedVector(m_walkDirection);
- m_velocityTimeInterval = timeInterval;
+ m_velocityTimeInterval += timeInterval;
}
-
-
-void btKinematicCharacterController::reset ()
-{
+void btKinematicCharacterController::reset ( btCollisionWorld* collisionWorld )
+{
+ m_verticalVelocity = 0.0;
+ m_verticalOffset = 0.0;
+ m_wasOnGround = false;
+ m_wasJumping = false;
+ m_walkDirection.setValue(0,0,0);
+ m_velocityTimeInterval = 0.0;
+
+ //clear pair cache
+ btHashedOverlappingPairCache *cache = m_ghostObject->getOverlappingPairCache();
+ while (cache->getOverlappingPairArray().size() > 0)
+ {
+ cache->removeOverlappingPair(cache->getOverlappingPairArray()[0].m_pProxy0, cache->getOverlappingPairArray()[0].m_pProxy1, collisionWorld->getDispatcher());
+ }
}
void btKinematicCharacterController::warp (const btVector3& origin)
@@ -661,3 +763,8 @@ btVector3* btKinematicCharacterController::getUpAxisDirections()
void btKinematicCharacterController::debugDraw(btIDebugDraw* debugDrawer)
{
}
+
+void btKinematicCharacterController::setUpInterpolate(bool value)
+{
+ m_interpolateUp = value;
+}
diff --git a/extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.h b/extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.h
index 8ec63735cd8..add6f30a687 100644
--- a/extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.h
+++ b/extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.h
@@ -81,6 +81,9 @@ protected:
int m_upAxis;
static btVector3* getUpAxisDirections();
+ bool m_interpolateUp;
+ bool full_drop;
+ bool bounce_fix;
btVector3 computeReflectionDirection (const btVector3& direction, const btVector3& normal);
btVector3 parallelComponent (const btVector3& direction, const btVector3& normal);
@@ -133,7 +136,7 @@ public:
virtual void setVelocityForTimeInterval(const btVector3& velocity,
btScalar timeInterval);
- void reset ();
+ void reset ( btCollisionWorld* collisionWorld );
void warp (const btVector3& origin);
void preStep ( btCollisionWorld* collisionWorld);
@@ -161,6 +164,7 @@ public:
}
bool onGround () const;
+ void setUpInterpolate (bool value);
};
#endif // BT_KINEMATIC_CHARACTER_CONTROLLER_H
diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h
index 09c048beda8..1735b524dba 100644
--- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h
+++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h
@@ -40,6 +40,15 @@ and swing 1 and 2 are along the z and y axes respectively.
#include "btJacobianEntry.h"
#include "btTypedConstraint.h"
+#ifdef BT_USE_DOUBLE_PRECISION
+#define btConeTwistConstraintData2 btConeTwistConstraintDoubleData
+#define btConeTwistConstraintDataName "btConeTwistConstraintDoubleData"
+#else
+#define btConeTwistConstraintData2 btConeTwistConstraintData
+#define btConeTwistConstraintDataName "btConeTwistConstraintData"
+#endif //BT_USE_DOUBLE_PRECISION
+
+
class btRigidBody;
enum btConeTwistFlags
@@ -295,7 +304,30 @@ public:
};
-///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+
+
+struct btConeTwistConstraintDoubleData
+{
+ btTypedConstraintDoubleData m_typeConstraintData;
+ btTransformDoubleData m_rbAFrame;
+ btTransformDoubleData m_rbBFrame;
+
+ //limits
+ double m_swingSpan1;
+ double m_swingSpan2;
+ double m_twistSpan;
+ double m_limitSoftness;
+ double m_biasFactor;
+ double m_relaxationFactor;
+
+ double m_damping;
+
+
+
+};
+
+#ifdef BT_BACKWARDS_COMPATIBLE_SERIALIZATION
+///this structure is not used, except for loading pre-2.82 .bullet files
struct btConeTwistConstraintData
{
btTypedConstraintData m_typeConstraintData;
@@ -315,12 +347,12 @@ struct btConeTwistConstraintData
char m_pad[4];
};
-
-
+#endif //BT_BACKWARDS_COMPATIBLE_SERIALIZATION
+//
SIMD_FORCE_INLINE int btConeTwistConstraint::calculateSerializeBufferSize() const
{
- return sizeof(btConeTwistConstraintData);
+ return sizeof(btConeTwistConstraintData2);
}
@@ -328,21 +360,21 @@ SIMD_FORCE_INLINE int btConeTwistConstraint::calculateSerializeBufferSize() cons
///fills the dataBuffer and returns the struct name (and 0 on failure)
SIMD_FORCE_INLINE const char* btConeTwistConstraint::serialize(void* dataBuffer, btSerializer* serializer) const
{
- btConeTwistConstraintData* cone = (btConeTwistConstraintData*) dataBuffer;
+ btConeTwistConstraintData2* cone = (btConeTwistConstraintData2*) dataBuffer;
btTypedConstraint::serialize(&cone->m_typeConstraintData,serializer);
- m_rbAFrame.serializeFloat(cone->m_rbAFrame);
- m_rbBFrame.serializeFloat(cone->m_rbBFrame);
+ m_rbAFrame.serialize(cone->m_rbAFrame);
+ m_rbBFrame.serialize(cone->m_rbBFrame);
- cone->m_swingSpan1 = float(m_swingSpan1);
- cone->m_swingSpan2 = float(m_swingSpan2);
- cone->m_twistSpan = float(m_twistSpan);
- cone->m_limitSoftness = float(m_limitSoftness);
- cone->m_biasFactor = float(m_biasFactor);
- cone->m_relaxationFactor = float(m_relaxationFactor);
- cone->m_damping = float(m_damping);
-
- return "btConeTwistConstraintData";
+ cone->m_swingSpan1 = m_swingSpan1;
+ cone->m_swingSpan2 = m_swingSpan2;
+ cone->m_twistSpan = m_twistSpan;
+ cone->m_limitSoftness = m_limitSoftness;
+ cone->m_biasFactor = m_biasFactor;
+ cone->m_relaxationFactor = m_relaxationFactor;
+ cone->m_damping = m_damping;
+
+ return btConeTwistConstraintDataName;
}
diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConstraintSolver.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConstraintSolver.h
index 6f673102be2..1ba1cd1e839 100644
--- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConstraintSolver.h
+++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConstraintSolver.h
@@ -28,6 +28,14 @@ class btIDebugDraw;
class btStackAlloc;
class btDispatcher;
/// btConstraintSolver provides solver interface
+
+
+enum btConstraintSolverType
+{
+ BT_SEQUENTIAL_IMPULSE_SOLVER=1,
+ BT_MLCP_SOLVER=2
+};
+
class btConstraintSolver
{
@@ -38,12 +46,16 @@ public:
virtual void prepareSolve (int /* numBodies */, int /* numManifolds */) {;}
///solve a group of constraints
- virtual btScalar solveGroup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifold,int numManifolds,btTypedConstraint** constraints,int numConstraints, const btContactSolverInfo& info,class btIDebugDraw* debugDrawer, btStackAlloc* stackAlloc,btDispatcher* dispatcher) = 0;
+ virtual btScalar solveGroup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifold,int numManifolds,btTypedConstraint** constraints,int numConstraints, const btContactSolverInfo& info,class btIDebugDraw* debugDrawer,btDispatcher* dispatcher) = 0;
- virtual void allSolved (const btContactSolverInfo& /* info */,class btIDebugDraw* /* debugDrawer */, btStackAlloc* /* stackAlloc */) {;}
+ virtual void allSolved (const btContactSolverInfo& /* info */,class btIDebugDraw* /* debugDrawer */) {;}
///clear internal cached data and reset random seed
virtual void reset() = 0;
+
+ virtual btConstraintSolverType getSolverType() const=0;
+
+
};
diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btFixedConstraint.cpp b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btFixedConstraint.cpp
new file mode 100644
index 00000000000..f93a3280f35
--- /dev/null
+++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btFixedConstraint.cpp
@@ -0,0 +1,129 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2013 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "btFixedConstraint.h"
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+#include "LinearMath/btTransformUtil.h"
+#include <new>
+
+
+btFixedConstraint::btFixedConstraint(btRigidBody& rbA,btRigidBody& rbB, const btTransform& frameInA,const btTransform& frameInB)
+:btTypedConstraint(FIXED_CONSTRAINT_TYPE,rbA,rbB)
+{
+ m_pivotInA = frameInA.getOrigin();
+ m_pivotInB = frameInB.getOrigin();
+ m_relTargetAB = frameInA.getRotation()*frameInB.getRotation().inverse();
+
+}
+
+btFixedConstraint::~btFixedConstraint ()
+{
+}
+
+
+void btFixedConstraint::getInfo1 (btConstraintInfo1* info)
+{
+ info->m_numConstraintRows = 6;
+ info->nub = 6;
+}
+
+void btFixedConstraint::getInfo2 (btConstraintInfo2* info)
+{
+ //fix the 3 linear degrees of freedom
+
+
+ const btVector3& worldPosA = m_rbA.getCenterOfMassTransform().getOrigin();
+ const btMatrix3x3& worldOrnA = m_rbA.getCenterOfMassTransform().getBasis();
+ const btVector3& worldPosB= m_rbB.getCenterOfMassTransform().getOrigin();
+ const btMatrix3x3& worldOrnB = m_rbB.getCenterOfMassTransform().getBasis();
+
+
+ info->m_J1linearAxis[0] = 1;
+ info->m_J1linearAxis[info->rowskip+1] = 1;
+ info->m_J1linearAxis[2*info->rowskip+2] = 1;
+
+ btVector3 a1 = worldOrnA*m_pivotInA;
+ {
+ btVector3* angular0 = (btVector3*)(info->m_J1angularAxis);
+ btVector3* angular1 = (btVector3*)(info->m_J1angularAxis+info->rowskip);
+ btVector3* angular2 = (btVector3*)(info->m_J1angularAxis+2*info->rowskip);
+ btVector3 a1neg = -a1;
+ a1neg.getSkewSymmetricMatrix(angular0,angular1,angular2);
+ }
+
+ if (info->m_J2linearAxis)
+ {
+ info->m_J2linearAxis[0] = -1;
+ info->m_J2linearAxis[info->rowskip+1] = -1;
+ info->m_J2linearAxis[2*info->rowskip+2] = -1;
+ }
+
+ btVector3 a2 = worldOrnB*m_pivotInB;
+
+ {
+ // btVector3 a2n = -a2;
+ btVector3* angular0 = (btVector3*)(info->m_J2angularAxis);
+ btVector3* angular1 = (btVector3*)(info->m_J2angularAxis+info->rowskip);
+ btVector3* angular2 = (btVector3*)(info->m_J2angularAxis+2*info->rowskip);
+ a2.getSkewSymmetricMatrix(angular0,angular1,angular2);
+ }
+
+ // set right hand side for the linear dofs
+ btScalar k = info->fps * info->erp;
+
+ btVector3 linearError = k*(a2+worldPosB-a1-worldPosA);
+ int j;
+ for (j=0; j<3; j++)
+ {
+
+
+
+ info->m_constraintError[j*info->rowskip] = linearError[j];
+ //printf("info->m_constraintError[%d]=%f\n",j,info->m_constraintError[j]);
+ }
+
+ //fix the 3 angular degrees of freedom
+
+ int start_row = 3;
+ int s = info->rowskip;
+ int start_index = start_row * s;
+
+ // 3 rows to make body rotations equal
+ info->m_J1angularAxis[start_index] = 1;
+ info->m_J1angularAxis[start_index + s + 1] = 1;
+ info->m_J1angularAxis[start_index + s*2+2] = 1;
+ if ( info->m_J2angularAxis)
+ {
+ info->m_J2angularAxis[start_index] = -1;
+ info->m_J2angularAxis[start_index + s+1] = -1;
+ info->m_J2angularAxis[start_index + s*2+2] = -1;
+ }
+
+ // set right hand side for the angular dofs
+
+ btVector3 diff;
+ btScalar angle;
+ btMatrix3x3 mrelCur = worldOrnA *worldOrnB.inverse();
+ btQuaternion qrelCur;
+ mrelCur.getRotation(qrelCur);
+ btTransformUtil::calculateDiffAxisAngleQuaternion(m_relTargetAB,qrelCur,diff,angle);
+ diff*=-angle;
+ for (j=0; j<3; j++)
+ {
+ info->m_constraintError[(3+j)*info->rowskip] = k * diff[j];
+ }
+
+} \ No newline at end of file
diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btFixedConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btFixedConstraint.h
new file mode 100644
index 00000000000..697e319e2ce
--- /dev/null
+++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btFixedConstraint.h
@@ -0,0 +1,49 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2013 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_FIXED_CONSTRAINT_H
+#define BT_FIXED_CONSTRAINT_H
+
+#include "btTypedConstraint.h"
+
+ATTRIBUTE_ALIGNED16(class) btFixedConstraint : public btTypedConstraint
+{
+ btVector3 m_pivotInA;
+ btVector3 m_pivotInB;
+ btQuaternion m_relTargetAB;
+
+public:
+ btFixedConstraint(btRigidBody& rbA,btRigidBody& rbB, const btTransform& frameInA,const btTransform& frameInB);
+
+ virtual ~btFixedConstraint();
+
+
+ virtual void getInfo1 (btConstraintInfo1* info);
+
+ virtual void getInfo2 (btConstraintInfo2* info);
+
+ virtual void setParam(int num, btScalar value, int axis = -1)
+ {
+ btAssert(0);
+ }
+ virtual btScalar getParam(int num, int axis = -1) const
+ {
+ btAssert(0);
+ return 0.f;
+ }
+
+};
+
+#endif //BT_FIXED_CONSTRAINT_H
diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGearConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGearConstraint.h
index 60f60094843..f9afcb91211 100644
--- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGearConstraint.h
+++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGearConstraint.h
@@ -19,6 +19,18 @@ subject to the following restrictions:
#define BT_GEAR_CONSTRAINT_H
#include "BulletDynamics/ConstraintSolver/btTypedConstraint.h"
+
+
+#ifdef BT_USE_DOUBLE_PRECISION
+#define btGearConstraintData btGearConstraintDoubleData
+#define btGearConstraintDataName "btGearConstraintDoubleData"
+#else
+#define btGearConstraintData btGearConstraintFloatData
+#define btGearConstraintDataName "btGearConstraintFloatData"
+#endif //BT_USE_DOUBLE_PRECISION
+
+
+
///The btGeatConstraint will couple the angular velocity for two bodies around given local axis and ratio.
///See Bullet/Demos/ConstraintDemo for an example use.
class btGearConstraint : public btTypedConstraint
@@ -39,18 +51,102 @@ public:
///internal method used by the constraint solver, don't use them directly
virtual void getInfo2 (btConstraintInfo2* info);
+ void setAxisA(btVector3& axisA)
+ {
+ m_axisInA = axisA;
+ }
+ void setAxisB(btVector3& axisB)
+ {
+ m_axisInB = axisB;
+ }
+ void setRatio(btScalar ratio)
+ {
+ m_ratio = ratio;
+ }
+ const btVector3& getAxisA() const
+ {
+ return m_axisInA;
+ }
+ const btVector3& getAxisB() const
+ {
+ return m_axisInB;
+ }
+ btScalar getRatio() const
+ {
+ return m_ratio;
+ }
+
+
virtual void setParam(int num, btScalar value, int axis = -1)
{
+ (void) num;
+ (void) value;
+ (void) axis;
btAssert(0);
- };
+ }
///return the local value of parameter
virtual btScalar getParam(int num, int axis = -1) const
{
+ (void) num;
+ (void) axis;
btAssert(0);
return 0.f;
}
+ virtual int calculateSerializeBufferSize() const;
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+ virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
+};
+
+
+
+
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btGearConstraintFloatData
+{
+ btTypedConstraintFloatData m_typeConstraintData;
+
+ btVector3FloatData m_axisInA;
+ btVector3FloatData m_axisInB;
+
+ float m_ratio;
+ char m_padding[4];
};
+struct btGearConstraintDoubleData
+{
+ btTypedConstraintDoubleData m_typeConstraintData;
+
+ btVector3DoubleData m_axisInA;
+ btVector3DoubleData m_axisInB;
+
+ double m_ratio;
+};
+
+SIMD_FORCE_INLINE int btGearConstraint::calculateSerializeBufferSize() const
+{
+ return sizeof(btGearConstraintData);
+}
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+SIMD_FORCE_INLINE const char* btGearConstraint::serialize(void* dataBuffer, btSerializer* serializer) const
+{
+ btGearConstraintData* gear = (btGearConstraintData*)dataBuffer;
+ btTypedConstraint::serialize(&gear->m_typeConstraintData,serializer);
+
+ m_axisInA.serialize( gear->m_axisInA );
+ m_axisInB.serialize( gear->m_axisInB );
+
+ gear->m_ratio = m_ratio;
+
+ return btGearConstraintDataName;
+}
+
+
+
+
+
+
#endif //BT_GEAR_CONSTRAINT_H
diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h
index 0409f95379b..431a524169e 100644
--- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h
+++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h
@@ -35,6 +35,14 @@ class btRigidBody;
+#ifdef BT_USE_DOUBLE_PRECISION
+#define btGeneric6DofConstraintData2 btGeneric6DofConstraintDoubleData2
+#define btGeneric6DofConstraintDataName "btGeneric6DofConstraintDoubleData2"
+#else
+#define btGeneric6DofConstraintData2 btGeneric6DofConstraintData
+#define btGeneric6DofConstraintDataName "btGeneric6DofConstraintData"
+#endif //BT_USE_DOUBLE_PRECISION
+
//! Rotation Limit structure for generic joints
class btRotationalLimitMotor
@@ -561,7 +569,7 @@ public:
};
-///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+
struct btGeneric6DofConstraintData
{
btTypedConstraintData m_typeConstraintData;
@@ -578,35 +586,51 @@ struct btGeneric6DofConstraintData
int m_useOffsetForConstraintFrame;
};
+struct btGeneric6DofConstraintDoubleData2
+{
+ btTypedConstraintDoubleData m_typeConstraintData;
+ btTransformDoubleData m_rbAFrame; // constraint axii. Assumes z is hinge axis.
+ btTransformDoubleData m_rbBFrame;
+
+ btVector3DoubleData m_linearUpperLimit;
+ btVector3DoubleData m_linearLowerLimit;
+
+ btVector3DoubleData m_angularUpperLimit;
+ btVector3DoubleData m_angularLowerLimit;
+
+ int m_useLinearReferenceFrameA;
+ int m_useOffsetForConstraintFrame;
+};
+
SIMD_FORCE_INLINE int btGeneric6DofConstraint::calculateSerializeBufferSize() const
{
- return sizeof(btGeneric6DofConstraintData);
+ return sizeof(btGeneric6DofConstraintData2);
}
///fills the dataBuffer and returns the struct name (and 0 on failure)
SIMD_FORCE_INLINE const char* btGeneric6DofConstraint::serialize(void* dataBuffer, btSerializer* serializer) const
{
- btGeneric6DofConstraintData* dof = (btGeneric6DofConstraintData*)dataBuffer;
+ btGeneric6DofConstraintData2* dof = (btGeneric6DofConstraintData2*)dataBuffer;
btTypedConstraint::serialize(&dof->m_typeConstraintData,serializer);
- m_frameInA.serializeFloat(dof->m_rbAFrame);
- m_frameInB.serializeFloat(dof->m_rbBFrame);
+ m_frameInA.serialize(dof->m_rbAFrame);
+ m_frameInB.serialize(dof->m_rbBFrame);
int i;
for (i=0;i<3;i++)
{
- dof->m_angularLowerLimit.m_floats[i] = float(m_angularLimits[i].m_loLimit);
- dof->m_angularUpperLimit.m_floats[i] = float(m_angularLimits[i].m_hiLimit);
- dof->m_linearLowerLimit.m_floats[i] = float(m_linearLimits.m_lowerLimit[i]);
- dof->m_linearUpperLimit.m_floats[i] = float(m_linearLimits.m_upperLimit[i]);
+ dof->m_angularLowerLimit.m_floats[i] = m_angularLimits[i].m_loLimit;
+ dof->m_angularUpperLimit.m_floats[i] = m_angularLimits[i].m_hiLimit;
+ dof->m_linearLowerLimit.m_floats[i] = m_linearLimits.m_lowerLimit[i];
+ dof->m_linearUpperLimit.m_floats[i] = m_linearLimits.m_upperLimit[i];
}
dof->m_useLinearReferenceFrameA = m_useLinearReferenceFrameA? 1 : 0;
dof->m_useOffsetForConstraintFrame = m_useOffsetForConstraintFrame ? 1 : 0;
- return "btGeneric6DofConstraintData";
+ return btGeneric6DofConstraintDataName;
}
diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.h
index 6fabb30369b..1b2e0f62ca8 100644
--- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.h
+++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.h
@@ -21,6 +21,15 @@ subject to the following restrictions:
#include "btTypedConstraint.h"
#include "btGeneric6DofConstraint.h"
+#ifdef BT_USE_DOUBLE_PRECISION
+#define btGeneric6DofSpringConstraintData2 btGeneric6DofSpringConstraintDoubleData2
+#define btGeneric6DofSpringConstraintDataName "btGeneric6DofSpringConstraintDoubleData2"
+#else
+#define btGeneric6DofSpringConstraintData2 btGeneric6DofSpringConstraintData
+#define btGeneric6DofSpringConstraintDataName "btGeneric6DofSpringConstraintData"
+#endif //BT_USE_DOUBLE_PRECISION
+
+
/// Generic 6 DOF constraint that allows to set spring motors to any translational and rotational DOF
@@ -65,7 +74,6 @@ public:
};
-///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
struct btGeneric6DofSpringConstraintData
{
btGeneric6DofConstraintData m_6dofData;
@@ -76,26 +84,37 @@ struct btGeneric6DofSpringConstraintData
float m_springDamping[6];
};
+struct btGeneric6DofSpringConstraintDoubleData2
+{
+ btGeneric6DofConstraintDoubleData2 m_6dofData;
+
+ int m_springEnabled[6];
+ double m_equilibriumPoint[6];
+ double m_springStiffness[6];
+ double m_springDamping[6];
+};
+
+
SIMD_FORCE_INLINE int btGeneric6DofSpringConstraint::calculateSerializeBufferSize() const
{
- return sizeof(btGeneric6DofSpringConstraintData);
+ return sizeof(btGeneric6DofSpringConstraintData2);
}
///fills the dataBuffer and returns the struct name (and 0 on failure)
SIMD_FORCE_INLINE const char* btGeneric6DofSpringConstraint::serialize(void* dataBuffer, btSerializer* serializer) const
{
- btGeneric6DofSpringConstraintData* dof = (btGeneric6DofSpringConstraintData*)dataBuffer;
+ btGeneric6DofSpringConstraintData2* dof = (btGeneric6DofSpringConstraintData2*)dataBuffer;
btGeneric6DofConstraint::serialize(&dof->m_6dofData,serializer);
int i;
for (i=0;i<6;i++)
{
- dof->m_equilibriumPoint[i] = (float)m_equilibriumPoint[i];
- dof->m_springDamping[i] = (float)m_springDamping[i];
+ dof->m_equilibriumPoint[i] = m_equilibriumPoint[i];
+ dof->m_springDamping[i] = m_springDamping[i];
dof->m_springEnabled[i] = m_springEnabled[i]? 1 : 0;
- dof->m_springStiffness[i] = (float)m_springStiffness[i];
+ dof->m_springStiffness[i] = m_springStiffness[i];
}
- return "btGeneric6DofSpringConstraintData";
+ return btGeneric6DofSpringConstraintDataName;
}
#endif // BT_GENERIC_6DOF_SPRING_CONSTRAINT_H
diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.h
index a7f2cca5500..7c33ac24e05 100644
--- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.h
+++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.h
@@ -28,8 +28,8 @@ subject to the following restrictions:
class btRigidBody;
#ifdef BT_USE_DOUBLE_PRECISION
-#define btHingeConstraintData btHingeConstraintDoubleData
-#define btHingeConstraintDataName "btHingeConstraintDoubleData"
+#define btHingeConstraintData btHingeConstraintDoubleData2 //rename to 2 for backwards compatibility, so we can still load the 'btHingeConstraintDoubleData' version
+#define btHingeConstraintDataName "btHingeConstraintDoubleData2"
#else
#define btHingeConstraintData btHingeConstraintFloatData
#define btHingeConstraintDataName "btHingeConstraintFloatData"
@@ -302,7 +302,10 @@ public:
};
-///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+
+//only for backward compatibility
+#ifdef BT_BACKWARDS_COMPATIBLE_SERIALIZATION
+///this structure is not used, except for loading pre-2.82 .bullet files
struct btHingeConstraintDoubleData
{
btTypedConstraintData m_typeConstraintData;
@@ -321,7 +324,9 @@ struct btHingeConstraintDoubleData
float m_relaxationFactor;
};
-///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+#endif //BT_BACKWARDS_COMPATIBLE_SERIALIZATION
+
+
struct btHingeConstraintFloatData
{
btTypedConstraintData m_typeConstraintData;
@@ -344,6 +349,30 @@ struct btHingeConstraintFloatData
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btHingeConstraintDoubleData2
+{
+ btTypedConstraintDoubleData m_typeConstraintData;
+ btTransformDoubleData m_rbAFrame; // constraint axii. Assumes z is hinge axis.
+ btTransformDoubleData m_rbBFrame;
+ int m_useReferenceFrameA;
+ int m_angularOnly;
+ int m_enableAngularMotor;
+ double m_motorTargetVelocity;
+ double m_maxMotorImpulse;
+
+ double m_lowerLimit;
+ double m_upperLimit;
+ double m_limitSoftness;
+ double m_biasFactor;
+ double m_relaxationFactor;
+ char m_padding1[4];
+
+};
+
+
+
+
SIMD_FORCE_INLINE int btHingeConstraint::calculateSerializeBufferSize() const
{
return sizeof(btHingeConstraintData);
diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h
index 1e13416dfeb..91218949498 100644
--- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h
+++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h
@@ -24,10 +24,10 @@ class btRigidBody;
#ifdef BT_USE_DOUBLE_PRECISION
-#define btPoint2PointConstraintData btPoint2PointConstraintDoubleData
-#define btPoint2PointConstraintDataName "btPoint2PointConstraintDoubleData"
+#define btPoint2PointConstraintData2 btPoint2PointConstraintDoubleData2
+#define btPoint2PointConstraintDataName "btPoint2PointConstraintDoubleData2"
#else
-#define btPoint2PointConstraintData btPoint2PointConstraintFloatData
+#define btPoint2PointConstraintData2 btPoint2PointConstraintFloatData
#define btPoint2PointConstraintDataName "btPoint2PointConstraintFloatData"
#endif //BT_USE_DOUBLE_PRECISION
@@ -134,24 +134,36 @@ struct btPoint2PointConstraintFloatData
};
///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btPoint2PointConstraintDoubleData2
+{
+ btTypedConstraintDoubleData m_typeConstraintData;
+ btVector3DoubleData m_pivotInA;
+ btVector3DoubleData m_pivotInB;
+};
+
+#ifdef BT_BACKWARDS_COMPATIBLE_SERIALIZATION
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+///this structure is not used, except for loading pre-2.82 .bullet files
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
struct btPoint2PointConstraintDoubleData
{
btTypedConstraintData m_typeConstraintData;
btVector3DoubleData m_pivotInA;
btVector3DoubleData m_pivotInB;
};
+#endif //BT_BACKWARDS_COMPATIBLE_SERIALIZATION
SIMD_FORCE_INLINE int btPoint2PointConstraint::calculateSerializeBufferSize() const
{
- return sizeof(btPoint2PointConstraintData);
+ return sizeof(btPoint2PointConstraintData2);
}
///fills the dataBuffer and returns the struct name (and 0 on failure)
SIMD_FORCE_INLINE const char* btPoint2PointConstraint::serialize(void* dataBuffer, btSerializer* serializer) const
{
- btPoint2PointConstraintData* p2pData = (btPoint2PointConstraintData*)dataBuffer;
+ btPoint2PointConstraintData2* p2pData = (btPoint2PointConstraintData2*)dataBuffer;
btTypedConstraint::serialize(&p2pData->m_typeConstraintData,serializer);
m_pivotInA.serialize(p2pData->m_pivotInA);
diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp
index 5f9437b7add..be93e35434c 100644
--- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp
+++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp
@@ -152,7 +152,7 @@ void btSequentialImpulseConstraintSolver::resolveSingleConstraintRowGenericSIMD(
#endif
}
-// Project Gauss Seidel or the equivalent Sequential Impulse
+// Projected Gauss Seidel or the equivalent Sequential Impulse
void btSequentialImpulseConstraintSolver::resolveSingleConstraintRowLowerLimit(btSolverBody& body1,btSolverBody& body2,const btSolverConstraint& c)
{
btScalar deltaImpulse = c.m_rhs-btScalar(c.m_appliedImpulse)*c.m_cfm;
@@ -280,7 +280,7 @@ int btSequentialImpulseConstraintSolver::btRandInt2 (int n)
-void btSequentialImpulseConstraintSolver::initSolverBody(btSolverBody* solverBody, btCollisionObject* collisionObject)
+void btSequentialImpulseConstraintSolver::initSolverBody(btSolverBody* solverBody, btCollisionObject* collisionObject, btScalar timeStep)
{
btRigidBody* rb = collisionObject? btRigidBody::upcast(collisionObject) : 0;
@@ -299,6 +299,9 @@ void btSequentialImpulseConstraintSolver::initSolverBody(btSolverBody* solverBod
solverBody->m_linearFactor = rb->getLinearFactor();
solverBody->m_linearVelocity = rb->getLinearVelocity();
solverBody->m_angularVelocity = rb->getAngularVelocity();
+ solverBody->m_externalForceImpulse = rb->getTotalForce()*rb->getInvMass()*timeStep;
+ solverBody->m_externalTorqueImpulse = rb->getTotalTorque()*rb->getInvInertiaTensorWorld()*timeStep ;
+
} else
{
solverBody->m_worldTransform.setIdentity();
@@ -308,6 +311,8 @@ void btSequentialImpulseConstraintSolver::initSolverBody(btSolverBody* solverBod
solverBody->m_linearFactor.setValue(1,1,1);
solverBody->m_linearVelocity.setValue(0,0,0);
solverBody->m_angularVelocity.setValue(0,0,0);
+ solverBody->m_externalForceImpulse.setValue(0,0,0);
+ solverBody->m_externalTorqueImpulse.setValue(0,0,0);
}
@@ -326,8 +331,7 @@ btScalar btSequentialImpulseConstraintSolver::restitutionCurve(btScalar rel_vel,
-static void applyAnisotropicFriction(btCollisionObject* colObj,btVector3& frictionDirection, int frictionMode);
-static void applyAnisotropicFriction(btCollisionObject* colObj,btVector3& frictionDirection, int frictionMode)
+void btSequentialImpulseConstraintSolver::applyAnisotropicFriction(btCollisionObject* colObj,btVector3& frictionDirection, int frictionMode)
{
@@ -351,8 +355,6 @@ void btSequentialImpulseConstraintSolver::setupFrictionConstraint(btSolverConstr
{
- solverConstraint.m_contactNormal1 = normalAxis;
- solverConstraint.m_contactNormal2 = -normalAxis;
btSolverBody& solverBodyA = m_tmpSolverBodyPool[solverBodyIdA];
btSolverBody& solverBodyB = m_tmpSolverBodyPool[solverBodyIdB];
@@ -368,15 +370,30 @@ void btSequentialImpulseConstraintSolver::setupFrictionConstraint(btSolverConstr
solverConstraint.m_appliedImpulse = 0.f;
solverConstraint.m_appliedPushImpulse = 0.f;
+ if (body0)
{
+ solverConstraint.m_contactNormal1 = normalAxis;
btVector3 ftorqueAxis1 = rel_pos1.cross(solverConstraint.m_contactNormal1);
solverConstraint.m_relpos1CrossNormal = ftorqueAxis1;
- solverConstraint.m_angularComponentA = body0 ? body0->getInvInertiaTensorWorld()*ftorqueAxis1*body0->getAngularFactor() : btVector3(0,0,0);
+ solverConstraint.m_angularComponentA = body0->getInvInertiaTensorWorld()*ftorqueAxis1*body0->getAngularFactor();
+ }else
+ {
+ solverConstraint.m_contactNormal1.setZero();
+ solverConstraint.m_relpos1CrossNormal.setZero();
+ solverConstraint.m_angularComponentA .setZero();
}
+
+ if (body1)
{
+ solverConstraint.m_contactNormal2 = -normalAxis;
btVector3 ftorqueAxis1 = rel_pos2.cross(solverConstraint.m_contactNormal2);
solverConstraint.m_relpos2CrossNormal = ftorqueAxis1;
- solverConstraint.m_angularComponentB = body1 ? body1->getInvInertiaTensorWorld()*ftorqueAxis1*body1->getAngularFactor() : btVector3(0,0,0);
+ solverConstraint.m_angularComponentB = body1->getInvInertiaTensorWorld()*ftorqueAxis1*body1->getAngularFactor();
+ } else
+ {
+ solverConstraint.m_contactNormal2.setZero();
+ solverConstraint.m_relpos2CrossNormal.setZero();
+ solverConstraint.m_angularComponentB.setZero();
}
{
@@ -401,9 +418,9 @@ void btSequentialImpulseConstraintSolver::setupFrictionConstraint(btSolverConstr
btScalar rel_vel;
- btScalar vel1Dotn = solverConstraint.m_contactNormal1.dot(body0?solverBodyA.m_linearVelocity:btVector3(0,0,0))
+ btScalar vel1Dotn = solverConstraint.m_contactNormal1.dot(body0?solverBodyA.m_linearVelocity+solverBodyA.m_externalForceImpulse:btVector3(0,0,0))
+ solverConstraint.m_relpos1CrossNormal.dot(body0?solverBodyA.m_angularVelocity:btVector3(0,0,0));
- btScalar vel2Dotn = solverConstraint.m_contactNormal2.dot(body1?solverBodyB.m_linearVelocity:btVector3(0,0,0))
+ btScalar vel2Dotn = solverConstraint.m_contactNormal2.dot(body1?solverBodyB.m_linearVelocity+solverBodyB.m_externalForceImpulse:btVector3(0,0,0))
+ solverConstraint.m_relpos2CrossNormal.dot(body1?solverBodyB.m_angularVelocity:btVector3(0,0,0));
rel_vel = vel1Dotn+vel2Dotn;
@@ -414,8 +431,8 @@ void btSequentialImpulseConstraintSolver::setupFrictionConstraint(btSolverConstr
btSimdScalar velocityImpulse = velocityError * btSimdScalar(solverConstraint.m_jacDiagABInv);
solverConstraint.m_rhs = velocityImpulse;
solverConstraint.m_cfm = cfmSlip;
- solverConstraint.m_lowerLimit = 0;
- solverConstraint.m_upperLimit = 1e10f;
+ solverConstraint.m_lowerLimit = -solverConstraint.m_friction;
+ solverConstraint.m_upperLimit = solverConstraint.m_friction;
}
}
@@ -481,9 +498,9 @@ void btSequentialImpulseConstraintSolver::setupRollingFrictionConstraint( btSolv
btScalar rel_vel;
- btScalar vel1Dotn = solverConstraint.m_contactNormal1.dot(body0?solverBodyA.m_linearVelocity:btVector3(0,0,0))
+ btScalar vel1Dotn = solverConstraint.m_contactNormal1.dot(body0?solverBodyA.m_linearVelocity+solverBodyA.m_externalForceImpulse:btVector3(0,0,0))
+ solverConstraint.m_relpos1CrossNormal.dot(body0?solverBodyA.m_angularVelocity:btVector3(0,0,0));
- btScalar vel2Dotn = solverConstraint.m_contactNormal2.dot(body1?solverBodyB.m_linearVelocity:btVector3(0,0,0))
+ btScalar vel2Dotn = solverConstraint.m_contactNormal2.dot(body1?solverBodyB.m_linearVelocity+solverBodyB.m_externalForceImpulse:btVector3(0,0,0))
+ solverConstraint.m_relpos2CrossNormal.dot(body1?solverBodyB.m_angularVelocity:btVector3(0,0,0));
rel_vel = vel1Dotn+vel2Dotn;
@@ -494,8 +511,8 @@ void btSequentialImpulseConstraintSolver::setupRollingFrictionConstraint( btSolv
btSimdScalar velocityImpulse = velocityError * btSimdScalar(solverConstraint.m_jacDiagABInv);
solverConstraint.m_rhs = velocityImpulse;
solverConstraint.m_cfm = cfmSlip;
- solverConstraint.m_lowerLimit = 0;
- solverConstraint.m_upperLimit = 1e10f;
+ solverConstraint.m_lowerLimit = -solverConstraint.m_friction;
+ solverConstraint.m_upperLimit = solverConstraint.m_friction;
}
}
@@ -517,7 +534,7 @@ btSolverConstraint& btSequentialImpulseConstraintSolver::addRollingFrictionConst
}
-int btSequentialImpulseConstraintSolver::getOrInitSolverBody(btCollisionObject& body)
+int btSequentialImpulseConstraintSolver::getOrInitSolverBody(btCollisionObject& body,btScalar timeStep)
{
int solverBodyIdA = -1;
@@ -535,11 +552,19 @@ int btSequentialImpulseConstraintSolver::getOrInitSolverBody(btCollisionObject&
{
solverBodyIdA = m_tmpSolverBodyPool.size();
btSolverBody& solverBody = m_tmpSolverBodyPool.expand();
- initSolverBody(&solverBody,&body);
+ initSolverBody(&solverBody,&body,timeStep);
body.setCompanionId(solverBodyIdA);
} else
{
- return 0;//assume first one is a fixed solver body
+
+ if (m_fixedBodyId<0)
+ {
+ m_fixedBodyId = m_tmpSolverBodyPool.size();
+ btSolverBody& fixedBody = m_tmpSolverBodyPool.expand();
+ initSolverBody(&fixedBody,0,timeStep);
+ }
+ return m_fixedBodyId;
+// return 0;//assume first one is a fixed solver body
}
}
@@ -552,8 +577,8 @@ int btSequentialImpulseConstraintSolver::getOrInitSolverBody(btCollisionObject&
void btSequentialImpulseConstraintSolver::setupContactConstraint(btSolverConstraint& solverConstraint,
int solverBodyIdA, int solverBodyIdB,
btManifoldPoint& cp, const btContactSolverInfo& infoGlobal,
- btVector3& vel, btScalar& rel_vel, btScalar& relaxation,
- btVector3& rel_pos1, btVector3& rel_pos2)
+ btScalar& relaxation,
+ const btVector3& rel_pos1, const btVector3& rel_pos2)
{
const btVector3& pos1 = cp.getPositionWorldOnA();
@@ -567,8 +592,8 @@ void btSequentialImpulseConstraintSolver::setupContactConstraint(btSolverConstra
// btVector3 rel_pos1 = pos1 - colObj0->getWorldTransform().getOrigin();
// btVector3 rel_pos2 = pos2 - colObj1->getWorldTransform().getOrigin();
- rel_pos1 = pos1 - bodyA->getWorldTransform().getOrigin();
- rel_pos2 = pos2 - bodyB->getWorldTransform().getOrigin();
+ //rel_pos1 = pos1 - bodyA->getWorldTransform().getOrigin();
+ //rel_pos2 = pos2 - bodyB->getWorldTransform().getOrigin();
relaxation = 1.f;
@@ -601,10 +626,24 @@ void btSequentialImpulseConstraintSolver::setupContactConstraint(btSolverConstra
solverConstraint.m_jacDiagABInv = denom;
}
- solverConstraint.m_contactNormal1 = cp.m_normalWorldOnB;
- solverConstraint.m_contactNormal2 = -cp.m_normalWorldOnB;
- solverConstraint.m_relpos1CrossNormal = torqueAxis0;
- solverConstraint.m_relpos2CrossNormal = -torqueAxis1;
+ if (rb0)
+ {
+ solverConstraint.m_contactNormal1 = cp.m_normalWorldOnB;
+ solverConstraint.m_relpos1CrossNormal = torqueAxis0;
+ } else
+ {
+ solverConstraint.m_contactNormal1.setZero();
+ solverConstraint.m_relpos1CrossNormal.setZero();
+ }
+ if (rb1)
+ {
+ solverConstraint.m_contactNormal2 = -cp.m_normalWorldOnB;
+ solverConstraint.m_relpos2CrossNormal = -torqueAxis1;
+ }else
+ {
+ solverConstraint.m_contactNormal2.setZero();
+ solverConstraint.m_relpos2CrossNormal.setZero();
+ }
btScalar restitution = 0.f;
btScalar penetration = cp.getDistance()+infoGlobal.m_linearSlop;
@@ -616,8 +655,8 @@ void btSequentialImpulseConstraintSolver::setupContactConstraint(btSolverConstra
vel2 = rb1? rb1->getVelocityInLocalPoint(rel_pos2) : btVector3(0,0,0);
// btVector3 vel2 = rb1 ? rb1->getVelocityInLocalPoint(rel_pos2) : btVector3(0,0,0);
- vel = vel1 - vel2;
- rel_vel = cp.m_normalWorldOnB.dot(vel);
+ btVector3 vel = vel1 - vel2;
+ btScalar rel_vel = cp.m_normalWorldOnB.dot(vel);
@@ -648,10 +687,17 @@ void btSequentialImpulseConstraintSolver::setupContactConstraint(btSolverConstra
solverConstraint.m_appliedPushImpulse = 0.f;
{
- btScalar vel1Dotn = solverConstraint.m_contactNormal1.dot(rb0?bodyA->m_linearVelocity:btVector3(0,0,0))
- + solverConstraint.m_relpos1CrossNormal.dot(rb0?bodyA->m_angularVelocity:btVector3(0,0,0));
- btScalar vel2Dotn = solverConstraint.m_contactNormal2.dot(rb1?bodyB->m_linearVelocity:btVector3(0,0,0))
- + solverConstraint.m_relpos2CrossNormal.dot(rb1?bodyB->m_angularVelocity:btVector3(0,0,0));
+
+ btVector3 externalForceImpulseA = bodyA->m_originalBody ? bodyA->m_externalForceImpulse: btVector3(0,0,0);
+ btVector3 externalTorqueImpulseA = bodyA->m_originalBody ? bodyA->m_externalTorqueImpulse: btVector3(0,0,0);
+ btVector3 externalForceImpulseB = bodyB->m_originalBody ? bodyB->m_externalForceImpulse: btVector3(0,0,0);
+ btVector3 externalTorqueImpulseB = bodyB->m_originalBody ?bodyB->m_externalTorqueImpulse : btVector3(0,0,0);
+
+
+ btScalar vel1Dotn = solverConstraint.m_contactNormal1.dot(bodyA->m_linearVelocity+externalForceImpulseA)
+ + solverConstraint.m_relpos1CrossNormal.dot(bodyA->m_angularVelocity+externalTorqueImpulseA);
+ btScalar vel2Dotn = solverConstraint.m_contactNormal2.dot(bodyB->m_linearVelocity+externalForceImpulseB)
+ + solverConstraint.m_relpos2CrossNormal.dot(bodyB->m_angularVelocity+externalTorqueImpulseB);
btScalar rel_vel = vel1Dotn+vel2Dotn;
btScalar positionalError = 0.f;
@@ -680,7 +726,7 @@ void btSequentialImpulseConstraintSolver::setupContactConstraint(btSolverConstra
if (!infoGlobal.m_splitImpulse || (penetration > infoGlobal.m_splitImpulsePenetrationThreshold))
{
//combine position and velocity into rhs
- solverConstraint.m_rhs = penetrationImpulse+velocityImpulse;
+ solverConstraint.m_rhs = penetrationImpulse+velocityImpulse;//-solverConstraint.m_contactNormal1.dot(bodyA->m_externalForce*bodyA->m_invMass-bodyB->m_externalForce/bodyB->m_invMass)*solverConstraint.m_jacDiagABInv;
solverConstraint.m_rhsPenetration = 0.f;
} else
@@ -754,8 +800,8 @@ void btSequentialImpulseConstraintSolver::convertContact(btPersistentManifold* m
colObj0 = (btCollisionObject*)manifold->getBody0();
colObj1 = (btCollisionObject*)manifold->getBody1();
- int solverBodyIdA = getOrInitSolverBody(*colObj0);
- int solverBodyIdB = getOrInitSolverBody(*colObj1);
+ int solverBodyIdA = getOrInitSolverBody(*colObj0,infoGlobal.m_timeStep);
+ int solverBodyIdB = getOrInitSolverBody(*colObj1,infoGlobal.m_timeStep);
// btRigidBody* bodyA = btRigidBody::upcast(colObj0);
// btRigidBody* bodyB = btRigidBody::upcast(colObj1);
@@ -780,19 +826,35 @@ void btSequentialImpulseConstraintSolver::convertContact(btPersistentManifold* m
btVector3 rel_pos1;
btVector3 rel_pos2;
btScalar relaxation;
- btScalar rel_vel;
- btVector3 vel;
+
int frictionIndex = m_tmpSolverContactConstraintPool.size();
btSolverConstraint& solverConstraint = m_tmpSolverContactConstraintPool.expandNonInitializing();
-// btRigidBody* rb0 = btRigidBody::upcast(colObj0);
-// btRigidBody* rb1 = btRigidBody::upcast(colObj1);
+ btRigidBody* rb0 = btRigidBody::upcast(colObj0);
+ btRigidBody* rb1 = btRigidBody::upcast(colObj1);
solverConstraint.m_solverBodyIdA = solverBodyIdA;
solverConstraint.m_solverBodyIdB = solverBodyIdB;
solverConstraint.m_originalContactPoint = &cp;
- setupContactConstraint(solverConstraint, solverBodyIdA, solverBodyIdB, cp, infoGlobal, vel, rel_vel, relaxation, rel_pos1, rel_pos2);
+ const btVector3& pos1 = cp.getPositionWorldOnA();
+ const btVector3& pos2 = cp.getPositionWorldOnB();
+
+ rel_pos1 = pos1 - colObj0->getWorldTransform().getOrigin();
+ rel_pos2 = pos2 - colObj1->getWorldTransform().getOrigin();
+
+ btVector3 vel1;// = rb0 ? rb0->getVelocityInLocalPoint(rel_pos1) : btVector3(0,0,0);
+ btVector3 vel2;// = rb1 ? rb1->getVelocityInLocalPoint(rel_pos2) : btVector3(0,0,0);
+
+ solverBodyA->getVelocityInLocalPointNoDelta(rel_pos1,vel1);
+ solverBodyB->getVelocityInLocalPointNoDelta(rel_pos2,vel2 );
+
+ btVector3 vel = vel1 - vel2;
+ btScalar rel_vel = cp.m_normalWorldOnB.dot(vel);
+
+ setupContactConstraint(solverConstraint, solverBodyIdA, solverBodyIdB, cp, infoGlobal, relaxation, rel_pos1, rel_pos2);
+
+
// const btVector3& pos1 = cp.getPositionWorldOnA();
// const btVector3& pos2 = cp.getPositionWorldOnB();
@@ -801,9 +863,11 @@ void btSequentialImpulseConstraintSolver::convertContact(btPersistentManifold* m
solverConstraint.m_frictionIndex = m_tmpSolverContactFrictionConstraintPool.size();
- btVector3 angVelA,angVelB;
- solverBodyA->getAngularVelocity(angVelA);
- solverBodyB->getAngularVelocity(angVelB);
+ btVector3 angVelA(0,0,0),angVelB(0,0,0);
+ if (rb0)
+ angVelA = rb0->getAngularVelocity();
+ if (rb1)
+ angVelB = rb1->getAngularVelocity();
btVector3 relAngVel = angVelB-angVelA;
if ((cp.m_combinedRollingFriction>0.f) && (rollingFriction>0))
@@ -857,6 +921,10 @@ void btSequentialImpulseConstraintSolver::convertContact(btPersistentManifold* m
if (!(infoGlobal.m_solverMode & SOLVER_DISABLE_VELOCITY_DEPENDENT_FRICTION_DIRECTION) && lat_rel_vel > SIMD_EPSILON)
{
cp.m_lateralFrictionDir1 *= 1.f/btSqrt(lat_rel_vel);
+ applyAnisotropicFriction(colObj0,cp.m_lateralFrictionDir1,btCollisionObject::CF_ANISOTROPIC_FRICTION);
+ applyAnisotropicFriction(colObj1,cp.m_lateralFrictionDir1,btCollisionObject::CF_ANISOTROPIC_FRICTION);
+ addFrictionConstraint(cp.m_lateralFrictionDir1,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation);
+
if((infoGlobal.m_solverMode & SOLVER_USE_2_FRICTION_DIRECTIONS))
{
cp.m_lateralFrictionDir2 = cp.m_lateralFrictionDir1.cross(cp.m_normalWorldOnB);
@@ -864,17 +932,16 @@ void btSequentialImpulseConstraintSolver::convertContact(btPersistentManifold* m
applyAnisotropicFriction(colObj0,cp.m_lateralFrictionDir2,btCollisionObject::CF_ANISOTROPIC_FRICTION);
applyAnisotropicFriction(colObj1,cp.m_lateralFrictionDir2,btCollisionObject::CF_ANISOTROPIC_FRICTION);
addFrictionConstraint(cp.m_lateralFrictionDir2,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation);
-
}
- applyAnisotropicFriction(colObj0,cp.m_lateralFrictionDir1,btCollisionObject::CF_ANISOTROPIC_FRICTION);
- applyAnisotropicFriction(colObj1,cp.m_lateralFrictionDir1,btCollisionObject::CF_ANISOTROPIC_FRICTION);
- addFrictionConstraint(cp.m_lateralFrictionDir1,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation);
-
} else
{
btPlaneSpace1(cp.m_normalWorldOnB,cp.m_lateralFrictionDir1,cp.m_lateralFrictionDir2);
+ applyAnisotropicFriction(colObj0,cp.m_lateralFrictionDir1,btCollisionObject::CF_ANISOTROPIC_FRICTION);
+ applyAnisotropicFriction(colObj1,cp.m_lateralFrictionDir1,btCollisionObject::CF_ANISOTROPIC_FRICTION);
+ addFrictionConstraint(cp.m_lateralFrictionDir1,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation);
+
if ((infoGlobal.m_solverMode & SOLVER_USE_2_FRICTION_DIRECTIONS))
{
applyAnisotropicFriction(colObj0,cp.m_lateralFrictionDir2,btCollisionObject::CF_ANISOTROPIC_FRICTION);
@@ -882,9 +949,6 @@ void btSequentialImpulseConstraintSolver::convertContact(btPersistentManifold* m
addFrictionConstraint(cp.m_lateralFrictionDir2,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation);
}
- applyAnisotropicFriction(colObj0,cp.m_lateralFrictionDir1,btCollisionObject::CF_ANISOTROPIC_FRICTION);
- applyAnisotropicFriction(colObj1,cp.m_lateralFrictionDir1,btCollisionObject::CF_ANISOTROPIC_FRICTION);
- addFrictionConstraint(cp.m_lateralFrictionDir1,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation);
if ((infoGlobal.m_solverMode & SOLVER_USE_2_FRICTION_DIRECTIONS) && (infoGlobal.m_solverMode & SOLVER_DISABLE_VELOCITY_DEPENDENT_FRICTION_DIRECTION))
{
@@ -899,8 +963,8 @@ void btSequentialImpulseConstraintSolver::convertContact(btPersistentManifold* m
if ((infoGlobal.m_solverMode & SOLVER_USE_2_FRICTION_DIRECTIONS))
addFrictionConstraint(cp.m_lateralFrictionDir2,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation, cp.m_contactMotion2, cp.m_contactCFM2);
- setFrictionConstraintImpulse( solverConstraint, solverBodyIdA, solverBodyIdB, cp, infoGlobal);
}
+ setFrictionConstraintImpulse( solverConstraint, solverBodyIdA, solverBodyIdB, cp, infoGlobal);
@@ -909,10 +973,24 @@ void btSequentialImpulseConstraintSolver::convertContact(btPersistentManifold* m
}
}
-btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup(btCollisionObject** bodies, int numBodies, btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc)
+void btSequentialImpulseConstraintSolver::convertContacts(btPersistentManifold** manifoldPtr,int numManifolds, const btContactSolverInfo& infoGlobal)
+{
+ int i;
+ btPersistentManifold* manifold = 0;
+// btCollisionObject* colObj0=0,*colObj1=0;
+
+
+ for (i=0;i<numManifolds;i++)
+ {
+ manifold = manifoldPtr[i];
+ convertContact(manifold,infoGlobal);
+ }
+}
+
+btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup(btCollisionObject** bodies, int numBodies, btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer)
{
+ m_fixedBodyId = -1;
BT_PROFILE("solveGroupCacheFriendlySetup");
- (void)stackAlloc;
(void)debugDrawer;
m_maxOverrideNumSolverIterations = 0;
@@ -996,14 +1074,15 @@ btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup(btCol
m_tmpSolverBodyPool.reserve(numBodies+1);
m_tmpSolverBodyPool.resize(0);
- btSolverBody& fixedBody = m_tmpSolverBodyPool.expand();
- initSolverBody(&fixedBody,0);
+ //btSolverBody& fixedBody = m_tmpSolverBodyPool.expand();
+ //initSolverBody(&fixedBody,0);
//convert all bodies
for (int i=0;i<numBodies;i++)
{
- int bodyId = getOrInitSolverBody(*bodies[i]);
+ int bodyId = getOrInitSolverBody(*bodies[i],infoGlobal.m_timeStep);
+
btRigidBody* body = btRigidBody::upcast(bodies[i]);
if (body && body->getInvMass())
{
@@ -1012,9 +1091,8 @@ btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup(btCol
if (body->getFlags()&BT_ENABLE_GYROPSCOPIC_FORCE)
{
gyroForce = body->computeGyroscopicForce(infoGlobal.m_maxGyroscopicForce);
+ solverBody.m_externalTorqueImpulse -= gyroForce*body->getInvInertiaTensorWorld()*infoGlobal.m_timeStep;
}
- solverBody.m_linearVelocity += body->getTotalForce()*body->getInvMass()*infoGlobal.m_timeStep;
- solverBody.m_angularVelocity += (body->getTotalTorque()-gyroForce)*body->getInvInertiaTensorWorld()*infoGlobal.m_timeStep;
}
}
@@ -1084,8 +1162,8 @@ btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup(btCol
btRigidBody& rbA = constraint->getRigidBodyA();
btRigidBody& rbB = constraint->getRigidBodyB();
- int solverBodyIdA = getOrInitSolverBody(rbA);
- int solverBodyIdB = getOrInitSolverBody(rbB);
+ int solverBodyIdA = getOrInitSolverBody(rbA,infoGlobal.m_timeStep);
+ int solverBodyIdB = getOrInitSolverBody(rbB,infoGlobal.m_timeStep);
btSolverBody* bodyAPtr = &m_tmpSolverBodyPool[solverBodyIdA];
btSolverBody* bodyBPtr = &m_tmpSolverBodyPool[solverBodyIdB];
@@ -1182,15 +1260,22 @@ btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup(btCol
}
- ///fix rhs
- ///todo: add force/torque accelerators
+
{
btScalar rel_vel;
- btScalar vel1Dotn = solverConstraint.m_contactNormal1.dot(rbA.getLinearVelocity()) + solverConstraint.m_relpos1CrossNormal.dot(rbA.getAngularVelocity());
- btScalar vel2Dotn = solverConstraint.m_contactNormal2.dot(rbB.getLinearVelocity()) + solverConstraint.m_relpos2CrossNormal.dot(rbB.getAngularVelocity());
+ btVector3 externalForceImpulseA = bodyAPtr->m_originalBody ? bodyAPtr->m_externalForceImpulse : btVector3(0,0,0);
+ btVector3 externalTorqueImpulseA = bodyAPtr->m_originalBody ? bodyAPtr->m_externalTorqueImpulse : btVector3(0,0,0);
+
+ btVector3 externalForceImpulseB = bodyBPtr->m_originalBody ? bodyBPtr->m_externalForceImpulse : btVector3(0,0,0);
+ btVector3 externalTorqueImpulseB = bodyBPtr->m_originalBody ?bodyBPtr->m_externalTorqueImpulse : btVector3(0,0,0);
+
+ btScalar vel1Dotn = solverConstraint.m_contactNormal1.dot(rbA.getLinearVelocity()+externalForceImpulseA)
+ + solverConstraint.m_relpos1CrossNormal.dot(rbA.getAngularVelocity()+externalTorqueImpulseA);
+
+ btScalar vel2Dotn = solverConstraint.m_contactNormal2.dot(rbB.getLinearVelocity()+externalForceImpulseB)
+ + solverConstraint.m_relpos2CrossNormal.dot(rbB.getAngularVelocity()+externalTorqueImpulseB);
rel_vel = vel1Dotn+vel2Dotn;
-
btScalar restitution = 0.f;
btScalar positionalError = solverConstraint.m_rhs;//already filled in by getConstraintInfo2
btScalar velocityError = restitution - rel_vel * info2.m_damping;
@@ -1199,6 +1284,7 @@ btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup(btCol
solverConstraint.m_rhs = penetrationImpulse+velocityImpulse;
solverConstraint.m_appliedImpulse = 0.f;
+
}
}
}
@@ -1206,18 +1292,8 @@ btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup(btCol
}
}
- {
- int i;
- btPersistentManifold* manifold = 0;
-// btCollisionObject* colObj0=0,*colObj1=0;
-
+ convertContacts(manifoldPtr,numManifolds,infoGlobal);
- for (i=0;i<numManifolds;i++)
- {
- manifold = manifoldPtr[i];
- convertContact(manifold,infoGlobal);
- }
- }
}
// btContactSolverInfo info = infoGlobal;
@@ -1256,7 +1332,7 @@ btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup(btCol
}
-btScalar btSequentialImpulseConstraintSolver::solveSingleIteration(int iteration, btCollisionObject** /*bodies */,int /*numBodies*/,btPersistentManifold** /*manifoldPtr*/, int /*numManifolds*/,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* /*debugDrawer*/,btStackAlloc* /*stackAlloc*/)
+btScalar btSequentialImpulseConstraintSolver::solveSingleIteration(int iteration, btCollisionObject** /*bodies */,int /*numBodies*/,btPersistentManifold** /*manifoldPtr*/, int /*numManifolds*/,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* /*debugDrawer*/)
{
int numNonContactPool = m_tmpSolverNonContactConstraintPool.size();
@@ -1309,14 +1385,14 @@ btScalar btSequentialImpulseConstraintSolver::solveSingleIteration(int iteration
{
for (int j=0;j<numConstraints;j++)
{
- if (constraints[j]->isEnabled())
- {
- int bodyAid = getOrInitSolverBody(constraints[j]->getRigidBodyA());
- int bodyBid = getOrInitSolverBody(constraints[j]->getRigidBodyB());
- btSolverBody& bodyA = m_tmpSolverBodyPool[bodyAid];
- btSolverBody& bodyB = m_tmpSolverBodyPool[bodyBid];
- constraints[j]->solveConstraintObsolete(bodyA,bodyB,infoGlobal.m_timeStep);
- }
+ if (constraints[j]->isEnabled())
+ {
+ int bodyAid = getOrInitSolverBody(constraints[j]->getRigidBodyA(),infoGlobal.m_timeStep);
+ int bodyBid = getOrInitSolverBody(constraints[j]->getRigidBodyB(),infoGlobal.m_timeStep);
+ btSolverBody& bodyA = m_tmpSolverBodyPool[bodyAid];
+ btSolverBody& bodyB = m_tmpSolverBodyPool[bodyBid];
+ constraints[j]->solveConstraintObsolete(bodyA,bodyB,infoGlobal.m_timeStep);
+ }
}
///solve all contact constraints using SIMD, if available
@@ -1376,7 +1452,8 @@ btScalar btSequentialImpulseConstraintSolver::solveSingleIteration(int iteration
for (j=0;j<numPoolConstraints;j++)
{
const btSolverConstraint& solveManifold = m_tmpSolverContactConstraintPool[m_orderTmpConstraintPool[j]];
- resolveSingleConstraintRowLowerLimitSIMD(m_tmpSolverBodyPool[solveManifold.m_solverBodyIdA],m_tmpSolverBodyPool[solveManifold.m_solverBodyIdB],solveManifold);
+ //resolveSingleConstraintRowLowerLimitSIMD(m_tmpSolverBodyPool[solveManifold.m_solverBodyIdA],m_tmpSolverBodyPool[solveManifold.m_solverBodyIdB],solveManifold);
+ resolveSingleConstraintRowLowerLimit(m_tmpSolverBodyPool[solveManifold.m_solverBodyIdA],m_tmpSolverBodyPool[solveManifold.m_solverBodyIdB],solveManifold);
}
@@ -1395,7 +1472,8 @@ btScalar btSequentialImpulseConstraintSolver::solveSingleIteration(int iteration
solveManifold.m_lowerLimit = -(solveManifold.m_friction*totalImpulse);
solveManifold.m_upperLimit = solveManifold.m_friction*totalImpulse;
- resolveSingleConstraintRowGenericSIMD(m_tmpSolverBodyPool[solveManifold.m_solverBodyIdA],m_tmpSolverBodyPool[solveManifold.m_solverBodyIdB],solveManifold);
+ //resolveSingleConstraintRowGenericSIMD(m_tmpSolverBodyPool[solveManifold.m_solverBodyIdA],m_tmpSolverBodyPool[solveManifold.m_solverBodyIdB],solveManifold);
+ resolveSingleConstraintRowGeneric(m_tmpSolverBodyPool[solveManifold.m_solverBodyIdA],m_tmpSolverBodyPool[solveManifold.m_solverBodyIdB],solveManifold);
}
}
@@ -1437,14 +1515,14 @@ btScalar btSequentialImpulseConstraintSolver::solveSingleIteration(int iteration
{
for (int j=0;j<numConstraints;j++)
{
- if (constraints[j]->isEnabled())
- {
- int bodyAid = getOrInitSolverBody(constraints[j]->getRigidBodyA());
- int bodyBid = getOrInitSolverBody(constraints[j]->getRigidBodyB());
- btSolverBody& bodyA = m_tmpSolverBodyPool[bodyAid];
- btSolverBody& bodyB = m_tmpSolverBodyPool[bodyBid];
- constraints[j]->solveConstraintObsolete(bodyA,bodyB,infoGlobal.m_timeStep);
- }
+ if (constraints[j]->isEnabled())
+ {
+ int bodyAid = getOrInitSolverBody(constraints[j]->getRigidBodyA(),infoGlobal.m_timeStep);
+ int bodyBid = getOrInitSolverBody(constraints[j]->getRigidBodyB(),infoGlobal.m_timeStep);
+ btSolverBody& bodyA = m_tmpSolverBodyPool[bodyAid];
+ btSolverBody& bodyB = m_tmpSolverBodyPool[bodyBid];
+ constraints[j]->solveConstraintObsolete(bodyA,bodyB,infoGlobal.m_timeStep);
+ }
}
///solve all contact constraints
int numPoolConstraints = m_tmpSolverContactConstraintPool.size();
@@ -1492,7 +1570,7 @@ btScalar btSequentialImpulseConstraintSolver::solveSingleIteration(int iteration
}
-void btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySplitImpulseIterations(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc)
+void btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySplitImpulseIterations(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer)
{
int iteration;
if (infoGlobal.m_splitImpulse)
@@ -1532,20 +1610,20 @@ void btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySplitImpulseIte
}
}
-btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlyIterations(btCollisionObject** bodies ,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc)
+btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlyIterations(btCollisionObject** bodies ,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer)
{
BT_PROFILE("solveGroupCacheFriendlyIterations");
{
///this is a special step to resolve penetrations (just for contacts)
- solveGroupCacheFriendlySplitImpulseIterations(bodies ,numBodies,manifoldPtr, numManifolds,constraints,numConstraints,infoGlobal,debugDrawer,stackAlloc);
+ solveGroupCacheFriendlySplitImpulseIterations(bodies ,numBodies,manifoldPtr, numManifolds,constraints,numConstraints,infoGlobal,debugDrawer);
int maxIterations = m_maxOverrideNumSolverIterations > infoGlobal.m_numIterations? m_maxOverrideNumSolverIterations : infoGlobal.m_numIterations;
for ( int iteration = 0 ; iteration< maxIterations ; iteration++)
//for ( int iteration = maxIterations-1 ; iteration >= 0;iteration--)
{
- solveSingleIteration(iteration, bodies ,numBodies,manifoldPtr, numManifolds,constraints,numConstraints,infoGlobal,debugDrawer,stackAlloc);
+ solveSingleIteration(iteration, bodies ,numBodies,manifoldPtr, numManifolds,constraints,numConstraints,infoGlobal,debugDrawer);
}
}
@@ -1610,9 +1688,15 @@ btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlyFinish(btCo
m_tmpSolverBodyPool[i].writebackVelocityAndTransform(infoGlobal.m_timeStep, infoGlobal.m_splitImpulseTurnErp);
else
m_tmpSolverBodyPool[i].writebackVelocity();
+
+ m_tmpSolverBodyPool[i].m_originalBody->setLinearVelocity(
+ m_tmpSolverBodyPool[i].m_linearVelocity+
+ m_tmpSolverBodyPool[i].m_externalForceImpulse);
+
+ m_tmpSolverBodyPool[i].m_originalBody->setAngularVelocity(
+ m_tmpSolverBodyPool[i].m_angularVelocity+
+ m_tmpSolverBodyPool[i].m_externalTorqueImpulse);
- m_tmpSolverBodyPool[i].m_originalBody->setLinearVelocity(m_tmpSolverBodyPool[i].m_linearVelocity);
- m_tmpSolverBodyPool[i].m_originalBody->setAngularVelocity(m_tmpSolverBodyPool[i].m_angularVelocity);
if (infoGlobal.m_splitImpulse)
m_tmpSolverBodyPool[i].m_originalBody->setWorldTransform(m_tmpSolverBodyPool[i].m_worldTransform);
@@ -1632,15 +1716,15 @@ btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlyFinish(btCo
/// btSequentialImpulseConstraintSolver Sequentially applies impulses
-btScalar btSequentialImpulseConstraintSolver::solveGroup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc,btDispatcher* /*dispatcher*/)
+btScalar btSequentialImpulseConstraintSolver::solveGroup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btDispatcher* /*dispatcher*/)
{
BT_PROFILE("solveGroup");
//you need to provide at least some bodies
- solveGroupCacheFriendlySetup( bodies, numBodies, manifoldPtr, numManifolds,constraints, numConstraints,infoGlobal,debugDrawer, stackAlloc);
+ solveGroupCacheFriendlySetup( bodies, numBodies, manifoldPtr, numManifolds,constraints, numConstraints,infoGlobal,debugDrawer);
- solveGroupCacheFriendlyIterations(bodies, numBodies, manifoldPtr, numManifolds,constraints, numConstraints,infoGlobal,debugDrawer, stackAlloc);
+ solveGroupCacheFriendlyIterations(bodies, numBodies, manifoldPtr, numManifolds,constraints, numConstraints,infoGlobal,debugDrawer);
solveGroupCacheFriendlyFinish(bodies, numBodies, infoGlobal);
diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h
index 2eea6be0db2..180d2a385d3 100644
--- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h
+++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h
@@ -18,7 +18,6 @@ subject to the following restrictions:
class btIDebugDraw;
class btPersistentManifold;
-class btStackAlloc;
class btDispatcher;
class btCollisionObject;
#include "BulletDynamics/ConstraintSolver/btTypedConstraint.h"
@@ -43,7 +42,7 @@ protected:
btAlignedObjectArray<int> m_orderFrictionConstraintPool;
btAlignedObjectArray<btTypedConstraint::btConstraintInfo1> m_tmpConstraintSizesPool;
int m_maxOverrideNumSolverIterations;
-
+ int m_fixedBodyId;
void setupFrictionConstraint( btSolverConstraint& solverConstraint, const btVector3& normalAxis,int solverBodyIdA,int solverBodyIdB,
btManifoldPoint& cp,const btVector3& rel_pos1,const btVector3& rel_pos2,
btCollisionObject* colObj0,btCollisionObject* colObj1, btScalar relaxation,
@@ -57,10 +56,11 @@ protected:
btSolverConstraint& addFrictionConstraint(const btVector3& normalAxis,int solverBodyIdA,int solverBodyIdB,int frictionIndex,btManifoldPoint& cp,const btVector3& rel_pos1,const btVector3& rel_pos2,btCollisionObject* colObj0,btCollisionObject* colObj1, btScalar relaxation, btScalar desiredVelocity=0., btScalar cfmSlip=0.);
btSolverConstraint& addRollingFrictionConstraint(const btVector3& normalAxis,int solverBodyIdA,int solverBodyIdB,int frictionIndex,btManifoldPoint& cp,const btVector3& rel_pos1,const btVector3& rel_pos2,btCollisionObject* colObj0,btCollisionObject* colObj1, btScalar relaxation, btScalar desiredVelocity=0, btScalar cfmSlip=0.f);
-
+
void setupContactConstraint(btSolverConstraint& solverConstraint, int solverBodyIdA, int solverBodyIdB, btManifoldPoint& cp,
- const btContactSolverInfo& infoGlobal, btVector3& vel, btScalar& rel_vel, btScalar& relaxation,
- btVector3& rel_pos1, btVector3& rel_pos2);
+ const btContactSolverInfo& infoGlobal,btScalar& relaxation, const btVector3& rel_pos1, const btVector3& rel_pos2);
+
+ static void applyAnisotropicFriction(btCollisionObject* colObj,btVector3& frictionDirection, int frictionMode);
void setFrictionConstraintImpulse( btSolverConstraint& solverConstraint, int solverBodyIdA,int solverBodyIdB,
btManifoldPoint& cp, const btContactSolverInfo& infoGlobal);
@@ -71,6 +71,8 @@ protected:
btScalar restitutionCurve(btScalar rel_vel, btScalar restitution);
+ virtual void convertContacts(btPersistentManifold** manifoldPtr, int numManifolds, const btContactSolverInfo& infoGlobal);
+
void convertContact(btPersistentManifold* manifold,const btContactSolverInfo& infoGlobal);
@@ -83,8 +85,8 @@ protected:
const btSolverConstraint& contactConstraint);
//internal method
- int getOrInitSolverBody(btCollisionObject& body);
- void initSolverBody(btSolverBody* solverBody, btCollisionObject* collisionObject);
+ int getOrInitSolverBody(btCollisionObject& body,btScalar timeStep);
+ void initSolverBody(btSolverBody* solverBody, btCollisionObject* collisionObject, btScalar timeStep);
void resolveSingleConstraintRowGeneric(btSolverBody& bodyA,btSolverBody& bodyB,const btSolverConstraint& contactConstraint);
@@ -97,12 +99,12 @@ protected:
protected:
- virtual void solveGroupCacheFriendlySplitImpulseIterations(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc);
+ virtual void solveGroupCacheFriendlySplitImpulseIterations(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer);
virtual btScalar solveGroupCacheFriendlyFinish(btCollisionObject** bodies,int numBodies,const btContactSolverInfo& infoGlobal);
- btScalar solveSingleIteration(int iteration, btCollisionObject** bodies ,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc);
+ virtual btScalar solveSingleIteration(int iteration, btCollisionObject** bodies ,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer);
- virtual btScalar solveGroupCacheFriendlySetup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc);
- virtual btScalar solveGroupCacheFriendlyIterations(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc);
+ virtual btScalar solveGroupCacheFriendlySetup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer);
+ virtual btScalar solveGroupCacheFriendlyIterations(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer);
public:
@@ -112,7 +114,7 @@ public:
btSequentialImpulseConstraintSolver();
virtual ~btSequentialImpulseConstraintSolver();
- virtual btScalar solveGroup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifold,int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& info, btIDebugDraw* debugDrawer, btStackAlloc* stackAlloc,btDispatcher* dispatcher);
+ virtual btScalar solveGroup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifold,int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& info, btIDebugDraw* debugDrawer,btDispatcher* dispatcher);
@@ -132,6 +134,11 @@ public:
return m_btSeed2;
}
+
+ virtual btConstraintSolverType getSolverType() const
+ {
+ return BT_SEQUENTIAL_IMPULSE_SOLVER;
+ }
};
diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSliderConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSliderConstraint.h
index ca8e715bc47..57ebb47d8e7 100755
--- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSliderConstraint.h
+++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSliderConstraint.h
@@ -25,7 +25,13 @@ TODO:
#ifndef BT_SLIDER_CONSTRAINT_H
#define BT_SLIDER_CONSTRAINT_H
-
+#ifdef BT_USE_DOUBLE_PRECISION
+#define btSliderConstraintData2 btSliderConstraintDoubleData
+#define btSliderConstraintDataName "btSliderConstraintDoubleData"
+#else
+#define btSliderConstraintData2 btSliderConstraintData
+#define btSliderConstraintDataName "btSliderConstraintData"
+#endif //BT_USE_DOUBLE_PRECISION
#include "LinearMath/btVector3.h"
#include "btJacobianEntry.h"
@@ -283,7 +289,10 @@ public:
};
+
///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+
+
struct btSliderConstraintData
{
btTypedConstraintData m_typeConstraintData;
@@ -302,31 +311,48 @@ struct btSliderConstraintData
};
+struct btSliderConstraintDoubleData
+{
+ btTypedConstraintDoubleData m_typeConstraintData;
+ btTransformDoubleData m_rbAFrame; // constraint axii. Assumes z is hinge axis.
+ btTransformDoubleData m_rbBFrame;
+
+ double m_linearUpperLimit;
+ double m_linearLowerLimit;
+
+ double m_angularUpperLimit;
+ double m_angularLowerLimit;
+
+ int m_useLinearReferenceFrameA;
+ int m_useOffsetForConstraintFrame;
+
+};
+
SIMD_FORCE_INLINE int btSliderConstraint::calculateSerializeBufferSize() const
{
- return sizeof(btSliderConstraintData);
+ return sizeof(btSliderConstraintData2);
}
///fills the dataBuffer and returns the struct name (and 0 on failure)
SIMD_FORCE_INLINE const char* btSliderConstraint::serialize(void* dataBuffer, btSerializer* serializer) const
{
- btSliderConstraintData* sliderData = (btSliderConstraintData*) dataBuffer;
+ btSliderConstraintData2* sliderData = (btSliderConstraintData2*) dataBuffer;
btTypedConstraint::serialize(&sliderData->m_typeConstraintData,serializer);
- m_frameInA.serializeFloat(sliderData->m_rbAFrame);
- m_frameInB.serializeFloat(sliderData->m_rbBFrame);
+ m_frameInA.serialize(sliderData->m_rbAFrame);
+ m_frameInB.serialize(sliderData->m_rbBFrame);
- sliderData->m_linearUpperLimit = float(m_upperLinLimit);
- sliderData->m_linearLowerLimit = float(m_lowerLinLimit);
+ sliderData->m_linearUpperLimit = m_upperLinLimit;
+ sliderData->m_linearLowerLimit = m_lowerLinLimit;
- sliderData->m_angularUpperLimit = float(m_upperAngLimit);
- sliderData->m_angularLowerLimit = float(m_lowerAngLimit);
+ sliderData->m_angularUpperLimit = m_upperAngLimit;
+ sliderData->m_angularLowerLimit = m_lowerAngLimit;
sliderData->m_useLinearReferenceFrameA = m_useLinearReferenceFrameA;
sliderData->m_useOffsetForConstraintFrame = m_useOffsetForConstraintFrame;
- return "btSliderConstraintData";
+ return btSliderConstraintDataName;
}
diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverBody.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverBody.h
index ccc45996c8b..27ccefe4169 100644
--- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverBody.h
+++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverBody.h
@@ -118,6 +118,8 @@ ATTRIBUTE_ALIGNED16 (struct) btSolverBody
btVector3 m_turnVelocity;
btVector3 m_linearVelocity;
btVector3 m_angularVelocity;
+ btVector3 m_externalForceImpulse;
+ btVector3 m_externalTorqueImpulse;
btRigidBody* m_originalBody;
void setWorldTransform(const btTransform& worldTransform)
@@ -130,6 +132,17 @@ ATTRIBUTE_ALIGNED16 (struct) btSolverBody
return m_worldTransform;
}
+
+
+ SIMD_FORCE_INLINE void getVelocityInLocalPointNoDelta(const btVector3& rel_pos, btVector3& velocity ) const
+ {
+ if (m_originalBody)
+ velocity = m_linearVelocity + m_externalForceImpulse + (m_angularVelocity+m_externalTorqueImpulse).cross(rel_pos);
+ else
+ velocity.setValue(0,0,0);
+ }
+
+
SIMD_FORCE_INLINE void getVelocityInLocalPointObsolete(const btVector3& rel_pos, btVector3& velocity ) const
{
if (m_originalBody)
diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverConstraint.h
index 2ade61b2f69..5515e6b311c 100644
--- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverConstraint.h
+++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverConstraint.h
@@ -55,6 +55,7 @@ ATTRIBUTE_ALIGNED16 (struct) btSolverConstraint
{
void* m_originalContactPoint;
btScalar m_unusedPadding4;
+ int m_numRowsForNonContactConstraint;
};
int m_overrideNumSolverIterations;
diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.cpp b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.cpp
index 465c0746c58..27fdd9d3df8 100644
--- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.cpp
+++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.cpp
@@ -109,7 +109,7 @@ btScalar btTypedConstraint::getMotorFactor(btScalar pos, btScalar lowLim, btScal
///fills the dataBuffer and returns the struct name (and 0 on failure)
const char* btTypedConstraint::serialize(void* dataBuffer, btSerializer* serializer) const
{
- btTypedConstraintData* tcd = (btTypedConstraintData*) dataBuffer;
+ btTypedConstraintData2* tcd = (btTypedConstraintData2*) dataBuffer;
tcd->m_rbA = (btRigidBodyData*)serializer->getUniquePointer(&m_rbA);
tcd->m_rbB = (btRigidBodyData*)serializer->getUniquePointer(&m_rbB);
@@ -123,14 +123,14 @@ const char* btTypedConstraint::serialize(void* dataBuffer, btSerializer* seriali
tcd->m_objectType = m_objectType;
tcd->m_needsFeedback = m_needsFeedback;
tcd->m_overrideNumSolverIterations = m_overrideNumSolverIterations;
- tcd->m_breakingImpulseThreshold = float(m_breakingImpulseThreshold);
+ tcd->m_breakingImpulseThreshold = m_breakingImpulseThreshold;
tcd->m_isEnabled = m_isEnabled? 1: 0;
tcd->m_userConstraintId =m_userConstraintId;
tcd->m_userConstraintType =m_userConstraintType;
- tcd->m_appliedImpulse = float(m_appliedImpulse);
- tcd->m_dbgDrawSize = float(m_dbgDrawSize );
+ tcd->m_appliedImpulse = m_appliedImpulse;
+ tcd->m_dbgDrawSize = m_dbgDrawSize;
tcd->m_disableCollisionsBetweenLinkedBodies = false;
@@ -142,7 +142,7 @@ const char* btTypedConstraint::serialize(void* dataBuffer, btSerializer* seriali
if (m_rbB.getConstraintRef(i) == this)
tcd->m_disableCollisionsBetweenLinkedBodies = true;
- return "btTypedConstraintData";
+ return btTypedConstraintDataName;
}
btRigidBody& btTypedConstraint::getFixedBody()
diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h
index 441fa375050..b58f984d0fb 100644
--- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h
+++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h
@@ -21,6 +21,15 @@ subject to the following restrictions:
#include "btSolverConstraint.h"
#include "BulletDynamics/Dynamics/btRigidBody.h"
+#ifdef BT_USE_DOUBLE_PRECISION
+#define btTypedConstraintData2 btTypedConstraintDoubleData
+#define btTypedConstraintDataName "btTypedConstraintDoubleData"
+#else
+#define btTypedConstraintData2 btTypedConstraintFloatData
+#define btTypedConstraintDataName "btTypedConstraintFloatData"
+#endif //BT_USE_DOUBLE_PRECISION
+
+
class btSerializer;
//Don't change any of the existing enum values, so add enum types at the end for serialization compatibility
@@ -34,6 +43,7 @@ enum btTypedConstraintType
CONTACT_CONSTRAINT_TYPE,
D6_SPRING_CONSTRAINT_TYPE,
GEAR_CONSTRAINT_TYPE,
+ FIXED_CONSTRAINT_TYPE,
MAX_CONSTRAINT_TYPE
};
@@ -356,6 +366,33 @@ SIMD_FORCE_INLINE btScalar btAdjustAngleToLimits(btScalar angleInRadians, btScal
}
///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btTypedConstraintFloatData
+{
+ btRigidBodyFloatData *m_rbA;
+ btRigidBodyFloatData *m_rbB;
+ char *m_name;
+
+ int m_objectType;
+ int m_userConstraintType;
+ int m_userConstraintId;
+ int m_needsFeedback;
+
+ float m_appliedImpulse;
+ float m_dbgDrawSize;
+
+ int m_disableCollisionsBetweenLinkedBodies;
+ int m_overrideNumSolverIterations;
+
+ float m_breakingImpulseThreshold;
+ int m_isEnabled;
+
+};
+
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+
+#define BT_BACKWARDS_COMPATIBLE_SERIALIZATION
+#ifdef BT_BACKWARDS_COMPATIBLE_SERIALIZATION
+///this structure is not used, except for loading pre-2.82 .bullet files
struct btTypedConstraintData
{
btRigidBodyData *m_rbA;
@@ -377,10 +414,35 @@ struct btTypedConstraintData
int m_isEnabled;
};
+#endif //BACKWARDS_COMPATIBLE
+
+struct btTypedConstraintDoubleData
+{
+ btRigidBodyDoubleData *m_rbA;
+ btRigidBodyDoubleData *m_rbB;
+ char *m_name;
+
+ int m_objectType;
+ int m_userConstraintType;
+ int m_userConstraintId;
+ int m_needsFeedback;
+
+ double m_appliedImpulse;
+ double m_dbgDrawSize;
+
+ int m_disableCollisionsBetweenLinkedBodies;
+ int m_overrideNumSolverIterations;
+
+ double m_breakingImpulseThreshold;
+ int m_isEnabled;
+ char padding[4];
+
+};
+
SIMD_FORCE_INLINE int btTypedConstraint::calculateSerializeBufferSize() const
{
- return sizeof(btTypedConstraintData);
+ return sizeof(btTypedConstraintData2);
}
diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp b/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp
index 9ff2d9f1173..fb8a4068e23 100644
--- a/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp
+++ b/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp
@@ -87,7 +87,6 @@ struct InplaceSolverIslandCallback : public btSimulationIslandManager::IslandCal
btTypedConstraint** m_sortedConstraints;
int m_numConstraints;
btIDebugDraw* m_debugDrawer;
- btStackAlloc* m_stackAlloc;
btDispatcher* m_dispatcher;
btAlignedObjectArray<btCollisionObject*> m_bodies;
@@ -104,7 +103,6 @@ struct InplaceSolverIslandCallback : public btSimulationIslandManager::IslandCal
m_sortedConstraints(NULL),
m_numConstraints(0),
m_debugDrawer(NULL),
- m_stackAlloc(stackAlloc),
m_dispatcher(dispatcher)
{
@@ -135,7 +133,7 @@ struct InplaceSolverIslandCallback : public btSimulationIslandManager::IslandCal
if (islandId<0)
{
///we don't split islands, so all constraints/contact manifolds/bodies are passed into the solver regardless the island id
- m_solver->solveGroup( bodies,numBodies,manifolds, numManifolds,&m_sortedConstraints[0],m_numConstraints,*m_solverInfo,m_debugDrawer,m_stackAlloc,m_dispatcher);
+ m_solver->solveGroup( bodies,numBodies,manifolds, numManifolds,&m_sortedConstraints[0],m_numConstraints,*m_solverInfo,m_debugDrawer,m_dispatcher);
} else
{
//also add all non-contact constraints/joints for this island
@@ -163,7 +161,7 @@ struct InplaceSolverIslandCallback : public btSimulationIslandManager::IslandCal
if (m_solverInfo->m_minimumSolverBatchSize<=1)
{
- m_solver->solveGroup( bodies,numBodies,manifolds, numManifolds,startConstraint,numCurConstraints,*m_solverInfo,m_debugDrawer,m_stackAlloc,m_dispatcher);
+ m_solver->solveGroup( bodies,numBodies,manifolds, numManifolds,startConstraint,numCurConstraints,*m_solverInfo,m_debugDrawer,m_dispatcher);
} else
{
@@ -190,7 +188,7 @@ struct InplaceSolverIslandCallback : public btSimulationIslandManager::IslandCal
btPersistentManifold** manifold = m_manifolds.size()?&m_manifolds[0]:0;
btTypedConstraint** constraints = m_constraints.size()?&m_constraints[0]:0;
- m_solver->solveGroup( bodies,m_bodies.size(),manifold, m_manifolds.size(),constraints, m_constraints.size() ,*m_solverInfo,m_debugDrawer,m_stackAlloc,m_dispatcher);
+ m_solver->solveGroup( bodies,m_bodies.size(),manifold, m_manifolds.size(),constraints, m_constraints.size() ,*m_solverInfo,m_debugDrawer,m_dispatcher);
m_bodies.resize(0);
m_manifolds.resize(0);
m_constraints.resize(0);
@@ -210,7 +208,9 @@ m_gravity(0,-10,0),
m_localTime(0),
m_synchronizeAllMotionStates(false),
m_applySpeculativeContactRestitution(false),
-m_profileTimings(0)
+m_profileTimings(0),
+m_fixedTimeStep(0),
+m_latencyMotionStateInterpolation(true)
{
if (!m_constraintSolver)
@@ -232,7 +232,7 @@ m_profileTimings(0)
{
void* mem = btAlignedAlloc(sizeof(InplaceSolverIslandCallback),16);
- m_solverIslandCallback = new (mem) InplaceSolverIslandCallback (m_constraintSolver, m_stackAlloc, dispatcher);
+ m_solverIslandCallback = new (mem) InplaceSolverIslandCallback (m_constraintSolver, 0, dispatcher);
}
}
@@ -359,7 +359,9 @@ void btDiscreteDynamicsWorld::synchronizeSingleMotionState(btRigidBody* body)
{
btTransform interpolatedTransform;
btTransformUtil::integrateTransform(body->getInterpolationWorldTransform(),
- body->getInterpolationLinearVelocity(),body->getInterpolationAngularVelocity(),m_localTime*body->getHitFraction(),interpolatedTransform);
+ body->getInterpolationLinearVelocity(),body->getInterpolationAngularVelocity(),
+ (m_latencyMotionStateInterpolation && m_fixedTimeStep) ? m_localTime - m_fixedTimeStep : m_localTime*body->getHitFraction(),
+ interpolatedTransform);
body->getMotionState()->setWorldTransform(interpolatedTransform);
}
}
@@ -403,6 +405,7 @@ int btDiscreteDynamicsWorld::stepSimulation( btScalar timeStep,int maxSubSteps,
if (maxSubSteps)
{
//fixed timestep with interpolation
+ m_fixedTimeStep = fixedTimeStep;
m_localTime += timeStep;
if (m_localTime >= fixedTimeStep)
{
@@ -413,7 +416,8 @@ int btDiscreteDynamicsWorld::stepSimulation( btScalar timeStep,int maxSubSteps,
{
//variable timestep
fixedTimeStep = timeStep;
- m_localTime = timeStep;
+ m_localTime = m_latencyMotionStateInterpolation ? 0 : timeStep;
+ m_fixedTimeStep = 0;
if (btFuzzyZero(timeStep))
{
numSimulationSubSteps = 0;
@@ -724,7 +728,7 @@ void btDiscreteDynamicsWorld::solveConstraints(btContactSolverInfo& solverInfo)
m_solverIslandCallback->processConstraints();
- m_constraintSolver->allSolved(solverInfo, m_debugDrawer, m_stackAlloc);
+ m_constraintSolver->allSolved(solverInfo, m_debugDrawer);
}
@@ -746,12 +750,7 @@ void btDiscreteDynamicsWorld::calculateSimulationIslands()
if (((colObj0) && (!(colObj0)->isStaticOrKinematicObject())) &&
((colObj1) && (!(colObj1)->isStaticOrKinematicObject())))
{
- if (colObj0->isActive() || colObj1->isActive())
- {
-
- getSimulationIslandManager()->getUnionFind().unite((colObj0)->getIslandTag(),
- (colObj1)->getIslandTag());
- }
+ getSimulationIslandManager()->getUnionFind().unite((colObj0)->getIslandTag(),(colObj1)->getIslandTag());
}
}
}
@@ -770,12 +769,7 @@ void btDiscreteDynamicsWorld::calculateSimulationIslands()
if (((colObj0) && (!(colObj0)->isStaticOrKinematicObject())) &&
((colObj1) && (!(colObj1)->isStaticOrKinematicObject())))
{
- if (colObj0->isActive() || colObj1->isActive())
- {
-
- getSimulationIslandManager()->getUnionFind().unite((colObj0)->getIslandTag(),
- (colObj1)->getIslandTag());
- }
+ getSimulationIslandManager()->getUnionFind().unite((colObj0)->getIslandTag(),(colObj1)->getIslandTag());
}
}
}
@@ -1131,7 +1125,6 @@ void btDiscreteDynamicsWorld::predictUnconstraintMotion(btScalar timeStep)
{
//don't integrate/update velocities here, it happens in the constraint solver
- //damping
body->applyDamping(timeStep);
body->predictIntegratedTransform(timeStep,body->getInterpolationWorldTransform());
diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h b/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h
index fa934c49d2b..d8a34b7da3d 100644
--- a/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h
+++ b/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h
@@ -53,6 +53,7 @@ protected:
//for variable timesteps
btScalar m_localTime;
+ btScalar m_fixedTimeStep;
//for variable timesteps
bool m_ownsIslandManager;
@@ -64,6 +65,8 @@ protected:
int m_profileTimings;
+ bool m_latencyMotionStateInterpolation;
+
btAlignedObjectArray<btPersistentManifold*> m_predictiveManifolds;
virtual void predictUnconstraintMotion(btScalar timeStep);
@@ -74,7 +77,7 @@ protected:
virtual void solveConstraints(btContactSolverInfo& solverInfo);
- void updateActivationState(btScalar timeStep);
+ virtual void updateActivationState(btScalar timeStep);
void updateActions(btScalar timeStep);
@@ -216,6 +219,16 @@ public:
///Preliminary serialization test for Bullet 2.76. Loading those files requires a separate parser (see Bullet/Demos/SerializeDemo)
virtual void serialize(btSerializer* serializer);
+ ///Interpolate motion state between previous and current transform, instead of current and next transform.
+ ///This can relieve discontinuities in the rendering, due to penetrations
+ void setLatencyMotionStateInterpolation(bool latencyInterpolation )
+ {
+ m_latencyMotionStateInterpolation = latencyInterpolation;
+ }
+ bool getLatencyMotionStateInterpolation() const
+ {
+ return m_latencyMotionStateInterpolation;
+ }
};
#endif //BT_DISCRETE_DYNAMICS_WORLD_H
diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btDynamicsWorld.h b/extern/bullet2/src/BulletDynamics/Dynamics/btDynamicsWorld.h
index 7d5c621f850..35dd1400fe7 100644
--- a/extern/bullet2/src/BulletDynamics/Dynamics/btDynamicsWorld.h
+++ b/extern/bullet2/src/BulletDynamics/Dynamics/btDynamicsWorld.h
@@ -33,7 +33,8 @@ enum btDynamicsWorldType
BT_SIMPLE_DYNAMICS_WORLD=1,
BT_DISCRETE_DYNAMICS_WORLD=2,
BT_CONTINUOUS_DYNAMICS_WORLD=3,
- BT_SOFT_RIGID_DYNAMICS_WORLD=4
+ BT_SOFT_RIGID_DYNAMICS_WORLD=4,
+ BT_GPU_DYNAMICS_WORLD=5
};
///The btDynamicsWorld is the interface class for several dynamics implementation, basic, discrete, parallel, and continuous etc.
diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h b/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h
index f0e07f942af..ed90fb44115 100644
--- a/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h
+++ b/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h
@@ -363,11 +363,13 @@ public:
inline void setLinearVelocity(const btVector3& lin_vel)
{
+ m_updateRevision++;
m_linearVelocity = lin_vel;
}
inline void setAngularVelocity(const btVector3& ang_vel)
{
+ m_updateRevision++;
m_angularVelocity = ang_vel;
}
@@ -484,11 +486,13 @@ public:
void setAngularFactor(const btVector3& angFac)
{
+ m_updateRevision++;
m_angularFactor = angFac;
}
void setAngularFactor(btScalar angFac)
{
+ m_updateRevision++;
m_angularFactor.setValue(angFac,angFac,angFac);
}
const btVector3& getAngularFactor() const
diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp b/extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp
index 5fc2f3cf8f7..35dd38840f6 100644
--- a/extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp
+++ b/extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp
@@ -78,8 +78,8 @@ int btSimpleDynamicsWorld::stepSimulation( btScalar timeStep,int maxSubSteps, b
btContactSolverInfo infoGlobal;
infoGlobal.m_timeStep = timeStep;
m_constraintSolver->prepareSolve(0,numManifolds);
- m_constraintSolver->solveGroup(&getCollisionObjectArray()[0],getNumCollisionObjects(),manifoldPtr, numManifolds,0,0,infoGlobal,m_debugDrawer, m_stackAlloc,m_dispatcher1);
- m_constraintSolver->allSolved(infoGlobal,m_debugDrawer, m_stackAlloc);
+ m_constraintSolver->solveGroup(&getCollisionObjectArray()[0],getNumCollisionObjects(),manifoldPtr, numManifolds,0,0,infoGlobal,m_debugDrawer, m_dispatcher1);
+ m_constraintSolver->allSolved(infoGlobal,m_debugDrawer);
}
///integrate transforms
diff --git a/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBody.cpp b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBody.cpp
new file mode 100644
index 00000000000..56a1c55d9ae
--- /dev/null
+++ b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBody.cpp
@@ -0,0 +1,1009 @@
+/*
+ * PURPOSE:
+ * Class representing an articulated rigid body. Stores the body's
+ * current state, allows forces and torques to be set, handles
+ * timestepping and implements Featherstone's algorithm.
+ *
+ * COPYRIGHT:
+ * Copyright (C) Stephen Thompson, <stephen@solarflare.org.uk>, 2011-2013
+ * Portions written By Erwin Coumans: replacing Eigen math library by Bullet LinearMath and a dedicated 6x6 matrix inverse (solveImatrix)
+
+ This software is provided 'as-is', without any express or implied warranty.
+ In no event will the authors be held liable for any damages arising from the use of this software.
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it freely,
+ subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ */
+
+
+#include "btMultiBody.h"
+#include "btMultiBodyLink.h"
+#include "btMultiBodyLinkCollider.h"
+
+// #define INCLUDE_GYRO_TERM
+
+namespace {
+ const btScalar SLEEP_EPSILON = btScalar(0.05); // this is a squared velocity (m^2 s^-2)
+ const btScalar SLEEP_TIMEOUT = btScalar(2); // in seconds
+}
+
+
+
+
+//
+// Various spatial helper functions
+//
+
+namespace {
+ void SpatialTransform(const btMatrix3x3 &rotation_matrix, // rotates vectors in 'from' frame to vectors in 'to' frame
+ const btVector3 &displacement, // vector from origin of 'from' frame to origin of 'to' frame, in 'to' coordinates
+ const btVector3 &top_in, // top part of input vector
+ const btVector3 &bottom_in, // bottom part of input vector
+ btVector3 &top_out, // top part of output vector
+ btVector3 &bottom_out) // bottom part of output vector
+ {
+ top_out = rotation_matrix * top_in;
+ bottom_out = -displacement.cross(top_out) + rotation_matrix * bottom_in;
+ }
+
+ void InverseSpatialTransform(const btMatrix3x3 &rotation_matrix,
+ const btVector3 &displacement,
+ const btVector3 &top_in,
+ const btVector3 &bottom_in,
+ btVector3 &top_out,
+ btVector3 &bottom_out)
+ {
+ top_out = rotation_matrix.transpose() * top_in;
+ bottom_out = rotation_matrix.transpose() * (bottom_in + displacement.cross(top_in));
+ }
+
+ btScalar SpatialDotProduct(const btVector3 &a_top,
+ const btVector3 &a_bottom,
+ const btVector3 &b_top,
+ const btVector3 &b_bottom)
+ {
+ return a_bottom.dot(b_top) + a_top.dot(b_bottom);
+ }
+}
+
+
+//
+// Implementation of class btMultiBody
+//
+
+btMultiBody::btMultiBody(int n_links,
+ btScalar mass,
+ const btVector3 &inertia,
+ bool fixed_base_,
+ bool can_sleep_)
+ : base_quat(0, 0, 0, 1),
+ base_mass(mass),
+ base_inertia(inertia),
+
+ fixed_base(fixed_base_),
+ awake(true),
+ can_sleep(can_sleep_),
+ sleep_timer(0),
+ m_baseCollider(0),
+ m_linearDamping(0.04f),
+ m_angularDamping(0.04f),
+ m_useGyroTerm(true),
+ m_maxAppliedImpulse(1000.f),
+ m_hasSelfCollision(true)
+{
+ links.resize(n_links);
+
+ vector_buf.resize(2*n_links);
+ matrix_buf.resize(n_links + 1);
+ m_real_buf.resize(6 + 2*n_links);
+ base_pos.setValue(0, 0, 0);
+ base_force.setValue(0, 0, 0);
+ base_torque.setValue(0, 0, 0);
+}
+
+btMultiBody::~btMultiBody()
+{
+}
+
+void btMultiBody::setupPrismatic(int i,
+ btScalar mass,
+ const btVector3 &inertia,
+ int parent,
+ const btQuaternion &rot_parent_to_this,
+ const btVector3 &joint_axis,
+ const btVector3 &r_vector_when_q_zero,
+ bool disableParentCollision)
+{
+ links[i].mass = mass;
+ links[i].inertia = inertia;
+ links[i].parent = parent;
+ links[i].zero_rot_parent_to_this = rot_parent_to_this;
+ links[i].axis_top.setValue(0,0,0);
+ links[i].axis_bottom = joint_axis;
+ links[i].e_vector = r_vector_when_q_zero;
+ links[i].is_revolute = false;
+ links[i].cached_rot_parent_to_this = rot_parent_to_this;
+ if (disableParentCollision)
+ links[i].m_flags |=BT_MULTIBODYLINKFLAGS_DISABLE_PARENT_COLLISION;
+
+ links[i].updateCache();
+}
+
+void btMultiBody::setupRevolute(int i,
+ btScalar mass,
+ const btVector3 &inertia,
+ int parent,
+ const btQuaternion &zero_rot_parent_to_this,
+ const btVector3 &joint_axis,
+ const btVector3 &parent_axis_position,
+ const btVector3 &my_axis_position,
+ bool disableParentCollision)
+{
+ links[i].mass = mass;
+ links[i].inertia = inertia;
+ links[i].parent = parent;
+ links[i].zero_rot_parent_to_this = zero_rot_parent_to_this;
+ links[i].axis_top = joint_axis;
+ links[i].axis_bottom = joint_axis.cross(my_axis_position);
+ links[i].d_vector = my_axis_position;
+ links[i].e_vector = parent_axis_position;
+ links[i].is_revolute = true;
+ if (disableParentCollision)
+ links[i].m_flags |=BT_MULTIBODYLINKFLAGS_DISABLE_PARENT_COLLISION;
+ links[i].updateCache();
+}
+
+
+
+
+
+int btMultiBody::getParent(int i) const
+{
+ return links[i].parent;
+}
+
+btScalar btMultiBody::getLinkMass(int i) const
+{
+ return links[i].mass;
+}
+
+const btVector3 & btMultiBody::getLinkInertia(int i) const
+{
+ return links[i].inertia;
+}
+
+btScalar btMultiBody::getJointPos(int i) const
+{
+ return links[i].joint_pos;
+}
+
+btScalar btMultiBody::getJointVel(int i) const
+{
+ return m_real_buf[6 + i];
+}
+
+void btMultiBody::setJointPos(int i, btScalar q)
+{
+ links[i].joint_pos = q;
+ links[i].updateCache();
+}
+
+void btMultiBody::setJointVel(int i, btScalar qdot)
+{
+ m_real_buf[6 + i] = qdot;
+}
+
+const btVector3 & btMultiBody::getRVector(int i) const
+{
+ return links[i].cached_r_vector;
+}
+
+const btQuaternion & btMultiBody::getParentToLocalRot(int i) const
+{
+ return links[i].cached_rot_parent_to_this;
+}
+
+btVector3 btMultiBody::localPosToWorld(int i, const btVector3 &local_pos) const
+{
+ btVector3 result = local_pos;
+ while (i != -1) {
+ // 'result' is in frame i. transform it to frame parent(i)
+ result += getRVector(i);
+ result = quatRotate(getParentToLocalRot(i).inverse(),result);
+ i = getParent(i);
+ }
+
+ // 'result' is now in the base frame. transform it to world frame
+ result = quatRotate(getWorldToBaseRot().inverse() ,result);
+ result += getBasePos();
+
+ return result;
+}
+
+btVector3 btMultiBody::worldPosToLocal(int i, const btVector3 &world_pos) const
+{
+ if (i == -1) {
+ // world to base
+ return quatRotate(getWorldToBaseRot(),(world_pos - getBasePos()));
+ } else {
+ // find position in parent frame, then transform to current frame
+ return quatRotate(getParentToLocalRot(i),worldPosToLocal(getParent(i), world_pos)) - getRVector(i);
+ }
+}
+
+btVector3 btMultiBody::localDirToWorld(int i, const btVector3 &local_dir) const
+{
+ btVector3 result = local_dir;
+ while (i != -1) {
+ result = quatRotate(getParentToLocalRot(i).inverse() , result);
+ i = getParent(i);
+ }
+ result = quatRotate(getWorldToBaseRot().inverse() , result);
+ return result;
+}
+
+btVector3 btMultiBody::worldDirToLocal(int i, const btVector3 &world_dir) const
+{
+ if (i == -1) {
+ return quatRotate(getWorldToBaseRot(), world_dir);
+ } else {
+ return quatRotate(getParentToLocalRot(i) ,worldDirToLocal(getParent(i), world_dir));
+ }
+}
+
+void btMultiBody::compTreeLinkVelocities(btVector3 *omega, btVector3 *vel) const
+{
+ int num_links = getNumLinks();
+ // Calculates the velocities of each link (and the base) in its local frame
+ omega[0] = quatRotate(base_quat ,getBaseOmega());
+ vel[0] = quatRotate(base_quat ,getBaseVel());
+
+ for (int i = 0; i < num_links; ++i) {
+ const int parent = links[i].parent;
+
+ // transform parent vel into this frame, store in omega[i+1], vel[i+1]
+ SpatialTransform(btMatrix3x3(links[i].cached_rot_parent_to_this), links[i].cached_r_vector,
+ omega[parent+1], vel[parent+1],
+ omega[i+1], vel[i+1]);
+
+ // now add qidot * shat_i
+ omega[i+1] += getJointVel(i) * links[i].axis_top;
+ vel[i+1] += getJointVel(i) * links[i].axis_bottom;
+ }
+}
+
+btScalar btMultiBody::getKineticEnergy() const
+{
+ int num_links = getNumLinks();
+ // TODO: would be better not to allocate memory here
+ btAlignedObjectArray<btVector3> omega;omega.resize(num_links+1);
+ btAlignedObjectArray<btVector3> vel;vel.resize(num_links+1);
+ compTreeLinkVelocities(&omega[0], &vel[0]);
+
+ // we will do the factor of 0.5 at the end
+ btScalar result = base_mass * vel[0].dot(vel[0]);
+ result += omega[0].dot(base_inertia * omega[0]);
+
+ for (int i = 0; i < num_links; ++i) {
+ result += links[i].mass * vel[i+1].dot(vel[i+1]);
+ result += omega[i+1].dot(links[i].inertia * omega[i+1]);
+ }
+
+ return 0.5f * result;
+}
+
+btVector3 btMultiBody::getAngularMomentum() const
+{
+ int num_links = getNumLinks();
+ // TODO: would be better not to allocate memory here
+ btAlignedObjectArray<btVector3> omega;omega.resize(num_links+1);
+ btAlignedObjectArray<btVector3> vel;vel.resize(num_links+1);
+ btAlignedObjectArray<btQuaternion> rot_from_world;rot_from_world.resize(num_links+1);
+ compTreeLinkVelocities(&omega[0], &vel[0]);
+
+ rot_from_world[0] = base_quat;
+ btVector3 result = quatRotate(rot_from_world[0].inverse() , (base_inertia * omega[0]));
+
+ for (int i = 0; i < num_links; ++i) {
+ rot_from_world[i+1] = links[i].cached_rot_parent_to_this * rot_from_world[links[i].parent+1];
+ result += (quatRotate(rot_from_world[i+1].inverse() , (links[i].inertia * omega[i+1])));
+ }
+
+ return result;
+}
+
+
+void btMultiBody::clearForcesAndTorques()
+{
+ base_force.setValue(0, 0, 0);
+ base_torque.setValue(0, 0, 0);
+
+ for (int i = 0; i < getNumLinks(); ++i) {
+ links[i].applied_force.setValue(0, 0, 0);
+ links[i].applied_torque.setValue(0, 0, 0);
+ links[i].joint_torque = 0;
+ }
+}
+
+void btMultiBody::clearVelocities()
+{
+ for (int i = 0; i < 6 + getNumLinks(); ++i)
+ {
+ m_real_buf[i] = 0.f;
+ }
+}
+void btMultiBody::addLinkForce(int i, const btVector3 &f)
+{
+ links[i].applied_force += f;
+}
+
+void btMultiBody::addLinkTorque(int i, const btVector3 &t)
+{
+ links[i].applied_torque += t;
+}
+
+void btMultiBody::addJointTorque(int i, btScalar Q)
+{
+ links[i].joint_torque += Q;
+}
+
+const btVector3 & btMultiBody::getLinkForce(int i) const
+{
+ return links[i].applied_force;
+}
+
+const btVector3 & btMultiBody::getLinkTorque(int i) const
+{
+ return links[i].applied_torque;
+}
+
+btScalar btMultiBody::getJointTorque(int i) const
+{
+ return links[i].joint_torque;
+}
+
+
+inline btMatrix3x3 vecMulVecTranspose(const btVector3& v0, const btVector3& v1Transposed)
+{
+ btVector3 row0 = btVector3(
+ v0.x() * v1Transposed.x(),
+ v0.x() * v1Transposed.y(),
+ v0.x() * v1Transposed.z());
+ btVector3 row1 = btVector3(
+ v0.y() * v1Transposed.x(),
+ v0.y() * v1Transposed.y(),
+ v0.y() * v1Transposed.z());
+ btVector3 row2 = btVector3(
+ v0.z() * v1Transposed.x(),
+ v0.z() * v1Transposed.y(),
+ v0.z() * v1Transposed.z());
+
+ btMatrix3x3 m(row0[0],row0[1],row0[2],
+ row1[0],row1[1],row1[2],
+ row2[0],row2[1],row2[2]);
+ return m;
+}
+
+
+void btMultiBody::stepVelocities(btScalar dt,
+ btAlignedObjectArray<btScalar> &scratch_r,
+ btAlignedObjectArray<btVector3> &scratch_v,
+ btAlignedObjectArray<btMatrix3x3> &scratch_m)
+{
+ // Implement Featherstone's algorithm to calculate joint accelerations (q_double_dot)
+ // and the base linear & angular accelerations.
+
+ // We apply damping forces in this routine as well as any external forces specified by the
+ // caller (via addBaseForce etc).
+
+ // output should point to an array of 6 + num_links reals.
+ // Format is: 3 angular accelerations (in world frame), 3 linear accelerations (in world frame),
+ // num_links joint acceleration values.
+
+ int num_links = getNumLinks();
+
+ const btScalar DAMPING_K1_LINEAR = m_linearDamping;
+ const btScalar DAMPING_K2_LINEAR = m_linearDamping;
+
+ const btScalar DAMPING_K1_ANGULAR = m_angularDamping;
+ const btScalar DAMPING_K2_ANGULAR= m_angularDamping;
+
+ btVector3 base_vel = getBaseVel();
+ btVector3 base_omega = getBaseOmega();
+
+ // Temporary matrices/vectors -- use scratch space from caller
+ // so that we don't have to keep reallocating every frame
+
+ scratch_r.resize(2*num_links + 6);
+ scratch_v.resize(8*num_links + 6);
+ scratch_m.resize(4*num_links + 4);
+
+ btScalar * r_ptr = &scratch_r[0];
+ btScalar * output = &scratch_r[num_links]; // "output" holds the q_double_dot results
+ btVector3 * v_ptr = &scratch_v[0];
+
+ // vhat_i (top = angular, bottom = linear part)
+ btVector3 * vel_top_angular = v_ptr; v_ptr += num_links + 1;
+ btVector3 * vel_bottom_linear = v_ptr; v_ptr += num_links + 1;
+
+ // zhat_i^A
+ btVector3 * zero_acc_top_angular = v_ptr; v_ptr += num_links + 1;
+ btVector3 * zero_acc_bottom_linear = v_ptr; v_ptr += num_links + 1;
+
+ // chat_i (note NOT defined for the base)
+ btVector3 * coriolis_top_angular = v_ptr; v_ptr += num_links;
+ btVector3 * coriolis_bottom_linear = v_ptr; v_ptr += num_links;
+
+ // top left, top right and bottom left blocks of Ihat_i^A.
+ // bottom right block = transpose of top left block and is not stored.
+ // Note: the top right and bottom left blocks are always symmetric matrices, but we don't make use of this fact currently.
+ btMatrix3x3 * inertia_top_left = &scratch_m[num_links + 1];
+ btMatrix3x3 * inertia_top_right = &scratch_m[2*num_links + 2];
+ btMatrix3x3 * inertia_bottom_left = &scratch_m[3*num_links + 3];
+
+ // Cached 3x3 rotation matrices from parent frame to this frame.
+ btMatrix3x3 * rot_from_parent = &matrix_buf[0];
+ btMatrix3x3 * rot_from_world = &scratch_m[0];
+
+ // hhat_i, ahat_i
+ // hhat is NOT stored for the base (but ahat is)
+ btVector3 * h_top = num_links > 0 ? &vector_buf[0] : 0;
+ btVector3 * h_bottom = num_links > 0 ? &vector_buf[num_links] : 0;
+ btVector3 * accel_top = v_ptr; v_ptr += num_links + 1;
+ btVector3 * accel_bottom = v_ptr; v_ptr += num_links + 1;
+
+ // Y_i, D_i
+ btScalar * Y = r_ptr; r_ptr += num_links;
+ btScalar * D = num_links > 0 ? &m_real_buf[6 + num_links] : 0;
+
+ // ptr to the joint accel part of the output
+ btScalar * joint_accel = output + 6;
+
+
+ // Start of the algorithm proper.
+
+ // First 'upward' loop.
+ // Combines CompTreeLinkVelocities and InitTreeLinks from Mirtich.
+
+ rot_from_parent[0] = btMatrix3x3(base_quat);
+
+ vel_top_angular[0] = rot_from_parent[0] * base_omega;
+ vel_bottom_linear[0] = rot_from_parent[0] * base_vel;
+
+ if (fixed_base) {
+ zero_acc_top_angular[0] = zero_acc_bottom_linear[0] = btVector3(0,0,0);
+ } else {
+ zero_acc_top_angular[0] = - (rot_from_parent[0] * (base_force
+ - base_mass*(DAMPING_K1_LINEAR+DAMPING_K2_LINEAR*base_vel.norm())*base_vel));
+
+ zero_acc_bottom_linear[0] =
+ - (rot_from_parent[0] * base_torque);
+
+ if (m_useGyroTerm)
+ zero_acc_bottom_linear[0]+=vel_top_angular[0].cross( base_inertia * vel_top_angular[0] );
+
+ zero_acc_bottom_linear[0] += base_inertia * vel_top_angular[0] * (DAMPING_K1_ANGULAR + DAMPING_K2_ANGULAR*vel_top_angular[0].norm());
+
+ }
+
+
+
+ inertia_top_left[0] = btMatrix3x3(0,0,0,0,0,0,0,0,0);//::Zero();
+
+
+ inertia_top_right[0].setValue(base_mass, 0, 0,
+ 0, base_mass, 0,
+ 0, 0, base_mass);
+ inertia_bottom_left[0].setValue(base_inertia[0], 0, 0,
+ 0, base_inertia[1], 0,
+ 0, 0, base_inertia[2]);
+
+ rot_from_world[0] = rot_from_parent[0];
+
+ for (int i = 0; i < num_links; ++i) {
+ const int parent = links[i].parent;
+ rot_from_parent[i+1] = btMatrix3x3(links[i].cached_rot_parent_to_this);
+
+
+ rot_from_world[i+1] = rot_from_parent[i+1] * rot_from_world[parent+1];
+
+ // vhat_i = i_xhat_p(i) * vhat_p(i)
+ SpatialTransform(rot_from_parent[i+1], links[i].cached_r_vector,
+ vel_top_angular[parent+1], vel_bottom_linear[parent+1],
+ vel_top_angular[i+1], vel_bottom_linear[i+1]);
+
+ // we can now calculate chat_i
+ // remember vhat_i is really vhat_p(i) (but in current frame) at this point
+ coriolis_bottom_linear[i] = vel_top_angular[i+1].cross(vel_top_angular[i+1].cross(links[i].cached_r_vector))
+ + 2 * vel_top_angular[i+1].cross(links[i].axis_bottom) * getJointVel(i);
+ if (links[i].is_revolute) {
+ coriolis_top_angular[i] = vel_top_angular[i+1].cross(links[i].axis_top) * getJointVel(i);
+ coriolis_bottom_linear[i] += (getJointVel(i) * getJointVel(i)) * links[i].axis_top.cross(links[i].axis_bottom);
+ } else {
+ coriolis_top_angular[i] = btVector3(0,0,0);
+ }
+
+ // now set vhat_i to its true value by doing
+ // vhat_i += qidot * shat_i
+ vel_top_angular[i+1] += getJointVel(i) * links[i].axis_top;
+ vel_bottom_linear[i+1] += getJointVel(i) * links[i].axis_bottom;
+
+ // calculate zhat_i^A
+ zero_acc_top_angular[i+1] = - (rot_from_world[i+1] * (links[i].applied_force));
+ zero_acc_top_angular[i+1] += links[i].mass * (DAMPING_K1_LINEAR + DAMPING_K2_LINEAR*vel_bottom_linear[i+1].norm()) * vel_bottom_linear[i+1];
+
+ zero_acc_bottom_linear[i+1] =
+ - (rot_from_world[i+1] * links[i].applied_torque);
+ if (m_useGyroTerm)
+ {
+ zero_acc_bottom_linear[i+1] += vel_top_angular[i+1].cross( links[i].inertia * vel_top_angular[i+1] );
+ }
+
+ zero_acc_bottom_linear[i+1] += links[i].inertia * vel_top_angular[i+1] * (DAMPING_K1_ANGULAR + DAMPING_K2_ANGULAR*vel_top_angular[i+1].norm());
+
+ // calculate Ihat_i^A
+ inertia_top_left[i+1] = btMatrix3x3(0,0,0,0,0,0,0,0,0);//::Zero();
+ inertia_top_right[i+1].setValue(links[i].mass, 0, 0,
+ 0, links[i].mass, 0,
+ 0, 0, links[i].mass);
+ inertia_bottom_left[i+1].setValue(links[i].inertia[0], 0, 0,
+ 0, links[i].inertia[1], 0,
+ 0, 0, links[i].inertia[2]);
+ }
+
+
+ // 'Downward' loop.
+ // (part of TreeForwardDynamics in Mirtich.)
+ for (int i = num_links - 1; i >= 0; --i) {
+
+ h_top[i] = inertia_top_left[i+1] * links[i].axis_top + inertia_top_right[i+1] * links[i].axis_bottom;
+ h_bottom[i] = inertia_bottom_left[i+1] * links[i].axis_top + inertia_top_left[i+1].transpose() * links[i].axis_bottom;
+ btScalar val = SpatialDotProduct(links[i].axis_top, links[i].axis_bottom, h_top[i], h_bottom[i]);
+ D[i] = val;
+ Y[i] = links[i].joint_torque
+ - SpatialDotProduct(links[i].axis_top, links[i].axis_bottom, zero_acc_top_angular[i+1], zero_acc_bottom_linear[i+1])
+ - SpatialDotProduct(h_top[i], h_bottom[i], coriolis_top_angular[i], coriolis_bottom_linear[i]);
+
+ const int parent = links[i].parent;
+
+
+ // Ip += pXi * (Ii - hi hi' / Di) * iXp
+ const btScalar one_over_di = 1.0f / D[i];
+
+
+
+
+ const btMatrix3x3 TL = inertia_top_left[i+1] - vecMulVecTranspose(one_over_di * h_top[i] , h_bottom[i]);
+ const btMatrix3x3 TR = inertia_top_right[i+1] - vecMulVecTranspose(one_over_di * h_top[i] , h_top[i]);
+ const btMatrix3x3 BL = inertia_bottom_left[i+1]- vecMulVecTranspose(one_over_di * h_bottom[i] , h_bottom[i]);
+
+
+ btMatrix3x3 r_cross;
+ r_cross.setValue(
+ 0, -links[i].cached_r_vector[2], links[i].cached_r_vector[1],
+ links[i].cached_r_vector[2], 0, -links[i].cached_r_vector[0],
+ -links[i].cached_r_vector[1], links[i].cached_r_vector[0], 0);
+
+ inertia_top_left[parent+1] += rot_from_parent[i+1].transpose() * ( TL - TR * r_cross ) * rot_from_parent[i+1];
+ inertia_top_right[parent+1] += rot_from_parent[i+1].transpose() * TR * rot_from_parent[i+1];
+ inertia_bottom_left[parent+1] += rot_from_parent[i+1].transpose() *
+ (r_cross * (TL - TR * r_cross) + BL - TL.transpose() * r_cross) * rot_from_parent[i+1];
+
+
+ // Zp += pXi * (Zi + Ii*ci + hi*Yi/Di)
+ btVector3 in_top, in_bottom, out_top, out_bottom;
+ const btScalar Y_over_D = Y[i] * one_over_di;
+ in_top = zero_acc_top_angular[i+1]
+ + inertia_top_left[i+1] * coriolis_top_angular[i]
+ + inertia_top_right[i+1] * coriolis_bottom_linear[i]
+ + Y_over_D * h_top[i];
+ in_bottom = zero_acc_bottom_linear[i+1]
+ + inertia_bottom_left[i+1] * coriolis_top_angular[i]
+ + inertia_top_left[i+1].transpose() * coriolis_bottom_linear[i]
+ + Y_over_D * h_bottom[i];
+ InverseSpatialTransform(rot_from_parent[i+1], links[i].cached_r_vector,
+ in_top, in_bottom, out_top, out_bottom);
+ zero_acc_top_angular[parent+1] += out_top;
+ zero_acc_bottom_linear[parent+1] += out_bottom;
+ }
+
+
+ // Second 'upward' loop
+ // (part of TreeForwardDynamics in Mirtich)
+
+ if (fixed_base)
+ {
+ accel_top[0] = accel_bottom[0] = btVector3(0,0,0);
+ }
+ else
+ {
+ if (num_links > 0)
+ {
+ //Matrix<btScalar, 6, 6> Imatrix;
+ //Imatrix.block<3,3>(0,0) = inertia_top_left[0];
+ //Imatrix.block<3,3>(3,0) = inertia_bottom_left[0];
+ //Imatrix.block<3,3>(0,3) = inertia_top_right[0];
+ //Imatrix.block<3,3>(3,3) = inertia_top_left[0].transpose();
+ //cached_imatrix_lu.reset(new Eigen::LU<Matrix<btScalar, 6, 6> >(Imatrix)); // TODO: Avoid memory allocation here?
+
+ cached_inertia_top_left = inertia_top_left[0];
+ cached_inertia_top_right = inertia_top_right[0];
+ cached_inertia_lower_left = inertia_bottom_left[0];
+ cached_inertia_lower_right= inertia_top_left[0].transpose();
+
+ }
+ btVector3 rhs_top (zero_acc_top_angular[0][0], zero_acc_top_angular[0][1], zero_acc_top_angular[0][2]);
+ btVector3 rhs_bot (zero_acc_bottom_linear[0][0], zero_acc_bottom_linear[0][1], zero_acc_bottom_linear[0][2]);
+ float result[6];
+
+ solveImatrix(rhs_top, rhs_bot, result);
+// printf("result=%f,%f,%f,%f,%f,%f\n",result[0],result[0],result[0],result[0],result[0],result[0]);
+ for (int i = 0; i < 3; ++i) {
+ accel_top[0][i] = -result[i];
+ accel_bottom[0][i] = -result[i+3];
+ }
+
+ }
+
+ // now do the loop over the links
+ for (int i = 0; i < num_links; ++i) {
+ const int parent = links[i].parent;
+ SpatialTransform(rot_from_parent[i+1], links[i].cached_r_vector,
+ accel_top[parent+1], accel_bottom[parent+1],
+ accel_top[i+1], accel_bottom[i+1]);
+ joint_accel[i] = (Y[i] - SpatialDotProduct(h_top[i], h_bottom[i], accel_top[i+1], accel_bottom[i+1])) / D[i];
+ accel_top[i+1] += coriolis_top_angular[i] + joint_accel[i] * links[i].axis_top;
+ accel_bottom[i+1] += coriolis_bottom_linear[i] + joint_accel[i] * links[i].axis_bottom;
+ }
+
+ // transform base accelerations back to the world frame.
+ btVector3 omegadot_out = rot_from_parent[0].transpose() * accel_top[0];
+ output[0] = omegadot_out[0];
+ output[1] = omegadot_out[1];
+ output[2] = omegadot_out[2];
+
+ btVector3 vdot_out = rot_from_parent[0].transpose() * accel_bottom[0];
+ output[3] = vdot_out[0];
+ output[4] = vdot_out[1];
+ output[5] = vdot_out[2];
+ // Final step: add the accelerations (times dt) to the velocities.
+ applyDeltaVee(output, dt);
+
+
+}
+
+
+
+void btMultiBody::solveImatrix(const btVector3& rhs_top, const btVector3& rhs_bot, float result[6]) const
+{
+ int num_links = getNumLinks();
+ ///solve I * x = rhs, so the result = invI * rhs
+ if (num_links == 0)
+ {
+ // in the case of 0 links (i.e. a plain rigid body, not a multibody) rhs * invI is easier
+ result[0] = rhs_bot[0] / base_inertia[0];
+ result[1] = rhs_bot[1] / base_inertia[1];
+ result[2] = rhs_bot[2] / base_inertia[2];
+ result[3] = rhs_top[0] / base_mass;
+ result[4] = rhs_top[1] / base_mass;
+ result[5] = rhs_top[2] / base_mass;
+ } else
+ {
+ /// Special routine for calculating the inverse of a spatial inertia matrix
+ ///the 6x6 matrix is stored as 4 blocks of 3x3 matrices
+ btMatrix3x3 Binv = cached_inertia_top_right.inverse()*-1.f;
+ btMatrix3x3 tmp = cached_inertia_lower_right * Binv;
+ btMatrix3x3 invIupper_right = (tmp * cached_inertia_top_left + cached_inertia_lower_left).inverse();
+ tmp = invIupper_right * cached_inertia_lower_right;
+ btMatrix3x3 invI_upper_left = (tmp * Binv);
+ btMatrix3x3 invI_lower_right = (invI_upper_left).transpose();
+ tmp = cached_inertia_top_left * invI_upper_left;
+ tmp[0][0]-= 1.0;
+ tmp[1][1]-= 1.0;
+ tmp[2][2]-= 1.0;
+ btMatrix3x3 invI_lower_left = (Binv * tmp);
+
+ //multiply result = invI * rhs
+ {
+ btVector3 vtop = invI_upper_left*rhs_top;
+ btVector3 tmp;
+ tmp = invIupper_right * rhs_bot;
+ vtop += tmp;
+ btVector3 vbot = invI_lower_left*rhs_top;
+ tmp = invI_lower_right * rhs_bot;
+ vbot += tmp;
+ result[0] = vtop[0];
+ result[1] = vtop[1];
+ result[2] = vtop[2];
+ result[3] = vbot[0];
+ result[4] = vbot[1];
+ result[5] = vbot[2];
+ }
+
+ }
+}
+
+
+void btMultiBody::calcAccelerationDeltas(const btScalar *force, btScalar *output,
+ btAlignedObjectArray<btScalar> &scratch_r, btAlignedObjectArray<btVector3> &scratch_v) const
+{
+ // Temporary matrices/vectors -- use scratch space from caller
+ // so that we don't have to keep reallocating every frame
+ int num_links = getNumLinks();
+ scratch_r.resize(num_links);
+ scratch_v.resize(4*num_links + 4);
+
+ btScalar * r_ptr = num_links == 0 ? 0 : &scratch_r[0];
+ btVector3 * v_ptr = &scratch_v[0];
+
+ // zhat_i^A (scratch space)
+ btVector3 * zero_acc_top_angular = v_ptr; v_ptr += num_links + 1;
+ btVector3 * zero_acc_bottom_linear = v_ptr; v_ptr += num_links + 1;
+
+ // rot_from_parent (cached from calcAccelerations)
+ const btMatrix3x3 * rot_from_parent = &matrix_buf[0];
+
+ // hhat (cached), accel (scratch)
+ const btVector3 * h_top = num_links > 0 ? &vector_buf[0] : 0;
+ const btVector3 * h_bottom = num_links > 0 ? &vector_buf[num_links] : 0;
+ btVector3 * accel_top = v_ptr; v_ptr += num_links + 1;
+ btVector3 * accel_bottom = v_ptr; v_ptr += num_links + 1;
+
+ // Y_i (scratch), D_i (cached)
+ btScalar * Y = r_ptr; r_ptr += num_links;
+ const btScalar * D = num_links > 0 ? &m_real_buf[6 + num_links] : 0;
+
+ btAssert(num_links == 0 || r_ptr - &scratch_r[0] == scratch_r.size());
+ btAssert(v_ptr - &scratch_v[0] == scratch_v.size());
+
+
+
+ // First 'upward' loop.
+ // Combines CompTreeLinkVelocities and InitTreeLinks from Mirtich.
+
+ btVector3 input_force(force[3],force[4],force[5]);
+ btVector3 input_torque(force[0],force[1],force[2]);
+
+ // Fill in zero_acc
+ // -- set to force/torque on the base, zero otherwise
+ if (fixed_base)
+ {
+ zero_acc_top_angular[0] = zero_acc_bottom_linear[0] = btVector3(0,0,0);
+ } else
+ {
+ zero_acc_top_angular[0] = - (rot_from_parent[0] * input_force);
+ zero_acc_bottom_linear[0] = - (rot_from_parent[0] * input_torque);
+ }
+ for (int i = 0; i < num_links; ++i)
+ {
+ zero_acc_top_angular[i+1] = zero_acc_bottom_linear[i+1] = btVector3(0,0,0);
+ }
+
+ // 'Downward' loop.
+ for (int i = num_links - 1; i >= 0; --i)
+ {
+
+ Y[i] = - SpatialDotProduct(links[i].axis_top, links[i].axis_bottom, zero_acc_top_angular[i+1], zero_acc_bottom_linear[i+1]);
+ Y[i] += force[6 + i]; // add joint torque
+
+ const int parent = links[i].parent;
+
+ // Zp += pXi * (Zi + hi*Yi/Di)
+ btVector3 in_top, in_bottom, out_top, out_bottom;
+ const btScalar Y_over_D = Y[i] / D[i];
+ in_top = zero_acc_top_angular[i+1] + Y_over_D * h_top[i];
+ in_bottom = zero_acc_bottom_linear[i+1] + Y_over_D * h_bottom[i];
+ InverseSpatialTransform(rot_from_parent[i+1], links[i].cached_r_vector,
+ in_top, in_bottom, out_top, out_bottom);
+ zero_acc_top_angular[parent+1] += out_top;
+ zero_acc_bottom_linear[parent+1] += out_bottom;
+ }
+
+ // ptr to the joint accel part of the output
+ btScalar * joint_accel = output + 6;
+
+ // Second 'upward' loop
+ if (fixed_base)
+ {
+ accel_top[0] = accel_bottom[0] = btVector3(0,0,0);
+ } else
+ {
+ btVector3 rhs_top (zero_acc_top_angular[0][0], zero_acc_top_angular[0][1], zero_acc_top_angular[0][2]);
+ btVector3 rhs_bot (zero_acc_bottom_linear[0][0], zero_acc_bottom_linear[0][1], zero_acc_bottom_linear[0][2]);
+
+ float result[6];
+ solveImatrix(rhs_top,rhs_bot, result);
+ // printf("result=%f,%f,%f,%f,%f,%f\n",result[0],result[0],result[0],result[0],result[0],result[0]);
+
+ for (int i = 0; i < 3; ++i) {
+ accel_top[0][i] = -result[i];
+ accel_bottom[0][i] = -result[i+3];
+ }
+
+ }
+
+ // now do the loop over the links
+ for (int i = 0; i < num_links; ++i) {
+ const int parent = links[i].parent;
+ SpatialTransform(rot_from_parent[i+1], links[i].cached_r_vector,
+ accel_top[parent+1], accel_bottom[parent+1],
+ accel_top[i+1], accel_bottom[i+1]);
+ joint_accel[i] = (Y[i] - SpatialDotProduct(h_top[i], h_bottom[i], accel_top[i+1], accel_bottom[i+1])) / D[i];
+ accel_top[i+1] += joint_accel[i] * links[i].axis_top;
+ accel_bottom[i+1] += joint_accel[i] * links[i].axis_bottom;
+ }
+
+ // transform base accelerations back to the world frame.
+ btVector3 omegadot_out;
+ omegadot_out = rot_from_parent[0].transpose() * accel_top[0];
+ output[0] = omegadot_out[0];
+ output[1] = omegadot_out[1];
+ output[2] = omegadot_out[2];
+
+ btVector3 vdot_out;
+ vdot_out = rot_from_parent[0].transpose() * accel_bottom[0];
+
+ output[3] = vdot_out[0];
+ output[4] = vdot_out[1];
+ output[5] = vdot_out[2];
+}
+
+void btMultiBody::stepPositions(btScalar dt)
+{
+ int num_links = getNumLinks();
+ // step position by adding dt * velocity
+ btVector3 v = getBaseVel();
+ base_pos += dt * v;
+
+ // "exponential map" method for the rotation
+ btVector3 base_omega = getBaseOmega();
+ const btScalar omega_norm = base_omega.norm();
+ const btScalar omega_times_dt = omega_norm * dt;
+ const btScalar SMALL_ROTATION_ANGLE = 0.02f; // Theoretically this should be ~ pow(FLT_EPSILON,0.25) which is ~ 0.0156
+ if (fabs(omega_times_dt) < SMALL_ROTATION_ANGLE)
+ {
+ const btScalar xsq = omega_times_dt * omega_times_dt; // |omega|^2 * dt^2
+ const btScalar sin_term = dt * (xsq / 48.0f - 0.5f); // -sin(0.5*dt*|omega|) / |omega|
+ const btScalar cos_term = 1.0f - xsq / 8.0f; // cos(0.5*dt*|omega|)
+ base_quat = base_quat * btQuaternion(sin_term * base_omega[0],sin_term * base_omega[1],sin_term * base_omega[2],cos_term);
+ } else
+ {
+ base_quat = base_quat * btQuaternion(base_omega / omega_norm,-omega_times_dt);
+ }
+
+ // Make sure the quaternion represents a valid rotation.
+ // (Not strictly necessary, but helps prevent any round-off errors from building up.)
+ base_quat.normalize();
+
+ // Finally we can update joint_pos for each of the links
+ for (int i = 0; i < num_links; ++i)
+ {
+ float jointVel = getJointVel(i);
+ links[i].joint_pos += dt * jointVel;
+ links[i].updateCache();
+ }
+}
+
+void btMultiBody::fillContactJacobian(int link,
+ const btVector3 &contact_point,
+ const btVector3 &normal,
+ btScalar *jac,
+ btAlignedObjectArray<btScalar> &scratch_r,
+ btAlignedObjectArray<btVector3> &scratch_v,
+ btAlignedObjectArray<btMatrix3x3> &scratch_m) const
+{
+ // temporary space
+ int num_links = getNumLinks();
+ scratch_v.resize(2*num_links + 2);
+ scratch_m.resize(num_links + 1);
+
+ btVector3 * v_ptr = &scratch_v[0];
+ btVector3 * p_minus_com = v_ptr; v_ptr += num_links + 1;
+ btVector3 * n_local = v_ptr; v_ptr += num_links + 1;
+ btAssert(v_ptr - &scratch_v[0] == scratch_v.size());
+
+ scratch_r.resize(num_links);
+ btScalar * results = num_links > 0 ? &scratch_r[0] : 0;
+
+ btMatrix3x3 * rot_from_world = &scratch_m[0];
+
+ const btVector3 p_minus_com_world = contact_point - base_pos;
+
+ rot_from_world[0] = btMatrix3x3(base_quat);
+
+ p_minus_com[0] = rot_from_world[0] * p_minus_com_world;
+ n_local[0] = rot_from_world[0] * normal;
+
+ // omega coeffients first.
+ btVector3 omega_coeffs;
+ omega_coeffs = p_minus_com_world.cross(normal);
+ jac[0] = omega_coeffs[0];
+ jac[1] = omega_coeffs[1];
+ jac[2] = omega_coeffs[2];
+ // then v coefficients
+ jac[3] = normal[0];
+ jac[4] = normal[1];
+ jac[5] = normal[2];
+
+ // Set remaining jac values to zero for now.
+ for (int i = 6; i < 6 + num_links; ++i) {
+ jac[i] = 0;
+ }
+
+ // Qdot coefficients, if necessary.
+ if (num_links > 0 && link > -1) {
+
+ // TODO: speed this up -- don't calculate for links we don't need.
+ // (Also, we are making 3 separate calls to this function, for the normal & the 2 friction directions,
+ // which is resulting in repeated work being done...)
+
+ // calculate required normals & positions in the local frames.
+ for (int i = 0; i < num_links; ++i) {
+
+ // transform to local frame
+ const int parent = links[i].parent;
+ const btMatrix3x3 mtx(links[i].cached_rot_parent_to_this);
+ rot_from_world[i+1] = mtx * rot_from_world[parent+1];
+
+ n_local[i+1] = mtx * n_local[parent+1];
+ p_minus_com[i+1] = mtx * p_minus_com[parent+1] - links[i].cached_r_vector;
+
+ // calculate the jacobian entry
+ if (links[i].is_revolute) {
+ results[i] = n_local[i+1].dot( links[i].axis_top.cross(p_minus_com[i+1]) + links[i].axis_bottom );
+ } else {
+ results[i] = n_local[i+1].dot( links[i].axis_bottom );
+ }
+ }
+
+ // Now copy through to output.
+ while (link != -1) {
+ jac[6 + link] = results[link];
+ link = links[link].parent;
+ }
+ }
+}
+
+void btMultiBody::wakeUp()
+{
+ awake = true;
+}
+
+void btMultiBody::goToSleep()
+{
+ awake = false;
+}
+
+void btMultiBody::checkMotionAndSleepIfRequired(btScalar timestep)
+{
+ int num_links = getNumLinks();
+ extern bool gDisableDeactivation;
+ if (!can_sleep || gDisableDeactivation)
+ {
+ awake = true;
+ sleep_timer = 0;
+ return;
+ }
+
+ // motion is computed as omega^2 + v^2 + (sum of squares of joint velocities)
+ btScalar motion = 0;
+ for (int i = 0; i < 6 + num_links; ++i) {
+ motion += m_real_buf[i] * m_real_buf[i];
+ }
+
+ if (motion < SLEEP_EPSILON) {
+ sleep_timer += timestep;
+ if (sleep_timer > SLEEP_TIMEOUT) {
+ goToSleep();
+ }
+ } else {
+ sleep_timer = 0;
+ if (!awake)
+ wakeUp();
+ }
+}
diff --git a/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBody.h b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBody.h
new file mode 100644
index 00000000000..7177bebbff5
--- /dev/null
+++ b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBody.h
@@ -0,0 +1,466 @@
+/*
+ * PURPOSE:
+ * Class representing an articulated rigid body. Stores the body's
+ * current state, allows forces and torques to be set, handles
+ * timestepping and implements Featherstone's algorithm.
+ *
+ * COPYRIGHT:
+ * Copyright (C) Stephen Thompson, <stephen@solarflare.org.uk>, 2011-2013
+ * Portions written By Erwin Coumans: replacing Eigen math library by Bullet LinearMath and a dedicated 6x6 matrix inverse (solveImatrix)
+
+ This software is provided 'as-is', without any express or implied warranty.
+ In no event will the authors be held liable for any damages arising from the use of this software.
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it freely,
+ subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ */
+
+
+#ifndef BT_MULTIBODY_H
+#define BT_MULTIBODY_H
+
+#include "LinearMath/btScalar.h"
+#include "LinearMath/btVector3.h"
+#include "LinearMath/btQuaternion.h"
+#include "LinearMath/btMatrix3x3.h"
+#include "LinearMath/btAlignedObjectArray.h"
+
+
+#include "btMultiBodyLink.h"
+class btMultiBodyLinkCollider;
+
+class btMultiBody
+{
+public:
+
+
+ BT_DECLARE_ALIGNED_ALLOCATOR();
+
+ //
+ // initialization
+ //
+
+ btMultiBody(int n_links, // NOT including the base
+ btScalar mass, // mass of base
+ const btVector3 &inertia, // inertia of base, in base frame; assumed diagonal
+ bool fixed_base_, // whether the base is fixed (true) or can move (false)
+ bool can_sleep_);
+
+ ~btMultiBody();
+
+ void setupPrismatic(int i, // 0 to num_links-1
+ btScalar mass,
+ const btVector3 &inertia, // in my frame; assumed diagonal
+ int parent,
+ const btQuaternion &rot_parent_to_this, // rotate points in parent frame to my frame.
+ const btVector3 &joint_axis, // in my frame
+ const btVector3 &r_vector_when_q_zero, // vector from parent COM to my COM, in my frame, when q = 0.
+ bool disableParentCollision=false
+ );
+
+ void setupRevolute(int i, // 0 to num_links-1
+ btScalar mass,
+ const btVector3 &inertia,
+ int parent,
+ const btQuaternion &zero_rot_parent_to_this, // rotate points in parent frame to this frame, when q = 0
+ const btVector3 &joint_axis, // in my frame
+ const btVector3 &parent_axis_position, // vector from parent COM to joint axis, in PARENT frame
+ const btVector3 &my_axis_position, // vector from joint axis to my COM, in MY frame
+ bool disableParentCollision=false);
+
+ const btMultibodyLink& getLink(int index) const
+ {
+ return links[index];
+ }
+
+ btMultibodyLink& getLink(int index)
+ {
+ return links[index];
+ }
+
+
+ void setBaseCollider(btMultiBodyLinkCollider* collider)//collider can be NULL to disable collision for the base
+ {
+ m_baseCollider = collider;
+ }
+ const btMultiBodyLinkCollider* getBaseCollider() const
+ {
+ return m_baseCollider;
+ }
+ btMultiBodyLinkCollider* getBaseCollider()
+ {
+ return m_baseCollider;
+ }
+
+ //
+ // get parent
+ // input: link num from 0 to num_links-1
+ // output: link num from 0 to num_links-1, OR -1 to mean the base.
+ //
+ int getParent(int link_num) const;
+
+
+ //
+ // get number of links, masses, moments of inertia
+ //
+
+ int getNumLinks() const { return links.size(); }
+ btScalar getBaseMass() const { return base_mass; }
+ const btVector3 & getBaseInertia() const { return base_inertia; }
+ btScalar getLinkMass(int i) const;
+ const btVector3 & getLinkInertia(int i) const;
+
+
+ //
+ // change mass (incomplete: can only change base mass and inertia at present)
+ //
+
+ void setBaseMass(btScalar mass) { base_mass = mass; }
+ void setBaseInertia(const btVector3 &inertia) { base_inertia = inertia; }
+
+
+ //
+ // get/set pos/vel/rot/omega for the base link
+ //
+
+ const btVector3 & getBasePos() const { return base_pos; } // in world frame
+ const btVector3 getBaseVel() const
+ {
+ return btVector3(m_real_buf[3],m_real_buf[4],m_real_buf[5]);
+ } // in world frame
+ const btQuaternion & getWorldToBaseRot() const
+ {
+ return base_quat;
+ } // rotates world vectors into base frame
+ btVector3 getBaseOmega() const { return btVector3(m_real_buf[0],m_real_buf[1],m_real_buf[2]); } // in world frame
+
+ void setBasePos(const btVector3 &pos)
+ {
+ base_pos = pos;
+ }
+ void setBaseVel(const btVector3 &vel)
+ {
+
+ m_real_buf[3]=vel[0]; m_real_buf[4]=vel[1]; m_real_buf[5]=vel[2];
+ }
+ void setWorldToBaseRot(const btQuaternion &rot)
+ {
+ base_quat = rot;
+ }
+ void setBaseOmega(const btVector3 &omega)
+ {
+ m_real_buf[0]=omega[0];
+ m_real_buf[1]=omega[1];
+ m_real_buf[2]=omega[2];
+ }
+
+
+ //
+ // get/set pos/vel for child links (i = 0 to num_links-1)
+ //
+
+ btScalar getJointPos(int i) const;
+ btScalar getJointVel(int i) const;
+
+ void setJointPos(int i, btScalar q);
+ void setJointVel(int i, btScalar qdot);
+
+ //
+ // direct access to velocities as a vector of 6 + num_links elements.
+ // (omega first, then v, then joint velocities.)
+ //
+ const btScalar * getVelocityVector() const
+ {
+ return &m_real_buf[0];
+ }
+/* btScalar * getVelocityVector()
+ {
+ return &real_buf[0];
+ }
+ */
+
+ //
+ // get the frames of reference (positions and orientations) of the child links
+ // (i = 0 to num_links-1)
+ //
+
+ const btVector3 & getRVector(int i) const; // vector from COM(parent(i)) to COM(i), in frame i's coords
+ const btQuaternion & getParentToLocalRot(int i) const; // rotates vectors in frame parent(i) to vectors in frame i.
+
+
+ //
+ // transform vectors in local frame of link i to world frame (or vice versa)
+ //
+ btVector3 localPosToWorld(int i, const btVector3 &vec) const;
+ btVector3 localDirToWorld(int i, const btVector3 &vec) const;
+ btVector3 worldPosToLocal(int i, const btVector3 &vec) const;
+ btVector3 worldDirToLocal(int i, const btVector3 &vec) const;
+
+
+ //
+ // calculate kinetic energy and angular momentum
+ // useful for debugging.
+ //
+
+ btScalar getKineticEnergy() const;
+ btVector3 getAngularMomentum() const;
+
+
+ //
+ // set external forces and torques. Note all external forces/torques are given in the WORLD frame.
+ //
+
+ void clearForcesAndTorques();
+ void clearVelocities();
+
+ void addBaseForce(const btVector3 &f)
+ {
+ base_force += f;
+ }
+ void addBaseTorque(const btVector3 &t) { base_torque += t; }
+ void addLinkForce(int i, const btVector3 &f);
+ void addLinkTorque(int i, const btVector3 &t);
+ void addJointTorque(int i, btScalar Q);
+
+ const btVector3 & getBaseForce() const { return base_force; }
+ const btVector3 & getBaseTorque() const { return base_torque; }
+ const btVector3 & getLinkForce(int i) const;
+ const btVector3 & getLinkTorque(int i) const;
+ btScalar getJointTorque(int i) const;
+
+
+ //
+ // dynamics routines.
+ //
+
+ // timestep the velocities (given the external forces/torques set using addBaseForce etc).
+ // also sets up caches for calcAccelerationDeltas.
+ //
+ // Note: the caller must provide three vectors which are used as
+ // temporary scratch space. The idea here is to reduce dynamic
+ // memory allocation: the same scratch vectors can be re-used
+ // again and again for different Multibodies, instead of each
+ // btMultiBody allocating (and then deallocating) their own
+ // individual scratch buffers. This gives a considerable speed
+ // improvement, at least on Windows (where dynamic memory
+ // allocation appears to be fairly slow).
+ //
+ void stepVelocities(btScalar dt,
+ btAlignedObjectArray<btScalar> &scratch_r,
+ btAlignedObjectArray<btVector3> &scratch_v,
+ btAlignedObjectArray<btMatrix3x3> &scratch_m);
+
+ // calcAccelerationDeltas
+ // input: force vector (in same format as jacobian, i.e.:
+ // 3 torque values, 3 force values, num_links joint torque values)
+ // output: 3 omegadot values, 3 vdot values, num_links q_double_dot values
+ // (existing contents of output array are replaced)
+ // stepVelocities must have been called first.
+ void calcAccelerationDeltas(const btScalar *force, btScalar *output,
+ btAlignedObjectArray<btScalar> &scratch_r,
+ btAlignedObjectArray<btVector3> &scratch_v) const;
+
+ // apply a delta-vee directly. used in sequential impulses code.
+ void applyDeltaVee(const btScalar * delta_vee)
+ {
+
+ for (int i = 0; i < 6 + getNumLinks(); ++i)
+ {
+ m_real_buf[i] += delta_vee[i];
+ }
+
+ }
+ void applyDeltaVee(const btScalar * delta_vee, btScalar multiplier)
+ {
+ btScalar sum = 0;
+ for (int i = 0; i < 6 + getNumLinks(); ++i)
+ {
+ sum += delta_vee[i]*multiplier*delta_vee[i]*multiplier;
+ }
+ btScalar l = btSqrt(sum);
+ /*
+ static btScalar maxl = -1e30f;
+ if (l>maxl)
+ {
+ maxl=l;
+ // printf("maxl=%f\n",maxl);
+ }
+ */
+ if (l>m_maxAppliedImpulse)
+ {
+// printf("exceeds 100: l=%f\n",maxl);
+ multiplier *= m_maxAppliedImpulse/l;
+ }
+
+ for (int i = 0; i < 6 + getNumLinks(); ++i)
+ {
+ sum += delta_vee[i]*multiplier*delta_vee[i]*multiplier;
+ m_real_buf[i] += delta_vee[i] * multiplier;
+ }
+ }
+
+ // timestep the positions (given current velocities).
+ void stepPositions(btScalar dt);
+
+
+ //
+ // contacts
+ //
+
+ // This routine fills out a contact constraint jacobian for this body.
+ // the 'normal' supplied must be -n for body1 or +n for body2 of the contact.
+ // 'normal' & 'contact_point' are both given in world coordinates.
+ void fillContactJacobian(int link,
+ const btVector3 &contact_point,
+ const btVector3 &normal,
+ btScalar *jac,
+ btAlignedObjectArray<btScalar> &scratch_r,
+ btAlignedObjectArray<btVector3> &scratch_v,
+ btAlignedObjectArray<btMatrix3x3> &scratch_m) const;
+
+
+ //
+ // sleeping
+ //
+ void setCanSleep(bool canSleep)
+ {
+ can_sleep = canSleep;
+ }
+
+ bool isAwake() const { return awake; }
+ void wakeUp();
+ void goToSleep();
+ void checkMotionAndSleepIfRequired(btScalar timestep);
+
+ bool hasFixedBase() const
+ {
+ return fixed_base;
+ }
+
+ int getCompanionId() const
+ {
+ return m_companionId;
+ }
+ void setCompanionId(int id)
+ {
+ //printf("for %p setCompanionId(%d)\n",this, id);
+ m_companionId = id;
+ }
+
+ void setNumLinks(int numLinks)//careful: when changing the number of links, make sure to re-initialize or update existing links
+ {
+ links.resize(numLinks);
+ }
+
+ btScalar getLinearDamping() const
+ {
+ return m_linearDamping;
+ }
+ void setLinearDamping( btScalar damp)
+ {
+ m_linearDamping = damp;
+ }
+ btScalar getAngularDamping() const
+ {
+ return m_angularDamping;
+ }
+
+ bool getUseGyroTerm() const
+ {
+ return m_useGyroTerm;
+ }
+ void setUseGyroTerm(bool useGyro)
+ {
+ m_useGyroTerm = useGyro;
+ }
+ btScalar getMaxAppliedImpulse() const
+ {
+ return m_maxAppliedImpulse;
+ }
+ void setMaxAppliedImpulse(btScalar maxImp)
+ {
+ m_maxAppliedImpulse = maxImp;
+ }
+
+ void setHasSelfCollision(bool hasSelfCollision)
+ {
+ m_hasSelfCollision = hasSelfCollision;
+ }
+ bool hasSelfCollision() const
+ {
+ return m_hasSelfCollision;
+ }
+
+private:
+ btMultiBody(const btMultiBody &); // not implemented
+ void operator=(const btMultiBody &); // not implemented
+
+ void compTreeLinkVelocities(btVector3 *omega, btVector3 *vel) const;
+
+ void solveImatrix(const btVector3& rhs_top, const btVector3& rhs_bot, float result[6]) const;
+
+
+private:
+
+ btMultiBodyLinkCollider* m_baseCollider;//can be NULL
+
+ btVector3 base_pos; // position of COM of base (world frame)
+ btQuaternion base_quat; // rotates world points into base frame
+
+ btScalar base_mass; // mass of the base
+ btVector3 base_inertia; // inertia of the base (in local frame; diagonal)
+
+ btVector3 base_force; // external force applied to base. World frame.
+ btVector3 base_torque; // external torque applied to base. World frame.
+
+ btAlignedObjectArray<btMultibodyLink> links; // array of links, excluding the base. index from 0 to num_links-1.
+ btAlignedObjectArray<btMultiBodyLinkCollider*> m_colliders;
+
+ //
+ // real_buf:
+ // offset size array
+ // 0 6 + num_links v (base_omega; base_vel; joint_vels)
+ // 6+num_links num_links D
+ //
+ // vector_buf:
+ // offset size array
+ // 0 num_links h_top
+ // num_links num_links h_bottom
+ //
+ // matrix_buf:
+ // offset size array
+ // 0 num_links+1 rot_from_parent
+ //
+
+ btAlignedObjectArray<btScalar> m_real_buf;
+ btAlignedObjectArray<btVector3> vector_buf;
+ btAlignedObjectArray<btMatrix3x3> matrix_buf;
+
+ //std::auto_ptr<Eigen::LU<Eigen::Matrix<btScalar, 6, 6> > > cached_imatrix_lu;
+
+ btMatrix3x3 cached_inertia_top_left;
+ btMatrix3x3 cached_inertia_top_right;
+ btMatrix3x3 cached_inertia_lower_left;
+ btMatrix3x3 cached_inertia_lower_right;
+
+ bool fixed_base;
+
+ // Sleep parameters.
+ bool awake;
+ bool can_sleep;
+ btScalar sleep_timer;
+
+ int m_companionId;
+ btScalar m_linearDamping;
+ btScalar m_angularDamping;
+ bool m_useGyroTerm;
+ btScalar m_maxAppliedImpulse;
+ bool m_hasSelfCollision;
+};
+
+#endif
diff --git a/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyConstraint.cpp b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyConstraint.cpp
new file mode 100644
index 00000000000..44e04c3a132
--- /dev/null
+++ b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyConstraint.cpp
@@ -0,0 +1,527 @@
+#include "btMultiBodyConstraint.h"
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+
+btMultiBodyConstraint::btMultiBodyConstraint(btMultiBody* bodyA,btMultiBody* bodyB,int linkA, int linkB, int numRows, bool isUnilateral)
+ :m_bodyA(bodyA),
+ m_bodyB(bodyB),
+ m_linkA(linkA),
+ m_linkB(linkB),
+ m_num_rows(numRows),
+ m_isUnilateral(isUnilateral),
+ m_maxAppliedImpulse(100)
+{
+ m_jac_size_A = (6 + bodyA->getNumLinks());
+ m_jac_size_both = (m_jac_size_A + (bodyB ? 6 + bodyB->getNumLinks() : 0));
+ m_pos_offset = ((1 + m_jac_size_both)*m_num_rows);
+ m_data.resize((2 + m_jac_size_both) * m_num_rows);
+}
+
+btMultiBodyConstraint::~btMultiBodyConstraint()
+{
+}
+
+
+
+btScalar btMultiBodyConstraint::fillConstraintRowMultiBodyMultiBody(btMultiBodySolverConstraint& constraintRow,
+ btMultiBodyJacobianData& data,
+ btScalar* jacOrgA,btScalar* jacOrgB,
+ const btContactSolverInfo& infoGlobal,
+ btScalar desiredVelocity,
+ btScalar lowerLimit,
+ btScalar upperLimit)
+{
+
+
+
+ constraintRow.m_multiBodyA = m_bodyA;
+ constraintRow.m_multiBodyB = m_bodyB;
+
+ btMultiBody* multiBodyA = constraintRow.m_multiBodyA;
+ btMultiBody* multiBodyB = constraintRow.m_multiBodyB;
+
+ if (multiBodyA)
+ {
+
+ const int ndofA = multiBodyA->getNumLinks() + 6;
+
+ constraintRow.m_deltaVelAindex = multiBodyA->getCompanionId();
+
+ if (constraintRow.m_deltaVelAindex <0)
+ {
+ constraintRow.m_deltaVelAindex = data.m_deltaVelocities.size();
+ multiBodyA->setCompanionId(constraintRow.m_deltaVelAindex);
+ data.m_deltaVelocities.resize(data.m_deltaVelocities.size()+ndofA);
+ } else
+ {
+ btAssert(data.m_deltaVelocities.size() >= constraintRow.m_deltaVelAindex+ndofA);
+ }
+
+ constraintRow.m_jacAindex = data.m_jacobians.size();
+ data.m_jacobians.resize(data.m_jacobians.size()+ndofA);
+ data.m_deltaVelocitiesUnitImpulse.resize(data.m_deltaVelocitiesUnitImpulse.size()+ndofA);
+ btAssert(data.m_jacobians.size() == data.m_deltaVelocitiesUnitImpulse.size());
+ for (int i=0;i<ndofA;i++)
+ data.m_jacobians[constraintRow.m_jacAindex+i] = jacOrgA[i];
+
+ btScalar* delta = &data.m_deltaVelocitiesUnitImpulse[constraintRow.m_jacAindex];
+ multiBodyA->calcAccelerationDeltas(&data.m_jacobians[constraintRow.m_jacAindex],delta,data.scratch_r, data.scratch_v);
+ }
+
+ if (multiBodyB)
+ {
+ const int ndofB = multiBodyB->getNumLinks() + 6;
+
+ constraintRow.m_deltaVelBindex = multiBodyB->getCompanionId();
+ if (constraintRow.m_deltaVelBindex <0)
+ {
+ constraintRow.m_deltaVelBindex = data.m_deltaVelocities.size();
+ multiBodyB->setCompanionId(constraintRow.m_deltaVelBindex);
+ data.m_deltaVelocities.resize(data.m_deltaVelocities.size()+ndofB);
+ }
+
+ constraintRow.m_jacBindex = data.m_jacobians.size();
+ data.m_jacobians.resize(data.m_jacobians.size()+ndofB);
+
+ for (int i=0;i<ndofB;i++)
+ data.m_jacobians[constraintRow.m_jacBindex+i] = jacOrgB[i];
+
+ data.m_deltaVelocitiesUnitImpulse.resize(data.m_deltaVelocitiesUnitImpulse.size()+ndofB);
+ btAssert(data.m_jacobians.size() == data.m_deltaVelocitiesUnitImpulse.size());
+ multiBodyB->calcAccelerationDeltas(&data.m_jacobians[constraintRow.m_jacBindex],&data.m_deltaVelocitiesUnitImpulse[constraintRow.m_jacBindex],data.scratch_r, data.scratch_v);
+ }
+ {
+
+ btVector3 vec;
+ btScalar denom0 = 0.f;
+ btScalar denom1 = 0.f;
+ btScalar* jacB = 0;
+ btScalar* jacA = 0;
+ btScalar* lambdaA =0;
+ btScalar* lambdaB =0;
+ int ndofA = 0;
+ if (multiBodyA)
+ {
+ ndofA = multiBodyA->getNumLinks() + 6;
+ jacA = &data.m_jacobians[constraintRow.m_jacAindex];
+ lambdaA = &data.m_deltaVelocitiesUnitImpulse[constraintRow.m_jacAindex];
+ for (int i = 0; i < ndofA; ++i)
+ {
+ btScalar j = jacA[i] ;
+ btScalar l =lambdaA[i];
+ denom0 += j*l;
+ }
+ }
+ if (multiBodyB)
+ {
+ const int ndofB = multiBodyB->getNumLinks() + 6;
+ jacB = &data.m_jacobians[constraintRow.m_jacBindex];
+ lambdaB = &data.m_deltaVelocitiesUnitImpulse[constraintRow.m_jacBindex];
+ for (int i = 0; i < ndofB; ++i)
+ {
+ btScalar j = jacB[i] ;
+ btScalar l =lambdaB[i];
+ denom1 += j*l;
+ }
+
+ }
+
+ if (multiBodyA && (multiBodyA==multiBodyB))
+ {
+ // ndof1 == ndof2 in this case
+ for (int i = 0; i < ndofA; ++i)
+ {
+ denom1 += jacB[i] * lambdaA[i];
+ denom1 += jacA[i] * lambdaB[i];
+ }
+ }
+
+ btScalar d = denom0+denom1;
+ if (btFabs(d)>SIMD_EPSILON)
+ {
+
+ constraintRow.m_jacDiagABInv = 1.f/(d);
+ } else
+ {
+ constraintRow.m_jacDiagABInv = 1.f;
+ }
+
+ }
+
+
+ //compute rhs and remaining constraintRow fields
+
+
+
+
+ btScalar rel_vel = 0.f;
+ int ndofA = 0;
+ int ndofB = 0;
+ {
+
+ btVector3 vel1,vel2;
+ if (multiBodyA)
+ {
+ ndofA = multiBodyA->getNumLinks() + 6;
+ btScalar* jacA = &data.m_jacobians[constraintRow.m_jacAindex];
+ for (int i = 0; i < ndofA ; ++i)
+ rel_vel += multiBodyA->getVelocityVector()[i] * jacA[i];
+ }
+ if (multiBodyB)
+ {
+ ndofB = multiBodyB->getNumLinks() + 6;
+ btScalar* jacB = &data.m_jacobians[constraintRow.m_jacBindex];
+ for (int i = 0; i < ndofB ; ++i)
+ rel_vel += multiBodyB->getVelocityVector()[i] * jacB[i];
+
+ }
+
+ constraintRow.m_friction = 0.f;
+
+ constraintRow.m_appliedImpulse = 0.f;
+ constraintRow.m_appliedPushImpulse = 0.f;
+
+ btScalar velocityError = desiredVelocity - rel_vel;// * damping;
+
+ btScalar erp = infoGlobal.m_erp2;
+
+ btScalar velocityImpulse = velocityError *constraintRow.m_jacDiagABInv;
+
+ if (!infoGlobal.m_splitImpulse)
+ {
+ //combine position and velocity into rhs
+ constraintRow.m_rhs = velocityImpulse;
+ constraintRow.m_rhsPenetration = 0.f;
+
+ } else
+ {
+ //split position and velocity into rhs and m_rhsPenetration
+ constraintRow.m_rhs = velocityImpulse;
+ constraintRow.m_rhsPenetration = 0.f;
+ }
+
+
+ constraintRow.m_cfm = 0.f;
+ constraintRow.m_lowerLimit = lowerLimit;
+ constraintRow.m_upperLimit = upperLimit;
+
+ }
+ return rel_vel;
+}
+
+
+void btMultiBodyConstraint::applyDeltaVee(btMultiBodyJacobianData& data, btScalar* delta_vee, btScalar impulse, int velocityIndex, int ndof)
+{
+ for (int i = 0; i < ndof; ++i)
+ data.m_deltaVelocities[velocityIndex+i] += delta_vee[i] * impulse;
+}
+
+
+void btMultiBodyConstraint::fillMultiBodyConstraintMixed(btMultiBodySolverConstraint& solverConstraint,
+ btMultiBodyJacobianData& data,
+ const btVector3& contactNormalOnB,
+ const btVector3& posAworld, const btVector3& posBworld,
+ btScalar position,
+ const btContactSolverInfo& infoGlobal,
+ btScalar& relaxation,
+ bool isFriction, btScalar desiredVelocity, btScalar cfmSlip)
+{
+
+
+ btVector3 rel_pos1 = posAworld;
+ btVector3 rel_pos2 = posBworld;
+
+ solverConstraint.m_multiBodyA = m_bodyA;
+ solverConstraint.m_multiBodyB = m_bodyB;
+ solverConstraint.m_linkA = m_linkA;
+ solverConstraint.m_linkB = m_linkB;
+
+
+ btMultiBody* multiBodyA = solverConstraint.m_multiBodyA;
+ btMultiBody* multiBodyB = solverConstraint.m_multiBodyB;
+
+ const btVector3& pos1 = posAworld;
+ const btVector3& pos2 = posBworld;
+
+ btSolverBody* bodyA = multiBodyA ? 0 : &data.m_solverBodyPool->at(solverConstraint.m_solverBodyIdA);
+ btSolverBody* bodyB = multiBodyB ? 0 : &data.m_solverBodyPool->at(solverConstraint.m_solverBodyIdB);
+
+ btRigidBody* rb0 = multiBodyA ? 0 : bodyA->m_originalBody;
+ btRigidBody* rb1 = multiBodyB ? 0 : bodyB->m_originalBody;
+
+ if (bodyA)
+ rel_pos1 = pos1 - bodyA->getWorldTransform().getOrigin();
+ if (bodyB)
+ rel_pos2 = pos2 - bodyB->getWorldTransform().getOrigin();
+
+ relaxation = 1.f;
+
+ if (multiBodyA)
+ {
+ const int ndofA = multiBodyA->getNumLinks() + 6;
+
+ solverConstraint.m_deltaVelAindex = multiBodyA->getCompanionId();
+
+ if (solverConstraint.m_deltaVelAindex <0)
+ {
+ solverConstraint.m_deltaVelAindex = data.m_deltaVelocities.size();
+ multiBodyA->setCompanionId(solverConstraint.m_deltaVelAindex);
+ data.m_deltaVelocities.resize(data.m_deltaVelocities.size()+ndofA);
+ } else
+ {
+ btAssert(data.m_deltaVelocities.size() >= solverConstraint.m_deltaVelAindex+ndofA);
+ }
+
+ solverConstraint.m_jacAindex = data.m_jacobians.size();
+ data.m_jacobians.resize(data.m_jacobians.size()+ndofA);
+ data.m_deltaVelocitiesUnitImpulse.resize(data.m_deltaVelocitiesUnitImpulse.size()+ndofA);
+ btAssert(data.m_jacobians.size() == data.m_deltaVelocitiesUnitImpulse.size());
+
+ btScalar* jac1=&data.m_jacobians[solverConstraint.m_jacAindex];
+ multiBodyA->fillContactJacobian(solverConstraint.m_linkA, posAworld, contactNormalOnB, jac1, data.scratch_r, data.scratch_v, data.scratch_m);
+ btScalar* delta = &data.m_deltaVelocitiesUnitImpulse[solverConstraint.m_jacAindex];
+ multiBodyA->calcAccelerationDeltas(&data.m_jacobians[solverConstraint.m_jacAindex],delta,data.scratch_r, data.scratch_v);
+ } else
+ {
+ btVector3 torqueAxis0 = rel_pos1.cross(contactNormalOnB);
+ solverConstraint.m_angularComponentA = rb0 ? rb0->getInvInertiaTensorWorld()*torqueAxis0*rb0->getAngularFactor() : btVector3(0,0,0);
+ solverConstraint.m_relpos1CrossNormal = torqueAxis0;
+ solverConstraint.m_contactNormal1 = contactNormalOnB;
+ }
+
+ if (multiBodyB)
+ {
+ const int ndofB = multiBodyB->getNumLinks() + 6;
+
+ solverConstraint.m_deltaVelBindex = multiBodyB->getCompanionId();
+ if (solverConstraint.m_deltaVelBindex <0)
+ {
+ solverConstraint.m_deltaVelBindex = data.m_deltaVelocities.size();
+ multiBodyB->setCompanionId(solverConstraint.m_deltaVelBindex);
+ data.m_deltaVelocities.resize(data.m_deltaVelocities.size()+ndofB);
+ }
+
+ solverConstraint.m_jacBindex = data.m_jacobians.size();
+
+ data.m_jacobians.resize(data.m_jacobians.size()+ndofB);
+ data.m_deltaVelocitiesUnitImpulse.resize(data.m_deltaVelocitiesUnitImpulse.size()+ndofB);
+ btAssert(data.m_jacobians.size() == data.m_deltaVelocitiesUnitImpulse.size());
+
+ multiBodyB->fillContactJacobian(solverConstraint.m_linkB, posBworld, -contactNormalOnB, &data.m_jacobians[solverConstraint.m_jacBindex], data.scratch_r, data.scratch_v, data.scratch_m);
+ multiBodyB->calcAccelerationDeltas(&data.m_jacobians[solverConstraint.m_jacBindex],&data.m_deltaVelocitiesUnitImpulse[solverConstraint.m_jacBindex],data.scratch_r, data.scratch_v);
+ } else
+ {
+ btVector3 torqueAxis1 = rel_pos2.cross(contactNormalOnB);
+ solverConstraint.m_angularComponentB = rb1 ? rb1->getInvInertiaTensorWorld()*-torqueAxis1*rb1->getAngularFactor() : btVector3(0,0,0);
+ solverConstraint.m_relpos2CrossNormal = -torqueAxis1;
+ solverConstraint.m_contactNormal2 = -contactNormalOnB;
+ }
+
+ {
+
+ btVector3 vec;
+ btScalar denom0 = 0.f;
+ btScalar denom1 = 0.f;
+ btScalar* jacB = 0;
+ btScalar* jacA = 0;
+ btScalar* lambdaA =0;
+ btScalar* lambdaB =0;
+ int ndofA = 0;
+ if (multiBodyA)
+ {
+ ndofA = multiBodyA->getNumLinks() + 6;
+ jacA = &data.m_jacobians[solverConstraint.m_jacAindex];
+ lambdaA = &data.m_deltaVelocitiesUnitImpulse[solverConstraint.m_jacAindex];
+ for (int i = 0; i < ndofA; ++i)
+ {
+ btScalar j = jacA[i] ;
+ btScalar l =lambdaA[i];
+ denom0 += j*l;
+ }
+ } else
+ {
+ if (rb0)
+ {
+ vec = ( solverConstraint.m_angularComponentA).cross(rel_pos1);
+ denom0 = rb0->getInvMass() + contactNormalOnB.dot(vec);
+ }
+ }
+ if (multiBodyB)
+ {
+ const int ndofB = multiBodyB->getNumLinks() + 6;
+ jacB = &data.m_jacobians[solverConstraint.m_jacBindex];
+ lambdaB = &data.m_deltaVelocitiesUnitImpulse[solverConstraint.m_jacBindex];
+ for (int i = 0; i < ndofB; ++i)
+ {
+ btScalar j = jacB[i] ;
+ btScalar l =lambdaB[i];
+ denom1 += j*l;
+ }
+
+ } else
+ {
+ if (rb1)
+ {
+ vec = ( -solverConstraint.m_angularComponentB).cross(rel_pos2);
+ denom1 = rb1->getInvMass() + contactNormalOnB.dot(vec);
+ }
+ }
+
+ if (multiBodyA && (multiBodyA==multiBodyB))
+ {
+ // ndof1 == ndof2 in this case
+ for (int i = 0; i < ndofA; ++i)
+ {
+ denom1 += jacB[i] * lambdaA[i];
+ denom1 += jacA[i] * lambdaB[i];
+ }
+ }
+
+ btScalar d = denom0+denom1;
+ if (btFabs(d)>SIMD_EPSILON)
+ {
+
+ solverConstraint.m_jacDiagABInv = relaxation/(d);
+ } else
+ {
+ solverConstraint.m_jacDiagABInv = 1.f;
+ }
+
+ }
+
+
+ //compute rhs and remaining solverConstraint fields
+
+
+
+ btScalar restitution = 0.f;
+ btScalar penetration = isFriction? 0 : position+infoGlobal.m_linearSlop;
+
+ btScalar rel_vel = 0.f;
+ int ndofA = 0;
+ int ndofB = 0;
+ {
+
+ btVector3 vel1,vel2;
+ if (multiBodyA)
+ {
+ ndofA = multiBodyA->getNumLinks() + 6;
+ btScalar* jacA = &data.m_jacobians[solverConstraint.m_jacAindex];
+ for (int i = 0; i < ndofA ; ++i)
+ rel_vel += multiBodyA->getVelocityVector()[i] * jacA[i];
+ } else
+ {
+ if (rb0)
+ {
+ rel_vel += rb0->getVelocityInLocalPoint(rel_pos1).dot(solverConstraint.m_contactNormal1);
+ }
+ }
+ if (multiBodyB)
+ {
+ ndofB = multiBodyB->getNumLinks() + 6;
+ btScalar* jacB = &data.m_jacobians[solverConstraint.m_jacBindex];
+ for (int i = 0; i < ndofB ; ++i)
+ rel_vel += multiBodyB->getVelocityVector()[i] * jacB[i];
+
+ } else
+ {
+ if (rb1)
+ {
+ rel_vel += rb1->getVelocityInLocalPoint(rel_pos2).dot(solverConstraint.m_contactNormal2);
+ }
+ }
+
+ solverConstraint.m_friction = 0.f;//cp.m_combinedFriction;
+
+
+ restitution = restitution * -rel_vel;//restitutionCurve(rel_vel, cp.m_combinedRestitution);
+ if (restitution <= btScalar(0.))
+ {
+ restitution = 0.f;
+ };
+ }
+
+
+ ///warm starting (or zero if disabled)
+ /*
+ if (infoGlobal.m_solverMode & SOLVER_USE_WARMSTARTING)
+ {
+ solverConstraint.m_appliedImpulse = isFriction ? 0 : cp.m_appliedImpulse * infoGlobal.m_warmstartingFactor;
+
+ if (solverConstraint.m_appliedImpulse)
+ {
+ if (multiBodyA)
+ {
+ btScalar impulse = solverConstraint.m_appliedImpulse;
+ btScalar* deltaV = &data.m_deltaVelocitiesUnitImpulse[solverConstraint.m_jacAindex];
+ multiBodyA->applyDeltaVee(deltaV,impulse);
+ applyDeltaVee(data,deltaV,impulse,solverConstraint.m_deltaVelAindex,ndofA);
+ } else
+ {
+ if (rb0)
+ bodyA->internalApplyImpulse(solverConstraint.m_contactNormal1*bodyA->internalGetInvMass()*rb0->getLinearFactor(),solverConstraint.m_angularComponentA,solverConstraint.m_appliedImpulse);
+ }
+ if (multiBodyB)
+ {
+ btScalar impulse = solverConstraint.m_appliedImpulse;
+ btScalar* deltaV = &data.m_deltaVelocitiesUnitImpulse[solverConstraint.m_jacBindex];
+ multiBodyB->applyDeltaVee(deltaV,impulse);
+ applyDeltaVee(data,deltaV,impulse,solverConstraint.m_deltaVelBindex,ndofB);
+ } else
+ {
+ if (rb1)
+ bodyB->internalApplyImpulse(-solverConstraint.m_contactNormal2*bodyB->internalGetInvMass()*rb1->getLinearFactor(),-solverConstraint.m_angularComponentB,-(btScalar)solverConstraint.m_appliedImpulse);
+ }
+ }
+ } else
+ */
+ {
+ solverConstraint.m_appliedImpulse = 0.f;
+ }
+
+ solverConstraint.m_appliedPushImpulse = 0.f;
+
+ {
+
+
+ btScalar positionalError = 0.f;
+ btScalar velocityError = restitution - rel_vel;// * damping;
+
+
+ btScalar erp = infoGlobal.m_erp2;
+ if (!infoGlobal.m_splitImpulse || (penetration > infoGlobal.m_splitImpulsePenetrationThreshold))
+ {
+ erp = infoGlobal.m_erp;
+ }
+
+ if (penetration>0)
+ {
+ positionalError = 0;
+ velocityError = -penetration / infoGlobal.m_timeStep;
+
+ } else
+ {
+ positionalError = -penetration * erp/infoGlobal.m_timeStep;
+ }
+
+ btScalar penetrationImpulse = positionalError*solverConstraint.m_jacDiagABInv;
+ btScalar velocityImpulse = velocityError *solverConstraint.m_jacDiagABInv;
+
+ if (!infoGlobal.m_splitImpulse || (penetration > infoGlobal.m_splitImpulsePenetrationThreshold))
+ {
+ //combine position and velocity into rhs
+ solverConstraint.m_rhs = penetrationImpulse+velocityImpulse;
+ solverConstraint.m_rhsPenetration = 0.f;
+
+ } else
+ {
+ //split position and velocity into rhs and m_rhsPenetration
+ solverConstraint.m_rhs = velocityImpulse;
+ solverConstraint.m_rhsPenetration = penetrationImpulse;
+ }
+
+ solverConstraint.m_cfm = 0.f;
+ solverConstraint.m_lowerLimit = -m_maxAppliedImpulse;
+ solverConstraint.m_upperLimit = m_maxAppliedImpulse;
+ }
+
+}
diff --git a/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyConstraint.h b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyConstraint.h
new file mode 100644
index 00000000000..9fa317330b3
--- /dev/null
+++ b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyConstraint.h
@@ -0,0 +1,166 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2013 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_MULTIBODY_CONSTRAINT_H
+#define BT_MULTIBODY_CONSTRAINT_H
+
+#include "LinearMath/btScalar.h"
+#include "LinearMath/btAlignedObjectArray.h"
+#include "btMultiBody.h"
+
+class btMultiBody;
+struct btSolverInfo;
+
+#include "btMultiBodySolverConstraint.h"
+
+struct btMultiBodyJacobianData
+{
+ btAlignedObjectArray<btScalar> m_jacobians;
+ btAlignedObjectArray<btScalar> m_deltaVelocitiesUnitImpulse;
+ btAlignedObjectArray<btScalar> m_deltaVelocities;
+ btAlignedObjectArray<btScalar> scratch_r;
+ btAlignedObjectArray<btVector3> scratch_v;
+ btAlignedObjectArray<btMatrix3x3> scratch_m;
+ btAlignedObjectArray<btSolverBody>* m_solverBodyPool;
+ int m_fixedBodyId;
+
+};
+
+
+class btMultiBodyConstraint
+{
+protected:
+
+ btMultiBody* m_bodyA;
+ btMultiBody* m_bodyB;
+ int m_linkA;
+ int m_linkB;
+
+ int m_num_rows;
+ int m_jac_size_A;
+ int m_jac_size_both;
+ int m_pos_offset;
+
+ bool m_isUnilateral;
+
+ btScalar m_maxAppliedImpulse;
+
+
+ // data block laid out as follows:
+ // cached impulses. (one per row.)
+ // jacobians. (interleaved, row1 body1 then row1 body2 then row2 body 1 etc)
+ // positions. (one per row.)
+ btAlignedObjectArray<btScalar> m_data;
+
+ void applyDeltaVee(btMultiBodyJacobianData& data, btScalar* delta_vee, btScalar impulse, int velocityIndex, int ndof);
+
+ void fillMultiBodyConstraintMixed(btMultiBodySolverConstraint& solverConstraint,
+ btMultiBodyJacobianData& data,
+ const btVector3& contactNormalOnB,
+ const btVector3& posAworld, const btVector3& posBworld,
+ btScalar position,
+ const btContactSolverInfo& infoGlobal,
+ btScalar& relaxation,
+ bool isFriction, btScalar desiredVelocity=0, btScalar cfmSlip=0);
+
+ btScalar fillConstraintRowMultiBodyMultiBody(btMultiBodySolverConstraint& constraintRow,
+ btMultiBodyJacobianData& data,
+ btScalar* jacOrgA,btScalar* jacOrgB,
+ const btContactSolverInfo& infoGlobal,
+ btScalar desiredVelocity,
+ btScalar lowerLimit,
+ btScalar upperLimit);
+
+public:
+
+ btMultiBodyConstraint(btMultiBody* bodyA,btMultiBody* bodyB,int linkA, int linkB, int numRows, bool isUnilateral);
+ virtual ~btMultiBodyConstraint();
+
+
+
+ virtual int getIslandIdA() const =0;
+ virtual int getIslandIdB() const =0;
+
+ virtual void createConstraintRows(btMultiBodyConstraintArray& constraintRows,
+ btMultiBodyJacobianData& data,
+ const btContactSolverInfo& infoGlobal)=0;
+
+ int getNumRows() const
+ {
+ return m_num_rows;
+ }
+
+ btMultiBody* getMultiBodyA()
+ {
+ return m_bodyA;
+ }
+ btMultiBody* getMultiBodyB()
+ {
+ return m_bodyB;
+ }
+
+ // current constraint position
+ // constraint is pos >= 0 for unilateral, or pos = 0 for bilateral
+ // NOTE: ignored position for friction rows.
+ btScalar getPosition(int row) const
+ {
+ return m_data[m_pos_offset + row];
+ }
+
+ void setPosition(int row, btScalar pos)
+ {
+ m_data[m_pos_offset + row] = pos;
+ }
+
+
+ bool isUnilateral() const
+ {
+ return m_isUnilateral;
+ }
+
+ // jacobian blocks.
+ // each of size 6 + num_links. (jacobian2 is null if no body2.)
+ // format: 3 'omega' coefficients, 3 'v' coefficients, then the 'qdot' coefficients.
+ btScalar* jacobianA(int row)
+ {
+ return &m_data[m_num_rows + row * m_jac_size_both];
+ }
+ const btScalar* jacobianA(int row) const
+ {
+ return &m_data[m_num_rows + (row * m_jac_size_both)];
+ }
+ btScalar* jacobianB(int row)
+ {
+ return &m_data[m_num_rows + (row * m_jac_size_both) + m_jac_size_A];
+ }
+ const btScalar* jacobianB(int row) const
+ {
+ return &m_data[m_num_rows + (row * m_jac_size_both) + m_jac_size_A];
+ }
+
+ btScalar getMaxAppliedImpulse() const
+ {
+ return m_maxAppliedImpulse;
+ }
+ void setMaxAppliedImpulse(btScalar maxImp)
+ {
+ m_maxAppliedImpulse = maxImp;
+ }
+
+
+};
+
+#endif //BT_MULTIBODY_CONSTRAINT_H
+
diff --git a/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyConstraintSolver.cpp b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyConstraintSolver.cpp
new file mode 100644
index 00000000000..577f846225b
--- /dev/null
+++ b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyConstraintSolver.cpp
@@ -0,0 +1,795 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2013 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btMultiBodyConstraintSolver.h"
+#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
+#include "btMultiBodyLinkCollider.h"
+
+#include "BulletDynamics/ConstraintSolver/btSolverBody.h"
+#include "btMultiBodyConstraint.h"
+#include "BulletDynamics/ConstraintSolver/btContactSolverInfo.h"
+
+#include "LinearMath/btQuickprof.h"
+
+btScalar btMultiBodyConstraintSolver::solveSingleIteration(int iteration, btCollisionObject** bodies ,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer)
+{
+ btScalar val = btSequentialImpulseConstraintSolver::solveSingleIteration(iteration, bodies ,numBodies,manifoldPtr, numManifolds,constraints,numConstraints,infoGlobal,debugDrawer);
+
+ //solve featherstone non-contact constraints
+
+ //printf("m_multiBodyNonContactConstraints = %d\n",m_multiBodyNonContactConstraints.size());
+ for (int j=0;j<m_multiBodyNonContactConstraints.size();j++)
+ {
+ btMultiBodySolverConstraint& constraint = m_multiBodyNonContactConstraints[j];
+ //if (iteration < constraint.m_overrideNumSolverIterations)
+ //resolveSingleConstraintRowGenericMultiBody(constraint);
+ resolveSingleConstraintRowGeneric(constraint);
+ }
+
+ //solve featherstone normal contact
+ for (int j=0;j<m_multiBodyNormalContactConstraints.size();j++)
+ {
+ btMultiBodySolverConstraint& constraint = m_multiBodyNormalContactConstraints[j];
+ if (iteration < infoGlobal.m_numIterations)
+ resolveSingleConstraintRowGeneric(constraint);
+ }
+
+ //solve featherstone frictional contact
+
+ for (int j=0;j<this->m_multiBodyFrictionContactConstraints.size();j++)
+ {
+ if (iteration < infoGlobal.m_numIterations)
+ {
+ btMultiBodySolverConstraint& frictionConstraint = m_multiBodyFrictionContactConstraints[j];
+ btScalar totalImpulse = m_multiBodyNormalContactConstraints[frictionConstraint.m_frictionIndex].m_appliedImpulse;
+ //adjust friction limits here
+ if (totalImpulse>btScalar(0))
+ {
+ frictionConstraint.m_lowerLimit = -(frictionConstraint.m_friction*totalImpulse);
+ frictionConstraint.m_upperLimit = frictionConstraint.m_friction*totalImpulse;
+ resolveSingleConstraintRowGeneric(frictionConstraint);
+ }
+ }
+ }
+ return val;
+}
+
+btScalar btMultiBodyConstraintSolver::solveGroupCacheFriendlySetup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer)
+{
+ m_multiBodyNonContactConstraints.resize(0);
+ m_multiBodyNormalContactConstraints.resize(0);
+ m_multiBodyFrictionContactConstraints.resize(0);
+ m_data.m_jacobians.resize(0);
+ m_data.m_deltaVelocitiesUnitImpulse.resize(0);
+ m_data.m_deltaVelocities.resize(0);
+
+ for (int i=0;i<numBodies;i++)
+ {
+ const btMultiBodyLinkCollider* fcA = btMultiBodyLinkCollider::upcast(bodies[i]);
+ if (fcA)
+ {
+ fcA->m_multiBody->setCompanionId(-1);
+ }
+ }
+
+ btScalar val = btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup( bodies,numBodies,manifoldPtr, numManifolds, constraints,numConstraints,infoGlobal,debugDrawer);
+
+ return val;
+}
+
+void btMultiBodyConstraintSolver::applyDeltaVee(btScalar* delta_vee, btScalar impulse, int velocityIndex, int ndof)
+{
+ for (int i = 0; i < ndof; ++i)
+ m_data.m_deltaVelocities[velocityIndex+i] += delta_vee[i] * impulse;
+}
+
+void btMultiBodyConstraintSolver::resolveSingleConstraintRowGeneric(const btMultiBodySolverConstraint& c)
+{
+
+ btScalar deltaImpulse = c.m_rhs-btScalar(c.m_appliedImpulse)*c.m_cfm;
+ btScalar deltaVelADotn=0;
+ btScalar deltaVelBDotn=0;
+ btSolverBody* bodyA = 0;
+ btSolverBody* bodyB = 0;
+ int ndofA=0;
+ int ndofB=0;
+
+ if (c.m_multiBodyA)
+ {
+ ndofA = c.m_multiBodyA->getNumLinks() + 6;
+ for (int i = 0; i < ndofA; ++i)
+ deltaVelADotn += m_data.m_jacobians[c.m_jacAindex+i] * m_data.m_deltaVelocities[c.m_deltaVelAindex+i];
+ } else
+ {
+ bodyA = &m_tmpSolverBodyPool[c.m_solverBodyIdA];
+ deltaVelADotn += c.m_contactNormal1.dot(bodyA->internalGetDeltaLinearVelocity()) + c.m_relpos1CrossNormal.dot(bodyA->internalGetDeltaAngularVelocity());
+ }
+
+ if (c.m_multiBodyB)
+ {
+ ndofB = c.m_multiBodyB->getNumLinks() + 6;
+ for (int i = 0; i < ndofB; ++i)
+ deltaVelBDotn += m_data.m_jacobians[c.m_jacBindex+i] * m_data.m_deltaVelocities[c.m_deltaVelBindex+i];
+ } else
+ {
+ bodyB = &m_tmpSolverBodyPool[c.m_solverBodyIdB];
+ deltaVelBDotn += c.m_contactNormal2.dot(bodyB->internalGetDeltaLinearVelocity()) + c.m_relpos2CrossNormal.dot(bodyB->internalGetDeltaAngularVelocity());
+ }
+
+
+ deltaImpulse -= deltaVelADotn*c.m_jacDiagABInv;//m_jacDiagABInv = 1./denom
+ deltaImpulse -= deltaVelBDotn*c.m_jacDiagABInv;
+ const btScalar sum = btScalar(c.m_appliedImpulse) + deltaImpulse;
+
+ if (sum < c.m_lowerLimit)
+ {
+ deltaImpulse = c.m_lowerLimit-c.m_appliedImpulse;
+ c.m_appliedImpulse = c.m_lowerLimit;
+ }
+ else if (sum > c.m_upperLimit)
+ {
+ deltaImpulse = c.m_upperLimit-c.m_appliedImpulse;
+ c.m_appliedImpulse = c.m_upperLimit;
+ }
+ else
+ {
+ c.m_appliedImpulse = sum;
+ }
+
+ if (c.m_multiBodyA)
+ {
+ applyDeltaVee(&m_data.m_deltaVelocitiesUnitImpulse[c.m_jacAindex],deltaImpulse,c.m_deltaVelAindex,ndofA);
+ c.m_multiBodyA->applyDeltaVee(&m_data.m_deltaVelocitiesUnitImpulse[c.m_jacAindex],deltaImpulse);
+ } else
+ {
+ bodyA->internalApplyImpulse(c.m_contactNormal1*bodyA->internalGetInvMass(),c.m_angularComponentA,deltaImpulse);
+
+ }
+ if (c.m_multiBodyB)
+ {
+ applyDeltaVee(&m_data.m_deltaVelocitiesUnitImpulse[c.m_jacBindex],deltaImpulse,c.m_deltaVelBindex,ndofB);
+ c.m_multiBodyB->applyDeltaVee(&m_data.m_deltaVelocitiesUnitImpulse[c.m_jacBindex],deltaImpulse);
+ } else
+ {
+ bodyB->internalApplyImpulse(c.m_contactNormal2*bodyB->internalGetInvMass(),c.m_angularComponentB,deltaImpulse);
+ }
+
+}
+
+
+void btMultiBodyConstraintSolver::resolveSingleConstraintRowGenericMultiBody(const btMultiBodySolverConstraint& c)
+{
+
+ btScalar deltaImpulse = c.m_rhs-btScalar(c.m_appliedImpulse)*c.m_cfm;
+ btScalar deltaVelADotn=0;
+ btScalar deltaVelBDotn=0;
+ int ndofA=0;
+ int ndofB=0;
+
+ if (c.m_multiBodyA)
+ {
+ ndofA = c.m_multiBodyA->getNumLinks() + 6;
+ for (int i = 0; i < ndofA; ++i)
+ deltaVelADotn += m_data.m_jacobians[c.m_jacAindex+i] * m_data.m_deltaVelocities[c.m_deltaVelAindex+i];
+ }
+
+ if (c.m_multiBodyB)
+ {
+ ndofB = c.m_multiBodyB->getNumLinks() + 6;
+ for (int i = 0; i < ndofB; ++i)
+ deltaVelBDotn += m_data.m_jacobians[c.m_jacBindex+i] * m_data.m_deltaVelocities[c.m_deltaVelBindex+i];
+ }
+
+
+ deltaImpulse -= deltaVelADotn*c.m_jacDiagABInv;//m_jacDiagABInv = 1./denom
+ deltaImpulse -= deltaVelBDotn*c.m_jacDiagABInv;
+ const btScalar sum = btScalar(c.m_appliedImpulse) + deltaImpulse;
+
+ if (sum < c.m_lowerLimit)
+ {
+ deltaImpulse = c.m_lowerLimit-c.m_appliedImpulse;
+ c.m_appliedImpulse = c.m_lowerLimit;
+ }
+ else if (sum > c.m_upperLimit)
+ {
+ deltaImpulse = c.m_upperLimit-c.m_appliedImpulse;
+ c.m_appliedImpulse = c.m_upperLimit;
+ }
+ else
+ {
+ c.m_appliedImpulse = sum;
+ }
+
+ if (c.m_multiBodyA)
+ {
+ applyDeltaVee(&m_data.m_deltaVelocitiesUnitImpulse[c.m_jacAindex],deltaImpulse,c.m_deltaVelAindex,ndofA);
+ c.m_multiBodyA->applyDeltaVee(&m_data.m_deltaVelocitiesUnitImpulse[c.m_jacAindex],deltaImpulse);
+ }
+ if (c.m_multiBodyB)
+ {
+ applyDeltaVee(&m_data.m_deltaVelocitiesUnitImpulse[c.m_jacBindex],deltaImpulse,c.m_deltaVelBindex,ndofB);
+ c.m_multiBodyB->applyDeltaVee(&m_data.m_deltaVelocitiesUnitImpulse[c.m_jacBindex],deltaImpulse);
+ }
+}
+
+
+void btMultiBodyConstraintSolver::setupMultiBodyContactConstraint(btMultiBodySolverConstraint& solverConstraint,
+ const btVector3& contactNormal,
+ btManifoldPoint& cp, const btContactSolverInfo& infoGlobal,
+ btScalar& relaxation,
+ bool isFriction, btScalar desiredVelocity, btScalar cfmSlip)
+{
+
+ BT_PROFILE("setupMultiBodyContactConstraint");
+ btVector3 rel_pos1;
+ btVector3 rel_pos2;
+
+ btMultiBody* multiBodyA = solverConstraint.m_multiBodyA;
+ btMultiBody* multiBodyB = solverConstraint.m_multiBodyB;
+
+ const btVector3& pos1 = cp.getPositionWorldOnA();
+ const btVector3& pos2 = cp.getPositionWorldOnB();
+
+ btSolverBody* bodyA = multiBodyA ? 0 : &m_tmpSolverBodyPool[solverConstraint.m_solverBodyIdA];
+ btSolverBody* bodyB = multiBodyB ? 0 : &m_tmpSolverBodyPool[solverConstraint.m_solverBodyIdB];
+
+ btRigidBody* rb0 = multiBodyA ? 0 : bodyA->m_originalBody;
+ btRigidBody* rb1 = multiBodyB ? 0 : bodyB->m_originalBody;
+
+ if (bodyA)
+ rel_pos1 = pos1 - bodyA->getWorldTransform().getOrigin();
+ if (bodyB)
+ rel_pos2 = pos2 - bodyB->getWorldTransform().getOrigin();
+
+ relaxation = 1.f;
+
+ if (multiBodyA)
+ {
+ const int ndofA = multiBodyA->getNumLinks() + 6;
+
+ solverConstraint.m_deltaVelAindex = multiBodyA->getCompanionId();
+
+ if (solverConstraint.m_deltaVelAindex <0)
+ {
+ solverConstraint.m_deltaVelAindex = m_data.m_deltaVelocities.size();
+ multiBodyA->setCompanionId(solverConstraint.m_deltaVelAindex);
+ m_data.m_deltaVelocities.resize(m_data.m_deltaVelocities.size()+ndofA);
+ } else
+ {
+ btAssert(m_data.m_deltaVelocities.size() >= solverConstraint.m_deltaVelAindex+ndofA);
+ }
+
+ solverConstraint.m_jacAindex = m_data.m_jacobians.size();
+ m_data.m_jacobians.resize(m_data.m_jacobians.size()+ndofA);
+ m_data.m_deltaVelocitiesUnitImpulse.resize(m_data.m_deltaVelocitiesUnitImpulse.size()+ndofA);
+ btAssert(m_data.m_jacobians.size() == m_data.m_deltaVelocitiesUnitImpulse.size());
+
+ btScalar* jac1=&m_data.m_jacobians[solverConstraint.m_jacAindex];
+ multiBodyA->fillContactJacobian(solverConstraint.m_linkA, cp.getPositionWorldOnA(), contactNormal, jac1, m_data.scratch_r, m_data.scratch_v, m_data.scratch_m);
+ btScalar* delta = &m_data.m_deltaVelocitiesUnitImpulse[solverConstraint.m_jacAindex];
+ multiBodyA->calcAccelerationDeltas(&m_data.m_jacobians[solverConstraint.m_jacAindex],delta,m_data.scratch_r, m_data.scratch_v);
+ } else
+ {
+ btVector3 torqueAxis0 = rel_pos1.cross(contactNormal);
+ solverConstraint.m_angularComponentA = rb0 ? rb0->getInvInertiaTensorWorld()*torqueAxis0*rb0->getAngularFactor() : btVector3(0,0,0);
+ solverConstraint.m_relpos1CrossNormal = torqueAxis0;
+ solverConstraint.m_contactNormal1 = contactNormal;
+ }
+
+ if (multiBodyB)
+ {
+ const int ndofB = multiBodyB->getNumLinks() + 6;
+
+ solverConstraint.m_deltaVelBindex = multiBodyB->getCompanionId();
+ if (solverConstraint.m_deltaVelBindex <0)
+ {
+ solverConstraint.m_deltaVelBindex = m_data.m_deltaVelocities.size();
+ multiBodyB->setCompanionId(solverConstraint.m_deltaVelBindex);
+ m_data.m_deltaVelocities.resize(m_data.m_deltaVelocities.size()+ndofB);
+ }
+
+ solverConstraint.m_jacBindex = m_data.m_jacobians.size();
+
+ m_data.m_jacobians.resize(m_data.m_jacobians.size()+ndofB);
+ m_data.m_deltaVelocitiesUnitImpulse.resize(m_data.m_deltaVelocitiesUnitImpulse.size()+ndofB);
+ btAssert(m_data.m_jacobians.size() == m_data.m_deltaVelocitiesUnitImpulse.size());
+
+ multiBodyB->fillContactJacobian(solverConstraint.m_linkB, cp.getPositionWorldOnB(), -contactNormal, &m_data.m_jacobians[solverConstraint.m_jacBindex], m_data.scratch_r, m_data.scratch_v, m_data.scratch_m);
+ multiBodyB->calcAccelerationDeltas(&m_data.m_jacobians[solverConstraint.m_jacBindex],&m_data.m_deltaVelocitiesUnitImpulse[solverConstraint.m_jacBindex],m_data.scratch_r, m_data.scratch_v);
+ } else
+ {
+ btVector3 torqueAxis1 = rel_pos2.cross(contactNormal);
+ solverConstraint.m_angularComponentB = rb1 ? rb1->getInvInertiaTensorWorld()*-torqueAxis1*rb1->getAngularFactor() : btVector3(0,0,0);
+ solverConstraint.m_relpos2CrossNormal = -torqueAxis1;
+ solverConstraint.m_contactNormal2 = -contactNormal;
+ }
+
+ {
+
+ btVector3 vec;
+ btScalar denom0 = 0.f;
+ btScalar denom1 = 0.f;
+ btScalar* jacB = 0;
+ btScalar* jacA = 0;
+ btScalar* lambdaA =0;
+ btScalar* lambdaB =0;
+ int ndofA = 0;
+ if (multiBodyA)
+ {
+ ndofA = multiBodyA->getNumLinks() + 6;
+ jacA = &m_data.m_jacobians[solverConstraint.m_jacAindex];
+ lambdaA = &m_data.m_deltaVelocitiesUnitImpulse[solverConstraint.m_jacAindex];
+ for (int i = 0; i < ndofA; ++i)
+ {
+ btScalar j = jacA[i] ;
+ btScalar l =lambdaA[i];
+ denom0 += j*l;
+ }
+ } else
+ {
+ if (rb0)
+ {
+ vec = ( solverConstraint.m_angularComponentA).cross(rel_pos1);
+ denom0 = rb0->getInvMass() + contactNormal.dot(vec);
+ }
+ }
+ if (multiBodyB)
+ {
+ const int ndofB = multiBodyB->getNumLinks() + 6;
+ jacB = &m_data.m_jacobians[solverConstraint.m_jacBindex];
+ lambdaB = &m_data.m_deltaVelocitiesUnitImpulse[solverConstraint.m_jacBindex];
+ for (int i = 0; i < ndofB; ++i)
+ {
+ btScalar j = jacB[i] ;
+ btScalar l =lambdaB[i];
+ denom1 += j*l;
+ }
+
+ } else
+ {
+ if (rb1)
+ {
+ vec = ( -solverConstraint.m_angularComponentB).cross(rel_pos2);
+ denom1 = rb1->getInvMass() + contactNormal.dot(vec);
+ }
+ }
+
+ if (multiBodyA && (multiBodyA==multiBodyB))
+ {
+ // ndof1 == ndof2 in this case
+ for (int i = 0; i < ndofA; ++i)
+ {
+ denom1 += jacB[i] * lambdaA[i];
+ denom1 += jacA[i] * lambdaB[i];
+ }
+ }
+
+ btScalar d = denom0+denom1;
+ if (btFabs(d)>SIMD_EPSILON)
+ {
+
+ solverConstraint.m_jacDiagABInv = relaxation/(d);
+ } else
+ {
+ solverConstraint.m_jacDiagABInv = 1.f;
+ }
+
+ }
+
+
+ //compute rhs and remaining solverConstraint fields
+
+
+
+ btScalar restitution = 0.f;
+ btScalar penetration = isFriction? 0 : cp.getDistance()+infoGlobal.m_linearSlop;
+
+ btScalar rel_vel = 0.f;
+ int ndofA = 0;
+ int ndofB = 0;
+ {
+
+ btVector3 vel1,vel2;
+ if (multiBodyA)
+ {
+ ndofA = multiBodyA->getNumLinks() + 6;
+ btScalar* jacA = &m_data.m_jacobians[solverConstraint.m_jacAindex];
+ for (int i = 0; i < ndofA ; ++i)
+ rel_vel += multiBodyA->getVelocityVector()[i] * jacA[i];
+ } else
+ {
+ if (rb0)
+ {
+ rel_vel += rb0->getVelocityInLocalPoint(rel_pos1).dot(solverConstraint.m_contactNormal1);
+ }
+ }
+ if (multiBodyB)
+ {
+ ndofB = multiBodyB->getNumLinks() + 6;
+ btScalar* jacB = &m_data.m_jacobians[solverConstraint.m_jacBindex];
+ for (int i = 0; i < ndofB ; ++i)
+ rel_vel += multiBodyB->getVelocityVector()[i] * jacB[i];
+
+ } else
+ {
+ if (rb1)
+ {
+ rel_vel += rb1->getVelocityInLocalPoint(rel_pos2).dot(solverConstraint.m_contactNormal2);
+ }
+ }
+
+ solverConstraint.m_friction = cp.m_combinedFriction;
+
+
+ restitution = restitutionCurve(rel_vel, cp.m_combinedRestitution);
+ if (restitution <= btScalar(0.))
+ {
+ restitution = 0.f;
+ };
+ }
+
+
+ ///warm starting (or zero if disabled)
+ if (infoGlobal.m_solverMode & SOLVER_USE_WARMSTARTING)
+ {
+ solverConstraint.m_appliedImpulse = isFriction ? 0 : cp.m_appliedImpulse * infoGlobal.m_warmstartingFactor;
+
+ if (solverConstraint.m_appliedImpulse)
+ {
+ if (multiBodyA)
+ {
+ btScalar impulse = solverConstraint.m_appliedImpulse;
+ btScalar* deltaV = &m_data.m_deltaVelocitiesUnitImpulse[solverConstraint.m_jacAindex];
+ multiBodyA->applyDeltaVee(deltaV,impulse);
+ applyDeltaVee(deltaV,impulse,solverConstraint.m_deltaVelAindex,ndofA);
+ } else
+ {
+ if (rb0)
+ bodyA->internalApplyImpulse(solverConstraint.m_contactNormal1*bodyA->internalGetInvMass()*rb0->getLinearFactor(),solverConstraint.m_angularComponentA,solverConstraint.m_appliedImpulse);
+ }
+ if (multiBodyB)
+ {
+ btScalar impulse = solverConstraint.m_appliedImpulse;
+ btScalar* deltaV = &m_data.m_deltaVelocitiesUnitImpulse[solverConstraint.m_jacBindex];
+ multiBodyB->applyDeltaVee(deltaV,impulse);
+ applyDeltaVee(deltaV,impulse,solverConstraint.m_deltaVelBindex,ndofB);
+ } else
+ {
+ if (rb1)
+ bodyB->internalApplyImpulse(-solverConstraint.m_contactNormal2*bodyB->internalGetInvMass()*rb1->getLinearFactor(),-solverConstraint.m_angularComponentB,-(btScalar)solverConstraint.m_appliedImpulse);
+ }
+ }
+ } else
+ {
+ solverConstraint.m_appliedImpulse = 0.f;
+ }
+
+ solverConstraint.m_appliedPushImpulse = 0.f;
+
+ {
+
+
+ btScalar positionalError = 0.f;
+ btScalar velocityError = restitution - rel_vel;// * damping;
+
+
+ btScalar erp = infoGlobal.m_erp2;
+ if (!infoGlobal.m_splitImpulse || (penetration > infoGlobal.m_splitImpulsePenetrationThreshold))
+ {
+ erp = infoGlobal.m_erp;
+ }
+
+ if (penetration>0)
+ {
+ positionalError = 0;
+ velocityError = -penetration / infoGlobal.m_timeStep;
+
+ } else
+ {
+ positionalError = -penetration * erp/infoGlobal.m_timeStep;
+ }
+
+ btScalar penetrationImpulse = positionalError*solverConstraint.m_jacDiagABInv;
+ btScalar velocityImpulse = velocityError *solverConstraint.m_jacDiagABInv;
+
+ if (!infoGlobal.m_splitImpulse || (penetration > infoGlobal.m_splitImpulsePenetrationThreshold))
+ {
+ //combine position and velocity into rhs
+ solverConstraint.m_rhs = penetrationImpulse+velocityImpulse;
+ solverConstraint.m_rhsPenetration = 0.f;
+
+ } else
+ {
+ //split position and velocity into rhs and m_rhsPenetration
+ solverConstraint.m_rhs = velocityImpulse;
+ solverConstraint.m_rhsPenetration = penetrationImpulse;
+ }
+
+ solverConstraint.m_cfm = 0.f;
+ solverConstraint.m_lowerLimit = 0;
+ solverConstraint.m_upperLimit = 1e10f;
+ }
+
+}
+
+
+
+
+btMultiBodySolverConstraint& btMultiBodyConstraintSolver::addMultiBodyFrictionConstraint(const btVector3& normalAxis,btPersistentManifold* manifold,int frictionIndex,btManifoldPoint& cp,btCollisionObject* colObj0,btCollisionObject* colObj1, btScalar relaxation, const btContactSolverInfo& infoGlobal, btScalar desiredVelocity, btScalar cfmSlip)
+{
+ BT_PROFILE("addMultiBodyFrictionConstraint");
+ btMultiBodySolverConstraint& solverConstraint = m_multiBodyFrictionContactConstraints.expandNonInitializing();
+ solverConstraint.m_frictionIndex = frictionIndex;
+ bool isFriction = true;
+
+ const btMultiBodyLinkCollider* fcA = btMultiBodyLinkCollider::upcast(manifold->getBody0());
+ const btMultiBodyLinkCollider* fcB = btMultiBodyLinkCollider::upcast(manifold->getBody1());
+
+ btMultiBody* mbA = fcA? fcA->m_multiBody : 0;
+ btMultiBody* mbB = fcB? fcB->m_multiBody : 0;
+
+ int solverBodyIdA = mbA? -1 : getOrInitSolverBody(*colObj0,infoGlobal.m_timeStep);
+ int solverBodyIdB = mbB ? -1 : getOrInitSolverBody(*colObj1,infoGlobal.m_timeStep);
+
+ solverConstraint.m_solverBodyIdA = solverBodyIdA;
+ solverConstraint.m_solverBodyIdB = solverBodyIdB;
+ solverConstraint.m_multiBodyA = mbA;
+ if (mbA)
+ solverConstraint.m_linkA = fcA->m_link;
+
+ solverConstraint.m_multiBodyB = mbB;
+ if (mbB)
+ solverConstraint.m_linkB = fcB->m_link;
+
+ solverConstraint.m_originalContactPoint = &cp;
+
+ setupMultiBodyContactConstraint(solverConstraint, normalAxis, cp, infoGlobal,relaxation,isFriction, desiredVelocity, cfmSlip);
+ return solverConstraint;
+}
+
+void btMultiBodyConstraintSolver::convertMultiBodyContact(btPersistentManifold* manifold,const btContactSolverInfo& infoGlobal)
+{
+ const btMultiBodyLinkCollider* fcA = btMultiBodyLinkCollider::upcast(manifold->getBody0());
+ const btMultiBodyLinkCollider* fcB = btMultiBodyLinkCollider::upcast(manifold->getBody1());
+
+ btMultiBody* mbA = fcA? fcA->m_multiBody : 0;
+ btMultiBody* mbB = fcB? fcB->m_multiBody : 0;
+
+ btCollisionObject* colObj0=0,*colObj1=0;
+
+ colObj0 = (btCollisionObject*)manifold->getBody0();
+ colObj1 = (btCollisionObject*)manifold->getBody1();
+
+ int solverBodyIdA = mbA? -1 : getOrInitSolverBody(*colObj0,infoGlobal.m_timeStep);
+ int solverBodyIdB = mbB ? -1 : getOrInitSolverBody(*colObj1,infoGlobal.m_timeStep);
+
+ btSolverBody* solverBodyA = mbA ? 0 : &m_tmpSolverBodyPool[solverBodyIdA];
+ btSolverBody* solverBodyB = mbB ? 0 : &m_tmpSolverBodyPool[solverBodyIdB];
+
+
+ ///avoid collision response between two static objects
+// if (!solverBodyA || (solverBodyA->m_invMass.isZero() && (!solverBodyB || solverBodyB->m_invMass.isZero())))
+ // return;
+
+ int rollingFriction=1;
+
+ for (int j=0;j<manifold->getNumContacts();j++)
+ {
+
+ btManifoldPoint& cp = manifold->getContactPoint(j);
+
+ if (cp.getDistance() <= manifold->getContactProcessingThreshold())
+ {
+
+ btScalar relaxation;
+
+ int frictionIndex = m_multiBodyNormalContactConstraints.size();
+
+ btMultiBodySolverConstraint& solverConstraint = m_multiBodyNormalContactConstraints.expandNonInitializing();
+
+ btRigidBody* rb0 = btRigidBody::upcast(colObj0);
+ btRigidBody* rb1 = btRigidBody::upcast(colObj1);
+ solverConstraint.m_solverBodyIdA = solverBodyIdA;
+ solverConstraint.m_solverBodyIdB = solverBodyIdB;
+ solverConstraint.m_multiBodyA = mbA;
+ if (mbA)
+ solverConstraint.m_linkA = fcA->m_link;
+
+ solverConstraint.m_multiBodyB = mbB;
+ if (mbB)
+ solverConstraint.m_linkB = fcB->m_link;
+
+ solverConstraint.m_originalContactPoint = &cp;
+
+ bool isFriction = false;
+ setupMultiBodyContactConstraint(solverConstraint, cp.m_normalWorldOnB,cp, infoGlobal, relaxation, isFriction);
+
+// const btVector3& pos1 = cp.getPositionWorldOnA();
+// const btVector3& pos2 = cp.getPositionWorldOnB();
+
+ /////setup the friction constraints
+#define ENABLE_FRICTION
+#ifdef ENABLE_FRICTION
+ solverConstraint.m_frictionIndex = frictionIndex;
+#if ROLLING_FRICTION
+ btVector3 angVelA(0,0,0),angVelB(0,0,0);
+ if (rb0)
+ angVelA = rb0->getAngularVelocity();
+ if (rb1)
+ angVelB = rb1->getAngularVelocity();
+ btVector3 relAngVel = angVelB-angVelA;
+
+ if ((cp.m_combinedRollingFriction>0.f) && (rollingFriction>0))
+ {
+ //only a single rollingFriction per manifold
+ rollingFriction--;
+ if (relAngVel.length()>infoGlobal.m_singleAxisRollingFrictionThreshold)
+ {
+ relAngVel.normalize();
+ applyAnisotropicFriction(colObj0,relAngVel,btCollisionObject::CF_ANISOTROPIC_ROLLING_FRICTION);
+ applyAnisotropicFriction(colObj1,relAngVel,btCollisionObject::CF_ANISOTROPIC_ROLLING_FRICTION);
+ if (relAngVel.length()>0.001)
+ addRollingFrictionConstraint(relAngVel,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation);
+
+ } else
+ {
+ addRollingFrictionConstraint(cp.m_normalWorldOnB,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation);
+ btVector3 axis0,axis1;
+ btPlaneSpace1(cp.m_normalWorldOnB,axis0,axis1);
+ applyAnisotropicFriction(colObj0,axis0,btCollisionObject::CF_ANISOTROPIC_ROLLING_FRICTION);
+ applyAnisotropicFriction(colObj1,axis0,btCollisionObject::CF_ANISOTROPIC_ROLLING_FRICTION);
+ applyAnisotropicFriction(colObj0,axis1,btCollisionObject::CF_ANISOTROPIC_ROLLING_FRICTION);
+ applyAnisotropicFriction(colObj1,axis1,btCollisionObject::CF_ANISOTROPIC_ROLLING_FRICTION);
+ if (axis0.length()>0.001)
+ addRollingFrictionConstraint(axis0,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation);
+ if (axis1.length()>0.001)
+ addRollingFrictionConstraint(axis1,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation);
+
+ }
+ }
+#endif //ROLLING_FRICTION
+
+ ///Bullet has several options to set the friction directions
+ ///By default, each contact has only a single friction direction that is recomputed automatically very frame
+ ///based on the relative linear velocity.
+ ///If the relative velocity it zero, it will automatically compute a friction direction.
+
+ ///You can also enable two friction directions, using the SOLVER_USE_2_FRICTION_DIRECTIONS.
+ ///In that case, the second friction direction will be orthogonal to both contact normal and first friction direction.
+ ///
+ ///If you choose SOLVER_DISABLE_VELOCITY_DEPENDENT_FRICTION_DIRECTION, then the friction will be independent from the relative projected velocity.
+ ///
+ ///The user can manually override the friction directions for certain contacts using a contact callback,
+ ///and set the cp.m_lateralFrictionInitialized to true
+ ///In that case, you can set the target relative motion in each friction direction (cp.m_contactMotion1 and cp.m_contactMotion2)
+ ///this will give a conveyor belt effect
+ ///
+ if (!(infoGlobal.m_solverMode & SOLVER_ENABLE_FRICTION_DIRECTION_CACHING) || !cp.m_lateralFrictionInitialized)
+ {/*
+ cp.m_lateralFrictionDir1 = vel - cp.m_normalWorldOnB * rel_vel;
+ btScalar lat_rel_vel = cp.m_lateralFrictionDir1.length2();
+ if (!(infoGlobal.m_solverMode & SOLVER_DISABLE_VELOCITY_DEPENDENT_FRICTION_DIRECTION) && lat_rel_vel > SIMD_EPSILON)
+ {
+ cp.m_lateralFrictionDir1 *= 1.f/btSqrt(lat_rel_vel);
+ if((infoGlobal.m_solverMode & SOLVER_USE_2_FRICTION_DIRECTIONS))
+ {
+ cp.m_lateralFrictionDir2 = cp.m_lateralFrictionDir1.cross(cp.m_normalWorldOnB);
+ cp.m_lateralFrictionDir2.normalize();//??
+ applyAnisotropicFriction(colObj0,cp.m_lateralFrictionDir2,btCollisionObject::CF_ANISOTROPIC_FRICTION);
+ applyAnisotropicFriction(colObj1,cp.m_lateralFrictionDir2,btCollisionObject::CF_ANISOTROPIC_FRICTION);
+ addMultiBodyFrictionConstraint(cp.m_lateralFrictionDir2,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation);
+
+ }
+
+ applyAnisotropicFriction(colObj0,cp.m_lateralFrictionDir1,btCollisionObject::CF_ANISOTROPIC_FRICTION);
+ applyAnisotropicFriction(colObj1,cp.m_lateralFrictionDir1,btCollisionObject::CF_ANISOTROPIC_FRICTION);
+ addMultiBodyFrictionConstraint(cp.m_lateralFrictionDir1,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation);
+
+ } else
+ */
+ {
+ btPlaneSpace1(cp.m_normalWorldOnB,cp.m_lateralFrictionDir1,cp.m_lateralFrictionDir2);
+
+ if ((infoGlobal.m_solverMode & SOLVER_USE_2_FRICTION_DIRECTIONS))
+ {
+ applyAnisotropicFriction(colObj0,cp.m_lateralFrictionDir2,btCollisionObject::CF_ANISOTROPIC_FRICTION);
+ applyAnisotropicFriction(colObj1,cp.m_lateralFrictionDir2,btCollisionObject::CF_ANISOTROPIC_FRICTION);
+ addMultiBodyFrictionConstraint(cp.m_lateralFrictionDir2,manifold,frictionIndex,cp,colObj0,colObj1, relaxation,infoGlobal);
+ }
+
+ applyAnisotropicFriction(colObj0,cp.m_lateralFrictionDir1,btCollisionObject::CF_ANISOTROPIC_FRICTION);
+ applyAnisotropicFriction(colObj1,cp.m_lateralFrictionDir1,btCollisionObject::CF_ANISOTROPIC_FRICTION);
+ addMultiBodyFrictionConstraint(cp.m_lateralFrictionDir1,manifold,frictionIndex,cp,colObj0,colObj1, relaxation,infoGlobal);
+
+ if ((infoGlobal.m_solverMode & SOLVER_USE_2_FRICTION_DIRECTIONS) && (infoGlobal.m_solverMode & SOLVER_DISABLE_VELOCITY_DEPENDENT_FRICTION_DIRECTION))
+ {
+ cp.m_lateralFrictionInitialized = true;
+ }
+ }
+
+ } else
+ {
+ addMultiBodyFrictionConstraint(cp.m_lateralFrictionDir1,manifold,frictionIndex,cp,colObj0,colObj1, relaxation,infoGlobal,cp.m_contactMotion1, cp.m_contactCFM1);
+
+ if ((infoGlobal.m_solverMode & SOLVER_USE_2_FRICTION_DIRECTIONS))
+ addMultiBodyFrictionConstraint(cp.m_lateralFrictionDir2,manifold,frictionIndex,cp,colObj0,colObj1, relaxation, infoGlobal,cp.m_contactMotion2, cp.m_contactCFM2);
+
+ //setMultiBodyFrictionConstraintImpulse( solverConstraint, solverBodyIdA, solverBodyIdB, cp, infoGlobal);
+ //todo:
+ solverConstraint.m_appliedImpulse = 0.f;
+ solverConstraint.m_appliedPushImpulse = 0.f;
+ }
+
+
+#endif //ENABLE_FRICTION
+
+ }
+ }
+}
+
+void btMultiBodyConstraintSolver::convertContacts(btPersistentManifold** manifoldPtr,int numManifolds, const btContactSolverInfo& infoGlobal)
+{
+ btPersistentManifold* manifold = 0;
+
+ for (int i=0;i<numManifolds;i++)
+ {
+ btPersistentManifold* manifold= manifoldPtr[i];
+ const btMultiBodyLinkCollider* fcA = btMultiBodyLinkCollider::upcast(manifold->getBody0());
+ const btMultiBodyLinkCollider* fcB = btMultiBodyLinkCollider::upcast(manifold->getBody1());
+ if (!fcA && !fcB)
+ {
+ //the contact doesn't involve any Featherstone btMultiBody, so deal with the regular btRigidBody/btCollisionObject case
+ convertContact(manifold,infoGlobal);
+ } else
+ {
+ convertMultiBodyContact(manifold,infoGlobal);
+ }
+ }
+
+ //also convert the multibody constraints, if any
+
+
+ for (int i=0;i<m_tmpNumMultiBodyConstraints;i++)
+ {
+ btMultiBodyConstraint* c = m_tmpMultiBodyConstraints[i];
+ m_data.m_solverBodyPool = &m_tmpSolverBodyPool;
+ m_data.m_fixedBodyId = m_fixedBodyId;
+
+ c->createConstraintRows(m_multiBodyNonContactConstraints,m_data, infoGlobal);
+ }
+
+}
+
+
+
+btScalar btMultiBodyConstraintSolver::solveGroup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifold,int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& info, btIDebugDraw* debugDrawer,btDispatcher* dispatcher)
+{
+ return btSequentialImpulseConstraintSolver::solveGroup(bodies,numBodies,manifold,numManifolds,constraints,numConstraints,info,debugDrawer,dispatcher);
+}
+
+
+void btMultiBodyConstraintSolver::solveMultiBodyGroup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifold,int numManifolds,btTypedConstraint** constraints,int numConstraints,btMultiBodyConstraint** multiBodyConstraints, int numMultiBodyConstraints, const btContactSolverInfo& info, btIDebugDraw* debugDrawer,btDispatcher* dispatcher)
+{
+ //printf("solveMultiBodyGroup start\n");
+ m_tmpMultiBodyConstraints = multiBodyConstraints;
+ m_tmpNumMultiBodyConstraints = numMultiBodyConstraints;
+
+ btSequentialImpulseConstraintSolver::solveGroup(bodies,numBodies,manifold,numManifolds,constraints,numConstraints,info,debugDrawer,dispatcher);
+
+ m_tmpMultiBodyConstraints = 0;
+ m_tmpNumMultiBodyConstraints = 0;
+
+
+}
diff --git a/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyConstraintSolver.h b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyConstraintSolver.h
new file mode 100644
index 00000000000..0f4cd69c029
--- /dev/null
+++ b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyConstraintSolver.h
@@ -0,0 +1,85 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2013 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_MULTIBODY_CONSTRAINT_SOLVER_H
+#define BT_MULTIBODY_CONSTRAINT_SOLVER_H
+
+#include "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h"
+#include "btMultiBodySolverConstraint.h"
+
+
+class btMultiBody;
+
+#include "btMultiBodyConstraint.h"
+
+
+
+ATTRIBUTE_ALIGNED16(class) btMultiBodyConstraintSolver : public btSequentialImpulseConstraintSolver
+{
+
+protected:
+
+ btMultiBodyConstraintArray m_multiBodyNonContactConstraints;
+
+ btMultiBodyConstraintArray m_multiBodyNormalContactConstraints;
+ btMultiBodyConstraintArray m_multiBodyFrictionContactConstraints;
+
+ btMultiBodyJacobianData m_data;
+
+ //temp storage for multi body constraints for a specific island/group called by 'solveGroup'
+ btMultiBodyConstraint** m_tmpMultiBodyConstraints;
+ int m_tmpNumMultiBodyConstraints;
+
+ void resolveSingleConstraintRowGeneric(const btMultiBodySolverConstraint& c);
+ void resolveSingleConstraintRowGenericMultiBody(const btMultiBodySolverConstraint& c);
+
+ void convertContacts(btPersistentManifold** manifoldPtr,int numManifolds, const btContactSolverInfo& infoGlobal);
+ btMultiBodySolverConstraint& addMultiBodyFrictionConstraint(const btVector3& normalAxis,btPersistentManifold* manifold,int frictionIndex,btManifoldPoint& cp,btCollisionObject* colObj0,btCollisionObject* colObj1, btScalar relaxation, const btContactSolverInfo& infoGlobal, btScalar desiredVelocity=0, btScalar cfmSlip=0);
+
+
+ void setupMultiBodyJointLimitConstraint(btMultiBodySolverConstraint& constraintRow,
+ btScalar* jacA,btScalar* jacB,
+ btScalar penetration,btScalar combinedFrictionCoeff, btScalar combinedRestitutionCoeff,
+ const btContactSolverInfo& infoGlobal);
+
+ void setupMultiBodyContactConstraint(btMultiBodySolverConstraint& solverConstraint,
+ const btVector3& contactNormal,
+ btManifoldPoint& cp, const btContactSolverInfo& infoGlobal,
+ btScalar& relaxation,
+ bool isFriction, btScalar desiredVelocity=0, btScalar cfmSlip=0);
+
+ void convertMultiBodyContact(btPersistentManifold* manifold,const btContactSolverInfo& infoGlobal);
+ virtual btScalar solveGroupCacheFriendlySetup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer);
+// virtual btScalar solveGroupCacheFriendlyIterations(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer);
+
+ virtual btScalar solveSingleIteration(int iteration, btCollisionObject** bodies ,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer);
+ void applyDeltaVee(btScalar* deltaV, btScalar impulse, int velocityIndex, int ndof);
+
+public:
+
+ BT_DECLARE_ALIGNED_ALLOCATOR();
+
+ ///this method should not be called, it was just used during porting/integration of Featherstone btMultiBody, providing backwards compatibility but no support for btMultiBodyConstraint (only contact constraints)
+ virtual btScalar solveGroup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifold,int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& info, btIDebugDraw* debugDrawer,btDispatcher* dispatcher);
+
+ virtual void solveMultiBodyGroup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifold,int numManifolds,btTypedConstraint** constraints,int numConstraints,btMultiBodyConstraint** multiBodyConstraints, int numMultiBodyConstraints, const btContactSolverInfo& info, btIDebugDraw* debugDrawer,btDispatcher* dispatcher);
+};
+
+
+
+
+
+#endif //BT_MULTIBODY_CONSTRAINT_SOLVER_H
+
diff --git a/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyDynamicsWorld.cpp b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyDynamicsWorld.cpp
new file mode 100644
index 00000000000..0910f8f6abb
--- /dev/null
+++ b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyDynamicsWorld.cpp
@@ -0,0 +1,578 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2013 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btMultiBodyDynamicsWorld.h"
+#include "btMultiBodyConstraintSolver.h"
+#include "btMultiBody.h"
+#include "btMultiBodyLinkCollider.h"
+#include "BulletCollision/CollisionDispatch/btSimulationIslandManager.h"
+#include "LinearMath/btQuickprof.h"
+#include "btMultiBodyConstraint.h"
+
+
+
+
+void btMultiBodyDynamicsWorld::addMultiBody(btMultiBody* body, short group, short mask)
+{
+ m_multiBodies.push_back(body);
+
+}
+
+void btMultiBodyDynamicsWorld::removeMultiBody(btMultiBody* body)
+{
+ m_multiBodies.remove(body);
+}
+
+void btMultiBodyDynamicsWorld::calculateSimulationIslands()
+{
+ BT_PROFILE("calculateSimulationIslands");
+
+ getSimulationIslandManager()->updateActivationState(getCollisionWorld(),getCollisionWorld()->getDispatcher());
+
+ {
+ //merge islands based on speculative contact manifolds too
+ for (int i=0;i<this->m_predictiveManifolds.size();i++)
+ {
+ btPersistentManifold* manifold = m_predictiveManifolds[i];
+
+ const btCollisionObject* colObj0 = manifold->getBody0();
+ const btCollisionObject* colObj1 = manifold->getBody1();
+
+ if (((colObj0) && (!(colObj0)->isStaticOrKinematicObject())) &&
+ ((colObj1) && (!(colObj1)->isStaticOrKinematicObject())))
+ {
+ getSimulationIslandManager()->getUnionFind().unite((colObj0)->getIslandTag(),(colObj1)->getIslandTag());
+ }
+ }
+ }
+
+ {
+ int i;
+ int numConstraints = int(m_constraints.size());
+ for (i=0;i< numConstraints ; i++ )
+ {
+ btTypedConstraint* constraint = m_constraints[i];
+ if (constraint->isEnabled())
+ {
+ const btRigidBody* colObj0 = &constraint->getRigidBodyA();
+ const btRigidBody* colObj1 = &constraint->getRigidBodyB();
+
+ if (((colObj0) && (!(colObj0)->isStaticOrKinematicObject())) &&
+ ((colObj1) && (!(colObj1)->isStaticOrKinematicObject())))
+ {
+ getSimulationIslandManager()->getUnionFind().unite((colObj0)->getIslandTag(),(colObj1)->getIslandTag());
+ }
+ }
+ }
+ }
+
+ //merge islands linked by Featherstone link colliders
+ for (int i=0;i<m_multiBodies.size();i++)
+ {
+ btMultiBody* body = m_multiBodies[i];
+ {
+ btMultiBodyLinkCollider* prev = body->getBaseCollider();
+
+ for (int b=0;b<body->getNumLinks();b++)
+ {
+ btMultiBodyLinkCollider* cur = body->getLink(b).m_collider;
+
+ if (((cur) && (!(cur)->isStaticOrKinematicObject())) &&
+ ((prev) && (!(prev)->isStaticOrKinematicObject())))
+ {
+ int tagPrev = prev->getIslandTag();
+ int tagCur = cur->getIslandTag();
+ getSimulationIslandManager()->getUnionFind().unite(tagPrev, tagCur);
+ }
+ if (cur && !cur->isStaticOrKinematicObject())
+ prev = cur;
+
+ }
+ }
+ }
+
+ //merge islands linked by multibody constraints
+ {
+ for (int i=0;i<this->m_multiBodyConstraints.size();i++)
+ {
+ btMultiBodyConstraint* c = m_multiBodyConstraints[i];
+ int tagA = c->getIslandIdA();
+ int tagB = c->getIslandIdB();
+ if (tagA>=0 && tagB>=0)
+ getSimulationIslandManager()->getUnionFind().unite(tagA, tagB);
+ }
+ }
+
+ //Store the island id in each body
+ getSimulationIslandManager()->storeIslandActivationState(getCollisionWorld());
+
+}
+
+
+void btMultiBodyDynamicsWorld::updateActivationState(btScalar timeStep)
+{
+ BT_PROFILE("btMultiBodyDynamicsWorld::updateActivationState");
+
+
+
+ for ( int i=0;i<m_multiBodies.size();i++)
+ {
+ btMultiBody* body = m_multiBodies[i];
+ if (body)
+ {
+ body->checkMotionAndSleepIfRequired(timeStep);
+ if (!body->isAwake())
+ {
+ btMultiBodyLinkCollider* col = body->getBaseCollider();
+ if (col && col->getActivationState() == ACTIVE_TAG)
+ {
+ col->setActivationState( WANTS_DEACTIVATION);
+ col->setDeactivationTime(0.f);
+ }
+ for (int b=0;b<body->getNumLinks();b++)
+ {
+ btMultiBodyLinkCollider* col = body->getLink(b).m_collider;
+ if (col && col->getActivationState() == ACTIVE_TAG)
+ {
+ col->setActivationState( WANTS_DEACTIVATION);
+ col->setDeactivationTime(0.f);
+ }
+ }
+ } else
+ {
+ btMultiBodyLinkCollider* col = body->getBaseCollider();
+ if (col && col->getActivationState() != DISABLE_DEACTIVATION)
+ col->setActivationState( ACTIVE_TAG );
+
+ for (int b=0;b<body->getNumLinks();b++)
+ {
+ btMultiBodyLinkCollider* col = body->getLink(b).m_collider;
+ if (col && col->getActivationState() != DISABLE_DEACTIVATION)
+ col->setActivationState( ACTIVE_TAG );
+ }
+ }
+
+ }
+ }
+
+ btDiscreteDynamicsWorld::updateActivationState(timeStep);
+}
+
+
+SIMD_FORCE_INLINE int btGetConstraintIslandId2(const btTypedConstraint* lhs)
+{
+ int islandId;
+
+ const btCollisionObject& rcolObj0 = lhs->getRigidBodyA();
+ const btCollisionObject& rcolObj1 = lhs->getRigidBodyB();
+ islandId= rcolObj0.getIslandTag()>=0?rcolObj0.getIslandTag():rcolObj1.getIslandTag();
+ return islandId;
+
+}
+
+
+class btSortConstraintOnIslandPredicate2
+{
+ public:
+
+ bool operator() ( const btTypedConstraint* lhs, const btTypedConstraint* rhs ) const
+ {
+ int rIslandId0,lIslandId0;
+ rIslandId0 = btGetConstraintIslandId2(rhs);
+ lIslandId0 = btGetConstraintIslandId2(lhs);
+ return lIslandId0 < rIslandId0;
+ }
+};
+
+
+
+SIMD_FORCE_INLINE int btGetMultiBodyConstraintIslandId(const btMultiBodyConstraint* lhs)
+{
+ int islandId;
+
+ int islandTagA = lhs->getIslandIdA();
+ int islandTagB = lhs->getIslandIdB();
+ islandId= islandTagA>=0?islandTagA:islandTagB;
+ return islandId;
+
+}
+
+
+class btSortMultiBodyConstraintOnIslandPredicate
+{
+ public:
+
+ bool operator() ( const btMultiBodyConstraint* lhs, const btMultiBodyConstraint* rhs ) const
+ {
+ int rIslandId0,lIslandId0;
+ rIslandId0 = btGetMultiBodyConstraintIslandId(rhs);
+ lIslandId0 = btGetMultiBodyConstraintIslandId(lhs);
+ return lIslandId0 < rIslandId0;
+ }
+};
+
+struct MultiBodyInplaceSolverIslandCallback : public btSimulationIslandManager::IslandCallback
+{
+ btContactSolverInfo* m_solverInfo;
+ btMultiBodyConstraintSolver* m_solver;
+ btMultiBodyConstraint** m_multiBodySortedConstraints;
+ int m_numMultiBodyConstraints;
+
+ btTypedConstraint** m_sortedConstraints;
+ int m_numConstraints;
+ btIDebugDraw* m_debugDrawer;
+ btDispatcher* m_dispatcher;
+
+ btAlignedObjectArray<btCollisionObject*> m_bodies;
+ btAlignedObjectArray<btPersistentManifold*> m_manifolds;
+ btAlignedObjectArray<btTypedConstraint*> m_constraints;
+ btAlignedObjectArray<btMultiBodyConstraint*> m_multiBodyConstraints;
+
+
+ MultiBodyInplaceSolverIslandCallback( btMultiBodyConstraintSolver* solver,
+ btDispatcher* dispatcher)
+ :m_solverInfo(NULL),
+ m_solver(solver),
+ m_multiBodySortedConstraints(NULL),
+ m_numConstraints(0),
+ m_debugDrawer(NULL),
+ m_dispatcher(dispatcher)
+ {
+
+ }
+
+ MultiBodyInplaceSolverIslandCallback& operator=(MultiBodyInplaceSolverIslandCallback& other)
+ {
+ btAssert(0);
+ (void)other;
+ return *this;
+ }
+
+ SIMD_FORCE_INLINE void setup ( btContactSolverInfo* solverInfo, btTypedConstraint** sortedConstraints, int numConstraints, btMultiBodyConstraint** sortedMultiBodyConstraints, int numMultiBodyConstraints, btIDebugDraw* debugDrawer)
+ {
+ btAssert(solverInfo);
+ m_solverInfo = solverInfo;
+
+ m_multiBodySortedConstraints = sortedMultiBodyConstraints;
+ m_numMultiBodyConstraints = numMultiBodyConstraints;
+ m_sortedConstraints = sortedConstraints;
+ m_numConstraints = numConstraints;
+
+ m_debugDrawer = debugDrawer;
+ m_bodies.resize (0);
+ m_manifolds.resize (0);
+ m_constraints.resize (0);
+ m_multiBodyConstraints.resize(0);
+ }
+
+
+ virtual void processIsland(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifolds,int numManifolds, int islandId)
+ {
+ if (islandId<0)
+ {
+ ///we don't split islands, so all constraints/contact manifolds/bodies are passed into the solver regardless the island id
+ m_solver->solveMultiBodyGroup( bodies,numBodies,manifolds, numManifolds,m_sortedConstraints, m_numConstraints, &m_multiBodySortedConstraints[0],m_numConstraints,*m_solverInfo,m_debugDrawer,m_dispatcher);
+ } else
+ {
+ //also add all non-contact constraints/joints for this island
+ btTypedConstraint** startConstraint = 0;
+ btMultiBodyConstraint** startMultiBodyConstraint = 0;
+
+ int numCurConstraints = 0;
+ int numCurMultiBodyConstraints = 0;
+
+ int i;
+
+ //find the first constraint for this island
+
+ for (i=0;i<m_numConstraints;i++)
+ {
+ if (btGetConstraintIslandId2(m_sortedConstraints[i]) == islandId)
+ {
+ startConstraint = &m_sortedConstraints[i];
+ break;
+ }
+ }
+ //count the number of constraints in this island
+ for (;i<m_numConstraints;i++)
+ {
+ if (btGetConstraintIslandId2(m_sortedConstraints[i]) == islandId)
+ {
+ numCurConstraints++;
+ }
+ }
+
+ for (i=0;i<m_numMultiBodyConstraints;i++)
+ {
+ if (btGetMultiBodyConstraintIslandId(m_multiBodySortedConstraints[i]) == islandId)
+ {
+
+ startMultiBodyConstraint = &m_multiBodySortedConstraints[i];
+ break;
+ }
+ }
+ //count the number of multi body constraints in this island
+ for (;i<m_numMultiBodyConstraints;i++)
+ {
+ if (btGetMultiBodyConstraintIslandId(m_multiBodySortedConstraints[i]) == islandId)
+ {
+ numCurMultiBodyConstraints++;
+ }
+ }
+
+ if (m_solverInfo->m_minimumSolverBatchSize<=1)
+ {
+ m_solver->solveGroup( bodies,numBodies,manifolds, numManifolds,startConstraint,numCurConstraints,*m_solverInfo,m_debugDrawer,m_dispatcher);
+ } else
+ {
+
+ for (i=0;i<numBodies;i++)
+ m_bodies.push_back(bodies[i]);
+ for (i=0;i<numManifolds;i++)
+ m_manifolds.push_back(manifolds[i]);
+ for (i=0;i<numCurConstraints;i++)
+ m_constraints.push_back(startConstraint[i]);
+
+ for (i=0;i<numCurMultiBodyConstraints;i++)
+ m_multiBodyConstraints.push_back(startMultiBodyConstraint[i]);
+
+ if ((m_constraints.size()+m_manifolds.size())>m_solverInfo->m_minimumSolverBatchSize)
+ {
+ processConstraints();
+ } else
+ {
+ //printf("deferred\n");
+ }
+ }
+ }
+ }
+ void processConstraints()
+ {
+
+ btCollisionObject** bodies = m_bodies.size()? &m_bodies[0]:0;
+ btPersistentManifold** manifold = m_manifolds.size()?&m_manifolds[0]:0;
+ btTypedConstraint** constraints = m_constraints.size()?&m_constraints[0]:0;
+ btMultiBodyConstraint** multiBodyConstraints = m_multiBodyConstraints.size() ? &m_multiBodyConstraints[0] : 0;
+
+ m_solver->solveMultiBodyGroup( bodies,m_bodies.size(),manifold, m_manifolds.size(),constraints, m_constraints.size() ,multiBodyConstraints, m_multiBodyConstraints.size(), *m_solverInfo,m_debugDrawer,m_dispatcher);
+ m_bodies.resize(0);
+ m_manifolds.resize(0);
+ m_constraints.resize(0);
+ m_multiBodyConstraints.resize(0);
+ }
+
+};
+
+
+
+btMultiBodyDynamicsWorld::btMultiBodyDynamicsWorld(btDispatcher* dispatcher,btBroadphaseInterface* pairCache,btMultiBodyConstraintSolver* constraintSolver,btCollisionConfiguration* collisionConfiguration)
+ :btDiscreteDynamicsWorld(dispatcher,pairCache,constraintSolver,collisionConfiguration),
+ m_multiBodyConstraintSolver(constraintSolver)
+{
+ //split impulse is not yet supported for Featherstone hierarchies
+ getSolverInfo().m_splitImpulse = false;
+ getSolverInfo().m_solverMode |=SOLVER_USE_2_FRICTION_DIRECTIONS;
+ m_solverMultiBodyIslandCallback = new MultiBodyInplaceSolverIslandCallback(constraintSolver,dispatcher);
+}
+
+btMultiBodyDynamicsWorld::~btMultiBodyDynamicsWorld ()
+{
+ delete m_solverMultiBodyIslandCallback;
+}
+
+
+
+
+void btMultiBodyDynamicsWorld::solveConstraints(btContactSolverInfo& solverInfo)
+{
+
+ btAlignedObjectArray<btScalar> scratch_r;
+ btAlignedObjectArray<btVector3> scratch_v;
+ btAlignedObjectArray<btMatrix3x3> scratch_m;
+
+
+ BT_PROFILE("solveConstraints");
+
+ m_sortedConstraints.resize( m_constraints.size());
+ int i;
+ for (i=0;i<getNumConstraints();i++)
+ {
+ m_sortedConstraints[i] = m_constraints[i];
+ }
+ m_sortedConstraints.quickSort(btSortConstraintOnIslandPredicate2());
+ btTypedConstraint** constraintsPtr = getNumConstraints() ? &m_sortedConstraints[0] : 0;
+
+ m_sortedMultiBodyConstraints.resize(m_multiBodyConstraints.size());
+ for (i=0;i<m_multiBodyConstraints.size();i++)
+ {
+ m_sortedMultiBodyConstraints[i] = m_multiBodyConstraints[i];
+ }
+ m_sortedMultiBodyConstraints.quickSort(btSortMultiBodyConstraintOnIslandPredicate());
+
+ btMultiBodyConstraint** sortedMultiBodyConstraints = m_sortedMultiBodyConstraints.size() ? &m_sortedMultiBodyConstraints[0] : 0;
+
+
+ m_solverMultiBodyIslandCallback->setup(&solverInfo,constraintsPtr,m_sortedConstraints.size(),sortedMultiBodyConstraints,m_sortedMultiBodyConstraints.size(), getDebugDrawer());
+ m_constraintSolver->prepareSolve(getCollisionWorld()->getNumCollisionObjects(), getCollisionWorld()->getDispatcher()->getNumManifolds());
+
+ /// solve all the constraints for this island
+ m_islandManager->buildAndProcessIslands(getCollisionWorld()->getDispatcher(),getCollisionWorld(),m_solverMultiBodyIslandCallback);
+
+
+ {
+ BT_PROFILE("btMultiBody addForce and stepVelocities");
+ for (int i=0;i<this->m_multiBodies.size();i++)
+ {
+ btMultiBody* bod = m_multiBodies[i];
+
+ bool isSleeping = false;
+
+ if (bod->getBaseCollider() && bod->getBaseCollider()->getActivationState() == ISLAND_SLEEPING)
+ {
+ isSleeping = true;
+ }
+ for (int b=0;b<bod->getNumLinks();b++)
+ {
+ if (bod->getLink(b).m_collider && bod->getLink(b).m_collider->getActivationState()==ISLAND_SLEEPING)
+ isSleeping = true;
+ }
+
+ if (!isSleeping)
+ {
+ scratch_r.resize(bod->getNumLinks()+1);
+ scratch_v.resize(bod->getNumLinks()+1);
+ scratch_m.resize(bod->getNumLinks()+1);
+
+ bod->clearForcesAndTorques();
+ bod->addBaseForce(m_gravity * bod->getBaseMass());
+
+ for (int j = 0; j < bod->getNumLinks(); ++j)
+ {
+ bod->addLinkForce(j, m_gravity * bod->getLinkMass(j));
+ }
+
+ bod->stepVelocities(solverInfo.m_timeStep, scratch_r, scratch_v, scratch_m);
+ }
+ }
+ }
+
+ m_solverMultiBodyIslandCallback->processConstraints();
+
+ m_constraintSolver->allSolved(solverInfo, m_debugDrawer);
+
+}
+
+void btMultiBodyDynamicsWorld::integrateTransforms(btScalar timeStep)
+{
+ btDiscreteDynamicsWorld::integrateTransforms(timeStep);
+
+ {
+ BT_PROFILE("btMultiBody stepPositions");
+ //integrate and update the Featherstone hierarchies
+ btAlignedObjectArray<btQuaternion> world_to_local;
+ btAlignedObjectArray<btVector3> local_origin;
+
+ for (int b=0;b<m_multiBodies.size();b++)
+ {
+ btMultiBody* bod = m_multiBodies[b];
+ bool isSleeping = false;
+ if (bod->getBaseCollider() && bod->getBaseCollider()->getActivationState() == ISLAND_SLEEPING)
+ {
+ isSleeping = true;
+ }
+ for (int b=0;b<bod->getNumLinks();b++)
+ {
+ if (bod->getLink(b).m_collider && bod->getLink(b).m_collider->getActivationState()==ISLAND_SLEEPING)
+ isSleeping = true;
+ }
+
+
+ if (!isSleeping)
+ {
+ int nLinks = bod->getNumLinks();
+
+ ///base + num links
+ world_to_local.resize(nLinks+1);
+ local_origin.resize(nLinks+1);
+
+ bod->stepPositions(timeStep);
+
+
+
+ world_to_local[0] = bod->getWorldToBaseRot();
+ local_origin[0] = bod->getBasePos();
+
+ if (bod->getBaseCollider())
+ {
+ btVector3 posr = local_origin[0];
+ float pos[4]={posr.x(),posr.y(),posr.z(),1};
+ float quat[4]={-world_to_local[0].x(),-world_to_local[0].y(),-world_to_local[0].z(),world_to_local[0].w()};
+ btTransform tr;
+ tr.setIdentity();
+ tr.setOrigin(posr);
+ tr.setRotation(btQuaternion(quat[0],quat[1],quat[2],quat[3]));
+
+ bod->getBaseCollider()->setWorldTransform(tr);
+
+ }
+
+ for (int k=0;k<bod->getNumLinks();k++)
+ {
+ const int parent = bod->getParent(k);
+ world_to_local[k+1] = bod->getParentToLocalRot(k) * world_to_local[parent+1];
+ local_origin[k+1] = local_origin[parent+1] + (quatRotate(world_to_local[k+1].inverse() , bod->getRVector(k)));
+ }
+
+
+ for (int m=0;m<bod->getNumLinks();m++)
+ {
+ btMultiBodyLinkCollider* col = bod->getLink(m).m_collider;
+ if (col)
+ {
+ int link = col->m_link;
+ btAssert(link == m);
+
+ int index = link+1;
+
+ btVector3 posr = local_origin[index];
+ float pos[4]={posr.x(),posr.y(),posr.z(),1};
+ float quat[4]={-world_to_local[index].x(),-world_to_local[index].y(),-world_to_local[index].z(),world_to_local[index].w()};
+ btTransform tr;
+ tr.setIdentity();
+ tr.setOrigin(posr);
+ tr.setRotation(btQuaternion(quat[0],quat[1],quat[2],quat[3]));
+
+ col->setWorldTransform(tr);
+ }
+ }
+ } else
+ {
+ bod->clearVelocities();
+ }
+ }
+ }
+}
+
+
+
+void btMultiBodyDynamicsWorld::addMultiBodyConstraint( btMultiBodyConstraint* constraint)
+{
+ m_multiBodyConstraints.push_back(constraint);
+}
+
+void btMultiBodyDynamicsWorld::removeMultiBodyConstraint( btMultiBodyConstraint* constraint)
+{
+ m_multiBodyConstraints.remove(constraint);
+}
diff --git a/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyDynamicsWorld.h b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyDynamicsWorld.h
new file mode 100644
index 00000000000..ad57a346dcc
--- /dev/null
+++ b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyDynamicsWorld.h
@@ -0,0 +1,56 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2013 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_MULTIBODY_DYNAMICS_WORLD_H
+#define BT_MULTIBODY_DYNAMICS_WORLD_H
+
+#include "BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h"
+
+
+class btMultiBody;
+class btMultiBodyConstraint;
+class btMultiBodyConstraintSolver;
+struct MultiBodyInplaceSolverIslandCallback;
+
+///The btMultiBodyDynamicsWorld adds Featherstone multi body dynamics to Bullet
+///This implementation is still preliminary/experimental.
+class btMultiBodyDynamicsWorld : public btDiscreteDynamicsWorld
+{
+protected:
+ btAlignedObjectArray<btMultiBody*> m_multiBodies;
+ btAlignedObjectArray<btMultiBodyConstraint*> m_multiBodyConstraints;
+ btAlignedObjectArray<btMultiBodyConstraint*> m_sortedMultiBodyConstraints;
+ btMultiBodyConstraintSolver* m_multiBodyConstraintSolver;
+ MultiBodyInplaceSolverIslandCallback* m_solverMultiBodyIslandCallback;
+
+ virtual void calculateSimulationIslands();
+ virtual void updateActivationState(btScalar timeStep);
+ virtual void solveConstraints(btContactSolverInfo& solverInfo);
+ virtual void integrateTransforms(btScalar timeStep);
+public:
+
+ btMultiBodyDynamicsWorld(btDispatcher* dispatcher,btBroadphaseInterface* pairCache,btMultiBodyConstraintSolver* constraintSolver,btCollisionConfiguration* collisionConfiguration);
+
+ virtual ~btMultiBodyDynamicsWorld ();
+
+ virtual void addMultiBody(btMultiBody* body, short group= btBroadphaseProxy::DefaultFilter, short mask=btBroadphaseProxy::AllFilter);
+
+ virtual void removeMultiBody(btMultiBody* body);
+
+ virtual void addMultiBodyConstraint( btMultiBodyConstraint* constraint);
+
+ virtual void removeMultiBodyConstraint( btMultiBodyConstraint* constraint);
+};
+#endif //BT_MULTIBODY_DYNAMICS_WORLD_H
diff --git a/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyJointLimitConstraint.cpp b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyJointLimitConstraint.cpp
new file mode 100644
index 00000000000..ea309e8857d
--- /dev/null
+++ b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyJointLimitConstraint.cpp
@@ -0,0 +1,133 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2013 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+///This file was written by Erwin Coumans
+
+#include "btMultiBodyJointLimitConstraint.h"
+#include "btMultiBody.h"
+#include "btMultiBodyLinkCollider.h"
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+
+
+btMultiBodyJointLimitConstraint::btMultiBodyJointLimitConstraint(btMultiBody* body, int link, btScalar lower, btScalar upper)
+ :btMultiBodyConstraint(body,body,link,link,2,true),
+ m_lowerBound(lower),
+ m_upperBound(upper)
+{
+ // the data.m_jacobians never change, so may as well
+ // initialize them here
+
+ // note: we rely on the fact that data.m_jacobians are
+ // always initialized to zero by the Constraint ctor
+
+ // row 0: the lower bound
+ jacobianA(0)[6 + link] = 1;
+
+ // row 1: the upper bound
+ jacobianB(1)[6 + link] = -1;
+}
+btMultiBodyJointLimitConstraint::~btMultiBodyJointLimitConstraint()
+{
+}
+
+int btMultiBodyJointLimitConstraint::getIslandIdA() const
+{
+ btMultiBodyLinkCollider* col = m_bodyA->getBaseCollider();
+ if (col)
+ return col->getIslandTag();
+ for (int i=0;i<m_bodyA->getNumLinks();i++)
+ {
+ if (m_bodyA->getLink(i).m_collider)
+ return m_bodyA->getLink(i).m_collider->getIslandTag();
+ }
+ return -1;
+}
+
+int btMultiBodyJointLimitConstraint::getIslandIdB() const
+{
+ btMultiBodyLinkCollider* col = m_bodyB->getBaseCollider();
+ if (col)
+ return col->getIslandTag();
+
+ for (int i=0;i<m_bodyB->getNumLinks();i++)
+ {
+ col = m_bodyB->getLink(i).m_collider;
+ if (col)
+ return col->getIslandTag();
+ }
+ return -1;
+}
+
+
+void btMultiBodyJointLimitConstraint::createConstraintRows(btMultiBodyConstraintArray& constraintRows,
+ btMultiBodyJacobianData& data,
+ const btContactSolverInfo& infoGlobal)
+{
+ // only positions need to be updated -- data.m_jacobians and force
+ // directions were set in the ctor and never change.
+
+ // row 0: the lower bound
+ setPosition(0, m_bodyA->getJointPos(m_linkA) - m_lowerBound);
+
+ // row 1: the upper bound
+ setPosition(1, m_upperBound - m_bodyA->getJointPos(m_linkA));
+
+ for (int row=0;row<getNumRows();row++)
+ {
+ btMultiBodySolverConstraint& constraintRow = constraintRows.expandNonInitializing();
+ constraintRow.m_multiBodyA = m_bodyA;
+ constraintRow.m_multiBodyB = m_bodyB;
+
+ btScalar rel_vel = fillConstraintRowMultiBodyMultiBody(constraintRow,data,jacobianA(row),jacobianB(row),infoGlobal,0,-m_maxAppliedImpulse,m_maxAppliedImpulse);
+ {
+ btScalar penetration = getPosition(row);
+ btScalar positionalError = 0.f;
+ btScalar velocityError = - rel_vel;// * damping;
+ btScalar erp = infoGlobal.m_erp2;
+ if (!infoGlobal.m_splitImpulse || (penetration > infoGlobal.m_splitImpulsePenetrationThreshold))
+ {
+ erp = infoGlobal.m_erp;
+ }
+ if (penetration>0)
+ {
+ positionalError = 0;
+ velocityError = -penetration / infoGlobal.m_timeStep;
+ } else
+ {
+ positionalError = -penetration * erp/infoGlobal.m_timeStep;
+ }
+
+ btScalar penetrationImpulse = positionalError*constraintRow.m_jacDiagABInv;
+ btScalar velocityImpulse = velocityError *constraintRow.m_jacDiagABInv;
+ if (!infoGlobal.m_splitImpulse || (penetration > infoGlobal.m_splitImpulsePenetrationThreshold))
+ {
+ //combine position and velocity into rhs
+ constraintRow.m_rhs = penetrationImpulse+velocityImpulse;
+ constraintRow.m_rhsPenetration = 0.f;
+
+ } else
+ {
+ //split position and velocity into rhs and m_rhsPenetration
+ constraintRow.m_rhs = velocityImpulse;
+ constraintRow.m_rhsPenetration = penetrationImpulse;
+ }
+ }
+ }
+
+}
+
+
+
+
diff --git a/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyJointLimitConstraint.h b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyJointLimitConstraint.h
new file mode 100644
index 00000000000..0c7fc170822
--- /dev/null
+++ b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyJointLimitConstraint.h
@@ -0,0 +1,44 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2013 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_MULTIBODY_JOINT_LIMIT_CONSTRAINT_H
+#define BT_MULTIBODY_JOINT_LIMIT_CONSTRAINT_H
+
+#include "btMultiBodyConstraint.h"
+struct btSolverInfo;
+
+class btMultiBodyJointLimitConstraint : public btMultiBodyConstraint
+{
+protected:
+
+ btScalar m_lowerBound;
+ btScalar m_upperBound;
+public:
+
+ btMultiBodyJointLimitConstraint(btMultiBody* body, int link, btScalar lower, btScalar upper);
+ virtual ~btMultiBodyJointLimitConstraint();
+
+ virtual int getIslandIdA() const;
+ virtual int getIslandIdB() const;
+
+ virtual void createConstraintRows(btMultiBodyConstraintArray& constraintRows,
+ btMultiBodyJacobianData& data,
+ const btContactSolverInfo& infoGlobal);
+
+
+};
+
+#endif //BT_MULTIBODY_JOINT_LIMIT_CONSTRAINT_H
+
diff --git a/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyJointMotor.cpp b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyJointMotor.cpp
new file mode 100644
index 00000000000..ab5a430231b
--- /dev/null
+++ b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyJointMotor.cpp
@@ -0,0 +1,89 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2013 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+///This file was written by Erwin Coumans
+
+#include "btMultiBodyJointMotor.h"
+#include "btMultiBody.h"
+#include "btMultiBodyLinkCollider.h"
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+
+
+btMultiBodyJointMotor::btMultiBodyJointMotor(btMultiBody* body, int link, btScalar desiredVelocity, btScalar maxMotorImpulse)
+ :btMultiBodyConstraint(body,body,link,link,1,true),
+ m_desiredVelocity(desiredVelocity)
+{
+ m_maxAppliedImpulse = maxMotorImpulse;
+ // the data.m_jacobians never change, so may as well
+ // initialize them here
+
+ // note: we rely on the fact that data.m_jacobians are
+ // always initialized to zero by the Constraint ctor
+
+ // row 0: the lower bound
+ jacobianA(0)[6 + link] = 1;
+}
+btMultiBodyJointMotor::~btMultiBodyJointMotor()
+{
+}
+
+int btMultiBodyJointMotor::getIslandIdA() const
+{
+ btMultiBodyLinkCollider* col = m_bodyA->getBaseCollider();
+ if (col)
+ return col->getIslandTag();
+ for (int i=0;i<m_bodyA->getNumLinks();i++)
+ {
+ if (m_bodyA->getLink(i).m_collider)
+ return m_bodyA->getLink(i).m_collider->getIslandTag();
+ }
+ return -1;
+}
+
+int btMultiBodyJointMotor::getIslandIdB() const
+{
+ btMultiBodyLinkCollider* col = m_bodyB->getBaseCollider();
+ if (col)
+ return col->getIslandTag();
+
+ for (int i=0;i<m_bodyB->getNumLinks();i++)
+ {
+ col = m_bodyB->getLink(i).m_collider;
+ if (col)
+ return col->getIslandTag();
+ }
+ return -1;
+}
+
+
+void btMultiBodyJointMotor::createConstraintRows(btMultiBodyConstraintArray& constraintRows,
+ btMultiBodyJacobianData& data,
+ const btContactSolverInfo& infoGlobal)
+{
+ // only positions need to be updated -- data.m_jacobians and force
+ // directions were set in the ctor and never change.
+
+
+
+ for (int row=0;row<getNumRows();row++)
+ {
+ btMultiBodySolverConstraint& constraintRow = constraintRows.expandNonInitializing();
+
+ btScalar penetration = 0;
+ fillConstraintRowMultiBodyMultiBody(constraintRow,data,jacobianA(row),jacobianB(row),infoGlobal,m_desiredVelocity,-m_maxAppliedImpulse,m_maxAppliedImpulse);
+ }
+
+}
+
diff --git a/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyJointMotor.h b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyJointMotor.h
new file mode 100644
index 00000000000..43869348141
--- /dev/null
+++ b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyJointMotor.h
@@ -0,0 +1,47 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2013 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+///This file was written by Erwin Coumans
+
+#ifndef BT_MULTIBODY_JOINT_MOTOR_H
+#define BT_MULTIBODY_JOINT_MOTOR_H
+
+#include "btMultiBodyConstraint.h"
+struct btSolverInfo;
+
+class btMultiBodyJointMotor : public btMultiBodyConstraint
+{
+protected:
+
+
+ btScalar m_desiredVelocity;
+
+public:
+
+ btMultiBodyJointMotor(btMultiBody* body, int link, btScalar desiredVelocity, btScalar maxMotorImpulse);
+ virtual ~btMultiBodyJointMotor();
+
+ virtual int getIslandIdA() const;
+ virtual int getIslandIdB() const;
+
+ virtual void createConstraintRows(btMultiBodyConstraintArray& constraintRows,
+ btMultiBodyJacobianData& data,
+ const btContactSolverInfo& infoGlobal);
+
+
+};
+
+#endif //BT_MULTIBODY_JOINT_MOTOR_H
+
diff --git a/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyLink.h b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyLink.h
new file mode 100644
index 00000000000..fbd54c45db3
--- /dev/null
+++ b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyLink.h
@@ -0,0 +1,110 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2013 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_MULTIBODY_LINK_H
+#define BT_MULTIBODY_LINK_H
+
+#include "LinearMath/btQuaternion.h"
+#include "LinearMath/btVector3.h"
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+
+enum btMultiBodyLinkFlags
+{
+ BT_MULTIBODYLINKFLAGS_DISABLE_PARENT_COLLISION = 1
+};
+//
+// Link struct
+//
+
+struct btMultibodyLink
+{
+
+ BT_DECLARE_ALIGNED_ALLOCATOR();
+
+ btScalar joint_pos; // qi
+
+ btScalar mass; // mass of link
+ btVector3 inertia; // inertia of link (local frame; diagonal)
+
+ int parent; // index of the parent link (assumed to be < index of this link), or -1 if parent is the base link.
+
+ btQuaternion zero_rot_parent_to_this; // rotates vectors in parent-frame to vectors in local-frame (when q=0). constant.
+
+ // "axis" = spatial joint axis (Mirtich Defn 9 p104). (expressed in local frame.) constant.
+ // for prismatic: axis_top = zero;
+ // axis_bottom = unit vector along the joint axis.
+ // for revolute: axis_top = unit vector along the rotation axis (u);
+ // axis_bottom = u cross d_vector.
+ btVector3 axis_top;
+ btVector3 axis_bottom;
+
+ btVector3 d_vector; // vector from the inboard joint pos to this link's COM. (local frame.) constant. set for revolute joints only.
+
+ // e_vector is constant, but depends on the joint type
+ // prismatic: vector from COM of parent to COM of this link, WHEN Q = 0. (local frame.)
+ // revolute: vector from parent's COM to the pivot point, in PARENT's frame.
+ btVector3 e_vector;
+
+ bool is_revolute; // true = revolute, false = prismatic
+
+ btQuaternion cached_rot_parent_to_this; // rotates vectors in parent frame to vectors in local frame
+ btVector3 cached_r_vector; // vector from COM of parent to COM of this link, in local frame.
+
+ btVector3 applied_force; // In WORLD frame
+ btVector3 applied_torque; // In WORLD frame
+ btScalar joint_torque;
+
+ class btMultiBodyLinkCollider* m_collider;
+ int m_flags;
+
+ // ctor: set some sensible defaults
+ btMultibodyLink()
+ : joint_pos(0),
+ mass(1),
+ parent(-1),
+ zero_rot_parent_to_this(1, 0, 0, 0),
+ is_revolute(false),
+ cached_rot_parent_to_this(1, 0, 0, 0),
+ joint_torque(0),
+ m_collider(0),
+ m_flags(0)
+ {
+ inertia.setValue(1, 1, 1);
+ axis_top.setValue(0, 0, 0);
+ axis_bottom.setValue(1, 0, 0);
+ d_vector.setValue(0, 0, 0);
+ e_vector.setValue(0, 0, 0);
+ cached_r_vector.setValue(0, 0, 0);
+ applied_force.setValue( 0, 0, 0);
+ applied_torque.setValue(0, 0, 0);
+ }
+
+ // routine to update cached_rot_parent_to_this and cached_r_vector
+ void updateCache()
+ {
+ if (is_revolute)
+ {
+ cached_rot_parent_to_this = btQuaternion(axis_top,-joint_pos) * zero_rot_parent_to_this;
+ cached_r_vector = d_vector + quatRotate(cached_rot_parent_to_this,e_vector);
+ } else
+ {
+ // cached_rot_parent_to_this never changes, so no need to update
+ cached_r_vector = e_vector + joint_pos * axis_bottom;
+ }
+ }
+};
+
+
+#endif //BT_MULTIBODY_LINK_H
diff --git a/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyLinkCollider.h b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyLinkCollider.h
new file mode 100644
index 00000000000..27f12514a6d
--- /dev/null
+++ b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyLinkCollider.h
@@ -0,0 +1,92 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2013 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_FEATHERSTONE_LINK_COLLIDER_H
+#define BT_FEATHERSTONE_LINK_COLLIDER_H
+
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+
+#include "btMultiBody.h"
+
+class btMultiBodyLinkCollider : public btCollisionObject
+{
+//protected:
+public:
+
+ btMultiBody* m_multiBody;
+ int m_link;
+
+
+ btMultiBodyLinkCollider (btMultiBody* multiBody,int link)
+ :m_multiBody(multiBody),
+ m_link(link)
+ {
+ m_checkCollideWith = true;
+ //we need to remove the 'CF_STATIC_OBJECT' flag, otherwise links/base doesn't merge islands
+ //this means that some constraints might point to bodies that are not in the islands, causing crashes
+ //if (link>=0 || (multiBody && !multiBody->hasFixedBase()))
+ {
+ m_collisionFlags &= (~btCollisionObject::CF_STATIC_OBJECT);
+ }
+ // else
+ //{
+ // m_collisionFlags |= (btCollisionObject::CF_STATIC_OBJECT);
+ //}
+
+ m_internalType = CO_FEATHERSTONE_LINK;
+ }
+ static btMultiBodyLinkCollider* upcast(btCollisionObject* colObj)
+ {
+ if (colObj->getInternalType()&btCollisionObject::CO_FEATHERSTONE_LINK)
+ return (btMultiBodyLinkCollider*)colObj;
+ return 0;
+ }
+ static const btMultiBodyLinkCollider* upcast(const btCollisionObject* colObj)
+ {
+ if (colObj->getInternalType()&btCollisionObject::CO_FEATHERSTONE_LINK)
+ return (btMultiBodyLinkCollider*)colObj;
+ return 0;
+ }
+
+ virtual bool checkCollideWithOverride(const btCollisionObject* co) const
+ {
+ const btMultiBodyLinkCollider* other = btMultiBodyLinkCollider::upcast(co);
+ if (!other)
+ return true;
+ if (other->m_multiBody != this->m_multiBody)
+ return true;
+ if (!m_multiBody->hasSelfCollision())
+ return false;
+
+ //check if 'link' has collision disabled
+ if (m_link>=0)
+ {
+ const btMultibodyLink& link = m_multiBody->getLink(this->m_link);
+ if ((link.m_flags&BT_MULTIBODYLINKFLAGS_DISABLE_PARENT_COLLISION) && link.parent == other->m_link)
+ return false;
+ }
+
+ if (other->m_link>=0)
+ {
+ const btMultibodyLink& otherLink = other->m_multiBody->getLink(other->m_link);
+ if ((otherLink.m_flags& BT_MULTIBODYLINKFLAGS_DISABLE_PARENT_COLLISION) && otherLink.parent == this->m_link)
+ return false;
+ }
+ return true;
+ }
+};
+
+#endif //BT_FEATHERSTONE_LINK_COLLIDER_H
+
diff --git a/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyPoint2Point.cpp b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyPoint2Point.cpp
new file mode 100644
index 00000000000..f6690049156
--- /dev/null
+++ b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyPoint2Point.cpp
@@ -0,0 +1,143 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2013 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+///This file was written by Erwin Coumans
+
+#include "btMultiBodyPoint2Point.h"
+#include "btMultiBodyLinkCollider.h"
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+
+btMultiBodyPoint2Point::btMultiBodyPoint2Point(btMultiBody* body, int link, btRigidBody* bodyB, const btVector3& pivotInA, const btVector3& pivotInB)
+ :btMultiBodyConstraint(body,0,link,-1,3,false),
+ m_rigidBodyA(0),
+ m_rigidBodyB(bodyB),
+ m_pivotInA(pivotInA),
+ m_pivotInB(pivotInB)
+{
+}
+
+btMultiBodyPoint2Point::btMultiBodyPoint2Point(btMultiBody* bodyA, int linkA, btMultiBody* bodyB, int linkB, const btVector3& pivotInA, const btVector3& pivotInB)
+ :btMultiBodyConstraint(bodyA,bodyB,linkA,linkB,3,false),
+ m_rigidBodyA(0),
+ m_rigidBodyB(0),
+ m_pivotInA(pivotInA),
+ m_pivotInB(pivotInB)
+{
+}
+
+
+btMultiBodyPoint2Point::~btMultiBodyPoint2Point()
+{
+}
+
+
+int btMultiBodyPoint2Point::getIslandIdA() const
+{
+ if (m_rigidBodyA)
+ return m_rigidBodyA->getIslandTag();
+
+ if (m_bodyA)
+ {
+ btMultiBodyLinkCollider* col = m_bodyA->getBaseCollider();
+ if (col)
+ return col->getIslandTag();
+ for (int i=0;i<m_bodyA->getNumLinks();i++)
+ {
+ if (m_bodyA->getLink(i).m_collider)
+ return m_bodyA->getLink(i).m_collider->getIslandTag();
+ }
+ }
+ return -1;
+}
+
+int btMultiBodyPoint2Point::getIslandIdB() const
+{
+ if (m_rigidBodyB)
+ return m_rigidBodyB->getIslandTag();
+ if (m_bodyB)
+ {
+ btMultiBodyLinkCollider* col = m_bodyB->getBaseCollider();
+ if (col)
+ return col->getIslandTag();
+
+ for (int i=0;i<m_bodyB->getNumLinks();i++)
+ {
+ col = m_bodyB->getLink(i).m_collider;
+ if (col)
+ return col->getIslandTag();
+ }
+ }
+ return -1;
+}
+
+
+
+void btMultiBodyPoint2Point::createConstraintRows(btMultiBodyConstraintArray& constraintRows,
+ btMultiBodyJacobianData& data,
+ const btContactSolverInfo& infoGlobal)
+{
+
+// int i=1;
+ for (int i=0;i<3;i++)
+ {
+
+ btMultiBodySolverConstraint& constraintRow = constraintRows.expandNonInitializing();
+
+ constraintRow.m_solverBodyIdA = data.m_fixedBodyId;
+ constraintRow.m_solverBodyIdB = data.m_fixedBodyId;
+
+
+ btVector3 contactNormalOnB(0,0,0);
+ contactNormalOnB[i] = -1;
+
+ btScalar penetration = 0;
+
+ // Convert local points back to world
+ btVector3 pivotAworld = m_pivotInA;
+ if (m_rigidBodyA)
+ {
+
+ constraintRow.m_solverBodyIdA = m_rigidBodyA->getCompanionId();
+ pivotAworld = m_rigidBodyA->getCenterOfMassTransform()*m_pivotInA;
+ } else
+ {
+ if (m_bodyA)
+ pivotAworld = m_bodyA->localPosToWorld(m_linkA, m_pivotInA);
+ }
+ btVector3 pivotBworld = m_pivotInB;
+ if (m_rigidBodyB)
+ {
+ constraintRow.m_solverBodyIdB = m_rigidBodyB->getCompanionId();
+ pivotBworld = m_rigidBodyB->getCenterOfMassTransform()*m_pivotInB;
+ } else
+ {
+ if (m_bodyB)
+ pivotBworld = m_bodyB->localPosToWorld(m_linkB, m_pivotInB);
+
+ }
+ btScalar position = (pivotAworld-pivotBworld).dot(contactNormalOnB);
+ btScalar relaxation = 1.f;
+ fillMultiBodyConstraintMixed(constraintRow, data,
+ contactNormalOnB,
+ pivotAworld, pivotBworld,
+ position,
+ infoGlobal,
+ relaxation,
+ false);
+ constraintRow.m_lowerLimit = -m_maxAppliedImpulse;
+ constraintRow.m_upperLimit = m_maxAppliedImpulse;
+
+ }
+}
diff --git a/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyPoint2Point.h b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyPoint2Point.h
new file mode 100644
index 00000000000..26ca12b406d
--- /dev/null
+++ b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodyPoint2Point.h
@@ -0,0 +1,60 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2013 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+///This file was written by Erwin Coumans
+
+#ifndef BT_MULTIBODY_POINT2POINT_H
+#define BT_MULTIBODY_POINT2POINT_H
+
+#include "btMultiBodyConstraint.h"
+
+class btMultiBodyPoint2Point : public btMultiBodyConstraint
+{
+protected:
+
+ btRigidBody* m_rigidBodyA;
+ btRigidBody* m_rigidBodyB;
+ btVector3 m_pivotInA;
+ btVector3 m_pivotInB;
+
+
+public:
+
+ btMultiBodyPoint2Point(btMultiBody* body, int link, btRigidBody* bodyB, const btVector3& pivotInA, const btVector3& pivotInB);
+ btMultiBodyPoint2Point(btMultiBody* bodyA, int linkA, btMultiBody* bodyB, int linkB, const btVector3& pivotInA, const btVector3& pivotInB);
+
+ virtual ~btMultiBodyPoint2Point();
+
+ virtual int getIslandIdA() const;
+ virtual int getIslandIdB() const;
+
+ virtual void createConstraintRows(btMultiBodyConstraintArray& constraintRows,
+ btMultiBodyJacobianData& data,
+ const btContactSolverInfo& infoGlobal);
+
+ const btVector3& getPivotInB() const
+ {
+ return m_pivotInB;
+ }
+
+ void setPivotInB(const btVector3& pivotInB)
+ {
+ m_pivotInB = pivotInB;
+ }
+
+
+};
+
+#endif //BT_MULTIBODY_POINT2POINT_H
diff --git a/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodySolverConstraint.h b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodySolverConstraint.h
new file mode 100644
index 00000000000..cf06dfb9ebf
--- /dev/null
+++ b/extern/bullet2/src/BulletDynamics/Featherstone/btMultiBodySolverConstraint.h
@@ -0,0 +1,82 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2013 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_MULTIBODY_SOLVER_CONSTRAINT_H
+#define BT_MULTIBODY_SOLVER_CONSTRAINT_H
+
+#include "LinearMath/btVector3.h"
+#include "LinearMath/btAlignedObjectArray.h"
+
+class btMultiBody;
+#include "BulletDynamics/ConstraintSolver/btSolverBody.h"
+#include "BulletDynamics/ConstraintSolver/btContactSolverInfo.h"
+
+///1D constraint along a normal axis between bodyA and bodyB. It can be combined to solve contact and friction constraints.
+ATTRIBUTE_ALIGNED16 (struct) btMultiBodySolverConstraint
+{
+ BT_DECLARE_ALIGNED_ALLOCATOR();
+
+
+ int m_deltaVelAindex;//more generic version of m_relpos1CrossNormal/m_contactNormal1
+ btVector3 m_relpos1CrossNormal;
+ btVector3 m_contactNormal1;
+ int m_jacAindex;
+
+ int m_deltaVelBindex;
+ btVector3 m_relpos2CrossNormal;
+ btVector3 m_contactNormal2; //usually m_contactNormal2 == -m_contactNormal1, but not always
+ int m_jacBindex;
+
+ btVector3 m_angularComponentA;
+ btVector3 m_angularComponentB;
+
+ mutable btSimdScalar m_appliedPushImpulse;
+ mutable btSimdScalar m_appliedImpulse;
+
+ btScalar m_friction;
+ btScalar m_jacDiagABInv;
+ btScalar m_rhs;
+ btScalar m_cfm;
+
+ btScalar m_lowerLimit;
+ btScalar m_upperLimit;
+ btScalar m_rhsPenetration;
+ union
+ {
+ void* m_originalContactPoint;
+ btScalar m_unusedPadding4;
+ };
+
+ int m_overrideNumSolverIterations;
+ int m_frictionIndex;
+
+ int m_solverBodyIdA;
+ btMultiBody* m_multiBodyA;
+ int m_linkA;
+
+ int m_solverBodyIdB;
+ btMultiBody* m_multiBodyB;
+ int m_linkB;
+
+ enum btSolverConstraintType
+ {
+ BT_SOLVER_CONTACT_1D = 0,
+ BT_SOLVER_FRICTION_1D
+ };
+};
+
+typedef btAlignedObjectArray<btMultiBodySolverConstraint> btMultiBodyConstraintArray;
+
+#endif //BT_MULTIBODY_SOLVER_CONSTRAINT_H
diff --git a/extern/bullet2/src/BulletDynamics/MLCPSolvers/btDantzigLCP.cpp b/extern/bullet2/src/BulletDynamics/MLCPSolvers/btDantzigLCP.cpp
new file mode 100644
index 00000000000..3bf7b5c1311
--- /dev/null
+++ b/extern/bullet2/src/BulletDynamics/MLCPSolvers/btDantzigLCP.cpp
@@ -0,0 +1,2079 @@
+/*************************************************************************
+* *
+* Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. *
+* All rights reserved. Email: russ@q12.org Web: www.q12.org *
+* *
+* This library is free software; you can redistribute it and/or *
+* modify it under the terms of EITHER: *
+* (1) The GNU Lesser General Public License as published by the Free *
+* Software Foundation; either version 2.1 of the License, or (at *
+* your option) any later version. The text of the GNU Lesser *
+* General Public License is included with this library in the *
+* file LICENSE.TXT. *
+* (2) The BSD-style license that is included with this library in *
+* the file LICENSE-BSD.TXT. *
+* *
+* This library is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files *
+* LICENSE.TXT and LICENSE-BSD.TXT for more details. *
+* *
+*************************************************************************/
+
+/*
+
+
+THE ALGORITHM
+-------------
+
+solve A*x = b+w, with x and w subject to certain LCP conditions.
+each x(i),w(i) must lie on one of the three line segments in the following
+diagram. each line segment corresponds to one index set :
+
+ w(i)
+ /|\ | :
+ | | :
+ | |i in N :
+ w>0 | |state[i]=0 :
+ | | :
+ | | : i in C
+ w=0 + +-----------------------+
+ | : |
+ | : |
+ w<0 | : |i in N
+ | : |state[i]=1
+ | : |
+ | : |
+ +-------|-----------|-----------|----------> x(i)
+ lo 0 hi
+
+the Dantzig algorithm proceeds as follows:
+ for i=1:n
+ * if (x(i),w(i)) is not on the line, push x(i) and w(i) positive or
+ negative towards the line. as this is done, the other (x(j),w(j))
+ for j<i are constrained to be on the line. if any (x,w) reaches the
+ end of a line segment then it is switched between index sets.
+ * i is added to the appropriate index set depending on what line segment
+ it hits.
+
+we restrict lo(i) <= 0 and hi(i) >= 0. this makes the algorithm a bit
+simpler, because the starting point for x(i),w(i) is always on the dotted
+line x=0 and x will only ever increase in one direction, so it can only hit
+two out of the three line segments.
+
+
+NOTES
+-----
+
+this is an implementation of "lcp_dantzig2_ldlt.m" and "lcp_dantzig_lohi.m".
+the implementation is split into an LCP problem object (btLCP) and an LCP
+driver function. most optimization occurs in the btLCP object.
+
+a naive implementation of the algorithm requires either a lot of data motion
+or a lot of permutation-array lookup, because we are constantly re-ordering
+rows and columns. to avoid this and make a more optimized algorithm, a
+non-trivial data structure is used to represent the matrix A (this is
+implemented in the fast version of the btLCP object).
+
+during execution of this algorithm, some indexes in A are clamped (set C),
+some are non-clamped (set N), and some are "don't care" (where x=0).
+A,x,b,w (and other problem vectors) are permuted such that the clamped
+indexes are first, the unclamped indexes are next, and the don't-care
+indexes are last. this permutation is recorded in the array `p'.
+initially p = 0..n-1, and as the rows and columns of A,x,b,w are swapped,
+the corresponding elements of p are swapped.
+
+because the C and N elements are grouped together in the rows of A, we can do
+lots of work with a fast dot product function. if A,x,etc were not permuted
+and we only had a permutation array, then those dot products would be much
+slower as we would have a permutation array lookup in some inner loops.
+
+A is accessed through an array of row pointers, so that element (i,j) of the
+permuted matrix is A[i][j]. this makes row swapping fast. for column swapping
+we still have to actually move the data.
+
+during execution of this algorithm we maintain an L*D*L' factorization of
+the clamped submatrix of A (call it `AC') which is the top left nC*nC
+submatrix of A. there are two ways we could arrange the rows/columns in AC.
+
+(1) AC is always permuted such that L*D*L' = AC. this causes a problem
+when a row/column is removed from C, because then all the rows/columns of A
+between the deleted index and the end of C need to be rotated downward.
+this results in a lot of data motion and slows things down.
+(2) L*D*L' is actually a factorization of a *permutation* of AC (which is
+itself a permutation of the underlying A). this is what we do - the
+permutation is recorded in the vector C. call this permutation A[C,C].
+when a row/column is removed from C, all we have to do is swap two
+rows/columns and manipulate C.
+
+*/
+
+
+#include "btDantzigLCP.h"
+
+#include <string.h>//memcpy
+
+bool s_error = false;
+
+//***************************************************************************
+// code generation parameters
+
+
+#define btLCP_FAST // use fast btLCP object
+
+// option 1 : matrix row pointers (less data copying)
+#define BTROWPTRS
+#define BTATYPE btScalar **
+#define BTAROW(i) (m_A[i])
+
+// option 2 : no matrix row pointers (slightly faster inner loops)
+//#define NOROWPTRS
+//#define BTATYPE btScalar *
+//#define BTAROW(i) (m_A+(i)*m_nskip)
+
+#define BTNUB_OPTIMIZATIONS
+
+
+
+/* solve L*X=B, with B containing 1 right hand sides.
+ * L is an n*n lower triangular matrix with ones on the diagonal.
+ * L is stored by rows and its leading dimension is lskip.
+ * B is an n*1 matrix that contains the right hand sides.
+ * B is stored by columns and its leading dimension is also lskip.
+ * B is overwritten with X.
+ * this processes blocks of 2*2.
+ * if this is in the factorizer source file, n must be a multiple of 2.
+ */
+
+static void btSolveL1_1 (const btScalar *L, btScalar *B, int n, int lskip1)
+{
+ /* declare variables - Z matrix, p and q vectors, etc */
+ btScalar Z11,m11,Z21,m21,p1,q1,p2,*ex;
+ const btScalar *ell;
+ int i,j;
+ /* compute all 2 x 1 blocks of X */
+ for (i=0; i < n; i+=2) {
+ /* compute all 2 x 1 block of X, from rows i..i+2-1 */
+ /* set the Z matrix to 0 */
+ Z11=0;
+ Z21=0;
+ ell = L + i*lskip1;
+ ex = B;
+ /* the inner loop that computes outer products and adds them to Z */
+ for (j=i-2; j >= 0; j -= 2) {
+ /* compute outer product and add it to the Z matrix */
+ p1=ell[0];
+ q1=ex[0];
+ m11 = p1 * q1;
+ p2=ell[lskip1];
+ m21 = p2 * q1;
+ Z11 += m11;
+ Z21 += m21;
+ /* compute outer product and add it to the Z matrix */
+ p1=ell[1];
+ q1=ex[1];
+ m11 = p1 * q1;
+ p2=ell[1+lskip1];
+ m21 = p2 * q1;
+ /* advance pointers */
+ ell += 2;
+ ex += 2;
+ Z11 += m11;
+ Z21 += m21;
+ /* end of inner loop */
+ }
+ /* compute left-over iterations */
+ j += 2;
+ for (; j > 0; j--) {
+ /* compute outer product and add it to the Z matrix */
+ p1=ell[0];
+ q1=ex[0];
+ m11 = p1 * q1;
+ p2=ell[lskip1];
+ m21 = p2 * q1;
+ /* advance pointers */
+ ell += 1;
+ ex += 1;
+ Z11 += m11;
+ Z21 += m21;
+ }
+ /* finish computing the X(i) block */
+ Z11 = ex[0] - Z11;
+ ex[0] = Z11;
+ p1 = ell[lskip1];
+ Z21 = ex[1] - Z21 - p1*Z11;
+ ex[1] = Z21;
+ /* end of outer loop */
+ }
+}
+
+/* solve L*X=B, with B containing 2 right hand sides.
+ * L is an n*n lower triangular matrix with ones on the diagonal.
+ * L is stored by rows and its leading dimension is lskip.
+ * B is an n*2 matrix that contains the right hand sides.
+ * B is stored by columns and its leading dimension is also lskip.
+ * B is overwritten with X.
+ * this processes blocks of 2*2.
+ * if this is in the factorizer source file, n must be a multiple of 2.
+ */
+
+static void btSolveL1_2 (const btScalar *L, btScalar *B, int n, int lskip1)
+{
+ /* declare variables - Z matrix, p and q vectors, etc */
+ btScalar Z11,m11,Z12,m12,Z21,m21,Z22,m22,p1,q1,p2,q2,*ex;
+ const btScalar *ell;
+ int i,j;
+ /* compute all 2 x 2 blocks of X */
+ for (i=0; i < n; i+=2) {
+ /* compute all 2 x 2 block of X, from rows i..i+2-1 */
+ /* set the Z matrix to 0 */
+ Z11=0;
+ Z12=0;
+ Z21=0;
+ Z22=0;
+ ell = L + i*lskip1;
+ ex = B;
+ /* the inner loop that computes outer products and adds them to Z */
+ for (j=i-2; j >= 0; j -= 2) {
+ /* compute outer product and add it to the Z matrix */
+ p1=ell[0];
+ q1=ex[0];
+ m11 = p1 * q1;
+ q2=ex[lskip1];
+ m12 = p1 * q2;
+ p2=ell[lskip1];
+ m21 = p2 * q1;
+ m22 = p2 * q2;
+ Z11 += m11;
+ Z12 += m12;
+ Z21 += m21;
+ Z22 += m22;
+ /* compute outer product and add it to the Z matrix */
+ p1=ell[1];
+ q1=ex[1];
+ m11 = p1 * q1;
+ q2=ex[1+lskip1];
+ m12 = p1 * q2;
+ p2=ell[1+lskip1];
+ m21 = p2 * q1;
+ m22 = p2 * q2;
+ /* advance pointers */
+ ell += 2;
+ ex += 2;
+ Z11 += m11;
+ Z12 += m12;
+ Z21 += m21;
+ Z22 += m22;
+ /* end of inner loop */
+ }
+ /* compute left-over iterations */
+ j += 2;
+ for (; j > 0; j--) {
+ /* compute outer product and add it to the Z matrix */
+ p1=ell[0];
+ q1=ex[0];
+ m11 = p1 * q1;
+ q2=ex[lskip1];
+ m12 = p1 * q2;
+ p2=ell[lskip1];
+ m21 = p2 * q1;
+ m22 = p2 * q2;
+ /* advance pointers */
+ ell += 1;
+ ex += 1;
+ Z11 += m11;
+ Z12 += m12;
+ Z21 += m21;
+ Z22 += m22;
+ }
+ /* finish computing the X(i) block */
+ Z11 = ex[0] - Z11;
+ ex[0] = Z11;
+ Z12 = ex[lskip1] - Z12;
+ ex[lskip1] = Z12;
+ p1 = ell[lskip1];
+ Z21 = ex[1] - Z21 - p1*Z11;
+ ex[1] = Z21;
+ Z22 = ex[1+lskip1] - Z22 - p1*Z12;
+ ex[1+lskip1] = Z22;
+ /* end of outer loop */
+ }
+}
+
+
+void btFactorLDLT (btScalar *A, btScalar *d, int n, int nskip1)
+{
+ int i,j;
+ btScalar sum,*ell,*dee,dd,p1,p2,q1,q2,Z11,m11,Z21,m21,Z22,m22;
+ if (n < 1) return;
+
+ for (i=0; i<=n-2; i += 2) {
+ /* solve L*(D*l)=a, l is scaled elements in 2 x i block at A(i,0) */
+ btSolveL1_2 (A,A+i*nskip1,i,nskip1);
+ /* scale the elements in a 2 x i block at A(i,0), and also */
+ /* compute Z = the outer product matrix that we'll need. */
+ Z11 = 0;
+ Z21 = 0;
+ Z22 = 0;
+ ell = A+i*nskip1;
+ dee = d;
+ for (j=i-6; j >= 0; j -= 6) {
+ p1 = ell[0];
+ p2 = ell[nskip1];
+ dd = dee[0];
+ q1 = p1*dd;
+ q2 = p2*dd;
+ ell[0] = q1;
+ ell[nskip1] = q2;
+ m11 = p1*q1;
+ m21 = p2*q1;
+ m22 = p2*q2;
+ Z11 += m11;
+ Z21 += m21;
+ Z22 += m22;
+ p1 = ell[1];
+ p2 = ell[1+nskip1];
+ dd = dee[1];
+ q1 = p1*dd;
+ q2 = p2*dd;
+ ell[1] = q1;
+ ell[1+nskip1] = q2;
+ m11 = p1*q1;
+ m21 = p2*q1;
+ m22 = p2*q2;
+ Z11 += m11;
+ Z21 += m21;
+ Z22 += m22;
+ p1 = ell[2];
+ p2 = ell[2+nskip1];
+ dd = dee[2];
+ q1 = p1*dd;
+ q2 = p2*dd;
+ ell[2] = q1;
+ ell[2+nskip1] = q2;
+ m11 = p1*q1;
+ m21 = p2*q1;
+ m22 = p2*q2;
+ Z11 += m11;
+ Z21 += m21;
+ Z22 += m22;
+ p1 = ell[3];
+ p2 = ell[3+nskip1];
+ dd = dee[3];
+ q1 = p1*dd;
+ q2 = p2*dd;
+ ell[3] = q1;
+ ell[3+nskip1] = q2;
+ m11 = p1*q1;
+ m21 = p2*q1;
+ m22 = p2*q2;
+ Z11 += m11;
+ Z21 += m21;
+ Z22 += m22;
+ p1 = ell[4];
+ p2 = ell[4+nskip1];
+ dd = dee[4];
+ q1 = p1*dd;
+ q2 = p2*dd;
+ ell[4] = q1;
+ ell[4+nskip1] = q2;
+ m11 = p1*q1;
+ m21 = p2*q1;
+ m22 = p2*q2;
+ Z11 += m11;
+ Z21 += m21;
+ Z22 += m22;
+ p1 = ell[5];
+ p2 = ell[5+nskip1];
+ dd = dee[5];
+ q1 = p1*dd;
+ q2 = p2*dd;
+ ell[5] = q1;
+ ell[5+nskip1] = q2;
+ m11 = p1*q1;
+ m21 = p2*q1;
+ m22 = p2*q2;
+ Z11 += m11;
+ Z21 += m21;
+ Z22 += m22;
+ ell += 6;
+ dee += 6;
+ }
+ /* compute left-over iterations */
+ j += 6;
+ for (; j > 0; j--) {
+ p1 = ell[0];
+ p2 = ell[nskip1];
+ dd = dee[0];
+ q1 = p1*dd;
+ q2 = p2*dd;
+ ell[0] = q1;
+ ell[nskip1] = q2;
+ m11 = p1*q1;
+ m21 = p2*q1;
+ m22 = p2*q2;
+ Z11 += m11;
+ Z21 += m21;
+ Z22 += m22;
+ ell++;
+ dee++;
+ }
+ /* solve for diagonal 2 x 2 block at A(i,i) */
+ Z11 = ell[0] - Z11;
+ Z21 = ell[nskip1] - Z21;
+ Z22 = ell[1+nskip1] - Z22;
+ dee = d + i;
+ /* factorize 2 x 2 block Z,dee */
+ /* factorize row 1 */
+ dee[0] = btRecip(Z11);
+ /* factorize row 2 */
+ sum = 0;
+ q1 = Z21;
+ q2 = q1 * dee[0];
+ Z21 = q2;
+ sum += q1*q2;
+ dee[1] = btRecip(Z22 - sum);
+ /* done factorizing 2 x 2 block */
+ ell[nskip1] = Z21;
+ }
+ /* compute the (less than 2) rows at the bottom */
+ switch (n-i) {
+ case 0:
+ break;
+
+ case 1:
+ btSolveL1_1 (A,A+i*nskip1,i,nskip1);
+ /* scale the elements in a 1 x i block at A(i,0), and also */
+ /* compute Z = the outer product matrix that we'll need. */
+ Z11 = 0;
+ ell = A+i*nskip1;
+ dee = d;
+ for (j=i-6; j >= 0; j -= 6) {
+ p1 = ell[0];
+ dd = dee[0];
+ q1 = p1*dd;
+ ell[0] = q1;
+ m11 = p1*q1;
+ Z11 += m11;
+ p1 = ell[1];
+ dd = dee[1];
+ q1 = p1*dd;
+ ell[1] = q1;
+ m11 = p1*q1;
+ Z11 += m11;
+ p1 = ell[2];
+ dd = dee[2];
+ q1 = p1*dd;
+ ell[2] = q1;
+ m11 = p1*q1;
+ Z11 += m11;
+ p1 = ell[3];
+ dd = dee[3];
+ q1 = p1*dd;
+ ell[3] = q1;
+ m11 = p1*q1;
+ Z11 += m11;
+ p1 = ell[4];
+ dd = dee[4];
+ q1 = p1*dd;
+ ell[4] = q1;
+ m11 = p1*q1;
+ Z11 += m11;
+ p1 = ell[5];
+ dd = dee[5];
+ q1 = p1*dd;
+ ell[5] = q1;
+ m11 = p1*q1;
+ Z11 += m11;
+ ell += 6;
+ dee += 6;
+ }
+ /* compute left-over iterations */
+ j += 6;
+ for (; j > 0; j--) {
+ p1 = ell[0];
+ dd = dee[0];
+ q1 = p1*dd;
+ ell[0] = q1;
+ m11 = p1*q1;
+ Z11 += m11;
+ ell++;
+ dee++;
+ }
+ /* solve for diagonal 1 x 1 block at A(i,i) */
+ Z11 = ell[0] - Z11;
+ dee = d + i;
+ /* factorize 1 x 1 block Z,dee */
+ /* factorize row 1 */
+ dee[0] = btRecip(Z11);
+ /* done factorizing 1 x 1 block */
+ break;
+
+ //default: *((char*)0)=0; /* this should never happen! */
+ }
+}
+
+/* solve L*X=B, with B containing 1 right hand sides.
+ * L is an n*n lower triangular matrix with ones on the diagonal.
+ * L is stored by rows and its leading dimension is lskip.
+ * B is an n*1 matrix that contains the right hand sides.
+ * B is stored by columns and its leading dimension is also lskip.
+ * B is overwritten with X.
+ * this processes blocks of 4*4.
+ * if this is in the factorizer source file, n must be a multiple of 4.
+ */
+
+void btSolveL1 (const btScalar *L, btScalar *B, int n, int lskip1)
+{
+ /* declare variables - Z matrix, p and q vectors, etc */
+ btScalar Z11,Z21,Z31,Z41,p1,q1,p2,p3,p4,*ex;
+ const btScalar *ell;
+ int lskip2,lskip3,i,j;
+ /* compute lskip values */
+ lskip2 = 2*lskip1;
+ lskip3 = 3*lskip1;
+ /* compute all 4 x 1 blocks of X */
+ for (i=0; i <= n-4; i+=4) {
+ /* compute all 4 x 1 block of X, from rows i..i+4-1 */
+ /* set the Z matrix to 0 */
+ Z11=0;
+ Z21=0;
+ Z31=0;
+ Z41=0;
+ ell = L + i*lskip1;
+ ex = B;
+ /* the inner loop that computes outer products and adds them to Z */
+ for (j=i-12; j >= 0; j -= 12) {
+ /* load p and q values */
+ p1=ell[0];
+ q1=ex[0];
+ p2=ell[lskip1];
+ p3=ell[lskip2];
+ p4=ell[lskip3];
+ /* compute outer product and add it to the Z matrix */
+ Z11 += p1 * q1;
+ Z21 += p2 * q1;
+ Z31 += p3 * q1;
+ Z41 += p4 * q1;
+ /* load p and q values */
+ p1=ell[1];
+ q1=ex[1];
+ p2=ell[1+lskip1];
+ p3=ell[1+lskip2];
+ p4=ell[1+lskip3];
+ /* compute outer product and add it to the Z matrix */
+ Z11 += p1 * q1;
+ Z21 += p2 * q1;
+ Z31 += p3 * q1;
+ Z41 += p4 * q1;
+ /* load p and q values */
+ p1=ell[2];
+ q1=ex[2];
+ p2=ell[2+lskip1];
+ p3=ell[2+lskip2];
+ p4=ell[2+lskip3];
+ /* compute outer product and add it to the Z matrix */
+ Z11 += p1 * q1;
+ Z21 += p2 * q1;
+ Z31 += p3 * q1;
+ Z41 += p4 * q1;
+ /* load p and q values */
+ p1=ell[3];
+ q1=ex[3];
+ p2=ell[3+lskip1];
+ p3=ell[3+lskip2];
+ p4=ell[3+lskip3];
+ /* compute outer product and add it to the Z matrix */
+ Z11 += p1 * q1;
+ Z21 += p2 * q1;
+ Z31 += p3 * q1;
+ Z41 += p4 * q1;
+ /* load p and q values */
+ p1=ell[4];
+ q1=ex[4];
+ p2=ell[4+lskip1];
+ p3=ell[4+lskip2];
+ p4=ell[4+lskip3];
+ /* compute outer product and add it to the Z matrix */
+ Z11 += p1 * q1;
+ Z21 += p2 * q1;
+ Z31 += p3 * q1;
+ Z41 += p4 * q1;
+ /* load p and q values */
+ p1=ell[5];
+ q1=ex[5];
+ p2=ell[5+lskip1];
+ p3=ell[5+lskip2];
+ p4=ell[5+lskip3];
+ /* compute outer product and add it to the Z matrix */
+ Z11 += p1 * q1;
+ Z21 += p2 * q1;
+ Z31 += p3 * q1;
+ Z41 += p4 * q1;
+ /* load p and q values */
+ p1=ell[6];
+ q1=ex[6];
+ p2=ell[6+lskip1];
+ p3=ell[6+lskip2];
+ p4=ell[6+lskip3];
+ /* compute outer product and add it to the Z matrix */
+ Z11 += p1 * q1;
+ Z21 += p2 * q1;
+ Z31 += p3 * q1;
+ Z41 += p4 * q1;
+ /* load p and q values */
+ p1=ell[7];
+ q1=ex[7];
+ p2=ell[7+lskip1];
+ p3=ell[7+lskip2];
+ p4=ell[7+lskip3];
+ /* compute outer product and add it to the Z matrix */
+ Z11 += p1 * q1;
+ Z21 += p2 * q1;
+ Z31 += p3 * q1;
+ Z41 += p4 * q1;
+ /* load p and q values */
+ p1=ell[8];
+ q1=ex[8];
+ p2=ell[8+lskip1];
+ p3=ell[8+lskip2];
+ p4=ell[8+lskip3];
+ /* compute outer product and add it to the Z matrix */
+ Z11 += p1 * q1;
+ Z21 += p2 * q1;
+ Z31 += p3 * q1;
+ Z41 += p4 * q1;
+ /* load p and q values */
+ p1=ell[9];
+ q1=ex[9];
+ p2=ell[9+lskip1];
+ p3=ell[9+lskip2];
+ p4=ell[9+lskip3];
+ /* compute outer product and add it to the Z matrix */
+ Z11 += p1 * q1;
+ Z21 += p2 * q1;
+ Z31 += p3 * q1;
+ Z41 += p4 * q1;
+ /* load p and q values */
+ p1=ell[10];
+ q1=ex[10];
+ p2=ell[10+lskip1];
+ p3=ell[10+lskip2];
+ p4=ell[10+lskip3];
+ /* compute outer product and add it to the Z matrix */
+ Z11 += p1 * q1;
+ Z21 += p2 * q1;
+ Z31 += p3 * q1;
+ Z41 += p4 * q1;
+ /* load p and q values */
+ p1=ell[11];
+ q1=ex[11];
+ p2=ell[11+lskip1];
+ p3=ell[11+lskip2];
+ p4=ell[11+lskip3];
+ /* compute outer product and add it to the Z matrix */
+ Z11 += p1 * q1;
+ Z21 += p2 * q1;
+ Z31 += p3 * q1;
+ Z41 += p4 * q1;
+ /* advance pointers */
+ ell += 12;
+ ex += 12;
+ /* end of inner loop */
+ }
+ /* compute left-over iterations */
+ j += 12;
+ for (; j > 0; j--) {
+ /* load p and q values */
+ p1=ell[0];
+ q1=ex[0];
+ p2=ell[lskip1];
+ p3=ell[lskip2];
+ p4=ell[lskip3];
+ /* compute outer product and add it to the Z matrix */
+ Z11 += p1 * q1;
+ Z21 += p2 * q1;
+ Z31 += p3 * q1;
+ Z41 += p4 * q1;
+ /* advance pointers */
+ ell += 1;
+ ex += 1;
+ }
+ /* finish computing the X(i) block */
+ Z11 = ex[0] - Z11;
+ ex[0] = Z11;
+ p1 = ell[lskip1];
+ Z21 = ex[1] - Z21 - p1*Z11;
+ ex[1] = Z21;
+ p1 = ell[lskip2];
+ p2 = ell[1+lskip2];
+ Z31 = ex[2] - Z31 - p1*Z11 - p2*Z21;
+ ex[2] = Z31;
+ p1 = ell[lskip3];
+ p2 = ell[1+lskip3];
+ p3 = ell[2+lskip3];
+ Z41 = ex[3] - Z41 - p1*Z11 - p2*Z21 - p3*Z31;
+ ex[3] = Z41;
+ /* end of outer loop */
+ }
+ /* compute rows at end that are not a multiple of block size */
+ for (; i < n; i++) {
+ /* compute all 1 x 1 block of X, from rows i..i+1-1 */
+ /* set the Z matrix to 0 */
+ Z11=0;
+ ell = L + i*lskip1;
+ ex = B;
+ /* the inner loop that computes outer products and adds them to Z */
+ for (j=i-12; j >= 0; j -= 12) {
+ /* load p and q values */
+ p1=ell[0];
+ q1=ex[0];
+ /* compute outer product and add it to the Z matrix */
+ Z11 += p1 * q1;
+ /* load p and q values */
+ p1=ell[1];
+ q1=ex[1];
+ /* compute outer product and add it to the Z matrix */
+ Z11 += p1 * q1;
+ /* load p and q values */
+ p1=ell[2];
+ q1=ex[2];
+ /* compute outer product and add it to the Z matrix */
+ Z11 += p1 * q1;
+ /* load p and q values */
+ p1=ell[3];
+ q1=ex[3];
+ /* compute outer product and add it to the Z matrix */
+ Z11 += p1 * q1;
+ /* load p and q values */
+ p1=ell[4];
+ q1=ex[4];
+ /* compute outer product and add it to the Z matrix */
+ Z11 += p1 * q1;
+ /* load p and q values */
+ p1=ell[5];
+ q1=ex[5];
+ /* compute outer product and add it to the Z matrix */
+ Z11 += p1 * q1;
+ /* load p and q values */
+ p1=ell[6];
+ q1=ex[6];
+ /* compute outer product and add it to the Z matrix */
+ Z11 += p1 * q1;
+ /* load p and q values */
+ p1=ell[7];
+ q1=ex[7];
+ /* compute outer product and add it to the Z matrix */
+ Z11 += p1 * q1;
+ /* load p and q values */
+ p1=ell[8];
+ q1=ex[8];
+ /* compute outer product and add it to the Z matrix */
+ Z11 += p1 * q1;
+ /* load p and q values */
+ p1=ell[9];
+ q1=ex[9];
+ /* compute outer product and add it to the Z matrix */
+ Z11 += p1 * q1;
+ /* load p and q values */
+ p1=ell[10];
+ q1=ex[10];
+ /* compute outer product and add it to the Z matrix */
+ Z11 += p1 * q1;
+ /* load p and q values */
+ p1=ell[11];
+ q1=ex[11];
+ /* compute outer product and add it to the Z matrix */
+ Z11 += p1 * q1;
+ /* advance pointers */
+ ell += 12;
+ ex += 12;
+ /* end of inner loop */
+ }
+ /* compute left-over iterations */
+ j += 12;
+ for (; j > 0; j--) {
+ /* load p and q values */
+ p1=ell[0];
+ q1=ex[0];
+ /* compute outer product and add it to the Z matrix */
+ Z11 += p1 * q1;
+ /* advance pointers */
+ ell += 1;
+ ex += 1;
+ }
+ /* finish computing the X(i) block */
+ Z11 = ex[0] - Z11;
+ ex[0] = Z11;
+ }
+}
+
+/* solve L^T * x=b, with b containing 1 right hand side.
+ * L is an n*n lower triangular matrix with ones on the diagonal.
+ * L is stored by rows and its leading dimension is lskip.
+ * b is an n*1 matrix that contains the right hand side.
+ * b is overwritten with x.
+ * this processes blocks of 4.
+ */
+
+void btSolveL1T (const btScalar *L, btScalar *B, int n, int lskip1)
+{
+ /* declare variables - Z matrix, p and q vectors, etc */
+ btScalar Z11,m11,Z21,m21,Z31,m31,Z41,m41,p1,q1,p2,p3,p4,*ex;
+ const btScalar *ell;
+ int lskip2,lskip3,i,j;
+ /* special handling for L and B because we're solving L1 *transpose* */
+ L = L + (n-1)*(lskip1+1);
+ B = B + n-1;
+ lskip1 = -lskip1;
+ /* compute lskip values */
+ lskip2 = 2*lskip1;
+ lskip3 = 3*lskip1;
+ /* compute all 4 x 1 blocks of X */
+ for (i=0; i <= n-4; i+=4) {
+ /* compute all 4 x 1 block of X, from rows i..i+4-1 */
+ /* set the Z matrix to 0 */
+ Z11=0;
+ Z21=0;
+ Z31=0;
+ Z41=0;
+ ell = L - i;
+ ex = B;
+ /* the inner loop that computes outer products and adds them to Z */
+ for (j=i-4; j >= 0; j -= 4) {
+ /* load p and q values */
+ p1=ell[0];
+ q1=ex[0];
+ p2=ell[-1];
+ p3=ell[-2];
+ p4=ell[-3];
+ /* compute outer product and add it to the Z matrix */
+ m11 = p1 * q1;
+ m21 = p2 * q1;
+ m31 = p3 * q1;
+ m41 = p4 * q1;
+ ell += lskip1;
+ Z11 += m11;
+ Z21 += m21;
+ Z31 += m31;
+ Z41 += m41;
+ /* load p and q values */
+ p1=ell[0];
+ q1=ex[-1];
+ p2=ell[-1];
+ p3=ell[-2];
+ p4=ell[-3];
+ /* compute outer product and add it to the Z matrix */
+ m11 = p1 * q1;
+ m21 = p2 * q1;
+ m31 = p3 * q1;
+ m41 = p4 * q1;
+ ell += lskip1;
+ Z11 += m11;
+ Z21 += m21;
+ Z31 += m31;
+ Z41 += m41;
+ /* load p and q values */
+ p1=ell[0];
+ q1=ex[-2];
+ p2=ell[-1];
+ p3=ell[-2];
+ p4=ell[-3];
+ /* compute outer product and add it to the Z matrix */
+ m11 = p1 * q1;
+ m21 = p2 * q1;
+ m31 = p3 * q1;
+ m41 = p4 * q1;
+ ell += lskip1;
+ Z11 += m11;
+ Z21 += m21;
+ Z31 += m31;
+ Z41 += m41;
+ /* load p and q values */
+ p1=ell[0];
+ q1=ex[-3];
+ p2=ell[-1];
+ p3=ell[-2];
+ p4=ell[-3];
+ /* compute outer product and add it to the Z matrix */
+ m11 = p1 * q1;
+ m21 = p2 * q1;
+ m31 = p3 * q1;
+ m41 = p4 * q1;
+ ell += lskip1;
+ ex -= 4;
+ Z11 += m11;
+ Z21 += m21;
+ Z31 += m31;
+ Z41 += m41;
+ /* end of inner loop */
+ }
+ /* compute left-over iterations */
+ j += 4;
+ for (; j > 0; j--) {
+ /* load p and q values */
+ p1=ell[0];
+ q1=ex[0];
+ p2=ell[-1];
+ p3=ell[-2];
+ p4=ell[-3];
+ /* compute outer product and add it to the Z matrix */
+ m11 = p1 * q1;
+ m21 = p2 * q1;
+ m31 = p3 * q1;
+ m41 = p4 * q1;
+ ell += lskip1;
+ ex -= 1;
+ Z11 += m11;
+ Z21 += m21;
+ Z31 += m31;
+ Z41 += m41;
+ }
+ /* finish computing the X(i) block */
+ Z11 = ex[0] - Z11;
+ ex[0] = Z11;
+ p1 = ell[-1];
+ Z21 = ex[-1] - Z21 - p1*Z11;
+ ex[-1] = Z21;
+ p1 = ell[-2];
+ p2 = ell[-2+lskip1];
+ Z31 = ex[-2] - Z31 - p1*Z11 - p2*Z21;
+ ex[-2] = Z31;
+ p1 = ell[-3];
+ p2 = ell[-3+lskip1];
+ p3 = ell[-3+lskip2];
+ Z41 = ex[-3] - Z41 - p1*Z11 - p2*Z21 - p3*Z31;
+ ex[-3] = Z41;
+ /* end of outer loop */
+ }
+ /* compute rows at end that are not a multiple of block size */
+ for (; i < n; i++) {
+ /* compute all 1 x 1 block of X, from rows i..i+1-1 */
+ /* set the Z matrix to 0 */
+ Z11=0;
+ ell = L - i;
+ ex = B;
+ /* the inner loop that computes outer products and adds them to Z */
+ for (j=i-4; j >= 0; j -= 4) {
+ /* load p and q values */
+ p1=ell[0];
+ q1=ex[0];
+ /* compute outer product and add it to the Z matrix */
+ m11 = p1 * q1;
+ ell += lskip1;
+ Z11 += m11;
+ /* load p and q values */
+ p1=ell[0];
+ q1=ex[-1];
+ /* compute outer product and add it to the Z matrix */
+ m11 = p1 * q1;
+ ell += lskip1;
+ Z11 += m11;
+ /* load p and q values */
+ p1=ell[0];
+ q1=ex[-2];
+ /* compute outer product and add it to the Z matrix */
+ m11 = p1 * q1;
+ ell += lskip1;
+ Z11 += m11;
+ /* load p and q values */
+ p1=ell[0];
+ q1=ex[-3];
+ /* compute outer product and add it to the Z matrix */
+ m11 = p1 * q1;
+ ell += lskip1;
+ ex -= 4;
+ Z11 += m11;
+ /* end of inner loop */
+ }
+ /* compute left-over iterations */
+ j += 4;
+ for (; j > 0; j--) {
+ /* load p and q values */
+ p1=ell[0];
+ q1=ex[0];
+ /* compute outer product and add it to the Z matrix */
+ m11 = p1 * q1;
+ ell += lskip1;
+ ex -= 1;
+ Z11 += m11;
+ }
+ /* finish computing the X(i) block */
+ Z11 = ex[0] - Z11;
+ ex[0] = Z11;
+ }
+}
+
+
+
+void btVectorScale (btScalar *a, const btScalar *d, int n)
+{
+ btAssert (a && d && n >= 0);
+ for (int i=0; i<n; i++) {
+ a[i] *= d[i];
+ }
+}
+
+void btSolveLDLT (const btScalar *L, const btScalar *d, btScalar *b, int n, int nskip)
+{
+ btAssert (L && d && b && n > 0 && nskip >= n);
+ btSolveL1 (L,b,n,nskip);
+ btVectorScale (b,d,n);
+ btSolveL1T (L,b,n,nskip);
+}
+
+
+
+//***************************************************************************
+
+// swap row/column i1 with i2 in the n*n matrix A. the leading dimension of
+// A is nskip. this only references and swaps the lower triangle.
+// if `do_fast_row_swaps' is nonzero and row pointers are being used, then
+// rows will be swapped by exchanging row pointers. otherwise the data will
+// be copied.
+
+static void btSwapRowsAndCols (BTATYPE A, int n, int i1, int i2, int nskip,
+ int do_fast_row_swaps)
+{
+ btAssert (A && n > 0 && i1 >= 0 && i2 >= 0 && i1 < n && i2 < n &&
+ nskip >= n && i1 < i2);
+
+# ifdef BTROWPTRS
+ btScalar *A_i1 = A[i1];
+ btScalar *A_i2 = A[i2];
+ for (int i=i1+1; i<i2; ++i) {
+ btScalar *A_i_i1 = A[i] + i1;
+ A_i1[i] = *A_i_i1;
+ *A_i_i1 = A_i2[i];
+ }
+ A_i1[i2] = A_i1[i1];
+ A_i1[i1] = A_i2[i1];
+ A_i2[i1] = A_i2[i2];
+ // swap rows, by swapping row pointers
+ if (do_fast_row_swaps) {
+ A[i1] = A_i2;
+ A[i2] = A_i1;
+ }
+ else {
+ // Only swap till i2 column to match A plain storage variant.
+ for (int k = 0; k <= i2; ++k) {
+ btScalar tmp = A_i1[k];
+ A_i1[k] = A_i2[k];
+ A_i2[k] = tmp;
+ }
+ }
+ // swap columns the hard way
+ for (int j=i2+1; j<n; ++j) {
+ btScalar *A_j = A[j];
+ btScalar tmp = A_j[i1];
+ A_j[i1] = A_j[i2];
+ A_j[i2] = tmp;
+ }
+# else
+ btScalar *A_i1 = A+i1*nskip;
+ btScalar *A_i2 = A+i2*nskip;
+ for (int k = 0; k < i1; ++k) {
+ btScalar tmp = A_i1[k];
+ A_i1[k] = A_i2[k];
+ A_i2[k] = tmp;
+ }
+ btScalar *A_i = A_i1 + nskip;
+ for (int i=i1+1; i<i2; A_i+=nskip, ++i) {
+ btScalar tmp = A_i2[i];
+ A_i2[i] = A_i[i1];
+ A_i[i1] = tmp;
+ }
+ {
+ btScalar tmp = A_i1[i1];
+ A_i1[i1] = A_i2[i2];
+ A_i2[i2] = tmp;
+ }
+ btScalar *A_j = A_i2 + nskip;
+ for (int j=i2+1; j<n; A_j+=nskip, ++j) {
+ btScalar tmp = A_j[i1];
+ A_j[i1] = A_j[i2];
+ A_j[i2] = tmp;
+ }
+# endif
+}
+
+
+// swap two indexes in the n*n LCP problem. i1 must be <= i2.
+
+static void btSwapProblem (BTATYPE A, btScalar *x, btScalar *b, btScalar *w, btScalar *lo,
+ btScalar *hi, int *p, bool *state, int *findex,
+ int n, int i1, int i2, int nskip,
+ int do_fast_row_swaps)
+{
+ btScalar tmpr;
+ int tmpi;
+ bool tmpb;
+ btAssert (n>0 && i1 >=0 && i2 >= 0 && i1 < n && i2 < n && nskip >= n && i1 <= i2);
+ if (i1==i2) return;
+
+ btSwapRowsAndCols (A,n,i1,i2,nskip,do_fast_row_swaps);
+
+ tmpr = x[i1];
+ x[i1] = x[i2];
+ x[i2] = tmpr;
+
+ tmpr = b[i1];
+ b[i1] = b[i2];
+ b[i2] = tmpr;
+
+ tmpr = w[i1];
+ w[i1] = w[i2];
+ w[i2] = tmpr;
+
+ tmpr = lo[i1];
+ lo[i1] = lo[i2];
+ lo[i2] = tmpr;
+
+ tmpr = hi[i1];
+ hi[i1] = hi[i2];
+ hi[i2] = tmpr;
+
+ tmpi = p[i1];
+ p[i1] = p[i2];
+ p[i2] = tmpi;
+
+ tmpb = state[i1];
+ state[i1] = state[i2];
+ state[i2] = tmpb;
+
+ if (findex) {
+ tmpi = findex[i1];
+ findex[i1] = findex[i2];
+ findex[i2] = tmpi;
+ }
+}
+
+
+
+
+//***************************************************************************
+// btLCP manipulator object. this represents an n*n LCP problem.
+//
+// two index sets C and N are kept. each set holds a subset of
+// the variable indexes 0..n-1. an index can only be in one set.
+// initially both sets are empty.
+//
+// the index set C is special: solutions to A(C,C)\A(C,i) can be generated.
+
+//***************************************************************************
+// fast implementation of btLCP. see the above definition of btLCP for
+// interface comments.
+//
+// `p' records the permutation of A,x,b,w,etc. p is initially 1:n and is
+// permuted as the other vectors/matrices are permuted.
+//
+// A,x,b,w,lo,hi,state,findex,p,c are permuted such that sets C,N have
+// contiguous indexes. the don't-care indexes follow N.
+//
+// an L*D*L' factorization is maintained of A(C,C), and whenever indexes are
+// added or removed from the set C the factorization is updated.
+// thus L*D*L'=A[C,C], i.e. a permuted top left nC*nC submatrix of A.
+// the leading dimension of the matrix L is always `nskip'.
+//
+// at the start there may be other indexes that are unbounded but are not
+// included in `nub'. btLCP will permute the matrix so that absolutely all
+// unbounded vectors are at the start. thus there may be some initial
+// permutation.
+//
+// the algorithms here assume certain patterns, particularly with respect to
+// index transfer.
+
+#ifdef btLCP_FAST
+
+struct btLCP
+{
+ const int m_n;
+ const int m_nskip;
+ int m_nub;
+ int m_nC, m_nN; // size of each index set
+ BTATYPE const m_A; // A rows
+ btScalar *const m_x, * const m_b, *const m_w, *const m_lo,* const m_hi; // permuted LCP problem data
+ btScalar *const m_L, *const m_d; // L*D*L' factorization of set C
+ btScalar *const m_Dell, *const m_ell, *const m_tmp;
+ bool *const m_state;
+ int *const m_findex, *const m_p, *const m_C;
+
+ btLCP (int _n, int _nskip, int _nub, btScalar *_Adata, btScalar *_x, btScalar *_b, btScalar *_w,
+ btScalar *_lo, btScalar *_hi, btScalar *_L, btScalar *_d,
+ btScalar *_Dell, btScalar *_ell, btScalar *_tmp,
+ bool *_state, int *_findex, int *_p, int *_C, btScalar **Arows);
+ int getNub() const { return m_nub; }
+ void transfer_i_to_C (int i);
+ void transfer_i_to_N (int i) { m_nN++; } // because we can assume C and N span 1:i-1
+ void transfer_i_from_N_to_C (int i);
+ void transfer_i_from_C_to_N (int i, btAlignedObjectArray<btScalar>& scratch);
+ int numC() const { return m_nC; }
+ int numN() const { return m_nN; }
+ int indexC (int i) const { return i; }
+ int indexN (int i) const { return i+m_nC; }
+ btScalar Aii (int i) const { return BTAROW(i)[i]; }
+ btScalar AiC_times_qC (int i, btScalar *q) const { return btLargeDot (BTAROW(i), q, m_nC); }
+ btScalar AiN_times_qN (int i, btScalar *q) const { return btLargeDot (BTAROW(i)+m_nC, q+m_nC, m_nN); }
+ void pN_equals_ANC_times_qC (btScalar *p, btScalar *q);
+ void pN_plusequals_ANi (btScalar *p, int i, int sign=1);
+ void pC_plusequals_s_times_qC (btScalar *p, btScalar s, btScalar *q);
+ void pN_plusequals_s_times_qN (btScalar *p, btScalar s, btScalar *q);
+ void solve1 (btScalar *a, int i, int dir=1, int only_transfer=0);
+ void unpermute();
+};
+
+
+btLCP::btLCP (int _n, int _nskip, int _nub, btScalar *_Adata, btScalar *_x, btScalar *_b, btScalar *_w,
+ btScalar *_lo, btScalar *_hi, btScalar *_L, btScalar *_d,
+ btScalar *_Dell, btScalar *_ell, btScalar *_tmp,
+ bool *_state, int *_findex, int *_p, int *_C, btScalar **Arows):
+ m_n(_n), m_nskip(_nskip), m_nub(_nub), m_nC(0), m_nN(0),
+# ifdef BTROWPTRS
+ m_A(Arows),
+#else
+ m_A(_Adata),
+#endif
+ m_x(_x), m_b(_b), m_w(_w), m_lo(_lo), m_hi(_hi),
+ m_L(_L), m_d(_d), m_Dell(_Dell), m_ell(_ell), m_tmp(_tmp),
+ m_state(_state), m_findex(_findex), m_p(_p), m_C(_C)
+{
+ {
+ btSetZero (m_x,m_n);
+ }
+
+ {
+# ifdef BTROWPTRS
+ // make matrix row pointers
+ btScalar *aptr = _Adata;
+ BTATYPE A = m_A;
+ const int n = m_n, nskip = m_nskip;
+ for (int k=0; k<n; aptr+=nskip, ++k) A[k] = aptr;
+# endif
+ }
+
+ {
+ int *p = m_p;
+ const int n = m_n;
+ for (int k=0; k<n; ++k) p[k]=k; // initially unpermuted
+ }
+
+ /*
+ // for testing, we can do some random swaps in the area i > nub
+ {
+ const int n = m_n;
+ const int nub = m_nub;
+ if (nub < n) {
+ for (int k=0; k<100; k++) {
+ int i1,i2;
+ do {
+ i1 = dRandInt(n-nub)+nub;
+ i2 = dRandInt(n-nub)+nub;
+ }
+ while (i1 > i2);
+ //printf ("--> %d %d\n",i1,i2);
+ btSwapProblem (m_A,m_x,m_b,m_w,m_lo,m_hi,m_p,m_state,m_findex,n,i1,i2,m_nskip,0);
+ }
+ }
+ */
+
+ // permute the problem so that *all* the unbounded variables are at the
+ // start, i.e. look for unbounded variables not included in `nub'. we can
+ // potentially push up `nub' this way and get a bigger initial factorization.
+ // note that when we swap rows/cols here we must not just swap row pointers,
+ // as the initial factorization relies on the data being all in one chunk.
+ // variables that have findex >= 0 are *not* considered to be unbounded even
+ // if lo=-inf and hi=inf - this is because these limits may change during the
+ // solution process.
+
+ {
+ int *findex = m_findex;
+ btScalar *lo = m_lo, *hi = m_hi;
+ const int n = m_n;
+ for (int k = m_nub; k<n; ++k) {
+ if (findex && findex[k] >= 0) continue;
+ if (lo[k]==-BT_INFINITY && hi[k]==BT_INFINITY) {
+ btSwapProblem (m_A,m_x,m_b,m_w,lo,hi,m_p,m_state,findex,n,m_nub,k,m_nskip,0);
+ m_nub++;
+ }
+ }
+ }
+
+ // if there are unbounded variables at the start, factorize A up to that
+ // point and solve for x. this puts all indexes 0..nub-1 into C.
+ if (m_nub > 0) {
+ const int nub = m_nub;
+ {
+ btScalar *Lrow = m_L;
+ const int nskip = m_nskip;
+ for (int j=0; j<nub; Lrow+=nskip, ++j) memcpy(Lrow,BTAROW(j),(j+1)*sizeof(btScalar));
+ }
+ btFactorLDLT (m_L,m_d,nub,m_nskip);
+ memcpy (m_x,m_b,nub*sizeof(btScalar));
+ btSolveLDLT (m_L,m_d,m_x,nub,m_nskip);
+ btSetZero (m_w,nub);
+ {
+ int *C = m_C;
+ for (int k=0; k<nub; ++k) C[k] = k;
+ }
+ m_nC = nub;
+ }
+
+ // permute the indexes > nub such that all findex variables are at the end
+ if (m_findex) {
+ const int nub = m_nub;
+ int *findex = m_findex;
+ int num_at_end = 0;
+ for (int k=m_n-1; k >= nub; k--) {
+ if (findex[k] >= 0) {
+ btSwapProblem (m_A,m_x,m_b,m_w,m_lo,m_hi,m_p,m_state,findex,m_n,k,m_n-1-num_at_end,m_nskip,1);
+ num_at_end++;
+ }
+ }
+ }
+
+ // print info about indexes
+ /*
+ {
+ const int n = m_n;
+ const int nub = m_nub;
+ for (int k=0; k<n; k++) {
+ if (k<nub) printf ("C");
+ else if (m_lo[k]==-BT_INFINITY && m_hi[k]==BT_INFINITY) printf ("c");
+ else printf (".");
+ }
+ printf ("\n");
+ }
+ */
+}
+
+
+void btLCP::transfer_i_to_C (int i)
+{
+ {
+ if (m_nC > 0) {
+ // ell,Dell were computed by solve1(). note, ell = D \ L1solve (L,A(i,C))
+ {
+ const int nC = m_nC;
+ btScalar *const Ltgt = m_L + nC*m_nskip, *ell = m_ell;
+ for (int j=0; j<nC; ++j) Ltgt[j] = ell[j];
+ }
+ const int nC = m_nC;
+ m_d[nC] = btRecip (BTAROW(i)[i] - btLargeDot(m_ell,m_Dell,nC));
+ }
+ else {
+ m_d[0] = btRecip (BTAROW(i)[i]);
+ }
+
+ btSwapProblem (m_A,m_x,m_b,m_w,m_lo,m_hi,m_p,m_state,m_findex,m_n,m_nC,i,m_nskip,1);
+
+ const int nC = m_nC;
+ m_C[nC] = nC;
+ m_nC = nC + 1; // nC value is outdated after this line
+ }
+
+}
+
+
+void btLCP::transfer_i_from_N_to_C (int i)
+{
+ {
+ if (m_nC > 0) {
+ {
+ btScalar *const aptr = BTAROW(i);
+ btScalar *Dell = m_Dell;
+ const int *C = m_C;
+# ifdef BTNUB_OPTIMIZATIONS
+ // if nub>0, initial part of aptr unpermuted
+ const int nub = m_nub;
+ int j=0;
+ for ( ; j<nub; ++j) Dell[j] = aptr[j];
+ const int nC = m_nC;
+ for ( ; j<nC; ++j) Dell[j] = aptr[C[j]];
+# else
+ const int nC = m_nC;
+ for (int j=0; j<nC; ++j) Dell[j] = aptr[C[j]];
+# endif
+ }
+ btSolveL1 (m_L,m_Dell,m_nC,m_nskip);
+ {
+ const int nC = m_nC;
+ btScalar *const Ltgt = m_L + nC*m_nskip;
+ btScalar *ell = m_ell, *Dell = m_Dell, *d = m_d;
+ for (int j=0; j<nC; ++j) Ltgt[j] = ell[j] = Dell[j] * d[j];
+ }
+ const int nC = m_nC;
+ m_d[nC] = btRecip (BTAROW(i)[i] - btLargeDot(m_ell,m_Dell,nC));
+ }
+ else {
+ m_d[0] = btRecip (BTAROW(i)[i]);
+ }
+
+ btSwapProblem (m_A,m_x,m_b,m_w,m_lo,m_hi,m_p,m_state,m_findex,m_n,m_nC,i,m_nskip,1);
+
+ const int nC = m_nC;
+ m_C[nC] = nC;
+ m_nN--;
+ m_nC = nC + 1; // nC value is outdated after this line
+ }
+
+ // @@@ TO DO LATER
+ // if we just finish here then we'll go back and re-solve for
+ // delta_x. but actually we can be more efficient and incrementally
+ // update delta_x here. but if we do this, we wont have ell and Dell
+ // to use in updating the factorization later.
+
+}
+
+void btRemoveRowCol (btScalar *A, int n, int nskip, int r)
+{
+ btAssert(A && n > 0 && nskip >= n && r >= 0 && r < n);
+ if (r >= n-1) return;
+ if (r > 0) {
+ {
+ const size_t move_size = (n-r-1)*sizeof(btScalar);
+ btScalar *Adst = A + r;
+ for (int i=0; i<r; Adst+=nskip,++i) {
+ btScalar *Asrc = Adst + 1;
+ memmove (Adst,Asrc,move_size);
+ }
+ }
+ {
+ const size_t cpy_size = r*sizeof(btScalar);
+ btScalar *Adst = A + r * nskip;
+ for (int i=r; i<(n-1); ++i) {
+ btScalar *Asrc = Adst + nskip;
+ memcpy (Adst,Asrc,cpy_size);
+ Adst = Asrc;
+ }
+ }
+ }
+ {
+ const size_t cpy_size = (n-r-1)*sizeof(btScalar);
+ btScalar *Adst = A + r * (nskip + 1);
+ for (int i=r; i<(n-1); ++i) {
+ btScalar *Asrc = Adst + (nskip + 1);
+ memcpy (Adst,Asrc,cpy_size);
+ Adst = Asrc - 1;
+ }
+ }
+}
+
+
+
+
+void btLDLTAddTL (btScalar *L, btScalar *d, const btScalar *a, int n, int nskip, btAlignedObjectArray<btScalar>& scratch)
+{
+ btAssert (L && d && a && n > 0 && nskip >= n);
+
+ if (n < 2) return;
+ scratch.resize(2*nskip);
+ btScalar *W1 = &scratch[0];
+
+ btScalar *W2 = W1 + nskip;
+
+ W1[0] = btScalar(0.0);
+ W2[0] = btScalar(0.0);
+ for (int j=1; j<n; ++j) {
+ W1[j] = W2[j] = (btScalar) (a[j] * SIMDSQRT12);
+ }
+ btScalar W11 = (btScalar) ((btScalar(0.5)*a[0]+1)*SIMDSQRT12);
+ btScalar W21 = (btScalar) ((btScalar(0.5)*a[0]-1)*SIMDSQRT12);
+
+ btScalar alpha1 = btScalar(1.0);
+ btScalar alpha2 = btScalar(1.0);
+
+ {
+ btScalar dee = d[0];
+ btScalar alphanew = alpha1 + (W11*W11)*dee;
+ btAssert(alphanew != btScalar(0.0));
+ dee /= alphanew;
+ btScalar gamma1 = W11 * dee;
+ dee *= alpha1;
+ alpha1 = alphanew;
+ alphanew = alpha2 - (W21*W21)*dee;
+ dee /= alphanew;
+ //btScalar gamma2 = W21 * dee;
+ alpha2 = alphanew;
+ btScalar k1 = btScalar(1.0) - W21*gamma1;
+ btScalar k2 = W21*gamma1*W11 - W21;
+ btScalar *ll = L + nskip;
+ for (int p=1; p<n; ll+=nskip, ++p) {
+ btScalar Wp = W1[p];
+ btScalar ell = *ll;
+ W1[p] = Wp - W11*ell;
+ W2[p] = k1*Wp + k2*ell;
+ }
+ }
+
+ btScalar *ll = L + (nskip + 1);
+ for (int j=1; j<n; ll+=nskip+1, ++j) {
+ btScalar k1 = W1[j];
+ btScalar k2 = W2[j];
+
+ btScalar dee = d[j];
+ btScalar alphanew = alpha1 + (k1*k1)*dee;
+ btAssert(alphanew != btScalar(0.0));
+ dee /= alphanew;
+ btScalar gamma1 = k1 * dee;
+ dee *= alpha1;
+ alpha1 = alphanew;
+ alphanew = alpha2 - (k2*k2)*dee;
+ dee /= alphanew;
+ btScalar gamma2 = k2 * dee;
+ dee *= alpha2;
+ d[j] = dee;
+ alpha2 = alphanew;
+
+ btScalar *l = ll + nskip;
+ for (int p=j+1; p<n; l+=nskip, ++p) {
+ btScalar ell = *l;
+ btScalar Wp = W1[p] - k1 * ell;
+ ell += gamma1 * Wp;
+ W1[p] = Wp;
+ Wp = W2[p] - k2 * ell;
+ ell -= gamma2 * Wp;
+ W2[p] = Wp;
+ *l = ell;
+ }
+ }
+}
+
+
+#define _BTGETA(i,j) (A[i][j])
+//#define _GETA(i,j) (A[(i)*nskip+(j)])
+#define BTGETA(i,j) ((i > j) ? _BTGETA(i,j) : _BTGETA(j,i))
+
+inline size_t btEstimateLDLTAddTLTmpbufSize(int nskip)
+{
+ return nskip * 2 * sizeof(btScalar);
+}
+
+
+void btLDLTRemove (btScalar **A, const int *p, btScalar *L, btScalar *d,
+ int n1, int n2, int r, int nskip, btAlignedObjectArray<btScalar>& scratch)
+{
+ btAssert(A && p && L && d && n1 > 0 && n2 > 0 && r >= 0 && r < n2 &&
+ n1 >= n2 && nskip >= n1);
+ #ifdef BT_DEBUG
+ for (int i=0; i<n2; ++i)
+ btAssert(p[i] >= 0 && p[i] < n1);
+ #endif
+
+ if (r==n2-1) {
+ return; // deleting last row/col is easy
+ }
+ else {
+ size_t LDLTAddTL_size = btEstimateLDLTAddTLTmpbufSize(nskip);
+ btAssert(LDLTAddTL_size % sizeof(btScalar) == 0);
+ scratch.resize(nskip * 2+n2);
+ btScalar *tmp = &scratch[0];
+ if (r==0) {
+ btScalar *a = (btScalar *)((char *)tmp + LDLTAddTL_size);
+ const int p_0 = p[0];
+ for (int i=0; i<n2; ++i) {
+ a[i] = -BTGETA(p[i],p_0);
+ }
+ a[0] += btScalar(1.0);
+ btLDLTAddTL (L,d,a,n2,nskip,scratch);
+ }
+ else {
+ btScalar *t = (btScalar *)((char *)tmp + LDLTAddTL_size);
+ {
+ btScalar *Lcurr = L + r*nskip;
+ for (int i=0; i<r; ++Lcurr, ++i) {
+ btAssert(d[i] != btScalar(0.0));
+ t[i] = *Lcurr / d[i];
+ }
+ }
+ btScalar *a = t + r;
+ {
+ btScalar *Lcurr = L + r*nskip;
+ const int *pp_r = p + r, p_r = *pp_r;
+ const int n2_minus_r = n2-r;
+ for (int i=0; i<n2_minus_r; Lcurr+=nskip,++i) {
+ a[i] = btLargeDot(Lcurr,t,r) - BTGETA(pp_r[i],p_r);
+ }
+ }
+ a[0] += btScalar(1.0);
+ btLDLTAddTL (L + r*nskip+r, d+r, a, n2-r, nskip, scratch);
+ }
+ }
+
+ // snip out row/column r from L and d
+ btRemoveRowCol (L,n2,nskip,r);
+ if (r < (n2-1)) memmove (d+r,d+r+1,(n2-r-1)*sizeof(btScalar));
+}
+
+
+void btLCP::transfer_i_from_C_to_N (int i, btAlignedObjectArray<btScalar>& scratch)
+{
+ {
+ int *C = m_C;
+ // remove a row/column from the factorization, and adjust the
+ // indexes (black magic!)
+ int last_idx = -1;
+ const int nC = m_nC;
+ int j = 0;
+ for ( ; j<nC; ++j) {
+ if (C[j]==nC-1) {
+ last_idx = j;
+ }
+ if (C[j]==i) {
+ btLDLTRemove (m_A,C,m_L,m_d,m_n,nC,j,m_nskip,scratch);
+ int k;
+ if (last_idx == -1) {
+ for (k=j+1 ; k<nC; ++k) {
+ if (C[k]==nC-1) {
+ break;
+ }
+ }
+ btAssert (k < nC);
+ }
+ else {
+ k = last_idx;
+ }
+ C[k] = C[j];
+ if (j < (nC-1)) memmove (C+j,C+j+1,(nC-j-1)*sizeof(int));
+ break;
+ }
+ }
+ btAssert (j < nC);
+
+ btSwapProblem (m_A,m_x,m_b,m_w,m_lo,m_hi,m_p,m_state,m_findex,m_n,i,nC-1,m_nskip,1);
+
+ m_nN++;
+ m_nC = nC - 1; // nC value is outdated after this line
+ }
+
+}
+
+
+void btLCP::pN_equals_ANC_times_qC (btScalar *p, btScalar *q)
+{
+ // we could try to make this matrix-vector multiplication faster using
+ // outer product matrix tricks, e.g. with the dMultidotX() functions.
+ // but i tried it and it actually made things slower on random 100x100
+ // problems because of the overhead involved. so we'll stick with the
+ // simple method for now.
+ const int nC = m_nC;
+ btScalar *ptgt = p + nC;
+ const int nN = m_nN;
+ for (int i=0; i<nN; ++i) {
+ ptgt[i] = btLargeDot (BTAROW(i+nC),q,nC);
+ }
+}
+
+
+void btLCP::pN_plusequals_ANi (btScalar *p, int i, int sign)
+{
+ const int nC = m_nC;
+ btScalar *aptr = BTAROW(i) + nC;
+ btScalar *ptgt = p + nC;
+ if (sign > 0) {
+ const int nN = m_nN;
+ for (int j=0; j<nN; ++j) ptgt[j] += aptr[j];
+ }
+ else {
+ const int nN = m_nN;
+ for (int j=0; j<nN; ++j) ptgt[j] -= aptr[j];
+ }
+}
+
+void btLCP::pC_plusequals_s_times_qC (btScalar *p, btScalar s, btScalar *q)
+{
+ const int nC = m_nC;
+ for (int i=0; i<nC; ++i) {
+ p[i] += s*q[i];
+ }
+}
+
+void btLCP::pN_plusequals_s_times_qN (btScalar *p, btScalar s, btScalar *q)
+{
+ const int nC = m_nC;
+ btScalar *ptgt = p + nC, *qsrc = q + nC;
+ const int nN = m_nN;
+ for (int i=0; i<nN; ++i) {
+ ptgt[i] += s*qsrc[i];
+ }
+}
+
+void btLCP::solve1 (btScalar *a, int i, int dir, int only_transfer)
+{
+ // the `Dell' and `ell' that are computed here are saved. if index i is
+ // later added to the factorization then they can be reused.
+ //
+ // @@@ question: do we need to solve for entire delta_x??? yes, but
+ // only if an x goes below 0 during the step.
+
+ if (m_nC > 0) {
+ {
+ btScalar *Dell = m_Dell;
+ int *C = m_C;
+ btScalar *aptr = BTAROW(i);
+# ifdef BTNUB_OPTIMIZATIONS
+ // if nub>0, initial part of aptr[] is guaranteed unpermuted
+ const int nub = m_nub;
+ int j=0;
+ for ( ; j<nub; ++j) Dell[j] = aptr[j];
+ const int nC = m_nC;
+ for ( ; j<nC; ++j) Dell[j] = aptr[C[j]];
+# else
+ const int nC = m_nC;
+ for (int j=0; j<nC; ++j) Dell[j] = aptr[C[j]];
+# endif
+ }
+ btSolveL1 (m_L,m_Dell,m_nC,m_nskip);
+ {
+ btScalar *ell = m_ell, *Dell = m_Dell, *d = m_d;
+ const int nC = m_nC;
+ for (int j=0; j<nC; ++j) ell[j] = Dell[j] * d[j];
+ }
+
+ if (!only_transfer) {
+ btScalar *tmp = m_tmp, *ell = m_ell;
+ {
+ const int nC = m_nC;
+ for (int j=0; j<nC; ++j) tmp[j] = ell[j];
+ }
+ btSolveL1T (m_L,tmp,m_nC,m_nskip);
+ if (dir > 0) {
+ int *C = m_C;
+ btScalar *tmp = m_tmp;
+ const int nC = m_nC;
+ for (int j=0; j<nC; ++j) a[C[j]] = -tmp[j];
+ } else {
+ int *C = m_C;
+ btScalar *tmp = m_tmp;
+ const int nC = m_nC;
+ for (int j=0; j<nC; ++j) a[C[j]] = tmp[j];
+ }
+ }
+ }
+}
+
+
+void btLCP::unpermute()
+{
+ // now we have to un-permute x and w
+ {
+ memcpy (m_tmp,m_x,m_n*sizeof(btScalar));
+ btScalar *x = m_x, *tmp = m_tmp;
+ const int *p = m_p;
+ const int n = m_n;
+ for (int j=0; j<n; ++j) x[p[j]] = tmp[j];
+ }
+ {
+ memcpy (m_tmp,m_w,m_n*sizeof(btScalar));
+ btScalar *w = m_w, *tmp = m_tmp;
+ const int *p = m_p;
+ const int n = m_n;
+ for (int j=0; j<n; ++j) w[p[j]] = tmp[j];
+ }
+}
+
+#endif // btLCP_FAST
+
+
+//***************************************************************************
+// an optimized Dantzig LCP driver routine for the lo-hi LCP problem.
+
+bool btSolveDantzigLCP (int n, btScalar *A, btScalar *x, btScalar *b,
+ btScalar* outer_w, int nub, btScalar *lo, btScalar *hi, int *findex, btDantzigScratchMemory& scratchMem)
+{
+ s_error = false;
+
+// printf("btSolveDantzigLCP n=%d\n",n);
+ btAssert (n>0 && A && x && b && lo && hi && nub >= 0 && nub <= n);
+ btAssert(outer_w);
+
+#ifdef BT_DEBUG
+ {
+ // check restrictions on lo and hi
+ for (int k=0; k<n; ++k)
+ btAssert (lo[k] <= 0 && hi[k] >= 0);
+ }
+# endif
+
+
+ // if all the variables are unbounded then we can just factor, solve,
+ // and return
+ if (nub >= n)
+ {
+
+
+ int nskip = (n);
+ btFactorLDLT (A, outer_w, n, nskip);
+ btSolveLDLT (A, outer_w, b, n, nskip);
+ memcpy (x, b, n*sizeof(btScalar));
+
+ return !s_error;
+ }
+
+ const int nskip = (n);
+ scratchMem.L.resize(n*nskip);
+
+ scratchMem.d.resize(n);
+
+ btScalar *w = outer_w;
+ scratchMem.delta_w.resize(n);
+ scratchMem.delta_x.resize(n);
+ scratchMem.Dell.resize(n);
+ scratchMem.ell.resize(n);
+ scratchMem.Arows.resize(n);
+ scratchMem.p.resize(n);
+ scratchMem.C.resize(n);
+
+ // for i in N, state[i] is 0 if x(i)==lo(i) or 1 if x(i)==hi(i)
+ scratchMem.state.resize(n);
+
+
+ // create LCP object. note that tmp is set to delta_w to save space, this
+ // optimization relies on knowledge of how tmp is used, so be careful!
+ btLCP lcp(n,nskip,nub,A,x,b,w,lo,hi,&scratchMem.L[0],&scratchMem.d[0],&scratchMem.Dell[0],&scratchMem.ell[0],&scratchMem.delta_w[0],&scratchMem.state[0],findex,&scratchMem.p[0],&scratchMem.C[0],&scratchMem.Arows[0]);
+ int adj_nub = lcp.getNub();
+
+ // loop over all indexes adj_nub..n-1. for index i, if x(i),w(i) satisfy the
+ // LCP conditions then i is added to the appropriate index set. otherwise
+ // x(i),w(i) is driven either +ve or -ve to force it to the valid region.
+ // as we drive x(i), x(C) is also adjusted to keep w(C) at zero.
+ // while driving x(i) we maintain the LCP conditions on the other variables
+ // 0..i-1. we do this by watching out for other x(i),w(i) values going
+ // outside the valid region, and then switching them between index sets
+ // when that happens.
+
+ bool hit_first_friction_index = false;
+ for (int i=adj_nub; i<n; ++i)
+ {
+ s_error = false;
+ // the index i is the driving index and indexes i+1..n-1 are "dont care",
+ // i.e. when we make changes to the system those x's will be zero and we
+ // don't care what happens to those w's. in other words, we only consider
+ // an (i+1)*(i+1) sub-problem of A*x=b+w.
+
+ // if we've hit the first friction index, we have to compute the lo and
+ // hi values based on the values of x already computed. we have been
+ // permuting the indexes, so the values stored in the findex vector are
+ // no longer valid. thus we have to temporarily unpermute the x vector.
+ // for the purposes of this computation, 0*infinity = 0 ... so if the
+ // contact constraint's normal force is 0, there should be no tangential
+ // force applied.
+
+ if (!hit_first_friction_index && findex && findex[i] >= 0) {
+ // un-permute x into delta_w, which is not being used at the moment
+ for (int j=0; j<n; ++j) scratchMem.delta_w[scratchMem.p[j]] = x[j];
+
+ // set lo and hi values
+ for (int k=i; k<n; ++k) {
+ btScalar wfk = scratchMem.delta_w[findex[k]];
+ if (wfk == 0) {
+ hi[k] = 0;
+ lo[k] = 0;
+ }
+ else {
+ hi[k] = btFabs (hi[k] * wfk);
+ lo[k] = -hi[k];
+ }
+ }
+ hit_first_friction_index = true;
+ }
+
+ // thus far we have not even been computing the w values for indexes
+ // greater than i, so compute w[i] now.
+ w[i] = lcp.AiC_times_qC (i,x) + lcp.AiN_times_qN (i,x) - b[i];
+
+ // if lo=hi=0 (which can happen for tangential friction when normals are
+ // 0) then the index will be assigned to set N with some state. however,
+ // set C's line has zero size, so the index will always remain in set N.
+ // with the "normal" switching logic, if w changed sign then the index
+ // would have to switch to set C and then back to set N with an inverted
+ // state. this is pointless, and also computationally expensive. to
+ // prevent this from happening, we use the rule that indexes with lo=hi=0
+ // will never be checked for set changes. this means that the state for
+ // these indexes may be incorrect, but that doesn't matter.
+
+ // see if x(i),w(i) is in a valid region
+ if (lo[i]==0 && w[i] >= 0) {
+ lcp.transfer_i_to_N (i);
+ scratchMem.state[i] = false;
+ }
+ else if (hi[i]==0 && w[i] <= 0) {
+ lcp.transfer_i_to_N (i);
+ scratchMem.state[i] = true;
+ }
+ else if (w[i]==0) {
+ // this is a degenerate case. by the time we get to this test we know
+ // that lo != 0, which means that lo < 0 as lo is not allowed to be +ve,
+ // and similarly that hi > 0. this means that the line segment
+ // corresponding to set C is at least finite in extent, and we are on it.
+ // NOTE: we must call lcp.solve1() before lcp.transfer_i_to_C()
+ lcp.solve1 (&scratchMem.delta_x[0],i,0,1);
+
+ lcp.transfer_i_to_C (i);
+ }
+ else {
+ // we must push x(i) and w(i)
+ for (;;) {
+ int dir;
+ btScalar dirf;
+ // find direction to push on x(i)
+ if (w[i] <= 0) {
+ dir = 1;
+ dirf = btScalar(1.0);
+ }
+ else {
+ dir = -1;
+ dirf = btScalar(-1.0);
+ }
+
+ // compute: delta_x(C) = -dir*A(C,C)\A(C,i)
+ lcp.solve1 (&scratchMem.delta_x[0],i,dir);
+
+ // note that delta_x[i] = dirf, but we wont bother to set it
+
+ // compute: delta_w = A*delta_x ... note we only care about
+ // delta_w(N) and delta_w(i), the rest is ignored
+ lcp.pN_equals_ANC_times_qC (&scratchMem.delta_w[0],&scratchMem.delta_x[0]);
+ lcp.pN_plusequals_ANi (&scratchMem.delta_w[0],i,dir);
+ scratchMem.delta_w[i] = lcp.AiC_times_qC (i,&scratchMem.delta_x[0]) + lcp.Aii(i)*dirf;
+
+ // find largest step we can take (size=s), either to drive x(i),w(i)
+ // to the valid LCP region or to drive an already-valid variable
+ // outside the valid region.
+
+ int cmd = 1; // index switching command
+ int si = 0; // si = index to switch if cmd>3
+ btScalar s = -w[i]/scratchMem.delta_w[i];
+ if (dir > 0) {
+ if (hi[i] < BT_INFINITY) {
+ btScalar s2 = (hi[i]-x[i])*dirf; // was (hi[i]-x[i])/dirf // step to x(i)=hi(i)
+ if (s2 < s) {
+ s = s2;
+ cmd = 3;
+ }
+ }
+ }
+ else {
+ if (lo[i] > -BT_INFINITY) {
+ btScalar s2 = (lo[i]-x[i])*dirf; // was (lo[i]-x[i])/dirf // step to x(i)=lo(i)
+ if (s2 < s) {
+ s = s2;
+ cmd = 2;
+ }
+ }
+ }
+
+ {
+ const int numN = lcp.numN();
+ for (int k=0; k < numN; ++k) {
+ const int indexN_k = lcp.indexN(k);
+ if (!scratchMem.state[indexN_k] ? scratchMem.delta_w[indexN_k] < 0 : scratchMem.delta_w[indexN_k] > 0) {
+ // don't bother checking if lo=hi=0
+ if (lo[indexN_k] == 0 && hi[indexN_k] == 0) continue;
+ btScalar s2 = -w[indexN_k] / scratchMem.delta_w[indexN_k];
+ if (s2 < s) {
+ s = s2;
+ cmd = 4;
+ si = indexN_k;
+ }
+ }
+ }
+ }
+
+ {
+ const int numC = lcp.numC();
+ for (int k=adj_nub; k < numC; ++k) {
+ const int indexC_k = lcp.indexC(k);
+ if (scratchMem.delta_x[indexC_k] < 0 && lo[indexC_k] > -BT_INFINITY) {
+ btScalar s2 = (lo[indexC_k]-x[indexC_k]) / scratchMem.delta_x[indexC_k];
+ if (s2 < s) {
+ s = s2;
+ cmd = 5;
+ si = indexC_k;
+ }
+ }
+ if (scratchMem.delta_x[indexC_k] > 0 && hi[indexC_k] < BT_INFINITY) {
+ btScalar s2 = (hi[indexC_k]-x[indexC_k]) / scratchMem.delta_x[indexC_k];
+ if (s2 < s) {
+ s = s2;
+ cmd = 6;
+ si = indexC_k;
+ }
+ }
+ }
+ }
+
+ //static char* cmdstring[8] = {0,"->C","->NL","->NH","N->C",
+ // "C->NL","C->NH"};
+ //printf ("cmd=%d (%s), si=%d\n",cmd,cmdstring[cmd],(cmd>3) ? si : i);
+
+ // if s <= 0 then we've got a problem. if we just keep going then
+ // we're going to get stuck in an infinite loop. instead, just cross
+ // our fingers and exit with the current solution.
+ if (s <= btScalar(0.0))
+ {
+// printf("LCP internal error, s <= 0 (s=%.4e)",(double)s);
+ if (i < n) {
+ btSetZero (x+i,n-i);
+ btSetZero (w+i,n-i);
+ }
+ s_error = true;
+ break;
+ }
+
+ // apply x = x + s * delta_x
+ lcp.pC_plusequals_s_times_qC (x, s, &scratchMem.delta_x[0]);
+ x[i] += s * dirf;
+
+ // apply w = w + s * delta_w
+ lcp.pN_plusequals_s_times_qN (w, s, &scratchMem.delta_w[0]);
+ w[i] += s * scratchMem.delta_w[i];
+
+// void *tmpbuf;
+ // switch indexes between sets if necessary
+ switch (cmd) {
+ case 1: // done
+ w[i] = 0;
+ lcp.transfer_i_to_C (i);
+ break;
+ case 2: // done
+ x[i] = lo[i];
+ scratchMem.state[i] = false;
+ lcp.transfer_i_to_N (i);
+ break;
+ case 3: // done
+ x[i] = hi[i];
+ scratchMem.state[i] = true;
+ lcp.transfer_i_to_N (i);
+ break;
+ case 4: // keep going
+ w[si] = 0;
+ lcp.transfer_i_from_N_to_C (si);
+ break;
+ case 5: // keep going
+ x[si] = lo[si];
+ scratchMem.state[si] = false;
+ lcp.transfer_i_from_C_to_N (si, scratchMem.m_scratch);
+ break;
+ case 6: // keep going
+ x[si] = hi[si];
+ scratchMem.state[si] = true;
+ lcp.transfer_i_from_C_to_N (si, scratchMem.m_scratch);
+ break;
+ }
+
+ if (cmd <= 3) break;
+ } // for (;;)
+ } // else
+
+ if (s_error)
+ {
+ break;
+ }
+ } // for (int i=adj_nub; i<n; ++i)
+
+ lcp.unpermute();
+
+
+ return !s_error;
+}
+
diff --git a/extern/bullet2/src/BulletDynamics/MLCPSolvers/btDantzigLCP.h b/extern/bullet2/src/BulletDynamics/MLCPSolvers/btDantzigLCP.h
new file mode 100644
index 00000000000..903832770ae
--- /dev/null
+++ b/extern/bullet2/src/BulletDynamics/MLCPSolvers/btDantzigLCP.h
@@ -0,0 +1,77 @@
+/*************************************************************************
+ * *
+ * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. *
+ * All rights reserved. Email: russ@q12.org Web: www.q12.org *
+ * *
+ * This library is free software; you can redistribute it and/or *
+ * modify it under the terms of *
+ * The BSD-style license that is included with this library in *
+ * the file LICENSE-BSD.TXT. *
+ * *
+ * This library is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files *
+ * LICENSE.TXT and LICENSE-BSD.TXT for more details. *
+ * *
+ *************************************************************************/
+
+/*
+
+given (A,b,lo,hi), solve the LCP problem: A*x = b+w, where each x(i),w(i)
+satisfies one of
+ (1) x = lo, w >= 0
+ (2) x = hi, w <= 0
+ (3) lo < x < hi, w = 0
+A is a matrix of dimension n*n, everything else is a vector of size n*1.
+lo and hi can be +/- dInfinity as needed. the first `nub' variables are
+unbounded, i.e. hi and lo are assumed to be +/- dInfinity.
+
+we restrict lo(i) <= 0 and hi(i) >= 0.
+
+the original data (A,b) may be modified by this function.
+
+if the `findex' (friction index) parameter is nonzero, it points to an array
+of index values. in this case constraints that have findex[i] >= 0 are
+special. all non-special constraints are solved for, then the lo and hi values
+for the special constraints are set:
+ hi[i] = abs( hi[i] * x[findex[i]] )
+ lo[i] = -hi[i]
+and the solution continues. this mechanism allows a friction approximation
+to be implemented. the first `nub' variables are assumed to have findex < 0.
+
+*/
+
+
+#ifndef _BT_LCP_H_
+#define _BT_LCP_H_
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <assert.h>
+
+
+#include "LinearMath/btScalar.h"
+#include "LinearMath/btAlignedObjectArray.h"
+
+struct btDantzigScratchMemory
+{
+ btAlignedObjectArray<btScalar> m_scratch;
+ btAlignedObjectArray<btScalar> L;
+ btAlignedObjectArray<btScalar> d;
+ btAlignedObjectArray<btScalar> delta_w;
+ btAlignedObjectArray<btScalar> delta_x;
+ btAlignedObjectArray<btScalar> Dell;
+ btAlignedObjectArray<btScalar> ell;
+ btAlignedObjectArray<btScalar*> Arows;
+ btAlignedObjectArray<int> p;
+ btAlignedObjectArray<int> C;
+ btAlignedObjectArray<bool> state;
+};
+
+//return false if solving failed
+bool btSolveDantzigLCP (int n, btScalar *A, btScalar *x, btScalar *b, btScalar *w,
+ int nub, btScalar *lo, btScalar *hi, int *findex,btDantzigScratchMemory& scratch);
+
+
+
+#endif //_BT_LCP_H_
diff --git a/extern/bullet2/src/BulletDynamics/MLCPSolvers/btDantzigSolver.h b/extern/bullet2/src/BulletDynamics/MLCPSolvers/btDantzigSolver.h
new file mode 100644
index 00000000000..2a2f2d3d32d
--- /dev/null
+++ b/extern/bullet2/src/BulletDynamics/MLCPSolvers/btDantzigSolver.h
@@ -0,0 +1,112 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2013 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+///original version written by Erwin Coumans, October 2013
+
+#ifndef BT_DANTZIG_SOLVER_H
+#define BT_DANTZIG_SOLVER_H
+
+#include "btMLCPSolverInterface.h"
+#include "btDantzigLCP.h"
+
+
+class btDantzigSolver : public btMLCPSolverInterface
+{
+protected:
+
+ btScalar m_acceptableUpperLimitSolution;
+
+ btAlignedObjectArray<char> m_tempBuffer;
+
+ btAlignedObjectArray<btScalar> m_A;
+ btAlignedObjectArray<btScalar> m_b;
+ btAlignedObjectArray<btScalar> m_x;
+ btAlignedObjectArray<btScalar> m_lo;
+ btAlignedObjectArray<btScalar> m_hi;
+ btAlignedObjectArray<int> m_dependencies;
+ btDantzigScratchMemory m_scratchMemory;
+public:
+
+ btDantzigSolver()
+ :m_acceptableUpperLimitSolution(btScalar(1000))
+ {
+ }
+
+ virtual bool solveMLCP(const btMatrixXu & A, const btVectorXu & b, btVectorXu& x, const btVectorXu & lo,const btVectorXu & hi,const btAlignedObjectArray<int>& limitDependency, int numIterations, bool useSparsity = true)
+ {
+ bool result = true;
+ int n = b.rows();
+ if (n)
+ {
+ int nub = 0;
+ btAlignedObjectArray<btScalar> ww;
+ ww.resize(n);
+
+
+ const btScalar* Aptr = A.getBufferPointer();
+ m_A.resize(n*n);
+ for (int i=0;i<n*n;i++)
+ {
+ m_A[i] = Aptr[i];
+
+ }
+
+ m_b.resize(n);
+ m_x.resize(n);
+ m_lo.resize(n);
+ m_hi.resize(n);
+ m_dependencies.resize(n);
+ for (int i=0;i<n;i++)
+ {
+ m_lo[i] = lo[i];
+ m_hi[i] = hi[i];
+ m_b[i] = b[i];
+ m_x[i] = x[i];
+ m_dependencies[i] = limitDependency[i];
+ }
+
+
+ result = btSolveDantzigLCP (n,&m_A[0],&m_x[0],&m_b[0],&ww[0],nub,&m_lo[0],&m_hi[0],&m_dependencies[0],m_scratchMemory);
+ if (!result)
+ return result;
+
+// printf("numAllocas = %d\n",numAllocas);
+ for (int i=0;i<n;i++)
+ {
+ volatile btScalar xx = m_x[i];
+ if (xx != m_x[i])
+ return false;
+ if (x[i] >= m_acceptableUpperLimitSolution)
+ {
+ return false;
+ }
+
+ if (x[i] <= -m_acceptableUpperLimitSolution)
+ {
+ return false;
+ }
+ }
+
+ for (int i=0;i<n;i++)
+ {
+ x[i] = m_x[i];
+ }
+
+ }
+
+ return result;
+ }
+};
+
+#endif //BT_DANTZIG_SOLVER_H
diff --git a/extern/bullet2/src/BulletDynamics/MLCPSolvers/btMLCPSolver.cpp b/extern/bullet2/src/BulletDynamics/MLCPSolvers/btMLCPSolver.cpp
new file mode 100644
index 00000000000..8888d3961f5
--- /dev/null
+++ b/extern/bullet2/src/BulletDynamics/MLCPSolvers/btMLCPSolver.cpp
@@ -0,0 +1,626 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2013 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+///original version written by Erwin Coumans, October 2013
+
+#include "btMLCPSolver.h"
+#include "LinearMath/btMatrixX.h"
+#include "LinearMath/btQuickprof.h"
+#include "btSolveProjectedGaussSeidel.h"
+
+btMLCPSolver::btMLCPSolver( btMLCPSolverInterface* solver)
+:m_solver(solver),
+m_fallback(0)
+{
+}
+
+btMLCPSolver::~btMLCPSolver()
+{
+}
+
+bool gUseMatrixMultiply = false;
+bool interleaveContactAndFriction = false;
+
+btScalar btMLCPSolver::solveGroupCacheFriendlySetup(btCollisionObject** bodies, int numBodiesUnUsed, btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer)
+{
+ btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup( bodies, numBodiesUnUsed, manifoldPtr, numManifolds,constraints,numConstraints,infoGlobal,debugDrawer);
+
+ {
+ BT_PROFILE("gather constraint data");
+
+ int numFrictionPerContact = m_tmpSolverContactConstraintPool.size()==m_tmpSolverContactFrictionConstraintPool.size()? 1 : 2;
+
+
+ int numBodies = m_tmpSolverBodyPool.size();
+ m_allConstraintArray.resize(0);
+ m_limitDependencies.resize(m_tmpSolverNonContactConstraintPool.size()+m_tmpSolverContactConstraintPool.size()+m_tmpSolverContactFrictionConstraintPool.size());
+ btAssert(m_limitDependencies.size() == m_tmpSolverNonContactConstraintPool.size()+m_tmpSolverContactConstraintPool.size()+m_tmpSolverContactFrictionConstraintPool.size());
+ // printf("m_limitDependencies.size() = %d\n",m_limitDependencies.size());
+
+ int dindex = 0;
+ for (int i=0;i<m_tmpSolverNonContactConstraintPool.size();i++)
+ {
+ m_allConstraintArray.push_back(m_tmpSolverNonContactConstraintPool[i]);
+ m_limitDependencies[dindex++] = -1;
+ }
+
+ ///The btSequentialImpulseConstraintSolver moves all friction constraints at the very end, we can also interleave them instead
+
+ int firstContactConstraintOffset=dindex;
+
+ if (interleaveContactAndFriction)
+ {
+ for (int i=0;i<m_tmpSolverContactConstraintPool.size();i++)
+ {
+ m_allConstraintArray.push_back(m_tmpSolverContactConstraintPool[i]);
+ m_limitDependencies[dindex++] = -1;
+ m_allConstraintArray.push_back(m_tmpSolverContactFrictionConstraintPool[i*numFrictionPerContact]);
+ int findex = (m_tmpSolverContactFrictionConstraintPool[i*numFrictionPerContact].m_frictionIndex*(1+numFrictionPerContact));
+ m_limitDependencies[dindex++] = findex +firstContactConstraintOffset;
+ if (numFrictionPerContact==2)
+ {
+ m_allConstraintArray.push_back(m_tmpSolverContactFrictionConstraintPool[i*numFrictionPerContact+1]);
+ m_limitDependencies[dindex++] = findex+firstContactConstraintOffset;
+ }
+ }
+ } else
+ {
+ for (int i=0;i<m_tmpSolverContactConstraintPool.size();i++)
+ {
+ m_allConstraintArray.push_back(m_tmpSolverContactConstraintPool[i]);
+ m_limitDependencies[dindex++] = -1;
+ }
+ for (int i=0;i<m_tmpSolverContactFrictionConstraintPool.size();i++)
+ {
+ m_allConstraintArray.push_back(m_tmpSolverContactFrictionConstraintPool[i]);
+ m_limitDependencies[dindex++] = m_tmpSolverContactFrictionConstraintPool[i].m_frictionIndex+firstContactConstraintOffset;
+ }
+
+ }
+
+
+ if (!m_allConstraintArray.size())
+ {
+ m_A.resize(0,0);
+ m_b.resize(0);
+ m_x.resize(0);
+ m_lo.resize(0);
+ m_hi.resize(0);
+ return 0.f;
+ }
+ }
+
+
+ if (gUseMatrixMultiply)
+ {
+ BT_PROFILE("createMLCP");
+ createMLCP(infoGlobal);
+ }
+ else
+ {
+ BT_PROFILE("createMLCPFast");
+ createMLCPFast(infoGlobal);
+ }
+
+ return 0.f;
+}
+
+bool btMLCPSolver::solveMLCP(const btContactSolverInfo& infoGlobal)
+{
+ bool result = true;
+
+ if (m_A.rows()==0)
+ return true;
+
+ //if using split impulse, we solve 2 separate (M)LCPs
+ if (infoGlobal.m_splitImpulse)
+ {
+ btMatrixXu Acopy = m_A;
+ btAlignedObjectArray<int> limitDependenciesCopy = m_limitDependencies;
+// printf("solve first LCP\n");
+ result = m_solver->solveMLCP(m_A, m_b, m_x, m_lo,m_hi, m_limitDependencies,infoGlobal.m_numIterations );
+ if (result)
+ result = m_solver->solveMLCP(Acopy, m_bSplit, m_xSplit, m_lo,m_hi, limitDependenciesCopy,infoGlobal.m_numIterations );
+
+ } else
+ {
+ result = m_solver->solveMLCP(m_A, m_b, m_x, m_lo,m_hi, m_limitDependencies,infoGlobal.m_numIterations );
+ }
+ return result;
+}
+
+struct btJointNode
+{
+ int jointIndex; // pointer to enclosing dxJoint object
+ int otherBodyIndex; // *other* body this joint is connected to
+ int nextJointNodeIndex;//-1 for null
+ int constraintRowIndex;
+};
+
+
+
+void btMLCPSolver::createMLCPFast(const btContactSolverInfo& infoGlobal)
+{
+ int numContactRows = interleaveContactAndFriction ? 3 : 1;
+
+ int numConstraintRows = m_allConstraintArray.size();
+ int n = numConstraintRows;
+ {
+ BT_PROFILE("init b (rhs)");
+ m_b.resize(numConstraintRows);
+ m_bSplit.resize(numConstraintRows);
+ //m_b.setZero();
+ for (int i=0;i<numConstraintRows ;i++)
+ {
+ if (m_allConstraintArray[i].m_jacDiagABInv)
+ {
+ m_b[i]=m_allConstraintArray[i].m_rhs/m_allConstraintArray[i].m_jacDiagABInv;
+ m_bSplit[i] = m_allConstraintArray[i].m_rhsPenetration/m_allConstraintArray[i].m_jacDiagABInv;
+ }
+
+ }
+ }
+
+ btScalar* w = 0;
+ int nub = 0;
+
+ m_lo.resize(numConstraintRows);
+ m_hi.resize(numConstraintRows);
+
+ {
+ BT_PROFILE("init lo/ho");
+
+ for (int i=0;i<numConstraintRows;i++)
+ {
+ if (0)//m_limitDependencies[i]>=0)
+ {
+ m_lo[i] = -BT_INFINITY;
+ m_hi[i] = BT_INFINITY;
+ } else
+ {
+ m_lo[i] = m_allConstraintArray[i].m_lowerLimit;
+ m_hi[i] = m_allConstraintArray[i].m_upperLimit;
+ }
+ }
+ }
+
+ //
+ int m=m_allConstraintArray.size();
+
+ int numBodies = m_tmpSolverBodyPool.size();
+ btAlignedObjectArray<int> bodyJointNodeArray;
+ {
+ BT_PROFILE("bodyJointNodeArray.resize");
+ bodyJointNodeArray.resize(numBodies,-1);
+ }
+ btAlignedObjectArray<btJointNode> jointNodeArray;
+ {
+ BT_PROFILE("jointNodeArray.reserve");
+ jointNodeArray.reserve(2*m_allConstraintArray.size());
+ }
+
+ static btMatrixXu J3;
+ {
+ BT_PROFILE("J3.resize");
+ J3.resize(2*m,8);
+ }
+ static btMatrixXu JinvM3;
+ {
+ BT_PROFILE("JinvM3.resize/setZero");
+
+ JinvM3.resize(2*m,8);
+ JinvM3.setZero();
+ J3.setZero();
+ }
+ int cur=0;
+ int rowOffset = 0;
+ static btAlignedObjectArray<int> ofs;
+ {
+ BT_PROFILE("ofs resize");
+ ofs.resize(0);
+ ofs.resizeNoInitialize(m_allConstraintArray.size());
+ }
+ {
+ BT_PROFILE("Compute J and JinvM");
+ int c=0;
+
+ int numRows = 0;
+
+ for (int i=0;i<m_allConstraintArray.size();i+=numRows,c++)
+ {
+ ofs[c] = rowOffset;
+ int sbA = m_allConstraintArray[i].m_solverBodyIdA;
+ int sbB = m_allConstraintArray[i].m_solverBodyIdB;
+ btRigidBody* orgBodyA = m_tmpSolverBodyPool[sbA].m_originalBody;
+ btRigidBody* orgBodyB = m_tmpSolverBodyPool[sbB].m_originalBody;
+
+ numRows = i<m_tmpSolverNonContactConstraintPool.size() ? m_tmpConstraintSizesPool[c].m_numConstraintRows : numContactRows ;
+ if (orgBodyA)
+ {
+ {
+ int slotA=-1;
+ //find free jointNode slot for sbA
+ slotA =jointNodeArray.size();
+ jointNodeArray.expand();//NonInitializing();
+ int prevSlot = bodyJointNodeArray[sbA];
+ bodyJointNodeArray[sbA] = slotA;
+ jointNodeArray[slotA].nextJointNodeIndex = prevSlot;
+ jointNodeArray[slotA].jointIndex = c;
+ jointNodeArray[slotA].constraintRowIndex = i;
+ jointNodeArray[slotA].otherBodyIndex = orgBodyB ? sbB : -1;
+ }
+ for (int row=0;row<numRows;row++,cur++)
+ {
+ btVector3 normalInvMass = m_allConstraintArray[i+row].m_contactNormal1 * orgBodyA->getInvMass();
+ btVector3 relPosCrossNormalInvInertia = m_allConstraintArray[i+row].m_relpos1CrossNormal * orgBodyA->getInvInertiaTensorWorld();
+
+ for (int r=0;r<3;r++)
+ {
+ J3.setElem(cur,r,m_allConstraintArray[i+row].m_contactNormal1[r]);
+ J3.setElem(cur,r+4,m_allConstraintArray[i+row].m_relpos1CrossNormal[r]);
+ JinvM3.setElem(cur,r,normalInvMass[r]);
+ JinvM3.setElem(cur,r+4,relPosCrossNormalInvInertia[r]);
+ }
+ J3.setElem(cur,3,0);
+ JinvM3.setElem(cur,3,0);
+ J3.setElem(cur,7,0);
+ JinvM3.setElem(cur,7,0);
+ }
+ } else
+ {
+ cur += numRows;
+ }
+ if (orgBodyB)
+ {
+
+ {
+ int slotB=-1;
+ //find free jointNode slot for sbA
+ slotB =jointNodeArray.size();
+ jointNodeArray.expand();//NonInitializing();
+ int prevSlot = bodyJointNodeArray[sbB];
+ bodyJointNodeArray[sbB] = slotB;
+ jointNodeArray[slotB].nextJointNodeIndex = prevSlot;
+ jointNodeArray[slotB].jointIndex = c;
+ jointNodeArray[slotB].otherBodyIndex = orgBodyA ? sbA : -1;
+ jointNodeArray[slotB].constraintRowIndex = i;
+ }
+
+ for (int row=0;row<numRows;row++,cur++)
+ {
+ btVector3 normalInvMassB = m_allConstraintArray[i+row].m_contactNormal2*orgBodyB->getInvMass();
+ btVector3 relPosInvInertiaB = m_allConstraintArray[i+row].m_relpos2CrossNormal * orgBodyB->getInvInertiaTensorWorld();
+
+ for (int r=0;r<3;r++)
+ {
+ J3.setElem(cur,r,m_allConstraintArray[i+row].m_contactNormal2[r]);
+ J3.setElem(cur,r+4,m_allConstraintArray[i+row].m_relpos2CrossNormal[r]);
+ JinvM3.setElem(cur,r,normalInvMassB[r]);
+ JinvM3.setElem(cur,r+4,relPosInvInertiaB[r]);
+ }
+ J3.setElem(cur,3,0);
+ JinvM3.setElem(cur,3,0);
+ J3.setElem(cur,7,0);
+ JinvM3.setElem(cur,7,0);
+ }
+ }
+ else
+ {
+ cur += numRows;
+ }
+ rowOffset+=numRows;
+
+ }
+
+ }
+
+
+ //compute JinvM = J*invM.
+ const btScalar* JinvM = JinvM3.getBufferPointer();
+
+ const btScalar* Jptr = J3.getBufferPointer();
+ {
+ BT_PROFILE("m_A.resize");
+ m_A.resize(n,n);
+ }
+
+ {
+ BT_PROFILE("m_A.setZero");
+ m_A.setZero();
+ }
+ int c=0;
+ {
+ int numRows = 0;
+ BT_PROFILE("Compute A");
+ for (int i=0;i<m_allConstraintArray.size();i+= numRows,c++)
+ {
+ int row__ = ofs[c];
+ int sbA = m_allConstraintArray[i].m_solverBodyIdA;
+ int sbB = m_allConstraintArray[i].m_solverBodyIdB;
+ btRigidBody* orgBodyA = m_tmpSolverBodyPool[sbA].m_originalBody;
+ btRigidBody* orgBodyB = m_tmpSolverBodyPool[sbB].m_originalBody;
+
+ numRows = i<m_tmpSolverNonContactConstraintPool.size() ? m_tmpConstraintSizesPool[c].m_numConstraintRows : numContactRows ;
+
+ const btScalar *JinvMrow = JinvM + 2*8*(size_t)row__;
+
+ {
+ int startJointNodeA = bodyJointNodeArray[sbA];
+ while (startJointNodeA>=0)
+ {
+ int j0 = jointNodeArray[startJointNodeA].jointIndex;
+ int cr0 = jointNodeArray[startJointNodeA].constraintRowIndex;
+ if (j0<c)
+ {
+
+ int numRowsOther = cr0 < m_tmpSolverNonContactConstraintPool.size() ? m_tmpConstraintSizesPool[j0].m_numConstraintRows : numContactRows;
+ size_t ofsother = (m_allConstraintArray[cr0].m_solverBodyIdB == sbA) ? 8*numRowsOther : 0;
+ //printf("%d joint i %d and j0: %d: ",count++,i,j0);
+ m_A.multiplyAdd2_p8r ( JinvMrow,
+ Jptr + 2*8*(size_t)ofs[j0] + ofsother, numRows, numRowsOther, row__,ofs[j0]);
+ }
+ startJointNodeA = jointNodeArray[startJointNodeA].nextJointNodeIndex;
+ }
+ }
+
+ {
+ int startJointNodeB = bodyJointNodeArray[sbB];
+ while (startJointNodeB>=0)
+ {
+ int j1 = jointNodeArray[startJointNodeB].jointIndex;
+ int cj1 = jointNodeArray[startJointNodeB].constraintRowIndex;
+
+ if (j1<c)
+ {
+ int numRowsOther = cj1 < m_tmpSolverNonContactConstraintPool.size() ? m_tmpConstraintSizesPool[j1].m_numConstraintRows : numContactRows;
+ size_t ofsother = (m_allConstraintArray[cj1].m_solverBodyIdB == sbB) ? 8*numRowsOther : 0;
+ m_A.multiplyAdd2_p8r ( JinvMrow + 8*(size_t)numRows,
+ Jptr + 2*8*(size_t)ofs[j1] + ofsother, numRows, numRowsOther, row__,ofs[j1]);
+ }
+ startJointNodeB = jointNodeArray[startJointNodeB].nextJointNodeIndex;
+ }
+ }
+ }
+
+ {
+ BT_PROFILE("compute diagonal");
+ // compute diagonal blocks of m_A
+
+ int row__ = 0;
+ int numJointRows = m_allConstraintArray.size();
+
+ int jj=0;
+ for (;row__<numJointRows;)
+ {
+
+ int sbA = m_allConstraintArray[row__].m_solverBodyIdA;
+ int sbB = m_allConstraintArray[row__].m_solverBodyIdB;
+ btRigidBody* orgBodyA = m_tmpSolverBodyPool[sbA].m_originalBody;
+ btRigidBody* orgBodyB = m_tmpSolverBodyPool[sbB].m_originalBody;
+
+
+ const unsigned int infom = row__ < m_tmpSolverNonContactConstraintPool.size() ? m_tmpConstraintSizesPool[jj].m_numConstraintRows : numContactRows;
+
+ const btScalar *JinvMrow = JinvM + 2*8*(size_t)row__;
+ const btScalar *Jrow = Jptr + 2*8*(size_t)row__;
+ m_A.multiply2_p8r (JinvMrow, Jrow, infom, infom, row__,row__);
+ if (orgBodyB)
+ {
+ m_A.multiplyAdd2_p8r (JinvMrow + 8*(size_t)infom, Jrow + 8*(size_t)infom, infom, infom, row__,row__);
+ }
+ row__ += infom;
+ jj++;
+ }
+ }
+ }
+
+ ///todo: use proper cfm values from the constraints (getInfo2)
+ if (1)
+ {
+ // add cfm to the diagonal of m_A
+ for ( int i=0; i<m_A.rows(); ++i)
+ {
+ float cfm = 0.00001f;
+ m_A.setElem(i,i,m_A(i,i)+ cfm / infoGlobal.m_timeStep);
+ }
+ }
+
+ ///fill the upper triangle of the matrix, to make it symmetric
+ {
+ BT_PROFILE("fill the upper triangle ");
+ m_A.copyLowerToUpperTriangle();
+ }
+
+ {
+ BT_PROFILE("resize/init x");
+ m_x.resize(numConstraintRows);
+ m_xSplit.resize(numConstraintRows);
+
+ if (infoGlobal.m_solverMode&SOLVER_USE_WARMSTARTING)
+ {
+ for (int i=0;i<m_allConstraintArray.size();i++)
+ {
+ const btSolverConstraint& c = m_allConstraintArray[i];
+ m_x[i]=c.m_appliedImpulse;
+ m_xSplit[i] = c.m_appliedPushImpulse;
+ }
+ } else
+ {
+ m_x.setZero();
+ m_xSplit.setZero();
+ }
+ }
+
+}
+
+void btMLCPSolver::createMLCP(const btContactSolverInfo& infoGlobal)
+{
+ int numBodies = this->m_tmpSolverBodyPool.size();
+ int numConstraintRows = m_allConstraintArray.size();
+
+ m_b.resize(numConstraintRows);
+ if (infoGlobal.m_splitImpulse)
+ m_bSplit.resize(numConstraintRows);
+
+ for (int i=0;i<numConstraintRows ;i++)
+ {
+ if (m_allConstraintArray[i].m_jacDiagABInv)
+ {
+ m_b[i]=m_allConstraintArray[i].m_rhs/m_allConstraintArray[i].m_jacDiagABInv;
+ if (infoGlobal.m_splitImpulse)
+ m_bSplit[i] = m_allConstraintArray[i].m_rhsPenetration/m_allConstraintArray[i].m_jacDiagABInv;
+ }
+ }
+
+ static btMatrixXu Minv;
+ Minv.resize(6*numBodies,6*numBodies);
+ Minv.setZero();
+ for (int i=0;i<numBodies;i++)
+ {
+ const btSolverBody& rb = m_tmpSolverBodyPool[i];
+ const btVector3& invMass = rb.m_invMass;
+ setElem(Minv,i*6+0,i*6+0,invMass[0]);
+ setElem(Minv,i*6+1,i*6+1,invMass[1]);
+ setElem(Minv,i*6+2,i*6+2,invMass[2]);
+ btRigidBody* orgBody = m_tmpSolverBodyPool[i].m_originalBody;
+
+ for (int r=0;r<3;r++)
+ for (int c=0;c<3;c++)
+ setElem(Minv,i*6+3+r,i*6+3+c,orgBody? orgBody->getInvInertiaTensorWorld()[r][c] : 0);
+ }
+
+ static btMatrixXu J;
+ J.resize(numConstraintRows,6*numBodies);
+ J.setZero();
+
+ m_lo.resize(numConstraintRows);
+ m_hi.resize(numConstraintRows);
+
+ for (int i=0;i<numConstraintRows;i++)
+ {
+
+ m_lo[i] = m_allConstraintArray[i].m_lowerLimit;
+ m_hi[i] = m_allConstraintArray[i].m_upperLimit;
+
+ int bodyIndex0 = m_allConstraintArray[i].m_solverBodyIdA;
+ int bodyIndex1 = m_allConstraintArray[i].m_solverBodyIdB;
+ if (m_tmpSolverBodyPool[bodyIndex0].m_originalBody)
+ {
+ setElem(J,i,6*bodyIndex0+0,m_allConstraintArray[i].m_contactNormal1[0]);
+ setElem(J,i,6*bodyIndex0+1,m_allConstraintArray[i].m_contactNormal1[1]);
+ setElem(J,i,6*bodyIndex0+2,m_allConstraintArray[i].m_contactNormal1[2]);
+ setElem(J,i,6*bodyIndex0+3,m_allConstraintArray[i].m_relpos1CrossNormal[0]);
+ setElem(J,i,6*bodyIndex0+4,m_allConstraintArray[i].m_relpos1CrossNormal[1]);
+ setElem(J,i,6*bodyIndex0+5,m_allConstraintArray[i].m_relpos1CrossNormal[2]);
+ }
+ if (m_tmpSolverBodyPool[bodyIndex1].m_originalBody)
+ {
+ setElem(J,i,6*bodyIndex1+0,m_allConstraintArray[i].m_contactNormal2[0]);
+ setElem(J,i,6*bodyIndex1+1,m_allConstraintArray[i].m_contactNormal2[1]);
+ setElem(J,i,6*bodyIndex1+2,m_allConstraintArray[i].m_contactNormal2[2]);
+ setElem(J,i,6*bodyIndex1+3,m_allConstraintArray[i].m_relpos2CrossNormal[0]);
+ setElem(J,i,6*bodyIndex1+4,m_allConstraintArray[i].m_relpos2CrossNormal[1]);
+ setElem(J,i,6*bodyIndex1+5,m_allConstraintArray[i].m_relpos2CrossNormal[2]);
+ }
+ }
+
+ static btMatrixXu J_transpose;
+ J_transpose= J.transpose();
+
+ static btMatrixXu tmp;
+
+ {
+ {
+ BT_PROFILE("J*Minv");
+ tmp = J*Minv;
+
+ }
+ {
+ BT_PROFILE("J*tmp");
+ m_A = tmp*J_transpose;
+ }
+ }
+
+ if (1)
+ {
+ ///todo: use proper cfm values from the constraints (getInfo2)
+ // add cfm to the diagonal of m_A
+ for ( int i=0; i<m_A.rows(); ++i)
+ {
+ float cfm = 0.0001f;
+ m_A.setElem(i,i,m_A(i,i)+ cfm / infoGlobal.m_timeStep);
+ }
+ }
+
+ m_x.resize(numConstraintRows);
+ if (infoGlobal.m_splitImpulse)
+ m_xSplit.resize(numConstraintRows);
+// m_x.setZero();
+
+ for (int i=0;i<m_allConstraintArray.size();i++)
+ {
+ const btSolverConstraint& c = m_allConstraintArray[i];
+ m_x[i]=c.m_appliedImpulse;
+ if (infoGlobal.m_splitImpulse)
+ m_xSplit[i] = c.m_appliedPushImpulse;
+ }
+
+}
+
+
+btScalar btMLCPSolver::solveGroupCacheFriendlyIterations(btCollisionObject** bodies ,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer)
+{
+ bool result = true;
+ {
+ BT_PROFILE("solveMLCP");
+// printf("m_A(%d,%d)\n", m_A.rows(),m_A.cols());
+ result = solveMLCP(infoGlobal);
+ }
+
+ //check if solution is valid, and otherwise fallback to btSequentialImpulseConstraintSolver::solveGroupCacheFriendlyIterations
+ if (result)
+ {
+ BT_PROFILE("process MLCP results");
+ for (int i=0;i<m_allConstraintArray.size();i++)
+ {
+ {
+ btSolverConstraint& c = m_allConstraintArray[i];
+ int sbA = c.m_solverBodyIdA;
+ int sbB = c.m_solverBodyIdB;
+ btRigidBody* orgBodyA = m_tmpSolverBodyPool[sbA].m_originalBody;
+ btRigidBody* orgBodyB = m_tmpSolverBodyPool[sbB].m_originalBody;
+
+ btSolverBody& solverBodyA = m_tmpSolverBodyPool[sbA];
+ btSolverBody& solverBodyB = m_tmpSolverBodyPool[sbB];
+
+ solverBodyA.internalApplyImpulse(c.m_contactNormal1*solverBodyA.internalGetInvMass(),c.m_angularComponentA,m_x[i]);
+ solverBodyB.internalApplyImpulse(c.m_contactNormal2*solverBodyB.internalGetInvMass(),c.m_angularComponentB,m_x[i]);
+ if (infoGlobal.m_splitImpulse)
+ {
+ solverBodyA.internalApplyPushImpulse(c.m_contactNormal1*solverBodyA.internalGetInvMass(),c.m_angularComponentA,m_xSplit[i]);
+ solverBodyB.internalApplyPushImpulse(c.m_contactNormal2*solverBodyB.internalGetInvMass(),c.m_angularComponentB,m_xSplit[i]);
+ c.m_appliedPushImpulse = m_xSplit[i];
+ }
+ c.m_appliedImpulse = m_x[i];
+ }
+ }
+ }
+ else
+ {
+ m_fallback++;
+ btSequentialImpulseConstraintSolver::solveGroupCacheFriendlyIterations(bodies ,numBodies,manifoldPtr, numManifolds,constraints,numConstraints,infoGlobal,debugDrawer);
+ }
+
+ return 0.f;
+} \ No newline at end of file
diff --git a/extern/bullet2/src/BulletDynamics/MLCPSolvers/btMLCPSolver.h b/extern/bullet2/src/BulletDynamics/MLCPSolvers/btMLCPSolver.h
new file mode 100644
index 00000000000..a5dae2d28f6
--- /dev/null
+++ b/extern/bullet2/src/BulletDynamics/MLCPSolvers/btMLCPSolver.h
@@ -0,0 +1,81 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2013 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+///original version written by Erwin Coumans, October 2013
+
+#ifndef BT_MLCP_SOLVER_H
+#define BT_MLCP_SOLVER_H
+
+#include "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h"
+#include "LinearMath/btMatrixX.h"
+#include "BulletDynamics/MLCPSolvers/btMLCPSolverInterface.h"
+
+class btMLCPSolver : public btSequentialImpulseConstraintSolver
+{
+
+protected:
+
+ btMatrixXu m_A;
+ btVectorXu m_b;
+ btVectorXu m_x;
+ btVectorXu m_lo;
+ btVectorXu m_hi;
+
+ ///when using 'split impulse' we solve two separate (M)LCPs
+ btVectorXu m_bSplit;
+ btVectorXu m_xSplit;
+ btVectorXu m_bSplit1;
+ btVectorXu m_xSplit2;
+
+ btAlignedObjectArray<int> m_limitDependencies;
+ btConstraintArray m_allConstraintArray;
+ btMLCPSolverInterface* m_solver;
+ int m_fallback;
+
+ virtual btScalar solveGroupCacheFriendlySetup(btCollisionObject** bodies, int numBodies, btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer);
+ virtual btScalar solveGroupCacheFriendlyIterations(btCollisionObject** bodies ,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer);
+ virtual void createMLCP(const btContactSolverInfo& infoGlobal);
+ virtual void createMLCPFast(const btContactSolverInfo& infoGlobal);
+
+ //return true is it solves the problem successfully
+ virtual bool solveMLCP(const btContactSolverInfo& infoGlobal);
+
+public:
+
+ btMLCPSolver( btMLCPSolverInterface* solver);
+ virtual ~btMLCPSolver();
+
+ void setMLCPSolver(btMLCPSolverInterface* solver)
+ {
+ m_solver = solver;
+ }
+
+ int getNumFallbacks() const
+ {
+ return m_fallback;
+ }
+ void setNumFallbacks(int num)
+ {
+ m_fallback = num;
+ }
+
+ virtual btConstraintSolverType getSolverType() const
+ {
+ return BT_MLCP_SOLVER;
+ }
+
+};
+
+
+#endif //BT_MLCP_SOLVER_H
diff --git a/extern/bullet2/src/BulletDynamics/MLCPSolvers/btMLCPSolverInterface.h b/extern/bullet2/src/BulletDynamics/MLCPSolvers/btMLCPSolverInterface.h
new file mode 100644
index 00000000000..25bb3f6d327
--- /dev/null
+++ b/extern/bullet2/src/BulletDynamics/MLCPSolvers/btMLCPSolverInterface.h
@@ -0,0 +1,33 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2013 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+///original version written by Erwin Coumans, October 2013
+
+#ifndef BT_MLCP_SOLVER_INTERFACE_H
+#define BT_MLCP_SOLVER_INTERFACE_H
+
+#include "LinearMath/btMatrixX.h"
+
+class btMLCPSolverInterface
+{
+public:
+ virtual ~btMLCPSolverInterface()
+ {
+ }
+
+ //return true is it solves the problem successfully
+ virtual bool solveMLCP(const btMatrixXu & A, const btVectorXu & b, btVectorXu& x, const btVectorXu & lo,const btVectorXu & hi,const btAlignedObjectArray<int>& limitDependency, int numIterations, bool useSparsity = true)=0;
+};
+
+#endif //BT_MLCP_SOLVER_INTERFACE_H
diff --git a/extern/bullet2/src/BulletDynamics/MLCPSolvers/btPATHSolver.h b/extern/bullet2/src/BulletDynamics/MLCPSolvers/btPATHSolver.h
new file mode 100644
index 00000000000..9ec31a6d4e4
--- /dev/null
+++ b/extern/bullet2/src/BulletDynamics/MLCPSolvers/btPATHSolver.h
@@ -0,0 +1,151 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2013 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+///original version written by Erwin Coumans, October 2013
+
+
+#ifndef BT_PATH_SOLVER_H
+#define BT_PATH_SOLVER_H
+
+//#define BT_USE_PATH
+#ifdef BT_USE_PATH
+
+extern "C" {
+#include "PATH/SimpleLCP.h"
+#include "PATH/License.h"
+#include "PATH/Error_Interface.h"
+};
+ void __stdcall MyError(Void *data, Char *msg)
+{
+ printf("Path Error: %s\n",msg);
+}
+ void __stdcall MyWarning(Void *data, Char *msg)
+{
+ printf("Path Warning: %s\n",msg);
+}
+
+Error_Interface e;
+
+
+
+#include "btMLCPSolverInterface.h"
+#include "Dantzig/lcp.h"
+
+class btPathSolver : public btMLCPSolverInterface
+{
+public:
+
+ btPathSolver()
+ {
+ License_SetString("2069810742&Courtesy_License&&&USR&2013&14_12_2011&1000&PATH&GEN&31_12_2013&0_0_0&0&0_0");
+ e.error_data = 0;
+ e.warning = MyWarning;
+ e.error = MyError;
+ Error_SetInterface(&e);
+ }
+
+
+ virtual bool solveMLCP(const btMatrixXu & A, const btVectorXu & b, btVectorXu& x, const btVectorXu & lo,const btVectorXu & hi,const btAlignedObjectArray<int>& limitDependency, int numIterations, bool useSparsity = true)
+ {
+ MCP_Termination status;
+
+
+ int numVariables = b.rows();
+ if (0==numVariables)
+ return true;
+
+ /* - variables - the number of variables in the problem
+ - m_nnz - the number of nonzeros in the M matrix
+ - m_i - a vector of size m_nnz containing the row indices for M
+ - m_j - a vector of size m_nnz containing the column indices for M
+ - m_ij - a vector of size m_nnz containing the data for M
+ - q - a vector of size variables
+ - lb - a vector of size variables containing the lower bounds on x
+ - ub - a vector of size variables containing the upper bounds on x
+ */
+ btAlignedObjectArray<double> values;
+ btAlignedObjectArray<int> rowIndices;
+ btAlignedObjectArray<int> colIndices;
+
+ for (int i=0;i<A.rows();i++)
+ {
+ for (int j=0;j<A.cols();j++)
+ {
+ if (A(i,j)!=0.f)
+ {
+ //add 1, because Path starts at 1, instead of 0
+ rowIndices.push_back(i+1);
+ colIndices.push_back(j+1);
+ values.push_back(A(i,j));
+ }
+ }
+ }
+ int numNonZero = rowIndices.size();
+ btAlignedObjectArray<double> zResult;
+ zResult.resize(numVariables);
+ btAlignedObjectArray<double> rhs;
+ btAlignedObjectArray<double> upperBounds;
+ btAlignedObjectArray<double> lowerBounds;
+ for (int i=0;i<numVariables;i++)
+ {
+ upperBounds.push_back(hi[i]);
+ lowerBounds.push_back(lo[i]);
+ rhs.push_back(-b[i]);
+ }
+
+
+ SimpleLCP(numVariables,numNonZero,&rowIndices[0],&colIndices[0],&values[0],&rhs[0],&lowerBounds[0],&upperBounds[0], &status, &zResult[0]);
+
+ if (status != MCP_Solved)
+ {
+ static const char* gReturnMsgs[] = {
+ "Invalid return",
+ "MCP_Solved: The problem was solved",
+ "MCP_NoProgress: A stationary point was found",
+ "MCP_MajorIterationLimit: Major iteration limit met",
+ "MCP_MinorIterationLimit: Cumulative minor iteration limit met",
+ "MCP_TimeLimit: Ran out of time",
+ "MCP_UserInterrupt: Control-C, typically",
+ "MCP_BoundError: Problem has a bound error",
+ "MCP_DomainError: Could not find starting point",
+ "MCP_Infeasible: Problem has no solution",
+ "MCP_Error: An error occurred within the code",
+ "MCP_LicenseError: License could not be found",
+ "MCP_OK"
+ };
+
+ printf("ERROR: The PATH MCP solver failed: %s\n", gReturnMsgs[(unsigned int)status]);// << std::endl;
+ printf("using Projected Gauss Seidel fallback\n");
+
+ return false;
+ } else
+ {
+ for (int i=0;i<numVariables;i++)
+ {
+ x[i] = zResult[i];
+ //check for #NAN
+ if (x[i] != zResult[i])
+ return false;
+ }
+ return true;
+
+ }
+
+ }
+};
+
+#endif //BT_USE_PATH
+
+
+#endif //BT_PATH_SOLVER_H
diff --git a/extern/bullet2/src/BulletDynamics/MLCPSolvers/btSolveProjectedGaussSeidel.h b/extern/bullet2/src/BulletDynamics/MLCPSolvers/btSolveProjectedGaussSeidel.h
new file mode 100644
index 00000000000..44fbfeadddc
--- /dev/null
+++ b/extern/bullet2/src/BulletDynamics/MLCPSolvers/btSolveProjectedGaussSeidel.h
@@ -0,0 +1,80 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2013 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+///original version written by Erwin Coumans, October 2013
+
+#ifndef BT_SOLVE_PROJECTED_GAUSS_SEIDEL_H
+#define BT_SOLVE_PROJECTED_GAUSS_SEIDEL_H
+
+
+#include "btMLCPSolverInterface.h"
+
+class btSolveProjectedGaussSeidel : public btMLCPSolverInterface
+{
+public:
+ virtual bool solveMLCP(const btMatrixXu & A, const btVectorXu & b, btVectorXu& x, const btVectorXu & lo,const btVectorXu & hi,const btAlignedObjectArray<int>& limitDependency, int numIterations, bool useSparsity = true)
+ {
+ //A is a m-n matrix, m rows, n columns
+ btAssert(A.rows() == b.rows());
+
+ int i, j, numRows = A.rows();
+
+ float delta;
+
+ for (int k = 0; k <numIterations; k++)
+ {
+ for (i = 0; i <numRows; i++)
+ {
+ delta = 0.0f;
+ if (useSparsity)
+ {
+ for (int h=0;h<A.m_rowNonZeroElements1[i].size();h++)
+ {
+ int j = A.m_rowNonZeroElements1[i][h];
+ if (j != i)//skip main diagonal
+ {
+ delta += A(i,j) * x[j];
+ }
+ }
+ } else
+ {
+ for (j = 0; j <i; j++)
+ delta += A(i,j) * x[j];
+ for (j = i+1; j<numRows; j++)
+ delta += A(i,j) * x[j];
+ }
+
+ float aDiag = A(i,i);
+ x [i] = (b [i] - delta) / A(i,i);
+ float s = 1.f;
+
+ if (limitDependency[i]>=0)
+ {
+ s = x[limitDependency[i]];
+ if (s<0)
+ s=1;
+ }
+
+ if (x[i]<lo[i]*s)
+ x[i]=lo[i]*s;
+ if (x[i]>hi[i]*s)
+ x[i]=hi[i]*s;
+ }
+ }
+ return true;
+ }
+
+};
+
+#endif //BT_SOLVE_PROJECTED_GAUSS_SEIDEL_H
diff --git a/extern/bullet2/src/BulletSoftBody/btSoftBody.cpp b/extern/bullet2/src/BulletSoftBody/btSoftBody.cpp
index e8c8fdb6402..9429d56e05a 100644
--- a/extern/bullet2/src/BulletSoftBody/btSoftBody.cpp
+++ b/extern/bullet2/src/BulletSoftBody/btSoftBody.cpp
@@ -1767,7 +1767,23 @@ void btSoftBody::predictMotion(btScalar dt)
{
Node& n=m_nodes[i];
n.m_q = n.m_x;
- n.m_v += n.m_f*n.m_im*m_sst.sdt;
+ btVector3 deltaV = n.m_f*n.m_im*m_sst.sdt;
+ {
+ btScalar maxDisplacement = m_worldInfo->m_maxDisplacement;
+ btScalar clampDeltaV = maxDisplacement/m_sst.sdt;
+ for (int c=0;c<3;c++)
+ {
+ if (deltaV[c]>clampDeltaV)
+ {
+ deltaV[c] = clampDeltaV;
+ }
+ if (deltaV[c]<-clampDeltaV)
+ {
+ deltaV[c]=-clampDeltaV;
+ }
+ }
+ }
+ n.m_v += deltaV;
n.m_x += n.m_v*m_sst.sdt;
n.m_f = btVector3(0,0,0);
}
diff --git a/extern/bullet2/src/BulletSoftBody/btSoftBody.h b/extern/bullet2/src/BulletSoftBody/btSoftBody.h
index 2116c34f06d..ee1a3d95228 100644
--- a/extern/bullet2/src/BulletSoftBody/btSoftBody.h
+++ b/extern/bullet2/src/BulletSoftBody/btSoftBody.h
@@ -45,6 +45,7 @@ struct btSoftBodyWorldInfo
btScalar air_density;
btScalar water_density;
btScalar water_offset;
+ btScalar m_maxDisplacement;
btVector3 water_normal;
btBroadphaseInterface* m_broadphase;
btDispatcher* m_dispatcher;
@@ -55,6 +56,7 @@ struct btSoftBodyWorldInfo
:air_density((btScalar)1.2),
water_density(0),
water_offset(0),
+ m_maxDisplacement(1000.f),//avoid soft body from 'exploding' so use some upper threshold of maximum motion that a node can travel per frame
water_normal(0,0,0),
m_broadphase(0),
m_dispatcher(0),
diff --git a/extern/bullet2/src/BulletSoftBody/btSoftBodyHelpers.cpp b/extern/bullet2/src/BulletSoftBody/btSoftBodyHelpers.cpp
index 0fb3560e94c..36f675a6c0c 100644
--- a/extern/bullet2/src/BulletSoftBody/btSoftBodyHelpers.cpp
+++ b/extern/bullet2/src/BulletSoftBody/btSoftBodyHelpers.cpp
@@ -911,9 +911,9 @@ btSoftBody* btSoftBodyHelpers::CreateFromConvexHull(btSoftBodyWorldInfo& worldI
&hres.m_OutputVertices[0],0);
for(int i=0;i<(int)hres.mNumFaces;++i)
{
- const int idx[]={ hres.m_Indices[i*3+0],
- hres.m_Indices[i*3+1],
- hres.m_Indices[i*3+2]};
+ const int idx[]={ static_cast<int>(hres.m_Indices[i*3+0]),
+ static_cast<int>(hres.m_Indices[i*3+1]),
+ static_cast<int>(hres.m_Indices[i*3+2])};
if(idx[0]<idx[1]) psb->appendLink( idx[0],idx[1]);
if(idx[1]<idx[2]) psb->appendLink( idx[1],idx[2]);
if(idx[2]<idx[0]) psb->appendLink( idx[2],idx[0]);
diff --git a/extern/bullet2/src/BulletSoftBody/btSparseSDF.h b/extern/bullet2/src/BulletSoftBody/btSparseSDF.h
index 180e3c218cc..bcf0c798253 100644
--- a/extern/bullet2/src/BulletSoftBody/btSparseSDF.h
+++ b/extern/bullet2/src/BulletSoftBody/btSparseSDF.h
@@ -69,6 +69,7 @@ struct btSparseSdf
btScalar voxelsz;
int puid;
int ncells;
+ int m_clampCells;
int nprobes;
int nqueries;
@@ -77,10 +78,13 @@ struct btSparseSdf
//
//
- void Initialize(int hashsize=2383)
+ void Initialize(int hashsize=2383, int clampCells = 256*1024)
{
+ //avoid a crash due to running out of memory, so clamp the maximum number of cells allocated
+ //if this limit is reached, the SDF is reset (at the cost of some performance during the reset)
+ m_clampCells = clampCells;
cells.resize(hashsize,0);
- Reset();
+ Reset();
}
//
void Reset()
@@ -181,6 +185,15 @@ struct btSparseSdf
{
++nprobes;
++ncells;
+ int sz = sizeof(Cell);
+ if (ncells>m_clampCells)
+ {
+ static int numResets=0;
+ numResets++;
+// printf("numResets=%d\n",numResets);
+ Reset();
+ }
+
c=new Cell();
c->next=root;root=c;
c->pclient=shape;
diff --git a/extern/bullet2/src/LinearMath/btIDebugDraw.h b/extern/bullet2/src/LinearMath/btIDebugDraw.h
index a00d7763a75..de97c3f87fd 100644
--- a/extern/bullet2/src/LinearMath/btIDebugDraw.h
+++ b/extern/bullet2/src/LinearMath/btIDebugDraw.h
@@ -62,29 +62,17 @@ class btIDebugDraw
virtual void drawSphere(btScalar radius, const btTransform& transform, const btVector3& color)
{
- btVector3 start = transform.getOrigin();
-
- const btVector3 xoffs = transform.getBasis() * btVector3(radius,0,0);
- const btVector3 yoffs = transform.getBasis() * btVector3(0,radius,0);
- const btVector3 zoffs = transform.getBasis() * btVector3(0,0,radius);
-
- // XY
- drawLine(start-xoffs, start+yoffs, color);
- drawLine(start+yoffs, start+xoffs, color);
- drawLine(start+xoffs, start-yoffs, color);
- drawLine(start-yoffs, start-xoffs, color);
-
- // XZ
- drawLine(start-xoffs, start+zoffs, color);
- drawLine(start+zoffs, start+xoffs, color);
- drawLine(start+xoffs, start-zoffs, color);
- drawLine(start-zoffs, start-xoffs, color);
-
- // YZ
- drawLine(start-yoffs, start+zoffs, color);
- drawLine(start+zoffs, start+yoffs, color);
- drawLine(start+yoffs, start-zoffs, color);
- drawLine(start-zoffs, start-yoffs, color);
+
+ btVector3 center = transform.getOrigin();
+ btVector3 up = transform.getBasis().getColumn(1);
+ btVector3 axis = transform.getBasis().getColumn(0);
+ btScalar minTh = -SIMD_HALF_PI;
+ btScalar maxTh = SIMD_HALF_PI;
+ btScalar minPs = -SIMD_HALF_PI;
+ btScalar maxPs = SIMD_HALF_PI;
+ btScalar stepDegrees = 30.f;
+ drawSpherePatch(center, up, axis, radius,minTh, maxTh, minPs, maxPs, color, stepDegrees ,false);
+ drawSpherePatch(center, up, -axis, radius,minTh, maxTh, minPs, maxPs, color, stepDegrees,false );
}
virtual void drawSphere (const btVector3& p, btScalar radius, const btVector3& color)
@@ -179,7 +167,7 @@ class btIDebugDraw
}
}
virtual void drawSpherePatch(const btVector3& center, const btVector3& up, const btVector3& axis, btScalar radius,
- btScalar minTh, btScalar maxTh, btScalar minPs, btScalar maxPs, const btVector3& color, btScalar stepDegrees = btScalar(10.f))
+ btScalar minTh, btScalar maxTh, btScalar minPs, btScalar maxPs, const btVector3& color, btScalar stepDegrees = btScalar(10.f),bool drawCenter = true)
{
btVector3 vA[74];
btVector3 vB[74];
@@ -261,18 +249,22 @@ class btIDebugDraw
{
drawLine(npole, pvB[j], color);
}
- if(isClosed)
+
+ if (drawCenter)
{
- if(j == (n_vert-1))
+ if(isClosed)
{
- drawLine(arcStart, pvB[j], color);
+ if(j == (n_vert-1))
+ {
+ drawLine(arcStart, pvB[j], color);
+ }
}
- }
- else
- {
- if(((!i) || (i == (n_hor-1))) && ((!j) || (j == (n_vert-1))))
+ else
{
- drawLine(center, pvB[j], color);
+ if(((!i) || (i == (n_hor-1))) && ((!j) || (j == (n_vert-1))))
+ {
+ drawLine(center, pvB[j], color);
+ }
}
}
}
@@ -314,6 +306,8 @@ class btIDebugDraw
virtual void drawCapsule(btScalar radius, btScalar halfHeight, int upAxis, const btTransform& transform, const btVector3& color)
{
+ int stepDegrees = 30;
+
btVector3 capStart(0.f,0.f,0.f);
capStart[upAxis] = -halfHeight;
@@ -325,34 +319,47 @@ class btIDebugDraw
btTransform childTransform = transform;
childTransform.getOrigin() = transform * capStart;
- drawSphere(radius, childTransform, color);
+ {
+ btVector3 center = childTransform.getOrigin();
+ btVector3 up = childTransform.getBasis().getColumn((upAxis+1)%3);
+ btVector3 axis = -childTransform.getBasis().getColumn(upAxis);
+ btScalar minTh = -SIMD_HALF_PI;
+ btScalar maxTh = SIMD_HALF_PI;
+ btScalar minPs = -SIMD_HALF_PI;
+ btScalar maxPs = SIMD_HALF_PI;
+
+ drawSpherePatch(center, up, axis, radius,minTh, maxTh, minPs, maxPs, color, btScalar(stepDegrees) ,false);
+ }
+
+
+
}
{
btTransform childTransform = transform;
childTransform.getOrigin() = transform * capEnd;
- drawSphere(radius, childTransform, color);
+ {
+ btVector3 center = childTransform.getOrigin();
+ btVector3 up = childTransform.getBasis().getColumn((upAxis+1)%3);
+ btVector3 axis = childTransform.getBasis().getColumn(upAxis);
+ btScalar minTh = -SIMD_HALF_PI;
+ btScalar maxTh = SIMD_HALF_PI;
+ btScalar minPs = -SIMD_HALF_PI;
+ btScalar maxPs = SIMD_HALF_PI;
+ drawSpherePatch(center, up, axis, radius,minTh, maxTh, minPs, maxPs, color, btScalar(stepDegrees) ,false);
+ }
}
// Draw some additional lines
btVector3 start = transform.getOrigin();
- capStart[(upAxis+1)%3] = radius;
- capEnd[(upAxis+1)%3] = radius;
- drawLine(start+transform.getBasis() * capStart,start+transform.getBasis() * capEnd, color);
- capStart[(upAxis+1)%3] = -radius;
- capEnd[(upAxis+1)%3] = -radius;
- drawLine(start+transform.getBasis() * capStart,start+transform.getBasis() * capEnd, color);
-
- capStart[(upAxis+1)%3] = 0.f;
- capEnd[(upAxis+1)%3] = 0.f;
-
- capStart[(upAxis+2)%3] = radius;
- capEnd[(upAxis+2)%3] = radius;
- drawLine(start+transform.getBasis() * capStart,start+transform.getBasis() * capEnd, color);
- capStart[(upAxis+2)%3] = -radius;
- capEnd[(upAxis+2)%3] = -radius;
- drawLine(start+transform.getBasis() * capStart,start+transform.getBasis() * capEnd, color);
+ for (int i=0;i<360;i+=stepDegrees)
+ {
+ capEnd[(upAxis+1)%3] = capStart[(upAxis+1)%3] = btSin(btScalar(i)*SIMD_RADS_PER_DEG)*radius;
+ capEnd[(upAxis+2)%3] = capStart[(upAxis+2)%3] = btCos(btScalar(i)*SIMD_RADS_PER_DEG)*radius;
+ drawLine(start+transform.getBasis() * capStart,start+transform.getBasis() * capEnd, color);
+ }
+
}
virtual void drawCylinder(btScalar radius, btScalar halfHeight, int upAxis, const btTransform& transform, const btVector3& color)
@@ -360,11 +367,18 @@ class btIDebugDraw
btVector3 start = transform.getOrigin();
btVector3 offsetHeight(0,0,0);
offsetHeight[upAxis] = halfHeight;
- btVector3 offsetRadius(0,0,0);
- offsetRadius[(upAxis+1)%3] = radius;
- drawLine(start+transform.getBasis() * (offsetHeight+offsetRadius),start+transform.getBasis() * (-offsetHeight+offsetRadius),color);
- drawLine(start+transform.getBasis() * (offsetHeight-offsetRadius),start+transform.getBasis() * (-offsetHeight-offsetRadius),color);
+ int stepDegrees=30;
+ btVector3 capStart(0.f,0.f,0.f);
+ capStart[upAxis] = -halfHeight;
+ btVector3 capEnd(0.f,0.f,0.f);
+ capEnd[upAxis] = halfHeight;
+ for (int i=0;i<360;i+=stepDegrees)
+ {
+ capEnd[(upAxis+1)%3] = capStart[(upAxis+1)%3] = btSin(btScalar(i)*SIMD_RADS_PER_DEG)*radius;
+ capEnd[(upAxis+2)%3] = capStart[(upAxis+2)%3] = btCos(btScalar(i)*SIMD_RADS_PER_DEG)*radius;
+ drawLine(start+transform.getBasis() * capStart,start+transform.getBasis() * capEnd, color);
+ }
// Drawing top and bottom caps of the cylinder
btVector3 yaxis(0,0,0);
yaxis[upAxis] = btScalar(1.0);
@@ -376,16 +390,28 @@ class btIDebugDraw
virtual void drawCone(btScalar radius, btScalar height, int upAxis, const btTransform& transform, const btVector3& color)
{
-
+ int stepDegrees = 30;
btVector3 start = transform.getOrigin();
btVector3 offsetHeight(0,0,0);
- offsetHeight[upAxis] = height * btScalar(0.5);
+ btScalar halfHeight = height * btScalar(0.5);
+ offsetHeight[upAxis] = halfHeight;
btVector3 offsetRadius(0,0,0);
offsetRadius[(upAxis+1)%3] = radius;
btVector3 offset2Radius(0,0,0);
offset2Radius[(upAxis+2)%3] = radius;
+
+ btVector3 capEnd(0.f,0.f,0.f);
+ capEnd[upAxis] = -halfHeight;
+
+ for (int i=0;i<360;i+=stepDegrees)
+ {
+ capEnd[(upAxis+1)%3] = btSin(btScalar(i)*SIMD_RADS_PER_DEG)*radius;
+ capEnd[(upAxis+2)%3] = btCos(btScalar(i)*SIMD_RADS_PER_DEG)*radius;
+ drawLine(start+transform.getBasis() * (offsetHeight),start+transform.getBasis() * capEnd, color);
+ }
+
drawLine(start+transform.getBasis() * (offsetHeight),start+transform.getBasis() * (-offsetHeight+offsetRadius),color);
drawLine(start+transform.getBasis() * (offsetHeight),start+transform.getBasis() * (-offsetHeight-offsetRadius),color);
drawLine(start+transform.getBasis() * (offsetHeight),start+transform.getBasis() * (-offsetHeight+offset2Radius),color);
diff --git a/extern/bullet2/src/LinearMath/btMatrix3x3.h b/extern/bullet2/src/LinearMath/btMatrix3x3.h
index d4f5c95aa64..14fe704f81a 100644
--- a/extern/bullet2/src/LinearMath/btMatrix3x3.h
+++ b/extern/bullet2/src/LinearMath/btMatrix3x3.h
@@ -22,10 +22,15 @@ subject to the following restrictions:
#ifdef BT_USE_SSE
//const __m128 ATTRIBUTE_ALIGNED16(v2220) = {2.0f, 2.0f, 2.0f, 0.0f};
-const __m128 ATTRIBUTE_ALIGNED16(vMPPP) = {-0.0f, +0.0f, +0.0f, +0.0f};
+//const __m128 ATTRIBUTE_ALIGNED16(vMPPP) = {-0.0f, +0.0f, +0.0f, +0.0f};
+#define vMPPP (_mm_set_ps (+0.0f, +0.0f, +0.0f, -0.0f))
#endif
-#if defined(BT_USE_SSE) || defined(BT_USE_NEON)
+#if defined(BT_USE_SSE)
+#define v1000 (_mm_set_ps(0.0f,0.0f,0.0f,1.0f))
+#define v0100 (_mm_set_ps(0.0f,0.0f,1.0f,0.0f))
+#define v0010 (_mm_set_ps(0.0f,1.0f,0.0f,0.0f))
+#elif defined(BT_USE_NEON)
const btSimdFloat4 ATTRIBUTE_ALIGNED16(v1000) = {1.0f, 0.0f, 0.0f, 0.0f};
const btSimdFloat4 ATTRIBUTE_ALIGNED16(v0100) = {0.0f, 1.0f, 0.0f, 0.0f};
const btSimdFloat4 ATTRIBUTE_ALIGNED16(v0010) = {0.0f, 0.0f, 1.0f, 0.0f};
@@ -207,7 +212,7 @@ public:
btFullAssert(d != btScalar(0.0));
btScalar s = btScalar(2.0) / d;
- #if defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE)
+ #if defined BT_USE_SIMD_VECTOR3 && defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE)
__m128 vs, Q = q.get128();
__m128i Qi = btCastfTo128i(Q);
__m128 Y, Z;
@@ -341,7 +346,7 @@ public:
* @param m The array to be filled */
void getOpenGLSubMatrix(btScalar *m) const
{
-#if defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE)
+#if defined BT_USE_SIMD_VECTOR3 && defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE)
__m128 v0 = m_el[0].mVec128;
__m128 v1 = m_el[1].mVec128;
__m128 v2 = m_el[2].mVec128; // x2 y2 z2 w2
@@ -362,7 +367,7 @@ public:
vm[2] = v2;
#elif defined(BT_USE_NEON)
// note: zeros the w channel. We can preserve it at the cost of two more vtrn instructions.
- static const uint32x2_t zMask = (const uint32x2_t) {-1, 0 };
+ static const uint32x2_t zMask = (const uint32x2_t) {static_cast<uint32_t>(-1), 0 };
float32x4_t *vm = (float32x4_t *)m;
float32x4x2_t top = vtrnq_f32( m_el[0].mVec128, m_el[1].mVec128 ); // {x0 x1 z0 z1}, {y0 y1 w0 w1}
float32x2x2_t bl = vtrn_f32( vget_low_f32(m_el[2].mVec128), vdup_n_f32(0.0f) ); // {x2 0 }, {y2 0}
@@ -740,7 +745,7 @@ public:
SIMD_FORCE_INLINE btMatrix3x3&
btMatrix3x3::operator*=(const btMatrix3x3& m)
{
-#if defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE)
+#if defined BT_USE_SIMD_VECTOR3 && defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE)
__m128 rv00, rv01, rv02;
__m128 rv10, rv11, rv12;
__m128 rv20, rv21, rv22;
@@ -953,7 +958,7 @@ btMatrix3x3::determinant() const
SIMD_FORCE_INLINE btMatrix3x3
btMatrix3x3::absolute() const
{
-#if (defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE))
+#if defined BT_USE_SIMD_VECTOR3 && (defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE))
return btMatrix3x3(
_mm_and_ps(m_el[0].mVec128, btvAbsfMask),
_mm_and_ps(m_el[1].mVec128, btvAbsfMask),
@@ -974,7 +979,7 @@ btMatrix3x3::absolute() const
SIMD_FORCE_INLINE btMatrix3x3
btMatrix3x3::transpose() const
{
-#if (defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE))
+#if defined BT_USE_SIMD_VECTOR3 && (defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE))
__m128 v0 = m_el[0].mVec128;
__m128 v1 = m_el[1].mVec128;
__m128 v2 = m_el[2].mVec128; // x2 y2 z2 w2
@@ -993,7 +998,7 @@ btMatrix3x3::transpose() const
return btMatrix3x3( v0, v1, v2 );
#elif defined(BT_USE_NEON)
// note: zeros the w channel. We can preserve it at the cost of two more vtrn instructions.
- static const uint32x2_t zMask = (const uint32x2_t) {-1, 0 };
+ static const uint32x2_t zMask = (const uint32x2_t) {static_cast<uint32_t>(-1), 0 };
float32x4x2_t top = vtrnq_f32( m_el[0].mVec128, m_el[1].mVec128 ); // {x0 x1 z0 z1}, {y0 y1 w0 w1}
float32x2x2_t bl = vtrn_f32( vget_low_f32(m_el[2].mVec128), vdup_n_f32(0.0f) ); // {x2 0 }, {y2 0}
float32x4_t v0 = vcombine_f32( vget_low_f32(top.val[0]), bl.val[0] );
@@ -1031,7 +1036,7 @@ btMatrix3x3::inverse() const
SIMD_FORCE_INLINE btMatrix3x3
btMatrix3x3::transposeTimes(const btMatrix3x3& m) const
{
-#if (defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE))
+#if defined BT_USE_SIMD_VECTOR3 && (defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE))
// zeros w
// static const __m128i xyzMask = (const __m128i){ -1ULL, 0xffffffffULL };
__m128 row = m_el[0].mVec128;
@@ -1053,7 +1058,7 @@ btMatrix3x3::transposeTimes(const btMatrix3x3& m) const
#elif defined BT_USE_NEON
// zeros w
- static const uint32x4_t xyzMask = (const uint32x4_t){ -1, -1, -1, 0 };
+ static const uint32x4_t xyzMask = (const uint32x4_t){ static_cast<uint32_t>(-1), static_cast<uint32_t>(-1), static_cast<uint32_t>(-1), 0 };
float32x4_t m0 = (float32x4_t) vandq_u32( (uint32x4_t) m.getRow(0).mVec128, xyzMask );
float32x4_t m1 = (float32x4_t) vandq_u32( (uint32x4_t) m.getRow(1).mVec128, xyzMask );
float32x4_t m2 = (float32x4_t) vandq_u32( (uint32x4_t) m.getRow(2).mVec128, xyzMask );
@@ -1151,7 +1156,7 @@ operator*(const btMatrix3x3& m, const btVector3& v)
SIMD_FORCE_INLINE btVector3
operator*(const btVector3& v, const btMatrix3x3& m)
{
-#if (defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE))
+#if defined BT_USE_SIMD_VECTOR3 && (defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE))
const __m128 vv = v.mVec128;
@@ -1191,7 +1196,7 @@ operator*(const btVector3& v, const btMatrix3x3& m)
SIMD_FORCE_INLINE btMatrix3x3
operator*(const btMatrix3x3& m1, const btMatrix3x3& m2)
{
-#if (defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE))
+#if defined BT_USE_SIMD_VECTOR3 && (defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE))
__m128 m10 = m1[0].mVec128;
__m128 m11 = m1[1].mVec128;
diff --git a/extern/bullet2/src/LinearMath/btMatrixX.h b/extern/bullet2/src/LinearMath/btMatrixX.h
new file mode 100644
index 00000000000..1c29632c536
--- /dev/null
+++ b/extern/bullet2/src/LinearMath/btMatrixX.h
@@ -0,0 +1,504 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2013 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+///original version written by Erwin Coumans, October 2013
+
+#ifndef BT_MATRIX_X_H
+#define BT_MATRIX_X_H
+
+#include "LinearMath/btQuickprof.h"
+#include "LinearMath/btAlignedObjectArray.h"
+
+class btIntSortPredicate
+{
+ public:
+ bool operator() ( const int& a, const int& b ) const
+ {
+ return a < b;
+ }
+};
+
+
+template <typename T>
+struct btMatrixX
+{
+ int m_rows;
+ int m_cols;
+ int m_operations;
+ int m_resizeOperations;
+ int m_setElemOperations;
+
+ btAlignedObjectArray<T> m_storage;
+ btAlignedObjectArray< btAlignedObjectArray<int> > m_rowNonZeroElements1;
+ btAlignedObjectArray< btAlignedObjectArray<int> > m_colNonZeroElements;
+
+ T* getBufferPointerWritable()
+ {
+ return m_storage.size() ? &m_storage[0] : 0;
+ }
+
+ const T* getBufferPointer() const
+ {
+ return m_storage.size() ? &m_storage[0] : 0;
+ }
+ btMatrixX()
+ :m_rows(0),
+ m_cols(0),
+ m_operations(0),
+ m_resizeOperations(0),
+ m_setElemOperations(0)
+ {
+ }
+ btMatrixX(int rows,int cols)
+ :m_rows(rows),
+ m_cols(cols),
+ m_operations(0),
+ m_resizeOperations(0),
+ m_setElemOperations(0)
+ {
+ resize(rows,cols);
+ }
+ void resize(int rows, int cols)
+ {
+ m_resizeOperations++;
+ m_rows = rows;
+ m_cols = cols;
+ {
+ BT_PROFILE("m_storage.resize");
+ m_storage.resize(rows*cols);
+ }
+ clearSparseInfo();
+ }
+ int cols() const
+ {
+ return m_cols;
+ }
+ int rows() const
+ {
+ return m_rows;
+ }
+ ///we don't want this read/write operator(), because we cannot keep track of non-zero elements, use setElem instead
+ /*T& operator() (int row,int col)
+ {
+ return m_storage[col*m_rows+row];
+ }
+ */
+
+ void addElem(int row,int col, T val)
+ {
+ if (val)
+ {
+ if (m_storage[col+row*m_cols]==0.f)
+ {
+ setElem(row,col,val);
+ } else
+ {
+ m_storage[row*m_cols+col] += val;
+ }
+ }
+ }
+
+ void copyLowerToUpperTriangle()
+ {
+ int count=0;
+ for (int row=0;row<m_rowNonZeroElements1.size();row++)
+ {
+ for (int j=0;j<m_rowNonZeroElements1[row].size();j++)
+ {
+ int col = m_rowNonZeroElements1[row][j];
+ setElem(col,row, (*this)(row,col));
+ count++;
+
+ }
+ }
+ //printf("copyLowerToUpperTriangle copied %d elements out of %dx%d=%d\n", count,rows(),cols(),cols()*rows());
+ }
+ void setElem(int row,int col, T val)
+ {
+ m_setElemOperations++;
+ if (val)
+ {
+ if (m_storage[col+row*m_cols]==0.f)
+ {
+ m_rowNonZeroElements1[row].push_back(col);
+ m_colNonZeroElements[col].push_back(row);
+ }
+ m_storage[row*m_cols+col] = val;
+ }
+ }
+ const T& operator() (int row,int col) const
+ {
+ return m_storage[col+row*m_cols];
+ }
+
+ void clearSparseInfo()
+ {
+ BT_PROFILE("clearSparseInfo=0");
+ m_rowNonZeroElements1.resize(m_rows);
+ m_colNonZeroElements.resize(m_cols);
+ for (int i=0;i<m_rows;i++)
+ m_rowNonZeroElements1[i].resize(0);
+ for (int j=0;j<m_cols;j++)
+ m_colNonZeroElements[j].resize(0);
+ }
+
+ void setZero()
+ {
+ {
+ BT_PROFILE("storage=0");
+ btSetZero(&m_storage[0],m_storage.size());
+ //memset(&m_storage[0],0,sizeof(T)*m_storage.size());
+ //for (int i=0;i<m_storage.size();i++)
+ // m_storage[i]=0;
+ }
+ {
+ BT_PROFILE("clearSparseInfo=0");
+ clearSparseInfo();
+ }
+ }
+
+ void printMatrix(const char* msg)
+ {
+ printf("%s ---------------------\n",msg);
+ for (int i=0;i<rows();i++)
+ {
+ printf("\n");
+ for (int j=0;j<cols();j++)
+ {
+ printf("%2.1f\t",(*this)(i,j));
+ }
+ }
+ printf("\n---------------------\n");
+
+ }
+ void printNumZeros(const char* msg)
+ {
+ printf("%s: ",msg);
+ int numZeros = 0;
+ for (int i=0;i<m_storage.size();i++)
+ if (m_storage[i]==0)
+ numZeros++;
+ int total = m_cols*m_rows;
+ int computedNonZero = total-numZeros;
+ int nonZero = 0;
+ for (int i=0;i<m_colNonZeroElements.size();i++)
+ nonZero += m_colNonZeroElements[i].size();
+ btAssert(computedNonZero==nonZero);
+ if(computedNonZero!=nonZero)
+ {
+ printf("Error: computedNonZero=%d, but nonZero=%d\n",computedNonZero,nonZero);
+ }
+ //printf("%d numZeros out of %d (%f)\n",numZeros,m_cols*m_rows,numZeros/(m_cols*m_rows));
+ printf("total %d, %d rows, %d cols, %d non-zeros (%f %)\n", total, rows(),cols(), nonZero,100.f*(T)nonZero/T(total));
+ }
+ /*
+ void rowComputeNonZeroElements()
+ {
+ m_rowNonZeroElements1.resize(rows());
+ for (int i=0;i<rows();i++)
+ {
+ m_rowNonZeroElements1[i].resize(0);
+ for (int j=0;j<cols();j++)
+ {
+ if ((*this)(i,j)!=0.f)
+ {
+ m_rowNonZeroElements1[i].push_back(j);
+ }
+ }
+ }
+ }
+ */
+ btMatrixX transpose() const
+ {
+ //transpose is optimized for sparse matrices
+ btMatrixX tr(m_cols,m_rows);
+ tr.setZero();
+#if 0
+ for (int i=0;i<m_cols;i++)
+ for (int j=0;j<m_rows;j++)
+ {
+ T v = (*this)(j,i);
+ if (v)
+ {
+ tr.setElem(i,j,v);
+ }
+ }
+#else
+ for (int i=0;i<m_colNonZeroElements.size();i++)
+ for (int h=0;h<m_colNonZeroElements[i].size();h++)
+ {
+ int j = m_colNonZeroElements[i][h];
+ T v = (*this)(j,i);
+ tr.setElem(i,j,v);
+ }
+#endif
+ return tr;
+ }
+
+ void sortRowIndexArrays()
+ {
+ for (int i=0;i<m_rowNonZeroElements1[i].size();i++)
+ {
+ m_rowNonZeroElements1[i].quickSort(btIntSortPredicate());
+ }
+ }
+
+ void sortColIndexArrays()
+ {
+ for (int i=0;i<m_colNonZeroElements[i].size();i++)
+ {
+ m_colNonZeroElements[i].quickSort(btIntSortPredicate());
+ }
+ }
+
+ btMatrixX operator*(const btMatrixX& other)
+ {
+ //btMatrixX*btMatrixX implementation, optimized for sparse matrices
+ btAssert(cols() == other.rows());
+
+ btMatrixX res(rows(),other.cols());
+ res.setZero();
+// BT_PROFILE("btMatrixX mul");
+ for (int j=0; j < res.cols(); ++j)
+ {
+ //int numZero=other.m_colNonZeroElements[j].size();
+ //if (numZero)
+ {
+ for (int i=0; i < res.rows(); ++i)
+ //for (int g = 0;g<m_colNonZeroElements[j].size();g++)
+ {
+ T dotProd=0;
+ T dotProd2=0;
+ int waste=0,waste2=0;
+
+ bool doubleWalk = false;
+ if (doubleWalk)
+ {
+ int numRows = m_rowNonZeroElements1[i].size();
+ int numOtherCols = other.m_colNonZeroElements[j].size();
+ for (int ii=0;ii<numRows;ii++)
+ {
+ int vThis=m_rowNonZeroElements1[i][ii];
+ }
+
+ for (int ii=0;ii<numOtherCols;ii++)
+ {
+ int vOther = other.m_colNonZeroElements[j][ii];
+ }
+
+
+ int indexRow = 0;
+ int indexOtherCol = 0;
+ while (indexRow < numRows && indexOtherCol < numOtherCols)
+ {
+ int vThis=m_rowNonZeroElements1[i][indexRow];
+ int vOther = other.m_colNonZeroElements[j][indexOtherCol];
+ if (vOther==vThis)
+ {
+ dotProd += (*this)(i,vThis) * other(vThis,j);
+ }
+ if (vThis<vOther)
+ {
+ indexRow++;
+ } else
+ {
+ indexOtherCol++;
+ }
+ }
+
+ } else
+ {
+ bool useOtherCol = true;
+ if (other.m_colNonZeroElements[j].size() <m_rowNonZeroElements1[i].size())
+ {
+ useOtherCol=true;
+ }
+ if (!useOtherCol )
+ {
+ for (int q=0;q<other.m_colNonZeroElements[j].size();q++)
+ {
+ int v = other.m_colNonZeroElements[j][q];
+ T w = (*this)(i,v);
+ if (w!=0.f)
+ {
+ dotProd+=w*other(v,j);
+ }
+
+ }
+ }
+ else
+ {
+ for (int q=0;q<m_rowNonZeroElements1[i].size();q++)
+ {
+ int v=m_rowNonZeroElements1[i][q];
+ T w = (*this)(i,v);
+ if (other(v,j)!=0.f)
+ {
+ dotProd+=w*other(v,j);
+ }
+
+ }
+ }
+ }
+ if (dotProd)
+ res.setElem(i,j,dotProd);
+ }
+ }
+ }
+ return res;
+ }
+
+ // this assumes the 4th and 8th rows of B and C are zero.
+ void multiplyAdd2_p8r (const btScalar *B, const btScalar *C, int numRows, int numRowsOther ,int row, int col)
+ {
+ const btScalar *bb = B;
+ for ( int i = 0;i<numRows;i++)
+ {
+ const btScalar *cc = C;
+ for ( int j = 0;j<numRowsOther;j++)
+ {
+ btScalar sum;
+ sum = bb[0]*cc[0];
+ sum += bb[1]*cc[1];
+ sum += bb[2]*cc[2];
+ sum += bb[4]*cc[4];
+ sum += bb[5]*cc[5];
+ sum += bb[6]*cc[6];
+ addElem(row+i,col+j,sum);
+ cc += 8;
+ }
+ bb += 8;
+ }
+ }
+
+ void multiply2_p8r (const btScalar *B, const btScalar *C, int numRows, int numRowsOther, int row, int col)
+ {
+ btAssert (numRows>0 && numRowsOther>0 && B && C);
+ const btScalar *bb = B;
+ for ( int i = 0;i<numRows;i++)
+ {
+ const btScalar *cc = C;
+ for ( int j = 0;j<numRowsOther;j++)
+ {
+ btScalar sum;
+ sum = bb[0]*cc[0];
+ sum += bb[1]*cc[1];
+ sum += bb[2]*cc[2];
+ sum += bb[4]*cc[4];
+ sum += bb[5]*cc[5];
+ sum += bb[6]*cc[6];
+ setElem(row+i,col+j,sum);
+ cc += 8;
+ }
+ bb += 8;
+ }
+ }
+
+};
+
+template <typename T>
+struct btVectorX
+{
+ btAlignedObjectArray<T> m_storage;
+
+ btVectorX()
+ {
+ }
+ btVectorX(int numRows)
+ {
+ m_storage.resize(numRows);
+ }
+
+ void resize(int rows)
+ {
+ m_storage.resize(rows);
+ }
+ int cols() const
+ {
+ return 1;
+ }
+ int rows() const
+ {
+ return m_storage.size();
+ }
+ int size() const
+ {
+ return rows();
+ }
+ void setZero()
+ {
+ // for (int i=0;i<m_storage.size();i++)
+ // m_storage[i]=0;
+ //memset(&m_storage[0],0,sizeof(T)*m_storage.size());
+ btSetZero(&m_storage[0],m_storage.size());
+ }
+ const T& operator[] (int index) const
+ {
+ return m_storage[index];
+ }
+
+ T& operator[] (int index)
+ {
+ return m_storage[index];
+ }
+
+ T* getBufferPointerWritable()
+ {
+ return m_storage.size() ? &m_storage[0] : 0;
+ }
+
+ const T* getBufferPointer() const
+ {
+ return m_storage.size() ? &m_storage[0] : 0;
+ }
+
+};
+/*
+template <typename T>
+void setElem(btMatrixX<T>& mat, int row, int col, T val)
+{
+ mat.setElem(row,col,val);
+}
+*/
+
+
+typedef btMatrixX<float> btMatrixXf;
+typedef btVectorX<float> btVectorXf;
+
+typedef btMatrixX<double> btMatrixXd;
+typedef btVectorX<double> btVectorXd;
+
+
+
+inline void setElem(btMatrixXd& mat, int row, int col, double val)
+{
+ mat.setElem(row,col,val);
+}
+
+inline void setElem(btMatrixXf& mat, int row, int col, float val)
+{
+ mat.setElem(row,col,val);
+}
+
+#ifdef BT_USE_DOUBLE_PRECISION
+ #define btVectorXu btVectorXd
+ #define btMatrixXu btMatrixXd
+#else
+ #define btVectorXu btVectorXf
+ #define btMatrixXu btMatrixXf
+#endif //BT_USE_DOUBLE_PRECISION
+
+
+
+#endif//BT_MATRIX_H_H
diff --git a/extern/bullet2/src/LinearMath/btQuaternion.h b/extern/bullet2/src/LinearMath/btQuaternion.h
index 7d7f25fb4d3..665421de1e4 100644
--- a/extern/bullet2/src/LinearMath/btQuaternion.h
+++ b/extern/bullet2/src/LinearMath/btQuaternion.h
@@ -27,11 +27,17 @@ subject to the following restrictions:
#ifdef BT_USE_SSE
-const __m128 ATTRIBUTE_ALIGNED16(vOnes) = {1.0f, 1.0f, 1.0f, 1.0f};
+//const __m128 ATTRIBUTE_ALIGNED16(vOnes) = {1.0f, 1.0f, 1.0f, 1.0f};
+#define vOnes (_mm_set_ps(1.0f, 1.0f, 1.0f, 1.0f))
#endif
-#if defined(BT_USE_SSE) || defined(BT_USE_NEON)
+#if defined(BT_USE_SSE)
+
+#define vQInv (_mm_set_ps(+0.0f, -0.0f, -0.0f, -0.0f))
+#define vPPPM (_mm_set_ps(-0.0f, +0.0f, +0.0f, +0.0f))
+
+#elif defined(BT_USE_NEON)
const btSimdFloat4 ATTRIBUTE_ALIGNED16(vQInv) = {-0.0f, -0.0f, -0.0f, +0.0f};
const btSimdFloat4 ATTRIBUTE_ALIGNED16(vPPPM) = {+0.0f, +0.0f, +0.0f, -0.0f};
@@ -285,7 +291,7 @@ public:
* @param q The other quaternion */
btScalar dot(const btQuaternion& q) const
{
-#if defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE)
+#if defined BT_USE_SIMD_VECTOR3 && defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE)
__m128 vd;
vd = _mm_mul_ps(mVec128, q.mVec128);
@@ -384,7 +390,7 @@ public:
{
return *this / length();
}
- /**@brief Return the angle between this quaternion and the other
+ /**@brief Return the ***half*** angle between this quaternion and the other
* @param q The other quaternion */
btScalar angle(const btQuaternion& q) const
{
@@ -392,6 +398,19 @@ public:
btAssert(s != btScalar(0.0));
return btAcos(dot(q) / s);
}
+
+ /**@brief Return the angle between this quaternion and the other along the shortest path
+ * @param q The other quaternion */
+ btScalar angleShortestPath(const btQuaternion& q) const
+ {
+ btScalar s = btSqrt(length2() * q.length2());
+ btAssert(s != btScalar(0.0));
+ if (dot(q) < 0) // Take care of long angle case see http://en.wikipedia.org/wiki/Slerp
+ return btAcos(dot(-q) / s) * btScalar(2.0);
+ else
+ return btAcos(dot(q) / s) * btScalar(2.0);
+ }
+
/**@brief Return the angle of rotation represented by this quaternion */
btScalar getAngle() const
{
@@ -399,6 +418,19 @@ public:
return s;
}
+ /**@brief Return the angle of rotation represented by this quaternion along the shortest path*/
+ btScalar getAngleShortestPath() const
+ {
+ btScalar s;
+ if (dot(*this) < 0)
+ s = btScalar(2.) * btAcos(m_floats[3]);
+ else
+ s = btScalar(2.) * btAcos(-m_floats[3]);
+
+ return s;
+ }
+
+
/**@brief Return the axis of the rotation represented by this quaternion */
btVector3 getAxis() const
{
@@ -835,7 +867,7 @@ quatRotate(const btQuaternion& rotation, const btVector3& v)
{
btQuaternion q = rotation * v;
q *= rotation.inverse();
-#if defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE)
+#if defined BT_USE_SIMD_VECTOR3 && defined (BT_USE_SSE_IN_API) && defined (BT_USE_SSE)
return btVector3(_mm_and_ps(q.get128(), btvFFF0fMask));
#elif defined(BT_USE_NEON)
return btVector3((float32x4_t)vandq_s32((int32x4_t)q.get128(), btvFFF0Mask));
diff --git a/extern/bullet2/src/LinearMath/btScalar.h b/extern/bullet2/src/LinearMath/btScalar.h
index aaa1d6de6b4..37c6dec191d 100644
--- a/extern/bullet2/src/LinearMath/btScalar.h
+++ b/extern/bullet2/src/LinearMath/btScalar.h
@@ -28,7 +28,7 @@ subject to the following restrictions:
#include <float.h>
/* SVN $Revision$ on $Date$ from http://bullet.googlecode.com*/
-#define BT_BULLET_VERSION 281
+#define BT_BULLET_VERSION 282
inline int btGetVersion()
{
@@ -180,7 +180,7 @@ inline int btGetVersion()
#include <emmintrin.h>
#endif
#endif //BT_USE_SSE
- #elif defined( __armv7__ )
+ #elif defined( __ARM_NEON__ )
#ifdef __clang__
#define BT_USE_NEON 1
#define BT_USE_SIMD_VECTOR3
@@ -257,10 +257,12 @@ inline int btGetVersion()
///The btScalar type abstracts floating point numbers, to easily switch between double and single floating point precision.
#if defined(BT_USE_DOUBLE_PRECISION)
+
typedef double btScalar;
//this number could be bigger in double precision
#define BT_LARGE_FLOAT 1e30
#else
+
typedef float btScalar;
//keep BT_LARGE_FLOAT*BT_LARGE_FLOAT < FLT_MAX
#define BT_LARGE_FLOAT 1e18f
@@ -284,6 +286,8 @@ static int btInfinityMask = 0x7F800000;
#define BT_INFINITY (*(float*)&btInfinityMask)
#endif
+//use this, in case there are clashes (such as xnamath.h)
+#ifndef BT_NO_SIMD_OPERATOR_OVERLOADS
inline __m128 operator + (const __m128 A, const __m128 B)
{
return _mm_add_ps(A, B);
@@ -298,6 +302,7 @@ inline __m128 operator * (const __m128 A, const __m128 B)
{
return _mm_mul_ps(A, B);
}
+#endif //BT_NO_SIMD_OPERATOR_OVERLOADS
#define btCastfTo128i(a) (_mm_castps_si128(a))
#define btCastfTo128d(a) (_mm_castps_pd(a))
@@ -317,7 +322,24 @@ inline __m128 operator * (const __m128 A, const __m128 B)
#define BT_INFINITY INFINITY
#define BT_NAN NAN
#endif//_WIN32
-#endif //BT_USE_SSE_IN_API
+#else
+
+#ifdef BT_USE_NEON
+ #include <arm_neon.h>
+
+ typedef float32x4_t btSimdFloat4;
+ #define BT_INFINITY INFINITY
+ #define BT_NAN NAN
+ #define btAssign128(r0,r1,r2,r3) (float32x4_t){r0,r1,r2,r3}
+#else//BT_USE_NEON
+
+ #ifndef BT_INFINITY
+ static int btInfinityMask = 0x7F800000;
+ #define BT_INFINITY (*(float*)&btInfinityMask)
+ #endif
+#endif//BT_USE_NEON
+
+#endif //BT_USE_SSE
#ifdef BT_USE_NEON
#include <arm_neon.h>
@@ -409,15 +431,15 @@ SIMD_FORCE_INLINE btScalar btFmod(btScalar x,btScalar y) { return fmodf(x,y); }
#endif
-#define SIMD_2_PI btScalar(6.283185307179586232)
-#define SIMD_PI (SIMD_2_PI * btScalar(0.5))
-#define SIMD_HALF_PI (SIMD_2_PI * btScalar(0.25))
+#define SIMD_PI btScalar(3.1415926535897932384626433832795029)
+#define SIMD_2_PI btScalar(2.0) * SIMD_PI
+#define SIMD_HALF_PI (SIMD_PI * btScalar(0.5))
#define SIMD_RADS_PER_DEG (SIMD_2_PI / btScalar(360.0))
#define SIMD_DEGS_PER_RAD (btScalar(360.0) / SIMD_2_PI)
#define SIMDSQRT12 btScalar(0.7071067811865475244008443621048490)
#define btRecipSqrt(x) ((btScalar)(btScalar(1.0)/btSqrt(btScalar(x)))) /* reciprocal square root */
-
+#define btRecip(x) (btScalar(1.0)/btScalar(x))
#ifdef BT_USE_DOUBLE_PRECISION
#define SIMD_EPSILON DBL_EPSILON
@@ -608,6 +630,46 @@ SIMD_FORCE_INLINE double btUnswapEndianDouble(const unsigned char *src)
return d;
}
+template<typename T>
+SIMD_FORCE_INLINE void btSetZero(T* a, int n)
+{
+ T* acurr = a;
+ size_t ncurr = n;
+ while (ncurr > 0)
+ {
+ *(acurr++) = 0;
+ --ncurr;
+ }
+}
+
+
+SIMD_FORCE_INLINE btScalar btLargeDot(const btScalar *a, const btScalar *b, int n)
+{
+ btScalar p0,q0,m0,p1,q1,m1,sum;
+ sum = 0;
+ n -= 2;
+ while (n >= 0) {
+ p0 = a[0]; q0 = b[0];
+ m0 = p0 * q0;
+ p1 = a[1]; q1 = b[1];
+ m1 = p1 * q1;
+ sum += m0;
+ sum += m1;
+ a += 2;
+ b += 2;
+ n -= 2;
+ }
+ n += 2;
+ while (n > 0) {
+ sum += (*a) * (*b);
+ a++;
+ b++;
+ n--;
+ }
+ return sum;
+}
+
+
// returns normalized value in range [-SIMD_PI, SIMD_PI]
SIMD_FORCE_INLINE btScalar btNormalizeAngle(btScalar angleInRadians)
{
@@ -626,6 +688,8 @@ SIMD_FORCE_INLINE btScalar btNormalizeAngle(btScalar angleInRadians)
}
}
+
+
///rudimentary class to provide type info
struct btTypedObject
{
diff --git a/extern/bullet2/src/LinearMath/btSerializer.cpp b/extern/bullet2/src/LinearMath/btSerializer.cpp
index d6b2b3a5a5c..ba344939530 100644
--- a/extern/bullet2/src/LinearMath/btSerializer.cpp
+++ b/extern/bullet2/src/LinearMath/btSerializer.cpp
@@ -1,5 +1,5 @@
char sBulletDNAstr[]= {
-char(83),char(68),char(78),char(65),char(78),char(65),char(77),char(69),char(63),char(1),char(0),char(0),char(109),char(95),char(115),char(105),char(122),char(101),char(0),char(109),
+char(83),char(68),char(78),char(65),char(78),char(65),char(77),char(69),char(69),char(1),char(0),char(0),char(109),char(95),char(115),char(105),char(122),char(101),char(0),char(109),
char(95),char(99),char(97),char(112),char(97),char(99),char(105),char(116),char(121),char(0),char(42),char(109),char(95),char(100),char(97),char(116),char(97),char(0),char(109),char(95),
char(99),char(111),char(108),char(108),char(105),char(115),char(105),char(111),char(110),char(83),char(104),char(97),char(112),char(101),char(115),char(0),char(109),char(95),char(99),char(111),
char(108),char(108),char(105),char(115),char(105),char(111),char(110),char(79),char(98),char(106),char(101),char(99),char(116),char(115),char(0),char(109),char(95),char(99),char(111),char(110),
@@ -58,238 +58,242 @@ char(102),char(111),char(114),char(109),char(0),char(42),char(109),char(95),char
char(95),char(99),char(104),char(105),char(108),char(100),char(83),char(104),char(97),char(112),char(101),char(84),char(121),char(112),char(101),char(0),char(109),char(95),char(99),char(104),
char(105),char(108),char(100),char(77),char(97),char(114),char(103),char(105),char(110),char(0),char(42),char(109),char(95),char(99),char(104),char(105),char(108),char(100),char(83),char(104),
char(97),char(112),char(101),char(80),char(116),char(114),char(0),char(109),char(95),char(110),char(117),char(109),char(67),char(104),char(105),char(108),char(100),char(83),char(104),char(97),
-char(112),char(101),char(115),char(0),char(109),char(95),char(117),char(112),char(65),char(120),char(105),char(115),char(0),char(109),char(95),char(102),char(108),char(97),char(103),char(115),
-char(0),char(109),char(95),char(101),char(100),char(103),char(101),char(86),char(48),char(86),char(49),char(65),char(110),char(103),char(108),char(101),char(0),char(109),char(95),char(101),
-char(100),char(103),char(101),char(86),char(49),char(86),char(50),char(65),char(110),char(103),char(108),char(101),char(0),char(109),char(95),char(101),char(100),char(103),char(101),char(86),
-char(50),char(86),char(48),char(65),char(110),char(103),char(108),char(101),char(0),char(42),char(109),char(95),char(104),char(97),char(115),char(104),char(84),char(97),char(98),char(108),
-char(101),char(80),char(116),char(114),char(0),char(42),char(109),char(95),char(110),char(101),char(120),char(116),char(80),char(116),char(114),char(0),char(42),char(109),char(95),char(118),
-char(97),char(108),char(117),char(101),char(65),char(114),char(114),char(97),char(121),char(80),char(116),char(114),char(0),char(42),char(109),char(95),char(107),char(101),char(121),char(65),
-char(114),char(114),char(97),char(121),char(80),char(116),char(114),char(0),char(109),char(95),char(99),char(111),char(110),char(118),char(101),char(120),char(69),char(112),char(115),char(105),
-char(108),char(111),char(110),char(0),char(109),char(95),char(112),char(108),char(97),char(110),char(97),char(114),char(69),char(112),char(115),char(105),char(108),char(111),char(110),char(0),
-char(109),char(95),char(101),char(113),char(117),char(97),char(108),char(86),char(101),char(114),char(116),char(101),char(120),char(84),char(104),char(114),char(101),char(115),char(104),char(111),
-char(108),char(100),char(0),char(109),char(95),char(101),char(100),char(103),char(101),char(68),char(105),char(115),char(116),char(97),char(110),char(99),char(101),char(84),char(104),char(114),
-char(101),char(115),char(104),char(111),char(108),char(100),char(0),char(109),char(95),char(122),char(101),char(114),char(111),char(65),char(114),char(101),char(97),char(84),char(104),char(114),
-char(101),char(115),char(104),char(111),char(108),char(100),char(0),char(109),char(95),char(110),char(101),char(120),char(116),char(83),char(105),char(122),char(101),char(0),char(109),char(95),
-char(104),char(97),char(115),char(104),char(84),char(97),char(98),char(108),char(101),char(83),char(105),char(122),char(101),char(0),char(109),char(95),char(110),char(117),char(109),char(86),
-char(97),char(108),char(117),char(101),char(115),char(0),char(109),char(95),char(110),char(117),char(109),char(75),char(101),char(121),char(115),char(0),char(109),char(95),char(103),char(105),
-char(109),char(112),char(97),char(99),char(116),char(83),char(117),char(98),char(84),char(121),char(112),char(101),char(0),char(42),char(109),char(95),char(117),char(110),char(115),char(99),
-char(97),char(108),char(101),char(100),char(80),char(111),char(105),char(110),char(116),char(115),char(70),char(108),char(111),char(97),char(116),char(80),char(116),char(114),char(0),char(42),
-char(109),char(95),char(117),char(110),char(115),char(99),char(97),char(108),char(101),char(100),char(80),char(111),char(105),char(110),char(116),char(115),char(68),char(111),char(117),char(98),
-char(108),char(101),char(80),char(116),char(114),char(0),char(109),char(95),char(110),char(117),char(109),char(85),char(110),char(115),char(99),char(97),char(108),char(101),char(100),char(80),
-char(111),char(105),char(110),char(116),char(115),char(0),char(109),char(95),char(112),char(97),char(100),char(100),char(105),char(110),char(103),char(51),char(91),char(52),char(93),char(0),
-char(42),char(109),char(95),char(98),char(114),char(111),char(97),char(100),char(112),char(104),char(97),char(115),char(101),char(72),char(97),char(110),char(100),char(108),char(101),char(0),
-char(42),char(109),char(95),char(99),char(111),char(108),char(108),char(105),char(115),char(105),char(111),char(110),char(83),char(104),char(97),char(112),char(101),char(0),char(42),char(109),
-char(95),char(114),char(111),char(111),char(116),char(67),char(111),char(108),char(108),char(105),char(115),char(105),char(111),char(110),char(83),char(104),char(97),char(112),char(101),char(0),
-char(109),char(95),char(119),char(111),char(114),char(108),char(100),char(84),char(114),char(97),char(110),char(115),char(102),char(111),char(114),char(109),char(0),char(109),char(95),char(105),
-char(110),char(116),char(101),char(114),char(112),char(111),char(108),char(97),char(116),char(105),char(111),char(110),char(87),char(111),char(114),char(108),char(100),char(84),char(114),char(97),
+char(112),char(101),char(115),char(0),char(109),char(95),char(117),char(112),char(65),char(120),char(105),char(115),char(0),char(109),char(95),char(117),char(112),char(73),char(110),char(100),
+char(101),char(120),char(0),char(109),char(95),char(102),char(108),char(97),char(103),char(115),char(0),char(109),char(95),char(101),char(100),char(103),char(101),char(86),char(48),char(86),
+char(49),char(65),char(110),char(103),char(108),char(101),char(0),char(109),char(95),char(101),char(100),char(103),char(101),char(86),char(49),char(86),char(50),char(65),char(110),char(103),
+char(108),char(101),char(0),char(109),char(95),char(101),char(100),char(103),char(101),char(86),char(50),char(86),char(48),char(65),char(110),char(103),char(108),char(101),char(0),char(42),
+char(109),char(95),char(104),char(97),char(115),char(104),char(84),char(97),char(98),char(108),char(101),char(80),char(116),char(114),char(0),char(42),char(109),char(95),char(110),char(101),
+char(120),char(116),char(80),char(116),char(114),char(0),char(42),char(109),char(95),char(118),char(97),char(108),char(117),char(101),char(65),char(114),char(114),char(97),char(121),char(80),
+char(116),char(114),char(0),char(42),char(109),char(95),char(107),char(101),char(121),char(65),char(114),char(114),char(97),char(121),char(80),char(116),char(114),char(0),char(109),char(95),
+char(99),char(111),char(110),char(118),char(101),char(120),char(69),char(112),char(115),char(105),char(108),char(111),char(110),char(0),char(109),char(95),char(112),char(108),char(97),char(110),
+char(97),char(114),char(69),char(112),char(115),char(105),char(108),char(111),char(110),char(0),char(109),char(95),char(101),char(113),char(117),char(97),char(108),char(86),char(101),char(114),
+char(116),char(101),char(120),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(0),char(109),char(95),char(101),char(100),char(103),char(101),char(68),
+char(105),char(115),char(116),char(97),char(110),char(99),char(101),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(0),char(109),char(95),char(122),
+char(101),char(114),char(111),char(65),char(114),char(101),char(97),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(0),char(109),char(95),char(110),
+char(101),char(120),char(116),char(83),char(105),char(122),char(101),char(0),char(109),char(95),char(104),char(97),char(115),char(104),char(84),char(97),char(98),char(108),char(101),char(83),
+char(105),char(122),char(101),char(0),char(109),char(95),char(110),char(117),char(109),char(86),char(97),char(108),char(117),char(101),char(115),char(0),char(109),char(95),char(110),char(117),
+char(109),char(75),char(101),char(121),char(115),char(0),char(109),char(95),char(103),char(105),char(109),char(112),char(97),char(99),char(116),char(83),char(117),char(98),char(84),char(121),
+char(112),char(101),char(0),char(42),char(109),char(95),char(117),char(110),char(115),char(99),char(97),char(108),char(101),char(100),char(80),char(111),char(105),char(110),char(116),char(115),
+char(70),char(108),char(111),char(97),char(116),char(80),char(116),char(114),char(0),char(42),char(109),char(95),char(117),char(110),char(115),char(99),char(97),char(108),char(101),char(100),
+char(80),char(111),char(105),char(110),char(116),char(115),char(68),char(111),char(117),char(98),char(108),char(101),char(80),char(116),char(114),char(0),char(109),char(95),char(110),char(117),
+char(109),char(85),char(110),char(115),char(99),char(97),char(108),char(101),char(100),char(80),char(111),char(105),char(110),char(116),char(115),char(0),char(109),char(95),char(112),char(97),
+char(100),char(100),char(105),char(110),char(103),char(51),char(91),char(52),char(93),char(0),char(42),char(109),char(95),char(98),char(114),char(111),char(97),char(100),char(112),char(104),
+char(97),char(115),char(101),char(72),char(97),char(110),char(100),char(108),char(101),char(0),char(42),char(109),char(95),char(99),char(111),char(108),char(108),char(105),char(115),char(105),
+char(111),char(110),char(83),char(104),char(97),char(112),char(101),char(0),char(42),char(109),char(95),char(114),char(111),char(111),char(116),char(67),char(111),char(108),char(108),char(105),
+char(115),char(105),char(111),char(110),char(83),char(104),char(97),char(112),char(101),char(0),char(109),char(95),char(119),char(111),char(114),char(108),char(100),char(84),char(114),char(97),
char(110),char(115),char(102),char(111),char(114),char(109),char(0),char(109),char(95),char(105),char(110),char(116),char(101),char(114),char(112),char(111),char(108),char(97),char(116),char(105),
-char(111),char(110),char(76),char(105),char(110),char(101),char(97),char(114),char(86),char(101),char(108),char(111),char(99),char(105),char(116),char(121),char(0),char(109),char(95),char(105),
-char(110),char(116),char(101),char(114),char(112),char(111),char(108),char(97),char(116),char(105),char(111),char(110),char(65),char(110),char(103),char(117),char(108),char(97),char(114),char(86),
-char(101),char(108),char(111),char(99),char(105),char(116),char(121),char(0),char(109),char(95),char(97),char(110),char(105),char(115),char(111),char(116),char(114),char(111),char(112),char(105),
-char(99),char(70),char(114),char(105),char(99),char(116),char(105),char(111),char(110),char(0),char(109),char(95),char(99),char(111),char(110),char(116),char(97),char(99),char(116),char(80),
-char(114),char(111),char(99),char(101),char(115),char(115),char(105),char(110),char(103),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(0),char(109),
-char(95),char(100),char(101),char(97),char(99),char(116),char(105),char(118),char(97),char(116),char(105),char(111),char(110),char(84),char(105),char(109),char(101),char(0),char(109),char(95),
-char(102),char(114),char(105),char(99),char(116),char(105),char(111),char(110),char(0),char(109),char(95),char(114),char(111),char(108),char(108),char(105),char(110),char(103),char(70),char(114),
-char(105),char(99),char(116),char(105),char(111),char(110),char(0),char(109),char(95),char(114),char(101),char(115),char(116),char(105),char(116),char(117),char(116),char(105),char(111),char(110),
-char(0),char(109),char(95),char(104),char(105),char(116),char(70),char(114),char(97),char(99),char(116),char(105),char(111),char(110),char(0),char(109),char(95),char(99),char(99),char(100),
-char(83),char(119),char(101),char(112),char(116),char(83),char(112),char(104),char(101),char(114),char(101),char(82),char(97),char(100),char(105),char(117),char(115),char(0),char(109),char(95),
-char(99),char(99),char(100),char(77),char(111),char(116),char(105),char(111),char(110),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(0),char(109),
-char(95),char(104),char(97),char(115),char(65),char(110),char(105),char(115),char(111),char(116),char(114),char(111),char(112),char(105),char(99),char(70),char(114),char(105),char(99),char(116),
-char(105),char(111),char(110),char(0),char(109),char(95),char(99),char(111),char(108),char(108),char(105),char(115),char(105),char(111),char(110),char(70),char(108),char(97),char(103),char(115),
-char(0),char(109),char(95),char(105),char(115),char(108),char(97),char(110),char(100),char(84),char(97),char(103),char(49),char(0),char(109),char(95),char(99),char(111),char(109),char(112),
-char(97),char(110),char(105),char(111),char(110),char(73),char(100),char(0),char(109),char(95),char(97),char(99),char(116),char(105),char(118),char(97),char(116),char(105),char(111),char(110),
-char(83),char(116),char(97),char(116),char(101),char(49),char(0),char(109),char(95),char(105),char(110),char(116),char(101),char(114),char(110),char(97),char(108),char(84),char(121),char(112),
-char(101),char(0),char(109),char(95),char(99),char(104),char(101),char(99),char(107),char(67),char(111),char(108),char(108),char(105),char(100),char(101),char(87),char(105),char(116),char(104),
-char(0),char(109),char(95),char(115),char(111),char(108),char(118),char(101),char(114),char(73),char(110),char(102),char(111),char(0),char(109),char(95),char(103),char(114),char(97),char(118),
-char(105),char(116),char(121),char(0),char(109),char(95),char(99),char(111),char(108),char(108),char(105),char(115),char(105),char(111),char(110),char(79),char(98),char(106),char(101),char(99),
-char(116),char(68),char(97),char(116),char(97),char(0),char(109),char(95),char(105),char(110),char(118),char(73),char(110),char(101),char(114),char(116),char(105),char(97),char(84),char(101),
-char(110),char(115),char(111),char(114),char(87),char(111),char(114),char(108),char(100),char(0),char(109),char(95),char(108),char(105),char(110),char(101),char(97),char(114),char(86),char(101),
-char(108),char(111),char(99),char(105),char(116),char(121),char(0),char(109),char(95),char(97),char(110),char(103),char(117),char(108),char(97),char(114),char(86),char(101),char(108),char(111),
-char(99),char(105),char(116),char(121),char(0),char(109),char(95),char(97),char(110),char(103),char(117),char(108),char(97),char(114),char(70),char(97),char(99),char(116),char(111),char(114),
-char(0),char(109),char(95),char(108),char(105),char(110),char(101),char(97),char(114),char(70),char(97),char(99),char(116),char(111),char(114),char(0),char(109),char(95),char(103),char(114),
-char(97),char(118),char(105),char(116),char(121),char(95),char(97),char(99),char(99),char(101),char(108),char(101),char(114),char(97),char(116),char(105),char(111),char(110),char(0),char(109),
-char(95),char(105),char(110),char(118),char(73),char(110),char(101),char(114),char(116),char(105),char(97),char(76),char(111),char(99),char(97),char(108),char(0),char(109),char(95),char(116),
-char(111),char(116),char(97),char(108),char(70),char(111),char(114),char(99),char(101),char(0),char(109),char(95),char(116),char(111),char(116),char(97),char(108),char(84),char(111),char(114),
-char(113),char(117),char(101),char(0),char(109),char(95),char(105),char(110),char(118),char(101),char(114),char(115),char(101),char(77),char(97),char(115),char(115),char(0),char(109),char(95),
-char(108),char(105),char(110),char(101),char(97),char(114),char(68),char(97),char(109),char(112),char(105),char(110),char(103),char(0),char(109),char(95),char(97),char(110),char(103),char(117),
-char(108),char(97),char(114),char(68),char(97),char(109),char(112),char(105),char(110),char(103),char(0),char(109),char(95),char(97),char(100),char(100),char(105),char(116),char(105),char(111),
-char(110),char(97),char(108),char(68),char(97),char(109),char(112),char(105),char(110),char(103),char(70),char(97),char(99),char(116),char(111),char(114),char(0),char(109),char(95),char(97),
-char(100),char(100),char(105),char(116),char(105),char(111),char(110),char(97),char(108),char(76),char(105),char(110),char(101),char(97),char(114),char(68),char(97),char(109),char(112),char(105),
-char(110),char(103),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(83),char(113),char(114),char(0),char(109),char(95),char(97),char(100),char(100),
-char(105),char(116),char(105),char(111),char(110),char(97),char(108),char(65),char(110),char(103),char(117),char(108),char(97),char(114),char(68),char(97),char(109),char(112),char(105),char(110),
-char(103),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(83),char(113),char(114),char(0),char(109),char(95),char(97),char(100),char(100),char(105),
-char(116),char(105),char(111),char(110),char(97),char(108),char(65),char(110),char(103),char(117),char(108),char(97),char(114),char(68),char(97),char(109),char(112),char(105),char(110),char(103),
-char(70),char(97),char(99),char(116),char(111),char(114),char(0),char(109),char(95),char(108),char(105),char(110),char(101),char(97),char(114),char(83),char(108),char(101),char(101),char(112),
-char(105),char(110),char(103),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(0),char(109),char(95),char(97),char(110),char(103),char(117),char(108),
-char(97),char(114),char(83),char(108),char(101),char(101),char(112),char(105),char(110),char(103),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(0),
-char(109),char(95),char(97),char(100),char(100),char(105),char(116),char(105),char(111),char(110),char(97),char(108),char(68),char(97),char(109),char(112),char(105),char(110),char(103),char(0),
-char(109),char(95),char(110),char(117),char(109),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(82),char(111),char(119),char(115),char(0),
-char(110),char(117),char(98),char(0),char(42),char(109),char(95),char(114),char(98),char(65),char(0),char(42),char(109),char(95),char(114),char(98),char(66),char(0),char(109),char(95),
-char(111),char(98),char(106),char(101),char(99),char(116),char(84),char(121),char(112),char(101),char(0),char(109),char(95),char(117),char(115),char(101),char(114),char(67),char(111),char(110),
-char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(84),char(121),char(112),char(101),char(0),char(109),char(95),char(117),char(115),char(101),char(114),char(67),char(111),
-char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(73),char(100),char(0),char(109),char(95),char(110),char(101),char(101),char(100),char(115),char(70),char(101),
-char(101),char(100),char(98),char(97),char(99),char(107),char(0),char(109),char(95),char(97),char(112),char(112),char(108),char(105),char(101),char(100),char(73),char(109),char(112),char(117),
-char(108),char(115),char(101),char(0),char(109),char(95),char(100),char(98),char(103),char(68),char(114),char(97),char(119),char(83),char(105),char(122),char(101),char(0),char(109),char(95),
-char(100),char(105),char(115),char(97),char(98),char(108),char(101),char(67),char(111),char(108),char(108),char(105),char(115),char(105),char(111),char(110),char(115),char(66),char(101),char(116),
-char(119),char(101),char(101),char(110),char(76),char(105),char(110),char(107),char(101),char(100),char(66),char(111),char(100),char(105),char(101),char(115),char(0),char(109),char(95),char(111),
-char(118),char(101),char(114),char(114),char(105),char(100),char(101),char(78),char(117),char(109),char(83),char(111),char(108),char(118),char(101),char(114),char(73),char(116),char(101),char(114),
-char(97),char(116),char(105),char(111),char(110),char(115),char(0),char(109),char(95),char(98),char(114),char(101),char(97),char(107),char(105),char(110),char(103),char(73),char(109),char(112),
-char(117),char(108),char(115),char(101),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(0),char(109),char(95),char(105),char(115),char(69),char(110),
-char(97),char(98),char(108),char(101),char(100),char(0),char(109),char(95),char(116),char(121),char(112),char(101),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),
-char(110),char(116),char(68),char(97),char(116),char(97),char(0),char(109),char(95),char(112),char(105),char(118),char(111),char(116),char(73),char(110),char(65),char(0),char(109),char(95),
-char(112),char(105),char(118),char(111),char(116),char(73),char(110),char(66),char(0),char(109),char(95),char(114),char(98),char(65),char(70),char(114),char(97),char(109),char(101),char(0),
-char(109),char(95),char(114),char(98),char(66),char(70),char(114),char(97),char(109),char(101),char(0),char(109),char(95),char(117),char(115),char(101),char(82),char(101),char(102),char(101),
-char(114),char(101),char(110),char(99),char(101),char(70),char(114),char(97),char(109),char(101),char(65),char(0),char(109),char(95),char(97),char(110),char(103),char(117),char(108),char(97),
-char(114),char(79),char(110),char(108),char(121),char(0),char(109),char(95),char(101),char(110),char(97),char(98),char(108),char(101),char(65),char(110),char(103),char(117),char(108),char(97),
-char(114),char(77),char(111),char(116),char(111),char(114),char(0),char(109),char(95),char(109),char(111),char(116),char(111),char(114),char(84),char(97),char(114),char(103),char(101),char(116),
-char(86),char(101),char(108),char(111),char(99),char(105),char(116),char(121),char(0),char(109),char(95),char(109),char(97),char(120),char(77),char(111),char(116),char(111),char(114),char(73),
-char(109),char(112),char(117),char(108),char(115),char(101),char(0),char(109),char(95),char(108),char(111),char(119),char(101),char(114),char(76),char(105),char(109),char(105),char(116),char(0),
-char(109),char(95),char(117),char(112),char(112),char(101),char(114),char(76),char(105),char(109),char(105),char(116),char(0),char(109),char(95),char(108),char(105),char(109),char(105),char(116),
-char(83),char(111),char(102),char(116),char(110),char(101),char(115),char(115),char(0),char(109),char(95),char(98),char(105),char(97),char(115),char(70),char(97),char(99),char(116),char(111),
-char(114),char(0),char(109),char(95),char(114),char(101),char(108),char(97),char(120),char(97),char(116),char(105),char(111),char(110),char(70),char(97),char(99),char(116),char(111),char(114),
-char(0),char(109),char(95),char(115),char(119),char(105),char(110),char(103),char(83),char(112),char(97),char(110),char(49),char(0),char(109),char(95),char(115),char(119),char(105),char(110),
-char(103),char(83),char(112),char(97),char(110),char(50),char(0),char(109),char(95),char(116),char(119),char(105),char(115),char(116),char(83),char(112),char(97),char(110),char(0),char(109),
-char(95),char(100),char(97),char(109),char(112),char(105),char(110),char(103),char(0),char(109),char(95),char(108),char(105),char(110),char(101),char(97),char(114),char(85),char(112),char(112),
-char(101),char(114),char(76),char(105),char(109),char(105),char(116),char(0),char(109),char(95),char(108),char(105),char(110),char(101),char(97),char(114),char(76),char(111),char(119),char(101),
-char(114),char(76),char(105),char(109),char(105),char(116),char(0),char(109),char(95),char(97),char(110),char(103),char(117),char(108),char(97),char(114),char(85),char(112),char(112),char(101),
-char(114),char(76),char(105),char(109),char(105),char(116),char(0),char(109),char(95),char(97),char(110),char(103),char(117),char(108),char(97),char(114),char(76),char(111),char(119),char(101),
-char(114),char(76),char(105),char(109),char(105),char(116),char(0),char(109),char(95),char(117),char(115),char(101),char(76),char(105),char(110),char(101),char(97),char(114),char(82),char(101),
-char(102),char(101),char(114),char(101),char(110),char(99),char(101),char(70),char(114),char(97),char(109),char(101),char(65),char(0),char(109),char(95),char(117),char(115),char(101),char(79),
-char(102),char(102),char(115),char(101),char(116),char(70),char(111),char(114),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(70),char(114),
-char(97),char(109),char(101),char(0),char(109),char(95),char(54),char(100),char(111),char(102),char(68),char(97),char(116),char(97),char(0),char(109),char(95),char(115),char(112),char(114),
-char(105),char(110),char(103),char(69),char(110),char(97),char(98),char(108),char(101),char(100),char(91),char(54),char(93),char(0),char(109),char(95),char(101),char(113),char(117),char(105),
-char(108),char(105),char(98),char(114),char(105),char(117),char(109),char(80),char(111),char(105),char(110),char(116),char(91),char(54),char(93),char(0),char(109),char(95),char(115),char(112),
-char(114),char(105),char(110),char(103),char(83),char(116),char(105),char(102),char(102),char(110),char(101),char(115),char(115),char(91),char(54),char(93),char(0),char(109),char(95),char(115),
-char(112),char(114),char(105),char(110),char(103),char(68),char(97),char(109),char(112),char(105),char(110),char(103),char(91),char(54),char(93),char(0),char(109),char(95),char(116),char(97),
-char(117),char(0),char(109),char(95),char(116),char(105),char(109),char(101),char(83),char(116),char(101),char(112),char(0),char(109),char(95),char(109),char(97),char(120),char(69),char(114),
-char(114),char(111),char(114),char(82),char(101),char(100),char(117),char(99),char(116),char(105),char(111),char(110),char(0),char(109),char(95),char(115),char(111),char(114),char(0),char(109),
-char(95),char(101),char(114),char(112),char(0),char(109),char(95),char(101),char(114),char(112),char(50),char(0),char(109),char(95),char(103),char(108),char(111),char(98),char(97),char(108),
-char(67),char(102),char(109),char(0),char(109),char(95),char(115),char(112),char(108),char(105),char(116),char(73),char(109),char(112),char(117),char(108),char(115),char(101),char(80),char(101),
-char(110),char(101),char(116),char(114),char(97),char(116),char(105),char(111),char(110),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(0),char(109),
-char(95),char(115),char(112),char(108),char(105),char(116),char(73),char(109),char(112),char(117),char(108),char(115),char(101),char(84),char(117),char(114),char(110),char(69),char(114),char(112),
-char(0),char(109),char(95),char(108),char(105),char(110),char(101),char(97),char(114),char(83),char(108),char(111),char(112),char(0),char(109),char(95),char(119),char(97),char(114),char(109),
-char(115),char(116),char(97),char(114),char(116),char(105),char(110),char(103),char(70),char(97),char(99),char(116),char(111),char(114),char(0),char(109),char(95),char(109),char(97),char(120),
-char(71),char(121),char(114),char(111),char(115),char(99),char(111),char(112),char(105),char(99),char(70),char(111),char(114),char(99),char(101),char(0),char(109),char(95),char(115),char(105),
-char(110),char(103),char(108),char(101),char(65),char(120),char(105),char(115),char(82),char(111),char(108),char(108),char(105),char(110),char(103),char(70),char(114),char(105),char(99),char(116),
-char(105),char(111),char(110),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(0),char(109),char(95),char(110),char(117),char(109),char(73),char(116),
-char(101),char(114),char(97),char(116),char(105),char(111),char(110),char(115),char(0),char(109),char(95),char(115),char(111),char(108),char(118),char(101),char(114),char(77),char(111),char(100),
-char(101),char(0),char(109),char(95),char(114),char(101),char(115),char(116),char(105),char(110),char(103),char(67),char(111),char(110),char(116),char(97),char(99),char(116),char(82),char(101),
-char(115),char(116),char(105),char(116),char(117),char(116),char(105),char(111),char(110),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(0),char(109),
-char(95),char(109),char(105),char(110),char(105),char(109),char(117),char(109),char(83),char(111),char(108),char(118),char(101),char(114),char(66),char(97),char(116),char(99),char(104),char(83),
-char(105),char(122),char(101),char(0),char(109),char(95),char(115),char(112),char(108),char(105),char(116),char(73),char(109),char(112),char(117),char(108),char(115),char(101),char(0),char(109),
-char(95),char(108),char(105),char(110),char(101),char(97),char(114),char(83),char(116),char(105),char(102),char(102),char(110),char(101),char(115),char(115),char(0),char(109),char(95),char(97),
-char(110),char(103),char(117),char(108),char(97),char(114),char(83),char(116),char(105),char(102),char(102),char(110),char(101),char(115),char(115),char(0),char(109),char(95),char(118),char(111),
-char(108),char(117),char(109),char(101),char(83),char(116),char(105),char(102),char(102),char(110),char(101),char(115),char(115),char(0),char(42),char(109),char(95),char(109),char(97),char(116),
-char(101),char(114),char(105),char(97),char(108),char(0),char(109),char(95),char(112),char(111),char(115),char(105),char(116),char(105),char(111),char(110),char(0),char(109),char(95),char(112),
-char(114),char(101),char(118),char(105),char(111),char(117),char(115),char(80),char(111),char(115),char(105),char(116),char(105),char(111),char(110),char(0),char(109),char(95),char(118),char(101),
-char(108),char(111),char(99),char(105),char(116),char(121),char(0),char(109),char(95),char(97),char(99),char(99),char(117),char(109),char(117),char(108),char(97),char(116),char(101),char(100),
-char(70),char(111),char(114),char(99),char(101),char(0),char(109),char(95),char(110),char(111),char(114),char(109),char(97),char(108),char(0),char(109),char(95),char(97),char(114),char(101),
-char(97),char(0),char(109),char(95),char(97),char(116),char(116),char(97),char(99),char(104),char(0),char(109),char(95),char(110),char(111),char(100),char(101),char(73),char(110),char(100),
-char(105),char(99),char(101),char(115),char(91),char(50),char(93),char(0),char(109),char(95),char(114),char(101),char(115),char(116),char(76),char(101),char(110),char(103),char(116),char(104),
-char(0),char(109),char(95),char(98),char(98),char(101),char(110),char(100),char(105),char(110),char(103),char(0),char(109),char(95),char(110),char(111),char(100),char(101),char(73),char(110),
-char(100),char(105),char(99),char(101),char(115),char(91),char(51),char(93),char(0),char(109),char(95),char(114),char(101),char(115),char(116),char(65),char(114),char(101),char(97),char(0),
-char(109),char(95),char(99),char(48),char(91),char(52),char(93),char(0),char(109),char(95),char(110),char(111),char(100),char(101),char(73),char(110),char(100),char(105),char(99),char(101),
-char(115),char(91),char(52),char(93),char(0),char(109),char(95),char(114),char(101),char(115),char(116),char(86),char(111),char(108),char(117),char(109),char(101),char(0),char(109),char(95),
-char(99),char(49),char(0),char(109),char(95),char(99),char(50),char(0),char(109),char(95),char(99),char(48),char(0),char(109),char(95),char(108),char(111),char(99),char(97),char(108),
-char(70),char(114),char(97),char(109),char(101),char(0),char(42),char(109),char(95),char(114),char(105),char(103),char(105),char(100),char(66),char(111),char(100),char(121),char(0),char(109),
-char(95),char(110),char(111),char(100),char(101),char(73),char(110),char(100),char(101),char(120),char(0),char(109),char(95),char(97),char(101),char(114),char(111),char(77),char(111),char(100),
-char(101),char(108),char(0),char(109),char(95),char(98),char(97),char(117),char(109),char(103),char(97),char(114),char(116),char(101),char(0),char(109),char(95),char(100),char(114),char(97),
-char(103),char(0),char(109),char(95),char(108),char(105),char(102),char(116),char(0),char(109),char(95),char(112),char(114),char(101),char(115),char(115),char(117),char(114),char(101),char(0),
-char(109),char(95),char(118),char(111),char(108),char(117),char(109),char(101),char(0),char(109),char(95),char(100),char(121),char(110),char(97),char(109),char(105),char(99),char(70),char(114),
-char(105),char(99),char(116),char(105),char(111),char(110),char(0),char(109),char(95),char(112),char(111),char(115),char(101),char(77),char(97),char(116),char(99),char(104),char(0),char(109),
-char(95),char(114),char(105),char(103),char(105),char(100),char(67),char(111),char(110),char(116),char(97),char(99),char(116),char(72),char(97),char(114),char(100),char(110),char(101),char(115),
-char(115),char(0),char(109),char(95),char(107),char(105),char(110),char(101),char(116),char(105),char(99),char(67),char(111),char(110),char(116),char(97),char(99),char(116),char(72),char(97),
-char(114),char(100),char(110),char(101),char(115),char(115),char(0),char(109),char(95),char(115),char(111),char(102),char(116),char(67),char(111),char(110),char(116),char(97),char(99),char(116),
-char(72),char(97),char(114),char(100),char(110),char(101),char(115),char(115),char(0),char(109),char(95),char(97),char(110),char(99),char(104),char(111),char(114),char(72),char(97),char(114),
-char(100),char(110),char(101),char(115),char(115),char(0),char(109),char(95),char(115),char(111),char(102),char(116),char(82),char(105),char(103),char(105),char(100),char(67),char(108),char(117),
-char(115),char(116),char(101),char(114),char(72),char(97),char(114),char(100),char(110),char(101),char(115),char(115),char(0),char(109),char(95),char(115),char(111),char(102),char(116),char(75),
-char(105),char(110),char(101),char(116),char(105),char(99),char(67),char(108),char(117),char(115),char(116),char(101),char(114),char(72),char(97),char(114),char(100),char(110),char(101),char(115),
-char(115),char(0),char(109),char(95),char(115),char(111),char(102),char(116),char(83),char(111),char(102),char(116),char(67),char(108),char(117),char(115),char(116),char(101),char(114),char(72),
-char(97),char(114),char(100),char(110),char(101),char(115),char(115),char(0),char(109),char(95),char(115),char(111),char(102),char(116),char(82),char(105),char(103),char(105),char(100),char(67),
-char(108),char(117),char(115),char(116),char(101),char(114),char(73),char(109),char(112),char(117),char(108),char(115),char(101),char(83),char(112),char(108),char(105),char(116),char(0),char(109),
-char(95),char(115),char(111),char(102),char(116),char(75),char(105),char(110),char(101),char(116),char(105),char(99),char(67),char(108),char(117),char(115),char(116),char(101),char(114),char(73),
-char(109),char(112),char(117),char(108),char(115),char(101),char(83),char(112),char(108),char(105),char(116),char(0),char(109),char(95),char(115),char(111),char(102),char(116),char(83),char(111),
-char(102),char(116),char(67),char(108),char(117),char(115),char(116),char(101),char(114),char(73),char(109),char(112),char(117),char(108),char(115),char(101),char(83),char(112),char(108),char(105),
-char(116),char(0),char(109),char(95),char(109),char(97),char(120),char(86),char(111),char(108),char(117),char(109),char(101),char(0),char(109),char(95),char(116),char(105),char(109),char(101),
-char(83),char(99),char(97),char(108),char(101),char(0),char(109),char(95),char(118),char(101),char(108),char(111),char(99),char(105),char(116),char(121),char(73),char(116),char(101),char(114),
-char(97),char(116),char(105),char(111),char(110),char(115),char(0),char(109),char(95),char(112),char(111),char(115),char(105),char(116),char(105),char(111),char(110),char(73),char(116),char(101),
-char(114),char(97),char(116),char(105),char(111),char(110),char(115),char(0),char(109),char(95),char(100),char(114),char(105),char(102),char(116),char(73),char(116),char(101),char(114),char(97),
-char(116),char(105),char(111),char(110),char(115),char(0),char(109),char(95),char(99),char(108),char(117),char(115),char(116),char(101),char(114),char(73),char(116),char(101),char(114),char(97),
-char(116),char(105),char(111),char(110),char(115),char(0),char(109),char(95),char(114),char(111),char(116),char(0),char(109),char(95),char(115),char(99),char(97),char(108),char(101),char(0),
-char(109),char(95),char(97),char(113),char(113),char(0),char(109),char(95),char(99),char(111),char(109),char(0),char(42),char(109),char(95),char(112),char(111),char(115),char(105),char(116),
-char(105),char(111),char(110),char(115),char(0),char(42),char(109),char(95),char(119),char(101),char(105),char(103),char(104),char(116),char(115),char(0),char(109),char(95),char(110),char(117),
-char(109),char(80),char(111),char(115),char(105),char(116),char(105),char(111),char(110),char(115),char(0),char(109),char(95),char(110),char(117),char(109),char(87),char(101),char(105),char(103),
-char(116),char(115),char(0),char(109),char(95),char(98),char(118),char(111),char(108),char(117),char(109),char(101),char(0),char(109),char(95),char(98),char(102),char(114),char(97),char(109),
-char(101),char(0),char(109),char(95),char(102),char(114),char(97),char(109),char(101),char(120),char(102),char(111),char(114),char(109),char(0),char(109),char(95),char(108),char(111),char(99),
-char(105),char(105),char(0),char(109),char(95),char(105),char(110),char(118),char(119),char(105),char(0),char(109),char(95),char(118),char(105),char(109),char(112),char(117),char(108),char(115),
-char(101),char(115),char(91),char(50),char(93),char(0),char(109),char(95),char(100),char(105),char(109),char(112),char(117),char(108),char(115),char(101),char(115),char(91),char(50),char(93),
-char(0),char(109),char(95),char(108),char(118),char(0),char(109),char(95),char(97),char(118),char(0),char(42),char(109),char(95),char(102),char(114),char(97),char(109),char(101),char(114),
-char(101),char(102),char(115),char(0),char(42),char(109),char(95),char(110),char(111),char(100),char(101),char(73),char(110),char(100),char(105),char(99),char(101),char(115),char(0),char(42),
-char(109),char(95),char(109),char(97),char(115),char(115),char(101),char(115),char(0),char(109),char(95),char(110),char(117),char(109),char(70),char(114),char(97),char(109),char(101),char(82),
-char(101),char(102),char(115),char(0),char(109),char(95),char(110),char(117),char(109),char(78),char(111),char(100),char(101),char(115),char(0),char(109),char(95),char(110),char(117),char(109),
-char(77),char(97),char(115),char(115),char(101),char(115),char(0),char(109),char(95),char(105),char(100),char(109),char(97),char(115),char(115),char(0),char(109),char(95),char(105),char(109),
-char(97),char(115),char(115),char(0),char(109),char(95),char(110),char(118),char(105),char(109),char(112),char(117),char(108),char(115),char(101),char(115),char(0),char(109),char(95),char(110),
-char(100),char(105),char(109),char(112),char(117),char(108),char(115),char(101),char(115),char(0),char(109),char(95),char(110),char(100),char(97),char(109),char(112),char(105),char(110),char(103),
-char(0),char(109),char(95),char(108),char(100),char(97),char(109),char(112),char(105),char(110),char(103),char(0),char(109),char(95),char(97),char(100),char(97),char(109),char(112),char(105),
-char(110),char(103),char(0),char(109),char(95),char(109),char(97),char(116),char(99),char(104),char(105),char(110),char(103),char(0),char(109),char(95),char(109),char(97),char(120),char(83),
-char(101),char(108),char(102),char(67),char(111),char(108),char(108),char(105),char(115),char(105),char(111),char(110),char(73),char(109),char(112),char(117),char(108),char(115),char(101),char(0),
-char(109),char(95),char(115),char(101),char(108),char(102),char(67),char(111),char(108),char(108),char(105),char(115),char(105),char(111),char(110),char(73),char(109),char(112),char(117),char(108),
-char(115),char(101),char(70),char(97),char(99),char(116),char(111),char(114),char(0),char(109),char(95),char(99),char(111),char(110),char(116),char(97),char(105),char(110),char(115),char(65),
-char(110),char(99),char(104),char(111),char(114),char(0),char(109),char(95),char(99),char(111),char(108),char(108),char(105),char(100),char(101),char(0),char(109),char(95),char(99),char(108),
-char(117),char(115),char(116),char(101),char(114),char(73),char(110),char(100),char(101),char(120),char(0),char(42),char(109),char(95),char(98),char(111),char(100),char(121),char(65),char(0),
-char(42),char(109),char(95),char(98),char(111),char(100),char(121),char(66),char(0),char(109),char(95),char(114),char(101),char(102),char(115),char(91),char(50),char(93),char(0),char(109),
-char(95),char(99),char(102),char(109),char(0),char(109),char(95),char(115),char(112),char(108),char(105),char(116),char(0),char(109),char(95),char(100),char(101),char(108),char(101),char(116),
-char(101),char(0),char(109),char(95),char(114),char(101),char(108),char(80),char(111),char(115),char(105),char(116),char(105),char(111),char(110),char(91),char(50),char(93),char(0),char(109),
-char(95),char(98),char(111),char(100),char(121),char(65),char(116),char(121),char(112),char(101),char(0),char(109),char(95),char(98),char(111),char(100),char(121),char(66),char(116),char(121),
-char(112),char(101),char(0),char(109),char(95),char(106),char(111),char(105),char(110),char(116),char(84),char(121),char(112),char(101),char(0),char(42),char(109),char(95),char(112),char(111),
-char(115),char(101),char(0),char(42),char(42),char(109),char(95),char(109),char(97),char(116),char(101),char(114),char(105),char(97),char(108),char(115),char(0),char(42),char(109),char(95),
-char(110),char(111),char(100),char(101),char(115),char(0),char(42),char(109),char(95),char(108),char(105),char(110),char(107),char(115),char(0),char(42),char(109),char(95),char(102),char(97),
-char(99),char(101),char(115),char(0),char(42),char(109),char(95),char(116),char(101),char(116),char(114),char(97),char(104),char(101),char(100),char(114),char(97),char(0),char(42),char(109),
-char(95),char(97),char(110),char(99),char(104),char(111),char(114),char(115),char(0),char(42),char(109),char(95),char(99),char(108),char(117),char(115),char(116),char(101),char(114),char(115),
-char(0),char(42),char(109),char(95),char(106),char(111),char(105),char(110),char(116),char(115),char(0),char(109),char(95),char(110),char(117),char(109),char(77),char(97),char(116),char(101),
-char(114),char(105),char(97),char(108),char(115),char(0),char(109),char(95),char(110),char(117),char(109),char(76),char(105),char(110),char(107),char(115),char(0),char(109),char(95),char(110),
-char(117),char(109),char(70),char(97),char(99),char(101),char(115),char(0),char(109),char(95),char(110),char(117),char(109),char(84),char(101),char(116),char(114),char(97),char(104),char(101),
-char(100),char(114),char(97),char(0),char(109),char(95),char(110),char(117),char(109),char(65),char(110),char(99),char(104),char(111),char(114),char(115),char(0),char(109),char(95),char(110),
-char(117),char(109),char(67),char(108),char(117),char(115),char(116),char(101),char(114),char(115),char(0),char(109),char(95),char(110),char(117),char(109),char(74),char(111),char(105),char(110),
-char(116),char(115),char(0),char(109),char(95),char(99),char(111),char(110),char(102),char(105),char(103),char(0),char(84),char(89),char(80),char(69),char(76),char(0),char(0),char(0),
-char(99),char(104),char(97),char(114),char(0),char(117),char(99),char(104),char(97),char(114),char(0),char(115),char(104),char(111),char(114),char(116),char(0),char(117),char(115),char(104),
-char(111),char(114),char(116),char(0),char(105),char(110),char(116),char(0),char(108),char(111),char(110),char(103),char(0),char(117),char(108),char(111),char(110),char(103),char(0),char(102),
-char(108),char(111),char(97),char(116),char(0),char(100),char(111),char(117),char(98),char(108),char(101),char(0),char(118),char(111),char(105),char(100),char(0),char(80),char(111),char(105),
-char(110),char(116),char(101),char(114),char(65),char(114),char(114),char(97),char(121),char(0),char(98),char(116),char(80),char(104),char(121),char(115),char(105),char(99),char(115),char(83),
-char(121),char(115),char(116),char(101),char(109),char(0),char(76),char(105),char(115),char(116),char(66),char(97),char(115),char(101),char(0),char(98),char(116),char(86),char(101),char(99),
-char(116),char(111),char(114),char(51),char(70),char(108),char(111),char(97),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(86),char(101),char(99),char(116),
-char(111),char(114),char(51),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(77),char(97),char(116),char(114),
-char(105),char(120),char(51),char(120),char(51),char(70),char(108),char(111),char(97),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(77),char(97),char(116),
-char(114),char(105),char(120),char(51),char(120),char(51),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(84),
-char(114),char(97),char(110),char(115),char(102),char(111),char(114),char(109),char(70),char(108),char(111),char(97),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),
-char(84),char(114),char(97),char(110),char(115),char(102),char(111),char(114),char(109),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),char(0),
-char(98),char(116),char(66),char(118),char(104),char(83),char(117),char(98),char(116),char(114),char(101),char(101),char(73),char(110),char(102),char(111),char(68),char(97),char(116),char(97),
-char(0),char(98),char(116),char(79),char(112),char(116),char(105),char(109),char(105),char(122),char(101),char(100),char(66),char(118),char(104),char(78),char(111),char(100),char(101),char(70),
-char(108),char(111),char(97),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(79),char(112),char(116),char(105),char(109),char(105),char(122),char(101),char(100),
-char(66),char(118),char(104),char(78),char(111),char(100),char(101),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),
-char(81),char(117),char(97),char(110),char(116),char(105),char(122),char(101),char(100),char(66),char(118),char(104),char(78),char(111),char(100),char(101),char(68),char(97),char(116),char(97),
-char(0),char(98),char(116),char(81),char(117),char(97),char(110),char(116),char(105),char(122),char(101),char(100),char(66),char(118),char(104),char(70),char(108),char(111),char(97),char(116),
-char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(81),char(117),char(97),char(110),char(116),char(105),char(122),char(101),char(100),char(66),char(118),char(104),char(68),
-char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(67),char(111),char(108),char(108),char(105),char(115),char(105),char(111),
-char(110),char(83),char(104),char(97),char(112),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(83),char(116),char(97),char(116),char(105),char(99),char(80),
-char(108),char(97),char(110),char(101),char(83),char(104),char(97),char(112),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(67),char(111),char(110),char(118),
-char(101),char(120),char(73),char(110),char(116),char(101),char(114),char(110),char(97),char(108),char(83),char(104),char(97),char(112),char(101),char(68),char(97),char(116),char(97),char(0),
-char(98),char(116),char(80),char(111),char(115),char(105),char(116),char(105),char(111),char(110),char(65),char(110),char(100),char(82),char(97),char(100),char(105),char(117),char(115),char(0),
-char(98),char(116),char(77),char(117),char(108),char(116),char(105),char(83),char(112),char(104),char(101),char(114),char(101),char(83),char(104),char(97),char(112),char(101),char(68),char(97),
-char(116),char(97),char(0),char(98),char(116),char(73),char(110),char(116),char(73),char(110),char(100),char(101),char(120),char(68),char(97),char(116),char(97),char(0),char(98),char(116),
-char(83),char(104),char(111),char(114),char(116),char(73),char(110),char(116),char(73),char(110),char(100),char(101),char(120),char(68),char(97),char(116),char(97),char(0),char(98),char(116),
-char(83),char(104),char(111),char(114),char(116),char(73),char(110),char(116),char(73),char(110),char(100),char(101),char(120),char(84),char(114),char(105),char(112),char(108),char(101),char(116),
-char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(67),char(104),char(97),char(114),char(73),char(110),char(100),char(101),char(120),char(84),char(114),char(105),char(112),
-char(108),char(101),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(77),char(101),char(115),char(104),char(80),char(97),char(114),char(116),char(68),char(97),
-char(116),char(97),char(0),char(98),char(116),char(83),char(116),char(114),char(105),char(100),char(105),char(110),char(103),char(77),char(101),char(115),char(104),char(73),char(110),char(116),
-char(101),char(114),char(102),char(97),char(99),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(84),char(114),char(105),char(97),char(110),char(103),char(108),
-char(101),char(77),char(101),char(115),char(104),char(83),char(104),char(97),char(112),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(84),char(114),char(105),
-char(97),char(110),char(103),char(108),char(101),char(73),char(110),char(102),char(111),char(77),char(97),char(112),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(83),
-char(99),char(97),char(108),char(101),char(100),char(84),char(114),char(105),char(97),char(110),char(103),char(108),char(101),char(77),char(101),char(115),char(104),char(83),char(104),char(97),
-char(112),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(67),char(111),char(109),char(112),char(111),char(117),char(110),char(100),char(83),char(104),char(97),
-char(112),char(101),char(67),char(104),char(105),char(108),char(100),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(67),char(111),char(109),char(112),char(111),char(117),
-char(110),char(100),char(83),char(104),char(97),char(112),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(67),char(121),char(108),char(105),char(110),char(100),
-char(101),char(114),char(83),char(104),char(97),char(112),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(67),char(97),char(112),char(115),char(117),char(108),
+char(111),char(110),char(87),char(111),char(114),char(108),char(100),char(84),char(114),char(97),char(110),char(115),char(102),char(111),char(114),char(109),char(0),char(109),char(95),char(105),
+char(110),char(116),char(101),char(114),char(112),char(111),char(108),char(97),char(116),char(105),char(111),char(110),char(76),char(105),char(110),char(101),char(97),char(114),char(86),char(101),
+char(108),char(111),char(99),char(105),char(116),char(121),char(0),char(109),char(95),char(105),char(110),char(116),char(101),char(114),char(112),char(111),char(108),char(97),char(116),char(105),
+char(111),char(110),char(65),char(110),char(103),char(117),char(108),char(97),char(114),char(86),char(101),char(108),char(111),char(99),char(105),char(116),char(121),char(0),char(109),char(95),
+char(97),char(110),char(105),char(115),char(111),char(116),char(114),char(111),char(112),char(105),char(99),char(70),char(114),char(105),char(99),char(116),char(105),char(111),char(110),char(0),
+char(109),char(95),char(99),char(111),char(110),char(116),char(97),char(99),char(116),char(80),char(114),char(111),char(99),char(101),char(115),char(115),char(105),char(110),char(103),char(84),
+char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(0),char(109),char(95),char(100),char(101),char(97),char(99),char(116),char(105),char(118),char(97),char(116),
+char(105),char(111),char(110),char(84),char(105),char(109),char(101),char(0),char(109),char(95),char(102),char(114),char(105),char(99),char(116),char(105),char(111),char(110),char(0),char(109),
+char(95),char(114),char(111),char(108),char(108),char(105),char(110),char(103),char(70),char(114),char(105),char(99),char(116),char(105),char(111),char(110),char(0),char(109),char(95),char(114),
+char(101),char(115),char(116),char(105),char(116),char(117),char(116),char(105),char(111),char(110),char(0),char(109),char(95),char(104),char(105),char(116),char(70),char(114),char(97),char(99),
+char(116),char(105),char(111),char(110),char(0),char(109),char(95),char(99),char(99),char(100),char(83),char(119),char(101),char(112),char(116),char(83),char(112),char(104),char(101),char(114),
+char(101),char(82),char(97),char(100),char(105),char(117),char(115),char(0),char(109),char(95),char(99),char(99),char(100),char(77),char(111),char(116),char(105),char(111),char(110),char(84),
+char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(0),char(109),char(95),char(104),char(97),char(115),char(65),char(110),char(105),char(115),char(111),char(116),
+char(114),char(111),char(112),char(105),char(99),char(70),char(114),char(105),char(99),char(116),char(105),char(111),char(110),char(0),char(109),char(95),char(99),char(111),char(108),char(108),
+char(105),char(115),char(105),char(111),char(110),char(70),char(108),char(97),char(103),char(115),char(0),char(109),char(95),char(105),char(115),char(108),char(97),char(110),char(100),char(84),
+char(97),char(103),char(49),char(0),char(109),char(95),char(99),char(111),char(109),char(112),char(97),char(110),char(105),char(111),char(110),char(73),char(100),char(0),char(109),char(95),
+char(97),char(99),char(116),char(105),char(118),char(97),char(116),char(105),char(111),char(110),char(83),char(116),char(97),char(116),char(101),char(49),char(0),char(109),char(95),char(105),
+char(110),char(116),char(101),char(114),char(110),char(97),char(108),char(84),char(121),char(112),char(101),char(0),char(109),char(95),char(99),char(104),char(101),char(99),char(107),char(67),
+char(111),char(108),char(108),char(105),char(100),char(101),char(87),char(105),char(116),char(104),char(0),char(109),char(95),char(115),char(111),char(108),char(118),char(101),char(114),char(73),
+char(110),char(102),char(111),char(0),char(109),char(95),char(103),char(114),char(97),char(118),char(105),char(116),char(121),char(0),char(109),char(95),char(99),char(111),char(108),char(108),
+char(105),char(115),char(105),char(111),char(110),char(79),char(98),char(106),char(101),char(99),char(116),char(68),char(97),char(116),char(97),char(0),char(109),char(95),char(105),char(110),
+char(118),char(73),char(110),char(101),char(114),char(116),char(105),char(97),char(84),char(101),char(110),char(115),char(111),char(114),char(87),char(111),char(114),char(108),char(100),char(0),
+char(109),char(95),char(108),char(105),char(110),char(101),char(97),char(114),char(86),char(101),char(108),char(111),char(99),char(105),char(116),char(121),char(0),char(109),char(95),char(97),
+char(110),char(103),char(117),char(108),char(97),char(114),char(86),char(101),char(108),char(111),char(99),char(105),char(116),char(121),char(0),char(109),char(95),char(97),char(110),char(103),
+char(117),char(108),char(97),char(114),char(70),char(97),char(99),char(116),char(111),char(114),char(0),char(109),char(95),char(108),char(105),char(110),char(101),char(97),char(114),char(70),
+char(97),char(99),char(116),char(111),char(114),char(0),char(109),char(95),char(103),char(114),char(97),char(118),char(105),char(116),char(121),char(95),char(97),char(99),char(99),char(101),
+char(108),char(101),char(114),char(97),char(116),char(105),char(111),char(110),char(0),char(109),char(95),char(105),char(110),char(118),char(73),char(110),char(101),char(114),char(116),char(105),
+char(97),char(76),char(111),char(99),char(97),char(108),char(0),char(109),char(95),char(116),char(111),char(116),char(97),char(108),char(70),char(111),char(114),char(99),char(101),char(0),
+char(109),char(95),char(116),char(111),char(116),char(97),char(108),char(84),char(111),char(114),char(113),char(117),char(101),char(0),char(109),char(95),char(105),char(110),char(118),char(101),
+char(114),char(115),char(101),char(77),char(97),char(115),char(115),char(0),char(109),char(95),char(108),char(105),char(110),char(101),char(97),char(114),char(68),char(97),char(109),char(112),
+char(105),char(110),char(103),char(0),char(109),char(95),char(97),char(110),char(103),char(117),char(108),char(97),char(114),char(68),char(97),char(109),char(112),char(105),char(110),char(103),
+char(0),char(109),char(95),char(97),char(100),char(100),char(105),char(116),char(105),char(111),char(110),char(97),char(108),char(68),char(97),char(109),char(112),char(105),char(110),char(103),
+char(70),char(97),char(99),char(116),char(111),char(114),char(0),char(109),char(95),char(97),char(100),char(100),char(105),char(116),char(105),char(111),char(110),char(97),char(108),char(76),
+char(105),char(110),char(101),char(97),char(114),char(68),char(97),char(109),char(112),char(105),char(110),char(103),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),
+char(100),char(83),char(113),char(114),char(0),char(109),char(95),char(97),char(100),char(100),char(105),char(116),char(105),char(111),char(110),char(97),char(108),char(65),char(110),char(103),
+char(117),char(108),char(97),char(114),char(68),char(97),char(109),char(112),char(105),char(110),char(103),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),
+char(83),char(113),char(114),char(0),char(109),char(95),char(97),char(100),char(100),char(105),char(116),char(105),char(111),char(110),char(97),char(108),char(65),char(110),char(103),char(117),
+char(108),char(97),char(114),char(68),char(97),char(109),char(112),char(105),char(110),char(103),char(70),char(97),char(99),char(116),char(111),char(114),char(0),char(109),char(95),char(108),
+char(105),char(110),char(101),char(97),char(114),char(83),char(108),char(101),char(101),char(112),char(105),char(110),char(103),char(84),char(104),char(114),char(101),char(115),char(104),char(111),
+char(108),char(100),char(0),char(109),char(95),char(97),char(110),char(103),char(117),char(108),char(97),char(114),char(83),char(108),char(101),char(101),char(112),char(105),char(110),char(103),
+char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(0),char(109),char(95),char(97),char(100),char(100),char(105),char(116),char(105),char(111),char(110),
+char(97),char(108),char(68),char(97),char(109),char(112),char(105),char(110),char(103),char(0),char(109),char(95),char(110),char(117),char(109),char(67),char(111),char(110),char(115),char(116),
+char(114),char(97),char(105),char(110),char(116),char(82),char(111),char(119),char(115),char(0),char(110),char(117),char(98),char(0),char(42),char(109),char(95),char(114),char(98),char(65),
+char(0),char(42),char(109),char(95),char(114),char(98),char(66),char(0),char(109),char(95),char(111),char(98),char(106),char(101),char(99),char(116),char(84),char(121),char(112),char(101),
+char(0),char(109),char(95),char(117),char(115),char(101),char(114),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(84),char(121),char(112),
+char(101),char(0),char(109),char(95),char(117),char(115),char(101),char(114),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(73),char(100),
+char(0),char(109),char(95),char(110),char(101),char(101),char(100),char(115),char(70),char(101),char(101),char(100),char(98),char(97),char(99),char(107),char(0),char(109),char(95),char(97),
+char(112),char(112),char(108),char(105),char(101),char(100),char(73),char(109),char(112),char(117),char(108),char(115),char(101),char(0),char(109),char(95),char(100),char(98),char(103),char(68),
+char(114),char(97),char(119),char(83),char(105),char(122),char(101),char(0),char(109),char(95),char(100),char(105),char(115),char(97),char(98),char(108),char(101),char(67),char(111),char(108),
+char(108),char(105),char(115),char(105),char(111),char(110),char(115),char(66),char(101),char(116),char(119),char(101),char(101),char(110),char(76),char(105),char(110),char(107),char(101),char(100),
+char(66),char(111),char(100),char(105),char(101),char(115),char(0),char(109),char(95),char(111),char(118),char(101),char(114),char(114),char(105),char(100),char(101),char(78),char(117),char(109),
+char(83),char(111),char(108),char(118),char(101),char(114),char(73),char(116),char(101),char(114),char(97),char(116),char(105),char(111),char(110),char(115),char(0),char(109),char(95),char(98),
+char(114),char(101),char(97),char(107),char(105),char(110),char(103),char(73),char(109),char(112),char(117),char(108),char(115),char(101),char(84),char(104),char(114),char(101),char(115),char(104),
+char(111),char(108),char(100),char(0),char(109),char(95),char(105),char(115),char(69),char(110),char(97),char(98),char(108),char(101),char(100),char(0),char(112),char(97),char(100),char(100),
+char(105),char(110),char(103),char(91),char(52),char(93),char(0),char(109),char(95),char(116),char(121),char(112),char(101),char(67),char(111),char(110),char(115),char(116),char(114),char(97),
+char(105),char(110),char(116),char(68),char(97),char(116),char(97),char(0),char(109),char(95),char(112),char(105),char(118),char(111),char(116),char(73),char(110),char(65),char(0),char(109),
+char(95),char(112),char(105),char(118),char(111),char(116),char(73),char(110),char(66),char(0),char(109),char(95),char(114),char(98),char(65),char(70),char(114),char(97),char(109),char(101),
+char(0),char(109),char(95),char(114),char(98),char(66),char(70),char(114),char(97),char(109),char(101),char(0),char(109),char(95),char(117),char(115),char(101),char(82),char(101),char(102),
+char(101),char(114),char(101),char(110),char(99),char(101),char(70),char(114),char(97),char(109),char(101),char(65),char(0),char(109),char(95),char(97),char(110),char(103),char(117),char(108),
+char(97),char(114),char(79),char(110),char(108),char(121),char(0),char(109),char(95),char(101),char(110),char(97),char(98),char(108),char(101),char(65),char(110),char(103),char(117),char(108),
+char(97),char(114),char(77),char(111),char(116),char(111),char(114),char(0),char(109),char(95),char(109),char(111),char(116),char(111),char(114),char(84),char(97),char(114),char(103),char(101),
+char(116),char(86),char(101),char(108),char(111),char(99),char(105),char(116),char(121),char(0),char(109),char(95),char(109),char(97),char(120),char(77),char(111),char(116),char(111),char(114),
+char(73),char(109),char(112),char(117),char(108),char(115),char(101),char(0),char(109),char(95),char(108),char(111),char(119),char(101),char(114),char(76),char(105),char(109),char(105),char(116),
+char(0),char(109),char(95),char(117),char(112),char(112),char(101),char(114),char(76),char(105),char(109),char(105),char(116),char(0),char(109),char(95),char(108),char(105),char(109),char(105),
+char(116),char(83),char(111),char(102),char(116),char(110),char(101),char(115),char(115),char(0),char(109),char(95),char(98),char(105),char(97),char(115),char(70),char(97),char(99),char(116),
+char(111),char(114),char(0),char(109),char(95),char(114),char(101),char(108),char(97),char(120),char(97),char(116),char(105),char(111),char(110),char(70),char(97),char(99),char(116),char(111),
+char(114),char(0),char(109),char(95),char(112),char(97),char(100),char(100),char(105),char(110),char(103),char(49),char(91),char(52),char(93),char(0),char(109),char(95),char(115),char(119),
+char(105),char(110),char(103),char(83),char(112),char(97),char(110),char(49),char(0),char(109),char(95),char(115),char(119),char(105),char(110),char(103),char(83),char(112),char(97),char(110),
+char(50),char(0),char(109),char(95),char(116),char(119),char(105),char(115),char(116),char(83),char(112),char(97),char(110),char(0),char(109),char(95),char(100),char(97),char(109),char(112),
+char(105),char(110),char(103),char(0),char(109),char(95),char(108),char(105),char(110),char(101),char(97),char(114),char(85),char(112),char(112),char(101),char(114),char(76),char(105),char(109),
+char(105),char(116),char(0),char(109),char(95),char(108),char(105),char(110),char(101),char(97),char(114),char(76),char(111),char(119),char(101),char(114),char(76),char(105),char(109),char(105),
+char(116),char(0),char(109),char(95),char(97),char(110),char(103),char(117),char(108),char(97),char(114),char(85),char(112),char(112),char(101),char(114),char(76),char(105),char(109),char(105),
+char(116),char(0),char(109),char(95),char(97),char(110),char(103),char(117),char(108),char(97),char(114),char(76),char(111),char(119),char(101),char(114),char(76),char(105),char(109),char(105),
+char(116),char(0),char(109),char(95),char(117),char(115),char(101),char(76),char(105),char(110),char(101),char(97),char(114),char(82),char(101),char(102),char(101),char(114),char(101),char(110),
+char(99),char(101),char(70),char(114),char(97),char(109),char(101),char(65),char(0),char(109),char(95),char(117),char(115),char(101),char(79),char(102),char(102),char(115),char(101),char(116),
+char(70),char(111),char(114),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(70),char(114),char(97),char(109),char(101),char(0),char(109),
+char(95),char(54),char(100),char(111),char(102),char(68),char(97),char(116),char(97),char(0),char(109),char(95),char(115),char(112),char(114),char(105),char(110),char(103),char(69),char(110),
+char(97),char(98),char(108),char(101),char(100),char(91),char(54),char(93),char(0),char(109),char(95),char(101),char(113),char(117),char(105),char(108),char(105),char(98),char(114),char(105),
+char(117),char(109),char(80),char(111),char(105),char(110),char(116),char(91),char(54),char(93),char(0),char(109),char(95),char(115),char(112),char(114),char(105),char(110),char(103),char(83),
+char(116),char(105),char(102),char(102),char(110),char(101),char(115),char(115),char(91),char(54),char(93),char(0),char(109),char(95),char(115),char(112),char(114),char(105),char(110),char(103),
+char(68),char(97),char(109),char(112),char(105),char(110),char(103),char(91),char(54),char(93),char(0),char(109),char(95),char(97),char(120),char(105),char(115),char(73),char(110),char(65),
+char(0),char(109),char(95),char(97),char(120),char(105),char(115),char(73),char(110),char(66),char(0),char(109),char(95),char(114),char(97),char(116),char(105),char(111),char(0),char(109),
+char(95),char(116),char(97),char(117),char(0),char(109),char(95),char(116),char(105),char(109),char(101),char(83),char(116),char(101),char(112),char(0),char(109),char(95),char(109),char(97),
+char(120),char(69),char(114),char(114),char(111),char(114),char(82),char(101),char(100),char(117),char(99),char(116),char(105),char(111),char(110),char(0),char(109),char(95),char(115),char(111),
+char(114),char(0),char(109),char(95),char(101),char(114),char(112),char(0),char(109),char(95),char(101),char(114),char(112),char(50),char(0),char(109),char(95),char(103),char(108),char(111),
+char(98),char(97),char(108),char(67),char(102),char(109),char(0),char(109),char(95),char(115),char(112),char(108),char(105),char(116),char(73),char(109),char(112),char(117),char(108),char(115),
+char(101),char(80),char(101),char(110),char(101),char(116),char(114),char(97),char(116),char(105),char(111),char(110),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),
+char(100),char(0),char(109),char(95),char(115),char(112),char(108),char(105),char(116),char(73),char(109),char(112),char(117),char(108),char(115),char(101),char(84),char(117),char(114),char(110),
+char(69),char(114),char(112),char(0),char(109),char(95),char(108),char(105),char(110),char(101),char(97),char(114),char(83),char(108),char(111),char(112),char(0),char(109),char(95),char(119),
+char(97),char(114),char(109),char(115),char(116),char(97),char(114),char(116),char(105),char(110),char(103),char(70),char(97),char(99),char(116),char(111),char(114),char(0),char(109),char(95),
+char(109),char(97),char(120),char(71),char(121),char(114),char(111),char(115),char(99),char(111),char(112),char(105),char(99),char(70),char(111),char(114),char(99),char(101),char(0),char(109),
+char(95),char(115),char(105),char(110),char(103),char(108),char(101),char(65),char(120),char(105),char(115),char(82),char(111),char(108),char(108),char(105),char(110),char(103),char(70),char(114),
+char(105),char(99),char(116),char(105),char(111),char(110),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(0),char(109),char(95),char(110),char(117),
+char(109),char(73),char(116),char(101),char(114),char(97),char(116),char(105),char(111),char(110),char(115),char(0),char(109),char(95),char(115),char(111),char(108),char(118),char(101),char(114),
+char(77),char(111),char(100),char(101),char(0),char(109),char(95),char(114),char(101),char(115),char(116),char(105),char(110),char(103),char(67),char(111),char(110),char(116),char(97),char(99),
+char(116),char(82),char(101),char(115),char(116),char(105),char(116),char(117),char(116),char(105),char(111),char(110),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),
+char(100),char(0),char(109),char(95),char(109),char(105),char(110),char(105),char(109),char(117),char(109),char(83),char(111),char(108),char(118),char(101),char(114),char(66),char(97),char(116),
+char(99),char(104),char(83),char(105),char(122),char(101),char(0),char(109),char(95),char(115),char(112),char(108),char(105),char(116),char(73),char(109),char(112),char(117),char(108),char(115),
+char(101),char(0),char(109),char(95),char(108),char(105),char(110),char(101),char(97),char(114),char(83),char(116),char(105),char(102),char(102),char(110),char(101),char(115),char(115),char(0),
+char(109),char(95),char(97),char(110),char(103),char(117),char(108),char(97),char(114),char(83),char(116),char(105),char(102),char(102),char(110),char(101),char(115),char(115),char(0),char(109),
+char(95),char(118),char(111),char(108),char(117),char(109),char(101),char(83),char(116),char(105),char(102),char(102),char(110),char(101),char(115),char(115),char(0),char(42),char(109),char(95),
+char(109),char(97),char(116),char(101),char(114),char(105),char(97),char(108),char(0),char(109),char(95),char(112),char(111),char(115),char(105),char(116),char(105),char(111),char(110),char(0),
+char(109),char(95),char(112),char(114),char(101),char(118),char(105),char(111),char(117),char(115),char(80),char(111),char(115),char(105),char(116),char(105),char(111),char(110),char(0),char(109),
+char(95),char(118),char(101),char(108),char(111),char(99),char(105),char(116),char(121),char(0),char(109),char(95),char(97),char(99),char(99),char(117),char(109),char(117),char(108),char(97),
+char(116),char(101),char(100),char(70),char(111),char(114),char(99),char(101),char(0),char(109),char(95),char(110),char(111),char(114),char(109),char(97),char(108),char(0),char(109),char(95),
+char(97),char(114),char(101),char(97),char(0),char(109),char(95),char(97),char(116),char(116),char(97),char(99),char(104),char(0),char(109),char(95),char(110),char(111),char(100),char(101),
+char(73),char(110),char(100),char(105),char(99),char(101),char(115),char(91),char(50),char(93),char(0),char(109),char(95),char(114),char(101),char(115),char(116),char(76),char(101),char(110),
+char(103),char(116),char(104),char(0),char(109),char(95),char(98),char(98),char(101),char(110),char(100),char(105),char(110),char(103),char(0),char(109),char(95),char(110),char(111),char(100),
+char(101),char(73),char(110),char(100),char(105),char(99),char(101),char(115),char(91),char(51),char(93),char(0),char(109),char(95),char(114),char(101),char(115),char(116),char(65),char(114),
+char(101),char(97),char(0),char(109),char(95),char(99),char(48),char(91),char(52),char(93),char(0),char(109),char(95),char(110),char(111),char(100),char(101),char(73),char(110),char(100),
+char(105),char(99),char(101),char(115),char(91),char(52),char(93),char(0),char(109),char(95),char(114),char(101),char(115),char(116),char(86),char(111),char(108),char(117),char(109),char(101),
+char(0),char(109),char(95),char(99),char(49),char(0),char(109),char(95),char(99),char(50),char(0),char(109),char(95),char(99),char(48),char(0),char(109),char(95),char(108),char(111),
+char(99),char(97),char(108),char(70),char(114),char(97),char(109),char(101),char(0),char(42),char(109),char(95),char(114),char(105),char(103),char(105),char(100),char(66),char(111),char(100),
+char(121),char(0),char(109),char(95),char(110),char(111),char(100),char(101),char(73),char(110),char(100),char(101),char(120),char(0),char(109),char(95),char(97),char(101),char(114),char(111),
+char(77),char(111),char(100),char(101),char(108),char(0),char(109),char(95),char(98),char(97),char(117),char(109),char(103),char(97),char(114),char(116),char(101),char(0),char(109),char(95),
+char(100),char(114),char(97),char(103),char(0),char(109),char(95),char(108),char(105),char(102),char(116),char(0),char(109),char(95),char(112),char(114),char(101),char(115),char(115),char(117),
+char(114),char(101),char(0),char(109),char(95),char(118),char(111),char(108),char(117),char(109),char(101),char(0),char(109),char(95),char(100),char(121),char(110),char(97),char(109),char(105),
+char(99),char(70),char(114),char(105),char(99),char(116),char(105),char(111),char(110),char(0),char(109),char(95),char(112),char(111),char(115),char(101),char(77),char(97),char(116),char(99),
+char(104),char(0),char(109),char(95),char(114),char(105),char(103),char(105),char(100),char(67),char(111),char(110),char(116),char(97),char(99),char(116),char(72),char(97),char(114),char(100),
+char(110),char(101),char(115),char(115),char(0),char(109),char(95),char(107),char(105),char(110),char(101),char(116),char(105),char(99),char(67),char(111),char(110),char(116),char(97),char(99),
+char(116),char(72),char(97),char(114),char(100),char(110),char(101),char(115),char(115),char(0),char(109),char(95),char(115),char(111),char(102),char(116),char(67),char(111),char(110),char(116),
+char(97),char(99),char(116),char(72),char(97),char(114),char(100),char(110),char(101),char(115),char(115),char(0),char(109),char(95),char(97),char(110),char(99),char(104),char(111),char(114),
+char(72),char(97),char(114),char(100),char(110),char(101),char(115),char(115),char(0),char(109),char(95),char(115),char(111),char(102),char(116),char(82),char(105),char(103),char(105),char(100),
+char(67),char(108),char(117),char(115),char(116),char(101),char(114),char(72),char(97),char(114),char(100),char(110),char(101),char(115),char(115),char(0),char(109),char(95),char(115),char(111),
+char(102),char(116),char(75),char(105),char(110),char(101),char(116),char(105),char(99),char(67),char(108),char(117),char(115),char(116),char(101),char(114),char(72),char(97),char(114),char(100),
+char(110),char(101),char(115),char(115),char(0),char(109),char(95),char(115),char(111),char(102),char(116),char(83),char(111),char(102),char(116),char(67),char(108),char(117),char(115),char(116),
+char(101),char(114),char(72),char(97),char(114),char(100),char(110),char(101),char(115),char(115),char(0),char(109),char(95),char(115),char(111),char(102),char(116),char(82),char(105),char(103),
+char(105),char(100),char(67),char(108),char(117),char(115),char(116),char(101),char(114),char(73),char(109),char(112),char(117),char(108),char(115),char(101),char(83),char(112),char(108),char(105),
+char(116),char(0),char(109),char(95),char(115),char(111),char(102),char(116),char(75),char(105),char(110),char(101),char(116),char(105),char(99),char(67),char(108),char(117),char(115),char(116),
+char(101),char(114),char(73),char(109),char(112),char(117),char(108),char(115),char(101),char(83),char(112),char(108),char(105),char(116),char(0),char(109),char(95),char(115),char(111),char(102),
+char(116),char(83),char(111),char(102),char(116),char(67),char(108),char(117),char(115),char(116),char(101),char(114),char(73),char(109),char(112),char(117),char(108),char(115),char(101),char(83),
+char(112),char(108),char(105),char(116),char(0),char(109),char(95),char(109),char(97),char(120),char(86),char(111),char(108),char(117),char(109),char(101),char(0),char(109),char(95),char(116),
+char(105),char(109),char(101),char(83),char(99),char(97),char(108),char(101),char(0),char(109),char(95),char(118),char(101),char(108),char(111),char(99),char(105),char(116),char(121),char(73),
+char(116),char(101),char(114),char(97),char(116),char(105),char(111),char(110),char(115),char(0),char(109),char(95),char(112),char(111),char(115),char(105),char(116),char(105),char(111),char(110),
+char(73),char(116),char(101),char(114),char(97),char(116),char(105),char(111),char(110),char(115),char(0),char(109),char(95),char(100),char(114),char(105),char(102),char(116),char(73),char(116),
+char(101),char(114),char(97),char(116),char(105),char(111),char(110),char(115),char(0),char(109),char(95),char(99),char(108),char(117),char(115),char(116),char(101),char(114),char(73),char(116),
+char(101),char(114),char(97),char(116),char(105),char(111),char(110),char(115),char(0),char(109),char(95),char(114),char(111),char(116),char(0),char(109),char(95),char(115),char(99),char(97),
+char(108),char(101),char(0),char(109),char(95),char(97),char(113),char(113),char(0),char(109),char(95),char(99),char(111),char(109),char(0),char(42),char(109),char(95),char(112),char(111),
+char(115),char(105),char(116),char(105),char(111),char(110),char(115),char(0),char(42),char(109),char(95),char(119),char(101),char(105),char(103),char(104),char(116),char(115),char(0),char(109),
+char(95),char(110),char(117),char(109),char(80),char(111),char(115),char(105),char(116),char(105),char(111),char(110),char(115),char(0),char(109),char(95),char(110),char(117),char(109),char(87),
+char(101),char(105),char(103),char(116),char(115),char(0),char(109),char(95),char(98),char(118),char(111),char(108),char(117),char(109),char(101),char(0),char(109),char(95),char(98),char(102),
+char(114),char(97),char(109),char(101),char(0),char(109),char(95),char(102),char(114),char(97),char(109),char(101),char(120),char(102),char(111),char(114),char(109),char(0),char(109),char(95),
+char(108),char(111),char(99),char(105),char(105),char(0),char(109),char(95),char(105),char(110),char(118),char(119),char(105),char(0),char(109),char(95),char(118),char(105),char(109),char(112),
+char(117),char(108),char(115),char(101),char(115),char(91),char(50),char(93),char(0),char(109),char(95),char(100),char(105),char(109),char(112),char(117),char(108),char(115),char(101),char(115),
+char(91),char(50),char(93),char(0),char(109),char(95),char(108),char(118),char(0),char(109),char(95),char(97),char(118),char(0),char(42),char(109),char(95),char(102),char(114),char(97),
+char(109),char(101),char(114),char(101),char(102),char(115),char(0),char(42),char(109),char(95),char(110),char(111),char(100),char(101),char(73),char(110),char(100),char(105),char(99),char(101),
+char(115),char(0),char(42),char(109),char(95),char(109),char(97),char(115),char(115),char(101),char(115),char(0),char(109),char(95),char(110),char(117),char(109),char(70),char(114),char(97),
+char(109),char(101),char(82),char(101),char(102),char(115),char(0),char(109),char(95),char(110),char(117),char(109),char(78),char(111),char(100),char(101),char(115),char(0),char(109),char(95),
+char(110),char(117),char(109),char(77),char(97),char(115),char(115),char(101),char(115),char(0),char(109),char(95),char(105),char(100),char(109),char(97),char(115),char(115),char(0),char(109),
+char(95),char(105),char(109),char(97),char(115),char(115),char(0),char(109),char(95),char(110),char(118),char(105),char(109),char(112),char(117),char(108),char(115),char(101),char(115),char(0),
+char(109),char(95),char(110),char(100),char(105),char(109),char(112),char(117),char(108),char(115),char(101),char(115),char(0),char(109),char(95),char(110),char(100),char(97),char(109),char(112),
+char(105),char(110),char(103),char(0),char(109),char(95),char(108),char(100),char(97),char(109),char(112),char(105),char(110),char(103),char(0),char(109),char(95),char(97),char(100),char(97),
+char(109),char(112),char(105),char(110),char(103),char(0),char(109),char(95),char(109),char(97),char(116),char(99),char(104),char(105),char(110),char(103),char(0),char(109),char(95),char(109),
+char(97),char(120),char(83),char(101),char(108),char(102),char(67),char(111),char(108),char(108),char(105),char(115),char(105),char(111),char(110),char(73),char(109),char(112),char(117),char(108),
+char(115),char(101),char(0),char(109),char(95),char(115),char(101),char(108),char(102),char(67),char(111),char(108),char(108),char(105),char(115),char(105),char(111),char(110),char(73),char(109),
+char(112),char(117),char(108),char(115),char(101),char(70),char(97),char(99),char(116),char(111),char(114),char(0),char(109),char(95),char(99),char(111),char(110),char(116),char(97),char(105),
+char(110),char(115),char(65),char(110),char(99),char(104),char(111),char(114),char(0),char(109),char(95),char(99),char(111),char(108),char(108),char(105),char(100),char(101),char(0),char(109),
+char(95),char(99),char(108),char(117),char(115),char(116),char(101),char(114),char(73),char(110),char(100),char(101),char(120),char(0),char(42),char(109),char(95),char(98),char(111),char(100),
+char(121),char(65),char(0),char(42),char(109),char(95),char(98),char(111),char(100),char(121),char(66),char(0),char(109),char(95),char(114),char(101),char(102),char(115),char(91),char(50),
+char(93),char(0),char(109),char(95),char(99),char(102),char(109),char(0),char(109),char(95),char(115),char(112),char(108),char(105),char(116),char(0),char(109),char(95),char(100),char(101),
+char(108),char(101),char(116),char(101),char(0),char(109),char(95),char(114),char(101),char(108),char(80),char(111),char(115),char(105),char(116),char(105),char(111),char(110),char(91),char(50),
+char(93),char(0),char(109),char(95),char(98),char(111),char(100),char(121),char(65),char(116),char(121),char(112),char(101),char(0),char(109),char(95),char(98),char(111),char(100),char(121),
+char(66),char(116),char(121),char(112),char(101),char(0),char(109),char(95),char(106),char(111),char(105),char(110),char(116),char(84),char(121),char(112),char(101),char(0),char(42),char(109),
+char(95),char(112),char(111),char(115),char(101),char(0),char(42),char(42),char(109),char(95),char(109),char(97),char(116),char(101),char(114),char(105),char(97),char(108),char(115),char(0),
+char(42),char(109),char(95),char(110),char(111),char(100),char(101),char(115),char(0),char(42),char(109),char(95),char(108),char(105),char(110),char(107),char(115),char(0),char(42),char(109),
+char(95),char(102),char(97),char(99),char(101),char(115),char(0),char(42),char(109),char(95),char(116),char(101),char(116),char(114),char(97),char(104),char(101),char(100),char(114),char(97),
+char(0),char(42),char(109),char(95),char(97),char(110),char(99),char(104),char(111),char(114),char(115),char(0),char(42),char(109),char(95),char(99),char(108),char(117),char(115),char(116),
+char(101),char(114),char(115),char(0),char(42),char(109),char(95),char(106),char(111),char(105),char(110),char(116),char(115),char(0),char(109),char(95),char(110),char(117),char(109),char(77),
+char(97),char(116),char(101),char(114),char(105),char(97),char(108),char(115),char(0),char(109),char(95),char(110),char(117),char(109),char(76),char(105),char(110),char(107),char(115),char(0),
+char(109),char(95),char(110),char(117),char(109),char(70),char(97),char(99),char(101),char(115),char(0),char(109),char(95),char(110),char(117),char(109),char(84),char(101),char(116),char(114),
+char(97),char(104),char(101),char(100),char(114),char(97),char(0),char(109),char(95),char(110),char(117),char(109),char(65),char(110),char(99),char(104),char(111),char(114),char(115),char(0),
+char(109),char(95),char(110),char(117),char(109),char(67),char(108),char(117),char(115),char(116),char(101),char(114),char(115),char(0),char(109),char(95),char(110),char(117),char(109),char(74),
+char(111),char(105),char(110),char(116),char(115),char(0),char(109),char(95),char(99),char(111),char(110),char(102),char(105),char(103),char(0),char(0),char(84),char(89),char(80),char(69),
+char(87),char(0),char(0),char(0),char(99),char(104),char(97),char(114),char(0),char(117),char(99),char(104),char(97),char(114),char(0),char(115),char(104),char(111),char(114),char(116),
+char(0),char(117),char(115),char(104),char(111),char(114),char(116),char(0),char(105),char(110),char(116),char(0),char(108),char(111),char(110),char(103),char(0),char(117),char(108),char(111),
+char(110),char(103),char(0),char(102),char(108),char(111),char(97),char(116),char(0),char(100),char(111),char(117),char(98),char(108),char(101),char(0),char(118),char(111),char(105),char(100),
+char(0),char(80),char(111),char(105),char(110),char(116),char(101),char(114),char(65),char(114),char(114),char(97),char(121),char(0),char(98),char(116),char(80),char(104),char(121),char(115),
+char(105),char(99),char(115),char(83),char(121),char(115),char(116),char(101),char(109),char(0),char(76),char(105),char(115),char(116),char(66),char(97),char(115),char(101),char(0),char(98),
+char(116),char(86),char(101),char(99),char(116),char(111),char(114),char(51),char(70),char(108),char(111),char(97),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),
+char(86),char(101),char(99),char(116),char(111),char(114),char(51),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),
+char(77),char(97),char(116),char(114),char(105),char(120),char(51),char(120),char(51),char(70),char(108),char(111),char(97),char(116),char(68),char(97),char(116),char(97),char(0),char(98),
+char(116),char(77),char(97),char(116),char(114),char(105),char(120),char(51),char(120),char(51),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),
+char(0),char(98),char(116),char(84),char(114),char(97),char(110),char(115),char(102),char(111),char(114),char(109),char(70),char(108),char(111),char(97),char(116),char(68),char(97),char(116),
+char(97),char(0),char(98),char(116),char(84),char(114),char(97),char(110),char(115),char(102),char(111),char(114),char(109),char(68),char(111),char(117),char(98),char(108),char(101),char(68),
+char(97),char(116),char(97),char(0),char(98),char(116),char(66),char(118),char(104),char(83),char(117),char(98),char(116),char(114),char(101),char(101),char(73),char(110),char(102),char(111),
+char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(79),char(112),char(116),char(105),char(109),char(105),char(122),char(101),char(100),char(66),char(118),char(104),char(78),
+char(111),char(100),char(101),char(70),char(108),char(111),char(97),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(79),char(112),char(116),char(105),char(109),
+char(105),char(122),char(101),char(100),char(66),char(118),char(104),char(78),char(111),char(100),char(101),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),
+char(97),char(0),char(98),char(116),char(81),char(117),char(97),char(110),char(116),char(105),char(122),char(101),char(100),char(66),char(118),char(104),char(78),char(111),char(100),char(101),
+char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(81),char(117),char(97),char(110),char(116),char(105),char(122),char(101),char(100),char(66),char(118),char(104),char(70),
+char(108),char(111),char(97),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(81),char(117),char(97),char(110),char(116),char(105),char(122),char(101),char(100),
+char(66),char(118),char(104),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(67),char(111),char(108),char(108),
+char(105),char(115),char(105),char(111),char(110),char(83),char(104),char(97),char(112),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(83),char(116),char(97),
+char(116),char(105),char(99),char(80),char(108),char(97),char(110),char(101),char(83),char(104),char(97),char(112),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),
+char(67),char(111),char(110),char(118),char(101),char(120),char(73),char(110),char(116),char(101),char(114),char(110),char(97),char(108),char(83),char(104),char(97),char(112),char(101),char(68),
+char(97),char(116),char(97),char(0),char(98),char(116),char(80),char(111),char(115),char(105),char(116),char(105),char(111),char(110),char(65),char(110),char(100),char(82),char(97),char(100),
+char(105),char(117),char(115),char(0),char(98),char(116),char(77),char(117),char(108),char(116),char(105),char(83),char(112),char(104),char(101),char(114),char(101),char(83),char(104),char(97),
+char(112),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(73),char(110),char(116),char(73),char(110),char(100),char(101),char(120),char(68),char(97),char(116),
+char(97),char(0),char(98),char(116),char(83),char(104),char(111),char(114),char(116),char(73),char(110),char(116),char(73),char(110),char(100),char(101),char(120),char(68),char(97),char(116),
+char(97),char(0),char(98),char(116),char(83),char(104),char(111),char(114),char(116),char(73),char(110),char(116),char(73),char(110),char(100),char(101),char(120),char(84),char(114),char(105),
+char(112),char(108),char(101),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(67),char(104),char(97),char(114),char(73),char(110),char(100),char(101),char(120),
+char(84),char(114),char(105),char(112),char(108),char(101),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(77),char(101),char(115),char(104),char(80),char(97),
+char(114),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(83),char(116),char(114),char(105),char(100),char(105),char(110),char(103),char(77),char(101),char(115),
+char(104),char(73),char(110),char(116),char(101),char(114),char(102),char(97),char(99),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(84),char(114),char(105),
+char(97),char(110),char(103),char(108),char(101),char(77),char(101),char(115),char(104),char(83),char(104),char(97),char(112),char(101),char(68),char(97),char(116),char(97),char(0),char(98),
+char(116),char(84),char(114),char(105),char(97),char(110),char(103),char(108),char(101),char(73),char(110),char(102),char(111),char(77),char(97),char(112),char(68),char(97),char(116),char(97),
+char(0),char(98),char(116),char(83),char(99),char(97),char(108),char(101),char(100),char(84),char(114),char(105),char(97),char(110),char(103),char(108),char(101),char(77),char(101),char(115),
+char(104),char(83),char(104),char(97),char(112),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(67),char(111),char(109),char(112),char(111),char(117),char(110),
+char(100),char(83),char(104),char(97),char(112),char(101),char(67),char(104),char(105),char(108),char(100),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(67),char(111),
+char(109),char(112),char(111),char(117),char(110),char(100),char(83),char(104),char(97),char(112),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(67),char(121),
+char(108),char(105),char(110),char(100),char(101),char(114),char(83),char(104),char(97),char(112),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(67),char(111),
+char(110),char(101),char(83),char(104),char(97),char(112),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(67),char(97),char(112),char(115),char(117),char(108),
char(101),char(83),char(104),char(97),char(112),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(84),char(114),char(105),char(97),char(110),char(103),char(108),
char(101),char(73),char(110),char(102),char(111),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(71),char(73),char(109),char(112),char(97),char(99),char(116),char(77),
char(101),char(115),char(104),char(83),char(104),char(97),char(112),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(67),char(111),char(110),char(118),char(101),
@@ -305,155 +309,193 @@ char(83),char(111),char(108),char(118),char(101),char(114),char(73),char(110),ch
char(98),char(116),char(82),char(105),char(103),char(105),char(100),char(66),char(111),char(100),char(121),char(70),char(108),char(111),char(97),char(116),char(68),char(97),char(116),char(97),
char(0),char(98),char(116),char(82),char(105),char(103),char(105),char(100),char(66),char(111),char(100),char(121),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),
char(116),char(97),char(0),char(98),char(116),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(73),char(110),char(102),char(111),char(49),
-char(0),char(98),char(116),char(84),char(121),char(112),char(101),char(100),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(68),char(97),
-char(116),char(97),char(0),char(98),char(116),char(82),char(105),char(103),char(105),char(100),char(66),char(111),char(100),char(121),char(68),char(97),char(116),char(97),char(0),char(98),
-char(116),char(80),char(111),char(105),char(110),char(116),char(50),char(80),char(111),char(105),char(110),char(116),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),
-char(110),char(116),char(70),char(108),char(111),char(97),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(80),char(111),char(105),char(110),char(116),char(50),
-char(80),char(111),char(105),char(110),char(116),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(68),char(111),char(117),char(98),char(108),
-char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(72),char(105),char(110),char(103),char(101),char(67),char(111),char(110),char(115),char(116),char(114),char(97),
-char(105),char(110),char(116),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(72),char(105),char(110),char(103),
-char(101),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(70),char(108),char(111),char(97),char(116),char(68),char(97),char(116),char(97),
-char(0),char(98),char(116),char(67),char(111),char(110),char(101),char(84),char(119),char(105),char(115),char(116),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),
-char(110),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(71),char(101),char(110),char(101),char(114),char(105),char(99),char(54),char(68),char(111),char(102),
+char(0),char(98),char(116),char(84),char(121),char(112),char(101),char(100),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(70),char(108),
+char(111),char(97),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(84),char(121),char(112),char(101),char(100),char(67),char(111),char(110),char(115),char(116),
+char(114),char(97),char(105),char(110),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(82),char(105),char(103),char(105),char(100),char(66),char(111),char(100),
+char(121),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(84),char(121),char(112),char(101),char(100),char(67),char(111),char(110),char(115),char(116),char(114),char(97),
+char(105),char(110),char(116),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(80),char(111),char(105),char(110),
+char(116),char(50),char(80),char(111),char(105),char(110),char(116),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(70),char(108),char(111),
+char(97),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(80),char(111),char(105),char(110),char(116),char(50),char(80),char(111),char(105),char(110),char(116),
+char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),
+char(50),char(0),char(98),char(116),char(80),char(111),char(105),char(110),char(116),char(50),char(80),char(111),char(105),char(110),char(116),char(67),char(111),char(110),char(115),char(116),
+char(114),char(97),char(105),char(110),char(116),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(72),char(105),
+char(110),char(103),char(101),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(68),char(111),char(117),char(98),char(108),char(101),char(68),
+char(97),char(116),char(97),char(0),char(98),char(116),char(72),char(105),char(110),char(103),char(101),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),
+char(116),char(70),char(108),char(111),char(97),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(72),char(105),char(110),char(103),char(101),char(67),char(111),
+char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),char(50),char(0),
+char(98),char(116),char(67),char(111),char(110),char(101),char(84),char(119),char(105),char(115),char(116),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),
+char(116),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(67),char(111),char(110),char(101),char(84),char(119),
+char(105),char(115),char(116),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),
+char(71),char(101),char(110),char(101),char(114),char(105),char(99),char(54),char(68),char(111),char(102),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),
+char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(71),char(101),char(110),char(101),char(114),char(105),char(99),char(54),char(68),char(111),char(102),char(67),
+char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),char(50),
+char(0),char(98),char(116),char(71),char(101),char(110),char(101),char(114),char(105),char(99),char(54),char(68),char(111),char(102),char(83),char(112),char(114),char(105),char(110),char(103),
char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(71),char(101),char(110),
char(101),char(114),char(105),char(99),char(54),char(68),char(111),char(102),char(83),char(112),char(114),char(105),char(110),char(103),char(67),char(111),char(110),char(115),char(116),char(114),
-char(97),char(105),char(110),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(83),char(108),char(105),char(100),char(101),char(114),char(67),char(111),char(110),
-char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(68),char(97),char(116),char(97),char(0),char(83),char(111),char(102),char(116),char(66),char(111),char(100),char(121),
-char(77),char(97),char(116),char(101),char(114),char(105),char(97),char(108),char(68),char(97),char(116),char(97),char(0),char(83),char(111),char(102),char(116),char(66),char(111),char(100),
-char(121),char(78),char(111),char(100),char(101),char(68),char(97),char(116),char(97),char(0),char(83),char(111),char(102),char(116),char(66),char(111),char(100),char(121),char(76),char(105),
-char(110),char(107),char(68),char(97),char(116),char(97),char(0),char(83),char(111),char(102),char(116),char(66),char(111),char(100),char(121),char(70),char(97),char(99),char(101),char(68),
-char(97),char(116),char(97),char(0),char(83),char(111),char(102),char(116),char(66),char(111),char(100),char(121),char(84),char(101),char(116),char(114),char(97),char(68),char(97),char(116),
-char(97),char(0),char(83),char(111),char(102),char(116),char(82),char(105),char(103),char(105),char(100),char(65),char(110),char(99),char(104),char(111),char(114),char(68),char(97),char(116),
-char(97),char(0),char(83),char(111),char(102),char(116),char(66),char(111),char(100),char(121),char(67),char(111),char(110),char(102),char(105),char(103),char(68),char(97),char(116),char(97),
-char(0),char(83),char(111),char(102),char(116),char(66),char(111),char(100),char(121),char(80),char(111),char(115),char(101),char(68),char(97),char(116),char(97),char(0),char(83),char(111),
-char(102),char(116),char(66),char(111),char(100),char(121),char(67),char(108),char(117),char(115),char(116),char(101),char(114),char(68),char(97),char(116),char(97),char(0),char(98),char(116),
-char(83),char(111),char(102),char(116),char(66),char(111),char(100),char(121),char(74),char(111),char(105),char(110),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),
-char(83),char(111),char(102),char(116),char(66),char(111),char(100),char(121),char(70),char(108),char(111),char(97),char(116),char(68),char(97),char(116),char(97),char(0),char(0),char(0),
-char(84),char(76),char(69),char(78),char(1),char(0),char(1),char(0),char(2),char(0),char(2),char(0),char(4),char(0),char(4),char(0),char(4),char(0),char(4),char(0),
-char(8),char(0),char(0),char(0),char(12),char(0),char(36),char(0),char(8),char(0),char(16),char(0),char(32),char(0),char(48),char(0),char(96),char(0),char(64),char(0),
-char(-128),char(0),char(20),char(0),char(48),char(0),char(80),char(0),char(16),char(0),char(84),char(0),char(-124),char(0),char(12),char(0),char(52),char(0),char(52),char(0),
-char(20),char(0),char(64),char(0),char(4),char(0),char(4),char(0),char(8),char(0),char(4),char(0),char(32),char(0),char(28),char(0),char(60),char(0),char(56),char(0),
-char(76),char(0),char(76),char(0),char(24),char(0),char(60),char(0),char(60),char(0),char(16),char(0),char(64),char(0),char(68),char(0),char(-48),char(1),char(0),char(1),
-char(-72),char(0),char(-104),char(0),char(104),char(0),char(88),char(0),char(-24),char(1),char(-96),char(3),char(8),char(0),char(52),char(0),char(0),char(0),char(84),char(0),
-char(116),char(0),char(92),char(1),char(-36),char(0),char(-44),char(0),char(-4),char(0),char(92),char(1),char(-52),char(0),char(16),char(0),char(100),char(0),char(20),char(0),
-char(36),char(0),char(100),char(0),char(92),char(0),char(104),char(0),char(-64),char(0),char(92),char(1),char(104),char(0),char(-84),char(1),char(83),char(84),char(82),char(67),
-char(65),char(0),char(0),char(0),char(10),char(0),char(3),char(0),char(4),char(0),char(0),char(0),char(4),char(0),char(1),char(0),char(9),char(0),char(2),char(0),
-char(11),char(0),char(3),char(0),char(10),char(0),char(3),char(0),char(10),char(0),char(4),char(0),char(10),char(0),char(5),char(0),char(12),char(0),char(2),char(0),
-char(9),char(0),char(6),char(0),char(9),char(0),char(7),char(0),char(13),char(0),char(1),char(0),char(7),char(0),char(8),char(0),char(14),char(0),char(1),char(0),
-char(8),char(0),char(8),char(0),char(15),char(0),char(1),char(0),char(13),char(0),char(9),char(0),char(16),char(0),char(1),char(0),char(14),char(0),char(9),char(0),
-char(17),char(0),char(2),char(0),char(15),char(0),char(10),char(0),char(13),char(0),char(11),char(0),char(18),char(0),char(2),char(0),char(16),char(0),char(10),char(0),
-char(14),char(0),char(11),char(0),char(19),char(0),char(4),char(0),char(4),char(0),char(12),char(0),char(4),char(0),char(13),char(0),char(2),char(0),char(14),char(0),
-char(2),char(0),char(15),char(0),char(20),char(0),char(6),char(0),char(13),char(0),char(16),char(0),char(13),char(0),char(17),char(0),char(4),char(0),char(18),char(0),
-char(4),char(0),char(19),char(0),char(4),char(0),char(20),char(0),char(0),char(0),char(21),char(0),char(21),char(0),char(6),char(0),char(14),char(0),char(16),char(0),
-char(14),char(0),char(17),char(0),char(4),char(0),char(18),char(0),char(4),char(0),char(19),char(0),char(4),char(0),char(20),char(0),char(0),char(0),char(21),char(0),
-char(22),char(0),char(3),char(0),char(2),char(0),char(14),char(0),char(2),char(0),char(15),char(0),char(4),char(0),char(22),char(0),char(23),char(0),char(12),char(0),
-char(13),char(0),char(23),char(0),char(13),char(0),char(24),char(0),char(13),char(0),char(25),char(0),char(4),char(0),char(26),char(0),char(4),char(0),char(27),char(0),
-char(4),char(0),char(28),char(0),char(4),char(0),char(29),char(0),char(20),char(0),char(30),char(0),char(22),char(0),char(31),char(0),char(19),char(0),char(32),char(0),
-char(4),char(0),char(33),char(0),char(4),char(0),char(34),char(0),char(24),char(0),char(12),char(0),char(14),char(0),char(23),char(0),char(14),char(0),char(24),char(0),
-char(14),char(0),char(25),char(0),char(4),char(0),char(26),char(0),char(4),char(0),char(27),char(0),char(4),char(0),char(28),char(0),char(4),char(0),char(29),char(0),
-char(21),char(0),char(30),char(0),char(22),char(0),char(31),char(0),char(4),char(0),char(33),char(0),char(4),char(0),char(34),char(0),char(19),char(0),char(32),char(0),
-char(25),char(0),char(3),char(0),char(0),char(0),char(35),char(0),char(4),char(0),char(36),char(0),char(0),char(0),char(37),char(0),char(26),char(0),char(5),char(0),
-char(25),char(0),char(38),char(0),char(13),char(0),char(39),char(0),char(13),char(0),char(40),char(0),char(7),char(0),char(41),char(0),char(0),char(0),char(21),char(0),
-char(27),char(0),char(5),char(0),char(25),char(0),char(38),char(0),char(13),char(0),char(39),char(0),char(13),char(0),char(42),char(0),char(7),char(0),char(43),char(0),
-char(4),char(0),char(44),char(0),char(28),char(0),char(2),char(0),char(13),char(0),char(45),char(0),char(7),char(0),char(46),char(0),char(29),char(0),char(4),char(0),
-char(27),char(0),char(47),char(0),char(28),char(0),char(48),char(0),char(4),char(0),char(49),char(0),char(0),char(0),char(37),char(0),char(30),char(0),char(1),char(0),
-char(4),char(0),char(50),char(0),char(31),char(0),char(2),char(0),char(2),char(0),char(50),char(0),char(0),char(0),char(51),char(0),char(32),char(0),char(2),char(0),
-char(2),char(0),char(52),char(0),char(0),char(0),char(51),char(0),char(33),char(0),char(2),char(0),char(0),char(0),char(52),char(0),char(0),char(0),char(53),char(0),
-char(34),char(0),char(8),char(0),char(13),char(0),char(54),char(0),char(14),char(0),char(55),char(0),char(30),char(0),char(56),char(0),char(32),char(0),char(57),char(0),
-char(33),char(0),char(58),char(0),char(31),char(0),char(59),char(0),char(4),char(0),char(60),char(0),char(4),char(0),char(61),char(0),char(35),char(0),char(4),char(0),
-char(34),char(0),char(62),char(0),char(13),char(0),char(63),char(0),char(4),char(0),char(64),char(0),char(0),char(0),char(37),char(0),char(36),char(0),char(7),char(0),
-char(25),char(0),char(38),char(0),char(35),char(0),char(65),char(0),char(23),char(0),char(66),char(0),char(24),char(0),char(67),char(0),char(37),char(0),char(68),char(0),
-char(7),char(0),char(43),char(0),char(0),char(0),char(69),char(0),char(38),char(0),char(2),char(0),char(36),char(0),char(70),char(0),char(13),char(0),char(39),char(0),
-char(39),char(0),char(4),char(0),char(17),char(0),char(71),char(0),char(25),char(0),char(72),char(0),char(4),char(0),char(73),char(0),char(7),char(0),char(74),char(0),
-char(40),char(0),char(4),char(0),char(25),char(0),char(38),char(0),char(39),char(0),char(75),char(0),char(4),char(0),char(76),char(0),char(7),char(0),char(43),char(0),
-char(41),char(0),char(3),char(0),char(27),char(0),char(47),char(0),char(4),char(0),char(77),char(0),char(0),char(0),char(37),char(0),char(42),char(0),char(3),char(0),
-char(27),char(0),char(47),char(0),char(4),char(0),char(77),char(0),char(0),char(0),char(37),char(0),char(43),char(0),char(4),char(0),char(4),char(0),char(78),char(0),
-char(7),char(0),char(79),char(0),char(7),char(0),char(80),char(0),char(7),char(0),char(81),char(0),char(37),char(0),char(14),char(0),char(4),char(0),char(82),char(0),
-char(4),char(0),char(83),char(0),char(43),char(0),char(84),char(0),char(4),char(0),char(85),char(0),char(7),char(0),char(86),char(0),char(7),char(0),char(87),char(0),
-char(7),char(0),char(88),char(0),char(7),char(0),char(89),char(0),char(7),char(0),char(90),char(0),char(4),char(0),char(91),char(0),char(4),char(0),char(92),char(0),
-char(4),char(0),char(93),char(0),char(4),char(0),char(94),char(0),char(0),char(0),char(37),char(0),char(44),char(0),char(5),char(0),char(25),char(0),char(38),char(0),
-char(35),char(0),char(65),char(0),char(13),char(0),char(39),char(0),char(7),char(0),char(43),char(0),char(4),char(0),char(95),char(0),char(45),char(0),char(5),char(0),
-char(27),char(0),char(47),char(0),char(13),char(0),char(96),char(0),char(14),char(0),char(97),char(0),char(4),char(0),char(98),char(0),char(0),char(0),char(99),char(0),
-char(46),char(0),char(25),char(0),char(9),char(0),char(100),char(0),char(9),char(0),char(101),char(0),char(25),char(0),char(102),char(0),char(0),char(0),char(35),char(0),
-char(18),char(0),char(103),char(0),char(18),char(0),char(104),char(0),char(14),char(0),char(105),char(0),char(14),char(0),char(106),char(0),char(14),char(0),char(107),char(0),
-char(8),char(0),char(108),char(0),char(8),char(0),char(109),char(0),char(8),char(0),char(110),char(0),char(8),char(0),char(111),char(0),char(8),char(0),char(112),char(0),
-char(8),char(0),char(113),char(0),char(8),char(0),char(114),char(0),char(8),char(0),char(115),char(0),char(4),char(0),char(116),char(0),char(4),char(0),char(117),char(0),
-char(4),char(0),char(118),char(0),char(4),char(0),char(119),char(0),char(4),char(0),char(120),char(0),char(4),char(0),char(121),char(0),char(4),char(0),char(122),char(0),
-char(0),char(0),char(37),char(0),char(47),char(0),char(25),char(0),char(9),char(0),char(100),char(0),char(9),char(0),char(101),char(0),char(25),char(0),char(102),char(0),
-char(0),char(0),char(35),char(0),char(17),char(0),char(103),char(0),char(17),char(0),char(104),char(0),char(13),char(0),char(105),char(0),char(13),char(0),char(106),char(0),
-char(13),char(0),char(107),char(0),char(7),char(0),char(108),char(0),char(7),char(0),char(109),char(0),char(7),char(0),char(110),char(0),char(7),char(0),char(111),char(0),
-char(7),char(0),char(112),char(0),char(7),char(0),char(113),char(0),char(7),char(0),char(114),char(0),char(7),char(0),char(115),char(0),char(4),char(0),char(116),char(0),
+char(97),char(105),char(110),char(116),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),char(50),char(0),char(98),char(116),char(83),char(108),
+char(105),char(100),char(101),char(114),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(68),char(97),char(116),char(97),char(0),char(98),
+char(116),char(83),char(108),char(105),char(100),char(101),char(114),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(68),char(111),char(117),
+char(98),char(108),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(71),char(101),char(97),char(114),char(67),char(111),char(110),char(115),char(116),char(114),
+char(97),char(105),char(110),char(116),char(70),char(108),char(111),char(97),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(71),char(101),char(97),char(114),
+char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),
+char(0),char(83),char(111),char(102),char(116),char(66),char(111),char(100),char(121),char(77),char(97),char(116),char(101),char(114),char(105),char(97),char(108),char(68),char(97),char(116),
+char(97),char(0),char(83),char(111),char(102),char(116),char(66),char(111),char(100),char(121),char(78),char(111),char(100),char(101),char(68),char(97),char(116),char(97),char(0),char(83),
+char(111),char(102),char(116),char(66),char(111),char(100),char(121),char(76),char(105),char(110),char(107),char(68),char(97),char(116),char(97),char(0),char(83),char(111),char(102),char(116),
+char(66),char(111),char(100),char(121),char(70),char(97),char(99),char(101),char(68),char(97),char(116),char(97),char(0),char(83),char(111),char(102),char(116),char(66),char(111),char(100),
+char(121),char(84),char(101),char(116),char(114),char(97),char(68),char(97),char(116),char(97),char(0),char(83),char(111),char(102),char(116),char(82),char(105),char(103),char(105),char(100),
+char(65),char(110),char(99),char(104),char(111),char(114),char(68),char(97),char(116),char(97),char(0),char(83),char(111),char(102),char(116),char(66),char(111),char(100),char(121),char(67),
+char(111),char(110),char(102),char(105),char(103),char(68),char(97),char(116),char(97),char(0),char(83),char(111),char(102),char(116),char(66),char(111),char(100),char(121),char(80),char(111),
+char(115),char(101),char(68),char(97),char(116),char(97),char(0),char(83),char(111),char(102),char(116),char(66),char(111),char(100),char(121),char(67),char(108),char(117),char(115),char(116),
+char(101),char(114),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(83),char(111),char(102),char(116),char(66),char(111),char(100),char(121),char(74),char(111),char(105),
+char(110),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(83),char(111),char(102),char(116),char(66),char(111),char(100),char(121),char(70),char(108),char(111),
+char(97),char(116),char(68),char(97),char(116),char(97),char(0),char(0),char(84),char(76),char(69),char(78),char(1),char(0),char(1),char(0),char(2),char(0),char(2),char(0),
+char(4),char(0),char(4),char(0),char(4),char(0),char(4),char(0),char(8),char(0),char(0),char(0),char(12),char(0),char(36),char(0),char(8),char(0),char(16),char(0),
+char(32),char(0),char(48),char(0),char(96),char(0),char(64),char(0),char(-128),char(0),char(20),char(0),char(48),char(0),char(80),char(0),char(16),char(0),char(84),char(0),
+char(-124),char(0),char(12),char(0),char(52),char(0),char(52),char(0),char(20),char(0),char(64),char(0),char(4),char(0),char(4),char(0),char(8),char(0),char(4),char(0),
+char(32),char(0),char(28),char(0),char(60),char(0),char(56),char(0),char(76),char(0),char(76),char(0),char(24),char(0),char(60),char(0),char(60),char(0),char(60),char(0),
+char(16),char(0),char(64),char(0),char(68),char(0),char(-48),char(1),char(0),char(1),char(-72),char(0),char(-104),char(0),char(104),char(0),char(88),char(0),char(-24),char(1),
+char(-96),char(3),char(8),char(0),char(52),char(0),char(52),char(0),char(0),char(0),char(68),char(0),char(84),char(0),char(-124),char(0),char(116),char(0),char(92),char(1),
+char(-36),char(0),char(-116),char(1),char(124),char(1),char(-44),char(0),char(-4),char(0),char(-52),char(1),char(92),char(1),char(116),char(2),char(-52),char(0),char(108),char(1),
+char(92),char(0),char(-116),char(0),char(16),char(0),char(100),char(0),char(20),char(0),char(36),char(0),char(100),char(0),char(92),char(0),char(104),char(0),char(-64),char(0),
+char(92),char(1),char(104),char(0),char(-84),char(1),char(0),char(0),char(83),char(84),char(82),char(67),char(76),char(0),char(0),char(0),char(10),char(0),char(3),char(0),
+char(4),char(0),char(0),char(0),char(4),char(0),char(1),char(0),char(9),char(0),char(2),char(0),char(11),char(0),char(3),char(0),char(10),char(0),char(3),char(0),
+char(10),char(0),char(4),char(0),char(10),char(0),char(5),char(0),char(12),char(0),char(2),char(0),char(9),char(0),char(6),char(0),char(9),char(0),char(7),char(0),
+char(13),char(0),char(1),char(0),char(7),char(0),char(8),char(0),char(14),char(0),char(1),char(0),char(8),char(0),char(8),char(0),char(15),char(0),char(1),char(0),
+char(13),char(0),char(9),char(0),char(16),char(0),char(1),char(0),char(14),char(0),char(9),char(0),char(17),char(0),char(2),char(0),char(15),char(0),char(10),char(0),
+char(13),char(0),char(11),char(0),char(18),char(0),char(2),char(0),char(16),char(0),char(10),char(0),char(14),char(0),char(11),char(0),char(19),char(0),char(4),char(0),
+char(4),char(0),char(12),char(0),char(4),char(0),char(13),char(0),char(2),char(0),char(14),char(0),char(2),char(0),char(15),char(0),char(20),char(0),char(6),char(0),
+char(13),char(0),char(16),char(0),char(13),char(0),char(17),char(0),char(4),char(0),char(18),char(0),char(4),char(0),char(19),char(0),char(4),char(0),char(20),char(0),
+char(0),char(0),char(21),char(0),char(21),char(0),char(6),char(0),char(14),char(0),char(16),char(0),char(14),char(0),char(17),char(0),char(4),char(0),char(18),char(0),
+char(4),char(0),char(19),char(0),char(4),char(0),char(20),char(0),char(0),char(0),char(21),char(0),char(22),char(0),char(3),char(0),char(2),char(0),char(14),char(0),
+char(2),char(0),char(15),char(0),char(4),char(0),char(22),char(0),char(23),char(0),char(12),char(0),char(13),char(0),char(23),char(0),char(13),char(0),char(24),char(0),
+char(13),char(0),char(25),char(0),char(4),char(0),char(26),char(0),char(4),char(0),char(27),char(0),char(4),char(0),char(28),char(0),char(4),char(0),char(29),char(0),
+char(20),char(0),char(30),char(0),char(22),char(0),char(31),char(0),char(19),char(0),char(32),char(0),char(4),char(0),char(33),char(0),char(4),char(0),char(34),char(0),
+char(24),char(0),char(12),char(0),char(14),char(0),char(23),char(0),char(14),char(0),char(24),char(0),char(14),char(0),char(25),char(0),char(4),char(0),char(26),char(0),
+char(4),char(0),char(27),char(0),char(4),char(0),char(28),char(0),char(4),char(0),char(29),char(0),char(21),char(0),char(30),char(0),char(22),char(0),char(31),char(0),
+char(4),char(0),char(33),char(0),char(4),char(0),char(34),char(0),char(19),char(0),char(32),char(0),char(25),char(0),char(3),char(0),char(0),char(0),char(35),char(0),
+char(4),char(0),char(36),char(0),char(0),char(0),char(37),char(0),char(26),char(0),char(5),char(0),char(25),char(0),char(38),char(0),char(13),char(0),char(39),char(0),
+char(13),char(0),char(40),char(0),char(7),char(0),char(41),char(0),char(0),char(0),char(21),char(0),char(27),char(0),char(5),char(0),char(25),char(0),char(38),char(0),
+char(13),char(0),char(39),char(0),char(13),char(0),char(42),char(0),char(7),char(0),char(43),char(0),char(4),char(0),char(44),char(0),char(28),char(0),char(2),char(0),
+char(13),char(0),char(45),char(0),char(7),char(0),char(46),char(0),char(29),char(0),char(4),char(0),char(27),char(0),char(47),char(0),char(28),char(0),char(48),char(0),
+char(4),char(0),char(49),char(0),char(0),char(0),char(37),char(0),char(30),char(0),char(1),char(0),char(4),char(0),char(50),char(0),char(31),char(0),char(2),char(0),
+char(2),char(0),char(50),char(0),char(0),char(0),char(51),char(0),char(32),char(0),char(2),char(0),char(2),char(0),char(52),char(0),char(0),char(0),char(51),char(0),
+char(33),char(0),char(2),char(0),char(0),char(0),char(52),char(0),char(0),char(0),char(53),char(0),char(34),char(0),char(8),char(0),char(13),char(0),char(54),char(0),
+char(14),char(0),char(55),char(0),char(30),char(0),char(56),char(0),char(32),char(0),char(57),char(0),char(33),char(0),char(58),char(0),char(31),char(0),char(59),char(0),
+char(4),char(0),char(60),char(0),char(4),char(0),char(61),char(0),char(35),char(0),char(4),char(0),char(34),char(0),char(62),char(0),char(13),char(0),char(63),char(0),
+char(4),char(0),char(64),char(0),char(0),char(0),char(37),char(0),char(36),char(0),char(7),char(0),char(25),char(0),char(38),char(0),char(35),char(0),char(65),char(0),
+char(23),char(0),char(66),char(0),char(24),char(0),char(67),char(0),char(37),char(0),char(68),char(0),char(7),char(0),char(43),char(0),char(0),char(0),char(69),char(0),
+char(38),char(0),char(2),char(0),char(36),char(0),char(70),char(0),char(13),char(0),char(39),char(0),char(39),char(0),char(4),char(0),char(17),char(0),char(71),char(0),
+char(25),char(0),char(72),char(0),char(4),char(0),char(73),char(0),char(7),char(0),char(74),char(0),char(40),char(0),char(4),char(0),char(25),char(0),char(38),char(0),
+char(39),char(0),char(75),char(0),char(4),char(0),char(76),char(0),char(7),char(0),char(43),char(0),char(41),char(0),char(3),char(0),char(27),char(0),char(47),char(0),
+char(4),char(0),char(77),char(0),char(0),char(0),char(37),char(0),char(42),char(0),char(3),char(0),char(27),char(0),char(47),char(0),char(4),char(0),char(78),char(0),
+char(0),char(0),char(37),char(0),char(43),char(0),char(3),char(0),char(27),char(0),char(47),char(0),char(4),char(0),char(77),char(0),char(0),char(0),char(37),char(0),
+char(44),char(0),char(4),char(0),char(4),char(0),char(79),char(0),char(7),char(0),char(80),char(0),char(7),char(0),char(81),char(0),char(7),char(0),char(82),char(0),
+char(37),char(0),char(14),char(0),char(4),char(0),char(83),char(0),char(4),char(0),char(84),char(0),char(44),char(0),char(85),char(0),char(4),char(0),char(86),char(0),
+char(7),char(0),char(87),char(0),char(7),char(0),char(88),char(0),char(7),char(0),char(89),char(0),char(7),char(0),char(90),char(0),char(7),char(0),char(91),char(0),
+char(4),char(0),char(92),char(0),char(4),char(0),char(93),char(0),char(4),char(0),char(94),char(0),char(4),char(0),char(95),char(0),char(0),char(0),char(37),char(0),
+char(45),char(0),char(5),char(0),char(25),char(0),char(38),char(0),char(35),char(0),char(65),char(0),char(13),char(0),char(39),char(0),char(7),char(0),char(43),char(0),
+char(4),char(0),char(96),char(0),char(46),char(0),char(5),char(0),char(27),char(0),char(47),char(0),char(13),char(0),char(97),char(0),char(14),char(0),char(98),char(0),
+char(4),char(0),char(99),char(0),char(0),char(0),char(100),char(0),char(47),char(0),char(25),char(0),char(9),char(0),char(101),char(0),char(9),char(0),char(102),char(0),
+char(25),char(0),char(103),char(0),char(0),char(0),char(35),char(0),char(18),char(0),char(104),char(0),char(18),char(0),char(105),char(0),char(14),char(0),char(106),char(0),
+char(14),char(0),char(107),char(0),char(14),char(0),char(108),char(0),char(8),char(0),char(109),char(0),char(8),char(0),char(110),char(0),char(8),char(0),char(111),char(0),
+char(8),char(0),char(112),char(0),char(8),char(0),char(113),char(0),char(8),char(0),char(114),char(0),char(8),char(0),char(115),char(0),char(8),char(0),char(116),char(0),
char(4),char(0),char(117),char(0),char(4),char(0),char(118),char(0),char(4),char(0),char(119),char(0),char(4),char(0),char(120),char(0),char(4),char(0),char(121),char(0),
-char(4),char(0),char(122),char(0),char(0),char(0),char(37),char(0),char(48),char(0),char(2),char(0),char(49),char(0),char(123),char(0),char(14),char(0),char(124),char(0),
-char(50),char(0),char(2),char(0),char(51),char(0),char(123),char(0),char(13),char(0),char(124),char(0),char(52),char(0),char(21),char(0),char(47),char(0),char(125),char(0),
-char(15),char(0),char(126),char(0),char(13),char(0),char(127),char(0),char(13),char(0),char(-128),char(0),char(13),char(0),char(-127),char(0),char(13),char(0),char(-126),char(0),
-char(13),char(0),char(124),char(0),char(13),char(0),char(-125),char(0),char(13),char(0),char(-124),char(0),char(13),char(0),char(-123),char(0),char(13),char(0),char(-122),char(0),
-char(7),char(0),char(-121),char(0),char(7),char(0),char(-120),char(0),char(7),char(0),char(-119),char(0),char(7),char(0),char(-118),char(0),char(7),char(0),char(-117),char(0),
-char(7),char(0),char(-116),char(0),char(7),char(0),char(-115),char(0),char(7),char(0),char(-114),char(0),char(7),char(0),char(-113),char(0),char(4),char(0),char(-112),char(0),
-char(53),char(0),char(22),char(0),char(46),char(0),char(125),char(0),char(16),char(0),char(126),char(0),char(14),char(0),char(127),char(0),char(14),char(0),char(-128),char(0),
-char(14),char(0),char(-127),char(0),char(14),char(0),char(-126),char(0),char(14),char(0),char(124),char(0),char(14),char(0),char(-125),char(0),char(14),char(0),char(-124),char(0),
-char(14),char(0),char(-123),char(0),char(14),char(0),char(-122),char(0),char(8),char(0),char(-121),char(0),char(8),char(0),char(-120),char(0),char(8),char(0),char(-119),char(0),
-char(8),char(0),char(-118),char(0),char(8),char(0),char(-117),char(0),char(8),char(0),char(-116),char(0),char(8),char(0),char(-115),char(0),char(8),char(0),char(-114),char(0),
-char(8),char(0),char(-113),char(0),char(4),char(0),char(-112),char(0),char(0),char(0),char(37),char(0),char(54),char(0),char(2),char(0),char(4),char(0),char(-111),char(0),
-char(4),char(0),char(-110),char(0),char(55),char(0),char(13),char(0),char(56),char(0),char(-109),char(0),char(56),char(0),char(-108),char(0),char(0),char(0),char(35),char(0),
-char(4),char(0),char(-107),char(0),char(4),char(0),char(-106),char(0),char(4),char(0),char(-105),char(0),char(4),char(0),char(-104),char(0),char(7),char(0),char(-103),char(0),
-char(7),char(0),char(-102),char(0),char(4),char(0),char(-101),char(0),char(4),char(0),char(-100),char(0),char(7),char(0),char(-99),char(0),char(4),char(0),char(-98),char(0),
-char(57),char(0),char(3),char(0),char(55),char(0),char(-97),char(0),char(13),char(0),char(-96),char(0),char(13),char(0),char(-95),char(0),char(58),char(0),char(3),char(0),
-char(55),char(0),char(-97),char(0),char(14),char(0),char(-96),char(0),char(14),char(0),char(-95),char(0),char(59),char(0),char(13),char(0),char(55),char(0),char(-97),char(0),
-char(18),char(0),char(-94),char(0),char(18),char(0),char(-93),char(0),char(4),char(0),char(-92),char(0),char(4),char(0),char(-91),char(0),char(4),char(0),char(-90),char(0),
-char(7),char(0),char(-89),char(0),char(7),char(0),char(-88),char(0),char(7),char(0),char(-87),char(0),char(7),char(0),char(-86),char(0),char(7),char(0),char(-85),char(0),
-char(7),char(0),char(-84),char(0),char(7),char(0),char(-83),char(0),char(60),char(0),char(13),char(0),char(55),char(0),char(-97),char(0),char(17),char(0),char(-94),char(0),
-char(17),char(0),char(-93),char(0),char(4),char(0),char(-92),char(0),char(4),char(0),char(-91),char(0),char(4),char(0),char(-90),char(0),char(7),char(0),char(-89),char(0),
-char(7),char(0),char(-88),char(0),char(7),char(0),char(-87),char(0),char(7),char(0),char(-86),char(0),char(7),char(0),char(-85),char(0),char(7),char(0),char(-84),char(0),
-char(7),char(0),char(-83),char(0),char(61),char(0),char(11),char(0),char(55),char(0),char(-97),char(0),char(17),char(0),char(-94),char(0),char(17),char(0),char(-93),char(0),
-char(7),char(0),char(-82),char(0),char(7),char(0),char(-81),char(0),char(7),char(0),char(-80),char(0),char(7),char(0),char(-85),char(0),char(7),char(0),char(-84),char(0),
-char(7),char(0),char(-83),char(0),char(7),char(0),char(-79),char(0),char(0),char(0),char(21),char(0),char(62),char(0),char(9),char(0),char(55),char(0),char(-97),char(0),
-char(17),char(0),char(-94),char(0),char(17),char(0),char(-93),char(0),char(13),char(0),char(-78),char(0),char(13),char(0),char(-77),char(0),char(13),char(0),char(-76),char(0),
-char(13),char(0),char(-75),char(0),char(4),char(0),char(-74),char(0),char(4),char(0),char(-73),char(0),char(63),char(0),char(5),char(0),char(62),char(0),char(-72),char(0),
-char(4),char(0),char(-71),char(0),char(7),char(0),char(-70),char(0),char(7),char(0),char(-69),char(0),char(7),char(0),char(-68),char(0),char(64),char(0),char(9),char(0),
-char(55),char(0),char(-97),char(0),char(17),char(0),char(-94),char(0),char(17),char(0),char(-93),char(0),char(7),char(0),char(-78),char(0),char(7),char(0),char(-77),char(0),
-char(7),char(0),char(-76),char(0),char(7),char(0),char(-75),char(0),char(4),char(0),char(-74),char(0),char(4),char(0),char(-73),char(0),char(49),char(0),char(22),char(0),
-char(8),char(0),char(-67),char(0),char(8),char(0),char(-79),char(0),char(8),char(0),char(110),char(0),char(8),char(0),char(-66),char(0),char(8),char(0),char(112),char(0),
-char(8),char(0),char(-65),char(0),char(8),char(0),char(-64),char(0),char(8),char(0),char(-63),char(0),char(8),char(0),char(-62),char(0),char(8),char(0),char(-61),char(0),
-char(8),char(0),char(-60),char(0),char(8),char(0),char(-59),char(0),char(8),char(0),char(-58),char(0),char(8),char(0),char(-57),char(0),char(8),char(0),char(-56),char(0),
-char(8),char(0),char(-55),char(0),char(4),char(0),char(-54),char(0),char(4),char(0),char(-53),char(0),char(4),char(0),char(-52),char(0),char(4),char(0),char(-51),char(0),
-char(4),char(0),char(-50),char(0),char(0),char(0),char(37),char(0),char(51),char(0),char(22),char(0),char(7),char(0),char(-67),char(0),char(7),char(0),char(-79),char(0),
-char(7),char(0),char(110),char(0),char(7),char(0),char(-66),char(0),char(7),char(0),char(112),char(0),char(7),char(0),char(-65),char(0),char(7),char(0),char(-64),char(0),
-char(7),char(0),char(-63),char(0),char(7),char(0),char(-62),char(0),char(7),char(0),char(-61),char(0),char(7),char(0),char(-60),char(0),char(7),char(0),char(-59),char(0),
-char(7),char(0),char(-58),char(0),char(7),char(0),char(-57),char(0),char(7),char(0),char(-56),char(0),char(7),char(0),char(-55),char(0),char(4),char(0),char(-54),char(0),
-char(4),char(0),char(-53),char(0),char(4),char(0),char(-52),char(0),char(4),char(0),char(-51),char(0),char(4),char(0),char(-50),char(0),char(0),char(0),char(37),char(0),
-char(65),char(0),char(4),char(0),char(7),char(0),char(-49),char(0),char(7),char(0),char(-48),char(0),char(7),char(0),char(-47),char(0),char(4),char(0),char(78),char(0),
-char(66),char(0),char(10),char(0),char(65),char(0),char(-46),char(0),char(13),char(0),char(-45),char(0),char(13),char(0),char(-44),char(0),char(13),char(0),char(-43),char(0),
-char(13),char(0),char(-42),char(0),char(13),char(0),char(-41),char(0),char(7),char(0),char(-121),char(0),char(7),char(0),char(-40),char(0),char(4),char(0),char(-39),char(0),
-char(4),char(0),char(53),char(0),char(67),char(0),char(4),char(0),char(65),char(0),char(-46),char(0),char(4),char(0),char(-38),char(0),char(7),char(0),char(-37),char(0),
-char(4),char(0),char(-36),char(0),char(68),char(0),char(4),char(0),char(13),char(0),char(-41),char(0),char(65),char(0),char(-46),char(0),char(4),char(0),char(-35),char(0),
-char(7),char(0),char(-34),char(0),char(69),char(0),char(7),char(0),char(13),char(0),char(-33),char(0),char(65),char(0),char(-46),char(0),char(4),char(0),char(-32),char(0),
-char(7),char(0),char(-31),char(0),char(7),char(0),char(-30),char(0),char(7),char(0),char(-29),char(0),char(4),char(0),char(53),char(0),char(70),char(0),char(6),char(0),
-char(15),char(0),char(-28),char(0),char(13),char(0),char(-30),char(0),char(13),char(0),char(-27),char(0),char(56),char(0),char(-26),char(0),char(4),char(0),char(-25),char(0),
-char(7),char(0),char(-29),char(0),char(71),char(0),char(26),char(0),char(4),char(0),char(-24),char(0),char(7),char(0),char(-23),char(0),char(7),char(0),char(-79),char(0),
-char(7),char(0),char(-22),char(0),char(7),char(0),char(-21),char(0),char(7),char(0),char(-20),char(0),char(7),char(0),char(-19),char(0),char(7),char(0),char(-18),char(0),
-char(7),char(0),char(-17),char(0),char(7),char(0),char(-16),char(0),char(7),char(0),char(-15),char(0),char(7),char(0),char(-14),char(0),char(7),char(0),char(-13),char(0),
-char(7),char(0),char(-12),char(0),char(7),char(0),char(-11),char(0),char(7),char(0),char(-10),char(0),char(7),char(0),char(-9),char(0),char(7),char(0),char(-8),char(0),
-char(7),char(0),char(-7),char(0),char(7),char(0),char(-6),char(0),char(7),char(0),char(-5),char(0),char(4),char(0),char(-4),char(0),char(4),char(0),char(-3),char(0),
-char(4),char(0),char(-2),char(0),char(4),char(0),char(-1),char(0),char(4),char(0),char(117),char(0),char(72),char(0),char(12),char(0),char(15),char(0),char(0),char(1),
-char(15),char(0),char(1),char(1),char(15),char(0),char(2),char(1),char(13),char(0),char(3),char(1),char(13),char(0),char(4),char(1),char(7),char(0),char(5),char(1),
-char(4),char(0),char(6),char(1),char(4),char(0),char(7),char(1),char(4),char(0),char(8),char(1),char(4),char(0),char(9),char(1),char(7),char(0),char(-31),char(0),
-char(4),char(0),char(53),char(0),char(73),char(0),char(27),char(0),char(17),char(0),char(10),char(1),char(15),char(0),char(11),char(1),char(15),char(0),char(12),char(1),
-char(13),char(0),char(3),char(1),char(13),char(0),char(13),char(1),char(13),char(0),char(14),char(1),char(13),char(0),char(15),char(1),char(13),char(0),char(16),char(1),
-char(13),char(0),char(17),char(1),char(4),char(0),char(18),char(1),char(7),char(0),char(19),char(1),char(4),char(0),char(20),char(1),char(4),char(0),char(21),char(1),
-char(4),char(0),char(22),char(1),char(7),char(0),char(23),char(1),char(7),char(0),char(24),char(1),char(4),char(0),char(25),char(1),char(4),char(0),char(26),char(1),
-char(7),char(0),char(27),char(1),char(7),char(0),char(28),char(1),char(7),char(0),char(29),char(1),char(7),char(0),char(30),char(1),char(7),char(0),char(31),char(1),
-char(7),char(0),char(32),char(1),char(4),char(0),char(33),char(1),char(4),char(0),char(34),char(1),char(4),char(0),char(35),char(1),char(74),char(0),char(12),char(0),
-char(9),char(0),char(36),char(1),char(9),char(0),char(37),char(1),char(13),char(0),char(38),char(1),char(7),char(0),char(39),char(1),char(7),char(0),char(-63),char(0),
-char(7),char(0),char(40),char(1),char(4),char(0),char(41),char(1),char(13),char(0),char(42),char(1),char(4),char(0),char(43),char(1),char(4),char(0),char(44),char(1),
-char(4),char(0),char(45),char(1),char(4),char(0),char(53),char(0),char(75),char(0),char(19),char(0),char(47),char(0),char(125),char(0),char(72),char(0),char(46),char(1),
-char(65),char(0),char(47),char(1),char(66),char(0),char(48),char(1),char(67),char(0),char(49),char(1),char(68),char(0),char(50),char(1),char(69),char(0),char(51),char(1),
-char(70),char(0),char(52),char(1),char(73),char(0),char(53),char(1),char(74),char(0),char(54),char(1),char(4),char(0),char(55),char(1),char(4),char(0),char(21),char(1),
-char(4),char(0),char(56),char(1),char(4),char(0),char(57),char(1),char(4),char(0),char(58),char(1),char(4),char(0),char(59),char(1),char(4),char(0),char(60),char(1),
-char(4),char(0),char(61),char(1),char(71),char(0),char(62),char(1),};
+char(4),char(0),char(122),char(0),char(4),char(0),char(123),char(0),char(0),char(0),char(37),char(0),char(48),char(0),char(25),char(0),char(9),char(0),char(101),char(0),
+char(9),char(0),char(102),char(0),char(25),char(0),char(103),char(0),char(0),char(0),char(35),char(0),char(17),char(0),char(104),char(0),char(17),char(0),char(105),char(0),
+char(13),char(0),char(106),char(0),char(13),char(0),char(107),char(0),char(13),char(0),char(108),char(0),char(7),char(0),char(109),char(0),char(7),char(0),char(110),char(0),
+char(7),char(0),char(111),char(0),char(7),char(0),char(112),char(0),char(7),char(0),char(113),char(0),char(7),char(0),char(114),char(0),char(7),char(0),char(115),char(0),
+char(7),char(0),char(116),char(0),char(4),char(0),char(117),char(0),char(4),char(0),char(118),char(0),char(4),char(0),char(119),char(0),char(4),char(0),char(120),char(0),
+char(4),char(0),char(121),char(0),char(4),char(0),char(122),char(0),char(4),char(0),char(123),char(0),char(0),char(0),char(37),char(0),char(49),char(0),char(2),char(0),
+char(50),char(0),char(124),char(0),char(14),char(0),char(125),char(0),char(51),char(0),char(2),char(0),char(52),char(0),char(124),char(0),char(13),char(0),char(125),char(0),
+char(53),char(0),char(21),char(0),char(48),char(0),char(126),char(0),char(15),char(0),char(127),char(0),char(13),char(0),char(-128),char(0),char(13),char(0),char(-127),char(0),
+char(13),char(0),char(-126),char(0),char(13),char(0),char(-125),char(0),char(13),char(0),char(125),char(0),char(13),char(0),char(-124),char(0),char(13),char(0),char(-123),char(0),
+char(13),char(0),char(-122),char(0),char(13),char(0),char(-121),char(0),char(7),char(0),char(-120),char(0),char(7),char(0),char(-119),char(0),char(7),char(0),char(-118),char(0),
+char(7),char(0),char(-117),char(0),char(7),char(0),char(-116),char(0),char(7),char(0),char(-115),char(0),char(7),char(0),char(-114),char(0),char(7),char(0),char(-113),char(0),
+char(7),char(0),char(-112),char(0),char(4),char(0),char(-111),char(0),char(54),char(0),char(22),char(0),char(47),char(0),char(126),char(0),char(16),char(0),char(127),char(0),
+char(14),char(0),char(-128),char(0),char(14),char(0),char(-127),char(0),char(14),char(0),char(-126),char(0),char(14),char(0),char(-125),char(0),char(14),char(0),char(125),char(0),
+char(14),char(0),char(-124),char(0),char(14),char(0),char(-123),char(0),char(14),char(0),char(-122),char(0),char(14),char(0),char(-121),char(0),char(8),char(0),char(-120),char(0),
+char(8),char(0),char(-119),char(0),char(8),char(0),char(-118),char(0),char(8),char(0),char(-117),char(0),char(8),char(0),char(-116),char(0),char(8),char(0),char(-115),char(0),
+char(8),char(0),char(-114),char(0),char(8),char(0),char(-113),char(0),char(8),char(0),char(-112),char(0),char(4),char(0),char(-111),char(0),char(0),char(0),char(37),char(0),
+char(55),char(0),char(2),char(0),char(4),char(0),char(-110),char(0),char(4),char(0),char(-109),char(0),char(56),char(0),char(13),char(0),char(53),char(0),char(-108),char(0),
+char(53),char(0),char(-107),char(0),char(0),char(0),char(35),char(0),char(4),char(0),char(-106),char(0),char(4),char(0),char(-105),char(0),char(4),char(0),char(-104),char(0),
+char(4),char(0),char(-103),char(0),char(7),char(0),char(-102),char(0),char(7),char(0),char(-101),char(0),char(4),char(0),char(-100),char(0),char(4),char(0),char(-99),char(0),
+char(7),char(0),char(-98),char(0),char(4),char(0),char(-97),char(0),char(57),char(0),char(13),char(0),char(58),char(0),char(-108),char(0),char(58),char(0),char(-107),char(0),
+char(0),char(0),char(35),char(0),char(4),char(0),char(-106),char(0),char(4),char(0),char(-105),char(0),char(4),char(0),char(-104),char(0),char(4),char(0),char(-103),char(0),
+char(7),char(0),char(-102),char(0),char(7),char(0),char(-101),char(0),char(4),char(0),char(-100),char(0),char(4),char(0),char(-99),char(0),char(7),char(0),char(-98),char(0),
+char(4),char(0),char(-97),char(0),char(59),char(0),char(14),char(0),char(54),char(0),char(-108),char(0),char(54),char(0),char(-107),char(0),char(0),char(0),char(35),char(0),
+char(4),char(0),char(-106),char(0),char(4),char(0),char(-105),char(0),char(4),char(0),char(-104),char(0),char(4),char(0),char(-103),char(0),char(8),char(0),char(-102),char(0),
+char(8),char(0),char(-101),char(0),char(4),char(0),char(-100),char(0),char(4),char(0),char(-99),char(0),char(8),char(0),char(-98),char(0),char(4),char(0),char(-97),char(0),
+char(0),char(0),char(-96),char(0),char(60),char(0),char(3),char(0),char(57),char(0),char(-95),char(0),char(13),char(0),char(-94),char(0),char(13),char(0),char(-93),char(0),
+char(61),char(0),char(3),char(0),char(59),char(0),char(-95),char(0),char(14),char(0),char(-94),char(0),char(14),char(0),char(-93),char(0),char(62),char(0),char(3),char(0),
+char(57),char(0),char(-95),char(0),char(14),char(0),char(-94),char(0),char(14),char(0),char(-93),char(0),char(63),char(0),char(13),char(0),char(57),char(0),char(-95),char(0),
+char(18),char(0),char(-92),char(0),char(18),char(0),char(-91),char(0),char(4),char(0),char(-90),char(0),char(4),char(0),char(-89),char(0),char(4),char(0),char(-88),char(0),
+char(7),char(0),char(-87),char(0),char(7),char(0),char(-86),char(0),char(7),char(0),char(-85),char(0),char(7),char(0),char(-84),char(0),char(7),char(0),char(-83),char(0),
+char(7),char(0),char(-82),char(0),char(7),char(0),char(-81),char(0),char(64),char(0),char(13),char(0),char(57),char(0),char(-95),char(0),char(17),char(0),char(-92),char(0),
+char(17),char(0),char(-91),char(0),char(4),char(0),char(-90),char(0),char(4),char(0),char(-89),char(0),char(4),char(0),char(-88),char(0),char(7),char(0),char(-87),char(0),
+char(7),char(0),char(-86),char(0),char(7),char(0),char(-85),char(0),char(7),char(0),char(-84),char(0),char(7),char(0),char(-83),char(0),char(7),char(0),char(-82),char(0),
+char(7),char(0),char(-81),char(0),char(65),char(0),char(14),char(0),char(59),char(0),char(-95),char(0),char(18),char(0),char(-92),char(0),char(18),char(0),char(-91),char(0),
+char(4),char(0),char(-90),char(0),char(4),char(0),char(-89),char(0),char(4),char(0),char(-88),char(0),char(8),char(0),char(-87),char(0),char(8),char(0),char(-86),char(0),
+char(8),char(0),char(-85),char(0),char(8),char(0),char(-84),char(0),char(8),char(0),char(-83),char(0),char(8),char(0),char(-82),char(0),char(8),char(0),char(-81),char(0),
+char(0),char(0),char(-80),char(0),char(66),char(0),char(10),char(0),char(59),char(0),char(-95),char(0),char(18),char(0),char(-92),char(0),char(18),char(0),char(-91),char(0),
+char(8),char(0),char(-79),char(0),char(8),char(0),char(-78),char(0),char(8),char(0),char(-77),char(0),char(8),char(0),char(-83),char(0),char(8),char(0),char(-82),char(0),
+char(8),char(0),char(-81),char(0),char(8),char(0),char(-76),char(0),char(67),char(0),char(11),char(0),char(57),char(0),char(-95),char(0),char(17),char(0),char(-92),char(0),
+char(17),char(0),char(-91),char(0),char(7),char(0),char(-79),char(0),char(7),char(0),char(-78),char(0),char(7),char(0),char(-77),char(0),char(7),char(0),char(-83),char(0),
+char(7),char(0),char(-82),char(0),char(7),char(0),char(-81),char(0),char(7),char(0),char(-76),char(0),char(0),char(0),char(21),char(0),char(68),char(0),char(9),char(0),
+char(57),char(0),char(-95),char(0),char(17),char(0),char(-92),char(0),char(17),char(0),char(-91),char(0),char(13),char(0),char(-75),char(0),char(13),char(0),char(-74),char(0),
+char(13),char(0),char(-73),char(0),char(13),char(0),char(-72),char(0),char(4),char(0),char(-71),char(0),char(4),char(0),char(-70),char(0),char(69),char(0),char(9),char(0),
+char(59),char(0),char(-95),char(0),char(18),char(0),char(-92),char(0),char(18),char(0),char(-91),char(0),char(14),char(0),char(-75),char(0),char(14),char(0),char(-74),char(0),
+char(14),char(0),char(-73),char(0),char(14),char(0),char(-72),char(0),char(4),char(0),char(-71),char(0),char(4),char(0),char(-70),char(0),char(70),char(0),char(5),char(0),
+char(68),char(0),char(-69),char(0),char(4),char(0),char(-68),char(0),char(7),char(0),char(-67),char(0),char(7),char(0),char(-66),char(0),char(7),char(0),char(-65),char(0),
+char(71),char(0),char(5),char(0),char(69),char(0),char(-69),char(0),char(4),char(0),char(-68),char(0),char(8),char(0),char(-67),char(0),char(8),char(0),char(-66),char(0),
+char(8),char(0),char(-65),char(0),char(72),char(0),char(9),char(0),char(57),char(0),char(-95),char(0),char(17),char(0),char(-92),char(0),char(17),char(0),char(-91),char(0),
+char(7),char(0),char(-75),char(0),char(7),char(0),char(-74),char(0),char(7),char(0),char(-73),char(0),char(7),char(0),char(-72),char(0),char(4),char(0),char(-71),char(0),
+char(4),char(0),char(-70),char(0),char(73),char(0),char(9),char(0),char(59),char(0),char(-95),char(0),char(18),char(0),char(-92),char(0),char(18),char(0),char(-91),char(0),
+char(8),char(0),char(-75),char(0),char(8),char(0),char(-74),char(0),char(8),char(0),char(-73),char(0),char(8),char(0),char(-72),char(0),char(4),char(0),char(-71),char(0),
+char(4),char(0),char(-70),char(0),char(74),char(0),char(5),char(0),char(56),char(0),char(-95),char(0),char(13),char(0),char(-64),char(0),char(13),char(0),char(-63),char(0),
+char(7),char(0),char(-62),char(0),char(0),char(0),char(37),char(0),char(75),char(0),char(4),char(0),char(59),char(0),char(-95),char(0),char(14),char(0),char(-64),char(0),
+char(14),char(0),char(-63),char(0),char(8),char(0),char(-62),char(0),char(50),char(0),char(22),char(0),char(8),char(0),char(-61),char(0),char(8),char(0),char(-76),char(0),
+char(8),char(0),char(111),char(0),char(8),char(0),char(-60),char(0),char(8),char(0),char(113),char(0),char(8),char(0),char(-59),char(0),char(8),char(0),char(-58),char(0),
+char(8),char(0),char(-57),char(0),char(8),char(0),char(-56),char(0),char(8),char(0),char(-55),char(0),char(8),char(0),char(-54),char(0),char(8),char(0),char(-53),char(0),
+char(8),char(0),char(-52),char(0),char(8),char(0),char(-51),char(0),char(8),char(0),char(-50),char(0),char(8),char(0),char(-49),char(0),char(4),char(0),char(-48),char(0),
+char(4),char(0),char(-47),char(0),char(4),char(0),char(-46),char(0),char(4),char(0),char(-45),char(0),char(4),char(0),char(-44),char(0),char(0),char(0),char(37),char(0),
+char(52),char(0),char(22),char(0),char(7),char(0),char(-61),char(0),char(7),char(0),char(-76),char(0),char(7),char(0),char(111),char(0),char(7),char(0),char(-60),char(0),
+char(7),char(0),char(113),char(0),char(7),char(0),char(-59),char(0),char(7),char(0),char(-58),char(0),char(7),char(0),char(-57),char(0),char(7),char(0),char(-56),char(0),
+char(7),char(0),char(-55),char(0),char(7),char(0),char(-54),char(0),char(7),char(0),char(-53),char(0),char(7),char(0),char(-52),char(0),char(7),char(0),char(-51),char(0),
+char(7),char(0),char(-50),char(0),char(7),char(0),char(-49),char(0),char(4),char(0),char(-48),char(0),char(4),char(0),char(-47),char(0),char(4),char(0),char(-46),char(0),
+char(4),char(0),char(-45),char(0),char(4),char(0),char(-44),char(0),char(0),char(0),char(37),char(0),char(76),char(0),char(4),char(0),char(7),char(0),char(-43),char(0),
+char(7),char(0),char(-42),char(0),char(7),char(0),char(-41),char(0),char(4),char(0),char(79),char(0),char(77),char(0),char(10),char(0),char(76),char(0),char(-40),char(0),
+char(13),char(0),char(-39),char(0),char(13),char(0),char(-38),char(0),char(13),char(0),char(-37),char(0),char(13),char(0),char(-36),char(0),char(13),char(0),char(-35),char(0),
+char(7),char(0),char(-120),char(0),char(7),char(0),char(-34),char(0),char(4),char(0),char(-33),char(0),char(4),char(0),char(53),char(0),char(78),char(0),char(4),char(0),
+char(76),char(0),char(-40),char(0),char(4),char(0),char(-32),char(0),char(7),char(0),char(-31),char(0),char(4),char(0),char(-30),char(0),char(79),char(0),char(4),char(0),
+char(13),char(0),char(-35),char(0),char(76),char(0),char(-40),char(0),char(4),char(0),char(-29),char(0),char(7),char(0),char(-28),char(0),char(80),char(0),char(7),char(0),
+char(13),char(0),char(-27),char(0),char(76),char(0),char(-40),char(0),char(4),char(0),char(-26),char(0),char(7),char(0),char(-25),char(0),char(7),char(0),char(-24),char(0),
+char(7),char(0),char(-23),char(0),char(4),char(0),char(53),char(0),char(81),char(0),char(6),char(0),char(15),char(0),char(-22),char(0),char(13),char(0),char(-24),char(0),
+char(13),char(0),char(-21),char(0),char(58),char(0),char(-20),char(0),char(4),char(0),char(-19),char(0),char(7),char(0),char(-23),char(0),char(82),char(0),char(26),char(0),
+char(4),char(0),char(-18),char(0),char(7),char(0),char(-17),char(0),char(7),char(0),char(-76),char(0),char(7),char(0),char(-16),char(0),char(7),char(0),char(-15),char(0),
+char(7),char(0),char(-14),char(0),char(7),char(0),char(-13),char(0),char(7),char(0),char(-12),char(0),char(7),char(0),char(-11),char(0),char(7),char(0),char(-10),char(0),
+char(7),char(0),char(-9),char(0),char(7),char(0),char(-8),char(0),char(7),char(0),char(-7),char(0),char(7),char(0),char(-6),char(0),char(7),char(0),char(-5),char(0),
+char(7),char(0),char(-4),char(0),char(7),char(0),char(-3),char(0),char(7),char(0),char(-2),char(0),char(7),char(0),char(-1),char(0),char(7),char(0),char(0),char(1),
+char(7),char(0),char(1),char(1),char(4),char(0),char(2),char(1),char(4),char(0),char(3),char(1),char(4),char(0),char(4),char(1),char(4),char(0),char(5),char(1),
+char(4),char(0),char(118),char(0),char(83),char(0),char(12),char(0),char(15),char(0),char(6),char(1),char(15),char(0),char(7),char(1),char(15),char(0),char(8),char(1),
+char(13),char(0),char(9),char(1),char(13),char(0),char(10),char(1),char(7),char(0),char(11),char(1),char(4),char(0),char(12),char(1),char(4),char(0),char(13),char(1),
+char(4),char(0),char(14),char(1),char(4),char(0),char(15),char(1),char(7),char(0),char(-25),char(0),char(4),char(0),char(53),char(0),char(84),char(0),char(27),char(0),
+char(17),char(0),char(16),char(1),char(15),char(0),char(17),char(1),char(15),char(0),char(18),char(1),char(13),char(0),char(9),char(1),char(13),char(0),char(19),char(1),
+char(13),char(0),char(20),char(1),char(13),char(0),char(21),char(1),char(13),char(0),char(22),char(1),char(13),char(0),char(23),char(1),char(4),char(0),char(24),char(1),
+char(7),char(0),char(25),char(1),char(4),char(0),char(26),char(1),char(4),char(0),char(27),char(1),char(4),char(0),char(28),char(1),char(7),char(0),char(29),char(1),
+char(7),char(0),char(30),char(1),char(4),char(0),char(31),char(1),char(4),char(0),char(32),char(1),char(7),char(0),char(33),char(1),char(7),char(0),char(34),char(1),
+char(7),char(0),char(35),char(1),char(7),char(0),char(36),char(1),char(7),char(0),char(37),char(1),char(7),char(0),char(38),char(1),char(4),char(0),char(39),char(1),
+char(4),char(0),char(40),char(1),char(4),char(0),char(41),char(1),char(85),char(0),char(12),char(0),char(9),char(0),char(42),char(1),char(9),char(0),char(43),char(1),
+char(13),char(0),char(44),char(1),char(7),char(0),char(45),char(1),char(7),char(0),char(-57),char(0),char(7),char(0),char(46),char(1),char(4),char(0),char(47),char(1),
+char(13),char(0),char(48),char(1),char(4),char(0),char(49),char(1),char(4),char(0),char(50),char(1),char(4),char(0),char(51),char(1),char(4),char(0),char(53),char(0),
+char(86),char(0),char(19),char(0),char(48),char(0),char(126),char(0),char(83),char(0),char(52),char(1),char(76),char(0),char(53),char(1),char(77),char(0),char(54),char(1),
+char(78),char(0),char(55),char(1),char(79),char(0),char(56),char(1),char(80),char(0),char(57),char(1),char(81),char(0),char(58),char(1),char(84),char(0),char(59),char(1),
+char(85),char(0),char(60),char(1),char(4),char(0),char(61),char(1),char(4),char(0),char(27),char(1),char(4),char(0),char(62),char(1),char(4),char(0),char(63),char(1),
+char(4),char(0),char(64),char(1),char(4),char(0),char(65),char(1),char(4),char(0),char(66),char(1),char(4),char(0),char(67),char(1),char(82),char(0),char(68),char(1),
+};
int sBulletDNAlen= sizeof(sBulletDNAstr);
+
char sBulletDNAstr64[]= {
-char(83),char(68),char(78),char(65),char(78),char(65),char(77),char(69),char(63),char(1),char(0),char(0),char(109),char(95),char(115),char(105),char(122),char(101),char(0),char(109),
+char(83),char(68),char(78),char(65),char(78),char(65),char(77),char(69),char(69),char(1),char(0),char(0),char(109),char(95),char(115),char(105),char(122),char(101),char(0),char(109),
char(95),char(99),char(97),char(112),char(97),char(99),char(105),char(116),char(121),char(0),char(42),char(109),char(95),char(100),char(97),char(116),char(97),char(0),char(109),char(95),
char(99),char(111),char(108),char(108),char(105),char(115),char(105),char(111),char(110),char(83),char(104),char(97),char(112),char(101),char(115),char(0),char(109),char(95),char(99),char(111),
char(108),char(108),char(105),char(115),char(105),char(111),char(110),char(79),char(98),char(106),char(101),char(99),char(116),char(115),char(0),char(109),char(95),char(99),char(111),char(110),
@@ -512,238 +554,242 @@ char(102),char(111),char(114),char(109),char(0),char(42),char(109),char(95),char
char(95),char(99),char(104),char(105),char(108),char(100),char(83),char(104),char(97),char(112),char(101),char(84),char(121),char(112),char(101),char(0),char(109),char(95),char(99),char(104),
char(105),char(108),char(100),char(77),char(97),char(114),char(103),char(105),char(110),char(0),char(42),char(109),char(95),char(99),char(104),char(105),char(108),char(100),char(83),char(104),
char(97),char(112),char(101),char(80),char(116),char(114),char(0),char(109),char(95),char(110),char(117),char(109),char(67),char(104),char(105),char(108),char(100),char(83),char(104),char(97),
-char(112),char(101),char(115),char(0),char(109),char(95),char(117),char(112),char(65),char(120),char(105),char(115),char(0),char(109),char(95),char(102),char(108),char(97),char(103),char(115),
-char(0),char(109),char(95),char(101),char(100),char(103),char(101),char(86),char(48),char(86),char(49),char(65),char(110),char(103),char(108),char(101),char(0),char(109),char(95),char(101),
-char(100),char(103),char(101),char(86),char(49),char(86),char(50),char(65),char(110),char(103),char(108),char(101),char(0),char(109),char(95),char(101),char(100),char(103),char(101),char(86),
-char(50),char(86),char(48),char(65),char(110),char(103),char(108),char(101),char(0),char(42),char(109),char(95),char(104),char(97),char(115),char(104),char(84),char(97),char(98),char(108),
-char(101),char(80),char(116),char(114),char(0),char(42),char(109),char(95),char(110),char(101),char(120),char(116),char(80),char(116),char(114),char(0),char(42),char(109),char(95),char(118),
-char(97),char(108),char(117),char(101),char(65),char(114),char(114),char(97),char(121),char(80),char(116),char(114),char(0),char(42),char(109),char(95),char(107),char(101),char(121),char(65),
-char(114),char(114),char(97),char(121),char(80),char(116),char(114),char(0),char(109),char(95),char(99),char(111),char(110),char(118),char(101),char(120),char(69),char(112),char(115),char(105),
-char(108),char(111),char(110),char(0),char(109),char(95),char(112),char(108),char(97),char(110),char(97),char(114),char(69),char(112),char(115),char(105),char(108),char(111),char(110),char(0),
-char(109),char(95),char(101),char(113),char(117),char(97),char(108),char(86),char(101),char(114),char(116),char(101),char(120),char(84),char(104),char(114),char(101),char(115),char(104),char(111),
-char(108),char(100),char(0),char(109),char(95),char(101),char(100),char(103),char(101),char(68),char(105),char(115),char(116),char(97),char(110),char(99),char(101),char(84),char(104),char(114),
-char(101),char(115),char(104),char(111),char(108),char(100),char(0),char(109),char(95),char(122),char(101),char(114),char(111),char(65),char(114),char(101),char(97),char(84),char(104),char(114),
-char(101),char(115),char(104),char(111),char(108),char(100),char(0),char(109),char(95),char(110),char(101),char(120),char(116),char(83),char(105),char(122),char(101),char(0),char(109),char(95),
-char(104),char(97),char(115),char(104),char(84),char(97),char(98),char(108),char(101),char(83),char(105),char(122),char(101),char(0),char(109),char(95),char(110),char(117),char(109),char(86),
-char(97),char(108),char(117),char(101),char(115),char(0),char(109),char(95),char(110),char(117),char(109),char(75),char(101),char(121),char(115),char(0),char(109),char(95),char(103),char(105),
-char(109),char(112),char(97),char(99),char(116),char(83),char(117),char(98),char(84),char(121),char(112),char(101),char(0),char(42),char(109),char(95),char(117),char(110),char(115),char(99),
-char(97),char(108),char(101),char(100),char(80),char(111),char(105),char(110),char(116),char(115),char(70),char(108),char(111),char(97),char(116),char(80),char(116),char(114),char(0),char(42),
-char(109),char(95),char(117),char(110),char(115),char(99),char(97),char(108),char(101),char(100),char(80),char(111),char(105),char(110),char(116),char(115),char(68),char(111),char(117),char(98),
-char(108),char(101),char(80),char(116),char(114),char(0),char(109),char(95),char(110),char(117),char(109),char(85),char(110),char(115),char(99),char(97),char(108),char(101),char(100),char(80),
-char(111),char(105),char(110),char(116),char(115),char(0),char(109),char(95),char(112),char(97),char(100),char(100),char(105),char(110),char(103),char(51),char(91),char(52),char(93),char(0),
-char(42),char(109),char(95),char(98),char(114),char(111),char(97),char(100),char(112),char(104),char(97),char(115),char(101),char(72),char(97),char(110),char(100),char(108),char(101),char(0),
-char(42),char(109),char(95),char(99),char(111),char(108),char(108),char(105),char(115),char(105),char(111),char(110),char(83),char(104),char(97),char(112),char(101),char(0),char(42),char(109),
-char(95),char(114),char(111),char(111),char(116),char(67),char(111),char(108),char(108),char(105),char(115),char(105),char(111),char(110),char(83),char(104),char(97),char(112),char(101),char(0),
-char(109),char(95),char(119),char(111),char(114),char(108),char(100),char(84),char(114),char(97),char(110),char(115),char(102),char(111),char(114),char(109),char(0),char(109),char(95),char(105),
-char(110),char(116),char(101),char(114),char(112),char(111),char(108),char(97),char(116),char(105),char(111),char(110),char(87),char(111),char(114),char(108),char(100),char(84),char(114),char(97),
+char(112),char(101),char(115),char(0),char(109),char(95),char(117),char(112),char(65),char(120),char(105),char(115),char(0),char(109),char(95),char(117),char(112),char(73),char(110),char(100),
+char(101),char(120),char(0),char(109),char(95),char(102),char(108),char(97),char(103),char(115),char(0),char(109),char(95),char(101),char(100),char(103),char(101),char(86),char(48),char(86),
+char(49),char(65),char(110),char(103),char(108),char(101),char(0),char(109),char(95),char(101),char(100),char(103),char(101),char(86),char(49),char(86),char(50),char(65),char(110),char(103),
+char(108),char(101),char(0),char(109),char(95),char(101),char(100),char(103),char(101),char(86),char(50),char(86),char(48),char(65),char(110),char(103),char(108),char(101),char(0),char(42),
+char(109),char(95),char(104),char(97),char(115),char(104),char(84),char(97),char(98),char(108),char(101),char(80),char(116),char(114),char(0),char(42),char(109),char(95),char(110),char(101),
+char(120),char(116),char(80),char(116),char(114),char(0),char(42),char(109),char(95),char(118),char(97),char(108),char(117),char(101),char(65),char(114),char(114),char(97),char(121),char(80),
+char(116),char(114),char(0),char(42),char(109),char(95),char(107),char(101),char(121),char(65),char(114),char(114),char(97),char(121),char(80),char(116),char(114),char(0),char(109),char(95),
+char(99),char(111),char(110),char(118),char(101),char(120),char(69),char(112),char(115),char(105),char(108),char(111),char(110),char(0),char(109),char(95),char(112),char(108),char(97),char(110),
+char(97),char(114),char(69),char(112),char(115),char(105),char(108),char(111),char(110),char(0),char(109),char(95),char(101),char(113),char(117),char(97),char(108),char(86),char(101),char(114),
+char(116),char(101),char(120),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(0),char(109),char(95),char(101),char(100),char(103),char(101),char(68),
+char(105),char(115),char(116),char(97),char(110),char(99),char(101),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(0),char(109),char(95),char(122),
+char(101),char(114),char(111),char(65),char(114),char(101),char(97),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(0),char(109),char(95),char(110),
+char(101),char(120),char(116),char(83),char(105),char(122),char(101),char(0),char(109),char(95),char(104),char(97),char(115),char(104),char(84),char(97),char(98),char(108),char(101),char(83),
+char(105),char(122),char(101),char(0),char(109),char(95),char(110),char(117),char(109),char(86),char(97),char(108),char(117),char(101),char(115),char(0),char(109),char(95),char(110),char(117),
+char(109),char(75),char(101),char(121),char(115),char(0),char(109),char(95),char(103),char(105),char(109),char(112),char(97),char(99),char(116),char(83),char(117),char(98),char(84),char(121),
+char(112),char(101),char(0),char(42),char(109),char(95),char(117),char(110),char(115),char(99),char(97),char(108),char(101),char(100),char(80),char(111),char(105),char(110),char(116),char(115),
+char(70),char(108),char(111),char(97),char(116),char(80),char(116),char(114),char(0),char(42),char(109),char(95),char(117),char(110),char(115),char(99),char(97),char(108),char(101),char(100),
+char(80),char(111),char(105),char(110),char(116),char(115),char(68),char(111),char(117),char(98),char(108),char(101),char(80),char(116),char(114),char(0),char(109),char(95),char(110),char(117),
+char(109),char(85),char(110),char(115),char(99),char(97),char(108),char(101),char(100),char(80),char(111),char(105),char(110),char(116),char(115),char(0),char(109),char(95),char(112),char(97),
+char(100),char(100),char(105),char(110),char(103),char(51),char(91),char(52),char(93),char(0),char(42),char(109),char(95),char(98),char(114),char(111),char(97),char(100),char(112),char(104),
+char(97),char(115),char(101),char(72),char(97),char(110),char(100),char(108),char(101),char(0),char(42),char(109),char(95),char(99),char(111),char(108),char(108),char(105),char(115),char(105),
+char(111),char(110),char(83),char(104),char(97),char(112),char(101),char(0),char(42),char(109),char(95),char(114),char(111),char(111),char(116),char(67),char(111),char(108),char(108),char(105),
+char(115),char(105),char(111),char(110),char(83),char(104),char(97),char(112),char(101),char(0),char(109),char(95),char(119),char(111),char(114),char(108),char(100),char(84),char(114),char(97),
char(110),char(115),char(102),char(111),char(114),char(109),char(0),char(109),char(95),char(105),char(110),char(116),char(101),char(114),char(112),char(111),char(108),char(97),char(116),char(105),
-char(111),char(110),char(76),char(105),char(110),char(101),char(97),char(114),char(86),char(101),char(108),char(111),char(99),char(105),char(116),char(121),char(0),char(109),char(95),char(105),
-char(110),char(116),char(101),char(114),char(112),char(111),char(108),char(97),char(116),char(105),char(111),char(110),char(65),char(110),char(103),char(117),char(108),char(97),char(114),char(86),
-char(101),char(108),char(111),char(99),char(105),char(116),char(121),char(0),char(109),char(95),char(97),char(110),char(105),char(115),char(111),char(116),char(114),char(111),char(112),char(105),
-char(99),char(70),char(114),char(105),char(99),char(116),char(105),char(111),char(110),char(0),char(109),char(95),char(99),char(111),char(110),char(116),char(97),char(99),char(116),char(80),
-char(114),char(111),char(99),char(101),char(115),char(115),char(105),char(110),char(103),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(0),char(109),
-char(95),char(100),char(101),char(97),char(99),char(116),char(105),char(118),char(97),char(116),char(105),char(111),char(110),char(84),char(105),char(109),char(101),char(0),char(109),char(95),
-char(102),char(114),char(105),char(99),char(116),char(105),char(111),char(110),char(0),char(109),char(95),char(114),char(111),char(108),char(108),char(105),char(110),char(103),char(70),char(114),
-char(105),char(99),char(116),char(105),char(111),char(110),char(0),char(109),char(95),char(114),char(101),char(115),char(116),char(105),char(116),char(117),char(116),char(105),char(111),char(110),
-char(0),char(109),char(95),char(104),char(105),char(116),char(70),char(114),char(97),char(99),char(116),char(105),char(111),char(110),char(0),char(109),char(95),char(99),char(99),char(100),
-char(83),char(119),char(101),char(112),char(116),char(83),char(112),char(104),char(101),char(114),char(101),char(82),char(97),char(100),char(105),char(117),char(115),char(0),char(109),char(95),
-char(99),char(99),char(100),char(77),char(111),char(116),char(105),char(111),char(110),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(0),char(109),
-char(95),char(104),char(97),char(115),char(65),char(110),char(105),char(115),char(111),char(116),char(114),char(111),char(112),char(105),char(99),char(70),char(114),char(105),char(99),char(116),
-char(105),char(111),char(110),char(0),char(109),char(95),char(99),char(111),char(108),char(108),char(105),char(115),char(105),char(111),char(110),char(70),char(108),char(97),char(103),char(115),
-char(0),char(109),char(95),char(105),char(115),char(108),char(97),char(110),char(100),char(84),char(97),char(103),char(49),char(0),char(109),char(95),char(99),char(111),char(109),char(112),
-char(97),char(110),char(105),char(111),char(110),char(73),char(100),char(0),char(109),char(95),char(97),char(99),char(116),char(105),char(118),char(97),char(116),char(105),char(111),char(110),
-char(83),char(116),char(97),char(116),char(101),char(49),char(0),char(109),char(95),char(105),char(110),char(116),char(101),char(114),char(110),char(97),char(108),char(84),char(121),char(112),
-char(101),char(0),char(109),char(95),char(99),char(104),char(101),char(99),char(107),char(67),char(111),char(108),char(108),char(105),char(100),char(101),char(87),char(105),char(116),char(104),
-char(0),char(109),char(95),char(115),char(111),char(108),char(118),char(101),char(114),char(73),char(110),char(102),char(111),char(0),char(109),char(95),char(103),char(114),char(97),char(118),
-char(105),char(116),char(121),char(0),char(109),char(95),char(99),char(111),char(108),char(108),char(105),char(115),char(105),char(111),char(110),char(79),char(98),char(106),char(101),char(99),
-char(116),char(68),char(97),char(116),char(97),char(0),char(109),char(95),char(105),char(110),char(118),char(73),char(110),char(101),char(114),char(116),char(105),char(97),char(84),char(101),
-char(110),char(115),char(111),char(114),char(87),char(111),char(114),char(108),char(100),char(0),char(109),char(95),char(108),char(105),char(110),char(101),char(97),char(114),char(86),char(101),
-char(108),char(111),char(99),char(105),char(116),char(121),char(0),char(109),char(95),char(97),char(110),char(103),char(117),char(108),char(97),char(114),char(86),char(101),char(108),char(111),
-char(99),char(105),char(116),char(121),char(0),char(109),char(95),char(97),char(110),char(103),char(117),char(108),char(97),char(114),char(70),char(97),char(99),char(116),char(111),char(114),
-char(0),char(109),char(95),char(108),char(105),char(110),char(101),char(97),char(114),char(70),char(97),char(99),char(116),char(111),char(114),char(0),char(109),char(95),char(103),char(114),
-char(97),char(118),char(105),char(116),char(121),char(95),char(97),char(99),char(99),char(101),char(108),char(101),char(114),char(97),char(116),char(105),char(111),char(110),char(0),char(109),
-char(95),char(105),char(110),char(118),char(73),char(110),char(101),char(114),char(116),char(105),char(97),char(76),char(111),char(99),char(97),char(108),char(0),char(109),char(95),char(116),
-char(111),char(116),char(97),char(108),char(70),char(111),char(114),char(99),char(101),char(0),char(109),char(95),char(116),char(111),char(116),char(97),char(108),char(84),char(111),char(114),
-char(113),char(117),char(101),char(0),char(109),char(95),char(105),char(110),char(118),char(101),char(114),char(115),char(101),char(77),char(97),char(115),char(115),char(0),char(109),char(95),
-char(108),char(105),char(110),char(101),char(97),char(114),char(68),char(97),char(109),char(112),char(105),char(110),char(103),char(0),char(109),char(95),char(97),char(110),char(103),char(117),
-char(108),char(97),char(114),char(68),char(97),char(109),char(112),char(105),char(110),char(103),char(0),char(109),char(95),char(97),char(100),char(100),char(105),char(116),char(105),char(111),
-char(110),char(97),char(108),char(68),char(97),char(109),char(112),char(105),char(110),char(103),char(70),char(97),char(99),char(116),char(111),char(114),char(0),char(109),char(95),char(97),
-char(100),char(100),char(105),char(116),char(105),char(111),char(110),char(97),char(108),char(76),char(105),char(110),char(101),char(97),char(114),char(68),char(97),char(109),char(112),char(105),
-char(110),char(103),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(83),char(113),char(114),char(0),char(109),char(95),char(97),char(100),char(100),
-char(105),char(116),char(105),char(111),char(110),char(97),char(108),char(65),char(110),char(103),char(117),char(108),char(97),char(114),char(68),char(97),char(109),char(112),char(105),char(110),
-char(103),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(83),char(113),char(114),char(0),char(109),char(95),char(97),char(100),char(100),char(105),
-char(116),char(105),char(111),char(110),char(97),char(108),char(65),char(110),char(103),char(117),char(108),char(97),char(114),char(68),char(97),char(109),char(112),char(105),char(110),char(103),
-char(70),char(97),char(99),char(116),char(111),char(114),char(0),char(109),char(95),char(108),char(105),char(110),char(101),char(97),char(114),char(83),char(108),char(101),char(101),char(112),
-char(105),char(110),char(103),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(0),char(109),char(95),char(97),char(110),char(103),char(117),char(108),
-char(97),char(114),char(83),char(108),char(101),char(101),char(112),char(105),char(110),char(103),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(0),
-char(109),char(95),char(97),char(100),char(100),char(105),char(116),char(105),char(111),char(110),char(97),char(108),char(68),char(97),char(109),char(112),char(105),char(110),char(103),char(0),
-char(109),char(95),char(110),char(117),char(109),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(82),char(111),char(119),char(115),char(0),
-char(110),char(117),char(98),char(0),char(42),char(109),char(95),char(114),char(98),char(65),char(0),char(42),char(109),char(95),char(114),char(98),char(66),char(0),char(109),char(95),
-char(111),char(98),char(106),char(101),char(99),char(116),char(84),char(121),char(112),char(101),char(0),char(109),char(95),char(117),char(115),char(101),char(114),char(67),char(111),char(110),
-char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(84),char(121),char(112),char(101),char(0),char(109),char(95),char(117),char(115),char(101),char(114),char(67),char(111),
-char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(73),char(100),char(0),char(109),char(95),char(110),char(101),char(101),char(100),char(115),char(70),char(101),
-char(101),char(100),char(98),char(97),char(99),char(107),char(0),char(109),char(95),char(97),char(112),char(112),char(108),char(105),char(101),char(100),char(73),char(109),char(112),char(117),
-char(108),char(115),char(101),char(0),char(109),char(95),char(100),char(98),char(103),char(68),char(114),char(97),char(119),char(83),char(105),char(122),char(101),char(0),char(109),char(95),
-char(100),char(105),char(115),char(97),char(98),char(108),char(101),char(67),char(111),char(108),char(108),char(105),char(115),char(105),char(111),char(110),char(115),char(66),char(101),char(116),
-char(119),char(101),char(101),char(110),char(76),char(105),char(110),char(107),char(101),char(100),char(66),char(111),char(100),char(105),char(101),char(115),char(0),char(109),char(95),char(111),
-char(118),char(101),char(114),char(114),char(105),char(100),char(101),char(78),char(117),char(109),char(83),char(111),char(108),char(118),char(101),char(114),char(73),char(116),char(101),char(114),
-char(97),char(116),char(105),char(111),char(110),char(115),char(0),char(109),char(95),char(98),char(114),char(101),char(97),char(107),char(105),char(110),char(103),char(73),char(109),char(112),
-char(117),char(108),char(115),char(101),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(0),char(109),char(95),char(105),char(115),char(69),char(110),
-char(97),char(98),char(108),char(101),char(100),char(0),char(109),char(95),char(116),char(121),char(112),char(101),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),
-char(110),char(116),char(68),char(97),char(116),char(97),char(0),char(109),char(95),char(112),char(105),char(118),char(111),char(116),char(73),char(110),char(65),char(0),char(109),char(95),
-char(112),char(105),char(118),char(111),char(116),char(73),char(110),char(66),char(0),char(109),char(95),char(114),char(98),char(65),char(70),char(114),char(97),char(109),char(101),char(0),
-char(109),char(95),char(114),char(98),char(66),char(70),char(114),char(97),char(109),char(101),char(0),char(109),char(95),char(117),char(115),char(101),char(82),char(101),char(102),char(101),
-char(114),char(101),char(110),char(99),char(101),char(70),char(114),char(97),char(109),char(101),char(65),char(0),char(109),char(95),char(97),char(110),char(103),char(117),char(108),char(97),
-char(114),char(79),char(110),char(108),char(121),char(0),char(109),char(95),char(101),char(110),char(97),char(98),char(108),char(101),char(65),char(110),char(103),char(117),char(108),char(97),
-char(114),char(77),char(111),char(116),char(111),char(114),char(0),char(109),char(95),char(109),char(111),char(116),char(111),char(114),char(84),char(97),char(114),char(103),char(101),char(116),
-char(86),char(101),char(108),char(111),char(99),char(105),char(116),char(121),char(0),char(109),char(95),char(109),char(97),char(120),char(77),char(111),char(116),char(111),char(114),char(73),
-char(109),char(112),char(117),char(108),char(115),char(101),char(0),char(109),char(95),char(108),char(111),char(119),char(101),char(114),char(76),char(105),char(109),char(105),char(116),char(0),
-char(109),char(95),char(117),char(112),char(112),char(101),char(114),char(76),char(105),char(109),char(105),char(116),char(0),char(109),char(95),char(108),char(105),char(109),char(105),char(116),
-char(83),char(111),char(102),char(116),char(110),char(101),char(115),char(115),char(0),char(109),char(95),char(98),char(105),char(97),char(115),char(70),char(97),char(99),char(116),char(111),
-char(114),char(0),char(109),char(95),char(114),char(101),char(108),char(97),char(120),char(97),char(116),char(105),char(111),char(110),char(70),char(97),char(99),char(116),char(111),char(114),
-char(0),char(109),char(95),char(115),char(119),char(105),char(110),char(103),char(83),char(112),char(97),char(110),char(49),char(0),char(109),char(95),char(115),char(119),char(105),char(110),
-char(103),char(83),char(112),char(97),char(110),char(50),char(0),char(109),char(95),char(116),char(119),char(105),char(115),char(116),char(83),char(112),char(97),char(110),char(0),char(109),
-char(95),char(100),char(97),char(109),char(112),char(105),char(110),char(103),char(0),char(109),char(95),char(108),char(105),char(110),char(101),char(97),char(114),char(85),char(112),char(112),
-char(101),char(114),char(76),char(105),char(109),char(105),char(116),char(0),char(109),char(95),char(108),char(105),char(110),char(101),char(97),char(114),char(76),char(111),char(119),char(101),
-char(114),char(76),char(105),char(109),char(105),char(116),char(0),char(109),char(95),char(97),char(110),char(103),char(117),char(108),char(97),char(114),char(85),char(112),char(112),char(101),
-char(114),char(76),char(105),char(109),char(105),char(116),char(0),char(109),char(95),char(97),char(110),char(103),char(117),char(108),char(97),char(114),char(76),char(111),char(119),char(101),
-char(114),char(76),char(105),char(109),char(105),char(116),char(0),char(109),char(95),char(117),char(115),char(101),char(76),char(105),char(110),char(101),char(97),char(114),char(82),char(101),
-char(102),char(101),char(114),char(101),char(110),char(99),char(101),char(70),char(114),char(97),char(109),char(101),char(65),char(0),char(109),char(95),char(117),char(115),char(101),char(79),
-char(102),char(102),char(115),char(101),char(116),char(70),char(111),char(114),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(70),char(114),
-char(97),char(109),char(101),char(0),char(109),char(95),char(54),char(100),char(111),char(102),char(68),char(97),char(116),char(97),char(0),char(109),char(95),char(115),char(112),char(114),
-char(105),char(110),char(103),char(69),char(110),char(97),char(98),char(108),char(101),char(100),char(91),char(54),char(93),char(0),char(109),char(95),char(101),char(113),char(117),char(105),
-char(108),char(105),char(98),char(114),char(105),char(117),char(109),char(80),char(111),char(105),char(110),char(116),char(91),char(54),char(93),char(0),char(109),char(95),char(115),char(112),
-char(114),char(105),char(110),char(103),char(83),char(116),char(105),char(102),char(102),char(110),char(101),char(115),char(115),char(91),char(54),char(93),char(0),char(109),char(95),char(115),
-char(112),char(114),char(105),char(110),char(103),char(68),char(97),char(109),char(112),char(105),char(110),char(103),char(91),char(54),char(93),char(0),char(109),char(95),char(116),char(97),
-char(117),char(0),char(109),char(95),char(116),char(105),char(109),char(101),char(83),char(116),char(101),char(112),char(0),char(109),char(95),char(109),char(97),char(120),char(69),char(114),
-char(114),char(111),char(114),char(82),char(101),char(100),char(117),char(99),char(116),char(105),char(111),char(110),char(0),char(109),char(95),char(115),char(111),char(114),char(0),char(109),
-char(95),char(101),char(114),char(112),char(0),char(109),char(95),char(101),char(114),char(112),char(50),char(0),char(109),char(95),char(103),char(108),char(111),char(98),char(97),char(108),
-char(67),char(102),char(109),char(0),char(109),char(95),char(115),char(112),char(108),char(105),char(116),char(73),char(109),char(112),char(117),char(108),char(115),char(101),char(80),char(101),
-char(110),char(101),char(116),char(114),char(97),char(116),char(105),char(111),char(110),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(0),char(109),
-char(95),char(115),char(112),char(108),char(105),char(116),char(73),char(109),char(112),char(117),char(108),char(115),char(101),char(84),char(117),char(114),char(110),char(69),char(114),char(112),
-char(0),char(109),char(95),char(108),char(105),char(110),char(101),char(97),char(114),char(83),char(108),char(111),char(112),char(0),char(109),char(95),char(119),char(97),char(114),char(109),
-char(115),char(116),char(97),char(114),char(116),char(105),char(110),char(103),char(70),char(97),char(99),char(116),char(111),char(114),char(0),char(109),char(95),char(109),char(97),char(120),
-char(71),char(121),char(114),char(111),char(115),char(99),char(111),char(112),char(105),char(99),char(70),char(111),char(114),char(99),char(101),char(0),char(109),char(95),char(115),char(105),
-char(110),char(103),char(108),char(101),char(65),char(120),char(105),char(115),char(82),char(111),char(108),char(108),char(105),char(110),char(103),char(70),char(114),char(105),char(99),char(116),
-char(105),char(111),char(110),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(0),char(109),char(95),char(110),char(117),char(109),char(73),char(116),
-char(101),char(114),char(97),char(116),char(105),char(111),char(110),char(115),char(0),char(109),char(95),char(115),char(111),char(108),char(118),char(101),char(114),char(77),char(111),char(100),
-char(101),char(0),char(109),char(95),char(114),char(101),char(115),char(116),char(105),char(110),char(103),char(67),char(111),char(110),char(116),char(97),char(99),char(116),char(82),char(101),
-char(115),char(116),char(105),char(116),char(117),char(116),char(105),char(111),char(110),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(0),char(109),
-char(95),char(109),char(105),char(110),char(105),char(109),char(117),char(109),char(83),char(111),char(108),char(118),char(101),char(114),char(66),char(97),char(116),char(99),char(104),char(83),
-char(105),char(122),char(101),char(0),char(109),char(95),char(115),char(112),char(108),char(105),char(116),char(73),char(109),char(112),char(117),char(108),char(115),char(101),char(0),char(109),
-char(95),char(108),char(105),char(110),char(101),char(97),char(114),char(83),char(116),char(105),char(102),char(102),char(110),char(101),char(115),char(115),char(0),char(109),char(95),char(97),
-char(110),char(103),char(117),char(108),char(97),char(114),char(83),char(116),char(105),char(102),char(102),char(110),char(101),char(115),char(115),char(0),char(109),char(95),char(118),char(111),
-char(108),char(117),char(109),char(101),char(83),char(116),char(105),char(102),char(102),char(110),char(101),char(115),char(115),char(0),char(42),char(109),char(95),char(109),char(97),char(116),
-char(101),char(114),char(105),char(97),char(108),char(0),char(109),char(95),char(112),char(111),char(115),char(105),char(116),char(105),char(111),char(110),char(0),char(109),char(95),char(112),
-char(114),char(101),char(118),char(105),char(111),char(117),char(115),char(80),char(111),char(115),char(105),char(116),char(105),char(111),char(110),char(0),char(109),char(95),char(118),char(101),
-char(108),char(111),char(99),char(105),char(116),char(121),char(0),char(109),char(95),char(97),char(99),char(99),char(117),char(109),char(117),char(108),char(97),char(116),char(101),char(100),
-char(70),char(111),char(114),char(99),char(101),char(0),char(109),char(95),char(110),char(111),char(114),char(109),char(97),char(108),char(0),char(109),char(95),char(97),char(114),char(101),
-char(97),char(0),char(109),char(95),char(97),char(116),char(116),char(97),char(99),char(104),char(0),char(109),char(95),char(110),char(111),char(100),char(101),char(73),char(110),char(100),
-char(105),char(99),char(101),char(115),char(91),char(50),char(93),char(0),char(109),char(95),char(114),char(101),char(115),char(116),char(76),char(101),char(110),char(103),char(116),char(104),
-char(0),char(109),char(95),char(98),char(98),char(101),char(110),char(100),char(105),char(110),char(103),char(0),char(109),char(95),char(110),char(111),char(100),char(101),char(73),char(110),
-char(100),char(105),char(99),char(101),char(115),char(91),char(51),char(93),char(0),char(109),char(95),char(114),char(101),char(115),char(116),char(65),char(114),char(101),char(97),char(0),
-char(109),char(95),char(99),char(48),char(91),char(52),char(93),char(0),char(109),char(95),char(110),char(111),char(100),char(101),char(73),char(110),char(100),char(105),char(99),char(101),
-char(115),char(91),char(52),char(93),char(0),char(109),char(95),char(114),char(101),char(115),char(116),char(86),char(111),char(108),char(117),char(109),char(101),char(0),char(109),char(95),
-char(99),char(49),char(0),char(109),char(95),char(99),char(50),char(0),char(109),char(95),char(99),char(48),char(0),char(109),char(95),char(108),char(111),char(99),char(97),char(108),
-char(70),char(114),char(97),char(109),char(101),char(0),char(42),char(109),char(95),char(114),char(105),char(103),char(105),char(100),char(66),char(111),char(100),char(121),char(0),char(109),
-char(95),char(110),char(111),char(100),char(101),char(73),char(110),char(100),char(101),char(120),char(0),char(109),char(95),char(97),char(101),char(114),char(111),char(77),char(111),char(100),
-char(101),char(108),char(0),char(109),char(95),char(98),char(97),char(117),char(109),char(103),char(97),char(114),char(116),char(101),char(0),char(109),char(95),char(100),char(114),char(97),
-char(103),char(0),char(109),char(95),char(108),char(105),char(102),char(116),char(0),char(109),char(95),char(112),char(114),char(101),char(115),char(115),char(117),char(114),char(101),char(0),
-char(109),char(95),char(118),char(111),char(108),char(117),char(109),char(101),char(0),char(109),char(95),char(100),char(121),char(110),char(97),char(109),char(105),char(99),char(70),char(114),
-char(105),char(99),char(116),char(105),char(111),char(110),char(0),char(109),char(95),char(112),char(111),char(115),char(101),char(77),char(97),char(116),char(99),char(104),char(0),char(109),
-char(95),char(114),char(105),char(103),char(105),char(100),char(67),char(111),char(110),char(116),char(97),char(99),char(116),char(72),char(97),char(114),char(100),char(110),char(101),char(115),
-char(115),char(0),char(109),char(95),char(107),char(105),char(110),char(101),char(116),char(105),char(99),char(67),char(111),char(110),char(116),char(97),char(99),char(116),char(72),char(97),
-char(114),char(100),char(110),char(101),char(115),char(115),char(0),char(109),char(95),char(115),char(111),char(102),char(116),char(67),char(111),char(110),char(116),char(97),char(99),char(116),
-char(72),char(97),char(114),char(100),char(110),char(101),char(115),char(115),char(0),char(109),char(95),char(97),char(110),char(99),char(104),char(111),char(114),char(72),char(97),char(114),
-char(100),char(110),char(101),char(115),char(115),char(0),char(109),char(95),char(115),char(111),char(102),char(116),char(82),char(105),char(103),char(105),char(100),char(67),char(108),char(117),
-char(115),char(116),char(101),char(114),char(72),char(97),char(114),char(100),char(110),char(101),char(115),char(115),char(0),char(109),char(95),char(115),char(111),char(102),char(116),char(75),
-char(105),char(110),char(101),char(116),char(105),char(99),char(67),char(108),char(117),char(115),char(116),char(101),char(114),char(72),char(97),char(114),char(100),char(110),char(101),char(115),
-char(115),char(0),char(109),char(95),char(115),char(111),char(102),char(116),char(83),char(111),char(102),char(116),char(67),char(108),char(117),char(115),char(116),char(101),char(114),char(72),
-char(97),char(114),char(100),char(110),char(101),char(115),char(115),char(0),char(109),char(95),char(115),char(111),char(102),char(116),char(82),char(105),char(103),char(105),char(100),char(67),
-char(108),char(117),char(115),char(116),char(101),char(114),char(73),char(109),char(112),char(117),char(108),char(115),char(101),char(83),char(112),char(108),char(105),char(116),char(0),char(109),
-char(95),char(115),char(111),char(102),char(116),char(75),char(105),char(110),char(101),char(116),char(105),char(99),char(67),char(108),char(117),char(115),char(116),char(101),char(114),char(73),
-char(109),char(112),char(117),char(108),char(115),char(101),char(83),char(112),char(108),char(105),char(116),char(0),char(109),char(95),char(115),char(111),char(102),char(116),char(83),char(111),
-char(102),char(116),char(67),char(108),char(117),char(115),char(116),char(101),char(114),char(73),char(109),char(112),char(117),char(108),char(115),char(101),char(83),char(112),char(108),char(105),
-char(116),char(0),char(109),char(95),char(109),char(97),char(120),char(86),char(111),char(108),char(117),char(109),char(101),char(0),char(109),char(95),char(116),char(105),char(109),char(101),
-char(83),char(99),char(97),char(108),char(101),char(0),char(109),char(95),char(118),char(101),char(108),char(111),char(99),char(105),char(116),char(121),char(73),char(116),char(101),char(114),
-char(97),char(116),char(105),char(111),char(110),char(115),char(0),char(109),char(95),char(112),char(111),char(115),char(105),char(116),char(105),char(111),char(110),char(73),char(116),char(101),
-char(114),char(97),char(116),char(105),char(111),char(110),char(115),char(0),char(109),char(95),char(100),char(114),char(105),char(102),char(116),char(73),char(116),char(101),char(114),char(97),
-char(116),char(105),char(111),char(110),char(115),char(0),char(109),char(95),char(99),char(108),char(117),char(115),char(116),char(101),char(114),char(73),char(116),char(101),char(114),char(97),
-char(116),char(105),char(111),char(110),char(115),char(0),char(109),char(95),char(114),char(111),char(116),char(0),char(109),char(95),char(115),char(99),char(97),char(108),char(101),char(0),
-char(109),char(95),char(97),char(113),char(113),char(0),char(109),char(95),char(99),char(111),char(109),char(0),char(42),char(109),char(95),char(112),char(111),char(115),char(105),char(116),
-char(105),char(111),char(110),char(115),char(0),char(42),char(109),char(95),char(119),char(101),char(105),char(103),char(104),char(116),char(115),char(0),char(109),char(95),char(110),char(117),
-char(109),char(80),char(111),char(115),char(105),char(116),char(105),char(111),char(110),char(115),char(0),char(109),char(95),char(110),char(117),char(109),char(87),char(101),char(105),char(103),
-char(116),char(115),char(0),char(109),char(95),char(98),char(118),char(111),char(108),char(117),char(109),char(101),char(0),char(109),char(95),char(98),char(102),char(114),char(97),char(109),
-char(101),char(0),char(109),char(95),char(102),char(114),char(97),char(109),char(101),char(120),char(102),char(111),char(114),char(109),char(0),char(109),char(95),char(108),char(111),char(99),
-char(105),char(105),char(0),char(109),char(95),char(105),char(110),char(118),char(119),char(105),char(0),char(109),char(95),char(118),char(105),char(109),char(112),char(117),char(108),char(115),
-char(101),char(115),char(91),char(50),char(93),char(0),char(109),char(95),char(100),char(105),char(109),char(112),char(117),char(108),char(115),char(101),char(115),char(91),char(50),char(93),
-char(0),char(109),char(95),char(108),char(118),char(0),char(109),char(95),char(97),char(118),char(0),char(42),char(109),char(95),char(102),char(114),char(97),char(109),char(101),char(114),
-char(101),char(102),char(115),char(0),char(42),char(109),char(95),char(110),char(111),char(100),char(101),char(73),char(110),char(100),char(105),char(99),char(101),char(115),char(0),char(42),
-char(109),char(95),char(109),char(97),char(115),char(115),char(101),char(115),char(0),char(109),char(95),char(110),char(117),char(109),char(70),char(114),char(97),char(109),char(101),char(82),
-char(101),char(102),char(115),char(0),char(109),char(95),char(110),char(117),char(109),char(78),char(111),char(100),char(101),char(115),char(0),char(109),char(95),char(110),char(117),char(109),
-char(77),char(97),char(115),char(115),char(101),char(115),char(0),char(109),char(95),char(105),char(100),char(109),char(97),char(115),char(115),char(0),char(109),char(95),char(105),char(109),
-char(97),char(115),char(115),char(0),char(109),char(95),char(110),char(118),char(105),char(109),char(112),char(117),char(108),char(115),char(101),char(115),char(0),char(109),char(95),char(110),
-char(100),char(105),char(109),char(112),char(117),char(108),char(115),char(101),char(115),char(0),char(109),char(95),char(110),char(100),char(97),char(109),char(112),char(105),char(110),char(103),
-char(0),char(109),char(95),char(108),char(100),char(97),char(109),char(112),char(105),char(110),char(103),char(0),char(109),char(95),char(97),char(100),char(97),char(109),char(112),char(105),
-char(110),char(103),char(0),char(109),char(95),char(109),char(97),char(116),char(99),char(104),char(105),char(110),char(103),char(0),char(109),char(95),char(109),char(97),char(120),char(83),
-char(101),char(108),char(102),char(67),char(111),char(108),char(108),char(105),char(115),char(105),char(111),char(110),char(73),char(109),char(112),char(117),char(108),char(115),char(101),char(0),
-char(109),char(95),char(115),char(101),char(108),char(102),char(67),char(111),char(108),char(108),char(105),char(115),char(105),char(111),char(110),char(73),char(109),char(112),char(117),char(108),
-char(115),char(101),char(70),char(97),char(99),char(116),char(111),char(114),char(0),char(109),char(95),char(99),char(111),char(110),char(116),char(97),char(105),char(110),char(115),char(65),
-char(110),char(99),char(104),char(111),char(114),char(0),char(109),char(95),char(99),char(111),char(108),char(108),char(105),char(100),char(101),char(0),char(109),char(95),char(99),char(108),
-char(117),char(115),char(116),char(101),char(114),char(73),char(110),char(100),char(101),char(120),char(0),char(42),char(109),char(95),char(98),char(111),char(100),char(121),char(65),char(0),
-char(42),char(109),char(95),char(98),char(111),char(100),char(121),char(66),char(0),char(109),char(95),char(114),char(101),char(102),char(115),char(91),char(50),char(93),char(0),char(109),
-char(95),char(99),char(102),char(109),char(0),char(109),char(95),char(115),char(112),char(108),char(105),char(116),char(0),char(109),char(95),char(100),char(101),char(108),char(101),char(116),
-char(101),char(0),char(109),char(95),char(114),char(101),char(108),char(80),char(111),char(115),char(105),char(116),char(105),char(111),char(110),char(91),char(50),char(93),char(0),char(109),
-char(95),char(98),char(111),char(100),char(121),char(65),char(116),char(121),char(112),char(101),char(0),char(109),char(95),char(98),char(111),char(100),char(121),char(66),char(116),char(121),
-char(112),char(101),char(0),char(109),char(95),char(106),char(111),char(105),char(110),char(116),char(84),char(121),char(112),char(101),char(0),char(42),char(109),char(95),char(112),char(111),
-char(115),char(101),char(0),char(42),char(42),char(109),char(95),char(109),char(97),char(116),char(101),char(114),char(105),char(97),char(108),char(115),char(0),char(42),char(109),char(95),
-char(110),char(111),char(100),char(101),char(115),char(0),char(42),char(109),char(95),char(108),char(105),char(110),char(107),char(115),char(0),char(42),char(109),char(95),char(102),char(97),
-char(99),char(101),char(115),char(0),char(42),char(109),char(95),char(116),char(101),char(116),char(114),char(97),char(104),char(101),char(100),char(114),char(97),char(0),char(42),char(109),
-char(95),char(97),char(110),char(99),char(104),char(111),char(114),char(115),char(0),char(42),char(109),char(95),char(99),char(108),char(117),char(115),char(116),char(101),char(114),char(115),
-char(0),char(42),char(109),char(95),char(106),char(111),char(105),char(110),char(116),char(115),char(0),char(109),char(95),char(110),char(117),char(109),char(77),char(97),char(116),char(101),
-char(114),char(105),char(97),char(108),char(115),char(0),char(109),char(95),char(110),char(117),char(109),char(76),char(105),char(110),char(107),char(115),char(0),char(109),char(95),char(110),
-char(117),char(109),char(70),char(97),char(99),char(101),char(115),char(0),char(109),char(95),char(110),char(117),char(109),char(84),char(101),char(116),char(114),char(97),char(104),char(101),
-char(100),char(114),char(97),char(0),char(109),char(95),char(110),char(117),char(109),char(65),char(110),char(99),char(104),char(111),char(114),char(115),char(0),char(109),char(95),char(110),
-char(117),char(109),char(67),char(108),char(117),char(115),char(116),char(101),char(114),char(115),char(0),char(109),char(95),char(110),char(117),char(109),char(74),char(111),char(105),char(110),
-char(116),char(115),char(0),char(109),char(95),char(99),char(111),char(110),char(102),char(105),char(103),char(0),char(84),char(89),char(80),char(69),char(76),char(0),char(0),char(0),
-char(99),char(104),char(97),char(114),char(0),char(117),char(99),char(104),char(97),char(114),char(0),char(115),char(104),char(111),char(114),char(116),char(0),char(117),char(115),char(104),
-char(111),char(114),char(116),char(0),char(105),char(110),char(116),char(0),char(108),char(111),char(110),char(103),char(0),char(117),char(108),char(111),char(110),char(103),char(0),char(102),
-char(108),char(111),char(97),char(116),char(0),char(100),char(111),char(117),char(98),char(108),char(101),char(0),char(118),char(111),char(105),char(100),char(0),char(80),char(111),char(105),
-char(110),char(116),char(101),char(114),char(65),char(114),char(114),char(97),char(121),char(0),char(98),char(116),char(80),char(104),char(121),char(115),char(105),char(99),char(115),char(83),
-char(121),char(115),char(116),char(101),char(109),char(0),char(76),char(105),char(115),char(116),char(66),char(97),char(115),char(101),char(0),char(98),char(116),char(86),char(101),char(99),
-char(116),char(111),char(114),char(51),char(70),char(108),char(111),char(97),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(86),char(101),char(99),char(116),
-char(111),char(114),char(51),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(77),char(97),char(116),char(114),
-char(105),char(120),char(51),char(120),char(51),char(70),char(108),char(111),char(97),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(77),char(97),char(116),
-char(114),char(105),char(120),char(51),char(120),char(51),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(84),
-char(114),char(97),char(110),char(115),char(102),char(111),char(114),char(109),char(70),char(108),char(111),char(97),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),
-char(84),char(114),char(97),char(110),char(115),char(102),char(111),char(114),char(109),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),char(0),
-char(98),char(116),char(66),char(118),char(104),char(83),char(117),char(98),char(116),char(114),char(101),char(101),char(73),char(110),char(102),char(111),char(68),char(97),char(116),char(97),
-char(0),char(98),char(116),char(79),char(112),char(116),char(105),char(109),char(105),char(122),char(101),char(100),char(66),char(118),char(104),char(78),char(111),char(100),char(101),char(70),
-char(108),char(111),char(97),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(79),char(112),char(116),char(105),char(109),char(105),char(122),char(101),char(100),
-char(66),char(118),char(104),char(78),char(111),char(100),char(101),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),
-char(81),char(117),char(97),char(110),char(116),char(105),char(122),char(101),char(100),char(66),char(118),char(104),char(78),char(111),char(100),char(101),char(68),char(97),char(116),char(97),
-char(0),char(98),char(116),char(81),char(117),char(97),char(110),char(116),char(105),char(122),char(101),char(100),char(66),char(118),char(104),char(70),char(108),char(111),char(97),char(116),
-char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(81),char(117),char(97),char(110),char(116),char(105),char(122),char(101),char(100),char(66),char(118),char(104),char(68),
-char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(67),char(111),char(108),char(108),char(105),char(115),char(105),char(111),
-char(110),char(83),char(104),char(97),char(112),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(83),char(116),char(97),char(116),char(105),char(99),char(80),
-char(108),char(97),char(110),char(101),char(83),char(104),char(97),char(112),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(67),char(111),char(110),char(118),
-char(101),char(120),char(73),char(110),char(116),char(101),char(114),char(110),char(97),char(108),char(83),char(104),char(97),char(112),char(101),char(68),char(97),char(116),char(97),char(0),
-char(98),char(116),char(80),char(111),char(115),char(105),char(116),char(105),char(111),char(110),char(65),char(110),char(100),char(82),char(97),char(100),char(105),char(117),char(115),char(0),
-char(98),char(116),char(77),char(117),char(108),char(116),char(105),char(83),char(112),char(104),char(101),char(114),char(101),char(83),char(104),char(97),char(112),char(101),char(68),char(97),
-char(116),char(97),char(0),char(98),char(116),char(73),char(110),char(116),char(73),char(110),char(100),char(101),char(120),char(68),char(97),char(116),char(97),char(0),char(98),char(116),
-char(83),char(104),char(111),char(114),char(116),char(73),char(110),char(116),char(73),char(110),char(100),char(101),char(120),char(68),char(97),char(116),char(97),char(0),char(98),char(116),
-char(83),char(104),char(111),char(114),char(116),char(73),char(110),char(116),char(73),char(110),char(100),char(101),char(120),char(84),char(114),char(105),char(112),char(108),char(101),char(116),
-char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(67),char(104),char(97),char(114),char(73),char(110),char(100),char(101),char(120),char(84),char(114),char(105),char(112),
-char(108),char(101),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(77),char(101),char(115),char(104),char(80),char(97),char(114),char(116),char(68),char(97),
-char(116),char(97),char(0),char(98),char(116),char(83),char(116),char(114),char(105),char(100),char(105),char(110),char(103),char(77),char(101),char(115),char(104),char(73),char(110),char(116),
-char(101),char(114),char(102),char(97),char(99),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(84),char(114),char(105),char(97),char(110),char(103),char(108),
-char(101),char(77),char(101),char(115),char(104),char(83),char(104),char(97),char(112),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(84),char(114),char(105),
-char(97),char(110),char(103),char(108),char(101),char(73),char(110),char(102),char(111),char(77),char(97),char(112),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(83),
-char(99),char(97),char(108),char(101),char(100),char(84),char(114),char(105),char(97),char(110),char(103),char(108),char(101),char(77),char(101),char(115),char(104),char(83),char(104),char(97),
-char(112),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(67),char(111),char(109),char(112),char(111),char(117),char(110),char(100),char(83),char(104),char(97),
-char(112),char(101),char(67),char(104),char(105),char(108),char(100),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(67),char(111),char(109),char(112),char(111),char(117),
-char(110),char(100),char(83),char(104),char(97),char(112),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(67),char(121),char(108),char(105),char(110),char(100),
-char(101),char(114),char(83),char(104),char(97),char(112),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(67),char(97),char(112),char(115),char(117),char(108),
+char(111),char(110),char(87),char(111),char(114),char(108),char(100),char(84),char(114),char(97),char(110),char(115),char(102),char(111),char(114),char(109),char(0),char(109),char(95),char(105),
+char(110),char(116),char(101),char(114),char(112),char(111),char(108),char(97),char(116),char(105),char(111),char(110),char(76),char(105),char(110),char(101),char(97),char(114),char(86),char(101),
+char(108),char(111),char(99),char(105),char(116),char(121),char(0),char(109),char(95),char(105),char(110),char(116),char(101),char(114),char(112),char(111),char(108),char(97),char(116),char(105),
+char(111),char(110),char(65),char(110),char(103),char(117),char(108),char(97),char(114),char(86),char(101),char(108),char(111),char(99),char(105),char(116),char(121),char(0),char(109),char(95),
+char(97),char(110),char(105),char(115),char(111),char(116),char(114),char(111),char(112),char(105),char(99),char(70),char(114),char(105),char(99),char(116),char(105),char(111),char(110),char(0),
+char(109),char(95),char(99),char(111),char(110),char(116),char(97),char(99),char(116),char(80),char(114),char(111),char(99),char(101),char(115),char(115),char(105),char(110),char(103),char(84),
+char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(0),char(109),char(95),char(100),char(101),char(97),char(99),char(116),char(105),char(118),char(97),char(116),
+char(105),char(111),char(110),char(84),char(105),char(109),char(101),char(0),char(109),char(95),char(102),char(114),char(105),char(99),char(116),char(105),char(111),char(110),char(0),char(109),
+char(95),char(114),char(111),char(108),char(108),char(105),char(110),char(103),char(70),char(114),char(105),char(99),char(116),char(105),char(111),char(110),char(0),char(109),char(95),char(114),
+char(101),char(115),char(116),char(105),char(116),char(117),char(116),char(105),char(111),char(110),char(0),char(109),char(95),char(104),char(105),char(116),char(70),char(114),char(97),char(99),
+char(116),char(105),char(111),char(110),char(0),char(109),char(95),char(99),char(99),char(100),char(83),char(119),char(101),char(112),char(116),char(83),char(112),char(104),char(101),char(114),
+char(101),char(82),char(97),char(100),char(105),char(117),char(115),char(0),char(109),char(95),char(99),char(99),char(100),char(77),char(111),char(116),char(105),char(111),char(110),char(84),
+char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(0),char(109),char(95),char(104),char(97),char(115),char(65),char(110),char(105),char(115),char(111),char(116),
+char(114),char(111),char(112),char(105),char(99),char(70),char(114),char(105),char(99),char(116),char(105),char(111),char(110),char(0),char(109),char(95),char(99),char(111),char(108),char(108),
+char(105),char(115),char(105),char(111),char(110),char(70),char(108),char(97),char(103),char(115),char(0),char(109),char(95),char(105),char(115),char(108),char(97),char(110),char(100),char(84),
+char(97),char(103),char(49),char(0),char(109),char(95),char(99),char(111),char(109),char(112),char(97),char(110),char(105),char(111),char(110),char(73),char(100),char(0),char(109),char(95),
+char(97),char(99),char(116),char(105),char(118),char(97),char(116),char(105),char(111),char(110),char(83),char(116),char(97),char(116),char(101),char(49),char(0),char(109),char(95),char(105),
+char(110),char(116),char(101),char(114),char(110),char(97),char(108),char(84),char(121),char(112),char(101),char(0),char(109),char(95),char(99),char(104),char(101),char(99),char(107),char(67),
+char(111),char(108),char(108),char(105),char(100),char(101),char(87),char(105),char(116),char(104),char(0),char(109),char(95),char(115),char(111),char(108),char(118),char(101),char(114),char(73),
+char(110),char(102),char(111),char(0),char(109),char(95),char(103),char(114),char(97),char(118),char(105),char(116),char(121),char(0),char(109),char(95),char(99),char(111),char(108),char(108),
+char(105),char(115),char(105),char(111),char(110),char(79),char(98),char(106),char(101),char(99),char(116),char(68),char(97),char(116),char(97),char(0),char(109),char(95),char(105),char(110),
+char(118),char(73),char(110),char(101),char(114),char(116),char(105),char(97),char(84),char(101),char(110),char(115),char(111),char(114),char(87),char(111),char(114),char(108),char(100),char(0),
+char(109),char(95),char(108),char(105),char(110),char(101),char(97),char(114),char(86),char(101),char(108),char(111),char(99),char(105),char(116),char(121),char(0),char(109),char(95),char(97),
+char(110),char(103),char(117),char(108),char(97),char(114),char(86),char(101),char(108),char(111),char(99),char(105),char(116),char(121),char(0),char(109),char(95),char(97),char(110),char(103),
+char(117),char(108),char(97),char(114),char(70),char(97),char(99),char(116),char(111),char(114),char(0),char(109),char(95),char(108),char(105),char(110),char(101),char(97),char(114),char(70),
+char(97),char(99),char(116),char(111),char(114),char(0),char(109),char(95),char(103),char(114),char(97),char(118),char(105),char(116),char(121),char(95),char(97),char(99),char(99),char(101),
+char(108),char(101),char(114),char(97),char(116),char(105),char(111),char(110),char(0),char(109),char(95),char(105),char(110),char(118),char(73),char(110),char(101),char(114),char(116),char(105),
+char(97),char(76),char(111),char(99),char(97),char(108),char(0),char(109),char(95),char(116),char(111),char(116),char(97),char(108),char(70),char(111),char(114),char(99),char(101),char(0),
+char(109),char(95),char(116),char(111),char(116),char(97),char(108),char(84),char(111),char(114),char(113),char(117),char(101),char(0),char(109),char(95),char(105),char(110),char(118),char(101),
+char(114),char(115),char(101),char(77),char(97),char(115),char(115),char(0),char(109),char(95),char(108),char(105),char(110),char(101),char(97),char(114),char(68),char(97),char(109),char(112),
+char(105),char(110),char(103),char(0),char(109),char(95),char(97),char(110),char(103),char(117),char(108),char(97),char(114),char(68),char(97),char(109),char(112),char(105),char(110),char(103),
+char(0),char(109),char(95),char(97),char(100),char(100),char(105),char(116),char(105),char(111),char(110),char(97),char(108),char(68),char(97),char(109),char(112),char(105),char(110),char(103),
+char(70),char(97),char(99),char(116),char(111),char(114),char(0),char(109),char(95),char(97),char(100),char(100),char(105),char(116),char(105),char(111),char(110),char(97),char(108),char(76),
+char(105),char(110),char(101),char(97),char(114),char(68),char(97),char(109),char(112),char(105),char(110),char(103),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),
+char(100),char(83),char(113),char(114),char(0),char(109),char(95),char(97),char(100),char(100),char(105),char(116),char(105),char(111),char(110),char(97),char(108),char(65),char(110),char(103),
+char(117),char(108),char(97),char(114),char(68),char(97),char(109),char(112),char(105),char(110),char(103),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),
+char(83),char(113),char(114),char(0),char(109),char(95),char(97),char(100),char(100),char(105),char(116),char(105),char(111),char(110),char(97),char(108),char(65),char(110),char(103),char(117),
+char(108),char(97),char(114),char(68),char(97),char(109),char(112),char(105),char(110),char(103),char(70),char(97),char(99),char(116),char(111),char(114),char(0),char(109),char(95),char(108),
+char(105),char(110),char(101),char(97),char(114),char(83),char(108),char(101),char(101),char(112),char(105),char(110),char(103),char(84),char(104),char(114),char(101),char(115),char(104),char(111),
+char(108),char(100),char(0),char(109),char(95),char(97),char(110),char(103),char(117),char(108),char(97),char(114),char(83),char(108),char(101),char(101),char(112),char(105),char(110),char(103),
+char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(0),char(109),char(95),char(97),char(100),char(100),char(105),char(116),char(105),char(111),char(110),
+char(97),char(108),char(68),char(97),char(109),char(112),char(105),char(110),char(103),char(0),char(109),char(95),char(110),char(117),char(109),char(67),char(111),char(110),char(115),char(116),
+char(114),char(97),char(105),char(110),char(116),char(82),char(111),char(119),char(115),char(0),char(110),char(117),char(98),char(0),char(42),char(109),char(95),char(114),char(98),char(65),
+char(0),char(42),char(109),char(95),char(114),char(98),char(66),char(0),char(109),char(95),char(111),char(98),char(106),char(101),char(99),char(116),char(84),char(121),char(112),char(101),
+char(0),char(109),char(95),char(117),char(115),char(101),char(114),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(84),char(121),char(112),
+char(101),char(0),char(109),char(95),char(117),char(115),char(101),char(114),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(73),char(100),
+char(0),char(109),char(95),char(110),char(101),char(101),char(100),char(115),char(70),char(101),char(101),char(100),char(98),char(97),char(99),char(107),char(0),char(109),char(95),char(97),
+char(112),char(112),char(108),char(105),char(101),char(100),char(73),char(109),char(112),char(117),char(108),char(115),char(101),char(0),char(109),char(95),char(100),char(98),char(103),char(68),
+char(114),char(97),char(119),char(83),char(105),char(122),char(101),char(0),char(109),char(95),char(100),char(105),char(115),char(97),char(98),char(108),char(101),char(67),char(111),char(108),
+char(108),char(105),char(115),char(105),char(111),char(110),char(115),char(66),char(101),char(116),char(119),char(101),char(101),char(110),char(76),char(105),char(110),char(107),char(101),char(100),
+char(66),char(111),char(100),char(105),char(101),char(115),char(0),char(109),char(95),char(111),char(118),char(101),char(114),char(114),char(105),char(100),char(101),char(78),char(117),char(109),
+char(83),char(111),char(108),char(118),char(101),char(114),char(73),char(116),char(101),char(114),char(97),char(116),char(105),char(111),char(110),char(115),char(0),char(109),char(95),char(98),
+char(114),char(101),char(97),char(107),char(105),char(110),char(103),char(73),char(109),char(112),char(117),char(108),char(115),char(101),char(84),char(104),char(114),char(101),char(115),char(104),
+char(111),char(108),char(100),char(0),char(109),char(95),char(105),char(115),char(69),char(110),char(97),char(98),char(108),char(101),char(100),char(0),char(112),char(97),char(100),char(100),
+char(105),char(110),char(103),char(91),char(52),char(93),char(0),char(109),char(95),char(116),char(121),char(112),char(101),char(67),char(111),char(110),char(115),char(116),char(114),char(97),
+char(105),char(110),char(116),char(68),char(97),char(116),char(97),char(0),char(109),char(95),char(112),char(105),char(118),char(111),char(116),char(73),char(110),char(65),char(0),char(109),
+char(95),char(112),char(105),char(118),char(111),char(116),char(73),char(110),char(66),char(0),char(109),char(95),char(114),char(98),char(65),char(70),char(114),char(97),char(109),char(101),
+char(0),char(109),char(95),char(114),char(98),char(66),char(70),char(114),char(97),char(109),char(101),char(0),char(109),char(95),char(117),char(115),char(101),char(82),char(101),char(102),
+char(101),char(114),char(101),char(110),char(99),char(101),char(70),char(114),char(97),char(109),char(101),char(65),char(0),char(109),char(95),char(97),char(110),char(103),char(117),char(108),
+char(97),char(114),char(79),char(110),char(108),char(121),char(0),char(109),char(95),char(101),char(110),char(97),char(98),char(108),char(101),char(65),char(110),char(103),char(117),char(108),
+char(97),char(114),char(77),char(111),char(116),char(111),char(114),char(0),char(109),char(95),char(109),char(111),char(116),char(111),char(114),char(84),char(97),char(114),char(103),char(101),
+char(116),char(86),char(101),char(108),char(111),char(99),char(105),char(116),char(121),char(0),char(109),char(95),char(109),char(97),char(120),char(77),char(111),char(116),char(111),char(114),
+char(73),char(109),char(112),char(117),char(108),char(115),char(101),char(0),char(109),char(95),char(108),char(111),char(119),char(101),char(114),char(76),char(105),char(109),char(105),char(116),
+char(0),char(109),char(95),char(117),char(112),char(112),char(101),char(114),char(76),char(105),char(109),char(105),char(116),char(0),char(109),char(95),char(108),char(105),char(109),char(105),
+char(116),char(83),char(111),char(102),char(116),char(110),char(101),char(115),char(115),char(0),char(109),char(95),char(98),char(105),char(97),char(115),char(70),char(97),char(99),char(116),
+char(111),char(114),char(0),char(109),char(95),char(114),char(101),char(108),char(97),char(120),char(97),char(116),char(105),char(111),char(110),char(70),char(97),char(99),char(116),char(111),
+char(114),char(0),char(109),char(95),char(112),char(97),char(100),char(100),char(105),char(110),char(103),char(49),char(91),char(52),char(93),char(0),char(109),char(95),char(115),char(119),
+char(105),char(110),char(103),char(83),char(112),char(97),char(110),char(49),char(0),char(109),char(95),char(115),char(119),char(105),char(110),char(103),char(83),char(112),char(97),char(110),
+char(50),char(0),char(109),char(95),char(116),char(119),char(105),char(115),char(116),char(83),char(112),char(97),char(110),char(0),char(109),char(95),char(100),char(97),char(109),char(112),
+char(105),char(110),char(103),char(0),char(109),char(95),char(108),char(105),char(110),char(101),char(97),char(114),char(85),char(112),char(112),char(101),char(114),char(76),char(105),char(109),
+char(105),char(116),char(0),char(109),char(95),char(108),char(105),char(110),char(101),char(97),char(114),char(76),char(111),char(119),char(101),char(114),char(76),char(105),char(109),char(105),
+char(116),char(0),char(109),char(95),char(97),char(110),char(103),char(117),char(108),char(97),char(114),char(85),char(112),char(112),char(101),char(114),char(76),char(105),char(109),char(105),
+char(116),char(0),char(109),char(95),char(97),char(110),char(103),char(117),char(108),char(97),char(114),char(76),char(111),char(119),char(101),char(114),char(76),char(105),char(109),char(105),
+char(116),char(0),char(109),char(95),char(117),char(115),char(101),char(76),char(105),char(110),char(101),char(97),char(114),char(82),char(101),char(102),char(101),char(114),char(101),char(110),
+char(99),char(101),char(70),char(114),char(97),char(109),char(101),char(65),char(0),char(109),char(95),char(117),char(115),char(101),char(79),char(102),char(102),char(115),char(101),char(116),
+char(70),char(111),char(114),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(70),char(114),char(97),char(109),char(101),char(0),char(109),
+char(95),char(54),char(100),char(111),char(102),char(68),char(97),char(116),char(97),char(0),char(109),char(95),char(115),char(112),char(114),char(105),char(110),char(103),char(69),char(110),
+char(97),char(98),char(108),char(101),char(100),char(91),char(54),char(93),char(0),char(109),char(95),char(101),char(113),char(117),char(105),char(108),char(105),char(98),char(114),char(105),
+char(117),char(109),char(80),char(111),char(105),char(110),char(116),char(91),char(54),char(93),char(0),char(109),char(95),char(115),char(112),char(114),char(105),char(110),char(103),char(83),
+char(116),char(105),char(102),char(102),char(110),char(101),char(115),char(115),char(91),char(54),char(93),char(0),char(109),char(95),char(115),char(112),char(114),char(105),char(110),char(103),
+char(68),char(97),char(109),char(112),char(105),char(110),char(103),char(91),char(54),char(93),char(0),char(109),char(95),char(97),char(120),char(105),char(115),char(73),char(110),char(65),
+char(0),char(109),char(95),char(97),char(120),char(105),char(115),char(73),char(110),char(66),char(0),char(109),char(95),char(114),char(97),char(116),char(105),char(111),char(0),char(109),
+char(95),char(116),char(97),char(117),char(0),char(109),char(95),char(116),char(105),char(109),char(101),char(83),char(116),char(101),char(112),char(0),char(109),char(95),char(109),char(97),
+char(120),char(69),char(114),char(114),char(111),char(114),char(82),char(101),char(100),char(117),char(99),char(116),char(105),char(111),char(110),char(0),char(109),char(95),char(115),char(111),
+char(114),char(0),char(109),char(95),char(101),char(114),char(112),char(0),char(109),char(95),char(101),char(114),char(112),char(50),char(0),char(109),char(95),char(103),char(108),char(111),
+char(98),char(97),char(108),char(67),char(102),char(109),char(0),char(109),char(95),char(115),char(112),char(108),char(105),char(116),char(73),char(109),char(112),char(117),char(108),char(115),
+char(101),char(80),char(101),char(110),char(101),char(116),char(114),char(97),char(116),char(105),char(111),char(110),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),
+char(100),char(0),char(109),char(95),char(115),char(112),char(108),char(105),char(116),char(73),char(109),char(112),char(117),char(108),char(115),char(101),char(84),char(117),char(114),char(110),
+char(69),char(114),char(112),char(0),char(109),char(95),char(108),char(105),char(110),char(101),char(97),char(114),char(83),char(108),char(111),char(112),char(0),char(109),char(95),char(119),
+char(97),char(114),char(109),char(115),char(116),char(97),char(114),char(116),char(105),char(110),char(103),char(70),char(97),char(99),char(116),char(111),char(114),char(0),char(109),char(95),
+char(109),char(97),char(120),char(71),char(121),char(114),char(111),char(115),char(99),char(111),char(112),char(105),char(99),char(70),char(111),char(114),char(99),char(101),char(0),char(109),
+char(95),char(115),char(105),char(110),char(103),char(108),char(101),char(65),char(120),char(105),char(115),char(82),char(111),char(108),char(108),char(105),char(110),char(103),char(70),char(114),
+char(105),char(99),char(116),char(105),char(111),char(110),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),char(100),char(0),char(109),char(95),char(110),char(117),
+char(109),char(73),char(116),char(101),char(114),char(97),char(116),char(105),char(111),char(110),char(115),char(0),char(109),char(95),char(115),char(111),char(108),char(118),char(101),char(114),
+char(77),char(111),char(100),char(101),char(0),char(109),char(95),char(114),char(101),char(115),char(116),char(105),char(110),char(103),char(67),char(111),char(110),char(116),char(97),char(99),
+char(116),char(82),char(101),char(115),char(116),char(105),char(116),char(117),char(116),char(105),char(111),char(110),char(84),char(104),char(114),char(101),char(115),char(104),char(111),char(108),
+char(100),char(0),char(109),char(95),char(109),char(105),char(110),char(105),char(109),char(117),char(109),char(83),char(111),char(108),char(118),char(101),char(114),char(66),char(97),char(116),
+char(99),char(104),char(83),char(105),char(122),char(101),char(0),char(109),char(95),char(115),char(112),char(108),char(105),char(116),char(73),char(109),char(112),char(117),char(108),char(115),
+char(101),char(0),char(109),char(95),char(108),char(105),char(110),char(101),char(97),char(114),char(83),char(116),char(105),char(102),char(102),char(110),char(101),char(115),char(115),char(0),
+char(109),char(95),char(97),char(110),char(103),char(117),char(108),char(97),char(114),char(83),char(116),char(105),char(102),char(102),char(110),char(101),char(115),char(115),char(0),char(109),
+char(95),char(118),char(111),char(108),char(117),char(109),char(101),char(83),char(116),char(105),char(102),char(102),char(110),char(101),char(115),char(115),char(0),char(42),char(109),char(95),
+char(109),char(97),char(116),char(101),char(114),char(105),char(97),char(108),char(0),char(109),char(95),char(112),char(111),char(115),char(105),char(116),char(105),char(111),char(110),char(0),
+char(109),char(95),char(112),char(114),char(101),char(118),char(105),char(111),char(117),char(115),char(80),char(111),char(115),char(105),char(116),char(105),char(111),char(110),char(0),char(109),
+char(95),char(118),char(101),char(108),char(111),char(99),char(105),char(116),char(121),char(0),char(109),char(95),char(97),char(99),char(99),char(117),char(109),char(117),char(108),char(97),
+char(116),char(101),char(100),char(70),char(111),char(114),char(99),char(101),char(0),char(109),char(95),char(110),char(111),char(114),char(109),char(97),char(108),char(0),char(109),char(95),
+char(97),char(114),char(101),char(97),char(0),char(109),char(95),char(97),char(116),char(116),char(97),char(99),char(104),char(0),char(109),char(95),char(110),char(111),char(100),char(101),
+char(73),char(110),char(100),char(105),char(99),char(101),char(115),char(91),char(50),char(93),char(0),char(109),char(95),char(114),char(101),char(115),char(116),char(76),char(101),char(110),
+char(103),char(116),char(104),char(0),char(109),char(95),char(98),char(98),char(101),char(110),char(100),char(105),char(110),char(103),char(0),char(109),char(95),char(110),char(111),char(100),
+char(101),char(73),char(110),char(100),char(105),char(99),char(101),char(115),char(91),char(51),char(93),char(0),char(109),char(95),char(114),char(101),char(115),char(116),char(65),char(114),
+char(101),char(97),char(0),char(109),char(95),char(99),char(48),char(91),char(52),char(93),char(0),char(109),char(95),char(110),char(111),char(100),char(101),char(73),char(110),char(100),
+char(105),char(99),char(101),char(115),char(91),char(52),char(93),char(0),char(109),char(95),char(114),char(101),char(115),char(116),char(86),char(111),char(108),char(117),char(109),char(101),
+char(0),char(109),char(95),char(99),char(49),char(0),char(109),char(95),char(99),char(50),char(0),char(109),char(95),char(99),char(48),char(0),char(109),char(95),char(108),char(111),
+char(99),char(97),char(108),char(70),char(114),char(97),char(109),char(101),char(0),char(42),char(109),char(95),char(114),char(105),char(103),char(105),char(100),char(66),char(111),char(100),
+char(121),char(0),char(109),char(95),char(110),char(111),char(100),char(101),char(73),char(110),char(100),char(101),char(120),char(0),char(109),char(95),char(97),char(101),char(114),char(111),
+char(77),char(111),char(100),char(101),char(108),char(0),char(109),char(95),char(98),char(97),char(117),char(109),char(103),char(97),char(114),char(116),char(101),char(0),char(109),char(95),
+char(100),char(114),char(97),char(103),char(0),char(109),char(95),char(108),char(105),char(102),char(116),char(0),char(109),char(95),char(112),char(114),char(101),char(115),char(115),char(117),
+char(114),char(101),char(0),char(109),char(95),char(118),char(111),char(108),char(117),char(109),char(101),char(0),char(109),char(95),char(100),char(121),char(110),char(97),char(109),char(105),
+char(99),char(70),char(114),char(105),char(99),char(116),char(105),char(111),char(110),char(0),char(109),char(95),char(112),char(111),char(115),char(101),char(77),char(97),char(116),char(99),
+char(104),char(0),char(109),char(95),char(114),char(105),char(103),char(105),char(100),char(67),char(111),char(110),char(116),char(97),char(99),char(116),char(72),char(97),char(114),char(100),
+char(110),char(101),char(115),char(115),char(0),char(109),char(95),char(107),char(105),char(110),char(101),char(116),char(105),char(99),char(67),char(111),char(110),char(116),char(97),char(99),
+char(116),char(72),char(97),char(114),char(100),char(110),char(101),char(115),char(115),char(0),char(109),char(95),char(115),char(111),char(102),char(116),char(67),char(111),char(110),char(116),
+char(97),char(99),char(116),char(72),char(97),char(114),char(100),char(110),char(101),char(115),char(115),char(0),char(109),char(95),char(97),char(110),char(99),char(104),char(111),char(114),
+char(72),char(97),char(114),char(100),char(110),char(101),char(115),char(115),char(0),char(109),char(95),char(115),char(111),char(102),char(116),char(82),char(105),char(103),char(105),char(100),
+char(67),char(108),char(117),char(115),char(116),char(101),char(114),char(72),char(97),char(114),char(100),char(110),char(101),char(115),char(115),char(0),char(109),char(95),char(115),char(111),
+char(102),char(116),char(75),char(105),char(110),char(101),char(116),char(105),char(99),char(67),char(108),char(117),char(115),char(116),char(101),char(114),char(72),char(97),char(114),char(100),
+char(110),char(101),char(115),char(115),char(0),char(109),char(95),char(115),char(111),char(102),char(116),char(83),char(111),char(102),char(116),char(67),char(108),char(117),char(115),char(116),
+char(101),char(114),char(72),char(97),char(114),char(100),char(110),char(101),char(115),char(115),char(0),char(109),char(95),char(115),char(111),char(102),char(116),char(82),char(105),char(103),
+char(105),char(100),char(67),char(108),char(117),char(115),char(116),char(101),char(114),char(73),char(109),char(112),char(117),char(108),char(115),char(101),char(83),char(112),char(108),char(105),
+char(116),char(0),char(109),char(95),char(115),char(111),char(102),char(116),char(75),char(105),char(110),char(101),char(116),char(105),char(99),char(67),char(108),char(117),char(115),char(116),
+char(101),char(114),char(73),char(109),char(112),char(117),char(108),char(115),char(101),char(83),char(112),char(108),char(105),char(116),char(0),char(109),char(95),char(115),char(111),char(102),
+char(116),char(83),char(111),char(102),char(116),char(67),char(108),char(117),char(115),char(116),char(101),char(114),char(73),char(109),char(112),char(117),char(108),char(115),char(101),char(83),
+char(112),char(108),char(105),char(116),char(0),char(109),char(95),char(109),char(97),char(120),char(86),char(111),char(108),char(117),char(109),char(101),char(0),char(109),char(95),char(116),
+char(105),char(109),char(101),char(83),char(99),char(97),char(108),char(101),char(0),char(109),char(95),char(118),char(101),char(108),char(111),char(99),char(105),char(116),char(121),char(73),
+char(116),char(101),char(114),char(97),char(116),char(105),char(111),char(110),char(115),char(0),char(109),char(95),char(112),char(111),char(115),char(105),char(116),char(105),char(111),char(110),
+char(73),char(116),char(101),char(114),char(97),char(116),char(105),char(111),char(110),char(115),char(0),char(109),char(95),char(100),char(114),char(105),char(102),char(116),char(73),char(116),
+char(101),char(114),char(97),char(116),char(105),char(111),char(110),char(115),char(0),char(109),char(95),char(99),char(108),char(117),char(115),char(116),char(101),char(114),char(73),char(116),
+char(101),char(114),char(97),char(116),char(105),char(111),char(110),char(115),char(0),char(109),char(95),char(114),char(111),char(116),char(0),char(109),char(95),char(115),char(99),char(97),
+char(108),char(101),char(0),char(109),char(95),char(97),char(113),char(113),char(0),char(109),char(95),char(99),char(111),char(109),char(0),char(42),char(109),char(95),char(112),char(111),
+char(115),char(105),char(116),char(105),char(111),char(110),char(115),char(0),char(42),char(109),char(95),char(119),char(101),char(105),char(103),char(104),char(116),char(115),char(0),char(109),
+char(95),char(110),char(117),char(109),char(80),char(111),char(115),char(105),char(116),char(105),char(111),char(110),char(115),char(0),char(109),char(95),char(110),char(117),char(109),char(87),
+char(101),char(105),char(103),char(116),char(115),char(0),char(109),char(95),char(98),char(118),char(111),char(108),char(117),char(109),char(101),char(0),char(109),char(95),char(98),char(102),
+char(114),char(97),char(109),char(101),char(0),char(109),char(95),char(102),char(114),char(97),char(109),char(101),char(120),char(102),char(111),char(114),char(109),char(0),char(109),char(95),
+char(108),char(111),char(99),char(105),char(105),char(0),char(109),char(95),char(105),char(110),char(118),char(119),char(105),char(0),char(109),char(95),char(118),char(105),char(109),char(112),
+char(117),char(108),char(115),char(101),char(115),char(91),char(50),char(93),char(0),char(109),char(95),char(100),char(105),char(109),char(112),char(117),char(108),char(115),char(101),char(115),
+char(91),char(50),char(93),char(0),char(109),char(95),char(108),char(118),char(0),char(109),char(95),char(97),char(118),char(0),char(42),char(109),char(95),char(102),char(114),char(97),
+char(109),char(101),char(114),char(101),char(102),char(115),char(0),char(42),char(109),char(95),char(110),char(111),char(100),char(101),char(73),char(110),char(100),char(105),char(99),char(101),
+char(115),char(0),char(42),char(109),char(95),char(109),char(97),char(115),char(115),char(101),char(115),char(0),char(109),char(95),char(110),char(117),char(109),char(70),char(114),char(97),
+char(109),char(101),char(82),char(101),char(102),char(115),char(0),char(109),char(95),char(110),char(117),char(109),char(78),char(111),char(100),char(101),char(115),char(0),char(109),char(95),
+char(110),char(117),char(109),char(77),char(97),char(115),char(115),char(101),char(115),char(0),char(109),char(95),char(105),char(100),char(109),char(97),char(115),char(115),char(0),char(109),
+char(95),char(105),char(109),char(97),char(115),char(115),char(0),char(109),char(95),char(110),char(118),char(105),char(109),char(112),char(117),char(108),char(115),char(101),char(115),char(0),
+char(109),char(95),char(110),char(100),char(105),char(109),char(112),char(117),char(108),char(115),char(101),char(115),char(0),char(109),char(95),char(110),char(100),char(97),char(109),char(112),
+char(105),char(110),char(103),char(0),char(109),char(95),char(108),char(100),char(97),char(109),char(112),char(105),char(110),char(103),char(0),char(109),char(95),char(97),char(100),char(97),
+char(109),char(112),char(105),char(110),char(103),char(0),char(109),char(95),char(109),char(97),char(116),char(99),char(104),char(105),char(110),char(103),char(0),char(109),char(95),char(109),
+char(97),char(120),char(83),char(101),char(108),char(102),char(67),char(111),char(108),char(108),char(105),char(115),char(105),char(111),char(110),char(73),char(109),char(112),char(117),char(108),
+char(115),char(101),char(0),char(109),char(95),char(115),char(101),char(108),char(102),char(67),char(111),char(108),char(108),char(105),char(115),char(105),char(111),char(110),char(73),char(109),
+char(112),char(117),char(108),char(115),char(101),char(70),char(97),char(99),char(116),char(111),char(114),char(0),char(109),char(95),char(99),char(111),char(110),char(116),char(97),char(105),
+char(110),char(115),char(65),char(110),char(99),char(104),char(111),char(114),char(0),char(109),char(95),char(99),char(111),char(108),char(108),char(105),char(100),char(101),char(0),char(109),
+char(95),char(99),char(108),char(117),char(115),char(116),char(101),char(114),char(73),char(110),char(100),char(101),char(120),char(0),char(42),char(109),char(95),char(98),char(111),char(100),
+char(121),char(65),char(0),char(42),char(109),char(95),char(98),char(111),char(100),char(121),char(66),char(0),char(109),char(95),char(114),char(101),char(102),char(115),char(91),char(50),
+char(93),char(0),char(109),char(95),char(99),char(102),char(109),char(0),char(109),char(95),char(115),char(112),char(108),char(105),char(116),char(0),char(109),char(95),char(100),char(101),
+char(108),char(101),char(116),char(101),char(0),char(109),char(95),char(114),char(101),char(108),char(80),char(111),char(115),char(105),char(116),char(105),char(111),char(110),char(91),char(50),
+char(93),char(0),char(109),char(95),char(98),char(111),char(100),char(121),char(65),char(116),char(121),char(112),char(101),char(0),char(109),char(95),char(98),char(111),char(100),char(121),
+char(66),char(116),char(121),char(112),char(101),char(0),char(109),char(95),char(106),char(111),char(105),char(110),char(116),char(84),char(121),char(112),char(101),char(0),char(42),char(109),
+char(95),char(112),char(111),char(115),char(101),char(0),char(42),char(42),char(109),char(95),char(109),char(97),char(116),char(101),char(114),char(105),char(97),char(108),char(115),char(0),
+char(42),char(109),char(95),char(110),char(111),char(100),char(101),char(115),char(0),char(42),char(109),char(95),char(108),char(105),char(110),char(107),char(115),char(0),char(42),char(109),
+char(95),char(102),char(97),char(99),char(101),char(115),char(0),char(42),char(109),char(95),char(116),char(101),char(116),char(114),char(97),char(104),char(101),char(100),char(114),char(97),
+char(0),char(42),char(109),char(95),char(97),char(110),char(99),char(104),char(111),char(114),char(115),char(0),char(42),char(109),char(95),char(99),char(108),char(117),char(115),char(116),
+char(101),char(114),char(115),char(0),char(42),char(109),char(95),char(106),char(111),char(105),char(110),char(116),char(115),char(0),char(109),char(95),char(110),char(117),char(109),char(77),
+char(97),char(116),char(101),char(114),char(105),char(97),char(108),char(115),char(0),char(109),char(95),char(110),char(117),char(109),char(76),char(105),char(110),char(107),char(115),char(0),
+char(109),char(95),char(110),char(117),char(109),char(70),char(97),char(99),char(101),char(115),char(0),char(109),char(95),char(110),char(117),char(109),char(84),char(101),char(116),char(114),
+char(97),char(104),char(101),char(100),char(114),char(97),char(0),char(109),char(95),char(110),char(117),char(109),char(65),char(110),char(99),char(104),char(111),char(114),char(115),char(0),
+char(109),char(95),char(110),char(117),char(109),char(67),char(108),char(117),char(115),char(116),char(101),char(114),char(115),char(0),char(109),char(95),char(110),char(117),char(109),char(74),
+char(111),char(105),char(110),char(116),char(115),char(0),char(109),char(95),char(99),char(111),char(110),char(102),char(105),char(103),char(0),char(0),char(84),char(89),char(80),char(69),
+char(87),char(0),char(0),char(0),char(99),char(104),char(97),char(114),char(0),char(117),char(99),char(104),char(97),char(114),char(0),char(115),char(104),char(111),char(114),char(116),
+char(0),char(117),char(115),char(104),char(111),char(114),char(116),char(0),char(105),char(110),char(116),char(0),char(108),char(111),char(110),char(103),char(0),char(117),char(108),char(111),
+char(110),char(103),char(0),char(102),char(108),char(111),char(97),char(116),char(0),char(100),char(111),char(117),char(98),char(108),char(101),char(0),char(118),char(111),char(105),char(100),
+char(0),char(80),char(111),char(105),char(110),char(116),char(101),char(114),char(65),char(114),char(114),char(97),char(121),char(0),char(98),char(116),char(80),char(104),char(121),char(115),
+char(105),char(99),char(115),char(83),char(121),char(115),char(116),char(101),char(109),char(0),char(76),char(105),char(115),char(116),char(66),char(97),char(115),char(101),char(0),char(98),
+char(116),char(86),char(101),char(99),char(116),char(111),char(114),char(51),char(70),char(108),char(111),char(97),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),
+char(86),char(101),char(99),char(116),char(111),char(114),char(51),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),
+char(77),char(97),char(116),char(114),char(105),char(120),char(51),char(120),char(51),char(70),char(108),char(111),char(97),char(116),char(68),char(97),char(116),char(97),char(0),char(98),
+char(116),char(77),char(97),char(116),char(114),char(105),char(120),char(51),char(120),char(51),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),
+char(0),char(98),char(116),char(84),char(114),char(97),char(110),char(115),char(102),char(111),char(114),char(109),char(70),char(108),char(111),char(97),char(116),char(68),char(97),char(116),
+char(97),char(0),char(98),char(116),char(84),char(114),char(97),char(110),char(115),char(102),char(111),char(114),char(109),char(68),char(111),char(117),char(98),char(108),char(101),char(68),
+char(97),char(116),char(97),char(0),char(98),char(116),char(66),char(118),char(104),char(83),char(117),char(98),char(116),char(114),char(101),char(101),char(73),char(110),char(102),char(111),
+char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(79),char(112),char(116),char(105),char(109),char(105),char(122),char(101),char(100),char(66),char(118),char(104),char(78),
+char(111),char(100),char(101),char(70),char(108),char(111),char(97),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(79),char(112),char(116),char(105),char(109),
+char(105),char(122),char(101),char(100),char(66),char(118),char(104),char(78),char(111),char(100),char(101),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),
+char(97),char(0),char(98),char(116),char(81),char(117),char(97),char(110),char(116),char(105),char(122),char(101),char(100),char(66),char(118),char(104),char(78),char(111),char(100),char(101),
+char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(81),char(117),char(97),char(110),char(116),char(105),char(122),char(101),char(100),char(66),char(118),char(104),char(70),
+char(108),char(111),char(97),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(81),char(117),char(97),char(110),char(116),char(105),char(122),char(101),char(100),
+char(66),char(118),char(104),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(67),char(111),char(108),char(108),
+char(105),char(115),char(105),char(111),char(110),char(83),char(104),char(97),char(112),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(83),char(116),char(97),
+char(116),char(105),char(99),char(80),char(108),char(97),char(110),char(101),char(83),char(104),char(97),char(112),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),
+char(67),char(111),char(110),char(118),char(101),char(120),char(73),char(110),char(116),char(101),char(114),char(110),char(97),char(108),char(83),char(104),char(97),char(112),char(101),char(68),
+char(97),char(116),char(97),char(0),char(98),char(116),char(80),char(111),char(115),char(105),char(116),char(105),char(111),char(110),char(65),char(110),char(100),char(82),char(97),char(100),
+char(105),char(117),char(115),char(0),char(98),char(116),char(77),char(117),char(108),char(116),char(105),char(83),char(112),char(104),char(101),char(114),char(101),char(83),char(104),char(97),
+char(112),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(73),char(110),char(116),char(73),char(110),char(100),char(101),char(120),char(68),char(97),char(116),
+char(97),char(0),char(98),char(116),char(83),char(104),char(111),char(114),char(116),char(73),char(110),char(116),char(73),char(110),char(100),char(101),char(120),char(68),char(97),char(116),
+char(97),char(0),char(98),char(116),char(83),char(104),char(111),char(114),char(116),char(73),char(110),char(116),char(73),char(110),char(100),char(101),char(120),char(84),char(114),char(105),
+char(112),char(108),char(101),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(67),char(104),char(97),char(114),char(73),char(110),char(100),char(101),char(120),
+char(84),char(114),char(105),char(112),char(108),char(101),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(77),char(101),char(115),char(104),char(80),char(97),
+char(114),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(83),char(116),char(114),char(105),char(100),char(105),char(110),char(103),char(77),char(101),char(115),
+char(104),char(73),char(110),char(116),char(101),char(114),char(102),char(97),char(99),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(84),char(114),char(105),
+char(97),char(110),char(103),char(108),char(101),char(77),char(101),char(115),char(104),char(83),char(104),char(97),char(112),char(101),char(68),char(97),char(116),char(97),char(0),char(98),
+char(116),char(84),char(114),char(105),char(97),char(110),char(103),char(108),char(101),char(73),char(110),char(102),char(111),char(77),char(97),char(112),char(68),char(97),char(116),char(97),
+char(0),char(98),char(116),char(83),char(99),char(97),char(108),char(101),char(100),char(84),char(114),char(105),char(97),char(110),char(103),char(108),char(101),char(77),char(101),char(115),
+char(104),char(83),char(104),char(97),char(112),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(67),char(111),char(109),char(112),char(111),char(117),char(110),
+char(100),char(83),char(104),char(97),char(112),char(101),char(67),char(104),char(105),char(108),char(100),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(67),char(111),
+char(109),char(112),char(111),char(117),char(110),char(100),char(83),char(104),char(97),char(112),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(67),char(121),
+char(108),char(105),char(110),char(100),char(101),char(114),char(83),char(104),char(97),char(112),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(67),char(111),
+char(110),char(101),char(83),char(104),char(97),char(112),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(67),char(97),char(112),char(115),char(117),char(108),
char(101),char(83),char(104),char(97),char(112),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(84),char(114),char(105),char(97),char(110),char(103),char(108),
char(101),char(73),char(110),char(102),char(111),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(71),char(73),char(109),char(112),char(97),char(99),char(116),char(77),
char(101),char(115),char(104),char(83),char(104),char(97),char(112),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(67),char(111),char(110),char(118),char(101),
@@ -759,150 +805,187 @@ char(83),char(111),char(108),char(118),char(101),char(114),char(73),char(110),ch
char(98),char(116),char(82),char(105),char(103),char(105),char(100),char(66),char(111),char(100),char(121),char(70),char(108),char(111),char(97),char(116),char(68),char(97),char(116),char(97),
char(0),char(98),char(116),char(82),char(105),char(103),char(105),char(100),char(66),char(111),char(100),char(121),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),
char(116),char(97),char(0),char(98),char(116),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(73),char(110),char(102),char(111),char(49),
-char(0),char(98),char(116),char(84),char(121),char(112),char(101),char(100),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(68),char(97),
-char(116),char(97),char(0),char(98),char(116),char(82),char(105),char(103),char(105),char(100),char(66),char(111),char(100),char(121),char(68),char(97),char(116),char(97),char(0),char(98),
-char(116),char(80),char(111),char(105),char(110),char(116),char(50),char(80),char(111),char(105),char(110),char(116),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),
-char(110),char(116),char(70),char(108),char(111),char(97),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(80),char(111),char(105),char(110),char(116),char(50),
-char(80),char(111),char(105),char(110),char(116),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(68),char(111),char(117),char(98),char(108),
-char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(72),char(105),char(110),char(103),char(101),char(67),char(111),char(110),char(115),char(116),char(114),char(97),
-char(105),char(110),char(116),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(72),char(105),char(110),char(103),
-char(101),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(70),char(108),char(111),char(97),char(116),char(68),char(97),char(116),char(97),
-char(0),char(98),char(116),char(67),char(111),char(110),char(101),char(84),char(119),char(105),char(115),char(116),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),
-char(110),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(71),char(101),char(110),char(101),char(114),char(105),char(99),char(54),char(68),char(111),char(102),
+char(0),char(98),char(116),char(84),char(121),char(112),char(101),char(100),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(70),char(108),
+char(111),char(97),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(84),char(121),char(112),char(101),char(100),char(67),char(111),char(110),char(115),char(116),
+char(114),char(97),char(105),char(110),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(82),char(105),char(103),char(105),char(100),char(66),char(111),char(100),
+char(121),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(84),char(121),char(112),char(101),char(100),char(67),char(111),char(110),char(115),char(116),char(114),char(97),
+char(105),char(110),char(116),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(80),char(111),char(105),char(110),
+char(116),char(50),char(80),char(111),char(105),char(110),char(116),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(70),char(108),char(111),
+char(97),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(80),char(111),char(105),char(110),char(116),char(50),char(80),char(111),char(105),char(110),char(116),
+char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),
+char(50),char(0),char(98),char(116),char(80),char(111),char(105),char(110),char(116),char(50),char(80),char(111),char(105),char(110),char(116),char(67),char(111),char(110),char(115),char(116),
+char(114),char(97),char(105),char(110),char(116),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(72),char(105),
+char(110),char(103),char(101),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(68),char(111),char(117),char(98),char(108),char(101),char(68),
+char(97),char(116),char(97),char(0),char(98),char(116),char(72),char(105),char(110),char(103),char(101),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),
+char(116),char(70),char(108),char(111),char(97),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(72),char(105),char(110),char(103),char(101),char(67),char(111),
+char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),char(50),char(0),
+char(98),char(116),char(67),char(111),char(110),char(101),char(84),char(119),char(105),char(115),char(116),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),
+char(116),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(67),char(111),char(110),char(101),char(84),char(119),
+char(105),char(115),char(116),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),
+char(71),char(101),char(110),char(101),char(114),char(105),char(99),char(54),char(68),char(111),char(102),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),
+char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(71),char(101),char(110),char(101),char(114),char(105),char(99),char(54),char(68),char(111),char(102),char(67),
+char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),char(50),
+char(0),char(98),char(116),char(71),char(101),char(110),char(101),char(114),char(105),char(99),char(54),char(68),char(111),char(102),char(83),char(112),char(114),char(105),char(110),char(103),
char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(71),char(101),char(110),
char(101),char(114),char(105),char(99),char(54),char(68),char(111),char(102),char(83),char(112),char(114),char(105),char(110),char(103),char(67),char(111),char(110),char(115),char(116),char(114),
-char(97),char(105),char(110),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(83),char(108),char(105),char(100),char(101),char(114),char(67),char(111),char(110),
-char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(68),char(97),char(116),char(97),char(0),char(83),char(111),char(102),char(116),char(66),char(111),char(100),char(121),
-char(77),char(97),char(116),char(101),char(114),char(105),char(97),char(108),char(68),char(97),char(116),char(97),char(0),char(83),char(111),char(102),char(116),char(66),char(111),char(100),
-char(121),char(78),char(111),char(100),char(101),char(68),char(97),char(116),char(97),char(0),char(83),char(111),char(102),char(116),char(66),char(111),char(100),char(121),char(76),char(105),
-char(110),char(107),char(68),char(97),char(116),char(97),char(0),char(83),char(111),char(102),char(116),char(66),char(111),char(100),char(121),char(70),char(97),char(99),char(101),char(68),
-char(97),char(116),char(97),char(0),char(83),char(111),char(102),char(116),char(66),char(111),char(100),char(121),char(84),char(101),char(116),char(114),char(97),char(68),char(97),char(116),
-char(97),char(0),char(83),char(111),char(102),char(116),char(82),char(105),char(103),char(105),char(100),char(65),char(110),char(99),char(104),char(111),char(114),char(68),char(97),char(116),
-char(97),char(0),char(83),char(111),char(102),char(116),char(66),char(111),char(100),char(121),char(67),char(111),char(110),char(102),char(105),char(103),char(68),char(97),char(116),char(97),
-char(0),char(83),char(111),char(102),char(116),char(66),char(111),char(100),char(121),char(80),char(111),char(115),char(101),char(68),char(97),char(116),char(97),char(0),char(83),char(111),
-char(102),char(116),char(66),char(111),char(100),char(121),char(67),char(108),char(117),char(115),char(116),char(101),char(114),char(68),char(97),char(116),char(97),char(0),char(98),char(116),
-char(83),char(111),char(102),char(116),char(66),char(111),char(100),char(121),char(74),char(111),char(105),char(110),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),
-char(83),char(111),char(102),char(116),char(66),char(111),char(100),char(121),char(70),char(108),char(111),char(97),char(116),char(68),char(97),char(116),char(97),char(0),char(0),char(0),
-char(84),char(76),char(69),char(78),char(1),char(0),char(1),char(0),char(2),char(0),char(2),char(0),char(4),char(0),char(4),char(0),char(4),char(0),char(4),char(0),
-char(8),char(0),char(0),char(0),char(16),char(0),char(48),char(0),char(16),char(0),char(16),char(0),char(32),char(0),char(48),char(0),char(96),char(0),char(64),char(0),
-char(-128),char(0),char(20),char(0),char(48),char(0),char(80),char(0),char(16),char(0),char(96),char(0),char(-112),char(0),char(16),char(0),char(56),char(0),char(56),char(0),
-char(20),char(0),char(72),char(0),char(4),char(0),char(4),char(0),char(8),char(0),char(4),char(0),char(56),char(0),char(32),char(0),char(80),char(0),char(72),char(0),
-char(96),char(0),char(80),char(0),char(32),char(0),char(64),char(0),char(64),char(0),char(16),char(0),char(72),char(0),char(80),char(0),char(-32),char(1),char(16),char(1),
-char(-72),char(0),char(-104),char(0),char(104),char(0),char(88),char(0),char(-8),char(1),char(-80),char(3),char(8),char(0),char(64),char(0),char(0),char(0),char(96),char(0),
-char(-128),char(0),char(104),char(1),char(-24),char(0),char(-32),char(0),char(8),char(1),char(104),char(1),char(-40),char(0),char(16),char(0),char(104),char(0),char(24),char(0),
-char(40),char(0),char(104),char(0),char(96),char(0),char(104),char(0),char(-56),char(0),char(104),char(1),char(112),char(0),char(-32),char(1),char(83),char(84),char(82),char(67),
-char(65),char(0),char(0),char(0),char(10),char(0),char(3),char(0),char(4),char(0),char(0),char(0),char(4),char(0),char(1),char(0),char(9),char(0),char(2),char(0),
-char(11),char(0),char(3),char(0),char(10),char(0),char(3),char(0),char(10),char(0),char(4),char(0),char(10),char(0),char(5),char(0),char(12),char(0),char(2),char(0),
-char(9),char(0),char(6),char(0),char(9),char(0),char(7),char(0),char(13),char(0),char(1),char(0),char(7),char(0),char(8),char(0),char(14),char(0),char(1),char(0),
-char(8),char(0),char(8),char(0),char(15),char(0),char(1),char(0),char(13),char(0),char(9),char(0),char(16),char(0),char(1),char(0),char(14),char(0),char(9),char(0),
-char(17),char(0),char(2),char(0),char(15),char(0),char(10),char(0),char(13),char(0),char(11),char(0),char(18),char(0),char(2),char(0),char(16),char(0),char(10),char(0),
-char(14),char(0),char(11),char(0),char(19),char(0),char(4),char(0),char(4),char(0),char(12),char(0),char(4),char(0),char(13),char(0),char(2),char(0),char(14),char(0),
-char(2),char(0),char(15),char(0),char(20),char(0),char(6),char(0),char(13),char(0),char(16),char(0),char(13),char(0),char(17),char(0),char(4),char(0),char(18),char(0),
-char(4),char(0),char(19),char(0),char(4),char(0),char(20),char(0),char(0),char(0),char(21),char(0),char(21),char(0),char(6),char(0),char(14),char(0),char(16),char(0),
-char(14),char(0),char(17),char(0),char(4),char(0),char(18),char(0),char(4),char(0),char(19),char(0),char(4),char(0),char(20),char(0),char(0),char(0),char(21),char(0),
-char(22),char(0),char(3),char(0),char(2),char(0),char(14),char(0),char(2),char(0),char(15),char(0),char(4),char(0),char(22),char(0),char(23),char(0),char(12),char(0),
-char(13),char(0),char(23),char(0),char(13),char(0),char(24),char(0),char(13),char(0),char(25),char(0),char(4),char(0),char(26),char(0),char(4),char(0),char(27),char(0),
-char(4),char(0),char(28),char(0),char(4),char(0),char(29),char(0),char(20),char(0),char(30),char(0),char(22),char(0),char(31),char(0),char(19),char(0),char(32),char(0),
-char(4),char(0),char(33),char(0),char(4),char(0),char(34),char(0),char(24),char(0),char(12),char(0),char(14),char(0),char(23),char(0),char(14),char(0),char(24),char(0),
-char(14),char(0),char(25),char(0),char(4),char(0),char(26),char(0),char(4),char(0),char(27),char(0),char(4),char(0),char(28),char(0),char(4),char(0),char(29),char(0),
-char(21),char(0),char(30),char(0),char(22),char(0),char(31),char(0),char(4),char(0),char(33),char(0),char(4),char(0),char(34),char(0),char(19),char(0),char(32),char(0),
-char(25),char(0),char(3),char(0),char(0),char(0),char(35),char(0),char(4),char(0),char(36),char(0),char(0),char(0),char(37),char(0),char(26),char(0),char(5),char(0),
-char(25),char(0),char(38),char(0),char(13),char(0),char(39),char(0),char(13),char(0),char(40),char(0),char(7),char(0),char(41),char(0),char(0),char(0),char(21),char(0),
-char(27),char(0),char(5),char(0),char(25),char(0),char(38),char(0),char(13),char(0),char(39),char(0),char(13),char(0),char(42),char(0),char(7),char(0),char(43),char(0),
-char(4),char(0),char(44),char(0),char(28),char(0),char(2),char(0),char(13),char(0),char(45),char(0),char(7),char(0),char(46),char(0),char(29),char(0),char(4),char(0),
-char(27),char(0),char(47),char(0),char(28),char(0),char(48),char(0),char(4),char(0),char(49),char(0),char(0),char(0),char(37),char(0),char(30),char(0),char(1),char(0),
-char(4),char(0),char(50),char(0),char(31),char(0),char(2),char(0),char(2),char(0),char(50),char(0),char(0),char(0),char(51),char(0),char(32),char(0),char(2),char(0),
-char(2),char(0),char(52),char(0),char(0),char(0),char(51),char(0),char(33),char(0),char(2),char(0),char(0),char(0),char(52),char(0),char(0),char(0),char(53),char(0),
-char(34),char(0),char(8),char(0),char(13),char(0),char(54),char(0),char(14),char(0),char(55),char(0),char(30),char(0),char(56),char(0),char(32),char(0),char(57),char(0),
-char(33),char(0),char(58),char(0),char(31),char(0),char(59),char(0),char(4),char(0),char(60),char(0),char(4),char(0),char(61),char(0),char(35),char(0),char(4),char(0),
-char(34),char(0),char(62),char(0),char(13),char(0),char(63),char(0),char(4),char(0),char(64),char(0),char(0),char(0),char(37),char(0),char(36),char(0),char(7),char(0),
-char(25),char(0),char(38),char(0),char(35),char(0),char(65),char(0),char(23),char(0),char(66),char(0),char(24),char(0),char(67),char(0),char(37),char(0),char(68),char(0),
-char(7),char(0),char(43),char(0),char(0),char(0),char(69),char(0),char(38),char(0),char(2),char(0),char(36),char(0),char(70),char(0),char(13),char(0),char(39),char(0),
-char(39),char(0),char(4),char(0),char(17),char(0),char(71),char(0),char(25),char(0),char(72),char(0),char(4),char(0),char(73),char(0),char(7),char(0),char(74),char(0),
-char(40),char(0),char(4),char(0),char(25),char(0),char(38),char(0),char(39),char(0),char(75),char(0),char(4),char(0),char(76),char(0),char(7),char(0),char(43),char(0),
-char(41),char(0),char(3),char(0),char(27),char(0),char(47),char(0),char(4),char(0),char(77),char(0),char(0),char(0),char(37),char(0),char(42),char(0),char(3),char(0),
-char(27),char(0),char(47),char(0),char(4),char(0),char(77),char(0),char(0),char(0),char(37),char(0),char(43),char(0),char(4),char(0),char(4),char(0),char(78),char(0),
-char(7),char(0),char(79),char(0),char(7),char(0),char(80),char(0),char(7),char(0),char(81),char(0),char(37),char(0),char(14),char(0),char(4),char(0),char(82),char(0),
-char(4),char(0),char(83),char(0),char(43),char(0),char(84),char(0),char(4),char(0),char(85),char(0),char(7),char(0),char(86),char(0),char(7),char(0),char(87),char(0),
-char(7),char(0),char(88),char(0),char(7),char(0),char(89),char(0),char(7),char(0),char(90),char(0),char(4),char(0),char(91),char(0),char(4),char(0),char(92),char(0),
-char(4),char(0),char(93),char(0),char(4),char(0),char(94),char(0),char(0),char(0),char(37),char(0),char(44),char(0),char(5),char(0),char(25),char(0),char(38),char(0),
-char(35),char(0),char(65),char(0),char(13),char(0),char(39),char(0),char(7),char(0),char(43),char(0),char(4),char(0),char(95),char(0),char(45),char(0),char(5),char(0),
-char(27),char(0),char(47),char(0),char(13),char(0),char(96),char(0),char(14),char(0),char(97),char(0),char(4),char(0),char(98),char(0),char(0),char(0),char(99),char(0),
-char(46),char(0),char(25),char(0),char(9),char(0),char(100),char(0),char(9),char(0),char(101),char(0),char(25),char(0),char(102),char(0),char(0),char(0),char(35),char(0),
-char(18),char(0),char(103),char(0),char(18),char(0),char(104),char(0),char(14),char(0),char(105),char(0),char(14),char(0),char(106),char(0),char(14),char(0),char(107),char(0),
-char(8),char(0),char(108),char(0),char(8),char(0),char(109),char(0),char(8),char(0),char(110),char(0),char(8),char(0),char(111),char(0),char(8),char(0),char(112),char(0),
-char(8),char(0),char(113),char(0),char(8),char(0),char(114),char(0),char(8),char(0),char(115),char(0),char(4),char(0),char(116),char(0),char(4),char(0),char(117),char(0),
-char(4),char(0),char(118),char(0),char(4),char(0),char(119),char(0),char(4),char(0),char(120),char(0),char(4),char(0),char(121),char(0),char(4),char(0),char(122),char(0),
-char(0),char(0),char(37),char(0),char(47),char(0),char(25),char(0),char(9),char(0),char(100),char(0),char(9),char(0),char(101),char(0),char(25),char(0),char(102),char(0),
-char(0),char(0),char(35),char(0),char(17),char(0),char(103),char(0),char(17),char(0),char(104),char(0),char(13),char(0),char(105),char(0),char(13),char(0),char(106),char(0),
-char(13),char(0),char(107),char(0),char(7),char(0),char(108),char(0),char(7),char(0),char(109),char(0),char(7),char(0),char(110),char(0),char(7),char(0),char(111),char(0),
-char(7),char(0),char(112),char(0),char(7),char(0),char(113),char(0),char(7),char(0),char(114),char(0),char(7),char(0),char(115),char(0),char(4),char(0),char(116),char(0),
+char(97),char(105),char(110),char(116),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),char(50),char(0),char(98),char(116),char(83),char(108),
+char(105),char(100),char(101),char(114),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(68),char(97),char(116),char(97),char(0),char(98),
+char(116),char(83),char(108),char(105),char(100),char(101),char(114),char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(68),char(111),char(117),
+char(98),char(108),char(101),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(71),char(101),char(97),char(114),char(67),char(111),char(110),char(115),char(116),char(114),
+char(97),char(105),char(110),char(116),char(70),char(108),char(111),char(97),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(71),char(101),char(97),char(114),
+char(67),char(111),char(110),char(115),char(116),char(114),char(97),char(105),char(110),char(116),char(68),char(111),char(117),char(98),char(108),char(101),char(68),char(97),char(116),char(97),
+char(0),char(83),char(111),char(102),char(116),char(66),char(111),char(100),char(121),char(77),char(97),char(116),char(101),char(114),char(105),char(97),char(108),char(68),char(97),char(116),
+char(97),char(0),char(83),char(111),char(102),char(116),char(66),char(111),char(100),char(121),char(78),char(111),char(100),char(101),char(68),char(97),char(116),char(97),char(0),char(83),
+char(111),char(102),char(116),char(66),char(111),char(100),char(121),char(76),char(105),char(110),char(107),char(68),char(97),char(116),char(97),char(0),char(83),char(111),char(102),char(116),
+char(66),char(111),char(100),char(121),char(70),char(97),char(99),char(101),char(68),char(97),char(116),char(97),char(0),char(83),char(111),char(102),char(116),char(66),char(111),char(100),
+char(121),char(84),char(101),char(116),char(114),char(97),char(68),char(97),char(116),char(97),char(0),char(83),char(111),char(102),char(116),char(82),char(105),char(103),char(105),char(100),
+char(65),char(110),char(99),char(104),char(111),char(114),char(68),char(97),char(116),char(97),char(0),char(83),char(111),char(102),char(116),char(66),char(111),char(100),char(121),char(67),
+char(111),char(110),char(102),char(105),char(103),char(68),char(97),char(116),char(97),char(0),char(83),char(111),char(102),char(116),char(66),char(111),char(100),char(121),char(80),char(111),
+char(115),char(101),char(68),char(97),char(116),char(97),char(0),char(83),char(111),char(102),char(116),char(66),char(111),char(100),char(121),char(67),char(108),char(117),char(115),char(116),
+char(101),char(114),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(83),char(111),char(102),char(116),char(66),char(111),char(100),char(121),char(74),char(111),char(105),
+char(110),char(116),char(68),char(97),char(116),char(97),char(0),char(98),char(116),char(83),char(111),char(102),char(116),char(66),char(111),char(100),char(121),char(70),char(108),char(111),
+char(97),char(116),char(68),char(97),char(116),char(97),char(0),char(0),char(84),char(76),char(69),char(78),char(1),char(0),char(1),char(0),char(2),char(0),char(2),char(0),
+char(4),char(0),char(4),char(0),char(4),char(0),char(4),char(0),char(8),char(0),char(0),char(0),char(16),char(0),char(48),char(0),char(16),char(0),char(16),char(0),
+char(32),char(0),char(48),char(0),char(96),char(0),char(64),char(0),char(-128),char(0),char(20),char(0),char(48),char(0),char(80),char(0),char(16),char(0),char(96),char(0),
+char(-112),char(0),char(16),char(0),char(56),char(0),char(56),char(0),char(20),char(0),char(72),char(0),char(4),char(0),char(4),char(0),char(8),char(0),char(4),char(0),
+char(56),char(0),char(32),char(0),char(80),char(0),char(72),char(0),char(96),char(0),char(80),char(0),char(32),char(0),char(64),char(0),char(64),char(0),char(64),char(0),
+char(16),char(0),char(72),char(0),char(80),char(0),char(-32),char(1),char(16),char(1),char(-72),char(0),char(-104),char(0),char(104),char(0),char(88),char(0),char(-8),char(1),
+char(-80),char(3),char(8),char(0),char(64),char(0),char(64),char(0),char(0),char(0),char(80),char(0),char(96),char(0),char(-112),char(0),char(-128),char(0),char(104),char(1),
+char(-24),char(0),char(-104),char(1),char(-120),char(1),char(-32),char(0),char(8),char(1),char(-40),char(1),char(104),char(1),char(-128),char(2),char(-40),char(0),char(120),char(1),
+char(104),char(0),char(-104),char(0),char(16),char(0),char(104),char(0),char(24),char(0),char(40),char(0),char(104),char(0),char(96),char(0),char(104),char(0),char(-56),char(0),
+char(104),char(1),char(112),char(0),char(-32),char(1),char(0),char(0),char(83),char(84),char(82),char(67),char(76),char(0),char(0),char(0),char(10),char(0),char(3),char(0),
+char(4),char(0),char(0),char(0),char(4),char(0),char(1),char(0),char(9),char(0),char(2),char(0),char(11),char(0),char(3),char(0),char(10),char(0),char(3),char(0),
+char(10),char(0),char(4),char(0),char(10),char(0),char(5),char(0),char(12),char(0),char(2),char(0),char(9),char(0),char(6),char(0),char(9),char(0),char(7),char(0),
+char(13),char(0),char(1),char(0),char(7),char(0),char(8),char(0),char(14),char(0),char(1),char(0),char(8),char(0),char(8),char(0),char(15),char(0),char(1),char(0),
+char(13),char(0),char(9),char(0),char(16),char(0),char(1),char(0),char(14),char(0),char(9),char(0),char(17),char(0),char(2),char(0),char(15),char(0),char(10),char(0),
+char(13),char(0),char(11),char(0),char(18),char(0),char(2),char(0),char(16),char(0),char(10),char(0),char(14),char(0),char(11),char(0),char(19),char(0),char(4),char(0),
+char(4),char(0),char(12),char(0),char(4),char(0),char(13),char(0),char(2),char(0),char(14),char(0),char(2),char(0),char(15),char(0),char(20),char(0),char(6),char(0),
+char(13),char(0),char(16),char(0),char(13),char(0),char(17),char(0),char(4),char(0),char(18),char(0),char(4),char(0),char(19),char(0),char(4),char(0),char(20),char(0),
+char(0),char(0),char(21),char(0),char(21),char(0),char(6),char(0),char(14),char(0),char(16),char(0),char(14),char(0),char(17),char(0),char(4),char(0),char(18),char(0),
+char(4),char(0),char(19),char(0),char(4),char(0),char(20),char(0),char(0),char(0),char(21),char(0),char(22),char(0),char(3),char(0),char(2),char(0),char(14),char(0),
+char(2),char(0),char(15),char(0),char(4),char(0),char(22),char(0),char(23),char(0),char(12),char(0),char(13),char(0),char(23),char(0),char(13),char(0),char(24),char(0),
+char(13),char(0),char(25),char(0),char(4),char(0),char(26),char(0),char(4),char(0),char(27),char(0),char(4),char(0),char(28),char(0),char(4),char(0),char(29),char(0),
+char(20),char(0),char(30),char(0),char(22),char(0),char(31),char(0),char(19),char(0),char(32),char(0),char(4),char(0),char(33),char(0),char(4),char(0),char(34),char(0),
+char(24),char(0),char(12),char(0),char(14),char(0),char(23),char(0),char(14),char(0),char(24),char(0),char(14),char(0),char(25),char(0),char(4),char(0),char(26),char(0),
+char(4),char(0),char(27),char(0),char(4),char(0),char(28),char(0),char(4),char(0),char(29),char(0),char(21),char(0),char(30),char(0),char(22),char(0),char(31),char(0),
+char(4),char(0),char(33),char(0),char(4),char(0),char(34),char(0),char(19),char(0),char(32),char(0),char(25),char(0),char(3),char(0),char(0),char(0),char(35),char(0),
+char(4),char(0),char(36),char(0),char(0),char(0),char(37),char(0),char(26),char(0),char(5),char(0),char(25),char(0),char(38),char(0),char(13),char(0),char(39),char(0),
+char(13),char(0),char(40),char(0),char(7),char(0),char(41),char(0),char(0),char(0),char(21),char(0),char(27),char(0),char(5),char(0),char(25),char(0),char(38),char(0),
+char(13),char(0),char(39),char(0),char(13),char(0),char(42),char(0),char(7),char(0),char(43),char(0),char(4),char(0),char(44),char(0),char(28),char(0),char(2),char(0),
+char(13),char(0),char(45),char(0),char(7),char(0),char(46),char(0),char(29),char(0),char(4),char(0),char(27),char(0),char(47),char(0),char(28),char(0),char(48),char(0),
+char(4),char(0),char(49),char(0),char(0),char(0),char(37),char(0),char(30),char(0),char(1),char(0),char(4),char(0),char(50),char(0),char(31),char(0),char(2),char(0),
+char(2),char(0),char(50),char(0),char(0),char(0),char(51),char(0),char(32),char(0),char(2),char(0),char(2),char(0),char(52),char(0),char(0),char(0),char(51),char(0),
+char(33),char(0),char(2),char(0),char(0),char(0),char(52),char(0),char(0),char(0),char(53),char(0),char(34),char(0),char(8),char(0),char(13),char(0),char(54),char(0),
+char(14),char(0),char(55),char(0),char(30),char(0),char(56),char(0),char(32),char(0),char(57),char(0),char(33),char(0),char(58),char(0),char(31),char(0),char(59),char(0),
+char(4),char(0),char(60),char(0),char(4),char(0),char(61),char(0),char(35),char(0),char(4),char(0),char(34),char(0),char(62),char(0),char(13),char(0),char(63),char(0),
+char(4),char(0),char(64),char(0),char(0),char(0),char(37),char(0),char(36),char(0),char(7),char(0),char(25),char(0),char(38),char(0),char(35),char(0),char(65),char(0),
+char(23),char(0),char(66),char(0),char(24),char(0),char(67),char(0),char(37),char(0),char(68),char(0),char(7),char(0),char(43),char(0),char(0),char(0),char(69),char(0),
+char(38),char(0),char(2),char(0),char(36),char(0),char(70),char(0),char(13),char(0),char(39),char(0),char(39),char(0),char(4),char(0),char(17),char(0),char(71),char(0),
+char(25),char(0),char(72),char(0),char(4),char(0),char(73),char(0),char(7),char(0),char(74),char(0),char(40),char(0),char(4),char(0),char(25),char(0),char(38),char(0),
+char(39),char(0),char(75),char(0),char(4),char(0),char(76),char(0),char(7),char(0),char(43),char(0),char(41),char(0),char(3),char(0),char(27),char(0),char(47),char(0),
+char(4),char(0),char(77),char(0),char(0),char(0),char(37),char(0),char(42),char(0),char(3),char(0),char(27),char(0),char(47),char(0),char(4),char(0),char(78),char(0),
+char(0),char(0),char(37),char(0),char(43),char(0),char(3),char(0),char(27),char(0),char(47),char(0),char(4),char(0),char(77),char(0),char(0),char(0),char(37),char(0),
+char(44),char(0),char(4),char(0),char(4),char(0),char(79),char(0),char(7),char(0),char(80),char(0),char(7),char(0),char(81),char(0),char(7),char(0),char(82),char(0),
+char(37),char(0),char(14),char(0),char(4),char(0),char(83),char(0),char(4),char(0),char(84),char(0),char(44),char(0),char(85),char(0),char(4),char(0),char(86),char(0),
+char(7),char(0),char(87),char(0),char(7),char(0),char(88),char(0),char(7),char(0),char(89),char(0),char(7),char(0),char(90),char(0),char(7),char(0),char(91),char(0),
+char(4),char(0),char(92),char(0),char(4),char(0),char(93),char(0),char(4),char(0),char(94),char(0),char(4),char(0),char(95),char(0),char(0),char(0),char(37),char(0),
+char(45),char(0),char(5),char(0),char(25),char(0),char(38),char(0),char(35),char(0),char(65),char(0),char(13),char(0),char(39),char(0),char(7),char(0),char(43),char(0),
+char(4),char(0),char(96),char(0),char(46),char(0),char(5),char(0),char(27),char(0),char(47),char(0),char(13),char(0),char(97),char(0),char(14),char(0),char(98),char(0),
+char(4),char(0),char(99),char(0),char(0),char(0),char(100),char(0),char(47),char(0),char(25),char(0),char(9),char(0),char(101),char(0),char(9),char(0),char(102),char(0),
+char(25),char(0),char(103),char(0),char(0),char(0),char(35),char(0),char(18),char(0),char(104),char(0),char(18),char(0),char(105),char(0),char(14),char(0),char(106),char(0),
+char(14),char(0),char(107),char(0),char(14),char(0),char(108),char(0),char(8),char(0),char(109),char(0),char(8),char(0),char(110),char(0),char(8),char(0),char(111),char(0),
+char(8),char(0),char(112),char(0),char(8),char(0),char(113),char(0),char(8),char(0),char(114),char(0),char(8),char(0),char(115),char(0),char(8),char(0),char(116),char(0),
char(4),char(0),char(117),char(0),char(4),char(0),char(118),char(0),char(4),char(0),char(119),char(0),char(4),char(0),char(120),char(0),char(4),char(0),char(121),char(0),
-char(4),char(0),char(122),char(0),char(0),char(0),char(37),char(0),char(48),char(0),char(2),char(0),char(49),char(0),char(123),char(0),char(14),char(0),char(124),char(0),
-char(50),char(0),char(2),char(0),char(51),char(0),char(123),char(0),char(13),char(0),char(124),char(0),char(52),char(0),char(21),char(0),char(47),char(0),char(125),char(0),
-char(15),char(0),char(126),char(0),char(13),char(0),char(127),char(0),char(13),char(0),char(-128),char(0),char(13),char(0),char(-127),char(0),char(13),char(0),char(-126),char(0),
-char(13),char(0),char(124),char(0),char(13),char(0),char(-125),char(0),char(13),char(0),char(-124),char(0),char(13),char(0),char(-123),char(0),char(13),char(0),char(-122),char(0),
-char(7),char(0),char(-121),char(0),char(7),char(0),char(-120),char(0),char(7),char(0),char(-119),char(0),char(7),char(0),char(-118),char(0),char(7),char(0),char(-117),char(0),
-char(7),char(0),char(-116),char(0),char(7),char(0),char(-115),char(0),char(7),char(0),char(-114),char(0),char(7),char(0),char(-113),char(0),char(4),char(0),char(-112),char(0),
-char(53),char(0),char(22),char(0),char(46),char(0),char(125),char(0),char(16),char(0),char(126),char(0),char(14),char(0),char(127),char(0),char(14),char(0),char(-128),char(0),
-char(14),char(0),char(-127),char(0),char(14),char(0),char(-126),char(0),char(14),char(0),char(124),char(0),char(14),char(0),char(-125),char(0),char(14),char(0),char(-124),char(0),
-char(14),char(0),char(-123),char(0),char(14),char(0),char(-122),char(0),char(8),char(0),char(-121),char(0),char(8),char(0),char(-120),char(0),char(8),char(0),char(-119),char(0),
-char(8),char(0),char(-118),char(0),char(8),char(0),char(-117),char(0),char(8),char(0),char(-116),char(0),char(8),char(0),char(-115),char(0),char(8),char(0),char(-114),char(0),
-char(8),char(0),char(-113),char(0),char(4),char(0),char(-112),char(0),char(0),char(0),char(37),char(0),char(54),char(0),char(2),char(0),char(4),char(0),char(-111),char(0),
-char(4),char(0),char(-110),char(0),char(55),char(0),char(13),char(0),char(56),char(0),char(-109),char(0),char(56),char(0),char(-108),char(0),char(0),char(0),char(35),char(0),
-char(4),char(0),char(-107),char(0),char(4),char(0),char(-106),char(0),char(4),char(0),char(-105),char(0),char(4),char(0),char(-104),char(0),char(7),char(0),char(-103),char(0),
-char(7),char(0),char(-102),char(0),char(4),char(0),char(-101),char(0),char(4),char(0),char(-100),char(0),char(7),char(0),char(-99),char(0),char(4),char(0),char(-98),char(0),
-char(57),char(0),char(3),char(0),char(55),char(0),char(-97),char(0),char(13),char(0),char(-96),char(0),char(13),char(0),char(-95),char(0),char(58),char(0),char(3),char(0),
-char(55),char(0),char(-97),char(0),char(14),char(0),char(-96),char(0),char(14),char(0),char(-95),char(0),char(59),char(0),char(13),char(0),char(55),char(0),char(-97),char(0),
-char(18),char(0),char(-94),char(0),char(18),char(0),char(-93),char(0),char(4),char(0),char(-92),char(0),char(4),char(0),char(-91),char(0),char(4),char(0),char(-90),char(0),
-char(7),char(0),char(-89),char(0),char(7),char(0),char(-88),char(0),char(7),char(0),char(-87),char(0),char(7),char(0),char(-86),char(0),char(7),char(0),char(-85),char(0),
-char(7),char(0),char(-84),char(0),char(7),char(0),char(-83),char(0),char(60),char(0),char(13),char(0),char(55),char(0),char(-97),char(0),char(17),char(0),char(-94),char(0),
-char(17),char(0),char(-93),char(0),char(4),char(0),char(-92),char(0),char(4),char(0),char(-91),char(0),char(4),char(0),char(-90),char(0),char(7),char(0),char(-89),char(0),
-char(7),char(0),char(-88),char(0),char(7),char(0),char(-87),char(0),char(7),char(0),char(-86),char(0),char(7),char(0),char(-85),char(0),char(7),char(0),char(-84),char(0),
-char(7),char(0),char(-83),char(0),char(61),char(0),char(11),char(0),char(55),char(0),char(-97),char(0),char(17),char(0),char(-94),char(0),char(17),char(0),char(-93),char(0),
-char(7),char(0),char(-82),char(0),char(7),char(0),char(-81),char(0),char(7),char(0),char(-80),char(0),char(7),char(0),char(-85),char(0),char(7),char(0),char(-84),char(0),
-char(7),char(0),char(-83),char(0),char(7),char(0),char(-79),char(0),char(0),char(0),char(21),char(0),char(62),char(0),char(9),char(0),char(55),char(0),char(-97),char(0),
-char(17),char(0),char(-94),char(0),char(17),char(0),char(-93),char(0),char(13),char(0),char(-78),char(0),char(13),char(0),char(-77),char(0),char(13),char(0),char(-76),char(0),
-char(13),char(0),char(-75),char(0),char(4),char(0),char(-74),char(0),char(4),char(0),char(-73),char(0),char(63),char(0),char(5),char(0),char(62),char(0),char(-72),char(0),
-char(4),char(0),char(-71),char(0),char(7),char(0),char(-70),char(0),char(7),char(0),char(-69),char(0),char(7),char(0),char(-68),char(0),char(64),char(0),char(9),char(0),
-char(55),char(0),char(-97),char(0),char(17),char(0),char(-94),char(0),char(17),char(0),char(-93),char(0),char(7),char(0),char(-78),char(0),char(7),char(0),char(-77),char(0),
-char(7),char(0),char(-76),char(0),char(7),char(0),char(-75),char(0),char(4),char(0),char(-74),char(0),char(4),char(0),char(-73),char(0),char(49),char(0),char(22),char(0),
-char(8),char(0),char(-67),char(0),char(8),char(0),char(-79),char(0),char(8),char(0),char(110),char(0),char(8),char(0),char(-66),char(0),char(8),char(0),char(112),char(0),
-char(8),char(0),char(-65),char(0),char(8),char(0),char(-64),char(0),char(8),char(0),char(-63),char(0),char(8),char(0),char(-62),char(0),char(8),char(0),char(-61),char(0),
-char(8),char(0),char(-60),char(0),char(8),char(0),char(-59),char(0),char(8),char(0),char(-58),char(0),char(8),char(0),char(-57),char(0),char(8),char(0),char(-56),char(0),
-char(8),char(0),char(-55),char(0),char(4),char(0),char(-54),char(0),char(4),char(0),char(-53),char(0),char(4),char(0),char(-52),char(0),char(4),char(0),char(-51),char(0),
-char(4),char(0),char(-50),char(0),char(0),char(0),char(37),char(0),char(51),char(0),char(22),char(0),char(7),char(0),char(-67),char(0),char(7),char(0),char(-79),char(0),
-char(7),char(0),char(110),char(0),char(7),char(0),char(-66),char(0),char(7),char(0),char(112),char(0),char(7),char(0),char(-65),char(0),char(7),char(0),char(-64),char(0),
-char(7),char(0),char(-63),char(0),char(7),char(0),char(-62),char(0),char(7),char(0),char(-61),char(0),char(7),char(0),char(-60),char(0),char(7),char(0),char(-59),char(0),
-char(7),char(0),char(-58),char(0),char(7),char(0),char(-57),char(0),char(7),char(0),char(-56),char(0),char(7),char(0),char(-55),char(0),char(4),char(0),char(-54),char(0),
-char(4),char(0),char(-53),char(0),char(4),char(0),char(-52),char(0),char(4),char(0),char(-51),char(0),char(4),char(0),char(-50),char(0),char(0),char(0),char(37),char(0),
-char(65),char(0),char(4),char(0),char(7),char(0),char(-49),char(0),char(7),char(0),char(-48),char(0),char(7),char(0),char(-47),char(0),char(4),char(0),char(78),char(0),
-char(66),char(0),char(10),char(0),char(65),char(0),char(-46),char(0),char(13),char(0),char(-45),char(0),char(13),char(0),char(-44),char(0),char(13),char(0),char(-43),char(0),
-char(13),char(0),char(-42),char(0),char(13),char(0),char(-41),char(0),char(7),char(0),char(-121),char(0),char(7),char(0),char(-40),char(0),char(4),char(0),char(-39),char(0),
-char(4),char(0),char(53),char(0),char(67),char(0),char(4),char(0),char(65),char(0),char(-46),char(0),char(4),char(0),char(-38),char(0),char(7),char(0),char(-37),char(0),
-char(4),char(0),char(-36),char(0),char(68),char(0),char(4),char(0),char(13),char(0),char(-41),char(0),char(65),char(0),char(-46),char(0),char(4),char(0),char(-35),char(0),
-char(7),char(0),char(-34),char(0),char(69),char(0),char(7),char(0),char(13),char(0),char(-33),char(0),char(65),char(0),char(-46),char(0),char(4),char(0),char(-32),char(0),
-char(7),char(0),char(-31),char(0),char(7),char(0),char(-30),char(0),char(7),char(0),char(-29),char(0),char(4),char(0),char(53),char(0),char(70),char(0),char(6),char(0),
-char(15),char(0),char(-28),char(0),char(13),char(0),char(-30),char(0),char(13),char(0),char(-27),char(0),char(56),char(0),char(-26),char(0),char(4),char(0),char(-25),char(0),
-char(7),char(0),char(-29),char(0),char(71),char(0),char(26),char(0),char(4),char(0),char(-24),char(0),char(7),char(0),char(-23),char(0),char(7),char(0),char(-79),char(0),
-char(7),char(0),char(-22),char(0),char(7),char(0),char(-21),char(0),char(7),char(0),char(-20),char(0),char(7),char(0),char(-19),char(0),char(7),char(0),char(-18),char(0),
-char(7),char(0),char(-17),char(0),char(7),char(0),char(-16),char(0),char(7),char(0),char(-15),char(0),char(7),char(0),char(-14),char(0),char(7),char(0),char(-13),char(0),
-char(7),char(0),char(-12),char(0),char(7),char(0),char(-11),char(0),char(7),char(0),char(-10),char(0),char(7),char(0),char(-9),char(0),char(7),char(0),char(-8),char(0),
-char(7),char(0),char(-7),char(0),char(7),char(0),char(-6),char(0),char(7),char(0),char(-5),char(0),char(4),char(0),char(-4),char(0),char(4),char(0),char(-3),char(0),
-char(4),char(0),char(-2),char(0),char(4),char(0),char(-1),char(0),char(4),char(0),char(117),char(0),char(72),char(0),char(12),char(0),char(15),char(0),char(0),char(1),
-char(15),char(0),char(1),char(1),char(15),char(0),char(2),char(1),char(13),char(0),char(3),char(1),char(13),char(0),char(4),char(1),char(7),char(0),char(5),char(1),
-char(4),char(0),char(6),char(1),char(4),char(0),char(7),char(1),char(4),char(0),char(8),char(1),char(4),char(0),char(9),char(1),char(7),char(0),char(-31),char(0),
-char(4),char(0),char(53),char(0),char(73),char(0),char(27),char(0),char(17),char(0),char(10),char(1),char(15),char(0),char(11),char(1),char(15),char(0),char(12),char(1),
-char(13),char(0),char(3),char(1),char(13),char(0),char(13),char(1),char(13),char(0),char(14),char(1),char(13),char(0),char(15),char(1),char(13),char(0),char(16),char(1),
-char(13),char(0),char(17),char(1),char(4),char(0),char(18),char(1),char(7),char(0),char(19),char(1),char(4),char(0),char(20),char(1),char(4),char(0),char(21),char(1),
-char(4),char(0),char(22),char(1),char(7),char(0),char(23),char(1),char(7),char(0),char(24),char(1),char(4),char(0),char(25),char(1),char(4),char(0),char(26),char(1),
-char(7),char(0),char(27),char(1),char(7),char(0),char(28),char(1),char(7),char(0),char(29),char(1),char(7),char(0),char(30),char(1),char(7),char(0),char(31),char(1),
-char(7),char(0),char(32),char(1),char(4),char(0),char(33),char(1),char(4),char(0),char(34),char(1),char(4),char(0),char(35),char(1),char(74),char(0),char(12),char(0),
-char(9),char(0),char(36),char(1),char(9),char(0),char(37),char(1),char(13),char(0),char(38),char(1),char(7),char(0),char(39),char(1),char(7),char(0),char(-63),char(0),
-char(7),char(0),char(40),char(1),char(4),char(0),char(41),char(1),char(13),char(0),char(42),char(1),char(4),char(0),char(43),char(1),char(4),char(0),char(44),char(1),
-char(4),char(0),char(45),char(1),char(4),char(0),char(53),char(0),char(75),char(0),char(19),char(0),char(47),char(0),char(125),char(0),char(72),char(0),char(46),char(1),
-char(65),char(0),char(47),char(1),char(66),char(0),char(48),char(1),char(67),char(0),char(49),char(1),char(68),char(0),char(50),char(1),char(69),char(0),char(51),char(1),
-char(70),char(0),char(52),char(1),char(73),char(0),char(53),char(1),char(74),char(0),char(54),char(1),char(4),char(0),char(55),char(1),char(4),char(0),char(21),char(1),
-char(4),char(0),char(56),char(1),char(4),char(0),char(57),char(1),char(4),char(0),char(58),char(1),char(4),char(0),char(59),char(1),char(4),char(0),char(60),char(1),
-char(4),char(0),char(61),char(1),char(71),char(0),char(62),char(1),};
+char(4),char(0),char(122),char(0),char(4),char(0),char(123),char(0),char(0),char(0),char(37),char(0),char(48),char(0),char(25),char(0),char(9),char(0),char(101),char(0),
+char(9),char(0),char(102),char(0),char(25),char(0),char(103),char(0),char(0),char(0),char(35),char(0),char(17),char(0),char(104),char(0),char(17),char(0),char(105),char(0),
+char(13),char(0),char(106),char(0),char(13),char(0),char(107),char(0),char(13),char(0),char(108),char(0),char(7),char(0),char(109),char(0),char(7),char(0),char(110),char(0),
+char(7),char(0),char(111),char(0),char(7),char(0),char(112),char(0),char(7),char(0),char(113),char(0),char(7),char(0),char(114),char(0),char(7),char(0),char(115),char(0),
+char(7),char(0),char(116),char(0),char(4),char(0),char(117),char(0),char(4),char(0),char(118),char(0),char(4),char(0),char(119),char(0),char(4),char(0),char(120),char(0),
+char(4),char(0),char(121),char(0),char(4),char(0),char(122),char(0),char(4),char(0),char(123),char(0),char(0),char(0),char(37),char(0),char(49),char(0),char(2),char(0),
+char(50),char(0),char(124),char(0),char(14),char(0),char(125),char(0),char(51),char(0),char(2),char(0),char(52),char(0),char(124),char(0),char(13),char(0),char(125),char(0),
+char(53),char(0),char(21),char(0),char(48),char(0),char(126),char(0),char(15),char(0),char(127),char(0),char(13),char(0),char(-128),char(0),char(13),char(0),char(-127),char(0),
+char(13),char(0),char(-126),char(0),char(13),char(0),char(-125),char(0),char(13),char(0),char(125),char(0),char(13),char(0),char(-124),char(0),char(13),char(0),char(-123),char(0),
+char(13),char(0),char(-122),char(0),char(13),char(0),char(-121),char(0),char(7),char(0),char(-120),char(0),char(7),char(0),char(-119),char(0),char(7),char(0),char(-118),char(0),
+char(7),char(0),char(-117),char(0),char(7),char(0),char(-116),char(0),char(7),char(0),char(-115),char(0),char(7),char(0),char(-114),char(0),char(7),char(0),char(-113),char(0),
+char(7),char(0),char(-112),char(0),char(4),char(0),char(-111),char(0),char(54),char(0),char(22),char(0),char(47),char(0),char(126),char(0),char(16),char(0),char(127),char(0),
+char(14),char(0),char(-128),char(0),char(14),char(0),char(-127),char(0),char(14),char(0),char(-126),char(0),char(14),char(0),char(-125),char(0),char(14),char(0),char(125),char(0),
+char(14),char(0),char(-124),char(0),char(14),char(0),char(-123),char(0),char(14),char(0),char(-122),char(0),char(14),char(0),char(-121),char(0),char(8),char(0),char(-120),char(0),
+char(8),char(0),char(-119),char(0),char(8),char(0),char(-118),char(0),char(8),char(0),char(-117),char(0),char(8),char(0),char(-116),char(0),char(8),char(0),char(-115),char(0),
+char(8),char(0),char(-114),char(0),char(8),char(0),char(-113),char(0),char(8),char(0),char(-112),char(0),char(4),char(0),char(-111),char(0),char(0),char(0),char(37),char(0),
+char(55),char(0),char(2),char(0),char(4),char(0),char(-110),char(0),char(4),char(0),char(-109),char(0),char(56),char(0),char(13),char(0),char(53),char(0),char(-108),char(0),
+char(53),char(0),char(-107),char(0),char(0),char(0),char(35),char(0),char(4),char(0),char(-106),char(0),char(4),char(0),char(-105),char(0),char(4),char(0),char(-104),char(0),
+char(4),char(0),char(-103),char(0),char(7),char(0),char(-102),char(0),char(7),char(0),char(-101),char(0),char(4),char(0),char(-100),char(0),char(4),char(0),char(-99),char(0),
+char(7),char(0),char(-98),char(0),char(4),char(0),char(-97),char(0),char(57),char(0),char(13),char(0),char(58),char(0),char(-108),char(0),char(58),char(0),char(-107),char(0),
+char(0),char(0),char(35),char(0),char(4),char(0),char(-106),char(0),char(4),char(0),char(-105),char(0),char(4),char(0),char(-104),char(0),char(4),char(0),char(-103),char(0),
+char(7),char(0),char(-102),char(0),char(7),char(0),char(-101),char(0),char(4),char(0),char(-100),char(0),char(4),char(0),char(-99),char(0),char(7),char(0),char(-98),char(0),
+char(4),char(0),char(-97),char(0),char(59),char(0),char(14),char(0),char(54),char(0),char(-108),char(0),char(54),char(0),char(-107),char(0),char(0),char(0),char(35),char(0),
+char(4),char(0),char(-106),char(0),char(4),char(0),char(-105),char(0),char(4),char(0),char(-104),char(0),char(4),char(0),char(-103),char(0),char(8),char(0),char(-102),char(0),
+char(8),char(0),char(-101),char(0),char(4),char(0),char(-100),char(0),char(4),char(0),char(-99),char(0),char(8),char(0),char(-98),char(0),char(4),char(0),char(-97),char(0),
+char(0),char(0),char(-96),char(0),char(60),char(0),char(3),char(0),char(57),char(0),char(-95),char(0),char(13),char(0),char(-94),char(0),char(13),char(0),char(-93),char(0),
+char(61),char(0),char(3),char(0),char(59),char(0),char(-95),char(0),char(14),char(0),char(-94),char(0),char(14),char(0),char(-93),char(0),char(62),char(0),char(3),char(0),
+char(57),char(0),char(-95),char(0),char(14),char(0),char(-94),char(0),char(14),char(0),char(-93),char(0),char(63),char(0),char(13),char(0),char(57),char(0),char(-95),char(0),
+char(18),char(0),char(-92),char(0),char(18),char(0),char(-91),char(0),char(4),char(0),char(-90),char(0),char(4),char(0),char(-89),char(0),char(4),char(0),char(-88),char(0),
+char(7),char(0),char(-87),char(0),char(7),char(0),char(-86),char(0),char(7),char(0),char(-85),char(0),char(7),char(0),char(-84),char(0),char(7),char(0),char(-83),char(0),
+char(7),char(0),char(-82),char(0),char(7),char(0),char(-81),char(0),char(64),char(0),char(13),char(0),char(57),char(0),char(-95),char(0),char(17),char(0),char(-92),char(0),
+char(17),char(0),char(-91),char(0),char(4),char(0),char(-90),char(0),char(4),char(0),char(-89),char(0),char(4),char(0),char(-88),char(0),char(7),char(0),char(-87),char(0),
+char(7),char(0),char(-86),char(0),char(7),char(0),char(-85),char(0),char(7),char(0),char(-84),char(0),char(7),char(0),char(-83),char(0),char(7),char(0),char(-82),char(0),
+char(7),char(0),char(-81),char(0),char(65),char(0),char(14),char(0),char(59),char(0),char(-95),char(0),char(18),char(0),char(-92),char(0),char(18),char(0),char(-91),char(0),
+char(4),char(0),char(-90),char(0),char(4),char(0),char(-89),char(0),char(4),char(0),char(-88),char(0),char(8),char(0),char(-87),char(0),char(8),char(0),char(-86),char(0),
+char(8),char(0),char(-85),char(0),char(8),char(0),char(-84),char(0),char(8),char(0),char(-83),char(0),char(8),char(0),char(-82),char(0),char(8),char(0),char(-81),char(0),
+char(0),char(0),char(-80),char(0),char(66),char(0),char(10),char(0),char(59),char(0),char(-95),char(0),char(18),char(0),char(-92),char(0),char(18),char(0),char(-91),char(0),
+char(8),char(0),char(-79),char(0),char(8),char(0),char(-78),char(0),char(8),char(0),char(-77),char(0),char(8),char(0),char(-83),char(0),char(8),char(0),char(-82),char(0),
+char(8),char(0),char(-81),char(0),char(8),char(0),char(-76),char(0),char(67),char(0),char(11),char(0),char(57),char(0),char(-95),char(0),char(17),char(0),char(-92),char(0),
+char(17),char(0),char(-91),char(0),char(7),char(0),char(-79),char(0),char(7),char(0),char(-78),char(0),char(7),char(0),char(-77),char(0),char(7),char(0),char(-83),char(0),
+char(7),char(0),char(-82),char(0),char(7),char(0),char(-81),char(0),char(7),char(0),char(-76),char(0),char(0),char(0),char(21),char(0),char(68),char(0),char(9),char(0),
+char(57),char(0),char(-95),char(0),char(17),char(0),char(-92),char(0),char(17),char(0),char(-91),char(0),char(13),char(0),char(-75),char(0),char(13),char(0),char(-74),char(0),
+char(13),char(0),char(-73),char(0),char(13),char(0),char(-72),char(0),char(4),char(0),char(-71),char(0),char(4),char(0),char(-70),char(0),char(69),char(0),char(9),char(0),
+char(59),char(0),char(-95),char(0),char(18),char(0),char(-92),char(0),char(18),char(0),char(-91),char(0),char(14),char(0),char(-75),char(0),char(14),char(0),char(-74),char(0),
+char(14),char(0),char(-73),char(0),char(14),char(0),char(-72),char(0),char(4),char(0),char(-71),char(0),char(4),char(0),char(-70),char(0),char(70),char(0),char(5),char(0),
+char(68),char(0),char(-69),char(0),char(4),char(0),char(-68),char(0),char(7),char(0),char(-67),char(0),char(7),char(0),char(-66),char(0),char(7),char(0),char(-65),char(0),
+char(71),char(0),char(5),char(0),char(69),char(0),char(-69),char(0),char(4),char(0),char(-68),char(0),char(8),char(0),char(-67),char(0),char(8),char(0),char(-66),char(0),
+char(8),char(0),char(-65),char(0),char(72),char(0),char(9),char(0),char(57),char(0),char(-95),char(0),char(17),char(0),char(-92),char(0),char(17),char(0),char(-91),char(0),
+char(7),char(0),char(-75),char(0),char(7),char(0),char(-74),char(0),char(7),char(0),char(-73),char(0),char(7),char(0),char(-72),char(0),char(4),char(0),char(-71),char(0),
+char(4),char(0),char(-70),char(0),char(73),char(0),char(9),char(0),char(59),char(0),char(-95),char(0),char(18),char(0),char(-92),char(0),char(18),char(0),char(-91),char(0),
+char(8),char(0),char(-75),char(0),char(8),char(0),char(-74),char(0),char(8),char(0),char(-73),char(0),char(8),char(0),char(-72),char(0),char(4),char(0),char(-71),char(0),
+char(4),char(0),char(-70),char(0),char(74),char(0),char(5),char(0),char(56),char(0),char(-95),char(0),char(13),char(0),char(-64),char(0),char(13),char(0),char(-63),char(0),
+char(7),char(0),char(-62),char(0),char(0),char(0),char(37),char(0),char(75),char(0),char(4),char(0),char(59),char(0),char(-95),char(0),char(14),char(0),char(-64),char(0),
+char(14),char(0),char(-63),char(0),char(8),char(0),char(-62),char(0),char(50),char(0),char(22),char(0),char(8),char(0),char(-61),char(0),char(8),char(0),char(-76),char(0),
+char(8),char(0),char(111),char(0),char(8),char(0),char(-60),char(0),char(8),char(0),char(113),char(0),char(8),char(0),char(-59),char(0),char(8),char(0),char(-58),char(0),
+char(8),char(0),char(-57),char(0),char(8),char(0),char(-56),char(0),char(8),char(0),char(-55),char(0),char(8),char(0),char(-54),char(0),char(8),char(0),char(-53),char(0),
+char(8),char(0),char(-52),char(0),char(8),char(0),char(-51),char(0),char(8),char(0),char(-50),char(0),char(8),char(0),char(-49),char(0),char(4),char(0),char(-48),char(0),
+char(4),char(0),char(-47),char(0),char(4),char(0),char(-46),char(0),char(4),char(0),char(-45),char(0),char(4),char(0),char(-44),char(0),char(0),char(0),char(37),char(0),
+char(52),char(0),char(22),char(0),char(7),char(0),char(-61),char(0),char(7),char(0),char(-76),char(0),char(7),char(0),char(111),char(0),char(7),char(0),char(-60),char(0),
+char(7),char(0),char(113),char(0),char(7),char(0),char(-59),char(0),char(7),char(0),char(-58),char(0),char(7),char(0),char(-57),char(0),char(7),char(0),char(-56),char(0),
+char(7),char(0),char(-55),char(0),char(7),char(0),char(-54),char(0),char(7),char(0),char(-53),char(0),char(7),char(0),char(-52),char(0),char(7),char(0),char(-51),char(0),
+char(7),char(0),char(-50),char(0),char(7),char(0),char(-49),char(0),char(4),char(0),char(-48),char(0),char(4),char(0),char(-47),char(0),char(4),char(0),char(-46),char(0),
+char(4),char(0),char(-45),char(0),char(4),char(0),char(-44),char(0),char(0),char(0),char(37),char(0),char(76),char(0),char(4),char(0),char(7),char(0),char(-43),char(0),
+char(7),char(0),char(-42),char(0),char(7),char(0),char(-41),char(0),char(4),char(0),char(79),char(0),char(77),char(0),char(10),char(0),char(76),char(0),char(-40),char(0),
+char(13),char(0),char(-39),char(0),char(13),char(0),char(-38),char(0),char(13),char(0),char(-37),char(0),char(13),char(0),char(-36),char(0),char(13),char(0),char(-35),char(0),
+char(7),char(0),char(-120),char(0),char(7),char(0),char(-34),char(0),char(4),char(0),char(-33),char(0),char(4),char(0),char(53),char(0),char(78),char(0),char(4),char(0),
+char(76),char(0),char(-40),char(0),char(4),char(0),char(-32),char(0),char(7),char(0),char(-31),char(0),char(4),char(0),char(-30),char(0),char(79),char(0),char(4),char(0),
+char(13),char(0),char(-35),char(0),char(76),char(0),char(-40),char(0),char(4),char(0),char(-29),char(0),char(7),char(0),char(-28),char(0),char(80),char(0),char(7),char(0),
+char(13),char(0),char(-27),char(0),char(76),char(0),char(-40),char(0),char(4),char(0),char(-26),char(0),char(7),char(0),char(-25),char(0),char(7),char(0),char(-24),char(0),
+char(7),char(0),char(-23),char(0),char(4),char(0),char(53),char(0),char(81),char(0),char(6),char(0),char(15),char(0),char(-22),char(0),char(13),char(0),char(-24),char(0),
+char(13),char(0),char(-21),char(0),char(58),char(0),char(-20),char(0),char(4),char(0),char(-19),char(0),char(7),char(0),char(-23),char(0),char(82),char(0),char(26),char(0),
+char(4),char(0),char(-18),char(0),char(7),char(0),char(-17),char(0),char(7),char(0),char(-76),char(0),char(7),char(0),char(-16),char(0),char(7),char(0),char(-15),char(0),
+char(7),char(0),char(-14),char(0),char(7),char(0),char(-13),char(0),char(7),char(0),char(-12),char(0),char(7),char(0),char(-11),char(0),char(7),char(0),char(-10),char(0),
+char(7),char(0),char(-9),char(0),char(7),char(0),char(-8),char(0),char(7),char(0),char(-7),char(0),char(7),char(0),char(-6),char(0),char(7),char(0),char(-5),char(0),
+char(7),char(0),char(-4),char(0),char(7),char(0),char(-3),char(0),char(7),char(0),char(-2),char(0),char(7),char(0),char(-1),char(0),char(7),char(0),char(0),char(1),
+char(7),char(0),char(1),char(1),char(4),char(0),char(2),char(1),char(4),char(0),char(3),char(1),char(4),char(0),char(4),char(1),char(4),char(0),char(5),char(1),
+char(4),char(0),char(118),char(0),char(83),char(0),char(12),char(0),char(15),char(0),char(6),char(1),char(15),char(0),char(7),char(1),char(15),char(0),char(8),char(1),
+char(13),char(0),char(9),char(1),char(13),char(0),char(10),char(1),char(7),char(0),char(11),char(1),char(4),char(0),char(12),char(1),char(4),char(0),char(13),char(1),
+char(4),char(0),char(14),char(1),char(4),char(0),char(15),char(1),char(7),char(0),char(-25),char(0),char(4),char(0),char(53),char(0),char(84),char(0),char(27),char(0),
+char(17),char(0),char(16),char(1),char(15),char(0),char(17),char(1),char(15),char(0),char(18),char(1),char(13),char(0),char(9),char(1),char(13),char(0),char(19),char(1),
+char(13),char(0),char(20),char(1),char(13),char(0),char(21),char(1),char(13),char(0),char(22),char(1),char(13),char(0),char(23),char(1),char(4),char(0),char(24),char(1),
+char(7),char(0),char(25),char(1),char(4),char(0),char(26),char(1),char(4),char(0),char(27),char(1),char(4),char(0),char(28),char(1),char(7),char(0),char(29),char(1),
+char(7),char(0),char(30),char(1),char(4),char(0),char(31),char(1),char(4),char(0),char(32),char(1),char(7),char(0),char(33),char(1),char(7),char(0),char(34),char(1),
+char(7),char(0),char(35),char(1),char(7),char(0),char(36),char(1),char(7),char(0),char(37),char(1),char(7),char(0),char(38),char(1),char(4),char(0),char(39),char(1),
+char(4),char(0),char(40),char(1),char(4),char(0),char(41),char(1),char(85),char(0),char(12),char(0),char(9),char(0),char(42),char(1),char(9),char(0),char(43),char(1),
+char(13),char(0),char(44),char(1),char(7),char(0),char(45),char(1),char(7),char(0),char(-57),char(0),char(7),char(0),char(46),char(1),char(4),char(0),char(47),char(1),
+char(13),char(0),char(48),char(1),char(4),char(0),char(49),char(1),char(4),char(0),char(50),char(1),char(4),char(0),char(51),char(1),char(4),char(0),char(53),char(0),
+char(86),char(0),char(19),char(0),char(48),char(0),char(126),char(0),char(83),char(0),char(52),char(1),char(76),char(0),char(53),char(1),char(77),char(0),char(54),char(1),
+char(78),char(0),char(55),char(1),char(79),char(0),char(56),char(1),char(80),char(0),char(57),char(1),char(81),char(0),char(58),char(1),char(84),char(0),char(59),char(1),
+char(85),char(0),char(60),char(1),char(4),char(0),char(61),char(1),char(4),char(0),char(27),char(1),char(4),char(0),char(62),char(1),char(4),char(0),char(63),char(1),
+char(4),char(0),char(64),char(1),char(4),char(0),char(65),char(1),char(4),char(0),char(66),char(1),char(4),char(0),char(67),char(1),char(82),char(0),char(68),char(1),
+};
int sBulletDNAlen64= sizeof(sBulletDNAstr64);
diff --git a/extern/bullet2/src/LinearMath/btSerializer.h b/extern/bullet2/src/LinearMath/btSerializer.h
index c5bc96b7839..ff1dc574c5d 100644
--- a/extern/bullet2/src/LinearMath/btSerializer.h
+++ b/extern/bullet2/src/LinearMath/btSerializer.h
@@ -17,7 +17,6 @@ subject to the following restrictions:
#define BT_SERIALIZER_H
#include "btScalar.h" // has definitions like SIMD_FORCE_INLINE
-#include "btStackAlloc.h"
#include "btHashMap.h"
#if !defined( __CELLOS_LV2__) && !defined(__MWERKS__)
@@ -439,7 +438,7 @@ public:
buffer[9] = '2';
buffer[10] = '8';
- buffer[11] = '1';
+ buffer[11] = '2';
}
diff --git a/extern/bullet2/src/LinearMath/btVector3.cpp b/extern/bullet2/src/LinearMath/btVector3.cpp
index bcb18704b93..a84f7baee2e 100644
--- a/extern/bullet2/src/LinearMath/btVector3.cpp
+++ b/extern/bullet2/src/LinearMath/btVector3.cpp
@@ -51,7 +51,7 @@ long _maxdot_large( const float *vv, const float *vec, unsigned long count, floa
long _maxdot_large( const float *vv, const float *vec, unsigned long count, float *dotResult )
{
const float4 *vertices = (const float4*) vv;
- static const unsigned char indexTable[16] = {-1, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0 };
+ static const unsigned char indexTable[16] = {(unsigned char)-1, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0 };
float4 dotMax = btAssign128( -BT_INFINITY, -BT_INFINITY, -BT_INFINITY, -BT_INFINITY );
float4 vvec = _mm_loadu_ps( vec );
float4 vHi = btCastiTo128f(_mm_shuffle_epi32( btCastfTo128i( vvec), 0xaa )); /// zzzz
@@ -436,7 +436,7 @@ long _mindot_large( const float *vv, const float *vec, unsigned long count, floa
long _mindot_large( const float *vv, const float *vec, unsigned long count, float *dotResult )
{
const float4 *vertices = (const float4*) vv;
- static const unsigned char indexTable[16] = {-1, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0 };
+ static const unsigned char indexTable[16] = {(unsigned char)-1, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0 };
float4 dotmin = btAssign128( BT_INFINITY, BT_INFINITY, BT_INFINITY, BT_INFINITY );
float4 vvec = _mm_loadu_ps( vec );
float4 vHi = btCastiTo128f(_mm_shuffle_epi32( btCastfTo128i( vvec), 0xaa )); /// zzzz
@@ -823,7 +823,8 @@ long _mindot_large( const float *vv, const float *vec, unsigned long count, floa
#elif defined BT_USE_NEON
#define ARM_NEON_GCC_COMPATIBILITY 1
#include <arm_neon.h>
-
+#include <sys/types.h>
+#include <sys/sysctl.h> //for sysctlbyname
static long _maxdot_large_v0( const float *vv, const float *vec, unsigned long count, float *dotResult );
static long _maxdot_large_v1( const float *vv, const float *vec, unsigned long count, float *dotResult );
@@ -835,11 +836,34 @@ static long _mindot_large_sel( const float *vv, const float *vec, unsigned long
long (*_maxdot_large)( const float *vv, const float *vec, unsigned long count, float *dotResult ) = _maxdot_large_sel;
long (*_mindot_large)( const float *vv, const float *vec, unsigned long count, float *dotResult ) = _mindot_large_sel;
-extern "C" {int _get_cpu_capabilities( void );}
+
+static inline uint32_t btGetCpuCapabilities( void )
+{
+ static uint32_t capabilities = 0;
+ static bool testedCapabilities = false;
+
+ if( 0 == testedCapabilities)
+ {
+ uint32_t hasFeature = 0;
+ size_t featureSize = sizeof( hasFeature );
+ int err = sysctlbyname( "hw.optional.neon_hpfp", &hasFeature, &featureSize, NULL, 0 );
+
+ if( 0 == err && hasFeature)
+ capabilities |= 0x2000;
+
+ testedCapabilities = true;
+ }
+
+ return capabilities;
+}
+
+
+
static long _maxdot_large_sel( const float *vv, const float *vec, unsigned long count, float *dotResult )
{
- if( _get_cpu_capabilities() & 0x2000 )
+
+ if( btGetCpuCapabilities() & 0x2000 )
_maxdot_large = _maxdot_large_v1;
else
_maxdot_large = _maxdot_large_v0;
@@ -849,7 +873,8 @@ static long _maxdot_large_sel( const float *vv, const float *vec, unsigned long
static long _mindot_large_sel( const float *vv, const float *vec, unsigned long count, float *dotResult )
{
- if( _get_cpu_capabilities() & 0x2000 )
+
+ if( btGetCpuCapabilities() & 0x2000 )
_mindot_large = _mindot_large_v1;
else
_mindot_large = _mindot_large_v0;
@@ -872,8 +897,8 @@ long _maxdot_large_v0( const float *vv, const float *vec, unsigned long count, f
float32x2_t dotMaxHi = (float32x2_t) { -BT_INFINITY, -BT_INFINITY };
uint32x2_t indexLo = (uint32x2_t) {0, 1};
uint32x2_t indexHi = (uint32x2_t) {2, 3};
- uint32x2_t iLo = (uint32x2_t) {-1, -1};
- uint32x2_t iHi = (uint32x2_t) {-1, -1};
+ uint32x2_t iLo = (uint32x2_t) {static_cast<uint32_t>(-1), static_cast<uint32_t>(-1)};
+ uint32x2_t iHi = (uint32x2_t) {static_cast<uint32_t>(-1), static_cast<uint32_t>(-1)};
const uint32x2_t four = (uint32x2_t) {4,4};
for( ; i+8 <= count; i+= 8 )
@@ -1059,7 +1084,7 @@ long _maxdot_large_v1( const float *vv, const float *vec, unsigned long count, f
float32x4_t vHi = vdupq_lane_f32(vget_high_f32(vvec), 0);
const uint32x4_t four = (uint32x4_t){ 4, 4, 4, 4 };
uint32x4_t local_index = (uint32x4_t) {0, 1, 2, 3};
- uint32x4_t index = (uint32x4_t) { -1, -1, -1, -1 };
+ uint32x4_t index = (uint32x4_t) { static_cast<uint32_t>(-1), static_cast<uint32_t>(-1), static_cast<uint32_t>(-1), static_cast<uint32_t>(-1) };
float32x4_t maxDot = (float32x4_t) { -BT_INFINITY, -BT_INFINITY, -BT_INFINITY, -BT_INFINITY };
unsigned long i = 0;
@@ -1257,8 +1282,8 @@ long _mindot_large_v0( const float *vv, const float *vec, unsigned long count, f
float32x2_t dotMinHi = (float32x2_t) { BT_INFINITY, BT_INFINITY };
uint32x2_t indexLo = (uint32x2_t) {0, 1};
uint32x2_t indexHi = (uint32x2_t) {2, 3};
- uint32x2_t iLo = (uint32x2_t) {-1, -1};
- uint32x2_t iHi = (uint32x2_t) {-1, -1};
+ uint32x2_t iLo = (uint32x2_t) {static_cast<uint32_t>(-1), static_cast<uint32_t>(-1)};
+ uint32x2_t iHi = (uint32x2_t) {static_cast<uint32_t>(-1), static_cast<uint32_t>(-1)};
const uint32x2_t four = (uint32x2_t) {4,4};
for( ; i+8 <= count; i+= 8 )
@@ -1442,7 +1467,7 @@ long _mindot_large_v1( const float *vv, const float *vec, unsigned long count, f
float32x4_t vHi = vdupq_lane_f32(vget_high_f32(vvec), 0);
const uint32x4_t four = (uint32x4_t){ 4, 4, 4, 4 };
uint32x4_t local_index = (uint32x4_t) {0, 1, 2, 3};
- uint32x4_t index = (uint32x4_t) { -1, -1, -1, -1 };
+ uint32x4_t index = (uint32x4_t) { static_cast<uint32_t>(-1), static_cast<uint32_t>(-1), static_cast<uint32_t>(-1), static_cast<uint32_t>(-1) };
float32x4_t minDot = (float32x4_t) { BT_INFINITY, BT_INFINITY, BT_INFINITY, BT_INFINITY };
unsigned long i = 0;
diff --git a/extern/bullet2/src/LinearMath/btVector3.h b/extern/bullet2/src/LinearMath/btVector3.h
index 1cf65358803..89685929288 100644
--- a/extern/bullet2/src/LinearMath/btVector3.h
+++ b/extern/bullet2/src/LinearMath/btVector3.h
@@ -53,19 +53,24 @@ subject to the following restrictions:
#define btvxyzMaskf btvFFF0fMask
#define btvAbsfMask btCastiTo128f(btvAbsMask)
+//there is an issue with XCode 3.2 (LCx errors)
+#define btvMzeroMask (_mm_set_ps(-0.0f, -0.0f, -0.0f, -0.0f))
+#define v1110 (_mm_set_ps(0.0f, 1.0f, 1.0f, 1.0f))
+#define vHalf (_mm_set_ps(0.5f, 0.5f, 0.5f, 0.5f))
+#define v1_5 (_mm_set_ps(1.5f, 1.5f, 1.5f, 1.5f))
-
-const __m128 ATTRIBUTE_ALIGNED16(btvMzeroMask) = {-0.0f, -0.0f, -0.0f, -0.0f};
-const __m128 ATTRIBUTE_ALIGNED16(v1110) = {1.0f, 1.0f, 1.0f, 0.0f};
-const __m128 ATTRIBUTE_ALIGNED16(vHalf) = {0.5f, 0.5f, 0.5f, 0.5f};
-const __m128 ATTRIBUTE_ALIGNED16(v1_5) = {1.5f, 1.5f, 1.5f, 1.5f};
+//const __m128 ATTRIBUTE_ALIGNED16(btvMzeroMask) = {-0.0f, -0.0f, -0.0f, -0.0f};
+//const __m128 ATTRIBUTE_ALIGNED16(v1110) = {1.0f, 1.0f, 1.0f, 0.0f};
+//const __m128 ATTRIBUTE_ALIGNED16(vHalf) = {0.5f, 0.5f, 0.5f, 0.5f};
+//const __m128 ATTRIBUTE_ALIGNED16(v1_5) = {1.5f, 1.5f, 1.5f, 1.5f};
#endif
#ifdef BT_USE_NEON
const float32x4_t ATTRIBUTE_ALIGNED16(btvMzeroMask) = (float32x4_t){-0.0f, -0.0f, -0.0f, -0.0f};
-const int32x4_t ATTRIBUTE_ALIGNED16(btvFFF0Mask) = (int32x4_t){0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x0};
+const int32x4_t ATTRIBUTE_ALIGNED16(btvFFF0Mask) = (int32x4_t){static_cast<int32_t>(0xFFFFFFFF),
+ static_cast<int32_t>(0xFFFFFFFF), static_cast<int32_t>(0xFFFFFFFF), 0x0};
const int32x4_t ATTRIBUTE_ALIGNED16(btvAbsMask) = (int32x4_t){0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF};
const int32x4_t ATTRIBUTE_ALIGNED16(btv3AbsMask) = (int32x4_t){0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF, 0x0};
@@ -260,6 +265,12 @@ public:
return btSqrt(length2());
}
+ /**@brief Return the norm (length) of the vector */
+ SIMD_FORCE_INLINE btScalar norm() const
+ {
+ return length();
+ }
+
/**@brief Return the distance squared between the ends of this and another vector
* This is symantically treating the vector like a point */
SIMD_FORCE_INLINE btScalar distance2(const btVector3& v) const;
@@ -285,6 +296,9 @@ public:
* x^2 + y^2 + z^2 = 1 */
SIMD_FORCE_INLINE btVector3& normalize()
{
+
+ btAssert(length() != btScalar(0));
+
#if defined(BT_USE_SSE_IN_API) && defined (BT_USE_SSE)
// dot product first
__m128 vd = _mm_mul_ps(mVec128, mVec128);
@@ -718,7 +732,7 @@ public:
return btVector3(r);
#elif defined(BT_USE_NEON)
- static const uint32x4_t xyzMask = (const uint32x4_t){ -1, -1, -1, 0 };
+ static const uint32x4_t xyzMask = (const uint32x4_t){ static_cast<uint32_t>(-1), static_cast<uint32_t>(-1), static_cast<uint32_t>(-1), 0 };
float32x4_t a0 = vmulq_f32( v0.mVec128, this->mVec128);
float32x4_t a1 = vmulq_f32( v1.mVec128, this->mVec128);
float32x4_t a2 = vmulq_f32( v2.mVec128, this->mVec128);
@@ -936,13 +950,9 @@ SIMD_FORCE_INLINE btScalar btVector3::distance(const btVector3& v) const
SIMD_FORCE_INLINE btVector3 btVector3::normalized() const
{
-#if defined(BT_USE_SSE_IN_API) && defined (BT_USE_SSE)
btVector3 norm = *this;
return norm.normalize();
-#else
- return *this / length();
-#endif
}
SIMD_FORCE_INLINE btVector3 btVector3::rotate( const btVector3& wAxis, const btScalar _angle ) const
diff --git a/extern/bullet2/src/SConscript b/extern/bullet2/src/SConscript
index 3ffff9c80fc..ff2e86affb4 100644
--- a/extern/bullet2/src/SConscript
+++ b/extern/bullet2/src/SConscript
@@ -31,6 +31,8 @@ bullet2_src += env.Glob("BulletDynamics/Vehicle/*.cpp")
bullet2_src += env.Glob("BulletDynamics/ConstraintSolver/*.cpp")
bullet2_src += env.Glob("BulletDynamics/Dynamics/*.cpp")
bullet2_src += env.Glob("BulletDynamics/Character/*.cpp")
+bullet2_src += env.Glob("BulletDynamics/Featherstone/*.cpp")
+bullet2_src += env.Glob("BulletDynamics/MLCPSolvers/*.cpp")
bullet2_src += env.Glob("BulletSoftBody/*.cpp")
incs = '. BulletCollision BulletDynamics LinearMath BulletSoftBody'
diff --git a/extern/bullet2/src/btBulletDynamicsCommon.h b/extern/bullet2/src/btBulletDynamicsCommon.h
index dbd175c3fe6..50282bf2105 100644
--- a/extern/bullet2/src/btBulletDynamicsCommon.h
+++ b/extern/bullet2/src/btBulletDynamicsCommon.h
@@ -33,6 +33,8 @@ subject to the following restrictions:
#include "BulletDynamics/ConstraintSolver/btUniversalConstraint.h"
#include "BulletDynamics/ConstraintSolver/btHinge2Constraint.h"
#include "BulletDynamics/ConstraintSolver/btGearConstraint.h"
+#include "BulletDynamics/ConstraintSolver/btFixedConstraint.h"
+
#include "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h"
diff --git a/extern/libmv/CMakeLists.txt b/extern/libmv/CMakeLists.txt
index 2c9a21965f0..80a212b64f8 100644
--- a/extern/libmv/CMakeLists.txt
+++ b/extern/libmv/CMakeLists.txt
@@ -32,15 +32,19 @@ set(INC
set(SRC
libmv-capi.h
+ libmv-capi_intern.h
)
if(WITH_LIBMV)
add_definitions(
-DWITH_LIBMV
+ -DWITH_LIBMV_GUARDED_ALLOC
+ -DGOOGLE_GLOG_DLL_DECL=
)
list(APPEND INC
third_party/ceres/include
+ ../../intern/guardedalloc
)
set(INC_SYS
@@ -224,10 +228,6 @@ if(WITH_LIBMV)
third_party/glog/src
)
endif()
-
- add_definitions(
- -DGOOGLE_GLOG_DLL_DECL=
- )
else()
list(APPEND SRC
libmv-capi_stub.cc
diff --git a/extern/libmv/SConscript b/extern/libmv/SConscript
index f422eb08c58..6926b36f335 100644
--- a/extern/libmv/SConscript
+++ b/extern/libmv/SConscript
@@ -15,6 +15,7 @@ incs = '.'
if env['WITH_BF_LIBMV']:
defs.append('GOOGLE_GLOG_DLL_DECL=')
defs.append('WITH_LIBMV')
+ defs.append('WITH_LIBMV_GUARDED_ALLOC')
src = env.Glob("libmv-capi.cc")
src += env.Glob('libmv/image/*.cc')
@@ -25,7 +26,7 @@ if env['WITH_BF_LIBMV']:
src += env.Glob('third_party/fast/*.c')
src += env.Glob('third_party/gflags/*.cc')
- incs += ' ../Eigen3 third_party/ceres/include'
+ incs += ' ../Eigen3 third_party/ceres/include ../../intern/guardedalloc'
incs += ' ' + env['BF_PNG_INC']
incs += ' ' + env['BF_ZLIB_INC']
diff --git a/extern/libmv/bundle.sh b/extern/libmv/bundle.sh
index 16fb754d30a..57e3598a5ae 100755
--- a/extern/libmv/bundle.sh
+++ b/extern/libmv/bundle.sh
@@ -128,15 +128,19 @@ set(INC
set(SRC
libmv-capi.h
+ libmv-capi_intern.h
)
if(WITH_LIBMV)
add_definitions(
-DWITH_LIBMV
+ -DWITH_LIBMV_GUARDED_ALLOC
+ -DGOOGLE_GLOG_DLL_DECL=
)
list(APPEND INC
third_party/ceres/include
+ ../../intern/guardedalloc
)
set(INC_SYS
@@ -203,10 +207,6 @@ ${third_glog_headers}
third_party/glog/src
)
endif()
-
- add_definitions(
- -DGOOGLE_GLOG_DLL_DECL=
- )
else()
list(APPEND SRC
libmv-capi_stub.cc
@@ -238,11 +238,12 @@ incs = '.'
if env['WITH_BF_LIBMV']:
defs.append('GOOGLE_GLOG_DLL_DECL=')
defs.append('WITH_LIBMV')
+ defs.append('WITH_LIBMV_GUARDED_ALLOC')
src = env.Glob("libmv-capi.cc")
$src
- incs += ' ../Eigen3 third_party/ceres/include'
+ incs += ' ../Eigen3 third_party/ceres/include ../../intern/guardedalloc'
incs += ' ' + env['BF_PNG_INC']
incs += ' ' + env['BF_ZLIB_INC']
diff --git a/extern/libmv/libmv-capi.cc b/extern/libmv/libmv-capi.cc
index eb574eadcef..d3559cb0e73 100644
--- a/extern/libmv/libmv-capi.cc
+++ b/extern/libmv/libmv-capi.cc
@@ -43,10 +43,10 @@
# include <png.h>
#endif
+#include "libmv-capi_intern.h"
#include "libmv/logging/logging.h"
-
+#include "libmv/multiview/homography.h"
#include "libmv/tracking/track_region.h"
-
#include "libmv/simple_pipeline/callbacks.h"
#include "libmv/simple_pipeline/tracks.h"
#include "libmv/simple_pipeline/initialize_reconstruction.h"
@@ -58,12 +58,6 @@
#include "libmv/simple_pipeline/reconstruction_scale.h"
#include "libmv/simple_pipeline/keyframe_selection.h"
-#include "libmv/multiview/homography.h"
-
-#ifdef _MSC_VER
-# define snprintf _snprintf
-#endif
-
struct libmv_Reconstruction {
libmv::EuclideanReconstruction reconstruction;
@@ -388,19 +382,20 @@ void libmv_samplePlanarPatch(const float *image, int width, int height,
struct libmv_Tracks *libmv_tracksNew(void)
{
- libmv::Tracks *libmv_tracks = new libmv::Tracks();
+ libmv::Tracks *libmv_tracks = LIBMV_OBJECT_NEW(libmv::Tracks);
return (struct libmv_Tracks *)libmv_tracks;
}
void libmv_tracksDestroy(struct libmv_Tracks *libmv_tracks)
{
- delete (libmv::Tracks*) libmv_tracks;
+ using libmv::Tracks;
+ LIBMV_OBJECT_DELETE(libmv_tracks, Tracks);
}
-void libmv_tracksInsert(struct libmv_Tracks *libmv_tracks, int image, int track, double x, double y)
+void libmv_tracksInsert(struct libmv_Tracks *libmv_tracks, int image, int track, double x, double y, double weight)
{
- ((libmv::Tracks*) libmv_tracks)->Insert(image, track, x, y);
+ ((libmv::Tracks*) libmv_tracks)->Insert(image, track, x, y, weight);
}
/* ************ Reconstruction ************ */
@@ -503,14 +498,13 @@ static bool selectTwoKeyframesBasedOnGRICAndVariance(
libmv::Tracks &tracks,
libmv::Tracks &normalized_tracks,
libmv::CameraIntrinsics &camera_intrinsics,
- libmv::ReconstructionOptions &reconstruction_options,
int &keyframe1,
int &keyframe2)
{
libmv::vector<int> keyframes;
/* Get list of all keyframe candidates first. */
- SelectkeyframesBasedOnGRICAndVariance(normalized_tracks,
+ SelectKeyframesBasedOnGRICAndVariance(normalized_tracks,
camera_intrinsics,
keyframes);
@@ -547,8 +541,7 @@ static bool selectTwoKeyframesBasedOnGRICAndVariance(
/* get a solution from two keyframes only */
libmv::EuclideanReconstructTwoFrames(keyframe_markers, &reconstruction);
libmv::EuclideanBundle(keyframe_tracks, &reconstruction);
- libmv::EuclideanCompleteReconstruction(reconstruction_options,
- keyframe_tracks,
+ libmv::EuclideanCompleteReconstruction(keyframe_tracks,
&reconstruction, NULL);
double current_error =
@@ -578,7 +571,7 @@ struct libmv_Reconstruction *libmv_solveReconstruction(const struct libmv_Tracks
reconstruct_progress_update_cb progress_update_callback,
void *callback_customdata)
{
- struct libmv_Reconstruction *libmv_reconstruction = new libmv_Reconstruction();
+ struct libmv_Reconstruction *libmv_reconstruction = LIBMV_OBJECT_NEW(libmv_Reconstruction);
libmv::Tracks &tracks = *((libmv::Tracks *) libmv_tracks);
libmv::EuclideanReconstruction &reconstruction = libmv_reconstruction->reconstruction;
@@ -590,10 +583,6 @@ struct libmv_Reconstruction *libmv_solveReconstruction(const struct libmv_Tracks
/* Retrieve reconstruction options from C-API to libmv API */
cameraIntrinsicsFromOptions(libmv_camera_intrinsics_options, &camera_intrinsics);
- libmv::ReconstructionOptions reconstruction_options;
- reconstruction_options.success_threshold = libmv_reconstruction_options->success_threshold;
- reconstruction_options.use_fallback_reconstruction = libmv_reconstruction_options->use_fallback_reconstruction;
-
/* Invert the camera intrinsics */
libmv::Tracks normalized_tracks = getNormalizedTracks(tracks, camera_intrinsics);
@@ -609,7 +598,6 @@ struct libmv_Reconstruction *libmv_solveReconstruction(const struct libmv_Tracks
selectTwoKeyframesBasedOnGRICAndVariance(tracks,
normalized_tracks,
camera_intrinsics,
- reconstruction_options,
keyframe1,
keyframe2);
@@ -630,7 +618,7 @@ struct libmv_Reconstruction *libmv_solveReconstruction(const struct libmv_Tracks
libmv::EuclideanReconstructTwoFrames(keyframe_markers, &reconstruction);
libmv::EuclideanBundle(normalized_tracks, &reconstruction);
- libmv::EuclideanCompleteReconstruction(reconstruction_options, normalized_tracks,
+ libmv::EuclideanCompleteReconstruction(normalized_tracks,
&reconstruction, &update_callback);
/* refinement */
@@ -660,7 +648,7 @@ struct libmv_Reconstruction *libmv_solveModal(const struct libmv_Tracks *libmv_t
reconstruct_progress_update_cb progress_update_callback,
void *callback_customdata)
{
- struct libmv_Reconstruction *libmv_reconstruction = new libmv_Reconstruction();
+ struct libmv_Reconstruction *libmv_reconstruction = LIBMV_OBJECT_NEW(libmv_Reconstruction);
libmv::Tracks &tracks = *((libmv::Tracks *) libmv_tracks);
libmv::EuclideanReconstruction &reconstruction = libmv_reconstruction->reconstruction;
@@ -703,7 +691,7 @@ struct libmv_Reconstruction *libmv_solveModal(const struct libmv_Tracks *libmv_t
void libmv_reconstructionDestroy(struct libmv_Reconstruction *libmv_reconstruction)
{
- delete libmv_reconstruction;
+ LIBMV_OBJECT_DELETE(libmv_reconstruction, libmv_Reconstruction);
}
int libmv_reprojectionPointForTrack(const struct libmv_Reconstruction *libmv_reconstruction, int track, double pos[3])
@@ -850,7 +838,7 @@ struct libmv_Features *libmv_detectFeaturesFAST(const unsigned char *data,
{
libmv::Feature *features = NULL;
std::vector<libmv::Feature> v;
- struct libmv_Features *libmv_features = new libmv_Features();
+ struct libmv_Features *libmv_features = LIBMV_STRUCT_NEW(libmv_Features, 1);
int i = 0, count;
if (margin) {
@@ -864,7 +852,7 @@ struct libmv_Features *libmv_detectFeaturesFAST(const unsigned char *data,
count = v.size();
if (count) {
- features = new libmv::Feature[count];
+ features = LIBMV_STRUCT_NEW(libmv::Feature, count);
for(std::vector<libmv::Feature>::iterator it = v.begin(); it != v.end(); it++) {
features[i++] = *it;
@@ -883,7 +871,7 @@ struct libmv_Features *libmv_detectFeaturesMORAVEC(const unsigned char *data,
int margin, int count, int min_distance)
{
libmv::Feature *features = NULL;
- struct libmv_Features *libmv_features = new libmv_Features;
+ struct libmv_Features *libmv_features = LIBMV_STRUCT_NEW(libmv_Features, 1);
if (count) {
if (margin) {
@@ -892,7 +880,7 @@ struct libmv_Features *libmv_detectFeaturesMORAVEC(const unsigned char *data,
height -= 2 * margin;
}
- features = new libmv::Feature[count];
+ features = LIBMV_STRUCT_NEW(libmv::Feature, count);
libmv::DetectMORAVEC(data, stride, width, height, features, &count, min_distance, NULL);
}
@@ -905,10 +893,11 @@ struct libmv_Features *libmv_detectFeaturesMORAVEC(const unsigned char *data,
void libmv_featuresDestroy(struct libmv_Features *libmv_features)
{
- if (libmv_features->features)
- delete [] libmv_features->features;
+ if (libmv_features->features) {
+ LIBMV_STRUCT_DELETE(libmv_features->features);
+ }
- delete libmv_features;
+ LIBMV_STRUCT_DELETE(libmv_features);
}
int libmv_countFeatures(const struct libmv_Features *libmv_features)
@@ -930,14 +919,14 @@ void libmv_getFeature(const struct libmv_Features *libmv_features, int number, d
struct libmv_CameraIntrinsics *libmv_cameraIntrinsicsNewEmpty(void)
{
- libmv::CameraIntrinsics *camera_intrinsics = new libmv::CameraIntrinsics();
+ libmv::CameraIntrinsics *camera_intrinsics = LIBMV_OBJECT_NEW(libmv::CameraIntrinsics);
return (struct libmv_CameraIntrinsics *) camera_intrinsics;
}
struct libmv_CameraIntrinsics *libmv_cameraIntrinsicsNew(const libmv_CameraIntrinsicsOptions *libmv_camera_intrinsics_options)
{
- libmv::CameraIntrinsics *camera_intrinsics = new libmv::CameraIntrinsics();
+ libmv::CameraIntrinsics *camera_intrinsics = LIBMV_OBJECT_NEW(libmv::CameraIntrinsics);
cameraIntrinsicsFromOptions(libmv_camera_intrinsics_options, camera_intrinsics);
@@ -947,16 +936,15 @@ struct libmv_CameraIntrinsics *libmv_cameraIntrinsicsNew(const libmv_CameraIntri
struct libmv_CameraIntrinsics *libmv_cameraIntrinsicsCopy(const libmv_CameraIntrinsics *libmvIntrinsics)
{
libmv::CameraIntrinsics *orig_intrinsics = (libmv::CameraIntrinsics *) libmvIntrinsics;
- libmv::CameraIntrinsics *new_intrinsics = new libmv::CameraIntrinsics(*orig_intrinsics);
+ libmv::CameraIntrinsics *new_intrinsics = LIBMV_OBJECT_NEW(libmv::CameraIntrinsics, *orig_intrinsics);
return (struct libmv_CameraIntrinsics *) new_intrinsics;
}
void libmv_cameraIntrinsicsDestroy(struct libmv_CameraIntrinsics *libmvIntrinsics)
{
- libmv::CameraIntrinsics *intrinsics = (libmv::CameraIntrinsics *) libmvIntrinsics;
-
- delete intrinsics;
+ using libmv::CameraIntrinsics;
+ LIBMV_OBJECT_DELETE(libmvIntrinsics, CameraIntrinsics);
}
void libmv_cameraIntrinsicsUpdate(const libmv_CameraIntrinsicsOptions *libmv_camera_intrinsics_options,
@@ -1082,19 +1070,7 @@ void libmv_cameraIntrinsicsInvert(const libmv_CameraIntrinsicsOptions *libmv_cam
}
}
-void libmv_applyInverseCanonicalHomography(double x, double y,
- const double *xs, const double *ys,
- int num_samples_x, int num_samples_y,
- double *warped_position_x,
- double *warped_position_y)
-{
- libmv::ApplyInverseCanonicalHomography(x, y, xs, ys,
- num_samples_x, num_samples_y,
- warped_position_x, warped_position_y);
-}
-
-void libmv_homography2DFromCorrespondencesLinear(double (*x1)[2], double (*x2)[2], int num_points,
- double H[3][3], double expected_precision)
+void libmv_homography2DFromCorrespondencesEuc(double (*x1)[2], double (*x2)[2], int num_points, double H[3][3])
{
libmv::Mat x1_mat, x2_mat;
libmv::Mat3 H_mat;
@@ -1110,11 +1086,23 @@ void libmv_homography2DFromCorrespondencesLinear(double (*x1)[2], double (*x2)[2
LG << "x1: " << x1_mat;
LG << "x2: " << x2_mat;
- libmv::Homography2DFromCorrespondencesLinear(x1_mat, x2_mat, &H_mat, expected_precision);
+ libmv::HomographyEstimationOptions options;
+ libmv::Homography2DFromCorrespondencesEuc(x1_mat, x2_mat, options, &H_mat);
LG << "H: " << H_mat;
memcpy(H, H_mat.data(), 9 * sizeof(double));
}
+void libmv_applyInverseCanonicalHomography(double x, double y,
+ const double *xs, const double *ys,
+ int num_samples_x, int num_samples_y,
+ double *warped_position_x,
+ double *warped_position_y)
+{
+ libmv::ApplyInverseCanonicalHomography(x, y, xs, ys,
+ num_samples_x, num_samples_y,
+ warped_position_x, warped_position_y);
+}
+
#endif
diff --git a/extern/libmv/libmv-capi.h b/extern/libmv/libmv-capi.h
index 4d490a97687..ee67ff64fbc 100644
--- a/extern/libmv/libmv-capi.h
+++ b/extern/libmv/libmv-capi.h
@@ -73,7 +73,7 @@ void libmv_samplePlanarPatch(const float *image, int width, int height,
/* Tracks */
struct libmv_Tracks *libmv_tracksNew(void);
void libmv_tracksDestroy(struct libmv_Tracks *libmv_tracks);
-void libmv_tracksInsert(struct libmv_Tracks *libmv_tracks, int image, int track, double x, double y);
+void libmv_tracksInsert(struct libmv_Tracks *libmv_tracks, int image, int track, double x, double y, double weight);
/* Reconstruction */
#define LIBMV_REFINE_FOCAL_LENGTH (1 << 0)
@@ -94,9 +94,6 @@ typedef struct libmv_ReconstructionOptions {
int keyframe1, keyframe2;
int refine_intrinsics;
-
- double success_threshold;
- int use_fallback_reconstruction;
} libmv_ReconstructionOptions;
typedef void (*reconstruct_progress_update_cb) (void *customdata, double progress, const char *message);
@@ -159,15 +156,14 @@ void libmv_cameraIntrinsicsApply(const libmv_CameraIntrinsicsOptions *libmv_came
void libmv_cameraIntrinsicsInvert(const libmv_CameraIntrinsicsOptions *libmv_camera_intrinsics_options,
double x, double y, double *x1, double *y1);
+void libmv_homography2DFromCorrespondencesEuc(double (*x1)[2], double (*x2)[2], int num_points, double H[3][3]);
+
void libmv_applyInverseCanonicalHomography(double x, double y,
const double *xs, const double *ys,
int num_samples_x, int num_samples_y,
double *warped_position_x,
double *warped_position_y);
-void libmv_homography2DFromCorrespondencesLinear(double (*x1)[2], double (*x2)[2], int num_points,
- double H[3][3], double expected_precision);
-
#ifdef __cplusplus
}
#endif
diff --git a/extern/libmv/libmv-capi_intern.h b/extern/libmv/libmv-capi_intern.h
new file mode 100644
index 00000000000..90087c52a6c
--- /dev/null
+++ b/extern/libmv/libmv-capi_intern.h
@@ -0,0 +1,59 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2013 Blender Foundation.
+ * All rights reserved.
+ *
+ * Contributor(s): Sergey Sharybin
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef LIBMV_C_API_INTERN_H
+#define LIBMV_C_API_INTERN_H
+
+#if defined(_MSC_VER)
+# define __func__ __FUNCTION__
+# define snprintf _snprintf
+#endif
+
+#ifdef WITH_LIBMV_GUARDED_ALLOC
+# include "MEM_guardedalloc.h"
+# define LIBMV_OBJECT_NEW OBJECT_GUARDED_NEW
+# define LIBMV_OBJECT_DELETE OBJECT_GUARDED_DELETE
+# define LIBMV_OBJECT_DELETE OBJECT_GUARDED_DELETE
+# define LIBMV_STRUCT_NEW(type, count) (type*)MEM_mallocN(sizeof(type) * count, __func__)
+# define LIBMV_STRUCT_DELETE(what) MEM_freeN(what)
+#else
+// Need this to keep libmv-capi potentially standalone.
+# if defined __GNUC__ || defined __sun
+# define LIBMV_OBJECT_NEW(type, args ...) \
+ new(malloc(sizeof(type))) type(args)
+# else
+# define LIBMV_OBJECT_NEW(type, ...) \
+ new(malloc(sizeof(type))) type(__VA_ARGS__)
+#endif
+# define LIBMV_OBJECT_DELETE(what, type) \
+ { if(what) { \
+ ((type*)(what))->~type(); \
+ free(what); \
+ } } (void)0
+# define LIBMV_STRUCT_NEW(type, count) (type*)malloc(sizeof(type) * count)
+# define LIBMV_STRUCT_DELETE(what) { if (what) free(what); } (void)0
+#endif
+
+#endif // LIBMV_C_API_INTERN_H
diff --git a/extern/libmv/libmv-capi_stub.cc b/extern/libmv/libmv-capi_stub.cc
index 63d4fc1f68f..047bed8bb71 100644
--- a/extern/libmv/libmv-capi_stub.cc
+++ b/extern/libmv/libmv-capi_stub.cc
@@ -85,7 +85,7 @@ struct libmv_Tracks *libmv_tracksNew(void)
}
void libmv_tracksInsert(struct libmv_Tracks * /*libmv_tracks*/, int /*image*/,
- int /*track*/, double /*x*/, double /*y*/)
+ int /*track*/, double /*x*/, double /*y*/, double /*weight*/)
{
}
@@ -277,6 +277,15 @@ void libmv_cameraIntrinsicsInvert(const libmv_CameraIntrinsicsOptions *libmv_cam
*y1 = (y - principal_y) / focal_length;
}
+void libmv_homography2DFromCorrespondencesEuc(double (* /* x1 */)[2], double (* /* x2 */)[2], int /* num_points */,
+ double H[3][3])
+{
+ memset(H, 0, sizeof(double[3][3]));
+ H[0][0] = 1.0f;
+ H[1][1] = 1.0f;
+ H[2][2] = 1.0f;
+}
+
void libmv_applyInverseCanonicalHomography(double x, double y,
const double *xs, const double *ys,
int num_samples_x, int num_samples_y,
@@ -287,13 +296,4 @@ void libmv_applyInverseCanonicalHomography(double x, double y,
*warped_position_y = (double) num_samples_y * 0.5;
}
-void libmv_homography2DFromCorrespondencesLinear(double (* /* x1 */)[2], double (* /* x2 */)[2], int /* num_points */,
- double H[3][3], double /* expected_precision */)
-{
- memset(H, 0, sizeof(H));
- N[0][0] = 1.0f;
- N[1][1] = 1.0f;
- N[02[2] = 1.0f;
-}
-
#endif // ifndef WITH_LIBMV
diff --git a/extern/libmv/libmv/multiview/euclidean_resection.cc b/extern/libmv/libmv/multiview/euclidean_resection.cc
index d5421b9691e..245b027fb7c 100644
--- a/extern/libmv/libmv/multiview/euclidean_resection.cc
+++ b/extern/libmv/libmv/multiview/euclidean_resection.cc
@@ -34,26 +34,20 @@ namespace libmv {
namespace euclidean_resection {
typedef unsigned int uint;
-
-bool EuclideanResectionPPnP(const Mat2X &x_camera,
- const Mat3X &X_world,
- Mat3 *R, Vec3 *t,
- double tolerance);
bool EuclideanResection(const Mat2X &x_camera,
const Mat3X &X_world,
Mat3 *R, Vec3 *t,
- ResectionMethod method,
- double success_threshold) {
+ ResectionMethod method) {
switch (method) {
case RESECTION_ANSAR_DANIILIDIS:
EuclideanResectionAnsarDaniilidis(x_camera, X_world, R, t);
break;
case RESECTION_EPNP:
- return EuclideanResectionEPnP(x_camera, X_world, R, t, success_threshold);
+ return EuclideanResectionEPnP(x_camera, X_world, R, t);
break;
case RESECTION_PPNP:
- return EuclideanResectionPPnP(x_camera, X_world, R, t, success_threshold);
+ return EuclideanResectionPPnP(x_camera, X_world, R, t);
break;
default:
LOG(FATAL) << "Unknown resection method.";
@@ -444,8 +438,7 @@ static void ComputePointsCoordinatesInCameraFrame(
bool EuclideanResectionEPnP(const Mat2X &x_camera,
const Mat3X &X_world,
- Mat3 *R, Vec3 *t,
- double success_threshold) {
+ Mat3 *R, Vec3 *t) {
CHECK(x_camera.cols() == X_world.cols());
CHECK(x_camera.cols() > 3);
size_t num_points = X_world.cols();
@@ -553,13 +546,7 @@ bool EuclideanResectionEPnP(const Mat2X &x_camera,
//
// TODO(keir): Decide if setting this to infinity, effectively disabling the
// check, is the right approach. So far this seems the case.
- //
- // TODO(sergey): Made it an option for now, in some cases it makes sense to
- // still fallback to reprojection solution
- // For details see bug [#32765] from Blender bug tracker
-
- // double kSuccessThreshold = std::numeric_limits<double>::max();
- double kSuccessThreshold = success_threshold;
+ double kSuccessThreshold = std::numeric_limits<double>::max();
// Find the first possible solution for R, t corresponding to:
// Betas = [b00 b01 b11 b02 b12 b22 b03 b13 b23 b33]
@@ -728,8 +715,7 @@ bool EuclideanResectionEPnP(const Mat2X &x_camera,
// other hand, it did work on the first try.
bool EuclideanResectionPPnP(const Mat2X &x_camera,
const Mat3X &X_world,
- Mat3 *R, Vec3 *t,
- double tolerance) {
+ Mat3 *R, Vec3 *t) {
int n = x_camera.cols();
Mat Z = Mat::Zero(n, n);
Vec e = Vec::Ones(n);
@@ -750,7 +736,7 @@ bool EuclideanResectionPPnP(const Mat2X &x_camera,
Mat E(n, 3);
int iteration = 0;
- tolerance = 1e-5;
+ double tolerance = 1e-5;
// TODO(keir): The limit of 100 can probably be reduced, but this will require
// some investigation.
while (error > tolerance && iteration < 100) {
diff --git a/extern/libmv/libmv/multiview/euclidean_resection.h b/extern/libmv/libmv/multiview/euclidean_resection.h
index ff9bccdd5c9..28eae92611c 100644
--- a/extern/libmv/libmv/multiview/euclidean_resection.h
+++ b/extern/libmv/libmv/multiview/euclidean_resection.h
@@ -49,14 +49,11 @@ enum ResectionMethod {
* \param R Solution for the camera rotation matrix
* \param t Solution for the camera translation vector
* \param method The resection method to use.
- * \param success_threshold Threshold of an error which is still considered a success
- * (currently used by EPnP algorithm only)
*/
bool EuclideanResection(const Mat2X &x_camera,
const Mat3X &X_world,
Mat3 *R, Vec3 *t,
- ResectionMethod method = RESECTION_EPNP,
- double success_threshold = 1e-3);
+ ResectionMethod method = RESECTION_EPNP);
/**
* Computes the extrinsic parameters, R and t for a calibrated camera
@@ -117,7 +114,6 @@ void EuclideanResectionAnsarDaniilidis(const Mat2X &x_camera,
* \param X_world 3D points in the world coordinate system
* \param R Solution for the camera rotation matrix
* \param t Solution for the camera translation vector
- * \param success_threshold Threshold of an error which is still considered a success
*
* This is the algorithm described in:
* "{EP$n$P: An Accurate $O(n)$ Solution to the P$n$P Problem", by V. Lepetit
@@ -126,8 +122,24 @@ void EuclideanResectionAnsarDaniilidis(const Mat2X &x_camera,
*/
bool EuclideanResectionEPnP(const Mat2X &x_camera,
const Mat3X &X_world,
- Mat3 *R, Vec3 *t,
- double success_threshold = 1e-3);
+ Mat3 *R, Vec3 *t);
+
+/**
+ * Computes the extrinsic parameters, R and t for a calibrated camera from 4 or
+ * more 3D points and their images.
+ *
+ * \param x_camera Image points in normalized camera coordinates,
+ * e.g. x_camera = inv(K) * x_image
+ * \param X_world 3D points in the world coordinate system
+ * \param R Solution for the camera rotation matrix
+ * \param t Solution for the camera translation vector
+ *
+ * Straight from the paper:
+ * http://www.diegm.uniud.it/fusiello/papers/3dimpvt12-b.pdf
+ */
+bool EuclideanResectionPPnP(const Mat2X &x_camera,
+ const Mat3X &X_world,
+ Mat3 *R, Vec3 *t);
} // namespace euclidean_resection
} // namespace libmv
diff --git a/extern/libmv/libmv/multiview/fundamental.cc b/extern/libmv/libmv/multiview/fundamental.cc
index a05ef7907a2..ec6c70d81cf 100644
--- a/extern/libmv/libmv/multiview/fundamental.cc
+++ b/extern/libmv/libmv/multiview/fundamental.cc
@@ -20,6 +20,7 @@
#include "libmv/multiview/fundamental.h"
+#include "ceres/ceres.h"
#include "libmv/logging/logging.h"
#include "libmv/numeric/numeric.h"
#include "libmv/numeric/poly.h"
@@ -407,4 +408,94 @@ void FundamentalToEssential(const Mat3 &F, Mat3 *E) {
*E = svd.matrixU() * diag.asDiagonal() * svd.matrixV().transpose();
}
+FundamentalEstimationOptions::FundamentalEstimationOptions(void) :
+ use_refine_if_algebraic_fails(true),
+ max_num_iterations(50),
+ parameter_tolerance(1e-16),
+ function_tolerance(1e-16) {
+}
+
+class FundamentalSymmetricEpipolarCostFunctor {
+ public:
+ FundamentalSymmetricEpipolarCostFunctor(const Vec2 &x,
+ const Vec2 &y)
+ : x_(x), y_(y) {}
+
+ template<typename T>
+ bool operator()(const T *fundamental_parameters, T *residuals) const {
+ typedef Eigen::Matrix<T, 3, 3> Mat3;
+ typedef Eigen::Matrix<T, 3, 1> Vec3;
+
+ Mat3 F(fundamental_parameters);
+
+ Vec3 x(T(x_(0)), T(x_(1)), T(1.0));
+ Vec3 y(T(y_(0)), T(y_(1)), T(1.0));
+
+ Vec3 F_x = F * x;
+ Vec3 Ft_y = F.transpose() * y;
+ T y_F_x = y.dot(F_x);
+
+ residuals[0] = y_F_x * T(1) / F_x.head(2).norm();
+ residuals[1] = y_F_x * T(1) / Ft_y.head(2).norm();
+
+ return true;
+ }
+
+ const Mat x_;
+ const Mat y_;
+};
+
+/* Fundamental transformation estimation. */
+bool FundamentalFromCorrespondencesEuc(
+ const Mat &x1,
+ const Mat &x2,
+ const FundamentalEstimationOptions &options,
+ Mat3 *F) {
+ // Step 1: Algebraic fundamental estimation.
+ bool algebraic_success = NormalizedEightPointSolver(x1, x2, F);
+
+ LG << "Algebraic result " << algebraic_success
+ << ", estimated matrix:\n" << *F;
+
+ if (!algebraic_success && !options.use_refine_if_algebraic_fails) {
+ return false;
+ }
+
+ // Step 2: Refine matrix using Ceres minimizer.
+ ceres::Problem problem;
+ for (int i = 0; i < x1.cols(); i++) {
+ FundamentalSymmetricEpipolarCostFunctor
+ *fundamental_symmetric_epipolar_cost_function =
+ new FundamentalSymmetricEpipolarCostFunctor(x1.col(i),
+ x2.col(i));
+
+ problem.AddResidualBlock(
+ new ceres::AutoDiffCostFunction<
+ FundamentalSymmetricEpipolarCostFunctor,
+ 2, // num_residuals
+ 9>(fundamental_symmetric_epipolar_cost_function),
+ NULL,
+ F->data());
+ }
+
+ // Configure the solve.
+ ceres::Solver::Options solver_options;
+ solver_options.linear_solver_type = ceres::DENSE_QR;
+ solver_options.max_num_iterations = options.max_num_iterations;
+ solver_options.update_state_every_iteration = true;
+ solver_options.parameter_tolerance = options.parameter_tolerance;
+ solver_options.function_tolerance = options.function_tolerance;
+
+ // Run the solve.
+ ceres::Solver::Summary summary;
+ ceres::Solve(solver_options, &problem, &summary);
+
+ VLOG(1) << "Summary:\n" << summary.FullReport();
+
+ LG << "Final refined matrix:\n" << *F;
+
+ return !(summary.termination_type == ceres::DID_NOT_RUN ||
+ summary.termination_type == ceres::NUMERICAL_FAILURE);
+}
+
} // namespace libmv
diff --git a/extern/libmv/libmv/multiview/fundamental.h b/extern/libmv/libmv/multiview/fundamental.h
index 1ad184d8314..2961a46cdc4 100644
--- a/extern/libmv/libmv/multiview/fundamental.h
+++ b/extern/libmv/libmv/multiview/fundamental.h
@@ -144,6 +144,43 @@ bool MotionFromEssentialAndCorrespondence(const Mat3 &E,
*/
void FundamentalToEssential(const Mat3 &F, Mat3 *E);
+/**
+ * This structure contains options that controls how the fundamental
+ * estimation operates.
+ *
+ * Defaults should be suitable for a wide range of use cases, but
+ * better performance and accuracy might require tweaking/
+ */
+struct FundamentalEstimationOptions {
+ // Default constructor which sets up a options for generic usage.
+ FundamentalEstimationOptions(void);
+
+ // Refine fundamental matrix even if algebraic estimation reported failure.
+ bool use_refine_if_algebraic_fails;
+
+ // Maximal number of iterations for refinement step.
+ int max_num_iterations;
+
+ // Paramaneter tolerance used by minimizer termination criteria.
+ float parameter_tolerance;
+
+ // Function tolerance used by minimizer termination criteria.
+ float function_tolerance;
+};
+
+/**
+ * Fundamental transformation estimation.
+ *
+ * This function estimates the fundamental transformation from a list of 2D
+ * correspondences by doing algebraic estimation first followed with result
+ * refinement.
+ */
+bool FundamentalFromCorrespondencesEuc(
+ const Mat &x1,
+ const Mat &x2,
+ const FundamentalEstimationOptions &options,
+ Mat3 *F);
+
} // namespace libmv
#endif // LIBMV_MULTIVIEW_FUNDAMENTAL_H_
diff --git a/extern/libmv/libmv/multiview/homography.cc b/extern/libmv/libmv/multiview/homography.cc
index 317eb3f85c6..6041849d9fe 100644
--- a/extern/libmv/libmv/multiview/homography.cc
+++ b/extern/libmv/libmv/multiview/homography.cc
@@ -20,6 +20,7 @@
#include "libmv/multiview/homography.h"
+#include "ceres/ceres.h"
#include "libmv/logging/logging.h"
#include "libmv/multiview/homography_parameterization.h"
@@ -153,6 +154,116 @@ bool Homography2DFromCorrespondencesLinear(const Mat &x1,
return false;
}
}
+
+HomographyEstimationOptions::HomographyEstimationOptions(void) :
+ expected_algebraic_precision(EigenDouble::dummy_precision()),
+ use_refine_if_algebraic_fails(true),
+ max_num_iterations(50),
+ parameter_tolerance(1e-16),
+ function_tolerance(1e-16) {
+}
+
+class HomographySymmetricGeometricCostFunctor {
+ public:
+ HomographySymmetricGeometricCostFunctor(const Vec2 &x,
+ const Vec2 &y)
+ : x_(x), y_(y) { }
+
+ template<typename T>
+ bool operator()(const T *homography_parameters, T *residuals) const {
+ typedef Eigen::Matrix<T, 3, 3> Mat3;
+ typedef Eigen::Matrix<T, 3, 1> Vec3;
+
+ Mat3 H(homography_parameters);
+
+ Vec3 x(T(x_(0)), T(x_(1)), T(1.0));
+ Vec3 y(T(y_(0)), T(y_(1)), T(1.0));
+
+ Vec3 H_x = H * x;
+ Vec3 Hinv_y = H.inverse() * y;
+
+ H_x /= H_x(2);
+ Hinv_y /= Hinv_y(2);
+
+ // This is a forward error.
+ residuals[0] = H_x(0) - T(y_(0));
+ residuals[1] = H_x(1) - T(y_(1));
+
+ // This is a backward error.
+ residuals[2] = Hinv_y(0) - T(x_(0));
+ residuals[3] = Hinv_y(1) - T(x_(1));
+
+ return true;
+ }
+
+ const Vec2 x_;
+ const Vec2 y_;
+};
+
+/** 2D Homography transformation estimation in the case that points are in
+ * euclidean coordinates.
+ */
+bool Homography2DFromCorrespondencesEuc(
+ const Mat &x1,
+ const Mat &x2,
+ const HomographyEstimationOptions &options,
+ Mat3 *H) {
+ // TODO(sergey): Support homogenous coordinates, not just euclidean.
+
+ assert(2 == x1.rows());
+ assert(4 <= x1.cols());
+ assert(x1.rows() == x2.rows());
+ assert(x1.cols() == x2.cols());
+
+ // Step 1: Algebraic homography estimation.
+ bool algebraic_success =
+ Homography2DFromCorrespondencesLinear(x1, x2, H,
+ options.expected_algebraic_precision);
+
+ LG << "Algebraic result " << algebraic_success
+ << ", estimated matrix:\n" << *H;
+
+ if (!algebraic_success && !options.use_refine_if_algebraic_fails) {
+ return false;
+ }
+
+ // Step 2: Refine matrix using Ceres minimizer.
+ ceres::Problem problem;
+ for (int i = 0; i < x1.cols(); i++) {
+ HomographySymmetricGeometricCostFunctor
+ *homography_symmetric_geometric_cost_function =
+ new HomographySymmetricGeometricCostFunctor(x1.col(i),
+ x2.col(i));
+
+ problem.AddResidualBlock(
+ new ceres::AutoDiffCostFunction<
+ HomographySymmetricGeometricCostFunctor,
+ 4, // num_residuals
+ 9>(homography_symmetric_geometric_cost_function),
+ NULL,
+ H->data());
+ }
+
+ // Configure the solve.
+ ceres::Solver::Options solver_options;
+ solver_options.linear_solver_type = ceres::DENSE_QR;
+ solver_options.max_num_iterations = options.max_num_iterations;
+ solver_options.update_state_every_iteration = true;
+ solver_options.parameter_tolerance = options.parameter_tolerance;
+ solver_options.function_tolerance = options.function_tolerance;
+
+ // Run the solve.
+ ceres::Solver::Summary summary;
+ ceres::Solve(solver_options, &problem, &summary);
+
+ VLOG(1) << "Summary:\n" << summary.FullReport();
+
+ LG << "Final refined matrix:\n" << *H;
+
+ return !(summary.termination_type == ceres::DID_NOT_RUN ||
+ summary.termination_type == ceres::NUMERICAL_FAILURE);
+}
+
/**
* x2 ~ A * x1
* x2^t * Hi * A *x1 = 0
diff --git a/extern/libmv/libmv/multiview/homography.h b/extern/libmv/libmv/multiview/homography.h
index 8d2dff930eb..1928e39dffb 100644
--- a/extern/libmv/libmv/multiview/homography.h
+++ b/extern/libmv/libmv/multiview/homography.h
@@ -54,6 +54,45 @@ bool Homography2DFromCorrespondencesLinear(const Mat &x1,
EigenDouble::dummy_precision());
/**
+ * This structure contains options that controls how the homography
+ * estimation operates.
+ *
+ * Defaults should be suitable for a wide range of use cases, but
+ * better performance and accuracy might require tweaking/
+ */
+struct HomographyEstimationOptions {
+ // Default constructor which sets up a options for generic usage.
+ HomographyEstimationOptions(void);
+
+ // Expected precision of algebraic estimation.
+ double expected_algebraic_precision;
+
+ // Refine homography even if algebraic estimation reported failure.
+ bool use_refine_if_algebraic_fails;
+
+ // Maximal number of iterations for refinement step.
+ int max_num_iterations;
+
+ // Paramaneter tolerance used by minimizer termination criteria.
+ float parameter_tolerance;
+
+ // Function tolerance used by minimizer termination criteria.
+ float function_tolerance;
+};
+
+/**
+ * 2D homography transformation estimation.
+ *
+ * This function estimates the homography transformation from a list of 2D
+ * correspondences by doing algebraic estimation first followed with result
+ * refinement.
+ */
+bool Homography2DFromCorrespondencesEuc(const Mat &x1,
+ const Mat &x2,
+ const HomographyEstimationOptions &options,
+ Mat3 *H);
+
+/**
* 3D Homography transformation estimation.
*
* This function can be used in order to estimate the homography transformation
diff --git a/extern/libmv/libmv/simple_pipeline/bundle.cc b/extern/libmv/libmv/simple_pipeline/bundle.cc
index c778c11b3f6..e7887256892 100644
--- a/extern/libmv/libmv/simple_pipeline/bundle.cc
+++ b/extern/libmv/libmv/simple_pipeline/bundle.cc
@@ -60,8 +60,11 @@ namespace {
//
// This functor uses a radial distortion model.
struct OpenCVReprojectionError {
- OpenCVReprojectionError(const double observed_x, const double observed_y)
- : observed_x(observed_x), observed_y(observed_y) {}
+ OpenCVReprojectionError(const double observed_x,
+ const double observed_y,
+ const double weight)
+ : observed_x_(observed_x), observed_y_(observed_y),
+ weight_(weight) {}
template <typename T>
bool operator()(const T* const intrinsics,
@@ -112,13 +115,14 @@ struct OpenCVReprojectionError {
&predicted_y);
// The error is the difference between the predicted and observed position.
- residuals[0] = predicted_x - T(observed_x);
- residuals[1] = predicted_y - T(observed_y);
+ residuals[0] = (predicted_x - T(observed_x_)) * weight_;
+ residuals[1] = (predicted_y - T(observed_y_)) * weight_;
return true;
}
- const double observed_x;
- const double observed_y;
+ const double observed_x_;
+ const double observed_y_;
+ const double weight_;
};
// Print a message to the log which camera intrinsics are gonna to be optimixed.
@@ -378,25 +382,31 @@ void EuclideanBundleCommonIntrinsics(const Tracks &tracks,
// camera translaiton.
double *current_camera_R_t = &all_cameras_R_t[camera->image](0);
- problem.AddResidualBlock(new ceres::AutoDiffCostFunction<
- OpenCVReprojectionError, 2, 8, 6, 3>(
- new OpenCVReprojectionError(
- marker.x,
- marker.y)),
- NULL,
- ceres_intrinsics,
- current_camera_R_t,
- &point->X(0));
-
- // We lock the first camera to better deal with scene orientation ambiguity.
- if (!have_locked_camera) {
- problem.SetParameterBlockConstant(current_camera_R_t);
- have_locked_camera = true;
- }
+ // Skip residual block for markers which does have absolutely
+ // no affect on the final solution.
+ // This way ceres is not gonna to go crazy.
+ if (marker.weight != 0.0) {
+ problem.AddResidualBlock(new ceres::AutoDiffCostFunction<
+ OpenCVReprojectionError, 2, 8, 6, 3>(
+ new OpenCVReprojectionError(
+ marker.x,
+ marker.y,
+ marker.weight)),
+ NULL,
+ ceres_intrinsics,
+ current_camera_R_t,
+ &point->X(0));
+
+ // We lock the first camera to better deal with scene orientation ambiguity.
+ if (!have_locked_camera) {
+ problem.SetParameterBlockConstant(current_camera_R_t);
+ have_locked_camera = true;
+ }
- if (bundle_constraints & BUNDLE_NO_TRANSLATION) {
- problem.SetParameterization(current_camera_R_t,
+ if (bundle_constraints & BUNDLE_NO_TRANSLATION) {
+ problem.SetParameterization(current_camera_R_t,
constant_translation_parameterization);
+ }
}
num_residuals++;
diff --git a/extern/libmv/libmv/simple_pipeline/keyframe_selection.cc b/extern/libmv/libmv/simple_pipeline/keyframe_selection.cc
index 71993845e39..d4ddee56fda 100644
--- a/extern/libmv/libmv/simple_pipeline/keyframe_selection.cc
+++ b/extern/libmv/libmv/simple_pipeline/keyframe_selection.cc
@@ -61,161 +61,6 @@ Mat3 IntrinsicsNormalizationMatrix(const CameraIntrinsics &intrinsics) {
return S * T;
}
-class HomographySymmetricGeometricCostFunctor {
- public:
- HomographySymmetricGeometricCostFunctor(const Vec2 &x,
- const Vec2 &y)
- : x_(x), y_(y) { }
-
- template<typename T>
- bool operator()(const T *homography_parameters, T *residuals) const {
- typedef Eigen::Matrix<T, 3, 3> Mat3;
- typedef Eigen::Matrix<T, 3, 1> Vec3;
-
- Mat3 H(homography_parameters);
-
- Vec3 x(T(x_(0)), T(x_(1)), T(1.0));
- Vec3 y(T(y_(0)), T(y_(1)), T(1.0));
-
- Vec3 H_x = H * x;
- Vec3 Hinv_y = H.inverse() * y;
-
- H_x /= H_x(2);
- Hinv_y /= Hinv_y(2);
-
- residuals[0] = H_x(0) - T(y_(0));
- residuals[1] = H_x(1) - T(y_(1));
-
- residuals[2] = Hinv_y(0) - T(x_(0));
- residuals[3] = Hinv_y(1) - T(x_(1));
-
- return true;
- }
-
- const Vec2 x_;
- const Vec2 y_;
-};
-
-void ComputeHomographyFromCorrespondences(const Mat &x1, const Mat &x2,
- CameraIntrinsics &intrinsics,
- Mat3 *H) {
- // Algebraic homography estimation, happens with normalized coordinates
- Homography2DFromCorrespondencesLinear(x1, x2, H, 1e-12);
-
- // Refine matrix using Ceres minimizer
-
- // TODO(sergey): look into refinement in pixel space.
- ceres::Problem problem;
-
- for (int i = 0; i < x1.cols(); i++) {
- HomographySymmetricGeometricCostFunctor
- *homography_symmetric_geometric_cost_function =
- new HomographySymmetricGeometricCostFunctor(x1.col(i),
- x2.col(i));
-
- problem.AddResidualBlock(
- new ceres::AutoDiffCostFunction<
- HomographySymmetricGeometricCostFunctor,
- 4, /* num_residuals */
- 9>(homography_symmetric_geometric_cost_function),
- NULL,
- H->data());
- }
-
- // Configure the solve.
- ceres::Solver::Options solver_options;
- solver_options.linear_solver_type = ceres::DENSE_QR;
- solver_options.max_num_iterations = 50;
- solver_options.update_state_every_iteration = true;
- solver_options.parameter_tolerance = 1e-16;
- solver_options.function_tolerance = 1e-16;
-
- // Run the solve.
- ceres::Solver::Summary summary;
- ceres::Solve(solver_options, &problem, &summary);
-
- VLOG(1) << "Summary:\n" << summary.FullReport();
-
- // Convert homography to original pixel space
- Mat3 N = IntrinsicsNormalizationMatrix(intrinsics);
- *H = N.inverse() * (*H) * N;
-}
-
-class FundamentalSymmetricEpipolarCostFunctor {
- public:
- FundamentalSymmetricEpipolarCostFunctor(const Vec2 &x,
- const Vec2 &y)
- : x_(x), y_(y) {}
-
- template<typename T>
- bool operator()(const T *fundamental_parameters, T *residuals) const {
- typedef Eigen::Matrix<T, 3, 3> Mat3;
- typedef Eigen::Matrix<T, 3, 1> Vec3;
-
- Mat3 F(fundamental_parameters);
-
- Vec3 x(T(x_(0)), T(x_(1)), T(1.0));
- Vec3 y(T(y_(0)), T(y_(1)), T(1.0));
-
- Vec3 F_x = F * x;
- Vec3 Ft_y = F.transpose() * y;
- T y_F_x = y.dot(F_x);
-
- residuals[0] = y_F_x * T(1) / F_x.head(2).norm();
- residuals[1] = y_F_x * T(1) / Ft_y.head(2).norm();
-
- return true;
- }
-
- const Mat x_;
- const Mat y_;
-};
-
-void ComputeFundamentalFromCorrespondences(const Mat &x1, const Mat &x2,
- CameraIntrinsics &intrinsics,
- Mat3 *F) {
- // Algebraic fundamental estimation, happens with normalized coordinates
- NormalizedEightPointSolver(x1, x2, F);
-
- // Refine matrix using Ceres minimizer
-
- // TODO(sergey): look into refinement in pixel space.
- ceres::Problem problem;
-
- for (int i = 0; i < x1.cols(); i++) {
- FundamentalSymmetricEpipolarCostFunctor
- *fundamental_symmetric_epipolar_cost_function =
- new FundamentalSymmetricEpipolarCostFunctor(x1.col(i),
- x2.col(i));
-
- problem.AddResidualBlock(
- new ceres::AutoDiffCostFunction<
- FundamentalSymmetricEpipolarCostFunctor,
- 2, /* num_residuals */
- 9>(fundamental_symmetric_epipolar_cost_function),
- NULL,
- F->data());
- }
-
- // Configure the solve.
- ceres::Solver::Options solver_options;
- solver_options.linear_solver_type = ceres::DENSE_NORMAL_CHOLESKY;
- solver_options.max_num_iterations = 50;
- solver_options.update_state_every_iteration = true;
- solver_options.parameter_tolerance = 1e-16;
- solver_options.function_tolerance = 1e-16;
-
- // Run the solve.
- ceres::Solver::Summary summary;
- ceres::Solve(solver_options, &problem, &summary);
-
- VLOG(1) << "Summary:\n" << summary.FullReport();
-
- // Convert fundamental to original pixel space
- Mat3 N = IntrinsicsNormalizationMatrix(intrinsics);
- *F = N.inverse() * (*F) * N;
-}
-
// P.H.S. Torr
// Geometric Motion Segmentation and Model Selection
//
@@ -288,7 +133,7 @@ Mat pseudoInverse(const Mat &matrix) {
}
} // namespace
-void SelectkeyframesBasedOnGRICAndVariance(const Tracks &tracks,
+void SelectKeyframesBasedOnGRICAndVariance(const Tracks &tracks,
CameraIntrinsics &intrinsics,
vector<int> &keyframes) {
// Mirza Tahir Ahmed, Matthew N. Dailey
@@ -360,8 +205,25 @@ void SelectkeyframesBasedOnGRICAndVariance(const Tracks &tracks,
continue;
Mat3 H, F;
- ComputeHomographyFromCorrespondences(x1, x2, intrinsics, &H);
- ComputeFundamentalFromCorrespondences(x1, x2, intrinsics, &F);
+
+ // Estimate homography using default options.
+ HomographyEstimationOptions homography_estimation_options;
+ Homography2DFromCorrespondencesEuc(x1,
+ x2,
+ homography_estimation_options,
+ &H);
+
+ // Convert homography to original pixel space.
+ H = N_inverse * H * N;
+
+ FundamentalEstimationOptions fundamental_estimation_options;
+ FundamentalFromCorrespondencesEuc(x1,
+ x2,
+ fundamental_estimation_options,
+ &F);
+
+ // Convert fundamental to original pixel space.
+ F = N_inverse * F * N;
// TODO(sergey): STEP 2: Discard outlier matches
diff --git a/extern/libmv/libmv/simple_pipeline/keyframe_selection.h b/extern/libmv/libmv/simple_pipeline/keyframe_selection.h
index 16d1e33a6fe..da131010d35 100644
--- a/extern/libmv/libmv/simple_pipeline/keyframe_selection.h
+++ b/extern/libmv/libmv/simple_pipeline/keyframe_selection.h
@@ -43,7 +43,7 @@ namespace libmv {
// \param intrinsics is camera intrinsics
// \param keyframes will contain all images number which are considered
// good to be used for reconstruction
-void SelectkeyframesBasedOnGRICAndVariance(const Tracks &tracks,
+void SelectKeyframesBasedOnGRICAndVariance(const Tracks &tracks,
CameraIntrinsics &intrinsics,
vector<int> &keyframes);
diff --git a/extern/libmv/libmv/simple_pipeline/modal_solver.cc b/extern/libmv/libmv/simple_pipeline/modal_solver.cc
index 90dfde15660..caccce68cbe 100644
--- a/extern/libmv/libmv/simple_pipeline/modal_solver.cc
+++ b/extern/libmv/libmv/simple_pipeline/modal_solver.cc
@@ -57,8 +57,10 @@ void ModalSolverLogProress(ProgressUpdateCallback *update_callback,
struct ModalReprojectionError {
ModalReprojectionError(double observed_x,
double observed_y,
+ const double weight,
const Vec3 &bundle)
- : observed_x(observed_x), observed_y(observed_y), bundle(bundle) { }
+ : observed_x_(observed_x), observed_y_(observed_y),
+ weight_(weight), bundle_(bundle) { }
template <typename T>
bool operator()(const T* quaternion, // Rotation quaternion
@@ -68,9 +70,9 @@ struct ModalReprojectionError {
// Convert bundle position from double to T.
T X[3];
- X[0] = T(bundle(0));
- X[1] = T(bundle(1));
- X[2] = T(bundle(2));
+ X[0] = T(bundle_(0));
+ X[1] = T(bundle_(1));
+ X[2] = T(bundle_(2));
// Compute projective coordinates: x = RX.
T x[3];
@@ -84,15 +86,16 @@ struct ModalReprojectionError {
// The error is the difference between reprojected
// and observed marker position.
- residuals[0] = xn - T(observed_x);
- residuals[1] = yn - T(observed_y);
+ residuals[0] = xn - T(observed_x_);
+ residuals[1] = yn - T(observed_y_);
return true;
}
- double observed_x;
- double observed_y;
- Vec3 bundle;
+ double observed_x_;
+ double observed_y_;
+ double weight_;
+ Vec3 bundle_;
};
} // namespace
@@ -180,11 +183,13 @@ void ModalSolver(const Tracks &tracks,
Marker &marker = all_markers[i];
EuclideanPoint *point = reconstruction->PointForTrack(marker.track);
- if (point) {
+ if (point && marker.weight != 0.0) {
problem.AddResidualBlock(new ceres::AutoDiffCostFunction<
ModalReprojectionError,
2, /* num_residuals */
- 4>(new ModalReprojectionError(marker.x, marker.y,
+ 4>(new ModalReprojectionError(marker.x,
+ marker.y,
+ marker.weight,
point->X)),
NULL,
&quaternion(0));
diff --git a/extern/libmv/libmv/simple_pipeline/pipeline.cc b/extern/libmv/libmv/simple_pipeline/pipeline.cc
index 859efc3c8f9..41dd3251f10 100644
--- a/extern/libmv/libmv/simple_pipeline/pipeline.cc
+++ b/extern/libmv/libmv/simple_pipeline/pipeline.cc
@@ -51,10 +51,9 @@ struct EuclideanPipelineRoutines {
EuclideanBundle(tracks, reconstruction);
}
- static bool Resect(const ReconstructionOptions &options,
- const vector<Marker> &markers,
+ static bool Resect(const vector<Marker> &markers,
EuclideanReconstruction *reconstruction, bool final_pass) {
- return EuclideanResect(options, markers, reconstruction, final_pass);
+ return EuclideanResect(markers, reconstruction, final_pass);
}
static bool Intersect(const vector<Marker> &markers,
@@ -90,10 +89,8 @@ struct ProjectivePipelineRoutines {
ProjectiveBundle(tracks, reconstruction);
}
- static bool Resect(const ReconstructionOptions &options,
- const vector<Marker> &markers,
+ static bool Resect(const vector<Marker> &markers,
ProjectiveReconstruction *reconstruction, bool final_pass) {
- (void) options; // Ignored.
(void) final_pass; // Ignored.
return ProjectiveResect(markers, reconstruction);
@@ -124,7 +121,7 @@ struct ProjectivePipelineRoutines {
} // namespace
-static void CompleteReconstructionLogProress(
+static void CompleteReconstructionLogProgress(
ProgressUpdateCallback *update_callback,
double progress,
const char *step = NULL) {
@@ -144,7 +141,6 @@ static void CompleteReconstructionLogProress(
template<typename PipelineRoutines>
void InternalCompleteReconstruction(
- const ReconstructionOptions &options,
const Tracks &tracks,
typename PipelineRoutines::Reconstruction *reconstruction,
ProgressUpdateCallback *update_callback = NULL) {
@@ -176,8 +172,8 @@ void InternalCompleteReconstruction(
LG << "Got " << reconstructed_markers.size()
<< " reconstructed markers for track " << track;
if (reconstructed_markers.size() >= 2) {
- CompleteReconstructionLogProress(update_callback,
- (double)tot_resects/(max_image));
+ CompleteReconstructionLogProgress(update_callback,
+ (double)tot_resects/(max_image));
if (PipelineRoutines::Intersect(reconstructed_markers,
reconstruction)) {
num_intersects++;
@@ -188,9 +184,9 @@ void InternalCompleteReconstruction(
}
}
if (num_intersects) {
- CompleteReconstructionLogProress(update_callback,
- (double)tot_resects/(max_image),
- "Bundling...");
+ CompleteReconstructionLogProgress(update_callback,
+ (double)tot_resects/(max_image),
+ "Bundling...");
PipelineRoutines::Bundle(tracks, reconstruction);
LG << "Ran Bundle() after intersections.";
}
@@ -215,9 +211,9 @@ void InternalCompleteReconstruction(
LG << "Got " << reconstructed_markers.size()
<< " reconstructed markers for image " << image;
if (reconstructed_markers.size() >= 5) {
- CompleteReconstructionLogProress(update_callback,
- (double)tot_resects/(max_image));
- if (PipelineRoutines::Resect(options, reconstructed_markers,
+ CompleteReconstructionLogProgress(update_callback,
+ (double)tot_resects/(max_image));
+ if (PipelineRoutines::Resect(reconstructed_markers,
reconstruction, false)) {
num_resects++;
tot_resects++;
@@ -228,9 +224,9 @@ void InternalCompleteReconstruction(
}
}
if (num_resects) {
- CompleteReconstructionLogProress(update_callback,
- (double)tot_resects/(max_image),
- "Bundling...");
+ CompleteReconstructionLogProgress(update_callback,
+ (double)tot_resects/(max_image),
+ "Bundling...");
PipelineRoutines::Bundle(tracks, reconstruction);
}
LG << "Did " << num_resects << " resects.";
@@ -252,9 +248,9 @@ void InternalCompleteReconstruction(
}
}
if (reconstructed_markers.size() >= 5) {
- CompleteReconstructionLogProress(update_callback,
- (double)tot_resects/(max_image));
- if (PipelineRoutines::Resect(options, reconstructed_markers,
+ CompleteReconstructionLogProgress(update_callback,
+ (double)tot_resects/(max_image));
+ if (PipelineRoutines::Resect(reconstructed_markers,
reconstruction, true)) {
num_resects++;
LG << "Ran final Resect() for image " << image;
@@ -264,9 +260,9 @@ void InternalCompleteReconstruction(
}
}
if (num_resects) {
- CompleteReconstructionLogProress(update_callback,
- (double)tot_resects/(max_image),
- "Bundling...");
+ CompleteReconstructionLogProgress(update_callback,
+ (double)tot_resects/(max_image),
+ "Bundling...");
PipelineRoutines::Bundle(tracks, reconstruction);
}
}
@@ -341,21 +337,17 @@ double ProjectiveReprojectionError(
intrinsics);
}
-void EuclideanCompleteReconstruction(const ReconstructionOptions &options,
- const Tracks &tracks,
+void EuclideanCompleteReconstruction(const Tracks &tracks,
EuclideanReconstruction *reconstruction,
ProgressUpdateCallback *update_callback) {
- InternalCompleteReconstruction<EuclideanPipelineRoutines>(options,
- tracks,
+ InternalCompleteReconstruction<EuclideanPipelineRoutines>(tracks,
reconstruction,
update_callback);
}
-void ProjectiveCompleteReconstruction(const ReconstructionOptions &options,
- const Tracks &tracks,
+void ProjectiveCompleteReconstruction(const Tracks &tracks,
ProjectiveReconstruction *reconstruction) {
- InternalCompleteReconstruction<ProjectivePipelineRoutines>(options,
- tracks,
+ InternalCompleteReconstruction<ProjectivePipelineRoutines>(tracks,
reconstruction);
}
diff --git a/extern/libmv/libmv/simple_pipeline/pipeline.h b/extern/libmv/libmv/simple_pipeline/pipeline.h
index d8489012b95..4d1bd00c51f 100644
--- a/extern/libmv/libmv/simple_pipeline/pipeline.h
+++ b/extern/libmv/libmv/simple_pipeline/pipeline.h
@@ -39,9 +39,6 @@ namespace libmv {
repeated until all points and cameras are estimated. Periodically, bundle
adjustment is run to ensure a quality reconstruction.
- \a options are used to define some specific befaviours based on settings
- see documentation for ReconstructionOptions
-
\a tracks should contain markers used in the reconstruction.
\a reconstruction should contain at least some 3D points or some estimated
cameras. The minimum number of cameras is two (with no 3D points) and the
@@ -50,7 +47,6 @@ namespace libmv {
\sa EuclideanResect, EuclideanIntersect, EuclideanBundle
*/
void EuclideanCompleteReconstruction(
- const ReconstructionOptions &options,
const Tracks &tracks,
EuclideanReconstruction *reconstruction,
ProgressUpdateCallback *update_callback = NULL);
@@ -68,9 +64,6 @@ void EuclideanCompleteReconstruction(
repeated until all points and cameras are estimated. Periodically, bundle
adjustment is run to ensure a quality reconstruction.
- \a options are used to define some specific befaviours based on settings
- see documentation for ReconstructionOptions
-
\a tracks should contain markers used in the reconstruction.
\a reconstruction should contain at least some 3D points or some estimated
cameras. The minimum number of cameras is two (with no 3D points) and the
@@ -78,8 +71,7 @@ void EuclideanCompleteReconstruction(
\sa ProjectiveResect, ProjectiveIntersect, ProjectiveBundle
*/
-void ProjectiveCompleteReconstruction(const ReconstructionOptions &options,
- const Tracks &tracks,
+void ProjectiveCompleteReconstruction(const Tracks &tracks,
ProjectiveReconstruction *reconstruction);
diff --git a/extern/libmv/libmv/simple_pipeline/reconstruction.h b/extern/libmv/libmv/simple_pipeline/reconstruction.h
index 1610029b9d2..947a0636476 100644
--- a/extern/libmv/libmv/simple_pipeline/reconstruction.h
+++ b/extern/libmv/libmv/simple_pipeline/reconstruction.h
@@ -26,17 +26,6 @@
namespace libmv {
-struct ReconstructionOptions {
- // threshold value of reconstruction error which is still considered successful
- // if reconstruction error bigger than this value, fallback reconstruction
- // algorithm would be used (if enabled)
- double success_threshold;
-
- // use fallback reconstruction algorithm in cases main reconstruction algorithm
- // failed to reconstruct
- bool use_fallback_reconstruction;
-};
-
/*!
A EuclideanCamera is the location and rotation of the camera viewing \a image.
diff --git a/extern/libmv/libmv/simple_pipeline/resect.cc b/extern/libmv/libmv/simple_pipeline/resect.cc
index 941c95cf237..e73fc44df2a 100644
--- a/extern/libmv/libmv/simple_pipeline/resect.cc
+++ b/extern/libmv/libmv/simple_pipeline/resect.cc
@@ -91,8 +91,7 @@ struct EuclideanResectCostFunction {
} // namespace
-bool EuclideanResect(const ReconstructionOptions &options,
- const vector<Marker> &markers,
+bool EuclideanResect(const vector<Marker> &markers,
EuclideanReconstruction *reconstruction, bool final_pass) {
if (markers.size() < 5) {
return false;
@@ -107,23 +106,15 @@ bool EuclideanResect(const ReconstructionOptions &options,
Mat3 R;
Vec3 t;
- double success_threshold = std::numeric_limits<double>::max();
-
- if (options.use_fallback_reconstruction)
- success_threshold = options.success_threshold;
-
if (0 || !euclidean_resection::EuclideanResection(
points_2d, points_3d, &R, &t,
- euclidean_resection::RESECTION_EPNP,
- success_threshold)) {
+ euclidean_resection::RESECTION_EPNP)) {
// printf("Resection for image %d failed\n", markers[0].image);
LG << "Resection for image " << markers[0].image << " failed;"
<< " trying fallback projective resection.";
- if (!options.use_fallback_reconstruction) {
- LG << "No fallback; failing resection for " << markers[0].image;
- return false;
- }
+ LG << "No fallback; failing resection for " << markers[0].image;
+ return false;
if (!final_pass) return false;
// Euclidean resection failed. Fall back to projective resection, which is
diff --git a/extern/libmv/libmv/simple_pipeline/resect.h b/extern/libmv/libmv/simple_pipeline/resect.h
index 47a6c6b60ea..7ca3237437e 100644
--- a/extern/libmv/libmv/simple_pipeline/resect.h
+++ b/extern/libmv/libmv/simple_pipeline/resect.h
@@ -35,9 +35,6 @@ namespace libmv {
reconstruction object, and solves for the pose and orientation of the
camera for that frame.
- \a options are used to define some specific befaviours based on settings
- see documentation for ReconstructionOptions
-
\a markers should contain \l Marker markers \endlink belonging to tracks
visible in the one frame to be resectioned. Each of the tracks associated
with the markers must have a corresponding reconstructed 3D position in the
@@ -54,8 +51,7 @@ namespace libmv {
\sa EuclideanIntersect, EuclideanReconstructTwoFrames
*/
-bool EuclideanResect(const ReconstructionOptions &options,
- const vector<Marker> &markers,
+bool EuclideanResect(const vector<Marker> &markers,
EuclideanReconstruction *reconstruction, bool final_pass);
/*!
diff --git a/extern/libmv/libmv/simple_pipeline/tracks.cc b/extern/libmv/libmv/simple_pipeline/tracks.cc
index f9e50d20af9..d5d009708ba 100644
--- a/extern/libmv/libmv/simple_pipeline/tracks.cc
+++ b/extern/libmv/libmv/simple_pipeline/tracks.cc
@@ -34,7 +34,7 @@ Tracks::Tracks(const Tracks &other) {
Tracks::Tracks(const vector<Marker> &markers) : markers_(markers) {}
-void Tracks::Insert(int image, int track, double x, double y) {
+void Tracks::Insert(int image, int track, double x, double y, double weight) {
// TODO(keir): Wow, this is quadratic for repeated insertions. Fix this by
// adding a smarter data structure like a set<>.
for (int i = 0; i < markers_.size(); ++i) {
@@ -45,7 +45,7 @@ void Tracks::Insert(int image, int track, double x, double y) {
return;
}
}
- Marker marker = { image, track, x, y };
+ Marker marker = { image, track, x, y, weight };
markers_.push_back(marker);
}
@@ -122,7 +122,7 @@ Marker Tracks::MarkerInImageForTrack(int image, int track) const {
return markers_[i];
}
}
- Marker null = { -1, -1, -1, -1 };
+ Marker null = { -1, -1, -1, -1, 0.0 };
return null;
}
diff --git a/extern/libmv/libmv/simple_pipeline/tracks.h b/extern/libmv/libmv/simple_pipeline/tracks.h
index f9af3ada45b..e2f8cf6b459 100644
--- a/extern/libmv/libmv/simple_pipeline/tracks.h
+++ b/extern/libmv/libmv/simple_pipeline/tracks.h
@@ -33,14 +33,20 @@ namespace libmv {
in the image identified by \a image. All markers for to the same target
form a track identified by a common \a track number.
+ \a weight is used by bundle adjustment and weight means how much the
+ track affects on a final solution.
+
\note Markers are typically aggregated with the help of the \l Tracks class.
\sa Tracks
*/
+// TODO(sergey): Consider using comment for every member separately
+// instead of having one giantic comment block.
struct Marker {
int image;
int track;
double x, y;
+ double weight;
};
/*!
@@ -72,9 +78,14 @@ class Tracks {
\a image and \a track are the keys used to retrieve the markers with the
other methods in this class.
+ \a weight is used by bundle adjustment and weight means how much the
+ track affects on a final solution.
+
\note To get an identifier for a new track, use \l MaxTrack() + 1.
*/
- void Insert(int image, int track, double x, double y);
+ // TODO(sergey): Consider using InsetWeightedMarker istead of using
+ // stupid default value?
+ void Insert(int image, int track, double x, double y, double weight = 1.0);
/// Returns all the markers.
vector<Marker> AllMarkers() const;
diff --git a/extern/libmv/third_party/ceres/CMakeLists.txt b/extern/libmv/third_party/ceres/CMakeLists.txt
index 06458834af3..56fd4c25473 100644
--- a/extern/libmv/third_party/ceres/CMakeLists.txt
+++ b/extern/libmv/third_party/ceres/CMakeLists.txt
@@ -40,22 +40,28 @@ set(INC_SYS
set(SRC
internal/ceres/array_utils.cc
+ internal/ceres/blas.cc
internal/ceres/block_evaluate_preparer.cc
internal/ceres/block_jacobian_writer.cc
internal/ceres/block_jacobi_preconditioner.cc
+ internal/ceres/block_random_access_crs_matrix.cc
internal/ceres/block_random_access_dense_matrix.cc
internal/ceres/block_random_access_matrix.cc
internal/ceres/block_random_access_sparse_matrix.cc
internal/ceres/block_sparse_matrix.cc
internal/ceres/block_structure.cc
internal/ceres/canonical_views_clustering.cc
+ internal/ceres/c_api.cc
internal/ceres/cgnr_solver.cc
+ internal/ceres/compressed_col_sparse_matrix_utils.cc
internal/ceres/compressed_row_jacobian_writer.cc
internal/ceres/compressed_row_sparse_matrix.cc
internal/ceres/conditioned_cost_function.cc
internal/ceres/conjugate_gradients_solver.cc
internal/ceres/coordinate_descent_minimizer.cc
internal/ceres/corrector.cc
+ internal/ceres/covariance.cc
+ internal/ceres/covariance_impl.cc
internal/ceres/cxsparse.cc
internal/ceres/dense_normal_cholesky_solver.cc
internal/ceres/dense_qr_solver.cc
@@ -67,7 +73,9 @@ set(SRC
internal/ceres/generated/schur_eliminator_d_d_d.cc
internal/ceres/gradient_checking_cost_function.cc
internal/ceres/implicit_schur_complement.cc
+ internal/ceres/incomplete_lq_factorization.cc
internal/ceres/iterative_schur_complement_solver.cc
+ internal/ceres/lapack.cc
internal/ceres/levenberg_marquardt_strategy.cc
internal/ceres/linear_least_squares_problems.cc
internal/ceres/linear_operator.cc
@@ -111,10 +119,12 @@ set(SRC
include/ceres/autodiff_cost_function.h
include/ceres/autodiff_local_parameterization.h
+ include/ceres/c_api.h
include/ceres/ceres.h
include/ceres/conditioned_cost_function.h
include/ceres/cost_function.h
include/ceres/cost_function_to_functor.h
+ include/ceres/covariance.h
include/ceres/crs_matrix.h
include/ceres/dynamic_autodiff_cost_function.h
include/ceres/fpclassify.h
@@ -146,6 +156,7 @@ set(SRC
internal/ceres/block_evaluate_preparer.h
internal/ceres/block_jacobian_writer.h
internal/ceres/block_jacobi_preconditioner.h
+ internal/ceres/block_random_access_crs_matrix.h
internal/ceres/block_random_access_dense_matrix.h
internal/ceres/block_random_access_matrix.h
internal/ceres/block_random_access_sparse_matrix.h
@@ -156,11 +167,13 @@ set(SRC
internal/ceres/cgnr_linear_operator.h
internal/ceres/cgnr_solver.h
internal/ceres/collections_port.h
+ internal/ceres/compressed_col_sparse_matrix_utils.h
internal/ceres/compressed_row_jacobian_writer.h
internal/ceres/compressed_row_sparse_matrix.h
internal/ceres/conjugate_gradients_solver.h
internal/ceres/coordinate_descent_minimizer.h
internal/ceres/corrector.h
+ internal/ceres/covariance_impl.h
internal/ceres/cxsparse.h
internal/ceres/dense_jacobian_writer.h
internal/ceres/dense_normal_cholesky_solver.h
@@ -175,8 +188,10 @@ set(SRC
internal/ceres/graph_algorithms.h
internal/ceres/graph.h
internal/ceres/implicit_schur_complement.h
+ internal/ceres/incomplete_lq_factorization.h
internal/ceres/integral_types.h
internal/ceres/iterative_schur_complement_solver.h
+ internal/ceres/lapack.h
internal/ceres/levenberg_marquardt_strategy.h
internal/ceres/linear_least_squares_problems.h
internal/ceres/linear_operator.h
@@ -186,7 +201,6 @@ set(SRC
internal/ceres/line_search_minimizer.h
internal/ceres/low_rank_inverse_hessian.h
internal/ceres/map_util.h
- internal/ceres/matrix_proto.h
internal/ceres/minimizer.h
internal/ceres/mutex.h
internal/ceres/parameter_block.h
@@ -206,6 +220,7 @@ set(SRC
internal/ceres/schur_eliminator_impl.h
internal/ceres/schur_jacobi_preconditioner.h
internal/ceres/scratch_evaluate_preparer.h
+ internal/ceres/small_blas.h
internal/ceres/solver_impl.h
internal/ceres/sparse_matrix.h
internal/ceres/sparse_normal_cholesky_solver.h
@@ -261,7 +276,7 @@ add_definitions(
-DCERES_HAVE_PTHREAD
-DCERES_NO_SUITESPARSE
-DCERES_NO_CXSPARSE
- -DCERES_NO_PROTOCOL_BUFFERS
+ -DCERES_NO_LAPACK
-DCERES_RESTRICT_SCHUR_SPECIALIZATION
-DCERES_HAVE_RWLOCK
)
diff --git a/extern/libmv/third_party/ceres/ChangeLog b/extern/libmv/third_party/ceres/ChangeLog
index 1a945b01622..6bb33068b2a 100644
--- a/extern/libmv/third_party/ceres/ChangeLog
+++ b/extern/libmv/third_party/ceres/ChangeLog
@@ -1,717 +1,638 @@
-commit 36f4cd23b24391106e9f3c15b0f9bbcaafc47b20
-Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Sun Apr 21 09:42:26 2013 -0700
+commit 682cd3c27864ba6d67ca81890760a5f697f21d63
+Author: Keir Mierle <mierle@gmail.com>
+Date: Tue Sep 3 14:28:32 2013 -0700
- Disable threads completely if OpenMP is not present.
-
- This reduces the penalty paid by Mutex lock and unlock operations
- in single threaded mode.
+ Update version history with shared libs changes
- Change-Id: I185380bde73fe87e901fc434d152d6c366ff1d5d
+ Change-Id: Iafd55087bc5eef4c15c3b544222147aa99df7690
-commit 24fb32b42683cf711a6683e3cff3540b16bb5019
-Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Sat Apr 20 09:02:06 2013 -0700
+commit 340d7c1415f144ca335ec1e87832c3f41d5d515b
+Author: Keir Mierle <mierle@gmail.com>
+Date: Tue Sep 3 13:50:03 2013 -0700
- Add whole program optimization for Clang.
+ Update version history with miniglog fix
- Also reorder the way CERES_CXX_FLAGS is being used for clarity.
-
- Change-Id: I2bbb90e770d30dd18ecae72939ea03b7fa11e6ae
+ Change-Id: Ic69f4994259e05fa88548b957146a1aac73b7af7
-commit 2b7497025096a681d7f0351081f83293398d62ef
-Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Fri Apr 19 19:52:58 2013 -0700
+commit ac061c0f2334868e671f26d24e34a14c77fac716
+Author: Keir Mierle <mierle@gmail.com>
+Date: Tue Sep 3 13:03:28 2013 -0700
- Fix a bounds error in the pre-ordering code.
+ Cleanups in logging.h
+
+ Thanks to Scott Ettinger for the patch this is based off of,
+ which restores the NDK build.
- Change-Id: I33c968bb075b60ad50374593302e08f42aeacf25
+ Change-Id: I8036dc1388438a4940e6f4ae297162902afd8d3a
-commit 9189f4ea4bb2d71ea7f6b9d9bd3290415aee323d
+commit 0338f9a8e69582a550ef6d128e447779536d623c
Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Fri Apr 19 17:09:49 2013 -0700
+Date: Mon Sep 2 22:28:40 2013 -0700
- Enable pre-ordering for SPARSE_NORMAL_CHOLESKY.
-
- Sparse Cholesky factorization algorithms use a fill-reducing
- ordering to permute the columns of the Jacobian matrix. There
- are two ways of doing this.
-
- 1. Compute the Jacobian matrix in some order and then have the
- factorization algorithm permute the columns of the Jacobian.
-
- 2. Compute the Jacobian with its columns already permuted.
-
- The first option incurs a significant memory penalty. The
- factorization algorithm has to make a copy of the permuted
- Jacobian matrix.
-
- Starting with this change Ceres pre-permutes the columns of the
- Jacobian matrix and generally speaking, there is no performance
- penalty for doing so.
-
- In some rare cases, it is worth using a more complicated
- reordering algorithm which has slightly better runtime
- performance at the expense of an extra copy of the Jacobian
- matrix. Setting Solver::Options::use_postordering to true
- enables this tradeoff.
+ ITERATIVE_SCHUR works with no f-blocks.
- This change also removes Solver::Options::use_block_amd
- as an option. All matrices are ordered using their block
- structure. The ability to order them by their scalar
- sparsity structure has been removed.
+ When the Schur complement is of size zero,
+ i.e. none of the parameter blocks interact
+ with each other, the ITERATIVE_SCHUR linear
+ solver crashes due to some checks that are
+ triggered in the SCHUR_JACOBI preconditioner.
- Here is what performance on looks like on some BAL problems.
+ This patch adds logic to detect this condition
+ and to deal with it and adds tests that verify
+ the fix.
- Memory
- ======
- HEAD pre-ordering
- 16-22106 137957376.0 113516544.0
- 49-7776 56688640.0 46628864.0
- 245-198739 1718005760.0 1383550976.0
- 257-65132 387715072.0 319512576.0
- 356-226730 2014826496.0 1626087424.0
- 744-543562 4903358464.0 3957878784.0
- 1024-110968 968626176.0 822071296.0
+ Thanks to Soohyun Bae for reporting this bug.
- Time
- ====
- HEAD pre-ordering
- 16-22106 3.8 3.7
- 49-7776 1.9 1.8
- 245-198739 82.6 81.9
- 257-65132 14.0 13.4
- 356-226730 98.8 95.8
- 744-543562 325.2 301.6
- 1024-110968 42.1 37.1
-
- Change-Id: I6b2e25f3fed7310f88905386a7898ac94d37467e
+ Change-Id: If29ddf32463cbb1960414fff0e29bbf0d2ee7989
-commit f7ed22efc3afee36aae71a4f7949b3d327b87f11
-Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Fri Apr 19 14:24:48 2013 -0700
+commit 263de47419167786c9ab6d93fa2f3e32e8e75fe1
+Author: Taylor Braun-Jones <taylor@braun-jones.org>
+Date: Thu Aug 29 10:33:29 2013 -0400
- Add the ability to order the Program using AMD.
+ Incorporate RHEL build fixes from Brian Pitts
- This will allow CHOLMOD to compute the sparse
- Cholesky factorization of J'J without making
- a permuted copy of it.
+ CMake build fixed so that versioned shared libraries are installed
+ (along with .so symlinks)
- Change-Id: I25d0e18f5957ab7fdce15c543234bb2f09db482e
+ Change-Id: Ibbaea9d37d17754cb8c3cd36fc17d015ca7d2a57
-commit c8f07905d76d9ac6fb8d7b9b02e180aa2fa0ab32
+commit 6b4131993ec0db6c850bb2ae07ba8793dbab3e39
Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Fri Apr 19 08:01:04 2013 -0700
+Date: Mon Aug 26 00:02:50 2013 -0700
- Refactor SolverImpl::CreateReducedProgram.
+ Update spec file
- Break up CreateReducedProgram into smaller functions in
- preparation for more sophisticated ordering strategies.
-
- Change-Id: Ic3897522574fde770646d747fe383f5dbd7a6619
+ Change-Id: Id6426d7cad41cde2cbab411964ac013d724a066c
-commit 2560b17b7cdda1de28c18049c95e6c3188dbde93
+commit c24a4ec6fb6202d1f6a576f211b99fbe9c9906ef
Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Fri Apr 19 08:19:11 2013 -0700
+Date: Fri Aug 23 06:49:22 2013 -0700
- SuiteSparse cleanup.
-
- 1. CreateSparseMatrixTransposeView now returns a struct instead
- of a pointer.
+ Cmake refactoring
- 2. Add AnalyzeCholeskyWithNaturalOrdering.
+ 1. Use CMake FindLAPACK and FindBLAS Modules.
+ 2. Remove SEARCH_HEADERS and SEARCH_LIBS and replace them with
+ CMAKE variables. This leads to simplification of the FIND_LIBRARY
+ and FIND_PATH calls.
+ 3. Make miniglog a fallback when glog is not present and the
+ user indicates MINIGLOG=OFF.
+ 4. Add time.h to miniglog.
+ 5. Remove shared library building.
- Change-Id: If27a5502949c3994edd95be0d25ec7a0d1fa1ae1
+ Change-Id: I8a97156d3d7cf645fbbfe8e571761bc16c89f43f
-commit 7823cf23c765450b79f11ac31fc8a16f875c0d84
+commit 48e9cd31db0bf7223beb83cdc90e3cd2b5aad054
Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Thu Apr 18 16:13:56 2013 -0700
+Date: Wed Aug 21 10:55:16 2013 -0700
- Fix a typo in problem.h
-
- Thanks as usual to William Rucklidge.
+ Add a test name
- Change-Id: If6e8628841ee7fa8978ec56918a80d60b4ff660e
+ Change-Id: I06dfc9cad2c54ef6078342766577eab92645283f
-commit 3d9546963d7c8c5f5dfb12a2df745f4996fd2ec5
+commit 126dfbe27df9c5b9f41cf7cc92b75c1219518283
Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Thu Apr 18 14:54:55 2013 -0700
+Date: Tue Aug 20 22:34:34 2013 -0700
- Add the ability to query the Problem about parameter blocks.
+ Fix how Ceres calls CAMD.
- Change-Id: Ieda1aefa28e7a1d18fe6c8d1665882e4d9c274f2
-
-commit 69ebad42ebfc212339a22c6f06a12ec5a3368098
-Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Wed Apr 17 15:38:00 2013 -0700
-
- Change Minimizer::Options::min_trust_region_radius to double.
+ CAMD requires that the id of the largest numbered elimination
+ group be less than the number of columns in the matrix.
- This was accidentally an int, which was setting the minimum
- trust region radius to zero and effectively disabling a convergence
- test based on it.
+ This patch ensures that this is the case. Without this,
+ in certain cases its possible for CAMD to silently fail
+ while doing out of bounds access and then causing Ceres to fail.
- (Thanks to Sergey Sharybin for providing a reproduction for this)
+ Also add some logging about the problem size before and after
+ the reduced program has been created.
- Change-Id: Id0b9e246bcfee074954a5dc6a3a2342adab56c16
+ Change-Id: I0ea3c6572a7c29cbbf09afec9ba5b4f4d4b21a9b
-commit e6707b2411b9a823b6c748f9f9d0b22225d767bb
+commit 69af5d8b4d7c48b2efa3c61e51c86cfa1b380b8a
Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Tue Apr 16 15:44:23 2013 -0700
+Date: Tue Aug 20 13:58:59 2013 -0700
- Lint fixes from William Rucklidge.
+ Add comments to trust_region_minimizer.cc.
- Change-Id: I57a6383bb875b24083cd9b7049333292d26f718c
-
-commit c7e69beb52c2c47182eaf8295025a668d0eefd80
-Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Tue Apr 16 09:39:16 2013 -0700
-
- Add a missing mutex lock in the SchurEliminator. This
- was lost somewhere along in the BLAS based refactoring.
+ trust_region_minimizer.cc now contains a comment that explains
+ the reasoning behind he inner iteration step acceptance change.
- Change-Id: I90b94fa9c3a8ea1b900a18f76ef6a7d0dbf24318
+ Change-Id: I4eaa69d6bab92c543bba3f119c09f44625d393bd
-commit faa72ace9abea24877173158bfec451d5b46597e
-Author: Joydeep Biswas <joydeep.biswas@gmail.com>
-Date: Mon Apr 15 17:34:43 2013 -0400
-
- Update to compile with stricter gcc checks.
-
- Change-Id: Iecb37cbe7201a4d4f42b21b427fa1d35d0183b1b
-
-commit 487250eb27256a41d38c5037bdac9a09a3160edb
+commit e45db9d05aaa26b1ddffa44c9190a1018aa2655f
Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Fri Apr 5 14:20:37 2013 -0700
+Date: Mon Aug 19 23:13:29 2013 -0700
- Minor cleanups.
-
- 1. Further BLAS and heap allocation cleanups in schur_eliminator_impl.h
- 2. Modularize blas.h using macros.
- 3. Lint cleanups from William Rucklidge.
- 4. Small changes to jet.h
- 5. ResidualBlock now uses blas.h
-
- Performance improvements:
-
- For static and dynamic sized blocks, the peformance is not changed much.
+ Improve inner iteration step acceptance.
- -use_quaternions -ordering user -linear_solver sparse_schur
+ Normally, in a trust region algorithm the quality of a trust region step
+ is measured by the ratio
- master change
- problem: 16-22106
- gcc 3.4 3.3
- clang 2.8 2.7
+ nonlinear_cost_change
+ r = ---------------------
+ model_cost_change
- problem: 49-7776
- gcc 1.7 1.7
- clang 1.4 1.4
+ All the change in the nonlinear objective is due to the trust region step
+ so this ratio is a good measure of the quality of the trust region radius.
- problem: 245-198739
- gcc 80.1 79.6
- clang 80.6 76.2
+ However, when inner iterations are being used, nonlinear_cost_change
+ includes the contribution of the inner iterations and its not fair to
+ credit it all to the trust region algorithm. So we change the ratio to be
- problem: 257-65132
- gcc 12.2 12.0
- clang 10.4 10.2
+ nonlinear_cost_change
+ r = ------------------------------------------------
+ (model_cost_change + inner_iteration_cost_change)
- problem: 356-226730
- gcc 99.0 96.8
- clang 88.9 88.3
+ In most cases this is fine, but it can be the case that the
+ change in solution quality due to inner iterations is so large
+ and the trust region step is so bad, that this ratio can become
+ quite small.
- problem: 744-543562
- gcc 361.5 356.2
- clang 352.7 343.5
+ This can cause the trust region loop to reject this step.
- problem: 1024-110968
- gcc 45.9 45.6
- clang 42.6 42.1
+ This change, fixes this problem by looking at the inner_iteration_cost_change
+ explicitly and accepting a step if the inner iterations led to a net
+ decrease in the objective function value.
- However, performance when using local parameterizations is
- significantly improved due to residual_block.cc using blas.h
+ Along the way it also fixes the way model_cost_change is computed.
+ Changing to a more numerically robust way of computing it.
- -use_quaternions -use_local_parameterization -ordering user -linear_solver sparse_schur
+ The last and final change is to ensure that inner iterations and the
+ non-monotonic version of the trust region algorithm interact correctly.
- master change
- problem: 16-22106
- gcc 3.6 3.3
- clang 3.5 2.8
+ This addresses part 2 of
- problem: 49-7776
- gcc 1.8 1.6
- clang 1.7 1.4
+ https://code.google.com/p/ceres-solver/issues/detail?id=115
- problem: 245-198739
- gcc 79.7 76.1
- clang 79.7 73.0
+ As an illustration of the change.
- problem: 257-65132
- gcc 12.8 11.9
- clang 12.3 9.8
+ Before this change
- problem: 356-226730
- gcc 101.9 93.5
- clang 105.0 86.8
+ [master] build: ./bin/bundle_adjuster --input ~/Downloads/problem-245-198739-pre.txt -num_iterations 10 -translation_sigma 0.01 -rotation_sigma 0.001 -point_sigma 0.1 -inner_iterations -num_threads 4
+ 0: f: 7.731660e+15 d: 0.00e+00 g: 3.51e+12 h: 0.00e+00 rho: 0.00e+00 mu: 1.00e+04 li: 0 it: 5.87e-01 tt: 9.37e+00
+ 1: f: 7.731660e+15 d: 7.73e+15 g: 0.00e+00 h: 1.20e+10 rho: 2.43e-11 mu: 5.00e+03 li: 1 it: 1.41e+01 tt: 2.35e+01
+ 2: f: 7.731660e+15 d: 7.73e+15 g: 0.00e+00 h: 1.25e+10 rho: 1.70e-07 mu: 1.25e+03 li: 1 it: 1.86e+01 tt: 4.22e+01
+ 3: f: 7.731660e+15 d:-2.39e+40 g: 0.00e+00 h: 3.53e+10 rho:-2.63e-13 mu: 1.56e+02 li: 1 it: 3.35e+01 tt: 7.57e+01
+ 4: f: 7.731660e+15 d:-1.66e+39 g: 0.00e+00 h: 1.21e+11 rho:-6.58e-15 mu: 9.77e+00 li: 1 it: 3.86e+01 tt: 1.14e+02
+ 5: f: 7.731660e+15 d:-3.57e+55 g: 0.00e+00 h: 5.00e+12 rho:-1.89e-14 mu: 3.05e-01 li: 1 it: 3.84e+01 tt: 1.53e+02
+ 6: f: 7.731660e+15 d:-2.26e+35 g: 0.00e+00 h: 3.82e+12 rho:-1.77e-20 mu: 4.77e-03 li: 1 it: 3.45e+01 tt: 1.87e+02
+ 7: f: 7.731660e+15 d:-5.31e+19 g: 0.00e+00 h: 1.22e+11 rho:-9.96e-21 mu: 3.73e-05 li: 1 it: 2.77e+01 tt: 2.15e+02
+ 8: f: 1.784990e+08 d: 7.73e+15 g: 4.13e+07 h: 1.20e+10 rho: 1.00e+00 mu: 1.12e-04 li: 1 it: 1.13e+01 tt: 2.26e+02
+ 9: f: 1.524025e+08 d: 2.61e+07 g: 5.81e+10 h: 2.41e+08 rho: 1.00e+00 mu: 3.35e-04 li: 1 it: 1.13e+01 tt: 2.37e+02
+ 10: f: 1.488524e+08 d: 3.55e+06 g: 2.79e+09 h: 5.01e+08 rho: 1.00e+00 mu: 1.01e-03 li: 1 it: 1.09e+01 tt: 2.48e+02
- problem: 744-543562
- gcc 367.9 350.5
- clang 355.3 323.1
+ After this change
- problem: 1024-110968
- gcc 43.0 40.3
- clang 41.0 37.5
+ [inner] build: ./bin/bundle_adjuster --input ~/Downloads/problem-245-198739-pre.txt -num_iterations 10 -translation_sigma 0.01 -rotation_sigma 0.001 -point_sigma 0.1 -inner_iterations -num_threads 4
+ 0: f: 7.731660e+15 d: 0.00e+00 g: 3.51e+12 h: 0.00e+00 rho: 0.00e+00 mu: 1.00e+04 li: 0 it: 5.66e-01 tt: 9.31e+00
+ 1: f: 5.941477e+09 d: 7.73e+15 g: 1.20e+18 h: 1.20e+10 rho: 2.43e-11 mu: 5.00e+03 li: 1 it: 1.38e+01 tt: 2.32e+01
+ 2: f: 3.341986e+08 d: 5.61e+09 g: 1.42e+14 h: 1.37e+09 rho: 9.38e-08 mu: 2.50e+03 li: 1 it: 1.30e+01 tt: 3.61e+01
+ 3: f: 3.241492e+08 d: 1.00e+07 g: 3.64e+13 h: 8.26e+08 rho: 6.12e-08 mu: 1.25e+03 li: 1 it: 1.15e+01 tt: 4.77e+01
+ 4: f: 3.152280e+08 d: 8.92e+06 g: 2.02e+13 h: 2.95e+08 rho: 1.56e-05 mu: 6.25e+02 li: 1 it: 1.11e+01 tt: 5.88e+01
+ 5: f: 3.078535e+08 d: 7.37e+06 g: 9.72e+12 h: 4.57e+08 rho: 6.55e-09 mu: 3.13e+02 li: 1 it: 1.16e+01 tt: 7.04e+01
+ 6: f: 3.025353e+08 d: 5.32e+06 g: 1.33e+13 h: 2.14e+08 rho: 7.21e-01 mu: 3.42e+02 li: 1 it: 1.14e+01 tt: 8.18e+01
+ 7: f: 2.908298e+08 d: 1.17e+07 g: 5.97e+12 h: 7.25e+08 rho: 5.73e-01 mu: 3.43e+02 li: 1 it: 1.08e+01 tt: 9.26e+01
+ 8: f: 2.803927e+08 d: 1.04e+07 g: 1.07e+12 h: 9.72e+07 rho: 5.27e-01 mu: 3.43e+02 li: 1 it: 1.03e+01 tt: 1.03e+02
+ 9: f: 2.767074e+08 d: 3.69e+06 g: 2.10e+11 h: 7.35e+07 rho: 7.37e-01 mu: 3.84e+02 li: 1 it: 1.03e+01 tt: 1.13e+02
+ 10: f: 2.744282e+08 d: 2.28e+06 g: 2.17e+11 h: 1.23e+08 rho: 3.11e-01 mu: 3.64e+02 li: 1 it: 9.61e+00 tt: 1.23e+02
- Change-Id: I6dcf7476ddaa77cb116558d112a9cf1e832f5fc9
+ Change-Id: I7c3b132f7ce62719795bfa489ec2276d0455cc97
-commit eeedd3a59281eb27025d7f9aa944d9aff0666590
-Author: Sergey Sharybin <sergey.vfx@gmail.com>
-Date: Wed Apr 10 23:58:32 2013 +0600
+commit 3e6ef29be6f3cd672a73cefb52838832a49e5427
+Author: Sameer Agarwal <sameeragarwal@google.com>
+Date: Tue Aug 20 09:53:54 2013 -0700
- Autodiff local parameterization class
-
- This class is used to create local parameterization
- with Jacobians computed via automatic differentiation.
-
- To get an auto differentiated local parameterization,
- class with a templated operator() (a functor) that
- computes
-
- plus_delta = Plus(x, delta);
-
- shall be defined.
+ Update version history to reflect API changes
- Then given such functor, the auto differentiated local
- parameterization can be constructed as
-
- LocalParameterization* local_parameterization =
- new AutoDiffLocalParameterization<PlusFunctor, 4, 3>;
- | |
- Global Size ---------------+ |
- Local Size -------------------+
-
- See autodiff_local_parameterization.h for more information
- and usage example.
-
- Initial implementation by Keir Mierle, finished by self
- and integrated into Ceres and covered with unit tests
- by Sameer Agarwal.
-
- Change-Id: I1b3e48ae89f81e0cf1f51416c5696e18223f4b21
+ Change-Id: I5ce744d72b991abba17b5cf9c6a1e1f158693151
-commit d8d541674da5f3ba7a15c4003fa18577479f8f8c
-Author: Sergey Sharybin <sergey.vfx@gmail.com>
-Date: Wed Apr 10 11:13:27 2013 +0600
+commit 1918453aeeae629be1f02eb333e91c4f728ace12
+Author: Sameer Agarwal <sameeragarwal@google.com>
+Date: Mon Aug 19 14:15:48 2013 -0700
- Do not modify cached CMAKE_CXX_FLAGS_RELEASE
+ Fix build breakage on old SuiteSparse.
- Adding compiler's flags and force updating cached value
- of release C++ flags lead to appending special compiler
- flags on every edit of any CMakeList.txt.
+ Errant semi colon is to blame.
- For compile result this is harmless, but was annoying
- slight modification of CMakeList.txt triggered full
- project rebuild.
+ Thanks to Timothy Langlois for reporting this.
- Now modified C++ flags are used for the whole subtree
- starting from the project root, but this doesn't lead
- to flags modified in cache.
-
- Change-Id: Ieb32bd7f96d5a09632f0b2b5325f6567be8cb5a8
+ Change-Id: I57bb1cd69d78ab1897ead3627539a0da11b97455
-commit c290df85a40a8dd117b5eccc515bf22b0d9b1945
+commit 8f33332c598d8209df73eb1c729e0abe2c890468
Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Sun Apr 7 09:17:47 2013 -0700
+Date: Sun Aug 18 23:25:00 2013 -0700
- Typo fix.
-
- (Thanks to Pieree Moulon for reporting this)
+ Documentation update for 1.7.0rc2
- Change-Id: I536724ab4b7e9c97768d5197aa86b41f37a04d38
+ Change-Id: I6b0c19bed57b51a0f6591c60a4ae0d849c62451b
-commit dc3a27fa60ba7c6b152660afd5abe1c8b608dec3
+commit ad2819a1afa94990022999a96eb158add68419e0
Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Sat Apr 6 19:32:47 2013 -0700
+Date: Sat Aug 17 23:44:09 2013 -0700
- Fix MatrixVectorMultiply and incorrect DCHECKS.
+ Fix breakage on old versions of SuiteSparse.
- (Thanks to Serget Sharybin for reporting this)
+ Thanks to Fisher Yu for reporting this.
- Change-Id: I6bbc41667308fc2932871cf25ad07b431f70801f
+ Change-Id: Iefa89816cbb60e3512338a7c2a65655c017877ac
-commit 585607171f20d591033dfea43b6dd22fea755a6c
+commit 880cba0939b2caa2641a5752373ffd47b64edd0f
Author: Petter Strandmark <petter.strandmark@gmail.com>
-Date: Sun Apr 7 01:24:13 2013 +0200
+Date: Fri Aug 16 20:05:30 2013 +0200
- <iterator> needed for back_insert_iterator
+ Fix warning C4373 in Visual Studio
- Adding this header was required to make Ceres compile with VS2010.
+ The warning occurs because an overridden function added a const
+ to one argument.
- Change-Id: I000c860da4fd385d625e70695564225bdfd433c7
+ Change-Id: Idd24f7c6ab60064747104bfc75ae9bf112f61b3e
-commit 520d35ef22dbcb05e344451c03ae64304e524a06
+commit d61b68aaac3fa51b8fca8b1a268e83b0d5da01ea
Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Thu Apr 4 08:16:02 2013 -0700
+Date: Fri Aug 16 17:02:56 2013 -0700
- Further BLAS improvements.
-
- 1. Switch to Eigen's implementation when all dimensions are fixed.
- 2. Use lazyProduct for eigen matrix-vector product. This brings
- eigen's performance on iterative_schur closer to what it used
- to be before the last commit. There is however still an
- improvement to be had by using the naive implementation when
- the matrix and vector have dynamic dimensions.
-
- BENCHMARK
- HEAD CHANGE
-
- problem-16-22106-pre.txt
- gcc-eigen sparse_schur 0.859 gcc-eigen sparse_schur 0.853
- clang-eigen sparse_schur 0.848 clang-eigen sparse_schur 0.850
- gcc-blas sparse_schur 0.956 gcc-blas sparse_schur 0.865
- clang-blas sparse_schur 0.954 clang-blas sparse_schur 0.858
- gcc-eigen iterative_schur 4.656 gcc-eigen iterative_schur 3.271
- clang-eigen iterative_schur 4.664 clang-eigen iterative_schur 3.307
- gcc-blas iterative_schur 2.598 gcc-blas iterative_schur 2.620
- clang-blas iterative_schur 2.554 clang-blas iterative_schur 2.567
+ Lint cleanups from William Rucklidge
- problem-49-7776-pre.txt
- gcc-eigen sparse_schur 0.477 gcc-eigen sparse_schur 0.472
- clang-eigen sparse_schur 0.475 clang-eigen sparse_schur 0.479
- gcc-blas sparse_schur 0.521 gcc-blas sparse_schur 0.469
- clang-blas sparse_schur 0.508 clang-blas sparse_schur 0.471
- gcc-eigen iterative_schur 3.172 gcc-eigen iterative_schur 2.088
- clang-eigen iterative_schur 3.161 clang-eigen iterative_schur 2.079
- gcc-blas iterative_schur 1.701 gcc-blas iterative_schur 1.720
- clang-blas iterative_schur 1.708 clang-blas iterative_schur 1.694
-
- problem-245-198739-pre.txt
- gcc-eigen sparse_schur 28.092 gcc-eigen sparse_schur 28.233
- clang-eigen sparse_schur 28.148 clang-eigen sparse_schur 28.400
- gcc-blas sparse_schur 30.919 gcc-blas sparse_schur 28.110
- clang-blas sparse_schur 31.001 clang-blas sparse_schur 28.407
- gcc-eigen iterative_schur 63.095 gcc-eigen iterative_schur 43.694
- clang-eigen iterative_schur 63.412 clang-eigen iterative_schur 43.473
- gcc-blas iterative_schur 33.353 gcc-blas iterative_schur 33.321
- clang-blas iterative_schur 33.276 clang-blas iterative_schur 33.278
+ Change-Id: Ia4756ef97e65837d55838ee0b30806a234565bfd
+
+commit b22d063075ec545a59a25abd5d83e4642dc329c2
+Author: Sameer Agarwal <sameeragarwal@google.com>
+Date: Thu Aug 15 22:55:23 2013 -0700
+
+ Reduce memory usage in covariance estimation.
- problem-257-65132-pre.txt
- gcc-eigen sparse_schur 3.687 gcc-eigen sparse_schur 3.629
- clang-eigen sparse_schur 3.669 clang-eigen sparse_schur 3.652
- gcc-blas sparse_schur 3.947 gcc-blas sparse_schur 3.673
- clang-blas sparse_schur 3.952 clang-blas sparse_schur 3.678
- gcc-eigen iterative_schur 121.512 gcc-eigen iterative_schur 76.833
- clang-eigen iterative_schur 123.547 clang-eigen iterative_schur 78.763
- gcc-blas iterative_schur 68.334 gcc-blas iterative_schur 68.612
- clang-blas iterative_schur 67.793 clang-blas iterative_schur 68.266
+ When using the SPARSE_QR algorithm, now a Q-less
+ factorization is used. This results in significantly
+ less memory usage.
- Notes:
+ The inversion of the semi-normal equations is now
+ threaded using openmp. Indeed if one has SuiteSparse
+ compiled with TBB, then both the factorization
+ and the inversion are completely threaded.
- 1. Naive BLAS was a bit worse than eigen on fixed sized matrices. We did not see this
- before because of the different inlining thresholds. Fixing this boosted eigen's
- performance. Also the disparity between gcc and clang has gone away.
+ Change-Id: Ia07591e48e7958d427ef91ff9e67662f6e982c21
+
+commit f258e4624f5bd86105ea28b9b92dd70a3f4a3a44
+Author: Sergey Sharybin <sergey.vfx@gmail.com>
+Date: Thu Aug 15 14:50:08 2013 +0600
+
+ Move most of suitesparse/cxsparse ifdef code to their headers
- 2. SPARSE_SCHUR performance remains the same, since it is only testing static sized
- matrices.
+ Main purpose of this is to make implementation files free from
+ endless ifdef blocks every time this libraries are needed to be
+ included. This would hopefully prevent compilation errors in
+ the future caused by missing ifdef around header include.
- 3. ITERATIVE_SCHUR performance goes up substantially due to the lazyProduct change,
- but even there, since most of the products are dynamic sized, the naive implementation
- wins handily.
+ This also includes some stubs added to suitesparse/cxsparse
+ headers to make code even more free from ifdefs.
- Change-Id: Idc17f35b9c68aaebb1b2e131adf3af8374a85a4c
+ Change-Id: Ic8554e7df31d8c4751583fe004b99e71b3c9087b
-commit 25ac54807eedf16fd6c34efc390901ee549a7d14
+commit dc60d9c4519b5eb5e2cff8741680fecf4d6eb2c5
Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Wed Apr 3 18:51:27 2013 -0700
+Date: Thu Aug 15 10:13:45 2013 -0700
- Speed up Jets.
+ Fix broken android build.
- Change-Id: I101bac1b1a1cf72ca49ffcf843b73c0ef5a6dfcb
+ Change-Id: I6f27e3ef9bd678f7393c9f573491064978e9c368
-commit 3d6eceb45cf27024865908f0c10a5c2b0f8719cf
+commit 367b65e17a541a9f29b9ea63682fe6f6b5b54074
Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Tue Apr 2 21:45:48 2013 -0700
+Date: Fri Aug 9 10:35:37 2013 -0700
- Replace more instances of Eigen GEMV with Ceres BLAS.
+ Multiple dense linear algebra backends.
+
+ 1. When a LAPACK implementation is present, then
+ DENSE_QR, DENSE_NORMAL_CHOLESKY and DENSE_SCHUR
+ can use it for doing dense linear algebra operations.
+
+ 2. The user can switch dense linear algebra libraries
+ by setting Solver::Options::dense_linear_algebra_library_type.
- With this ITERATIVE_SCHUR with JACOBI preconditioner went down from
- 280 seconds to 150 seconds on problem-744-543562-pre.txt.
+ 3. Solver::Options::sparse_linear_algebra_library is now
+ Solver::Options::sparse_linear_algebra_library_type to be consistent
+ with all the other enums in Solver::Options.
- Change-Id: I4f319c1108421e8d59f58654a4c0576ad65df609
+ 4. Updated documentation as well as Solver::Summary::FullReport
+ to reflect these changes.
+
+ Change-Id: I5ab930bc15e90906b648bc399b551e6bd5d6498f
-commit 296fa9b1279ee1900c8ae32d70e97cd10fc0b46b
+commit 080d1d04bdf722c3f602833c4c07ac1c5d26fcc0
Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Tue Apr 2 09:44:15 2013 -0700
+Date: Mon Aug 12 16:28:37 2013 -0700
- Replace Eigen block operations with small GEMM and GEMV loops.
+ Use more performant, less conservative Eigen solvers.
+
+ colPivHouseholderQR -> householderQR
+ ldlt -> llt.
+
+ The resulting performance differences are significant enough
+ to justify switching.
- 1. Add Matrix-Matrix and Matrix-Vector multiply functions.
- 2. Replace Eigen usage in SchurEliminator with these custom
- matrix operations.
- 3. Save on some memory allocations in ChunkOuterProduct.
- 4. Replace LDLT with LLT.
+ LAPACK's dgels routine used for solving linear least squares
+ problems does not use pivoting either.
- As a result on problem-16-22106-pre.txt, the linear solver time
- goes down from 1.2s to 0.64s.
+ Similarly, we are not actually using the fact that the matrix
+ being factorized can be indefinite when using LDLT factorization, so
+ its not clear that the performance hit is worth it.
- Change-Id: I2daa667960e0a1e8834489965a30be31f37fd87f
+ These two changes result in Eigen being able to use blocking
+ algorithms, which for Cholesky factorization, brings the performance
+ closer to hardware optimized LAPACK. Similarly for dense QR
+ factorization, on intel there is a 2x speedup.
+
+ Change-Id: I4459ee0fc8eb87d58e2b299dfaa9e656d539dc5e
-commit 222ca20e8facf706582fe696b7f41247391eac12
-Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Mon Apr 1 09:11:07 2013 -0700
+commit fb465a03b83fad2dceaea091ee3763c3dc6e83d2
+Author: Sergey Sharybin <sergey.vfx@gmail.com>
+Date: Mon Aug 5 22:35:14 2013 -0700
- SuiteSparse cleanup.
+ Fix compilation error caused by missing suitesparse headers
- 1. Silence CHOLMOD's indefiniteness warnings.
- 2. Add a comment about how the error handling in suitesparse.cc
- needs to be improved.
- 3. Move the analysis logging into suitesparse.cc and out of the
- three callsites.
+ Covariance implementation file used to unconditionally include
+ SuiteSparseQR.hpp which caused compilation error in cases you
+ don't have SuiteSuite installed to the system
- Change-Id: Idd396b8ea4bf59fc1ffc7f9fcbbc7b38ed71643c
+ Moved the include to #ifdef block.
+
+ Change-Id: I3a52c0f81711b2b70ae625fe80b758ecb0817cc6
-commit b7ba93459b7f584eedb1a9f42f3d06bccabd33dc
-Author: Petter Strandmark <petter.strandmark@gmail.com>
-Date: Tue Feb 19 12:52:58 2013 +0100
+commit 2460bf0733b4070e52d68a4a85046c1b20913e2c
+Author: Steven Lovegrove <stevenlovegrove@gmail.com>
+Date: Sun Jul 21 13:13:11 2013 -0400
- Enable larger tuple sizes for Visual Studio 2012.
+ Check GCC Version before adding -fast compiler option on OSX.
- Visual Studio 2012 does not have variadic templates and implements
- tuples differently. By default, only sizes up to 5 are supported,
- which conflicts with Gtest.
+ -fast compiler option is only supported using Apple's GCC packaged with XCode.
+ Other GCC versions will fail when this flag is enabled. This commit checks the
+ GCC version on OSX and only enables this flag when < 4.3. Apple's GCC is
+ currently 4.2.1 and a user is unlikely to install a non-apple version this old
+ on OSX.
- Change-Id: Ieb8d59e4329863cbfa2729d8a76db0714c08d259
+ Change-Id: Ifca9149625c065cd16559d7e30c218a322cf79aa
-commit 564a83fcc690ac8383bf52a782c45757ae7fa2ad
+commit c5bcfc01af37b4f667be075c3c58dc024f3c7f06
Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Tue Mar 26 11:11:43 2013 -0700
+Date: Fri Jul 19 15:50:27 2013 -0700
- Lint cleanup from William Rucklidge.
+ Lint fixes from Jim Roseborough.
- Change-Id: I8d4a0aa3e264775d20e99a6b5265f3023de92560
+ Change-Id: If93e1972041b36410225a509e3c8c7c818f92124
-commit cbe64827becbbaab5b435a71bf00353b4ddd026b
+commit 16924168ce0b3e29d9b1e16a08d2b3d2930e017a
Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Mon Mar 25 17:39:53 2013 -0700
+Date: Thu Jul 18 12:52:35 2013 -0700
- Update documentation
+ Update version from 1.6.0 -> 1.7.0rc1.
- Change-Id: Iea3c4b5409e593b1fb070a491ba8a479db32ca58
+ Change-Id: I420a8907142bffad0e3aa6c7196541ca2309c099
-commit 802639c89603c9541e624766349d1989a1f641c0
-Author: Pablo Speciale <pablo.speciale@gmail.com>
-Date: Mon Mar 25 20:53:45 2013 -0700
+commit 588228bdadcc0a1ffc55442a0672998241e53e09
+Author: Sameer Agarwal <sameeragarwal@google.com>
+Date: Thu Jul 18 11:29:19 2013 -0700
- ceresproblem label was incorrect
+ Add the ability to turn shared library compilation on and off
- Change-Id: I3e210375adba4fa50ff3c25398b20a65d241cb35
+ Change-Id: Ib9eacfbc894bb2b66aafff3b930c63e2ad8a555e
-commit 6bcb8d9c304a3b218f8788018dfdfe368bb7d60c
-Author: Pablo Speciale <pablo.speciale@gmail.com>
-Date: Mon Mar 25 16:40:26 2013 -0700
+commit 6d93450cb563dc992cbc29ca069c886bf24bb458
+Author: Sameer Agarwal <sameeragarwal@google.com>
+Date: Thu Jul 18 11:08:07 2013 -0700
- Compiling against static or shared library
+ Fix build breakage on old versions of SuiteSparse.
+
+ SuiteSparse_long is only defined in recent versions of SuiteSparse
+ as the index variable type for large matrices. In older versions
+ UF_long was used. Ubuntu still ships with an older version of
+ SuiteSparse, so an ifdef is needed to fix the build.
+
+ This patch has been tested on mac and on linux with older and
+ newer versions of SuiteSparse.
- Change-Id: I3fb35e9a49f90b8894f59dde49c90a7c2dd74b0a
+ Change-Id: I4ada86d7973784a79bde4afec13ce3ca4e8dc225
-commit 619cfe692020c078275b68eac2167232fafdfffb
+commit 42be9cafe6203745fb09d611773305433c117396
Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Mon Mar 25 14:03:41 2013 -0700
+Date: Thu Jul 18 08:02:08 2013 -0700
- Update version history
+ Update documentation for Covariance
- Change-Id: I1d036efad1507efd19d8581f147b38170b1f0543
+ Change-Id: Ia4a7347ef8267b7107698d85fcbfc986111958dc
-commit 6ae34757850a5fa8213e0d1a540d9d75d6840a08
-Author: Pablo Speciale <pablo.speciale@gmail.com>
-Date: Sun Mar 24 22:30:52 2013 -0700
+commit 5a974716e111e4aa87a4840902b957060bd644fc
+Author: Sameer Agarwal <sameeragarwal@google.com>
+Date: Fri Jun 7 22:38:30 2013 -0700
- Added documentation regarding the use of Ceres with cmake (once installed)
- Commets about the flag ``BUILD_DOCUMENTATION=ON``
+ Covariance estimation using SuiteSparseQR.
- Change-Id: I8814927e60af190c8043bfc36e77fe76bfe6f562
+ Change-Id: I70d1686e3288fdde5f9723e832e15ffb857d6d85
-commit f46de9e697eb5b8756084615e29ded48600a4d39
-Author: Sergey Sharybin <sergey.vfx@gmail.com>
-Date: Thu Mar 21 15:31:35 2013 +0600
+commit 719889b8b7a3ef6712516d169a4ce3a33d272fda
+Author: Sameer Agarwal <sameeragarwal@google.com>
+Date: Wed Jul 17 11:31:08 2013 -0700
- Silent no previous declaration warning for FindParameterBlockOrDie
+ Minor fixes
- Use anonymous namespace for this. Also move some surrounding static
- function to this anonymous namespace.
+ 1. Typo in c_api.h
+ 2. The stream operator for FunctionSample is now in the ceres::internal namespace.
- Change-Id: Ie235eb7936976563a9db115ec13c59e6e6869b96
+ Change-Id: Id927a7a49c47d8903505535749ecca78cd2e83b3
-commit 16636efeffacdd69d075a60ea8a94d98fd81c6fd
-Author: Sergey Sharybin <sergey.vfx@gmail.com>
-Date: Thu Mar 21 15:12:01 2013 +0600
+commit 12cc164f79bb8a31e0eb3946e6f4898ac3c21c55
+Author: Alex Stewart <alexs.mac@gmail.com>
+Date: Wed Jul 17 12:08:33 2013 +0100
- Compilation fix for msvc2010
+ Minor fix to reject a line search config with negative L-BFGS rank.
- Usage of back_inserter requires <iterator> header when using msvc2010
+ Change-Id: Iad4c678efe574ef6696c34bd2a0ce61a504c7344
+
+commit 9aa0e3cf7243a2e837bbfa22d4677010463f6a4e
+Author: Alex Stewart <alexs.mac@gmail.com>
+Date: Fri Jul 5 20:22:37 2013 +0100
+
+ Adding Wolfe line search algorithm and full BFGS search direction options.
- Change-Id: I92ee1649795ce0468ce337fc414eb0ca6e90c51e
+ Change-Id: I9d3fb117805bdfa5bc33613368f45ae8f10e0d79
-commit ac0d416991274ed67fe85371f09b07f706a6db9a
-Author: Pablo Speciale <pablo.speciale@gmail.com>
-Date: Wed Mar 20 18:32:14 2013 -0700
+commit 51c772c843ccecca006c706a9f64b8cbaf5416f9
+Author: Sameer Agarwal <sameeragarwal@google.com>
+Date: Tue Jul 16 16:42:52 2013 -0700
- google-glog link wasn't working, 'http://' twice
+ householderQR -> colPivHouseholderQR.
- Change-Id: I9cd96d3609f9b1ba31cd480fef1702972be86741
+ Change-Id: Ida623e853711f665e7a9d3b140a93e861591f96d
-commit 55b6c966c4f697cb5d11982201733aa3bce7a5a7
-Author: Pablo Speciale <pablo.speciale@gmail.com>
-Date: Wed Mar 20 17:44:04 2013 -0700
+commit c2c6411d16db95cde0cc3a7a80bac87266234bb7
+Author: Sameer Agarwal <sameeragarwal@google.com>
+Date: Sat Jul 13 18:47:49 2013 -0700
- * Fixed the location of the Ceres doc (once installed with 'make install')
- * Doing 'make ceres_docs' can be used to create the documentation (if the BUILD_DOCUMENTATION=ON)
- * Included the copyright boilerplate for FindSphinx.cmake
+ DENSE_QR solver now uses non pivoting QR decomposition.
- Change-Id: Iea21eba9e68384b4fe72c85fa88c76b0ba8a7a1d
+ Change-Id: I9099221448ccf71d0de20b9f652405009a6c24c5
-commit a986912555b304a47dd0c2a02892046fde15d091
+commit 3c2ad4018c8d2271434b9ff2bd05437b96f4927c
Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Wed Mar 20 11:50:34 2013 -0700
+Date: Mon Jul 15 08:09:38 2013 -0700
- Update version history
+ Speed up Automatic differentiation by 7%.
- Change-Id: I238279719219a26d0d1bb32e0610f41007d3dcef
+ 1. Templatize Make1stOrderPerturbation.
+ 2. Convert a hard CHECK into DCHECK.
+
+ Change-Id: I02cd67f2b87bc5722f1a090057d55f23e98d2c3b
-commit 16dbf11626c52c013f1dca6375f993a554e31d51
-Author: Pablo Speciale <pablo.speciale@gmail.com>
-Date: Mon Mar 11 14:44:02 2013 -0700
+commit 0a07fbf8731adcdce98c8e73127d379199341132
+Author: Sameer Agarwal <sameeragarwal@google.com>
+Date: Wed Jul 10 11:57:35 2013 -0700
- Added CeresConfig.cmake based on this example:
- https://projects.kde.org/projects/kde/kdeexamples/repository/revisions/master/show/buildsystem/HowToInstallALibrary
+ Use ATLAS as the example BLAS in building.rst
+
+ OpenBLAS has subtle issues releated to threading. It
+ conflicts with the use of threads in the other parts of
+ the application.
- Change-Id: I130cac5d43d9fbbf359abc04d3691e25c4e2bb63
+ Careful users can still use it by disabling threads via
+ an environment variable, but by default we want to use
+ a BLAS/LAPACK that does not suffer from these problems.
+
+ Change-Id: I8c1c0ed0b526453564c5f9ea69b646fac32fe027
-commit 015d57f173fab7ea040ee01474101e208ff72be6
-Author: Pablo Speciale <pablo.speciale@gmail.com>
-Date: Tue Mar 19 14:05:14 2013 -0700
+commit aee5597acf9c2c064977e937f52689254ebd1a39
+Author: Sameer Agarwal <sameeragarwal@google.com>
+Date: Tue Jul 9 23:30:07 2013 -0700
- Avoiding the Warning: "deprecated conversion from string constant to char*"
+ Minor fix to curve_fitting.c
- Change-Id: Ifa47f9b0724f79c5c695828628c89818ddefd844
+ Change-Id: Ib3669a5c4c73178b088dc1e80141f844f807b179
-commit c51b11c1046366035e7da95e4d8a78100ef3f153
-Author: Pablo Speciale <pablo.speciale@gmail.com>
-Date: Tue Mar 12 00:56:56 2013 -0700
+commit bd82f82c3afeb3c57fa03f61fdbb0388f9ed8b02
+Author: Sameer Agarwal <sameeragarwal@google.com>
+Date: Tue Jul 9 23:19:09 2013 -0700
- Sphinx and CMake, based on this example:
- http://ericscottbarr.com/blog/2012/03/sphinx-and-cmake-beautiful-documentation-for-c-projects/
+ More CMake file cleanup.
- The 'docs/CMakeLists.txt' file was deleted in this commit: 0abfb8f46f534b05413bb4d64b960d6fd0a9befb
+ Reduce the verbosity of the Cmake file. All the "Checking for"
+ messages have been removed since we log both success and failures.
- Thanks to Arnaud Gelas, he has passed some links:
- https://github.com/InsightSoftwareConsortium/ITKExamples/blob/master/CMake/FindSphinx.cmake
- https://github.com/InsightSoftwareConsortium/ITKExamples/blob/master/CMakeLists.txt#L120-L154
+ Further, UFConfig is only searched for if SuiteSparse_config cannot
+ be found.
- Change-Id: Ic65e7f8ec5280d1e71a897a144417a21761c5553
+ Change-Id: I601a6ffc808e566ff78ce232c86519ef413f0b33
-commit 793a339335d8d52279efb49bcd704d196646efb5
+commit 9f4552b6475616df7e60681e60cd5afebb45a4ea
Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Wed Mar 13 12:14:00 2013 -0700
+Date: Tue Jul 9 00:10:08 2013 -0700
- Make Android.mk play better with the external consraints
+ Stop CMake from trying to detect OpenMP when using Clang.
- Change-Id: Ia0a1037d97c032a4ba1a9acbf4e04c192d12ee61
+ Change-Id: Ie14c6466475b401ba35dbf13adc2e8701999c969
-commit 700d50d8074f0273b305fe6d9f795f1dcb988048
-Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Tue Mar 12 16:12:42 2013 -0700
+commit 6e8bd501b25dc308df7b1a5eed16edfd8442002e
+Author: Keir Mierle <mierle@gmail.com>
+Date: Thu May 23 01:49:08 2013 -0700
- Lint cleanup from William Rucklidge
+ Extend the C API to support loss functions
+
+ This extends the C API to support loss functions. Both
+ user-supplied cost functions as well as the stock Ceres cost
+ functions (Cauchy, Huber, etc) are supported. In addition, this
+ adds a simple unit test for the C API.
+
+ Supporting loss functions required changing the signature of the
+ ceres_add_residual_block() function to also take a thunk for the
+ loss function.
- Change-Id: Iacbf77246109f687708696eee7fb6144d23e7ec5
+ Change-Id: Iefa58cf709adbb8f24588e5eb6aed9aef46b6d73
-commit 8140f0fc979f5728f37cfb68362f31e7e37b46bb
+commit 1ab7fde626c3d3ac02664183f21fedd397785bea
Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Tue Mar 12 09:45:08 2013 -0700
+Date: Mon Jul 8 10:03:49 2013 -0700
- Modularize the build.
+ Update gmock and gtest to the latest svn versions.
- 1. Add -DLINE_SEARCH_MINIMIZER to CMake to make the line search
- minimizer optional.
- 2. Better handling of -DSUITESPARSE/-DCXSPARSE in top level cmake
- file.
- 3. Disable code which will never be used if SuiteSparse and/or
- CXSparse is not available.
- 4. Update build docs.
- 5. Update jni/Android.mk
- 6. Minor lint cleanup from William Rucklidge.
+ This fixes a variety of mac/clang/c++11 issues.
- Change-Id: If60460a858000df82faed7a6bb056dd2bfdde562
+ Change-Id: I52e76d733cd53c9bb2fda125e51a6b58a90e41b3
-commit c59c1e44727c62d43523b672c1c132865cd25784
+commit eeedd2e191f5ce404453c735061ad13bd45b939b
Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Mon Mar 11 17:28:38 2013 -0700
+Date: Sun Jul 7 23:04:31 2013 -0700
- Propagate ifdefs correctly to improve build efficiency.
+ Rationalize some of the variable names in Solver::Options.
- With -DRESTRICT_SCHUR_SPECIALIZATIONS, now the various
- specializations are empty, decreasing build time and
- reducing the size of the static library.
+ lm_max_diagonal -> max_lm_diagonal
+ lm_min_diagonal -> min_lm_diagonal
+ linear_solver_max_num_iterations -> max_linear_solver_iterations
+ linear_solver_min_num_iterations -> min_linear_solver_iterations
- Change-Id: I8ec431279741a9a83516a4167c54a364c4608143
+ This follows the pattern for the other parameters in Solver::Options
+ where, the max/min is the first word followed by the name of the
+ parameter.
+
+ Change-Id: I0893610fceb6b7983fdb458a65522ba7079596a7
-commit 32874b861fc54b33aa4272e8c81bb001aa1e1e60
-Author: Yuliy Schwartzburg <syx818@gmail.com>
-Date: Fri Mar 8 11:30:44 2013 +0100
+commit 7a8f79792467e56012d43b5f9aa7aefce14d5ee9
+Author: Sameer Agarwal <sameeragarwal@google.com>
+Date: Wed Jul 3 09:03:55 2013 -0700
- Fix CMake "LIB_SUFFIX" for non-linux installations
+ Lint fixes
- Change-Id: Ieb8a2825a4378b388149e7934ecc7b96ba5a29fa
+ Change-Id: Ic453597488ef92723a81a224e7443e8f454b25da
-commit 58b8c68f29c2c15edbc5f77102796df661020312
+commit 67ccb7379e7eab709480e227323ea48ea91e7ccc
Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Sat Mar 9 17:17:43 2013 -0800
+Date: Wed Jul 3 06:28:34 2013 -0700
- Clean up rotation.h
+ Fix broken build.
- Change-Id: I3370c9883728cda068c9650a2c2a50641fd8299c
+ Change-Id: Ieb122bb96d5776f962fff6d6e9345dfc855bfed7
-commit 020d8e1e48f341f3b990ac449998d36aaca2771f
+commit 4f010b2db02f22cee8243ed83a49e63a305dbb76
Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Wed Mar 6 16:19:26 2013 -0800
+Date: Mon Jul 1 08:01:01 2013 -0700
- Better error reporting in the modeling API.
+ Improve Summary::FullReport when line search is used.
- More informative error when user passes an
- unknown parameter block to Problem methods.
+ Disable reporting of preconditioner when direct factorization
+ is being used.
- Change-Id: I517360e4b0b55814904ca3e664877d76ad3f59e8
+ Change-Id: Id264d2292c5cab608724a6a8fab5d588db950468
-commit 5e7ce8a950cf5794c63817827ce66a3a4e66e7b6
+commit 09244015e304b0ebfb2f2399edd2d97e3b9dcd8f
Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Wed Mar 6 11:38:41 2013 -0800
+Date: Sun Jun 30 14:33:23 2013 -0700
- Fix Problem::Evaluate documentation
+ Expose line search parameters in Solver::Options.
- Change-Id: I8c70a24743cff2d9cface99ef0f5d34c78f769c6
+ Change-Id: Ifc52980976e7bac73c8164d80518a5a19db1b79d
-commit 0a4f5f8f7428148f21183e743d091d2079406604
-Author: Taylor Braun-Jones <taylor@braun-jones.org>
-Date: Wed Mar 6 00:00:32 2013 -0500
+commit 1c70ae9aa626e591cda987a970c240dd40d23a69
+Author: Sameer Agarwal <sameeragarwal@google.com>
+Date: Sun Jun 30 12:50:43 2013 -0700
- Fix operator() signature in several sections of the documentation
+ Fix Solver::Summary when line search is used.
+
+ Also enable line search in bundle_adjuster.
- Change-Id: I73f9d150a738f7b136fbc1f98fc60b0f306bd7f9
+ Change-Id: Ic4343a4334b9f5a6fdeab38d4e3e1f6932bbc601
-commit 2c648dbc43025927301684fc82d95ccf6b6c21bc
-Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Tue Mar 5 15:20:15 2013 -0800
+commit 70b06c89c7491d7749957c8454769bfcb0108a97
+Author: Alex Stewart <alexs.mac@gmail.com>
+Date: Sun Jun 30 18:49:56 2013 +0100
- Make examples independent of ceres internals.
+ Fix update of L-BFGS history buffers after they become full.
- Change-Id: I6b6913e067a86fea713646218c8da1439d349d74
+ Previously there was an assignment dimension mismatch in the
+ history update; thus, over time, the history would contain
+ (only) replicated copies of the (max_num_corrections_ -1)-th
+ update and the most recent update.
+
+ Change-Id: I26203acf689686d41a5029c675ebbe001fe05d90
-commit e7148795c3f2ce1f6625a7c81545707a6cbde3eb
+commit a427c877f968d951b3cdcb5f5298deaf84647830
Author: Sameer Agarwal <sameeragarwal@google.com>
-Date: Mon Mar 4 10:17:30 2013 -0800
+Date: Mon Jun 24 17:50:56 2013 -0700
- Fix a memory leak in CXSparse::SolveCholesky.
-
- Thanks to Alexander Mordvintsev for reporting this.
+ Lint cleanup.
- Change-Id: I5c6be4d3d28f062e83a1ad41cb8089c19362a005
+ Change-Id: Ie489f1ff182d99251ed8c0728cc6ea8e1c262ce0
diff --git a/extern/libmv/third_party/ceres/SConscript b/extern/libmv/third_party/ceres/SConscript
index 6e490cfd5cf..a914135fddc 100644
--- a/extern/libmv/third_party/ceres/SConscript
+++ b/extern/libmv/third_party/ceres/SConscript
@@ -21,7 +21,7 @@ defs.append('CERES_HASH_NAMESPACE_START=namespace std { namespace tr1 {')
defs.append('CERES_HASH_NAMESPACE_END=}}')
defs.append('CERES_NO_SUITESPARSE')
defs.append('CERES_NO_CXSPARSE')
-defs.append('CERES_NO_PROTOCOL_BUFFERS')
+defs.append('CERES_NO_LAPACK')
defs.append('CERES_RESTRICT_SCHUR_SPECIALIZATION')
defs.append('CERES_HAVE_RWLOCK')
diff --git a/extern/libmv/third_party/ceres/bundle.sh b/extern/libmv/third_party/ceres/bundle.sh
index 65af263f7c4..6ab348af118 100755
--- a/extern/libmv/third_party/ceres/bundle.sh
+++ b/extern/libmv/third_party/ceres/bundle.sh
@@ -160,7 +160,7 @@ add_definitions(
-DCERES_HAVE_PTHREAD
-DCERES_NO_SUITESPARSE
-DCERES_NO_CXSPARSE
- -DCERES_NO_PROTOCOL_BUFFERS
+ -DCERES_NO_LAPACK
-DCERES_RESTRICT_SCHUR_SPECIALIZATION
-DCERES_HAVE_RWLOCK
)
@@ -218,7 +218,7 @@ defs.append('CERES_HASH_NAMESPACE_START=namespace std { namespace tr1 {')
defs.append('CERES_HASH_NAMESPACE_END=}}')
defs.append('CERES_NO_SUITESPARSE')
defs.append('CERES_NO_CXSPARSE')
-defs.append('CERES_NO_PROTOCOL_BUFFERS')
+defs.append('CERES_NO_LAPACK')
defs.append('CERES_RESTRICT_SCHUR_SPECIALIZATION')
defs.append('CERES_HAVE_RWLOCK')
diff --git a/extern/libmv/third_party/ceres/files.txt b/extern/libmv/third_party/ceres/files.txt
index cb6c8af533e..071ccda655c 100644
--- a/extern/libmv/third_party/ceres/files.txt
+++ b/extern/libmv/third_party/ceres/files.txt
@@ -1,9 +1,11 @@
include/ceres/autodiff_cost_function.h
include/ceres/autodiff_local_parameterization.h
+include/ceres/c_api.h
include/ceres/ceres.h
include/ceres/conditioned_cost_function.h
include/ceres/cost_function.h
include/ceres/cost_function_to_functor.h
+include/ceres/covariance.h
include/ceres/crs_matrix.h
include/ceres/dynamic_autodiff_cost_function.h
include/ceres/fpclassify.h
@@ -32,6 +34,7 @@ include/ceres/solver.h
include/ceres/types.h
internal/ceres/array_utils.cc
internal/ceres/array_utils.h
+internal/ceres/blas.cc
internal/ceres/blas.h
internal/ceres/block_evaluate_preparer.cc
internal/ceres/block_evaluate_preparer.h
@@ -39,6 +42,8 @@ internal/ceres/block_jacobian_writer.cc
internal/ceres/block_jacobian_writer.h
internal/ceres/block_jacobi_preconditioner.cc
internal/ceres/block_jacobi_preconditioner.h
+internal/ceres/block_random_access_crs_matrix.cc
+internal/ceres/block_random_access_crs_matrix.h
internal/ceres/block_random_access_dense_matrix.cc
internal/ceres/block_random_access_dense_matrix.h
internal/ceres/block_random_access_matrix.cc
@@ -51,11 +56,14 @@ internal/ceres/block_structure.cc
internal/ceres/block_structure.h
internal/ceres/canonical_views_clustering.cc
internal/ceres/canonical_views_clustering.h
+internal/ceres/c_api.cc
internal/ceres/casts.h
internal/ceres/cgnr_linear_operator.h
internal/ceres/cgnr_solver.cc
internal/ceres/cgnr_solver.h
internal/ceres/collections_port.h
+internal/ceres/compressed_col_sparse_matrix_utils.cc
+internal/ceres/compressed_col_sparse_matrix_utils.h
internal/ceres/compressed_row_jacobian_writer.cc
internal/ceres/compressed_row_jacobian_writer.h
internal/ceres/compressed_row_sparse_matrix.cc
@@ -67,6 +75,9 @@ internal/ceres/coordinate_descent_minimizer.cc
internal/ceres/coordinate_descent_minimizer.h
internal/ceres/corrector.cc
internal/ceres/corrector.h
+internal/ceres/covariance.cc
+internal/ceres/covariance_impl.cc
+internal/ceres/covariance_impl.h
internal/ceres/cxsparse.cc
internal/ceres/cxsparse.h
internal/ceres/dense_jacobian_writer.h
@@ -108,9 +119,13 @@ internal/ceres/graph_algorithms.h
internal/ceres/graph.h
internal/ceres/implicit_schur_complement.cc
internal/ceres/implicit_schur_complement.h
+internal/ceres/incomplete_lq_factorization.cc
+internal/ceres/incomplete_lq_factorization.h
internal/ceres/integral_types.h
internal/ceres/iterative_schur_complement_solver.cc
internal/ceres/iterative_schur_complement_solver.h
+internal/ceres/lapack.cc
+internal/ceres/lapack.h
internal/ceres/levenberg_marquardt_strategy.cc
internal/ceres/levenberg_marquardt_strategy.h
internal/ceres/linear_least_squares_problems.cc
@@ -130,7 +145,6 @@ internal/ceres/loss_function.cc
internal/ceres/low_rank_inverse_hessian.cc
internal/ceres/low_rank_inverse_hessian.h
internal/ceres/map_util.h
-internal/ceres/matrix_proto.h
internal/ceres/minimizer.cc
internal/ceres/minimizer.h
internal/ceres/mutex.h
@@ -166,6 +180,7 @@ internal/ceres/schur_jacobi_preconditioner.cc
internal/ceres/schur_jacobi_preconditioner.h
internal/ceres/scratch_evaluate_preparer.cc
internal/ceres/scratch_evaluate_preparer.h
+internal/ceres/small_blas.h
internal/ceres/solver.cc
internal/ceres/solver_impl.cc
internal/ceres/solver_impl.h
diff --git a/extern/libmv/third_party/ceres/include/ceres/autodiff_cost_function.h b/extern/libmv/third_party/ceres/include/ceres/autodiff_cost_function.h
index e758d3a2bd5..371a11f71ec 100644
--- a/extern/libmv/third_party/ceres/include/ceres/autodiff_cost_function.h
+++ b/extern/libmv/third_party/ceres/include/ceres/autodiff_cost_function.h
@@ -40,8 +40,11 @@
// this is hidden, and you should write the function as if T were a scalar type
// (e.g. a double-precision floating point number).
//
-// The function must write the computed value in the last argument (the only
-// non-const one) and return true to indicate success.
+// The function must write the computed value in the last argument
+// (the only non-const one) and return true to indicate
+// success. Please see cost_function.h for details on how the return
+// value maybe used to impose simple constraints on the parameter
+// block.
//
// For example, consider a scalar error e = k - x'y, where both x and y are
// two-dimensional column vector parameters, the prime sign indicates
@@ -125,11 +128,11 @@
#ifndef CERES_PUBLIC_AUTODIFF_COST_FUNCTION_H_
#define CERES_PUBLIC_AUTODIFF_COST_FUNCTION_H_
-#include <glog/logging.h>
#include "ceres/internal/autodiff.h"
#include "ceres/internal/scoped_ptr.h"
#include "ceres/sized_cost_function.h"
#include "ceres/types.h"
+#include "glog/logging.h"
namespace ceres {
diff --git a/extern/libmv/third_party/ceres/include/ceres/autodiff_local_parameterization.h b/extern/libmv/third_party/ceres/include/ceres/autodiff_local_parameterization.h
index 1099061bec8..0aae6c73acf 100644
--- a/extern/libmv/third_party/ceres/include/ceres/autodiff_local_parameterization.h
+++ b/extern/libmv/third_party/ceres/include/ceres/autodiff_local_parameterization.h
@@ -58,7 +58,7 @@ namespace ceres {
//
// For example, Quaternions have a three dimensional local
// parameterization. It's plus operation can be implemented as (taken
-// from interncal/ceres/auto_diff_local_parameterization_test.cc)
+// from internal/ceres/auto_diff_local_parameterization_test.cc)
//
// struct QuaternionPlus {
// template<typename T>
diff --git a/extern/libmv/third_party/ceres/include/ceres/c_api.h b/extern/libmv/third_party/ceres/include/ceres/c_api.h
new file mode 100644
index 00000000000..add68dea16c
--- /dev/null
+++ b/extern/libmv/third_party/ceres/include/ceres/c_api.h
@@ -0,0 +1,141 @@
+/* Ceres Solver - A fast non-linear least squares minimizer
+ * Copyright 2013 Google Inc. All rights reserved.
+ * http://code.google.com/p/ceres-solver/
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * - Neither the name of Google Inc. nor the names of its contributors may be
+ * used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Author: mierle@gmail.com (Keir Mierle)
+ *
+ * A minimal C API for Ceres. Not all functionality is included. This API is
+ * not intended for clients of Ceres, but is instead intended for easing the
+ * process of binding Ceres to other languages.
+ *
+ * Currently this is a work in progress.
+ */
+
+#ifndef CERES_PUBLIC_C_API_H_
+#define CERES_PUBLIC_C_API_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Init the Ceres private data. Must be called before anything else. */
+void ceres_init();
+
+/* Equivalent to CostFunction::Evaluate() in the C++ API.
+ *
+ * The user may keep private information inside the opaque user_data object.
+ * The pointer here is the same one passed in the ceres_add_residual_block().
+ */
+typedef int (*ceres_cost_function_t)(void* user_data,
+ double** parameters,
+ double* residuals,
+ double** jacobians);
+
+/* Equivalent to LossFunction::Evaluate() from the C++ API. */
+typedef void (*ceres_loss_function_t)(void* user_data,
+ double squared_norm,
+ double out[3]);
+
+/* Create callback data for Ceres' stock loss functions.
+ *
+ * Ceres has several loss functions available by default, and these functions
+ * expose those to the C API. To use the stock loss functions, call
+ * ceres_create_*_loss_data(), which internally creates an instance of one of
+ * the stock loss functions (for example ceres::CauchyLoss), and pass the
+ * returned "loss_function_data" along with the ceres_stock_loss_function to
+ * ceres_add_residual_block().
+ *
+ * For example:
+ *
+ * void* cauchy_loss_function_data =
+ * ceres_create_cauchy_loss_function_data(1.2, 0.0);
+ * ceres_problem_add_residual_block(
+ * problem,
+ * my_cost_function,
+ * my_cost_function_data,
+ * ceres_stock_loss_function,
+ * cauchy_loss_function_data,
+ * 1,
+ * 2,
+ * parameter_sizes,
+ * parameter_pointers);
+ * ...
+ * ceres_free_stock_loss_function_data(cauchy_loss_function_data);
+ *
+ * See loss_function.h for the details of each loss function.
+ */
+void* ceres_create_huber_loss_function_data(double a);
+void* ceres_create_softl1_loss_function_data(double a);
+void* ceres_create_cauchy_loss_function_data(double a);
+void* ceres_create_arctan_loss_function_data(double a);
+void* ceres_create_tolerant_loss_function_data(double a, double b);
+
+/* Free the given stock loss function data. */
+void ceres_free_stock_loss_function_data(void* loss_function_data);
+
+/* This is an implementation of ceres_loss_function_t contained within Ceres
+ * itself, intended as a way to access the various stock Ceres loss functions
+ * from the C API. This should be passed to ceres_add_residual() below, in
+ * combination with a user_data pointer generated by
+ * ceres_create_stock_loss_function() above. */
+void ceres_stock_loss_function(void* user_data,
+ double squared_norm,
+ double out[3]);
+
+/* Equivalent to Problem from the C++ API. */
+struct ceres_problem_s;
+typedef struct ceres_problem_s ceres_problem_t;
+
+struct ceres_residual_block_id_s;
+typedef struct ceres_residual_block_id_s ceres_residual_block_id_t;
+
+/* Create and destroy a problem */
+/* TODO(keir): Add options for the problem. */
+ceres_problem_t* ceres_create_problem();
+void ceres_free_problem(ceres_problem_t* problem);
+
+/* Add a residual block. */
+ceres_residual_block_id_t* ceres_problem_add_residual_block(
+ ceres_problem_t* problem,
+ ceres_cost_function_t cost_function,
+ void* cost_function_data,
+ ceres_loss_function_t loss_function,
+ void* loss_function_data,
+ int num_residuals,
+ int num_parameter_blocks,
+ int* parameter_block_sizes,
+ double** parameters);
+
+void ceres_solve(ceres_problem_t* problem);
+
+/* TODO(keir): Figure out a way to pass a config in. */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* CERES_PUBLIC_C_API_H_ */
diff --git a/extern/libmv/third_party/ceres/include/ceres/ceres.h b/extern/libmv/third_party/ceres/include/ceres/ceres.h
index ac76e97c834..61b8b94dcaa 100644
--- a/extern/libmv/third_party/ceres/include/ceres/ceres.h
+++ b/extern/libmv/third_party/ceres/include/ceres/ceres.h
@@ -34,13 +34,14 @@
#ifndef CERES_PUBLIC_CERES_H_
#define CERES_PUBLIC_CERES_H_
-#define CERES_VERSION 1.5.0
-#define CERES_ABI_VERSION 1.5.0
+#define CERES_VERSION 1.7.0
+#define CERES_ABI_VERSION 1.7.0
#include "ceres/autodiff_cost_function.h"
#include "ceres/autodiff_local_parameterization.h"
#include "ceres/cost_function.h"
#include "ceres/cost_function_to_functor.h"
+#include "ceres/covariance.h"
#include "ceres/crs_matrix.h"
#include "ceres/iteration_callback.h"
#include "ceres/jet.h"
diff --git a/extern/libmv/third_party/ceres/include/ceres/cost_function.h b/extern/libmv/third_party/ceres/include/ceres/cost_function.h
index 9b010f78f9d..8013e962616 100644
--- a/extern/libmv/third_party/ceres/include/ceres/cost_function.h
+++ b/extern/libmv/third_party/ceres/include/ceres/cost_function.h
@@ -93,6 +93,24 @@ class CostFunction {
// the case when computing cost only. If jacobians[i] is NULL, then
// the jacobian block corresponding to the i'th parameter block must
// not to be returned.
+ //
+ // The return value indicates whether the computation of the
+ // residuals and/or jacobians was successful or not.
+ //
+ // This can be used to communicate numerical failures in jacobian
+ // computations for instance.
+ //
+ // A more interesting and common use is to impose constraints on the
+ // parameters. If the initial values of the parameter blocks satisfy
+ // the constraints, then returning false whenever the constraints
+ // are not satisfied will prevent the solver from moving into the
+ // infeasible region. This is not a very sophisticated mechanism for
+ // enforcing constraints, but is often good enough for things like
+ // non-negativity constraints.
+ //
+ // Note that it is important that the initial values of the
+ // parameter block must be feasible, otherwise the solver will
+ // declare a numerical problem at iteration 0.
virtual bool Evaluate(double const* const* parameters,
double* residuals,
double** jacobians) const = 0;
diff --git a/extern/libmv/third_party/ceres/include/ceres/covariance.h b/extern/libmv/third_party/ceres/include/ceres/covariance.h
new file mode 100644
index 00000000000..83126b5afef
--- /dev/null
+++ b/extern/libmv/third_party/ceres/include/ceres/covariance.h
@@ -0,0 +1,422 @@
+// Ceres Solver - A fast non-linear least squares minimizer
+// Copyright 2013 Google Inc. All rights reserved.
+// http://code.google.com/p/ceres-solver/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+// * Neither the name of Google Inc. nor the names of its contributors may be
+// used to endorse or promote products derived from this software without
+// specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Author: sameeragarwal@google.com (Sameer Agarwal)
+
+#ifndef CERES_PUBLIC_COVARIANCE_H_
+#define CERES_PUBLIC_COVARIANCE_H_
+
+#include <utility>
+#include <vector>
+#include "ceres/internal/port.h"
+#include "ceres/internal/scoped_ptr.h"
+#include "ceres/types.h"
+
+namespace ceres {
+
+class Problem;
+
+namespace internal {
+class CovarianceImpl;
+} // namespace internal
+
+// WARNING
+// =======
+// It is very easy to use this class incorrectly without understanding
+// the underlying mathematics. Please read and understand the
+// documentation completely before attempting to use this class.
+//
+//
+// This class allows the user to evaluate the covariance for a
+// non-linear least squares problem and provides random access to its
+// blocks
+//
+// Background
+// ==========
+// One way to assess the quality of the solution returned by a
+// non-linear least squares solve is to analyze the covariance of the
+// solution.
+//
+// Let us consider the non-linear regression problem
+//
+// y = f(x) + N(0, I)
+//
+// i.e., the observation y is a random non-linear function of the
+// independent variable x with mean f(x) and identity covariance. Then
+// the maximum likelihood estimate of x given observations y is the
+// solution to the non-linear least squares problem:
+//
+// x* = arg min_x |f(x)|^2
+//
+// And the covariance of x* is given by
+//
+// C(x*) = inverse[J'(x*)J(x*)]
+//
+// Here J(x*) is the Jacobian of f at x*. The above formula assumes
+// that J(x*) has full column rank.
+//
+// If J(x*) is rank deficient, then the covariance matrix C(x*) is
+// also rank deficient and is given by
+//
+// C(x*) = pseudoinverse[J'(x*)J(x*)]
+//
+// Note that in the above, we assumed that the covariance
+// matrix for y was identity. This is an important assumption. If this
+// is not the case and we have
+//
+// y = f(x) + N(0, S)
+//
+// Where S is a positive semi-definite matrix denoting the covariance
+// of y, then the maximum likelihood problem to be solved is
+//
+// x* = arg min_x f'(x) inverse[S] f(x)
+//
+// and the corresponding covariance estimate of x* is given by
+//
+// C(x*) = inverse[J'(x*) inverse[S] J(x*)]
+//
+// So, if it is the case that the observations being fitted to have a
+// covariance matrix not equal to identity, then it is the user's
+// responsibility that the corresponding cost functions are correctly
+// scaled, e.g. in the above case the cost function for this problem
+// should evaluate S^{-1/2} f(x) instead of just f(x), where S^{-1/2}
+// is the inverse square root of the covariance matrix S.
+//
+// This class allows the user to evaluate the covariance for a
+// non-linear least squares problem and provides random access to its
+// blocks. The computation assumes that the CostFunctions compute
+// residuals such that their covariance is identity.
+//
+// Since the computation of the covariance matrix requires computing
+// the inverse of a potentially large matrix, this can involve a
+// rather large amount of time and memory. However, it is usually the
+// case that the user is only interested in a small part of the
+// covariance matrix. Quite often just the block diagonal. This class
+// allows the user to specify the parts of the covariance matrix that
+// she is interested in and then uses this information to only compute
+// and store those parts of the covariance matrix.
+//
+// Rank of the Jacobian
+// --------------------
+// As we noted above, if the jacobian is rank deficient, then the
+// inverse of J'J is not defined and instead a pseudo inverse needs to
+// be computed.
+//
+// The rank deficiency in J can be structural -- columns which are
+// always known to be zero or numerical -- depending on the exact
+// values in the Jacobian.
+//
+// Structural rank deficiency occurs when the problem contains
+// parameter blocks that are constant. This class correctly handles
+// structural rank deficiency like that.
+//
+// Numerical rank deficiency, where the rank of the matrix cannot be
+// predicted by its sparsity structure and requires looking at its
+// numerical values is more complicated. Here again there are two
+// cases.
+//
+// a. The rank deficiency arises from overparameterization. e.g., a
+// four dimensional quaternion used to parameterize SO(3), which is
+// a three dimensional manifold. In cases like this, the user should
+// use an appropriate LocalParameterization. Not only will this lead
+// to better numerical behaviour of the Solver, it will also expose
+// the rank deficiency to the Covariance object so that it can
+// handle it correctly.
+//
+// b. More general numerical rank deficiency in the Jacobian
+// requires the computation of the so called Singular Value
+// Decomposition (SVD) of J'J. We do not know how to do this for
+// large sparse matrices efficiently. For small and moderate sized
+// problems this is done using dense linear algebra.
+//
+// Gauge Invariance
+// ----------------
+// In structure from motion (3D reconstruction) problems, the
+// reconstruction is ambiguous upto a similarity transform. This is
+// known as a Gauge Ambiguity. Handling Gauges correctly requires the
+// use of SVD or custom inversion algorithms. For small problems the
+// user can use the dense algorithm. For more details see
+//
+// Ken-ichi Kanatani, Daniel D. Morris: Gauges and gauge
+// transformations for uncertainty description of geometric structure
+// with indeterminacy. IEEE Transactions on Information Theory 47(5):
+// 2017-2028 (2001)
+//
+// Example Usage
+// =============
+//
+// double x[3];
+// double y[2];
+//
+// Problem problem;
+// problem.AddParameterBlock(x, 3);
+// problem.AddParameterBlock(y, 2);
+// <Build Problem>
+// <Solve Problem>
+//
+// Covariance::Options options;
+// Covariance covariance(options);
+//
+// vector<pair<const double*, const double*> > covariance_blocks;
+// covariance_blocks.push_back(make_pair(x, x));
+// covariance_blocks.push_back(make_pair(y, y));
+// covariance_blocks.push_back(make_pair(x, y));
+//
+// CHECK(covariance.Compute(covariance_blocks, &problem));
+//
+// double covariance_xx[3 * 3];
+// double covariance_yy[2 * 2];
+// double covariance_xy[3 * 2];
+// covariance.GetCovarianceBlock(x, x, covariance_xx)
+// covariance.GetCovarianceBlock(y, y, covariance_yy)
+// covariance.GetCovarianceBlock(x, y, covariance_xy)
+//
+class Covariance {
+ public:
+ struct Options {
+ Options()
+#ifndef CERES_NO_SUITESPARSE
+ : algorithm_type(SPARSE_QR),
+#else
+ : algorithm_type(DENSE_SVD),
+#endif
+ min_reciprocal_condition_number(1e-14),
+ null_space_rank(0),
+ num_threads(1),
+ apply_loss_function(true) {
+ }
+
+ // Ceres supports three different algorithms for covariance
+ // estimation, which represent different tradeoffs in speed,
+ // accuracy and reliability.
+ //
+ // 1. DENSE_SVD uses Eigen's JacobiSVD to perform the
+ // computations. It computes the singular value decomposition
+ //
+ // U * S * V' = J
+ //
+ // and then uses it to compute the pseudo inverse of J'J as
+ //
+ // pseudoinverse[J'J]^ = V * pseudoinverse[S] * V'
+ //
+ // It is an accurate but slow method and should only be used
+ // for small to moderate sized problems. It can handle
+ // full-rank as well as rank deficient Jacobians.
+ //
+ // 2. SPARSE_CHOLESKY uses the CHOLMOD sparse Cholesky
+ // factorization library to compute the decomposition :
+ //
+ // R'R = J'J
+ //
+ // and then
+ //
+ // [J'J]^-1 = [R'R]^-1
+ //
+ // It a fast algorithm for sparse matrices that should be used
+ // when the Jacobian matrix J is well conditioned. For
+ // ill-conditioned matrices, this algorithm can fail
+ // unpredictabily. This is because Cholesky factorization is
+ // not a rank-revealing factorization, i.e., it cannot reliably
+ // detect when the matrix being factorized is not of full
+ // rank. SuiteSparse/CHOLMOD supplies a heuristic for checking
+ // if the matrix is rank deficient (cholmod_rcond), but it is
+ // only a heuristic and can have both false positive and false
+ // negatives.
+ //
+ // Recent versions of SuiteSparse (>= 4.2.0) provide a much
+ // more efficient method for solving for rows of the covariance
+ // matrix. Therefore, if you are doing SPARSE_CHOLESKY, we
+ // strongly recommend using a recent version of SuiteSparse.
+ //
+ // 3. SPARSE_QR uses the SuiteSparseQR sparse QR factorization
+ // library to compute the decomposition
+ //
+ // Q * R = J
+ //
+ // [J'J]^-1 = [R*R']^-1
+ //
+ // It is a moderately fast algorithm for sparse matrices, which
+ // at the price of more time and memory than the
+ // SPARSE_CHOLESKY algorithm is numerically better behaved and
+ // is rank revealing, i.e., it can reliably detect when the
+ // Jacobian matrix is rank deficient.
+ //
+ // Neither SPARSE_CHOLESKY or SPARSE_QR are capable of computing
+ // the covariance if the Jacobian is rank deficient.
+
+ CovarianceAlgorithmType algorithm_type;
+
+ // If the Jacobian matrix is near singular, then inverting J'J
+ // will result in unreliable results, e.g, if
+ //
+ // J = [1.0 1.0 ]
+ // [1.0 1.0000001 ]
+ //
+ // which is essentially a rank deficient matrix, we have
+ //
+ // inv(J'J) = [ 2.0471e+14 -2.0471e+14]
+ // [-2.0471e+14 2.0471e+14]
+ //
+ // This is not a useful result. Therefore, by default
+ // Covariance::Compute will return false if a rank deficient
+ // Jacobian is encountered. How rank deficiency is detected
+ // depends on the algorithm being used.
+ //
+ // 1. DENSE_SVD
+ //
+ // min_sigma / max_sigma < sqrt(min_reciprocal_condition_number)
+ //
+ // where min_sigma and max_sigma are the minimum and maxiumum
+ // singular values of J respectively.
+ //
+ // 2. SPARSE_CHOLESKY
+ //
+ // cholmod_rcond < min_reciprocal_conditioner_number
+ //
+ // Here cholmod_rcond is a crude estimate of the reciprocal
+ // condition number of J'J by using the maximum and minimum
+ // diagonal entries of the Cholesky factor R. There are no
+ // theoretical guarantees associated with this test. It can
+ // give false positives and negatives. Use at your own
+ // risk. The default value of min_reciprocal_condition_number
+ // has been set to a conservative value, and sometimes the
+ // Covariance::Compute may return false even if it is possible
+ // to estimate the covariance reliably. In such cases, the user
+ // should exercise their judgement before lowering the value of
+ // min_reciprocal_condition_number.
+ //
+ // 3. SPARSE_QR
+ //
+ // rank(J) < num_col(J)
+ //
+ // Here rank(J) is the estimate of the rank of J returned by the
+ // SuiteSparseQR algorithm. It is a fairly reliable indication
+ // of rank deficiency.
+ //
+ double min_reciprocal_condition_number;
+
+ // When using DENSE_SVD, the user has more control in dealing with
+ // singular and near singular covariance matrices.
+ //
+ // As mentioned above, when the covariance matrix is near
+ // singular, instead of computing the inverse of J'J, the
+ // Moore-Penrose pseudoinverse of J'J should be computed.
+ //
+ // If J'J has the eigen decomposition (lambda_i, e_i), where
+ // lambda_i is the i^th eigenvalue and e_i is the corresponding
+ // eigenvector, then the inverse of J'J is
+ //
+ // inverse[J'J] = sum_i e_i e_i' / lambda_i
+ //
+ // and computing the pseudo inverse involves dropping terms from
+ // this sum that correspond to small eigenvalues.
+ //
+ // How terms are dropped is controlled by
+ // min_reciprocal_condition_number and null_space_rank.
+ //
+ // If null_space_rank is non-negative, then the smallest
+ // null_space_rank eigenvalue/eigenvectors are dropped
+ // irrespective of the magnitude of lambda_i. If the ratio of the
+ // smallest non-zero eigenvalue to the largest eigenvalue in the
+ // truncated matrix is still below
+ // min_reciprocal_condition_number, then the Covariance::Compute()
+ // will fail and return false.
+ //
+ // Setting null_space_rank = -1 drops all terms for which
+ //
+ // lambda_i / lambda_max < min_reciprocal_condition_number.
+ //
+ // This option has no effect on the SPARSE_CHOLESKY or SPARSE_QR
+ // algorithms.
+ int null_space_rank;
+
+ int num_threads;
+
+ // Even though the residual blocks in the problem may contain loss
+ // functions, setting apply_loss_function to false will turn off
+ // the application of the loss function to the output of the cost
+ // function and in turn its effect on the covariance.
+ //
+ // TODO(sameergaarwal): Expand this based on Jim's experiments.
+ bool apply_loss_function;
+ };
+
+ explicit Covariance(const Options& options);
+ ~Covariance();
+
+ // Compute a part of the covariance matrix.
+ //
+ // The vector covariance_blocks, indexes into the covariance matrix
+ // block-wise using pairs of parameter blocks. This allows the
+ // covariance estimation algorithm to only compute and store these
+ // blocks.
+ //
+ // Since the covariance matrix is symmetric, if the user passes
+ // (block1, block2), then GetCovarianceBlock can be called with
+ // block1, block2 as well as block2, block1.
+ //
+ // covariance_blocks cannot contain duplicates. Bad things will
+ // happen if they do.
+ //
+ // Note that the list of covariance_blocks is only used to determine
+ // what parts of the covariance matrix are computed. The full
+ // Jacobian is used to do the computation, i.e. they do not have an
+ // impact on what part of the Jacobian is used for computation.
+ //
+ // The return value indicates the success or failure of the
+ // covariance computation. Please see the documentation for
+ // Covariance::Options for more on the conditions under which this
+ // function returns false.
+ bool Compute(
+ const vector<pair<const double*, const double*> >& covariance_blocks,
+ Problem* problem);
+
+ // Return the block of the covariance matrix corresponding to
+ // parameter_block1 and parameter_block2.
+ //
+ // Compute must be called before the first call to
+ // GetCovarianceBlock and the pair <parameter_block1,
+ // parameter_block2> OR the pair <parameter_block2,
+ // parameter_block1> must have been present in the vector
+ // covariance_blocks when Compute was called. Otherwise
+ // GetCovarianceBlock will return false.
+ //
+ // covariance_block must point to a memory location that can store a
+ // parameter_block1_size x parameter_block2_size matrix. The
+ // returned covariance will be a row-major matrix.
+ bool GetCovarianceBlock(const double* parameter_block1,
+ const double* parameter_block2,
+ double* covariance_block) const;
+
+ private:
+ internal::scoped_ptr<internal::CovarianceImpl> impl_;
+};
+
+} // namespace ceres
+
+#endif // CERES_PUBLIC_COVARIANCE_H_
diff --git a/extern/libmv/third_party/ceres/include/ceres/dynamic_autodiff_cost_function.h b/extern/libmv/third_party/ceres/include/ceres/dynamic_autodiff_cost_function.h
index 38bdb0aa618..5d8f188e5a7 100644
--- a/extern/libmv/third_party/ceres/include/ceres/dynamic_autodiff_cost_function.h
+++ b/extern/libmv/third_party/ceres/include/ceres/dynamic_autodiff_cost_function.h
@@ -126,17 +126,28 @@ class DynamicAutoDiffCostFunction : public CostFunction {
vector<Jet<double, Stride>* > jet_parameters(num_parameter_blocks,
static_cast<Jet<double, Stride>* >(NULL));
int num_active_parameters = 0;
- int start_derivative_section = -1;
- for (int i = 0, parameter_cursor = 0; i < num_parameter_blocks; ++i) {
+
+ // To handle constant parameters between non-constant parameter blocks, the
+ // start position --- a raw parameter index --- of each contiguous block of
+ // non-constant parameters is recorded in start_derivative_section.
+ vector<int> start_derivative_section;
+ bool in_derivative_section = false;
+ int parameter_cursor = 0;
+
+ // Discover the derivative sections and set the parameter values.
+ for (int i = 0; i < num_parameter_blocks; ++i) {
jet_parameters[i] = &input_jets[parameter_cursor];
const int parameter_block_size = parameter_block_sizes()[i];
if (jacobians[i] != NULL) {
- start_derivative_section =
- (start_derivative_section == -1)
- ? parameter_cursor
- : start_derivative_section;
+ if (!in_derivative_section) {
+ start_derivative_section.push_back(parameter_cursor);
+ in_derivative_section = true;
+ }
+
num_active_parameters += parameter_block_size;
+ } else {
+ in_derivative_section = false;
}
for (int j = 0; j < parameter_block_size; ++j, parameter_cursor++) {
@@ -144,29 +155,54 @@ class DynamicAutoDiffCostFunction : public CostFunction {
}
}
+ // When `num_active_parameters % Stride != 0` then it can be the case
+ // that `active_parameter_count < Stride` while parameter_cursor is less
+ // than the total number of parameters and with no remaining non-constant
+ // parameter blocks. Pushing parameter_cursor (the total number of
+ // parameters) as a final entry to start_derivative_section is required
+ // because if a constant parameter block is encountered after the
+ // last non-constant block then current_derivative_section is incremented
+ // and would otherwise index an invalid position in
+ // start_derivative_section. Setting the final element to the total number
+ // of parameters means that this can only happen at most once in the loop
+ // below.
+ start_derivative_section.push_back(parameter_cursor);
+
// Evaluate all of the strides. Each stride is a chunk of the derivative to
// evaluate, typically some size proportional to the size of the SIMD
// registers of the CPU.
int num_strides = static_cast<int>(ceil(num_active_parameters /
static_cast<float>(Stride)));
+ int current_derivative_section = 0;
+ int current_derivative_section_cursor = 0;
+
for (int pass = 0; pass < num_strides; ++pass) {
// Set most of the jet components to zero, except for
// non-constant #Stride parameters.
+ const int initial_derivative_section = current_derivative_section;
+ const int initial_derivative_section_cursor =
+ current_derivative_section_cursor;
+
int active_parameter_count = 0;
- int end_derivative_section = start_derivative_section;
- for (int i = 0, parameter_cursor = 0; i < num_parameter_blocks; ++i) {
+ parameter_cursor = 0;
+
+ for (int i = 0; i < num_parameter_blocks; ++i) {
for (int j = 0; j < parameter_block_sizes()[i];
++j, parameter_cursor++) {
input_jets[parameter_cursor].v.setZero();
- if (parameter_cursor >= start_derivative_section &&
- active_parameter_count < Stride) {
+ if (active_parameter_count < Stride &&
+ parameter_cursor >= (
+ start_derivative_section[current_derivative_section] +
+ current_derivative_section_cursor)) {
if (jacobians[i] != NULL) {
- input_jets[parameter_cursor]
- .v[parameter_cursor - start_derivative_section] = 1.0;
+ input_jets[parameter_cursor].v[active_parameter_count] = 1.0;
++active_parameter_count;
+ ++current_derivative_section_cursor;
+ } else {
+ ++current_derivative_section;
+ current_derivative_section_cursor = 0;
}
- ++end_derivative_section;
}
}
}
@@ -177,18 +213,27 @@ class DynamicAutoDiffCostFunction : public CostFunction {
// Copy the pieces of the jacobians into their final place.
active_parameter_count = 0;
+
+ current_derivative_section = initial_derivative_section;
+ current_derivative_section_cursor = initial_derivative_section_cursor;
+
for (int i = 0, parameter_cursor = 0; i < num_parameter_blocks; ++i) {
for (int j = 0; j < parameter_block_sizes()[i];
++j, parameter_cursor++) {
- if (parameter_cursor >= start_derivative_section &&
- active_parameter_count < Stride) {
+ if (active_parameter_count < Stride &&
+ parameter_cursor >= (
+ start_derivative_section[current_derivative_section] +
+ current_derivative_section_cursor)) {
if (jacobians[i] != NULL) {
for (int k = 0; k < num_residuals(); ++k) {
jacobians[i][k * parameter_block_sizes()[i] + j] =
- output_jets[k].v[parameter_cursor -
- start_derivative_section];
+ output_jets[k].v[active_parameter_count];
}
++active_parameter_count;
+ ++current_derivative_section_cursor;
+ } else {
+ ++current_derivative_section;
+ current_derivative_section_cursor = 0;
}
}
}
@@ -201,8 +246,6 @@ class DynamicAutoDiffCostFunction : public CostFunction {
residuals[k] = output_jets[k].a;
}
}
-
- start_derivative_section = end_derivative_section;
}
return true;
}
diff --git a/extern/libmv/third_party/ceres/include/ceres/internal/autodiff.h b/extern/libmv/third_party/ceres/include/ceres/internal/autodiff.h
index 2b32671c06d..cf21d7a5001 100644
--- a/extern/libmv/third_party/ceres/include/ceres/internal/autodiff.h
+++ b/extern/libmv/third_party/ceres/include/ceres/internal/autodiff.h
@@ -142,11 +142,11 @@
#include <stddef.h>
-#include <glog/logging.h>
#include "ceres/jet.h"
#include "ceres/internal/eigen.h"
#include "ceres/internal/fixed_array.h"
#include "ceres/internal/variadic_evaluate.h"
+#include "glog/logging.h"
namespace ceres {
namespace internal {
@@ -165,13 +165,14 @@ namespace internal {
//
// is what would get put in dst if N was 3, offset was 3, and the jet type JetT
// was 8-dimensional.
-template <typename JetT, typename T>
-inline void Make1stOrderPerturbation(int offset, int N, const T *src,
- JetT *dst) {
+template <typename JetT, typename T, int N>
+inline void Make1stOrderPerturbation(int offset, const T* src, JetT* dst) {
DCHECK(src);
DCHECK(dst);
for (int j = 0; j < N; ++j) {
- dst[j] = JetT(src[j], offset + j);
+ dst[j].a = src[j];
+ dst[j].v.setZero();
+ dst[j].v[offset + j] = 1.0;
}
}
@@ -212,7 +213,7 @@ struct AutoDiff {
T **jacobians) {
// This block breaks the 80 column rule to keep it somewhat readable.
DCHECK_GT(num_outputs, 0);
- CHECK((!N1 && !N2 && !N3 && !N4 && !N5 && !N6 && !N7 && !N8 && !N9) ||
+ DCHECK((!N1 && !N2 && !N3 && !N4 && !N5 && !N6 && !N7 && !N8 && !N9) ||
((N1 > 0) && !N2 && !N3 && !N4 && !N5 && !N6 && !N7 && !N8 && !N9) ||
((N1 > 0) && (N2 > 0) && !N3 && !N4 && !N5 && !N6 && !N7 && !N8 && !N9) ||
((N1 > 0) && (N2 > 0) && (N3 > 0) && !N4 && !N5 && !N6 && !N7 && !N8 && !N9) ||
@@ -258,12 +259,12 @@ struct AutoDiff {
JetT* output = x.get() + N0 + N1 + N2 + N3 + N4 + N5 + N6 + N7 + N8 + N9;
-#define CERES_MAKE_1ST_ORDER_PERTURBATION(i) \
- if (N ## i) { \
- internal::Make1stOrderPerturbation(jet ## i, \
- N ## i, \
- parameters[i], \
- x.get() + jet ## i); \
+#define CERES_MAKE_1ST_ORDER_PERTURBATION(i) \
+ if (N ## i) { \
+ internal::Make1stOrderPerturbation<JetT, T, N ## i>( \
+ jet ## i, \
+ parameters[i], \
+ x.get() + jet ## i); \
}
CERES_MAKE_1ST_ORDER_PERTURBATION(0);
CERES_MAKE_1ST_ORDER_PERTURBATION(1);
diff --git a/extern/libmv/third_party/ceres/include/ceres/internal/fixed_array.h b/extern/libmv/third_party/ceres/include/ceres/internal/fixed_array.h
index fa4a339d757..ee264d1619d 100644
--- a/extern/libmv/third_party/ceres/include/ceres/internal/fixed_array.h
+++ b/extern/libmv/third_party/ceres/include/ceres/internal/fixed_array.h
@@ -33,10 +33,10 @@
#define CERES_PUBLIC_INTERNAL_FIXED_ARRAY_H_
#include <cstddef>
-#include <glog/logging.h>
#include "Eigen/Core"
#include "ceres/internal/macros.h"
#include "ceres/internal/manual_constructor.h"
+#include "glog/logging.h"
namespace ceres {
namespace internal {
diff --git a/extern/libmv/third_party/ceres/include/ceres/internal/variadic_evaluate.h b/extern/libmv/third_party/ceres/include/ceres/internal/variadic_evaluate.h
index 4b1e4bdc65a..9a473d5b25c 100644
--- a/extern/libmv/third_party/ceres/include/ceres/internal/variadic_evaluate.h
+++ b/extern/libmv/third_party/ceres/include/ceres/internal/variadic_evaluate.h
@@ -34,10 +34,10 @@
#include <stddef.h>
-#include <glog/logging.h>
#include "ceres/jet.h"
#include "ceres/internal/eigen.h"
#include "ceres/internal/fixed_array.h"
+#include "glog/logging.h"
namespace ceres {
namespace internal {
diff --git a/extern/libmv/third_party/ceres/include/ceres/iteration_callback.h b/extern/libmv/third_party/ceres/include/ceres/iteration_callback.h
index 0dc4c96b441..987c2d91f79 100644
--- a/extern/libmv/third_party/ceres/include/ceres/iteration_callback.h
+++ b/extern/libmv/third_party/ceres/include/ceres/iteration_callback.h
@@ -54,6 +54,8 @@ struct IterationSummary {
eta(0.0),
step_size(0.0),
line_search_function_evaluations(0),
+ line_search_gradient_evaluations(0),
+ line_search_iterations(0),
linear_solver_iterations(0),
iteration_time_in_seconds(0.0),
step_solver_time_in_seconds(0.0),
@@ -121,13 +123,21 @@ struct IterationSummary {
// Step sized computed by the line search algorithm.
double step_size;
- // Number of function evaluations used by the line search algorithm.
+ // Number of function value evaluations used by the line search algorithm.
int line_search_function_evaluations;
+ // Number of function gradient evaluations used by the line search algorithm.
+ int line_search_gradient_evaluations;
+
+ // Number of iterations taken by the line search algorithm.
+ int line_search_iterations;
+
// Number of iterations taken by the linear solver to solve for the
// Newton step.
int linear_solver_iterations;
+ // All times reported below are wall times.
+
// Time (in seconds) spent inside the minimizer loop in the current
// iteration.
double iteration_time_in_seconds;
diff --git a/extern/libmv/third_party/ceres/include/ceres/jet.h b/extern/libmv/third_party/ceres/include/ceres/jet.h
index 000bd1c116a..4d2a857dc3d 100644
--- a/extern/libmv/third_party/ceres/include/ceres/jet.h
+++ b/extern/libmv/third_party/ceres/include/ceres/jet.h
@@ -405,7 +405,6 @@ CERES_DEFINE_JET_COMPARISON_OPERATOR( != ) // NOLINT
// double-valued and Jet-valued functions, but we are not allowed to put
// Jet-valued functions inside namespace std.
//
-// Missing: cosh, sinh, tanh, tan
// TODO(keir): Switch to "using".
inline double abs (double x) { return std::abs(x); }
inline double log (double x) { return std::log(x); }
@@ -415,6 +414,11 @@ inline double cos (double x) { return std::cos(x); }
inline double acos (double x) { return std::acos(x); }
inline double sin (double x) { return std::sin(x); }
inline double asin (double x) { return std::asin(x); }
+inline double tan (double x) { return std::tan(x); }
+inline double atan (double x) { return std::atan(x); }
+inline double sinh (double x) { return std::sinh(x); }
+inline double cosh (double x) { return std::cosh(x); }
+inline double tanh (double x) { return std::tanh(x); }
inline double pow (double x, double y) { return std::pow(x, y); }
inline double atan2(double y, double x) { return std::atan2(y, x); }
@@ -495,6 +499,58 @@ Jet<T, N> asin(const Jet<T, N>& f) {
return g;
}
+// tan(a + h) ~= tan(a) + (1 + tan(a)^2) h
+template <typename T, int N> inline
+Jet<T, N> tan(const Jet<T, N>& f) {
+ Jet<T, N> g;
+ g.a = tan(f.a);
+ double tan_a = tan(f.a);
+ const T tmp = T(1.0) + tan_a * tan_a;
+ g.v = tmp * f.v;
+ return g;
+}
+
+// atan(a + h) ~= atan(a) + 1 / (1 + a^2) h
+template <typename T, int N> inline
+Jet<T, N> atan(const Jet<T, N>& f) {
+ Jet<T, N> g;
+ g.a = atan(f.a);
+ const T tmp = T(1.0) / (T(1.0) + f.a * f.a);
+ g.v = tmp * f.v;
+ return g;
+}
+
+// sinh(a + h) ~= sinh(a) + cosh(a) h
+template <typename T, int N> inline
+Jet<T, N> sinh(const Jet<T, N>& f) {
+ Jet<T, N> g;
+ g.a = sinh(f.a);
+ const T cosh_a = cosh(f.a);
+ g.v = cosh_a * f.v;
+ return g;
+}
+
+// cosh(a + h) ~= cosh(a) + sinh(a) h
+template <typename T, int N> inline
+Jet<T, N> cosh(const Jet<T, N>& f) {
+ Jet<T, N> g;
+ g.a = cosh(f.a);
+ const T sinh_a = sinh(f.a);
+ g.v = sinh_a * f.v;
+ return g;
+}
+
+// tanh(a + h) ~= tanh(a) + (1 - tanh(a)^2) h
+template <typename T, int N> inline
+Jet<T, N> tanh(const Jet<T, N>& f) {
+ Jet<T, N> g;
+ g.a = tanh(f.a);
+ double tanh_a = tanh(f.a);
+ const T tmp = T(1.0) - tanh_a * tanh_a;
+ g.v = tmp * f.v;
+ return g;
+}
+
// Jet Classification. It is not clear what the appropriate semantics are for
// these classifications. This picks that IsFinite and isnormal are "all"
// operations, i.e. all elements of the jet must be finite for the jet itself
@@ -645,6 +701,11 @@ template<typename T, int N> inline Jet<T, N> ei_exp (const Jet<T, N>& x)
template<typename T, int N> inline Jet<T, N> ei_log (const Jet<T, N>& x) { return log(x); } // NOLINT
template<typename T, int N> inline Jet<T, N> ei_sin (const Jet<T, N>& x) { return sin(x); } // NOLINT
template<typename T, int N> inline Jet<T, N> ei_cos (const Jet<T, N>& x) { return cos(x); } // NOLINT
+template<typename T, int N> inline Jet<T, N> ei_tan (const Jet<T, N>& x) { return tan(x); } // NOLINT
+template<typename T, int N> inline Jet<T, N> ei_atan(const Jet<T, N>& x) { return atan(x); } // NOLINT
+template<typename T, int N> inline Jet<T, N> ei_sinh(const Jet<T, N>& x) { return sinh(x); } // NOLINT
+template<typename T, int N> inline Jet<T, N> ei_cosh(const Jet<T, N>& x) { return cosh(x); } // NOLINT
+template<typename T, int N> inline Jet<T, N> ei_tanh(const Jet<T, N>& x) { return tanh(x); } // NOLINT
template<typename T, int N> inline Jet<T, N> ei_pow (const Jet<T, N>& x, Jet<T, N> y) { return pow(x, y); } // NOLINT
// Note: This has to be in the ceres namespace for argument dependent lookup to
diff --git a/extern/libmv/third_party/ceres/include/ceres/loss_function.h b/extern/libmv/third_party/ceres/include/ceres/loss_function.h
index 0c0ceaaecd0..b99c184525e 100644
--- a/extern/libmv/third_party/ceres/include/ceres/loss_function.h
+++ b/extern/libmv/third_party/ceres/include/ceres/loss_function.h
@@ -75,10 +75,10 @@
#ifndef CERES_PUBLIC_LOSS_FUNCTION_H_
#define CERES_PUBLIC_LOSS_FUNCTION_H_
-#include <glog/logging.h>
#include "ceres/internal/macros.h"
#include "ceres/internal/scoped_ptr.h"
#include "ceres/types.h"
+#include "glog/logging.h"
namespace ceres {
@@ -347,19 +347,20 @@ class ScaledLoss : public LossFunction {
//
// CostFunction* cost_function =
// new AutoDiffCostFunction < UW_Camera_Mapper, 2, 9, 3>(
-// new UW_Camera_Mapper(data->observations[2*i + 0],
-// data->observations[2*i + 1]));
+// new UW_Camera_Mapper(feature_x, feature_y));
//
// LossFunctionWrapper* loss_function(new HuberLoss(1.0), TAKE_OWNERSHIP);
//
// problem.AddResidualBlock(cost_function, loss_function, parameters);
//
// Solver::Options options;
-// scoped_ptr<Solver::Summary> summary1(Solve(problem, options));
+// Solger::Summary summary;
+//
+// Solve(options, &problem, &summary)
//
// loss_function->Reset(new HuberLoss(1.0), TAKE_OWNERSHIP);
//
-// scoped_ptr<Solver::Summary> summary2(Solve(problem, options));
+// Solve(options, &problem, &summary)
//
class LossFunctionWrapper : public LossFunction {
public:
diff --git a/extern/libmv/third_party/ceres/include/ceres/numeric_diff_cost_function.h b/extern/libmv/third_party/ceres/include/ceres/numeric_diff_cost_function.h
index 555bc3d073f..a47a66d9672 100644
--- a/extern/libmv/third_party/ceres/include/ceres/numeric_diff_cost_function.h
+++ b/extern/libmv/third_party/ceres/include/ceres/numeric_diff_cost_function.h
@@ -36,8 +36,10 @@
// To get an numerically differentiated cost function, you must define
// a class with a operator() (a functor) that computes the residuals.
//
-// The function must write the computed value in the last argument (the only
-// non-const one) and return true to indicate success.
+// The function must write the computed value in the last argument
+// (the only non-const one) and return true to indicate success.
+// Please see cost_function.h for details on how the return value
+// maybe used to impose simple constraints on the parameter block.
//
// For example, consider a scalar error e = k - x'y, where both x and y are
// two-dimensional column vector parameters, the prime sign indicates
@@ -80,14 +82,14 @@
//
// CostFunction* cost_function
// = new NumericDiffCostFunction<MyScalarCostFunctor, CENTRAL, 1, 2, 2>(
-// new MyScalarCostFunctor(1.0)); ^ ^ ^
-// | | | |
-// Finite Differencing Scheme -+ | | |
-// Dimension of residual ----------+ | |
-// Dimension of x --------------------+ |
-// Dimension of y -----------------------+
+// new MyScalarCostFunctor(1.0)); ^ ^ ^ ^
+// | | | |
+// Finite Differencing Scheme -+ | | |
+// Dimension of residual ------------+ | |
+// Dimension of x ----------------------+ |
+// Dimension of y -------------------------+
//
-// In this example, there is usually an instance for each measumerent of k.
+// In this example, there is usually an instance for each measurement of k.
//
// In the instantiation above, the template parameters following
// "MyScalarCostFunctor", "1, 2, 2", describe the functor as computing
@@ -124,7 +126,7 @@
// To get a numerically differentiated cost function, define a
// subclass of CostFunction such that the Evaluate() function ignores
// the jacobian parameter. The numeric differentiation wrapper will
-// fill in the jacobian parameter if nececssary by repeatedly calling
+// fill in the jacobian parameter if necessary by repeatedly calling
// the Evaluate() function with small changes to the appropriate
// parameters, and computing the slope. For performance, the numeric
// differentiation wrapper class is templated on the concrete cost
@@ -146,13 +148,13 @@
#ifndef CERES_PUBLIC_NUMERIC_DIFF_COST_FUNCTION_H_
#define CERES_PUBLIC_NUMERIC_DIFF_COST_FUNCTION_H_
-#include <glog/logging.h>
#include "Eigen/Dense"
#include "ceres/cost_function.h"
#include "ceres/internal/numeric_diff.h"
#include "ceres/internal/scoped_ptr.h"
#include "ceres/sized_cost_function.h"
#include "ceres/types.h"
+#include "glog/logging.h"
namespace ceres {
@@ -230,8 +232,8 @@ class NumericDiffCostFunction
if (N5) parameters_reference_copy[5] = parameters_reference_copy[4] + N4;
if (N6) parameters_reference_copy[6] = parameters_reference_copy[5] + N5;
if (N7) parameters_reference_copy[7] = parameters_reference_copy[6] + N6;
- if (N7) parameters_reference_copy[8] = parameters_reference_copy[7] + N7;
- if (N8) parameters_reference_copy[9] = parameters_reference_copy[8] + N8;
+ if (N8) parameters_reference_copy[8] = parameters_reference_copy[7] + N7;
+ if (N9) parameters_reference_copy[9] = parameters_reference_copy[8] + N8;
#define COPY_PARAMETER_BLOCK(block) \
if (N ## block) memcpy(parameters_reference_copy[block], \
diff --git a/extern/libmv/third_party/ceres/include/ceres/problem.h b/extern/libmv/third_party/ceres/include/ceres/problem.h
index 33394ce0e17..663616ddb3b 100644
--- a/extern/libmv/third_party/ceres/include/ceres/problem.h
+++ b/extern/libmv/third_party/ceres/include/ceres/problem.h
@@ -329,12 +329,12 @@ class Problem {
int NumResiduals() const;
// The size of the parameter block.
- int ParameterBlockSize(double* values) const;
+ int ParameterBlockSize(const double* values) const;
// The size of local parameterization for the parameter block. If
// there is no local parameterization associated with this parameter
// block, then ParameterBlockLocalSize = ParameterBlockSize.
- int ParameterBlockLocalSize(double* values) const;
+ int ParameterBlockLocalSize(const double* values) const;
// Fills the passed parameter_blocks vector with pointers to the
// parameter blocks currently in the problem. After this call,
@@ -423,6 +423,7 @@ class Problem {
private:
friend class Solver;
+ friend class Covariance;
internal::scoped_ptr<internal::ProblemImpl> problem_impl_;
CERES_DISALLOW_COPY_AND_ASSIGN(Problem);
};
diff --git a/extern/libmv/third_party/ceres/include/ceres/sized_cost_function.h b/extern/libmv/third_party/ceres/include/ceres/sized_cost_function.h
index 6bfc1af31a2..4f98d4eb95c 100644
--- a/extern/libmv/third_party/ceres/include/ceres/sized_cost_function.h
+++ b/extern/libmv/third_party/ceres/include/ceres/sized_cost_function.h
@@ -38,9 +38,9 @@
#ifndef CERES_PUBLIC_SIZED_COST_FUNCTION_H_
#define CERES_PUBLIC_SIZED_COST_FUNCTION_H_
-#include <glog/logging.h>
#include "ceres/types.h"
#include "ceres/cost_function.h"
+#include "glog/logging.h"
namespace ceres {
diff --git a/extern/libmv/third_party/ceres/include/ceres/solver.h b/extern/libmv/third_party/ceres/include/ceres/solver.h
index 97d082d80e0..25b762a7bd5 100644
--- a/extern/libmv/third_party/ceres/include/ceres/solver.h
+++ b/extern/libmv/third_party/ceres/include/ceres/solver.h
@@ -60,9 +60,19 @@ class Solver {
Options() {
minimizer_type = TRUST_REGION;
line_search_direction_type = LBFGS;
- line_search_type = ARMIJO;
+ line_search_type = WOLFE;
nonlinear_conjugate_gradient_type = FLETCHER_REEVES;
max_lbfgs_rank = 20;
+ use_approximate_eigenvalue_bfgs_scaling = false;
+ line_search_interpolation_type = CUBIC;
+ min_line_search_step_size = 1e-9;
+ line_search_sufficient_function_decrease = 1e-4;
+ max_line_search_step_contraction = 1e-3;
+ min_line_search_step_contraction = 0.6;
+ max_num_line_search_step_size_iterations = 20;
+ max_num_line_search_direction_restarts = 5;
+ line_search_sufficient_curvature_decrease = 0.9;
+ max_line_search_step_expansion = 10.0;
trust_region_strategy_type = LEVENBERG_MARQUARDT;
dogleg_type = TRADITIONAL_DOGLEG;
use_nonmonotonic_steps = false;
@@ -74,8 +84,8 @@ class Solver {
max_trust_region_radius = 1e16;
min_trust_region_radius = 1e-32;
min_relative_decrease = 1e-3;
- lm_min_diagonal = 1e-6;
- lm_max_diagonal = 1e32;
+ min_lm_diagonal = 1e-6;
+ max_lm_diagonal = 1e32;
max_num_consecutive_invalid_steps = 5;
function_tolerance = 1e-6;
gradient_tolerance = 1e-10;
@@ -89,24 +99,27 @@ class Solver {
preconditioner_type = JACOBI;
- sparse_linear_algebra_library = SUITE_SPARSE;
+ dense_linear_algebra_library_type = EIGEN;
+ sparse_linear_algebra_library_type = SUITE_SPARSE;
#if defined(CERES_NO_SUITESPARSE) && !defined(CERES_NO_CXSPARSE)
- sparse_linear_algebra_library = CX_SPARSE;
+ sparse_linear_algebra_library_type = CX_SPARSE;
#endif
+
num_linear_solver_threads = 1;
linear_solver_ordering = NULL;
use_postordering = false;
- use_inner_iterations = false;
- inner_iteration_ordering = NULL;
- linear_solver_min_num_iterations = 1;
- linear_solver_max_num_iterations = 500;
+ min_linear_solver_iterations = 1;
+ max_linear_solver_iterations = 500;
eta = 1e-1;
jacobi_scaling = true;
+ use_inner_iterations = false;
+ inner_iteration_tolerance = 1e-3;
+ inner_iteration_ordering = NULL;
logging_type = PER_MINIMIZER_ITERATION;
minimizer_progress_to_stdout = false;
- lsqp_dump_directory = "/tmp";
- lsqp_dump_format_type = TEXTFILE;
+ trust_region_problem_dump_directory = "/tmp";
+ trust_region_problem_dump_format_type = TEXTFILE;
check_gradients = false;
gradient_check_relative_precision = 1e-8;
numeric_derivative_relative_step_size = 1e-6;
@@ -171,6 +184,109 @@ class Solver {
// Limited Storage". Mathematics of Computation 35 (151): 773–782.
int max_lbfgs_rank;
+ // As part of the (L)BFGS update step (BFGS) / right-multiply step (L-BFGS),
+ // the initial inverse Hessian approximation is taken to be the Identity.
+ // However, Oren showed that using instead I * \gamma, where \gamma is
+ // chosen to approximate an eigenvalue of the true inverse Hessian can
+ // result in improved convergence in a wide variety of cases. Setting
+ // use_approximate_eigenvalue_bfgs_scaling to true enables this scaling.
+ //
+ // It is important to note that approximate eigenvalue scaling does not
+ // always improve convergence, and that it can in fact significantly degrade
+ // performance for certain classes of problem, which is why it is disabled
+ // by default. In particular it can degrade performance when the
+ // sensitivity of the problem to different parameters varies significantly,
+ // as in this case a single scalar factor fails to capture this variation
+ // and detrimentally downscales parts of the jacobian approximation which
+ // correspond to low-sensitivity parameters. It can also reduce the
+ // robustness of the solution to errors in the jacobians.
+ //
+ // Oren S.S., Self-scaling variable metric (SSVM) algorithms
+ // Part II: Implementation and experiments, Management Science,
+ // 20(5), 863-874, 1974.
+ bool use_approximate_eigenvalue_bfgs_scaling;
+
+ // Degree of the polynomial used to approximate the objective
+ // function. Valid values are BISECTION, QUADRATIC and CUBIC.
+ //
+ // BISECTION corresponds to pure backtracking search with no
+ // interpolation.
+ LineSearchInterpolationType line_search_interpolation_type;
+
+ // If during the line search, the step_size falls below this
+ // value, it is truncated to zero.
+ double min_line_search_step_size;
+
+ // Line search parameters.
+
+ // Solving the line search problem exactly is computationally
+ // prohibitive. Fortunately, line search based optimization
+ // algorithms can still guarantee convergence if instead of an
+ // exact solution, the line search algorithm returns a solution
+ // which decreases the value of the objective function
+ // sufficiently. More precisely, we are looking for a step_size
+ // s.t.
+ //
+ // f(step_size) <= f(0) + sufficient_decrease * f'(0) * step_size
+ //
+ double line_search_sufficient_function_decrease;
+
+ // In each iteration of the line search,
+ //
+ // new_step_size >= max_line_search_step_contraction * step_size
+ //
+ // Note that by definition, for contraction:
+ //
+ // 0 < max_step_contraction < min_step_contraction < 1
+ //
+ double max_line_search_step_contraction;
+
+ // In each iteration of the line search,
+ //
+ // new_step_size <= min_line_search_step_contraction * step_size
+ //
+ // Note that by definition, for contraction:
+ //
+ // 0 < max_step_contraction < min_step_contraction < 1
+ //
+ double min_line_search_step_contraction;
+
+ // Maximum number of trial step size iterations during each line search,
+ // if a step size satisfying the search conditions cannot be found within
+ // this number of trials, the line search will terminate.
+ int max_num_line_search_step_size_iterations;
+
+ // Maximum number of restarts of the line search direction algorithm before
+ // terminating the optimization. Restarts of the line search direction
+ // algorithm occur when the current algorithm fails to produce a new descent
+ // direction. This typically indicates a numerical failure, or a breakdown
+ // in the validity of the approximations used.
+ int max_num_line_search_direction_restarts;
+
+ // The strong Wolfe conditions consist of the Armijo sufficient
+ // decrease condition, and an additional requirement that the
+ // step-size be chosen s.t. the _magnitude_ ('strong' Wolfe
+ // conditions) of the gradient along the search direction
+ // decreases sufficiently. Precisely, this second condition
+ // is that we seek a step_size s.t.
+ //
+ // |f'(step_size)| <= sufficient_curvature_decrease * |f'(0)|
+ //
+ // Where f() is the line search objective and f'() is the derivative
+ // of f w.r.t step_size (d f / d step_size).
+ double line_search_sufficient_curvature_decrease;
+
+ // During the bracketing phase of the Wolfe search, the step size is
+ // increased until either a point satisfying the Wolfe conditions is
+ // found, or an upper bound for a bracket containing a point satisfying
+ // the conditions is found. Precisely, at each iteration of the
+ // expansion:
+ //
+ // new_step_size <= max_step_expansion * step_size.
+ //
+ // By definition for expansion, max_step_expansion > 1.0.
+ double max_line_search_step_expansion;
+
TrustRegionStrategyType trust_region_strategy_type;
// Type of dogleg strategy to use.
@@ -230,11 +346,11 @@ class Solver {
// the normal equations J'J is used to control the size of the
// trust region. Extremely small and large values along the
// diagonal can make this regularization scheme
- // fail. lm_max_diagonal and lm_min_diagonal, clamp the values of
+ // fail. max_lm_diagonal and min_lm_diagonal, clamp the values of
// diag(J'J) from above and below. In the normal course of
// operation, the user should not have to modify these parameters.
- double lm_min_diagonal;
- double lm_max_diagonal;
+ double min_lm_diagonal;
+ double max_lm_diagonal;
// Sometimes due to numerical conditioning problems or linear
// solver flakiness, the trust region strategy may return a
@@ -269,11 +385,24 @@ class Solver {
// Type of preconditioner to use with the iterative linear solvers.
PreconditionerType preconditioner_type;
+ // Ceres supports using multiple dense linear algebra libraries
+ // for dense matrix factorizations. Currently EIGEN and LAPACK are
+ // the valid choices. EIGEN is always available, LAPACK refers to
+ // the system BLAS + LAPACK library which may or may not be
+ // available.
+ //
+ // This setting affects the DENSE_QR, DENSE_NORMAL_CHOLESKY and
+ // DENSE_SCHUR solvers. For small to moderate sized probem EIGEN
+ // is a fine choice but for large problems, an optimized LAPACK +
+ // BLAS implementation can make a substantial difference in
+ // performance.
+ DenseLinearAlgebraLibraryType dense_linear_algebra_library_type;
+
// Ceres supports using multiple sparse linear algebra libraries
// for sparse matrix ordering and factorizations. Currently,
// SUITE_SPARSE and CX_SPARSE are the valid choices, depending on
// whether they are linked into Ceres at build time.
- SparseLinearAlgebraLibraryType sparse_linear_algebra_library;
+ SparseLinearAlgebraLibraryType sparse_linear_algebra_library_type;
// Number of threads used by Ceres to solve the Newton
// step. Currently only the SPARSE_SCHUR solver is capable of
@@ -351,9 +480,6 @@ class Solver {
// deallocate the memory when destroyed.
ParameterBlockOrdering* linear_solver_ordering;
- // Note: This option only applies to the SPARSE_NORMAL_CHOLESKY
- // solver when used with SUITE_SPARSE.
-
// Sparse Cholesky factorization algorithms use a fill-reducing
// ordering to permute the columns of the Jacobian matrix. There
// are two ways of doing this.
@@ -372,7 +498,7 @@ class Solver {
// In some rare cases, it is worth using a more complicated
// reordering algorithm which has slightly better runtime
// performance at the expense of an extra copy of the Jacobian
- // // matrix. Setting use_postordering to true enables this tradeoff.
+ // matrix. Setting use_postordering to true enables this tradeoff.
bool use_postordering;
// Some non-linear least squares problems have additional
@@ -443,18 +569,30 @@ class Solver {
//
// 2. Specify a collection of of ordered independent sets. Where
// the lower numbered groups are optimized before the higher
- // number groups. Each group must be an independent set.
+ // number groups. Each group must be an independent set. Not
+ // all parameter blocks need to be present in the ordering.
ParameterBlockOrdering* inner_iteration_ordering;
+ // Generally speaking, inner iterations make significant progress
+ // in the early stages of the solve and then their contribution
+ // drops down sharply, at which point the time spent doing inner
+ // iterations is not worth it.
+ //
+ // Once the relative decrease in the objective function due to
+ // inner iterations drops below inner_iteration_tolerance, the use
+ // of inner iterations in subsequent trust region minimizer
+ // iterations is disabled.
+ double inner_iteration_tolerance;
+
// Minimum number of iterations for which the linear solver should
// run, even if the convergence criterion is satisfied.
- int linear_solver_min_num_iterations;
+ int min_linear_solver_iterations;
// Maximum number of iterations for which the linear solver should
// run. If the solver does not converge in less than
- // linear_solver_max_num_iterations, then it returns
- // MAX_ITERATIONS, as its termination type.
- int linear_solver_max_num_iterations;
+ // max_linear_solver_iterations, then it returns MAX_ITERATIONS,
+ // as its termination type.
+ int max_linear_solver_iterations;
// Forcing sequence parameter. The truncated Newton solver uses
// this number to control the relative accuracy with which the
@@ -480,14 +618,17 @@ class Solver {
// is sent to STDOUT.
bool minimizer_progress_to_stdout;
- // List of iterations at which the optimizer should dump the
- // linear least squares problem to disk. Useful for testing and
- // benchmarking. If empty (default), no problems are dumped.
- //
- // This is ignored if protocol buffers are disabled.
- vector<int> lsqp_iterations_to_dump;
- string lsqp_dump_directory;
- DumpFormatType lsqp_dump_format_type;
+ // List of iterations at which the minimizer should dump the trust
+ // region problem. Useful for testing and benchmarking. If empty
+ // (default), no problems are dumped.
+ vector<int> trust_region_minimizer_iterations_to_dump;
+
+ // Directory to which the problems should be written to. Should be
+ // non-empty if trust_region_minimizer_iterations_to_dump is
+ // non-empty and trust_region_problem_dump_format_type is not
+ // CONSOLE.
+ string trust_region_problem_dump_directory;
+ DumpFormatType trust_region_problem_dump_format_type;
// Finite differences options ----------------------------------------------
@@ -591,6 +732,9 @@ class Solver {
int num_successful_steps;
int num_unsuccessful_steps;
+ int num_inner_iteration_steps;
+
+ // All times reported below are wall times.
// When the user calls Solve, before the actual optimization
// occurs, Ceres performs a number of preprocessing steps. These
@@ -612,6 +756,7 @@ class Solver {
double linear_solver_time_in_seconds;
double residual_evaluation_time_in_seconds;
double jacobian_evaluation_time_in_seconds;
+ double inner_iteration_time_in_seconds;
// Preprocessor summary.
int num_parameter_blocks;
@@ -641,20 +786,26 @@ class Solver {
vector<int> linear_solver_ordering_given;
vector<int> linear_solver_ordering_used;
+ bool inner_iterations_given;
+ bool inner_iterations_used;
+
+ vector<int> inner_iteration_ordering_given;
+ vector<int> inner_iteration_ordering_used;
+
PreconditionerType preconditioner_type;
TrustRegionStrategyType trust_region_strategy_type;
DoglegType dogleg_type;
- bool inner_iterations;
- SparseLinearAlgebraLibraryType sparse_linear_algebra_library;
+ DenseLinearAlgebraLibraryType dense_linear_algebra_library_type;
+ SparseLinearAlgebraLibraryType sparse_linear_algebra_library_type;
LineSearchDirectionType line_search_direction_type;
LineSearchType line_search_type;
- int max_lbfgs_rank;
+ LineSearchInterpolationType line_search_interpolation_type;
+ NonlinearConjugateGradientType nonlinear_conjugate_gradient_type;
- vector<int> inner_iteration_ordering_given;
- vector<int> inner_iteration_ordering_used;
+ int max_lbfgs_rank;
};
// Once a least squares problem has been built, this function takes
diff --git a/extern/libmv/third_party/ceres/include/ceres/types.h b/extern/libmv/third_party/ceres/include/ceres/types.h
index 5512340f7b3..ffa743a2d97 100644
--- a/extern/libmv/third_party/ceres/include/ceres/types.h
+++ b/extern/libmv/third_party/ceres/include/ceres/types.h
@@ -37,6 +37,8 @@
#ifndef CERES_PUBLIC_TYPES_H_
#define CERES_PUBLIC_TYPES_H_
+#include <string>
+
#include "ceres/internal/port.h"
namespace ceres {
@@ -124,6 +126,11 @@ enum SparseLinearAlgebraLibraryType {
CX_SPARSE
};
+enum DenseLinearAlgebraLibraryType {
+ EIGEN,
+ LAPACK
+};
+
enum LinearSolverTerminationType {
// Termination criterion was met. For factorization based solvers
// the tolerance is assumed to be zero. Any user provided values are
@@ -167,10 +174,47 @@ enum LineSearchDirectionType {
// used is determined by NonlinerConjuateGradientType.
NONLINEAR_CONJUGATE_GRADIENT,
- // A limited memory approximation to the inverse Hessian is
- // maintained and used to compute a quasi-Newton step.
+ // BFGS, and it's limited memory approximation L-BFGS, are quasi-Newton
+ // algorithms that approximate the Hessian matrix by iteratively refining
+ // an initial estimate with rank-one updates using the gradient at each
+ // iteration. They are a generalisation of the Secant method and satisfy
+ // the Secant equation. The Secant equation has an infinium of solutions
+ // in multiple dimensions, as there are N*(N+1)/2 degrees of freedom in a
+ // symmetric matrix but only N conditions are specified by the Secant
+ // equation. The requirement that the Hessian approximation be positive
+ // definite imposes another N additional constraints, but that still leaves
+ // remaining degrees-of-freedom. (L)BFGS methods uniquely deteremine the
+ // approximate Hessian by imposing the additional constraints that the
+ // approximation at the next iteration must be the 'closest' to the current
+ // approximation (the nature of how this proximity is measured is actually
+ // the defining difference between a family of quasi-Newton methods including
+ // (L)BFGS & DFP). (L)BFGS is currently regarded as being the best known
+ // general quasi-Newton method.
+ //
+ // The principal difference between BFGS and L-BFGS is that whilst BFGS
+ // maintains a full, dense approximation to the (inverse) Hessian, L-BFGS
+ // maintains only a window of the last M observations of the parameters and
+ // gradients. Using this observation history, the calculation of the next
+ // search direction can be computed without requiring the construction of the
+ // full dense inverse Hessian approximation. This is particularly important
+ // for problems with a large number of parameters, where storage of an N-by-N
+ // matrix in memory would be prohibitive.
+ //
+ // For more details on BFGS see:
+ //
+ // Broyden, C.G., "The Convergence of a Class of Double-rank Minimization
+ // Algorithms,"; J. Inst. Maths. Applics., Vol. 6, pp 76–90, 1970.
+ //
+ // Fletcher, R., "A New Approach to Variable Metric Algorithms,"
+ // Computer Journal, Vol. 13, pp 317–322, 1970.
//
- // For more details see
+ // Goldfarb, D., "A Family of Variable Metric Updates Derived by Variational
+ // Means," Mathematics of Computing, Vol. 24, pp 23–26, 1970.
+ //
+ // Shanno, D.F., "Conditioning of Quasi-Newton Methods for Function
+ // Minimization," Mathematics of Computing, Vol. 24, pp 647–656, 1970.
+ //
+ // For more details on L-BFGS see:
//
// Nocedal, J. (1980). "Updating Quasi-Newton Matrices with Limited
// Storage". Mathematics of Computation 35 (151): 773–782.
@@ -179,7 +223,12 @@ enum LineSearchDirectionType {
// "Representations of Quasi-Newton Matrices and their use in
// Limited Memory Methods". Mathematical Programming 63 (4):
// 129–156.
+ //
+ // A general reference for both methods:
+ //
+ // Nocedal J., Wright S., Numerical Optimization, 2nd Ed. Springer, 1999.
LBFGS,
+ BFGS,
};
// Nonliner conjugate gradient methods are a generalization of the
@@ -198,6 +247,7 @@ enum LineSearchType {
// Backtracking line search with polynomial interpolation or
// bisection.
ARMIJO,
+ WOLFE,
};
// Ceres supports different strategies for computing the trust region
@@ -310,13 +360,6 @@ enum DumpFormatType {
CONSOLE,
// Write out the linear least squares problem to the directory
- // pointed to by Solver::Options::lsqp_dump_directory as a protocol
- // buffer. linear_least_squares_problems.h/cc contains routines for
- // loading these problems. For details on the on disk format used,
- // see matrix.proto. The files are named lm_iteration_???.lsqp.
- PROTOBUF,
-
- // Write out the linear least squares problem to the directory
// pointed to by Solver::Options::lsqp_dump_directory as text files
// which can be read into MATLAB/Octave. The Jacobian is dumped as a
// text file containing (i,j,s) triplets, the vectors D, x and f are
@@ -339,6 +382,18 @@ enum NumericDiffMethod {
FORWARD
};
+enum LineSearchInterpolationType {
+ BISECTION,
+ QUADRATIC,
+ CUBIC
+};
+
+enum CovarianceAlgorithmType {
+ DENSE_SVD,
+ SPARSE_CHOLESKY,
+ SPARSE_QR
+};
+
const char* LinearSolverTypeToString(LinearSolverType type);
bool StringToLinearSolverType(string value, LinearSolverType* type);
@@ -351,6 +406,12 @@ bool StringToSparseLinearAlgebraLibraryType(
string value,
SparseLinearAlgebraLibraryType* type);
+const char* DenseLinearAlgebraLibraryTypeToString(
+ DenseLinearAlgebraLibraryType type);
+bool StringToDenseLinearAlgebraLibraryType(
+ string value,
+ DenseLinearAlgebraLibraryType* type);
+
const char* TrustRegionStrategyTypeToString(TrustRegionStrategyType type);
bool StringToTrustRegionStrategyType(string value,
TrustRegionStrategyType* type);
@@ -371,7 +432,20 @@ bool StringToLineSearchType(string value, LineSearchType* type);
const char* NonlinearConjugateGradientTypeToString(
NonlinearConjugateGradientType type);
bool StringToNonlinearConjugateGradientType(
- string value, NonlinearConjugateGradientType* type);
+ string value,
+ NonlinearConjugateGradientType* type);
+
+const char* LineSearchInterpolationTypeToString(
+ LineSearchInterpolationType type);
+bool StringToLineSearchInterpolationType(
+ string value,
+ LineSearchInterpolationType* type);
+
+const char* CovarianceAlgorithmTypeToString(
+ CovarianceAlgorithmType type);
+bool StringToCovarianceAlgorithmType(
+ string value,
+ CovarianceAlgorithmType* type);
const char* LinearSolverTerminationTypeToString(
LinearSolverTerminationType type);
@@ -381,7 +455,8 @@ const char* SolverTerminationTypeToString(SolverTerminationType type);
bool IsSchurType(LinearSolverType type);
bool IsSparseLinearAlgebraLibraryTypeAvailable(
SparseLinearAlgebraLibraryType type);
-
+bool IsDenseLinearAlgebraLibraryTypeAvailable(
+ DenseLinearAlgebraLibraryType type);
} // namespace ceres
diff --git a/extern/libmv/third_party/ceres/internal/ceres/blas.cc b/extern/libmv/third_party/ceres/internal/ceres/blas.cc
new file mode 100644
index 00000000000..f79b1ebfae1
--- /dev/null
+++ b/extern/libmv/third_party/ceres/internal/ceres/blas.cc
@@ -0,0 +1,78 @@
+// Ceres Solver - A fast non-linear least squares minimizer
+// Copyright 2013 Google Inc. All rights reserved.
+// http://code.google.com/p/ceres-solver/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+// * Neither the name of Google Inc. nor the names of its contributors may be
+// used to endorse or promote products derived from this software without
+// specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Author: sameeragarwal@google.com (Sameer Agarwal)
+
+#include "ceres/blas.h"
+#include "glog/logging.h"
+
+extern "C" void dsyrk_(char* uplo,
+ char* trans,
+ int* n,
+ int* k,
+ double* alpha,
+ double* a,
+ int* lda,
+ double* beta,
+ double* c,
+ int* ldc);
+
+namespace ceres {
+namespace internal {
+
+void BLAS::SymmetricRankKUpdate(int num_rows,
+ int num_cols,
+ const double* a,
+ bool transpose,
+ double alpha,
+ double beta,
+ double* c) {
+#ifdef CERES_NO_LAPACK
+ LOG(FATAL) << "Ceres was built without a BLAS library.";
+#else
+ char uplo = 'L';
+ char trans = transpose ? 'T' : 'N';
+ int n = transpose ? num_cols : num_rows;
+ int k = transpose ? num_rows : num_cols;
+ int lda = k;
+ int ldc = n;
+ dsyrk_(&uplo,
+ &trans,
+ &n,
+ &k,
+ &alpha,
+ const_cast<double*>(a),
+ &lda,
+ &beta,
+ c,
+ &ldc);
+#endif
+}
+
+} // namespace internal
+} // namespace ceres
diff --git a/extern/libmv/third_party/ceres/internal/ceres/blas.h b/extern/libmv/third_party/ceres/internal/ceres/blas.h
index 9629b3da550..2ab666395b9 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/blas.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/blas.h
@@ -28,377 +28,28 @@
//
// Author: sameeragarwal@google.com (Sameer Agarwal)
//
-// Simple blas functions for use in the Schur Eliminator. These are
-// fairly basic implementations which already yield a significant
-// speedup in the eliminator performance.
+// Wrapper functions around BLAS functions.
#ifndef CERES_INTERNAL_BLAS_H_
#define CERES_INTERNAL_BLAS_H_
-#include "ceres/internal/eigen.h"
-#include "glog/logging.h"
-
namespace ceres {
namespace internal {
-// Remove the ".noalias()" annotation from the matrix matrix
-// mutliplies to produce a correct build with the Android NDK,
-// including versions 6, 7, 8, and 8b, when built with STLPort and the
-// non-standalone toolchain (i.e. ndk-build). This appears to be a
-// compiler bug; if the workaround is not in place, the line
-//
-// block.noalias() -= A * B;
-//
-// gets compiled to
-//
-// block.noalias() += A * B;
-//
-// which breaks schur elimination. Introducing a temporary by removing the
-// .noalias() annotation causes the issue to disappear. Tracking this
-// issue down was tricky, since the test suite doesn't run when built with
-// the non-standalone toolchain.
-//
-// TODO(keir): Make a reproduction case for this and send it upstream.
-#ifdef CERES_WORK_AROUND_ANDROID_NDK_COMPILER_BUG
-#define CERES_MAYBE_NOALIAS
-#else
-#define CERES_MAYBE_NOALIAS .noalias()
-#endif
-
-// The following three macros are used to share code and reduce
-// template junk across the various GEMM variants.
-#define CERES_GEMM_BEGIN(name) \
- template<int kRowA, int kColA, int kRowB, int kColB, int kOperation> \
- inline void name(const double* A, \
- const int num_row_a, \
- const int num_col_a, \
- const double* B, \
- const int num_row_b, \
- const int num_col_b, \
- double* C, \
- const int start_row_c, \
- const int start_col_c, \
- const int row_stride_c, \
- const int col_stride_c)
-
-#define CERES_GEMM_NAIVE_HEADER \
- DCHECK_GT(num_row_a, 0); \
- DCHECK_GT(num_col_a, 0); \
- DCHECK_GT(num_row_b, 0); \
- DCHECK_GT(num_col_b, 0); \
- DCHECK_GE(start_row_c, 0); \
- DCHECK_GE(start_col_c, 0); \
- DCHECK_GT(row_stride_c, 0); \
- DCHECK_GT(col_stride_c, 0); \
- DCHECK((kRowA == Eigen::Dynamic) || (kRowA == num_row_a)); \
- DCHECK((kColA == Eigen::Dynamic) || (kColA == num_col_a)); \
- DCHECK((kRowB == Eigen::Dynamic) || (kRowB == num_row_b)); \
- DCHECK((kColB == Eigen::Dynamic) || (kColB == num_col_b)); \
- const int NUM_ROW_A = (kRowA != Eigen::Dynamic ? kRowA : num_row_a); \
- const int NUM_COL_A = (kColA != Eigen::Dynamic ? kColA : num_col_a); \
- const int NUM_ROW_B = (kColB != Eigen::Dynamic ? kRowB : num_row_b); \
- const int NUM_COL_B = (kColB != Eigen::Dynamic ? kColB : num_col_b);
-
-#define CERES_GEMM_EIGEN_HEADER \
- const typename EigenTypes<kRowA, kColA>::ConstMatrixRef \
- Aref(A, num_row_a, num_col_a); \
- const typename EigenTypes<kRowB, kColB>::ConstMatrixRef \
- Bref(B, num_row_b, num_col_b); \
- MatrixRef Cref(C, row_stride_c, col_stride_c); \
-
-#define CERES_CALL_GEMM(name) \
- name<kRowA, kColA, kRowB, kColB, kOperation>( \
- A, num_row_a, num_col_a, \
- B, num_row_b, num_col_b, \
- C, start_row_c, start_col_c, row_stride_c, col_stride_c);
-
-
-// For the matrix-matrix functions below, there are three variants for
-// each functionality. Foo, FooNaive and FooEigen. Foo is the one to
-// be called by the user. FooNaive is a basic loop based
-// implementation and FooEigen uses Eigen's implementation. Foo
-// chooses between FooNaive and FooEigen depending on how many of the
-// template arguments are fixed at compile time. Currently, FooEigen
-// is called if all matrix dimensions are compile time
-// constants. FooNaive is called otherwise. This leads to the best
-// performance currently.
-//
-// The MatrixMatrixMultiply variants compute:
-//
-// C op A * B;
-//
-// The MatrixTransposeMatrixMultiply variants compute:
-//
-// C op A' * B
-//
-// where op can be +=, -=, or =.
-//
-// The template parameters (kRowA, kColA, kRowB, kColB) allow
-// specialization of the loop at compile time. If this information is
-// not available, then Eigen::Dynamic should be used as the template
-// argument.
-//
-// kOperation = 1 -> C += A * B
-// kOperation = -1 -> C -= A * B
-// kOperation = 0 -> C = A * B
-//
-// The functions can write into matrices C which are larger than the
-// matrix A * B. This is done by specifying the true size of C via
-// row_stride_c and col_stride_c, and then indicating where A * B
-// should be written into by start_row_c and start_col_c.
-//
-// Graphically if row_stride_c = 10, col_stride_c = 12, start_row_c =
-// 4 and start_col_c = 5, then if A = 3x2 and B = 2x4, we get
-//
-// ------------
-// ------------
-// ------------
-// ------------
-// -----xxxx---
-// -----xxxx---
-// -----xxxx---
-// ------------
-// ------------
-// ------------
-//
-CERES_GEMM_BEGIN(MatrixMatrixMultiplyEigen) {
- CERES_GEMM_EIGEN_HEADER
- Eigen::Block<MatrixRef, kRowA, kColB>
- block(Cref, start_row_c, start_col_c, num_row_a, num_col_b);
-
- if (kOperation > 0) {
- block CERES_MAYBE_NOALIAS += Aref * Bref;
- } else if (kOperation < 0) {
- block CERES_MAYBE_NOALIAS -= Aref * Bref;
- } else {
- block CERES_MAYBE_NOALIAS = Aref * Bref;
- }
-}
-
-CERES_GEMM_BEGIN(MatrixMatrixMultiplyNaive) {
- CERES_GEMM_NAIVE_HEADER
- DCHECK_EQ(NUM_COL_A, NUM_ROW_B);
-
- const int NUM_ROW_C = NUM_ROW_A;
- const int NUM_COL_C = NUM_COL_B;
- DCHECK_LE(start_row_c + NUM_ROW_C, row_stride_c);
- DCHECK_LE(start_col_c + NUM_COL_C, col_stride_c);
-
- for (int row = 0; row < NUM_ROW_C; ++row) {
- for (int col = 0; col < NUM_COL_C; ++col) {
- double tmp = 0.0;
- for (int k = 0; k < NUM_COL_A; ++k) {
- tmp += A[row * NUM_COL_A + k] * B[k * NUM_COL_B + col];
- }
-
- const int index = (row + start_row_c) * col_stride_c + start_col_c + col;
- if (kOperation > 0) {
- C[index] += tmp;
- } else if (kOperation < 0) {
- C[index] -= tmp;
- } else {
- C[index] = tmp;
- }
- }
- }
-}
-
-CERES_GEMM_BEGIN(MatrixMatrixMultiply) {
-#ifdef CERES_NO_CUSTOM_BLAS
-
- CERES_CALL_GEMM(MatrixMatrixMultiplyEigen)
- return;
-
-#else
-
- if (kRowA != Eigen::Dynamic && kColA != Eigen::Dynamic &&
- kRowB != Eigen::Dynamic && kColB != Eigen::Dynamic) {
- CERES_CALL_GEMM(MatrixMatrixMultiplyEigen)
- } else {
- CERES_CALL_GEMM(MatrixMatrixMultiplyNaive)
- }
-
-#endif
-}
-
-CERES_GEMM_BEGIN(MatrixTransposeMatrixMultiplyEigen) {
- CERES_GEMM_EIGEN_HEADER
- Eigen::Block<MatrixRef, kColA, kColB> block(Cref,
- start_row_c, start_col_c,
- num_col_a, num_col_b);
- if (kOperation > 0) {
- block CERES_MAYBE_NOALIAS += Aref.transpose() * Bref;
- } else if (kOperation < 0) {
- block CERES_MAYBE_NOALIAS -= Aref.transpose() * Bref;
- } else {
- block CERES_MAYBE_NOALIAS = Aref.transpose() * Bref;
- }
-}
-
-CERES_GEMM_BEGIN(MatrixTransposeMatrixMultiplyNaive) {
- CERES_GEMM_NAIVE_HEADER
- DCHECK_EQ(NUM_ROW_A, NUM_ROW_B);
-
- const int NUM_ROW_C = NUM_COL_A;
- const int NUM_COL_C = NUM_COL_B;
- DCHECK_LE(start_row_c + NUM_ROW_C, row_stride_c);
- DCHECK_LE(start_col_c + NUM_COL_C, col_stride_c);
-
- for (int row = 0; row < NUM_ROW_C; ++row) {
- for (int col = 0; col < NUM_COL_C; ++col) {
- double tmp = 0.0;
- for (int k = 0; k < NUM_ROW_A; ++k) {
- tmp += A[k * NUM_COL_A + row] * B[k * NUM_COL_B + col];
- }
-
- const int index = (row + start_row_c) * col_stride_c + start_col_c + col;
- if (kOperation > 0) {
- C[index]+= tmp;
- } else if (kOperation < 0) {
- C[index]-= tmp;
- } else {
- C[index]= tmp;
- }
- }
- }
-}
-
-CERES_GEMM_BEGIN(MatrixTransposeMatrixMultiply) {
-#ifdef CERES_NO_CUSTOM_BLAS
-
- CERES_CALL_GEMM(MatrixTransposeMatrixMultiplyEigen)
- return;
-
-#else
-
- if (kRowA != Eigen::Dynamic && kColA != Eigen::Dynamic &&
- kRowB != Eigen::Dynamic && kColB != Eigen::Dynamic) {
- CERES_CALL_GEMM(MatrixTransposeMatrixMultiplyEigen)
- } else {
- CERES_CALL_GEMM(MatrixTransposeMatrixMultiplyNaive)
- }
-
-#endif
-}
-
-// Matrix-Vector multiplication
-//
-// c op A * b;
-//
-// where op can be +=, -=, or =.
-//
-// The template parameters (kRowA, kColA) allow specialization of the
-// loop at compile time. If this information is not available, then
-// Eigen::Dynamic should be used as the template argument.
-//
-// kOperation = 1 -> c += A' * b
-// kOperation = -1 -> c -= A' * b
-// kOperation = 0 -> c = A' * b
-template<int kRowA, int kColA, int kOperation>
-inline void MatrixVectorMultiply(const double* A,
- const int num_row_a,
- const int num_col_a,
- const double* b,
- double* c) {
-#ifdef CERES_NO_CUSTOM_BLAS
- const typename EigenTypes<kRowA, kColA>::ConstMatrixRef
- Aref(A, num_row_a, num_col_a);
- const typename EigenTypes<kColA>::ConstVectorRef bref(b, num_col_a);
- typename EigenTypes<kRowA>::VectorRef cref(c, num_row_a);
-
- // lazyProduct works better than .noalias() for matrix-vector
- // products.
- if (kOperation > 0) {
- cref += Aref.lazyProduct(bref);
- } else if (kOperation < 0) {
- cref -= Aref.lazyProduct(bref);
- } else {
- cref = Aref.lazyProduct(bref);
- }
-#else
-
- DCHECK_GT(num_row_a, 0);
- DCHECK_GT(num_col_a, 0);
- DCHECK((kRowA == Eigen::Dynamic) || (kRowA == num_row_a));
- DCHECK((kColA == Eigen::Dynamic) || (kColA == num_col_a));
-
- const int NUM_ROW_A = (kRowA != Eigen::Dynamic ? kRowA : num_row_a);
- const int NUM_COL_A = (kColA != Eigen::Dynamic ? kColA : num_col_a);
-
- for (int row = 0; row < NUM_ROW_A; ++row) {
- double tmp = 0.0;
- for (int col = 0; col < NUM_COL_A; ++col) {
- tmp += A[row * NUM_COL_A + col] * b[col];
- }
-
- if (kOperation > 0) {
- c[row] += tmp;
- } else if (kOperation < 0) {
- c[row] -= tmp;
- } else {
- c[row] = tmp;
- }
- }
-#endif // CERES_NO_CUSTOM_BLAS
-}
-
-// Similar to MatrixVectorMultiply, except that A is transposed, i.e.,
-//
-// c op A' * b;
-template<int kRowA, int kColA, int kOperation>
-inline void MatrixTransposeVectorMultiply(const double* A,
- const int num_row_a,
- const int num_col_a,
- const double* b,
- double* c) {
-#ifdef CERES_NO_CUSTOM_BLAS
- const typename EigenTypes<kRowA, kColA>::ConstMatrixRef
- Aref(A, num_row_a, num_col_a);
- const typename EigenTypes<kRowA>::ConstVectorRef bref(b, num_row_a);
- typename EigenTypes<kColA>::VectorRef cref(c, num_col_a);
-
- // lazyProduct works better than .noalias() for matrix-vector
- // products.
- if (kOperation > 0) {
- cref += Aref.transpose().lazyProduct(bref);
- } else if (kOperation < 0) {
- cref -= Aref.transpose().lazyProduct(bref);
- } else {
- cref = Aref.transpose().lazyProduct(bref);
- }
-#else
-
- DCHECK_GT(num_row_a, 0);
- DCHECK_GT(num_col_a, 0);
- DCHECK((kRowA == Eigen::Dynamic) || (kRowA == num_row_a));
- DCHECK((kColA == Eigen::Dynamic) || (kColA == num_col_a));
-
- const int NUM_ROW_A = (kRowA != Eigen::Dynamic ? kRowA : num_row_a);
- const int NUM_COL_A = (kColA != Eigen::Dynamic ? kColA : num_col_a);
-
- for (int row = 0; row < NUM_COL_A; ++row) {
- double tmp = 0.0;
- for (int col = 0; col < NUM_ROW_A; ++col) {
- tmp += A[col * NUM_COL_A + row] * b[col];
- }
-
- if (kOperation > 0) {
- c[row] += tmp;
- } else if (kOperation < 0) {
- c[row] -= tmp;
- } else {
- c[row] = tmp;
- }
- }
-#endif // CERES_NO_CUSTOM_BLAS
-}
-
-
-#undef CERES_MAYBE_NOALIAS
-#undef CERES_GEMM_BEGIN
-#undef CERES_GEMM_EIGEN_HEADER
-#undef CERES_GEMM_NAIVE_HEADER
-#undef CERES_CALL_GEMM
+class BLAS {
+ public:
+ // transpose = true : c = alpha * a'a + beta * c;
+ // transpose = false : c = alpha * aa' + beta * c;
+ //
+ // Assumes column major matrices.
+ static void SymmetricRankKUpdate(int num_rows,
+ int num_cols,
+ const double* a,
+ bool transpose,
+ double alpha,
+ double beta,
+ double* c);
+};
} // namespace internal
} // namespace ceres
diff --git a/extern/libmv/third_party/ceres/internal/ceres/block_jacobi_preconditioner.cc b/extern/libmv/third_party/ceres/internal/ceres/block_jacobi_preconditioner.cc
index 1d5f9d77ab0..29974d45bc9 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/block_jacobi_preconditioner.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/block_jacobi_preconditioner.cc
@@ -41,7 +41,7 @@ namespace ceres {
namespace internal {
BlockJacobiPreconditioner::BlockJacobiPreconditioner(
- const BlockSparseMatrixBase& A)
+ const BlockSparseMatrix& A)
: num_rows_(A.num_rows()),
block_structure_(*A.block_structure()) {
// Calculate the amount of storage needed.
@@ -66,19 +66,19 @@ BlockJacobiPreconditioner::BlockJacobiPreconditioner(
BlockJacobiPreconditioner::~BlockJacobiPreconditioner() {}
-bool BlockJacobiPreconditioner::Update(const BlockSparseMatrixBase& A,
- const double* D) {
+bool BlockJacobiPreconditioner::UpdateImpl(const BlockSparseMatrix& A,
+ const double* D) {
const CompressedRowBlockStructure* bs = A.block_structure();
// Compute the diagonal blocks by block inner products.
std::fill(block_storage_.begin(), block_storage_.end(), 0.0);
+ const double* values = A.values();
for (int r = 0; r < bs->rows.size(); ++r) {
const int row_block_size = bs->rows[r].block.size;
const vector<Cell>& cells = bs->rows[r].cells;
- const double* row_values = A.RowBlockValues(r);
for (int c = 0; c < cells.size(); ++c) {
const int col_block_size = bs->cols[cells[c].block_id].size;
- ConstMatrixRef m(row_values + cells[c].position,
+ ConstMatrixRef m(values + cells[c].position,
row_block_size,
col_block_size);
@@ -111,7 +111,7 @@ bool BlockJacobiPreconditioner::Update(const BlockSparseMatrixBase& A,
}
block = block.selfadjointView<Eigen::Upper>()
- .ldlt()
+ .llt()
.solve(Matrix::Identity(size, size));
}
return true;
diff --git a/extern/libmv/third_party/ceres/internal/ceres/block_jacobi_preconditioner.h b/extern/libmv/third_party/ceres/internal/ceres/block_jacobi_preconditioner.h
index ed5eebc8dc6..3505a01248b 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/block_jacobi_preconditioner.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/block_jacobi_preconditioner.h
@@ -37,7 +37,7 @@
namespace ceres {
namespace internal {
-class BlockSparseMatrixBase;
+class BlockSparseMatrix;
struct CompressedRowBlockStructure;
class LinearOperator;
@@ -51,20 +51,21 @@ class LinearOperator;
// update the matrix by running Update(A, D). The values of the matrix A are
// inspected to construct the preconditioner. The vector D is applied as the
// D^TD diagonal term.
-class BlockJacobiPreconditioner : public Preconditioner {
+class BlockJacobiPreconditioner : public BlockSparseMatrixPreconditioner {
public:
// A must remain valid while the BlockJacobiPreconditioner is.
- explicit BlockJacobiPreconditioner(const BlockSparseMatrixBase& A);
+ explicit BlockJacobiPreconditioner(const BlockSparseMatrix& A);
virtual ~BlockJacobiPreconditioner();
// Preconditioner interface
- virtual bool Update(const BlockSparseMatrixBase& A, const double* D);
virtual void RightMultiply(const double* x, double* y) const;
virtual void LeftMultiply(const double* x, double* y) const;
virtual int num_rows() const { return num_rows_; }
virtual int num_cols() const { return num_rows_; }
private:
+ virtual bool UpdateImpl(const BlockSparseMatrix& A, const double* D);
+
std::vector<double*> blocks_;
std::vector<double> block_storage_;
int num_rows_;
diff --git a/extern/libmv/third_party/ceres/internal/ceres/block_random_access_crs_matrix.cc b/extern/libmv/third_party/ceres/internal/ceres/block_random_access_crs_matrix.cc
new file mode 100644
index 00000000000..5b008e2c3d8
--- /dev/null
+++ b/extern/libmv/third_party/ceres/internal/ceres/block_random_access_crs_matrix.cc
@@ -0,0 +1,170 @@
+// Ceres Solver - A fast non-linear least squares minimizer
+// Copyright 2013 Google Inc. All rights reserved.
+// http://code.google.com/p/ceres-solver/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+// * Neither the name of Google Inc. nor the names of its contributors may be
+// used to endorse or promote products derived from this software without
+// specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Author: sameeragarwal@google.com (Sameer Agarwal)
+
+#include "ceres/block_random_access_crs_matrix.h"
+
+#include <algorithm>
+#include <set>
+#include <utility>
+#include <vector>
+#include "ceres/compressed_row_sparse_matrix.h"
+#include "ceres/internal/port.h"
+#include "ceres/internal/scoped_ptr.h"
+#include "ceres/mutex.h"
+#include "ceres/triplet_sparse_matrix.h"
+#include "ceres/types.h"
+#include "glog/logging.h"
+
+namespace ceres {
+namespace internal {
+
+BlockRandomAccessCRSMatrix::BlockRandomAccessCRSMatrix(
+ const vector<int>& blocks,
+ const set<pair<int, int> >& block_pairs)
+ : kMaxRowBlocks(10 * 1000 * 1000),
+ blocks_(blocks) {
+ CHECK_LT(blocks.size(), kMaxRowBlocks);
+
+ col_layout_.resize(blocks_.size(), 0);
+ row_strides_.resize(blocks_.size(), 0);
+
+ // Build the row/column layout vector and count the number of scalar
+ // rows/columns.
+ int num_cols = 0;
+ for (int i = 0; i < blocks_.size(); ++i) {
+ col_layout_[i] = num_cols;
+ num_cols += blocks_[i];
+ }
+
+ // Walk the sparsity pattern and count the number of non-zeros.
+ int num_nonzeros = 0;
+ for (set<pair<int, int> >::const_iterator it = block_pairs.begin();
+ it != block_pairs.end();
+ ++it) {
+ const int row_block_size = blocks_[it->first];
+ const int col_block_size = blocks_[it->second];
+ num_nonzeros += row_block_size * col_block_size;
+ }
+
+ VLOG(2) << "Matrix Size [" << num_cols
+ << "," << num_cols
+ << "] " << num_nonzeros;
+
+ crsm_.reset(new CompressedRowSparseMatrix(num_cols, num_cols, num_nonzeros));
+ int* rows = crsm_->mutable_rows();
+ int* cols = crsm_->mutable_cols();
+ double* values = crsm_->mutable_values();
+
+ // Iterate over the sparsity pattern and fill the scalar sparsity
+ // pattern of the underlying compressed sparse row matrix. Along the
+ // way also fill out the Layout object which will allow random
+ // access into the CRS Matrix.
+ set<pair<int, int> >::const_iterator it = block_pairs.begin();
+ vector<int> col_blocks;
+ int row_pos = 0;
+ rows[0] = 0;
+ while (it != block_pairs.end()) {
+ // Add entries to layout_ for all the blocks for this row.
+ col_blocks.clear();
+ const int row_block_id = it->first;
+ const int row_block_size = blocks_[row_block_id];
+ int num_cols = 0;
+ while ((it != block_pairs.end()) && (it->first == row_block_id)) {
+ layout_[IntPairToLong(it->first, it->second)] =
+ new CellInfo(values + num_cols);
+ col_blocks.push_back(it->second);
+ num_cols += blocks_[it->second];
+ ++it;
+ };
+
+ // Count the number of non-zeros in the row block.
+ for (int j = 0; j < row_block_size; ++j) {
+ rows[row_pos + j + 1] = rows[row_pos + j] + num_cols;
+ }
+
+ // Fill out the sparsity pattern for each row.
+ int col_pos = 0;
+ for (int j = 0; j < col_blocks.size(); ++j) {
+ const int col_block_id = col_blocks[j];
+ const int col_block_size = blocks_[col_block_id];
+ for (int r = 0; r < row_block_size; ++r) {
+ const int column_block_begin = rows[row_pos + r] + col_pos;
+ for (int c = 0; c < col_block_size; ++c) {
+ cols[column_block_begin + c] = col_layout_[col_block_id] + c;
+ }
+ }
+ col_pos += col_block_size;
+ }
+
+ row_pos += row_block_size;
+ values += row_block_size * num_cols;
+ row_strides_[row_block_id] = num_cols;
+ }
+}
+
+// Assume that the user does not hold any locks on any cell blocks
+// when they are calling SetZero.
+BlockRandomAccessCRSMatrix::~BlockRandomAccessCRSMatrix() {
+ // TODO(sameeragarwal) this should be rationalized going forward and
+ // perhaps moved into BlockRandomAccessMatrix.
+ for (LayoutType::iterator it = layout_.begin();
+ it != layout_.end();
+ ++it) {
+ delete it->second;
+ }
+}
+
+CellInfo* BlockRandomAccessCRSMatrix::GetCell(int row_block_id,
+ int col_block_id,
+ int* row,
+ int* col,
+ int* row_stride,
+ int* col_stride) {
+ const LayoutType::iterator it =
+ layout_.find(IntPairToLong(row_block_id, col_block_id));
+ if (it == layout_.end()) {
+ return NULL;
+ }
+
+ *row = 0;
+ *col = 0;
+ *row_stride = blocks_[row_block_id];
+ *col_stride = row_strides_[row_block_id];
+ return it->second;
+}
+
+// Assume that the user does not hold any locks on any cell blocks
+// when they are calling SetZero.
+void BlockRandomAccessCRSMatrix::SetZero() {
+ crsm_->SetZero();
+}
+
+} // namespace internal
+} // namespace ceres
diff --git a/extern/libmv/third_party/ceres/internal/ceres/block_random_access_crs_matrix.h b/extern/libmv/third_party/ceres/internal/ceres/block_random_access_crs_matrix.h
new file mode 100644
index 00000000000..11a203b8f4d
--- /dev/null
+++ b/extern/libmv/third_party/ceres/internal/ceres/block_random_access_crs_matrix.h
@@ -0,0 +1,108 @@
+// Ceres Solver - A fast non-linear least squares minimizer
+// Copyright 2013 Google Inc. All rights reserved.
+// http://code.google.com/p/ceres-solver/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+// * Neither the name of Google Inc. nor the names of its contributors may be
+// used to endorse or promote products derived from this software without
+// specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Author: sameeragarwal@google.com (Sameer Agarwal)
+
+#ifndef CERES_INTERNAL_BLOCK_RANDOM_ACCESS_CRS_MATRIX_H_
+#define CERES_INTERNAL_BLOCK_RANDOM_ACCESS_CRS_MATRIX_H_
+
+#include <set>
+#include <vector>
+#include <utility>
+#include "ceres/mutex.h"
+#include "ceres/block_random_access_matrix.h"
+#include "ceres/compressed_row_sparse_matrix.h"
+#include "ceres/collections_port.h"
+#include "ceres/integral_types.h"
+#include "ceres/internal/macros.h"
+#include "ceres/internal/port.h"
+#include "ceres/internal/scoped_ptr.h"
+#include "ceres/types.h"
+
+namespace ceres {
+namespace internal {
+
+// A square BlockRandomAccessMatrix where the underlying storage is a
+// compressed row sparse matrix. The matrix need not be symmetric.
+class BlockRandomAccessCRSMatrix : public BlockRandomAccessMatrix {
+ public:
+ // blocks is an array of block sizes. block_pairs is a set of
+ // <row_block_id, col_block_id> pairs to identify the non-zero cells
+ // of this matrix.
+ BlockRandomAccessCRSMatrix(const vector<int>& blocks,
+ const set<pair<int, int> >& block_pairs);
+
+ // The destructor is not thread safe. It assumes that no one is
+ // modifying any cells when the matrix is being destroyed.
+ virtual ~BlockRandomAccessCRSMatrix();
+
+ // BlockRandomAccessMatrix Interface.
+ virtual CellInfo* GetCell(int row_block_id,
+ int col_block_id,
+ int* row,
+ int* col,
+ int* row_stride,
+ int* col_stride);
+
+ // This is not a thread safe method, it assumes that no cell is
+ // locked.
+ virtual void SetZero();
+
+ // Since the matrix is square, num_rows() == num_cols().
+ virtual int num_rows() const { return crsm_->num_rows(); }
+ virtual int num_cols() const { return crsm_->num_cols(); }
+
+ // Access to the underlying matrix object.
+ const CompressedRowSparseMatrix* matrix() const { return crsm_.get(); }
+ CompressedRowSparseMatrix* mutable_matrix() { return crsm_.get(); }
+
+ private:
+ int64 IntPairToLong(int a, int b) {
+ return a * kMaxRowBlocks + b;
+ }
+
+ const int64 kMaxRowBlocks;
+ // row/column block sizes.
+ const vector<int> blocks_;
+ vector<int> col_layout_;
+ vector<int> row_strides_;
+
+ // A mapping from <row_block_id, col_block_id> to the position in
+ // the values array of tsm_ where the block is stored.
+ typedef HashMap<long int, CellInfo* > LayoutType;
+ LayoutType layout_;
+
+ scoped_ptr<CompressedRowSparseMatrix> crsm_;
+ friend class BlockRandomAccessCRSMatrixTest;
+ CERES_DISALLOW_COPY_AND_ASSIGN(BlockRandomAccessCRSMatrix);
+};
+
+} // namespace internal
+} // namespace ceres
+
+#endif // CERES_INTERNAL_BLOCK_RANDOM_ACCESS_CRS_MATRIX_H_
diff --git a/extern/libmv/third_party/ceres/internal/ceres/block_random_access_sparse_matrix.h b/extern/libmv/third_party/ceres/internal/ceres/block_random_access_sparse_matrix.h
index 48a00437cf6..a6b5f39a985 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/block_random_access_sparse_matrix.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/block_random_access_sparse_matrix.h
@@ -74,7 +74,6 @@ class BlockRandomAccessSparseMatrix : public BlockRandomAccessMatrix {
// This is not a thread safe method, it assumes that no cell is
// locked.
virtual void SetZero();
- virtual bool IsThreadSafe() const { return true; }
// Since the matrix is square, num_rows() == num_cols().
virtual int num_rows() const { return tsm_->num_rows(); }
diff --git a/extern/libmv/third_party/ceres/internal/ceres/block_sparse_matrix.cc b/extern/libmv/third_party/ceres/internal/ceres/block_sparse_matrix.cc
index ae36d60c900..a4872626114 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/block_sparse_matrix.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/block_sparse_matrix.cc
@@ -33,10 +33,9 @@
#include <cstddef>
#include <algorithm>
#include <vector>
-#include "ceres/blas.h"
#include "ceres/block_structure.h"
#include "ceres/internal/eigen.h"
-#include "ceres/matrix_proto.h"
+#include "ceres/small_blas.h"
#include "ceres/triplet_sparse_matrix.h"
#include "glog/logging.h"
@@ -82,31 +81,6 @@ BlockSparseMatrix::BlockSparseMatrix(
CHECK_NOTNULL(values_.get());
}
-#ifndef CERES_NO_PROTOCOL_BUFFERS
-BlockSparseMatrix::BlockSparseMatrix(const SparseMatrixProto& outer_proto) {
- CHECK(outer_proto.has_block_matrix());
-
- const BlockSparseMatrixProto& proto = outer_proto.block_matrix();
- CHECK(proto.has_num_rows());
- CHECK(proto.has_num_cols());
- CHECK_EQ(proto.num_nonzeros(), proto.values_size());
-
- num_rows_ = proto.num_rows();
- num_cols_ = proto.num_cols();
- num_nonzeros_ = proto.num_nonzeros();
-
- // Copy out the values into *this.
- values_.reset(new double[num_nonzeros_]);
- for (int i = 0; i < proto.num_nonzeros(); ++i) {
- values_[i] = proto.values(i);
- }
-
- // Create the block structure according to the proto.
- block_structure_.reset(new CompressedRowBlockStructure);
- ProtoToBlockStructure(proto.block_structure(), block_structure_.get());
-}
-#endif
-
void BlockSparseMatrix::SetZero() {
fill(values_.get(), values_.get() + num_nonzeros_, 0.0);
}
@@ -243,21 +217,6 @@ const CompressedRowBlockStructure* BlockSparseMatrix::block_structure()
return block_structure_.get();
}
-#ifndef CERES_NO_PROTOCOL_BUFFERS
-void BlockSparseMatrix::ToProto(SparseMatrixProto* outer_proto) const {
- outer_proto->Clear();
-
- BlockSparseMatrixProto* proto = outer_proto->mutable_block_matrix();
- proto->set_num_rows(num_rows_);
- proto->set_num_cols(num_cols_);
- proto->set_num_nonzeros(num_nonzeros_);
- for (int i = 0; i < num_nonzeros_; ++i) {
- proto->add_values(values_[i]);
- }
- BlockStructureToProto(*block_structure_, proto->mutable_block_structure());
-}
-#endif
-
void BlockSparseMatrix::ToTextFile(FILE* file) const {
CHECK_NOTNULL(file);
for (int i = 0; i < block_structure_->rows.size(); ++i) {
diff --git a/extern/libmv/third_party/ceres/internal/ceres/block_sparse_matrix.h b/extern/libmv/third_party/ceres/internal/ceres/block_sparse_matrix.h
index 513d398c54d..e17d12a706e 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/block_sparse_matrix.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/block_sparse_matrix.h
@@ -43,40 +43,8 @@
namespace ceres {
namespace internal {
-class SparseMatrixProto;
class TripletSparseMatrix;
-// A further extension of the SparseMatrix interface to support block-oriented
-// matrices. The key addition is the RowBlockValues() accessor, which enables
-// the lazy block sparse matrix implementation.
-class BlockSparseMatrixBase : public SparseMatrix {
- public:
- BlockSparseMatrixBase() {}
- virtual ~BlockSparseMatrixBase() {}
-
- // Convert this matrix into a triplet sparse matrix.
- virtual void ToTripletSparseMatrix(TripletSparseMatrix* matrix) const = 0;
-
- // Returns a pointer to the block structure. Does not transfer
- // ownership.
- virtual const CompressedRowBlockStructure* block_structure() const = 0;
-
- // Returns a pointer to a row of the matrix. The returned array is only valid
- // until the next call to RowBlockValues. The caller does not own the result.
- //
- // The returned array is laid out such that cells on the specified row are
- // contiguous in the returned array, though neighbouring cells in row order
- // may not be contiguous in the row values. The cell values for cell
- // (row_block, cell_block) are found at offset
- //
- // block_structure()->rows[row_block].cells[cell_block].position
- //
- virtual const double* RowBlockValues(int row_block_index) const = 0;
-
- private:
- CERES_DISALLOW_COPY_AND_ASSIGN(BlockSparseMatrixBase);
-};
-
// This class implements the SparseMatrix interface for storing and
// manipulating block sparse matrices. The block structure is stored
// in the CompressedRowBlockStructure object and one is needed to
@@ -85,7 +53,7 @@ class BlockSparseMatrixBase : public SparseMatrix {
//
// internal/ceres/block_structure.h
//
-class BlockSparseMatrix : public BlockSparseMatrixBase {
+class BlockSparseMatrix : public SparseMatrix {
public:
// Construct a block sparse matrix with a fully initialized
// CompressedRowBlockStructure objected. The matrix takes over
@@ -95,11 +63,6 @@ class BlockSparseMatrix : public BlockSparseMatrixBase {
// CompressedRowBlockStructure objects.
explicit BlockSparseMatrix(CompressedRowBlockStructure* block_structure);
- // Construct a block sparse matrix from a protocol buffer.
-#ifndef CERES_NO_PROTOCOL_BUFFERS
- explicit BlockSparseMatrix(const SparseMatrixProto& proto);
-#endif
-
BlockSparseMatrix();
virtual ~BlockSparseMatrix();
@@ -110,9 +73,6 @@ class BlockSparseMatrix : public BlockSparseMatrixBase {
virtual void SquaredColumnNorm(double* x) const;
virtual void ScaleColumns(const double* scale);
virtual void ToDenseMatrix(Matrix* dense_matrix) const;
-#ifndef CERES_NO_PROTOCOL_BUFFERS
- virtual void ToProto(SparseMatrixProto* proto) const;
-#endif
virtual void ToTextFile(FILE* file) const;
virtual int num_rows() const { return num_rows_; }
@@ -121,12 +81,8 @@ class BlockSparseMatrix : public BlockSparseMatrixBase {
virtual const double* values() const { return values_.get(); }
virtual double* mutable_values() { return values_.get(); }
- // Implementation of BlockSparseMatrixBase interface.
- virtual void ToTripletSparseMatrix(TripletSparseMatrix* matrix) const;
- virtual const CompressedRowBlockStructure* block_structure() const;
- virtual const double* RowBlockValues(int row_block_index) const {
- return values_.get();
- }
+ void ToTripletSparseMatrix(TripletSparseMatrix* matrix) const;
+ const CompressedRowBlockStructure* block_structure() const;
private:
int num_rows_;
diff --git a/extern/libmv/third_party/ceres/internal/ceres/block_structure.cc b/extern/libmv/third_party/ceres/internal/ceres/block_structure.cc
index e61131192af..5a1a5e18336 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/block_structure.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/block_structure.cc
@@ -29,7 +29,6 @@
// Author: sameeragarwal@google.com (Sameer Agarwal)
#include "ceres/block_structure.h"
-#include "ceres/matrix_proto.h"
namespace ceres {
namespace internal {
@@ -38,55 +37,5 @@ bool CellLessThan(const Cell& lhs, const Cell& rhs) {
return (lhs.block_id < rhs.block_id);
}
-#ifndef CERES_NO_PROTOCOL_BUFFERS
-void ProtoToBlockStructure(const BlockStructureProto &proto,
- CompressedRowBlockStructure *block_structure) {
- // Decode the column blocks.
- block_structure->cols.resize(proto.cols_size());
- for (int i = 0; i < proto.cols_size(); ++i) {
- block_structure->cols[i].size = proto.cols(i).size();
- block_structure->cols[i].position =
- proto.cols(i).position();
- }
- // Decode the row structure.
- block_structure->rows.resize(proto.rows_size());
- for (int i = 0; i < proto.rows_size(); ++i) {
- const CompressedRowProto &row = proto.rows(i);
- block_structure->rows[i].block.size = row.block().size();
- block_structure->rows[i].block.position = row.block().position();
-
- // Copy the cells within the row.
- block_structure->rows[i].cells.resize(row.cells_size());
- for (int j = 0; j < row.cells_size(); ++j) {
- const CellProto &cell = row.cells(j);
- block_structure->rows[i].cells[j].block_id = cell.block_id();
- block_structure->rows[i].cells[j].position = cell.position();
- }
- }
-}
-
-void BlockStructureToProto(const CompressedRowBlockStructure &block_structure,
- BlockStructureProto *proto) {
- // Encode the column blocks.
- for (int i = 0; i < block_structure.cols.size(); ++i) {
- BlockProto *block = proto->add_cols();
- block->set_size(block_structure.cols[i].size);
- block->set_position(block_structure.cols[i].position);
- }
- // Encode the row structure.
- for (int i = 0; i < block_structure.rows.size(); ++i) {
- CompressedRowProto *row = proto->add_rows();
- BlockProto *block = row->mutable_block();
- block->set_size(block_structure.rows[i].block.size);
- block->set_position(block_structure.rows[i].block.position);
- for (int j = 0; j < block_structure.rows[i].cells.size(); ++j) {
- CellProto *cell = row->add_cells();
- cell->set_block_id(block_structure.rows[i].cells[j].block_id);
- cell->set_position(block_structure.rows[i].cells[j].position);
- }
- }
-}
-#endif
-
} // namespace internal
} // namespace ceres
diff --git a/extern/libmv/third_party/ceres/internal/ceres/c_api.cc b/extern/libmv/third_party/ceres/internal/ceres/c_api.cc
new file mode 100644
index 00000000000..1fd01c9f0bd
--- /dev/null
+++ b/extern/libmv/third_party/ceres/internal/ceres/c_api.cc
@@ -0,0 +1,188 @@
+// Ceres Solver - A fast non-linear least squares minimizer
+// Copyright 2013 Google Inc. All rights reserved.
+// http://code.google.com/p/ceres-solver/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+// * Neither the name of Google Inc. nor the names of its contributors may be
+// used to endorse or promote products derived from this software without
+// specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Author: mierle@gmail.com (Keir Mierle)
+//
+// An incomplete C API for Ceres.
+//
+// TODO(keir): Figure out why logging does not seem to work.
+
+#include "ceres/c_api.h"
+
+#include <vector>
+#include <iostream>
+#include <string>
+#include "ceres/cost_function.h"
+#include "ceres/loss_function.h"
+#include "ceres/problem.h"
+#include "ceres/solver.h"
+#include "ceres/types.h" // for std
+#include "glog/logging.h"
+
+using ceres::Problem;
+
+void ceres_init() {
+ // This is not ideal, but it's not clear what to do if there is no gflags and
+ // no access to command line arguments.
+ char message[] = "<unknown>";
+ google::InitGoogleLogging(message);
+}
+
+ceres_problem_t* ceres_create_problem() {
+ return reinterpret_cast<ceres_problem_t*>(new Problem);
+}
+
+void ceres_free_problem(ceres_problem_t* problem) {
+ delete reinterpret_cast<Problem*>(problem);
+}
+
+// This cost function wraps a C-level function pointer from the user, to bridge
+// between C and C++.
+class CallbackCostFunction : public ceres::CostFunction {
+ public:
+ CallbackCostFunction(ceres_cost_function_t cost_function,
+ void* user_data,
+ int num_residuals,
+ int num_parameter_blocks,
+ int* parameter_block_sizes)
+ : cost_function_(cost_function),
+ user_data_(user_data) {
+ set_num_residuals(num_residuals);
+ for (int i = 0; i < num_parameter_blocks; ++i) {
+ mutable_parameter_block_sizes()->push_back(parameter_block_sizes[i]);
+ }
+ }
+
+ virtual ~CallbackCostFunction() {}
+
+ virtual bool Evaluate(double const* const* parameters,
+ double* residuals,
+ double** jacobians) const {
+ return (*cost_function_)(user_data_,
+ const_cast<double**>(parameters),
+ residuals,
+ jacobians);
+ }
+
+ private:
+ ceres_cost_function_t cost_function_;
+ void* user_data_;
+};
+
+// This loss function wraps a C-level function pointer from the user, to bridge
+// between C and C++.
+class CallbackLossFunction : public ceres::LossFunction {
+ public:
+ explicit CallbackLossFunction(ceres_loss_function_t loss_function,
+ void* user_data)
+ : loss_function_(loss_function), user_data_(user_data) {}
+ virtual void Evaluate(double sq_norm, double* rho) const {
+ (*loss_function_)(user_data_, sq_norm, rho);
+ }
+
+ private:
+ ceres_loss_function_t loss_function_;
+ void* user_data_;
+};
+
+// Wrappers for the stock loss functions.
+void* ceres_create_huber_loss_function_data(double a) {
+ return new ceres::HuberLoss(a);
+}
+void* ceres_create_softl1_loss_function_data(double a) {
+ return new ceres::SoftLOneLoss(a);
+}
+void* ceres_create_cauchy_loss_function_data(double a) {
+ return new ceres::CauchyLoss(a);
+}
+void* ceres_create_arctan_loss_function_data(double a) {
+ return new ceres::ArctanLoss(a);
+}
+void* ceres_create_tolerant_loss_function_data(double a, double b) {
+ return new ceres::TolerantLoss(a, b);
+}
+
+void ceres_free_stock_loss_function_data(void* loss_function_data) {
+ delete reinterpret_cast<ceres::LossFunction*>(loss_function_data);
+}
+
+void ceres_stock_loss_function(void* user_data,
+ double squared_norm,
+ double out[3]) {
+ reinterpret_cast<ceres::LossFunction*>(user_data)
+ ->Evaluate(squared_norm, out);
+}
+
+ceres_residual_block_id_t* ceres_problem_add_residual_block(
+ ceres_problem_t* problem,
+ ceres_cost_function_t cost_function,
+ void* cost_function_data,
+ ceres_loss_function_t loss_function,
+ void* loss_function_data,
+ int num_residuals,
+ int num_parameter_blocks,
+ int* parameter_block_sizes,
+ double** parameters) {
+ Problem* ceres_problem = reinterpret_cast<Problem*>(problem);
+
+ ceres::CostFunction* callback_cost_function =
+ new CallbackCostFunction(cost_function,
+ cost_function_data,
+ num_residuals,
+ num_parameter_blocks,
+ parameter_block_sizes);
+
+ ceres::LossFunction* callback_loss_function = NULL;
+ if (loss_function != NULL) {
+ callback_loss_function = new CallbackLossFunction(loss_function,
+ loss_function_data);
+ }
+
+ std::vector<double*> parameter_blocks(parameters,
+ parameters + num_parameter_blocks);
+ return reinterpret_cast<ceres_residual_block_id_t*>(
+ ceres_problem->AddResidualBlock(callback_cost_function,
+ callback_loss_function,
+ parameter_blocks));
+}
+
+void ceres_solve(ceres_problem_t* c_problem) {
+ Problem* problem = reinterpret_cast<Problem*>(c_problem);
+
+ // TODO(keir): Obviously, this way of setting options won't scale or last.
+ // Instead, figure out a way to specify some of the options without
+ // duplicating everything.
+ ceres::Solver::Options options;
+ options.max_num_iterations = 100;
+ options.linear_solver_type = ceres::DENSE_QR;
+ options.minimizer_progress_to_stdout = true;
+
+ ceres::Solver::Summary summary;
+ ceres::Solve(options, problem, &summary);
+ std::cout << summary.FullReport() << "\n";
+}
diff --git a/extern/libmv/third_party/ceres/internal/ceres/cgnr_solver.cc b/extern/libmv/third_party/ceres/internal/ceres/cgnr_solver.cc
index e2e799fe607..9b8f9808cc9 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/cgnr_solver.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/cgnr_solver.cc
@@ -46,7 +46,7 @@ CgnrSolver::CgnrSolver(const LinearSolver::Options& options)
}
LinearSolver::Summary CgnrSolver::SolveImpl(
- BlockSparseMatrixBase* A,
+ BlockSparseMatrix* A,
const double* b,
const LinearSolver::PerSolveOptions& per_solve_options,
double* x) {
diff --git a/extern/libmv/third_party/ceres/internal/ceres/cgnr_solver.h b/extern/libmv/third_party/ceres/internal/ceres/cgnr_solver.h
index d560a9de58d..c63484c628b 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/cgnr_solver.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/cgnr_solver.h
@@ -48,11 +48,11 @@ class BlockJacobiPreconditioner;
//
// as required for solving for x in the least squares sense. Currently only
// block diagonal preconditioning is supported.
-class CgnrSolver : public BlockSparseMatrixBaseSolver {
+class CgnrSolver : public BlockSparseMatrixSolver {
public:
explicit CgnrSolver(const LinearSolver::Options& options);
virtual Summary SolveImpl(
- BlockSparseMatrixBase* A,
+ BlockSparseMatrix* A,
const double* b,
const LinearSolver::PerSolveOptions& per_solve_options,
double* x);
diff --git a/extern/libmv/third_party/ceres/internal/ceres/compressed_col_sparse_matrix_utils.cc b/extern/libmv/third_party/ceres/internal/ceres/compressed_col_sparse_matrix_utils.cc
new file mode 100644
index 00000000000..b62a6ed3830
--- /dev/null
+++ b/extern/libmv/third_party/ceres/internal/ceres/compressed_col_sparse_matrix_utils.cc
@@ -0,0 +1,118 @@
+// Ceres Solver - A fast non-linear least squares minimizer
+// Copyright 2013 Google Inc. All rights reserved.
+// http://code.google.com/p/ceres-solver/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+// * Neither the name of Google Inc. nor the names of its contributors may be
+// used to endorse or promote products derived from this software without
+// specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Author: sameeragarwal@google.com (Sameer Agarwal)
+
+#include "ceres/compressed_col_sparse_matrix_utils.h"
+
+#include <vector>
+#include <algorithm>
+#include "ceres/internal/port.h"
+#include "glog/logging.h"
+
+namespace ceres {
+namespace internal {
+
+void CompressedColumnScalarMatrixToBlockMatrix(const int* scalar_rows,
+ const int* scalar_cols,
+ const vector<int>& row_blocks,
+ const vector<int>& col_blocks,
+ vector<int>* block_rows,
+ vector<int>* block_cols) {
+ CHECK_NOTNULL(block_rows)->clear();
+ CHECK_NOTNULL(block_cols)->clear();
+ const int num_row_blocks = row_blocks.size();
+ const int num_col_blocks = col_blocks.size();
+
+ vector<int> row_block_starts(num_row_blocks);
+ for (int i = 0, cursor = 0; i < num_row_blocks; ++i) {
+ row_block_starts[i] = cursor;
+ cursor += row_blocks[i];
+ }
+
+ // This loop extracts the block sparsity of the scalar sparse matrix
+ // It does so by iterating over the columns, but only considering
+ // the columns corresponding to the first element of each column
+ // block. Within each column, the inner loop iterates over the rows,
+ // and detects the presence of a row block by checking for the
+ // presence of a non-zero entry corresponding to its first element.
+ block_cols->push_back(0);
+ int c = 0;
+ for (int col_block = 0; col_block < num_col_blocks; ++col_block) {
+ int column_size = 0;
+ for (int idx = scalar_cols[c]; idx < scalar_cols[c + 1]; ++idx) {
+ vector<int>::const_iterator it = lower_bound(row_block_starts.begin(),
+ row_block_starts.end(),
+ scalar_rows[idx]);
+ // Since we are using lower_bound, it will return the row id
+ // where the row block starts. For everything but the first row
+ // of the block, where these values will be the same, we can
+ // skip, as we only need the first row to detect the presence of
+ // the block.
+ //
+ // For rows all but the first row in the last row block,
+ // lower_bound will return row_block_starts.end(), but those can
+ // be skipped like the rows in other row blocks too.
+ if (it == row_block_starts.end() || *it != scalar_rows[idx]) {
+ continue;
+ }
+
+ block_rows->push_back(it - row_block_starts.begin());
+ ++column_size;
+ }
+ block_cols->push_back(block_cols->back() + column_size);
+ c += col_blocks[col_block];
+ }
+}
+
+void BlockOrderingToScalarOrdering(const vector<int>& blocks,
+ const vector<int>& block_ordering,
+ vector<int>* scalar_ordering) {
+ CHECK_EQ(blocks.size(), block_ordering.size());
+ const int num_blocks = blocks.size();
+
+ // block_starts = [0, block1, block1 + block2 ..]
+ vector<int> block_starts(num_blocks);
+ for (int i = 0, cursor = 0; i < num_blocks ; ++i) {
+ block_starts[i] = cursor;
+ cursor += blocks[i];
+ }
+
+ scalar_ordering->resize(block_starts.back() + blocks.back());
+ int cursor = 0;
+ for (int i = 0; i < num_blocks; ++i) {
+ const int block_id = block_ordering[i];
+ const int block_size = blocks[block_id];
+ int block_position = block_starts[block_id];
+ for (int j = 0; j < block_size; ++j) {
+ (*scalar_ordering)[cursor++] = block_position++;
+ }
+ }
+}
+} // namespace internal
+} // namespace ceres
diff --git a/extern/libmv/third_party/ceres/internal/ceres/compressed_col_sparse_matrix_utils.h b/extern/libmv/third_party/ceres/internal/ceres/compressed_col_sparse_matrix_utils.h
new file mode 100644
index 00000000000..c8de2a1591a
--- /dev/null
+++ b/extern/libmv/third_party/ceres/internal/ceres/compressed_col_sparse_matrix_utils.h
@@ -0,0 +1,142 @@
+// Ceres Solver - A fast non-linear least squares minimizer
+// Copyright 2013 Google Inc. All rights reserved.
+// http://code.google.com/p/ceres-solver/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+// * Neither the name of Google Inc. nor the names of its contributors may be
+// used to endorse or promote products derived from this software without
+// specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Author: sameeragarwal@google.com (Sameer Agarwal)
+
+#ifndef CERES_INTERNAL_COMPRESSED_COL_SPARSE_MATRIX_UTILS_H_
+#define CERES_INTERNAL_COMPRESSED_COL_SPARSE_MATRIX_UTILS_H_
+
+#include <vector>
+#include "ceres/internal/port.h"
+
+namespace ceres {
+namespace internal {
+
+// Extract the block sparsity pattern of the scalar compressed columns
+// matrix and return it in compressed column form. The compressed
+// column form is stored in two vectors block_rows, and block_cols,
+// which correspond to the row and column arrays in a compressed
+// column sparse matrix.
+//
+// If c_ij is the block in the matrix A corresponding to row block i
+// and column block j, then it is expected that A contains at least
+// one non-zero entry corresponding to the top left entry of c_ij,
+// as that entry is used to detect the presence of a non-zero c_ij.
+void CompressedColumnScalarMatrixToBlockMatrix(const int* scalar_rows,
+ const int* scalar_cols,
+ const vector<int>& row_blocks,
+ const vector<int>& col_blocks,
+ vector<int>* block_rows,
+ vector<int>* block_cols);
+
+// Given a set of blocks and a permutation of these blocks, compute
+// the corresponding "scalar" ordering, where the scalar ordering of
+// size sum(blocks).
+void BlockOrderingToScalarOrdering(const vector<int>& blocks,
+ const vector<int>& block_ordering,
+ vector<int>* scalar_ordering);
+
+// Solve the linear system
+//
+// R * solution = rhs
+//
+// Where R is an upper triangular compressed column sparse matrix.
+template <typename IntegerType>
+void SolveUpperTriangularInPlace(IntegerType num_cols,
+ const IntegerType* rows,
+ const IntegerType* cols,
+ const double* values,
+ double* rhs_and_solution) {
+ for (IntegerType c = num_cols - 1; c >= 0; --c) {
+ rhs_and_solution[c] /= values[cols[c + 1] - 1];
+ for (IntegerType idx = cols[c]; idx < cols[c + 1] - 1; ++idx) {
+ const IntegerType r = rows[idx];
+ const double v = values[idx];
+ rhs_and_solution[r] -= v * rhs_and_solution[c];
+ }
+ }
+}
+
+// Solve the linear system
+//
+// R' * solution = rhs
+//
+// Where R is an upper triangular compressed column sparse matrix.
+template <typename IntegerType>
+void SolveUpperTriangularTransposeInPlace(IntegerType num_cols,
+ const IntegerType* rows,
+ const IntegerType* cols,
+ const double* values,
+ double* rhs_and_solution) {
+ for (IntegerType c = 0; c < num_cols; ++c) {
+ for (IntegerType idx = cols[c]; idx < cols[c + 1] - 1; ++idx) {
+ const IntegerType r = rows[idx];
+ const double v = values[idx];
+ rhs_and_solution[c] -= v * rhs_and_solution[r];
+ }
+ rhs_and_solution[c] = rhs_and_solution[c] / values[cols[c + 1] - 1];
+ }
+}
+
+// Given a upper triangular matrix R in compressed column form, solve
+// the linear system,
+//
+// R'R x = b
+//
+// Where b is all zeros except for rhs_nonzero_index, where it is
+// equal to one.
+//
+// The function exploits this knowledge to reduce the number of
+// floating point operations.
+template <typename IntegerType>
+void SolveRTRWithSparseRHS(IntegerType num_cols,
+ const IntegerType* rows,
+ const IntegerType* cols,
+ const double* values,
+ const int rhs_nonzero_index,
+ double* solution) {
+ fill(solution, solution + num_cols, 0.0);
+ solution[rhs_nonzero_index] = 1.0 / values[cols[rhs_nonzero_index + 1] - 1];
+
+ for (IntegerType c = rhs_nonzero_index + 1; c < num_cols; ++c) {
+ for (IntegerType idx = cols[c]; idx < cols[c + 1] - 1; ++idx) {
+ const IntegerType r = rows[idx];
+ if (r < rhs_nonzero_index) continue;
+ const double v = values[idx];
+ solution[c] -= v * solution[r];
+ }
+ solution[c] = solution[c] / values[cols[c + 1] - 1];
+ }
+
+ SolveUpperTriangularInPlace(num_cols, rows, cols, values, solution);
+}
+
+} // namespace internal
+} // namespace ceres
+
+#endif // CERES_INTERNAL_COMPRESSED_COL_SPARSE_MATRIX_UTILS_H_
diff --git a/extern/libmv/third_party/ceres/internal/ceres/compressed_row_sparse_matrix.cc b/extern/libmv/third_party/ceres/internal/ceres/compressed_row_sparse_matrix.cc
index 1b61468aaae..e200c928509 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/compressed_row_sparse_matrix.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/compressed_row_sparse_matrix.cc
@@ -34,7 +34,8 @@
#include <vector>
#include "ceres/crs_matrix.h"
#include "ceres/internal/port.h"
-#include "ceres/matrix_proto.h"
+#include "ceres/triplet_sparse_matrix.h"
+#include "glog/logging.h"
namespace ceres {
namespace internal {
@@ -72,28 +73,27 @@ CompressedRowSparseMatrix::CompressedRowSparseMatrix(int num_rows,
int max_num_nonzeros) {
num_rows_ = num_rows;
num_cols_ = num_cols;
- max_num_nonzeros_ = max_num_nonzeros;
+ rows_.resize(num_rows + 1, 0);
+ cols_.resize(max_num_nonzeros, 0);
+ values_.resize(max_num_nonzeros, 0.0);
- VLOG(1) << "# of rows: " << num_rows_ << " # of columns: " << num_cols_
- << " max_num_nonzeros: " << max_num_nonzeros_
- << ". Allocating " << (num_rows_ + 1) * sizeof(int) + // NOLINT
- max_num_nonzeros_ * sizeof(int) + // NOLINT
- max_num_nonzeros_ * sizeof(double); // NOLINT
-
- rows_.reset(new int[num_rows_ + 1]);
- cols_.reset(new int[max_num_nonzeros_]);
- values_.reset(new double[max_num_nonzeros_]);
- fill(rows_.get(), rows_.get() + num_rows_ + 1, 0);
- fill(cols_.get(), cols_.get() + max_num_nonzeros_, 0);
- fill(values_.get(), values_.get() + max_num_nonzeros_, 0);
+ VLOG(1) << "# of rows: " << num_rows_
+ << " # of columns: " << num_cols_
+ << " max_num_nonzeros: " << cols_.size()
+ << ". Allocating " << (num_rows_ + 1) * sizeof(int) + // NOLINT
+ cols_.size() * sizeof(int) + // NOLINT
+ cols_.size() * sizeof(double); // NOLINT
}
CompressedRowSparseMatrix::CompressedRowSparseMatrix(
const TripletSparseMatrix& m) {
num_rows_ = m.num_rows();
num_cols_ = m.num_cols();
- max_num_nonzeros_ = m.max_num_nonzeros();
+
+ rows_.resize(num_rows_ + 1, 0);
+ cols_.resize(m.num_nonzeros(), 0);
+ values_.resize(m.max_num_nonzeros(), 0.0);
// index is the list of indices into the TripletSparseMatrix m.
vector<int> index(m.num_nonzeros(), 0);
@@ -105,18 +105,13 @@ CompressedRowSparseMatrix::CompressedRowSparseMatrix(
// are broken by column.
sort(index.begin(), index.end(), RowColLessThan(m.rows(), m.cols()));
- VLOG(1) << "# of rows: " << num_rows_ << " # of columns: " << num_cols_
- << " max_num_nonzeros: " << max_num_nonzeros_
- << ". Allocating " << (num_rows_ + 1) * sizeof(int) + // NOLINT
- max_num_nonzeros_ * sizeof(int) + // NOLINT
- max_num_nonzeros_ * sizeof(double); // NOLINT
-
- rows_.reset(new int[num_rows_ + 1]);
- cols_.reset(new int[max_num_nonzeros_]);
- values_.reset(new double[max_num_nonzeros_]);
-
- // rows_ = 0
- fill(rows_.get(), rows_.get() + num_rows_ + 1, 0);
+ VLOG(1) << "# of rows: " << num_rows_
+ << " # of columns: " << num_cols_
+ << " max_num_nonzeros: " << cols_.size()
+ << ". Allocating "
+ << ((num_rows_ + 1) * sizeof(int) + // NOLINT
+ cols_.size() * sizeof(int) + // NOLINT
+ cols_.size() * sizeof(double)); // NOLINT
// Copy the contents of the cols and values array in the order given
// by index and count the number of entries in each row.
@@ -135,49 +130,15 @@ CompressedRowSparseMatrix::CompressedRowSparseMatrix(
CHECK_EQ(num_nonzeros(), m.num_nonzeros());
}
-#ifndef CERES_NO_PROTOCOL_BUFFERS
-CompressedRowSparseMatrix::CompressedRowSparseMatrix(
- const SparseMatrixProto& outer_proto) {
- CHECK(outer_proto.has_compressed_row_matrix());
-
- const CompressedRowSparseMatrixProto& proto =
- outer_proto.compressed_row_matrix();
-
- num_rows_ = proto.num_rows();
- num_cols_ = proto.num_cols();
-
- rows_.reset(new int[proto.rows_size()]);
- cols_.reset(new int[proto.cols_size()]);
- values_.reset(new double[proto.values_size()]);
-
- for (int i = 0; i < proto.rows_size(); ++i) {
- rows_[i] = proto.rows(i);
- }
-
- CHECK_EQ(proto.rows_size(), num_rows_ + 1);
- CHECK_EQ(proto.cols_size(), proto.values_size());
- CHECK_EQ(proto.cols_size(), rows_[num_rows_]);
-
- for (int i = 0; i < proto.cols_size(); ++i) {
- cols_[i] = proto.cols(i);
- values_[i] = proto.values(i);
- }
-
- max_num_nonzeros_ = proto.cols_size();
-}
-#endif
-
CompressedRowSparseMatrix::CompressedRowSparseMatrix(const double* diagonal,
int num_rows) {
CHECK_NOTNULL(diagonal);
num_rows_ = num_rows;
num_cols_ = num_rows;
- max_num_nonzeros_ = num_rows;
-
- rows_.reset(new int[num_rows_ + 1]);
- cols_.reset(new int[num_rows_]);
- values_.reset(new double[num_rows_]);
+ rows_.resize(num_rows + 1);
+ cols_.resize(num_rows);
+ values_.resize(num_rows);
rows_[0] = 0;
for (int i = 0; i < num_rows_; ++i) {
@@ -193,7 +154,7 @@ CompressedRowSparseMatrix::~CompressedRowSparseMatrix() {
}
void CompressedRowSparseMatrix::SetZero() {
- fill(values_.get(), values_.get() + num_nonzeros(), 0.0);
+ fill(values_.begin(), values_.end(), 0);
}
void CompressedRowSparseMatrix::RightMultiply(const double* x,
@@ -248,83 +209,35 @@ void CompressedRowSparseMatrix::ToDenseMatrix(Matrix* dense_matrix) const {
}
}
-#ifndef CERES_NO_PROTOCOL_BUFFERS
-void CompressedRowSparseMatrix::ToProto(SparseMatrixProto* outer_proto) const {
- CHECK_NOTNULL(outer_proto);
-
- outer_proto->Clear();
- CompressedRowSparseMatrixProto* proto
- = outer_proto->mutable_compressed_row_matrix();
-
- proto->set_num_rows(num_rows_);
- proto->set_num_cols(num_cols_);
-
- for (int r = 0; r < num_rows_ + 1; ++r) {
- proto->add_rows(rows_[r]);
- }
-
- for (int idx = 0; idx < rows_[num_rows_]; ++idx) {
- proto->add_cols(cols_[idx]);
- proto->add_values(values_[idx]);
- }
-}
-#endif
-
void CompressedRowSparseMatrix::DeleteRows(int delta_rows) {
CHECK_GE(delta_rows, 0);
CHECK_LE(delta_rows, num_rows_);
- int new_num_rows = num_rows_ - delta_rows;
-
- num_rows_ = new_num_rows;
- int* new_rows = new int[num_rows_ + 1];
- copy(rows_.get(), rows_.get() + num_rows_ + 1, new_rows);
- rows_.reset(new_rows);
+ num_rows_ -= delta_rows;
+ rows_.resize(num_rows_ + 1);
}
void CompressedRowSparseMatrix::AppendRows(const CompressedRowSparseMatrix& m) {
CHECK_EQ(m.num_cols(), num_cols_);
- // Check if there is enough space. If not, then allocate new arrays
- // to hold the combined matrix and copy the contents of this matrix
- // into it.
- if (max_num_nonzeros_ < num_nonzeros() + m.num_nonzeros()) {
- int new_max_num_nonzeros = num_nonzeros() + m.num_nonzeros();
-
- VLOG(1) << "Reallocating " << sizeof(int) * new_max_num_nonzeros; // NOLINT
-
- int* new_cols = new int[new_max_num_nonzeros];
- copy(cols_.get(), cols_.get() + max_num_nonzeros_, new_cols);
- cols_.reset(new_cols);
-
- double* new_values = new double[new_max_num_nonzeros];
- copy(values_.get(), values_.get() + max_num_nonzeros_, new_values);
- values_.reset(new_values);
-
- max_num_nonzeros_ = new_max_num_nonzeros;
+ if (cols_.size() < num_nonzeros() + m.num_nonzeros()) {
+ cols_.resize(num_nonzeros() + m.num_nonzeros());
+ values_.resize(num_nonzeros() + m.num_nonzeros());
}
// Copy the contents of m into this matrix.
- copy(m.cols(), m.cols() + m.num_nonzeros(), cols_.get() + num_nonzeros());
- copy(m.values(),
- m.values() + m.num_nonzeros(),
- values_.get() + num_nonzeros());
-
- // Create the new rows array to hold the enlarged matrix.
- int* new_rows = new int[num_rows_ + m.num_rows() + 1];
- // The first num_rows_ entries are the same
- copy(rows_.get(), rows_.get() + num_rows_, new_rows);
-
+ copy(m.cols(), m.cols() + m.num_nonzeros(), &cols_[num_nonzeros()]);
+ copy(m.values(), m.values() + m.num_nonzeros(), &values_[num_nonzeros()]);
+ rows_.resize(num_rows_ + m.num_rows() + 1);
// new_rows = [rows_, m.row() + rows_[num_rows_]]
- fill(new_rows + num_rows_,
- new_rows + num_rows_ + m.num_rows() + 1,
+ fill(rows_.begin() + num_rows_,
+ rows_.begin() + num_rows_ + m.num_rows() + 1,
rows_[num_rows_]);
for (int r = 0; r < m.num_rows() + 1; ++r) {
- new_rows[num_rows_ + r] += m.rows()[r];
+ rows_[num_rows_ + r] += m.rows()[r];
}
- rows_.reset(new_rows);
num_rows_ += m.num_rows();
}
@@ -332,23 +245,122 @@ void CompressedRowSparseMatrix::ToTextFile(FILE* file) const {
CHECK_NOTNULL(file);
for (int r = 0; r < num_rows_; ++r) {
for (int idx = rows_[r]; idx < rows_[r + 1]; ++idx) {
- fprintf(file, "% 10d % 10d %17f\n", r, cols_[idx], values_[idx]);
+ fprintf(file,
+ "% 10d % 10d %17f\n",
+ r,
+ cols_[idx],
+ values_[idx]);
}
}
}
void CompressedRowSparseMatrix::ToCRSMatrix(CRSMatrix* matrix) const {
- matrix->num_rows = num_rows();
- matrix->num_cols = num_cols();
+ matrix->num_rows = num_rows_;
+ matrix->num_cols = num_cols_;
+ matrix->rows = rows_;
+ matrix->cols = cols_;
+ matrix->values = values_;
+ // Trim.
matrix->rows.resize(matrix->num_rows + 1);
- matrix->cols.resize(num_nonzeros());
- matrix->values.resize(num_nonzeros());
+ matrix->cols.resize(matrix->rows[matrix->num_rows]);
+ matrix->values.resize(matrix->rows[matrix->num_rows]);
+}
- copy(rows_.get(), rows_.get() + matrix->num_rows + 1, matrix->rows.begin());
- copy(cols_.get(), cols_.get() + num_nonzeros(), matrix->cols.begin());
- copy(values_.get(), values_.get() + num_nonzeros(), matrix->values.begin());
+void CompressedRowSparseMatrix::SolveLowerTriangularInPlace(
+ double* solution) const {
+ for (int r = 0; r < num_rows_; ++r) {
+ for (int idx = rows_[r]; idx < rows_[r + 1] - 1; ++idx) {
+ solution[r] -= values_[idx] * solution[cols_[idx]];
+ }
+ solution[r] /= values_[rows_[r + 1] - 1];
+ }
}
+void CompressedRowSparseMatrix::SolveLowerTriangularTransposeInPlace(
+ double* solution) const {
+ for (int r = num_rows_ - 1; r >= 0; --r) {
+ solution[r] /= values_[rows_[r + 1] - 1];
+ for (int idx = rows_[r + 1] - 2; idx >= rows_[r]; --idx) {
+ solution[cols_[idx]] -= values_[idx] * solution[r];
+ }
+ }
+}
+
+CompressedRowSparseMatrix* CompressedRowSparseMatrix::CreateBlockDiagonalMatrix(
+ const double* diagonal,
+ const vector<int>& blocks) {
+ int num_rows = 0;
+ int num_nonzeros = 0;
+ for (int i = 0; i < blocks.size(); ++i) {
+ num_rows += blocks[i];
+ num_nonzeros += blocks[i] * blocks[i];
+ }
+
+ CompressedRowSparseMatrix* matrix =
+ new CompressedRowSparseMatrix(num_rows, num_rows, num_nonzeros);
+
+ int* rows = matrix->mutable_rows();
+ int* cols = matrix->mutable_cols();
+ double* values = matrix->mutable_values();
+ fill(values, values + num_nonzeros, 0.0);
+
+ int idx_cursor = 0;
+ int col_cursor = 0;
+ for (int i = 0; i < blocks.size(); ++i) {
+ const int block_size = blocks[i];
+ for (int r = 0; r < block_size; ++r) {
+ *(rows++) = idx_cursor;
+ values[idx_cursor + r] = diagonal[col_cursor + r];
+ for (int c = 0; c < block_size; ++c, ++idx_cursor) {
+ *(cols++) = col_cursor + c;
+ }
+ }
+ col_cursor += block_size;
+ }
+ *rows = idx_cursor;
+
+ *matrix->mutable_row_blocks() = blocks;
+ *matrix->mutable_col_blocks() = blocks;
+
+ CHECK_EQ(idx_cursor, num_nonzeros);
+ CHECK_EQ(col_cursor, num_rows);
+ return matrix;
+}
+
+CompressedRowSparseMatrix* CompressedRowSparseMatrix::Transpose() const {
+ CompressedRowSparseMatrix* transpose =
+ new CompressedRowSparseMatrix(num_cols_, num_rows_, num_nonzeros());
+
+ int* transpose_rows = transpose->mutable_rows();
+ int* transpose_cols = transpose->mutable_cols();
+ double* transpose_values = transpose->mutable_values();
+
+ for (int idx = 0; idx < num_nonzeros(); ++idx) {
+ ++transpose_rows[cols_[idx] + 1];
+ }
+
+ for (int i = 1; i < transpose->num_rows() + 1; ++i) {
+ transpose_rows[i] += transpose_rows[i - 1];
+ }
+
+ for (int r = 0; r < num_rows(); ++r) {
+ for (int idx = rows_[r]; idx < rows_[r + 1]; ++idx) {
+ const int c = cols_[idx];
+ const int transpose_idx = transpose_rows[c]++;
+ transpose_cols[transpose_idx] = r;
+ transpose_values[transpose_idx] = values_[idx];
+ }
+ }
+
+ for (int i = transpose->num_rows() - 1; i > 0 ; --i) {
+ transpose_rows[i] = transpose_rows[i - 1];
+ }
+ transpose_rows[0] = 0;
+
+ return transpose;
+}
+
+
} // namespace internal
} // namespace ceres
diff --git a/extern/libmv/third_party/ceres/internal/ceres/compressed_row_sparse_matrix.h b/extern/libmv/third_party/ceres/internal/ceres/compressed_row_sparse_matrix.h
index c9c904bf63c..c5721eb888a 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/compressed_row_sparse_matrix.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/compressed_row_sparse_matrix.h
@@ -32,12 +32,9 @@
#define CERES_INTERNAL_COMPRESSED_ROW_SPARSE_MATRIX_H_
#include <vector>
-
-#include "ceres/internal/eigen.h"
#include "ceres/internal/macros.h"
#include "ceres/internal/port.h"
#include "ceres/sparse_matrix.h"
-#include "ceres/triplet_sparse_matrix.h"
#include "ceres/types.h"
#include "glog/logging.h"
@@ -47,7 +44,7 @@ struct CRSMatrix;
namespace internal {
-class SparseMatrixProto;
+class TripletSparseMatrix;
class CompressedRowSparseMatrix : public SparseMatrix {
public:
@@ -58,9 +55,6 @@ class CompressedRowSparseMatrix : public SparseMatrix {
//
// We assume that m does not have any repeated entries.
explicit CompressedRowSparseMatrix(const TripletSparseMatrix& m);
-#ifndef CERES_NO_PROTOCOL_BUFFERS
- explicit CompressedRowSparseMatrix(const SparseMatrixProto& proto);
-#endif
// Use this constructor only if you know what you are doing. This
// creates a "blank" matrix with the appropriate amount of memory
@@ -91,15 +85,12 @@ class CompressedRowSparseMatrix : public SparseMatrix {
virtual void ScaleColumns(const double* scale);
virtual void ToDenseMatrix(Matrix* dense_matrix) const;
-#ifndef CERES_NO_PROTOCOL_BUFFERS
- virtual void ToProto(SparseMatrixProto* proto) const;
-#endif
virtual void ToTextFile(FILE* file) const;
virtual int num_rows() const { return num_rows_; }
virtual int num_cols() const { return num_cols_; }
virtual int num_nonzeros() const { return rows_[num_rows_]; }
- virtual const double* values() const { return values_.get(); }
- virtual double* mutable_values() { return values_.get(); }
+ virtual const double* values() const { return &values_[0]; }
+ virtual double* mutable_values() { return &values_[0]; }
// Delete the bottom delta_rows.
// num_rows -= delta_rows
@@ -112,11 +103,11 @@ class CompressedRowSparseMatrix : public SparseMatrix {
void ToCRSMatrix(CRSMatrix* matrix) const;
// Low level access methods that expose the structure of the matrix.
- const int* cols() const { return cols_.get(); }
- int* mutable_cols() { return cols_.get(); }
+ const int* cols() const { return &cols_[0]; }
+ int* mutable_cols() { return &cols_[0]; }
- const int* rows() const { return rows_.get(); }
- int* mutable_rows() { return rows_.get(); }
+ const int* rows() const { return &rows_[0]; }
+ int* mutable_rows() { return &rows_[0]; }
const vector<int>& row_blocks() const { return row_blocks_; }
vector<int>* mutable_row_blocks() { return &row_blocks_; }
@@ -124,14 +115,25 @@ class CompressedRowSparseMatrix : public SparseMatrix {
const vector<int>& col_blocks() const { return col_blocks_; }
vector<int>* mutable_col_blocks() { return &col_blocks_; }
- private:
- scoped_array<int> cols_;
- scoped_array<int> rows_;
- scoped_array<double> values_;
+ // Non-destructive array resizing method.
+ void set_num_rows(const int num_rows) { num_rows_ = num_rows; }
+ void set_num_cols(const int num_cols) { num_cols_ = num_cols; }
+
+ void SolveLowerTriangularInPlace(double* solution) const;
+ void SolveLowerTriangularTransposeInPlace(double* solution) const;
+ CompressedRowSparseMatrix* Transpose() const;
+
+ static CompressedRowSparseMatrix* CreateBlockDiagonalMatrix(
+ const double* diagonal,
+ const vector<int>& blocks);
+
+ private:
int num_rows_;
int num_cols_;
- int max_num_nonzeros_;
+ vector<int> rows_;
+ vector<int> cols_;
+ vector<double> values_;
// If the matrix has an underlying block structure, then it can also
// carry with it row and column block sizes. This is auxilliary and
diff --git a/extern/libmv/third_party/ceres/internal/ceres/coordinate_descent_minimizer.h b/extern/libmv/third_party/ceres/internal/ceres/coordinate_descent_minimizer.h
index 3dcf8faee59..424acda94ae 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/coordinate_descent_minimizer.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/coordinate_descent_minimizer.h
@@ -31,6 +31,7 @@
#ifndef CERES_INTERNAL_COORDINATE_DESCENT_MINIMIZER_H_
#define CERES_INTERNAL_COORDINATE_DESCENT_MINIMIZER_H_
+#include <string>
#include <vector>
#include "ceres/evaluator.h"
diff --git a/extern/libmv/third_party/ceres/internal/ceres/corrector.cc b/extern/libmv/third_party/ceres/internal/ceres/corrector.cc
index c3858abd2f4..60269a6a4b9 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/corrector.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/corrector.cc
@@ -32,7 +32,6 @@
#include <cstddef>
#include <cmath>
-#include "ceres/internal/eigen.h"
#include "glog/logging.h"
namespace ceres {
@@ -90,7 +89,7 @@ Corrector::Corrector(double sq_norm, const double rho[3]) {
// 0.5 * alpha^2 - alpha - rho'' / rho' * z'z = 0.
//
// Start by calculating the discriminant D.
- const double D = 1.0 + 2.0 * sq_norm*rho[2] / rho[1];
+ const double D = 1.0 + 2.0 * sq_norm * rho[2] / rho[1];
// Since both rho[1] and rho[2] are guaranteed to be positive at
// this point, we know that D > 1.0.
@@ -102,29 +101,43 @@ Corrector::Corrector(double sq_norm, const double rho[3]) {
alpha_sq_norm_ = alpha / sq_norm;
}
-void Corrector::CorrectResiduals(int nrow, double* residuals) {
+void Corrector::CorrectResiduals(int num_rows, double* residuals) {
DCHECK(residuals != NULL);
- VectorRef r_ref(residuals, nrow);
// Equation 11 in BANS.
- r_ref *= residual_scaling_;
+ for (int r = 0; r < num_rows; ++r) {
+ residuals[r] *= residual_scaling_;
+ }
}
-void Corrector::CorrectJacobian(int nrow, int ncol,
- double* residuals, double* jacobian) {
+void Corrector::CorrectJacobian(int num_rows,
+ int num_cols,
+ double* residuals,
+ double* jacobian) {
DCHECK(residuals != NULL);
DCHECK(jacobian != NULL);
+ // Equation 11 in BANS.
+ //
+ // J = sqrt(rho) * (J - alpha^2 r * r' J)
+ //
+ // In days gone by this loop used to be a single Eigen expression of
+ // the form
+ //
+ // J = sqrt_rho1_ * (J - alpha_sq_norm_ * r* (r.transpose() * J));
+ //
+ // Which turns out to about 17x slower on bal problems. The reason
+ // is that Eigen is unable to figure out that this expression can be
+ // evaluated columnwise and ends up creating a temporary.
+ for (int c = 0; c < num_cols; ++c) {
+ double r_transpose_j = 0.0;
+ for (int r = 0; r < num_rows; ++r) {
+ r_transpose_j += jacobian[r * num_cols + c] * residuals[r];
+ }
- if (nrow == 1) {
- // Specialization for the case where the residual is a scalar.
- VectorRef j_ref(jacobian, ncol);
- j_ref *= sqrt_rho1_ * (1.0 - alpha_sq_norm_ * pow(*residuals, 2));
- } else {
- ConstVectorRef r_ref(residuals, nrow);
- MatrixRef j_ref(jacobian, nrow, ncol);
-
- // Equation 11 in BANS.
- j_ref = sqrt_rho1_ * (j_ref - alpha_sq_norm_ *
- r_ref * (r_ref.transpose() * j_ref));
+ for (int r = 0; r < num_rows; ++r) {
+ jacobian[r * num_cols + c] = sqrt_rho1_ *
+ (jacobian[r * num_cols + c] -
+ alpha_sq_norm_ * residuals[r] * r_transpose_j);
+ }
}
}
diff --git a/extern/libmv/third_party/ceres/internal/ceres/corrector.h b/extern/libmv/third_party/ceres/internal/ceres/corrector.h
index 9914641cb01..2137221784e 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/corrector.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/corrector.h
@@ -66,7 +66,7 @@ class Corrector {
explicit Corrector(double sq_norm, const double rho[3]);
// residuals *= sqrt(rho[1]) / (1 - alpha)
- void CorrectResiduals(int nrow, double* residuals);
+ void CorrectResiduals(int num_rows, double* residuals);
// jacobian = sqrt(rho[1]) * jacobian -
// sqrt(rho[1]) * alpha / sq_norm * residuals residuals' * jacobian.
@@ -74,8 +74,10 @@ class Corrector {
// The method assumes that the jacobian has row-major storage. It is
// the caller's responsibility to ensure that the pointer to
// jacobian is not null.
- void CorrectJacobian(int nrow, int ncol,
- double* residuals, double* jacobian);
+ void CorrectJacobian(int num_rows,
+ int num_cols,
+ double* residuals,
+ double* jacobian);
private:
double sqrt_rho1_;
diff --git a/extern/libmv/third_party/ceres/internal/ceres/matrix_proto.h b/extern/libmv/third_party/ceres/internal/ceres/covariance.cc
index 94b3076e3d7..35146c582b2 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/matrix_proto.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/covariance.cc
@@ -1,5 +1,5 @@
// Ceres Solver - A fast non-linear least squares minimizer
-// Copyright 2010, 2011, 2012 Google Inc. All rights reserved.
+// Copyright 2013 Google Inc. All rights reserved.
// http://code.google.com/p/ceres-solver/
//
// Redistribution and use in source and binary forms, with or without
@@ -26,15 +26,37 @@
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
-// Author: keir@google.com (Keir Mierle)
-//
-// A portability header to make optional protocol buffer support less intrusive.
+// Author: sameeragarwal@google.com (Sameer Agarwal)
+
+#include "ceres/covariance.h"
+
+#include <utility>
+#include <vector>
+#include "ceres/covariance_impl.h"
+#include "ceres/problem.h"
+#include "ceres/problem_impl.h"
+
+namespace ceres {
+
+Covariance::Covariance(const Covariance::Options& options) {
+ impl_.reset(new internal::CovarianceImpl(options));
+}
+
+Covariance::~Covariance() {
+}
-#ifndef CERES_INTERNAL_MATRIX_PROTO_H_
-#define CERES_INTERNAL_MATRIX_PROTO_H_
+bool Covariance::Compute(
+ const vector<pair<const double*, const double*> >& covariance_blocks,
+ Problem* problem) {
+ return impl_->Compute(covariance_blocks, problem->problem_impl_.get());
+}
-#ifndef CERES_NO_PROTOCOL_BUFFERS
-#include "ceres/matrix.pb.h"
-#endif
+bool Covariance::GetCovarianceBlock(const double* parameter_block1,
+ const double* parameter_block2,
+ double* covariance_block) const {
+ return impl_->GetCovarianceBlock(parameter_block1,
+ parameter_block2,
+ covariance_block);
+}
-#endif // CERES_INTERNAL_MATRIX_PROTO_H_
+} // namespace ceres
diff --git a/extern/libmv/third_party/ceres/internal/ceres/covariance_impl.cc b/extern/libmv/third_party/ceres/internal/ceres/covariance_impl.cc
new file mode 100644
index 00000000000..19d545cc2d3
--- /dev/null
+++ b/extern/libmv/third_party/ceres/internal/ceres/covariance_impl.cc
@@ -0,0 +1,845 @@
+// Ceres Solver - A fast non-linear least squares minimizer
+// Copyright 2013 Google Inc. All rights reserved.
+// http://code.google.com/p/ceres-solver/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+// * Neither the name of Google Inc. nor the names of its contributors may be
+// used to endorse or promote products derived from this software without
+// specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Author: sameeragarwal@google.com (Sameer Agarwal)
+
+#include "ceres/covariance_impl.h"
+
+#ifdef CERES_USE_OPENMP
+#include <omp.h>
+#endif
+
+#include <algorithm>
+#include <utility>
+#include <vector>
+#include "Eigen/SVD"
+#include "ceres/compressed_col_sparse_matrix_utils.h"
+#include "ceres/compressed_row_sparse_matrix.h"
+#include "ceres/covariance.h"
+#include "ceres/crs_matrix.h"
+#include "ceres/internal/eigen.h"
+#include "ceres/map_util.h"
+#include "ceres/parameter_block.h"
+#include "ceres/problem_impl.h"
+#include "ceres/suitesparse.h"
+#include "ceres/wall_time.h"
+#include "glog/logging.h"
+
+namespace ceres {
+namespace internal {
+namespace {
+
+// Per thread storage for SuiteSparse.
+#ifndef CERES_NO_SUITESPARSE
+
+struct PerThreadContext {
+ explicit PerThreadContext(int num_rows)
+ : solution(NULL),
+ solution_set(NULL),
+ y_workspace(NULL),
+ e_workspace(NULL),
+ rhs(NULL) {
+ rhs = ss.CreateDenseVector(NULL, num_rows, num_rows);
+ }
+
+ ~PerThreadContext() {
+ ss.Free(solution);
+ ss.Free(solution_set);
+ ss.Free(y_workspace);
+ ss.Free(e_workspace);
+ ss.Free(rhs);
+ }
+
+ cholmod_dense* solution;
+ cholmod_sparse* solution_set;
+ cholmod_dense* y_workspace;
+ cholmod_dense* e_workspace;
+ cholmod_dense* rhs;
+ SuiteSparse ss;
+};
+
+#endif
+
+} // namespace
+
+typedef vector<pair<const double*, const double*> > CovarianceBlocks;
+
+CovarianceImpl::CovarianceImpl(const Covariance::Options& options)
+ : options_(options),
+ is_computed_(false),
+ is_valid_(false) {
+ evaluate_options_.num_threads = options.num_threads;
+ evaluate_options_.apply_loss_function = options.apply_loss_function;
+}
+
+CovarianceImpl::~CovarianceImpl() {
+}
+
+bool CovarianceImpl::Compute(const CovarianceBlocks& covariance_blocks,
+ ProblemImpl* problem) {
+ problem_ = problem;
+ parameter_block_to_row_index_.clear();
+ covariance_matrix_.reset(NULL);
+ is_valid_ = (ComputeCovarianceSparsity(covariance_blocks, problem) &&
+ ComputeCovarianceValues());
+ is_computed_ = true;
+ return is_valid_;
+}
+
+bool CovarianceImpl::GetCovarianceBlock(const double* original_parameter_block1,
+ const double* original_parameter_block2,
+ double* covariance_block) const {
+ CHECK(is_computed_)
+ << "Covariance::GetCovarianceBlock called before Covariance::Compute";
+ CHECK(is_valid_)
+ << "Covariance::GetCovarianceBlock called when Covariance::Compute "
+ << "returned false.";
+
+ // If either of the two parameter blocks is constant, then the
+ // covariance block is also zero.
+ if (constant_parameter_blocks_.count(original_parameter_block1) > 0 ||
+ constant_parameter_blocks_.count(original_parameter_block2) > 0) {
+ const ProblemImpl::ParameterMap& parameter_map = problem_->parameter_map();
+ ParameterBlock* block1 =
+ FindOrDie(parameter_map,
+ const_cast<double*>(original_parameter_block1));
+
+ ParameterBlock* block2 =
+ FindOrDie(parameter_map,
+ const_cast<double*>(original_parameter_block2));
+ const int block1_size = block1->Size();
+ const int block2_size = block2->Size();
+ MatrixRef(covariance_block, block1_size, block2_size).setZero();
+ return true;
+ }
+
+ const double* parameter_block1 = original_parameter_block1;
+ const double* parameter_block2 = original_parameter_block2;
+ const bool transpose = parameter_block1 > parameter_block2;
+ if (transpose) {
+ std::swap(parameter_block1, parameter_block2);
+ }
+
+ // Find where in the covariance matrix the block is located.
+ const int row_begin =
+ FindOrDie(parameter_block_to_row_index_, parameter_block1);
+ const int col_begin =
+ FindOrDie(parameter_block_to_row_index_, parameter_block2);
+ const int* rows = covariance_matrix_->rows();
+ const int* cols = covariance_matrix_->cols();
+ const int row_size = rows[row_begin + 1] - rows[row_begin];
+ const int* cols_begin = cols + rows[row_begin];
+
+ // The only part that requires work is walking the compressed column
+ // vector to determine where the set of columns correspnding to the
+ // covariance block begin.
+ int offset = 0;
+ while (cols_begin[offset] != col_begin && offset < row_size) {
+ ++offset;
+ }
+
+ if (offset == row_size) {
+ LOG(WARNING) << "Unable to find covariance block for "
+ << original_parameter_block1 << " "
+ << original_parameter_block2;
+ return false;
+ }
+
+ const ProblemImpl::ParameterMap& parameter_map = problem_->parameter_map();
+ ParameterBlock* block1 =
+ FindOrDie(parameter_map, const_cast<double*>(parameter_block1));
+ ParameterBlock* block2 =
+ FindOrDie(parameter_map, const_cast<double*>(parameter_block2));
+ const LocalParameterization* local_param1 = block1->local_parameterization();
+ const LocalParameterization* local_param2 = block2->local_parameterization();
+ const int block1_size = block1->Size();
+ const int block1_local_size = block1->LocalSize();
+ const int block2_size = block2->Size();
+ const int block2_local_size = block2->LocalSize();
+
+ ConstMatrixRef cov(covariance_matrix_->values() + rows[row_begin],
+ block1_size,
+ row_size);
+
+ // Fast path when there are no local parameterizations.
+ if (local_param1 == NULL && local_param2 == NULL) {
+ if (transpose) {
+ MatrixRef(covariance_block, block2_size, block1_size) =
+ cov.block(0, offset, block1_size, block2_size).transpose();
+ } else {
+ MatrixRef(covariance_block, block1_size, block2_size) =
+ cov.block(0, offset, block1_size, block2_size);
+ }
+ return true;
+ }
+
+ // If local parameterizations are used then the covariance that has
+ // been computed is in the tangent space and it needs to be lifted
+ // back to the ambient space.
+ //
+ // This is given by the formula
+ //
+ // C'_12 = J_1 C_12 J_2'
+ //
+ // Where C_12 is the local tangent space covariance for parameter
+ // blocks 1 and 2. J_1 and J_2 are respectively the local to global
+ // jacobians for parameter blocks 1 and 2.
+ //
+ // See Result 5.11 on page 142 of Hartley & Zisserman (2nd Edition)
+ // for a proof.
+ //
+ // TODO(sameeragarwal): Add caching of local parameterization, so
+ // that they are computed just once per parameter block.
+ Matrix block1_jacobian(block1_size, block1_local_size);
+ if (local_param1 == NULL) {
+ block1_jacobian.setIdentity();
+ } else {
+ local_param1->ComputeJacobian(parameter_block1, block1_jacobian.data());
+ }
+
+ Matrix block2_jacobian(block2_size, block2_local_size);
+ // Fast path if the user is requesting a diagonal block.
+ if (parameter_block1 == parameter_block2) {
+ block2_jacobian = block1_jacobian;
+ } else {
+ if (local_param2 == NULL) {
+ block2_jacobian.setIdentity();
+ } else {
+ local_param2->ComputeJacobian(parameter_block2, block2_jacobian.data());
+ }
+ }
+
+ if (transpose) {
+ MatrixRef(covariance_block, block2_size, block1_size) =
+ block2_jacobian *
+ cov.block(0, offset, block1_local_size, block2_local_size).transpose() *
+ block1_jacobian.transpose();
+ } else {
+ MatrixRef(covariance_block, block1_size, block2_size) =
+ block1_jacobian *
+ cov.block(0, offset, block1_local_size, block2_local_size) *
+ block2_jacobian.transpose();
+ }
+
+ return true;
+}
+
+// Determine the sparsity pattern of the covariance matrix based on
+// the block pairs requested by the user.
+bool CovarianceImpl::ComputeCovarianceSparsity(
+ const CovarianceBlocks& original_covariance_blocks,
+ ProblemImpl* problem) {
+ EventLogger event_logger("CovarianceImpl::ComputeCovarianceSparsity");
+
+ // Determine an ordering for the parameter block, by sorting the
+ // parameter blocks by their pointers.
+ vector<double*> all_parameter_blocks;
+ problem->GetParameterBlocks(&all_parameter_blocks);
+ const ProblemImpl::ParameterMap& parameter_map = problem->parameter_map();
+ constant_parameter_blocks_.clear();
+ vector<double*>& active_parameter_blocks = evaluate_options_.parameter_blocks;
+ active_parameter_blocks.clear();
+ for (int i = 0; i < all_parameter_blocks.size(); ++i) {
+ double* parameter_block = all_parameter_blocks[i];
+
+ ParameterBlock* block = FindOrDie(parameter_map, parameter_block);
+ if (block->IsConstant()) {
+ constant_parameter_blocks_.insert(parameter_block);
+ } else {
+ active_parameter_blocks.push_back(parameter_block);
+ }
+ }
+
+ sort(active_parameter_blocks.begin(), active_parameter_blocks.end());
+
+ // Compute the number of rows. Map each parameter block to the
+ // first row corresponding to it in the covariance matrix using the
+ // ordering of parameter blocks just constructed.
+ int num_rows = 0;
+ parameter_block_to_row_index_.clear();
+ for (int i = 0; i < active_parameter_blocks.size(); ++i) {
+ double* parameter_block = active_parameter_blocks[i];
+ const int parameter_block_size =
+ problem->ParameterBlockLocalSize(parameter_block);
+ parameter_block_to_row_index_[parameter_block] = num_rows;
+ num_rows += parameter_block_size;
+ }
+
+ // Compute the number of non-zeros in the covariance matrix. Along
+ // the way flip any covariance blocks which are in the lower
+ // triangular part of the matrix.
+ int num_nonzeros = 0;
+ CovarianceBlocks covariance_blocks;
+ for (int i = 0; i < original_covariance_blocks.size(); ++i) {
+ const pair<const double*, const double*>& block_pair =
+ original_covariance_blocks[i];
+ if (constant_parameter_blocks_.count(block_pair.first) > 0 ||
+ constant_parameter_blocks_.count(block_pair.second) > 0) {
+ continue;
+ }
+
+ int index1 = FindOrDie(parameter_block_to_row_index_, block_pair.first);
+ int index2 = FindOrDie(parameter_block_to_row_index_, block_pair.second);
+ const int size1 = problem->ParameterBlockLocalSize(block_pair.first);
+ const int size2 = problem->ParameterBlockLocalSize(block_pair.second);
+ num_nonzeros += size1 * size2;
+
+ // Make sure we are constructing a block upper triangular matrix.
+ if (index1 > index2) {
+ covariance_blocks.push_back(make_pair(block_pair.second,
+ block_pair.first));
+ } else {
+ covariance_blocks.push_back(block_pair);
+ }
+ }
+
+ if (covariance_blocks.size() == 0) {
+ VLOG(2) << "No non-zero covariance blocks found";
+ covariance_matrix_.reset(NULL);
+ return true;
+ }
+
+ // Sort the block pairs. As a consequence we get the covariance
+ // blocks as they will occur in the CompressedRowSparseMatrix that
+ // will store the covariance.
+ sort(covariance_blocks.begin(), covariance_blocks.end());
+
+ // Fill the sparsity pattern of the covariance matrix.
+ covariance_matrix_.reset(
+ new CompressedRowSparseMatrix(num_rows, num_rows, num_nonzeros));
+
+ int* rows = covariance_matrix_->mutable_rows();
+ int* cols = covariance_matrix_->mutable_cols();
+
+ // Iterate over parameter blocks and in turn over the rows of the
+ // covariance matrix. For each parameter block, look in the upper
+ // triangular part of the covariance matrix to see if there are any
+ // blocks requested by the user. If this is the case then fill out a
+ // set of compressed rows corresponding to this parameter block.
+ //
+ // The key thing that makes this loop work is the fact that the
+ // row/columns of the covariance matrix are ordered by the pointer
+ // values of the parameter blocks. Thus iterating over the keys of
+ // parameter_block_to_row_index_ corresponds to iterating over the
+ // rows of the covariance matrix in order.
+ int i = 0; // index into covariance_blocks.
+ int cursor = 0; // index into the covariance matrix.
+ for (map<const double*, int>::const_iterator it =
+ parameter_block_to_row_index_.begin();
+ it != parameter_block_to_row_index_.end();
+ ++it) {
+ const double* row_block = it->first;
+ const int row_block_size = problem->ParameterBlockLocalSize(row_block);
+ int row_begin = it->second;
+
+ // Iterate over the covariance blocks contained in this row block
+ // and count the number of columns in this row block.
+ int num_col_blocks = 0;
+ int num_columns = 0;
+ for (int j = i; j < covariance_blocks.size(); ++j, ++num_col_blocks) {
+ const pair<const double*, const double*>& block_pair =
+ covariance_blocks[j];
+ if (block_pair.first != row_block) {
+ break;
+ }
+ num_columns += problem->ParameterBlockLocalSize(block_pair.second);
+ }
+
+ // Fill out all the compressed rows for this parameter block.
+ for (int r = 0; r < row_block_size; ++r) {
+ rows[row_begin + r] = cursor;
+ for (int c = 0; c < num_col_blocks; ++c) {
+ const double* col_block = covariance_blocks[i + c].second;
+ const int col_block_size = problem->ParameterBlockLocalSize(col_block);
+ int col_begin = FindOrDie(parameter_block_to_row_index_, col_block);
+ for (int k = 0; k < col_block_size; ++k) {
+ cols[cursor++] = col_begin++;
+ }
+ }
+ }
+
+ i+= num_col_blocks;
+ }
+
+ rows[num_rows] = cursor;
+ return true;
+}
+
+bool CovarianceImpl::ComputeCovarianceValues() {
+ switch (options_.algorithm_type) {
+ case (DENSE_SVD):
+ return ComputeCovarianceValuesUsingDenseSVD();
+#ifndef CERES_NO_SUITESPARSE
+ case (SPARSE_CHOLESKY):
+ return ComputeCovarianceValuesUsingSparseCholesky();
+ case (SPARSE_QR):
+ return ComputeCovarianceValuesUsingSparseQR();
+#endif
+ default:
+ LOG(ERROR) << "Unsupported covariance estimation algorithm type: "
+ << CovarianceAlgorithmTypeToString(options_.algorithm_type);
+ return false;
+ }
+ return false;
+}
+
+bool CovarianceImpl::ComputeCovarianceValuesUsingSparseCholesky() {
+ EventLogger event_logger(
+ "CovarianceImpl::ComputeCovarianceValuesUsingSparseCholesky");
+#ifndef CERES_NO_SUITESPARSE
+ if (covariance_matrix_.get() == NULL) {
+ // Nothing to do, all zeros covariance matrix.
+ return true;
+ }
+
+ SuiteSparse ss;
+
+ CRSMatrix jacobian;
+ problem_->Evaluate(evaluate_options_, NULL, NULL, NULL, &jacobian);
+
+ event_logger.AddEvent("Evaluate");
+ // m is a transposed view of the Jacobian.
+ cholmod_sparse cholmod_jacobian_view;
+ cholmod_jacobian_view.nrow = jacobian.num_cols;
+ cholmod_jacobian_view.ncol = jacobian.num_rows;
+ cholmod_jacobian_view.nzmax = jacobian.values.size();
+ cholmod_jacobian_view.nz = NULL;
+ cholmod_jacobian_view.p = reinterpret_cast<void*>(&jacobian.rows[0]);
+ cholmod_jacobian_view.i = reinterpret_cast<void*>(&jacobian.cols[0]);
+ cholmod_jacobian_view.x = reinterpret_cast<void*>(&jacobian.values[0]);
+ cholmod_jacobian_view.z = NULL;
+ cholmod_jacobian_view.stype = 0; // Matrix is not symmetric.
+ cholmod_jacobian_view.itype = CHOLMOD_INT;
+ cholmod_jacobian_view.xtype = CHOLMOD_REAL;
+ cholmod_jacobian_view.dtype = CHOLMOD_DOUBLE;
+ cholmod_jacobian_view.sorted = 1;
+ cholmod_jacobian_view.packed = 1;
+
+ cholmod_factor* factor = ss.AnalyzeCholesky(&cholmod_jacobian_view);
+ event_logger.AddEvent("Symbolic Factorization");
+ bool factorization_succeeded = ss.Cholesky(&cholmod_jacobian_view, factor);
+ if (factorization_succeeded) {
+ const double reciprocal_condition_number =
+ cholmod_rcond(factor, ss.mutable_cc());
+ if (reciprocal_condition_number <
+ options_.min_reciprocal_condition_number) {
+ LOG(WARNING) << "Cholesky factorization of J'J is not reliable. "
+ << "Reciprocal condition number: "
+ << reciprocal_condition_number << " "
+ << "min_reciprocal_condition_number : "
+ << options_.min_reciprocal_condition_number;
+ factorization_succeeded = false;
+ }
+ }
+
+ event_logger.AddEvent("Numeric Factorization");
+ if (!factorization_succeeded) {
+ ss.Free(factor);
+ LOG(WARNING) << "Cholesky factorization failed.";
+ return false;
+ }
+
+ const int num_rows = covariance_matrix_->num_rows();
+ const int* rows = covariance_matrix_->rows();
+ const int* cols = covariance_matrix_->cols();
+ double* values = covariance_matrix_->mutable_values();
+
+ // The following loop exploits the fact that the i^th column of A^{-1}
+ // is given by the solution to the linear system
+ //
+ // A x = e_i
+ //
+ // where e_i is a vector with e(i) = 1 and all other entries zero.
+ //
+ // Since the covariance matrix is symmetric, the i^th row and column
+ // are equal.
+ //
+ // The ifdef separates two different version of SuiteSparse. Newer
+ // versions of SuiteSparse have the cholmod_solve2 function which
+ // re-uses memory across calls.
+#if (SUITESPARSE_VERSION < 4002)
+ cholmod_dense* rhs = ss.CreateDenseVector(NULL, num_rows, num_rows);
+ double* rhs_x = reinterpret_cast<double*>(rhs->x);
+
+ for (int r = 0; r < num_rows; ++r) {
+ int row_begin = rows[r];
+ int row_end = rows[r + 1];
+ if (row_end == row_begin) {
+ continue;
+ }
+
+ rhs_x[r] = 1.0;
+ cholmod_dense* solution = ss.Solve(factor, rhs);
+ double* solution_x = reinterpret_cast<double*>(solution->x);
+ for (int idx = row_begin; idx < row_end; ++idx) {
+ const int c = cols[idx];
+ values[idx] = solution_x[c];
+ }
+ ss.Free(solution);
+ rhs_x[r] = 0.0;
+ }
+
+ ss.Free(rhs);
+#else // SUITESPARSE_VERSION < 4002
+
+ const int num_threads = options_.num_threads;
+ vector<PerThreadContext*> contexts(num_threads);
+ for (int i = 0; i < num_threads; ++i) {
+ contexts[i] = new PerThreadContext(num_rows);
+ }
+
+ // The first call to cholmod_solve2 is not thread safe, since it
+ // changes the factorization from supernodal to simplicial etc.
+ {
+ PerThreadContext* context = contexts[0];
+ double* context_rhs_x = reinterpret_cast<double*>(context->rhs->x);
+ context_rhs_x[0] = 1.0;
+ cholmod_solve2(CHOLMOD_A,
+ factor,
+ context->rhs,
+ NULL,
+ &context->solution,
+ &context->solution_set,
+ &context->y_workspace,
+ &context->e_workspace,
+ context->ss.mutable_cc());
+ context_rhs_x[0] = 0.0;
+ }
+
+#pragma omp parallel for num_threads(num_threads) schedule(dynamic)
+ for (int r = 0; r < num_rows; ++r) {
+ int row_begin = rows[r];
+ int row_end = rows[r + 1];
+ if (row_end == row_begin) {
+ continue;
+ }
+
+# ifdef CERES_USE_OPENMP
+ int thread_id = omp_get_thread_num();
+# else
+ int thread_id = 0;
+# endif
+
+ PerThreadContext* context = contexts[thread_id];
+ double* context_rhs_x = reinterpret_cast<double*>(context->rhs->x);
+ context_rhs_x[r] = 1.0;
+
+ // TODO(sameeragarwal) There should be a more efficient way
+ // involving the use of Bset but I am unable to make it work right
+ // now.
+ cholmod_solve2(CHOLMOD_A,
+ factor,
+ context->rhs,
+ NULL,
+ &context->solution,
+ &context->solution_set,
+ &context->y_workspace,
+ &context->e_workspace,
+ context->ss.mutable_cc());
+
+ double* solution_x = reinterpret_cast<double*>(context->solution->x);
+ for (int idx = row_begin; idx < row_end; ++idx) {
+ const int c = cols[idx];
+ values[idx] = solution_x[c];
+ }
+ context_rhs_x[r] = 0.0;
+ }
+
+ for (int i = 0; i < num_threads; ++i) {
+ delete contexts[i];
+ }
+
+#endif // SUITESPARSE_VERSION < 4002
+
+ ss.Free(factor);
+ event_logger.AddEvent("Inversion");
+ return true;
+
+#else // CERES_NO_SUITESPARSE
+
+ return false;
+
+#endif // CERES_NO_SUITESPARSE
+};
+
+bool CovarianceImpl::ComputeCovarianceValuesUsingSparseQR() {
+ EventLogger event_logger(
+ "CovarianceImpl::ComputeCovarianceValuesUsingSparseQR");
+
+#ifndef CERES_NO_SUITESPARSE
+ if (covariance_matrix_.get() == NULL) {
+ // Nothing to do, all zeros covariance matrix.
+ return true;
+ }
+
+ CRSMatrix jacobian;
+ problem_->Evaluate(evaluate_options_, NULL, NULL, NULL, &jacobian);
+ event_logger.AddEvent("Evaluate");
+
+ // Construct a compressed column form of the Jacobian.
+ const int num_rows = jacobian.num_rows;
+ const int num_cols = jacobian.num_cols;
+ const int num_nonzeros = jacobian.values.size();
+
+ vector<SuiteSparse_long> transpose_rows(num_cols + 1, 0);
+ vector<SuiteSparse_long> transpose_cols(num_nonzeros, 0);
+ vector<double> transpose_values(num_nonzeros, 0);
+
+ for (int idx = 0; idx < num_nonzeros; ++idx) {
+ transpose_rows[jacobian.cols[idx] + 1] += 1;
+ }
+
+ for (int i = 1; i < transpose_rows.size(); ++i) {
+ transpose_rows[i] += transpose_rows[i - 1];
+ }
+
+ for (int r = 0; r < num_rows; ++r) {
+ for (int idx = jacobian.rows[r]; idx < jacobian.rows[r + 1]; ++idx) {
+ const int c = jacobian.cols[idx];
+ const int transpose_idx = transpose_rows[c];
+ transpose_cols[transpose_idx] = r;
+ transpose_values[transpose_idx] = jacobian.values[idx];
+ ++transpose_rows[c];
+ }
+ }
+
+ for (int i = transpose_rows.size() - 1; i > 0 ; --i) {
+ transpose_rows[i] = transpose_rows[i - 1];
+ }
+ transpose_rows[0] = 0;
+
+ cholmod_sparse cholmod_jacobian;
+ cholmod_jacobian.nrow = num_rows;
+ cholmod_jacobian.ncol = num_cols;
+ cholmod_jacobian.nzmax = num_nonzeros;
+ cholmod_jacobian.nz = NULL;
+ cholmod_jacobian.p = reinterpret_cast<void*>(&transpose_rows[0]);
+ cholmod_jacobian.i = reinterpret_cast<void*>(&transpose_cols[0]);
+ cholmod_jacobian.x = reinterpret_cast<void*>(&transpose_values[0]);
+ cholmod_jacobian.z = NULL;
+ cholmod_jacobian.stype = 0; // Matrix is not symmetric.
+ cholmod_jacobian.itype = CHOLMOD_LONG;
+ cholmod_jacobian.xtype = CHOLMOD_REAL;
+ cholmod_jacobian.dtype = CHOLMOD_DOUBLE;
+ cholmod_jacobian.sorted = 1;
+ cholmod_jacobian.packed = 1;
+
+ cholmod_common cc;
+ cholmod_l_start(&cc);
+
+ cholmod_sparse* R = NULL;
+ SuiteSparse_long* permutation = NULL;
+
+ // Compute a Q-less QR factorization of the Jacobian. Since we are
+ // only interested in inverting J'J = R'R, we do not need Q. This
+ // saves memory and gives us R as a permuted compressed column
+ // sparse matrix.
+ //
+ // TODO(sameeragarwal): Currently the symbolic factorization and the
+ // numeric factorization is done at the same time, and this does not
+ // explicitly account for the block column and row structure in the
+ // matrix. When using AMD, we have observed in the past that
+ // computing the ordering with the block matrix is significantly
+ // more efficient, both in runtime as well as the quality of
+ // ordering computed. So, it maybe worth doing that analysis
+ // separately.
+ const SuiteSparse_long rank =
+ SuiteSparseQR<double>(SPQR_ORDERING_BESTAMD,
+ SPQR_DEFAULT_TOL,
+ cholmod_jacobian.ncol,
+ &cholmod_jacobian,
+ &R,
+ &permutation,
+ &cc);
+ event_logger.AddEvent("Numeric Factorization");
+ CHECK_NOTNULL(permutation);
+ CHECK_NOTNULL(R);
+
+ if (rank < cholmod_jacobian.ncol) {
+ LOG(WARNING) << "Jacobian matrix is rank deficient."
+ << "Number of columns: " << cholmod_jacobian.ncol
+ << " rank: " << rank;
+ delete []permutation;
+ cholmod_l_free_sparse(&R, &cc);
+ cholmod_l_finish(&cc);
+ return false;
+ }
+
+ vector<int> inverse_permutation(num_cols);
+ for (SuiteSparse_long i = 0; i < num_cols; ++i) {
+ inverse_permutation[permutation[i]] = i;
+ }
+
+ const int* rows = covariance_matrix_->rows();
+ const int* cols = covariance_matrix_->cols();
+ double* values = covariance_matrix_->mutable_values();
+
+ // The following loop exploits the fact that the i^th column of A^{-1}
+ // is given by the solution to the linear system
+ //
+ // A x = e_i
+ //
+ // where e_i is a vector with e(i) = 1 and all other entries zero.
+ //
+ // Since the covariance matrix is symmetric, the i^th row and column
+ // are equal.
+ const int num_threads = options_.num_threads;
+ scoped_array<double> workspace(new double[num_threads * num_cols]);
+
+#pragma omp parallel for num_threads(num_threads) schedule(dynamic)
+ for (int r = 0; r < num_cols; ++r) {
+ const int row_begin = rows[r];
+ const int row_end = rows[r + 1];
+ if (row_end == row_begin) {
+ continue;
+ }
+
+# ifdef CERES_USE_OPENMP
+ int thread_id = omp_get_thread_num();
+# else
+ int thread_id = 0;
+# endif
+
+ double* solution = workspace.get() + thread_id * num_cols;
+ SolveRTRWithSparseRHS<SuiteSparse_long>(
+ num_cols,
+ static_cast<SuiteSparse_long*>(R->i),
+ static_cast<SuiteSparse_long*>(R->p),
+ static_cast<double*>(R->x),
+ inverse_permutation[r],
+ solution);
+ for (int idx = row_begin; idx < row_end; ++idx) {
+ const int c = cols[idx];
+ values[idx] = solution[inverse_permutation[c]];
+ }
+ }
+
+ delete []permutation;
+ cholmod_l_free_sparse(&R, &cc);
+ cholmod_l_finish(&cc);
+ event_logger.AddEvent("Inversion");
+ return true;
+
+#else // CERES_NO_SUITESPARSE
+
+ return false;
+
+#endif // CERES_NO_SUITESPARSE
+}
+
+bool CovarianceImpl::ComputeCovarianceValuesUsingDenseSVD() {
+ EventLogger event_logger(
+ "CovarianceImpl::ComputeCovarianceValuesUsingDenseSVD");
+ if (covariance_matrix_.get() == NULL) {
+ // Nothing to do, all zeros covariance matrix.
+ return true;
+ }
+
+ CRSMatrix jacobian;
+ problem_->Evaluate(evaluate_options_, NULL, NULL, NULL, &jacobian);
+ event_logger.AddEvent("Evaluate");
+
+ Matrix dense_jacobian(jacobian.num_rows, jacobian.num_cols);
+ dense_jacobian.setZero();
+ for (int r = 0; r < jacobian.num_rows; ++r) {
+ for (int idx = jacobian.rows[r]; idx < jacobian.rows[r + 1]; ++idx) {
+ const int c = jacobian.cols[idx];
+ dense_jacobian(r, c) = jacobian.values[idx];
+ }
+ }
+ event_logger.AddEvent("ConvertToDenseMatrix");
+
+ Eigen::JacobiSVD<Matrix> svd(dense_jacobian,
+ Eigen::ComputeThinU | Eigen::ComputeThinV);
+
+ event_logger.AddEvent("SingularValueDecomposition");
+
+ const Vector singular_values = svd.singularValues();
+ const int num_singular_values = singular_values.rows();
+ Vector inverse_squared_singular_values(num_singular_values);
+ inverse_squared_singular_values.setZero();
+
+ const double max_singular_value = singular_values[0];
+ const double min_singular_value_ratio =
+ sqrt(options_.min_reciprocal_condition_number);
+
+ const bool automatic_truncation = (options_.null_space_rank < 0);
+ const int max_rank = min(num_singular_values,
+ num_singular_values - options_.null_space_rank);
+
+ // Compute the squared inverse of the singular values. Truncate the
+ // computation based on min_singular_value_ratio and
+ // null_space_rank. When either of these two quantities are active,
+ // the resulting covariance matrix is a Moore-Penrose inverse
+ // instead of a regular inverse.
+ for (int i = 0; i < max_rank; ++i) {
+ const double singular_value_ratio = singular_values[i] / max_singular_value;
+ if (singular_value_ratio < min_singular_value_ratio) {
+ // Since the singular values are in decreasing order, if
+ // automatic truncation is enabled, then from this point on
+ // all values will fail the ratio test and there is nothing to
+ // do in this loop.
+ if (automatic_truncation) {
+ break;
+ } else {
+ LOG(WARNING) << "Cholesky factorization of J'J is not reliable. "
+ << "Reciprocal condition number: "
+ << singular_value_ratio * singular_value_ratio << " "
+ << "min_reciprocal_condition_number : "
+ << options_.min_reciprocal_condition_number;
+ return false;
+ }
+ }
+
+ inverse_squared_singular_values[i] =
+ 1.0 / (singular_values[i] * singular_values[i]);
+ }
+
+ Matrix dense_covariance =
+ svd.matrixV() *
+ inverse_squared_singular_values.asDiagonal() *
+ svd.matrixV().transpose();
+ event_logger.AddEvent("PseudoInverse");
+
+ const int num_rows = covariance_matrix_->num_rows();
+ const int* rows = covariance_matrix_->rows();
+ const int* cols = covariance_matrix_->cols();
+ double* values = covariance_matrix_->mutable_values();
+
+ for (int r = 0; r < num_rows; ++r) {
+ for (int idx = rows[r]; idx < rows[r + 1]; ++idx) {
+ const int c = cols[idx];
+ values[idx] = dense_covariance(r, c);
+ }
+ }
+ event_logger.AddEvent("CopyToCovarianceMatrix");
+ return true;
+};
+
+} // namespace internal
+} // namespace ceres
diff --git a/extern/libmv/third_party/ceres/internal/ceres/covariance_impl.h b/extern/libmv/third_party/ceres/internal/ceres/covariance_impl.h
new file mode 100644
index 00000000000..0e7e2173079
--- /dev/null
+++ b/extern/libmv/third_party/ceres/internal/ceres/covariance_impl.h
@@ -0,0 +1,89 @@
+// Ceres Solver - A fast non-linear least squares minimizer
+// Copyright 2013 Google Inc. All rights reserved.
+// http://code.google.com/p/ceres-solver/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+// * Neither the name of Google Inc. nor the names of its contributors may be
+// used to endorse or promote products derived from this software without
+// specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Author: sameeragarwal@google.com (Sameer Agarwal)
+
+#ifndef CERES_INTERNAL_COVARIANCE_IMPL_H_
+#define CERES_INTERNAL_COVARIANCE_IMPL_H_
+
+#include <map>
+#include <set>
+#include <utility>
+#include <vector>
+#include "ceres/covariance.h"
+#include "ceres/internal/scoped_ptr.h"
+#include "ceres/problem_impl.h"
+#include "ceres/suitesparse.h"
+
+namespace ceres {
+
+namespace internal {
+
+class CompressedRowSparseMatrix;
+
+class CovarianceImpl {
+ public:
+ explicit CovarianceImpl(const Covariance::Options& options);
+ ~CovarianceImpl();
+
+ bool Compute(
+ const vector<pair<const double*, const double*> >& covariance_blocks,
+ ProblemImpl* problem);
+
+ bool GetCovarianceBlock(const double* parameter_block1,
+ const double* parameter_block2,
+ double* covariance_block) const;
+
+ bool ComputeCovarianceSparsity(
+ const vector<pair<const double*, const double*> >& covariance_blocks,
+ ProblemImpl* problem);
+
+ bool ComputeCovarianceValues();
+ bool ComputeCovarianceValuesUsingSparseCholesky();
+ bool ComputeCovarianceValuesUsingSparseQR();
+ bool ComputeCovarianceValuesUsingDenseSVD();
+
+ const CompressedRowSparseMatrix* covariance_matrix() const {
+ return covariance_matrix_.get();
+ }
+
+ private:
+ ProblemImpl* problem_;
+ Covariance::Options options_;
+ Problem::EvaluateOptions evaluate_options_;
+ bool is_computed_;
+ bool is_valid_;
+ map<const double*, int> parameter_block_to_row_index_;
+ set<const double*> constant_parameter_blocks_;
+ scoped_ptr<CompressedRowSparseMatrix> covariance_matrix_;
+};
+
+} // namespace internal
+} // namespace ceres
+
+#endif // CERES_INTERNAL_COVARIANCE_IMPL_H_
diff --git a/extern/libmv/third_party/ceres/internal/ceres/cxsparse.cc b/extern/libmv/third_party/ceres/internal/ceres/cxsparse.cc
index 3fbc2717f64..c6d77439653 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/cxsparse.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/cxsparse.cc
@@ -32,7 +32,10 @@
#include "ceres/cxsparse.h"
+#include <vector>
+#include "ceres/compressed_col_sparse_matrix_utils.h"
#include "ceres/compressed_row_sparse_matrix.h"
+#include "ceres/internal/port.h"
#include "ceres/triplet_sparse_matrix.h"
#include "glog/logging.h"
@@ -44,46 +47,46 @@ CXSparse::CXSparse() : scratch_(NULL), scratch_size_(0) {
CXSparse::~CXSparse() {
if (scratch_size_ > 0) {
- cs_free(scratch_);
+ cs_di_free(scratch_);
}
}
+
bool CXSparse::SolveCholesky(cs_di* A,
cs_dis* symbolic_factorization,
double* b) {
// Make sure we have enough scratch space available.
if (scratch_size_ < A->n) {
if (scratch_size_ > 0) {
- cs_free(scratch_);
+ cs_di_free(scratch_);
}
- scratch_ = reinterpret_cast<CS_ENTRY*>(cs_malloc(A->n, sizeof(CS_ENTRY)));
+ scratch_ =
+ reinterpret_cast<CS_ENTRY*>(cs_di_malloc(A->n, sizeof(CS_ENTRY)));
scratch_size_ = A->n;
}
// Solve using Cholesky factorization
- csn* numeric_factorization = cs_chol(A, symbolic_factorization);
+ csn* numeric_factorization = cs_di_chol(A, symbolic_factorization);
if (numeric_factorization == NULL) {
LOG(WARNING) << "Cholesky factorization failed.";
return false;
}
- // When the Cholesky factorization succeeded, these methods are guaranteed to
- // succeeded as well. In the comments below, "x" refers to the scratch space.
+ // When the Cholesky factorization succeeded, these methods are
+ // guaranteed to succeeded as well. In the comments below, "x"
+ // refers to the scratch space.
//
// Set x = P * b.
- cs_ipvec(symbolic_factorization->pinv, b, scratch_, A->n);
-
+ cs_di_ipvec(symbolic_factorization->pinv, b, scratch_, A->n);
// Set x = L \ x.
- cs_lsolve(numeric_factorization->L, scratch_);
-
+ cs_di_lsolve(numeric_factorization->L, scratch_);
// Set x = L' \ x.
- cs_ltsolve(numeric_factorization->L, scratch_);
-
+ cs_di_ltsolve(numeric_factorization->L, scratch_);
// Set b = P' * x.
- cs_pvec(symbolic_factorization->pinv, scratch_, b, A->n);
+ cs_di_pvec(symbolic_factorization->pinv, scratch_, b, A->n);
// Free Cholesky factorization.
- cs_nfree(numeric_factorization);
+ cs_di_nfree(numeric_factorization);
return true;
}
@@ -92,6 +95,72 @@ cs_dis* CXSparse::AnalyzeCholesky(cs_di* A) {
return cs_schol(1, A);
}
+cs_dis* CXSparse::AnalyzeCholeskyWithNaturalOrdering(cs_di* A) {
+ // order = 0 for Natural ordering.
+ return cs_schol(0, A);
+}
+
+cs_dis* CXSparse::BlockAnalyzeCholesky(cs_di* A,
+ const vector<int>& row_blocks,
+ const vector<int>& col_blocks) {
+ const int num_row_blocks = row_blocks.size();
+ const int num_col_blocks = col_blocks.size();
+
+ vector<int> block_rows;
+ vector<int> block_cols;
+ CompressedColumnScalarMatrixToBlockMatrix(A->i,
+ A->p,
+ row_blocks,
+ col_blocks,
+ &block_rows,
+ &block_cols);
+ cs_di block_matrix;
+ block_matrix.m = num_row_blocks;
+ block_matrix.n = num_col_blocks;
+ block_matrix.nz = -1;
+ block_matrix.nzmax = block_rows.size();
+ block_matrix.p = &block_cols[0];
+ block_matrix.i = &block_rows[0];
+ block_matrix.x = NULL;
+
+ int* ordering = cs_amd(1, &block_matrix);
+ vector<int> block_ordering(num_row_blocks, -1);
+ copy(ordering, ordering + num_row_blocks, &block_ordering[0]);
+ cs_free(ordering);
+
+ vector<int> scalar_ordering;
+ BlockOrderingToScalarOrdering(row_blocks, block_ordering, &scalar_ordering);
+
+ cs_dis* symbolic_factorization =
+ reinterpret_cast<cs_dis*>(cs_calloc(1, sizeof(cs_dis)));
+ symbolic_factorization->pinv = cs_pinv(&scalar_ordering[0], A->n);
+ cs* permuted_A = cs_symperm(A, symbolic_factorization->pinv, 0);
+
+ symbolic_factorization->parent = cs_etree(permuted_A, 0);
+ int* postordering = cs_post(symbolic_factorization->parent, A->n);
+ int* column_counts = cs_counts(permuted_A,
+ symbolic_factorization->parent,
+ postordering,
+ 0);
+ cs_free(postordering);
+ cs_spfree(permuted_A);
+
+ symbolic_factorization->cp = (int*) cs_malloc(A->n+1, sizeof(int));
+ symbolic_factorization->lnz = cs_cumsum(symbolic_factorization->cp,
+ column_counts,
+ A->n);
+ symbolic_factorization->unz = symbolic_factorization->lnz;
+
+ cs_free(column_counts);
+
+ if (symbolic_factorization->lnz < 0) {
+ cs_sfree(symbolic_factorization);
+ symbolic_factorization = NULL;
+ }
+
+ return symbolic_factorization;
+}
+
cs_di CXSparse::CreateSparseMatrixTransposeView(CompressedRowSparseMatrix* A) {
cs_di At;
At.m = A->num_cols();
@@ -117,6 +186,20 @@ cs_di* CXSparse::CreateSparseMatrix(TripletSparseMatrix* tsm) {
return cs_compress(&tsm_wrapper);
}
+void CXSparse::ApproximateMinimumDegreeOrdering(cs_di* A, int* ordering) {
+ int* cs_ordering = cs_amd(1, A);
+ copy(cs_ordering, cs_ordering + A->m, ordering);
+ cs_free(cs_ordering);
+}
+
+cs_di* CXSparse::TransposeMatrix(cs_di* A) {
+ return cs_di_transpose(A, 1);
+}
+
+cs_di* CXSparse::MatrixMatrixMultiply(cs_di* A, cs_di* B) {
+ return cs_di_multiply(A, B);
+}
+
void CXSparse::Free(cs_di* sparse_matrix) {
cs_di_spfree(sparse_matrix);
}
diff --git a/extern/libmv/third_party/ceres/internal/ceres/cxsparse.h b/extern/libmv/third_party/ceres/internal/ceres/cxsparse.h
index dd5eadc8da8..cd87908a43d 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/cxsparse.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/cxsparse.h
@@ -33,7 +33,9 @@
#ifndef CERES_NO_CXSPARSE
+#include <vector>
#include "cs.h"
+#include "ceres/internal/port.h"
namespace ceres {
namespace internal {
@@ -68,10 +70,49 @@ class CXSparse {
// with Free. May return NULL if the compression or allocation fails.
cs_di* CreateSparseMatrix(TripletSparseMatrix* A);
+ // B = A'
+ //
+ // The returned matrix should be deallocated with Free when not used
+ // anymore.
+ cs_di* TransposeMatrix(cs_di* A);
+
+ // C = A * B
+ //
+ // The returned matrix should be deallocated with Free when not used
+ // anymore.
+ cs_di* MatrixMatrixMultiply(cs_di* A, cs_di* B);
+
// Computes a symbolic factorization of A that can be used in SolveCholesky.
+ //
// The returned matrix should be deallocated with Free when not used anymore.
cs_dis* AnalyzeCholesky(cs_di* A);
+ // Computes a symbolic factorization of A that can be used in
+ // SolveCholesky, but does not compute a fill-reducing ordering.
+ //
+ // The returned matrix should be deallocated with Free when not used anymore.
+ cs_dis* AnalyzeCholeskyWithNaturalOrdering(cs_di* A);
+
+ // Computes a symbolic factorization of A that can be used in
+ // SolveCholesky. The difference from AnalyzeCholesky is that this
+ // function first detects the block sparsity of the matrix using
+ // information about the row and column blocks and uses this block
+ // sparse matrix to find a fill-reducing ordering. This ordering is
+ // then used to find a symbolic factorization. This can result in a
+ // significant performance improvement AnalyzeCholesky on block
+ // sparse matrices.
+ //
+ // The returned matrix should be deallocated with Free when not used
+ // anymore.
+ cs_dis* BlockAnalyzeCholesky(cs_di* A,
+ const vector<int>& row_blocks,
+ const vector<int>& col_blocks);
+
+ // Compute an fill-reducing approximate minimum degree ordering of
+ // the matrix A. ordering should be non-NULL and should point to
+ // enough memory to hold the ordering for the rows of A.
+ void ApproximateMinimumDegreeOrdering(cs_di* A, int* ordering);
+
void Free(cs_di* sparse_matrix);
void Free(cs_dis* symbolic_factorization);
@@ -84,6 +125,11 @@ class CXSparse {
} // namespace internal
} // namespace ceres
+#else // CERES_NO_CXSPARSE
+
+class CXSparse {};
+typedef void cs_dis;
+
#endif // CERES_NO_CXSPARSE
#endif // CERES_INTERNAL_CXSPARSE_H_
diff --git a/extern/libmv/third_party/ceres/internal/ceres/dense_normal_cholesky_solver.cc b/extern/libmv/third_party/ceres/internal/ceres/dense_normal_cholesky_solver.cc
index 96f55115a67..fbf3cbec9d2 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/dense_normal_cholesky_solver.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/dense_normal_cholesky_solver.cc
@@ -33,9 +33,11 @@
#include <cstddef>
#include "Eigen/Dense"
+#include "ceres/blas.h"
#include "ceres/dense_sparse_matrix.h"
#include "ceres/internal/eigen.h"
#include "ceres/internal/scoped_ptr.h"
+#include "ceres/lapack.h"
#include "ceres/linear_solver.h"
#include "ceres/types.h"
#include "ceres/wall_time.h"
@@ -52,6 +54,18 @@ LinearSolver::Summary DenseNormalCholeskySolver::SolveImpl(
const double* b,
const LinearSolver::PerSolveOptions& per_solve_options,
double* x) {
+ if (options_.dense_linear_algebra_library_type == EIGEN) {
+ return SolveUsingEigen(A, b, per_solve_options, x);
+ } else {
+ return SolveUsingLAPACK(A, b, per_solve_options, x);
+ }
+}
+
+LinearSolver::Summary DenseNormalCholeskySolver::SolveUsingEigen(
+ DenseSparseMatrix* A,
+ const double* b,
+ const LinearSolver::PerSolveOptions& per_solve_options,
+ double* x) {
EventLogger event_logger("DenseNormalCholeskySolver::Solve");
const int num_rows = A->num_rows();
@@ -62,6 +76,7 @@ LinearSolver::Summary DenseNormalCholeskySolver::SolveImpl(
lhs.setZero();
event_logger.AddEvent("Setup");
+
// lhs += A'A
//
// Using rankUpdate instead of GEMM, exposes the fact that its the
@@ -76,16 +91,66 @@ LinearSolver::Summary DenseNormalCholeskySolver::SolveImpl(
ConstVectorRef D(per_solve_options.D, num_cols);
lhs += D.array().square().matrix().asDiagonal();
}
+ event_logger.AddEvent("Product");
LinearSolver::Summary summary;
summary.num_iterations = 1;
summary.termination_type = TOLERANCE;
VectorRef(x, num_cols) =
- lhs.selfadjointView<Eigen::Upper>().ldlt().solve(rhs);
+ lhs.selfadjointView<Eigen::Upper>().llt().solve(rhs);
event_logger.AddEvent("Solve");
-
return summary;
}
+LinearSolver::Summary DenseNormalCholeskySolver::SolveUsingLAPACK(
+ DenseSparseMatrix* A,
+ const double* b,
+ const LinearSolver::PerSolveOptions& per_solve_options,
+ double* x) {
+ EventLogger event_logger("DenseNormalCholeskySolver::Solve");
+
+ if (per_solve_options.D != NULL) {
+ // Temporarily append a diagonal block to the A matrix, but undo
+ // it before returning the matrix to the user.
+ A->AppendDiagonal(per_solve_options.D);
+ }
+
+ const int num_cols = A->num_cols();
+ Matrix lhs(num_cols, num_cols);
+ event_logger.AddEvent("Setup");
+
+ // lhs = A'A
+ //
+ // Note: This is a bit delicate, it assumes that the stride on this
+ // matrix is the same as the number of rows.
+ BLAS::SymmetricRankKUpdate(A->num_rows(),
+ num_cols,
+ A->values(),
+ true,
+ 1.0,
+ 0.0,
+ lhs.data());
+
+ if (per_solve_options.D != NULL) {
+ // Undo the modifications to the matrix A.
+ A->RemoveDiagonal();
+ }
+
+ // TODO(sameeragarwal): Replace this with a gemv call for true blasness.
+ // rhs = A'b
+ VectorRef(x, num_cols) =
+ A->matrix().transpose() * ConstVectorRef(b, A->num_rows());
+ event_logger.AddEvent("Product");
+
+ const int info = LAPACK::SolveInPlaceUsingCholesky(num_cols, lhs.data(), x);
+ event_logger.AddEvent("Solve");
+
+ LinearSolver::Summary summary;
+ summary.num_iterations = 1;
+ summary.termination_type = info == 0 ? TOLERANCE : FAILURE;
+
+ event_logger.AddEvent("TearDown");
+ return summary;
+}
} // namespace internal
} // namespace ceres
diff --git a/extern/libmv/third_party/ceres/internal/ceres/dense_normal_cholesky_solver.h b/extern/libmv/third_party/ceres/internal/ceres/dense_normal_cholesky_solver.h
index de47740583d..e35053f5234 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/dense_normal_cholesky_solver.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/dense_normal_cholesky_solver.h
@@ -85,6 +85,18 @@ class DenseNormalCholeskySolver: public DenseSparseMatrixSolver {
const LinearSolver::PerSolveOptions& per_solve_options,
double* x);
+ LinearSolver::Summary SolveUsingLAPACK(
+ DenseSparseMatrix* A,
+ const double* b,
+ const LinearSolver::PerSolveOptions& per_solve_options,
+ double* x);
+
+ LinearSolver::Summary SolveUsingEigen(
+ DenseSparseMatrix* A,
+ const double* b,
+ const LinearSolver::PerSolveOptions& per_solve_options,
+ double* x);
+
const LinearSolver::Options options_;
CERES_DISALLOW_COPY_AND_ASSIGN(DenseNormalCholeskySolver);
};
diff --git a/extern/libmv/third_party/ceres/internal/ceres/dense_qr_solver.cc b/extern/libmv/third_party/ceres/internal/ceres/dense_qr_solver.cc
index 1fb9709b42a..d76d58b51b5 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/dense_qr_solver.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/dense_qr_solver.cc
@@ -30,12 +30,13 @@
#include "ceres/dense_qr_solver.h"
-#include <cstddef>
+#include <cstddef>
#include "Eigen/Dense"
#include "ceres/dense_sparse_matrix.h"
#include "ceres/internal/eigen.h"
#include "ceres/internal/scoped_ptr.h"
+#include "ceres/lapack.h"
#include "ceres/linear_solver.h"
#include "ceres/types.h"
#include "ceres/wall_time.h"
@@ -44,13 +45,87 @@ namespace ceres {
namespace internal {
DenseQRSolver::DenseQRSolver(const LinearSolver::Options& options)
- : options_(options) {}
+ : options_(options) {
+ work_.resize(1);
+}
LinearSolver::Summary DenseQRSolver::SolveImpl(
DenseSparseMatrix* A,
const double* b,
const LinearSolver::PerSolveOptions& per_solve_options,
double* x) {
+ if (options_.dense_linear_algebra_library_type == EIGEN) {
+ return SolveUsingEigen(A, b, per_solve_options, x);
+ } else {
+ return SolveUsingLAPACK(A, b, per_solve_options, x);
+ }
+}
+LinearSolver::Summary DenseQRSolver::SolveUsingLAPACK(
+ DenseSparseMatrix* A,
+ const double* b,
+ const LinearSolver::PerSolveOptions& per_solve_options,
+ double* x) {
+ EventLogger event_logger("DenseQRSolver::Solve");
+
+ const int num_rows = A->num_rows();
+ const int num_cols = A->num_cols();
+
+ if (per_solve_options.D != NULL) {
+ // Temporarily append a diagonal block to the A matrix, but undo
+ // it before returning the matrix to the user.
+ A->AppendDiagonal(per_solve_options.D);
+ }
+
+ // TODO(sameeragarwal): Since we are copying anyways, the diagonal
+ // can be appended to the matrix instead of doing it on A.
+ lhs_ = A->matrix();
+
+ if (per_solve_options.D != NULL) {
+ // Undo the modifications to the matrix A.
+ A->RemoveDiagonal();
+ }
+
+ // rhs = [b;0] to account for the additional rows in the lhs.
+ if (rhs_.rows() != lhs_.rows()) {
+ rhs_.resize(lhs_.rows());
+ }
+ rhs_.setZero();
+ rhs_.head(num_rows) = ConstVectorRef(b, num_rows);
+
+ if (work_.rows() == 1) {
+ const int work_size =
+ LAPACK::EstimateWorkSizeForQR(lhs_.rows(), lhs_.cols());
+ VLOG(3) << "Working memory for Dense QR factorization: "
+ << work_size * sizeof(double);
+ work_.resize(work_size);
+ }
+
+ const int info = LAPACK::SolveUsingQR(lhs_.rows(),
+ lhs_.cols(),
+ lhs_.data(),
+ work_.rows(),
+ work_.data(),
+ rhs_.data());
+ event_logger.AddEvent("Solve");
+
+ LinearSolver::Summary summary;
+ summary.num_iterations = 1;
+ if (info == 0) {
+ VectorRef(x, num_cols) = rhs_.head(num_cols);
+ summary.termination_type = TOLERANCE;
+ } else {
+ summary.termination_type = FAILURE;
+ }
+
+ event_logger.AddEvent("TearDown");
+ return summary;
+}
+
+LinearSolver::Summary DenseQRSolver::SolveUsingEigen(
+ DenseSparseMatrix* A,
+ const double* b,
+ const LinearSolver::PerSolveOptions& per_solve_options,
+ double* x) {
EventLogger event_logger("DenseQRSolver::Solve");
const int num_rows = A->num_rows();
@@ -73,7 +148,7 @@ LinearSolver::Summary DenseQRSolver::SolveImpl(
event_logger.AddEvent("Setup");
// Solve the system.
- VectorRef(x, num_cols) = A->matrix().colPivHouseholderQr().solve(rhs_);
+ VectorRef(x, num_cols) = A->matrix().householderQr().solve(rhs_);
event_logger.AddEvent("Solve");
if (per_solve_options.D != NULL) {
diff --git a/extern/libmv/third_party/ceres/internal/ceres/dense_qr_solver.h b/extern/libmv/third_party/ceres/internal/ceres/dense_qr_solver.h
index f78fa72c5f3..e745c63cb44 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/dense_qr_solver.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/dense_qr_solver.h
@@ -90,8 +90,22 @@ class DenseQRSolver: public DenseSparseMatrixSolver {
const LinearSolver::PerSolveOptions& per_solve_options,
double* x);
+ LinearSolver::Summary SolveUsingEigen(
+ DenseSparseMatrix* A,
+ const double* b,
+ const LinearSolver::PerSolveOptions& per_solve_options,
+ double* x);
+
+ LinearSolver::Summary SolveUsingLAPACK(
+ DenseSparseMatrix* A,
+ const double* b,
+ const LinearSolver::PerSolveOptions& per_solve_options,
+ double* x);
+
const LinearSolver::Options options_;
+ ColMajorMatrix lhs_;
Vector rhs_;
+ Vector work_;
CERES_DISALLOW_COPY_AND_ASSIGN(DenseQRSolver);
};
diff --git a/extern/libmv/third_party/ceres/internal/ceres/dense_sparse_matrix.cc b/extern/libmv/third_party/ceres/internal/ceres/dense_sparse_matrix.cc
index 9d58031ccfc..d67474fed32 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/dense_sparse_matrix.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/dense_sparse_matrix.cc
@@ -31,10 +31,10 @@
#include "ceres/dense_sparse_matrix.h"
#include <algorithm>
-#include "ceres/matrix_proto.h"
#include "ceres/triplet_sparse_matrix.h"
#include "ceres/internal/eigen.h"
#include "ceres/internal/port.h"
+#include "glog/logging.h"
namespace ceres {
namespace internal {
@@ -80,22 +80,6 @@ DenseSparseMatrix::DenseSparseMatrix(const ColMajorMatrix& m)
has_diagonal_reserved_(false) {
}
-#ifndef CERES_NO_PROTOCOL_BUFFERS
-DenseSparseMatrix::DenseSparseMatrix(const SparseMatrixProto& outer_proto)
- : m_(Eigen::MatrixXd::Zero(
- outer_proto.dense_matrix().num_rows(),
- outer_proto.dense_matrix().num_cols())),
- has_diagonal_appended_(false),
- has_diagonal_reserved_(false) {
- const DenseSparseMatrixProto& proto = outer_proto.dense_matrix();
- for (int i = 0; i < m_.rows(); ++i) {
- for (int j = 0; j < m_.cols(); ++j) {
- m_(i, j) = proto.values(m_.cols() * i + j);
- }
- }
-}
-#endif
-
void DenseSparseMatrix::SetZero() {
m_.setZero();
}
@@ -121,22 +105,6 @@ void DenseSparseMatrix::ToDenseMatrix(Matrix* dense_matrix) const {
*dense_matrix = m_.block(0, 0, num_rows(), num_cols());
}
-#ifndef CERES_NO_PROTOCOL_BUFFERS
-void DenseSparseMatrix::ToProto(SparseMatrixProto* outer_proto) const {
- CHECK(!has_diagonal_appended_) << "Not supported.";
- outer_proto->Clear();
- DenseSparseMatrixProto* proto = outer_proto->mutable_dense_matrix();
-
- proto->set_num_rows(num_rows());
- proto->set_num_cols(num_cols());
-
- int num_nnz = num_nonzeros();
- for (int i = 0; i < num_nnz; ++i) {
- proto->add_values(m_.data()[i]);
- }
-}
-#endif
-
void DenseSparseMatrix::AppendDiagonal(double *d) {
CHECK(!has_diagonal_appended_);
if (!has_diagonal_reserved_) {
diff --git a/extern/libmv/third_party/ceres/internal/ceres/dense_sparse_matrix.h b/extern/libmv/third_party/ceres/internal/ceres/dense_sparse_matrix.h
index 6c7b60ade13..981e2d14562 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/dense_sparse_matrix.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/dense_sparse_matrix.h
@@ -33,7 +33,6 @@
#ifndef CERES_INTERNAL_DENSE_SPARSE_MATRIX_H_
#define CERES_INTERNAL_DENSE_SPARSE_MATRIX_H_
-#include <glog/logging.h>
#include "ceres/sparse_matrix.h"
#include "ceres/internal/eigen.h"
#include "ceres/internal/macros.h"
@@ -43,7 +42,6 @@
namespace ceres {
namespace internal {
-class SparseMatrixProto;
class TripletSparseMatrix;
class DenseSparseMatrix : public SparseMatrix {
@@ -52,9 +50,6 @@ class DenseSparseMatrix : public SparseMatrix {
// m. This assumes that m does not have any repeated entries.
explicit DenseSparseMatrix(const TripletSparseMatrix& m);
explicit DenseSparseMatrix(const ColMajorMatrix& m);
-#ifndef CERES_NO_PROTOCOL_BUFFERS
- explicit DenseSparseMatrix(const SparseMatrixProto& proto);
-#endif
DenseSparseMatrix(int num_rows, int num_cols);
DenseSparseMatrix(int num_rows, int num_cols, bool reserve_diagonal);
@@ -68,9 +63,6 @@ class DenseSparseMatrix : public SparseMatrix {
virtual void SquaredColumnNorm(double* x) const;
virtual void ScaleColumns(const double* scale);
virtual void ToDenseMatrix(Matrix* dense_matrix) const;
-#ifndef CERES_NO_PROTOCOL_BUFFERS
- virtual void ToProto(SparseMatrixProto* proto) const;
-#endif
virtual void ToTextFile(FILE* file) const;
virtual int num_rows() const;
virtual int num_cols() const;
diff --git a/extern/libmv/third_party/ceres/internal/ceres/dogleg_strategy.cc b/extern/libmv/third_party/ceres/internal/ceres/dogleg_strategy.cc
index a330ad2c7a2..c85c8e5cbf5 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/dogleg_strategy.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/dogleg_strategy.cc
@@ -34,6 +34,7 @@
#include "Eigen/Dense"
#include "ceres/array_utils.h"
#include "ceres/internal/eigen.h"
+#include "ceres/linear_least_squares_problems.h"
#include "ceres/linear_solver.h"
#include "ceres/polynomial.h"
#include "ceres/sparse_matrix.h"
@@ -52,8 +53,8 @@ DoglegStrategy::DoglegStrategy(const TrustRegionStrategy::Options& options)
: linear_solver_(options.linear_solver),
radius_(options.initial_radius),
max_radius_(options.max_radius),
- min_diagonal_(options.lm_min_diagonal),
- max_diagonal_(options.lm_max_diagonal),
+ min_diagonal_(options.min_lm_diagonal),
+ max_diagonal_(options.max_lm_diagonal),
mu_(kMinMu),
min_mu_(kMinMu),
max_mu_(kMaxMu),
@@ -127,7 +128,7 @@ TrustRegionStrategy::Summary DoglegStrategy::ComputeStep(
ComputeCauchyPoint(jacobian);
LinearSolver::Summary linear_solver_summary =
- ComputeGaussNewtonStep(jacobian, residuals);
+ ComputeGaussNewtonStep(per_solve_options, jacobian, residuals);
TrustRegionStrategy::Summary summary;
summary.residual_norm = linear_solver_summary.residual_norm;
@@ -507,6 +508,7 @@ bool DoglegStrategy::FindMinimumOnTrustRegionBoundary(Vector2d* minimum) const {
}
LinearSolver::Summary DoglegStrategy::ComputeGaussNewtonStep(
+ const PerSolveOptions& per_solve_options,
SparseMatrix* jacobian,
const double* residuals) {
const int n = jacobian->num_cols();
@@ -561,6 +563,22 @@ LinearSolver::Summary DoglegStrategy::ComputeGaussNewtonStep(
solve_options,
gauss_newton_step_.data());
+ if (per_solve_options.dump_format_type == CONSOLE ||
+ (per_solve_options.dump_format_type != CONSOLE &&
+ !per_solve_options.dump_filename_base.empty())) {
+ if (!DumpLinearLeastSquaresProblem(per_solve_options.dump_filename_base,
+ per_solve_options.dump_format_type,
+ jacobian,
+ solve_options.D,
+ residuals,
+ gauss_newton_step_.data(),
+ 0)) {
+ LOG(ERROR) << "Unable to dump trust region problem."
+ << " Filename base: "
+ << per_solve_options.dump_filename_base;
+ }
+ }
+
if (linear_solver_summary.termination_type == FAILURE ||
!IsArrayValid(n, gauss_newton_step_.data())) {
mu_ *= mu_increase_factor_;
diff --git a/extern/libmv/third_party/ceres/internal/ceres/dogleg_strategy.h b/extern/libmv/third_party/ceres/internal/ceres/dogleg_strategy.h
index 7131467d6ce..71c785cc3f7 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/dogleg_strategy.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/dogleg_strategy.h
@@ -79,8 +79,10 @@ class DoglegStrategy : public TrustRegionStrategy {
typedef Eigen::Matrix<double, 2, 1, Eigen::DontAlign> Vector2d;
typedef Eigen::Matrix<double, 2, 2, Eigen::DontAlign> Matrix2d;
- LinearSolver::Summary ComputeGaussNewtonStep(SparseMatrix* jacobian,
- const double* residuals);
+ LinearSolver::Summary ComputeGaussNewtonStep(
+ const PerSolveOptions& per_solve_options,
+ SparseMatrix* jacobian,
+ const double* residuals);
void ComputeCauchyPoint(SparseMatrix* jacobian);
void ComputeGradient(SparseMatrix* jacobian, const double* residuals);
void ComputeTraditionalDoglegStep(double* step);
diff --git a/extern/libmv/third_party/ceres/internal/ceres/graph_algorithms.h b/extern/libmv/third_party/ceres/internal/ceres/graph_algorithms.h
index 2e6eec0e6d8..ca3a2fe1a88 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/graph_algorithms.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/graph_algorithms.h
@@ -43,11 +43,12 @@
namespace ceres {
namespace internal {
-// Compare two vertices of a graph by their degrees.
+// Compare two vertices of a graph by their degrees, if the degrees
+// are equal then order them by their ids.
template <typename Vertex>
-class VertexDegreeLessThan {
+class VertexTotalOrdering {
public:
- explicit VertexDegreeLessThan(const Graph<Vertex>& graph)
+ explicit VertexTotalOrdering(const Graph<Vertex>& graph)
: graph_(graph) {}
bool operator()(const Vertex& lhs, const Vertex& rhs) const {
@@ -61,6 +62,20 @@ class VertexDegreeLessThan {
const Graph<Vertex>& graph_;
};
+template <typename Vertex>
+class VertexDegreeLessThan {
+ public:
+ explicit VertexDegreeLessThan(const Graph<Vertex>& graph)
+ : graph_(graph) {}
+
+ bool operator()(const Vertex& lhs, const Vertex& rhs) const {
+ return graph_.Neighbors(lhs).size() < graph_.Neighbors(rhs).size();
+ }
+
+ private:
+ const Graph<Vertex>& graph_;
+};
+
// Order the vertices of a graph using its (approximately) largest
// independent set, where an independent set of a graph is a set of
// vertices that have no edges connecting them. The maximum
@@ -104,8 +119,83 @@ int IndependentSetOrdering(const Graph<Vertex>& graph,
sort(vertex_queue.begin(), vertex_queue.end(),
- VertexDegreeLessThan<Vertex>(graph));
+ VertexTotalOrdering<Vertex>(graph));
+
+ // Iterate over vertex_queue. Pick the first white vertex, add it
+ // to the independent set. Mark it black and its neighbors grey.
+ for (int i = 0; i < vertex_queue.size(); ++i) {
+ const Vertex& vertex = vertex_queue[i];
+ if (vertex_color[vertex] != kWhite) {
+ continue;
+ }
+
+ ordering->push_back(vertex);
+ vertex_color[vertex] = kBlack;
+ const HashSet<Vertex>& neighbors = graph.Neighbors(vertex);
+ for (typename HashSet<Vertex>::const_iterator it = neighbors.begin();
+ it != neighbors.end();
+ ++it) {
+ vertex_color[*it] = kGrey;
+ }
+ }
+
+ int independent_set_size = ordering->size();
+
+ // Iterate over the vertices and add all the grey vertices to the
+ // ordering. At this stage there should only be black or grey
+ // vertices in the graph.
+ for (typename vector<Vertex>::const_iterator it = vertex_queue.begin();
+ it != vertex_queue.end();
+ ++it) {
+ const Vertex vertex = *it;
+ DCHECK(vertex_color[vertex] != kWhite);
+ if (vertex_color[vertex] != kBlack) {
+ ordering->push_back(vertex);
+ }
+ }
+
+ CHECK_EQ(ordering->size(), num_vertices);
+ return independent_set_size;
+}
+
+// Same as above with one important difference. The ordering parameter
+// is an input/output parameter which carries an initial ordering of
+// the vertices of the graph. The greedy independent set algorithm
+// starts by sorting the vertices in increasing order of their
+// degree. The input ordering is used to stabilize this sort, i.e., if
+// two vertices have the same degree then they are ordered in the same
+// order in which they occur in "ordering".
+//
+// This is useful in eliminating non-determinism from the Schur
+// ordering algorithm over all.
+template <typename Vertex>
+int StableIndependentSetOrdering(const Graph<Vertex>& graph,
+ vector<Vertex>* ordering) {
+ CHECK_NOTNULL(ordering);
+ const HashSet<Vertex>& vertices = graph.vertices();
+ const int num_vertices = vertices.size();
+ CHECK_EQ(vertices.size(), ordering->size());
+
+ // Colors for labeling the graph during the BFS.
+ const char kWhite = 0;
+ const char kGrey = 1;
+ const char kBlack = 2;
+
+ vector<Vertex> vertex_queue(*ordering);
+ stable_sort(vertex_queue.begin(), vertex_queue.end(),
+ VertexDegreeLessThan<Vertex>(graph));
+
+ // Mark all vertices white.
+ HashMap<Vertex, char> vertex_color;
+ for (typename HashSet<Vertex>::const_iterator it = vertices.begin();
+ it != vertices.end();
+ ++it) {
+ vertex_color[*it] = kWhite;
+ }
+
+ ordering->clear();
+ ordering->reserve(num_vertices);
// Iterate over vertex_queue. Pick the first white vertex, add it
// to the independent set. Mark it black and its neighbors grey.
for (int i = 0; i < vertex_queue.size(); ++i) {
diff --git a/extern/libmv/third_party/ceres/internal/ceres/implicit_schur_complement.cc b/extern/libmv/third_party/ceres/internal/ceres/implicit_schur_complement.cc
index 4af030a8535..32722bb6e8f 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/implicit_schur_complement.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/implicit_schur_complement.cc
@@ -55,7 +55,7 @@ ImplicitSchurComplement::ImplicitSchurComplement(int num_eliminate_blocks,
ImplicitSchurComplement::~ImplicitSchurComplement() {
}
-void ImplicitSchurComplement::Init(const BlockSparseMatrixBase& A,
+void ImplicitSchurComplement::Init(const BlockSparseMatrix& A,
const double* D,
const double* b) {
// Since initialization is reasonably heavy, perhaps we can save on
@@ -161,7 +161,7 @@ void ImplicitSchurComplement::AddDiagonalAndInvert(
m = m
.selfadjointView<Eigen::Upper>()
- .ldlt()
+ .llt()
.solve(Matrix::Identity(row_block_size, row_block_size));
}
}
diff --git a/extern/libmv/third_party/ceres/internal/ceres/implicit_schur_complement.h b/extern/libmv/third_party/ceres/internal/ceres/implicit_schur_complement.h
index b9ebaa4628e..c1bb6e19bab 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/implicit_schur_complement.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/implicit_schur_complement.h
@@ -44,7 +44,6 @@ namespace ceres {
namespace internal {
class BlockSparseMatrix;
-class BlockSparseMatrixBase;
// This class implements various linear algebraic operations related
// to the Schur complement without explicitly forming it.
@@ -110,7 +109,7 @@ class ImplicitSchurComplement : public LinearOperator {
// is important that the matrix A have a BlockStructure object
// associated with it and has a block structure that is compatible
// with the SchurComplement solver.
- void Init(const BlockSparseMatrixBase& A, const double* D, const double* b);
+ void Init(const BlockSparseMatrix& A, const double* D, const double* b);
// y += Sx, where S is the Schur complement.
virtual void RightMultiply(const double* x, double* y) const;
diff --git a/extern/libmv/third_party/ceres/internal/ceres/incomplete_lq_factorization.cc b/extern/libmv/third_party/ceres/internal/ceres/incomplete_lq_factorization.cc
new file mode 100644
index 00000000000..6ba38ec8eec
--- /dev/null
+++ b/extern/libmv/third_party/ceres/internal/ceres/incomplete_lq_factorization.cc
@@ -0,0 +1,239 @@
+// Ceres Solver - A fast non-linear least squares minimizer
+// Copyright 2013 Google Inc. All rights reserved.
+// http://code.google.com/p/ceres-solver/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+// * Neither the name of Google Inc. nor the names of its contributors may be
+// used to endorse or promote products derived from this software without
+// specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Author: sameeragarwal@google.com (Sameer Agarwal)
+
+#include "ceres/incomplete_lq_factorization.h"
+
+#include <vector>
+#include <utility>
+#include <cmath>
+#include "ceres/compressed_row_sparse_matrix.h"
+#include "ceres/internal/eigen.h"
+#include "ceres/internal/port.h"
+#include "glog/logging.h"
+
+namespace ceres {
+namespace internal {
+
+// Normalize a row and return it's norm.
+inline double NormalizeRow(const int row, CompressedRowSparseMatrix* matrix) {
+ const int row_begin = matrix->rows()[row];
+ const int row_end = matrix->rows()[row + 1];
+
+ double* values = matrix->mutable_values();
+ double norm = 0.0;
+ for (int i = row_begin; i < row_end; ++i) {
+ norm += values[i] * values[i];
+ }
+
+ norm = sqrt(norm);
+ const double inverse_norm = 1.0 / norm;
+ for (int i = row_begin; i < row_end; ++i) {
+ values[i] *= inverse_norm;
+ }
+
+ return norm;
+}
+
+// Compute a(row_a,:) * b(row_b, :)'
+inline double RowDotProduct(const CompressedRowSparseMatrix& a,
+ const int row_a,
+ const CompressedRowSparseMatrix& b,
+ const int row_b) {
+ const int* a_rows = a.rows();
+ const int* a_cols = a.cols();
+ const double* a_values = a.values();
+
+ const int* b_rows = b.rows();
+ const int* b_cols = b.cols();
+ const double* b_values = b.values();
+
+ const int row_a_end = a_rows[row_a + 1];
+ const int row_b_end = b_rows[row_b + 1];
+
+ int idx_a = a_rows[row_a];
+ int idx_b = b_rows[row_b];
+ double dot_product = 0.0;
+ while (idx_a < row_a_end && idx_b < row_b_end) {
+ if (a_cols[idx_a] == b_cols[idx_b]) {
+ dot_product += a_values[idx_a++] * b_values[idx_b++];
+ }
+
+ while (a_cols[idx_a] < b_cols[idx_b] && idx_a < row_a_end) {
+ ++idx_a;
+ }
+
+ while (a_cols[idx_a] > b_cols[idx_b] && idx_b < row_b_end) {
+ ++idx_b;
+ }
+ }
+
+ return dot_product;
+}
+
+struct SecondGreaterThan {
+ public:
+ bool operator()(const pair<int, double>& lhs,
+ const pair<int, double>& rhs) const {
+ return (fabs(lhs.second) > fabs(rhs.second));
+ }
+};
+
+// In the row vector dense_row(0:num_cols), drop values smaller than
+// the max_value * drop_tolerance. Of the remaining non-zero values,
+// choose at most level_of_fill values and then add the resulting row
+// vector to matrix.
+
+void DropEntriesAndAddRow(const Vector& dense_row,
+ const int num_entries,
+ const int level_of_fill,
+ const double drop_tolerance,
+ vector<pair<int, double> >* scratch,
+ CompressedRowSparseMatrix* matrix) {
+ int* rows = matrix->mutable_rows();
+ int* cols = matrix->mutable_cols();
+ double* values = matrix->mutable_values();
+ int num_nonzeros = rows[matrix->num_rows()];
+
+ if (num_entries == 0) {
+ matrix->set_num_rows(matrix->num_rows() + 1);
+ rows[matrix->num_rows()] = num_nonzeros;
+ return;
+ }
+
+ const double max_value = dense_row.head(num_entries).cwiseAbs().maxCoeff();
+ const double threshold = drop_tolerance * max_value;
+
+ int scratch_count = 0;
+ for (int i = 0; i < num_entries; ++i) {
+ if (fabs(dense_row[i]) > threshold) {
+ pair<int, double>& entry = (*scratch)[scratch_count];
+ entry.first = i;
+ entry.second = dense_row[i];
+ ++scratch_count;
+ }
+ }
+
+ if (scratch_count > level_of_fill) {
+ nth_element(scratch->begin(),
+ scratch->begin() + level_of_fill,
+ scratch->begin() + scratch_count,
+ SecondGreaterThan());
+ scratch_count = level_of_fill;
+ sort(scratch->begin(), scratch->begin() + scratch_count);
+ }
+
+ for (int i = 0; i < scratch_count; ++i) {
+ const pair<int, double>& entry = (*scratch)[i];
+ cols[num_nonzeros] = entry.first;
+ values[num_nonzeros] = entry.second;
+ ++num_nonzeros;
+ }
+
+ matrix->set_num_rows(matrix->num_rows() + 1);
+ rows[matrix->num_rows()] = num_nonzeros;
+}
+
+// Saad's Incomplete LQ factorization algorithm.
+CompressedRowSparseMatrix* IncompleteLQFactorization(
+ const CompressedRowSparseMatrix& matrix,
+ const int l_level_of_fill,
+ const double l_drop_tolerance,
+ const int q_level_of_fill,
+ const double q_drop_tolerance) {
+ const int num_rows = matrix.num_rows();
+ const int num_cols = matrix.num_cols();
+ const int* rows = matrix.rows();
+ const int* cols = matrix.cols();
+ const double* values = matrix.values();
+
+ CompressedRowSparseMatrix* l =
+ new CompressedRowSparseMatrix(num_rows,
+ num_rows,
+ l_level_of_fill * num_rows);
+ l->set_num_rows(0);
+
+ CompressedRowSparseMatrix q(num_rows, num_cols, q_level_of_fill * num_rows);
+ q.set_num_rows(0);
+
+ int* l_rows = l->mutable_rows();
+ int* l_cols = l->mutable_cols();
+ double* l_values = l->mutable_values();
+
+ int* q_rows = q.mutable_rows();
+ int* q_cols = q.mutable_cols();
+ double* q_values = q.mutable_values();
+
+ Vector l_i(num_rows);
+ Vector q_i(num_cols);
+ vector<pair<int, double> > scratch(num_cols);
+ for (int i = 0; i < num_rows; ++i) {
+ // l_i = q * matrix(i,:)');
+ l_i.setZero();
+ for (int j = 0; j < i; ++j) {
+ l_i(j) = RowDotProduct(matrix, i, q, j);
+ }
+ DropEntriesAndAddRow(l_i,
+ i,
+ l_level_of_fill,
+ l_drop_tolerance,
+ &scratch,
+ l);
+
+ // q_i = matrix(i,:) - q(0:i-1,:) * l_i);
+ q_i.setZero();
+ for (int idx = rows[i]; idx < rows[i + 1]; ++idx) {
+ q_i(cols[idx]) = values[idx];
+ }
+
+ for (int j = l_rows[i]; j < l_rows[i + 1]; ++j) {
+ const int r = l_cols[j];
+ const double lij = l_values[j];
+ for (int idx = q_rows[r]; idx < q_rows[r + 1]; ++idx) {
+ q_i(q_cols[idx]) -= lij * q_values[idx];
+ }
+ }
+ DropEntriesAndAddRow(q_i,
+ num_cols,
+ q_level_of_fill,
+ q_drop_tolerance,
+ &scratch,
+ &q);
+
+ // lii = |qi|
+ l_cols[l->num_nonzeros()] = i;
+ l_values[l->num_nonzeros()] = NormalizeRow(i, &q);
+ l_rows[l->num_rows()] += 1;
+ }
+
+ return l;
+}
+
+} // namespace internal
+} // namespace ceres
diff --git a/extern/libmv/third_party/ceres/internal/ceres/incomplete_lq_factorization.h b/extern/libmv/third_party/ceres/internal/ceres/incomplete_lq_factorization.h
new file mode 100644
index 00000000000..e678463cf8d
--- /dev/null
+++ b/extern/libmv/third_party/ceres/internal/ceres/incomplete_lq_factorization.h
@@ -0,0 +1,90 @@
+// Ceres Solver - A fast non-linear least squares minimizer
+// Copyright 2013 Google Inc. All rights reserved.
+// http://code.google.com/p/ceres-solver/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+// * Neither the name of Google Inc. nor the names of its contributors may be
+// used to endorse or promote products derived from this software without
+// specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Author: sameeragarwal@google.com (Sameer Agarwal)
+
+#ifndef CERES_INTERNAL_INCOMPLETE_LQ_FACTORIZATION_H_
+#define CERES_INTERNAL_INCOMPLETE_LQ_FACTORIZATION_H_
+
+#include <vector>
+#include <utility>
+#include "ceres/compressed_row_sparse_matrix.h"
+
+namespace ceres {
+namespace internal {
+
+// Incomplete LQ factorization as described in
+//
+// Preconditioning techniques for indefinite and nonsymmetric linear
+// systems. Yousef Saad, Preprint RIACS-ILQ-TR, RIACS, NASA Ames
+// Research Center, Moffett Field, CA, 1987.
+//
+// An incomplete LQ factorization of a matrix A is a decomposition
+//
+// A = LQ + E
+//
+// Where L is a lower triangular matrix, and Q is a near orthonormal
+// matrix. The extent of orthonormality depends on E. E is the "drop"
+// matrix. Each row of L has a maximum of l_level_of_fill entries, and
+// all non-zero entries are within l_drop_tolerance of the largest
+// entry. Each row of Q has a maximum of q_level_of_fill entries and
+// all non-zero entries are within q_drop_tolerance of the largest
+// entry.
+//
+// E is the error of the incomplete factorization.
+//
+// The purpose of incomplete factorizations is preconditioning and
+// there one only needs the L matrix, therefore this function just
+// returns L.
+//
+// Caller owns the result.
+CompressedRowSparseMatrix* IncompleteLQFactorization(
+ const CompressedRowSparseMatrix& matrix,
+ const int l_level_of_fill,
+ const double l_drop_tolerance,
+ const int q_level_of_fill,
+ const double q_drop_tolerance);
+
+// In the row vector dense_row(0:num_cols), drop values smaller than
+// the max_value * drop_tolerance. Of the remaining non-zero values,
+// choose at most level_of_fill values and then add the resulting row
+// vector to matrix.
+//
+// scratch is used to prevent allocations inside this function. It is
+// assumed that scratch is of size matrix->num_cols().
+void DropEntriesAndAddRow(const Vector& dense_row,
+ const int num_entries,
+ const int level_of_fill,
+ const double drop_tolerance,
+ vector<pair<int, double> >* scratch,
+ CompressedRowSparseMatrix* matrix);
+
+} // namespace internal
+} // namespace ceres
+
+#endif // CERES_INTERNAL_INCOMPLETE_LQ_FACTORIZATION_H_
diff --git a/extern/libmv/third_party/ceres/internal/ceres/iterative_schur_complement_solver.cc b/extern/libmv/third_party/ceres/internal/ceres/iterative_schur_complement_solver.cc
index 15e0bdcd81a..1aac5657ce6 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/iterative_schur_complement_solver.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/iterative_schur_complement_solver.cc
@@ -62,7 +62,7 @@ IterativeSchurComplementSolver::~IterativeSchurComplementSolver() {
}
LinearSolver::Summary IterativeSchurComplementSolver::SolveImpl(
- BlockSparseMatrixBase* A,
+ BlockSparseMatrix* A,
const double* b,
const LinearSolver::PerSolveOptions& per_solve_options,
double* x) {
@@ -78,6 +78,17 @@ LinearSolver::Summary IterativeSchurComplementSolver::SolveImpl(
}
schur_complement_->Init(*A, per_solve_options.D, b);
+ const int num_schur_complement_blocks =
+ A->block_structure()->cols.size() - options_.elimination_groups[0];
+ if (num_schur_complement_blocks == 0) {
+ VLOG(2) << "No parameter blocks left in the schur complement.";
+ LinearSolver::Summary cg_summary;
+ cg_summary.num_iterations = 0;
+ cg_summary.termination_type = TOLERANCE;
+ schur_complement_->BackSubstitute(NULL, x);
+ return cg_summary;
+ }
+
// Initialize the solution to the Schur complement system to zero.
//
// TODO(sameeragarwal): There maybe a better initialization than an
@@ -97,8 +108,8 @@ LinearSolver::Summary IterativeSchurComplementSolver::SolveImpl(
Preconditioner::Options preconditioner_options;
preconditioner_options.type = options_.preconditioner_type;
- preconditioner_options.sparse_linear_algebra_library =
- options_.sparse_linear_algebra_library;
+ preconditioner_options.sparse_linear_algebra_library_type =
+ options_.sparse_linear_algebra_library_type;
preconditioner_options.num_threads = options_.num_threads;
preconditioner_options.row_block_size = options_.row_block_size;
preconditioner_options.e_block_size = options_.e_block_size;
@@ -116,16 +127,16 @@ LinearSolver::Summary IterativeSchurComplementSolver::SolveImpl(
case SCHUR_JACOBI:
if (preconditioner_.get() == NULL) {
preconditioner_.reset(
- new SchurJacobiPreconditioner(
- *A->block_structure(), preconditioner_options));
+ new SchurJacobiPreconditioner(*A->block_structure(),
+ preconditioner_options));
}
break;
case CLUSTER_JACOBI:
case CLUSTER_TRIDIAGONAL:
if (preconditioner_.get() == NULL) {
preconditioner_.reset(
- new VisibilityBasedPreconditioner(
- *A->block_structure(), preconditioner_options));
+ new VisibilityBasedPreconditioner(*A->block_structure(),
+ preconditioner_options));
}
break;
default:
diff --git a/extern/libmv/third_party/ceres/internal/ceres/iterative_schur_complement_solver.h b/extern/libmv/third_party/ceres/internal/ceres/iterative_schur_complement_solver.h
index f8abe04c142..b056a694478 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/iterative_schur_complement_solver.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/iterative_schur_complement_solver.h
@@ -39,7 +39,7 @@
namespace ceres {
namespace internal {
-class BlockSparseMatrixBase;
+class BlockSparseMatrix;
class ImplicitSchurComplement;
class Preconditioner;
@@ -67,14 +67,14 @@ class Preconditioner;
// a proof of this fact and others related to this solver please see
// the section on Domain Decomposition Methods in Saad's book
// "Iterative Methods for Sparse Linear Systems".
-class IterativeSchurComplementSolver : public BlockSparseMatrixBaseSolver {
+class IterativeSchurComplementSolver : public BlockSparseMatrixSolver {
public:
explicit IterativeSchurComplementSolver(const LinearSolver::Options& options);
virtual ~IterativeSchurComplementSolver();
private:
virtual LinearSolver::Summary SolveImpl(
- BlockSparseMatrixBase* A,
+ BlockSparseMatrix* A,
const double* b,
const LinearSolver::PerSolveOptions& options,
double* x);
diff --git a/extern/libmv/third_party/ceres/internal/ceres/lapack.cc b/extern/libmv/third_party/ceres/internal/ceres/lapack.cc
new file mode 100644
index 00000000000..73bfa69cbbd
--- /dev/null
+++ b/extern/libmv/third_party/ceres/internal/ceres/lapack.cc
@@ -0,0 +1,157 @@
+// Ceres Solver - A fast non-linear least squares minimizer
+// Copyright 2013 Google Inc. All rights reserved.
+// http://code.google.com/p/ceres-solver/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+// * Neither the name of Google Inc. nor the names of its contributors may be
+// used to endorse or promote products derived from this software without
+// specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Author: sameeragarwal@google.com (Sameer Agarwal)
+
+#include "ceres/lapack.h"
+#include "glog/logging.h"
+
+// C interface to the LAPACK Cholesky factorization and triangular solve.
+extern "C" void dpotrf_(char* uplo,
+ int* n,
+ double* a,
+ int* lda,
+ int* info);
+
+extern "C" void dpotrs_(char* uplo,
+ int* n,
+ int* nrhs,
+ double* a,
+ int* lda,
+ double* b,
+ int* ldb,
+ int* info);
+
+extern "C" void dgels_(char* uplo,
+ int* m,
+ int* n,
+ int* nrhs,
+ double* a,
+ int* lda,
+ double* b,
+ int* ldb,
+ double* work,
+ int* lwork,
+ int* info);
+
+
+namespace ceres {
+namespace internal {
+
+int LAPACK::SolveInPlaceUsingCholesky(int num_rows,
+ const double* in_lhs,
+ double* rhs_and_solution) {
+#ifdef CERES_NO_LAPACK
+ LOG(FATAL) << "Ceres was built without a BLAS library.";
+ return -1;
+#else
+ char uplo = 'L';
+ int n = num_rows;
+ int info = 0;
+ int nrhs = 1;
+ double* lhs = const_cast<double*>(in_lhs);
+
+ dpotrf_(&uplo, &n, lhs, &n, &info);
+ if (info != 0) {
+ LOG(INFO) << "Cholesky factorization (dpotrf) failed: " << info;
+ return info;
+ }
+
+ dpotrs_(&uplo, &n, &nrhs, lhs, &n, rhs_and_solution, &n, &info);
+ if (info != 0) {
+ LOG(INFO) << "Triangular solve (dpotrs) failed: " << info;
+ }
+
+ return info;
+#endif
+};
+
+int LAPACK::EstimateWorkSizeForQR(int num_rows, int num_cols) {
+#ifdef CERES_NO_LAPACK
+ LOG(FATAL) << "Ceres was built without a LAPACK library.";
+ return -1;
+#else
+ char trans = 'N';
+ int nrhs = 1;
+ int lwork = -1;
+ double work;
+ int info = 0;
+ dgels_(&trans,
+ &num_rows,
+ &num_cols,
+ &nrhs,
+ NULL,
+ &num_rows,
+ NULL,
+ &num_rows,
+ &work,
+ &lwork,
+ &info);
+
+ CHECK_EQ(info, 0);
+ return work;
+#endif
+}
+
+int LAPACK::SolveUsingQR(int num_rows,
+ int num_cols,
+ const double* in_lhs,
+ int work_size,
+ double* work,
+ double* rhs_and_solution) {
+#ifdef CERES_NO_LAPACK
+ LOG(FATAL) << "Ceres was built without a LAPACK library.";
+ return -1;
+#else
+ char trans = 'N';
+ int m = num_rows;
+ int n = num_cols;
+ int nrhs = 1;
+ int lda = num_rows;
+ int ldb = num_rows;
+ int info = 0;
+ double* lhs = const_cast<double*>(in_lhs);
+
+ dgels_(&trans,
+ &m,
+ &n,
+ &nrhs,
+ lhs,
+ &lda,
+ rhs_and_solution,
+ &ldb,
+ work,
+ &work_size,
+ &info);
+
+ return info;
+#endif
+}
+
+} // namespace internal
+} // namespace ceres
diff --git a/extern/libmv/third_party/ceres/internal/ceres/lapack.h b/extern/libmv/third_party/ceres/internal/ceres/lapack.h
new file mode 100644
index 00000000000..4f3a88c700a
--- /dev/null
+++ b/extern/libmv/third_party/ceres/internal/ceres/lapack.h
@@ -0,0 +1,88 @@
+// Ceres Solver - A fast non-linear least squares minimizer
+// Copyright 2013 Google Inc. All rights reserved.
+// http://code.google.com/p/ceres-solver/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+// * Neither the name of Google Inc. nor the names of its contributors may be
+// used to endorse or promote products derived from this software without
+// specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Author: sameeragarwal@google.com (Sameer Agarwal)
+
+#ifndef CERES_INTERNAL_LAPACK_H_
+#define CERES_INTERNAL_LAPACK_H_
+
+namespace ceres {
+namespace internal {
+
+class LAPACK {
+ public:
+ // Solve
+ //
+ // lhs * solution = rhs
+ //
+ // using a Cholesky factorization. Here
+ // lhs is a symmetric positive definite matrix. It is assumed to be
+ // column major and only the lower triangular part of the matrix is
+ // referenced.
+ //
+ // This function uses the LAPACK dpotrf and dpotrs routines.
+ //
+ // The return value is zero if the solve is successful.
+ static int SolveInPlaceUsingCholesky(int num_rows,
+ const double* lhs,
+ double* rhs_and_solution);
+
+ // The SolveUsingQR function requires a buffer for its temporary
+ // computation. This function given the size of the lhs matrix will
+ // return the size of the buffer needed.
+ static int EstimateWorkSizeForQR(int num_rows, int num_cols);
+
+ // Solve
+ //
+ // lhs * solution = rhs
+ //
+ // using a dense QR factorization. lhs is an arbitrary (possibly
+ // rectangular) matrix with full column rank.
+ //
+ // work is an array of size work_size that this routine uses for its
+ // temporary storage. The optimal size of this array can be obtained
+ // by calling EstimateWorkSizeForQR.
+ //
+ // When calling, rhs_and_solution contains the rhs, and upon return
+ // the first num_col entries are the solution.
+ //
+ // This function uses the LAPACK dgels routine.
+ //
+ // The return value is zero if the solve is successful.
+ static int SolveUsingQR(int num_rows,
+ int num_cols,
+ const double* lhs,
+ int work_size,
+ double* work,
+ double* rhs_and_solution);
+};
+
+} // namespace internal
+} // namespace ceres
+
+#endif // CERES_INTERNAL_LAPACK_H_
diff --git a/extern/libmv/third_party/ceres/internal/ceres/levenberg_marquardt_strategy.cc b/extern/libmv/third_party/ceres/internal/ceres/levenberg_marquardt_strategy.cc
index 9e6a59e3813..fad7c1f3258 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/levenberg_marquardt_strategy.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/levenberg_marquardt_strategy.cc
@@ -34,6 +34,7 @@
#include "Eigen/Core"
#include "ceres/array_utils.h"
#include "ceres/internal/eigen.h"
+#include "ceres/linear_least_squares_problems.h"
#include "ceres/linear_solver.h"
#include "ceres/sparse_matrix.h"
#include "ceres/trust_region_strategy.h"
@@ -48,8 +49,8 @@ LevenbergMarquardtStrategy::LevenbergMarquardtStrategy(
: linear_solver_(options.linear_solver),
radius_(options.initial_radius),
max_radius_(options.max_radius),
- min_diagonal_(options.lm_min_diagonal),
- max_diagonal_(options.lm_max_diagonal),
+ min_diagonal_(options.min_lm_diagonal),
+ max_diagonal_(options.max_lm_diagonal),
decrease_factor_(2.0),
reuse_diagonal_(false) {
CHECK_NOTNULL(linear_solver_);
@@ -111,9 +112,24 @@ TrustRegionStrategy::Summary LevenbergMarquardtStrategy::ComputeStep(
} else {
VectorRef(step, num_parameters) *= -1.0;
}
-
reuse_diagonal_ = true;
+ if (per_solve_options.dump_format_type == CONSOLE ||
+ (per_solve_options.dump_format_type != CONSOLE &&
+ !per_solve_options.dump_filename_base.empty())) {
+ if (!DumpLinearLeastSquaresProblem(per_solve_options.dump_filename_base,
+ per_solve_options.dump_format_type,
+ jacobian,
+ solve_options.D,
+ residuals,
+ step,
+ 0)) {
+ LOG(ERROR) << "Unable to dump trust region problem."
+ << " Filename base: " << per_solve_options.dump_filename_base;
+ }
+ }
+
+
TrustRegionStrategy::Summary summary;
summary.residual_norm = linear_solver_summary.residual_norm;
summary.num_iterations = linear_solver_summary.num_iterations;
diff --git a/extern/libmv/third_party/ceres/internal/ceres/line_search.cc b/extern/libmv/third_party/ceres/internal/ceres/line_search.cc
index 437f742607f..8323896915a 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/line_search.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/line_search.cc
@@ -31,12 +31,12 @@
#ifndef CERES_NO_LINE_SEARCH_MINIMIZER
#include "ceres/line_search.h"
-#include <glog/logging.h>
#include "ceres/fpclassify.h"
#include "ceres/evaluator.h"
#include "ceres/internal/eigen.h"
#include "ceres/polynomial.h"
-
+#include "ceres/stringprintf.h"
+#include "glog/logging.h"
namespace ceres {
namespace internal {
@@ -64,6 +64,39 @@ FunctionSample ValueAndGradientSample(const double x,
} // namespace
+// Convenience stream operator for pushing FunctionSamples into log messages.
+std::ostream& operator<<(std::ostream &os,
+ const FunctionSample& sample) {
+ os << "[x: " << sample.x << ", value: " << sample.value
+ << ", gradient: " << sample.gradient << ", value_is_valid: "
+ << std::boolalpha << sample.value_is_valid << ", gradient_is_valid: "
+ << std::boolalpha << sample.gradient_is_valid << "]";
+ return os;
+}
+
+LineSearch::LineSearch(const LineSearch::Options& options)
+ : options_(options) {}
+
+LineSearch* LineSearch::Create(const LineSearchType line_search_type,
+ const LineSearch::Options& options,
+ string* error) {
+ LineSearch* line_search = NULL;
+ switch (line_search_type) {
+ case ceres::ARMIJO:
+ line_search = new ArmijoLineSearch(options);
+ break;
+ case ceres::WOLFE:
+ line_search = new WolfeLineSearch(options);
+ break;
+ default:
+ *error = string("Invalid line search algorithm type: ") +
+ LineSearchTypeToString(line_search_type) +
+ string(", unable to create line search.");
+ return NULL;
+ }
+ return line_search;
+}
+
LineSearchFunction::LineSearchFunction(Evaluator* evaluator)
: evaluator_(evaluator),
position_(evaluator->NumParameters()),
@@ -79,7 +112,7 @@ void LineSearchFunction::Init(const Vector& position,
direction_ = direction;
}
-bool LineSearchFunction::Evaluate(const double x, double* f, double* g) {
+bool LineSearchFunction::Evaluate(double x, double* f, double* g) {
scaled_direction_ = x * direction_;
if (!evaluator_->Plus(position_.data(),
scaled_direction_.data(),
@@ -104,110 +137,608 @@ bool LineSearchFunction::Evaluate(const double x, double* f, double* g) {
return IsFinite(*f) && IsFinite(*g);
}
-void ArmijoLineSearch::Search(const LineSearch::Options& options,
- const double initial_step_size,
+double LineSearchFunction::DirectionInfinityNorm() const {
+ return direction_.lpNorm<Eigen::Infinity>();
+}
+
+// Returns step_size \in [min_step_size, max_step_size] which minimizes the
+// polynomial of degree defined by interpolation_type which interpolates all
+// of the provided samples with valid values.
+double LineSearch::InterpolatingPolynomialMinimizingStepSize(
+ const LineSearchInterpolationType& interpolation_type,
+ const FunctionSample& lowerbound,
+ const FunctionSample& previous,
+ const FunctionSample& current,
+ const double min_step_size,
+ const double max_step_size) const {
+ if (!current.value_is_valid ||
+ (interpolation_type == BISECTION &&
+ max_step_size <= current.x)) {
+ // Either: sample is invalid; or we are using BISECTION and contracting
+ // the step size.
+ return min(max(current.x * 0.5, min_step_size), max_step_size);
+ } else if (interpolation_type == BISECTION) {
+ CHECK_GT(max_step_size, current.x);
+ // We are expanding the search (during a Wolfe bracketing phase) using
+ // BISECTION interpolation. Using BISECTION when trying to expand is
+ // strictly speaking an oxymoron, but we define this to mean always taking
+ // the maximum step size so that the Armijo & Wolfe implementations are
+ // agnostic to the interpolation type.
+ return max_step_size;
+ }
+ // Only check if lower-bound is valid here, where it is required
+ // to avoid replicating current.value_is_valid == false
+ // behaviour in WolfeLineSearch.
+ CHECK(lowerbound.value_is_valid)
+ << "Ceres bug: lower-bound sample for interpolation is invalid, "
+ << "please contact the developers!, interpolation_type: "
+ << LineSearchInterpolationTypeToString(interpolation_type)
+ << ", lowerbound: " << lowerbound << ", previous: " << previous
+ << ", current: " << current;
+
+ // Select step size by interpolating the function and gradient values
+ // and minimizing the corresponding polynomial.
+ vector<FunctionSample> samples;
+ samples.push_back(lowerbound);
+
+ if (interpolation_type == QUADRATIC) {
+ // Two point interpolation using function values and the
+ // gradient at the lower bound.
+ samples.push_back(ValueSample(current.x, current.value));
+
+ if (previous.value_is_valid) {
+ // Three point interpolation, using function values and the
+ // gradient at the lower bound.
+ samples.push_back(ValueSample(previous.x, previous.value));
+ }
+ } else if (interpolation_type == CUBIC) {
+ // Two point interpolation using the function values and the gradients.
+ samples.push_back(current);
+
+ if (previous.value_is_valid) {
+ // Three point interpolation using the function values and
+ // the gradients.
+ samples.push_back(previous);
+ }
+ } else {
+ LOG(FATAL) << "Ceres bug: No handler for interpolation_type: "
+ << LineSearchInterpolationTypeToString(interpolation_type)
+ << ", please contact the developers!";
+ }
+
+ double step_size = 0.0, unused_min_value = 0.0;
+ MinimizeInterpolatingPolynomial(samples, min_step_size, max_step_size,
+ &step_size, &unused_min_value);
+ return step_size;
+}
+
+ArmijoLineSearch::ArmijoLineSearch(const LineSearch::Options& options)
+ : LineSearch(options) {}
+
+void ArmijoLineSearch::Search(const double step_size_estimate,
const double initial_cost,
const double initial_gradient,
Summary* summary) {
*CHECK_NOTNULL(summary) = LineSearch::Summary();
- Function* function = options.function;
-
- double previous_step_size = 0.0;
- double previous_cost = 0.0;
- double previous_gradient = 0.0;
- bool previous_step_size_is_valid = false;
-
- double step_size = initial_step_size;
- double cost = 0.0;
- double gradient = 0.0;
- bool step_size_is_valid = false;
-
- ++summary->num_evaluations;
- step_size_is_valid =
- function->Evaluate(step_size,
- &cost,
- options.interpolation_degree < 2 ? NULL : &gradient);
- while (!step_size_is_valid || cost > (initial_cost
- + options.sufficient_decrease
- * initial_gradient
- * step_size)) {
- // If step_size_is_valid is not true we treat it as if the cost at
- // that point is not large enough to satisfy the sufficient
- // decrease condition.
-
- const double current_step_size = step_size;
- // Backtracking search. Each iteration of this loop finds a new point
-
- if ((options.interpolation_degree == 0) || !step_size_is_valid) {
- // Backtrack by halving the step_size;
- step_size *= 0.5;
- } else {
- // Backtrack by interpolating the function and gradient values
- // and minimizing the corresponding polynomial.
-
- vector<FunctionSample> samples;
- samples.push_back(ValueAndGradientSample(0.0,
- initial_cost,
- initial_gradient));
-
- if (options.interpolation_degree == 1) {
- // Two point interpolation using function values and the
- // initial gradient.
- samples.push_back(ValueSample(step_size, cost));
-
- if (options.use_higher_degree_interpolation_when_possible &&
- summary->num_evaluations > 1 &&
- previous_step_size_is_valid) {
- // Three point interpolation, using function values and the
- // initial gradient.
- samples.push_back(ValueSample(previous_step_size, previous_cost));
- }
- } else {
- // Two point interpolation using the function values and the gradients.
- samples.push_back(ValueAndGradientSample(step_size,
- cost,
- gradient));
-
- if (options.use_higher_degree_interpolation_when_possible &&
- summary->num_evaluations > 1 &&
- previous_step_size_is_valid) {
- // Three point interpolation using the function values and
- // the gradients.
- samples.push_back(ValueAndGradientSample(previous_step_size,
- previous_cost,
- previous_gradient));
- }
- }
+ CHECK_GE(step_size_estimate, 0.0);
+ CHECK_GT(options().sufficient_decrease, 0.0);
+ CHECK_LT(options().sufficient_decrease, 1.0);
+ CHECK_GT(options().max_num_iterations, 0);
+ Function* function = options().function;
+
+ // Note initial_cost & initial_gradient are evaluated at step_size = 0,
+ // not step_size_estimate, which is our starting guess.
+ const FunctionSample initial_position =
+ ValueAndGradientSample(0.0, initial_cost, initial_gradient);
+
+ FunctionSample previous = ValueAndGradientSample(0.0, 0.0, 0.0);
+ previous.value_is_valid = false;
+
+ FunctionSample current = ValueAndGradientSample(step_size_estimate, 0.0, 0.0);
+ current.value_is_valid = false;
- double min_value;
- MinimizeInterpolatingPolynomial(samples, 0.0, current_step_size,
- &step_size, &min_value);
- step_size =
- min(max(step_size,
- options.min_relative_step_size_change * current_step_size),
- options.max_relative_step_size_change * current_step_size);
+ const bool interpolation_uses_gradients =
+ options().interpolation_type == CUBIC;
+ const double descent_direction_max_norm =
+ static_cast<const LineSearchFunction*>(function)->DirectionInfinityNorm();
+
+ ++summary->num_function_evaluations;
+ if (interpolation_uses_gradients) { ++summary->num_gradient_evaluations; }
+ current.value_is_valid =
+ function->Evaluate(current.x,
+ &current.value,
+ interpolation_uses_gradients
+ ? &current.gradient : NULL);
+ current.gradient_is_valid =
+ interpolation_uses_gradients && current.value_is_valid;
+ while (!current.value_is_valid ||
+ current.value > (initial_cost
+ + options().sufficient_decrease
+ * initial_gradient
+ * current.x)) {
+ // If current.value_is_valid is false, we treat it as if the cost at that
+ // point is not large enough to satisfy the sufficient decrease condition.
+ ++summary->num_iterations;
+ if (summary->num_iterations >= options().max_num_iterations) {
+ summary->error =
+ StringPrintf("Line search failed: Armijo failed to find a point "
+ "satisfying the sufficient decrease condition within "
+ "specified max_num_iterations: %d.",
+ options().max_num_iterations);
+ LOG(WARNING) << summary->error;
+ return;
}
- previous_step_size = current_step_size;
- previous_cost = cost;
- previous_gradient = gradient;
+ const double step_size =
+ this->InterpolatingPolynomialMinimizingStepSize(
+ options().interpolation_type,
+ initial_position,
+ previous,
+ current,
+ (options().max_step_contraction * current.x),
+ (options().min_step_contraction * current.x));
- if (fabs(initial_gradient) * step_size < options.step_size_threshold) {
- LOG(WARNING) << "Line search failed: step_size too small: " << step_size;
+ if (step_size * descent_direction_max_norm < options().min_step_size) {
+ summary->error =
+ StringPrintf("Line search failed: step_size too small: %.5e "
+ "with descent_direction_max_norm: %.5e.", step_size,
+ descent_direction_max_norm);
+ LOG(WARNING) << summary->error;
return;
}
- ++summary->num_evaluations;
- step_size_is_valid =
- function->Evaluate(step_size,
- &cost,
- options.interpolation_degree < 2 ? NULL : &gradient);
+ previous = current;
+ current.x = step_size;
+
+ ++summary->num_function_evaluations;
+ if (interpolation_uses_gradients) { ++summary->num_gradient_evaluations; }
+ current.value_is_valid =
+ function->Evaluate(current.x,
+ &current.value,
+ interpolation_uses_gradients
+ ? &current.gradient : NULL);
+ current.gradient_is_valid =
+ interpolation_uses_gradients && current.value_is_valid;
+ }
+
+ summary->optimal_step_size = current.x;
+ summary->success = true;
+}
+
+WolfeLineSearch::WolfeLineSearch(const LineSearch::Options& options)
+ : LineSearch(options) {}
+
+void WolfeLineSearch::Search(const double step_size_estimate,
+ const double initial_cost,
+ const double initial_gradient,
+ Summary* summary) {
+ *CHECK_NOTNULL(summary) = LineSearch::Summary();
+ // All parameters should have been validated by the Solver, but as
+ // invalid values would produce crazy nonsense, hard check them here.
+ CHECK_GE(step_size_estimate, 0.0);
+ CHECK_GT(options().sufficient_decrease, 0.0);
+ CHECK_GT(options().sufficient_curvature_decrease,
+ options().sufficient_decrease);
+ CHECK_LT(options().sufficient_curvature_decrease, 1.0);
+ CHECK_GT(options().max_step_expansion, 1.0);
+
+ // Note initial_cost & initial_gradient are evaluated at step_size = 0,
+ // not step_size_estimate, which is our starting guess.
+ const FunctionSample initial_position =
+ ValueAndGradientSample(0.0, initial_cost, initial_gradient);
+
+ bool do_zoom_search = false;
+ // Important: The high/low in bracket_high & bracket_low refer to their
+ // _function_ values, not their step sizes i.e. it is _not_ required that
+ // bracket_low.x < bracket_high.x.
+ FunctionSample solution, bracket_low, bracket_high;
+
+ // Wolfe bracketing phase: Increases step_size until either it finds a point
+ // that satisfies the (strong) Wolfe conditions, or an interval that brackets
+ // step sizes which satisfy the conditions. From Nocedal & Wright [1] p61 the
+ // interval: (step_size_{k-1}, step_size_{k}) contains step lengths satisfying
+ // the strong Wolfe conditions if one of the following conditions are met:
+ //
+ // 1. step_size_{k} violates the sufficient decrease (Armijo) condition.
+ // 2. f(step_size_{k}) >= f(step_size_{k-1}).
+ // 3. f'(step_size_{k}) >= 0.
+ //
+ // Caveat: If f(step_size_{k}) is invalid, then step_size is reduced, ignoring
+ // this special case, step_size monotonically increases during bracketing.
+ if (!this->BracketingPhase(initial_position,
+ step_size_estimate,
+ &bracket_low,
+ &bracket_high,
+ &do_zoom_search,
+ summary) &&
+ summary->num_iterations < options().max_num_iterations) {
+ // Failed to find either a valid point or a valid bracket, but we did not
+ // run out of iterations.
+ return;
+ }
+ if (!do_zoom_search) {
+ // Either: Bracketing phase already found a point satisfying the strong
+ // Wolfe conditions, thus no Zoom required.
+ //
+ // Or: Bracketing failed to find a valid bracket or a point satisfying the
+ // strong Wolfe conditions within max_num_iterations. As this is an
+ // 'artificial' constraint, and we would otherwise fail to produce a valid
+ // point when ArmijoLineSearch would succeed, we return the lowest point
+ // found thus far which satsifies the Armijo condition (but not the Wolfe
+ // conditions).
+ CHECK(bracket_low.value_is_valid)
+ << "Ceres bug: Bracketing produced an invalid bracket_low, please "
+ << "contact the developers!, bracket_low: " << bracket_low
+ << ", bracket_high: " << bracket_high << ", num_iterations: "
+ << summary->num_iterations << ", max_num_iterations: "
+ << options().max_num_iterations;
+ summary->optimal_step_size = bracket_low.x;
+ summary->success = true;
+ return;
+ }
+
+ // Wolfe Zoom phase: Called when the Bracketing phase finds an interval of
+ // non-zero, finite width that should bracket step sizes which satisfy the
+ // (strong) Wolfe conditions (before finding a step size that satisfies the
+ // conditions). Zoom successively decreases the size of the interval until a
+ // step size which satisfies the Wolfe conditions is found. The interval is
+ // defined by bracket_low & bracket_high, which satisfy:
+ //
+ // 1. The interval bounded by step sizes: bracket_low.x & bracket_high.x
+ // contains step sizes that satsify the strong Wolfe conditions.
+ // 2. bracket_low.x is of all the step sizes evaluated *which satisifed the
+ // Armijo sufficient decrease condition*, the one which generated the
+ // smallest function value, i.e. bracket_low.value <
+ // f(all other steps satisfying Armijo).
+ // - Note that this does _not_ (necessarily) mean that initially
+ // bracket_low.value < bracket_high.value (although this is typical)
+ // e.g. when bracket_low = initial_position, and bracket_high is the
+ // first sample, and which does not satisfy the Armijo condition,
+ // but still has bracket_high.value < initial_position.value.
+ // 3. bracket_high is chosen after bracket_low, s.t.
+ // bracket_low.gradient * (bracket_high.x - bracket_low.x) < 0.
+ if (!this->ZoomPhase(initial_position,
+ bracket_low,
+ bracket_high,
+ &solution,
+ summary) && !solution.value_is_valid) {
+ // Failed to find a valid point (given the specified decrease parameters)
+ // within the specified bracket.
+ return;
}
+ // Ensure that if we ran out of iterations whilst zooming the bracket, or
+ // shrank the bracket width to < tolerance and failed to find a point which
+ // satisfies the strong Wolfe curvature condition, that we return the point
+ // amongst those found thus far, which minimizes f() and satisfies the Armijo
+ // condition.
+ solution =
+ solution.value_is_valid && solution.value <= bracket_low.value
+ ? solution : bracket_low;
- summary->optimal_step_size = step_size;
+ summary->optimal_step_size = solution.x;
summary->success = true;
}
+// Returns true iff bracket_low & bracket_high bound a bracket that contains
+// points which satisfy the strong Wolfe conditions. Otherwise, on return false,
+// if we stopped searching due to the 'artificial' condition of reaching
+// max_num_iterations, bracket_low is the step size amongst all those
+// tested, which satisfied the Armijo decrease condition and minimized f().
+bool WolfeLineSearch::BracketingPhase(
+ const FunctionSample& initial_position,
+ const double step_size_estimate,
+ FunctionSample* bracket_low,
+ FunctionSample* bracket_high,
+ bool* do_zoom_search,
+ Summary* summary) {
+ Function* function = options().function;
+
+ FunctionSample previous = initial_position;
+ FunctionSample current = ValueAndGradientSample(step_size_estimate, 0.0, 0.0);
+ current.value_is_valid = false;
+
+ const bool interpolation_uses_gradients =
+ options().interpolation_type == CUBIC;
+ const double descent_direction_max_norm =
+ static_cast<const LineSearchFunction*>(function)->DirectionInfinityNorm();
+
+ *do_zoom_search = false;
+ *bracket_low = initial_position;
+
+ ++summary->num_function_evaluations;
+ if (interpolation_uses_gradients) { ++summary->num_gradient_evaluations; }
+ current.value_is_valid =
+ function->Evaluate(current.x,
+ &current.value,
+ interpolation_uses_gradients
+ ? &current.gradient : NULL);
+ current.gradient_is_valid =
+ interpolation_uses_gradients && current.value_is_valid;
+
+ while (true) {
+ ++summary->num_iterations;
+
+ if (current.value_is_valid &&
+ (current.value > (initial_position.value
+ + options().sufficient_decrease
+ * initial_position.gradient
+ * current.x) ||
+ (previous.value_is_valid && current.value > previous.value))) {
+ // Bracket found: current step size violates Armijo sufficient decrease
+ // condition, or has stepped past an inflection point of f() relative to
+ // previous step size.
+ *do_zoom_search = true;
+ *bracket_low = previous;
+ *bracket_high = current;
+ break;
+ }
+
+ // Irrespective of the interpolation type we are using, we now need the
+ // gradient at the current point (which satisfies the Armijo condition)
+ // in order to check the strong Wolfe conditions.
+ if (!interpolation_uses_gradients) {
+ ++summary->num_function_evaluations;
+ ++summary->num_gradient_evaluations;
+ current.value_is_valid =
+ function->Evaluate(current.x,
+ &current.value,
+ &current.gradient);
+ current.gradient_is_valid = current.value_is_valid;
+ }
+
+ if (current.value_is_valid &&
+ fabs(current.gradient) <=
+ -options().sufficient_curvature_decrease * initial_position.gradient) {
+ // Current step size satisfies the strong Wolfe conditions, and is thus a
+ // valid termination point, therefore a Zoom not required.
+ *bracket_low = current;
+ *bracket_high = current;
+ break;
+
+ } else if (current.value_is_valid && current.gradient >= 0) {
+ // Bracket found: current step size has stepped past an inflection point
+ // of f(), but Armijo sufficient decrease is still satisfied and
+ // f(current) is our best minimum thus far. Remember step size
+ // monotonically increases, thus previous_step_size < current_step_size
+ // even though f(previous) > f(current).
+ *do_zoom_search = true;
+ // Note inverse ordering from first bracket case.
+ *bracket_low = current;
+ *bracket_high = previous;
+ break;
+
+ } else if (summary->num_iterations >= options().max_num_iterations) {
+ // Check num iterations bound here so that we always evaluate the
+ // max_num_iterations-th iteration against all conditions, and
+ // then perform no additional (unused) evaluations.
+ summary->error =
+ StringPrintf("Line search failed: Wolfe bracketing phase failed to "
+ "find a point satisfying strong Wolfe conditions, or a "
+ "bracket containing such a point within specified "
+ "max_num_iterations: %d", options().max_num_iterations);
+ LOG(WARNING) << summary->error;
+ // Ensure that bracket_low is always set to the step size amongst all
+ // those tested which minimizes f() and satisfies the Armijo condition
+ // when we terminate due to the 'artificial' max_num_iterations condition.
+ *bracket_low =
+ current.value_is_valid && current.value < bracket_low->value
+ ? current : *bracket_low;
+ return false;
+ }
+ // Either: f(current) is invalid; or, f(current) is valid, but does not
+ // satisfy the strong Wolfe conditions itself, or the conditions for
+ // being a boundary of a bracket.
+
+ // If f(current) is valid, (but meets no criteria) expand the search by
+ // increasing the step size.
+ const double max_step_size =
+ current.value_is_valid
+ ? (current.x * options().max_step_expansion) : current.x;
+
+ // We are performing 2-point interpolation only here, but the API of
+ // InterpolatingPolynomialMinimizingStepSize() allows for up to
+ // 3-point interpolation, so pad call with a sample with an invalid
+ // value that will therefore be ignored.
+ const FunctionSample unused_previous;
+ DCHECK(!unused_previous.value_is_valid);
+ // Contracts step size if f(current) is not valid.
+ const double step_size =
+ this->InterpolatingPolynomialMinimizingStepSize(
+ options().interpolation_type,
+ previous,
+ unused_previous,
+ current,
+ previous.x,
+ max_step_size);
+ if (step_size * descent_direction_max_norm < options().min_step_size) {
+ summary->error =
+ StringPrintf("Line search failed: step_size too small: %.5e "
+ "with descent_direction_max_norm: %.5e", step_size,
+ descent_direction_max_norm);
+ LOG(WARNING) << summary->error;
+ return false;
+ }
+
+ previous = current.value_is_valid ? current : previous;
+ current.x = step_size;
+
+ ++summary->num_function_evaluations;
+ if (interpolation_uses_gradients) { ++summary->num_gradient_evaluations; }
+ current.value_is_valid =
+ function->Evaluate(current.x,
+ &current.value,
+ interpolation_uses_gradients
+ ? &current.gradient : NULL);
+ current.gradient_is_valid =
+ interpolation_uses_gradients && current.value_is_valid;
+ }
+ // Either we have a valid point, defined as a bracket of zero width, in which
+ // case no zoom is required, or a valid bracket in which to zoom.
+ return true;
+}
+
+// Returns true iff solution satisfies the strong Wolfe conditions. Otherwise,
+// on return false, if we stopped searching due to the 'artificial' condition of
+// reaching max_num_iterations, solution is the step size amongst all those
+// tested, which satisfied the Armijo decrease condition and minimized f().
+bool WolfeLineSearch::ZoomPhase(const FunctionSample& initial_position,
+ FunctionSample bracket_low,
+ FunctionSample bracket_high,
+ FunctionSample* solution,
+ Summary* summary) {
+ Function* function = options().function;
+
+ CHECK(bracket_low.value_is_valid && bracket_low.gradient_is_valid)
+ << "Ceres bug: f_low input to Wolfe Zoom invalid, please contact "
+ << "the developers!, initial_position: " << initial_position
+ << ", bracket_low: " << bracket_low
+ << ", bracket_high: "<< bracket_high;
+ // We do not require bracket_high.gradient_is_valid as the gradient condition
+ // for a valid bracket is only dependent upon bracket_low.gradient, and
+ // in order to minimize jacobian evaluations, bracket_high.gradient may
+ // not have been calculated (if bracket_high.value does not satisfy the
+ // Armijo sufficient decrease condition and interpolation method does not
+ // require it).
+ CHECK(bracket_high.value_is_valid)
+ << "Ceres bug: f_high input to Wolfe Zoom invalid, please "
+ << "contact the developers!, initial_position: " << initial_position
+ << ", bracket_low: " << bracket_low
+ << ", bracket_high: "<< bracket_high;
+ CHECK_LT(bracket_low.gradient *
+ (bracket_high.x - bracket_low.x), 0.0)
+ << "Ceres bug: f_high input to Wolfe Zoom does not satisfy gradient "
+ << "condition combined with f_low, please contact the developers!"
+ << ", initial_position: " << initial_position
+ << ", bracket_low: " << bracket_low
+ << ", bracket_high: "<< bracket_high;
+
+ const int num_bracketing_iterations = summary->num_iterations;
+ const bool interpolation_uses_gradients =
+ options().interpolation_type == CUBIC;
+ const double descent_direction_max_norm =
+ static_cast<const LineSearchFunction*>(function)->DirectionInfinityNorm();
+
+ while (true) {
+ // Set solution to bracket_low, as it is our best step size (smallest f())
+ // found thus far and satisfies the Armijo condition, even though it does
+ // not satisfy the Wolfe condition.
+ *solution = bracket_low;
+ if (summary->num_iterations >= options().max_num_iterations) {
+ summary->error =
+ StringPrintf("Line search failed: Wolfe zoom phase failed to "
+ "find a point satisfying strong Wolfe conditions "
+ "within specified max_num_iterations: %d, "
+ "(num iterations taken for bracketing: %d).",
+ options().max_num_iterations, num_bracketing_iterations);
+ LOG(WARNING) << summary->error;
+ return false;
+ }
+ if (fabs(bracket_high.x - bracket_low.x) * descent_direction_max_norm
+ < options().min_step_size) {
+ // Bracket width has been reduced below tolerance, and no point satisfying
+ // the strong Wolfe conditions has been found.
+ summary->error =
+ StringPrintf("Line search failed: Wolfe zoom bracket width: %.5e "
+ "too small with descent_direction_max_norm: %.5e.",
+ fabs(bracket_high.x - bracket_low.x),
+ descent_direction_max_norm);
+ LOG(WARNING) << summary->error;
+ return false;
+ }
+
+ ++summary->num_iterations;
+ // Polynomial interpolation requires inputs ordered according to step size,
+ // not f(step size).
+ const FunctionSample& lower_bound_step =
+ bracket_low.x < bracket_high.x ? bracket_low : bracket_high;
+ const FunctionSample& upper_bound_step =
+ bracket_low.x < bracket_high.x ? bracket_high : bracket_low;
+ // We are performing 2-point interpolation only here, but the API of
+ // InterpolatingPolynomialMinimizingStepSize() allows for up to
+ // 3-point interpolation, so pad call with a sample with an invalid
+ // value that will therefore be ignored.
+ const FunctionSample unused_previous;
+ DCHECK(!unused_previous.value_is_valid);
+ solution->x =
+ this->InterpolatingPolynomialMinimizingStepSize(
+ options().interpolation_type,
+ lower_bound_step,
+ unused_previous,
+ upper_bound_step,
+ lower_bound_step.x,
+ upper_bound_step.x);
+ // No check on magnitude of step size being too small here as it is
+ // lower-bounded by the initial bracket start point, which was valid.
+ ++summary->num_function_evaluations;
+ if (interpolation_uses_gradients) { ++summary->num_gradient_evaluations; }
+ solution->value_is_valid =
+ function->Evaluate(solution->x,
+ &solution->value,
+ interpolation_uses_gradients
+ ? &solution->gradient : NULL);
+ solution->gradient_is_valid =
+ interpolation_uses_gradients && solution->value_is_valid;
+ if (!solution->value_is_valid) {
+ summary->error =
+ StringPrintf("Line search failed: Wolfe Zoom phase found "
+ "step_size: %.5e, for which function is invalid, "
+ "between low_step: %.5e and high_step: %.5e "
+ "at which function is valid.",
+ solution->x, bracket_low.x, bracket_high.x);
+ LOG(WARNING) << summary->error;
+ return false;
+ }
+
+ if ((solution->value > (initial_position.value
+ + options().sufficient_decrease
+ * initial_position.gradient
+ * solution->x)) ||
+ (solution->value >= bracket_low.value)) {
+ // Armijo sufficient decrease not satisfied, or not better
+ // than current lowest sample, use as new upper bound.
+ bracket_high = *solution;
+ continue;
+ }
+
+ // Armijo sufficient decrease satisfied, check strong Wolfe condition.
+ if (!interpolation_uses_gradients) {
+ // Irrespective of the interpolation type we are using, we now need the
+ // gradient at the current point (which satisfies the Armijo condition)
+ // in order to check the strong Wolfe conditions.
+ ++summary->num_function_evaluations;
+ ++summary->num_gradient_evaluations;
+ solution->value_is_valid =
+ function->Evaluate(solution->x,
+ &solution->value,
+ &solution->gradient);
+ solution->gradient_is_valid = solution->value_is_valid;
+ if (!solution->value_is_valid) {
+ summary->error =
+ StringPrintf("Line search failed: Wolfe Zoom phase found "
+ "step_size: %.5e, for which function is invalid, "
+ "between low_step: %.5e and high_step: %.5e "
+ "at which function is valid.",
+ solution->x, bracket_low.x, bracket_high.x);
+ LOG(WARNING) << summary->error;
+ return false;
+ }
+ }
+ if (fabs(solution->gradient) <=
+ -options().sufficient_curvature_decrease * initial_position.gradient) {
+ // Found a valid termination point satisfying strong Wolfe conditions.
+ break;
+
+ } else if (solution->gradient * (bracket_high.x - bracket_low.x) >= 0) {
+ bracket_high = bracket_low;
+ }
+
+ bracket_low = *solution;
+ }
+ // Solution contains a valid point which satisfies the strong Wolfe
+ // conditions.
+ return true;
+}
+
} // namespace internal
} // namespace ceres
diff --git a/extern/libmv/third_party/ceres/internal/ceres/line_search.h b/extern/libmv/third_party/ceres/internal/ceres/line_search.h
index 95bf56e2a6b..5f24e9fd76e 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/line_search.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/line_search.h
@@ -35,15 +35,17 @@
#ifndef CERES_NO_LINE_SEARCH_MINIMIZER
-#include <glog/logging.h>
+#include <string>
#include <vector>
#include "ceres/internal/eigen.h"
#include "ceres/internal/port.h"
+#include "ceres/types.h"
namespace ceres {
namespace internal {
class Evaluator;
+struct FunctionSample;
// Line search is another name for a one dimensional optimization
// algorithm. The name "line search" comes from the fact one
@@ -61,32 +63,21 @@ class LineSearch {
struct Options {
Options()
- : interpolation_degree(1),
- use_higher_degree_interpolation_when_possible(false),
+ : interpolation_type(CUBIC),
sufficient_decrease(1e-4),
- min_relative_step_size_change(1e-3),
- max_relative_step_size_change(0.6),
- step_size_threshold(1e-9),
+ max_step_contraction(1e-3),
+ min_step_contraction(0.9),
+ min_step_size(1e-9),
+ max_num_iterations(20),
+ sufficient_curvature_decrease(0.9),
+ max_step_expansion(10.0),
function(NULL) {}
- // TODO(sameeragarwal): Replace this with enums which are common
- // across various line searches.
- //
// Degree of the polynomial used to approximate the objective
- // function. Valid values are {0, 1, 2}.
- //
- // For Armijo line search
- //
- // 0: Bisection based backtracking search.
- // 1: Quadratic interpolation.
- // 2: Cubic interpolation.
- int interpolation_degree;
-
- // Usually its possible to increase the degree of the
- // interpolation polynomial by storing and using an extra point.
- bool use_higher_degree_interpolation_when_possible;
+ // function.
+ LineSearchInterpolationType interpolation_type;
- // Armijo line search parameters.
+ // Armijo and Wolfe line search parameters.
// Solving the line search problem exactly is computationally
// prohibitive. Fortunately, line search based optimization
@@ -99,19 +90,59 @@ class LineSearch {
// f(step_size) <= f(0) + sufficient_decrease * f'(0) * step_size
double sufficient_decrease;
- // In each iteration of the Armijo line search,
+ // In each iteration of the Armijo / Wolfe line search,
+ //
+ // new_step_size >= max_step_contraction * step_size
+ //
+ // Note that by definition, for contraction:
+ //
+ // 0 < max_step_contraction < min_step_contraction < 1
//
- // new_step_size >= min_relative_step_size_change * step_size
- double min_relative_step_size_change;
+ double max_step_contraction;
- // In each iteration of the Armijo line search,
+ // In each iteration of the Armijo / Wolfe line search,
//
- // new_step_size <= max_relative_step_size_change * step_size
- double max_relative_step_size_change;
+ // new_step_size <= min_step_contraction * step_size
+ // Note that by definition, for contraction:
+ //
+ // 0 < max_step_contraction < min_step_contraction < 1
+ //
+ double min_step_contraction;
// If during the line search, the step_size falls below this
// value, it is truncated to zero.
- double step_size_threshold;
+ double min_step_size;
+
+ // Maximum number of trial step size iterations during each line search,
+ // if a step size satisfying the search conditions cannot be found within
+ // this number of trials, the line search will terminate.
+ int max_num_iterations;
+
+ // Wolfe-specific line search parameters.
+
+ // The strong Wolfe conditions consist of the Armijo sufficient
+ // decrease condition, and an additional requirement that the
+ // step-size be chosen s.t. the _magnitude_ ('strong' Wolfe
+ // conditions) of the gradient along the search direction
+ // decreases sufficiently. Precisely, this second condition
+ // is that we seek a step_size s.t.
+ //
+ // |f'(step_size)| <= sufficient_curvature_decrease * |f'(0)|
+ //
+ // Where f() is the line search objective and f'() is the derivative
+ // of f w.r.t step_size (d f / d step_size).
+ double sufficient_curvature_decrease;
+
+ // During the bracketing phase of the Wolfe search, the step size is
+ // increased until either a point satisfying the Wolfe conditions is
+ // found, or an upper bound for a bracket containing a point satisfying
+ // the conditions is found. Precisely, at each iteration of the
+ // expansion:
+ //
+ // new_step_size <= max_step_expansion * step_size.
+ //
+ // By definition for expansion, max_step_expansion > 1.0.
+ double max_step_expansion;
// The one dimensional function that the line search algorithm
// minimizes.
@@ -147,18 +178,28 @@ class LineSearch {
Summary()
: success(false),
optimal_step_size(0.0),
- num_evaluations(0) {}
+ num_function_evaluations(0),
+ num_gradient_evaluations(0),
+ num_iterations(0) {}
bool success;
double optimal_step_size;
- int num_evaluations;
+ int num_function_evaluations;
+ int num_gradient_evaluations;
+ int num_iterations;
+ string error;
};
+ explicit LineSearch(const LineSearch::Options& options);
virtual ~LineSearch() {}
+ static LineSearch* Create(const LineSearchType line_search_type,
+ const LineSearch::Options& options,
+ string* error);
+
// Perform the line search.
//
- // initial_step_size must be a positive number.
+ // step_size_estimate must be a positive number.
//
// initial_cost and initial_gradient are the values and gradient of
// the function at zero.
@@ -166,11 +207,23 @@ class LineSearch {
// search.
//
// Summary::success is true if a non-zero step size is found.
- virtual void Search(const LineSearch::Options& options,
- double initial_step_size,
+ virtual void Search(double step_size_estimate,
double initial_cost,
double initial_gradient,
Summary* summary) = 0;
+ double InterpolatingPolynomialMinimizingStepSize(
+ const LineSearchInterpolationType& interpolation_type,
+ const FunctionSample& lowerbound_sample,
+ const FunctionSample& previous_sample,
+ const FunctionSample& current_sample,
+ const double min_step_size,
+ const double max_step_size) const;
+
+ protected:
+ const LineSearch::Options& options() const { return options_; }
+
+ private:
+ LineSearch::Options options_;
};
class LineSearchFunction : public LineSearch::Function {
@@ -178,7 +231,8 @@ class LineSearchFunction : public LineSearch::Function {
explicit LineSearchFunction(Evaluator* evaluator);
virtual ~LineSearchFunction() {}
void Init(const Vector& position, const Vector& direction);
- virtual bool Evaluate(const double x, double* f, double* g);
+ virtual bool Evaluate(double x, double* f, double* g);
+ double DirectionInfinityNorm() const;
private:
Evaluator* evaluator_;
@@ -200,12 +254,42 @@ class LineSearchFunction : public LineSearch::Function {
// For more details: http://www.di.ens.fr/~mschmidt/Software/minFunc.html
class ArmijoLineSearch : public LineSearch {
public:
+ explicit ArmijoLineSearch(const LineSearch::Options& options);
virtual ~ArmijoLineSearch() {}
- virtual void Search(const LineSearch::Options& options,
- double initial_step_size,
+ virtual void Search(double step_size_estimate,
+ double initial_cost,
+ double initial_gradient,
+ Summary* summary);
+};
+
+// Bracketing / Zoom Strong Wolfe condition line search. This implementation
+// is based on the pseudo-code algorithm presented in Nocedal & Wright [1]
+// (p60-61) with inspiration from the WolfeLineSearch which ships with the
+// minFunc package by Mark Schmidt [2].
+//
+// [1] Nocedal J., Wright S., Numerical Optimization, 2nd Ed., Springer, 1999.
+// [2] http://www.di.ens.fr/~mschmidt/Software/minFunc.html.
+class WolfeLineSearch : public LineSearch {
+ public:
+ explicit WolfeLineSearch(const LineSearch::Options& options);
+ virtual ~WolfeLineSearch() {}
+ virtual void Search(double step_size_estimate,
double initial_cost,
double initial_gradient,
Summary* summary);
+ // Returns true iff either a valid point, or valid bracket are found.
+ bool BracketingPhase(const FunctionSample& initial_position,
+ const double step_size_estimate,
+ FunctionSample* bracket_low,
+ FunctionSample* bracket_high,
+ bool* perform_zoom_search,
+ Summary* summary);
+ // Returns true iff final_line_sample satisfies strong Wolfe conditions.
+ bool ZoomPhase(const FunctionSample& initial_position,
+ FunctionSample bracket_low,
+ FunctionSample bracket_high,
+ FunctionSample* solution,
+ Summary* summary);
};
} // namespace internal
diff --git a/extern/libmv/third_party/ceres/internal/ceres/line_search_direction.cc b/extern/libmv/third_party/ceres/internal/ceres/line_search_direction.cc
index b8b582c3fb1..8ded823e5bd 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/line_search_direction.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/line_search_direction.cc
@@ -100,14 +100,24 @@ class NonlinearConjugateGradient : public LineSearchDirection {
class LBFGS : public LineSearchDirection {
public:
- LBFGS(const int num_parameters, const int max_lbfgs_rank)
- : low_rank_inverse_hessian_(num_parameters, max_lbfgs_rank) {}
+ LBFGS(const int num_parameters,
+ const int max_lbfgs_rank,
+ const bool use_approximate_eigenvalue_bfgs_scaling)
+ : low_rank_inverse_hessian_(num_parameters,
+ max_lbfgs_rank,
+ use_approximate_eigenvalue_bfgs_scaling),
+ is_positive_definite_(true) {}
virtual ~LBFGS() {}
bool NextDirection(const LineSearchMinimizer::State& previous,
const LineSearchMinimizer::State& current,
Vector* search_direction) {
+ CHECK(is_positive_definite_)
+ << "Ceres bug: NextDirection() called on L-BFGS after inverse Hessian "
+ << "approximation has become indefinite, please contact the "
+ << "developers!";
+
low_rank_inverse_hessian_.Update(
previous.search_direction * previous.step_size,
current.gradient - previous.gradient);
@@ -115,11 +125,177 @@ class LBFGS : public LineSearchDirection {
low_rank_inverse_hessian_.RightMultiply(current.gradient.data(),
search_direction->data());
*search_direction *= -1.0;
+
+ if (search_direction->dot(current.gradient) >= 0.0) {
+ LOG(WARNING) << "Numerical failure in L-BFGS update: inverse Hessian "
+ << "approximation is not positive definite, and thus "
+ << "initial gradient for search direction is positive: "
+ << search_direction->dot(current.gradient);
+ is_positive_definite_ = false;
+ return false;
+ }
+
return true;
}
private:
LowRankInverseHessian low_rank_inverse_hessian_;
+ bool is_positive_definite_;
+};
+
+class BFGS : public LineSearchDirection {
+ public:
+ BFGS(const int num_parameters,
+ const bool use_approximate_eigenvalue_scaling)
+ : num_parameters_(num_parameters),
+ use_approximate_eigenvalue_scaling_(use_approximate_eigenvalue_scaling),
+ initialized_(false),
+ is_positive_definite_(true) {
+ LOG_IF(WARNING, num_parameters_ >= 1e3)
+ << "BFGS line search being created with: " << num_parameters_
+ << " parameters, this will allocate a dense approximate inverse Hessian"
+ << " of size: " << num_parameters_ << " x " << num_parameters_
+ << ", consider using the L-BFGS memory-efficient line search direction "
+ << "instead.";
+ // Construct inverse_hessian_ after logging warning about size s.t. if the
+ // allocation crashes us, the log will highlight what the issue likely was.
+ inverse_hessian_ = Matrix::Identity(num_parameters, num_parameters);
+ }
+
+ virtual ~BFGS() {}
+
+ bool NextDirection(const LineSearchMinimizer::State& previous,
+ const LineSearchMinimizer::State& current,
+ Vector* search_direction) {
+ CHECK(is_positive_definite_)
+ << "Ceres bug: NextDirection() called on BFGS after inverse Hessian "
+ << "approximation has become indefinite, please contact the "
+ << "developers!";
+
+ const Vector delta_x = previous.search_direction * previous.step_size;
+ const Vector delta_gradient = current.gradient - previous.gradient;
+ const double delta_x_dot_delta_gradient = delta_x.dot(delta_gradient);
+
+ if (delta_x_dot_delta_gradient <= 1e-10) {
+ VLOG(2) << "Skipping BFGS Update, delta_x_dot_delta_gradient too "
+ << "small: " << delta_x_dot_delta_gradient;
+ } else {
+ // Update dense inverse Hessian approximation.
+
+ if (!initialized_ && use_approximate_eigenvalue_scaling_) {
+ // Rescale the initial inverse Hessian approximation (H_0) to be
+ // iteratively updated so that it is of similar 'size' to the true
+ // inverse Hessian at the start point. As shown in [1]:
+ //
+ // \gamma = (delta_gradient_{0}' * delta_x_{0}) /
+ // (delta_gradient_{0}' * delta_gradient_{0})
+ //
+ // Satisfies:
+ //
+ // (1 / \lambda_m) <= \gamma <= (1 / \lambda_1)
+ //
+ // Where \lambda_1 & \lambda_m are the smallest and largest eigenvalues
+ // of the true initial Hessian (not the inverse) respectively. Thus,
+ // \gamma is an approximate eigenvalue of the true inverse Hessian, and
+ // choosing: H_0 = I * \gamma will yield a starting point that has a
+ // similar scale to the true inverse Hessian. This technique is widely
+ // reported to often improve convergence, however this is not
+ // universally true, particularly if there are errors in the initial
+ // gradients, or if there are significant differences in the sensitivity
+ // of the problem to the parameters (i.e. the range of the magnitudes of
+ // the components of the gradient is large).
+ //
+ // The original origin of this rescaling trick is somewhat unclear, the
+ // earliest reference appears to be Oren [1], however it is widely
+ // discussed without specific attributation in various texts including
+ // [2] (p143).
+ //
+ // [1] Oren S.S., Self-scaling variable metric (SSVM) algorithms
+ // Part II: Implementation and experiments, Management Science,
+ // 20(5), 863-874, 1974.
+ // [2] Nocedal J., Wright S., Numerical Optimization, Springer, 1999.
+ inverse_hessian_ *=
+ delta_x_dot_delta_gradient / delta_gradient.dot(delta_gradient);
+ }
+ initialized_ = true;
+
+ // Efficient O(num_parameters^2) BFGS update [2].
+ //
+ // Starting from dense BFGS update detailed in Nocedal [2] p140/177 and
+ // using: y_k = delta_gradient, s_k = delta_x:
+ //
+ // \rho_k = 1.0 / (s_k' * y_k)
+ // V_k = I - \rho_k * y_k * s_k'
+ // H_k = (V_k' * H_{k-1} * V_k) + (\rho_k * s_k * s_k')
+ //
+ // This update involves matrix, matrix products which naively O(N^3),
+ // however we can exploit our knowledge that H_k is positive definite
+ // and thus by defn. symmetric to reduce the cost of the update:
+ //
+ // Expanding the update above yields:
+ //
+ // H_k = H_{k-1} +
+ // \rho_k * ( (1.0 + \rho_k * y_k' * H_k * y_k) * s_k * s_k' -
+ // (s_k * y_k' * H_k + H_k * y_k * s_k') )
+ //
+ // Using: A = (s_k * y_k' * H_k), and the knowledge that H_k = H_k', the
+ // last term simplifies to (A + A'). Note that although A is not symmetric
+ // (A + A') is symmetric. For ease of construction we also define
+ // B = (1 + \rho_k * y_k' * H_k * y_k) * s_k * s_k', which is by defn
+ // symmetric due to construction from: s_k * s_k'.
+ //
+ // Now we can write the BFGS update as:
+ //
+ // H_k = H_{k-1} + \rho_k * (B - (A + A'))
+
+ // For efficiency, as H_k is by defn. symmetric, we will only maintain the
+ // *lower* triangle of H_k (and all intermediary terms).
+
+ const double rho_k = 1.0 / delta_x_dot_delta_gradient;
+
+ // Calculate: A = s_k * y_k' * H_k
+ Matrix A = delta_x * (delta_gradient.transpose() *
+ inverse_hessian_.selfadjointView<Eigen::Lower>());
+
+ // Calculate scalar: (1 + \rho_k * y_k' * H_k * y_k)
+ const double delta_x_times_delta_x_transpose_scale_factor =
+ (1.0 + (rho_k * delta_gradient.transpose() *
+ inverse_hessian_.selfadjointView<Eigen::Lower>() *
+ delta_gradient));
+ // Calculate: B = (1 + \rho_k * y_k' * H_k * y_k) * s_k * s_k'
+ Matrix B = Matrix::Zero(num_parameters_, num_parameters_);
+ B.selfadjointView<Eigen::Lower>().
+ rankUpdate(delta_x, delta_x_times_delta_x_transpose_scale_factor);
+
+ // Finally, update inverse Hessian approximation according to:
+ // H_k = H_{k-1} + \rho_k * (B - (A + A')). Note that (A + A') is
+ // symmetric, even though A is not.
+ inverse_hessian_.triangularView<Eigen::Lower>() +=
+ rho_k * (B - A - A.transpose());
+ }
+
+ *search_direction =
+ inverse_hessian_.selfadjointView<Eigen::Lower>() *
+ (-1.0 * current.gradient);
+
+ if (search_direction->dot(current.gradient) >= 0.0) {
+ LOG(WARNING) << "Numerical failure in BFGS update: inverse Hessian "
+ << "approximation is not positive definite, and thus "
+ << "initial gradient for search direction is positive: "
+ << search_direction->dot(current.gradient);
+ is_positive_definite_ = false;
+ return false;
+ }
+
+ return true;
+ }
+
+ private:
+ const int num_parameters_;
+ const bool use_approximate_eigenvalue_scaling_;
+ Matrix inverse_hessian_;
+ bool initialized_;
+ bool is_positive_definite_;
};
LineSearchDirection*
@@ -135,8 +311,16 @@ LineSearchDirection::Create(const LineSearchDirection::Options& options) {
}
if (options.type == ceres::LBFGS) {
- return new ceres::internal::LBFGS(options.num_parameters,
- options.max_lbfgs_rank);
+ return new ceres::internal::LBFGS(
+ options.num_parameters,
+ options.max_lbfgs_rank,
+ options.use_approximate_eigenvalue_bfgs_scaling);
+ }
+
+ if (options.type == ceres::BFGS) {
+ return new ceres::internal::BFGS(
+ options.num_parameters,
+ options.use_approximate_eigenvalue_bfgs_scaling);
}
LOG(ERROR) << "Unknown line search direction type: " << options.type;
diff --git a/extern/libmv/third_party/ceres/internal/ceres/line_search_direction.h b/extern/libmv/third_party/ceres/internal/ceres/line_search_direction.h
index 08747544bbe..0857cb005f9 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/line_search_direction.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/line_search_direction.h
@@ -48,7 +48,8 @@ class LineSearchDirection {
type(LBFGS),
nonlinear_conjugate_gradient_type(FLETCHER_REEVES),
function_tolerance(1e-12),
- max_lbfgs_rank(20) {
+ max_lbfgs_rank(20),
+ use_approximate_eigenvalue_bfgs_scaling(true) {
}
int num_parameters;
@@ -56,6 +57,7 @@ class LineSearchDirection {
NonlinearConjugateGradientType nonlinear_conjugate_gradient_type;
double function_tolerance;
int max_lbfgs_rank;
+ bool use_approximate_eigenvalue_bfgs_scaling;
};
static LineSearchDirection* Create(const Options& options);
diff --git a/extern/libmv/third_party/ceres/internal/ceres/line_search_minimizer.cc b/extern/libmv/third_party/ceres/internal/ceres/line_search_minimizer.cc
index 684a7369b3a..2cc89faf4c4 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/line_search_minimizer.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/line_search_minimizer.cc
@@ -160,17 +160,44 @@ void LineSearchMinimizer::Minimize(const Minimizer::Options& options,
line_search_direction_options.nonlinear_conjugate_gradient_type =
options.nonlinear_conjugate_gradient_type;
line_search_direction_options.max_lbfgs_rank = options.max_lbfgs_rank;
+ line_search_direction_options.use_approximate_eigenvalue_bfgs_scaling =
+ options.use_approximate_eigenvalue_bfgs_scaling;
scoped_ptr<LineSearchDirection> line_search_direction(
LineSearchDirection::Create(line_search_direction_options));
LineSearchFunction line_search_function(evaluator);
+
LineSearch::Options line_search_options;
+ line_search_options.interpolation_type =
+ options.line_search_interpolation_type;
+ line_search_options.min_step_size = options.min_line_search_step_size;
+ line_search_options.sufficient_decrease =
+ options.line_search_sufficient_function_decrease;
+ line_search_options.max_step_contraction =
+ options.max_line_search_step_contraction;
+ line_search_options.min_step_contraction =
+ options.min_line_search_step_contraction;
+ line_search_options.max_num_iterations =
+ options.max_num_line_search_step_size_iterations;
+ line_search_options.sufficient_curvature_decrease =
+ options.line_search_sufficient_curvature_decrease;
+ line_search_options.max_step_expansion =
+ options.max_line_search_step_expansion;
line_search_options.function = &line_search_function;
- // TODO(sameeragarwal): Make this parameterizable over different
- // line searches.
- ArmijoLineSearch line_search;
+ scoped_ptr<LineSearch>
+ line_search(LineSearch::Create(options.line_search_type,
+ line_search_options,
+ &summary->error));
+ if (line_search.get() == NULL) {
+ LOG(ERROR) << "Ceres bug: Unable to create a LineSearch object, please "
+ << "contact the developers!, error: " << summary->error;
+ summary->termination_type = DID_NOT_RUN;
+ return;
+ }
+
LineSearch::Summary line_search_summary;
+ int num_line_search_direction_restarts = 0;
while (true) {
if (!RunCallbacks(options.callbacks, iteration_summary, summary)) {
@@ -194,6 +221,8 @@ void LineSearchMinimizer::Minimize(const Minimizer::Options& options,
iteration_summary = IterationSummary();
iteration_summary.iteration = summary->iterations.back().iteration + 1;
+ iteration_summary.step_is_valid = false;
+ iteration_summary.step_is_successful = false;
bool line_search_status = true;
if (iteration_summary.iteration == 1) {
@@ -205,9 +234,36 @@ void LineSearchMinimizer::Minimize(const Minimizer::Options& options,
&current_state.search_direction);
}
- if (!line_search_status) {
- LOG(WARNING) << "Line search direction computation failed. "
- "Resorting to steepest descent.";
+ if (!line_search_status &&
+ num_line_search_direction_restarts >=
+ options.max_num_line_search_direction_restarts) {
+ // Line search direction failed to generate a new direction, and we
+ // have already reached our specified maximum number of restarts,
+ // terminate optimization.
+ summary->error =
+ StringPrintf("Line search direction failure: specified "
+ "max_num_line_search_direction_restarts: %d reached.",
+ options.max_num_line_search_direction_restarts);
+ LOG(WARNING) << summary->error << " terminating optimization.";
+ summary->termination_type = NUMERICAL_FAILURE;
+ break;
+
+ } else if (!line_search_status) {
+ // Restart line search direction with gradient descent on first iteration
+ // as we have not yet reached our maximum number of restarts.
+ CHECK_LT(num_line_search_direction_restarts,
+ options.max_num_line_search_direction_restarts);
+
+ ++num_line_search_direction_restarts;
+ LOG(WARNING)
+ << "Line search direction algorithm: "
+ << LineSearchDirectionTypeToString(options.line_search_direction_type)
+ << ", failed to produce a valid new direction at iteration: "
+ << iteration_summary.iteration << ". Restarting, number of "
+ << "restarts: " << num_line_search_direction_restarts << " / "
+ << options.max_num_line_search_direction_restarts << " [max].";
+ line_search_direction.reset(
+ LineSearchDirection::Create(line_search_direction_options));
current_state.search_direction = -current_state.gradient;
}
@@ -217,21 +273,41 @@ void LineSearchMinimizer::Minimize(const Minimizer::Options& options,
// TODO(sameeragarwal): Refactor this into its own object and add
// explanations for the various choices.
- const double initial_step_size = (iteration_summary.iteration == 1)
+ //
+ // Note that we use !line_search_status to ensure that we treat cases when
+ // we restarted the line search direction equivalently to the first
+ // iteration.
+ const double initial_step_size =
+ (iteration_summary.iteration == 1 || !line_search_status)
? min(1.0, 1.0 / current_state.gradient_max_norm)
: min(1.0, 2.0 * (current_state.cost - previous_state.cost) /
current_state.directional_derivative);
+ // By definition, we should only ever go forwards along the specified search
+ // direction in a line search, most likely cause for this being violated
+ // would be a numerical failure in the line search direction calculation.
+ if (initial_step_size < 0.0) {
+ summary->error =
+ StringPrintf("Numerical failure in line search, initial_step_size is "
+ "negative: %.5e, directional_derivative: %.5e, "
+ "(current_cost - previous_cost): %.5e",
+ initial_step_size, current_state.directional_derivative,
+ (current_state.cost - previous_state.cost));
+ LOG(WARNING) << summary->error;
+ summary->termination_type = NUMERICAL_FAILURE;
+ break;
+ }
- line_search.Search(line_search_options,
- initial_step_size,
- current_state.cost,
- current_state.directional_derivative,
- &line_search_summary);
+ line_search->Search(initial_step_size,
+ current_state.cost,
+ current_state.directional_derivative,
+ &line_search_summary);
current_state.step_size = line_search_summary.optimal_step_size;
delta = current_state.step_size * current_state.search_direction;
previous_state = current_state;
+ iteration_summary.step_solver_time_in_seconds =
+ WallTimeInSeconds() - iteration_start_time;
// TODO(sameeragarwal): Collect stats.
if (!evaluator->Plus(x.data(), delta.data(), x_plus_delta.data()) ||
@@ -270,7 +346,11 @@ void LineSearchMinimizer::Minimize(const Minimizer::Options& options,
iteration_summary.step_norm = delta.norm();
iteration_summary.step_size = current_state.step_size;
iteration_summary.line_search_function_evaluations =
- line_search_summary.num_evaluations;
+ line_search_summary.num_function_evaluations;
+ iteration_summary.line_search_gradient_evaluations =
+ line_search_summary.num_gradient_evaluations;
+ iteration_summary.line_search_iterations =
+ line_search_summary.num_iterations;
iteration_summary.iteration_time_in_seconds =
WallTimeInSeconds() - iteration_start_time;
iteration_summary.cumulative_time_in_seconds =
@@ -278,6 +358,7 @@ void LineSearchMinimizer::Minimize(const Minimizer::Options& options,
+ summary->preprocessor_time_in_seconds;
summary->iterations.push_back(iteration_summary);
+ ++summary->num_successful_steps;
}
}
diff --git a/extern/libmv/third_party/ceres/internal/ceres/linear_least_squares_problems.cc b/extern/libmv/third_party/ceres/internal/ceres/linear_least_squares_problems.cc
index 6c886a1be38..24ba565daf9 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/linear_least_squares_problems.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/linear_least_squares_problems.cc
@@ -36,10 +36,8 @@
#include "ceres/block_sparse_matrix.h"
#include "ceres/block_structure.h"
#include "ceres/casts.h"
-#include "ceres/compressed_row_sparse_matrix.h"
#include "ceres/file.h"
#include "ceres/internal/scoped_ptr.h"
-#include "ceres/matrix_proto.h"
#include "ceres/stringprintf.h"
#include "ceres/triplet_sparse_matrix.h"
#include "ceres/types.h"
@@ -64,74 +62,6 @@ LinearLeastSquaresProblem* CreateLinearLeastSquaresProblemFromId(int id) {
return NULL;
}
-#ifndef CERES_NO_PROTOCOL_BUFFERS
-LinearLeastSquaresProblem* CreateLinearLeastSquaresProblemFromFile(
- const string& filename) {
- LinearLeastSquaresProblemProto problem_proto;
- {
- string serialized_proto;
- ReadFileToStringOrDie(filename, &serialized_proto);
- CHECK(problem_proto.ParseFromString(serialized_proto));
- }
-
- LinearLeastSquaresProblem* problem = new LinearLeastSquaresProblem;
- const SparseMatrixProto& A = problem_proto.a();
-
- if (A.has_block_matrix()) {
- problem->A.reset(new BlockSparseMatrix(A));
- } else if (A.has_triplet_matrix()) {
- problem->A.reset(new TripletSparseMatrix(A));
- } else {
- problem->A.reset(new CompressedRowSparseMatrix(A));
- }
-
- if (problem_proto.b_size() > 0) {
- problem->b.reset(new double[problem_proto.b_size()]);
- for (int i = 0; i < problem_proto.b_size(); ++i) {
- problem->b[i] = problem_proto.b(i);
- }
- }
-
- if (problem_proto.d_size() > 0) {
- problem->D.reset(new double[problem_proto.d_size()]);
- for (int i = 0; i < problem_proto.d_size(); ++i) {
- problem->D[i] = problem_proto.d(i);
- }
- }
-
- if (problem_proto.d_size() > 0) {
- if (problem_proto.x_size() > 0) {
- problem->x_D.reset(new double[problem_proto.x_size()]);
- for (int i = 0; i < problem_proto.x_size(); ++i) {
- problem->x_D[i] = problem_proto.x(i);
- }
- }
- } else {
- if (problem_proto.x_size() > 0) {
- problem->x.reset(new double[problem_proto.x_size()]);
- for (int i = 0; i < problem_proto.x_size(); ++i) {
- problem->x[i] = problem_proto.x(i);
- }
- }
- }
-
- problem->num_eliminate_blocks = 0;
- if (problem_proto.has_num_eliminate_blocks()) {
- problem->num_eliminate_blocks = problem_proto.num_eliminate_blocks();
- }
-
- return problem;
-}
-#else
-LinearLeastSquaresProblem* CreateLinearLeastSquaresProblemFromFile(
- const string& filename) {
- LOG(FATAL)
- << "Loading a least squares problem from disk requires "
- << "Ceres to be built with Protocol Buffers support.";
- return NULL;
-}
-#endif // CERES_NO_PROTOCOL_BUFFERS
-
/*
A = [1 2]
[3 4]
@@ -574,9 +504,7 @@ LinearLeastSquaresProblem* LinearLeastSquaresProblem3() {
}
namespace {
-bool DumpLinearLeastSquaresProblemToConsole(const string& directory,
- int iteration,
- const SparseMatrix* A,
+bool DumpLinearLeastSquaresProblemToConsole(const SparseMatrix* A,
const double* D,
const double* b,
const double* x,
@@ -601,61 +529,6 @@ bool DumpLinearLeastSquaresProblemToConsole(const string& directory,
return true;
};
-#ifndef CERES_NO_PROTOCOL_BUFFERS
-bool DumpLinearLeastSquaresProblemToProtocolBuffer(const string& directory,
- int iteration,
- const SparseMatrix* A,
- const double* D,
- const double* b,
- const double* x,
- int num_eliminate_blocks) {
- CHECK_NOTNULL(A);
- LinearLeastSquaresProblemProto lsqp;
- A->ToProto(lsqp.mutable_a());
-
- if (D != NULL) {
- for (int i = 0; i < A->num_cols(); ++i) {
- lsqp.add_d(D[i]);
- }
- }
-
- if (b != NULL) {
- for (int i = 0; i < A->num_rows(); ++i) {
- lsqp.add_b(b[i]);
- }
- }
-
- if (x != NULL) {
- for (int i = 0; i < A->num_cols(); ++i) {
- lsqp.add_x(x[i]);
- }
- }
-
- lsqp.set_num_eliminate_blocks(num_eliminate_blocks);
- string format_string = JoinPath(directory,
- "lm_iteration_%03d.lsqp");
- string filename =
- StringPrintf(format_string.c_str(), iteration);
- LOG(INFO) << "Dumping least squares problem for iteration " << iteration
- << " to disk. File: " << filename;
- WriteStringToFileOrDie(lsqp.SerializeAsString(), filename);
- return true;
-}
-#else
-bool DumpLinearLeastSquaresProblemToProtocolBuffer(const string& directory,
- int iteration,
- const SparseMatrix* A,
- const double* D,
- const double* b,
- const double* x,
- int num_eliminate_blocks) {
- LOG(ERROR) << "Dumping least squares problems is only "
- << "supported when Ceres is compiled with "
- << "protocol buffer support.";
- return false;
-}
-#endif
-
void WriteArrayToFileOrDie(const string& filename,
const double* x,
const int size) {
@@ -669,31 +542,25 @@ void WriteArrayToFileOrDie(const string& filename,
fclose(fptr);
}
-bool DumpLinearLeastSquaresProblemToTextFile(const string& directory,
- int iteration,
+bool DumpLinearLeastSquaresProblemToTextFile(const string& filename_base,
const SparseMatrix* A,
const double* D,
const double* b,
const double* x,
int num_eliminate_blocks) {
CHECK_NOTNULL(A);
- string format_string = JoinPath(directory,
- "lm_iteration_%03d");
- string filename_prefix =
- StringPrintf(format_string.c_str(), iteration);
-
- LOG(INFO) << "writing to: " << filename_prefix << "*";
+ LOG(INFO) << "writing to: " << filename_base << "*";
string matlab_script;
StringAppendF(&matlab_script,
- "function lsqp = lm_iteration_%03d()\n", iteration);
+ "function lsqp = load_trust_region_problem()\n");
StringAppendF(&matlab_script,
"lsqp.num_rows = %d;\n", A->num_rows());
StringAppendF(&matlab_script,
"lsqp.num_cols = %d;\n", A->num_cols());
{
- string filename = filename_prefix + "_A.txt";
+ string filename = filename_base + "_A.txt";
FILE* fptr = fopen(filename.c_str(), "w");
CHECK_NOTNULL(fptr);
A->ToTextFile(fptr);
@@ -709,34 +576,33 @@ bool DumpLinearLeastSquaresProblemToTextFile(const string& directory,
if (D != NULL) {
- string filename = filename_prefix + "_D.txt";
+ string filename = filename_base + "_D.txt";
WriteArrayToFileOrDie(filename, D, A->num_cols());
StringAppendF(&matlab_script,
"lsqp.D = load('%s', '-ascii');\n", filename.c_str());
}
if (b != NULL) {
- string filename = filename_prefix + "_b.txt";
+ string filename = filename_base + "_b.txt";
WriteArrayToFileOrDie(filename, b, A->num_rows());
StringAppendF(&matlab_script,
"lsqp.b = load('%s', '-ascii');\n", filename.c_str());
}
if (x != NULL) {
- string filename = filename_prefix + "_x.txt";
+ string filename = filename_base + "_x.txt";
WriteArrayToFileOrDie(filename, x, A->num_cols());
StringAppendF(&matlab_script,
"lsqp.x = load('%s', '-ascii');\n", filename.c_str());
}
- string matlab_filename = filename_prefix + ".m";
+ string matlab_filename = filename_base + ".m";
WriteStringToFileOrDie(matlab_script, matlab_filename);
return true;
}
} // namespace
-bool DumpLinearLeastSquaresProblem(const string& directory,
- int iteration,
+bool DumpLinearLeastSquaresProblem(const string& filename_base,
DumpFormatType dump_format_type,
const SparseMatrix* A,
const double* D,
@@ -745,19 +611,10 @@ bool DumpLinearLeastSquaresProblem(const string& directory,
int num_eliminate_blocks) {
switch (dump_format_type) {
case CONSOLE:
- return DumpLinearLeastSquaresProblemToConsole(directory,
- iteration,
- A, D, b, x,
+ return DumpLinearLeastSquaresProblemToConsole(A, D, b, x,
num_eliminate_blocks);
- case PROTOBUF:
- return DumpLinearLeastSquaresProblemToProtocolBuffer(
- directory,
- iteration,
- A, D, b, x,
- num_eliminate_blocks);
case TEXTFILE:
- return DumpLinearLeastSquaresProblemToTextFile(directory,
- iteration,
+ return DumpLinearLeastSquaresProblemToTextFile(filename_base,
A, D, b, x,
num_eliminate_blocks);
default:
diff --git a/extern/libmv/third_party/ceres/internal/ceres/linear_least_squares_problems.h b/extern/libmv/third_party/ceres/internal/ceres/linear_least_squares_problems.h
index c76ae91c7d8..fdeed70de62 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/linear_least_squares_problems.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/linear_least_squares_problems.h
@@ -63,8 +63,6 @@ struct LinearLeastSquaresProblem {
// Factories for linear least squares problem.
LinearLeastSquaresProblem* CreateLinearLeastSquaresProblemFromId(int id);
-LinearLeastSquaresProblem* CreateLinearLeastSquaresProblemFromFile(
- const string& filename);
LinearLeastSquaresProblem* LinearLeastSquaresProblem0();
LinearLeastSquaresProblem* LinearLeastSquaresProblem1();
@@ -73,8 +71,7 @@ LinearLeastSquaresProblem* LinearLeastSquaresProblem3();
// Write the linear least squares problem to disk. The exact format
// depends on dump_format_type.
-bool DumpLinearLeastSquaresProblem(const string& directory,
- int iteration,
+bool DumpLinearLeastSquaresProblem(const string& filename_base,
DumpFormatType dump_format_type,
const SparseMatrix* A,
const double* D,
diff --git a/extern/libmv/third_party/ceres/internal/ceres/linear_solver.h b/extern/libmv/third_party/ceres/internal/ceres/linear_solver.h
index ca10faa24b4..22691b33e44 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/linear_solver.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/linear_solver.h
@@ -36,6 +36,7 @@
#include <cstddef>
#include <map>
+#include <string>
#include <vector>
#include "ceres/block_sparse_matrix.h"
#include "ceres/casts.h"
@@ -73,7 +74,8 @@ class LinearSolver {
Options()
: type(SPARSE_NORMAL_CHOLESKY),
preconditioner_type(JACOBI),
- sparse_linear_algebra_library(SUITE_SPARSE),
+ dense_linear_algebra_library_type(EIGEN),
+ sparse_linear_algebra_library_type(SUITE_SPARSE),
use_postordering(false),
min_num_iterations(1),
max_num_iterations(1),
@@ -88,7 +90,8 @@ class LinearSolver {
PreconditionerType preconditioner_type;
- SparseLinearAlgebraLibraryType sparse_linear_algebra_library;
+ DenseLinearAlgebraLibraryType dense_linear_algebra_library_type;
+ SparseLinearAlgebraLibraryType sparse_linear_algebra_library_type;
// See solver.h for information about this flag.
bool use_postordering;
@@ -316,7 +319,6 @@ class TypedLinearSolver : public LinearSolver {
// Linear solvers that depend on acccess to the low level structure of
// a SparseMatrix.
typedef TypedLinearSolver<BlockSparseMatrix> BlockSparseMatrixSolver; // NOLINT
-typedef TypedLinearSolver<BlockSparseMatrixBase> BlockSparseMatrixBaseSolver; // NOLINT
typedef TypedLinearSolver<CompressedRowSparseMatrix> CompressedRowSparseMatrixSolver; // NOLINT
typedef TypedLinearSolver<DenseSparseMatrix> DenseSparseMatrixSolver; // NOLINT
typedef TypedLinearSolver<TripletSparseMatrix> TripletSparseMatrixSolver; // NOLINT
diff --git a/extern/libmv/third_party/ceres/internal/ceres/low_rank_inverse_hessian.cc b/extern/libmv/third_party/ceres/internal/ceres/low_rank_inverse_hessian.cc
index 3fe113f1afb..372165f9523 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/low_rank_inverse_hessian.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/low_rank_inverse_hessian.cc
@@ -35,12 +35,15 @@
namespace ceres {
namespace internal {
-LowRankInverseHessian::LowRankInverseHessian(int num_parameters,
- int max_num_corrections)
+LowRankInverseHessian::LowRankInverseHessian(
+ int num_parameters,
+ int max_num_corrections,
+ bool use_approximate_eigenvalue_scaling)
: num_parameters_(num_parameters),
max_num_corrections_(max_num_corrections),
+ use_approximate_eigenvalue_scaling_(use_approximate_eigenvalue_scaling),
num_corrections_(0),
- diagonal_(1.0),
+ approximate_eigenvalue_scale_(1.0),
delta_x_history_(num_parameters, max_num_corrections),
delta_gradient_history_(num_parameters, max_num_corrections),
delta_x_dot_delta_gradient_(max_num_corrections) {
@@ -50,7 +53,8 @@ bool LowRankInverseHessian::Update(const Vector& delta_x,
const Vector& delta_gradient) {
const double delta_x_dot_delta_gradient = delta_x.dot(delta_gradient);
if (delta_x_dot_delta_gradient <= 1e-10) {
- VLOG(2) << "Skipping LBFGS Update. " << delta_x_dot_delta_gradient;
+ VLOG(2) << "Skipping LBFGS Update, delta_x_dot_delta_gradient too small: "
+ << delta_x_dot_delta_gradient;
return false;
}
@@ -58,16 +62,16 @@ bool LowRankInverseHessian::Update(const Vector& delta_x,
// TODO(sameeragarwal): This can be done more efficiently using
// a circular buffer/indexing scheme, but for simplicity we will
// do the expensive copy for now.
- delta_x_history_.block(0, 0, num_parameters_, max_num_corrections_ - 2) =
+ delta_x_history_.block(0, 0, num_parameters_, max_num_corrections_ - 1) =
delta_x_history_
.block(0, 1, num_parameters_, max_num_corrections_ - 1);
delta_gradient_history_
- .block(0, 0, num_parameters_, max_num_corrections_ - 2) =
+ .block(0, 0, num_parameters_, max_num_corrections_ - 1) =
delta_gradient_history_
.block(0, 1, num_parameters_, max_num_corrections_ - 1);
- delta_x_dot_delta_gradient_.head(num_corrections_ - 2) =
+ delta_x_dot_delta_gradient_.head(num_corrections_ - 1) =
delta_x_dot_delta_gradient_.tail(num_corrections_ - 1);
} else {
++num_corrections_;
@@ -77,7 +81,8 @@ bool LowRankInverseHessian::Update(const Vector& delta_x,
delta_gradient_history_.col(num_corrections_ - 1) = delta_gradient;
delta_x_dot_delta_gradient_(num_corrections_ - 1) =
delta_x_dot_delta_gradient;
- diagonal_ = delta_x_dot_delta_gradient / delta_gradient.squaredNorm();
+ approximate_eigenvalue_scale_ =
+ delta_x_dot_delta_gradient / delta_gradient.squaredNorm();
return true;
}
@@ -96,7 +101,39 @@ void LowRankInverseHessian::RightMultiply(const double* x_ptr,
search_direction -= alpha(i) * delta_gradient_history_.col(i);
}
- search_direction *= diagonal_;
+ if (use_approximate_eigenvalue_scaling_) {
+ // Rescale the initial inverse Hessian approximation (H_0) to be iteratively
+ // updated so that it is of similar 'size' to the true inverse Hessian along
+ // the most recent search direction. As shown in [1]:
+ //
+ // \gamma_k = (delta_gradient_{k-1}' * delta_x_{k-1}) /
+ // (delta_gradient_{k-1}' * delta_gradient_{k-1})
+ //
+ // Satisfies:
+ //
+ // (1 / \lambda_m) <= \gamma_k <= (1 / \lambda_1)
+ //
+ // Where \lambda_1 & \lambda_m are the smallest and largest eigenvalues of
+ // the true Hessian (not the inverse) along the most recent search direction
+ // respectively. Thus \gamma is an approximate eigenvalue of the true
+ // inverse Hessian, and choosing: H_0 = I * \gamma will yield a starting
+ // point that has a similar scale to the true inverse Hessian. This
+ // technique is widely reported to often improve convergence, however this
+ // is not universally true, particularly if there are errors in the initial
+ // jacobians, or if there are significant differences in the sensitivity
+ // of the problem to the parameters (i.e. the range of the magnitudes of
+ // the components of the gradient is large).
+ //
+ // The original origin of this rescaling trick is somewhat unclear, the
+ // earliest reference appears to be Oren [1], however it is widely discussed
+ // without specific attributation in various texts including [2] (p143/178).
+ //
+ // [1] Oren S.S., Self-scaling variable metric (SSVM) algorithms Part II:
+ // Implementation and experiments, Management Science,
+ // 20(5), 863-874, 1974.
+ // [2] Nocedal J., Wright S., Numerical Optimization, Springer, 1999.
+ search_direction *= approximate_eigenvalue_scale_;
+ }
for (int i = 0; i < num_corrections_; ++i) {
const double beta = delta_gradient_history_.col(i).dot(search_direction) /
diff --git a/extern/libmv/third_party/ceres/internal/ceres/low_rank_inverse_hessian.h b/extern/libmv/third_party/ceres/internal/ceres/low_rank_inverse_hessian.h
index 6f3fc0c9d00..7d293d09422 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/low_rank_inverse_hessian.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/low_rank_inverse_hessian.h
@@ -61,10 +61,16 @@ class LowRankInverseHessian : public LinearOperator {
public:
// num_parameters is the row/column size of the Hessian.
// max_num_corrections is the rank of the Hessian approximation.
+ // use_approximate_eigenvalue_scaling controls whether the initial
+ // inverse Hessian used during Right/LeftMultiply() is scaled by
+ // the approximate eigenvalue of the true inverse Hessian at the
+ // current operating point.
// The approximation uses:
// 2 * max_num_corrections * num_parameters + max_num_corrections
// doubles.
- LowRankInverseHessian(int num_parameters, int max_num_corrections);
+ LowRankInverseHessian(int num_parameters,
+ int max_num_corrections,
+ bool use_approximate_eigenvalue_scaling);
virtual ~LowRankInverseHessian() {}
// Update the low rank approximation. delta_x is the change in the
@@ -86,8 +92,9 @@ class LowRankInverseHessian : public LinearOperator {
private:
const int num_parameters_;
const int max_num_corrections_;
+ const bool use_approximate_eigenvalue_scaling_;
int num_corrections_;
- double diagonal_;
+ double approximate_eigenvalue_scale_;
Matrix delta_x_history_;
Matrix delta_gradient_history_;
Vector delta_x_dot_delta_gradient_;
diff --git a/extern/libmv/third_party/ceres/internal/ceres/minimizer.h b/extern/libmv/third_party/ceres/internal/ceres/minimizer.h
index 040ddd96fbb..622e9cee1d0 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/minimizer.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/minimizer.h
@@ -31,6 +31,7 @@
#ifndef CERES_INTERNAL_MINIMIZER_H_
#define CERES_INTERNAL_MINIMIZER_H_
+#include <string>
#include <vector>
#include "ceres/internal/port.h"
#include "ceres/iteration_callback.h"
@@ -73,9 +74,12 @@ class Minimizer {
use_nonmonotonic_steps = options.use_nonmonotonic_steps;
max_consecutive_nonmonotonic_steps =
options.max_consecutive_nonmonotonic_steps;
- lsqp_dump_directory = options.lsqp_dump_directory;
- lsqp_iterations_to_dump = options.lsqp_iterations_to_dump;
- lsqp_dump_format_type = options.lsqp_dump_format_type;
+ trust_region_problem_dump_directory =
+ options.trust_region_problem_dump_directory;
+ trust_region_minimizer_iterations_to_dump =
+ options.trust_region_minimizer_iterations_to_dump;
+ trust_region_problem_dump_format_type =
+ options.trust_region_problem_dump_format_type;
max_num_consecutive_invalid_steps =
options.max_num_consecutive_invalid_steps;
min_trust_region_radius = options.min_trust_region_radius;
@@ -84,11 +88,31 @@ class Minimizer {
nonlinear_conjugate_gradient_type =
options.nonlinear_conjugate_gradient_type;
max_lbfgs_rank = options.max_lbfgs_rank;
+ use_approximate_eigenvalue_bfgs_scaling =
+ options.use_approximate_eigenvalue_bfgs_scaling;
+ line_search_interpolation_type =
+ options.line_search_interpolation_type;
+ min_line_search_step_size = options.min_line_search_step_size;
+ line_search_sufficient_function_decrease =
+ options.line_search_sufficient_function_decrease;
+ max_line_search_step_contraction =
+ options.max_line_search_step_contraction;
+ min_line_search_step_contraction =
+ options.min_line_search_step_contraction;
+ max_num_line_search_step_size_iterations =
+ options.max_num_line_search_step_size_iterations;
+ max_num_line_search_direction_restarts =
+ options.max_num_line_search_direction_restarts;
+ line_search_sufficient_curvature_decrease =
+ options.line_search_sufficient_curvature_decrease;
+ max_line_search_step_expansion =
+ options.max_line_search_step_expansion;
evaluator = NULL;
trust_region_strategy = NULL;
jacobian = NULL;
callbacks = options.callbacks;
inner_iteration_minimizer = NULL;
+ inner_iteration_tolerance = options.inner_iteration_tolerance;
}
int max_num_iterations;
@@ -109,15 +133,26 @@ class Minimizer {
bool jacobi_scaling;
bool use_nonmonotonic_steps;
int max_consecutive_nonmonotonic_steps;
- vector<int> lsqp_iterations_to_dump;
- DumpFormatType lsqp_dump_format_type;
- string lsqp_dump_directory;
+ vector<int> trust_region_minimizer_iterations_to_dump;
+ DumpFormatType trust_region_problem_dump_format_type;
+ string trust_region_problem_dump_directory;
int max_num_consecutive_invalid_steps;
double min_trust_region_radius;
LineSearchDirectionType line_search_direction_type;
LineSearchType line_search_type;
NonlinearConjugateGradientType nonlinear_conjugate_gradient_type;
int max_lbfgs_rank;
+ bool use_approximate_eigenvalue_bfgs_scaling;
+ LineSearchInterpolationType line_search_interpolation_type;
+ double min_line_search_step_size;
+ double line_search_sufficient_function_decrease;
+ double max_line_search_step_contraction;
+ double min_line_search_step_contraction;
+ int max_num_line_search_step_size_iterations;
+ int max_num_line_search_direction_restarts;
+ double line_search_sufficient_curvature_decrease;
+ double max_line_search_step_expansion;
+
// List of callbacks that are executed by the Minimizer at the end
// of each iteration.
@@ -141,6 +176,7 @@ class Minimizer {
SparseMatrix* jacobian;
Minimizer* inner_iteration_minimizer;
+ double inner_iteration_tolerance;
};
static bool RunCallbacks(const vector<IterationCallback*> callbacks,
diff --git a/extern/libmv/third_party/ceres/internal/ceres/parameter_block.h b/extern/libmv/third_party/ceres/internal/ceres/parameter_block.h
index b1e8d938b8a..695fa6ff97b 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/parameter_block.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/parameter_block.h
@@ -173,8 +173,8 @@ class ParameterBlock {
new double[local_parameterization_->GlobalSize() *
local_parameterization_->LocalSize()]);
CHECK(UpdateLocalParameterizationJacobian())
- "Local parameterization Jacobian computation failed"
- "for x: " << ConstVectorRef(state_, Size()).transpose();
+ << "Local parameterization Jacobian computation failed for x: "
+ << ConstVectorRef(state_, Size()).transpose();
} else {
// Ignore the case that the parameterizations match.
}
diff --git a/extern/libmv/third_party/ceres/internal/ceres/parameter_block_ordering.cc b/extern/libmv/third_party/ceres/internal/ceres/parameter_block_ordering.cc
index e8f626f8e80..190715bee43 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/parameter_block_ordering.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/parameter_block_ordering.cc
@@ -42,6 +42,32 @@
namespace ceres {
namespace internal {
+int ComputeStableSchurOrdering(const Program& program,
+ vector<ParameterBlock*>* ordering) {
+ CHECK_NOTNULL(ordering)->clear();
+
+ scoped_ptr<Graph< ParameterBlock*> > graph(CreateHessianGraph(program));
+ const vector<ParameterBlock*>& parameter_blocks = program.parameter_blocks();
+ const HashSet<ParameterBlock*>& vertices = graph->vertices();
+ for (int i = 0; i < parameter_blocks.size(); ++i) {
+ if (vertices.count(parameter_blocks[i]) > 0) {
+ ordering->push_back(parameter_blocks[i]);
+ }
+ }
+
+ int independent_set_size = StableIndependentSetOrdering(*graph, ordering);
+
+ // Add the excluded blocks to back of the ordering vector.
+ for (int i = 0; i < parameter_blocks.size(); ++i) {
+ ParameterBlock* parameter_block = parameter_blocks[i];
+ if (parameter_block->IsConstant()) {
+ ordering->push_back(parameter_block);
+ }
+ }
+
+ return independent_set_size;
+}
+
int ComputeSchurOrdering(const Program& program,
vector<ParameterBlock*>* ordering) {
CHECK_NOTNULL(ordering)->clear();
diff --git a/extern/libmv/third_party/ceres/internal/ceres/parameter_block_ordering.h b/extern/libmv/third_party/ceres/internal/ceres/parameter_block_ordering.h
index a5277a44c70..4675cb8dc7c 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/parameter_block_ordering.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/parameter_block_ordering.h
@@ -58,6 +58,12 @@ class ParameterBlock;
int ComputeSchurOrdering(const Program& program,
vector<ParameterBlock* >* ordering);
+// Same as above, except that ties while computing the independent set
+// ordering are resolved in favour of the order in which the parameter
+// blocks occur in the program.
+int ComputeStableSchurOrdering(const Program& program,
+ vector<ParameterBlock* >* ordering);
+
// Use an approximate independent set ordering to decompose the
// parameter blocks of a problem in a sequence of independent
// sets. The ordering covers all the non-constant parameter blocks in
diff --git a/extern/libmv/third_party/ceres/internal/ceres/partitioned_matrix_view.cc b/extern/libmv/third_party/ceres/internal/ceres/partitioned_matrix_view.cc
index c488184ac93..59eaff8ec1b 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/partitioned_matrix_view.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/partitioned_matrix_view.cc
@@ -35,17 +35,17 @@
#include <algorithm>
#include <cstring>
#include <vector>
-#include "ceres/blas.h"
#include "ceres/block_sparse_matrix.h"
#include "ceres/block_structure.h"
#include "ceres/internal/eigen.h"
+#include "ceres/small_blas.h"
#include "glog/logging.h"
namespace ceres {
namespace internal {
PartitionedMatrixView::PartitionedMatrixView(
- const BlockSparseMatrixBase& matrix,
+ const BlockSparseMatrix& matrix,
int num_col_blocks_a)
: matrix_(matrix),
num_col_blocks_e_(num_col_blocks_a) {
@@ -96,8 +96,8 @@ void PartitionedMatrixView::RightMultiplyE(const double* x, double* y) const {
// Iterate over the first num_row_blocks_e_ row blocks, and multiply
// by the first cell in each row block.
+ const double* values = matrix_.values();
for (int r = 0; r < num_row_blocks_e_; ++r) {
- const double* row_values = matrix_.RowBlockValues(r);
const Cell& cell = bs->rows[r].cells[0];
const int row_block_pos = bs->rows[r].block.position;
const int row_block_size = bs->rows[r].block.size;
@@ -105,7 +105,7 @@ void PartitionedMatrixView::RightMultiplyE(const double* x, double* y) const {
const int col_block_pos = bs->cols[col_block_id].position;
const int col_block_size = bs->cols[col_block_id].size;
MatrixVectorMultiply<Eigen::Dynamic, Eigen::Dynamic, 1>(
- row_values + cell.position, row_block_size, col_block_size,
+ values + cell.position, row_block_size, col_block_size,
x + col_block_pos,
y + row_block_pos);
}
@@ -119,17 +119,17 @@ void PartitionedMatrixView::RightMultiplyF(const double* x, double* y) const {
// E. If the row block is not in E (i.e its in the bottom
// num_row_blocks - num_row_blocks_e row blocks), then all the cells
// are of type F and multiply by them all.
+ const double* values = matrix_.values();
for (int r = 0; r < bs->rows.size(); ++r) {
const int row_block_pos = bs->rows[r].block.position;
const int row_block_size = bs->rows[r].block.size;
const vector<Cell>& cells = bs->rows[r].cells;
for (int c = (r < num_row_blocks_e_) ? 1 : 0; c < cells.size(); ++c) {
- const double* row_values = matrix_.RowBlockValues(r);
const int col_block_id = cells[c].block_id;
const int col_block_pos = bs->cols[col_block_id].position;
const int col_block_size = bs->cols[col_block_id].size;
MatrixVectorMultiply<Eigen::Dynamic, Eigen::Dynamic, 1>(
- row_values + cells[c].position, row_block_size, col_block_size,
+ values + cells[c].position, row_block_size, col_block_size,
x + col_block_pos - num_cols_e(),
y + row_block_pos);
}
@@ -141,16 +141,16 @@ void PartitionedMatrixView::LeftMultiplyE(const double* x, double* y) const {
// Iterate over the first num_row_blocks_e_ row blocks, and multiply
// by the first cell in each row block.
+ const double* values = matrix_.values();
for (int r = 0; r < num_row_blocks_e_; ++r) {
const Cell& cell = bs->rows[r].cells[0];
- const double* row_values = matrix_.RowBlockValues(r);
const int row_block_pos = bs->rows[r].block.position;
const int row_block_size = bs->rows[r].block.size;
const int col_block_id = cell.block_id;
const int col_block_pos = bs->cols[col_block_id].position;
const int col_block_size = bs->cols[col_block_id].size;
MatrixTransposeVectorMultiply<Eigen::Dynamic, Eigen::Dynamic, 1>(
- row_values + cell.position, row_block_size, col_block_size,
+ values + cell.position, row_block_size, col_block_size,
x + row_block_pos,
y + col_block_pos);
}
@@ -164,17 +164,17 @@ void PartitionedMatrixView::LeftMultiplyF(const double* x, double* y) const {
// E. If the row block is not in E (i.e its in the bottom
// num_row_blocks - num_row_blocks_e row blocks), then all the cells
// are of type F and multiply by them all.
+ const double* values = matrix_.values();
for (int r = 0; r < bs->rows.size(); ++r) {
const int row_block_pos = bs->rows[r].block.position;
const int row_block_size = bs->rows[r].block.size;
const vector<Cell>& cells = bs->rows[r].cells;
for (int c = (r < num_row_blocks_e_) ? 1 : 0; c < cells.size(); ++c) {
- const double* row_values = matrix_.RowBlockValues(r);
const int col_block_id = cells[c].block_id;
const int col_block_pos = bs->cols[col_block_id].position;
const int col_block_size = bs->cols[col_block_id].size;
MatrixTransposeVectorMultiply<Eigen::Dynamic, Eigen::Dynamic, 1>(
- row_values + cells[c].position, row_block_size, col_block_size,
+ values + cells[c].position, row_block_size, col_block_size,
x + row_block_pos,
y + col_block_pos - num_cols_e());
}
@@ -248,9 +248,8 @@ void PartitionedMatrixView::UpdateBlockDiagonalEtE(
block_diagonal->block_structure();
block_diagonal->SetZero();
-
+ const double* values = matrix_.values();
for (int r = 0; r < num_row_blocks_e_ ; ++r) {
- const double* row_values = matrix_.RowBlockValues(r);
const Cell& cell = bs->rows[r].cells[0];
const int row_block_size = bs->rows[r].block.size;
const int block_id = cell.block_id;
@@ -260,8 +259,8 @@ void PartitionedMatrixView::UpdateBlockDiagonalEtE(
MatrixTransposeMatrixMultiply
<Eigen::Dynamic, Eigen::Dynamic, Eigen::Dynamic, Eigen::Dynamic, 1>(
- row_values + cell.position, row_block_size, col_block_size,
- row_values + cell.position, row_block_size, col_block_size,
+ values + cell.position, row_block_size, col_block_size,
+ values + cell.position, row_block_size, col_block_size,
block_diagonal->mutable_values() + cell_position,
0, 0, col_block_size, col_block_size);
}
@@ -279,10 +278,10 @@ void PartitionedMatrixView::UpdateBlockDiagonalFtF(
block_diagonal->block_structure();
block_diagonal->SetZero();
+ const double* values = matrix_.values();
for (int r = 0; r < bs->rows.size(); ++r) {
const int row_block_size = bs->rows[r].block.size;
const vector<Cell>& cells = bs->rows[r].cells;
- const double* row_values = matrix_.RowBlockValues(r);
for (int c = (r < num_row_blocks_e_) ? 1 : 0; c < cells.size(); ++c) {
const int col_block_id = cells[c].block_id;
const int col_block_size = bs->cols[col_block_id].size;
@@ -292,8 +291,8 @@ void PartitionedMatrixView::UpdateBlockDiagonalFtF(
MatrixTransposeMatrixMultiply
<Eigen::Dynamic, Eigen::Dynamic, Eigen::Dynamic, Eigen::Dynamic, 1>(
- row_values + cells[c].position, row_block_size, col_block_size,
- row_values + cells[c].position, row_block_size, col_block_size,
+ values + cells[c].position, row_block_size, col_block_size,
+ values + cells[c].position, row_block_size, col_block_size,
block_diagonal->mutable_values() + cell_position,
0, 0, col_block_size, col_block_size);
}
diff --git a/extern/libmv/third_party/ceres/internal/ceres/partitioned_matrix_view.h b/extern/libmv/third_party/ceres/internal/ceres/partitioned_matrix_view.h
index cfe4de5b436..ebfbe403189 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/partitioned_matrix_view.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/partitioned_matrix_view.h
@@ -60,7 +60,7 @@ class PartitionedMatrixView {
public:
// matrix = [E F], where the matrix E contains the first
// num_col_blocks_a column blocks.
- PartitionedMatrixView(const BlockSparseMatrixBase& matrix,
+ PartitionedMatrixView(const BlockSparseMatrix& matrix,
int num_col_blocks_a);
~PartitionedMatrixView();
@@ -107,7 +107,7 @@ class PartitionedMatrixView {
BlockSparseMatrix* CreateBlockDiagonalMatrixLayout(int start_col_block,
int end_col_block) const;
- const BlockSparseMatrixBase& matrix_;
+ const BlockSparseMatrix& matrix_;
int num_row_blocks_e_;
int num_col_blocks_e_;
int num_col_blocks_f_;
diff --git a/extern/libmv/third_party/ceres/internal/ceres/preconditioner.cc b/extern/libmv/third_party/ceres/internal/ceres/preconditioner.cc
index 05e539f9fb1..505a47d3d61 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/preconditioner.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/preconditioner.cc
@@ -45,8 +45,8 @@ SparseMatrixPreconditionerWrapper::SparseMatrixPreconditionerWrapper(
SparseMatrixPreconditionerWrapper::~SparseMatrixPreconditionerWrapper() {
}
-bool SparseMatrixPreconditionerWrapper::Update(const BlockSparseMatrixBase& A,
- const double* D) {
+bool SparseMatrixPreconditionerWrapper::UpdateImpl(const SparseMatrix& A,
+ const double* D) {
return true;
}
diff --git a/extern/libmv/third_party/ceres/internal/ceres/preconditioner.h b/extern/libmv/third_party/ceres/internal/ceres/preconditioner.h
index d7c88293687..af64e3c9a44 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/preconditioner.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/preconditioner.h
@@ -32,13 +32,15 @@
#define CERES_INTERNAL_PRECONDITIONER_H_
#include <vector>
+#include "ceres/casts.h"
+#include "ceres/compressed_row_sparse_matrix.h"
#include "ceres/linear_operator.h"
#include "ceres/sparse_matrix.h"
namespace ceres {
namespace internal {
-class BlockSparseMatrixBase;
+class BlockSparseMatrix;
class SparseMatrix;
class Preconditioner : public LinearOperator {
@@ -46,7 +48,7 @@ class Preconditioner : public LinearOperator {
struct Options {
Options()
: type(JACOBI),
- sparse_linear_algebra_library(SUITE_SPARSE),
+ sparse_linear_algebra_library_type(SUITE_SPARSE),
num_threads(1),
row_block_size(Eigen::Dynamic),
e_block_size(Eigen::Dynamic),
@@ -55,7 +57,7 @@ class Preconditioner : public LinearOperator {
PreconditionerType type;
- SparseLinearAlgebraLibraryType sparse_linear_algebra_library;
+ SparseLinearAlgebraLibraryType sparse_linear_algebra_library_type;
// If possible, how many threads the preconditioner can use.
int num_threads;
@@ -105,7 +107,7 @@ class Preconditioner : public LinearOperator {
//
// D can be NULL, in which case its interpreted as a diagonal matrix
// of size zero.
- virtual bool Update(const BlockSparseMatrixBase& A, const double* D) = 0;
+ virtual bool Update(const LinearOperator& A, const double* D) = 0;
// LinearOperator interface. Since the operator is symmetric,
// LeftMultiply and num_cols are just calls to RightMultiply and
@@ -122,19 +124,40 @@ class Preconditioner : public LinearOperator {
}
};
+// This templated subclass of Preconditioner serves as a base class for
+// other preconditioners that depend on the particular matrix layout of
+// the underlying linear operator.
+template <typename MatrixType>
+class TypedPreconditioner : public Preconditioner {
+ public:
+ virtual ~TypedPreconditioner() {}
+ virtual bool Update(const LinearOperator& A, const double* D) {
+ return UpdateImpl(*down_cast<const MatrixType*>(&A), D);
+ }
+
+ private:
+ virtual bool UpdateImpl(const MatrixType& A, const double* D) = 0;
+};
+
+// Preconditioners that depend on acccess to the low level structure
+// of a SparseMatrix.
+typedef TypedPreconditioner<SparseMatrix> SparseMatrixPreconditioner; // NOLINT
+typedef TypedPreconditioner<BlockSparseMatrix> BlockSparseMatrixPreconditioner; // NOLINT
+typedef TypedPreconditioner<CompressedRowSparseMatrix> CompressedRowSparseMatrixPreconditioner; // NOLINT
+
// Wrap a SparseMatrix object as a preconditioner.
-class SparseMatrixPreconditionerWrapper : public Preconditioner {
+class SparseMatrixPreconditionerWrapper : public SparseMatrixPreconditioner {
public:
// Wrapper does NOT take ownership of the matrix pointer.
explicit SparseMatrixPreconditionerWrapper(const SparseMatrix* matrix);
virtual ~SparseMatrixPreconditionerWrapper();
// Preconditioner interface
- virtual bool Update(const BlockSparseMatrixBase& A, const double* D);
virtual void RightMultiply(const double* x, double* y) const;
virtual int num_rows() const;
private:
+ virtual bool UpdateImpl(const SparseMatrix& A, const double* D);
const SparseMatrix* matrix_;
};
diff --git a/extern/libmv/third_party/ceres/internal/ceres/problem.cc b/extern/libmv/third_party/ceres/internal/ceres/problem.cc
index b483932b2c1..403e96a3ade 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/problem.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/problem.cc
@@ -206,11 +206,11 @@ int Problem::NumResiduals() const {
return problem_impl_->NumResiduals();
}
-int Problem::ParameterBlockSize(double* parameter_block) const {
+int Problem::ParameterBlockSize(const double* parameter_block) const {
return problem_impl_->ParameterBlockSize(parameter_block);
};
-int Problem::ParameterBlockLocalSize(double* parameter_block) const {
+int Problem::ParameterBlockLocalSize(const double* parameter_block) const {
return problem_impl_->ParameterBlockLocalSize(parameter_block);
};
diff --git a/extern/libmv/third_party/ceres/internal/ceres/problem_impl.cc b/extern/libmv/third_party/ceres/internal/ceres/problem_impl.cc
index 34c37857538..830270269c3 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/problem_impl.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/problem_impl.cc
@@ -711,13 +711,14 @@ int ProblemImpl::NumResiduals() const {
return program_->NumResiduals();
}
-int ProblemImpl::ParameterBlockSize(double* parameter_block) const {
- return FindParameterBlockOrDie(parameter_block_map_, parameter_block)->Size();
+int ProblemImpl::ParameterBlockSize(const double* parameter_block) const {
+ return FindParameterBlockOrDie(parameter_block_map_,
+ const_cast<double*>(parameter_block))->Size();
};
-int ProblemImpl::ParameterBlockLocalSize(double* parameter_block) const {
- return FindParameterBlockOrDie(parameter_block_map_,
- parameter_block)->LocalSize();
+int ProblemImpl::ParameterBlockLocalSize(const double* parameter_block) const {
+ return FindParameterBlockOrDie(
+ parameter_block_map_, const_cast<double*>(parameter_block))->LocalSize();
};
void ProblemImpl::GetParameterBlocks(vector<double*>* parameter_blocks) const {
diff --git a/extern/libmv/third_party/ceres/internal/ceres/problem_impl.h b/extern/libmv/third_party/ceres/internal/ceres/problem_impl.h
index 2609389645a..ace27f56bb1 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/problem_impl.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/problem_impl.h
@@ -139,8 +139,8 @@ class ProblemImpl {
int NumResidualBlocks() const;
int NumResiduals() const;
- int ParameterBlockSize(double* parameter_block) const;
- int ParameterBlockLocalSize(double* parameter_block) const;
+ int ParameterBlockSize(const double* parameter_block) const;
+ int ParameterBlockLocalSize(const double* parameter_block) const;
void GetParameterBlocks(vector<double*>* parameter_blocks) const;
const Program& program() const { return *program_; }
diff --git a/extern/libmv/third_party/ceres/internal/ceres/program_evaluator.h b/extern/libmv/third_party/ceres/internal/ceres/program_evaluator.h
index de56ac25ff6..8aa2a3977c4 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/program_evaluator.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/program_evaluator.h
@@ -84,6 +84,7 @@
#endif
#include <map>
+#include <string>
#include <vector>
#include "ceres/execution_summary.h"
#include "ceres/internal/eigen.h"
@@ -91,6 +92,7 @@
#include "ceres/parameter_block.h"
#include "ceres/program.h"
#include "ceres/residual_block.h"
+#include "ceres/small_blas.h"
namespace ceres {
namespace internal {
@@ -230,14 +232,13 @@ class ProgramEvaluator : public Evaluator {
if (parameter_block->IsConstant()) {
continue;
}
- MatrixRef block_jacobian(block_jacobians[j],
- num_residuals,
- parameter_block->LocalSize());
- VectorRef block_gradient(scratch->gradient.get() +
- parameter_block->delta_offset(),
- parameter_block->LocalSize());
- VectorRef block_residual(block_residuals, num_residuals);
- block_gradient += block_residual.transpose() * block_jacobian;
+
+ MatrixTransposeVectorMultiply<Eigen::Dynamic, Eigen::Dynamic, 1>(
+ block_jacobians[j],
+ num_residuals,
+ parameter_block->LocalSize(),
+ block_residuals,
+ scratch->gradient.get() + parameter_block->delta_offset());
}
}
}
diff --git a/extern/libmv/third_party/ceres/internal/ceres/residual_block.cc b/extern/libmv/third_party/ceres/internal/ceres/residual_block.cc
index 649f3f714c2..621082ac0ea 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/residual_block.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/residual_block.cc
@@ -34,8 +34,6 @@
#include <algorithm>
#include <cstddef>
#include <vector>
-
-#include "ceres/blas.h"
#include "ceres/corrector.h"
#include "ceres/parameter_block.h"
#include "ceres/residual_block_utils.h"
@@ -44,6 +42,7 @@
#include "ceres/internal/fixed_array.h"
#include "ceres/local_parameterization.h"
#include "ceres/loss_function.h"
+#include "ceres/small_blas.h"
using Eigen::Dynamic;
diff --git a/extern/libmv/third_party/ceres/internal/ceres/schur_complement_solver.cc b/extern/libmv/third_party/ceres/internal/ceres/schur_complement_solver.cc
index 8afb1215015..b192aa1172b 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/schur_complement_solver.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/schur_complement_solver.cc
@@ -33,20 +33,18 @@
#include <set>
#include <vector>
-#ifndef CERES_NO_CXSPARSE
-#include "cs.h"
-#endif // CERES_NO_CXSPARSE
-
#include "Eigen/Dense"
#include "ceres/block_random_access_dense_matrix.h"
#include "ceres/block_random_access_matrix.h"
#include "ceres/block_random_access_sparse_matrix.h"
#include "ceres/block_sparse_matrix.h"
#include "ceres/block_structure.h"
+#include "ceres/cxsparse.h"
#include "ceres/detect_structure.h"
#include "ceres/internal/eigen.h"
#include "ceres/internal/port.h"
#include "ceres/internal/scoped_ptr.h"
+#include "ceres/lapack.h"
#include "ceres/linear_solver.h"
#include "ceres/schur_complement_solver.h"
#include "ceres/suitesparse.h"
@@ -58,7 +56,7 @@ namespace ceres {
namespace internal {
LinearSolver::Summary SchurComplementSolver::SolveImpl(
- BlockSparseMatrixBase* A,
+ BlockSparseMatrix* A,
const double* b,
const LinearSolver::PerSolveOptions& per_solve_options,
double* x) {
@@ -130,29 +128,31 @@ bool DenseSchurComplementSolver::SolveReducedLinearSystem(double* solution) {
return true;
}
- // TODO(sameeragarwal): Add proper error handling; this completely ignores
- // the quality of the solution to the solve.
- VectorRef(solution, num_rows) =
- ConstMatrixRef(m->values(), num_rows, num_rows)
- .selfadjointView<Eigen::Upper>()
- .ldlt()
- .solve(ConstVectorRef(rhs(), num_rows));
+ if (options().dense_linear_algebra_library_type == EIGEN) {
+ // TODO(sameeragarwal): Add proper error handling; this completely ignores
+ // the quality of the solution to the solve.
+ VectorRef(solution, num_rows) =
+ ConstMatrixRef(m->values(), num_rows, num_rows)
+ .selfadjointView<Eigen::Upper>()
+ .llt()
+ .solve(ConstVectorRef(rhs(), num_rows));
+ return true;
+ }
- return true;
+ VectorRef(solution, num_rows) = ConstVectorRef(rhs(), num_rows);
+ const int info = LAPACK::SolveInPlaceUsingCholesky(num_rows,
+ m->values(),
+ solution);
+ return (info == 0);
}
#if !defined(CERES_NO_SUITESPARSE) || !defined(CERES_NO_CXSPARE)
SparseSchurComplementSolver::SparseSchurComplementSolver(
const LinearSolver::Options& options)
- : SchurComplementSolver(options) {
-#ifndef CERES_NO_SUITESPARSE
- factor_ = NULL;
-#endif // CERES_NO_SUITESPARSE
-
-#ifndef CERES_NO_CXSPARSE
- cxsparse_factor_ = NULL;
-#endif // CERES_NO_CXSPARSE
+ : SchurComplementSolver(options),
+ factor_(NULL),
+ cxsparse_factor_(NULL) {
}
SparseSchurComplementSolver::~SparseSchurComplementSolver() {
@@ -243,18 +243,18 @@ void SparseSchurComplementSolver::InitStorage(
}
bool SparseSchurComplementSolver::SolveReducedLinearSystem(double* solution) {
- switch (options().sparse_linear_algebra_library) {
+ switch (options().sparse_linear_algebra_library_type) {
case SUITE_SPARSE:
return SolveReducedLinearSystemUsingSuiteSparse(solution);
case CX_SPARSE:
return SolveReducedLinearSystemUsingCXSparse(solution);
default:
LOG(FATAL) << "Unknown sparse linear algebra library : "
- << options().sparse_linear_algebra_library;
+ << options().sparse_linear_algebra_library_type;
}
LOG(FATAL) << "Unknown sparse linear algebra library : "
- << options().sparse_linear_algebra_library;
+ << options().sparse_linear_algebra_library_type;
return false;
}
@@ -276,26 +276,42 @@ bool SparseSchurComplementSolver::SolveReducedLinearSystemUsingSuiteSparse(
return true;
}
- cholmod_sparse* cholmod_lhs = ss_.CreateSparseMatrix(tsm);
- // The matrix is symmetric, and the upper triangular part of the
- // matrix contains the values.
- cholmod_lhs->stype = 1;
+ cholmod_sparse* cholmod_lhs = NULL;
+ if (options().use_postordering) {
+ // If we are going to do a full symbolic analysis of the schur
+ // complement matrix from scratch and not rely on the
+ // pre-ordering, then the fastest path in cholmod_factorize is the
+ // one corresponding to upper triangular matrices.
- cholmod_dense* cholmod_rhs =
- ss_.CreateDenseVector(const_cast<double*>(rhs()), num_rows, num_rows);
+ // Create a upper triangular symmetric matrix.
+ cholmod_lhs = ss_.CreateSparseMatrix(tsm);
+ cholmod_lhs->stype = 1;
- // Symbolic factorization is computed if we don't already have one handy.
- if (factor_ == NULL) {
- factor_ = ss_.BlockAnalyzeCholesky(cholmod_lhs, blocks_, blocks_);
+ if (factor_ == NULL) {
+ factor_ = ss_.BlockAnalyzeCholesky(cholmod_lhs, blocks_, blocks_);
+ }
+ } else {
+ // If we are going to use the natural ordering (i.e. rely on the
+ // pre-ordering computed by solver_impl.cc), then the fastest
+ // path in cholmod_factorize is the one corresponding to lower
+ // triangular matrices.
+
+ // Create a upper triangular symmetric matrix.
+ cholmod_lhs = ss_.CreateSparseMatrixTranspose(tsm);
+ cholmod_lhs->stype = -1;
+
+ if (factor_ == NULL) {
+ factor_ = ss_.AnalyzeCholeskyWithNaturalOrdering(cholmod_lhs);
+ }
}
+ cholmod_dense* cholmod_rhs =
+ ss_.CreateDenseVector(const_cast<double*>(rhs()), num_rows, num_rows);
cholmod_dense* cholmod_solution =
ss_.SolveCholesky(cholmod_lhs, factor_, cholmod_rhs);
ss_.Free(cholmod_lhs);
- cholmod_lhs = NULL;
ss_.Free(cholmod_rhs);
- cholmod_rhs = NULL;
if (cholmod_solution == NULL) {
LOG(WARNING) << "CHOLMOD solve failed.";
@@ -339,7 +355,8 @@ bool SparseSchurComplementSolver::SolveReducedLinearSystemUsingCXSparse(
// Compute symbolic factorization if not available.
if (cxsparse_factor_ == NULL) {
- cxsparse_factor_ = CHECK_NOTNULL(cxsparse_.AnalyzeCholesky(lhs));
+ cxsparse_factor_ =
+ CHECK_NOTNULL(cxsparse_.BlockAnalyzeCholesky(lhs, blocks_, blocks_));
}
// Solve the linear system.
diff --git a/extern/libmv/third_party/ceres/internal/ceres/schur_complement_solver.h b/extern/libmv/third_party/ceres/internal/ceres/schur_complement_solver.h
index 7c8d2e7ce38..b5a1c74ab1a 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/schur_complement_solver.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/schur_complement_solver.h
@@ -48,7 +48,7 @@
namespace ceres {
namespace internal {
-class BlockSparseMatrixBase;
+class BlockSparseMatrix;
// Base class for Schur complement based linear least squares
// solvers. It assumes that the input linear system Ax = b can be
@@ -100,7 +100,7 @@ class BlockSparseMatrixBase;
// set to DENSE_SCHUR and SPARSE_SCHUR
// respectively. LinearSolver::Options::elimination_groups[0] should be
// at least 1.
-class SchurComplementSolver : public BlockSparseMatrixBaseSolver {
+class SchurComplementSolver : public BlockSparseMatrixSolver {
public:
explicit SchurComplementSolver(const LinearSolver::Options& options)
: options_(options) {
@@ -111,7 +111,7 @@ class SchurComplementSolver : public BlockSparseMatrixBaseSolver {
// LinearSolver methods
virtual ~SchurComplementSolver() {}
virtual LinearSolver::Summary SolveImpl(
- BlockSparseMatrixBase* A,
+ BlockSparseMatrix* A,
const double* b,
const LinearSolver::PerSolveOptions& per_solve_options,
double* x);
@@ -167,18 +167,14 @@ class SparseSchurComplementSolver : public SchurComplementSolver {
// Size of the blocks in the Schur complement.
vector<int> blocks_;
-#ifndef CERES_NO_SUITESPARSE
SuiteSparse ss_;
// Symbolic factorization of the reduced linear system. Precomputed
// once and reused in subsequent calls.
cholmod_factor* factor_;
-#endif // CERES_NO_SUITESPARSE
-#ifndef CERES_NO_CXSPARSE
CXSparse cxsparse_;
// Cached factorization
cs_dis* cxsparse_factor_;
-#endif // CERES_NO_CXSPARSE
CERES_DISALLOW_COPY_AND_ASSIGN(SparseSchurComplementSolver);
};
diff --git a/extern/libmv/third_party/ceres/internal/ceres/schur_eliminator.h b/extern/libmv/third_party/ceres/internal/ceres/schur_eliminator.h
index f2c247a5adb..8fe8b9c88b7 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/schur_eliminator.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/schur_eliminator.h
@@ -170,7 +170,7 @@ class SchurEliminatorBase {
// also the caller's responsibilty to ensure that the
// CompressedRowBlockStructure object passed to this method is the
// same one (or is equivalent to) the one associated with the
- // BlockSparseMatrixBase objects below.
+ // BlockSparseMatrix objects below.
virtual void Init(int num_eliminate_blocks,
const CompressedRowBlockStructure* bs) = 0;
@@ -185,7 +185,7 @@ class SchurEliminatorBase {
//
// Since the Schur complement is a symmetric matrix, only the upper
// triangular part of the Schur complement is computed.
- virtual void Eliminate(const BlockSparseMatrixBase* A,
+ virtual void Eliminate(const BlockSparseMatrix* A,
const double* b,
const double* D,
BlockRandomAccessMatrix* lhs,
@@ -194,7 +194,7 @@ class SchurEliminatorBase {
// Given values for the variables z in the F block of A, solve for
// the optimal values of the variables y corresponding to the E
// block in A.
- virtual void BackSubstitute(const BlockSparseMatrixBase* A,
+ virtual void BackSubstitute(const BlockSparseMatrix* A,
const double* b,
const double* D,
const double* z,
@@ -226,12 +226,12 @@ class SchurEliminator : public SchurEliminatorBase {
virtual ~SchurEliminator();
virtual void Init(int num_eliminate_blocks,
const CompressedRowBlockStructure* bs);
- virtual void Eliminate(const BlockSparseMatrixBase* A,
+ virtual void Eliminate(const BlockSparseMatrix* A,
const double* b,
const double* D,
BlockRandomAccessMatrix* lhs,
double* rhs);
- virtual void BackSubstitute(const BlockSparseMatrixBase* A,
+ virtual void BackSubstitute(const BlockSparseMatrix* A,
const double* b,
const double* D,
const double* z,
@@ -273,7 +273,7 @@ class SchurEliminator : public SchurEliminatorBase {
void ChunkDiagonalBlockAndGradient(
const Chunk& chunk,
- const BlockSparseMatrixBase* A,
+ const BlockSparseMatrix* A,
const double* b,
int row_block_counter,
typename EigenTypes<kEBlockSize, kEBlockSize>::Matrix* eet,
@@ -282,7 +282,7 @@ class SchurEliminator : public SchurEliminatorBase {
BlockRandomAccessMatrix* lhs);
void UpdateRhs(const Chunk& chunk,
- const BlockSparseMatrixBase* A,
+ const BlockSparseMatrix* A,
const double* b,
int row_block_counter,
const double* inverse_ete_g,
@@ -293,18 +293,18 @@ class SchurEliminator : public SchurEliminatorBase {
const double* buffer,
const BufferLayoutType& buffer_layout,
BlockRandomAccessMatrix* lhs);
- void EBlockRowOuterProduct(const BlockSparseMatrixBase* A,
+ void EBlockRowOuterProduct(const BlockSparseMatrix* A,
int row_block_index,
BlockRandomAccessMatrix* lhs);
- void NoEBlockRowsUpdate(const BlockSparseMatrixBase* A,
+ void NoEBlockRowsUpdate(const BlockSparseMatrix* A,
const double* b,
int row_block_counter,
BlockRandomAccessMatrix* lhs,
double* rhs);
- void NoEBlockRowOuterProduct(const BlockSparseMatrixBase* A,
+ void NoEBlockRowOuterProduct(const BlockSparseMatrix* A,
int row_block_index,
BlockRandomAccessMatrix* lhs);
diff --git a/extern/libmv/third_party/ceres/internal/ceres/schur_eliminator_impl.h b/extern/libmv/third_party/ceres/internal/ceres/schur_eliminator_impl.h
index 835f879caf6..c09b7fb3a77 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/schur_eliminator_impl.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/schur_eliminator_impl.h
@@ -51,8 +51,6 @@
#include <algorithm>
#include <map>
-
-#include "ceres/blas.h"
#include "ceres/block_random_access_matrix.h"
#include "ceres/block_sparse_matrix.h"
#include "ceres/block_structure.h"
@@ -61,6 +59,7 @@
#include "ceres/internal/scoped_ptr.h"
#include "ceres/map_util.h"
#include "ceres/schur_eliminator.h"
+#include "ceres/small_blas.h"
#include "ceres/stl_util.h"
#include "Eigen/Dense"
#include "glog/logging.h"
@@ -168,7 +167,7 @@ Init(int num_eliminate_blocks, const CompressedRowBlockStructure* bs) {
template <int kRowBlockSize, int kEBlockSize, int kFBlockSize>
void
SchurEliminator<kRowBlockSize, kEBlockSize, kFBlockSize>::
-Eliminate(const BlockSparseMatrixBase* A,
+Eliminate(const BlockSparseMatrix* A,
const double* b,
const double* D,
BlockRandomAccessMatrix* lhs,
@@ -299,7 +298,7 @@ Eliminate(const BlockSparseMatrixBase* A,
template <int kRowBlockSize, int kEBlockSize, int kFBlockSize>
void
SchurEliminator<kRowBlockSize, kEBlockSize, kFBlockSize>::
-BackSubstitute(const BlockSparseMatrixBase* A,
+BackSubstitute(const BlockSparseMatrix* A,
const double* b,
const double* D,
const double* z,
@@ -324,9 +323,9 @@ BackSubstitute(const BlockSparseMatrixBase* A,
ete.setZero();
}
+ const double* values = A->values();
for (int j = 0; j < chunk.size; ++j) {
const CompressedRow& row = bs->rows[chunk.start + j];
- const double* row_values = A->RowBlockValues(chunk.start + j);
const Cell& e_cell = row.cells.front();
DCHECK_EQ(e_block_id, e_cell.block_id);
@@ -342,20 +341,20 @@ BackSubstitute(const BlockSparseMatrixBase* A,
const int r_block = f_block_id - num_eliminate_blocks_;
MatrixVectorMultiply<kRowBlockSize, kFBlockSize, -1>(
- row_values + row.cells[c].position, row.block.size, f_block_size,
+ values + row.cells[c].position, row.block.size, f_block_size,
z + lhs_row_layout_[r_block],
sj.get());
}
MatrixTransposeVectorMultiply<kRowBlockSize, kEBlockSize, 1>(
- row_values + e_cell.position, row.block.size, e_block_size,
+ values + e_cell.position, row.block.size, e_block_size,
sj.get(),
y_ptr);
MatrixTransposeMatrixMultiply
<kRowBlockSize, kEBlockSize, kRowBlockSize, kEBlockSize, 1>(
- row_values + e_cell.position, row.block.size, e_block_size,
- row_values + e_cell.position, row.block.size, e_block_size,
+ values + e_cell.position, row.block.size, e_block_size,
+ values + e_cell.position, row.block.size, e_block_size,
ete.data(), 0, 0, e_block_size, e_block_size);
}
@@ -370,7 +369,7 @@ template <int kRowBlockSize, int kEBlockSize, int kFBlockSize>
void
SchurEliminator<kRowBlockSize, kEBlockSize, kFBlockSize>::
UpdateRhs(const Chunk& chunk,
- const BlockSparseMatrixBase* A,
+ const BlockSparseMatrix* A,
const double* b,
int row_block_counter,
const double* inverse_ete_g,
@@ -380,9 +379,9 @@ UpdateRhs(const Chunk& chunk,
const int e_block_size = bs->cols[e_block_id].size;
int b_pos = bs->rows[row_block_counter].block.position;
+ const double* values = A->values();
for (int j = 0; j < chunk.size; ++j) {
const CompressedRow& row = bs->rows[row_block_counter + j];
- const double *row_values = A->RowBlockValues(row_block_counter + j);
const Cell& e_cell = row.cells.front();
typename EigenTypes<kRowBlockSize>::Vector sj =
@@ -390,7 +389,7 @@ UpdateRhs(const Chunk& chunk,
(b + b_pos, row.block.size);
MatrixVectorMultiply<kRowBlockSize, kEBlockSize, -1>(
- row_values + e_cell.position, row.block.size, e_block_size,
+ values + e_cell.position, row.block.size, e_block_size,
inverse_ete_g, sj.data());
for (int c = 1; c < row.cells.size(); ++c) {
@@ -399,7 +398,7 @@ UpdateRhs(const Chunk& chunk,
const int block = block_id - num_eliminate_blocks_;
CeresMutexLock l(rhs_locks_[block]);
MatrixTransposeVectorMultiply<kRowBlockSize, kFBlockSize, 1>(
- row_values + row.cells[c].position,
+ values + row.cells[c].position,
row.block.size, block_size,
sj.data(), rhs + lhs_row_layout_[block]);
}
@@ -431,7 +430,7 @@ void
SchurEliminator<kRowBlockSize, kEBlockSize, kFBlockSize>::
ChunkDiagonalBlockAndGradient(
const Chunk& chunk,
- const BlockSparseMatrixBase* A,
+ const BlockSparseMatrix* A,
const double* b,
int row_block_counter,
typename EigenTypes<kEBlockSize, kEBlockSize>::Matrix* ete,
@@ -447,9 +446,9 @@ ChunkDiagonalBlockAndGradient(
// contribution of its F blocks to the Schur complement, the
// contribution of its E block to the matrix EE' (ete), and the
// corresponding block in the gradient vector.
+ const double* values = A->values();
for (int j = 0; j < chunk.size; ++j) {
const CompressedRow& row = bs->rows[row_block_counter + j];
- const double *row_values = A->RowBlockValues(row_block_counter + j);
if (row.cells.size() > 1) {
EBlockRowOuterProduct(A, row_block_counter + j, lhs);
@@ -459,13 +458,13 @@ ChunkDiagonalBlockAndGradient(
const Cell& e_cell = row.cells.front();
MatrixTransposeMatrixMultiply
<kRowBlockSize, kEBlockSize, kRowBlockSize, kEBlockSize, 1>(
- row_values + e_cell.position, row.block.size, e_block_size,
- row_values + e_cell.position, row.block.size, e_block_size,
+ values + e_cell.position, row.block.size, e_block_size,
+ values + e_cell.position, row.block.size, e_block_size,
ete->data(), 0, 0, e_block_size, e_block_size);
// g += E_i' b_i
MatrixTransposeVectorMultiply<kRowBlockSize, kEBlockSize, 1>(
- row_values + e_cell.position, row.block.size, e_block_size,
+ values + e_cell.position, row.block.size, e_block_size,
b + b_pos,
g);
@@ -479,8 +478,8 @@ ChunkDiagonalBlockAndGradient(
buffer + FindOrDie(chunk.buffer_layout, f_block_id);
MatrixTransposeMatrixMultiply
<kRowBlockSize, kEBlockSize, kRowBlockSize, kFBlockSize, 1>(
- row_values + e_cell.position, row.block.size, e_block_size,
- row_values + row.cells[c].position, row.block.size, f_block_size,
+ values + e_cell.position, row.block.size, e_block_size,
+ values + row.cells[c].position, row.block.size, f_block_size,
buffer_ptr, 0, 0, e_block_size, f_block_size);
}
b_pos += row.block.size;
@@ -551,21 +550,21 @@ ChunkOuterProduct(const CompressedRowBlockStructure* bs,
template <int kRowBlockSize, int kEBlockSize, int kFBlockSize>
void
SchurEliminator<kRowBlockSize, kEBlockSize, kFBlockSize>::
-NoEBlockRowsUpdate(const BlockSparseMatrixBase* A,
+NoEBlockRowsUpdate(const BlockSparseMatrix* A,
const double* b,
int row_block_counter,
BlockRandomAccessMatrix* lhs,
double* rhs) {
const CompressedRowBlockStructure* bs = A->block_structure();
+ const double* values = A->values();
for (; row_block_counter < bs->rows.size(); ++row_block_counter) {
const CompressedRow& row = bs->rows[row_block_counter];
- const double *row_values = A->RowBlockValues(row_block_counter);
for (int c = 0; c < row.cells.size(); ++c) {
const int block_id = row.cells[c].block_id;
const int block_size = bs->cols[block_id].size;
const int block = block_id - num_eliminate_blocks_;
MatrixTransposeVectorMultiply<Eigen::Dynamic, Eigen::Dynamic, 1>(
- row_values + row.cells[c].position, row.block.size, block_size,
+ values + row.cells[c].position, row.block.size, block_size,
b + row.block.position,
rhs + lhs_row_layout_[block]);
}
@@ -591,12 +590,12 @@ NoEBlockRowsUpdate(const BlockSparseMatrixBase* A,
template <int kRowBlockSize, int kEBlockSize, int kFBlockSize>
void
SchurEliminator<kRowBlockSize, kEBlockSize, kFBlockSize>::
-NoEBlockRowOuterProduct(const BlockSparseMatrixBase* A,
+NoEBlockRowOuterProduct(const BlockSparseMatrix* A,
int row_block_index,
BlockRandomAccessMatrix* lhs) {
const CompressedRowBlockStructure* bs = A->block_structure();
const CompressedRow& row = bs->rows[row_block_index];
- const double *row_values = A->RowBlockValues(row_block_index);
+ const double* values = A->values();
for (int i = 0; i < row.cells.size(); ++i) {
const int block1 = row.cells[i].block_id - num_eliminate_blocks_;
DCHECK_GE(block1, 0);
@@ -612,8 +611,8 @@ NoEBlockRowOuterProduct(const BlockSparseMatrixBase* A,
// symmetric outer product.
MatrixTransposeMatrixMultiply
<Eigen::Dynamic, Eigen::Dynamic, Eigen::Dynamic, Eigen::Dynamic, 1>(
- row_values + row.cells[i].position, row.block.size, block1_size,
- row_values + row.cells[i].position, row.block.size, block1_size,
+ values + row.cells[i].position, row.block.size, block1_size,
+ values + row.cells[i].position, row.block.size, block1_size,
cell_info->values, r, c, row_stride, col_stride);
}
@@ -630,8 +629,8 @@ NoEBlockRowOuterProduct(const BlockSparseMatrixBase* A,
CeresMutexLock l(&cell_info->m);
MatrixTransposeMatrixMultiply
<Eigen::Dynamic, Eigen::Dynamic, Eigen::Dynamic, Eigen::Dynamic, 1>(
- row_values + row.cells[i].position, row.block.size, block1_size,
- row_values + row.cells[j].position, row.block.size, block2_size,
+ values + row.cells[i].position, row.block.size, block1_size,
+ values + row.cells[j].position, row.block.size, block2_size,
cell_info->values, r, c, row_stride, col_stride);
}
}
@@ -644,12 +643,12 @@ NoEBlockRowOuterProduct(const BlockSparseMatrixBase* A,
template <int kRowBlockSize, int kEBlockSize, int kFBlockSize>
void
SchurEliminator<kRowBlockSize, kEBlockSize, kFBlockSize>::
-EBlockRowOuterProduct(const BlockSparseMatrixBase* A,
+EBlockRowOuterProduct(const BlockSparseMatrix* A,
int row_block_index,
BlockRandomAccessMatrix* lhs) {
const CompressedRowBlockStructure* bs = A->block_structure();
const CompressedRow& row = bs->rows[row_block_index];
- const double *row_values = A->RowBlockValues(row_block_index);
+ const double* values = A->values();
for (int i = 1; i < row.cells.size(); ++i) {
const int block1 = row.cells[i].block_id - num_eliminate_blocks_;
DCHECK_GE(block1, 0);
@@ -664,8 +663,8 @@ EBlockRowOuterProduct(const BlockSparseMatrixBase* A,
// block += b1.transpose() * b1;
MatrixTransposeMatrixMultiply
<kRowBlockSize, kFBlockSize, kRowBlockSize, kFBlockSize, 1>(
- row_values + row.cells[i].position, row.block.size, block1_size,
- row_values + row.cells[i].position, row.block.size, block1_size,
+ values + row.cells[i].position, row.block.size, block1_size,
+ values + row.cells[i].position, row.block.size, block1_size,
cell_info->values, r, c, row_stride, col_stride);
}
@@ -683,8 +682,8 @@ EBlockRowOuterProduct(const BlockSparseMatrixBase* A,
CeresMutexLock l(&cell_info->m);
MatrixTransposeMatrixMultiply
<kRowBlockSize, kFBlockSize, kRowBlockSize, kFBlockSize, 1>(
- row_values + row.cells[i].position, row.block.size, block1_size,
- row_values + row.cells[j].position, row.block.size, block2_size,
+ values + row.cells[i].position, row.block.size, block1_size,
+ values + row.cells[j].position, row.block.size, block2_size,
cell_info->values, r, c, row_stride, col_stride);
}
}
diff --git a/extern/libmv/third_party/ceres/internal/ceres/schur_jacobi_preconditioner.cc b/extern/libmv/third_party/ceres/internal/ceres/schur_jacobi_preconditioner.cc
index 33a666ed037..338df715c0a 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/schur_jacobi_preconditioner.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/schur_jacobi_preconditioner.cc
@@ -91,8 +91,8 @@ void SchurJacobiPreconditioner::InitEliminator(
}
// Update the values of the preconditioner matrix and factorize it.
-bool SchurJacobiPreconditioner::Update(const BlockSparseMatrixBase& A,
- const double* D) {
+bool SchurJacobiPreconditioner::UpdateImpl(const BlockSparseMatrix& A,
+ const double* D) {
const int num_rows = m_->num_rows();
CHECK_GT(num_rows, 0);
@@ -128,7 +128,7 @@ void SchurJacobiPreconditioner::RightMultiply(const double* x,
VectorRef(y, block_size) =
block
.selfadjointView<Eigen::Upper>()
- .ldlt()
+ .llt()
.solve(ConstVectorRef(x, block_size));
x += block_size;
diff --git a/extern/libmv/third_party/ceres/internal/ceres/schur_jacobi_preconditioner.h b/extern/libmv/third_party/ceres/internal/ceres/schur_jacobi_preconditioner.h
index 3addd73abd2..f6e7b0d37ef 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/schur_jacobi_preconditioner.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/schur_jacobi_preconditioner.h
@@ -50,7 +50,7 @@ namespace ceres {
namespace internal {
class BlockRandomAccessSparseMatrix;
-class BlockSparseMatrixBase;
+class BlockSparseMatrix;
struct CompressedRowBlockStructure;
class SchurEliminatorBase;
@@ -73,7 +73,7 @@ class SchurEliminatorBase;
// preconditioner.Update(A, NULL);
// preconditioner.RightMultiply(x, y);
//
-class SchurJacobiPreconditioner : public Preconditioner {
+class SchurJacobiPreconditioner : public BlockSparseMatrixPreconditioner {
public:
// Initialize the symbolic structure of the preconditioner. bs is
// the block structure of the linear system to be solved. It is used
@@ -86,12 +86,12 @@ class SchurJacobiPreconditioner : public Preconditioner {
virtual ~SchurJacobiPreconditioner();
// Preconditioner interface.
- virtual bool Update(const BlockSparseMatrixBase& A, const double* D);
virtual void RightMultiply(const double* x, double* y) const;
virtual int num_rows() const;
private:
void InitEliminator(const CompressedRowBlockStructure& bs);
+ virtual bool UpdateImpl(const BlockSparseMatrix& A, const double* D);
Preconditioner::Options options_;
diff --git a/extern/libmv/third_party/ceres/internal/ceres/small_blas.h b/extern/libmv/third_party/ceres/internal/ceres/small_blas.h
new file mode 100644
index 00000000000..e14e664b7fa
--- /dev/null
+++ b/extern/libmv/third_party/ceres/internal/ceres/small_blas.h
@@ -0,0 +1,406 @@
+// Ceres Solver - A fast non-linear least squares minimizer
+// Copyright 2013 Google Inc. All rights reserved.
+// http://code.google.com/p/ceres-solver/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+// * Neither the name of Google Inc. nor the names of its contributors may be
+// used to endorse or promote products derived from this software without
+// specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// Author: sameeragarwal@google.com (Sameer Agarwal)
+//
+// Simple blas functions for use in the Schur Eliminator. These are
+// fairly basic implementations which already yield a significant
+// speedup in the eliminator performance.
+
+#ifndef CERES_INTERNAL_SMALL_BLAS_H_
+#define CERES_INTERNAL_SMALL_BLAS_H_
+
+#include "ceres/internal/eigen.h"
+#include "glog/logging.h"
+
+namespace ceres {
+namespace internal {
+
+// Remove the ".noalias()" annotation from the matrix matrix
+// mutliplies to produce a correct build with the Android NDK,
+// including versions 6, 7, 8, and 8b, when built with STLPort and the
+// non-standalone toolchain (i.e. ndk-build). This appears to be a
+// compiler bug; if the workaround is not in place, the line
+//
+// block.noalias() -= A * B;
+//
+// gets compiled to
+//
+// block.noalias() += A * B;
+//
+// which breaks schur elimination. Introducing a temporary by removing the
+// .noalias() annotation causes the issue to disappear. Tracking this
+// issue down was tricky, since the test suite doesn't run when built with
+// the non-standalone toolchain.
+//
+// TODO(keir): Make a reproduction case for this and send it upstream.
+#ifdef CERES_WORK_AROUND_ANDROID_NDK_COMPILER_BUG
+#define CERES_MAYBE_NOALIAS
+#else
+#define CERES_MAYBE_NOALIAS .noalias()
+#endif
+
+// The following three macros are used to share code and reduce
+// template junk across the various GEMM variants.
+#define CERES_GEMM_BEGIN(name) \
+ template<int kRowA, int kColA, int kRowB, int kColB, int kOperation> \
+ inline void name(const double* A, \
+ const int num_row_a, \
+ const int num_col_a, \
+ const double* B, \
+ const int num_row_b, \
+ const int num_col_b, \
+ double* C, \
+ const int start_row_c, \
+ const int start_col_c, \
+ const int row_stride_c, \
+ const int col_stride_c)
+
+#define CERES_GEMM_NAIVE_HEADER \
+ DCHECK_GT(num_row_a, 0); \
+ DCHECK_GT(num_col_a, 0); \
+ DCHECK_GT(num_row_b, 0); \
+ DCHECK_GT(num_col_b, 0); \
+ DCHECK_GE(start_row_c, 0); \
+ DCHECK_GE(start_col_c, 0); \
+ DCHECK_GT(row_stride_c, 0); \
+ DCHECK_GT(col_stride_c, 0); \
+ DCHECK((kRowA == Eigen::Dynamic) || (kRowA == num_row_a)); \
+ DCHECK((kColA == Eigen::Dynamic) || (kColA == num_col_a)); \
+ DCHECK((kRowB == Eigen::Dynamic) || (kRowB == num_row_b)); \
+ DCHECK((kColB == Eigen::Dynamic) || (kColB == num_col_b)); \
+ const int NUM_ROW_A = (kRowA != Eigen::Dynamic ? kRowA : num_row_a); \
+ const int NUM_COL_A = (kColA != Eigen::Dynamic ? kColA : num_col_a); \
+ const int NUM_ROW_B = (kColB != Eigen::Dynamic ? kRowB : num_row_b); \
+ const int NUM_COL_B = (kColB != Eigen::Dynamic ? kColB : num_col_b);
+
+#define CERES_GEMM_EIGEN_HEADER \
+ const typename EigenTypes<kRowA, kColA>::ConstMatrixRef \
+ Aref(A, num_row_a, num_col_a); \
+ const typename EigenTypes<kRowB, kColB>::ConstMatrixRef \
+ Bref(B, num_row_b, num_col_b); \
+ MatrixRef Cref(C, row_stride_c, col_stride_c); \
+
+#define CERES_CALL_GEMM(name) \
+ name<kRowA, kColA, kRowB, kColB, kOperation>( \
+ A, num_row_a, num_col_a, \
+ B, num_row_b, num_col_b, \
+ C, start_row_c, start_col_c, row_stride_c, col_stride_c);
+
+
+// For the matrix-matrix functions below, there are three variants for
+// each functionality. Foo, FooNaive and FooEigen. Foo is the one to
+// be called by the user. FooNaive is a basic loop based
+// implementation and FooEigen uses Eigen's implementation. Foo
+// chooses between FooNaive and FooEigen depending on how many of the
+// template arguments are fixed at compile time. Currently, FooEigen
+// is called if all matrix dimensions are compile time
+// constants. FooNaive is called otherwise. This leads to the best
+// performance currently.
+//
+// The MatrixMatrixMultiply variants compute:
+//
+// C op A * B;
+//
+// The MatrixTransposeMatrixMultiply variants compute:
+//
+// C op A' * B
+//
+// where op can be +=, -=, or =.
+//
+// The template parameters (kRowA, kColA, kRowB, kColB) allow
+// specialization of the loop at compile time. If this information is
+// not available, then Eigen::Dynamic should be used as the template
+// argument.
+//
+// kOperation = 1 -> C += A * B
+// kOperation = -1 -> C -= A * B
+// kOperation = 0 -> C = A * B
+//
+// The functions can write into matrices C which are larger than the
+// matrix A * B. This is done by specifying the true size of C via
+// row_stride_c and col_stride_c, and then indicating where A * B
+// should be written into by start_row_c and start_col_c.
+//
+// Graphically if row_stride_c = 10, col_stride_c = 12, start_row_c =
+// 4 and start_col_c = 5, then if A = 3x2 and B = 2x4, we get
+//
+// ------------
+// ------------
+// ------------
+// ------------
+// -----xxxx---
+// -----xxxx---
+// -----xxxx---
+// ------------
+// ------------
+// ------------
+//
+CERES_GEMM_BEGIN(MatrixMatrixMultiplyEigen) {
+ CERES_GEMM_EIGEN_HEADER
+ Eigen::Block<MatrixRef, kRowA, kColB>
+ block(Cref, start_row_c, start_col_c, num_row_a, num_col_b);
+
+ if (kOperation > 0) {
+ block CERES_MAYBE_NOALIAS += Aref * Bref;
+ } else if (kOperation < 0) {
+ block CERES_MAYBE_NOALIAS -= Aref * Bref;
+ } else {
+ block CERES_MAYBE_NOALIAS = Aref * Bref;
+ }
+}
+
+CERES_GEMM_BEGIN(MatrixMatrixMultiplyNaive) {
+ CERES_GEMM_NAIVE_HEADER
+ DCHECK_EQ(NUM_COL_A, NUM_ROW_B);
+
+ const int NUM_ROW_C = NUM_ROW_A;
+ const int NUM_COL_C = NUM_COL_B;
+ DCHECK_LE(start_row_c + NUM_ROW_C, row_stride_c);
+ DCHECK_LE(start_col_c + NUM_COL_C, col_stride_c);
+
+ for (int row = 0; row < NUM_ROW_C; ++row) {
+ for (int col = 0; col < NUM_COL_C; ++col) {
+ double tmp = 0.0;
+ for (int k = 0; k < NUM_COL_A; ++k) {
+ tmp += A[row * NUM_COL_A + k] * B[k * NUM_COL_B + col];
+ }
+
+ const int index = (row + start_row_c) * col_stride_c + start_col_c + col;
+ if (kOperation > 0) {
+ C[index] += tmp;
+ } else if (kOperation < 0) {
+ C[index] -= tmp;
+ } else {
+ C[index] = tmp;
+ }
+ }
+ }
+}
+
+CERES_GEMM_BEGIN(MatrixMatrixMultiply) {
+#ifdef CERES_NO_CUSTOM_BLAS
+
+ CERES_CALL_GEMM(MatrixMatrixMultiplyEigen)
+ return;
+
+#else
+
+ if (kRowA != Eigen::Dynamic && kColA != Eigen::Dynamic &&
+ kRowB != Eigen::Dynamic && kColB != Eigen::Dynamic) {
+ CERES_CALL_GEMM(MatrixMatrixMultiplyEigen)
+ } else {
+ CERES_CALL_GEMM(MatrixMatrixMultiplyNaive)
+ }
+
+#endif
+}
+
+CERES_GEMM_BEGIN(MatrixTransposeMatrixMultiplyEigen) {
+ CERES_GEMM_EIGEN_HEADER
+ Eigen::Block<MatrixRef, kColA, kColB> block(Cref,
+ start_row_c, start_col_c,
+ num_col_a, num_col_b);
+ if (kOperation > 0) {
+ block CERES_MAYBE_NOALIAS += Aref.transpose() * Bref;
+ } else if (kOperation < 0) {
+ block CERES_MAYBE_NOALIAS -= Aref.transpose() * Bref;
+ } else {
+ block CERES_MAYBE_NOALIAS = Aref.transpose() * Bref;
+ }
+}
+
+CERES_GEMM_BEGIN(MatrixTransposeMatrixMultiplyNaive) {
+ CERES_GEMM_NAIVE_HEADER
+ DCHECK_EQ(NUM_ROW_A, NUM_ROW_B);
+
+ const int NUM_ROW_C = NUM_COL_A;
+ const int NUM_COL_C = NUM_COL_B;
+ DCHECK_LE(start_row_c + NUM_ROW_C, row_stride_c);
+ DCHECK_LE(start_col_c + NUM_COL_C, col_stride_c);
+
+ for (int row = 0; row < NUM_ROW_C; ++row) {
+ for (int col = 0; col < NUM_COL_C; ++col) {
+ double tmp = 0.0;
+ for (int k = 0; k < NUM_ROW_A; ++k) {
+ tmp += A[k * NUM_COL_A + row] * B[k * NUM_COL_B + col];
+ }
+
+ const int index = (row + start_row_c) * col_stride_c + start_col_c + col;
+ if (kOperation > 0) {
+ C[index]+= tmp;
+ } else if (kOperation < 0) {
+ C[index]-= tmp;
+ } else {
+ C[index]= tmp;
+ }
+ }
+ }
+}
+
+CERES_GEMM_BEGIN(MatrixTransposeMatrixMultiply) {
+#ifdef CERES_NO_CUSTOM_BLAS
+
+ CERES_CALL_GEMM(MatrixTransposeMatrixMultiplyEigen)
+ return;
+
+#else
+
+ if (kRowA != Eigen::Dynamic && kColA != Eigen::Dynamic &&
+ kRowB != Eigen::Dynamic && kColB != Eigen::Dynamic) {
+ CERES_CALL_GEMM(MatrixTransposeMatrixMultiplyEigen)
+ } else {
+ CERES_CALL_GEMM(MatrixTransposeMatrixMultiplyNaive)
+ }
+
+#endif
+}
+
+// Matrix-Vector multiplication
+//
+// c op A * b;
+//
+// where op can be +=, -=, or =.
+//
+// The template parameters (kRowA, kColA) allow specialization of the
+// loop at compile time. If this information is not available, then
+// Eigen::Dynamic should be used as the template argument.
+//
+// kOperation = 1 -> c += A' * b
+// kOperation = -1 -> c -= A' * b
+// kOperation = 0 -> c = A' * b
+template<int kRowA, int kColA, int kOperation>
+inline void MatrixVectorMultiply(const double* A,
+ const int num_row_a,
+ const int num_col_a,
+ const double* b,
+ double* c) {
+#ifdef CERES_NO_CUSTOM_BLAS
+ const typename EigenTypes<kRowA, kColA>::ConstMatrixRef
+ Aref(A, num_row_a, num_col_a);
+ const typename EigenTypes<kColA>::ConstVectorRef bref(b, num_col_a);
+ typename EigenTypes<kRowA>::VectorRef cref(c, num_row_a);
+
+ // lazyProduct works better than .noalias() for matrix-vector
+ // products.
+ if (kOperation > 0) {
+ cref += Aref.lazyProduct(bref);
+ } else if (kOperation < 0) {
+ cref -= Aref.lazyProduct(bref);
+ } else {
+ cref = Aref.lazyProduct(bref);
+ }
+#else
+
+ DCHECK_GT(num_row_a, 0);
+ DCHECK_GT(num_col_a, 0);
+ DCHECK((kRowA == Eigen::Dynamic) || (kRowA == num_row_a));
+ DCHECK((kColA == Eigen::Dynamic) || (kColA == num_col_a));
+
+ const int NUM_ROW_A = (kRowA != Eigen::Dynamic ? kRowA : num_row_a);
+ const int NUM_COL_A = (kColA != Eigen::Dynamic ? kColA : num_col_a);
+
+ for (int row = 0; row < NUM_ROW_A; ++row) {
+ double tmp = 0.0;
+ for (int col = 0; col < NUM_COL_A; ++col) {
+ tmp += A[row * NUM_COL_A + col] * b[col];
+ }
+
+ if (kOperation > 0) {
+ c[row] += tmp;
+ } else if (kOperation < 0) {
+ c[row] -= tmp;
+ } else {
+ c[row] = tmp;
+ }
+ }
+#endif // CERES_NO_CUSTOM_BLAS
+}
+
+// Similar to MatrixVectorMultiply, except that A is transposed, i.e.,
+//
+// c op A' * b;
+template<int kRowA, int kColA, int kOperation>
+inline void MatrixTransposeVectorMultiply(const double* A,
+ const int num_row_a,
+ const int num_col_a,
+ const double* b,
+ double* c) {
+#ifdef CERES_NO_CUSTOM_BLAS
+ const typename EigenTypes<kRowA, kColA>::ConstMatrixRef
+ Aref(A, num_row_a, num_col_a);
+ const typename EigenTypes<kRowA>::ConstVectorRef bref(b, num_row_a);
+ typename EigenTypes<kColA>::VectorRef cref(c, num_col_a);
+
+ // lazyProduct works better than .noalias() for matrix-vector
+ // products.
+ if (kOperation > 0) {
+ cref += Aref.transpose().lazyProduct(bref);
+ } else if (kOperation < 0) {
+ cref -= Aref.transpose().lazyProduct(bref);
+ } else {
+ cref = Aref.transpose().lazyProduct(bref);
+ }
+#else
+
+ DCHECK_GT(num_row_a, 0);
+ DCHECK_GT(num_col_a, 0);
+ DCHECK((kRowA == Eigen::Dynamic) || (kRowA == num_row_a));
+ DCHECK((kColA == Eigen::Dynamic) || (kColA == num_col_a));
+
+ const int NUM_ROW_A = (kRowA != Eigen::Dynamic ? kRowA : num_row_a);
+ const int NUM_COL_A = (kColA != Eigen::Dynamic ? kColA : num_col_a);
+
+ for (int row = 0; row < NUM_COL_A; ++row) {
+ double tmp = 0.0;
+ for (int col = 0; col < NUM_ROW_A; ++col) {
+ tmp += A[col * NUM_COL_A + row] * b[col];
+ }
+
+ if (kOperation > 0) {
+ c[row] += tmp;
+ } else if (kOperation < 0) {
+ c[row] -= tmp;
+ } else {
+ c[row] = tmp;
+ }
+ }
+#endif // CERES_NO_CUSTOM_BLAS
+}
+
+
+#undef CERES_MAYBE_NOALIAS
+#undef CERES_GEMM_BEGIN
+#undef CERES_GEMM_EIGEN_HEADER
+#undef CERES_GEMM_NAIVE_HEADER
+#undef CERES_CALL_GEMM
+
+} // namespace internal
+} // namespace ceres
+
+#endif // CERES_INTERNAL_SMALL_BLAS_H_
diff --git a/extern/libmv/third_party/ceres/internal/ceres/solver.cc b/extern/libmv/third_party/ceres/internal/ceres/solver.cc
index ea9ff1f488b..3b67746044c 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/solver.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/solver.cc
@@ -91,6 +91,7 @@ Solver::Summary::Summary()
fixed_cost(-1.0),
num_successful_steps(-1),
num_unsuccessful_steps(-1),
+ num_inner_iteration_steps(-1),
preprocessor_time_in_seconds(-1.0),
minimizer_time_in_seconds(-1.0),
postprocessor_time_in_seconds(-1.0),
@@ -98,6 +99,7 @@ Solver::Summary::Summary()
linear_solver_time_in_seconds(-1.0),
residual_evaluation_time_in_seconds(-1.0),
jacobian_evaluation_time_in_seconds(-1.0),
+ inner_iteration_time_in_seconds(-1.0),
num_parameter_blocks(-1),
num_parameters(-1),
num_effective_parameters(-1),
@@ -114,10 +116,12 @@ Solver::Summary::Summary()
num_linear_solver_threads_used(-1),
linear_solver_type_given(SPARSE_NORMAL_CHOLESKY),
linear_solver_type_used(SPARSE_NORMAL_CHOLESKY),
+ inner_iterations_given(false),
+ inner_iterations_used(false),
preconditioner_type(IDENTITY),
trust_region_strategy_type(LEVENBERG_MARQUARDT),
- inner_iterations(false),
- sparse_linear_algebra_library(SUITE_SPARSE),
+ dense_linear_algebra_library_type(EIGEN),
+ sparse_linear_algebra_library_type(SUITE_SPARSE),
line_search_direction_type(LBFGS),
line_search_type(ARMIJO) {
}
@@ -149,6 +153,7 @@ string Solver::Summary::BriefReport() const {
};
using internal::StringAppendF;
+using internal::StringPrintf;
string Solver::Summary::FullReport() const {
string report =
@@ -184,22 +189,30 @@ string Solver::Summary::FullReport() const {
num_residuals, num_residuals_reduced);
}
- // TODO(sameeragarwal): Refactor this into separate functions.
-
if (minimizer_type == TRUST_REGION) {
+ // TRUST_SEARCH HEADER
StringAppendF(&report, "\nMinimizer %19s\n",
"TRUST_REGION");
+
+ if (linear_solver_type_used == DENSE_NORMAL_CHOLESKY ||
+ linear_solver_type_used == DENSE_SCHUR ||
+ linear_solver_type_used == DENSE_QR) {
+ StringAppendF(&report, "\nDense linear algebra library %15s\n",
+ DenseLinearAlgebraLibraryTypeToString(
+ dense_linear_algebra_library_type));
+ }
+
if (linear_solver_type_used == SPARSE_NORMAL_CHOLESKY ||
linear_solver_type_used == SPARSE_SCHUR ||
(linear_solver_type_used == ITERATIVE_SCHUR &&
(preconditioner_type == CLUSTER_JACOBI ||
preconditioner_type == CLUSTER_TRIDIAGONAL))) {
- StringAppendF(&report, "\nSparse Linear Algebra Library %15s\n",
+ StringAppendF(&report, "\nSparse linear algebra library %15s\n",
SparseLinearAlgebraLibraryTypeToString(
- sparse_linear_algebra_library));
+ sparse_linear_algebra_library_type));
}
- StringAppendF(&report, "Trust Region Strategy %19s",
+ StringAppendF(&report, "Trust region strategy %19s",
TrustRegionStrategyTypeToString(
trust_region_strategy_type));
if (trust_region_strategy_type == DOGLEG) {
@@ -222,12 +235,9 @@ string Solver::Summary::FullReport() const {
StringAppendF(&report, "Preconditioner %25s%25s\n",
PreconditionerTypeToString(preconditioner_type),
PreconditionerTypeToString(preconditioner_type));
- } else {
- StringAppendF(&report, "Preconditioner %25s%25s\n",
- "N/A", "N/A");
}
- StringAppendF(&report, "Threads: % 25d% 25d\n",
+ StringAppendF(&report, "Threads % 25d% 25d\n",
num_threads_given, num_threads_used);
StringAppendF(&report, "Linear solver threads % 23d% 25d\n",
num_linear_solver_threads_given,
@@ -244,7 +254,14 @@ string Solver::Summary::FullReport() const {
used.c_str());
}
- if (inner_iterations) {
+ if (inner_iterations_given) {
+ StringAppendF(&report,
+ "Use inner iterations %20s %20s\n",
+ inner_iterations_given ? "True" : "False",
+ inner_iterations_used ? "True" : "False");
+ }
+
+ if (inner_iterations_used) {
string given;
StringifyOrdering(inner_iteration_ordering_given, &given);
string used;
@@ -254,119 +271,107 @@ string Solver::Summary::FullReport() const {
given.c_str(),
used.c_str());
}
-
- if (termination_type == DID_NOT_RUN) {
- CHECK(!error.empty())
- << "Solver terminated with DID_NOT_RUN but the solver did not "
- << "return a reason. This is a Ceres error. Please report this "
- << "to the Ceres team";
- StringAppendF(&report, "Termination: %20s\n",
- "DID_NOT_RUN");
- StringAppendF(&report, "Reason: %s\n", error.c_str());
- return report;
- }
-
- StringAppendF(&report, "\nCost:\n");
- StringAppendF(&report, "Initial % 30e\n", initial_cost);
- if (termination_type != NUMERICAL_FAILURE &&
- termination_type != USER_ABORT) {
- StringAppendF(&report, "Final % 30e\n", final_cost);
- StringAppendF(&report, "Change % 30e\n",
- initial_cost - final_cost);
- }
-
- StringAppendF(&report, "\nNumber of iterations:\n");
- StringAppendF(&report, "Successful % 20d\n",
- num_successful_steps);
- StringAppendF(&report, "Unsuccessful % 20d\n",
- num_unsuccessful_steps);
- StringAppendF(&report, "Total % 20d\n",
- num_successful_steps + num_unsuccessful_steps);
-
- StringAppendF(&report, "\nTime (in seconds):\n");
- StringAppendF(&report, "Preprocessor %25.3f\n",
- preprocessor_time_in_seconds);
- StringAppendF(&report, "\n Residual Evaluations %22.3f\n",
- residual_evaluation_time_in_seconds);
- StringAppendF(&report, " Jacobian Evaluations %22.3f\n",
- jacobian_evaluation_time_in_seconds);
- StringAppendF(&report, " Linear Solver %23.3f\n",
- linear_solver_time_in_seconds);
- StringAppendF(&report, "Minimizer %25.3f\n\n",
- minimizer_time_in_seconds);
-
- StringAppendF(&report, "Postprocessor %24.3f\n",
- postprocessor_time_in_seconds);
-
- StringAppendF(&report, "Total %25.3f\n\n",
- total_time_in_seconds);
-
- StringAppendF(&report, "Termination: %25s\n",
- SolverTerminationTypeToString(termination_type));
} else {
- // LINE_SEARCH
+ // LINE_SEARCH HEADER
StringAppendF(&report, "\nMinimizer %19s\n", "LINE_SEARCH");
+
+
+ string line_search_direction_string;
if (line_search_direction_type == LBFGS) {
- StringAppendF(&report, "Line search direction %19s(%d)\n",
- LineSearchDirectionTypeToString(line_search_direction_type),
- max_lbfgs_rank);
+ line_search_direction_string = StringPrintf("LBFGS (%d)", max_lbfgs_rank);
+ } else if (line_search_direction_type == NONLINEAR_CONJUGATE_GRADIENT) {
+ line_search_direction_string =
+ NonlinearConjugateGradientTypeToString(
+ nonlinear_conjugate_gradient_type);
} else {
- StringAppendF(&report, "Line search direction %19s\n",
- LineSearchDirectionTypeToString(
- line_search_direction_type));
+ line_search_direction_string =
+ LineSearchDirectionTypeToString(line_search_direction_type);
}
- StringAppendF(&report, "Line search type %19s\n",
- LineSearchTypeToString(line_search_type));
+ StringAppendF(&report, "Line search direction %19s\n",
+ line_search_direction_string.c_str());
+
+ const string line_search_type_string =
+ StringPrintf("%s %s",
+ LineSearchInterpolationTypeToString(
+ line_search_interpolation_type),
+ LineSearchTypeToString(line_search_type));
+ StringAppendF(&report, "Line search type %19s\n",
+ line_search_type_string.c_str());
StringAppendF(&report, "\n");
StringAppendF(&report, "%45s %21s\n", "Given", "Used");
- StringAppendF(&report, "Threads: % 25d% 25d\n",
+ StringAppendF(&report, "Threads % 25d% 25d\n",
num_threads_given, num_threads_used);
+ }
- if (termination_type == DID_NOT_RUN) {
- CHECK(!error.empty())
- << "Solver terminated with DID_NOT_RUN but the solver did not "
- << "return a reason. This is a Ceres error. Please report this "
- << "to the Ceres team";
- StringAppendF(&report, "Termination: %20s\n",
- "DID_NOT_RUN");
- StringAppendF(&report, "Reason: %s\n", error.c_str());
- return report;
- }
+ if (termination_type == DID_NOT_RUN) {
+ CHECK(!error.empty())
+ << "Solver terminated with DID_NOT_RUN but the solver did not "
+ << "return a reason. This is a Ceres error. Please report this "
+ << "to the Ceres team";
+ StringAppendF(&report, "Termination: %20s\n",
+ "DID_NOT_RUN");
+ StringAppendF(&report, "Reason: %s\n", error.c_str());
+ return report;
+ }
- StringAppendF(&report, "\nCost:\n");
- StringAppendF(&report, "Initial % 30e\n", initial_cost);
- if (termination_type != NUMERICAL_FAILURE &&
- termination_type != USER_ABORT) {
- StringAppendF(&report, "Final % 30e\n", final_cost);
- StringAppendF(&report, "Change % 30e\n",
- initial_cost - final_cost);
- }
+ StringAppendF(&report, "\nCost:\n");
+ StringAppendF(&report, "Initial % 30e\n", initial_cost);
+ if (termination_type != NUMERICAL_FAILURE &&
+ termination_type != USER_ABORT) {
+ StringAppendF(&report, "Final % 30e\n", final_cost);
+ StringAppendF(&report, "Change % 30e\n",
+ initial_cost - final_cost);
+ }
- StringAppendF(&report, "\nNumber of iterations: % 20d\n",
- static_cast<int>(iterations.size() - 1));
+ StringAppendF(&report, "\nMinimizer iterations % 16d\n",
+ num_successful_steps + num_unsuccessful_steps);
- StringAppendF(&report, "\nTime (in seconds):\n");
- StringAppendF(&report, "Preprocessor %25.3f\n",
- preprocessor_time_in_seconds);
- StringAppendF(&report, "\n Residual Evaluations %22.3f\n",
- residual_evaluation_time_in_seconds);
- StringAppendF(&report, " Jacobian Evaluations %22.3f\n",
- jacobian_evaluation_time_in_seconds);
- StringAppendF(&report, "Minimizer %25.3f\n\n",
- minimizer_time_in_seconds);
+ // Successful/Unsuccessful steps only matter in the case of the
+ // trust region solver. Line search terminates when it encounters
+ // the first unsuccessful step.
+ if (minimizer_type == TRUST_REGION) {
+ StringAppendF(&report, "Successful steps % 14d\n",
+ num_successful_steps);
+ StringAppendF(&report, "Unsuccessful steps % 14d\n",
+ num_unsuccessful_steps);
+ }
+ if (inner_iterations_used) {
+ StringAppendF(&report, "Steps with inner iterations % 14d\n",
+ num_inner_iteration_steps);
+ }
- StringAppendF(&report, "Postprocessor %24.3f\n",
- postprocessor_time_in_seconds);
+ StringAppendF(&report, "\nTime (in seconds):\n");
+ StringAppendF(&report, "Preprocessor %25.3f\n",
+ preprocessor_time_in_seconds);
- StringAppendF(&report, "Total %25.3f\n\n",
- total_time_in_seconds);
+ StringAppendF(&report, "\n Residual evaluation %23.3f\n",
+ residual_evaluation_time_in_seconds);
+ StringAppendF(&report, " Jacobian evaluation %23.3f\n",
+ jacobian_evaluation_time_in_seconds);
- StringAppendF(&report, "Termination: %25s\n",
- SolverTerminationTypeToString(termination_type));
+ if (minimizer_type == TRUST_REGION) {
+ StringAppendF(&report, " Linear solver %23.3f\n",
+ linear_solver_time_in_seconds);
+ }
+
+ if (inner_iterations_used) {
+ StringAppendF(&report, " Inner iterations %23.3f\n",
+ inner_iteration_time_in_seconds);
}
+ StringAppendF(&report, "Minimizer %25.3f\n\n",
+ minimizer_time_in_seconds);
+
+ StringAppendF(&report, "Postprocessor %24.3f\n",
+ postprocessor_time_in_seconds);
+
+ StringAppendF(&report, "Total %25.3f\n\n",
+ total_time_in_seconds);
+
+ StringAppendF(&report, "Termination: %25s\n",
+ SolverTerminationTypeToString(termination_type));
return report;
};
diff --git a/extern/libmv/third_party/ceres/internal/ceres/solver_impl.cc b/extern/libmv/third_party/ceres/internal/ceres/solver_impl.cc
index 43c0be6180d..83faa0510c0 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/solver_impl.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/solver_impl.cc
@@ -33,7 +33,9 @@
#include <cstdio>
#include <iostream> // NOLINT
#include <numeric>
+#include <string>
#include "ceres/coordinate_descent_minimizer.h"
+#include "ceres/cxsparse.h"
#include "ceres/evaluator.h"
#include "ceres/gradient_checking_cost_function.h"
#include "ceres/iteration_callback.h"
@@ -253,8 +255,8 @@ void SolverImpl::TrustRegionMinimize(
trust_region_strategy_options.initial_radius =
options.initial_trust_region_radius;
trust_region_strategy_options.max_radius = options.max_trust_region_radius;
- trust_region_strategy_options.lm_min_diagonal = options.lm_min_diagonal;
- trust_region_strategy_options.lm_max_diagonal = options.lm_max_diagonal;
+ trust_region_strategy_options.min_lm_diagonal = options.min_lm_diagonal;
+ trust_region_strategy_options.max_lm_diagonal = options.max_lm_diagonal;
trust_region_strategy_options.trust_region_strategy_type =
options.trust_region_strategy_type;
trust_region_strategy_options.dogleg_type = options.dogleg_type;
@@ -315,6 +317,16 @@ void SolverImpl::LineSearchMinimize(
void SolverImpl::Solve(const Solver::Options& options,
ProblemImpl* problem_impl,
Solver::Summary* summary) {
+ VLOG(2) << "Initial problem: "
+ << problem_impl->NumParameterBlocks()
+ << " parameter blocks, "
+ << problem_impl->NumParameters()
+ << " parameters, "
+ << problem_impl->NumResidualBlocks()
+ << " residual blocks, "
+ << problem_impl->NumResiduals()
+ << " residuals.";
+
if (options.minimizer_type == TRUST_REGION) {
TrustRegionSolve(options, problem_impl, summary);
} else {
@@ -389,9 +401,13 @@ void SolverImpl::TrustRegionSolve(const Solver::Options& original_options,
summary->num_threads_given = original_options.num_threads;
summary->num_threads_used = options.num_threads;
- if (options.lsqp_iterations_to_dump.size() > 0) {
- LOG(WARNING) << "Dumping linear least squares problems to disk is"
- " currently broken. Ignoring Solver::Options::lsqp_iterations_to_dump";
+ if (options.trust_region_minimizer_iterations_to_dump.size() > 0 &&
+ options.trust_region_problem_dump_format_type != CONSOLE &&
+ options.trust_region_problem_dump_directory.empty()) {
+ summary->error =
+ "Solver::Options::trust_region_problem_dump_directory is empty.";
+ LOG(ERROR) << summary->error;
+ return;
}
event_logger.AddEvent("Init");
@@ -500,8 +516,10 @@ void SolverImpl::TrustRegionSolve(const Solver::Options& original_options,
original_options.num_linear_solver_threads;
summary->num_linear_solver_threads_used = options.num_linear_solver_threads;
- summary->sparse_linear_algebra_library =
- options.sparse_linear_algebra_library;
+ summary->dense_linear_algebra_library_type =
+ options.dense_linear_algebra_library_type;
+ summary->sparse_linear_algebra_library_type =
+ options.sparse_linear_algebra_library_type;
summary->trust_region_strategy_type = options.trust_region_strategy_type;
summary->dogleg_type = options.dogleg_type;
@@ -534,8 +552,7 @@ void SolverImpl::TrustRegionSolve(const Solver::Options& original_options,
}
}
}
-
- event_logger.AddEvent("CreateIIM");
+ event_logger.AddEvent("CreateInnerIterationMinimizer");
// The optimizer works on contiguous parameter vectors; allocate some.
Vector parameters(reduced_program->NumParameters());
@@ -619,10 +636,98 @@ void SolverImpl::LineSearchSolve(const Solver::Options& original_options,
original_options.line_search_direction_type;
summary->max_lbfgs_rank = original_options.max_lbfgs_rank;
summary->line_search_type = original_options.line_search_type;
- summary->num_parameter_blocks = problem_impl->NumParameterBlocks();
- summary->num_parameters = problem_impl->NumParameters();
- summary->num_residual_blocks = problem_impl->NumResidualBlocks();
- summary->num_residuals = problem_impl->NumResiduals();
+ summary->line_search_interpolation_type =
+ original_options.line_search_interpolation_type;
+ summary->nonlinear_conjugate_gradient_type =
+ original_options.nonlinear_conjugate_gradient_type;
+
+ summary->num_parameter_blocks = original_program->NumParameterBlocks();
+ summary->num_parameters = original_program->NumParameters();
+ summary->num_residual_blocks = original_program->NumResidualBlocks();
+ summary->num_residuals = original_program->NumResiduals();
+ summary->num_effective_parameters =
+ original_program->NumEffectiveParameters();
+
+ // Validate values for configuration parameters supplied by user.
+ if ((original_options.line_search_direction_type == ceres::BFGS ||
+ original_options.line_search_direction_type == ceres::LBFGS) &&
+ original_options.line_search_type != ceres::WOLFE) {
+ summary->error =
+ string("Invalid configuration: require line_search_type == "
+ "ceres::WOLFE when using (L)BFGS to ensure that underlying "
+ "assumptions are guaranteed to be satisfied.");
+ LOG(ERROR) << summary->error;
+ return;
+ }
+ if (original_options.max_lbfgs_rank <= 0) {
+ summary->error =
+ string("Invalid configuration: require max_lbfgs_rank > 0");
+ LOG(ERROR) << summary->error;
+ return;
+ }
+ if (original_options.min_line_search_step_size <= 0.0) {
+ summary->error = "Invalid configuration: min_line_search_step_size <= 0.0.";
+ LOG(ERROR) << summary->error;
+ return;
+ }
+ if (original_options.line_search_sufficient_function_decrease <= 0.0) {
+ summary->error =
+ string("Invalid configuration: require ") +
+ string("line_search_sufficient_function_decrease <= 0.0.");
+ LOG(ERROR) << summary->error;
+ return;
+ }
+ if (original_options.max_line_search_step_contraction <= 0.0 ||
+ original_options.max_line_search_step_contraction >= 1.0) {
+ summary->error = string("Invalid configuration: require ") +
+ string("0.0 < max_line_search_step_contraction < 1.0.");
+ LOG(ERROR) << summary->error;
+ return;
+ }
+ if (original_options.min_line_search_step_contraction <=
+ original_options.max_line_search_step_contraction ||
+ original_options.min_line_search_step_contraction > 1.0) {
+ summary->error = string("Invalid configuration: require ") +
+ string("max_line_search_step_contraction < ") +
+ string("min_line_search_step_contraction <= 1.0.");
+ LOG(ERROR) << summary->error;
+ return;
+ }
+ // Warn user if they have requested BISECTION interpolation, but constraints
+ // on max/min step size change during line search prevent bisection scaling
+ // from occurring. Warn only, as this is likely a user mistake, but one which
+ // does not prevent us from continuing.
+ LOG_IF(WARNING,
+ (original_options.line_search_interpolation_type == ceres::BISECTION &&
+ (original_options.max_line_search_step_contraction > 0.5 ||
+ original_options.min_line_search_step_contraction < 0.5)))
+ << "Line search interpolation type is BISECTION, but specified "
+ << "max_line_search_step_contraction: "
+ << original_options.max_line_search_step_contraction << ", and "
+ << "min_line_search_step_contraction: "
+ << original_options.min_line_search_step_contraction
+ << ", prevent bisection (0.5) scaling, continuing with solve regardless.";
+ if (original_options.max_num_line_search_step_size_iterations <= 0) {
+ summary->error = string("Invalid configuration: require ") +
+ string("max_num_line_search_step_size_iterations > 0.");
+ LOG(ERROR) << summary->error;
+ return;
+ }
+ if (original_options.line_search_sufficient_curvature_decrease <=
+ original_options.line_search_sufficient_function_decrease ||
+ original_options.line_search_sufficient_curvature_decrease > 1.0) {
+ summary->error = string("Invalid configuration: require ") +
+ string("line_search_sufficient_function_decrease < ") +
+ string("line_search_sufficient_curvature_decrease < 1.0.");
+ LOG(ERROR) << summary->error;
+ return;
+ }
+ if (original_options.max_line_search_step_expansion <= 1.0) {
+ summary->error = string("Invalid configuration: require ") +
+ string("max_line_search_step_expansion > 1.0.");
+ LOG(ERROR) << summary->error;
+ return;
+ }
// Empty programs are usually a user error.
if (summary->num_parameter_blocks == 0) {
@@ -712,6 +817,8 @@ void SolverImpl::LineSearchSolve(const Solver::Options& original_options,
summary->num_parameter_blocks_reduced = reduced_program->NumParameterBlocks();
summary->num_parameters_reduced = reduced_program->NumParameters();
summary->num_residual_blocks_reduced = reduced_program->NumResidualBlocks();
+ summary->num_effective_parameters_reduced =
+ reduced_program->NumEffectiveParameters();
summary->num_residuals_reduced = reduced_program->NumResiduals();
if (summary->num_parameter_blocks_reduced == 0) {
@@ -972,6 +1079,16 @@ Program* SolverImpl::CreateReducedProgram(Solver::Options* options,
return NULL;
}
+ VLOG(2) << "Reduced problem: "
+ << transformed_program->NumParameterBlocks()
+ << " parameter blocks, "
+ << transformed_program->NumParameters()
+ << " parameters, "
+ << transformed_program->NumResidualBlocks()
+ << " residual blocks, "
+ << transformed_program->NumResiduals()
+ << " residuals.";
+
if (transformed_program->NumParameterBlocks() == 0) {
LOG(WARNING) << "No varying parameter blocks to optimize; "
<< "bailing early.";
@@ -995,18 +1112,27 @@ Program* SolverImpl::CreateReducedProgram(Solver::Options* options,
}
if (IsSchurType(options->linear_solver_type)) {
- if (!ReorderProgramForSchurTypeLinearSolver(problem_impl->parameter_map(),
- linear_solver_ordering,
- transformed_program.get(),
- error)) {
+ if (!ReorderProgramForSchurTypeLinearSolver(
+ options->linear_solver_type,
+ options->sparse_linear_algebra_library_type,
+ problem_impl->parameter_map(),
+ linear_solver_ordering,
+ transformed_program.get(),
+ error)) {
return NULL;
}
return transformed_program.release();
}
- if (options->linear_solver_type == SPARSE_NORMAL_CHOLESKY &&
- options->sparse_linear_algebra_library == SUITE_SPARSE) {
- ReorderProgramForSparseNormalCholesky(transformed_program.get());
+ if (options->linear_solver_type == SPARSE_NORMAL_CHOLESKY) {
+ if (!ReorderProgramForSparseNormalCholesky(
+ options->sparse_linear_algebra_library_type,
+ linear_solver_ordering,
+ transformed_program.get(),
+ error)) {
+ return NULL;
+ }
+
return transformed_program.release();
}
@@ -1030,9 +1156,32 @@ LinearSolver* SolverImpl::CreateLinearSolver(Solver::Options* options,
}
}
+#ifdef CERES_NO_LAPACK
+ if (options->linear_solver_type == DENSE_NORMAL_CHOLESKY &&
+ options->dense_linear_algebra_library_type == LAPACK) {
+ *error = "Can't use DENSE_NORMAL_CHOLESKY with LAPACK because "
+ "LAPACK was not enabled when Ceres was built.";
+ return NULL;
+ }
+
+ if (options->linear_solver_type == DENSE_QR &&
+ options->dense_linear_algebra_library_type == LAPACK) {
+ *error = "Can't use DENSE_QR with LAPACK because "
+ "LAPACK was not enabled when Ceres was built.";
+ return NULL;
+ }
+
+ if (options->linear_solver_type == DENSE_SCHUR &&
+ options->dense_linear_algebra_library_type == LAPACK) {
+ *error = "Can't use DENSE_SCHUR with LAPACK because "
+ "LAPACK was not enabled when Ceres was built.";
+ return NULL;
+ }
+#endif
+
#ifdef CERES_NO_SUITESPARSE
if (options->linear_solver_type == SPARSE_NORMAL_CHOLESKY &&
- options->sparse_linear_algebra_library == SUITE_SPARSE) {
+ options->sparse_linear_algebra_library_type == SUITE_SPARSE) {
*error = "Can't use SPARSE_NORMAL_CHOLESKY with SUITESPARSE because "
"SuiteSparse was not enabled when Ceres was built.";
return NULL;
@@ -1053,7 +1202,7 @@ LinearSolver* SolverImpl::CreateLinearSolver(Solver::Options* options,
#ifdef CERES_NO_CXSPARSE
if (options->linear_solver_type == SPARSE_NORMAL_CHOLESKY &&
- options->sparse_linear_algebra_library == CX_SPARSE) {
+ options->sparse_linear_algebra_library_type == CX_SPARSE) {
*error = "Can't use SPARSE_NORMAL_CHOLESKY with CXSPARSE because "
"CXSparse was not enabled when Ceres was built.";
return NULL;
@@ -1068,31 +1217,45 @@ LinearSolver* SolverImpl::CreateLinearSolver(Solver::Options* options,
}
#endif
- if (options->linear_solver_max_num_iterations <= 0) {
- *error = "Solver::Options::linear_solver_max_num_iterations is 0.";
+ if (options->max_linear_solver_iterations <= 0) {
+ *error = "Solver::Options::max_linear_solver_iterations is not positive.";
return NULL;
}
- if (options->linear_solver_min_num_iterations <= 0) {
- *error = "Solver::Options::linear_solver_min_num_iterations is 0.";
+ if (options->min_linear_solver_iterations <= 0) {
+ *error = "Solver::Options::min_linear_solver_iterations is not positive.";
return NULL;
}
- if (options->linear_solver_min_num_iterations >
- options->linear_solver_max_num_iterations) {
- *error = "Solver::Options::linear_solver_min_num_iterations > "
- "Solver::Options::linear_solver_max_num_iterations.";
+ if (options->min_linear_solver_iterations >
+ options->max_linear_solver_iterations) {
+ *error = "Solver::Options::min_linear_solver_iterations > "
+ "Solver::Options::max_linear_solver_iterations.";
return NULL;
}
LinearSolver::Options linear_solver_options;
linear_solver_options.min_num_iterations =
- options->linear_solver_min_num_iterations;
+ options->min_linear_solver_iterations;
linear_solver_options.max_num_iterations =
- options->linear_solver_max_num_iterations;
+ options->max_linear_solver_iterations;
linear_solver_options.type = options->linear_solver_type;
linear_solver_options.preconditioner_type = options->preconditioner_type;
- linear_solver_options.sparse_linear_algebra_library =
- options->sparse_linear_algebra_library;
+ linear_solver_options.sparse_linear_algebra_library_type =
+ options->sparse_linear_algebra_library_type;
+ linear_solver_options.dense_linear_algebra_library_type =
+ options->dense_linear_algebra_library_type;
linear_solver_options.use_postordering = options->use_postordering;
+
+ // Ignore user's postordering preferences and force it to be true if
+ // cholmod_camd is not available. This ensures that the linear
+ // solver does not assume that a fill-reducing pre-ordering has been
+ // done.
+#if !defined(CERES_NO_SUITESPARSE) && defined(CERES_NO_CAMD)
+ if (IsSchurType(linear_solver_options.type) &&
+ options->sparse_linear_algebra_library_type == SUITE_SPARSE) {
+ linear_solver_options.use_postordering = true;
+ }
+#endif
+
linear_solver_options.num_threads = options->num_linear_solver_threads;
options->num_linear_solver_threads = linear_solver_options.num_threads;
@@ -1115,48 +1278,6 @@ LinearSolver* SolverImpl::CreateLinearSolver(Solver::Options* options,
return LinearSolver::Create(linear_solver_options);
}
-bool SolverImpl::ApplyUserOrdering(
- const ProblemImpl::ParameterMap& parameter_map,
- const ParameterBlockOrdering* ordering,
- Program* program,
- string* error) {
- if (ordering->NumElements() != program->NumParameterBlocks()) {
- *error = StringPrintf("User specified ordering does not have the same "
- "number of parameters as the problem. The problem"
- "has %d blocks while the ordering has %d blocks.",
- program->NumParameterBlocks(),
- ordering->NumElements());
- return false;
- }
-
- vector<ParameterBlock*>* parameter_blocks =
- program->mutable_parameter_blocks();
- parameter_blocks->clear();
-
- const map<int, set<double*> >& groups =
- ordering->group_to_elements();
-
- for (map<int, set<double*> >::const_iterator group_it = groups.begin();
- group_it != groups.end();
- ++group_it) {
- const set<double*>& group = group_it->second;
- for (set<double*>::const_iterator parameter_block_ptr_it = group.begin();
- parameter_block_ptr_it != group.end();
- ++parameter_block_ptr_it) {
- ProblemImpl::ParameterMap::const_iterator parameter_block_it =
- parameter_map.find(*parameter_block_ptr_it);
- if (parameter_block_it == parameter_map.end()) {
- *error = StringPrintf("User specified ordering contains a pointer "
- "to a double that is not a parameter block in "
- "the problem. The invalid double is in group: %d",
- group_it->first);
- return false;
- }
- parameter_blocks->push_back(parameter_block_it->second);
- }
- }
- return true;
-}
// Find the minimum index of any parameter block to the given residual.
// Parameter blocks that have indices greater than num_eliminate_blocks are
@@ -1283,6 +1404,8 @@ CoordinateDescentMinimizer* SolverImpl::CreateInnerIterationMinimizer(
const Program& program,
const ProblemImpl::ParameterMap& parameter_map,
Solver::Summary* summary) {
+ summary->inner_iterations_given = true;
+
scoped_ptr<CoordinateDescentMinimizer> inner_iteration_minimizer(
new CoordinateDescentMinimizer);
scoped_ptr<ParameterBlockOrdering> inner_iteration_ordering;
@@ -1325,9 +1448,9 @@ CoordinateDescentMinimizer* SolverImpl::CreateInnerIterationMinimizer(
return NULL;
}
- summary->inner_iterations = true;
+ summary->inner_iterations_used = true;
+ summary->inner_iteration_time_in_seconds = 0.0;
SummarizeOrdering(ordering_ptr, &(summary->inner_iteration_ordering_used));
-
return inner_iteration_minimizer.release();
}
@@ -1357,75 +1480,62 @@ void SolverImpl::AlternateLinearSolverForSchurTypeLinearSolver(
// CGNR currently only supports the JACOBI preconditioner.
options->preconditioner_type = JACOBI;
} else {
- msg += StringPrintf("ITERATIVE_SCHUR with IDENTITY preconditioner "
- "to CGNR with IDENTITY preconditioner.");
+ msg += "ITERATIVE_SCHUR with IDENTITY preconditioner"
+ "to CGNR with IDENTITY preconditioner.";
}
}
LOG(WARNING) << msg;
}
-bool SolverImpl::ReorderProgramForSchurTypeLinearSolver(
+bool SolverImpl::ApplyUserOrdering(
const ProblemImpl::ParameterMap& parameter_map,
- ParameterBlockOrdering* ordering,
+ const ParameterBlockOrdering* parameter_block_ordering,
Program* program,
string* error) {
- // At this point one of two things is true.
- //
- // 1. The user did not specify an ordering - ordering has one
- // group containined all the parameter blocks.
-
- // 2. The user specified an ordering, and the first group has
- // non-zero elements.
- //
- // We handle these two cases in turn.
- if (ordering->NumGroups() == 1) {
- // If the user supplied an ordering with just one
- // group, it is equivalent to the user supplying NULL as an
- // ordering. Ceres is completely free to choose the parameter
- // block ordering as it sees fit. For Schur type solvers, this
- // means that the user wishes for Ceres to identify the e_blocks,
- // which we do by computing a maximal independent set.
- vector<ParameterBlock*> schur_ordering;
- const int num_eliminate_blocks = ComputeSchurOrdering(*program,
- &schur_ordering);
+ const int num_parameter_blocks = program->NumParameterBlocks();
+ if (parameter_block_ordering->NumElements() != num_parameter_blocks) {
+ *error = StringPrintf("User specified ordering does not have the same "
+ "number of parameters as the problem. The problem"
+ "has %d blocks while the ordering has %d blocks.",
+ num_parameter_blocks,
+ parameter_block_ordering->NumElements());
+ return false;
+ }
- CHECK_EQ(schur_ordering.size(), program->NumParameterBlocks())
- << "Congratulations, you found a Ceres bug! Please report this error "
- << "to the developers.";
+ vector<ParameterBlock*>* parameter_blocks =
+ program->mutable_parameter_blocks();
+ parameter_blocks->clear();
- // Update the ordering object.
- for (int i = 0; i < schur_ordering.size(); ++i) {
- double* parameter_block = schur_ordering[i]->mutable_user_state();
- const int group_id = (i < num_eliminate_blocks) ? 0 : 1;
- ordering->AddElementToGroup(parameter_block, group_id);
- }
+ const map<int, set<double*> >& groups =
+ parameter_block_ordering->group_to_elements();
- // Apply the parameter block re-ordering. Technically we could
- // call ApplyUserOrdering, but this is cheaper and simpler.
- swap(*program->mutable_parameter_blocks(), schur_ordering);
- } else {
- // The user supplied an ordering.
- if (!ApplyUserOrdering(parameter_map, ordering, program, error)) {
- return false;
+ for (map<int, set<double*> >::const_iterator group_it = groups.begin();
+ group_it != groups.end();
+ ++group_it) {
+ const set<double*>& group = group_it->second;
+ for (set<double*>::const_iterator parameter_block_ptr_it = group.begin();
+ parameter_block_ptr_it != group.end();
+ ++parameter_block_ptr_it) {
+ ProblemImpl::ParameterMap::const_iterator parameter_block_it =
+ parameter_map.find(*parameter_block_ptr_it);
+ if (parameter_block_it == parameter_map.end()) {
+ *error = StringPrintf("User specified ordering contains a pointer "
+ "to a double that is not a parameter block in "
+ "the problem. The invalid double is in group: %d",
+ group_it->first);
+ return false;
+ }
+ parameter_blocks->push_back(parameter_block_it->second);
}
}
-
- program->SetParameterOffsetsAndIndex();
-
- const int num_eliminate_blocks =
- ordering->group_to_elements().begin()->second.size();
-
- // Schur type solvers also require that their residual blocks be
- // lexicographically ordered.
- return LexicographicallyOrderResidualBlocks(num_eliminate_blocks,
- program,
- error);
+ return true;
}
+
TripletSparseMatrix* SolverImpl::CreateJacobianBlockSparsityTranspose(
const Program* program) {
- // Matrix to store the block sparsity structure of
+ // Matrix to store the block sparsity structure of the Jacobian.
TripletSparseMatrix* tsm =
new TripletSparseMatrix(program->NumParameterBlocks(),
program->NumResidualBlocks(),
@@ -1449,6 +1559,7 @@ TripletSparseMatrix* SolverImpl::CreateJacobianBlockSparsityTranspose(
// Re-size the matrix if needed.
if (num_nonzeros >= tsm->max_num_nonzeros()) {
+ tsm->set_num_nonzeros(num_nonzeros);
tsm->Reserve(2 * num_nonzeros);
rows = tsm->mutable_rows();
cols = tsm->mutable_cols();
@@ -1468,34 +1579,205 @@ TripletSparseMatrix* SolverImpl::CreateJacobianBlockSparsityTranspose(
return tsm;
}
-void SolverImpl::ReorderProgramForSparseNormalCholesky(Program* program) {
-#ifndef CERES_NO_SUITESPARSE
- // Set the offsets and index for CreateJacobianSparsityTranspose.
+bool SolverImpl::ReorderProgramForSchurTypeLinearSolver(
+ const LinearSolverType linear_solver_type,
+ const SparseLinearAlgebraLibraryType sparse_linear_algebra_library_type,
+ const ProblemImpl::ParameterMap& parameter_map,
+ ParameterBlockOrdering* parameter_block_ordering,
+ Program* program,
+ string* error) {
+ if (parameter_block_ordering->NumGroups() == 1) {
+ // If the user supplied an parameter_block_ordering with just one
+ // group, it is equivalent to the user supplying NULL as an
+ // parameter_block_ordering. Ceres is completely free to choose the
+ // parameter block ordering as it sees fit. For Schur type solvers,
+ // this means that the user wishes for Ceres to identify the
+ // e_blocks, which we do by computing a maximal independent set.
+ vector<ParameterBlock*> schur_ordering;
+ const int num_eliminate_blocks =
+ ComputeStableSchurOrdering(*program, &schur_ordering);
+
+ CHECK_EQ(schur_ordering.size(), program->NumParameterBlocks())
+ << "Congratulations, you found a Ceres bug! Please report this error "
+ << "to the developers.";
+
+ // Update the parameter_block_ordering object.
+ for (int i = 0; i < schur_ordering.size(); ++i) {
+ double* parameter_block = schur_ordering[i]->mutable_user_state();
+ const int group_id = (i < num_eliminate_blocks) ? 0 : 1;
+ parameter_block_ordering->AddElementToGroup(parameter_block, group_id);
+ }
+
+ // We could call ApplyUserOrdering but this is cheaper and
+ // simpler.
+ swap(*program->mutable_parameter_blocks(), schur_ordering);
+ } else {
+ // The user provided an ordering with more than one elimination
+ // group. Trust the user and apply the ordering.
+ if (!ApplyUserOrdering(parameter_map,
+ parameter_block_ordering,
+ program,
+ error)) {
+ return false;
+ }
+ }
+
+ // Pre-order the columns corresponding to the schur complement if
+ // possible.
+#if !defined(CERES_NO_SUITESPARSE) && !defined(CERES_NO_CAMD)
+ if (linear_solver_type == SPARSE_SCHUR &&
+ sparse_linear_algebra_library_type == SUITE_SPARSE) {
+ vector<int> constraints;
+ vector<ParameterBlock*>& parameter_blocks =
+ *(program->mutable_parameter_blocks());
+
+ for (int i = 0; i < parameter_blocks.size(); ++i) {
+ constraints.push_back(
+ parameter_block_ordering->GroupId(
+ parameter_blocks[i]->mutable_user_state()));
+ }
+
+ // Renumber the entries of constraints to be contiguous integers
+ // as camd requires that the group ids be in the range [0,
+ // parameter_blocks.size() - 1].
+ SolverImpl::CompactifyArray(&constraints);
+
+ // Set the offsets and index for CreateJacobianSparsityTranspose.
+ program->SetParameterOffsetsAndIndex();
+ // Compute a block sparse presentation of J'.
+ scoped_ptr<TripletSparseMatrix> tsm_block_jacobian_transpose(
+ SolverImpl::CreateJacobianBlockSparsityTranspose(program));
+
+ SuiteSparse ss;
+ cholmod_sparse* block_jacobian_transpose =
+ ss.CreateSparseMatrix(tsm_block_jacobian_transpose.get());
+
+ vector<int> ordering(parameter_blocks.size(), 0);
+ ss.ConstrainedApproximateMinimumDegreeOrdering(block_jacobian_transpose,
+ &constraints[0],
+ &ordering[0]);
+ ss.Free(block_jacobian_transpose);
+
+ const vector<ParameterBlock*> parameter_blocks_copy(parameter_blocks);
+ for (int i = 0; i < program->NumParameterBlocks(); ++i) {
+ parameter_blocks[i] = parameter_blocks_copy[ordering[i]];
+ }
+ }
+#endif
+
program->SetParameterOffsetsAndIndex();
+ // Schur type solvers also require that their residual blocks be
+ // lexicographically ordered.
+ const int num_eliminate_blocks =
+ parameter_block_ordering->group_to_elements().begin()->second.size();
+ return LexicographicallyOrderResidualBlocks(num_eliminate_blocks,
+ program,
+ error);
+}
+bool SolverImpl::ReorderProgramForSparseNormalCholesky(
+ const SparseLinearAlgebraLibraryType sparse_linear_algebra_library_type,
+ const ParameterBlockOrdering* parameter_block_ordering,
+ Program* program,
+ string* error) {
+ // Set the offsets and index for CreateJacobianSparsityTranspose.
+ program->SetParameterOffsetsAndIndex();
// Compute a block sparse presentation of J'.
scoped_ptr<TripletSparseMatrix> tsm_block_jacobian_transpose(
SolverImpl::CreateJacobianBlockSparsityTranspose(program));
- // Order rows using AMD.
- SuiteSparse ss;
- cholmod_sparse* block_jacobian_transpose =
- ss.CreateSparseMatrix(tsm_block_jacobian_transpose.get());
+ vector<int> ordering(program->NumParameterBlocks(), 0);
+ vector<ParameterBlock*>& parameter_blocks =
+ *(program->mutable_parameter_blocks());
- vector<int> ordering(program->NumParameterBlocks(), -1);
- ss.ApproximateMinimumDegreeOrdering(block_jacobian_transpose, &ordering[0]);
- ss.Free(block_jacobian_transpose);
+ if (sparse_linear_algebra_library_type == SUITE_SPARSE) {
+#ifdef CERES_NO_SUITESPARSE
+ *error = "Can't use SPARSE_NORMAL_CHOLESKY with SUITE_SPARSE because "
+ "SuiteSparse was not enabled when Ceres was built.";
+ return false;
+#else
+ SuiteSparse ss;
+ cholmod_sparse* block_jacobian_transpose =
+ ss.CreateSparseMatrix(tsm_block_jacobian_transpose.get());
+
+# ifdef CERES_NO_CAMD
+ // No cholmod_camd, so ignore user's parameter_block_ordering and
+ // use plain old AMD.
+ ss.ApproximateMinimumDegreeOrdering(block_jacobian_transpose, &ordering[0]);
+# else
+ if (parameter_block_ordering->NumGroups() > 1) {
+ // If the user specified more than one elimination groups use them
+ // to constrain the ordering.
+ vector<int> constraints;
+ for (int i = 0; i < parameter_blocks.size(); ++i) {
+ constraints.push_back(
+ parameter_block_ordering->GroupId(
+ parameter_blocks[i]->mutable_user_state()));
+ }
+ ss.ConstrainedApproximateMinimumDegreeOrdering(
+ block_jacobian_transpose,
+ &constraints[0],
+ &ordering[0]);
+ } else {
+ ss.ApproximateMinimumDegreeOrdering(block_jacobian_transpose,
+ &ordering[0]);
+ }
+# endif // CERES_NO_CAMD
+
+ ss.Free(block_jacobian_transpose);
+#endif // CERES_NO_SUITESPARSE
+
+ } else if (sparse_linear_algebra_library_type == CX_SPARSE) {
+#ifndef CERES_NO_CXSPARSE
+
+ // CXSparse works with J'J instead of J'. So compute the block
+ // sparsity for J'J and compute an approximate minimum degree
+ // ordering.
+ CXSparse cxsparse;
+ cs_di* block_jacobian_transpose;
+ block_jacobian_transpose =
+ cxsparse.CreateSparseMatrix(tsm_block_jacobian_transpose.get());
+ cs_di* block_jacobian = cxsparse.TransposeMatrix(block_jacobian_transpose);
+ cs_di* block_hessian =
+ cxsparse.MatrixMatrixMultiply(block_jacobian_transpose, block_jacobian);
+ cxsparse.Free(block_jacobian);
+ cxsparse.Free(block_jacobian_transpose);
+
+ cxsparse.ApproximateMinimumDegreeOrdering(block_hessian, &ordering[0]);
+ cxsparse.Free(block_hessian);
+#else // CERES_NO_CXSPARSE
+ *error = "Can't use SPARSE_NORMAL_CHOLESKY with CX_SPARSE because "
+ "CXSparse was not enabled when Ceres was built.";
+ return false;
+#endif // CERES_NO_CXSPARSE
+ } else {
+ *error = "Unknown sparse linear algebra library.";
+ return false;
+ }
// Apply ordering.
- vector<ParameterBlock*>& parameter_blocks =
- *(program->mutable_parameter_blocks());
const vector<ParameterBlock*> parameter_blocks_copy(parameter_blocks);
for (int i = 0; i < program->NumParameterBlocks(); ++i) {
parameter_blocks[i] = parameter_blocks_copy[ordering[i]];
}
-#endif
program->SetParameterOffsetsAndIndex();
+ return true;
+}
+
+void SolverImpl::CompactifyArray(vector<int>* array_ptr) {
+ vector<int>& array = *array_ptr;
+ const set<int> unique_group_ids(array.begin(), array.end());
+ map<int, int> group_id_map;
+ for (set<int>::const_iterator it = unique_group_ids.begin();
+ it != unique_group_ids.end();
+ ++it) {
+ InsertOrDie(&group_id_map, *it, group_id_map.size());
+ }
+
+ for (int i = 0; i < array.size(); ++i) {
+ array[i] = group_id_map[array[i]];
+ }
}
} // namespace internal
diff --git a/extern/libmv/third_party/ceres/internal/ceres/solver_impl.h b/extern/libmv/third_party/ceres/internal/ceres/solver_impl.h
index 22ca6229b81..2b7ca3e3310 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/solver_impl.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/solver_impl.h
@@ -103,15 +103,6 @@ class SolverImpl {
static LinearSolver* CreateLinearSolver(Solver::Options* options,
string* error);
- // Reorder the parameter blocks in program using the ordering. A
- // return value of true indicates success and false indicates an
- // error was encountered whose cause is logged to LOG(ERROR).
- static bool ApplyUserOrdering(const ProblemImpl::ParameterMap& parameter_map,
- const ParameterBlockOrdering* ordering,
- Program* program,
- string* error);
-
-
// Reorder the residuals for program, if necessary, so that the
// residuals involving e block (i.e., the first num_eliminate_block
// parameter blocks) occur together. This is a necessary condition
@@ -163,36 +154,67 @@ class SolverImpl {
static void AlternateLinearSolverForSchurTypeLinearSolver(
Solver::Options* options);
+ // Create a TripletSparseMatrix which contains the zero-one
+ // structure corresponding to the block sparsity of the transpose of
+ // the Jacobian matrix.
+ //
+ // Caller owns the result.
+ static TripletSparseMatrix* CreateJacobianBlockSparsityTranspose(
+ const Program* program);
+
+ // Reorder the parameter blocks in program using the ordering
+ static bool ApplyUserOrdering(
+ const ProblemImpl::ParameterMap& parameter_map,
+ const ParameterBlockOrdering* parameter_block_ordering,
+ Program* program,
+ string* error);
+
+ // Sparse cholesky factorization routines when doing the sparse
+ // cholesky factorization of the Jacobian matrix, reorders its
+ // columns to reduce the fill-in. Compute this permutation and
+ // re-order the parameter blocks.
+ //
+ // If the parameter_block_ordering contains more than one
+ // elimination group and support for constrained fill-reducing
+ // ordering is available in the sparse linear algebra library
+ // (SuiteSparse version >= 4.2.0) then the fill reducing
+ // ordering will take it into account, otherwise it will be ignored.
+ static bool ReorderProgramForSparseNormalCholesky(
+ const SparseLinearAlgebraLibraryType sparse_linear_algebra_library_type,
+ const ParameterBlockOrdering* parameter_block_ordering,
+ Program* program,
+ string* error);
+
// Schur type solvers require that all parameter blocks eliminated
// by the Schur eliminator occur before others and the residuals be
// sorted in lexicographic order of their parameter blocks.
//
- // If ordering has atleast two groups, then apply the ordering,
- // otherwise compute a new ordering using a Maximal Independent Set
- // algorithm and apply it.
+ // If the parameter_block_ordering only contains one elimination
+ // group then a maximal independent set is computed and used as the
+ // first elimination group, otherwise the user's ordering is used.
+ //
+ // If the linear solver type is SPARSE_SCHUR and support for
+ // constrained fill-reducing ordering is available in the sparse
+ // linear algebra library (SuiteSparse version >= 4.2.0) then
+ // columns of the schur complement matrix are ordered to reduce the
+ // fill-in the Cholesky factorization.
//
// Upon return, ordering contains the parameter block ordering that
// was used to order the program.
static bool ReorderProgramForSchurTypeLinearSolver(
+ const LinearSolverType linear_solver_type,
+ const SparseLinearAlgebraLibraryType sparse_linear_algebra_library_type,
const ProblemImpl::ParameterMap& parameter_map,
- ParameterBlockOrdering* ordering,
+ ParameterBlockOrdering* parameter_block_ordering,
Program* program,
string* error);
- // CHOLMOD when doing the sparse cholesky factorization of the
- // Jacobian matrix, reorders its columns to reduce the
- // fill-in. Compute this permutation and re-order the parameter
- // blocks.
- //
- static void ReorderProgramForSparseNormalCholesky(Program* program);
-
- // Create a TripletSparseMatrix which contains the zero-one
- // structure corresponding to the block sparsity of the transpose of
- // the Jacobian matrix.
- //
- // Caller owns the result.
- static TripletSparseMatrix* CreateJacobianBlockSparsityTranspose(
- const Program* program);
+ // array contains a list of (possibly repeating) non-negative
+ // integers. Let us assume that we have constructed another array
+ // `p` by sorting and uniqueing the entries of array.
+ // CompactifyArray replaces each entry in "array" with its position
+ // in `p`.
+ static void CompactifyArray(vector<int>* array);
};
} // namespace internal
diff --git a/extern/libmv/third_party/ceres/internal/ceres/sparse_matrix.h b/extern/libmv/third_party/ceres/internal/ceres/sparse_matrix.h
index 1b19f887946..f3b96712a70 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/sparse_matrix.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/sparse_matrix.h
@@ -41,8 +41,6 @@
namespace ceres {
namespace internal {
-class SparseMatrixProto;
-
// This class defines the interface for storing and manipulating
// sparse matrices. The key property that differentiates different
// sparse matrices is how they are organized in memory and how the
@@ -86,11 +84,6 @@ class SparseMatrix : public LinearOperator {
// sparse matrix.
virtual void ToDenseMatrix(Matrix* dense_matrix) const = 0;
-#ifndef CERES_NO_PROTOCOL_BUFFERS
- // Dump the sparse matrix to a proto. Destroys the contents of proto.
- virtual void ToProto(SparseMatrixProto* proto) const = 0;
-#endif
-
// Write out the matrix as a sequence of (i,j,s) triplets. This
// format is useful for loading the matrix into MATLAB/octave as a
// sparse matrix.
diff --git a/extern/libmv/third_party/ceres/internal/ceres/sparse_normal_cholesky_solver.cc b/extern/libmv/third_party/ceres/internal/ceres/sparse_normal_cholesky_solver.cc
index bc1f98334ae..f1a52378e2b 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/sparse_normal_cholesky_solver.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/sparse_normal_cholesky_solver.cc
@@ -36,11 +36,8 @@
#include <cstring>
#include <ctime>
-#ifndef CERES_NO_CXSPARSE
-#include "cs.h"
-#endif
-
#include "ceres/compressed_row_sparse_matrix.h"
+#include "ceres/cxsparse.h"
#include "ceres/internal/eigen.h"
#include "ceres/internal/scoped_ptr.h"
#include "ceres/linear_solver.h"
@@ -54,14 +51,9 @@ namespace internal {
SparseNormalCholeskySolver::SparseNormalCholeskySolver(
const LinearSolver::Options& options)
- : options_(options) {
-#ifndef CERES_NO_SUITESPARSE
- factor_ = NULL;
-#endif
-
-#ifndef CERES_NO_CXSPARSE
- cxsparse_factor_ = NULL;
-#endif // CERES_NO_CXSPARSE
+ : factor_(NULL),
+ cxsparse_factor_(NULL),
+ options_(options) {
}
SparseNormalCholeskySolver::~SparseNormalCholeskySolver() {
@@ -85,18 +77,18 @@ LinearSolver::Summary SparseNormalCholeskySolver::SolveImpl(
const double* b,
const LinearSolver::PerSolveOptions& per_solve_options,
double * x) {
- switch (options_.sparse_linear_algebra_library) {
+ switch (options_.sparse_linear_algebra_library_type) {
case SUITE_SPARSE:
return SolveImplUsingSuiteSparse(A, b, per_solve_options, x);
case CX_SPARSE:
return SolveImplUsingCXSparse(A, b, per_solve_options, x);
default:
LOG(FATAL) << "Unknown sparse linear algebra library : "
- << options_.sparse_linear_algebra_library;
+ << options_.sparse_linear_algebra_library_type;
}
LOG(FATAL) << "Unknown sparse linear algebra library : "
- << options_.sparse_linear_algebra_library;
+ << options_.sparse_linear_algebra_library_type;
return LinearSolver::Summary();
}
@@ -133,34 +125,37 @@ LinearSolver::Summary SparseNormalCholeskySolver::SolveImplUsingCXSparse(
// factorized. CHOLMOD/SuiteSparse on the other hand can just work
// off of Jt to compute the Cholesky factorization of the normal
// equations.
- cs_di* A2 = cs_transpose(&At, 1);
- cs_di* AtA = cs_multiply(&At, A2);
+ cs_di* A2 = cxsparse_.TransposeMatrix(&At);
+ cs_di* AtA = cxsparse_.MatrixMatrixMultiply(&At, A2);
cxsparse_.Free(A2);
if (per_solve_options.D != NULL) {
A->DeleteRows(num_cols);
}
-
event_logger.AddEvent("Setup");
// Compute symbolic factorization if not available.
if (cxsparse_factor_ == NULL) {
- cxsparse_factor_ = CHECK_NOTNULL(cxsparse_.AnalyzeCholesky(AtA));
+ if (options_.use_postordering) {
+ cxsparse_factor_ =
+ CHECK_NOTNULL(cxsparse_.BlockAnalyzeCholesky(AtA,
+ A->col_blocks(),
+ A->col_blocks()));
+ } else {
+ cxsparse_factor_ =
+ CHECK_NOTNULL(cxsparse_.AnalyzeCholeskyWithNaturalOrdering(AtA));
+ }
}
-
event_logger.AddEvent("Analysis");
-
// Solve the linear system.
if (cxsparse_.SolveCholesky(AtA, cxsparse_factor_, Atb.data())) {
VectorRef(x, Atb.rows()) = Atb;
summary.termination_type = TOLERANCE;
}
-
event_logger.AddEvent("Solve");
cxsparse_.Free(AtA);
-
event_logger.AddEvent("Teardown");
return summary;
}
@@ -205,11 +200,13 @@ LinearSolver::Summary SparseNormalCholeskySolver::SolveImplUsingSuiteSparse(
if (factor_ == NULL) {
if (options_.use_postordering) {
- factor_ = ss_.BlockAnalyzeCholesky(&lhs,
- A->col_blocks(),
- A->row_blocks());
+ factor_ =
+ CHECK_NOTNULL(ss_.BlockAnalyzeCholesky(&lhs,
+ A->col_blocks(),
+ A->row_blocks()));
} else {
- factor_ = ss_.AnalyzeCholeskyWithNaturalOrdering(&lhs);
+ factor_ =
+ CHECK_NOTNULL(ss_.AnalyzeCholeskyWithNaturalOrdering(&lhs));
}
}
diff --git a/extern/libmv/third_party/ceres/internal/ceres/sparse_normal_cholesky_solver.h b/extern/libmv/third_party/ceres/internal/ceres/sparse_normal_cholesky_solver.h
index ebb32e61939..61111b41b49 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/sparse_normal_cholesky_solver.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/sparse_normal_cholesky_solver.h
@@ -73,17 +73,13 @@ class SparseNormalCholeskySolver : public CompressedRowSparseMatrixSolver {
const LinearSolver::PerSolveOptions& options,
double* x);
-#ifndef CERES_NO_SUITESPARSE
SuiteSparse ss_;
// Cached factorization
cholmod_factor* factor_;
-#endif // CERES_NO_SUITESPARSE
-#ifndef CERES_NO_CXSPARSE
CXSparse cxsparse_;
// Cached factorization
cs_dis* cxsparse_factor_;
-#endif // CERES_NO_CXSPARSE
const LinearSolver::Options options_;
CERES_DISALLOW_COPY_AND_ASSIGN(SparseNormalCholeskySolver);
diff --git a/extern/libmv/third_party/ceres/internal/ceres/split.h b/extern/libmv/third_party/ceres/internal/ceres/split.h
index 4df48c3a7cd..2334d26037f 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/split.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/split.h
@@ -1,4 +1,31 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
+// Ceres Solver - A fast non-linear least squares minimizer
+// Copyright 2011 Google Inc. All rights reserved.
+// http://code.google.com/p/ceres-solver/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+// * Neither the name of Google Inc. nor the names of its contributors may be
+// used to endorse or promote products derived from this software without
+// specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
// Author: keir@google.com (Keir Mierle)
#ifndef CERES_INTERNAL_SPLIT_H_
diff --git a/extern/libmv/third_party/ceres/internal/ceres/suitesparse.cc b/extern/libmv/third_party/ceres/internal/ceres/suitesparse.cc
index 5138b522d09..9de32fd76ad 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/suitesparse.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/suitesparse.cc
@@ -33,6 +33,7 @@
#include <vector>
#include "cholmod.h"
+#include "ceres/compressed_col_sparse_matrix_utils.h"
#include "ceres/compressed_row_sparse_matrix.h"
#include "ceres/triplet_sparse_matrix.h"
@@ -172,7 +173,8 @@ cholmod_factor* SuiteSparse::AnalyzeCholeskyWithUserOrdering(
return factor;
}
-cholmod_factor* SuiteSparse::AnalyzeCholeskyWithNaturalOrdering(cholmod_sparse* A) {
+cholmod_factor* SuiteSparse::AnalyzeCholeskyWithNaturalOrdering(
+ cholmod_sparse* A) {
cc_.nmethods = 1;
cc_.method[0].ordering = CHOLMOD_NATURAL;
cc_.postorder = 0;
@@ -201,11 +203,12 @@ bool SuiteSparse::BlockAMDOrdering(const cholmod_sparse* A,
vector<int> block_cols;
vector<int> block_rows;
- ScalarMatrixToBlockMatrix(A,
- row_blocks,
- col_blocks,
- &block_rows,
- &block_cols);
+ CompressedColumnScalarMatrixToBlockMatrix(reinterpret_cast<const int*>(A->i),
+ reinterpret_cast<const int*>(A->p),
+ row_blocks,
+ col_blocks,
+ &block_rows,
+ &block_cols);
cholmod_sparse_struct block_matrix;
block_matrix.nrow = num_row_blocks;
@@ -230,88 +233,6 @@ bool SuiteSparse::BlockAMDOrdering(const cholmod_sparse* A,
return true;
}
-void SuiteSparse::ScalarMatrixToBlockMatrix(const cholmod_sparse* A,
- const vector<int>& row_blocks,
- const vector<int>& col_blocks,
- vector<int>* block_rows,
- vector<int>* block_cols) {
- CHECK_NOTNULL(block_rows)->clear();
- CHECK_NOTNULL(block_cols)->clear();
- const int num_row_blocks = row_blocks.size();
- const int num_col_blocks = col_blocks.size();
-
- vector<int> row_block_starts(num_row_blocks);
- for (int i = 0, cursor = 0; i < num_row_blocks; ++i) {
- row_block_starts[i] = cursor;
- cursor += row_blocks[i];
- }
-
- // The reinterpret_cast is needed here because CHOLMOD stores arrays
- // as void*.
- const int* scalar_cols = reinterpret_cast<const int*>(A->p);
- const int* scalar_rows = reinterpret_cast<const int*>(A->i);
-
- // This loop extracts the block sparsity of the scalar sparse matrix
- // A. It does so by iterating over the columns, but only considering
- // the columns corresponding to the first element of each column
- // block. Within each column, the inner loop iterates over the rows,
- // and detects the presence of a row block by checking for the
- // presence of a non-zero entry corresponding to its first element.
- block_cols->push_back(0);
- int c = 0;
- for (int col_block = 0; col_block < num_col_blocks; ++col_block) {
- int column_size = 0;
- for (int idx = scalar_cols[c]; idx < scalar_cols[c + 1]; ++idx) {
- vector<int>::const_iterator it = lower_bound(row_block_starts.begin(),
- row_block_starts.end(),
- scalar_rows[idx]);
- // Since we are using lower_bound, it will return the row id
- // where the row block starts. For everything but the first row
- // of the block, where these values will be the same, we can
- // skip, as we only need the first row to detect the presence of
- // the block.
- //
- // For rows all but the first row in the last row block,
- // lower_bound will return row_block_starts.end(), but those can
- // be skipped like the rows in other row blocks too.
- if (it == row_block_starts.end() || *it != scalar_rows[idx]) {
- continue;
- }
-
- block_rows->push_back(it - row_block_starts.begin());
- ++column_size;
- }
- block_cols->push_back(block_cols->back() + column_size);
- c += col_blocks[col_block];
- }
-}
-
-void SuiteSparse::BlockOrderingToScalarOrdering(
- const vector<int>& blocks,
- const vector<int>& block_ordering,
- vector<int>* scalar_ordering) {
- CHECK_EQ(blocks.size(), block_ordering.size());
- const int num_blocks = blocks.size();
-
- // block_starts = [0, block1, block1 + block2 ..]
- vector<int> block_starts(num_blocks);
- for (int i = 0, cursor = 0; i < num_blocks ; ++i) {
- block_starts[i] = cursor;
- cursor += blocks[i];
- }
-
- scalar_ordering->resize(block_starts.back() + blocks.back());
- int cursor = 0;
- for (int i = 0; i < num_blocks; ++i) {
- const int block_id = block_ordering[i];
- const int block_size = blocks[block_id];
- int block_position = block_starts[block_id];
- for (int j = 0; j < block_size; ++j) {
- (*scalar_ordering)[cursor++] = block_position++;
- }
- }
-}
-
bool SuiteSparse::Cholesky(cholmod_sparse* A, cholmod_factor* L) {
CHECK_NOTNULL(A);
CHECK_NOTNULL(L);
@@ -402,6 +323,21 @@ void SuiteSparse::ApproximateMinimumDegreeOrdering(cholmod_sparse* matrix,
cholmod_amd(matrix, NULL, 0, ordering, &cc_);
}
+void SuiteSparse::ConstrainedApproximateMinimumDegreeOrdering(
+ cholmod_sparse* matrix,
+ int* constraints,
+ int* ordering) {
+#ifndef CERES_NO_CAMD
+ cholmod_camd(matrix, NULL, 0, constraints, ordering, &cc_);
+#else
+ LOG(FATAL) << "Congratulations you have found a bug in Ceres."
+ << "Ceres Solver was compiled with SuiteSparse "
+ << "version 4.1.0 or less. Calling this function "
+ << "in that case is a bug. Please contact the"
+ << "the Ceres Solver developers.";
+#endif
+}
+
} // namespace internal
} // namespace ceres
diff --git a/extern/libmv/third_party/ceres/internal/ceres/suitesparse.h b/extern/libmv/third_party/ceres/internal/ceres/suitesparse.h
index a1a4f355d76..16f298ea79c 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/suitesparse.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/suitesparse.h
@@ -33,6 +33,7 @@
#ifndef CERES_INTERNAL_SUITESPARSE_H_
#define CERES_INTERNAL_SUITESPARSE_H_
+
#ifndef CERES_NO_SUITESPARSE
#include <cstring>
@@ -42,6 +43,29 @@
#include "ceres/internal/port.h"
#include "cholmod.h"
#include "glog/logging.h"
+#include "SuiteSparseQR.hpp"
+
+// Before SuiteSparse version 4.2.0, cholmod_camd was only enabled
+// if SuiteSparse was compiled with Metis support. This makes
+// calling and linking into cholmod_camd problematic even though it
+// has nothing to do with Metis. This has been fixed reliably in
+// 4.2.0.
+//
+// The fix was actually committed in 4.1.0, but there is
+// some confusion about a silent update to the tar ball, so we are
+// being conservative and choosing the next minor version where
+// things are stable.
+#if (SUITESPARSE_VERSION < 4002)
+#define CERES_NO_CAMD
+#endif
+
+// UF_long is deprecated but SuiteSparse_long is only available in
+// newer versions of SuiteSparse. So for older versions of
+// SuiteSparse, we define SuiteSparse_long to be the same as UF_long,
+// which is what recent versions of SuiteSparse do anyways.
+#ifndef SuiteSparse_long
+#define SuiteSparse_long UF_long
+#endif
namespace ceres {
namespace internal {
@@ -184,34 +208,43 @@ class SuiteSparse {
const vector<int>& col_blocks,
vector<int>* ordering);
- // Given a set of blocks and a permutation of these blocks, compute
- // the corresponding "scalar" ordering, where the scalar ordering of
- // size sum(blocks).
- static void BlockOrderingToScalarOrdering(const vector<int>& blocks,
- const vector<int>& block_ordering,
- vector<int>* scalar_ordering);
-
- // Extract the block sparsity pattern of the scalar sparse matrix
- // A and return it in compressed column form. The compressed column
- // form is stored in two vectors block_rows, and block_cols, which
- // correspond to the row and column arrays in a compressed column sparse
- // matrix.
- //
- // If c_ij is the block in the matrix A corresponding to row block i
- // and column block j, then it is expected that A contains at least
- // one non-zero entry corresponding to the top left entry of c_ij,
- // as that entry is used to detect the presence of a non-zero c_ij.
- static void ScalarMatrixToBlockMatrix(const cholmod_sparse* A,
- const vector<int>& row_blocks,
- const vector<int>& col_blocks,
- vector<int>* block_rows,
- vector<int>* block_cols);
-
// Find a fill reducing approximate minimum degree
// ordering. ordering is expected to be large enough to hold the
// ordering.
void ApproximateMinimumDegreeOrdering(cholmod_sparse* matrix, int* ordering);
+
+ // Before SuiteSparse version 4.2.0, cholmod_camd was only enabled
+ // if SuiteSparse was compiled with Metis support. This makes
+ // calling and linking into cholmod_camd problematic even though it
+ // has nothing to do with Metis. This has been fixed reliably in
+ // 4.2.0.
+ //
+ // The fix was actually committed in 4.1.0, but there is
+ // some confusion about a silent update to the tar ball, so we are
+ // being conservative and choosing the next minor version where
+ // things are stable.
+ static bool IsConstrainedApproximateMinimumDegreeOrderingAvailable() {
+ return (SUITESPARSE_VERSION>4001);
+ }
+
+ // Find a fill reducing approximate minimum degree
+ // ordering. constraints is an array which associates with each
+ // column of the matrix an elimination group. i.e., all columns in
+ // group 0 are eliminated first, all columns in group 1 are
+ // eliminated next etc. This function finds a fill reducing ordering
+ // that obeys these constraints.
+ //
+ // Calling ApproximateMinimumDegreeOrdering is equivalent to calling
+ // ConstrainedApproximateMinimumDegreeOrdering with a constraint
+ // array that puts all columns in the same elimination group.
+ //
+ // If CERES_NO_CAMD is defined then calling this function will
+ // result in a crash.
+ void ConstrainedApproximateMinimumDegreeOrdering(cholmod_sparse* matrix,
+ int* constraints,
+ int* ordering);
+
void Free(cholmod_sparse* m) { cholmod_free_sparse(&m, &cc_); }
void Free(cholmod_dense* m) { cholmod_free_dense(&m, &cc_); }
void Free(cholmod_factor* m) { cholmod_free_factor(&m, &cc_); }
@@ -237,6 +270,11 @@ class SuiteSparse {
} // namespace internal
} // namespace ceres
+#else // CERES_NO_SUITESPARSE
+
+class SuiteSparse {};
+typedef void cholmod_factor;
+
#endif // CERES_NO_SUITESPARSE
#endif // CERES_INTERNAL_SUITESPARSE_H_
diff --git a/extern/libmv/third_party/ceres/internal/ceres/triplet_sparse_matrix.cc b/extern/libmv/third_party/ceres/internal/ceres/triplet_sparse_matrix.cc
index a09f38ee24e..824b123bc28 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/triplet_sparse_matrix.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/triplet_sparse_matrix.cc
@@ -35,7 +35,6 @@
#include "ceres/internal/eigen.h"
#include "ceres/internal/port.h"
#include "ceres/internal/scoped_ptr.h"
-#include "ceres/matrix_proto.h"
#include "ceres/types.h"
#include "glog/logging.h"
@@ -83,32 +82,6 @@ TripletSparseMatrix::TripletSparseMatrix(const TripletSparseMatrix& orig)
CopyData(orig);
}
-#ifndef CERES_NO_PROTOCOL_BUFFERS
-TripletSparseMatrix::TripletSparseMatrix(const SparseMatrixProto& outer_proto) {
- CHECK(outer_proto.has_triplet_matrix());
-
- const TripletSparseMatrixProto& proto = outer_proto.triplet_matrix();
- CHECK(proto.has_num_rows());
- CHECK(proto.has_num_cols());
- CHECK_EQ(proto.rows_size(), proto.cols_size());
- CHECK_EQ(proto.cols_size(), proto.values_size());
-
- // Initialize the matrix with the appropriate size and capacity.
- max_num_nonzeros_ = 0;
- set_num_nonzeros(0);
- Reserve(proto.num_nonzeros());
- Resize(proto.num_rows(), proto.num_cols());
- set_num_nonzeros(proto.num_nonzeros());
-
- // Copy the entries in.
- for (int i = 0; i < proto.num_nonzeros(); ++i) {
- rows_[i] = proto.rows(i);
- cols_[i] = proto.cols(i);
- values_[i] = proto.values(i);
- }
-}
-#endif
-
TripletSparseMatrix& TripletSparseMatrix::operator=(
const TripletSparseMatrix& rhs) {
num_rows_ = rhs.num_rows_;
@@ -215,22 +188,6 @@ void TripletSparseMatrix::ToDenseMatrix(Matrix* dense_matrix) const {
}
}
-#ifndef CERES_NO_PROTOCOL_BUFFERS
-void TripletSparseMatrix::ToProto(SparseMatrixProto *proto) const {
- proto->Clear();
-
- TripletSparseMatrixProto* tsm_proto = proto->mutable_triplet_matrix();
- tsm_proto->set_num_rows(num_rows_);
- tsm_proto->set_num_cols(num_cols_);
- tsm_proto->set_num_nonzeros(num_nonzeros_);
- for (int i = 0; i < num_nonzeros_; ++i) {
- tsm_proto->add_rows(rows_[i]);
- tsm_proto->add_cols(cols_[i]);
- tsm_proto->add_values(values_[i]);
- }
-}
-#endif
-
void TripletSparseMatrix::AppendRows(const TripletSparseMatrix& B) {
CHECK_EQ(B.num_cols(), num_cols_);
Reserve(num_nonzeros_ + B.num_nonzeros_);
diff --git a/extern/libmv/third_party/ceres/internal/ceres/triplet_sparse_matrix.h b/extern/libmv/third_party/ceres/internal/ceres/triplet_sparse_matrix.h
index 89a645bd879..4d7cde7fe9c 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/triplet_sparse_matrix.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/triplet_sparse_matrix.h
@@ -39,8 +39,6 @@
namespace ceres {
namespace internal {
-class SparseMatrixProto;
-
// An implementation of the SparseMatrix interface to store and
// manipulate sparse matrices in triplet (i,j,s) form. This object is
// inspired by the design of the cholmod_triplet struct used in the
@@ -50,9 +48,6 @@ class TripletSparseMatrix : public SparseMatrix {
TripletSparseMatrix();
TripletSparseMatrix(int num_rows, int num_cols, int max_num_nonzeros);
explicit TripletSparseMatrix(const TripletSparseMatrix& orig);
-#ifndef CERES_NO_PROTOCOL_BUFFERS
- explicit TripletSparseMatrix(const SparseMatrixProto& proto);
-#endif
TripletSparseMatrix& operator=(const TripletSparseMatrix& rhs);
@@ -65,9 +60,6 @@ class TripletSparseMatrix : public SparseMatrix {
virtual void SquaredColumnNorm(double* x) const;
virtual void ScaleColumns(const double* scale);
virtual void ToDenseMatrix(Matrix* dense_matrix) const;
-#ifndef CERES_NO_PROTOCOL_BUFFERS
- virtual void ToProto(SparseMatrixProto *proto) const;
-#endif
virtual void ToTextFile(FILE* file) const;
virtual int num_rows() const { return num_rows_; }
virtual int num_cols() const { return num_cols_; }
diff --git a/extern/libmv/third_party/ceres/internal/ceres/trust_region_minimizer.cc b/extern/libmv/third_party/ceres/internal/ceres/trust_region_minimizer.cc
index 981c60a12e7..03d6c8e6b94 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/trust_region_minimizer.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/trust_region_minimizer.cc
@@ -41,6 +41,7 @@
#include "Eigen/Core"
#include "ceres/array_utils.h"
#include "ceres/evaluator.h"
+#include "ceres/file.h"
#include "ceres/internal/eigen.h"
#include "ceres/internal/scoped_ptr.h"
#include "ceres/linear_least_squares_problems.h"
@@ -70,25 +71,8 @@ void TrustRegionMinimizer::EstimateScale(const SparseMatrix& jacobian,
void TrustRegionMinimizer::Init(const Minimizer::Options& options) {
options_ = options;
- sort(options_.lsqp_iterations_to_dump.begin(),
- options_.lsqp_iterations_to_dump.end());
-}
-
-bool TrustRegionMinimizer::MaybeDumpLinearLeastSquaresProblem(
- const int iteration,
- const SparseMatrix* jacobian,
- const double* residuals,
- const double* step) const {
- // TODO(sameeragarwal): Since the use of trust_region_radius has
- // moved inside TrustRegionStrategy, its not clear how we dump the
- // regularization vector/matrix anymore.
- //
- // Also num_eliminate_blocks is not visible to the trust region
- // minimizer either.
- //
- // Both of these indicate that this is the wrong place for this
- // code, and going forward this should needs fixing/refactoring.
- return true;
+ sort(options_.trust_region_minimizer_iterations_to_dump.begin(),
+ options_.trust_region_minimizer_iterations_to_dump.end());
}
void TrustRegionMinimizer::Minimize(const Minimizer::Options& options,
@@ -139,15 +123,16 @@ void TrustRegionMinimizer::Minimize(const Minimizer::Options& options,
// Do initial cost and Jacobian evaluation.
double cost = 0.0;
- if (!evaluator->Evaluate(x.data(), &cost, residuals.data(), NULL, jacobian)) {
+ if (!evaluator->Evaluate(x.data(),
+ &cost,
+ residuals.data(),
+ gradient.data(),
+ jacobian)) {
LOG(WARNING) << "Terminating: Residual and Jacobian evaluation failed.";
summary->termination_type = NUMERICAL_FAILURE;
return;
}
- summary->initial_cost = cost + summary->fixed_cost;
- iteration_summary.cost = cost + summary->fixed_cost;
-
int num_consecutive_nonmonotonic_steps = 0;
double minimum_cost = cost;
double reference_cost = cost;
@@ -155,17 +140,10 @@ void TrustRegionMinimizer::Minimize(const Minimizer::Options& options,
double candidate_cost = cost;
double accumulated_candidate_model_cost_change = 0.0;
- gradient.setZero();
- jacobian->LeftMultiply(residuals.data(), gradient.data());
+ summary->initial_cost = cost + summary->fixed_cost;
+ iteration_summary.cost = cost + summary->fixed_cost;
iteration_summary.gradient_max_norm = gradient.lpNorm<Eigen::Infinity>();
- if (options_.jacobi_scaling) {
- EstimateScale(*jacobian, scale.data());
- jacobian->ScaleColumns(scale.data());
- } else {
- scale.setOnes();
- }
-
// The initial gradient max_norm is bounded from below so that we do
// not divide by zero.
const double initial_gradient_max_norm =
@@ -189,8 +167,17 @@ void TrustRegionMinimizer::Minimize(const Minimizer::Options& options,
+ summary->preprocessor_time_in_seconds;
summary->iterations.push_back(iteration_summary);
+ if (options_.jacobi_scaling) {
+ EstimateScale(*jacobian, scale.data());
+ jacobian->ScaleColumns(scale.data());
+ } else {
+ scale.setOnes();
+ }
+
int num_consecutive_invalid_steps = 0;
+ bool inner_iterations_are_enabled = options.inner_iteration_minimizer != NULL;
while (true) {
+ bool inner_iterations_were_useful = false;
if (!RunCallbacks(options.callbacks, iteration_summary, summary)) {
return;
}
@@ -210,33 +197,38 @@ void TrustRegionMinimizer::Minimize(const Minimizer::Options& options,
break;
}
- iteration_summary = IterationSummary();
- iteration_summary = summary->iterations.back();
- iteration_summary.iteration = summary->iterations.back().iteration + 1;
- iteration_summary.step_is_valid = false;
- iteration_summary.step_is_successful = false;
-
const double strategy_start_time = WallTimeInSeconds();
TrustRegionStrategy::PerSolveOptions per_solve_options;
per_solve_options.eta = options_.eta;
+ if (find(options_.trust_region_minimizer_iterations_to_dump.begin(),
+ options_.trust_region_minimizer_iterations_to_dump.end(),
+ iteration_summary.iteration) !=
+ options_.trust_region_minimizer_iterations_to_dump.end()) {
+ per_solve_options.dump_format_type =
+ options_.trust_region_problem_dump_format_type;
+ per_solve_options.dump_filename_base =
+ JoinPath(options_.trust_region_problem_dump_directory,
+ StringPrintf("ceres_solver_iteration_%03d",
+ iteration_summary.iteration));
+ } else {
+ per_solve_options.dump_format_type = TEXTFILE;
+ per_solve_options.dump_filename_base.clear();
+ }
+
TrustRegionStrategy::Summary strategy_summary =
strategy->ComputeStep(per_solve_options,
jacobian,
residuals.data(),
trust_region_step.data());
+ iteration_summary = IterationSummary();
+ iteration_summary.iteration = summary->iterations.back().iteration + 1;
iteration_summary.step_solver_time_in_seconds =
WallTimeInSeconds() - strategy_start_time;
iteration_summary.linear_solver_iterations =
strategy_summary.num_iterations;
-
- if (!MaybeDumpLinearLeastSquaresProblem(iteration_summary.iteration,
- jacobian,
- residuals.data(),
- trust_region_step.data())) {
- LOG(FATAL) << "Tried writing linear least squares problem: "
- << options.lsqp_dump_directory << "but failed.";
- }
+ iteration_summary.step_is_valid = false;
+ iteration_summary.step_is_successful = false;
double model_cost_change = 0.0;
if (strategy_summary.termination_type != FAILURE) {
@@ -249,8 +241,8 @@ void TrustRegionMinimizer::Minimize(const Minimizer::Options& options,
// = -f'J * step - step' * J' * J * step / 2
model_residuals.setZero();
jacobian->RightMultiply(trust_region_step.data(), model_residuals.data());
- model_cost_change = -(residuals.dot(model_residuals) +
- model_residuals.squaredNorm() / 2.0);
+ model_cost_change =
+ - model_residuals.dot(residuals + model_residuals / 2.0);
if (model_cost_change < 0.0) {
VLOG(1) << "Invalid step: current_cost: " << cost
@@ -316,7 +308,9 @@ void TrustRegionMinimizer::Minimize(const Minimizer::Options& options,
new_cost = numeric_limits<double>::max();
} else {
// Check if performing an inner iteration will make it better.
- if (options.inner_iteration_minimizer != NULL) {
+ if (inner_iterations_are_enabled) {
+ ++summary->num_inner_iteration_steps;
+ double inner_iteration_start_time = WallTimeInSeconds();
const double x_plus_delta_cost = new_cost;
Vector inner_iteration_x = x_plus_delta;
Solver::Summary inner_iteration_summary;
@@ -336,7 +330,23 @@ void TrustRegionMinimizer::Minimize(const Minimizer::Options& options,
VLOG(2) << "Inner iteration succeeded; current cost: " << cost
<< " x_plus_delta_cost: " << x_plus_delta_cost
<< " new_cost: " << new_cost;
+ const double inner_iteration_relative_progress =
+ 1.0 - new_cost / x_plus_delta_cost;
+ inner_iterations_are_enabled =
+ (inner_iteration_relative_progress >
+ options.inner_iteration_tolerance);
+
+ inner_iterations_were_useful = new_cost < cost;
+
+ // Disable inner iterations once the relative improvement
+ // drops below tolerance.
+ if (!inner_iterations_are_enabled) {
+ VLOG(2) << "Disabling inner iterations. Progress : "
+ << inner_iteration_relative_progress;
+ }
}
+ summary->inner_iteration_time_in_seconds +=
+ WallTimeInSeconds() - inner_iteration_start_time;
}
}
@@ -355,7 +365,6 @@ void TrustRegionMinimizer::Minimize(const Minimizer::Options& options,
return;
}
- VLOG(2) << "old cost: " << cost << " new cost: " << new_cost;
iteration_summary.cost_change = cost - new_cost;
const double absolute_function_tolerance =
options_.function_tolerance * cost;
@@ -392,13 +401,51 @@ void TrustRegionMinimizer::Minimize(const Minimizer::Options& options,
? max(relative_decrease, historical_relative_decrease)
: relative_decrease;
+ // Normally, the quality of a trust region step is measured by
+ // the ratio
+ //
+ // cost_change
+ // r = -----------------
+ // model_cost_change
+ //
+ // All the change in the nonlinear objective is due to the trust
+ // region step so this ratio is a good measure of the quality of
+ // the trust region radius. However, when inner iterations are
+ // being used, cost_change includes the contribution of the
+ // inner iterations and its not fair to credit it all to the
+ // trust region algorithm. So we change the ratio to be
+ //
+ // cost_change
+ // r = ------------------------------------------------
+ // (model_cost_change + inner_iteration_cost_change)
+ //
+ // In most cases this is fine, but it can be the case that the
+ // change in solution quality due to inner iterations is so large
+ // and the trust region step is so bad, that this ratio can become
+ // quite small.
+ //
+ // This can cause the trust region loop to reject this step. To
+ // get around this, we expicitly check if the inner iterations
+ // led to a net decrease in the objective function value. If
+ // they did, we accept the step even if the trust region ratio
+ // is small.
+ //
+ // Notice that we do not just check that cost_change is positive
+ // which is a weaker condition and would render the
+ // min_relative_decrease threshold useless. Instead, we keep
+ // track of inner_iterations_were_useful, which is true only
+ // when inner iterations lead to a net decrease in the cost.
iteration_summary.step_is_successful =
- iteration_summary.relative_decrease > options_.min_relative_decrease;
+ (inner_iterations_were_useful ||
+ iteration_summary.relative_decrease >
+ options_.min_relative_decrease);
if (iteration_summary.step_is_successful) {
accumulated_candidate_model_cost_change += model_cost_change;
accumulated_reference_model_cost_change += model_cost_change;
- if (relative_decrease <= options_.min_relative_decrease) {
+
+ if (!inner_iterations_were_useful &&
+ relative_decrease <= options_.min_relative_decrease) {
iteration_summary.step_is_nonmonotonic = true;
VLOG(2) << "Non-monotonic step! "
<< " relative_decrease: " << relative_decrease
@@ -419,7 +466,7 @@ void TrustRegionMinimizer::Minimize(const Minimizer::Options& options,
if (!evaluator->Evaluate(x.data(),
&cost,
residuals.data(),
- NULL,
+ gradient.data(),
jacobian)) {
summary->termination_type = NUMERICAL_FAILURE;
summary->error =
@@ -428,8 +475,6 @@ void TrustRegionMinimizer::Minimize(const Minimizer::Options& options,
return;
}
- gradient.setZero();
- jacobian->LeftMultiply(residuals.data(), gradient.data());
iteration_summary.gradient_max_norm = gradient.lpNorm<Eigen::Infinity>();
if (iteration_summary.gradient_max_norm <= absolute_gradient_tolerance) {
diff --git a/extern/libmv/third_party/ceres/internal/ceres/trust_region_strategy.h b/extern/libmv/third_party/ceres/internal/ceres/trust_region_strategy.h
index f150594bbd2..0dcdbfef016 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/trust_region_strategy.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/trust_region_strategy.h
@@ -31,6 +31,8 @@
#ifndef CERES_INTERNAL_TRUST_REGION_STRATEGY_H_
#define CERES_INTERNAL_TRUST_REGION_STRATEGY_H_
+#include <string>
+#include "ceres/internal/port.h"
#include "ceres/types.h"
namespace ceres {
@@ -58,8 +60,8 @@ class TrustRegionStrategy {
: trust_region_strategy_type(LEVENBERG_MARQUARDT),
initial_radius(1e4),
max_radius(1e32),
- lm_min_diagonal(1e-6),
- lm_max_diagonal(1e32),
+ min_lm_diagonal(1e-6),
+ max_lm_diagonal(1e32),
dogleg_type(TRADITIONAL_DOGLEG) {
}
@@ -73,8 +75,8 @@ class TrustRegionStrategy {
// by LevenbergMarquardtStrategy. The DoglegStrategy also uses
// these bounds to construct a regularizing diagonal to ensure
// that the Gauss-Newton step computation is of full rank.
- double lm_min_diagonal;
- double lm_max_diagonal;
+ double min_lm_diagonal;
+ double max_lm_diagonal;
// Further specify which dogleg method to use
DoglegType dogleg_type;
@@ -82,8 +84,22 @@ class TrustRegionStrategy {
// Per solve options.
struct PerSolveOptions {
+ PerSolveOptions()
+ : eta(0),
+ dump_filename_base(""),
+ dump_format_type(TEXTFILE) {
+ }
+
// Forcing sequence for inexact solves.
double eta;
+
+ // If non-empty and dump_format_type is not CONSOLE, the trust
+ // regions strategy will write the linear system to file(s) with
+ // name starting with dump_filename_base. If dump_format_type is
+ // CONSOLE then dump_filename_base will be ignored and the linear
+ // system will be written to the standard error.
+ string dump_filename_base;
+ DumpFormatType dump_format_type;
};
struct Summary {
diff --git a/extern/libmv/third_party/ceres/internal/ceres/types.cc b/extern/libmv/third_party/ceres/internal/ceres/types.cc
index 2e19322cc76..a97f1a55e6b 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/types.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/types.cc
@@ -101,7 +101,6 @@ const char* SparseLinearAlgebraLibraryTypeToString(
}
}
-
bool StringToSparseLinearAlgebraLibraryType(
string value,
SparseLinearAlgebraLibraryType* type) {
@@ -111,6 +110,25 @@ bool StringToSparseLinearAlgebraLibraryType(
return false;
}
+const char* DenseLinearAlgebraLibraryTypeToString(
+ DenseLinearAlgebraLibraryType type) {
+ switch (type) {
+ CASESTR(EIGEN);
+ CASESTR(LAPACK);
+ default:
+ return "UNKNOWN";
+ }
+}
+
+bool StringToDenseLinearAlgebraLibraryType(
+ string value,
+ DenseLinearAlgebraLibraryType* type) {
+ UpperCase(&value);
+ STRENUM(EIGEN);
+ STRENUM(LAPACK);
+ return false;
+}
+
const char* TrustRegionStrategyTypeToString(TrustRegionStrategyType type) {
switch (type) {
CASESTR(LEVENBERG_MARQUARDT);
@@ -165,6 +183,7 @@ const char* LineSearchDirectionTypeToString(LineSearchDirectionType type) {
CASESTR(STEEPEST_DESCENT);
CASESTR(NONLINEAR_CONJUGATE_GRADIENT);
CASESTR(LBFGS);
+ CASESTR(BFGS);
default:
return "UNKNOWN";
}
@@ -176,12 +195,14 @@ bool StringToLineSearchDirectionType(string value,
STRENUM(STEEPEST_DESCENT);
STRENUM(NONLINEAR_CONJUGATE_GRADIENT);
STRENUM(LBFGS);
+ STRENUM(BFGS);
return false;
}
const char* LineSearchTypeToString(LineSearchType type) {
switch (type) {
CASESTR(ARMIJO);
+ CASESTR(WOLFE);
default:
return "UNKNOWN";
}
@@ -190,6 +211,28 @@ const char* LineSearchTypeToString(LineSearchType type) {
bool StringToLineSearchType(string value, LineSearchType* type) {
UpperCase(&value);
STRENUM(ARMIJO);
+ STRENUM(WOLFE);
+ return false;
+}
+
+const char* LineSearchInterpolationTypeToString(
+ LineSearchInterpolationType type) {
+ switch (type) {
+ CASESTR(BISECTION);
+ CASESTR(QUADRATIC);
+ CASESTR(CUBIC);
+ default:
+ return "UNKNOWN";
+ }
+}
+
+bool StringToLineSearchInterpolationType(
+ string value,
+ LineSearchInterpolationType* type) {
+ UpperCase(&value);
+ STRENUM(BISECTION);
+ STRENUM(QUADRATIC);
+ STRENUM(CUBIC);
return false;
}
@@ -214,6 +257,27 @@ bool StringToNonlinearConjugateGradientType(
return false;
}
+const char* CovarianceAlgorithmTypeToString(
+ CovarianceAlgorithmType type) {
+ switch (type) {
+ CASESTR(DENSE_SVD);
+ CASESTR(SPARSE_CHOLESKY);
+ CASESTR(SPARSE_QR);
+ default:
+ return "UNKNOWN";
+ }
+}
+
+bool StringToCovarianceAlgorithmType(
+ string value,
+ CovarianceAlgorithmType* type) {
+ UpperCase(&value);
+ STRENUM(DENSE_SVD);
+ STRENUM(SPARSE_CHOLESKY);
+ STRENUM(SPARSE_QR);
+ return false;
+}
+
const char* SolverTerminationTypeToString(SolverTerminationType type) {
switch (type) {
CASESTR(NO_CONVERGENCE);
@@ -272,4 +336,21 @@ bool IsSparseLinearAlgebraLibraryTypeAvailable(
return false;
}
+bool IsDenseLinearAlgebraLibraryTypeAvailable(
+ DenseLinearAlgebraLibraryType type) {
+ if (type == EIGEN) {
+ return true;
+ }
+ if (type == LAPACK) {
+#ifdef CERES_NO_LAPACK
+ return false;
+#else
+ return true;
+#endif
+ }
+
+ LOG(WARNING) << "Unknown dense linear algebra library " << type;
+ return false;
+}
+
} // namespace ceres
diff --git a/extern/libmv/third_party/ceres/internal/ceres/visibility.cc b/extern/libmv/third_party/ceres/internal/ceres/visibility.cc
index fcd793c00a8..acfa45b863a 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/visibility.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/visibility.cc
@@ -153,4 +153,4 @@ Graph<int>* CreateSchurComplementGraph(const vector<set<int> >& visibility) {
} // namespace internal
} // namespace ceres
-#endif
+#endif // CERES_NO_SUITESPARSE
diff --git a/extern/libmv/third_party/ceres/internal/ceres/visibility_based_preconditioner.cc b/extern/libmv/third_party/ceres/internal/ceres/visibility_based_preconditioner.cc
index 4b1e26af6d2..7af133905b3 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/visibility_based_preconditioner.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/visibility_based_preconditioner.cc
@@ -324,8 +324,8 @@ void VisibilityBasedPreconditioner::InitEliminator(
}
// Update the values of the preconditioner matrix and factorize it.
-bool VisibilityBasedPreconditioner::Update(const BlockSparseMatrixBase& A,
- const double* D) {
+bool VisibilityBasedPreconditioner::UpdateImpl(const BlockSparseMatrix& A,
+ const double* D) {
const time_t start_time = time(NULL);
const int num_rows = m_->num_rows();
CHECK_GT(num_rows, 0);
diff --git a/extern/libmv/third_party/ceres/internal/ceres/visibility_based_preconditioner.h b/extern/libmv/third_party/ceres/internal/ceres/visibility_based_preconditioner.h
index dae498730aa..c58b1a7a90a 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/visibility_based_preconditioner.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/visibility_based_preconditioner.h
@@ -62,7 +62,7 @@ namespace ceres {
namespace internal {
class BlockRandomAccessSparseMatrix;
-class BlockSparseMatrixBase;
+class BlockSparseMatrix;
struct CompressedRowBlockStructure;
class SchurEliminatorBase;
@@ -123,7 +123,7 @@ class SchurEliminatorBase;
// preconditioner.RightMultiply(x, y);
//
#ifndef CERES_NO_SUITESPARSE
-class VisibilityBasedPreconditioner : public Preconditioner {
+class VisibilityBasedPreconditioner : public BlockSparseMatrixPreconditioner {
public:
// Initialize the symbolic structure of the preconditioner. bs is
// the block structure of the linear system to be solved. It is used
@@ -136,12 +136,13 @@ class VisibilityBasedPreconditioner : public Preconditioner {
virtual ~VisibilityBasedPreconditioner();
// Preconditioner interface
- virtual bool Update(const BlockSparseMatrixBase& A, const double* D);
virtual void RightMultiply(const double* x, double* y) const;
virtual int num_rows() const;
friend class VisibilityBasedPreconditionerTest;
+
private:
+ virtual bool UpdateImpl(const BlockSparseMatrix& A, const double* D);
void ComputeClusterJacobiSparsity(const CompressedRowBlockStructure& bs);
void ComputeClusterTridiagonalSparsity(const CompressedRowBlockStructure& bs);
void InitStorage(const CompressedRowBlockStructure& bs);
@@ -203,7 +204,7 @@ class VisibilityBasedPreconditioner : public Preconditioner {
#else // SuiteSparse
// If SuiteSparse is not compiled in, the preconditioner is not
// available.
-class VisibilityBasedPreconditioner : public Preconditioner {
+class VisibilityBasedPreconditioner : public BlockSparseMatrixPreconditioner {
public:
VisibilityBasedPreconditioner(const CompressedRowBlockStructure& bs,
const Preconditioner::Options& options) {
@@ -215,7 +216,9 @@ class VisibilityBasedPreconditioner : public Preconditioner {
virtual void LeftMultiply(const double* x, double* y) const {}
virtual int num_rows() const { return -1; }
virtual int num_cols() const { return -1; }
- bool Update(const BlockSparseMatrixBase& A, const double* D) {
+
+ private:
+ bool UpdateImpl(const BlockSparseMatrix& A, const double* D) {
return false;
}
};
diff --git a/extern/libmv/third_party/ceres/internal/ceres/wall_time.cc b/extern/libmv/third_party/ceres/internal/ceres/wall_time.cc
index e63d20c0ab1..85c4417552d 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/wall_time.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/wall_time.cc
@@ -86,7 +86,7 @@ void EventLogger::AddEvent(const string& event_name) {
last_event_time_ = current_time;
StringAppendF(&events_,
- " %25s : %10.5f %10.5f\n",
+ " %30s : %10.5f %10.5f\n",
event_name.c_str(),
relative_time_delta,
absolute_time_delta);
diff --git a/extern/libmv/third_party/ceres/internal/ceres/wall_time.h b/extern/libmv/third_party/ceres/internal/ceres/wall_time.h
index 45f65ca1aa5..37f5568a125 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/wall_time.h
+++ b/extern/libmv/third_party/ceres/internal/ceres/wall_time.h
@@ -32,7 +32,7 @@
#define CERES_INTERNAL_WALL_TIME_H_
#include <map>
-
+#include <string>
#include "ceres/internal/port.h"
#include "ceres/stringprintf.h"
#include "glog/logging.h"
diff --git a/extern/libmv/third_party/msinttypes/stdint.h b/extern/libmv/third_party/msinttypes/stdint.h
index e236bb00015..189ee34571c 100644
--- a/extern/libmv/third_party/msinttypes/stdint.h
+++ b/extern/libmv/third_party/msinttypes/stdint.h
@@ -72,16 +72,16 @@ extern "C" {
// realize that, e.g. char has the same size as __int8
// so we give up on __intX for them.
#if (_MSC_VER < 1300)
- typedef char int8_t;
- typedef short int16_t;
- typedef int int32_t;
+ typedef signed char int8_t;
+ typedef signed short int16_t;
+ typedef signed int int32_t;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
#else
- typedef __int8 int8_t;
- typedef __int16 int16_t;
- typedef __int32 int32_t;
+ typedef signed __int8 int8_t;
+ typedef signed __int16 int16_t;
+ typedef signed __int32 int32_t;
typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t;
diff --git a/extern/recastnavigation/recast-capi.cpp b/extern/recastnavigation/recast-capi.cpp
index 1c11d87f639..38c14118156 100644
--- a/extern/recastnavigation/recast-capi.cpp
+++ b/extern/recastnavigation/recast-capi.cpp
@@ -270,129 +270,3 @@ unsigned int *recast_polyMeshDetailGetMeshes(struct recast_polyMeshDetail *mesh,
return dmesh->meshes;
}
-// qsort based on FreeBSD source (libkern\qsort.c)
-typedef int cmp_t(void *, const void *, const void *);
-static inline char *med3(char *, char *, char *, cmp_t *, void *);
-static inline void swapfunc(char *, char *, int, int);
-
-#define min(a, b) (a) < (b) ? a : b
-#define swapcode(TYPE, parmi, parmj, n) \
-{ \
- long i = (n) / sizeof(TYPE); \
- TYPE *pi = (TYPE *) (parmi); \
- TYPE *pj = (TYPE *) (parmj); \
- do { \
- TYPE t = *pi; \
- *pi++ = *pj; \
- *pj++ = t; \
- } while (--i > 0); \
-}
-#define SWAPINIT(a, es) swaptype = ((char *)a - (char *)0) % sizeof(long) || \
- es % sizeof(long) ? 2 : es == sizeof(long)? 0 : 1;
-
-static inline void swapfunc(char* a, char* b, int n, int swaptype)
-{
- if(swaptype <= 1)
- swapcode(long, a, b, n)
- else
- swapcode(char, a, b, n)
-}
-
-#define swap(a, b) \
- if (swaptype == 0) { \
- long t = *(long *)(a); \
- *(long *)(a) = *(long *)(b);\
- *(long *)(b) = t; \
- } else \
- swapfunc(a, b, es, swaptype)
-
-#define vecswap(a, b, n) if ((n) > 0) swapfunc(a, b, n, swaptype)
-#define CMP(t, x, y) (cmp((t), (x), (y)))
-
-static inline char *med3(char *a, char *b, char *c, cmp_t *cmp, void *thunk)
-{
- return CMP(thunk, a, b) < 0 ?
- (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a ))
- :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c ));
-}
-
-void recast_qsort(void *a, size_t n, size_t es, void *thunk, cmp_t *cmp)
-{
- char *pa, *pb, *pc, *pd, *pl, *pm, *pn;
- int d, r, swaptype, swap_cnt;
-
-loop:
- SWAPINIT(a, es);
- swap_cnt = 0;
- if (n < 7) {
- for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es)
- for (pl = pm;
- pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
- pl -= es)
- swap(pl, pl - es);
- return;
- }
- pm = (char *)a + (n / 2) * es;
- if (n > 7) {
- pl = (char *)a;
- pn = (char *)a + (n - 1) * es;
- if (n > 40) {
- d = (n / 8) * es;
- pl = med3(pl, pl + d, pl + 2 * d, cmp, thunk);
- pm = med3(pm - d, pm, pm + d, cmp, thunk);
- pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk);
- }
- pm = med3(pl, pm, pn, cmp, thunk);
- }
- swap((char *)a, pm);
- pa = pb = (char *)a + es;
-
- pc = pd = (char *)a + (n - 1) * es;
- for (;;) {
- while (pb <= pc && (r = CMP(thunk, pb, a)) <= 0) {
- if (r == 0) {
- swap_cnt = 1;
- swap(pa, pb);
- pa += es;
- }
- pb += es;
- }
- while (pb <= pc && (r = CMP(thunk, pc, a)) >= 0) {
- if (r == 0) {
- swap_cnt = 1;
- swap(pc, pd);
- pd -= es;
- }
- pc -= es;
- }
- if (pb > pc)
- break;
- swap(pb, pc);
- swap_cnt = 1;
- pb += es;
- pc -= es;
- }
- if (swap_cnt == 0) { /* Switch to insertion sort */
- for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es)
- for (pl = pm;
- pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
- pl -= es)
- swap(pl, pl - es);
- return;
- }
-
- pn = (char *)a + n * es;
- r = min(pa - (char *)a, pb - pa);
- vecswap((char *)a, pb - r, r);
- r = min(pd - pc, pn - pd - es);
- vecswap(pb, pn - r, r);
- if ((r = pb - pa) > es)
- recast_qsort(a, r / es, es, thunk, cmp);
- if ((r = pd - pc) > es) {
- /* Iterate rather than recurse to save stack space */
- a = pn - r;
- n = r / es;
- goto loop;
- }
-}
-
diff --git a/extern/recastnavigation/recast-capi.h b/extern/recastnavigation/recast-capi.h
index 52a8e215ea1..54bf84931c4 100644
--- a/extern/recastnavigation/recast-capi.h
+++ b/extern/recastnavigation/recast-capi.h
@@ -127,11 +127,6 @@ unsigned char *recast_polyMeshDetailGetTris(struct recast_polyMeshDetail *mesh,
unsigned int *recast_polyMeshDetailGetMeshes(struct recast_polyMeshDetail *mesh, int *nmeshes);
-/* utility function: quick sort reentrant */
-typedef int recast_cmp_t(void *ctx, const void *a, const void *b);
-
-void recast_qsort(void *a, size_t n, size_t es, void *thunk, recast_cmp_t *cmp);
-
#ifdef __cplusplus
}
#endif
diff --git a/intern/CMakeLists.txt b/intern/CMakeLists.txt
index bb8cd7aaf70..c45e66cd77b 100644
--- a/intern/CMakeLists.txt
+++ b/intern/CMakeLists.txt
@@ -23,10 +23,10 @@
#
# ***** END GPL LICENSE BLOCK *****
+# add_subdirectory(atomic) # header only
add_subdirectory(string)
add_subdirectory(ghost)
add_subdirectory(guardedalloc)
-add_subdirectory(moto)
add_subdirectory(memutil)
add_subdirectory(opencolorio)
add_subdirectory(opennl)
@@ -61,6 +61,10 @@ if(WITH_IK_ITASC)
add_subdirectory(itasc)
endif()
+if(WITH_IK_SOLVER OR WITH_GAMEENGINE OR WITH_MOD_BOOLEAN)
+ add_subdirectory(moto)
+endif()
+
if(WITH_CYCLES)
add_subdirectory(cycles)
endif()
diff --git a/intern/atomic/atomic_ops.h b/intern/atomic/atomic_ops.h
new file mode 100644
index 00000000000..243e194102f
--- /dev/null
+++ b/intern/atomic/atomic_ops.h
@@ -0,0 +1,307 @@
+/*
+ * Adopted from jemalloc with this license:
+ *
+ * Copyright (C) 2002-2013 Jason Evans <jasone@canonware.com>.
+ * All rights reserved.
+ * Copyright (C) 2007-2012 Mozilla Foundation. All rights reserved.
+ * Copyright (C) 2009-2013 Facebook, Inc. All rights reserved.
+
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * 1. Redistributions of source code must retain the above copyright notice(s),
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice(s),
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef __ATOMIC_OPS_H__
+#define __ATOMIC_OPS_H__
+
+#include <assert.h>
+
+#if defined (__APPLE__)
+# include <libkern/OSAtomic.h>
+#elif defined(_MSC_VER)
+# include <windows.h>
+#endif
+
+/* needed for int types */
+#include "../../source/blender/blenlib/BLI_sys_types.h"
+
+/* little macro so inline keyword works */
+#if defined(_MSC_VER)
+# define ATOMIC_INLINE static __forceinline
+#else
+# if (defined(__APPLE__) && defined(__ppc__))
+/* static inline __attribute__ here breaks osx ppc gcc42 build */
+# define ATOMIC_INLINE static __attribute__((always_inline))
+# else
+# define ATOMIC_INLINE static inline __attribute__((always_inline))
+# endif
+#endif
+
+#if defined(_M_X64) || defined(__amd64__) || defined(__x86_64__)
+# define LG_SIZEOF_PTR 3
+# define LG_SIZEOF_INT 2
+#else
+# define LG_SIZEOF_PTR 2
+# define LG_SIZEOF_INT 2
+#endif
+
+/******************************************************************************/
+/* 64-bit operations. */
+#if (LG_SIZEOF_PTR == 3 || LG_SIZEOF_INT == 3)
+# ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8
+ATOMIC_INLINE uint64_t
+atomic_add_uint64(uint64_t *p, uint64_t x)
+{
+ return (__sync_add_and_fetch(p, x));
+}
+
+ATOMIC_INLINE uint64_t
+atomic_sub_uint64(uint64_t *p, uint64_t x)
+{
+ return (__sync_sub_and_fetch(p, x));
+}
+#elif (defined(_MSC_VER))
+ATOMIC_INLINE uint64_t
+atomic_add_uint64(uint64_t *p, uint64_t x)
+{
+ return (InterlockedExchangeAdd64(p, x));
+}
+
+ATOMIC_INLINE uint64_t
+atomic_sub_uint64(uint64_t *p, uint64_t x)
+{
+ return (InterlockedExchangeAdd64(p, -((int64_t)x)));
+}
+#elif (defined(__APPLE__))
+ATOMIC_INLINE uint64_t
+atomic_add_uint64(uint64_t *p, uint64_t x)
+{
+ return (uint64_t)(OSAtomicAdd64((int64_t)x, (int64_t *)p));
+}
+
+ATOMIC_INLINE uint64_t
+atomic_sub_uint64(uint64_t *p, uint64_t x)
+{
+ return (uint64_t)(OSAtomicAdd64(-((int64_t)x), (int64_t *)p));
+}
+# elif (defined(__amd64__) || defined(__x86_64__))
+ATOMIC_INLINE uint64_t
+atomic_add_uint64(uint64_t *p, uint64_t x)
+{
+ asm volatile (
+ "lock; xaddq %0, %1;"
+ : "+r" (x), "=m" (*p) /* Outputs. */
+ : "m" (*p) /* Inputs. */
+ );
+ return (x);
+}
+
+ATOMIC_INLINE uint64_t
+atomic_sub_uint64(uint64_t *p, uint64_t x)
+{
+ x = (uint64_t)(-(int64_t)x);
+ asm volatile (
+ "lock; xaddq %0, %1;"
+ : "+r" (x), "=m" (*p) /* Outputs. */
+ : "m" (*p) /* Inputs. */
+ );
+ return (x);
+}
+# elif (defined(JEMALLOC_ATOMIC9))
+ATOMIC_INLINE uint64_t
+atomic_add_uint64(uint64_t *p, uint64_t x)
+{
+ /*
+ * atomic_fetchadd_64() doesn't exist, but we only ever use this
+ * function on LP64 systems, so atomic_fetchadd_long() will do.
+ */
+ assert(sizeof(uint64_t) == sizeof(unsigned long));
+
+ return (atomic_fetchadd_long(p, (unsigned long)x) + x);
+}
+
+ATOMIC_INLINE uint64_t
+atomic_sub_uint64(uint64_t *p, uint64_t x)
+{
+ assert(sizeof(uint64_t) == sizeof(unsigned long));
+
+ return (atomic_fetchadd_long(p, (unsigned long)(-(long)x)) - x);
+}
+# elif (defined(JE_FORCE_SYNC_COMPARE_AND_SWAP_8))
+ATOMIC_INLINE uint64_t
+atomic_add_uint64(uint64_t *p, uint64_t x)
+{
+ return (__sync_add_and_fetch(p, x));
+}
+
+ATOMIC_INLINE uint64_t
+atomic_sub_uint64(uint64_t *p, uint64_t x)
+{
+ return (__sync_sub_and_fetch(p, x));
+}
+# else
+# error "Missing implementation for 64-bit atomic operations"
+# endif
+#endif
+
+/******************************************************************************/
+/* 32-bit operations. */
+#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
+ATOMIC_INLINE uint32_t
+atomic_add_uint32(uint32_t *p, uint32_t x)
+{
+ return (__sync_add_and_fetch(p, x));
+}
+
+ATOMIC_INLINE uint32_t
+atomic_sub_uint32(uint32_t *p, uint32_t x)
+{
+ return (__sync_sub_and_fetch(p, x));
+}
+#elif (defined(_MSC_VER))
+ATOMIC_INLINE uint32_t
+atomic_add_uint32(uint32_t *p, uint32_t x)
+{
+ return (InterlockedExchangeAdd(p, x));
+}
+
+ATOMIC_INLINE uint32_t
+atomic_sub_uint32(uint32_t *p, uint32_t x)
+{
+ return (InterlockedExchangeAdd(p, -((int32_t)x)));
+}
+#elif (defined(__APPLE__))
+ATOMIC_INLINE uint32_t
+atomic_add_uint32(uint32_t *p, uint32_t x)
+{
+ return (uint32_t)(OSAtomicAdd32((int32_t)x, (int32_t *)p));
+}
+
+ATOMIC_INLINE uint32_t
+atomic_sub_uint32(uint32_t *p, uint32_t x)
+{
+ return (uint32_t)(OSAtomicAdd32(-((int32_t)x), (int32_t *)p));
+}
+#elif (defined(__i386__) || defined(__amd64__) || defined(__x86_64__))
+ATOMIC_INLINE uint32_t
+atomic_add_uint32(uint32_t *p, uint32_t x)
+{
+ asm volatile (
+ "lock; xaddl %0, %1;"
+ : "+r" (x), "=m" (*p) /* Outputs. */
+ : "m" (*p) /* Inputs. */
+ );
+ return (x);
+}
+
+ATOMIC_INLINE uint32_t
+atomic_sub_uint32(uint32_t *p, uint32_t x)
+{
+ x = (uint32_t)(-(int32_t)x);
+ asm volatile (
+ "lock; xaddl %0, %1;"
+ : "+r" (x), "=m" (*p) /* Outputs. */
+ : "m" (*p) /* Inputs. */
+ );
+ return (x);
+}
+#elif (defined(JEMALLOC_ATOMIC9))
+ATOMIC_INLINE uint32_t
+atomic_add_uint32(uint32_t *p, uint32_t x)
+{
+ return (atomic_fetchadd_32(p, x) + x);
+}
+
+ATOMIC_INLINE uint32_t
+atomic_sub_uint32(uint32_t *p, uint32_t x)
+{
+ return (atomic_fetchadd_32(p, (uint32_t)(-(int32_t)x)) - x);
+}
+#elif (defined(JE_FORCE_SYNC_COMPARE_AND_SWAP_4))
+ATOMIC_INLINE uint32_t
+atomic_add_uint32(uint32_t *p, uint32_t x)
+{
+ return (__sync_add_and_fetch(p, x));
+}
+
+ATOMIC_INLINE uint32_t
+atomic_sub_uint32(uint32_t *p, uint32_t x)
+{
+ return (__sync_sub_and_fetch(p, x));
+}
+#else
+# error "Missing implementation for 32-bit atomic operations"
+#endif
+
+/******************************************************************************/
+/* size_t operations. */
+ATOMIC_INLINE size_t
+atomic_add_z(size_t *p, size_t x)
+{
+ assert(sizeof(size_t) == 1 << LG_SIZEOF_PTR);
+
+#if (LG_SIZEOF_PTR == 3)
+ return ((size_t)atomic_add_uint64((uint64_t *)p, (uint64_t)x));
+#elif (LG_SIZEOF_PTR == 2)
+ return ((size_t)atomic_add_uint32((uint32_t *)p, (uint32_t)x));
+#endif
+}
+
+ATOMIC_INLINE size_t
+atomic_sub_z(size_t *p, size_t x)
+{
+ assert(sizeof(size_t) == 1 << LG_SIZEOF_PTR);
+
+#if (LG_SIZEOF_PTR == 3)
+ return ((size_t)atomic_add_uint64((uint64_t *)p,
+ (uint64_t)-((int64_t)x)));
+#elif (LG_SIZEOF_PTR == 2)
+ return ((size_t)atomic_add_uint32((uint32_t *)p,
+ (uint32_t)-((int32_t)x)));
+#endif
+}
+
+/******************************************************************************/
+/* unsigned operations. */
+ATOMIC_INLINE unsigned
+atomic_add_u(unsigned *p, unsigned x)
+{
+ assert(sizeof(unsigned) == 1 << LG_SIZEOF_INT);
+
+#if (LG_SIZEOF_INT == 3)
+ return ((unsigned)atomic_add_uint64((uint64_t *)p, (uint64_t)x));
+#elif (LG_SIZEOF_INT == 2)
+ return ((unsigned)atomic_add_uint32((uint32_t *)p, (uint32_t)x));
+#endif
+}
+
+ATOMIC_INLINE unsigned
+atomic_sub_u(unsigned *p, unsigned x)
+{
+ assert(sizeof(unsigned) == 1 << LG_SIZEOF_INT);
+
+#if (LG_SIZEOF_INT == 3)
+ return ((unsigned)atomic_add_uint64((uint64_t *)p,
+ (uint64_t)-((int64_t)x)));
+#elif (LG_SIZEOF_INT == 2)
+ return ((unsigned)atomic_add_uint32((uint32_t *)p,
+ (uint32_t)-((int32_t)x)));
+#endif
+}
+
+#endif /* __ATOMIC_OPS_H__ */
diff --git a/intern/bsp/intern/BOP_CarveInterface.cpp b/intern/bsp/intern/BOP_CarveInterface.cpp
index bb3a783548c..a96196ee8f5 100644
--- a/intern/bsp/intern/BOP_CarveInterface.cpp
+++ b/intern/bsp/intern/BOP_CarveInterface.cpp
@@ -711,6 +711,47 @@ static BSP_CSGMesh *Carve_exportMesh(MeshSet<3>* &poly, carve::interpolate::Face
return outputMesh;
}
+static void meshSetMinMax(const MeshSet<3> *mesh,
+ carve::geom3d::Vector *min,
+ carve::geom3d::Vector *max)
+{
+ for (uint i = 0; i < mesh->vertex_storage.size(); ++i) {
+ min->x = MIN(min->x, mesh->vertex_storage[i].v.x);
+ min->y = MIN(min->y, mesh->vertex_storage[i].v.y);
+ min->z = MIN(min->z, mesh->vertex_storage[i].v.z);
+ max->x = MAX(max->x, mesh->vertex_storage[i].v.x);
+ max->y = MAX(max->y, mesh->vertex_storage[i].v.y);
+ max->z = MAX(max->z, mesh->vertex_storage[i].v.z);
+ }
+}
+
+static void getRescaleMinMax(const MeshSet<3> *left,
+ const MeshSet<3> *right,
+ carve::geom3d::Vector *min,
+ carve::geom3d::Vector *max)
+{
+ min->x = max->x = left->vertex_storage[0].v.x;
+ min->y = max->y = left->vertex_storage[0].v.y;
+ min->z = max->z = left->vertex_storage[0].v.z;
+
+ meshSetMinMax(left, min, max);
+ meshSetMinMax(right, min, max);
+
+ // Make sure we don't scale object with zer oscale
+ if ((min->x - max->x) < DBL_EPSILON) {
+ min->x = -1.0;
+ max->x = 1.0;
+ }
+ if ((min->y - max->y) < DBL_EPSILON) {
+ min->y = -1.0;
+ max->y = 1.0;
+ }
+ if ((min->z - max->z) < DBL_EPSILON) {
+ min->z = -1.0;
+ max->z = 1.0;
+ }
+}
+
/**
* Performs a generic booleam operation, the entry point for external modules.
* @param opType Boolean operation type BOP_INTERSECTION, BOP_UNION, BOP_DIFFERENCE
@@ -753,29 +794,11 @@ BoolOpState BOP_performBooleanOperation(BoolOpType opType,
left = Carve_addMesh(obAFaces, obAVertices, oface_num, num_origfaces );
right = Carve_addMesh(obBFaces, obBVertices, oface_num, num_origfaces );
- min.x = max.x = left->vertex_storage[0].v.x;
- min.y = max.y = left->vertex_storage[0].v.y;
- min.z = max.z = left->vertex_storage[0].v.z;
- for (uint i = 1; i < left->vertex_storage.size(); ++i) {
- min.x = MIN(min.x,left->vertex_storage[i].v.x);
- min.y = MIN(min.y,left->vertex_storage[i].v.y);
- min.z = MIN(min.z,left->vertex_storage[i].v.z);
- max.x = MAX(max.x,left->vertex_storage[i].v.x);
- max.y = MAX(max.y,left->vertex_storage[i].v.y);
- max.z = MAX(max.z,left->vertex_storage[i].v.z);
- }
- for (uint i = 0; i < right->vertex_storage.size(); ++i) {
- min.x = MIN(min.x,right->vertex_storage[i].v.x);
- min.y = MIN(min.y,right->vertex_storage[i].v.y);
- min.z = MIN(min.z,right->vertex_storage[i].v.z);
- max.x = MAX(max.x,right->vertex_storage[i].v.x);
- max.y = MAX(max.y,right->vertex_storage[i].v.y);
- max.z = MAX(max.z,right->vertex_storage[i].v.z);
- }
+ getRescaleMinMax(left, right, &min, &max);
carve::rescale::rescale scaler(min.x, min.y, min.z, max.x, max.y, max.z);
carve::rescale::fwd fwd_r(scaler);
- carve::rescale::rev rev_r(scaler);
+ carve::rescale::rev rev_r(scaler);
left->transform(fwd_r);
right->transform(fwd_r);
diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt
index d83ff20f538..6821e93ad87 100644
--- a/intern/cycles/CMakeLists.txt
+++ b/intern/cycles/CMakeLists.txt
@@ -14,8 +14,13 @@ endif()
if(WIN32 AND MSVC)
# there is no /arch:SSE3, but intrinsics are available anyway
- set(CYCLES_SSE2_KERNEL_FLAGS "/arch:SSE2 /fp:fast -D_CRT_SECURE_NO_WARNINGS /Gs-")
- set(CYCLES_SSE3_KERNEL_FLAGS "/arch:SSE2 /fp:fast -D_CRT_SECURE_NO_WARNINGS /Gs-")
+ if(CMAKE_CL_64)
+ set(CYCLES_SSE2_KERNEL_FLAGS "/fp:fast -D_CRT_SECURE_NO_WARNINGS /Gs-")
+ set(CYCLES_SSE3_KERNEL_FLAGS "/fp:fast -D_CRT_SECURE_NO_WARNINGS /Gs-")
+ else()
+ set(CYCLES_SSE2_KERNEL_FLAGS "/arch:SSE2 /fp:fast -D_CRT_SECURE_NO_WARNINGS /Gs-")
+ set(CYCLES_SSE3_KERNEL_FLAGS "/arch:SSE2 /fp:fast -D_CRT_SECURE_NO_WARNINGS /Gs-")
+ endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:fast -D_CRT_SECURE_NO_WARNINGS /Gs-")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Ox")
@@ -76,7 +81,7 @@ if(WITH_CYCLES_BLENDER)
add_subdirectory(blender)
endif()
-if(WITH_CYCLES_TEST OR WITH_CYCLES_NETWORK)
+if(WITH_CYCLES_STANDALONE OR WITH_CYCLES_NETWORK)
add_subdirectory(app)
endif()
diff --git a/intern/cycles/SConscript b/intern/cycles/SConscript
index d1f1b287e00..e61018bc3dd 100644
--- a/intern/cycles/SConscript
+++ b/intern/cycles/SConscript
@@ -57,7 +57,7 @@ if env['WITH_BF_CYCLES_OSL']:
incs.append(cycles['BF_OSL_INC'])
incs.extend('. bvh render device kernel kernel/osl kernel/svm util subd'.split())
-incs.extend('#intern/guardedalloc #source/blender/makesrna #source/blender/makesdna'.split())
+incs.extend('#intern/guardedalloc #source/blender/makesrna #source/blender/makesdna #source/blender/blenlib'.split())
incs.extend('#source/blender/blenloader ../../source/blender/makesrna/intern'.split())
incs.extend('#extern/glew/include #intern/mikktspace'.split())
incs.append(cycles['BF_OIIO_INC'])
diff --git a/intern/cycles/app/CMakeLists.txt b/intern/cycles/app/CMakeLists.txt
index 3fb8aaf934f..a2142d77a9e 100644
--- a/intern/cycles/app/CMakeLists.txt
+++ b/intern/cycles/app/CMakeLists.txt
@@ -20,14 +20,23 @@ set(LIBRARIES
cycles_subd
cycles_util
${BOOST_LIBRARIES}
+ ${OPENEXR_LIBRARIES}
${OPENGL_LIBRARIES}
${CYCLES_GLEW_LIBRARY}
${OPENIMAGEIO_LIBRARIES}
+ ${PNG_LIBRARIES}
+ ${JPEG_LIBRARIES}
+ ${ZLIB_LIBRARIES}
+ ${TIFF_LIBRARY}
)
-link_directories(${OPENIMAGEIO_LIBPATH} ${BOOST_LIBPATH})
+if(WIN32)
+ list(APPEND LIBRARIES ${PTHREADS_LIBRARIES})
+endif()
+
+link_directories(${OPENIMAGEIO_LIBPATH} ${BOOST_LIBPATH} ${PNG_LIBPATH} ${JPEG_LIBPATH} ${ZLIB_LIBPATH} ${TIFF_LIBPATH})
-if(WITH_CYCLES_TEST)
+if(WITH_CYCLES_STANDALONE AND WITH_CYCLES_STANDALONE_GUI)
list(APPEND LIBRARIES ${GLUT_LIBRARIES})
endif()
@@ -38,17 +47,17 @@ endif()
include_directories(${INC})
include_directories(SYSTEM ${INC_SYS})
-if(WITH_CYCLES_TEST)
+if(WITH_CYCLES_STANDALONE)
set(SRC
- cycles_test.cpp
+ cycles_standalone.cpp
cycles_xml.cpp
cycles_xml.h
)
- add_executable(cycles_test ${SRC})
- target_link_libraries(cycles_test ${LIBRARIES})
+ add_executable(cycles ${SRC})
+ target_link_libraries(cycles ${LIBRARIES} ${CMAKE_DL_LIBS})
if(UNIX AND NOT APPLE)
- set_target_properties(cycles_test PROPERTIES INSTALL_RPATH $ORIGIN/lib)
+ set_target_properties(cycles PROPERTIES INSTALL_RPATH $ORIGIN/lib)
endif()
unset(SRC)
endif()
diff --git a/intern/cycles/app/cycles_server.cpp b/intern/cycles/app/cycles_server.cpp
index f94a29b9451..e80fc0cb95f 100644
--- a/intern/cycles/app/cycles_server.cpp
+++ b/intern/cycles/app/cycles_server.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include <stdio.h>
diff --git a/intern/cycles/app/cycles_test.cpp b/intern/cycles/app/cycles_standalone.cpp
index 6d7c5912cb5..6b201017c46 100644
--- a/intern/cycles/app/cycles_test.cpp
+++ b/intern/cycles/app/cycles_standalone.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include <stdio.h>
@@ -31,7 +29,10 @@
#include "util_progress.h"
#include "util_string.h"
#include "util_time.h"
+
+#ifdef WITH_CYCLES_STANDALONE_GUI
#include "util_view.h"
+#endif
#include "cycles_xml.h"
@@ -102,8 +103,10 @@ static void session_init()
if(options.session_params.background && !options.quiet)
options.session->progress.set_update_callback(function_bind(&session_print_status));
+#ifdef WITH_CYCLES_STANDALONE_GUI
else
options.session->progress.set_update_callback(function_bind(&view_redraw));
+#endif
options.session->start();
@@ -138,6 +141,7 @@ static void session_exit()
}
}
+#ifdef WITH_CYCLES_STANDALONE_GUI
static void display_info(Progress& progress)
{
static double latency = 0.0;
@@ -186,8 +190,9 @@ static void keyboard(unsigned char key)
if(key == 'r')
options.session->reset(session_buffer_params(), options.session_params.samples);
else if(key == 27) // escape
- options.session->progress.set_cancel("Cancelled");
+ options.session->progress.set_cancel("Canceled");
}
+#endif
static int files_parse(int argc, const char *argv[])
{
@@ -231,7 +236,7 @@ static void options_parse(int argc, const char **argv)
ArgParse ap;
bool help = false;
- ap.options ("Usage: cycles_test [options] file.xml",
+ ap.options ("Usage: cycles [options] file.xml",
"%*", files_parse, "",
"--device %s", &devicename, ("Devices to use: " + device_names).c_str(),
"--shadingsys %s", &ssname, "Shading system to use: svm, osl",
@@ -273,8 +278,14 @@ static void options_parse(int argc, const char **argv)
else if(ssname == "svm")
options.scene_params.shadingsystem = SceneParams::SVM;
- /* Progressive rendering */
- options.session_params.progressive = true;
+#ifdef WITH_CYCLES_STANDALONE_GUI
+ /* Progressive rendering for GUI */
+ if(!options.session_params.background)
+ options.session_params.progressive = true;
+#else
+ /* When building without GUI, set background */
+ options.session_params.background = true;
+#endif
/* find matching device */
DeviceType device_type = Device::type_from_string(devicename.c_str());
@@ -327,13 +338,15 @@ using namespace ccl;
int main(int argc, const char **argv)
{
path_init();
-
options_parse(argc, argv);
-
+
+#ifdef WITH_CYCLES_STANDALONE_GUI
if(options.session_params.background) {
+#endif
session_init();
options.session->wait();
session_exit();
+#ifdef WITH_CYCLES_STANDALONE_GUI
}
else {
string title = "Cycles: " + path_filename(options.filepath);
@@ -342,6 +355,7 @@ int main(int argc, const char **argv)
view_main_loop(title.c_str(), options.width, options.height,
session_init, session_exit, resize, display, keyboard);
}
+#endif
return 0;
}
diff --git a/intern/cycles/app/cycles_xml.cpp b/intern/cycles/app/cycles_xml.cpp
index 40fbb7af556..55a2a30b9a8 100644
--- a/intern/cycles/app/cycles_xml.cpp
+++ b/intern/cycles/app/cycles_xml.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include <stdio.h>
@@ -254,10 +252,14 @@ static void xml_read_film(const XMLReadState& state, pugi::xml_node node)
static void xml_read_integrator(const XMLReadState& state, pugi::xml_node node)
{
Integrator *integrator = state.scene->integrator;
+ bool branched = false;
- xml_read_bool(&integrator->progressive, node, "progressive");
+ xml_read_bool(&branched, node, "branched");
+
+ if(branched)
+ integrator->method = Integrator::BRANCHED_PATH;
- if(!integrator->progressive) {
+ if(integrator->method == Integrator::BRANCHED_PATH) {
xml_read_int(&integrator->diffuse_samples, node, "diffuse_samples");
xml_read_int(&integrator->glossy_samples, node, "glossy_samples");
xml_read_int(&integrator->transmission_samples, node, "transmission_samples");
diff --git a/intern/cycles/app/cycles_xml.h b/intern/cycles/app/cycles_xml.h
index 90ec52922e1..1e3ed411312 100644
--- a/intern/cycles/app/cycles_xml.h
+++ b/intern/cycles/app/cycles_xml.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __CYCLES_XML__
diff --git a/intern/cycles/app/io_export_cycles_xml.py b/intern/cycles/app/io_export_cycles_xml.py
index 3ba9e201d11..b48545eef32 100644
--- a/intern/cycles/app/io_export_cycles_xml.py
+++ b/intern/cycles/app/io_export_cycles_xml.py
@@ -1,19 +1,17 @@
#
-# Copyright 2011, Blender Foundation.
+# Copyright 2011-2013 Blender Foundation
#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# http://www.apache.org/licenses/LICENSE-2.0
#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License
#
# XML exporter for generating test files, not intended for end users
diff --git a/intern/cycles/blender/CCL_api.h b/intern/cycles/blender/CCL_api.h
index b8a30b71717..29d8ed0d98e 100644
--- a/intern/cycles/blender/CCL_api.h
+++ b/intern/cycles/blender/CCL_api.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef CCL_API_H
diff --git a/intern/cycles/blender/CMakeLists.txt b/intern/cycles/blender/CMakeLists.txt
index 29295d664ad..25f91a0caea 100644
--- a/intern/cycles/blender/CMakeLists.txt
+++ b/intern/cycles/blender/CMakeLists.txt
@@ -10,6 +10,7 @@ set(INC
../../mikktspace
../../../source/blender/makesdna
../../../source/blender/makesrna
+ ../../../source/blender/blenlib
${CMAKE_BINARY_DIR}/source/blender/makesrna/intern
)
@@ -44,6 +45,8 @@ set(ADDON_FILES
addon/ui.py
)
+add_definitions(-DGLEW_STATIC)
+
blender_add_lib(bf_intern_cycles "${SRC}" "${INC}" "${INC_SYS}")
add_dependencies(bf_intern_cycles bf_rna)
diff --git a/intern/cycles/blender/addon/__init__.py b/intern/cycles/blender/addon/__init__.py
index cefdf504206..e54db53c595 100644
--- a/intern/cycles/blender/addon/__init__.py
+++ b/intern/cycles/blender/addon/__init__.py
@@ -1,19 +1,17 @@
#
-# Copyright 2011, Blender Foundation.
+# Copyright 2011-2013 Blender Foundation
#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# http://www.apache.org/licenses/LICENSE-2.0
#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License
#
# <pep8 compliant>
diff --git a/intern/cycles/blender/addon/engine.py b/intern/cycles/blender/addon/engine.py
index 8958ca3e42e..3f15e232de7 100644
--- a/intern/cycles/blender/addon/engine.py
+++ b/intern/cycles/blender/addon/engine.py
@@ -1,19 +1,17 @@
#
-# Copyright 2011, Blender Foundation.
+# Copyright 2011-2013 Blender Foundation
#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# http://www.apache.org/licenses/LICENSE-2.0
#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License
#
# <pep8 compliant>
diff --git a/intern/cycles/blender/addon/osl.py b/intern/cycles/blender/addon/osl.py
index 0a67edac1e3..c5f9d93013e 100644
--- a/intern/cycles/blender/addon/osl.py
+++ b/intern/cycles/blender/addon/osl.py
@@ -1,19 +1,17 @@
#
-# Copyright 2011, Blender Foundation.
+# Copyright 2011-2013 Blender Foundation
#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# http://www.apache.org/licenses/LICENSE-2.0
#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License
#
# <pep8 compliant>
diff --git a/intern/cycles/blender/addon/presets.py b/intern/cycles/blender/addon/presets.py
index d1f8e7c3a6d..66ec3a3a47a 100644
--- a/intern/cycles/blender/addon/presets.py
+++ b/intern/cycles/blender/addon/presets.py
@@ -1,19 +1,17 @@
#
-# Copyright 2011, Blender Foundation.
+# Copyright 2011-2013 Blender Foundation
#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# http://www.apache.org/licenses/LICENSE-2.0
#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License
#
# <pep8 compliant>
@@ -69,7 +67,7 @@ class AddPresetSampling(AddPresetBase, Operator):
"cycles.subsurface_samples",
"cycles.no_caustics",
"cycles.blur_glossy",
- "cycles.squared_samples",
+ "cycles.use_square_samples",
"cycles.progressive"
]
diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py
index eba94604a88..367f021ee34 100644
--- a/intern/cycles/blender/addon/properties.py
+++ b/intern/cycles/blender/addon/properties.py
@@ -1,19 +1,17 @@
#
-# Copyright 2011, Blender Foundation.
+# Copyright 2011-2013 Blender Foundation
#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# http://www.apache.org/licenses/LICENSE-2.0
#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License
#
# <pep8 compliant>
@@ -64,40 +62,20 @@ enum_panorama_types = (
"Similar to most fisheye modern lens, takes sensor dimensions into consideration"),
)
-enum_curve_presets = (
- ('CUSTOM', "Custom", "Set general parameters"),
- ('FAST_PLANES', "Fast Planes", "Use camera facing triangles (fast but memory intensive)"),
- ('TANGENT_SHADING', "Tangent Normal", "Use planar line segments and tangent normals"),
- ('TRUE_NORMAL', "True Normal", "Use true normals with line segments(good for thin strands)"),
- ('ACCURATE_PRESET', "Accurate", "Use best line segment settings (suitable for glass materials)"),
- ('SMOOTH_CURVES', "Smooth Curves", "Use smooth cardinal curves (slowest)"),
- ('SMOOTH_RIBBONS', "Ribbons", "Use smooth cardinal curves without thickness"),
- )
-
enum_curve_primitives = (
('TRIANGLES', "Triangles", "Create triangle geometry around strands"),
('LINE_SEGMENTS', "Line Segments", "Use line segment primitives"),
('CURVE_SEGMENTS', "Curve Segments", "Use segmented cardinal curve primitives"),
- ('CURVE_RIBBONS', "Curve Ribbons", "Use smooth cardinal curve ribbon primitives"),
)
enum_triangle_curves = (
('CAMERA_TRIANGLES', "Planes", "Create individual triangles forming planes that face camera"),
- ('RIBBON_TRIANGLES', "Ribbons", "Create individual triangles forming ribbon"),
('TESSELLATED_TRIANGLES', "Tessellated", "Create mesh surrounding each strand"),
)
-enum_line_curves = (
- ('ACCURATE', "Accurate", "Always take into consideration strand width for intersections"),
- ('QT_CORRECTED', "Corrected", "Ignore width for initial intersection and correct later"),
- ('ENDCORRECTED', "Correct found", "Ignore width for all intersections and only correct closest"),
- ('QT_UNCORRECTED', "Uncorrected", "Calculate intersections without considering width"),
- )
-
-enum_curves_interpolation = (
- ('LINEAR', "Linear interpolation", "Use Linear interpolation between segments"),
- ('CARDINAL', "Cardinal interpolation", "Use cardinal interpolation between segments"),
- ('BSPLINE', "B-spline interpolation", "Use b-spline interpolation between segments"),
+enum_curve_shape = (
+ ('RIBBONS', "Ribbons", "Ignore thickness of each strand"),
+ ('THICK', "Thick", "Use thickness of strand when rendering"),
)
enum_tile_order = (
@@ -119,6 +97,11 @@ enum_sampling_pattern = (
('CORRELATED_MUTI_JITTER', "Correlated Multi-Jitter", "Use Correlated Multi-Jitter random sampling pattern"),
)
+enum_integrator = (
+ ('BRANCHED_PATH', "Branched Path Tracing", "Path tracing integrator that branches on the first bounce, giving more control over the number of light and material samples"),
+ ('PATH', "Path Tracing", "Pure path tracing integrator"),
+ )
+
class CyclesRenderSettings(bpy.types.PropertyGroup):
@classmethod
@@ -145,13 +128,15 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
description="Use Open Shading Language (CPU rendering only)",
)
- cls.progressive = BoolProperty(
- name="Progressive",
- description="Use progressive sampling of lighting",
- default=True,
+ cls.progressive = EnumProperty(
+ name="Integrator",
+ description="Method to sample lights and materials",
+ items=enum_integrator,
+ default='PATH',
)
- cls.squared_samples = BoolProperty(
- name="Squared Samples",
+
+ cls.use_square_samples = BoolProperty(
+ name="Square Samples",
description="Square sampling values for easier artist control",
default=False,
)
@@ -407,6 +392,7 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
description="Tile order for rendering",
items=enum_tile_order,
default='CENTER',
+ options=set(), # Not animatable!
)
cls.use_progressive_refine = BoolProperty(
name="Progressive Refine",
@@ -689,105 +675,34 @@ class CyclesCurveRenderSettings(bpy.types.PropertyGroup):
description="Cycles hair rendering settings",
type=cls,
)
- cls.preset = EnumProperty(
- name="Mode",
- description="Hair rendering mode",
- items=enum_curve_presets,
- default='TRUE_NORMAL',
- )
cls.primitive = EnumProperty(
name="Primitive",
description="Type of primitive used for hair rendering",
items=enum_curve_primitives,
default='LINE_SEGMENTS',
)
- cls.triangle_method = EnumProperty(
- name="Mesh Geometry",
- description="Method for creating triangle geometry",
- items=enum_triangle_curves,
- default='CAMERA_TRIANGLES',
- )
- cls.line_method = EnumProperty(
- name="Intersection Method",
- description="Method for line segment intersection",
- items=enum_line_curves,
- default='ACCURATE',
- )
- cls.interpolation = EnumProperty(
- name="Interpolation",
- description="Interpolation method",
- items=enum_curves_interpolation,
- default='BSPLINE',
- )
- cls.use_backfacing = BoolProperty(
- name="Check back-faces",
- description="Test back-faces of strands",
- default=False,
- )
- cls.use_encasing = BoolProperty(
- name="Exclude encasing",
- description="Ignore strands encasing a ray's initial location",
- default=True,
- )
- cls.use_tangent_normal_geometry = BoolProperty(
- name="Tangent normal geometry",
- description="Use the tangent normal for actual normal",
- default=False,
- )
- cls.use_tangent_normal = BoolProperty(
- name="Tangent normal default",
- description="Use the tangent normal for all normals",
- default=False,
- )
- cls.use_tangent_normal_correction = BoolProperty(
- name="Strand slope correction",
- description="Correct the tangent normal for the strand's slope",
- default=False,
+ cls.shape = EnumProperty(
+ name="Shape",
+ description="Form of hair",
+ items=enum_curve_shape,
+ default='THICK',
)
- cls.use_parents = BoolProperty(
- name="Use parent strands",
- description="Use parents with children",
- default=False,
- )
- cls.use_smooth = BoolProperty(
- name="Smooth Strands",
- description="Use vertex normals",
+ cls.cull_backfacing = BoolProperty(
+ name="Cull back-faces",
+ description="Do not test the back-face of each strand",
default=True,
)
- cls.use_joined = BoolProperty(
- name="Join",
- description="Fill gaps between segments (requires more memory)",
- default=False,
- )
cls.use_curves = BoolProperty(
name="Use Cycles Hair Rendering",
description="Activate Cycles hair rendering for particle system",
default=True,
)
- cls.segments = IntProperty(
- name="Segments",
- description="Number of segments between path keys (note that this combines with the 'draw step' value)",
- min=1, max=64,
- default=1,
- )
cls.resolution = IntProperty(
name="Resolution",
description="Resolution of generated mesh",
min=3, max=64,
default=3,
)
- cls.normalmix = FloatProperty(
- name="Normal mix",
- description="Scale factor for tangent normal removal (zero gives ray normal)",
- min=0, max=2.0,
- default=1,
- )
- cls.encasing_ratio = FloatProperty(
- name="Encasing ratio",
- description="Scale factor for encasing strand width",
- min=0.0, max=100.0,
- default=1.01,
- )
cls.minimum_width = FloatProperty(
name="Minimal width",
description="Minimal pixel width for strands (0 - deactivated)",
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index 64fda3ef535..cbf26fb8d0a 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -1,19 +1,17 @@
#
-# Copyright 2011, Blender Foundation.
+# Copyright 2011-2013 Blender Foundation
#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# http://www.apache.org/licenses/LICENSE-2.0
#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License
#
# <pep8 compliant>
@@ -50,6 +48,49 @@ class CyclesButtonsPanel():
return rd.engine == 'CYCLES'
+def draw_samples_info(layout, cscene):
+ integrator = cscene.progressive
+
+ # Calculate sample values
+ if integrator == 'PATH':
+ aa = cscene.samples
+ if cscene.use_square_samples:
+ aa = aa * aa
+ else:
+ aa = cscene.aa_samples
+ d = cscene.diffuse_samples
+ g = cscene.glossy_samples
+ t = cscene.transmission_samples
+ ao = cscene.ao_samples
+ ml = cscene.mesh_light_samples
+ sss = cscene.subsurface_samples
+
+ if cscene.use_square_samples:
+ aa = aa * aa
+ d = d * d
+ g = g * g
+ t = t * t
+ ao = ao * ao
+ ml = ml * ml
+ sss = sss * sss
+
+ # Draw interface
+ # Do not draw for progressive, when Square Samples are disabled
+ if (integrator == 'BRANCHED_PATH') or (cscene.use_square_samples and integrator == 'PATH'):
+ col = layout.column(align=True)
+ col.scale_y = 0.6
+ col.label("Total Samples:")
+ col.separator()
+ if integrator == 'PATH':
+ col.label("%s AA" % aa)
+ else:
+ col.label("%s AA, %s Diffuse, %s Glossy, %s Transmission" %
+ (aa, d * aa, g * aa, t * aa))
+ col.separator()
+ col.label("%s AO, %s Mesh Light, %s Subsurface" %
+ (ao * aa, ml * aa, sss * aa))
+
+
class CyclesRender_PT_sampling(CyclesButtonsPanel, Panel):
bl_label = "Sampling"
bl_options = {'DEFAULT_CLOSED'}
@@ -60,27 +101,25 @@ class CyclesRender_PT_sampling(CyclesButtonsPanel, Panel):
scene = context.scene
cscene = scene.cycles
device_type = context.user_preferences.system.compute_device_type
-
+
row = layout.row(align=True)
row.menu("CYCLES_MT_sampling_presets", text=bpy.types.CYCLES_MT_sampling_presets.bl_label)
row.operator("render.cycles_sampling_preset_add", text="", icon="ZOOMIN")
row.operator("render.cycles_sampling_preset_add", text="", icon="ZOOMOUT").remove_active = True
row = layout.row()
- row.prop(cscene, "progressive")
-
- if not cscene.progressive:
- row.prop(cscene, "squared_samples")
-
+ row.prop(cscene, "progressive", text="")
+ row.prop(cscene, "use_square_samples")
+
split = layout.split()
-
+
col = split.column()
sub = col.column(align=True)
sub.label("Settings:")
sub.prop(cscene, "seed")
sub.prop(cscene, "sample_clamp")
- if cscene.progressive:
+ if cscene.progressive == 'PATH':
col = split.column()
sub = col.column(align=True)
sub.label(text="Samples:")
@@ -110,6 +149,8 @@ class CyclesRender_PT_sampling(CyclesButtonsPanel, Panel):
layout.row().prop(cscene, "use_layer_samples")
break
+ draw_samples_info(layout, cscene)
+
class CyclesRender_PT_light_paths(CyclesButtonsPanel, Panel):
bl_label = "Light Paths"
@@ -211,8 +252,8 @@ class CyclesRender_PT_performance(CyclesButtonsPanel, Panel):
col = split.column(align=True)
col.label(text="Threads:")
- col.row().prop(rd, "threads_mode", expand=True)
- sub = col.column()
+ col.row(align=True).prop(rd, "threads_mode", expand=True)
+ sub = col.column(align=True)
sub.enabled = rd.threads_mode == 'FIXED'
sub.prop(rd, "threads")
@@ -225,7 +266,7 @@ class CyclesRender_PT_performance(CyclesButtonsPanel, Panel):
sub.prop(cscene, "use_progressive_refine")
- subsub = sub.column()
+ subsub = sub.column(align=True)
subsub.enabled = not rd.use_border
subsub.prop(rd, "use_save_buffers")
@@ -244,7 +285,7 @@ class CyclesRender_PT_performance(CyclesButtonsPanel, Panel):
col.separator()
- col.label(text="Acceleration structure:")
+ col.label(text="Acceleration structure:")
col.prop(cscene, "debug_use_spatial_splits")
@@ -283,7 +324,7 @@ class CyclesRender_PT_layers(CyclesButtonsPanel, Panel):
rl = rd.layers.active
row = layout.row()
- row.template_list("RENDERLAYER_UL_renderlayers", "", rd, "layers", rd.layers, "active_index", rows=2)
+ row.template_list("RENDERLAYER_UL_renderlayers", "", rd, "layers", rd.layers, "active_index", rows=1)
col = row.column(align=True)
col.operator("scene.render_layer_add", icon='ZOOMIN', text="")
@@ -378,7 +419,7 @@ class CyclesRender_PT_layer_passes(CyclesButtonsPanel, Panel):
row.prop(rl, "use_pass_subsurface_direct", text="Direct", toggle=True)
row.prop(rl, "use_pass_subsurface_indirect", text="Indirect", toggle=True)
row.prop(rl, "use_pass_subsurface_color", text="Color", toggle=True)
-
+
col.separator()
col.prop(rl, "use_pass_emit", text="Emission")
col.prop(rl, "use_pass_environment")
@@ -462,7 +503,7 @@ class Cycles_PT_context_material(CyclesButtonsPanel, Panel):
if ob:
row = layout.row()
- row.template_list("MATERIAL_UL_matslots", "", ob, "material_slots", ob, "active_material_index", rows=2)
+ row.template_list("MATERIAL_UL_matslots", "", ob, "material_slots", ob, "active_material_index", rows=1)
col = row.column(align=True)
col.operator("object.material_slot_add", icon='ZOOMIN', text="")
@@ -553,7 +594,8 @@ class CyclesObject_PT_ray_visibility(CyclesButtonsPanel, Panel):
@classmethod
def poll(cls, context):
ob = context.object
- return CyclesButtonsPanel.poll(context) and ob and ob.type in {'MESH', 'CURVE', 'CURVE', 'SURFACE', 'FONT', 'META', 'LAMP'}
+ return (CyclesButtonsPanel.poll(context) and
+ ob and ob.type in {'MESH', 'CURVE', 'CURVE', 'SURFACE', 'FONT', 'META', 'LAMP'})
def draw(self, context):
layout = self.layout
@@ -673,7 +715,7 @@ class CyclesLamp_PT_lamp(CyclesButtonsPanel, Panel):
sub.prop(lamp, "size", text="Size X")
sub.prop(lamp, "size_y", text="Size Y")
- if not cscene.progressive:
+ if cscene.progressive == 'BRANCHED_PATH':
col.prop(clamp, "samples")
col = split.column()
@@ -769,7 +811,6 @@ class CyclesWorld_PT_volume(CyclesButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
- layout.active = False
world = context.world
panel_node_draw(layout, world, 'OUTPUT_WORLD', 'Volume')
@@ -789,12 +830,13 @@ class CyclesWorld_PT_ambient_occlusion(CyclesButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
- light = context.world.light_settings
- layout.active = light.use_ambient_occlusion
+ light = context.world.light_settings
row = layout.row()
- row.prop(light, "ao_factor", text="Factor")
+ sub = row.row()
+ sub.active = light.use_ambient_occlusion
+ sub.prop(light, "ao_factor", text="Factor")
row.prop(light, "distance", text="Distance")
@@ -869,7 +911,7 @@ class CyclesWorld_PT_settings(CyclesButtonsPanel, Panel):
sub = col.row(align=True)
sub.active = cworld.sample_as_light
sub.prop(cworld, "sample_map_resolution")
- if not cscene.progressive:
+ if cscene.progressive == 'BRANCHED_PATH':
sub.prop(cworld, "samples")
@@ -915,7 +957,6 @@ class CyclesMaterial_PT_volume(CyclesButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
- layout.active = False
mat = context.material
cmat = mat.cycles
@@ -1044,6 +1085,8 @@ class CyclesTexture_PT_mapping(CyclesButtonsPanel, Panel):
mapping = node.texture_mapping
+ layout.prop(mapping, "vector_type", expand=True)
+
row = layout.row()
row.column().prop(mapping, "translation")
@@ -1137,8 +1180,7 @@ class CyclesRender_PT_CurveRendering(CyclesButtonsPanel, Panel):
scene = context.scene
cscene = scene.cycles
psys = context.particle_system
- experimental = (cscene.feature_set == 'EXPERIMENTAL')
- return CyclesButtonsPanel.poll(context) and experimental and psys
+ return CyclesButtonsPanel.poll(context) and psys and psys.settings.type == 'HAIR'
def draw_header(self, context):
ccscene = context.scene.cycles_curves
@@ -1152,44 +1194,17 @@ class CyclesRender_PT_CurveRendering(CyclesButtonsPanel, Panel):
layout.active = ccscene.use_curves
- layout.prop(ccscene, "preset", text="Mode")
-
- if ccscene.preset == 'CUSTOM':
- layout.prop(ccscene, "primitive", text="Primitive")
-
- if ccscene.primitive == 'TRIANGLES':
- layout.prop(ccscene, "triangle_method", text="Method")
- if ccscene.triangle_method == 'TESSELLATED_TRIANGLES':
- layout.prop(ccscene, "resolution", text="Resolution")
- layout.prop(ccscene, "use_smooth", text="Smooth")
- elif ccscene.primitive == 'LINE_SEGMENTS':
- layout.prop(ccscene, "use_backfacing", text="Check back-faces")
-
- row = layout.row()
- row.prop(ccscene, "use_encasing", text="Exclude encasing")
- sub = row.row()
- sub.active = ccscene.use_encasing
- sub.prop(ccscene, "encasing_ratio", text="Ratio for encasing")
-
- layout.prop(ccscene, "line_method", text="Method")
- layout.prop(ccscene, "use_tangent_normal", text="Use tangent normal as default")
- layout.prop(ccscene, "use_tangent_normal_geometry", text="Use tangent normal geometry")
- layout.prop(ccscene, "use_tangent_normal_correction", text="Correct tangent normal for slope")
- layout.prop(ccscene, "interpolation", text="Interpolation")
-
- row = layout.row()
- row.prop(ccscene, "segments", text="Segments")
- row.prop(ccscene, "normalmix", text="Ray Mix")
- elif ccscene.primitive in {'CURVE_SEGMENTS', 'CURVE_RIBBONS'}:
- layout.prop(ccscene, "subdivisions", text="Curve subdivisions")
- layout.prop(ccscene, "use_backfacing", text="Check back-faces")
-
- layout.prop(ccscene, "interpolation", text="Interpolation")
- row = layout.row()
- row.prop(ccscene, "segments", text="Segments")
+ layout.prop(ccscene, "primitive", text="Primitive")
+ layout.prop(ccscene, "shape", text="Shape")
- row = layout.row()
- row.prop(ccscene, "use_parents", text="Include parents")
+ if ccscene.primitive == 'TRIANGLES':
+ if ccscene.shape == 'THICK':
+ layout.prop(ccscene, "resolution", text="Resolution")
+ elif ccscene.primitive == 'LINE_SEGMENTS':
+ layout.prop(ccscene, "cull_backfacing", text="Cull back-faces")
+ elif ccscene.primitive in {'CURVE_SEGMENTS', 'CURVE_RIBBONS'}:
+ layout.prop(ccscene, "cull_backfacing", text="Cull back-faces")
+ layout.prop(ccscene, "subdivisions", text="Curve subdivisions")
row = layout.row()
row.prop(ccscene, "minimum_width", text="Min Pixels")
@@ -1205,9 +1220,9 @@ class CyclesParticle_PT_CurveSettings(CyclesButtonsPanel, Panel):
scene = context.scene
cscene = scene.cycles
ccscene = scene.cycles_curves
- use_curves = ccscene.use_curves and context.particle_system
- experimental = cscene.feature_set == 'EXPERIMENTAL'
- return CyclesButtonsPanel.poll(context) and experimental and use_curves
+ psys = context.particle_system
+ use_curves = ccscene.use_curves and psys
+ return CyclesButtonsPanel.poll(context) and use_curves and psys.settings.type == 'HAIR'
def draw(self, context):
layout = self.layout
diff --git a/intern/cycles/blender/blender_camera.cpp b/intern/cycles/blender/blender_camera.cpp
index 71fba5549da..4c6b42a9cbc 100644
--- a/intern/cycles/blender/blender_camera.cpp
+++ b/intern/cycles/blender/blender_camera.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "camera.h"
diff --git a/intern/cycles/blender/blender_curves.cpp b/intern/cycles/blender/blender_curves.cpp
index 27c52797f5f..b780877a158 100644
--- a/intern/cycles/blender/blender_curves.cpp
+++ b/intern/cycles/blender/blender_curves.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "attribute.h"
@@ -37,15 +35,14 @@ void curveinterp_v3_v3v3v3v3(float3 *p, float3 *v1, float3 *v2, float3 *v3, floa
void interp_weights(float t, float data[4], int type);
float shaperadius(float shape, float root, float tip, float time);
void InterpolateKeySegments(int seg, int segno, int key, int curve, float3 *keyloc, float *time, ParticleCurveData *CData, int interpolation);
-bool ObtainCacheParticleUV(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool use_parents, bool background, int uv_num);
-bool ObtainCacheParticleVcol(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool use_parents, bool background, int vcol_num);
-bool ObtainCacheParticleData(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool use_parents, bool background);
-void ExportCurveSegments(Mesh *mesh, ParticleCurveData *CData, int interpolation, int segments);
-void ExportCurveTrianglePlanes(Mesh *mesh, ParticleCurveData *CData, int interpolation, bool use_smooth, int segments, float3 RotCam);
-void ExportCurveTriangleRibbons(Mesh *mesh, ParticleCurveData *CData, int interpolation, bool use_smooth, int segments);
-void ExportCurveTriangleGeometry(Mesh *mesh, ParticleCurveData *CData, int interpolation, bool use_smooth, int resolution, int segments);
-void ExportCurveTriangleUV(Mesh *mesh, ParticleCurveData *CData, int interpolation, int segments, int vert_offset, int resol, float3 *uvdata);
-void ExportCurveTriangleVcol(Mesh *mesh, ParticleCurveData *CData, int interpolation, int segments, int vert_offset, int resol, float3 *fdata);
+bool ObtainCacheParticleUV(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool background, int uv_num);
+bool ObtainCacheParticleVcol(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool background, int vcol_num);
+bool ObtainCacheParticleData(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool background);
+void ExportCurveSegments(Scene *scene, Mesh *mesh, ParticleCurveData *CData);
+void ExportCurveTrianglePlanes(Mesh *mesh, ParticleCurveData *CData, float3 RotCam);
+void ExportCurveTriangleGeometry(Mesh *mesh, ParticleCurveData *CData, int resolution);
+void ExportCurveTriangleUV(Mesh *mesh, ParticleCurveData *CData, int vert_offset, int resol, float3 *uvdata);
+void ExportCurveTriangleVcol(Mesh *mesh, ParticleCurveData *CData, int vert_offset, int resol, float3 *fdata);
ParticleCurveData::ParticleCurveData()
{
@@ -157,7 +154,7 @@ void InterpolateKeySegments(int seg, int segno, int key, int curve, float3 *keyl
curveinterp_v3_v3v3v3v3(keyloc, &ckey_loc1, &ckey_loc2, &ckey_loc3, &ckey_loc4, t);
}
-bool ObtainCacheParticleData(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool use_parents, bool background)
+bool ObtainCacheParticleData(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool background)
{
int curvenum = 0;
@@ -188,7 +185,7 @@ bool ObtainCacheParticleData(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, Par
int totchild = background ? b_psys.child_particles.length() : (int)((float)b_psys.child_particles.length() * (float)b_psys.settings().draw_percentage() / 100.0f);
int totcurves = totchild;
- if(use_parents || b_psys.settings().child_type() == 0)
+ if(b_psys.settings().child_type() == 0)
totcurves += totparts;
if(totcurves == 0)
@@ -208,7 +205,7 @@ bool ObtainCacheParticleData(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, Par
CData->psys_closetip.push_back(get_boolean(cpsys, "use_closetip"));
int pa_no = 0;
- if(!use_parents && !(b_psys.settings().child_type() == 0))
+ if(!(b_psys.settings().child_type() == 0))
pa_no = totparts;
for(; pa_no < totparts+totchild; pa_no++) {
@@ -220,8 +217,8 @@ bool ObtainCacheParticleData(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, Par
float3 pcKey;
for(int step_no = 0; step_no <= ren_step; step_no++) {
float nco[3];
- b_psys.co_hair(*b_ob, psmd, pa_no, step_no, nco);
- float3 cKey = make_float3(nco[0],nco[1],nco[2]);
+ b_psys.co_hair(*b_ob, pa_no, step_no, nco);
+ float3 cKey = make_float3(nco[0], nco[1], nco[2]);
cKey = transform_point(&itfm, cKey);
if(step_no > 0)
curve_length += len(cKey - pcKey);
@@ -244,7 +241,7 @@ bool ObtainCacheParticleData(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, Par
}
-bool ObtainCacheParticleUV(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool use_parents, bool background, int uv_num)
+bool ObtainCacheParticleUV(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool background, int uv_num)
{
#if 0
int keyno = 0;
@@ -279,14 +276,14 @@ bool ObtainCacheParticleUV(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, Parti
int totchild = background ? b_psys.child_particles.length() : (int)((float)b_psys.child_particles.length() * (float)b_psys.settings().draw_percentage() / 100.0f);
int totcurves = totchild;
- if (use_parents || b_psys.settings().child_type() == 0)
+ if (b_psys.settings().child_type() == 0)
totcurves += totparts;
if (totcurves == 0)
continue;
int pa_no = 0;
- if(!use_parents && !(b_psys.settings().child_type() == 0))
+ if(!(b_psys.settings().child_type() == 0))
pa_no = totparts;
BL::ParticleSystem::particles_iterator b_pa;
@@ -315,7 +312,7 @@ bool ObtainCacheParticleUV(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, Parti
}
-bool ObtainCacheParticleVcol(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool use_parents, bool background, int vcol_num)
+bool ObtainCacheParticleVcol(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool background, int vcol_num)
{
#if 0
int keyno = 0;
@@ -348,14 +345,14 @@ bool ObtainCacheParticleVcol(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, Par
int totchild = background ? b_psys.child_particles.length() : (int)((float)b_psys.child_particles.length() * (float)b_psys.settings().draw_percentage() / 100.0f);
int totcurves = totchild;
- if (use_parents || b_psys.settings().child_type() == 0)
+ if (b_psys.settings().child_type() == 0)
totcurves += totparts;
if (totcurves == 0)
continue;
int pa_no = 0;
- if(!use_parents && !(b_psys.settings().child_type() == 0))
+ if(!(b_psys.settings().child_type() == 0))
pa_no = totparts;
BL::ParticleSystem::particles_iterator b_pa;
@@ -396,7 +393,7 @@ static void set_resolution(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, BL::S
}
}
-void ExportCurveTrianglePlanes(Mesh *mesh, ParticleCurveData *CData, int interpolation, bool use_smooth, int segments, float3 RotCam)
+void ExportCurveTrianglePlanes(Mesh *mesh, ParticleCurveData *CData, float3 RotCam)
{
int vertexno = mesh->verts.size();
int vertexindex = vertexno;
@@ -404,52 +401,44 @@ void ExportCurveTrianglePlanes(Mesh *mesh, ParticleCurveData *CData, int interpo
for( int sys = 0; sys < CData->psys_firstcurve.size() ; sys++) {
for( int curve = CData->psys_firstcurve[sys]; curve < CData->psys_firstcurve[sys] + CData->psys_curvenum[sys] ; curve++) {
- for( int curvekey = CData->curve_firstkey[curve]; curvekey < CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1; curvekey++) {
-
- int subv = 1;
- float3 xbasis;
-
- float3 v1;
-
- if(curvekey == CData->curve_firstkey[curve]) {
- subv = 0;
- v1 = CData->curvekey_co[min(curvekey+2,CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1)] - CData->curvekey_co[curvekey];
- }
- else if(curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1)
- v1 = CData->curvekey_co[curvekey] - CData->curvekey_co[max(curvekey - 2, CData->curve_firstkey[curve])];
+ float3 xbasis;
+ float3 v1;
+ float time = 0.0f;
+ float3 ickey_loc = CData->curvekey_co[CData->curve_firstkey[curve]];
+ float radius = shaperadius(CData->psys_shape[sys], CData->psys_rootradius[sys], CData->psys_tipradius[sys], 0.0f);
+ v1 = CData->curvekey_co[CData->curve_firstkey[curve] + 1] - CData->curvekey_co[CData->curve_firstkey[curve]];
+ xbasis = normalize(cross(RotCam - ickey_loc,v1));
+ float3 ickey_loc_shfl = ickey_loc - radius * xbasis;
+ float3 ickey_loc_shfr = ickey_loc + radius * xbasis;
+ mesh->verts.push_back(ickey_loc_shfl);
+ mesh->verts.push_back(ickey_loc_shfr);
+ vertexindex += 2;
+
+ for( int curvekey = CData->curve_firstkey[curve] + 1; curvekey < CData->curve_firstkey[curve] + CData->curve_keynum[curve]; curvekey++) {
+ ickey_loc = CData->curvekey_co[curvekey];
+
+ if(curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1)
+ v1 = CData->curvekey_co[curvekey] - CData->curvekey_co[max(curvekey - 1, CData->curve_firstkey[curve])];
else
v1 = CData->curvekey_co[curvekey + 1] - CData->curvekey_co[curvekey - 1];
+ time = CData->curvekey_time[curvekey]/CData->curve_length[curve];
+ radius = shaperadius(CData->psys_shape[sys], CData->psys_rootradius[sys], CData->psys_tipradius[sys], time);
- for (; subv <= segments; subv++) {
+ if(curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1)
+ radius = shaperadius(CData->psys_shape[sys], CData->psys_rootradius[sys], CData->psys_tipradius[sys], 0.95f);
- float3 ickey_loc = make_float3(0.0f,0.0f,0.0f);
- float time = 0.0f;
+ if(CData->psys_closetip[sys] && (curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1))
+ radius = shaperadius(CData->psys_shape[sys], CData->psys_rootradius[sys], 0.0f, 0.95f);
- if ((interpolation == CURVE_BSPLINE) && (curvekey == CData->curve_firstkey[curve]) && (subv == 0))
- ickey_loc = CData->curvekey_co[curvekey];
- else
- InterpolateKeySegments(subv, segments, curvekey, curve, &ickey_loc, &time, CData , interpolation);
-
- float radius = shaperadius(CData->psys_shape[sys], CData->psys_rootradius[sys], CData->psys_tipradius[sys], time);
-
- if((curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 2) && (subv == segments))
- radius = shaperadius(CData->psys_shape[sys], CData->psys_rootradius[sys], CData->psys_tipradius[sys], 0.95f);
-
- if(CData->psys_closetip[sys] && (subv == segments) && (curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 2))
- radius = shaperadius(CData->psys_shape[sys], CData->psys_rootradius[sys], 0.0f, 0.95f);
-
- xbasis = normalize(cross(RotCam - ickey_loc,v1));
- float3 ickey_loc_shfl = ickey_loc - radius * xbasis;
- float3 ickey_loc_shfr = ickey_loc + radius * xbasis;
- mesh->verts.push_back(ickey_loc_shfl);
- mesh->verts.push_back(ickey_loc_shfr);
- if(subv!=0) {
- mesh->add_triangle(vertexindex-2, vertexindex, vertexindex-1, CData->psys_shader[sys], use_smooth);
- mesh->add_triangle(vertexindex+1, vertexindex-1, vertexindex, CData->psys_shader[sys], use_smooth);
- }
- vertexindex += 2;
- }
+ xbasis = normalize(cross(RotCam - ickey_loc,v1));
+ float3 ickey_loc_shfl = ickey_loc - radius * xbasis;
+ float3 ickey_loc_shfr = ickey_loc + radius * xbasis;
+ mesh->verts.push_back(ickey_loc_shfl);
+ mesh->verts.push_back(ickey_loc_shfr);
+ mesh->add_triangle(vertexindex-2, vertexindex, vertexindex-1, CData->psys_shader[sys], true);
+ mesh->add_triangle(vertexindex+1, vertexindex-1, vertexindex, CData->psys_shader[sys], true);
+ vertexindex += 2;
}
}
}
@@ -464,120 +453,7 @@ void ExportCurveTrianglePlanes(Mesh *mesh, ParticleCurveData *CData, int interpo
/* texture coords still needed */
}
-void ExportCurveTriangleRibbons(Mesh *mesh, ParticleCurveData *CData, int interpolation, bool use_smooth, int segments)
-{
- int vertexno = mesh->verts.size();
- int vertexindex = vertexno;
-
- for( int sys = 0; sys < CData->psys_firstcurve.size() ; sys++) {
- for( int curve = CData->psys_firstcurve[sys]; curve < CData->psys_firstcurve[sys] + CData->psys_curvenum[sys] ; curve++) {
-
- float3 firstxbasis = cross(make_float3(1.0f,0.0f,0.0f),CData->curvekey_co[CData->curve_firstkey[curve]+1] - CData->curvekey_co[CData->curve_firstkey[curve]]);
- if(len_squared(firstxbasis)!= 0.0f)
- firstxbasis = normalize(firstxbasis);
- else
- firstxbasis = normalize(cross(make_float3(0.0f,1.0f,0.0f),CData->curvekey_co[CData->curve_firstkey[curve]+1] - CData->curvekey_co[CData->curve_firstkey[curve]]));
-
- for( int curvekey = CData->curve_firstkey[curve]; curvekey < CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1; curvekey++) {
-
- float3 xbasis = firstxbasis;
- float3 v1;
- float3 v2;
-
- if(curvekey == CData->curve_firstkey[curve]) {
- v1 = CData->curvekey_co[min(curvekey+2,CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1)] - CData->curvekey_co[curvekey+1];
- v2 = CData->curvekey_co[curvekey+1] - CData->curvekey_co[curvekey];
- }
- else if(curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1) {
- v1 = CData->curvekey_co[curvekey] - CData->curvekey_co[curvekey-1];
- v2 = CData->curvekey_co[curvekey-1] - CData->curvekey_co[max(curvekey-2,CData->curve_firstkey[curve])];
- }
- else {
- v1 = CData->curvekey_co[curvekey+1] - CData->curvekey_co[curvekey];
- v2 = CData->curvekey_co[curvekey] - CData->curvekey_co[curvekey-1];
- }
-
- xbasis = cross(v1,v2);
-
- if(len_squared(xbasis) >= 0.05f * len_squared(v1) * len_squared(v2)) {
- firstxbasis = normalize(xbasis);
- break;
- }
- }
-
- for( int curvekey = CData->curve_firstkey[curve]; curvekey < CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1; curvekey++) {
-
- int subv = 1;
- float3 v1;
- float3 v2;
- float3 xbasis;
-
- if(curvekey == CData->curve_firstkey[curve]) {
- subv = 0;
- v1 = CData->curvekey_co[min(curvekey+2,CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1)] - CData->curvekey_co[curvekey+1];
- v2 = CData->curvekey_co[curvekey+1] - CData->curvekey_co[curvekey];
- }
- else if(curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1) {
- v1 = CData->curvekey_co[curvekey] - CData->curvekey_co[curvekey-1];
- v2 = CData->curvekey_co[curvekey-1] - CData->curvekey_co[max(curvekey-2,CData->curve_firstkey[curve])];
- }
- else {
- v1 = CData->curvekey_co[curvekey+1] - CData->curvekey_co[curvekey];
- v2 = CData->curvekey_co[curvekey] - CData->curvekey_co[curvekey-1];
- }
-
- xbasis = cross(v1,v2);
-
- if(len_squared(xbasis) >= 0.05f * len_squared(v1) * len_squared(v2)) {
- xbasis = normalize(xbasis);
- firstxbasis = xbasis;
- }
- else
- xbasis = firstxbasis;
-
- for (; subv <= segments; subv++) {
-
- float3 ickey_loc = make_float3(0.0f,0.0f,0.0f);
- float time = 0.0f;
-
- if ((interpolation == CURVE_BSPLINE) && (curvekey == CData->curve_firstkey[curve]) && (subv == 0))
- ickey_loc = CData->curvekey_co[curvekey];
- else
- InterpolateKeySegments(subv, segments, curvekey, curve, &ickey_loc, &time, CData , interpolation);
-
- float radius = shaperadius(CData->psys_shape[sys], CData->psys_rootradius[sys], CData->psys_tipradius[sys], time);
-
- if((curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 2) && (subv == segments))
- radius = shaperadius(CData->psys_shape[sys], CData->psys_rootradius[sys], CData->psys_tipradius[sys], 0.95f);
-
- if(CData->psys_closetip[sys] && (subv == segments) && (curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 2))
- radius = shaperadius(CData->psys_shape[sys], CData->psys_rootradius[sys], 0.0f, 0.95f);
-
- float3 ickey_loc_shfl = ickey_loc - radius * xbasis;
- float3 ickey_loc_shfr = ickey_loc + radius * xbasis;
- mesh->verts.push_back(ickey_loc_shfl);
- mesh->verts.push_back(ickey_loc_shfr);
- if(subv!=0) {
- mesh->add_triangle(vertexindex-2, vertexindex, vertexindex-1, CData->psys_shader[sys], use_smooth);
- mesh->add_triangle(vertexindex+1, vertexindex-1, vertexindex, CData->psys_shader[sys], use_smooth);
- }
- vertexindex += 2;
- }
- }
- }
- }
-
- mesh->reserve(mesh->verts.size(), mesh->triangles.size(), 0, 0);
- mesh->attributes.remove(ATTR_STD_VERTEX_NORMAL);
- mesh->attributes.remove(ATTR_STD_FACE_NORMAL);
- mesh->add_face_normals();
- mesh->add_vertex_normals();
- mesh->attributes.remove(ATTR_STD_FACE_NORMAL);
- /* texture coords still needed */
-
-}
-
-void ExportCurveTriangleGeometry(Mesh *mesh, ParticleCurveData *CData, int interpolation, bool use_smooth, int resolution, int segments)
+void ExportCurveTriangleGeometry(Mesh *mesh, ParticleCurveData *CData, int resolution)
{
int vertexno = mesh->verts.size();
int vertexindex = vertexno;
@@ -652,22 +528,19 @@ void ExportCurveTriangleGeometry(Mesh *mesh, ParticleCurveData *CData, int inter
ybasis = normalize(cross(xbasis,v2));
- for (; subv <= segments; subv++) {
+ for (; subv <= 1; subv++) {
float3 ickey_loc = make_float3(0.0f,0.0f,0.0f);
float time = 0.0f;
- if ((interpolation == CURVE_BSPLINE) && (curvekey == CData->curve_firstkey[curve]) && (subv == 0))
- ickey_loc = CData->curvekey_co[curvekey];
- else
- InterpolateKeySegments(subv, segments, curvekey, curve, &ickey_loc, &time, CData , interpolation);
+ InterpolateKeySegments(subv, 1, curvekey, curve, &ickey_loc, &time, CData , 1);
float radius = shaperadius(CData->psys_shape[sys], CData->psys_rootradius[sys], CData->psys_tipradius[sys], time);
- if((curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 2) && (subv == segments))
+ if((curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 2) && (subv == 1))
radius = shaperadius(CData->psys_shape[sys], CData->psys_rootradius[sys], CData->psys_tipradius[sys], 0.95f);
- if(CData->psys_closetip[sys] && (subv == segments) && (curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 2))
+ if(CData->psys_closetip[sys] && (subv == 1) && (curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 2))
radius = shaperadius(CData->psys_shape[sys], CData->psys_rootradius[sys], 0.0f, 0.95f);
float angle = M_2PI_F / (float)resolution;
@@ -678,11 +551,11 @@ void ExportCurveTriangleGeometry(Mesh *mesh, ParticleCurveData *CData, int inter
if(subv!=0) {
for(int section = 0 ; section < resolution - 1; section++) {
- mesh->add_triangle(vertexindex - resolution + section, vertexindex + section, vertexindex - resolution + section + 1, CData->psys_shader[sys], use_smooth);
- mesh->add_triangle(vertexindex + section + 1, vertexindex - resolution + section + 1, vertexindex + section, CData->psys_shader[sys], use_smooth);
+ mesh->add_triangle(vertexindex - resolution + section, vertexindex + section, vertexindex - resolution + section + 1, CData->psys_shader[sys], true);
+ mesh->add_triangle(vertexindex + section + 1, vertexindex - resolution + section + 1, vertexindex + section, CData->psys_shader[sys], true);
}
- mesh->add_triangle(vertexindex-1, vertexindex + resolution - 1, vertexindex - resolution, CData->psys_shader[sys], use_smooth);
- mesh->add_triangle(vertexindex, vertexindex - resolution , vertexindex + resolution - 1, CData->psys_shader[sys], use_smooth);
+ mesh->add_triangle(vertexindex-1, vertexindex + resolution - 1, vertexindex - resolution, CData->psys_shader[sys], true);
+ mesh->add_triangle(vertexindex, vertexindex - resolution , vertexindex + resolution - 1, CData->psys_shader[sys], true);
}
vertexindex += resolution;
}
@@ -700,7 +573,7 @@ void ExportCurveTriangleGeometry(Mesh *mesh, ParticleCurveData *CData, int inter
/* texture coords still needed */
}
-static void ExportCurveSegments(Scene *scene, Mesh *mesh, ParticleCurveData *CData, int interpolation, int segments)
+void ExportCurveSegments(Scene *scene, Mesh *mesh, ParticleCurveData *CData)
{
int num_keys = 0;
int num_curves = 0;
@@ -725,33 +598,19 @@ static void ExportCurveSegments(Scene *scene, Mesh *mesh, ParticleCurveData *CDa
size_t num_curve_keys = 0;
- for( int curvekey = CData->curve_firstkey[curve]; curvekey < CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1; curvekey++) {
-
- int subv = 1;
- if(curvekey == CData->curve_firstkey[curve])
- subv = 0;
+ for( int curvekey = CData->curve_firstkey[curve]; curvekey < CData->curve_firstkey[curve] + CData->curve_keynum[curve]; curvekey++) {
+ float3 ickey_loc = CData->curvekey_co[curvekey];
+ float time = CData->curvekey_time[curvekey]/CData->curve_length[curve];
+ float radius = shaperadius(CData->psys_shape[sys], CData->psys_rootradius[sys], CData->psys_tipradius[sys], time);
- for (; subv <= segments; subv++) {
+ if(CData->psys_closetip[sys] && (curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1))
+ radius =0.0f;
- float3 ickey_loc = make_float3(0.0f,0.0f,0.0f);
- float time = 0.0f;
+ mesh->add_curve_key(ickey_loc, radius);
+ if(attr_intercept)
+ attr_intercept->add(time);
- if((interpolation == CURVE_BSPLINE) && (curvekey == CData->curve_firstkey[curve]) && (subv == 0))
- ickey_loc = CData->curvekey_co[curvekey];
- else
- InterpolateKeySegments(subv, segments, curvekey, curve, &ickey_loc, &time, CData , interpolation);
-
- float radius = shaperadius(CData->psys_shape[sys], CData->psys_rootradius[sys], CData->psys_tipradius[sys], time);
-
- if(CData->psys_closetip[sys] && (subv == segments) && (curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 2))
- radius =0.0f;
-
- mesh->add_curve_key(ickey_loc, radius);
- if(attr_intercept)
- attr_intercept->add(time);
-
- num_curve_keys++;
- }
+ num_curve_keys++;
}
mesh->add_curve(num_keys, num_curve_keys, CData->psys_shader[sys]);
@@ -769,7 +628,48 @@ static void ExportCurveSegments(Scene *scene, Mesh *mesh, ParticleCurveData *CDa
}
}
-void ExportCurveTriangleUV(Mesh *mesh, ParticleCurveData *CData, int interpolation, int segments, int vert_offset, int resol, float3 *uvdata)
+static void ExportCurveSegmentsMotion(Scene *scene, Mesh *mesh, ParticleCurveData *CData, int motion)
+{
+ /* export motion vectors for curve keys */
+ AttributeStandard std = (motion == -1)? ATTR_STD_MOTION_PRE: ATTR_STD_MOTION_POST;
+ Attribute *attr_motion = mesh->curve_attributes.add(std);
+ float3 *data_motion = attr_motion->data_float3();
+ float3 *current_motion = data_motion;
+ size_t size = mesh->curve_keys.size();
+ size_t i = 0;
+ bool have_motion = false;
+
+ for(int sys = 0; sys < CData->psys_firstcurve.size(); sys++) {
+ if(CData->psys_curvenum[sys] == 0)
+ continue;
+
+ for(int curve = CData->psys_firstcurve[sys]; curve < CData->psys_firstcurve[sys] + CData->psys_curvenum[sys]; curve++) {
+ if(CData->curve_keynum[curve] <= 1)
+ continue;
+
+ for(int curvekey = CData->curve_firstkey[curve]; curvekey < CData->curve_firstkey[curve] + CData->curve_keynum[curve]; curvekey++) {
+ if(i < mesh->curve_keys.size()) {
+ *current_motion = CData->curvekey_co[curvekey];
+
+ /* unlike mesh coordinates, these tend to be slightly different
+ * between frames due to particle transforms into/out of object
+ * space, so we use an epsilon to detect actual changes */
+ if(len_squared(*current_motion - mesh->curve_keys[i].co) > 1e-5f*1e-5f)
+ have_motion = true;
+
+ current_motion++;
+ }
+
+ i++;
+ }
+ }
+ }
+
+ if(i != size || !have_motion)
+ mesh->curve_attributes.remove(std);
+}
+
+void ExportCurveTriangleUV(Mesh *mesh, ParticleCurveData *CData, int vert_offset, int resol, float3 *uvdata)
{
if(uvdata == NULL)
return;
@@ -784,56 +684,42 @@ void ExportCurveTriangleUV(Mesh *mesh, ParticleCurveData *CData, int interpolati
for( int curvekey = CData->curve_firstkey[curve]; curvekey < CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1; curvekey++) {
- int subv = 1;
+ time = CData->curvekey_time[curvekey]/CData->curve_length[curve];
+
+ for(int section = 0 ; section < resol; section++) {
+ uvdata[vertexindex] = CData->curve_uv[curve];
+ uvdata[vertexindex].z = prevtime;
+ vertexindex++;
+ uvdata[vertexindex] = CData->curve_uv[curve];
+ uvdata[vertexindex].z = time;
+ vertexindex++;
+ uvdata[vertexindex] = CData->curve_uv[curve];
+ uvdata[vertexindex].z = prevtime;
+ vertexindex++;
+ uvdata[vertexindex] = CData->curve_uv[curve];
+ uvdata[vertexindex].z = time;
+ vertexindex++;
+ uvdata[vertexindex] = CData->curve_uv[curve];
+ uvdata[vertexindex].z = prevtime;
+ vertexindex++;
+ uvdata[vertexindex] = CData->curve_uv[curve];
+ uvdata[vertexindex].z = time;
+ vertexindex++;
+ }
- if (curvekey == CData->curve_firstkey[curve])
- subv = 0;
+ prevtime = time;
- for (; subv <= segments; subv++) {
-
- float3 ickey_loc = make_float3(0.0f,0.0f,0.0f);
-
- InterpolateKeySegments(subv, segments, curvekey, curve, &ickey_loc, &time, CData , interpolation);
-
- if(subv!=0) {
- for(int section = 0 ; section < resol; section++) {
- uvdata[vertexindex] = CData->curve_uv[curve];
- uvdata[vertexindex].z = prevtime;
- vertexindex++;
- uvdata[vertexindex] = CData->curve_uv[curve];
- uvdata[vertexindex].z = time;
- vertexindex++;
- uvdata[vertexindex] = CData->curve_uv[curve];
- uvdata[vertexindex].z = prevtime;
- vertexindex++;
- uvdata[vertexindex] = CData->curve_uv[curve];
- uvdata[vertexindex].z = time;
- vertexindex++;
- uvdata[vertexindex] = CData->curve_uv[curve];
- uvdata[vertexindex].z = prevtime;
- vertexindex++;
- uvdata[vertexindex] = CData->curve_uv[curve];
- uvdata[vertexindex].z = time;
- vertexindex++;
- }
- }
-
- prevtime = time;
- }
}
}
}
}
-void ExportCurveTriangleVcol(Mesh *mesh, ParticleCurveData *CData, int interpolation, int segments, int vert_offset, int resol, float3 *fdata)
+void ExportCurveTriangleVcol(Mesh *mesh, ParticleCurveData *CData, int vert_offset, int resol, float3 *fdata)
{
if(fdata == NULL)
return;
- float time = 0.0f;
-// float prevtime = 0.0f; // UNUSED
-
int vertexindex = vert_offset;
for( int sys = 0; sys < CData->psys_firstcurve.size() ; sys++) {
@@ -841,35 +727,19 @@ void ExportCurveTriangleVcol(Mesh *mesh, ParticleCurveData *CData, int interpola
for( int curvekey = CData->curve_firstkey[curve]; curvekey < CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1; curvekey++) {
- int subv = 1;
-
- if (curvekey == CData->curve_firstkey[curve])
- subv = 0;
-
- for (; subv <= segments; subv++) {
-
- float3 ickey_loc = make_float3(0.0f,0.0f,0.0f);
-
- InterpolateKeySegments(subv, segments, curvekey, curve, &ickey_loc, &time, CData , interpolation);
-
- if(subv!=0) {
- for(int section = 0 ; section < resol; section++) {
- fdata[vertexindex] = color_srgb_to_scene_linear(CData->curve_vcol[curve]);
- vertexindex++;
- fdata[vertexindex] = color_srgb_to_scene_linear(CData->curve_vcol[curve]);
- vertexindex++;
- fdata[vertexindex] = color_srgb_to_scene_linear(CData->curve_vcol[curve]);
- vertexindex++;
- fdata[vertexindex] = color_srgb_to_scene_linear(CData->curve_vcol[curve]);
- vertexindex++;
- fdata[vertexindex] = color_srgb_to_scene_linear(CData->curve_vcol[curve]);
- vertexindex++;
- fdata[vertexindex] = color_srgb_to_scene_linear(CData->curve_vcol[curve]);
- vertexindex++;
- }
- }
-
- // prevtime = time; // UNUSED
+ for(int section = 0 ; section < resol; section++) {
+ fdata[vertexindex] = color_srgb_to_scene_linear(CData->curve_vcol[curve]);
+ vertexindex++;
+ fdata[vertexindex] = color_srgb_to_scene_linear(CData->curve_vcol[curve]);
+ vertexindex++;
+ fdata[vertexindex] = color_srgb_to_scene_linear(CData->curve_vcol[curve]);
+ vertexindex++;
+ fdata[vertexindex] = color_srgb_to_scene_linear(CData->curve_vcol[curve]);
+ vertexindex++;
+ fdata[vertexindex] = color_srgb_to_scene_linear(CData->curve_vcol[curve]);
+ vertexindex++;
+ fdata[vertexindex] = color_srgb_to_scene_linear(CData->curve_vcol[curve]);
+ vertexindex++;
}
}
}
@@ -882,8 +752,6 @@ void ExportCurveTriangleVcol(Mesh *mesh, ParticleCurveData *CData, int interpola
void BlenderSync::sync_curve_settings()
{
PointerRNA csscene = RNA_pointer_get(&b_scene.ptr, "cycles_curves");
-
- int preset = get_enum(csscene, "preset");
CurveSystemManager *curve_system_manager = scene->curve_system_manager;
CurveSystemManager prev_curve_system_manager = *curve_system_manager;
@@ -892,86 +760,40 @@ void BlenderSync::sync_curve_settings()
curve_system_manager->minimum_width = get_float(csscene, "minimum_width");
curve_system_manager->maximum_width = get_float(csscene, "maximum_width");
- if(preset == CURVE_CUSTOM) {
- /*custom properties*/
- curve_system_manager->primitive = get_enum(csscene, "primitive");
- curve_system_manager->line_method = get_enum(csscene, "line_method");
- curve_system_manager->interpolation = get_enum(csscene, "interpolation");
- curve_system_manager->triangle_method = get_enum(csscene, "triangle_method");
- curve_system_manager->resolution = get_int(csscene, "resolution");
- curve_system_manager->segments = get_int(csscene, "segments");
- curve_system_manager->use_smooth = get_boolean(csscene, "use_smooth");
- curve_system_manager->subdivisions = get_int(csscene, "subdivisions");
-
- curve_system_manager->normalmix = get_float(csscene, "normalmix");
- curve_system_manager->encasing_ratio = get_float(csscene, "encasing_ratio");
-
- curve_system_manager->use_parents = get_boolean(csscene, "use_parents");
- curve_system_manager->use_encasing = get_boolean(csscene, "use_encasing");
- curve_system_manager->use_backfacing = get_boolean(csscene, "use_backfacing");
- curve_system_manager->use_joined = get_boolean(csscene, "use_joined");
- curve_system_manager->use_tangent_normal = get_boolean(csscene, "use_tangent_normal");
- curve_system_manager->use_tangent_normal_geometry = get_boolean(csscene, "use_tangent_normal_geometry");
- curve_system_manager->use_tangent_normal_correction = get_boolean(csscene, "use_tangent_normal_correction");
+ curve_system_manager->primitive = get_enum(csscene, "primitive");
+ curve_system_manager->curve_shape = get_enum(csscene, "shape");
+ curve_system_manager->resolution = get_int(csscene, "resolution");
+ curve_system_manager->subdivisions = get_int(csscene, "subdivisions");
+ curve_system_manager->use_backfacing = !get_boolean(csscene, "cull_backfacing");
+
+ curve_system_manager->encasing_ratio = 1.01f;
+
+ if(curve_system_manager->primitive == CURVE_TRIANGLES && curve_system_manager->curve_shape == CURVE_RIBBON) {
+ /*camera facing planes*/
+ curve_system_manager->triangle_method = CURVE_CAMERA_TRIANGLES;
+ curve_system_manager->resolution = 1;
}
- else {
- curve_system_manager->primitive = CURVE_LINE_SEGMENTS;
- curve_system_manager->interpolation = CURVE_CARDINAL;
- curve_system_manager->normalmix = 1.0f;
- curve_system_manager->encasing_ratio = 1.01f;
- curve_system_manager->use_parents = false;
- curve_system_manager->segments = 1;
- curve_system_manager->use_joined = false;
-
- switch(preset) {
- case CURVE_FAST_PLANES:
- /*camera facing planes*/
- curve_system_manager->primitive = CURVE_TRIANGLES;
- curve_system_manager->triangle_method = CURVE_CAMERA_TRIANGLES;
- curve_system_manager->use_smooth = true;
- curve_system_manager->resolution = 1;
- break;
- case CURVE_TANGENT_SHADING:
- /*tangent shading*/
- curve_system_manager->line_method = CURVE_UNCORRECTED;
- curve_system_manager->use_encasing = true;
- curve_system_manager->use_backfacing = false;
- curve_system_manager->use_tangent_normal = true;
- curve_system_manager->use_tangent_normal_geometry = true;
- curve_system_manager->use_tangent_normal_correction = false;
- break;
- case CURVE_TRUE_NORMAL:
- /*True Normal*/
- curve_system_manager->line_method = CURVE_CORRECTED;
- curve_system_manager->use_encasing = true;
- curve_system_manager->use_backfacing = false;
- curve_system_manager->use_tangent_normal = false;
- curve_system_manager->use_tangent_normal_geometry = false;
- curve_system_manager->use_tangent_normal_correction = false;
- break;
- case CURVE_ACCURATE_PRESET:
- /*Accurate*/
- curve_system_manager->line_method = CURVE_ACCURATE;
- curve_system_manager->use_encasing = false;
- curve_system_manager->use_backfacing = true;
- curve_system_manager->use_tangent_normal = false;
- curve_system_manager->use_tangent_normal_geometry = false;
- curve_system_manager->use_tangent_normal_correction = false;
- break;
- case CURVE_SMOOTH_CURVES:
- /*Cardinal curves preset*/
- curve_system_manager->primitive = CURVE_SEGMENTS;
- curve_system_manager->use_backfacing = true;
- curve_system_manager->subdivisions = 4;
- break;
- case CURVE_SMOOTH_RIBBONS:
- /*Cardinal ribbons preset*/
- curve_system_manager->primitive = CURVE_RIBBONS;
- curve_system_manager->use_backfacing = false;
- curve_system_manager->subdivisions = 4;
- break;
- }
-
+ if(curve_system_manager->primitive == CURVE_TRIANGLES && curve_system_manager->curve_shape == CURVE_THICK) {
+ /*camera facing planes*/
+ curve_system_manager->triangle_method = CURVE_TESSELATED_TRIANGLES;
+ }
+ if(curve_system_manager->primitive == CURVE_LINE_SEGMENTS && curve_system_manager->curve_shape == CURVE_RIBBON) {
+ /*tangent shading*/
+ curve_system_manager->line_method = CURVE_UNCORRECTED;
+ curve_system_manager->use_encasing = true;
+ curve_system_manager->use_backfacing = false;
+ curve_system_manager->use_tangent_normal = true;
+ curve_system_manager->use_tangent_normal_geometry = true;
+ }
+ if(curve_system_manager->primitive == CURVE_LINE_SEGMENTS && curve_system_manager->curve_shape == CURVE_THICK) {
+ curve_system_manager->line_method = CURVE_ACCURATE;
+ curve_system_manager->use_encasing = false;
+ curve_system_manager->use_tangent_normal = false;
+ curve_system_manager->use_tangent_normal_geometry = false;
+ }
+ if(curve_system_manager->primitive == CURVE_SEGMENTS && curve_system_manager->curve_shape == CURVE_RIBBON) {
+ curve_system_manager->primitive = CURVE_RIBBONS;
+ curve_system_manager->use_backfacing = false;
}
if(curve_system_manager->modified_mesh(prev_curve_system_manager))
@@ -997,29 +819,27 @@ void BlenderSync::sync_curve_settings()
}
-void BlenderSync::sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool object_updated)
+void BlenderSync::sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, int motion)
{
- /* Clear stored curve data */
- mesh->curve_keys.clear();
- mesh->curves.clear();
- mesh->curve_attributes.clear();
+ if(!motion) {
+ /* Clear stored curve data */
+ mesh->curve_keys.clear();
+ mesh->curves.clear();
+ mesh->curve_attributes.clear();
+ }
/* obtain general settings */
bool use_curves = scene->curve_system_manager->use_curves;
if(!(use_curves && b_ob.mode() == b_ob.mode_OBJECT)) {
- mesh->compute_bounds();
+ if(!motion)
+ mesh->compute_bounds();
return;
}
int primitive = scene->curve_system_manager->primitive;
- int interpolation = scene->curve_system_manager->interpolation;
int triangle_method = scene->curve_system_manager->triangle_method;
int resolution = scene->curve_system_manager->resolution;
- int segments = scene->curve_system_manager->segments;
- bool use_smooth = scene->curve_system_manager->use_smooth;
- bool use_parents = scene->curve_system_manager->use_parents;
- bool export_tgs = scene->curve_system_manager->use_joined;
size_t vert_num = mesh->verts.size();
size_t tri_num = mesh->triangles.size();
int used_res = 1;
@@ -1031,7 +851,7 @@ void BlenderSync::sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool
if(!preview)
set_resolution(mesh, &b_mesh, &b_ob, &b_scene, true);
- ObtainCacheParticleData(mesh, &b_mesh, &b_ob, &CData, use_parents, !preview);
+ ObtainCacheParticleData(mesh, &b_mesh, &b_ob, &CData, !preview);
/* obtain camera parameters */
BL::Object b_CamOb = b_scene.camera();
@@ -1044,38 +864,24 @@ void BlenderSync::sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool
}
/* add hair geometry to mesh */
- if(primitive == CURVE_TRIANGLES){
+ if(primitive == CURVE_TRIANGLES) {
if(triangle_method == CURVE_CAMERA_TRIANGLES)
- ExportCurveTrianglePlanes(mesh, &CData, interpolation, use_smooth, segments, RotCam);
- else if(triangle_method == CURVE_RIBBON_TRIANGLES)
- ExportCurveTriangleRibbons(mesh, &CData, interpolation, use_smooth, segments);
+ ExportCurveTrianglePlanes(mesh, &CData, RotCam);
else {
- ExportCurveTriangleGeometry(mesh, &CData, interpolation, use_smooth, resolution, segments);
+ ExportCurveTriangleGeometry(mesh, &CData, resolution);
used_res = resolution;
}
}
else {
- ExportCurveSegments(scene, mesh, &CData, interpolation, segments);
- int ckey_num = mesh->curve_keys.size();
-
- /*export tangents or curve data? - not functional yet*/
- if(export_tgs && ckey_num > 1) {
- Attribute *attr_tangent = mesh->curve_attributes.add(ATTR_STD_CURVE_TANGENT);
- float3 *data_tangent = attr_tangent->data_float3();
-
- for(int ck = 0; ck < ckey_num; ck++) {
- float3 tg = normalize(normalize(mesh->curve_keys[min(ck + 1, ckey_num - 1)].co - mesh->curve_keys[ck].co) -
- normalize(mesh->curve_keys[max(ck - 1, 0)].co - mesh->curve_keys[ck].co));
-
- data_tangent[ck] = tg;
- }
- }
+ if(motion)
+ ExportCurveSegmentsMotion(scene, mesh, &CData, motion);
+ else
+ ExportCurveSegments(scene, mesh, &CData);
}
-
/* generated coordinates from first key. we should ideally get this from
* blender to handle deforming objects */
- {
+ if(!motion) {
if(mesh->need_attribute(scene, ATTR_STD_GENERATED)) {
float3 loc, size;
mesh_texture_space(b_mesh, loc, size);
@@ -1101,7 +907,7 @@ void BlenderSync::sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool
}
/* create vertex color attributes */
- {
+ if(!motion) {
BL::Mesh::tessface_vertex_colors_iterator l;
int vcol_num = 0;
@@ -1109,7 +915,7 @@ void BlenderSync::sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool
if(!mesh->need_attribute(scene, ustring(l->name().c_str())))
continue;
- ObtainCacheParticleVcol(mesh, &b_mesh, &b_ob, &CData, use_parents, !preview, vcol_num);
+ ObtainCacheParticleVcol(mesh, &b_mesh, &b_ob, &CData, !preview, vcol_num);
if(primitive == CURVE_TRIANGLES) {
@@ -1118,7 +924,7 @@ void BlenderSync::sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool
float3 *fdata = attr_vcol->data_float3();
- ExportCurveTriangleVcol(mesh, &CData, interpolation, segments, tri_num * 3, used_res, fdata);
+ ExportCurveTriangleVcol(mesh, &CData, tri_num * 3, used_res, fdata);
}
else {
Attribute *attr_vcol = mesh->curve_attributes.add(
@@ -1135,7 +941,7 @@ void BlenderSync::sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool
}
/* create UV attributes */
- {
+ if(!motion) {
BL::Mesh::tessface_uv_textures_iterator l;
int uv_num = 0;
@@ -1148,7 +954,7 @@ void BlenderSync::sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool
if(mesh->need_attribute(scene, name) || mesh->need_attribute(scene, std)) {
Attribute *attr_uv;
- ObtainCacheParticleUV(mesh, &b_mesh, &b_ob, &CData, use_parents, !preview, uv_num);
+ ObtainCacheParticleUV(mesh, &b_mesh, &b_ob, &CData, !preview, uv_num);
if(primitive == CURVE_TRIANGLES) {
if(active_render)
@@ -1158,7 +964,7 @@ void BlenderSync::sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool
float3 *uv = attr_uv->data_float3();
- ExportCurveTriangleUV(mesh, &CData, interpolation, segments, tri_num * 3, used_res, uv);
+ ExportCurveTriangleUV(mesh, &CData, tri_num * 3, used_res, uv);
}
else {
if(active_render)
@@ -1183,6 +989,5 @@ void BlenderSync::sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool
mesh->compute_bounds();
}
-
CCL_NAMESPACE_END
diff --git a/intern/cycles/blender/blender_mesh.cpp b/intern/cycles/blender/blender_mesh.cpp
index 55282a1ec00..e42af60c27b 100644
--- a/intern/cycles/blender/blender_mesh.cpp
+++ b/intern/cycles/blender/blender_mesh.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
@@ -482,15 +480,15 @@ Mesh *BlenderSync::sync_mesh(BL::Object b_ob, bool object_updated, bool hide_tri
BL::Mesh b_mesh = object_to_mesh(b_data, b_ob, b_scene, true, !preview, need_undeformed);
if(b_mesh) {
- if(render_layer.use_surfaces && !(hide_tris && experimental)) {
+ if(render_layer.use_surfaces && !hide_tris) {
if(cmesh.data && experimental && RNA_boolean_get(&cmesh, "use_subdivision"))
create_subd_mesh(mesh, b_mesh, &cmesh, used_shaders);
else
create_mesh(scene, mesh, b_mesh, used_shaders);
}
- if(render_layer.use_hair && experimental)
- sync_curves(mesh, b_mesh, b_ob, object_updated);
+ if(render_layer.use_hair)
+ sync_curves(mesh, b_mesh, b_ob, 0);
/* free derived mesh */
b_data.meshes.remove(b_mesh);
@@ -541,6 +539,12 @@ void BlenderSync::sync_mesh_motion(BL::Object b_ob, Mesh *mesh, int motion)
if(!size || !ccl::BKE_object_is_deform_modified(b_ob, b_scene, preview))
return;
+ /* ensure we only sync instanced meshes once */
+ if(mesh_motion_synced.find(mesh) != mesh_motion_synced.end())
+ return;
+
+ mesh_motion_synced.insert(mesh);
+
/* get derived mesh */
BL::Mesh b_mesh = object_to_mesh(b_data, b_ob, b_scene, true, !preview, false);
@@ -558,6 +562,10 @@ void BlenderSync::sync_mesh_motion(BL::Object b_ob, Mesh *mesh, int motion)
if(i != size || memcmp(M, &mesh->verts[0], sizeof(float3)*size) == 0)
mesh->attributes.remove(std);
+ /* hair motion */
+ if(render_layer.use_hair)
+ sync_curves(mesh, b_mesh, b_ob, motion);
+
/* free derived mesh */
b_data.meshes.remove(b_mesh);
}
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp
index 3410c73fbde..ba584e172dc 100644
--- a/intern/cycles/blender/blender_object.cpp
+++ b/intern/cycles/blender/blender_object.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "camera.h"
@@ -160,7 +158,7 @@ void BlenderSync::sync_light(BL::Object b_parent, int persistent_id[OBJECT_PERSI
light->use_mis = get_boolean(clamp, "use_multiple_importance_sampling");
int samples = get_int(clamp, "samples");
- if(get_boolean(cscene, "squared_samples"))
+ if(get_boolean(cscene, "use_square_samples"))
light->samples = samples * samples;
else
light->samples = samples;
@@ -198,7 +196,7 @@ void BlenderSync::sync_background_light()
light->shader = scene->default_background;
int samples = get_int(cworld, "samples");
- if(get_boolean(cscene, "squared_samples"))
+ if(get_boolean(cscene, "use_square_samples"))
light->samples = samples * samples;
else
light->samples = samples;
@@ -298,7 +296,7 @@ Object *BlenderSync::sync_object(BL::Object b_parent, int persistent_id[OBJECT_P
object->random_id = hash_int_2d(object->random_id, 0);
/* visibility flags for both parent */
- object->visibility = object_ray_visibility(b_ob) & PATH_RAY_ALL;
+ object->visibility = object_ray_visibility(b_ob) & PATH_RAY_ALL_VISIBILITY;
if(b_parent.ptr.data != b_ob.ptr.data) {
object->visibility &= object_ray_visibility(b_parent);
object->random_id ^= hash_int(hash_string(b_parent.name().c_str()));
@@ -306,7 +304,7 @@ Object *BlenderSync::sync_object(BL::Object b_parent, int persistent_id[OBJECT_P
/* make holdout objects on excluded layer invisible for non-camera rays */
if(use_holdout && (layer_flag & render_layer.exclude_layer))
- object->visibility &= ~(PATH_RAY_ALL - PATH_RAY_CAMERA);
+ object->visibility &= ~(PATH_RAY_ALL_VISIBILITY - PATH_RAY_CAMERA);
/* camera flag is not actually used, instead is tested
* against render layer flags */
@@ -407,6 +405,9 @@ void BlenderSync::sync_objects(BL::SpaceView3D b_v3d, int motion)
mesh_synced.clear();
particle_system_map.pre_sync();
}
+ else {
+ mesh_motion_synced.clear();
+ }
/* object loop */
BL::Scene::objects_iterator b_ob;
@@ -494,6 +495,9 @@ void BlenderSync::sync_objects(BL::SpaceView3D b_v3d, int motion)
scene->particle_system_manager->tag_update(scene);
mesh_synced.clear();
}
+
+ if(motion)
+ mesh_motion_synced.clear();
}
void BlenderSync::sync_motion(BL::SpaceView3D b_v3d, BL::Object b_override)
diff --git a/intern/cycles/blender/blender_particles.cpp b/intern/cycles/blender/blender_particles.cpp
index 769cd9f532d..ef832ed39c0 100644
--- a/intern/cycles/blender/blender_particles.cpp
+++ b/intern/cycles/blender/blender_particles.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "mesh.h"
diff --git a/intern/cycles/blender/blender_python.cpp b/intern/cycles/blender/blender_python.cpp
index 9a86cee6546..71c84869ff6 100644
--- a/intern/cycles/blender/blender_python.cpp
+++ b/intern/cycles/blender/blender_python.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include <Python.h>
diff --git a/intern/cycles/blender/blender_session.cpp b/intern/cycles/blender/blender_session.cpp
index fb743acf29a..84ff071171b 100644
--- a/intern/cycles/blender/blender_session.cpp
+++ b/intern/cycles/blender/blender_session.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "background.h"
@@ -167,10 +165,11 @@ void BlenderSession::reset_session(BL::BlendData b_data_, BL::Scene b_scene_)
/* sync object should be re-created */
sync = new BlenderSync(b_engine, b_data, b_scene, scene, !background, session->progress, session_params.device.type == DEVICE_CPU);
- if(b_rv3d) {
- sync->sync_data(b_v3d, b_engine.camera_override());
- sync->sync_camera(b_render, b_engine.camera_override(), width, height);
- }
+ /* for final render we will do full data sync per render layer, only
+ * do some basic syncing here, no objects or materials for speed */
+ sync->sync_render_layers(b_v3d, NULL);
+ sync->sync_integrator();
+ sync->sync_camera(b_render, b_engine.camera_override(), width, height);
BufferParams buffer_params = BlenderSync::get_buffer_params(b_render, b_scene, PointerRNA_NULL, PointerRNA_NULL, scene->camera, width, height);
session->reset(buffer_params, session_params.samples);
@@ -590,7 +589,15 @@ bool BlenderSession::draw(int w, int h)
/* draw */
BufferParams buffer_params = BlenderSync::get_buffer_params(b_render, b_scene, b_v3d, b_rv3d, scene->camera, width, height);
- return !session->draw(buffer_params);
+ if(session->params.display_buffer_linear)
+ b_engine.bind_display_space_shader(b_scene);
+
+ bool draw_ok = !session->draw(buffer_params);
+
+ if(session->params.display_buffer_linear)
+ b_engine.unbind_display_space_shader();
+
+ return draw_ok;
}
void BlenderSession::get_status(string& status, string& substatus)
diff --git a/intern/cycles/blender/blender_session.h b/intern/cycles/blender/blender_session.h
index 4d3caeee40f..86b22165084 100644
--- a/intern/cycles/blender/blender_session.h
+++ b/intern/cycles/blender/blender_session.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __BLENDER_SESSION_H__
diff --git a/intern/cycles/blender/blender_shader.cpp b/intern/cycles/blender/blender_shader.cpp
index 469ba15d291..b576181d890 100644
--- a/intern/cycles/blender/blender_shader.cpp
+++ b/intern/cycles/blender/blender_shader.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "background.h"
@@ -149,6 +147,7 @@ static void get_tex_mapping(TextureMapping *mapping, BL::TexMapping b_mapping)
mapping->translation = get_float3(b_mapping.translation());
mapping->rotation = get_float3(b_mapping.rotation());
mapping->scale = get_float3(b_mapping.scale());
+ mapping->type = (TextureMapping::Type)b_mapping.vector_type();
mapping->x_mapping = (TextureMapping::Mapping)b_mapping.mapping_x();
mapping->y_mapping = (TextureMapping::Mapping)b_mapping.mapping_y();
@@ -163,6 +162,7 @@ static void get_tex_mapping(TextureMapping *mapping, BL::ShaderNodeMapping b_map
mapping->translation = get_float3(b_mapping.translation());
mapping->rotation = get_float3(b_mapping.rotation());
mapping->scale = get_float3(b_mapping.scale());
+ mapping->type = (TextureMapping::Type)b_mapping.vector_type();
mapping->use_minmax = b_mapping.use_min() || b_mapping.use_max();
@@ -317,7 +317,20 @@ static ShaderNode *add_node(Scene *scene, BL::BlendData b_data, BL::Scene b_scen
node = new DiffuseBsdfNode();
}
else if (b_node.is_a(&RNA_ShaderNodeSubsurfaceScattering)) {
- node = new SubsurfaceScatteringNode();
+ BL::ShaderNodeSubsurfaceScattering b_subsurface_node(b_node);
+
+ SubsurfaceScatteringNode *subsurface = new SubsurfaceScatteringNode();
+
+ switch(b_subsurface_node.falloff()) {
+ case BL::ShaderNodeSubsurfaceScattering::falloff_CUBIC:
+ subsurface->closure = CLOSURE_BSSRDF_CUBIC_ID;
+ break;
+ case BL::ShaderNodeSubsurfaceScattering::falloff_GAUSSIAN:
+ subsurface->closure = CLOSURE_BSSRDF_GAUSSIAN_ID;
+ break;
+ }
+
+ node = subsurface;
}
else if (b_node.is_a(&RNA_ShaderNodeBsdfGlossy)) {
BL::ShaderNodeBsdfGlossy b_glossy_node(b_node);
@@ -381,6 +394,19 @@ static ShaderNode *add_node(Scene *scene, BL::BlendData b_data, BL::Scene b_scen
}
node = toon;
}
+ else if (b_node.is_a(&RNA_ShaderNodeBsdfHair)) {
+ BL::ShaderNodeBsdfHair b_hair_node(b_node);
+ HairBsdfNode *hair = new HairBsdfNode();
+ switch(b_hair_node.component()) {
+ case BL::ShaderNodeBsdfHair::component_Reflection:
+ hair->component = ustring("Reflection");
+ break;
+ case BL::ShaderNodeBsdfHair::component_Transmission:
+ hair->component = ustring("Transmission");
+ break;
+ }
+ node = hair;
+ }
else if (b_node.is_a(&RNA_ShaderNodeBsdfTranslucent)) {
node = new TranslucentBsdfNode();
}
@@ -618,8 +644,10 @@ static ShaderNode *add_node(Scene *scene, BL::BlendData b_data, BL::Scene b_scen
else if (b_node.is_a(&RNA_ShaderNodeTexSky)) {
BL::ShaderNodeTexSky b_sky_node(b_node);
SkyTextureNode *sky = new SkyTextureNode();
+ sky->type = SkyTextureNode::type_enum[(int)b_sky_node.sky_type()];
sky->sun_direction = get_float3(b_sky_node.sun_direction());
sky->turbidity = b_sky_node.turbidity();
+ sky->ground_albedo = b_sky_node.ground_albedo();
get_tex_mapping(&sky->tex_mapping, b_sky_node.texture_mapping());
node = sky;
}
diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp
index 1a416368510..a349ddc5c3f 100644
--- a/intern/cycles/blender/blender_sync.cpp
+++ b/intern/cycles/blender/blender_sync.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "background.h"
@@ -36,6 +34,7 @@
#include "util_debug.h"
#include "util_foreach.h"
+#include "util_opengl.h"
CCL_NAMESPACE_BEGIN
@@ -191,7 +190,7 @@ void BlenderSync::sync_integrator()
}
#endif
- integrator->progressive = get_boolean(cscene, "progressive");
+ integrator->method = (Integrator::Method)get_enum(cscene, "progressive");
int diffuse_samples = get_int(cscene, "diffuse_samples");
int glossy_samples = get_int(cscene, "glossy_samples");
@@ -200,7 +199,7 @@ void BlenderSync::sync_integrator()
int mesh_light_samples = get_int(cscene, "mesh_light_samples");
int subsurface_samples = get_int(cscene, "subsurface_samples");
- if(get_boolean(cscene, "squared_samples")) {
+ if(get_boolean(cscene, "use_square_samples")) {
integrator->diffuse_samples = diffuse_samples * diffuse_samples;
integrator->glossy_samples = glossy_samples * glossy_samples;
integrator->transmission_samples = transmission_samples * transmission_samples;
@@ -321,7 +320,7 @@ void BlenderSync::sync_render_layers(BL::SpaceView3D b_v3d, const char *layer)
render_layer.bound_samples = (use_layer_samples == 1);
if(use_layer_samples != 2) {
int samples = b_rlay->samples();
- if(get_boolean(cscene, "squared_samples") && !(get_boolean(cscene, "progressive")))
+ if(get_boolean(cscene, "use_square_samples"))
render_layer.samples = samples * samples;
else
render_layer.samples = samples;
@@ -414,13 +413,15 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine b_engine, BL::Use
int preview_samples = get_int(cscene, "preview_samples");
int preview_aa_samples = get_int(cscene, "preview_aa_samples");
- /* Squared samples for Non-Progressive only */
- if(get_boolean(cscene, "squared_samples")) {
+ if(get_boolean(cscene, "use_square_samples")) {
aa_samples = aa_samples * aa_samples;
preview_aa_samples = preview_aa_samples * preview_aa_samples;
+
+ samples = samples * samples;
+ preview_samples = preview_samples * preview_samples;
}
- if(get_boolean(cscene, "progressive") == 0) {
+ if(get_enum(cscene, "progressive") == 0) {
if(background) {
params.samples = aa_samples;
}
@@ -458,7 +459,7 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine b_engine, BL::Use
params.tile_size = make_int2(tile_x, tile_y);
}
- params.tile_order = RNA_enum_get(&cscene, "tile_order");
+ params.tile_order = (TileOrder)RNA_enum_get(&cscene, "tile_order");
params.start_resolution = get_int(cscene, "preview_start_resolution");
@@ -492,6 +493,9 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine b_engine, BL::Use
params.shadingsystem = SessionParams::SVM;
else if(shadingsystem == 1)
params.shadingsystem = SessionParams::OSL;
+
+ /* color managagement */
+ params.display_buffer_linear = GLEW_ARB_half_float_pixel && b_engine.support_display_space_shader(b_scene);
return params;
}
diff --git a/intern/cycles/blender/blender_sync.h b/intern/cycles/blender/blender_sync.h
index da86bafa936..3d2a3ae5aac 100644
--- a/intern/cycles/blender/blender_sync.h
+++ b/intern/cycles/blender/blender_sync.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __BLENDER_SYNC_H__
@@ -83,7 +81,7 @@ private:
void sync_nodes(Shader *shader, BL::ShaderNodeTree b_ntree);
Mesh *sync_mesh(BL::Object b_ob, bool object_updated, bool hide_tris);
- void sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool object_updated);
+ void sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, int motion);
Object *sync_object(BL::Object b_parent, int persistent_id[OBJECT_PERSISTENT_ID_SIZE], BL::DupliObject b_dupli_object, Transform& tfm, uint layer_flag, int motion, bool hide_tris);
void sync_light(BL::Object b_parent, int persistent_id[OBJECT_PERSISTENT_ID_SIZE], BL::Object b_ob, Transform& tfm);
void sync_background_light();
@@ -110,6 +108,7 @@ private:
id_map<ObjectKey, Light> light_map;
id_map<ParticleSystemKey, ParticleSystem> particle_system_map;
set<Mesh*> mesh_synced;
+ set<Mesh*> mesh_motion_synced;
void *world_map;
bool world_recalc;
diff --git a/intern/cycles/blender/blender_util.h b/intern/cycles/blender/blender_util.h
index dc647da3022..cb0f7b76d56 100644
--- a/intern/cycles/blender/blender_util.h
+++ b/intern/cycles/blender/blender_util.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __BLENDER_UTIL_H__
diff --git a/intern/cycles/bvh/bvh.cpp b/intern/cycles/bvh/bvh.cpp
index dd647fec2d3..6c636ac5c8d 100644
--- a/intern/cycles/bvh/bvh.cpp
+++ b/intern/cycles/bvh/bvh.cpp
@@ -295,16 +295,8 @@ void BVH::pack_curve_segment(int idx, float4 woop[3])
* extra curve data <3> , StrID,
* nextkey, flags/tip?, 0, 0);
*/
- Attribute *attr_tangent = mesh->curve_attributes.find(ATTR_STD_CURVE_TANGENT);
float3 tg0 = make_float3(1.0f, 0.0f, 0.0f);
float3 tg1 = make_float3(1.0f, 0.0f, 0.0f);
-
- if(attr_tangent) {
- const float3 *data_tangent = attr_tangent->data_float3();
-
- tg0 = data_tangent[k0];
- tg1 = data_tangent[k1];
- }
Transform tfm = make_transform(
tg0.x, tg0.y, tg0.z, l,
diff --git a/intern/cycles/bvh/bvh_build.cpp b/intern/cycles/bvh/bvh_build.cpp
index 022c4c8d294..b21b20a87e5 100644
--- a/intern/cycles/bvh/bvh_build.cpp
+++ b/intern/cycles/bvh/bvh_build.cpp
@@ -225,7 +225,7 @@ BVHNode* BVHBuild::run()
task_pool.wait_work();
}
- /* delete if we cancelled */
+ /* delete if we canceled */
if(rootnode) {
if(progress.get_cancel()) {
rootnode->deleteSubtree();
@@ -284,9 +284,13 @@ BVHNode* BVHBuild::build_node(const BVHObjectBinning& range, int level)
float leafSAH = params.sah_triangle_cost * range.leafSAH;
float splitSAH = params.sah_node_cost * range.bounds().half_area() + params.sah_triangle_cost * range.splitSAH;
- /* make leaf node when threshold reached or SAH tells us */
- if(params.small_enough_for_leaf(size, level) || (size <= params.max_leaf_size && leafSAH < splitSAH))
- return create_leaf_node(range);
+ /* have at least one inner node on top level, for performance and correct
+ * visibility tests, since object instances do not check visibility flag */
+ if(!(range.size() > 0 && params.top_level && level == 0)) {
+ /* make leaf node when threshold reached or SAH tells us */
+ if(params.small_enough_for_leaf(size, level) || (size <= params.max_leaf_size && leafSAH < splitSAH))
+ return create_leaf_node(range);
+ }
/* perform split */
BVHObjectBinning left, right;
@@ -322,17 +326,21 @@ BVHNode* BVHBuild::build_node(const BVHRange& range, int level)
return NULL;
/* small enough or too deep => create leaf. */
- if(params.small_enough_for_leaf(range.size(), level)) {
- progress_count += range.size();
- return create_leaf_node(range);
+ if(!(range.size() > 0 && params.top_level && level == 0)) {
+ if(params.small_enough_for_leaf(range.size(), level)) {
+ progress_count += range.size();
+ return create_leaf_node(range);
+ }
}
/* splitting test */
BVHMixedSplit split(this, range, level);
- if(split.no_split) {
- progress_count += range.size();
- return create_leaf_node(range);
+ if(!(range.size() > 0 && params.top_level && level == 0)) {
+ if(split.no_split) {
+ progress_count += range.size();
+ return create_leaf_node(range);
+ }
}
/* do split */
diff --git a/intern/cycles/cmake/external_libs.cmake b/intern/cycles/cmake/external_libs.cmake
index 790049898ff..8753ff4bf84 100644
--- a/intern/cycles/cmake/external_libs.cmake
+++ b/intern/cycles/cmake/external_libs.cmake
@@ -2,7 +2,7 @@
###########################################################################
# GLUT
-if(WITH_CYCLES_TEST)
+if(WITH_CYCLES_STANDALONE AND WITH_CYCLES_STANDALONE_GUI)
set(GLUT_ROOT_PATH ${CYCLES_GLUT})
find_package(GLUT)
diff --git a/intern/cycles/device/device.cpp b/intern/cycles/device/device.cpp
index 1248b42b738..5c771aa1c8b 100644
--- a/intern/cycles/device/device.cpp
+++ b/intern/cycles/device/device.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include <stdlib.h>
@@ -43,7 +41,10 @@ void Device::pixels_alloc(device_memory& mem)
void Device::pixels_copy_from(device_memory& mem, int y, int w, int h)
{
- mem_copy_from(mem, y, w, h, sizeof(uint8_t)*4);
+ if(mem.data_type == TYPE_HALF)
+ mem_copy_from(mem, y, w, h, sizeof(half4));
+ else
+ mem_copy_from(mem, y, w, h, sizeof(uchar4));
}
void Device::pixels_free(device_memory& mem)
@@ -60,19 +61,61 @@ void Device::draw_pixels(device_memory& rgba, int y, int w, int h, int dy, int w
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
}
- glPixelZoom((float)width/(float)w, (float)height/(float)h);
- glRasterPos2f(0, dy);
+ glColor3f(1.0f, 1.0f, 1.0f);
+
+ if(rgba.data_type == TYPE_HALF) {
+ /* for multi devices, this assumes the ineffecient method that we allocate
+ * all pixels on the device even though we only render to a subset */
+ GLhalf *data_pointer = (GLhalf*)rgba.data_pointer;
+ data_pointer += 4*y*w;
+
+ /* draw half float texture, GLSL shader for display transform assumed to be bound */
+ GLuint texid;
+ glGenTextures(1, &texid);
+ glBindTexture(GL_TEXTURE_2D, texid);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F_ARB, w, h, 0, GL_RGBA, GL_HALF_FLOAT, data_pointer);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+
+ glEnable(GL_TEXTURE_2D);
+
+ glPushMatrix();
+ glTranslatef(0.0f, (float)dy, 0.0f);
+
+ glBegin(GL_QUADS);
+
+ glTexCoord2f(0.0f, 0.0f);
+ glVertex2f(0.0f, 0.0f);
+ glTexCoord2f(1.0f, 0.0f);
+ glVertex2f((float)width, 0.0f);
+ glTexCoord2f(1.0f, 1.0f);
+ glVertex2f((float)width, (float)height);
+ glTexCoord2f(0.0f, 1.0f);
+ glVertex2f(0.0f, (float)height);
+
+ glEnd();
+
+ glPopMatrix();
+
+ glBindTexture(GL_TEXTURE_2D, 0);
+ glDisable(GL_TEXTURE_2D);
+ glDeleteTextures(1, &texid);
+ }
+ else {
+ /* fallback for old graphics cards that don't support GLSL, half float,
+ * and non-power-of-two textures */
+ glPixelZoom((float)width/(float)w, (float)height/(float)h);
+ glRasterPos2f(0, dy);
- uint8_t *pixels = (uint8_t*)rgba.data_pointer;
+ uint8_t *pixels = (uint8_t*)rgba.data_pointer;
- /* for multi devices, this assumes the ineffecient method that we allocate
- * all pixels on the device even though we only render to a subset */
- pixels += 4*y*w;
+ pixels += 4*y*w;
- glDrawPixels(w, h, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
+ glDrawPixels(w, h, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
- glRasterPos2f(0.0f, 0.0f);
- glPixelZoom(1.0f, 1.0f);
+ glRasterPos2f(0.0f, 0.0f);
+ glPixelZoom(1.0f, 1.0f);
+ }
if(transparent)
glDisable(GL_BLEND);
diff --git a/intern/cycles/device/device.h b/intern/cycles/device/device.h
index 7b31b9ba157..18868d19a85 100644
--- a/intern/cycles/device/device.h
+++ b/intern/cycles/device/device.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __DEVICE_H__
diff --git a/intern/cycles/device/device_cpu.cpp b/intern/cycles/device/device_cpu.cpp
index 7bc84878dab..d04c5df82fb 100644
--- a/intern/cycles/device/device_cpu.cpp
+++ b/intern/cycles/device/device_cpu.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include <stdlib.h>
@@ -129,8 +127,8 @@ public:
{
if(task->type == DeviceTask::PATH_TRACE)
thread_path_trace(*task);
- else if(task->type == DeviceTask::TONEMAP)
- thread_tonemap(*task);
+ else if(task->type == DeviceTask::FILM_CONVERT)
+ thread_film_convert(*task);
else if(task->type == DeviceTask::SHADER)
thread_shader(*task);
}
@@ -146,7 +144,7 @@ public:
void thread_path_trace(DeviceTask& task)
{
- if(task_pool.cancelled()) {
+ if(task_pool.canceled()) {
if(task.need_finish_queue == false)
return;
}
@@ -168,7 +166,7 @@ public:
#ifdef WITH_OPTIMIZED_KERNEL
if(system_cpu_support_sse3()) {
for(int sample = start_sample; sample < end_sample; sample++) {
- if (task.get_cancel() || task_pool.cancelled()) {
+ if (task.get_cancel() || task_pool.canceled()) {
if(task.need_finish_queue == false)
break;
}
@@ -187,7 +185,7 @@ public:
}
else if(system_cpu_support_sse2()) {
for(int sample = start_sample; sample < end_sample; sample++) {
- if (task.get_cancel() || task_pool.cancelled()) {
+ if (task.get_cancel() || task_pool.canceled()) {
if(task.need_finish_queue == false)
break;
}
@@ -208,7 +206,7 @@ public:
#endif
{
for(int sample = start_sample; sample < end_sample; sample++) {
- if (task.get_cancel() || task_pool.cancelled()) {
+ if (task.get_cancel() || task_pool.canceled()) {
if(task.need_finish_queue == false)
break;
}
@@ -228,7 +226,7 @@ public:
task.release_tile(tile);
- if(task_pool.cancelled()) {
+ if(task_pool.canceled()) {
if(task.need_finish_queue == false)
break;
}
@@ -239,28 +237,55 @@ public:
#endif
}
- void thread_tonemap(DeviceTask& task)
+ void thread_film_convert(DeviceTask& task)
{
+ float sample_scale = 1.0f/(task.sample + 1);
+
+ if(task.rgba_half) {
#ifdef WITH_OPTIMIZED_KERNEL
- if(system_cpu_support_sse3()) {
- for(int y = task.y; y < task.y + task.h; y++)
- for(int x = task.x; x < task.x + task.w; x++)
- kernel_cpu_sse3_tonemap(&kernel_globals, (uchar4*)task.rgba, (float*)task.buffer,
- task.sample, x, y, task.offset, task.stride);
- }
- else if(system_cpu_support_sse2()) {
- for(int y = task.y; y < task.y + task.h; y++)
- for(int x = task.x; x < task.x + task.w; x++)
- kernel_cpu_sse2_tonemap(&kernel_globals, (uchar4*)task.rgba, (float*)task.buffer,
- task.sample, x, y, task.offset, task.stride);
+ if(system_cpu_support_sse3()) {
+ for(int y = task.y; y < task.y + task.h; y++)
+ for(int x = task.x; x < task.x + task.w; x++)
+ kernel_cpu_sse3_convert_to_half_float(&kernel_globals, (uchar4*)task.rgba_half, (float*)task.buffer,
+ sample_scale, x, y, task.offset, task.stride);
+ }
+ else if(system_cpu_support_sse2()) {
+ for(int y = task.y; y < task.y + task.h; y++)
+ for(int x = task.x; x < task.x + task.w; x++)
+ kernel_cpu_sse2_convert_to_half_float(&kernel_globals, (uchar4*)task.rgba_half, (float*)task.buffer,
+ sample_scale, x, y, task.offset, task.stride);
+ }
+ else
+#endif
+ {
+ for(int y = task.y; y < task.y + task.h; y++)
+ for(int x = task.x; x < task.x + task.w; x++)
+ kernel_cpu_convert_to_half_float(&kernel_globals, (uchar4*)task.rgba_half, (float*)task.buffer,
+ sample_scale, x, y, task.offset, task.stride);
+ }
}
- else
+ else {
+#ifdef WITH_OPTIMIZED_KERNEL
+ if(system_cpu_support_sse3()) {
+ for(int y = task.y; y < task.y + task.h; y++)
+ for(int x = task.x; x < task.x + task.w; x++)
+ kernel_cpu_sse3_convert_to_byte(&kernel_globals, (uchar4*)task.rgba_byte, (float*)task.buffer,
+ sample_scale, x, y, task.offset, task.stride);
+ }
+ else if(system_cpu_support_sse2()) {
+ for(int y = task.y; y < task.y + task.h; y++)
+ for(int x = task.x; x < task.x + task.w; x++)
+ kernel_cpu_sse2_convert_to_byte(&kernel_globals, (uchar4*)task.rgba_byte, (float*)task.buffer,
+ sample_scale, x, y, task.offset, task.stride);
+ }
+ else
#endif
- {
- for(int y = task.y; y < task.y + task.h; y++)
- for(int x = task.x; x < task.x + task.w; x++)
- kernel_cpu_tonemap(&kernel_globals, (uchar4*)task.rgba, (float*)task.buffer,
- task.sample, x, y, task.offset, task.stride);
+ {
+ for(int y = task.y; y < task.y + task.h; y++)
+ for(int x = task.x; x < task.x + task.w; x++)
+ kernel_cpu_convert_to_byte(&kernel_globals, (uchar4*)task.rgba_byte, (float*)task.buffer,
+ sample_scale, x, y, task.offset, task.stride);
+ }
}
}
@@ -277,7 +302,7 @@ public:
for(int x = task.shader_x; x < task.shader_x + task.shader_w; x++) {
kernel_cpu_sse3_shader(&kg, (uint4*)task.shader_input, (float4*)task.shader_output, task.shader_eval_type, x);
- if(task_pool.cancelled())
+ if(task_pool.canceled())
break;
}
}
@@ -285,7 +310,7 @@ public:
for(int x = task.shader_x; x < task.shader_x + task.shader_w; x++) {
kernel_cpu_sse2_shader(&kg, (uint4*)task.shader_input, (float4*)task.shader_output, task.shader_eval_type, x);
- if(task_pool.cancelled())
+ if(task_pool.canceled())
break;
}
}
@@ -295,7 +320,7 @@ public:
for(int x = task.shader_x; x < task.shader_x + task.shader_w; x++) {
kernel_cpu_shader(&kg, (uint4*)task.shader_input, (float4*)task.shader_output, task.shader_eval_type, x);
- if(task_pool.cancelled())
+ if(task_pool.canceled())
break;
}
}
diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp
index ec7157aa083..4ce7f6fd729 100644
--- a/intern/cycles/device/device_cuda.cpp
+++ b/intern/cycles/device/device_cuda.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include <stdio.h>
@@ -39,13 +37,15 @@ CCL_NAMESPACE_BEGIN
class CUDADevice : public Device
{
public:
- TaskPool task_pool;
+ DedicatedTaskPool task_pool;
CUdevice cuDevice;
CUcontext cuContext;
CUmodule cuModule;
map<device_ptr, bool> tex_interp_map;
int cuDevId;
+ int cuDevArchitecture;
bool first_error;
+ bool use_texture_storage;
struct PixelMem {
GLuint cuPBO;
@@ -175,6 +175,7 @@ public:
{
first_error = true;
background = background_;
+ use_texture_storage = true;
cuDevId = info.num;
cuDevice = 0;
@@ -205,6 +206,15 @@ public:
if(cuda_error_(result, "cuCtxCreate"))
return;
+ int major, minor;
+ cuDeviceComputeCapability(&major, &minor, cuDevId);
+ cuDevArchitecture = major*100 + minor*10;
+
+ /* In order to use full 6GB of memory on Titan cards, use arrays instead
+ * of textures. On earlier cards this seems slower, but on Titan it is
+ * actually slightly faster in tests. */
+ use_texture_storage = (cuDevArchitecture < 350);
+
cuda_pop_context();
}
@@ -212,20 +222,17 @@ public:
{
task_pool.stop();
- cuda_push_context();
- cuda_assert(cuCtxDetach(cuContext))
+ cuda_assert(cuCtxDestroy(cuContext))
}
bool support_device(bool experimental)
{
- if(!experimental) {
- int major, minor;
- cuDeviceComputeCapability(&major, &minor, cuDevId);
+ int major, minor;
+ cuDeviceComputeCapability(&major, &minor, cuDevId);
- if(major < 2) {
- cuda_error_message(string_printf("CUDA device supported only with compute capability 2.0 or up, found %d.%d.", major, minor));
- return false;
- }
+ if(major < 2) {
+ cuda_error_message(string_printf("CUDA device supported only with compute capability 2.0 or up, found %d.%d.", major, minor));
+ return false;
}
return true;
@@ -277,8 +284,12 @@ public:
cuda_error_message("CUDA nvcc compiler version could not be parsed.");
return "";
}
+ if(cuda_version < 50) {
+ printf("Unsupported CUDA version %d.%d detected, you need CUDA 5.0.\n", cuda_version/10, cuda_version%10);
+ return "";
+ }
- if(cuda_version != 50)
+ else if(cuda_version > 50)
printf("CUDA version %d.%d detected, build may succeed but only CUDA 5.0 is officially supported.\n", cuda_version/10, cuda_version%10);
/* compile */
@@ -287,36 +298,14 @@ public:
const int machine = system_cpu_bits();
string arch_flags;
- /* build flags depending on CUDA version and arch */
- if(cuda_version < 50) {
- /* CUDA 4.x */
- if(major == 1) {
- /* sm_1x */
- arch_flags = "--maxrregcount=24 --opencc-options -OPT:Olimit=0";
- }
- else if(major == 2) {
- /* sm_2x */
- arch_flags = "--maxrregcount=24";
- }
- else {
- /* sm_3x */
- arch_flags = "--maxrregcount=32";
- }
+ /* CUDA 5.x build flags for different archs */
+ if(major == 2) {
+ /* sm_2x */
+ arch_flags = "--maxrregcount=32 --use_fast_math";
}
- else {
- /* CUDA 5.x */
- if(major == 1) {
- /* sm_1x */
- arch_flags = "--maxrregcount=24 --opencc-options -OPT:Olimit=0 --use_fast_math";
- }
- else if(major == 2) {
- /* sm_2x */
- arch_flags = "--maxrregcount=32 --use_fast_math";
- }
- else {
- /* sm_3x */
- arch_flags = "--maxrregcount=32 --use_fast_math";
- }
+ else if(major == 3) {
+ /* sm_3x */
+ arch_flags = "--maxrregcount=32 --use_fast_math";
}
double starttime = time_dt();
@@ -450,90 +439,118 @@ public:
CUarray_format_enum format;
size_t dsize = datatype_size(mem.data_type);
size_t size = mem.memory_size();
+ bool use_texture = interpolation || use_texture_storage;
- switch(mem.data_type) {
- case TYPE_UCHAR: format = CU_AD_FORMAT_UNSIGNED_INT8; break;
- case TYPE_UINT: format = CU_AD_FORMAT_UNSIGNED_INT32; break;
- case TYPE_INT: format = CU_AD_FORMAT_SIGNED_INT32; break;
- case TYPE_FLOAT: format = CU_AD_FORMAT_FLOAT; break;
- default: assert(0); return;
- }
-
- CUtexref texref = NULL;
-
- cuda_push_context();
- cuda_assert(cuModuleGetTexRef(&texref, cuModule, name))
-
- if(!texref) {
- cuda_pop_context();
- return;
- }
+ if(use_texture) {
- if(interpolation) {
- CUarray handle = NULL;
- CUDA_ARRAY_DESCRIPTOR desc;
+ switch(mem.data_type) {
+ case TYPE_UCHAR: format = CU_AD_FORMAT_UNSIGNED_INT8; break;
+ case TYPE_UINT: format = CU_AD_FORMAT_UNSIGNED_INT32; break;
+ case TYPE_INT: format = CU_AD_FORMAT_SIGNED_INT32; break;
+ case TYPE_FLOAT: format = CU_AD_FORMAT_FLOAT; break;
+ default: assert(0); return;
+ }
- desc.Width = mem.data_width;
- desc.Height = mem.data_height;
- desc.Format = format;
- desc.NumChannels = mem.data_elements;
+ CUtexref texref = NULL;
- cuda_assert(cuArrayCreate(&handle, &desc))
+ cuda_push_context();
+ cuda_assert(cuModuleGetTexRef(&texref, cuModule, name))
- if(!handle) {
+ if(!texref) {
cuda_pop_context();
return;
}
- if(mem.data_height > 1) {
- CUDA_MEMCPY2D param;
- memset(&param, 0, sizeof(param));
- param.dstMemoryType = CU_MEMORYTYPE_ARRAY;
- param.dstArray = handle;
- param.srcMemoryType = CU_MEMORYTYPE_HOST;
- param.srcHost = (void*)mem.data_pointer;
- param.srcPitch = mem.data_width*dsize*mem.data_elements;
- param.WidthInBytes = param.srcPitch;
- param.Height = mem.data_height;
-
- cuda_assert(cuMemcpy2D(&param))
+ if(interpolation) {
+ CUarray handle = NULL;
+ CUDA_ARRAY_DESCRIPTOR desc;
+
+ desc.Width = mem.data_width;
+ desc.Height = mem.data_height;
+ desc.Format = format;
+ desc.NumChannels = mem.data_elements;
+
+ cuda_assert(cuArrayCreate(&handle, &desc))
+
+ if(!handle) {
+ cuda_pop_context();
+ return;
+ }
+
+ if(mem.data_height > 1) {
+ CUDA_MEMCPY2D param;
+ memset(&param, 0, sizeof(param));
+ param.dstMemoryType = CU_MEMORYTYPE_ARRAY;
+ param.dstArray = handle;
+ param.srcMemoryType = CU_MEMORYTYPE_HOST;
+ param.srcHost = (void*)mem.data_pointer;
+ param.srcPitch = mem.data_width*dsize*mem.data_elements;
+ param.WidthInBytes = param.srcPitch;
+ param.Height = mem.data_height;
+
+ cuda_assert(cuMemcpy2D(&param))
+ }
+ else
+ cuda_assert(cuMemcpyHtoA(handle, 0, (void*)mem.data_pointer, size))
+
+ cuda_assert(cuTexRefSetArray(texref, handle, CU_TRSA_OVERRIDE_FORMAT))
+
+ cuda_assert(cuTexRefSetFilterMode(texref, CU_TR_FILTER_MODE_LINEAR))
+ cuda_assert(cuTexRefSetFlags(texref, CU_TRSF_NORMALIZED_COORDINATES))
+
+ mem.device_pointer = (device_ptr)handle;
+
+ stats.mem_alloc(size);
}
- else
- cuda_assert(cuMemcpyHtoA(handle, 0, (void*)mem.data_pointer, size))
+ else {
+ cuda_pop_context();
+
+ mem_alloc(mem, MEM_READ_ONLY);
+ mem_copy_to(mem);
- cuda_assert(cuTexRefSetArray(texref, handle, CU_TRSA_OVERRIDE_FORMAT))
+ cuda_push_context();
- cuda_assert(cuTexRefSetFilterMode(texref, CU_TR_FILTER_MODE_LINEAR))
- cuda_assert(cuTexRefSetFlags(texref, CU_TRSF_NORMALIZED_COORDINATES))
+ cuda_assert(cuTexRefSetAddress(NULL, texref, cuda_device_ptr(mem.device_pointer), size))
+ cuda_assert(cuTexRefSetFilterMode(texref, CU_TR_FILTER_MODE_POINT))
+ cuda_assert(cuTexRefSetFlags(texref, CU_TRSF_READ_AS_INTEGER))
+ }
- mem.device_pointer = (device_ptr)handle;
+ if(periodic) {
+ cuda_assert(cuTexRefSetAddressMode(texref, 0, CU_TR_ADDRESS_MODE_WRAP))
+ cuda_assert(cuTexRefSetAddressMode(texref, 1, CU_TR_ADDRESS_MODE_WRAP))
+ }
+ else {
+ cuda_assert(cuTexRefSetAddressMode(texref, 0, CU_TR_ADDRESS_MODE_CLAMP))
+ cuda_assert(cuTexRefSetAddressMode(texref, 1, CU_TR_ADDRESS_MODE_CLAMP))
+ }
+ cuda_assert(cuTexRefSetFormat(texref, format, mem.data_elements))
- stats.mem_alloc(size);
+ cuda_pop_context();
}
else {
- cuda_pop_context();
-
mem_alloc(mem, MEM_READ_ONLY);
mem_copy_to(mem);
cuda_push_context();
- cuda_assert(cuTexRefSetAddress(NULL, texref, cuda_device_ptr(mem.device_pointer), size))
- cuda_assert(cuTexRefSetFilterMode(texref, CU_TR_FILTER_MODE_POINT))
- cuda_assert(cuTexRefSetFlags(texref, CU_TRSF_READ_AS_INTEGER))
- }
+ CUdeviceptr cumem;
+ size_t cubytes;
- if(periodic) {
- cuda_assert(cuTexRefSetAddressMode(texref, 0, CU_TR_ADDRESS_MODE_WRAP))
- cuda_assert(cuTexRefSetAddressMode(texref, 1, CU_TR_ADDRESS_MODE_WRAP))
- }
- else {
- cuda_assert(cuTexRefSetAddressMode(texref, 0, CU_TR_ADDRESS_MODE_CLAMP))
- cuda_assert(cuTexRefSetAddressMode(texref, 1, CU_TR_ADDRESS_MODE_CLAMP))
- }
- cuda_assert(cuTexRefSetFormat(texref, format, mem.data_elements))
+ cuda_assert(cuModuleGetGlobal(&cumem, &cubytes, cuModule, name))
- cuda_pop_context();
+ if(cubytes == 8) {
+ /* 64 bit device pointer */
+ uint64_t ptr = mem.device_pointer;
+ cuda_assert(cuMemcpyHtoD(cumem, (void*)&ptr, cubytes))
+ }
+ else {
+ /* 32 bit device pointer */
+ uint32_t ptr = (uint32_t)mem.device_pointer;
+ cuda_assert(cuMemcpyHtoD(cumem, (void*)&ptr, cubytes))
+ }
+
+ cuda_pop_context();
+ }
tex_interp_map[mem.device_pointer] = interpolation;
}
@@ -558,7 +575,7 @@ public:
}
}
- void path_trace(RenderTile& rtile, int sample, bool progressive)
+ void path_trace(RenderTile& rtile, int sample, bool branched)
{
if(have_error())
return;
@@ -570,14 +587,14 @@ public:
CUdeviceptr d_rng_state = cuda_device_ptr(rtile.rng_state);
/* get kernel function */
- if(progressive)
- cuda_assert(cuModuleGetFunction(&cuPathTrace, cuModule, "kernel_cuda_path_trace_progressive"))
- else {
- cuda_assert(cuModuleGetFunction(&cuPathTrace, cuModule, "kernel_cuda_path_trace_non_progressive"))
- if(have_error())
- return;
- }
-
+ if(branched)
+ cuda_assert(cuModuleGetFunction(&cuPathTrace, cuModule, "kernel_cuda_branched_path_trace"))
+ else
+ cuda_assert(cuModuleGetFunction(&cuPathTrace, cuModule, "kernel_cuda_path_trace"))
+
+ if(have_error())
+ return;
+
/* pass in parameters */
int offset = 0;
@@ -627,7 +644,7 @@ public:
cuda_pop_context();
}
- void tonemap(DeviceTask& task, device_ptr buffer, device_ptr rgba)
+ void film_convert(DeviceTask& task, device_ptr buffer, device_ptr rgba_byte, device_ptr rgba_half)
{
if(have_error())
return;
@@ -635,11 +652,14 @@ public:
cuda_push_context();
CUfunction cuFilmConvert;
- CUdeviceptr d_rgba = map_pixels(rgba);
+ CUdeviceptr d_rgba = map_pixels((rgba_byte)? rgba_byte: rgba_half);
CUdeviceptr d_buffer = cuda_device_ptr(buffer);
/* get kernel function */
- cuda_assert(cuModuleGetFunction(&cuFilmConvert, cuModule, "kernel_cuda_tonemap"))
+ if(rgba_half)
+ cuda_assert(cuModuleGetFunction(&cuFilmConvert, cuModule, "kernel_cuda_convert_to_half_float"))
+ else
+ cuda_assert(cuModuleGetFunction(&cuFilmConvert, cuModule, "kernel_cuda_convert_to_byte"))
/* pass in parameters */
int offset = 0;
@@ -650,11 +670,11 @@ public:
cuda_assert(cuParamSetv(cuFilmConvert, offset, &d_buffer, sizeof(d_buffer)))
offset += sizeof(d_buffer);
- int sample = task.sample;
- offset = align_up(offset, __alignof(sample));
+ float sample_scale = 1.0f/(task.sample + 1);
+ offset = align_up(offset, __alignof(sample_scale));
- cuda_assert(cuParamSeti(cuFilmConvert, offset, task.sample))
- offset += sizeof(task.sample);
+ cuda_assert(cuParamSetf(cuFilmConvert, offset, sample_scale))
+ offset += sizeof(sample_scale);
cuda_assert(cuParamSeti(cuFilmConvert, offset, task.x))
offset += sizeof(task.x);
@@ -686,7 +706,7 @@ public:
cuda_assert(cuFuncSetBlockShape(cuFilmConvert, xthreads, ythreads, 1))
cuda_assert(cuLaunchGrid(cuFilmConvert, xblocks, yblocks))
- unmap_pixels(task.rgba);
+ unmap_pixels((rgba_byte)? rgba_byte: rgba_half);
cuda_pop_context();
}
@@ -773,13 +793,19 @@ public:
glGenBuffers(1, &pmem.cuPBO);
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, pmem.cuPBO);
- glBufferData(GL_PIXEL_UNPACK_BUFFER, pmem.w*pmem.h*sizeof(GLfloat)*3, NULL, GL_DYNAMIC_DRAW);
+ if(mem.data_type == TYPE_HALF)
+ glBufferData(GL_PIXEL_UNPACK_BUFFER, pmem.w*pmem.h*sizeof(GLhalf)*4, NULL, GL_DYNAMIC_DRAW);
+ else
+ glBufferData(GL_PIXEL_UNPACK_BUFFER, pmem.w*pmem.h*sizeof(uint8_t)*4, NULL, GL_DYNAMIC_DRAW);
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
glGenTextures(1, &pmem.cuTexId);
glBindTexture(GL_TEXTURE_2D, pmem.cuTexId);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, pmem.w, pmem.h, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+ if(mem.data_type == TYPE_HALF)
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F_ARB, pmem.w, pmem.h, 0, GL_RGBA, GL_HALF_FLOAT, NULL);
+ else
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, pmem.w, pmem.h, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glBindTexture(GL_TEXTURE_2D, 0);
@@ -867,11 +893,19 @@ public:
/* for multi devices, this assumes the ineffecient method that we allocate
* all pixels on the device even though we only render to a subset */
- size_t offset = sizeof(uint8_t)*4*y*w;
+ size_t offset = 4*y*w;
+
+ if(mem.data_type == TYPE_HALF)
+ offset *= sizeof(GLhalf);
+ else
+ offset *= sizeof(uint8_t);
glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, pmem.cuPBO);
glBindTexture(GL_TEXTURE_2D, pmem.cuTexId);
- glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, w, h, GL_RGBA, GL_UNSIGNED_BYTE, (void*)offset);
+ if(mem.data_type == TYPE_HALF)
+ glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, w, h, GL_RGBA, GL_HALF_FLOAT, (void*)offset);
+ else
+ glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, w, h, GL_RGBA, GL_UNSIGNED_BYTE, (void*)offset);
glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0);
glEnable(GL_TEXTURE_2D);
@@ -920,7 +954,7 @@ public:
if(task->type == DeviceTask::PATH_TRACE) {
RenderTile tile;
- bool progressive = task->integrator_progressive;
+ bool branched = task->integrator_branched;
/* keep rendering tiles until done */
while(task->acquire_tile(this, tile)) {
@@ -933,7 +967,7 @@ public:
break;
}
- path_trace(tile, sample, progressive);
+ path_trace(tile, sample, branched);
tile.sample = sample + 1;
@@ -963,9 +997,9 @@ public:
void task_add(DeviceTask& task)
{
- if(task.type == DeviceTask::TONEMAP) {
+ if(task.type == DeviceTask::FILM_CONVERT) {
/* must be done in main thread due to opengl access */
- tonemap(task, task.buffer, task.rgba);
+ film_convert(task, task.buffer, task.rgba_byte, task.rgba_half);
cuda_push_context();
cuda_assert(cuCtxSynchronize())
@@ -978,7 +1012,7 @@ public:
void task_wait()
{
- task_pool.wait_work();
+ task_pool.wait();
}
void task_cancel()
diff --git a/intern/cycles/device/device_intern.h b/intern/cycles/device/device_intern.h
index b49ebba3e8b..d667478beed 100644
--- a/intern/cycles/device/device_intern.h
+++ b/intern/cycles/device/device_intern.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __DEVICE_INTERN_H__
diff --git a/intern/cycles/device/device_memory.h b/intern/cycles/device/device_memory.h
index fd0bed33396..352a46f8c36 100644
--- a/intern/cycles/device/device_memory.h
+++ b/intern/cycles/device/device_memory.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __DEVICE_MEMORY_H__
@@ -48,7 +46,8 @@ enum DataType {
TYPE_UCHAR,
TYPE_UINT,
TYPE_INT,
- TYPE_FLOAT
+ TYPE_FLOAT,
+ TYPE_HALF
};
static inline size_t datatype_size(DataType datatype)
@@ -58,6 +57,7 @@ static inline size_t datatype_size(DataType datatype)
case TYPE_FLOAT: return sizeof(float);
case TYPE_UINT: return sizeof(uint);
case TYPE_INT: return sizeof(int);
+ case TYPE_HALF: return sizeof(half);
default: return 0;
}
}
@@ -149,6 +149,11 @@ template<> struct device_type_traits<float4> {
static const int num_elements = 4;
};
+template<> struct device_type_traits<half4> {
+ static const DataType data_type = TYPE_HALF;
+ static const int num_elements = 4;
+};
+
/* Device Memory */
class device_memory
@@ -249,7 +254,6 @@ public:
private:
array<T> data;
- bool referenced;
};
CCL_NAMESPACE_END
diff --git a/intern/cycles/device/device_multi.cpp b/intern/cycles/device/device_multi.cpp
index 807bfe578f3..4df0fdbd4c7 100644
--- a/intern/cycles/device/device_multi.cpp
+++ b/intern/cycles/device/device_multi.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include <stdlib.h>
@@ -263,7 +261,6 @@ public:
if(sub.device == sub_device) {
if(tile.buffer) tile.buffer = sub.ptr_map[tile.buffer];
if(tile.rng_state) tile.rng_state = sub.ptr_map[tile.rng_state];
- if(tile.rgba) tile.rgba = sub.ptr_map[tile.rgba];
}
}
}
@@ -292,7 +289,8 @@ public:
tasks.pop_front();
if(task.buffer) subtask.buffer = sub.ptr_map[task.buffer];
- if(task.rgba) subtask.rgba = sub.ptr_map[task.rgba];
+ if(task.rgba_byte) subtask.rgba_byte = sub.ptr_map[task.rgba_byte];
+ if(task.rgba_half) subtask.rgba_half = sub.ptr_map[task.rgba_half];
if(task.shader_input) subtask.shader_input = sub.ptr_map[task.shader_input];
if(task.shader_output) subtask.shader_output = sub.ptr_map[task.shader_output];
diff --git a/intern/cycles/device/device_network.cpp b/intern/cycles/device/device_network.cpp
index 201f04bc5d8..23c1a10fa0a 100644
--- a/intern/cycles/device/device_network.cpp
+++ b/intern/cycles/device/device_network.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "device.h"
@@ -410,7 +408,8 @@ protected:
rcv.read(task);
if(task.buffer) task.buffer = ptr_map[task.buffer];
- if(task.rgba) task.rgba = ptr_map[task.rgba];
+ if(task.rgba_byte) task.rgba_byte = ptr_map[task.rgba_byte];
+ if(task.rgba_half) task.rgba_half = ptr_map[task.rgba_half];
if(task.shader_input) task.shader_input = ptr_map[task.shader_input];
if(task.shader_output) task.shader_output = ptr_map[task.shader_output];
@@ -450,7 +449,6 @@ protected:
if(tile.buffer) tile.buffer = ptr_map[tile.buffer];
if(tile.rng_state) tile.rng_state = ptr_map[tile.rng_state];
- if(tile.rgba) tile.rgba = ptr_map[tile.rgba];
result = true;
break;
@@ -480,7 +478,6 @@ protected:
if(tile.buffer) tile.buffer = ptr_imap[tile.buffer];
if(tile.rng_state) tile.rng_state = ptr_imap[tile.rng_state];
- if(tile.rgba) tile.rgba = ptr_imap[tile.rgba];
RPCSend snd(socket, "release_tile");
snd.add(tile);
diff --git a/intern/cycles/device/device_network.h b/intern/cycles/device/device_network.h
index 10b8dadc35d..db399cf4240 100644
--- a/intern/cycles/device/device_network.h
+++ b/intern/cycles/device/device_network.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __DEVICE_NETWORK_H__
@@ -96,7 +94,7 @@ public:
int type = (int)task.type;
archive & type & task.x & task.y & task.w & task.h;
- archive & task.rgba & task.buffer & task.sample & task.num_samples;
+ archive & task.rgba_byte & task.rgba_half & task.buffer & task.sample & task.num_samples;
archive & task.offset & task.stride;
archive & task.shader_input & task.shader_output & task.shader_eval_type;
archive & task.shader_x & task.shader_w;
@@ -107,7 +105,7 @@ public:
archive & tile.x & tile.y & tile.w & tile.h;
archive & tile.start_sample & tile.num_samples & tile.sample;
archive & tile.offset & tile.stride;
- archive & tile.buffer & tile.rng_state & tile.rgba;
+ archive & tile.buffer & tile.rng_state;
}
void write()
@@ -236,7 +234,7 @@ public:
int type;
*archive & type & task.x & task.y & task.w & task.h;
- *archive & task.rgba & task.buffer & task.sample & task.num_samples;
+ *archive & task.rgba_byte & task.rgba_half & task.buffer & task.sample & task.num_samples;
*archive & task.resolution & task.offset & task.stride;
*archive & task.shader_input & task.shader_output & task.shader_eval_type;
*archive & task.shader_x & task.shader_w;
@@ -249,7 +247,7 @@ public:
*archive & tile.x & tile.y & tile.w & tile.h;
*archive & tile.start_sample & tile.num_samples & tile.sample;
*archive & tile.resolution & tile.offset & tile.stride;
- *archive & tile.buffer & tile.rng_state & tile.rgba;
+ *archive & tile.buffer & tile.rng_state & tile.rgba_byte & tile.rgba_half;
tile.buffers = NULL;
}
diff --git a/intern/cycles/device/device_opencl.cpp b/intern/cycles/device/device_opencl.cpp
index a127bd9e5d1..11c7bc6f099 100644
--- a/intern/cycles/device/device_opencl.cpp
+++ b/intern/cycles/device/device_opencl.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifdef WITH_OPENCL
@@ -316,14 +314,15 @@ public:
class OpenCLDevice : public Device
{
public:
- TaskPool task_pool;
+ DedicatedTaskPool task_pool;
cl_context cxContext;
cl_command_queue cqCommandQueue;
cl_platform_id cpPlatform;
cl_device_id cdDevice;
cl_program cpProgram;
cl_kernel ckPathTraceKernel;
- cl_kernel ckFilmConvertKernel;
+ cl_kernel ckFilmConvertByteKernel;
+ cl_kernel ckFilmConvertHalfFloatKernel;
cl_kernel ckShaderKernel;
cl_int ciErr;
@@ -433,7 +432,8 @@ public:
cqCommandQueue = NULL;
cpProgram = NULL;
ckPathTraceKernel = NULL;
- ckFilmConvertKernel = NULL;
+ ckFilmConvertByteKernel = NULL;
+ ckFilmConvertHalfFloatKernel = NULL;
ckShaderKernel = NULL;
null_mem = 0;
device_initialized = false;
@@ -764,7 +764,11 @@ public:
if(opencl_error(ciErr))
return false;
- ckFilmConvertKernel = clCreateKernel(cpProgram, "kernel_ocl_tonemap", &ciErr);
+ ckFilmConvertByteKernel = clCreateKernel(cpProgram, "kernel_ocl_convert_to_byte", &ciErr);
+ if(opencl_error(ciErr))
+ return false;
+
+ ckFilmConvertHalfFloatKernel = clCreateKernel(cpProgram, "kernel_ocl_convert_to_half_float", &ciErr);
if(opencl_error(ciErr))
return false;
@@ -790,8 +794,10 @@ public:
if(ckPathTraceKernel)
clReleaseKernel(ckPathTraceKernel);
- if(ckFilmConvertKernel)
- clReleaseKernel(ckFilmConvertKernel);
+ if(ckFilmConvertByteKernel)
+ clReleaseKernel(ckFilmConvertByteKernel);
+ if(ckFilmConvertHalfFloatKernel)
+ clReleaseKernel(ckFilmConvertHalfFloatKernel);
if(cpProgram)
clReleaseProgram(cpProgram);
if(cqCommandQueue)
@@ -886,8 +892,16 @@ public:
void tex_free(device_memory& mem)
{
- if(mem.data_pointer)
+ if(mem.device_pointer) {
+ foreach(const MemMap::value_type& value, mem_map) {
+ if(value.second == mem.device_pointer) {
+ mem_map.erase(value.first);
+ break;
+ }
+ }
+
mem_free(mem);
+ }
}
size_t global_size_round_up(int group_size, int global_size)
@@ -982,17 +996,17 @@ public:
return err;
}
- void tonemap(DeviceTask& task, device_ptr buffer, device_ptr rgba)
+ void film_convert(DeviceTask& task, device_ptr buffer, device_ptr rgba_byte, device_ptr rgba_half)
{
/* cast arguments to cl types */
cl_mem d_data = CL_MEM_PTR(const_mem_map["__data"]->device_pointer);
- cl_mem d_rgba = CL_MEM_PTR(rgba);
+ cl_mem d_rgba = (rgba_byte)? CL_MEM_PTR(rgba_byte): CL_MEM_PTR(rgba_half);
cl_mem d_buffer = CL_MEM_PTR(buffer);
cl_int d_x = task.x;
cl_int d_y = task.y;
cl_int d_w = task.w;
cl_int d_h = task.h;
- cl_int d_sample = task.sample;
+ cl_float d_sample_scale = 1.0f/(task.sample + 1);
cl_int d_offset = task.offset;
cl_int d_stride = task.stride;
@@ -1000,6 +1014,8 @@ public:
cl_uint narg = 0;
ciErr = 0;
+ cl_kernel ckFilmConvertKernel = (rgba_byte)? ckFilmConvertByteKernel: ckFilmConvertHalfFloatKernel;
+
ciErr |= clSetKernelArg(ckFilmConvertKernel, narg++, sizeof(d_data), (void*)&d_data);
ciErr |= clSetKernelArg(ckFilmConvertKernel, narg++, sizeof(d_rgba), (void*)&d_rgba);
ciErr |= clSetKernelArg(ckFilmConvertKernel, narg++, sizeof(d_buffer), (void*)&d_buffer);
@@ -1008,7 +1024,7 @@ public:
ciErr |= set_kernel_arg_mem(ckFilmConvertKernel, &narg, #name);
#include "kernel_textures.h"
- ciErr |= clSetKernelArg(ckFilmConvertKernel, narg++, sizeof(d_sample), (void*)&d_sample);
+ ciErr |= clSetKernelArg(ckFilmConvertKernel, narg++, sizeof(d_sample_scale), (void*)&d_sample_scale);
ciErr |= clSetKernelArg(ckFilmConvertKernel, narg++, sizeof(d_x), (void*)&d_x);
ciErr |= clSetKernelArg(ckFilmConvertKernel, narg++, sizeof(d_y), (void*)&d_y);
ciErr |= clSetKernelArg(ckFilmConvertKernel, narg++, sizeof(d_w), (void*)&d_w);
@@ -1054,8 +1070,8 @@ public:
void thread_run(DeviceTask *task)
{
- if(task->type == DeviceTask::TONEMAP) {
- tonemap(*task, task->buffer, task->rgba);
+ if(task->type == DeviceTask::FILM_CONVERT) {
+ film_convert(*task, task->buffer, task->rgba_byte, task->rgba_half);
}
else if(task->type == DeviceTask::SHADER) {
shader(*task);
@@ -1078,7 +1094,7 @@ public:
tile.sample = sample + 1;
- //task->update_progress(tile);
+ task->update_progress(tile);
}
task->release_tile(tile);
@@ -1102,7 +1118,7 @@ public:
void task_wait()
{
- task_pool.wait_work();
+ task_pool.wait();
}
void task_cancel()
diff --git a/intern/cycles/device/device_task.cpp b/intern/cycles/device/device_task.cpp
index ad5ff841963..7d0eeab780d 100644
--- a/intern/cycles/device/device_task.cpp
+++ b/intern/cycles/device/device_task.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include <stdlib.h>
@@ -29,7 +27,7 @@ CCL_NAMESPACE_BEGIN
/* Device Task */
DeviceTask::DeviceTask(Type type_)
-: type(type_), x(0), y(0), w(0), h(0), rgba(0), buffer(0),
+: type(type_), x(0), y(0), w(0), h(0), rgba_byte(0), rgba_half(0), buffer(0),
sample(0), num_samples(1),
shader_input(0), shader_output(0),
shader_eval_type(0), shader_x(0), shader_w(0)
diff --git a/intern/cycles/device/device_task.h b/intern/cycles/device/device_task.h
index 46226b8856f..c1bd39b70ca 100644
--- a/intern/cycles/device/device_task.h
+++ b/intern/cycles/device/device_task.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __DEVICE_TASK_H__
@@ -36,11 +34,12 @@ class Tile;
class DeviceTask : public Task {
public:
- typedef enum { PATH_TRACE, TONEMAP, SHADER } Type;
+ typedef enum { PATH_TRACE, FILM_CONVERT, SHADER } Type;
Type type;
int x, y, w, h;
- device_ptr rgba;
+ device_ptr rgba_byte;
+ device_ptr rgba_half;
device_ptr buffer;
int sample;
int num_samples;
@@ -65,7 +64,7 @@ public:
boost::function<bool(void)> get_cancel;
bool need_finish_queue;
- bool integrator_progressive;
+ bool integrator_branched;
protected:
double last_update_time;
};
diff --git a/intern/cycles/doc/license/Blender.txt b/intern/cycles/doc/license/Blender.txt
deleted file mode 100644
index 35aa258f229..00000000000
--- a/intern/cycles/doc/license/Blender.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software Foundation,
-Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-Contributor(s): Alfredo de Greef, Blender Foundation
-
diff --git a/intern/cycles/doc/license/CMakeLists.txt b/intern/cycles/doc/license/CMakeLists.txt
index bc11a9eb35b..2f8fe92ad5c 100644
--- a/intern/cycles/doc/license/CMakeLists.txt
+++ b/intern/cycles/doc/license/CMakeLists.txt
@@ -1,8 +1,6 @@
set(LICENSES
Apache_2.0.txt
- Blender.txt
- GPL.txt
ILM.txt
NVidia.txt
OSL.txt
diff --git a/intern/cycles/doc/license/GPL.txt b/intern/cycles/doc/license/GPL.txt
deleted file mode 100644
index 00e618b783e..00000000000
--- a/intern/cycles/doc/license/GPL.txt
+++ /dev/null
@@ -1,342 +0,0 @@
-
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
-
diff --git a/intern/cycles/doc/license/readme.txt b/intern/cycles/doc/license/readme.txt
index 51494700f25..4c56c90a0f1 100644
--- a/intern/cycles/doc/license/readme.txt
+++ b/intern/cycles/doc/license/readme.txt
@@ -1,12 +1,16 @@
-This program uses code from various sources. These are the licenses:
-
-* New code is licensed under the GPL license v2 or later.
-* BVH building and traversal code is licensed under Apache License v2.
-* Approximate Catmull Clark subdivision code is licensed under the MIT license.
-* Open Shading Language code on GPU is licensed under the Modified BSD license.
-* Sobol direction vectors are licensed under the Modified BSD license.
-* Matrix code adapted from OpenEXR under the Modified BSD license.
-* Procedural texture functions from Blender are licensed under GPL v2 or later.
-* Boost and OpenCL dynamic loading under Boost License.
+This program uses code from various sources, the default license is Apache 2.0
+for all code, with the following exceptions.
+
+Modified BSD License
+* Code adapated from Open Shading Language
+* Sobol direction vectors
+* Matrix inversion code from OpenEXR
+* MD5 Hash code
+
+MIT license
+* Approximate Catmull Clark subdivision code
+
+Boost License
+* Boost and OpenCL dynamic loading
diff --git a/intern/cycles/kernel/CMakeLists.txt b/intern/cycles/kernel/CMakeLists.txt
index 963ec652784..56ba0e08743 100644
--- a/intern/cycles/kernel/CMakeLists.txt
+++ b/intern/cycles/kernel/CMakeLists.txt
@@ -22,6 +22,7 @@ set(SRC_HEADERS
kernel.h
kernel_accumulate.h
kernel_bvh.h
+ kernel_bvh_subsurface.h
kernel_bvh_traversal.h
kernel_camera.h
kernel_compat_cpu.h
@@ -40,6 +41,7 @@ set(SRC_HEADERS
kernel_object.h
kernel_passes.h
kernel_path.h
+ kernel_path_state.h
kernel_primitive.h
kernel_projection.h
kernel_random.h
@@ -65,6 +67,7 @@ set(SRC_CLOSURE_HEADERS
closure/bsdf_util.h
closure/bsdf_ward.h
closure/bsdf_westin.h
+ closure/bsdf_hair.h
closure/bssrdf.h
closure/emissive.h
closure/volume.h
@@ -148,36 +151,16 @@ if(WITH_CYCLES_CUDA_BINARIES)
set(cuda_version_flags "-D__KERNEL_CUDA_VERSION__=${CUDA_VERSION}")
- # build flags depending on CUDA version and arch
- if(CUDA_VERSION LESS 50)
- # CUDA 4.x
- if(${arch} MATCHES "sm_1[0-9]")
- # sm_1x
- set(cuda_arch_flags "--maxrregcount=24 --opencc-options -OPT:Olimit=0")
- elseif(${arch} MATCHES "sm_2[0-9]")
- # sm_2x
- set(cuda_arch_flags "--maxrregcount=24")
- else()
- # sm_3x
- set(cuda_arch_flags "--maxrregcount=32")
- endif()
-
- set(cuda_math_flags "")
- else()
- # CUDA 5.x
- if(${arch} MATCHES "sm_1[0-9]")
- # sm_1x
- set(cuda_arch_flags "--maxrregcount=24 --opencc-options -OPT:Olimit=0")
- elseif(${arch} MATCHES "sm_2[0-9]")
- # sm_2x
- set(cuda_arch_flags "--maxrregcount=32")
- else()
- # sm_3x
- set(cuda_arch_flags "--maxrregcount=32")
- endif()
-
- set(cuda_math_flags "--use_fast_math")
+ # CUDA 5.x build flags for different archs
+ if(${arch} MATCHES "sm_2[0-9]")
+ # sm_2x
+ set(cuda_arch_flags "--maxrregcount=32")
+ elseif(${arch} MATCHES "sm_3[0-9]")
+ # sm_3x
+ set(cuda_arch_flags "--maxrregcount=32")
endif()
+
+ set(cuda_math_flags "--use_fast_math")
if(CUDA_VERSION LESS 50 AND ${arch} MATCHES "sm_35")
message(WARNING "Can't build kernel for CUDA sm_35 architecture, skipping")
diff --git a/intern/cycles/kernel/SConscript b/intern/cycles/kernel/SConscript
index 6459c3ed183..a0522d9ba8e 100644
--- a/intern/cycles/kernel/SConscript
+++ b/intern/cycles/kernel/SConscript
@@ -86,33 +86,13 @@ if env['WITH_BF_CYCLES_CUDA_BINARIES']:
for arch in cuda_archs:
cubin_file = os.path.join(build_dir, "kernel_%s.cubin" % arch)
- # build flags depending on CUDA version and arch
- if cuda_version < 50:
- if arch == "sm_35":
- print("Can't build kernel for CUDA sm_35 architecture, skipping")
- continue
-
- # CUDA 4.x
- if arch.startswith("sm_1"):
- # sm_1x
- cuda_arch_flags = "--maxrregcount=24 --opencc-options -OPT:Olimit=0"
- elif arch.startswith("sm_2"):
- # sm_2x
- cuda_arch_flags = "--maxrregcount=24"
- else:
- # sm_3x
- cuda_arch_flags = "--maxrregcount=32"
- else:
- # CUDA 5.x
- if arch.startswith("sm_1"):
- # sm_1x
- cuda_arch_flags = "--maxrregcount=24 --opencc-options -OPT:Olimit=0 --use_fast_math"
- elif arch.startswith("sm_2"):
- # sm_2x
- cuda_arch_flags = "--maxrregcount=32 --use_fast_math"
- else:
- # sm_3x
- cuda_arch_flags = "--maxrregcount=32 --use_fast_math"
+ # CUDA 5.x build flags for different archs
+ if arch.startswith("sm_2"):
+ # sm_2x
+ cuda_arch_flags = "--maxrregcount=32 --use_fast_math"
+ elif arch.startswith("sm_3"):
+ # sm_3x
+ cuda_arch_flags = "--maxrregcount=32 --use_fast_math"
command = "\"%s\" -arch=%s %s %s \"%s\" -o \"%s\"" % (nvcc, arch, nvcc_flags, cuda_arch_flags, kernel_file, cubin_file)
diff --git a/intern/cycles/kernel/closure/bsdf.h b/intern/cycles/kernel/closure/bsdf.h
index 5e7b845059d..86fea48760f 100644
--- a/intern/cycles/kernel/closure/bsdf.h
+++ b/intern/cycles/kernel/closure/bsdf.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "../closure/bsdf_ashikhmin_velvet.h"
@@ -30,7 +28,10 @@
#endif
#include "../closure/bsdf_westin.h"
#include "../closure/bsdf_toon.h"
+#include "../closure/bsdf_hair.h"
+#ifdef __SUBSURFACE__
#include "../closure/bssrdf.h"
+#endif
CCL_NAMESPACE_BEGIN
@@ -114,6 +115,14 @@ __device int bsdf_sample(KernelGlobals *kg, const ShaderData *sd, const ShaderCl
label = bsdf_westin_sheen_sample(sc, sd->Ng, sd->I, sd->dI.dx, sd->dI.dy, randu, randv,
eval, omega_in, &domega_in->dx, &domega_in->dy, pdf);
break;
+ case CLOSURE_BSDF_HAIR_REFLECTION_ID:
+ label = bsdf_hair_reflection_sample(sc, sd->Ng, sd->I, sd->dI.dx, sd->dI.dy, randu, randv,
+ eval, omega_in, &domega_in->dx, &domega_in->dy, pdf);
+ break;
+ case CLOSURE_BSDF_HAIR_TRANSMISSION_ID:
+ label = bsdf_hair_transmission_sample(sc, sd->Ng, sd->I, sd->dI.dx, sd->dI.dy, randu, randv,
+ eval, omega_in, &domega_in->dx, &domega_in->dy, pdf);
+ break;
#endif
default:
label = LABEL_NONE;
@@ -188,6 +197,12 @@ __device float3 bsdf_eval(KernelGlobals *kg, const ShaderData *sd, const ShaderC
case CLOSURE_BSDF_WESTIN_SHEEN_ID:
eval = bsdf_westin_sheen_eval_reflect(sc, sd->I, omega_in, pdf);
break;
+ case CLOSURE_BSDF_HAIR_REFLECTION_ID:
+ eval = bsdf_hair_reflection_eval_reflect(sc, sd->I, omega_in, pdf);
+ break;
+ case CLOSURE_BSDF_HAIR_TRANSMISSION_ID:
+ eval = bsdf_hair_transmission_eval_reflect(sc, sd->I, omega_in, pdf);
+ break;
#endif
default:
eval = make_float3(0.0f, 0.0f, 0.0f);
@@ -244,6 +259,12 @@ __device float3 bsdf_eval(KernelGlobals *kg, const ShaderData *sd, const ShaderC
case CLOSURE_BSDF_WESTIN_SHEEN_ID:
eval = bsdf_westin_sheen_eval_transmit(sc, sd->I, omega_in, pdf);
break;
+ case CLOSURE_BSDF_HAIR_REFLECTION_ID:
+ eval = bsdf_hair_reflection_eval_transmit(sc, sd->I, omega_in, pdf);
+ break;
+ case CLOSURE_BSDF_HAIR_TRANSMISSION_ID:
+ eval = bsdf_hair_transmission_eval_transmit(sc, sd->I, omega_in, pdf);
+ break;
#endif
default:
eval = make_float3(0.0f, 0.0f, 0.0f);
@@ -318,6 +339,10 @@ __device void bsdf_blur(KernelGlobals *kg, ShaderClosure *sc, float roughness)
case CLOSURE_BSDF_WESTIN_SHEEN_ID:
bsdf_westin_sheen_blur(sc, roughness);
break;
+ case CLOSURE_BSDF_HAIR_REFLECTION_ID:
+ case CLOSURE_BSDF_HAIR_TRANSMISSION_ID:
+ bsdf_hair_reflection_blur(sc, roughness);
+ break;
#endif
default:
break;
diff --git a/intern/cycles/kernel/closure/bsdf_hair.h b/intern/cycles/kernel/closure/bsdf_hair.h
new file mode 100644
index 00000000000..5825d2637ba
--- /dev/null
+++ b/intern/cycles/kernel/closure/bsdf_hair.h
@@ -0,0 +1,279 @@
+/*
+ * Adapted from Open Shading Language with this license:
+ *
+ * Copyright (c) 2009-2010 Sony Pictures Imageworks Inc., et al.
+ * All Rights Reserved.
+ *
+ * Modifications Copyright 2011, Blender Foundation.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Sony Pictures Imageworks nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef __BSDF_HAIR_H__
+#define __BSDF_HAIR_H__
+
+CCL_NAMESPACE_BEGIN
+
+
+__device void bsdf_hair_reflection_blur(ShaderClosure *sc, float roughness)
+{
+}
+
+__device void bsdf_hair_transmission_blur(ShaderClosure *sc, float roughness)
+{
+}
+
+__device int bsdf_hair_reflection_setup(ShaderClosure *sc)
+{
+ sc->type = CLOSURE_BSDF_HAIR_REFLECTION_ID;
+ sc->data0 = clamp(sc->data0, 0.001f, 1.0f);
+ sc->data1 = clamp(sc->data1, 0.001f, 1.0f);
+ return SD_BSDF|SD_BSDF_HAS_EVAL|SD_BSDF_GLOSSY;
+}
+
+__device int bsdf_hair_transmission_setup(ShaderClosure *sc)
+{
+ sc->type = CLOSURE_BSDF_HAIR_TRANSMISSION_ID;
+ sc->data0 = clamp(sc->data0, 0.001f, 1.0f);
+ sc->data1 = clamp(sc->data1, 0.001f, 1.0f);
+ return SD_BSDF|SD_BSDF_HAS_EVAL|SD_BSDF_GLOSSY;
+}
+
+__device float3 bsdf_hair_reflection_eval_reflect(const ShaderClosure *sc, const float3 I, const float3 omega_in, float *pdf)
+{
+#ifdef __HAIR__
+ float offset = sc->offset;
+ float3 Tg = sc->T;
+#else
+ float offset = 0.0f;
+ float3 Tg = make_float3(1.0f, 0.0f, 0.0f);
+#endif
+ float roughness1 = sc->data0;
+ float roughness2 = sc->data1;
+
+ float Iz = dot(Tg, I);
+ float3 locy = normalize(I - Tg * Iz);
+ //float3 locx = cross(locy, Tg);
+
+ float theta_r = M_PI_2_F - safe_acosf(Iz);
+
+ float omega_in_z = dot(Tg, omega_in);
+ float3 omega_in_y = normalize(omega_in - Tg * omega_in_z);
+
+ float theta_i = M_PI_2_F - safe_acosf(omega_in_z);
+ float cosphi_i = dot(omega_in_y, locy);
+
+ if(M_PI_2_F - fabsf(theta_i) < 0.001f || cosphi_i < 0.0f){
+ *pdf = 0.0f;
+ return make_float3(*pdf, *pdf, *pdf);
+ }
+
+ float phi_i = safe_acosf(cosphi_i) / roughness2;
+ phi_i = fabsf(phi_i) < M_PI_F ? phi_i : M_PI_F;
+ float costheta_i = cosf(theta_i);
+
+ float a_R = atan2f(((M_PI_2_F + theta_r) * 0.5f - offset) / roughness1, 1.0f);
+ float b_R = atan2f(((-M_PI_2_F + theta_r) * 0.5f - offset) / roughness1, 1.0f);
+
+ float theta_h = (theta_i + theta_r) * 0.5f;
+ float t = theta_h - offset;
+
+ float phi_pdf = cos(phi_i * 0.5f) * 0.25f / roughness2;
+ float theta_pdf = roughness1 / (2 * (t*t + roughness1*roughness1) * (a_R - b_R)* costheta_i);
+ *pdf = phi_pdf * theta_pdf;
+
+ return make_float3(*pdf, *pdf, *pdf);
+}
+
+__device float3 bsdf_hair_transmission_eval_reflect(const ShaderClosure *sc, const float3 I, const float3 omega_in, float *pdf)
+{
+ return make_float3(0.0f, 0.0f, 0.0f);
+}
+
+
+__device float3 bsdf_hair_reflection_eval_transmit(const ShaderClosure *sc, const float3 I, const float3 omega_in, float *pdf)
+{
+ return make_float3(0.0f, 0.0f, 0.0f);
+}
+
+__device float3 bsdf_hair_transmission_eval_transmit(const ShaderClosure *sc, const float3 I, const float3 omega_in, float *pdf)
+{
+#ifdef __HAIR__
+ float offset = sc->offset;
+ float3 Tg = sc->T;
+#else
+ float offset = 0.0f;
+ float3 Tg = make_float3(1.0f, 0.0f, 0.0f);
+#endif
+ float roughness1 = sc->data0;
+ float roughness2 = sc->data1;
+ float Iz = dot(Tg, I);
+ float3 locy = normalize(I - Tg * Iz);
+ //float3 locx = cross(locy, Tg);
+
+ float theta_r = M_PI_2_F - safe_acosf(Iz);
+
+ float omega_in_z = dot(Tg, omega_in);
+ float3 omega_in_y = normalize(omega_in - Tg * omega_in_z);
+
+ float theta_i = M_PI_2_F - safe_acosf(omega_in_z);
+ float phi_i = safe_acosf(dot(omega_in_y, locy));
+
+ if(M_PI_2_F - fabsf(theta_i) < 0.001f){
+ *pdf = 0.0f;
+ return make_float3(*pdf, *pdf, *pdf);
+ }
+
+ float costheta_i = cosf(theta_i);
+
+ float a_TT = atan2f(((M_PI_2_F + theta_r)/2 - offset) / roughness1, 1.0f);
+ float b_TT = atan2f(((-M_PI_2_F + theta_r)/2 - offset) / roughness1, 1.0f);
+ float c_TT = 2 * atan2f(M_PI_2_F / roughness2, 1.0f);
+
+ float theta_h = (theta_i + theta_r) / 2;
+ float t = theta_h - offset;
+ float phi = fabsf(phi_i);
+
+ float p = M_PI_F - phi;
+ float theta_pdf = roughness1 / (2 * (t*t + roughness1 * roughness1) * (a_TT - b_TT)*costheta_i);
+ float phi_pdf = roughness2 / (c_TT * (p * p + roughness2 * roughness2));
+
+ *pdf = phi_pdf * theta_pdf;
+ return make_float3(*pdf, *pdf, *pdf);
+}
+
+__device int bsdf_hair_reflection_sample(const ShaderClosure *sc, float3 Ng, float3 I, float3 dIdx, float3 dIdy, float randu, float randv, float3 *eval, float3 *omega_in, float3 *domega_in_dx, float3 *domega_in_dy, float *pdf)
+{
+#ifdef __HAIR__
+ float offset = sc->offset;
+ float3 Tg = sc->T;
+#else
+ float offset = 0.0f;
+ float3 Tg = make_float3(1.0f, 0.0f, 0.0f);
+#endif
+ float roughness1 = sc->data0;
+ float roughness2 = sc->data1;
+ float Iz = dot(Tg, I);
+ float3 locy = normalize(I - Tg * Iz);
+ float3 locx = cross(locy, Tg);
+ float theta_r = M_PI_2_F - safe_acosf(Iz);
+
+ float a_R = atan2f(((M_PI_2_F + theta_r) * 0.5f - offset) / roughness1, 1.0f);
+ float b_R = atan2f(((-M_PI_2_F + theta_r) * 0.5f - offset) / roughness1, 1.0f);
+
+ float t = roughness1 * tanf(randu * (a_R - b_R) + b_R);
+
+ float theta_h = t + offset;
+ float theta_i = 2 * theta_h - theta_r;
+ float costheta_i = cosf(theta_i);
+ float sintheta_i = sinf(theta_i);
+
+ float phi = 2 * safe_asinf(1 - 2 * randv) * roughness2;
+
+ float phi_pdf = cos(phi * 0.5f) * 0.25f / roughness2;
+
+ float theta_pdf = roughness1 / (2 * (t*t + roughness1*roughness1) * (a_R - b_R)*costheta_i);
+
+ *omega_in =(cosf(phi) * costheta_i) * locy -
+ (sinf(phi) * costheta_i) * locx +
+ ( sintheta_i) * Tg;
+
+ //differentials - TODO: find a better approximation for the reflective bounce
+#ifdef __RAY_DIFFERENTIALS__
+ *domega_in_dx = 2 * dot(locy, dIdx) * locy - dIdx;
+ *domega_in_dy = 2 * dot(locy, dIdy) * locy - dIdy;
+#endif
+
+ *pdf = fabsf(phi_pdf * theta_pdf);
+ if(M_PI_2_F - fabsf(theta_i) < 0.001f)
+ *pdf = 0.0f;
+
+ *eval = make_float3(*pdf, *pdf, *pdf);
+
+ if(dot(locy, *omega_in) < 0.0f) {
+ return LABEL_REFLECT|LABEL_TRANSMIT|LABEL_GLOSSY;
+ }
+
+ return LABEL_REFLECT|LABEL_GLOSSY;
+}
+
+__device int bsdf_hair_transmission_sample(const ShaderClosure *sc, float3 Ng, float3 I, float3 dIdx, float3 dIdy, float randu, float randv, float3 *eval, float3 *omega_in, float3 *domega_in_dx, float3 *domega_in_dy, float *pdf)
+{
+#ifdef __HAIR__
+ float offset = sc->offset;
+ float3 Tg = sc->T;
+#else
+ float offset = 0.0f;
+ float3 Tg = make_float3(1.0f, 0.0f, 0.0f);
+#endif
+ float roughness1 = sc->data0;
+ float roughness2 = sc->data1;
+ float Iz = dot(Tg, I);
+ float3 locy = normalize(I - Tg * Iz);
+ float3 locx = cross(locy, Tg);
+ float theta_r = M_PI_2_F - safe_acosf(Iz);
+
+ float a_TT = atan2f(((M_PI_2_F + theta_r)/2 - offset) / roughness1, 1.0f);
+ float b_TT = atan2f(((-M_PI_2_F + theta_r)/2 - offset) / roughness1, 1.0f);
+ float c_TT = 2 * atan2f(M_PI_2_F / roughness2, 1.0f);
+
+ float t = roughness1 * tanf(randu * (a_TT - b_TT) + b_TT);
+
+ float theta_h = t + offset;
+ float theta_i = 2 * theta_h - theta_r;
+ float costheta_i = cosf(theta_i);
+ float sintheta_i = sinf(theta_i);
+
+ float p = roughness2 * tanf(c_TT * (randv - 0.5f));
+ float phi = p + M_PI_F;
+ float theta_pdf = roughness1 / (2 * (t*t + roughness1*roughness1) * (a_TT - b_TT) * costheta_i);
+ float phi_pdf = roughness2 / (c_TT * (p * p + roughness2 * roughness2));
+
+ *omega_in =(cosf(phi) * costheta_i) * locy -
+ (sinf(phi) * costheta_i) * locx +
+ ( sintheta_i) * Tg;
+
+ //differentials - TODO: find a better approximation for the transmission bounce
+#ifdef __RAY_DIFFERENTIALS__
+ *domega_in_dx = 2 * dot(locy, dIdx) * locy - dIdx;
+ *domega_in_dy = 2 * dot(locy, dIdy) * locy - dIdy;
+#endif
+
+ *pdf = fabsf(phi_pdf * theta_pdf);
+ if(M_PI_2_F - fabsf(theta_i) < 0.001f){
+ *pdf = 0.0f;
+ }
+
+ *eval = make_float3(*pdf, *pdf, *pdf);
+
+ if(dot(locy, *omega_in) < 0.0f)
+ return LABEL_TRANSMIT|LABEL_GLOSSY;
+
+ return LABEL_GLOSSY;
+}
+
+CCL_NAMESPACE_END
+
+#endif /* __BSDF_HAIR_H__ */
+
diff --git a/intern/cycles/kernel/closure/bsdf_microfacet.h b/intern/cycles/kernel/closure/bsdf_microfacet.h
index 915b9eafbc1..b159f585831 100644
--- a/intern/cycles/kernel/closure/bsdf_microfacet.h
+++ b/intern/cycles/kernel/closure/bsdf_microfacet.h
@@ -37,11 +37,6 @@ CCL_NAMESPACE_BEGIN
/* GGX */
-__device_inline float safe_sqrtf(float f)
-{
- return sqrtf(max(f, 0.0f));
-}
-
__device int bsdf_microfacet_ggx_setup(ShaderClosure *sc)
{
sc->data0 = clamp(sc->data0, 0.0f, 1.0f); /* m_ag */
diff --git a/intern/cycles/kernel/closure/bsdf_oren_nayar.h b/intern/cycles/kernel/closure/bsdf_oren_nayar.h
index 770f06dddc5..c6c6811c007 100644
--- a/intern/cycles/kernel/closure/bsdf_oren_nayar.h
+++ b/intern/cycles/kernel/closure/bsdf_oren_nayar.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __BSDF_OREN_NAYAR_H__
diff --git a/intern/cycles/kernel/closure/bssrdf.h b/intern/cycles/kernel/closure/bssrdf.h
index 486de4ca65f..4ceff655dd5 100644
--- a/intern/cycles/kernel/closure/bssrdf.h
+++ b/intern/cycles/kernel/closure/bssrdf.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2013, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __KERNEL_BSSRDF_H__
@@ -21,130 +19,227 @@
CCL_NAMESPACE_BEGIN
-__device int bssrdf_setup(ShaderClosure *sc)
+__device int bssrdf_setup(ShaderClosure *sc, ClosureType type)
{
if(sc->data0 < BSSRDF_MIN_RADIUS) {
/* revert to diffuse BSDF if radius too small */
sc->data0 = 0.0f;
sc->data1 = 0.0f;
- return bsdf_diffuse_setup(sc);
+ int flag = bsdf_diffuse_setup(sc);
+ sc->type = CLOSURE_BSDF_BSSRDF_ID;
+ return flag;
}
else {
- /* IOR param */
- sc->data1 = max(sc->data1, 1.0f);
- sc->type = CLOSURE_BSSRDF_ID;
+ sc->data1 = clamp(sc->data1, 0.0f, 1.0f); /* texture blur */
+ sc->T.x = clamp(sc->T.x, 0.0f, 1.0f); /* sharpness */
+ sc->type = type;
return SD_BSDF|SD_BSDF_HAS_EVAL|SD_BSSRDF;
}
}
-/* Simple Cubic BSSRDF falloff */
+/* Planar Truncated Gaussian
+ *
+ * Note how this is different from the typical gaussian, this one integrates
+ * to 1 over the plane (where you get an extra 2*pi*x factor). We are lucky
+ * that integrating x*exp(-x) gives a nice closed form solution. */
+
+/* paper suggests 1/12.46 which is much too small, suspect it's *12.46 */
+#define GAUSS_TRUNCATE 12.46f
-__device float bssrdf_cubic(float ld, float r)
+__device float bssrdf_gaussian_eval(ShaderClosure *sc, float r)
{
- if(ld == 0.0f)
- return (r == 0.0f)? 1.0f: 0.0f;
+ /* integrate (2*pi*r * exp(-r*r/(2*v)))/(2*pi*v)) from 0 to Rm
+ * = 1 - exp(-Rm*Rm/(2*v)) */
+ const float v = sc->data0*sc->data0*(0.25f*0.25f);
+ const float Rm = sqrtf(v*GAUSS_TRUNCATE);
+
+ if(r >= Rm)
+ return 0.0f;
- return powf(ld - min(r, ld), 3.0f) * 4.0f/powf(ld, 4.0f);
+ return expf(-r*r/(2.0f*v))/(2.0f*M_PI_F*v);
}
-/* Original BSSRDF fallof function */
-
-typedef struct BSSRDFParams {
- float eta; /* index of refraction */
- float sigma_t_; /* reduced extinction coefficient */
- float sigma_tr; /* effective extinction coefficient */
- float Fdr; /* diffuse fresnel reflectance */
- float D; /* diffusion constant */
- float A;
- float alpha_; /* reduced albedo */
- float zr; /* distance of virtual lightsource above surface */
- float zv; /* distance of virtual lightsource below surface */
- float ld; /* mean free path */
- float ro; /* diffuse reflectance */
-} BSSRDFParams;
-
-__device float bssrdf_reduced_albedo_Rd(float alpha_, float A, float ro)
+__device float bssrdf_gaussian_pdf(ShaderClosure *sc, float r)
{
- float sq;
+ /* 1.0 - expf(-Rm*Rm/(2*v)) simplified */
+ const float area_truncated = 1.0f - expf(-0.5f*GAUSS_TRUNCATE);
- sq = sqrtf(3.0f*(1.0f - alpha_));
- return (alpha_/2.0f)*(1.0f + expf((-4.0f/3.0f)*A*sq))*expf(-sq) - ro;
+ return bssrdf_gaussian_eval(sc, r) * (1.0f/(area_truncated));
}
-__device float bssrdf_compute_reduced_albedo(float A, float ro)
+__device void bssrdf_gaussian_sample(ShaderClosure *sc, float xi, float *r, float *h)
{
- const float tolerance = 1e-8f;
- const int max_iteration_count = 20;
- float d, fsub, xn_1 = 0.0f, xn = 1.0f, fxn, fxn_1;
- int i;
+ /* xi = integrate (2*pi*r * exp(-r*r/(2*v)))/(2*pi*v)) = -exp(-r^2/(2*v))
+ * r = sqrt(-2*v*logf(xi)) */
- /* use secant method to compute reduced albedo using Rd function inverse
- * with a given reflectance */
- fxn = bssrdf_reduced_albedo_Rd(xn, A, ro);
- fxn_1 = bssrdf_reduced_albedo_Rd(xn_1, A, ro);
+ const float v = sc->data0*sc->data0*(0.25f*0.25f);
+ const float Rm = sqrtf(v*GAUSS_TRUNCATE);
- for (i= 0; i < max_iteration_count; i++) {
- fsub = (fxn - fxn_1);
- if (fabsf(fsub) < tolerance)
- break;
- d = ((xn - xn_1)/fsub)*fxn;
- if (fabsf(d) < tolerance)
- break;
+ /* 1.0 - expf(-Rm*Rm/(2*v)) simplified */
+ const float area_truncated = 1.0f - expf(-0.5f*GAUSS_TRUNCATE);
- xn_1 = xn;
- fxn_1 = fxn;
- xn = xn - d;
+ /* r(xi) */
+ const float r_squared = -2.0f*v*logf(1.0f - xi*area_truncated);
+ *r = sqrtf(r_squared);
+
+ /* h^2 + r^2 = Rm^2 */
+ *h = sqrtf(Rm*Rm - r_squared);
+}
+
+/* Planar Cubic BSSRDF falloff
+ *
+ * This is basically (Rm - x)^3, with some factors to normalize it. For sampling
+ * we integrate 2*pi*x * (Rm - x)^3, which gives us a quintic equation that as
+ * far as I can tell has no closed form solution. So we get an iterative solution
+ * instead with newton-raphson. */
+
+__device float bssrdf_cubic_eval(ShaderClosure *sc, float r)
+{
+ const float sharpness = sc->T.x;
+
+ if(sharpness == 0.0f) {
+ const float Rm = sc->data0;
+
+ if(r >= Rm)
+ return 0.0f;
+
+ /* integrate (2*pi*r * 10*(R - r)^3)/(pi * R^5) from 0 to R = 1 */
+ const float Rm5 = (Rm*Rm) * (Rm*Rm) * Rm;
+ const float f = Rm - r;
+ const float num = f*f*f;
+
+ return (10.0f * num) / (Rm5 * M_PI_F);
- if (xn > 1.0f) xn = 1.0f;
- if (xn_1 > 1.0f) xn_1 = 1.0f;
-
- fxn = bssrdf_reduced_albedo_Rd(xn, A, ro);
}
+ else {
+ float Rm = sc->data0*(1.0f + sharpness);
+
+ if(r >= Rm)
+ return 0.0f;
+
+ /* custom variation with extra sharpness, to match the previous code */
+ const float y = 1.0f/(1.0f + sharpness);
+ float Rmy, ry, ryinv;
+
+ if(sharpness == 1.0f) {
+ Rmy = sqrtf(Rm);
+ ry = sqrtf(r);
+ ryinv = (ry > 0.0f)? 1.0f/ry: 0.0f;
+ }
+ else {
+ Rmy = powf(Rm, y);
+ ry = powf(r, y);
+ ryinv = (r > 0.0f)? powf(r, 2.0f*y - 2.0f): 0.0f;
+ }
+
+ const float Rmy5 = (Rmy*Rmy) * (Rmy*Rmy) * Rmy;
+ const float f = Rmy - ry;
+ const float num = f*(f*f)*(y*ryinv);
+
+ return (10.0f * num) / (Rmy5 * M_PI_F);
+ }
+}
- /* avoid division by zero later */
- if (xn <= 0.0f)
- xn = 0.00001f;
+__device float bssrdf_cubic_pdf(ShaderClosure *sc, float r)
+{
+ return bssrdf_cubic_eval(sc, r);
+}
- return xn;
+/* solve 10x^2 - 20x^3 + 15x^4 - 4x^5 - xi == 0 */
+__device float bssrdf_cubic_quintic_root_find(float xi)
+{
+ /* newton-raphson iteration, usually succeeds in 2-4 iterations, except
+ * outside 0.02 ... 0.98 where it can go up to 10, so overall performance
+ * should not be too bad */
+ const float tolerance = 1e-6f;
+ const int max_iteration_count = 10;
+ float x = 0.25f;
+ int i;
+
+ for (i = 0; i < max_iteration_count; i++) {
+ float x2 = x*x;
+ float x3 = x2*x;
+ float nx = (1.0f - x);
+
+ float f = 10.0f*x2 - 20.0f*x3 + 15.0f*x2*x2 - 4.0f*x2*x3 - xi;
+ float f_ = 20.0f*(x*nx)*(nx*nx);
+
+ if(fabsf(f) < tolerance || f_ == 0.0f)
+ break;
+
+ x = clamp(x - f/f_, 0.0f, 1.0f);
+ }
+
+ return x;
}
-__device void bssrdf_setup_params(BSSRDFParams *ss, float refl, float radius, float ior)
+__device void bssrdf_cubic_sample(ShaderClosure *sc, float xi, float *r, float *h)
{
- ss->eta = ior;
- ss->Fdr = -1.440f/ior*ior + 0.710f/ior + 0.668f + 0.0636f*ior;
- ss->A = (1.0f + ss->Fdr)/(1.0f - ss->Fdr);
- ss->ld = radius;
- ss->ro = min(refl, 0.999f);
+ float Rm = sc->data0;
+ float r_ = bssrdf_cubic_quintic_root_find(xi);
- ss->alpha_ = bssrdf_compute_reduced_albedo(ss->A, ss->ro);
+ const float sharpness = sc->T.x;
+ if(sharpness != 0.0f) {
+ r_ = powf(r_, 1.0f + sharpness);
+ Rm *= (1.0f + sharpness);
+ }
+
+ r_ *= Rm;
+ *r = r_;
- ss->sigma_tr = 1.0f/ss->ld;
- ss->sigma_t_ = ss->sigma_tr/sqrtf(3.0f*(1.0f - ss->alpha_));
+ /* h^2 + r^2 = Rm^2 */
+ *h = sqrtf(Rm*Rm - r_*r_);
+}
- ss->D = 1.0f/(3.0f*ss->sigma_t_);
+/* None BSSRDF falloff
+ *
+ * Samples distributed over disk with no falloff, for reference. */
- ss->zr = 1.0f/ss->sigma_t_;
- ss->zv = ss->zr + 4.0f*ss->A*ss->D;
+__device float bssrdf_none_eval(ShaderClosure *sc, float r)
+{
+ const float Rm = sc->data0;
+ return (r < Rm)? 1.0f: 0.0f;
}
-/* exponential falloff function */
+__device float bssrdf_none_pdf(ShaderClosure *sc, float r)
+{
+ /* integrate (2*pi*r)/(pi*Rm*Rm) from 0 to Rm = 1 */
+ const float Rm = sc->data0;
+ const float area = (M_PI_F*Rm*Rm);
+
+ return bssrdf_none_eval(sc, r) / area;
+}
-__device float bssrdf_original(const BSSRDFParams *ss, float r)
+__device void bssrdf_none_sample(ShaderClosure *sc, float xi, float *r, float *h)
{
- if(ss->ld == 0.0f)
- return (r == 0.0f)? 1.0f: 0.0f;
+ /* xi = integrate (2*pi*r)/(pi*Rm*Rm) = r^2/Rm^2
+ * r = sqrt(xi)*Rm */
+ const float Rm = sc->data0;
+ const float r_ = sqrtf(xi)*Rm;
- float rr = r*r;
- float sr, sv, Rdr, Rdv;
+ *r = r_;
- sr = sqrtf(rr + ss->zr*ss->zr);
- sv = sqrtf(rr + ss->zv*ss->zv);
+ /* h^2 + r^2 = Rm^2 */
+ *h = sqrtf(Rm*Rm - r_*r_);
+}
- Rdr = ss->zr*(1.0f + ss->sigma_tr*sr)*expf(-ss->sigma_tr*sr)/(sr*sr*sr);
- Rdv = ss->zv*(1.0f + ss->sigma_tr*sv)*expf(-ss->sigma_tr*sv)/(sv*sv*sv);
+/* Generic */
- return ss->alpha_*(1.0f/M_4PI_F)*(Rdr + Rdv);
+__device void bssrdf_sample(ShaderClosure *sc, float xi, float *r, float *h)
+{
+ if(sc->type == CLOSURE_BSSRDF_CUBIC_ID)
+ bssrdf_cubic_sample(sc, xi, r, h);
+ else
+ bssrdf_gaussian_sample(sc, xi, r, h);
+}
+
+__device float bssrdf_pdf(ShaderClosure *sc, float r)
+{
+ if(sc->type == CLOSURE_BSSRDF_CUBIC_ID)
+ return bssrdf_cubic_pdf(sc, r);
+ else
+ return bssrdf_gaussian_pdf(sc, r);
}
CCL_NAMESPACE_END
diff --git a/intern/cycles/kernel/closure/volume.h b/intern/cycles/kernel/closure/volume.h
index 0b553f38a25..ddaf939984e 100644
--- a/intern/cycles/kernel/closure/volume.h
+++ b/intern/cycles/kernel/closure/volume.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/kernel.cl b/intern/cycles/kernel/kernel.cl
index 67be879cdc7..28e72d78731 100644
--- a/intern/cycles/kernel/kernel.cl
+++ b/intern/cycles/kernel/kernel.cl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
/* OpenCL kernel entry points - unfinished */
@@ -51,10 +49,10 @@ __kernel void kernel_ocl_path_trace(
int y = sy + get_global_id(1);
if(x < sx + sw && y < sy + sh)
- kernel_path_trace_progressive(kg, buffer, rng_state, sample, x, y, offset, stride);
+ kernel_path_trace(kg, buffer, rng_state, sample, x, y, offset, stride);
}
-__kernel void kernel_ocl_tonemap(
+__kernel void kernel_ocl_convert_to_byte(
__constant KernelData *data,
__global uchar4 *rgba,
__global float *buffer,
@@ -63,7 +61,34 @@ __kernel void kernel_ocl_tonemap(
__global type *name,
#include "kernel_textures.h"
- int sample,
+ float sample_scale,
+ int sx, int sy, int sw, int sh, int offset, int stride)
+{
+ KernelGlobals kglobals, *kg = &kglobals;
+
+ kg->data = data;
+
+#define KERNEL_TEX(type, ttype, name) \
+ kg->name = name;
+#include "kernel_textures.h"
+
+ int x = sx + get_global_id(0);
+ int y = sy + get_global_id(1);
+
+ if(x < sx + sw && y < sy + sh)
+ kernel_film_convert_to_byte(kg, rgba, buffer, sample_scale, x, y, offset, stride);
+}
+
+__kernel void kernel_ocl_convert_to_half_float(
+ __constant KernelData *data,
+ __global uchar4 *rgba,
+ __global float *buffer,
+
+#define KERNEL_TEX(type, ttype, name) \
+ __global type *name,
+#include "kernel_textures.h"
+
+ float sample_scale,
int sx, int sy, int sw, int sh, int offset, int stride)
{
KernelGlobals kglobals, *kg = &kglobals;
@@ -78,7 +103,7 @@ __kernel void kernel_ocl_tonemap(
int y = sy + get_global_id(1);
if(x < sx + sw && y < sy + sh)
- kernel_film_tonemap(kg, rgba, buffer, sample, x, y, offset, stride);
+ kernel_film_convert_to_half_float(kg, rgba, buffer, sample_scale, x, y, offset, stride);
}
__kernel void kernel_ocl_shader(
diff --git a/intern/cycles/kernel/kernel.cpp b/intern/cycles/kernel/kernel.cpp
index 589c9e1e073..3e2727fde9a 100644
--- a/intern/cycles/kernel/kernel.cpp
+++ b/intern/cycles/kernel/kernel.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
/* CPU kernel entry points */
@@ -90,19 +88,24 @@ void kernel_tex_copy(KernelGlobals *kg, const char *name, device_ptr mem, size_t
void kernel_cpu_path_trace(KernelGlobals *kg, float *buffer, unsigned int *rng_state, int sample, int x, int y, int offset, int stride)
{
-#ifdef __NON_PROGRESSIVE__
- if(!kernel_data.integrator.progressive)
- kernel_path_trace_non_progressive(kg, buffer, rng_state, sample, x, y, offset, stride);
+#ifdef __BRANCHED_PATH__
+ if(kernel_data.integrator.branched)
+ kernel_branched_path_trace(kg, buffer, rng_state, sample, x, y, offset, stride);
else
#endif
- kernel_path_trace_progressive(kg, buffer, rng_state, sample, x, y, offset, stride);
+ kernel_path_trace(kg, buffer, rng_state, sample, x, y, offset, stride);
}
-/* Tonemapping */
+/* Film */
-void kernel_cpu_tonemap(KernelGlobals *kg, uchar4 *rgba, float *buffer, int sample, int x, int y, int offset, int stride)
+void kernel_cpu_convert_to_byte(KernelGlobals *kg, uchar4 *rgba, float *buffer, float sample_scale, int x, int y, int offset, int stride)
{
- kernel_film_tonemap(kg, rgba, buffer, sample, x, y, offset, stride);
+ kernel_film_convert_to_byte(kg, rgba, buffer, sample_scale, x, y, offset, stride);
+}
+
+void kernel_cpu_convert_to_half_float(KernelGlobals *kg, uchar4 *rgba, float *buffer, float sample_scale, int x, int y, int offset, int stride)
+{
+ kernel_film_convert_to_half_float(kg, rgba, buffer, sample_scale, x, y, offset, stride);
}
/* Shader Evaluation */
diff --git a/intern/cycles/kernel/kernel.cu b/intern/cycles/kernel/kernel.cu
index df865aa1b7e..5e6748c66fc 100644
--- a/intern/cycles/kernel/kernel.cu
+++ b/intern/cycles/kernel/kernel.cu
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
/* CUDA kernel entry points */
@@ -26,33 +24,42 @@
#include "kernel_path.h"
#include "kernel_displace.h"
-extern "C" __global__ void kernel_cuda_path_trace_progressive(float *buffer, uint *rng_state, int sample, int sx, int sy, int sw, int sh, int offset, int stride)
+extern "C" __global__ void kernel_cuda_path_trace(float *buffer, uint *rng_state, int sample, int sx, int sy, int sw, int sh, int offset, int stride)
{
int x = sx + blockDim.x*blockIdx.x + threadIdx.x;
int y = sy + blockDim.y*blockIdx.y + threadIdx.y;
if(x < sx + sw && y < sy + sh)
- kernel_path_trace_progressive(NULL, buffer, rng_state, sample, x, y, offset, stride);
+ kernel_path_trace(NULL, buffer, rng_state, sample, x, y, offset, stride);
}
-#ifdef __NON_PROGRESSIVE__
-extern "C" __global__ void kernel_cuda_path_trace_non_progressive(float *buffer, uint *rng_state, int sample, int sx, int sy, int sw, int sh, int offset, int stride)
+#ifdef __BRANCHED_PATH__
+extern "C" __global__ void kernel_cuda_branched_path_trace(float *buffer, uint *rng_state, int sample, int sx, int sy, int sw, int sh, int offset, int stride)
{
int x = sx + blockDim.x*blockIdx.x + threadIdx.x;
int y = sy + blockDim.y*blockIdx.y + threadIdx.y;
if(x < sx + sw && y < sy + sh)
- kernel_path_trace_non_progressive(NULL, buffer, rng_state, sample, x, y, offset, stride);
+ kernel_branched_path_trace(NULL, buffer, rng_state, sample, x, y, offset, stride);
}
#endif
-extern "C" __global__ void kernel_cuda_tonemap(uchar4 *rgba, float *buffer, int sample, int sx, int sy, int sw, int sh, int offset, int stride)
+extern "C" __global__ void kernel_cuda_convert_to_byte(uchar4 *rgba, float *buffer, float sample_scale, int sx, int sy, int sw, int sh, int offset, int stride)
{
int x = sx + blockDim.x*blockIdx.x + threadIdx.x;
int y = sy + blockDim.y*blockIdx.y + threadIdx.y;
if(x < sx + sw && y < sy + sh)
- kernel_film_tonemap(NULL, rgba, buffer, sample, x, y, offset, stride);
+ kernel_film_convert_to_byte(NULL, rgba, buffer, sample_scale, x, y, offset, stride);
+}
+
+extern "C" __global__ void kernel_cuda_convert_to_half_float(uchar4 *rgba, float *buffer, float sample_scale, int sx, int sy, int sw, int sh, int offset, int stride)
+{
+ int x = sx + blockDim.x*blockIdx.x + threadIdx.x;
+ int y = sy + blockDim.y*blockIdx.y + threadIdx.y;
+
+ if(x < sx + sw && y < sy + sh)
+ kernel_film_convert_to_half_float(NULL, rgba, buffer, sample_scale, x, y, offset, stride);
}
extern "C" __global__ void kernel_cuda_shader(uint4 *input, float4 *output, int type, int sx)
diff --git a/intern/cycles/kernel/kernel.h b/intern/cycles/kernel/kernel.h
index a87cfa39550..361f5b0856d 100644
--- a/intern/cycles/kernel/kernel.h
+++ b/intern/cycles/kernel/kernel.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __KERNEL_H__
@@ -38,23 +36,29 @@ void kernel_tex_copy(KernelGlobals *kg, const char *name, device_ptr mem, size_t
void kernel_cpu_path_trace(KernelGlobals *kg, float *buffer, unsigned int *rng_state,
int sample, int x, int y, int offset, int stride);
-void kernel_cpu_tonemap(KernelGlobals *kg, uchar4 *rgba, float *buffer,
- int sample, int x, int y, int offset, int stride);
+void kernel_cpu_convert_to_byte(KernelGlobals *kg, uchar4 *rgba, float *buffer,
+ float sample_scale, int x, int y, int offset, int stride);
+void kernel_cpu_convert_to_half_float(KernelGlobals *kg, uchar4 *rgba, float *buffer,
+ float sample_scale, int x, int y, int offset, int stride);
void kernel_cpu_shader(KernelGlobals *kg, uint4 *input, float4 *output,
int type, int i);
#ifdef WITH_OPTIMIZED_KERNEL
void kernel_cpu_sse2_path_trace(KernelGlobals *kg, float *buffer, unsigned int *rng_state,
int sample, int x, int y, int offset, int stride);
-void kernel_cpu_sse2_tonemap(KernelGlobals *kg, uchar4 *rgba, float *buffer,
- int sample, int x, int y, int offset, int stride);
+void kernel_cpu_sse2_convert_to_byte(KernelGlobals *kg, uchar4 *rgba, float *buffer,
+ float sample_scale, int x, int y, int offset, int stride);
+void kernel_cpu_sse2_convert_to_half_float(KernelGlobals *kg, uchar4 *rgba, float *buffer,
+ float sample_scale, int x, int y, int offset, int stride);
void kernel_cpu_sse2_shader(KernelGlobals *kg, uint4 *input, float4 *output,
int type, int i);
void kernel_cpu_sse3_path_trace(KernelGlobals *kg, float *buffer, unsigned int *rng_state,
int sample, int x, int y, int offset, int stride);
-void kernel_cpu_sse3_tonemap(KernelGlobals *kg, uchar4 *rgba, float *buffer,
- int sample, int x, int y, int offset, int stride);
+void kernel_cpu_sse3_convert_to_byte(KernelGlobals *kg, uchar4 *rgba, float *buffer,
+ float sample_scale, int x, int y, int offset, int stride);
+void kernel_cpu_sse3_convert_to_half_float(KernelGlobals *kg, uchar4 *rgba, float *buffer,
+ float sample_scale, int x, int y, int offset, int stride);
void kernel_cpu_sse3_shader(KernelGlobals *kg, uint4 *input, float4 *output,
int type, int i);
#endif
diff --git a/intern/cycles/kernel/kernel_accumulate.h b/intern/cycles/kernel/kernel_accumulate.h
index fb11cbd395f..d7531be0d8a 100644
--- a/intern/cycles/kernel/kernel_accumulate.h
+++ b/intern/cycles/kernel/kernel_accumulate.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
@@ -212,14 +210,14 @@ __device_inline void path_radiance_accum_emission(PathRadiance *L, float3 throug
#endif
}
-__device_inline void path_radiance_accum_ao(PathRadiance *L, float3 throughput, float3 bsdf, float3 ao, int bounce)
+__device_inline void path_radiance_accum_ao(PathRadiance *L, float3 throughput, float3 alpha, float3 bsdf, float3 ao, int bounce)
{
#ifdef __PASSES__
if(L->use_light_pass) {
if(bounce == 0) {
/* directly visible lighting */
L->direct_diffuse += throughput*bsdf*ao;
- L->ao += throughput*ao;
+ L->ao += alpha*throughput*ao;
}
else {
/* indirectly visible lighting after BSDF bounce */
diff --git a/intern/cycles/kernel/kernel_bvh.h b/intern/cycles/kernel/kernel_bvh.h
index c9e14645d47..44a9822c103 100644
--- a/intern/cycles/kernel/kernel_bvh.h
+++ b/intern/cycles/kernel/kernel_bvh.h
@@ -26,8 +26,8 @@ CCL_NAMESPACE_BEGIN
*/
/* bottom-most stack entry, indicating the end of traversal */
-
#define ENTRYPOINT_SENTINEL 0x76543210
+
/* 64 object BVH + 64 mesh BVH + 64 object node splitting */
#define BVH_STACK_SIZE 192
#define BVH_NODE_SIZE 4
@@ -215,21 +215,20 @@ __device_inline bool bvh_cardinal_curve_intersect(KernelGlobals *kg, Intersectio
float3 P, float3 idir, uint visibility, int object, int curveAddr, int segment, uint *lcg_state, float difl, float extmax)
{
float epsilon = 0.0f;
- int depth = kernel_data.curve.subdivisions;
+ float r_st, r_en;
- /* curve Intersection check */
- float3 dir = 1.0f/idir;
-
+ int depth = kernel_data.curve.subdivisions;
int flags = kernel_data.curve.curveflags;
-
int prim = kernel_tex_fetch(__prim_index, curveAddr);
-
+
float3 curve_coef[4];
- float r_st,r_en;
- /*obtain curve parameters*/
+ /* curve Intersection check */
+ float3 dir = 1.0f/idir;
+
+ /* obtain curve parameters */
{
- /*ray transform created - this should be created at beginning of intersection loop*/
+ /* ray transform created - this should be created at beginning of intersection loop */
Transform htfm;
float d = sqrtf(dir.x * dir.x + dir.z * dir.z);
htfm = make_transform(
@@ -271,15 +270,15 @@ __device_inline bool bvh_cardinal_curve_intersect(KernelGlobals *kg, Intersectio
if((flags & CURVE_KN_RIBBONS) || !(flags & CURVE_KN_BACKFACING))
epsilon = 2 * r_curr;
- /*find bounds - this is slow for cubic curves*/
- float upper,lower;
+ /* find bounds - this is slow for cubic curves */
+ float upper, lower;
float zextrem[4];
curvebounds(&lower, &upper, &zextrem[0], &zextrem[1], &zextrem[2], &zextrem[3], curve_coef[0].z, curve_coef[1].z, curve_coef[2].z, curve_coef[3].z);
if(lower - r_curr > isect->t || upper + r_curr < epsilon)
return false;
- /*minimum width extension*/
+ /* minimum width extension */
float mw_extension = min(difl * fabsf(upper), extmax);
float r_ext = mw_extension + r_curr;
@@ -293,13 +292,13 @@ __device_inline bool bvh_cardinal_curve_intersect(KernelGlobals *kg, Intersectio
if(lower > r_ext || upper < -r_ext)
return false;
- /*setup recurrent loop*/
+ /* setup recurrent loop */
int level = 1 << depth;
int tree = 0;
float resol = 1.0f / (float)level;
bool hit = false;
- /*begin loop*/
+ /* begin loop */
while(!(tree >> (depth))) {
float i_st = tree * resol;
float i_en = i_st + (level * resol);
@@ -347,7 +346,7 @@ __device_inline bool bvh_cardinal_curve_intersect(KernelGlobals *kg, Intersectio
float coverage = 1.0f;
if (bminz - r_curr > isect->t || bmaxz + r_curr < epsilon || bminx > r_ext|| bmaxx < -r_ext|| bminy > r_ext|| bmaxy < -r_ext) {
- /* the bounding box does not overlap the square centered at O.*/
+ /* the bounding box does not overlap the square centered at O */
tree += level;
level = tree & -tree;
}
@@ -369,10 +368,10 @@ __device_inline bool bvh_cardinal_curve_intersect(KernelGlobals *kg, Intersectio
w = -(p_st.x * tg.x + p_st.y * tg.y) / w;
w = clamp((float)w, 0.0f, 1.0f);
- /* compute u on the curve segment.*/
+ /* compute u on the curve segment */
u = i_st * (1 - w) + i_en * w;
r_curr = r_st + (r_en - r_st) * u;
- /* compare x-y distances.*/
+ /* compare x-y distances */
float3 p_curr = ((curve_coef[3] * u + curve_coef[2]) * u + curve_coef[1]) * u + curve_coef[0];
float3 dp_st = (3 * curve_coef[3] * i_st + 2 * curve_coef[2]) * i_st + curve_coef[1];
@@ -412,7 +411,7 @@ __device_inline bool bvh_cardinal_curve_intersect(KernelGlobals *kg, Intersectio
level = tree & -tree;
continue;
}
- /* compare z distances.*/
+ /* compare z distances */
if (isect->t < p_curr.z) {
tree++;
level = tree & -tree;
@@ -422,7 +421,7 @@ __device_inline bool bvh_cardinal_curve_intersect(KernelGlobals *kg, Intersectio
}
else {
float l = len(p_en - p_st);
- /*minimum width extension*/
+ /* minimum width extension */
float or1 = r1;
float or2 = r2;
if(difl != 0.0f) {
@@ -445,7 +444,7 @@ __device_inline bool bvh_cardinal_curve_intersect(KernelGlobals *kg, Intersectio
float tb = 2*(tdif.z - tg.z*(tdifz + gd*(tdifz*gd + or1)));
float tc = dot(tdif,tdif) - tdifz * tdifz * (1 + gd*gd) - or1*or1 - 2*or1*tdifz*gd;
float td = tb*tb - 4*cyla*tc;
- if (td < 0.0f){
+ if (td < 0.0f) {
tree++;
level = tree & -tree;
continue;
@@ -477,18 +476,18 @@ __device_inline bool bvh_cardinal_curve_intersect(KernelGlobals *kg, Intersectio
}
w = clamp((float)w, 0.0f, 1.0f);
- /* compute u on the curve segment.*/
+ /* compute u on the curve segment */
u = i_st * (1 - w) + i_en * w;
r_curr = r1 + (r2 - r1) * w;
r_ext = or1 + (or2 - or1) * w;
coverage = r_curr/r_ext;
}
- /* we found a new intersection.*/
+ /* we found a new intersection */
- /*stochastic fade from minimum width*/
+ /* stochastic fade from minimum width */
if(lcg_state && coverage != 1.0f) {
- if(lcg_step(lcg_state) > coverage)
+ if(lcg_step_float(lcg_state) > coverage)
return hit;
}
@@ -542,7 +541,7 @@ __device_inline bool bvh_curve_intersect(KernelGlobals *kg, Intersection *isect,
float3 p1 = float4_to_float3(P1);
float3 p2 = float4_to_float3(P2);
- /*minimum width extension*/
+ /* minimum width extension */
float r1 = or1;
float r2 = or2;
if(difl != 0.0f) {
@@ -567,7 +566,7 @@ __device_inline bool bvh_curve_intersect(KernelGlobals *kg, Intersection *isect,
if(sdisc < 0.0f)
return false;
- /* obtain parameters and test midpoint distance for suitable modes*/
+ /* obtain parameters and test midpoint distance for suitable modes */
float3 tg = (p2 - p1) / l;
float gd = (r2 - r1) / l;
float dirz = dot(dir,tg);
@@ -584,7 +583,7 @@ __device_inline bool bvh_curve_intersect(KernelGlobals *kg, Intersection *isect,
if((zcentre < 0 || zcentre > l) && !(flags & CURVE_KN_ACCURATE) && !(flags & CURVE_KN_INTERSECTCORRECTION))
return false;
- /* test minimum separation*/
+ /* test minimum separation */
float3 cprod = cross(tg, dir);
float3 cprod2 = cross(tg, dif);
float cprodsq = len_squared(cprod);
@@ -599,7 +598,7 @@ __device_inline bool bvh_curve_intersect(KernelGlobals *kg, Intersection *isect,
if(distscaled > mr*mr)
return false;
- /* calculate true intersection*/
+ /* calculate true intersection */
float3 tdif = P - p1 + tcentre * dir;
float tdifz = dot(tdif,tg);
float tb = 2*(dot(dir,tdif) - dirz*(tdifz + gd*(tdifz*gd + r1)));
@@ -636,11 +635,11 @@ __device_inline bool bvh_curve_intersect(KernelGlobals *kg, Intersection *isect,
z = zcentre + (dirz * correction);
}
- /*stochastic fade from minimum width*/
+ /* stochastic fade from minimum width */
float adjradius = or1 + z * (or2 - or1) / l;
adjradius = adjradius / (r1 + z * gd);
if(lcg_state && adjradius != 1.0f) {
- if(lcg_step(lcg_state) > adjradius)
+ if(lcg_step_float(lcg_state) > adjradius)
return false;
}
/* --- */
@@ -690,8 +689,8 @@ __device_inline bool bvh_curve_intersect(KernelGlobals *kg, Intersection *isect,
* only want to intersect with primitives in the same object, and if case of
* multiple hits we pick a single random primitive as the intersection point. */
-__device_inline bool bvh_triangle_intersect_subsurface(KernelGlobals *kg, Intersection *isect,
- float3 P, float3 idir, int object, int triAddr, float tmax, int *num_hits, float subsurface_random)
+__device_inline void bvh_triangle_intersect_subsurface(KernelGlobals *kg, Intersection *isect_array,
+ float3 P, float3 idir, int object, int triAddr, float tmax, uint *num_hits, uint *lcg_state, int max_hits)
{
/* compute and check intersection t-value */
float4 v00 = kernel_tex_fetch(__tri_woop, triAddr*TRI_NODE_SIZE+0);
@@ -718,20 +717,30 @@ __device_inline bool bvh_triangle_intersect_subsurface(KernelGlobals *kg, Inters
if(v >= 0.0f && u + v <= 1.0f) {
(*num_hits)++;
- if(subsurface_random * (*num_hits) <= 1.0f) {
- /* record intersection */
- isect->prim = triAddr;
- isect->object = object;
- isect->u = u;
- isect->v = v;
- isect->t = t;
- return true;
+ int hit;
+
+ if(*num_hits <= max_hits) {
+ hit = *num_hits - 1;
+ }
+ else {
+ /* reservoir sampling: if we are at the maximum number of
+ * hits, randomly replace element or skip it */
+ hit = lcg_step_uint(lcg_state) % *num_hits;
+
+ if(hit >= max_hits)
+ return;
}
+
+ /* record intersection */
+ Intersection *isect = &isect_array[hit];
+ isect->prim = triAddr;
+ isect->object = object;
+ isect->u = u;
+ isect->v = v;
+ isect->t = t;
}
}
}
-
- return false;
}
#endif
@@ -741,7 +750,6 @@ __device_inline bool bvh_triangle_intersect_subsurface(KernelGlobals *kg, Inters
#define BVH_MOTION 2
#define BVH_HAIR 4
#define BVH_HAIR_MINIMUM_WIDTH 8
-#define BVH_SUBSURFACE 16
#define BVH_FUNCTION_NAME bvh_intersect
#define BVH_FUNCTION_FEATURES 0
@@ -773,39 +781,44 @@ __device_inline bool bvh_triangle_intersect_subsurface(KernelGlobals *kg, Inters
#if defined(__SUBSURFACE__)
#define BVH_FUNCTION_NAME bvh_intersect_subsurface
-#define BVH_FUNCTION_FEATURES BVH_SUBSURFACE
-#include "kernel_bvh_traversal.h"
+#define BVH_FUNCTION_FEATURES 0
+#include "kernel_bvh_subsurface.h"
#endif
#if defined(__SUBSURFACE__) && defined(__INSTANCING__)
#define BVH_FUNCTION_NAME bvh_intersect_subsurface_instancing
-#define BVH_FUNCTION_FEATURES BVH_INSTANCING|BVH_SUBSURFACE
-#include "kernel_bvh_traversal.h"
+#define BVH_FUNCTION_FEATURES BVH_INSTANCING
+#include "kernel_bvh_subsurface.h"
#endif
#if defined(__SUBSURFACE__) && defined(__HAIR__)
#define BVH_FUNCTION_NAME bvh_intersect_subsurface_hair
-#define BVH_FUNCTION_FEATURES BVH_INSTANCING|BVH_SUBSURFACE|BVH_HAIR|BVH_HAIR_MINIMUM_WIDTH
-#include "kernel_bvh_traversal.h"
+#define BVH_FUNCTION_FEATURES BVH_INSTANCING|BVH_HAIR
+#include "kernel_bvh_subsurface.h"
#endif
#if defined(__SUBSURFACE__) && defined(__OBJECT_MOTION__)
#define BVH_FUNCTION_NAME bvh_intersect_subsurface_motion
-#define BVH_FUNCTION_FEATURES BVH_INSTANCING|BVH_SUBSURFACE|BVH_MOTION
-#include "kernel_bvh_traversal.h"
+#define BVH_FUNCTION_FEATURES BVH_INSTANCING|BVH_MOTION
+#include "kernel_bvh_subsurface.h"
#endif
#if defined(__SUBSURFACE__) && defined(__HAIR__) && defined(__OBJECT_MOTION__)
#define BVH_FUNCTION_NAME bvh_intersect_subsurface_hair_motion
-#define BVH_FUNCTION_FEATURES BVH_INSTANCING|BVH_SUBSURFACE|BVH_HAIR|BVH_HAIR_MINIMUM_WIDTH|BVH_MOTION
-#include "kernel_bvh_traversal.h"
+#define BVH_FUNCTION_FEATURES BVH_INSTANCING|BVH_HAIR|BVH_MOTION
+#include "kernel_bvh_subsurface.h"
#endif
-
+/* to work around titan bug when using arrays instead of textures */
+#if !defined(__KERNEL_CUDA__) || defined(__KERNEL_CUDA_TEX_STORAGE__)
+__device_inline
+#else
+__device_noinline
+#endif
#ifdef __HAIR__
-__device_inline bool scene_intersect(KernelGlobals *kg, const Ray *ray, const uint visibility, Intersection *isect, uint *lcg_state, float difl, float extmax)
+bool scene_intersect(KernelGlobals *kg, const Ray *ray, const uint visibility, Intersection *isect, uint *lcg_state, float difl, float extmax)
#else
-__device_inline bool scene_intersect(KernelGlobals *kg, const Ray *ray, const uint visibility, Intersection *isect)
+bool scene_intersect(KernelGlobals *kg, const Ray *ray, const uint visibility, Intersection *isect)
#endif
{
#ifdef __OBJECT_MOTION__
@@ -843,39 +856,45 @@ __device_inline bool scene_intersect(KernelGlobals *kg, const Ray *ray, const ui
#endif /* __KERNEL_CPU__ */
}
+/* to work around titan bug when using arrays instead of textures */
#ifdef __SUBSURFACE__
-__device_inline int scene_intersect_subsurface(KernelGlobals *kg, const Ray *ray, Intersection *isect, int subsurface_object, float subsurface_random)
+#if !defined(__KERNEL_CUDA__) || defined(__KERNEL_CUDA_TEX_STORAGE__)
+__device_inline
+#else
+__device_noinline
+#endif
+uint scene_intersect_subsurface(KernelGlobals *kg, const Ray *ray, Intersection *isect, int subsurface_object, uint *lcg_state, int max_hits)
{
#ifdef __OBJECT_MOTION__
if(kernel_data.bvh.have_motion) {
#ifdef __HAIR__
if(kernel_data.bvh.have_curves)
- return bvh_intersect_subsurface_hair_motion(kg, ray, isect, subsurface_object, subsurface_random);
+ return bvh_intersect_subsurface_hair_motion(kg, ray, isect, subsurface_object, lcg_state, max_hits);
#endif /* __HAIR__ */
- return bvh_intersect_subsurface_motion(kg, ray, isect, subsurface_object, subsurface_random);
+ return bvh_intersect_subsurface_motion(kg, ray, isect, subsurface_object, lcg_state, max_hits);
}
#endif /* __OBJECT_MOTION__ */
#ifdef __HAIR__
if(kernel_data.bvh.have_curves)
- return bvh_intersect_subsurface_hair(kg, ray, isect, subsurface_object, subsurface_random);
+ return bvh_intersect_subsurface_hair(kg, ray, isect, subsurface_object, lcg_state, max_hits);
#endif /* __HAIR__ */
#ifdef __KERNEL_CPU__
#ifdef __INSTANCING__
if(kernel_data.bvh.have_instancing)
- return bvh_intersect_subsurface_instancing(kg, ray, isect, subsurface_object, subsurface_random);
+ return bvh_intersect_subsurface_instancing(kg, ray, isect, subsurface_object, lcg_state, max_hits);
#endif /* __INSTANCING__ */
- return bvh_intersect_subsurface(kg, ray, isect, subsurface_object, subsurface_random);
+ return bvh_intersect_subsurface(kg, ray, isect, subsurface_object, lcg_state, max_hits);
#else /* __KERNEL_CPU__ */
#ifdef __INSTANCING__
- return bvh_intersect_subsurface_instancing(kg, ray, isect, subsurface_object, subsurface_random);
+ return bvh_intersect_subsurface_instancing(kg, ray, isect, subsurface_object, lcg_state, max_hits);
#else
- return bvh_intersect_subsurface(kg, ray, isect, subsurface_object, subsurface_random);
+ return bvh_intersect_subsurface(kg, ray, isect, subsurface_object, lcg_state, max_hits);
#endif /* __INSTANCING__ */
#endif /* __KERNEL_CPU__ */
@@ -980,6 +999,51 @@ __device_inline float3 bvh_triangle_refine(KernelGlobals *kg, ShaderData *sd, co
#endif
}
+/* same as above, except that isect->t is assumed to be in object space for instancing */
+__device_inline float3 bvh_triangle_refine_subsurface(KernelGlobals *kg, ShaderData *sd, const Intersection *isect, const Ray *ray)
+{
+ float3 P = ray->P;
+ float3 D = ray->D;
+ float t = isect->t;
+
+#ifdef __INTERSECTION_REFINE__
+ if(isect->object != ~0) {
+#ifdef __OBJECT_MOTION__
+ Transform tfm = sd->ob_itfm;
+#else
+ Transform tfm = object_fetch_transform(kg, isect->object, OBJECT_INVERSE_TRANSFORM);
+#endif
+
+ P = transform_point(&tfm, P);
+ D = transform_direction(&tfm, D);
+ D = normalize(D);
+ }
+
+ P = P + D*t;
+
+ float4 v00 = kernel_tex_fetch(__tri_woop, isect->prim*TRI_NODE_SIZE+0);
+ float Oz = v00.w - P.x*v00.x - P.y*v00.y - P.z*v00.z;
+ float invDz = 1.0f/(D.x*v00.x + D.y*v00.y + D.z*v00.z);
+ float rt = Oz * invDz;
+
+ P = P + D*rt;
+
+ if(isect->object != ~0) {
+#ifdef __OBJECT_MOTION__
+ Transform tfm = sd->ob_tfm;
+#else
+ Transform tfm = object_fetch_transform(kg, isect->object, OBJECT_TRANSFORM);
+#endif
+
+ P = transform_point(&tfm, P);
+ }
+
+ return P;
+#else
+ return P + D*t;
+#endif
+}
+
#ifdef __HAIR__
__device_inline float3 curvetangent(float t, float3 p0, float3 p1, float3 p2, float3 p3)
@@ -1080,12 +1144,8 @@ __device_inline float3 bvh_curve_refine(KernelGlobals *kg, ShaderData *sd, const
#endif
if (flag & CURVE_KN_TRUETANGENTGNORMAL) {
- sd->Ng = -(D - tg * (dot(tg,D) * kernel_data.curve.normalmix));
+ sd->Ng = -(D - tg * dot(tg,D));
sd->Ng = normalize(sd->Ng);
- if (flag & CURVE_KN_NORMALCORRECTION) {
- sd->Ng = sd->Ng - gd * tg;
- sd->Ng = normalize(sd->Ng);
- }
}
else {
sd->Ng = (dif - tg * sd->u * l) / (P1.w + sd->u * l * gd);
@@ -1098,12 +1158,8 @@ __device_inline float3 bvh_curve_refine(KernelGlobals *kg, ShaderData *sd, const
sd->N = sd->Ng;
if (flag & CURVE_KN_TANGENTGNORMAL && !(flag & CURVE_KN_TRUETANGENTGNORMAL)) {
- sd->N = -(D - tg * (dot(tg,D) * kernel_data.curve.normalmix));
+ sd->N = -(D - tg * dot(tg,D));
sd->N = normalize(sd->N);
- if (flag & CURVE_KN_NORMALCORRECTION) {
- sd->N = sd->N - gd * tg;
- sd->N = normalize(sd->N);
- }
}
if (!(flag & CURVE_KN_TANGENTGNORMAL) && flag & CURVE_KN_TRUETANGENTGNORMAL) {
sd->N = (dif - tg * sd->u * l) / (P1.w + sd->u * l * gd);
diff --git a/intern/cycles/kernel/kernel_bvh_subsurface.h b/intern/cycles/kernel/kernel_bvh_subsurface.h
new file mode 100644
index 00000000000..4446c1821d5
--- /dev/null
+++ b/intern/cycles/kernel/kernel_bvh_subsurface.h
@@ -0,0 +1,312 @@
+/*
+ * Adapted from code Copyright 2009-2010 NVIDIA Corporation,
+ * and code copyright 2009-2012 Intel Corporation
+ *
+ * Modifications Copyright 2011-2013, Blender Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* This is a template BVH traversal function for subsurface scattering, where
+ * various features can be enabled/disabled. This way we can compile optimized
+ * versions for each case without new features slowing things down.
+ *
+ * BVH_INSTANCING: object instancing
+ * BVH_MOTION: motion blur rendering
+ *
+ */
+
+#define FEATURE(f) (((BVH_FUNCTION_FEATURES) & (f)) != 0)
+
+__device uint BVH_FUNCTION_NAME(KernelGlobals *kg, const Ray *ray, Intersection *isect_array,
+ int subsurface_object, uint *lcg_state, int max_hits)
+{
+ /* todo:
+ * - test if pushing distance on the stack helps (for non shadow rays)
+ * - separate version for shadow rays
+ * - likely and unlikely for if() statements
+ * - SSE for hair
+ * - test restrict attribute for pointers
+ */
+
+ /* traversal stack in CUDA thread-local memory */
+ int traversalStack[BVH_STACK_SIZE];
+ traversalStack[0] = ENTRYPOINT_SENTINEL;
+
+ /* traversal variables in registers */
+ int stackPtr = 0;
+ int nodeAddr = kernel_data.bvh.root;
+
+ /* ray parameters in registers */
+ const float tmax = ray->t;
+ float3 P = ray->P;
+ float3 idir = bvh_inverse_direction(ray->D);
+ int object = ~0;
+
+ const uint visibility = ~0;
+ uint num_hits = 0;
+
+#if FEATURE(BVH_MOTION)
+ Transform ob_tfm;
+#endif
+
+#if defined(__KERNEL_SSE2__)
+ const shuffle_swap_t shuf_identity = shuffle_swap_identity();
+ const shuffle_swap_t shuf_swap = shuffle_swap_swap();
+
+ const __m128i pn = _mm_set_epi32(0x80000000, 0x80000000, 0x00000000, 0x00000000);
+ __m128 Psplat[3], idirsplat[3];
+
+ Psplat[0] = _mm_set_ps1(P.x);
+ Psplat[1] = _mm_set_ps1(P.y);
+ Psplat[2] = _mm_set_ps1(P.z);
+
+ idirsplat[0] = _mm_xor_ps(_mm_set_ps1(idir.x), _mm_castsi128_ps(pn));
+ idirsplat[1] = _mm_xor_ps(_mm_set_ps1(idir.y), _mm_castsi128_ps(pn));
+ idirsplat[2] = _mm_xor_ps(_mm_set_ps1(idir.z), _mm_castsi128_ps(pn));
+
+ __m128 tsplat = _mm_set_ps(-tmax, -tmax, 0.0f, 0.0f);
+
+ shuffle_swap_t shufflex = (idir.x >= 0)? shuf_identity: shuf_swap;
+ shuffle_swap_t shuffley = (idir.y >= 0)? shuf_identity: shuf_swap;
+ shuffle_swap_t shufflez = (idir.z >= 0)? shuf_identity: shuf_swap;
+#endif
+
+ /* traversal loop */
+ do {
+ do
+ {
+ /* traverse internal nodes */
+ while(nodeAddr >= 0 && nodeAddr != ENTRYPOINT_SENTINEL)
+ {
+ bool traverseChild0, traverseChild1;
+ int nodeAddrChild1;
+
+#if !defined(__KERNEL_SSE2__)
+ /* Intersect two child bounding boxes, non-SSE version */
+ float t = tmax;
+
+ /* fetch node data */
+ float4 node0 = kernel_tex_fetch(__bvh_nodes, nodeAddr*BVH_NODE_SIZE+0);
+ float4 node1 = kernel_tex_fetch(__bvh_nodes, nodeAddr*BVH_NODE_SIZE+1);
+ float4 node2 = kernel_tex_fetch(__bvh_nodes, nodeAddr*BVH_NODE_SIZE+2);
+ float4 cnodes = kernel_tex_fetch(__bvh_nodes, nodeAddr*BVH_NODE_SIZE+3);
+
+ /* intersect ray against child nodes */
+ NO_EXTENDED_PRECISION float c0lox = (node0.x - P.x) * idir.x;
+ NO_EXTENDED_PRECISION float c0hix = (node0.z - P.x) * idir.x;
+ NO_EXTENDED_PRECISION float c0loy = (node1.x - P.y) * idir.y;
+ NO_EXTENDED_PRECISION float c0hiy = (node1.z - P.y) * idir.y;
+ NO_EXTENDED_PRECISION float c0loz = (node2.x - P.z) * idir.z;
+ NO_EXTENDED_PRECISION float c0hiz = (node2.z - P.z) * idir.z;
+ NO_EXTENDED_PRECISION float c0min = max4(min(c0lox, c0hix), min(c0loy, c0hiy), min(c0loz, c0hiz), 0.0f);
+ NO_EXTENDED_PRECISION float c0max = min4(max(c0lox, c0hix), max(c0loy, c0hiy), max(c0loz, c0hiz), t);
+
+ NO_EXTENDED_PRECISION float c1lox = (node0.y - P.x) * idir.x;
+ NO_EXTENDED_PRECISION float c1hix = (node0.w - P.x) * idir.x;
+ NO_EXTENDED_PRECISION float c1loy = (node1.y - P.y) * idir.y;
+ NO_EXTENDED_PRECISION float c1hiy = (node1.w - P.y) * idir.y;
+ NO_EXTENDED_PRECISION float c1loz = (node2.y - P.z) * idir.z;
+ NO_EXTENDED_PRECISION float c1hiz = (node2.w - P.z) * idir.z;
+ NO_EXTENDED_PRECISION float c1min = max4(min(c1lox, c1hix), min(c1loy, c1hiy), min(c1loz, c1hiz), 0.0f);
+ NO_EXTENDED_PRECISION float c1max = min4(max(c1lox, c1hix), max(c1loy, c1hiy), max(c1loz, c1hiz), t);
+
+ /* decide which nodes to traverse next */
+#ifdef __VISIBILITY_FLAG__
+ /* this visibility test gives a 5% performance hit, how to solve? */
+ traverseChild0 = (c0max >= c0min) && (__float_as_uint(cnodes.z) & visibility);
+ traverseChild1 = (c1max >= c1min) && (__float_as_uint(cnodes.w) & visibility);
+#else
+ traverseChild0 = (c0max >= c0min);
+ traverseChild1 = (c1max >= c1min);
+#endif
+
+#else // __KERNEL_SSE2__
+ /* Intersect two child bounding boxes, SSE3 version adapted from Embree */
+
+ /* fetch node data */
+ __m128 *bvh_nodes = (__m128*)kg->__bvh_nodes.data + nodeAddr*BVH_NODE_SIZE;
+ float4 cnodes = ((float4*)bvh_nodes)[3];
+
+ /* intersect ray against child nodes */
+ const __m128 tminmaxx = _mm_mul_ps(_mm_sub_ps(shuffle_swap(bvh_nodes[0], shufflex), Psplat[0]), idirsplat[0]);
+ const __m128 tminmaxy = _mm_mul_ps(_mm_sub_ps(shuffle_swap(bvh_nodes[1], shuffley), Psplat[1]), idirsplat[1]);
+ const __m128 tminmaxz = _mm_mul_ps(_mm_sub_ps(shuffle_swap(bvh_nodes[2], shufflez), Psplat[2]), idirsplat[2]);
+
+ const __m128 tminmax = _mm_xor_ps(_mm_max_ps(_mm_max_ps(tminmaxx, tminmaxy), _mm_max_ps(tminmaxz, tsplat)), _mm_castsi128_ps(pn));
+ const __m128 lrhit = _mm_cmple_ps(tminmax, shuffle_swap(tminmax, shuf_swap));
+
+ /* decide which nodes to traverse next */
+#ifdef __VISIBILITY_FLAG__
+ /* this visibility test gives a 5% performance hit, how to solve? */
+ traverseChild0 = (_mm_movemask_ps(lrhit) & 1) && (__float_as_uint(cnodes.z) & visibility);
+ traverseChild1 = (_mm_movemask_ps(lrhit) & 2) && (__float_as_uint(cnodes.w) & visibility);
+#else
+ traverseChild0 = (_mm_movemask_ps(lrhit) & 1);
+ traverseChild1 = (_mm_movemask_ps(lrhit) & 2);
+#endif
+#endif // __KERNEL_SSE2__
+
+ nodeAddr = __float_as_int(cnodes.x);
+ nodeAddrChild1 = __float_as_int(cnodes.y);
+
+ if(traverseChild0 && traverseChild1) {
+ /* both children were intersected, push the farther one */
+#if !defined(__KERNEL_SSE2__)
+ bool closestChild1 = (c1min < c0min);
+#else
+ union { __m128 m128; float v[4]; } uminmax;
+ uminmax.m128 = tminmax;
+ bool closestChild1 = uminmax.v[1] < uminmax.v[0];
+#endif
+
+ if(closestChild1) {
+ int tmp = nodeAddr;
+ nodeAddr = nodeAddrChild1;
+ nodeAddrChild1 = tmp;
+ }
+
+ ++stackPtr;
+ traversalStack[stackPtr] = nodeAddrChild1;
+ }
+ else {
+ /* one child was intersected */
+ if(traverseChild1) {
+ nodeAddr = nodeAddrChild1;
+ }
+ else if(!traverseChild0) {
+ /* neither child was intersected */
+ nodeAddr = traversalStack[stackPtr];
+ --stackPtr;
+ }
+ }
+ }
+
+ /* if node is leaf, fetch triangle list */
+ if(nodeAddr < 0) {
+ float4 leaf = kernel_tex_fetch(__bvh_nodes, (-nodeAddr-1)*BVH_NODE_SIZE+(BVH_NODE_SIZE-1));
+ int primAddr = __float_as_int(leaf.x);
+
+#if FEATURE(BVH_INSTANCING)
+ if(primAddr >= 0) {
+#endif
+ int primAddr2 = __float_as_int(leaf.y);
+
+ /* pop */
+ nodeAddr = traversalStack[stackPtr];
+ --stackPtr;
+
+ /* primitive intersection */
+ for(; primAddr < primAddr2; primAddr++) {
+#if FEATURE(BVH_HAIR)
+ uint segment = kernel_tex_fetch(__prim_segment, primAddr);
+ if(segment != ~0)
+ continue;
+#endif
+
+ /* only primitives from the same object */
+ uint tri_object = (object == ~0)? kernel_tex_fetch(__prim_object, primAddr): object;
+
+ if(tri_object == subsurface_object) {
+
+ /* intersect ray against primitive */
+ bvh_triangle_intersect_subsurface(kg, isect_array, P, idir, object, primAddr, tmax, &num_hits, lcg_state, max_hits);
+ }
+ }
+ }
+#if FEATURE(BVH_INSTANCING)
+ else {
+ /* instance push */
+ if(subsurface_object == kernel_tex_fetch(__prim_object, -primAddr-1)) {
+ object = subsurface_object;
+
+ float t_ignore = FLT_MAX;
+#if FEATURE(BVH_MOTION)
+ bvh_instance_motion_push(kg, object, ray, &P, &idir, &t_ignore, &ob_tfm, tmax);
+#else
+ bvh_instance_push(kg, object, ray, &P, &idir, &t_ignore, tmax);
+#endif
+
+#if defined(__KERNEL_SSE2__)
+ Psplat[0] = _mm_set_ps1(P.x);
+ Psplat[1] = _mm_set_ps1(P.y);
+ Psplat[2] = _mm_set_ps1(P.z);
+
+ idirsplat[0] = _mm_xor_ps(_mm_set_ps1(idir.x), _mm_castsi128_ps(pn));
+ idirsplat[1] = _mm_xor_ps(_mm_set_ps1(idir.y), _mm_castsi128_ps(pn));
+ idirsplat[2] = _mm_xor_ps(_mm_set_ps1(idir.z), _mm_castsi128_ps(pn));
+
+ tsplat = _mm_set_ps(-tmax, -tmax, 0.0f, 0.0f);
+
+ shufflex = (idir.x >= 0)? shuf_identity: shuf_swap;
+ shuffley = (idir.y >= 0)? shuf_identity: shuf_swap;
+ shufflez = (idir.z >= 0)? shuf_identity: shuf_swap;
+#endif
+
+ ++stackPtr;
+ traversalStack[stackPtr] = ENTRYPOINT_SENTINEL;
+
+ nodeAddr = kernel_tex_fetch(__object_node, object);
+ }
+ else {
+ /* pop */
+ nodeAddr = traversalStack[stackPtr];
+ --stackPtr;
+ }
+ }
+ }
+#endif
+ } while(nodeAddr != ENTRYPOINT_SENTINEL);
+
+#if FEATURE(BVH_INSTANCING)
+ if(stackPtr >= 0) {
+ kernel_assert(object != ~0);
+
+ /* instance pop */
+ float t_ignore = FLT_MAX;
+#if FEATURE(BVH_MOTION)
+ bvh_instance_motion_pop(kg, object, ray, &P, &idir, &t_ignore, &ob_tfm, tmax);
+#else
+ bvh_instance_pop(kg, object, ray, &P, &idir, &t_ignore, tmax);
+#endif
+
+#if defined(__KERNEL_SSE2__)
+ Psplat[0] = _mm_set_ps1(P.x);
+ Psplat[1] = _mm_set_ps1(P.y);
+ Psplat[2] = _mm_set_ps1(P.z);
+
+ idirsplat[0] = _mm_xor_ps(_mm_set_ps1(idir.x), _mm_castsi128_ps(pn));
+ idirsplat[1] = _mm_xor_ps(_mm_set_ps1(idir.y), _mm_castsi128_ps(pn));
+ idirsplat[2] = _mm_xor_ps(_mm_set_ps1(idir.z), _mm_castsi128_ps(pn));
+
+ tsplat = _mm_set_ps(-tmax, -tmax, 0.0f, 0.0f);
+
+ shufflex = (idir.x >= 0)? shuf_identity: shuf_swap;
+ shuffley = (idir.y >= 0)? shuf_identity: shuf_swap;
+ shufflez = (idir.z >= 0)? shuf_identity: shuf_swap;
+#endif
+
+ object = ~0;
+ nodeAddr = traversalStack[stackPtr];
+ --stackPtr;
+ }
+#endif
+ } while(nodeAddr != ENTRYPOINT_SENTINEL);
+
+ return num_hits;
+}
+
+#undef FEATURE
+#undef BVH_FUNCTION_NAME
+#undef BVH_FUNCTION_FEATURES
+
diff --git a/intern/cycles/kernel/kernel_bvh_traversal.h b/intern/cycles/kernel/kernel_bvh_traversal.h
index cfca405e7a5..a9264f318eb 100644
--- a/intern/cycles/kernel/kernel_bvh_traversal.h
+++ b/intern/cycles/kernel/kernel_bvh_traversal.h
@@ -24,7 +24,6 @@
* BVH_INSTANCING: object instancing
* BVH_HAIR: hair curve rendering
* BVH_HAIR_MINIMUM_WIDTH: hair curve rendering with minimum width
- * BVH_SUBSURFACE: subsurface same object, random triangle intersection
* BVH_MOTION: motion blur rendering
*
*/
@@ -32,13 +31,8 @@
#define FEATURE(f) (((BVH_FUNCTION_FEATURES) & (f)) != 0)
__device bool BVH_FUNCTION_NAME
-(KernelGlobals *kg, const Ray *ray, Intersection *isect
-#if FEATURE(BVH_SUBSURFACE)
-, int subsurface_object, float subsurface_random
-#else
-, const uint visibility
-#endif
-#if FEATURE(BVH_HAIR_MINIMUM_WIDTH) && !FEATURE(BVH_SUBSURFACE)
+(KernelGlobals *kg, const Ray *ray, Intersection *isect, const uint visibility
+#if FEATURE(BVH_HAIR_MINIMUM_WIDTH)
, uint *lcg_state, float difl, float extmax
#endif
)
@@ -65,11 +59,6 @@ __device bool BVH_FUNCTION_NAME
float3 idir = bvh_inverse_direction(ray->D);
int object = ~0;
-#if FEATURE(BVH_SUBSURFACE)
- const uint visibility = ~0;
- int num_hits = 0;
-#endif
-
#if FEATURE(BVH_MOTION)
Transform ob_tfm;
#endif
@@ -141,7 +130,7 @@ __device bool BVH_FUNCTION_NAME
NO_EXTENDED_PRECISION float c1min = max4(min(c1lox, c1hix), min(c1loy, c1hiy), min(c1loz, c1hiz), 0.0f);
NO_EXTENDED_PRECISION float c1max = min4(max(c1lox, c1hix), max(c1loy, c1hiy), max(c1loz, c1hiz), t);
-#if FEATURE(BVH_HAIR_MINIMUM_WIDTH) && !FEATURE(BVH_SUBSURFACE)
+#if FEATURE(BVH_HAIR_MINIMUM_WIDTH)
if(difl != 0.0f) {
float hdiff = 1.0f + difl;
float ldiff = 1.0f - difl;
@@ -245,59 +234,37 @@ __device bool BVH_FUNCTION_NAME
while(primAddr < primAddr2) {
bool hit;
-#if FEATURE(BVH_SUBSURFACE)
- /* only primitives from the same object */
- uint tri_object = (object == ~0)? kernel_tex_fetch(__prim_object, primAddr): object;
-
- if(tri_object == subsurface_object) {
-#endif
-
- /* intersect ray against primitive */
+ /* intersect ray against primitive */
#if FEATURE(BVH_HAIR)
- uint segment = kernel_tex_fetch(__prim_segment, primAddr);
-#if !FEATURE(BVH_SUBSURFACE)
- if(segment != ~0) {
+ uint segment = kernel_tex_fetch(__prim_segment, primAddr);
+ if(segment != ~0) {
- if(kernel_data.curve.curveflags & CURVE_KN_INTERPOLATE)
+ if(kernel_data.curve.curveflags & CURVE_KN_INTERPOLATE)
#if FEATURE(BVH_HAIR_MINIMUM_WIDTH)
- hit = bvh_cardinal_curve_intersect(kg, isect, P, idir, visibility, object, primAddr, segment, lcg_state, difl, extmax);
- else
- hit = bvh_curve_intersect(kg, isect, P, idir, visibility, object, primAddr, segment, lcg_state, difl, extmax);
+ hit = bvh_cardinal_curve_intersect(kg, isect, P, idir, visibility, object, primAddr, segment, lcg_state, difl, extmax);
+ else
+ hit = bvh_curve_intersect(kg, isect, P, idir, visibility, object, primAddr, segment, lcg_state, difl, extmax);
#else
- hit = bvh_cardinal_curve_intersect(kg, isect, P, idir, visibility, object, primAddr, segment);
- else
- hit = bvh_curve_intersect(kg, isect, P, idir, visibility, object, primAddr, segment);
-#endif
- }
+ hit = bvh_cardinal_curve_intersect(kg, isect, P, idir, visibility, object, primAddr, segment);
else
+ hit = bvh_curve_intersect(kg, isect, P, idir, visibility, object, primAddr, segment);
#endif
-#endif
-#if FEATURE(BVH_SUBSURFACE)
-#if FEATURE(BVH_HAIR)
- if(segment == ~0)
-#endif
- {
- hit = bvh_triangle_intersect_subsurface(kg, isect, P, idir, object, primAddr, tmax, &num_hits, subsurface_random);
- (void)hit;
- }
-
}
-#else
- hit = bvh_triangle_intersect(kg, isect, P, idir, visibility, object, primAddr);
+ else
+#endif
+ hit = bvh_triangle_intersect(kg, isect, P, idir, visibility, object, primAddr);
- /* shadow ray early termination */
+ /* shadow ray early termination */
#if defined(__KERNEL_SSE2__) && !FEATURE(BVH_HAIR_MINIMUM_WIDTH)
- if(hit) {
- if(visibility == PATH_RAY_SHADOW_OPAQUE)
- return true;
-
- tsplat = _mm_set_ps(-isect->t, -isect->t, 0.0f, 0.0f);
- }
-#else
- if(hit && visibility == PATH_RAY_SHADOW_OPAQUE)
+ if(hit) {
+ if(visibility == PATH_RAY_SHADOW_OPAQUE)
return true;
-#endif
+ tsplat = _mm_set_ps(-isect->t, -isect->t, 0.0f, 0.0f);
+ }
+#else
+ if(hit && visibility == PATH_RAY_SHADOW_OPAQUE)
+ return true;
#endif
primAddr++;
@@ -306,47 +273,34 @@ __device bool BVH_FUNCTION_NAME
#if FEATURE(BVH_INSTANCING)
else {
/* instance push */
-#if FEATURE(BVH_SUBSURFACE)
- if(subsurface_object == kernel_tex_fetch(__prim_object, -primAddr-1)) {
- object = subsurface_object;
-#else
- object = kernel_tex_fetch(__prim_object, -primAddr-1);
-#endif
+ object = kernel_tex_fetch(__prim_object, -primAddr-1);
#if FEATURE(BVH_MOTION)
- bvh_instance_motion_push(kg, object, ray, &P, &idir, &isect->t, &ob_tfm, tmax);
+ bvh_instance_motion_push(kg, object, ray, &P, &idir, &isect->t, &ob_tfm, tmax);
#else
- bvh_instance_push(kg, object, ray, &P, &idir, &isect->t, tmax);
+ bvh_instance_push(kg, object, ray, &P, &idir, &isect->t, tmax);
#endif
#if defined(__KERNEL_SSE2__) && !FEATURE(BVH_HAIR_MINIMUM_WIDTH)
- Psplat[0] = _mm_set_ps1(P.x);
- Psplat[1] = _mm_set_ps1(P.y);
- Psplat[2] = _mm_set_ps1(P.z);
+ Psplat[0] = _mm_set_ps1(P.x);
+ Psplat[1] = _mm_set_ps1(P.y);
+ Psplat[2] = _mm_set_ps1(P.z);
- idirsplat[0] = _mm_xor_ps(_mm_set_ps1(idir.x), _mm_castsi128_ps(pn));
- idirsplat[1] = _mm_xor_ps(_mm_set_ps1(idir.y), _mm_castsi128_ps(pn));
- idirsplat[2] = _mm_xor_ps(_mm_set_ps1(idir.z), _mm_castsi128_ps(pn));
+ idirsplat[0] = _mm_xor_ps(_mm_set_ps1(idir.x), _mm_castsi128_ps(pn));
+ idirsplat[1] = _mm_xor_ps(_mm_set_ps1(idir.y), _mm_castsi128_ps(pn));
+ idirsplat[2] = _mm_xor_ps(_mm_set_ps1(idir.z), _mm_castsi128_ps(pn));
- tsplat = _mm_set_ps(-isect->t, -isect->t, 0.0f, 0.0f);
+ tsplat = _mm_set_ps(-isect->t, -isect->t, 0.0f, 0.0f);
- shufflex = (idir.x >= 0)? shuf_identity: shuf_swap;
- shuffley = (idir.y >= 0)? shuf_identity: shuf_swap;
- shufflez = (idir.z >= 0)? shuf_identity: shuf_swap;
+ shufflex = (idir.x >= 0)? shuf_identity: shuf_swap;
+ shuffley = (idir.y >= 0)? shuf_identity: shuf_swap;
+ shufflez = (idir.z >= 0)? shuf_identity: shuf_swap;
#endif
- ++stackPtr;
- traversalStack[stackPtr] = ENTRYPOINT_SENTINEL;
+ ++stackPtr;
+ traversalStack[stackPtr] = ENTRYPOINT_SENTINEL;
- nodeAddr = kernel_tex_fetch(__object_node, object);
-#if FEATURE(BVH_SUBSURFACE)
- }
- else {
- /* pop */
- nodeAddr = traversalStack[stackPtr];
- --stackPtr;
- }
-#endif
+ nodeAddr = kernel_tex_fetch(__object_node, object);
}
}
#endif
@@ -386,11 +340,7 @@ __device bool BVH_FUNCTION_NAME
#endif
} while(nodeAddr != ENTRYPOINT_SENTINEL);
-#if FEATURE(BVH_SUBSURFACE)
- return (num_hits != 0);
-#else
return (isect->prim != ~0);
-#endif
}
#undef FEATURE
diff --git a/intern/cycles/kernel/kernel_camera.h b/intern/cycles/kernel/kernel_camera.h
index c3cffc15ebe..966f28df05f 100644
--- a/intern/cycles/kernel/kernel_camera.h
+++ b/intern/cycles/kernel/kernel_camera.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/kernel_compat_cpu.h b/intern/cycles/kernel/kernel_compat_cpu.h
index a32b33a727a..9d3ffcdfce2 100644
--- a/intern/cycles/kernel/kernel_compat_cpu.h
+++ b/intern/cycles/kernel/kernel_compat_cpu.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __KERNEL_COMPAT_CPU_H__
diff --git a/intern/cycles/kernel/kernel_compat_cuda.h b/intern/cycles/kernel/kernel_compat_cuda.h
index a11f8f403cd..44c2b9effe9 100644
--- a/intern/cycles/kernel/kernel_compat_cuda.h
+++ b/intern/cycles/kernel/kernel_compat_cuda.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __KERNEL_COMPAT_CUDA_H__
@@ -27,8 +25,6 @@
#include <cuda.h>
#include <float.h>
-#include "util_types.h"
-
/* Qualifier wrappers for different names on different devices */
#define __device __device__ __inline__
@@ -43,6 +39,10 @@
#define kernel_assert(cond)
+/* Types */
+
+#include "util_types.h"
+
/* Textures */
typedef texture<float4, 1> texture_float4;
@@ -57,7 +57,18 @@ typedef texture<uchar4, 2, cudaReadModeNormalizedFloat> texture_image_uchar4;
/* Macros to handle different memory storage on different devices */
+/* In order to use full 6GB of memory on Titan cards, use arrays instead
+ * of textures. On earlier cards this seems slower, but on Titan it is
+ * actually slightly faster in tests. */
+#if __CUDA_ARCH__ < 350
+#define __KERNEL_CUDA_TEX_STORAGE__
+#endif
+
+#ifdef __KERNEL_CUDA_TEX_STORAGE__
#define kernel_tex_fetch(t, index) tex1Dfetch(t, index)
+#else
+#define kernel_tex_fetch(t, index) t[(index)]
+#endif
#define kernel_tex_image_interp(t, x, y) tex2D(t, x, y)
#define kernel_data __data
diff --git a/intern/cycles/kernel/kernel_compat_opencl.h b/intern/cycles/kernel/kernel_compat_opencl.h
index c4cb7a516c2..e0102a01146 100644
--- a/intern/cycles/kernel/kernel_compat_opencl.h
+++ b/intern/cycles/kernel/kernel_compat_opencl.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __KERNEL_COMPAT_OPENCL_H__
diff --git a/intern/cycles/kernel/kernel_curve.h b/intern/cycles/kernel/kernel_curve.h
index b9637e7df8b..9f7a1388a2b 100644
--- a/intern/cycles/kernel/kernel_curve.h
+++ b/intern/cycles/kernel/kernel_curve.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
@@ -120,15 +118,13 @@ __device float3 curve_tangent_normal(KernelGlobals *kg, ShaderData *sd)
float3 tgN = make_float3(0.0f,0.0f,0.0f);
if(sd->segment != ~0) {
- float normalmix = kernel_data.curve.normalmix;
- tgN = -(-sd->I - sd->dPdu * (dot(sd->dPdu,-sd->I) * normalmix / len_squared(sd->dPdu)));
+ tgN = -(-sd->I - sd->dPdu * (dot(sd->dPdu,-sd->I) / len_squared(sd->dPdu)));
tgN = normalize(tgN);
/* need to find suitable scaled gd for corrected normal */
#if 0
- if (kernel_data.curve.use_tangent_normal_correction)
- tgN = normalize(tgN - gd * sd->dPdu);
+ tgN = normalize(tgN - gd * sd->dPdu);
#endif
}
diff --git a/intern/cycles/kernel/kernel_differential.h b/intern/cycles/kernel/kernel_differential.h
index c5332786f8b..71d6e87a4d9 100644
--- a/intern/cycles/kernel/kernel_differential.h
+++ b/intern/cycles/kernel/kernel_differential.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/kernel_displace.h b/intern/cycles/kernel/kernel_displace.h
index b4ece1610be..38152b5571e 100644
--- a/intern/cycles/kernel/kernel_displace.h
+++ b/intern/cycles/kernel/kernel_displace.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/kernel_emission.h b/intern/cycles/kernel/kernel_emission.h
index a6bd3ed2850..0c8d69fb594 100644
--- a/intern/cycles/kernel/kernel_emission.h
+++ b/intern/cycles/kernel/kernel_emission.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
@@ -78,7 +76,7 @@ __device_noinline bool direct_emission(KernelGlobals *kg, ShaderData *sd, int li
{
LightSample ls;
-#ifdef __NON_PROGRESSIVE__
+#ifdef __BRANCHED_PATH__
if(lindex != -1) {
/* sample position on a specified light */
light_select(kg, lindex, randu, randv, sd->P, &ls);
diff --git a/intern/cycles/kernel/kernel_film.h b/intern/cycles/kernel/kernel_film.h
index 293b557a38e..721eceabc37 100644
--- a/intern/cycles/kernel/kernel_film.h
+++ b/intern/cycles/kernel/kernel_film.h
@@ -1,26 +1,23 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
-__device float4 film_map(KernelGlobals *kg, float4 irradiance, int sample)
+__device float4 film_map(KernelGlobals *kg, float4 irradiance, float scale)
{
- float scale = 1.0f/(float)(sample+1);
float exposure = kernel_data.film.exposure;
float4 result = irradiance*scale;
@@ -48,9 +45,9 @@ __device uchar4 film_float_to_byte(float4 color)
return result;
}
-__device void kernel_film_tonemap(KernelGlobals *kg,
+__device void kernel_film_convert_to_byte(KernelGlobals *kg,
__global uchar4 *rgba, __global float *buffer,
- int sample, int x, int y, int offset, int stride)
+ float sample_scale, int x, int y, int offset, int stride)
{
/* buffer offset */
int index = offset + x + y*stride;
@@ -60,11 +57,25 @@ __device void kernel_film_tonemap(KernelGlobals *kg,
/* map colors */
float4 irradiance = *((__global float4*)buffer);
- float4 float_result = film_map(kg, irradiance, sample);
+ float4 float_result = film_map(kg, irradiance, sample_scale);
uchar4 byte_result = film_float_to_byte(float_result);
*rgba = byte_result;
}
+__device void kernel_film_convert_to_half_float(KernelGlobals *kg,
+ __global uchar4 *rgba, __global float *buffer,
+ float sample_scale, int x, int y, int offset, int stride)
+{
+ /* buffer offset */
+ int index = offset + x + y*stride;
+
+ __global float4 *in = (__global float4*)(buffer + index*kernel_data.film.pass_stride);
+ __global half *out = (__global half*)rgba + index*4;
+ float scale = kernel_data.film.exposure*sample_scale;
+
+ float4_store_half(out, in, scale);
+}
+
CCL_NAMESPACE_END
diff --git a/intern/cycles/kernel/kernel_globals.h b/intern/cycles/kernel/kernel_globals.h
index fbb5060c409..b5e691eb615 100644
--- a/intern/cycles/kernel/kernel_globals.h
+++ b/intern/cycles/kernel/kernel_globals.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
/* Constant Globals */
@@ -68,7 +66,11 @@ typedef struct KernelGlobals {
__constant__ KernelData __data;
typedef struct KernelGlobals {} KernelGlobals;
+#ifdef __KERNEL_CUDA_TEX_STORAGE__
#define KERNEL_TEX(type, ttype, name) ttype name;
+#else
+#define KERNEL_TEX(type, ttype, name) const __constant__ __device__ type *name;
+#endif
#define KERNEL_IMAGE_TEX(type, ttype, name) ttype name;
#include "kernel_textures.h"
diff --git a/intern/cycles/kernel/kernel_jitter.h b/intern/cycles/kernel/kernel_jitter.h
index 3e1a18ab469..18666b51c0c 100644
--- a/intern/cycles/kernel/kernel_jitter.h
+++ b/intern/cycles/kernel/kernel_jitter.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2013, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
@@ -139,6 +137,8 @@ __device_inline float cmj_randfloat(uint i, uint p)
#ifdef __CMJ__
__device float cmj_sample_1D(int s, int N, int p)
{
+ kernel_assert(s < N);
+
uint x = cmj_permute(s, N, p * 0x68bc21eb);
float jx = cmj_randfloat(s, p * 0x967a889b);
@@ -148,6 +148,8 @@ __device float cmj_sample_1D(int s, int N, int p)
__device void cmj_sample_2D(int s, int N, int p, float *fx, float *fy)
{
+ kernel_assert(s < N);
+
int m = float_to_int(sqrtf(N));
int n = (N + m - 1)/m;
float invN = 1.0f/N;
diff --git a/intern/cycles/kernel/kernel_light.h b/intern/cycles/kernel/kernel_light.h
index e25d4c20885..6b00bd2ab01 100644
--- a/intern/cycles/kernel/kernel_light.h
+++ b/intern/cycles/kernel/kernel_light.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/kernel_math.h b/intern/cycles/kernel/kernel_math.h
index 165535077da..97621db1cf3 100644
--- a/intern/cycles/kernel/kernel_math.h
+++ b/intern/cycles/kernel/kernel_math.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __KERNEL_MATH_H__
diff --git a/intern/cycles/kernel/kernel_montecarlo.h b/intern/cycles/kernel/kernel_montecarlo.h
index 7d5e4cd9df5..b3d53e00be7 100644
--- a/intern/cycles/kernel/kernel_montecarlo.h
+++ b/intern/cycles/kernel/kernel_montecarlo.h
@@ -35,8 +35,7 @@
CCL_NAMESPACE_BEGIN
-/// Given values x and y on [0,1], convert them in place to values on
-/// [-1,1] uniformly distributed over a unit sphere.
+/* distribute uniform xy on [0,1] over unit disk [-1,1] */
__device void to_unit_disk(float *x, float *y)
{
float phi = M_2PI_F * (*x);
@@ -46,17 +45,18 @@ __device void to_unit_disk(float *x, float *y)
*y = r * sinf(phi);
}
+/* return an orthogonal tangent and bitangent given a normal and tangent that
+ * may not be exactly orthogonal */
__device void make_orthonormals_tangent(const float3 N, const float3 T, float3 *a, float3 *b)
{
*b = normalize(cross(N, T));
*a = cross(*b, N);
}
+/* sample direction with cosine weighted distributed in hemisphere */
__device_inline void sample_cos_hemisphere(const float3 N,
float randu, float randv, float3 *omega_in, float *pdf)
{
- // Default closure BSDF implementation: uniformly sample
- // cosine-weighted hemisphere above the point.
to_unit_disk(&randu, &randv);
float costheta = sqrtf(max(1.0f - randu * randu - randv * randv, 0.0f));
float3 T, B;
@@ -65,6 +65,7 @@ __device_inline void sample_cos_hemisphere(const float3 N,
*pdf = costheta *M_1_PI_F;
}
+/* sample direction uniformly distributed in hemisphere */
__device_inline void sample_uniform_hemisphere(const float3 N,
float randu, float randv,
float3 *omega_in, float *pdf)
@@ -81,6 +82,7 @@ __device_inline void sample_uniform_hemisphere(const float3 N,
*pdf = 0.5f * M_1_PI_F;
}
+/* sample direction uniformly distributed in cone */
__device_inline void sample_uniform_cone(const float3 N, float angle,
float randu, float randv,
float3 *omega_in, float *pdf)
@@ -97,6 +99,7 @@ __device_inline void sample_uniform_cone(const float3 N, float angle,
*pdf = 0.5f * M_1_PI_F / (1.0f - cosf(angle));
}
+/* sample uniform point on the surface of a sphere */
__device float3 sample_uniform_sphere(float u1, float u2)
{
float z = 1.0f - 2.0f*u1;
@@ -108,54 +111,50 @@ __device float3 sample_uniform_sphere(float u1, float u2)
return make_float3(x, y, z);
}
+__device float balance_heuristic(float a, float b)
+{
+ return (a)/(a + b);
+}
+
+__device float balance_heuristic_3(float a, float b, float c)
+{
+ return (a)/(a + b + c);
+}
+
__device float power_heuristic(float a, float b)
{
return (a*a)/(a*a + b*b);
}
-__device float2 concentric_sample_disk(float u1, float u2)
+__device float power_heuristic_3(float a, float b, float c)
{
- float r, theta;
- // Map uniform random numbers to $[-1,1]^2$
- float sx = 2 * u1 - 1;
- float sy = 2 * u2 - 1;
+ return (a*a)/(a*a + b*b + c*c);
+}
- // Map square to $(r,\theta)$
+/* distribute uniform xy on [0,1] over unit disk [-1,1], with concentric mapping
+ * to better preserve stratification for some RNG sequences */
+__device float2 concentric_sample_disk(float u1, float u2)
+{
+ float phi, r;
+ float a = 2.0f*u1 - 1.0f;
+ float b = 2.0f*u2 - 1.0f;
- // Handle degeneracy at the origin
- if(sx == 0.0f && sy == 0.0f) {
+ if(a == 0.0f && b == 0.0f) {
return make_float2(0.0f, 0.0f);
}
- if(sx >= -sy) {
- if(sx > sy) {
- // Handle first region of disk
- r = sx;
- if(sy > 0.0f) theta = sy/r;
- else theta = 8.0f + sy/r;
- }
- else {
- // Handle second region of disk
- r = sy;
- theta = 2.0f - sx/r;
- }
+ else if(a*a > b*b) {
+ r = a;
+ phi = M_PI_4_F * (b/a);
}
else {
- if(sx <= sy) {
- // Handle third region of disk
- r = -sx;
- theta = 4.0f - sy/r;
- }
- else {
- // Handle fourth region of disk
- r = -sy;
- theta = 6.0f + sx/r;
- }
+ r = b;
+ phi = M_PI_2_F - M_PI_4_F * (a/b);
}
- theta *= M_PI_4_F;
- return make_float2(r * cosf(theta), r * sinf(theta));
+ return make_float2(r*cosf(phi), r*sinf(phi));
}
+/* sample point in unit polygon with given number of corners and rotation */
__device float2 regular_polygon_sample(float corners, float rotation, float u, float v)
{
/* sample corner number and reuse u */
diff --git a/intern/cycles/kernel/kernel_object.h b/intern/cycles/kernel/kernel_object.h
index 3cd7738f6b8..d0aae119476 100644
--- a/intern/cycles/kernel/kernel_object.h
+++ b/intern/cycles/kernel/kernel_object.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/kernel_passes.h b/intern/cycles/kernel/kernel_passes.h
index 4b8d6f84faa..5e91b13f90c 100644
--- a/intern/cycles/kernel/kernel_passes.h
+++ b/intern/cycles/kernel/kernel_passes.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
@@ -110,8 +108,8 @@ __device_inline void kernel_write_data_passes(KernelGlobals *kg, __global float
mist = powf(mist, mist_falloff);
/* modulate by transparency */
- float3 alpha = throughput*(make_float3(1.0f, 1.0f, 1.0f) - shader_bsdf_transparency(kg, sd));
- L->mist += (1.0f - mist)*average(alpha);
+ float3 alpha = shader_bsdf_alpha(kg, sd);
+ L->mist += (1.0f - mist)*average(throughput*alpha);
}
#endif
}
diff --git a/intern/cycles/kernel/kernel_path.h b/intern/cycles/kernel/kernel_path.h
index bf06f8dd5f6..5354738d378 100644
--- a/intern/cycles/kernel/kernel_path.h
+++ b/intern/cycles/kernel/kernel_path.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifdef __OSL__
@@ -36,6 +34,7 @@
#include "kernel_light.h"
#include "kernel_emission.h"
#include "kernel_passes.h"
+#include "kernel_path_state.h"
#ifdef __SUBSURFACE__
#include "kernel_subsurface.h"
@@ -43,119 +42,6 @@
CCL_NAMESPACE_BEGIN
-typedef struct PathState {
- int flag;
- int bounce;
-
- int diffuse_bounce;
- int glossy_bounce;
- int transmission_bounce;
- int transparent_bounce;
-} PathState;
-
-__device_inline void path_state_init(PathState *state)
-{
- state->flag = PATH_RAY_CAMERA|PATH_RAY_SINGULAR|PATH_RAY_MIS_SKIP;
- state->bounce = 0;
- state->diffuse_bounce = 0;
- state->glossy_bounce = 0;
- state->transmission_bounce = 0;
- state->transparent_bounce = 0;
-}
-
-__device_inline void path_state_next(KernelGlobals *kg, PathState *state, int label)
-{
- /* ray through transparent keeps same flags from previous ray and is
- * not counted as a regular bounce, transparent has separate max */
- if(label & LABEL_TRANSPARENT) {
- state->flag |= PATH_RAY_TRANSPARENT;
- state->transparent_bounce++;
-
- if(!kernel_data.integrator.transparent_shadows)
- state->flag |= PATH_RAY_MIS_SKIP;
-
- return;
- }
-
- state->bounce++;
-
- /* reflection/transmission */
- if(label & LABEL_REFLECT) {
- state->flag |= PATH_RAY_REFLECT;
- state->flag &= ~(PATH_RAY_TRANSMIT|PATH_RAY_CAMERA|PATH_RAY_TRANSPARENT);
-
- if(label & LABEL_DIFFUSE)
- state->diffuse_bounce++;
- else
- state->glossy_bounce++;
- }
- else {
- kernel_assert(label & LABEL_TRANSMIT);
-
- state->flag |= PATH_RAY_TRANSMIT;
- state->flag &= ~(PATH_RAY_REFLECT|PATH_RAY_CAMERA|PATH_RAY_TRANSPARENT);
-
- state->transmission_bounce++;
- }
-
- /* diffuse/glossy/singular */
- if(label & LABEL_DIFFUSE) {
- state->flag |= PATH_RAY_DIFFUSE;
- state->flag &= ~(PATH_RAY_GLOSSY|PATH_RAY_SINGULAR|PATH_RAY_MIS_SKIP);
- }
- else if(label & LABEL_GLOSSY) {
- state->flag |= PATH_RAY_GLOSSY;
- state->flag &= ~(PATH_RAY_DIFFUSE|PATH_RAY_SINGULAR|PATH_RAY_MIS_SKIP);
- }
- else {
- kernel_assert(label & LABEL_SINGULAR);
-
- state->flag |= PATH_RAY_GLOSSY|PATH_RAY_SINGULAR|PATH_RAY_MIS_SKIP;
- state->flag &= ~PATH_RAY_DIFFUSE;
- }
-}
-
-__device_inline uint path_state_ray_visibility(KernelGlobals *kg, PathState *state)
-{
- uint flag = state->flag;
-
- /* for visibility, diffuse/glossy are for reflection only */
- if(flag & PATH_RAY_TRANSMIT)
- flag &= ~(PATH_RAY_DIFFUSE|PATH_RAY_GLOSSY);
- /* for camera visibility, use render layer flags */
- if(flag & PATH_RAY_CAMERA)
- flag |= kernel_data.integrator.layer_flag;
-
- return flag;
-}
-
-__device_inline float path_state_terminate_probability(KernelGlobals *kg, PathState *state, const float3 throughput)
-{
- if(state->flag & PATH_RAY_TRANSPARENT) {
- /* transparent rays treated separately */
- if(state->transparent_bounce >= kernel_data.integrator.transparent_max_bounce)
- return 0.0f;
- else if(state->transparent_bounce <= kernel_data.integrator.transparent_min_bounce)
- return 1.0f;
- }
- else {
- /* other rays */
- if((state->bounce >= kernel_data.integrator.max_bounce) ||
- (state->diffuse_bounce >= kernel_data.integrator.max_diffuse_bounce) ||
- (state->glossy_bounce >= kernel_data.integrator.max_glossy_bounce) ||
- (state->transmission_bounce >= kernel_data.integrator.max_transmission_bounce))
- {
- return 0.0f;
- }
- else if(state->bounce <= kernel_data.integrator.min_bounce) {
- return 1.0f;
- }
- }
-
- /* probalistic termination */
- return average(throughput); /* todo: try using max here */
-}
-
__device_inline bool shadow_blocked(KernelGlobals *kg, PathState *state, Ray *ray, float3 *shadow)
{
*shadow = make_float3(1.0f, 1.0f, 1.0f);
@@ -233,52 +119,24 @@ __device_inline bool shadow_blocked(KernelGlobals *kg, PathState *state, Ray *ra
return result;
}
-__device float4 kernel_path_progressive(KernelGlobals *kg, RNG *rng, int sample, Ray ray, __global float *buffer)
-{
- /* initialize */
- PathRadiance L;
- float3 throughput = make_float3(1.0f, 1.0f, 1.0f);
- float L_transparent = 0.0f;
- path_radiance_init(&L, kernel_data.film.use_light_pass);
+#if defined(__BRANCHED_PATH__) || defined(__SUBSURFACE__)
- float min_ray_pdf = FLT_MAX;
- float ray_pdf = 0.0f;
+__device void kernel_path_indirect(KernelGlobals *kg, RNG *rng, int sample, Ray ray, __global float *buffer,
+ float3 throughput, int num_samples, int num_total_samples,
+ float min_ray_pdf, float ray_pdf, PathState state, int rng_offset, PathRadiance *L)
+{
#ifdef __LAMP_MIS__
float ray_t = 0.0f;
#endif
- PathState state;
- int rng_offset = PRNG_BASE_NUM;
-#ifdef __CMJ__
- int num_samples = kernel_data.integrator.aa_samples;
-#else
- int num_samples = 0;
-#endif
-
- path_state_init(&state);
/* path iteration */
for(;; rng_offset += PRNG_BOUNCE_NUM) {
/* intersect scene */
Intersection isect;
uint visibility = path_state_ray_visibility(kg, &state);
-
#ifdef __HAIR__
- float difl = 0.0f, extmax = 0.0f;
- uint lcg_state = 0;
-
- if(kernel_data.bvh.have_curves) {
- if((kernel_data.cam.resolution == 1) && (state.flag & PATH_RAY_CAMERA)) {
- float3 pixdiff = ray.dD.dx + ray.dD.dy;
- /*pixdiff = pixdiff - dot(pixdiff, ray.D)*ray.D;*/
- difl = kernel_data.curve.minimum_width * len(pixdiff) * 0.5f;
- }
-
- extmax = kernel_data.curve.maximum_width;
- lcg_state = lcg_init(*rng + rng_offset + sample*0x51633e2d);
- }
-
- bool hit = scene_intersect(kg, &ray, visibility, &isect, &lcg_state, difl, extmax);
+ bool hit = scene_intersect(kg, &ray, visibility, &isect, NULL, 0.0f, 0.0f);
#else
bool hit = scene_intersect(kg, &ray, visibility, &isect);
#endif
@@ -297,29 +155,19 @@ __device float4 kernel_path_progressive(KernelGlobals *kg, RNG *rng, int sample,
light_ray.dP = ray.dP;
/* intersect with lamp */
- float light_t = path_rng_1D(kg, rng, sample, num_samples, rng_offset + PRNG_LIGHT);
+ float light_t = path_rng_1D(kg, rng, sample, num_total_samples, rng_offset + PRNG_LIGHT);
float3 emission;
if(indirect_lamp_emission(kg, &light_ray, state.flag, ray_pdf, light_t, &emission, state.bounce))
- path_radiance_accum_emission(&L, throughput, emission, state.bounce);
+ path_radiance_accum_emission(L, throughput, emission, state.bounce);
}
#endif
if(!hit) {
- /* eval background shader if nothing hit */
- if(kernel_data.background.transparent && (state.flag & PATH_RAY_CAMERA)) {
- L_transparent += average(throughput);
-
-#ifdef __PASSES__
- if(!(kernel_data.film.pass_flag & PASS_BACKGROUND))
-#endif
- break;
- }
-
#ifdef __BACKGROUND__
/* sample background shader */
float3 L_background = indirect_background(kg, &ray, state.flag, ray_pdf, state.bounce);
- path_radiance_accum_background(&L, throughput, L_background, state.bounce);
+ path_radiance_accum_background(L, throughput, L_background, state.bounce);
#endif
break;
@@ -328,32 +176,12 @@ __device float4 kernel_path_progressive(KernelGlobals *kg, RNG *rng, int sample,
/* setup shading */
ShaderData sd;
shader_setup_from_ray(kg, &sd, &isect, &ray, state.bounce);
- float rbsdf = path_rng_1D(kg, rng, sample, num_samples, rng_offset + PRNG_BSDF);
- shader_eval_surface(kg, &sd, rbsdf, state.flag, SHADER_CONTEXT_MAIN);
-
- /* holdout */
-#ifdef __HOLDOUT__
- if((sd.flag & (SD_HOLDOUT|SD_HOLDOUT_MASK)) && (state.flag & PATH_RAY_CAMERA)) {
- if(kernel_data.background.transparent) {
- float3 holdout_weight;
-
- if(sd.flag & SD_HOLDOUT_MASK)
- holdout_weight = make_float3(1.0f, 1.0f, 1.0f);
- else
- holdout_weight = shader_holdout_eval(kg, &sd);
-
- /* any throughput is ok, should all be identical here */
- L_transparent += average(holdout_weight*throughput);
- }
-
- if(sd.flag & SD_HOLDOUT_MASK)
- break;
- }
+ float rbsdf = path_rng_1D(kg, rng, sample, num_total_samples, rng_offset + PRNG_BSDF);
+ shader_eval_surface(kg, &sd, rbsdf, state.flag, SHADER_CONTEXT_INDIRECT);
+#ifdef __BRANCHED_PATH__
+ shader_merge_closures(kg, &sd);
#endif
- /* holdout mask objects do not write data passes */
- kernel_write_data_passes(kg, buffer, &L, &sd, sample, state.flag, throughput);
-
/* blurring of bsdf after bounces, for rays that have a small likelihood
* of following this particular path (diffuse, rough glossy) */
if(kernel_data.integrator.filter_glossy != FLT_MAX) {
@@ -368,22 +196,21 @@ __device float4 kernel_path_progressive(KernelGlobals *kg, RNG *rng, int sample,
#ifdef __EMISSION__
/* emission */
if(sd.flag & SD_EMISSION) {
- /* todo: is isect.t wrong here for transparent surfaces? */
float3 emission = indirect_primitive_emission(kg, &sd, isect.t, state.flag, ray_pdf);
- path_radiance_accum_emission(&L, throughput, emission, state.bounce);
+ path_radiance_accum_emission(L, throughput, emission, state.bounce);
}
#endif
/* path termination. this is a strange place to put the termination, it's
* mainly due to the mixed in MIS that we use. gives too many unneeded
* shader evaluations, only need emission if we are going to terminate */
- float probability = path_state_terminate_probability(kg, &state, throughput);
+ float probability = path_state_terminate_probability(kg, &state, throughput*num_samples);
if(probability == 0.0f) {
break;
}
else if(probability != 1.0f) {
- float terminate = path_rng_1D(kg, rng, sample, num_samples, rng_offset + PRNG_TERMINATE);
+ float terminate = path_rng_1D(kg, rng, sample, num_total_samples, rng_offset + PRNG_TERMINATE);
if(terminate >= probability)
break;
@@ -391,36 +218,18 @@ __device float4 kernel_path_progressive(KernelGlobals *kg, RNG *rng, int sample,
throughput /= probability;
}
-#ifdef __SUBSURFACE__
- /* bssrdf scatter to a different location on the same object, replacing
- * the closures with a diffuse BSDF */
- if(sd.flag & SD_BSSRDF) {
- float bssrdf_probability;
- ShaderClosure *sc = subsurface_scatter_pick_closure(kg, &sd, &bssrdf_probability);
-
- /* modify throughput for picking bssrdf or bsdf */
- throughput *= bssrdf_probability;
-
- /* do bssrdf scatter step if we picked a bssrdf closure */
- if(sc) {
- uint lcg_state = lcg_init(*rng + rng_offset + sample*0x68bc21eb);
- subsurface_scatter_step(kg, &sd, state.flag, sc, &lcg_state, false);
- }
- }
-#endif
-
#ifdef __AO__
/* ambient occlusion */
if(kernel_data.integrator.use_ambient_occlusion || (sd.flag & SD_AO)) {
- /* todo: solve correlation */
float bsdf_u, bsdf_v;
- path_rng_2D(kg, rng, sample, num_samples, rng_offset + PRNG_BSDF_U, &bsdf_u, &bsdf_v);
+ path_rng_2D(kg, rng, sample, num_total_samples, rng_offset + PRNG_BSDF_U, &bsdf_u, &bsdf_v);
float ao_factor = kernel_data.background.ao_factor;
float3 ao_N;
float3 ao_bsdf = shader_bsdf_ao(kg, &sd, ao_factor, &ao_N);
float3 ao_D;
float ao_pdf;
+ float3 ao_alpha = make_float3(0.0f, 0.0f, 0.0f);
sample_cos_hemisphere(ao_N, bsdf_u, bsdf_v, &ao_D, &ao_pdf);
@@ -438,7 +247,30 @@ __device float4 kernel_path_progressive(KernelGlobals *kg, RNG *rng, int sample,
light_ray.dD = differential3_zero();
if(!shadow_blocked(kg, &state, &light_ray, &ao_shadow))
- path_radiance_accum_ao(&L, throughput, ao_bsdf, ao_shadow, state.bounce);
+ path_radiance_accum_ao(L, throughput, ao_alpha, ao_bsdf, ao_shadow, state.bounce);
+ }
+ }
+#endif
+
+#ifdef __SUBSURFACE__
+ /* bssrdf scatter to a different location on the same object, replacing
+ * the closures with a diffuse BSDF */
+ if(sd.flag & SD_BSSRDF) {
+ float bssrdf_probability;
+ ShaderClosure *sc = subsurface_scatter_pick_closure(kg, &sd, &bssrdf_probability);
+
+ /* modify throughput for picking bssrdf or bsdf */
+ throughput *= bssrdf_probability;
+
+ /* do bssrdf scatter step if we picked a bssrdf closure */
+ if(sc) {
+ uint lcg_state = lcg_init(*rng + rng_offset + sample*0x68bc21eb);
+
+ float bssrdf_u, bssrdf_v;
+ path_rng_2D(kg, rng, sample, num_total_samples, rng_offset + PRNG_BSDF_U, &bssrdf_u, &bssrdf_v);
+ subsurface_scatter_step(kg, &sd, state.flag, sc, &lcg_state, bssrdf_u, bssrdf_v, false);
+
+ state.flag |= PATH_RAY_BSSRDF_ANCESTOR;
}
}
#endif
@@ -447,14 +279,14 @@ __device float4 kernel_path_progressive(KernelGlobals *kg, RNG *rng, int sample,
if(kernel_data.integrator.use_direct_light) {
/* sample illumination from lights to find path contribution */
if(sd.flag & SD_BSDF_HAS_EVAL) {
- float light_t = path_rng_1D(kg, rng, sample, num_samples, rng_offset + PRNG_LIGHT);
+ float light_t = path_rng_1D(kg, rng, sample, num_total_samples, rng_offset + PRNG_LIGHT);
#ifdef __MULTI_CLOSURE__
float light_o = 0.0f;
#else
- float light_o = path_rng_1D(kg, rng, sample, num_samples, rng_offset + PRNG_LIGHT_F);
+ float light_o = path_rng_1D(kg, rng, sample, num_total_samples, rng_offset + PRNG_LIGHT_F);
#endif
float light_u, light_v;
- path_rng_2D(kg, rng, sample, num_samples, rng_offset + PRNG_LIGHT_U, &light_u, &light_v);
+ path_rng_2D(kg, rng, sample, num_total_samples, rng_offset + PRNG_LIGHT_U, &light_u, &light_v);
Ray light_ray;
BsdfEval L_light;
@@ -464,13 +296,14 @@ __device float4 kernel_path_progressive(KernelGlobals *kg, RNG *rng, int sample,
light_ray.time = sd.time;
#endif
+ /* sample random light */
if(direct_emission(kg, &sd, -1, light_t, light_o, light_u, light_v, &light_ray, &L_light, &is_lamp, state.bounce)) {
/* trace shadow ray */
float3 shadow;
if(!shadow_blocked(kg, &state, &light_ray, &shadow)) {
/* accumulate */
- path_radiance_accum_light(&L, throughput, &L_light, shadow, 1.0f, state.bounce, is_lamp);
+ path_radiance_accum_light(L, throughput, &L_light, shadow, 1.0f, state.bounce, is_lamp);
}
}
}
@@ -487,7 +320,7 @@ __device float4 kernel_path_progressive(KernelGlobals *kg, RNG *rng, int sample,
float3 bsdf_omega_in;
differential3 bsdf_domega_in;
float bsdf_u, bsdf_v;
- path_rng_2D(kg, rng, sample, num_samples, rng_offset + PRNG_BSDF_U, &bsdf_u, &bsdf_v);
+ path_rng_2D(kg, rng, sample, num_total_samples, rng_offset + PRNG_BSDF_U, &bsdf_u, &bsdf_v);
int label;
label = shader_bsdf_sample(kg, &sd, bsdf_u, bsdf_v, &bsdf_eval,
@@ -497,7 +330,7 @@ __device float4 kernel_path_progressive(KernelGlobals *kg, RNG *rng, int sample,
break;
/* modify throughput */
- path_radiance_bsdf_bounce(&L, &throughput, &bsdf_eval, bsdf_pdf, state.bounce, label);
+ path_radiance_bsdf_bounce(L, &throughput, &bsdf_eval, bsdf_pdf, state.bounce, label);
/* set labels */
if(!(label & LABEL_TRANSPARENT)) {
@@ -514,46 +347,157 @@ __device float4 kernel_path_progressive(KernelGlobals *kg, RNG *rng, int sample,
/* setup ray */
ray.P = ray_offset(sd.P, (label & LABEL_TRANSMIT)? -sd.Ng: sd.Ng);
ray.D = bsdf_omega_in;
-
- if(state.bounce == 0)
- ray.t -= sd.ray_length; /* clipping works through transparent */
- else
- ray.t = FLT_MAX;
-
+ ray.t = FLT_MAX;
#ifdef __RAY_DIFFERENTIALS__
ray.dP = sd.dP;
ray.dD = bsdf_domega_in;
#endif
}
+}
- float3 L_sum = path_radiance_sum(kg, &L);
+#endif
-#ifdef __CLAMP_SAMPLE__
- path_radiance_clamp(&L, &L_sum, kernel_data.integrator.sample_clamp);
+#ifdef __SUBSURFACE__
+
+__device_inline bool kernel_path_integrate_lighting(KernelGlobals *kg, RNG *rng,
+ int sample, int num_samples,
+ ShaderData *sd, float3 *throughput,
+ float *min_ray_pdf, float *ray_pdf, PathState *state,
+ int rng_offset, PathRadiance *L, Ray *ray, float *ray_t)
+{
+#ifdef __EMISSION__
+ if(kernel_data.integrator.use_direct_light) {
+ /* sample illumination from lights to find path contribution */
+ if(sd->flag & SD_BSDF_HAS_EVAL) {
+ float light_t = path_rng_1D(kg, rng, sample, num_samples, rng_offset + PRNG_LIGHT);
+#ifdef __MULTI_CLOSURE__
+ float light_o = 0.0f;
+#else
+ float light_o = path_rng_1D(kg, rng, sample, num_samples, rng_offset + PRNG_LIGHT_F);
#endif
+ float light_u, light_v;
+ path_rng_2D(kg, rng, sample, num_samples, rng_offset + PRNG_LIGHT_U, &light_u, &light_v);
- kernel_write_light_passes(kg, buffer, &L, sample);
+ Ray light_ray;
+ BsdfEval L_light;
+ bool is_lamp;
- return make_float4(L_sum.x, L_sum.y, L_sum.z, 1.0f - L_transparent);
+#ifdef __OBJECT_MOTION__
+ light_ray.time = sd->time;
+#endif
+
+ if(direct_emission(kg, sd, -1, light_t, light_o, light_u, light_v, &light_ray, &L_light, &is_lamp, state->bounce)) {
+ /* trace shadow ray */
+ float3 shadow;
+
+ if(!shadow_blocked(kg, state, &light_ray, &shadow)) {
+ /* accumulate */
+ path_radiance_accum_light(L, *throughput, &L_light, shadow, 1.0f, state->bounce, is_lamp);
+ }
+ }
+ }
+ }
+#endif
+
+ /* no BSDF? we can stop here */
+ if(!(sd->flag & SD_BSDF))
+ return false;
+
+ /* sample BSDF */
+ float bsdf_pdf;
+ BsdfEval bsdf_eval;
+ float3 bsdf_omega_in;
+ differential3 bsdf_domega_in;
+ float bsdf_u, bsdf_v;
+ path_rng_2D(kg, rng, sample, num_samples, rng_offset + PRNG_BSDF_U, &bsdf_u, &bsdf_v);
+ int label;
+
+ label = shader_bsdf_sample(kg, sd, bsdf_u, bsdf_v, &bsdf_eval,
+ &bsdf_omega_in, &bsdf_domega_in, &bsdf_pdf);
+
+ if(bsdf_pdf == 0.0f || bsdf_eval_is_zero(&bsdf_eval))
+ return false;
+
+ /* modify throughput */
+ path_radiance_bsdf_bounce(L, throughput, &bsdf_eval, bsdf_pdf, state->bounce, label);
+
+ /* set labels */
+ if(!(label & LABEL_TRANSPARENT)) {
+ *ray_pdf = bsdf_pdf;
+#ifdef __LAMP_MIS__
+ *ray_t = 0.0f;
+#endif
+ *min_ray_pdf = fminf(bsdf_pdf, *min_ray_pdf);
+ }
+
+ /* update path state */
+ path_state_next(kg, state, label);
+
+ /* setup ray */
+ ray->P = ray_offset(sd->P, (label & LABEL_TRANSMIT)? -sd->Ng: sd->Ng);
+ ray->D = bsdf_omega_in;
+
+ if(state->bounce == 0)
+ ray->t -= sd->ray_length; /* clipping works through transparent */
+ else
+ ray->t = FLT_MAX;
+
+#ifdef __RAY_DIFFERENTIALS__
+ ray->dP = sd->dP;
+ ray->dD = bsdf_domega_in;
+#endif
+
+ return true;
}
-#ifdef __NON_PROGRESSIVE__
+#endif
-__device void kernel_path_indirect(KernelGlobals *kg, RNG *rng, int sample, Ray ray, __global float *buffer,
- float3 throughput, int num_samples, int num_total_samples,
- float min_ray_pdf, float ray_pdf, PathState state, int rng_offset, PathRadiance *L)
+__device float4 kernel_path_integrate(KernelGlobals *kg, RNG *rng, int sample, Ray ray, __global float *buffer)
{
+ /* initialize */
+ PathRadiance L;
+ float3 throughput = make_float3(1.0f, 1.0f, 1.0f);
+ float L_transparent = 0.0f;
+
+ path_radiance_init(&L, kernel_data.film.use_light_pass);
+
+ float min_ray_pdf = FLT_MAX;
+ float ray_pdf = 0.0f;
#ifdef __LAMP_MIS__
float ray_t = 0.0f;
#endif
+ PathState state;
+ int rng_offset = PRNG_BASE_NUM;
+#ifdef __CMJ__
+ int num_samples = kernel_data.integrator.aa_samples;
+#else
+ int num_samples = 0;
+#endif
+
+ path_state_init(&state);
/* path iteration */
for(;; rng_offset += PRNG_BOUNCE_NUM) {
/* intersect scene */
Intersection isect;
uint visibility = path_state_ray_visibility(kg, &state);
+
#ifdef __HAIR__
- bool hit = scene_intersect(kg, &ray, visibility, &isect, NULL, 0.0f, 0.0f);
+ float difl = 0.0f, extmax = 0.0f;
+ uint lcg_state = 0;
+
+ if(kernel_data.bvh.have_curves) {
+ if((kernel_data.cam.resolution == 1) && (state.flag & PATH_RAY_CAMERA)) {
+ float3 pixdiff = ray.dD.dx + ray.dD.dy;
+ /*pixdiff = pixdiff - dot(pixdiff, ray.D)*ray.D;*/
+ difl = kernel_data.curve.minimum_width * len(pixdiff) * 0.5f;
+ }
+
+ extmax = kernel_data.curve.maximum_width;
+ lcg_state = lcg_init(*rng + rng_offset + sample*0x51633e2d);
+ }
+
+ bool hit = scene_intersect(kg, &ray, visibility, &isect, &lcg_state, difl, extmax);
#else
bool hit = scene_intersect(kg, &ray, visibility, &isect);
#endif
@@ -572,19 +516,29 @@ __device void kernel_path_indirect(KernelGlobals *kg, RNG *rng, int sample, Ray
light_ray.dP = ray.dP;
/* intersect with lamp */
- float light_t = path_rng_1D(kg, rng, sample, num_total_samples, rng_offset + PRNG_LIGHT);
+ float light_t = path_rng_1D(kg, rng, sample, num_samples, rng_offset + PRNG_LIGHT);
float3 emission;
if(indirect_lamp_emission(kg, &light_ray, state.flag, ray_pdf, light_t, &emission, state.bounce))
- path_radiance_accum_emission(L, throughput, emission, state.bounce);
+ path_radiance_accum_emission(&L, throughput, emission, state.bounce);
}
#endif
if(!hit) {
+ /* eval background shader if nothing hit */
+ if(kernel_data.background.transparent && (state.flag & PATH_RAY_CAMERA)) {
+ L_transparent += average(throughput);
+
+#ifdef __PASSES__
+ if(!(kernel_data.film.pass_flag & PASS_BACKGROUND))
+#endif
+ break;
+ }
+
#ifdef __BACKGROUND__
/* sample background shader */
float3 L_background = indirect_background(kg, &ray, state.flag, ray_pdf, state.bounce);
- path_radiance_accum_background(L, throughput, L_background, state.bounce);
+ path_radiance_accum_background(&L, throughput, L_background, state.bounce);
#endif
break;
@@ -593,9 +547,31 @@ __device void kernel_path_indirect(KernelGlobals *kg, RNG *rng, int sample, Ray
/* setup shading */
ShaderData sd;
shader_setup_from_ray(kg, &sd, &isect, &ray, state.bounce);
- float rbsdf = path_rng_1D(kg, rng, sample, num_total_samples, rng_offset + PRNG_BSDF);
- shader_eval_surface(kg, &sd, rbsdf, state.flag, SHADER_CONTEXT_INDIRECT);
- shader_merge_closures(kg, &sd);
+ float rbsdf = path_rng_1D(kg, rng, sample, num_samples, rng_offset + PRNG_BSDF);
+ shader_eval_surface(kg, &sd, rbsdf, state.flag, SHADER_CONTEXT_MAIN);
+
+ /* holdout */
+#ifdef __HOLDOUT__
+ if((sd.flag & (SD_HOLDOUT|SD_HOLDOUT_MASK)) && (state.flag & PATH_RAY_CAMERA)) {
+ if(kernel_data.background.transparent) {
+ float3 holdout_weight;
+
+ if(sd.flag & SD_HOLDOUT_MASK)
+ holdout_weight = make_float3(1.0f, 1.0f, 1.0f);
+ else
+ holdout_weight = shader_holdout_eval(kg, &sd);
+
+ /* any throughput is ok, should all be identical here */
+ L_transparent += average(holdout_weight*throughput);
+ }
+
+ if(sd.flag & SD_HOLDOUT_MASK)
+ break;
+ }
+#endif
+
+ /* holdout mask objects do not write data passes */
+ kernel_write_data_passes(kg, buffer, &L, &sd, sample, state.flag, throughput);
/* blurring of bsdf after bounces, for rays that have a small likelihood
* of following this particular path (diffuse, rough glossy) */
@@ -611,21 +587,22 @@ __device void kernel_path_indirect(KernelGlobals *kg, RNG *rng, int sample, Ray
#ifdef __EMISSION__
/* emission */
if(sd.flag & SD_EMISSION) {
+ /* todo: is isect.t wrong here for transparent surfaces? */
float3 emission = indirect_primitive_emission(kg, &sd, isect.t, state.flag, ray_pdf);
- path_radiance_accum_emission(L, throughput, emission, state.bounce);
+ path_radiance_accum_emission(&L, throughput, emission, state.bounce);
}
#endif
/* path termination. this is a strange place to put the termination, it's
* mainly due to the mixed in MIS that we use. gives too many unneeded
* shader evaluations, only need emission if we are going to terminate */
- float probability = path_state_terminate_probability(kg, &state, throughput*num_samples);
+ float probability = path_state_terminate_probability(kg, &state, throughput);
if(probability == 0.0f) {
break;
}
else if(probability != 1.0f) {
- float terminate = path_rng_1D(kg, rng, sample, num_total_samples, rng_offset + PRNG_TERMINATE);
+ float terminate = path_rng_1D(kg, rng, sample, num_samples, rng_offset + PRNG_TERMINATE);
if(terminate >= probability)
break;
@@ -633,35 +610,19 @@ __device void kernel_path_indirect(KernelGlobals *kg, RNG *rng, int sample, Ray
throughput /= probability;
}
-#ifdef __SUBSURFACE__
- /* bssrdf scatter to a different location on the same object, replacing
- * the closures with a diffuse BSDF */
- if(sd.flag & SD_BSSRDF) {
- float bssrdf_probability;
- ShaderClosure *sc = subsurface_scatter_pick_closure(kg, &sd, &bssrdf_probability);
-
- /* modify throughput for picking bssrdf or bsdf */
- throughput *= bssrdf_probability;
-
- /* do bssrdf scatter step if we picked a bssrdf closure */
- if(sc) {
- uint lcg_state = lcg_init(*rng + rng_offset + sample*0x68bc21eb);
- subsurface_scatter_step(kg, &sd, state.flag, sc, &lcg_state, false);
- }
- }
-#endif
-
#ifdef __AO__
/* ambient occlusion */
if(kernel_data.integrator.use_ambient_occlusion || (sd.flag & SD_AO)) {
+ /* todo: solve correlation */
float bsdf_u, bsdf_v;
- path_rng_2D(kg, rng, sample, num_total_samples, rng_offset + PRNG_BSDF_U, &bsdf_u, &bsdf_v);
+ path_rng_2D(kg, rng, sample, num_samples, rng_offset + PRNG_BSDF_U, &bsdf_u, &bsdf_v);
float ao_factor = kernel_data.background.ao_factor;
float3 ao_N;
float3 ao_bsdf = shader_bsdf_ao(kg, &sd, ao_factor, &ao_N);
float3 ao_D;
float ao_pdf;
+ float3 ao_alpha = shader_bsdf_alpha(kg, &sd);
sample_cos_hemisphere(ao_N, bsdf_u, bsdf_v, &ao_D, &ao_pdf);
@@ -679,23 +640,72 @@ __device void kernel_path_indirect(KernelGlobals *kg, RNG *rng, int sample, Ray
light_ray.dD = differential3_zero();
if(!shadow_blocked(kg, &state, &light_ray, &ao_shadow))
- path_radiance_accum_ao(L, throughput, ao_bsdf, ao_shadow, state.bounce);
+ path_radiance_accum_ao(&L, throughput, ao_alpha, ao_bsdf, ao_shadow, state.bounce);
}
}
#endif
+#ifdef __SUBSURFACE__
+ /* bssrdf scatter to a different location on the same object, replacing
+ * the closures with a diffuse BSDF */
+ if(sd.flag & SD_BSSRDF) {
+ float bssrdf_probability;
+ ShaderClosure *sc = subsurface_scatter_pick_closure(kg, &sd, &bssrdf_probability);
+
+ /* modify throughput for picking bssrdf or bsdf */
+ throughput *= bssrdf_probability;
+
+ /* do bssrdf scatter step if we picked a bssrdf closure */
+ if(sc) {
+ uint lcg_state = lcg_init(*rng + rng_offset + sample*0x68bc21eb);
+
+ ShaderData bssrdf_sd[BSSRDF_MAX_HITS];
+ float bssrdf_u, bssrdf_v;
+ path_rng_2D(kg, rng, sample, num_samples, rng_offset + PRNG_BSDF_U, &bssrdf_u, &bssrdf_v);
+ int num_hits = subsurface_scatter_multi_step(kg, &sd, bssrdf_sd, state.flag, sc, &lcg_state, bssrdf_u, bssrdf_v, false);
+
+ /* compute lighting with the BSDF closure */
+ for(int hit = 0; hit < num_hits; hit++) {
+ float3 tp = throughput;
+ PathState hit_state = state;
+ Ray hit_ray = ray;
+ float hit_ray_t = ray_t;
+ float hit_ray_pdf = ray_pdf;
+ float hit_min_ray_pdf = min_ray_pdf;
+
+ hit_state.flag |= PATH_RAY_BSSRDF_ANCESTOR;
+
+ if(kernel_path_integrate_lighting(kg, rng, sample, num_samples, &bssrdf_sd[hit],
+ &tp, &hit_min_ray_pdf, &hit_ray_pdf, &hit_state, rng_offset+PRNG_BOUNCE_NUM, &L, &hit_ray, &hit_ray_t)) {
+ kernel_path_indirect(kg, rng, sample, hit_ray, buffer,
+ tp, num_samples, num_samples,
+ hit_min_ray_pdf, hit_ray_pdf, hit_state, rng_offset+PRNG_BOUNCE_NUM*2, &L);
+
+ /* for render passes, sum and reset indirect light pass variables
+ * for the next samples */
+ path_radiance_sum_indirect(&L);
+ path_radiance_reset_indirect(&L);
+ }
+ }
+ break;
+ }
+ }
+#endif
+
+ /* The following code is the same as in kernel_path_integrate_lighting(),
+ but for CUDA the function call is slower. */
#ifdef __EMISSION__
if(kernel_data.integrator.use_direct_light) {
/* sample illumination from lights to find path contribution */
if(sd.flag & SD_BSDF_HAS_EVAL) {
- float light_t = path_rng_1D(kg, rng, sample, num_total_samples, rng_offset + PRNG_LIGHT);
+ float light_t = path_rng_1D(kg, rng, sample, num_samples, rng_offset + PRNG_LIGHT);
#ifdef __MULTI_CLOSURE__
float light_o = 0.0f;
#else
- float light_o = path_rng_1D(kg, rng, sample, num_total_samples, rng_offset + PRNG_LIGHT_F);
+ float light_o = path_rng_1D(kg, rng, sample, num_samples, rng_offset + PRNG_LIGHT_F);
#endif
float light_u, light_v;
- path_rng_2D(kg, rng, sample, num_total_samples, rng_offset + PRNG_LIGHT_U, &light_u, &light_v);
+ path_rng_2D(kg, rng, sample, num_samples, rng_offset + PRNG_LIGHT_U, &light_u, &light_v);
Ray light_ray;
BsdfEval L_light;
@@ -705,14 +715,13 @@ __device void kernel_path_indirect(KernelGlobals *kg, RNG *rng, int sample, Ray
light_ray.time = sd.time;
#endif
- /* sample random light */
if(direct_emission(kg, &sd, -1, light_t, light_o, light_u, light_v, &light_ray, &L_light, &is_lamp, state.bounce)) {
/* trace shadow ray */
float3 shadow;
if(!shadow_blocked(kg, &state, &light_ray, &shadow)) {
/* accumulate */
- path_radiance_accum_light(L, throughput, &L_light, shadow, 1.0f, state.bounce, is_lamp);
+ path_radiance_accum_light(&L, throughput, &L_light, shadow, 1.0f, state.bounce, is_lamp);
}
}
}
@@ -729,7 +738,7 @@ __device void kernel_path_indirect(KernelGlobals *kg, RNG *rng, int sample, Ray
float3 bsdf_omega_in;
differential3 bsdf_domega_in;
float bsdf_u, bsdf_v;
- path_rng_2D(kg, rng, sample, num_total_samples, rng_offset + PRNG_BSDF_U, &bsdf_u, &bsdf_v);
+ path_rng_2D(kg, rng, sample, num_samples, rng_offset + PRNG_BSDF_U, &bsdf_u, &bsdf_v);
int label;
label = shader_bsdf_sample(kg, &sd, bsdf_u, bsdf_v, &bsdf_eval,
@@ -739,7 +748,7 @@ __device void kernel_path_indirect(KernelGlobals *kg, RNG *rng, int sample, Ray
break;
/* modify throughput */
- path_radiance_bsdf_bounce(L, &throughput, &bsdf_eval, bsdf_pdf, state.bounce, label);
+ path_radiance_bsdf_bounce(&L, &throughput, &bsdf_eval, bsdf_pdf, state.bounce, label);
/* set labels */
if(!(label & LABEL_TRANSPARENT)) {
@@ -756,64 +765,37 @@ __device void kernel_path_indirect(KernelGlobals *kg, RNG *rng, int sample, Ray
/* setup ray */
ray.P = ray_offset(sd.P, (label & LABEL_TRANSMIT)? -sd.Ng: sd.Ng);
ray.D = bsdf_omega_in;
- ray.t = FLT_MAX;
+
+ if(state.bounce == 0)
+ ray.t -= sd.ray_length; /* clipping works through transparent */
+ else
+ ray.t = FLT_MAX;
+
#ifdef __RAY_DIFFERENTIALS__
ray.dP = sd.dP;
ray.dD = bsdf_domega_in;
#endif
}
-}
-
-__device_noinline void kernel_path_non_progressive_lighting(KernelGlobals *kg, RNG *rng, int sample,
- ShaderData *sd, float3 throughput, float num_samples_adjust,
- float min_ray_pdf, float ray_pdf, PathState state,
- int rng_offset, PathRadiance *L, __global float *buffer)
-{
-#ifdef __CMJ__
- int aa_samples = kernel_data.integrator.aa_samples;
-#else
- int aa_samples = 0;
-#endif
-#ifdef __AO__
- /* ambient occlusion */
- if(kernel_data.integrator.use_ambient_occlusion || (sd->flag & SD_AO)) {
- int num_samples = ceil_to_int(kernel_data.integrator.ao_samples*num_samples_adjust);
- float num_samples_inv = num_samples_adjust/num_samples;
- float ao_factor = kernel_data.background.ao_factor;
- float3 ao_N;
- float3 ao_bsdf = shader_bsdf_ao(kg, sd, ao_factor, &ao_N);
-
- for(int j = 0; j < num_samples; j++) {
- float bsdf_u, bsdf_v;
- path_rng_2D(kg, rng, sample*num_samples + j, aa_samples*num_samples, rng_offset + PRNG_BSDF_U, &bsdf_u, &bsdf_v);
-
- float3 ao_D;
- float ao_pdf;
-
- sample_cos_hemisphere(ao_N, bsdf_u, bsdf_v, &ao_D, &ao_pdf);
-
- if(dot(sd->Ng, ao_D) > 0.0f && ao_pdf != 0.0f) {
- Ray light_ray;
- float3 ao_shadow;
+ float3 L_sum = path_radiance_sum(kg, &L);
- light_ray.P = ray_offset(sd->P, sd->Ng);
- light_ray.D = ao_D;
- light_ray.t = kernel_data.background.ao_distance;
-#ifdef __OBJECT_MOTION__
- light_ray.time = sd->time;
+#ifdef __CLAMP_SAMPLE__
+ path_radiance_clamp(&L, &L_sum, kernel_data.integrator.sample_clamp);
#endif
- light_ray.dP = sd->dP;
- light_ray.dD = differential3_zero();
- if(!shadow_blocked(kg, &state, &light_ray, &ao_shadow))
- path_radiance_accum_ao(L, throughput*num_samples_inv, ao_bsdf, ao_shadow, state.bounce);
- }
- }
- }
-#endif
+ kernel_write_light_passes(kg, buffer, &L, sample);
+
+ return make_float4(L_sum.x, L_sum.y, L_sum.z, 1.0f - L_transparent);
+}
+#ifdef __BRANCHED_PATH__
+__device_noinline void kernel_branched_path_integrate_lighting(KernelGlobals *kg, RNG *rng,
+ int sample, int aa_samples,
+ ShaderData *sd, float3 throughput, float num_samples_adjust,
+ float min_ray_pdf, float ray_pdf, PathState state,
+ int rng_offset, PathRadiance *L, __global float *buffer)
+{
#ifdef __EMISSION__
/* sample illumination from lights to find path contribution */
if(sd->flag & SD_BSDF_HAS_EVAL) {
@@ -892,8 +874,10 @@ __device_noinline void kernel_path_non_progressive_lighting(KernelGlobals *kg, R
int num_samples;
- if(CLOSURE_IS_BSDF_DIFFUSE(sc->type) || CLOSURE_IS_BSDF_BSSRDF(sc->type))
+ if(CLOSURE_IS_BSDF_DIFFUSE(sc->type))
num_samples = kernel_data.integrator.diffuse_samples;
+ else if(CLOSURE_IS_BSDF_BSSRDF(sc->type))
+ num_samples = 1;
else if(CLOSURE_IS_BSDF_GLOSSY(sc->type))
num_samples = kernel_data.integrator.glossy_samples;
else
@@ -957,7 +941,7 @@ __device_noinline void kernel_path_non_progressive_lighting(KernelGlobals *kg, R
}
}
-__device float4 kernel_path_non_progressive(KernelGlobals *kg, RNG *rng, int sample, Ray ray, __global float *buffer)
+__device float4 kernel_branched_path_integrate(KernelGlobals *kg, RNG *rng, int sample, Ray ray, __global float *buffer)
{
/* initialize */
PathRadiance L;
@@ -1077,6 +1061,45 @@ __device float4 kernel_path_non_progressive(KernelGlobals *kg, RNG *rng, int sam
}
}
+#ifdef __AO__
+ /* ambient occlusion */
+ if(kernel_data.integrator.use_ambient_occlusion || (sd.flag & SD_AO)) {
+ int num_samples = kernel_data.integrator.ao_samples;
+ float num_samples_inv = 1.0f/num_samples;
+ float ao_factor = kernel_data.background.ao_factor;
+ float3 ao_N;
+ float3 ao_bsdf = shader_bsdf_ao(kg, &sd, ao_factor, &ao_N);
+ float3 ao_alpha = shader_bsdf_alpha(kg, &sd);
+
+ for(int j = 0; j < num_samples; j++) {
+ float bsdf_u, bsdf_v;
+ path_rng_2D(kg, rng, sample*num_samples + j, aa_samples*num_samples, rng_offset + PRNG_BSDF_U, &bsdf_u, &bsdf_v);
+
+ float3 ao_D;
+ float ao_pdf;
+
+ sample_cos_hemisphere(ao_N, bsdf_u, bsdf_v, &ao_D, &ao_pdf);
+
+ if(dot(sd.Ng, ao_D) > 0.0f && ao_pdf != 0.0f) {
+ Ray light_ray;
+ float3 ao_shadow;
+
+ light_ray.P = ray_offset(sd.P, sd.Ng);
+ light_ray.D = ao_D;
+ light_ray.t = kernel_data.background.ao_distance;
+#ifdef __OBJECT_MOTION__
+ light_ray.time = sd.time;
+#endif
+ light_ray.dP = sd.dP;
+ light_ray.dD = differential3_zero();
+
+ if(!shadow_blocked(kg, &state, &light_ray, &ao_shadow))
+ path_radiance_accum_ao(&L, throughput*num_samples_inv, ao_alpha, ao_bsdf, ao_shadow, state.bounce);
+ }
+ }
+ }
+#endif
+
#ifdef __SUBSURFACE__
/* bssrdf scatter to a different location on the same object */
if(sd.flag & SD_BSSRDF) {
@@ -1090,25 +1113,34 @@ __device float4 kernel_path_non_progressive(KernelGlobals *kg, RNG *rng, int sam
uint lcg_state = lcg_init(*rng + rng_offset + sample*0x68bc21eb);
int num_samples = kernel_data.integrator.subsurface_samples;
float num_samples_inv = 1.0f/num_samples;
+ RNG bssrdf_rng = cmj_hash(*rng, i);
+
+ state.flag |= PATH_RAY_BSSRDF_ANCESTOR;
/* do subsurface scatter step with copy of shader data, this will
* replace the BSSRDF with a diffuse BSDF closure */
for(int j = 0; j < num_samples; j++) {
- ShaderData bssrdf_sd = sd;
- subsurface_scatter_step(kg, &bssrdf_sd, state.flag, sc, &lcg_state, true);
-
- /* compute lighting with the BSDF closure */
- kernel_path_non_progressive_lighting(kg, rng, sample*num_samples + j,
- &bssrdf_sd, throughput, num_samples_inv,
- ray_pdf, ray_pdf, state, rng_offset, &L, buffer);
+ ShaderData bssrdf_sd[BSSRDF_MAX_HITS];
+ float bssrdf_u, bssrdf_v;
+ path_rng_2D(kg, &bssrdf_rng, sample*num_samples + j, aa_samples*num_samples, rng_offset + PRNG_BSDF_U, &bssrdf_u, &bssrdf_v);
+ int num_hits = subsurface_scatter_multi_step(kg, &sd, bssrdf_sd, state.flag, sc, &lcg_state, bssrdf_u, bssrdf_v, true);
+
+ /* compute lighting with the BSDF closure */
+ for(int hit = 0; hit < num_hits; hit++)
+ kernel_branched_path_integrate_lighting(kg, rng, sample*num_samples + j,
+ aa_samples*num_samples,
+ &bssrdf_sd[hit], throughput, num_samples_inv,
+ ray_pdf, ray_pdf, state, rng_offset+PRNG_BOUNCE_NUM, &L, buffer);
}
+
+ state.flag &= ~PATH_RAY_BSSRDF_ANCESTOR;
}
}
#endif
/* lighting */
- kernel_path_non_progressive_lighting(kg, rng, sample, &sd, throughput,
- 1.0f, ray_pdf, ray_pdf, state, rng_offset, &L, buffer);
+ kernel_branched_path_integrate_lighting(kg, rng, sample, aa_samples,
+ &sd, throughput, 1.0f, ray_pdf, ray_pdf, state, rng_offset, &L, buffer);
/* continue in case of transparency */
throughput *= shader_bsdf_transparency(kg, &sd);
@@ -1163,7 +1195,7 @@ __device_inline void kernel_path_trace_setup(KernelGlobals *kg, __global uint *r
camera_sample(kg, x, y, filter_u, filter_v, lens_u, lens_v, time, ray);
}
-__device void kernel_path_trace_progressive(KernelGlobals *kg,
+__device void kernel_path_trace(KernelGlobals *kg,
__global float *buffer, __global uint *rng_state,
int sample, int x, int y, int offset, int stride)
{
@@ -1184,7 +1216,7 @@ __device void kernel_path_trace_progressive(KernelGlobals *kg,
float4 L;
if (ray.t != 0.0f)
- L = kernel_path_progressive(kg, &rng, sample, ray, buffer);
+ L = kernel_path_integrate(kg, &rng, sample, ray, buffer);
else
L = make_float4(0.0f, 0.0f, 0.0f, 0.0f);
@@ -1194,8 +1226,8 @@ __device void kernel_path_trace_progressive(KernelGlobals *kg,
path_rng_end(kg, rng_state, rng);
}
-#ifdef __NON_PROGRESSIVE__
-__device void kernel_path_trace_non_progressive(KernelGlobals *kg,
+#ifdef __BRANCHED_PATH__
+__device void kernel_branched_path_trace(KernelGlobals *kg,
__global float *buffer, __global uint *rng_state,
int sample, int x, int y, int offset, int stride)
{
@@ -1216,7 +1248,7 @@ __device void kernel_path_trace_non_progressive(KernelGlobals *kg,
float4 L;
if (ray.t != 0.0f)
- L = kernel_path_non_progressive(kg, &rng, sample, ray, buffer);
+ L = kernel_branched_path_integrate(kg, &rng, sample, ray, buffer);
else
L = make_float4(0.0f, 0.0f, 0.0f, 0.0f);
diff --git a/intern/cycles/kernel/kernel_path_state.h b/intern/cycles/kernel/kernel_path_state.h
new file mode 100644
index 00000000000..e0e0f43fd26
--- /dev/null
+++ b/intern/cycles/kernel/kernel_path_state.h
@@ -0,0 +1,133 @@
+/*
+ * Copyright 2011-2013 Blender Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+CCL_NAMESPACE_BEGIN
+
+typedef struct PathState {
+ int flag;
+ int bounce;
+
+ int diffuse_bounce;
+ int glossy_bounce;
+ int transmission_bounce;
+ int transparent_bounce;
+} PathState;
+
+__device_inline void path_state_init(PathState *state)
+{
+ state->flag = PATH_RAY_CAMERA|PATH_RAY_SINGULAR|PATH_RAY_MIS_SKIP;
+ state->bounce = 0;
+ state->diffuse_bounce = 0;
+ state->glossy_bounce = 0;
+ state->transmission_bounce = 0;
+ state->transparent_bounce = 0;
+}
+
+__device_inline void path_state_next(KernelGlobals *kg, PathState *state, int label)
+{
+ /* ray through transparent keeps same flags from previous ray and is
+ * not counted as a regular bounce, transparent has separate max */
+ if(label & LABEL_TRANSPARENT) {
+ state->flag |= PATH_RAY_TRANSPARENT;
+ state->transparent_bounce++;
+
+ if(!kernel_data.integrator.transparent_shadows)
+ state->flag |= PATH_RAY_MIS_SKIP;
+
+ return;
+ }
+
+ state->bounce++;
+
+ /* reflection/transmission */
+ if(label & LABEL_REFLECT) {
+ state->flag |= PATH_RAY_REFLECT;
+ state->flag &= ~(PATH_RAY_TRANSMIT|PATH_RAY_CAMERA|PATH_RAY_TRANSPARENT);
+
+ if(label & LABEL_DIFFUSE)
+ state->diffuse_bounce++;
+ else
+ state->glossy_bounce++;
+ }
+ else {
+ kernel_assert(label & LABEL_TRANSMIT);
+
+ state->flag |= PATH_RAY_TRANSMIT;
+ state->flag &= ~(PATH_RAY_REFLECT|PATH_RAY_CAMERA|PATH_RAY_TRANSPARENT);
+
+ state->transmission_bounce++;
+ }
+
+ /* diffuse/glossy/singular */
+ if(label & LABEL_DIFFUSE) {
+ state->flag |= PATH_RAY_DIFFUSE|PATH_RAY_DIFFUSE_ANCESTOR;
+ state->flag &= ~(PATH_RAY_GLOSSY|PATH_RAY_SINGULAR|PATH_RAY_MIS_SKIP);
+ }
+ else if(label & LABEL_GLOSSY) {
+ state->flag |= PATH_RAY_GLOSSY|PATH_RAY_GLOSSY_ANCESTOR;
+ state->flag &= ~(PATH_RAY_DIFFUSE|PATH_RAY_SINGULAR|PATH_RAY_MIS_SKIP);
+ }
+ else {
+ kernel_assert(label & LABEL_SINGULAR);
+
+ state->flag |= PATH_RAY_GLOSSY|PATH_RAY_SINGULAR|PATH_RAY_MIS_SKIP;
+ state->flag &= ~PATH_RAY_DIFFUSE;
+ }
+}
+
+__device_inline uint path_state_ray_visibility(KernelGlobals *kg, PathState *state)
+{
+ uint flag = state->flag & PATH_RAY_ALL_VISIBILITY;
+
+ /* for visibility, diffuse/glossy are for reflection only */
+ if(flag & PATH_RAY_TRANSMIT)
+ flag &= ~(PATH_RAY_DIFFUSE|PATH_RAY_GLOSSY);
+ /* for camera visibility, use render layer flags */
+ if(flag & PATH_RAY_CAMERA)
+ flag |= kernel_data.integrator.layer_flag;
+
+ return flag;
+}
+
+__device_inline float path_state_terminate_probability(KernelGlobals *kg, PathState *state, const float3 throughput)
+{
+ if(state->flag & PATH_RAY_TRANSPARENT) {
+ /* transparent rays treated separately */
+ if(state->transparent_bounce >= kernel_data.integrator.transparent_max_bounce)
+ return 0.0f;
+ else if(state->transparent_bounce <= kernel_data.integrator.transparent_min_bounce)
+ return 1.0f;
+ }
+ else {
+ /* other rays */
+ if((state->bounce >= kernel_data.integrator.max_bounce) ||
+ (state->diffuse_bounce >= kernel_data.integrator.max_diffuse_bounce) ||
+ (state->glossy_bounce >= kernel_data.integrator.max_glossy_bounce) ||
+ (state->transmission_bounce >= kernel_data.integrator.max_transmission_bounce))
+ {
+ return 0.0f;
+ }
+ else if(state->bounce <= kernel_data.integrator.min_bounce) {
+ return 1.0f;
+ }
+ }
+
+ /* probalistic termination */
+ return average(throughput); /* todo: try using max here */
+}
+
+CCL_NAMESPACE_END
+
diff --git a/intern/cycles/kernel/kernel_primitive.h b/intern/cycles/kernel/kernel_primitive.h
index 323394cd9dc..636cfd06532 100644
--- a/intern/cycles/kernel/kernel_primitive.h
+++ b/intern/cycles/kernel/kernel_primitive.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __KERNEL_ATTRIBUTE_CL__
@@ -95,7 +93,11 @@ __device float3 primitive_tangent(KernelGlobals *kg, ShaderData *sd)
{
#ifdef __HAIR__
if(sd->segment != ~0)
+#ifdef __DPDU__
return normalize(sd->dPdu);
+#else
+ return make_float3(0.0f, 0.0f, 0.0f);
+#endif
#endif
/* try to create spherical tangent from generated coordinates */
@@ -110,7 +112,11 @@ __device float3 primitive_tangent(KernelGlobals *kg, ShaderData *sd)
}
else {
/* otherwise use surface derivatives */
+#ifdef __DPDU__
return normalize(sd->dPdu);
+#else
+ return make_float3(0.0f, 0.0f, 0.0f);
+#endif
}
}
diff --git a/intern/cycles/kernel/kernel_random.h b/intern/cycles/kernel/kernel_random.h
index c86ac34a057..dc977a8780f 100644
--- a/intern/cycles/kernel/kernel_random.h
+++ b/intern/cycles/kernel/kernel_random.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "kernel_jitter.h"
@@ -235,7 +233,14 @@ __device void path_rng_end(KernelGlobals *kg, __global uint *rng_state, RNG rng)
#endif
-__device float lcg_step(uint *rng)
+__device uint lcg_step_uint(uint *rng)
+{
+ /* implicit mod 2^32 */
+ *rng = (1103515245*(*rng) + 12345);
+ return *rng;
+}
+
+__device float lcg_step_float(uint *rng)
{
/* implicit mod 2^32 */
*rng = (1103515245*(*rng) + 12345);
@@ -245,7 +250,7 @@ __device float lcg_step(uint *rng)
__device uint lcg_init(uint seed)
{
uint rng = seed;
- lcg_step(&rng);
+ lcg_step_uint(&rng);
return rng;
}
diff --git a/intern/cycles/kernel/kernel_shader.h b/intern/cycles/kernel/kernel_shader.h
index 5dd12f98b9c..81630caed9a 100644
--- a/intern/cycles/kernel/kernel_shader.h
+++ b/intern/cycles/kernel/kernel_shader.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
/*
@@ -38,15 +36,8 @@ CCL_NAMESPACE_BEGIN
/* ShaderData setup from incoming ray */
#ifdef __OBJECT_MOTION__
-#if defined(__KERNEL_CUDA_VERSION__) && __KERNEL_CUDA_VERSION__ <= 42
-__device_noinline
-#else
-__device
-#endif
-void shader_setup_object_transforms(KernelGlobals *kg, ShaderData *sd, float time)
+__device void shader_setup_object_transforms(KernelGlobals *kg, ShaderData *sd, float time)
{
- /* note that this is a separate non-inlined function to work around crash
- * on CUDA sm 2.0, otherwise kernel execution crashes (compiler bug?) */
if(sd->flag & SD_OBJECT_MOTION) {
sd->ob_tfm = object_fetch_transform_motion(kg, sd->object, time);
sd->ob_itfm= transform_quick_inverse(sd->ob_tfm);
@@ -58,12 +49,7 @@ void shader_setup_object_transforms(KernelGlobals *kg, ShaderData *sd, float tim
}
#endif
-#if defined(__KERNEL_CUDA_VERSION__) && __KERNEL_CUDA_VERSION__ <= 42
-__device_noinline
-#else
-__device
-#endif
-void shader_setup_from_ray(KernelGlobals *kg, ShaderData *sd,
+__device void shader_setup_from_ray(KernelGlobals *kg, ShaderData *sd,
const Intersection *isect, const Ray *ray, int bounce)
{
#ifdef __INSTANCING__
@@ -184,52 +170,32 @@ __device_inline void shader_setup_from_subsurface(KernelGlobals *kg, ShaderData
sd->flag = kernel_tex_fetch(__object_flag, sd->object);
sd->prim = kernel_tex_fetch(__prim_index, isect->prim);
-#ifdef __HAIR__
- if(kernel_tex_fetch(__prim_segment, isect->prim) != ~0) {
- /* Strand Shader setting*/
- float4 curvedata = kernel_tex_fetch(__curves, sd->prim);
-
- sd->shader = __float_as_int(curvedata.z);
- sd->segment = isect->segment;
-
- float tcorr = isect->t;
- if(kernel_data.curve.curveflags & CURVE_KN_POSTINTERSECTCORRECTION)
- tcorr = (isect->u < 0)? tcorr + sqrtf(isect->v) : tcorr - sqrtf(isect->v);
-
- sd->P = bvh_curve_refine(kg, sd, isect, ray, tcorr);
- }
- else {
-#endif
- /* fetch triangle data */
- float4 Ns = kernel_tex_fetch(__tri_normal, sd->prim);
- float3 Ng = make_float3(Ns.x, Ns.y, Ns.z);
- sd->shader = __float_as_int(Ns.w);
+ /* fetch triangle data */
+ float4 Ns = kernel_tex_fetch(__tri_normal, sd->prim);
+ float3 Ng = make_float3(Ns.x, Ns.y, Ns.z);
+ sd->shader = __float_as_int(Ns.w);
#ifdef __HAIR__
- sd->segment = ~0;
+ sd->segment = ~0;
#endif
#ifdef __UV__
- sd->u = isect->u;
- sd->v = isect->v;
+ sd->u = isect->u;
+ sd->v = isect->v;
#endif
- /* vectors */
- sd->P = bvh_triangle_refine(kg, sd, isect, ray);
- sd->Ng = Ng;
- sd->N = Ng;
-
- /* smooth normal */
- if(sd->shader & SHADER_SMOOTH_NORMAL)
- sd->N = triangle_smooth_normal(kg, sd->prim, sd->u, sd->v);
+ /* vectors */
+ sd->P = bvh_triangle_refine_subsurface(kg, sd, isect, ray);
+ sd->Ng = Ng;
+ sd->N = Ng;
+
+ /* smooth normal */
+ if(sd->shader & SHADER_SMOOTH_NORMAL)
+ sd->N = triangle_smooth_normal(kg, sd->prim, sd->u, sd->v);
#ifdef __DPDU__
- /* dPdu/dPdv */
- triangle_dPdudv(kg, &sd->dPdu, &sd->dPdv, sd->prim);
-#endif
-
-#ifdef __HAIR__
- }
+ /* dPdu/dPdv */
+ triangle_dPdudv(kg, &sd->dPdu, &sd->dPdv, sd->prim);
#endif
sd->flag |= kernel_tex_fetch(__shader_flag, (sd->shader & SHADER_MASK)*2);
@@ -271,12 +237,7 @@ __device_inline void shader_setup_from_subsurface(KernelGlobals *kg, ShaderData
/* ShaderData setup from position sampled on mesh */
-#if defined(__KERNEL_CUDA_VERSION__) && __KERNEL_CUDA_VERSION__ <= 42
-__device_noinline
-#else
-__device
-#endif
-void shader_setup_from_sample(KernelGlobals *kg, ShaderData *sd,
+__device void shader_setup_from_sample(KernelGlobals *kg, ShaderData *sd,
const float3 P, const float3 Ng, const float3 I,
int shader, int object, int prim, float u, float v, float t, float time, int bounce, int segment)
{
@@ -294,7 +255,7 @@ void shader_setup_from_sample(KernelGlobals *kg, ShaderData *sd,
#ifdef __INSTANCING__
sd->object = object;
#endif
- /* currently no access to bvh prim index for strand sd->prim - this will cause errors with needs fixing*/
+ /* currently no access to bvh prim index for strand sd->prim*/
sd->prim = prim;
#ifdef __UV__
sd->u = u;
@@ -468,6 +429,8 @@ __device_inline void shader_setup_from_background(KernelGlobals *kg, ShaderData
__device_inline void _shader_bsdf_multi_eval(KernelGlobals *kg, const ShaderData *sd, const float3 omega_in, float *pdf,
int skip_bsdf, BsdfEval *result_eval, float sum_pdf, float sum_sample_weight)
{
+ /* this is the veach one-sample model with balance heuristic, some pdf
+ * factors drop out when using balance heuristic weighting */
for(int i = 0; i< sd->num_closure; i++) {
if(i == skip_bsdf)
continue;
@@ -622,6 +585,16 @@ __device float3 shader_bsdf_transparency(KernelGlobals *kg, ShaderData *sd)
#endif
}
+__device float3 shader_bsdf_alpha(KernelGlobals *kg, ShaderData *sd)
+{
+ float3 alpha = make_float3(1.0f, 1.0f, 1.0f) - shader_bsdf_transparency(kg, sd);
+
+ alpha = max(alpha, make_float3(0.0f, 0.0f, 0.0f));
+ alpha = min(alpha, make_float3(1.0f, 1.0f, 1.0f));
+
+ return alpha;
+}
+
__device float3 shader_bsdf_diffuse(KernelGlobals *kg, ShaderData *sd)
{
#ifdef __MULTI_CLOSURE__
@@ -706,34 +679,34 @@ __device float3 shader_bsdf_subsurface(KernelGlobals *kg, ShaderData *sd)
#endif
}
-__device float3 shader_bsdf_ao(KernelGlobals *kg, ShaderData *sd, float ao_factor, float3 *N)
+__device float3 shader_bsdf_ao(KernelGlobals *kg, ShaderData *sd, float ao_factor, float3 *N_)
{
#ifdef __MULTI_CLOSURE__
float3 eval = make_float3(0.0f, 0.0f, 0.0f);
-
- *N = make_float3(0.0f, 0.0f, 0.0f);
+ float3 N = make_float3(0.0f, 0.0f, 0.0f);
for(int i = 0; i< sd->num_closure; i++) {
ShaderClosure *sc = &sd->closure[i];
if(CLOSURE_IS_BSDF_DIFFUSE(sc->type)) {
eval += sc->weight*ao_factor;
- *N += sc->N*average(sc->weight);
+ N += sc->N*average(sc->weight);
}
else if(CLOSURE_IS_AMBIENT_OCCLUSION(sc->type)) {
eval += sc->weight;
- *N += sd->N*average(sc->weight);
+ N += sd->N*average(sc->weight);
}
}
- if(is_zero(*N))
- *N = sd->N;
+ if(is_zero(N))
+ N = sd->N;
else
- *N = normalize(*N);
+ N = normalize(N);
+ *N_ = N;
return eval;
#else
- *N = sd->N;
+ *N_ = sd->N;
if(CLOSURE_IS_BSDF_DIFFUSE(sd->closure.type))
return sd->closure.weight*ao_factor;
@@ -744,6 +717,49 @@ __device float3 shader_bsdf_ao(KernelGlobals *kg, ShaderData *sd, float ao_facto
#endif
}
+__device float3 shader_bssrdf_sum(ShaderData *sd, float3 *N_, float *texture_blur_)
+{
+#ifdef __MULTI_CLOSURE__
+ float3 eval = make_float3(0.0f, 0.0f, 0.0f);
+ float3 N = make_float3(0.0f, 0.0f, 0.0f);
+ float texture_blur = 0.0f, weight_sum = 0.0f;
+
+ for(int i = 0; i< sd->num_closure; i++) {
+ ShaderClosure *sc = &sd->closure[i];
+
+ if(CLOSURE_IS_BSSRDF(sc->type)) {
+ float avg_weight = fabsf(average(sc->weight));
+
+ N += sc->N*avg_weight;
+ eval += sc->weight;
+ texture_blur += sc->data1*avg_weight;
+ weight_sum += avg_weight;
+ }
+ }
+
+ if(N_)
+ *N_ = (is_zero(N))? sd->N: normalize(N);
+
+ if(texture_blur_)
+ *texture_blur_ = texture_blur/weight_sum;
+
+ return eval;
+#else
+ if(CLOSURE_IS_BSSRDF(sd->closure.type)) {
+ if(N_) *N_ = sd->closure.N;
+ if(texture_blur_) *texture_blur_ = sd->closure.data1;
+
+ return sd->closure.weight;
+ }
+ else {
+ if(N_) *N_ = sd->N;
+ if(texture_blur_) *texture_blur_ = 0.0f;
+
+ return make_float3(0.0f, 0.0f, 0.0f);
+ }
+#endif
+}
+
/* Emission */
__device float3 emissive_eval(KernelGlobals *kg, ShaderData *sd, ShaderClosure *sc)
@@ -936,7 +952,7 @@ __device bool shader_transparent_shadow(KernelGlobals *kg, Intersection *isect)
/* Merging */
-#ifdef __NON_PROGRESSIVE__
+#ifdef __BRANCHED_PATH__
__device void shader_merge_closures(KernelGlobals *kg, ShaderData *sd)
{
/* merge identical closures, better when we sample a single closure at a time */
diff --git a/intern/cycles/kernel/kernel_sse2.cpp b/intern/cycles/kernel/kernel_sse2.cpp
index 344d530396b..9c69e519dca 100644
--- a/intern/cycles/kernel/kernel_sse2.cpp
+++ b/intern/cycles/kernel/kernel_sse2.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
/* Optimized CPU kernel entry points. This file is compiled with SSE2
@@ -22,7 +20,10 @@
#ifdef WITH_OPTIMIZED_KERNEL
+/* SSE optimization disabled for now on 32 bit, see bug #36316 */
+#if !(defined(__GNUC__) && (defined(i386) || defined(_M_IX86)))
#define __KERNEL_SSE2__
+#endif
#include "kernel.h"
#include "kernel_compat_cpu.h"
@@ -39,19 +40,24 @@ CCL_NAMESPACE_BEGIN
void kernel_cpu_sse2_path_trace(KernelGlobals *kg, float *buffer, unsigned int *rng_state, int sample, int x, int y, int offset, int stride)
{
-#ifdef __NON_PROGRESSIVE__
- if(!kernel_data.integrator.progressive)
- kernel_path_trace_non_progressive(kg, buffer, rng_state, sample, x, y, offset, stride);
+#ifdef __BRANCHED_PATH__
+ if(kernel_data.integrator.branched)
+ kernel_branched_path_trace(kg, buffer, rng_state, sample, x, y, offset, stride);
else
#endif
- kernel_path_trace_progressive(kg, buffer, rng_state, sample, x, y, offset, stride);
+ kernel_path_trace(kg, buffer, rng_state, sample, x, y, offset, stride);
}
-/* Tonemapping */
+/* Film */
+
+void kernel_cpu_sse2_convert_to_byte(KernelGlobals *kg, uchar4 *rgba, float *buffer, float sample_scale, int x, int y, int offset, int stride)
+{
+ kernel_film_convert_to_byte(kg, rgba, buffer, sample_scale, x, y, offset, stride);
+}
-void kernel_cpu_sse2_tonemap(KernelGlobals *kg, uchar4 *rgba, float *buffer, int sample, int x, int y, int offset, int stride)
+void kernel_cpu_sse2_convert_to_half_float(KernelGlobals *kg, uchar4 *rgba, float *buffer, float sample_scale, int x, int y, int offset, int stride)
{
- kernel_film_tonemap(kg, rgba, buffer, sample, x, y, offset, stride);
+ kernel_film_convert_to_half_float(kg, rgba, buffer, sample_scale, x, y, offset, stride);
}
/* Shader Evaluate */
diff --git a/intern/cycles/kernel/kernel_sse3.cpp b/intern/cycles/kernel/kernel_sse3.cpp
index a25c0bca93a..05877a41b4a 100644
--- a/intern/cycles/kernel/kernel_sse3.cpp
+++ b/intern/cycles/kernel/kernel_sse3.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
/* Optimized CPU kernel entry points. This file is compiled with SSE3/SSSE3
@@ -22,9 +20,12 @@
#ifdef WITH_OPTIMIZED_KERNEL
+/* SSE optimization disabled for now on 32 bit, see bug #36316 */
+#if !(defined(__GNUC__) && (defined(i386) || defined(_M_IX86)))
#define __KERNEL_SSE2__
#define __KERNEL_SSE3__
#define __KERNEL_SSSE3__
+#endif
#include "kernel.h"
#include "kernel_compat_cpu.h"
@@ -41,19 +42,24 @@ CCL_NAMESPACE_BEGIN
void kernel_cpu_sse3_path_trace(KernelGlobals *kg, float *buffer, unsigned int *rng_state, int sample, int x, int y, int offset, int stride)
{
-#ifdef __NON_PROGRESSIVE__
- if(!kernel_data.integrator.progressive)
- kernel_path_trace_non_progressive(kg, buffer, rng_state, sample, x, y, offset, stride);
+#ifdef __BRANCHED_PATH__
+ if(kernel_data.integrator.branched)
+ kernel_branched_path_trace(kg, buffer, rng_state, sample, x, y, offset, stride);
else
#endif
- kernel_path_trace_progressive(kg, buffer, rng_state, sample, x, y, offset, stride);
+ kernel_path_trace(kg, buffer, rng_state, sample, x, y, offset, stride);
}
-/* Tonemapping */
+/* Film */
+
+void kernel_cpu_sse3_convert_to_byte(KernelGlobals *kg, uchar4 *rgba, float *buffer, float sample_scale, int x, int y, int offset, int stride)
+{
+ kernel_film_convert_to_byte(kg, rgba, buffer, sample_scale, x, y, offset, stride);
+}
-void kernel_cpu_sse3_tonemap(KernelGlobals *kg, uchar4 *rgba, float *buffer, int sample, int x, int y, int offset, int stride)
+void kernel_cpu_sse3_convert_to_half_float(KernelGlobals *kg, uchar4 *rgba, float *buffer, float sample_scale, int x, int y, int offset, int stride)
{
- kernel_film_tonemap(kg, rgba, buffer, sample, x, y, offset, stride);
+ kernel_film_convert_to_half_float(kg, rgba, buffer, sample_scale, x, y, offset, stride);
}
/* Shader Evaluate */
diff --git a/intern/cycles/kernel/kernel_subsurface.h b/intern/cycles/kernel/kernel_subsurface.h
index 4fae961512e..d16b9328bf2 100644
--- a/intern/cycles/kernel/kernel_subsurface.h
+++ b/intern/cycles/kernel/kernel_subsurface.h
@@ -1,52 +1,29 @@
/*
- * Copyright 2013, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
-#define BSSRDF_MULTI_EVAL
-#define BSSRDF_SKIP_NO_HIT
-
-__device float bssrdf_sample_distance(KernelGlobals *kg, float radius, float refl, float u)
-{
- int table_offset = kernel_data.bssrdf.table_offset;
- float r = lookup_table_read_2D(kg, u, refl, table_offset, BSSRDF_RADIUS_TABLE_SIZE, BSSRDF_REFL_TABLE_SIZE);
+/* NEW BSSRDF: See "BSSRDF Importance Sampling", SIGGRAPH 2013 */
- return r*radius;
-}
-
-#ifdef BSSRDF_MULTI_EVAL
-__device float bssrdf_pdf(KernelGlobals *kg, float radius, float refl, float r)
-{
- if(r >= radius)
- return 0.0f;
-
- /* todo: when we use the real BSSRDF this will need to be divided by the maximum
- * radius instead of the average radius */
- float t = r/radius;
-
- int table_offset = kernel_data.bssrdf.table_offset + BSSRDF_PDF_TABLE_OFFSET;
- float pdf = lookup_table_read_2D(kg, t, refl, table_offset, BSSRDF_RADIUS_TABLE_SIZE, BSSRDF_REFL_TABLE_SIZE);
-
- pdf /= radius;
+/* TODO:
+ * - test using power heuristic for combing bssrdfs
+ * - try to reduce one sample model variance
+ */
- return pdf;
-}
-#endif
+#define BSSRDF_MULTI_EVAL
__device ShaderClosure *subsurface_scatter_pick_closure(KernelGlobals *kg, ShaderData *sd, float *probability)
{
@@ -75,7 +52,6 @@ __device ShaderClosure *subsurface_scatter_pick_closure(KernelGlobals *kg, Shade
/* use bssrdf */
r -= bsdf_sum;
- sd->randb_closure = 0.0f; /* not needed anymore */
float sum = 0.0f;
@@ -86,6 +62,8 @@ __device ShaderClosure *subsurface_scatter_pick_closure(KernelGlobals *kg, Shade
sum += sc->sample_weight;
if(r <= sum) {
+ sd->randb_closure = (r - (sum - sc->sample_weight))/sc->sample_weight;
+
#ifdef BSSRDF_MULTI_EVAL
*probability = (bssrdf_sum > 0.0f)? (bsdf_sum + bssrdf_sum)/bssrdf_sum: 1.0f;
#else
@@ -97,147 +75,332 @@ __device ShaderClosure *subsurface_scatter_pick_closure(KernelGlobals *kg, Shade
}
/* should never happen */
+ sd->randb_closure = 0.0f;
*probability = 1.0f;
return NULL;
}
-#ifdef BSSRDF_MULTI_EVAL
-__device float3 subsurface_scatter_multi_eval(KernelGlobals *kg, ShaderData *sd, bool hit, float refl, float *r, int num_r, bool all)
+__device float3 subsurface_scatter_eval(ShaderData *sd, ShaderClosure *sc, float disk_r, float r, bool all)
{
- /* compute pdf */
+#ifdef BSSRDF_MULTI_EVAL
+ /* this is the veach one-sample model with balance heuristic, some pdf
+ * factors drop out when using balance heuristic weighting */
float3 eval_sum = make_float3(0.0f, 0.0f, 0.0f);
float pdf_sum = 0.0f;
float sample_weight_sum = 0.0f;
int num_bssrdf = 0;
for(int i = 0; i < sd->num_closure; i++) {
- ShaderClosure *sc = &sd->closure[i];
+ sc = &sd->closure[i];
if(CLOSURE_IS_BSSRDF(sc->type)) {
float sample_weight = (all)? 1.0f: sc->sample_weight;
+ sample_weight_sum += sample_weight;
+ }
+ }
+
+ float sample_weight_inv = 1.0f/sample_weight_sum;
+
+ //printf("num closures %d\n", sd->num_closure);
+
+ for(int i = 0; i < sd->num_closure; i++) {
+ sc = &sd->closure[i];
+
+ if(CLOSURE_IS_BSSRDF(sc->type)) {
+ /* in case of branched path integrate we sample all bssrdf's once,
+ * for path trace we pick one, so adjust pdf for that */
+ float sample_weight = (all)? 1.0f: sc->sample_weight * sample_weight_inv;
/* compute pdf */
- float pdf = 1.0f;
- for(int i = 0; i < num_r; i++)
- pdf *= bssrdf_pdf(kg, sc->data0, refl, r[i]);
+ float pdf = bssrdf_pdf(sc, r);
+ float disk_pdf = bssrdf_pdf(sc, disk_r);
- eval_sum += sc->weight*pdf;
- pdf_sum += sample_weight*pdf;
+ /* TODO power heuristic is not working correct here */
+ eval_sum += sc->weight*pdf; //*sample_weight*disk_pdf;
+ pdf_sum += sample_weight*disk_pdf; //*sample_weight*disk_pdf;
- sample_weight_sum += sample_weight;
num_bssrdf++;
}
}
- float inv_pdf_sum;
-
- if(pdf_sum > 0.0f) {
- /* in case of non-progressive integrate we sample all bssrdf's once,
- * for progressive we pick one, so adjust pdf for that */
- if(all)
- inv_pdf_sum = 1.0f/pdf_sum;
- else
- inv_pdf_sum = sample_weight_sum/pdf_sum;
- }
- else
- inv_pdf_sum = 0.0f;
-
- float3 weight = eval_sum * inv_pdf_sum;
+ return (pdf_sum > 0.0f)? eval_sum / pdf_sum : make_float3(0.0f, 0.0f, 0.0f);
+#else
+ float pdf = bssrdf_pdf(pick_sc, r);
+ float disk_pdf = bssrdf_pdf(pick_sc, disk_r);
- return weight;
-}
+ return pick_sc->weight * pdf / disk_pdf;
#endif
+}
/* replace closures with a single diffuse bsdf closure after scatter step */
-__device void subsurface_scatter_setup_diffuse_bsdf(ShaderData *sd, float3 weight)
+__device void subsurface_scatter_setup_diffuse_bsdf(ShaderData *sd, float3 weight, bool hit, float3 N)
{
- ShaderClosure *sc = &sd->closure[0];
- sd->num_closure = 1;
-
- sc->weight = weight;
- sc->sample_weight = 1.0f;
- sc->data0 = 0.0f;
- sc->data1 = 0.0f;
- sc->N = sd->N;
sd->flag &= ~SD_CLOSURE_FLAGS;
- sd->flag |= bsdf_diffuse_setup(sc);
sd->randb_closure = 0.0f;
- /* replace CLOSURE_BSDF_DIFFUSE_ID with this special ID so render passes
- * can recognize it as not being a regular diffuse closure */
- sc->type = CLOSURE_BSDF_BSSRDF_ID;
+ if(hit) {
+ ShaderClosure *sc = &sd->closure[0];
+ sd->num_closure = 1;
+
+ sc->weight = weight;
+ sc->sample_weight = 1.0f;
+ sc->data0 = 0.0f;
+ sc->data1 = 0.0f;
+ sc->N = N;
+ sd->flag |= bsdf_diffuse_setup(sc);
+
+ /* replace CLOSURE_BSDF_DIFFUSE_ID with this special ID so render passes
+ * can recognize it as not being a regular diffuse closure */
+ sc->type = CLOSURE_BSDF_BSSRDF_ID;
+ }
+ else
+ sd->num_closure = 0;
+}
- /* todo: evaluate shading to get blurred textures and bump mapping */
- /* shader_eval_surface(kg, sd, 0.0f, state_flag, SHADER_CONTEXT_SSS); */
+/* optionally do blurring of color and/or bump mapping, at the cost of a shader evaluation */
+__device float3 subsurface_color_pow(float3 color, float exponent)
+{
+ color = max(color, make_float3(0.0f, 0.0f, 0.0f));
+
+ if(exponent == 1.0f) {
+ /* nothing to do */
+ }
+ else if(exponent == 0.5f) {
+ color.x = sqrtf(color.x);
+ color.y = sqrtf(color.y);
+ color.z = sqrtf(color.z);
+ }
+ else {
+ color.x = powf(color.x, exponent);
+ color.y = powf(color.y, exponent);
+ color.z = powf(color.z, exponent);
+ }
+
+ return color;
+}
+
+__device void subsurface_color_bump_blur(KernelGlobals *kg, ShaderData *out_sd, ShaderData *in_sd, int state_flag, float3 *eval, float3 *N)
+{
+ /* average color and texture blur at outgoing point */
+ float texture_blur;
+ float3 out_color = shader_bssrdf_sum(out_sd, NULL, &texture_blur);
+
+ /* do we have bump mapping? */
+ bool bump = (out_sd->flag & SD_HAS_BSSRDF_BUMP) != 0;
+
+ if(bump || texture_blur > 0.0f) {
+ /* average color and normal at incoming point */
+ shader_eval_surface(kg, in_sd, 0.0f, state_flag, SHADER_CONTEXT_SSS);
+ float3 in_color = shader_bssrdf_sum(in_sd, (bump)? N: NULL, NULL);
+
+ /* we simply divide out the average color and multiply with the average
+ * of the other one. we could try to do this per closure but it's quite
+ * tricky to match closures between shader evaluations, their number and
+ * order may change, this is simpler */
+ if(texture_blur > 0.0f) {
+ out_color = subsurface_color_pow(out_color, texture_blur);
+ in_color = subsurface_color_pow(in_color, texture_blur);
+
+ *eval *= safe_divide_color(in_color, out_color);
+ }
+ }
+}
+
+/* subsurface scattering step, from a point on the surface to other nearby points on the same object */
+__device int subsurface_scatter_multi_step(KernelGlobals *kg, ShaderData *sd, ShaderData bssrdf_sd[BSSRDF_MAX_HITS],
+ int state_flag, ShaderClosure *sc, uint *lcg_state, float disk_u, float disk_v, bool all)
+{
+ /* pick random axis in local frame and point on disk */
+ float3 disk_N, disk_T, disk_B;
+ float pick_pdf_N, pick_pdf_T, pick_pdf_B;
+
+ disk_N = sd->Ng;
+ make_orthonormals(disk_N, &disk_T, &disk_B);
+
+ /* reusing variable for picking the closure gives a bit nicer stratification
+ * for path tracer, for branched we do all closures so it doesn't help */
+ float axisu = (all)? disk_u: sd->randb_closure;
+
+ if(axisu < 0.5f) {
+ pick_pdf_N = 0.5f;
+ pick_pdf_T = 0.25f;
+ pick_pdf_B = 0.25f;
+ if(all)
+ disk_u *= 2.0f;
+ }
+ else if(axisu < 0.75f) {
+ float3 tmp = disk_N;
+ disk_N = disk_T;
+ disk_T = tmp;
+ pick_pdf_N = 0.25f;
+ pick_pdf_T = 0.5f;
+ pick_pdf_B = 0.25f;
+ if(all)
+ disk_u = (disk_u - 0.5f)*4.0f;
+ }
+ else {
+ float3 tmp = disk_N;
+ disk_N = disk_B;
+ disk_B = tmp;
+ pick_pdf_N = 0.25f;
+ pick_pdf_T = 0.25f;
+ pick_pdf_B = 0.5f;
+ if(all)
+ disk_u = (disk_u - 0.75f)*4.0f;
+ }
+
+ /* sample point on disk */
+ float phi = M_2PI_F * disk_u;
+ float disk_r = disk_v;
+ float disk_height;
+
+ bssrdf_sample(sc, disk_r, &disk_r, &disk_height);
+
+ float3 disk_P = (disk_r*cosf(phi)) * disk_T + (disk_r*sinf(phi)) * disk_B;
+
+ /* create ray */
+ Ray ray;
+ ray.P = sd->P + disk_N*disk_height + disk_P;
+ ray.D = -disk_N;
+ ray.t = 2.0f*disk_height;
+ ray.dP = sd->dP;
+ ray.dD = differential3_zero();
+ ray.time = sd->time;
+
+ /* intersect with the same object. if multiple intersections are found it
+ * will use at most BSSRDF_MAX_HITS hits, a random subset of all hits */
+ Intersection isect[BSSRDF_MAX_HITS];
+ uint num_hits = scene_intersect_subsurface(kg, &ray, isect, sd->object, lcg_state, BSSRDF_MAX_HITS);
+
+ /* evaluate bssrdf */
+ float3 eval = make_float3(0.0f, 0.0f, 0.0f);
+ int num_eval_hits = min(num_hits, BSSRDF_MAX_HITS);
+
+ for(int hit = 0; hit < num_eval_hits; hit++) {
+ ShaderData *bsd = &bssrdf_sd[hit];
+
+ /* setup new shading point */
+ *bsd = *sd;
+ shader_setup_from_subsurface(kg, bsd, &isect[hit], &ray);
+
+ /* probability densities for local frame axes */
+ float pdf_N = pick_pdf_N * fabsf(dot(disk_N, bsd->Ng));
+ float pdf_T = pick_pdf_T * fabsf(dot(disk_T, bsd->Ng));
+ float pdf_B = pick_pdf_B * fabsf(dot(disk_B, bsd->Ng));
+
+ /* multiple importance sample between 3 axes, power heuristic
+ * found to be slightly better than balance heuristic */
+ float mis_weight = power_heuristic_3(pdf_N, pdf_T, pdf_B);
+
+ /* real distance to sampled point */
+ float r = len(bsd->P - sd->P);
+
+ /* evaluate */
+ float w = mis_weight / pdf_N;
+ if(num_hits > BSSRDF_MAX_HITS)
+ w *= num_hits/(float)BSSRDF_MAX_HITS;
+ eval = subsurface_scatter_eval(bsd, sc, disk_r, r, all) * w;
+
+ /* optionally blur colors and bump mapping */
+ float3 N = bsd->N;
+ subsurface_color_bump_blur(kg, sd, bsd, state_flag, &eval, &N);
+
+ /* setup diffuse bsdf */
+ subsurface_scatter_setup_diffuse_bsdf(bsd, eval, true, N);
+ }
+
+ return num_eval_hits;
}
/* subsurface scattering step, from a point on the surface to another nearby point on the same object */
-__device void subsurface_scatter_step(KernelGlobals *kg, ShaderData *sd, int state_flag, ShaderClosure *sc, uint *lcg_state, bool all)
+__device void subsurface_scatter_step(KernelGlobals *kg, ShaderData *sd,
+ int state_flag, ShaderClosure *sc, uint *lcg_state, float disk_u, float disk_v, bool all)
{
- float radius = sc->data0;
- float refl = max(average(sc->weight)*3.0f, 0.0f);
- float r = 0.0f;
- bool hit = false;
- float3 weight = make_float3(1.0f, 1.0f, 1.0f);
-#ifdef BSSRDF_MULTI_EVAL
- float r_attempts[BSSRDF_MAX_ATTEMPTS];
-#endif
- int num_attempts;
-
- /* attempt to find a hit a given number of times before giving up */
- for(num_attempts = 0; num_attempts < kernel_data.bssrdf.num_attempts; num_attempts++) {
- /* random numbers for sampling */
- float u1 = lcg_step(lcg_state);
- float u2 = lcg_step(lcg_state);
- float u3 = lcg_step(lcg_state);
- float u4 = lcg_step(lcg_state);
- float u5 = lcg_step(lcg_state);
- float u6 = lcg_step(lcg_state);
-
- r = bssrdf_sample_distance(kg, radius, refl, u5);
-#ifdef BSSRDF_MULTI_EVAL
- r_attempts[num_attempts] = r;
-#endif
+ float3 eval = make_float3(0.0f, 0.0f, 0.0f);
+ uint num_hits = 0;
+
+ /* pick random axis in local frame and point on disk */
+ float3 disk_N, disk_T, disk_B;
+ float pick_pdf_N, pick_pdf_T, pick_pdf_B;
+
+ disk_N = sd->Ng;
+ make_orthonormals(disk_N, &disk_T, &disk_B);
- float3 p1 = sd->P + sample_uniform_sphere(u1, u2)*r;
- float3 p2 = sd->P + sample_uniform_sphere(u3, u4)*r;
+ if(sd->randb_closure < 0.5f) {
+ pick_pdf_N = 0.5f;
+ pick_pdf_T = 0.25f;
+ pick_pdf_B = 0.25f;
+ }
+ else if(sd->randb_closure < 0.75f) {
+ float3 tmp = disk_N;
+ disk_N = disk_T;
+ disk_T = tmp;
+ pick_pdf_N = 0.25f;
+ pick_pdf_T = 0.5f;
+ pick_pdf_B = 0.25f;
+ }
+ else {
+ float3 tmp = disk_N;
+ disk_N = disk_B;
+ disk_B = tmp;
+ pick_pdf_N = 0.25f;
+ pick_pdf_T = 0.25f;
+ pick_pdf_B = 0.5f;
+ }
- /* create ray */
- Ray ray;
- ray.P = p1;
- ray.D = normalize_len(p2 - p1, &ray.t);
- ray.dP = sd->dP;
- ray.dD = differential3_zero();
- ray.time = sd->time;
+ /* sample point on disk */
+ float phi = M_2PI_F * disk_u;
+ float disk_r = disk_v;
+ float disk_height;
- /* intersect with the same object. if multiple intersections are
- * found it will randomly pick one of them */
- Intersection isect;
- if(!scene_intersect_subsurface(kg, &ray, &isect, sd->object, u6))
- continue;
+ bssrdf_sample(sc, disk_r, &disk_r, &disk_height);
+
+ float3 disk_P = (disk_r*cosf(phi)) * disk_T + (disk_r*sinf(phi)) * disk_B;
+
+ /* create ray */
+ Ray ray;
+ ray.P = sd->P + disk_N*disk_height + disk_P;
+ ray.D = -disk_N;
+ ray.t = 2.0f*disk_height;
+ ray.dP = sd->dP;
+ ray.dD = differential3_zero();
+ ray.time = sd->time;
+
+ /* intersect with the same object. if multiple intersections are
+ * found it will randomly pick one of them */
+ Intersection isect;
+ num_hits = scene_intersect_subsurface(kg, &ray, &isect, sd->object, lcg_state, 1);
+
+ /* evaluate bssrdf */
+ if(num_hits > 0) {
+ float3 origP = sd->P;
/* setup new shading point */
shader_setup_from_subsurface(kg, sd, &isect, &ray);
- hit = true;
- num_attempts++;
- break;
- }
+ /* probability densities for local frame axes */
+ float pdf_N = pick_pdf_N * fabsf(dot(disk_N, sd->Ng));
+ float pdf_T = pick_pdf_T * fabsf(dot(disk_T, sd->Ng));
+ float pdf_B = pick_pdf_B * fabsf(dot(disk_B, sd->Ng));
+
+ /* multiple importance sample between 3 axes, power heuristic
+ * found to be slightly better than balance heuristic */
+ float mis_weight = power_heuristic_3(pdf_N, pdf_T, pdf_B);
- /* evaluate subsurface scattering closures */
-#ifdef BSSRDF_MULTI_EVAL
- weight *= subsurface_scatter_multi_eval(kg, sd, hit, refl, r_attempts, num_attempts, all);
-#else
- weight *= sc->weight;
-#endif
+ /* real distance to sampled point */
+ float r = len(sd->P - origP);
-#ifdef BSSRDF_SKIP_NO_HIT
- if(!hit)
- weight = make_float3(0.0f, 0.0f, 0.0f);
-#endif
+ /* evaluate */
+ float w = (mis_weight * num_hits) / pdf_N;
+ eval = subsurface_scatter_eval(sd, sc, disk_r, r, all) * w;
+ }
+
+ /* optionally blur colors and bump mapping */
+ float3 N = sd->N;
+ subsurface_color_bump_blur(kg, sd, sd, state_flag, &eval, &N);
- /* replace closures with a single diffuse BSDF */
- subsurface_scatter_setup_diffuse_bsdf(sd, weight);
+ /* setup diffuse bsdf */
+ subsurface_scatter_setup_diffuse_bsdf(sd, eval, (num_hits > 0), N);
}
CCL_NAMESPACE_END
diff --git a/intern/cycles/kernel/kernel_textures.h b/intern/cycles/kernel/kernel_textures.h
index 55c6e15ad04..f06fa119cfc 100644
--- a/intern/cycles/kernel/kernel_textures.h
+++ b/intern/cycles/kernel/kernel_textures.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef KERNEL_TEX
diff --git a/intern/cycles/kernel/kernel_triangle.h b/intern/cycles/kernel/kernel_triangle.h
index d346137760f..71389e0ec32 100644
--- a/intern/cycles/kernel/kernel_triangle.h
+++ b/intern/cycles/kernel/kernel_triangle.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h
index 836eacf7cb6..3371c580c71 100644
--- a/intern/cycles/kernel/kernel_types.h
+++ b/intern/cycles/kernel/kernel_types.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __KERNEL_TYPES_H__
@@ -37,12 +35,8 @@ CCL_NAMESPACE_BEGIN
#define PARTICLE_SIZE 5
#define TIME_INVALID FLT_MAX
-#define BSSRDF_RADIUS_TABLE_SIZE 1024
-#define BSSRDF_REFL_TABLE_SIZE 256
-#define BSSRDF_PDF_TABLE_OFFSET (BSSRDF_RADIUS_TABLE_SIZE*BSSRDF_REFL_TABLE_SIZE)
-#define BSSRDF_LOOKUP_TABLE_SIZE (BSSRDF_RADIUS_TABLE_SIZE*BSSRDF_REFL_TABLE_SIZE*2)
#define BSSRDF_MIN_RADIUS 1e-8f
-#define BSSRDF_MAX_ATTEMPTS 8
+#define BSSRDF_MAX_HITS 4
#define BB_DRAPPER 800.0f
#define BB_MAX_TABLE_RANGE 12000.0f
@@ -56,7 +50,7 @@ CCL_NAMESPACE_BEGIN
#ifdef __KERNEL_CPU__
#define __KERNEL_SHADING__
#define __KERNEL_ADV_SHADING__
-#define __NON_PROGRESSIVE__
+#define __BRANCHED_PATH__
#ifdef WITH_OSL
#define __OSL__
#endif
@@ -68,7 +62,7 @@ CCL_NAMESPACE_BEGIN
#define __KERNEL_SHADING__
#if __CUDA_ARCH__ >= 200
#define __KERNEL_ADV_SHADING__
-#define __NON_PROGRESSIVE__
+#define __BRANCHED_PATH__
#endif
#endif
@@ -214,12 +208,14 @@ enum PathRayFlag {
PATH_RAY_SHADOW_TRANSPARENT = 256,
PATH_RAY_SHADOW = (PATH_RAY_SHADOW_OPAQUE|PATH_RAY_SHADOW_TRANSPARENT),
- PATH_RAY_MIS_SKIP = 512,
+ PATH_RAY_CURVE = 512, /* visibility flag to define curve segments*/
- PATH_RAY_ALL = (1|2|4|8|16|32|64|128|256|512),
+ PATH_RAY_ALL_VISIBILITY = (1|2|4|8|16|32|64|128|256|512),
- /* visibility flag to define curve segments*/
- PATH_RAY_CURVE = 1024,
+ PATH_RAY_MIS_SKIP = 1024,
+ PATH_RAY_DIFFUSE_ANCESTOR = 2048,
+ PATH_RAY_GLOSSY_ANCESTOR = 4096,
+ PATH_RAY_BSSRDF_ANCESTOR = 8192,
/* this gives collisions with localview bits
* see: blender_util.h, grr - Campbell */
@@ -391,10 +387,10 @@ typedef struct differential {
/* Ray */
typedef struct Ray {
- float3 P;
- float3 D;
- float t;
- float time;
+ float3 P; /* origin */
+ float3 D; /* direction */
+ float t; /* length of the ray */
+ float time; /* time (for motion blur) */
#ifdef __RAY_DIFFERENTIALS__
differential3 dP;
@@ -439,7 +435,6 @@ typedef enum AttributeStandard {
ATTR_STD_MOTION_PRE,
ATTR_STD_MOTION_POST,
ATTR_STD_PARTICLE,
- ATTR_STD_CURVE_TANGENT,
ATTR_STD_CURVE_INTERCEPT,
ATTR_STD_NUM,
@@ -462,10 +457,14 @@ typedef struct ShaderClosure {
float data1;
float3 N;
-#ifdef __ANISOTROPIC__
+#if defined(__ANISOTROPIC__) || defined(__SUBSURFACE__) || defined(__HAIR__)
float3 T;
#endif
+#ifdef __HAIR__
+ float offset;
+#endif
+
#ifdef __OSL__
void *prim;
#endif
@@ -508,11 +507,12 @@ enum ShaderDataFlag {
SD_HAS_TRANSPARENT_SHADOW = 1024, /* has transparent shadow */
SD_HAS_VOLUME = 2048, /* has volume shader */
SD_HOMOGENEOUS_VOLUME = 4096, /* has homogeneous volume */
+ SD_HAS_BSSRDF_BUMP = 8192, /* bssrdf normal uses bump */
/* object flags */
- SD_HOLDOUT_MASK = 8192, /* holdout for camera rays */
- SD_OBJECT_MOTION = 16384, /* has object motion blur */
- SD_TRANSFORM_APPLIED = 32768 /* vertices have transform applied */
+ SD_HOLDOUT_MASK = 16384, /* holdout for camera rays */
+ SD_OBJECT_MOTION = 32768, /* has object motion blur */
+ SD_TRANSFORM_APPLIED = 65536 /* vertices have transform applied */
};
struct KernelGlobals;
@@ -716,16 +716,6 @@ typedef struct KernelBackground {
float ao_distance;
} KernelBackground;
-typedef struct KernelSunSky {
- /* sun direction in spherical and cartesian */
- float theta, phi, pad3, pad4;
-
- /* perez function parameters */
- float zenith_Y, zenith_x, zenith_y, pad2;
- float perez_Y[5], perez_x[5], perez_y[5];
- float pad5;
-} KernelSunSky;
-
typedef struct KernelIntegrator {
/* emission */
int use_direct_light;
@@ -763,8 +753,8 @@ typedef struct KernelIntegrator {
/* clamp */
float sample_clamp;
- /* non-progressive */
- int progressive;
+ /* branched path */
+ int branched;
int aa_samples;
int diffuse_samples;
int glossy_samples;
@@ -798,36 +788,28 @@ typedef enum CurveFlag {
/* runtime flags */
CURVE_KN_BACKFACING = 1, /* backside of cylinder? */
CURVE_KN_ENCLOSEFILTER = 2, /* don't consider strands surrounding start point? */
- CURVE_KN_CURVEDATA = 4, /* curve data available? */
- CURVE_KN_INTERPOLATE = 8, /* render as a curve? */
- CURVE_KN_ACCURATE = 16, /* use accurate intersections test? */
- CURVE_KN_INTERSECTCORRECTION = 32, /* correct for width after determing closest midpoint? */
- CURVE_KN_POSTINTERSECTCORRECTION = 64, /* correct for width after intersect? */
- CURVE_KN_NORMALCORRECTION = 128, /* correct tangent normal for slope? */
- CURVE_KN_TRUETANGENTGNORMAL = 256, /* use tangent normal for geometry? */
- CURVE_KN_TANGENTGNORMAL = 512, /* use tangent normal for shader? */
- CURVE_KN_RIBBONS = 1024, /* use flat curve ribbons */
+ CURVE_KN_INTERPOLATE = 4, /* render as a curve? */
+ CURVE_KN_ACCURATE = 8, /* use accurate intersections test? */
+ CURVE_KN_INTERSECTCORRECTION = 16, /* correct for width after determing closest midpoint? */
+ CURVE_KN_POSTINTERSECTCORRECTION = 32, /* correct for width after intersect? */
+ CURVE_KN_TRUETANGENTGNORMAL = 64, /* use tangent normal for geometry? */
+ CURVE_KN_TANGENTGNORMAL = 128, /* use tangent normal for shader? */
+ CURVE_KN_RIBBONS = 256, /* use flat curve ribbons */
} CurveFlag;
typedef struct KernelCurves {
- /* strand intersect and normal parameters - many can be changed to flags*/
- float normalmix;
+ /* strand intersect and normal parameters - many can be changed to flags */
float encasing_ratio;
int curveflags;
int subdivisions;
+ int pad1;
float minimum_width;
float maximum_width;
float curve_epsilon;
- int pad1;
+ int pad2;
} KernelCurves;
-typedef struct KernelBSSRDF {
- int table_offset;
- int num_attempts;
- int pad1, pad2;
-} KernelBSSRDF;
-
typedef struct KernelBlackbody {
int table_offset;
int pad1, pad2, pad3;
@@ -838,11 +820,9 @@ typedef struct KernelData {
KernelCamera cam;
KernelFilm film;
KernelBackground background;
- KernelSunSky sunsky;
KernelIntegrator integrator;
KernelBVH bvh;
KernelCurves curve;
- KernelBSSRDF bssrdf;
KernelBlackbody blackbody;
} KernelData;
diff --git a/intern/cycles/kernel/osl/osl_bssrdf.cpp b/intern/cycles/kernel/osl/osl_bssrdf.cpp
index ba9b13126ac..975967c0bbb 100644
--- a/intern/cycles/kernel/osl/osl_bssrdf.cpp
+++ b/intern/cycles/kernel/osl/osl_bssrdf.cpp
@@ -47,18 +47,68 @@ CCL_NAMESPACE_BEGIN
using namespace OSL;
-class BSSRDFClosure : public CBSSRDFClosure {
+/* Cubic */
+
+class CubicBSSRDFClosure : public CBSSRDFClosure {
public:
size_t memsize() const { return sizeof(*this); }
const char *name() const { return "bssrdf_cubic"; }
void setup()
{
- sc.prim = NULL;
+ sc.type = CLOSURE_BSSRDF_CUBIC_ID;
sc.data0 = fabsf(average(radius));
- sc.data1 = 1.3f;
+ }
+
+ bool mergeable(const ClosurePrimitive *other) const
+ {
+ return false;
+ }
+
+ void print_on(std::ostream &out) const
+ {
+ out << name() << " ((" << sc.N[0] << ", " << sc.N[1] << ", " << sc.N[2] << "))";
+ }
+};
+
+ClosureParam *closure_bssrdf_cubic_params()
+{
+ static ClosureParam params[] = {
+ CLOSURE_FLOAT3_PARAM(CubicBSSRDFClosure, sc.N),
+ CLOSURE_FLOAT3_PARAM(CubicBSSRDFClosure, radius),
+ //CLOSURE_FLOAT_PARAM(CubicBSSRDFClosure, sc.data1),
+ CLOSURE_STRING_KEYPARAM("label"),
+ CLOSURE_FINISH_PARAM(CubicBSSRDFClosure)
+ };
+ return params;
+}
+
+ClosureParam *closure_bssrdf_cubic_extended_params()
+{
+ static ClosureParam params[] = {
+ CLOSURE_FLOAT3_PARAM(CubicBSSRDFClosure, sc.N),
+ CLOSURE_FLOAT3_PARAM(CubicBSSRDFClosure, radius),
+ CLOSURE_FLOAT_PARAM(CubicBSSRDFClosure, sc.data1),
+ CLOSURE_FLOAT_PARAM(CubicBSSRDFClosure, sc.T.x),
+ CLOSURE_STRING_KEYPARAM("label"),
+ CLOSURE_FINISH_PARAM(CubicBSSRDFClosure)
+ };
+ return params;
+}
+
+CLOSURE_PREPARE(closure_bssrdf_cubic_prepare, CubicBSSRDFClosure)
+
+/* Gaussian */
+
+class GaussianBSSRDFClosure : public CBSSRDFClosure {
+public:
+ size_t memsize() const { return sizeof(*this); }
+ const char *name() const { return "bssrdf_gaussian"; }
- m_shaderdata_flag = bssrdf_setup(&sc);
+ void setup()
+ {
+ sc.type = CLOSURE_BSSRDF_GAUSSIAN_ID;
+ sc.data0 = fabsf(average(radius));
}
bool mergeable(const ClosurePrimitive *other) const
@@ -72,19 +122,31 @@ public:
}
};
-ClosureParam *closure_bssrdf_params()
+ClosureParam *closure_bssrdf_gaussian_params()
+{
+ static ClosureParam params[] = {
+ CLOSURE_FLOAT3_PARAM(GaussianBSSRDFClosure, sc.N),
+ CLOSURE_FLOAT3_PARAM(GaussianBSSRDFClosure, radius),
+ //CLOSURE_FLOAT_PARAM(GaussianBSSRDFClosure, sc.data1),
+ CLOSURE_STRING_KEYPARAM("label"),
+ CLOSURE_FINISH_PARAM(GaussianBSSRDFClosure)
+ };
+ return params;
+}
+
+ClosureParam *closure_bssrdf_gaussian_extended_params()
{
static ClosureParam params[] = {
- CLOSURE_FLOAT3_PARAM(BSSRDFClosure, sc.N),
- CLOSURE_FLOAT3_PARAM(BSSRDFClosure, radius),
- //CLOSURE_FLOAT_PARAM(BSSRDFClosure, sc.data1),
+ CLOSURE_FLOAT3_PARAM(GaussianBSSRDFClosure, sc.N),
+ CLOSURE_FLOAT3_PARAM(GaussianBSSRDFClosure, radius),
+ CLOSURE_FLOAT_PARAM(GaussianBSSRDFClosure, sc.data1),
CLOSURE_STRING_KEYPARAM("label"),
- CLOSURE_FINISH_PARAM(BSSRDFClosure)
+ CLOSURE_FINISH_PARAM(GaussianBSSRDFClosure)
};
return params;
}
-CLOSURE_PREPARE(closure_bssrdf_prepare, BSSRDFClosure)
+CLOSURE_PREPARE(closure_bssrdf_gaussian_prepare, GaussianBSSRDFClosure)
CCL_NAMESPACE_END
diff --git a/intern/cycles/kernel/osl/osl_bssrdf.h b/intern/cycles/kernel/osl/osl_bssrdf.h
index 54df055405e..fc1a4c587cc 100644
--- a/intern/cycles/kernel/osl/osl_bssrdf.h
+++ b/intern/cycles/kernel/osl/osl_bssrdf.h
@@ -48,15 +48,10 @@ public:
ShaderClosure sc;
float3 radius;
- CBSSRDFClosure() : OSL::ClosurePrimitive(BSSRDF),
- m_shaderdata_flag(0) { }
+ CBSSRDFClosure() : OSL::ClosurePrimitive(BSSRDF) { memset(&sc, 0, sizeof(sc)); }
~CBSSRDFClosure() { }
int scattering() const { return LABEL_DIFFUSE; }
- int shaderdata_flag() const { return m_shaderdata_flag; }
-
-protected:
- int m_shaderdata_flag;
};
CCL_NAMESPACE_END
diff --git a/intern/cycles/kernel/osl/osl_closures.cpp b/intern/cycles/kernel/osl/osl_closures.cpp
index b1549e95920..221406a1716 100644
--- a/intern/cycles/kernel/osl/osl_closures.cpp
+++ b/intern/cycles/kernel/osl/osl_closures.cpp
@@ -54,6 +54,7 @@
#include "closure/bsdf_ward.h"
#include "closure/bsdf_westin.h"
#include "closure/bsdf_toon.h"
+#include "closure/bsdf_hair.h"
CCL_NAMESPACE_BEGIN
@@ -142,6 +143,32 @@ BSDF_CLOSURE_CLASS_BEGIN(MicrofacetBeckmannRefraction, microfacet_beckmann_refra
CLOSURE_FLOAT_PARAM(MicrofacetBeckmannRefractionClosure, sc.data1),
BSDF_CLOSURE_CLASS_END(MicrofacetBeckmannRefraction, microfacet_beckmann_refraction)
+BSDF_CLOSURE_CLASS_BEGIN(HairReflection, hair_reflection, hair_reflection, LABEL_GLOSSY)
+ CLOSURE_FLOAT3_PARAM(HairReflectionClosure, sc.N),
+ CLOSURE_FLOAT_PARAM(HairReflectionClosure, sc.data0),
+ CLOSURE_FLOAT_PARAM(HairReflectionClosure, sc.data1),
+#ifdef __HAIR__
+ CLOSURE_FLOAT3_PARAM(HairReflectionClosure, sc.T),
+ CLOSURE_FLOAT_PARAM(HairReflectionClosure, sc.offset),
+#else
+ CLOSURE_FLOAT3_PARAM(HairReflectionClosure, sc.N),
+ CLOSURE_FLOAT_PARAM(HairReflectionClosure, sc.data1),
+#endif
+BSDF_CLOSURE_CLASS_END(HairReflection, hair_reflection)
+
+BSDF_CLOSURE_CLASS_BEGIN(HairTransmission, hair_transmission, hair_transmission, LABEL_GLOSSY)
+ CLOSURE_FLOAT3_PARAM(HairTransmissionClosure, sc.N),
+ CLOSURE_FLOAT_PARAM(HairTransmissionClosure, sc.data0),
+ CLOSURE_FLOAT_PARAM(HairTransmissionClosure, sc.data1),
+#ifdef __HAIR__
+ CLOSURE_FLOAT3_PARAM(HairReflectionClosure, sc.T),
+ CLOSURE_FLOAT_PARAM(HairReflectionClosure, sc.offset),
+#else
+ CLOSURE_FLOAT3_PARAM(HairReflectionClosure, sc.N),
+ CLOSURE_FLOAT_PARAM(HairReflectionClosure, sc.data1),
+#endif
+BSDF_CLOSURE_CLASS_END(HairTransmission, hair_transmission)
+
/* Registration */
static void generic_closure_setup(OSL::RendererServices *, int id, void *data)
@@ -218,7 +245,18 @@ void OSLShader::register_closures(OSLShadingSystem *ss_)
register_closure(ss, "phong_ramp", id++,
closure_bsdf_phong_ramp_params(), closure_bsdf_phong_ramp_prepare);
register_closure(ss, "bssrdf_cubic", id++,
- closure_bssrdf_params(), closure_bssrdf_prepare);
+ closure_bssrdf_cubic_params(), closure_bssrdf_cubic_prepare);
+ register_closure(ss, "bssrdf_gaussian", id++,
+ closure_bssrdf_gaussian_params(), closure_bssrdf_gaussian_prepare);
+ register_closure(ss, "bssrdf_cubic", id++,
+ closure_bssrdf_cubic_extended_params(), closure_bssrdf_cubic_prepare);
+ register_closure(ss, "bssrdf_gaussian", id++,
+ closure_bssrdf_gaussian_extended_params(), closure_bssrdf_gaussian_prepare);
+
+ register_closure(ss, "hair_reflection", id++,
+ bsdf_hair_reflection_params(), bsdf_hair_reflection_prepare);
+ register_closure(ss, "hair_transmission", id++,
+ bsdf_hair_transmission_params(), bsdf_hair_transmission_prepare);
}
CCL_NAMESPACE_END
diff --git a/intern/cycles/kernel/osl/osl_closures.h b/intern/cycles/kernel/osl/osl_closures.h
index ca5f441aa2d..6632c2c57e5 100644
--- a/intern/cycles/kernel/osl/osl_closures.h
+++ b/intern/cycles/kernel/osl/osl_closures.h
@@ -50,7 +50,10 @@ OSL::ClosureParam *closure_bsdf_diffuse_ramp_params();
OSL::ClosureParam *closure_bsdf_phong_ramp_params();
OSL::ClosureParam *closure_westin_backscatter_params();
OSL::ClosureParam *closure_westin_sheen_params();
-OSL::ClosureParam *closure_bssrdf_params();
+OSL::ClosureParam *closure_bssrdf_cubic_params();
+OSL::ClosureParam *closure_bssrdf_gaussian_params();
+OSL::ClosureParam *closure_bssrdf_cubic_extended_params();
+OSL::ClosureParam *closure_bssrdf_gaussian_extended_params();
void closure_emission_prepare(OSL::RendererServices *, int id, void *data);
void closure_background_prepare(OSL::RendererServices *, int id, void *data);
@@ -60,7 +63,8 @@ void closure_bsdf_diffuse_ramp_prepare(OSL::RendererServices *, int id, void *da
void closure_bsdf_phong_ramp_prepare(OSL::RendererServices *, int id, void *data);
void closure_westin_backscatter_prepare(OSL::RendererServices *, int id, void *data);
void closure_westin_sheen_prepare(OSL::RendererServices *, int id, void *data);
-void closure_bssrdf_prepare(OSL::RendererServices *, int id, void *data);
+void closure_bssrdf_cubic_prepare(OSL::RendererServices *, int id, void *data);
+void closure_bssrdf_gaussian_prepare(OSL::RendererServices *, int id, void *data);
enum {
AmbientOcclusion = 100
@@ -89,7 +93,8 @@ public:
ShaderClosure sc;
CBSDFClosure(int scattering) : OSL::ClosurePrimitive(BSDF),
- m_scattering_label(scattering), m_shaderdata_flag(0) { }
+ m_scattering_label(scattering), m_shaderdata_flag(0)
+ { memset(&sc, 0, sizeof(sc)); }
~CBSDFClosure() { }
int scattering() const { return m_scattering_label; }
diff --git a/intern/cycles/kernel/osl/osl_globals.h b/intern/cycles/kernel/osl/osl_globals.h
index c52b3902679..5a658d8244a 100644
--- a/intern/cycles/kernel/osl/osl_globals.h
+++ b/intern/cycles/kernel/osl/osl_globals.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __OSL_GLOBALS_H__
diff --git a/intern/cycles/kernel/osl/osl_services.cpp b/intern/cycles/kernel/osl/osl_services.cpp
index 95cd73c6019..309f5ded96d 100644
--- a/intern/cycles/kernel/osl/osl_services.cpp
+++ b/intern/cycles/kernel/osl/osl_services.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include <string.h>
@@ -99,6 +97,7 @@ ustring OSLRenderServices::u_empty;
OSLRenderServices::OSLRenderServices()
{
kernel_globals = NULL;
+ osl_ts = NULL;
}
OSLRenderServices::~OSLRenderServices()
@@ -703,7 +702,7 @@ bool OSLRenderServices::get_attribute(void *renderstate, bool derivatives, ustri
int object, prim, segment;
/* lookup of attribute on another object */
- if (object_name != u_empty || sd == NULL) {
+ if (object_name != u_empty) {
OSLGlobals::ObjectNameMap::iterator it = kg->osl->object_name_map.find(object_name);
if (it == kg->osl->object_name_map.end())
diff --git a/intern/cycles/kernel/osl/osl_services.h b/intern/cycles/kernel/osl/osl_services.h
index 5ec4673ef37..f62895047b3 100644
--- a/intern/cycles/kernel/osl/osl_services.h
+++ b/intern/cycles/kernel/osl/osl_services.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __OSL_SERVICES_H__
diff --git a/intern/cycles/kernel/osl/osl_shader.cpp b/intern/cycles/kernel/osl/osl_shader.cpp
index dedda1dc10e..18e8fee4348 100644
--- a/intern/cycles/kernel/osl/osl_shader.cpp
+++ b/intern/cycles/kernel/osl/osl_shader.cpp
@@ -1,26 +1,28 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "kernel_compat_cpu.h"
+#include "kernel_montecarlo.h"
#include "kernel_types.h"
#include "kernel_globals.h"
#include "kernel_object.h"
+#include "closure/bsdf_diffuse.h"
+#include "closure/bssrdf.h"
+
#include "osl_bssrdf.h"
#include "osl_closures.h"
#include "osl_globals.h"
@@ -136,7 +138,7 @@ static void shaderdata_to_shaderglobals(KernelGlobals *kg, ShaderData *sd,
/* Surface */
-static void flatten_surface_closure_tree(ShaderData *sd, bool no_glossy,
+static void flatten_surface_closure_tree(ShaderData *sd, int path_flag,
const OSL::ClosureColor *closure, float3 weight = make_float3(1.0f, 1.0f, 1.0f))
{
/* OSL gives us a closure tree, we flatten it into arrays per
@@ -148,7 +150,11 @@ static void flatten_surface_closure_tree(ShaderData *sd, bool no_glossy,
if (prim) {
ShaderClosure sc;
+#ifdef OSL_SUPPORTS_WEIGHTED_CLOSURE_COMPONENTS
+ sc.weight = weight*TO_FLOAT3(comp->w);
+#else
sc.weight = weight;
+#endif
switch (prim->category()) {
case OSL::ClosurePrimitive::BSDF: {
@@ -156,8 +162,11 @@ static void flatten_surface_closure_tree(ShaderData *sd, bool no_glossy,
int scattering = bsdf->scattering();
/* no caustics option */
- if (no_glossy && scattering == LABEL_GLOSSY)
- return;
+ if(scattering == LABEL_GLOSSY && (path_flag & PATH_RAY_DIFFUSE)) {
+ KernelGlobals *kg = sd->osl_globals;
+ if(kernel_data.integrator.no_caustics)
+ return;
+ }
/* sample weight */
float sample_weight = fabsf(average(weight));
@@ -171,6 +180,10 @@ static void flatten_surface_closure_tree(ShaderData *sd, bool no_glossy,
sc.data1 = bsdf->sc.data1;
sc.prim = bsdf->sc.prim;
+#ifdef __HAIR__
+ sc.offset = bsdf->sc.offset;
+#endif
+
/* add */
if(sc.sample_weight > 1e-5f && sd->num_closure < MAX_CLOSURE) {
sd->closure[sd->num_closure++] = sc;
@@ -184,6 +197,8 @@ static void flatten_surface_closure_tree(ShaderData *sd, bool no_glossy,
sc.sample_weight = sample_weight;
sc.type = CLOSURE_EMISSION_ID;
+ sc.data0 = 0.0f;
+ sc.data1 = 0.0f;
sc.prim = NULL;
/* flag */
@@ -199,6 +214,8 @@ static void flatten_surface_closure_tree(ShaderData *sd, bool no_glossy,
sc.sample_weight = sample_weight;
sc.type = CLOSURE_AMBIENT_OCCLUSION_ID;
+ sc.data0 = 0.0f;
+ sc.data1 = 0.0f;
sc.prim = NULL;
if(sd->num_closure < MAX_CLOSURE) {
@@ -210,6 +227,8 @@ static void flatten_surface_closure_tree(ShaderData *sd, bool no_glossy,
case OSL::ClosurePrimitive::Holdout: {
sc.sample_weight = 0.0f;
sc.type = CLOSURE_HOLDOUT_ID;
+ sc.data0 = 0.0f;
+ sc.data1 = 0.0f;
sc.prim = NULL;
if(sd->num_closure < MAX_CLOSURE) {
@@ -228,28 +247,35 @@ static void flatten_surface_closure_tree(ShaderData *sd, bool no_glossy,
sc.type = bssrdf->sc.type;
sc.N = bssrdf->sc.N;
sc.data1 = bssrdf->sc.data1;
+ sc.T.x = bssrdf->sc.T.x;
sc.prim = NULL;
+ /* disable in case of diffuse ancestor, can't see it well then and
+ * adds considerably noise due to probabilities of continuing path
+ * getting lower and lower */
+ if(path_flag & PATH_RAY_DIFFUSE_ANCESTOR)
+ bssrdf->radius = make_float3(0.0f, 0.0f, 0.0f);
+
/* create one closure for each color channel */
if(fabsf(weight.x) > 0.0f) {
sc.weight = make_float3(weight.x, 0.0f, 0.0f);
sc.data0 = bssrdf->radius.x;
+ sd->flag |= bssrdf_setup(&sc, sc.type);
sd->closure[sd->num_closure++] = sc;
- sd->flag |= bssrdf->shaderdata_flag();
}
if(fabsf(weight.y) > 0.0f) {
sc.weight = make_float3(0.0f, weight.y, 0.0f);
sc.data0 = bssrdf->radius.y;
+ sd->flag |= bssrdf_setup(&sc, sc.type);
sd->closure[sd->num_closure++] = sc;
- sd->flag |= bssrdf->shaderdata_flag();
}
if(fabsf(weight.z) > 0.0f) {
sc.weight = make_float3(0.0f, 0.0f, weight.z);
sc.data0 = bssrdf->radius.z;
+ sd->flag |= bssrdf_setup(&sc, sc.type);
sd->closure[sd->num_closure++] = sc;
- sd->flag |= bssrdf->shaderdata_flag();
}
}
break;
@@ -264,12 +290,12 @@ static void flatten_surface_closure_tree(ShaderData *sd, bool no_glossy,
}
else if (closure->type == OSL::ClosureColor::MUL) {
OSL::ClosureMul *mul = (OSL::ClosureMul *)closure;
- flatten_surface_closure_tree(sd, no_glossy, mul->closure, TO_FLOAT3(mul->weight) * weight);
+ flatten_surface_closure_tree(sd, path_flag, mul->closure, TO_FLOAT3(mul->weight) * weight);
}
else if (closure->type == OSL::ClosureColor::ADD) {
OSL::ClosureAdd *add = (OSL::ClosureAdd *)closure;
- flatten_surface_closure_tree(sd, no_glossy, add->closureA, weight);
- flatten_surface_closure_tree(sd, no_glossy, add->closureB, weight);
+ flatten_surface_closure_tree(sd, path_flag, add->closureA, weight);
+ flatten_surface_closure_tree(sd, path_flag, add->closureB, weight);
}
}
@@ -292,10 +318,8 @@ void OSLShader::eval_surface(KernelGlobals *kg, ShaderData *sd, float randb, int
sd->num_closure = 0;
sd->randb_closure = randb;
- if (globals->Ci) {
- bool no_glossy = (path_flag & PATH_RAY_DIFFUSE) && kernel_data.integrator.no_caustics;
- flatten_surface_closure_tree(sd, no_glossy, globals->Ci);
- }
+ if (globals->Ci)
+ flatten_surface_closure_tree(sd, path_flag, globals->Ci);
}
/* Background */
@@ -311,7 +335,11 @@ static float3 flatten_background_closure_tree(const OSL::ClosureColor *closure)
OSL::ClosurePrimitive *prim = (OSL::ClosurePrimitive *)comp->data();
if (prim && prim->category() == OSL::ClosurePrimitive::Background)
+#ifdef OSL_SUPPORTS_WEIGHTED_CLOSURE_COMPONENTS
+ return TO_FLOAT3(comp->w);
+#else
return make_float3(1.0f, 1.0f, 1.0f);
+#endif
}
else if (closure->type == OSL::ClosureColor::MUL) {
OSL::ClosureMul *mul = (OSL::ClosureMul *)closure;
@@ -363,7 +391,11 @@ static void flatten_volume_closure_tree(ShaderData *sd,
if (prim) {
ShaderClosure sc;
+#ifdef OSL_SUPPORTS_WEIGHTED_CLOSURE_COMPONENTS
+ sc.weight = weight*TO_FLOAT3(comp->w);
+#else
sc.weight = weight;
+#endif
switch (prim->category()) {
case OSL::ClosurePrimitive::Volume: {
@@ -372,6 +404,8 @@ static void flatten_volume_closure_tree(ShaderData *sd,
sc.sample_weight = sample_weight;
sc.type = CLOSURE_VOLUME_ID;
+ sc.data0 = 0.0f;
+ sc.data1 = 0.0f;
sc.prim = NULL;
/* add */
diff --git a/intern/cycles/kernel/osl/osl_shader.h b/intern/cycles/kernel/osl/osl_shader.h
index 2062c651162..777ecb6af81 100644
--- a/intern/cycles/kernel/osl/osl_shader.h
+++ b/intern/cycles/kernel/osl/osl_shader.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __OSL_SHADER_H__
diff --git a/intern/cycles/kernel/shaders/CMakeLists.txt b/intern/cycles/kernel/shaders/CMakeLists.txt
index 660cfbce528..0f8542b0546 100644
--- a/intern/cycles/kernel/shaders/CMakeLists.txt
+++ b/intern/cycles/kernel/shaders/CMakeLists.txt
@@ -74,6 +74,7 @@ set(SRC_OSL
node_blackbody.osl
node_wave_texture.osl
node_wireframe.osl
+ node_hair_bsdf.osl
)
set(SRC_OSL_HEADERS
diff --git a/intern/cycles/kernel/shaders/SConscript b/intern/cycles/kernel/shaders/SConscript
index aad6e23e4d4..8bc1c2206e0 100644
--- a/intern/cycles/kernel/shaders/SConscript
+++ b/intern/cycles/kernel/shaders/SConscript
@@ -57,7 +57,7 @@ if env['WITH_BF_CYCLES_OSL']:
osl_file = os.path.join(source_dir, f)
oso_file = os.path.join(build_dir, f.replace('.osl', '.oso'))
- command = "%s -q -O2 -I%s -o %s %s" % (osl_compiler, source_dir, oso_file, osl_file)
+ command = "\"%s\" -q -O2 -I\"%s\" -o \"%s\" \"%s\"" % (osl_compiler, source_dir, oso_file, osl_file)
shaders.Command(oso_file, f, command)
shaders.Depends(oso_file, [f] + dependencies)
diff --git a/intern/cycles/kernel/shaders/node_add_closure.osl b/intern/cycles/kernel/shaders/node_add_closure.osl
index 5c9ffecd1f1..b826fb22784 100644
--- a/intern/cycles/kernel/shaders/node_add_closure.osl
+++ b/intern/cycles/kernel/shaders/node_add_closure.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_ambient_occlusion.osl b/intern/cycles/kernel/shaders/node_ambient_occlusion.osl
index 58c44224e8d..961aed1016b 100644
--- a/intern/cycles/kernel/shaders/node_ambient_occlusion.osl
+++ b/intern/cycles/kernel/shaders/node_ambient_occlusion.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_attribute.osl b/intern/cycles/kernel/shaders/node_attribute.osl
index 47404927779..43f69fab053 100644
--- a/intern/cycles/kernel/shaders/node_attribute.osl
+++ b/intern/cycles/kernel/shaders/node_attribute.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_background.osl b/intern/cycles/kernel/shaders/node_background.osl
index b0c62c0381c..c4379a8f71b 100644
--- a/intern/cycles/kernel/shaders/node_background.osl
+++ b/intern/cycles/kernel/shaders/node_background.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_blackbody.osl b/intern/cycles/kernel/shaders/node_blackbody.osl
index 3eb0ec4b5e3..d26e56ab06d 100644
--- a/intern/cycles/kernel/shaders/node_blackbody.osl
+++ b/intern/cycles/kernel/shaders/node_blackbody.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2013, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_brick_texture.osl b/intern/cycles/kernel/shaders/node_brick_texture.osl
index aa9742fb277..70a6a6ea7ce 100644
--- a/intern/cycles/kernel/shaders/node_brick_texture.osl
+++ b/intern/cycles/kernel/shaders/node_brick_texture.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2012, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_brightness.osl b/intern/cycles/kernel/shaders/node_brightness.osl
index 7b1db8efbde..468b0f052c3 100644
--- a/intern/cycles/kernel/shaders/node_brightness.osl
+++ b/intern/cycles/kernel/shaders/node_brightness.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_bump.osl b/intern/cycles/kernel/shaders/node_bump.osl
index 321306b6c71..bbc08760cd5 100644
--- a/intern/cycles/kernel/shaders/node_bump.osl
+++ b/intern/cycles/kernel/shaders/node_bump.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_camera.osl b/intern/cycles/kernel/shaders/node_camera.osl
index 898ebd2bbb2..20ebb7dc095 100644
--- a/intern/cycles/kernel/shaders/node_camera.osl
+++ b/intern/cycles/kernel/shaders/node_camera.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_checker_texture.osl b/intern/cycles/kernel/shaders/node_checker_texture.osl
index 84cfa8937a6..6723076723c 100644
--- a/intern/cycles/kernel/shaders/node_checker_texture.osl
+++ b/intern/cycles/kernel/shaders/node_checker_texture.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2012, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_color.h b/intern/cycles/kernel/shaders/node_color.h
index 7fdef65f7f0..095e628f20c 100644
--- a/intern/cycles/kernel/shaders/node_color.h
+++ b/intern/cycles/kernel/shaders/node_color.h
@@ -1,21 +1,19 @@
/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
-/* Color Management */
-
float color_srgb_to_scene_linear(float c)
{
if (c < 0.04045)
diff --git a/intern/cycles/kernel/shaders/node_combine_hsv.osl b/intern/cycles/kernel/shaders/node_combine_hsv.osl
index a5c889e340f..010773acc5c 100644
--- a/intern/cycles/kernel/shaders/node_combine_hsv.osl
+++ b/intern/cycles/kernel/shaders/node_combine_hsv.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2013, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_combine_rgb.osl b/intern/cycles/kernel/shaders/node_combine_rgb.osl
index 1bdb4de9a5e..8466a89b536 100644
--- a/intern/cycles/kernel/shaders/node_combine_rgb.osl
+++ b/intern/cycles/kernel/shaders/node_combine_rgb.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_convert_from_color.osl b/intern/cycles/kernel/shaders/node_convert_from_color.osl
index 6a6512e9f5b..2f4503e66e3 100644
--- a/intern/cycles/kernel/shaders/node_convert_from_color.osl
+++ b/intern/cycles/kernel/shaders/node_convert_from_color.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_convert_from_float.osl b/intern/cycles/kernel/shaders/node_convert_from_float.osl
index b6d5084a6dd..f5b91903078 100644
--- a/intern/cycles/kernel/shaders/node_convert_from_float.osl
+++ b/intern/cycles/kernel/shaders/node_convert_from_float.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_convert_from_int.osl b/intern/cycles/kernel/shaders/node_convert_from_int.osl
index 3d389cfa587..110922a5df1 100644
--- a/intern/cycles/kernel/shaders/node_convert_from_int.osl
+++ b/intern/cycles/kernel/shaders/node_convert_from_int.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_convert_from_normal.osl b/intern/cycles/kernel/shaders/node_convert_from_normal.osl
index a4cb004f597..995c86d8828 100644
--- a/intern/cycles/kernel/shaders/node_convert_from_normal.osl
+++ b/intern/cycles/kernel/shaders/node_convert_from_normal.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_convert_from_point.osl b/intern/cycles/kernel/shaders/node_convert_from_point.osl
index 8ea7d380247..2ed151273a8 100644
--- a/intern/cycles/kernel/shaders/node_convert_from_point.osl
+++ b/intern/cycles/kernel/shaders/node_convert_from_point.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_convert_from_string.osl b/intern/cycles/kernel/shaders/node_convert_from_string.osl
index f40535ac7a3..50cce252be4 100644
--- a/intern/cycles/kernel/shaders/node_convert_from_string.osl
+++ b/intern/cycles/kernel/shaders/node_convert_from_string.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_convert_from_vector.osl b/intern/cycles/kernel/shaders/node_convert_from_vector.osl
index ae9f97414d5..035c46625a0 100644
--- a/intern/cycles/kernel/shaders/node_convert_from_vector.osl
+++ b/intern/cycles/kernel/shaders/node_convert_from_vector.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_diffuse_bsdf.osl b/intern/cycles/kernel/shaders/node_diffuse_bsdf.osl
index eae4772f173..e8c94660e4f 100644
--- a/intern/cycles/kernel/shaders/node_diffuse_bsdf.osl
+++ b/intern/cycles/kernel/shaders/node_diffuse_bsdf.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_emission.osl b/intern/cycles/kernel/shaders/node_emission.osl
index 854d94c0f9d..2428da5ef4e 100644
--- a/intern/cycles/kernel/shaders/node_emission.osl
+++ b/intern/cycles/kernel/shaders/node_emission.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_environment_texture.osl b/intern/cycles/kernel/shaders/node_environment_texture.osl
index 230116d3d77..136ccdf8b18 100644
--- a/intern/cycles/kernel/shaders/node_environment_texture.osl
+++ b/intern/cycles/kernel/shaders/node_environment_texture.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
@@ -21,7 +19,7 @@
vector environment_texture_direction_to_equirectangular(vector dir)
{
- float u = -atan2(dir[1], dir[0]) / (2.0 * M_PI) + 0.5;
+ float u = -atan2(dir[1], dir[0]) / (M_2PI) + 0.5;
float v = atan2(dir[2], hypot(dir[0], dir[1])) / M_PI + 0.5;
return vector(u, v, 0.0);
diff --git a/intern/cycles/kernel/shaders/node_fresnel.h b/intern/cycles/kernel/shaders/node_fresnel.h
index 61b980f7375..447a84255ef 100644
--- a/intern/cycles/kernel/shaders/node_fresnel.h
+++ b/intern/cycles/kernel/shaders/node_fresnel.h
@@ -1,17 +1,17 @@
/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
float fresnel_dielectric_cos(float cosi, float eta)
diff --git a/intern/cycles/kernel/shaders/node_fresnel.osl b/intern/cycles/kernel/shaders/node_fresnel.osl
index 0ab6594cc4f..ca463817840 100644
--- a/intern/cycles/kernel/shaders/node_fresnel.osl
+++ b/intern/cycles/kernel/shaders/node_fresnel.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_gamma.osl b/intern/cycles/kernel/shaders/node_gamma.osl
index 5c913c29d5f..a2ad3f766fe 100644
--- a/intern/cycles/kernel/shaders/node_gamma.osl
+++ b/intern/cycles/kernel/shaders/node_gamma.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_geometry.osl b/intern/cycles/kernel/shaders/node_geometry.osl
index 3d5d67360ce..dbdf55802ae 100644
--- a/intern/cycles/kernel/shaders/node_geometry.osl
+++ b/intern/cycles/kernel/shaders/node_geometry.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_glass_bsdf.osl b/intern/cycles/kernel/shaders/node_glass_bsdf.osl
index ba08964d116..c79785f2d65 100644
--- a/intern/cycles/kernel/shaders/node_glass_bsdf.osl
+++ b/intern/cycles/kernel/shaders/node_glass_bsdf.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_glossy_bsdf.osl b/intern/cycles/kernel/shaders/node_glossy_bsdf.osl
index 79bbe724acd..b4e0fe62223 100644
--- a/intern/cycles/kernel/shaders/node_glossy_bsdf.osl
+++ b/intern/cycles/kernel/shaders/node_glossy_bsdf.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_gradient_texture.osl b/intern/cycles/kernel/shaders/node_gradient_texture.osl
index 1aca31c17ef..5aa05917dc2 100644
--- a/intern/cycles/kernel/shaders/node_gradient_texture.osl
+++ b/intern/cycles/kernel/shaders/node_gradient_texture.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_hair_bsdf.osl b/intern/cycles/kernel/shaders/node_hair_bsdf.osl
new file mode 100644
index 00000000000..54d4cb67c3b
--- /dev/null
+++ b/intern/cycles/kernel/shaders/node_hair_bsdf.osl
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2011, Blender Foundation.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "stdosl.h"
+
+shader node_hair_bsdf(
+ color Color = 0.8,
+ string component = "Reflection",
+ float Offset = 0.0,
+ float RoughnessU = 0.1,
+ float RoughnessV = 1.0,
+ normal Normal = Ng,
+ output closure color BSDF = 0)
+{
+ float IsStrand;
+ float roughnessh = clamp(RoughnessU, 0.001, 1.0);
+ float roughnessv = clamp(RoughnessV, 0.001, 1.0);
+ getattribute("geom:is_curve", IsStrand);
+
+ if (!IsStrand) {
+ if (backfacing()) {
+ BSDF = transparent();
+ }
+ else {
+ if (component == "Reflection")
+ BSDF = Color * hair_reflection(Normal, roughnessh, roughnessv, normalize(dPdv), 0.0);
+ else
+ BSDF = Color * hair_transmission(Normal, roughnessh, roughnessv, normalize(dPdv), 0.0);
+ }
+ }
+ else {
+ if (backfacing()) {
+ BSDF = transparent();
+ }
+ else {
+ if (component == "Reflection")
+ BSDF = Color * hair_reflection(Normal, roughnessh, roughnessv, dPdu, -Offset);
+ else
+ BSDF = Color * hair_transmission(Normal, roughnessh, roughnessv, dPdu, -Offset);
+ }
+ }
+}
diff --git a/intern/cycles/kernel/shaders/node_hair_info.osl b/intern/cycles/kernel/shaders/node_hair_info.osl
index cbb3b98383f..1d1ba1983e1 100644
--- a/intern/cycles/kernel/shaders/node_hair_info.osl
+++ b/intern/cycles/kernel/shaders/node_hair_info.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2012, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_holdout.osl b/intern/cycles/kernel/shaders/node_holdout.osl
index aede50c7ca0..cafad1b5757 100644
--- a/intern/cycles/kernel/shaders/node_holdout.osl
+++ b/intern/cycles/kernel/shaders/node_holdout.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_hsv.osl b/intern/cycles/kernel/shaders/node_hsv.osl
index d5fdb1c616f..4722bde4cd7 100644
--- a/intern/cycles/kernel/shaders/node_hsv.osl
+++ b/intern/cycles/kernel/shaders/node_hsv.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_image_texture.osl b/intern/cycles/kernel/shaders/node_image_texture.osl
index 92c625e99c4..caa755636b9 100644
--- a/intern/cycles/kernel/shaders/node_image_texture.osl
+++ b/intern/cycles/kernel/shaders/node_image_texture.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_invert.osl b/intern/cycles/kernel/shaders/node_invert.osl
index 8711e2f120f..81ef2d0dc3d 100644
--- a/intern/cycles/kernel/shaders/node_invert.osl
+++ b/intern/cycles/kernel/shaders/node_invert.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_layer_weight.osl b/intern/cycles/kernel/shaders/node_layer_weight.osl
index c185c06bf64..d03ebe2239a 100644
--- a/intern/cycles/kernel/shaders/node_layer_weight.osl
+++ b/intern/cycles/kernel/shaders/node_layer_weight.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_light_falloff.osl b/intern/cycles/kernel/shaders/node_light_falloff.osl
index a9d41604361..311b87f3764 100644
--- a/intern/cycles/kernel/shaders/node_light_falloff.osl
+++ b/intern/cycles/kernel/shaders/node_light_falloff.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2012, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_light_path.osl b/intern/cycles/kernel/shaders/node_light_path.osl
index ed3c6969970..db5c95be079 100644
--- a/intern/cycles/kernel/shaders/node_light_path.osl
+++ b/intern/cycles/kernel/shaders/node_light_path.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_magic_texture.osl b/intern/cycles/kernel/shaders/node_magic_texture.osl
index 943d9c6af68..b8afc6e29ac 100644
--- a/intern/cycles/kernel/shaders/node_magic_texture.osl
+++ b/intern/cycles/kernel/shaders/node_magic_texture.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_mapping.osl b/intern/cycles/kernel/shaders/node_mapping.osl
index 787f65217aa..46ff9f05e07 100644
--- a/intern/cycles/kernel/shaders/node_mapping.osl
+++ b/intern/cycles/kernel/shaders/node_mapping.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_math.osl b/intern/cycles/kernel/shaders/node_math.osl
index 214ef931660..066e5f8dbe1 100644
--- a/intern/cycles/kernel/shaders/node_math.osl
+++ b/intern/cycles/kernel/shaders/node_math.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
@@ -97,6 +95,6 @@ shader node_math(
Value = safe_modulo(Value1, Value2);
if (Clamp)
- Value = clamp(Value1, 0.0, 1.0);
+ Value = clamp(Value, 0.0, 1.0);
}
diff --git a/intern/cycles/kernel/shaders/node_mix.osl b/intern/cycles/kernel/shaders/node_mix.osl
index bcd00bb84e8..c2c397c6446 100644
--- a/intern/cycles/kernel/shaders/node_mix.osl
+++ b/intern/cycles/kernel/shaders/node_mix.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_mix_closure.osl b/intern/cycles/kernel/shaders/node_mix_closure.osl
index a0bef49b879..79d71c97371 100644
--- a/intern/cycles/kernel/shaders/node_mix_closure.osl
+++ b/intern/cycles/kernel/shaders/node_mix_closure.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_musgrave_texture.osl b/intern/cycles/kernel/shaders/node_musgrave_texture.osl
index 8675c23d0d8..60762539002 100644
--- a/intern/cycles/kernel/shaders/node_musgrave_texture.osl
+++ b/intern/cycles/kernel/shaders/node_musgrave_texture.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_noise_texture.osl b/intern/cycles/kernel/shaders/node_noise_texture.osl
index ec86a10b013..912795966e0 100644
--- a/intern/cycles/kernel/shaders/node_noise_texture.osl
+++ b/intern/cycles/kernel/shaders/node_noise_texture.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_normal.osl b/intern/cycles/kernel/shaders/node_normal.osl
index d5f16acb88c..14af044e0c0 100644
--- a/intern/cycles/kernel/shaders/node_normal.osl
+++ b/intern/cycles/kernel/shaders/node_normal.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_normal_map.osl b/intern/cycles/kernel/shaders/node_normal_map.osl
index 5c7192945ab..c2080ecb194 100644
--- a/intern/cycles/kernel/shaders/node_normal_map.osl
+++ b/intern/cycles/kernel/shaders/node_normal_map.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_object_info.osl b/intern/cycles/kernel/shaders/node_object_info.osl
index c3b1ff29f09..1ebe767e82d 100644
--- a/intern/cycles/kernel/shaders/node_object_info.osl
+++ b/intern/cycles/kernel/shaders/node_object_info.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_output_displacement.osl b/intern/cycles/kernel/shaders/node_output_displacement.osl
index 5649b879c5b..613d6be5f3b 100644
--- a/intern/cycles/kernel/shaders/node_output_displacement.osl
+++ b/intern/cycles/kernel/shaders/node_output_displacement.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_output_surface.osl b/intern/cycles/kernel/shaders/node_output_surface.osl
index da6eedb9f98..fb16e85ce0d 100644
--- a/intern/cycles/kernel/shaders/node_output_surface.osl
+++ b/intern/cycles/kernel/shaders/node_output_surface.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_output_volume.osl b/intern/cycles/kernel/shaders/node_output_volume.osl
index ec32ed3fcd2..11a884b7d75 100644
--- a/intern/cycles/kernel/shaders/node_output_volume.osl
+++ b/intern/cycles/kernel/shaders/node_output_volume.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_particle_info.osl b/intern/cycles/kernel/shaders/node_particle_info.osl
index 5e59ad1a990..077b0c114da 100644
--- a/intern/cycles/kernel/shaders/node_particle_info.osl
+++ b/intern/cycles/kernel/shaders/node_particle_info.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_refraction_bsdf.osl b/intern/cycles/kernel/shaders/node_refraction_bsdf.osl
index d95a26cdff9..a4e9d0825db 100644
--- a/intern/cycles/kernel/shaders/node_refraction_bsdf.osl
+++ b/intern/cycles/kernel/shaders/node_refraction_bsdf.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_rgb_curves.osl b/intern/cycles/kernel/shaders/node_rgb_curves.osl
index 362bae8a750..4e0f8721144 100644
--- a/intern/cycles/kernel/shaders/node_rgb_curves.osl
+++ b/intern/cycles/kernel/shaders/node_rgb_curves.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_rgb_ramp.osl b/intern/cycles/kernel/shaders/node_rgb_ramp.osl
index 2e0784c8ecf..d3c2e9573d2 100644
--- a/intern/cycles/kernel/shaders/node_rgb_ramp.osl
+++ b/intern/cycles/kernel/shaders/node_rgb_ramp.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_separate_hsv.osl b/intern/cycles/kernel/shaders/node_separate_hsv.osl
index 0f074bf23b5..94fc5de9122 100644
--- a/intern/cycles/kernel/shaders/node_separate_hsv.osl
+++ b/intern/cycles/kernel/shaders/node_separate_hsv.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2013, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_separate_rgb.osl b/intern/cycles/kernel/shaders/node_separate_rgb.osl
index 0066a1daa91..aebb63a0ee4 100644
--- a/intern/cycles/kernel/shaders/node_separate_rgb.osl
+++ b/intern/cycles/kernel/shaders/node_separate_rgb.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_set_normal.osl b/intern/cycles/kernel/shaders/node_set_normal.osl
index 27a4b2f5b8b..8eef152308a 100644
--- a/intern/cycles/kernel/shaders/node_set_normal.osl
+++ b/intern/cycles/kernel/shaders/node_set_normal.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2012, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_sky_texture.osl b/intern/cycles/kernel/shaders/node_sky_texture.osl
index 61788799d99..85c2dbdb2c2 100644
--- a/intern/cycles/kernel/shaders/node_sky_texture.osl
+++ b/intern/cycles/kernel/shaders/node_sky_texture.osl
@@ -1,34 +1,22 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
#include "node_color.h"
-struct KernelSunSky {
- /* sun direction in spherical and cartesian */
- float theta, phi;
- vector dir;
-
- /* perez function parameters */
- float zenith_Y, zenith_x, zenith_y;
- float perez_Y[5], perez_x[5], perez_y[5];
-};
-
float sky_angle_between(float thetav, float phiv, float theta, float phi)
{
float cospsi = sin(thetav) * sin(theta) * cos(phi - phiv) + cos(thetav) * cos(theta);
@@ -46,7 +34,8 @@ vector sky_spherical_coordinates(vector dir)
return vector(acos(dir[2]), atan2(dir[0], dir[1]), 0);
}
-float sky_perez_function(float lam[5], float theta, float gamma)
+/* Preetham */
+float sky_perez_function(float lam[9], float theta, float gamma)
{
float ctheta = cos(theta);
float cgamma = cos(gamma);
@@ -54,7 +43,9 @@ float sky_perez_function(float lam[5], float theta, float gamma)
return (1.0 + lam[0] * exp(lam[1] / ctheta)) * (1.0 + lam[2] * exp(lam[3] * gamma) + lam[4] * cgamma * cgamma);
}
-color sky_xyz_radiance(KernelSunSky sunsky, vector dir)
+color sky_radiance_old(normal dir,
+ float sunphi, float suntheta, color radiance,
+ float config_x[9], float config_y[9], float config_z[9])
{
/* convert vector to spherical coordinates */
vector spherical = sky_spherical_coordinates(dir);
@@ -62,89 +53,81 @@ color sky_xyz_radiance(KernelSunSky sunsky, vector dir)
float phi = spherical[1];
/* angle between sun direction and dir */
- float gamma = sky_angle_between(theta, phi, sunsky.theta, sunsky.phi);
+ float gamma = sky_angle_between(theta, phi, suntheta, sunphi);
/* clamp theta to horizon */
theta = min(theta, M_PI_2 - 0.001);
/* compute xyY color space values */
- float x = sunsky.zenith_x * sky_perez_function(sunsky.perez_x, theta, gamma);
- float y = sunsky.zenith_y * sky_perez_function(sunsky.perez_y, theta, gamma);
- float Y = sunsky.zenith_Y * sky_perez_function(sunsky.perez_Y, theta, gamma);
+ float x = radiance[1] * sky_perez_function(config_y, theta, gamma);
+ float y = radiance[2] * sky_perez_function(config_z, theta, gamma);
+ float Y = radiance[0] * sky_perez_function(config_x, theta, gamma);
/* convert to RGB */
color xyz = xyY_to_xyz(x, y, Y);
return xyz_to_rgb(xyz[0], xyz[1], xyz[2]);
}
-void precompute_sunsky(vector dir, float turbidity, output KernelSunSky sunsky)
+/* Hosek / Wilkie */
+float sky_radiance_internal(float config[9], float theta, float gamma)
+{
+ float ctheta = cos(theta);
+ float cgamma = cos(gamma);
+
+ float expM = exp(config[4] * gamma);
+ float rayM = cgamma * cgamma;
+ float mieM = (1.0 + rayM) / pow((1.0 + config[8] * config[8] - 2.0 * config[8] * cgamma), 1.5);
+ float zenith = sqrt(ctheta);
+
+ return (1.0 + config[0] * exp(config[1] / (ctheta + 0.01))) *
+ (config[2] + config[3] * expM + config[5] * rayM + config[6] * mieM + config[7] * zenith);
+}
+
+color sky_radiance_new(normal dir,
+ float sunphi, float suntheta, color radiance,
+ float config_x[9], float config_y[9], float config_z[9])
{
+ /* convert vector to spherical coordinates */
vector spherical = sky_spherical_coordinates(dir);
float theta = spherical[0];
float phi = spherical[1];
- sunsky.theta = theta;
- sunsky.phi = phi;
- sunsky.dir = dir;
-
- float theta2 = theta * theta;
- float theta3 = theta2 * theta;
- float T = turbidity;
- float T2 = T * T;
-
- float chi = (4.0 / 9.0 - T / 120.0) * (M_PI - 2.0 * theta);
- sunsky.zenith_Y = (4.0453 * T - 4.9710) * tan(chi) - 0.2155 * T + 2.4192;
- sunsky.zenith_Y *= 0.06;
-
- sunsky.zenith_x =
- ( 0.00166 * theta3 - 0.00375 * theta2 + 0.00209 * theta) * T2 +
- (-0.02903 * theta3 + 0.06377 * theta2 - 0.03202 * theta + 0.00394) * T +
- ( 0.11693 * theta3 - 0.21196 * theta2 + 0.06052 * theta + 0.25886);
-
- sunsky.zenith_y =
- ( 0.00275 * theta3 - 0.00610 * theta2 + 0.00317 * theta) * T2 +
- (-0.04214 * theta3 + 0.08970 * theta2 - 0.04153 * theta + 0.00516) * T +
- ( 0.15346 * theta3 - 0.26756 * theta2 + 0.06670 * theta + 0.26688);
-
- sunsky.perez_Y[0] = ( 0.1787 * T - 1.4630);
- sunsky.perez_Y[1] = (-0.3554 * T + 0.4275);
- sunsky.perez_Y[2] = (-0.0227 * T + 5.3251);
- sunsky.perez_Y[3] = ( 0.1206 * T - 2.5771);
- sunsky.perez_Y[4] = (-0.0670 * T + 0.3703);
-
- sunsky.perez_x[0] = (-0.0193 * T - 0.2592);
- sunsky.perez_x[1] = (-0.0665 * T + 0.0008);
- sunsky.perez_x[2] = (-0.0004 * T + 0.2125);
- sunsky.perez_x[3] = (-0.0641 * T - 0.8989);
- sunsky.perez_x[4] = (-0.0033 * T + 0.0452);
-
- sunsky.perez_y[0] = (-0.0167 * T - 0.2608);
- sunsky.perez_y[1] = (-0.0950 * T + 0.0092);
- sunsky.perez_y[2] = (-0.0079 * T + 0.2102);
- sunsky.perez_y[3] = (-0.0441 * T - 1.6537);
- sunsky.perez_y[4] = (-0.0109 * T + 0.0529);
-
- sunsky.zenith_Y /= sky_perez_function(sunsky.perez_Y, 0, theta);
- sunsky.zenith_x /= sky_perez_function(sunsky.perez_x, 0, theta);
- sunsky.zenith_y /= sky_perez_function(sunsky.perez_y, 0, theta);
+ /* angle between sun direction and dir */
+ float gamma = sky_angle_between(theta, phi, suntheta, sunphi);
+
+ /* clamp theta to horizon */
+ theta = min(theta, M_PI_2 - 0.001);
+
+ /* compute xyz color space values */
+ float x = sky_radiance_internal(config_x, theta, gamma) * radiance[0];
+ float y = sky_radiance_internal(config_y, theta, gamma) * radiance[1];
+ float z = sky_radiance_internal(config_z, theta, gamma) * radiance[2];
+
+ /* convert to RGB and adjust strength */
+ return xyz_to_rgb(x, y, z) * (M_2PI / 683);
}
shader node_sky_texture(
int use_mapping = 0,
matrix mapping = matrix(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
vector Vector = P,
- vector sun_direction = vector(0, 0, 1),
- float turbidity = 2.2,
- output color Color = 0.0)
+ string sky_model = "Hosek / Wilkie",
+ float theta = 0.0,
+ float phi = 0.0,
+ color radiance = color(0.0, 0.0, 0.0),
+ float config_x[9] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
+ float config_y[9] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
+ float config_z[9] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
+ output color Color = color(0.0, 0.0, 0.0))
{
vector p = Vector;
if (use_mapping)
p = transform(mapping, p);
-
- KernelSunSky sunsky;
-
- precompute_sunsky(sun_direction, turbidity, sunsky);
- Color = sky_xyz_radiance(sunsky, p);
+
+ if (sky_model == "Hosek / Wilkie")
+ Color = sky_radiance_new(p, phi, theta, radiance, config_x, config_y, config_z);
+ else
+ Color = sky_radiance_old(p, phi, theta, radiance, config_x, config_y, config_z);
}
diff --git a/intern/cycles/kernel/shaders/node_subsurface_scattering.osl b/intern/cycles/kernel/shaders/node_subsurface_scattering.osl
index 5c25c44ec8f..1c0cd74c0be 100644
--- a/intern/cycles/kernel/shaders/node_subsurface_scattering.osl
+++ b/intern/cycles/kernel/shaders/node_subsurface_scattering.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
@@ -22,12 +20,15 @@ shader node_subsurface_scattering(
color Color = 0.8,
float Scale = 1.0,
vector Radius = vector(0.1, 0.1, 0.1),
- float IOR = 1.3,
+ float TextureBlur = 0.0,
+ float Sharpness = 0.0,
+ string Falloff = "Cubic",
normal Normal = N,
output closure color BSSRDF = 0)
{
- float eta = max(IOR, 1.0 + 1e-5);
-
- BSSRDF = Color * bssrdf_cubic(N, Scale * Radius);
+ if (Falloff == "Gaussian")
+ BSSRDF = Color * bssrdf_gaussian(N, Scale * Radius, TextureBlur);
+ else
+ BSSRDF = Color * bssrdf_cubic(N, Scale * Radius, TextureBlur, Sharpness);
}
diff --git a/intern/cycles/kernel/shaders/node_tangent.osl b/intern/cycles/kernel/shaders/node_tangent.osl
index 731af89231a..41a2b2b0216 100644
--- a/intern/cycles/kernel/shaders/node_tangent.osl
+++ b/intern/cycles/kernel/shaders/node_tangent.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_texture.h b/intern/cycles/kernel/shaders/node_texture.h
index 3997803ec08..de51559f297 100644
--- a/intern/cycles/kernel/shaders/node_texture.h
+++ b/intern/cycles/kernel/shaders/node_texture.h
@@ -1,17 +1,17 @@
/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
/* Voronoi Distances */
diff --git a/intern/cycles/kernel/shaders/node_texture_coordinate.osl b/intern/cycles/kernel/shaders/node_texture_coordinate.osl
index 9da582da5dc..8739b77ca78 100644
--- a/intern/cycles/kernel/shaders/node_texture_coordinate.osl
+++ b/intern/cycles/kernel/shaders/node_texture_coordinate.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_toon_bsdf.osl b/intern/cycles/kernel/shaders/node_toon_bsdf.osl
index 6533e15db37..1f7e1b8e6e1 100644
--- a/intern/cycles/kernel/shaders/node_toon_bsdf.osl
+++ b/intern/cycles/kernel/shaders/node_toon_bsdf.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2013, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_translucent_bsdf.osl b/intern/cycles/kernel/shaders/node_translucent_bsdf.osl
index c0a093b35d2..8059f5788ec 100644
--- a/intern/cycles/kernel/shaders/node_translucent_bsdf.osl
+++ b/intern/cycles/kernel/shaders/node_translucent_bsdf.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_transparent_bsdf.osl b/intern/cycles/kernel/shaders/node_transparent_bsdf.osl
index 976b7d5f756..552e4106b0c 100644
--- a/intern/cycles/kernel/shaders/node_transparent_bsdf.osl
+++ b/intern/cycles/kernel/shaders/node_transparent_bsdf.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_value.osl b/intern/cycles/kernel/shaders/node_value.osl
index d3672b8c0cf..aebfab35d2a 100644
--- a/intern/cycles/kernel/shaders/node_value.osl
+++ b/intern/cycles/kernel/shaders/node_value.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_vector_curves.osl b/intern/cycles/kernel/shaders/node_vector_curves.osl
index d1477467836..137ebe112eb 100644
--- a/intern/cycles/kernel/shaders/node_vector_curves.osl
+++ b/intern/cycles/kernel/shaders/node_vector_curves.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_vector_math.osl b/intern/cycles/kernel/shaders/node_vector_math.osl
index 4c94fc659c2..0c8857deae2 100644
--- a/intern/cycles/kernel/shaders/node_vector_math.osl
+++ b/intern/cycles/kernel/shaders/node_vector_math.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_vector_transform.osl b/intern/cycles/kernel/shaders/node_vector_transform.osl
index 2a501b25cea..6fb0ab1d8cc 100644
--- a/intern/cycles/kernel/shaders/node_vector_transform.osl
+++ b/intern/cycles/kernel/shaders/node_vector_transform.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2013, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_velvet_bsdf.osl b/intern/cycles/kernel/shaders/node_velvet_bsdf.osl
index 5506ab20703..37b26babc64 100644
--- a/intern/cycles/kernel/shaders/node_velvet_bsdf.osl
+++ b/intern/cycles/kernel/shaders/node_velvet_bsdf.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_voronoi_texture.osl b/intern/cycles/kernel/shaders/node_voronoi_texture.osl
index db8787892d2..7a1e0016690 100644
--- a/intern/cycles/kernel/shaders/node_voronoi_texture.osl
+++ b/intern/cycles/kernel/shaders/node_voronoi_texture.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_ward_bsdf.osl b/intern/cycles/kernel/shaders/node_ward_bsdf.osl
index 35c2b514328..2d360d594f2 100644
--- a/intern/cycles/kernel/shaders/node_ward_bsdf.osl
+++ b/intern/cycles/kernel/shaders/node_ward_bsdf.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
@@ -31,7 +29,7 @@ shader node_ward_bsdf(
vector T = Tangent;
if (Rotation != 0.0)
- T = rotate(T, Rotation * 2.0 * M_PI, point(0.0, 0.0, 0.0), Normal);
+ T = rotate(T, Rotation * M_2PI, point(0.0, 0.0, 0.0), Normal);
/* compute roughness */
float RoughnessU, RoughnessV;
diff --git a/intern/cycles/kernel/shaders/node_wave_texture.osl b/intern/cycles/kernel/shaders/node_wave_texture.osl
index 93d45ded9c3..2de376c62f5 100644
--- a/intern/cycles/kernel/shaders/node_wave_texture.osl
+++ b/intern/cycles/kernel/shaders/node_wave_texture.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2012, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_wavelength.osl b/intern/cycles/kernel/shaders/node_wavelength.osl
index 748b9e8e419..4333c1fd944 100644
--- a/intern/cycles/kernel/shaders/node_wavelength.osl
+++ b/intern/cycles/kernel/shaders/node_wavelength.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2013, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/node_wireframe.osl b/intern/cycles/kernel/shaders/node_wireframe.osl
index c9e6e6f3ff4..db8925c9efc 100644
--- a/intern/cycles/kernel/shaders/node_wireframe.osl
+++ b/intern/cycles/kernel/shaders/node_wireframe.osl
@@ -1,19 +1,17 @@
/*
- * Copyright 2013, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "stdosl.h"
diff --git a/intern/cycles/kernel/shaders/oslutil.h b/intern/cycles/kernel/shaders/oslutil.h
index 6c91684d9a6..d90900bc474 100644
--- a/intern/cycles/kernel/shaders/oslutil.h
+++ b/intern/cycles/kernel/shaders/oslutil.h
@@ -1,30 +1,34 @@
-/////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2009-2010 Sony Pictures Imageworks Inc., et al. All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in the
-// documentation and/or other materials provided with the distribution.
-// * Neither the name of Sony Pictures Imageworks nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-/////////////////////////////////////////////////////////////////////////////
-
+/*
+ * Adapted from Open Shading Language with this license:
+ *
+ * Copyright (c) 2009-2010 Sony Pictures Imageworks Inc., et al.
+ * All Rights Reserved.
+ *
+ * Modifications Copyright 2011, Blender Foundation.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Sony Pictures Imageworks nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
#ifndef CCL_OSLUTIL_H
#define CCL_OSLUTIL_H
diff --git a/intern/cycles/kernel/shaders/stdosl.h b/intern/cycles/kernel/shaders/stdosl.h
index 24c3e187783..47c5dc27f2b 100644
--- a/intern/cycles/kernel/shaders/stdosl.h
+++ b/intern/cycles/kernel/shaders/stdosl.h
@@ -134,12 +134,16 @@ normal mod (normal a, float b) { return a - b*floor(a/b); }
color mod (color a, float b) { return a - b*floor(a/b); }
float mod (float a, float b) { return a - b*floor(a/b); }
PERCOMP2 (min)
+int min (int a, int b) BUILTIN;
PERCOMP2 (max)
+int max (int a, int b) BUILTIN;
normal clamp (normal x, normal minval, normal maxval) { return max(min(x,maxval),minval); }
vector clamp (vector x, vector minval, vector maxval) { return max(min(x,maxval),minval); }
point clamp (point x, point minval, point maxval) { return max(min(x,maxval),minval); }
color clamp (color x, color minval, color maxval) { return max(min(x,maxval),minval); }
float clamp (float x, float minval, float maxval) { return max(min(x,maxval),minval); }
+int clamp (int x, int minval, int maxval) { return max(min(x,maxval),minval); }
+#if 0
normal mix (normal x, normal y, normal a) { return x*(1-a) + y*a; }
normal mix (normal x, normal y, float a) { return x*(1-a) + y*a; }
vector mix (vector x, vector y, vector a) { return x*(1-a) + y*a; }
@@ -149,6 +153,17 @@ point mix (point x, point y, float a) { return x*(1-a) + y*a; }
color mix (color x, color y, color a) { return x*(1-a) + y*a; }
color mix (color x, color y, float a) { return x*(1-a) + y*a; }
float mix (float x, float y, float a) { return x*(1-a) + y*a; }
+#else
+normal mix (normal x, normal y, normal a) BUILTIN;
+normal mix (normal x, normal y, float a) BUILTIN;
+vector mix (vector x, vector y, vector a) BUILTIN;
+vector mix (vector x, vector y, float a) BUILTIN;
+point mix (point x, point y, point a) BUILTIN;
+point mix (point x, point y, float a) BUILTIN;
+color mix (color x, color y, color a) BUILTIN;
+color mix (color x, color y, float a) BUILTIN;
+float mix (float x, float y, float a) BUILTIN;
+#endif
int isnan (float x) BUILTIN;
int isinf (float x) BUILTIN;
int isfinite (float x) BUILTIN;
@@ -418,8 +433,8 @@ int startswith (string s, string prefix) BUILTIN;
int endswith (string s, string suffix) BUILTIN;
string substr (string s, int start, int len) BUILTIN;
string substr (string s, int start) { return substr (s, start, strlen(s)); }
-float strtof (string str) BUILTIN;
-int strtoi (string str) BUILTIN;
+float stof (string str) BUILTIN;
+int stoi (string str) BUILTIN;
// Define concat in terms of shorter concat
string concat (string a, string b, string c) {
@@ -463,10 +478,17 @@ closure color emission() BUILTIN;
closure color background() BUILTIN;
closure color holdout() BUILTIN;
closure color ambient_occlusion() BUILTIN;
-closure color bssrdf_cubic(normal N, vector radius) BUILTIN;
-// Backwards compatibility
+// BSSRDF
+closure color bssrdf_cubic(normal N, vector radius, float texture_blur, float sharpness) BUILTIN;
+closure color bssrdf_gaussian(normal N, vector radius, float texture_blur) BUILTIN;
+closure color hair_reflection(normal N, float roughnessu, float roughnessv, vector T, float offset) BUILTIN;
+closure color hair_transmission(normal N, float roughnessu, float roughnessv, vector T, float offset) BUILTIN;
+
+// Backwards compatibility
+closure color bssrdf_cubic(normal N, vector radius) BUILTIN;
+closure color bssrdf_gaussian(normal N, vector radius) BUILTIN;
closure color specular_toon(normal N, float size, float smooth) BUILTIN;
// Renderer state
diff --git a/intern/cycles/kernel/svm/svm.h b/intern/cycles/kernel/svm/svm.h
index 5380bdad1ae..168127c620c 100644
--- a/intern/cycles/kernel/svm/svm.h
+++ b/intern/cycles/kernel/svm/svm.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __SVM_H__
@@ -257,7 +255,7 @@ __device_noinline void svm_eval_nodes(KernelGlobals *kg, ShaderData *sd, ShaderT
#endif
#ifdef __PROCEDURAL_TEXTURES__
case NODE_TEX_SKY:
- svm_node_tex_sky(kg, sd, stack, node.y, node.z);
+ svm_node_tex_sky(kg, sd, stack, node, &offset);
break;
case NODE_TEX_GRADIENT:
svm_node_tex_gradient(sd, stack, node);
diff --git a/intern/cycles/kernel/svm/svm_attribute.h b/intern/cycles/kernel/svm/svm_attribute.h
index 2beec995151..8e71e7cdd56 100644
--- a/intern/cycles/kernel/svm/svm_attribute.h
+++ b/intern/cycles/kernel/svm/svm_attribute.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/svm/svm_brick.h b/intern/cycles/kernel/svm/svm_brick.h
index c44a4740cca..19b4b5e779f 100644
--- a/intern/cycles/kernel/svm/svm_brick.h
+++ b/intern/cycles/kernel/svm/svm_brick.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2012, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/svm/svm_brightness.h b/intern/cycles/kernel/svm/svm_brightness.h
index 7514fc2f2fe..3e977dcbe1b 100644
--- a/intern/cycles/kernel/svm/svm_brightness.h
+++ b/intern/cycles/kernel/svm/svm_brightness.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/svm/svm_camera.h b/intern/cycles/kernel/svm/svm_camera.h
index f13cefb7764..76f50e196eb 100644
--- a/intern/cycles/kernel/svm/svm_camera.h
+++ b/intern/cycles/kernel/svm/svm_camera.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/svm/svm_checker.h b/intern/cycles/kernel/svm/svm_checker.h
index ffac07e9cd5..70fe2ac5a92 100644
--- a/intern/cycles/kernel/svm/svm_checker.h
+++ b/intern/cycles/kernel/svm/svm_checker.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/svm/svm_closure.h b/intern/cycles/kernel/svm/svm_closure.h
index 847195134e8..0d4716ab078 100644
--- a/intern/cycles/kernel/svm/svm_closure.h
+++ b/intern/cycles/kernel/svm/svm_closure.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
@@ -110,13 +108,13 @@ __device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float *st
if(mix_weight == 0.0f)
return;
- float3 N = stack_valid(data_node.y)? stack_load_float3(stack, data_node.y): sd->N;
+ float3 N = stack_valid(data_node.x)? stack_load_float3(stack, data_node.x): sd->N;
#else
decode_node_uchar4(node.y, &type, &param1_offset, &param2_offset, NULL);
float mix_weight = 1.0f;
uint4 data_node = read_node(kg, offset);
- float3 N = stack_valid(data_node.y)? stack_load_float3(stack, data_node.y): sd->N;
+ float3 N = stack_valid(data_node.x)? stack_load_float3(stack, data_node.x): sd->N;
#endif
float param1 = (stack_valid(param1_offset))? stack_load_float(stack, param1_offset): __uint_as_float(node.z);
@@ -281,10 +279,10 @@ __device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float *st
sc->N = N;
#ifdef __ANISOTROPIC__
- sc->T = stack_load_float3(stack, data_node.z);
+ sc->T = stack_load_float3(stack, data_node.y);
/* rotate tangent */
- float rotation = stack_load_float(stack, data_node.w);
+ float rotation = stack_load_float(stack, data_node.z);
if(rotation != 0.0f)
sc->T = rotate_around_axis(sc->T, sc->N, rotation * M_2PI_F);
@@ -339,29 +337,79 @@ __device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float *st
}
break;
}
+#ifdef __HAIR__
+ case CLOSURE_BSDF_HAIR_REFLECTION_ID:
+ case CLOSURE_BSDF_HAIR_TRANSMISSION_ID: {
+
+ if(sd->flag & SD_BACKFACING && sd->segment != ~0) {
+ ShaderClosure *sc = svm_node_closure_get_bsdf(sd, mix_weight);
+ if(sc) {
+ sc->weight = make_float3(1.0f,1.0f,1.0f);
+ sc->N = N;
+ sd->flag |= bsdf_transparent_setup(sc);
+ }
+ }
+ else {
+ ShaderClosure *sc = &sd->closure[sd->num_closure];
+ sc = svm_node_closure_get_bsdf(sd, mix_weight);
+
+ if(sc) {
+ sc->N = N;
+ sc->data0 = param1;
+ sc->data1 = param2;
+ sc->offset = -stack_load_float(stack, data_node.z);
+ if(sd->segment == ~0) {
+ sc->T = normalize(sd->dPdv);
+ sc->offset = 0.0f;
+ }
+ else
+ sc->T = sd->dPdu;
+ if(type == CLOSURE_BSDF_HAIR_REFLECTION_ID) {
+ sd->flag |= bsdf_hair_reflection_setup(sc);
+ }
+ else {
+ sd->flag |= bsdf_hair_transmission_setup(sc);
+ }
+ }
+ }
+
+ break;
+ }
+#endif
+
#ifdef __SUBSURFACE__
- case CLOSURE_BSSRDF_ID: {
+ case CLOSURE_BSSRDF_CUBIC_ID:
+ case CLOSURE_BSSRDF_GAUSSIAN_ID: {
ShaderClosure *sc = &sd->closure[sd->num_closure];
float3 weight = sc->weight * mix_weight;
float sample_weight = fabsf(average(weight));
+
+ /* disable in case of diffuse ancestor, can't see it well then and
+ * adds considerably noise due to probabilities of continuing path
+ * getting lower and lower */
+ if(path_flag & PATH_RAY_DIFFUSE_ANCESTOR)
+ param1 = 0.0f;
if(sample_weight > 1e-5f && sd->num_closure+2 < MAX_CLOSURE) {
/* radius * scale */
- float3 radius = stack_load_float3(stack, data_node.w)*param1;
- /* index of refraction */
- float eta = fmaxf(param2, 1.0f + 1e-5f);
+ float3 radius = stack_load_float3(stack, data_node.z)*param1;
+ /* sharpness */
+ float sharpness = stack_load_float(stack, data_node.w);
+ /* texture color blur */
+ float texture_blur = param2;
/* create one closure per color channel */
if(fabsf(weight.x) > 0.0f) {
sc->weight = make_float3(weight.x, 0.0f, 0.0f);
sc->sample_weight = sample_weight;
sc->data0 = radius.x;
- sc->data1 = eta;
+ sc->data1 = texture_blur;
+ sc->T.x = sharpness;
#ifdef __OSL__
sc->prim = NULL;
#endif
sc->N = N;
- sd->flag |= bssrdf_setup(sc);
+ sd->flag |= bssrdf_setup(sc, (ClosureType)type);
sd->num_closure++;
sc++;
@@ -371,12 +419,13 @@ __device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float *st
sc->weight = make_float3(0.0f, weight.y, 0.0f);
sc->sample_weight = sample_weight;
sc->data0 = radius.y;
- sc->data1 = eta;
+ sc->data1 = texture_blur;
+ sc->T.x = sharpness;
#ifdef __OSL__
sc->prim = NULL;
#endif
sc->N = N;
- sd->flag |= bssrdf_setup(sc);
+ sd->flag |= bssrdf_setup(sc, (ClosureType)type);
sd->num_closure++;
sc++;
@@ -386,12 +435,13 @@ __device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float *st
sc->weight = make_float3(0.0f, 0.0f, weight.z);
sc->sample_weight = sample_weight;
sc->data0 = radius.z;
- sc->data1 = eta;
+ sc->data1 = texture_blur;
+ sc->T.x = sharpness;
#ifdef __OSL__
sc->prim = NULL;
#endif
sc->N = N;
- sd->flag |= bssrdf_setup(sc);
+ sd->flag |= bssrdf_setup(sc, (ClosureType)type);
sd->num_closure++;
sc++;
diff --git a/intern/cycles/kernel/svm/svm_convert.h b/intern/cycles/kernel/svm/svm_convert.h
index 450344c79ff..22f4651689d 100644
--- a/intern/cycles/kernel/svm/svm_convert.h
+++ b/intern/cycles/kernel/svm/svm_convert.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/svm/svm_displace.h b/intern/cycles/kernel/svm/svm_displace.h
index ee3c0c6fd21..d0bac647a7c 100644
--- a/intern/cycles/kernel/svm/svm_displace.h
+++ b/intern/cycles/kernel/svm/svm_displace.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/svm/svm_fresnel.h b/intern/cycles/kernel/svm/svm_fresnel.h
index 48cbc54d915..549c0351d83 100644
--- a/intern/cycles/kernel/svm/svm_fresnel.h
+++ b/intern/cycles/kernel/svm/svm_fresnel.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/svm/svm_gamma.h b/intern/cycles/kernel/svm/svm_gamma.h
index c62a01a2d58..ef1581fba8d 100644
--- a/intern/cycles/kernel/svm/svm_gamma.h
+++ b/intern/cycles/kernel/svm/svm_gamma.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/svm/svm_geometry.h b/intern/cycles/kernel/svm/svm_geometry.h
index a9e69c8e405..818d8694453 100644
--- a/intern/cycles/kernel/svm/svm_geometry.h
+++ b/intern/cycles/kernel/svm/svm_geometry.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/svm/svm_gradient.h b/intern/cycles/kernel/svm/svm_gradient.h
index 9329647aa25..1c0fe511f9b 100644
--- a/intern/cycles/kernel/svm/svm_gradient.h
+++ b/intern/cycles/kernel/svm/svm_gradient.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/svm/svm_hsv.h b/intern/cycles/kernel/svm/svm_hsv.h
index 6e6a9dff159..e16fb7582c1 100644
--- a/intern/cycles/kernel/svm/svm_hsv.h
+++ b/intern/cycles/kernel/svm/svm_hsv.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __SVM_HSV_H__
diff --git a/intern/cycles/kernel/svm/svm_image.h b/intern/cycles/kernel/svm/svm_image.h
index 57adaa863f1..e18fe7c53a7 100644
--- a/intern/cycles/kernel/svm/svm_image.h
+++ b/intern/cycles/kernel/svm/svm_image.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/svm/svm_invert.h b/intern/cycles/kernel/svm/svm_invert.h
index a14d8ec82fa..4c40afeadd9 100644
--- a/intern/cycles/kernel/svm/svm_invert.h
+++ b/intern/cycles/kernel/svm/svm_invert.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/svm/svm_light_path.h b/intern/cycles/kernel/svm/svm_light_path.h
index 0f16ef83894..ff6776d751e 100644
--- a/intern/cycles/kernel/svm/svm_light_path.h
+++ b/intern/cycles/kernel/svm/svm_light_path.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/svm/svm_magic.h b/intern/cycles/kernel/svm/svm_magic.h
index fdded813784..7a5eba3f564 100644
--- a/intern/cycles/kernel/svm/svm_magic.h
+++ b/intern/cycles/kernel/svm/svm_magic.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/svm/svm_mapping.h b/intern/cycles/kernel/svm/svm_mapping.h
index 96645ac97db..fcdd92dd575 100644
--- a/intern/cycles/kernel/svm/svm_mapping.h
+++ b/intern/cycles/kernel/svm/svm_mapping.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/svm/svm_math.h b/intern/cycles/kernel/svm/svm_math.h
index dbf477a0a96..d4863dd6216 100644
--- a/intern/cycles/kernel/svm/svm_math.h
+++ b/intern/cycles/kernel/svm/svm_math.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/svm/svm_mix.h b/intern/cycles/kernel/svm/svm_mix.h
index d6a306af64d..506f772dba5 100644
--- a/intern/cycles/kernel/svm/svm_mix.h
+++ b/intern/cycles/kernel/svm/svm_mix.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/svm/svm_musgrave.h b/intern/cycles/kernel/svm/svm_musgrave.h
index f0ad19a8061..65dcf1a9f83 100644
--- a/intern/cycles/kernel/svm/svm_musgrave.h
+++ b/intern/cycles/kernel/svm/svm_musgrave.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/svm/svm_noisetex.h b/intern/cycles/kernel/svm/svm_noisetex.h
index 96b47a055bc..acb3f20246e 100644
--- a/intern/cycles/kernel/svm/svm_noisetex.h
+++ b/intern/cycles/kernel/svm/svm_noisetex.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/svm/svm_normal.h b/intern/cycles/kernel/svm/svm_normal.h
index bed2a8d574d..dd7506bb5fc 100644
--- a/intern/cycles/kernel/svm/svm_normal.h
+++ b/intern/cycles/kernel/svm/svm_normal.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/svm/svm_ramp.h b/intern/cycles/kernel/svm/svm_ramp.h
index 24d6dc3c282..3cb23a2b2dd 100644
--- a/intern/cycles/kernel/svm/svm_ramp.h
+++ b/intern/cycles/kernel/svm/svm_ramp.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __SVM_RAMP_H__
diff --git a/intern/cycles/kernel/svm/svm_sepcomb_hsv.h b/intern/cycles/kernel/svm/svm_sepcomb_hsv.h
index d349d0efe87..130890fdc8e 100644
--- a/intern/cycles/kernel/svm/svm_sepcomb_hsv.h
+++ b/intern/cycles/kernel/svm/svm_sepcomb_hsv.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2013, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/svm/svm_sepcomb_rgb.h b/intern/cycles/kernel/svm/svm_sepcomb_rgb.h
index 4e23221e3cd..5c3d95435f2 100644
--- a/intern/cycles/kernel/svm/svm_sepcomb_rgb.h
+++ b/intern/cycles/kernel/svm/svm_sepcomb_rgb.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/svm/svm_sky.h b/intern/cycles/kernel/svm/svm_sky.h
index 8b4e35816d0..81b5f1a201f 100644
--- a/intern/cycles/kernel/svm/svm_sky.h
+++ b/intern/cycles/kernel/svm/svm_sky.h
@@ -1,27 +1,22 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
-/*
- * "A Practical Analytic Model for Daylight"
- * A. J. Preetham, Peter Shirley, Brian Smits
- */
+/* Sky texture */
__device float sky_angle_between(float thetav, float phiv, float theta, float phi)
{
@@ -29,7 +24,11 @@ __device float sky_angle_between(float thetav, float phiv, float theta, float ph
return safe_acosf(cospsi);
}
-__device float sky_perez_function(__constant float *lam, float theta, float gamma)
+/*
+ * "A Practical Analytic Model for Daylight"
+ * A. J. Preetham, Peter Shirley, Brian Smits
+ */
+__device float sky_perez_function(float *lam, float theta, float gamma)
{
float ctheta = cosf(theta);
float cgamma = cosf(gamma);
@@ -37,7 +36,10 @@ __device float sky_perez_function(__constant float *lam, float theta, float gamm
return (1.0f + lam[0]*expf(lam[1]/ctheta)) * (1.0f + lam[2]*expf(lam[3]*gamma) + lam[4]*cgamma*cgamma);
}
-__device float3 sky_radiance(KernelGlobals *kg, float3 dir)
+__device float3 sky_radiance_old(KernelGlobals *kg, float3 dir,
+ float sunphi, float suntheta,
+ float radiance_x, float radiance_y, float radiance_z,
+ float *config_x, float *config_y, float *config_z)
{
/* convert vector to spherical coordinates */
float2 spherical = direction_to_spherical(dir);
@@ -45,25 +47,135 @@ __device float3 sky_radiance(KernelGlobals *kg, float3 dir)
float phi = spherical.y;
/* angle between sun direction and dir */
- float gamma = sky_angle_between(theta, phi, kernel_data.sunsky.theta, kernel_data.sunsky.phi);
+ float gamma = sky_angle_between(theta, phi, suntheta, sunphi);
/* clamp theta to horizon */
theta = min(theta, M_PI_2_F - 0.001f);
/* compute xyY color space values */
- float x = kernel_data.sunsky.zenith_x * sky_perez_function(kernel_data.sunsky.perez_x, theta, gamma);
- float y = kernel_data.sunsky.zenith_y * sky_perez_function(kernel_data.sunsky.perez_y, theta, gamma);
- float Y = kernel_data.sunsky.zenith_Y * sky_perez_function(kernel_data.sunsky.perez_Y, theta, gamma);
+ float x = radiance_y * sky_perez_function(config_y, theta, gamma);
+ float y = radiance_z * sky_perez_function(config_z, theta, gamma);
+ float Y = radiance_x * sky_perez_function(config_x, theta, gamma);
/* convert to RGB */
float3 xyz = xyY_to_xyz(x, y, Y);
return xyz_to_rgb(xyz.x, xyz.y, xyz.z);
}
-__device void svm_node_tex_sky(KernelGlobals *kg, ShaderData *sd, float *stack, uint dir_offset, uint out_offset)
+/*
+ * "An Analytic Model for Full Spectral Sky-Dome Radiance"
+ * Lukas Hosek, Alexander Wilkie
+ */
+__device float sky_radiance_internal(float *configuration, float theta, float gamma)
+{
+ float ctheta = cosf(theta);
+ float cgamma = cosf(gamma);
+
+ float expM = expf(configuration[4] * gamma);
+ float rayM = cgamma * cgamma;
+ float mieM = (1.0f + rayM) / powf((1.0f + configuration[8]*configuration[8] - 2.0f*configuration[8]*cgamma), 1.5f);
+ float zenith = sqrt(ctheta);
+
+ return (1.0f + configuration[0] * expf(configuration[1] / (ctheta + 0.01f))) *
+ (configuration[2] + configuration[3] * expM + configuration[5] * rayM + configuration[6] * mieM + configuration[7] * zenith);
+}
+
+__device float3 sky_radiance_new(KernelGlobals *kg, float3 dir,
+ float sunphi, float suntheta,
+ float radiance_x, float radiance_y, float radiance_z,
+ float *config_x, float *config_y, float *config_z)
{
+ /* convert vector to spherical coordinates */
+ float2 spherical = direction_to_spherical(dir);
+ float theta = spherical.x;
+ float phi = spherical.y;
+
+ /* angle between sun direction and dir */
+ float gamma = sky_angle_between(theta, phi, suntheta, sunphi);
+
+ /* clamp theta to horizon */
+ theta = min(theta, M_PI_2_F - 0.001f);
+
+ /* compute xyz color space values */
+ float x = sky_radiance_internal(config_x, theta, gamma) * radiance_x;
+ float y = sky_radiance_internal(config_y, theta, gamma) * radiance_y;
+ float z = sky_radiance_internal(config_z, theta, gamma) * radiance_z;
+
+ /* convert to RGB and adjust strength */
+ return xyz_to_rgb(x, y, z) * (M_2PI_F/683);
+}
+
+__device void svm_node_tex_sky(KernelGlobals *kg, ShaderData *sd, float *stack, uint4 node, int *offset)
+{
+ /* Define variables */
+ float sunphi, suntheta, radiance_x, radiance_y, radiance_z;
+ float config_x[9], config_y[9], config_z[9];
+
+ /* Load data */
+ uint dir_offset = node.y;
+ uint out_offset = node.z;
+ int sky_model = node.w;
+
+ float4 data = read_node_float(kg, offset);
+ sunphi = data.x;
+ suntheta = data.y;
+ radiance_x = data.z;
+ radiance_y = data.w;
+
+ data = read_node_float(kg, offset);
+ radiance_z = data.x;
+ config_x[0] = data.y;
+ config_x[1] = data.z;
+ config_x[2] = data.w;
+
+ data = read_node_float(kg, offset);
+ config_x[3] = data.x;
+ config_x[4] = data.y;
+ config_x[5] = data.z;
+ config_x[6] = data.w;
+
+ data = read_node_float(kg, offset);
+ config_x[7] = data.x;
+ config_x[8] = data.y;
+ config_y[0] = data.z;
+ config_y[1] = data.w;
+
+ data = read_node_float(kg, offset);
+ config_y[2] = data.x;
+ config_y[3] = data.y;
+ config_y[4] = data.z;
+ config_y[5] = data.w;
+
+ data = read_node_float(kg, offset);
+ config_y[6] = data.x;
+ config_y[7] = data.y;
+ config_y[8] = data.z;
+ config_z[0] = data.w;
+
+ data = read_node_float(kg, offset);
+ config_z[1] = data.x;
+ config_z[2] = data.y;
+ config_z[3] = data.z;
+ config_z[4] = data.w;
+
+ data = read_node_float(kg, offset);
+ config_z[5] = data.x;
+ config_z[6] = data.y;
+ config_z[7] = data.z;
+ config_z[8] = data.w;
+
float3 dir = stack_load_float3(stack, dir_offset);
- float3 f = sky_radiance(kg, dir);
+ float3 f;
+
+ /* Compute Sky */
+ if(sky_model == 0)
+ f = sky_radiance_old(kg, dir, sunphi, suntheta,
+ radiance_x, radiance_y, radiance_z,
+ config_x, config_y, config_z);
+ else
+ f = sky_radiance_new(kg, dir, sunphi, suntheta,
+ radiance_x, radiance_y, radiance_z,
+ config_x, config_y, config_z);
stack_store_float3(stack, out_offset, f);
}
diff --git a/intern/cycles/kernel/svm/svm_tex_coord.h b/intern/cycles/kernel/svm/svm_tex_coord.h
index 0e4a1530f88..9f88389fcb1 100644
--- a/intern/cycles/kernel/svm/svm_tex_coord.h
+++ b/intern/cycles/kernel/svm/svm_tex_coord.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/svm/svm_texture.h b/intern/cycles/kernel/svm/svm_texture.h
index 02fb3e5b86e..7f3e09a481d 100644
--- a/intern/cycles/kernel/svm/svm_texture.h
+++ b/intern/cycles/kernel/svm/svm_texture.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/svm/svm_types.h b/intern/cycles/kernel/svm/svm_types.h
index 939decf80a9..abd63530d63 100644
--- a/intern/cycles/kernel/svm/svm_types.h
+++ b/intern/cycles/kernel/svm/svm_types.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __SVM_TYPES_H__
@@ -287,6 +285,11 @@ typedef enum NodeWaveType {
NODE_WAVE_RINGS
} NodeWaveType;
+typedef enum NodeSkyType {
+ NODE_SKY_OLD,
+ NODE_SKY_NEW
+} NodeSkyType;
+
typedef enum NodeGradientType {
NODE_BLEND_LINEAR,
NODE_BLEND_QUADRATIC,
@@ -354,6 +357,8 @@ typedef enum ClosureType {
CLOSURE_BSDF_WESTIN_BACKSCATTER_ID,
CLOSURE_BSDF_PHONG_RAMP_ID,
CLOSURE_BSDF_GLOSSY_TOON_ID,
+ CLOSURE_BSDF_HAIR_REFLECTION_ID,
+
/* Transmission */
CLOSURE_BSDF_TRANSMISSION_ID,
@@ -364,13 +369,18 @@ typedef enum ClosureType {
CLOSURE_BSDF_MICROFACET_BECKMANN_GLASS_ID,
CLOSURE_BSDF_MICROFACET_GGX_GLASS_ID,
CLOSURE_BSDF_SHARP_GLASS_ID,
+ CLOSURE_BSDF_HAIR_TRANSMISSION_ID,
+
/* Special cases */
CLOSURE_BSDF_BSSRDF_ID,
CLOSURE_BSDF_TRANSPARENT_ID,
+ /* BSSRDF */
+ CLOSURE_BSSRDF_CUBIC_ID,
+ CLOSURE_BSSRDF_GAUSSIAN_ID,
+
/* Other */
- CLOSURE_BSSRDF_ID,
CLOSURE_EMISSION_ID,
CLOSURE_DEBUG_ID,
CLOSURE_BACKGROUND_ID,
@@ -388,10 +398,10 @@ typedef enum ClosureType {
/* watch this, being lazy with memory usage */
#define CLOSURE_IS_BSDF(type) (type <= CLOSURE_BSDF_TRANSPARENT_ID)
#define CLOSURE_IS_BSDF_DIFFUSE(type) (type >= CLOSURE_BSDF_DIFFUSE_ID && type <= CLOSURE_BSDF_DIFFUSE_TOON_ID)
-#define CLOSURE_IS_BSDF_GLOSSY(type) (type >= CLOSURE_BSDF_GLOSSY_ID && type <= CLOSURE_BSDF_GLOSSY_TOON_ID)
-#define CLOSURE_IS_BSDF_TRANSMISSION(type) (type >= CLOSURE_BSDF_TRANSMISSION_ID && type <= CLOSURE_BSDF_SHARP_GLASS_ID)
+#define CLOSURE_IS_BSDF_GLOSSY(type) (type >= CLOSURE_BSDF_GLOSSY_ID && type <= CLOSURE_BSDF_HAIR_REFLECTION_ID)
+#define CLOSURE_IS_BSDF_TRANSMISSION(type) (type >= CLOSURE_BSDF_TRANSMISSION_ID && type <= CLOSURE_BSDF_HAIR_TRANSMISSION_ID)
#define CLOSURE_IS_BSDF_BSSRDF(type) (type == CLOSURE_BSDF_BSSRDF_ID)
-#define CLOSURE_IS_BSSRDF(type) (type == CLOSURE_BSSRDF_ID)
+#define CLOSURE_IS_BSSRDF(type) (type >= CLOSURE_BSSRDF_CUBIC_ID && type <= CLOSURE_BSSRDF_GAUSSIAN_ID)
#define CLOSURE_IS_VOLUME(type) (type >= CLOSURE_VOLUME_ID && type <= CLOSURE_VOLUME_ISOTROPIC_ID)
#define CLOSURE_IS_EMISSION(type) (type == CLOSURE_EMISSION_ID)
#define CLOSURE_IS_HOLDOUT(type) (type == CLOSURE_HOLDOUT_ID)
diff --git a/intern/cycles/kernel/svm/svm_value.h b/intern/cycles/kernel/svm/svm_value.h
index 86d98ee67d6..cd5a2e0d871 100644
--- a/intern/cycles/kernel/svm/svm_value.h
+++ b/intern/cycles/kernel/svm/svm_value.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/svm/svm_vector_transform.h b/intern/cycles/kernel/svm/svm_vector_transform.h
index a0d56d14dcf..95ef8e3e558 100644
--- a/intern/cycles/kernel/svm/svm_vector_transform.h
+++ b/intern/cycles/kernel/svm/svm_vector_transform.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2013, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/svm/svm_voronoi.h b/intern/cycles/kernel/svm/svm_voronoi.h
index 55110d06f22..c9ebea2bceb 100644
--- a/intern/cycles/kernel/svm/svm_voronoi.h
+++ b/intern/cycles/kernel/svm/svm_voronoi.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/kernel/svm/svm_wave.h b/intern/cycles/kernel/svm/svm_wave.h
index 33c1694283d..d906266bcf9 100644
--- a/intern/cycles/kernel/svm/svm_wave.h
+++ b/intern/cycles/kernel/svm/svm_wave.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/render/CMakeLists.txt b/intern/cycles/render/CMakeLists.txt
index 0cf29435a8c..7d00ed92164 100644
--- a/intern/cycles/render/CMakeLists.txt
+++ b/intern/cycles/render/CMakeLists.txt
@@ -18,7 +18,6 @@ set(SRC
background.cpp
blackbody.cpp
buffers.cpp
- bssrdf.cpp
camera.cpp
film.cpp
graph.cpp
@@ -35,6 +34,7 @@ set(SRC
scene.cpp
session.cpp
shader.cpp
+ sky_model.cpp
sobol.cpp
svm.cpp
tables.cpp
@@ -46,7 +46,6 @@ set(SRC_HEADERS
background.h
blackbody.h
buffers.h
- bssrdf.h
camera.h
film.h
graph.h
@@ -62,6 +61,8 @@ set(SRC_HEADERS
scene.h
session.h
shader.h
+ sky_model.h
+ sky_model_data.h
sobol.h
svm.h
tables.h
diff --git a/intern/cycles/render/attribute.cpp b/intern/cycles/render/attribute.cpp
index 3137ea5327b..319616450e1 100644
--- a/intern/cycles/render/attribute.cpp
+++ b/intern/cycles/render/attribute.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "mesh.h"
@@ -147,8 +145,6 @@ const char *Attribute::standard_name(AttributeStandard std)
return "motion_post";
else if(std == ATTR_STD_PARTICLE)
return "particle";
- else if(std == ATTR_STD_CURVE_TANGENT)
- return "curve_tangent";
else if(std == ATTR_STD_CURVE_INTERCEPT)
return "curve_intercept";
@@ -244,17 +240,9 @@ Attribute *AttributeSet::add(AttributeStandard std, ustring name)
attr = add(name, TypeDesc::TypeFloat, ATTR_ELEMENT_CORNER);
break;
case ATTR_STD_GENERATED:
- attr = add(name, TypeDesc::TypePoint, ATTR_ELEMENT_VERTEX);
- break;
case ATTR_STD_POSITION_UNDEFORMED:
- attr = add(name, TypeDesc::TypePoint, ATTR_ELEMENT_VERTEX);
- break;
case ATTR_STD_POSITION_UNDISPLACED:
- attr = add(name, TypeDesc::TypePoint, ATTR_ELEMENT_VERTEX);
- break;
case ATTR_STD_MOTION_PRE:
- attr = add(name, TypeDesc::TypePoint, ATTR_ELEMENT_VERTEX);
- break;
case ATTR_STD_MOTION_POST:
attr = add(name, TypeDesc::TypePoint, ATTR_ELEMENT_VERTEX);
break;
@@ -266,20 +254,13 @@ Attribute *AttributeSet::add(AttributeStandard std, ustring name)
else if(curve_mesh) {
switch(std) {
case ATTR_STD_UV:
- attr = add(name, TypeDesc::TypePoint, ATTR_ELEMENT_CURVE);
- break;
case ATTR_STD_GENERATED:
attr = add(name, TypeDesc::TypePoint, ATTR_ELEMENT_CURVE);
break;
case ATTR_STD_MOTION_PRE:
- attr = add(name, TypeDesc::TypePoint, ATTR_ELEMENT_CURVE_KEY);
- break;
case ATTR_STD_MOTION_POST:
attr = add(name, TypeDesc::TypePoint, ATTR_ELEMENT_CURVE_KEY);
break;
- case ATTR_STD_CURVE_TANGENT:
- attr = add(name, TypeDesc::TypeVector, ATTR_ELEMENT_CURVE_KEY);
- break;
case ATTR_STD_CURVE_INTERCEPT:
attr = add(name, TypeDesc::TypeFloat, ATTR_ELEMENT_CURVE_KEY);
break;
diff --git a/intern/cycles/render/attribute.h b/intern/cycles/render/attribute.h
index 6c0c06d0425..e17a65914dd 100644
--- a/intern/cycles/render/attribute.h
+++ b/intern/cycles/render/attribute.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __ATTRIBUTE_H__
diff --git a/intern/cycles/render/background.cpp b/intern/cycles/render/background.cpp
index 2b2a8609c1a..9359618b48d 100644
--- a/intern/cycles/render/background.cpp
+++ b/intern/cycles/render/background.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "background.h"
diff --git a/intern/cycles/render/background.h b/intern/cycles/render/background.h
index ffedfbe3da3..cf627862513 100644
--- a/intern/cycles/render/background.h
+++ b/intern/cycles/render/background.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __BACKGROUND_H__
diff --git a/intern/cycles/render/blackbody.h b/intern/cycles/render/blackbody.h
index a177238f689..c3be0ebdf30 100644
--- a/intern/cycles/render/blackbody.h
+++ b/intern/cycles/render/blackbody.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __BLACKBODY_H__
diff --git a/intern/cycles/render/bssrdf.cpp b/intern/cycles/render/bssrdf.cpp
deleted file mode 100644
index 8ec3c6a1384..00000000000
--- a/intern/cycles/render/bssrdf.cpp
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#include "bssrdf.h"
-
-#include "util_algorithm.h"
-#include "util_math.h"
-#include "util_types.h"
-
-#include "kernel_types.h"
-#include "kernel_montecarlo.h"
-
-#include "closure/bsdf_diffuse.h"
-#include "closure/bssrdf.h"
-
-CCL_NAMESPACE_BEGIN
-
-/* Cumulative density function utilities */
-
-static float cdf_lookup_inverse(const vector<float>& table, float2 range, float x)
-{
- int index = upper_bound(table.begin(), table.end(), x) - table.begin();
-
- if(index == 0)
- return range[0];
- else if(index == table.size())
- return range[1];
- else
- index--;
-
- float t = (x - table[index])/(table[index+1] - table[index]);
- float y = ((index + t)/(table.size() - 1));
-
- return y*(range[1] - range[0]) + range[0];
-}
-
-static void cdf_invert(vector<float>& to, float2 to_range, const vector<float>& from, float2 from_range)
-{
- float step = 1.0f/(float)(to.size() - 1);
-
- for(int i = 0; i < to.size(); i++) {
- float x = (i*step)*(from_range[1] - from_range[0]) + from_range[0];
- to[i] = cdf_lookup_inverse(from, to_range, x);
- }
-}
-
-/* BSSRDF */
-
-static float bssrdf_lookup_table_max_radius(const BSSRDFParams *ss)
-{
- /* todo: adjust when we use the real BSSRDF */
- return ss->ld;
-}
-
-static void bssrdf_lookup_table_create(const BSSRDFParams *ss, vector<float>& sample_table, vector<float>& pdf_table)
-{
- const int size = BSSRDF_RADIUS_TABLE_SIZE;
- vector<float> cdf(size);
- vector<float> pdf(size);
- float step = 1.0f/(float)(size - 1);
- float max_radius = bssrdf_lookup_table_max_radius(ss);
- float pdf_sum = 0.0f;
-
- /* compute the probability density function */
- for(int i = 0; i < pdf.size(); i++) {
- float x = (i*step)*max_radius;
- pdf[i] = bssrdf_cubic(ss->ld, x);
- pdf_sum += pdf[i];
- }
-
- /* adjust for area covered by each distance */
- for(int i = 0; i < pdf.size(); i++) {
- float x = (i*step)*max_radius;
- pdf[i] *= M_2PI_F*x;
- }
-
- /* normalize pdf, we multiply in reflectance later */
- if(pdf_sum > 0.0f)
- for(int i = 0; i < pdf.size(); i++)
- pdf[i] /= pdf_sum;
-
- /* sum to account for sampling which uses overlapping sphere */
- for(int i = pdf.size() - 2; i >= 0; i--)
- pdf[i] = pdf[i] + pdf[i+1];
-
- /* compute the cumulative density function */
- cdf[0] = 0.0f;
-
- for(int i = 1; i < size; i++)
- cdf[i] = cdf[i-1] + 0.5f*(pdf[i-1] + pdf[i])*step*max_radius;
-
- /* invert cumulative density function for importance sampling */
- float2 cdf_range = make_float2(0.0f, cdf[size - 1]);
- float2 table_range = make_float2(0.0f, max_radius);
-
- cdf_invert(sample_table, table_range, cdf, cdf_range);
-
- /* copy pdf table */
- for(int i = 0; i < pdf.size(); i++)
- pdf_table[i] = pdf[i];
-}
-
-void bssrdf_table_build(vector<float>& table)
-{
- vector<float> sample_table(BSSRDF_RADIUS_TABLE_SIZE);
- vector<float> pdf_table(BSSRDF_RADIUS_TABLE_SIZE);
-
- table.resize(BSSRDF_LOOKUP_TABLE_SIZE);
-
- /* create a 2D lookup table, for reflection x sample radius */
- for(int i = 0; i < BSSRDF_REFL_TABLE_SIZE; i++) {
- float refl = (float)i/(float)(BSSRDF_REFL_TABLE_SIZE-1);
- float ior = 1.3f;
- float radius = 1.0f;
-
- BSSRDFParams ss;
- bssrdf_setup_params(&ss, refl, radius, ior);
- bssrdf_lookup_table_create(&ss, sample_table, pdf_table);
-
- memcpy(&table[i*BSSRDF_RADIUS_TABLE_SIZE], &sample_table[0], BSSRDF_RADIUS_TABLE_SIZE*sizeof(float));
- memcpy(&table[BSSRDF_PDF_TABLE_OFFSET + i*BSSRDF_RADIUS_TABLE_SIZE], &pdf_table[0], BSSRDF_RADIUS_TABLE_SIZE*sizeof(float));
- }
-}
-
-CCL_NAMESPACE_END
-
diff --git a/intern/cycles/render/bssrdf.h b/intern/cycles/render/bssrdf.h
deleted file mode 100644
index 975ac0b46ec..00000000000
--- a/intern/cycles/render/bssrdf.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#ifndef __BSSRDF_H__
-#define __BSSRDF_H__
-
-#include "util_vector.h"
-
-CCL_NAMESPACE_BEGIN
-
-void bssrdf_table_build(vector<float>& table);
-
-CCL_NAMESPACE_END
-
-#endif /* __BSSRDF_H__ */
-
diff --git a/intern/cycles/render/buffers.cpp b/intern/cycles/render/buffers.cpp
index b509134512b..44a050ca530 100644
--- a/intern/cycles/render/buffers.cpp
+++ b/intern/cycles/render/buffers.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include <stdlib.h>
@@ -93,7 +91,6 @@ RenderTile::RenderTile()
buffer = 0;
rng_state = 0;
- rgba = 0;
buffers = NULL;
}
@@ -187,6 +184,12 @@ bool RenderBuffers::get_pass_rect(PassType type, float exposure, int sample, int
pixels[0] = (f == 0.0f)? 1e10f: f*scale_exposure;
}
}
+ else if(type == PASS_MIST) {
+ for(int i = 0; i < size; i++, in += pass_stride, pixels++) {
+ float f = *in;
+ pixels[0] = clamp(f*scale_exposure, 0.0f, 1.0f);
+ }
+ }
else {
for(int i = 0; i < size; i++, in += pass_stride, pixels++) {
float f = *in;
@@ -300,12 +303,13 @@ bool RenderBuffers::get_pass_rect(PassType type, float exposure, int sample, int
/* Display Buffer */
-DisplayBuffer::DisplayBuffer(Device *device_)
+DisplayBuffer::DisplayBuffer(Device *device_, bool linear)
{
device = device_;
draw_width = 0;
draw_height = 0;
transparent = true; /* todo: determine from background */
+ half_float = linear;
}
DisplayBuffer::~DisplayBuffer()
@@ -315,9 +319,13 @@ DisplayBuffer::~DisplayBuffer()
void DisplayBuffer::device_free()
{
- if(rgba.device_pointer) {
- device->pixels_free(rgba);
- rgba.clear();
+ if(rgba_byte.device_pointer) {
+ device->pixels_free(rgba_byte);
+ rgba_byte.clear();
+ }
+ if(rgba_half.device_pointer) {
+ device->pixels_free(rgba_half);
+ rgba_half.clear();
}
}
@@ -332,8 +340,14 @@ void DisplayBuffer::reset(Device *device, BufferParams& params_)
device_free();
/* allocate display pixels */
- rgba.resize(params.width, params.height);
- device->pixels_alloc(rgba);
+ if(half_float) {
+ rgba_half.resize(params.width, params.height);
+ device->pixels_alloc(rgba_half);
+ }
+ else {
+ rgba_byte.resize(params.width, params.height);
+ device->pixels_alloc(rgba_byte);
+ }
}
void DisplayBuffer::draw_set(int width, int height)
@@ -349,6 +363,7 @@ void DisplayBuffer::draw(Device *device)
if(draw_width != 0 && draw_height != 0) {
glPushMatrix();
glTranslatef(params.full_x, params.full_y, 0.0f);
+ device_memory& rgba = rgba_data();
device->draw_pixels(rgba, 0, draw_width, draw_height, 0, params.width, params.height, transparent);
@@ -368,8 +383,12 @@ void DisplayBuffer::write(Device *device, const string& filename)
if(w == 0 || h == 0)
return;
+
+ if(half_float)
+ return;
/* read buffer from device */
+ device_memory& rgba = rgba_data();
device->pixels_copy_from(rgba, 0, w, h);
/* write image */
@@ -391,5 +410,13 @@ void DisplayBuffer::write(Device *device, const string& filename)
delete out;
}
+device_memory& DisplayBuffer::rgba_data()
+{
+ if(half_float)
+ return rgba_half;
+ else
+ return rgba_byte;
+}
+
CCL_NAMESPACE_END
diff --git a/intern/cycles/render/buffers.h b/intern/cycles/render/buffers.h
index ee0d78a1cd8..0b1f9010e75 100644
--- a/intern/cycles/render/buffers.h
+++ b/intern/cycles/render/buffers.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __BUFFERS_H__
@@ -89,8 +87,8 @@ protected:
/* Display Buffer
*
- * The buffer used for drawing during render, filled by tonemapping the render
- * buffers and converting to uchar4 storage. */
+ * The buffer used for drawing during render, filled by converting the render
+ * buffers to byte of half float storage */
class DisplayBuffer {
public:
@@ -102,10 +100,13 @@ public:
int draw_width, draw_height;
/* draw alpha channel? */
bool transparent;
- /* byte buffer for tonemapped result */
- device_vector<uchar4> rgba;
+ /* use half float? */
+ bool half_float;
+ /* byte buffer for converted result */
+ device_vector<uchar4> rgba_byte;
+ device_vector<half4> rgba_half;
- DisplayBuffer(Device *device);
+ DisplayBuffer(Device *device, bool linear = false);
~DisplayBuffer();
void reset(Device *device, BufferParams& params);
@@ -115,6 +116,8 @@ public:
void draw(Device *device);
bool draw_ready();
+ device_memory& rgba_data();
+
protected:
void device_free();
@@ -136,7 +139,6 @@ public:
device_ptr buffer;
device_ptr rng_state;
- device_ptr rgba;
RenderBuffers *buffers;
diff --git a/intern/cycles/render/camera.cpp b/intern/cycles/render/camera.cpp
index 861f6a45a18..edf7f7fb09d 100644
--- a/intern/cycles/render/camera.cpp
+++ b/intern/cycles/render/camera.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "camera.h"
@@ -54,6 +52,7 @@ Camera::Camera()
width = 1024;
height = 512;
+ resolution = 1;
viewplane.left = -((float)width/(float)height);
viewplane.right = (float)width/(float)height;
diff --git a/intern/cycles/render/camera.h b/intern/cycles/render/camera.h
index fa4a9487af0..4e8f3d72111 100644
--- a/intern/cycles/render/camera.h
+++ b/intern/cycles/render/camera.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __CAMERA_H__
diff --git a/intern/cycles/render/curves.cpp b/intern/cycles/render/curves.cpp
index 502bed06930..5730b5218ca 100644
--- a/intern/cycles/render/curves.cpp
+++ b/intern/cycles/render/curves.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "device.h"
@@ -37,12 +35,14 @@ void curvebounds(float *lower, float *upper, float3 *p, int dim)
float *p1 = &p[1].x;
float *p2 = &p[2].x;
float *p3 = &p[3].x;
+
float fc = 0.71f;
float curve_coef[4];
curve_coef[0] = p1[dim];
curve_coef[1] = -fc*p0[dim] + fc*p2[dim];
curve_coef[2] = 2.0f * fc * p0[dim] + (fc - 3.0f) * p1[dim] + (3.0f - 2.0f * fc) * p2[dim] - fc * p3[dim];
curve_coef[3] = -fc * p0[dim] + (2.0f - fc) * p1[dim] + (fc - 2.0f) * p2[dim] + fc * p3[dim];
+
float discroot = curve_coef[2] * curve_coef[2] - 3 * curve_coef[3] * curve_coef[1];
float ta = -1.0f;
float tb = -1.0f;
@@ -72,7 +72,6 @@ void curvebounds(float *lower, float *upper, float3 *p, int dim)
}
*upper = max(*upper, max(exa,exb));
*lower = min(*lower, min(exa,exb));
-
}
/* Hair System Manager */
@@ -80,27 +79,21 @@ void curvebounds(float *lower, float *upper, float3 *p, int dim)
CurveSystemManager::CurveSystemManager()
{
primitive = CURVE_LINE_SEGMENTS;
+ curve_shape = CURVE_THICK;
line_method = CURVE_CORRECTED;
- interpolation = CURVE_CARDINAL;
triangle_method = CURVE_CAMERA_TRIANGLES;
resolution = 3;
- segments = 1;
subdivisions = 3;
- normalmix = 1.0f;
encasing_ratio = 1.01f;
minimum_width = 0.0f;
maximum_width = 0.0f;
use_curves = true;
- use_smooth = true;
- use_parents = false;
use_encasing = true;
use_backfacing = false;
- use_joined = false;
use_tangent_normal = false;
use_tangent_normal_geometry = false;
- use_tangent_normal_correction = false;
need_update = true;
need_mesh_update = false;
@@ -138,18 +131,13 @@ void CurveSystemManager::device_update(Device *device, DeviceScene *dscene, Scen
if(use_tangent_normal)
kcurve->curveflags |= CURVE_KN_TANGENTGNORMAL;
- if(use_tangent_normal_correction)
- kcurve->curveflags |= CURVE_KN_NORMALCORRECTION;
if(use_tangent_normal_geometry)
kcurve->curveflags |= CURVE_KN_TRUETANGENTGNORMAL;
- if(use_joined)
- kcurve->curveflags |= CURVE_KN_CURVEDATA;
if(use_backfacing)
kcurve->curveflags |= CURVE_KN_BACKFACING;
if(use_encasing)
kcurve->curveflags |= CURVE_KN_ENCLOSEFILTER;
- kcurve->normalmix = normalmix;
kcurve->encasing_ratio = encasing_ratio;
kcurve->minimum_width = minimum_width;
kcurve->maximum_width = maximum_width;
@@ -168,39 +156,29 @@ void CurveSystemManager::device_free(Device *device, DeviceScene *dscene)
bool CurveSystemManager::modified(const CurveSystemManager& CurveSystemManager)
{
- return !(line_method == CurveSystemManager.line_method &&
- interpolation == CurveSystemManager.interpolation &&
+ return !(curve_shape == CurveSystemManager.curve_shape &&
+ line_method == CurveSystemManager.line_method &&
primitive == CurveSystemManager.primitive &&
use_encasing == CurveSystemManager.use_encasing &&
use_tangent_normal == CurveSystemManager.use_tangent_normal &&
- use_tangent_normal_correction == CurveSystemManager.use_tangent_normal_correction &&
use_tangent_normal_geometry == CurveSystemManager.use_tangent_normal_geometry &&
encasing_ratio == CurveSystemManager.encasing_ratio &&
minimum_width == CurveSystemManager.minimum_width &&
maximum_width == CurveSystemManager.maximum_width &&
use_backfacing == CurveSystemManager.use_backfacing &&
- normalmix == CurveSystemManager.normalmix &&
- use_smooth == CurveSystemManager.use_smooth &&
triangle_method == CurveSystemManager.triangle_method &&
resolution == CurveSystemManager.resolution &&
use_curves == CurveSystemManager.use_curves &&
- use_joined == CurveSystemManager.use_joined &&
- segments == CurveSystemManager.segments &&
- use_parents == CurveSystemManager.use_parents &&
subdivisions == CurveSystemManager.subdivisions);
}
bool CurveSystemManager::modified_mesh(const CurveSystemManager& CurveSystemManager)
{
return !(primitive == CurveSystemManager.primitive &&
- interpolation == CurveSystemManager.interpolation &&
- use_parents == CurveSystemManager.use_parents &&
- use_smooth == CurveSystemManager.use_smooth &&
+ curve_shape == CurveSystemManager.curve_shape &&
triangle_method == CurveSystemManager.triangle_method &&
resolution == CurveSystemManager.resolution &&
- use_curves == CurveSystemManager.use_curves &&
- use_joined == CurveSystemManager.use_joined &&
- segments == CurveSystemManager.segments);
+ use_curves == CurveSystemManager.use_curves);
}
void CurveSystemManager::tag_update(Scene *scene)
diff --git a/intern/cycles/render/curves.h b/intern/cycles/render/curves.h
index 42f0498617e..ab74a356125 100644
--- a/intern/cycles/render/curves.h
+++ b/intern/cycles/render/curves.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __CURVES_H__
@@ -31,16 +29,6 @@ class Scene;
void curvebounds(float *lower, float *upper, float3 *p, int dim);
-typedef enum curve_presets {
- CURVE_CUSTOM,
- CURVE_FAST_PLANES,
- CURVE_TANGENT_SHADING,
- CURVE_TRUE_NORMAL,
- CURVE_ACCURATE_PRESET,
- CURVE_SMOOTH_CURVES,
- CURVE_SMOOTH_RIBBONS
-} curve_presets;
-
typedef enum curve_primitives {
CURVE_TRIANGLES,
CURVE_LINE_SEGMENTS,
@@ -48,9 +36,13 @@ typedef enum curve_primitives {
CURVE_RIBBONS
} curve_primitives;
+typedef enum curve_shape {
+ CURVE_RIBBON,
+ CURVE_THICK
+} curve_shape;
+
typedef enum curve_triangles {
CURVE_CAMERA_TRIANGLES,
- CURVE_RIBBON_TRIANGLES,
CURVE_TESSELATED_TRIANGLES
} curve_triangles;
@@ -99,27 +91,21 @@ class CurveSystemManager {
public:
int primitive;
+ int curve_shape;
int line_method;
- int interpolation;
int triangle_method;
int resolution;
- int segments;
int subdivisions;
- float normalmix;
float encasing_ratio;
float minimum_width;
float maximum_width;
bool use_curves;
- bool use_smooth;
- bool use_parents;
bool use_encasing;
bool use_backfacing;
bool use_tangent_normal;
- bool use_tangent_normal_correction;
bool use_tangent_normal_geometry;
- bool use_joined;
bool need_update;
bool need_mesh_update;
diff --git a/intern/cycles/render/film.cpp b/intern/cycles/render/film.cpp
index 4b48ee1d2c9..f97417b5251 100644
--- a/intern/cycles/render/film.cpp
+++ b/intern/cycles/render/film.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "camera.h"
@@ -433,8 +431,12 @@ bool Film::modified(const Film& film)
void Film::tag_passes_update(Scene *scene, const vector<Pass>& passes_)
{
- if(Pass::contains(passes, PASS_UV) != Pass::contains(passes_, PASS_UV))
+ if(Pass::contains(passes, PASS_UV) != Pass::contains(passes_, PASS_UV)) {
scene->mesh_manager->tag_update(scene);
+
+ foreach(Shader *shader, scene->shaders)
+ shader->need_update_attributes = true;
+ }
else if(Pass::contains(passes, PASS_MOTION) != Pass::contains(passes_, PASS_MOTION))
scene->mesh_manager->tag_update(scene);
diff --git a/intern/cycles/render/film.h b/intern/cycles/render/film.h
index 0147306c1e3..a991d36182f 100644
--- a/intern/cycles/render/film.h
+++ b/intern/cycles/render/film.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __FILM_H__
diff --git a/intern/cycles/render/graph.cpp b/intern/cycles/render/graph.cpp
index 4c6e64a1fb5..023b5db7839 100644
--- a/intern/cycles/render/graph.cpp
+++ b/intern/cycles/render/graph.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "attribute.h"
diff --git a/intern/cycles/render/graph.h b/intern/cycles/render/graph.h
index da8ed987346..8ebdf3cc220 100644
--- a/intern/cycles/render/graph.h
+++ b/intern/cycles/render/graph.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __GRAPH_H__
@@ -76,7 +74,8 @@ enum ShaderNodeSpecialType {
SHADER_SPECIAL_TYPE_NONE,
SHADER_SPECIAL_TYPE_PROXY,
SHADER_SPECIAL_TYPE_MIX_CLOSURE,
- SHADER_SPECIAL_TYPE_AUTOCONVERT
+ SHADER_SPECIAL_TYPE_AUTOCONVERT,
+ SHADER_SPECIAL_TYPE_GEOMETRY
};
/* Enum
@@ -190,6 +189,7 @@ public:
virtual bool has_surface_transparent() { return false; }
virtual bool has_surface_bssrdf() { return false; }
virtual bool has_converter_blackbody() { return false; }
+ virtual bool has_bssrdf_bump() { return false; }
vector<ShaderInput*> inputs;
vector<ShaderOutput*> outputs;
diff --git a/intern/cycles/render/image.cpp b/intern/cycles/render/image.cpp
index 8e844bc788e..dcb28455e4a 100644
--- a/intern/cycles/render/image.cpp
+++ b/intern/cycles/render/image.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "device.h"
@@ -129,10 +127,14 @@ bool ImageManager::is_float_image(const string& filename, void *builtin_data, bo
is_linear = !(colorspace == "sRGB" ||
colorspace == "GammaCorrected" ||
- strcmp(in->format_name(), "png") == 0);
+ (colorspace == "" &&
+ (strcmp(in->format_name(), "png") == 0 ||
+ strcmp(in->format_name(), "tiff") == 0 ||
+ strcmp(in->format_name(), "jpeg2000") == 0)));
}
- else
+ else {
is_linear = false;
+ }
in->close();
}
@@ -305,7 +307,7 @@ bool ImageManager::file_load_image(Image *img, device_vector<uchar4>& tex_img)
}
/* we only handle certain number of components */
- if(!(components == 1 || components == 3 || components == 4)) {
+ if(!(components >= 1 && components <= 4)) {
if(in) {
in->close();
delete in;
@@ -332,7 +334,15 @@ bool ImageManager::file_load_image(Image *img, device_vector<uchar4>& tex_img)
builtin_image_pixels_cb(img->filename, img->builtin_data, pixels);
}
- if(components == 3) {
+ if(components == 2) {
+ for(int i = width*height-1; i >= 0; i--) {
+ pixels[i*4+3] = pixels[i*2+1];
+ pixels[i*4+2] = pixels[i*2+0];
+ pixels[i*4+1] = pixels[i*2+0];
+ pixels[i*4+0] = pixels[i*2+0];
+ }
+ }
+ else if(components == 3) {
for(int i = width*height-1; i >= 0; i--) {
pixels[i*4+3] = 255;
pixels[i*4+2] = pixels[i*3+2];
@@ -388,7 +398,7 @@ bool ImageManager::file_load_float_image(Image *img, device_vector<float4>& tex_
builtin_image_info_cb(img->filename, img->builtin_data, is_float, width, height, components);
}
- if(!(components == 1 || components == 3 || components == 4)) {
+ if(!(components >= 1 && components <= 4)) {
if(in) {
in->close();
delete in;
@@ -414,7 +424,15 @@ bool ImageManager::file_load_float_image(Image *img, device_vector<float4>& tex_
builtin_image_float_pixels_cb(img->filename, img->builtin_data, pixels);
}
- if(components == 3) {
+ if(components == 2) {
+ for(int i = width*height-1; i >= 0; i--) {
+ pixels[i*4+3] = pixels[i*2+1];
+ pixels[i*4+2] = pixels[i*2+0];
+ pixels[i*4+1] = pixels[i*2+0];
+ pixels[i*4+0] = pixels[i*2+0];
+ }
+ }
+ else if(components == 3) {
for(int i = width*height-1; i >= 0; i--) {
pixels[i*4+3] = 1.0f;
pixels[i*4+2] = pixels[i*3+2];
diff --git a/intern/cycles/render/image.h b/intern/cycles/render/image.h
index b20ff23fbbb..f7be5458d49 100644
--- a/intern/cycles/render/image.h
+++ b/intern/cycles/render/image.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __IMAGE_H__
diff --git a/intern/cycles/render/integrator.cpp b/intern/cycles/render/integrator.cpp
index 796746e828f..88466f24ec5 100644
--- a/intern/cycles/render/integrator.cpp
+++ b/intern/cycles/render/integrator.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "device.h"
@@ -56,7 +54,7 @@ Integrator::Integrator()
ao_samples = 1;
mesh_light_samples = 1;
subsurface_samples = 1;
- progressive = true;
+ method = PATH;
sampling_pattern = SAMPLING_PATTERN_SOBOL;
@@ -106,7 +104,7 @@ void Integrator::device_update(Device *device, DeviceScene *dscene, Scene *scene
kintegrator->sample_clamp = (sample_clamp == 0.0f)? FLT_MAX: sample_clamp*3.0f;
- kintegrator->progressive = progressive;
+ kintegrator->branched = (method == BRANCHED_PATH);
kintegrator->aa_samples = aa_samples;
kintegrator->diffuse_samples = diffuse_samples;
kintegrator->glossy_samples = glossy_samples;
@@ -120,7 +118,7 @@ void Integrator::device_update(Device *device, DeviceScene *dscene, Scene *scene
/* sobol directions table */
int max_samples = 1;
- if(!progressive) {
+ if(method == BRANCHED_PATH) {
foreach(Light *light, scene->lights)
max_samples = max(max_samples, light->samples);
@@ -128,7 +126,7 @@ void Integrator::device_update(Device *device, DeviceScene *dscene, Scene *scene
max_samples = max(max_samples, max(ao_samples, max(mesh_light_samples, subsurface_samples)));
}
- max_samples *= (max_bounce + transparent_max_bounce + 2);
+ max_samples *= (max_bounce + transparent_max_bounce + 3);
int dimensions = PRNG_BASE_NUM + max_samples*PRNG_BOUNCE_NUM;
dimensions = min(dimensions, SOBOL_MAX_DIMENSIONS);
@@ -165,7 +163,7 @@ bool Integrator::modified(const Integrator& integrator)
layer_flag == integrator.layer_flag &&
seed == integrator.seed &&
sample_clamp == integrator.sample_clamp &&
- progressive == integrator.progressive &&
+ method == integrator.method &&
aa_samples == integrator.aa_samples &&
diffuse_samples == integrator.diffuse_samples &&
glossy_samples == integrator.glossy_samples &&
diff --git a/intern/cycles/render/integrator.h b/intern/cycles/render/integrator.h
index fff24b506fb..a58b4d25cd3 100644
--- a/intern/cycles/render/integrator.h
+++ b/intern/cycles/render/integrator.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __INTEGRATOR_H__
@@ -59,7 +57,12 @@ public:
int mesh_light_samples;
int subsurface_samples;
- bool progressive;
+ enum Method {
+ BRANCHED_PATH = 0,
+ PATH = 1
+ };
+
+ Method method;
SamplingPattern sampling_pattern;
diff --git a/intern/cycles/render/light.cpp b/intern/cycles/render/light.cpp
index 96eabe75ff7..bab4218aae9 100644
--- a/intern/cycles/render/light.cpp
+++ b/intern/cycles/render/light.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "background.h"
diff --git a/intern/cycles/render/light.h b/intern/cycles/render/light.h
index 5b8d3c1d738..82308cf3e88 100644
--- a/intern/cycles/render/light.h
+++ b/intern/cycles/render/light.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __LIGHT_H__
diff --git a/intern/cycles/render/mesh.cpp b/intern/cycles/render/mesh.cpp
index 77d4a5fe7d2..ecae35ae5ea 100644
--- a/intern/cycles/render/mesh.cpp
+++ b/intern/cycles/render/mesh.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "bvh.h"
@@ -41,6 +39,7 @@ CCL_NAMESPACE_BEGIN
Mesh::Mesh()
{
need_update = true;
+ need_update_rebuild = false;
transform_applied = false;
transform_negative_scaled = false;
transform_normal = transform_identity();
@@ -469,6 +468,7 @@ void MeshManager::update_osl_attributes(Device *device, Scene *scene, vector<Att
osl_attr.type = attr.type();
osl_attr.elem = ATTR_ELEMENT_VALUE;
osl_attr.value = attr;
+ osl_attr.offset = 0;
og->attribute_map[i*ATTR_PRIM_TYPES][attr.name()] = osl_attr;
og->attribute_map[i*ATTR_PRIM_TYPES + ATTR_PRIM_CURVE][attr.name()] = osl_attr;
diff --git a/intern/cycles/render/mesh.h b/intern/cycles/render/mesh.h
index a7703f7cabc..281a8f0645e 100644
--- a/intern/cycles/render/mesh.h
+++ b/intern/cycles/render/mesh.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __MESH_H__
diff --git a/intern/cycles/render/mesh_displace.cpp b/intern/cycles/render/mesh_displace.cpp
index 159705cbb6a..2fd8a978511 100644
--- a/intern/cycles/render/mesh_displace.cpp
+++ b/intern/cycles/render/mesh_displace.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "device.h"
diff --git a/intern/cycles/render/nodes.cpp b/intern/cycles/render/nodes.cpp
index db402c5fc9f..621d52bbbbf 100644
--- a/intern/cycles/render/nodes.cpp
+++ b/intern/cycles/render/nodes.cpp
@@ -1,26 +1,26 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "image.h"
#include "nodes.h"
#include "svm.h"
#include "osl.h"
+#include "sky_model.h"
+#include "util_foreach.h"
#include "util_transform.h"
CCL_NAMESPACE_BEGIN
@@ -42,6 +42,8 @@ TextureMapping::TextureMapping()
y_mapping = Y;
z_mapping = Z;
+ type = TEXTURE;
+
projection = FLAT;
}
@@ -55,12 +57,52 @@ Transform TextureMapping::compute_transform()
mmat[1][y_mapping-1] = 1.0f;
if(z_mapping != NONE)
mmat[2][z_mapping-1] = 1.0f;
+
+ float3 scale_clamped = scale;
- Transform smat = transform_scale(scale);
+ if(type == TEXTURE || type == NORMAL) {
+ /* keep matrix invertible */
+ if(fabsf(scale.x) < 1e-5f)
+ scale_clamped.x = signf(scale.x)*1e-5f;
+ if(fabsf(scale.y) < 1e-5f)
+ scale_clamped.y = signf(scale.y)*1e-5f;
+ if(fabsf(scale.z) < 1e-5f)
+ scale_clamped.z = signf(scale.z)*1e-5f;
+ }
+
+ Transform smat = transform_scale(scale_clamped);
Transform rmat = transform_euler(rotation);
Transform tmat = transform_translate(translation);
- return tmat*rmat*smat*mmat;
+ Transform mat;
+
+ switch(type) {
+ case TEXTURE:
+ /* inverse transform on texture coordinate gives
+ * forward transform on texture */
+ mat = tmat*rmat*smat;
+ mat = transform_inverse(mat);
+ break;
+ case POINT:
+ /* full transform */
+ mat = tmat*rmat*smat;
+ break;
+ case VECTOR:
+ /* no translation for vectors */
+ mat = rmat*smat;
+ break;
+ case NORMAL:
+ /* no translation for normals, and inverse transpose */
+ mat = rmat*smat;
+ mat = transform_inverse(mat);
+ mat = transform_transpose(mat);
+ break;
+ }
+
+ /* projection last */
+ mat = mat*mmat;
+
+ return mat;
}
bool TextureMapping::skip()
@@ -98,6 +140,11 @@ void TextureMapping::compile(SVMCompiler& compiler, int offset_in, int offset_ou
compiler.add_node(float3_to_float4(min));
compiler.add_node(float3_to_float4(max));
}
+
+ if(type == NORMAL) {
+ compiler.add_node(NODE_VECTOR_MATH, NODE_VECTOR_MATH_NORMALIZE, offset_out, offset_out);
+ compiler.add_node(NODE_VECTOR_MATH, SVM_STACK_INVALID, offset_out);
+ }
}
void TextureMapping::compile(OSLCompiler &compiler)
@@ -386,19 +433,35 @@ static float2 sky_spherical_coordinates(float3 dir)
return make_float2(acosf(dir.z), atan2f(dir.x, dir.y));
}
+typedef struct SunSky {
+ /* sun direction in spherical and cartesian */
+ float theta, phi;
+
+ /* Parameter */
+ float radiance_x, radiance_y, radiance_z;
+ float config_x[9], config_y[9], config_z[9];
+} SunSky;
+
+/* Preetham model */
static float sky_perez_function(float lam[6], float theta, float gamma)
{
return (1.0f + lam[0]*expf(lam[1]/cosf(theta))) * (1.0f + lam[2]*expf(lam[3]*gamma) + lam[4]*cosf(gamma)*cosf(gamma));
}
-static void sky_texture_precompute(KernelSunSky *ksunsky, float3 dir, float turbidity)
+static void sky_texture_precompute_old(SunSky *sunsky, float3 dir, float turbidity)
{
+ /*
+ * We re-use the SunSky struct of the new model, to avoid extra variables
+ * zenith_Y/x/y is now radiance_x/y/z
+ * perez_Y/x/y is now config_x/y/z
+ */
+
float2 spherical = sky_spherical_coordinates(dir);
float theta = spherical.x;
float phi = spherical.y;
- ksunsky->theta = theta;
- ksunsky->phi = phi;
+ sunsky->theta = theta;
+ sunsky->phi = phi;
float theta2 = theta*theta;
float theta3 = theta2*theta;
@@ -406,47 +469,106 @@ static void sky_texture_precompute(KernelSunSky *ksunsky, float3 dir, float turb
float T2 = T * T;
float chi = (4.0f / 9.0f - T / 120.0f) * (M_PI_F - 2.0f * theta);
- ksunsky->zenith_Y = (4.0453f * T - 4.9710f) * tanf(chi) - 0.2155f * T + 2.4192f;
- ksunsky->zenith_Y *= 0.06f;
+ sunsky->radiance_x = (4.0453f * T - 4.9710f) * tanf(chi) - 0.2155f * T + 2.4192f;
+ sunsky->radiance_x *= 0.06f;
- ksunsky->zenith_x =
+ sunsky->radiance_y =
(0.00166f * theta3 - 0.00375f * theta2 + 0.00209f * theta) * T2 +
(-0.02903f * theta3 + 0.06377f * theta2 - 0.03202f * theta + 0.00394f) * T +
(0.11693f * theta3 - 0.21196f * theta2 + 0.06052f * theta + 0.25886f);
- ksunsky->zenith_y =
+ sunsky->radiance_z =
(0.00275f * theta3 - 0.00610f * theta2 + 0.00317f * theta) * T2 +
(-0.04214f * theta3 + 0.08970f * theta2 - 0.04153f * theta + 0.00516f) * T +
(0.15346f * theta3 - 0.26756f * theta2 + 0.06670f * theta + 0.26688f);
- ksunsky->perez_Y[0] = (0.1787f * T - 1.4630f);
- ksunsky->perez_Y[1] = (-0.3554f * T + 0.4275f);
- ksunsky->perez_Y[2] = (-0.0227f * T + 5.3251f);
- ksunsky->perez_Y[3] = (0.1206f * T - 2.5771f);
- ksunsky->perez_Y[4] = (-0.0670f * T + 0.3703f);
+ sunsky->config_x[0] = (0.1787f * T - 1.4630f);
+ sunsky->config_x[1] = (-0.3554f * T + 0.4275f);
+ sunsky->config_x[2] = (-0.0227f * T + 5.3251f);
+ sunsky->config_x[3] = (0.1206f * T - 2.5771f);
+ sunsky->config_x[4] = (-0.0670f * T + 0.3703f);
- ksunsky->perez_x[0] = (-0.0193f * T - 0.2592f);
- ksunsky->perez_x[1] = (-0.0665f * T + 0.0008f);
- ksunsky->perez_x[2] = (-0.0004f * T + 0.2125f);
- ksunsky->perez_x[3] = (-0.0641f * T - 0.8989f);
- ksunsky->perez_x[4] = (-0.0033f * T + 0.0452f);
+ sunsky->config_y[0] = (-0.0193f * T - 0.2592f);
+ sunsky->config_y[1] = (-0.0665f * T + 0.0008f);
+ sunsky->config_y[2] = (-0.0004f * T + 0.2125f);
+ sunsky->config_y[3] = (-0.0641f * T - 0.8989f);
+ sunsky->config_y[4] = (-0.0033f * T + 0.0452f);
- ksunsky->perez_y[0] = (-0.0167f * T - 0.2608f);
- ksunsky->perez_y[1] = (-0.0950f * T + 0.0092f);
- ksunsky->perez_y[2] = (-0.0079f * T + 0.2102f);
- ksunsky->perez_y[3] = (-0.0441f * T - 1.6537f);
- ksunsky->perez_y[4] = (-0.0109f * T + 0.0529f);
+ sunsky->config_z[0] = (-0.0167f * T - 0.2608f);
+ sunsky->config_z[1] = (-0.0950f * T + 0.0092f);
+ sunsky->config_z[2] = (-0.0079f * T + 0.2102f);
+ sunsky->config_z[3] = (-0.0441f * T - 1.6537f);
+ sunsky->config_z[4] = (-0.0109f * T + 0.0529f);
+
+ /* unused for old sky model */
+ for(int i = 5; i < 9; i++) {
+ sunsky->config_x[i] = 0.0f;
+ sunsky->config_y[i] = 0.0f;
+ sunsky->config_z[i] = 0.0f;
+ }
- ksunsky->zenith_Y /= sky_perez_function(ksunsky->perez_Y, 0, theta);
- ksunsky->zenith_x /= sky_perez_function(ksunsky->perez_x, 0, theta);
- ksunsky->zenith_y /= sky_perez_function(ksunsky->perez_y, 0, theta);
+ sunsky->radiance_x /= sky_perez_function(sunsky->config_x, 0, theta);
+ sunsky->radiance_y /= sky_perez_function(sunsky->config_y, 0, theta);
+ sunsky->radiance_z /= sky_perez_function(sunsky->config_z, 0, theta);
}
+/* Hosek / Wilkie */
+static void sky_texture_precompute_new(SunSky *sunsky, float3 dir, float turbidity, float ground_albedo)
+{
+ /* Calculate Sun Direction and save coordinates */
+ float2 spherical = sky_spherical_coordinates(dir);
+ float theta = spherical.x;
+ float phi = spherical.y;
+
+ /* Clamp Turbidity */
+ turbidity = clamp(turbidity, 0.0f, 10.0f);
+
+ /* Clamp to Horizon */
+ theta = clamp(theta, 0.0f, M_PI_2_F);
+
+ sunsky->theta = theta;
+ sunsky->phi = phi;
+
+ double solarElevation = M_PI_2_F - theta;
+
+ /* Initialize Sky Model */
+ ArHosekSkyModelState *sky_state;
+ sky_state = arhosek_xyz_skymodelstate_alloc_init(turbidity, ground_albedo, solarElevation);
+
+ /* Copy values from sky_state to SunSky */
+ for (int i = 0; i < 9; ++i) {
+ sunsky->config_x[i] = sky_state->configs[0][i];
+ sunsky->config_y[i] = sky_state->configs[1][i];
+ sunsky->config_z[i] = sky_state->configs[2][i];
+ }
+ sunsky->radiance_x = sky_state->radiances[0];
+ sunsky->radiance_y = sky_state->radiances[1];
+ sunsky->radiance_z = sky_state->radiances[2];
+
+ /* Free sky_state */
+ arhosekskymodelstate_free(sky_state);
+}
+
+static ShaderEnum sky_type_init()
+{
+ ShaderEnum enm;
+
+ enm.insert("Preetham", NODE_SKY_OLD);
+ enm.insert("Hosek / Wilkie", NODE_SKY_NEW);
+
+ return enm;
+}
+
+ShaderEnum SkyTextureNode::type_enum = sky_type_init();
+
SkyTextureNode::SkyTextureNode()
: TextureNode("sky_texture")
{
+ type = ustring("Hosek / Wilkie");
+
sun_direction = make_float3(0.0f, 0.0f, 1.0f);
turbidity = 2.2f;
+ ground_albedo = 0.3f;
add_input("Vector", SHADER_SOCKET_VECTOR, ShaderInput::POSITION);
add_output("Color", SHADER_SOCKET_COLOR);
@@ -457,15 +579,17 @@ void SkyTextureNode::compile(SVMCompiler& compiler)
ShaderInput *vector_in = input("Vector");
ShaderOutput *color_out = output("Color");
- if(compiler.sunsky) {
- sky_texture_precompute(compiler.sunsky, sun_direction, turbidity);
- compiler.sunsky = NULL;
- }
+ SunSky sunsky;
+ if(type_enum[type] == NODE_SKY_OLD)
+ sky_texture_precompute_old(&sunsky, sun_direction, turbidity);
+ else if(type_enum[type] == NODE_SKY_NEW)
+ sky_texture_precompute_new(&sunsky, sun_direction, turbidity, ground_albedo);
if(vector_in->link)
compiler.stack_assign(vector_in);
int vector_offset = vector_in->stack_offset;
+ int sky_model = type_enum[type];
if(!tex_mapping.skip()) {
vector_offset = compiler.stack_find_offset(SHADER_SOCKET_VECTOR);
@@ -473,7 +597,15 @@ void SkyTextureNode::compile(SVMCompiler& compiler)
}
compiler.stack_assign(color_out);
- compiler.add_node(NODE_TEX_SKY, vector_offset, color_out->stack_offset);
+ compiler.add_node(NODE_TEX_SKY, vector_offset, color_out->stack_offset, sky_model);
+ compiler.add_node(__float_as_uint(sunsky.phi), __float_as_uint(sunsky.theta), __float_as_uint(sunsky.radiance_x), __float_as_uint(sunsky.radiance_y));
+ compiler.add_node(__float_as_uint(sunsky.radiance_z), __float_as_uint(sunsky.config_x[0]), __float_as_uint(sunsky.config_x[1]), __float_as_uint(sunsky.config_x[2]));
+ compiler.add_node(__float_as_uint(sunsky.config_x[3]), __float_as_uint(sunsky.config_x[4]), __float_as_uint(sunsky.config_x[5]), __float_as_uint(sunsky.config_x[6]));
+ compiler.add_node(__float_as_uint(sunsky.config_x[7]), __float_as_uint(sunsky.config_x[8]), __float_as_uint(sunsky.config_y[0]), __float_as_uint(sunsky.config_y[1]));
+ compiler.add_node(__float_as_uint(sunsky.config_y[2]), __float_as_uint(sunsky.config_y[3]), __float_as_uint(sunsky.config_y[4]), __float_as_uint(sunsky.config_y[5]));
+ compiler.add_node(__float_as_uint(sunsky.config_y[6]), __float_as_uint(sunsky.config_y[7]), __float_as_uint(sunsky.config_y[8]), __float_as_uint(sunsky.config_z[0]));
+ compiler.add_node(__float_as_uint(sunsky.config_z[1]), __float_as_uint(sunsky.config_z[2]), __float_as_uint(sunsky.config_z[3]), __float_as_uint(sunsky.config_z[4]));
+ compiler.add_node(__float_as_uint(sunsky.config_z[5]), __float_as_uint(sunsky.config_z[6]), __float_as_uint(sunsky.config_z[7]), __float_as_uint(sunsky.config_z[8]));
if(vector_offset != vector_in->stack_offset)
compiler.stack_clear_offset(vector_in->type, vector_offset);
@@ -483,8 +615,20 @@ void SkyTextureNode::compile(OSLCompiler& compiler)
{
tex_mapping.compile(compiler);
- compiler.parameter_vector("sun_direction", sun_direction);
- compiler.parameter("turbidity", turbidity);
+ SunSky sunsky;
+
+ if(type_enum[type] == NODE_SKY_OLD)
+ sky_texture_precompute_old(&sunsky, sun_direction, turbidity);
+ else if(type_enum[type] == NODE_SKY_NEW)
+ sky_texture_precompute_new(&sunsky, sun_direction, turbidity, ground_albedo);
+
+ compiler.parameter("sky_model", type);
+ compiler.parameter("theta", sunsky.theta);
+ compiler.parameter("phi", sunsky.phi);
+ compiler.parameter_color("radiance", make_float3(sunsky.radiance_x, sunsky.radiance_y, sunsky.radiance_z));
+ compiler.parameter_array("config_x", sunsky.config_x, 9);
+ compiler.parameter_array("config_y", sunsky.config_y, 9);
+ compiler.parameter_array("config_z", sunsky.config_z, 9);
compiler.add(this, "node_sky_texture");
}
@@ -1276,19 +1420,21 @@ void ProxyNode::compile(OSLCompiler& compiler)
BsdfNode::BsdfNode(bool scattering_)
: ShaderNode("bsdf"), scattering(scattering_)
{
- closure = ccl::CLOSURE_BSSRDF_ID;
-
add_input("Color", SHADER_SOCKET_COLOR, make_float3(0.8f, 0.8f, 0.8f));
add_input("Normal", SHADER_SOCKET_NORMAL, ShaderInput::NORMAL);
add_input("SurfaceMixWeight", SHADER_SOCKET_FLOAT, 0.0f, ShaderInput::USE_SVM);
- if(scattering)
+ if(scattering) {
+ closure = CLOSURE_BSSRDF_CUBIC_ID;
add_output("BSSRDF", SHADER_SOCKET_CLOSURE);
- else
+ }
+ else {
+ closure = CLOSURE_BSDF_DIFFUSE_ID;
add_output("BSDF", SHADER_SOCKET_CLOSURE);
+ }
}
-void BsdfNode::compile(SVMCompiler& compiler, ShaderInput *param1, ShaderInput *param2, ShaderInput *param3)
+void BsdfNode::compile(SVMCompiler& compiler, ShaderInput *param1, ShaderInput *param2, ShaderInput *param3, ShaderInput *param4)
{
ShaderInput *color_in = input("Color");
ShaderInput *normal_in = input("Normal");
@@ -1307,6 +1453,8 @@ void BsdfNode::compile(SVMCompiler& compiler, ShaderInput *param1, ShaderInput *
compiler.stack_assign(param2);
if(param3)
compiler.stack_assign(param3);
+ if(param4)
+ compiler.stack_assign(param4);
if(normal_in->link)
compiler.stack_assign(normal_in);
@@ -1323,12 +1471,14 @@ void BsdfNode::compile(SVMCompiler& compiler, ShaderInput *param1, ShaderInput *
__float_as_int((param2)? param2->value.x: 0.0f));
if(tangent_in) {
- compiler.add_node(NODE_CLOSURE_BSDF, normal_in->stack_offset, tangent_in->stack_offset,
- (param3)? param3->stack_offset: SVM_STACK_INVALID);
+ compiler.add_node(normal_in->stack_offset, tangent_in->stack_offset,
+ (param3)? param3->stack_offset: SVM_STACK_INVALID,
+ (param4)? param4->stack_offset: SVM_STACK_INVALID);
}
else {
- compiler.add_node(NODE_CLOSURE_BSDF, normal_in->stack_offset, SVM_STACK_INVALID,
- (param3)? param3->stack_offset: SVM_STACK_INVALID);
+ compiler.add_node(normal_in->stack_offset, SVM_STACK_INVALID,
+ (param3)? param3->stack_offset: SVM_STACK_INVALID,
+ (param4)? param4->stack_offset: SVM_STACK_INVALID);
}
}
@@ -1600,27 +1750,48 @@ void TransparentBsdfNode::compile(OSLCompiler& compiler)
/* Subsurface Scattering Closure */
+static ShaderEnum subsurface_falloff_init()
+{
+ ShaderEnum enm;
+
+ enm.insert("Cubic", CLOSURE_BSSRDF_CUBIC_ID);
+ enm.insert("Gaussian", CLOSURE_BSSRDF_GAUSSIAN_ID);
+
+ return enm;
+}
+
+ShaderEnum SubsurfaceScatteringNode::falloff_enum = subsurface_falloff_init();
+
SubsurfaceScatteringNode::SubsurfaceScatteringNode()
: BsdfNode(true)
{
name = "subsurface_scattering";
- closure = CLOSURE_BSSRDF_ID;
+ closure = CLOSURE_BSSRDF_CUBIC_ID;
add_input("Scale", SHADER_SOCKET_FLOAT, 0.01f);
add_input("Radius", SHADER_SOCKET_VECTOR, make_float3(0.1f, 0.1f, 0.1f));
- add_input("IOR", SHADER_SOCKET_FLOAT, 1.3f);
+ add_input("Sharpness", SHADER_SOCKET_FLOAT, 0.0f);
+ add_input("Texture Blur", SHADER_SOCKET_FLOAT, 1.0f);
}
void SubsurfaceScatteringNode::compile(SVMCompiler& compiler)
{
- BsdfNode::compile(compiler, input("Scale"), input("IOR"), input("Radius"));
+ BsdfNode::compile(compiler, input("Scale"), input("Texture Blur"), input("Radius"), input("Sharpness"));
}
void SubsurfaceScatteringNode::compile(OSLCompiler& compiler)
{
+ compiler.parameter("Falloff", falloff_enum[closure]);
compiler.add(this, "node_subsurface_scattering");
}
+bool SubsurfaceScatteringNode::has_bssrdf_bump()
+{
+ /* detect if anything is plugged into the normal input besides the default */
+ ShaderInput *normal_in = input("Normal");
+ return (normal_in->link && normal_in->link->parent->special_type != SHADER_SPECIAL_TYPE_GEOMETRY);
+}
+
/* Emissive Closure */
EmissionNode::EmissionNode()
@@ -1752,7 +1923,7 @@ void AmbientOcclusionNode::compile(OSLCompiler& compiler)
VolumeNode::VolumeNode()
: ShaderNode("volume")
{
- closure = ccl::CLOSURE_VOLUME_ISOTROPIC_ID;
+ closure = CLOSURE_VOLUME_ISOTROPIC_ID;
add_input("Color", SHADER_SOCKET_COLOR, make_float3(0.8f, 0.8f, 0.8f));
add_input("Density", SHADER_SOCKET_FLOAT, 1.0f);
@@ -1810,7 +1981,7 @@ void TransparentVolumeNode::compile(SVMCompiler& compiler)
void TransparentVolumeNode::compile(OSLCompiler& compiler)
{
- compiler.add(this, "node_isotropic_volume");
+ compiler.add(this, "node_transparent_volume");
}
/* Isotropic Volume Closure */
@@ -1830,11 +2001,53 @@ void IsotropicVolumeNode::compile(OSLCompiler& compiler)
compiler.add(this, "node_isotropic_volume");
}
+/* Hair BSDF Closure */
+
+static ShaderEnum hair_component_init()
+{
+ ShaderEnum enm;
+
+ enm.insert("Reflection", CLOSURE_BSDF_HAIR_REFLECTION_ID);
+ enm.insert("Transmission", CLOSURE_BSDF_HAIR_TRANSMISSION_ID);
+
+
+ return enm;
+}
+
+ShaderEnum HairBsdfNode::component_enum = hair_component_init();
+
+HairBsdfNode::HairBsdfNode()
+{
+ component = ustring("Reflection");
+
+ add_input("Offset", SHADER_SOCKET_FLOAT);
+ add_input("RoughnessU", SHADER_SOCKET_FLOAT);
+ add_input("RoughnessV", SHADER_SOCKET_FLOAT);
+
+}
+
+void HairBsdfNode::compile(SVMCompiler& compiler)
+{
+ closure = (ClosureType)component_enum[component];
+
+ BsdfNode::compile(compiler, input("RoughnessU"), input("RoughnessV"), input("Offset"));
+}
+
+void HairBsdfNode::compile(OSLCompiler& compiler)
+{
+ compiler.parameter("component", component);
+
+ compiler.add(this, "node_hair_bsdf");
+
+}
+
/* Geometry */
GeometryNode::GeometryNode()
: ShaderNode("geometry")
{
+ special_type = SHADER_SPECIAL_TYPE_GEOMETRY;
+
add_input("NormalIn", SHADER_SOCKET_NORMAL, ShaderInput::NORMAL, ShaderInput::USE_OSL);
add_output("Position", SHADER_SOCKET_POINT);
add_output("Normal", SHADER_SOCKET_NORMAL);
@@ -3515,6 +3728,26 @@ void OSLScriptNode::compile(SVMCompiler& compiler)
void OSLScriptNode::compile(OSLCompiler& compiler)
{
+ /* XXX fix for #36790:
+ * point and normal parameters are reflected as generic SOCK_VECTOR sockets
+ * on the node. Socket fixed input values need to be copied explicitly here for
+ * vector sockets, otherwise OSL will reject the value due to mismatching type.
+ */
+ foreach(ShaderInput *input, this->inputs) {
+ if(!input->link) {
+ /* no need for compatible_name here, OSL parameter names are always unique */
+ string param_name(input->name);
+ switch(input->type) {
+ case SHADER_SOCKET_VECTOR:
+ compiler.parameter_point(param_name.c_str(), input->value);
+ compiler.parameter_normal(param_name.c_str(), input->value);
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
if(!filepath.empty())
compiler.add(this, filepath.c_str(), true);
else
diff --git a/intern/cycles/render/nodes.h b/intern/cycles/render/nodes.h
index 46b426ea20b..430c37158f4 100644
--- a/intern/cycles/render/nodes.h
+++ b/intern/cycles/render/nodes.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __NODES_H__
@@ -45,6 +43,9 @@ public:
float3 min, max;
bool use_minmax;
+ enum Type { POINT = 0, TEXTURE = 1, VECTOR = 2, NORMAL = 3 };
+ Type type;
+
enum Mapping { NONE = 0, X = 1, Y = 2, Z = 3 };
Mapping x_mapping, y_mapping, z_mapping;
@@ -107,6 +108,10 @@ public:
float3 sun_direction;
float turbidity;
+ float ground_albedo;
+
+ ustring type;
+ static ShaderEnum type_enum;
};
class OutputNode : public ShaderNode {
@@ -201,7 +206,7 @@ public:
BsdfNode(bool scattering = false);
SHADER_NODE_BASE_CLASS(BsdfNode);
- void compile(SVMCompiler& compiler, ShaderInput *param1, ShaderInput *param2, ShaderInput *param3 = NULL);
+ void compile(SVMCompiler& compiler, ShaderInput *param1, ShaderInput *param2, ShaderInput *param3 = NULL, ShaderInput *param4 = NULL);
ClosureType closure;
bool scattering;
@@ -271,6 +276,9 @@ class SubsurfaceScatteringNode : public BsdfNode {
public:
SHADER_NODE_CLASS(SubsurfaceScatteringNode)
bool has_surface_bssrdf() { return true; }
+ bool has_bssrdf_bump();
+
+ static ShaderEnum falloff_enum;
};
class EmissionNode : public ShaderNode {
@@ -316,6 +324,15 @@ public:
SHADER_NODE_CLASS(IsotropicVolumeNode)
};
+class HairBsdfNode : public BsdfNode {
+public:
+ SHADER_NODE_CLASS(HairBsdfNode)
+
+ ustring component;
+ static ShaderEnum component_enum;
+
+};
+
class GeometryNode : public ShaderNode {
public:
SHADER_NODE_CLASS(GeometryNode)
diff --git a/intern/cycles/render/object.cpp b/intern/cycles/render/object.cpp
index 7931a51b99d..6fb96a3290c 100644
--- a/intern/cycles/render/object.cpp
+++ b/intern/cycles/render/object.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "device.h"
@@ -43,10 +41,13 @@ Object::Object()
particle_id = 0;
bounds = BoundBox::empty;
motion.pre = transform_identity();
+ motion.mid = transform_identity();
motion.post = transform_identity();
use_motion = false;
use_holdout = false;
curverender = false;
+ dupli_generated = make_float3(0.0f, 0.0f, 0.0f);
+ dupli_uv = make_float2(0.0f, 0.0f);
}
Object::~Object()
@@ -252,9 +253,9 @@ void ObjectManager::device_update_transforms(Device *device, DeviceScene *dscene
Transform mtfm_pre = ob->motion.pre;
Transform mtfm_post = ob->motion.post;
- if(!mesh->attributes.find(ATTR_STD_MOTION_PRE))
+ if(!(mesh->attributes.find(ATTR_STD_MOTION_PRE) || mesh->curve_attributes.find(ATTR_STD_MOTION_PRE)))
mtfm_pre = mtfm_pre * itfm;
- if(!mesh->attributes.find(ATTR_STD_MOTION_POST))
+ if(!(mesh->attributes.find(ATTR_STD_MOTION_POST) || mesh->curve_attributes.find(ATTR_STD_MOTION_POST)))
mtfm_post = mtfm_post * itfm;
memcpy(&objects_vector[i*OBJECT_VECTOR_SIZE+0], &mtfm_pre, sizeof(float4)*3);
diff --git a/intern/cycles/render/object.h b/intern/cycles/render/object.h
index b3ab0e93b5c..1d8099f8510 100644
--- a/intern/cycles/render/object.h
+++ b/intern/cycles/render/object.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __OBJECT_H__
diff --git a/intern/cycles/render/osl.cpp b/intern/cycles/render/osl.cpp
index 3f269f44abe..d0ed95cca34 100644
--- a/intern/cycles/render/osl.cpp
+++ b/intern/cycles/render/osl.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "device.h"
@@ -201,11 +199,17 @@ void OSLShaderManager::shading_system_init()
"reflection", /* PATH_RAY_REFLECT */
"refraction", /* PATH_RAY_TRANSMIT */
"diffuse", /* PATH_RAY_DIFFUSE */
- "gloss_sharedy", /* PATH_RAY_GLOSSY */
+ "glossy", /* PATH_RAY_GLOSSY */
"singular", /* PATH_RAY_SINGULAR */
"transparent", /* PATH_RAY_TRANSPARENT */
"shadow", /* PATH_RAY_SHADOW_OPAQUE */
"shadow", /* PATH_RAY_SHADOW_TRANSPARENT */
+
+ "__unused__",
+ "__unused__",
+ "diffuse_ancestor", /* PATH_RAY_DIFFUSE_ANCESTOR */
+ "glossy_ancestor", /* PATH_RAY_GLOSSY_ANCESTOR */
+ "bssrdf_ancestor", /* PATH_RAY_BSSRDF_ANCESTOR */
};
const int nraytypes = sizeof(raytypes)/sizeof(raytypes[0]);
@@ -543,8 +547,10 @@ void OSLCompiler::add(ShaderNode *node, const char *name, bool isfilepath)
current_shader->has_surface_emission = true;
if(info->has_surface_transparent)
current_shader->has_surface_transparent = true;
- if(info->has_surface_bssrdf)
+ if(info->has_surface_bssrdf) {
current_shader->has_surface_bssrdf = true;
+ current_shader->has_bssrdf_bump = true; /* can't detect yet */
+ }
}
}
@@ -705,8 +711,11 @@ void OSLCompiler::generate_nodes(const set<ShaderNode*>& nodes)
current_shader->has_surface_emission = true;
if(node->has_surface_transparent())
current_shader->has_surface_transparent = true;
- if(node->has_surface_bssrdf())
+ if(node->has_surface_bssrdf()) {
current_shader->has_surface_bssrdf = true;
+ if(node->has_bssrdf_bump())
+ current_shader->has_bssrdf_bump = true;
+ }
}
else
nodes_done = false;
@@ -773,6 +782,7 @@ void OSLCompiler::compile(OSLGlobals *og, Shader *shader)
shader->has_surface_emission = false;
shader->has_surface_transparent = false;
shader->has_surface_bssrdf = false;
+ shader->has_bssrdf_bump = false;
shader->has_volume = false;
shader->has_displacement = false;
diff --git a/intern/cycles/render/osl.h b/intern/cycles/render/osl.h
index e50c50f2f7b..d6e514bdcaf 100644
--- a/intern/cycles/render/osl.h
+++ b/intern/cycles/render/osl.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __OSL_H__
diff --git a/intern/cycles/render/particles.cpp b/intern/cycles/render/particles.cpp
index 2a1570f7a0d..255effa86dd 100644
--- a/intern/cycles/render/particles.cpp
+++ b/intern/cycles/render/particles.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "device.h"
diff --git a/intern/cycles/render/particles.h b/intern/cycles/render/particles.h
index afc8b2b2dcb..a606722f9c3 100644
--- a/intern/cycles/render/particles.h
+++ b/intern/cycles/render/particles.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __PARTICLES_H__
diff --git a/intern/cycles/render/scene.cpp b/intern/cycles/render/scene.cpp
index a6dca62ffd0..52e355df382 100644
--- a/intern/cycles/render/scene.cpp
+++ b/intern/cycles/render/scene.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include <stdlib.h>
@@ -222,7 +220,7 @@ bool Scene::need_global_attribute(AttributeStandard std)
{
if(std == ATTR_STD_UV)
return Pass::contains(film->passes, PASS_UV);
- if(std == ATTR_STD_MOTION_PRE || ATTR_STD_MOTION_POST)
+ if(std == ATTR_STD_MOTION_PRE || std == ATTR_STD_MOTION_POST)
return need_motion() == MOTION_PASS;
return false;
diff --git a/intern/cycles/render/scene.h b/intern/cycles/render/scene.h
index 0790d4159c5..2c223192536 100644
--- a/intern/cycles/render/scene.h
+++ b/intern/cycles/render/scene.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __SCENE_H__
@@ -138,6 +136,7 @@ public:
#else
use_qbvh = false;
#endif
+ persistent_data = false;
}
bool modified(const SceneParams& params)
diff --git a/intern/cycles/render/session.cpp b/intern/cycles/render/session.cpp
index 87f5722d144..6c15849d815 100644
--- a/intern/cycles/render/session.cpp
+++ b/intern/cycles/render/session.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include <string.h>
@@ -58,7 +56,7 @@ Session::Session(const SessionParams& params_)
}
else {
buffers = new RenderBuffers(device);
- display = new DisplayBuffer(device);
+ display = new DisplayBuffer(device, params.display_buffer_linear);
}
session_thread = NULL;
@@ -68,6 +66,7 @@ Session::Session(const SessionParams& params_)
reset_time = 0.0;
preview_time = 0.0;
paused_time = 0.0;
+ last_update_time = 0.0;
delayed_reset.do_reset = false;
delayed_reset.samples = 0;
@@ -373,7 +372,6 @@ bool Session::acquire_tile(Device *tile_device, RenderTile& rtile)
rtile.buffer = buffers->buffer.device_pointer;
rtile.rng_state = buffers->rng_state.device_pointer;
- rtile.rgba = display->rgba.device_pointer;
rtile.buffers = buffers;
device->map_tile(tile_device, rtile);
@@ -417,7 +415,6 @@ bool Session::acquire_tile(Device *tile_device, RenderTile& rtile)
rtile.buffer = tilebuffers->buffer.device_pointer;
rtile.rng_state = tilebuffers->rng_state.device_pointer;
- rtile.rgba = 0;
rtile.buffers = tilebuffers;
/* this will tag tile as IN PROGRESS in blender-side render pipeline,
@@ -832,7 +829,7 @@ void Session::path_trace()
task.update_tile_sample = function_bind(&Session::update_tile_sample, this, _1);
task.update_progress_sample = function_bind(&Session::update_progress_sample, this);
task.need_finish_queue = params.progressive_refine;
- task.integrator_progressive = scene->integrator->progressive;
+ task.integrator_branched = scene->integrator->method == Integrator::BRANCHED_PATH;
device->task_add(task);
}
@@ -840,13 +837,14 @@ void Session::path_trace()
void Session::tonemap()
{
/* add tonemap task */
- DeviceTask task(DeviceTask::TONEMAP);
+ DeviceTask task(DeviceTask::FILM_CONVERT);
task.x = tile_manager.state.buffer.full_x;
task.y = tile_manager.state.buffer.full_y;
task.w = tile_manager.state.buffer.width;
task.h = tile_manager.state.buffer.height;
- task.rgba = display->rgba.device_pointer;
+ task.rgba_byte = display->rgba_byte.device_pointer;
+ task.rgba_half = display->rgba_half.device_pointer;
task.buffer = buffers->buffer.device_pointer;
task.sample = tile_manager.state.sample;
tile_manager.state.buffer.get_offset_stride(task.offset, task.stride);
diff --git a/intern/cycles/render/session.h b/intern/cycles/render/session.h
index 27073d2fd9c..b2ab4cb9f34 100644
--- a/intern/cycles/render/session.h
+++ b/intern/cycles/render/session.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __SESSION_H__
@@ -51,10 +49,12 @@ public:
bool experimental;
int samples;
int2 tile_size;
- int tile_order;
+ TileOrder tile_order;
int start_resolution;
int threads;
+ bool display_buffer_linear;
+
double cancel_timeout;
double reset_timeout;
double text_timeout;
@@ -74,11 +74,14 @@ public:
start_resolution = INT_MAX;
threads = 0;
+ display_buffer_linear = false;
+
cancel_timeout = 0.1;
reset_timeout = 0.1;
text_timeout = 1.0;
shadingsystem = SVM;
+ tile_order = TILE_CENTER;
}
bool modified(const SessionParams& params)
@@ -93,9 +96,11 @@ public:
&& tile_size == params.tile_size
&& start_resolution == params.start_resolution
&& threads == params.threads
+ && display_buffer_linear == params.display_buffer_linear
&& cancel_timeout == params.cancel_timeout
&& reset_timeout == params.reset_timeout
&& text_timeout == params.text_timeout
+ && tile_order == params.tile_order
&& shadingsystem == params.shadingsystem); }
};
diff --git a/intern/cycles/render/shader.cpp b/intern/cycles/render/shader.cpp
index 5b326e0a017..8dbff224225 100644
--- a/intern/cycles/render/shader.cpp
+++ b/intern/cycles/render/shader.cpp
@@ -1,23 +1,20 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "background.h"
-#include "bssrdf.h"
#include "blackbody.h"
#include "device.h"
#include "graph.h"
@@ -55,6 +52,7 @@ Shader::Shader()
has_converter_blackbody = false;
has_volume = false;
has_displacement = false;
+ has_bssrdf_bump = false;
used = false;
@@ -128,7 +126,6 @@ void Shader::tag_used(Scene *scene)
ShaderManager::ShaderManager()
{
need_update = true;
- bssrdf_table_offset = TABLE_OFFSET_INVALID;
blackbody_table_offset = TABLE_OFFSET_INVALID;
}
@@ -220,7 +217,6 @@ void ShaderManager::device_update_common(Device *device, DeviceScene *dscene, Sc
uint shader_flag_size = scene->shaders.size()*4;
uint *shader_flag = dscene->shader_flag.resize(shader_flag_size);
uint i = 0;
- bool has_surface_bssrdf = false;
bool has_converter_blackbody = false;
foreach(Shader *shader, scene->shaders) {
@@ -234,36 +230,25 @@ void ShaderManager::device_update_common(Device *device, DeviceScene *dscene, Sc
flag |= SD_HAS_VOLUME;
if(shader->homogeneous_volume)
flag |= SD_HOMOGENEOUS_VOLUME;
- if(shader->has_surface_bssrdf)
- has_surface_bssrdf = true;
+ if(shader->has_bssrdf_bump)
+ flag |= SD_HAS_BSSRDF_BUMP;
if(shader->has_converter_blackbody)
has_converter_blackbody = true;
+ /* regular shader */
shader_flag[i++] = flag;
shader_flag[i++] = shader->pass_id;
+
+ /* shader with bump mapping */
+ if(shader->graph_bump)
+ flag |= SD_HAS_BSSRDF_BUMP;
+
shader_flag[i++] = flag;
shader_flag[i++] = shader->pass_id;
}
device->tex_alloc("__shader_flag", dscene->shader_flag);
- /* bssrdf lookup table */
- KernelBSSRDF *kbssrdf = &dscene->data.bssrdf;
-
- if(has_surface_bssrdf && bssrdf_table_offset == TABLE_OFFSET_INVALID) {
- vector<float> table;
-
- bssrdf_table_build(table);
- bssrdf_table_offset = scene->lookup_tables->add_table(dscene, table);
-
- kbssrdf->table_offset = (int)bssrdf_table_offset;
- kbssrdf->num_attempts = BSSRDF_MAX_ATTEMPTS;
- }
- else if(!has_surface_bssrdf && bssrdf_table_offset != TABLE_OFFSET_INVALID) {
- scene->lookup_tables->remove_table(bssrdf_table_offset);
- bssrdf_table_offset = TABLE_OFFSET_INVALID;
- }
-
/* blackbody lookup table */
KernelBlackbody *kblackbody = &dscene->data.blackbody;
@@ -282,11 +267,6 @@ void ShaderManager::device_update_common(Device *device, DeviceScene *dscene, Sc
void ShaderManager::device_free_common(Device *device, DeviceScene *dscene, Scene *scene)
{
- if(bssrdf_table_offset != TABLE_OFFSET_INVALID) {
- scene->lookup_tables->remove_table(bssrdf_table_offset);
- bssrdf_table_offset = TABLE_OFFSET_INVALID;
- }
-
if(blackbody_table_offset != TABLE_OFFSET_INVALID) {
scene->lookup_tables->remove_table(blackbody_table_offset);
blackbody_table_offset = TABLE_OFFSET_INVALID;
@@ -341,12 +321,6 @@ void ShaderManager::add_default(Scene *scene)
{
graph = new ShaderGraph();
- closure = graph->add(new BackgroundNode());
- closure->input("Color")->value = make_float3(0.8f, 0.8f, 0.8f);
- out = graph->output();
-
- graph->connect(closure->output("Background"), out->input("Surface"));
-
shader = new Shader();
shader->name = "default_background";
shader->graph = graph;
diff --git a/intern/cycles/render/shader.h b/intern/cycles/render/shader.h
index d7eac603fa6..6869a651b46 100644
--- a/intern/cycles/render/shader.h
+++ b/intern/cycles/render/shader.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __SHADER_H__
@@ -78,6 +76,7 @@ public:
bool has_displacement;
bool has_surface_bssrdf;
bool has_converter_blackbody;
+ bool has_bssrdf_bump;
/* requested mesh attributes */
AttributeRequestSet attributes;
@@ -142,7 +141,6 @@ protected:
typedef unordered_map<ustring, uint, ustringHash> AttributeIDMap;
AttributeIDMap unique_attribute_id;
- size_t bssrdf_table_offset;
size_t blackbody_table_offset;
};
diff --git a/intern/cycles/render/sky_model.cpp b/intern/cycles/render/sky_model.cpp
new file mode 100644
index 00000000000..3bfb5e1cc00
--- /dev/null
+++ b/intern/cycles/render/sky_model.cpp
@@ -0,0 +1,389 @@
+/*
+This source is published under the following 3-clause BSD license.
+
+Copyright (c) 2012 - 2013, Lukas Hosek and Alexander Wilkie
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * None of the names of the contributors may be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/* ============================================================================
+
+This file is part of a sample implementation of the analytical skylight and
+solar radiance models presented in the SIGGRAPH 2012 paper
+
+
+ "An Analytic Model for Full Spectral Sky-Dome Radiance"
+
+and the 2013 IEEE CG&A paper
+
+ "Adding a Solar Radiance Function to the Hosek Skylight Model"
+
+ both by
+
+ Lukas Hosek and Alexander Wilkie
+ Charles University in Prague, Czech Republic
+
+
+ Version: 1.4a, February 22nd, 2013
+
+Version history:
+
+1.4a February 22nd, 2013
+ Removed unnecessary and counter-intuitive solar radius parameters
+ from the interface of the colourspace sky dome initialisation functions.
+
+1.4 February 11th, 2013
+ Fixed a bug which caused the relative brightness of the solar disc
+ and the sky dome to be off by a factor of about 6. The sun was too
+ bright: this affected both normal and alien sun scenarios. The
+ coefficients of the solar radiance function were changed to fix this.
+
+1.3 January 21st, 2013 (not released to the public)
+ Added support for solar discs that are not exactly the same size as
+ the terrestrial sun. Also added support for suns with a different
+ emission spectrum ("Alien World" functionality).
+
+1.2a December 18th, 2012
+ Fixed a mistake and some inaccuracies in the solar radiance function
+ explanations found in ArHosekSkyModel.h. The actual source code is
+ unchanged compared to version 1.2.
+
+1.2 December 17th, 2012
+ Native RGB data and a solar radiance function that matches the turbidity
+ conditions were added.
+
+1.1 September 2012
+ The coefficients of the spectral model are now scaled so that the output
+ is given in physical units: W / (m^-2 * sr * nm). Also, the output of the
+ XYZ model is now no longer scaled to the range [0...1]. Instead, it is
+ the result of a simple conversion from spectral data via the CIE 2 degree
+ standard observer matching functions. Therefore, after multiplication
+ with 683 lm / W, the Y channel now corresponds to luminance in lm.
+
+1.0 May 11th, 2012
+ Initial release.
+
+
+Please visit http://cgg.mff.cuni.cz/projects/SkylightModelling/ to check if
+an updated version of this code has been published!
+
+============================================================================ */
+
+/*
+
+All instructions on how to use this code are in the accompanying header file.
+
+*/
+
+#include "sky_model.h"
+#include "sky_model_data.h"
+
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+
+CCL_NAMESPACE_BEGIN
+
+// Some macro definitions that occur elsewhere in ART, and that have to be
+// replicated to make this a stand-alone module.
+
+#ifndef MATH_PI
+#define MATH_PI 3.141592653589793
+#endif
+
+#ifndef MATH_DEG_TO_RAD
+#define MATH_DEG_TO_RAD ( MATH_PI / 180.0 )
+#endif
+
+#ifndef DEGREES
+#define DEGREES * MATH_DEG_TO_RAD
+#endif
+
+#ifndef TERRESTRIAL_SOLAR_RADIUS
+#define TERRESTRIAL_SOLAR_RADIUS ( ( 0.51 DEGREES ) / 2.0 )
+#endif
+
+#ifndef ALLOC
+#define ALLOC(_struct) ((_struct *)malloc(sizeof(_struct)))
+#endif
+
+// internal definitions
+
+typedef double *ArHosekSkyModel_Dataset;
+typedef double *ArHosekSkyModel_Radiance_Dataset;
+
+// internal functions
+
+static void ArHosekSkyModel_CookConfiguration(
+ ArHosekSkyModel_Dataset dataset,
+ ArHosekSkyModelConfiguration config,
+ double turbidity,
+ double albedo,
+ double solar_elevation
+ )
+{
+ double * elev_matrix;
+
+ int int_turbidity = (int)turbidity;
+ double turbidity_rem = turbidity - (double)int_turbidity;
+
+ solar_elevation = pow(solar_elevation / (MATH_PI / 2.0), (1.0 / 3.0));
+
+ // alb 0 low turb
+
+ elev_matrix = dataset + ( 9 * 6 * (int_turbidity-1) );
+
+
+ for( unsigned int i = 0; i < 9; ++i )
+ {
+ //(1-t).^3* A1 + 3*(1-t).^2.*t * A2 + 3*(1-t) .* t .^ 2 * A3 + t.^3 * A4;
+ config[i] =
+ (1.0-albedo) * (1.0 - turbidity_rem)
+ * ( pow(1.0-solar_elevation, 5.0) * elev_matrix[i] +
+ 5.0 * pow(1.0-solar_elevation, 4.0) * solar_elevation * elev_matrix[i+9] +
+ 10.0*pow(1.0-solar_elevation, 3.0)*pow(solar_elevation, 2.0) * elev_matrix[i+18] +
+ 10.0*pow(1.0-solar_elevation, 2.0)*pow(solar_elevation, 3.0) * elev_matrix[i+27] +
+ 5.0*(1.0-solar_elevation)*pow(solar_elevation, 4.0) * elev_matrix[i+36] +
+ pow(solar_elevation, 5.0) * elev_matrix[i+45]);
+ }
+
+ // alb 1 low turb
+ elev_matrix = dataset + (9*6*10 + 9*6*(int_turbidity-1));
+ for(unsigned int i = 0; i < 9; ++i)
+ {
+ //(1-t).^3* A1 + 3*(1-t).^2.*t * A2 + 3*(1-t) .* t .^ 2 * A3 + t.^3 * A4;
+ config[i] +=
+ (albedo) * (1.0 - turbidity_rem)
+ * ( pow(1.0-solar_elevation, 5.0) * elev_matrix[i] +
+ 5.0 * pow(1.0-solar_elevation, 4.0) * solar_elevation * elev_matrix[i+9] +
+ 10.0*pow(1.0-solar_elevation, 3.0)*pow(solar_elevation, 2.0) * elev_matrix[i+18] +
+ 10.0*pow(1.0-solar_elevation, 2.0)*pow(solar_elevation, 3.0) * elev_matrix[i+27] +
+ 5.0*(1.0-solar_elevation)*pow(solar_elevation, 4.0) * elev_matrix[i+36] +
+ pow(solar_elevation, 5.0) * elev_matrix[i+45]);
+ }
+
+ if(int_turbidity == 10)
+ return;
+
+ // alb 0 high turb
+ elev_matrix = dataset + (9*6*(int_turbidity));
+ for(unsigned int i = 0; i < 9; ++i)
+ {
+ //(1-t).^3* A1 + 3*(1-t).^2.*t * A2 + 3*(1-t) .* t .^ 2 * A3 + t.^3 * A4;
+ config[i] +=
+ (1.0-albedo) * (turbidity_rem)
+ * ( pow(1.0-solar_elevation, 5.0) * elev_matrix[i] +
+ 5.0 * pow(1.0-solar_elevation, 4.0) * solar_elevation * elev_matrix[i+9] +
+ 10.0*pow(1.0-solar_elevation, 3.0)*pow(solar_elevation, 2.0) * elev_matrix[i+18] +
+ 10.0*pow(1.0-solar_elevation, 2.0)*pow(solar_elevation, 3.0) * elev_matrix[i+27] +
+ 5.0*(1.0-solar_elevation)*pow(solar_elevation, 4.0) * elev_matrix[i+36] +
+ pow(solar_elevation, 5.0) * elev_matrix[i+45]);
+ }
+
+ // alb 1 high turb
+ elev_matrix = dataset + (9*6*10 + 9*6*(int_turbidity));
+ for(unsigned int i = 0; i < 9; ++i)
+ {
+ //(1-t).^3* A1 + 3*(1-t).^2.*t * A2 + 3*(1-t) .* t .^ 2 * A3 + t.^3 * A4;
+ config[i] +=
+ (albedo) * (turbidity_rem)
+ * ( pow(1.0-solar_elevation, 5.0) * elev_matrix[i] +
+ 5.0 * pow(1.0-solar_elevation, 4.0) * solar_elevation * elev_matrix[i+9] +
+ 10.0*pow(1.0-solar_elevation, 3.0)*pow(solar_elevation, 2.0) * elev_matrix[i+18] +
+ 10.0*pow(1.0-solar_elevation, 2.0)*pow(solar_elevation, 3.0) * elev_matrix[i+27] +
+ 5.0*(1.0-solar_elevation)*pow(solar_elevation, 4.0) * elev_matrix[i+36] +
+ pow(solar_elevation, 5.0) * elev_matrix[i+45]);
+ }
+}
+
+static double ArHosekSkyModel_CookRadianceConfiguration(
+ ArHosekSkyModel_Radiance_Dataset dataset,
+ double turbidity,
+ double albedo,
+ double solar_elevation
+ )
+{
+ double* elev_matrix;
+
+ int int_turbidity = (int)turbidity;
+ double turbidity_rem = turbidity - (double)int_turbidity;
+ double res;
+ solar_elevation = pow(solar_elevation / (MATH_PI / 2.0), (1.0 / 3.0));
+
+ // alb 0 low turb
+ elev_matrix = dataset + (6*(int_turbidity-1));
+ //(1-t).^3* A1 + 3*(1-t).^2.*t * A2 + 3*(1-t) .* t .^ 2 * A3 + t.^3 * A4;
+ res = (1.0-albedo) * (1.0 - turbidity_rem) *
+ ( pow(1.0-solar_elevation, 5.0) * elev_matrix[0] +
+ 5.0*pow(1.0-solar_elevation, 4.0)*solar_elevation * elev_matrix[1] +
+ 10.0*pow(1.0-solar_elevation, 3.0)*pow(solar_elevation, 2.0) * elev_matrix[2] +
+ 10.0*pow(1.0-solar_elevation, 2.0)*pow(solar_elevation, 3.0) * elev_matrix[3] +
+ 5.0*(1.0-solar_elevation)*pow(solar_elevation, 4.0) * elev_matrix[4] +
+ pow(solar_elevation, 5.0) * elev_matrix[5]);
+
+ // alb 1 low turb
+ elev_matrix = dataset + (6*10 + 6*(int_turbidity-1));
+ //(1-t).^3* A1 + 3*(1-t).^2.*t * A2 + 3*(1-t) .* t .^ 2 * A3 + t.^3 * A4;
+ res += (albedo) * (1.0 - turbidity_rem) *
+ ( pow(1.0-solar_elevation, 5.0) * elev_matrix[0] +
+ 5.0*pow(1.0-solar_elevation, 4.0)*solar_elevation * elev_matrix[1] +
+ 10.0*pow(1.0-solar_elevation, 3.0)*pow(solar_elevation, 2.0) * elev_matrix[2] +
+ 10.0*pow(1.0-solar_elevation, 2.0)*pow(solar_elevation, 3.0) * elev_matrix[3] +
+ 5.0*(1.0-solar_elevation)*pow(solar_elevation, 4.0) * elev_matrix[4] +
+ pow(solar_elevation, 5.0) * elev_matrix[5]);
+ if(int_turbidity == 10)
+ return res;
+
+ // alb 0 high turb
+ elev_matrix = dataset + (6*(int_turbidity));
+ //(1-t).^3* A1 + 3*(1-t).^2.*t * A2 + 3*(1-t) .* t .^ 2 * A3 + t.^3 * A4;
+ res += (1.0-albedo) * (turbidity_rem) *
+ ( pow(1.0-solar_elevation, 5.0) * elev_matrix[0] +
+ 5.0*pow(1.0-solar_elevation, 4.0)*solar_elevation * elev_matrix[1] +
+ 10.0*pow(1.0-solar_elevation, 3.0)*pow(solar_elevation, 2.0) * elev_matrix[2] +
+ 10.0*pow(1.0-solar_elevation, 2.0)*pow(solar_elevation, 3.0) * elev_matrix[3] +
+ 5.0*(1.0-solar_elevation)*pow(solar_elevation, 4.0) * elev_matrix[4] +
+ pow(solar_elevation, 5.0) * elev_matrix[5]);
+
+ // alb 1 high turb
+ elev_matrix = dataset + (6*10 + 6*(int_turbidity));
+ //(1-t).^3* A1 + 3*(1-t).^2.*t * A2 + 3*(1-t) .* t .^ 2 * A3 + t.^3 * A4;
+ res += (albedo) * (turbidity_rem) *
+ ( pow(1.0-solar_elevation, 5.0) * elev_matrix[0] +
+ 5.0*pow(1.0-solar_elevation, 4.0)*solar_elevation * elev_matrix[1] +
+ 10.0*pow(1.0-solar_elevation, 3.0)*pow(solar_elevation, 2.0) * elev_matrix[2] +
+ 10.0*pow(1.0-solar_elevation, 2.0)*pow(solar_elevation, 3.0) * elev_matrix[3] +
+ 5.0*(1.0-solar_elevation)*pow(solar_elevation, 4.0) * elev_matrix[4] +
+ pow(solar_elevation, 5.0) * elev_matrix[5]);
+ return res;
+}
+
+static double ArHosekSkyModel_GetRadianceInternal(
+ ArHosekSkyModelConfiguration configuration,
+ double theta,
+ double gamma
+ )
+{
+ const double expM = exp(configuration[4] * gamma);
+ const double rayM = cos(gamma)*cos(gamma);
+ const double mieM = (1.0 + cos(gamma)*cos(gamma)) / pow((1.0 + configuration[8]*configuration[8] - 2.0*configuration[8]*cos(gamma)), 1.5);
+ const double zenith = sqrt(cos(theta));
+
+ return (1.0 + configuration[0] * exp(configuration[1] / (cos(theta) + 0.01))) *
+ (configuration[2] + configuration[3] * expM + configuration[5] * rayM + configuration[6] * mieM + configuration[7] * zenith);
+}
+
+void arhosekskymodelstate_free(
+ ArHosekSkyModelState * state
+ )
+{
+ free(state);
+}
+
+double arhosekskymodel_radiance(
+ ArHosekSkyModelState * state,
+ double theta,
+ double gamma,
+ double wavelength
+ )
+{
+ int low_wl = (wavelength - 320.0 ) / 40.0;
+
+ if ( low_wl < 0 || low_wl >= 11 )
+ return 0.0f;
+
+ double interp = fmod((wavelength - 320.0 ) / 40.0, 1.0);
+
+ double val_low =
+ ArHosekSkyModel_GetRadianceInternal(
+ state->configs[low_wl],
+ theta,
+ gamma
+ )
+ * state->radiances[low_wl]
+ * state->emission_correction_factor_sky[low_wl];
+
+ if ( interp < 1e-6 )
+ return val_low;
+
+ double result = ( 1.0 - interp ) * val_low;
+
+ if ( low_wl+1 < 11 )
+ {
+ result +=
+ interp
+ * ArHosekSkyModel_GetRadianceInternal(
+ state->configs[low_wl+1],
+ theta,
+ gamma
+ )
+ * state->radiances[low_wl+1]
+ * state->emission_correction_factor_sky[low_wl+1];
+ }
+
+ return result;
+}
+
+
+// xyz and rgb versions
+
+ArHosekSkyModelState * arhosek_xyz_skymodelstate_alloc_init(
+ const double turbidity,
+ const double albedo,
+ const double elevation
+ )
+{
+ ArHosekSkyModelState * state = ALLOC(ArHosekSkyModelState);
+
+ state->solar_radius = TERRESTRIAL_SOLAR_RADIUS;
+ state->turbidity = turbidity;
+ state->albedo = albedo;
+ state->elevation = elevation;
+
+ for( unsigned int channel = 0; channel < 3; ++channel )
+ {
+ ArHosekSkyModel_CookConfiguration(
+ datasetsXYZ[channel],
+ state->configs[channel],
+ turbidity,
+ albedo,
+ elevation
+ );
+
+ state->radiances[channel] =
+ ArHosekSkyModel_CookRadianceConfiguration(
+ datasetsXYZRad[channel],
+ turbidity,
+ albedo,
+ elevation
+ );
+ }
+
+ return state;
+}
+
+CCL_NAMESPACE_END
+
diff --git a/intern/cycles/render/sky_model.h b/intern/cycles/render/sky_model.h
new file mode 100644
index 00000000000..4f0833aef5a
--- /dev/null
+++ b/intern/cycles/render/sky_model.h
@@ -0,0 +1,454 @@
+/*
+This source is published under the following 3-clause BSD license.
+
+Copyright (c) 2012 - 2013, Lukas Hosek and Alexander Wilkie
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * None of the names of the contributors may be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+
+/* ============================================================================
+
+This file is part of a sample implementation of the analytical skylight and
+solar radiance models presented in the SIGGRAPH 2012 paper
+
+
+ "An Analytic Model for Full Spectral Sky-Dome Radiance"
+
+and the 2013 IEEE CG&A paper
+
+ "Adding a Solar Radiance Function to the Hosek Skylight Model"
+
+ both by
+
+ Lukas Hosek and Alexander Wilkie
+ Charles University in Prague, Czech Republic
+
+
+ Version: 1.4a, February 22nd, 2013
+
+Version history:
+
+1.4a February 22nd, 2013
+ Removed unnecessary and counter-intuitive solar radius parameters
+ from the interface of the colourspace sky dome initialisation functions.
+
+1.4 February 11th, 2013
+ Fixed a bug which caused the relative brightness of the solar disc
+ and the sky dome to be off by a factor of about 6. The sun was too
+ bright: this affected both normal and alien sun scenarios. The
+ coefficients of the solar radiance function were changed to fix this.
+
+1.3 January 21st, 2013 (not released to the public)
+ Added support for solar discs that are not exactly the same size as
+ the terrestrial sun. Also added support for suns with a different
+ emission spectrum ("Alien World" functionality).
+
+1.2a December 18th, 2012
+ Fixed a mistake and some inaccuracies in the solar radiance function
+ explanations found in ArHosekSkyModel.h. The actual source code is
+ unchanged compared to version 1.2.
+
+1.2 December 17th, 2012
+ Native RGB data and a solar radiance function that matches the turbidity
+ conditions were added.
+
+1.1 September 2012
+ The coefficients of the spectral model are now scaled so that the output
+ is given in physical units: W / (m^-2 * sr * nm). Also, the output of the
+ XYZ model is now no longer scaled to the range [0...1]. Instead, it is
+ the result of a simple conversion from spectral data via the CIE 2 degree
+ standard observer matching functions. Therefore, after multiplication
+ with 683 lm / W, the Y channel now corresponds to luminance in lm.
+
+1.0 May 11th, 2012
+ Initial release.
+
+
+Please visit http://cgg.mff.cuni.cz/projects/SkylightModelling/ to check if
+an updated version of this code has been published!
+
+============================================================================ */
+
+
+/*
+
+This code is taken from ART, a rendering research system written in a
+mix of C99 / Objective C. Since ART is not a small system and is intended to
+be inter-operable with other libraries, and since C does not have namespaces,
+the structures and functions in ART all have to have somewhat wordy
+canonical names that begin with Ar.../ar..., like those seen in this example.
+
+Usage information:
+==================
+
+
+Model initialisation
+--------------------
+
+A separate ArHosekSkyModelState has to be maintained for each spectral
+band you want to use the model for. So in a renderer with 'num_channels'
+bands, you would need something like
+
+ ArHosekSkyModelState * skymodel_state[num_channels];
+
+You then have to allocate and initialise these states. In the following code
+snippet, we assume that 'albedo' is defined as
+
+ double albedo[num_channels];
+
+with a ground albedo value between [0,1] for each channel. The solar elevation
+is given in radians.
+
+ for ( unsigned int i = 0; i < num_channels; i++ )
+ skymodel_state[i] =
+ arhosekskymodelstate_alloc_init(
+ turbidity,
+ albedo[i],
+ solarElevation
+ );
+
+Note that starting with version 1.3, there is also a second initialisation
+function which generates skydome states for different solar emission spectra
+and solar radii: 'arhosekskymodelstate_alienworld_alloc_init()'.
+
+See the notes about the "Alien World" functionality provided further down for a
+discussion of the usefulness and limits of that second initalisation function.
+Sky model states that have been initialised with either function behave in a
+completely identical fashion during use and cleanup.
+
+Using the model to generate skydome samples
+-------------------------------------------
+
+Generating a skydome radiance spectrum "skydome_result" for a given location
+on the skydome determined via the angles theta and gamma works as follows:
+
+ double skydome_result[num_channels];
+
+ for ( unsigned int i = 0; i < num_channels; i++ )
+ skydome_result[i] =
+ arhosekskymodel_radiance(
+ skymodel_state[i],
+ theta,
+ gamma,
+ channel_center[i]
+ );
+
+The variable "channel_center" is assumed to hold the channel center wavelengths
+for each of the num_channels samples of the spectrum we are building.
+
+
+Cleanup after use
+-----------------
+
+After rendering is complete, the content of the sky model states should be
+disposed of via
+
+ for ( unsigned int i = 0; i < num_channels; i++ )
+ arhosekskymodelstate_free( skymodel_state[i] );
+
+
+CIE XYZ Version of the Model
+----------------------------
+
+Usage of the CIE XYZ version of the model is exactly the same, except that
+num_channels is of course always 3, and that ArHosekTristimSkyModelState and
+arhosek_tristim_skymodel_radiance() have to be used instead of their spectral
+counterparts.
+
+RGB Version of the Model
+------------------------
+
+The RGB version uses sRGB primaries with a linear gamma ramp. The same set of
+functions as with the XYZ data is used, except the model is initialized
+by calling arhosek_rgb_skymodelstate_alloc_init.
+
+Solar Radiance Function
+-----------------------
+
+For each position on the solar disc, this function returns the entire radiance
+one sees - direct emission, as well as in-scattered light in the area of the
+solar disc. The latter is important for low solar elevations - nice images of
+the setting sun would not be possible without this. This is also the reason why
+this function, just like the regular sky dome model evaluation function, needs
+access to the sky dome data structures, as these provide information on
+in-scattered radiance.
+
+CAVEAT #1: in this release, this function is only provided in spectral form!
+ RGB/XYZ versions to follow at a later date.
+
+CAVEAT #2: (fixed from release 1.3 onwards)
+
+CAVEAT #3: limb darkening renders the brightness of the solar disc
+ inhomogeneous even for high solar elevations - only taking a single
+ sample at the centre of the sun will yield an incorrect power
+ estimate for the solar disc! Always take multiple random samples
+ across the entire solar disc to estimate its power!
+
+CAVEAT #4: in this version, the limb darkening calculations still use a fairly
+ computationally expensive 5th order polynomial that was directly
+ taken from astronomical literature. For the purposes of Computer
+ Graphics, this is needlessly accurate, though, and will be replaced
+ by a cheaper approximation in a future release.
+
+"Alien World" functionality
+---------------------------
+
+The Hosek sky model can be used to roughly (!) predict the appearance of
+outdoor scenes on earth-like planets, i.e. planets of a similar size and
+atmospheric make-up. Since the spectral version of our model predicts sky dome
+luminance patterns and solar radiance independently for each waveband, and
+since the intensity of each waveband is solely dependent on the input radiance
+from the star that the world in question is orbiting, it is trivial to re-scale
+the wavebands to match a different star radiance.
+
+At least in theory, the spectral version of the model has always been capable
+of this sort of thing, and the actual sky dome and solar radiance models were
+actually not altered at all in this release. All we did was to add some support
+functionality for doing this more easily with the existing data and functions,
+and to add some explanations.
+
+Just use 'arhosekskymodelstate_alienworld_alloc_init()' to initialise the sky
+model states (you will have to provide values for star temperature and solar
+intensity compared to the terrestrial sun), and do everything else as you
+did before.
+
+CAVEAT #1: we assume the emission of the star that illuminates the alien world
+ to be a perfect blackbody emission spectrum. This is never entirely
+ realistic - real star emission spectra are considerably more complex
+ than this, mainly due to absorption effects in the outer layers of
+ stars. However, blackbody spectra are a reasonable first assumption
+ in a usage scenario like this, where 100% accuracy is simply not
+ necessary: for rendering purposes, there are likely no visible
+ differences between a highly accurate solution based on a more
+ involved simulation, and this approximation.
+
+CAVEAT #2: we always use limb darkening data from our own sun to provide this
+ "appearance feature", even for suns of strongly different
+ temperature. Which is presumably not very realistic, but (as with
+ the unaltered blackbody spectrum from caveat #1) probably not a bad
+ first guess, either. If you need more accuracy than we provide here,
+ please make inquiries with a friendly astro-physicst of your choice.
+
+CAVEAT #3: you have to provide a value for the solar intensity of the star
+ which illuminates the alien world. For this, please bear in mind
+ that there is very likely a comparatively tight range of absolute
+ solar irradiance values for which an earth-like planet with an
+ atmosphere like the one we assume in our model can exist in the
+ first place!
+
+ Too much irradiance, and the atmosphere probably boils off into
+ space, too little, it freezes. Which means that stars of
+ considerably different emission colour than our sun will have to be
+ fairly different in size from it, to still provide a reasonable and
+ inhabitable amount of irradiance. Red stars will need to be much
+ larger than our sun, while white or blue stars will have to be
+ comparatively tiny. The initialisation function handles this and
+ computes a plausible solar radius for a given emission spectrum. In
+ terms of absolute radiometric values, you should probably not stray
+ all too far from a solar intensity value of 1.0.
+
+CAVEAT #4: although we now support different solar radii for the actual solar
+ disc, the sky dome luminance patterns are *not* parameterised by
+ this value - i.e. the patterns stay exactly the same for different
+ solar radii! Which is of course not correct. But in our experience,
+ solar discs up to several degrees in diameter (! - our own sun is
+ half a degree across) do not cause the luminance patterns on the sky
+ to change perceptibly. The reason we know this is that we initially
+ used unrealistically large suns in our brute force path tracer, in
+ order to improve convergence speeds (which in the beginning were
+ abysmal). Later, we managed to do the reference renderings much
+ faster even with realistically small suns, and found that there was
+ no real difference in skydome appearance anyway.
+ Conclusion: changing the solar radius should not be over-done, so
+ close orbits around red supergiants are a no-no. But for the
+ purposes of getting a fairly credible first impression of what an
+ alien world with a reasonably sized sun would look like, what we are
+ doing here is probably still o.k.
+
+HINT #1: if you want to model the sky of an earth-like planet that orbits
+ a binary star, just super-impose two of these models with solar
+ intensity of ~0.5 each, and closely spaced solar positions. Light is
+ additive, after all. Tattooine, here we come... :-)
+
+ P.S. according to Star Wars canon, Tattooine orbits a binary
+ that is made up of a G and K class star, respectively.
+ So ~5500K and ~4200K should be good first guesses for their
+ temperature. Just in case you were wondering, after reading the
+ previous paragraph.
+*/
+
+CCL_NAMESPACE_BEGIN
+
+#ifndef _SKY_MODEL_H_
+#define _SKY_MODEL_H_
+
+typedef double ArHosekSkyModelConfiguration[9];
+
+
+// Spectral version of the model
+
+/* ----------------------------------------------------------------------------
+
+ ArHosekSkyModelState struct
+ ---------------------------
+
+ This struct holds the pre-computation data for one particular albedo value.
+ Most fields are self-explanatory, but users should never directly
+ manipulate any of them anyway. The only consistent way to manipulate such
+ structs is via the functions 'arhosekskymodelstate_alloc_init' and
+ 'arhosekskymodelstate_free'.
+
+ 'emission_correction_factor_sky'
+ 'emission_correction_factor_sun'
+
+ The original model coefficients were fitted against the emission of
+ our local sun. If a different solar emission is desired (i.e. if the
+ model is being used to predict skydome appearance for an earth-like
+ planet that orbits a different star), these correction factors, which
+ are determined during the alloc_init step, are applied to each waveband
+ separately (they default to 1.0 in normal usage). This is the simplest
+ way to retrofit this sort of capability to the existing model. The
+ different factors for sky and sun are needed since the solar disc may
+ be of a different size compared to the terrestrial sun.
+
+---------------------------------------------------------------------------- */
+
+typedef struct ArHosekSkyModelState
+{
+ ArHosekSkyModelConfiguration configs[11];
+ double radiances[11];
+ double turbidity;
+ double solar_radius;
+ double emission_correction_factor_sky[11];
+ double emission_correction_factor_sun[11];
+ double albedo;
+ double elevation;
+}
+ArHosekSkyModelState;
+
+/* ----------------------------------------------------------------------------
+
+ arhosekskymodelstate_alloc_init() function
+ ------------------------------------------
+
+ Initialises an ArHosekSkyModelState struct for a terrestrial setting.
+
+---------------------------------------------------------------------------- */
+
+ArHosekSkyModelState * arhosekskymodelstate_alloc_init(
+ const double solar_elevation,
+ const double atmospheric_turbidity,
+ const double ground_albedo
+ );
+
+
+/* ----------------------------------------------------------------------------
+
+ arhosekskymodelstate_alienworld_alloc_init() function
+ -----------------------------------------------------
+
+ Initialises an ArHosekSkyModelState struct for an "alien world" setting
+ with a sun of a surface temperature given in 'kelvin'. The parameter
+ 'solar_intensity' controls the overall brightness of the sky, relative
+ to the solar irradiance on Earth. A value of 1.0 yields a sky dome that
+ is, on average over the wavelenghts covered in the model (!), as bright
+ as the terrestrial sky in radiometric terms.
+
+ Which means that the solar radius has to be adjusted, since the
+ emissivity of a solar surface with a given temperature is more or less
+ fixed. So hotter suns have to be smaller to be equally bright as the
+ terrestrial sun, while cooler suns have to be larger. Note that there are
+ limits to the validity of the luminance patterns of the underlying model:
+ see the discussion above for more on this. In particular, an alien sun with
+ a surface temperature of only 2000 Kelvin has to be very large if it is
+ to be as bright as the terrestrial sun - so large that the luminance
+ patterns are no longer a really good fit in that case.
+
+ If you need information about the solar radius that the model computes
+ for a given temperature (say, for light source sampling purposes), you
+ have to query the 'solar_radius' variable of the sky model state returned
+ *after* running this function.
+
+---------------------------------------------------------------------------- */
+
+ArHosekSkyModelState * arhosekskymodelstate_alienworld_alloc_init(
+ const double solar_elevation,
+ const double solar_intensity,
+ const double solar_surface_temperature_kelvin,
+ const double atmospheric_turbidity,
+ const double ground_albedo
+ );
+
+void arhosekskymodelstate_free(
+ ArHosekSkyModelState * state
+ );
+
+double arhosekskymodel_radiance(
+ ArHosekSkyModelState * state,
+ double theta,
+ double gamma,
+ double wavelength
+ );
+
+// CIE XYZ and RGB versions
+
+
+ArHosekSkyModelState * arhosek_xyz_skymodelstate_alloc_init(
+ const double turbidity,
+ const double albedo,
+ const double elevation
+ );
+
+
+ArHosekSkyModelState * arhosek_rgb_skymodelstate_alloc_init(
+ const double turbidity,
+ const double albedo,
+ const double elevation
+ );
+
+
+double arhosek_tristim_skymodel_radiance(
+ ArHosekSkyModelState * state,
+ double theta,
+ double gamma,
+ int channel
+ );
+
+// Delivers the complete function: sky + sun, including limb darkening.
+// Please read the above description before using this - there are several
+// caveats!
+
+double arhosekskymodel_solar_radiance(
+ ArHosekSkyModelState * state,
+ double theta,
+ double gamma,
+ double wavelength
+ );
+
+
+#endif // _SKY_MODEL_H_
+
+CCL_NAMESPACE_END
diff --git a/intern/cycles/render/sky_model_data.h b/intern/cycles/render/sky_model_data.h
new file mode 100644
index 00000000000..a292eeacff0
--- /dev/null
+++ b/intern/cycles/render/sky_model_data.h
@@ -0,0 +1,3866 @@
+/*
+This source is published under the following 3-clause BSD license.
+
+Copyright (c) 2012 - 2013, Lukas Hosek and Alexander Wilkie
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * None of the names of the contributors may be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+
+/* ============================================================================
+
+This file is part of a sample implementation of the analytical skylight and
+solar radiance models presented in the SIGGRAPH 2012 paper
+
+
+ "An Analytic Model for Full Spectral Sky-Dome Radiance"
+
+and the 2013 IEEE CG&A paper
+
+ "Adding a Solar Radiance Function to the Hosek Skylight Model"
+
+ both by
+
+ Lukas Hosek and Alexander Wilkie
+ Charles University in Prague, Czech Republic
+
+
+ Version: 1.4a, February 22nd, 2013
+
+Version history:
+
+1.4a February 22nd, 2013
+ Removed unnecessary and counter-intuitive solar radius parameters
+ from the interface of the colourspace sky dome initialisation functions.
+
+1.4 February 11th, 2013
+ Fixed a bug which caused the relative brightness of the solar disc
+ and the sky dome to be off by a factor of about 6. The sun was too
+ bright: this affected both normal and alien sun scenarios. The
+ coefficients of the solar radiance function were changed to fix this.
+
+1.3 January 21st, 2013 (not released to the public)
+ Added support for solar discs that are not exactly the same size as
+ the terrestrial sun. Also added support for suns with a different
+ emission spectrum ("Alien World" functionality).
+
+1.2a December 18th, 2012
+ Fixed a mistake and some inaccuracies in the solar radiance function
+ explanations found in ArHosekSkyModel.h. The actual source code is
+ unchanged compared to version 1.2.
+
+1.2 December 17th, 2012
+ Native RGB data and a solar radiance function that matches the turbidity
+ conditions were added.
+
+1.1 September 2012
+ The coefficients of the spectral model are now scaled so that the output
+ is given in physical units: W / (m^-2 * sr * nm). Also, the output of the
+ XYZ model is now no longer scaled to the range [0...1]. Instead, it is
+ the result of a simple conversion from spectral data via the CIE 2 degree
+ standard observer matching functions. Therefore, after multiplication
+ with 683 lm / W, the Y channel now corresponds to luminance in lm.
+
+1.0 May 11th, 2012
+ Initial release.
+
+
+Please visit http://cgg.mff.cuni.cz/projects/SkylightModelling/ to check if
+an updated version of this code has been published!
+
+============================================================================ */
+
+CCL_NAMESPACE_BEGIN
+
+/*
+
+This file contains the coefficient data for the XYZ colour space version of
+the model.
+
+*/
+
+// Uses Sep 9 pattern / Aug 23 mean dataset
+
+double datasetXYZ1[] =
+{
+ // albedo 0, turbidity 1
+ -1.117001e+000,
+ -1.867262e-001,
+ -1.113505e+001,
+ 1.259865e+001,
+ -3.937339e-002,
+ 1.167571e+000,
+ 7.100686e-003,
+ 3.592678e+000,
+ 6.083296e-001,
+ -1.152006e+000,
+ -1.926669e-001,
+ 6.152049e+000,
+ -4.770802e+000,
+ -8.704701e-002,
+ 7.483626e-001,
+ 3.372718e-002,
+ 4.464592e+000,
+ 4.036546e-001,
+ -1.072371e+000,
+ -2.696632e-001,
+ 2.816168e-001,
+ 1.820571e+000,
+ -3.742666e-001,
+ 2.080607e+000,
+ -7.675295e-002,
+ -2.835366e+000,
+ 1.129329e+000,
+ -1.109935e+000,
+ -1.532764e-001,
+ 1.198787e+000,
+ -9.015183e-001,
+ 5.173015e-003,
+ 5.749178e-001,
+ 1.075633e-001,
+ 4.387949e+000,
+ 2.650413e-001,
+ -1.052297e+000,
+ -2.229452e-001,
+ 1.952347e+000,
+ 5.727205e-001,
+ -4.885070e+000,
+ 1.984016e+000,
+ -1.106197e-001,
+ -4.898361e-001,
+ 8.907873e-001,
+ -1.070108e+000,
+ -1.600465e-001,
+ 1.593886e+000,
+ -4.479251e-005,
+ -3.306541e+000,
+ 9.390193e-001,
+ 9.513168e-002,
+ 2.343583e+000,
+ 5.335404e-001,
+ // albedo 0, turbidity 2
+ -1.113253e+000,
+ -1.699600e-001,
+ -1.038822e+001,
+ 1.137513e+001,
+ -4.040911e-002,
+ 1.037455e+000,
+ 4.991792e-002,
+ 4.801919e+000,
+ 6.302710e-001,
+ -1.135747e+000,
+ -1.678594e-001,
+ 4.970755e+000,
+ -4.430230e+000,
+ -6.657408e-002,
+ 3.636161e-001,
+ 1.558009e-001,
+ 6.013370e+000,
+ 3.959601e-001,
+ -1.095892e+000,
+ -2.732595e-001,
+ 7.666496e-001,
+ 1.350731e+000,
+ -4.401401e-001,
+ 2.470135e+000,
+ -1.707929e-001,
+ -3.260793e+000,
+ 1.170337e+000,
+ -1.073668e+000,
+ -2.603929e-002,
+ -1.944589e-001,
+ 4.575207e-001,
+ 6.878164e-001,
+ -1.390770e-001,
+ 3.690299e-001,
+ 7.885781e+000,
+ 1.877694e-001,
+ -1.070091e+000,
+ -2.798957e-001,
+ 2.338478e+000,
+ -2.647221e+000,
+ -7.387808e+000,
+ 2.329210e+000,
+ -1.644639e-001,
+ -2.003710e+000,
+ 9.874527e-001,
+ -1.067120e+000,
+ -1.418866e-001,
+ 1.254090e+000,
+ 6.053048e+000,
+ -2.918892e+000,
+ 5.322812e-001,
+ 1.613053e-001,
+ 3.018161e+000,
+ 5.274090e-001,
+ // albedo 0, turbidity 3
+ -1.129483e+000,
+ -1.890619e-001,
+ -9.065101e+000,
+ 9.659923e+000,
+ -3.607819e-002,
+ 8.314359e-001,
+ 8.181661e-002,
+ 4.768868e+000,
+ 6.339777e-001,
+ -1.146420e+000,
+ -1.883579e-001,
+ 3.309173e+000,
+ -3.127882e+000,
+ -6.938176e-002,
+ 3.987113e-001,
+ 1.400581e-001,
+ 6.283042e+000,
+ 5.267076e-001,
+ -1.128348e+000,
+ -2.641305e-001,
+ 1.223176e+000,
+ 5.514952e-002,
+ -3.490649e-001,
+ 1.997784e+000,
+ -4.123709e-002,
+ -2.251251e+000,
+ 9.483466e-001,
+ -1.025820e+000,
+ 1.404690e-002,
+ -1.187406e+000,
+ 2.729900e+000,
+ 5.877588e-001,
+ -2.761140e-001,
+ 4.602633e-001,
+ 8.305125e+000,
+ 3.945001e-001,
+ -1.083957e+000,
+ -2.606679e-001,
+ 2.207108e+000,
+ -7.202803e+000,
+ -5.968103e+000,
+ 2.129455e+000,
+ -7.789512e-002,
+ -1.137688e+000,
+ 8.871769e-001,
+ -1.062465e+000,
+ -1.512189e-001,
+ 1.042881e+000,
+ 1.427839e+001,
+ -4.242214e+000,
+ 4.038100e-001,
+ 1.997780e-001,
+ 2.814449e+000,
+ 5.803196e-001,
+ // albedo 0, turbidity 4
+ -1.175099e+000,
+ -2.410789e-001,
+ -1.108587e+001,
+ 1.133404e+001,
+ -1.819300e-002,
+ 6.772942e-001,
+ 9.605043e-002,
+ 4.231166e+000,
+ 6.239972e-001,
+ -1.224207e+000,
+ -2.883527e-001,
+ 3.002206e+000,
+ -2.649612e+000,
+ -4.795418e-002,
+ 4.984398e-001,
+ 3.251434e-002,
+ 4.851611e+000,
+ 6.551019e-001,
+ -1.136955e+000,
+ -2.423048e-001,
+ 1.058823e+000,
+ -2.489236e-001,
+ -2.462179e-001,
+ 1.933140e+000,
+ 9.106828e-002,
+ -1.905869e-001,
+ 8.171065e-001,
+ -1.014535e+000,
+ -8.262500e-003,
+ -1.448017e+000,
+ 2.295788e+000,
+ 3.510334e-001,
+ -1.477418e+000,
+ 5.432449e-001,
+ 5.762796e+000,
+ 4.908751e-001,
+ -1.070666e+000,
+ -2.379780e-001,
+ 1.844589e+000,
+ -5.442448e+000,
+ -4.012768e+000,
+ 2.945275e+000,
+ 9.854725e-003,
+ 8.455959e-002,
+ 8.145030e-001,
+ -1.071525e+000,
+ -1.777132e-001,
+ 8.076590e-001,
+ 9.925865e+000,
+ -3.324623e+000,
+ -6.367437e-001,
+ 2.844581e-001,
+ 2.248384e+000,
+ 6.544022e-001,
+ // albedo 0, turbidity 5
+ -1.218818e+000,
+ -2.952382e-001,
+ -1.345975e+001,
+ 1.347153e+001,
+ -6.814585e-003,
+ 5.079068e-001,
+ 1.197230e-001,
+ 3.776949e+000,
+ 5.836961e-001,
+ -1.409868e+000,
+ -5.114330e-001,
+ 2.776539e+000,
+ -2.039001e+000,
+ -2.673769e-002,
+ 4.145288e-001,
+ 7.829342e-004,
+ 2.275883e+000,
+ 6.629691e-001,
+ -1.069151e+000,
+ -9.434247e-002,
+ 7.293972e-001,
+ -1.222473e+000,
+ -1.533461e-001,
+ 2.160357e+000,
+ 4.626837e-002,
+ 3.852415e+000,
+ 8.593570e-001,
+ -1.021306e+000,
+ -1.149551e-001,
+ -1.108414e+000,
+ 4.178343e+000,
+ 4.013665e-001,
+ -2.222814e+000,
+ 6.929462e-001,
+ 1.392652e+000,
+ 4.401662e-001,
+ -1.074251e+000,
+ -2.224002e-001,
+ 1.372356e+000,
+ -8.858704e+000,
+ -3.922660e+000,
+ 3.020018e+000,
+ -1.458724e-002,
+ 1.511186e+000,
+ 8.288064e-001,
+ -1.062048e+000,
+ -1.526582e-001,
+ 4.921067e-001,
+ 1.485522e+001,
+ -3.229936e+000,
+ -8.426604e-001,
+ 3.916243e-001,
+ 2.678994e+000,
+ 6.689264e-001,
+ // albedo 0, turbidity 6
+ -1.257023e+000,
+ -3.364700e-001,
+ -1.527795e+001,
+ 1.504223e+001,
+ 2.717715e-003,
+ 3.029910e-001,
+ 1.636851e-001,
+ 3.561663e+000,
+ 5.283161e-001,
+ -1.635124e+000,
+ -7.329993e-001,
+ 3.523939e+000,
+ -2.566337e+000,
+ -1.902543e-002,
+ 5.505483e-001,
+ -6.242176e-002,
+ 1.065992e+000,
+ 6.654236e-001,
+ -9.295823e-001,
+ 4.845834e-002,
+ -2.992990e-001,
+ -2.001327e-001,
+ -8.019339e-002,
+ 1.807806e+000,
+ 9.020277e-002,
+ 5.095372e+000,
+ 8.639936e-001,
+ -1.093740e+000,
+ -2.148608e-001,
+ -5.216240e-001,
+ 2.119777e+000,
+ 9.506454e-002,
+ -1.831439e+000,
+ 6.961204e-001,
+ 1.102084e-001,
+ 4.384319e-001,
+ -1.044181e+000,
+ -1.849257e-001,
+ 9.071246e-001,
+ -4.648901e+000,
+ -2.279385e+000,
+ 2.356502e+000,
+ -4.169147e-002,
+ 1.932557e+000,
+ 8.296550e-001,
+ -1.061451e+000,
+ -1.458745e-001,
+ 2.952267e-001,
+ 8.967214e+000,
+ -3.726228e+000,
+ -5.022316e-001,
+ 5.684877e-001,
+ 3.102347e+000,
+ 6.658443e-001,
+ // albedo 0, turbidity 7
+ -1.332391e+000,
+ -4.127769e-001,
+ -9.328643e+000,
+ 9.046194e+000,
+ 3.457775e-003,
+ 3.377425e-001,
+ 1.530909e-001,
+ 3.301209e+000,
+ 4.997917e-001,
+ -1.932002e+000,
+ -9.947777e-001,
+ -2.042329e+000,
+ 3.586940e+000,
+ -5.642182e-002,
+ 8.130478e-001,
+ -8.195988e-002,
+ 1.118294e-001,
+ 5.617231e-001,
+ -8.707374e-001,
+ 1.286999e-001,
+ 1.820054e+000,
+ -4.674706e+000,
+ 3.317471e-003,
+ 5.919018e-001,
+ 1.975278e-001,
+ 6.686519e+000,
+ 9.631727e-001,
+ -1.070378e+000,
+ -3.030579e-001,
+ -9.041938e-001,
+ 6.200201e+000,
+ 1.232207e-001,
+ -3.650628e-001,
+ 5.029403e-001,
+ -2.903162e+000,
+ 3.811408e-001,
+ -1.063035e+000,
+ -1.637545e-001,
+ 5.853072e-001,
+ -7.889906e+000,
+ -1.200641e+000,
+ 1.035018e+000,
+ 1.192093e-001,
+ 3.267054e+000,
+ 8.416151e-001,
+ -1.053655e+000,
+ -1.562286e-001,
+ 2.423683e-001,
+ 1.128575e+001,
+ -4.363262e+000,
+ -7.314160e-002,
+ 5.642088e-001,
+ 2.514023e+000,
+ 6.670457e-001,
+ // albedo 0, turbidity 8
+ -1.366112e+000,
+ -4.718287e-001,
+ -7.876222e+000,
+ 7.746900e+000,
+ -9.182309e-003,
+ 4.716076e-001,
+ 8.320252e-002,
+ 3.165603e+000,
+ 5.392334e-001,
+ -2.468204e+000,
+ -1.336340e+000,
+ -5.386723e+000,
+ 7.072672e+000,
+ -8.329266e-002,
+ 8.636876e-001,
+ -1.978177e-002,
+ -1.326218e-001,
+ 2.979222e-001,
+ -9.653522e-001,
+ -2.373416e-002,
+ 1.810250e+000,
+ -6.467262e+000,
+ 1.410706e-001,
+ -4.753717e-001,
+ 3.003095e-001,
+ 6.551163e+000,
+ 1.151083e+000,
+ -8.943186e-001,
+ -2.487152e-001,
+ -2.308960e-001,
+ 8.512648e+000,
+ 1.298402e-001,
+ 1.034705e+000,
+ 2.303509e-001,
+ -3.924095e+000,
+ 2.982717e-001,
+ -1.146999e+000,
+ -2.318784e-001,
+ 8.992419e-002,
+ -9.933614e+000,
+ -8.860920e-001,
+ -3.071656e-002,
+ 2.852012e-001,
+ 3.046199e+000,
+ 8.599001e-001,
+ -1.032399e+000,
+ -1.645145e-001,
+ 2.683599e-001,
+ 1.327701e+001,
+ -4.407670e+000,
+ 7.709869e-002,
+ 4.951727e-001,
+ 1.957277e+000,
+ 6.630943e-001,
+ // albedo 0, turbidity 9
+ -1.469070e+000,
+ -6.135092e-001,
+ -6.506263e+000,
+ 6.661315e+000,
+ -3.835383e-002,
+ 7.150413e-001,
+ 7.784318e-003,
+ 2.820577e+000,
+ 6.756784e-001,
+ -2.501583e+000,
+ -1.247404e+000,
+ -1.523462e+001,
+ 1.633191e+001,
+ -1.204803e-002,
+ 5.896471e-001,
+ -2.002023e-002,
+ 1.144647e+000,
+ 6.177874e-002,
+ -2.438672e+000,
+ -1.127291e+000,
+ 5.731172e+000,
+ -1.021350e+001,
+ 6.165610e-002,
+ -7.752641e-001,
+ 4.708254e-001,
+ 4.176847e+000,
+ 1.200881e+000,
+ -1.513427e-001,
+ 9.792731e-002,
+ -1.612349e+000,
+ 9.814289e+000,
+ 5.188921e-002,
+ 1.716403e+000,
+ -7.039255e-002,
+ -2.815115e+000,
+ 3.291874e-001,
+ -1.318511e+000,
+ -3.650554e-001,
+ 4.221268e-001,
+ -9.294529e+000,
+ -4.397520e-002,
+ -8.100625e-001,
+ 3.742719e-001,
+ 1.834166e+000,
+ 8.223450e-001,
+ -1.016009e+000,
+ -1.820264e-001,
+ 1.278426e-001,
+ 1.182696e+001,
+ -4.801528e+000,
+ 4.947899e-001,
+ 4.660378e-001,
+ 1.601254e+000,
+ 6.702359e-001,
+ // albedo 0, turbidity 10
+ -1.841310e+000,
+ -9.781779e-001,
+ -4.610903e+000,
+ 4.824662e+000,
+ -5.100806e-002,
+ 6.463776e-001,
+ -6.377724e-006,
+ 2.216875e+000,
+ 8.618530e-001,
+ -2.376373e+000,
+ -1.108657e+000,
+ -1.489799e+001,
+ 1.546458e+001,
+ 4.091025e-002,
+ 9.761780e-002,
+ -1.048958e-002,
+ 2.165834e+000,
+ -1.609171e-001,
+ -4.710318e+000,
+ -2.261963e+000,
+ 6.947327e+000,
+ -1.034828e+001,
+ -1.325542e-001,
+ 7.508674e-001,
+ 2.247553e-001,
+ 2.873142e+000,
+ 1.297100e+000,
+ 2.163750e-001,
+ -1.944345e-001,
+ -2.437860e+000,
+ 1.011314e+001,
+ 4.450500e-001,
+ 3.111492e-001,
+ 2.751323e-001,
+ -1.627906e+000,
+ 2.531213e-001,
+ -1.258794e+000,
+ -3.524641e-001,
+ 8.425444e-001,
+ -1.085313e+001,
+ -1.154381e+000,
+ -4.638014e-001,
+ -2.781115e-003,
+ 4.344498e-001,
+ 8.507091e-001,
+ -1.018938e+000,
+ -1.804153e-001,
+ -6.354054e-002,
+ 1.573150e+001,
+ -4.386999e+000,
+ 6.211115e-001,
+ 5.294648e-001,
+ 1.580749e+000,
+ 6.586655e-001,
+ // albedo 1, turbidity 1
+ -1.116416e+000,
+ -1.917524e-001,
+ -1.068233e+001,
+ 1.222221e+001,
+ -3.668978e-002,
+ 1.054022e+000,
+ 1.592132e-002,
+ 3.180583e+000,
+ 5.627370e-001,
+ -1.132341e+000,
+ -1.671286e-001,
+ 5.976499e+000,
+ -4.227366e+000,
+ -9.542489e-002,
+ 8.664938e-001,
+ 8.351793e-003,
+ 4.876068e+000,
+ 4.492779e-001,
+ -1.087635e+000,
+ -3.173679e-001,
+ 4.314407e-001,
+ 1.100555e+000,
+ -4.410057e-001,
+ 1.677253e+000,
+ -3.005925e-002,
+ -4.201249e+000,
+ 1.070902e+000,
+ -1.083031e+000,
+ -8.847705e-002,
+ 1.291773e+000,
+ 4.546776e-001,
+ 3.091894e-001,
+ 7.261760e-001,
+ 4.203659e-002,
+ 5.990615e+000,
+ 3.704756e-001,
+ -1.057899e+000,
+ -2.246706e-001,
+ 2.329563e+000,
+ -1.219656e+000,
+ -5.335260e+000,
+ 8.545378e-001,
+ -3.906209e-002,
+ -9.025499e-001,
+ 7.797348e-001,
+ -1.073305e+000,
+ -1.522553e-001,
+ 1.767063e+000,
+ 1.904280e+000,
+ -3.101673e+000,
+ 3.995856e-001,
+ 2.905192e-002,
+ 2.563977e+000,
+ 5.753067e-001,
+ // albedo 1, turbidity 2
+ -1.113674e+000,
+ -1.759694e-001,
+ -9.754125e+000,
+ 1.087391e+001,
+ -3.841093e-002,
+ 9.524272e-001,
+ 5.680219e-002,
+ 4.227034e+000,
+ 6.029571e-001,
+ -1.126496e+000,
+ -1.680281e-001,
+ 5.332352e+000,
+ -4.575579e+000,
+ -6.761755e-002,
+ 3.295335e-001,
+ 1.194896e-001,
+ 5.570901e+000,
+ 4.536185e-001,
+ -1.103074e+000,
+ -2.681801e-001,
+ 6.571479e-002,
+ 2.396522e+000,
+ -4.551280e-001,
+ 2.466331e+000,
+ -1.232022e-001,
+ -3.023201e+000,
+ 1.086379e+000,
+ -1.053299e+000,
+ -2.697173e-002,
+ 8.379121e-001,
+ -9.681458e-001,
+ 5.890692e-001,
+ -4.872027e-001,
+ 2.936929e-001,
+ 7.510139e+000,
+ 3.079122e-001,
+ -1.079553e+000,
+ -2.710448e-001,
+ 2.462379e+000,
+ -3.713554e-001,
+ -8.534512e+000,
+ 1.828242e+000,
+ -1.686398e-001,
+ -1.961340e+000,
+ 8.941077e-001,
+ -1.069741e+000,
+ -1.396394e-001,
+ 1.657868e+000,
+ 3.236313e+000,
+ -2.706344e+000,
+ -2.948122e-001,
+ 1.314816e-001,
+ 2.868457e+000,
+ 5.413403e-001,
+ // albedo 1, turbidity 3
+ -1.131649e+000,
+ -1.954455e-001,
+ -7.751595e+000,
+ 8.685861e+000,
+ -4.910871e-002,
+ 8.992952e-001,
+ 4.710143e-002,
+ 4.254818e+000,
+ 6.821116e-001,
+ -1.156689e+000,
+ -1.884324e-001,
+ 3.163519e+000,
+ -3.091522e+000,
+ -6.613927e-002,
+ -2.575883e-002,
+ 1.640065e-001,
+ 6.073643e+000,
+ 4.453468e-001,
+ -1.079224e+000,
+ -2.621389e-001,
+ 9.446437e-001,
+ 1.448479e+000,
+ -3.969384e-001,
+ 2.626638e+000,
+ -8.101186e-002,
+ -3.016355e+000,
+ 1.076295e+000,
+ -1.080832e+000,
+ 1.033057e-002,
+ -3.500156e-001,
+ -3.281419e-002,
+ 5.655512e-001,
+ -1.156742e+000,
+ 4.534710e-001,
+ 8.774122e+000,
+ 2.772869e-001,
+ -1.051202e+000,
+ -2.679975e-001,
+ 2.719109e+000,
+ -2.190316e+000,
+ -6.878798e+000,
+ 2.250481e+000,
+ -2.030252e-001,
+ -2.026527e+000,
+ 9.701096e-001,
+ -1.089849e+000,
+ -1.598589e-001,
+ 1.564748e+000,
+ 6.869187e+000,
+ -3.053670e+000,
+ -6.110435e-001,
+ 1.644472e-001,
+ 2.370452e+000,
+ 5.511770e-001,
+ // albedo 1, turbidity 4
+ -1.171419e+000,
+ -2.429746e-001,
+ -8.991334e+000,
+ 9.571216e+000,
+ -2.772861e-002,
+ 6.688262e-001,
+ 7.683478e-002,
+ 3.785611e+000,
+ 6.347635e-001,
+ -1.228554e+000,
+ -2.917562e-001,
+ 2.753986e+000,
+ -2.491780e+000,
+ -4.663434e-002,
+ 3.118303e-001,
+ 7.546506e-002,
+ 4.463096e+000,
+ 5.955071e-001,
+ -1.093124e+000,
+ -2.447767e-001,
+ 9.097406e-001,
+ 5.448296e-001,
+ -2.957824e-001,
+ 2.024167e+000,
+ -5.152333e-004,
+ -1.069081e+000,
+ 9.369565e-001,
+ -1.056994e+000,
+ 1.569507e-002,
+ -8.217491e-001,
+ 1.870818e+000,
+ 7.061930e-001,
+ -1.483928e+000,
+ 5.978206e-001,
+ 6.864902e+000,
+ 3.673332e-001,
+ -1.054871e+000,
+ -2.758129e-001,
+ 2.712807e+000,
+ -5.950110e+000,
+ -6.554039e+000,
+ 2.447523e+000,
+ -1.895171e-001,
+ -1.454292e+000,
+ 9.131738e-001,
+ -1.100218e+000,
+ -1.746241e-001,
+ 1.438505e+000,
+ 1.115481e+001,
+ -3.266076e+000,
+ -8.837357e-001,
+ 1.970100e-001,
+ 1.991595e+000,
+ 5.907821e-001,
+ // albedo 1, turbidity 5
+ -1.207267e+000,
+ -2.913610e-001,
+ -1.103767e+001,
+ 1.140724e+001,
+ -1.416800e-002,
+ 5.564047e-001,
+ 8.476262e-002,
+ 3.371255e+000,
+ 6.221335e-001,
+ -1.429698e+000,
+ -5.374218e-001,
+ 2.837524e+000,
+ -2.221936e+000,
+ -2.422337e-002,
+ 9.313758e-002,
+ 7.190250e-002,
+ 1.869022e+000,
+ 5.609035e-001,
+ -1.002274e+000,
+ -6.972810e-002,
+ 4.031308e-001,
+ -3.932997e-001,
+ -1.521923e-001,
+ 2.390646e+000,
+ -6.893990e-002,
+ 2.999661e+000,
+ 1.017843e+000,
+ -1.081168e+000,
+ -1.178666e-001,
+ -4.968080e-001,
+ 3.919299e+000,
+ 6.046866e-001,
+ -2.440615e+000,
+ 7.891538e-001,
+ 2.140835e+000,
+ 2.740470e-001,
+ -1.050727e+000,
+ -2.307688e-001,
+ 2.276396e+000,
+ -9.454407e+000,
+ -5.505176e+000,
+ 2.992620e+000,
+ -2.450942e-001,
+ 6.078372e-001,
+ 9.606765e-001,
+ -1.103752e+000,
+ -1.810202e-001,
+ 1.375044e+000,
+ 1.589095e+001,
+ -3.438954e+000,
+ -1.265669e+000,
+ 2.475172e-001,
+ 1.680768e+000,
+ 5.978056e-001,
+ // albedo 1, turbidity 6
+ -1.244324e+000,
+ -3.378542e-001,
+ -1.111001e+001,
+ 1.137784e+001,
+ -7.896794e-003,
+ 4.808023e-001,
+ 9.249904e-002,
+ 3.025816e+000,
+ 5.880239e-001,
+ -1.593165e+000,
+ -7.027621e-001,
+ 2.220896e+000,
+ -1.437709e+000,
+ -1.534738e-002,
+ 6.286958e-002,
+ 6.644555e-002,
+ 1.091727e+000,
+ 5.470080e-001,
+ -9.136506e-001,
+ 1.344874e-002,
+ 7.772636e-001,
+ -1.209396e+000,
+ -1.408978e-001,
+ 2.433718e+000,
+ -1.041938e-001,
+ 3.791244e+000,
+ 1.037916e+000,
+ -1.134968e+000,
+ -1.803315e-001,
+ -9.267335e-001,
+ 4.576670e+000,
+ 6.851928e-001,
+ -2.805000e+000,
+ 8.687208e-001,
+ 1.161483e+000,
+ 2.571688e-001,
+ -1.017037e+000,
+ -2.053943e-001,
+ 2.361640e+000,
+ -9.887818e+000,
+ -5.122889e+000,
+ 3.287088e+000,
+ -2.594102e-001,
+ 8.578927e-001,
+ 9.592340e-001,
+ -1.118723e+000,
+ -1.934942e-001,
+ 1.226023e+000,
+ 1.674140e+001,
+ -3.277335e+000,
+ -1.629809e+000,
+ 2.765232e-001,
+ 1.637713e+000,
+ 6.113963e-001,
+ // albedo 1, turbidity 7
+ -1.314779e+000,
+ -4.119915e-001,
+ -1.241150e+001,
+ 1.241578e+001,
+ 2.344284e-003,
+ 2.980837e-001,
+ 1.414613e-001,
+ 2.781731e+000,
+ 4.998556e-001,
+ -1.926199e+000,
+ -1.020038e+000,
+ 2.569200e+000,
+ -1.081159e+000,
+ -2.266833e-002,
+ 3.588668e-001,
+ 8.750078e-003,
+ -2.452171e-001,
+ 4.796758e-001,
+ -7.780002e-001,
+ 1.850647e-001,
+ 4.445456e-002,
+ -2.409297e+000,
+ -7.816346e-002,
+ 1.546790e+000,
+ -2.807227e-002,
+ 5.998176e+000,
+ 1.132396e+000,
+ -1.179326e+000,
+ -3.578330e-001,
+ -2.392933e-001,
+ 6.467883e+000,
+ 5.904596e-001,
+ -1.869975e+000,
+ 8.045839e-001,
+ -2.498121e+000,
+ 1.610633e-001,
+ -1.009956e+000,
+ -1.311896e-001,
+ 1.726577e+000,
+ -1.219356e+001,
+ -3.466239e+000,
+ 2.343602e+000,
+ -2.252205e-001,
+ 2.573681e+000,
+ 1.027109e+000,
+ -1.112460e+000,
+ -2.063093e-001,
+ 1.233051e+000,
+ 2.058946e+001,
+ -4.578074e+000,
+ -1.145643e+000,
+ 3.160192e-001,
+ 1.420159e+000,
+ 5.860212e-001,
+ // albedo 1, turbidity 8
+ -1.371689e+000,
+ -4.914196e-001,
+ -1.076610e+001,
+ 1.107405e+001,
+ -1.485077e-002,
+ 5.936218e-001,
+ 3.685482e-002,
+ 2.599968e+000,
+ 6.002204e-001,
+ -2.436997e+000,
+ -1.377939e+000,
+ 2.130141e-002,
+ 1.079593e+000,
+ -1.796232e-002,
+ -3.933248e-002,
+ 1.610711e-001,
+ -6.901181e-001,
+ 1.206416e-001,
+ -8.743368e-001,
+ 7.331370e-002,
+ 8.734259e-001,
+ -3.743126e+000,
+ -3.151167e-002,
+ 1.297596e+000,
+ -7.634926e-002,
+ 6.532873e+000,
+ 1.435737e+000,
+ -9.810197e-001,
+ -3.521634e-001,
+ -2.855205e-001,
+ 7.134674e+000,
+ 6.839748e-001,
+ -1.394841e+000,
+ 6.952036e-001,
+ -4.633104e+000,
+ -2.173401e-002,
+ -1.122958e+000,
+ -1.691536e-001,
+ 1.382360e+000,
+ -1.102913e+001,
+ -2.608171e+000,
+ 1.865111e+000,
+ -1.345154e-001,
+ 3.112342e+000,
+ 1.094134e+000,
+ -1.075586e+000,
+ -2.077415e-001,
+ 1.171477e+000,
+ 1.793270e+001,
+ -4.656858e+000,
+ -1.036839e+000,
+ 3.338295e-001,
+ 1.042793e+000,
+ 5.739374e-001,
+ // albedo 1, turbidity 9
+ -1.465871e+000,
+ -6.364486e-001,
+ -8.833718e+000,
+ 9.343650e+000,
+ -3.223600e-002,
+ 7.552848e-001,
+ -3.121341e-006,
+ 2.249164e+000,
+ 8.094662e-001,
+ -2.448924e+000,
+ -1.270878e+000,
+ -4.823703e+000,
+ 5.853058e+000,
+ -2.149127e-002,
+ 3.581132e-002,
+ -1.230276e-003,
+ 4.892553e-001,
+ -1.597657e-001,
+ -2.419809e+000,
+ -1.071337e+000,
+ 1.575648e+000,
+ -4.983580e+000,
+ 9.545185e-003,
+ 5.032615e-001,
+ 4.186266e-001,
+ 4.634147e+000,
+ 1.433517e+000,
+ -1.383278e-001,
+ -2.797095e-002,
+ -1.943067e-001,
+ 6.679623e+000,
+ 4.118280e-001,
+ -2.744289e-001,
+ -2.118722e-002,
+ -4.337025e+000,
+ 1.505072e-001,
+ -1.341872e+000,
+ -2.518572e-001,
+ 1.027009e+000,
+ -6.527103e+000,
+ -1.081271e+000,
+ 1.015465e+000,
+ 2.845789e-001,
+ 2.470371e+000,
+ 9.278120e-001,
+ -1.040640e+000,
+ -2.367454e-001,
+ 1.100744e+000,
+ 8.827253e+000,
+ -4.560794e+000,
+ -7.287017e-001,
+ 2.842503e-001,
+ 6.336593e-001,
+ 6.327335e-001,
+ // albedo 1, turbidity 10
+ -1.877993e+000,
+ -1.025135e+000,
+ -4.311037e+000,
+ 4.715016e+000,
+ -4.711631e-002,
+ 6.335844e-001,
+ -7.665398e-006,
+ 1.788017e+000,
+ 9.001409e-001,
+ -2.281540e+000,
+ -1.137668e+000,
+ -1.036869e+001,
+ 1.136254e+001,
+ 1.961739e-002,
+ -9.836174e-002,
+ -6.734567e-003,
+ 1.320918e+000,
+ -2.400807e-001,
+ -4.904054e+000,
+ -2.315781e+000,
+ 5.735999e+000,
+ -8.626257e+000,
+ -1.255643e-001,
+ 1.545446e+000,
+ 1.396860e-001,
+ 2.972897e+000,
+ 1.429934e+000,
+ 4.077067e-001,
+ -1.833688e-001,
+ -2.450939e+000,
+ 9.119433e+000,
+ 4.505361e-001,
+ -1.340828e+000,
+ 3.973690e-001,
+ -1.785370e+000,
+ 9.628711e-002,
+ -1.296052e+000,
+ -3.250526e-001,
+ 1.813294e+000,
+ -1.031485e+001,
+ -1.388690e+000,
+ 1.239733e+000,
+ -8.989196e-002,
+ -3.389637e-001,
+ 9.639560e-001,
+ -1.062181e+000,
+ -2.423444e-001,
+ 7.577592e-001,
+ 1.566938e+001,
+ -4.462264e+000,
+ -5.742810e-001,
+ 3.262259e-001,
+ 9.461672e-001,
+ 6.232887e-001,
+};
+
+double datasetXYZRad1[] =
+{
+ // albedo 0, turbidity 1
+ 1.560219e+000,
+ 1.417388e+000,
+ 1.206927e+000,
+ 1.091949e+001,
+ 5.931416e+000,
+ 7.304788e+000,
+ // albedo 0, turbidity 2
+ 1.533049e+000,
+ 1.560532e+000,
+ 3.685059e-001,
+ 1.355040e+001,
+ 5.543711e+000,
+ 7.792189e+000,
+ // albedo 0, turbidity 3
+ 1.471043e+000,
+ 1.746088e+000,
+ -9.299697e-001,
+ 1.720362e+001,
+ 5.473384e+000,
+ 8.336416e+000,
+ // albedo 0, turbidity 4
+ 1.355991e+000,
+ 2.109348e+000,
+ -3.295855e+000,
+ 2.264843e+001,
+ 5.454607e+000,
+ 9.304656e+000,
+ // albedo 0, turbidity 5
+ 1.244963e+000,
+ 2.547533e+000,
+ -5.841485e+000,
+ 2.756879e+001,
+ 5.576104e+000,
+ 1.043287e+001,
+ // albedo 0, turbidity 6
+ 1.175532e+000,
+ 2.784634e+000,
+ -7.212225e+000,
+ 2.975347e+001,
+ 6.472980e+000,
+ 1.092331e+001,
+ // albedo 0, turbidity 7
+ 1.082973e+000,
+ 3.118094e+000,
+ -8.934293e+000,
+ 3.186879e+001,
+ 8.473885e+000,
+ 1.174019e+001,
+ // albedo 0, turbidity 8
+ 9.692500e-001,
+ 3.349574e+000,
+ -1.003810e+001,
+ 3.147654e+001,
+ 1.338931e+001,
+ 1.272547e+001,
+ // albedo 0, turbidity 9
+ 8.547044e-001,
+ 3.151538e+000,
+ -9.095567e+000,
+ 2.554995e+001,
+ 2.273219e+001,
+ 1.410398e+001,
+ // albedo 0, turbidity 10
+ 7.580340e-001,
+ 2.311153e+000,
+ -5.170814e+000,
+ 1.229669e+001,
+ 3.686529e+001,
+ 1.598882e+001,
+ // albedo 1, turbidity 1
+ 1.664273e+000,
+ 1.574468e+000,
+ 1.422078e+000,
+ 9.768247e+000,
+ 1.447338e+001,
+ 1.644988e+001,
+ // albedo 1, turbidity 2
+ 1.638295e+000,
+ 1.719586e+000,
+ 5.786675e-001,
+ 1.239846e+001,
+ 1.415419e+001,
+ 1.728605e+001,
+ // albedo 1, turbidity 3
+ 1.572623e+000,
+ 1.921559e+000,
+ -7.714802e-001,
+ 1.609246e+001,
+ 1.420954e+001,
+ 1.825908e+001,
+ // albedo 1, turbidity 4
+ 1.468395e+000,
+ 2.211970e+000,
+ -2.845869e+000,
+ 2.075027e+001,
+ 1.524822e+001,
+ 1.937622e+001,
+ // albedo 1, turbidity 5
+ 1.355047e+000,
+ 2.556469e+000,
+ -4.960920e+000,
+ 2.460237e+001,
+ 1.648360e+001,
+ 2.065648e+001,
+ // albedo 1, turbidity 6
+ 1.291642e+000,
+ 2.742036e+000,
+ -6.061967e+000,
+ 2.602002e+001,
+ 1.819144e+001,
+ 2.116712e+001,
+ // albedo 1, turbidity 7
+ 1.194565e+000,
+ 2.972120e+000,
+ -7.295779e+000,
+ 2.691805e+001,
+ 2.124880e+001,
+ 2.201819e+001,
+ // albedo 1, turbidity 8
+ 1.083631e+000,
+ 3.047021e+000,
+ -7.766096e+000,
+ 2.496261e+001,
+ 2.744264e+001,
+ 2.291875e+001,
+ // albedo 1, turbidity 9
+ 9.707994e-001,
+ 2.736459e+000,
+ -6.308284e+000,
+ 1.760860e+001,
+ 3.776291e+001,
+ 2.392150e+001,
+ // albedo 1, turbidity 10
+ 8.574294e-001,
+ 1.865155e+000,
+ -2.364707e+000,
+ 4.337793e+000,
+ 5.092831e+001,
+ 2.523432e+001,
+};
+
+double datasetXYZ2[] =
+{
+ // albedo 0, turbidity 1
+ -1.127942e+000,
+ -1.905548e-001,
+ -1.252356e+001,
+ 1.375799e+001,
+ -3.624732e-002,
+ 1.055453e+000,
+ 1.385036e-002,
+ 4.176970e+000,
+ 5.928345e-001,
+ -1.155260e+000,
+ -1.778135e-001,
+ 6.216056e+000,
+ -5.254116e+000,
+ -8.787445e-002,
+ 8.434621e-001,
+ 4.025734e-002,
+ 6.195322e+000,
+ 3.111856e-001,
+ -1.125624e+000,
+ -3.217593e-001,
+ 5.043919e-001,
+ 1.686284e+000,
+ -3.536071e-001,
+ 1.476321e+000,
+ -7.899019e-002,
+ -4.522531e+000,
+ 1.271691e+000,
+ -1.081801e+000,
+ -1.033234e-001,
+ 9.995550e-001,
+ 7.482946e-003,
+ -6.776018e-002,
+ 1.463141e+000,
+ 9.492021e-002,
+ 5.612723e+000,
+ 1.298846e-001,
+ -1.075320e+000,
+ -2.402711e-001,
+ 2.141284e+000,
+ -1.203359e+000,
+ -4.945188e+000,
+ 1.437221e+000,
+ -8.096750e-002,
+ -1.028378e+000,
+ 1.004164e+000,
+ -1.073337e+000,
+ -1.516517e-001,
+ 1.639379e+000,
+ 2.304669e+000,
+ -3.214244e+000,
+ 1.286245e+000,
+ 5.613957e-002,
+ 2.480902e+000,
+ 4.999363e-001,
+ // albedo 0, turbidity 2
+ -1.128399e+000,
+ -1.857793e-001,
+ -1.089863e+001,
+ 1.172984e+001,
+ -3.768099e-002,
+ 9.439285e-001,
+ 4.869335e-002,
+ 4.845114e+000,
+ 6.119211e-001,
+ -1.114002e+000,
+ -1.399280e-001,
+ 4.963800e+000,
+ -4.685500e+000,
+ -7.780879e-002,
+ 4.049736e-001,
+ 1.586297e-001,
+ 7.770264e+000,
+ 3.449006e-001,
+ -1.185472e+000,
+ -3.403543e-001,
+ 6.588322e-001,
+ 1.133713e+000,
+ -4.118674e-001,
+ 2.061191e+000,
+ -1.882768e-001,
+ -4.372586e+000,
+ 1.223530e+000,
+ -1.002272e+000,
+ 2.000703e-002,
+ 7.073269e-002,
+ 1.485075e+000,
+ 5.005589e-001,
+ 4.301494e-001,
+ 3.626541e-001,
+ 7.921098e+000,
+ 1.574766e-001,
+ -1.121006e+000,
+ -3.007777e-001,
+ 2.242051e+000,
+ -4.571561e+000,
+ -7.761071e+000,
+ 2.053404e+000,
+ -1.524018e-001,
+ -1.886162e+000,
+ 1.018208e+000,
+ -1.058864e+000,
+ -1.358673e-001,
+ 1.389667e+000,
+ 8.633409e+000,
+ -3.437249e+000,
+ 7.295429e-001,
+ 1.514700e-001,
+ 2.842513e+000,
+ 5.014325e-001,
+ // albedo 0, turbidity 3
+ -1.144464e+000,
+ -2.043799e-001,
+ -1.020188e+001,
+ 1.071247e+001,
+ -3.256693e-002,
+ 7.860205e-001,
+ 6.872719e-002,
+ 4.824771e+000,
+ 6.259836e-001,
+ -1.170104e+000,
+ -2.118626e-001,
+ 4.391405e+000,
+ -4.198900e+000,
+ -7.111559e-002,
+ 3.890442e-001,
+ 1.024831e-001,
+ 6.282535e+000,
+ 5.365688e-001,
+ -1.129171e+000,
+ -2.552880e-001,
+ 2.238298e-001,
+ 7.314295e-001,
+ -3.562730e-001,
+ 1.881931e+000,
+ -3.078716e-002,
+ -1.039120e+000,
+ 9.096301e-001,
+ -1.042294e+000,
+ 4.450203e-003,
+ -5.116033e-001,
+ 2.627589e+000,
+ 6.098996e-001,
+ -1.264638e-001,
+ 4.325281e-001,
+ 7.080503e+000,
+ 4.583646e-001,
+ -1.082293e+000,
+ -2.723056e-001,
+ 2.065076e+000,
+ -8.143133e+000,
+ -7.892212e+000,
+ 2.142231e+000,
+ -7.106240e-002,
+ -1.122398e+000,
+ 8.338505e-001,
+ -1.071715e+000,
+ -1.426568e-001,
+ 1.095351e+000,
+ 1.729783e+001,
+ -3.851931e+000,
+ 4.360514e-001,
+ 2.114440e-001,
+ 2.970832e+000,
+ 5.944389e-001,
+ // albedo 0, turbidity 4
+ -1.195909e+000,
+ -2.590449e-001,
+ -1.191037e+001,
+ 1.207947e+001,
+ -1.589842e-002,
+ 6.297846e-001,
+ 9.054772e-002,
+ 4.285959e+000,
+ 5.933752e-001,
+ -1.245763e+000,
+ -3.316637e-001,
+ 4.293660e+000,
+ -3.694011e+000,
+ -4.699947e-002,
+ 4.843684e-001,
+ 2.130425e-002,
+ 4.097549e+000,
+ 6.530809e-001,
+ -1.148742e+000,
+ -1.902509e-001,
+ -2.393233e-001,
+ -2.441254e-001,
+ -2.610918e-001,
+ 1.846988e+000,
+ 3.532866e-002,
+ 2.660106e+000,
+ 8.358294e-001,
+ -1.016080e+000,
+ -7.444960e-002,
+ -5.053436e-001,
+ 4.388855e+000,
+ 6.054987e-001,
+ -1.208300e+000,
+ 5.817215e-001,
+ 2.543570e+000,
+ 4.726568e-001,
+ -1.072027e+000,
+ -2.101440e-001,
+ 1.518378e+000,
+ -1.060119e+001,
+ -6.016546e+000,
+ 2.649475e+000,
+ -5.166992e-002,
+ 1.571269e+000,
+ 8.344622e-001,
+ -1.072365e+000,
+ -1.511201e-001,
+ 7.478010e-001,
+ 1.900732e+001,
+ -3.950387e+000,
+ -3.473907e-001,
+ 3.797211e-001,
+ 2.782949e+000,
+ 6.296808e-001,
+ // albedo 0, turbidity 5
+ -1.239423e+000,
+ -3.136289e-001,
+ -1.351100e+001,
+ 1.349468e+001,
+ -7.070423e-003,
+ 5.012315e-001,
+ 1.106008e-001,
+ 3.803619e+000,
+ 5.577948e-001,
+ -1.452524e+000,
+ -5.676944e-001,
+ 2.993153e+000,
+ -2.277288e+000,
+ -2.168954e-002,
+ 3.056720e-001,
+ 1.152338e-002,
+ 1.852697e+000,
+ 6.427228e-001,
+ -1.061421e+000,
+ -4.590521e-002,
+ 6.057022e-001,
+ -1.096835e+000,
+ -1.504952e-001,
+ 2.344921e+000,
+ -5.491832e-002,
+ 5.268322e+000,
+ 9.082253e-001,
+ -1.042373e+000,
+ -1.769498e-001,
+ -1.075388e+000,
+ 3.831712e+000,
+ 3.154140e-001,
+ -2.416458e+000,
+ 7.909032e-001,
+ -1.492892e-002,
+ 3.854049e-001,
+ -1.064159e+000,
+ -1.892684e-001,
+ 1.438685e+000,
+ -8.166362e+000,
+ -3.616364e+000,
+ 3.275206e+000,
+ -1.203825e-001,
+ 2.039491e+000,
+ 8.688057e-001,
+ -1.070120e+000,
+ -1.569508e-001,
+ 4.124760e-001,
+ 1.399683e+001,
+ -3.547085e+000,
+ -1.046326e+000,
+ 4.973825e-001,
+ 2.791231e+000,
+ 6.503286e-001,
+ // albedo 0, turbidity 6
+ -1.283579e+000,
+ -3.609518e-001,
+ -1.335397e+001,
+ 1.315248e+001,
+ -4.431938e-004,
+ 3.769526e-001,
+ 1.429824e-001,
+ 3.573613e+000,
+ 4.998696e-001,
+ -1.657952e+000,
+ -7.627948e-001,
+ 1.958222e+000,
+ -7.949816e-001,
+ -2.882837e-002,
+ 5.356149e-001,
+ -5.191946e-002,
+ 8.869955e-001,
+ 6.263320e-001,
+ -9.527600e-001,
+ 6.494189e-002,
+ 5.361303e-001,
+ -2.129590e+000,
+ -9.258630e-002,
+ 1.604776e+000,
+ 5.067770e-002,
+ 6.376055e+000,
+ 9.138052e-001,
+ -1.080827e+000,
+ -2.523120e-001,
+ -7.154262e-001,
+ 4.120085e+000,
+ 1.878228e-001,
+ -1.492158e+000,
+ 6.881655e-001,
+ -1.446611e+000,
+ 4.040631e-001,
+ -1.054075e+000,
+ -1.665498e-001,
+ 9.191052e-001,
+ -6.636943e+000,
+ -1.894826e+000,
+ 2.107810e+000,
+ -3.680499e-002,
+ 2.655452e+000,
+ 8.413840e-001,
+ -1.061127e+000,
+ -1.448849e-001,
+ 2.667493e-001,
+ 1.034103e+001,
+ -4.285769e+000,
+ -3.874504e-001,
+ 5.998752e-001,
+ 3.132426e+000,
+ 6.652753e-001,
+ // albedo 0, turbidity 7
+ -1.347345e+000,
+ -4.287832e-001,
+ -9.305553e+000,
+ 9.133813e+000,
+ -3.173527e-003,
+ 3.977564e-001,
+ 1.151420e-001,
+ 3.320564e+000,
+ 4.998134e-001,
+ -1.927296e+000,
+ -9.901372e-001,
+ -2.593499e+000,
+ 4.087421e+000,
+ -5.833993e-002,
+ 8.158929e-001,
+ -4.681279e-002,
+ 2.423716e-001,
+ 4.938052e-001,
+ -9.470092e-001,
+ 7.325237e-002,
+ 2.064735e+000,
+ -5.167540e+000,
+ -1.313751e-002,
+ 4.832169e-001,
+ 1.126295e-001,
+ 6.970522e+000,
+ 1.035022e+000,
+ -1.022557e+000,
+ -2.762616e-001,
+ -9.375748e-001,
+ 6.696739e+000,
+ 2.200765e-001,
+ -1.133253e-001,
+ 5.492505e-001,
+ -3.109391e+000,
+ 3.321914e-001,
+ -1.087444e+000,
+ -1.836263e-001,
+ 6.225024e-001,
+ -8.576765e+000,
+ -1.107637e+000,
+ 7.859427e-001,
+ 9.910909e-002,
+ 3.112938e+000,
+ 8.596261e-001,
+ -1.051544e+000,
+ -1.546262e-001,
+ 2.371731e-001,
+ 1.200502e+001,
+ -4.527291e+000,
+ 7.268862e-002,
+ 5.571478e-001,
+ 2.532873e+000,
+ 6.662000e-001,
+ // albedo 0, turbidity 8
+ -1.375576e+000,
+ -4.840019e-001,
+ -8.121290e+000,
+ 8.058140e+000,
+ -1.445661e-002,
+ 5.123314e-001,
+ 5.813321e-002,
+ 3.203219e+000,
+ 5.442318e-001,
+ -2.325221e+000,
+ -1.241463e+000,
+ -7.063430e+000,
+ 8.741369e+000,
+ -7.829950e-002,
+ 8.844273e-001,
+ -3.471106e-002,
+ 1.740583e-001,
+ 2.814079e-001,
+ -1.228700e+000,
+ -2.013412e-001,
+ 2.949042e+000,
+ -7.371945e+000,
+ 1.071753e-001,
+ -2.491970e-001,
+ 2.265223e-001,
+ 6.391504e+000,
+ 1.172389e+000,
+ -7.601786e-001,
+ -1.680631e-001,
+ -7.584444e-001,
+ 8.541356e+000,
+ 8.222291e-002,
+ 6.729633e-001,
+ 3.206615e-001,
+ -3.700940e+000,
+ 2.710054e-001,
+ -1.191166e+000,
+ -2.672347e-001,
+ 2.927498e-001,
+ -9.713613e+000,
+ -4.783721e-001,
+ 2.352803e-001,
+ 2.161949e-001,
+ 2.691481e+000,
+ 8.745447e-001,
+ -1.030135e+000,
+ -1.653301e-001,
+ 2.263443e-001,
+ 1.296157e+001,
+ -4.650644e+000,
+ 7.055709e-003,
+ 5.091975e-001,
+ 2.000370e+000,
+ 6.603839e-001,
+ // albedo 0, turbidity 9
+ -1.508018e+000,
+ -6.460933e-001,
+ -6.402745e+000,
+ 6.545995e+000,
+ -3.750320e-002,
+ 6.921803e-001,
+ 3.309819e-003,
+ 2.797527e+000,
+ 6.978446e-001,
+ -2.333308e+000,
+ -1.167837e+000,
+ -1.746787e+001,
+ 1.868630e+001,
+ -8.948229e-003,
+ 5.621946e-001,
+ -3.402626e-002,
+ 1.217943e+000,
+ 1.149865e-002,
+ -2.665953e+000,
+ -1.226307e+000,
+ 7.169725e+000,
+ -1.159434e+001,
+ 3.583420e-002,
+ -3.074378e-001,
+ 3.412248e-001,
+ 4.422122e+000,
+ 1.283791e+000,
+ -9.705116e-002,
+ 8.312991e-002,
+ -2.160462e+000,
+ 1.028235e+001,
+ 3.543357e-002,
+ 1.032049e+000,
+ 1.058310e-001,
+ -2.972898e+000,
+ 2.418628e-001,
+ -1.329617e+000,
+ -3.699557e-001,
+ 5.560117e-001,
+ -9.730113e+000,
+ 9.938865e-002,
+ -3.071488e-001,
+ 2.510691e-001,
+ 1.777111e+000,
+ 8.705142e-001,
+ -1.019387e+000,
+ -1.893247e-001,
+ 1.194079e-001,
+ 1.239436e+001,
+ -4.799224e+000,
+ 2.940213e-001,
+ 4.841268e-001,
+ 1.529724e+000,
+ 6.582615e-001,
+ // albedo 0, turbidity 10
+ -1.896737e+000,
+ -1.005442e+000,
+ -6.411032e+000,
+ 6.548220e+000,
+ -3.227596e-002,
+ 5.717262e-001,
+ -8.115192e-006,
+ 2.296704e+000,
+ 9.000749e-001,
+ -2.411116e+000,
+ -1.225587e+000,
+ -1.753629e+001,
+ 1.829393e+001,
+ 1.247555e-002,
+ 2.364616e-001,
+ -5.114637e-003,
+ 1.603778e+000,
+ -2.224156e-001,
+ -4.707121e+000,
+ -2.074977e+000,
+ 7.942300e+000,
+ -1.132407e+001,
+ -5.415654e-002,
+ 5.446811e-001,
+ 1.032493e-001,
+ 4.010235e+000,
+ 1.369802e+000,
+ 1.010482e-001,
+ -4.013305e-001,
+ -2.674579e+000,
+ 9.779409e+000,
+ 1.782506e-001,
+ 7.053045e-001,
+ 4.200002e-001,
+ -2.400671e+000,
+ 1.953165e-001,
+ -1.243526e+000,
+ -3.391255e-001,
+ 8.848882e-001,
+ -9.789025e+000,
+ -3.997324e-001,
+ -9.546227e-001,
+ -1.044017e-001,
+ 6.010593e-001,
+ 8.714462e-001,
+ -1.014633e+000,
+ -1.730009e-001,
+ -7.738934e-002,
+ 1.390903e+001,
+ -4.847307e+000,
+ 1.076059e+000,
+ 5.685743e-001,
+ 1.572992e+000,
+ 6.561432e-001,
+ // albedo 1, turbidity 1
+ -1.122998e+000,
+ -1.881183e-001,
+ -1.030709e+001,
+ 1.158932e+001,
+ -4.079495e-002,
+ 9.603774e-001,
+ 3.079436e-002,
+ 4.009235e+000,
+ 5.060745e-001,
+ -1.134790e+000,
+ -1.539688e-001,
+ 5.478405e+000,
+ -4.217270e+000,
+ -1.043858e-001,
+ 7.165008e-001,
+ 1.524765e-002,
+ 6.473623e+000,
+ 4.207882e-001,
+ -1.134957e+000,
+ -3.513318e-001,
+ 7.393837e-001,
+ 1.354415e+000,
+ -4.764078e-001,
+ 1.690441e+000,
+ -5.492640e-002,
+ -5.563523e+000,
+ 1.145743e+000,
+ -1.058344e+000,
+ -5.758503e-002,
+ 1.168230e+000,
+ 3.269824e-001,
+ 1.795193e-001,
+ 7.849011e-001,
+ 7.441853e-002,
+ 6.904804e+000,
+ 2.818790e-001,
+ -1.075194e+000,
+ -2.355813e-001,
+ 2.463685e+000,
+ -1.536505e+000,
+ -7.505771e+000,
+ 9.619712e-001,
+ -6.465851e-002,
+ -1.355492e+000,
+ 8.489847e-001,
+ -1.079030e+000,
+ -1.465328e-001,
+ 1.773838e+000,
+ 2.310131e+000,
+ -3.136065e+000,
+ 3.507952e-001,
+ 4.435014e-002,
+ 2.819225e+000,
+ 5.689008e-001,
+ // albedo 1, turbidity 2
+ -1.125833e+000,
+ -1.870849e-001,
+ -9.555833e+000,
+ 1.059713e+001,
+ -4.225402e-002,
+ 9.164663e-001,
+ 4.338796e-002,
+ 4.400980e+000,
+ 6.056119e-001,
+ -1.127440e+000,
+ -1.551891e-001,
+ 4.755621e+000,
+ -4.408806e+000,
+ -7.851763e-002,
+ 2.268284e-001,
+ 1.460070e-001,
+ 7.048003e+000,
+ 3.525997e-001,
+ -1.143788e+000,
+ -3.170178e-001,
+ 5.480669e-001,
+ 2.041830e+000,
+ -4.532139e-001,
+ 2.302233e+000,
+ -1.887419e-001,
+ -4.489221e+000,
+ 1.250967e+000,
+ -1.032849e+000,
+ 7.376031e-003,
+ 5.666073e-001,
+ -2.312203e-001,
+ 4.862894e-001,
+ -1.748294e-001,
+ 3.572870e-001,
+ 8.380522e+000,
+ 1.302333e-001,
+ -1.093728e+000,
+ -2.786977e-001,
+ 2.641272e+000,
+ -1.507494e+000,
+ -8.731243e+000,
+ 1.684055e+000,
+ -2.023377e-001,
+ -2.176398e+000,
+ 1.013249e+000,
+ -1.076578e+000,
+ -1.456205e-001,
+ 1.693935e+000,
+ 2.945003e+000,
+ -2.822673e+000,
+ -2.520033e-001,
+ 1.517034e-001,
+ 2.649109e+000,
+ 5.179094e-001,
+ // albedo 1, turbidity 3
+ -1.146417e+000,
+ -2.119353e-001,
+ -7.187525e+000,
+ 8.058599e+000,
+ -5.256438e-002,
+ 8.375733e-001,
+ 3.887093e-002,
+ 4.222111e+000,
+ 6.695347e-001,
+ -1.173674e+000,
+ -2.067025e-001,
+ 2.899359e+000,
+ -2.804918e+000,
+ -8.473899e-002,
+ 3.944225e-003,
+ 1.340641e-001,
+ 6.160887e+000,
+ 4.527141e-001,
+ -1.090098e+000,
+ -2.599633e-001,
+ 9.180856e-001,
+ 1.092710e+000,
+ -4.215019e-001,
+ 2.427660e+000,
+ -9.277667e-002,
+ -2.123523e+000,
+ 1.058159e+000,
+ -1.084460e+000,
+ 8.056181e-003,
+ -2.453510e-001,
+ 6.619567e-001,
+ 4.668118e-001,
+ -9.526719e-001,
+ 4.648454e-001,
+ 8.001572e+000,
+ 3.054194e-001,
+ -1.053728e+000,
+ -2.765784e-001,
+ 2.792388e+000,
+ -3.489517e+000,
+ -8.150535e+000,
+ 2.195757e+000,
+ -2.017234e-001,
+ -2.128017e+000,
+ 9.326589e-001,
+ -1.099348e+000,
+ -1.593939e-001,
+ 1.568292e+000,
+ 7.247853e+000,
+ -2.933000e+000,
+ -5.890481e-001,
+ 1.724440e-001,
+ 2.433484e+000,
+ 5.736558e-001,
+ // albedo 1, turbidity 4
+ -1.185983e+000,
+ -2.581184e-001,
+ -7.761056e+000,
+ 8.317053e+000,
+ -3.351773e-002,
+ 6.676667e-001,
+ 5.941733e-002,
+ 3.820727e+000,
+ 6.324032e-001,
+ -1.268591e+000,
+ -3.398067e-001,
+ 2.348503e+000,
+ -2.023779e+000,
+ -5.368458e-002,
+ 1.083282e-001,
+ 8.402858e-002,
+ 3.910254e+000,
+ 5.577481e-001,
+ -1.071353e+000,
+ -1.992459e-001,
+ 7.878387e-001,
+ 1.974702e-001,
+ -3.033058e-001,
+ 2.335298e+000,
+ -8.205259e-002,
+ 7.954454e-001,
+ 9.972312e-001,
+ -1.089513e+000,
+ -3.104364e-002,
+ -5.995746e-001,
+ 2.330281e+000,
+ 6.581939e-001,
+ -1.821467e+000,
+ 6.679973e-001,
+ 5.090195e+000,
+ 3.125161e-001,
+ -1.040214e+000,
+ -2.570934e-001,
+ 2.660489e+000,
+ -6.506045e+000,
+ -7.053586e+000,
+ 2.763153e+000,
+ -2.433632e-001,
+ -7.648176e-001,
+ 9.452937e-001,
+ -1.116052e+000,
+ -1.831993e-001,
+ 1.457694e+000,
+ 1.163608e+001,
+ -3.216426e+000,
+ -1.045594e+000,
+ 2.285002e-001,
+ 1.817407e+000,
+ 5.810396e-001,
+ // albedo 1, turbidity 5
+ -1.230134e+000,
+ -3.136264e-001,
+ -8.909301e+000,
+ 9.145006e+000,
+ -1.055387e-002,
+ 4.467317e-001,
+ 1.016826e-001,
+ 3.342964e+000,
+ 5.633840e-001,
+ -1.442907e+000,
+ -5.593147e-001,
+ 2.156447e+000,
+ -1.241657e+000,
+ -3.512130e-002,
+ 3.050274e-001,
+ 1.797175e-002,
+ 1.742358e+000,
+ 5.977153e-001,
+ -1.027627e+000,
+ -6.481539e-002,
+ 4.351975e-001,
+ -1.051677e+000,
+ -2.030672e-001,
+ 1.942684e+000,
+ -3.615993e-002,
+ 4.050266e+000,
+ 9.801624e-001,
+ -1.082110e+000,
+ -1.578209e-001,
+ -3.397511e-001,
+ 4.163851e+000,
+ 6.650368e-001,
+ -1.841730e+000,
+ 7.062544e-001,
+ 6.789881e-001,
+ 3.172623e-001,
+ -1.047447e+000,
+ -1.977560e-001,
+ 2.183364e+000,
+ -8.805249e+000,
+ -5.483962e+000,
+ 2.551309e+000,
+ -1.779640e-001,
+ 1.519501e+000,
+ 9.212536e-001,
+ -1.111853e+000,
+ -1.935736e-001,
+ 1.394408e+000,
+ 1.392405e+001,
+ -3.465430e+000,
+ -1.068432e+000,
+ 2.388671e-001,
+ 1.455336e+000,
+ 6.233425e-001,
+ // albedo 1, turbidity 6
+ -1.262238e+000,
+ -3.546341e-001,
+ -1.008703e+001,
+ 1.020084e+001,
+ -1.852187e-003,
+ 3.537580e-001,
+ 1.239199e-001,
+ 3.056093e+000,
+ 5.132052e-001,
+ -1.613810e+000,
+ -7.355585e-001,
+ 2.760123e+000,
+ -1.685253e+000,
+ -2.517552e-002,
+ 2.914258e-001,
+ 4.743448e-003,
+ 8.689596e-001,
+ 5.674192e-001,
+ -9.462336e-001,
+ 2.950767e-002,
+ -2.613816e-001,
+ -7.398653e-001,
+ -1.315558e-001,
+ 1.901042e+000,
+ -6.447844e-002,
+ 4.969341e+000,
+ 1.027342e+000,
+ -1.111481e+000,
+ -2.194054e-001,
+ -9.004538e-002,
+ 3.983442e+000,
+ 4.871278e-001,
+ -1.965315e+000,
+ 7.956121e-001,
+ -2.363225e-001,
+ 2.718037e-001,
+ -1.036397e+000,
+ -1.827106e-001,
+ 1.964747e+000,
+ -8.870759e+000,
+ -4.208011e+000,
+ 2.461215e+000,
+ -2.158905e-001,
+ 1.561676e+000,
+ 9.436866e-001,
+ -1.113769e+000,
+ -1.947819e-001,
+ 1.300720e+000,
+ 1.516476e+001,
+ -4.088732e+000,
+ -1.069384e+000,
+ 2.836434e-001,
+ 1.671451e+000,
+ 6.229612e-001,
+ // albedo 1, turbidity 7
+ -1.328069e+000,
+ -4.244047e-001,
+ -8.417040e+000,
+ 8.552244e+000,
+ -6.813504e-003,
+ 4.127422e-001,
+ 9.619897e-002,
+ 2.854227e+000,
+ 5.059880e-001,
+ -1.927552e+000,
+ -1.025290e+000,
+ 9.529576e-001,
+ 4.255950e-001,
+ -3.738779e-002,
+ 2.584586e-001,
+ 4.911004e-002,
+ -2.640913e-001,
+ 4.138626e-001,
+ -8.488094e-001,
+ 1.435988e-001,
+ 6.356807e-001,
+ -2.895732e+000,
+ -8.473961e-002,
+ 1.701305e+000,
+ -1.323908e-001,
+ 6.499338e+000,
+ 1.210928e+000,
+ -1.128313e+000,
+ -3.397048e-001,
+ -4.043140e-001,
+ 6.265097e+000,
+ 5.482395e-001,
+ -2.057614e+000,
+ 8.884087e-001,
+ -2.943879e+000,
+ 9.760301e-002,
+ -1.039764e+000,
+ -1.494772e-001,
+ 1.781915e+000,
+ -1.153012e+001,
+ -3.379232e+000,
+ 2.517231e+000,
+ -2.764393e-001,
+ 2.588849e+000,
+ 1.052120e+000,
+ -1.108447e+000,
+ -2.012251e-001,
+ 1.198640e+000,
+ 1.925331e+001,
+ -4.423892e+000,
+ -1.257122e+000,
+ 3.395690e-001,
+ 1.481220e+000,
+ 5.880175e-001,
+ // albedo 1, turbidity 8
+ -1.374185e+000,
+ -4.967434e-001,
+ -7.401318e+000,
+ 7.724021e+000,
+ -2.345723e-002,
+ 5.979653e-001,
+ 2.436346e-002,
+ 2.658970e+000,
+ 6.014891e-001,
+ -2.310933e+000,
+ -1.290290e+000,
+ -1.301909e+000,
+ 2.557806e+000,
+ -3.744449e-002,
+ 8.982861e-002,
+ 1.090613e-001,
+ -4.398363e-001,
+ 1.184329e-001,
+ -1.124730e+000,
+ -9.921830e-002,
+ 1.366902e+000,
+ -4.172489e+000,
+ -5.078016e-002,
+ 1.393597e+000,
+ -9.323843e-002,
+ 6.452721e+000,
+ 1.435913e+000,
+ -8.468477e-001,
+ -2.744819e-001,
+ -4.347200e-001,
+ 6.713362e+000,
+ 6.127133e-001,
+ -1.685634e+000,
+ 7.360941e-001,
+ -4.535502e+000,
+ -2.920866e-002,
+ -1.165242e+000,
+ -2.008697e-001,
+ 1.438778e+000,
+ -1.008936e+001,
+ -2.214771e+000,
+ 2.102909e+000,
+ -1.763085e-001,
+ 2.859075e+000,
+ 1.093470e+000,
+ -1.074614e+000,
+ -2.066374e-001,
+ 1.131891e+000,
+ 1.630063e+001,
+ -4.801441e+000,
+ -1.112590e+000,
+ 3.595785e-001,
+ 1.122227e+000,
+ 5.794610e-001,
+ // albedo 1, turbidity 9
+ -1.521515e+000,
+ -6.835604e-001,
+ -5.571044e+000,
+ 6.028774e+000,
+ -4.253715e-002,
+ 6.875746e-001,
+ -5.279456e-006,
+ 2.180150e+000,
+ 8.487705e-001,
+ -2.240415e+000,
+ -1.171166e+000,
+ -7.182771e+000,
+ 8.417068e+000,
+ -1.932866e-002,
+ 1.101887e-001,
+ -1.098862e-002,
+ 6.242195e-001,
+ -2.393875e-001,
+ -2.712354e+000,
+ -1.198830e+000,
+ 3.180200e+000,
+ -6.768130e+000,
+ -2.563386e-003,
+ 7.984607e-001,
+ 2.764376e-001,
+ 4.695358e+000,
+ 1.557045e+000,
+ -3.655172e-002,
+ -2.142321e-002,
+ -9.138120e-001,
+ 7.932786e+000,
+ 3.516542e-001,
+ -7.994343e-001,
+ 1.786761e-001,
+ -4.208399e+000,
+ 1.820576e-002,
+ -1.368610e+000,
+ -2.656212e-001,
+ 1.249397e+000,
+ -8.317818e+000,
+ -8.962772e-001,
+ 1.423249e+000,
+ 1.478381e-001,
+ 2.191660e+000,
+ 1.007748e+000,
+ -1.041753e+000,
+ -2.453366e-001,
+ 1.061102e+000,
+ 1.130172e+001,
+ -4.739312e+000,
+ -9.223334e-001,
+ 2.982776e-001,
+ 6.162931e-001,
+ 6.080302e-001,
+ // albedo 1, turbidity 10
+ -1.989159e+000,
+ -1.095160e+000,
+ -2.915550e+000,
+ 3.275339e+000,
+ -5.735765e-002,
+ 5.742174e-001,
+ -7.683288e-006,
+ 1.763400e+000,
+ 9.001342e-001,
+ -2.070020e+000,
+ -1.086338e+000,
+ -1.095898e+001,
+ 1.206960e+001,
+ 3.780123e-002,
+ -1.774699e-002,
+ -5.881348e-004,
+ 1.333819e+000,
+ -2.605423e-001,
+ -5.249653e+000,
+ -2.383040e+000,
+ 6.160406e+000,
+ -9.097138e+000,
+ -1.955319e-001,
+ 1.651785e+000,
+ 6.016463e-004,
+ 3.021824e+000,
+ 1.493574e+000,
+ 4.685432e-001,
+ -2.358662e-001,
+ -2.666433e+000,
+ 9.685763e+000,
+ 5.804928e-001,
+ -1.521875e+000,
+ 5.668989e-001,
+ -1.548136e+000,
+ 1.688642e-002,
+ -1.296891e+000,
+ -3.449031e-001,
+ 1.928548e+000,
+ -1.167560e+001,
+ -1.627615e+000,
+ 1.355603e+000,
+ -1.929074e-001,
+ -6.568952e-001,
+ 1.009774e+000,
+ -1.067288e+000,
+ -2.410392e-001,
+ 7.147961e-001,
+ 1.783840e+001,
+ -4.374399e+000,
+ -6.588777e-001,
+ 3.329831e-001,
+ 1.012066e+000,
+ 6.118645e-001,
+};
+
+double datasetXYZRad2[] =
+{
+ // albedo 0, turbidity 1
+ 1.632341e+000,
+ 1.395230e+000,
+ 1.375634e+000,
+ 1.238193e+001,
+ 5.921102e+000,
+ 7.766508e+000,
+ // albedo 0, turbidity 2
+ 1.597115e+000,
+ 1.554617e+000,
+ 3.932382e-001,
+ 1.505284e+001,
+ 5.725234e+000,
+ 8.158155e+000,
+ // albedo 0, turbidity 3
+ 1.522034e+000,
+ 1.844545e+000,
+ -1.322862e+000,
+ 1.918382e+001,
+ 5.440769e+000,
+ 8.837119e+000,
+ // albedo 0, turbidity 4
+ 1.403048e+000,
+ 2.290852e+000,
+ -4.013792e+000,
+ 2.485100e+001,
+ 5.521888e+000,
+ 9.845547e+000,
+ // albedo 0, turbidity 5
+ 1.286364e+000,
+ 2.774498e+000,
+ -6.648221e+000,
+ 2.964151e+001,
+ 5.923777e+000,
+ 1.097075e+001,
+ // albedo 0, turbidity 6
+ 1.213544e+000,
+ 3.040195e+000,
+ -8.092676e+000,
+ 3.186082e+001,
+ 6.789782e+000,
+ 1.158899e+001,
+ // albedo 0, turbidity 7
+ 1.122622e+000,
+ 3.347465e+000,
+ -9.649016e+000,
+ 3.343824e+001,
+ 9.347715e+000,
+ 1.231374e+001,
+ // albedo 0, turbidity 8
+ 1.007356e+000,
+ 3.543858e+000,
+ -1.053520e+001,
+ 3.239842e+001,
+ 1.483962e+001,
+ 1.331718e+001,
+ // albedo 0, turbidity 9
+ 8.956642e-001,
+ 3.278700e+000,
+ -9.254933e+000,
+ 2.557923e+001,
+ 2.489677e+001,
+ 1.476166e+001,
+ // albedo 0, turbidity 10
+ 7.985143e-001,
+ 2.340404e+000,
+ -4.928274e+000,
+ 1.141787e+001,
+ 3.961501e+001,
+ 1.682448e+001,
+ // albedo 1, turbidity 1
+ 1.745162e+000,
+ 1.639467e+000,
+ 1.342721e+000,
+ 1.166033e+001,
+ 1.490124e+001,
+ 1.774031e+001,
+ // albedo 1, turbidity 2
+ 1.708439e+000,
+ 1.819144e+000,
+ 2.834399e-001,
+ 1.448066e+001,
+ 1.459214e+001,
+ 1.858679e+001,
+ // albedo 1, turbidity 3
+ 1.631720e+000,
+ 2.094799e+000,
+ -1.378825e+000,
+ 1.843198e+001,
+ 1.463173e+001,
+ 1.962881e+001,
+ // albedo 1, turbidity 4
+ 1.516536e+000,
+ 2.438729e+000,
+ -3.624121e+000,
+ 2.298621e+001,
+ 1.599782e+001,
+ 2.070027e+001,
+ // albedo 1, turbidity 5
+ 1.405863e+000,
+ 2.785191e+000,
+ -5.705236e+000,
+ 2.645121e+001,
+ 1.768330e+001,
+ 2.191903e+001,
+ // albedo 1, turbidity 6
+ 1.344052e+000,
+ 2.951807e+000,
+ -6.683851e+000,
+ 2.744271e+001,
+ 1.985706e+001,
+ 2.229452e+001,
+ // albedo 1, turbidity 7
+ 1.245827e+000,
+ 3.182923e+000,
+ -7.822960e+000,
+ 2.791395e+001,
+ 2.327254e+001,
+ 2.315910e+001,
+ // albedo 1, turbidity 8
+ 1.132305e+000,
+ 3.202593e+000,
+ -8.008429e+000,
+ 2.521093e+001,
+ 3.000014e+001,
+ 2.405306e+001,
+ // albedo 1, turbidity 9
+ 1.020330e+000,
+ 2.820556e+000,
+ -6.238704e+000,
+ 1.709276e+001,
+ 4.077916e+001,
+ 2.509949e+001,
+ // albedo 1, turbidity 10
+ 9.031570e-001,
+ 1.863917e+000,
+ -1.955738e+000,
+ 3.032665e+000,
+ 5.434290e+001,
+ 2.641780e+001,
+};
+
+double datasetXYZ3[] =
+{
+ // albedo 0, turbidity 1
+ -1.310023e+000,
+ -4.407658e-001,
+ -3.640340e+001,
+ 3.683292e+001,
+ -8.124762e-003,
+ 5.297961e-001,
+ 1.188633e-002,
+ 3.138320e+000,
+ 5.134778e-001,
+ -1.424100e+000,
+ -5.501606e-001,
+ -1.753510e+001,
+ 1.822769e+001,
+ -1.539272e-002,
+ 6.366826e-001,
+ 2.661996e-003,
+ 2.659915e+000,
+ 4.071138e-001,
+ -1.103436e+000,
+ -1.884105e-001,
+ 6.425322e+000,
+ -6.910579e+000,
+ -2.019861e-002,
+ 3.553271e-001,
+ -1.589061e-002,
+ 5.345985e+000,
+ 8.790218e-001,
+ -1.186200e+000,
+ -4.307514e-001,
+ -3.957947e+000,
+ 5.979352e+000,
+ -5.348869e-002,
+ 1.736117e+000,
+ 3.491346e-002,
+ -2.692261e+000,
+ 5.610506e-001,
+ -1.006038e+000,
+ -1.305995e-001,
+ 4.473513e+000,
+ -3.806719e+000,
+ 1.419407e-001,
+ -2.148238e-002,
+ -5.081185e-002,
+ 3.735362e+000,
+ 5.358280e-001,
+ -1.078507e+000,
+ -1.633754e-001,
+ -3.812368e+000,
+ 4.381700e+000,
+ 2.988122e-002,
+ 1.754224e+000,
+ 1.472376e-001,
+ 3.722798e+000,
+ 4.999157e-001,
+ // albedo 0, turbidity 2
+ -1.333582e+000,
+ -4.649908e-001,
+ -3.359528e+001,
+ 3.404375e+001,
+ -9.384242e-003,
+ 5.587511e-001,
+ 5.726310e-003,
+ 3.073145e+000,
+ 5.425529e-001,
+ -1.562624e+000,
+ -7.107068e-001,
+ -1.478170e+001,
+ 1.559839e+001,
+ -1.462375e-002,
+ 5.050133e-001,
+ 2.516017e-002,
+ 1.604696e+000,
+ 2.902403e-001,
+ -8.930158e-001,
+ 4.068077e-002,
+ 1.373481e+000,
+ -2.342752e+000,
+ -2.098058e-002,
+ 6.248686e-001,
+ -5.258363e-002,
+ 7.058214e+000,
+ 1.150373e+000,
+ -1.262823e+000,
+ -4.818353e-001,
+ 8.892610e-004,
+ 1.923120e+000,
+ -4.979718e-002,
+ 1.040693e+000,
+ 1.558103e-001,
+ -2.852480e+000,
+ 2.420691e-001,
+ -9.968383e-001,
+ -1.200648e-001,
+ 1.324342e+000,
+ -9.430889e-001,
+ 1.931098e-001,
+ 4.436916e-001,
+ -7.320456e-002,
+ 4.215931e+000,
+ 7.898019e-001,
+ -1.078185e+000,
+ -1.718192e-001,
+ -1.720191e+000,
+ 2.358918e+000,
+ 2.765637e-002,
+ 1.260245e+000,
+ 2.021941e-001,
+ 3.395483e+000,
+ 5.173628e-001,
+ // albedo 0, turbidity 3
+ -1.353023e+000,
+ -4.813523e-001,
+ -3.104920e+001,
+ 3.140156e+001,
+ -9.510741e-003,
+ 5.542030e-001,
+ 8.135471e-003,
+ 3.136646e+000,
+ 5.215989e-001,
+ -1.624704e+000,
+ -7.990201e-001,
+ -2.167125e+001,
+ 2.246341e+001,
+ -1.163533e-002,
+ 5.415746e-001,
+ 2.618378e-002,
+ 1.139214e+000,
+ 3.444357e-001,
+ -7.983610e-001,
+ 1.417476e-001,
+ 9.914841e+000,
+ -1.081503e+001,
+ -1.218845e-002,
+ 3.411392e-001,
+ -6.137698e-002,
+ 7.445848e+000,
+ 1.180080e+000,
+ -1.266679e+000,
+ -4.288977e-001,
+ -5.818701e+000,
+ 6.986437e+000,
+ -8.180711e-002,
+ 1.397403e+000,
+ 2.016916e-001,
+ -1.275731e+000,
+ 2.592773e-001,
+ -1.009707e+000,
+ -1.537754e-001,
+ 3.496378e+000,
+ -3.013726e+000,
+ 2.421150e-001,
+ -2.831925e-001,
+ 3.003395e-002,
+ 3.702862e+000,
+ 7.746320e-001,
+ -1.075646e+000,
+ -1.768747e-001,
+ -1.347762e+000,
+ 1.989004e+000,
+ 1.375836e-002,
+ 1.764810e+000,
+ 1.330018e-001,
+ 3.230864e+000,
+ 6.626210e-001,
+ // albedo 0, turbidity 4
+ -1.375269e+000,
+ -5.103569e-001,
+ -3.442661e+001,
+ 3.478703e+001,
+ -8.460009e-003,
+ 5.408643e-001,
+ 4.813323e-003,
+ 3.016078e+000,
+ 5.062069e-001,
+ -1.821679e+000,
+ -9.766461e-001,
+ -1.926488e+001,
+ 1.997912e+001,
+ -9.822567e-003,
+ 3.649556e-001,
+ 4.316092e-002,
+ 8.930190e-001,
+ 4.166527e-001,
+ -6.633542e-001,
+ 1.997841e-001,
+ 2.395592e+000,
+ -3.117175e+000,
+ -1.080884e-002,
+ 8.983814e-001,
+ -1.375825e-001,
+ 6.673463e+000,
+ 1.115663e+000,
+ -1.303240e+000,
+ -3.612712e-001,
+ 8.292959e-002,
+ 3.381364e-001,
+ -6.078648e-002,
+ 3.229247e-001,
+ 3.680987e-001,
+ 7.046755e-001,
+ 3.144924e-001,
+ -9.952598e-001,
+ -2.039076e-001,
+ 4.026851e-001,
+ 2.686684e-001,
+ 1.640712e-001,
+ 5.186341e-001,
+ -1.205520e-002,
+ 2.659613e+000,
+ 8.030394e-001,
+ -1.098579e+000,
+ -2.151992e-001,
+ 6.558198e-001,
+ -7.436900e-004,
+ -1.421817e-003,
+ 1.073701e+000,
+ 1.886875e-001,
+ 2.536857e+000,
+ 6.673923e-001,
+ // albedo 0, turbidity 5
+ -1.457986e+000,
+ -5.906842e-001,
+ -3.812464e+001,
+ 3.838539e+001,
+ -6.024357e-003,
+ 4.741484e-001,
+ 1.209223e-002,
+ 2.818432e+000,
+ 5.012433e-001,
+ -1.835728e+000,
+ -1.003405e+000,
+ -6.848129e+000,
+ 7.601943e+000,
+ -1.277375e-002,
+ 4.785598e-001,
+ 3.366853e-002,
+ 1.097701e+000,
+ 4.636635e-001,
+ -8.491348e-001,
+ 9.466365e-003,
+ -2.685226e+000,
+ 2.004060e+000,
+ -1.168708e-002,
+ 6.752316e-001,
+ -1.543371e-001,
+ 5.674759e+000,
+ 1.039534e+000,
+ -1.083379e+000,
+ -1.506790e-001,
+ 7.328236e-001,
+ -5.095568e-001,
+ -8.609153e-002,
+ 4.448820e-001,
+ 4.174662e-001,
+ 1.481556e+000,
+ 3.942551e-001,
+ -1.117089e+000,
+ -3.337605e-001,
+ 2.502281e-001,
+ 4.036323e-001,
+ 2.673899e-001,
+ 2.829817e-001,
+ 2.242450e-002,
+ 2.043207e+000,
+ 7.706902e-001,
+ -1.071648e+000,
+ -2.126200e-001,
+ 6.069466e-001,
+ -1.456290e-003,
+ -5.515960e-001,
+ 1.046755e+000,
+ 1.985021e-001,
+ 2.290245e+000,
+ 6.876058e-001,
+ // albedo 0, turbidity 6
+ -1.483903e+000,
+ -6.309647e-001,
+ -4.380213e+001,
+ 4.410537e+001,
+ -5.712161e-003,
+ 5.195992e-001,
+ 2.028428e-003,
+ 2.687114e+000,
+ 5.098321e-001,
+ -2.053976e+000,
+ -1.141473e+000,
+ 5.109183e-001,
+ 8.060391e-002,
+ -1.033983e-002,
+ 4.066532e-001,
+ 4.869627e-002,
+ 1.161722e+000,
+ 4.039525e-001,
+ -6.348185e-001,
+ 7.651292e-002,
+ -1.031327e+001,
+ 1.007598e+001,
+ -2.083688e-002,
+ 7.359516e-001,
+ -2.029459e-001,
+ 5.013257e+000,
+ 1.077649e+000,
+ -1.228630e+000,
+ -1.650496e-001,
+ 4.077157e-002,
+ -7.189167e-001,
+ -5.092220e-002,
+ 2.959814e-001,
+ 5.111496e-001,
+ 2.540433e+000,
+ 3.615330e-001,
+ -1.041883e+000,
+ -3.278413e-001,
+ -6.691911e-002,
+ 1.307364e+000,
+ 2.166663e-001,
+ 3.000595e-001,
+ -3.157136e-003,
+ 1.389208e+000,
+ 7.999026e-001,
+ -1.103556e+000,
+ -2.443602e-001,
+ 4.705347e-001,
+ -9.296482e-004,
+ -5.309920e-001,
+ 9.654511e-001,
+ 2.142587e-001,
+ 2.244723e+000,
+ 6.839976e-001,
+ // albedo 0, turbidity 7
+ -1.555684e+000,
+ -6.962113e-001,
+ -4.647983e+001,
+ 4.674270e+001,
+ -5.034895e-003,
+ 4.755090e-001,
+ -9.502561e-007,
+ 2.626569e+000,
+ 5.056194e-001,
+ -1.998288e+000,
+ -1.124720e+000,
+ -1.629586e+000,
+ 2.187993e+000,
+ -8.284384e-003,
+ 3.845258e-001,
+ 5.726240e-002,
+ 1.185644e+000,
+ 4.255812e-001,
+ -1.032570e+000,
+ -2.513850e-001,
+ -3.721112e+000,
+ 3.506967e+000,
+ -2.186561e-002,
+ 9.436049e-001,
+ -2.451412e-001,
+ 4.725724e+000,
+ 1.039256e+000,
+ -8.597532e-001,
+ 9.073332e-002,
+ -2.553741e+000,
+ 1.993237e+000,
+ -4.390891e-002,
+ -2.046928e-001,
+ 5.515623e-001,
+ 1.909127e+000,
+ 3.948212e-001,
+ -1.210482e+000,
+ -4.477622e-001,
+ -2.267805e-001,
+ 1.219488e+000,
+ 1.336186e-001,
+ 6.866897e-001,
+ 2.808997e-002,
+ 1.600403e+000,
+ 7.816409e-001,
+ -1.078168e+000,
+ -2.699261e-001,
+ 2.537282e-001,
+ 3.820684e-001,
+ -4.425103e-001,
+ 5.298235e-001,
+ 2.185217e-001,
+ 1.728679e+000,
+ 6.882743e-001,
+ // albedo 0, turbidity 8
+ -1.697968e+000,
+ -8.391488e-001,
+ -5.790105e+001,
+ 5.814120e+001,
+ -3.404760e-003,
+ 4.265140e-001,
+ -1.796301e-006,
+ 2.368442e+000,
+ 5.324429e-001,
+ -2.141552e+000,
+ -1.172230e+000,
+ 1.677872e+001,
+ -1.641470e+001,
+ -5.732425e-003,
+ 2.002199e-001,
+ 6.841834e-002,
+ 1.485338e+000,
+ 3.215763e-001,
+ -1.442946e+000,
+ -7.264245e-001,
+ -9.503706e+000,
+ 9.650462e+000,
+ -2.120995e-002,
+ 1.419263e+000,
+ -2.893098e-001,
+ 3.860731e+000,
+ 1.120857e+000,
+ -5.696752e-001,
+ 3.411279e-001,
+ -2.931035e-001,
+ -6.512552e-001,
+ -1.068437e-001,
+ -1.085661e+000,
+ 6.107549e-001,
+ 1.459503e+000,
+ 3.210336e-001,
+ -1.313839e+000,
+ -5.921371e-001,
+ -2.332222e-001,
+ 1.648196e+000,
+ 2.492787e-001,
+ 1.381033e+000,
+ -1.993392e-002,
+ 9.812560e-001,
+ 8.316329e-001,
+ -1.087464e+000,
+ -3.195534e-001,
+ 2.902095e-001,
+ 3.383709e-001,
+ -8.798482e-001,
+ 1.494668e-002,
+ 2.529703e-001,
+ 1.452644e+000,
+ 6.693870e-001,
+ // albedo 0, turbidity 9
+ -2.068582e+000,
+ -1.118605e+000,
+ -5.081598e+001,
+ 5.097486e+001,
+ -3.280669e-003,
+ 4.067371e-001,
+ -2.544951e-006,
+ 2.179497e+000,
+ 5.778017e-001,
+ -1.744693e+000,
+ -8.537207e-001,
+ 2.234361e+001,
+ -2.208318e+001,
+ -5.932616e-003,
+ 1.035049e-001,
+ 5.742772e-002,
+ 1.977880e+000,
+ 2.124846e-001,
+ -3.287515e+000,
+ -2.140268e+000,
+ -1.249566e+001,
+ 1.240091e+001,
+ -2.409349e-002,
+ 1.397821e+000,
+ -2.371627e-001,
+ 2.771192e+000,
+ 1.170496e+000,
+ 5.502311e-001,
+ 1.046630e+000,
+ 2.193517e+000,
+ -2.220400e+000,
+ -1.064394e-001,
+ -1.017926e+000,
+ 4.795457e-001,
+ 1.030644e+000,
+ 3.177516e-001,
+ -1.719734e+000,
+ -9.536198e-001,
+ -6.586821e-001,
+ 1.386361e+000,
+ -2.513065e-002,
+ 1.187011e+000,
+ 6.542539e-002,
+ 5.296055e-001,
+ 8.082660e-001,
+ -1.005700e+000,
+ -3.028096e-001,
+ 4.470957e-002,
+ 1.007760e+000,
+ -8.119016e-001,
+ 3.153338e-002,
+ 2.311321e-001,
+ 1.182208e+000,
+ 6.824758e-001,
+ // albedo 0, turbidity 10
+ -2.728867e+000,
+ -1.580388e+000,
+ -3.079627e+001,
+ 3.092586e+001,
+ -4.197673e-003,
+ 3.154759e-001,
+ -3.897675e-006,
+ 1.920567e+000,
+ 6.664791e-001,
+ -1.322495e+000,
+ -7.249275e-001,
+ 1.477660e+001,
+ -1.468154e+001,
+ -9.044857e-003,
+ 5.624314e-002,
+ 6.498392e-002,
+ 2.047389e+000,
+ 6.367540e-002,
+ -6.102376e+000,
+ -3.473018e+000,
+ -9.926071e+000,
+ 9.637797e+000,
+ -1.097909e-002,
+ 1.103498e+000,
+ -2.424521e-001,
+ 2.520748e+000,
+ 1.240260e+000,
+ 1.351796e+000,
+ 1.018588e+000,
+ 2.009081e+000,
+ -1.333394e+000,
+ -1.979125e-001,
+ -3.318292e-001,
+ 4.476624e-001,
+ 9.095235e-001,
+ 2.955611e-001,
+ -1.774467e+000,
+ -1.079880e+000,
+ -8.084680e-002,
+ 2.577697e-001,
+ -1.149295e-001,
+ 4.975303e-001,
+ 2.931611e-003,
+ -3.803171e-001,
+ 8.002794e-001,
+ -9.898401e-001,
+ -2.542513e-001,
+ -7.530911e-002,
+ 1.870355e+000,
+ -1.521918e+000,
+ 2.405164e-001,
+ 2.964615e-001,
+ 1.334800e+000,
+ 6.789053e-001,
+ // albedo 1, turbidity 1
+ -1.279730e+000,
+ -4.290674e-001,
+ -4.277972e+001,
+ 4.343305e+001,
+ -6.541826e-003,
+ 4.945086e-001,
+ 1.425338e-002,
+ 2.685244e+000,
+ 5.011313e-001,
+ -1.449506e+000,
+ -5.766374e-001,
+ -1.688496e+001,
+ 1.781118e+001,
+ -1.121649e-002,
+ 3.545020e-001,
+ 2.287338e-002,
+ 1.904281e+000,
+ 4.936998e-001,
+ -1.021980e+000,
+ -1.897574e-001,
+ 2.482462e+000,
+ -2.941725e+000,
+ -1.570448e-002,
+ 7.532578e-001,
+ -4.256800e-002,
+ 5.239660e+000,
+ 4.983116e-001,
+ -1.162608e+000,
+ -3.428049e-001,
+ 3.974358e+000,
+ -1.527935e+000,
+ -3.919201e-002,
+ 8.758593e-001,
+ 7.291363e-002,
+ -3.455257e+000,
+ 8.007426e-001,
+ -9.929985e-001,
+ -8.712006e-002,
+ -7.397313e-001,
+ 1.348372e+000,
+ 9.511685e-002,
+ 3.233584e-001,
+ -7.549148e-002,
+ 5.806452e+000,
+ 4.990042e-001,
+ -1.084996e+000,
+ -1.739767e-001,
+ 1.580475e-001,
+ 9.088180e-001,
+ 6.871433e-002,
+ 5.933079e-001,
+ 1.188921e-001,
+ 3.074079e+000,
+ 4.999327e-001,
+ // albedo 1, turbidity 2
+ -1.317009e+000,
+ -4.661946e-001,
+ -4.255347e+001,
+ 4.312782e+001,
+ -5.727235e-003,
+ 4.285447e-001,
+ 2.189854e-002,
+ 2.608310e+000,
+ 5.190700e-001,
+ -1.469236e+000,
+ -6.282139e-001,
+ -1.241404e+001,
+ 1.348765e+001,
+ -1.204770e-002,
+ 5.070285e-001,
+ -7.280216e-004,
+ 1.491533e+000,
+ 3.635064e-001,
+ -9.713808e-001,
+ -8.138038e-002,
+ 3.709854e-001,
+ -1.041174e+000,
+ -1.814075e-002,
+ 5.060860e-001,
+ -2.053756e-002,
+ 6.161431e+000,
+ 1.093736e+000,
+ -1.159057e+000,
+ -3.698074e-001,
+ 2.711209e+000,
+ -6.006479e-001,
+ -4.896926e-002,
+ 9.273957e-001,
+ 1.137712e-001,
+ -3.496828e+000,
+ 2.867109e-001,
+ -1.011601e+000,
+ -8.201890e-002,
+ 2.105725e-001,
+ 4.597520e-001,
+ 1.478925e-001,
+ 2.138940e-001,
+ -5.660670e-002,
+ 6.057755e+000,
+ 7.859121e-001,
+ -1.078020e+000,
+ -1.811580e-001,
+ 1.646622e-001,
+ 8.348426e-001,
+ 1.149064e-001,
+ 4.985738e-001,
+ 1.376605e-001,
+ 2.746607e+000,
+ 4.999626e-001,
+ // albedo 1, turbidity 3
+ -1.325672e+000,
+ -4.769313e-001,
+ -4.111215e+001,
+ 4.168293e+001,
+ -6.274997e-003,
+ 4.649469e-001,
+ 1.119411e-002,
+ 2.631267e+000,
+ 5.234546e-001,
+ -1.619391e+000,
+ -8.000253e-001,
+ -1.534098e+001,
+ 1.632706e+001,
+ -1.012023e-002,
+ 4.242255e-001,
+ 2.931597e-002,
+ 8.925807e-001,
+ 3.314765e-001,
+ -7.356979e-001,
+ 1.368406e-001,
+ 2.972579e+000,
+ -3.535359e+000,
+ -1.318948e-002,
+ 4.607620e-001,
+ -7.182778e-002,
+ 6.254100e+000,
+ 1.236299e+000,
+ -1.316217e+000,
+ -4.194427e-001,
+ 3.489902e-002,
+ 1.289849e+000,
+ -4.755960e-002,
+ 1.138222e+000,
+ 1.975992e-001,
+ -8.991542e-001,
+ 2.290572e-001,
+ -9.502188e-001,
+ -1.172703e-001,
+ 1.405202e+000,
+ -3.061919e-001,
+ 1.058772e-001,
+ -3.760592e-001,
+ -1.983179e-002,
+ 3.562353e+000,
+ 7.895959e-001,
+ -1.100117e+000,
+ -1.900567e-001,
+ 4.925030e-001,
+ 5.250225e-001,
+ 1.576804e-001,
+ 1.042701e+000,
+ 7.330743e-002,
+ 2.796064e+000,
+ 6.749783e-001,
+ // albedo 1, turbidity 4
+ -1.354183e+000,
+ -5.130625e-001,
+ -4.219268e+001,
+ 4.271772e+001,
+ -5.365373e-003,
+ 4.136743e-001,
+ 1.235172e-002,
+ 2.520122e+000,
+ 5.187269e-001,
+ -1.741434e+000,
+ -9.589761e-001,
+ -8.230339e+000,
+ 9.296799e+000,
+ -9.600162e-003,
+ 4.994969e-001,
+ 2.955452e-002,
+ 3.667099e-001,
+ 3.526999e-001,
+ -6.917347e-001,
+ 2.154887e-001,
+ -8.760264e-001,
+ 2.334121e-001,
+ -1.909621e-002,
+ 4.748033e-001,
+ -1.138514e-001,
+ 6.515360e+000,
+ 1.225097e+000,
+ -1.293189e+000,
+ -4.218700e-001,
+ 1.620952e+000,
+ -7.858597e-001,
+ -3.769410e-002,
+ 6.636786e-001,
+ 3.364945e-001,
+ -5.341017e-001,
+ 2.128347e-001,
+ -9.735521e-001,
+ -1.325495e-001,
+ 1.007517e+000,
+ 2.598258e-001,
+ 6.762169e-002,
+ 1.421018e-003,
+ -6.915987e-002,
+ 3.185897e+000,
+ 8.641956e-001,
+ -1.094800e+000,
+ -1.962062e-001,
+ 5.755591e-001,
+ 2.906259e-001,
+ 2.625748e-001,
+ 7.644049e-001,
+ 1.347492e-001,
+ 2.677126e+000,
+ 6.465460e-001,
+ // albedo 1, turbidity 5
+ -1.393063e+000,
+ -5.578338e-001,
+ -4.185249e+001,
+ 4.233504e+001,
+ -5.435640e-003,
+ 4.743765e-001,
+ 7.422477e-003,
+ 2.442801e+000,
+ 5.211707e-001,
+ -1.939487e+000,
+ -1.128509e+000,
+ -8.974257e+000,
+ 9.978383e+000,
+ -7.965597e-003,
+ 2.948830e-001,
+ 4.436763e-002,
+ 2.839868e-001,
+ 3.440424e-001,
+ -6.011562e-001,
+ 2.354877e-001,
+ -3.079820e+000,
+ 2.585094e+000,
+ -2.002701e-002,
+ 7.793909e-001,
+ -1.598414e-001,
+ 5.834678e+000,
+ 1.202856e+000,
+ -1.315676e+000,
+ -3.903446e-001,
+ 1.701900e+000,
+ -1.304609e+000,
+ -1.045121e-002,
+ 2.747707e-001,
+ 4.143967e-001,
+ 3.197102e-001,
+ 2.637580e-001,
+ -9.618628e-001,
+ -1.625841e-001,
+ 1.187138e+000,
+ 1.497802e-001,
+ -5.590954e-006,
+ 3.178475e-002,
+ -4.153145e-002,
+ 2.496096e+000,
+ 8.195082e-001,
+ -1.111554e+000,
+ -2.365546e-001,
+ 7.831875e-001,
+ 2.018684e-001,
+ 2.074369e-001,
+ 7.395978e-001,
+ 1.225730e-001,
+ 1.876478e+000,
+ 6.821167e-001,
+ // albedo 1, turbidity 6
+ -1.427879e+000,
+ -5.994879e-001,
+ -3.531016e+001,
+ 3.581581e+001,
+ -6.431497e-003,
+ 4.554192e-001,
+ 7.348731e-004,
+ 2.334619e+000,
+ 5.233377e-001,
+ -1.998177e+000,
+ -1.206633e+000,
+ -2.146510e+001,
+ 2.242237e+001,
+ -5.857596e-003,
+ 2.755663e-001,
+ 6.384795e-002,
+ 1.358244e-001,
+ 3.328437e-001,
+ -6.440630e-001,
+ 2.058571e-001,
+ 2.155499e+000,
+ -2.587968e+000,
+ -1.840023e-002,
+ 8.826555e-001,
+ -2.222452e-001,
+ 5.847073e+000,
+ 1.228387e+000,
+ -1.229071e+000,
+ -3.360441e-001,
+ -3.429599e-001,
+ 6.179469e-001,
+ 2.029610e-003,
+ 8.899319e-002,
+ 5.041624e-001,
+ 1.882964e-001,
+ 2.252040e-001,
+ -1.022905e+000,
+ -2.101621e-001,
+ 1.915689e+000,
+ -6.498794e-001,
+ -3.463651e-002,
+ 8.954605e-002,
+ -6.797854e-002,
+ 2.417705e+000,
+ 8.568618e-001,
+ -1.082538e+000,
+ -2.007723e-001,
+ 4.731009e-001,
+ 4.077267e-001,
+ 1.324289e-001,
+ 6.514880e-001,
+ 1.702912e-001,
+ 2.309383e+000,
+ 6.600895e-001,
+ // albedo 1, turbidity 7
+ -1.472139e+000,
+ -6.499815e-001,
+ -3.428465e+001,
+ 3.469659e+001,
+ -5.747023e-003,
+ 4.174167e-001,
+ 1.688597e-003,
+ 2.323046e+000,
+ 5.395191e-001,
+ -2.161176e+000,
+ -1.353089e+000,
+ -2.226827e+001,
+ 2.329138e+001,
+ -5.583808e-003,
+ 2.364793e-001,
+ 6.096656e-002,
+ 1.944666e-003,
+ 2.861624e-001,
+ -6.593044e-001,
+ 1.393558e-001,
+ 4.698373e+000,
+ -5.193883e+000,
+ -1.998390e-002,
+ 1.095635e+000,
+ -2.391254e-001,
+ 5.598103e+000,
+ 1.236193e+000,
+ -1.195717e+000,
+ -2.972715e-001,
+ 4.648953e-002,
+ 3.024588e-001,
+ 5.003313e-003,
+ -3.754741e-001,
+ 5.247265e-001,
+ -1.381312e-001,
+ 2.493896e-001,
+ -1.020139e+000,
+ -2.253524e-001,
+ 3.548437e-001,
+ 7.030485e-001,
+ -2.107076e-002,
+ 4.581395e-001,
+ -3.243757e-002,
+ 2.453259e+000,
+ 8.323623e-001,
+ -1.098770e+000,
+ -2.435780e-001,
+ 8.761614e-001,
+ 1.941613e-001,
+ -1.990692e-001,
+ 3.761139e-001,
+ 1.657412e-001,
+ 1.590503e+000,
+ 6.741417e-001,
+ // albedo 1, turbidity 8
+ -1.648007e+000,
+ -8.205121e-001,
+ -4.435106e+001,
+ 4.479801e+001,
+ -4.181353e-003,
+ 3.854830e-001,
+ -1.842385e-006,
+ 2.000281e+000,
+ 5.518363e-001,
+ -2.140986e+000,
+ -1.282239e+000,
+ -3.979213e+000,
+ 4.672459e+000,
+ -5.008582e-003,
+ 2.421920e-001,
+ 6.253602e-002,
+ 6.612713e-001,
+ 2.555851e-001,
+ -1.300502e+000,
+ -5.137898e-001,
+ 5.179821e-001,
+ -4.032341e-001,
+ -2.066785e-002,
+ 1.087929e+000,
+ -2.615309e-001,
+ 4.225887e+000,
+ 1.229237e+000,
+ -6.963340e-001,
+ 9.241060e-002,
+ 6.936356e-002,
+ -3.588571e-001,
+ -5.461843e-002,
+ -5.616643e-001,
+ 5.484166e-001,
+ -4.776267e-002,
+ 2.414935e-001,
+ -1.233179e+000,
+ -4.325498e-001,
+ 6.479813e-001,
+ 8.368356e-001,
+ 2.458875e-001,
+ 6.464752e-001,
+ -2.897097e-002,
+ 1.561773e+000,
+ 8.518598e-001,
+ -1.051023e+000,
+ -2.533690e-001,
+ 1.004294e+000,
+ 3.028083e-001,
+ -1.520108e+000,
+ 1.607013e-001,
+ 1.619975e-001,
+ 1.131094e+000,
+ 6.706655e-001,
+ // albedo 1, turbidity 9
+ -1.948249e+000,
+ -1.097383e+000,
+ -4.453697e+001,
+ 4.494902e+001,
+ -3.579939e-003,
+ 3.491605e-001,
+ -2.500253e-006,
+ 1.740442e+000,
+ 6.188022e-001,
+ -2.154253e+000,
+ -1.209559e+000,
+ 4.144894e+000,
+ -3.562411e+000,
+ -5.638843e-003,
+ 1.067169e-001,
+ 7.594858e-002,
+ 1.005280e+000,
+ 1.072543e-001,
+ -2.513259e+000,
+ -1.507208e+000,
+ -1.602979e+000,
+ 1.404154e+000,
+ -5.560750e-003,
+ 1.240490e+000,
+ -2.852117e-001,
+ 3.485252e+000,
+ 1.349321e+000,
+ -7.832214e-002,
+ 3.655626e-001,
+ 3.856288e-001,
+ 6.867894e-001,
+ -1.609523e-001,
+ -6.704306e-001,
+ 5.357301e-001,
+ -6.457935e-001,
+ 1.479503e-001,
+ -1.354784e+000,
+ -5.454375e-001,
+ 8.797469e-001,
+ -1.466514e+000,
+ 7.134420e-001,
+ 5.934903e-001,
+ -2.911178e-002,
+ 8.643737e-001,
+ 9.030724e-001,
+ -1.048324e+000,
+ -2.738736e-001,
+ 8.783074e-001,
+ 3.246188e+000,
+ -4.435369e+000,
+ 1.251791e-001,
+ 1.783486e-001,
+ 1.064657e+000,
+ 6.522878e-001,
+ // albedo 1, turbidity 10
+ -2.770408e+000,
+ -1.618911e+000,
+ -2.504031e+001,
+ 2.531674e+001,
+ -4.239279e-003,
+ 3.241013e-001,
+ -3.764484e-006,
+ 1.586843e+000,
+ 7.035906e-001,
+ -1.913500e+000,
+ -1.144014e+000,
+ -1.080587e+001,
+ 1.153677e+001,
+ -1.003197e-002,
+ 1.577515e-001,
+ 5.217789e-002,
+ 1.225278e+000,
+ 5.172771e-003,
+ -5.293208e+000,
+ -2.876463e+000,
+ 2.087053e+000,
+ -3.201552e+000,
+ 3.892964e-003,
+ 5.323930e-001,
+ -2.034512e-001,
+ 2.617760e+000,
+ 1.273597e+000,
+ 9.060340e-001,
+ 3.773409e-001,
+ -6.399945e-001,
+ 3.213979e+000,
+ -9.112172e-002,
+ 6.494055e-001,
+ 3.953280e-001,
+ 5.047796e-001,
+ 2.998695e-001,
+ -1.482179e+000,
+ -6.778310e-001,
+ 1.161775e+000,
+ -3.004872e+000,
+ 4.774797e-001,
+ -4.969248e-001,
+ -3.512074e-003,
+ -1.307190e+000,
+ 7.927378e-001,
+ -9.863181e-001,
+ -1.803364e-001,
+ 5.810824e-001,
+ 4.580570e+000,
+ -3.863454e+000,
+ 5.328174e-001,
+ 2.272821e-001,
+ 1.771114e+000,
+ 6.791814e-001,
+};
+
+double datasetXYZRad3[] =
+{
+ // albedo 0, turbidity 1
+ 1.168084e+000,
+ 2.156455e+000,
+ -3.980314e+000,
+ 1.989302e+001,
+ 1.328335e+001,
+ 1.435621e+001,
+ // albedo 0, turbidity 2
+ 1.135488e+000,
+ 2.294701e+000,
+ -4.585886e+000,
+ 2.090208e+001,
+ 1.347840e+001,
+ 1.467658e+001,
+ // albedo 0, turbidity 3
+ 1.107408e+000,
+ 2.382765e+000,
+ -5.112357e+000,
+ 2.147823e+001,
+ 1.493128e+001,
+ 1.460882e+001,
+ // albedo 0, turbidity 4
+ 1.054193e+000,
+ 2.592891e+000,
+ -6.115000e+000,
+ 2.268967e+001,
+ 1.635672e+001,
+ 1.518999e+001,
+ // albedo 0, turbidity 5
+ 1.006946e+000,
+ 2.705420e+000,
+ -6.698930e+000,
+ 2.291830e+001,
+ 1.834324e+001,
+ 1.570651e+001,
+ // albedo 0, turbidity 6
+ 9.794044e-001,
+ 2.742440e+000,
+ -6.805283e+000,
+ 2.225271e+001,
+ 2.050797e+001,
+ 1.563130e+001,
+ // albedo 0, turbidity 7
+ 9.413577e-001,
+ 2.722009e+000,
+ -6.760707e+000,
+ 2.098242e+001,
+ 2.342588e+001,
+ 1.605011e+001,
+ // albedo 0, turbidity 8
+ 8.917923e-001,
+ 2.592780e+000,
+ -6.152635e+000,
+ 1.774141e+001,
+ 2.858324e+001,
+ 1.657910e+001,
+ // albedo 0, turbidity 9
+ 8.288391e-001,
+ 2.153434e+000,
+ -4.118327e+000,
+ 1.078118e+001,
+ 3.681710e+001,
+ 1.738139e+001,
+ // albedo 0, turbidity 10
+ 7.623528e-001,
+ 1.418187e+000,
+ -8.845235e-001,
+ 7.590129e-001,
+ 4.629859e+001,
+ 1.921657e+001,
+ // albedo 1, turbidity 1
+ 1.352858e+000,
+ 2.048862e+000,
+ -2.053393e+000,
+ 1.405874e+001,
+ 3.045344e+001,
+ 3.044430e+001,
+ // albedo 1, turbidity 2
+ 1.330497e+000,
+ 2.126497e+000,
+ -2.466296e+000,
+ 1.467559e+001,
+ 3.090738e+001,
+ 3.069707e+001,
+ // albedo 1, turbidity 3
+ 1.286344e+000,
+ 2.200436e+000,
+ -2.877228e+000,
+ 1.492701e+001,
+ 3.236288e+001,
+ 3.077223e+001,
+ // albedo 1, turbidity 4
+ 1.234428e+000,
+ 2.289628e+000,
+ -3.404699e+000,
+ 1.499436e+001,
+ 3.468390e+001,
+ 3.084842e+001,
+ // albedo 1, turbidity 5
+ 1.178660e+000,
+ 2.306071e+000,
+ -3.549159e+000,
+ 1.411006e+001,
+ 3.754188e+001,
+ 3.079730e+001,
+ // albedo 1, turbidity 6
+ 1.151366e+000,
+ 2.333005e+000,
+ -3.728627e+000,
+ 1.363374e+001,
+ 3.905894e+001,
+ 3.092599e+001,
+ // albedo 1, turbidity 7
+ 1.101593e+000,
+ 2.299422e+000,
+ -3.565787e+000,
+ 1.196745e+001,
+ 4.188472e+001,
+ 3.102755e+001,
+ // albedo 1, turbidity 8
+ 1.038322e+000,
+ 2.083539e+000,
+ -2.649585e+000,
+ 8.037389e+000,
+ 4.700869e+001,
+ 3.065948e+001,
+ // albedo 1, turbidity 9
+ 9.596146e-001,
+ 1.671470e+000,
+ -8.751538e-001,
+ 1.679772e+000,
+ 5.345784e+001,
+ 3.054520e+001,
+ // albedo 1, turbidity 10
+ 8.640731e-001,
+ 9.858301e-001,
+ 1.854956e+000,
+ -6.798097e+000,
+ 5.936468e+001,
+ 3.110255e+001,
+};
+
+
+
+double* datasetsXYZ[] =
+{
+ datasetXYZ1,
+ datasetXYZ2,
+ datasetXYZ3
+};
+
+double* datasetsXYZRad[] =
+{
+ datasetXYZRad1,
+ datasetXYZRad2,
+ datasetXYZRad3
+};
+
+CCL_NAMESPACE_END
diff --git a/intern/cycles/render/sobol.h b/intern/cycles/render/sobol.h
index 0f52a5fee68..b5eaa67db3e 100644
--- a/intern/cycles/render/sobol.h
+++ b/intern/cycles/render/sobol.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __SOBOL_H__
diff --git a/intern/cycles/render/svm.cpp b/intern/cycles/render/svm.cpp
index 4e617155465..930c53d9572 100644
--- a/intern/cycles/render/svm.cpp
+++ b/intern/cycles/render/svm.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "device.h"
@@ -64,7 +62,6 @@ void SVMShaderManager::device_update(Device *device, DeviceScene *dscene, Scene
svm_nodes.push_back(make_int4(NODE_SHADER_JUMP, 0, 0, 0));
}
- bool sunsky_done = false;
bool use_multi_closure = device->info.advanced_shading;
for(i = 0; i < scene->shaders.size(); i++) {
@@ -79,11 +76,8 @@ void SVMShaderManager::device_update(Device *device, DeviceScene *dscene, Scene
SVMCompiler compiler(scene->shader_manager, scene->image_manager,
use_multi_closure);
- compiler.sunsky = (sunsky_done)? NULL: &dscene->data.sunsky;
compiler.background = ((int)i == scene->default_background);
compiler.compile(shader, svm_nodes, i);
- if(!compiler.sunsky)
- sunsky_done = true;
}
dscene->svm_nodes.copy((uint4*)&svm_nodes[0], svm_nodes.size());
@@ -113,10 +107,10 @@ SVMCompiler::SVMCompiler(ShaderManager *shader_manager_, ImageManager *image_man
{
shader_manager = shader_manager_;
image_manager = image_manager_;
- sunsky = NULL;
max_stack_use = 0;
current_type = SHADER_TYPE_SURFACE;
current_shader = NULL;
+ current_graph = NULL;
background = false;
mix_weight_offset = SVM_STACK_INVALID;
use_multi_closure = use_multi_closure_;
@@ -495,8 +489,11 @@ void SVMCompiler::generate_closure(ShaderNode *node, set<ShaderNode*>& done)
current_shader->has_surface_emission = true;
if(node->has_surface_transparent())
current_shader->has_surface_transparent = true;
- if(node->has_surface_bssrdf())
+ if(node->has_surface_bssrdf()) {
current_shader->has_surface_bssrdf = true;
+ if(node->has_bssrdf_bump())
+ current_shader->has_bssrdf_bump = true;
+ }
/* end node is added outside of this */
}
@@ -557,8 +554,11 @@ void SVMCompiler::generate_multi_closure(ShaderNode *node, set<ShaderNode*>& don
current_shader->has_surface_emission = true;
if(node->has_surface_transparent())
current_shader->has_surface_transparent = true;
- if(node->has_surface_bssrdf())
+ if(node->has_surface_bssrdf()) {
current_shader->has_surface_bssrdf = true;
+ if(node->has_bssrdf_bump())
+ current_shader->has_bssrdf_bump = true;
+ }
}
done.insert(node);
@@ -676,6 +676,7 @@ void SVMCompiler::compile(Shader *shader, vector<int4>& global_svm_nodes, int in
shader->has_surface_emission = false;
shader->has_surface_transparent = false;
shader->has_surface_bssrdf = false;
+ shader->has_bssrdf_bump = false;
shader->has_converter_blackbody = false;
shader->has_volume = false;
shader->has_displacement = false;
diff --git a/intern/cycles/render/svm.h b/intern/cycles/render/svm.h
index e09144a4e76..9693e54ce75 100644
--- a/intern/cycles/render/svm.h
+++ b/intern/cycles/render/svm.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __SVM_H__
@@ -31,7 +29,6 @@ CCL_NAMESPACE_BEGIN
class Device;
class DeviceScene;
class ImageManager;
-struct KernelSunSky;
class Scene;
class ShaderGraph;
class ShaderInput;
@@ -79,7 +76,6 @@ public:
ImageManager *image_manager;
ShaderManager *shader_manager;
- KernelSunSky *sunsky;
bool background;
protected:
diff --git a/intern/cycles/render/tables.cpp b/intern/cycles/render/tables.cpp
index 032fef7516e..be0d4afbe2c 100644
--- a/intern/cycles/render/tables.cpp
+++ b/intern/cycles/render/tables.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "device.h"
diff --git a/intern/cycles/render/tables.h b/intern/cycles/render/tables.h
index 605efd3747f..059940cbeb6 100644
--- a/intern/cycles/render/tables.h
+++ b/intern/cycles/render/tables.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __TABLES_H__
diff --git a/intern/cycles/render/tile.cpp b/intern/cycles/render/tile.cpp
index ea938943f93..72bcdf966b5 100644
--- a/intern/cycles/render/tile.cpp
+++ b/intern/cycles/render/tile.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "tile.h"
@@ -24,7 +22,7 @@
CCL_NAMESPACE_BEGIN
TileManager::TileManager(bool progressive_, int num_samples_, int2 tile_size_, int start_resolution_,
- bool preserve_tile_device_, bool background_, int tile_order_, int num_devices_)
+ bool preserve_tile_device_, bool background_, TileOrder tile_order_, int num_devices_)
{
progressive = progressive_;
tile_size = tile_size_;
@@ -180,7 +178,7 @@ list<Tile>::iterator TileManager::next_viewport_tile(int device)
return state.tiles.end();
}
-list<Tile>::iterator TileManager::next_background_tile(int device, int tile_order)
+list<Tile>::iterator TileManager::next_background_tile(int device, TileOrder tile_order)
{
list<Tile>::iterator iter, best = state.tiles.end();
@@ -201,21 +199,21 @@ list<Tile>::iterator TileManager::next_background_tile(int device, int tile_orde
int64_t disty = cordy;
switch (tile_order) {
- case TileManager::CENTER:
+ case TILE_CENTER:
distx = centx - (cur_tile.x + cur_tile.w);
disty = centy - (cur_tile.y + cur_tile.h);
distx = (int64_t) sqrt((double)distx * distx + disty * disty);
break;
- case TileManager::RIGHT_TO_LEFT:
+ case TILE_RIGHT_TO_LEFT:
distx = cordx - cur_tile.x;
break;
- case TileManager::LEFT_TO_RIGHT:
+ case TILE_LEFT_TO_RIGHT:
distx = cordx + cur_tile.x;
break;
- case TileManager::TOP_TO_BOTTOM:
+ case TILE_TOP_TO_BOTTOM:
distx = cordx - cur_tile.y;
break;
- case TileManager::BOTTOM_TO_TOP:
+ case TILE_BOTTOM_TO_TOP:
distx = cordx + cur_tile.y;
break;
default:
diff --git a/intern/cycles/render/tile.h b/intern/cycles/render/tile.h
index 6e628255da5..7796518b6bc 100644
--- a/intern/cycles/render/tile.h
+++ b/intern/cycles/render/tile.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __TILE_H__
@@ -42,6 +40,17 @@ public:
: index(index_), x(x_), y(y_), w(w_), h(h_), device(device_), rendering(false) {}
};
+/* Tile order */
+
+/* Note: this should match enum_tile_order in properties.py */
+enum TileOrder {
+ TILE_CENTER = 0,
+ TILE_RIGHT_TO_LEFT = 1,
+ TILE_LEFT_TO_RIGHT = 2,
+ TILE_TOP_TO_BOTTOM = 3,
+ TILE_BOTTOM_TO_TOP = 4
+};
+
/* Tile Manager */
class TileManager {
@@ -61,7 +70,7 @@ public:
int num_samples;
TileManager(bool progressive, int num_samples, int2 tile_size, int start_resolution,
- bool preserve_tile_device, bool background, int tile_order, int num_devices = 1);
+ bool preserve_tile_device, bool background, TileOrder tile_order, int num_devices = 1);
~TileManager();
void reset(BufferParams& params, int num_samples);
@@ -69,23 +78,15 @@ public:
bool next();
bool next_tile(Tile& tile, int device = 0);
bool done();
-
- void set_tile_order(int tile_order_) { tile_order = tile_order_; }
-protected:
- /* Note: this should match enum_tile_order in properties.py */
- enum {
- CENTER = 0,
- RIGHT_TO_LEFT = 1,
- LEFT_TO_RIGHT = 2,
- TOP_TO_BOTTOM = 3,
- BOTTOM_TO_TOP = 4
- } TileOrder;
+ void set_tile_order(TileOrder tile_order_) { tile_order = tile_order_; }
+protected:
+
void set_tiles();
bool progressive;
int2 tile_size;
- int tile_order;
+ TileOrder tile_order;
int start_resolution;
int num_devices;
@@ -115,7 +116,7 @@ protected:
void gen_tiles_sliced();
/* returns tiles for background render */
- list<Tile>::iterator next_background_tile(int device, int tile_order);
+ list<Tile>::iterator next_background_tile(int device, TileOrder tile_order);
/* returns first unhandled tile for viewport render */
list<Tile>::iterator next_viewport_tile(int device);
diff --git a/intern/cycles/subd/subd_build.h b/intern/cycles/subd/subd_build.h
index e93ffc4a2c4..8353fb5993a 100644
--- a/intern/cycles/subd/subd_build.h
+++ b/intern/cycles/subd/subd_build.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __SUBD_BUILD_H__
diff --git a/intern/cycles/subd/subd_dice.cpp b/intern/cycles/subd/subd_dice.cpp
index 48e6808bc38..a42a2fc833b 100644
--- a/intern/cycles/subd/subd_dice.cpp
+++ b/intern/cycles/subd/subd_dice.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "camera.h"
diff --git a/intern/cycles/subd/subd_dice.h b/intern/cycles/subd/subd_dice.h
index 41b4902564d..250de59c6c3 100644
--- a/intern/cycles/subd/subd_dice.h
+++ b/intern/cycles/subd/subd_dice.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __SUBD_DICE_H__
diff --git a/intern/cycles/subd/subd_patch.cpp b/intern/cycles/subd/subd_patch.cpp
index f6acc358959..4a029277370 100644
--- a/intern/cycles/subd/subd_patch.cpp
+++ b/intern/cycles/subd/subd_patch.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
/* Parts adapted from code in the public domain in NVidia Mesh Tools. */
diff --git a/intern/cycles/subd/subd_patch.h b/intern/cycles/subd/subd_patch.h
index ac2317f4359..7755740ea0c 100644
--- a/intern/cycles/subd/subd_patch.h
+++ b/intern/cycles/subd/subd_patch.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __SUBD_PATCH_H__
diff --git a/intern/cycles/subd/subd_split.cpp b/intern/cycles/subd/subd_split.cpp
index 074c82a2348..6c1486cecca 100644
--- a/intern/cycles/subd/subd_split.cpp
+++ b/intern/cycles/subd/subd_split.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "camera.h"
diff --git a/intern/cycles/subd/subd_split.h b/intern/cycles/subd/subd_split.h
index b03585174f7..9dd10f8af8f 100644
--- a/intern/cycles/subd/subd_split.h
+++ b/intern/cycles/subd/subd_split.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __SUBD_SPLIT_H__
diff --git a/intern/cycles/subd/subd_stencil.cpp b/intern/cycles/subd/subd_stencil.cpp
index 599a745eebb..5f76a942a59 100644
--- a/intern/cycles/subd/subd_stencil.cpp
+++ b/intern/cycles/subd/subd_stencil.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "subd_stencil.h"
diff --git a/intern/cycles/util/CMakeLists.txt b/intern/cycles/util/CMakeLists.txt
index bcaaa9a71b9..ce5ba44abe9 100644
--- a/intern/cycles/util/CMakeLists.txt
+++ b/intern/cycles/util/CMakeLists.txt
@@ -13,7 +13,6 @@ set(SRC
util_cuda.cpp
util_dynlib.cpp
util_md5.cpp
- util_memarena.cpp
util_opencl.cpp
util_path.cpp
util_string.cpp
@@ -23,7 +22,7 @@ set(SRC
util_transform.cpp
)
-if(WITH_CYCLES_TEST)
+if(WITH_CYCLES_STANDALONE AND WITH_CYCLES_STANDALONE_GUI)
list(APPEND SRC
util_view.cpp
)
@@ -45,7 +44,6 @@ set(SRC_HEADERS
util_map.h
util_math.h
util_md5.h
- util_memarena.h
util_opencl.h
util_opengl.h
util_param.h
diff --git a/intern/cycles/util/util_algorithm.h b/intern/cycles/util/util_algorithm.h
index 708a2730be7..5865f3f04bb 100644
--- a/intern/cycles/util/util_algorithm.h
+++ b/intern/cycles/util/util_algorithm.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __UTIL_ALGORITHM_H__
diff --git a/intern/cycles/util/util_args.h b/intern/cycles/util/util_args.h
index 639fd06bead..55933c895bf 100644
--- a/intern/cycles/util/util_args.h
+++ b/intern/cycles/util/util_args.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __UTIL_ARGS_H__
diff --git a/intern/cycles/util/util_boundbox.h b/intern/cycles/util/util_boundbox.h
index abb8d8688d8..369082af60a 100644
--- a/intern/cycles/util/util_boundbox.h
+++ b/intern/cycles/util/util_boundbox.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __UTIL_BOUNDBOX_H__
diff --git a/intern/cycles/util/util_cache.cpp b/intern/cycles/util/util_cache.cpp
index 55ed50b2ca6..35956e498cb 100644
--- a/intern/cycles/util/util_cache.cpp
+++ b/intern/cycles/util/util_cache.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include <stdio.h>
diff --git a/intern/cycles/util/util_cache.h b/intern/cycles/util/util_cache.h
index deff05fff16..417f4a869b6 100644
--- a/intern/cycles/util/util_cache.h
+++ b/intern/cycles/util/util_cache.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __UTIL_CACHE_H__
diff --git a/intern/cycles/util/util_color.h b/intern/cycles/util/util_color.h
index 0de29371899..9bdd5b29a8e 100644
--- a/intern/cycles/util/util_color.h
+++ b/intern/cycles/util/util_color.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __UTIL_COLOR_H__
diff --git a/intern/cycles/util/util_cuda.cpp b/intern/cycles/util/util_cuda.cpp
index 42ffb04a793..a3b37d27239 100644
--- a/intern/cycles/util/util_cuda.cpp
+++ b/intern/cycles/util/util_cuda.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include <iostream>
diff --git a/intern/cycles/util/util_cuda.h b/intern/cycles/util/util_cuda.h
index ba4df0de90a..deb2ff969d6 100644
--- a/intern/cycles/util/util_cuda.h
+++ b/intern/cycles/util/util_cuda.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __UTIL_CUDA_H__
diff --git a/intern/cycles/util/util_debug.h b/intern/cycles/util/util_debug.h
index 17c169859ec..79fac506b98 100644
--- a/intern/cycles/util/util_debug.h
+++ b/intern/cycles/util/util_debug.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __UTIL_DEBUG_H__
diff --git a/intern/cycles/util/util_dynlib.cpp b/intern/cycles/util/util_dynlib.cpp
index 3eaa16ab37d..587cad607c8 100644
--- a/intern/cycles/util/util_dynlib.cpp
+++ b/intern/cycles/util/util_dynlib.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include <stdlib.h>
diff --git a/intern/cycles/util/util_dynlib.h b/intern/cycles/util/util_dynlib.h
index 888fb6cef24..b30cf98c1b9 100644
--- a/intern/cycles/util/util_dynlib.h
+++ b/intern/cycles/util/util_dynlib.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __UTIL_DYNLIB_H__
diff --git a/intern/cycles/util/util_foreach.h b/intern/cycles/util/util_foreach.h
index b8298c003b5..df3277fbf37 100644
--- a/intern/cycles/util/util_foreach.h
+++ b/intern/cycles/util/util_foreach.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __UTIL_FOREACH_H__
diff --git a/intern/cycles/util/util_function.h b/intern/cycles/util/util_function.h
index dfcd58183d9..6aa014a08a6 100644
--- a/intern/cycles/util/util_function.h
+++ b/intern/cycles/util/util_function.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __UTIL_FUNCTION_H__
diff --git a/intern/cycles/util/util_hash.h b/intern/cycles/util/util_hash.h
index 5b3ff76af7f..ded25c92b90 100644
--- a/intern/cycles/util/util_hash.h
+++ b/intern/cycles/util/util_hash.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __UTIL_HASH_H__
diff --git a/intern/cycles/util/util_image.h b/intern/cycles/util/util_image.h
index df566ccc79c..4b8140e7a7a 100644
--- a/intern/cycles/util/util_image.h
+++ b/intern/cycles/util/util_image.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __UTIL_IMAGE_H__
diff --git a/intern/cycles/util/util_list.h b/intern/cycles/util/util_list.h
index d8f79643469..2aa0b7381e3 100644
--- a/intern/cycles/util/util_list.h
+++ b/intern/cycles/util/util_list.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __UTIL_LIST_H__
diff --git a/intern/cycles/util/util_map.h b/intern/cycles/util/util_map.h
index f0abe70f785..77500e4712d 100644
--- a/intern/cycles/util/util_map.h
+++ b/intern/cycles/util/util_map.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __UTIL_MAP_H__
diff --git a/intern/cycles/util/util_math.h b/intern/cycles/util/util_math.h
index cde547cd77c..987ef4f17ac 100644
--- a/intern/cycles/util/util_math.h
+++ b/intern/cycles/util/util_math.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __UTIL_MATH_H__
@@ -1078,6 +1076,19 @@ __device_inline float triangle_area(const float3 v1, const float3 v2, const floa
__device_inline void make_orthonormals(const float3 N, float3 *a, float3 *b)
{
+#if 0
+ if(fabsf(N.y) >= 0.999f) {
+ *a = make_float3(1, 0, 0);
+ *b = make_float3(0, 0, 1);
+ return;
+ }
+ if(fabsf(N.z) >= 0.999f) {
+ *a = make_float3(1, 0, 0);
+ *b = make_float3(0, 1, 0);
+ return;
+ }
+#endif
+
if(N.x != N.y || N.x != N.z)
*a = make_float3(N.z-N.y, N.x-N.z, N.y-N.x); //(1,1,1)x N
else
@@ -1161,6 +1172,11 @@ __device_inline float3 rotate_around_axis(float3 p, float3 axis, float angle)
/* NaN-safe math ops */
+__device_inline float safe_sqrtf(float f)
+{
+ return sqrtf(max(f, 0.0f));
+}
+
__device float safe_asinf(float a)
{
if(a <= -1.0f)
diff --git a/intern/cycles/util/util_memarena.cpp b/intern/cycles/util/util_memarena.cpp
deleted file mode 100644
index e7ae0d6b272..00000000000
--- a/intern/cycles/util/util_memarena.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#include "util_foreach.h"
-#include "util_math.h"
-#include "util_memarena.h"
-
-CCL_NAMESPACE_BEGIN
-
-MemArena::MemArena(bool use_calloc_, size_t buffer_size_)
-{
- use_calloc = use_calloc_;
- buffer_size = buffer_size_;
-
- last_left = 0;
- last_buffer = NULL;
-}
-
-MemArena::~MemArena()
-{
- foreach(uint8_t *buffer, buffers)
- delete [] buffer;
-}
-
-void *MemArena::alloc(size_t size)
-{
- if(size > last_left) {
- last_left = (size > buffer_size)? size: buffer_size;
- last_buffer = new uint8_t[last_left];
-
- if(use_calloc)
- memset(last_buffer, 0, last_left);
-
- buffers.push_back(last_buffer);
- }
-
- uint8_t *mem = last_buffer;
-
- last_buffer += size;
- last_left -= size;
-
- return (void*)mem;
-}
-
-CCL_NAMESPACE_END
-
diff --git a/intern/cycles/util/util_memarena.h b/intern/cycles/util/util_memarena.h
deleted file mode 100644
index 3b4b761509e..00000000000
--- a/intern/cycles/util/util_memarena.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#ifndef __UTIL_MEMARENA_H__
-#define __UTIL_MEMARENA_H__
-
-#include <stdlib.h>
-
-#include "util_list.h"
-#include "util_types.h"
-
-CCL_NAMESPACE_BEGIN
-
-class MemArena {
-public:
- MemArena(bool use_calloc = true, size_t buffer_size = (1<<14));
- ~MemArena();
-
- void *alloc(size_t size);
-
-protected:
- bool use_calloc;
- size_t buffer_size;
-
- list<uint8_t*> buffers;
- uint8_t *last_buffer;
- size_t last_left;
-};
-
-CCL_NAMESPACE_END
-
-#endif /* __UTIL_MEMARENA_H__ */
-
diff --git a/intern/cycles/util/util_opengl.h b/intern/cycles/util/util_opengl.h
index 352aa7b1c19..04a3e039c9d 100644
--- a/intern/cycles/util/util_opengl.h
+++ b/intern/cycles/util/util_opengl.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __UTIL_OPENGL_H__
@@ -22,12 +20,7 @@
/* OpenGL header includes, used everywhere we use OpenGL, to deal with
* platform differences in one central place. */
-#ifdef __APPLE__
-#include <OpenGL/gl.h>
-#include <OpenGL/glu.h>
-#else
#include <GL/glew.h>
-#endif
#endif /* __UTIL_OPENGL_H__ */
diff --git a/intern/cycles/util/util_param.h b/intern/cycles/util/util_param.h
index d1ca1b65ffb..ef20ff0fcd2 100644
--- a/intern/cycles/util/util_param.h
+++ b/intern/cycles/util/util_param.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __UTIL_PARAM_H__
diff --git a/intern/cycles/util/util_path.cpp b/intern/cycles/util/util_path.cpp
index 79062fe251f..e1f016babee 100644
--- a/intern/cycles/util/util_path.cpp
+++ b/intern/cycles/util/util_path.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "util_debug.h"
diff --git a/intern/cycles/util/util_path.h b/intern/cycles/util/util_path.h
index d5257e79c05..9b63a427924 100644
--- a/intern/cycles/util/util_path.h
+++ b/intern/cycles/util/util_path.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __UTIL_PATH_H__
diff --git a/intern/cycles/util/util_progress.h b/intern/cycles/util/util_progress.h
index 03e25d4d132..5d1219bfef3 100644
--- a/intern/cycles/util/util_progress.h
+++ b/intern/cycles/util/util_progress.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __UTIL_PROGRESS_H__
diff --git a/intern/cycles/util/util_set.h b/intern/cycles/util/util_set.h
index 8904063dd86..6078114e714 100644
--- a/intern/cycles/util/util_set.h
+++ b/intern/cycles/util/util_set.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __UTIL_SET_H__
diff --git a/intern/cycles/util/util_stats.h b/intern/cycles/util/util_stats.h
index 27638015f40..62b1f1760d7 100644
--- a/intern/cycles/util/util_stats.h
+++ b/intern/cycles/util/util_stats.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2012, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __UTIL_STATS_H__
diff --git a/intern/cycles/util/util_string.cpp b/intern/cycles/util/util_string.cpp
index 0dac9a8142a..53603c54da0 100644
--- a/intern/cycles/util/util_string.cpp
+++ b/intern/cycles/util/util_string.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include <stdarg.h>
diff --git a/intern/cycles/util/util_string.h b/intern/cycles/util/util_string.h
index 342edd53658..ee924340716 100644
--- a/intern/cycles/util/util_string.h
+++ b/intern/cycles/util/util_string.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __UTIL_STRING_H__
diff --git a/intern/cycles/util/util_system.cpp b/intern/cycles/util/util_system.cpp
index 7ba749f4287..345c76bdfab 100644
--- a/intern/cycles/util/util_system.cpp
+++ b/intern/cycles/util/util_system.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "util_system.h"
diff --git a/intern/cycles/util/util_system.h b/intern/cycles/util/util_system.h
index 257112883d1..333782c2d01 100644
--- a/intern/cycles/util/util_system.h
+++ b/intern/cycles/util/util_system.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __UTIL_SYSTEM_H__
diff --git a/intern/cycles/util/util_task.cpp b/intern/cycles/util/util_task.cpp
index 89d990cc5d9..14a81ecbb05 100644
--- a/intern/cycles/util/util_task.cpp
+++ b/intern/cycles/util/util_task.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include "util_debug.h"
@@ -138,7 +136,7 @@ void TaskPool::stop()
assert(num == 0);
}
-bool TaskPool::cancelled()
+bool TaskPool::canceled()
{
return do_cancel;
}
@@ -170,7 +168,7 @@ void TaskPool::num_increase()
thread_mutex TaskScheduler::mutex;
int TaskScheduler::users = 0;
vector<thread*> TaskScheduler::threads;
-volatile bool TaskScheduler::do_exit = false;
+bool TaskScheduler::do_exit = false;
list<TaskScheduler::Entry> TaskScheduler::queue;
thread_mutex TaskScheduler::queue_mutex;
@@ -300,5 +298,151 @@ void TaskScheduler::clear(TaskPool *pool)
pool->num_decrease(done);
}
+/* Dedicated Task Pool */
+
+DedicatedTaskPool::DedicatedTaskPool()
+{
+ do_cancel = false;
+ do_exit = false;
+ num = 0;
+
+ worker_thread = new thread(function_bind(&DedicatedTaskPool::thread_run, this));
+}
+
+DedicatedTaskPool::~DedicatedTaskPool()
+{
+ stop();
+ worker_thread->join();
+ delete worker_thread;
+}
+
+void DedicatedTaskPool::push(Task *task, bool front)
+{
+ num_increase();
+
+ /* add task to queue */
+ queue_mutex.lock();
+ if(front)
+ queue.push_front(task);
+ else
+ queue.push_back(task);
+
+ queue_cond.notify_one();
+ queue_mutex.unlock();
+}
+
+void DedicatedTaskPool::push(const TaskRunFunction& run, bool front)
+{
+ push(new Task(run), front);
+}
+
+void DedicatedTaskPool::wait()
+{
+ thread_scoped_lock num_lock(num_mutex);
+
+ while(num)
+ num_cond.wait(num_lock);
+}
+
+void DedicatedTaskPool::cancel()
+{
+ do_cancel = true;
+
+ clear();
+ wait();
+
+ do_cancel = false;
+}
+
+void DedicatedTaskPool::stop()
+{
+ clear();
+
+ do_exit = true;
+ queue_cond.notify_all();
+
+ wait();
+
+ assert(num == 0);
+}
+
+bool DedicatedTaskPool::canceled()
+{
+ return do_cancel;
+}
+
+void DedicatedTaskPool::num_decrease(int done)
+{
+ thread_scoped_lock num_lock(num_mutex);
+ num -= done;
+
+ assert(num >= 0);
+ if(num == 0)
+ num_cond.notify_all();
+}
+
+void DedicatedTaskPool::num_increase()
+{
+ thread_scoped_lock num_lock(num_mutex);
+ num++;
+ num_cond.notify_all();
+}
+
+bool DedicatedTaskPool::thread_wait_pop(Task*& task)
+{
+ thread_scoped_lock queue_lock(queue_mutex);
+
+ while(queue.empty() && !do_exit)
+ queue_cond.wait(queue_lock);
+
+ if(queue.empty()) {
+ assert(do_exit);
+ return false;
+ }
+
+ task = queue.front();
+ queue.pop_front();
+
+ return true;
+}
+
+void DedicatedTaskPool::thread_run()
+{
+ Task *task;
+
+ /* keep popping off tasks */
+ while(thread_wait_pop(task)) {
+ /* run task */
+ task->run();
+
+ /* delete task */
+ delete task;
+
+ /* notify task was done */
+ num_decrease(1);
+ }
+}
+
+void DedicatedTaskPool::clear()
+{
+ thread_scoped_lock queue_lock(queue_mutex);
+
+ /* erase all tasks from the queue */
+ list<Task*>::iterator it = queue.begin();
+ int done = 0;
+
+ while(it != queue.end()) {
+ done++;
+ delete *it;
+
+ it = queue.erase(it);
+ }
+
+ queue_lock.unlock();
+
+ /* notify done */
+ num_decrease(done);
+}
+
CCL_NAMESPACE_END
diff --git a/intern/cycles/util/util_task.h b/intern/cycles/util/util_task.h
index 6e002ddd5b1..42a1e2f5a58 100644
--- a/intern/cycles/util/util_task.h
+++ b/intern/cycles/util/util_task.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __UTIL_TASK_H__
@@ -52,7 +50,7 @@ public:
* pool, we can wait for all tasks to be done, or cancel them before they are
* done.
*
- * The run callback that actually executes the task may be create like this:
+ * The run callback that actually executes the task may be created like this:
* function_bind(&MyClass::task_execute, this, _1, _2) */
class TaskPool
@@ -68,7 +66,7 @@ public:
void cancel(); /* cancel all tasks, keep worker threads running */
void stop(); /* stop all worker threads */
- bool cancelled(); /* for worker threads, test if cancelled */
+ bool canceled(); /* for worker threads, test if canceled */
protected:
friend class TaskScheduler;
@@ -79,8 +77,8 @@ protected:
thread_mutex num_mutex;
thread_condition_variable num_cond;
- volatile int num;
- volatile bool do_cancel;
+ int num;
+ bool do_cancel;
};
/* Task Scheduler
@@ -111,7 +109,7 @@ protected:
static thread_mutex mutex;
static int users;
static vector<thread*> threads;
- static volatile bool do_exit;
+ static bool do_exit;
static list<Entry> queue;
static thread_mutex queue_mutex;
@@ -124,6 +122,51 @@ protected:
static void clear(TaskPool *pool);
};
+/* Dedicated Task Pool
+ *
+ * Like a TaskPool, but will launch one dedicated thread to execute all tasks.
+ *
+ * The run callback that actually executes the task may be created like this:
+ * function_bind(&MyClass::task_execute, this, _1, _2) */
+
+class DedicatedTaskPool
+{
+public:
+ DedicatedTaskPool();
+ ~DedicatedTaskPool();
+
+ void push(Task *task, bool front = false);
+ void push(const TaskRunFunction& run, bool front = false);
+
+ void wait(); /* wait until all tasks are done */
+ void cancel(); /* cancel all tasks, keep worker thread running */
+ void stop(); /* stop worker thread */
+
+ bool canceled(); /* for worker thread, test if canceled */
+
+protected:
+ void num_decrease(int done);
+ void num_increase();
+
+ void thread_run();
+ bool thread_wait_pop(Task*& entry);
+
+ void clear();
+
+ thread_mutex num_mutex;
+ thread_condition_variable num_cond;
+
+ list<Task*> queue;
+ thread_mutex queue_mutex;
+ thread_condition_variable queue_cond;
+
+ int num;
+ bool do_cancel;
+ bool do_exit;
+
+ thread *worker_thread;
+};
+
CCL_NAMESPACE_END
#endif
diff --git a/intern/cycles/util/util_thread.h b/intern/cycles/util/util_thread.h
index d7e9ec03df3..f2698d043fb 100644
--- a/intern/cycles/util/util_thread.h
+++ b/intern/cycles/util/util_thread.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __UTIL_THREAD_H__
diff --git a/intern/cycles/util/util_time.cpp b/intern/cycles/util/util_time.cpp
index 4edd59780a2..dd91b024940 100644
--- a/intern/cycles/util/util_time.cpp
+++ b/intern/cycles/util/util_time.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include <stdlib.h>
diff --git a/intern/cycles/util/util_time.h b/intern/cycles/util/util_time.h
index 33fa8797a69..3df17272e2f 100644
--- a/intern/cycles/util/util_time.h
+++ b/intern/cycles/util/util_time.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __UTIL_TIME_H__
diff --git a/intern/cycles/util/util_transform.cpp b/intern/cycles/util/util_transform.cpp
index f5e0c8e803e..12c2270a8d4 100644
--- a/intern/cycles/util/util_transform.cpp
+++ b/intern/cycles/util/util_transform.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
/*
diff --git a/intern/cycles/util/util_transform.h b/intern/cycles/util/util_transform.h
index 66801e90b56..01655bdf9bc 100644
--- a/intern/cycles/util/util_transform.h
+++ b/intern/cycles/util/util_transform.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __UTIL_TRANSFORM_H__
diff --git a/intern/cycles/util/util_types.h b/intern/cycles/util/util_types.h
index b2d842edccd..a8f514864db 100644
--- a/intern/cycles/util/util_types.h
+++ b/intern/cycles/util/util_types.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __UTIL_TYPES_H__
@@ -543,6 +541,67 @@ template<size_t i0, size_t i1, size_t i2, size_t i3> __device_inline const __m12
}
#endif
+/* Half Floats */
+
+#ifdef __KERNEL_OPENCL__
+
+#define float4_store_half(h, f, scale) vstore_half4(*(f) * (scale), 0, h);
+
+#else
+
+typedef unsigned short half;
+struct half4 { half x, y, z, w; };
+
+#ifdef __KERNEL_CUDA__
+
+__device_inline void float4_store_half(half *h, const float4 *f, float scale)
+{
+ h[0] = __float2half_rn(f->x * scale);
+ h[1] = __float2half_rn(f->y * scale);
+ h[2] = __float2half_rn(f->z * scale);
+ h[3] = __float2half_rn(f->w * scale);
+}
+
+#else
+
+__device_inline void float4_store_half(half *h, const float4 *f, float scale)
+{
+#ifndef __KERNEL_SSE2__
+ for(int i = 0; i < 4; i++) {
+ /* optimized float to half for pixels:
+ * assumes no negative, no nan, no inf, and sets denormal to 0 */
+ union { uint i; float f; } in;
+ in.f = ((*f)[i] > 0.0f)? (*f)[i] * scale: 0.0f;
+ int x = in.i;
+
+ int absolute = x & 0x7FFFFFFF;
+ int Z = absolute + 0xC8000000;
+ int result = (absolute < 0x38800000)? 0: Z;
+
+ h[i] = ((result >> 13) & 0x7FFF);
+ }
+#else
+ /* same as above with SSE */
+ const __m128 mm_scale = _mm_set_ps1(scale);
+ const __m128i mm_38800000 = _mm_set1_epi32(0x38800000);
+ const __m128i mm_7FFF = _mm_set1_epi32(0x7FFF);
+ const __m128i mm_7FFFFFFF = _mm_set1_epi32(0x7FFFFFFF);
+ const __m128i mm_C8000000 = _mm_set1_epi32(0xC8000000);
+
+ __m128i x = _mm_castps_si128(_mm_max_ps(_mm_mul_ps(*(__m128*)f, mm_scale), _mm_set_ps1(0.0f)));
+ __m128i absolute = _mm_and_si128(x, mm_7FFFFFFF);
+ __m128i Z = _mm_add_epi32(absolute, mm_C8000000);
+ __m128i result = _mm_andnot_si128(_mm_cmplt_epi32(absolute, mm_38800000), Z);
+ __m128i rh = _mm_and_si128(_mm_srai_epi32(result, 13), mm_7FFF);
+
+ _mm_storel_pi((__m64*)h, _mm_castsi128_ps(_mm_packs_epi32(rh, rh)));
+#endif
+}
+
+#endif
+
+#endif
+
CCL_NAMESPACE_END
#endif /* __UTIL_TYPES_H__ */
diff --git a/intern/cycles/util/util_vector.h b/intern/cycles/util/util_vector.h
index 65aad37c88c..2085177eefa 100644
--- a/intern/cycles/util/util_vector.h
+++ b/intern/cycles/util/util_vector.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __UTIL_VECTOR_H__
diff --git a/intern/cycles/util/util_view.cpp b/intern/cycles/util/util_view.cpp
index d9934fa1356..27c8d51149a 100644
--- a/intern/cycles/util/util_view.cpp
+++ b/intern/cycles/util/util_view.cpp
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#include <stdio.h>
diff --git a/intern/cycles/util/util_view.h b/intern/cycles/util/util_view.h
index c6805b5ce7c..2339e452b94 100644
--- a/intern/cycles/util/util_view.h
+++ b/intern/cycles/util/util_view.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __UTIL_VIEW_H__
diff --git a/intern/cycles/util/util_xml.h b/intern/cycles/util/util_xml.h
index 1e6874b7d77..9d1ebc2114a 100644
--- a/intern/cycles/util/util_xml.h
+++ b/intern/cycles/util/util_xml.h
@@ -1,19 +1,17 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
*/
#ifndef __UTIL_XML_H__
diff --git a/intern/elbeem/CMakeLists.txt b/intern/elbeem/CMakeLists.txt
index e9d29561121..887abea3604 100644
--- a/intern/elbeem/CMakeLists.txt
+++ b/intern/elbeem/CMakeLists.txt
@@ -25,6 +25,7 @@
set(INC
extern
+ ../guardedalloc
)
set(INC_SYS
@@ -106,10 +107,6 @@ add_definitions(
-DNEWDIRVELMOTEST=0
)
-if(WINDOWS)
- add_definitions(-DUSE_MSVC6FIXES)
-endif()
-
if(WITH_OPENMP)
add_definitions(-DPARALLEL=1)
else()
diff --git a/intern/elbeem/SConscript b/intern/elbeem/SConscript
index 133f02e41bc..e3a20cf9d45 100644
--- a/intern/elbeem/SConscript
+++ b/intern/elbeem/SConscript
@@ -43,6 +43,6 @@ if env['WITH_BF_OPENMP']:
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
defs += ' USE_MSVC6FIXES'
incs += ' ' + env['BF_PNG_INC'] + ' ' + env['BF_ZLIB_INC']
-incs += ' extern '
+incs += ' extern ../../guardedalloc'
env.BlenderLib ('bf_intern_elbeem', sources, Split(incs), Split(defs), libtype='intern', priority=0 )
diff --git a/intern/elbeem/intern/attributes.h b/intern/elbeem/intern/attributes.h
index b2fbd7fd910..f5617313f69 100644
--- a/intern/elbeem/intern/attributes.h
+++ b/intern/elbeem/intern/attributes.h
@@ -14,6 +14,11 @@
#ifndef NTL_ATTRIBUTES_H
#include "utilities.h"
+
+#ifdef WITH_CXX_GUARDEDALLOC
+# include "MEM_guardedalloc.h"
+#endif
+
template<class T> class ntlMatrix4x4;
class ntlSetVec3f;
std::ostream& operator<<( std::ostream& os, const ntlSetVec3f& i );
@@ -110,6 +115,11 @@ class AnimChannel
vector<Scalar> mValue;
/*! anim channel attr times */
vector<double> mTimes;
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:AnimChannel")
+#endif
};
@@ -127,6 +137,11 @@ class ntlSetVec3f {
ntlSetVec3f& operator*=( const ntlSetVec3f &v );
vector<ntlVec3f> mVerts;
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlSetVec3f")
+#endif
};
@@ -163,6 +178,11 @@ class Attribute
protected:
bool initChannel(int elemSize);
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:Attribute")
+#endif
};
@@ -195,6 +215,11 @@ class AttributeList
bool ignoreParameter(string name, string source);
void print();
protected:
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:AttributeList")
+#endif
};
ntlVec3f channelFindMaxVf (AnimChannel<ntlVec3f> channel);
diff --git a/intern/elbeem/intern/controlparticles.h b/intern/elbeem/intern/controlparticles.h
index 6b4b77881cc..915ede66fe6 100644
--- a/intern/elbeem/intern/controlparticles.h
+++ b/intern/elbeem/intern/controlparticles.h
@@ -18,6 +18,10 @@
#include "ntl_geometrymodel.h"
+#ifdef WITH_CXX_GUARDEDALLOC
+# include "MEM_guardedalloc.h"
+#endif
+
// indicator for LBM inclusion
//#ifndef LBMDIM
@@ -80,6 +84,11 @@ public:
forceAtt = forceVel = forceMaxd = LbmVec(0.,0.,0.);
compAvWeight=0.; compAv=LbmVec(0.);
};
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ControlForces")
+#endif
};
@@ -115,6 +124,11 @@ public:
// init all zero / defaults
void reset();
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ControlParticle")
+#endif
};
@@ -128,6 +142,10 @@ public:
// particle positions
std::vector<ControlParticle> particles;
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ControlParticleSet")
+#endif
};
@@ -296,6 +314,11 @@ protected:
void initTimeArray(LbmFloat t, std::vector<ControlParticle> &parts);
bool checkPointInside(ntlTree *tree, ntlVec3Gfx org, gfxReal &distance);
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ControlParticles")
+#endif
};
diff --git a/intern/elbeem/intern/isosurface.h b/intern/elbeem/intern/isosurface.h
index be78db9b293..15b923866d3 100644
--- a/intern/elbeem/intern/isosurface.h
+++ b/intern/elbeem/intern/isosurface.h
@@ -15,6 +15,10 @@
#include "ntl_geometryobject.h"
#include "ntl_bsptree.h"
+#ifdef WITH_CXX_GUARDEDALLOC
+# include "MEM_guardedalloc.h"
+#endif
+
#define ISO_STRICT_DEBUG 0
#define ISOSTRICT_EXIT *((int *)0)=0;
@@ -224,6 +228,11 @@ class IsoSurface :
vector<int> mDboundary;
float mSCrad1, mSCrad2;
ntlVec3Gfx mSCcenter;
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:IsoSurface")
+#endif
};
diff --git a/intern/elbeem/intern/mvmcoords.h b/intern/elbeem/intern/mvmcoords.h
index cb51e91d467..56d991aac6e 100644
--- a/intern/elbeem/intern/mvmcoords.h
+++ b/intern/elbeem/intern/mvmcoords.h
@@ -34,6 +34,10 @@
#include "ieeefp.h"
#endif
+#ifdef WITH_CXX_GUARDEDALLOC
+# include "MEM_guardedalloc.h"
+#endif
+
// weight and triangle index
class mvmIndexWeight {
public:
@@ -49,6 +53,11 @@ class mvmIndexWeight {
mvmFloat weight;
int index;
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:mvmIndexWeight")
+#endif
};
// transfer point with weights
@@ -58,6 +67,11 @@ class mvmTransferPoint {
ntlVec3Gfx lastpos;
//! triangle weights
std::vector<mvmIndexWeight> weights;
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:mvmTransferPoint")
+#endif
};
@@ -86,6 +100,10 @@ class MeanValueMeshCoords {
std::vector<mvmTransferPoint> mVertices;
int mNumVerts;
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:MeanValueMeshCoords")
+#endif
};
#endif
diff --git a/intern/elbeem/intern/ntl_blenderdumper.h b/intern/elbeem/intern/ntl_blenderdumper.h
index cd1331afa83..473e746463c 100644
--- a/intern/elbeem/intern/ntl_blenderdumper.h
+++ b/intern/elbeem/intern/ntl_blenderdumper.h
@@ -12,6 +12,10 @@
#ifndef NTL_BLENDERDUMPER_H
#include "ntl_world.h"
+#ifdef WITH_CXX_GUARDEDALLOC
+# include "MEM_guardedalloc.h"
+#endif
+
class ntlBlenderDumper :
public ntlWorld
{
@@ -27,6 +31,10 @@ public:
protected:
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlBlenderDumper")
+#endif
};
#define NTL_BLENDERDUMPER_H
diff --git a/intern/elbeem/intern/ntl_bsptree.h b/intern/elbeem/intern/ntl_bsptree.h
index 775a216fba8..9c6bf37c591 100644
--- a/intern/elbeem/intern/ntl_bsptree.h
+++ b/intern/elbeem/intern/ntl_bsptree.h
@@ -22,6 +22,9 @@
#define BSP_STACK_SIZE 50
+#ifdef WITH_CXX_GUARDEDALLOC
+# include "MEM_guardedalloc.h"
+#endif
//! bsp tree stack classes, defined in ntl_bsptree.cpp,
// detailed definition unnecesseary here
@@ -120,6 +123,10 @@ class ntlTree
//! duplicated triangles, inited during subdivide
int mTriDoubles;
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlTree")
+#endif
};
diff --git a/intern/elbeem/intern/ntl_geometryclass.h b/intern/elbeem/intern/ntl_geometryclass.h
index 5b7ff1492db..9d8f1ee23d5 100644
--- a/intern/elbeem/intern/ntl_geometryclass.h
+++ b/intern/elbeem/intern/ntl_geometryclass.h
@@ -16,6 +16,10 @@
#include "attributes.h"
+#ifdef WITH_CXX_GUARDEDALLOC
+# include "MEM_guardedalloc.h"
+#endif
+
//! geometry class type ids
#define GEOCLASSTID_OBJECT 1
#define GEOCLASSTID_SHADER 2
@@ -111,6 +115,10 @@ class ntlGeometryClass
private:
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlGeometryClass")
+#endif
};
diff --git a/intern/elbeem/intern/ntl_geometrymodel.h b/intern/elbeem/intern/ntl_geometrymodel.h
index 93fe2076811..08d3bcb16a3 100644
--- a/intern/elbeem/intern/ntl_geometrymodel.h
+++ b/intern/elbeem/intern/ntl_geometrymodel.h
@@ -14,6 +14,10 @@
#include "ntl_geometryobject.h"
+#ifdef WITH_CXX_GUARDEDALLOC
+# include "MEM_guardedalloc.h"
+#endif
+
/*! A simple box object generatedd by 12 triangles */
class ntlGeometryObjModel : public ntlGeometryObject
{
@@ -89,6 +93,11 @@ class ntlGeometryObjModel : public ntlGeometryObject
/*! set data file name */
inline void setFilename(string set) { mFilename = set; }
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlGeometryObjModel")
+#endif
};
#endif
diff --git a/intern/elbeem/intern/ntl_geometryobject.h b/intern/elbeem/intern/ntl_geometryobject.h
index 677f132f4c3..2c229193358 100644
--- a/intern/elbeem/intern/ntl_geometryobject.h
+++ b/intern/elbeem/intern/ntl_geometryobject.h
@@ -16,6 +16,11 @@
#include "ntl_geometryclass.h"
#include "ntl_lighting.h"
#include "ntl_ray.h"
+
+#ifdef WITH_CXX_GUARDEDALLOC
+# include "MEM_guardedalloc.h"
+#endif
+
class ntlRenderGlobals;
class ntlTriangle;
@@ -240,6 +245,10 @@ class ntlGeometryObject : public ntlGeometryClass
public:
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlGeometryObject")
+#endif
};
#endif
diff --git a/intern/elbeem/intern/ntl_geometryshader.h b/intern/elbeem/intern/ntl_geometryshader.h
index f43df6539e6..7e0d61f453e 100644
--- a/intern/elbeem/intern/ntl_geometryshader.h
+++ b/intern/elbeem/intern/ntl_geometryshader.h
@@ -13,6 +13,11 @@
#define NTL_GEOMETRYSHADER_H
#include "ntl_geometryclass.h"
+
+#ifdef WITH_CXX_GUARDEDALLOC
+# include "MEM_guardedalloc.h"
+#endif
+
class ntlGeometryObject;
class ntlRenderGlobals;
@@ -57,6 +62,11 @@ class ntlGeometryShader :
/*! surface output name for this simulation */
string mOutFilename;
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlGeometryShader")
+#endif
};
#endif
diff --git a/intern/elbeem/intern/ntl_lighting.h b/intern/elbeem/intern/ntl_lighting.h
index 88fcaef90e6..0cae32f40ad 100644
--- a/intern/elbeem/intern/ntl_lighting.h
+++ b/intern/elbeem/intern/ntl_lighting.h
@@ -14,6 +14,11 @@
#define NTL_LIGHTING_H
#include "ntl_vector3dim.h"
+
+#ifdef WITH_CXX_GUARDEDALLOC
+# include "MEM_guardedalloc.h"
+#endif
+
class ntlMaterial;
class ntlRay;
class ntlRenderGlobals;
@@ -88,6 +93,10 @@ protected:
private:
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlLightObject")
+#endif
};
@@ -195,6 +204,10 @@ public:
//! Set Fresnel on/off
inline void setFresnel(int set) { mFresnel = set; }
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlMaterial")
+#endif
};
diff --git a/intern/elbeem/intern/ntl_matrices.h b/intern/elbeem/intern/ntl_matrices.h
index ab2a30b49f2..597fcf1c64e 100644
--- a/intern/elbeem/intern/ntl_matrices.h
+++ b/intern/elbeem/intern/ntl_matrices.h
@@ -14,6 +14,9 @@
#include "ntl_vector3dim.h"
+#ifdef WITH_CXX_GUARDEDALLOC
+# include "MEM_guardedalloc.h"
+#endif
// The basic vector class
template<class Scalar>
@@ -96,6 +99,10 @@ public:
protected:
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlMatrix4x4")
+#endif
};
diff --git a/intern/elbeem/intern/ntl_ray.h b/intern/elbeem/intern/ntl_ray.h
index 5f6d34e3020..6384edcb1b1 100644
--- a/intern/elbeem/intern/ntl_ray.h
+++ b/intern/elbeem/intern/ntl_ray.h
@@ -18,6 +18,10 @@
#include "ntl_geometryobject.h"
#include "ntl_bsptree.h"
+#ifdef WITH_CXX_GUARDEDALLOC
+# include "MEM_guardedalloc.h"
+#endif
+
class ntlTriangle;
class ntlRay;
class ntlTree;
@@ -39,6 +43,11 @@ class ntlIntersection {
ntlRay *ray;
ntlTriangle *tri;
char flags;
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlIntersection")
+#endif
};
//! the main ray class
@@ -138,6 +147,10 @@ private:
/*! ID of this ray (from renderglobals */
int mID;
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlRay")
+#endif
};
@@ -225,6 +238,10 @@ private:
/*! ID of last ray that an intersection was calculated for */
int mLastRay;
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlTriangle")
+#endif
};
@@ -410,6 +427,10 @@ private:
/*! shader/obj initializations are only done on first init */
bool mFirstInitDone;
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlScene")
+#endif
};
diff --git a/intern/elbeem/intern/ntl_vector3dim.h b/intern/elbeem/intern/ntl_vector3dim.h
index e3e492c396e..38a6d2da80b 100644
--- a/intern/elbeem/intern/ntl_vector3dim.h
+++ b/intern/elbeem/intern/ntl_vector3dim.h
@@ -32,6 +32,10 @@
#include <stdio.h>
#include <stdlib.h>
+#ifdef WITH_CXX_GUARDEDALLOC
+# include "MEM_guardedalloc.h"
+#endif
+
/* absolute value */
template < class T >
inline T
@@ -205,6 +209,11 @@ protected:
private:
Scalar value[3]; //< Storage of vector values
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlVector3Dim")
+#endif
};
diff --git a/intern/elbeem/intern/ntl_world.h b/intern/elbeem/intern/ntl_world.h
index 6cec098132b..30b7cbf4d92 100644
--- a/intern/elbeem/intern/ntl_world.h
+++ b/intern/elbeem/intern/ntl_world.h
@@ -18,6 +18,11 @@
#include "ntl_geometryobject.h"
#include "simulation_object.h"
#include "elbeem.h"
+
+#ifdef WITH_CXX_GUARDEDALLOC
+# include "MEM_guardedalloc.h"
+#endif
+
class ntlOpenGLRenderer;
class ntlScene;
class SimulationObject;
@@ -119,6 +124,11 @@ class ntlWorld
/*! count no. of frame for correct sim time */
int mSimFrameCnt;
vector<int> mSimFrameValue;
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlWorld")
+#endif
};
@@ -389,6 +399,11 @@ private:
bool mSingleFrameMode;
//! filename for single frame mode
string mSingleFrameFilename;
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlRenderGlobals")
+#endif
};
diff --git a/intern/elbeem/intern/parametrizer.h b/intern/elbeem/intern/parametrizer.h
index f3ea3186654..2d96b5b039f 100644
--- a/intern/elbeem/intern/parametrizer.h
+++ b/intern/elbeem/intern/parametrizer.h
@@ -17,6 +17,10 @@
#include "utilities.h"
#include "attributes.h"
+#ifdef WITH_CXX_GUARDEDALLOC
+# include "MEM_guardedalloc.h"
+#endif
+
/* parametrizer accuracy */
typedef double ParamFloat;
typedef ntlVec3d ParamVec;
@@ -306,6 +310,11 @@ class Parametrizer {
/*! pointer to the attribute list */
AttributeList *mpAttrs;
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:Parametrizer")
+#endif
};
diff --git a/intern/elbeem/intern/particletracer.cpp b/intern/elbeem/intern/particletracer.cpp
index d6bc450198f..593b582d91f 100644
--- a/intern/elbeem/intern/particletracer.cpp
+++ b/intern/elbeem/intern/particletracer.cpp
@@ -53,6 +53,7 @@ ParticleTracer::ParticleTracer() :
ParticleTracer::~ParticleTracer() {
debMsgStd("ParticleTracer::~ParticleTracer",DM_MSG,"destroyed",10);
+ if(mpTrafo) delete mpTrafo;
}
/*****************************************************************************/
diff --git a/intern/elbeem/intern/particletracer.h b/intern/elbeem/intern/particletracer.h
index 5d328907e71..c14c8e2f0cb 100644
--- a/intern/elbeem/intern/particletracer.h
+++ b/intern/elbeem/intern/particletracer.h
@@ -12,6 +12,11 @@
#ifndef NTL_PARTICLETRACER_H
#include "ntl_geometryobject.h"
+
+#ifdef WITH_CXX_GUARDEDALLOC
+# include "MEM_guardedalloc.h"
+#endif
+
template<class Scalar> class ntlMatrix4x4;
// particle types
@@ -131,6 +136,11 @@ class ParticleObject
/* for list constructions */
ParticleObject *mpNext;
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ParticleObject")
+#endif
};
@@ -274,6 +284,11 @@ class ParticleTracer :
/* prev pos save interval */
float mTrailTimeLast, mTrailInterval;
int mTrailLength;
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ParticleTracer")
+#endif
};
#define NTL_PARTICLETRACER_H
diff --git a/intern/elbeem/intern/simulation_object.cpp b/intern/elbeem/intern/simulation_object.cpp
index 9e98adfc734..99c3b170634 100644
--- a/intern/elbeem/intern/simulation_object.cpp
+++ b/intern/elbeem/intern/simulation_object.cpp
@@ -32,10 +32,6 @@
//! lbm factory functions
LbmSolverInterface* createSolver();
-#if PARALLEL==1
-static int omp_threadcache;
-#endif
-
/******************************************************************************
* Constructor
*****************************************************************************/
@@ -71,10 +67,6 @@ SimulationObject::~SimulationObject()
if(mpParam) delete mpParam;
if(mpParts) delete mpParts;
debMsgStd("SimulationObject",DM_MSG,"El'Beem Done!\n",10);
-#if (PARALLEL == 1)
- omp_set_num_threads(omp_threadcache);
- printf("Resetting omp_threads to cached value %d \n", omp_threadcache);
-#endif
}
@@ -185,9 +177,7 @@ int SimulationObject::initializeLbmSimulation(ntlRenderGlobals *glob)
mpLbm->setSmoothing(1.0 * mpElbeemSettings->surfaceSmoothing, 1.0 * mpElbeemSettings->surfaceSmoothing);
mpLbm->setIsoSubdivs(mpElbeemSettings->surfaceSubdivs);
#if PARALLEL==1
- omp_threadcache = omp_get_max_threads();
- omp_set_num_threads(mpElbeemSettings->threads);
- printf("Setting omp_threads to usersetting %d \n", mpElbeemSettings->threads);
+ mpLbm->setNumOMPThreads(mpElbeemSettings->threads);
#endif
mpLbm->setSizeX(mpElbeemSettings->resolutionxyz);
mpLbm->setSizeY(mpElbeemSettings->resolutionxyz);
diff --git a/intern/elbeem/intern/simulation_object.h b/intern/elbeem/intern/simulation_object.h
index 76684fa6f83..4a89d1510a9 100644
--- a/intern/elbeem/intern/simulation_object.h
+++ b/intern/elbeem/intern/simulation_object.h
@@ -18,6 +18,10 @@
#include "ntl_geometryshader.h"
#include "parametrizer.h"
+#ifdef WITH_CXX_GUARDEDALLOC
+# include "MEM_guardedalloc.h"
+#endif
+
class LbmSolverInterface;
class CellIdentifierInterface;
class ntlTree;
@@ -188,6 +192,11 @@ class SimulationObject :
virtual inline ntlVec3Gfx *getBBStart() { return &mGeoStart; }
virtual inline ntlVec3Gfx *getBBEnd() { return &mGeoEnd; }
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:SimulationObject")
+#endif
};
diff --git a/intern/elbeem/intern/solver_class.h b/intern/elbeem/intern/solver_class.h
index 1962e801a4e..593fea1b998 100644
--- a/intern/elbeem/intern/solver_class.h
+++ b/intern/elbeem/intern/solver_class.h
@@ -21,6 +21,10 @@
#include "ntl_ray.h"
#include <stdio.h>
+#ifdef WITH_CXX_GUARDEDALLOC
+# include "MEM_guardedalloc.h"
+#endif
+
#if PARALLEL==1
#include <omp.h>
#endif // PARALLEL=1
@@ -145,6 +149,11 @@ class UniformFsgrCellIdentifier :
if( x==cid->x && y==cid->y && z==cid->z && level==cid->level ) return true;
return false;
}
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:UniformFsgrCellIdentifier")
+#endif
};
//! information needed for each level in the simulation
@@ -193,6 +202,10 @@ public:
int lSizex, lSizey, lSizez;
int lOffsx, lOffsy, lOffsz;
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:FsgrLevelData")
+#endif
};
@@ -740,6 +753,11 @@ class LbmFsgrSolver :
static LbmFloat lesCoeffOffdiag[ 2 ][ 9 ];
# endif // LBMDIM==2
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:LbmFsgrSolver")
+#endif
};
#undef STCON
diff --git a/intern/elbeem/intern/solver_control.cpp b/intern/elbeem/intern/solver_control.cpp
index 75134804f13..c3015b82f0a 100644
--- a/intern/elbeem/intern/solver_control.cpp
+++ b/intern/elbeem/intern/solver_control.cpp
@@ -225,7 +225,10 @@ LbmFsgrSolver::initCpdata()
// manually switch on! if this is zero, nothing is done...
mpControl->mSetForceStrength = this->mTForceStrength = 1.;
- mpControl->mCons.clear();
+ while (!mpControl->mCons.empty()) {
+ delete mpControl->mCons.back(); mpControl->mCons.pop_back();
+ }
+
// init all control fluid objects
int numobjs = (int)(mpGiObjects->size());
@@ -264,7 +267,9 @@ LbmFsgrSolver::initCpdata()
if(0) {
// manually switch on! if this is zero, nothing is done...
mpControl->mSetForceStrength = this->mTForceStrength = 1.;
- mpControl->mCons.clear();
+ while (!mpControl->mCons.empty()) {
+ delete mpControl->mCons.back(); mpControl->mCons.pop_back();
+ }
// add new set
LbmControlSet *cset;
diff --git a/intern/elbeem/intern/solver_control.h b/intern/elbeem/intern/solver_control.h
index afbe5394918..d20823d1827 100644
--- a/intern/elbeem/intern/solver_control.h
+++ b/intern/elbeem/intern/solver_control.h
@@ -16,6 +16,10 @@
#ifndef LBM_TESTCLASS_H
#define LBM_TESTCLASS_H
+#ifdef WITH_CXX_GUARDEDALLOC
+# include "MEM_guardedalloc.h"
+#endif
+
//class IsoSurface;
class ParticleObject;
class ControlParticles;
@@ -147,6 +151,11 @@ class LbmControlSet {
AnimChannel<ntlVec3f> mcCpScale;
AnimChannel<ntlVec3f> mcCpOffset;
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:LbmControlSet")
+#endif
};
@@ -180,6 +189,11 @@ class LbmControlData
// cp debug displau
LbmFloat mDebugCpscale, mDebugVelScale, mDebugCompavScale, mDebugAttScale, mDebugMaxdScale, mDebugAvgVelScale;
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:LbmControlData ")
+#endif
};
#endif // LBM_TESTCLASS_H
diff --git a/intern/elbeem/intern/solver_interface.cpp b/intern/elbeem/intern/solver_interface.cpp
index c3421fe1968..d5221048020 100644
--- a/intern/elbeem/intern/solver_interface.cpp
+++ b/intern/elbeem/intern/solver_interface.cpp
@@ -65,6 +65,9 @@ LbmSolverInterface::LbmSolverInterface() :
mDumpRawText(false),
mDumpRawBinary(false),
mDumpRawBinaryZip(true)
+#if PARALLEL==1
+ , mNumOMPThreads(1)
+#endif // PARALLEL==1
{
#if ELBEEM_PLUGIN==1
if(gDebugLevel<=1) setSilent(true);
@@ -670,6 +673,12 @@ void LbmSolverInterface::markedClearList() {
mMarkedCells.clear();
}
+#if PARALLEL==1
+void LbmSolverInterface::setNumOMPThreads(int num_threads) {
+ mNumOMPThreads = num_threads;
+}
+#endif // PARALLEL==1
+
/*******************************************************************************/
/*! string helper functions */
/*******************************************************************************/
diff --git a/intern/elbeem/intern/solver_interface.h b/intern/elbeem/intern/solver_interface.h
index 8f3181a307d..e4720df307b 100644
--- a/intern/elbeem/intern/solver_interface.h
+++ b/intern/elbeem/intern/solver_interface.h
@@ -35,6 +35,11 @@
#include "parametrizer.h"
#include "attributes.h"
#include "isosurface.h"
+
+#ifdef WITH_CXX_GUARDEDALLOC
+# include "MEM_guardedalloc.h"
+#endif
+
class ParticleTracer;
class ParticleObject;
@@ -171,6 +176,11 @@ class LbmCellContents {
CellFlagType flag;
BubbleId bubble;
LbmFloat ffrac;
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:LbmCellContents")
+#endif
};
/* struct for the coordinates of a cell in the grid */
@@ -224,6 +234,10 @@ class CellIdentifierInterface {
//! has the grid been traversed?
bool mEnd;
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:CellIdentifierInterface")
+#endif
};
@@ -452,7 +466,9 @@ class LbmSolverInterface
CellIdentifierInterface* markedAdvanceCell();
void markedClearList();
-
+#if PARALLEL==1
+ void setNumOMPThreads(int num_threads);
+#endif // PARALLEL==1
protected:
/*! abort simulation on error... */
@@ -595,6 +611,15 @@ class LbmSolverInterface
bool mDumpRawText;
bool mDumpRawBinary;
bool mDumpRawBinaryZip;
+
+#if PARALLEL==1
+ int mNumOMPThreads;
+#endif // PARALLEL==1
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:LbmSolverInterface")
+#endif
};
diff --git a/intern/elbeem/intern/solver_main.cpp b/intern/elbeem/intern/solver_main.cpp
index 99278657fd9..46af6740cf1 100644
--- a/intern/elbeem/intern/solver_main.cpp
+++ b/intern/elbeem/intern/solver_main.cpp
@@ -378,7 +378,7 @@ LbmFsgrSolver::mainLoop(int lev)
const int gridLoopBound=1;
GRID_REGION_INIT();
#if PARALLEL==1
-#pragma omp parallel default(shared) \
+#pragma omp parallel default(shared) num_threads(mNumOMPThreads) \
reduction(+: \
calcCurrentMass,calcCurrentVolume, \
calcCellsFilled,calcCellsEmptied, \
@@ -1119,7 +1119,7 @@ LbmFsgrSolver::preinitGrids()
GRID_REGION_INIT();
#if PARALLEL==1
-#pragma omp parallel default(shared) \
+#pragma omp parallel default(shared) num_threads(mNumOMPThreads) \
reduction(+: \
calcCurrentMass,calcCurrentVolume, \
calcCellsFilled,calcCellsEmptied, \
@@ -1156,7 +1156,7 @@ LbmFsgrSolver::standingFluidPreinit()
GRID_REGION_INIT();
#if PARALLEL==1
-#pragma omp parallel default(shared) \
+#pragma omp parallel default(shared) num_threads(mNumOMPThreads) \
reduction(+: \
calcCurrentMass,calcCurrentVolume, \
calcCellsFilled,calcCellsEmptied, \
diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt
index 2538f0612db..2cc0f476d30 100644
--- a/intern/ghost/CMakeLists.txt
+++ b/intern/ghost/CMakeLists.txt
@@ -44,7 +44,6 @@ set(SRC
intern/GHOST_ISystemPaths.cpp
intern/GHOST_ModifierKeys.cpp
intern/GHOST_Path-api.cpp
- intern/GHOST_Path-api.cpp
intern/GHOST_Rect.cpp
intern/GHOST_System.cpp
intern/GHOST_TimerManager.cpp
@@ -191,6 +190,10 @@ elseif(APPLE)
intern/GHOST_NDOFManagerCocoa.mm
intern/GHOST_NDOFManagerCocoa.h
)
+ list(APPEND SRC_NDOF3DCONNEXION
+ intern/GHOST_NDOFManager3Dconnexion.c
+ intern/GHOST_NDOFManager3Dconnexion.h
+ )
endif()
else()
@@ -319,3 +322,7 @@ add_definitions(-DGLEW_STATIC)
blender_add_lib(bf_intern_ghost "${SRC}" "${INC}" "${INC_SYS}")
+# workaround for apple clang mangling extern "C" symbols
+if(WITH_INPUT_NDOF AND WITH_COCOA)
+ blender_add_lib(bf_intern_ghostndof3dconnexion "${SRC_NDOF3DCONNEXION}" "${INC}" "${INC_SYS}")
+endif()
diff --git a/intern/ghost/SConscript b/intern/ghost/SConscript
index e48e4ee6b96..fed8cd7aa3c 100644
--- a/intern/ghost/SConscript
+++ b/intern/ghost/SConscript
@@ -33,6 +33,7 @@ Import ('env')
window_system = env['OURPLATFORM']
sources = env.Glob('intern/*.cpp')
+sources2 = env.Glob('intern/GHOST_NDOFManager3Dconnexion.c')
if window_system == 'darwin':
sources += env.Glob('intern/*.mm')
@@ -75,7 +76,12 @@ elif window_system in ('linux', 'openbsd3', 'sunos5', 'freebsd7', 'freebsd8', 'f
## So until this is supported properly as with CMake,
## just dont use the PREFIX.
# defs += ['PREFIX=\\"/usr/local/\\"'] # XXX, make an option
- defs += ['WITH_X11_XINPUT'] # XXX, make an option
+ if env['WITH_X11_XINPUT']:
+ defs += ['WITH_X11_XINPUT']
+
+ if env['WITH_X11_XF86VMODE']:
+ #incs += env['X11_xf86vmode_INCLUDE_PATH']
+ defs += ['WITH_X11_XF86VMODE']
# freebsd doesn't seem to support XDND protocol
if env['WITH_GHOST_XDND'] and window_system not in ('freebsd7', 'freebsd8', 'freebsd9'):
@@ -152,6 +158,8 @@ if window_system in ('win32-vc', 'win64-vc'):
elif env['WITH_GHOST_COCOA']: # always use default-Apple-gcc for objC language, for gnu-compilers do not support it fully yet
env.BlenderLib ('bf_intern_ghost', sources, Split(incs), defines=defs, libtype=['intern','player'], priority = [40,15], cc_compilerchange='/usr/bin/gcc', cxx_compilerchange='/usr/bin/g++' )
print "GHOST COCOA WILL BE COMPILED WITH APPLE GCC"
+ if env['WITH_BF_3DMOUSE']:
+ env.BlenderLib ('bf_intern_ghostndof3dconnexion', sources2, Split(incs), defines=defs, libtype=['intern','player'], priority = [40,15], cc_compilerchange='/usr/bin/gcc', cxx_compilerchange='/usr/bin/g++' )
else:
env.BlenderLib ('bf_intern_ghost', sources, Split(incs), defines=defs, libtype=['intern','player'], priority = [40,15] )
diff --git a/intern/ghost/intern/GHOST_DisplayManagerCocoa.mm b/intern/ghost/intern/GHOST_DisplayManagerCocoa.mm
index 555f883cbf2..876be90025f 100644
--- a/intern/ghost/intern/GHOST_DisplayManagerCocoa.mm
+++ b/intern/ghost/intern/GHOST_DisplayManagerCocoa.mm
@@ -52,8 +52,6 @@ GHOST_TSuccess GHOST_DisplayManagerCocoa::getNumDisplays(GHOST_TUns8& numDisplay
GHOST_TSuccess GHOST_DisplayManagerCocoa::getNumDisplaySettings(GHOST_TUns8 display, GHOST_TInt32& numSettings) const
{
- GHOST_ASSERT((display==kMainDisplay), "GHOST_DisplayManagerCocoa::getNumDisplaySettings(): only main display is supported");
-
numSettings = (GHOST_TInt32)3; //Width, Height, BitsPerPixel
return GHOST_kSuccess;
@@ -62,11 +60,8 @@ GHOST_TSuccess GHOST_DisplayManagerCocoa::getNumDisplaySettings(GHOST_TUns8 disp
GHOST_TSuccess GHOST_DisplayManagerCocoa::getDisplaySetting(GHOST_TUns8 display, GHOST_TInt32 index, GHOST_DisplaySetting& setting) const
{
- //Note that only current display setting is available
NSScreen *askedDisplay;
- GHOST_ASSERT((display==kMainDisplay), "GHOST_DisplayManagerCocoa::getDisplaySetting(): only main display is supported");
-
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
if (display == kMainDisplay) //Screen #0 may not be the main one
@@ -74,7 +69,7 @@ GHOST_TSuccess GHOST_DisplayManagerCocoa::getDisplaySetting(GHOST_TUns8 display,
else
askedDisplay = [[NSScreen screens] objectAtIndex:display];
- if(askedDisplay == nil) {
+ if (askedDisplay == nil) {
[pool drain];
return GHOST_kFailure;
}
@@ -109,7 +104,7 @@ GHOST_TSuccess GHOST_DisplayManagerCocoa::getCurrentDisplaySetting(GHOST_TUns8 d
else
askedDisplay = [[NSScreen screens] objectAtIndex:display];
- if(askedDisplay == nil) {
+ if (askedDisplay == nil) {
[pool drain];
return GHOST_kFailure;
}
diff --git a/intern/ghost/intern/GHOST_DisplayManagerSDL.cpp b/intern/ghost/intern/GHOST_DisplayManagerSDL.cpp
index 0d077ebc204..fa92adf87f0 100644
--- a/intern/ghost/intern/GHOST_DisplayManagerSDL.cpp
+++ b/intern/ghost/intern/GHOST_DisplayManagerSDL.cpp
@@ -178,7 +178,7 @@ GHOST_DisplayManagerSDL:: setCurrentDisplaySetting(GHOST_TUns8 display,
else {
/* this is a problem for the BGE player :S, perhaps SDL2 will resolve at some point.
* we really need SDL_SetDisplayModeForDisplay() to become an API func! - campbell */
- printf("no windows available, cant fullscreen");
+ printf("no windows available, cant fullscreen\n");
/* do not fail, we will try again later when the window is created - wander */
return GHOST_kSuccess;
diff --git a/intern/ghost/intern/GHOST_EventManager.cpp b/intern/ghost/intern/GHOST_EventManager.cpp
index 2fddfe22c85..7dc8b8a19bf 100644
--- a/intern/ghost/intern/GHOST_EventManager.cpp
+++ b/intern/ghost/intern/GHOST_EventManager.cpp
@@ -54,8 +54,7 @@ GHOST_EventManager::~GHOST_EventManager()
while (iter != m_consumers.end()) {
GHOST_IEventConsumer *consumer = *iter;
delete consumer;
- m_consumers.erase(iter);
- iter = m_consumers.begin();
+ iter = m_consumers.erase(iter);
}
}
diff --git a/intern/ghost/intern/GHOST_NDOFManager.h b/intern/ghost/intern/GHOST_NDOFManager.h
index 2c213752f94..50f784d89c4 100644
--- a/intern/ghost/intern/GHOST_NDOFManager.h
+++ b/intern/ghost/intern/GHOST_NDOFManager.h
@@ -109,10 +109,6 @@ public:
virtual ~GHOST_NDOFManager() {}
- // whether multi-axis functionality is available (via the OS or driver)
- // does not imply that a device is plugged in or being used
- virtual bool available() = 0;
-
// each platform's device detection should call this
// use standard USB/HID identifiers
bool setDevice(unsigned short vendor_id, unsigned short product_id);
diff --git a/intern/ghost/intern/GHOST_NDOFManager3Dconnexion.c b/intern/ghost/intern/GHOST_NDOFManager3Dconnexion.c
new file mode 100644
index 00000000000..9df9a56f8b8
--- /dev/null
+++ b/intern/ghost/intern/GHOST_NDOFManager3Dconnexion.c
@@ -0,0 +1,94 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor(s):
+ * Jake Kauth on 9/12/13.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifdef WITH_INPUT_NDOF
+
+#include <ConnexionClientAPI.h>
+#include <stdio.h>
+
+#include "GHOST_NDOFManager3Dconnexion.h"
+
+/* It is to be noted that these implementations are linked in as
+ * 'extern "C"' calls from GHOST_NDOFManagerCocoa.
+
+ * This is done in order to
+ * preserve weak linking capability (which as of clang-3.3 and xcode5
+ * breaks weak linking when there is name mangling of c++ libraries.)
+ *
+ * We need to have the weak linked file as pure C. Therefore we build a
+ * compiled bridge from the real weak linked calls and the calls within C++
+
+ */
+
+OSErr GHOST_NDOFManager3Dconnexion_available(void)
+{
+ // extern unsigned int InstallConnexionHandlers() __attribute__((weak_import));
+ // Make the linker happy for the framework check (see link below for more info)
+ // http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html
+ return InstallConnexionHandlers != 0;
+ // this means that the driver is installed and dynamically linked to blender
+}
+
+OSErr GHOST_NDOFManager3Dconnexion_oldDRV()
+{
+ //extern unsigned int SetConnexionClientButtonMask() __attribute__((weak_import));
+ // Make the linker happy for the framework check (see link below for more info)
+ // http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html
+ return SetConnexionClientButtonMask != 0;
+ // this means that the driver has this symbol
+}
+
+UInt16 GHOST_NDOFManager3Dconnexion_RegisterConnexionClient(UInt32 signature, UInt8 *name, UInt16 mode, UInt32 mask)
+{
+ return RegisterConnexionClient(signature, name, mode, mask);
+}
+
+void GHOST_NDOFManager3Dconnexion_SetConnexionClientButtonMask(UInt16 clientID, UInt32 buttonMask)
+{
+ return SetConnexionClientButtonMask( clientID, buttonMask);
+}
+
+void GHOST_NDOFManager3Dconnexion_UnregisterConnexionClient(UInt16 clientID)
+{
+ return UnregisterConnexionClient( clientID);
+}
+
+OSErr GHOST_NDOFManager3Dconnexion_InstallConnexionHandlers(
+ ConnexionMessageHandlerProc messageHandler,
+ ConnexionAddedHandlerProc addedHandler,
+ ConnexionRemovedHandlerProc removedHandler)
+{
+ return InstallConnexionHandlers( messageHandler, addedHandler, removedHandler);
+}
+
+void GHOST_NDOFManager3Dconnexion_CleanupConnexionHandlers(void)
+{
+ return CleanupConnexionHandlers();
+}
+
+OSErr GHOST_NDOFManager3Dconnexion_ConnexionControl(UInt32 message, SInt32 param, SInt32 *result)
+{
+ return ConnexionControl( message, param, result);
+}
+
+#endif // WITH_INPUT_NDOF
diff --git a/intern/ghost/intern/GHOST_NDOFManager3Dconnexion.h b/intern/ghost/intern/GHOST_NDOFManager3Dconnexion.h
new file mode 100644
index 00000000000..9a84c14b4ac
--- /dev/null
+++ b/intern/ghost/intern/GHOST_NDOFManager3Dconnexion.h
@@ -0,0 +1,50 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor(s):
+ * Jake Kauth on 9/12/13.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef __GHOST_NDOFMANAGER3DCONNEXION_H__
+#define __GHOST_NDOFMANAGER3DCONNEXION_H__
+
+#ifdef WITH_INPUT_NDOF
+#include <ConnexionClientAPI.h>
+
+
+OSErr GHOST_NDOFManager3Dconnexion_available(void);
+OSErr GHOST_NDOFManager3Dconnexion_oldDRV(void);
+OSErr GHOST_NDOFManager3Dconnexion_InstallConnexionHandlers(ConnexionMessageHandlerProc messageHandler, ConnexionAddedHandlerProc addedHandler, ConnexionRemovedHandlerProc removedHandler);
+void GHOST_NDOFManager3Dconnexion_CleanupConnexionHandlers(void);
+UInt16 GHOST_NDOFManager3Dconnexion_RegisterConnexionClient(UInt32 signature, UInt8 *name, UInt16 mode, UInt32 mask);
+void GHOST_NDOFManager3Dconnexion_SetConnexionClientButtonMask(UInt16 clientID, UInt32 buttonMask);
+void GHOST_NDOFManager3Dconnexion_UnregisterConnexionClient(UInt16 clientID);
+OSErr GHOST_NDOFManager3Dconnexion_ConnexionControl(UInt32 message, SInt32 param, SInt32 *result);
+
+extern OSErr InstallConnexionHandlers(ConnexionMessageHandlerProc messageHandler, ConnexionAddedHandlerProc addedHandler, ConnexionRemovedHandlerProc removedHandler) __attribute__((weak_import));
+extern void CleanupConnexionHandlers(void) __attribute__((weak_import));
+extern UInt16 RegisterConnexionClient(UInt32 signature, UInt8 *name, UInt16 mode, UInt32 mask) __attribute__((weak_import));
+extern void SetConnexionClientButtonMask(UInt16 clientID, UInt32 buttonMask) __attribute__((weak_import));
+extern void UnregisterConnexionClient(UInt16 clientID) __attribute__((weak_import));
+extern OSErr ConnexionControl(UInt32 message, SInt32 param, SInt32 *result) __attribute__((weak_import));
+
+
+#endif // WITH_INPUT_NDOF
+
+#endif // #include guard
diff --git a/intern/ghost/intern/GHOST_NDOFManagerCocoa.h b/intern/ghost/intern/GHOST_NDOFManagerCocoa.h
index 8d8081ebb5c..2a1b492dd96 100644
--- a/intern/ghost/intern/GHOST_NDOFManagerCocoa.h
+++ b/intern/ghost/intern/GHOST_NDOFManagerCocoa.h
@@ -26,7 +26,22 @@
#ifdef WITH_INPUT_NDOF
+
+extern "C" {
+#include <ConnexionClientAPI.h>
+#include <stdio.h>
+}
+
+
#include "GHOST_NDOFManager.h"
+extern "C" OSErr GHOST_NDOFManager3Dconnexion_available(void);
+extern "C" OSErr GHOST_NDOFManager3Dconnexion_oldDRV(void);
+extern "C" OSErr GHOST_NDOFManager3Dconnexion_InstallConnexionHandlers(ConnexionMessageHandlerProc messageHandler, ConnexionAddedHandlerProc addedHandler, ConnexionRemovedHandlerProc removedHandler);
+extern "C" void GHOST_NDOFManager3Dconnexion_CleanupConnexionHandlers(void);
+extern "C" UInt16 GHOST_NDOFManager3Dconnexion_RegisterConnexionClient(UInt32 signature, UInt8 *name, UInt16 mode, UInt32 mask);
+extern "C" void GHOST_NDOFManager3Dconnexion_SetConnexionClientButtonMask(UInt16 clientID, UInt32 buttonMask);
+extern "C" void GHOST_NDOFManager3Dconnexion_UnregisterConnexionClient(UInt16 clientID);
+extern "C" OSErr GHOST_NDOFManager3Dconnexion_ConnexionControl(UInt32 message, SInt32 param, SInt32 *result);
// Event capture is handled within the NDOF manager on Macintosh,
// so there's no need for SystemCocoa to look for them.
@@ -40,9 +55,7 @@ public:
// whether multi-axis functionality is available (via the OS or driver)
// does not imply that a device is plugged in or being used
- bool available();
- bool oldDRV();
-
+
private:
unsigned short m_clientID;
};
diff --git a/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm b/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm
index 0d009e17561..4fc4f8016e5 100644
--- a/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm
+++ b/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm
@@ -24,6 +24,7 @@
#ifdef WITH_INPUT_NDOF
#include "GHOST_NDOFManagerCocoa.h"
+#include "GHOST_NDOFManager3Dconnexion.h"
#include "GHOST_SystemCocoa.h"
extern "C" {
@@ -31,6 +32,7 @@ extern "C" {
#include <stdio.h>
}
+
// static functions need to talk to these objects:
static GHOST_SystemCocoa* ghost_system = NULL;
static GHOST_NDOFManager* ndof_manager = NULL;
@@ -50,7 +52,7 @@ static void NDOF_DeviceAdded(io_connect_t connection)
// determine exactly which device is plugged in
SInt32 result = 0;
- ConnexionControl(kConnexionCtlGetDeviceID, 0, &result);
+ GHOST_NDOFManager3Dconnexion_ConnexionControl(kConnexionCtlGetDeviceID, 0, &result);
unsigned short vendorID = result >> 16;
unsigned short productID = result & 0xffff;
@@ -123,27 +125,27 @@ static void NDOF_DeviceEvent(io_connect_t connection, natural_t messageType, voi
GHOST_NDOFManagerCocoa::GHOST_NDOFManagerCocoa(GHOST_System& sys)
: GHOST_NDOFManager(sys)
{
- if (available())
+ if (GHOST_NDOFManager3Dconnexion_available())
{
// give static functions something to talk to:
ghost_system = dynamic_cast<GHOST_SystemCocoa*>(&sys);
ndof_manager = this;
- OSErr error = InstallConnexionHandlers(NDOF_DeviceEvent, NDOF_DeviceAdded, NDOF_DeviceRemoved);
+ OSErr error = GHOST_NDOFManager3Dconnexion_InstallConnexionHandlers(NDOF_DeviceEvent, NDOF_DeviceAdded, NDOF_DeviceRemoved);
if (error) {
printf("ndof: error %d while installing handlers\n", error);
return;
}
// Pascal string *and* a four-letter constant. How old-skool.
- m_clientID = RegisterConnexionClient('blnd', (UInt8*) "\007blender",
+ m_clientID = GHOST_NDOFManager3Dconnexion_RegisterConnexionClient('blnd', (UInt8*) "\007blender",
kConnexionClientModeTakeOver, kConnexionMaskAll);
// printf("ndof: client id = %d\n", m_clientID);
- if (oldDRV()) {
+ if (GHOST_NDOFManager3Dconnexion_oldDRV()) {
has_old_driver = false;
- SetConnexionClientButtonMask(m_clientID, kConnexionMaskAllButtons);
+ GHOST_NDOFManager3Dconnexion_SetConnexionClientButtonMask(m_clientID, kConnexionMaskAllButtons);
}
else {
printf("ndof: old 3Dx driver installed, some buttons may not work\n");
@@ -157,31 +159,14 @@ GHOST_NDOFManagerCocoa::GHOST_NDOFManagerCocoa(GHOST_System& sys)
GHOST_NDOFManagerCocoa::~GHOST_NDOFManagerCocoa()
{
- if (available())
+ if (GHOST_NDOFManager3Dconnexion_available())
{
- UnregisterConnexionClient(m_clientID);
- CleanupConnexionHandlers();
+ GHOST_NDOFManager3Dconnexion_UnregisterConnexionClient(m_clientID);
+ GHOST_NDOFManager3Dconnexion_UnregisterConnexionClient(m_clientID);
+
+ GHOST_NDOFManager3Dconnexion_CleanupConnexionHandlers();
ghost_system = NULL;
ndof_manager = NULL;
}
}
-extern "C" {
- bool GHOST_NDOFManagerCocoa::available()
- {
- extern OSErr InstallConnexionHandlers() __attribute__((weak_import));
- // Make the linker happy for the framework check (see link below for more info)
- // http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html
- return InstallConnexionHandlers != NULL;
- // this means that the driver is installed and dynamically linked to blender
- }
-
- bool GHOST_NDOFManagerCocoa::oldDRV()
- {
- extern OSErr SetConnexionClientButtonMask() __attribute__((weak_import));
- // Make the linker happy for the framework check (see link below for more info)
- // http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html
- return SetConnexionClientButtonMask != NULL;
- // this means that the driver has this symbol
- }
-}
#endif // WITH_INPUT_NDOF
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm
index 01a760609ff..84b4bb35768 100644
--- a/intern/ghost/intern/GHOST_SystemCocoa.mm
+++ b/intern/ghost/intern/GHOST_SystemCocoa.mm
@@ -51,6 +51,7 @@
#include "GHOST_WindowCocoa.h"
#ifdef WITH_INPUT_NDOF
#include "GHOST_NDOFManagerCocoa.h"
+#include "GHOST_NDOFManager3Dconnexion.h"
#endif
#include "AssertMacros.h"
@@ -516,7 +517,7 @@ int cocoa_request_qtcodec_settings(bContext *C, wmOperator *op)
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender
{
- //TODO: implement graceful termination through Cocoa mechanism to avoid session log off to be cancelled
+ //TODO: implement graceful termination through Cocoa mechanism to avoid session log off to be canceled
//Note that Cmd+Q is already handled by keyhandler
if (systemCocoa->handleQuitRequest() == GHOST_kExitNow)
return NSTerminateCancel;//NSTerminateNow;
@@ -1017,12 +1018,20 @@ void GHOST_SystemCocoa::notifyExternalEventProcessed()
//Note: called from NSWindow delegate
GHOST_TSuccess GHOST_SystemCocoa::handleWindowEvent(GHOST_TEventType eventType, GHOST_WindowCocoa* window)
{
+ NSArray *windowsList;
+ windowsList = [NSApp orderedWindows];
if (!validWindow(window)) {
return GHOST_kFailure;
}
switch (eventType) {
case GHOST_kEventWindowClose:
- pushEvent( new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowClose, window) );
+ // check for index of mainwindow as it would quit blender without dialog and discard
+ if ([windowsList count] > 1 && window->getCocoaWindow() != [windowsList objectAtIndex:[windowsList count] - 1]) {
+ pushEvent( new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowClose, window) );
+ }
+ else {
+ handleQuitRequest(); // -> quit dialog
+ }
break;
case GHOST_kEventWindowActivate:
m_windowManager->setActiveWindow(window);
@@ -1540,8 +1549,8 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
window->clientToScreenIntern(x_warp+x_accum, y_warp+y_accum, x, y);
pushEvent(new GHOST_EventCursor([event timestamp] * 1000, GHOST_kEventCursorMove, window, x, y));
- }
break;
+ }
case GHOST_kGrabWrap: //Wrap cursor at area/window boundaries
{
NSPoint mousePos = [cocoawindow mouseLocationOutsideOfEventStream];
@@ -1551,7 +1560,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
GHOST_Rect bounds, windowBounds, correctedBounds;
/* fallback to window bounds */
- if(window->getCursorGrabBounds(bounds)==GHOST_kFailure)
+ if (window->getCursorGrabBounds(bounds) == GHOST_kFailure)
window->getClientBounds(bounds);
//Switch back to Cocoa coordinates orientation (y=0 at botton,the same as blender internal btw!), and to client coordinates
@@ -1585,8 +1594,8 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
window->getCursorGrabInitPos(x_cur, y_cur);
window->clientToScreenIntern(x_cur + x_accum, y_cur + y_accum, x, y);
pushEvent(new GHOST_EventCursor([event timestamp] * 1000, GHOST_kEventCursorMove, window, x, y));
- }
break;
+ }
default:
{
//Normal cursor operation: send mouse position in window
@@ -1598,8 +1607,8 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
m_cursorDelta_x=0;
m_cursorDelta_y=0; //Mouse motion occurred between two cursor warps, so we can reset the delta counter
- }
break;
+ }
}
}
break;
@@ -1762,6 +1771,10 @@ GHOST_TSuccess GHOST_SystemCocoa::handleKeyEvent(void *eventPtr)
if ((keyCode > 266) && (keyCode < 271))
utf8_buf[0] = '\0';
+ /* no text with command key pressed */
+ if (m_modifierMask & NSCommandKeyMask)
+ utf8_buf[0] = '\0';
+
if ((keyCode == GHOST_kKeyQ) && (m_modifierMask & NSCommandKeyMask))
break; //Cmd-Q is directly handled by Cocoa
@@ -1853,7 +1866,7 @@ GHOST_TUns8* GHOST_SystemCocoa::getClipboard(bool selection) const
[pool drain];
- if(temp_buff) {
+ if (temp_buff) {
return temp_buff;
}
else {
@@ -1865,7 +1878,7 @@ void GHOST_SystemCocoa::putClipboard(GHOST_TInt8 *buffer, bool selection) const
{
NSString *textToCopy;
- if(selection) {return;} // for copying the selection, used on X11
+ if (selection) return; // for copying the selection, used on X11
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
diff --git a/intern/ghost/intern/GHOST_SystemPathsX11.cpp b/intern/ghost/intern/GHOST_SystemPathsX11.cpp
index 35bebd588c3..e2d9733a9b2 100644
--- a/intern/ghost/intern/GHOST_SystemPathsX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemPathsX11.cpp
@@ -42,7 +42,9 @@
#include <cstdlib> /* for exit */
#include <pwd.h> /* for get home without use getenv() */
-#include <limits.h> /* for PATH_MAX */
+#include <string>
+
+using std::string;
#ifdef PREFIX
static const char *static_path = PREFIX "/share";
@@ -62,9 +64,8 @@ const GHOST_TUns8 *GHOST_SystemPathsX11::getSystemDir(int, const char *versionst
{
/* no prefix assumes a portable build which only uses bundled scripts */
if (static_path) {
- static char system_path[PATH_MAX];
- snprintf(system_path, sizeof(system_path), "%s/blender/%s", static_path, versionstr);
- return (GHOST_TUns8 *)system_path;
+ static string system_path = string(static_path) + "/blender/" + versionstr;
+ return (GHOST_TUns8 *)system_path.c_str();
}
return NULL;
@@ -72,36 +73,46 @@ const GHOST_TUns8 *GHOST_SystemPathsX11::getSystemDir(int, const char *versionst
const GHOST_TUns8 *GHOST_SystemPathsX11::getUserDir(int version, const char *versionstr) const
{
- static char user_path[PATH_MAX];
+ static string user_path = "";
+ static int last_version = 0;
/* in blender 2.64, we migrate to XDG. to ensure the copy previous settings
* operator works we give a different path depending on the requested version */
if (version < 264) {
- const char *home = getenv("HOME");
+ if (user_path.empty() || last_version != version) {
+ const char *home = getenv("HOME");
- if (home) {
- snprintf(user_path, sizeof(user_path), "%s/.blender/%s", home, versionstr);
- return (GHOST_TUns8 *)user_path;
- }
+ last_version = version;
- return NULL;
+ if (home) {
+ user_path = string(home) + "/.blender/" + versionstr;
+ }
+ else {
+ return NULL;
+ }
+ }
+ return (GHOST_TUns8 *)user_path.c_str();
}
else {
- const char *home = getenv("XDG_CONFIG_HOME");
+ if (user_path.empty() || last_version != version) {
+ const char *home = getenv("XDG_CONFIG_HOME");
- if (home) {
- snprintf(user_path, sizeof(user_path), "%s/blender/%s", home, versionstr);
- }
- else {
- home = getenv("HOME");
+ last_version = version;
+
+ if (home) {
+ user_path = string(home) + "/blender/" + versionstr;
+ }
+ else {
+ home = getenv("HOME");
- if (home == NULL)
- home = getpwuid(getuid())->pw_dir;
+ if (home == NULL)
+ home = getpwuid(getuid())->pw_dir;
- snprintf(user_path, sizeof(user_path), "%s/.config/blender/%s", home, versionstr);
+ user_path = string(home) + "/.config/blender/" + versionstr;
+ }
}
- return (const GHOST_TUns8 *)user_path;
+ return (const GHOST_TUns8 *)user_path.c_str();
}
}
diff --git a/intern/ghost/intern/GHOST_SystemSDL.cpp b/intern/ghost/intern/GHOST_SystemSDL.cpp
index 98d52c20ba1..1d2401e6f71 100644
--- a/intern/ghost/intern/GHOST_SystemSDL.cpp
+++ b/intern/ghost/intern/GHOST_SystemSDL.cpp
@@ -276,6 +276,18 @@ convertSDLKey(SDL_Scancode key)
}
#undef GXMAP
+/**
+ * Events don't always have valid windows,
+ * but GHOST needs a window _always_. fallback to the GL window.
+ */
+static SDL_Window *SDL_GetWindowFromID_fallback(Uint32 id)
+{
+ SDL_Window *sdl_win = SDL_GetWindowFromID(id);
+ if (sdl_win == NULL) {
+ sdl_win = SDL_GL_GetCurrentWindow();
+ }
+ return sdl_win;
+}
void
GHOST_SystemSDL::processEvent(SDL_Event *sdl_event)
@@ -286,7 +298,7 @@ GHOST_SystemSDL::processEvent(SDL_Event *sdl_event)
case SDL_WINDOWEVENT:
{
SDL_WindowEvent &sdl_sub_evt = sdl_event->window;
- GHOST_WindowSDL *window = findGhostWindow(SDL_GetWindowFromID(sdl_sub_evt.windowID));
+ GHOST_WindowSDL *window = findGhostWindow(SDL_GetWindowFromID_fallback(sdl_sub_evt.windowID));
//assert(window != NULL); // can be NULL on close window.
switch (sdl_sub_evt.event) {
@@ -318,7 +330,7 @@ GHOST_SystemSDL::processEvent(SDL_Event *sdl_event)
case SDL_MOUSEMOTION:
{
SDL_MouseMotionEvent &sdl_sub_evt = sdl_event->motion;
- SDL_Window *sdl_win = SDL_GetWindowFromID(sdl_sub_evt.windowID);
+ SDL_Window *sdl_win = SDL_GetWindowFromID_fallback(sdl_sub_evt.windowID);
GHOST_WindowSDL *window = findGhostWindow(sdl_win);
assert(window != NULL);
@@ -379,7 +391,7 @@ GHOST_SystemSDL::processEvent(SDL_Event *sdl_event)
GHOST_TButtonMask gbmask = GHOST_kButtonMaskLeft;
GHOST_TEventType type = (sdl_sub_evt.state == SDL_PRESSED) ? GHOST_kEventButtonDown : GHOST_kEventButtonUp;
- GHOST_WindowSDL *window = findGhostWindow(SDL_GetWindowFromID(sdl_sub_evt.windowID));
+ GHOST_WindowSDL *window = findGhostWindow(SDL_GetWindowFromID_fallback(sdl_sub_evt.windowID));
assert(window != NULL);
/* process rest of normal mouse buttons */
@@ -403,7 +415,7 @@ GHOST_SystemSDL::processEvent(SDL_Event *sdl_event)
case SDL_MOUSEWHEEL:
{
SDL_MouseWheelEvent &sdl_sub_evt = sdl_event->wheel;
- GHOST_WindowSDL *window = findGhostWindow(SDL_GetWindowFromID(sdl_sub_evt.windowID));
+ GHOST_WindowSDL *window = findGhostWindow(SDL_GetWindowFromID_fallback(sdl_sub_evt.windowID));
assert(window != NULL);
g_event = new GHOST_EventWheel(getMilliSeconds(), window, sdl_sub_evt.y);
}
@@ -415,7 +427,7 @@ GHOST_SystemSDL::processEvent(SDL_Event *sdl_event)
SDL_Keycode sym = sdl_sub_evt.keysym.sym;
GHOST_TEventType type = (sdl_sub_evt.state == SDL_PRESSED) ? GHOST_kEventKeyDown : GHOST_kEventKeyUp;
- GHOST_WindowSDL *window = findGhostWindow(SDL_GetWindowFromID(sdl_sub_evt.windowID));
+ GHOST_WindowSDL *window = findGhostWindow(SDL_GetWindowFromID_fallback(sdl_sub_evt.windowID));
assert(window != NULL);
GHOST_TKey gkey = convertSDLKey(sdl_sub_evt.keysym.scancode);
@@ -532,7 +544,7 @@ GHOST_SystemSDL::generateWindowExposeEvents()
(*w_start)->validate();
if (g_event) {
- printf("Expose events pushed\n");
+ //printf("Expose events pushed\n");
pushEvent(g_event);
anyProcessed = true;
}
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index a0ebb2c25dc..ebb419b6c04 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -599,17 +599,19 @@ GHOST_TKey GHOST_SystemWin32::convertKey(GHOST_IWindow *window, short vKey, shor
case VK_GR_LESS: key = GHOST_kKeyGrLess; break;
case VK_SHIFT:
- /* Check single shift presses */
- if (scanCode == 0x36) {
- key = GHOST_kKeyRightShift;
- } else if (scanCode == 0x2a) {
- key = GHOST_kKeyLeftShift;
- } else {
- /* Must be a combination SHIFT (Left or Right) + a Key
- * Ignore this as the next message will contain
- * the desired "Key" */
- key = GHOST_kKeyUnknown;
- }
+ /* Check single shift presses */
+ if (scanCode == 0x36) {
+ key = GHOST_kKeyRightShift;
+ }
+ else if (scanCode == 0x2a) {
+ key = GHOST_kKeyLeftShift;
+ }
+ else {
+ /* Must be a combination SHIFT (Left or Right) + a Key
+ * Ignore this as the next message will contain
+ * the desired "Key" */
+ key = GHOST_kKeyUnknown;
+ }
break;
case VK_CONTROL:
key = (extend) ? GHOST_kKeyRightControl : GHOST_kKeyLeftControl;
@@ -1110,7 +1112,7 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
event = processWindowEvent(LOWORD(wParam) ? GHOST_kEventWindowActivate : GHOST_kEventWindowDeactivate, window);
/* WARNING: Let DefWindowProc handle WM_ACTIVATE, otherwise WM_MOUSEWHEEL
* will not be dispatched to OUR active window if we minimize one of OUR windows. */
- if(LOWORD(wParam)==WA_INACTIVE)
+ if (LOWORD(wParam)==WA_INACTIVE)
window->lostMouseCapture();
lResult = ::DefWindowProc(hwnd, msg, wParam, lParam);
@@ -1136,10 +1138,9 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
* function when the application obtains a WM_PAINT message by using the GetMessage or
* PeekMessage function.
*/
- if(!window->m_inLiveResize)
- {
- event = processWindowEvent(GHOST_kEventWindowUpdate, window);
- ::ValidateRect(hwnd, NULL);
+ if (!window->m_inLiveResize) {
+ event = processWindowEvent(GHOST_kEventWindowUpdate, window);
+ ::ValidateRect(hwnd, NULL);
}
else {
eventHandled = true;
@@ -1163,15 +1164,13 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
* message without calling DefWindowProc.
*/
/* we get first WM_SIZE before we fully init. So, do not dispatch before we continiously resizng */
- if(window->m_inLiveResize)
- {
- system->pushEvent(processWindowEvent(GHOST_kEventWindowSize, window));
- system->dispatchEvents();
- }
- else
- {
- event = processWindowEvent(GHOST_kEventWindowSize, window);
- }
+ if (window->m_inLiveResize) {
+ system->pushEvent(processWindowEvent(GHOST_kEventWindowSize, window));
+ system->dispatchEvents();
+ }
+ else {
+ event = processWindowEvent(GHOST_kEventWindowSize, window);
+ }
break;
case WM_CAPTURECHANGED:
window->lostMouseCapture();
@@ -1187,16 +1186,14 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
* to perform any move or size change processing during the WM_WINDOWPOSCHANGED
* message without calling DefWindowProc.
*/
- /* see WM_SIZE comment*/
- if(window->m_inLiveResize)
- {
- system->pushEvent(processWindowEvent(GHOST_kEventWindowMove, window));
- system->dispatchEvents();
- }
- else
- {
- event = processWindowEvent(GHOST_kEventWindowMove, window);
- }
+ /* see WM_SIZE comment*/
+ if (window->m_inLiveResize) {
+ system->pushEvent(processWindowEvent(GHOST_kEventWindowMove, window));
+ system->dispatchEvents();
+ }
+ else {
+ event = processWindowEvent(GHOST_kEventWindowMove, window);
+ }
break;
////////////////////////////////////////////////////////////////////////
diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp
index 2e39ee812ca..0746dd8f14a 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -1729,11 +1729,15 @@ GHOST_TUns8 *GHOST_SystemX11::getClipboard(bool selection) const
continue;
}
else if (context == XCLIB_XCOUT_FALLBACK_COMP) {
- /* compouned text faile, move to text. */
+ /* compouned text fail, move to text. */
context = XCLIB_XCOUT_NONE;
target = m_atom.TEXT;
continue;
}
+ else if (context == XCLIB_XCOUT_FALLBACK_TEXT) {
+ /* text fail, nothing else to try, break. */
+ context = XCLIB_XCOUT_NONE;
+ }
/* only continue if xcout() is doing something */
if (context == XCLIB_XCOUT_NONE)
diff --git a/intern/ghost/intern/GHOST_WindowCocoa.h b/intern/ghost/intern/GHOST_WindowCocoa.h
index fe0830edeae..28a463c47f4 100644
--- a/intern/ghost/intern/GHOST_WindowCocoa.h
+++ b/intern/ghost/intern/GHOST_WindowCocoa.h
@@ -269,7 +269,9 @@ public:
GHOST_TSuccess beginFullScreen() const {return GHOST_kFailure;}
GHOST_TSuccess endFullScreen() const {return GHOST_kFailure;}
-
+
+ /** public function to get the window containing the OpenGL view */
+ CocoaWindow *getCocoaWindow() const {return m_window;};
protected:
/**
diff --git a/intern/ghost/intern/GHOST_WindowSDL.cpp b/intern/ghost/intern/GHOST_WindowSDL.cpp
index 47f41ea40a9..4a1086144f4 100644
--- a/intern/ghost/intern/GHOST_WindowSDL.cpp
+++ b/intern/ghost/intern/GHOST_WindowSDL.cpp
@@ -535,16 +535,16 @@ static void sdl_cursor_init(void)
{
#define DEF_CURSOR(name, ind) \
- assert( \
- ( \
- sdl_std_cursor_array[(int)ind] = \
- sdl_ghost_CreateCursor(sdl_std_cursor_##name, \
- sdl_std_cursor_mask_##name, \
- sdl_std_cursor_WIDTH_##name, \
- sdl_std_cursor_HEIGHT_##name, \
- (sdl_std_cursor_WIDTH_##name + (sdl_std_cursor_HOT_X_##name)) - 1, \
- (sdl_std_cursor_HEIGHT_##name + (sdl_std_cursor_HOT_Y_##name)) - 1) \
- ) != NULL) \
+ { \
+ sdl_std_cursor_array[(int)ind] = \
+ sdl_ghost_CreateCursor(sdl_std_cursor_##name, \
+ sdl_std_cursor_mask_##name, \
+ sdl_std_cursor_WIDTH_##name, \
+ sdl_std_cursor_HEIGHT_##name, \
+ (sdl_std_cursor_WIDTH_##name + (sdl_std_cursor_HOT_X_##name)) - 1, \
+ (sdl_std_cursor_HEIGHT_##name + (sdl_std_cursor_HOT_Y_##name)) - 1); \
+ assert(sdl_std_cursor_array[(int)ind] != NULL); \
+ } (void)0
DEF_CURSOR(left_ptr, GHOST_kStandardCursorDefault);
@@ -638,3 +638,16 @@ GHOST_WindowSDL::setWindowCursorVisibility(bool visible)
SDL_ShowCursor(visible);
return GHOST_kSuccess;
}
+
+GHOST_TSuccess
+GHOST_WindowSDL::setSwapInterval(int interval)
+{
+ SDL_GL_SetSwapInterval(interval);
+ return GHOST_kSuccess;
+}
+
+int
+GHOST_WindowSDL::getSwapInterval()
+{
+ return SDL_GL_GetSwapInterval();
+}
diff --git a/intern/ghost/intern/GHOST_WindowSDL.h b/intern/ghost/intern/GHOST_WindowSDL.h
index 8260a318cea..0c11ce19b50 100644
--- a/intern/ghost/intern/GHOST_WindowSDL.h
+++ b/intern/ghost/intern/GHOST_WindowSDL.h
@@ -173,6 +173,8 @@ protected:
GHOST_TSuccess endFullScreen() const { return GHOST_kFailure; }
+ GHOST_TSuccess setSwapInterval(int interval);
+ int getSwapInterval();
};
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp
index c264686fbb1..8290f4ee205 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.cpp
+++ b/intern/ghost/intern/GHOST_WindowWin32.cpp
@@ -1135,10 +1135,12 @@ void GHOST_WindowWin32::processWin32TabletEvent(WPARAM wParam, LPARAM lParam)
break;
case 1:
case 4:
+ case 7:
m_tabletData->Active = GHOST_kTabletModeStylus; /* stylus */
break;
case 2:
case 5:
+ case 8:
m_tabletData->Active = GHOST_kTabletModeEraser; /* eraser */
break;
}
diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp
index 3173736c2a5..c32b2727c4c 100644
--- a/intern/ghost/intern/GHOST_WindowX11.cpp
+++ b/intern/ghost/intern/GHOST_WindowX11.cpp
@@ -65,6 +65,14 @@ typedef struct {
long input_mode;
} MotifWmHints;
+// Workaround for MESA bug #54080
+// https://bugs.freedesktop.org/show_bug.cgi?id=54080()
+#define SWAP_INTERVALS_WORKAROUND
+
+#ifdef SWAP_INTERVALS_WORKAROUND
+static bool g_swap_interval_disabled = false;
+#endif // SWAP_INTERVALS_WORKAROUND
+
#define MWM_HINTS_DECORATIONS (1L << 1)
@@ -182,7 +190,6 @@ GHOST_WindowX11(
* X can find us a visual matching those requirements. */
int attributes[40], i, samples;
- Atom atoms[2];
int natom;
int glxVersionMajor, glxVersionMinor; /* As in GLX major.minor */
@@ -405,6 +412,7 @@ GHOST_WindowX11(
/* The basic for a good ICCCM "work" */
if (m_system->m_atom.WM_PROTOCOLS) {
+ Atom atoms[2];
natom = 0;
if (m_system->m_atom.WM_DELETE_WINDOW) {
@@ -1519,18 +1527,67 @@ endFullScreen() const
GHOST_TSuccess
GHOST_WindowX11::
setSwapInterval(int interval) {
- if (!GLX_EXT_swap_control)
+ if (!GLX_EXT_swap_control || !glXSwapIntervalEXT
+#ifdef SWAP_INTERVALS_WORKAROUND
+ || g_swap_interval_disabled
+#endif // SWAP_INTERVALS_WORKAROUND
+ )
+ {
return GHOST_kFailure;
+ }
glXSwapIntervalEXT(m_display, m_window, interval);
return GHOST_kSuccess;
}
+#ifdef SWAP_INTERVALS_WORKAROUND
+static int QueryDrawable_ApplicationErrorHandler(Display *display, XErrorEvent *theEvent)
+{
+ fprintf(stderr, "Ignoring Xlib error: error code %d request code %d\n",
+ theEvent->error_code, theEvent->request_code);
+ if (!g_swap_interval_disabled) {
+ fprintf(stderr, "Disabling SWAP INTERVALS extension\n");
+ g_swap_interval_disabled = true;
+ }
+ return 0;
+}
+
+static int QueryDrawable_ApplicationIOErrorHandler(Display *display)
+{
+ fprintf(stderr, "Ignoring Xlib error: error IO\n");
+ if (!g_swap_interval_disabled) {
+ fprintf(stderr, "Disabling SWAP INTERVALS extension\n");
+ g_swap_interval_disabled = true;
+ }
+ return 0;
+}
+#endif // SWAP_INTERVALS_WORKAROUND
+
int
GHOST_WindowX11::
getSwapInterval() {
if (GLX_EXT_swap_control) {
- unsigned int value;
+#ifdef SWAP_INTERVALS_WORKAROUND
+ /* XXX: Current MESA driver will give GLXBadDrawable for all
+ * the glXQueryDrawable requests with direct contexts.
+ *
+ * To prevent crashes and unexpected behaviors, we will
+ * disable swap intervals extension if query fails here.
+ * (because if we will override interval without having
+ * old value we couldn't restore it properly).
+ */
+ XErrorHandler old_handler = XSetErrorHandler(QueryDrawable_ApplicationErrorHandler);
+ XIOErrorHandler old_handler_io = XSetIOErrorHandler(QueryDrawable_ApplicationIOErrorHandler);
+#endif // SWAP_INTERVALS_WORKAROUND
+
+ unsigned int value = 0;
glXQueryDrawable(m_display, m_window, GLX_SWAP_INTERVAL_EXT, &value);
+
+#ifdef SWAP_INTERVALS_WORKAROUND
+ /* Restore handler */
+ (void) XSetErrorHandler(old_handler);
+ (void) XSetIOErrorHandler(old_handler_io);
+#endif // SWAP_INTERVALS_WORKAROUND
+
return (int)value;
}
return 0;
diff --git a/intern/ghost/test/CMakeLists.txt b/intern/ghost/test/CMakeLists.txt
index 98d0f290350..455fff74a5c 100644
--- a/intern/ghost/test/CMakeLists.txt
+++ b/intern/ghost/test/CMakeLists.txt
@@ -4,6 +4,10 @@ cmake_policy(SET CMP0005 NEW)
cmake_minimum_required(VERSION 2.8)
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../../..//build_files/cmake/Modules")
+
+set(WITH_GUARDEDALLOC ON)
+
# -----------------------------------------------------------------------------
# Macros
@@ -33,6 +37,21 @@ macro(suffix_relpaths
unset(_file)
endmacro()
+macro(data_to_c
+ file_from file_to
+ list_to_add)
+
+ list(APPEND ${list_to_add} ${file_to})
+
+ get_filename_component(_file_to_path ${file_to} PATH)
+
+ add_custom_command(
+ OUTPUT ${file_to}
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${_file_to_path}
+ COMMAND ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/datatoc ${file_from} ${file_to}
+ DEPENDS ${file_from} datatoc)
+ unset(_file_to_path)
+endmacro()
# -----------------------------------------------------------------------------
# Defines
@@ -52,7 +71,6 @@ else()
unset(_SYSTEM_BIG_ENDIAN)
endif()
-
# -----------------------------------------------------------------------------
# Libraries
@@ -84,23 +102,36 @@ suffix_relpaths(SRC_NEW "${SRC}" "../../../source/blender/blenfont/")
include_directories(${INC_NEW})
add_library(blenfont_lib ${SRC_NEW})
+# wcwidth
+include(${CMAKE_SOURCE_DIR}/../../../extern/wcwidth/CMakeLists.txt)
+suffix_relpaths(INC_NEW "${INC}" "../../../extern/wcwidth/")
+suffix_relpaths(SRC_NEW "${SRC}" "../../../extern/wcwidth/")
+include_directories(${INC_NEW})
+add_library(wcwidth_lib ${SRC_NEW})
+
# grr, blenfont needs BLI
include_directories(
"../../../source/blender/blenlib"
)
add_library(bli_lib
"../../../source/blender/blenlib/intern/fileops.c"
+ "../../../source/blender/blenlib/intern/gsqueue.c"
"../../../source/blender/blenlib/intern/rct.c"
"../../../source/blender/blenlib/intern/string.c"
"../../../source/blender/blenlib/intern/string_utf8.c"
"../../../source/blender/blenlib/intern/listbase.c"
+ "../../../source/blender/blenlib/intern/math_color.c"
"../../../source/blender/blenlib/intern/storage.c"
+ "../../../source/blender/blenlib/intern/threads.c"
+ "../../../source/blender/blenlib/intern/time.c"
"../../../source/blender/blenlib/intern/path_util.c"
"../../../source/blender/blenlib/intern/BLI_dynstr.c"
"../../../source/blender/blenlib/intern/BLI_linklist.c"
"../../../source/blender/blenlib/intern/BLI_memarena.c"
+ "../../../source/blender/blenlib/intern/BLI_mempool.c"
)
+set(PLATFORM_CGLAGS)
find_package(OpenGL REQUIRED)
@@ -113,18 +144,38 @@ include_directories(${OPENGL_INCLUDE_DIR})
include_directories(${FREETYPE_INCLUDE_DIRS})
include_directories(${CMAKE_SOURCE_DIR}/../../../source/blender/blenfont)
+if(CMAKE_COMPILER_IS_GNUCC)
+ set(PLATFORM_CFLAGS "-funsigned-char")
+endif()
+
if(UNIX AND NOT APPLE)
find_package(X11 REQUIRED)
+ find_package(GLEW)
+
+ if(NOT GLEW_FOUND)
+ message(FATAL_ERROR "GLEW is required to build blender, install it or disable WITH_SYSTEM_GLEW")
+ endif()
set(PLATFORM_LINKLIBS
${X11_X11_LIB}
${X11_Xinput_LIB}
+ ${GLEW_LIBRARY}
+ -lpthread
)
+else()
+ # set(GLEW_LIBRARY "") # unused
+ set(GLEW_INCLUDE_PATH "${CMAKE_SOURCE_DIR}/extern/glew/include")
endif()
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS}")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PLATFORM_CFLAGS}")
+
# -----------------------------------------------------------------------------
# Executables
+# DataToC
+add_executable(datatoc
+ ${CMAKE_SOURCE_DIR}/../../../source/blender/datatoc/datatoc.c)
# Gears (C)
add_executable(gears_c
@@ -153,22 +204,29 @@ target_link_libraries(gears_cpp
# MultiTest (C)
+set(data_to_c_files)
+data_to_c(${CMAKE_SOURCE_DIR}/../../../release/datafiles/bfont.ttf
+ ${CMAKE_CURRENT_BINARY_DIR}/bfont.ttf.c data_to_c_files)
+
add_executable(multitest_c
- ${CMAKE_SOURCE_DIR}/../../../source/blender/editors/datafiles/bfont.ttf.c
${CMAKE_SOURCE_DIR}/multitest/Basic.c
${CMAKE_SOURCE_DIR}/multitest/EventToBuf.c
${CMAKE_SOURCE_DIR}/multitest/MultiTest.c
${CMAKE_SOURCE_DIR}/multitest/ScrollBar.c
${CMAKE_SOURCE_DIR}/multitest/Util.c
${CMAKE_SOURCE_DIR}/multitest/WindowData.c
+ ${CMAKE_SOURCE_DIR}/multitest/stubs.c
+ ${data_to_c_files}
)
+
target_link_libraries(multitest_c
blenfont_lib
bli_lib
ghost_lib
string_lib
guardedalloc_lib
+ wcwidth_lib
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
${FREETYPE_LIBRARY}
diff --git a/intern/ghost/test/gears/GHOST_Test.cpp b/intern/ghost/test/gears/GHOST_Test.cpp
index 1e641a8643c..6709956e2dd 100644
--- a/intern/ghost/test/gears/GHOST_Test.cpp
+++ b/intern/ghost/test/gears/GHOST_Test.cpp
@@ -715,13 +715,16 @@ int main(int /*argc*/, char ** /*argv*/)
// Add the application as event consumer
fSystem->addEventConsumer(&app);
-
+
// Enter main loop
while (!app.m_exitRequested) {
//printf("main: loop\n");
fSystem->processEvents(true);
fSystem->dispatchEvents();
}
+
+ // Remove so ghost doesn't do a double free
+ fSystem->removeEventConsumer(&app);
}
// Dispose the system
diff --git a/intern/ghost/test/multitest/MultiTest.c b/intern/ghost/test/multitest/MultiTest.c
index 2d0afcf671c..e9d5880651e 100644
--- a/intern/ghost/test/multitest/MultiTest.c
+++ b/intern/ghost/test/multitest/MultiTest.c
@@ -931,11 +931,13 @@ void multitestapp_free(MultiTestApp *app)
int main(int argc, char **argv)
{
+ MultiTestApp *app;
+
#ifndef USE_BMF
BLF_init(11, 72);
#endif
- MultiTestApp *app = multitestapp_new();
+ app = multitestapp_new();
multitestapp_run(app);
multitestapp_free(app);
diff --git a/source/blender/compositor/operations/COM_RenderLayersAOOperation.cpp b/intern/ghost/test/multitest/stubs.c
index bb165c2fe1c..2cb17675fd6 100644
--- a/source/blender/compositor/operations/COM_RenderLayersAOOperation.cpp
+++ b/intern/ghost/test/multitest/stubs.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2011, Blender Foundation.
+ * ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -15,15 +15,22 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * The Original Code is Copyright (C) 2013 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
*/
-#include "COM_RenderLayersAOOperation.h"
+#include <stdlib.h>
+
+#include "BLI_utildefines.h"
+#include "IMB_imbuf.h"
-RenderLayersAOOperation::RenderLayersAOOperation() : RenderLayersBaseProg(SCE_PASS_AO, 3)
-{
- this->addOutputSocket(COM_DT_COLOR);
-}
+struct ImBuf;
+void IMB_freeImBuf(struct ImBuf *UNUSED(ibuf)) {}
+void IMB_colormanagement_display_to_scene_linear_v3(float UNUSED(pixel[3]), struct ColorManagedDisplay *UNUSED(display)) {}
diff --git a/intern/guardedalloc/CMakeLists.txt b/intern/guardedalloc/CMakeLists.txt
index 4f6c177ef7d..b7a59da7813 100644
--- a/intern/guardedalloc/CMakeLists.txt
+++ b/intern/guardedalloc/CMakeLists.txt
@@ -25,6 +25,7 @@
set(INC
.
+ ../atomic
)
set(INC_SYS
@@ -33,8 +34,11 @@ set(INC_SYS
set(SRC
./intern/mallocn.c
+ ./intern/mallocn_guarded_impl.c
+ ./intern/mallocn_lockfree_impl.c
MEM_guardedalloc.h
+ ./intern/mallocn_intern.h
)
if(WIN32 AND NOT UNIX)
@@ -45,12 +49,6 @@ if(WIN32 AND NOT UNIX)
)
endif()
-if (WITH_GUARDEDALLOC)
- add_definitions(-DWITH_GUARDEDALLOC)
-else()
- message(WARNING "Disabling GuardedAlloc is experemental, use at own risk!")
-endif()
-
blender_add_lib(bf_intern_guardedalloc "${SRC}" "${INC}" "${INC_SYS}")
# Override C++ alloc, optional.
diff --git a/intern/guardedalloc/MEM_guardedalloc.h b/intern/guardedalloc/MEM_guardedalloc.h
index 0939fe1cf86..4fb68965338 100644
--- a/intern/guardedalloc/MEM_guardedalloc.h
+++ b/intern/guardedalloc/MEM_guardedalloc.h
@@ -62,11 +62,9 @@
#include <stdio.h> /* needed for FILE* */
-/* needed for uintptr_t, exception, dont use BLI anywhere else in MEM_* */
+/* needed for uintptr_t and attributes, exception, dont use BLI anywhere else in MEM_* */
#include "../../source/blender/blenlib/BLI_sys_types.h"
-
-/* some GNU attributes are only available from GCC 4.3 */
-#define MEM_GNU_ATTRIBUTES (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 403))
+#include "../../source/blender/blenlib/BLI_compiler_attrs.h"
#ifdef __cplusplus
extern "C" {
@@ -75,57 +73,36 @@ extern "C" {
/** Returns the length of the allocated memory segment pointed at
* by vmemh. If the pointer was not previously allocated by this
* module, the result is undefined.*/
- size_t MEM_allocN_len(const void *vmemh)
-#if MEM_GNU_ATTRIBUTES
- __attribute__((warn_unused_result))
-#endif
- ;
+ extern size_t (*MEM_allocN_len)(const void *vmemh) ATTR_WARN_UNUSED_RESULT;
/**
* Release memory previously allocatred by this module.
*/
- void MEM_freeN(void *vmemh);
+ extern void (*MEM_freeN)(void *vmemh);
#if 0 /* UNUSED */
/**
* Return zero if memory is not in allocated list
*/
- short MEM_testN(void *vmemh);
+ extern short (*MEM_testN)(void *vmemh);
#endif
/**
* Duplicates a block of memory, and returns a pointer to the
* newly allocated block. */
- void *MEM_dupallocN(const void *vmemh)
-#if MEM_GNU_ATTRIBUTES
- __attribute__((malloc))
- __attribute__((warn_unused_result))
-#endif
- ;
+ extern void *(*MEM_dupallocN)(const void *vmemh) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT;
/**
* Reallocates a block of memory, and returns pointer to the newly
* allocated block, the old one is freed. this is not as optimized
* as a system realloc but just makes a new allocation and copies
* over from existing memory. */
- void *MEM_reallocN_id(void *vmemh, size_t len, const char *str)
-#if MEM_GNU_ATTRIBUTES
- __attribute__((malloc))
- __attribute__((warn_unused_result))
- __attribute__((alloc_size(2)))
-#endif
- ;
+ extern void *(*MEM_reallocN_id)(void *vmemh, size_t len, const char *str) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(2);
/**
* A variant of realloc which zeros new bytes
*/
- void *MEM_recallocN_id(void *vmemh, size_t len, const char *str)
-#if MEM_GNU_ATTRIBUTES
- __attribute__((malloc))
- __attribute__((warn_unused_result))
- __attribute__((alloc_size(2)))
-#endif
- ;
+ extern void *(*MEM_recallocN_id)(void *vmemh, size_t len, const char *str) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(2);
#define MEM_reallocN(vmemh, len) MEM_reallocN_id(vmemh, len, __func__)
#define MEM_recallocN(vmemh, len) MEM_recallocN_id(vmemh, len, __func__)
@@ -134,97 +111,79 @@ extern "C" {
* Allocate a block of memory of size len, with tag name str. The
* memory is cleared. The name must be static, because only a
* pointer to it is stored ! */
- void *MEM_callocN(size_t len, const char *str)
-#if MEM_GNU_ATTRIBUTES
- __attribute__((malloc))
- __attribute__((warn_unused_result))
- __attribute__((nonnull(2)))
- __attribute__((alloc_size(1)))
-#endif
- ;
+ extern void *(*MEM_callocN)(size_t len, const char *str) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2);
/**
* Allocate a block of memory of size len, with tag name str. The
* name must be a static, because only a pointer to it is stored !
* */
- void *MEM_mallocN(size_t len, const char *str)
-#if MEM_GNU_ATTRIBUTES
- __attribute__((malloc))
- __attribute__((warn_unused_result))
- __attribute__((nonnull(2)))
- __attribute__((alloc_size(1)))
-#endif
- ;
+ extern void *(*MEM_mallocN)(size_t len, const char *str) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2);
/**
* Same as callocN, clears memory and uses mmap (disk cached) if supported.
* Can be free'd with MEM_freeN as usual.
* */
- void *MEM_mapallocN(size_t len, const char *str)
-#if MEM_GNU_ATTRIBUTES
- __attribute__((malloc))
- __attribute__((warn_unused_result))
- __attribute__((nonnull(2)))
- __attribute__((alloc_size(1)))
-#endif
- ;
+ extern void *(*MEM_mapallocN)(size_t len, const char *str) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2);
/** Print a list of the names and sizes of all allocated memory
* blocks. as a python dict for easy investigation */
- void MEM_printmemlist_pydict(void);
+ extern void (*MEM_printmemlist_pydict)(void);
/** Print a list of the names and sizes of all allocated memory
* blocks. */
- void MEM_printmemlist(void);
+ extern void (*MEM_printmemlist)(void);
/** calls the function on all allocated memory blocks. */
- void MEM_callbackmemlist(void (*func)(void *));
+ extern void (*MEM_callbackmemlist)(void (*func)(void *));
/** Print statistics about memory usage */
- void MEM_printmemlist_stats(void);
+ extern void (*MEM_printmemlist_stats)(void);
/** Set the callback function for error output. */
- void MEM_set_error_callback(void (*func)(const char *));
+ extern void (*MEM_set_error_callback)(void (*func)(const char *));
/**
* Are the start/end block markers still correct ?
*
* @retval 0 for correct memory, 1 for corrupted memory. */
- int MEM_check_memory_integrity(void);
+ extern bool (*MEM_check_memory_integrity)(void);
/** Set thread locking functions for safe memory allocation from multiple
* threads, pass NULL pointers to disable thread locking again. */
- void MEM_set_lock_callback(void (*lock)(void), void (*unlock)(void));
+ extern void (*MEM_set_lock_callback)(void (*lock)(void), void (*unlock)(void));
/** Attempt to enforce OSX (or other OS's) to have malloc and stack nonzero */
- void MEM_set_memory_debug(void);
+ extern void (*MEM_set_memory_debug)(void);
/**
* Memory usage stats
* - MEM_get_memory_in_use is all memory
* - MEM_get_mapped_memory_in_use is a subset of all memory */
- uintptr_t MEM_get_memory_in_use(void);
+ extern uintptr_t (*MEM_get_memory_in_use)(void);
/** Get mapped memory usage. */
- uintptr_t MEM_get_mapped_memory_in_use(void);
+ extern uintptr_t (*MEM_get_mapped_memory_in_use)(void);
/** Get amount of memory blocks in use. */
- int MEM_get_memory_blocks_in_use(void);
+ extern unsigned int (*MEM_get_memory_blocks_in_use)(void);
/** Reset the peak memory statistic to zero. */
- void MEM_reset_peak_memory(void);
+ extern void (*MEM_reset_peak_memory)(void);
/** Get the peak memory usage in bytes, including mmap allocations. */
- uintptr_t MEM_get_peak_memory(void)
-#if MEM_GNU_ATTRIBUTES
- __attribute__((warn_unused_result))
-#endif
- ;
+ extern size_t (*MEM_get_peak_memory)(void) ATTR_WARN_UNUSED_RESULT;
#define MEM_SAFE_FREE(v) if (v) { MEM_freeN(v); v = NULL; } (void)0
+/* overhead for lockfree allocator (use to avoid slop-space) */
+#define MEM_SIZE_OVERHEAD sizeof(size_t)
+#define MEM_SIZE_OPTIMAL(size) ((size) - MEM_SIZE_OVERHEAD)
+
#ifndef NDEBUG
-const char *MEM_name_ptr(void *vmemh);
+extern const char *(*MEM_name_ptr)(void *vmemh);
#endif
+/* Switch allocator to slower but fully guarded mode. */
+void MEM_use_guarded_allocator(void);
+
#ifdef __cplusplus
/* alloc funcs for C++ only */
#define MEM_CXX_CLASS_ALLOC_FUNCS(_id) \
@@ -244,6 +203,18 @@ public: \
MEM_freeN(mem); \
} \
+#if defined __GNUC__ || defined __sun
+# define OBJECT_GUARDED_NEW(type, args ...) \
+ new(MEM_mallocN(sizeof(type), __func__)) type(args)
+#else
+# define OBJECT_GUARDED_NEW(type, ...) \
+ new(MEM_mallocN(sizeof(type), __FUNCTION__)) type(__VA_ARGS__)
+#endif
+#define OBJECT_GUARDED_DELETE(what, type) \
+ { if(what) { \
+ ((type*)(what))->~type(); \
+ MEM_freeN(what); \
+ } } (void)0
#endif /* __cplusplus */
#ifdef __cplusplus
diff --git a/intern/guardedalloc/SConscript b/intern/guardedalloc/SConscript
index eb558763dbe..3bae808cc94 100644
--- a/intern/guardedalloc/SConscript
+++ b/intern/guardedalloc/SConscript
@@ -29,15 +29,17 @@ Import('env')
defs = []
-sources = ['intern/mallocn.c', 'intern/mmap_win.c']
-
-# could make this optional
-defs.append('WITH_GUARDEDALLOC')
+sources = [
+ 'intern/mallocn.c',
+ 'intern/mallocn_guarded_impl.c',
+ 'intern/mallocn_lockfree_impl.c',
+ 'intern/mmap_win.c'
+]
if env['WITH_BF_CXX_GUARDEDALLOC']:
sources.append('cpp/mallocn.cpp')
defs.append('WITH_CXX_GUARDEDALLOC')
-incs = '.'
+incs = '. ../atomic'
env.BlenderLib ('bf_intern_guardedalloc', sources, Split(incs), defs, libtype=['intern','player'], priority = [5,150] )
diff --git a/intern/guardedalloc/intern/mallocn.c b/intern/guardedalloc/intern/mallocn.c
index 06ae2ee864d..2ac01a6c7e4 100644
--- a/intern/guardedalloc/intern/mallocn.c
+++ b/intern/guardedalloc/intern/mallocn.c
@@ -32,1223 +32,64 @@
* Guarded memory allocation, and boundary-write detection.
*/
-#include <stdlib.h>
-#include <string.h> /* memcpy */
-#include <stdarg.h>
-#include <sys/types.h>
-
-/* mmap exception */
-#if defined(WIN32)
-# include "mmap_win.h"
-#else
-# include <sys/mman.h>
-#endif
-
-#if defined(_MSC_VER)
-# define __func__ __FUNCTION__
-#endif
-
#include "MEM_guardedalloc.h"
-/* should always be defined except for experimental cases */
-#ifdef WITH_GUARDEDALLOC
-
-/* Blame Microsoft for LLP64 and no inttypes.h, quick workaround needed: */
-#if defined(WIN64)
-# define SIZET_FORMAT "%I64u"
-# define SIZET_ARG(a) ((unsigned long long)(a))
-#else
-# define SIZET_FORMAT "%lu"
-# define SIZET_ARG(a) ((unsigned long)(a))
-#endif
-
-/* Only for debugging:
- * store original buffer's name when doing MEM_dupallocN
- * helpful to profile issues with non-freed "dup_alloc" buffers,
- * but this introduces some overhead to memory header and makes
- * things slower a bit, so better to keep disabled by default
- */
-//#define DEBUG_MEMDUPLINAME
-
-/* Only for debugging:
- * lets you count the allocations so as to find the allocator of unfreed memory
- * in situations where the leak is predictable */
-
-//#define DEBUG_MEMCOUNTER
-
-/* Only for debugging:
- * defining DEBUG_THREADS will enable check whether memory manager
- * is locked with a mutex when allocation is called from non-main
- * thread.
- *
- * This helps troubleshooting memory issues caused by the fact
- * guarded allocator is not thread-safe, however this check will
- * fail to check allocations from openmp threads.
- */
-//#define DEBUG_THREADS
-
-/* Only for debugging:
- * Defining DEBUG_BACKTRACE will store a backtrace from where
- * memory block was allocated and print this trace for all
- * unfreed blocks.
- */
-//#define DEBUG_BACKTRACE
-
-#ifdef DEBUG_BACKTRACE
-# define BACKTRACE_SIZE 100
-#endif
-
-#ifdef DEBUG_MEMCOUNTER
- /* set this to the value that isn't being freed */
-# define DEBUG_MEMCOUNTER_ERROR_VAL 0
-static int _mallocn_count = 0;
-
-/* breakpoint here */
-static void memcount_raise(const char *name)
-{
- fprintf(stderr, "%s: memcount-leak, %d\n", name, _mallocn_count);
-}
-#endif
-
-/* --------------------------------------------------------------------- */
-/* Data definition */
-/* --------------------------------------------------------------------- */
-/* all memory chunks are put in linked lists */
-typedef struct localLink {
- struct localLink *next, *prev;
-} localLink;
-
-typedef struct localListBase {
- void *first, *last;
-} localListBase;
-
-/* note: keep this struct aligned (e.g., irix/gcc) - Hos */
-typedef struct MemHead {
- int tag1;
- size_t len;
- struct MemHead *next, *prev;
- const char *name;
- const char *nextname;
- int tag2;
- int mmap; /* if true, memory was mmapped */
-#ifdef DEBUG_MEMCOUNTER
- int _count;
-#endif
-
-#ifdef DEBUG_MEMDUPLINAME
- int need_free_name, pad;
-#endif
-
-#ifdef DEBUG_BACKTRACE
- void *backtrace[BACKTRACE_SIZE];
- int backtrace_size;
-#endif
-} MemHead;
-
-/* for openmp threading asserts, saves time troubleshooting
- * we may need to extend this if blender code starts using MEM_
- * functions inside OpenMP correctly with omp_set_lock() */
-
-#if 0 /* disable for now, only use to debug openmp code which doesn lock threads for malloc */
-#if defined(_OPENMP) && defined(DEBUG)
-# include <assert.h>
-# include <omp.h>
-# define DEBUG_OMP_MALLOC
-#endif
-#endif
-
-#ifdef DEBUG_THREADS
-# include <assert.h>
-# include <pthread.h>
-static pthread_t mainid;
-#endif
-
-#ifdef DEBUG_BACKTRACE
-# if defined(__linux__) || defined(__APPLE__)
-# include <execinfo.h>
-// Windows is not supported yet.
-//# elif defined(_MSV_VER)
-//# include <DbgHelp.h>
-# endif
-#endif
-
-typedef struct MemTail {
- int tag3, pad;
-} MemTail;
-
-
-/* --------------------------------------------------------------------- */
-/* local functions */
-/* --------------------------------------------------------------------- */
-
-static void addtail(volatile localListBase *listbase, void *vlink);
-static void remlink(volatile localListBase *listbase, void *vlink);
-static void rem_memblock(MemHead *memh);
-static void MemorY_ErroR(const char *block, const char *error);
-static const char *check_memlist(MemHead *memh);
-
-/* --------------------------------------------------------------------- */
-/* locally used defines */
-/* --------------------------------------------------------------------- */
-
-#ifdef __BIG_ENDIAN__
-# define MAKE_ID(a, b, c, d) ((int)(a) << 24 | (int)(b) << 16 | (c) << 8 | (d))
-#else
-# define MAKE_ID(a, b, c, d) ((int)(d) << 24 | (int)(c) << 16 | (b) << 8 | (a))
-#endif
-
-#define MEMTAG1 MAKE_ID('M', 'E', 'M', 'O')
-#define MEMTAG2 MAKE_ID('R', 'Y', 'B', 'L')
-#define MEMTAG3 MAKE_ID('O', 'C', 'K', '!')
-#define MEMFREE MAKE_ID('F', 'R', 'E', 'E')
-
-#define MEMNEXT(x) \
- ((MemHead *)(((char *) x) - ((char *) &(((MemHead *)0)->next))))
-
-/* --------------------------------------------------------------------- */
-/* vars */
-/* --------------------------------------------------------------------- */
-
-
-static volatile int totblock = 0;
-static volatile uintptr_t mem_in_use = 0, mmap_in_use = 0, peak_mem = 0;
-
-static volatile struct localListBase _membase;
-static volatile struct localListBase *membase = &_membase;
-static void (*error_callback)(const char *) = NULL;
-static void (*thread_lock_callback)(void) = NULL;
-static void (*thread_unlock_callback)(void) = NULL;
-
-static int malloc_debug_memset = 0;
-
-#ifdef malloc
-#undef malloc
-#endif
-
-#ifdef calloc
-#undef calloc
-#endif
-
-#ifdef free
-#undef free
-#endif
-
-
-/* --------------------------------------------------------------------- */
-/* implementation */
-/* --------------------------------------------------------------------- */
-
-#ifdef __GNUC__
-__attribute__ ((format(printf, 1, 2)))
-#endif
-static void print_error(const char *str, ...)
-{
- char buf[512];
- va_list ap;
-
- va_start(ap, str);
- vsnprintf(buf, sizeof(buf), str, ap);
- va_end(ap);
- buf[sizeof(buf) - 1] = '\0';
-
- if (error_callback) error_callback(buf);
-}
-
-static void mem_lock_thread(void)
-{
-#ifdef DEBUG_THREADS
- static int initialized = 0;
-
- if (initialized == 0) {
- /* assume first allocation happens from main thread */
- mainid = pthread_self();
- initialized = 1;
- }
-
- if (!pthread_equal(pthread_self(), mainid) && thread_lock_callback == NULL) {
- assert(!"Memory function is called from non-main thread without lock");
- }
-#endif
-
-#ifdef DEBUG_OMP_MALLOC
- assert(omp_in_parallel() == 0);
-#endif
-
- if (thread_lock_callback)
- thread_lock_callback();
-}
-
-static void mem_unlock_thread(void)
-{
- if (thread_unlock_callback)
- thread_unlock_callback();
-}
-
-int MEM_check_memory_integrity(void)
-{
- const char *err_val = NULL;
- MemHead *listend;
- /* check_memlist starts from the front, and runs until it finds
- * the requested chunk. For this test, that's the last one. */
- listend = membase->last;
-
- err_val = check_memlist(listend);
-
- return (err_val != NULL);
-}
-
-
-void MEM_set_error_callback(void (*func)(const char *))
-{
- error_callback = func;
-}
-
-void MEM_set_lock_callback(void (*lock)(void), void (*unlock)(void))
-{
- thread_lock_callback = lock;
- thread_unlock_callback = unlock;
-}
-
-void MEM_set_memory_debug(void)
-{
- malloc_debug_memset = 1;
-}
-
-size_t MEM_allocN_len(const void *vmemh)
-{
- if (vmemh) {
- const MemHead *memh = vmemh;
-
- memh--;
- return memh->len;
- }
- else {
- return 0;
- }
-}
-
-void *MEM_dupallocN(const void *vmemh)
-{
- void *newp = NULL;
-
- if (vmemh) {
- const MemHead *memh = vmemh;
- memh--;
-
-#ifndef DEBUG_MEMDUPLINAME
- if (memh->mmap)
- newp = MEM_mapallocN(memh->len, "dupli_mapalloc");
- else
- newp = MEM_mallocN(memh->len, "dupli_alloc");
-
- if (newp == NULL) return NULL;
-#else
- {
- MemHead *nmemh;
- char *name = malloc(strlen(memh->name) + 24);
-
- if (memh->mmap) {
- sprintf(name, "%s %s", "dupli_mapalloc", memh->name);
- newp = MEM_mapallocN(memh->len, name);
- }
- else {
- sprintf(name, "%s %s", "dupli_alloc", memh->name);
- newp = MEM_mallocN(memh->len, name);
- }
-
- if (newp == NULL) return NULL;
-
- nmemh = newp;
- nmemh--;
-
- nmemh->need_free_name = 1;
- }
-#endif
-
- memcpy(newp, vmemh, memh->len);
- }
-
- return newp;
-}
-
-void *MEM_reallocN_id(void *vmemh, size_t len, const char *str)
-{
- void *newp = NULL;
-
- if (vmemh) {
- MemHead *memh = vmemh;
- memh--;
-
- newp = MEM_mallocN(len, memh->name);
- if (newp) {
- if (len < memh->len) {
- /* shrink */
- memcpy(newp, vmemh, len);
- }
- else {
- /* grow (or remain same size) */
- memcpy(newp, vmemh, memh->len);
- }
- }
-
- MEM_freeN(vmemh);
- }
- else {
- newp = MEM_mallocN(len, str);
- }
-
- return newp;
-}
-
-void *MEM_recallocN_id(void *vmemh, size_t len, const char *str)
-{
- void *newp = NULL;
-
- if (vmemh) {
- MemHead *memh = vmemh;
- memh--;
-
- newp = MEM_mallocN(len, memh->name);
- if (newp) {
- if (len < memh->len) {
- /* shrink */
- memcpy(newp, vmemh, len);
- }
- else {
- memcpy(newp, vmemh, memh->len);
-
- if (len > memh->len) {
- /* grow */
- /* zero new bytes */
- memset(((char *)newp) + memh->len, 0, len - memh->len);
- }
- }
- }
-
- MEM_freeN(vmemh);
- }
- else {
- newp = MEM_callocN(len, str);
- }
-
- return newp;
-}
-
-#ifdef DEBUG_BACKTRACE
-# if defined(__linux__) || defined(__APPLE__)
-static void make_memhead_backtrace(MemHead *memh)
-{
- memh->backtrace_size = backtrace(memh->backtrace, BACKTRACE_SIZE);
-}
-
-static void print_memhead_backtrace(MemHead *memh)
-{
- char **strings;
- int i;
-
- strings = backtrace_symbols(memh->backtrace, memh->backtrace_size);
- for (i = 0; i < memh->backtrace_size; i++) {
- print_error(" %s\n", strings[i]);
- }
-
- free(strings);
-}
-# else
-static void make_memhead_backtrace(MemHead *memh)
-{
- (void) memh; /* Ignored. */
-}
-
-static void print_memhead_backtrace(MemHead *memh)
-{
- (void) memh; /* Ignored. */
-}
-# endif /* defined(__linux__) || defined(__APPLE__) */
-#endif /* DEBUG_BACKTRACE */
-
-static void make_memhead_header(MemHead *memh, size_t len, const char *str)
-{
- MemTail *memt;
-
- memh->tag1 = MEMTAG1;
- memh->name = str;
- memh->nextname = NULL;
- memh->len = len;
- memh->mmap = 0;
- memh->tag2 = MEMTAG2;
-
-#ifdef DEBUG_MEMDUPLINAME
- memh->need_free_name = 0;
-#endif
-
-#ifdef DEBUG_BACKTRACE
- make_memhead_backtrace(memh);
-#endif
-
- memt = (MemTail *)(((char *) memh) + sizeof(MemHead) + len);
- memt->tag3 = MEMTAG3;
-
- addtail(membase, &memh->next);
- if (memh->next) {
- memh->nextname = MEMNEXT(memh->next)->name;
- }
-
- totblock++;
- mem_in_use += len;
-
- peak_mem = mem_in_use > peak_mem ? mem_in_use : peak_mem;
-}
-
-void *MEM_mallocN(size_t len, const char *str)
-{
- MemHead *memh;
-
- mem_lock_thread();
-
- len = (len + 3) & ~3; /* allocate in units of 4 */
-
- memh = (MemHead *)malloc(len + sizeof(MemHead) + sizeof(MemTail));
-
- if (memh) {
- make_memhead_header(memh, len, str);
- mem_unlock_thread();
- if (malloc_debug_memset && len)
- memset(memh + 1, 255, len);
-
-#ifdef DEBUG_MEMCOUNTER
- if (_mallocn_count == DEBUG_MEMCOUNTER_ERROR_VAL)
- memcount_raise(__func__);
- memh->_count = _mallocn_count++;
-#endif
- return (++memh);
- }
- mem_unlock_thread();
- print_error("Malloc returns null: len=" SIZET_FORMAT " in %s, total %u\n",
- SIZET_ARG(len), str, (unsigned int) mem_in_use);
- return NULL;
-}
-
-void *MEM_callocN(size_t len, const char *str)
-{
- MemHead *memh;
-
- mem_lock_thread();
-
- len = (len + 3) & ~3; /* allocate in units of 4 */
-
- memh = (MemHead *)calloc(len + sizeof(MemHead) + sizeof(MemTail), 1);
-
- if (memh) {
- make_memhead_header(memh, len, str);
- mem_unlock_thread();
-#ifdef DEBUG_MEMCOUNTER
- if (_mallocn_count == DEBUG_MEMCOUNTER_ERROR_VAL)
- memcount_raise(__func__);
- memh->_count = _mallocn_count++;
-#endif
- return (++memh);
- }
- mem_unlock_thread();
- print_error("Calloc returns null: len=" SIZET_FORMAT " in %s, total %u\n",
- SIZET_ARG(len), str, (unsigned int) mem_in_use);
- return NULL;
-}
-
-/* note; mmap returns zero'd memory */
-void *MEM_mapallocN(size_t len, const char *str)
-{
- MemHead *memh;
-
- mem_lock_thread();
-
- len = (len + 3) & ~3; /* allocate in units of 4 */
-
- memh = mmap(NULL, len + sizeof(MemHead) + sizeof(MemTail),
- PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
-
- if (memh != (MemHead *)-1) {
- make_memhead_header(memh, len, str);
- memh->mmap = 1;
- mmap_in_use += len;
- peak_mem = mmap_in_use > peak_mem ? mmap_in_use : peak_mem;
- mem_unlock_thread();
-#ifdef DEBUG_MEMCOUNTER
- if (_mallocn_count == DEBUG_MEMCOUNTER_ERROR_VAL)
- memcount_raise(__func__);
- memh->_count = _mallocn_count++;
-#endif
- return (++memh);
- }
- else {
- mem_unlock_thread();
- print_error("Mapalloc returns null, fallback to regular malloc: "
- "len=" SIZET_FORMAT " in %s, total %u\n",
- SIZET_ARG(len), str, (unsigned int) mmap_in_use);
- return MEM_callocN(len, str);
- }
-}
-
-/* Memory statistics print */
-typedef struct MemPrintBlock {
- const char *name;
- uintptr_t len;
- int items;
-} MemPrintBlock;
-
-static int compare_name(const void *p1, const void *p2)
-{
- const MemPrintBlock *pb1 = (const MemPrintBlock *)p1;
- const MemPrintBlock *pb2 = (const MemPrintBlock *)p2;
-
- return strcmp(pb1->name, pb2->name);
-}
-
-static int compare_len(const void *p1, const void *p2)
-{
- const MemPrintBlock *pb1 = (const MemPrintBlock *)p1;
- const MemPrintBlock *pb2 = (const MemPrintBlock *)p2;
-
- if (pb1->len < pb2->len)
- return 1;
- else if (pb1->len == pb2->len)
- return 0;
- else
- return -1;
-}
-
-void MEM_printmemlist_stats(void)
-{
- MemHead *membl;
- MemPrintBlock *pb, *printblock;
- int totpb, a, b;
-
- mem_lock_thread();
-
- /* put memory blocks into array */
- printblock = malloc(sizeof(MemPrintBlock) * totblock);
-
- pb = printblock;
- totpb = 0;
-
- membl = membase->first;
- if (membl) membl = MEMNEXT(membl);
-
- while (membl) {
- pb->name = membl->name;
- pb->len = membl->len;
- pb->items = 1;
-
- totpb++;
- pb++;
-
- if (membl->next)
- membl = MEMNEXT(membl->next);
- else break;
- }
-
- /* sort by name and add together blocks with the same name */
- qsort(printblock, totpb, sizeof(MemPrintBlock), compare_name);
- for (a = 0, b = 0; a < totpb; a++) {
- if (a == b) {
- continue;
- }
- else if (strcmp(printblock[a].name, printblock[b].name) == 0) {
- printblock[b].len += printblock[a].len;
- printblock[b].items++;
- }
- else {
- b++;
- memcpy(&printblock[b], &printblock[a], sizeof(MemPrintBlock));
- }
- }
- totpb = b + 1;
-
- /* sort by length and print */
- qsort(printblock, totpb, sizeof(MemPrintBlock), compare_len);
- printf("\ntotal memory len: %.3f MB\n",
- (double)mem_in_use / (double)(1024 * 1024));
- printf("peak memory len: %.3f MB\n",
- (double)peak_mem / (double)(1024 * 1024));
- printf(" ITEMS TOTAL-MiB AVERAGE-KiB TYPE\n");
- for (a = 0, pb = printblock; a < totpb; a++, pb++) {
- printf("%6d (%8.3f %8.3f) %s\n",
- pb->items, (double)pb->len / (double)(1024 * 1024),
- (double)pb->len / 1024.0 / (double)pb->items, pb->name);
- }
- free(printblock);
-
- mem_unlock_thread();
-
-#if 0 /* GLIBC only */
- malloc_stats();
-#endif
-}
-
-static const char mem_printmemlist_pydict_script[] =
-"mb_userinfo = {}\n"
-"totmem = 0\n"
-"for mb_item in membase:\n"
-" mb_item_user_size = mb_userinfo.setdefault(mb_item['name'], [0,0])\n"
-" mb_item_user_size[0] += 1 # Add a user\n"
-" mb_item_user_size[1] += mb_item['len'] # Increment the size\n"
-" totmem += mb_item['len']\n"
-"print('(membase) items:', len(membase), '| unique-names:',\n"
-" len(mb_userinfo), '| total-mem:', totmem)\n"
-"mb_userinfo_sort = list(mb_userinfo.items())\n"
-"for sort_name, sort_func in (('size', lambda a: -a[1][1]),\n"
-" ('users', lambda a: -a[1][0]),\n"
-" ('name', lambda a: a[0])):\n"
-" print('\\nSorting by:', sort_name)\n"
-" mb_userinfo_sort.sort(key = sort_func)\n"
-" for item in mb_userinfo_sort:\n"
-" print('name:%%s, users:%%i, len:%%i' %%\n"
-" (item[0], item[1][0], item[1][1]))\n";
-
-/* Prints in python syntax for easy */
-static void MEM_printmemlist_internal(int pydict)
-{
- MemHead *membl;
-
- mem_lock_thread();
-
- membl = membase->first;
- if (membl) membl = MEMNEXT(membl);
-
- if (pydict) {
- print_error("# membase_debug.py\n");
- print_error("membase = [\n");
- }
- while (membl) {
- if (pydict) {
- fprintf(stderr,
- " {'len':" SIZET_FORMAT ", "
- "'name':'''%s''', "
- "'pointer':'%p'},\n",
- SIZET_ARG(membl->len), membl->name, (void *)(membl + 1));
- }
- else {
-#ifdef DEBUG_MEMCOUNTER
- print_error("%s len: " SIZET_FORMAT " %p, count: %d\n",
- membl->name, SIZET_ARG(membl->len), membl + 1,
- membl->_count);
-#else
- print_error("%s len: " SIZET_FORMAT " %p\n",
- membl->name, SIZET_ARG(membl->len), membl + 1);
-#endif
-#ifdef DEBUG_BACKTRACE
- print_memhead_backtrace(membl);
-#endif
- }
- if (membl->next)
- membl = MEMNEXT(membl->next);
- else break;
- }
- if (pydict) {
- fprintf(stderr, "]\n\n");
- fprintf(stderr, mem_printmemlist_pydict_script);
- }
-
- mem_unlock_thread();
-}
-
-void MEM_callbackmemlist(void (*func)(void *))
-{
- MemHead *membl;
-
- mem_lock_thread();
-
- membl = membase->first;
- if (membl) membl = MEMNEXT(membl);
-
- while (membl) {
- func(membl + 1);
- if (membl->next)
- membl = MEMNEXT(membl->next);
- else break;
- }
-
- mem_unlock_thread();
-}
-
-#if 0
-short MEM_testN(void *vmemh)
-{
- MemHead *membl;
-
- mem_lock_thread();
-
- membl = membase->first;
- if (membl) membl = MEMNEXT(membl);
-
- while (membl) {
- if (vmemh == membl + 1) {
- mem_unlock_thread();
- return 1;
- }
-
- if (membl->next)
- membl = MEMNEXT(membl->next);
- else break;
- }
-
- mem_unlock_thread();
-
- print_error("Memoryblock %p: pointer not in memlist\n", vmemh);
- return 0;
-}
-#endif
-
-void MEM_printmemlist(void)
-{
- MEM_printmemlist_internal(0);
-}
-void MEM_printmemlist_pydict(void)
-{
- MEM_printmemlist_internal(1);
-}
-
-void MEM_freeN(void *vmemh)
-{
- MemTail *memt;
- MemHead *memh = vmemh;
- const char *name;
-
- if (memh == NULL) {
- MemorY_ErroR("free", "attempt to free NULL pointer");
- /* print_error(err_stream, "%d\n", (memh+4000)->tag1); */
- return;
- }
-
- if (sizeof(intptr_t) == 8) {
- if (((intptr_t) memh) & 0x7) {
- MemorY_ErroR("free", "attempt to free illegal pointer");
- return;
- }
- }
- else {
- if (((intptr_t) memh) & 0x3) {
- MemorY_ErroR("free", "attempt to free illegal pointer");
- return;
- }
- }
-
- memh--;
- if (memh->tag1 == MEMFREE && memh->tag2 == MEMFREE) {
- MemorY_ErroR(memh->name, "double free");
- return;
- }
-
- mem_lock_thread();
- if ((memh->tag1 == MEMTAG1) &&
- (memh->tag2 == MEMTAG2) &&
- ((memh->len & 0x3) == 0))
- {
- memt = (MemTail *)(((char *) memh) + sizeof(MemHead) + memh->len);
- if (memt->tag3 == MEMTAG3) {
-
- memh->tag1 = MEMFREE;
- memh->tag2 = MEMFREE;
- memt->tag3 = MEMFREE;
- /* after tags !!! */
- rem_memblock(memh);
-
- mem_unlock_thread();
-
- return;
- }
- MemorY_ErroR(memh->name, "end corrupt");
- name = check_memlist(memh);
- if (name != NULL) {
- if (name != memh->name) MemorY_ErroR(name, "is also corrupt");
- }
- }
- else {
- name = check_memlist(memh);
- if (name == NULL)
- MemorY_ErroR("free", "pointer not in memlist");
- else
- MemorY_ErroR(name, "error in header");
- }
-
- totblock--;
- /* here a DUMP should happen */
-
- mem_unlock_thread();
-
- return;
-}
-
-/* --------------------------------------------------------------------- */
-/* local functions */
-/* --------------------------------------------------------------------- */
-
-static void addtail(volatile localListBase *listbase, void *vlink)
-{
- struct localLink *link = vlink;
-
- /* for a generic API error checks here is fine but
- * the limited use here they will never be NULL */
-#if 0
- if (link == NULL) return;
- if (listbase == NULL) return;
-#endif
-
- link->next = NULL;
- link->prev = listbase->last;
-
- if (listbase->last) ((struct localLink *)listbase->last)->next = link;
- if (listbase->first == NULL) listbase->first = link;
- listbase->last = link;
-}
-
-static void remlink(volatile localListBase *listbase, void *vlink)
-{
- struct localLink *link = vlink;
-
- /* for a generic API error checks here is fine but
- * the limited use here they will never be NULL */
-#if 0
- if (link == NULL) return;
- if (listbase == NULL) return;
-#endif
-
- if (link->next) link->next->prev = link->prev;
- if (link->prev) link->prev->next = link->next;
-
- if (listbase->last == link) listbase->last = link->prev;
- if (listbase->first == link) listbase->first = link->next;
-}
-
-static void rem_memblock(MemHead *memh)
-{
- remlink(membase, &memh->next);
- if (memh->prev) {
- if (memh->next)
- MEMNEXT(memh->prev)->nextname = MEMNEXT(memh->next)->name;
- else
- MEMNEXT(memh->prev)->nextname = NULL;
- }
-
- totblock--;
- mem_in_use -= memh->len;
-
-#ifdef DEBUG_MEMDUPLINAME
- if (memh->need_free_name)
- free((char *) memh->name);
-#endif
-
- if (memh->mmap) {
- mmap_in_use -= memh->len;
- if (munmap(memh, memh->len + sizeof(MemHead) + sizeof(MemTail)))
- printf("Couldn't unmap memory %s\n", memh->name);
- }
- else {
- if (malloc_debug_memset && memh->len)
- memset(memh + 1, 255, memh->len);
- free(memh);
- }
-}
-
-static void MemorY_ErroR(const char *block, const char *error)
-{
- print_error("Memoryblock %s: %s\n", block, error);
-
-#ifdef WITH_ASSERT_ABORT
- abort();
-#endif
-}
-
-static const char *check_memlist(MemHead *memh)
-{
- MemHead *forw, *back, *forwok, *backok;
- const char *name;
-
- forw = membase->first;
- if (forw) forw = MEMNEXT(forw);
- forwok = NULL;
- while (forw) {
- if (forw->tag1 != MEMTAG1 || forw->tag2 != MEMTAG2) break;
- forwok = forw;
- if (forw->next) forw = MEMNEXT(forw->next);
- else forw = NULL;
- }
-
- back = (MemHead *) membase->last;
- if (back) back = MEMNEXT(back);
- backok = NULL;
- while (back) {
- if (back->tag1 != MEMTAG1 || back->tag2 != MEMTAG2) break;
- backok = back;
- if (back->prev) back = MEMNEXT(back->prev);
- else back = NULL;
- }
-
- if (forw != back) return ("MORE THAN 1 MEMORYBLOCK CORRUPT");
-
- if (forw == NULL && back == NULL) {
- /* no wrong headers found then but in search of memblock */
-
- forw = membase->first;
- if (forw) forw = MEMNEXT(forw);
- forwok = NULL;
- while (forw) {
- if (forw == memh) break;
- if (forw->tag1 != MEMTAG1 || forw->tag2 != MEMTAG2) break;
- forwok = forw;
- if (forw->next) forw = MEMNEXT(forw->next);
- else forw = NULL;
- }
- if (forw == NULL) return NULL;
-
- back = (MemHead *) membase->last;
- if (back) back = MEMNEXT(back);
- backok = NULL;
- while (back) {
- if (back == memh) break;
- if (back->tag1 != MEMTAG1 || back->tag2 != MEMTAG2) break;
- backok = back;
- if (back->prev) back = MEMNEXT(back->prev);
- else back = NULL;
- }
- }
-
- if (forwok) name = forwok->nextname;
- else name = "No name found";
-
- if (forw == memh) {
- /* to be sure but this block is removed from the list */
- if (forwok) {
- if (backok) {
- forwok->next = (MemHead *)&backok->next;
- backok->prev = (MemHead *)&forwok->next;
- forwok->nextname = backok->name;
- }
- else {
- forwok->next = NULL;
- membase->last = (struct localLink *) &forwok->next;
- }
- }
- else {
- if (backok) {
- backok->prev = NULL;
- membase->first = &backok->next;
- }
- else {
- membase->first = membase->last = NULL;
- }
- }
- }
- else {
- MemorY_ErroR(name, "Additional error in header");
- return("Additional error in header");
- }
-
- return(name);
-}
-
-uintptr_t MEM_get_peak_memory(void)
-{
- uintptr_t _peak_mem;
-
- mem_lock_thread();
- _peak_mem = peak_mem;
- mem_unlock_thread();
-
- return _peak_mem;
-}
-
-void MEM_reset_peak_memory(void)
-{
- mem_lock_thread();
- peak_mem = 0;
- mem_unlock_thread();
-}
-
-uintptr_t MEM_get_memory_in_use(void)
-{
- uintptr_t _mem_in_use;
-
- mem_lock_thread();
- _mem_in_use = mem_in_use;
- mem_unlock_thread();
-
- return _mem_in_use;
-}
-
-uintptr_t MEM_get_mapped_memory_in_use(void)
-{
- uintptr_t _mmap_in_use;
-
- mem_lock_thread();
- _mmap_in_use = mmap_in_use;
- mem_unlock_thread();
-
- return _mmap_in_use;
-}
-
-int MEM_get_memory_blocks_in_use(void)
-{
- int _totblock;
-
- mem_lock_thread();
- _totblock = totblock;
- mem_unlock_thread();
-
- return _totblock;
-}
+/* to ensure strict conversions */
+#include "../../source/blender/blenlib/BLI_strict_flags.h"
+
+#include "mallocn_intern.h"
+
+size_t (*MEM_allocN_len)(const void *vmemh) = MEM_lockfree_allocN_len;
+void (*MEM_freeN)(void *vmemh) = MEM_lockfree_freeN;
+void *(*MEM_dupallocN)(const void *vmemh) = MEM_lockfree_dupallocN;
+void *(*MEM_reallocN_id)(void *vmemh, size_t len, const char *str) = MEM_lockfree_reallocN_id;
+void *(*MEM_recallocN_id)(void *vmemh, size_t len, const char *str) = MEM_lockfree_recallocN_id;;
+void *(*MEM_callocN)(size_t len, const char *str) = MEM_lockfree_callocN;
+void *(*MEM_mallocN)(size_t len, const char *str) = MEM_lockfree_mallocN;
+void *(*MEM_mapallocN)(size_t len, const char *str) = MEM_lockfree_mapallocN;
+void (*MEM_printmemlist_pydict)(void) = MEM_lockfree_printmemlist_pydict;
+void (*MEM_printmemlist)(void) = MEM_lockfree_printmemlist;
+void (*MEM_callbackmemlist)(void (*func)(void *)) = MEM_lockfree_callbackmemlist;
+void (*MEM_printmemlist_stats)(void) = MEM_lockfree_printmemlist_stats;
+void (*MEM_set_error_callback)(void (*func)(const char *)) = MEM_lockfree_set_error_callback;
+bool (*MEM_check_memory_integrity)(void) = MEM_lockfree_check_memory_integrity;
+void (*MEM_set_lock_callback)(void (*lock)(void), void (*unlock)(void)) = MEM_lockfree_set_lock_callback;
+void (*MEM_set_memory_debug)(void) = MEM_lockfree_set_memory_debug;
+uintptr_t (*MEM_get_memory_in_use)(void) = MEM_lockfree_get_memory_in_use;
+uintptr_t (*MEM_get_mapped_memory_in_use)(void) = MEM_lockfree_get_mapped_memory_in_use;
+unsigned int (*MEM_get_memory_blocks_in_use)(void) = MEM_lockfree_get_memory_blocks_in_use;
+void (*MEM_reset_peak_memory)(void) = MEM_lockfree_reset_peak_memory;
+uintptr_t (*MEM_get_peak_memory)(void) = MEM_lockfree_get_peak_memory;
#ifndef NDEBUG
-const char *MEM_name_ptr(void *vmemh)
-{
- if (vmemh) {
- MemHead *memh = vmemh;
- memh--;
- return memh->name;
- }
- else {
- return "MEM_name_ptr(NULL)";
- }
-}
-#endif /* NDEBUG */
-
-#else /* !WITH_GUARDEDALLOC */
+const char *(*MEM_name_ptr)(void *vmemh) = MEM_lockfree_name_ptr;
+#endif
+
+void MEM_use_guarded_allocator(void)
+{
+ MEM_allocN_len = MEM_guarded_allocN_len;
+ MEM_freeN = MEM_guarded_freeN;
+ MEM_dupallocN = MEM_guarded_dupallocN;
+ MEM_reallocN_id = MEM_guarded_reallocN_id;
+ MEM_recallocN_id = MEM_guarded_recallocN_id;;
+ MEM_callocN = MEM_guarded_callocN;
+ MEM_mallocN = MEM_guarded_mallocN;
+ MEM_mapallocN = MEM_guarded_mapallocN;
+ MEM_printmemlist_pydict = MEM_guarded_printmemlist_pydict;
+ MEM_printmemlist = MEM_guarded_printmemlist;
+ MEM_callbackmemlist = MEM_guarded_callbackmemlist;
+ MEM_printmemlist_stats = MEM_guarded_printmemlist_stats;
+ MEM_set_error_callback = MEM_guarded_set_error_callback;
+ MEM_check_memory_integrity = MEM_guarded_check_memory_integrity;
+ MEM_set_lock_callback = MEM_guarded_set_lock_callback;
+ MEM_set_memory_debug = MEM_guarded_set_memory_debug;
+ MEM_get_memory_in_use = MEM_guarded_get_memory_in_use;
+ MEM_get_mapped_memory_in_use = MEM_guarded_get_mapped_memory_in_use;
+ MEM_get_memory_blocks_in_use = MEM_guarded_get_memory_blocks_in_use;
+ MEM_reset_peak_memory = MEM_guarded_reset_peak_memory;
+ MEM_get_peak_memory = MEM_guarded_get_peak_memory;
-#ifdef __GNUC__
-# define UNUSED(x) UNUSED_ ## x __attribute__((__unused__))
-#else
-# define UNUSED(x) UNUSED_ ## x
+#ifndef NDEBUG
+ MEM_name_ptr = MEM_guarded_name_ptr;
#endif
-
-#include <malloc.h>
-
-size_t MEM_allocN_len(const void *vmemh)
-{
- return malloc_usable_size((void *)vmemh);
-}
-
-void MEM_freeN(void *vmemh)
-{
- free(vmemh);
-}
-
-void *MEM_dupallocN(const void *vmemh)
-{
- void *newp = NULL;
- if (vmemh) {
- const size_t prev_size = MEM_allocN_len(vmemh);
- newp = malloc(prev_size);
- memcpy(newp, vmemh, prev_size);
- }
- return newp;
-}
-
-void *MEM_reallocN_id(void *vmemh, size_t len, const char *UNUSED(str))
-{
- return realloc(vmemh, len);
-}
-
-void *MEM_recallocN_id(void *vmemh, size_t len, const char *UNUSED(str))
-{
- void *newp = NULL;
-
- if (vmemh) {
- size_t vmemh_len = MEM_allocN_len(vmemh);
- newp = malloc(len);
- if (newp) {
- if (len < vmemh_len) {
- /* shrink */
- memcpy(newp, vmemh, len);
- }
- else {
- memcpy(newp, vmemh, vmemh_len);
-
- if (len > vmemh_len) {
- /* grow */
- /* zero new bytes */
- memset(((char *)newp) + vmemh_len, 0, len - vmemh_len);
- }
- }
- }
-
- free(vmemh);
- }
- else {
- newp = calloc(1, len);
- }
-
- return newp;
-}
-
-void *MEM_callocN(size_t len, const char *UNUSED(str))
-{
- return calloc(1, len);
-}
-
-void *MEM_mallocN(size_t len, const char *UNUSED(str))
-{
- return malloc(len);
-}
-
-void *MEM_mapallocN(size_t len, const char *UNUSED(str))
-{
- /* could us mmap */
- return calloc(1, len);
-}
-
-void MEM_printmemlist_pydict(void) {}
-void MEM_printmemlist(void) {}
-
-/* unused */
-void MEM_callbackmemlist(void (*func)(void *))
-{
- (void)func;
-}
-
-void MEM_printmemlist_stats(void) {}
-
-void MEM_set_error_callback(void (*func)(const char *))
-{
- (void)func;
-}
-
-int MEM_check_memory_integrity(void)
-{
- return 1;
-}
-
-void MEM_set_lock_callback(void (*lock)(void), void (*unlock)(void))
-{
- (void)lock;
- (void)unlock;
-}
-
-void MEM_set_memory_debug(void) {}
-
-uintptr_t MEM_get_memory_in_use(void)
-{
- struct mallinfo mi;
- mi = mallinfo();
- return mi.uordblks;
}
-
-uintptr_t MEM_get_mapped_memory_in_use(void)
-{
- return MEM_get_memory_in_use();
-}
-
-int MEM_get_memory_blocks_in_use(void)
-{
- struct mallinfo mi;
- mi = mallinfo();
- return mi.smblks + mi.hblks;
-}
-
-/* dummy */
-void MEM_reset_peak_memory(void) {}
-
-uintptr_t MEM_get_peak_memory(void)
-{
- return MEM_get_memory_in_use();
-}
-
-#endif /* WITH_GUARDEDALLOC */
diff --git a/intern/guardedalloc/intern/mallocn_guarded_impl.c b/intern/guardedalloc/intern/mallocn_guarded_impl.c
new file mode 100644
index 00000000000..92392ce4dd3
--- /dev/null
+++ b/intern/guardedalloc/intern/mallocn_guarded_impl.c
@@ -0,0 +1,1114 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Brecht Van Lommel
+ * Campbell Barton
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file guardedalloc/intern/mallocn.c
+ * \ingroup MEM
+ *
+ * Guarded memory allocation, and boundary-write detection.
+ */
+
+#include <stdlib.h>
+#include <string.h> /* memcpy */
+#include <stdarg.h>
+#include <sys/types.h>
+
+#include "MEM_guardedalloc.h"
+
+/* to ensure strict conversions */
+#include "../../source/blender/blenlib/BLI_strict_flags.h"
+
+#include "mallocn_intern.h"
+#include "atomic_ops.h"
+
+/* Only for debugging:
+ * store original buffer's name when doing MEM_dupallocN
+ * helpful to profile issues with non-freed "dup_alloc" buffers,
+ * but this introduces some overhead to memory header and makes
+ * things slower a bit, so better to keep disabled by default
+ */
+//#define DEBUG_MEMDUPLINAME
+
+/* Only for debugging:
+ * lets you count the allocations so as to find the allocator of unfreed memory
+ * in situations where the leak is predictable */
+
+//#define DEBUG_MEMCOUNTER
+
+/* Only for debugging:
+ * defining DEBUG_THREADS will enable check whether memory manager
+ * is locked with a mutex when allocation is called from non-main
+ * thread.
+ *
+ * This helps troubleshooting memory issues caused by the fact
+ * guarded allocator is not thread-safe, however this check will
+ * fail to check allocations from openmp threads.
+ */
+//#define DEBUG_THREADS
+
+/* Only for debugging:
+ * Defining DEBUG_BACKTRACE will store a backtrace from where
+ * memory block was allocated and print this trace for all
+ * unfreed blocks.
+ */
+//#define DEBUG_BACKTRACE
+
+#ifdef DEBUG_BACKTRACE
+# define BACKTRACE_SIZE 100
+#endif
+
+#ifdef DEBUG_MEMCOUNTER
+ /* set this to the value that isn't being freed */
+# define DEBUG_MEMCOUNTER_ERROR_VAL 0
+static int _mallocn_count = 0;
+
+/* breakpoint here */
+static void memcount_raise(const char *name)
+{
+ fprintf(stderr, "%s: memcount-leak, %d\n", name, _mallocn_count);
+}
+#endif
+
+/* --------------------------------------------------------------------- */
+/* Data definition */
+/* --------------------------------------------------------------------- */
+/* all memory chunks are put in linked lists */
+typedef struct localLink {
+ struct localLink *next, *prev;
+} localLink;
+
+typedef struct localListBase {
+ void *first, *last;
+} localListBase;
+
+/* note: keep this struct aligned (e.g., irix/gcc) - Hos */
+typedef struct MemHead {
+ int tag1;
+ size_t len;
+ struct MemHead *next, *prev;
+ const char *name;
+ const char *nextname;
+ int tag2;
+ int mmap; /* if true, memory was mmapped */
+#ifdef DEBUG_MEMCOUNTER
+ int _count;
+#endif
+
+#ifdef DEBUG_MEMDUPLINAME
+ int need_free_name, pad;
+#endif
+
+#ifdef DEBUG_BACKTRACE
+ void *backtrace[BACKTRACE_SIZE];
+ int backtrace_size;
+#endif
+} MemHead;
+
+/* for openmp threading asserts, saves time troubleshooting
+ * we may need to extend this if blender code starts using MEM_
+ * functions inside OpenMP correctly with omp_set_lock() */
+
+#if 0 /* disable for now, only use to debug openmp code which doesn lock threads for malloc */
+#if defined(_OPENMP) && defined(DEBUG)
+# include <assert.h>
+# include <omp.h>
+# define DEBUG_OMP_MALLOC
+#endif
+#endif
+
+#ifdef DEBUG_THREADS
+# include <assert.h>
+# include <pthread.h>
+static pthread_t mainid;
+#endif
+
+#ifdef DEBUG_BACKTRACE
+# if defined(__linux__) || defined(__APPLE__)
+# include <execinfo.h>
+// Windows is not supported yet.
+//# elif defined(_MSV_VER)
+//# include <DbgHelp.h>
+# endif
+#endif
+
+typedef struct MemTail {
+ int tag3, pad;
+} MemTail;
+
+
+/* --------------------------------------------------------------------- */
+/* local functions */
+/* --------------------------------------------------------------------- */
+
+static void addtail(volatile localListBase *listbase, void *vlink);
+static void remlink(volatile localListBase *listbase, void *vlink);
+static void rem_memblock(MemHead *memh);
+static void MemorY_ErroR(const char *block, const char *error);
+static const char *check_memlist(MemHead *memh);
+
+/* --------------------------------------------------------------------- */
+/* locally used defines */
+/* --------------------------------------------------------------------- */
+
+#ifdef __BIG_ENDIAN__
+# define MAKE_ID(a, b, c, d) ((int)(a) << 24 | (int)(b) << 16 | (c) << 8 | (d))
+#else
+# define MAKE_ID(a, b, c, d) ((int)(d) << 24 | (int)(c) << 16 | (b) << 8 | (a))
+#endif
+
+#define MEMTAG1 MAKE_ID('M', 'E', 'M', 'O')
+#define MEMTAG2 MAKE_ID('R', 'Y', 'B', 'L')
+#define MEMTAG3 MAKE_ID('O', 'C', 'K', '!')
+#define MEMFREE MAKE_ID('F', 'R', 'E', 'E')
+
+#define MEMNEXT(x) \
+ ((MemHead *)(((char *) x) - ((char *) &(((MemHead *)0)->next))))
+
+/* --------------------------------------------------------------------- */
+/* vars */
+/* --------------------------------------------------------------------- */
+
+
+static unsigned int totblock = 0;
+static size_t mem_in_use = 0, mmap_in_use = 0, peak_mem = 0;
+
+static volatile struct localListBase _membase;
+static volatile struct localListBase *membase = &_membase;
+static void (*error_callback)(const char *) = NULL;
+static void (*thread_lock_callback)(void) = NULL;
+static void (*thread_unlock_callback)(void) = NULL;
+
+static bool malloc_debug_memset = false;
+
+#ifdef malloc
+#undef malloc
+#endif
+
+#ifdef calloc
+#undef calloc
+#endif
+
+#ifdef free
+#undef free
+#endif
+
+
+/* --------------------------------------------------------------------- */
+/* implementation */
+/* --------------------------------------------------------------------- */
+
+#ifdef __GNUC__
+__attribute__ ((format(printf, 1, 2)))
+#endif
+static void print_error(const char *str, ...)
+{
+ char buf[512];
+ va_list ap;
+
+ va_start(ap, str);
+ vsnprintf(buf, sizeof(buf), str, ap);
+ va_end(ap);
+ buf[sizeof(buf) - 1] = '\0';
+
+ if (error_callback) error_callback(buf);
+}
+
+static void mem_lock_thread(void)
+{
+#ifdef DEBUG_THREADS
+ static int initialized = 0;
+
+ if (initialized == 0) {
+ /* assume first allocation happens from main thread */
+ mainid = pthread_self();
+ initialized = 1;
+ }
+
+ if (!pthread_equal(pthread_self(), mainid) && thread_lock_callback == NULL) {
+ assert(!"Memory function is called from non-main thread without lock");
+ }
+#endif
+
+#ifdef DEBUG_OMP_MALLOC
+ assert(omp_in_parallel() == 0);
+#endif
+
+ if (thread_lock_callback)
+ thread_lock_callback();
+}
+
+static void mem_unlock_thread(void)
+{
+#ifdef DEBUG_THREADS
+ if (!pthread_equal(pthread_self(), mainid) && thread_lock_callback == NULL) {
+ assert(!"Thread lock was removed while allocation from thread is in progress");
+ }
+#endif
+
+ if (thread_unlock_callback)
+ thread_unlock_callback();
+}
+
+bool MEM_guarded_check_memory_integrity(void)
+{
+ const char *err_val = NULL;
+ MemHead *listend;
+ /* check_memlist starts from the front, and runs until it finds
+ * the requested chunk. For this test, that's the last one. */
+ listend = membase->last;
+
+ err_val = check_memlist(listend);
+
+ return (err_val != NULL);
+}
+
+
+void MEM_guarded_set_error_callback(void (*func)(const char *))
+{
+ error_callback = func;
+}
+
+void MEM_guarded_set_lock_callback(void (*lock)(void), void (*unlock)(void))
+{
+ thread_lock_callback = lock;
+ thread_unlock_callback = unlock;
+}
+
+void MEM_guarded_set_memory_debug(void)
+{
+ malloc_debug_memset = true;
+}
+
+size_t MEM_guarded_allocN_len(const void *vmemh)
+{
+ if (vmemh) {
+ const MemHead *memh = vmemh;
+
+ memh--;
+ return memh->len;
+ }
+ else {
+ return 0;
+ }
+}
+
+void *MEM_guarded_dupallocN(const void *vmemh)
+{
+ void *newp = NULL;
+
+ if (vmemh) {
+ const MemHead *memh = vmemh;
+ memh--;
+
+#ifndef DEBUG_MEMDUPLINAME
+ if (memh->mmap)
+ newp = MEM_guarded_mapallocN(memh->len, "dupli_mapalloc");
+ else
+ newp = MEM_guarded_mallocN(memh->len, "dupli_alloc");
+
+ if (newp == NULL) return NULL;
+#else
+ {
+ MemHead *nmemh;
+ char *name = malloc(strlen(memh->name) + 24);
+
+ if (memh->mmap) {
+ sprintf(name, "%s %s", "dupli_mapalloc", memh->name);
+ newp = MEM_guarded_mapallocN(memh->len, name);
+ }
+ else {
+ sprintf(name, "%s %s", "dupli_alloc", memh->name);
+ newp = MEM_guarded_mallocN(memh->len, name);
+ }
+
+ if (newp == NULL) return NULL;
+
+ nmemh = newp;
+ nmemh--;
+
+ nmemh->need_free_name = 1;
+ }
+#endif
+
+ memcpy(newp, vmemh, memh->len);
+ }
+
+ return newp;
+}
+
+void *MEM_guarded_reallocN_id(void *vmemh, size_t len, const char *str)
+{
+ void *newp = NULL;
+
+ if (vmemh) {
+ MemHead *memh = vmemh;
+ memh--;
+
+ newp = MEM_guarded_mallocN(len, memh->name);
+ if (newp) {
+ if (len < memh->len) {
+ /* shrink */
+ memcpy(newp, vmemh, len);
+ }
+ else {
+ /* grow (or remain same size) */
+ memcpy(newp, vmemh, memh->len);
+ }
+ }
+
+ MEM_guarded_freeN(vmemh);
+ }
+ else {
+ newp = MEM_guarded_mallocN(len, str);
+ }
+
+ return newp;
+}
+
+void *MEM_guarded_recallocN_id(void *vmemh, size_t len, const char *str)
+{
+ void *newp = NULL;
+
+ if (vmemh) {
+ MemHead *memh = vmemh;
+ memh--;
+
+ newp = MEM_guarded_mallocN(len, memh->name);
+ if (newp) {
+ if (len < memh->len) {
+ /* shrink */
+ memcpy(newp, vmemh, len);
+ }
+ else {
+ memcpy(newp, vmemh, memh->len);
+
+ if (len > memh->len) {
+ /* grow */
+ /* zero new bytes */
+ memset(((char *)newp) + memh->len, 0, len - memh->len);
+ }
+ }
+ }
+
+ MEM_guarded_freeN(vmemh);
+ }
+ else {
+ newp = MEM_guarded_callocN(len, str);
+ }
+
+ return newp;
+}
+
+#ifdef DEBUG_BACKTRACE
+# if defined(__linux__) || defined(__APPLE__)
+static void make_memhead_backtrace(MemHead *memh)
+{
+ memh->backtrace_size = backtrace(memh->backtrace, BACKTRACE_SIZE);
+}
+
+static void print_memhead_backtrace(MemHead *memh)
+{
+ char **strings;
+ int i;
+
+ strings = backtrace_symbols(memh->backtrace, memh->backtrace_size);
+ for (i = 0; i < memh->backtrace_size; i++) {
+ print_error(" %s\n", strings[i]);
+ }
+
+ free(strings);
+}
+# else
+static void make_memhead_backtrace(MemHead *memh)
+{
+ (void) memh; /* Ignored. */
+}
+
+static void print_memhead_backtrace(MemHead *memh)
+{
+ (void) memh; /* Ignored. */
+}
+# endif /* defined(__linux__) || defined(__APPLE__) */
+#endif /* DEBUG_BACKTRACE */
+
+static void make_memhead_header(MemHead *memh, size_t len, const char *str)
+{
+ MemTail *memt;
+
+ memh->tag1 = MEMTAG1;
+ memh->name = str;
+ memh->nextname = NULL;
+ memh->len = len;
+ memh->mmap = 0;
+ memh->tag2 = MEMTAG2;
+
+#ifdef DEBUG_MEMDUPLINAME
+ memh->need_free_name = 0;
+#endif
+
+#ifdef DEBUG_BACKTRACE
+ make_memhead_backtrace(memh);
+#endif
+
+ memt = (MemTail *)(((char *) memh) + sizeof(MemHead) + len);
+ memt->tag3 = MEMTAG3;
+
+ atomic_add_u(&totblock, 1);
+ atomic_add_z(&mem_in_use, len);
+
+ mem_lock_thread();
+ addtail(membase, &memh->next);
+ if (memh->next) {
+ memh->nextname = MEMNEXT(memh->next)->name;
+ }
+ peak_mem = mem_in_use > peak_mem ? mem_in_use : peak_mem;
+ mem_unlock_thread();
+}
+
+void *MEM_guarded_mallocN(size_t len, const char *str)
+{
+ MemHead *memh;
+
+ len = SIZET_ALIGN_4(len);
+
+ memh = (MemHead *)malloc(len + sizeof(MemHead) + sizeof(MemTail));
+
+ if (memh) {
+ make_memhead_header(memh, len, str);
+ if (malloc_debug_memset && len)
+ memset(memh + 1, 255, len);
+
+#ifdef DEBUG_MEMCOUNTER
+ if (_mallocn_count == DEBUG_MEMCOUNTER_ERROR_VAL)
+ memcount_raise(__func__);
+ memh->_count = _mallocn_count++;
+#endif
+ return (++memh);
+ }
+ print_error("Malloc returns null: len=" SIZET_FORMAT " in %s, total %u\n",
+ SIZET_ARG(len), str, (unsigned int) mem_in_use);
+ return NULL;
+}
+
+void *MEM_guarded_callocN(size_t len, const char *str)
+{
+ MemHead *memh;
+
+ len = SIZET_ALIGN_4(len);
+
+ memh = (MemHead *)calloc(len + sizeof(MemHead) + sizeof(MemTail), 1);
+
+ if (memh) {
+ make_memhead_header(memh, len, str);
+#ifdef DEBUG_MEMCOUNTER
+ if (_mallocn_count == DEBUG_MEMCOUNTER_ERROR_VAL)
+ memcount_raise(__func__);
+ memh->_count = _mallocn_count++;
+#endif
+ return (++memh);
+ }
+ print_error("Calloc returns null: len=" SIZET_FORMAT " in %s, total %u\n",
+ SIZET_ARG(len), str, (unsigned int) mem_in_use);
+ return NULL;
+}
+
+/* note; mmap returns zero'd memory */
+void *MEM_guarded_mapallocN(size_t len, const char *str)
+{
+ MemHead *memh;
+
+ len = SIZET_ALIGN_4(len);
+
+#if defined(WIN32)
+ /* our windows mmap implementation is not thread safe */
+ mem_lock_thread();
+#endif
+ memh = mmap(NULL, len + sizeof(MemHead) + sizeof(MemTail),
+ PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
+#if defined(WIN32)
+ mem_unlock_thread();
+#endif
+
+ if (memh != (MemHead *)-1) {
+ make_memhead_header(memh, len, str);
+ memh->mmap = 1;
+ atomic_add_z(&mmap_in_use, len);
+ mem_lock_thread();
+ peak_mem = mmap_in_use > peak_mem ? mmap_in_use : peak_mem;
+ mem_unlock_thread();
+#ifdef DEBUG_MEMCOUNTER
+ if (_mallocn_count == DEBUG_MEMCOUNTER_ERROR_VAL)
+ memcount_raise(__func__);
+ memh->_count = _mallocn_count++;
+#endif
+ return (++memh);
+ }
+ else {
+ print_error("Mapalloc returns null, fallback to regular malloc: "
+ "len=" SIZET_FORMAT " in %s, total %u\n",
+ SIZET_ARG(len), str, (unsigned int) mmap_in_use);
+ return MEM_guarded_callocN(len, str);
+ }
+}
+
+/* Memory statistics print */
+typedef struct MemPrintBlock {
+ const char *name;
+ uintptr_t len;
+ int items;
+} MemPrintBlock;
+
+static int compare_name(const void *p1, const void *p2)
+{
+ const MemPrintBlock *pb1 = (const MemPrintBlock *)p1;
+ const MemPrintBlock *pb2 = (const MemPrintBlock *)p2;
+
+ return strcmp(pb1->name, pb2->name);
+}
+
+static int compare_len(const void *p1, const void *p2)
+{
+ const MemPrintBlock *pb1 = (const MemPrintBlock *)p1;
+ const MemPrintBlock *pb2 = (const MemPrintBlock *)p2;
+
+ if (pb1->len < pb2->len)
+ return 1;
+ else if (pb1->len == pb2->len)
+ return 0;
+ else
+ return -1;
+}
+
+void MEM_guarded_printmemlist_stats(void)
+{
+ MemHead *membl;
+ MemPrintBlock *pb, *printblock;
+ unsigned int totpb, a, b;
+ size_t mem_in_use_slop = 0;
+
+ mem_lock_thread();
+
+ /* put memory blocks into array */
+ printblock = malloc(sizeof(MemPrintBlock) * totblock);
+
+ pb = printblock;
+ totpb = 0;
+
+ membl = membase->first;
+ if (membl) membl = MEMNEXT(membl);
+
+ while (membl) {
+ pb->name = membl->name;
+ pb->len = membl->len;
+ pb->items = 1;
+
+ totpb++;
+ pb++;
+
+ if (!membl->mmap) {
+ mem_in_use_slop += (sizeof(MemHead) + sizeof(MemTail) +
+ malloc_usable_size((void *)membl)) - membl->len;
+ }
+
+ if (membl->next)
+ membl = MEMNEXT(membl->next);
+ else break;
+ }
+
+ /* sort by name and add together blocks with the same name */
+ qsort(printblock, totpb, sizeof(MemPrintBlock), compare_name);
+ for (a = 0, b = 0; a < totpb; a++) {
+ if (a == b) {
+ continue;
+ }
+ else if (strcmp(printblock[a].name, printblock[b].name) == 0) {
+ printblock[b].len += printblock[a].len;
+ printblock[b].items++;
+ }
+ else {
+ b++;
+ memcpy(&printblock[b], &printblock[a], sizeof(MemPrintBlock));
+ }
+ }
+ totpb = b + 1;
+
+ /* sort by length and print */
+ qsort(printblock, totpb, sizeof(MemPrintBlock), compare_len);
+ printf("\ntotal memory len: %.3f MB\n",
+ (double)mem_in_use / (double)(1024 * 1024));
+ printf("peak memory len: %.3f MB\n",
+ (double)peak_mem / (double)(1024 * 1024));
+ printf("slop memory len: %.3f MB\n",
+ (double)mem_in_use_slop / (double)(1024 * 1024));
+ printf(" ITEMS TOTAL-MiB AVERAGE-KiB TYPE\n");
+ for (a = 0, pb = printblock; a < totpb; a++, pb++) {
+ printf("%6d (%8.3f %8.3f) %s\n",
+ pb->items, (double)pb->len / (double)(1024 * 1024),
+ (double)pb->len / 1024.0 / (double)pb->items, pb->name);
+ }
+ free(printblock);
+
+ mem_unlock_thread();
+
+#ifdef HAVE_MALLOC_STATS
+ printf("System Statistics:\n");
+ malloc_stats();
+#endif
+}
+
+static const char mem_printmemlist_pydict_script[] =
+"mb_userinfo = {}\n"
+"totmem = 0\n"
+"for mb_item in membase:\n"
+" mb_item_user_size = mb_userinfo.setdefault(mb_item['name'], [0,0])\n"
+" mb_item_user_size[0] += 1 # Add a user\n"
+" mb_item_user_size[1] += mb_item['len'] # Increment the size\n"
+" totmem += mb_item['len']\n"
+"print('(membase) items:', len(membase), '| unique-names:',\n"
+" len(mb_userinfo), '| total-mem:', totmem)\n"
+"mb_userinfo_sort = list(mb_userinfo.items())\n"
+"for sort_name, sort_func in (('size', lambda a: -a[1][1]),\n"
+" ('users', lambda a: -a[1][0]),\n"
+" ('name', lambda a: a[0])):\n"
+" print('\\nSorting by:', sort_name)\n"
+" mb_userinfo_sort.sort(key = sort_func)\n"
+" for item in mb_userinfo_sort:\n"
+" print('name:%%s, users:%%i, len:%%i' %%\n"
+" (item[0], item[1][0], item[1][1]))\n";
+
+/* Prints in python syntax for easy */
+static void MEM_guarded_printmemlist_internal(int pydict)
+{
+ MemHead *membl;
+
+ mem_lock_thread();
+
+ membl = membase->first;
+ if (membl) membl = MEMNEXT(membl);
+
+ if (pydict) {
+ print_error("# membase_debug.py\n");
+ print_error("membase = [\n");
+ }
+ while (membl) {
+ if (pydict) {
+ fprintf(stderr,
+ " {'len':" SIZET_FORMAT ", "
+ "'name':'''%s''', "
+ "'pointer':'%p'},\n",
+ SIZET_ARG(membl->len), membl->name, (void *)(membl + 1));
+ }
+ else {
+#ifdef DEBUG_MEMCOUNTER
+ print_error("%s len: " SIZET_FORMAT " %p, count: %d\n",
+ membl->name, SIZET_ARG(membl->len), membl + 1,
+ membl->_count);
+#else
+ print_error("%s len: " SIZET_FORMAT " %p\n",
+ membl->name, SIZET_ARG(membl->len), membl + 1);
+#endif
+#ifdef DEBUG_BACKTRACE
+ print_memhead_backtrace(membl);
+#endif
+ }
+ if (membl->next)
+ membl = MEMNEXT(membl->next);
+ else break;
+ }
+ if (pydict) {
+ fprintf(stderr, "]\n\n");
+ fprintf(stderr, mem_printmemlist_pydict_script);
+ }
+
+ mem_unlock_thread();
+}
+
+void MEM_guarded_callbackmemlist(void (*func)(void *))
+{
+ MemHead *membl;
+
+ mem_lock_thread();
+
+ membl = membase->first;
+ if (membl) membl = MEMNEXT(membl);
+
+ while (membl) {
+ func(membl + 1);
+ if (membl->next)
+ membl = MEMNEXT(membl->next);
+ else break;
+ }
+
+ mem_unlock_thread();
+}
+
+#if 0
+short MEM_guarded_testN(void *vmemh)
+{
+ MemHead *membl;
+
+ mem_lock_thread();
+
+ membl = membase->first;
+ if (membl) membl = MEMNEXT(membl);
+
+ while (membl) {
+ if (vmemh == membl + 1) {
+ mem_unlock_thread();
+ return 1;
+ }
+
+ if (membl->next)
+ membl = MEMNEXT(membl->next);
+ else break;
+ }
+
+ mem_unlock_thread();
+
+ print_error("Memoryblock %p: pointer not in memlist\n", vmemh);
+ return 0;
+}
+#endif
+
+void MEM_guarded_printmemlist(void)
+{
+ MEM_guarded_printmemlist_internal(0);
+}
+void MEM_guarded_printmemlist_pydict(void)
+{
+ MEM_guarded_printmemlist_internal(1);
+}
+
+void MEM_guarded_freeN(void *vmemh)
+{
+ MemTail *memt;
+ MemHead *memh = vmemh;
+ const char *name;
+
+ if (memh == NULL) {
+ MemorY_ErroR("free", "attempt to free NULL pointer");
+ /* print_error(err_stream, "%d\n", (memh+4000)->tag1); */
+ return;
+ }
+
+ if (sizeof(intptr_t) == 8) {
+ if (((intptr_t) memh) & 0x7) {
+ MemorY_ErroR("free", "attempt to free illegal pointer");
+ return;
+ }
+ }
+ else {
+ if (((intptr_t) memh) & 0x3) {
+ MemorY_ErroR("free", "attempt to free illegal pointer");
+ return;
+ }
+ }
+
+ memh--;
+ if (memh->tag1 == MEMFREE && memh->tag2 == MEMFREE) {
+ MemorY_ErroR(memh->name, "double free");
+ return;
+ }
+
+ if ((memh->tag1 == MEMTAG1) &&
+ (memh->tag2 == MEMTAG2) &&
+ ((memh->len & 0x3) == 0))
+ {
+ memt = (MemTail *)(((char *) memh) + sizeof(MemHead) + memh->len);
+ if (memt->tag3 == MEMTAG3) {
+
+ memh->tag1 = MEMFREE;
+ memh->tag2 = MEMFREE;
+ memt->tag3 = MEMFREE;
+ /* after tags !!! */
+ rem_memblock(memh);
+
+ return;
+ }
+ MemorY_ErroR(memh->name, "end corrupt");
+ name = check_memlist(memh);
+ if (name != NULL) {
+ if (name != memh->name) MemorY_ErroR(name, "is also corrupt");
+ }
+ }
+ else {
+ mem_lock_thread();
+ name = check_memlist(memh);
+ mem_unlock_thread();
+ if (name == NULL)
+ MemorY_ErroR("free", "pointer not in memlist");
+ else
+ MemorY_ErroR(name, "error in header");
+ }
+
+ totblock--;
+ /* here a DUMP should happen */
+
+ return;
+}
+
+/* --------------------------------------------------------------------- */
+/* local functions */
+/* --------------------------------------------------------------------- */
+
+static void addtail(volatile localListBase *listbase, void *vlink)
+{
+ struct localLink *link = vlink;
+
+ /* for a generic API error checks here is fine but
+ * the limited use here they will never be NULL */
+#if 0
+ if (link == NULL) return;
+ if (listbase == NULL) return;
+#endif
+
+ link->next = NULL;
+ link->prev = listbase->last;
+
+ if (listbase->last) ((struct localLink *)listbase->last)->next = link;
+ if (listbase->first == NULL) listbase->first = link;
+ listbase->last = link;
+}
+
+static void remlink(volatile localListBase *listbase, void *vlink)
+{
+ struct localLink *link = vlink;
+
+ /* for a generic API error checks here is fine but
+ * the limited use here they will never be NULL */
+#if 0
+ if (link == NULL) return;
+ if (listbase == NULL) return;
+#endif
+
+ if (link->next) link->next->prev = link->prev;
+ if (link->prev) link->prev->next = link->next;
+
+ if (listbase->last == link) listbase->last = link->prev;
+ if (listbase->first == link) listbase->first = link->next;
+}
+
+static void rem_memblock(MemHead *memh)
+{
+ mem_lock_thread();
+ remlink(membase, &memh->next);
+ if (memh->prev) {
+ if (memh->next)
+ MEMNEXT(memh->prev)->nextname = MEMNEXT(memh->next)->name;
+ else
+ MEMNEXT(memh->prev)->nextname = NULL;
+ }
+ mem_unlock_thread();
+
+ atomic_sub_u(&totblock, 1);
+ atomic_sub_z(&mem_in_use, memh->len);
+
+#ifdef DEBUG_MEMDUPLINAME
+ if (memh->need_free_name)
+ free((char *) memh->name);
+#endif
+
+ if (memh->mmap) {
+ atomic_sub_z(&mmap_in_use, memh->len);
+#if defined(WIN32)
+ /* our windows mmap implementation is not thread safe */
+ mem_lock_thread();
+#endif
+ if (munmap(memh, memh->len + sizeof(MemHead) + sizeof(MemTail)))
+ printf("Couldn't unmap memory %s\n", memh->name);
+#if defined(WIN32)
+ mem_unlock_thread();
+#endif
+ }
+ else {
+ if (malloc_debug_memset && memh->len)
+ memset(memh + 1, 255, memh->len);
+ free(memh);
+ }
+}
+
+static void MemorY_ErroR(const char *block, const char *error)
+{
+ print_error("Memoryblock %s: %s\n", block, error);
+
+#ifdef WITH_ASSERT_ABORT
+ abort();
+#endif
+}
+
+static const char *check_memlist(MemHead *memh)
+{
+ MemHead *forw, *back, *forwok, *backok;
+ const char *name;
+
+ forw = membase->first;
+ if (forw) forw = MEMNEXT(forw);
+ forwok = NULL;
+ while (forw) {
+ if (forw->tag1 != MEMTAG1 || forw->tag2 != MEMTAG2) break;
+ forwok = forw;
+ if (forw->next) forw = MEMNEXT(forw->next);
+ else forw = NULL;
+ }
+
+ back = (MemHead *) membase->last;
+ if (back) back = MEMNEXT(back);
+ backok = NULL;
+ while (back) {
+ if (back->tag1 != MEMTAG1 || back->tag2 != MEMTAG2) break;
+ backok = back;
+ if (back->prev) back = MEMNEXT(back->prev);
+ else back = NULL;
+ }
+
+ if (forw != back) return ("MORE THAN 1 MEMORYBLOCK CORRUPT");
+
+ if (forw == NULL && back == NULL) {
+ /* no wrong headers found then but in search of memblock */
+
+ forw = membase->first;
+ if (forw) forw = MEMNEXT(forw);
+ forwok = NULL;
+ while (forw) {
+ if (forw == memh) break;
+ if (forw->tag1 != MEMTAG1 || forw->tag2 != MEMTAG2) break;
+ forwok = forw;
+ if (forw->next) forw = MEMNEXT(forw->next);
+ else forw = NULL;
+ }
+ if (forw == NULL) return NULL;
+
+ back = (MemHead *) membase->last;
+ if (back) back = MEMNEXT(back);
+ backok = NULL;
+ while (back) {
+ if (back == memh) break;
+ if (back->tag1 != MEMTAG1 || back->tag2 != MEMTAG2) break;
+ backok = back;
+ if (back->prev) back = MEMNEXT(back->prev);
+ else back = NULL;
+ }
+ }
+
+ if (forwok) name = forwok->nextname;
+ else name = "No name found";
+
+ if (forw == memh) {
+ /* to be sure but this block is removed from the list */
+ if (forwok) {
+ if (backok) {
+ forwok->next = (MemHead *)&backok->next;
+ backok->prev = (MemHead *)&forwok->next;
+ forwok->nextname = backok->name;
+ }
+ else {
+ forwok->next = NULL;
+ membase->last = (struct localLink *) &forwok->next;
+ }
+ }
+ else {
+ if (backok) {
+ backok->prev = NULL;
+ membase->first = &backok->next;
+ }
+ else {
+ membase->first = membase->last = NULL;
+ }
+ }
+ }
+ else {
+ MemorY_ErroR(name, "Additional error in header");
+ return("Additional error in header");
+ }
+
+ return(name);
+}
+
+size_t MEM_guarded_get_peak_memory(void)
+{
+ size_t _peak_mem;
+
+ mem_lock_thread();
+ _peak_mem = peak_mem;
+ mem_unlock_thread();
+
+ return _peak_mem;
+}
+
+void MEM_guarded_reset_peak_memory(void)
+{
+ mem_lock_thread();
+ peak_mem = 0;
+ mem_unlock_thread();
+}
+
+uintptr_t MEM_guarded_get_memory_in_use(void)
+{
+ uintptr_t _mem_in_use;
+
+ mem_lock_thread();
+ _mem_in_use = mem_in_use;
+ mem_unlock_thread();
+
+ return _mem_in_use;
+}
+
+uintptr_t MEM_guarded_get_mapped_memory_in_use(void)
+{
+ uintptr_t _mmap_in_use;
+
+ mem_lock_thread();
+ _mmap_in_use = mmap_in_use;
+ mem_unlock_thread();
+
+ return _mmap_in_use;
+}
+
+unsigned int MEM_guarded_get_memory_blocks_in_use(void)
+{
+ unsigned int _totblock;
+
+ mem_lock_thread();
+ _totblock = totblock;
+ mem_unlock_thread();
+
+ return _totblock;
+}
+
+#ifndef NDEBUG
+const char *MEM_guarded_name_ptr(void *vmemh)
+{
+ if (vmemh) {
+ MemHead *memh = vmemh;
+ memh--;
+ return memh->name;
+ }
+ else {
+ return "MEM_guarded_name_ptr(NULL)";
+ }
+}
+#endif /* NDEBUG */
diff --git a/intern/guardedalloc/intern/mallocn_intern.h b/intern/guardedalloc/intern/mallocn_intern.h
new file mode 100644
index 00000000000..db45b59b884
--- /dev/null
+++ b/intern/guardedalloc/intern/mallocn_intern.h
@@ -0,0 +1,132 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2013 by Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Sergey Sharybin
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file guardedalloc/intern/mallocn_intern.h
+ * \ingroup MEM
+ */
+
+#ifndef __MALLOCN_INTERN_H__
+#define __MALLOCN_INTERN_H__
+
+/* mmap exception */
+#if defined(WIN32)
+# include "mmap_win.h"
+#else
+# include <sys/mman.h>
+#endif
+
+#if defined(_MSC_VER)
+# define __func__ __FUNCTION__
+#endif
+
+#ifdef __GNUC__
+# define UNUSED(x) UNUSED_ ## x __attribute__((__unused__))
+#else
+# define UNUSED(x) UNUSED_ ## x
+#endif
+
+#undef HAVE_MALLOC_STATS
+
+#if defined(__linux__)
+# include <malloc.h>
+# define HAVE_MALLOC_STATS
+#elif defined(__FreeBSD__)
+# include <malloc_np.h>
+#elif defined(__APPLE__)
+# include <malloc/malloc.h>
+# define malloc_usable_size malloc_size
+#elif defined(WIN32)
+# include <malloc.h>
+# define malloc_usable_size _msize
+#else
+# error "We don't know how to use malloc_usable_size on your platform"
+#endif
+
+/* Blame Microsoft for LLP64 and no inttypes.h, quick workaround needed: */
+#if defined(WIN64)
+# define SIZET_FORMAT "%I64u"
+# define SIZET_ARG(a) ((unsigned long long)(a))
+#else
+# define SIZET_FORMAT "%lu"
+# define SIZET_ARG(a) ((unsigned long)(a))
+#endif
+
+#define SIZET_ALIGN_4(len) ((len + 3) & ~(size_t)3)
+
+/* Prototypes for counted allocator functions */
+size_t MEM_lockfree_allocN_len(const void *vmemh) ATTR_WARN_UNUSED_RESULT;
+void MEM_lockfree_freeN(void *vmemh);
+void *MEM_lockfree_dupallocN(const void *vmemh) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
+void *MEM_lockfree_reallocN_id(void *vmemh, size_t len, const char *UNUSED(str)) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(2);
+void *MEM_lockfree_recallocN_id(void *vmemh, size_t len, const char *UNUSED(str)) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(2);
+void *MEM_lockfree_callocN(size_t len, const char *UNUSED(str)) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2);
+void *MEM_lockfree_mallocN(size_t len, const char *UNUSED(str)) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2);
+void *MEM_lockfree_mapallocN(size_t len, const char *UNUSED(str)) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2);
+void MEM_lockfree_printmemlist_pydict(void);
+void MEM_lockfree_printmemlist(void);
+void MEM_lockfree_callbackmemlist(void (*func)(void *));
+void MEM_lockfree_printmemlist_stats(void);
+void MEM_lockfree_set_error_callback(void (*func)(const char *));
+bool MEM_lockfree_check_memory_integrity(void);
+void MEM_lockfree_set_lock_callback(void (*lock)(void), void (*unlock)(void));
+void MEM_lockfree_set_memory_debug(void);
+uintptr_t MEM_lockfree_get_memory_in_use(void);
+uintptr_t MEM_lockfree_get_mapped_memory_in_use(void);
+unsigned int MEM_lockfree_get_memory_blocks_in_use(void);
+void MEM_lockfree_reset_peak_memory(void);
+uintptr_t MEM_lockfree_get_peak_memory(void) ATTR_WARN_UNUSED_RESULT;
+#ifndef NDEBUG
+const char *MEM_lockfree_name_ptr(void *vmemh);
+#endif
+
+/* Prototypes for fully guarded allocator functions */
+size_t MEM_guarded_allocN_len(const void *vmemh) ATTR_WARN_UNUSED_RESULT;
+void MEM_guarded_freeN(void *vmemh);
+void *MEM_guarded_dupallocN(const void *vmemh) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
+void *MEM_guarded_reallocN_id(void *vmemh, size_t len, const char *UNUSED(str)) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(2);
+void *MEM_guarded_recallocN_id(void *vmemh, size_t len, const char *UNUSED(str)) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(2);
+void *MEM_guarded_callocN(size_t len, const char *UNUSED(str)) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2);
+void *MEM_guarded_mallocN(size_t len, const char *UNUSED(str)) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2);
+void *MEM_guarded_mapallocN(size_t len, const char *UNUSED(str)) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2);
+void MEM_guarded_printmemlist_pydict(void);
+void MEM_guarded_printmemlist(void);
+void MEM_guarded_callbackmemlist(void (*func)(void *));
+void MEM_guarded_printmemlist_stats(void);
+void MEM_guarded_set_error_callback(void (*func)(const char *));
+bool MEM_guarded_check_memory_integrity(void);
+void MEM_guarded_set_lock_callback(void (*lock)(void), void (*unlock)(void));
+void MEM_guarded_set_memory_debug(void);
+uintptr_t MEM_guarded_get_memory_in_use(void);
+uintptr_t MEM_guarded_get_mapped_memory_in_use(void);
+unsigned int MEM_guarded_get_memory_blocks_in_use(void);
+void MEM_guarded_reset_peak_memory(void);
+uintptr_t MEM_guarded_get_peak_memory(void) ATTR_WARN_UNUSED_RESULT;
+#ifndef NDEBUG
+const char *MEM_guarded_name_ptr(void *vmemh);
+#endif
+
+#endif /* __MALLOCN_INTERN_H__ */
diff --git a/intern/guardedalloc/intern/mallocn_lockfree_impl.c b/intern/guardedalloc/intern/mallocn_lockfree_impl.c
new file mode 100644
index 00000000000..44f51a34134
--- /dev/null
+++ b/intern/guardedalloc/intern/mallocn_lockfree_impl.c
@@ -0,0 +1,383 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Brecht Van Lommel
+ * Campbell Barton
+ * Sergey Sharybin
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file guardedalloc/intern/mallocn.c
+ * \ingroup MEM
+ *
+ * Memory allocation which keeps track on allocated memory counters
+ */
+
+#include <stdlib.h>
+#include <string.h> /* memcpy */
+#include <stdarg.h>
+#include <sys/types.h>
+
+#include "MEM_guardedalloc.h"
+
+/* to ensure strict conversions */
+#include "../../source/blender/blenlib/BLI_strict_flags.h"
+
+#include "atomic_ops.h"
+#include "mallocn_intern.h"
+
+typedef struct MemHead {
+ /* Length of allocated memory block. */
+ size_t len;
+} MemHead;
+
+static unsigned int totblock = 0;
+static size_t mem_in_use = 0, mmap_in_use = 0, peak_mem = 0;
+static bool malloc_debug_memset = false;
+
+static void (*error_callback)(const char *) = NULL;
+static void (*thread_lock_callback)(void) = NULL;
+static void (*thread_unlock_callback)(void) = NULL;
+
+#define MEMHEAD_FROM_PTR(ptr) (((MemHead*) vmemh) - 1)
+#define PTR_FROM_MEMHEAD(memhead) (memhead + 1)
+#define MEMHEAD_IS_MMAP(memhead) ((memhead)->len & (size_t) 1)
+
+#ifdef __GNUC__
+__attribute__ ((format(printf, 1, 2)))
+#endif
+static void print_error(const char *str, ...)
+{
+ char buf[512];
+ va_list ap;
+
+ va_start(ap, str);
+ vsnprintf(buf, sizeof(buf), str, ap);
+ va_end(ap);
+ buf[sizeof(buf) - 1] = '\0';
+
+ if (error_callback) {
+ error_callback(buf);
+ }
+}
+
+#if defined(WIN32)
+static void mem_lock_thread(void)
+{
+ if (thread_lock_callback)
+ thread_lock_callback();
+}
+
+static void mem_unlock_thread(void)
+{
+ if (thread_unlock_callback)
+ thread_unlock_callback();
+}
+#endif
+
+size_t MEM_lockfree_allocN_len(const void *vmemh)
+{
+ if (vmemh) {
+ return MEMHEAD_FROM_PTR(vmemh)->len & ~((size_t) 1);
+ }
+ else {
+ return 0;
+ }
+}
+
+void MEM_lockfree_freeN(void *vmemh)
+{
+ MemHead *memh = MEMHEAD_FROM_PTR(vmemh);
+ size_t len = MEM_lockfree_allocN_len(vmemh);
+
+ atomic_sub_u(&totblock, 1);
+ atomic_sub_z(&mem_in_use, len);
+
+ if (MEMHEAD_IS_MMAP(memh)) {
+ atomic_sub_z(&mmap_in_use, len);
+#if defined(WIN32)
+ /* our windows mmap implementation is not thread safe */
+ mem_lock_thread();
+#endif
+ if (munmap(memh, len + sizeof(MemHead)))
+ printf("Couldn't unmap memory\n");
+#if defined(WIN32)
+ mem_unlock_thread();
+#endif
+ }
+ else {
+ if (malloc_debug_memset && len) {
+ memset(memh + 1, 255, len);
+ }
+ free(memh);
+ }
+}
+
+void *MEM_lockfree_dupallocN(const void *vmemh)
+{
+ void *newp = NULL;
+ if (vmemh) {
+ MemHead *memh = MEMHEAD_FROM_PTR(vmemh);
+ const size_t prev_size = MEM_allocN_len(vmemh);
+ if (MEMHEAD_IS_MMAP(memh)) {
+ newp = MEM_lockfree_mapallocN(prev_size, "dupli_mapalloc");
+ }
+ else {
+ newp = MEM_lockfree_mallocN(prev_size, "dupli_malloc");
+ }
+ memcpy(newp, vmemh, prev_size);
+ }
+ return newp;
+}
+
+void *MEM_lockfree_reallocN_id(void *vmemh, size_t len, const char *str)
+{
+ void *newp = NULL;
+
+ if (vmemh) {
+ size_t old_len = MEM_allocN_len(vmemh);
+
+ newp = MEM_lockfree_mallocN(len, "realloc");
+ if (newp) {
+ if (len < old_len) {
+ /* shrink */
+ memcpy(newp, vmemh, len);
+ }
+ else {
+ /* grow (or remain same size) */
+ memcpy(newp, vmemh, old_len);
+ }
+ }
+
+ MEM_lockfree_freeN(vmemh);
+ }
+ else {
+ newp = MEM_lockfree_mallocN(len, str);
+ }
+
+ return newp;
+}
+
+void *MEM_lockfree_recallocN_id(void *vmemh, size_t len, const char *str)
+{
+ void *newp = NULL;
+
+ if (vmemh) {
+ size_t old_len = MEM_allocN_len(vmemh);
+
+ newp = MEM_lockfree_mallocN(len, "recalloc");
+ if (newp) {
+ if (len < old_len) {
+ /* shrink */
+ memcpy(newp, vmemh, len);
+ }
+ else {
+ memcpy(newp, vmemh, old_len);
+
+ if (len > old_len) {
+ /* grow */
+ /* zero new bytes */
+ memset(((char *)newp) + old_len, 0, len - old_len);
+ }
+ }
+ }
+
+ MEM_lockfree_freeN(vmemh);
+ }
+ else {
+ newp = MEM_lockfree_callocN(len, str);
+ }
+
+ return newp;
+}
+
+void *MEM_lockfree_callocN(size_t len, const char *str)
+{
+ MemHead *memh;
+
+ len = SIZET_ALIGN_4(len);
+
+ memh = (MemHead *)calloc(1, len + sizeof(MemHead));
+
+ if (memh) {
+ memh->len = len;
+ atomic_add_u(&totblock, 1);
+ atomic_add_z(&mem_in_use, len);
+
+ /* TODO(sergey): Not strictly speaking thread-safe. */
+ peak_mem = mem_in_use > peak_mem ? mem_in_use : peak_mem;
+
+ return PTR_FROM_MEMHEAD(memh);
+ }
+ print_error("Calloc returns null: len=" SIZET_FORMAT " in %s, total %u\n",
+ SIZET_ARG(len), str, (unsigned int) mem_in_use);
+ return NULL;
+}
+
+void *MEM_lockfree_mallocN(size_t len, const char *str)
+{
+ MemHead *memh;
+
+ len = SIZET_ALIGN_4(len);
+
+ memh = (MemHead *)malloc(len + sizeof(MemHead));
+
+ if (memh) {
+ if (malloc_debug_memset && len) {
+ memset(memh + 1, 255, len);
+ }
+
+ memh->len = len;
+ atomic_add_u(&totblock, 1);
+ atomic_add_z(&mem_in_use, len);
+
+ /* TODO(sergey): Not strictly speaking thread-safe. */
+ peak_mem = mem_in_use > peak_mem ? mem_in_use : peak_mem;
+
+ return PTR_FROM_MEMHEAD(memh);
+ }
+ print_error("Malloc returns null: len=" SIZET_FORMAT " in %s, total %u\n",
+ SIZET_ARG(len), str, (unsigned int) mem_in_use);
+ return NULL;
+}
+
+void *MEM_lockfree_mapallocN(size_t len, const char *str)
+{
+ MemHead *memh;
+
+ len = SIZET_ALIGN_4(len);
+
+#if defined(WIN32)
+ /* our windows mmap implementation is not thread safe */
+ mem_lock_thread();
+#endif
+ memh = mmap(NULL, len + sizeof(MemHead),
+ PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
+#if defined(WIN32)
+ mem_unlock_thread();
+#endif
+
+ if (memh != (MemHead *)-1) {
+ memh->len = len | (size_t) 1;
+ atomic_add_u(&totblock, 1);
+ atomic_add_z(&mem_in_use, len);
+ atomic_add_z(&mmap_in_use, len);
+
+ /* TODO(sergey): Not strictly speaking thread-safe. */
+ peak_mem = mem_in_use > peak_mem ? mem_in_use : peak_mem;
+ peak_mem = mmap_in_use > peak_mem ? mmap_in_use : peak_mem;
+
+ return PTR_FROM_MEMHEAD(memh);
+ }
+ print_error("Mapalloc returns null, fallback to regular malloc: "
+ "len=" SIZET_FORMAT " in %s, total %u\n",
+ SIZET_ARG(len), str, (unsigned int) mmap_in_use);
+ return MEM_lockfree_callocN(len, str);
+}
+
+void MEM_lockfree_printmemlist_pydict(void)
+{
+}
+
+void MEM_lockfree_printmemlist(void)
+{
+}
+
+/* unused */
+void MEM_lockfree_callbackmemlist(void (*func)(void *))
+{
+ (void) func; /* Ignored. */
+}
+
+void MEM_lockfree_printmemlist_stats(void)
+{
+ printf("\ntotal memory len: %.3f MB\n",
+ (double)mem_in_use / (double)(1024 * 1024));
+ printf("peak memory len: %.3f MB\n",
+ (double)peak_mem / (double)(1024 * 1024));
+ printf("\nFor more detailed per-block statistics run Blender with memory debugging command line argument.\n");
+
+#ifdef HAVE_MALLOC_STATS
+ printf("System Statistics:\n");
+ malloc_stats();
+#endif
+}
+
+void MEM_lockfree_set_error_callback(void (*func)(const char *))
+{
+ error_callback = func;
+}
+
+bool MEM_lockfree_check_memory_integrity(void)
+{
+ return true;
+}
+
+void MEM_lockfree_set_lock_callback(void (*lock)(void), void (*unlock)(void))
+{
+ thread_lock_callback = lock;
+ thread_unlock_callback = unlock;
+}
+
+void MEM_lockfree_set_memory_debug(void)
+{
+ malloc_debug_memset = true;
+}
+
+uintptr_t MEM_lockfree_get_memory_in_use(void)
+{
+ return mem_in_use;
+}
+
+uintptr_t MEM_lockfree_get_mapped_memory_in_use(void)
+{
+ return mmap_in_use;
+}
+
+unsigned int MEM_lockfree_get_memory_blocks_in_use(void)
+{
+ return totblock;
+}
+
+/* dummy */
+void MEM_lockfree_reset_peak_memory(void)
+{
+ peak_mem = 0;
+}
+
+uintptr_t MEM_lockfree_get_peak_memory(void)
+{
+ return peak_mem;
+}
+
+#ifndef NDEBUG
+const char *MEM_lockfree_name_ptr(void *vmemh)
+{
+ if (vmemh) {
+ return "unknown block name ptr";
+ }
+ else {
+ return "MEM_lockfree_name_ptr(NULL)";
+ }
+}
+#endif /* NDEBUG */
diff --git a/intern/guardedalloc/intern/mmap_win.c b/intern/guardedalloc/intern/mmap_win.c
index ab50edb811e..6f03188a579 100644
--- a/intern/guardedalloc/intern/mmap_win.c
+++ b/intern/guardedalloc/intern/mmap_win.c
@@ -159,7 +159,7 @@ void *mmap(void *UNUSED(start), size_t len, int prot, int flags, int fd, off_t o
}
/* munmap for windows */
-intptr_t munmap(void *ptr, intptr_t UNUSED(size))
+intptr_t munmap(void *ptr, size_t UNUSED(size))
{
MemMap *mm = mmap_findlink(mmapbase, ptr);
if (!mm) {
diff --git a/intern/guardedalloc/mmap_win.h b/intern/guardedalloc/mmap_win.h
index c84882b1052..a1959fed9f9 100644
--- a/intern/guardedalloc/mmap_win.h
+++ b/intern/guardedalloc/mmap_win.h
@@ -51,8 +51,10 @@
/* needed for uintptr_t, exception, dont use BLI anywhere else in MEM_* */
#include "../../source/blender/blenlib/BLI_sys_types.h"
+#include <sys/types.h>
+
void *mmap(void *start, size_t len, int prot, int flags, int fd, off_t offset);
-intptr_t munmap(void *ptr, intptr_t size);
+intptr_t munmap(void *ptr, size_t size);
#endif
diff --git a/intern/guardedalloc/test/simpletest/memtest.c b/intern/guardedalloc/test/simpletest/memtest.c
index 12ea6ddcd26..841b47bd4f1 100644
--- a/intern/guardedalloc/test/simpletest/memtest.c
+++ b/intern/guardedalloc/test/simpletest/memtest.c
@@ -31,7 +31,9 @@
* Simple test of memory.
*/
-
+/* To compile run:
+ * gcc -DWITH_GUARDEDALLOC -I../../ -I../../../atomic/ memtest.c ../../intern/mallocn.c -o simpletest
+ */
/* Number of chunks to test with */
#define NUM_BLOCKS 10
diff --git a/intern/locale/boost_locale_wrapper.cpp b/intern/locale/boost_locale_wrapper.cpp
index 5d7ba599467..945d0bbc5da 100644
--- a/intern/locale/boost_locale_wrapper.cpp
+++ b/intern/locale/boost_locale_wrapper.cpp
@@ -109,7 +109,7 @@ const char *bl_locale_pgettext(const char *msgctxt, const char *msgid)
std::locale l;
char_message_facet const &facet = std::use_facet<char_message_facet>(l);
char const *r = facet.get(0, msgctxt, msgid);
- if(r)
+ if (r)
return r;
return msgid;
}
diff --git a/intern/mikktspace/mikktspace.c b/intern/mikktspace/mikktspace.c
index 018869f36b6..62aa2da2517 100644
--- a/intern/mikktspace/mikktspace.c
+++ b/intern/mikktspace/mikktspace.c
@@ -440,8 +440,8 @@ static const int g_iCells = 2048;
static NOINLINE int FindGridCell(const float fMin, const float fMax, const float fVal)
{
const float fIndex = g_iCells * ((fVal-fMin)/(fMax-fMin));
- const int iIndex = fIndex<0?0:((int)fIndex);
- return iIndex<g_iCells?iIndex:(g_iCells-1);
+ const int iIndex = (int)fIndex;
+ return iIndex < g_iCells ? (iIndex >= 0 ? iIndex : 0) : (g_iCells - 1);
}
static void MergeVertsFast(int piTriList_in_and_out[], STmpVert pTmpVert[], const SMikkTSpaceContext * pContext, const int iL_in, const int iR_in);
diff --git a/intern/opencolorio/CMakeLists.txt b/intern/opencolorio/CMakeLists.txt
index 30a74baa646..3a139dc64cf 100644
--- a/intern/opencolorio/CMakeLists.txt
+++ b/intern/opencolorio/CMakeLists.txt
@@ -62,6 +62,8 @@ if(WITH_OPENCOLORIO)
${BOOST_INCLUDE_DIR}
)
endif()
+
+ data_to_c_simple(gpu_shader_display_transform.glsl SRC)
endif()
diff --git a/intern/opencolorio/SConscript b/intern/opencolorio/SConscript
index 7f050f25cae..70aa9000719 100644
--- a/intern/opencolorio/SConscript
+++ b/intern/opencolorio/SConscript
@@ -39,6 +39,13 @@ if env['WITH_BF_OCIO']:
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
incs += ' ' + env['BF_BOOST_INC']
+
+ # generated data files
+ import os
+ sources.extend((
+ os.path.join(env['DATA_SOURCES'], "gpu_shader_display_transform.glsl.c"),
+ ))
+
else:
sources.remove('ocio_impl.cc')
sources.remove('ocio_impl_glsl.cc')
diff --git a/intern/opencolorio/fallback_impl.cc b/intern/opencolorio/fallback_impl.cc
index 37f624e1f8b..ca999eab569 100644
--- a/intern/opencolorio/fallback_impl.cc
+++ b/intern/opencolorio/fallback_impl.cc
@@ -54,7 +54,7 @@ OCIO_ConstConfigRcPtr *FallbackImpl::getCurrentConfig(void)
return CONFIG_DEFAULT;
}
-void FallbackImpl::setCurrentConfig(const OCIO_ConstConfigRcPtr *)
+void FallbackImpl::setCurrentConfig(const OCIO_ConstConfigRcPtr * /*config*/)
{
}
@@ -63,21 +63,21 @@ OCIO_ConstConfigRcPtr *FallbackImpl::configCreateFromEnv(void)
return CONFIG_DEFAULT;
}
-OCIO_ConstConfigRcPtr *FallbackImpl::configCreateFromFile(const char *)
+OCIO_ConstConfigRcPtr *FallbackImpl::configCreateFromFile(const char * /*filename*/)
{
return CONFIG_DEFAULT;
}
-void FallbackImpl::configRelease(OCIO_ConstConfigRcPtr *)
+void FallbackImpl::configRelease(OCIO_ConstConfigRcPtr * /*config*/)
{
}
-int FallbackImpl::configGetNumColorSpaces(OCIO_ConstConfigRcPtr *)
+int FallbackImpl::configGetNumColorSpaces(OCIO_ConstConfigRcPtr * /*config*/)
{
return 2;
}
-const char *FallbackImpl::configGetColorSpaceNameByIndex(OCIO_ConstConfigRcPtr *, int index)
+const char *FallbackImpl::configGetColorSpaceNameByIndex(OCIO_ConstConfigRcPtr * /*config*/, int index)
{
if (index == 0)
return "Linear";
@@ -87,7 +87,7 @@ const char *FallbackImpl::configGetColorSpaceNameByIndex(OCIO_ConstConfigRcPtr *
return NULL;
}
-OCIO_ConstColorSpaceRcPtr *FallbackImpl::configGetColorSpace(OCIO_ConstConfigRcPtr *, const char *name)
+OCIO_ConstColorSpaceRcPtr *FallbackImpl::configGetColorSpace(OCIO_ConstConfigRcPtr * /*config*/, const char *name)
{
if (strcmp(name, "scene_linear") == 0)
return COLORSPACE_LINEAR;
@@ -121,17 +121,17 @@ int FallbackImpl::configGetIndexForColorSpace(OCIO_ConstConfigRcPtr *config, con
return -1;
}
-const char *FallbackImpl::configGetDefaultDisplay(OCIO_ConstConfigRcPtr *)
+const char *FallbackImpl::configGetDefaultDisplay(OCIO_ConstConfigRcPtr * /*config*/)
{
return "sRGB";
}
-int FallbackImpl::configGetNumDisplays(OCIO_ConstConfigRcPtr* config)
+int FallbackImpl::configGetNumDisplays(OCIO_ConstConfigRcPtr * /*config*/)
{
return 1;
}
-const char *FallbackImpl::configGetDisplay(OCIO_ConstConfigRcPtr *, int index)
+const char *FallbackImpl::configGetDisplay(OCIO_ConstConfigRcPtr * /*config*/, int index)
{
if (index == 0)
return "sRGB";
@@ -139,17 +139,17 @@ const char *FallbackImpl::configGetDisplay(OCIO_ConstConfigRcPtr *, int index)
return NULL;
}
-const char *FallbackImpl::configGetDefaultView(OCIO_ConstConfigRcPtr *, const char *)
+const char *FallbackImpl::configGetDefaultView(OCIO_ConstConfigRcPtr * /*config*/, const char * /*display*/)
{
return "Default";
}
-int FallbackImpl::configGetNumViews(OCIO_ConstConfigRcPtr *, const char *)
+int FallbackImpl::configGetNumViews(OCIO_ConstConfigRcPtr * /*config*/, const char * /*display*/)
{
return 1;
}
-const char *FallbackImpl::configGetView(OCIO_ConstConfigRcPtr *, const char *, int index)
+const char *FallbackImpl::configGetView(OCIO_ConstConfigRcPtr * /*config*/, const char * /*display*/, int index)
{
if (index == 0)
return "Default";
@@ -157,22 +157,46 @@ const char *FallbackImpl::configGetView(OCIO_ConstConfigRcPtr *, const char *, i
return NULL;
}
-const char *FallbackImpl::configGetDisplayColorSpaceName(OCIO_ConstConfigRcPtr *, const char *, const char *)
+const char *FallbackImpl::configGetDisplayColorSpaceName(OCIO_ConstConfigRcPtr * /*config*/, const char * /*display*/, const char * /*view*/)
{
return "sRGB";
}
-int FallbackImpl::colorSpaceIsInvertible(OCIO_ConstColorSpaceRcPtr *cs)
+int FallbackImpl::configGetNumLooks(OCIO_ConstConfigRcPtr * /*config*/)
+{
+ return 0;
+}
+
+const char *FallbackImpl::configGetLookNameByIndex(OCIO_ConstConfigRcPtr * /*config*/, int /*index*/)
+{
+ return "";
+}
+
+OCIO_ConstLookRcPtr *FallbackImpl::configGetLook(OCIO_ConstConfigRcPtr * /*config*/, const char * /*name*/)
+{
+ return NULL;
+}
+
+const char *FallbackImpl::lookGetProcessSpace(OCIO_ConstLookRcPtr *look)
+{
+ return NULL;
+}
+
+void FallbackImpl::lookRelease(OCIO_ConstLookRcPtr * /*look*/)
+{
+}
+
+int FallbackImpl::colorSpaceIsInvertible(OCIO_ConstColorSpaceRcPtr * /*cs*/)
{
return 1;
}
-int FallbackImpl::colorSpaceIsData(OCIO_ConstColorSpaceRcPtr *cs)
+int FallbackImpl::colorSpaceIsData(OCIO_ConstColorSpaceRcPtr * /*cs*/)
{
return 0;
}
-void FallbackImpl::colorSpaceRelease(OCIO_ConstColorSpaceRcPtr *cs)
+void FallbackImpl::colorSpaceRelease(OCIO_ConstColorSpaceRcPtr * /*cs*/)
{
}
@@ -189,7 +213,7 @@ OCIO_ConstProcessorRcPtr *FallbackImpl::configGetProcessorWithNames(OCIO_ConstCo
return 0;
}
-OCIO_ConstProcessorRcPtr *FallbackImpl::configGetProcessor(OCIO_ConstConfigRcPtr *, OCIO_ConstTransformRcPtr *tfm)
+OCIO_ConstProcessorRcPtr *FallbackImpl::configGetProcessor(OCIO_ConstConfigRcPtr * /*config*/, OCIO_ConstTransformRcPtr *tfm)
{
return (OCIO_ConstProcessorRcPtr*)tfm;
}
@@ -277,7 +301,7 @@ void FallbackImpl::processorApplyRGBA_predivide(OCIO_ConstProcessorRcPtr *proces
}
}
-void FallbackImpl::processorRelease(OCIO_ConstProcessorRcPtr *)
+void FallbackImpl::processorRelease(OCIO_ConstProcessorRcPtr * /*p*/)
{
}
@@ -291,12 +315,12 @@ const char *FallbackImpl::colorSpaceGetName(OCIO_ConstColorSpaceRcPtr *cs)
return NULL;
}
-const char *FallbackImpl::colorSpaceGetDescription(OCIO_ConstColorSpaceRcPtr *)
+const char *FallbackImpl::colorSpaceGetDescription(OCIO_ConstColorSpaceRcPtr * /*cs*/)
{
return "";
}
-const char *FallbackImpl::colorSpaceGetFamily(OCIO_ConstColorSpaceRcPtr *)
+const char *FallbackImpl::colorSpaceGetFamily(OCIO_ConstColorSpaceRcPtr * /*cs*/)
{
return "";
}
@@ -306,27 +330,35 @@ OCIO_DisplayTransformRcPtr *FallbackImpl::createDisplayTransform(void)
return (OCIO_DisplayTransformRcPtr*)PROCESSOR_LINEAR_TO_SRGB;
}
-void FallbackImpl::displayTransformSetInputColorSpaceName(OCIO_DisplayTransformRcPtr *, const char *)
+void FallbackImpl::displayTransformSetInputColorSpaceName(OCIO_DisplayTransformRcPtr * /*dt*/, const char * /*name*/)
+{
+}
+
+void FallbackImpl::displayTransformSetDisplay(OCIO_DisplayTransformRcPtr * /*dt*/, const char * /*name*/)
{
}
-void FallbackImpl::displayTransformSetDisplay(OCIO_DisplayTransformRcPtr *, const char *)
+void FallbackImpl::displayTransformSetView(OCIO_DisplayTransformRcPtr * /*dt*/, const char * /*name*/)
{
}
-void FallbackImpl::displayTransformSetView(OCIO_DisplayTransformRcPtr *, const char *)
+void FallbackImpl::displayTransformSetDisplayCC(OCIO_DisplayTransformRcPtr * /*dt*/, OCIO_ConstTransformRcPtr * /*et*/)
{
}
-void FallbackImpl::displayTransformSetDisplayCC(OCIO_DisplayTransformRcPtr *, OCIO_ConstTransformRcPtr *)
+void FallbackImpl::displayTransformSetLinearCC(OCIO_DisplayTransformRcPtr * /*dt*/, OCIO_ConstTransformRcPtr * /*et*/)
{
}
-void FallbackImpl::displayTransformSetLinearCC(OCIO_DisplayTransformRcPtr *, OCIO_ConstTransformRcPtr *)
+void FallbackImpl::displayTransformSetLooksOverride(OCIO_DisplayTransformRcPtr * /*dt*/, const char * /*looks*/)
{
}
-void FallbackImpl::displayTransformRelease(OCIO_DisplayTransformRcPtr *)
+void FallbackImpl::displayTransformSetLooksOverrideEnabled(OCIO_DisplayTransformRcPtr * /*dt*/, bool /*enabled*/)
+{
+}
+
+void FallbackImpl::displayTransformRelease(OCIO_DisplayTransformRcPtr * /*dt*/)
{
}
@@ -356,11 +388,11 @@ OCIO_ExponentTransformRcPtr *FallbackImpl::createExponentTransform(void)
return (OCIO_ExponentTransformRcPtr*)PROCESSOR_UNKNOWN;
}
-void FallbackImpl::exponentTransformSetValue(OCIO_ExponentTransformRcPtr *, const float *)
+void FallbackImpl::exponentTransformSetValue(OCIO_ExponentTransformRcPtr * /*et*/, const float * /*exponent*/)
{
}
-void FallbackImpl::exponentTransformRelease(OCIO_ExponentTransformRcPtr *)
+void FallbackImpl::exponentTransformRelease(OCIO_ExponentTransformRcPtr * /*et*/)
{
}
@@ -369,27 +401,33 @@ OCIO_MatrixTransformRcPtr *FallbackImpl::createMatrixTransform(void)
return (OCIO_MatrixTransformRcPtr*)PROCESSOR_UNKNOWN;
}
-void FallbackImpl::matrixTransformSetValue(OCIO_MatrixTransformRcPtr *, const float *, const float *)
+void FallbackImpl::matrixTransformSetValue(OCIO_MatrixTransformRcPtr * /*mt*/, const float * /*m44*/, const float * /*offset4*/)
{
}
-void FallbackImpl::matrixTransformRelease(OCIO_MatrixTransformRcPtr *)
+void FallbackImpl::matrixTransformRelease(OCIO_MatrixTransformRcPtr * /*mt*/)
{
}
-void FallbackImpl::matrixTransformScale(float * , float * , const float *)
+void FallbackImpl::matrixTransformScale(float * /*m44*/, float * /*offset44*/, const float * /*scale4*/)
{
}
-bool FallbackImpl::setupGLSLDraw(struct OCIO_GLSLDrawState **state_r, OCIO_ConstProcessorRcPtr *processor, bool predivide)
+bool FallbackImpl::supportGLSLDraw(void)
+{
+ return false;
+}
+
+bool FallbackImpl::setupGLSLDraw(struct OCIO_GLSLDrawState ** /*state_r*/, OCIO_ConstProcessorRcPtr * /*processor*/,
+ OCIO_CurveMappingSettings * /*curve_mapping_settings*/, bool /*predivide*/)
{
return false;
}
-void FallbackImpl::finishGLSLDraw(OCIO_GLSLDrawState *state)
+void FallbackImpl::finishGLSLDraw(OCIO_GLSLDrawState * /*state*/)
{
}
-void FallbackImpl::freeGLState(struct OCIO_GLSLDrawState *state_r)
+void FallbackImpl::freeGLState(struct OCIO_GLSLDrawState * /*state_r*/)
{
}
diff --git a/intern/opencolorio/gpu_shader_display_transform.glsl b/intern/opencolorio/gpu_shader_display_transform.glsl
new file mode 100644
index 00000000000..6ba3fa55e8f
--- /dev/null
+++ b/intern/opencolorio/gpu_shader_display_transform.glsl
@@ -0,0 +1,123 @@
+uniform sampler2D image_texture;
+uniform sampler3D lut3d_texture;
+uniform bool predivide;
+
+#ifdef USE_CURVE_MAPPING
+/* Curve mapping parameters
+ *
+ * See documentation for OCIO_CurveMappingSettings to get fields descriptions.
+ * (this ones pretyt much copies stuff from C structure.)
+ */
+uniform sampler1D curve_mapping_texture;
+uniform int curve_mapping_lut_size;
+uniform ivec4 use_curve_mapping_extend_extrapolate;
+uniform vec4 curve_mapping_mintable;
+uniform vec4 curve_mapping_range;
+uniform vec4 curve_mapping_ext_in_x;
+uniform vec4 curve_mapping_ext_in_y;
+uniform vec4 curve_mapping_ext_out_x;
+uniform vec4 curve_mapping_ext_out_y;
+uniform vec4 curve_mapping_first_x;
+uniform vec4 curve_mapping_first_y;
+uniform vec4 curve_mapping_last_x;
+uniform vec4 curve_mapping_last_y;
+uniform vec3 curve_mapping_black;
+uniform vec3 curve_mapping_bwmul;
+
+float read_curve_mapping(int table, int index)
+{
+ /* TODO(sergey): Without -1 here image is getting darken after applying unite curve.
+ * But is it actually correct to subtract 1 here?
+ */
+ float texture_index = float(index) / float(curve_mapping_lut_size - 1);
+ return texture1D(curve_mapping_texture, texture_index) [table];
+}
+
+float curvemap_calc_extend(int table, float x, vec2 first, vec2 last)
+{
+ if (x <= first[0]) {
+ if (use_curve_mapping_extend_extrapolate[table] == 0) {
+ /* no extrapolate */
+ return first[1];
+ }
+ else {
+ if (curve_mapping_ext_in_x[table] == 0.0)
+ return first[1] + curve_mapping_ext_in_y[table] * 10000.0;
+ else
+ return first[1] + curve_mapping_ext_in_y[table] * (x - first[0]) / curve_mapping_ext_in_x[table];
+ }
+ }
+ else if (x >= last[0]) {
+ if (use_curve_mapping_extend_extrapolate[table] == 0) {
+ /* no extrapolate */
+ return last[1];
+ }
+ else {
+ if (curve_mapping_ext_out_x[table] == 0.0)
+ return last[1] - curve_mapping_ext_out_y[table] * 10000.0;
+ else
+ return last[1] + curve_mapping_ext_out_y[table] * (x - last[0]) / curve_mapping_ext_out_x[table];
+ }
+ }
+ return 0.0;
+}
+
+float curvemap_evaluateF(int table, float value)
+{
+ float mintable_ = curve_mapping_mintable[table];
+ float range = curve_mapping_range[table];
+ float mintable = 0.0;
+ int CM_TABLE = curve_mapping_lut_size - 1;
+
+ float fi;
+ int i;
+
+ /* index in table */
+ fi = (value - mintable) * range;
+ i = int(fi);
+
+ /* fi is table float index and should check against table range i.e. [0.0 CM_TABLE] */
+ if (fi < 0.0 || fi > float(CM_TABLE)) {
+ return curvemap_calc_extend(table, value,
+ vec2(curve_mapping_first_x[table], curve_mapping_first_y[table]),
+ vec2(curve_mapping_last_x[table], curve_mapping_last_y[table]));
+ }
+ else {
+ if (i < 0) return read_curve_mapping(table, 0);
+ if (i >= CM_TABLE) return read_curve_mapping(table, CM_TABLE);
+
+ fi = fi - float(i);
+ return (1.0 - fi) * read_curve_mapping(table, i) + fi * read_curve_mapping(table, i + 1);
+ }
+}
+
+vec4 curvemapping_evaluate_premulRGBF(vec4 col)
+{
+ vec4 result = col;
+ result[0] = curvemap_evaluateF(0, (col[0] - curve_mapping_black[0]) * curve_mapping_bwmul[0]);
+ result[1] = curvemap_evaluateF(1, (col[1] - curve_mapping_black[1]) * curve_mapping_bwmul[1]);
+ result[2] = curvemap_evaluateF(2, (col[2] - curve_mapping_black[2]) * curve_mapping_bwmul[2]);
+ result[3] = col[3];
+ return result;
+}
+#endif
+
+void main()
+{
+ vec4 col = texture2D(image_texture, gl_TexCoord[0].st);
+#ifdef USE_CURVE_MAPPING
+ col = curvemapping_evaluate_premulRGBF(col);
+#endif
+ if (predivide && col[3] > 0.0 && col[3] < 1.0) {
+ float inv_alpha = 1.0 / col[3];
+ col[0] *= inv_alpha;
+ col[1] *= inv_alpha;
+ col[2] *= inv_alpha;
+ }
+
+ /* NOTE: This is true we only do de-premul here and NO premul
+ * and the reason is simple -- opengl is always configured
+ * for straight alpha at this moment
+ */
+ gl_FragColor = OCIODisplay(col, lut3d_texture);
+}
diff --git a/intern/opencolorio/ocio_capi.cc b/intern/opencolorio/ocio_capi.cc
index c8db2c2b531..30668dff245 100644
--- a/intern/opencolorio/ocio_capi.cc
+++ b/intern/opencolorio/ocio_capi.cc
@@ -132,6 +132,31 @@ const char *OCIO_configGetDisplayColorSpaceName(OCIO_ConstConfigRcPtr *config, c
return impl->configGetDisplayColorSpaceName(config, display, view);
}
+int OCIO_configGetNumLooks(OCIO_ConstConfigRcPtr *config)
+{
+ return impl->configGetNumLooks(config);
+}
+
+const char *OCIO_configGetLookNameByIndex(OCIO_ConstConfigRcPtr *config, int index)
+{
+ return impl->configGetLookNameByIndex(config, index);
+}
+
+OCIO_ConstLookRcPtr *OCIO_configGetLook(OCIO_ConstConfigRcPtr *config, const char *name)
+{
+ return impl->configGetLook(config, name);
+}
+
+const char *OCIO_lookGetProcessSpace(OCIO_ConstLookRcPtr *look)
+{
+ return impl->lookGetProcessSpace(look);
+}
+
+void OCIO_lookRelease(OCIO_ConstLookRcPtr *look)
+{
+ impl->lookRelease(look);
+}
+
int OCIO_colorSpaceIsInvertible(OCIO_ConstColorSpaceRcPtr *cs)
{
return impl->colorSpaceIsInvertible(cs);
@@ -232,6 +257,16 @@ void OCIO_displayTransformSetLinearCC(OCIO_DisplayTransformRcPtr *dt, OCIO_Const
impl->displayTransformSetLinearCC(dt, t);
}
+void OCIO_displayTransformSetLooksOverride(OCIO_DisplayTransformRcPtr *dt, const char *looks)
+{
+ impl->displayTransformSetLooksOverride(dt, looks);
+}
+
+void OCIO_displayTransformSetLooksOverrideEnabled(OCIO_DisplayTransformRcPtr *dt, bool enabled)
+{
+ impl->displayTransformSetLooksOverrideEnabled(dt, enabled);
+}
+
void OCIO_displayTransformRelease(OCIO_DisplayTransformRcPtr *dt)
{
impl->displayTransformRelease(dt);
@@ -278,14 +313,20 @@ void OCIO_matrixTransformRelease(OCIO_MatrixTransformRcPtr *mt)
impl->matrixTransformRelease(mt);
}
-void OCIO_matrixTransformScale(float * m44, float * offset4, const float *scale4f)
+void OCIO_matrixTransformScale(float *m44, float *offset4, const float *scale4f)
{
impl->matrixTransformScale(m44, offset4, scale4f);
}
-int OCIO_setupGLSLDraw(struct OCIO_GLSLDrawState **state_r, OCIO_ConstProcessorRcPtr *processor, int predivide)
+int OCIO_supportGLSLDraw(void)
+{
+ return (int) impl->supportGLSLDraw();
+}
+
+int OCIO_setupGLSLDraw(struct OCIO_GLSLDrawState **state_r, OCIO_ConstProcessorRcPtr *processor,
+ OCIO_CurveMappingSettings *curve_mapping_settings, bool predivide)
{
- return (int) impl->setupGLSLDraw(state_r, processor, (bool) predivide);
+ return (int) impl->setupGLSLDraw(state_r, processor, curve_mapping_settings, predivide);
}
void OCIO_finishGLSLDraw(struct OCIO_GLSLDrawState *state)
diff --git a/intern/opencolorio/ocio_capi.h b/intern/opencolorio/ocio_capi.h
index 3632a0da1c6..5532ade1f3a 100644
--- a/intern/opencolorio/ocio_capi.h
+++ b/intern/opencolorio/ocio_capi.h
@@ -52,6 +52,63 @@ OCIO_DECLARE_HANDLE(OCIO_DisplayTransformRcPtr);
OCIO_DECLARE_HANDLE(OCIO_ConstTransformRcPtr);
OCIO_DECLARE_HANDLE(OCIO_ExponentTransformRcPtr);
OCIO_DECLARE_HANDLE(OCIO_MatrixTransformRcPtr);
+OCIO_DECLARE_HANDLE(OCIO_ConstLookRcPtr);
+
+/* This structure is used to pass curve mapping settings from
+ * blender's DNA structure stored in view transform settings
+ * to a generic OpenColorIO C-API.
+ */
+typedef struct OCIO_CurveMappingSettings {
+ /* This is a LUT which contain values for all 4 curve mapping tables
+ * (combined, R, G and B).
+ *
+ * Element I for table T is stored at I * 4 + T element of this LUT.
+ *
+ * This array is usually returned by curvemapping_table_RGBA().
+ */
+ float *lut;
+
+ /* Size of single curve mapping table, 1/4 size of lut array. */
+ int lut_size;
+
+ /* Extend extrapolation flags for all the tables.
+ * if use_extend_extrapolate[T] != 0 means extrapolation for
+ * table T is needed.
+ */
+ int use_extend_extrapolate[4];
+
+ /* Minimal X value of the curve mapping tables. */
+ float mintable[4];
+
+ /* Per curve mapping table range. */
+ float range[4];
+
+ /* Lower extension value, stored as per-component arrays. */
+ float ext_in_x[4], ext_in_y[4];
+
+ /* Higher extension value, stored as per-component arrays. */
+ float ext_out_x[4], ext_out_y[4];
+
+ /* First points of the tables, both X and Y values.
+ * Needed for easier and faster access when extrapolating.
+ */
+ float first_x[4], first_y[4];
+
+ /* Last points of the tables, both X and Y values.
+ * Needed for easier and faster access when extrapolating.
+ */
+ float last_x[4], last_y[4];
+
+ /* Premultiplication settings: black level and scale to match
+ * with white level.
+ */
+ float black[3], bwmul[3];
+
+ /* Cache id of the original curve mapping, used to detect when
+ * upload of new settings to GPU is needed.
+ */
+ size_t cache_id;
+} OCIO_CurveMappingSettings;
void OCIO_init(void);
void OCIO_exit(void);
@@ -83,6 +140,13 @@ int OCIO_configGetNumViews(OCIO_ConstConfigRcPtr *config, const char *di
const char *OCIO_configGetView(OCIO_ConstConfigRcPtr *config, const char *display, int index);
const char *OCIO_configGetDisplayColorSpaceName(OCIO_ConstConfigRcPtr *config, const char *display, const char *view);
+int OCIO_configGetNumLooks(OCIO_ConstConfigRcPtr *config);
+const char *OCIO_configGetLookNameByIndex(OCIO_ConstConfigRcPtr *config, int index);
+OCIO_ConstLookRcPtr *OCIO_configGetLook(OCIO_ConstConfigRcPtr *config, const char *name);
+
+const char *OCIO_lookGetProcessSpace(OCIO_ConstLookRcPtr *look);
+void OCIO_lookRelease(OCIO_ConstLookRcPtr *look);
+
OCIO_ConstProcessorRcPtr *OCIO_configGetProcessorWithNames(OCIO_ConstConfigRcPtr *config, const char *srcName, const char *dstName);
OCIO_ConstProcessorRcPtr *OCIO_configGetProcessor(OCIO_ConstConfigRcPtr *config, OCIO_ConstTransformRcPtr *transform);
@@ -104,6 +168,8 @@ void OCIO_displayTransformSetDisplay(OCIO_DisplayTransformRcPtr *dt, const char
void OCIO_displayTransformSetView(OCIO_DisplayTransformRcPtr *dt, const char *name);
void OCIO_displayTransformSetDisplayCC(OCIO_DisplayTransformRcPtr *dt, OCIO_ConstTransformRcPtr *et);
void OCIO_displayTransformSetLinearCC(OCIO_DisplayTransformRcPtr *dt, OCIO_ConstTransformRcPtr *et);
+void OCIO_displayTransformSetLooksOverride(OCIO_DisplayTransformRcPtr *dt, const char *looks);
+void OCIO_displayTransformSetLooksOverrideEnabled(OCIO_DisplayTransformRcPtr *dt, bool enabled);
void OCIO_displayTransformRelease(OCIO_DisplayTransformRcPtr *dt);
OCIO_PackedImageDesc *OCIO_createOCIO_PackedImageDesc(float *data, long width, long height, long numChannels,
@@ -116,12 +182,14 @@ void OCIO_exponentTransformSetValue(OCIO_ExponentTransformRcPtr *et, const float
void OCIO_exponentTransformRelease(OCIO_ExponentTransformRcPtr *et);
OCIO_MatrixTransformRcPtr *OCIO_createMatrixTransform(void);
-void OCIO_matrixTransformSetValue(OCIO_MatrixTransformRcPtr *et, const float *m44, const float *offset4);
+void OCIO_matrixTransformSetValue(OCIO_MatrixTransformRcPtr *mt, const float *m44, const float *offset4);
void OCIO_matrixTransformRelease(OCIO_MatrixTransformRcPtr *mt);
-void OCIO_matrixTransformScale(float * m44, float * offset4, const float * scale4);
+void OCIO_matrixTransformScale(float *m44, float *offset4, const float *scale4);
-int OCIO_setupGLSLDraw(struct OCIO_GLSLDrawState **state_r, OCIO_ConstProcessorRcPtr *processor, int predivide);
+int OCIO_supportGLSLDraw(void);
+int OCIO_setupGLSLDraw(struct OCIO_GLSLDrawState **state_r, OCIO_ConstProcessorRcPtr *processor,
+ OCIO_CurveMappingSettings *curve_mapping_settings, bool predivide);
void OCIO_finishGLSLDraw(struct OCIO_GLSLDrawState *state);
void OCIO_freeOGLState(struct OCIO_GLSLDrawState *state);
diff --git a/intern/opencolorio/ocio_impl.cc b/intern/opencolorio/ocio_impl.cc
index 05c29fd5854..2cffe1a89ef 100644
--- a/intern/opencolorio/ocio_impl.cc
+++ b/intern/opencolorio/ocio_impl.cc
@@ -55,11 +55,6 @@ using namespace OCIO_NAMESPACE;
# define __func__ __FUNCTION__
#endif
-#define MEM_NEW(type) new(MEM_mallocN(sizeof(type), __func__)) type()
-#define MEM_DELETE(what, type) if(what) { ((type*)(what))->~type(); MEM_freeN(what); } (void)0
-
-static const int LUT3D_EDGE_SIZE = 32;
-
static void OCIO_reportError(const char *err)
{
std::cerr << "OpenColorIO Error: " << err << std::endl;
@@ -74,7 +69,7 @@ static void OCIO_reportException(Exception &exception)
OCIO_ConstConfigRcPtr *OCIOImpl::getCurrentConfig(void)
{
- ConstConfigRcPtr *config = MEM_NEW(ConstConfigRcPtr);
+ ConstConfigRcPtr *config = OBJECT_GUARDED_NEW(ConstConfigRcPtr);
try {
*config = GetCurrentConfig();
@@ -86,7 +81,7 @@ OCIO_ConstConfigRcPtr *OCIOImpl::getCurrentConfig(void)
OCIO_reportException(exception);
}
- MEM_DELETE(config, ConstConfigRcPtr);
+ OBJECT_GUARDED_DELETE(config, ConstConfigRcPtr);
return NULL;
}
@@ -103,7 +98,7 @@ void OCIOImpl::setCurrentConfig(const OCIO_ConstConfigRcPtr *config)
OCIO_ConstConfigRcPtr *OCIOImpl::configCreateFromEnv(void)
{
- ConstConfigRcPtr *config = MEM_NEW(ConstConfigRcPtr);
+ ConstConfigRcPtr *config = OBJECT_GUARDED_NEW(ConstConfigRcPtr);
try {
*config = Config::CreateFromEnv();
@@ -115,7 +110,7 @@ OCIO_ConstConfigRcPtr *OCIOImpl::configCreateFromEnv(void)
OCIO_reportException(exception);
}
- MEM_DELETE(config, ConstConfigRcPtr);
+ OBJECT_GUARDED_DELETE(config, ConstConfigRcPtr);
return NULL;
}
@@ -123,7 +118,7 @@ OCIO_ConstConfigRcPtr *OCIOImpl::configCreateFromEnv(void)
OCIO_ConstConfigRcPtr *OCIOImpl::configCreateFromFile(const char *filename)
{
- ConstConfigRcPtr *config = MEM_NEW(ConstConfigRcPtr);
+ ConstConfigRcPtr *config = OBJECT_GUARDED_NEW(ConstConfigRcPtr);
try {
*config = Config::CreateFromFile(filename);
@@ -135,14 +130,14 @@ OCIO_ConstConfigRcPtr *OCIOImpl::configCreateFromFile(const char *filename)
OCIO_reportException(exception);
}
- MEM_DELETE(config, ConstConfigRcPtr);
+ OBJECT_GUARDED_DELETE(config, ConstConfigRcPtr);
return NULL;
}
void OCIOImpl::configRelease(OCIO_ConstConfigRcPtr *config)
{
- MEM_DELETE((ConstConfigRcPtr *) config, ConstConfigRcPtr);
+ OBJECT_GUARDED_DELETE((ConstConfigRcPtr *) config, ConstConfigRcPtr);
}
int OCIOImpl::configGetNumColorSpaces(OCIO_ConstConfigRcPtr *config)
@@ -171,7 +166,7 @@ const char *OCIOImpl::configGetColorSpaceNameByIndex(OCIO_ConstConfigRcPtr *conf
OCIO_ConstColorSpaceRcPtr *OCIOImpl::configGetColorSpace(OCIO_ConstConfigRcPtr *config, const char *name)
{
- ConstColorSpaceRcPtr *cs = MEM_NEW(ConstColorSpaceRcPtr);
+ ConstColorSpaceRcPtr *cs = OBJECT_GUARDED_NEW(ConstColorSpaceRcPtr);
try {
*cs = (*(ConstConfigRcPtr *) config)->getColorSpace(name);
@@ -183,7 +178,7 @@ OCIO_ConstColorSpaceRcPtr *OCIOImpl::configGetColorSpace(OCIO_ConstConfigRcPtr *
OCIO_reportException(exception);
}
- MEM_DELETE(cs, ConstColorSpaceRcPtr);
+ OBJECT_GUARDED_DELETE(cs, ConstColorSpaceRcPtr);
return NULL;
}
@@ -284,6 +279,59 @@ const char *OCIOImpl::configGetDisplayColorSpaceName(OCIO_ConstConfigRcPtr *conf
return NULL;
}
+int OCIOImpl::configGetNumLooks(OCIO_ConstConfigRcPtr *config)
+{
+ try {
+ return (*(ConstConfigRcPtr *) config)->getNumLooks();
+ }
+ catch (Exception &exception) {
+ OCIO_reportException(exception);
+ }
+
+ return 0;
+}
+
+const char *OCIOImpl::configGetLookNameByIndex(OCIO_ConstConfigRcPtr *config, int index)
+{
+ try {
+ return (*(ConstConfigRcPtr *) config)->getLookNameByIndex(index);
+ }
+ catch (Exception &exception) {
+ OCIO_reportException(exception);
+ }
+
+ return NULL;
+}
+
+OCIO_ConstLookRcPtr *OCIOImpl::configGetLook(OCIO_ConstConfigRcPtr *config, const char *name)
+{
+ ConstLookRcPtr *look = OBJECT_GUARDED_NEW(ConstLookRcPtr);
+
+ try {
+ *look = (*(ConstConfigRcPtr *) config)->getLook(name);
+
+ if (*look)
+ return (OCIO_ConstLookRcPtr *) look;
+ }
+ catch (Exception &exception) {
+ OCIO_reportException(exception);
+ }
+
+ OBJECT_GUARDED_DELETE(look, ConstLookRcPtr);
+
+ return NULL;
+}
+
+const char *OCIOImpl::lookGetProcessSpace(OCIO_ConstLookRcPtr *look)
+{
+ return (*(ConstLookRcPtr *) look)->getProcessSpace();
+}
+
+void OCIOImpl::lookRelease(OCIO_ConstLookRcPtr *look)
+{
+ OBJECT_GUARDED_DELETE((ConstLookRcPtr *) look, ConstLookRcPtr);
+}
+
int OCIOImpl::colorSpaceIsInvertible(OCIO_ConstColorSpaceRcPtr *cs_)
{
ConstColorSpaceRcPtr *cs = (ConstColorSpaceRcPtr *) cs_;
@@ -316,12 +364,12 @@ int OCIOImpl::colorSpaceIsData(OCIO_ConstColorSpaceRcPtr *cs)
void OCIOImpl::colorSpaceRelease(OCIO_ConstColorSpaceRcPtr *cs)
{
- MEM_DELETE((ConstColorSpaceRcPtr *) cs, ConstColorSpaceRcPtr);
+ OBJECT_GUARDED_DELETE((ConstColorSpaceRcPtr *) cs, ConstColorSpaceRcPtr);
}
OCIO_ConstProcessorRcPtr *OCIOImpl::configGetProcessorWithNames(OCIO_ConstConfigRcPtr *config, const char *srcName, const char *dstName)
{
- ConstProcessorRcPtr *p = MEM_NEW(ConstProcessorRcPtr);
+ ConstProcessorRcPtr *p = OBJECT_GUARDED_NEW(ConstProcessorRcPtr);
try {
*p = (*(ConstConfigRcPtr *) config)->getProcessor(srcName, dstName);
@@ -333,14 +381,14 @@ OCIO_ConstProcessorRcPtr *OCIOImpl::configGetProcessorWithNames(OCIO_ConstConfig
OCIO_reportException(exception);
}
- MEM_DELETE(p, ConstProcessorRcPtr);
+ OBJECT_GUARDED_DELETE(p, ConstProcessorRcPtr);
return 0;
}
OCIO_ConstProcessorRcPtr *OCIOImpl::configGetProcessor(OCIO_ConstConfigRcPtr *config, OCIO_ConstTransformRcPtr *transform)
{
- ConstProcessorRcPtr *p = MEM_NEW(ConstProcessorRcPtr);
+ ConstProcessorRcPtr *p = OBJECT_GUARDED_NEW(ConstProcessorRcPtr);
try {
*p = (*(ConstConfigRcPtr *) config)->getProcessor(*(ConstTransformRcPtr *) transform);
@@ -352,7 +400,7 @@ OCIO_ConstProcessorRcPtr *OCIOImpl::configGetProcessor(OCIO_ConstConfigRcPtr *co
OCIO_reportException(exception);
}
- MEM_DELETE(p, ConstProcessorRcPtr);
+ OBJECT_GUARDED_DELETE(p, ConstProcessorRcPtr);
return NULL;
}
@@ -431,7 +479,7 @@ void OCIOImpl::processorApplyRGBA_predivide(OCIO_ConstProcessorRcPtr *processor,
void OCIOImpl::processorRelease(OCIO_ConstProcessorRcPtr *p)
{
- MEM_DELETE(p, ConstProcessorRcPtr);
+ OBJECT_GUARDED_DELETE(p, ConstProcessorRcPtr);
}
const char *OCIOImpl::colorSpaceGetName(OCIO_ConstColorSpaceRcPtr *cs)
@@ -451,7 +499,7 @@ const char *OCIOImpl::colorSpaceGetFamily(OCIO_ConstColorSpaceRcPtr *cs)
OCIO_DisplayTransformRcPtr *OCIOImpl::createDisplayTransform(void)
{
- DisplayTransformRcPtr *dt = MEM_NEW(DisplayTransformRcPtr);
+ DisplayTransformRcPtr *dt = OBJECT_GUARDED_NEW(DisplayTransformRcPtr);
*dt = DisplayTransform::Create();
@@ -483,9 +531,19 @@ void OCIOImpl::displayTransformSetLinearCC(OCIO_DisplayTransformRcPtr *dt, OCIO_
(*(DisplayTransformRcPtr *) dt)->setLinearCC(*(ConstTransformRcPtr *) t);
}
+void OCIOImpl::displayTransformSetLooksOverride(OCIO_DisplayTransformRcPtr *dt, const char *looks)
+{
+ (*(DisplayTransformRcPtr *) dt)->setLooksOverride(looks);
+}
+
+void OCIOImpl::displayTransformSetLooksOverrideEnabled(OCIO_DisplayTransformRcPtr *dt, bool enabled)
+{
+ (*(DisplayTransformRcPtr *) dt)->setLooksOverrideEnabled(enabled);
+}
+
void OCIOImpl::displayTransformRelease(OCIO_DisplayTransformRcPtr *dt)
{
- MEM_DELETE((DisplayTransformRcPtr *) dt, DisplayTransformRcPtr);
+ OBJECT_GUARDED_DELETE((DisplayTransformRcPtr *) dt, DisplayTransformRcPtr);
}
OCIO_PackedImageDesc *OCIOImpl::createOCIO_PackedImageDesc(float *data, long width, long height, long numChannels,
@@ -506,12 +564,12 @@ OCIO_PackedImageDesc *OCIOImpl::createOCIO_PackedImageDesc(float *data, long wid
void OCIOImpl::OCIO_PackedImageDescRelease(OCIO_PackedImageDesc* id)
{
- MEM_DELETE((PackedImageDesc *) id, PackedImageDesc);
+ OBJECT_GUARDED_DELETE((PackedImageDesc *) id, PackedImageDesc);
}
OCIO_ExponentTransformRcPtr *OCIOImpl::createExponentTransform(void)
{
- ExponentTransformRcPtr *et = MEM_NEW(ExponentTransformRcPtr);
+ ExponentTransformRcPtr *et = OBJECT_GUARDED_NEW(ExponentTransformRcPtr);
*et = ExponentTransform::Create();
@@ -525,12 +583,12 @@ void OCIOImpl::exponentTransformSetValue(OCIO_ExponentTransformRcPtr *et, const
void OCIOImpl::exponentTransformRelease(OCIO_ExponentTransformRcPtr *et)
{
- MEM_DELETE((ExponentTransformRcPtr *) et, ExponentTransformRcPtr);
+ OBJECT_GUARDED_DELETE((ExponentTransformRcPtr *) et, ExponentTransformRcPtr);
}
OCIO_MatrixTransformRcPtr *OCIOImpl::createMatrixTransform(void)
{
- MatrixTransformRcPtr *mt = MEM_NEW(MatrixTransformRcPtr);
+ MatrixTransformRcPtr *mt = OBJECT_GUARDED_NEW(MatrixTransformRcPtr);
*mt = MatrixTransform::Create();
@@ -544,10 +602,10 @@ void OCIOImpl::matrixTransformSetValue(OCIO_MatrixTransformRcPtr *mt, const floa
void OCIOImpl::matrixTransformRelease(OCIO_MatrixTransformRcPtr *mt)
{
- MEM_DELETE((MatrixTransformRcPtr *) mt, MatrixTransformRcPtr);
+ OBJECT_GUARDED_DELETE((MatrixTransformRcPtr *) mt, MatrixTransformRcPtr);
}
-void OCIOImpl::matrixTransformScale(float * m44, float * offset4, const float *scale4f)
+void OCIOImpl::matrixTransformScale(float *m44, float *offset4, const float *scale4f)
{
MatrixTransform::Scale(m44, offset4, scale4f);
}
diff --git a/intern/opencolorio/ocio_impl.h b/intern/opencolorio/ocio_impl.h
index a328470ccb5..8b666e8ae14 100644
--- a/intern/opencolorio/ocio_impl.h
+++ b/intern/opencolorio/ocio_impl.h
@@ -58,6 +58,13 @@ public:
virtual const char *configGetView(OCIO_ConstConfigRcPtr *config, const char *display, int index) = 0;
virtual const char *configGetDisplayColorSpaceName(OCIO_ConstConfigRcPtr *config, const char *display, const char *view) = 0;
+ virtual int configGetNumLooks(OCIO_ConstConfigRcPtr *config) = 0;
+ virtual const char *configGetLookNameByIndex(OCIO_ConstConfigRcPtr *config, int index) = 0;
+ virtual OCIO_ConstLookRcPtr *configGetLook(OCIO_ConstConfigRcPtr *config, const char *name) = 0;
+
+ virtual const char *lookGetProcessSpace(OCIO_ConstLookRcPtr *look) = 0;
+ virtual void lookRelease(OCIO_ConstLookRcPtr *look) = 0;
+
virtual OCIO_ConstProcessorRcPtr *configGetProcessorWithNames(OCIO_ConstConfigRcPtr *config, const char *srcName, const char *dstName) = 0;
virtual OCIO_ConstProcessorRcPtr *configGetProcessor(OCIO_ConstConfigRcPtr *config, OCIO_ConstTransformRcPtr *transform) = 0;
@@ -79,6 +86,8 @@ public:
virtual void displayTransformSetView(OCIO_DisplayTransformRcPtr *dt, const char *name) = 0;
virtual void displayTransformSetDisplayCC(OCIO_DisplayTransformRcPtr *dt, OCIO_ConstTransformRcPtr *et) = 0;
virtual void displayTransformSetLinearCC(OCIO_DisplayTransformRcPtr *dt, OCIO_ConstTransformRcPtr *et) = 0;
+ virtual void displayTransformSetLooksOverride(OCIO_DisplayTransformRcPtr *dt, const char *looks) = 0;
+ virtual void displayTransformSetLooksOverrideEnabled(OCIO_DisplayTransformRcPtr *dt, bool enabled) = 0;
virtual void displayTransformRelease(OCIO_DisplayTransformRcPtr *dt) = 0;
virtual OCIO_PackedImageDesc *createOCIO_PackedImageDesc(float *data, long width, long height, long numChannels,
@@ -91,12 +100,14 @@ public:
virtual void exponentTransformRelease(OCIO_ExponentTransformRcPtr *et) = 0;
virtual OCIO_MatrixTransformRcPtr *createMatrixTransform(void) = 0;
- virtual void matrixTransformSetValue(OCIO_MatrixTransformRcPtr *et, const float *m44, const float *offset4) = 0;
+ virtual void matrixTransformSetValue(OCIO_MatrixTransformRcPtr *mt, const float *m44, const float *offset4) = 0;
virtual void matrixTransformRelease(OCIO_MatrixTransformRcPtr *mt) = 0;
virtual void matrixTransformScale(float * m44, float * offset4, const float * scale4) = 0;
- virtual bool setupGLSLDraw(struct OCIO_GLSLDrawState **state_r, OCIO_ConstProcessorRcPtr *processor, bool predivide) = 0;
+ virtual bool supportGLSLDraw(void) = 0;
+ virtual bool setupGLSLDraw(struct OCIO_GLSLDrawState **state_r, OCIO_ConstProcessorRcPtr *processor,
+ OCIO_CurveMappingSettings *curve_mapping_settings, bool predivide) = 0;
virtual void finishGLSLDraw(struct OCIO_GLSLDrawState *state) = 0;
virtual void freeGLState(struct OCIO_GLSLDrawState *state_r) = 0;
};
@@ -131,6 +142,13 @@ public:
const char *configGetView(OCIO_ConstConfigRcPtr *config, const char *display, int index);
const char *configGetDisplayColorSpaceName(OCIO_ConstConfigRcPtr *config, const char *display, const char *view);
+ int configGetNumLooks(OCIO_ConstConfigRcPtr *config);
+ const char *configGetLookNameByIndex(OCIO_ConstConfigRcPtr *config, int index);
+ OCIO_ConstLookRcPtr *configGetLook(OCIO_ConstConfigRcPtr *config, const char *name);
+
+ const char *lookGetProcessSpace(OCIO_ConstLookRcPtr *look);
+ void lookRelease(OCIO_ConstLookRcPtr *look);
+
OCIO_ConstProcessorRcPtr *configGetProcessorWithNames(OCIO_ConstConfigRcPtr *config, const char *srcName, const char *dstName);
OCIO_ConstProcessorRcPtr *configGetProcessor(OCIO_ConstConfigRcPtr *config, OCIO_ConstTransformRcPtr *transform);
@@ -152,6 +170,8 @@ public:
void displayTransformSetView(OCIO_DisplayTransformRcPtr *dt, const char *name);
void displayTransformSetDisplayCC(OCIO_DisplayTransformRcPtr *dt, OCIO_ConstTransformRcPtr *et);
void displayTransformSetLinearCC(OCIO_DisplayTransformRcPtr *dt, OCIO_ConstTransformRcPtr *et);
+ void displayTransformSetLooksOverride(OCIO_DisplayTransformRcPtr *dt, const char *looks);
+ void displayTransformSetLooksOverrideEnabled(OCIO_DisplayTransformRcPtr *dt, bool enabled);
void displayTransformRelease(OCIO_DisplayTransformRcPtr *dt);
OCIO_PackedImageDesc *createOCIO_PackedImageDesc(float *data, long width, long height, long numChannels,
@@ -164,12 +184,14 @@ public:
void exponentTransformRelease(OCIO_ExponentTransformRcPtr *et);
OCIO_MatrixTransformRcPtr *createMatrixTransform(void);
- void matrixTransformSetValue(OCIO_MatrixTransformRcPtr *et, const float *m44, const float *offset4);
+ void matrixTransformSetValue(OCIO_MatrixTransformRcPtr *mt, const float *m44, const float *offset4);
void matrixTransformRelease(OCIO_MatrixTransformRcPtr *mt);
- void matrixTransformScale(float * m44, float * offset4, const float * scale4);
+ void matrixTransformScale(float *m44, float *offset4, const float *scale4);
- bool setupGLSLDraw(struct OCIO_GLSLDrawState **state_r, OCIO_ConstProcessorRcPtr *processor, bool predivide);
+ bool supportGLSLDraw(void);
+ bool setupGLSLDraw(struct OCIO_GLSLDrawState **state_r, OCIO_ConstProcessorRcPtr *processor,
+ OCIO_CurveMappingSettings *curve_mapping_settings, bool predivide);
void finishGLSLDraw(struct OCIO_GLSLDrawState *state);
void freeGLState(struct OCIO_GLSLDrawState *state_r);
};
@@ -205,6 +227,13 @@ public:
const char *configGetView(OCIO_ConstConfigRcPtr *config, const char *display, int index);
const char *configGetDisplayColorSpaceName(OCIO_ConstConfigRcPtr *config, const char *display, const char *view);
+ int configGetNumLooks(OCIO_ConstConfigRcPtr *config);
+ const char *configGetLookNameByIndex(OCIO_ConstConfigRcPtr *config, int index);
+ OCIO_ConstLookRcPtr *configGetLook(OCIO_ConstConfigRcPtr *config, const char *name);
+
+ const char *lookGetProcessSpace(OCIO_ConstLookRcPtr *look);
+ void lookRelease(OCIO_ConstLookRcPtr *look);
+
OCIO_ConstProcessorRcPtr *configGetProcessorWithNames(OCIO_ConstConfigRcPtr *config, const char *srcName, const char *dstName);
OCIO_ConstProcessorRcPtr *configGetProcessor(OCIO_ConstConfigRcPtr *config, OCIO_ConstTransformRcPtr *transform);
@@ -226,6 +255,8 @@ public:
void displayTransformSetView(OCIO_DisplayTransformRcPtr *dt, const char *name);
void displayTransformSetDisplayCC(OCIO_DisplayTransformRcPtr *dt, OCIO_ConstTransformRcPtr *et);
void displayTransformSetLinearCC(OCIO_DisplayTransformRcPtr *dt, OCIO_ConstTransformRcPtr *et);
+ void displayTransformSetLooksOverride(OCIO_DisplayTransformRcPtr *dt, const char *looks);
+ void displayTransformSetLooksOverrideEnabled(OCIO_DisplayTransformRcPtr *dt, bool enabled);
void displayTransformRelease(OCIO_DisplayTransformRcPtr *dt);
OCIO_PackedImageDesc *createOCIO_PackedImageDesc(float *data, long width, long height, long numChannels,
@@ -238,12 +269,14 @@ public:
void exponentTransformRelease(OCIO_ExponentTransformRcPtr *et);
OCIO_MatrixTransformRcPtr *createMatrixTransform(void);
- void matrixTransformSetValue(OCIO_MatrixTransformRcPtr *et, const float *m44, const float *offset4);
+ void matrixTransformSetValue(OCIO_MatrixTransformRcPtr *mt, const float *m44, const float *offset4);
void matrixTransformRelease(OCIO_MatrixTransformRcPtr *mt);
void matrixTransformScale(float * m44, float * offset4, const float * scale4);
- bool setupGLSLDraw(struct OCIO_GLSLDrawState **state_r, OCIO_ConstProcessorRcPtr *processor, bool predivide);
+ bool supportGLSLDraw(void);
+ bool setupGLSLDraw(struct OCIO_GLSLDrawState **state_r, OCIO_ConstProcessorRcPtr *processor,
+ OCIO_CurveMappingSettings *curve_mapping_settings, bool predivide);
void finishGLSLDraw(struct OCIO_GLSLDrawState *state);
void freeGLState(struct OCIO_GLSLDrawState *state_r);
};
diff --git a/intern/opencolorio/ocio_impl_glsl.cc b/intern/opencolorio/ocio_impl_glsl.cc
index 54be1e0f339..2af3befc8a9 100644
--- a/intern/opencolorio/ocio_impl_glsl.cc
+++ b/intern/opencolorio/ocio_impl_glsl.cc
@@ -36,12 +36,7 @@
#include <sstream>
#include <string.h>
-#ifdef __APPLE__
-#include <OpenGL/gl.h>
-#include <OpenGL/glu.h>
-#else
#include <GL/glew.h>
-#endif
#include <OpenColorIO/OpenColorIO.h>
@@ -53,6 +48,8 @@ using namespace OCIO_NAMESPACE;
static const int LUT3D_EDGE_SIZE = 64;
+extern "C" char datatoc_gpu_shader_display_transform_glsl[];
+
/* **** OpenGL drawing routines using GLSL for color space transform ***** */
typedef struct OCIO_GLSLDrawState {
@@ -65,42 +62,24 @@ typedef struct OCIO_GLSLDrawState {
float *lut3d; /* 3D LUT table */
+ bool curve_mapping_used;
+ bool curve_mapping_texture_allocated;
+ bool curve_mapping_texture_valid;
+ GLuint curve_mapping_texture;
+ size_t curve_mapping_cache_id;
+
/* Cache */
std::string lut3dcacheid;
std::string shadercacheid;
/* GLSL stuff */
- GLuint fragShader;
+ GLuint ocio_shader;
GLuint program;
/* Previous OpenGL state. */
GLint last_texture, last_texture_unit;
} OCIO_GLSLDrawState;
-/* Hardcoded to do alpha predivide before color space conversion */
-/* NOTE: This is true we only do de-premul here and NO premul
- * and the reason is simple -- opengl is always configured
- * for straight alpha at this moment
- */
-static const char *g_fragShaderText = ""
-"\n"
-"uniform sampler2D tex1;\n"
-"uniform sampler3D tex2;\n"
-"uniform bool predivide;\n"
-"\n"
-"void main()\n"
-"{\n"
-" vec4 col = texture2D(tex1, gl_TexCoord[0].st);\n"
-" if (predivide && col[3] > 0.0 && col[3] < 1.0) {\n"
-" float inv_alpha = 1.0 / col[3];\n"
-" col[0] *= inv_alpha;\n"
-" col[1] *= inv_alpha;\n"
-" col[2] *= inv_alpha;\n"
-" }\n"
-" gl_FragColor = OCIODisplay(col, tex2);\n"
-"\n"
-"}\n";
-
static GLuint compileShaderText(GLenum shaderType, const char *text)
{
GLuint shader;
@@ -122,15 +101,14 @@ static GLuint compileShaderText(GLenum shaderType, const char *text)
return shader;
}
-static GLuint linkShaders(GLuint fragShader)
+static GLuint linkShaders(GLuint ocio_shader)
{
- if (!fragShader)
+ if (!ocio_shader)
return 0;
GLuint program = glCreateProgram();
- if (fragShader)
- glAttachShader(program, fragShader);
+ glAttachShader(program, ocio_shader);
glLinkProgram(program);
@@ -202,6 +180,44 @@ static bool ensureLUT3DAllocated(OCIO_GLSLDrawState *state)
return state->lut3d_texture_valid;
}
+static bool ensureCurveMappingAllocated(OCIO_GLSLDrawState *state, OCIO_CurveMappingSettings *curve_mapping_settings)
+{
+ if (state->curve_mapping_texture_allocated)
+ return state->curve_mapping_texture_valid;
+
+ glGenTextures(1, &state->curve_mapping_texture);
+
+ glActiveTexture(GL_TEXTURE2);
+ glBindTexture(GL_TEXTURE_1D, state->curve_mapping_texture);
+ glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE);
+
+ /* clean glError buffer */
+ while (glGetError() != GL_NO_ERROR) {}
+
+ glTexImage1D(GL_TEXTURE_1D, 0, GL_RGBA16F_ARB, curve_mapping_settings->lut_size,
+ 0, GL_RGBA, GL_FLOAT, curve_mapping_settings->lut);
+
+ state->curve_mapping_texture_allocated = true;
+
+ /* GL_RGB16F_ARB could be not supported at some drivers
+ * in this case we could not use GLSL display
+ */
+ state->curve_mapping_texture_valid = glGetError() == GL_NO_ERROR;
+
+ return state->curve_mapping_texture_valid;
+}
+
+/* Detect if we can support GLSL drawing */
+bool OCIOImpl::supportGLSLDraw()
+{
+ /* GLSL and GL_RGB16F_ARB */
+ return GLEW_VERSION_2_0 && (GLEW_VERSION_3_0 || GLEW_ARB_texture_float);
+}
+
/**
* Setup OpenGL contexts for a transform defined by processor using GLSL
* All LUT allocating baking and shader compilation happens here.
@@ -212,9 +228,11 @@ static bool ensureLUT3DAllocated(OCIO_GLSLDrawState *state)
* When all drawing is finished, finishGLSLDraw shall be called to
* restore OpenGL context to it's pre-GLSL draw state.
*/
-bool OCIOImpl::setupGLSLDraw(OCIO_GLSLDrawState **state_r, OCIO_ConstProcessorRcPtr *processor, bool predivide)
+bool OCIOImpl::setupGLSLDraw(OCIO_GLSLDrawState **state_r, OCIO_ConstProcessorRcPtr *processor,
+ OCIO_CurveMappingSettings *curve_mapping_settings, bool predivide)
{
ConstProcessorRcPtr ocio_processor = *(ConstProcessorRcPtr *) processor;
+ bool use_curve_mapping = curve_mapping_settings != NULL;
/* Create state if needed. */
OCIO_GLSLDrawState *state;
@@ -232,12 +250,36 @@ bool OCIOImpl::setupGLSLDraw(OCIO_GLSLDrawState **state_r, OCIO_ConstProcessorRc
return false;
}
+ if (use_curve_mapping) {
+ if (!ensureCurveMappingAllocated(state, curve_mapping_settings)) {
+ glActiveTexture(state->last_texture_unit);
+ glBindTexture(GL_TEXTURE_2D, state->last_texture);
+
+ return false;
+ }
+ }
+ else {
+ if (state->curve_mapping_texture_allocated) {
+ glDeleteTextures(1, &state->curve_mapping_texture);
+ state->curve_mapping_texture_allocated = false;
+ }
+ }
+
/* Step 1: Create a GPU Shader Description */
GpuShaderDesc shaderDesc;
shaderDesc.setLanguage(GPU_LANGUAGE_GLSL_1_0);
shaderDesc.setFunctionName("OCIODisplay");
shaderDesc.setLut3DEdgeLen(LUT3D_EDGE_SIZE);
+ if (use_curve_mapping) {
+ if (state->curve_mapping_cache_id != curve_mapping_settings->cache_id) {
+ glActiveTexture(GL_TEXTURE2);
+ glBindTexture(GL_TEXTURE_1D, state->curve_mapping_texture);
+ glTexSubImage1D(GL_TEXTURE_1D, 0, 0, curve_mapping_settings->lut_size,
+ GL_RGBA, GL_FLOAT, curve_mapping_settings->lut);
+ }
+ }
+
/* Step 2: Compute the 3D LUT */
std::string lut3dCacheID = ocio_processor->getGpuLut3DCacheID(shaderDesc);
if (lut3dCacheID != state->lut3dcacheid) {
@@ -253,37 +295,73 @@ bool OCIOImpl::setupGLSLDraw(OCIO_GLSLDrawState **state_r, OCIO_ConstProcessorRc
/* Step 3: Compute the Shader */
std::string shaderCacheID = ocio_processor->getGpuShaderTextCacheID(shaderDesc);
- if (state->program == 0 || shaderCacheID != state->shadercacheid) {
+ if (state->program == 0 ||
+ shaderCacheID != state->shadercacheid ||
+ use_curve_mapping != state->curve_mapping_used)
+ {
state->shadercacheid = shaderCacheID;
+ if (state->program) {
+ glDeleteProgram(state->program);
+ }
+
+ if (state->ocio_shader) {
+ glDeleteShader(state->ocio_shader);
+ }
+
std::ostringstream os;
- os << ocio_processor->getGpuShaderText(shaderDesc) << "\n";
- os << g_fragShaderText;
- if (state->fragShader)
- glDeleteShader(state->fragShader);
+ if (use_curve_mapping) {
+ os << "#define USE_CURVE_MAPPING\n";
+ }
- state->fragShader = compileShaderText(GL_FRAGMENT_SHADER, os.str().c_str());
+ os << ocio_processor->getGpuShaderText(shaderDesc) << "\n";
+ os << datatoc_gpu_shader_display_transform_glsl;
- if (state->fragShader) {
- if (state->program)
- glDeleteProgram(state->program);
+ state->ocio_shader = compileShaderText(GL_FRAGMENT_SHADER, os.str().c_str());
- state->program = linkShaders(state->fragShader);
+ if (state->ocio_shader) {
+ state->program = linkShaders(state->ocio_shader);
}
+
+ state->curve_mapping_used = use_curve_mapping;
}
if (state->program) {
glActiveTexture(GL_TEXTURE1);
glBindTexture(GL_TEXTURE_3D, state->lut3d_texture);
+ if (use_curve_mapping) {
+ glActiveTexture(GL_TEXTURE2);
+ glBindTexture(GL_TEXTURE_1D, state->curve_mapping_texture);
+ }
+
glActiveTexture(GL_TEXTURE0);
glUseProgram(state->program);
- glUniform1i(glGetUniformLocation(state->program, "tex1"), 0);
- glUniform1i(glGetUniformLocation(state->program, "tex2"), 1);
+
+ glUniform1i(glGetUniformLocation(state->program, "image_texture"), 0);
+ glUniform1i(glGetUniformLocation(state->program, "lut3d_texture"), 1);
glUniform1i(glGetUniformLocation(state->program, "predivide"), predivide);
+ if (use_curve_mapping) {
+ glUniform1i(glGetUniformLocation(state->program, "curve_mapping_texture"), 2);
+ glUniform1i(glGetUniformLocation(state->program, "curve_mapping_lut_size"), curve_mapping_settings->lut_size);
+ glUniform4iv(glGetUniformLocation(state->program, "use_curve_mapping_extend_extrapolate"), 1, curve_mapping_settings->use_extend_extrapolate);
+ glUniform4fv(glGetUniformLocation(state->program, "curve_mapping_mintable"), 1, curve_mapping_settings->mintable);
+ glUniform4fv(glGetUniformLocation(state->program, "curve_mapping_range"), 1, curve_mapping_settings->range);
+ glUniform4fv(glGetUniformLocation(state->program, "curve_mapping_ext_in_x"), 1, curve_mapping_settings->ext_in_x);
+ glUniform4fv(glGetUniformLocation(state->program, "curve_mapping_ext_in_y"), 1, curve_mapping_settings->ext_in_y);
+ glUniform4fv(glGetUniformLocation(state->program, "curve_mapping_ext_out_x"), 1, curve_mapping_settings->ext_out_x);
+ glUniform4fv(glGetUniformLocation(state->program, "curve_mapping_ext_out_y"), 1, curve_mapping_settings->ext_out_y);
+ glUniform4fv(glGetUniformLocation(state->program, "curve_mapping_first_x"), 1, curve_mapping_settings->first_x);
+ glUniform4fv(glGetUniformLocation(state->program, "curve_mapping_first_y"), 1, curve_mapping_settings->first_y);
+ glUniform4fv(glGetUniformLocation(state->program, "curve_mapping_last_x"), 1, curve_mapping_settings->last_x);
+ glUniform4fv(glGetUniformLocation(state->program, "curve_mapping_last_y"), 1, curve_mapping_settings->last_y);
+ glUniform3fv(glGetUniformLocation(state->program, "curve_mapping_black"), 1, curve_mapping_settings->black);
+ glUniform3fv(glGetUniformLocation(state->program, "curve_mapping_bwmul"), 1, curve_mapping_settings->bwmul);
+ }
+
return true;
}
else {
@@ -314,8 +392,8 @@ void OCIOImpl::freeGLState(struct OCIO_GLSLDrawState *state)
if (state->program)
glDeleteProgram(state->program);
- if (state->fragShader)
- glDeleteShader(state->fragShader);
+ if (state->ocio_shader)
+ glDeleteShader(state->ocio_shader);
state->lut3dcacheid.~string();
state->shadercacheid.~string();
diff --git a/intern/rigidbody/rb_bullet_api.cpp b/intern/rigidbody/rb_bullet_api.cpp
index 5724d1992d9..ecb07c628d2 100644
--- a/intern/rigidbody/rb_bullet_api.cpp
+++ b/intern/rigidbody/rb_bullet_api.cpp
@@ -826,11 +826,7 @@ rbConstraint *RB_constraint_new_fixed(float pivot[3], float orn[4], rbRigidBody
make_constraint_transforms(transform1, transform2, body1, body2, pivot, orn);
- btGeneric6DofConstraint *con = new btGeneric6DofConstraint(*body1, *body2, transform1, transform2, true);
-
- /* lock all axes */
- for (int i = 0; i < 6; i++)
- con->setLimit(i, 0, 0);
+ btFixedConstraint *con = new btFixedConstraint(*body1, *body2, transform1, transform2);
return (rbConstraint *)con;
}
diff --git a/intern/utfconv/utf_winfunc.c b/intern/utfconv/utf_winfunc.c
index 2ae261b44a8..19917571b5e 100644
--- a/intern/utfconv/utf_winfunc.c
+++ b/intern/utfconv/utf_winfunc.c
@@ -166,12 +166,23 @@ int uputenv(const char *name, const char *value)
{
int r = -1;
UTF16_ENCODE(name);
- UTF16_ENCODE(value);
- if (name_16 && value_16) {
- r = (SetEnvironmentVariableW(name_16,value_16)!= 0) ? 0 : -1;
+ if (value) {
+ /* set */
+ UTF16_ENCODE(value);
+
+ if (name_16 && value_16) {
+ r = (SetEnvironmentVariableW(name_16,value_16)!= 0) ? 0 : -1;
+ }
+ UTF16_UN_ENCODE(value);
}
- UTF16_UN_ENCODE(value);
+ else {
+ /* clear */
+ if (name_16) {
+ r = (SetEnvironmentVariableW(name_16,NULL)!= 0) ? 0 : -1;
+ }
+ }
+
UTF16_UN_ENCODE(name);
return r;
diff --git a/release/datafiles/blender_icons.sh b/release/datafiles/blender_icons.sh
index f923f02aee1..9c2cedaaf6c 100755
--- a/release/datafiles/blender_icons.sh
+++ b/release/datafiles/blender_icons.sh
@@ -1,5 +1,8 @@
#!/bin/sh
# This script updates icons from the SVG file
-inkscape blender_icons.svg --export-dpi=90 --without-gui --export-png=blender_icons16.png
-inkscape blender_icons.svg --export-dpi=180 --without-gui --export-png=blender_icons32.png
+BASEDIR=$(dirname $0)
+
+inkscape $BASEDIR/blender_icons.svg --export-dpi=90 --without-gui --export-png=$BASEDIR/blender_icons16.png
+inkscape $BASEDIR/blender_icons.svg --export-dpi=180 --without-gui --export-png=$BASEDIR/blender_icons32.png
+
diff --git a/release/datafiles/blender_icons.svg b/release/datafiles/blender_icons.svg
index 4d2a75adb44..fef2b047474 100644
--- a/release/datafiles/blender_icons.svg
+++ b/release/datafiles/blender_icons.svg
@@ -14,7 +14,7 @@
height="640"
id="svg2"
sodipodi:version="0.32"
- inkscape:version="0.48.2 r9819"
+ inkscape:version="0.48.4 r9939"
version="1.0"
sodipodi:docname="blender_icons.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
@@ -27061,16 +27061,16 @@
objecttolerance="10000"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
- inkscape:zoom="4"
- inkscape:cx="208.64962"
- inkscape:cy="493.26154"
+ inkscape:zoom="8"
+ inkscape:cx="336.81018"
+ inkscape:cy="34.425847"
inkscape:document-units="px"
- inkscape:current-layer="layer1"
+ inkscape:current-layer="g24559-2"
showgrid="false"
- inkscape:window-width="1360"
- inkscape:window-height="684"
+ inkscape:window-width="1366"
+ inkscape:window-height="695"
inkscape:window-x="0"
- inkscape:window-y="31"
+ inkscape:window-y="24"
inkscape:snap-nodes="false"
inkscape:snap-bbox="true"
showguides="true"
@@ -35233,7 +35233,7 @@
id="path14745" />
<path
transform="matrix(3.625,0,0,3.1690202,-67.8125,318.31703)"
- d="m 14.5,57.5 a 1,1.0000004 0 1 1 -2,0 1,1.0000004 0 1 1 2,0 z"
+ d="m 14.5,57.5 c 0,0.552285 -0.447715,1 -1,1 -0.552285,0 -1,-0.447715 -1,-1 0,-0.552285 0.447715,-1 1,-1 0.552285,0 1,0.447715 1,1 z"
sodipodi:ry="1.0000004"
sodipodi:rx="1"
sodipodi:cy="57.5"
@@ -35250,7 +35250,7 @@
</g>
<path
transform="matrix(3.5999897,0,0,3.1249932,-67.499871,320.6879)"
- d="m 14.5,57.5 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 14.5,57.5 c 0,0.552285 -0.447715,1 -1,1 -0.552285,0 -1,-0.447715 -1,-1 0,-0.552285 0.447715,-1 1,-1 0.552285,0 1,0.447715 1,1 z"
sodipodi:ry="1"
sodipodi:rx="1"
sodipodi:cy="57.5"
@@ -35272,11 +35272,11 @@
sodipodi:cy="57.5"
sodipodi:rx="1"
sodipodi:ry="1"
- d="m 14.5,57.5 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 14.5,57.5 c 0,0.552285 -0.447715,1 -1,1 -0.552285,0 -1,-0.447715 -1,-1 0,-0.552285 0.447715,-1 1,-1 0.552285,0 1,0.447715 1,1 z"
transform="matrix(3.25,0,0,3.25,-62.875,313.125)" />
<path
transform="matrix(2,0,0,2,-46,385)"
- d="m 14.5,57.5 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 14.5,57.5 c 0,0.552285 -0.447715,1 -1,1 -0.552285,0 -1,-0.447715 -1,-1 0,-0.552285 0.447715,-1 1,-1 0.552285,0 1,0.447715 1,1 z"
sodipodi:ry="1"
sodipodi:rx="1"
sodipodi:cy="57.5"
@@ -35292,7 +35292,7 @@
sodipodi:cy="57.5"
sodipodi:rx="1"
sodipodi:ry="1"
- d="m 14.5,57.5 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 14.5,57.5 c 0,0.552285 -0.447715,1 -1,1 -0.552285,0 -1,-0.447715 -1,-1 0,-0.552285 0.447715,-1 1,-1 0.552285,0 1,0.447715 1,1 z"
transform="matrix(4.7519907,0,0,4.1435313,-83.051884,262.12196)" />
<path
inkscape:connector-curvature="0"
@@ -35416,7 +35416,7 @@
sodipodi:cy="38.98439"
sodipodi:rx="15.467961"
sodipodi:ry="5.3033009"
- d="m 43.487067,38.98439 a 15.467961,5.3033009 0 1 1 -30.935922,0 15.467961,5.3033009 0 1 1 30.935922,0 z"
+ d="m 43.487067,38.98439 c 0,2.928932 -6.925242,5.303301 -15.467961,5.303301 -8.542719,0 -15.467961,-2.374369 -15.467961,-5.303301 0,-2.928932 6.925242,-5.303301 15.467961,-5.303301 8.542719,0 15.467961,2.374369 15.467961,5.303301 z"
transform="matrix(1.274286,0,0,1.377124,-7.569123,-16.70193)" />
<path
style="fill:#f57900;fill-rule:evenodd;stroke:#aa4400;stroke-width:1.7812928;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none"
@@ -35432,7 +35432,7 @@
sodipodi:cy="25.75"
sodipodi:rx="11.5625"
sodipodi:ry="10.125"
- d="m 42.75,25.75 a 11.5625,10.125 0 1 1 -23.125,0 11.5625,10.125 0 1 1 23.125,0 z"
+ d="m 42.75,25.75 c 0,5.591883 -5.176708,10.125 -11.5625,10.125 -6.385792,0 -11.5625,-4.533117 -11.5625,-10.125 0,-5.591883 5.176708,-10.125 11.5625,-10.125 6.385792,0 11.5625,4.533117 11.5625,10.125 z"
transform="matrix(0.8018194,0,0,0.8471126,6.257567,4.5089892)" />
<path
sodipodi:nodetypes="csssssscssscsssccssscscccsccssssccscsscccssssc"
@@ -35575,7 +35575,7 @@
sodipodi:cy="40"
sodipodi:rx="6"
sodipodi:ry="6"
- d="m 36.5,40 a 6,6 0 1 1 -12,0"
+ d="m 36.5,40 c 0,3.313708 -2.686292,6 -6,6 -3.313708,0 -6,-2.686292 -6,-6 0,0 0,0 0,0"
sodipodi:start="0"
sodipodi:end="3.1415927"
sodipodi:open="true"
@@ -35591,7 +35591,7 @@
sodipodi:open="true"
sodipodi:end="3.1415927"
sodipodi:start="0"
- d="m 36.5,40 a 6,6 0 1 1 -12,0"
+ d="m 36.5,40 c 0,3.313708 -2.686292,6 -6,6 -3.313708,0 -6,-2.686292 -6,-6 0,0 0,0 0,0"
sodipodi:ry="6"
sodipodi:rx="6"
sodipodi:cy="40"
@@ -35619,7 +35619,7 @@
sodipodi:open="true"
sodipodi:end="3.1415927"
sodipodi:start="0"
- d="m 36.5,40 a 6,6 0 1 1 -12,0"
+ d="m 36.5,40 c 0,3.313708 -2.686292,6 -6,6 -3.313708,0 -6,-2.686292 -6,-6 0,0 0,0 0,0"
sodipodi:ry="6"
sodipodi:rx="6"
sodipodi:cy="40"
@@ -35643,7 +35643,7 @@
sodipodi:cy="40"
sodipodi:rx="6"
sodipodi:ry="6"
- d="m 36.5,40 a 6,6 0 1 1 -12,0"
+ d="m 36.5,40 c 0,3.313708 -2.686292,6 -6,6 -3.313708,0 -6,-2.686292 -6,-6 0,0 0,0 0,0"
sodipodi:start="0"
sodipodi:end="3.1415927"
sodipodi:open="true" />
@@ -35746,7 +35746,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -35764,7 +35764,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -35798,7 +35798,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -35807,7 +35807,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -35821,7 +35821,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -35839,7 +35839,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -35852,7 +35852,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -35895,7 +35895,7 @@
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
transform="matrix(1.0911926,0,0,1.176776,253.08415,-79.548088)"
- d="m 72,14.5 a 1.5,1.5 0 1 1 -3,0 1.5,1.5 0 1 1 3,0 z"
+ d="M 72,14.5 C 72,15.328427 71.328427,16 70.5,16 69.671573,16 69,15.328427 69,14.5 69,13.671573 69.671573,13 70.5,13 c 0.828427,0 1.5,0.671573 1.5,1.5 z"
sodipodi:ry="1.5"
sodipodi:rx="1.5"
sodipodi:cy="14.5"
@@ -36362,7 +36362,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -36387,7 +36387,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -36396,7 +36396,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -36448,7 +36448,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -36465,7 +36465,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -36538,7 +36538,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -36547,7 +36547,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -36567,7 +36567,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -36584,7 +36584,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -36655,7 +36655,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -36670,7 +36670,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -36687,7 +36687,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -36709,7 +36709,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -36718,7 +36718,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -36789,7 +36789,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 141.08637,118 a 9.0863705,9.0860729 0 1 1 -18.17274,0 9.0863705,9.0860729 0 1 1 18.17274,0 z"
+ d="m 141.08637,118 c 0,5.0181 -4.06811,9.08607 -9.08637,9.08607 -5.01826,0 -9.08637,-4.06797 -9.08637,-9.08607 0,-5.0181 4.06811,-9.08607 9.08637,-9.08607 5.01826,0 9.08637,4.06797 9.08637,9.08607 z"
sodipodi:ry="9.0860729"
sodipodi:rx="9.0863705"
sodipodi:cy="118"
@@ -36815,7 +36815,7 @@
sodipodi:cy="118"
sodipodi:rx="9.0863705"
sodipodi:ry="9.0860729"
- d="m 141.08637,118 a 9.0863705,9.0860729 0 1 1 -18.17274,0 9.0863705,9.0860729 0 1 1 18.17274,0 z"
+ d="m 141.08637,118 c 0,5.0181 -4.06811,9.08607 -9.08637,9.08607 -5.01826,0 -9.08637,-4.06797 -9.08637,-9.08607 0,-5.0181 4.06811,-9.08607 9.08637,-9.08607 5.01826,0 9.08637,4.06797 9.08637,9.08607 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -37062,7 +37062,7 @@
sodipodi:cy="-222"
sodipodi:rx="3.3084693"
sodipodi:ry="1.2798798"
- d="m 111.30847,-222 a 3.3084693,1.2798798 0 1 1 -6.61694,0 3.3084693,1.2798798 0 1 1 6.61694,0 z"
+ d="m 111.30847,-222 c 0,0.70686 -1.48125,1.27988 -3.30847,1.27988 -1.82722,0 -3.30847,-0.57302 -3.30847,-1.27988 0,-0.70686 1.48125,-1.27988 3.30847,-1.27988 1.82722,0 3.30847,0.57302 3.30847,1.27988 z"
transform="matrix(1.0307577,0,0,0.9140456,39.651558,-39.251735)" />
<path
sodipodi:nodetypes="cssss"
@@ -37127,7 +37127,7 @@
sodipodi:cy="-222"
sodipodi:rx="3.3084693"
sodipodi:ry="1.2798798"
- d="m 111.30847,-222 a 3.3084693,1.2798798 0 1 1 -6.61694,0 3.3084693,1.2798798 0 1 1 6.61694,0 z"
+ d="m 111.30847,-222 c 0,0.70686 -1.48125,1.27988 -3.30847,1.27988 -1.82722,0 -3.30847,-0.57302 -3.30847,-1.27988 0,-0.70686 1.48125,-1.27988 3.30847,-1.27988 1.82722,0 3.30847,0.57302 3.30847,1.27988 z"
transform="matrix(1.0307577,0,0,0.9140456,39.651558,-39.251735)" />
<path
sodipodi:nodetypes="cssss"
@@ -37221,7 +37221,7 @@
inkscape:connector-curvature="0" />
<path
transform="matrix(1.0307577,0,0,0.9140456,39.651558,-39.251735)"
- d="m 111.30847,-222 a 3.3084693,1.2798798 0 1 1 -6.61694,0 3.3084693,1.2798798 0 1 1 6.61694,0 z"
+ d="m 111.30847,-222 c 0,0.70686 -1.48125,1.27988 -3.30847,1.27988 -1.82722,0 -3.30847,-0.57302 -3.30847,-1.27988 0,-0.70686 1.48125,-1.27988 3.30847,-1.27988 1.82722,0 3.30847,0.57302 3.30847,1.27988 z"
sodipodi:ry="1.2798798"
sodipodi:rx="3.3084693"
sodipodi:cy="-222"
@@ -37309,7 +37309,7 @@
sodipodi:cy="14.5"
sodipodi:rx="1.5"
sodipodi:ry="1.5"
- d="m 72,14.5 a 1.5,1.5 0 1 1 -3,0 1.5,1.5 0 1 1 3,0 z"
+ d="M 72,14.5 C 72,15.328427 71.328427,16 70.5,16 69.671573,16 69,15.328427 69,14.5 69,13.671573 69.671573,13 70.5,13 c 0.828427,0 1.5,0.671573 1.5,1.5 z"
transform="matrix(1.176776,0,0,1.176776,-12.47787,-2.548088)"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
@@ -37377,7 +37377,7 @@
sodipodi:cy="14.5"
sodipodi:rx="1.5"
sodipodi:ry="1.5"
- d="m 72,14.5 a 1.5,1.5 0 1 1 -3,0 1.5,1.5 0 1 1 3,0 z"
+ d="M 72,14.5 C 72,15.328427 71.328427,16 70.5,16 69.671573,16 69,15.328427 69,14.5 69,13.671573 69.671573,13 70.5,13 c 0.828427,0 1.5,0.671573 1.5,1.5 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -37606,7 +37606,7 @@
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<path
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -37630,7 +37630,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z" />
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z" />
</g>
<path
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
@@ -37679,7 +37679,7 @@
</g>
</g>
<path
- d="m 139.7074,118 a 7.7074003,7.7241406 0 1 1 -15.4148,0 7.7074003,7.7241406 0 1 1 15.4148,0 z"
+ d="m 139.7074,118 c 0,4.26593 -3.45072,7.72414 -7.7074,7.72414 -4.25668,0 -7.7074,-3.45821 -7.7074,-7.72414 0,-4.26593 3.45072,-7.72414 7.7074,-7.72414 4.25668,0 7.7074,3.45821 7.7074,7.72414 z"
sodipodi:ry="7.7241406"
sodipodi:rx="7.7074003"
sodipodi:cy="118"
@@ -37835,7 +37835,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -37875,7 +37875,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -38007,7 +38007,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -38118,7 +38118,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -38158,7 +38158,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -38197,7 +38197,7 @@
sodipodi:cy="119.5"
sodipodi:rx="5.5"
sodipodi:ry="5.5"
- d="m 196,119.5 a 5.5,5.5 0 1 1 -11,0 5.5,5.5 0 1 1 11,0 z"
+ d="m 196,119.5 c 0,3.03757 -2.46243,5.5 -5.5,5.5 -3.03757,0 -5.5,-2.46243 -5.5,-5.5 0,-3.03757 2.46243,-5.5 5.5,-5.5 3.03757,0 5.5,2.46243 5.5,5.5 z"
transform="matrix(0.61819,0,0,0.618186,73.23488,45.12681)" />
</g>
</g>
@@ -38216,7 +38216,7 @@
id="g24576">
<path
transform="matrix(1.4256767,0,0,1.4314068,-320.1963,68.175135)"
- d="m 333.29445,35.5 a 2.7944512,2.7944512 0 1 1 -5.5889,0 2.7944512,2.7944512 0 1 1 5.5889,0 z"
+ d="m 333.29445,35.5 c 0,1.543333 -1.25112,2.794451 -2.79445,2.794451 -1.54333,0 -2.79445,-1.251118 -2.79445,-2.794451 0,-1.543333 1.25112,-2.794451 2.79445,-2.794451 1.54333,0 2.79445,1.251118 2.79445,2.794451 z"
sodipodi:ry="2.7944512"
sodipodi:rx="2.7944512"
sodipodi:cy="35.5"
@@ -38226,7 +38226,7 @@
sodipodi:type="arc" />
<path
transform="matrix(1.2885487,0,0,1.2885617,-274.87525,73.246084)"
- d="m 334,35.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 334,35.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
sodipodi:ry="3.5"
sodipodi:rx="3.5"
sodipodi:cy="35.5"
@@ -38242,7 +38242,7 @@
sodipodi:cy="35.5"
sodipodi:rx="3.5"
sodipodi:ry="3.5"
- d="m 334,35.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 334,35.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
transform="matrix(-1.288521,0,0,-1.2885339,576.8463,164.73299)" />
</g>
</g>
@@ -38520,7 +38520,7 @@
sodipodi:cy="165"
sodipodi:rx="1"
sodipodi:ry="1"
- d="m 148,165 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 148,165 c 0,0.55228 -0.44772,1 -1,1 -0.55228,0 -1,-0.44772 -1,-1 0,-0.55228 0.44772,-1 1,-1 0.55228,0 1,0.44772 1,1 z"
transform="matrix(1.5,0,0,1.5,-73.5,-83.5)"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
@@ -38539,7 +38539,7 @@
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
transform="matrix(1.5,0,0,1.5,-66.5,-83.5)"
- d="m 148,165 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 148,165 c 0,0.55228 -0.44772,1 -1,1 -0.55228,0 -1,-0.44772 -1,-1 0,-0.55228 0.44772,-1 1,-1 0.55228,0 1,0.44772 1,1 z"
sodipodi:ry="1"
sodipodi:rx="1"
sodipodi:cy="165"
@@ -38580,7 +38580,7 @@
sodipodi:cy="78.5"
sodipodi:rx="3.5"
sodipodi:ry="3.5"
- d="m 262,78.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 262,78.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
transform="matrix(-1.4308622,0,0,1.4308687,469.36987,363.18486)"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
@@ -38608,7 +38608,7 @@
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
transform="matrix(-1.4308622,0,0,1.4308687,469.36987,363.18486)"
- d="m 262,78.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 262,78.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
sodipodi:ry="3.5"
sodipodi:rx="3.5"
sodipodi:cy="78.5"
@@ -38634,13 +38634,13 @@
sodipodi:cy="78.5"
sodipodi:rx="3.5"
sodipodi:ry="3.5"
- d="m 262,78.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 262,78.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
transform="matrix(-1.14287,0,0,1.142863,463.9317,115.7853)" />
<g
id="g35307">
<path
transform="matrix(1.1162596,0,0,1.1065394,80.948334,-350.49863)"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
sodipodi:ry="2.5"
sodipodi:rx="2.5312502"
sodipodi:cy="502"
@@ -38656,13 +38656,13 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(-1.087144,-0.2518404,0.2525206,-1.0776772,126.97246,766.619)" />
</g>
<path
inkscape:transform-center-y="-6.490455"
inkscape:transform-center-x="-3.3976162"
- d="m 65,135 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 65,135 c 0,0.55228 -0.447715,1 -1,1 -0.552285,0 -1,-0.44772 -1,-1 0,-0.55228 0.447715,-1 1,-1 0.552285,0 1,0.44772 1,1 z"
sodipodi:ry="1"
sodipodi:rx="1"
sodipodi:cy="135"
@@ -39248,7 +39248,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -39265,7 +39265,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -39279,7 +39279,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -39409,7 +39409,7 @@
sodipodi:cy="35.5"
sodipodi:rx="3.5"
sodipodi:ry="3.5"
- d="m 334,35.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 334,35.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
transform="matrix(1.000048,0,0,0.999998,-0.01591645,12.000064)" />
<path
style="opacity:0.6;fill:none;stroke:url(#linearGradient15711);stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0.5;display:inline"
@@ -39425,7 +39425,7 @@
sodipodi:cy="35.5"
sodipodi:rx="3.5"
sodipodi:ry="3.5"
- d="m 334,35.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 334,35.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
transform="matrix(0.857099,0,0,0.857147,47.22893,17.071296)" />
</g>
</g>
@@ -39453,7 +39453,7 @@
style="fill:none;stroke:#000000;stroke-width:0.80000001;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0.5;display:inline" />
<path
transform="matrix(1.000048,0,0,0.999998,-0.01591645,12.000064)"
- d="m 334,35.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 334,35.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
sodipodi:ry="3.5"
sodipodi:rx="3.5"
sodipodi:cy="35.5"
@@ -39469,7 +39469,7 @@
inkscape:connector-curvature="0" />
<path
transform="matrix(0.857099,0,0,0.857147,47.22893,17.071296)"
- d="m 334,35.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 334,35.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
sodipodi:ry="3.5"
sodipodi:rx="3.5"
sodipodi:cy="35.5"
@@ -39496,7 +39496,7 @@
style="display:inline">
<path
transform="matrix(1.142871,0,0,1.142855,-27.218817,-5.0713453)"
- d="m 334,35.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 334,35.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
sodipodi:ry="3.5"
sodipodi:rx="3.5"
sodipodi:cy="35.5"
@@ -39512,7 +39512,7 @@
sodipodi:cy="35.5"
sodipodi:rx="3.5"
sodipodi:ry="3.5"
- d="m 334,35.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 334,35.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
transform="matrix(0.857099,0,0,0.857147,67.228993,5.071249)" />
</g>
</g>
@@ -39858,7 +39858,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -39876,7 +39876,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -40529,7 +40529,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -40555,7 +40555,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -40690,7 +40690,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -40698,7 +40698,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -40717,7 +40717,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -40726,7 +40726,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -42097,7 +42097,7 @@
sodipodi:cy="35.5"
sodipodi:rx="2.7944512"
sodipodi:ry="2.7944512"
- d="m 333.29445,35.5 a 2.7944512,2.7944512 0 1 1 -5.5889,0 2.7944512,2.7944512 0 1 1 5.5889,0 z"
+ d="m 333.29445,35.5 c 0,1.543333 -1.25112,2.794451 -2.79445,2.794451 -1.54333,0 -2.79445,-1.251118 -2.79445,-2.794451 0,-1.543333 1.25112,-2.794451 2.79445,-2.794451 1.54333,0 2.79445,1.251118 2.79445,2.794451 z"
transform="matrix(1.4256767,0,0,1.4314068,-320.1963,68.175135)" />
<path
sodipodi:type="arc"
@@ -42107,11 +42107,11 @@
sodipodi:cy="35.5"
sodipodi:rx="3.5"
sodipodi:ry="3.5"
- d="m 334,35.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 334,35.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
transform="matrix(1.2885487,0,0,1.2885617,-274.87525,73.246084)" />
<path
transform="matrix(-1.288521,0,0,-1.2885339,576.8463,164.73299)"
- d="m 334,35.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 334,35.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
sodipodi:ry="3.5"
sodipodi:rx="3.5"
sodipodi:cy="35.5"
@@ -42223,7 +42223,7 @@
inkscape:connector-curvature="0" />
<path
transform="matrix(0.8675713,0,0,-1.199958,80.598976,391.9948)"
- d="m 93.25,125 a 1.75,1.25 0 1 1 -3.5,0 1.75,1.25 0 1 1 3.5,0 z"
+ d="m 93.25,125 c 0,0.69036 -0.783502,1.25 -1.75,1.25 -0.966498,0 -1.75,-0.55964 -1.75,-1.25 0,-0.69036 0.783502,-1.25 1.75,-1.25 0.966498,0 1.75,0.55964 1.75,1.25 z"
sodipodi:ry="1.25"
sodipodi:rx="1.75"
sodipodi:cy="125"
@@ -42245,11 +42245,11 @@
sodipodi:cy="125"
sodipodi:rx="1.75"
sodipodi:ry="1.25"
- d="m 93.25,125 a 1.75,1.25 0 1 1 -3.5,0 1.75,1.25 0 1 1 3.5,0 z"
+ d="m 93.25,125 c 0,0.69036 -0.783502,1.25 -1.75,1.25 -0.966498,0 -1.75,-0.55964 -1.75,-1.25 0,-0.69036 0.783502,-1.25 1.75,-1.25 0.966498,0 1.75,0.55964 1.75,1.25 z"
transform="matrix(0.8540253,0,0,-1.199954,81.814709,391.9942)" />
<path
transform="matrix(0.8540253,0,0,-1.199954,81.814709,391.9942)"
- d="m 93.25,125 a 1.75,1.25 0 1 1 -3.5,0 1.75,1.25 0 1 1 3.5,0 z"
+ d="m 93.25,125 c 0,0.69036 -0.783502,1.25 -1.75,1.25 -0.966498,0 -1.75,-0.55964 -1.75,-1.25 0,-0.69036 0.783502,-1.25 1.75,-1.25 0.966498,0 1.75,0.55964 1.75,1.25 z"
sodipodi:ry="1.25"
sodipodi:rx="1.75"
sodipodi:cy="125"
@@ -42294,7 +42294,7 @@
inkscape:connector-curvature="0" />
<path
transform="matrix(3.625,0,0,3.1690202,-67.8125,318.31703)"
- d="m 14.5,57.5 a 1,1.0000004 0 1 1 -2,0 1,1.0000004 0 1 1 2,0 z"
+ d="m 14.5,57.5 c 0,0.552285 -0.447715,1 -1,1 -0.552285,0 -1,-0.447715 -1,-1 0,-0.552285 0.447715,-1 1,-1 0.552285,0 1,0.447715 1,1 z"
sodipodi:ry="1.0000004"
sodipodi:rx="1"
sodipodi:cy="57.5"
@@ -42311,7 +42311,7 @@
</g>
<path
transform="matrix(3.5999897,0,0,3.1249932,-67.499871,320.6879)"
- d="m 14.5,57.5 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 14.5,57.5 c 0,0.552285 -0.447715,1 -1,1 -0.552285,0 -1,-0.447715 -1,-1 0,-0.552285 0.447715,-1 1,-1 0.552285,0 1,0.447715 1,1 z"
sodipodi:ry="1"
sodipodi:rx="1"
sodipodi:cy="57.5"
@@ -42333,11 +42333,11 @@
sodipodi:cy="57.5"
sodipodi:rx="1"
sodipodi:ry="1"
- d="m 14.5,57.5 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 14.5,57.5 c 0,0.552285 -0.447715,1 -1,1 -0.552285,0 -1,-0.447715 -1,-1 0,-0.552285 0.447715,-1 1,-1 0.552285,0 1,0.447715 1,1 z"
transform="matrix(3.25,0,0,3.25,-62.875,313.125)" />
<path
transform="matrix(2,0,0,2,-46,385)"
- d="m 14.5,57.5 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 14.5,57.5 c 0,0.552285 -0.447715,1 -1,1 -0.552285,0 -1,-0.447715 -1,-1 0,-0.552285 0.447715,-1 1,-1 0.552285,0 1,0.447715 1,1 z"
sodipodi:ry="1"
sodipodi:rx="1"
sodipodi:cy="57.5"
@@ -42353,7 +42353,7 @@
sodipodi:cy="57.5"
sodipodi:rx="1"
sodipodi:ry="1"
- d="m 14.5,57.5 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 14.5,57.5 c 0,0.552285 -0.447715,1 -1,1 -0.552285,0 -1,-0.447715 -1,-1 0,-0.552285 0.447715,-1 1,-1 0.552285,0 1,0.447715 1,1 z"
transform="matrix(4.7519907,0,0,4.1435313,-83.051884,262.12196)" />
<path
sodipodi:nodetypes="cccccc"
@@ -42593,7 +42593,7 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(1.3955004,0,0,1.2452423,11.18333,-121.72474)" />
<rect
rx="0.5078125"
@@ -42606,7 +42606,7 @@
style="opacity:0.25;fill:none;stroke:#ffffff;stroke-width:0.99999988;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
<path
transform="matrix(1.5770887,0,0,1.5999841,-3.50675,-301.69208)"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
sodipodi:ry="2.5"
sodipodi:rx="2.5312502"
sodipodi:cy="502"
@@ -42622,11 +42622,11 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(1.1794014,0,0,0.8999954,27.50686,48.952303)" />
<path
transform="matrix(1.1827463,0,0,1.2,27.245789,-99.900024)"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
sodipodi:ry="2.5"
sodipodi:rx="2.5312502"
sodipodi:cy="502"
@@ -42642,7 +42642,7 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(0.790122,0,0,0.787736,57.870479,107.05649)" />
<g
id="g16548"
@@ -42655,7 +42655,7 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(0.7901234,0,0,0.2000006,9.8760061,395.5997)" />
<path
sodipodi:nodetypes="csccc"
@@ -42700,11 +42700,11 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(1.1827463,0,0,1.2,27.245789,-99.900024)" />
<path
transform="matrix(0.8888868,0,0,0.8862026,50.166822,57.626266)"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
sodipodi:ry="2.5"
sodipodi:rx="2.5312502"
sodipodi:cy="502"
@@ -42720,7 +42720,7 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(0.1975308,0,0,0.1999991,103.0926,401.10045)" />
<path
sodipodi:type="arc"
@@ -42730,7 +42730,7 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(-0.8867575,0.06148883,-0.06130315,-0.8840797,219.44126,941.51187)" />
</g>
</g>
@@ -42804,7 +42804,7 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(0.7834486,0,0,0.2000006,10.413535,395.5997)" />
<path
sodipodi:nodetypes="csccc"
@@ -42850,7 +42850,7 @@
transform="translate(1.1408497e-7,0.5000446)">
<path
transform="matrix(1.187982,0,0,1.0569758,379.83032,-513.21497)"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
sodipodi:ry="2.5"
sodipodi:rx="2.5312502"
sodipodi:cy="502"
@@ -42866,11 +42866,11 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(1.3827154,0,0,1.4028327,364.1482,-688.72206)" />
<path
transform="matrix(0.987526,0,0,0.8124641,394.9733,-392.80617)"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
sodipodi:ry="2.5"
sodipodi:rx="2.5312502"
sodipodi:cy="502"
@@ -42886,11 +42886,11 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(0.9848328,0,0,0.9992585,395.19018,-485.12778)" />
<path
transform="matrix(0.591154,0,0,0.5887513,425.87219,-279.05319)"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
sodipodi:ry="2.5"
sodipodi:rx="2.5312502"
sodipodi:cy="502"
@@ -42900,7 +42900,7 @@
sodipodi:type="arc" />
<path
transform="matrix(0.9913883,0,0,1.0058976,394.67318,-488.46061)"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
sodipodi:ry="2.5"
sodipodi:rx="2.5312502"
sodipodi:cy="502"
@@ -42916,11 +42916,11 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(0.6941559,0,0,0.6920597,417.67198,-331.15708)" />
<path
transform="matrix(0.1975308,0,0,0.1999991,456.0926,-84.399595)"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
sodipodi:ry="2.5"
sodipodi:rx="2.5312502"
sodipodi:cy="502"
@@ -42930,7 +42930,7 @@
sodipodi:type="arc" />
<path
transform="matrix(-0.6760501,-0.1575078,0.1570322,-0.6740085,446.07727,367.34791)"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
sodipodi:ry="2.5"
sodipodi:rx="2.5312502"
sodipodi:cy="502"
@@ -43009,7 +43009,7 @@
id="g22118">
<path
transform="matrix(0.7834486,0,0,0.2000006,10.413535,395.5997)"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
sodipodi:ry="2.5"
sodipodi:rx="2.5312502"
sodipodi:cy="502"
@@ -43067,11 +43067,11 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(1.187982,0,0,1.0569758,379.83032,-513.21497)" />
<path
transform="matrix(1.3827154,0,0,1.4028327,364.1482,-688.72206)"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
sodipodi:ry="2.5"
sodipodi:rx="2.5312502"
sodipodi:cy="502"
@@ -43087,11 +43087,11 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(0.987526,0,0,0.8124641,394.9733,-392.80617)" />
<path
transform="matrix(0.9848328,0,0,0.9992585,395.19018,-485.12778)"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
sodipodi:ry="2.5"
sodipodi:rx="2.5312502"
sodipodi:cy="502"
@@ -43107,7 +43107,7 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(0.591154,0,0,0.5887513,425.87219,-279.05319)" />
<path
sodipodi:type="arc"
@@ -43117,11 +43117,11 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(0.9913883,0,0,1.0058976,394.67318,-488.46061)" />
<path
transform="matrix(0.6941559,0,0,0.6920597,417.84876,-330.91401)"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
sodipodi:ry="2.5"
sodipodi:rx="2.5312502"
sodipodi:cy="502"
@@ -43137,7 +43137,7 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(0.1975308,0,0,0.1999991,456.07844,-84.89955)" />
</g>
<path
@@ -43170,9 +43170,9 @@
sodipodi:cy="108.5"
sodipodi:rx="3"
sodipodi:ry="3"
- d="m 446.5,108.5 a 3,3 0 1 1 -6,0 3,3 0 1 1 6,0 z" />
+ d="m 446.5,108.5 c 0,1.65685 -1.34315,3 -3,3 -1.65685,0 -3,-1.34315 -3,-3 0,-1.65685 1.34315,-3 3,-3 1.65685,0 3,1.34315 3,3 z" />
<path
- d="m 446.5,108.5 a 3,3 0 1 1 -6,0 3,3 0 1 1 6,0 z"
+ d="m 446.5,108.5 c 0,1.65685 -1.34315,3 -3,3 -1.65685,0 -3,-1.34315 -3,-3 0,-1.65685 1.34315,-3 3,-3 1.65685,0 3,1.34315 3,3 z"
sodipodi:ry="3"
sodipodi:rx="3"
sodipodi:cy="108.5"
@@ -43182,7 +43182,7 @@
sodipodi:type="arc"
transform="matrix(1.3340954,0,0,1.3333333,-184.1736,-187.16666)" />
<path
- d="m 446.5,108.5 a 3,3 0 1 1 -6,0 3,3 0 1 1 6,0 z"
+ d="m 446.5,108.5 c 0,1.65685 -1.34315,3 -3,3 -1.65685,0 -3,-1.34315 -3,-3 0,-1.65685 1.34315,-3 3,-3 1.65685,0 3,1.34315 3,3 z"
sodipodi:ry="3"
sodipodi:rx="3"
sodipodi:cy="108.5"
@@ -43209,7 +43209,7 @@
sodipodi:cy="108.5"
sodipodi:rx="3"
sodipodi:ry="3"
- d="m 440.514,108.7895 a 3,3 0 1 1 2.1568,2.59363" />
+ d="m 440.514,108.7895 c -0.15988,-1.64913 1.04738,-3.11561 2.6965,-3.2755 1.64913,-0.15988 3.11561,1.04738 3.2755,2.6965 0.15988,1.64913 -1.04738,3.11561 -2.6965,3.2755 -0.37605,0.0365 -0.75561,0.002 -1.1187,-0.10287" />
<path
transform="matrix(1.1662469,0,0,1.1666676,-109.73384,-169.08343)"
sodipodi:type="arc"
@@ -43219,12 +43219,12 @@
sodipodi:cy="108.5"
sodipodi:rx="3"
sodipodi:ry="3"
- d="m 446.5,108.5 a 3,3 0 1 1 -6,0 3,3 0 1 1 6,0 z" />
+ d="m 446.5,108.5 c 0,1.65685 -1.34315,3 -3,3 -1.65685,0 -3,-1.34315 -3,-3 0,-1.65685 1.34315,-3 3,-3 1.65685,0 3,1.34315 3,3 z" />
<path
sodipodi:open="true"
sodipodi:end="5.930273"
sodipodi:start="0.96146912"
- d="m 445.21695,110.9601 a 3,3 0 1 1 1.09816,-3.497"
+ d="m 445.21695,110.9601 c -1.35868,0.94824 -3.22881,0.61552 -4.17705,-0.74315 -0.94824,-1.35868 -0.61552,-3.22881 0.74315,-4.17705 1.35868,-0.94824 3.22881,-0.61552 4.17705,0.74315 0.14695,0.21056 0.26626,0.43911 0.35501,0.68005"
sodipodi:ry="3"
sodipodi:rx="3"
sodipodi:cy="108.5"
@@ -43249,7 +43249,7 @@
sodipodi:cy="108.5"
sodipodi:rx="3"
sodipodi:ry="3"
- d="m 446.5,108.5 a 3,3 0 1 1 -6,0 3,3 0 1 1 6,0 z" />
+ d="m 446.5,108.5 c 0,1.65685 -1.34315,3 -3,3 -1.65685,0 -3,-1.34315 -3,-3 0,-1.65685 1.34315,-3 3,-3 1.65685,0 3,1.34315 3,3 z" />
<rect
y="-43"
x="407"
@@ -43258,7 +43258,7 @@
id="rect30207"
style="fill:#2b2200;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
<path
- d="m 446.5,108.5 a 3,3 0 1 1 -6,0 3,3 0 1 1 6,0 z"
+ d="m 446.5,108.5 c 0,1.65685 -1.34315,3 -3,3 -1.65685,0 -3,-1.34315 -3,-3 0,-1.65685 1.34315,-3 3,-3 1.65685,0 3,1.34315 3,3 z"
sodipodi:ry="3"
sodipodi:rx="3"
sodipodi:cy="108.5"
@@ -43341,7 +43341,7 @@
x="403"
y="-48" />
<path
- d="m 446.5,108.5 a 3,3 0 1 1 -6,0 3,3 0 1 1 6,0 z"
+ d="m 446.5,108.5 c 0,1.65685 -1.34315,3 -3,3 -1.65685,0 -3,-1.34315 -3,-3 0,-1.65685 1.34315,-3 3,-3 1.65685,0 3,1.34315 3,3 z"
sodipodi:ry="3"
sodipodi:rx="3"
sodipodi:cy="108.5"
@@ -43359,7 +43359,7 @@
sodipodi:cy="108.5"
sodipodi:rx="3"
sodipodi:ry="3"
- d="m 446.5,108.5 a 3,3 0 1 1 -6,0 3,3 0 1 1 6,0 z" />
+ d="m 446.5,108.5 c 0,1.65685 -1.34315,3 -3,3 -1.65685,0 -3,-1.34315 -3,-3 0,-1.65685 1.34315,-3 3,-3 1.65685,0 3,1.34315 3,3 z" />
<path
transform="matrix(1.1662469,0,0,1.1666676,-103.72925,-170.08344)"
sodipodi:type="arc"
@@ -43369,7 +43369,7 @@
sodipodi:cy="108.5"
sodipodi:rx="3"
sodipodi:ry="3"
- d="m 446.5,108.5 a 3,3 0 1 1 -6,0 3,3 0 1 1 6,0 z" />
+ d="m 446.5,108.5 c 0,1.65685 -1.34315,3 -3,3 -1.65685,0 -3,-1.34315 -3,-3 0,-1.65685 1.34315,-3 3,-3 1.65685,0 3,1.34315 3,3 z" />
<path
style="fill:#787878;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.80000001;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="m 407.5,-39.5 0,1.999993 -2,0 0,2 2,0 0,1 1,1 5,7e-6 0,-1 2.99542,0 1.5,1 0.25,0 0,-5 -0.25,0 -1.5,1 -2.99542,0 0,-2 -6,0 z"
@@ -43377,7 +43377,7 @@
sodipodi:nodetypes="cccccccccccccccccc"
inkscape:connector-curvature="0" />
<path
- d="m 440.514,108.7895 a 3,3 0 1 1 2.1568,2.59363"
+ d="m 440.514,108.7895 c -0.15988,-1.64913 1.04738,-3.11561 2.6965,-3.2755 1.64913,-0.15988 3.11561,1.04738 3.2755,2.6965 0.15988,1.64913 -1.04738,3.11561 -2.6965,3.2755 -0.37605,0.0365 -0.75561,0.002 -1.1187,-0.10287"
sodipodi:ry="3"
sodipodi:rx="3"
sodipodi:cy="108.5"
@@ -43390,7 +43390,7 @@
sodipodi:end="8.1340281"
sodipodi:open="true" />
<path
- d="m 446.5,108.5 a 3,3 0 1 1 -6,0 3,3 0 1 1 6,0 z"
+ d="m 446.5,108.5 c 0,1.65685 -1.34315,3 -3,3 -1.65685,0 -3,-1.34315 -3,-3 0,-1.65685 1.34315,-3 3,-3 1.65685,0 3,1.34315 3,3 z"
sodipodi:ry="3"
sodipodi:rx="3"
sodipodi:cy="108.5"
@@ -43408,7 +43408,7 @@
sodipodi:cy="108.5"
sodipodi:rx="3"
sodipodi:ry="3"
- d="m 445.21695,110.9601 a 3,3 0 1 1 1.09816,-3.497"
+ d="m 445.21695,110.9601 c -1.35868,0.94824 -3.22881,0.61552 -4.17705,-0.74315 -0.94824,-1.35868 -0.61552,-3.22881 0.74315,-4.17705 1.35868,-0.94824 3.22881,-0.61552 4.17705,0.74315 0.14695,0.21056 0.26626,0.43911 0.35501,0.68005"
sodipodi:start="0.96146912"
sodipodi:end="5.930273"
sodipodi:open="true" />
@@ -43420,7 +43420,7 @@
x="409"
y="-41" />
<path
- d="m 446.5,108.5 a 3,3 0 1 1 -6,0 3,3 0 1 1 6,0 z"
+ d="m 446.5,108.5 c 0,1.65685 -1.34315,3 -3,3 -1.65685,0 -3,-1.34315 -3,-3 0,-1.65685 1.34315,-3 3,-3 1.65685,0 3,1.34315 3,3 z"
sodipodi:ry="3"
sodipodi:rx="3"
sodipodi:cy="108.5"
@@ -43445,7 +43445,7 @@
sodipodi:cy="108.5"
sodipodi:rx="3"
sodipodi:ry="3"
- d="m 446.5,108.5 a 3,3 0 1 1 -6,0 3,3 0 1 1 6,0 z" />
+ d="m 446.5,108.5 c 0,1.65685 -1.34315,3 -3,3 -1.65685,0 -3,-1.34315 -3,-3 0,-1.65685 1.34315,-3 3,-3 1.65685,0 3,1.34315 3,3 z" />
<rect
y="-43.99012"
x="413.00003"
@@ -43520,7 +43520,7 @@
x="403"
y="-48" />
<path
- d="m 446.5,108.5 a 3,3 0 1 1 -6,0 3,3 0 1 1 6,0 z"
+ d="m 446.5,108.5 c 0,1.65685 -1.34315,3 -3,3 -1.65685,0 -3,-1.34315 -3,-3 0,-1.65685 1.34315,-3 3,-3 1.65685,0 3,1.34315 3,3 z"
sodipodi:ry="3"
sodipodi:rx="3"
sodipodi:cy="108.5"
@@ -43538,7 +43538,7 @@
sodipodi:cy="108.5"
sodipodi:rx="3"
sodipodi:ry="3"
- d="m 446.5,108.5 a 3,3 0 1 1 -6,0 3,3 0 1 1 6,0 z" />
+ d="m 446.5,108.5 c 0,1.65685 -1.34315,3 -3,3 -1.65685,0 -3,-1.34315 -3,-3 0,-1.65685 1.34315,-3 3,-3 1.65685,0 3,1.34315 3,3 z" />
<path
transform="matrix(1.1662469,0,0,1.1666676,-103.72925,-170.08344)"
sodipodi:type="arc"
@@ -43548,7 +43548,7 @@
sodipodi:cy="108.5"
sodipodi:rx="3"
sodipodi:ry="3"
- d="m 446.5,108.5 a 3,3 0 1 1 -6,0 3,3 0 1 1 6,0 z" />
+ d="m 446.5,108.5 c 0,1.65685 -1.34315,3 -3,3 -1.65685,0 -3,-1.34315 -3,-3 0,-1.65685 1.34315,-3 3,-3 1.65685,0 3,1.34315 3,3 z" />
<path
style="fill:#787878;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.80000001;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="m 407.5,-39.5 0,1.999993 -2,0 0,2 2,0 0,1 1,1 5,7e-6 0,-1 2.99542,0 1.5,1 0.25,0 0,-5 -0.25,0 -1.5,1 -2.99542,0 0,-2 -6,0 z"
@@ -43556,7 +43556,7 @@
sodipodi:nodetypes="cccccccccccccccccc"
inkscape:connector-curvature="0" />
<path
- d="m 440.514,108.7895 a 3,3 0 1 1 2.1568,2.59363"
+ d="m 440.514,108.7895 c -0.15988,-1.64913 1.04738,-3.11561 2.6965,-3.2755 1.64913,-0.15988 3.11561,1.04738 3.2755,2.6965 0.15988,1.64913 -1.04738,3.11561 -2.6965,3.2755 -0.37605,0.0365 -0.75561,0.002 -1.1187,-0.10287"
sodipodi:ry="3"
sodipodi:rx="3"
sodipodi:cy="108.5"
@@ -43569,7 +43569,7 @@
sodipodi:end="8.1340281"
sodipodi:open="true" />
<path
- d="m 446.5,108.5 a 3,3 0 1 1 -6,0 3,3 0 1 1 6,0 z"
+ d="m 446.5,108.5 c 0,1.65685 -1.34315,3 -3,3 -1.65685,0 -3,-1.34315 -3,-3 0,-1.65685 1.34315,-3 3,-3 1.65685,0 3,1.34315 3,3 z"
sodipodi:ry="3"
sodipodi:rx="3"
sodipodi:cy="108.5"
@@ -43587,7 +43587,7 @@
sodipodi:cy="108.5"
sodipodi:rx="3"
sodipodi:ry="3"
- d="m 445.21695,110.9601 a 3,3 0 1 1 1.09816,-3.497"
+ d="m 445.21695,110.9601 c -1.35868,0.94824 -3.22881,0.61552 -4.17705,-0.74315 -0.94824,-1.35868 -0.61552,-3.22881 0.74315,-4.17705 1.35868,-0.94824 3.22881,-0.61552 4.17705,0.74315 0.14695,0.21056 0.26626,0.43911 0.35501,0.68005"
sodipodi:start="0.96146912"
sodipodi:end="5.930273"
sodipodi:open="true" />
@@ -43599,7 +43599,7 @@
x="409"
y="-41" />
<path
- d="m 446.5,108.5 a 3,3 0 1 1 -6,0 3,3 0 1 1 6,0 z"
+ d="m 446.5,108.5 c 0,1.65685 -1.34315,3 -3,3 -1.65685,0 -3,-1.34315 -3,-3 0,-1.65685 1.34315,-3 3,-3 1.65685,0 3,1.34315 3,3 z"
sodipodi:ry="3"
sodipodi:rx="3"
sodipodi:cy="108.5"
@@ -43624,7 +43624,7 @@
sodipodi:cy="108.5"
sodipodi:rx="3"
sodipodi:ry="3"
- d="m 446.5,108.5 a 3,3 0 1 1 -6,0 3,3 0 1 1 6,0 z" />
+ d="m 446.5,108.5 c 0,1.65685 -1.34315,3 -3,3 -1.65685,0 -3,-1.34315 -3,-3 0,-1.65685 1.34315,-3 3,-3 1.65685,0 3,1.34315 3,3 z" />
<rect
y="-43.99012"
x="413.00003"
@@ -44644,11 +44644,11 @@
sodipodi:cy="192.5"
sodipodi:rx="1.75"
sodipodi:ry="1.75"
- d="m 466.25,192.5 a 1.75,1.75 0 1 1 -3.5,0 1.75,1.75 0 1 1 3.5,0 z"
+ d="m 466.25,192.5 c 0,0.9665 -0.7835,1.75 -1.75,1.75 -0.9665,0 -1.75,-0.7835 -1.75,-1.75 0,-0.9665 0.7835,-1.75 1.75,-1.75 0.9665,0 1.75,0.7835 1.75,1.75 z"
transform="matrix(1.9999998,0,0,2.0000014,-462.99991,-192.00026)" />
<path
transform="matrix(1.4285718,0,0,1.4285718,-197.57158,-82.000059)"
- d="m 466.25,192.5 a 1.75,1.75 0 1 1 -3.5,0 1.75,1.75 0 1 1 3.5,0 z"
+ d="m 466.25,192.5 c 0,0.9665 -0.7835,1.75 -1.75,1.75 -0.9665,0 -1.75,-0.7835 -1.75,-1.75 0,-0.9665 0.7835,-1.75 1.75,-1.75 0.9665,0 1.75,0.7835 1.75,1.75 z"
sodipodi:ry="1.75"
sodipodi:rx="1.75"
sodipodi:cy="192.5"
@@ -44664,7 +44664,7 @@
sodipodi:cy="192.5"
sodipodi:rx="1.75"
sodipodi:ry="1.75"
- d="m 466.25,192.5 a 1.75,1.75 0 1 1 -3.5,0 1.75,1.75 0 1 1 3.5,0 z"
+ d="m 466.25,192.5 c 0,0.9665 -0.7835,1.75 -1.75,1.75 -0.9665,0 -1.75,-0.7835 -1.75,-1.75 0,-0.9665 0.7835,-1.75 1.75,-1.75 0.9665,0 1.75,0.7835 1.75,1.75 z"
transform="matrix(0.8571429,0,0,0.8571429,67.857123,27.999992)" />
</g>
<rect
@@ -44706,7 +44706,7 @@
sodipodi:cy="-222"
sodipodi:rx="3.3084693"
sodipodi:ry="1.2798798"
- d="m 111.30847,-222 a 3.3084693,1.2798798 0 1 1 -6.61694,0 3.3084693,1.2798798 0 1 1 6.61694,0 z"
+ d="m 111.30847,-222 c 0,0.70686 -1.48125,1.27988 -3.30847,1.27988 -1.82722,0 -3.30847,-0.57302 -3.30847,-1.27988 0,-0.70686 1.48125,-1.27988 3.30847,-1.27988 1.82722,0 3.30847,0.57302 3.30847,1.27988 z"
transform="matrix(0.9067635,0,0,1.3047091,374.56954,447.97555)" />
<path
sodipodi:nodetypes="cccsccc"
@@ -44722,7 +44722,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -44736,7 +44736,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -44748,7 +44748,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -44996,7 +44996,7 @@
y="328.03571" />
<path
transform="matrix(1.6666708,0,0,1.6666633,-190.66784,-215.66559)"
- d="m 287.5,325 a 1.5,1.5 0 1 1 -3,0 1.5,1.5 0 1 1 3,0 z"
+ d="m 287.5,325 c 0,0.82843 -0.67157,1.5 -1.5,1.5 -0.82843,0 -1.5,-0.67157 -1.5,-1.5 0,-0.82843 0.67157,-1.5 1.5,-1.5 0.82843,0 1.5,0.67157 1.5,1.5 z"
sodipodi:ry="1.5"
sodipodi:rx="1.5"
sodipodi:cy="325"
@@ -45026,7 +45026,7 @@
sodipodi:cy="325"
sodipodi:rx="1.5"
sodipodi:ry="1.5"
- d="m 287.5,325 a 1.5,1.5 0 1 1 -3,0 1.5,1.5 0 1 1 3,0 z"
+ d="m 287.5,325 c 0,0.82843 -0.67157,1.5 -1.5,1.5 -0.82843,0 -1.5,-0.67157 -1.5,-1.5 0,-0.82843 0.67157,-1.5 1.5,-1.5 0.82843,0 1.5,0.67157 1.5,1.5 z"
transform="matrix(1.333351,0,0,1.333345,-95.338377,-107.33714)" />
<rect
y="331"
@@ -45383,7 +45383,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -45396,7 +45396,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -45425,7 +45425,7 @@
id="g34916">
<path
transform="translate(58.032932,-27.838387)"
- d="m 3.5,-32 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 3.5,-32 c 0,1.932997 -1.5670034,3.5 -3.5,3.5 -1.9329966,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.5670034,-3.5 3.5,-3.5 1.9329966,0 3.5,1.567003 3.5,3.5 z"
sodipodi:ry="3.5"
sodipodi:rx="3.5"
sodipodi:cy="-32"
@@ -45441,7 +45441,7 @@
sodipodi:cy="-32"
sodipodi:rx="3.5"
sodipodi:ry="3.5"
- d="m 3.5,-32 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 3.5,-32 c 0,1.932997 -1.5670034,3.5 -3.5,3.5 -1.9329966,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.5670034,-3.5 3.5,-3.5 1.9329966,0 3.5,1.567003 3.5,3.5 z"
transform="matrix(1.4285714,0,0,1.4274429,55.5,-11.825777)" />
</g>
<g
@@ -45455,11 +45455,11 @@
sodipodi:cy="-32"
sodipodi:rx="3.5"
sodipodi:ry="3.5"
- d="m 3.5,-32 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 3.5,-32 c 0,1.932997 -1.5670034,3.5 -3.5,3.5 -1.9329966,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.5670034,-3.5 3.5,-3.5 1.9329966,0 3.5,1.567003 3.5,3.5 z"
transform="matrix(1.1751782,0,0,1.1751782,56.000001,-1.2882925)" />
<path
transform="matrix(0.9994022,0,0,0.9994021,56.002092,-6.9152216)"
- d="m 3.5,-32 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 3.5,-32 c 0,1.932997 -1.5670034,3.5 -3.5,3.5 -1.9329966,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.5670034,-3.5 3.5,-3.5 1.9329966,0 3.5,1.567003 3.5,3.5 z"
sodipodi:ry="3.5"
sodipodi:rx="3.5"
sodipodi:cy="-32"
@@ -45475,7 +45475,7 @@
sodipodi:cy="-32"
sodipodi:rx="3.5"
sodipodi:ry="3.5"
- d="m 3.5,-32 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 3.5,-32 c 0,1.932997 -1.5670034,3.5 -3.5,3.5 -1.9329966,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.5670034,-3.5 3.5,-3.5 1.9329966,0 3.5,1.567003 3.5,3.5 z"
transform="matrix(0.774689,0,0,0.7805148,56.890573,-14.812697)" />
<path
sodipodi:type="arc"
@@ -45485,11 +45485,11 @@
sodipodi:cy="-32"
sodipodi:rx="3.5"
sodipodi:ry="3.5"
- d="m 3.5,-32 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 3.5,-32 c 0,1.932997 -1.5670034,3.5 -3.5,3.5 -1.9329966,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.5670034,-3.5 3.5,-3.5 1.9329966,0 3.5,1.567003 3.5,3.5 z"
transform="matrix(1.0042021,0,0,1.0042021,55.985293,-6.7448206)" />
<path
transform="matrix(0.9108044,0,0,0.9108044,55.985293,-9.7335486)"
- d="m 3.5,-32 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 3.5,-32 c 0,1.932997 -1.5670034,3.5 -3.5,3.5 -1.9329966,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.5670034,-3.5 3.5,-3.5 1.9329966,0 3.5,1.567003 3.5,3.5 z"
sodipodi:ry="3.5"
sodipodi:rx="3.5"
sodipodi:cy="-32"
@@ -45503,7 +45503,7 @@
id="g34934">
<path
transform="matrix(0.8571429,0,0,0.8571429,58.032932,-32.409816)"
- d="m 3.5,-32 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 3.5,-32 c 0,1.932997 -1.5670034,3.5 -3.5,3.5 -1.9329966,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.5670034,-3.5 3.5,-3.5 1.9329966,0 3.5,1.567003 3.5,3.5 z"
sodipodi:ry="3.5"
sodipodi:rx="3.5"
sodipodi:cy="-32"
@@ -45519,11 +45519,11 @@
sodipodi:cy="-32"
sodipodi:rx="3.5"
sodipodi:ry="3.5"
- d="m 3.5,-32 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 3.5,-32 c 0,1.932997 -1.5670034,3.5 -3.5,3.5 -1.9329966,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.5670034,-3.5 3.5,-3.5 1.9329966,0 3.5,1.567003 3.5,3.5 z"
transform="matrix(0.7142853,0,0,0.7142853,58.032932,-36.981258)" />
<path
transform="translate(58.032932,-27.838387)"
- d="m 3.5,-32 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 3.5,-32 c 0,1.932997 -1.5670034,3.5 -3.5,3.5 -1.9329966,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.5670034,-3.5 3.5,-3.5 1.9329966,0 3.5,1.567003 3.5,3.5 z"
sodipodi:ry="3.5"
sodipodi:rx="3.5"
sodipodi:cy="-32"
@@ -45539,7 +45539,7 @@
sodipodi:cy="-32"
sodipodi:rx="3.5"
sodipodi:ry="3.5"
- d="m 3.5,-32 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 3.5,-32 c 0,1.932997 -1.5670034,3.5 -3.5,3.5 -1.9329966,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.5670034,-3.5 3.5,-3.5 1.9329966,0 3.5,1.567003 3.5,3.5 z"
transform="matrix(0.8571429,0,0,0.8571429,58.032932,-32.409816)" />
</g>
</g>
@@ -45823,7 +45823,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -45840,7 +45840,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -45849,7 +45849,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -46780,7 +46780,7 @@
inkscape:export-ydpi="90"
transform="matrix(1.0004639,0,0,0.9963165,-69.122722,304.28985)">
<path
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -46806,7 +46806,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -46816,7 +46816,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -46829,7 +46829,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -46853,7 +46853,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -46950,7 +46950,7 @@
inkscape:export-ydpi="90"
transform="matrix(1.0004639,0,0,0.9963165,-237.12363,495.28986)">
<path
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -46976,7 +46976,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -46986,7 +46986,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -46999,7 +46999,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -47023,7 +47023,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -47280,7 +47280,7 @@
sodipodi:cy="-222"
sodipodi:rx="3.3084693"
sodipodi:ry="1.2798798"
- d="m 111.30847,-222 a 3.3084693,1.2798798 0 1 1 -6.61694,0 3.3084693,1.2798798 0 1 1 6.61694,0 z"
+ d="m 111.30847,-222 c 0,0.70686 -1.48125,1.27988 -3.30847,1.27988 -1.82722,0 -3.30847,-0.57302 -3.30847,-1.27988 0,-0.70686 1.48125,-1.27988 3.30847,-1.27988 1.82722,0 3.30847,0.57302 3.30847,1.27988 z"
transform="matrix(0.9067635,0,0,1.3047091,374.56954,447.97555)" />
<path
sodipodi:nodetypes="cccsccc"
@@ -48087,7 +48087,7 @@
inkscape:export-ydpi="90"
transform="matrix(1.0004639,0,0,0.9963165,-237.11238,367.28985)">
<path
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -48108,7 +48108,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -48117,7 +48117,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -48145,7 +48145,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -48154,7 +48154,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -48633,11 +48633,11 @@
sodipodi:cy="-23"
sodipodi:rx="1"
sodipodi:ry="1"
- d="m 134,-23 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 134,-23 c 0,0.552285 -0.44772,1 -1,1 -0.55228,0 -1,-0.447715 -1,-1 0,-0.552285 0.44772,-1 1,-1 0.55228,0 1,0.447715 1,1 z"
transform="translate(0.5,-0.46875)" />
<path
transform="matrix(1.2143583,0,0,1.1512108,-28.054112,2.9290602)"
- d="m 134,-23 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 134,-23 c 0,0.552285 -0.44772,1 -1,1 -0.55228,0 -1,-0.447715 -1,-1 0,-0.552285 0.44772,-1 1,-1 0.55228,0 1,0.447715 1,1 z"
sodipodi:ry="1"
sodipodi:rx="1"
sodipodi:cy="-23"
@@ -48647,7 +48647,7 @@
sodipodi:type="arc" />
<path
transform="matrix(0.8392157,0,0,0.8382979,21.884318,-4.2140957)"
- d="m 134,-23 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 134,-23 c 0,0.552285 -0.44772,1 -1,1 -0.55228,0 -1,-0.447715 -1,-1 0,-0.552285 0.44772,-1 1,-1 0.55228,0 1,0.447715 1,1 z"
sodipodi:ry="1"
sodipodi:rx="1"
sodipodi:cy="-23"
@@ -48676,7 +48676,7 @@
sodipodi:cy="-23"
sodipodi:rx="1"
sodipodi:ry="1"
- d="m 134,-23 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 134,-23 c 0,0.552285 -0.44772,1 -1,1 -0.55228,0 -1,-0.447715 -1,-1 0,-0.552285 0.44772,-1 1,-1 0.55228,0 1,0.447715 1,1 z"
transform="matrix(1.2116904,0,0,1.1282344,-22.693138,2.3776257)" />
<path
sodipodi:type="arc"
@@ -48686,7 +48686,7 @@
sodipodi:cy="-23"
sodipodi:rx="1"
sodipodi:ry="1"
- d="m 134,-23 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 134,-23 c 0,0.552285 -0.44772,1 -1,1 -0.55228,0 -1,-0.447715 -1,-1 0,-0.552285 0.44772,-1 1,-1 0.55228,0 1,0.447715 1,1 z"
transform="matrix(0.8392157,0,0,0.8382979,26.893134,-4.2140957)" />
<path
style="fill:none;stroke:#ffffff;stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
@@ -48763,7 +48763,7 @@
inkscape:connector-curvature="0" />
<path
transform="matrix(0.9067635,0,0,1.2421435,374.56954,430.00586)"
- d="m 111.30847,-222 a 3.3084693,1.2798798 0 1 1 -6.61694,0 3.3084693,1.2798798 0 1 1 6.61694,0 z"
+ d="m 111.30847,-222 c 0,0.70686 -1.48125,1.27988 -3.30847,1.27988 -1.82722,0 -3.30847,-0.57302 -3.30847,-1.27988 0,-0.70686 1.48125,-1.27988 3.30847,-1.27988 1.82722,0 3.30847,0.57302 3.30847,1.27988 z"
sodipodi:ry="1.2798798"
sodipodi:rx="3.3084693"
sodipodi:cy="-222"
@@ -48840,7 +48840,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -48857,7 +48857,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -48871,7 +48871,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -48913,7 +48913,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -48926,7 +48926,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -49655,7 +49655,7 @@
</g>
<path
transform="matrix(0.9,0,0,0.9,7.6,60.3)"
- d="m 80.166667,603 a 4.1666665,4.1666665 0 1 1 -8.333334,0 4.1666665,4.1666665 0 1 1 8.333334,0 z"
+ d="m 80.166667,603 c 0,2.30119 -1.865481,4.16667 -4.166667,4.16667 -2.301186,0 -4.166667,-1.86548 -4.166667,-4.16667 0,-2.30119 1.865481,-4.16667 4.166667,-4.16667 2.301186,0 4.166667,1.86548 4.166667,4.16667 z"
sodipodi:ry="4.1666665"
sodipodi:rx="4.1666665"
sodipodi:cy="603"
@@ -51237,7 +51237,7 @@
inkscape:connector-curvature="0" />
<path
transform="matrix(0.9552133,0,0,0.9315985,-40.901258,-140.2522)"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
sodipodi:ry="2.5"
sodipodi:rx="2.5312502"
sodipodi:cy="502"
@@ -51249,7 +51249,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- d="m 65,135 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 65,135 c 0,0.55228 -0.447715,1 -1,1 -0.552285,0 -1,-0.44772 -1,-1 0,-0.55228 0.447715,-1 1,-1 0.552285,0 1,0.44772 1,1 z"
sodipodi:ry="1"
sodipodi:rx="1"
sodipodi:cy="135"
@@ -51444,7 +51444,7 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(0.9552133,0,0,0.9315985,-40.901258,-140.2522)" />
<path
transform="matrix(0.99567,0,-0.00787885,1,-30.654936,191)"
@@ -51455,7 +51455,7 @@
sodipodi:cy="135"
sodipodi:rx="1"
sodipodi:ry="1"
- d="m 65,135 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 65,135 c 0,0.55228 -0.447715,1 -1,1 -0.552285,0 -1,-0.44772 -1,-1 0,-0.55228 0.447715,-1 1,-1 0.552285,0 1,0.44772 1,1 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -51645,7 +51645,7 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(0.9552133,0,0,0.9315985,-40.901258,-140.2522)" />
<path
transform="matrix(0.99567,0,-0.00787885,1,-30.663533,191)"
@@ -51656,7 +51656,7 @@
sodipodi:cy="135"
sodipodi:rx="1"
sodipodi:ry="1"
- d="m 65,135 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 65,135 c 0,0.55228 -0.447715,1 -1,1 -0.552285,0 -1,-0.44772 -1,-1 0,-0.55228 0.447715,-1 1,-1 0.552285,0 1,0.44772 1,1 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -52301,9 +52301,9 @@
sodipodi:cy="79.5"
sodipodi:rx="3.5"
sodipodi:ry="3.5"
- d="m 211,79.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z" />
+ d="m 211,79.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z" />
<path
- d="m 211,79.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 211,79.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
sodipodi:ry="3.5"
sodipodi:rx="3.5"
sodipodi:cy="79.5"
@@ -52845,7 +52845,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -52861,7 +52861,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -53733,13 +53733,13 @@
sodipodi:cy="554"
sodipodi:rx="4.5"
sodipodi:ry="2.25"
- d="m 57.5,554 a 4.5,2.25 0 1 1 -9,0 4.5,2.25 0 1 1 9,0 z"
+ d="m 57.5,554 c 0,1.24264 -2.014719,2.25 -4.5,2.25 -2.485281,0 -4.5,-1.00736 -4.5,-2.25 0,-1.24264 2.014719,-2.25 4.5,-2.25 2.485281,0 4.5,1.00736 4.5,2.25 z"
transform="matrix(0.7630859,-0.2494396,0.2996015,0.9926766,-151.92281,17.77746)" />
<path
clip-path="url(#clipPath20586)"
inkscape:transform-center-y="0.3813435"
transform="matrix(0.3848865,-0.1700959,0.2278131,0.3626733,-93.107467,361.59408)"
- d="m 57.5,554 a 4.5,2.25 0 1 1 -9,0 4.5,2.25 0 1 1 9,0 z"
+ d="m 57.5,554 c 0,1.24264 -2.014719,2.25 -4.5,2.25 -2.485281,0 -4.5,-1.00736 -4.5,-2.25 0,-1.24264 2.014719,-2.25 4.5,-2.25 2.485281,0 4.5,1.00736 4.5,2.25 z"
sodipodi:ry="2.25"
sodipodi:rx="4.5"
sodipodi:cy="554"
@@ -54142,7 +54142,7 @@
sodipodi:cy="57.5"
sodipodi:rx="1"
sodipodi:ry="1.0000004"
- d="m 14.5,57.5 a 1,1.0000004 0 1 1 -2,0 1,1.0000004 0 1 1 2,0 z"
+ d="m 14.5,57.5 c 0,0.552285 -0.447715,1 -1,1 -0.552285,0 -1,-0.447715 -1,-1 0,-0.552285 0.447715,-1 1,-1 0.552285,0 1,0.447715 1,1 z"
transform="matrix(3.625,0,0,3.1690202,-67.8125,318.31703)" />
<path
sodipodi:nodetypes="cccc"
@@ -54159,7 +54159,7 @@
sodipodi:cy="57.5"
sodipodi:rx="1"
sodipodi:ry="1"
- d="m 14.5,57.5 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 14.5,57.5 c 0,0.552285 -0.447715,1 -1,1 -0.552285,0 -1,-0.447715 -1,-1 0,-0.552285 0.447715,-1 1,-1 0.552285,0 1,0.447715 1,1 z"
transform="matrix(3.5999897,0,0,3.1249932,-67.499871,320.6879)" />
<path
id="path25721"
@@ -54169,7 +54169,7 @@
inkscape:connector-curvature="0" />
<path
transform="matrix(3.25,0,0,3.25,-62.875,313.125)"
- d="m 14.5,57.5 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 14.5,57.5 c 0,0.552285 -0.447715,1 -1,1 -0.552285,0 -1,-0.447715 -1,-1 0,-0.552285 0.447715,-1 1,-1 0.552285,0 1,0.447715 1,1 z"
sodipodi:ry="1"
sodipodi:rx="1"
sodipodi:cy="57.5"
@@ -54185,11 +54185,11 @@
sodipodi:cy="57.5"
sodipodi:rx="1"
sodipodi:ry="1"
- d="m 14.5,57.5 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 14.5,57.5 c 0,0.552285 -0.447715,1 -1,1 -0.552285,0 -1,-0.447715 -1,-1 0,-0.552285 0.447715,-1 1,-1 0.552285,0 1,0.447715 1,1 z"
transform="matrix(2,0,0,2,-46,385)" />
<path
transform="matrix(4.7519907,0,0,4.1435313,-83.051884,262.12196)"
- d="m 14.5,57.5 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 14.5,57.5 c 0,0.552285 -0.447715,1 -1,1 -0.552285,0 -1,-0.447715 -1,-1 0,-0.552285 0.447715,-1 1,-1 0.552285,0 1,0.447715 1,1 z"
sodipodi:ry="1"
sodipodi:rx="1"
sodipodi:cy="57.5"
@@ -54432,7 +54432,7 @@
sodipodi:nodetypes="ccscz"
inkscape:connector-curvature="0" />
<path
- d="m 434.99991,14.5 a 3.9999149,2.91429 0 1 1 -7.99982,0 3.9999149,2.91429 0 1 1 7.99982,0 z"
+ d="m 434.99991,14.5 c 0,1.609518 -1.79082,2.91429 -3.99991,2.91429 -2.20909,0 -3.99991,-1.304772 -3.99991,-2.91429 0,-1.609518 1.79082,-2.91429 3.99991,-2.91429 2.20909,0 3.99991,1.304772 3.99991,2.91429 z"
sodipodi:ry="2.91429"
sodipodi:rx="3.9999149"
sodipodi:cy="14.5"
@@ -54442,7 +54442,7 @@
sodipodi:type="arc"
transform="matrix(0.7500463,0,0,1.0294111,88.73017,294.07354)" />
<path
- d="m 65,135 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 65,135 c 0,0.55228 -0.447715,1 -1,1 -0.552285,0 -1,-0.44772 -1,-1 0,-0.55228 0.447715,-1 1,-1 0.552285,0 1,0.44772 1,1 z"
sodipodi:ry="1"
sodipodi:rx="1"
sodipodi:cy="135"
@@ -54465,7 +54465,7 @@
id="rect27926"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
<path
- d="m 65,135 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 65,135 c 0,0.55228 -0.447715,1 -1,1 -0.552285,0 -1,-0.44772 -1,-1 0,-0.55228 0.447715,-1 1,-1 0.552285,0 1,0.44772 1,1 z"
sodipodi:ry="1"
sodipodi:rx="1"
sodipodi:cy="135"
@@ -54542,7 +54542,7 @@
sodipodi:cy="14.5"
sodipodi:rx="3.9999149"
sodipodi:ry="2.91429"
- d="m 434.99991,14.5 a 3.9999149,2.91429 0 1 1 -7.99982,0 3.9999149,2.91429 0 1 1 7.99982,0 z" />
+ d="m 434.99991,14.5 c 0,1.609518 -1.79082,2.91429 -3.99991,2.91429 -2.20909,0 -3.99991,-1.304772 -3.99991,-2.91429 0,-1.609518 1.79082,-2.91429 3.99991,-2.91429 2.20909,0 3.99991,1.304772 3.99991,2.91429 z" />
<path
transform="matrix(2.249956,0,0,2.251405,267.75278,4.81032)"
sodipodi:type="arc"
@@ -54552,7 +54552,7 @@
sodipodi:cy="135"
sodipodi:rx="1"
sodipodi:ry="1"
- d="m 65,135 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z" />
+ d="m 65,135 c 0,0.55228 -0.447715,1 -1,1 -0.552285,0 -1,-0.44772 -1,-1 0,-0.55228 0.447715,-1 1,-1 0.552285,0 1,0.44772 1,1 z" />
<path
id="path27428"
d="m 412,306.5 c -3.5,0 -5,1.5 -6.5,3 1.5,1.5 2.75,4 6.5,4 3.75,0 5,-2.5 6.5,-4 -1.5,-1.5 -3,-3 -6.5,-3 z"
@@ -54575,7 +54575,7 @@
sodipodi:cy="135"
sodipodi:rx="1"
sodipodi:ry="1"
- d="m 65,135 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z" />
+ d="m 65,135 c 0,0.55228 -0.447715,1 -1,1 -0.552285,0 -1,-0.44772 -1,-1 0,-0.55228 0.447715,-1 1,-1 0.552285,0 1,0.44772 1,1 z" />
</g>
</g>
<g
@@ -54744,7 +54744,7 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(0.9552133,0,0,0.9315985,-40.901258,-140.2522)" />
<path
transform="matrix(0.99567,0,-0.00787885,1,-30.663533,191)"
@@ -54755,7 +54755,7 @@
sodipodi:cy="135"
sodipodi:rx="1"
sodipodi:ry="1"
- d="m 65,135 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 65,135 c 0,0.55228 -0.447715,1 -1,1 -0.552285,0 -1,-0.44772 -1,-1 0,-0.55228 0.447715,-1 1,-1 0.552285,0 1,0.44772 1,1 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -54840,7 +54840,7 @@
id="g28085">
<path
transform="matrix(1.1162596,0,0,1.1065394,67.801614,-350.49863)"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
sodipodi:ry="2.5"
sodipodi:rx="2.5312502"
sodipodi:cy="502"
@@ -54856,7 +54856,7 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(-1.3568764,-0.3150232,0.3151738,-1.348049,102.81491,906.57916)" />
</g>
<path
@@ -54879,7 +54879,7 @@
sodipodi:cy="425"
sodipodi:rx="1.5"
sodipodi:ry="1"
- d="m 880,425 a 1.5,1 0 1 1 -3,0 1.5,1 0 1 1 3,0 z"
+ d="m 880,425 c 0,0.55228 -0.67157,1 -1.5,1 -0.82843,0 -1.5,-0.44772 -1.5,-1 0,-0.55228 0.67157,-1 1.5,-1 0.82843,0 1.5,0.44772 1.5,1 z"
transform="matrix(0.6434675,-0.7329672,0.7942866,0.5945179,-26.858149,815.24158)" />
<path
inkscape:transform-center-y="-7.1785015"
@@ -54891,7 +54891,7 @@
sodipodi:cy="78.5"
sodipodi:rx="3.5"
sodipodi:ry="3.5"
- d="m 262,78.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 262,78.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
transform="matrix(-1.2857095,0,0,1.2857143,1210.8559,325.57143)"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
@@ -55099,7 +55099,7 @@
sodipodi:cy="78.5"
sodipodi:rx="3.5"
sodipodi:ry="3.5"
- d="m 262,78.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 262,78.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
transform="matrix(-1.4627004,0,0,1.4628053,551.73128,85.525552)"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
@@ -55145,7 +55145,7 @@
sodipodi:cy="78.5"
sodipodi:rx="3.5"
sodipodi:ry="3.5"
- d="m 262,78.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 262,78.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
transform="matrix(-1.2468441,0,0,1.246865,503.16273,106.89331)" />
</g>
<path
@@ -55171,7 +55171,7 @@
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
transform="matrix(-1.4627004,0,0,1.4628053,551.73128,85.525552)"
- d="m 262,78.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 262,78.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
sodipodi:ry="3.5"
sodipodi:rx="3.5"
sodipodi:cy="78.5"
@@ -55193,11 +55193,11 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(1.1162596,0,0,1.1065394,80.948334,-350.49863)" />
<path
transform="matrix(-1.087144,-0.2518404,0.2525206,-1.0776772,126.97246,766.619)"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
sodipodi:ry="2.5"
sodipodi:rx="2.5312502"
sodipodi:cy="502"
@@ -55207,7 +55207,7 @@
sodipodi:type="arc" />
</g>
<path
- d="m 65,135 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 65,135 c 0,0.55228 -0.447715,1 -1,1 -0.552285,0 -1,-0.44772 -1,-1 0,-0.55228 0.447715,-1 1,-1 0.552285,0 1,0.44772 1,1 z"
sodipodi:ry="1"
sodipodi:rx="1"
sodipodi:cy="135"
@@ -55251,7 +55251,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -55266,7 +55266,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -55423,13 +55423,13 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
transform="matrix(0.787566,0,0,0.779223,26.709197,21.3179)" />
<path
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -55453,7 +55453,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z" />
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z" />
<path
sodipodi:nodetypes="cc"
id="path27757"
@@ -55471,7 +55471,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -55481,7 +55481,7 @@
sodipodi:type="arc"
transform="matrix(0.6657538,0,0,0.6588051,42.794535,35.527157)" />
<path
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -56048,7 +56048,7 @@
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
transform="matrix(1.176776,0,0,1.176776,-12.47787,-2.548088)"
- d="m 72,14.5 a 1.5,1.5 0 1 1 -3,0 1.5,1.5 0 1 1 3,0 z"
+ d="M 72,14.5 C 72,15.328427 71.328427,16 70.5,16 69.671573,16 69,15.328427 69,14.5 69,13.671573 69.671573,13 70.5,13 c 0.828427,0 1.5,0.671573 1.5,1.5 z"
sodipodi:ry="1.5"
sodipodi:rx="1.5"
sodipodi:cy="14.5"
@@ -56637,7 +56637,7 @@
inkscape:connector-curvature="0" />
<path
transform="matrix(0.8490785,0,0,0.8469086,71.921104,-98.093334)"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
sodipodi:ry="2.5"
sodipodi:rx="2.5312502"
sodipodi:cy="502"
@@ -56649,7 +56649,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- d="m 65,135 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 65,135 c 0,0.55228 -0.447715,1 -1,1 -0.552285,0 -1,-0.44772 -1,-1 0,-0.55228 0.447715,-1 1,-1 0.552285,0 1,0.44772 1,1 z"
sodipodi:ry="1"
sodipodi:rx="1"
sodipodi:cy="135"
@@ -56787,7 +56787,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -56804,7 +56804,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -56818,7 +56818,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -57088,7 +57088,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -57105,7 +57105,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -57119,7 +57119,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -57323,13 +57323,13 @@
sodipodi:cy="78.5"
sodipodi:rx="3.5"
sodipodi:ry="3.5"
- d="m 262,78.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 262,78.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
transform="matrix(-1.14287,0,0,1.142863,463.9317,115.80133)" />
<g
id="g36232">
<path
transform="matrix(1.1162596,0,0,1.1065394,80.948334,-350.49863)"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
sodipodi:ry="2.5"
sodipodi:rx="2.5312502"
sodipodi:cy="502"
@@ -57345,13 +57345,13 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(-1.087144,-0.2518404,0.2525206,-1.0776772,126.97246,766.619)" />
</g>
<path
inkscape:transform-center-y="-5.7593212"
inkscape:transform-center-x="-3.1120555"
- d="m 65,135 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 65,135 c 0,0.55228 -0.447715,1 -1,1 -0.552285,0 -1,-0.44772 -1,-1 0,-0.55228 0.447715,-1 1,-1 0.552285,0 1,0.44772 1,1 z"
sodipodi:ry="1"
sodipodi:rx="1"
sodipodi:cy="135"
@@ -57495,7 +57495,7 @@
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
transform="matrix(-1.4627004,0,0,1.4628053,551.73128,85.525552)"
- d="m 262,78.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 262,78.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
sodipodi:ry="3.5"
sodipodi:rx="3.5"
sodipodi:cy="78.5"
@@ -57540,7 +57540,7 @@
id="g36286">
<path
transform="matrix(-1.2468441,0,0,1.246865,503.16273,106.89331)"
- d="m 262,78.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 262,78.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
sodipodi:ry="3.5"
sodipodi:rx="3.5"
sodipodi:cy="78.5"
@@ -57577,7 +57577,7 @@
sodipodi:cy="78.5"
sodipodi:rx="3.5"
sodipodi:ry="3.5"
- d="m 262,78.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 262,78.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
transform="matrix(-1.4627004,0,0,1.4628053,551.73128,85.525552)"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
@@ -57588,7 +57588,7 @@
id="g36296">
<path
transform="matrix(1.1162596,0,0,1.1065394,80.948334,-350.49863)"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
sodipodi:ry="2.5"
sodipodi:rx="2.5312502"
sodipodi:cy="502"
@@ -57604,7 +57604,7 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(-1.087144,-0.2518404,0.2525206,-1.0776772,126.97246,766.619)" />
</g>
<path
@@ -57616,7 +57616,7 @@
sodipodi:cy="135"
sodipodi:rx="1"
sodipodi:ry="1"
- d="m 65,135 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z" />
+ d="m 65,135 c 0,0.55228 -0.447715,1 -1,1 -0.552285,0 -1,-0.44772 -1,-1 0,-0.55228 0.447715,-1 1,-1 0.552285,0 1,0.44772 1,1 z" />
</g>
</g>
</g>
@@ -57634,7 +57634,7 @@
sodipodi:cy="78.5"
sodipodi:rx="3.5"
sodipodi:ry="3.5"
- d="m 262,78.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 262,78.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
transform="matrix(-1.5000024,0,0,1.4990511,528.75064,424.32781)"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
@@ -57668,7 +57668,7 @@
sodipodi:cy="78.5"
sodipodi:rx="3.5"
sodipodi:ry="3.5"
- d="m 262,78.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 262,78.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
transform="matrix(-1.5714299,0,0,1.5714268,505.21462,331.643)"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
@@ -57707,13 +57707,13 @@
sodipodi:cy="78.5"
sodipodi:rx="3.5"
sodipodi:ry="3.5"
- d="m 262,78.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 262,78.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
transform="matrix(-1.14287,0,0,1.142863,463.9317,115.7853)" />
<g
id="g36324">
<path
transform="matrix(1.1162596,0,0,1.1065394,80.948334,-350.49863)"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
sodipodi:ry="2.5"
sodipodi:rx="2.5312502"
sodipodi:cy="502"
@@ -57729,13 +57729,13 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(-1.087144,-0.2518404,0.2525206,-1.0776772,126.97246,766.619)" />
</g>
<path
inkscape:transform-center-y="-5.7593212"
inkscape:transform-center-x="-3.1120555"
- d="m 65,135 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 65,135 c 0,0.55228 -0.447715,1 -1,1 -0.552285,0 -1,-0.44772 -1,-1 0,-0.55228 0.447715,-1 1,-1 0.552285,0 1,0.44772 1,1 z"
sodipodi:ry="1"
sodipodi:rx="1"
sodipodi:cy="135"
@@ -57796,7 +57796,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 z"
+ d="m 132,110 c 2.85812,0 5.49914,1.52479 6.9282,4 L 132,118 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -57814,7 +57814,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 z"
+ d="m 132,110 c 2.85812,0 5.49914,1.52479 6.9282,4 L 132,118 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -57830,7 +57830,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 z"
+ d="m 132,110 c 2.85812,0 5.49914,1.52479 6.9282,4 L 132,118 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -57848,7 +57848,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 z"
+ d="m 132,110 c 2.85812,0 5.49914,1.52479 6.9282,4 L 132,118 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -57863,7 +57863,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 z"
+ d="m 132,110 c 2.85812,0 5.49914,1.52479 6.9282,4 L 132,118 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -57882,7 +57882,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 z"
+ d="m 132,110 c 2.85812,0 5.49914,1.52479 6.9282,4 L 132,118 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -57899,7 +57899,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -57908,7 +57908,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -57920,7 +57920,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -57964,7 +57964,7 @@
sodipodi:cy="78.5"
sodipodi:rx="3.5"
sodipodi:ry="3.5"
- d="m 262,78.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 262,78.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
transform="matrix(-1.5714299,0,0,1.5714268,505.21462,331.643)"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
@@ -58003,13 +58003,13 @@
sodipodi:cy="78.5"
sodipodi:rx="3.5"
sodipodi:ry="3.5"
- d="m 262,78.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 262,78.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
transform="matrix(-1.14287,0,0,1.142863,463.9317,115.7853)" />
<g
id="g36385">
<path
transform="matrix(1.1162596,0,0,1.1065394,80.948334,-350.49863)"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
sodipodi:ry="2.5"
sodipodi:rx="2.5312502"
sodipodi:cy="502"
@@ -58025,13 +58025,13 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(-1.087144,-0.2518404,0.2525206,-1.0776772,126.97246,766.619)" />
</g>
<path
inkscape:transform-center-y="-5.7593212"
inkscape:transform-center-x="-3.1120555"
- d="m 65,135 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 65,135 c 0,0.55228 -0.447715,1 -1,1 -0.552285,0 -1,-0.44772 -1,-1 0,-0.55228 0.447715,-1 1,-1 0.552285,0 1,0.44772 1,1 z"
sodipodi:ry="1"
sodipodi:rx="1"
sodipodi:cy="135"
@@ -58070,7 +58070,7 @@
sodipodi:cy="78.5"
sodipodi:rx="3.5"
sodipodi:ry="3.5"
- d="m 262,78.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 262,78.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
transform="matrix(-1.5002341,0,0,1.5000004,486.81053,424.24997)"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
@@ -58111,7 +58111,7 @@
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
transform="matrix(-1.5000024,0,0,1.4990511,507.75064,424.32781)"
- d="m 262,78.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 262,78.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
sodipodi:ry="3.5"
sodipodi:rx="3.5"
sodipodi:cy="78.5"
@@ -58145,7 +58145,7 @@
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
transform="matrix(-1.5714299,0,0,1.5714268,505.21462,331.643)"
- d="m 262,78.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 262,78.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
sodipodi:ry="3.5"
sodipodi:rx="3.5"
sodipodi:cy="78.5"
@@ -58181,7 +58181,7 @@
id="g36423">
<path
transform="matrix(-1.14287,0,0,1.142863,463.9317,115.7853)"
- d="m 262,78.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 262,78.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
sodipodi:ry="3.5"
sodipodi:rx="3.5"
sodipodi:cy="78.5"
@@ -58201,11 +58201,11 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(1.1162596,0,0,1.1065394,80.948334,-350.49863)" />
<path
transform="matrix(-1.087144,-0.2518404,0.2525206,-1.0776772,126.97246,766.619)"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
sodipodi:ry="2.5"
sodipodi:rx="2.5312502"
sodipodi:cy="502"
@@ -58223,7 +58223,7 @@
sodipodi:cy="135"
sodipodi:rx="1"
sodipodi:ry="1"
- d="m 65,135 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 65,135 c 0,0.55228 -0.447715,1 -1,1 -0.552285,0 -1,-0.44772 -1,-1 0,-0.55228 0.447715,-1 1,-1 0.552285,0 1,0.44772 1,1 z"
inkscape:transform-center-x="-3.1120555"
inkscape:transform-center-y="-5.7593212" />
</g>
@@ -58306,7 +58306,7 @@
style="display:inline">
<path
transform="matrix(1.142871,0,0,1.142855,-27.218817,-5.0713453)"
- d="m 334,35.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 334,35.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
sodipodi:ry="3.5"
sodipodi:rx="3.5"
sodipodi:cy="35.5"
@@ -58322,7 +58322,7 @@
sodipodi:cy="35.5"
sodipodi:rx="3.5"
sodipodi:ry="3.5"
- d="m 334,35.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ d="m 334,35.5 c 0,1.932997 -1.567,3.5 -3.5,3.5 -1.933,0 -3.5,-1.567003 -3.5,-3.5 0,-1.932997 1.567,-3.5 3.5,-3.5 1.933,0 3.5,1.567003 3.5,3.5 z"
transform="matrix(0.857099,0,0,0.857147,67.228993,5.071249)" />
</g>
<g
@@ -58546,7 +58546,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -58554,7 +58554,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -58573,7 +58573,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -58591,7 +58591,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -59260,7 +59260,7 @@
id="g36930">
<path
transform="matrix(0.7834486,0,0,0.2000006,10.413535,395.5997)"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
sodipodi:ry="2.5"
sodipodi:rx="2.5312502"
sodipodi:cy="502"
@@ -59318,11 +59318,11 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(1.187982,0,0,1.0569758,379.83032,-513.21497)" />
<path
transform="matrix(1.3827154,0,0,1.4028327,364.1482,-688.72206)"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
sodipodi:ry="2.5"
sodipodi:rx="2.5312502"
sodipodi:cy="502"
@@ -59338,11 +59338,11 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(0.987526,0,0,0.8124641,394.9733,-392.80617)" />
<path
transform="matrix(0.9848328,0,0,0.9992585,395.19018,-485.12778)"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
sodipodi:ry="2.5"
sodipodi:rx="2.5312502"
sodipodi:cy="502"
@@ -59358,7 +59358,7 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(0.591154,0,0,0.5887513,425.87219,-279.05319)" />
<path
sodipodi:type="arc"
@@ -59368,11 +59368,11 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(0.9913883,0,0,1.0058976,394.67318,-488.46061)" />
<path
transform="matrix(0.6941559,0,0,0.6920597,417.67198,-331.15708)"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
sodipodi:ry="2.5"
sodipodi:rx="2.5312502"
sodipodi:cy="502"
@@ -59388,7 +59388,7 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(0.1975308,0,0,0.1999991,456.0926,-84.399595)" />
<path
sodipodi:type="arc"
@@ -59398,7 +59398,7 @@
sodipodi:cy="502"
sodipodi:rx="2.5312502"
sodipodi:ry="2.5"
- d="m 80.53125,502 a 2.5312502,2.5 0 1 1 -5.0625,0 2.5312502,2.5 0 1 1 5.0625,0 z"
+ d="m 80.53125,502 c 0,1.38071 -1.133279,2.5 -2.53125,2.5 -1.397971,0 -2.53125,-1.11929 -2.53125,-2.5 0,-1.38071 1.133279,-2.5 2.53125,-2.5 1.397971,0 2.53125,1.11929 2.53125,2.5 z"
transform="matrix(-0.6760501,-0.1575078,0.1570322,-0.6740085,446.07727,367.34791)" />
</g>
<path
@@ -59807,7 +59807,7 @@
sodipodi:cy="330.5"
sodipodi:rx="2"
sodipodi:ry="2"
- d="m 266.5,330.5 a 2,2 0 1 1 -4,0 2,2 0 1 1 4,0 z" />
+ d="m 266.5,330.5 c 0,1.10457 -0.89543,2 -2,2 -1.10457,0 -2,-0.89543 -2,-2 0,-1.10457 0.89543,-2 2,-2 1.10457,0 2,0.89543 2,2 z" />
</g>
<path
style="fill:none;stroke:#ffffff;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
@@ -59858,7 +59858,7 @@
style="fill:none;stroke:#ffffff;stroke-width:1.20000005;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
inkscape:connector-curvature="0" />
<path
- d="m 266.5,330.5 a 2,2 0 1 1 -4,0 2,2 0 1 1 4,0 z"
+ d="m 266.5,330.5 c 0,1.10457 -0.89543,2 -2,2 -1.10457,0 -2,-0.89543 -2,-2 0,-1.10457 0.89543,-2 2,-2 1.10457,0 2,0.89543 2,2 z"
sodipodi:ry="2"
sodipodi:rx="2"
sodipodi:cy="330.5"
@@ -60006,12 +60006,12 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z" />
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z" />
<path
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -60028,7 +60028,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -60050,7 +60050,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -60067,7 +60067,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -60324,7 +60324,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 z"
+ d="m 132,110 c 2.85812,0 5.49914,1.52479 6.9282,4 L 132,118 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -60340,7 +60340,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 z"
+ d="m 132,110 c 2.85812,0 5.49914,1.52479 6.9282,4 L 132,118 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -60358,7 +60358,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 z"
+ d="m 132,110 c 2.85812,0 5.49914,1.52479 6.9282,4 L 132,118 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -60374,7 +60374,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 z"
+ d="m 132,110 c 2.85812,0 5.49914,1.52479 6.9282,4 L 132,118 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -60392,7 +60392,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 z"
+ d="m 132,110 c 2.85812,0 5.49914,1.52479 6.9282,4 L 132,118 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -60406,7 +60406,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 z"
+ d="m 132,110 c 2.85812,0 5.49914,1.52479 6.9282,4 L 132,118 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -60421,7 +60421,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -60439,7 +60439,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -60562,7 +60562,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -60571,7 +60571,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -60588,7 +60588,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -60710,7 +60710,7 @@
style="fill:#f9f9f9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.69999999;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
<path
transform="translate(0.5,-0.46875)"
- d="m 134,-23 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 134,-23 c 0,0.552285 -0.44772,1 -1,1 -0.55228,0 -1,-0.447715 -1,-1 0,-0.552285 0.44772,-1 1,-1 0.55228,0 1,0.447715 1,1 z"
sodipodi:ry="1"
sodipodi:rx="1"
sodipodi:cy="-23"
@@ -60726,7 +60726,7 @@
sodipodi:cy="-23"
sodipodi:rx="1"
sodipodi:ry="1"
- d="m 134,-23 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 134,-23 c 0,0.552285 -0.44772,1 -1,1 -0.55228,0 -1,-0.447715 -1,-1 0,-0.552285 0.44772,-1 1,-1 0.55228,0 1,0.447715 1,1 z"
transform="matrix(1.2143583,0,0,1.1512108,-28.054112,2.9290602)" />
<path
sodipodi:type="arc"
@@ -60736,7 +60736,7 @@
sodipodi:cy="-23"
sodipodi:rx="1"
sodipodi:ry="1"
- d="m 134,-23 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 134,-23 c 0,0.552285 -0.44772,1 -1,1 -0.55228,0 -1,-0.447715 -1,-1 0,-0.552285 0.44772,-1 1,-1 0.55228,0 1,0.447715 1,1 z"
transform="matrix(0.8392157,0,0,0.8382979,21.884318,-4.2140957)" />
<rect
style="opacity:0.5;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.69999999;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
@@ -60753,7 +60753,7 @@
inkscape:connector-curvature="0" />
<path
transform="matrix(1.2116904,0,0,1.1282344,-22.693138,2.3776257)"
- d="m 134,-23 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 134,-23 c 0,0.552285 -0.44772,1 -1,1 -0.55228,0 -1,-0.447715 -1,-1 0,-0.552285 0.44772,-1 1,-1 0.55228,0 1,0.447715 1,1 z"
sodipodi:ry="1"
sodipodi:rx="1"
sodipodi:cy="-23"
@@ -60763,7 +60763,7 @@
sodipodi:type="arc" />
<path
transform="matrix(0.8392157,0,0,0.8382979,26.893134,-4.2140957)"
- d="m 134,-23 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 134,-23 c 0,0.552285 -0.44772,1 -1,1 -0.55228,0 -1,-0.447715 -1,-1 0,-0.552285 0.44772,-1 1,-1 0.55228,0 1,0.447715 1,1 z"
sodipodi:ry="1"
sodipodi:rx="1"
sodipodi:cy="-23"
@@ -61013,7 +61013,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -61030,7 +61030,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -61044,7 +61044,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -61052,7 +61052,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -61147,7 +61147,7 @@
sodipodi:cy="40.5"
sodipodi:rx="6.5"
sodipodi:ry="2.5"
- d="m -213.5,40.5 a 6.5,2.5 0 1 1 -13,0 6.5,2.5 0 1 1 13,0 z"
+ d="m -213.5,40.5 c 0,1.380712 -2.91015,2.5 -6.5,2.5 -3.58985,0 -6.5,-1.119288 -6.5,-2.5 0,-1.380712 2.91015,-2.5 6.5,-2.5 3.58985,0 6.5,1.119288 6.5,2.5 z"
transform="matrix(0.9999986,0,0,1.799999,-2.971883e-4,111.10004)" />
</g>
<g
@@ -61557,7 +61557,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -61565,7 +61565,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -61646,7 +61646,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -61663,7 +61663,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -61677,7 +61677,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -61685,7 +61685,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -61771,7 +61771,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -61779,7 +61779,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -62358,7 +62358,7 @@
inkscape:connector-curvature="0" />
<path
transform="matrix(0.9999986,0,0,1.799999,-2.971883e-4,111.10004)"
- d="m -213.5,40.5 a 6.5,2.5 0 1 1 -13,0 6.5,2.5 0 1 1 13,0 z"
+ d="m -213.5,40.5 c 0,1.380712 -2.91015,2.5 -6.5,2.5 -3.58985,0 -6.5,-1.119288 -6.5,-2.5 0,-1.380712 2.91015,-2.5 6.5,-2.5 3.58985,0 6.5,1.119288 6.5,2.5 z"
sodipodi:ry="2.5"
sodipodi:rx="6.5"
sodipodi:cy="40.5"
@@ -62441,7 +62441,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -62458,7 +62458,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -62472,7 +62472,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -62605,7 +62605,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -62613,7 +62613,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -62631,7 +62631,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -62644,7 +62644,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -62704,7 +62704,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -62722,7 +62722,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -62730,7 +62730,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -62743,7 +62743,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -62810,7 +62810,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -62818,7 +62818,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -62836,7 +62836,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -62849,7 +62849,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -62901,7 +62901,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -62909,7 +62909,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -62927,7 +62927,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -62940,7 +62940,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -62957,7 +62957,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -62974,7 +62974,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -62988,7 +62988,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -63011,7 +63011,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -63019,7 +63019,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -63037,7 +63037,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -63050,7 +63050,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -63260,7 +63260,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -63268,7 +63268,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -63286,7 +63286,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -63334,7 +63334,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -63352,7 +63352,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -63360,7 +63360,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -63382,7 +63382,7 @@
sodipodi:cy="292.5"
sodipodi:rx="4"
sodipodi:ry="4"
- d="m 223.5,292.5 a 4,4 0 1 1 -8,0 4,4 0 1 1 8,0 z"
+ d="m 223.5,292.5 c 0,2.20914 -1.79086,4 -4,4 -2.20914,0 -4,-1.79086 -4,-4 0,-2.20914 1.79086,-4 4,-4 2.20914,0 4,1.79086 4,4 z"
transform="translate(20,0)" />
<path
sodipodi:type="arc"
@@ -63392,11 +63392,11 @@
sodipodi:cy="292.5"
sodipodi:rx="4"
sodipodi:ry="4"
- d="m 223.5,292.5 a 4,4 0 1 1 -8,0 4,4 0 1 1 8,0 z"
+ d="m 223.5,292.5 c 0,2.20914 -1.79086,4 -4,4 -2.20914,0 -4,-1.79086 -4,-4 0,-2.20914 1.79086,-4 4,-4 2.20914,0 4,1.79086 4,4 z"
transform="matrix(0.875,0,0,0.875,47.4375,36.5625)" />
<path
transform="matrix(0.7060003,0,0,0.7060647,84.532933,85.976064)"
- d="m 223.5,292.5 a 4,4 0 1 1 -8,0 4,4 0 1 1 8,0 z"
+ d="m 223.5,292.5 c 0,2.20914 -1.79086,4 -4,4 -2.20914,0 -4,-1.79086 -4,-4 0,-2.20914 1.79086,-4 4,-4 2.20914,0 4,1.79086 4,4 z"
sodipodi:ry="4"
sodipodi:rx="4"
sodipodi:cy="292.5"
@@ -63406,7 +63406,7 @@
sodipodi:type="arc" />
<path
transform="matrix(0.875,0,0,0.875,47.4375,36.5625)"
- d="m 223.5,292.5 a 4,4 0 1 1 -8,0 4,4 0 1 1 8,0 z"
+ d="m 223.5,292.5 c 0,2.20914 -1.79086,4 -4,4 -2.20914,0 -4,-1.79086 -4,-4 0,-2.20914 1.79086,-4 4,-4 2.20914,0 4,1.79086 4,4 z"
sodipodi:ry="4"
sodipodi:rx="4"
sodipodi:cy="292.5"
@@ -63435,7 +63435,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -63453,7 +63453,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -63461,7 +63461,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -63519,7 +63519,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -63527,7 +63527,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -63545,7 +63545,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -63556,7 +63556,7 @@
style="opacity:0.9;display:inline;enable-background:new">
<path
transform="translate(20,0)"
- d="m 223.5,292.5 a 4,4 0 1 1 -8,0 4,4 0 1 1 8,0 z"
+ d="m 223.5,292.5 c 0,2.20914 -1.79086,4 -4,4 -2.20914,0 -4,-1.79086 -4,-4 0,-2.20914 1.79086,-4 4,-4 2.20914,0 4,1.79086 4,4 z"
sodipodi:ry="4"
sodipodi:rx="4"
sodipodi:cy="292.5"
@@ -63566,7 +63566,7 @@
sodipodi:type="arc" />
<path
transform="matrix(0.875,0,0,0.875,47.4375,36.5625)"
- d="m 223.5,292.5 a 4,4 0 1 1 -8,0 4,4 0 1 1 8,0 z"
+ d="m 223.5,292.5 c 0,2.20914 -1.79086,4 -4,4 -2.20914,0 -4,-1.79086 -4,-4 0,-2.20914 1.79086,-4 4,-4 2.20914,0 4,1.79086 4,4 z"
sodipodi:ry="4"
sodipodi:rx="4"
sodipodi:cy="292.5"
@@ -63582,7 +63582,7 @@
sodipodi:cy="292.5"
sodipodi:rx="4"
sodipodi:ry="4"
- d="m 223.5,292.5 a 4,4 0 1 1 -8,0 4,4 0 1 1 8,0 z"
+ d="m 223.5,292.5 c 0,2.20914 -1.79086,4 -4,4 -2.20914,0 -4,-1.79086 -4,-4 0,-2.20914 1.79086,-4 4,-4 2.20914,0 4,1.79086 4,4 z"
transform="matrix(0.7060003,0,0,0.7060647,84.532933,85.976064)" />
<path
sodipodi:type="arc"
@@ -63592,7 +63592,7 @@
sodipodi:cy="292.5"
sodipodi:rx="4"
sodipodi:ry="4"
- d="m 223.5,292.5 a 4,4 0 1 1 -8,0 4,4 0 1 1 8,0 z"
+ d="m 223.5,292.5 c 0,2.20914 -1.79086,4 -4,4 -2.20914,0 -4,-1.79086 -4,-4 0,-2.20914 1.79086,-4 4,-4 2.20914,0 4,1.79086 4,4 z"
transform="matrix(0.875,0,0,0.875,47.4375,36.5625)" />
</g>
</g>
@@ -63616,11 +63616,11 @@
sodipodi:cy="192.5"
sodipodi:rx="1.75"
sodipodi:ry="1.75"
- d="m 466.25,192.5 a 1.75,1.75 0 1 1 -3.5,0 1.75,1.75 0 1 1 3.5,0 z"
+ d="m 466.25,192.5 c 0,0.9665 -0.7835,1.75 -1.75,1.75 -0.9665,0 -1.75,-0.7835 -1.75,-1.75 0,-0.9665 0.7835,-1.75 1.75,-1.75 0.9665,0 1.75,0.7835 1.75,1.75 z"
transform="matrix(1.7142856,0,0,1.7142871,-330.83199,-136.46043)" />
<path
transform="matrix(1.4285718,0,0,1.4285718,-198.61789,-81.960223)"
- d="m 466.25,192.5 a 1.75,1.75 0 1 1 -3.5,0 1.75,1.75 0 1 1 3.5,0 z"
+ d="m 466.25,192.5 c 0,0.9665 -0.7835,1.75 -1.75,1.75 -0.9665,0 -1.75,-0.7835 -1.75,-1.75 0,-0.9665 0.7835,-1.75 1.75,-1.75 0.9665,0 1.75,0.7835 1.75,1.75 z"
sodipodi:ry="1.75"
sodipodi:rx="1.75"
sodipodi:cy="192.5"
@@ -63636,7 +63636,7 @@
sodipodi:cy="192.5"
sodipodi:rx="1.75"
sodipodi:ry="1.75"
- d="m 466.25,192.5 a 1.75,1.75 0 1 1 -3.5,0 1.75,1.75 0 1 1 3.5,0 z"
+ d="m 466.25,192.5 c 0,0.9665 -0.7835,1.75 -1.75,1.75 -0.9665,0 -1.75,-0.7835 -1.75,-1.75 0,-0.9665 0.7835,-1.75 1.75,-1.75 0.9665,0 1.75,0.7835 1.75,1.75 z"
transform="matrix(0.8571429,0,0,0.8571429,66.810813,28.039828)" />
</g>
<rect
@@ -63660,7 +63660,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -63678,7 +63678,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -63691,7 +63691,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -63699,7 +63699,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -63739,7 +63739,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -63748,7 +63748,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -63760,7 +63760,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -63953,7 +63953,7 @@
sodipodi:cy="14.5"
sodipodi:rx="1.5"
sodipodi:ry="1.5"
- d="m 72,14.5 a 1.5,1.5 0 1 1 -3,0 1.5,1.5 0 1 1 3,0 z"
+ d="M 72,14.5 C 72,15.328427 71.328427,16 70.5,16 69.671573,16 69,15.328427 69,14.5 69,13.671573 69.671573,13 70.5,13 c 0.828427,0 1.5,0.671573 1.5,1.5 z"
transform="matrix(1.3333333,0,0,1.3333343,3,147.66665)"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
@@ -63967,7 +63967,7 @@
sodipodi:cy="14.5"
sodipodi:rx="1.5"
sodipodi:ry="1.5"
- d="m 72,14.5 a 1.5,1.5 0 1 1 -3,0 1.5,1.5 0 1 1 3,0 z"
+ d="M 72,14.5 C 72,15.328427 71.328427,16 70.5,16 69.671573,16 69,15.328427 69,14.5 69,13.671573 69.671573,13 70.5,13 c 0.828427,0 1.5,0.671573 1.5,1.5 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -64060,14 +64060,14 @@
sodipodi:cy="35"
sodipodi:rx="1.2111344"
sodipodi:ry="4.9951267"
- d="m 182.21113,35 a 1.2111344,4.9951267 0 1 1 0,-0.01066"
+ d="m 182.21113,35 c 0,2.758732 -0.54224,4.995127 -1.21113,4.995127 -0.66889,0 -1.21113,-2.236395 -1.21113,-4.995127 0,-2.758732 0.54224,-4.995127 1.21113,-4.995127 0.66788,0 1.20971,2.229902 1.21113,4.984465"
transform="matrix(1.2491741,-1.2491602,0.7680871,0.768079,-75.108556,239.34027)"
sodipodi:start="0"
sodipodi:end="6.2810509"
sodipodi:open="true" />
<path
transform="matrix(0.9589476,-0.9192618,0.5776079,0.5780619,-15.42366,185.77921)"
- d="m 182.17638,35 a 1.1763829,5.5293522 0 1 1 -2.35276,0 1.1763829,5.5293522 0 1 1 2.35276,0 z"
+ d="m 182.17638,35 c 0,3.053777 -0.52668,5.529352 -1.17638,5.529352 -0.6497,0 -1.17638,-2.475575 -1.17638,-5.529352 0,-3.053777 0.52668,-5.529352 1.17638,-5.529352 0.6497,0 1.17638,2.475575 1.17638,5.529352 z"
sodipodi:ry="5.5293522"
sodipodi:rx="1.1763829"
sodipodi:cy="35"
@@ -64415,7 +64415,7 @@
transform="translate(-340.00002,-121.00001)">
<path
transform="matrix(1.9999998,0,0,2.0000014,-462.99991,-192.00026)"
- d="m 466.25,192.5 a 1.75,1.75 0 1 1 -3.5,0 1.75,1.75 0 1 1 3.5,0 z"
+ d="m 466.25,192.5 c 0,0.9665 -0.7835,1.75 -1.75,1.75 -0.9665,0 -1.75,-0.7835 -1.75,-1.75 0,-0.9665 0.7835,-1.75 1.75,-1.75 0.9665,0 1.75,0.7835 1.75,1.75 z"
sodipodi:ry="1.75"
sodipodi:rx="1.75"
sodipodi:cy="192.5"
@@ -64431,11 +64431,11 @@
sodipodi:cy="192.5"
sodipodi:rx="1.75"
sodipodi:ry="1.75"
- d="m 466.25,192.5 a 1.75,1.75 0 1 1 -3.5,0 1.75,1.75 0 1 1 3.5,0 z"
+ d="m 466.25,192.5 c 0,0.9665 -0.7835,1.75 -1.75,1.75 -0.9665,0 -1.75,-0.7835 -1.75,-1.75 0,-0.9665 0.7835,-1.75 1.75,-1.75 0.9665,0 1.75,0.7835 1.75,1.75 z"
transform="matrix(2.5714449,0,0,2.5714449,-728.43612,-302.00313)" />
<path
transform="matrix(1.9999748,0,0,1.9999748,-462.98824,-191.99513)"
- d="m 466.25,192.5 a 1.75,1.75 0 1 1 -3.5,0 1.75,1.75 0 1 1 3.5,0 z"
+ d="m 466.25,192.5 c 0,0.9665 -0.7835,1.75 -1.75,1.75 -0.9665,0 -1.75,-0.7835 -1.75,-1.75 0,-0.9665 0.7835,-1.75 1.75,-1.75 0.9665,0 1.75,0.7835 1.75,1.75 z"
sodipodi:ry="1.75"
sodipodi:rx="1.75"
sodipodi:cy="192.5"
@@ -64445,7 +64445,7 @@
sodipodi:type="arc" />
<path
transform="matrix(1.428566,0,0,1.428566,-197.56891,-81.998957)"
- d="m 466.25,192.5 a 1.75,1.75 0 1 1 -3.5,0 1.75,1.75 0 1 1 3.5,0 z"
+ d="m 466.25,192.5 c 0,0.9665 -0.7835,1.75 -1.75,1.75 -0.9665,0 -1.75,-0.7835 -1.75,-1.75 0,-0.9665 0.7835,-1.75 1.75,-1.75 0.9665,0 1.75,0.7835 1.75,1.75 z"
sodipodi:ry="1.75"
sodipodi:rx="1.75"
sodipodi:cy="192.5"
@@ -64490,11 +64490,11 @@
sodipodi:cy="192.5"
sodipodi:rx="1.75"
sodipodi:ry="1.75"
- d="m 466.25,192.5 a 1.75,1.75 0 1 1 -3.5,0 1.75,1.75 0 1 1 3.5,0 z"
+ d="m 466.25,192.5 c 0,0.9665 -0.7835,1.75 -1.75,1.75 -0.9665,0 -1.75,-0.7835 -1.75,-1.75 0,-0.9665 0.7835,-1.75 1.75,-1.75 0.9665,0 1.75,0.7835 1.75,1.75 z"
transform="matrix(1.9999998,0,0,2.0000014,-790.00001,-327.00035)" />
<path
transform="matrix(2.5714622,0,0,2.5714622,-1055.4442,-437.00638)"
- d="m 466.25,192.5 a 1.75,1.75 0 1 1 -3.5,0 1.75,1.75 0 1 1 3.5,0 z"
+ d="m 466.25,192.5 c 0,0.9665 -0.7835,1.75 -1.75,1.75 -0.9665,0 -1.75,-0.7835 -1.75,-1.75 0,-0.9665 0.7835,-1.75 1.75,-1.75 0.9665,0 1.75,0.7835 1.75,1.75 z"
sodipodi:ry="1.75"
sodipodi:rx="1.75"
sodipodi:cy="192.5"
@@ -64504,7 +64504,7 @@
sodipodi:type="arc" />
<path
transform="matrix(2.0000089,0,0,2.0000089,-790.00413,-327.00163)"
- d="m 466.25,192.5 a 1.75,1.75 0 1 1 -3.5,0 1.75,1.75 0 1 1 3.5,0 z"
+ d="m 466.25,192.5 c 0,0.9665 -0.7835,1.75 -1.75,1.75 -0.9665,0 -1.75,-0.7835 -1.75,-1.75 0,-0.9665 0.7835,-1.75 1.75,-1.75 0.9665,0 1.75,0.7835 1.75,1.75 z"
sodipodi:ry="1.75"
sodipodi:rx="1.75"
sodipodi:cy="192.5"
@@ -64563,11 +64563,11 @@
sodipodi:cy="192.5"
sodipodi:rx="1.75"
sodipodi:ry="1.75"
- d="m 466.25,192.5 a 1.75,1.75 0 1 1 -3.5,0 1.75,1.75 0 1 1 3.5,0 z"
+ d="m 466.25,192.5 c 0,0.9665 -0.7835,1.75 -1.75,1.75 -0.9665,0 -1.75,-0.7835 -1.75,-1.75 0,-0.9665 0.7835,-1.75 1.75,-1.75 0.9665,0 1.75,0.7835 1.75,1.75 z"
transform="matrix(2.2376043,0,0,2.2484492,-801.20081,-335.84886)" />
<path
transform="matrix(1.9004611,0,0,1.899214,-644.62036,-268.6269)"
- d="m 466.25,192.5 a 1.75,1.75 0 1 1 -3.5,0 1.75,1.75 0 1 1 3.5,0 z"
+ d="m 466.25,192.5 c 0,0.9665 -0.7835,1.75 -1.75,1.75 -0.9665,0 -1.75,-0.7835 -1.75,-1.75 0,-0.9665 0.7835,-1.75 1.75,-1.75 0.9665,0 1.75,0.7835 1.75,1.75 z"
sodipodi:ry="1.75"
sodipodi:rx="1.75"
sodipodi:cy="192.5"
@@ -64577,7 +64577,7 @@
sodipodi:type="arc" />
<path
transform="matrix(1.5591172,0,0,1.559203,-486.06699,-203.16445)"
- d="m 466.25,192.5 a 1.75,1.75 0 1 1 -3.5,0 1.75,1.75 0 1 1 3.5,0 z"
+ d="m 466.25,192.5 c 0,0.9665 -0.7835,1.75 -1.75,1.75 -0.9665,0 -1.75,-0.7835 -1.75,-1.75 0,-0.9665 0.7835,-1.75 1.75,-1.75 0.9665,0 1.75,0.7835 1.75,1.75 z"
sodipodi:ry="1.75"
sodipodi:rx="1.75"
sodipodi:cy="192.5"
@@ -65493,7 +65493,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -65501,7 +65501,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -65660,7 +65660,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -65673,7 +65673,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -65721,7 +65721,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -65741,9 +65741,9 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z" />
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z" />
<path
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -65777,7 +65777,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -65793,7 +65793,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z" />
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z" />
</g>
</g>
<g
@@ -65899,7 +65899,7 @@
sodipodi:cy="325"
sodipodi:rx="1.5"
sodipodi:ry="1.5"
- d="m 287.5,325 a 1.5,1.5 0 1 1 -3,0 1.5,1.5 0 1 1 3,0 z"
+ d="m 287.5,325 c 0,0.82843 -0.67157,1.5 -1.5,1.5 -0.82843,0 -1.5,-0.67157 -1.5,-1.5 0,-0.82843 0.67157,-1.5 1.5,-1.5 0.82843,0 1.5,0.67157 1.5,1.5 z"
transform="matrix(1.6666708,0,0,1.6666633,-190.66784,-215.66559)" />
<rect
y="328.49997"
@@ -65917,7 +65917,7 @@
y="328.49997" />
<path
transform="matrix(1.333351,0,0,1.333345,-95.338377,-107.33714)"
- d="m 287.5,325 a 1.5,1.5 0 1 1 -3,0 1.5,1.5 0 1 1 3,0 z"
+ d="m 287.5,325 c 0,0.82843 -0.67157,1.5 -1.5,1.5 -0.82843,0 -1.5,-0.67157 -1.5,-1.5 0,-0.82843 0.67157,-1.5 1.5,-1.5 0.82843,0 1.5,0.67157 1.5,1.5 z"
sodipodi:ry="1.5"
sodipodi:rx="1.5"
sodipodi:cy="325"
@@ -66429,7 +66429,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -66451,7 +66451,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -66501,7 +66501,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -66533,7 +66533,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -66883,7 +66883,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -66903,7 +66903,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -66916,7 +66916,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -66930,7 +66930,7 @@
id="g36537">
<path
transform="matrix(1.1428645,0,0,1.1428645,-416.36057,256.4986)"
- d="m 466.25,192.5 a 1.75,1.75 0 1 1 -3.5,0 1.75,1.75 0 1 1 3.5,0 z"
+ d="m 466.25,192.5 c 0,0.9665 -0.7835,1.75 -1.75,1.75 -0.9665,0 -1.75,-0.7835 -1.75,-1.75 0,-0.9665 0.7835,-1.75 1.75,-1.75 0.9665,0 1.75,0.7835 1.75,1.75 z"
sodipodi:ry="1.75"
sodipodi:rx="1.75"
sodipodi:cy="192.5"
@@ -66946,7 +66946,7 @@
sodipodi:cy="192.5"
sodipodi:rx="1.75"
sodipodi:ry="1.75"
- d="m 466.25,192.5 a 1.75,1.75 0 1 1 -3.5,0 1.75,1.75 0 1 1 3.5,0 z"
+ d="m 466.25,192.5 c 0,0.9665 -0.7835,1.75 -1.75,1.75 -0.9665,0 -1.75,-0.7835 -1.75,-1.75 0,-0.9665 0.7835,-1.75 1.75,-1.75 0.9665,0 1.75,0.7835 1.75,1.75 z"
transform="matrix(0.5714297,0,0,0.5714297,-150.92912,366.49979)" />
<rect
y="476"
@@ -66967,7 +66967,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -67247,7 +67247,7 @@
inkscape:connector-curvature="0" />
<path
transform="matrix(0.5714297,0,0,0.5714297,-362.92909,351.49978)"
- d="m 466.25,192.5 a 1.75,1.75 0 1 1 -3.5,0 1.75,1.75 0 1 1 3.5,0 z"
+ d="m 466.25,192.5 c 0,0.9665 -0.7835,1.75 -1.75,1.75 -0.9665,0 -1.75,-0.7835 -1.75,-1.75 0,-0.9665 0.7835,-1.75 1.75,-1.75 0.9665,0 1.75,0.7835 1.75,1.75 z"
sodipodi:ry="1.75"
sodipodi:rx="1.75"
sodipodi:cy="192.5"
@@ -67302,7 +67302,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -67324,7 +67324,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -67332,7 +67332,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -69242,7 +69242,7 @@
</g>
<path
transform="matrix(1.99999,0,0,1.99999,571.48293,-823.49525)"
- d="m -92,477.5 a 0.5,0.5 0 1 1 -1,0 0.5,0.5 0 1 1 1,0 z"
+ d="m -92,477.5 c 0,0.27614 -0.223858,0.5 -0.5,0.5 -0.276142,0 -0.5,-0.22386 -0.5,-0.5 0,-0.27614 0.223858,-0.5 0.5,-0.5 0.276142,0 0.5,0.22386 0.5,0.5 z"
sodipodi:ry="0.5"
sodipodi:rx="0.5"
sodipodi:cy="477.5"
@@ -69271,7 +69271,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -69280,7 +69280,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -69410,7 +69410,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -69427,14 +69427,14 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
transform="matrix(-0.683022,-0.07745026,0.0778507,-0.683064,209.4726,314.325)" />
<path
transform="matrix(0.5705005,0,0,0.5705012,53.193935,156.18087)"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -69488,7 +69488,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -69505,7 +69505,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -69514,7 +69514,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -69547,7 +69547,7 @@
transform="matrix(0.928617,0,0,0.931035,10.2435,15.47372)"
id="g15313">
<path
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -69564,7 +69564,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -69580,7 +69580,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -69589,7 +69589,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -69625,7 +69625,7 @@
x="-24.00001"
y="114" />
<path
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -69654,12 +69654,12 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z" />
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z" />
<path
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -69693,7 +69693,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -69712,7 +69712,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
transform="matrix(0.8125001,0,0,0.8125002,-73.250026,4.1249738)" />
<path
inkscape:export-ydpi="90"
@@ -69725,7 +69725,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="10.07671"
- d="m 140,118 a 8,10.07671 0 0 1 -15.99907,0.15349"
+ d="m 140,118 c 0,5.56521 -3.58172,10.07671 -8,10.07671 -4.37076,0 -7.9325,-4.4185 -7.99907,-9.92322"
sodipodi:start="0"
sodipodi:end="3.12636"
transform="matrix(0.8077059,0,0,-0.2072667,-72.578821,124.6156)"
@@ -69735,7 +69735,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -69752,7 +69752,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 0 1 -15.99907,0.12186"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.37076,0 -7.9325,-3.50789 -7.99907,-7.87814"
sodipodi:start="0"
sodipodi:end="3.12636"
sodipodi:open="true"
@@ -69770,7 +69770,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
transform="matrix(0.6875009,0,0,0.687501,-56.75013,18.874887)" />
<path
inkscape:export-ydpi="90"
@@ -69783,14 +69783,14 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -5.7e-4,-0.0952"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.38113,0 7.94728,3.52395 7.99943,7.90477"
sodipodi:start="0"
sodipodi:end="6.2712816"
sodipodi:open="true"
transform="matrix(0,0.7811136,-0.34375,0,74.562502,-3.1287373)" />
<path
transform="matrix(0.9374995,0,0,0.9374996,-89.749939,-10.62495)"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -70566,7 +70566,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -70582,7 +70582,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -70650,7 +70650,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -70666,7 +70666,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -71361,13 +71361,13 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
transform="matrix(0.787566,0,0,0.779223,26.709197,21.3179)" />
<path
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -71391,7 +71391,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z" />
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z" />
<path
sodipodi:nodetypes="cc"
id="path40271"
@@ -71409,7 +71409,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -71419,7 +71419,7 @@
sodipodi:type="arc"
transform="matrix(0.6429129,0,0,0.6362007,45.809534,38.194473)" />
<path
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -72069,7 +72069,7 @@
sodipodi:cy="14.5"
sodipodi:rx="1.5"
sodipodi:ry="1.5"
- d="m 72,14.5 a 1.5,1.5 0 1 1 -3,0 1.5,1.5 0 1 1 3,0 z"
+ d="M 72,14.5 C 72,15.328427 71.328427,16 70.5,16 69.671573,16 69,15.328427 69,14.5 69,13.671573 69.671573,13 70.5,13 c 0.828427,0 1.5,0.671573 1.5,1.5 z"
transform="matrix(1.176776,0,0,1.176776,-12.47787,-2.548088)"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
@@ -73365,7 +73365,7 @@
transform="matrix(1.1428564,0,0,1.2000001,822.71436,-355.40005)">
<path
transform="matrix(0.7630859,-0.2494396,0.2996015,0.9926766,-151.92281,17.77746)"
- d="m 57.5,554 a 4.5,2.25 0 1 1 -9,0 4.5,2.25 0 1 1 9,0 z"
+ d="m 57.5,554 c 0,1.24264 -2.014719,2.25 -4.5,2.25 -2.485281,0 -4.5,-1.00736 -4.5,-2.25 0,-1.24264 2.014719,-2.25 4.5,-2.25 2.485281,0 4.5,1.00736 4.5,2.25 z"
sodipodi:ry="2.25"
sodipodi:rx="4.5"
sodipodi:cy="554"
@@ -73381,7 +73381,7 @@
sodipodi:cy="554"
sodipodi:rx="4.5"
sodipodi:ry="2.25"
- d="m 57.5,554 a 4.5,2.25 0 1 1 -9,0 4.5,2.25 0 1 1 9,0 z"
+ d="m 57.5,554 c 0,1.24264 -2.014719,2.25 -4.5,2.25 -2.485281,0 -4.5,-1.00736 -4.5,-2.25 0,-1.24264 2.014719,-2.25 4.5,-2.25 2.485281,0 4.5,1.00736 4.5,2.25 z"
transform="matrix(0.3848865,-0.1700959,0.2278131,0.3626733,-93.107467,361.59408)"
inkscape:transform-center-y="0.3813435"
clip-path="url(#clipPath20586)" />
@@ -73403,13 +73403,13 @@
sodipodi:cy="554"
sodipodi:rx="4.5"
sodipodi:ry="2.25"
- d="m 57.5,554 a 4.5,2.25 0 1 1 -9,0 4.5,2.25 0 1 1 9,0 z"
+ d="m 57.5,554 c 0,1.24264 -2.014719,2.25 -4.5,2.25 -2.485281,0 -4.5,-1.00736 -4.5,-2.25 0,-1.24264 2.014719,-2.25 4.5,-2.25 2.485281,0 4.5,1.00736 4.5,2.25 z"
transform="matrix(0.7630859,-0.2494396,0.2996015,0.9926766,-151.92281,17.77746)" />
<path
clip-path="url(#clipPath20586)"
inkscape:transform-center-y="0.3813435"
transform="matrix(0.3848865,-0.1700959,0.2278131,0.3626733,-93.107467,361.59408)"
- d="m 57.5,554 a 4.5,2.25 0 1 1 -9,0 4.5,2.25 0 1 1 9,0 z"
+ d="m 57.5,554 c 0,1.24264 -2.014719,2.25 -4.5,2.25 -2.485281,0 -4.5,-1.00736 -4.5,-2.25 0,-1.24264 2.014719,-2.25 4.5,-2.25 2.485281,0 4.5,1.00736 4.5,2.25 z"
sodipodi:ry="2.25"
sodipodi:rx="4.5"
sodipodi:cy="554"
@@ -73580,7 +73580,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -73588,7 +73588,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -73622,7 +73622,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -73742,7 +73742,7 @@
transform="matrix(0.5406242,0,0,0.5829534,814.13667,247.65542)">
<path
transform="matrix(1.274286,0,0,1.377124,-7.569123,-16.70193)"
- d="m 43.487067,38.98439 a 15.467961,5.3033009 0 1 1 -30.935922,0 15.467961,5.3033009 0 1 1 30.935922,0 z"
+ d="m 43.487067,38.98439 c 0,2.928932 -6.925242,5.303301 -15.467961,5.303301 -8.542719,0 -15.467961,-2.374369 -15.467961,-5.303301 0,-2.928932 6.925242,-5.303301 15.467961,-5.303301 8.542719,0 15.467961,2.374369 15.467961,5.303301 z"
sodipodi:ry="5.3033009"
sodipodi:rx="15.467961"
sodipodi:cy="38.98439"
@@ -73758,7 +73758,7 @@
style="fill:#f57900;fill-rule:evenodd;stroke:#aa4400;stroke-width:1.7812928;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none" />
<path
transform="matrix(0.8018194,0,0,0.8471126,6.257567,4.5089892)"
- d="m 42.75,25.75 a 11.5625,10.125 0 1 1 -23.125,0 11.5625,10.125 0 1 1 23.125,0 z"
+ d="m 42.75,25.75 c 0,5.591883 -5.176708,10.125 -11.5625,10.125 -6.385792,0 -11.5625,-4.533117 -11.5625,-10.125 0,-5.591883 5.176708,-10.125 11.5625,-10.125 6.385792,0 11.5625,4.533117 11.5625,10.125 z"
sodipodi:ry="10.125"
sodipodi:rx="11.5625"
sodipodi:cy="25.75"
@@ -74320,7 +74320,7 @@
d="m 930.5,344.5 0,3 c 0,1.73575 -1.26424,3 -3,3 l -5,0 c -1.73576,0 -3,1.26425 -3,3 l 0,3"
style="fill:none;stroke:#000000;stroke-width:0.80000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.78431373;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
<path
- d="m 923,342 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 923,342 c 0,0.55228 -0.44772,1 -1,1 -0.55228,0 -1,-0.44772 -1,-1 0,-0.55228 0.44772,-1 1,-1 0.55228,0 1,0.44772 1,1 z"
sodipodi:ry="1"
sodipodi:rx="1"
sodipodi:cy="342"
@@ -74329,7 +74329,7 @@
style="color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
sodipodi:type="arc" />
<path
- d="m 929,359 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 929,359 c 0,0.55228 -0.44772,1 -1,1 -0.55228,0 -1,-0.44772 -1,-1 0,-0.55228 0.44772,-1 1,-1 0.55228,0 1,0.44772 1,1 z"
sodipodi:ry="1"
sodipodi:rx="1"
sodipodi:cy="359"
@@ -74372,7 +74372,7 @@
sodipodi:cy="342"
sodipodi:rx="1"
sodipodi:ry="1"
- d="m 923,342 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z" />
+ d="m 923,342 c 0,0.55228 -0.44772,1 -1,1 -0.55228,0 -1,-0.44772 -1,-1 0,-0.55228 0.44772,-1 1,-1 0.55228,0 1,0.44772 1,1 z" />
</g>
<g
style="opacity:0.8;stroke:#ff0000"
@@ -74402,7 +74402,7 @@
d="m 918.5,355.5 0,-2 c 0,-2.25 1.75,-4 4,-4 l 4.5,0 c 1.75,0 2.5,-0.75 2.5,-2.5 l 0,-0.5"
style="fill:none;stroke:url(#radialGradient34973-2-5-7);stroke-linecap:round;stroke-linejoin:round" />
<path
- d="m 923,342 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 923,342 c 0,0.55228 -0.44772,1 -1,1 -0.55228,0 -1,-0.44772 -1,-1 0,-0.55228 0.44772,-1 1,-1 0.55228,0 1,0.44772 1,1 z"
sodipodi:ry="1"
sodipodi:rx="1"
sodipodi:cy="342"
@@ -74739,7 +74739,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 139.98403,118.50525 a 8,8 0 1 1 -8.39706,-8.49458"
+ d="m 139.98403,118.50525 c -0.27904,4.40946 -4.07982,7.75782 -8.48928,7.47878 -4.40946,-0.27904 -7.75782,-4.07982 -7.47878,-8.48928 0.25664,-4.05547 3.51283,-7.27428 7.571,-7.48408"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -74751,7 +74751,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 139.98403,118.50525 a 8,8 0 1 1 -8.39706,-8.49458"
+ d="m 139.98403,118.50525 c -0.27904,4.40946 -4.07982,7.75782 -8.48928,7.47878 -4.40946,-0.27904 -7.75782,-4.07982 -7.47878,-8.48928 0.25664,-4.05547 3.51283,-7.27428 7.571,-7.48408"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -74771,7 +74771,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 139.98403,118.50525 a 8,8 0 1 1 -8.39706,-8.49458"
+ d="m 139.98403,118.50525 c -0.27904,4.40946 -4.07982,7.75782 -8.48928,7.47878 -4.40946,-0.27904 -7.75782,-4.07982 -7.47878,-8.48928 0.25664,-4.05547 3.51283,-7.27428 7.571,-7.48408"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -74784,7 +74784,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 139.98403,118.50525 a 8,8 0 1 1 -8.39706,-8.49458"
+ d="m 139.98403,118.50525 c -0.27904,4.40946 -4.07982,7.75782 -8.48928,7.47878 -4.40946,-0.27904 -7.75782,-4.07982 -7.47878,-8.48928 0.25664,-4.05547 3.51283,-7.27428 7.571,-7.48408"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -74922,7 +74922,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -74931,7 +74931,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -74943,7 +74943,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -75942,7 +75942,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -75951,7 +75951,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -75970,7 +75970,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
transform="matrix(0.5705005,0,0,0.5705012,51.746079,156.18087)" />
</g>
<g
@@ -75984,7 +75984,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -76001,14 +76001,14 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
transform="matrix(-0.683022,-0.07745026,0.0778507,-0.683064,209.4726,314.325)" />
<path
transform="matrix(0.5705005,0,0,0.5705012,53.193935,156.18087)"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -76047,7 +76047,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -76064,7 +76064,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -76078,7 +76078,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -76086,7 +76086,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -76099,7 +76099,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -76320,7 +76320,7 @@
sodipodi:end="1.5729572"
sodipodi:start="0"
transform="matrix(-2.421633,0,0,-2.417581,92.2682,-69.13182)"
- d="m 54,-32.5 a 4.5,4.5 0 0 1 -4.509724,4.499989"
+ d="m 54,-32.5 c 0,2.485281 -2.014719,4.5 -4.5,4.5 -0.0032,0 -0.0065,-4e-6 -0.0097,-1.1e-5"
sodipodi:ry="4.5"
sodipodi:rx="4.5"
sodipodi:cy="-32.5"
@@ -76339,7 +76339,7 @@
sodipodi:cy="-32.5"
sodipodi:rx="4.5"
sodipodi:ry="4.5"
- d="m 54,-32.5 a 4.5,4.5 0 0 1 -4.509724,4.499989"
+ d="m 54,-32.5 c 0,2.485281 -2.014719,4.5 -4.5,4.5 -0.0032,0 -0.0065,-4e-6 -0.0097,-1.1e-5"
transform="matrix(-2.421633,0,0,-2.417581,92.2682,-69.13182)"
sodipodi:start="0"
sodipodi:end="1.5729572"
@@ -76356,7 +76356,7 @@
sodipodi:end="1.5729572"
sodipodi:start="0"
transform="matrix(-2.421633,0,0,-2.417581,92.2682,-69.13182)"
- d="m 54,-32.5 a 4.5,4.5 0 0 1 -4.509724,4.499989"
+ d="m 54,-32.5 c 0,2.485281 -2.014719,4.5 -4.5,4.5 -0.0032,0 -0.0065,-4e-6 -0.0097,-1.1e-5"
sodipodi:ry="4.5"
sodipodi:rx="4.5"
sodipodi:cy="-32.5"
@@ -76375,7 +76375,7 @@
sodipodi:cy="-32.5"
sodipodi:rx="4.5"
sodipodi:ry="4.5"
- d="m 54,-32.5 a 4.5,4.5 0 0 1 -4.509724,4.499989"
+ d="m 54,-32.5 c 0,2.485281 -2.014719,4.5 -4.5,4.5 -0.0032,0 -0.0065,-4e-6 -0.0097,-1.1e-5"
transform="matrix(-2.587958,0,0,-2.597682,100.48861,-75.018268)"
sodipodi:start="0"
sodipodi:end="1.5729572"
@@ -76948,7 +76948,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -76962,7 +76962,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -77052,7 +77052,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -77088,7 +77088,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -77114,7 +77114,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -77294,7 +77294,7 @@
</g>
<path
transform="matrix(1.4399775,0,0,1.4399775,-171.50748,-44.947546)"
- d="m 388.20316,122.5078 a 0.70312506,0.71093756 0 1 1 -1.40625,0 0.70312506,0.71093756 0 1 1 1.40625,0 z"
+ d="m 388.20316,122.5078 c 0,0.39264 -0.3148,0.71093 -0.70313,0.71093 -0.38832,0 -0.70312,-0.31829 -0.70312,-0.71093 0,-0.39264 0.3148,-0.71094 0.70312,-0.71094 0.38833,0 0.70313,0.3183 0.70313,0.71094 z"
sodipodi:ry="0.71093756"
sodipodi:rx="0.70312506"
sodipodi:cy="122.5078"
@@ -77352,7 +77352,7 @@
</g>
<path
transform="matrix(1.4399775,0,0,1.4399775,-171.50748,-44.947546)"
- d="m 388.20316,122.5078 a 0.70312506,0.71093756 0 1 1 -1.40625,0 0.70312506,0.71093756 0 1 1 1.40625,0 z"
+ d="m 388.20316,122.5078 c 0,0.39264 -0.3148,0.71093 -0.70313,0.71093 -0.38832,0 -0.70312,-0.31829 -0.70312,-0.71093 0,-0.39264 0.3148,-0.71094 0.70312,-0.71094 0.38833,0 0.70313,0.3183 0.70313,0.71094 z"
sodipodi:ry="0.71093756"
sodipodi:rx="0.70312506"
sodipodi:cy="122.5078"
@@ -77430,7 +77430,7 @@
sodipodi:cy="122.5078"
sodipodi:rx="0.70312506"
sodipodi:ry="0.71093756"
- d="m 388.20316,122.5078 a 0.70312506,0.71093756 0 1 1 -1.40625,0 0.70312506,0.71093756 0 1 1 1.40625,0 z"
+ d="m 388.20316,122.5078 c 0,0.39264 -0.3148,0.71093 -0.70313,0.71093 -0.38832,0 -0.70312,-0.31829 -0.70312,-0.71093 0,-0.39264 0.3148,-0.71094 0.70312,-0.71094 0.38833,0 0.70313,0.3183 0.70313,0.71094 z"
transform="matrix(1.4399775,0,0,1.4399775,-171.50748,-44.947546)" />
</g>
<path
@@ -77475,7 +77475,7 @@
sodipodi:cy="122.5078"
sodipodi:rx="0.70312506"
sodipodi:ry="0.71093756"
- d="m 388.20316,122.5078 a 0.70312506,0.71093756 0 1 1 -1.40625,0 0.70312506,0.71093756 0 1 1 1.40625,0 z"
+ d="m 388.20316,122.5078 c 0,0.39264 -0.3148,0.71093 -0.70313,0.71093 -0.38832,0 -0.70312,-0.31829 -0.70312,-0.71093 0,-0.39264 0.3148,-0.71094 0.70312,-0.71094 0.38833,0 0.70313,0.3183 0.70313,0.71094 z"
transform="matrix(1.7719122,0,0,1.7719122,-300.13217,-85.612134)" />
<path
sodipodi:nodetypes="czzzz"
@@ -77664,7 +77664,7 @@
inkscape:connector-curvature="0" />
<path
transform="matrix(3.625,0,0,3.1690202,-67.8125,318.31703)"
- d="m 14.5,57.5 a 1,1.0000004 0 1 1 -2,0 1,1.0000004 0 1 1 2,0 z"
+ d="m 14.5,57.5 c 0,0.552285 -0.447715,1 -1,1 -0.552285,0 -1,-0.447715 -1,-1 0,-0.552285 0.447715,-1 1,-1 0.552285,0 1,0.447715 1,1 z"
sodipodi:ry="1.0000004"
sodipodi:rx="1"
sodipodi:cy="57.5"
@@ -77681,7 +77681,7 @@
</g>
<path
transform="matrix(3.5999897,0,0,3.1249932,-67.499871,320.6879)"
- d="m 14.5,57.5 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 14.5,57.5 c 0,0.552285 -0.447715,1 -1,1 -0.552285,0 -1,-0.447715 -1,-1 0,-0.552285 0.447715,-1 1,-1 0.552285,0 1,0.447715 1,1 z"
sodipodi:ry="1"
sodipodi:rx="1"
sodipodi:cy="57.5"
@@ -77703,11 +77703,11 @@
sodipodi:cy="57.5"
sodipodi:rx="1"
sodipodi:ry="1"
- d="m 14.5,57.5 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 14.5,57.5 c 0,0.552285 -0.447715,1 -1,1 -0.552285,0 -1,-0.447715 -1,-1 0,-0.552285 0.447715,-1 1,-1 0.552285,0 1,0.447715 1,1 z"
transform="matrix(3.25,0,0,3.25,-62.875,313.125)" />
<path
transform="matrix(2,0,0,2,-46,385)"
- d="m 14.5,57.5 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 14.5,57.5 c 0,0.552285 -0.447715,1 -1,1 -0.552285,0 -1,-0.447715 -1,-1 0,-0.552285 0.447715,-1 1,-1 0.552285,0 1,0.447715 1,1 z"
sodipodi:ry="1"
sodipodi:rx="1"
sodipodi:cy="57.5"
@@ -77723,7 +77723,7 @@
sodipodi:cy="57.5"
sodipodi:rx="1"
sodipodi:ry="1"
- d="m 14.5,57.5 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 14.5,57.5 c 0,0.552285 -0.447715,1 -1,1 -0.552285,0 -1,-0.447715 -1,-1 0,-0.552285 0.447715,-1 1,-1 0.552285,0 1,0.447715 1,1 z"
transform="matrix(4.7519907,0,0,4.1435313,-83.051884,262.12196)" />
<path
sodipodi:nodetypes="cccccc"
@@ -77802,7 +77802,7 @@
inkscape:connector-curvature="0" />
<path
transform="matrix(3.625,0,0,3.1690202,-67.8125,318.31703)"
- d="m 14.5,57.5 a 1,1.0000004 0 1 1 -2,0 1,1.0000004 0 1 1 2,0 z"
+ d="m 14.5,57.5 c 0,0.552285 -0.447715,1 -1,1 -0.552285,0 -1,-0.447715 -1,-1 0,-0.552285 0.447715,-1 1,-1 0.552285,0 1,0.447715 1,1 z"
sodipodi:ry="1.0000004"
sodipodi:rx="1"
sodipodi:cy="57.5"
@@ -77819,7 +77819,7 @@
</g>
<path
transform="matrix(3.5999897,0,0,3.1249932,-67.499871,320.6879)"
- d="m 14.5,57.5 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 14.5,57.5 c 0,0.552285 -0.447715,1 -1,1 -0.552285,0 -1,-0.447715 -1,-1 0,-0.552285 0.447715,-1 1,-1 0.552285,0 1,0.447715 1,1 z"
sodipodi:ry="1"
sodipodi:rx="1"
sodipodi:cy="57.5"
@@ -77841,11 +77841,11 @@
sodipodi:cy="57.5"
sodipodi:rx="1"
sodipodi:ry="1"
- d="m 14.5,57.5 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 14.5,57.5 c 0,0.552285 -0.447715,1 -1,1 -0.552285,0 -1,-0.447715 -1,-1 0,-0.552285 0.447715,-1 1,-1 0.552285,0 1,0.447715 1,1 z"
transform="matrix(3.25,0,0,3.25,-62.875,313.125)" />
<path
transform="matrix(2,0,0,2,-46,385)"
- d="m 14.5,57.5 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 14.5,57.5 c 0,0.552285 -0.447715,1 -1,1 -0.552285,0 -1,-0.447715 -1,-1 0,-0.552285 0.447715,-1 1,-1 0.552285,0 1,0.447715 1,1 z"
sodipodi:ry="1"
sodipodi:rx="1"
sodipodi:cy="57.5"
@@ -77861,7 +77861,7 @@
sodipodi:cy="57.5"
sodipodi:rx="1"
sodipodi:ry="1"
- d="m 14.5,57.5 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 14.5,57.5 c 0,0.552285 -0.447715,1 -1,1 -0.552285,0 -1,-0.447715 -1,-1 0,-0.552285 0.447715,-1 1,-1 0.552285,0 1,0.447715 1,1 z"
transform="matrix(4.7519907,0,0,4.1435313,-83.051884,262.12196)" />
<path
sodipodi:nodetypes="cccccc"
@@ -78298,7 +78298,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -78306,7 +78306,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -78320,7 +78320,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -78478,7 +78478,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -78486,7 +78486,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -78500,7 +78500,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -78634,7 +78634,7 @@
sodipodi:cy="420.25"
sodipodi:rx="2.5"
sodipodi:ry="1.75"
- d="m 751.5,420.25 a 2.5,1.75 0 1 1 -5,0 2.5,1.75 0 1 1 5,0 z"
+ d="m 751.5,420.25 c 0,0.9665 -1.11929,1.75 -2.5,1.75 -1.38071,0 -2.5,-0.7835 -2.5,-1.75 0,-0.9665 1.11929,-1.75 2.5,-1.75 1.38071,0 2.5,0.7835 2.5,1.75 z"
transform="matrix(1,0,0,0.8571429,-212,-302.2143)" />
<rect
style="fill:#66ff00;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
@@ -78924,7 +78924,7 @@
sodipodi:cy="420.25"
sodipodi:rx="2.5"
sodipodi:ry="1.75"
- d="m 751.5,420.25 a 2.5,1.75 0 1 1 -5,0 2.5,1.75 0 1 1 5,0 z"
+ d="m 751.5,420.25 c 0,0.9665 -1.11929,1.75 -2.5,1.75 -1.38071,0 -2.5,-0.7835 -2.5,-1.75 0,-0.9665 1.11929,-1.75 2.5,-1.75 1.38071,0 2.5,0.7835 2.5,1.75 z"
transform="matrix(1,0,0,0.8571429,-212,-302.2143)" />
<rect
style="fill:#66ff00;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
@@ -79244,7 +79244,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -79270,7 +79270,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -79410,7 +79410,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -79429,7 +79429,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 z"
+ d="m 132,110 c 2.85812,0 5.49914,1.52479 6.9282,4 L 132,118 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -79447,7 +79447,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 z"
+ d="m 132,110 c 2.85812,0 5.49914,1.52479 6.9282,4 L 132,118 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -79463,7 +79463,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 z"
+ d="m 132,110 c 2.85812,0 5.49914,1.52479 6.9282,4 L 132,118 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -79481,7 +79481,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 z"
+ d="m 132,110 c 2.85812,0 5.49914,1.52479 6.9282,4 L 132,118 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -79496,7 +79496,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 z"
+ d="m 132,110 c 2.85812,0 5.49914,1.52479 6.9282,4 L 132,118 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -79515,7 +79515,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 z"
+ d="m 132,110 c 2.85812,0 5.49914,1.52479 6.9282,4 L 132,118 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -79532,7 +79532,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -79540,7 +79540,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -79570,7 +79570,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -79589,7 +79589,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 z"
+ d="m 132,110 c 2.85812,0 5.49914,1.52479 6.9282,4 L 132,118 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -79607,7 +79607,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 z"
+ d="m 132,110 c 2.85812,0 5.49914,1.52479 6.9282,4 L 132,118 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -79623,7 +79623,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 z"
+ d="m 132,110 c 2.85812,0 5.49914,1.52479 6.9282,4 L 132,118 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -79641,7 +79641,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 z"
+ d="m 132,110 c 2.85812,0 5.49914,1.52479 6.9282,4 L 132,118 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -79656,7 +79656,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 z"
+ d="m 132,110 c 2.85812,0 5.49914,1.52479 6.9282,4 L 132,118 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -79675,7 +79675,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 z"
+ d="m 132,110 c 2.85812,0 5.49914,1.52479 6.9282,4 L 132,118 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -79692,7 +79692,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -79700,7 +79700,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -79730,7 +79730,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -79749,7 +79749,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 z"
+ d="m 132,110 c 2.85812,0 5.49914,1.52479 6.9282,4 L 132,118 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -79767,7 +79767,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 z"
+ d="m 132,110 c 2.85812,0 5.49914,1.52479 6.9282,4 L 132,118 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -79783,7 +79783,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 z"
+ d="m 132,110 c 2.85812,0 5.49914,1.52479 6.9282,4 L 132,118 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -79801,7 +79801,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 z"
+ d="m 132,110 c 2.85812,0 5.49914,1.52479 6.9282,4 L 132,118 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -79816,7 +79816,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 z"
+ d="m 132,110 c 2.85812,0 5.49914,1.52479 6.9282,4 L 132,118 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -79835,7 +79835,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 z"
+ d="m 132,110 c 2.85812,0 5.49914,1.52479 6.9282,4 L 132,118 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
@@ -79852,7 +79852,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -79860,7 +79860,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -79888,7 +79888,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -79896,7 +79896,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -79914,7 +79914,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -79927,7 +79927,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -79935,7 +79935,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -81054,7 +81054,7 @@
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
transform="matrix(1.3333333,0,0,1.3333343,3,147.66665)"
- d="m 72,14.5 a 1.5,1.5 0 1 1 -3,0 1.5,1.5 0 1 1 3,0 z"
+ d="M 72,14.5 C 72,15.328427 71.328427,16 70.5,16 69.671573,16 69,15.328427 69,14.5 69,13.671573 69.671573,13 70.5,13 c 0.828427,0 1.5,0.671573 1.5,1.5 z"
sodipodi:ry="1.5"
sodipodi:rx="1.5"
sodipodi:cy="14.5"
@@ -81066,7 +81066,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- d="m 72,14.5 a 1.5,1.5 0 1 1 -3,0 1.5,1.5 0 1 1 3,0 z"
+ d="M 72,14.5 C 72,15.328427 71.328427,16 70.5,16 69.671573,16 69,15.328427 69,14.5 69,13.671573 69.671573,13 70.5,13 c 0.828427,0 1.5,0.671573 1.5,1.5 z"
sodipodi:ry="1.5"
sodipodi:rx="1.5"
sodipodi:cy="14.5"
@@ -81253,7 +81253,7 @@
sodipodi:cy="14.5"
sodipodi:rx="1.5"
sodipodi:ry="1.5"
- d="m 72,14.5 a 1.5,1.5 0 1 1 -3,0 1.5,1.5 0 1 1 3,0 z"
+ d="M 72,14.5 C 72,15.328427 71.328427,16 70.5,16 69.671573,16 69,15.328427 69,14.5 69,13.671573 69.671573,13 70.5,13 c 0.828427,0 1.5,0.671573 1.5,1.5 z"
transform="matrix(1.3333333,0,0,1.3333343,170.99998,105.66665)"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
@@ -81267,7 +81267,7 @@
sodipodi:cy="14.5"
sodipodi:rx="1.5"
sodipodi:ry="1.5"
- d="m 72,14.5 a 1.5,1.5 0 1 1 -3,0 1.5,1.5 0 1 1 3,0 z"
+ d="M 72,14.5 C 72,15.328427 71.328427,16 70.5,16 69.671573,16 69,15.328427 69,14.5 69,13.671573 69.671573,13 70.5,13 c 0.828427,0 1.5,0.671573 1.5,1.5 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -81444,7 +81444,7 @@
sodipodi:cy="14.5"
sodipodi:rx="1.5"
sodipodi:ry="1.5"
- d="m 72,14.5 a 1.5,1.5 0 1 1 -3,0 1.5,1.5 0 1 1 3,0 z"
+ d="M 72,14.5 C 72,15.328427 71.328427,16 70.5,16 69.671573,16 69,15.328427 69,14.5 69,13.671573 69.671573,13 70.5,13 c 0.828427,0 1.5,0.671573 1.5,1.5 z"
transform="matrix(1.3333333,0,0,1.3333343,209.98999,105.66665)"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
@@ -81458,7 +81458,7 @@
sodipodi:cy="14.5"
sodipodi:rx="1.5"
sodipodi:ry="1.5"
- d="m 72,14.5 a 1.5,1.5 0 1 1 -3,0 1.5,1.5 0 1 1 3,0 z"
+ d="M 72,14.5 C 72,15.328427 71.328427,16 70.5,16 69.671573,16 69,15.328427 69,14.5 69,13.671573 69.671573,13 70.5,13 c 0.828427,0 1.5,0.671573 1.5,1.5 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -83694,7 +83694,7 @@
id="path32864"
inkscape:connector-curvature="0" />
<path
- d="m -177.09897,651.49231 a 2.4505157,2.4923096 0 1 1 -4.90103,0 2.4505157,2.4923096 0 1 1 4.90103,0 z"
+ d="m -177.09897,651.49231 c 0,1.37646 -1.09713,2.49231 -2.45051,2.49231 -1.35339,0 -2.45052,-1.11585 -2.45052,-2.49231 0,-1.37646 1.09713,-2.49231 2.45052,-2.49231 1.35338,0 2.45051,1.11585 2.45051,2.49231 z"
sodipodi:ry="2.4923096"
sodipodi:rx="2.4505157"
sodipodi:cy="651.49231"
@@ -83724,7 +83724,7 @@
inkscape:connector-curvature="0" />
<path
transform="matrix(1.2638889,0,0,1.2222222,32.853009,-140.1836)"
- d="m -201.22313,628.93835 a 0.80938911,0.80938911 0 1 1 -1.61878,0 0.80938911,0.80938911 0 1 1 1.61878,0 z"
+ d="m -201.22313,628.93835 c 0,0.44702 -0.36237,0.80939 -0.80939,0.80939 -0.44701,0 -0.80939,-0.36237 -0.80939,-0.80939 0,-0.44701 0.36238,-0.80938 0.80939,-0.80938 0.44702,0 0.80939,0.36237 0.80939,0.80938 z"
sodipodi:ry="0.80938911"
sodipodi:rx="0.80938911"
sodipodi:cy="628.93835"
@@ -83740,11 +83740,11 @@
sodipodi:cy="628.93835"
sodipodi:rx="0.80938911"
sodipodi:ry="0.80938911"
- d="m -201.22313,628.93835 a 0.80938911,0.80938911 0 1 1 -1.61878,0 0.80938911,0.80938911 0 1 1 1.61878,0 z"
+ d="m -201.22313,628.93835 c 0,0.44702 -0.36237,0.80939 -0.80939,0.80939 -0.44701,0 -0.80939,-0.36237 -0.80939,-0.80939 0,-0.44701 0.36238,-0.80938 0.80939,-0.80938 0.44702,0 0.80939,0.36237 0.80939,0.80938 z"
transform="matrix(0.77047663,0,0,0.74507628,-63.8586,161.95861)" />
<path
transform="matrix(0.77047663,0,0,0.74507628,-64.708233,162.88548)"
- d="m -201.22313,628.93835 a 0.80938911,0.80938911 0 1 1 -1.61878,0 0.80938911,0.80938911 0 1 1 1.61878,0 z"
+ d="m -201.22313,628.93835 c 0,0.44702 -0.36237,0.80939 -0.80939,0.80939 -0.44701,0 -0.80939,-0.36237 -0.80939,-0.80939 0,-0.44701 0.36238,-0.80938 0.80939,-0.80938 0.44702,0 0.80939,0.36237 0.80939,0.80938 z"
sodipodi:ry="0.80938911"
sodipodi:rx="0.80938911"
sodipodi:cy="628.93835"
@@ -83896,7 +83896,7 @@
inkscape:connector-curvature="0" />
<path
transform="matrix(2.5815738,0,0,1.0580577,65.140965,9.1698698)"
- d="m -40.52941,-158 a 0.9705897,4.25 0 1 1 -1.94118,0 0.9705897,4.25 0 1 1 1.94118,0 z"
+ d="m -40.52941,-158 c 0,2.34721 -0.434548,4.25 -0.97059,4.25 -0.536042,0 -0.97059,-1.90279 -0.97059,-4.25 0,-2.34721 0.434548,-4.25 0.97059,-4.25 0.536042,0 0.97059,1.90279 0.97059,4.25 z"
sodipodi:ry="4.25"
sodipodi:rx="0.9705897"
sodipodi:cy="-158"
@@ -84023,7 +84023,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -84040,14 +84040,14 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
transform="matrix(-0.6011908,-0.06817113,0.06852359,-0.6012277,199.77148,303.44348)" />
<path
transform="matrix(0.4463965,0,0,0.4463971,69.575658,170.82515)"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -84158,7 +84158,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -84175,14 +84175,14 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
transform="matrix(-0.6011908,-0.06817113,0.06852359,-0.6012277,199.77148,303.44348)" />
<path
transform="matrix(0.4463965,0,0,0.4463971,69.575658,170.82515)"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -84355,7 +84355,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -84364,7 +84364,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -84383,7 +84383,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
transform="matrix(0.4463965,0,0,0.4463971,69.575658,170.82515)" />
</g>
</g>
@@ -84460,7 +84460,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -84469,7 +84469,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -84488,7 +84488,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
transform="matrix(0.4463965,0,0,0.4463971,69.575658,170.82515)" />
</g>
</g>
@@ -84594,7 +84594,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -84603,7 +84603,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -84622,7 +84622,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
transform="matrix(0.5650525,0,0,0.5650532,53.91307,156.82373)" />
</g>
<g
@@ -84678,7 +84678,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -84695,14 +84695,14 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
transform="matrix(-0.683022,-0.07745026,0.0778507,-0.683064,209.4726,314.325)" />
<path
transform="matrix(0.5719769,0,0,0.5719777,52.999044,156.00665)"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -84857,7 +84857,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -84874,14 +84874,14 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
transform="matrix(-0.683022,-0.07745026,0.0778507,-0.683064,209.4726,314.325)" />
<path
transform="matrix(0.4963171,0,0,0.4963178,62.986138,164.93452)"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -84914,7 +84914,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -84931,14 +84931,14 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
transform="matrix(-0.2610878,-0.02960567,0.02975872,-0.2611039,35.872259,-102.36161)" />
<path
transform="matrix(0.2102357,0,0,0.2102362,-22.830954,-161.8877)"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -84957,7 +84957,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -84974,14 +84974,14 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
transform="matrix(-0.5000291,-0.05669783,0.0569932,-0.5000402,23.278522,10.488883)" />
<path
transform="matrix(0.4374781,0,0,0.4374622,-93.747286,-107.62054)"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -85028,7 +85028,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -85037,7 +85037,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -85056,7 +85056,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
transform="matrix(0.2102357,0,0,0.2102362,-22.830954,-161.8877)" />
</g>
</g>
@@ -85102,7 +85102,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -85119,14 +85119,14 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
transform="matrix(-0.2610878,-0.02960567,0.02975872,-0.2611039,35.872259,-102.36161)" />
<path
transform="matrix(0.2102357,0,0,0.2102362,-22.830954,-161.8877)"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -85175,7 +85175,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -85184,7 +85184,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -85203,7 +85203,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
transform="matrix(0.2102357,0,0,0.2102362,-22.830954,-161.8877)" />
</g>
</g>
@@ -85239,7 +85239,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -85248,7 +85248,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -85267,7 +85267,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
transform="matrix(0.2102357,0,0,0.2102362,-22.830954,-161.8877)" />
</g>
</g>
@@ -85475,7 +85475,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
@@ -85484,7 +85484,7 @@
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="118"
@@ -85503,7 +85503,7 @@
sodipodi:cy="118"
sodipodi:rx="8"
sodipodi:ry="8"
- d="m 140,118 a 8,8 0 1 1 -16,0 8,8 0 1 1 16,0 z"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
transform="matrix(0.4463965,0,0,0.4463971,69.575658,170.82515)" />
</g>
</g>
@@ -85566,7 +85566,7 @@
sodipodi:cy="-117.5"
sodipodi:rx="1.5"
sodipodi:ry="1.5"
- d="m -9,-117.5 a 1.5,1.5 0 1 1 -3,0 1.5,1.5 0 1 1 3,0 z"
+ d="m -9,-117.5 c 0,0.82843 -0.6715729,1.5 -1.5,1.5 -0.828427,0 -1.5,-0.67157 -1.5,-1.5 0,-0.82843 0.671573,-1.5 1.5,-1.5 0.8284271,0 1.5,0.67157 1.5,1.5 z"
transform="matrix(1,0,0,1.4166681,-22,49.0835)" />
<g
id="g24584-3">
@@ -86240,6 +86240,43 @@
sodipodi:nodetypes="ccsc" />
</g>
</g>
+ <g
+ style="display:inline;enable-background:new"
+ id="g24559-2"
+ transform="translate(238,508)">
+ <path
+ style="fill:none;stroke:#c8c8c8;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:0.8509804;display:inline;enable-background:new"
+ d="m 104,121.5 14,0"
+ id="path16004-2-9"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cc" />
+ <rect
+ y="111"
+ x="103"
+ height="16"
+ width="16"
+ id="rect24489-7"
+ style="opacity:0;fill:#b3b3b3;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.79999995;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:0.85098039"
+ d="m 342,625.5 14,0"
+ id="path16004"
+ inkscape:connector-curvature="0"
+ transform="translate(-238,-508)"
+ sodipodi:nodetypes="cc" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:0.85098039;display:inline;enable-background:new"
+ d="m 104,120.5 14,0"
+ id="path16004-7"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cc" />
+ <path
+ style="fill:#c6cbd2;stroke:#c8c8c8;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:0.8509804;display:inline;enable-background:new;fill-opacity:1"
+ d="m 104,118.5 14,0"
+ id="path16004-2"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cc" />
+ </g>
</g>
<g
inkscape:groupmode="layer"
diff --git a/release/datafiles/blender_icons16.png b/release/datafiles/blender_icons16.png
index 9b9d7910ab8..24d95d7ec5c 100644
--- a/release/datafiles/blender_icons16.png
+++ b/release/datafiles/blender_icons16.png
Binary files differ
diff --git a/release/datafiles/blender_icons32.png b/release/datafiles/blender_icons32.png
index 4d310cf5712..3f8901fafd9 100644
--- a/release/datafiles/blender_icons32.png
+++ b/release/datafiles/blender_icons32.png
Binary files differ
diff --git a/release/datafiles/colormanagement/config.ocio b/release/datafiles/colormanagement/config.ocio
index 1e78c8945c0..cd6eaec52ab 100644
--- a/release/datafiles/colormanagement/config.ocio
+++ b/release/datafiles/colormanagement/config.ocio
@@ -283,3 +283,540 @@ colorspaces:
children:
- !<ColorSpaceTransform> {src: Linear, dst: lg10}
- !<FileTransform> {src: colorworks_filmlg_to_p3.3dl, interpolation: linear}
+
+looks:
+ - !<Look>
+ name: Agfa Agfacolor Futura 100
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/agfa_agfacolor_futura_100.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Agfa Agfacolor Futura 200
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/agfa_agfacolor_futura_200.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Agfa Agfacolor Futura 400
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/agfa_agfacolor_futura_400.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Agfa Agfacolor Futura II 100
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/agfa_agfacolor_futura_ii_100.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Agfa Agfacolor Futura II 200
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/agfa_agfacolor_futura_ii_200.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Agfa Agfacolor Futura II 400
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/agfa_agfacolor_futura_ii_400.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Agfa Agfacolor HDC 100 plus
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/agfa_agfacolor_hdc_100_plus.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Agfa Agfacolor HDC 400 plus
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/agfa_agfacolor_hdc_400_plus.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Agfa Agfacolor HDC 200 plus
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/agfa_agfacolor_hdc_200_plus.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Agfa Agfacolor Optima II 100
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/agfa_agfacolor_optima_ii_100.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Agfa Agfacolor Optima II 200
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/agfa_agfacolor_optima_ii_200.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Agfa Agfacolor Ultra 050
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/agfa_agfacolor_ultra_050.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Agfa Agfacolor Vista 100
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/agfa_agfacolor_vista_100.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Agfa Agfacolor Vista 200
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/agfa_agfacolor_vista_200.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Agfa Agfacolor Vista 400
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/agfa_agfacolor_vista_400.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Agfa Agfacolor Vista 800
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/agfa_agfacolor_vista_800.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Agfa Agfachrome CT Precisa 100
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/agfa_agfachrome_ct_precisa_100.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Agfa Agfachrome CT Precisa 200
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/agfa_agfachrome_ct_precisa_200.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Agfa Agfachrome RSX2 050
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/agfa_agfachrome_rsx2_050.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Agfa Agfachrome RSX2 100
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/agfa_agfachrome_rsx2_100.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Agfa Agfachrome RSX2 200
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/agfa_agfachrome_rsx2_200.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Agfa Advantix 100
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/agfa_advantix_100.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Agfa Advantix 200
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/agfa_advantix_200.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Agfa Advantix 400
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/agfa_advantix_400.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Kodak Gold 100
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/kodak_gold_100.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Kodak Gold 200
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/kodak_gold_200.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Kodak Max Zoom 800
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/kodak_max_zoom_800.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Kodak Portra 100T
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/kodak_portra_100t.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Kodak Portra 160NC
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/kodak_portra_160nc.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Kodak Portra 160VC
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/kodak_portra_160vc.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Kodak Portra 800
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/kodak_portra_800.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Kodak Portra 400VC
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/kodak_portra_400vc.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Kodak Portra 400NC
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/kodak_portra_400nc.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Kodak Ektachrome 100 plus
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/kodak_ektachrome_100_plus.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Kodak Ektachrome 320T
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/kodak_ektachrome_320t.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Kodak Ektachrome 400X
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/kodak_ektachrome_400x.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Kodak Ektachrome 64
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/kodak_ektachrome_64.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Kodak Ektachrome 64T
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/kodak_ektachrome_64t.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Kodak Ektachrome E100S
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/kodak_ektachrome_e100s.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Kodak Ektachrome 100
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/kodak_ektachrome_100.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Kodak Kodachrome 200
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/kodak_kodachrome_200.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Kodak Kodachrome 25
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/kodak_kodachrome_25.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Kodak Kodachrome 64
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/kodak_kodachrome_64.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Kodak DSCS 3151
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/kodak_dscs_3151.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Kodak DSCS 3152
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/kodak_dscs_3152.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Kodak DSCS 3153
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/kodak_dscs_3153.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Kodak DSCS 3154
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/kodak_dscs_3154.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Kodak DSCS 3155
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/kodak_dscs_3155.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Kodak DSCS 3156
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/kodak_dscs_3156.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Kodak KAI-0311
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/kodak_kai-0311.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Kodak KAF-2001
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/kodak_kaf-2001.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Kodak KAF-3000
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/kodak_kaf-3000.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Kodak KAI-0372
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/kodak_kai-0372.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Kodak KAI-1010
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/kodak_kai-1010.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Eastman Double X Neg 12min
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/eastman_double_x_neg_12min.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Eastman Double X Neg 6min
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/eastman_double_x_neg_6min.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Eastman Double X Neg 5min
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/eastman_double_x_neg_5min.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Eastman Double X Neg 4min
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/eastman_double_x_neg_4min.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Fujifilm F-125
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/fujifilm_f-125.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Fujifilm F-250
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/fujifilm_f-250.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Fujifilm F-400
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/fujifilm_f-400.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Fujifilm FCI
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/fujifilm_fci.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Fujifilm FP2900Z
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/fujifilm_fp2900z.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Canon Optura 981111
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/canon_optura_981111.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Canon Optura 981113
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/canon_optura_981113.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Canon Optura 981114
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/canon_optura_981114.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
+
+ - !<Look>
+ name: Canon Optura 981111.SLRR
+ process_space: linear
+ transform: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: film_response/canon_optura_981111.slrr.spi1d, interpolation: linear}
+ - !<FileTransform> {src: srgb.spi1d, interpolation: linear}
diff --git a/release/datafiles/colormanagement/luts/film_response/agfa_advantix_100.spi1d b/release/datafiles/colormanagement/luts/film_response/agfa_advantix_100.spi1d
new file mode 100644
index 00000000000..77ae66b3807
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/agfa_advantix_100.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0099759204 0.0084230602 0.0063721500
+ 0.0195903908 0.0165482908 0.0126159703
+ 0.0281873904 0.0239386503 0.0183614101
+ 0.0359400399 0.0306491107 0.0236731302
+ 0.0429986902 0.0368482284 0.0286820605
+ 0.0495699607 0.0426228605 0.0333807915
+ 0.0556899793 0.0479997694 0.0378808789
+ 0.0614735186 0.0531351306 0.0421144105
+ 0.0669660494 0.0580130592 0.0461965613
+ 0.0722220466 0.0627681389 0.0501793101
+ 0.0772255808 0.0672829002 0.0540068410
+ 0.0820826665 0.0715929568 0.0576650202
+ 0.0867473707 0.0758115426 0.0612268411
+ 0.0911795869 0.0799473077 0.0647046193
+ 0.0954854265 0.0839523673 0.0681224987
+ 0.0996826664 0.0878431126 0.0714934394
+ 0.1037980989 0.0916301981 0.0747776777
+ 0.1078191027 0.0953292921 0.0779552832
+ 0.1117319018 0.0989396721 0.0810553879
+ 0.1155693978 0.1024464965 0.0841333270
+ 0.1193092018 0.1058896035 0.0871890634
+ 0.1229984984 0.1092770025 0.0902054086
+ 0.1266297996 0.1126255989 0.0931699723
+ 0.1301828027 0.1159031019 0.0960779637
+ 0.1336570978 0.1191100031 0.0989290774
+ 0.1370528936 0.1222644001 0.1017358005
+ 0.1403681934 0.1253843009 0.1045102030
+ 0.1436405927 0.1284482032 0.1072589979
+ 0.1468632966 0.1314789057 0.1099923998
+ 0.1500498056 0.1344655007 0.1126931980
+ 0.1531880051 0.1374220997 0.1153720021
+ 0.1562644988 0.1403357983 0.1180130020
+ 0.1593036950 0.1431988031 0.1206170022
+ 0.1623243988 0.1460403949 0.1231862009
+ 0.1653179973 0.1488437951 0.1257254034
+ 0.1682834029 0.1516059935 0.1282379031
+ 0.1712214053 0.1543526053 0.1307227015
+ 0.1741254926 0.1570729017 0.1331889033
+ 0.1769879013 0.1597575992 0.1356364042
+ 0.1798096001 0.1624283046 0.1380718946
+ 0.1825927943 0.1650680006 0.1404998004
+ 0.1853370070 0.1676719934 0.1429184973
+ 0.1880521029 0.1702331007 0.1453085989
+ 0.1907549053 0.1727772951 0.1476781964
+ 0.1934437007 0.1753048003 0.1500300020
+ 0.1961088926 0.1777949929 0.1523580998
+ 0.1987465024 0.1802501976 0.1546709985
+ 0.2013590932 0.1826943010 0.1569592059
+ 0.2039510012 0.1851214021 0.1592251062
+ 0.2065189034 0.1875294000 0.1614681929
+ 0.2090530992 0.1899122000 0.1636908054
+ 0.2115564942 0.1922917962 0.1659017056
+ 0.2140268981 0.1946634054 0.1680952013
+ 0.2164652050 0.1970131993 0.1702757031
+ 0.2188750952 0.1993432045 0.1724483967
+ 0.2212729007 0.2016437054 0.1746093035
+ 0.2236527056 0.2039304972 0.1767639965
+ 0.2260089964 0.2062091976 0.1789053977
+ 0.2283485979 0.2084756047 0.1810386926
+ 0.2306748033 0.2107181996 0.1831596941
+ 0.2329774946 0.2129396051 0.1852661967
+ 0.2352634072 0.2151475996 0.1873624027
+ 0.2375380993 0.2173521072 0.1894447953
+ 0.2398073971 0.2195435017 0.1915135980
+ 0.2420687973 0.2217237949 0.1935653985
+ 0.2443214953 0.2238844931 0.1956079006
+ 0.2465686053 0.2260320932 0.1976383030
+ 0.2488050014 0.2281741947 0.1996645033
+ 0.2510258853 0.2303086966 0.2016756982
+ 0.2532328963 0.2324285060 0.2036695927
+ 0.2554255128 0.2345477939 0.2056519985
+ 0.2576034069 0.2366596013 0.2076213062
+ 0.2597728968 0.2387540042 0.2095845044
+ 0.2619242072 0.2408431023 0.2115366012
+ 0.2640654147 0.2429351956 0.2134785950
+ 0.2661896050 0.2450205982 0.2154116929
+ 0.2682917118 0.2470878959 0.2173403054
+ 0.2703784108 0.2491298020 0.2192642987
+ 0.2724463940 0.2511504889 0.2211790979
+ 0.2745001018 0.2531620860 0.2230885029
+ 0.2765473127 0.2551639080 0.2249957025
+ 0.2785851955 0.2571550012 0.2268918008
+ 0.2806180120 0.2591302097 0.2287832946
+ 0.2826406956 0.2611007094 0.2306707054
+ 0.2846564949 0.2630642056 0.2325448990
+ 0.2866632938 0.2650120854 0.2344118059
+ 0.2886619866 0.2669439912 0.2362738997
+ 0.2906560004 0.2688710988 0.2381276935
+ 0.2926402986 0.2707965970 0.2399802953
+ 0.2946187854 0.2727138996 0.2418286055
+ 0.2965883017 0.2746171057 0.2436629981
+ 0.2985542119 0.2765100896 0.2454881072
+ 0.3005166948 0.2783927023 0.2473084927
+ 0.3024731874 0.2802628875 0.2491195947
+ 0.3044191897 0.2821266055 0.2509351969
+ 0.3063541949 0.2839806080 0.2527473867
+ 0.3082849979 0.2858333886 0.2545492053
+ 0.3102098107 0.2876932919 0.2563391030
+ 0.3121250868 0.2895553112 0.2581259906
+ 0.3140304089 0.2914139032 0.2599045038
+ 0.3159317076 0.2932642996 0.2616701126
+ 0.3178148866 0.2951014042 0.2634266019
+ 0.3196887970 0.2969211042 0.2651784122
+ 0.3215618134 0.2987315953 0.2669197023
+ 0.3234333992 0.3005411923 0.2686525881
+ 0.3252997994 0.3023456931 0.2703748941
+ 0.3271591067 0.3041403890 0.2720899880
+ 0.3290081024 0.3059214950 0.2738001049
+ 0.3308455050 0.3076925874 0.2755038142
+ 0.3326750100 0.3094542027 0.2772029042
+ 0.3345032036 0.3112052083 0.2788943052
+ 0.3363313079 0.3129465878 0.2805776000
+ 0.3381510079 0.3146811128 0.2822565138
+ 0.3399673104 0.3164061010 0.2839331031
+ 0.3417668045 0.3181275129 0.2856017947
+ 0.3435564041 0.3198527992 0.2872670889
+ 0.3453372121 0.3215794861 0.2889324129
+ 0.3471119106 0.3233039975 0.2905947864
+ 0.3488827050 0.3250232041 0.2922506928
+ 0.3506490886 0.3267351091 0.2938998938
+ 0.3524067998 0.3284330070 0.2955498099
+ 0.3541550934 0.3301151097 0.2971960902
+ 0.3558937907 0.3317880034 0.2988429070
+ 0.3576247096 0.3334558010 0.3004919887
+ 0.3593502939 0.3351208866 0.3021433949
+ 0.3610683084 0.3367798030 0.3037939072
+ 0.3627772033 0.3384372890 0.3054369092
+ 0.3644764125 0.3400928974 0.3070757985
+ 0.3661648929 0.3417460024 0.3087131977
+ 0.3678394854 0.3433952034 0.3103514910
+ 0.3695080876 0.3450438976 0.3119843006
+ 0.3711709082 0.3466848135 0.3136082888
+ 0.3728272021 0.3483184874 0.3152261972
+ 0.3744739890 0.3499465883 0.3168402910
+ 0.3761177063 0.3515641093 0.3184512854
+ 0.3777532876 0.3531782925 0.3200559020
+ 0.3793804944 0.3547908962 0.3216531873
+ 0.3810012937 0.3564052880 0.3232400119
+ 0.3826153874 0.3580116034 0.3248240948
+ 0.3842233121 0.3596132994 0.3264040053
+ 0.3858231008 0.3612110019 0.3279787004
+ 0.3874185085 0.3627916873 0.3295400143
+ 0.3890103102 0.3643645048 0.3310950100
+ 0.3905987144 0.3659299016 0.3326450884
+ 0.3921895027 0.3674801886 0.3341901898
+ 0.3937751055 0.3690252006 0.3357275128
+ 0.3953565061 0.3705663085 0.3372594118
+ 0.3969357014 0.3721058071 0.3387841880
+ 0.3985069990 0.3736424148 0.3403007984
+ 0.4000718892 0.3751770854 0.3418123126
+ 0.4016300142 0.3767110109 0.3433167934
+ 0.4031783938 0.3782438040 0.3448176086
+ 0.4047181010 0.3797756135 0.3463155031
+ 0.4062578976 0.3813019097 0.3478057981
+ 0.4077931046 0.3828235865 0.3492931128
+ 0.4093224108 0.3843406141 0.3507778943
+ 0.4108479917 0.3858481050 0.3522605002
+ 0.4123688936 0.3873529136 0.3537409008
+ 0.4138790071 0.3888536990 0.3552181125
+ 0.4153836071 0.3903481066 0.3566935062
+ 0.4168849885 0.3918395936 0.3581683934
+ 0.4183782041 0.3933278024 0.3596439064
+ 0.4198674858 0.3948136866 0.3611176014
+ 0.4213511050 0.3962967098 0.3625896871
+ 0.4228254855 0.3977732062 0.3640539050
+ 0.4242956936 0.3992463946 0.3655144870
+ 0.4257540107 0.4007085860 0.3669649065
+ 0.4272057116 0.4021649063 0.3684150875
+ 0.4286471903 0.4036136866 0.3698649108
+ 0.4300779998 0.4050632119 0.3713107109
+ 0.4315038025 0.4065128863 0.3727546930
+ 0.4329301119 0.4079527855 0.3741905987
+ 0.4343521893 0.4093911052 0.3756245971
+ 0.4357595146 0.4108251035 0.3770546913
+ 0.4371610880 0.4122549891 0.3784829080
+ 0.4385559857 0.4136810899 0.3799099028
+ 0.4399372935 0.4150992930 0.3813312054
+ 0.4413124025 0.4165146947 0.3827508986
+ 0.4426822960 0.4179250002 0.3841583133
+ 0.4440504909 0.4193333089 0.3855640888
+ 0.4454061091 0.4207299948 0.3869630098
+ 0.4467600882 0.4221264124 0.3883576989
+ 0.4481090903 0.4235222936 0.3897452950
+ 0.4494557977 0.4249134958 0.3911296129
+ 0.4507992864 0.4262988865 0.3925110102
+ 0.4521391988 0.4276803136 0.3938843906
+ 0.4534761906 0.4290586114 0.3952535987
+ 0.4548082054 0.4304304123 0.3966163993
+ 0.4561375976 0.4317994118 0.3979771137
+ 0.4574612081 0.4331589937 0.3993296921
+ 0.4587827027 0.4345161915 0.4006809890
+ 0.4600965977 0.4358676076 0.4020248055
+ 0.4614087045 0.4372180998 0.4033680856
+ 0.4627130032 0.4385639131 0.4046998918
+ 0.4640161991 0.4399093091 0.4060314000
+ 0.4653095007 0.4412535131 0.4073561132
+ 0.4666016996 0.4425976872 0.4086807072
+ 0.4678846896 0.4439316094 0.4100016057
+ 0.4691669047 0.4452649951 0.4113222957
+ 0.4704379141 0.4465923905 0.4126363993
+ 0.4717079103 0.4479196072 0.4139505923
+ 0.4729768038 0.4492313862 0.4152606130
+ 0.4742454886 0.4505420923 0.4165706038
+ 0.4755127132 0.4518438876 0.4178735912
+ 0.4767796993 0.4531444907 0.4191763997
+ 0.4780431092 0.4544411004 0.4204703867
+ 0.4793055058 0.4557369947 0.4217635989
+ 0.4805589020 0.4570290148 0.4230574071
+ 0.4818083942 0.4583194852 0.4243515134
+ 0.4830555916 0.4596050978 0.4256447852
+ 0.4843012094 0.4608877003 0.4269377887
+ 0.4855448008 0.4621653855 0.4282276034
+ 0.4867860973 0.4634382129 0.4295150936
+ 0.4880253077 0.4647068083 0.4307982028
+ 0.4892593920 0.4659673870 0.4320754111
+ 0.4904916883 0.4672257006 0.4333496094
+ 0.4917111993 0.4684731960 0.4346148968
+ 0.4929307103 0.4697206914 0.4358800054
+ 0.4941438138 0.4709604084 0.4371437132
+ 0.4953565001 0.4722000062 0.4384073019
+ 0.4965640903 0.4734326899 0.4396674931
+ 0.4977697134 0.4746631980 0.4409270883
+ 0.4989753962 0.4758923054 0.4421825111
+ 0.5001811981 0.4771201015 0.4434351921
+ 0.5013839006 0.4783450067 0.4446885884
+ 0.5025752783 0.4795615971 0.4459435046
+ 0.5037667155 0.4807780981 0.4471982121
+ 0.5049498081 0.4819892943 0.4484477043
+ 0.5061323047 0.4832003117 0.4496971965
+ 0.5073093176 0.4844068885 0.4509449005
+ 0.5084829926 0.4856112003 0.4521920085
+ 0.5096563101 0.4868122041 0.4534366131
+ 0.5108284950 0.4880064130 0.4546774030
+ 0.5120006800 0.4892007113 0.4559176862
+ 0.5131582022 0.4903838933 0.4571487904
+ 0.5143144727 0.4915668964 0.4583798945
+ 0.5154706240 0.4927465916 0.4596010149
+ 0.5166264176 0.4939242899 0.4608170986
+ 0.5177810192 0.4951008856 0.4620308876
+ 0.5189288259 0.4962731004 0.4632383883
+ 0.5200765729 0.4974452853 0.4644457996
+ 0.5212227106 0.4986133873 0.4656499028
+ 0.5223680139 0.4997802079 0.4668532908
+ 0.5235089064 0.5009468198 0.4680534899
+ 0.5246378779 0.5021128058 0.4692485034
+ 0.5257669091 0.5032787919 0.4704434872
+ 0.5268948078 0.5044375062 0.4716280997
+ 0.5280222893 0.5055947900 0.4728116095
+ 0.5291473866 0.5067505240 0.4739918113
+ 0.5302665830 0.5079032779 0.4751670957
+ 0.5313857794 0.5090559721 0.4763424098
+ 0.5325024724 0.5101991296 0.4775088131
+ 0.5336183906 0.5113397837 0.4786739051
+ 0.5347307920 0.5124807954 0.4798345864
+ 0.5358300209 0.5136229992 0.4809859991
+ 0.5369291902 0.5147653222 0.4821374118
+ 0.5380263925 0.5159034729 0.4832834005
+ 0.5391222835 0.5170397162 0.4844275117
+ 0.5402178764 0.5181757212 0.4855712950
+ 0.5412973166 0.5193089843 0.4867131114
+ 0.5423766971 0.5204423070 0.4878548086
+ 0.5434548855 0.5215684772 0.4889939129
+ 0.5445311069 0.5226852298 0.4901303053
+ 0.5456073284 0.5238018036 0.4912666976
+ 0.5466775894 0.5249150991 0.4923954010
+ 0.5477457047 0.5260273814 0.4935226142
+ 0.5488138199 0.5271393061 0.4946480095
+ 0.5498805046 0.5282471776 0.4957635105
+ 0.5509471893 0.5293549895 0.4968788922
+ 0.5520086884 0.5304607153 0.4979912043
+ 0.5530598164 0.5315629244 0.4990994930
+ 0.5541110039 0.5326650143 0.5002077222
+ 0.5551608205 0.5337625146 0.5013095140
+ 0.5562096238 0.5348572731 0.5024083853
+ 0.5572584271 0.5359520912 0.5035073161
+ 0.5583010912 0.5370396972 0.5045971274
+ 0.5593425035 0.5381262898 0.5056862831
+ 0.5603839159 0.5392122269 0.5067744851
+ 0.5614247918 0.5402883887 0.5078564286
+ 0.5624656081 0.5413644910 0.5089381933
+ 0.5635035038 0.5424379706 0.5100173950
+ 0.5645298958 0.5435034037 0.5110903978
+ 0.5655562878 0.5445687771 0.5121634007
+ 0.5665822029 0.5456321836 0.5132340789
+ 0.5676072836 0.5466927290 0.5143020749
+ 0.5686323047 0.5477532148 0.5153701901
+ 0.5696542859 0.5488079190 0.5164343715
+ 0.5706726909 0.5498570204 0.5174958110
+ 0.5716910958 0.5509061813 0.5185571909
+ 0.5727097988 0.5519514084 0.5196129084
+ 0.5737286210 0.5529940128 0.5206657052
+ 0.5747473836 0.5540364981 0.5217186213
+ 0.5757570863 0.5550705791 0.5227680802
+ 0.5767611861 0.5561003089 0.5238164067
+ 0.5777652264 0.5571299195 0.5248646736
+ 0.5787636042 0.5581539273 0.5259051919
+ 0.5797588229 0.5591753721 0.5269432068
+ 0.5807541013 0.5601968765 0.5279811025
+ 0.5817455053 0.5612133145 0.5290176272
+ 0.5827348232 0.5622273088 0.5300536156
+ 0.5837240219 0.5632413030 0.5310897231
+ 0.5847098231 0.5642498732 0.5321198106
+ 0.5856931806 0.5652555823 0.5331475139
+ 0.5866767168 0.5662612915 0.5341752768
+ 0.5876535177 0.5672615767 0.5351998806
+ 0.5886247158 0.5682581067 0.5362228155
+ 0.5895959735 0.5692545772 0.5372456908
+ 0.5905644894 0.5702462792 0.5382614732
+ 0.5915299058 0.5712330937 0.5392717719
+ 0.5924953222 0.5722199082 0.5402820110
+ 0.5934591889 0.5732024908 0.5412889123
+ 0.5944200754 0.5741782784 0.5422912836
+ 0.5953810215 0.5751540065 0.5432937741
+ 0.5963401794 0.5761274099 0.5442951918
+ 0.5972915292 0.5770921111 0.5452939868
+ 0.5982427001 0.5780568123 0.5462927222
+ 0.5991939902 0.5790212750 0.5472911000
+ 0.6001344919 0.5799819231 0.5482859015
+ 0.6010748744 0.5809425116 0.5492805839
+ 0.6020153761 0.5819031000 0.5502753258
+ 0.6029484272 0.5828554034 0.5512647033
+ 0.6038792729 0.5838056803 0.5522533059
+ 0.6048101783 0.5847560167 0.5532417893
+ 0.6057401896 0.5857036710 0.5542263985
+ 0.6066694856 0.5866494179 0.5552083850
+ 0.6075987220 0.5875951052 0.5561903119
+ 0.6085264087 0.5885378718 0.5571714044
+ 0.6094487906 0.5894731283 0.5581504703
+ 0.6103712916 0.5904083252 0.5591297150
+ 0.6112936735 0.5913434029 0.5601087213
+ 0.6122087836 0.5922747254 0.5610769987
+ 0.6131231785 0.5932055712 0.5620452762
+ 0.6140375733 0.5941365957 0.5630136132
+ 0.6149482131 0.5950686932 0.5639781952
+ 0.6158558130 0.5960016251 0.5649409294
+ 0.6167634130 0.5969344974 0.5659034848
+ 0.6176698804 0.5978664160 0.5668659210
+ 0.6185709834 0.5987945795 0.5678272843
+ 0.6194720864 0.5997229218 0.5687887073
+ 0.6203731894 0.6006512046 0.5697500706
+ 0.6212695241 0.6015707254 0.5707088709
+ 0.6221640706 0.6024879217 0.5716670752
+ 0.6230587959 0.6034051180 0.5726253986
+ 0.6239500046 0.6043199897 0.5735797882
+ 0.6248329878 0.6052303910 0.5745280981
+ 0.6257159710 0.6061406732 0.5754765272
+ 0.6265990138 0.6070510149 0.5764248967
+ 0.6274775267 0.6079521179 0.5773686171
+ 0.6283550262 0.6088513732 0.5783116817
+ 0.6292325258 0.6097506881 0.5792549253
+ 0.6301056147 0.6106485724 0.5801956058
+ 0.6309671998 0.6115432978 0.5811319947
+ 0.6318287253 0.6124380231 0.5820685029
+ 0.6326903105 0.6133326292 0.5830048919
+ 0.6335496902 0.6142238975 0.5839343071
+ 0.6344081163 0.6151139736 0.5848619938
+ 0.6352664828 0.6160039902 0.5857896805
+ 0.6361234188 0.6168932915 0.5867152214
+ 0.6369684935 0.6177780032 0.5876327753
+ 0.6378136277 0.6186627150 0.5885503292
+ 0.6386587024 0.6195474267 0.5894678831
+ 0.6395034194 0.6204267144 0.5903825164
+ 0.6403477788 0.6213008165 0.5912950039
+ 0.6411921978 0.6221749187 0.5922073722
+ 0.6420364976 0.6230490208 0.5931199193
+ 0.6428722143 0.6239190102 0.5940275788
+ 0.6437057257 0.6247882843 0.5949348211
+ 0.6445392966 0.6256574988 0.5958420038
+ 0.6453729868 0.6265254021 0.5967481732
+ 0.6462082863 0.6273844838 0.5976504087
+ 0.6470435858 0.6282436848 0.5985525846
+ 0.6478788853 0.6291028261 0.5994548202
+ 0.6487107873 0.6299602985 0.6003562212
+ 0.6495367289 0.6308152080 0.6012567878
+ 0.6503624916 0.6316699982 0.6021572948
+ 0.6511883736 0.6325249076 0.6030578017
+ 0.6520127058 0.6333740950 0.6039531827
+ 0.6528357863 0.6342192888 0.6048460007
+ 0.6536588073 0.6350646019 0.6057388186
+ 0.6544818878 0.6359099150 0.6066315174
+ 0.6552997231 0.6367524266 0.6075202823
+ 0.6561157107 0.6375942230 0.6084082127
+ 0.6569316983 0.6384360194 0.6092960835
+ 0.6577478051 0.6392776966 0.6101840734
+ 0.6585525870 0.6401113272 0.6110618114
+ 0.6593559980 0.6409441233 0.6119391918
+ 0.6601594090 0.6417768002 0.6128165722
+ 0.6609628201 0.6426095963 0.6136940122
+ 0.6617612243 0.6434395909 0.6145706177
+ 0.6625593901 0.6442695856 0.6154471040
+ 0.6633576155 0.6450996995 0.6163237095
+ 0.6641554832 0.6459290981 0.6171987057
+ 0.6649441123 0.6467508078 0.6180636287
+ 0.6657326818 0.6475725174 0.6189286113
+ 0.6665213108 0.6483941078 0.6197934747
+ 0.6673098207 0.6492155790 0.6206579804
+ 0.6680960059 0.6500353217 0.6215201020
+ 0.6688820720 0.6508548856 0.6223822236
+ 0.6696683168 0.6516745090 0.6232442856
+ 0.6704540849 0.6524934769 0.6241046190
+ 0.6712335944 0.6533043981 0.6249533296
+ 0.6720131040 0.6541153789 0.6258019209
+ 0.6727924943 0.6549263000 0.6266505718
+ 0.6735720038 0.6557372212 0.6274989247
+ 0.6743516922 0.6565400958 0.6283429265
+ 0.6751313806 0.6573429704 0.6291869879
+ 0.6759110093 0.6581459045 0.6300309896
+ 0.6766906977 0.6589487791 0.6308749914
+ 0.6774597764 0.6597450972 0.6317095160
+ 0.6782273054 0.6605407000 0.6325436831
+ 0.6789947748 0.6613361835 0.6333777905
+ 0.6797623038 0.6621317863 0.6342120171
+ 0.6805222034 0.6629223824 0.6350417733
+ 0.6812793016 0.6637114286 0.6358706951
+ 0.6820363998 0.6645004153 0.6366994977
+ 0.6827934980 0.6652892828 0.6375284195
+ 0.6835458279 0.6660748124 0.6383498907
+ 0.6842942834 0.6668576002 0.6391670704
+ 0.6850426793 0.6676403880 0.6399844289
+ 0.6857910752 0.6684231758 0.6408016086
+ 0.6865373254 0.6692041755 0.6416165233
+ 0.6872786283 0.6699815989 0.6424279809
+ 0.6880199909 0.6707590222 0.6432394981
+ 0.6887614131 0.6715363860 0.6440510154
+ 0.6895024776 0.6723132730 0.6448624134
+ 0.6902387142 0.6730847955 0.6456729770
+ 0.6909748912 0.6738561988 0.6464836001
+ 0.6917111278 0.6746276021 0.6472942829
+ 0.6924473047 0.6753990054 0.6481049061
+ 0.6931800246 0.6761628985 0.6489096880
+ 0.6939114928 0.6769244075 0.6497132778
+ 0.6946430206 0.6776859164 0.6505168080
+ 0.6953744888 0.6784474254 0.6513202786
+ 0.6961029768 0.6792098284 0.6521201730
+ 0.6968262792 0.6799734235 0.6529155970
+ 0.6975495815 0.6807370782 0.6537110806
+ 0.6982728839 0.6815006733 0.6545065045
+ 0.6989961863 0.6822643876 0.6553019285
+ 0.6997179985 0.6830213070 0.6560959816
+ 0.7004398108 0.6837782264 0.6568900943
+ 0.7011616230 0.6845350862 0.6576842070
+ 0.7018833756 0.6852920055 0.6584783792
+ 0.7026001811 0.6860477924 0.6592714190
+ 0.7033123970 0.6868026257 0.6600636244
+ 0.7040244937 0.6875573993 0.6608558893
+ 0.7047367096 0.6883121729 0.6616480947
+ 0.7054488063 0.6890667081 0.6624394059
+ 0.7061572075 0.6898154020 0.6632227898
+ 0.7068657279 0.6905639768 0.6640061736
+ 0.7075741887 0.6913126707 0.6647896171
+ 0.7082825899 0.6920614243 0.6655731201
+ 0.7089877129 0.6928064823 0.6663510203
+ 0.7096893191 0.6935483217 0.6671249866
+ 0.7103909254 0.6942901015 0.6678988934
+ 0.7110924125 0.6950318813 0.6686729193
+ 0.7117940187 0.6957737207 0.6694468260
+ 0.7124900222 0.6965091825 0.6702172756
+ 0.7131854892 0.6972442269 0.6709877253
+ 0.7138808966 0.6979792118 0.6717581749
+ 0.7145763040 0.6987141967 0.6725286841
+ 0.7152705789 0.6994475722 0.6732978225
+ 0.7159615159 0.7001774907 0.6740645170
+ 0.7166523933 0.7009072900 0.6748312116
+ 0.7173433900 0.7016372085 0.6755979061
+ 0.7180343270 0.7023670077 0.6763646007
+ 0.7187235951 0.7030938864 0.6771286130
+ 0.7194116116 0.7038189769 0.6778911948
+ 0.7200996876 0.7045441866 0.6786538959
+ 0.7207878232 0.7052692771 0.6794165969
+ 0.7214757800 0.7059944272 0.6801792979
+ 0.7221612930 0.7067067027 0.6809418201
+ 0.7228463292 0.7074177265 0.6817042828
+ 0.7235314250 0.7081285715 0.6824668050
+ 0.7242164016 0.7088394761 0.6832293868
+ 0.7249004245 0.7095499039 0.6839907765
+ 0.7255744934 0.7102571726 0.6847469211
+ 0.7262486219 0.7109643817 0.6855030060
+ 0.7269226909 0.7116715908 0.6862590909
+ 0.7275968194 0.7123787999 0.6870152950
+ 0.7282711864 0.7130823135 0.6877691150
+ 0.7289463878 0.7137774229 0.6885187030
+ 0.7296215892 0.7144724131 0.6892682910
+ 0.7302967906 0.7151675224 0.6900178790
+ 0.7309719920 0.7158625722 0.6907675266
+ 0.7316445112 0.7165569067 0.6915168762
+ 0.7323129177 0.7172502875 0.6922662854
+ 0.7329813838 0.7179437280 0.6930155754
+ 0.7336499095 0.7186371088 0.6937649846
+ 0.7343183160 0.7193304896 0.6945142746
+ 0.7349863052 0.7200188041 0.6952630281
+ 0.7356538177 0.7207021713 0.6960111856
+ 0.7363212705 0.7213857174 0.6967594028
+ 0.7369887829 0.7220690846 0.6975076199
+ 0.7376562953 0.7227525711 0.6982558966
+ 0.7383213043 0.7234362960 0.6990029812
+ 0.7389839888 0.7241200805 0.6997492909
+ 0.7396466136 0.7248039842 0.7004957199
+ 0.7403091788 0.7254878879 0.7012420297
+ 0.7409719229 0.7261717916 0.7019883990
+ 0.7416300774 0.7268511057 0.7027307153
+ 0.7422838807 0.7275264263 0.7034698725
+ 0.7429378033 0.7282016873 0.7042092085
+ 0.7435916066 0.7288768888 0.7049484849
+ 0.7442454100 0.7295522094 0.7056878209
+ 0.7448980212 0.7302259803 0.7064262033
+ 0.7455489039 0.7308980823 0.7071638703
+ 0.7461997867 0.7315703034 0.7079014778
+ 0.7468507886 0.7322424054 0.7086392045
+ 0.7475016713 0.7329145074 0.7093768120
+ 0.7481493950 0.7335844040 0.7101135850
+ 0.7487897873 0.7342495918 0.7108489275
+ 0.7494302988 0.7349148989 0.7115842104
+ 0.7500706911 0.7355802059 0.7123194933
+ 0.7507110834 0.7362453938 0.7130547762
+ 0.7513517141 0.7369098067 0.7137894034
+ 0.7519931793 0.7375693917 0.7145212889
+ 0.7526347041 0.7382289171 0.7152531743
+ 0.7532762289 0.7388885021 0.7159851789
+ 0.7539176941 0.7395480871 0.7167171240
+ 0.7545592189 0.7402076125 0.7174490094
+ 0.7551949024 0.7408636212 0.7181727290
+ 0.7558298707 0.7415192723 0.7188962102
+ 0.7564650178 0.7421751022 0.7196195722
+ 0.7570999861 0.7428308129 0.7203431129
+ 0.7577350736 0.7434865236 0.7210665941
+ 0.7583732009 0.7441366911 0.7217879295
+ 0.7590131760 0.7447838783 0.7225083709
+ 0.7596532106 0.7454311252 0.7232288122
+ 0.7602931261 0.7460783124 0.7239493132
+ 0.7609331012 0.7467254996 0.7246696949
+ 0.7615718842 0.7473719120 0.7253888845
+ 0.7622076869 0.7480165958 0.7261058092
+ 0.7628436089 0.7486613989 0.7268226743
+ 0.7634794116 0.7493060827 0.7275395989
+ 0.7641152740 0.7499508858 0.7282565236
+ 0.7647510767 0.7505956888 0.7289733887
+ 0.7653750777 0.7512348294 0.7296857238
+ 0.7659978271 0.7518734932 0.7303978801
+ 0.7666205168 0.7525122166 0.7311100960
+ 0.7672433257 0.7531508803 0.7318223119
+ 0.7678660154 0.7537896037 0.7325345278
+ 0.7684878707 0.7544282079 0.7332416177
+ 0.7691087723 0.7550666928 0.7339441776
+ 0.7697296739 0.7557051778 0.7346469164
+ 0.7703505754 0.7563437223 0.7353495955
+ 0.7709714770 0.7569822073 0.7360522151
+ 0.7715923786 0.7576206923 0.7367547154
+ 0.7722045183 0.7582557797 0.7374516726
+ 0.7728161812 0.7588909268 0.7381488085
+ 0.7734280229 0.7595258951 0.7388458848
+ 0.7740396857 0.7601609230 0.7395429015
+ 0.7746515274 0.7607960105 0.7402399778
+ 0.7752640843 0.7614319921 0.7409328818
+ 0.7758777738 0.7620692253 0.7416213751
+ 0.7764915824 0.7627063990 0.7423098087
+ 0.7771053910 0.7633436918 0.7429983020
+ 0.7777191997 0.7639809251 0.7436866760
+ 0.7783328891 0.7646180987 0.7443752289
+ 0.7789419293 0.7652487159 0.7450602055
+ 0.7795497179 0.7658780217 0.7457447052
+ 0.7801573873 0.7665072083 0.7464292049
+ 0.7807651758 0.7671365142 0.7471137047
+ 0.7813730240 0.7677657008 0.7477982044
+ 0.7819799781 0.7683938742 0.7484809160
+ 0.7825825810 0.7690163851 0.7491562963
+ 0.7831851840 0.7696390152 0.7498317957
+ 0.7837877870 0.7702615261 0.7505072951
+ 0.7843903899 0.7708839774 0.7511827946
+ 0.7849929929 0.7715066075 0.7518582940
+ 0.7855939269 0.7721267939 0.7525311708
+ 0.7861924767 0.7727441788 0.7532013059
+ 0.7867910862 0.7733615041 0.7538713813
+ 0.7873896956 0.7739788890 0.7545415163
+ 0.7879884243 0.7745962143 0.7552115917
+ 0.7885869741 0.7752135992 0.7558817267
+ 0.7891780734 0.7758283019 0.7565454841
+ 0.7897650003 0.7764415741 0.7572066784
+ 0.7903518081 0.7770550251 0.7578678131
+ 0.7909386158 0.7776682973 0.7585290074
+ 0.7915254831 0.7782816291 0.7591902018
+ 0.7921122909 0.7788950205 0.7598512769
+ 0.7926985025 0.7795063257 0.7605091929
+ 0.7932845950 0.7801172137 0.7611665130
+ 0.7938706875 0.7807281017 0.7618237734
+ 0.7944567800 0.7813388705 0.7624810934
+ 0.7950428724 0.7819498181 0.7631384134
+ 0.7956290245 0.7825607061 0.7637956738
+ 0.7962080836 0.7831704021 0.7644450068
+ 0.7967863083 0.7837799191 0.7650939226
+ 0.7973645926 0.7843893766 0.7657428980
+ 0.7979428768 0.7849990129 0.7663918138
+ 0.7985212207 0.7856084704 0.7670407295
+ 0.7990993857 0.7862181067 0.7676897049
+ 0.7996805906 0.7868278027 0.7683331966
+ 0.8002619147 0.7874376178 0.7689768076
+ 0.8008431792 0.7880473733 0.7696204185
+ 0.8014245033 0.7886571884 0.7702640295
+ 0.8020058274 0.7892670035 0.7709075212
+ 0.8025872111 0.7898766994 0.7715510726
+ 0.8031632900 0.7904822826 0.7721858025
+ 0.8037390113 0.7910876274 0.7728202939
+ 0.8043146133 0.7916929126 0.7734547853
+ 0.8048902750 0.7922981977 0.7740892768
+ 0.8054659963 0.7929034829 0.7747238278
+ 0.8060415983 0.7935088277 0.7753583193
+ 0.8066141009 0.7941111922 0.7759894729
+ 0.8071860075 0.7947131991 0.7766203284
+ 0.8077577949 0.7953152061 0.7772511244
+ 0.8083297014 0.7959172130 0.7778819203
+ 0.8089016080 0.7965192199 0.7785127163
+ 0.8094733953 0.7971212268 0.7791435122
+ 0.8100445867 0.7977176905 0.7797755003
+ 0.8106154203 0.7983120084 0.7804080248
+ 0.8111861944 0.7989063859 0.7810403705
+ 0.8117570281 0.7995008230 0.7816727757
+ 0.8123278022 0.8000950813 0.7823051810
+ 0.8128986955 0.8006895185 0.7829377055
+ 0.8134648800 0.8012806177 0.7835683227
+ 0.8140262961 0.8018686175 0.7841975093
+ 0.8145877123 0.8024566174 0.7848265767
+ 0.8151491284 0.8030446172 0.7854558229
+ 0.8157104254 0.8036326170 0.7860850096
+ 0.8162717819 0.8042206168 0.7867141962
+ 0.8168334961 0.8048074245 0.7873411179
+ 0.8173961043 0.8053904772 0.7879621983
+ 0.8179587126 0.8059734702 0.7885832787
+ 0.8185213208 0.8065565825 0.7892044187
+ 0.8190839291 0.8071395755 0.7898254991
+ 0.8196464181 0.8077226877 0.7904465795
+ 0.8202090263 0.8083056808 0.7910677195
+ 0.8207656741 0.8088853955 0.7916854024
+ 0.8213217258 0.8094648123 0.7923029065
+ 0.8218777776 0.8100442290 0.7929204702
+ 0.8224338293 0.8106235862 0.7935379744
+ 0.8229898214 0.8112030029 0.7941555977
+ 0.8235458136 0.8117823005 0.7947731018
+ 0.8241016269 0.8123605251 0.7953892946
+ 0.8246573806 0.8129374981 0.7960044146
+ 0.8252130747 0.8135144711 0.7966195941
+ 0.8257688284 0.8140915036 0.7972347140
+ 0.8263245225 0.8146684766 0.7978497744
+ 0.8268802166 0.8152455091 0.7984648943
+ 0.8274357915 0.8158224225 0.7990797758
+ 0.8279883265 0.8163983822 0.7996929288
+ 0.8285408020 0.8169744015 0.8003060222
+ 0.8290932178 0.8175503016 0.8009191155
+ 0.8296456933 0.8181263208 0.8015322089
+ 0.8301981091 0.8187022805 0.8021453023
+ 0.8307505846 0.8192781806 0.8027585149
+ 0.8312999010 0.8198543191 0.8033677936
+ 0.8318461776 0.8204303980 0.8039743900
+ 0.8323925138 0.8210065961 0.8045809269
+ 0.8329387903 0.8215826750 0.8051874042
+ 0.8334850073 0.8221588731 0.8057940006
+ 0.8340312839 0.8227350116 0.8064004779
+ 0.8345776200 0.8233110905 0.8070070148
+ 0.8351238966 0.8238831758 0.8076115251
+ 0.8356701732 0.8244549036 0.8082157969
+ 0.8362163901 0.8250266910 0.8088201880
+ 0.8367627263 0.8255984783 0.8094245195
+ 0.8373090029 0.8261703253 0.8100289106
+ 0.8378552794 0.8267419934 0.8106333017
+ 0.8383994102 0.8273130059 0.8112372160
+ 0.8389375210 0.8278818130 0.8118401766
+ 0.8394755125 0.8284506202 0.8124431968
+ 0.8400135040 0.8290194273 0.8130462170
+ 0.8405516148 0.8295882940 0.8136492968
+ 0.8410896063 0.8301571012 0.8142523170
+ 0.8416277170 0.8307259083 0.8148552775
+ 0.8421646953 0.8312906027 0.8154578805
+ 0.8427007198 0.8318520188 0.8160601258
+ 0.8432368040 0.8324133754 0.8166623712
+ 0.8437728882 0.8329747915 0.8172646761
+ 0.8443089128 0.8335362077 0.8178669214
+ 0.8448449969 0.8340976238 0.8184692264
+ 0.8453810811 0.8346589208 0.8190714717
+ 0.8459135294 0.8352158070 0.8196697235
+ 0.8464447260 0.8357713223 0.8202667832
+ 0.8469758034 0.8363267183 0.8208639026
+ 0.8475070000 0.8368821740 0.8214610815
+ 0.8480380774 0.8374376297 0.8220582008
+ 0.8485692739 0.8379930854 0.8226553202
+ 0.8491004705 0.8385484815 0.8232524991
+ 0.8496297002 0.8390995860 0.8238487840
+ 0.8501586914 0.8396500945 0.8244450092
+ 0.8506876230 0.8402007222 0.8250411749
+ 0.8512166142 0.8407511711 0.8256375194
+ 0.8517454863 0.8413017988 0.8262336850
+ 0.8522744775 0.8418524265 0.8268299103
+ 0.8528034091 0.8424028754 0.8274261951
+ 0.8533318043 0.8429502249 0.8280221224
+ 0.8538600802 0.8434972763 0.8286179900
+ 0.8543884158 0.8440443873 0.8292139173
+ 0.8549165726 0.8445914984 0.8298097849
+ 0.8554449081 0.8451387286 0.8304055929
+ 0.8559731841 0.8456857800 0.8310015202
+ 0.8565015197 0.8462328911 0.8315973878
+ 0.8570210934 0.8467777967 0.8321936727
+ 0.8575400710 0.8473225236 0.8327900171
+ 0.8580591083 0.8478673100 0.8333863020
+ 0.8585780859 0.8484120965 0.8339825869
+ 0.8590971231 0.8489568233 0.8345788717
+ 0.8596161008 0.8495016098 0.8351752162
+ 0.8601350784 0.8500462770 0.8357715011
+ 0.8606511950 0.8505902290 0.8363643289
+ 0.8611670136 0.8511340022 0.8369567990
+ 0.8616827726 0.8516777754 0.8375492096
+ 0.8621984720 0.8522216082 0.8381416798
+ 0.8627142906 0.8527653813 0.8387340903
+ 0.8632301092 0.8533092141 0.8393266201
+ 0.8637458086 0.8538529277 0.8399189711
+ 0.8642572165 0.8543968201 0.8405116796
+ 0.8647668958 0.8549407721 0.8411043286
+ 0.8652765751 0.8554847240 0.8416969776
+ 0.8657861948 0.8560286164 0.8422896862
+ 0.8662958741 0.8565725088 0.8428823948
+ 0.8668056130 0.8571164012 0.8434751034
+ 0.8673152924 0.8576604128 0.8440678120
+ 0.8678231835 0.8582047224 0.8446561098
+ 0.8683292866 0.8587492704 0.8452408910
+ 0.8688353896 0.8592939973 0.8458256721
+ 0.8693414927 0.8598386049 0.8464105129
+ 0.8698475957 0.8603832126 0.8469954133
+ 0.8703536987 0.8609278798 0.8475801945
+ 0.8708598018 0.8614724874 0.8481649756
+ 0.8713654876 0.8620167971 0.8487496972
+ 0.8718695045 0.8625596166 0.8493341804
+ 0.8723735213 0.8631023765 0.8499186039
+ 0.8728774786 0.8636453152 0.8505030870
+ 0.8733814955 0.8641880751 0.8510875106
+ 0.8738855124 0.8647310138 0.8516719937
+ 0.8743895292 0.8652737737 0.8522564173
+ 0.8748934865 0.8658165932 0.8528409004
+ 0.8753938079 0.8663538098 0.8534224033
+ 0.8758934140 0.8668900728 0.8540034890
+ 0.8763929009 0.8674263954 0.8545845747
+ 0.8768925071 0.8679627180 0.8551657796
+ 0.8773921132 0.8684989810 0.8557469249
+ 0.8778917193 0.8690353036 0.8563281298
+ 0.8783912063 0.8695716262 0.8569092155
+ 0.8788912296 0.8701056838 0.8574905992
+ 0.8793917894 0.8706367016 0.8580724001
+ 0.8798922896 0.8711677194 0.8586542010
+ 0.8803929090 0.8716986179 0.8592360020
+ 0.8808934093 0.8722295761 0.8598178029
+ 0.8813939095 0.8727605939 0.8603996038
+ 0.8818945289 0.8732916117 0.8609814048
+ 0.8823950291 0.8738226295 0.8615632057
+ 0.8828893900 0.8743497729 0.8621373773
+ 0.8833830953 0.8748766780 0.8627110124
+ 0.8838766813 0.8754035234 0.8632845879
+ 0.8843703866 0.8759304285 0.8638582826
+ 0.8848639727 0.8764572740 0.8644319177
+ 0.8853576779 0.8769841194 0.8650054932
+ 0.8858513236 0.8775110245 0.8655791879
+ 0.8863434792 0.8780369163 0.8661512136
+ 0.8868324161 0.8785607815 0.8667200804
+ 0.8873211741 0.8790847063 0.8672890067
+ 0.8878101110 0.8796085715 0.8678578734
+ 0.8882989287 0.8801324964 0.8684269190
+ 0.8887878060 0.8806564212 0.8689957857
+ 0.8892766237 0.8811802864 0.8695647120
+ 0.8897655010 0.8817042112 0.8701335788
+ 0.8902524710 0.8822268844 0.8707010746
+ 0.8907384276 0.8827490807 0.8712677956
+ 0.8912243247 0.8832712173 0.8718345165
+ 0.8917102218 0.8837932944 0.8724011779
+ 0.8921961784 0.8843153715 0.8729678988
+ 0.8926820755 0.8848375082 0.8735346794
+ 0.8931679726 0.8853595853 0.8741014004
+ 0.8936539292 0.8858817220 0.8746681213
+ 0.8941388726 0.8864020705 0.8752362132
+ 0.8946238160 0.8869222999 0.8758044243
+ 0.8951086998 0.8874425292 0.8763725758
+ 0.8955935836 0.8879626989 0.8769407272
+ 0.8960784078 0.8884829283 0.8775088787
+ 0.8965632915 0.8890030980 0.8780770898
+ 0.8970481753 0.8895233274 0.8786453009
+ 0.8975331187 0.8900429010 0.8792127967
+ 0.8980188966 0.8905553818 0.8797736764
+ 0.8985047936 0.8910679221 0.8803346753
+ 0.8989905715 0.8915804029 0.8808956146
+ 0.8994764090 0.8920928836 0.8814566135
+ 0.8999621868 0.8926054239 0.8820174932
+ 0.9004480243 0.8931179047 0.8825784922
+ 0.9009338021 0.8936303854 0.8831393719
+ 0.9014185071 0.8941423297 0.8836997151
+ 0.9018970132 0.8946514130 0.8842570186
+ 0.9023755193 0.8951604962 0.8848143816
+ 0.9028540850 0.8956695795 0.8853718042
+ 0.9033325911 0.8961787224 0.8859291077
+ 0.9038110971 0.8966878057 0.8864864707
+ 0.9042896032 0.8971968889 0.8870438933
+ 0.9047682285 0.8977059722 0.8876011968
+ 0.9052457213 0.8982139826 0.8881582022
+ 0.9057186246 0.8987172842 0.8887138963
+ 0.9061915278 0.8992205858 0.8892694712
+ 0.9066643715 0.8997240067 0.8898251057
+ 0.9071372747 0.9002273083 0.8903806806
+ 0.9076101780 0.9007306099 0.8909363747
+ 0.9080830812 0.9012339711 0.8914920092
+ 0.9085559845 0.9017372727 0.8920475841
+ 0.9090284705 0.9022399783 0.8926029801
+ 0.9094979763 0.9027382135 0.8931568265
+ 0.9099674821 0.9032363892 0.8937106133
+ 0.9104369879 0.9037346244 0.8942644000
+ 0.9109064937 0.9042328000 0.8948181868
+ 0.9113758802 0.9047309756 0.8953719735
+ 0.9118453860 0.9052292109 0.8959258795
+ 0.9123148918 0.9057273865 0.8964797258
+ 0.9127843976 0.9062256217 0.8970335126
+ 0.9132521152 0.9067198038 0.8975815177
+ 0.9137197137 0.9072139859 0.8981294036
+ 0.9141873121 0.9077082276 0.8986774087
+ 0.9146549106 0.9082024097 0.8992254138
+ 0.9151225090 0.9086964726 0.8997734189
+ 0.9155901074 0.9091907144 0.9003213048
+ 0.9160577059 0.9096848965 0.9008693099
+ 0.9165253043 0.9101790786 0.9014173150
+ 0.9169932008 0.9106711745 0.9019637108
+ 0.9174610972 0.9111626744 0.9025096893
+ 0.9179289937 0.9116541147 0.9030556083
+ 0.9183970094 0.9121456146 0.9036015868
+ 0.9188649058 0.9126371145 0.9041476250
+ 0.9193328023 0.9131284952 0.9046934843
+ 0.9198008180 0.9136199951 0.9052395225
+ 0.9202687144 0.9141113758 0.9057855010
+ 0.9207351208 0.9146016240 0.9063286781
+ 0.9211995006 0.9150900841 0.9068685770
+ 0.9216638803 0.9155786037 0.9074085951
+ 0.9221282005 0.9160671234 0.9079484940
+ 0.9225925803 0.9165555835 0.9084883928
+ 0.9230570197 0.9170441031 0.9090284109
+ 0.9235213995 0.9175326228 0.9095683098
+ 0.9239857793 0.9180210829 0.9101082087
+ 0.9244499803 0.9185094237 0.9106479287
+ 0.9249091148 0.9189893007 0.9111825824
+ 0.9253680706 0.9194691777 0.9117174149
+ 0.9258272052 0.9199491143 0.9122521281
+ 0.9262862802 0.9204289913 0.9127867818
+ 0.9267452955 0.9209089279 0.9133216143
+ 0.9272043705 0.9213888049 0.9138563275
+ 0.9276635051 0.9218686819 0.9143911004
+ 0.9281225204 0.9223486781 0.9149258137
+ 0.9285796285 0.9228286147 0.9154574275
+ 0.9290350080 0.9233084917 0.9159867167
+ 0.9294903278 0.9237884879 0.9165160060
+ 0.9299457073 0.9242684245 0.9170452952
+ 0.9304010868 0.9247484207 0.9175745845
+ 0.9308564067 0.9252282977 0.9181038737
+ 0.9313117862 0.9257081747 0.9186331034
+ 0.9317672253 0.9261881709 0.9191623926
+ 0.9322224855 0.9266681075 0.9196916819
+ 0.9326751828 0.9271426201 0.9202163219
+ 0.9331278205 0.9276170135 0.9207410216
+ 0.9335802794 0.9280914068 0.9212656021
+ 0.9340329170 0.9285659194 0.9217903018
+ 0.9344854951 0.9290403128 0.9223148823
+ 0.9349380732 0.9295147061 0.9228395224
+ 0.9353907108 0.9299890995 0.9233642220
+ 0.9358432293 0.9304634929 0.9238888025
+ 0.9362943769 0.9309374094 0.9244117737
+ 0.9367427230 0.9314103723 0.9249315858
+ 0.9371910095 0.9318832755 0.9254513979
+ 0.9376392961 0.9323561788 0.9259712100
+ 0.9380875230 0.9328290820 0.9264910221
+ 0.9385358095 0.9333021045 0.9270107746
+ 0.9389840961 0.9337750077 0.9275305867
+ 0.9394323230 0.9342479110 0.9280503988
+ 0.9398806095 0.9347208738 0.9285702109
+ 0.9403269887 0.9351912737 0.9290875196
+ 0.9407718778 0.9356600046 0.9296032190
+ 0.9412168264 0.9361286759 0.9301189184
+ 0.9416617155 0.9365974069 0.9306346178
+ 0.9421066046 0.9370660186 0.9311503172
+ 0.9425514936 0.9375346899 0.9316660762
+ 0.9429963827 0.9380034208 0.9321817756
+ 0.9434412718 0.9384720922 0.9326974750
+ 0.9438862205 0.9389408231 0.9332131743
+ 0.9443271160 0.9394043088 0.9337257743
+ 0.9447665811 0.9398661256 0.9342374206
+ 0.9452061057 0.9403278232 0.9347491264
+ 0.9456455708 0.9407895803 0.9352607131
+ 0.9460850954 0.9412513971 0.9357724190
+ 0.9465246201 0.9417132139 0.9362840056
+ 0.9469640851 0.9421749711 0.9367957115
+ 0.9474036098 0.9426367879 0.9373072982
+ 0.9478430748 0.9430986047 0.9378190041
+ 0.9482764006 0.9435576797 0.9383267164
+ 0.9487082958 0.9440163970 0.9388335943
+ 0.9491403103 0.9444751143 0.9393405914
+ 0.9495722055 0.9449337125 0.9398475289
+ 0.9500042200 0.9453923702 0.9403545260
+ 0.9504361153 0.9458510280 0.9408614039
+ 0.9508681297 0.9463096857 0.9413684011
+ 0.9513000250 0.9467684031 0.9418752789
+ 0.9517319202 0.9472270012 0.9423822761
+ 0.9521591067 0.9476765990 0.9428793192
+ 0.9525852203 0.9481241703 0.9433743954
+ 0.9530112147 0.9485718012 0.9438694119
+ 0.9534373283 0.9490193725 0.9443644881
+ 0.9538633823 0.9494670033 0.9448595047
+ 0.9542894959 0.9499145746 0.9453545809
+ 0.9547154903 0.9503622055 0.9458495975
+ 0.9551416039 0.9508097768 0.9463446736
+ 0.9555677176 0.9512574077 0.9468396902
+ 0.9559904933 0.9517037272 0.9473326802
+ 0.9564120173 0.9521496296 0.9478248954
+ 0.9568334818 0.9525954723 0.9483171105
+ 0.9572550058 0.9530413151 0.9488093257
+ 0.9576764703 0.9534872174 0.9493014812
+ 0.9580979943 0.9539331198 0.9497936964
+ 0.9585195184 0.9543790221 0.9502857924
+ 0.9589411020 0.9548248053 0.9507780075
+ 0.9593626261 0.9552707076 0.9512702227
+ 0.9597812295 0.9557142258 0.9517591000
+ 0.9601970911 0.9561554790 0.9522449970
+ 0.9606130123 0.9565967917 0.9527308941
+ 0.9610288739 0.9570381045 0.9532167912
+ 0.9614447951 0.9574794769 0.9537026286
+ 0.9618607163 0.9579207897 0.9541885257
+ 0.9622765779 0.9583621025 0.9546744227
+ 0.9626924992 0.9588034153 0.9551603198
+ 0.9631084204 0.9592447281 0.9556462169
+ 0.9635230899 0.9596858025 0.9561312199
+ 0.9639335871 0.9601259232 0.9566131830
+ 0.9643440843 0.9605661035 0.9570953250
+ 0.9647545815 0.9610062838 0.9575772882
+ 0.9651650786 0.9614465237 0.9580593705
+ 0.9655756950 0.9618865848 0.9585415125
+ 0.9659861922 0.9623268247 0.9590234756
+ 0.9663966894 0.9627670050 0.9595056176
+ 0.9668071866 0.9632071257 0.9599875808
+ 0.9672178030 0.9636473060 0.9604697227
+ 0.9676215053 0.9640840888 0.9609463215
+ 0.9680240750 0.9645202756 0.9614219069
+ 0.9684265852 0.9649565220 0.9618974924
+ 0.9688292146 0.9653928280 0.9623731971
+ 0.9692317247 0.9658290148 0.9628487825
+ 0.9696341753 0.9662652016 0.9633244276
+ 0.9700368047 0.9667013884 0.9638000727
+ 0.9704393148 0.9671375751 0.9642757177
+ 0.9708418846 0.9675738215 0.9647514224
+ 0.9712424874 0.9680083990 0.9652252197
+ 0.9716396928 0.9684401751 0.9656959176
+ 0.9720370173 0.9688720703 0.9661666155
+ 0.9724342227 0.9693039060 0.9666373730
+ 0.9728314877 0.9697356820 0.9671080709
+ 0.9732288122 0.9701675177 0.9675788283
+ 0.9736260176 0.9705992937 0.9680495858
+ 0.9740232825 0.9710311294 0.9685202837
+ 0.9744204879 0.9714629054 0.9689909816
+ 0.9748178124 0.9718946815 0.9694617987
+ 0.9752097726 0.9723225832 0.9699270725
+ 0.9756003022 0.9727494121 0.9703910947
+ 0.9759908915 0.9731763005 0.9708551168
+ 0.9763814807 0.9736031294 0.9713190794
+ 0.9767721295 0.9740298986 0.9717831016
+ 0.9771627188 0.9744567275 0.9722471833
+ 0.9775531888 0.9748836160 0.9727112055
+ 0.9779437780 0.9753103852 0.9731752276
+ 0.9783344269 0.9757372141 0.9736391902
+ 0.9787241220 0.9761633873 0.9741021991
+ 0.9791072011 0.9765844941 0.9745585918
+ 0.9794903994 0.9770057201 0.9750149846
+ 0.9798734784 0.9774268866 0.9754713178
+ 0.9802566767 0.9778481126 0.9759277105
+ 0.9806398153 0.9782692194 0.9763841033
+ 0.9810230136 0.9786903858 0.9768404961
+ 0.9814060926 0.9791116118 0.9772968888
+ 0.9817892909 0.9795327783 0.9777532220
+ 0.9821724296 0.9799538851 0.9782096148
+ 0.9825515747 0.9803730249 0.9786626101
+ 0.9829235077 0.9807882905 0.9791095257
+ 0.9832953811 0.9812036157 0.9795563221
+ 0.9836673141 0.9816188812 0.9800031781
+ 0.9840391874 0.9820342064 0.9804500937
+ 0.9844111204 0.9824494720 0.9808968902
+ 0.9847829938 0.9828647971 0.9813438058
+ 0.9851549268 0.9832801223 0.9817907214
+ 0.9855268002 0.9836953878 0.9822375178
+ 0.9858986735 0.9841107130 0.9826843739
+ 0.9862666130 0.9845234156 0.9831274152
+ 0.9866302013 0.9849331975 0.9835664034
+ 0.9869937897 0.9853429794 0.9840053916
+ 0.9873573780 0.9857528210 0.9844443798
+ 0.9877210259 0.9861627221 0.9848833084
+ 0.9880846143 0.9865725040 0.9853222966
+ 0.9884482026 0.9869822860 0.9857612848
+ 0.9888117909 0.9873921275 0.9862002730
+ 0.9891753793 0.9878020287 0.9866393209
+ 0.9895390272 0.9882118106 0.9870783091
+ 0.9898961782 0.9886143804 0.9875144958
+ 0.9902471900 0.9890102744 0.9879482985
+ 0.9905983210 0.9894062281 0.9883821011
+ 0.9909493923 0.9898021221 0.9888159037
+ 0.9913004041 0.9901980758 0.9892497063
+ 0.9916514754 0.9905940294 0.9896833897
+ 0.9920024872 0.9909899235 0.9901171923
+ 0.9923536181 0.9913858175 0.9905509949
+ 0.9927045703 0.9917817116 0.9909847975
+ 0.9930557013 0.9921776056 0.9914186001
+ 0.9934034944 0.9925646186 0.9918447733
+ 0.9937471747 0.9929406047 0.9922618866
+ 0.9940909147 0.9933164716 0.9926788807
+ 0.9944345951 0.9936925173 0.9930958748
+ 0.9947782755 0.9940683842 0.9935129881
+ 0.9951220155 0.9944443703 0.9939299822
+ 0.9954656959 0.9948204160 0.9943469763
+ 0.9958093762 0.9951962829 0.9947639704
+ 0.9961531162 0.9955723286 0.9951810837
+ 0.9964967966 0.9959481955 0.9955980778
+ 0.9968330860 0.9963219166 0.9960101843
+ 0.9971498251 0.9966897964 0.9964091182
+ 0.9974665046 0.9970576167 0.9968081117
+ 0.9977831841 0.9974253774 0.9972071052
+ 0.9980999231 0.9977931976 0.9976060987
+ 0.9984164834 0.9981610179 0.9980050921
+ 0.9987332225 0.9985287786 0.9984040856
+ 0.9990499020 0.9988965988 0.9988030195
+ 0.9993665814 0.9992644191 0.9992020130
+ 0.9996833205 0.9996321797 0.9996010065
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/agfa_advantix_200.spi1d b/release/datafiles/colormanagement/luts/film_response/agfa_advantix_200.spi1d
new file mode 100644
index 00000000000..7492b417abc
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/agfa_advantix_200.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0109453099 0.0095550315 0.0076129269
+ 0.0205393303 0.0180988703 0.0146826003
+ 0.0290690009 0.0255930703 0.0210563708
+ 0.0365057997 0.0324602798 0.0267342404
+ 0.0431397706 0.0389092602 0.0319225714
+ 0.0493469499 0.0448722206 0.0368033797
+ 0.0553121008 0.0504292287 0.0415878706
+ 0.0610060990 0.0556044616 0.0463291109
+ 0.0664596632 0.0604789183 0.0508504696
+ 0.0717297420 0.0651700869 0.0551753603
+ 0.0767887011 0.0697173625 0.0594077297
+ 0.0815975219 0.0740136728 0.0635364205
+ 0.0862075612 0.0781842917 0.0675580502
+ 0.0907116681 0.0822909772 0.0713816136
+ 0.0950955972 0.0863237828 0.0743237808
+ 0.0993374512 0.0902062133 0.0773941725
+ 0.1034374982 0.0940194428 0.0811215192
+ 0.1073296964 0.0977483913 0.0852948874
+ 0.1110906973 0.1014209017 0.0893627778
+ 0.1147643998 0.1050138026 0.0926783979
+ 0.1184094027 0.1085262001 0.0958950967
+ 0.1220393032 0.1120131016 0.0990428701
+ 0.1255874038 0.1154666021 0.1021654978
+ 0.1290600002 0.1188692003 0.1052715033
+ 0.1324646026 0.1222466975 0.1083573997
+ 0.1358134001 0.1256064028 0.1113879010
+ 0.1391503960 0.1289401054 0.1143847033
+ 0.1424382031 0.1322277933 0.1173340008
+ 0.1457035989 0.1354801953 0.1201964989
+ 0.1489387006 0.1386919022 0.1230240986
+ 0.1521472931 0.1418765932 0.1258170009
+ 0.1553370059 0.1450258046 0.1285797060
+ 0.1584853977 0.1481391937 0.1313088983
+ 0.1615826935 0.1512455940 0.1340118051
+ 0.1646398008 0.1543205976 0.1366993934
+ 0.1676366031 0.1573432982 0.1393682063
+ 0.1705628037 0.1603267044 0.1420211941
+ 0.1734506935 0.1632660031 0.1446440071
+ 0.1762887985 0.1661476046 0.1472647935
+ 0.1791007072 0.1689998060 0.1498612016
+ 0.1818982959 0.1718225926 0.1524337977
+ 0.1846773028 0.1746128052 0.1549834013
+ 0.1874344051 0.1773594022 0.1575088948
+ 0.1901603937 0.1800664961 0.1600168049
+ 0.1928523034 0.1827678978 0.1625131071
+ 0.1955167055 0.1854266971 0.1649871022
+ 0.1981182992 0.1880469024 0.1674250066
+ 0.2006929070 0.1906183958 0.1698420942
+ 0.2032330930 0.1931630969 0.1722377986
+ 0.2057420015 0.1956868023 0.1746356040
+ 0.2082346976 0.1981967986 0.1770364046
+ 0.2106983960 0.2006848007 0.1794321984
+ 0.2131627053 0.2031618059 0.1818124950
+ 0.2156358063 0.2056335062 0.1841809005
+ 0.2180998027 0.2080969065 0.1865282953
+ 0.2205528021 0.2105540931 0.1888633072
+ 0.2229813933 0.2129819989 0.1911772937
+ 0.2253869027 0.2154051960 0.1934747994
+ 0.2277887017 0.2178180069 0.1957782060
+ 0.2301833928 0.2201987058 0.1980752051
+ 0.2325472981 0.2225521058 0.2003640980
+ 0.2348767966 0.2248626053 0.2026430070
+ 0.2371928990 0.2271340042 0.2049131989
+ 0.2394970059 0.2293829024 0.2071806937
+ 0.2417781949 0.2316153049 0.2094416022
+ 0.2440516949 0.2338470966 0.2117109001
+ 0.2463241965 0.2360679954 0.2139746994
+ 0.2485778928 0.2382649034 0.2162466943
+ 0.2508257926 0.2404524982 0.2185126990
+ 0.2530736923 0.2426279038 0.2207739949
+ 0.2553015947 0.2447896004 0.2230270952
+ 0.2575267851 0.2469552010 0.2252774984
+ 0.2597568035 0.2491303980 0.2275131047
+ 0.2619835138 0.2513048947 0.2297354937
+ 0.2641938031 0.2534686029 0.2319502980
+ 0.2663998902 0.2556251884 0.2341517955
+ 0.2686052918 0.2577697039 0.2363480031
+ 0.2708081007 0.2599022090 0.2385403067
+ 0.2730022967 0.2620306909 0.2407180965
+ 0.2751887143 0.2641496956 0.2428912967
+ 0.2773590982 0.2662425041 0.2450589985
+ 0.2795172036 0.2683148086 0.2472172976
+ 0.2816726863 0.2703753114 0.2493720949
+ 0.2838136852 0.2724193931 0.2515229881
+ 0.2859255075 0.2744517922 0.2536627948
+ 0.2880168855 0.2764849067 0.2557986081
+ 0.2901124954 0.2785145044 0.2579297125
+ 0.2922055125 0.2805334926 0.2600534856
+ 0.2942928076 0.2825405896 0.2621644139
+ 0.2963638008 0.2845480144 0.2642523944
+ 0.2984221876 0.2865386903 0.2663209140
+ 0.3004606962 0.2885077894 0.2683751881
+ 0.3024761081 0.2904664874 0.2704192996
+ 0.3044942915 0.2924236953 0.2724545002
+ 0.3065181971 0.2943876982 0.2744720876
+ 0.3085376918 0.2963528931 0.2764638066
+ 0.3105514944 0.2983131111 0.2784410119
+ 0.3125489056 0.3002620041 0.2804194987
+ 0.3145506084 0.3021939993 0.2823942006
+ 0.3165509105 0.3041042089 0.2843523026
+ 0.3185442090 0.3060002923 0.2863051891
+ 0.3205361962 0.3078896999 0.2882539034
+ 0.3225252032 0.3097808063 0.2901889980
+ 0.3245142996 0.3116734922 0.2921113074
+ 0.3265058100 0.3135590851 0.2940278947
+ 0.3284947872 0.3154321909 0.2959429026
+ 0.3304775059 0.3173008859 0.2978521883
+ 0.3324612975 0.3191635907 0.2997469008
+ 0.3344404995 0.3210156858 0.3016290069
+ 0.3364037871 0.3228532076 0.3035013080
+ 0.3383480906 0.3246806860 0.3053658903
+ 0.3402774930 0.3265039027 0.3072257042
+ 0.3422003984 0.3283264935 0.3090836108
+ 0.3441283107 0.3301435113 0.3109402061
+ 0.3460584879 0.3319503963 0.3127999902
+ 0.3479807973 0.3337503970 0.3146592081
+ 0.3498908877 0.3355464935 0.3165098131
+ 0.3517873883 0.3373399973 0.3183467984
+ 0.3536739051 0.3391256034 0.3201710880
+ 0.3555468917 0.3408975899 0.3219870925
+ 0.3574047089 0.3426569104 0.3237960935
+ 0.3592503965 0.3444055915 0.3255974948
+ 0.3610936105 0.3461483121 0.3273890913
+ 0.3629257977 0.3478848040 0.3291662931
+ 0.3647486866 0.3496142030 0.3309336901
+ 0.3665607870 0.3513360918 0.3326914012
+ 0.3683531880 0.3530487120 0.3344373107
+ 0.3701289892 0.3547559083 0.3361791968
+ 0.3719004095 0.3564561903 0.3379172087
+ 0.3736707866 0.3581486046 0.3396506011
+ 0.3754306138 0.3598242104 0.3413727880
+ 0.3771795928 0.3614909947 0.3430913985
+ 0.3789179921 0.3631505966 0.3448042870
+ 0.3806397915 0.3648028076 0.3465045989
+ 0.3823508024 0.3664542139 0.3481892049
+ 0.3840552866 0.3680998981 0.3498643935
+ 0.3857525885 0.3697325885 0.3515287936
+ 0.3874309957 0.3713547885 0.3531869948
+ 0.3890962005 0.3729732037 0.3548409939
+ 0.3907422125 0.3745886981 0.3564892113
+ 0.3923803866 0.3761973083 0.3581174910
+ 0.3940139115 0.3778007925 0.3597348928
+ 0.3956401050 0.3793950975 0.3613364995
+ 0.3972538114 0.3809765875 0.3629319072
+ 0.3988597989 0.3825520873 0.3645235002
+ 0.4004507959 0.3841212988 0.3661076128
+ 0.4020316899 0.3856911063 0.3676817119
+ 0.4036057889 0.3872612119 0.3692494035
+ 0.4051836133 0.3888235986 0.3708040118
+ 0.4067601860 0.3903797865 0.3723560870
+ 0.4083349109 0.3919270039 0.3739052117
+ 0.4099012911 0.3934660852 0.3754433095
+ 0.4114632905 0.3950020969 0.3769756854
+ 0.4130123854 0.3965331018 0.3784922063
+ 0.4145576060 0.3980642855 0.3800047934
+ 0.4160979986 0.3995954990 0.3815135956
+ 0.4176265895 0.4011205137 0.3830150068
+ 0.4191510081 0.4026427865 0.3845132887
+ 0.4206664860 0.4041537941 0.3859997094
+ 0.4221807122 0.4056634009 0.3874785900
+ 0.4236926138 0.4071705043 0.3889462948
+ 0.4251953065 0.4086725116 0.3904061019
+ 0.4266924858 0.4101715982 0.3918620050
+ 0.4281755090 0.4116598964 0.3933145106
+ 0.4296549857 0.4131458998 0.3947649896
+ 0.4311212897 0.4146251082 0.3962041140
+ 0.4325863123 0.4161024094 0.3976391852
+ 0.4340479076 0.4175755084 0.3990663886
+ 0.4355044961 0.4190461934 0.4004910886
+ 0.4369558096 0.4205146134 0.4019137025
+ 0.4384000897 0.4219822884 0.4033333063
+ 0.4398407042 0.4234496057 0.4047515988
+ 0.4412648976 0.4249095023 0.4061658084
+ 0.4426848888 0.4263676107 0.4075790942
+ 0.4440922141 0.4278148115 0.4089758992
+ 0.4454984963 0.4292607903 0.4103710055
+ 0.4469017088 0.4306946993 0.4117515087
+ 0.4483037889 0.4321266115 0.4131309986
+ 0.4496976137 0.4335466921 0.4145058095
+ 0.4510863125 0.4349648952 0.4158783853
+ 0.4524526000 0.4363755882 0.4172433019
+ 0.4538140893 0.4377841055 0.4186027944
+ 0.4551594853 0.4391863942 0.4199478924
+ 0.4565044940 0.4405857027 0.4212876856
+ 0.4578481019 0.4419767857 0.4226151109
+ 0.4591886997 0.4433653951 0.4239403903
+ 0.4605211020 0.4447469115 0.4252606928
+ 0.4618496001 0.4461270869 0.4265792966
+ 0.4631653130 0.4475035965 0.4278936982
+ 0.4644770026 0.4488789141 0.4292060137
+ 0.4657723904 0.4502497017 0.4305118024
+ 0.4670655131 0.4516187906 0.4318155944
+ 0.4683431089 0.4529778957 0.4331100881
+ 0.4696202874 0.4543359876 0.4344033897
+ 0.4708895981 0.4556787014 0.4356841147
+ 0.4721587896 0.4570212960 0.4369646907
+ 0.4734266996 0.4583550096 0.4382334054
+ 0.4746944010 0.4596883059 0.4395017922
+ 0.4759570956 0.4610117078 0.4407595098
+ 0.4772185087 0.4623329043 0.4420154095
+ 0.4784702957 0.4636422098 0.4432603121
+ 0.4797168970 0.4649454951 0.4445005059
+ 0.4809587896 0.4662468135 0.4457359910
+ 0.4821954966 0.4675458074 0.4469672143
+ 0.4834313095 0.4688419104 0.4481967986
+ 0.4846647084 0.4701308012 0.4494228959
+ 0.4858981073 0.4714190066 0.4506483972
+ 0.4871313870 0.4726983011 0.4518673122
+ 0.4883646965 0.4739777148 0.4530862868
+ 0.4895890951 0.4752514064 0.4542964995
+ 0.4908111989 0.4765237868 0.4555051029
+ 0.4920256138 0.4777913094 0.4567083120
+ 0.4932329953 0.4790548086 0.4579074085
+ 0.4944368899 0.4803156853 0.4591037929
+ 0.4956291020 0.4815686941 0.4602927864
+ 0.4968214035 0.4828216136 0.4614818096
+ 0.4980075061 0.4840664864 0.4626607001
+ 0.4991930127 0.4853107929 0.4638391137
+ 0.5003730059 0.4865506887 0.4650115073
+ 0.5015485883 0.4877873063 0.4661796987
+ 0.5027217269 0.4890219867 0.4673461020
+ 0.5038836002 0.4902490973 0.4685058892
+ 0.5050454736 0.4914762080 0.4696657956
+ 0.5061964989 0.4927015007 0.4708235860
+ 0.5073444247 0.4939264953 0.4719808996
+ 0.5084874034 0.4951480031 0.4731355011
+ 0.5096216798 0.4963639975 0.4742859006
+ 0.5107560754 0.4975799024 0.4754363894
+ 0.5118848085 0.4987801015 0.4765751958
+ 0.5130128860 0.4999789000 0.4777132869
+ 0.5141406059 0.5011754036 0.4788497090
+ 0.5152677298 0.5023689270 0.4799841046
+ 0.5163947940 0.5035623908 0.4811184108
+ 0.5175107121 0.5047491193 0.4822545052
+ 0.5186256170 0.5059353709 0.4833906889
+ 0.5197319984 0.5071169734 0.4845212996
+ 0.5208250284 0.5082917213 0.4856444001
+ 0.5219178796 0.5094662905 0.4867675006
+ 0.5230032802 0.5106360912 0.4878782928
+ 0.5240870118 0.5118049979 0.4889872968
+ 0.5251713991 0.5129719973 0.4900952876
+ 0.5262575746 0.5141333938 0.4912008941
+ 0.5273438096 0.5152949095 0.4923065007
+ 0.5284274220 0.5164546967 0.4934087098
+ 0.5295094252 0.5176134706 0.4945091903
+ 0.5305913091 0.5187724233 0.4956094921
+ 0.5316656828 0.5199283957 0.4966976941
+ 0.5327398181 0.5210844874 0.4977858961
+ 0.5338104963 0.5222364068 0.4988707900
+ 0.5348731279 0.5233796239 0.4999495149
+ 0.5359356999 0.5245227814 0.5010282993
+ 0.5369876027 0.5256589055 0.5021041036
+ 0.5380324721 0.5267904997 0.5031781197
+ 0.5390774012 0.5279220939 0.5042521954
+ 0.5401139259 0.5290479064 0.5053207278
+ 0.5411491990 0.5301730037 0.5063884854
+ 0.5421838760 0.5312972069 0.5074563026
+ 0.5432150960 0.5324152112 0.5085229278
+ 0.5442463160 0.5335332751 0.5095896125
+ 0.5452744961 0.5346456170 0.5106530786
+ 0.5462962985 0.5357465148 0.5117110014
+ 0.5473181009 0.5368474126 0.5127688050
+ 0.5483338237 0.5379434228 0.5138180852
+ 0.5493434072 0.5390350223 0.5148600936
+ 0.5503531098 0.5401265025 0.5159021020
+ 0.5513597131 0.5412139297 0.5169410706
+ 0.5523648262 0.5422992110 0.5179787278
+ 0.5533698201 0.5433844924 0.5190163255
+ 0.5543758273 0.5444642901 0.5200524926
+ 0.5553820729 0.5455427170 0.5210883021
+ 0.5563883185 0.5466210246 0.5221241713
+ 0.5573911071 0.5476927161 0.5231577754
+ 0.5583932996 0.5487633944 0.5241910815
+ 0.5593954921 0.5498341918 0.5252243876
+ 0.5603914857 0.5508939028 0.5262517929
+ 0.5613868237 0.5519527793 0.5272789001
+ 0.5623821020 0.5530115962 0.5283061266
+ 0.5633684993 0.5540567040 0.5293180943
+ 0.5643541813 0.5551009178 0.5303297043
+ 0.5653399229 0.5561451912 0.5313413143
+ 0.5663121939 0.5571808219 0.5323446989
+ 0.5672833920 0.5582157969 0.5333477259
+ 0.5682544708 0.5592507124 0.5343508124
+ 0.5692139864 0.5602828264 0.5353485942
+ 0.5701718926 0.5613144040 0.5363458991
+ 0.5711297989 0.5623461008 0.5373433232
+ 0.5720816255 0.5633695126 0.5383352041
+ 0.5730317831 0.5643910170 0.5393260717
+ 0.5739821196 0.5654125810 0.5403169990
+ 0.5749322176 0.5664225817 0.5413028002
+ 0.5758821964 0.5674279928 0.5422866940
+ 0.5768321753 0.5684334040 0.5432707071
+ 0.5777807832 0.5694364905 0.5442500114
+ 0.5787283182 0.5704377294 0.5452260971
+ 0.5796757936 0.5714389086 0.5462023020
+ 0.5806186795 0.5724375248 0.5471749902
+ 0.5815541744 0.5734320879 0.5481427908
+ 0.5824897289 0.5744267106 0.5491107106
+ 0.5834230781 0.5754204988 0.5500766039
+ 0.5843461156 0.5764102936 0.5510352850
+ 0.5852690935 0.5774000883 0.5519940257
+ 0.5861920714 0.5783898830 0.5529527068
+ 0.5871120095 0.5793784857 0.5539078116
+ 0.5880315900 0.5803670287 0.5548627973
+ 0.5889511108 0.5813555121 0.5558177829
+ 0.5898649096 0.5823364258 0.5567662120
+ 0.5907754898 0.5833132267 0.5577116013
+ 0.5916861296 0.5842900872 0.5586568713
+ 0.5925920010 0.5852631927 0.5595967174
+ 0.5934880972 0.5862287879 0.5605269074
+ 0.5943841934 0.5871945024 0.5614570975
+ 0.5952801704 0.5881602168 0.5623872280
+ 0.5961638093 0.5891243815 0.5633127093
+ 0.5970469713 0.5900886059 0.5642381907
+ 0.5979301929 0.5910527110 0.5651637912
+ 0.5988095999 0.5920161009 0.5660883784
+ 0.5996860862 0.5929788947 0.5670126081
+ 0.6005626917 0.5939416885 0.5679367781
+ 0.6014385223 0.5949037075 0.5688589215
+ 0.6023102999 0.5958616734 0.5697726011
+ 0.6031820774 0.5968198180 0.5706862211
+ 0.6040539145 0.5977777839 0.5715999007
+ 0.6049264073 0.5987269282 0.5725020766
+ 0.6057993174 0.5996723175 0.5734000802
+ 0.6066721082 0.6006177068 0.5742980838
+ 0.6075447202 0.6015614271 0.5751948953
+ 0.6084157825 0.6024988294 0.5760878921
+ 0.6092870235 0.6034362912 0.5769808888
+ 0.6101580858 0.6043736935 0.5778738856
+ 0.6110234261 0.6053066254 0.5787655711
+ 0.6118857265 0.6062374115 0.5796566010
+ 0.6127480268 0.6071680784 0.5805476904
+ 0.6136096716 0.6080988050 0.5814384818
+ 0.6144647002 0.6090288162 0.5823276043
+ 0.6153196096 0.6099588275 0.5832166076
+ 0.6161745191 0.6108887196 0.5841056705
+ 0.6170253158 0.6118140221 0.5849937797
+ 0.6178714037 0.6127341986 0.5858809948
+ 0.6187174916 0.6136543751 0.5867682099
+ 0.6195635796 0.6145746112 0.5876554251
+ 0.6203994155 0.6154835820 0.5885332227
+ 0.6212329268 0.6163904071 0.5894092917
+ 0.6220663786 0.6172971725 0.5902854204
+ 0.6228989959 0.6182032228 0.5911598206
+ 0.6237251759 0.6191043854 0.5920251012
+ 0.6245512962 0.6200054884 0.5928903818
+ 0.6253774762 0.6209065914 0.5937557220
+ 0.6262025833 0.6218063831 0.5946201086
+ 0.6270262003 0.6227043867 0.5954833031
+ 0.6278496981 0.6236023903 0.5963464975
+ 0.6286731958 0.6245002747 0.5972098112
+ 0.6294925809 0.6253930926 0.5980716944
+ 0.6303092837 0.6262826920 0.5989329815
+ 0.6311259866 0.6271722913 0.5997943282
+ 0.6319425702 0.6280620098 0.6006556153
+ 0.6327558756 0.6289452910 0.6015126705
+ 0.6335682273 0.6298272014 0.6023688912
+ 0.6343805790 0.6307089925 0.6032251716
+ 0.6351928711 0.6315909028 0.6040813923
+ 0.6360028982 0.6324610710 0.6049261093
+ 0.6368128061 0.6333307028 0.6057704091
+ 0.6376225948 0.6342003942 0.6066148281
+ 0.6384323835 0.6350694895 0.6074587703
+ 0.6392394900 0.6359295249 0.6082984209
+ 0.6400464773 0.6367895007 0.6091380715
+ 0.6408535838 0.6376495957 0.6099777222
+ 0.6416608095 0.6385089159 0.6108170748
+ 0.6424685717 0.6393631101 0.6116548777
+ 0.6432763934 0.6402173042 0.6124926805
+ 0.6440842748 0.6410714984 0.6133304834
+ 0.6448920965 0.6419250965 0.6141679883
+ 0.6456990838 0.6427741051 0.6150038242
+ 0.6465060711 0.6436231136 0.6158394814
+ 0.6473131776 0.6444721222 0.6166753173
+ 0.6481201053 0.6453201771 0.6175107956
+ 0.6489260197 0.6461594105 0.6183446050
+ 0.6497318745 0.6469987035 0.6191784739
+ 0.6505379081 0.6478378773 0.6200122833
+ 0.6513438821 0.6486768723 0.6208459735
+ 0.6521543264 0.6495088935 0.6216778159
+ 0.6529647112 0.6503409147 0.6225095987
+ 0.6537752151 0.6511728764 0.6233413219
+ 0.6545855999 0.6520048976 0.6241731048
+ 0.6553974152 0.6528308988 0.6250030994
+ 0.6562091708 0.6536563039 0.6258329153
+ 0.6570211053 0.6544817090 0.6266627908
+ 0.6578329206 0.6553071141 0.6274926066
+ 0.6586399078 0.6561266780 0.6283208728
+ 0.6594451070 0.6569445133 0.6291487813
+ 0.6602504253 0.6577622890 0.6299766898
+ 0.6610556841 0.6585801244 0.6308044791
+ 0.6618577242 0.6593968868 0.6316313744
+ 0.6626570225 0.6602129936 0.6324573755
+ 0.6634563208 0.6610292196 0.6332834959
+ 0.6642554998 0.6618453264 0.6341096163
+ 0.6650528908 0.6626601815 0.6349341869
+ 0.6658458114 0.6634724140 0.6357557178
+ 0.6666386127 0.6642845869 0.6365773082
+ 0.6674314737 0.6650968194 0.6373988986
+ 0.6682242751 0.6659088731 0.6382200718
+ 0.6690135002 0.6667075753 0.6390303969
+ 0.6698027849 0.6675063968 0.6398407221
+ 0.6705920100 0.6683050990 0.6406509876
+ 0.6713812947 0.6691039205 0.6414613128
+ 0.6721655726 0.6698979139 0.6422684193
+ 0.6729472876 0.6706895828 0.6430739760
+ 0.6737290025 0.6714811921 0.6438794732
+ 0.6745107174 0.6722728014 0.6446850896
+ 0.6752899885 0.6730641127 0.6454901099
+ 0.6760625243 0.6738544703 0.6462938786
+ 0.6768351197 0.6746450067 0.6470977068
+ 0.6776077151 0.6754354239 0.6479014158
+ 0.6783801913 0.6762257814 0.6487051845
+ 0.6791486740 0.6770142913 0.6495074034
+ 0.6799163222 0.6778023839 0.6503092051
+ 0.6806839705 0.6785904765 0.6511111259
+ 0.6814516187 0.6793786287 0.6519129872
+ 0.6822186708 0.6801651120 0.6527122855
+ 0.6829848289 0.6809486747 0.6535074115
+ 0.6837509274 0.6817322969 0.6543024778
+ 0.6845170856 0.6825159192 0.6550976038
+ 0.6852831841 0.6832996011 0.6558926105
+ 0.6860461235 0.6840777993 0.6566833258
+ 0.6868082881 0.6848548055 0.6574732065
+ 0.6875705123 0.6856318712 0.6582630873
+ 0.6883326769 0.6864088774 0.6590530276
+ 0.6890928745 0.6871842146 0.6598421931
+ 0.6898465157 0.6879535913 0.6606296897
+ 0.6905999780 0.6887230277 0.6614171863
+ 0.6913534999 0.6894924045 0.6622046828
+ 0.6921070814 0.6902617812 0.6629921794
+ 0.6928570271 0.6910268068 0.6637781858
+ 0.6936045885 0.6917887926 0.6645631790
+ 0.6943520904 0.6925508976 0.6653482914
+ 0.6950995922 0.6933128834 0.6661332846
+ 0.6958470941 0.6940749884 0.6669183969
+ 0.6965919733 0.6948326826 0.6677011847
+ 0.6973364949 0.6955900192 0.6684839129
+ 0.6980810761 0.6963472962 0.6692665815
+ 0.6988255978 0.6971045136 0.6700494289
+ 0.6995682716 0.6978610754 0.6708310843
+ 0.7003021240 0.6986145973 0.6716089249
+ 0.7010359168 0.6993680000 0.6723867059
+ 0.7017697096 0.7001215219 0.6731644869
+ 0.7025035024 0.7008749247 0.6739423871
+ 0.7032322884 0.7016248107 0.6747155190
+ 0.7039532065 0.7023693919 0.6754820943
+ 0.7046741843 0.7031139731 0.6762487292
+ 0.7053951025 0.7038586140 0.6770153046
+ 0.7061160207 0.7046031952 0.6777818799
+ 0.7068319917 0.7053433061 0.6785455942
+ 0.7075439095 0.7060800195 0.6793071032
+ 0.7082558870 0.7068166137 0.6800686717
+ 0.7089678049 0.7075533271 0.6808302999
+ 0.7096797824 0.7082899213 0.6815918088
+ 0.7103822827 0.7090213895 0.6823518276
+ 0.7110798955 0.7097504139 0.6831110120
+ 0.7117773890 0.7104794979 0.6838701963
+ 0.7124750018 0.7112085223 0.6846293807
+ 0.7131726146 0.7119374871 0.6853885055
+ 0.7138615251 0.7126597166 0.6861459017
+ 0.7145469785 0.7133795023 0.6869027019
+ 0.7152324915 0.7140992880 0.6876593828
+ 0.7159180045 0.7148190141 0.6884161830
+ 0.7166035175 0.7155387998 0.6891729236
+ 0.7172850966 0.7162548900 0.6899223924
+ 0.7179651856 0.7169696093 0.6906694770
+ 0.7186452150 0.7176843286 0.6914165020
+ 0.7193253040 0.7183991075 0.6921635866
+ 0.7200053930 0.7191138268 0.6929106116
+ 0.7206829190 0.7198268175 0.6936489940
+ 0.7213590145 0.7205389738 0.6943836808
+ 0.7220352292 0.7212511897 0.6951184273
+ 0.7227113843 0.7219635248 0.6958531141
+ 0.7233875990 0.7226756811 0.6965876818
+ 0.7240635753 0.7233844995 0.6973186731
+ 0.7247393727 0.7240908146 0.6980472207
+ 0.7254152894 0.7247970104 0.6987757087
+ 0.7260912061 0.7255033255 0.6995041966
+ 0.7267671227 0.7262095809 0.7002326846
+ 0.7274426818 0.7269139290 0.7009603977
+ 0.7281178832 0.7276154757 0.7016872168
+ 0.7287930846 0.7283170223 0.7024139762
+ 0.7294682860 0.7290186286 0.7031407952
+ 0.7301434875 0.7297201157 0.7038676143
+ 0.7308180928 0.7304204106 0.7045934200
+ 0.7314903736 0.7311158776 0.7053160071
+ 0.7321627140 0.7318114042 0.7060384750
+ 0.7328349948 0.7325068116 0.7067610025
+ 0.7335072160 0.7332022786 0.7074834704
+ 0.7341794968 0.7338978052 0.7082059979
+ 0.7348482013 0.7345873117 0.7089205980
+ 0.7355166078 0.7352764010 0.7096347213
+ 0.7361850142 0.7359654903 0.7103487849
+ 0.7368534207 0.7366545796 0.7110629082
+ 0.7375218272 0.7373437285 0.7117769718
+ 0.7381889820 0.7380310297 0.7124879956
+ 0.7388554215 0.7387169003 0.7131969929
+ 0.7395219207 0.7394028902 0.7139061093
+ 0.7401883006 0.7400888205 0.7146151066
+ 0.7408546805 0.7407748103 0.7153242230
+ 0.7415205836 0.7414584756 0.7160325050
+ 0.7421839833 0.7421336770 0.7167384028
+ 0.7428473830 0.7428088784 0.7174441814
+ 0.7435107827 0.7434840798 0.7181500793
+ 0.7441741824 0.7441592813 0.7188559771
+ 0.7448375821 0.7448344827 0.7195618749
+ 0.7454971075 0.7455040216 0.7202640772
+ 0.7461552024 0.7461715937 0.7209653258
+ 0.7468132973 0.7468392849 0.7216665149
+ 0.7474713922 0.7475069761 0.7223677039
+ 0.7481294870 0.7481747270 0.7230688930
+ 0.7487857938 0.7488409877 0.7237700820
+ 0.7494363785 0.7495033741 0.7244712114
+ 0.7500869036 0.7501658797 0.7251722813
+ 0.7507374883 0.7508283854 0.7258734107
+ 0.7513880730 0.7514907718 0.7265745997
+ 0.7520385981 0.7521532774 0.7272757292
+ 0.7526834011 0.7528085709 0.7279723287
+ 0.7533255816 0.7534605861 0.7286670804
+ 0.7539677024 0.7541127205 0.7293617725
+ 0.7546098828 0.7547647953 0.7300565839
+ 0.7552520037 0.7554169297 0.7307513952
+ 0.7558938861 0.7560682893 0.7314453721
+ 0.7565317750 0.7567108870 0.7321308851
+ 0.7571697235 0.7573534250 0.7328165174
+ 0.7578076124 0.7579960227 0.7335019708
+ 0.7584453821 0.7586385012 0.7341874838
+ 0.7590832710 0.7592810988 0.7348731160
+ 0.7597208023 0.7599217296 0.7355561256
+ 0.7603574991 0.7605590820 0.7362353206
+ 0.7609941959 0.7611966133 0.7369145155
+ 0.7616308928 0.7618340254 0.7375937104
+ 0.7622675896 0.7624713778 0.7382730246
+ 0.7629042864 0.7631089091 0.7389522195
+ 0.7635387778 0.7637441754 0.7396275997
+ 0.7641718984 0.7643783092 0.7403010130
+ 0.7648050189 0.7650123835 0.7409744263
+ 0.7654381990 0.7656465173 0.7416477799
+ 0.7660713196 0.7662805915 0.7423211932
+ 0.7667044997 0.7669147253 0.7429946065
+ 0.7673382759 0.7675452828 0.7436637878
+ 0.7679721713 0.7681750059 0.7443320155
+ 0.7686061263 0.7688047290 0.7450003028
+ 0.7692400217 0.7694345117 0.7456685901
+ 0.7698739767 0.7700641751 0.7463368773
+ 0.7705078721 0.7706940174 0.7470052242
+ 0.7711389065 0.7713199258 0.7476691008
+ 0.7717695832 0.7719454765 0.7483327985
+ 0.7724003792 0.7725712061 0.7489963770
+ 0.7730311155 0.7731968164 0.7496600747
+ 0.7736619115 0.7738224864 0.7503237724
+ 0.7742925882 0.7744480968 0.7509874105
+ 0.7749173045 0.7750692964 0.7516471148
+ 0.7755420208 0.7756903768 0.7523068786
+ 0.7761667967 0.7763115764 0.7529665828
+ 0.7767915130 0.7769327760 0.7536262870
+ 0.7774162292 0.7775539160 0.7542861104
+ 0.7780408859 0.7781749964 0.7549456954
+ 0.7786604166 0.7787933946 0.7556020021
+ 0.7792798281 0.7794117928 0.7562583089
+ 0.7798992991 0.7800301909 0.7569146156
+ 0.7805187106 0.7806485891 0.7575709224
+ 0.7811381817 0.7812669873 0.7582271099
+ 0.7817575932 0.7818853855 0.7588834167
+ 0.7823737264 0.7824988961 0.7595390081
+ 0.7829896212 0.7831121087 0.7601945996
+ 0.7836055160 0.7837253213 0.7608501911
+ 0.7842214108 0.7843385935 0.7615057826
+ 0.7848373055 0.7849518061 0.7621613741
+ 0.7854532003 0.7855650187 0.7628170848
+ 0.7860642076 0.7861744165 0.7634735703
+ 0.7866740227 0.7867829204 0.7641304135
+ 0.7872837782 0.7873914242 0.7647870779
+ 0.7878935933 0.7879999876 0.7654439211
+ 0.7885034084 0.7886084914 0.7661007047
+ 0.7891132236 0.7892169952 0.7667574286
+ 0.7897166014 0.7898225784 0.7674102187
+ 0.7903156877 0.7904263735 0.7680606842
+ 0.7909148932 0.7910302281 0.7687112093
+ 0.7915139794 0.7916340232 0.7693616748
+ 0.7921131849 0.7922376990 0.7700121999
+ 0.7927122712 0.7928414941 0.7706627250
+ 0.7933096290 0.7934436202 0.7713115215
+ 0.7939032912 0.7940425277 0.7719575763
+ 0.7944970131 0.7946413755 0.7726035714
+ 0.7950906157 0.7952402830 0.7732496262
+ 0.7956842780 0.7958391905 0.7738956809
+ 0.7962778807 0.7964379787 0.7745416760
+ 0.7968716025 0.7970368862 0.7751876712
+ 0.7974594831 0.7976313829 0.7758299112
+ 0.7980473042 0.7982258797 0.7764720917
+ 0.7986351848 0.7988204956 0.7771142721
+ 0.7992231250 0.7994149923 0.7777565122
+ 0.7998108864 0.8000094891 0.7783988118
+ 0.8003988266 0.8006039858 0.7790409923
+ 0.8009812832 0.8011956811 0.7796803117
+ 0.8015602231 0.8017855287 0.7803177834
+ 0.8021391034 0.8023753166 0.7809553146
+ 0.8027181029 0.8029651046 0.7815927267
+ 0.8032969832 0.8035550117 0.7822301984
+ 0.8038759232 0.8041447997 0.7828677297
+ 0.8044546247 0.8047344089 0.7835052013
+ 0.8050318956 0.8053227067 0.7841426134
+ 0.8056092262 0.8059110045 0.7847800851
+ 0.8061863780 0.8064993024 0.7854174972
+ 0.8067637086 0.8070874810 0.7860549092
+ 0.8073409200 0.8076757789 0.7866923213
+ 0.8079181910 0.8082640767 0.7873297930
+ 0.8084933162 0.8088514805 0.7879632711
+ 0.8090668917 0.8094381094 0.7885943055
+ 0.8096404076 0.8100247979 0.7892252803
+ 0.8102139831 0.8106114864 0.7898563147
+ 0.8107876182 0.8111981750 0.7904872894
+ 0.8113610744 0.8117849231 0.7911183238
+ 0.8119347095 0.8123714924 0.7917492986
+ 0.8125054836 0.8129528761 0.7923681736
+ 0.8130763173 0.8135340810 0.7929869890
+ 0.8136469722 0.8141154051 0.7936058044
+ 0.8142176867 0.8146966100 0.7942246199
+ 0.8147884011 0.8152778745 0.7948433757
+ 0.8153591752 0.8158590794 0.7954621911
+ 0.8159289956 0.8164386749 0.7960788012
+ 0.8164964914 0.8170142770 0.7966904044
+ 0.8170641065 0.8175899982 0.7973020077
+ 0.8176316023 0.8181656003 0.7979136109
+ 0.8181990981 0.8187412024 0.7985252142
+ 0.8187667131 0.8193169236 0.7991368175
+ 0.8193342090 0.8198925257 0.7997484207
+ 0.8198990226 0.8204675913 0.8003578782
+ 0.8204612136 0.8210421801 0.8009656072
+ 0.8210235238 0.8216167092 0.8015732765
+ 0.8215857744 0.8221912980 0.8021810055
+ 0.8221480846 0.8227658868 0.8027886748
+ 0.8227102757 0.8233404756 0.8033962846
+ 0.8232725859 0.8239151239 0.8040040135
+ 0.8238356113 0.8244882822 0.8046082258
+ 0.8243988156 0.8250607848 0.8052108884
+ 0.8249620795 0.8256334066 0.8058137298
+ 0.8255254030 0.8262060285 0.8064163923
+ 0.8260886073 0.8267785907 0.8070191145
+ 0.8266518712 0.8273512125 0.8076218963
+ 0.8272151947 0.8279237747 0.8082246184
+ 0.8277786970 0.8284941912 0.8088231087
+ 0.8283423185 0.8290640712 0.8094205856
+ 0.8289058208 0.8296340108 0.8100181222
+ 0.8294693828 0.8302038908 0.8106155992
+ 0.8300330043 0.8307737708 0.8112130761
+ 0.8305966258 0.8313437104 0.8118106127
+ 0.8311601877 0.8319135904 0.8124080896
+ 0.8317217827 0.8324813843 0.8130018115
+ 0.8322829008 0.8330487013 0.8135946989
+ 0.8328440189 0.8336160779 0.8141875863
+ 0.8334051967 0.8341833949 0.8147805929
+ 0.8339663148 0.8347507119 0.8153734803
+ 0.8345274925 0.8353180885 0.8159664273
+ 0.8350886106 0.8358854055 0.8165593743
+ 0.8356444836 0.8364486098 0.8171482086
+ 0.8361988068 0.8370106220 0.8177357912
+ 0.8367530704 0.8375725746 0.8183234930
+ 0.8373072743 0.8381345868 0.8189110756
+ 0.8378615975 0.8386965990 0.8194987178
+ 0.8384159207 0.8392586112 0.8200864196
+ 0.8389701247 0.8398206234 0.8206740022
+ 0.8395189047 0.8403776884 0.8212596774
+ 0.8400645256 0.8409320712 0.8218443990
+ 0.8406100273 0.8414863944 0.8224290013
+ 0.8411555290 0.8420407176 0.8230137229
+ 0.8417009711 0.8425949812 0.8235983253
+ 0.8422465920 0.8431493044 0.8241829872
+ 0.8427920938 0.8437036276 0.8247675896
+ 0.8433353901 0.8442538977 0.8253523707
+ 0.8438755870 0.8447986245 0.8259375095
+ 0.8444157243 0.8453432918 0.8265225291
+ 0.8449559212 0.8458880186 0.8271076083
+ 0.8454961181 0.8464328051 0.8276926279
+ 0.8460361958 0.8469774723 0.8282775879
+ 0.8465763927 0.8475221992 0.8288627267
+ 0.8471155763 0.8480662107 0.8294473290
+ 0.8476483226 0.8486049771 0.8300294876
+ 0.8481810093 0.8491439223 0.8306117058
+ 0.8487136960 0.8496826887 0.8311939836
+ 0.8492463827 0.8502215743 0.8317762017
+ 0.8497790098 0.8507604003 0.8323584199
+ 0.8503116965 0.8512992859 0.8329406977
+ 0.8508443832 0.8518381119 0.8335229158
+ 0.8513737917 0.8523707986 0.8341016769
+ 0.8519021273 0.8529015183 0.8346794844
+ 0.8524304032 0.8534322977 0.8352572918
+ 0.8529587984 0.8539630175 0.8358352184
+ 0.8534870744 0.8544937968 0.8364130259
+ 0.8540154099 0.8550245762 0.8369907737
+ 0.8545438051 0.8555552959 0.8375687003
+ 0.8550698757 0.8560833931 0.8381444216
+ 0.8555914164 0.8566060066 0.8387160897
+ 0.8561128974 0.8571285009 0.8392876983
+ 0.8566343784 0.8576511145 0.8398594260
+ 0.8571557999 0.8581736088 0.8404310942
+ 0.8576772809 0.8586962223 0.8410027027
+ 0.8581988215 0.8592187166 0.8415743709
+ 0.8587203026 0.8597412705 0.8421459794
+ 0.8592392802 0.8602582812 0.8427104950
+ 0.8597577810 0.8607739806 0.8432731032
+ 0.8602762222 0.8612896800 0.8438357711
+ 0.8607946038 0.8618053198 0.8443984985
+ 0.8613131046 0.8623210192 0.8449612260
+ 0.8618314862 0.8628365993 0.8455238938
+ 0.8623499274 0.8633522987 0.8460866213
+ 0.8628677130 0.8638666272 0.8466476202
+ 0.8633821011 0.8643746972 0.8472021222
+ 0.8638964891 0.8648828864 0.8477566242
+ 0.8644108772 0.8653910756 0.8483110070
+ 0.8649253249 0.8658993244 0.8488655090
+ 0.8654397130 0.8664075136 0.8494200110
+ 0.8659541011 0.8669157028 0.8499745131
+ 0.8664684892 0.8674237728 0.8505288959
+ 0.8669798970 0.8679283857 0.8510808945
+ 0.8674882054 0.8684291840 0.8516303897
+ 0.8679965138 0.8689299822 0.8521798849
+ 0.8685047030 0.8694307804 0.8527294993
+ 0.8690130115 0.8699315786 0.8532789946
+ 0.8695213199 0.8704324961 0.8538284898
+ 0.8700296283 0.8709332943 0.8543781042
+ 0.8705378771 0.8714340925 0.8549275994
+ 0.8710486889 0.8719300032 0.8554750085
+ 0.8715605140 0.8724238873 0.8560217023
+ 0.8720722795 0.8729178905 0.8565683961
+ 0.8725841045 0.8734118938 0.8571150899
+ 0.8730959892 0.8739058971 0.8576617837
+ 0.8736078143 0.8743997812 0.8582084775
+ 0.8741195798 0.8748937845 0.8587551713
+ 0.8746314049 0.8753877878 0.8593019247
+ 0.8751448989 0.8758807182 0.8598421812
+ 0.8756586909 0.8763734102 0.8603816032
+ 0.8761724830 0.8768661022 0.8609210253
+ 0.8766862750 0.8773587942 0.8614603877
+ 0.8772001266 0.8778516054 0.8619998097
+ 0.8777137995 0.8783442974 0.8625391722
+ 0.8782275915 0.8788369894 0.8630785942
+ 0.8787413836 0.8793296814 0.8636180162
+ 0.8792527914 0.8798214793 0.8641535044
+ 0.8797639012 0.8803130984 0.8646888137
+ 0.8802750111 0.8808047771 0.8652241230
+ 0.8807861209 0.8812963963 0.8657593727
+ 0.8812971711 0.8817880154 0.8662946820
+ 0.8818082809 0.8822796941 0.8668299913
+ 0.8823193908 0.8827713132 0.8673651814
+ 0.8828305006 0.8832629919 0.8679004908
+ 0.8833349943 0.8837479949 0.8684350252
+ 0.8838387132 0.8842322826 0.8689693809
+ 0.8843423724 0.8847165108 0.8695037961
+ 0.8848459721 0.8852007985 0.8700382113
+ 0.8853496909 0.8856850863 0.8705726266
+ 0.8858534098 0.8861693144 0.8711069822
+ 0.8863570094 0.8866536021 0.8716413975
+ 0.8868607283 0.8871377707 0.8721758127
+ 0.8873574734 0.8876165152 0.8727089167
+ 0.8878520727 0.8880935907 0.8732416034
+ 0.8883467913 0.8885707259 0.8737742901
+ 0.8888415098 0.8890478015 0.8743069768
+ 0.8893362284 0.8895248771 0.8748397231
+ 0.8898308873 0.8900020123 0.8753722906
+ 0.8903254867 0.8904790878 0.8759049773
+ 0.8908202052 0.8909561038 0.8764377236
+ 0.8913139105 0.8914325833 0.8769698739
+ 0.8918069005 0.8919085860 0.8775017858
+ 0.8922998905 0.8923845291 0.8780336976
+ 0.8927928805 0.8928604722 0.8785656095
+ 0.8932858706 0.8933364749 0.8790975213
+ 0.8937789202 0.8938124776 0.8796293736
+ 0.8942717910 0.8942884207 0.8801612258
+ 0.8947647810 0.8947644234 0.8806930780
+ 0.8952565789 0.8952397108 0.8812240958
+ 0.8957449198 0.8957130909 0.8817527890
+ 0.8962332010 0.8961864710 0.8822814226
+ 0.8967214823 0.8966599107 0.8828101158
+ 0.8972098231 0.8971332908 0.8833386898
+ 0.8976982236 0.8976066709 0.8838673830
+ 0.8981865048 0.8980801105 0.8843960762
+ 0.8986747861 0.8985534906 0.8849247098
+ 0.8991631269 0.8990268707 0.8854534030
+ 0.8996483088 0.8994984031 0.8859789968
+ 0.9001330137 0.8999695182 0.8865042925
+ 0.9006177187 0.9004406929 0.8870295882
+ 0.9011024833 0.9009119272 0.8875548244
+ 0.9015871882 0.9013829827 0.8880801201
+ 0.9020720124 0.9018542171 0.8886054158
+ 0.9025567174 0.9023253918 0.8891307116
+ 0.9030414224 0.9027965069 0.8896560073
+ 0.9035236239 0.9032670856 0.8901805878
+ 0.9040020704 0.9037368894 0.8907042146
+ 0.9044805169 0.9042065740 0.8912279010
+ 0.9049589038 0.9046763182 0.8917515278
+ 0.9054374099 0.9051461220 0.8922752142
+ 0.9059157968 0.9056158066 0.8927989006
+ 0.9063943028 0.9060856104 0.8933225274
+ 0.9068726897 0.9065552950 0.8938462138
+ 0.9073510766 0.9070249796 0.8943697810
+ 0.9078236818 0.9074894190 0.8948928118
+ 0.9082950950 0.9079527259 0.8954156041
+ 0.9087665081 0.9084160924 0.8959383965
+ 0.9092379808 0.9088793993 0.8964611888
+ 0.9097093940 0.9093427062 0.8969839811
+ 0.9101808071 0.9098060727 0.8975067735
+ 0.9106522202 0.9102693796 0.8980296254
+ 0.9111235738 0.9107328057 0.8985524178
+ 0.9115946293 0.9111946225 0.8990744948
+ 0.9120634794 0.9116498828 0.8995931745
+ 0.9125325084 0.9121053219 0.9001119137
+ 0.9130014181 0.9125605822 0.9006305933
+ 0.9134703875 0.9130159020 0.9011492729
+ 0.9139392972 0.9134712219 0.9016680717
+ 0.9144083261 0.9139264822 0.9021868110
+ 0.9148771763 0.9143819213 0.9027054906
+ 0.9153460860 0.9148371816 0.9032241702
+ 0.9158136249 0.9152905941 0.9037396908
+ 0.9162790179 0.9157413840 0.9042512178
+ 0.9167444706 0.9161921740 0.9047626257
+ 0.9172099233 0.9166430235 0.9052739739
+ 0.9176753163 0.9170938134 0.9057853818
+ 0.9181408286 0.9175446033 0.9062967896
+ 0.9186062217 0.9179953933 0.9068081975
+ 0.9190716743 0.9184461832 0.9073196054
+ 0.9195371270 0.9188969731 0.9078310132
+ 0.9200031161 0.9193475842 0.9083387852
+ 0.9204695225 0.9197980165 0.9088441133
+ 0.9209359288 0.9202483892 0.9093493223
+ 0.9214022756 0.9206988215 0.9098545909
+ 0.9218686819 0.9211491942 0.9103597999
+ 0.9223350883 0.9215996265 0.9108651280
+ 0.9228014946 0.9220499992 0.9113702774
+ 0.9232679009 0.9225003719 0.9118756056
+ 0.9237343073 0.9229508042 0.9123808146
+ 0.9242020249 0.9234021902 0.9128848910
+ 0.9246705174 0.9238542914 0.9133883119
+ 0.9251390100 0.9243063927 0.9138916731
+ 0.9256075025 0.9247584939 0.9143949747
+ 0.9260761142 0.9252105951 0.9148983955
+ 0.9265446067 0.9256626964 0.9154018164
+ 0.9270130992 0.9261147976 0.9159051776
+ 0.9274815917 0.9265668988 0.9164085984
+ 0.9279500842 0.9270188808 0.9169120193
+ 0.9284178019 0.9274703264 0.9174153209
+ 0.9288849235 0.9279211760 0.9179183841
+ 0.9293519855 0.9283720851 0.9184216261
+ 0.9298191071 0.9288229942 0.9189246893
+ 0.9302862883 0.9292739034 0.9194278121
+ 0.9307534099 0.9297246933 0.9199309945
+ 0.9312204719 0.9301756024 0.9204341173
+ 0.9316875935 0.9306265116 0.9209372997
+ 0.9321547151 0.9310774207 0.9214404225
+ 0.9326195121 0.9315286279 0.9219434857
+ 0.9330815077 0.9319801927 0.9224464893
+ 0.9335433841 0.9324318767 0.9229494929
+ 0.9340053797 0.9328835011 0.9234524965
+ 0.9344673753 0.9333351254 0.9239555001
+ 0.9349293113 0.9337866902 0.9244585037
+ 0.9353913069 0.9342383146 0.9249615073
+ 0.9358531833 0.9346899986 0.9254645109
+ 0.9363151789 0.9351416230 0.9259675145
+ 0.9367759228 0.9355927110 0.9264699817
+ 0.9372317791 0.9360417128 0.9269704819
+ 0.9376876950 0.9364907742 0.9274709225
+ 0.9381436706 0.9369398952 0.9279714227
+ 0.9385995865 0.9373890162 0.9284719229
+ 0.9390555024 0.9378380775 0.9289724231
+ 0.9395114183 0.9382871985 0.9294728041
+ 0.9399673939 0.9387362003 0.9299733043
+ 0.9404233098 0.9391853213 0.9304738045
+ 0.9408792257 0.9396343827 0.9309743047
+ 0.9413326979 0.9400802255 0.9314733744
+ 0.9417858124 0.9405254722 0.9319723248
+ 0.9422389865 0.9409707785 0.9324712157
+ 0.9426921010 0.9414162040 0.9329702258
+ 0.9431452155 0.9418615103 0.9334691167
+ 0.9435983896 0.9423068166 0.9339680076
+ 0.9440515041 0.9427521229 0.9344670177
+ 0.9445046186 0.9431974292 0.9349659085
+ 0.9449576735 0.9436427951 0.9354647994
+ 0.9454091787 0.9440872073 0.9359622002
+ 0.9458584785 0.9445304871 0.9364575744
+ 0.9463077784 0.9449738860 0.9369530082
+ 0.9467570186 0.9454172254 0.9374483824
+ 0.9472063184 0.9458606243 0.9379438162
+ 0.9476556182 0.9463039041 0.9384390712
+ 0.9481049180 0.9467471838 0.9389345050
+ 0.9485542178 0.9471905828 0.9394298792
+ 0.9490035176 0.9476339221 0.9399253130
+ 0.9494526982 0.9480772018 0.9404206872
+ 0.9498931766 0.9485139847 0.9409106970
+ 0.9503325224 0.9489501119 0.9413999915
+ 0.9507718086 0.9493861198 0.9418894053
+ 0.9512112141 0.9498221874 0.9423786998
+ 0.9516505003 0.9502581954 0.9428679943
+ 0.9520899057 0.9506943226 0.9433574080
+ 0.9525291920 0.9511302710 0.9438467026
+ 0.9529684782 0.9515663981 0.9443361163
+ 0.9534078836 0.9520024061 0.9448254108
+ 0.9538437128 0.9524362087 0.9453141093
+ 0.9542688131 0.9528629184 0.9458007216
+ 0.9546939135 0.9532896280 0.9462872744
+ 0.9551190138 0.9537162185 0.9467738867
+ 0.9555441141 0.9541429281 0.9472606182
+ 0.9559692144 0.9545695782 0.9477471709
+ 0.9563943148 0.9549962878 0.9482337832
+ 0.9568194747 0.9554229975 0.9487203956
+ 0.9572445750 0.9558497071 0.9492071271
+ 0.9576696754 0.9562764168 0.9496936798
+ 0.9580900073 0.9567002058 0.9501780868
+ 0.9585055113 0.9571210742 0.9506604075
+ 0.9589208961 0.9575420022 0.9511427283
+ 0.9593364000 0.9579628110 0.9516249895
+ 0.9597519040 0.9583836794 0.9521073103
+ 0.9601672888 0.9588046074 0.9525895715
+ 0.9605827928 0.9592254758 0.9530717731
+ 0.9609982967 0.9596462846 0.9535540938
+ 0.9614136815 0.9600672126 0.9540364146
+ 0.9618291855 0.9604880810 0.9545186758
+ 0.9622408748 0.9609053731 0.9549967051
+ 0.9626505971 0.9613206983 0.9554721713
+ 0.9630602002 0.9617360234 0.9559476972
+ 0.9634698033 0.9621512294 0.9564232826
+ 0.9638794065 0.9625664949 0.9568988085
+ 0.9642891288 0.9629818201 0.9573743939
+ 0.9646986723 0.9633970857 0.9578499198
+ 0.9651082754 0.9638124108 0.9583255053
+ 0.9655178785 0.9642276168 0.9588009715
+ 0.9659274817 0.9646428823 0.9592764974
+ 0.9663329720 0.9650545716 0.9597474933
+ 0.9667364955 0.9654644728 0.9602164030
+ 0.9671400189 0.9658744931 0.9606851935
+ 0.9675434828 0.9662843943 0.9611539841
+ 0.9679470062 0.9666942954 0.9616228938
+ 0.9683504105 0.9671043158 0.9620916843
+ 0.9687538743 0.9675142169 0.9625605941
+ 0.9691573977 0.9679241776 0.9630293846
+ 0.9695609212 0.9683340788 0.9634981751
+ 0.9699643850 0.9687440991 0.9639670849
+ 0.9703654051 0.9691501260 0.9644325972
+ 0.9707646966 0.9695534706 0.9648959041
+ 0.9711639881 0.9699568748 0.9653592706
+ 0.9715632796 0.9703602791 0.9658225775
+ 0.9719626904 0.9707638025 0.9662858844
+ 0.9723619819 0.9711672068 0.9667493105
+ 0.9727612734 0.9715706110 0.9672126174
+ 0.9731606841 0.9719740748 0.9676759839
+ 0.9735599756 0.9723774791 0.9681392908
+ 0.9739593267 0.9727808833 0.9686025977
+ 0.9743570089 0.9731823802 0.9690620899
+ 0.9747526050 0.9735813141 0.9695165157
+ 0.9751480818 0.9739801884 0.9699708223
+ 0.9755436778 0.9743791223 0.9704251289
+ 0.9759392142 0.9747779965 0.9708794951
+ 0.9763348103 0.9751768708 0.9713338017
+ 0.9767302871 0.9755758047 0.9717881083
+ 0.9771258235 0.9759746790 0.9722424746
+ 0.9775214195 0.9763736725 0.9726967812
+ 0.9779168963 0.9767726064 0.9731512070
+ 0.9783114195 0.9771707058 0.9736040235
+ 0.9786989093 0.9775642753 0.9740474820
+ 0.9790863991 0.9779577851 0.9744911194
+ 0.9794738889 0.9783512950 0.9749345779
+ 0.9798614979 0.9787448049 0.9753780961
+ 0.9802489877 0.9791383147 0.9758216143
+ 0.9806364775 0.9795318246 0.9762650728
+ 0.9810240269 0.9799252748 0.9767085910
+ 0.9814115167 0.9803189039 0.9771521091
+ 0.9817990065 0.9807124138 0.9775956273
+ 0.9821864963 0.9811059237 0.9780392051
+ 0.9825655818 0.9814931750 0.9784761071
+ 0.9829416275 0.9818782210 0.9789105058
+ 0.9833174944 0.9822633266 0.9793450236
+ 0.9836934805 0.9826483130 0.9797794819
+ 0.9840694070 0.9830332994 0.9802138805
+ 0.9844453931 0.9834184051 0.9806483984
+ 0.9848213196 0.9838033915 0.9810829163
+ 0.9851973057 0.9841883779 0.9815173149
+ 0.9855731726 0.9845734239 0.9819517732
+ 0.9859492183 0.9849585295 0.9823862910
+ 0.9863222241 0.9853414297 0.9828186035
+ 0.9866843820 0.9857168794 0.9832429886
+ 0.9870467186 0.9860923290 0.9836674929
+ 0.9874088764 0.9864677191 0.9840919971
+ 0.9877712131 0.9868432283 0.9845165014
+ 0.9881333709 0.9872186184 0.9849410057
+ 0.9884957075 0.9875940084 0.9853653908
+ 0.9888579249 0.9879695177 0.9857898951
+ 0.9892202020 0.9883449078 0.9862143993
+ 0.9895824194 0.9887202978 0.9866389036
+ 0.9899446964 0.9890956879 0.9870632887
+ 0.9902951717 0.9894627929 0.9874807000
+ 0.9906374216 0.9898239970 0.9878932238
+ 0.9909796119 0.9901852012 0.9883056283
+ 0.9913218021 0.9905464053 0.9887179732
+ 0.9916639924 0.9909076095 0.9891303778
+ 0.9920061827 0.9912688136 0.9895427823
+ 0.9923483729 0.9916298985 0.9899551868
+ 0.9926906228 0.9919911027 0.9903675914
+ 0.9930328131 0.9923523068 0.9907801151
+ 0.9933750033 0.9927135110 0.9911925197
+ 0.9937171936 0.9930747151 0.9916049242
+ 0.9940317869 0.9934129715 0.9920030236
+ 0.9943410754 0.9937469959 0.9923985004
+ 0.9946504831 0.9940810204 0.9927939177
+ 0.9949597716 0.9944151044 0.9931892753
+ 0.9952691793 0.9947491288 0.9935848117
+ 0.9955785275 0.9950830936 0.9939802289
+ 0.9958878160 0.9954171181 0.9943757057
+ 0.9961972237 0.9957510829 0.9947711229
+ 0.9965065122 0.9960851073 0.9951664805
+ 0.9968159199 0.9964190722 0.9955620170
+ 0.9971252084 0.9967530966 0.9959573746
+ 0.9973875284 0.9970490932 0.9963253736
+ 0.9976487160 0.9973441958 0.9966928959
+ 0.9979100227 0.9976391792 0.9970602989
+ 0.9981712103 0.9979342818 0.9974278212
+ 0.9984325171 0.9982293844 0.9977952838
+ 0.9986937046 0.9985244870 0.9981626868
+ 0.9989550114 0.9988195896 0.9985302091
+ 0.9992161989 0.9991146922 0.9988976121
+ 0.9994775057 0.9994097948 0.9992650747
+ 0.9997386932 0.9997048974 0.9996324778
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/agfa_advantix_400.spi1d b/release/datafiles/colormanagement/luts/film_response/agfa_advantix_400.spi1d
new file mode 100644
index 00000000000..289bffe37a4
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/agfa_advantix_400.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0077106012 0.0070298198 0.0049559241
+ 0.0147110997 0.0133244200 0.0095438547
+ 0.0209813993 0.0190351103 0.0137957605
+ 0.0266668592 0.0242017098 0.0177728795
+ 0.0318832099 0.0289859492 0.0215300098
+ 0.0367198400 0.0334706604 0.0251365695
+ 0.0412060991 0.0377071798 0.0285660401
+ 0.0454186983 0.0417603701 0.0318240002
+ 0.0495144203 0.0456782803 0.0349723399
+ 0.0534897000 0.0494300202 0.0380599014
+ 0.0572170094 0.0530248806 0.0410333909
+ 0.0607506298 0.0564629287 0.0438579209
+ 0.0642050877 0.0597890504 0.0466150604
+ 0.0676248968 0.0630782619 0.0493207090
+ 0.0709792525 0.0663433895 0.0519826487
+ 0.0742666870 0.0695055276 0.0545649193
+ 0.0774300173 0.0725333989 0.0570865013
+ 0.0805151016 0.0754740685 0.0595324002
+ 0.0835210085 0.0783350095 0.0619145297
+ 0.0864818692 0.0811579376 0.0642616600
+ 0.0894213691 0.0839637592 0.0665879101
+ 0.0923196077 0.0867140666 0.0689035431
+ 0.0951313078 0.0894301310 0.0712108612
+ 0.0978739634 0.0921017230 0.0734841302
+ 0.1005603969 0.0947171375 0.0757039636
+ 0.1032031998 0.0972908884 0.0778791532
+ 0.1058200002 0.0998220220 0.0800394490
+ 0.1084190011 0.1023029983 0.0821614563
+ 0.1110042036 0.1047497019 0.0842550322
+ 0.1135606021 0.1071517989 0.0863265395
+ 0.1160767004 0.1095222011 0.0883673579
+ 0.1185398027 0.1118747965 0.0903817788
+ 0.1209601983 0.1141934991 0.0923686922
+ 0.1233263016 0.1164946035 0.0943281874
+ 0.1256539971 0.1187560037 0.0962788835
+ 0.1279318035 0.1210196018 0.0982189104
+ 0.1301839054 0.1232483014 0.1001423001
+ 0.1324169934 0.1254474968 0.1020568013
+ 0.1346450001 0.1275981963 0.1039576009
+ 0.1368439049 0.1297464967 0.1058444977
+ 0.1390296966 0.1318780035 0.1077136993
+ 0.1412141025 0.1339951009 0.1095665023
+ 0.1433850974 0.1361036003 0.1114090011
+ 0.1455492973 0.1381817013 0.1132375002
+ 0.1476995945 0.1402491927 0.1150472015
+ 0.1498260051 0.1422760040 0.1168475971
+ 0.1519210935 0.1442877054 0.1186361015
+ 0.1539843976 0.1462759972 0.1204114035
+ 0.1560284048 0.1482367963 0.1221595034
+ 0.1580577046 0.1501837969 0.1238816977
+ 0.1600770950 0.1520957053 0.1255871058
+ 0.1620800942 0.1539966017 0.1272871047
+ 0.1640495956 0.1559009999 0.1289671063
+ 0.1659898013 0.1577883065 0.1306212991
+ 0.1679138988 0.1596692055 0.1322596073
+ 0.1698164046 0.1615532041 0.1338987052
+ 0.1716932058 0.1634092033 0.1355329007
+ 0.1735651940 0.1652536988 0.1371469051
+ 0.1754256934 0.1670915931 0.1387543976
+ 0.1772599965 0.1689036936 0.1403618008
+ 0.1790851951 0.1707046032 0.1419776976
+ 0.1808962971 0.1724977046 0.1435960978
+ 0.1826874018 0.1742753983 0.1452053040
+ 0.1844758987 0.1760344952 0.1468037963
+ 0.1862519979 0.1777956039 0.1483945996
+ 0.1880110949 0.1795548946 0.1499821991
+ 0.1897681952 0.1812911928 0.1515644044
+ 0.1915334016 0.1830188930 0.1531336010
+ 0.1933026016 0.1847521067 0.1546926945
+ 0.1950711012 0.1864724010 0.1562453955
+ 0.1968317926 0.1881736070 0.1577879936
+ 0.1985855997 0.1898707002 0.1593212038
+ 0.2003341019 0.1915744990 0.1608411968
+ 0.2020726055 0.1932611018 0.1623475999
+ 0.2038006037 0.1949308962 0.1638498008
+ 0.2055211961 0.1965949982 0.1653402001
+ 0.2072315067 0.1982464939 0.1668276936
+ 0.2089259028 0.1998752952 0.1683100015
+ 0.2106073052 0.2014864981 0.1697766036
+ 0.2122824937 0.2030902952 0.1712321937
+ 0.2139520049 0.2046858966 0.1726851016
+ 0.2156112045 0.2062691003 0.1741385013
+ 0.2172587067 0.2078413963 0.1755896062
+ 0.2189002037 0.2094067931 0.1770340055
+ 0.2205414027 0.2109739035 0.1784697026
+ 0.2221654058 0.2125506997 0.1799007058
+ 0.2237752974 0.2141104043 0.1813267022
+ 0.2253734022 0.2156585008 0.1827555001
+ 0.2269579023 0.2172029018 0.1841821969
+ 0.2285311073 0.2187507004 0.1856049001
+ 0.2301028073 0.2203052938 0.1870242953
+ 0.2316679060 0.2218398005 0.1884412020
+ 0.2332272977 0.2233646065 0.1898476034
+ 0.2347781956 0.2248875052 0.1912508011
+ 0.2363210022 0.2264139950 0.1926520020
+ 0.2378583997 0.2279502004 0.1940511018
+ 0.2393900007 0.2294773012 0.1954436004
+ 0.2409213930 0.2309951931 0.1968320012
+ 0.2424533069 0.2325080037 0.1982160956
+ 0.2439856976 0.2340212017 0.1995960027
+ 0.2455042005 0.2355341017 0.2009744048
+ 0.2470149994 0.2370381951 0.2023515999
+ 0.2485187054 0.2385327965 0.2037250996
+ 0.2500135005 0.2400144935 0.2050911933
+ 0.2515035868 0.2414941937 0.2064488977
+ 0.2529886961 0.2429734021 0.2078043073
+ 0.2544668913 0.2444527000 0.2091580927
+ 0.2559421062 0.2459246963 0.2105102986
+ 0.2574181855 0.2473870963 0.2118566930
+ 0.2588958144 0.2488387972 0.2131976932
+ 0.2603701949 0.2502841949 0.2145289928
+ 0.2618409991 0.2517311871 0.2158571929
+ 0.2633078098 0.2531799972 0.2171828002
+ 0.2647666931 0.2546122968 0.2185021937
+ 0.2662197948 0.2560352981 0.2198203057
+ 0.2676647902 0.2574462891 0.2211371064
+ 0.2690947056 0.2588512003 0.2224553972
+ 0.2705186903 0.2602562904 0.2237727940
+ 0.2719335854 0.2616656125 0.2250885069
+ 0.2733449936 0.2630712092 0.2264019996
+ 0.2747541964 0.2644746006 0.2277133018
+ 0.2761535943 0.2658649981 0.2290149033
+ 0.2775473893 0.2672511041 0.2303117961
+ 0.2789311111 0.2686300874 0.2316035926
+ 0.2803080976 0.2700101137 0.2328924984
+ 0.2816820145 0.2713905871 0.2341804951
+ 0.2830528915 0.2727720141 0.2354660928
+ 0.2844218910 0.2741498053 0.2367486060
+ 0.2857857049 0.2755183876 0.2380257994
+ 0.2871482074 0.2768800855 0.2393009067
+ 0.2885094881 0.2782357037 0.2405748963
+ 0.2898694873 0.2795907855 0.2418427020
+ 0.2912288904 0.2809456885 0.2431090027
+ 0.2925894856 0.2822988927 0.2443675995
+ 0.2939479947 0.2836497128 0.2456243038
+ 0.2952952981 0.2849884033 0.2468754947
+ 0.2966383994 0.2863219976 0.2481230944
+ 0.2979727983 0.2876453102 0.2493657023
+ 0.2993055880 0.2889670134 0.2506079078
+ 0.3006362915 0.2902868092 0.2518497109
+ 0.3019703031 0.2916113138 0.2530942857
+ 0.3033066094 0.2929391861 0.2543402910
+ 0.3046467900 0.2942663133 0.2555767894
+ 0.3059892058 0.2955929935 0.2568103075
+ 0.3073258102 0.2969133854 0.2580339909
+ 0.3086602092 0.2982315123 0.2592557073
+ 0.3099907041 0.2995441854 0.2604722977
+ 0.3113198876 0.3008551896 0.2616879940
+ 0.3126456141 0.3021624088 0.2629038990
+ 0.3139702082 0.3034684956 0.2641198039
+ 0.3152804971 0.3047659099 0.2653389871
+ 0.3165856004 0.3060601950 0.2665588856
+ 0.3178817928 0.3073394001 0.2677814960
+ 0.3191738129 0.3086116910 0.2690047026
+ 0.3204653859 0.3098776937 0.2702280879
+ 0.3217566907 0.3111397028 0.2714515030
+ 0.3230504096 0.3124023974 0.2726680934
+ 0.3243465126 0.3136656880 0.2738803029
+ 0.3256357014 0.3149282932 0.2750887871
+ 0.3269129992 0.3161900043 0.2762930095
+ 0.3281877041 0.3174473047 0.2774964869
+ 0.3294523060 0.3186891079 0.2786985040
+ 0.3307167888 0.3199306130 0.2799009085
+ 0.3319742084 0.3211612105 0.2811062932
+ 0.3332315981 0.3223916888 0.2823117077
+ 0.3344798982 0.3236224949 0.2835228145
+ 0.3357258141 0.3248533905 0.2847346067
+ 0.3369632959 0.3260852993 0.2859402895
+ 0.3381935060 0.3273181915 0.2871426940
+ 0.3394210935 0.3285504878 0.2883437872
+ 0.3406409919 0.3297812939 0.2895427942
+ 0.3418608904 0.3310121894 0.2907412052
+ 0.3430762887 0.3322376013 0.2919301987
+ 0.3442913890 0.3334628046 0.2931191921
+ 0.3455013931 0.3346853852 0.2943033874
+ 0.3467079103 0.3359062970 0.2954855859
+ 0.3479113877 0.3371267021 0.2966673970
+ 0.3491044044 0.3383455873 0.2978483140
+ 0.3502975106 0.3395645022 0.2990292907
+ 0.3514811993 0.3407759070 0.3002046943
+ 0.3526628017 0.3419859111 0.3013797998
+ 0.3538405001 0.3431887925 0.3025487959
+ 0.3550119102 0.3443804085 0.3037114143
+ 0.3561832011 0.3455719948 0.3048739135
+ 0.3573499024 0.3467567861 0.3060263097
+ 0.3585161865 0.3479408920 0.3071787059
+ 0.3596819937 0.3491263092 0.3083275855
+ 0.3608472049 0.3503136933 0.3094730973
+ 0.3620123863 0.3515009880 0.3106186092
+ 0.3631744087 0.3526912928 0.3117532134
+ 0.3643358946 0.3538821042 0.3128874004
+ 0.3654957116 0.3550710082 0.3140192926
+ 0.3666515052 0.3562552929 0.3151476085
+ 0.3678072095 0.3574396968 0.3162758946
+ 0.3689568043 0.3586226106 0.3174037933
+ 0.3701032996 0.3598049879 0.3185315132
+ 0.3712497056 0.3609873056 0.3196595907
+ 0.3723874092 0.3621698916 0.3207899034
+ 0.3735251129 0.3633525968 0.3219203055
+ 0.3746606112 0.3645330071 0.3230482042
+ 0.3757919073 0.3657091856 0.3241730034
+ 0.3769231141 0.3668855131 0.3252978027
+ 0.3780477941 0.3680585921 0.3264195919
+ 0.3791683912 0.3692297041 0.3275401890
+ 0.3802889884 0.3704009056 0.3286607862
+ 0.3814114928 0.3715662062 0.3297694921
+ 0.3825342059 0.3727307022 0.3308778107
+ 0.3836567998 0.3738948107 0.3319844902
+ 0.3847779036 0.3750543892 0.3330835998
+ 0.3858990073 0.3762139976 0.3341825902
+ 0.3870202899 0.3773706853 0.3352803886
+ 0.3881419003 0.3785190880 0.3363755047
+ 0.3892636001 0.3796674013 0.3374705911
+ 0.3903855085 0.3808118105 0.3385663033
+ 0.3915078044 0.3819499016 0.3396627009
+ 0.3926301897 0.3830879927 0.3407590091
+ 0.3937473893 0.3842205107 0.3418577909
+ 0.3948588073 0.3853465915 0.3429583013
+ 0.3959701955 0.3864727020 0.3440589011
+ 0.3970786929 0.3875936866 0.3451572061
+ 0.3981842995 0.3887099922 0.3462541997
+ 0.3992899954 0.3898262978 0.3473511934
+ 0.4003950953 0.3909426928 0.3484469056
+ 0.4014996886 0.3920593858 0.3495419025
+ 0.4026043117 0.3931761086 0.3506368995
+ 0.4037061036 0.3942928016 0.3517259955
+ 0.4048052132 0.3954096138 0.3528110087
+ 0.4059042931 0.3965264857 0.3538959920
+ 0.4069995880 0.3976393044 0.3549771905
+ 0.4080899060 0.3987472057 0.3560549915
+ 0.4091801047 0.3998549879 0.3571327925
+ 0.4102692008 0.4009611905 0.3582096994
+ 0.4113557935 0.4020644128 0.3592854142
+ 0.4124422967 0.4031674862 0.3603610098
+ 0.4135288894 0.4042702019 0.3614374101
+ 0.4146164060 0.4053708017 0.3625159860
+ 0.4157038033 0.4064713120 0.3635945916
+ 0.4167912900 0.4075717926 0.3646731079
+ 0.4178684056 0.4086636007 0.3657506108
+ 0.4189451039 0.4097551107 0.3668282032
+ 0.4200218916 0.4108465910 0.3679057062
+ 0.4210911095 0.4119307995 0.3689739108
+ 0.4221575856 0.4130122960 0.3700402081
+ 0.4232240021 0.4140937924 0.3711063862
+ 0.4242891967 0.4151681066 0.3721705079
+ 0.4253528118 0.4162335992 0.3732328117
+ 0.4264163971 0.4172990918 0.3742950857
+ 0.4274801910 0.4183638096 0.3753553033
+ 0.4285458922 0.4194228053 0.3764078021
+ 0.4296115041 0.4204818010 0.3774603903
+ 0.4306772053 0.4215407968 0.3785130084
+ 0.4317356944 0.4225960970 0.3795596957
+ 0.4327917993 0.4236500859 0.3806053102
+ 0.4338479042 0.4247041941 0.3816510141
+ 0.4349010885 0.4257571995 0.3826957047
+ 0.4359481037 0.4268082976 0.3837392926
+ 0.4369950891 0.4278593957 0.3847829103
+ 0.4380421042 0.4289104939 0.3858264983
+ 0.4390830994 0.4299480021 0.3868727982
+ 0.4401232004 0.4309833944 0.3879191875
+ 0.4411633015 0.4320186973 0.3889656067
+ 0.4421998858 0.4330511987 0.3900116980
+ 0.4432297945 0.4340781868 0.3910571933
+ 0.4442596138 0.4351052940 0.3921026886
+ 0.4452894926 0.4361324012 0.3931482136
+ 0.4463081956 0.4371604025 0.3941898048
+ 0.4473238885 0.4381886125 0.3952310085
+ 0.4483394921 0.4392169118 0.3962720931
+ 0.4493534863 0.4402456880 0.3973116875
+ 0.4503594041 0.4412770867 0.3983471990
+ 0.4513652921 0.4423084855 0.3993827105
+ 0.4523712099 0.4433399141 0.4004181027
+ 0.4533743858 0.4443711936 0.4014500976
+ 0.4543752968 0.4454025030 0.4024800062
+ 0.4553762078 0.4464336932 0.4035097957
+ 0.4563770890 0.4474649131 0.4045395851
+ 0.4573712051 0.4484929144 0.4055626094
+ 0.4583637118 0.4495202899 0.4065848887
+ 0.4593561888 0.4505476058 0.4076071978
+ 0.4603483975 0.4515748024 0.4086290896
+ 0.4613364041 0.4525992870 0.4096485972
+ 0.4623242915 0.4536238015 0.4106681049
+ 0.4633122981 0.4546484053 0.4116876125
+ 0.4642986953 0.4556727111 0.4127076864
+ 0.4652802050 0.4566963017 0.4137291908
+ 0.4662617147 0.4577200115 0.4147506952
+ 0.4672433138 0.4587436914 0.4157721996
+ 0.4682214856 0.4597648084 0.4167939126
+ 0.4691945910 0.4607819021 0.4178156853
+ 0.4701677859 0.4617989957 0.4188374877
+ 0.4711408913 0.4628162086 0.4198592901
+ 0.4721117914 0.4638265073 0.4208815098
+ 0.4730801880 0.4648295045 0.4219039977
+ 0.4740486145 0.4658325016 0.4229264855
+ 0.4750168920 0.4668354988 0.4239490926
+ 0.4759812951 0.4678359032 0.4249672890
+ 0.4769417942 0.4688338935 0.4259825051
+ 0.4779022932 0.4698317945 0.4269978106
+ 0.4788627923 0.4708298147 0.4280130863
+ 0.4798217118 0.4718261063 0.4290243089
+ 0.4807789028 0.4728206098 0.4300324917
+ 0.4817360938 0.4738149941 0.4310407043
+ 0.4826933146 0.4748094976 0.4320487976
+ 0.4836510122 0.4758031070 0.4330525994
+ 0.4846090972 0.4767954051 0.4340521097
+ 0.4855673015 0.4777877033 0.4350515008
+ 0.4865255058 0.4787800014 0.4360510111
+ 0.4874827862 0.4797681868 0.4370489120
+ 0.4884381890 0.4807466865 0.4380441904
+ 0.4893935025 0.4817250967 0.4390394986
+ 0.4903487861 0.4827035964 0.4400348067
+ 0.4913035929 0.4836812913 0.4410301149
+ 0.4922530055 0.4846526980 0.4420258105
+ 0.4932022989 0.4856241941 0.4430215061
+ 0.4941517115 0.4865956008 0.4440171123
+ 0.4951010942 0.4875670969 0.4450128078
+ 0.4960469902 0.4885401130 0.4460073113
+ 0.4969922900 0.4895133078 0.4470018148
+ 0.4979375899 0.4904865026 0.4479962885
+ 0.4988828897 0.4914596975 0.4489907026
+ 0.4998261929 0.4924297035 0.4499832988
+ 0.5007678866 0.4933972061 0.4509747922
+ 0.5017095804 0.4943645895 0.4519664049
+ 0.5026512146 0.4953320920 0.4529578984
+ 0.5035929084 0.4962972105 0.4539453983
+ 0.5045344830 0.4972535968 0.4549227953
+ 0.5054761767 0.4982098937 0.4559001923
+ 0.5064178109 0.4991663098 0.4568775892
+ 0.5073593855 0.5001226068 0.4578549862
+ 0.5082985759 0.5010713935 0.4588257968
+ 0.5092371106 0.5020182133 0.4597955048
+ 0.5101755261 0.5029649734 0.4607652128
+ 0.5111140013 0.5039117932 0.4617348909
+ 0.5120512843 0.5048583150 0.4627009034
+ 0.5129861832 0.5058041811 0.4636611938
+ 0.5139210224 0.5067501068 0.4646215141
+ 0.5148558021 0.5076960921 0.4655818045
+ 0.5157907009 0.5086420178 0.4665420949
+ 0.5167201161 0.5095835924 0.4674983025
+ 0.5176479220 0.5105239153 0.4684537053
+ 0.5185757279 0.5114641786 0.4694091976
+ 0.5195034742 0.5124045014 0.4703646004
+ 0.5204296112 0.5133435726 0.4713194966
+ 0.5213472843 0.5142772794 0.4722726047
+ 0.5222650766 0.5152109265 0.4732257128
+ 0.5231828094 0.5161445141 0.4741787910
+ 0.5241004825 0.5170782208 0.4751318991
+ 0.5250151753 0.5180053115 0.4760791957
+ 0.5259271264 0.5189262033 0.4770225883
+ 0.5268388987 0.5198469758 0.4779661000
+ 0.5277506709 0.5207679272 0.4789094925
+ 0.5286625028 0.5216888189 0.4798529148
+ 0.5295729041 0.5226063132 0.4807907045
+ 0.5304828882 0.5235229135 0.4817276001
+ 0.5313928723 0.5244395137 0.4826645851
+ 0.5323029160 0.5253561139 0.4836015105
+ 0.5332129002 0.5262727141 0.4845381975
+ 0.5341181159 0.5271934867 0.4854718149
+ 0.5350232720 0.5281143188 0.4864053130
+ 0.5359284282 0.5290349722 0.4873388112
+ 0.5368335843 0.5299558043 0.4882723987
+ 0.5377376080 0.5308768749 0.4892036915
+ 0.5386344790 0.5318000913 0.4901269078
+ 0.5395315289 0.5327231884 0.4910500944
+ 0.5404284000 0.5336464047 0.4919733107
+ 0.5413252711 0.5345695019 0.4928965867
+ 0.5422213078 0.5354900956 0.4938173890
+ 0.5431140065 0.5364019871 0.4947327971
+ 0.5440065861 0.5373138785 0.4956482053
+ 0.5448992848 0.5382258296 0.4965636134
+ 0.5457919240 0.5391377211 0.4974789023
+ 0.5466845036 0.5400484800 0.4983932078
+ 0.5475770235 0.5409557223 0.4993050992
+ 0.5484694839 0.5418627858 0.5002170205
+ 0.5493621230 0.5427699089 0.5011289120
+ 0.5502545834 0.5436770916 0.5020408034
+ 0.5511453748 0.5445848703 0.5029529929
+ 0.5520284176 0.5454956889 0.5038657784
+ 0.5529114008 0.5464066267 0.5047786236
+ 0.5537943244 0.5473175049 0.5056914091
+ 0.5546773076 0.5482283235 0.5066043139
+ 0.5555598140 0.5491390228 0.5075178146
+ 0.5564333797 0.5500462055 0.5084359050
+ 0.5573070049 0.5509535074 0.5093541145
+ 0.5581805706 0.5518608093 0.5102722049
+ 0.5590541959 0.5527679920 0.5111904144
+ 0.5599278212 0.5536752939 0.5121085048
+ 0.5607947707 0.5545750260 0.5130286813
+ 0.5616607070 0.5554735065 0.5139490962
+ 0.5625265837 0.5563721061 0.5148693919
+ 0.5633925200 0.5572705865 0.5157896876
+ 0.5642585158 0.5581691265 0.5167099833
+ 0.5651180744 0.5590634942 0.5176302195
+ 0.5659735799 0.5599551201 0.5185502172
+ 0.5668290257 0.5608466268 0.5194702148
+ 0.5676844120 0.5617381930 0.5203902125
+ 0.5685399175 0.5626296997 0.5213103294
+ 0.5693951845 0.5635216832 0.5222290158
+ 0.5702500939 0.5644145012 0.5231453776
+ 0.5711050034 0.5653073788 0.5240616798
+ 0.5719599128 0.5662003160 0.5249779820
+ 0.5728148222 0.5670931935 0.5258942842
+ 0.5736696720 0.5679860711 0.5268107057
+ 0.5745213032 0.5688735843 0.5277202725
+ 0.5753722787 0.5697603226 0.5286294222
+ 0.5762233734 0.5706470013 0.5295385122
+ 0.5770744085 0.5715336800 0.5304474831
+ 0.5779255033 0.5724204183 0.5313565731
+ 0.5787749290 0.5733029842 0.5322644114
+ 0.5796216726 0.5741786957 0.5331705213
+ 0.5804684758 0.5750545263 0.5340765715
+ 0.5813153982 0.5759302974 0.5349826813
+ 0.5821622014 0.5768060088 0.5358887911
+ 0.5830090046 0.5776817799 0.5367949009
+ 0.5838500261 0.5785498023 0.5377020240
+ 0.5846896768 0.5794162750 0.5386093259
+ 0.5855293870 0.5802826881 0.5395165086
+ 0.5863690972 0.5811491013 0.5404236913
+ 0.5872088075 0.5820155144 0.5413309932
+ 0.5880478024 0.5828816295 0.5422391295
+ 0.5888836980 0.5837466121 0.5431495905
+ 0.5897195935 0.5846114755 0.5440601110
+ 0.5905554891 0.5854765177 0.5449705720
+ 0.5913913250 0.5863415003 0.5458810925
+ 0.5922272205 0.5872064233 0.5467916131
+ 0.5930604935 0.5880705118 0.5476971865
+ 0.5938909054 0.5889335871 0.5485988855
+ 0.5947213173 0.5897967815 0.5495005250
+ 0.5955516100 0.5906599164 0.5504022241
+ 0.5963820219 0.5915231109 0.5513038039
+ 0.5972123742 0.5923861861 0.5522055030
+ 0.5980378985 0.5932421088 0.5531039834
+ 0.5988610983 0.5940948129 0.5540016294
+ 0.5996842980 0.5949473977 0.5548992157
+ 0.6005076170 0.5958001018 0.5557969213
+ 0.6013308167 0.5966528058 0.5566945076
+ 0.6021540761 0.5975055099 0.5575920939
+ 0.6029741764 0.5983492136 0.5584818721
+ 0.6037936807 0.5991911888 0.5593709946
+ 0.6046133041 0.6000332236 0.5602599978
+ 0.6054328084 0.6008751988 0.5611490011
+ 0.6062523127 0.6017171144 0.5620381236
+ 0.6070718765 0.6025590897 0.5629271269
+ 0.6078854203 0.6033985019 0.5638099909
+ 0.6086981297 0.6042374969 0.5646926761
+ 0.6095107794 0.6050766110 0.5655754209
+ 0.6103236079 0.6059157252 0.5664582253
+ 0.6111363173 0.6067547202 0.5673409104
+ 0.6119490266 0.6075937748 0.5682235956
+ 0.6127572060 0.6084339023 0.5691041946
+ 0.6135646105 0.6092742085 0.5699847937
+ 0.6143720150 0.6101143956 0.5708652735
+ 0.6151794195 0.6109547019 0.5717458725
+ 0.6159867048 0.6117950082 0.5726264119
+ 0.6167941093 0.6126351953 0.5735070109
+ 0.6175978780 0.6134642959 0.5743842125
+ 0.6184005141 0.6142898798 0.5752606988
+ 0.6192030907 0.6151155829 0.5761371851
+ 0.6200057268 0.6159412265 0.5770136714
+ 0.6208083034 0.6167668104 0.5778902173
+ 0.6216108799 0.6175925136 0.5787667036
+ 0.6224128008 0.6184120178 0.5796405077
+ 0.6232140064 0.6192271113 0.5805128217
+ 0.6240152717 0.6200422049 0.5813850760
+ 0.6248164773 0.6208572984 0.5822573900
+ 0.6256178021 0.6216725111 0.5831297040
+ 0.6264191270 0.6224876046 0.5840020180
+ 0.6272190213 0.6233018041 0.5848723054
+ 0.6280159950 0.6241139770 0.5857393146
+ 0.6288130879 0.6249262094 0.5866062045
+ 0.6296101213 0.6257383823 0.5874732137
+ 0.6304070950 0.6265506148 0.5883401036
+ 0.6312041283 0.6273627877 0.5892071128
+ 0.6320011020 0.6281750202 0.5900738835
+ 0.6327958107 0.6289898753 0.5909329057
+ 0.6335904002 0.6298049092 0.5917918086
+ 0.6343849897 0.6306200027 0.5926507711
+ 0.6351795197 0.6314349771 0.5935097933
+ 0.6359741092 0.6322500706 0.5943686962
+ 0.6367686987 0.6330651045 0.5952277184
+ 0.6375622153 0.6338756084 0.5960803032
+ 0.6383545995 0.6346815228 0.5969281793
+ 0.6391469836 0.6354873776 0.5977761149
+ 0.6399394870 0.6362932920 0.5986239910
+ 0.6407318711 0.6370993257 0.5994718075
+ 0.6415243745 0.6379051805 0.6003196836
+ 0.6423168182 0.6387110949 0.6011673212
+ 0.6431099176 0.6395062804 0.6020082235
+ 0.6439030766 0.6403012276 0.6028491259
+ 0.6446962953 0.6410961151 0.6036899090
+ 0.6454893947 0.6418910027 0.6045308113
+ 0.6462826133 0.6426858902 0.6053715944
+ 0.6470757127 0.6434808969 0.6062124968
+ 0.6478682160 0.6442744732 0.6070520878
+ 0.6486594081 0.6450660229 0.6078900099
+ 0.6494506001 0.6458573937 0.6087278128
+ 0.6502417922 0.6466488242 0.6095656753
+ 0.6510329843 0.6474401951 0.6104035974
+ 0.6518241763 0.6482316852 0.6112414002
+ 0.6526154280 0.6490231156 0.6120793223
+ 0.6534075141 0.6498171091 0.6129179001
+ 0.6542003155 0.6506124735 0.6137567759
+ 0.6549929976 0.6514077783 0.6145955920
+ 0.6557856798 0.6522032022 0.6154345274
+ 0.6565784216 0.6529986262 0.6162734032
+ 0.6573712230 0.6537939906 0.6171122789
+ 0.6581639051 0.6545892954 0.6179510951
+ 0.6589608788 0.6553863287 0.6187928915
+ 0.6597586274 0.6561836004 0.6196351051
+ 0.6605563164 0.6569808125 0.6204771996
+ 0.6613541245 0.6577780843 0.6213192940
+ 0.6621518135 0.6585754156 0.6221613884
+ 0.6629495025 0.6593726873 0.6230034828
+ 0.6637473106 0.6601698995 0.6238455772
+ 0.6645362973 0.6609578133 0.6246849895
+ 0.6653249264 0.6617453098 0.6255244017
+ 0.6661134958 0.6625326872 0.6263638139
+ 0.6669020057 0.6633201241 0.6272032261
+ 0.6676905751 0.6641076207 0.6280425787
+ 0.6684792042 0.6648949981 0.6288819909
+ 0.6692677736 0.6656824946 0.6297214031
+ 0.6700507998 0.6664658785 0.6305593252
+ 0.6708337069 0.6672493219 0.6313971877
+ 0.6716166139 0.6680325866 0.6322351098
+ 0.6723995209 0.6688159108 0.6330729723
+ 0.6731824279 0.6695992947 0.6339108944
+ 0.6739652157 0.6703826189 0.6347488165
+ 0.6747481227 0.6711658835 0.6355866790
+ 0.6755290031 0.6719505191 0.6364173889
+ 0.6763095856 0.6727352142 0.6372476220
+ 0.6770902276 0.6735200286 0.6380779147
+ 0.6778709292 0.6743047237 0.6389080882
+ 0.6786515117 0.6750894189 0.6397383809
+ 0.6794320941 0.6758741140 0.6405686140
+ 0.6802126765 0.6766588092 0.6413989067
+ 0.6809899211 0.6774402261 0.6422249079
+ 0.6817654967 0.6782202721 0.6430497169
+ 0.6825411916 0.6790003181 0.6438744068
+ 0.6833168864 0.6797804236 0.6446992159
+ 0.6840925813 0.6805605292 0.6455240250
+ 0.6848682761 0.6813405156 0.6463487148
+ 0.6856439710 0.6821206212 0.6471735239
+ 0.6864163876 0.6828963161 0.6479974985
+ 0.6871845126 0.6836665869 0.6488205791
+ 0.6879525781 0.6844369173 0.6496437788
+ 0.6887208223 0.6852071881 0.6504669189
+ 0.6894888878 0.6859775186 0.6512901187
+ 0.6902570128 0.6867477894 0.6521131992
+ 0.6910251975 0.6875181198 0.6529363990
+ 0.6917930245 0.6882880926 0.6537595987
+ 0.6925569773 0.6890543103 0.6545832753
+ 0.6933209896 0.6898205280 0.6554070115
+ 0.6940848827 0.6905866861 0.6562306881
+ 0.6948488951 0.6913527846 0.6570544243
+ 0.6956127882 0.6921190023 0.6578781009
+ 0.6963768005 0.6928852201 0.6587017775
+ 0.6971408129 0.6936513782 0.6595255136
+ 0.6979042888 0.6944183111 0.6603466868
+ 0.6986675262 0.6951858997 0.6611664891
+ 0.6994307041 0.6959534287 0.6619862914
+ 0.7001938820 0.6967208982 0.6628060937
+ 0.7009570003 0.6974884272 0.6636258960
+ 0.7017201781 0.6982558966 0.6644456983
+ 0.7024834156 0.6990234852 0.6652655005
+ 0.7032464743 0.6997908950 0.6660854220
+ 0.7040007114 0.7005546093 0.6669068933
+ 0.7047548890 0.7013183832 0.6677284837
+ 0.7055091262 0.7020820975 0.6685500145
+ 0.7062633038 0.7028458118 0.6693716049
+ 0.7070174813 0.7036095262 0.6701930761
+ 0.7077717185 0.7043731809 0.6710147262
+ 0.7085258961 0.7051368952 0.6718361974
+ 0.7092772126 0.7058975101 0.6726554036
+ 0.7100226283 0.7066521049 0.6734707952
+ 0.7107681036 0.7074066997 0.6742863059
+ 0.7115135789 0.7081612945 0.6751016974
+ 0.7122589946 0.7089158893 0.6759172082
+ 0.7130045295 0.7096704841 0.6767325997
+ 0.7137500048 0.7104250789 0.6775481105
+ 0.7144954205 0.7111796737 0.6783635020
+ 0.7152379155 0.7119320035 0.6791734099
+ 0.7159780264 0.7126826048 0.6799798012
+ 0.7167180777 0.7134332061 0.6807861924
+ 0.7174581885 0.7141839266 0.6815925837
+ 0.7181981802 0.7149345279 0.6823989749
+ 0.7189382911 0.7156851292 0.6832054257
+ 0.7196784019 0.7164356709 0.6840116978
+ 0.7204185128 0.7171862721 0.6848180890
+ 0.7211552262 0.7179378271 0.6856207252
+ 0.7218902111 0.7186897993 0.6864218116
+ 0.7226251960 0.7194417119 0.6872228980
+ 0.7233601809 0.7201936841 0.6880239844
+ 0.7240952253 0.7209457159 0.6888250709
+ 0.7248302102 0.7216976285 0.6896262169
+ 0.7255653143 0.7224496007 0.6904273033
+ 0.7263002992 0.7232015729 0.6912283897
+ 0.7270305157 0.7239469290 0.6920284033
+ 0.7277582884 0.7246891260 0.6928278804
+ 0.7284861803 0.7254313231 0.6936274767
+ 0.7292140722 0.7261735201 0.6944270134
+ 0.7299419045 0.7269157171 0.6952266097
+ 0.7306697965 0.7276579142 0.6960262060
+ 0.7313976884 0.7284001708 0.6968256831
+ 0.7321255803 0.7291424274 0.6976252794
+ 0.7328494787 0.7298778892 0.6984261870
+ 0.7335705757 0.7306084037 0.6992279887
+ 0.7342916727 0.7313389778 0.7000297904
+ 0.7350128293 0.7320696115 0.7008314729
+ 0.7357339263 0.7328001857 0.7016332746
+ 0.7364550233 0.7335308194 0.7024350762
+ 0.7371760011 0.7342612743 0.7032368183
+ 0.7378970981 0.7349919081 0.7040386200
+ 0.7386168838 0.7357206941 0.7048401237
+ 0.7393341064 0.7364463806 0.7056412101
+ 0.7400513887 0.7371721268 0.7064422965
+ 0.7407686710 0.7378978729 0.7072433829
+ 0.7414860129 0.7386236191 0.7080445290
+ 0.7422032952 0.7393493056 0.7088456154
+ 0.7429205775 0.7400749922 0.7096467018
+ 0.7436379194 0.7408006787 0.7104477882
+ 0.7443552017 0.7415264249 0.7112485170
+ 0.7450708747 0.7422525287 0.7120447159
+ 0.7457867265 0.7429785728 0.7128409147
+ 0.7465025187 0.7437046766 0.7136371136
+ 0.7472183108 0.7444307804 0.7144333720
+ 0.7479341030 0.7451568842 0.7152295709
+ 0.7486497760 0.7458829880 0.7160258293
+ 0.7493656278 0.7466090918 0.7168220282
+ 0.7500814199 0.7473351955 0.7176182270
+ 0.7507966161 0.7480586171 0.7184088230
+ 0.7515113950 0.7487803102 0.7191962004
+ 0.7522261739 0.7495018840 0.7199836969
+ 0.7529410124 0.7502235770 0.7207711935
+ 0.7536557913 0.7509452105 0.7215585709
+ 0.7543706298 0.7516667843 0.7223461270
+ 0.7550854087 0.7523884773 0.7231336236
+ 0.7558001876 0.7531101108 0.7239210010
+ 0.7565147281 0.7538313270 0.7247081995
+ 0.7572231293 0.7545434237 0.7254921198
+ 0.7579314709 0.7552555203 0.7262759805
+ 0.7586399913 0.7559676766 0.7270599008
+ 0.7593483925 0.7566797733 0.7278438807
+ 0.7600567937 0.7573919296 0.7286278009
+ 0.7607651949 0.7581040263 0.7294117212
+ 0.7614735961 0.7588161826 0.7301957011
+ 0.7621819973 0.7595282793 0.7309796214
+ 0.7628899217 0.7602388263 0.7317612767
+ 0.7635970116 0.7609465122 0.7325400710
+ 0.7643041015 0.7616543174 0.7333188057
+ 0.7650110722 0.7623620033 0.7340976000
+ 0.7657182217 0.7630698085 0.7348762751
+ 0.7664251924 0.7637774944 0.7356551290
+ 0.7671322823 0.7644852996 0.7364339232
+ 0.7678393126 0.7651931047 0.7372125983
+ 0.7685464025 0.7659007907 0.7379913926
+ 0.7692546248 0.7666099072 0.7387691736
+ 0.7699635029 0.7673199773 0.7395464182
+ 0.7706725001 0.7680299878 0.7403236032
+ 0.7713813782 0.7687399983 0.7411009073
+ 0.7720903158 0.7694501281 0.7418780923
+ 0.7727993131 0.7701600790 0.7426552773
+ 0.7735081911 0.7708700895 0.7434325814
+ 0.7742171884 0.7715802193 0.7442098260
+ 0.7749261260 0.7722902298 0.7449870110
+ 0.7756347060 0.7730041146 0.7457646132
+ 0.7763432264 0.7737196088 0.7465423942
+ 0.7770516276 0.7744352221 0.7473201156
+ 0.7777600884 0.7751507163 0.7480978966
+ 0.7784684896 0.7758663297 0.7488756180
+ 0.7791770101 0.7765818238 0.7496532798
+ 0.7798854709 0.7772973776 0.7504311204
+ 0.7805938721 0.7780128717 0.7512087822
+ 0.7813023925 0.7787284851 0.7519865036
+ 0.7820088267 0.7794386744 0.7527605891
+ 0.7827143073 0.7801463008 0.7535331249
+ 0.7834197283 0.7808538079 0.7543057203
+ 0.7841252089 0.7815613151 0.7550783157
+ 0.7848305702 0.7822688818 0.7558507919
+ 0.7855361104 0.7829763889 0.7566233873
+ 0.7862414718 0.7836840153 0.7573959231
+ 0.7869470119 0.7843915224 0.7581685185
+ 0.7876523733 0.7850990295 0.7589409947
+ 0.7883579135 0.7858042717 0.7597122192
+ 0.7890635133 0.7865074277 0.7604821920
+ 0.7897689939 0.7872105837 0.7612522244
+ 0.7904744744 0.7879136801 0.7620223165
+ 0.7911800146 0.7886168957 0.7627922893
+ 0.7918856144 0.7893199921 0.7635623813
+ 0.7925910950 0.7900232077 0.7643324137
+ 0.7932965755 0.7907263041 0.7651025057
+ 0.7940021753 0.7914295197 0.7658724785
+ 0.7947084904 0.7921326756 0.7666410804
+ 0.7954170704 0.7928364277 0.7674059868
+ 0.7961258292 0.7935400009 0.7681708932
+ 0.7968344092 0.7942435741 0.7689357996
+ 0.7975429893 0.7949472070 0.7697008252
+ 0.7982516885 0.7956508994 0.7704656720
+ 0.7989603281 0.7963544726 0.7712305784
+ 0.7996690273 0.7970581055 0.7719954848
+ 0.8003776073 0.7977616787 0.7727603912
+ 0.8010861874 0.7984653115 0.7735252976
+ 0.8017868996 0.7991653085 0.7742831707
+ 0.8024861813 0.7998644710 0.7750402093
+ 0.8031854033 0.8005638123 0.7757971287
+ 0.8038846254 0.8012630939 0.7765541077
+ 0.8045839071 0.8019623756 0.7773110271
+ 0.8052831292 0.8026615977 0.7780680060
+ 0.8059822917 0.8033608794 0.7788249850
+ 0.8066815734 0.8040602207 0.7795819044
+ 0.8073807955 0.8047593832 0.7803388834
+ 0.8080779910 0.8054556251 0.7810941935
+ 0.8087708950 0.8061454892 0.7818467021
+ 0.8094639182 0.8068354130 0.7825992703
+ 0.8101568222 0.8075252175 0.7833517790
+ 0.8108497262 0.8082150817 0.7841042876
+ 0.8115425706 0.8089050055 0.7848567963
+ 0.8122354746 0.8095948100 0.7856093049
+ 0.8129284978 0.8102846742 0.7863618135
+ 0.8136214018 0.8109744787 0.7871143222
+ 0.8143143058 0.8116644025 0.7878667712
+ 0.8150073290 0.8123514056 0.7886186838
+ 0.8157002926 0.8130369186 0.7893702984
+ 0.8163931966 0.8137224913 0.7901219130
+ 0.8170862198 0.8144080043 0.7908735275
+ 0.8177791834 0.8150935173 0.7916250229
+ 0.8184722066 0.8157790899 0.7923765779
+ 0.8191652298 0.8164646029 0.7931281924
+ 0.8198580742 0.8171501160 0.7938798070
+ 0.8205510974 0.8178356886 0.7946314216
+ 0.8212441206 0.8185212016 0.7953829765
+ 0.8219397068 0.8192058802 0.7961322069
+ 0.8226357102 0.8198903799 0.7968811989
+ 0.8233315945 0.8205748796 0.7976301908
+ 0.8240275979 0.8212594986 0.7983791828
+ 0.8247236013 0.8219439983 0.7991281748
+ 0.8254194856 0.8226286173 0.7998772264
+ 0.8261154890 0.8233131170 0.8006262183
+ 0.8268113732 0.8239976168 0.8013753295
+ 0.8275073767 0.8246821761 0.8021243215
+ 0.8282033801 0.8253666759 0.8028733134
+ 0.8288903832 0.8260424733 0.8036262989
+ 0.8295770884 0.8267179132 0.8043792844
+ 0.8302637935 0.8273934126 0.8051323295
+ 0.8309504986 0.8280689120 0.8058853149
+ 0.8316372037 0.8287442923 0.8066383004
+ 0.8323239088 0.8294197917 0.8073912859
+ 0.8330106735 0.8300951719 0.8081442714
+ 0.8336973786 0.8307706714 0.8088973165
+ 0.8343840837 0.8314461708 0.8096503019
+ 0.8350707889 0.8321216106 0.8104032874
+ 0.8357518911 0.8327894211 0.8111593127
+ 0.8364323974 0.8334565163 0.8119155765
+ 0.8371130228 0.8341234922 0.8126717806
+ 0.8377935290 0.8347905874 0.8134279847
+ 0.8384740949 0.8354576230 0.8141843081
+ 0.8391546011 0.8361247182 0.8149405122
+ 0.8398352265 0.8367916942 0.8156967759
+ 0.8405156732 0.8374587893 0.8164529800
+ 0.8411962986 0.8381258249 0.8172091842
+ 0.8418768048 0.8387929201 0.8179655075
+ 0.8425561786 0.8394573927 0.8187175989
+ 0.8432351947 0.8401209712 0.8194684982
+ 0.8439140916 0.8407846093 0.8202192783
+ 0.8445931077 0.8414481878 0.8209701180
+ 0.8452720046 0.8421118259 0.8217208982
+ 0.8459510207 0.8427755237 0.8224717975
+ 0.8466299176 0.8434391022 0.8232225776
+ 0.8473088741 0.8441026807 0.8239734173
+ 0.8479878902 0.8447663188 0.8247241974
+ 0.8486667871 0.8454298973 0.8254750967
+ 0.8493432999 0.8460934162 0.8262230754
+ 0.8500158787 0.8467569947 0.8269672990
+ 0.8506883979 0.8474205136 0.8277115226
+ 0.8513609767 0.8480839729 0.8284556866
+ 0.8520336151 0.8487474918 0.8291999102
+ 0.8527061939 0.8494110107 0.8299440742
+ 0.8533787727 0.8500745296 0.8306882977
+ 0.8540514112 0.8507381082 0.8314325809
+ 0.8547239900 0.8514016271 0.8321768045
+ 0.8553965092 0.8520650864 0.8329210281
+ 0.8560690880 0.8527286053 0.8336651921
+ 0.8567318916 0.8533846140 0.8344091177
+ 0.8573938012 0.8540399075 0.8351529241
+ 0.8580557108 0.8546953201 0.8358967900
+ 0.8587176204 0.8553506136 0.8366405964
+ 0.8593795896 0.8560060263 0.8373845220
+ 0.8600414991 0.8566613197 0.8381283879
+ 0.8607034087 0.8573166728 0.8388721943
+ 0.8613653183 0.8579720259 0.8396161199
+ 0.8620272875 0.8586273789 0.8403599262
+ 0.8626891971 0.8592826724 0.8411037922
+ 0.8633491993 0.8599355817 0.8418468833
+ 0.8640050292 0.8605830073 0.8425887227
+ 0.8646607995 0.8612304926 0.8433305025
+ 0.8653166294 0.8618779778 0.8440722823
+ 0.8659723997 0.8625254035 0.8448141217
+ 0.8666282296 0.8631728888 0.8455559015
+ 0.8672839999 0.8638203740 0.8462976813
+ 0.8679397702 0.8644677997 0.8470395207
+ 0.8685956001 0.8651152849 0.8477811813
+ 0.8692513704 0.8657627106 0.8485230207
+ 0.8699072003 0.8664101958 0.8492648005
+ 0.8705629706 0.8670558929 0.8500074148
+ 0.8712186813 0.8677002788 0.8507503867
+ 0.8718745112 0.8683447242 0.8514934778
+ 0.8725302219 0.8689891100 0.8522366285
+ 0.8731859922 0.8696334958 0.8529797196
+ 0.8738417029 0.8702778220 0.8537226915
+ 0.8744974732 0.8709222078 0.8544657826
+ 0.8751531839 0.8715665936 0.8552088737
+ 0.8758090138 0.8722109795 0.8559520245
+ 0.8764647841 0.8728554249 0.8566949964
+ 0.8771204948 0.8734998107 0.8574380875
+ 0.8777772188 0.8741462231 0.8581804037
+ 0.8784344792 0.8747938275 0.8589221835
+ 0.8790916800 0.8754413128 0.8596640825
+ 0.8797490001 0.8760887980 0.8604059219
+ 0.8804062009 0.8767364025 0.8611478209
+ 0.8810635209 0.8773838878 0.8618897200
+ 0.8817207217 0.8780313730 0.8626314998
+ 0.8823779225 0.8786789775 0.8633733988
+ 0.8830351830 0.8793265224 0.8641152978
+ 0.8836923838 0.8799740076 0.8648570776
+ 0.8843497038 0.8806216121 0.8655989766
+ 0.8850082159 0.8812701106 0.8663362861
+ 0.8856676221 0.8819192052 0.8670710921
+ 0.8863270283 0.8825684190 0.8678058982
+ 0.8869863749 0.8832175136 0.8685407043
+ 0.8876457810 0.8838667274 0.8692755103
+ 0.8883051276 0.8845158219 0.8700103164
+ 0.8889644742 0.8851649165 0.8707451224
+ 0.8896238804 0.8858140707 0.8714798093
+ 0.8902832866 0.8864632249 0.8722146153
+ 0.8909426928 0.8871123791 0.8729494214
+ 0.8916019797 0.8877614737 0.8736842275
+ 0.8922591805 0.8884071708 0.8744199872
+ 0.8929132223 0.8890480995 0.8751569986
+ 0.8935672045 0.8896890879 0.8758940101
+ 0.8942213058 0.8903300166 0.8766310811
+ 0.8948752880 0.8909708858 0.8773680925
+ 0.8955293298 0.8916118145 0.8781051040
+ 0.8961833119 0.8922526836 0.8788421750
+ 0.8968374133 0.8928936124 0.8795791864
+ 0.8974913955 0.8935344815 0.8803161979
+ 0.8981453776 0.8941755295 0.8810533285
+ 0.8987994194 0.8948163986 0.8817902803
+ 0.8994534016 0.8954570889 0.8825269938
+ 0.9001063704 0.8960943818 0.8832603097
+ 0.9007593989 0.8967316747 0.8839936852
+ 0.9014124274 0.8973690271 0.8847270012
+ 0.9020653963 0.8980063200 0.8854603171
+ 0.9027184248 0.8986436129 0.8861935735
+ 0.9033715129 0.8992809057 0.8869268894
+ 0.9040244818 0.8999181986 0.8876603246
+ 0.9046775103 0.9005554914 0.8883935809
+ 0.9053304791 0.9011927843 0.8891268969
+ 0.9059835076 0.9018300772 0.8898602128
+ 0.9066364765 0.9024674296 0.8905935287
+ 0.9072905779 0.9031060934 0.8913232088
+ 0.9079453945 0.9037460089 0.8920502067
+ 0.9086002707 0.9043858051 0.8927773237
+ 0.9092550874 0.9050256014 0.8935043216
+ 0.9099100232 0.9056653976 0.8942313790
+ 0.9105647802 0.9063051939 0.8949583769
+ 0.9112197161 0.9069449902 0.8956853747
+ 0.9118745923 0.9075847864 0.8964124918
+ 0.9125294089 0.9082245827 0.8971394897
+ 0.9131842852 0.9088644981 0.8978664875
+ 0.9138391018 0.9095042944 0.8985936046
+ 0.9144939780 0.9101440907 0.8993206024
+ 0.9151384234 0.9107882977 0.9000440240
+ 0.9157816768 0.9114329815 0.9007670879
+ 0.9164249897 0.9120777249 0.9014902115
+ 0.9170683026 0.9127225280 0.9022132754
+ 0.9177114964 0.9133672118 0.9029362798
+ 0.9183548093 0.9140118957 0.9036594033
+ 0.9189981222 0.9146565795 0.9043825269
+ 0.9196413755 0.9153013229 0.9051055908
+ 0.9202846885 0.9159461260 0.9058287144
+ 0.9209278822 0.9165908098 0.9065517783
+ 0.9215711951 0.9172354937 0.9072747827
+ 0.9222133756 0.9178792834 0.9079968929
+ 0.9228429198 0.9185125828 0.9087103009
+ 0.9234725237 0.9191460013 0.9094237089
+ 0.9241020083 0.9197793007 0.9101369977
+ 0.9247316122 0.9204127192 0.9108504057
+ 0.9253610969 0.9210460186 0.9115636945
+ 0.9259907007 0.9216793776 0.9122771025
+ 0.9266201854 0.9223126769 0.9129905105
+ 0.9272497892 0.9229460955 0.9137037992
+ 0.9278793931 0.9235793948 0.9144172072
+ 0.9285088778 0.9242128134 0.9151304960
+ 0.9291384816 0.9248461723 0.9158439040
+ 0.9297673106 0.9254785180 0.9165560007
+ 0.9303902984 0.9261021018 0.9172585011
+ 0.9310132265 0.9267256856 0.9179610014
+ 0.9316362143 0.9273493290 0.9186636209
+ 0.9322590828 0.9279729128 0.9193661213
+ 0.9328820705 0.9285964966 0.9200686216
+ 0.9335051179 0.9292201996 0.9207711816
+ 0.9341279864 0.9298437834 0.9214736819
+ 0.9347509742 0.9304674268 0.9221761823
+ 0.9353739023 0.9310910106 0.9228788018
+ 0.9359968901 0.9317145944 0.9235813022
+ 0.9366198182 0.9323381782 0.9242838025
+ 0.9372428060 0.9329618216 0.9249864221
+ 0.9378637075 0.9335851073 0.9256830812
+ 0.9384844899 0.9342085123 0.9263797998
+ 0.9391052723 0.9348317981 0.9270763993
+ 0.9397261143 0.9354550838 0.9277731180
+ 0.9403468966 0.9360784292 0.9284697175
+ 0.9409676790 0.9367017150 0.9291663170
+ 0.9415885210 0.9373250008 0.9298629761
+ 0.9422093034 0.9379482865 0.9305595756
+ 0.9428302050 0.9385716915 0.9312562943
+ 0.9434509873 0.9391949773 0.9319528937
+ 0.9440718293 0.9398183227 0.9326494932
+ 0.9446926117 0.9404416084 0.9333462119
+ 0.9453073740 0.9410626292 0.9340357780
+ 0.9459190965 0.9416825175 0.9347218871
+ 0.9465308189 0.9423022866 0.9354081154
+ 0.9471424818 0.9429221749 0.9360942245
+ 0.9477542043 0.9435420036 0.9367803931
+ 0.9483659267 0.9441617727 0.9374665022
+ 0.9489775896 0.9447817206 0.9381526709
+ 0.9495893121 0.9454014897 0.9388387799
+ 0.9502009749 0.9460213780 0.9395250082
+ 0.9508126974 0.9466412067 0.9402111173
+ 0.9514244199 0.9472610950 0.9408972859
+ 0.9520360827 0.9478809237 0.9415833950
+ 0.9526458979 0.9484993815 0.9422674179
+ 0.9532474279 0.9491121769 0.9429422021
+ 0.9538488984 0.9497249126 0.9436171055
+ 0.9544504285 0.9503375888 0.9442920089
+ 0.9550518990 0.9509503245 0.9449669123
+ 0.9556534290 0.9515630007 0.9456418157
+ 0.9562548995 0.9521757960 0.9463167191
+ 0.9568564296 0.9527884722 0.9469915032
+ 0.9574579000 0.9534012079 0.9476664066
+ 0.9580594897 0.9540138841 0.9483413100
+ 0.9586610198 0.9546266794 0.9490162134
+ 0.9592624903 0.9552394152 0.9496911168
+ 0.9598640203 0.9558520913 0.9503659010
+ 0.9604597092 0.9564607143 0.9510350823
+ 0.9610503912 0.9570658207 0.9516996741
+ 0.9616411924 0.9576709270 0.9523642063
+ 0.9622319937 0.9582759738 0.9530286789
+ 0.9628227949 0.9588810802 0.9536932111
+ 0.9634134769 0.9594861865 0.9543578029
+ 0.9640042782 0.9600912929 0.9550222754
+ 0.9645950794 0.9606963992 0.9556868076
+ 0.9651858211 0.9613015056 0.9563512802
+ 0.9657766223 0.9619066119 0.9570158720
+ 0.9663674235 0.9625117183 0.9576804042
+ 0.9669582248 0.9631168246 0.9583448768
+ 0.9675489068 0.9637219906 0.9590094090
+ 0.9681262970 0.9643182158 0.9596667290
+ 0.9686986208 0.9649111032 0.9603213072
+ 0.9692708254 0.9655039907 0.9609760046
+ 0.9698430896 0.9660969973 0.9616305828
+ 0.9704154134 0.9666898847 0.9622852206
+ 0.9709876776 0.9672827721 0.9629399180
+ 0.9715598822 0.9678757191 0.9635944963
+ 0.9721322060 0.9684687257 0.9642490745
+ 0.9727045298 0.9690616131 0.9649037719
+ 0.9732767940 0.9696545005 0.9655584097
+ 0.9738491178 0.9702473879 0.9662129879
+ 0.9744213223 0.9708403945 0.9668676853
+ 0.9749935865 0.9714332819 0.9675223231
+ 0.9755455256 0.9720122814 0.9681680202
+ 0.9760900736 0.9725863934 0.9688106179
+ 0.9766348004 0.9731606245 0.9694532156
+ 0.9771794081 0.9737346768 0.9700958729
+ 0.9777240753 0.9743087888 0.9707384706
+ 0.9782686830 0.9748830199 0.9713811278
+ 0.9788134098 0.9754570723 0.9720237255
+ 0.9793580174 0.9760311842 0.9726663828
+ 0.9799026251 0.9766052961 0.9733089805
+ 0.9804472923 0.9771795273 0.9739515781
+ 0.9809919000 0.9777535796 0.9745941758
+ 0.9815366268 0.9783276916 0.9752368927
+ 0.9820811749 0.9789019227 0.9758794904
+ 0.9826055765 0.9794644713 0.9765092134
+ 0.9831150770 0.9800186753 0.9771293998
+ 0.9836245775 0.9805728197 0.9777497053
+ 0.9841340184 0.9811270237 0.9783700109
+ 0.9846435189 0.9816811085 0.9789903164
+ 0.9851529002 0.9822353125 0.9796106219
+ 0.9856624007 0.9827893972 0.9802309275
+ 0.9861719012 0.9833436012 0.9808511138
+ 0.9866812825 0.9838976860 0.9814714193
+ 0.9871907830 0.9844518900 0.9820917249
+ 0.9877002239 0.9850059748 0.9827119708
+ 0.9882097244 0.9855601788 0.9833322763
+ 0.9887192249 0.9861143231 0.9839525223
+ 0.9892141223 0.9866619110 0.9845647812
+ 0.9896609783 0.9871875048 0.9851508737
+ 0.9901077747 0.9877132177 0.9857370853
+ 0.9905545712 0.9882388115 0.9863231778
+ 0.9910014272 0.9887645245 0.9869092703
+ 0.9914482832 0.9892901182 0.9874954224
+ 0.9918950796 0.9898157716 0.9880815148
+ 0.9923418760 0.9903414249 0.9886677265
+ 0.9927887917 0.9908670783 0.9892538190
+ 0.9932355881 0.9913926721 0.9898399115
+ 0.9936823845 0.9919183850 0.9904260039
+ 0.9941291809 0.9924439788 0.9910122156
+ 0.9945760965 0.9929696918 0.9915983081
+ 0.9950228930 0.9934952855 0.9921844006
+ 0.9954037070 0.9939768910 0.9927504063
+ 0.9957572818 0.9944401979 0.9933080077
+ 0.9961109161 0.9949035048 0.9938657284
+ 0.9964643717 0.9953668118 0.9944233894
+ 0.9968180060 0.9958301187 0.9949809909
+ 0.9971715212 0.9962934256 0.9955387115
+ 0.9975250959 0.9967567921 0.9960963130
+ 0.9978786111 0.9972200990 0.9966539741
+ 0.9982321858 0.9976834059 0.9972116947
+ 0.9985858202 0.9981467128 0.9977692962
+ 0.9989392757 0.9986100197 0.9983270168
+ 0.9992929101 0.9990733862 0.9988846779
+ 0.9996464252 0.9995366931 0.9994422793
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/agfa_agfachrome_ct_precisa_100.spi1d b/release/datafiles/colormanagement/luts/film_response/agfa_agfachrome_ct_precisa_100.spi1d
new file mode 100644
index 00000000000..f4f64aeb511
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/agfa_agfachrome_ct_precisa_100.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0005381406 0.0002651573 0.0005448886
+ 0.0011811421 0.0005488236 0.0011236490
+ 0.0018776740 0.0008598516 0.0017561211
+ 0.0026023439 0.0012074891 0.0024572650
+ 0.0033602889 0.0015991570 0.0032185989
+ 0.0041644410 0.0020365941 0.0040284242
+ 0.0050217710 0.0025163409 0.0048902789
+ 0.0059333672 0.0030300061 0.0058214129
+ 0.0069048190 0.0035676421 0.0068372628
+ 0.0079441704 0.0041191741 0.0079477550
+ 0.0090618078 0.0046778312 0.0091583403
+ 0.0102658896 0.0052411938 0.0104663204
+ 0.0115583995 0.0058102822 0.0118661895
+ 0.0129291601 0.0063874712 0.0133533198
+ 0.0143661099 0.0069762110 0.0149256596
+ 0.0158517305 0.0075797332 0.0165787991
+ 0.0173796508 0.0082016559 0.0183057394
+ 0.0189530998 0.0088431826 0.0200976301
+ 0.0205809996 0.0095067294 0.0219422299
+ 0.0222787503 0.0101926001 0.0238327999
+ 0.0240615793 0.0109011699 0.0257611796
+ 0.0259451196 0.0116325803 0.0277215205
+ 0.0279377103 0.0123844100 0.0297172107
+ 0.0300485604 0.0131573398 0.0317482613
+ 0.0322753713 0.0139512103 0.0338172801
+ 0.0346145704 0.0147648398 0.0359307416
+ 0.0370622911 0.0155985896 0.0380884185
+ 0.0396122485 0.0164521597 0.0402955301
+ 0.0422580615 0.0173262991 0.0425595492
+ 0.0449894518 0.0182192009 0.0448740013
+ 0.0477931984 0.0191300903 0.0472489484
+ 0.0506595708 0.0200600196 0.0496853888
+ 0.0535767302 0.0210082103 0.0521829911
+ 0.0565305017 0.0219749697 0.0547407605
+ 0.0595083982 0.0229592193 0.0573574007
+ 0.0624992885 0.0239622109 0.0600296818
+ 0.0654954314 0.0249828305 0.0627512708
+ 0.0684895366 0.0260199904 0.0655123070
+ 0.0714772493 0.0270722192 0.0683010966
+ 0.0744543299 0.0281406008 0.0711084977
+ 0.0774153098 0.0292240307 0.0739231929
+ 0.0803605914 0.0303211194 0.0767356381
+ 0.0832905099 0.0314316712 0.0795454979
+ 0.0862074494 0.0325558111 0.0823479816
+ 0.0891113579 0.0336936004 0.0851310268
+ 0.0919999331 0.0348446108 0.0878951326
+ 0.0948731005 0.0360087790 0.0906417519
+ 0.0977329016 0.0371854194 0.0933719203
+ 0.1005818024 0.0383735187 0.0960813016
+ 0.1034189016 0.0395741388 0.0987711623
+ 0.1062425002 0.0407866500 0.1014439017
+ 0.1090549007 0.0420108810 0.1041020006
+ 0.1118552014 0.0432458110 0.1067482978
+ 0.1146425009 0.0444907583 0.1093854010
+ 0.1174186990 0.0457457118 0.1120164022
+ 0.1201832965 0.0470101312 0.1146423966
+ 0.1229387969 0.0482850000 0.1172647029
+ 0.1256874949 0.0495695882 0.1198822036
+ 0.1284302026 0.0508622415 0.1224958971
+ 0.1311666965 0.0521623604 0.1251043975
+ 0.1338986009 0.0534698404 0.1277081966
+ 0.1366281956 0.0547848493 0.1303080022
+ 0.1393581927 0.0561086796 0.1329074055
+ 0.1420904994 0.0574397892 0.1355095953
+ 0.1448286027 0.0587780997 0.1381137967
+ 0.1475744992 0.0601234213 0.1407177001
+ 0.1503286064 0.0614760891 0.1433234960
+ 0.1530916989 0.0628349632 0.1459300071
+ 0.1558624953 0.0642008483 0.1485393941
+ 0.1586423963 0.0655714497 0.1511545032
+ 0.1614302993 0.0669477507 0.1537750065
+ 0.1642321050 0.0683294088 0.1563979983
+ 0.1670460999 0.0697180778 0.1590255052
+ 0.1698731035 0.0711119920 0.1616581976
+ 0.1727122962 0.0725102201 0.1642964929
+ 0.1755629927 0.0739143416 0.1669408977
+ 0.1784220040 0.0753230676 0.1695916951
+ 0.1812902987 0.0767354220 0.1722505987
+ 0.1841648072 0.0781524777 0.1749189049
+ 0.1870469004 0.0795728117 0.1775977015
+ 0.1899344027 0.0809954405 0.1802870035
+ 0.1928229034 0.0824212879 0.1829870939
+ 0.1957139969 0.0838513300 0.1856992990
+ 0.1986058056 0.0852848813 0.1884211004
+ 0.2014966011 0.0867218077 0.1911548972
+ 0.2043849975 0.0881616324 0.1939021051
+ 0.2072687000 0.0896041170 0.1966606975
+ 0.2101463974 0.0910492018 0.1994311064
+ 0.2130181938 0.0924970210 0.2022143006
+ 0.2158842981 0.0939473733 0.2050091028
+ 0.2187419981 0.0953999087 0.2078166008
+ 0.2215912044 0.0968550667 0.2106339931
+ 0.2244296968 0.0983112976 0.2134619057
+ 0.2272589952 0.0997681171 0.2162988037
+ 0.2300810069 0.1012267023 0.2191399932
+ 0.2328950018 0.1026865989 0.2219882011
+ 0.2356988937 0.1041480973 0.2248430997
+ 0.2384911031 0.1056120992 0.2277006060
+ 0.2412708998 0.1070773974 0.2305589020
+ 0.2440378964 0.1085444018 0.2334149033
+ 0.2467941940 0.1100130007 0.2362655997
+ 0.2495391071 0.1114827022 0.2391107976
+ 0.2522701919 0.1129537970 0.2419497073
+ 0.2549884021 0.1144248024 0.2447791994
+ 0.2576946914 0.1158969998 0.2475973070
+ 0.2603886127 0.1173700988 0.2504028082
+ 0.2630693913 0.1188448966 0.2531929910
+ 0.2657378018 0.1203223020 0.2559669018
+ 0.2683930099 0.1218004972 0.2587235868
+ 0.2710328996 0.1232801974 0.2614609897
+ 0.2736578882 0.1247610003 0.2641791999
+ 0.2762688994 0.1262425929 0.2668775022
+ 0.2788653970 0.1277254969 0.2695545852
+ 0.2814469934 0.1292095035 0.2722114921
+ 0.2840158045 0.1306941062 0.2748483121
+ 0.2865726054 0.1321794987 0.2774635851
+ 0.2891159058 0.1336652040 0.2800571024
+ 0.2916449904 0.1351507008 0.2826282978
+ 0.2941609025 0.1366363019 0.2851763070
+ 0.2966657877 0.1381220967 0.2877005935
+ 0.2991599143 0.1396085024 0.2902010083
+ 0.3016422093 0.1410955936 0.2926791906
+ 0.3041135073 0.1425838023 0.2951335907
+ 0.3065750003 0.1440730989 0.2975631058
+ 0.3090234101 0.1455630064 0.2999700010
+ 0.3114587069 0.1470534056 0.3023560941
+ 0.3138816059 0.1485445052 0.3047226965
+ 0.3162932098 0.1500363946 0.3070712090
+ 0.3186948001 0.1515289992 0.3094022870
+ 0.3210870028 0.1530221999 0.3117175996
+ 0.3234694898 0.1545169055 0.3140189052
+ 0.3258418143 0.1560124010 0.3163051009
+ 0.3282003999 0.1575089991 0.3185760975
+ 0.3305430114 0.1590068042 0.3208332956
+ 0.3328739107 0.1605062932 0.3230775893
+ 0.3351961970 0.1620068997 0.3253093064
+ 0.3375113010 0.1635068059 0.3275283873
+ 0.3398194909 0.1650066972 0.3297384977
+ 0.3421204984 0.1665070057 0.3319405913
+ 0.3444133997 0.1680078954 0.3341340125
+ 0.3466998041 0.1695086062 0.3363187015
+ 0.3489798009 0.1710103005 0.3384949863
+ 0.3512539864 0.1725132018 0.3406594098
+ 0.3535234928 0.1740172058 0.3428128064
+ 0.3557898104 0.1755214930 0.3449561894
+ 0.3580540121 0.1770250052 0.3470906913
+ 0.3603161871 0.1785289049 0.3492175043
+ 0.3625768125 0.1800335944 0.3513374031
+ 0.3648355901 0.1815388054 0.3534527123
+ 0.3670929074 0.1830437034 0.3555639982
+ 0.3693490922 0.1845479012 0.3576712012
+ 0.3716045022 0.1860512048 0.3597705066
+ 0.3738591969 0.1875541955 0.3618609011
+ 0.3761132061 0.1890579015 0.3639445007
+ 0.3783670068 0.1905619055 0.3660219014
+ 0.3806206882 0.1920655966 0.3680920899
+ 0.3828743994 0.1935691983 0.3701565862
+ 0.3851284981 0.1950726956 0.3722172081
+ 0.3873830140 0.1965761930 0.3742741942
+ 0.3896380961 0.1980797052 0.3763268888
+ 0.3918941915 0.1995833069 0.3783758879
+ 0.3941515088 0.2010867000 0.3804208040
+ 0.3964098990 0.2025887072 0.3824599087
+ 0.3986696899 0.2040902972 0.3844920993
+ 0.4009316862 0.2055917978 0.3865205944
+ 0.4031954110 0.2070932984 0.3885455132
+ 0.4054606855 0.2085942030 0.3905645013
+ 0.4077295065 0.2100944966 0.3925797045
+ 0.4100005031 0.2115938962 0.3945915103
+ 0.4122735858 0.2130924016 0.3965987861
+ 0.4145509005 0.2145905048 0.3986020982
+ 0.4168311954 0.2160879970 0.4006024003
+ 0.4191139042 0.2175852060 0.4025978148
+ 0.4213995934 0.2190822959 0.4045889080
+ 0.4236867130 0.2205785960 0.4065766037
+ 0.4259749949 0.2220751941 0.4085580111
+ 0.4282661080 0.2235720009 0.4105337858
+ 0.4305579960 0.2250701934 0.4125058055
+ 0.4328506887 0.2265686989 0.4144718051
+ 0.4351426959 0.2280676961 0.4164347947
+ 0.4374347031 0.2295663953 0.4183954895
+ 0.4397264123 0.2310650051 0.4203527868
+ 0.4420182109 0.2325633019 0.4223093092
+ 0.4443092942 0.2340615988 0.4242646992
+ 0.4465988874 0.2355599999 0.4262180924
+ 0.4488858879 0.2370588928 0.4281705916
+ 0.4511714876 0.2385578007 0.4301216900
+ 0.4534544051 0.2400566041 0.4320701063
+ 0.4557343125 0.2415551990 0.4340169132
+ 0.4580109119 0.2430536002 0.4359580874
+ 0.4602797031 0.2445522994 0.4378975034
+ 0.4625451863 0.2460512072 0.4398345947
+ 0.4648033977 0.2475509942 0.4417698979
+ 0.4670571089 0.2490514964 0.4437046945
+ 0.4693068862 0.2505528927 0.4456391931
+ 0.4715498090 0.2520549893 0.4475742877
+ 0.4737902880 0.2535574138 0.4495103061
+ 0.4760245085 0.2550598979 0.4514476955
+ 0.4782535136 0.2565625906 0.4533854127
+ 0.4804762006 0.2580656111 0.4553222060
+ 0.4826883078 0.2595695853 0.4572581053
+ 0.4848966897 0.2610749006 0.4591920078
+ 0.4870918095 0.2625809908 0.4611235857
+ 0.4892837107 0.2640874088 0.4630536139
+ 0.4914664030 0.2655943036 0.4649797976
+ 0.4936434031 0.2671012878 0.4669052064
+ 0.4958145916 0.2686108947 0.4688282013
+ 0.4979768991 0.2701208889 0.4707511067
+ 0.5001357198 0.2716321051 0.4726733863
+ 0.5022798777 0.2731435895 0.4745965004
+ 0.5044208765 0.2746556997 0.4765200913
+ 0.5065475702 0.2761682868 0.4784458876
+ 0.5086696744 0.2776814103 0.4803726077
+ 0.5107814074 0.2791965902 0.4822996855
+ 0.5128856897 0.2807131112 0.4842267036
+ 0.5149818063 0.2822310030 0.4861502945
+ 0.5170682073 0.2837496102 0.4880726039
+ 0.5191485882 0.2852681875 0.4899899960
+ 0.5212162137 0.2867869139 0.4919058979
+ 0.5232796073 0.2883065045 0.4938189983
+ 0.5253279209 0.2898262143 0.4957309067
+ 0.5273739100 0.2913483083 0.4976414144
+ 0.5294030905 0.2928704917 0.4995503128
+ 0.5314307809 0.2943947911 0.5014581084
+ 0.5334423184 0.2959192097 0.5033627748
+ 0.5354515910 0.2974444032 0.5052657723
+ 0.5374450088 0.2989695966 0.5071659088
+ 0.5394350290 0.3004952967 0.5090647936
+ 0.5414085984 0.3020209074 0.5109593868
+ 0.5433781743 0.3035480082 0.5128529072
+ 0.5453327894 0.3050751090 0.5147392750
+ 0.5472834110 0.3066017032 0.5166242719
+ 0.5492209792 0.3081282973 0.5185018182
+ 0.5511540174 0.3096539080 0.5203778148
+ 0.5530723929 0.3111793995 0.5222443938
+ 0.5549861789 0.3127050102 0.5241091847
+ 0.5568844080 0.3142305911 0.5259639025
+ 0.5587790012 0.3157570958 0.5278167129
+ 0.5606595278 0.3172838092 0.5296614766
+ 0.5625373721 0.3188110888 0.5315043926
+ 0.5644009113 0.3203384876 0.5333400965
+ 0.5662627816 0.3218651116 0.5351735950
+ 0.5681079030 0.3233912885 0.5369982123
+ 0.5699527264 0.3249165118 0.5388190746
+ 0.5717802048 0.3264403939 0.5406309962
+ 0.5736076832 0.3279637098 0.5424374938
+ 0.5754187703 0.3294858932 0.5442360044
+ 0.5772284269 0.3310078979 0.5460273027
+ 0.5790212750 0.3325291872 0.5478109121
+ 0.5808100104 0.3340505064 0.5495834947
+ 0.5825855732 0.3355714083 0.5513505936
+ 0.5843548179 0.3370923996 0.5531036854
+ 0.5861145854 0.3386130035 0.5548539758
+ 0.5878657103 0.3401334882 0.5565863252
+ 0.5896102190 0.3416540027 0.5583184958
+ 0.5913426280 0.3431744874 0.5600315928
+ 0.5930718184 0.3446949124 0.5617440939
+ 0.5947852731 0.3462150991 0.5634422898
+ 0.5964987874 0.3477351069 0.5651364923
+ 0.5981938243 0.3492532969 0.5668197274
+ 0.5998880863 0.3507714868 0.5684949160
+ 0.6015682220 0.3522872925 0.5701624751
+ 0.6032432914 0.3538025916 0.5718169212
+ 0.6049085855 0.3553164005 0.5734683275
+ 0.6065642238 0.3568288088 0.5750986934
+ 0.6082149148 0.3583407104 0.5767289996
+ 0.6098505855 0.3598510027 0.5783388019
+ 0.6114861965 0.3613612056 0.5799455047
+ 0.6131017208 0.3628711998 0.5815384984
+ 0.6147162914 0.3643811047 0.5831218958
+ 0.6163176894 0.3658905029 0.5846983194
+ 0.6179122925 0.3673991859 0.5862581134
+ 0.6195003986 0.3689076900 0.5878177881
+ 0.6210765243 0.3704144955 0.5893548727
+ 0.6226522923 0.3719212115 0.5908914208
+ 0.6242104173 0.3734270036 0.5924147964
+ 0.6257684827 0.3749324977 0.5939309001
+ 0.6273151040 0.3764374852 0.5954414010
+ 0.6288558245 0.3779416084 0.5969383121
+ 0.6303917170 0.3794457912 0.5984352231
+ 0.6319159865 0.3809471130 0.5999152064
+ 0.6334401965 0.3824482858 0.6013936996
+ 0.6349474788 0.3839477897 0.6028618217
+ 0.6364527941 0.3854453862 0.6043204069
+ 0.6379473805 0.3869430125 0.6057764888
+ 0.6394302845 0.3884387910 0.6072123051
+ 0.6409124732 0.3899345100 0.6086481214
+ 0.6423766017 0.3914293945 0.6100676060
+ 0.6438407898 0.3929235041 0.6114792824
+ 0.6452940702 0.3944176137 0.6128858924
+ 0.6467397809 0.3959099948 0.6142745018
+ 0.6481837034 0.3974024057 0.6156631708
+ 0.6496129036 0.3988932073 0.6170371175
+ 0.6510421038 0.4003823996 0.6184059978
+ 0.6524606943 0.4018715918 0.6197704077
+ 0.6538727880 0.4033572972 0.6211217046
+ 0.6552829146 0.4048427939 0.6224728823
+ 0.6566761136 0.4063270986 0.6238120794
+ 0.6580693126 0.4078091085 0.6251469254
+ 0.6594510078 0.4092912078 0.6264786720
+ 0.6608237028 0.4107702971 0.6277983785
+ 0.6621962786 0.4122484028 0.6291180253
+ 0.6635506153 0.4137260914 0.6304268837
+ 0.6649050117 0.4152004123 0.6317300200
+ 0.6662514806 0.4166747928 0.6330316067
+ 0.6675873995 0.4181470871 0.6343147755
+ 0.6689231992 0.4196172953 0.6355978847
+ 0.6702443957 0.4210875034 0.6368724108
+ 0.6715623736 0.4225546122 0.6381372809
+ 0.6728767753 0.4240212142 0.6394020915
+ 0.6741765738 0.4254870117 0.6406546235
+ 0.6754763126 0.4269487858 0.6419048905
+ 0.6767659187 0.4284105897 0.6431524754
+ 0.6780474782 0.4298701882 0.6443892717
+ 0.6793289781 0.4313269854 0.6456261277
+ 0.6805943847 0.4327838123 0.6468564272
+ 0.6818578839 0.4342373013 0.6480810046
+ 0.6831179857 0.4356895089 0.6493057013
+ 0.6843643785 0.4371415973 0.6505178809
+ 0.6856108904 0.4385890961 0.6517279744
+ 0.6868489981 0.4400365055 0.6529359818
+ 0.6880782843 0.4414829910 0.6541314721
+ 0.6893076897 0.4429262877 0.6553270221
+ 0.6905233264 0.4443696141 0.6565173864
+ 0.6917344928 0.4458107948 0.6577004194
+ 0.6929457188 0.4472492039 0.6588833928
+ 0.6941388845 0.4486874938 0.6600583196
+ 0.6953321099 0.4501225054 0.6612290740
+ 0.6965216994 0.4515551925 0.6623998284
+ 0.6976982951 0.4529877901 0.6635617018
+ 0.6988748908 0.4544155896 0.6647223234
+ 0.7000442743 0.4558416903 0.6658821106
+ 0.7012037039 0.4572679102 0.6670321822
+ 0.7023630142 0.4586881995 0.6681821942
+ 0.7035111785 0.4601078033 0.6693289876
+ 0.7046517730 0.4615274072 0.6704663038
+ 0.7057924271 0.4629419148 0.6716036797
+ 0.7069209814 0.4643563032 0.6727368832
+ 0.7080454230 0.4657703936 0.6738638878
+ 0.7091699243 0.4671806991 0.6749910116
+ 0.7102797031 0.4685910046 0.6761143208
+ 0.7113872766 0.4700005949 0.6772344112
+ 0.7124949098 0.4714061916 0.6783545017
+ 0.7135862708 0.4728117883 0.6794689894
+ 0.7146772146 0.4742164910 0.6805803180
+ 0.7157673240 0.4756168127 0.6816917062
+ 0.7168418169 0.4770171046 0.6827973723
+ 0.7179161906 0.4784162939 0.6839008927
+ 0.7189890146 0.4798108041 0.6850042939
+ 0.7200477719 0.4812051952 0.6861020923
+ 0.7211065292 0.4825986028 0.6871982217
+ 0.7221630812 0.4839865863 0.6882944107
+ 0.7232058048 0.4853746891 0.6893844008
+ 0.7242485285 0.4867616892 0.6904730201
+ 0.7252889872 0.4881420135 0.6915615797
+ 0.7263165712 0.4895223975 0.6926428080
+ 0.7273442149 0.4909023046 0.6937221885
+ 0.7283703089 0.4922760129 0.6948016882
+ 0.7293847203 0.4936496913 0.6958737969
+ 0.7303991914 0.4950233996 0.6969439983
+ 0.7314124703 0.4963918030 0.6980140805
+ 0.7324116230 0.4977600873 0.6990771294
+ 0.7334107161 0.4991284013 0.7001376152
+ 0.7344096899 0.5004916787 0.7011982203
+ 0.7353922725 0.5018543005 0.7022535801
+ 0.7363749146 0.5032168031 0.7033064961
+ 0.7373574972 0.5045748949 0.7043594122
+ 0.7383249998 0.5059313178 0.7054070830
+ 0.7392910719 0.5072876811 0.7064511180
+ 0.7402572036 0.5086405277 0.7074950933
+ 0.7412112951 0.5099905133 0.7085348964
+ 0.7421622276 0.5113404989 0.7095698714
+ 0.7431129813 0.5126873255 0.7106049061
+ 0.7440556288 0.5140289068 0.7116366029
+ 0.7449935079 0.5153704286 0.7126612067
+ 0.7459315062 0.5167104006 0.7136859298
+ 0.7468624711 0.5180423856 0.7147092223
+ 0.7477856874 0.5193743110 0.7157247066
+ 0.7487087846 0.5207061768 0.7167401910
+ 0.7496278286 0.5220301747 0.7177556157
+ 0.7505353093 0.5233532786 0.7187631726
+ 0.7514427900 0.5246765018 0.7197703123
+ 0.7523496747 0.5259947777 0.7207775116
+ 0.7532436848 0.5273103714 0.7217786908
+ 0.7541376948 0.5286259055 0.7227776051
+ 0.7550317049 0.5299391747 0.7237765789
+ 0.7559167743 0.5312479138 0.7247710824
+ 0.7567995787 0.5325565934 0.7257605791
+ 0.7576823831 0.5338652730 0.7267500758
+ 0.7585588098 0.5351672173 0.7277382016
+ 0.7594292164 0.5364691019 0.7287198901
+ 0.7602995038 0.5377709866 0.7297015786
+ 0.7611671090 0.5390685201 0.7306833863
+ 0.7620239258 0.5403637290 0.7316588759
+ 0.7628808022 0.5416588783 0.7326335907
+ 0.7637376189 0.5429524183 0.7336083055
+ 0.7645832896 0.5442410111 0.7345783710
+ 0.7654271722 0.5455294847 0.7355446815
+ 0.7662711740 0.5468180776 0.7365108728
+ 0.7671089768 0.5481011868 0.7374755144
+ 0.7679408789 0.5493832231 0.7384330034
+ 0.7687727213 0.5506651998 0.7393903732
+ 0.7696030140 0.5519440174 0.7403479218
+ 0.7704212070 0.5532178879 0.7412980795
+ 0.7712393999 0.5544918776 0.7422463894
+ 0.7720575929 0.5557658076 0.7431948185
+ 0.7728673816 0.5570312142 0.7441394925
+ 0.7736734152 0.5582960248 0.7450783849
+ 0.7744793892 0.5595608950 0.7460172772
+ 0.7752828002 0.5608223081 0.7469562292
+ 0.7760779858 0.5620794296 0.7478839755
+ 0.7768731713 0.5633366108 0.7488111258
+ 0.7776684761 0.5645936728 0.7497382164
+ 0.7784557939 0.5658441782 0.7506607175
+ 0.7792407274 0.5670942068 0.7515779138
+ 0.7800256014 0.5683441162 0.7524952292
+ 0.7808077931 0.5695917010 0.7534124255
+ 0.7815821767 0.5708349943 0.7543212175
+ 0.7823565006 0.5720782280 0.7552297115
+ 0.7831308246 0.5733215213 0.7561380863
+ 0.7838966846 0.5745599866 0.7570431232
+ 0.7846595049 0.5757972002 0.7579433918
+ 0.7854222059 0.5770342946 0.7588437200
+ 0.7861832976 0.5782706141 0.7597439885
+ 0.7869359851 0.5795021057 0.7606366277
+ 0.7876886725 0.5807337165 0.7615280747
+ 0.7884414196 0.5819652081 0.7624195814
+ 0.7891888022 0.5831941962 0.7633082867
+ 0.7899320722 0.5844206810 0.7641898990
+ 0.7906754017 0.5856472254 0.7650715113
+ 0.7914186716 0.5868737102 0.7659531236
+ 0.7921544909 0.5880939960 0.7668281794
+ 0.7928900123 0.5893129706 0.7676998973
+ 0.7936254144 0.5905321240 0.7685714960
+ 0.7943581939 0.5917500257 0.7694430947
+ 0.7950845957 0.5929607153 0.7703047991
+ 0.7958109975 0.5941714048 0.7711665034
+ 0.7965373993 0.5953819752 0.7720282078
+ 0.7972583771 0.5965896845 0.7728871703
+ 0.7979758978 0.5977926850 0.7737402916
+ 0.7986934781 0.5989956856 0.7745934725
+ 0.7994109988 0.6001986861 0.7754465938
+ 0.8001213074 0.6013975143 0.7762938142
+ 0.8008307815 0.6025936007 0.7771372199
+ 0.8015401959 0.6037898064 0.7779806256
+ 0.8022487164 0.6049858928 0.7788239121
+ 0.8029516935 0.6061770916 0.7796577811
+ 0.8036546707 0.6073670983 0.7804902196
+ 0.8043577075 0.6085572243 0.7813224792
+ 0.8050580025 0.6097472906 0.7821539044
+ 0.8057534099 0.6109319925 0.7829759717
+ 0.8064488769 0.6121168137 0.7837980986
+ 0.8071444035 0.6133015156 0.7846202254
+ 0.8078358769 0.6144853234 0.7854393721
+ 0.8085243106 0.6156625152 0.7862510085
+ 0.8092126846 0.6168397069 0.7870625854
+ 0.8099011183 0.6180168986 0.7878742218
+ 0.8105850816 0.6191921234 0.7886819839
+ 0.8112673163 0.6203610897 0.7894849777
+ 0.8119494915 0.6215299964 0.7902880907
+ 0.8126317859 0.6226990223 0.7910910845
+ 0.8133102059 0.6238657236 0.7918882966
+ 0.8139879704 0.6250272989 0.7926809788
+ 0.8146657944 0.6261889935 0.7934737802
+ 0.8153436184 0.6273506284 0.7942665815
+ 0.8160151243 0.6285101175 0.7950521708
+ 0.8166863918 0.6296654940 0.7958343029
+ 0.8173575997 0.6308208108 0.7966163754
+ 0.8180288076 0.6319761872 0.7973985076
+ 0.8186935186 0.6331295967 0.7981728911
+ 0.8193582296 0.6342797279 0.7989445925
+ 0.8200228810 0.6354296803 0.7997162938
+ 0.8206874728 0.6365796924 0.8004879951
+ 0.8213469982 0.6377279162 0.8012521267
+ 0.8220065236 0.6388722062 0.8020138741
+ 0.8226659894 0.6400164962 0.8027758002
+ 0.8233252764 0.6411607862 0.8035376072
+ 0.8239793777 0.6423032880 0.8042908907
+ 0.8246334791 0.6434404850 0.8050416708
+ 0.8252875805 0.6445778012 0.8057923913
+ 0.8259416819 0.6457151175 0.8065431714
+ 0.8265889883 0.6468511820 0.8072862029
+ 0.8272364140 0.6479817033 0.8080263734
+ 0.8278837204 0.6491122246 0.8087667227
+ 0.8285310864 0.6502428055 0.8095068932
+ 0.8291730285 0.6513730288 0.8102409840
+ 0.8298146129 0.6524980068 0.8109720945
+ 0.8304561973 0.6536229849 0.8117030859
+ 0.8310977817 0.6547480226 0.8124341965
+ 0.8317347765 0.6558730006 0.8131592870
+ 0.8323708773 0.6569942236 0.8138797283
+ 0.8330070972 0.6581149101 0.8146002293
+ 0.8336431980 0.6592354774 0.8153206110
+ 0.8342744112 0.6603562236 0.8160365224
+ 0.8349034786 0.6614738107 0.8167462945
+ 0.8355324864 0.6625900865 0.8174561262
+ 0.8361616135 0.6637063026 0.8181658983
+ 0.8367878199 0.6648225188 0.8188729882
+ 0.8374114037 0.6659368873 0.8195725083
+ 0.8380349278 0.6670492291 0.8202719092
+ 0.8386585116 0.6681613922 0.8209714293
+ 0.8392807245 0.6692736149 0.8216704130
+ 0.8399001956 0.6703848839 0.8223608732
+ 0.8405197263 0.6714920998 0.8230513930
+ 0.8411391973 0.6725993156 0.8237419128
+ 0.8417584896 0.6737064719 0.8244323730
+ 0.8423752785 0.6748136878 0.8251157999
+ 0.8429921865 0.6759157181 0.8257976770
+ 0.8436089754 0.6770169139 0.8264794946
+ 0.8442258835 0.6781182289 0.8271613717
+ 0.8448395133 0.6792194843 0.8278384805
+ 0.8454523087 0.6803181767 0.8285114765
+ 0.8460649848 0.6814149022 0.8291844726
+ 0.8466777802 0.6825116277 0.8298574090
+ 0.8472878933 0.6836082935 0.8305279016
+ 0.8478950858 0.6847041845 0.8311896920
+ 0.8485022783 0.6857963204 0.8318514228
+ 0.8491094708 0.6868883967 0.8325132132
+ 0.8497161865 0.6879804730 0.8331748843
+ 0.8503192067 0.6890726089 0.8338286281
+ 0.8509222865 0.6901617050 0.8344811201
+ 0.8515254259 0.6912497878 0.8351336718
+ 0.8521285057 0.6923378110 0.8357862830
+ 0.8527284265 0.6934258938 0.8364341855
+ 0.8533272147 0.6945127249 0.8370773792
+ 0.8539260030 0.6955966949 0.8377205729
+ 0.8545249104 0.6966806054 0.8383638859
+ 0.8551219106 0.6977645755 0.8390063047
+ 0.8557152152 0.6988484859 0.8396390080
+ 0.8563085794 0.6999288797 0.8402717710
+ 0.8569018841 0.7010084987 0.8409044743
+ 0.8574953079 0.7020881176 0.8415372968
+ 0.8580844998 0.7031677961 0.8421642184
+ 0.8586729765 0.7042456865 0.8427875042
+ 0.8592615724 0.7053195238 0.8434109092
+ 0.8598501086 0.7063934207 0.8440341949
+ 0.8604366779 0.7074673176 0.8446565270
+ 0.8610199094 0.7085412145 0.8452715874
+ 0.8616030812 0.7096114159 0.8458867073
+ 0.8621863723 0.7106803060 0.8465017080
+ 0.8627696037 0.7117491961 0.8471168280
+ 0.8633472919 0.7128180265 0.8477255702
+ 0.8639240861 0.7138860226 0.8483303189
+ 0.8645008206 0.7149490118 0.8489350080
+ 0.8650774956 0.7160121202 0.8495395780
+ 0.8656529784 0.7170751095 0.8501440287
+ 0.8662251234 0.7181380987 0.8507388234
+ 0.8667972088 0.7191970944 0.8513334990
+ 0.8673692942 0.7202522755 0.8519282937
+ 0.8679413795 0.7213075161 0.8525230885
+ 0.8685104251 0.7223626971 0.8531140089
+ 0.8690779209 0.7234178782 0.8536998034
+ 0.8696454167 0.7244672775 0.8542855978
+ 0.8702129126 0.7255154848 0.8548712730
+ 0.8707802892 0.7265638113 0.8554571271
+ 0.8713405132 0.7276120186 0.8560361862
+ 0.8719006181 0.7286595702 0.8566132784
+ 0.8724607825 0.7297024131 0.8571904898
+ 0.8730208874 0.7307453156 0.8577675819
+ 0.8735787272 0.7317880988 0.8583437204
+ 0.8741317987 0.7328310013 0.8589094877
+ 0.8746848106 0.7338718176 0.8594753146
+ 0.8752378821 0.7349092960 0.8600410819
+ 0.8757908940 0.7359467745 0.8606069088
+ 0.8763406873 0.7369843125 0.8611692190
+ 0.8768883944 0.7380216718 0.8617258072
+ 0.8774359822 0.7390558720 0.8622822762
+ 0.8779836893 0.7400876284 0.8628388047
+ 0.8785312772 0.7411193848 0.8633952737
+ 0.8790736198 0.7421510816 0.8639466763
+ 0.8796147704 0.7431827784 0.8644946814
+ 0.8801559806 0.7442104220 0.8650428057
+ 0.8806971908 0.7452365756 0.8655908108
+ 0.8812381029 0.7462627888 0.8661388159
+ 0.8817703724 0.7472890019 0.8666791916
+ 0.8823025823 0.7483152151 0.8672177196
+ 0.8828349113 0.7493349910 0.8677561879
+ 0.8833671212 0.7503538132 0.8682947159
+ 0.8838980198 0.7513726950 0.8688331842
+ 0.8844233751 0.7523915172 0.8693615198
+ 0.8849487901 0.7534103990 0.8698894978
+ 0.8854740858 0.7544203997 0.8704175949
+ 0.8859995008 0.7554299831 0.8709455729
+ 0.8865231276 0.7564396262 0.8714727163
+ 0.8870428205 0.7574492097 0.8719913960
+ 0.8875625134 0.7584586740 0.8725100160
+ 0.8880822062 0.7594599128 0.8730286956
+ 0.8886018991 0.7604610920 0.8735473752
+ 0.8891186714 0.7614622712 0.8740645051
+ 0.8896307945 0.7624635100 0.8745744824
+ 0.8901429176 0.7634646297 0.8750844002
+ 0.8906549811 0.7644580007 0.8755943179
+ 0.8911671042 0.7654513717 0.8761042953
+ 0.8916761875 0.7664448023 0.8766121268
+ 0.8921812177 0.7674381733 0.8771117926
+ 0.8926861882 0.7684317231 0.8776115179
+ 0.8931912184 0.7694169879 0.8781113029
+ 0.8936961889 0.7704021931 0.8786110282
+ 0.8941987157 0.7713873982 0.8791092038
+ 0.8946977854 0.7723724842 0.8796014190
+ 0.8951969147 0.7733576894 0.8800935745
+ 0.8956959844 0.7743353844 0.8805857897
+ 0.8961951137 0.7753123045 0.8810780048
+ 0.8966916800 0.7762892246 0.8815690279
+ 0.8971840739 0.7772660851 0.8820533156
+ 0.8976764083 0.7782430053 0.8825377226
+ 0.8981688023 0.7792145014 0.8830221295
+ 0.8986610770 0.7801843882 0.8835064173
+ 0.8991513848 0.7811542749 0.8839902282
+ 0.8996360898 0.7821242809 0.8844659925
+ 0.9001209140 0.7830942273 0.8849416971
+ 0.9006056190 0.7840591073 0.8854175210
+ 0.9010903835 0.7850208879 0.8858932257
+ 0.9015741944 0.7859826088 0.8863689899
+ 0.9020525813 0.7869443893 0.8868358731
+ 0.9025310278 0.7879061103 0.8873022199
+ 0.9030094147 0.7888634801 0.8877685070
+ 0.9034878016 0.7898142934 0.8882347941
+ 0.9039661884 0.7907652259 0.8887010813
+ 0.9044383764 0.7917159796 0.8891620040
+ 0.9049103856 0.7926669121 0.8896213174
+ 0.9053822756 0.7936159968 0.8900805712
+ 0.9058542848 0.7945556045 0.8905398846
+ 0.9063262939 0.7954952717 0.8909991980
+ 0.9067928195 0.7964348793 0.8914546967
+ 0.9072574973 0.7973746061 0.8919070959
+ 0.9077221751 0.7983142138 0.8923594952
+ 0.9081869125 0.7992444038 0.8928118944
+ 0.9086515903 0.8001731038 0.8932642937
+ 0.9091123939 0.8011018038 0.8937140107
+ 0.9095693231 0.8020305037 0.8941572905
+ 0.9100260735 0.8029590845 0.8946006894
+ 0.9104830027 0.8038828969 0.8950440288
+ 0.9109398127 0.8048021793 0.8954873085
+ 0.9113954902 0.8057215214 0.8959305882
+ 0.9118455052 0.8066408038 0.8963645101
+ 0.9122955799 0.8075600863 0.8967983127
+ 0.9127457142 0.8084779978 0.8972321153
+ 0.9131957889 0.8093873858 0.8976659179
+ 0.9136459231 0.8102967739 0.8980997205
+ 0.9140903950 0.8112062812 0.8985280991
+ 0.9145337939 0.8121157289 0.8989533782
+ 0.9149773121 0.8130251169 0.8993787169
+ 0.9154207110 0.8139269948 0.8998039961
+ 0.9158641100 0.8148258924 0.9002293944
+ 0.9163044095 0.8157246709 0.9006530046
+ 0.9167405963 0.8166236281 0.9010717869
+ 0.9171767831 0.8175224066 0.9014906287
+ 0.9176130295 0.8184180260 0.9019094110
+ 0.9180492163 0.8193030953 0.9023281932
+ 0.9184855223 0.8201882243 0.9027469754
+ 0.9189139009 0.8210734129 0.9031597972
+ 0.9193422794 0.8219584823 0.9035711884
+ 0.9197707772 0.8228436112 0.9039825797
+ 0.9201992154 0.8237193823 0.9043939710
+ 0.9206275940 0.8245916963 0.9048054814
+ 0.9210522175 0.8254640102 0.9052137733
+ 0.9214730859 0.8263362050 0.9056159854
+ 0.9218940139 0.8272085190 0.9060181975
+ 0.9223148823 0.8280786276 0.9064204097
+ 0.9227359295 0.8289378285 0.9068226218
+ 0.9231567979 0.8297969103 0.9072247744
+ 0.9235706925 0.8306559920 0.9076194763
+ 0.9239845872 0.8315150738 0.9080122113
+ 0.9243984222 0.8323742747 0.9084050059
+ 0.9248123169 0.8332263231 0.9087976813
+ 0.9252260923 0.8340724111 0.9091904759
+ 0.9256373048 0.8349186182 0.9095817208
+ 0.9260444045 0.8357648253 0.9099674821
+ 0.9264515042 0.8366109729 0.9103533030
+ 0.9268587232 0.8374571204 0.9107391834
+ 0.9272658229 0.8382914066 0.9111250043
+ 0.9276729822 0.8391243219 0.9115108252
+ 0.9280738831 0.8399571776 0.9118928909
+ 0.9284729958 0.8407900929 0.9122726917
+ 0.9288722277 0.8416228890 0.9126523733
+ 0.9292714000 0.8424531221 0.9130321145
+ 0.9296705723 0.8432716131 0.9134117961
+ 0.9300686717 0.8440901041 0.9137915969
+ 0.9304581881 0.8449085951 0.9141638279
+ 0.9308475852 0.8457270861 0.9145355821
+ 0.9312371016 0.8465456963 0.9149073958
+ 0.9316264987 0.8473572731 0.9152792096
+ 0.9320160151 0.8481602073 0.9156510234
+ 0.9324020743 0.8489630818 0.9160208702
+ 0.9327831268 0.8497660160 0.9163845181
+ 0.9331640005 0.8505688906 0.9167479873
+ 0.9335449934 0.8513718247 0.9171115160
+ 0.9339259863 0.8521640897 0.9174751043
+ 0.9343069196 0.8529503942 0.9178385735
+ 0.9346833229 0.8537368178 0.9181991816
+ 0.9350569844 0.8545231819 0.9185562730
+ 0.9354307055 0.8553094864 0.9189134836
+ 0.9358044267 0.8560959101 0.9192706943
+ 0.9361780882 0.8568696976 0.9196279049
+ 0.9365519285 0.8576403260 0.9199851155
+ 0.9369189143 0.8584108949 0.9203380942
+ 0.9372844100 0.8591815233 0.9206891060
+ 0.9376500249 0.8599520922 0.9210399985
+ 0.9380155802 0.8607226014 0.9213908911
+ 0.9383810759 0.8614792228 0.9217417836
+ 0.9387466908 0.8622341156 0.9220927954
+ 0.9391040802 0.8629890084 0.9224383831
+ 0.9394611716 0.8637439013 0.9227827191
+ 0.9398183227 0.8644987941 0.9231269956
+ 0.9401754141 0.8652538061 0.9234712720
+ 0.9405325055 0.8659942150 0.9238156080
+ 0.9408891797 0.8667339087 0.9241598845
+ 0.9412378073 0.8674736023 0.9244983196
+ 0.9415863752 0.8682132959 0.9248359799
+ 0.9419351220 0.8689528704 0.9251735806
+ 0.9422836900 0.8696926236 0.9255113006
+ 0.9426323175 0.8704177737 0.9258490205
+ 0.9429801106 0.8711423278 0.9261866808
+ 0.9433202147 0.8718668222 0.9265180230
+ 0.9436603189 0.8725913167 0.9268490076
+ 0.9440004230 0.8733158112 0.9271798730
+ 0.9443404078 0.8740403056 0.9275109172
+ 0.9446805120 0.8747491241 0.9278417826
+ 0.9450199008 0.8754562736 0.9281728268
+ 0.9453521967 0.8761636019 0.9284992814
+ 0.9456846118 0.8768708110 0.9288254976
+ 0.9460169077 0.8775780797 0.9291517138
+ 0.9463492036 0.8782854080 0.9294778705
+ 0.9466814995 0.8789795041 0.9298040867
+ 0.9470136166 0.8796706796 0.9301303029
+ 0.9473391175 0.8803619146 0.9304519296
+ 0.9476644993 0.8810532093 0.9307729006
+ 0.9479898810 0.8817443848 0.9310938716
+ 0.9483153224 0.8824356198 0.9314149022
+ 0.9486407042 0.8831164241 0.9317358732
+ 0.9489660859 0.8837922215 0.9320567846
+ 0.9492859244 0.8844680190 0.9323734045
+ 0.9496051073 0.8851438165 0.9326885939
+ 0.9499244094 0.8858196735 0.9330039024
+ 0.9502437115 0.8864954710 0.9333190918
+ 0.9505628943 0.8871642947 0.9336344004
+ 0.9508821964 0.8878256083 0.9339495897
+ 0.9511961937 0.8884869218 0.9342616200
+ 0.9515085220 0.8891481161 0.9345716238
+ 0.9518209100 0.8898094296 0.9348815084
+ 0.9521332979 0.8904706836 0.9351915121
+ 0.9524456263 0.8911284804 0.9355015159
+ 0.9527580142 0.8917747736 0.9358114004
+ 0.9530653954 0.8924211264 0.9361190200
+ 0.9533687830 0.8930674195 0.9364230037
+ 0.9536721706 0.8937137723 0.9367269874
+ 0.9539756179 0.8943601251 0.9370309711
+ 0.9542790055 0.8950064182 0.9373350739
+ 0.9545822740 0.8956375122 0.9376391172
+ 0.9548830986 0.8962674737 0.9379425049
+ 0.9551774263 0.8968974948 0.9382423162
+ 0.9554716945 0.8975275159 0.9385421276
+ 0.9557660222 0.8981574774 0.9388418794
+ 0.9560602903 0.8987876177 0.9391416907
+ 0.9563546181 0.8994089961 0.9394415021
+ 0.9566488862 0.9000241756 0.9397413135
+ 0.9569364190 0.9006392956 0.9400386810
+ 0.9572235942 0.9012544751 0.9403355718
+ 0.9575108886 0.9018695951 0.9406325221
+ 0.9577981830 0.9024847746 0.9409294128
+ 0.9580854177 0.9030973911 0.9412263036
+ 0.9583727121 0.9036974907 0.9415231943
+ 0.9586551785 0.9042975903 0.9418178201
+ 0.9589346051 0.9048978090 0.9421097040
+ 0.9592139721 0.9054979086 0.9424015880
+ 0.9594933987 0.9060980082 0.9426935911
+ 0.9597727060 0.9066982269 0.9429854751
+ 0.9600520730 0.9072868228 0.9432774782
+ 0.9603300095 0.9078708291 0.9435690045
+ 0.9606015086 0.9084547758 0.9438548088
+ 0.9608730078 0.9090389013 0.9441404939
+ 0.9611443877 0.9096229076 0.9444261789
+ 0.9614158869 0.9102069139 0.9447119236
+ 0.9616873264 0.9107877016 0.9449977279
+ 0.9619588256 0.9113559127 0.9452834129
+ 0.9622257948 0.9119240046 0.9455662966
+ 0.9624909163 0.9124920964 0.9458472729
+ 0.9627560973 0.9130601883 0.9461283088
+ 0.9630212784 0.9136283994 0.9464092255
+ 0.9632865191 0.9141964912 0.9466902018
+ 0.9635517001 0.9147549272 0.9469711781
+ 0.9638155103 0.9153077006 0.9472519755
+ 0.9640734196 0.9158604145 0.9475296736
+ 0.9643313289 0.9164131880 0.9478074908
+ 0.9645891786 0.9169659019 0.9480851889
+ 0.9648472071 0.9175186753 0.9483630061
+ 0.9651051164 0.9180713296 0.9486407042
+ 0.9653630257 0.9186087847 0.9489185214
+ 0.9656159282 0.9191462994 0.9491940737
+ 0.9658656120 0.9196838140 0.9494674206
+ 0.9661152959 0.9202213287 0.9497408271
+ 0.9663649201 0.9207587838 0.9500141144
+ 0.9666146040 0.9212962985 0.9502874017
+ 0.9668642879 0.9218286872 0.9505608082
+ 0.9671139121 0.9223511219 0.9508340955
+ 0.9673559070 0.9228736162 0.9511033893
+ 0.9675977230 0.9233959913 0.9513720870
+ 0.9678394198 0.9239184856 0.9516407251
+ 0.9680811763 0.9244409204 0.9519094229
+ 0.9683228731 0.9249634147 0.9521780014
+ 0.9685646892 0.9254769087 0.9524466991
+ 0.9688041806 0.9259846210 0.9527146220
+ 0.9690378904 0.9264922738 0.9529792070
+ 0.9692716002 0.9269999862 0.9532437921
+ 0.9695051908 0.9275076985 0.9535083771
+ 0.9697389007 0.9280154109 0.9537730217
+ 0.9699726105 0.9285231233 0.9540376067
+ 0.9702062011 0.9290189743 0.9543021917
+ 0.9704347849 0.9295123816 0.9545649290
+ 0.9706588984 0.9300057292 0.9548249841
+ 0.9708830118 0.9304990172 0.9550849795
+ 0.9711070061 0.9309923053 0.9553450942
+ 0.9713311195 0.9314855933 0.9556052089
+ 0.9715551734 0.9319790006 0.9558652043
+ 0.9717792273 0.9324582815 0.9561253190
+ 0.9719976187 0.9329372048 0.9563831091
+ 0.9722136855 0.9334161282 0.9566395879
+ 0.9724298716 0.9338951111 0.9568961263
+ 0.9726459980 0.9343739748 0.9571526051
+ 0.9728621840 0.9348528981 0.9574090838
+ 0.9730783105 0.9353309274 0.9576656222
+ 0.9732944965 0.9357969165 0.9579221010
+ 0.9735053778 0.9362627864 0.9581764936
+ 0.9737156034 0.9367287159 0.9584304094
+ 0.9739257097 0.9371945858 0.9586842060
+ 0.9741358161 0.9376605749 0.9589381218
+ 0.9743459821 0.9381265044 0.9591919184
+ 0.9745560884 0.9385910034 0.9594457746
+ 0.9747661948 0.9390441179 0.9596995711
+ 0.9749692082 0.9394972920 0.9599508047
+ 0.9751719236 0.9399505258 0.9602015018
+ 0.9753745198 0.9404035807 0.9604521990
+ 0.9755771160 0.9408568144 0.9607028961
+ 0.9757797718 0.9413099289 0.9609535933
+ 0.9759824276 0.9417619109 0.9612042904
+ 0.9761850238 0.9422025084 0.9614549875
+ 0.9763807058 0.9426429868 0.9617013931
+ 0.9765762091 0.9430835843 0.9619473219
+ 0.9767717123 0.9435241818 0.9621930718
+ 0.9769670963 0.9439647198 0.9624388814
+ 0.9771625996 0.9444053173 0.9626846910
+ 0.9773581028 0.9448456168 0.9629306197
+ 0.9775536060 0.9452726245 0.9631764293
+ 0.9777433276 0.9456995726 0.9634190798
+ 0.9779326916 0.9461265802 0.9636611938
+ 0.9781219959 0.9465535879 0.9639033079
+ 0.9783114195 0.9469807148 0.9641454220
+ 0.9785007238 0.9474077225 0.9643874764
+ 0.9786900878 0.9478346705 0.9646295905
+ 0.9788795114 0.9482499957 0.9648717046
+ 0.9790633917 0.9486637115 0.9651131034
+ 0.9792463183 0.9490774870 0.9653542042
+ 0.9794291854 0.9494913220 0.9655953050
+ 0.9796121716 0.9499049783 0.9658364058
+ 0.9797950983 0.9503188133 0.9660773873
+ 0.9799780846 0.9507325888 0.9663184881
+ 0.9801610112 0.9511371255 0.9665595889
+ 0.9803391099 0.9515374899 0.9667994976
+ 0.9805151224 0.9519379735 0.9670386910
+ 0.9806911945 0.9523383975 0.9672778249
+ 0.9808672071 0.9527388215 0.9675168991
+ 0.9810432196 0.9531391859 0.9677560925
+ 0.9812191725 0.9535397291 0.9679952264
+ 0.9813953042 0.9539344907 0.9682343006
+ 0.9815682173 0.9543222785 0.9684708714
+ 0.9817377925 0.9547100067 0.9687036872
+ 0.9819074273 0.9550976753 0.9689365029
+ 0.9820770025 0.9554854035 0.9691691995
+ 0.9822465777 0.9558731914 0.9694020152
+ 0.9824162722 0.9562609196 0.9696347713
+ 0.9825859070 0.9566473961 0.9698675871
+ 0.9827542901 0.9570254087 0.9700998068
+ 0.9829186797 0.9574033022 0.9703279734
+ 0.9830831289 0.9577813148 0.9705563188
+ 0.9832473993 0.9581593275 0.9707846045
+ 0.9834117889 0.9585372210 0.9710127711
+ 0.9835761786 0.9589151740 0.9712411165
+ 0.9837405086 0.9592931867 0.9714694023
+ 0.9839048982 0.9596645832 0.9716976285
+ 0.9840624928 0.9600340128 0.9719249010
+ 0.9842191935 0.9604033232 0.9721521139
+ 0.9843758941 0.9607725739 0.9723792076
+ 0.9845327139 0.9611418843 0.9726063013
+ 0.9846894145 0.9615113139 0.9728333950
+ 0.9848461747 0.9618806243 0.9730604887
+ 0.9850028753 0.9622468948 0.9732875824
+ 0.9851561785 0.9626067877 0.9735137820
+ 0.9853060246 0.9629666209 0.9737386107
+ 0.9854558110 0.9633265138 0.9739633799
+ 0.9856055975 0.9636862874 0.9741883278
+ 0.9857553840 0.9640461802 0.9744130969
+ 0.9859051704 0.9644060135 0.9746379256
+ 0.9860550165 0.9647659063 0.9748628139
+ 0.9862046242 0.9651184082 0.9750875831
+ 0.9863498807 0.9654694200 0.9753091931
+ 0.9864953160 0.9658203125 0.9755306840
+ 0.9866406918 0.9661713243 0.9757522941
+ 0.9867861271 0.9665222168 0.9759737849
+ 0.9869315028 0.9668732285 0.9761952758
+ 0.9870768785 0.9672241211 0.9764168859
+ 0.9872221947 0.9675728083 0.9766383767
+ 0.9873657823 0.9679149985 0.9768583179
+ 0.9875077009 0.9682573080 0.9770764112
+ 0.9876495004 0.9685994983 0.9772945046
+ 0.9877914190 0.9689416885 0.9775127172
+ 0.9879332781 0.9692839980 0.9777308106
+ 0.9880751967 0.9696261883 0.9779489040
+ 0.9882171154 0.9699683785 0.9781669974
+ 0.9883589745 0.9703047872 0.9783850908
+ 0.9884964824 0.9706377983 0.9786008000
+ 0.9886338115 0.9709706903 0.9788162708
+ 0.9887710214 0.9713037014 0.9790318012
+ 0.9889082909 0.9716365933 0.9792472720
+ 0.9890456200 0.9719696045 0.9794626832
+ 0.9891828895 0.9723024964 0.9796782136
+ 0.9893202186 0.9726355076 0.9798936844
+ 0.9894558191 0.9729598761 0.9801084995
+ 0.9895876050 0.9732838273 0.9803212285
+ 0.9897193909 0.9736077189 0.9805338979
+ 0.9898512959 0.9739316106 0.9807466865
+ 0.9899830818 0.9742555022 0.9809594154
+ 0.9901149273 0.9745793939 0.9811722040
+ 0.9902467728 0.9749032855 0.9813848734
+ 0.9903786182 0.9752253294 0.9815976024
+ 0.9905071855 0.9755398035 0.9818084240
+ 0.9906337261 0.9758542180 0.9820175767
+ 0.9907602072 0.9761685729 0.9822267890
+ 0.9908868074 0.9764831066 0.9824360013
+ 0.9910132885 0.9767975211 0.9826452732
+ 0.9911398292 0.9771118760 0.9828544855
+ 0.9912663102 0.9774262905 0.9830636978
+ 0.9913927913 0.9777371883 0.9832729101
+ 0.9915155768 0.9780421257 0.9834790230
+ 0.9916377068 0.9783470035 0.9836843014
+ 0.9917597771 0.9786518812 0.9838895798
+ 0.9918819070 0.9789568782 0.9840949774
+ 0.9920039177 0.9792618155 0.9843003154
+ 0.9921259880 0.9795666933 0.9845055938
+ 0.9922481179 0.9798716903 0.9847108722
+ 0.9923701286 0.9801716208 0.9849162102
+ 0.9924876094 0.9804664850 0.9851183891
+ 0.9926049709 0.9807614088 0.9853205085
+ 0.9927225113 0.9810562730 0.9855225086
+ 0.9928399920 0.9813511968 0.9857246280
+ 0.9929574132 0.9816461205 0.9859266281
+ 0.9930748940 0.9819409847 0.9861286879
+ 0.9931923747 0.9822359085 0.9863306880
+ 0.9933093190 0.9825251102 0.9865326285
+ 0.9934214950 0.9828099012 0.9867315292
+ 0.9935336709 0.9830945730 0.9869303703
+ 0.9936459064 0.9833794236 0.9871293902
+ 0.9937580824 0.9836640954 0.9873282909
+ 0.9938703179 0.9839488864 0.9875271916
+ 0.9939824939 0.9842336178 0.9877260923
+ 0.9940947890 0.9845184088 0.9879251122
+ 0.9942061901 0.9847974181 0.9881235957
+ 0.9943130016 0.9850715995 0.9883189201
+ 0.9944198132 0.9853457808 0.9885141253
+ 0.9945265055 0.9856200814 0.9887093902
+ 0.9946333170 0.9858943224 0.9889047146
+ 0.9947401285 0.9861685038 0.9890999198
+ 0.9948468804 0.9864426851 0.9892951846
+ 0.9949536920 0.9867169261 0.9894905090
+ 0.9950599074 0.9869858027 0.9896854758
+ 0.9951617718 0.9872484803 0.9898774028
+ 0.9952635765 0.9875112176 0.9900693297
+ 0.9953655005 0.9877738953 0.9902613163
+ 0.9954673052 0.9880366921 0.9904531837
+ 0.9955692291 0.9882994294 0.9906451106
+ 0.9956709743 0.9885621071 0.9908369780
+ 0.9957728982 0.9888247848 0.9910290241
+ 0.9958745837 0.9890835881 0.9912208915
+ 0.9959716201 0.9893341064 0.9914097786
+ 0.9960685968 0.9895846844 0.9915987253
+ 0.9961655736 0.9898352027 0.9917874932
+ 0.9962626100 0.9900857210 0.9919763803
+ 0.9963595867 0.9903361797 0.9921653271
+ 0.9964566231 0.9905868173 0.9923540950
+ 0.9965535998 0.9908372760 0.9925429821
+ 0.9966505766 0.9910866022 0.9927319288
+ 0.9967427254 0.9913256764 0.9929165244
+ 0.9968339205 0.9915646911 0.9931002259
+ 0.9969251752 0.9918038249 0.9932839274
+ 0.9970163703 0.9920428991 0.9934676290
+ 0.9971076846 0.9922819138 0.9936512709
+ 0.9971988797 0.9925209880 0.9938349724
+ 0.9972901940 0.9927601218 0.9940186739
+ 0.9973813891 0.9929991961 0.9942023754
+ 0.9974687099 0.9932283759 0.9943823218
+ 0.9975535870 0.9934555292 0.9945598245
+ 0.9976384044 0.9936826825 0.9947373271
+ 0.9977232814 0.9939097762 0.9949148297
+ 0.9978080988 0.9941369891 0.9950922728
+ 0.9978929758 0.9943640828 0.9952697754
+ 0.9979777932 0.9945911765 0.9954472780
+ 0.9980626702 0.9948183894 0.9956247807
+ 0.9981455207 0.9950395823 0.9958003759
+ 0.9982240796 0.9952540994 0.9959719181
+ 0.9983025789 0.9954686761 0.9961432815
+ 0.9983811975 0.9956831932 0.9963148236
+ 0.9984596968 0.9958978295 0.9964861870
+ 0.9985383153 0.9961122870 0.9966577291
+ 0.9986168146 0.9963269234 0.9968290925
+ 0.9986953735 0.9965413809 0.9970005751
+ 0.9987738729 0.9967551827 0.9971719980
+ 0.9988479018 0.9969543219 0.9973402023
+ 0.9989216924 0.9971534014 0.9975082278
+ 0.9989954233 0.9973524213 0.9976761937
+ 0.9990692139 0.9975515008 0.9978441000
+ 0.9991430044 0.9977505803 0.9980121255
+ 0.9992166758 0.9979497194 0.9981800914
+ 0.9992905259 0.9981487989 0.9983481169
+ 0.9993643165 0.9983478785 0.9985160232
+ 0.9994363785 0.9985377789 0.9986823797
+ 0.9995067716 0.9987205863 0.9988471270
+ 0.9995772839 0.9989033937 0.9990118146
+ 0.9996476769 0.9990860820 0.9991765022
+ 0.9997181892 0.9992688894 0.9993411899
+ 0.9997885823 0.9994516969 0.9995058775
+ 0.9998590946 0.9996345043 0.9996706247
+ 0.9999294877 0.9998171926 0.9998353124
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/agfa_agfachrome_ct_precisa_200.spi1d b/release/datafiles/colormanagement/luts/film_response/agfa_agfachrome_ct_precisa_200.spi1d
new file mode 100644
index 00000000000..99b9598f958
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/agfa_agfachrome_ct_precisa_200.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0002699328 0.0001753761 0.0002523783
+ 0.0005516693 0.0003570581 0.0005202319
+ 0.0008440902 0.0005450998 0.0008039851
+ 0.0011470990 0.0007395549 0.0011026140
+ 0.0014597330 0.0009404911 0.0014156949
+ 0.0017813731 0.0011476850 0.0017421190
+ 0.0021126880 0.0013612730 0.0020805011
+ 0.0024531030 0.0015815590 0.0024294229
+ 0.0028031650 0.0018088090 0.0027884119
+ 0.0031638411 0.0020427699 0.0031579121
+ 0.0035372649 0.0022836919 0.0035393820
+ 0.0039257319 0.0025316810 0.0039346260
+ 0.0043312181 0.0027867940 0.0043465500
+ 0.0047563538 0.0030489860 0.0047766608
+ 0.0052017048 0.0033181130 0.0052262088
+ 0.0056667780 0.0035944311 0.0056956508
+ 0.0061506722 0.0038782239 0.0061842999
+ 0.0066511780 0.0041694939 0.0066920272
+ 0.0071674078 0.0044688610 0.0072181849
+ 0.0076976968 0.0047760759 0.0077622221
+ 0.0082411859 0.0050910199 0.0083242692
+ 0.0087973205 0.0054136459 0.0089058857
+ 0.0093660019 0.0057440512 0.0095065739
+ 0.0099473577 0.0060824021 0.0101279598
+ 0.0105416896 0.0064286222 0.0107696000
+ 0.0111480197 0.0067824679 0.0114314295
+ 0.0117668100 0.0071440842 0.0121141002
+ 0.0123977298 0.0075133010 0.0128158899
+ 0.0130404802 0.0078901956 0.0135375699
+ 0.0136951199 0.0082744109 0.0142785497
+ 0.0143617000 0.0086660404 0.0150373597
+ 0.0150401201 0.0090650087 0.0158140305
+ 0.0157300606 0.0094716744 0.0166073292
+ 0.0164318401 0.0098855980 0.0174160805
+ 0.0171449091 0.0103072198 0.0182415899
+ 0.0178689398 0.0107360203 0.0190821793
+ 0.0186050907 0.0111725898 0.0199379697
+ 0.0193527602 0.0116162105 0.0208086297
+ 0.0201126505 0.0120675396 0.0216945801
+ 0.0208839308 0.0125266099 0.0225958191
+ 0.0216670800 0.0129928002 0.0235118493
+ 0.0224615298 0.0134667596 0.0244435798
+ 0.0232677106 0.0139479404 0.0253902208
+ 0.0240852199 0.0144363800 0.0263507906
+ 0.0249137003 0.0149327302 0.0273268502
+ 0.0257528108 0.0154370395 0.0283182394
+ 0.0266024694 0.0159486309 0.0293240100
+ 0.0274628494 0.0164675806 0.0303431805
+ 0.0283344202 0.0169943292 0.0313761793
+ 0.0292166006 0.0175288208 0.0324220508
+ 0.0301091801 0.0180700701 0.0334794186
+ 0.0310120601 0.0186186992 0.0345463790
+ 0.0319244787 0.0191750694 0.0356225707
+ 0.0328475386 0.0197390206 0.0367073193
+ 0.0337808393 0.0203102101 0.0377987213
+ 0.0347246900 0.0208885409 0.0388945192
+ 0.0356788710 0.0214745607 0.0399941206
+ 0.0366426483 0.0220674798 0.0410979390
+ 0.0376164615 0.0226682406 0.0422052182
+ 0.0386001393 0.0232766997 0.0433141701
+ 0.0395945087 0.0238917898 0.0444252789
+ 0.0405988395 0.0245153997 0.0455389805
+ 0.0416126810 0.0251462702 0.0466558412
+ 0.0426358394 0.0257849507 0.0477751605
+ 0.0436693914 0.0264302809 0.0488959402
+ 0.0447117910 0.0270844605 0.0500185490
+ 0.0457648709 0.0277455002 0.0511438698
+ 0.0468259901 0.0284139998 0.0522733182
+ 0.0478970297 0.0290895496 0.0534073599
+ 0.0489763990 0.0297721792 0.0545452908
+ 0.0500655286 0.0304632597 0.0556870997
+ 0.0511628389 0.0311617199 0.0568346418
+ 0.0522699915 0.0318679288 0.0579884015
+ 0.0533850715 0.0325823203 0.0591484793
+ 0.0545096211 0.0333043113 0.0603141114
+ 0.0556424297 0.0340342708 0.0614848994
+ 0.0567837097 0.0347718298 0.0626629367
+ 0.0579337105 0.0355160087 0.0638478696
+ 0.0590906888 0.0362669006 0.0650385097
+ 0.0602574088 0.0370258093 0.0662359372
+ 0.0614334010 0.0377927385 0.0674390867
+ 0.0626170933 0.0385673605 0.0686485395
+ 0.0638106465 0.0393497609 0.0698641911
+ 0.0650118366 0.0401403792 0.0710861981
+ 0.0662213415 0.0409397595 0.0723134726
+ 0.0674379617 0.0417471118 0.0735469386
+ 0.0686631873 0.0425618887 0.0747859776
+ 0.0698976368 0.0433834791 0.0760307387
+ 0.0711404011 0.0442118682 0.0772804022
+ 0.0723914728 0.0450474396 0.0785348937
+ 0.0736518502 0.0458911397 0.0797948688
+ 0.0749201477 0.0467427112 0.0810601711
+ 0.0761969313 0.0476017408 0.0823324025
+ 0.0774813071 0.0484685600 0.0836096331
+ 0.0787731186 0.0493434109 0.0848924294
+ 0.0800740421 0.0502262115 0.0861801729
+ 0.0813831016 0.0511168912 0.0874729678
+ 0.0827006921 0.0520157702 0.0887702629
+ 0.0840270668 0.0529231317 0.0900717899
+ 0.0853607282 0.0538391396 0.0913778096
+ 0.0867023394 0.0547635406 0.0926876292
+ 0.0880530998 0.0556963496 0.0940016583
+ 0.0894121006 0.0566373095 0.0953195170
+ 0.0907792076 0.0575862303 0.0966407433
+ 0.0921551064 0.0585427284 0.0979649574
+ 0.0935385600 0.0595068783 0.0992923602
+ 0.0949299335 0.0604788885 0.1006235033
+ 0.0963296816 0.0614589490 0.1019582972
+ 0.0977364033 0.0624472797 0.1032961980
+ 0.0991507098 0.0634440780 0.1046369970
+ 0.1005733013 0.0644495711 0.1059795022
+ 0.1020032987 0.0654638633 0.1073246971
+ 0.1034407988 0.0664867088 0.1086725965
+ 0.1048860997 0.0675178468 0.1100225002
+ 0.1063387021 0.0685571134 0.1113744006
+ 0.1077983007 0.0696041286 0.1127282009
+ 0.1092654988 0.0706589893 0.1140839010
+ 0.1107404977 0.0717224628 0.1154410988
+ 0.1122227013 0.0727944970 0.1168001965
+ 0.1137126014 0.0738748014 0.1181621030
+ 0.1152106971 0.0749634504 0.1195268035
+ 0.1167161986 0.0760605484 0.1208942011
+ 0.1182283014 0.0771661699 0.1222644001
+ 0.1197486967 0.0782803968 0.1236374006
+ 0.1212769002 0.0794033334 0.1250136942
+ 0.1228116006 0.0805374980 0.1263937950
+ 0.1243539006 0.0816816911 0.1277772933
+ 0.1259036064 0.0828360692 0.1291648000
+ 0.1274601966 0.0840003714 0.1305564940
+ 0.1290239990 0.0851741210 0.1319530010
+ 0.1305951029 0.0863568485 0.1333540976
+ 0.1321730018 0.0875512436 0.1347596943
+ 0.1337587982 0.0887546614 0.1361702979
+ 0.1353518963 0.0899670422 0.1375872940
+ 0.1369515061 0.0911882967 0.1390096992
+ 0.1385575980 0.0924183726 0.1404386014
+ 0.1401696056 0.0936605185 0.1418738067
+ 0.1417876929 0.0949114934 0.1433147937
+ 0.1434136033 0.0961711928 0.1447637975
+ 0.1450462937 0.0974395201 0.1462194026
+ 0.1466850936 0.0987184718 0.1476815939
+ 0.1483296007 0.1000078022 0.1491505057
+ 0.1499803066 0.1013054997 0.1506260037
+ 0.1516395956 0.1026116982 0.1521109045
+ 0.1533043981 0.1039282009 0.1536028981
+ 0.1549746990 0.1052552983 0.1551018059
+ 0.1566507071 0.1065905988 0.1566075981
+ 0.1583354026 0.1079339013 0.1581221074
+ 0.1600269973 0.1092884988 0.1596440971
+ 0.1617241949 0.1106527001 0.1611728072
+ 0.1634269953 0.1120247021 0.1627078950
+ 0.1651381999 0.1134048030 0.1642509997
+ 0.1668564975 0.1147963032 0.1658020020
+ 0.1685802042 0.1161947995 0.1673590988
+ 0.1703090966 0.1176000983 0.1689217985
+ 0.1720459014 0.1190157980 0.1704941988
+ 0.1737886965 0.1204395965 0.1720733941
+ 0.1755366027 0.1218703017 0.1736585945
+ 0.1772904992 0.1233104020 0.1752517074
+ 0.1790520996 0.1247609034 0.1768528074
+ 0.1808187962 0.1262181997 0.1784588993
+ 0.1825904995 0.1276842058 0.1800702065
+ 0.1843689978 0.1291611046 0.1816917062
+ 0.1861528009 0.1306443959 0.1833177954
+ 0.1879408062 0.1321358979 0.1849482954
+ 0.1897339970 0.1336382031 0.1865873039
+ 0.1915318966 0.1351462007 0.1882306933
+ 0.1933335066 0.1366620958 0.1898781061
+ 0.1951407045 0.1381859928 0.1915331036
+ 0.1969527006 0.1397145987 0.1931923032
+ 0.1987676024 0.1412506998 0.1948550940
+ 0.2005867958 0.1427935958 0.1965250969
+ 0.2024096996 0.1443406940 0.1981987059
+ 0.2042354047 0.1458964050 0.1998753995
+ 0.2060655951 0.1474573016 0.2015592009
+ 0.2078990936 0.1490225941 0.2032458931
+ 0.2097346038 0.1505970955 0.2049356997
+ 0.2115736008 0.1521753073 0.2066316009
+ 0.2134155929 0.1537598073 0.2083299011
+ 0.2152598053 0.1553504020 0.2100317031
+ 0.2171059996 0.1569440067 0.2117380053
+ 0.2189532965 0.1585451961 0.2134467959
+ 0.2208018005 0.1601499021 0.2151606977
+ 0.2226525992 0.1617594957 0.2168776989
+ 0.2245036960 0.1633763015 0.2185973972
+ 0.2263543010 0.1649962068 0.2203236967
+ 0.2282046974 0.1666252017 0.2220526040
+ 0.2300550044 0.1682582051 0.2237869948
+ 0.2319052964 0.1698971987 0.2255263031
+ 0.2337547988 0.1715423018 0.2272689044
+ 0.2356023043 0.1731901020 0.2290178984
+ 0.2374480069 0.1748462021 0.2307692021
+ 0.2392929047 0.1765045971 0.2325260937
+ 0.2411359996 0.1781698018 0.2342863977
+ 0.2429780960 0.1798388958 0.2360495031
+ 0.2448175997 0.1815121025 0.2378188968
+ 0.2466558963 0.1831911057 0.2395901978
+ 0.2484931946 0.1848724037 0.2413679063
+ 0.2503274083 0.1865603030 0.2431481034
+ 0.2521604002 0.1882493943 0.2449326068
+ 0.2539891005 0.1899435967 0.2467211932
+ 0.2558167875 0.1916399002 0.2485122979
+ 0.2576422989 0.1933400929 0.2503088117
+ 0.2594659925 0.1950432062 0.2521066070
+ 0.2612882853 0.1967488974 0.2539105117
+ 0.2631081939 0.1984582990 0.2557164133
+ 0.2649275064 0.2001695931 0.2575275898
+ 0.2667450905 0.2018844932 0.2593415976
+ 0.2685621977 0.2036001980 0.2611587942
+ 0.2703767121 0.2053194046 0.2629804015
+ 0.2721900046 0.2070389986 0.2648043931
+ 0.2740012109 0.2087621987 0.2666332126
+ 0.2758114934 0.2104858011 0.2684633136
+ 0.2776210010 0.2122109979 0.2703008056
+ 0.2794296145 0.2139367014 0.2721393108
+ 0.2812376916 0.2156637013 0.2739846110
+ 0.2830449939 0.2173916996 0.2758311927
+ 0.2848519981 0.2191213071 0.2776845992
+ 0.2866581082 0.2208511978 0.2795400918
+ 0.2884640992 0.2225816995 0.2814018130
+ 0.2902691066 0.2243124992 0.2832661867
+ 0.2920739949 0.2260437012 0.2851360142
+ 0.2938778102 0.2277746946 0.2870089114
+ 0.2956816852 0.2295051962 0.2888864875
+ 0.2974855900 0.2312353998 0.2907676995
+ 0.2992897928 0.2329653054 0.2926534116
+ 0.3010956943 0.2346948981 0.2945432067
+ 0.3029015958 0.2364241928 0.2964377999
+ 0.3047079146 0.2381531000 0.2983360887
+ 0.3065148890 0.2398813963 0.3002381921
+ 0.3083240986 0.2416097969 0.3021444976
+ 0.3101342022 0.2433384061 0.3040550947
+ 0.3119468987 0.2450670004 0.3059692979
+ 0.3137601912 0.2467954010 0.3078877032
+ 0.3155752122 0.2485236973 0.3098101914
+ 0.3173910081 0.2502520084 0.3117381930
+ 0.3192102015 0.2519801855 0.3136689961
+ 0.3210298121 0.2537078857 0.3156045079
+ 0.3228524923 0.2554357052 0.3175427020
+ 0.3246755004 0.2571632862 0.3194876015
+ 0.3265027106 0.2588908970 0.3214339018
+ 0.3283298910 0.2606168985 0.3233856857
+ 0.3301618993 0.2623426914 0.3253385127
+ 0.3319939077 0.2640664876 0.3272993863
+ 0.3338311017 0.2657895982 0.3292602003
+ 0.3356688917 0.2675099969 0.3312292099
+ 0.3375113904 0.2692281902 0.3331983089
+ 0.3393552005 0.2709451020 0.3351751864
+ 0.3412027955 0.2726595998 0.3371534944
+ 0.3430523872 0.2743734121 0.3391371071
+ 0.3449051976 0.2760832906 0.3411231935
+ 0.3467617035 0.2777931094 0.3431136012
+ 0.3486200869 0.2795000076 0.3451083899
+ 0.3504830897 0.2812066078 0.3471060097
+ 0.3523468077 0.2829105854 0.3491097093
+ 0.3542161882 0.2846131921 0.3511143029
+ 0.3560855985 0.2863143981 0.3531267047
+ 0.3579610884 0.2880134881 0.3551391065
+ 0.3598372936 0.2897121012 0.3571586907
+ 0.3617183864 0.2914075851 0.3591794968
+ 0.3636018932 0.2931031883 0.3612056077
+ 0.3654884994 0.2947953939 0.3632349968
+ 0.3673790991 0.2964870930 0.3652678132
+ 0.3692705929 0.2981764078 0.3673068881
+ 0.3711664081 0.2998636067 0.3693464100
+ 0.3730623126 0.3015499115 0.3713943064
+ 0.3749629855 0.3032326996 0.3734421134
+ 0.3768644929 0.3049154878 0.3754970133
+ 0.3787690997 0.3065958023 0.3775540888
+ 0.3806760013 0.3082754910 0.3796147108
+ 0.3825837970 0.3099536002 0.3816798031
+ 0.3844941854 0.3116297126 0.3837456107
+ 0.3864046037 0.3133055866 0.3858197927
+ 0.3883185983 0.3149785995 0.3878938854
+ 0.3902328908 0.3166514933 0.3899737000
+ 0.3921490908 0.3183214962 0.3920556009
+ 0.3940671086 0.3199898005 0.3941405118
+ 0.3959853053 0.3216570020 0.3962311149
+ 0.3979054987 0.3233199120 0.3983218074
+ 0.3998256922 0.3249827921 0.4004194140
+ 0.4017480910 0.3266434073 0.4025174975
+ 0.4036712050 0.3283031881 0.4046190977
+ 0.4055953920 0.3299618959 0.4067240059
+ 0.4075216949 0.3316178024 0.4088292122
+ 0.4094479978 0.3332735896 0.4109373987
+ 0.4113749862 0.3349258900 0.4130455852
+ 0.4133020043 0.3365769982 0.4151561856
+ 0.4152295887 0.3382270932 0.4172683954
+ 0.4171578884 0.3398742974 0.4193809032
+ 0.4190863073 0.3415214121 0.4214954972
+ 0.4210152924 0.3431650996 0.4236100912
+ 0.4229443073 0.3448075950 0.4257256985
+ 0.4248732030 0.3464492857 0.4278419018
+ 0.4268017113 0.3480867147 0.4299578965
+ 0.4287301898 0.3497239947 0.4320721030
+ 0.4306586087 0.3513588905 0.4341863096
+ 0.4325869977 0.3529917896 0.4362998903
+ 0.4345157146 0.3546248078 0.4384129047
+ 0.4364447892 0.3562546968 0.4405260086
+ 0.4383738935 0.3578845859 0.4426352084
+ 0.4403015971 0.3595128059 0.4447444081
+ 0.4422290921 0.3611381054 0.4468516111
+ 0.4441559017 0.3627632856 0.4489555061
+ 0.4460807145 0.3643858135 0.4510594904
+ 0.4480054975 0.3660072088 0.4531568885
+ 0.4499278963 0.3676283956 0.4552522898
+ 0.4518488944 0.3692458868 0.4573468864
+ 0.4537698925 0.3708634973 0.4594365954
+ 0.4556883872 0.3724792004 0.4615261853
+ 0.4576067924 0.3740915060 0.4636127055
+ 0.4595240057 0.3757036924 0.4656955898
+ 0.4614388943 0.3773143888 0.4677784145
+ 0.4633539021 0.3789240122 0.4698548019
+ 0.4652644098 0.3805336058 0.4719296098
+ 0.4671730101 0.3821412027 0.4740034938
+ 0.4690816104 0.3837484121 0.4760693014
+ 0.4709844887 0.3853549957 0.4781351089
+ 0.4728874862 0.3869574070 0.4801965058
+ 0.4747886956 0.3885596991 0.4822503924
+ 0.4766854942 0.3901604116 0.4843043983
+ 0.4785822928 0.3917576969 0.4863505065
+ 0.4804754853 0.3933550119 0.4883921146
+ 0.4823656976 0.3949500024 0.4904336035
+ 0.4842557907 0.3965430856 0.4924621880
+ 0.4861414135 0.3981361091 0.4944886863
+ 0.4880256951 0.3997269869 0.4965141118
+ 0.4899098873 0.4013170898 0.4985252917
+ 0.4917871952 0.4029071927 0.5005366206
+ 0.4936642945 0.4044938982 0.5025439262
+ 0.4955402911 0.4060800970 0.5045402050
+ 0.4974110126 0.4076662064 0.5065364838
+ 0.4992815852 0.4092473984 0.5085269213
+ 0.5011492968 0.4108285904 0.5105090141
+ 0.5030111074 0.4124091864 0.5124911070
+ 0.5048729181 0.4139845073 0.5144640207
+ 0.5067303777 0.4155597985 0.5164294839
+ 0.5085831881 0.4171343148 0.5183951259
+ 0.5104359984 0.4187046885 0.5203496218
+ 0.5122830272 0.4202750921 0.5222988129
+ 0.5141261816 0.4218446016 0.5242480040
+ 0.5159693956 0.4234111905 0.5261831284
+ 0.5178055763 0.4249776900 0.5281137824
+ 0.5196387768 0.4265432060 0.5300444961
+ 0.5214719176 0.4281054139 0.5319601893
+ 0.5232948065 0.4296675026 0.5338729024
+ 0.5251145959 0.4312283099 0.5357854962
+ 0.5269343853 0.4327852130 0.5376809239
+ 0.5287426114 0.4343419969 0.5395737290
+ 0.5305480957 0.4358971119 0.5414664745
+ 0.5323536992 0.4374468029 0.5433425903
+ 0.5341475010 0.4389964044 0.5452167988
+ 0.5359390974 0.4405452907 0.5470908880
+ 0.5377306938 0.4420902133 0.5489476919
+ 0.5395104885 0.4436351061 0.5508022904
+ 0.5412878990 0.4451794922 0.5526568890
+ 0.5430654287 0.4467185140 0.5544949174
+ 0.5448313951 0.4482575059 0.5563300848
+ 0.5465946794 0.4497964978 0.5581651926
+ 0.5483580828 0.4513302147 0.5599843860
+ 0.5501095057 0.4528639913 0.5617994070
+ 0.5518571138 0.4543977976 0.5636144876
+ 0.5536047220 0.4559254944 0.5654160976
+ 0.5553417206 0.4574523866 0.5672122836
+ 0.5570737123 0.4589793086 0.5690084100
+ 0.5588057041 0.4605017900 0.5707932711
+ 0.5605282187 0.4620226920 0.5725706816
+ 0.5622438788 0.4635435939 0.5743482113
+ 0.5639594793 0.4650601149 0.5761160254
+ 0.5656672716 0.4665732086 0.5778731108
+ 0.5673655272 0.4680863023 0.5796301961
+ 0.5690636039 0.4695965946 0.5813813806
+ 0.5707573295 0.4711019993 0.5831196904
+ 0.5724400282 0.4726073146 0.5848580003
+ 0.5741227269 0.4741115868 0.5865939260
+ 0.5758035779 0.4756088853 0.5883123875
+ 0.5774692297 0.4771062136 0.5900310278
+ 0.5791348219 0.4786033928 0.5917496085
+ 0.5808004737 0.4800952971 0.5934519768
+ 0.5824471116 0.4815863073 0.5951527953
+ 0.5840917230 0.4830772877 0.5968536139
+ 0.5857362747 0.4845638871 0.5985416770
+ 0.5873677135 0.4860475063 0.6002234817
+ 0.5889924765 0.4875310957 0.6019052863
+ 0.5906172991 0.4890125990 0.6035785079
+ 0.5922335982 0.4904884994 0.6052387953
+ 0.5938374996 0.4919644892 0.6068990827
+ 0.5954412818 0.4934403896 0.6085569859
+ 0.5970427990 0.4949091077 0.6101952791
+ 0.5986260176 0.4963772893 0.6118335128
+ 0.6002092957 0.4978454113 0.6134716868
+ 0.6017925143 0.4993087053 0.6150943041
+ 0.6033605933 0.5007681847 0.6167126298
+ 0.6049249768 0.5022277236 0.6183308959
+ 0.6064894199 0.5036858916 0.6199414134
+ 0.6080433726 0.5051380992 0.6215417981
+ 0.6095849872 0.5065904260 0.6231423020
+ 0.6111266017 0.5080425739 0.6247416735
+ 0.6126660705 0.5094881058 0.6263244748
+ 0.6141831875 0.5109314919 0.6279072762
+ 0.6157003045 0.5123748183 0.6294900775
+ 0.6172174215 0.5138152242 0.6310620904
+ 0.6187192798 0.5152488947 0.6326283813
+ 0.6202139854 0.5166826248 0.6341947913
+ 0.6217088103 0.5181162953 0.6357573271
+ 0.6231973767 0.5195432901 0.6373063922
+ 0.6246680021 0.5209690928 0.6388555169
+ 0.6261385083 0.5223947763 0.6404047012
+ 0.6276090741 0.5238174796 0.6419379711
+ 0.6290594935 0.5252338052 0.6434664130
+ 0.6305047870 0.5266500711 0.6449947953
+ 0.6319500804 0.5280663967 0.6465178728
+ 0.6333882213 0.5294749737 0.6480270028
+ 0.6348105073 0.5308814049 0.6495360136
+ 0.6362327933 0.5322877169 0.6510450244
+ 0.6376551986 0.5336924195 0.6525406241
+ 0.6390563250 0.5350908041 0.6540316939
+ 0.6404522061 0.5364891887 0.6555228233
+ 0.6418480873 0.5378875732 0.6570094824
+ 0.6432371140 0.5392802954 0.6584786177
+ 0.6446061730 0.5406693816 0.6599478126
+ 0.6459752917 0.5420585871 0.6614168882
+ 0.6473444104 0.5434476733 0.6628721952
+ 0.6486949921 0.5448269844 0.6643189788
+ 0.6500368714 0.5462061763 0.6657658219
+ 0.6513789296 0.5475854874 0.6672123075
+ 0.6527189016 0.5489618182 0.6686396003
+ 0.6540355086 0.5503323078 0.6700670123
+ 0.6553521156 0.5517029166 0.6714943051
+ 0.6566687822 0.5530735254 0.6729140878
+ 0.6579744816 0.5544376969 0.6743212938
+ 0.6592665911 0.5557985902 0.6757284999
+ 0.6605587006 0.5571594238 0.6771355867
+ 0.6618508101 0.5585203171 0.6785268188
+ 0.6631215811 0.5598711967 0.6799110770
+ 0.6643863916 0.5612214804 0.6812955141
+ 0.6656513214 0.5625717044 0.6826797724
+ 0.6669138074 0.5639197826 0.6840425730
+ 0.6681522131 0.5652583241 0.6854054928
+ 0.6693906784 0.5665968060 0.6867682934
+ 0.6706290841 0.5679352880 0.6881262064
+ 0.6718584895 0.5692687035 0.6894711256
+ 0.6730719805 0.5705946088 0.6908161044
+ 0.6742855906 0.5719205737 0.6921610236
+ 0.6754990816 0.5732464790 0.6934955716
+ 0.6766976118 0.5745657086 0.6948205233
+ 0.6778864264 0.5758802891 0.6961454153
+ 0.6790751815 0.5771949291 0.6974701881
+ 0.6802639961 0.5785095096 0.6987801194
+ 0.6814342141 0.5798168182 0.7000842094
+ 0.6826003194 0.5811215043 0.7013882995
+ 0.6837664843 0.5824263096 0.7026923895
+ 0.6849324703 0.5837309957 0.7039760947
+ 0.6860750914 0.5850257874 0.7052575946
+ 0.6872177124 0.5863190889 0.7065389752
+ 0.6883602142 0.5876123905 0.7078195214
+ 0.6894991994 0.5889056921 0.7090789080
+ 0.6906188130 0.5901870728 0.7103384137
+ 0.6917384267 0.5914680958 0.7115979195
+ 0.6928580999 0.5927491188 0.7128540874
+ 0.6939715147 0.5940297246 0.7140920162
+ 0.6950684190 0.5952988863 0.7153298855
+ 0.6961653829 0.5965679884 0.7165678144
+ 0.6972624063 0.5978370905 0.7178003192
+ 0.6983522773 0.5991057754 0.7190150023
+ 0.6994295716 0.6003659964 0.7202296853
+ 0.7005069852 0.6016262770 0.7214444280
+ 0.7015843987 0.6028864980 0.7226526737
+ 0.7026544809 0.6041461825 0.7238447070
+ 0.7037143707 0.6053941250 0.7250366807
+ 0.7047743201 0.6066418886 0.7262287140
+ 0.7058342099 0.6078897119 0.7274144888
+ 0.7068858743 0.6091374755 0.7285851836
+ 0.7079268098 0.6103718877 0.7297558784
+ 0.7089678049 0.6116061807 0.7309266925
+ 0.7100088000 0.6128405929 0.7320916057
+ 0.7110424042 0.6140750051 0.7332413197
+ 0.7120658159 0.6152967215 0.7343909740
+ 0.7130892277 0.6165174842 0.7355408072
+ 0.7141125798 0.6177383065 0.7366862297
+ 0.7151290178 0.6189591289 0.7378168106
+ 0.7161335945 0.6201689839 0.7389473915
+ 0.7171381712 0.6213768125 0.7400779128
+ 0.7181428075 0.6225845218 0.7412056923
+ 0.7191423774 0.6237921715 0.7423154712
+ 0.7201297879 0.6249904037 0.7434253097
+ 0.7211171985 0.6261842847 0.7445352077
+ 0.7221046090 0.6273781061 0.7456446886
+ 0.7230893970 0.6285719872 0.7467349768
+ 0.7240619063 0.6297590733 0.7478252053
+ 0.7250344753 0.6309399009 0.7489154935
+ 0.7260071039 0.6321207285 0.7500057817
+ 0.7269790769 0.6333013773 0.7510781288
+ 0.7279344797 0.6344782710 0.7521474957
+ 0.7288898826 0.6356462836 0.7532169223
+ 0.7298454046 0.6368141770 0.7542862296
+ 0.7308008075 0.6379821897 0.7553424835
+ 0.7317430973 0.6391494274 0.7563924789
+ 0.7326831222 0.6403048038 0.7574424148
+ 0.7336230874 0.6414602995 0.7584924102
+ 0.7345631123 0.6426156759 0.7595331073
+ 0.7354928851 0.6437711120 0.7605624795
+ 0.7364168167 0.6449149251 0.7615919113
+ 0.7373406291 0.6460554004 0.7626212835
+ 0.7382645011 0.6471958160 0.7636470795
+ 0.7391830087 0.6483362913 0.7646576166
+ 0.7400926948 0.6494706273 0.7656682134
+ 0.7410023808 0.6505978703 0.7666786909
+ 0.7419121861 0.6517251134 0.7676892877
+ 0.7428205013 0.6528524160 0.7686821818
+ 0.7437157035 0.6539782882 0.7696729898
+ 0.7446109056 0.6550930738 0.7706639171
+ 0.7455059886 0.6562079191 0.7716547251
+ 0.7464011908 0.6573228240 0.7726355195
+ 0.7472869158 0.6584376097 0.7736086249
+ 0.7481697798 0.6595439911 0.7745816708
+ 0.7490527034 0.6606470942 0.7755547166
+ 0.7499356270 0.6617503166 0.7765241265
+ 0.7508131862 0.6628534198 0.7774782777
+ 0.7516831756 0.6639522910 0.7784324884
+ 0.7525532246 0.6650412083 0.7793866992
+ 0.7534232140 0.6661300063 0.7803409100
+ 0.7542930841 0.6672189236 0.7812796831
+ 0.7551512122 0.6683077216 0.7822145224
+ 0.7560092807 0.6693845987 0.7831493020
+ 0.7568672895 0.6704590917 0.7840840816
+ 0.7577254176 0.6715335846 0.7850121260
+ 0.7585778236 0.6726080775 0.7859280109
+ 0.7594259977 0.6736781001 0.7868438959
+ 0.7602741718 0.6747391224 0.7877597809
+ 0.7611225247 0.6758000851 0.7886756063
+ 0.7619696856 0.6768611073 0.7895761728
+ 0.7628092766 0.6779221892 0.7904745936
+ 0.7636489272 0.6789721251 0.7913730145
+ 0.7644885182 0.6800191998 0.7922713757
+ 0.7653279901 0.6810662746 0.7931637764
+ 0.7661625743 0.6821134090 0.7940455079
+ 0.7669938803 0.6831572056 0.7949272990
+ 0.7678251266 0.6841893792 0.7958090901
+ 0.7686563730 0.6852216721 0.7966908813
+ 0.7694870234 0.6862540245 0.7975584865
+ 0.7703074813 0.6872861981 0.7984229922
+ 0.7711278796 0.6883111000 0.7992874980
+ 0.7719483972 0.6893314123 0.8001520038
+ 0.7727687955 0.6903517246 0.8010128736
+ 0.7735849023 0.6913719773 0.8018617034
+ 0.7743961811 0.6923922896 0.8027104735
+ 0.7752075195 0.6934009790 0.8035593033
+ 0.7760187984 0.6944093704 0.8044080734
+ 0.7768300772 0.6954177022 0.8052453995
+ 0.7776347995 0.6964259744 0.8060749173
+ 0.7784383893 0.6974307895 0.8069043756
+ 0.7792420983 0.6984261274 0.8077338934
+ 0.7800456882 0.6994215250 0.8085634708
+ 0.7808480263 0.7004168034 0.8093764186
+ 0.7816452980 0.7014120817 0.8101881146
+ 0.7824425101 0.7024009228 0.8109998107
+ 0.7832397819 0.7033842802 0.8118115067
+ 0.7840369940 0.7043675780 0.8126195073
+ 0.7848305702 0.7053508759 0.8134146929
+ 0.7856206894 0.7063342929 0.8142098188
+ 0.7864106894 0.7073084712 0.8150050044
+ 0.7872008085 0.7082800269 0.8158001900
+ 0.7879908085 0.7092515826 0.8165881038
+ 0.7887749076 0.7102231979 0.8173683882
+ 0.7895570993 0.7111946940 0.8181486726
+ 0.7903392911 0.7121539712 0.8189290166
+ 0.7911216021 0.7131130099 0.8197093010
+ 0.7919037938 0.7140719891 0.8204782009
+ 0.7926781774 0.7150310278 0.8212423921
+ 0.7934526205 0.7159885168 0.8220065832
+ 0.7942268848 0.7169361115 0.8227707148
+ 0.7950013280 0.7178837061 0.8235349059
+ 0.7957745194 0.7188313007 0.8242856860
+ 0.7965422273 0.7197788954 0.8250346184
+ 0.7973099947 0.7207238078 0.8257834911
+ 0.7980777025 0.7216603756 0.8265324831
+ 0.7988454103 0.7225970030 0.8272811770
+ 0.7996107936 0.7235335708 0.8280162215
+ 0.8003711104 0.7244701982 0.8287512064
+ 0.8011314869 0.7254031897 0.8294863105
+ 0.8018918037 0.7263281941 0.8302212954
+ 0.8026521206 0.7272531986 0.8309546113
+ 0.8034093976 0.7281782031 0.8316739798
+ 0.8041626811 0.7291032076 0.8323932886
+ 0.8049159050 0.7300242186 0.8331127167
+ 0.8056691885 0.7309377193 0.8338320851
+ 0.8064224124 0.7318512201 0.8345488906
+ 0.8071724772 0.7327647209 0.8352528811
+ 0.8079192042 0.7336782217 0.8359568715
+ 0.8086658716 0.7345883250 0.8366609216
+ 0.8094125986 0.7354918122 0.8373649120
+ 0.8101593256 0.7363952994 0.8380662799
+ 0.8109018803 0.7372987270 0.8387560248
+ 0.8116406798 0.7382022142 0.8394458294
+ 0.8123794198 0.7391029000 0.8401355147
+ 0.8131181002 0.7399963737 0.8408252001
+ 0.8138568997 0.7408899069 0.8415125012
+ 0.8145921826 0.7417833805 0.8421863914
+ 0.8153241277 0.7426769137 0.8428602815
+ 0.8160558939 0.7435685992 0.8435341716
+ 0.8167877793 0.7444524765 0.8442081809
+ 0.8175196052 0.7453362942 0.8448808789
+ 0.8182482719 0.7462201118 0.8455417156
+ 0.8189728260 0.7471039295 0.8462024927
+ 0.8196973205 0.7479872704 0.8468633294
+ 0.8204218745 0.7488632202 0.8475239873
+ 0.8211464286 0.7497389913 0.8481848240
+ 0.8218685985 0.7506148219 0.8488330841
+ 0.8225861192 0.7514907122 0.8494811058
+ 0.8233035207 0.7523664832 0.8501291275
+ 0.8240209222 0.7532342076 0.8507772088
+ 0.8247383833 0.7541006804 0.8514251709
+ 0.8254544139 0.7549670935 0.8520622849
+ 0.8261637092 0.7558336258 0.8526970744
+ 0.8268730044 0.7567000985 0.8533319831
+ 0.8275822997 0.7575604916 0.8539667726
+ 0.8282917142 0.7584174871 0.8546016216
+ 0.8290010095 0.7592746019 0.8552286029
+ 0.8297007084 0.7601317167 0.8558509946
+ 0.8304002881 0.7609887719 0.8564733267
+ 0.8310999274 0.7618423104 0.8570957184
+ 0.8317995071 0.7626898289 0.8577179909
+ 0.8324990869 0.7635374069 0.8583357930
+ 0.8331922293 0.7643849850 0.8589463234
+ 0.8338832855 0.7652326226 0.8595567942
+ 0.8345744014 0.7660794258 0.8601673245
+ 0.8352655172 0.7669159770 0.8607777953
+ 0.8359565735 0.7677527070 0.8613868952
+ 0.8366435170 0.7685893774 0.8619840145
+ 0.8373258710 0.7694259882 0.8625810146
+ 0.8380082846 0.7702627182 0.8631780744
+ 0.8386908174 0.7710928917 0.8637751937
+ 0.8393731713 0.7719206214 0.8643721938
+ 0.8400542736 0.7727481723 0.8649600148
+ 0.8407285213 0.7735759020 0.8655449748
+ 0.8414027095 0.7744035721 0.8661299944
+ 0.8420767784 0.7752280831 0.8667150140
+ 0.8427510262 0.7760459781 0.8672999740
+ 0.8434252143 0.7768638730 0.8678801060
+ 0.8440936804 0.7776817083 0.8684527278
+ 0.8447608948 0.7784996033 0.8690252900
+ 0.8454279900 0.7793174982 0.8695979118
+ 0.8460950851 0.7801278830 0.8701705933
+ 0.8467621803 0.7809370756 0.8707432151
+ 0.8474255204 0.7817463875 0.8713021278
+ 0.8480827212 0.7825555801 0.8718606830
+ 0.8487399817 0.7833648920 0.8724194169
+ 0.8493973017 0.7841700912 0.8729780912
+ 0.8500545025 0.7849687934 0.8735368252
+ 0.8507118225 0.7857673764 0.8740890026
+ 0.8513603806 0.7865660787 0.8746353984
+ 0.8520085216 0.7873647213 0.8751817942
+ 0.8526566029 0.7881634235 0.8757281899
+ 0.8533046842 0.7889544964 0.8762745857
+ 0.8539528251 0.7897443175 0.8768208027
+ 0.8545969129 0.7905340195 0.8773562908
+ 0.8552358747 0.7913237810 0.8778917789
+ 0.8558748960 0.7921136022 0.8784273267
+ 0.8565139174 0.7929015756 0.8789628148
+ 0.8571529984 0.7936850786 0.8794983029
+ 0.8577920198 0.7944685817 0.8800281882
+ 0.8584234118 0.7952520847 0.8805518150
+ 0.8590539098 0.7960355878 0.8810753822
+ 0.8596845269 0.7968190908 0.8815988898
+ 0.8603150845 0.7975977063 0.8821225166
+ 0.8609455824 0.7983735204 0.8826460838
+ 0.8615739942 0.7991493940 0.8831595778
+ 0.8621975183 0.7999252081 0.8836715221
+ 0.8628209829 0.8007010818 0.8841834068
+ 0.8634445071 0.8014768958 0.8846952915
+ 0.8640679121 0.8022441268 0.8852071762
+ 0.8646913767 0.8030110002 0.8857167959
+ 0.8653084040 0.8037779927 0.8862178922
+ 0.8659222722 0.8045449257 0.8867189884
+ 0.8665362000 0.8053117990 0.8872202039
+ 0.8671500087 0.8060764074 0.8877213001
+ 0.8677638769 0.8068339229 0.8882223964
+ 0.8683776855 0.8075914979 0.8887180090
+ 0.8689824939 0.8083490133 0.8892086744
+ 0.8695871234 0.8091065288 0.8896992803
+ 0.8701918125 0.8098639846 0.8901900053
+ 0.8707963824 0.8106179833 0.8906806111
+ 0.8714010715 0.8113679886 0.8911712766
+ 0.8720031977 0.8121181130 0.8916537166
+ 0.8725978732 0.8128681183 0.8921337724
+ 0.8731927276 0.8136181831 0.8926138878
+ 0.8737874031 0.8143681884 0.8930941224
+ 0.8743820786 0.8151124716 0.8935741782
+ 0.8749768734 0.8158538938 0.8940542936
+ 0.8755673170 0.8165953159 0.8945251107
+ 0.8761531115 0.8173366785 0.8949958086
+ 0.8767387867 0.8180781007 0.8954666257
+ 0.8773245811 0.8188195229 0.8959373236
+ 0.8779103756 0.8195531964 0.8964080215
+ 0.8784961104 0.8202847838 0.8968774080
+ 0.8790776134 0.8210164905 0.8973398209
+ 0.8796569109 0.8217481971 0.8978022933
+ 0.8802360892 0.8224797845 0.8982647061
+ 0.8808153272 0.8232114911 0.8987271786
+ 0.8813946247 0.8239343166 0.8991895914
+ 0.8819738030 0.8246560097 0.8996490836
+ 0.8825464845 0.8253775835 0.9001011252
+ 0.8831173182 0.8260992765 0.9005531073
+ 0.8836882114 0.8268209100 0.9010050893
+ 0.8842589855 0.8275426030 0.9014570713
+ 0.8848298192 0.8282570243 0.9019091725
+ 0.8854007125 0.8289706707 0.9023581147
+ 0.8859637976 0.8296844959 0.9028012753
+ 0.8865255713 0.8303982019 0.9032443762
+ 0.8870874047 0.8311120272 0.9036875963
+ 0.8876491785 0.8318256736 0.9041308165
+ 0.8882110119 0.8325313926 0.9045739174
+ 0.8887729049 0.8332362771 0.9050139785
+ 0.8893269897 0.8339412212 0.9054486752
+ 0.8898801208 0.8346461058 0.9058833718
+ 0.8904331923 0.8353509903 0.9063181281
+ 0.8909863234 0.8360558152 0.9067528248
+ 0.8915393949 0.8367524147 0.9071875215
+ 0.8920925260 0.8374475837 0.9076195955
+ 0.8926386237 0.8381426930 0.9080467224
+ 0.8931834102 0.8388378024 0.9084736705
+ 0.8937283158 0.8395329118 0.9089006782
+ 0.8942731023 0.8402280211 0.9093278050
+ 0.8948178887 0.8409171104 0.9097548127
+ 0.8953627944 0.8416041136 0.9101794958
+ 0.8958991170 0.8422911167 0.9105970263
+ 0.8964328766 0.8429781199 0.9110143781
+ 0.8969668150 0.8436651230 0.9114319086
+ 0.8975006938 0.8443520069 0.9118493795
+ 0.8980345130 0.8450348973 0.9122667909
+ 0.8985683918 0.8457146883 0.9126836061
+ 0.8990967870 0.8463944197 0.9130951166
+ 0.8996223211 0.8470742106 0.9135065079
+ 0.9001477957 0.8477538824 0.9139180183
+ 0.9006732702 0.8484336734 0.9143294096
+ 0.9011988044 0.8491110206 0.9147409201
+ 0.9017242789 0.8497840166 0.9151523113
+ 0.9022449851 0.8504568934 0.9155570269
+ 0.9027605057 0.8511298895 0.9159610868
+ 0.9032760859 0.8518028259 0.9163653255
+ 0.9037916064 0.8524758220 0.9167693853
+ 0.9043071270 0.8531479836 0.9171736240
+ 0.9048225880 0.8538120985 0.9175776839
+ 0.9053356051 0.8544760942 0.9179764986
+ 0.9058414102 0.8551402092 0.9183728099
+ 0.9063470960 0.8558042049 0.9187691808
+ 0.9068529010 0.8564683199 0.9191656113
+ 0.9073585868 0.8571323156 0.9195619226
+ 0.9078643918 0.8577905893 0.9199582934
+ 0.9083700776 0.8584470749 0.9203512073
+ 0.9088681936 0.8591036201 0.9207388759
+ 0.9093660712 0.8597599864 0.9211267233
+ 0.9098640084 0.8604164720 0.9215145111
+ 0.9103618860 0.8610730171 0.9219022989
+ 0.9108597040 0.8617268205 0.9222900271
+ 0.9113575816 0.8623763919 0.9226773977
+ 0.9118500948 0.8630260229 0.9230594039
+ 0.9123396277 0.8636757135 0.9234412909
+ 0.9128291011 0.8643252850 0.9238231778
+ 0.9133185744 0.8649749160 0.9242051840
+ 0.9138082266 0.8656246066 0.9245870709
+ 0.9142976999 0.8662685156 0.9249690771
+ 0.9147847295 0.8669123054 0.9253469110
+ 0.9152647257 0.8675560951 0.9257227182
+ 0.9157447815 0.8681998849 0.9260985255
+ 0.9162247777 0.8688436747 0.9264742732
+ 0.9167048931 0.8694875240 0.9268500805
+ 0.9171848893 0.8701276183 0.9272258282
+ 0.9176650047 0.8707640171 0.9275999069
+ 0.9181361198 0.8714004159 0.9279679060
+ 0.9186053276 0.8720368147 0.9283359051
+ 0.9190744758 0.8726732135 0.9287039042
+ 0.9195436835 0.8733096123 0.9290717840
+ 0.9200128913 0.8739460111 0.9294397831
+ 0.9204820991 0.8745772839 0.9298077822
+ 0.9209483862 0.8752083778 0.9301705956
+ 0.9214088917 0.8758394122 0.9305313826
+ 0.9218693972 0.8764705062 0.9308922291
+ 0.9223300219 0.8771016002 0.9312530160
+ 0.9227905273 0.8777326941 0.9316139221
+ 0.9232509732 0.8783612251 0.9319747090
+ 0.9237114787 0.8789854050 0.9323344231
+ 0.9241648912 0.8796095848 0.9326891899
+ 0.9246163964 0.8802338243 0.9330438972
+ 0.9250679016 0.8808580041 0.9333986044
+ 0.9255194068 0.8814823031 0.9337533712
+ 0.9259709120 0.8821064830 0.9341080785
+ 0.9264224172 0.8827261925 0.9344627857
+ 0.9268720150 0.8833442926 0.9348145723
+ 0.9273136854 0.8839623928 0.9351639152
+ 0.9277552962 0.8845806122 0.9355133176
+ 0.9281969070 0.8851987123 0.9358627200
+ 0.9286385775 0.8858168125 0.9362121224
+ 0.9290801883 0.8864346743 0.9365615249
+ 0.9295219183 0.8870465755 0.9369109273
+ 0.9299585223 0.8876584768 0.9372549057
+ 0.9303908944 0.8882703781 0.9375984073
+ 0.9308233261 0.8888823986 0.9379419088
+ 0.9312556982 0.8894942999 0.9382852912
+ 0.9316880703 0.8901062012 0.9386287928
+ 0.9321205020 0.8907166123 0.9389722943
+ 0.9325528741 0.8913230896 0.9393147826
+ 0.9329783916 0.8919296265 0.9396532178
+ 0.9334024787 0.8925361037 0.9399914742
+ 0.9338266850 0.8931425214 0.9403297901
+ 0.9342507720 0.8937489986 0.9406682253
+ 0.9346749187 0.8943554759 0.9410064816
+ 0.9350991249 0.8949587941 0.9413447976
+ 0.9355226159 0.8955584764 0.9416810870
+ 0.9359377027 0.8961580992 0.9420145154
+ 0.9363527894 0.8967577815 0.9423478842
+ 0.9367679954 0.8973575234 0.9426813126
+ 0.9371830821 0.8979572058 0.9430146813
+ 0.9375982285 0.8985568881 0.9433481097
+ 0.9380133748 0.8991538286 0.9436814785
+ 0.9384260774 0.8997489214 0.9440121055
+ 0.9388316274 0.9003438950 0.9443405271
+ 0.9392371178 0.9009389877 0.9446688890
+ 0.9396426082 0.9015340805 0.9449973106
+ 0.9400480986 0.9021291733 0.9453257918
+ 0.9404535890 0.9027243257 0.9456542134
+ 0.9408590794 0.9033153057 0.9459825754
+ 0.9412612915 0.9039043784 0.9463074803
+ 0.9416580200 0.9044935107 0.9466307759
+ 0.9420546293 0.9050825834 0.9469540715
+ 0.9424512982 0.9056717157 0.9472774267
+ 0.9428480268 0.9062607884 0.9476007223
+ 0.9432446957 0.9068499207 0.9479240179
+ 0.9436413050 0.9074342251 0.9482473135
+ 0.9440346956 0.9080166221 0.9485682845
+ 0.9444236755 0.9085990191 0.9488884807
+ 0.9448127151 0.9091812968 0.9492086768
+ 0.9452018142 0.9097636938 0.9495288730
+ 0.9455907941 0.9103459716 0.9498491287
+ 0.9459797740 0.9109284282 0.9501693249
+ 0.9463688135 0.9115049839 0.9504894018
+ 0.9467542171 0.9120786190 0.9508066773
+ 0.9471350908 0.9126523137 0.9511228800
+ 0.9475159049 0.9132260084 0.9514390826
+ 0.9478967786 0.9137995839 0.9517552853
+ 0.9482775927 0.9143732786 0.9520714879
+ 0.9486585259 0.9149469733 0.9523876905
+ 0.9490392804 0.9155157208 0.9527038932
+ 0.9494168162 0.9160807729 0.9530172944
+ 0.9497889876 0.9166458845 0.9533293247
+ 0.9501612782 0.9172109962 0.9536414146
+ 0.9505335093 0.9177759886 0.9539533854
+ 0.9509056807 0.9183411002 0.9542654753
+ 0.9512779117 0.9189062119 0.9545776248
+ 0.9516502023 0.9194672704 0.9548895955
+ 0.9520196915 0.9200227857 0.9551991820
+ 0.9523826241 0.9205783010 0.9555068016
+ 0.9527454972 0.9211338162 0.9558144808
+ 0.9531083703 0.9216892719 0.9561221004
+ 0.9534713030 0.9222447872 0.9564297199
+ 0.9538341761 0.9228003025 0.9567372799
+ 0.9541971087 0.9233545065 0.9570448995
+ 0.9545590878 0.9239031076 0.9573509097
+ 0.9549140930 0.9244517088 0.9576539993
+ 0.9552692175 0.9250003099 0.9579570889
+ 0.9556242228 0.9255489111 0.9582601786
+ 0.9559792876 0.9260975122 0.9585633278
+ 0.9563344121 0.9266461134 0.9588664174
+ 0.9566894174 0.9271947145 0.9591695070
+ 0.9570444822 0.9277390838 0.9594715834
+ 0.9573910236 0.9282829762 0.9597675800
+ 0.9577363729 0.9288269877 0.9600635767
+ 0.9580819011 0.9293709993 0.9603595734
+ 0.9584273100 0.9299150109 0.9606556296
+ 0.9587727785 0.9304590225 0.9609516859
+ 0.9591181874 0.9310029745 0.9612476826
+ 0.9594637156 0.9315435290 0.9615436792
+ 0.9598045945 0.9320815802 0.9618365765
+ 0.9601426125 0.9326195717 0.9621289968
+ 0.9604806900 0.9331576824 0.9624214172
+ 0.9608187079 0.9336956739 0.9627137780
+ 0.9611567259 0.9342337847 0.9630060792
+ 0.9614946842 0.9347717762 0.9632984996
+ 0.9618327022 0.9353088737 0.9635909200
+ 0.9621691108 0.9358416200 0.9638820887
+ 0.9625008702 0.9363743067 0.9641720057
+ 0.9628326893 0.9369069934 0.9644619226
+ 0.9631645083 0.9374396801 0.9647517800
+ 0.9634963274 0.9379724264 0.9650416970
+ 0.9638280272 0.9385051131 0.9653316140
+ 0.9641597867 0.9390376806 0.9656215906
+ 0.9644916058 0.9395660162 0.9659113288
+ 0.9648177028 0.9400926828 0.9661973715
+ 0.9651427865 0.9406192899 0.9664834738
+ 0.9654678702 0.9411458969 0.9667695761
+ 0.9657930136 0.9416726232 0.9670556784
+ 0.9661180973 0.9421991706 0.9673417807
+ 0.9664431810 0.9427258968 0.9676278830
+ 0.9667683244 0.9432511926 0.9679139853
+ 0.9670909047 0.9437717795 0.9681978226
+ 0.9674093723 0.9442923069 0.9684798121
+ 0.9677278996 0.9448127747 0.9687616825
+ 0.9680464268 0.9453333020 0.9690436721
+ 0.9683648944 0.9458538294 0.9693257213
+ 0.9686834216 0.9463744164 0.9696077108
+ 0.9690018892 0.9468948841 0.9698897004
+ 0.9693204165 0.9474115968 0.9701715708
+ 0.9696332216 0.9479261041 0.9704506993
+ 0.9699448943 0.9484406114 0.9707298279
+ 0.9702566266 0.9489551187 0.9710088968
+ 0.9705682993 0.9494696259 0.9712880254
+ 0.9708799720 0.9499840140 0.9715670943
+ 0.9711917043 0.9504985213 0.9718461037
+ 0.9715033770 0.9510130286 0.9721251726
+ 0.9718133807 0.9515205026 0.9724026918
+ 0.9721180201 0.9520277977 0.9726777077
+ 0.9724227190 0.9525352120 0.9729527831
+ 0.9727274179 0.9530425072 0.9732279181
+ 0.9730321169 0.9535499215 0.9735029936
+ 0.9733366966 0.9540572166 0.9737780094
+ 0.9736413956 0.9545645118 0.9740530849
+ 0.9739460945 0.9550700188 0.9743282199
+ 0.9742460847 0.9555702209 0.9745998979
+ 0.9745427966 0.9560704231 0.9748703837
+ 0.9748393893 0.9565706849 0.9751409292
+ 0.9751361012 0.9570708871 0.9754114747
+ 0.9754328132 0.9575710893 0.9756820202
+ 0.9757294059 0.9580712914 0.9759525061
+ 0.9760261178 0.9585716128 0.9762231112
+ 0.9763227105 0.9590680003 0.9764935970
+ 0.9766126275 0.9595606923 0.9767600298
+ 0.9769014120 0.9600533843 0.9770264030
+ 0.9771901965 0.9605460167 0.9772928953
+ 0.9774789214 0.9610387087 0.9775593281
+ 0.9777677059 0.9615312815 0.9778257012
+ 0.9780563712 0.9620239735 0.9780920744
+ 0.9783452153 0.9625167251 0.9783586264
+ 0.9786334038 0.9630044103 0.9786242247
+ 0.9789144993 0.9634895921 0.9788866043
+ 0.9791955948 0.9639747143 0.9791489840
+ 0.9794766903 0.9644598961 0.9794114232
+ 0.9797577858 0.9649450779 0.9796738029
+ 0.9800388813 0.9654303193 0.9799361825
+ 0.9803199768 0.9659153819 0.9801986217
+ 0.9806010723 0.9664006233 0.9804610014
+ 0.9808804989 0.9668791294 0.9807218909
+ 0.9811537862 0.9673554897 0.9809799790
+ 0.9814270735 0.9678319097 0.9812381268
+ 0.9817004204 0.9683082104 0.9814962745
+ 0.9819737077 0.9687845707 0.9817544222
+ 0.9822469950 0.9692608714 0.9820125103
+ 0.9825202823 0.9697372913 0.9822705984
+ 0.9827936292 0.9702135921 0.9825286865
+ 0.9830644727 0.9706823230 0.9827851057
+ 0.9833294749 0.9711489081 0.9830390811
+ 0.9835945964 0.9716154933 0.9832929969
+ 0.9838597178 0.9720820785 0.9835469723
+ 0.9841247201 0.9725487232 0.9838010073
+ 0.9843897820 0.9730151892 0.9840549231
+ 0.9846549034 0.9734817743 0.9843088984
+ 0.9849199057 0.9739484191 0.9845628142
+ 0.9851824045 0.9744058847 0.9848148823
+ 0.9854390025 0.9748603106 0.9850642085
+ 0.9856956005 0.9753146768 0.9853134751
+ 0.9859521985 0.9757689834 0.9855628014
+ 0.9862087965 0.9762234092 0.9858121276
+ 0.9864653945 0.9766777754 0.9860615134
+ 0.9867219925 0.9771322012 0.9863107800
+ 0.9869785905 0.9775866270 0.9865601063
+ 0.9872329831 0.9780325890 0.9868078232
+ 0.9874812961 0.9784740806 0.9870523810
+ 0.9877294898 0.9789155126 0.9872971177
+ 0.9879776835 0.9793568850 0.9875416756
+ 0.9882258773 0.9797983170 0.9877864122
+ 0.9884740710 0.9802396894 0.9880310297
+ 0.9887223244 0.9806811213 0.9882757068
+ 0.9889705777 0.9811224937 0.9885203242
+ 0.9892175198 0.9815559983 0.9887641072
+ 0.9894570708 0.9819805026 0.9890046716
+ 0.9896966815 0.9824051261 0.9892451763
+ 0.9899362922 0.9828295708 0.9894858003
+ 0.9901759028 0.9832541943 0.9897264242
+ 0.9904153943 0.9836786985 0.9899669886
+ 0.9906550050 0.9841033220 0.9902076125
+ 0.9908946157 0.9845278263 0.9904481769
+ 0.9911342263 0.9849482775 0.9906886220
+ 0.9913660884 0.9853556752 0.9909231067
+ 0.9915975928 0.9857630134 0.9911575913
+ 0.9918292165 0.9861702919 0.9913920760
+ 0.9920607805 0.9865776896 0.9916266203
+ 0.9922922850 0.9869850278 0.9918611050
+ 0.9925239086 0.9873923063 0.9920955896
+ 0.9927554727 0.9877997041 0.9923300743
+ 0.9929869771 0.9882069826 0.9925646186
+ 0.9932109714 0.9885931015 0.9927943945
+ 0.9934319258 0.9889774919 0.9930227995
+ 0.9936528206 0.9893618226 0.9932510853
+ 0.9938737154 0.9897462130 0.9934794903
+ 0.9940946102 0.9901306033 0.9937078953
+ 0.9943153858 0.9905149937 0.9939361811
+ 0.9945362806 0.9908993840 0.9941645861
+ 0.9947571754 0.9912837744 0.9943928719
+ 0.9949743152 0.9916560054 0.9946191907
+ 0.9951854944 0.9920184016 0.9948425293
+ 0.9953966737 0.9923807979 0.9950658083
+ 0.9956079125 0.9927430749 0.9952890873
+ 0.9958190918 0.9931054711 0.9955124259
+ 0.9960302711 0.9934678078 0.9957357049
+ 0.9962415099 0.9938302040 0.9959589839
+ 0.9964526892 0.9941924810 0.9961823225
+ 0.9966639280 0.9945517778 0.9964054823
+ 0.9968671203 0.9948847890 0.9966220856
+ 0.9970703125 0.9952176809 0.9968386292
+ 0.9972733855 0.9955506921 0.9970551729
+ 0.9974765778 0.9958835840 0.9972717166
+ 0.9976797104 0.9962165952 0.9974883199
+ 0.9978829026 0.9965494871 0.9977048039
+ 0.9980860949 0.9968824983 0.9979214072
+ 0.9982892275 0.9972153902 0.9981380105
+ 0.9984850287 0.9975339174 0.9983490109
+ 0.9986743927 0.9978420734 0.9985553026
+ 0.9988638163 0.9981504083 0.9987617135
+ 0.9990531802 0.9984586835 0.9989681244
+ 0.9992424846 0.9987668991 0.9991744757
+ 0.9994319081 0.9990751743 0.9993808866
+ 0.9996212721 0.9993835092 0.9995871782
+ 0.9998105764 0.9996917248 0.9997935891
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/agfa_agfachrome_rsx2_050.spi1d b/release/datafiles/colormanagement/luts/film_response/agfa_agfachrome_rsx2_050.spi1d
new file mode 100644
index 00000000000..42a32ac961e
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/agfa_agfachrome_rsx2_050.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0010793300 0.0004914269 0.0009736730
+ 0.0023187911 0.0010802930 0.0021354880
+ 0.0036931380 0.0018072630 0.0034938811
+ 0.0052456409 0.0026662690 0.0050411709
+ 0.0070081931 0.0036067569 0.0068641612
+ 0.0090551702 0.0045785471 0.0090099405
+ 0.0114011699 0.0055691102 0.0114547899
+ 0.0139678400 0.0065905452 0.0141683398
+ 0.0166869499 0.0076627559 0.0171185602
+ 0.0195989702 0.0088004395 0.0202584993
+ 0.0228006691 0.0100080501 0.0235486198
+ 0.0263756197 0.0112880496 0.0269760005
+ 0.0303584095 0.0126401298 0.0305433907
+ 0.0347159505 0.0140636303 0.0342755318
+ 0.0393988304 0.0155540602 0.0381953716
+ 0.0443377309 0.0171071608 0.0423245206
+ 0.0494562984 0.0187185593 0.0466708317
+ 0.0546695217 0.0203871392 0.0512099490
+ 0.0599117801 0.0221128706 0.0559065714
+ 0.0651446804 0.0238924101 0.0607012585
+ 0.0703425035 0.0257253498 0.0655229613
+ 0.0754935667 0.0276135001 0.0703299269
+ 0.0806027427 0.0295511000 0.0750854388
+ 0.0856716335 0.0315340608 0.0797831416
+ 0.0907013789 0.0335622691 0.0844218433
+ 0.0956865475 0.0356292501 0.0890035927
+ 0.1006257012 0.0377341881 0.0935301632
+ 0.1055174991 0.0398772992 0.0980233997
+ 0.1103760004 0.0420543700 0.1024931967
+ 0.1152203977 0.0442650095 0.1069511026
+ 0.1200542971 0.0465072691 0.1114012972
+ 0.1248871982 0.0487757288 0.1158443019
+ 0.1297339052 0.0510716997 0.1202880964
+ 0.1346120983 0.0533953197 0.1247389987
+ 0.1395314038 0.0557426214 0.1292016953
+ 0.1444949955 0.0581145883 0.1336800009
+ 0.1495019048 0.0605066083 0.1381773949
+ 0.1545559019 0.0629175901 0.1426994056
+ 0.1596433967 0.0653483421 0.1472471952
+ 0.1647536010 0.0677959695 0.1518259943
+ 0.1698786020 0.0702603534 0.1564404070
+ 0.1750122011 0.0727384463 0.1610952020
+ 0.1801480949 0.0752333701 0.1657952070
+ 0.1852789968 0.0777411908 0.1705430001
+ 0.1903969944 0.0802624598 0.1753392965
+ 0.1954903007 0.0827964321 0.1801753938
+ 0.2005587071 0.0853414088 0.1850488037
+ 0.2055945992 0.0878966674 0.1899594069
+ 0.2105983049 0.0904616788 0.1949048936
+ 0.2155726999 0.0930357873 0.1998749971
+ 0.2205152959 0.0956183821 0.2048487961
+ 0.2254346013 0.0982099175 0.2098221034
+ 0.2303334028 0.1008104980 0.2147811055
+ 0.2352052927 0.1034198999 0.2197100967
+ 0.2400625050 0.1060379967 0.2246035039
+ 0.2449066043 0.1086636037 0.2294571996
+ 0.2497355938 0.1112938970 0.2342610061
+ 0.2545413971 0.1139284000 0.2390076965
+ 0.2593365014 0.1165691987 0.2436912954
+ 0.2641316950 0.1192142963 0.2483087927
+ 0.2689233124 0.1218615994 0.2528623939
+ 0.2737050056 0.1245130002 0.2573607862
+ 0.2784807086 0.1271678954 0.2618094981
+ 0.2832559049 0.1298251003 0.2662059069
+ 0.2880277932 0.1324838996 0.2705568075
+ 0.2927958071 0.1351446956 0.2748655975
+ 0.2975589931 0.1378072053 0.2791439891
+ 0.3023168147 0.1404704005 0.2833940089
+ 0.3070589006 0.1431359947 0.2876232862
+ 0.3117862940 0.1458034068 0.2918379009
+ 0.3165079057 0.1484730989 0.2960408032
+ 0.3212226927 0.1511427015 0.3002305925
+ 0.3259240985 0.1538105011 0.3044033051
+ 0.3306060135 0.1564781964 0.3085659146
+ 0.3352772892 0.1591459066 0.3127256930
+ 0.3399353027 0.1618131995 0.3168801963
+ 0.3445748985 0.1644778997 0.3210279047
+ 0.3491897881 0.1671431065 0.3251653910
+ 0.3537842929 0.1698081940 0.3292970955
+ 0.3583635986 0.1724765003 0.3334251940
+ 0.3629280031 0.1751464009 0.3375486135
+ 0.3674629927 0.1778157055 0.3416658044
+ 0.3719677031 0.1804865003 0.3457753956
+ 0.3764384985 0.1831578016 0.3498772979
+ 0.3808833957 0.1858278960 0.3539676964
+ 0.3853051066 0.1885012984 0.3580411971
+ 0.3896934986 0.1911745965 0.3620963991
+ 0.3940488100 0.1938498020 0.3661319017
+ 0.3983697891 0.1965274960 0.3701558113
+ 0.4026510119 0.1992076039 0.3741641045
+ 0.4068988860 0.2018887997 0.3781496882
+ 0.4111185968 0.2045747042 0.3821138144
+ 0.4153113961 0.2072620988 0.3860580921
+ 0.4194692075 0.2099498957 0.3899829984
+ 0.4235900044 0.2126414031 0.3938888013
+ 0.4276776910 0.2153348029 0.3977788091
+ 0.4317341149 0.2180286050 0.4016534090
+ 0.4357563853 0.2207237929 0.4055137932
+ 0.4397394061 0.2234221995 0.4093612134
+ 0.4436829090 0.2261236012 0.4131959975
+ 0.4475947022 0.2288268059 0.4170176983
+ 0.4514735937 0.2315322012 0.4208177924
+ 0.4553222954 0.2342423052 0.4245958030
+ 0.4591388106 0.2369553000 0.4283536971
+ 0.4629189968 0.2396683991 0.4320934117
+ 0.4666629136 0.2423831969 0.4358170927
+ 0.4703747034 0.2451013029 0.4395225048
+ 0.4740515947 0.2478200942 0.4432024956
+ 0.4776928127 0.2505406141 0.4468582869
+ 0.4813019931 0.2532635927 0.4504924119
+ 0.4848793149 0.2559860945 0.4541029930
+ 0.4884204865 0.2587074935 0.4576902092
+ 0.4919295907 0.2614302039 0.4612514973
+ 0.4954057038 0.2641544044 0.4647876918
+ 0.4988467097 0.2668786943 0.4682984054
+ 0.5022568703 0.2696047127 0.4717861116
+ 0.5056318045 0.2723301053 0.4752514064
+ 0.5089687109 0.2750515938 0.4786919951
+ 0.5122699738 0.2777692974 0.4821071923
+ 0.5155354738 0.2804855108 0.4855000973
+ 0.5187671781 0.2832008898 0.4888701141
+ 0.5219681263 0.2859140933 0.4922114909
+ 0.5251352191 0.2886242867 0.4955233037
+ 0.5282660127 0.2913315892 0.4988074899
+ 0.5313646197 0.2940349877 0.5020601749
+ 0.5344318151 0.2967323065 0.5052834749
+ 0.5374667048 0.2994225919 0.5084816217
+ 0.5404701233 0.3021079004 0.5116459131
+ 0.5434368849 0.3047888875 0.5147755146
+ 0.5463718176 0.3074640036 0.5178748965
+ 0.5492841005 0.3101322055 0.5209411979
+ 0.5521711707 0.3127948046 0.5239753127
+ 0.5550354123 0.3154520094 0.5269787908
+ 0.5578734875 0.3181014955 0.5299521089
+ 0.5606822968 0.3207401037 0.5328952074
+ 0.5634636283 0.3233641088 0.5358104110
+ 0.5662226081 0.3259783983 0.5386914015
+ 0.5689582229 0.3285818994 0.5415412784
+ 0.5716739893 0.3311730921 0.5443618894
+ 0.5743725896 0.3337512016 0.5471563935
+ 0.5770525932 0.3363159001 0.5499269962
+ 0.5797128081 0.3388671875 0.5526747704
+ 0.5823537707 0.3414067030 0.5553982854
+ 0.5849738717 0.3439315856 0.5580946207
+ 0.5875731707 0.3464401960 0.5607615709
+ 0.5901582241 0.3489316106 0.5634018183
+ 0.5927311778 0.3514032960 0.5660176277
+ 0.5952929258 0.3538616896 0.5686088800
+ 0.5978369713 0.3563053906 0.5711727738
+ 0.6003630161 0.3587335050 0.5737162828
+ 0.6028745770 0.3611412942 0.5762403011
+ 0.6053730249 0.3635332882 0.5787448287
+ 0.6078591943 0.3659127057 0.5812224150
+ 0.6103302240 0.3682799935 0.5836719275
+ 0.6127892733 0.3706313074 0.5861017108
+ 0.6152378917 0.3729673922 0.5885127783
+ 0.6176773906 0.3752928078 0.5909010768
+ 0.6201043725 0.3776082993 0.5932654738
+ 0.6225174069 0.3799093068 0.5956128240
+ 0.6249200106 0.3821944892 0.5979433060
+ 0.6273151040 0.3844664991 0.6002511978
+ 0.6296957135 0.3867239058 0.6025369167
+ 0.6320651174 0.3889622986 0.6048055887
+ 0.6344231963 0.3911905885 0.6070576906
+ 0.6367667913 0.3934093118 0.6092873216
+ 0.6390994787 0.3956130147 0.6115016937
+ 0.6414197087 0.3978062868 0.6137034297
+ 0.6437255740 0.3999901116 0.6158903241
+ 0.6460139155 0.4021590948 0.6180559993
+ 0.6482884288 0.4043118060 0.6202107072
+ 0.6505498290 0.4064539969 0.6223551035
+ 0.6527922750 0.4085829854 0.6244797111
+ 0.6550189853 0.4106990099 0.6265919805
+ 0.6572331190 0.4128079116 0.6286922097
+ 0.6594275832 0.4149076939 0.6307719946
+ 0.6616020799 0.4169962108 0.6328415275
+ 0.6637635827 0.4190776944 0.6349012256
+ 0.6659076214 0.4211486876 0.6369373202
+ 0.6680328250 0.4232074916 0.6389623880
+ 0.6701455712 0.4252586961 0.6409782171
+ 0.6722385287 0.4272964001 0.6429752111
+ 0.6743144989 0.4293248057 0.6449599862
+ 0.6763777733 0.4313467145 0.6469345093
+ 0.6784113050 0.4333539903 0.6488881707
+ 0.6804267764 0.4353561103 0.6508327723
+ 0.6824293137 0.4373523891 0.6527665854
+ 0.6844047904 0.4393377006 0.6546779871
+ 0.6863657236 0.4413183928 0.6565799713
+ 0.6883090734 0.4432905018 0.6584674120
+ 0.6902278066 0.4452567101 0.6603385806
+ 0.6921337247 0.4472194016 0.6622003913
+ 0.6940143704 0.4491713941 0.6640378833
+ 0.6958734989 0.4511190057 0.6658635736
+ 0.6977202296 0.4530585110 0.6676772237
+ 0.6995369792 0.4549886882 0.6694694161
+ 0.7013437748 0.4569143951 0.6712527871
+ 0.7031323910 0.4588277936 0.6730164886
+ 0.7048978806 0.4607372880 0.6747667193
+ 0.7066525817 0.4626379907 0.6765061021
+ 0.7083770037 0.4645319879 0.6782280803
+ 0.7100898027 0.4664215147 0.6799430251
+ 0.7117800713 0.4683004022 0.6816384196
+ 0.7134491205 0.4701760113 0.6833207011
+ 0.7151061296 0.4720404148 0.6849896908
+ 0.7167317271 0.4739001989 0.6866384149
+ 0.7183483839 0.4757528007 0.6882799864
+ 0.7199388742 0.4775973856 0.6898952723
+ 0.7215155959 0.4794372022 0.6915025711
+ 0.7230750918 0.4812653959 0.6930922270
+ 0.7246130705 0.4830907881 0.6946684122
+ 0.7261415124 0.4849025011 0.6962333918
+ 0.7276425958 0.4867109954 0.6977772713
+ 0.7291371226 0.4885095954 0.6993148923
+ 0.7306033969 0.4903028011 0.7008234859
+ 0.7320588231 0.4920882881 0.7023267150
+ 0.7334914207 0.4938659966 0.7038077712
+ 0.7349091768 0.4956378937 0.7052788138
+ 0.7363126278 0.4973995984 0.7067326903
+ 0.7376976013 0.4991573095 0.7081738710
+ 0.7390735745 0.5009049773 0.7096043229
+ 0.7404264212 0.5026509166 0.7110185027
+ 0.7417743206 0.5043882728 0.7124254107
+ 0.7430984974 0.5061246753 0.7138100863
+ 0.7444195151 0.5078502297 0.7151901722
+ 0.7457147241 0.5095742941 0.7165504098
+ 0.7470049858 0.5112900138 0.7179082036
+ 0.7482746840 0.5130041242 0.7192432284
+ 0.7495390773 0.5147119164 0.7205743194
+ 0.7507901192 0.5164154172 0.7218819857
+ 0.7520323992 0.5181065202 0.7231845856
+ 0.7532587051 0.5197932720 0.7244688272
+ 0.7544769049 0.5214695930 0.7257465124
+ 0.7556836009 0.5231422782 0.7270067930
+ 0.7568811178 0.5248072147 0.7282580733
+ 0.7580674291 0.5264676809 0.7294902802
+ 0.7592449188 0.5281187296 0.7307134867
+ 0.7604126930 0.5297662020 0.7319198847
+ 0.7615684271 0.5314055085 0.7331190705
+ 0.7627115250 0.5330424905 0.7343053818
+ 0.7638474703 0.5346732140 0.7354832292
+ 0.7649760246 0.5363014936 0.7366452217
+ 0.7660958171 0.5379210711 0.7378004193
+ 0.7672052979 0.5395383835 0.7389414907
+ 0.7683075070 0.5411432981 0.7400768995
+ 0.7693994045 0.5427473187 0.7411974072
+ 0.7704840899 0.5443403125 0.7423136234
+ 0.7715560198 0.5459334254 0.7434149981
+ 0.7726234198 0.5475159883 0.7445133924
+ 0.7736793756 0.5490983725 0.7455939054
+ 0.7747321129 0.5506709218 0.7466735840
+ 0.7757707238 0.5522418022 0.7477390766
+ 0.7768080235 0.5538048148 0.7488046288
+ 0.7778319120 0.5553649068 0.7498521805
+ 0.7788556814 0.5569189787 0.7508987784
+ 0.7798684835 0.5584686995 0.7519304156
+ 0.7808806896 0.5600128770 0.7529587746
+ 0.7818831801 0.5615490079 0.7539767027
+ 0.7828834057 0.5630828738 0.7549896240
+ 0.7838739753 0.5646088123 0.7559961081
+ 0.7848594189 0.5661345124 0.7569965720
+ 0.7858390212 0.5676507950 0.7579910159
+ 0.7868121266 0.5691671968 0.7589733005
+ 0.7877818942 0.5706741810 0.7599534988
+ 0.7887430787 0.5721786022 0.7609199286
+ 0.7897034883 0.5736780763 0.7618862987
+ 0.7906509042 0.5751733780 0.7628408074
+ 0.7915983796 0.5766646862 0.7637941837
+ 0.7925338149 0.5781458020 0.7647387981
+ 0.7934665084 0.5796269774 0.7656794190
+ 0.7943943739 0.5810970068 0.7666130066
+ 0.7953184843 0.5825669765 0.7675375938
+ 0.7962388992 0.5840300918 0.7684599161
+ 0.7971503735 0.5854902267 0.7693706155
+ 0.7980619073 0.5869455934 0.7702813148
+ 0.7989597917 0.5883936286 0.7711808085
+ 0.7998577952 0.5898411870 0.7720786929
+ 0.8007482290 0.5912801027 0.7729684114
+ 0.8016350865 0.5927190185 0.7738516927
+ 0.8025193214 0.5941507220 0.7747313976
+ 0.8033987880 0.5955792069 0.7755991817
+ 0.8042780757 0.5970045924 0.7764670849
+ 0.8051458001 0.5984227061 0.7773265839
+ 0.8060135841 0.5998408794 0.7781848907
+ 0.8068729043 0.6012483835 0.7790384293
+ 0.8077275753 0.6026548743 0.7798873782
+ 0.8085805774 0.6040555239 0.7807345986
+ 0.8094288707 0.6054502726 0.7815697193
+ 0.8102772236 0.6068443060 0.7824047208
+ 0.8111171126 0.6082274914 0.7832310796
+ 0.8119553924 0.6096106768 0.7840542197
+ 0.8127890825 0.6109865904 0.7848746181
+ 0.8136162758 0.6123577952 0.7856888771
+ 0.8144435287 0.6137276292 0.7865030766
+ 0.8152586222 0.6150876284 0.7873069048
+ 0.8160732985 0.6164476275 0.7881088853
+ 0.8168833852 0.6178010106 0.7889056802
+ 0.8176890016 0.6191505790 0.7896941900
+ 0.8184943795 0.6204990745 0.7904825807
+ 0.8192909956 0.6218383908 0.7912638187
+ 0.8200876117 0.6231778264 0.7920442224
+ 0.8208791018 0.6245108843 0.7928205132
+ 0.8216655254 0.6258392930 0.7935903072
+ 0.8224520087 0.6271675229 0.7943601012
+ 0.8232241869 0.6284862757 0.7951198816
+ 0.8239961267 0.6298050880 0.7958778739
+ 0.8247646093 0.6311200261 0.7966322899
+ 0.8255286217 0.6324295998 0.7973783016
+ 0.8262926936 0.6337392926 0.7981241941
+ 0.8270503879 0.6350398064 0.7988656759
+ 0.8278068900 0.6363382936 0.7996054888
+ 0.8285604119 0.6376342773 0.8003445864
+ 0.8293051124 0.6389204264 0.8010787964
+ 0.8300496936 0.6402065158 0.8018130064
+ 0.8307862282 0.6414867043 0.8025422096
+ 0.8315181732 0.6427623034 0.8032668829
+ 0.8322501779 0.6440379024 0.8039916158
+ 0.8329762220 0.6453067064 0.8047072291
+ 0.8337022066 0.6465746760 0.8054215908
+ 0.8344250917 0.6478404999 0.8061349988
+ 0.8351423144 0.6490973830 0.8068444729
+ 0.8358594775 0.6503543854 0.8075541258
+ 0.8365702033 0.6516067982 0.8082594872
+ 0.8372778296 0.6528545022 0.8089613914
+ 0.8379853964 0.6541022062 0.8096632957
+ 0.8386828899 0.6553429961 0.8103563190
+ 0.8393800855 0.6565815210 0.8110477924
+ 0.8400756717 0.6578201056 0.8117380738
+ 0.8407658935 0.6590459943 0.8124209046
+ 0.8414561749 0.6602718234 0.8131036758
+ 0.8421434164 0.6614953279 0.8137840033
+ 0.8428274989 0.6627100110 0.8144602180
+ 0.8435115814 0.6639245749 0.8151363730
+ 0.8441904783 0.6651350260 0.8158075213
+ 0.8448675871 0.6663392186 0.8164752126
+ 0.8455445766 0.6675434113 0.8171430230
+ 0.8462108970 0.6687409282 0.8178033233
+ 0.8468765020 0.6699336171 0.8184620142
+ 0.8475412130 0.6711263061 0.8191205859
+ 0.8481993079 0.6723105907 0.8197690845
+ 0.8488574028 0.6734917164 0.8204175830
+ 0.8495146036 0.6746727824 0.8210650086
+ 0.8501691818 0.6758468151 0.8217062950
+ 0.8508237004 0.6770195961 0.8223475218
+ 0.8514751196 0.6781923771 0.8229870796
+ 0.8521217108 0.6793540716 0.8236224055
+ 0.8527683020 0.6805154085 0.8242577910
+ 0.8534088731 0.6816763878 0.8248903751
+ 0.8540437818 0.6828271747 0.8255187869
+ 0.8546788096 0.6839780807 0.8261471987
+ 0.8553087115 0.6851279736 0.8267704844
+ 0.8559352756 0.6862679720 0.8273885846
+ 0.8565620184 0.6874079108 0.8280068040
+ 0.8571853042 0.6885467172 0.8286191225
+ 0.8578070998 0.6896767020 0.8292267919
+ 0.8584287763 0.6908066869 0.8298345208
+ 0.8590450287 0.6919351220 0.8304392099
+ 0.8596587777 0.6930524111 0.8310418725
+ 0.8602727056 0.6941698194 0.8316444755
+ 0.8608806729 0.6952862144 0.8322427273
+ 0.8614864945 0.6963943839 0.8328379989
+ 0.8620923162 0.6975026727 0.8334332705
+ 0.8626918793 0.6986103058 0.8340228796
+ 0.8632891774 0.6997066736 0.8346086740
+ 0.8638864756 0.7008031011 0.8351945281
+ 0.8644778132 0.7018995285 0.8357760906
+ 0.8650662899 0.7029855251 0.8363544941
+ 0.8656548858 0.7040715218 0.8369328976
+ 0.8662387133 0.7051573992 0.8375086188
+ 0.8668196201 0.7062337995 0.8380817771
+ 0.8674005866 0.7073091269 0.8386549950
+ 0.8679792285 0.7083843946 0.8392254114
+ 0.8685559034 0.7094525099 0.8397920728
+ 0.8691325784 0.7105184197 0.8403587937
+ 0.8697057962 0.7115843296 0.8409234285
+ 0.8702744246 0.7126430273 0.8414832950
+ 0.8708429933 0.7136971951 0.8420432806
+ 0.8714082241 0.7147514820 0.8426018953
+ 0.8719649911 0.7158018947 0.8431546092
+ 0.8725218773 0.7168475986 0.8437072039
+ 0.8730772734 0.7178933024 0.8442596197
+ 0.8736236095 0.7189357281 0.8448042274
+ 0.8741698265 0.7199681997 0.8453487754
+ 0.8747161031 0.7210006714 0.8458935022
+ 0.8752585053 0.7220329046 0.8464329243
+ 0.8758007288 0.7230560184 0.8469712138
+ 0.8763428926 0.7240790725 0.8475095034
+ 0.8768798113 0.7251021862 0.8480458260
+ 0.8774148822 0.7261161804 0.8485807776
+ 0.8779498935 0.7271276116 0.8491157293
+ 0.8784800172 0.7281389832 0.8496479988
+ 0.8790047765 0.7291454077 0.8501759768
+ 0.8795297146 0.7301467061 0.8507040143
+ 0.8800523281 0.7311478853 0.8512308002
+ 0.8805670738 0.7321473956 0.8517482877
+ 0.8810818791 0.7331386805 0.8522657752
+ 0.8815966845 0.7341300249 0.8527832031
+ 0.8821054101 0.7351213098 0.8532953858
+ 0.8826135993 0.7361055017 0.8538061976
+ 0.8831217885 0.7370883822 0.8543171287
+ 0.8836262226 0.7380713820 0.8548266292
+ 0.8841279745 0.7390490174 0.8553346992
+ 0.8846297860 0.7400209904 0.8558428288
+ 0.8851295710 0.7409930229 0.8563500047
+ 0.8856232762 0.7419641018 0.8568516970
+ 0.8861169815 0.7429267764 0.8573533893
+ 0.8866106868 0.7438895106 0.8578552008
+ 0.8870999217 0.7448523045 0.8583500981
+ 0.8875883818 0.7458072901 0.8588429093
+ 0.8880769014 0.7467586994 0.8593356013
+ 0.8885614872 0.7477099895 0.8598263264
+ 0.8890416026 0.7486596704 0.8603129983
+ 0.8895217776 0.7496036887 0.8607997894
+ 0.8900015950 0.7505478263 0.8612865806
+ 0.8904702067 0.7514917850 0.8617706895
+ 0.8909388185 0.7524288297 0.8622545004
+ 0.8914073706 0.7533634901 0.8627383709
+ 0.8918703794 0.7542982101 0.8632197976
+ 0.8923289776 0.7552309036 0.8636981845
+ 0.8927875757 0.7561575770 0.8641765714
+ 0.8932459950 0.7570843101 0.8646550179
+ 0.8937010765 0.7580109239 0.8651264906
+ 0.8941562176 0.7589309812 0.8655977249
+ 0.8946112990 0.7598484159 0.8660690188
+ 0.8950629830 0.7607657909 0.8665379882
+ 0.8955119848 0.7616819739 0.8670043945
+ 0.8959609866 0.7625917792 0.8674706817
+ 0.8964099884 0.7635017037 0.8679370880
+ 0.8968498707 0.7644115090 0.8683987260
+ 0.8972896934 0.7653169036 0.8688598871
+ 0.8977295756 0.7662187219 0.8693211079
+ 0.8981648088 0.7671204805 0.8697806001
+ 0.8985937238 0.7680222988 0.8702368736
+ 0.8990225792 0.7689167857 0.8706930876
+ 0.8994513750 0.7698106766 0.8711493015
+ 0.8998739719 0.7707046270 0.8716015220
+ 0.9002950788 0.7715961933 0.8720520139
+ 0.9007161260 0.7724819183 0.8725025058
+ 0.9011359811 0.7733675241 0.8729526997
+ 0.9015498161 0.7742530704 0.8733996153
+ 0.9019635916 0.7751324177 0.8738464713
+ 0.9023774266 0.7760072947 0.8742935061
+ 0.9027864933 0.7768821716 0.8747376800
+ 0.9031909108 0.7777572274 0.8751780987
+ 0.9035953283 0.7786241174 0.8756185174
+ 0.9039996862 0.7794898748 0.8760588169
+ 0.9043973088 0.7803558111 0.8764961958
+ 0.9047932029 0.7812201977 0.8769323230
+ 0.9051890969 0.7820760012 0.8773683906
+ 0.9055845737 0.7829318047 0.8778045177
+ 0.9059756994 0.7837876081 0.8782365918
+ 0.9063668251 0.7846404910 0.8786684871
+ 0.9067577720 0.7854884267 0.8791003823
+ 0.9071465731 0.7863361835 0.8795318007
+ 0.9075301886 0.7871841192 0.8799616098
+ 0.9079139233 0.7880274057 0.8803914189
+ 0.9082974792 0.7888671756 0.8808211088
+ 0.9086759090 0.7897068858 0.8812487721
+ 0.9090495110 0.7905467153 0.8816735744
+ 0.9094231129 0.7913808823 0.8820983171
+ 0.9097967148 0.7922129035 0.8825231194
+ 0.9101623893 0.7930449247 0.8829430938
+ 0.9105246067 0.7938770056 0.8833600283
+ 0.9108868241 0.7947024107 0.8837769032
+ 0.9112489223 0.7955265045 0.8841937780
+ 0.9116070271 0.7963507175 0.8846076131
+ 0.9119641185 0.7971748710 0.8850203753
+ 0.9123213291 0.7979897261 0.8854331970
+ 0.9126784801 0.7988039255 0.8858460188
+ 0.9130293131 0.7996181846 0.8862584829
+ 0.9133797288 0.8004323244 0.8866708279
+ 0.9137300849 0.8012365103 0.8870831728
+ 0.9140803218 0.8020406961 0.8874955773
+ 0.9144240022 0.8028448224 0.8879050016
+ 0.9147678018 0.8036485910 0.8883141279
+ 0.9151114821 0.8044434786 0.8887231946
+ 0.9154546857 0.8052384853 0.8891323209
+ 0.9157909155 0.8060333729 0.8895354867
+ 0.9161270857 0.8068280220 0.8899384737
+ 0.9164631963 0.8076159954 0.8903415799
+ 0.9167991281 0.8084039092 0.8907446265
+ 0.9171310067 0.8091918826 0.8911405206
+ 0.9174628854 0.8099797964 0.8915362954
+ 0.9177948236 0.8107593060 0.8919320703
+ 0.9181262851 0.8115388155 0.8923279047
+ 0.9184517860 0.8123183250 0.8927236199
+ 0.9187772870 0.8130977750 0.8931193948
+ 0.9191027880 0.8138713241 0.8935151100
+ 0.9194281101 0.8146445751 0.8939108253
+ 0.9197450280 0.8154178262 0.8943054080
+ 0.9200618863 0.8161910176 0.8946998715
+ 0.9203788042 0.8169561028 0.8950942755
+ 0.9206957221 0.8177195787 0.8954887986
+ 0.9210032225 0.8184831738 0.8958798051
+ 0.9213100076 0.8192468286 0.8962702751
+ 0.9216167927 0.8200044036 0.8966606855
+ 0.9219235778 0.8207594752 0.8970510960
+ 0.9222257137 0.8215147257 0.8974366188
+ 0.9225267172 0.8222697973 0.8978202939
+ 0.9228277206 0.8230199218 0.8982040286
+ 0.9231287837 0.8237658143 0.8985875845
+ 0.9234266877 0.8245115876 0.8989667892
+ 0.9237229824 0.8252574205 0.8993425965
+ 0.9240192771 0.8260008097 0.8997182846
+ 0.9243155718 0.8267393112 0.9000940919
+ 0.9246088266 0.8274778128 0.9004687071
+ 0.9248985052 0.8282163143 0.9008412957
+ 0.9251881242 0.8289538026 0.9012138844
+ 0.9254776835 0.8296815753 0.9015864730
+ 0.9257658720 0.8304092884 0.9019587040
+ 0.9260491729 0.8311371207 0.9023287296
+ 0.9263325930 0.8318648934 0.9026985765
+ 0.9266158938 0.8325855732 0.9030684829
+ 0.9268993139 0.8333047032 0.9034383893
+ 0.9271755219 0.8340237737 0.9038041234
+ 0.9274516106 0.8347429037 0.9041693807
+ 0.9277275801 0.8354570270 0.9045346975
+ 0.9280037284 0.8361662030 0.9048998952
+ 0.9282758236 0.8368754983 0.9052616954
+ 0.9285460711 0.8375847936 0.9056211710
+ 0.9288163185 0.8382927775 0.9059805870
+ 0.9290866256 0.8389946818 0.9063401222
+ 0.9293550253 0.8396965861 0.9066985846
+ 0.9296200871 0.8403984904 0.9070546031
+ 0.9298850894 0.8411002755 0.9074106216
+ 0.9301502109 0.8417940140 0.9077665210
+ 0.9304152131 0.8424854279 0.9081224799
+ 0.9306733012 0.8431769013 0.9084752798
+ 0.9309315085 0.8438683152 0.9088277817
+ 0.9311895967 0.8445565104 0.9091802239
+ 0.9314476848 0.8452389836 0.9095327258
+ 0.9317021966 0.8459215164 0.9098836184
+ 0.9319543242 0.8466041088 0.9102330208
+ 0.9322063923 0.8472865820 0.9105823040
+ 0.9324585199 0.8479604125 0.9109317064
+ 0.9327095151 0.8486334085 0.9112808108
+ 0.9329549074 0.8493062854 0.9116259813
+ 0.9332001805 0.8499792814 0.9119712710
+ 0.9334455132 0.8506484032 0.9123165011
+ 0.9336907864 0.8513122201 0.9126616716
+ 0.9339326024 0.8519759774 0.9130048156
+ 0.9341726899 0.8526396751 0.9133464098
+ 0.9344127178 0.8533034921 0.9136881232
+ 0.9346528053 0.8539575934 0.9140297771
+ 0.9348924756 0.8546106219 0.9143710732
+ 0.9351304173 0.8552635908 0.9147090912
+ 0.9353682995 0.8559166193 0.9150471091
+ 0.9356061816 0.8565670252 0.9153851271
+ 0.9358440042 0.8572118878 0.9157230854
+ 0.9360798001 0.8578568101 0.9160578847
+ 0.9363142848 0.8585017920 0.9163900018
+ 0.9365487099 0.8591467142 0.9167221189
+ 0.9367831945 0.8597838283 0.9170541763
+ 0.9370173812 0.8604179025 0.9173862934
+ 0.9372467995 0.8610520959 0.9177129269
+ 0.9374760985 0.8616862893 0.9180392027
+ 0.9377055168 0.8623197079 0.9183654785
+ 0.9379348159 0.8629447818 0.9186918139
+ 0.9381616116 0.8635699153 0.9190167785
+ 0.9383847117 0.8641949892 0.9193391204
+ 0.9386078119 0.8648201227 0.9196614027
+ 0.9388309717 0.8654413819 0.9199838042
+ 0.9390540719 0.8660572171 0.9203060865
+ 0.9392737150 0.8666728735 0.9206275940
+ 0.9394921064 0.8672885895 0.9209488034
+ 0.9397104979 0.8679043055 0.9212698936
+ 0.9399290085 0.8685140014 0.9215909839
+ 0.9401472211 0.8691210151 0.9219120741
+ 0.9403619170 0.8697279096 0.9222300053
+ 0.9405764937 0.8703348041 0.9225476980
+ 0.9407910705 0.8709418178 0.9228653908
+ 0.9410057068 0.8715392947 0.9231832027
+ 0.9412195086 0.8721361756 0.9234995842
+ 0.9414315224 0.8727331161 0.9238117933
+ 0.9416434169 0.8733298779 0.9241240025
+ 0.9418553114 0.8739258051 0.9244362116
+ 0.9420672059 0.8745154738 0.9247483015
+ 0.9422771931 0.8751052022 0.9250574112
+ 0.9424853921 0.8756948113 0.9253627062
+ 0.9426935911 0.8762844801 0.9256678820
+ 0.9429017901 0.8768712878 0.9259731174
+ 0.9431099892 0.8774514198 0.9262782931
+ 0.9433146119 0.8780314922 0.9265810847
+ 0.9435176253 0.8786115050 0.9268823862
+ 0.9437206984 0.8791915774 0.9271836877
+ 0.9439237118 0.8797677755 0.9274849892
+ 0.9441267252 0.8803384900 0.9277862906
+ 0.9443246126 0.8809092045 0.9280866981
+ 0.9445216060 0.8814799190 0.9283868074
+ 0.9447184801 0.8820505738 0.9286869168
+ 0.9449154735 0.8826171756 0.9289870262
+ 0.9451124072 0.8831797242 0.9292870760
+ 0.9453071952 0.8837422132 0.9295849204
+ 0.9455018044 0.8843047023 0.9298822880
+ 0.9456964731 0.8848671913 0.9301797152
+ 0.9458910823 0.8854259849 0.9304770827
+ 0.9460856915 0.8859816194 0.9307745099
+ 0.9462794065 0.8865371943 0.9310675263
+ 0.9464730024 0.8870928288 0.9313601851
+ 0.9466665983 0.8876484036 0.9316527843
+ 0.9468601942 0.8881986141 0.9319455028
+ 0.9470537901 0.8887439966 0.9322381020
+ 0.9472450018 0.8892894983 0.9325249791
+ 0.9474362731 0.8898350000 0.9328114986
+ 0.9476274848 0.8903805017 0.9330980182
+ 0.9478188157 0.8909212947 0.9333845973
+ 0.9480100870 0.8914574981 0.9336711168
+ 0.9481977224 0.8919935822 0.9339528084
+ 0.9483852983 0.8925297856 0.9342340231
+ 0.9485728741 0.8930659294 0.9345152974
+ 0.9487605095 0.8935987949 0.9347965121
+ 0.9489480853 0.8941270709 0.9350777864
+ 0.9491310716 0.8946554065 0.9353563786
+ 0.9493138194 0.8951836824 0.9356346726
+ 0.9494963884 0.8957120180 0.9359129071
+ 0.9496790767 0.8962380290 0.9361910820
+ 0.9498617053 0.8967580795 0.9364693165
+ 0.9500396848 0.8972783089 0.9367458224
+ 0.9502165914 0.8977984190 0.9370216727
+ 0.9503934979 0.8983185291 0.9372975230
+ 0.9505705237 0.8988376260 0.9375733733
+ 0.9507473707 0.8993477821 0.9378492832
+ 0.9509227872 0.8998581171 0.9381229877
+ 0.9510974288 0.9003683925 0.9383950830
+ 0.9512720704 0.9008787274 0.9386672974
+ 0.9514467120 0.9013890028 0.9389393926
+ 0.9516214132 0.9018915892 0.9392116070
+ 0.9517948031 0.9023934007 0.9394819140
+ 0.9519668818 0.9028952718 0.9397495985
+ 0.9521389008 0.9033970833 0.9400172234
+ 0.9523109794 0.9038988948 0.9402849078
+ 0.9524831176 0.9043961763 0.9405525923
+ 0.9526547790 0.9048910141 0.9408199191
+ 0.9528251886 0.9053859115 0.9410852790
+ 0.9529957175 0.9058806896 0.9413505793
+ 0.9531661868 0.9063755274 0.9416159987
+ 0.9533365965 0.9068669081 0.9418812990
+ 0.9535071254 0.9073519111 0.9421467185
+ 0.9536749721 0.9078369141 0.9424085021
+ 0.9538426995 0.9083219171 0.9426698089
+ 0.9540104866 0.9088069201 0.9429311156
+ 0.9541782141 0.9092918038 0.9431924224
+ 0.9543460011 0.9097663760 0.9434537292
+ 0.9545125961 0.9102410078 0.9437128901
+ 0.9546784759 0.9107155800 0.9439705014
+ 0.9548444748 0.9111902118 0.9442281127
+ 0.9550104141 0.9116647840 0.9444857240
+ 0.9551764131 0.9121345878 0.9447432160
+ 0.9553416967 0.9126017094 0.9449998140
+ 0.9555050135 0.9130687118 0.9452524781
+ 0.9556683898 0.9135357141 0.9455052018
+ 0.9558317065 0.9140027165 0.9457579255
+ 0.9559950233 0.9144682884 0.9460105896
+ 0.9561583996 0.9149281979 0.9462631941
+ 0.9563187957 0.9153881073 0.9465129972
+ 0.9564787745 0.9158478975 0.9467620254
+ 0.9566386938 0.9163078070 0.9470111132
+ 0.9567986727 0.9167675972 0.9472600818
+ 0.9569585919 0.9172213078 0.9475091100
+ 0.9571176767 0.9176725745 0.9477577806
+ 0.9572752714 0.9181237817 0.9480059147
+ 0.9574329257 0.9185751081 0.9482539892
+ 0.9575905800 0.9190263152 0.9485020041
+ 0.9577481747 0.9194753766 0.9487500787
+ 0.9579058290 0.9199153781 0.9489980936
+ 0.9580608010 0.9203554988 0.9492439032
+ 0.9582154751 0.9207956195 0.9494892955
+ 0.9583702087 0.9212356210 0.9497346878
+ 0.9585248828 0.9216756821 0.9499800801
+ 0.9586796165 0.9221099019 0.9502254725
+ 0.9588336945 0.9225407243 0.9504696131
+ 0.9589865208 0.9229714274 0.9507107139
+ 0.9591394067 0.9234021902 0.9509518147
+ 0.9592921734 0.9238328934 0.9511927962
+ 0.9594451189 0.9242635965 0.9514338970
+ 0.9595978856 0.9246863127 0.9516749978
+ 0.9597501755 0.9251089096 0.9519119263
+ 0.9599022865 0.9255316257 0.9521470070
+ 0.9600545168 0.9259542823 0.9523820877
+ 0.9602066278 0.9263768792 0.9526172280
+ 0.9603586793 0.9267967939 0.9528523088
+ 0.9605106115 0.9272115231 0.9530869722
+ 0.9606612921 0.9276261926 0.9533157945
+ 0.9608119726 0.9280409217 0.9535444975
+ 0.9609627128 0.9284554720 0.9537733197
+ 0.9611135125 0.9288702011 0.9540020227
+ 0.9612641931 0.9292793870 0.9542307854
+ 0.9614138007 0.9296854138 0.9544587135
+ 0.9615620971 0.9300913811 0.9546853900
+ 0.9617102742 0.9304975271 0.9549120069
+ 0.9618585706 0.9309034944 0.9551386237
+ 0.9620069265 0.9313095808 0.9553651810
+ 0.9621551037 0.9317073822 0.9555919170
+ 0.9623023272 0.9321041703 0.9558166265
+ 0.9624490738 0.9325010180 0.9560402036
+ 0.9625958204 0.9328979254 0.9562637806
+ 0.9627425075 0.9332947135 0.9564874768
+ 0.9628893137 0.9336907268 0.9567111135
+ 0.9630360007 0.9340782762 0.9569346905
+ 0.9631810784 0.9344660044 0.9571558833
+ 0.9633259177 0.9348536134 0.9573767185
+ 0.9634708166 0.9352412820 0.9575974941
+ 0.9636157155 0.9356290102 0.9578183293
+ 0.9637606144 0.9360147715 0.9580391049
+ 0.9639053941 0.9363946915 0.9582598209
+ 0.9640493989 0.9367746115 0.9584767222
+ 0.9641934037 0.9371545911 0.9586936831
+ 0.9643375278 0.9375345111 0.9589105844
+ 0.9644814730 0.9379143715 0.9591274858
+ 0.9646254778 0.9382917881 0.9593443871
+ 0.9647691846 0.9386643171 0.9595605731
+ 0.9649112821 0.9390369058 0.9597727060
+ 0.9650534987 0.9394093752 0.9599847794
+ 0.9651957154 0.9397819042 0.9601967931
+ 0.9653378725 0.9401543736 0.9604089260
+ 0.9654800296 0.9405236244 0.9606209993
+ 0.9656214714 0.9408878088 0.9608321786
+ 0.9657613039 0.9412518740 0.9610404968
+ 0.9659010172 0.9416161180 0.9612486959
+ 0.9660406709 0.9419801831 0.9614568949
+ 0.9661805034 0.9423443079 0.9616652131
+ 0.9663202167 0.9427043796 0.9618734121
+ 0.9664595127 0.9430581927 0.9620807767
+ 0.9665976763 0.9434120059 0.9622855186
+ 0.9667360187 0.9437658191 0.9624903202
+ 0.9668741822 0.9441195726 0.9626950026
+ 0.9670125246 0.9444733858 0.9628996849
+ 0.9671506882 0.9448243976 0.9631044865
+ 0.9672883153 0.9451701045 0.9633080959
+ 0.9674242139 0.9455156922 0.9635080099
+ 0.9675601125 0.9458613992 0.9637079835
+ 0.9676958919 0.9462071061 0.9639078975
+ 0.9678317904 0.9465526938 0.9641078115
+ 0.9679676890 0.9468963742 0.9643077254
+ 0.9681032896 0.9472342134 0.9645069838
+ 0.9682378173 0.9475718737 0.9647027254
+ 0.9683722854 0.9479095936 0.9648982882
+ 0.9685068130 0.9482473135 0.9650939703
+ 0.9686412811 0.9485850930 0.9652895927
+ 0.9687758088 0.9489220977 0.9654852748
+ 0.9689102173 0.9492530823 0.9656807780
+ 0.9690427184 0.9495840073 0.9658718705
+ 0.9691752791 0.9499149919 0.9660630822
+ 0.9693077803 0.9502459764 0.9662541747
+ 0.9694404006 0.9505769014 0.9664453864
+ 0.9695729017 0.9509078860 0.9666364789
+ 0.9697054029 0.9512314796 0.9668276906
+ 0.9698356986 0.9515542984 0.9670159221
+ 0.9699656963 0.9518771172 0.9672036171
+ 0.9700956941 0.9521998763 0.9673913717
+ 0.9702258110 0.9525226951 0.9675791264
+ 0.9703558087 0.9528455138 0.9677668214
+ 0.9704858065 0.9531627893 0.9679545164
+ 0.9706159830 0.9534772038 0.9681413770
+ 0.9707463980 0.9537916780 0.9683275819
+ 0.9708768129 0.9541060925 0.9685139060
+ 0.9710071087 0.9544205070 0.9687001705
+ 0.9711375237 0.9547349215 0.9688864946
+ 0.9712678790 0.9550464153 0.9690728188
+ 0.9713981152 0.9553524256 0.9692583084
+ 0.9715282917 0.9556583166 0.9694423079
+ 0.9716584086 0.9559643269 0.9696264267
+ 0.9717885256 0.9562702775 0.9698104262
+ 0.9719185829 0.9565762281 0.9699944854
+ 0.9720488191 0.9568821788 0.9701784849
+ 0.9721788168 0.9571802020 0.9703624845
+ 0.9723080993 0.9574782252 0.9705430865
+ 0.9724375010 0.9577761292 0.9707236886
+ 0.9725667834 0.9580740929 0.9709041715
+ 0.9726961255 0.9583721161 0.9710847735
+ 0.9728254080 0.9586700201 0.9712653756
+ 0.9729546905 0.9589635134 0.9714459181
+ 0.9730840921 0.9592537880 0.9716234803
+ 0.9732134938 0.9595441222 0.9717993140
+ 0.9733428955 0.9598343968 0.9719752073
+ 0.9734724164 0.9601246715 0.9721509814
+ 0.9736018181 0.9604150057 0.9723268151
+ 0.9737312198 0.9607043862 0.9725025892
+ 0.9738605022 0.9609869719 0.9726774096
+ 0.9739891887 0.9612696767 0.9728478789
+ 0.9741178751 0.9615523219 0.9730182886
+ 0.9742466211 0.9618350267 0.9731886983
+ 0.9743753076 0.9621176124 0.9733592272
+ 0.9745039940 0.9624003172 0.9735295773
+ 0.9746326804 0.9626781940 0.9737001061
+ 0.9747601748 0.9629530907 0.9738674760
+ 0.9748873115 0.9632279873 0.9740337133
+ 0.9750145078 0.9635028839 0.9742000103
+ 0.9751415849 0.9637778997 0.9743661880
+ 0.9752687216 0.9640527964 0.9745324254
+ 0.9753959179 0.9643273950 0.9746986032
+ 0.9755228162 0.9645949006 0.9748641849
+ 0.9756492972 0.9648625255 0.9750267267
+ 0.9757757187 0.9651299715 0.9751893282
+ 0.9759021997 0.9653975964 0.9753518105
+ 0.9760286212 0.9656651020 0.9755142927
+ 0.9761551023 0.9659326077 0.9756767750
+ 0.9762815237 0.9661971927 0.9758393764
+ 0.9764071703 0.9664574862 0.9760001898
+ 0.9765323997 0.9667177796 0.9761596918
+ 0.9766576290 0.9669780731 0.9763193130
+ 0.9767829180 0.9672384262 0.9764788151
+ 0.9769080877 0.9674987793 0.9766383767
+ 0.9770333171 0.9677590728 0.9767978787
+ 0.9771584868 0.9680131078 0.9769575000
+ 0.9772819877 0.9682648778 0.9771137238
+ 0.9774054885 0.9685167074 0.9772697091
+ 0.9775289297 0.9687684774 0.9774256945
+ 0.9776523709 0.9690203071 0.9775816798
+ 0.9777758121 0.9692721963 0.9777377248
+ 0.9778991938 0.9695239067 0.9778935909
+ 0.9780225158 0.9697673917 0.9780486822
+ 0.9781451225 0.9700108767 0.9782000184
+ 0.9782677889 0.9702544212 0.9783512950
+ 0.9783903956 0.9704979062 0.9785025716
+ 0.9785130024 0.9707413912 0.9786539078
+ 0.9786357284 0.9709848166 0.9788051844
+ 0.9787582755 0.9712265730 0.9789565802
+ 0.9788810015 0.9714620709 0.9791055918
+ 0.9790037870 0.9716976881 0.9792516828
+ 0.9791265130 0.9719331861 0.9793978930
+ 0.9792491794 0.9721686840 0.9795439839
+ 0.9793720245 0.9724041820 0.9796900749
+ 0.9794946909 0.9726397991 0.9798362255
+ 0.9796174765 0.9728724957 0.9799823761
+ 0.9797399044 0.9731004834 0.9801260829
+ 0.9798622727 0.9733284712 0.9802682996
+ 0.9799845815 0.9735565186 0.9804103971
+ 0.9801068902 0.9737845063 0.9805526137
+ 0.9802291989 0.9740126133 0.9806947708
+ 0.9803515077 0.9742406011 0.9808369875
+ 0.9804738164 0.9744648933 0.9809792042
+ 0.9805954099 0.9746851921 0.9811189175
+ 0.9807168245 0.9749054909 0.9812576771
+ 0.9808381200 0.9751256704 0.9813964963
+ 0.9809594750 0.9753460288 0.9815353155
+ 0.9810807705 0.9755662084 0.9816740751
+ 0.9812021852 0.9757865071 0.9818128943
+ 0.9813234806 0.9760035872 0.9819517136
+ 0.9814447761 0.9762178063 0.9820870757
+ 0.9815660119 0.9764320254 0.9822216034
+ 0.9816873074 0.9766461849 0.9823560715
+ 0.9818086028 0.9768604040 0.9824907184
+ 0.9819297791 0.9770746231 0.9826251864
+ 0.9820510745 0.9772887230 0.9827597737
+ 0.9821723104 0.9774991870 0.9828943014
+ 0.9822927713 0.9777060151 0.9830257893
+ 0.9824131727 0.9779127240 0.9831566215
+ 0.9825335145 0.9781193733 0.9832873940
+ 0.9826539159 0.9783260822 0.9834182262
+ 0.9827741981 0.9785327911 0.9835489988
+ 0.9828945994 0.9787396193 0.9836797714
+ 0.9830150008 0.9789426923 0.9838104844
+ 0.9831339717 0.9791409969 0.9839380980
+ 0.9832527041 0.9793391824 0.9840646982
+ 0.9833713174 0.9795374274 0.9841911793
+ 0.9834899902 0.9797356725 0.9843177795
+ 0.9836087227 0.9799339175 0.9844443798
+ 0.9837273955 0.9801321030 0.9845709205
+ 0.9838461280 0.9803280830 0.9846975207
+ 0.9839642048 0.9805182219 0.9848210216
+ 0.9840821028 0.9807084203 0.9849429727
+ 0.9841998816 0.9808984995 0.9850649834
+ 0.9843177795 0.9810886979 0.9851869941
+ 0.9844356775 0.9812787771 0.9853090048
+ 0.9845535755 0.9814689755 0.9854310155
+ 0.9846714139 0.9816585183 0.9855529070
+ 0.9847885966 0.9818410873 0.9856733084
+ 0.9849051237 0.9820237756 0.9857919216
+ 0.9850217104 0.9822065234 0.9859105945
+ 0.9851381779 0.9823890924 0.9860293269
+ 0.9852548242 0.9825717807 0.9861479998
+ 0.9853712916 0.9827544093 0.9862666130
+ 0.9854878783 0.9829370975 0.9863852859
+ 0.9856039286 0.9831125140 0.9865033031
+ 0.9857186079 0.9832866192 0.9866192937
+ 0.9858332872 0.9834606051 0.9867352843
+ 0.9859480262 0.9836345911 0.9868512750
+ 0.9860628247 0.9838085771 0.9869673252
+ 0.9861775041 0.9839826226 0.9870833158
+ 0.9862921834 0.9841566086 0.9871993065
+ 0.9864069223 0.9843258858 0.9873152971
+ 0.9865176082 0.9844909906 0.9874280095
+ 0.9866282940 0.9846559763 0.9875406027
+ 0.9867389202 0.9848210812 0.9876531959
+ 0.9868496060 0.9849861264 0.9877659082
+ 0.9869602919 0.9851511717 0.9878785014
+ 0.9870709777 0.9853162169 0.9879910946
+ 0.9871817231 0.9854801893 0.9881036878
+ 0.9872913957 0.9856383204 0.9882147908
+ 0.9874005914 0.9857963920 0.9883249998
+ 0.9875099063 0.9859545231 0.9884350896
+ 0.9876191020 0.9861125946 0.9885452986
+ 0.9877284169 0.9862707257 0.9886553884
+ 0.9878376126 0.9864287972 0.9887655973
+ 0.9879468083 0.9865869284 0.9888756871
+ 0.9880558252 0.9867392778 0.9889851809
+ 0.9881638288 0.9868894815 0.9890925288
+ 0.9882717133 0.9870396852 0.9891998172
+ 0.9883797169 0.9871898890 0.9893071055
+ 0.9884877205 0.9873400927 0.9894143939
+ 0.9885957241 0.9874902964 0.9895216227
+ 0.9887037277 0.9876403809 0.9896289110
+ 0.9888116717 0.9877886772 0.9897361994
+ 0.9889186025 0.9879299998 0.9898411036
+ 0.9890251756 0.9880713820 0.9899451733
+ 0.9891318083 0.9882127047 0.9900494218
+ 0.9892383814 0.9883540869 0.9901534915
+ 0.9893450141 0.9884954095 0.9902576804
+ 0.9894515276 0.9886367917 0.9903618097
+ 0.9895581007 0.9887781143 0.9904659986
+ 0.9896646142 0.9889159203 0.9905695915
+ 0.9897707105 0.9890518188 0.9906715155
+ 0.9898768067 0.9891877174 0.9907733798
+ 0.9899830222 0.9893234968 0.9908754230
+ 0.9900891185 0.9894593954 0.9909772873
+ 0.9901952147 0.9895952940 0.9910792112
+ 0.9903013110 0.9897311926 0.9911811948
+ 0.9904074073 0.9898669720 0.9912831187
+ 0.9905129075 0.9899997115 0.9913834929
+ 0.9906179905 0.9901322722 0.9914830923
+ 0.9907230139 0.9902650118 0.9915826917
+ 0.9908280969 0.9903976917 0.9916822910
+ 0.9909331799 0.9905303121 0.9917818904
+ 0.9910383224 0.9906629920 0.9918814898
+ 0.9911434054 0.9907956719 0.9919810891
+ 0.9912484288 0.9909266829 0.9920806885
+ 0.9913520217 0.9910547137 0.9921786189
+ 0.9914554954 0.9911826849 0.9922763705
+ 0.9915590286 0.9913107157 0.9923741817
+ 0.9916625023 0.9914388061 0.9924721122
+ 0.9917659760 0.9915667772 0.9925699234
+ 0.9918695092 0.9916948080 0.9926676750
+ 0.9919729829 0.9918227792 0.9927656054
+ 0.9920759201 0.9919472933 0.9928627014
+ 0.9921774268 0.9920694232 0.9929581881
+ 0.9922788739 0.9921916127 0.9930536151
+ 0.9923803806 0.9923136830 0.9931489825
+ 0.9924818873 0.9924358726 0.9932444096
+ 0.9925833941 0.9925580025 0.9933397770
+ 0.9926849008 0.9926801920 0.9934352040
+ 0.9927864075 0.9928023219 0.9935305715
+ 0.9928867221 0.9929195046 0.9936246276
+ 0.9929860234 0.9930353165 0.9937170148
+ 0.9930852056 0.9931510091 0.9938094020
+ 0.9931843877 0.9932668209 0.9939017892
+ 0.9932836294 0.9933825731 0.9939941764
+ 0.9933828115 0.9934983850 0.9940866828
+ 0.9934821129 0.9936141968 0.9941791296
+ 0.9935812950 0.9937298894 0.9942715168
+ 0.9936792254 0.9938406944 0.9943618178
+ 0.9937763214 0.9939510822 0.9944508076
+ 0.9938734174 0.9940614104 0.9945397973
+ 0.9939705729 0.9941716790 0.9946289062
+ 0.9940677285 0.9942820072 0.9947178960
+ 0.9941648245 0.9943923950 0.9948070049
+ 0.9942619801 0.9945027232 0.9948959947
+ 0.9943590760 0.9946129918 0.9949849844
+ 0.9944550991 0.9947180152 0.9950715899
+ 0.9945507050 0.9948229194 0.9951571822
+ 0.9946463108 0.9949277043 0.9952427745
+ 0.9947419167 0.9950326085 0.9953284264
+ 0.9948375225 0.9951373935 0.9954140186
+ 0.9949331284 0.9952422976 0.9954996109
+ 0.9950286150 0.9953472018 0.9955852032
+ 0.9951242208 0.9954519868 0.9956707954
+ 0.9952185154 0.9955508113 0.9957543015
+ 0.9953123927 0.9956492782 0.9958369732
+ 0.9954062104 0.9957479239 0.9959197044
+ 0.9955000281 0.9958463907 0.9960023761
+ 0.9955939054 0.9959449172 0.9960849881
+ 0.9956877232 0.9960435033 0.9961677194
+ 0.9957814813 0.9961420298 0.9962503910
+ 0.9958754182 0.9962404966 0.9963331223
+ 0.9959679842 0.9963330030 0.9964141846
+ 0.9960600734 0.9964246750 0.9964945912
+ 0.9961522818 0.9965164065 0.9965748787
+ 0.9962443709 0.9966081977 0.9966552854
+ 0.9963365197 0.9966999292 0.9967356920
+ 0.9964286089 0.9967916012 0.9968159795
+ 0.9965208173 0.9968832731 0.9968963861
+ 0.9966129065 0.9969750047 0.9969767928
+ 0.9967035055 0.9970617890 0.9970558882
+ 0.9967930913 0.9971467853 0.9971340895
+ 0.9968826771 0.9972319007 0.9972122908
+ 0.9969723821 0.9973170161 0.9972904921
+ 0.9970620275 0.9974020123 0.9973688126
+ 0.9971516132 0.9974871278 0.9974470139
+ 0.9972411990 0.9975721240 0.9975252151
+ 0.9973307848 0.9976571798 0.9976034164
+ 0.9974188805 0.9977390170 0.9976804852
+ 0.9975048900 0.9978179932 0.9977560043
+ 0.9975908995 0.9978969097 0.9978315234
+ 0.9976769090 0.9979758263 0.9979069233
+ 0.9977629185 0.9980546832 0.9979823828
+ 0.9978489280 0.9981337190 0.9980579019
+ 0.9979348779 0.9982125759 0.9981334209
+ 0.9980208874 0.9982914925 0.9982088208
+ 0.9981061220 0.9983687997 0.9982838035
+ 0.9981874228 0.9984411001 0.9983559251
+ 0.9982687831 0.9985135198 0.9984279871
+ 0.9983500838 0.9985858202 0.9985002279
+ 0.9984313846 0.9986581802 0.9985722899
+ 0.9985126853 0.9987304807 0.9986444116
+ 0.9985939860 0.9988029003 0.9987164736
+ 0.9986754060 0.9988752007 0.9987885952
+ 0.9987567067 0.9989476204 0.9988607764
+ 0.9988334179 0.9990134835 0.9989299178
+ 0.9989092946 0.9990788102 0.9989984035
+ 0.9989851117 0.9991440773 0.9990668893
+ 0.9990609884 0.9992092848 0.9991354942
+ 0.9991368055 0.9992746115 0.9992039800
+ 0.9992126822 0.9993398786 0.9992725253
+ 0.9992886186 0.9994050860 0.9993410707
+ 0.9993643761 0.9994704127 0.9994096160
+ 0.9994376898 0.9995324016 0.9994766712
+ 0.9995080233 0.9995908141 0.9995421171
+ 0.9995782971 0.9996492863 0.9996075034
+ 0.9996485710 0.9997076988 0.9996728897
+ 0.9997189045 0.9997661710 0.9997382760
+ 0.9997891784 0.9998245835 0.9998037815
+ 0.9998593926 0.9998831153 0.9998692274
+ 0.9999297261 0.9999415278 0.9999346137
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/agfa_agfachrome_rsx2_100.spi1d b/release/datafiles/colormanagement/luts/film_response/agfa_agfachrome_rsx2_100.spi1d
new file mode 100644
index 00000000000..545776f1007
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/agfa_agfachrome_rsx2_100.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0005538157 0.0002576292 0.0005585101
+ 0.0012096640 0.0005333599 0.0011604551
+ 0.0019140980 0.0008360103 0.0018323910
+ 0.0026460199 0.0011740130 0.0025799151
+ 0.0034157911 0.0015541241 0.0033877229
+ 0.0042393408 0.0019793189 0.0042505912
+ 0.0051223529 0.0024463851 0.0051805871
+ 0.0060673542 0.0029475561 0.0061999368
+ 0.0070817620 0.0034730800 0.0073256488
+ 0.0081761600 0.0040138708 0.0085633332
+ 0.0093593132 0.0045639272 0.0099106664
+ 0.0106341401 0.0051191631 0.0113591403
+ 0.0119961500 0.0056801899 0.0129020195
+ 0.0134347901 0.0062479940 0.0145361200
+ 0.0149379000 0.0068263910 0.0162581895
+ 0.0164953694 0.0074195368 0.0180597696
+ 0.0181045309 0.0080307238 0.0199336000
+ 0.0197760705 0.0086633833 0.0218689796
+ 0.0215226207 0.0093178684 0.0238573793
+ 0.0233605802 0.0099947192 0.0258926600
+ 0.0253009591 0.0106952796 0.0279722493
+ 0.0273566395 0.0114182802 0.0300974604
+ 0.0295376405 0.0121626100 0.0322676599
+ 0.0318443291 0.0129287997 0.0344865993
+ 0.0342735499 0.0137156500 0.0367620103
+ 0.0368162692 0.0145225199 0.0390981287
+ 0.0394631997 0.0153492000 0.0414960496
+ 0.0422021896 0.0161942504 0.0439662300
+ 0.0450241007 0.0170577895 0.0465124287
+ 0.0479182489 0.0179391392 0.0491312891
+ 0.0508695506 0.0188368801 0.0518258400
+ 0.0538671017 0.0197515395 0.0545928814
+ 0.0569038987 0.0206836108 0.0574216582
+ 0.0599653386 0.0216330998 0.0603049994
+ 0.0630441532 0.0226011295 0.0632309094
+ 0.0661331788 0.0235872995 0.0661824495
+ 0.0692235529 0.0245907698 0.0691514686
+ 0.0723131001 0.0256121606 0.0721308514
+ 0.0753963515 0.0266514607 0.0751067922
+ 0.0784699991 0.0277084205 0.0780698285
+ 0.0815294310 0.0287822001 0.0810127109
+ 0.0845746398 0.0298725795 0.0839387029
+ 0.0876072496 0.0309803504 0.0868489370
+ 0.0906234607 0.0321053714 0.0897342712
+ 0.0936240926 0.0332451016 0.0925956666
+ 0.0966099873 0.0343989693 0.0954437479
+ 0.0995746925 0.0355678201 0.0982764736
+ 0.1025210023 0.0367507786 0.1010928974
+ 0.1054513976 0.0379455499 0.1038966030
+ 0.1083656028 0.0391518585 0.1066884995
+ 0.1112613007 0.0403695591 0.1094719023
+ 0.1141443029 0.0415982008 0.1122469977
+ 0.1170163006 0.0428373106 0.1150157973
+ 0.1198785976 0.0440876000 0.1177795008
+ 0.1227298006 0.0453483313 0.1205397025
+ 0.1255751997 0.0466196500 0.1232986972
+ 0.1284184009 0.0479020402 0.1260581017
+ 0.1312606931 0.0491929315 0.1288186014
+ 0.1341048926 0.0504931509 0.1315809935
+ 0.1369509995 0.0518033691 0.1343457997
+ 0.1397999972 0.0531228185 0.1371127963
+ 0.1426569968 0.0544515885 0.1398842931
+ 0.1455242038 0.0557879396 0.1426624060
+ 0.1484020054 0.0571304597 0.1454472989
+ 0.1512925029 0.0584798306 0.1482387930
+ 0.1541953981 0.0598362610 0.1510369033
+ 0.1571146995 0.0612012111 0.1538417041
+ 0.1600483954 0.0625731573 0.1566565037
+ 0.1629952043 0.0639522225 0.1594796926
+ 0.1659574062 0.0653370395 0.1623144001
+ 0.1689333022 0.0667286515 0.1651574969
+ 0.1719211042 0.0681272000 0.1680109054
+ 0.1749179959 0.0695317611 0.1708731055
+ 0.1779257059 0.0709433332 0.1737474054
+ 0.1809400022 0.0723603070 0.1766321063
+ 0.1839601994 0.0737829134 0.1795291007
+ 0.1869864017 0.0752107576 0.1824384034
+ 0.1900130957 0.0766445100 0.1853630990
+ 0.1930415034 0.0780834034 0.1883013994
+ 0.1960687935 0.0795266330 0.1912554055
+ 0.1990925074 0.0809739381 0.1942231059
+ 0.2021104991 0.0824264735 0.1972043961
+ 0.2051243931 0.0838834122 0.2002002001
+ 0.2081328928 0.0853442401 0.2032063007
+ 0.2111341059 0.0868088603 0.2062257975
+ 0.2141271979 0.0882768705 0.2092570961
+ 0.2171119004 0.0897474736 0.2122993022
+ 0.2200873941 0.0912210122 0.2153486013
+ 0.2230526060 0.0926979184 0.2184022963
+ 0.2260069996 0.0941769183 0.2214571983
+ 0.2289530039 0.0956579819 0.2245126069
+ 0.2318878025 0.0971412882 0.2275668979
+ 0.2348102033 0.0986268297 0.2306147963
+ 0.2377181053 0.1001135036 0.2336523980
+ 0.2406145036 0.1016011015 0.2366762012
+ 0.2435014993 0.1030898988 0.2396847010
+ 0.2463797927 0.1045792028 0.2426739931
+ 0.2492484003 0.1060694978 0.2456423044
+ 0.2521043122 0.1075616032 0.2485859990
+ 0.2549489141 0.1090551987 0.2515046895
+ 0.2577804029 0.1105502024 0.2543984056
+ 0.2605997920 0.1120468974 0.2572653890
+ 0.2634068131 0.1135445982 0.2601054013
+ 0.2662003040 0.1150436029 0.2629188001
+ 0.2689799964 0.1165440977 0.2657040954
+ 0.2717454135 0.1180453971 0.2684625983
+ 0.2744967043 0.1195472032 0.2711946964
+ 0.2772313952 0.1210499033 0.2738988996
+ 0.2799471915 0.1225532964 0.2765769064
+ 0.2826446891 0.1240585968 0.2792299092
+ 0.2853254974 0.1255660951 0.2818576992
+ 0.2879889011 0.1270741969 0.2844642103
+ 0.2906337082 0.1285829991 0.2870489955
+ 0.2932612002 0.1300923973 0.2896148860
+ 0.2958734035 0.1316034049 0.2921622097
+ 0.2984699905 0.1331169009 0.2946906090
+ 0.3010497093 0.1346320063 0.2972028852
+ 0.3036122024 0.1361477971 0.2996973991
+ 0.3061597049 0.1376651973 0.3021731079
+ 0.3086943924 0.1391835958 0.3046326041
+ 0.3112165928 0.1407034993 0.3070755005
+ 0.3137254119 0.1422256976 0.3095063865
+ 0.3162207901 0.1437488943 0.3119274080
+ 0.3187038004 0.1452739984 0.3143393993
+ 0.3211764991 0.1468010992 0.3167423904
+ 0.3236395121 0.1483293027 0.3191359937
+ 0.3260940909 0.1498585939 0.3215200901
+ 0.3285394907 0.1513891965 0.3238947988
+ 0.3309769928 0.1529217958 0.3262606859
+ 0.3334091902 0.1544554979 0.3286187053
+ 0.3358364105 0.1559904069 0.3309695125
+ 0.3382585049 0.1575258970 0.3333117962
+ 0.3406754136 0.1590621024 0.3356468081
+ 0.3430868983 0.1606000960 0.3379752934
+ 0.3454923034 0.1621384025 0.3402976096
+ 0.3478921950 0.1636777073 0.3426141143
+ 0.3502902091 0.1652178019 0.3449253142
+ 0.3526883125 0.1667584032 0.3472313881
+ 0.3550874889 0.1682990938 0.3495286107
+ 0.3574880064 0.1698389053 0.3518162966
+ 0.3598900139 0.1713789999 0.3540945053
+ 0.3622936904 0.1729196012 0.3563635945
+ 0.3646990955 0.1744605005 0.3586243987
+ 0.3671062887 0.1760009974 0.3608759940
+ 0.3695152998 0.1775424033 0.3631196022
+ 0.3719266951 0.1790847033 0.3653568029
+ 0.3743407130 0.1806277931 0.3675884008
+ 0.3767570853 0.1821713001 0.3698143959
+ 0.3791759014 0.1837140024 0.3720313013
+ 0.3815971911 0.1852564067 0.3742407858
+ 0.3840225041 0.1867990047 0.3764427900
+ 0.3864507079 0.1883427054 0.3786371052
+ 0.3888813853 0.1898857057 0.3808222115
+ 0.3913142085 0.1914276034 0.3829993010
+ 0.3937469125 0.1929681003 0.3851706088
+ 0.3961795866 0.1945082992 0.3873367906
+ 0.3986124098 0.1960480064 0.3894971013
+ 0.4010451138 0.1975871027 0.3916527927
+ 0.4034779072 0.1991253942 0.3938055933
+ 0.4059106112 0.2006641030 0.3959555924
+ 0.4083434045 0.2022033036 0.3980999887
+ 0.4107761085 0.2037439942 0.4002406001
+ 0.4132089019 0.2052841932 0.4023782909
+ 0.4156416953 0.2068233937 0.4045133889
+ 0.4180744886 0.2083608955 0.4066438079
+ 0.4205071926 0.2098989934 0.4087715149
+ 0.4229399860 0.2114374042 0.4108966887
+ 0.4253725111 0.2129762024 0.4130181968
+ 0.4278020859 0.2145155072 0.4151366949
+ 0.4302271903 0.2160546035 0.4172526896
+ 0.4326483905 0.2175924033 0.4193654954
+ 0.4350630045 0.2191300988 0.4214769900
+ 0.4374726117 0.2206678987 0.4235875905
+ 0.4398784041 0.2222069055 0.4256978929
+ 0.4422785044 0.2237454951 0.4278069139
+ 0.4446738958 0.2252838016 0.4299151003
+ 0.4470661879 0.2268211991 0.4320223033
+ 0.4494529963 0.2283589989 0.4341273010
+ 0.4518359900 0.2298974991 0.4362305105
+ 0.4542163014 0.2314366996 0.4383283854
+ 0.4565913081 0.2329763025 0.4404241145
+ 0.4589622915 0.2345169932 0.4425179958
+ 0.4613293111 0.2360569984 0.4446097016
+ 0.4636883140 0.2375967056 0.4467011988
+ 0.4660438001 0.2391356975 0.4487924874
+ 0.4683940113 0.2406754941 0.4508841932
+ 0.4707357883 0.2422166020 0.4529756010
+ 0.4730732143 0.2437583953 0.4550662041
+ 0.4754005075 0.2453003973 0.4571551979
+ 0.4777207971 0.2468425930 0.4592432082
+ 0.4800347984 0.2483848035 0.4613265097
+ 0.4823366106 0.2499269992 0.4634082913
+ 0.4846338928 0.2514702976 0.4654878080
+ 0.4869211912 0.2530143857 0.4675660133
+ 0.4892016053 0.2545599937 0.4696435928
+ 0.4914767146 0.2561056912 0.4717212021
+ 0.4937387109 0.2576513886 0.4737991989
+ 0.4959957898 0.2591978014 0.4758777916
+ 0.4982388020 0.2607448995 0.4779537022
+ 0.5004736185 0.2622939944 0.4800283015
+ 0.5026996136 0.2638441026 0.4820936918
+ 0.5049133897 0.2653951943 0.4841566086
+ 0.5071231127 0.2669464946 0.4862132072
+ 0.5093185902 0.2684977949 0.4882662892
+ 0.5115088224 0.2700498998 0.4903163016
+ 0.5136851072 0.2716039121 0.4923604131
+ 0.5158513188 0.2731583118 0.4944027960
+ 0.5180078149 0.2747133076 0.4964390099
+ 0.5201510191 0.2762692869 0.4984740913
+ 0.5222893953 0.2778258026 0.5005058050
+ 0.5244101286 0.2793847024 0.5025345087
+ 0.5265269279 0.2809442878 0.5045595765
+ 0.5286250114 0.2825047970 0.5065774918
+ 0.5307167768 0.2840653062 0.5085912943
+ 0.5327941179 0.2856262922 0.5105962753
+ 0.5348628163 0.2871873975 0.5125992894
+ 0.5369216204 0.2887484133 0.5145884752
+ 0.5389689207 0.2903096974 0.5165752769
+ 0.5410090089 0.2918717861 0.5185478926
+ 0.5430334806 0.2934342027 0.5205165744
+ 0.5450525880 0.2949968874 0.5224738717
+ 0.5470547080 0.2965593040 0.5244258046
+ 0.5490540862 0.2981210053 0.5263680816
+ 0.5510348082 0.2996825874 0.5283023715
+ 0.5530139804 0.3012439907 0.5302276015
+ 0.5549759865 0.3028059006 0.5321443081
+ 0.5569360852 0.3043687046 0.5340541005
+ 0.5588794947 0.3059312105 0.5359538794
+ 0.5608198047 0.3074932992 0.5378476977
+ 0.5627439022 0.3090555072 0.5397273898
+ 0.5646646023 0.3106175959 0.5416002274
+ 0.5665714145 0.3121803999 0.5434591770
+ 0.5684738755 0.3137443066 0.5453127027
+ 0.5703607798 0.3153086901 0.5471491814
+ 0.5722435713 0.3168740869 0.5489794016
+ 0.5741115808 0.3184395134 0.5507919192
+ 0.5759764910 0.3200049996 0.5525978208
+ 0.5778291225 0.3215703964 0.5543872118
+ 0.5796784163 0.3231351078 0.5561701059
+ 0.5815119147 0.3246999085 0.5579361916
+ 0.5833426714 0.3262651861 0.5596947074
+ 0.5851539969 0.3278304935 0.5614392757
+ 0.5869635940 0.3293960094 0.5631760955
+ 0.5887479186 0.3309614956 0.5649011731
+ 0.5905321836 0.3325259984 0.5666179061
+ 0.5922917128 0.3340902925 0.5683240891
+ 0.5940505266 0.3356544077 0.5700199008
+ 0.5957903862 0.3372184038 0.5717071891
+ 0.5975276232 0.3387834132 0.5733817816
+ 0.5992469788 0.3403491974 0.5750491023
+ 0.6009606719 0.3419148922 0.5766983032
+ 0.6026608944 0.3434804976 0.5783439875
+ 0.6043530107 0.3450458050 0.5799701810
+ 0.6060341001 0.3466094136 0.5815963149
+ 0.6077030897 0.3481729925 0.5831990242
+ 0.6093657017 0.3497354984 0.5848017931
+ 0.6110138893 0.3512978852 0.5863847136
+ 0.6126598120 0.3528620899 0.5879638195
+ 0.6142886281 0.3544270992 0.5895280838
+ 0.6159173846 0.3559925854 0.5910843015
+ 0.6175265908 0.3575589955 0.5926306248
+ 0.6191338897 0.3591251969 0.5941641927
+ 0.6207273006 0.3606910110 0.5956931114
+ 0.6223142743 0.3622567058 0.5972054005
+ 0.6238920093 0.3638209105 0.5987178087
+ 0.6254580021 0.3653847873 0.6002131104
+ 0.6270201802 0.3669480979 0.6017081141
+ 0.6285654902 0.3685106933 0.6031907797
+ 0.6301108003 0.3700729907 0.6046687961
+ 0.6316359043 0.3716341853 0.6061378717
+ 0.6331589222 0.3731954098 0.6075956225
+ 0.6346688867 0.3747552931 0.6090502143
+ 0.6361703277 0.3763149977 0.6104860902
+ 0.6376655102 0.3778744936 0.6119219065
+ 0.6391450763 0.3794336915 0.6133409142
+ 0.6406247020 0.3809930086 0.6147564054
+ 0.6420868039 0.3825530112 0.6161623001
+ 0.6435478926 0.3841128945 0.6175583005
+ 0.6449993253 0.3856733143 0.6189519763
+ 0.6464440227 0.3872339129 0.6203303933
+ 0.6478844881 0.3887940943 0.6217089295
+ 0.6493095756 0.3903535903 0.6230769157
+ 0.6507347226 0.3919129968 0.6244416833
+ 0.6521434188 0.3934705853 0.6258000135
+ 0.6535484791 0.3950277865 0.6271470785
+ 0.6549462080 0.3965846002 0.6284943223
+ 0.6563327909 0.3981403112 0.6298246980
+ 0.6577193737 0.3996961117 0.6311542988
+ 0.6590902805 0.4012506902 0.6324747205
+ 0.6604607105 0.4028050900 0.6337866187
+ 0.6618214250 0.4043591022 0.6350975037
+ 0.6631729007 0.4059123993 0.6363947988
+ 0.6645237207 0.4074656069 0.6376919746
+ 0.6658543944 0.4090178013 0.6389808059
+ 0.6671850085 0.4105696082 0.6402636170
+ 0.6685047150 0.4121212065 0.6415452957
+ 0.6698150039 0.4136717916 0.6428160071
+ 0.6711249948 0.4152224064 0.6440867186
+ 0.6724179983 0.4167717099 0.6453511119
+ 0.6737111211 0.4183202982 0.6466106772
+ 0.6749945283 0.4198687077 0.6478698850
+ 0.6762676239 0.4214153886 0.6491171122
+ 0.6775407195 0.4229620993 0.6503642201
+ 0.6787930131 0.4245072901 0.6516051292
+ 0.6800435781 0.4260506034 0.6528393030
+ 0.6812877059 0.4275940061 0.6540734768
+ 0.6825190187 0.4291338921 0.6552976966
+ 0.6837502718 0.4306730926 0.6565207243
+ 0.6849684715 0.4322116971 0.6577410102
+ 0.6861820817 0.4337471128 0.6589547992
+ 0.6873937249 0.4352824986 0.6601685882
+ 0.6885895133 0.4368155897 0.6613742113
+ 0.6897851825 0.4383459091 0.6625760198
+ 0.6909723282 0.4398762882 0.6637775898
+ 0.6921495199 0.4414024055 0.6649709940
+ 0.6933267117 0.4429270029 0.6661643982
+ 0.6944912076 0.4444515109 0.6673536897
+ 0.6956524253 0.4459707141 0.6685358882
+ 0.6968116164 0.4474897981 0.6697182059
+ 0.6979551911 0.4490073919 0.6708937287
+ 0.6990987062 0.4505204856 0.6720660925
+ 0.7002366185 0.4520334899 0.6732385159
+ 0.7013661265 0.4535439909 0.6744014025
+ 0.7024955750 0.4550516903 0.6755638719
+ 0.7036141753 0.4565593898 0.6767243743
+ 0.7047271729 0.4580627978 0.6778780818
+ 0.7058401704 0.4595640898 0.6790319085
+ 0.7069379091 0.4610654116 0.6801804900
+ 0.7080339789 0.4625608921 0.6813232899
+ 0.7091283202 0.4640552998 0.6824662089
+ 0.7102094293 0.4655497074 0.6836034060
+ 0.7112904191 0.4670377970 0.6847382784
+ 0.7123653293 0.4685258865 0.6858730912
+ 0.7134271860 0.4700129926 0.6869965792
+ 0.7144889832 0.4714944065 0.6881188154
+ 0.7155439258 0.4729757905 0.6892403960
+ 0.7165915966 0.4744558036 0.6903538108
+ 0.7176393867 0.4759314060 0.6914672256
+ 0.7186779976 0.4774070978 0.6925780177
+ 0.7197117209 0.4788806140 0.6936802268
+ 0.7207453847 0.4803498089 0.6947823763
+ 0.7217658758 0.4818190932 0.6958813071
+ 0.7227824926 0.4832853973 0.6969739795
+ 0.7237992287 0.4847474098 0.6980667114
+ 0.7248027921 0.4862093031 0.6991550922
+ 0.7258046269 0.4876680970 0.7002385855
+ 0.7268064022 0.4891225100 0.7013220787
+ 0.7277902961 0.4905770123 0.7024012804
+ 0.7287734151 0.4920283854 0.7034770250
+ 0.7297564149 0.4934760034 0.7045525908
+ 0.7307261825 0.4949235916 0.7056220770
+ 0.7316960096 0.4963681996 0.7066873908
+ 0.7326653004 0.4978089035 0.7077527046
+ 0.7336220741 0.4992494881 0.7088124752
+ 0.7345790267 0.5006874204 0.7098689079
+ 0.7355352044 0.5021209121 0.7109252810
+ 0.7364767194 0.5035544038 0.7119749784
+ 0.7374181151 0.5049852133 0.7130206823
+ 0.7383592725 0.5064104795 0.7140665054
+ 0.7392876148 0.5078356862 0.7151080966
+ 0.7402158976 0.5092589259 0.7161473036
+ 0.7411442995 0.5106753111 0.7171863914
+ 0.7420564294 0.5120915771 0.7182205915
+ 0.7429682016 0.5135068893 0.7192509770
+ 0.7438799143 0.5149142742 0.7202814221
+ 0.7447810173 0.5163217187 0.7213069797
+ 0.7456809878 0.5177291036 0.7223277092
+ 0.7465808988 0.5191293955 0.7233483791
+ 0.7474709153 0.5205295086 0.7243651152
+ 0.7483584285 0.5219296217 0.7253757119
+ 0.7492460012 0.5233250260 0.7263864279
+ 0.7501245141 0.5247194171 0.7273939848
+ 0.7509989738 0.5261136889 0.7283943295
+ 0.7518733740 0.5275031924 0.7293944955
+ 0.7527413964 0.5288894773 0.7303934097
+ 0.7536038756 0.5302758813 0.7313838005
+ 0.7544664145 0.5316587090 0.7323741913
+ 0.7553241849 0.5330361724 0.7333645821
+ 0.7561736703 0.5344135761 0.7343451977
+ 0.7570232749 0.5357897282 0.7353253961
+ 0.7578713298 0.5371581912 0.7363057137
+ 0.7587116957 0.5385265946 0.7372794151
+ 0.7595521212 0.5398949981 0.7382512093
+ 0.7603924870 0.5412554741 0.7392228842
+ 0.7612221837 0.5426148176 0.7401890755
+ 0.7620512247 0.5439741015 0.7411506772
+ 0.7628800869 0.5453277230 0.7421122789
+ 0.7637022138 0.5466768742 0.7430707216
+ 0.7645211220 0.5480260849 0.7440214753
+ 0.7653400898 0.5493733883 0.7449724078
+ 0.7661545873 0.5507144928 0.7459229827
+ 0.7669628859 0.5520555973 0.7468630075
+ 0.7677711844 0.5533967018 0.7478029132
+ 0.7685785890 0.5547322035 0.7487428784
+ 0.7693775296 0.5560668111 0.7496752143
+ 0.7701764107 0.5574014783 0.7506042719
+ 0.7709752917 0.5587329865 0.7515335083
+ 0.7717691064 0.5600612760 0.7524588108
+ 0.7725613713 0.5613896251 0.7533779740
+ 0.7733535767 0.5627173781 0.7542970777
+ 0.7741429806 0.5640394092 0.7552161217
+ 0.7749279737 0.5653614998 0.7561244965
+ 0.7757130265 0.5666834712 0.7570329905
+ 0.7764979005 0.5680016279 0.7579414248
+ 0.7772737145 0.5693175197 0.7588419914
+ 0.7780495286 0.5706332922 0.7597380877
+ 0.7788252831 0.5719478130 0.7606341243
+ 0.7795972228 0.5732557178 0.7615277767
+ 0.7803664207 0.5745636225 0.7624130845
+ 0.7811354995 0.5758715272 0.7632983923
+ 0.7819035053 0.5771726966 0.7641837001
+ 0.7826650143 0.5784705877 0.7650598884
+ 0.7834265232 0.5797685981 0.7659333944
+ 0.7841879725 0.5810651779 0.7668067813
+ 0.7849435806 0.5823537111 0.7676774859
+ 0.7856963277 0.5836421847 0.7685415745
+ 0.7864488959 0.5849307179 0.7694056034
+ 0.7872005105 0.5862150788 0.7702696919
+ 0.7879469991 0.5874965787 0.7711244226
+ 0.7886934876 0.5887780190 0.7719767094
+ 0.7894400954 0.5900595188 0.7728291154
+ 0.7901812196 0.5913344026 0.7736784220
+ 0.7909191251 0.5926094055 0.7745192051
+ 0.7916570902 0.5938844085 0.7753601074
+ 0.7923948169 0.5951570272 0.7762010098
+ 0.7931283116 0.5964260101 0.7770338058
+ 0.7938618064 0.5976949930 0.7778633237
+ 0.7945951819 0.5989639759 0.7786927223
+ 0.7953253984 0.6002289057 0.7795209885
+ 0.7960519195 0.6014925241 0.7803397775
+ 0.7967783809 0.6027560830 0.7811586857
+ 0.7975050211 0.6040192842 0.7819775939
+ 0.7982237935 0.6052780151 0.7827903032
+ 0.7989413142 0.6065366864 0.7835965753
+ 0.7996588945 0.6077952981 0.7844029069
+ 0.8003752232 0.6090512276 0.7852091789
+ 0.8010866046 0.6103022099 0.7860053778
+ 0.8017979860 0.6115530729 0.7867997289
+ 0.8025094271 0.6128041148 0.7875940204
+ 0.8032175899 0.6140497923 0.7883868217
+ 0.8039227128 0.6152924895 0.7891716957
+ 0.8046277761 0.6165351868 0.7899566293
+ 0.8053328991 0.6177778244 0.7907415032
+ 0.8060317039 0.6190140843 0.7915207148
+ 0.8067288995 0.6202492118 0.7922930717
+ 0.8074262142 0.6214843988 0.7930656075
+ 0.8081231117 0.6227191091 0.7938380241
+ 0.8088151813 0.6239476204 0.7946025133
+ 0.8095073104 0.6251760125 0.7953637838
+ 0.8101993799 0.6264044046 0.7961249948
+ 0.8108897805 0.6276314855 0.7968863249
+ 0.8115760088 0.6288539171 0.7976366878
+ 0.8122622967 0.6300764084 0.7983863950
+ 0.8129485250 0.6312987804 0.7991361022
+ 0.8136305213 0.6325194240 0.7998843193
+ 0.8143079281 0.6337367296 0.8006227016
+ 0.8149852753 0.6349539161 0.8013610244
+ 0.8156628013 0.6361712217 0.8020994067
+ 0.8163372278 0.6373847723 0.8028339744
+ 0.8170101047 0.6385943294 0.8035594225
+ 0.8176829219 0.6398037076 0.8042848110
+ 0.8183556795 0.6410130858 0.8050101995
+ 0.8190233111 0.6422181129 0.8057312965
+ 0.8196895123 0.6434193850 0.8064466119
+ 0.8203555942 0.6446207166 0.8071619272
+ 0.8210217953 0.6458219290 0.8078771830
+ 0.8216826916 0.6470190883 0.8085857034
+ 0.8223428726 0.6482132077 0.8092882037
+ 0.8230029941 0.6494073272 0.8099907041
+ 0.8236631751 0.6506013870 0.8106932044
+ 0.8243181705 0.6517918706 0.8113890290
+ 0.8249729872 0.6529797912 0.8120803833
+ 0.8256276846 0.6541677117 0.8127716780
+ 0.8262825012 0.6553556919 0.8134629726
+ 0.8269299865 0.6565406919 0.8141471148
+ 0.8275772929 0.6577234864 0.8148270845
+ 0.8282247186 0.6589062214 0.8155071139
+ 0.8288720250 0.6600890160 0.8161870837
+ 0.8295140862 0.6612688899 0.8168601990
+ 0.8301560879 0.6624459028 0.8175293803
+ 0.8307980895 0.6636229157 0.8181986213
+ 0.8314400911 0.6647999287 0.8188679218
+ 0.8320763707 0.6659740210 0.8195297122
+ 0.8327124119 0.6671438217 0.8201869130
+ 0.8333482742 0.6683136821 0.8208439946
+ 0.8339843154 0.6694836020 0.8215011954
+ 0.8346142769 0.6706516147 0.8221533895
+ 0.8352434039 0.6718149185 0.8228014708
+ 0.8358724713 0.6729781032 0.8234496117
+ 0.8365015984 0.6741414070 0.8240976930
+ 0.8371255994 0.6753039956 0.8247407079
+ 0.8377479911 0.6764618754 0.8253772855
+ 0.8383705020 0.6776198149 0.8260139823
+ 0.8389930129 0.6787776947 0.8266506195
+ 0.8396112919 0.6799355149 0.8272842765
+ 0.8402273059 0.6810882092 0.8279114962
+ 0.8408433199 0.6822404265 0.8285385966
+ 0.8414592743 0.6833925843 0.8291658163
+ 0.8420726061 0.6845448017 0.8297916055
+ 0.8426827788 0.6856936216 0.8304092884
+ 0.8432930112 0.6868407726 0.8310269713
+ 0.8439031839 0.6879879832 0.8316445947
+ 0.8445109129 0.6891351938 0.8322622776
+ 0.8451119065 0.6902797818 0.8328717947
+ 0.8457129002 0.6914209127 0.8334808946
+ 0.8463138938 0.6925619245 0.8340898752
+ 0.8469148278 0.6937029958 0.8346989155
+ 0.8475095034 0.6948431730 0.8353011012
+ 0.8481041789 0.6959772110 0.8359006047
+ 0.8486989141 0.6971111894 0.8364999890
+ 0.8492935896 0.6982452273 0.8370993733
+ 0.8498833179 0.6993792057 0.8376960158
+ 0.8504714966 0.7005075812 0.8382890224
+ 0.8510596156 0.7016344070 0.8388819098
+ 0.8516476750 0.7027612925 0.8394749165
+ 0.8522318006 0.7038881183 0.8400666118
+ 0.8528108001 0.7050123215 0.8406503797
+ 0.8533899188 0.7061328888 0.8412342072
+ 0.8539689779 0.7072533965 0.8418179154
+ 0.8545476198 0.7083739042 0.8424016833
+ 0.8551219106 0.7094944119 0.8429775238
+ 0.8556962013 0.7106081247 0.8435510993
+ 0.8562703729 0.7117217183 0.8441246748
+ 0.8568447232 0.7128353715 0.8446984291
+ 0.8574144244 0.7139490843 0.8452690244
+ 0.8579822183 0.7150586843 0.8458353281
+ 0.8585500717 0.7161651254 0.8464015722
+ 0.8591179252 0.7172715068 0.8469678760
+ 0.8596833944 0.7183778286 0.8475341201
+ 0.8602436185 0.7194836736 0.8480933905
+ 0.8608037233 0.7205830812 0.8486527205
+ 0.8613638282 0.7216826081 0.8492119908
+ 0.8619239926 0.7227820158 0.8497712016
+ 0.8624796271 0.7238814235 0.8503255248
+ 0.8630344272 0.7249767780 0.8508757949
+ 0.8635892272 0.7260689139 0.8514261246
+ 0.8641440272 0.7271611094 0.8519762754
+ 0.8646966219 0.7282531857 0.8525258899
+ 0.8652452826 0.7293453217 0.8530645967
+ 0.8657941222 0.7304283977 0.8536034226
+ 0.8663427830 0.7315114737 0.8541421890
+ 0.8668915033 0.7325944901 0.8546810150
+ 0.8674352169 0.7336776257 0.8552160859
+ 0.8679779172 0.7347571850 0.8557479978
+ 0.8685206771 0.7358316183 0.8562799096
+ 0.8690633774 0.7369059920 0.8568118811
+ 0.8696042895 0.7379804254 0.8573437929
+ 0.8701401949 0.7390547991 0.8578673005
+ 0.8706761003 0.7401224971 0.8583906293
+ 0.8712120056 0.7411879897 0.8589140177
+ 0.8717479110 0.7422536016 0.8594372869
+ 0.8722802997 0.7433190942 0.8599570990
+ 0.8728110194 0.7443835735 0.8604711294
+ 0.8733416796 0.7454379797 0.8609851003
+ 0.8738722801 0.7464923263 0.8614990711
+ 0.8744028211 0.7475466728 0.8620131016
+ 0.8749272823 0.7486010790 0.8625208735
+ 0.8754518032 0.7496516109 0.8630263805
+ 0.8759763241 0.7506958246 0.8635318875
+ 0.8765007854 0.7517400980 0.8640373945
+ 0.8770225048 0.7527843118 0.8645426035
+ 0.8775386810 0.7538285851 0.8650417924
+ 0.8780549765 0.7548667789 0.8655411005
+ 0.8785712123 0.7559013963 0.8660402894
+ 0.8790875077 0.7569360733 0.8665394783
+ 0.8796002269 0.7579708099 0.8670362830
+ 0.8801108003 0.7590054870 0.8675283790
+ 0.8806213737 0.7600315213 0.8680204153
+ 0.8811320066 0.7610560060 0.8685125113
+ 0.8816425800 0.7620804906 0.8690046072
+ 0.8821474910 0.7631049156 0.8694908023
+ 0.8826515079 0.7641292214 0.8699728847
+ 0.8831555247 0.7651435733 0.8704550266
+ 0.8836596012 0.7661579251 0.8709372282
+ 0.8841630220 0.7671722770 0.8714193106
+ 0.8846591115 0.7681866288 0.8718963265
+ 0.8851552010 0.7691996098 0.8723719716
+ 0.8856512904 0.7702046037 0.8728476167
+ 0.8861473799 0.7712097168 0.8733233213
+ 0.8866416812 0.7722147703 0.8737990260
+ 0.8871303201 0.7732198238 0.8742687106
+ 0.8876188993 0.7742217779 0.8747382164
+ 0.8881074786 0.7752138972 0.8752077222
+ 0.8885961771 0.7762060761 0.8756772876
+ 0.8890824914 0.7771981955 0.8761461973
+ 0.8895648718 0.7781903744 0.8766090274
+ 0.8900471926 0.7791786194 0.8770719171
+ 0.8905295730 0.7801573277 0.8775346875
+ 0.8910118937 0.7811360955 0.8779975772
+ 0.8914917707 0.7821148038 0.8784590960
+ 0.8919684887 0.7830935121 0.8789139986
+ 0.8924452066 0.7840679288 0.8793689013
+ 0.8929218054 0.7850319743 0.8798238039
+ 0.8933985233 0.7859961987 0.8802787066
+ 0.8938719034 0.7869604230 0.8807321787
+ 0.8943415880 0.7879245877 0.8811805248
+ 0.8948113918 0.7888851762 0.8816288114
+ 0.8952810764 0.7898358107 0.8820770979
+ 0.8957508206 0.7907865047 0.8825255036
+ 0.8962174058 0.7917371988 0.8829724789
+ 0.8966804147 0.7926878929 0.8834149837
+ 0.8971434832 0.7936357856 0.8838574886
+ 0.8976066113 0.7945719957 0.8843001127
+ 0.8980696201 0.7955083251 0.8847426176
+ 0.8985310793 0.7964445949 0.8851838708
+ 0.8989905119 0.7973809242 0.8856199980
+ 0.8994498253 0.7983161807 0.8860560060
+ 0.8999091983 0.7992392778 0.8864920735
+ 0.9003685713 0.8001623750 0.8869280815
+ 0.9008257985 0.8010855913 0.8873633742
+ 0.9012789726 0.8020086884 0.8877922297
+ 0.9017320871 0.8029319048 0.8882209063
+ 0.9021853209 0.8038424253 0.8886497021
+ 0.9026384950 0.8047516942 0.8890783787
+ 0.9030898213 0.8056610227 0.8895071149
+ 0.9035350084 0.8065704107 0.8899301887
+ 0.9039803147 0.8074796796 0.8903532028
+ 0.9044255018 0.8083794117 0.8907762170
+ 0.9048708081 0.8092753291 0.8911991119
+ 0.9053156972 0.8101711869 0.8916221261
+ 0.9057556987 0.8110671043 0.8920407891
+ 0.9061955810 0.8119630218 0.8924584985
+ 0.9066355824 0.8128508925 0.8928763270
+ 0.9070755839 0.8137295842 0.8932939768
+ 0.9075155854 0.8146083951 0.8937116861
+ 0.9079490900 0.8154872060 0.8941258192
+ 0.9083815813 0.8163658977 0.8945375085
+ 0.9088140726 0.8172419071 0.8949491978
+ 0.9092466235 0.8181051016 0.8953608274
+ 0.9096791148 0.8189684153 0.8957725167
+ 0.9101070166 0.8198316097 0.8961812854
+ 0.9105319977 0.8206949234 0.8965846896
+ 0.9109569192 0.8215581179 0.8969882131
+ 0.9113819003 0.8224077821 0.8973916173
+ 0.9118068218 0.8232551813 0.8977950215
+ 0.9122298956 0.8241025209 0.8981981874
+ 0.9126486778 0.8249498010 0.8985965848
+ 0.9130674005 0.8257970810 0.8989951015
+ 0.9134861827 0.8266378045 0.8993936181
+ 0.9139049053 0.8274710178 0.8997920156
+ 0.9143236279 0.8283041716 0.9001904726
+ 0.9147337079 0.8291373849 0.9005855918
+ 0.9151433706 0.8299707174 0.9009795189
+ 0.9155529737 0.8308032155 0.9013733864
+ 0.9159626961 0.8316221237 0.9017671943
+ 0.9163724184 0.8324409723 0.9021611214
+ 0.9167771935 0.8332599998 0.9025527239
+ 0.9171783924 0.8340789080 0.9029397964
+ 0.9175795913 0.8348978758 0.9033269286
+ 0.9179807901 0.8357083797 0.9037140012
+ 0.9183819294 0.8365128040 0.9041010737
+ 0.9187824130 0.8373172879 0.9044882059
+ 0.9191781282 0.8381217718 0.9048687220
+ 0.9195739031 0.8389261961 0.9052485824
+ 0.9199696779 0.8397294283 0.9056286216
+ 0.9203655124 0.8405168056 0.9060084820
+ 0.9207612276 0.8413041234 0.9063884020
+ 0.9211524725 0.8420915008 0.9067658186
+ 0.9215413928 0.8428788185 0.9071398973
+ 0.9219303727 0.8436661959 0.9075140953
+ 0.9223194122 0.8444454074 0.9078881741
+ 0.9227082729 0.8452168703 0.9082623720
+ 0.9230962992 0.8459883928 0.9086365104
+ 0.9234783053 0.8467599750 0.9090055227
+ 0.9238603711 0.8475314975 0.9093741179
+ 0.9242423773 0.8483030796 0.9097427130
+ 0.9246245027 0.8490607738 0.9101111889
+ 0.9250065088 0.8498172760 0.9104797840
+ 0.9253851175 0.8505737185 0.9108464122
+ 0.9257611036 0.8513301015 0.9112095237
+ 0.9261372089 0.8520866036 0.9115725756
+ 0.9265131950 0.8528388739 0.9119356871
+ 0.9268891811 0.8535797000 0.9122989178
+ 0.9272652864 0.8543204069 0.9126620293
+ 0.9276344180 0.8550611734 0.9130206108
+ 0.9280033708 0.8558018804 0.9133777022
+ 0.9283723235 0.8565427065 0.9137349129
+ 0.9287412763 0.8572751880 0.9140920043
+ 0.9291102290 0.8580012918 0.9144490957
+ 0.9294773936 0.8587272763 0.9148054719
+ 0.9298406839 0.8594533801 0.9151548147
+ 0.9302039742 0.8601794839 0.9155040979
+ 0.9305673838 0.8609055877 0.9158533812
+ 0.9309306741 0.8616189957 0.9162026048
+ 0.9312940240 0.8623296022 0.9165518880
+ 0.9316536784 0.8630402088 0.9168993831
+ 0.9320111275 0.8637508750 0.9172441959
+ 0.9323683977 0.8644614816 0.9175890088
+ 0.9327257872 0.8651716709 0.9179338217
+ 0.9330831170 0.8658667207 0.9182785153
+ 0.9334405065 0.8665615916 0.9186233282
+ 0.9337912798 0.8672565818 0.9189655781
+ 0.9341409802 0.8679515123 0.9193063974
+ 0.9344906211 0.8686465025 0.9196472168
+ 0.9348403215 0.8693385124 0.9199880958
+ 0.9351899028 0.8700178266 0.9203289151
+ 0.9355393052 0.8706970811 0.9206697941
+ 0.9358832836 0.8713763952 0.9210057259
+ 0.9362273216 0.8720557094 0.9213408232
+ 0.9365713000 0.8727350235 0.9216758013
+ 0.9369152188 0.8734096289 0.9220108986
+ 0.9372591972 0.8740733862 0.9223458767
+ 0.9376019835 0.8747370839 0.9226809740
+ 0.9379401803 0.8754009008 0.9230101109
+ 0.9382783771 0.8760647178 0.9233391881
+ 0.9386165738 0.8767284155 0.9236683846
+ 0.9389547706 0.8773869276 0.9239975214
+ 0.9392930269 0.8780362010 0.9243265986
+ 0.9396293163 0.8786854148 0.9246553183
+ 0.9399607778 0.8793346882 0.9249799252
+ 0.9402924180 0.8799839020 0.9253045917
+ 0.9406239986 0.8806331754 0.9256293178
+ 0.9409555793 0.8812769055 0.9259539247
+ 0.9412871003 0.8819113970 0.9262785912
+ 0.9416161776 0.8825458288 0.9266026020
+ 0.9419407248 0.8831803203 0.9269232750
+ 0.9422652125 0.8838148117 0.9272438884
+ 0.9425897002 0.8844493032 0.9275646210
+ 0.9429141283 0.8850783110 0.9278851748
+ 0.9432386160 0.8856968284 0.9282059073
+ 0.9435608983 0.8863152862 0.9285259247
+ 0.9438794255 0.8869338036 0.9288429022
+ 0.9441977739 0.8875523210 0.9291598797
+ 0.9445161819 0.8881707191 0.9294769168
+ 0.9448347092 0.8887856007 0.9297938943
+ 0.9451531172 0.8893899918 0.9301108718
+ 0.9454690218 0.8899943829 0.9304273725
+ 0.9457793236 0.8905987740 0.9307404160
+ 0.9460895061 0.8912032247 0.9310532808
+ 0.9463998079 0.8918076158 0.9313663244
+ 0.9467099905 0.8924102783 0.9316793084
+ 0.9470202923 0.8930001259 0.9319922924
+ 0.9473289847 0.8935899734 0.9323049784
+ 0.9476320744 0.8941798210 0.9326118827
+ 0.9479352236 0.8947697282 0.9329187870
+ 0.9482381940 0.8953595161 0.9332256913
+ 0.9485412836 0.8959493041 0.9335324764
+ 0.9488443136 0.8965260983 0.9338393807
+ 0.9491471052 0.8971018195 0.9341462851
+ 0.9494447708 0.8976774812 0.9344497919
+ 0.9497426152 0.8982532024 0.9347528815
+ 0.9500402808 0.8988289833 0.9350559711
+ 0.9503381252 0.8994047046 0.9353591204
+ 0.9506357908 0.8999707103 0.9356622100
+ 0.9509335756 0.9005324244 0.9359652996
+ 0.9512249827 0.9010940790 0.9362673163
+ 0.9515153766 0.9016557932 0.9365687966
+ 0.9518058896 0.9022175074 0.9368702769
+ 0.9520962834 0.9027792215 0.9371718764
+ 0.9523866773 0.9033352137 0.9374734163
+ 0.9526770711 0.9038825035 0.9377748966
+ 0.9529634118 0.9044299126 0.9380748272
+ 0.9532471895 0.9049773216 0.9383726716
+ 0.9535309076 0.9055246711 0.9386705756
+ 0.9538146257 0.9060720801 0.9389684796
+ 0.9540982842 0.9066187143 0.9392663836
+ 0.9543820024 0.9071521163 0.9395642877
+ 0.9546641707 0.9076855183 0.9398614168
+ 0.9549428821 0.9082189202 0.9401535988
+ 0.9552217126 0.9087523222 0.9404457808
+ 0.9555004835 0.9092857242 0.9407380819
+ 0.9557793140 0.9098191261 0.9410303235
+ 0.9560580850 0.9103447795 0.9413226247
+ 0.9563369155 0.9108663797 0.9416148067
+ 0.9566090703 0.9113880992 0.9419016838
+ 0.9568811059 0.9119098186 0.9421873093
+ 0.9571530819 0.9124314785 0.9424728751
+ 0.9574251175 0.9129531980 0.9427586198
+ 0.9576970935 0.9134721160 0.9430441856
+ 0.9579691291 0.9139804244 0.9433298111
+ 0.9582366943 0.9144887924 0.9436146021
+ 0.9585008025 0.9149972200 0.9438980818
+ 0.9587647915 0.9155055285 0.9441816807
+ 0.9590288997 0.9160138965 0.9444652200
+ 0.9592928886 0.9165222049 0.9447486997
+ 0.9595569968 0.9170212150 0.9450322986
+ 0.9598206282 0.9175164104 0.9453157783
+ 0.9600790739 0.9180114865 0.9455965161
+ 0.9603375793 0.9185066223 0.9458770156
+ 0.9605960846 0.9190018177 0.9461575150
+ 0.9608544707 0.9194968939 0.9464380145
+ 0.9611129761 0.9199900031 0.9467185140
+ 0.9613714814 0.9204719067 0.9469990134
+ 0.9616270065 0.9209538102 0.9472776055
+ 0.9618802071 0.9214357138 0.9475535154
+ 0.9621335268 0.9219176173 0.9478294253
+ 0.9623867273 0.9223995209 0.9481052756
+ 0.9626399875 0.9228814244 0.9483813047
+ 0.9628931880 0.9233567119 0.9486572146
+ 0.9631463885 0.9238265157 0.9489331245
+ 0.9633926153 0.9242962003 0.9492051005
+ 0.9636389017 0.9247658849 0.9494764805
+ 0.9638851285 0.9252356887 0.9497479796
+ 0.9641314149 0.9257053733 0.9500194192
+ 0.9643775821 0.9261751771 0.9502907991
+ 0.9646239281 0.9266350865 0.9505621791
+ 0.9648674726 0.9270936847 0.9508329034
+ 0.9651070237 0.9275522232 0.9511013031
+ 0.9653465152 0.9280108213 0.9513697028
+ 0.9655861259 0.9284693003 0.9516382217
+ 0.9658256173 0.9289278984 0.9519066215
+ 0.9660651088 0.9293845296 0.9521750212
+ 0.9663046002 0.9298309088 0.9524434209
+ 0.9665402174 0.9302772880 0.9527102113
+ 0.9667741060 0.9307237267 0.9529756904
+ 0.9670081139 0.9311701059 0.9532412291
+ 0.9672421217 0.9316164851 0.9535068274
+ 0.9674760103 0.9320629239 0.9537723064
+ 0.9677100182 0.9325053096 0.9540377855
+ 0.9679439068 0.9329410195 0.9543033838
+ 0.9681721926 0.9333767891 0.9545660019
+ 0.9684002995 0.9338126183 0.9548282027
+ 0.9686284065 0.9342483282 0.9550904036
+ 0.9688565135 0.9346840978 0.9553526044
+ 0.9690846205 0.9351198077 0.9556146860
+ 0.9693127275 0.9355502129 0.9558768868
+ 0.9695394039 0.9359760880 0.9561389089
+ 0.9697601199 0.9364020228 0.9563990831
+ 0.9699807763 0.9368280172 0.9566591978
+ 0.9702014923 0.9372538924 0.9569193125
+ 0.9704222083 0.9376798272 0.9571794271
+ 0.9706429243 0.9381058216 0.9574394822
+ 0.9708635807 0.9385251999 0.9576995969
+ 0.9710816145 0.9389411807 0.9579588175
+ 0.9712945223 0.9393572211 0.9582151175
+ 0.9715074897 0.9397732019 0.9584714174
+ 0.9717203975 0.9401893020 0.9587277770
+ 0.9719334245 0.9406052828 0.9589840770
+ 0.9721462727 0.9410213232 0.9592403769
+ 0.9723592997 0.9414290190 0.9594966769
+ 0.9725701809 0.9418333769 0.9597517252
+ 0.9727786779 0.9422376752 0.9600039721
+ 0.9729871154 0.9426419735 0.9602563977
+ 0.9731954932 0.9430463910 0.9605087042
+ 0.9734039903 0.9434506893 0.9607610106
+ 0.9736124277 0.9438549876 0.9610133767
+ 0.9738209248 0.9442532063 0.9612656832
+ 0.9740266800 0.9446488023 0.9615169764
+ 0.9742298126 0.9450443983 0.9617664814
+ 0.9744328260 0.9454399943 0.9620159864
+ 0.9746358991 0.9458355904 0.9622653723
+ 0.9748389721 0.9462311864 0.9625148773
+ 0.9750419855 0.9466267824 0.9627643824
+ 0.9752451181 0.9470162988 0.9630138874
+ 0.9754452705 0.9474024177 0.9632629156
+ 0.9756422043 0.9477884769 0.9635112882
+ 0.9758390784 0.9481745958 0.9637596011
+ 0.9760360122 0.9485607743 0.9640079737
+ 0.9762328863 0.9489468932 0.9642562866
+ 0.9764298201 0.9493330121 0.9645047188
+ 0.9766266942 0.9497143030 0.9647529721
+ 0.9768214822 0.9500910044 0.9650006294
+ 0.9770131111 0.9504678249 0.9652460814
+ 0.9772046208 0.9508445859 0.9654915929
+ 0.9773961902 0.9512214065 0.9657371044
+ 0.9775878191 0.9515982270 0.9659826159
+ 0.9777793884 0.9519749284 0.9662281275
+ 0.9779708982 0.9523478746 0.9664735794
+ 0.9781610966 0.9527137876 0.9667181969
+ 0.9783474207 0.9530795813 0.9669579864
+ 0.9785336852 0.9534453750 0.9671977758
+ 0.9787198901 0.9538112879 0.9674376845
+ 0.9789062142 0.9541770816 0.9676774740
+ 0.9790924191 0.9545428753 0.9679173231
+ 0.9792786837 0.9549077153 0.9681571126
+ 0.9794644713 0.9552628994 0.9683969021
+ 0.9796441793 0.9556182027 0.9686303735
+ 0.9798238873 0.9559733868 0.9688637257
+ 0.9800035954 0.9563286901 0.9690970182
+ 0.9801833034 0.9566838741 0.9693303108
+ 0.9803630114 0.9570391774 0.9695636034
+ 0.9805427194 0.9573944807 0.9697968960
+ 0.9807224274 0.9577432275 0.9700301886
+ 0.9808962941 0.9580901861 0.9702622294
+ 0.9810687900 0.9584373236 0.9704936147
+ 0.9812414050 0.9587844014 0.9707251191
+ 0.9814139009 0.9591314793 0.9709565043
+ 0.9815865159 0.9594786167 0.9711880088
+ 0.9817590117 0.9598256946 0.9714193940
+ 0.9819316268 0.9601699710 0.9716508985
+ 0.9821007848 0.9605106115 0.9718813896
+ 0.9822667241 0.9608513117 0.9721106887
+ 0.9824326038 0.9611920118 0.9723399878
+ 0.9825986028 0.9615327120 0.9725692868
+ 0.9827644825 0.9618732929 0.9727985859
+ 0.9829304218 0.9622139931 0.9730278850
+ 0.9830964208 0.9625545144 0.9732571840
+ 0.9832617044 0.9628877044 0.9734864235
+ 0.9834232926 0.9632207751 0.9737125039
+ 0.9835848212 0.9635540247 0.9739385843
+ 0.9837464094 0.9638870955 0.9741647243
+ 0.9839078784 0.9642202258 0.9743908048
+ 0.9840695262 0.9645534158 0.9746168852
+ 0.9842309952 0.9648864865 0.9748430252
+ 0.9843925834 0.9652161002 0.9750691056
+ 0.9845516086 0.9655424953 0.9752932191
+ 0.9847096205 0.9658688903 0.9755160809
+ 0.9848675132 0.9661952853 0.9757388830
+ 0.9850255251 0.9665216804 0.9759618044
+ 0.9851834178 0.9668480754 0.9761847258
+ 0.9853413105 0.9671744704 0.9764075875
+ 0.9854993224 0.9675009251 0.9766303897
+ 0.9856563210 0.9678199291 0.9768530726
+ 0.9858093262 0.9681388736 0.9770743251
+ 0.9859623909 0.9684578776 0.9772955179
+ 0.9861153960 0.9687768817 0.9775167704
+ 0.9862685204 0.9690958858 0.9777380228
+ 0.9864215255 0.9694147706 0.9779592156
+ 0.9865745902 0.9697337747 0.9781805277
+ 0.9867275953 0.9700502753 0.9784017205
+ 0.9868773222 0.9703627229 0.9786214232
+ 0.9870250225 0.9706751704 0.9788399935
+ 0.9871727824 0.9709876180 0.9790586233
+ 0.9873206019 0.9713000059 0.9792770743
+ 0.9874683022 0.9716125131 0.9794957042
+ 0.9876161218 0.9719249010 0.9797142744
+ 0.9877638221 0.9722372890 0.9799329042
+ 0.9879115224 0.9725446105 0.9801514149
+ 0.9880549908 0.9728497267 0.9803667068
+ 0.9881983995 0.9731547832 0.9805818200
+ 0.9883419275 0.9734600186 0.9807968736
+ 0.9884853959 0.9737650752 0.9810119867
+ 0.9886289239 0.9740701914 0.9812270999
+ 0.9887723923 0.9743754268 0.9814422131
+ 0.9889158010 0.9746804833 0.9816573262
+ 0.9890578985 0.9749789238 0.9818714261
+ 0.9891973138 0.9752771854 0.9820829034
+ 0.9893366098 0.9755755067 0.9822943211
+ 0.9894760251 0.9758738279 0.9825057983
+ 0.9896153212 0.9761720896 0.9827172160
+ 0.9897546768 0.9764702916 0.9829286933
+ 0.9898939729 0.9767686129 0.9831401110
+ 0.9900333881 0.9770656824 0.9833515882
+ 0.9901698232 0.9773573279 0.9835612774
+ 0.9903042912 0.9776489139 0.9837695956
+ 0.9904388189 0.9779404998 0.9839779139
+ 0.9905732870 0.9782320857 0.9841861725
+ 0.9907078147 0.9785236716 0.9843944907
+ 0.9908422828 0.9788153172 0.9846028090
+ 0.9909768105 0.9791069031 0.9848111272
+ 0.9911112785 0.9793964028 0.9850193858
+ 0.9912419915 0.9796813726 0.9852252007
+ 0.9913715720 0.9799662828 0.9854300022
+ 0.9915010929 0.9802513123 0.9856348038
+ 0.9916306734 0.9805362821 0.9858396053
+ 0.9917603135 0.9808213115 0.9860445261
+ 0.9918898940 0.9811062813 0.9862493277
+ 0.9920194745 0.9813911915 0.9864541292
+ 0.9921491146 0.9816734791 0.9866588712
+ 0.9922748208 0.9819514751 0.9868602157
+ 0.9923998713 0.9822294712 0.9870607853
+ 0.9925251007 0.9825075269 0.9872614145
+ 0.9926502705 0.9827854037 0.9874619842
+ 0.9927754998 0.9830633998 0.9876626730
+ 0.9929007292 0.9833413959 0.9878633022
+ 0.9930258989 0.9836193919 0.9880638719
+ 0.9931511283 0.9838947058 0.9882645011
+ 0.9932720065 0.9841657877 0.9884613156
+ 0.9933925867 0.9844368100 0.9886577129
+ 0.9935132861 0.9847078919 0.9888541102
+ 0.9936339855 0.9849789739 0.9890506268
+ 0.9937546849 0.9852501154 0.9892470241
+ 0.9938753247 0.9855211973 0.9894434214
+ 0.9939960241 0.9857922196 0.9896398187
+ 0.9941167235 0.9860610962 0.9898362160
+ 0.9942330122 0.9863253832 0.9900293946
+ 0.9943491220 0.9865897298 0.9902222157
+ 0.9944652915 0.9868540168 0.9904149771
+ 0.9945814013 0.9871183038 0.9906079173
+ 0.9946975112 0.9873827100 0.9908006787
+ 0.9948136210 0.9876469970 0.9909934998
+ 0.9949297905 0.9879112840 0.9911863804
+ 0.9950459003 0.9881742001 0.9913792014
+ 0.9951578975 0.9884313941 0.9915676117
+ 0.9952692986 0.9886885881 0.9917551875
+ 0.9953806996 0.9889457822 0.9919428229
+ 0.9954922199 0.9892029762 0.9921303988
+ 0.9956036210 0.9894601703 0.9923179746
+ 0.9957150221 0.9897174239 0.9925056100
+ 0.9958264232 0.9899746180 0.9926931858
+ 0.9959378242 0.9902316928 0.9928808212
+ 0.9960461259 0.9904808998 0.9930642247
+ 0.9961531758 0.9907299876 0.9932457209
+ 0.9962602854 0.9909791946 0.9934272766
+ 0.9963673949 0.9912282825 0.9936087728
+ 0.9964745045 0.9914774895 0.9937903285
+ 0.9965816140 0.9917266965 0.9939718843
+ 0.9966887236 0.9919757843 0.9941533804
+ 0.9967958927 0.9922249913 0.9943349957
+ 0.9969006181 0.9924687147 0.9945136905
+ 0.9970030785 0.9927104712 0.9946895838
+ 0.9971057177 0.9929522276 0.9948654771
+ 0.9972081780 0.9931939840 0.9950413704
+ 0.9973108172 0.9934358001 0.9952173233
+ 0.9974133968 0.9936776161 0.9953930974
+ 0.9975159168 0.9939193726 0.9955689907
+ 0.9976184964 0.9941611886 0.9957448840
+ 0.9977198839 0.9943996072 0.9959198236
+ 0.9978176951 0.9946330786 0.9960914254
+ 0.9979155064 0.9948667288 0.9962630868
+ 0.9980133176 0.9951003194 0.9964346886
+ 0.9981111288 0.9953339100 0.9966062903
+ 0.9982089996 0.9955673814 0.9967778921
+ 0.9983068109 0.9958009720 0.9969494939
+ 0.9984046221 0.9960346222 0.9971210957
+ 0.9985023737 0.9962679744 0.9972926974
+ 0.9985945225 0.9964916110 0.9974582791
+ 0.9986860156 0.9967151880 0.9976230860
+ 0.9987773895 0.9969388843 0.9977878928
+ 0.9988688827 0.9971625209 0.9979526997
+ 0.9989603162 0.9973860979 0.9981175065
+ 0.9990518093 0.9976096749 0.9982821941
+ 0.9991431832 0.9978333116 0.9984470010
+ 0.9992346764 0.9980568886 0.9986118078
+ 0.9993227720 0.9982761145 0.9987711906
+ 0.9994074702 0.9984915853 0.9989247918
+ 0.9994921088 0.9987071157 0.9990783930
+ 0.9995768070 0.9989225864 0.9992319942
+ 0.9996613860 0.9991381168 0.9993855953
+ 0.9997460842 0.9993535280 0.9995391965
+ 0.9998307228 0.9995689988 0.9996927977
+ 0.9999154210 0.9997845292 0.9998463988
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/agfa_agfachrome_rsx2_200.spi1d b/release/datafiles/colormanagement/luts/film_response/agfa_agfachrome_rsx2_200.spi1d
new file mode 100644
index 00000000000..5f1a0e142ac
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/agfa_agfachrome_rsx2_200.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0002336452 0.0003066142 0.0001923408
+ 0.0004746285 0.0006284252 0.0003908366
+ 0.0007228691 0.0009574692 0.0005960183
+ 0.0009798091 0.0012926980 0.0008084249
+ 0.0012458910 0.0016348250 0.0010286780
+ 0.0015215250 0.0019854531 0.0012572890
+ 0.0018074480 0.0023458831 0.0014948760
+ 0.0021044740 0.0027179900 0.0017418840
+ 0.0024123720 0.0031044651 0.0019987100
+ 0.0027316429 0.0035080169 0.0022662929
+ 0.0030628759 0.0039312281 0.0025448580
+ 0.0034068460 0.0043767700 0.0028348130
+ 0.0037631821 0.0048452052 0.0031369999
+ 0.0041319309 0.0053377128 0.0034519250
+ 0.0045133741 0.0058530779 0.0037802891
+ 0.0049079140 0.0063888212 0.0041218149
+ 0.0053149262 0.0069422242 0.0044763028
+ 0.0057351599 0.0075108381 0.0048436122
+ 0.0061681862 0.0080922469 0.0052233832
+ 0.0066139381 0.0086847479 0.0056158421
+ 0.0070730280 0.0092877084 0.0060206670
+ 0.0075457580 0.0099003958 0.0064372532
+ 0.0080318721 0.0105231302 0.0068652900
+ 0.0085307229 0.0111563997 0.0073052440
+ 0.0090426058 0.0118005900 0.0077564488
+ 0.0095678763 0.0124572096 0.0082195234
+ 0.0101060299 0.0131261898 0.0086938078
+ 0.0106565999 0.0138081899 0.0091797709
+ 0.0112196403 0.0145026296 0.0096775433
+ 0.0117950998 0.0152096897 0.0101859104
+ 0.0123830596 0.0159296691 0.0107057104
+ 0.0129827997 0.0166616905 0.0112374704
+ 0.0135938600 0.0174061507 0.0117801595
+ 0.0142163001 0.0181632899 0.0123338196
+ 0.0148505196 0.0189326294 0.0128991101
+ 0.0154959997 0.0197145808 0.0134759704
+ 0.0161525905 0.0205079298 0.0140651399
+ 0.0168197099 0.0213135108 0.0146654900
+ 0.0174975600 0.0221296605 0.0152769703
+ 0.0181858800 0.0229572095 0.0159003101
+ 0.0188853294 0.0237958394 0.0165352002
+ 0.0195957199 0.0246469099 0.0171822291
+ 0.0203166995 0.0255084708 0.0178419799
+ 0.0210479405 0.0263805594 0.0185129102
+ 0.0217893906 0.0272626597 0.0191952903
+ 0.0225410797 0.0281556007 0.0198900104
+ 0.0233031102 0.0290594995 0.0205974299
+ 0.0240752809 0.0299743302 0.0213165600
+ 0.0248574503 0.0308989193 0.0220477208
+ 0.0256489795 0.0318339504 0.0227914508
+ 0.0264505297 0.0327800512 0.0235488601
+ 0.0272613708 0.0337377489 0.0243192408
+ 0.0280819293 0.0347075686 0.0251018200
+ 0.0289116092 0.0356889293 0.0258964691
+ 0.0297506806 0.0366821997 0.0267038904
+ 0.0305987895 0.0376874991 0.0275248494
+ 0.0314561911 0.0387053117 0.0283588003
+ 0.0323230512 0.0397350118 0.0292057395
+ 0.0331984907 0.0407753289 0.0300664101
+ 0.0340828784 0.0418274291 0.0309393499
+ 0.0349764302 0.0428918488 0.0318249315
+ 0.0358787291 0.0439687595 0.0327227190
+ 0.0367900617 0.0450573303 0.0336325206
+ 0.0377106704 0.0461591706 0.0345553607
+ 0.0386387706 0.0472715795 0.0354900099
+ 0.0395760499 0.0483947694 0.0364381485
+ 0.0405212790 0.0495291613 0.0373984985
+ 0.0414749682 0.0506746694 0.0383732207
+ 0.0424371511 0.0518323407 0.0393615104
+ 0.0434069186 0.0530007891 0.0403636508
+ 0.0443847999 0.0541807003 0.0413801111
+ 0.0453707203 0.0553707816 0.0424091816
+ 0.0463633984 0.0565719493 0.0434532799
+ 0.0473654494 0.0577826984 0.0445101783
+ 0.0483737215 0.0590048917 0.0455798395
+ 0.0493897311 0.0602366105 0.0466651618
+ 0.0504129082 0.0614794008 0.0477640294
+ 0.0514423698 0.0627331585 0.0488768108
+ 0.0524802990 0.0639974698 0.0500062406
+ 0.0535254516 0.0652740896 0.0511502102
+ 0.0545772910 0.0665622428 0.0523082986
+ 0.0556361787 0.0678606406 0.0534805804
+ 0.0567024983 0.0691716820 0.0546686798
+ 0.0577750802 0.0704934299 0.0558703691
+ 0.0588535815 0.0718252510 0.0570854694
+ 0.0599400401 0.0731683001 0.0583138093
+ 0.0610331818 0.0745219514 0.0595557392
+ 0.0621325709 0.0758863464 0.0608114190
+ 0.0632396191 0.0772613883 0.0620787703
+ 0.0643534884 0.0786459073 0.0633573383
+ 0.0654745772 0.0800427720 0.0646468624
+ 0.0666032135 0.0814517811 0.0659470782
+ 0.0677386299 0.0828704983 0.0672577098
+ 0.0688809007 0.0843003020 0.0685787722
+ 0.0700303987 0.0857396796 0.0699099898
+ 0.0711864233 0.0871883109 0.0712488964
+ 0.0723488331 0.0886481106 0.0725946799
+ 0.0735196322 0.0901157334 0.0739471167
+ 0.0746975020 0.0915923566 0.0753060281
+ 0.0758822709 0.0930788666 0.0766710714
+ 0.0770741701 0.0945737883 0.0780422911
+ 0.0782730505 0.0960773528 0.0794199184
+ 0.0794789493 0.0975896269 0.0808036402
+ 0.0806913823 0.0991091728 0.0821929798
+ 0.0819104165 0.1006359980 0.0835875571
+ 0.0831365734 0.1021701992 0.0849873573
+ 0.0843702182 0.1037115976 0.0863918066
+ 0.0856113136 0.1052597985 0.0878000185
+ 0.0868599117 0.1068146974 0.0892115831
+ 0.0881158933 0.1083773971 0.0906265825
+ 0.0893787891 0.1099461019 0.0920447111
+ 0.0906486213 0.1115209982 0.0934653208
+ 0.0919253081 0.1131021008 0.0948884189
+ 0.0932083800 0.1146880984 0.0963144898
+ 0.0944980532 0.1162792966 0.0977434963
+ 0.0957952365 0.1178762987 0.0991748795
+ 0.0970996320 0.1194792986 0.1006093025
+ 0.0984100029 0.1210874990 0.1020475999
+ 0.0997272208 0.1226997972 0.1034903973
+ 0.1010518000 0.1243164986 0.1049363986
+ 0.1023814976 0.1259384006 0.1063854992
+ 0.1037181988 0.1275652051 0.1078381985
+ 0.1050620005 0.1291960031 0.1092941016
+ 0.1064110026 0.1308314055 0.1107527018
+ 0.1077655032 0.1324710995 0.1122142971
+ 0.1091263965 0.1341142952 0.1136794984
+ 0.1104935035 0.1357623935 0.1151480004
+ 0.1118659005 0.1374143958 0.1166194007
+ 0.1132436991 0.1390711069 0.1180943996
+ 0.1146290004 0.1407306939 0.1195726022
+ 0.1160207018 0.1423933059 0.1210533977
+ 0.1174174026 0.1440594047 0.1225365996
+ 0.1188201010 0.1457290053 0.1240229011
+ 0.1202287003 0.1474035978 0.1255117059
+ 0.1216425970 0.1490814984 0.1270032972
+ 0.1230617985 0.1507631987 0.1284980029
+ 0.1244878024 0.1524486989 0.1299961060
+ 0.1259191930 0.1541378051 0.1314983070
+ 0.1273557991 0.1558293998 0.1330049038
+ 0.1287976056 0.1575267017 0.1345154941
+ 0.1302458048 0.1592278928 0.1360293031
+ 0.1317003965 0.1609317958 0.1375454962
+ 0.1331606060 0.1626382023 0.1390648037
+ 0.1346260011 0.1643474996 0.1405864060
+ 0.1360958070 0.1660612971 0.1421104968
+ 0.1375721991 0.1677768975 0.1436379999
+ 0.1390544027 0.1694948971 0.1451703012
+ 0.1405413002 0.1712158024 0.1467055976
+ 0.1420325041 0.1729404032 0.1482436061
+ 0.1435298026 0.1746671945 0.1497846991
+ 0.1450331062 0.1763962060 0.1513286978
+ 0.1465408057 0.1781273931 0.1528747976
+ 0.1480524987 0.1798599064 0.1544229984
+ 0.1495707035 0.1815944016 0.1559745967
+ 0.1510937959 0.1833305955 0.1575296074
+ 0.1526214033 0.1850683987 0.1590874940
+ 0.1541541964 0.1868094057 0.1606484950
+ 0.1556929052 0.1885517985 0.1622128040
+ 0.1572359949 0.1902959049 0.1637787968
+ 0.1587835997 0.1920423061 0.1653465927
+ 0.1603381932 0.1937911958 0.1669193059
+ 0.1618963927 0.1955417991 0.1684942991
+ 0.1634581983 0.1972939074 0.1700717062
+ 0.1650260985 0.1990482062 0.1716526002
+ 0.1665998995 0.2008040994 0.1732358932
+ 0.1681773067 0.2025613040 0.1748213023
+ 0.1697590947 0.2043205053 0.1764107943
+ 0.1713462025 0.2060810030 0.1780031025
+ 0.1729367971 0.2078423053 0.1795973927
+ 0.1745319068 0.2096049935 0.1811943948
+ 0.1761319935 0.2113689035 0.1827940941
+ 0.1777352989 0.2131334990 0.1843959987
+ 0.1793437004 0.2148993015 0.1860031039
+ 0.1809576005 0.2166654021 0.1876126975
+ 0.1825744063 0.2184319943 0.1892254949
+ 0.1841952056 0.2201997042 0.1908413023
+ 0.1858201027 0.2219685018 0.1924591959
+ 0.1874478012 0.2237378955 0.1940806955
+ 0.1890821010 0.2255074978 0.1957052946
+ 0.1907189935 0.2272779942 0.1973316073
+ 0.1923578978 0.2290489972 0.1989613026
+ 0.1940028965 0.2308211029 0.2005929053
+ 0.1956506073 0.2325938940 0.2022265941
+ 0.1973026991 0.2343678027 0.2038643956
+ 0.1989585012 0.2361426055 0.2055034935
+ 0.2006161064 0.2379177958 0.2071447968
+ 0.2022790015 0.2396938056 0.2087884992
+ 0.2039445937 0.2414696068 0.2104344964
+ 0.2056134939 0.2432450950 0.2120838016
+ 0.2072867006 0.2450218946 0.2137342989
+ 0.2089617997 0.2467985004 0.2153877020
+ 0.2106418014 0.2485740930 0.2170425951
+ 0.2123246044 0.2503491044 0.2186993957
+ 0.2140112072 0.2521235943 0.2203588933
+ 0.2157005966 0.2538985014 0.2220194936
+ 0.2173911929 0.2556734085 0.2236841023
+ 0.2190874964 0.2574481070 0.2253499031
+ 0.2207852006 0.2592217922 0.2270195931
+ 0.2224867046 0.2609946132 0.2286913991
+ 0.2241905034 0.2627679110 0.2303657979
+ 0.2258961946 0.2645412982 0.2320432961
+ 0.2276054025 0.2663162053 0.2337222993
+ 0.2293156981 0.2680906057 0.2354062945
+ 0.2310317010 0.2698636949 0.2370913029
+ 0.2327484041 0.2716363966 0.2387810051
+ 0.2344674021 0.2734088004 0.2404720038
+ 0.2361883968 0.2751807868 0.2421665043
+ 0.2379122972 0.2769527137 0.2438628972
+ 0.2396381944 0.2787235081 0.2455617040
+ 0.2413652986 0.2804942131 0.2472631931
+ 0.2430955023 0.2822644114 0.2489665002
+ 0.2448267043 0.2840346992 0.2506738007
+ 0.2465613037 0.2858053148 0.2523826063
+ 0.2482964993 0.2875756919 0.2540957928
+ 0.2500359118 0.2893457115 0.2558099031
+ 0.2517758012 0.2911148965 0.2575285137
+ 0.2535183132 0.2928834856 0.2592475116
+ 0.2552621961 0.2946512997 0.2609696984
+ 0.2570098937 0.2964186966 0.2626922131
+ 0.2587589920 0.2981835902 0.2644180059
+ 0.2605102956 0.2999480069 0.2661443055
+ 0.2622630894 0.3017111123 0.2678734958
+ 0.2640174031 0.3034740984 0.2696034908
+ 0.2657730877 0.3052338064 0.2713379860
+ 0.2675299048 0.3069935143 0.2730731964
+ 0.2692880034 0.3087523878 0.2748118937
+ 0.2710470855 0.3105109930 0.2765515149
+ 0.2728081942 0.3122670054 0.2782951891
+ 0.2745707035 0.3140225112 0.2800396085
+ 0.2763350904 0.3157748878 0.2817870975
+ 0.2781007886 0.3175269067 0.2835353911
+ 0.2798672915 0.3192762136 0.2852882147
+ 0.2816343009 0.3210250139 0.2870416045
+ 0.2834017873 0.3227711022 0.2887994945
+ 0.2851698101 0.3245170116 0.2905577123
+ 0.2869389057 0.3262611926 0.2923206985
+ 0.2887091935 0.3280051947 0.2940837145
+ 0.2904804051 0.3297472894 0.2958520949
+ 0.2922525108 0.3314892948 0.2976205945
+ 0.2940253913 0.3332268000 0.2993935049
+ 0.2957994938 0.3349643052 0.3011670113
+ 0.2975736856 0.3366967142 0.3029440939
+ 0.2993479967 0.3384287953 0.3047224879
+ 0.3011221886 0.3401573896 0.3065038025
+ 0.3028964102 0.3418853879 0.3082869947
+ 0.3046706915 0.3436118066 0.3100728095
+ 0.3064466119 0.3453375995 0.3118613958
+ 0.3082225025 0.3470619917 0.3136520088
+ 0.3099983037 0.3487856984 0.3154470026
+ 0.3117741942 0.3505071998 0.3172427118
+ 0.3135501146 0.3522264063 0.3190433085
+ 0.3153258860 0.3539440036 0.3208439052
+ 0.3171015978 0.3556582034 0.3226490021
+ 0.3188770115 0.3573715091 0.3244544864
+ 0.3206518888 0.3590804040 0.3262634873
+ 0.3224261105 0.3607892990 0.3280740976
+ 0.3241997957 0.3624913990 0.3298870027
+ 0.3259718120 0.3641934097 0.3317027092
+ 0.3277438879 0.3658939898 0.3335191905
+ 0.3295131028 0.3675940931 0.3353388011
+ 0.3312822878 0.3692927063 0.3371585011
+ 0.3330504000 0.3709900975 0.3389824033
+ 0.3348180056 0.3726865053 0.3408068120
+ 0.3365843892 0.3743805885 0.3426336944
+ 0.3383488953 0.3760747015 0.3444621861
+ 0.3401131928 0.3777655959 0.3462921977
+ 0.3418753147 0.3794564903 0.3481256962
+ 0.3436372876 0.3811435997 0.3499591947
+ 0.3453963101 0.3828293979 0.3517968059
+ 0.3471544981 0.3845128119 0.3536345959
+ 0.3489103913 0.3861933053 0.3554756045
+ 0.3506639004 0.3878732026 0.3573186994
+ 0.3524166942 0.3895485103 0.3591623902
+ 0.3541651070 0.3912237883 0.3610084951
+ 0.3559136093 0.3928934932 0.3628545105
+ 0.3576560915 0.3945614994 0.3647046089
+ 0.3593969047 0.3962261975 0.3665556014
+ 0.3611347079 0.3978857994 0.3684079945
+ 0.3628677130 0.3995453119 0.3702622950
+ 0.3646006882 0.4011983871 0.3721165955
+ 0.3663268089 0.4028514922 0.3739753067
+ 0.3680528998 0.4045008123 0.3758341074
+ 0.3697755039 0.4061478078 0.3776954114
+ 0.3714954853 0.4077934027 0.3795588911
+ 0.3732145131 0.4094338119 0.3814226985
+ 0.3749260008 0.4110741019 0.3832913041
+ 0.3766376078 0.4127109051 0.3851599097
+ 0.3783437908 0.4143466055 0.3870306909
+ 0.3800471127 0.4159803092 0.3889032900
+ 0.3817487061 0.4176093936 0.3907761872
+ 0.3834415078 0.4192385077 0.3926539123
+ 0.3851343989 0.4208612144 0.3945316970
+ 0.3868206143 0.4224824905 0.3964118063
+ 0.3885033131 0.4241017103 0.3982942104
+ 0.3901846111 0.4257161915 0.4001766145
+ 0.3918552995 0.4273307025 0.4020617008
+ 0.3935258985 0.4289397895 0.4039469957
+ 0.3951900005 0.4305475056 0.4058333039
+ 0.3968490958 0.4321533144 0.4077214003
+ 0.3985081911 0.4337531030 0.4096095860
+ 0.4001541138 0.4353528917 0.4114991128
+ 0.4017998874 0.4369482994 0.4133890867
+ 0.4034416974 0.4385415018 0.4152793884
+ 0.4050774872 0.4401341975 0.4171707928
+ 0.4067131877 0.4417211115 0.4190622866
+ 0.4083409905 0.4433079958 0.4209538102
+ 0.4099667072 0.4448912144 0.4228455126
+ 0.4115909040 0.4464702904 0.4247371852
+ 0.4132077098 0.4480494857 0.4266293049
+ 0.4148243964 0.4496214092 0.4285216033
+ 0.4164358974 0.4511919916 0.4304136932
+ 0.4180422127 0.4527612031 0.4323050082
+ 0.4196484983 0.4543245137 0.4341962934
+ 0.4212470949 0.4558877945 0.4360859990
+ 0.4228439927 0.4574449062 0.4379737973
+ 0.4244396091 0.4589962959 0.4398615062
+ 0.4260253906 0.4605476856 0.4417462945
+ 0.4276112020 0.4620890021 0.4436298907
+ 0.4291928113 0.4636281133 0.4455133975
+ 0.4307680130 0.4651657939 0.4473905861
+ 0.4323433042 0.4666922987 0.4492675066
+ 0.4339112937 0.4682187140 0.4511435032
+ 0.4354755878 0.4697411060 0.4530152977
+ 0.4370399117 0.4712564051 0.4548870921
+ 0.4385950863 0.4727717042 0.4567565024
+ 0.4401490986 0.4742799997 0.4586217105
+ 0.4417021871 0.4757837057 0.4604870081
+ 0.4432457983 0.4772874117 0.4623486996
+ 0.4447894096 0.4787816107 0.4642075896
+ 0.4463303983 0.4802734852 0.4660665095
+ 0.4478640854 0.4817655087 0.4679197073
+ 0.4493978918 0.4832465053 0.4697704017
+ 0.4509268105 0.4847275019 0.4716210961
+ 0.4524492919 0.4862065911 0.4734647870
+ 0.4539718032 0.4876767099 0.4753069878
+ 0.4554879069 0.4891467094 0.4771490991
+ 0.4569990933 0.4906134903 0.4789814949
+ 0.4585103989 0.4920732081 0.4808132052
+ 0.4600146115 0.4935329854 0.4826447070
+ 0.4615156949 0.4949879050 0.4844656885
+ 0.4630168080 0.4964365065 0.4862866998
+ 0.4645102024 0.4978851080 0.4881069064
+ 0.4660013914 0.4993262887 0.4899150133
+ 0.4674926102 0.5007606745 0.4917230010
+ 0.4689762890 0.5021951795 0.4935297966
+ 0.4704585075 0.5036209226 0.4953246117
+ 0.4719407856 0.5050408244 0.4971193969
+ 0.4734140933 0.5064607263 0.4989126027
+ 0.4748862982 0.5078724027 0.5006924868
+ 0.4763585031 0.5092796087 0.5024725199
+ 0.4778222144 0.5106868744 0.5042511225
+ 0.4792849123 0.5120872855 0.5060155988
+ 0.4807476103 0.5134844184 0.5077801943
+ 0.4822027981 0.5148816109 0.5095440149
+ 0.4836570024 0.5162711740 0.5112923980
+ 0.4851112962 0.5176569819 0.5130407214
+ 0.4865578115 0.5190427899 0.5147891045
+ 0.4880031049 0.5204212070 0.5165216923
+ 0.4894483984 0.5217952728 0.5182538033
+ 0.4908877909 0.5231695175 0.5199859738
+ 0.4923256934 0.5245352983 0.5217025876
+ 0.4937636852 0.5258951783 0.5234171748
+ 0.4951958060 0.5272551179 0.5251318216
+ 0.4966256022 0.5286077261 0.5268319845
+ 0.4980554879 0.5299531221 0.5285276771
+ 0.4994794130 0.5312983990 0.5302234888
+ 0.5008996129 0.5326380134 0.5319082141
+ 0.5023198128 0.5339689255 0.5335860848
+ 0.5037351847 0.5352998972 0.5352638960
+ 0.5051453114 0.5366278887 0.5369331837
+ 0.5065554976 0.5379484296 0.5385919213
+ 0.5079630017 0.5392689109 0.5402505994
+ 0.5093650222 0.5405880809 0.5419046879
+ 0.5107669234 0.5418984890 0.5435451269
+ 0.5121678710 0.5432088971 0.5451855063
+ 0.5135623813 0.5445193052 0.5468252897
+ 0.5149568915 0.5458185077 0.5484473109
+ 0.5163514018 0.5471168756 0.5500692725
+ 0.5177388787 0.5484153032 0.5516912937
+ 0.5191257000 0.5497050881 0.5532999039
+ 0.5205125213 0.5509917140 0.5549045801
+ 0.5218951702 0.5522782803 0.5565093756
+ 0.5232759118 0.5535587072 0.5581051707
+ 0.5246565938 0.5548328757 0.5596920252
+ 0.5260347128 0.5561071038 0.5612788200
+ 0.5274087787 0.5573784113 0.5628618002
+ 0.5287830234 0.5586404800 0.5644289255
+ 0.5301563144 0.5599024892 0.5659958720
+ 0.5315235257 0.5611644983 0.5675628781
+ 0.5328906178 0.5624132752 0.5691115856
+ 0.5342578292 0.5636613965 0.5706571937
+ 0.5356180072 0.5649095178 0.5722029209
+ 0.5369765162 0.5661481023 0.5737379193
+ 0.5383349061 0.5673810840 0.5752621889
+ 0.5396882296 0.5686141849 0.5767865181
+ 0.5410351157 0.5698431134 0.5783087015
+ 0.5423818827 0.5710616112 0.5798140168
+ 0.5437278748 0.5722801089 0.5813193917
+ 0.5450633168 0.5734986067 0.5828247070
+ 0.5463985801 0.5747051239 0.5843166113
+ 0.5477339029 0.5759106278 0.5858026743
+ 0.5490639210 0.5771160126 0.5872887969
+ 0.5503911972 0.5783153772 0.5887703896
+ 0.5517184138 0.5795091987 0.5902382731
+ 0.5530437827 0.5807030201 0.5917062759
+ 0.5543630123 0.5818957090 0.5931742191
+ 0.5556821823 0.5830773115 0.5946282744
+ 0.5570014119 0.5842589140 0.5960785151
+ 0.5583145022 0.5854403973 0.5975285769
+ 0.5596256852 0.5866149068 0.5989735723
+ 0.5609369278 0.5877853036 0.6004049778
+ 0.5622456074 0.5889558196 0.6018365026
+ 0.5635476112 0.5901247263 0.6032679081
+ 0.5648496151 0.5912854075 0.6046854854
+ 0.5661516786 0.5924460888 0.6060982943
+ 0.5674464703 0.5936068296 0.6075112224
+ 0.5687389970 0.5947598219 0.6089211702
+ 0.5700315237 0.5959085226 0.6103187799
+ 0.5713216066 0.5970572233 0.6117163897
+ 0.5726023912 0.5982046723 0.6131139994
+ 0.5738831758 0.5993419886 0.6145017743
+ 0.5751640201 0.6004794240 0.6158828735
+ 0.5764371753 0.6016166806 0.6172639728
+ 0.5777059793 0.6027488708 0.6186450720
+ 0.5789747834 0.6038765907 0.6200103164
+ 0.5802434087 0.6050041914 0.6213750243
+ 0.5815005898 0.6061319113 0.6227397919
+ 0.5827577710 0.6072487235 0.6240993142
+ 0.5840150714 0.6083645821 0.6254476905
+ 0.5852677822 0.6094806194 0.6267961860
+ 0.5865132213 0.6105933189 0.6281446218
+ 0.5877586007 0.6116985083 0.6294825077
+ 0.5890039802 0.6128035784 0.6308146119
+ 0.5902428031 0.6139087081 0.6321465969
+ 0.5914788842 0.6150081754 0.6334787011
+ 0.5927150249 0.6161044836 0.6347957253
+ 0.5939509869 0.6172006726 0.6361116171
+ 0.5951772928 0.6182969809 0.6374276280
+ 0.5964037180 0.6193832159 0.6387404799
+ 0.5976300240 0.6204687953 0.6400408745
+ 0.5988535881 0.6215543151 0.6413413882
+ 0.6000704169 0.6226378083 0.6426417828
+ 0.6012871861 0.6237139106 0.6439359188
+ 0.6025038958 0.6247900128 0.6452212930
+ 0.6037154794 0.6258659959 0.6465067267
+ 0.6049222946 0.6269382238 0.6477921009
+ 0.6061292291 0.6280059218 0.6490674019
+ 0.6073359847 0.6290736794 0.6503365040
+ 0.6085358262 0.6301413774 0.6516057253
+ 0.6097332239 0.6311997175 0.6528748274
+ 0.6109305024 0.6322535872 0.6541312933
+ 0.6121277809 0.6333073974 0.6553844810
+ 0.6133171916 0.6343613267 0.6566376090
+ 0.6145057082 0.6354042292 0.6578906775
+ 0.6156942844 0.6364452839 0.6591296792
+ 0.6168823242 0.6374865174 0.6603674293
+ 0.6180605888 0.6385275126 0.6616051793
+ 0.6192389727 0.6395580769 0.6628425717
+ 0.6204174161 0.6405887008 0.6640645266
+ 0.6215937734 0.6416193247 0.6652863026
+ 0.6227611899 0.6426482201 0.6665081978
+ 0.6239284873 0.6436666846 0.6677287817
+ 0.6250959039 0.6446852088 0.6689363122
+ 0.6262605190 0.6457036138 0.6701437831
+ 0.6274175048 0.6467195749 0.6713513136
+ 0.6285744905 0.6477273107 0.6725571752
+ 0.6297314763 0.6487351060 0.6737517118
+ 0.6308856010 0.6497427821 0.6749461889
+ 0.6320332289 0.6507480741 0.6761407256
+ 0.6331807971 0.6517474055 0.6773335934
+ 0.6343284249 0.6527466774 0.6785153151
+ 0.6354721785 0.6537461281 0.6796969175
+ 0.6366078854 0.6547424197 0.6808785796
+ 0.6377437115 0.6557319760 0.6820589900
+ 0.6388794184 0.6567215919 0.6832273006
+ 0.6400116086 0.6577112079 0.6843956113
+ 0.6411356926 0.6586982012 0.6855639219
+ 0.6422597766 0.6596792936 0.6867318153
+ 0.6433839202 0.6606603861 0.6878877878
+ 0.6445053220 0.6616414785 0.6890437007
+ 0.6456189752 0.6626203060 0.6901996732
+ 0.6467326283 0.6635925174 0.6913555861
+ 0.6478462815 0.6645647883 0.6925013065
+ 0.6489577889 0.6655369997 0.6936463118
+ 0.6500586867 0.6665074825 0.6947911978
+ 0.6511597037 0.6674702168 0.6959362030
+ 0.6522606015 0.6684328914 0.6970707774
+ 0.6533609033 0.6693956256 0.6982029080
+ 0.6544495821 0.6703575850 0.6993349791
+ 0.6555382013 0.6713106036 0.7004671097
+ 0.6566268206 0.6722635031 0.7015910149
+ 0.6577154994 0.6732165217 0.7027103901
+ 0.6587942839 0.6741694212 0.7038298249
+ 0.6598721147 0.6751123071 0.7049492002
+ 0.6609498858 0.6760544181 0.7060629129
+ 0.6620277166 0.6769965291 0.7071694732
+ 0.6630986929 0.6779385805 0.7082760930
+ 0.6641669869 0.6788738966 0.7093827128
+ 0.6652354002 0.6798070073 0.7104861736
+ 0.6663036942 0.6807401180 0.7115777731
+ 0.6673663259 0.6816732287 0.7126693726
+ 0.6684231162 0.6826019287 0.7137609124
+ 0.6694800258 0.6835269928 0.7148525119
+ 0.6705368161 0.6844519973 0.7159308791
+ 0.6715909839 0.6853770018 0.7170084119
+ 0.6726369262 0.6862993240 0.7180858254
+ 0.6736826897 0.6872149706 0.7191632986
+ 0.6747285724 0.6881306171 0.7202311158
+ 0.6757745147 0.6890463233 0.7212930918
+ 0.6768103838 0.6899619102 0.7223551869
+ 0.6778457165 0.6908699870 0.7234172225
+ 0.6788811088 0.6917781234 0.7244750261
+ 0.6799163818 0.6926862001 0.7255222797
+ 0.6809443235 0.6935942769 0.7265697122
+ 0.6819676161 0.6944952011 0.7276170254
+ 0.6829909086 0.6953927279 0.7286642790
+ 0.6840142012 0.6962900758 0.7296993136
+ 0.6850343943 0.6971876025 0.7307329774
+ 0.6860457063 0.6980822086 0.7317667007
+ 0.6870568991 0.6989707947 0.7328004241
+ 0.6880680919 0.6998593807 0.7338271141
+ 0.6890792847 0.7007479072 0.7348465919
+ 0.6900807023 0.7016364932 0.7358661294
+ 0.6910803914 0.7025167942 0.7368856072
+ 0.6920800805 0.7033964992 0.7379044890
+ 0.6930798888 0.7042762041 0.7389112711
+ 0.6940743923 0.7051559091 0.7399181128
+ 0.6950619221 0.7060313225 0.7409247756
+ 0.6960492730 0.7069025040 0.7419316173
+ 0.6970368028 0.7077736855 0.7429320216
+ 0.6980242133 0.7086449862 0.7439273000
+ 0.6990013719 0.7095158100 0.7449225783
+ 0.6999779940 0.7103791833 0.7459179163
+ 0.7009546757 0.7112424970 0.7469127774
+ 0.7019312978 0.7121058106 0.7478963733
+ 0.7029024959 0.7129691243 0.7488800287
+ 0.7038668990 0.7138271928 0.7498636246
+ 0.7048313022 0.7146809101 0.7508472204
+ 0.7057957053 0.7155346870 0.7518255115
+ 0.7067601085 0.7163884044 0.7527979016
+ 0.7077146769 0.7172421217 0.7537702918
+ 0.7086681128 0.7180885077 0.7547428012
+ 0.7096214890 0.7189350128 0.7557151914
+ 0.7105749846 0.7197813988 0.7566773891
+ 0.7115257978 0.7206279039 0.7576380968
+ 0.7124705911 0.7214711905 0.7585988045
+ 0.7134153843 0.7223104835 0.7595595121
+ 0.7143602967 0.7231497169 0.7605171204
+ 0.7153050900 0.7239890099 0.7614648938
+ 0.7162432075 0.7248281837 0.7624126077
+ 0.7171782255 0.7256616950 0.7633603811
+ 0.7181131840 0.7264938951 0.7643082142
+ 0.7190482020 0.7273260951 0.7652475238
+ 0.7199829817 0.7281581759 0.7661802173
+ 0.7209094167 0.7289890051 0.7671129107
+ 0.7218356729 0.7298128009 0.7680456042
+ 0.7227619886 0.7306365967 0.7689781785
+ 0.7236883044 0.7314602733 0.7698999047
+ 0.7246115804 0.7322841287 0.7708194852
+ 0.7255285978 0.7331035137 0.7717391849
+ 0.7264454961 0.7339180708 0.7726588249
+ 0.7273623943 0.7347326875 0.7735773921
+ 0.7282792926 0.7355474234 0.7744857073
+ 0.7291893959 0.7363619804 0.7753940225
+ 0.7300944924 0.7371708155 0.7763022780
+ 0.7309995890 0.7379775047 0.7772104740
+ 0.7319046855 0.7387843132 0.7781155109
+ 0.7328097820 0.7395910025 0.7790126801
+ 0.7337058783 0.7403978109 0.7799099088
+ 0.7345998287 0.7411972284 0.7808070779
+ 0.7354937196 0.7419964075 0.7817043066
+ 0.7363876104 0.7427955866 0.7825965285
+ 0.7372813821 0.7435948253 0.7834830880
+ 0.7381641269 0.7443925738 0.7843697071
+ 0.7390465736 0.7451831102 0.7852563262
+ 0.7399291992 0.7459737062 0.7861428261
+ 0.7408117056 0.7467643023 0.7870228291
+ 0.7416930199 0.7475548983 0.7878980041
+ 0.7425662875 0.7483425736 0.7887732983
+ 0.7434394956 0.7491239905 0.7896485925
+ 0.7443128228 0.7499054074 0.7905238867
+ 0.7451859713 0.7506868243 0.7913916707
+ 0.7460573912 0.7514681220 0.7922559977
+ 0.7469223738 0.7522463202 0.7931203246
+ 0.7477872968 0.7530199885 0.7939847112
+ 0.7486522794 0.7537937164 0.7948489785
+ 0.7495173216 0.7545673847 0.7957043052
+ 0.7503795028 0.7553411126 0.7965561152
+ 0.7512350082 0.7561119795 0.7974079251
+ 0.7520905733 0.7568801045 0.7982596755
+ 0.7529460788 0.7576481104 0.7991114855
+ 0.7538017035 0.7584161758 0.7999551296
+ 0.7546544075 0.7591843009 0.8007956147
+ 0.7555009127 0.7599483728 0.8016362190
+ 0.7563472986 0.7607088089 0.8024767041
+ 0.7571938038 0.7614691854 0.8033173084
+ 0.7580403090 0.7622296810 0.8041502237
+ 0.7588834763 0.7629901171 0.8049796820
+ 0.7597190142 0.7637473941 0.8058090806
+ 0.7605543733 0.7645015717 0.8066385984
+ 0.7613899112 0.7652558088 0.8074679971
+ 0.7622252703 0.7660099864 0.8082910180
+ 0.7630584836 0.7667642236 0.8091096282
+ 0.7638840079 0.7675157189 0.8099281788
+ 0.7647094131 0.7682638764 0.8107469082
+ 0.7655348778 0.7690120935 0.8115655184
+ 0.7663604021 0.7697603106 0.8123788834
+ 0.7671846151 0.7705085278 0.8131868243
+ 0.7680001259 0.7712538242 0.8139945865
+ 0.7688155174 0.7719941139 0.8148024082
+ 0.7696310282 0.7727344036 0.8156102896
+ 0.7704464197 0.7734745741 0.8164144754
+ 0.7712618113 0.7742149234 0.8172109723
+ 0.7720686793 0.7749537230 0.8180075288
+ 0.7728753090 0.7756870985 0.8188040257
+ 0.7736818790 0.7764205933 0.8196005225
+ 0.7744885087 0.7771540284 0.8203955889
+ 0.7752950788 0.7778875232 0.8211801052
+ 0.7760956287 0.7786207199 0.8219646215
+ 0.7768943906 0.7793480754 0.8227490783
+ 0.7776932120 0.7800753713 0.8235335946
+ 0.7784920931 0.7808027864 0.8243181109
+ 0.7792909145 0.7815300822 0.8250932097
+ 0.7800844908 0.7822574973 0.8258666992
+ 0.7808738947 0.7829779983 0.8266401887
+ 0.7816631794 0.7836970091 0.8274136782
+ 0.7824525833 0.7844160795 0.8281872272
+ 0.7832419872 0.7851350904 0.8289542198
+ 0.7840290070 0.7858542204 0.8297163248
+ 0.7848097086 0.7865694761 0.8304784298
+ 0.7855904102 0.7872818112 0.8312404752
+ 0.7863711119 0.7879942060 0.8320025802
+ 0.7871518135 0.7887064815 0.8327620029
+ 0.7879325151 0.7894188166 0.8335124850
+ 0.7887042761 0.7901296020 0.8342630267
+ 0.7894756794 0.7908356786 0.8350133896
+ 0.7902470231 0.7915416956 0.8357638717
+ 0.7910184264 0.7922477126 0.8365142941
+ 0.7917898297 0.7929537892 0.8372542858
+ 0.7925562859 0.7936598063 0.8379924893
+ 0.7933195829 0.7943586707 0.8387306929
+ 0.7940828800 0.7950568199 0.8394688964
+ 0.7948461771 0.7957547903 0.8402070999
+ 0.7956094146 0.7964528203 0.8409410715
+ 0.7963712811 0.7971509099 0.8416694999
+ 0.7971267104 0.7978456020 0.8423978090
+ 0.7978820801 0.7985368967 0.8431261182
+ 0.7986375093 0.7992283106 0.8438544273
+ 0.7993928790 0.7999196053 0.8445827961
+ 0.8001483083 0.8006108999 0.8453016281
+ 0.8008971810 0.8013020158 0.8460199237
+ 0.8016437292 0.8019875288 0.8467382789
+ 0.8023902178 0.8026731014 0.8474565744
+ 0.8031367064 0.8033586144 0.8481749296
+ 0.8038831949 0.8040441275 0.8488876224
+ 0.8046274781 0.8047297001 0.8495929837
+ 0.8053646088 0.8054109216 0.8502982855
+ 0.8061016798 0.8060886264 0.8510035872
+ 0.8068388104 0.8067662716 0.8517088890
+ 0.8075758815 0.8074440956 0.8524143100
+ 0.8083130121 0.8081218004 0.8531094790
+ 0.8090445995 0.8087993860 0.8538032770
+ 0.8097738028 0.8094710708 0.8544970751
+ 0.8105030060 0.8101428747 0.8551908731
+ 0.8112320900 0.8108146191 0.8558846712
+ 0.8119612932 0.8114864230 0.8565754890
+ 0.8126897216 0.8121581078 0.8572577834
+ 0.8134108782 0.8128275275 0.8579400778
+ 0.8141322136 0.8134937882 0.8586223722
+ 0.8148534298 0.8141601086 0.8593047261
+ 0.8155747056 0.8148264885 0.8599870801
+ 0.8162959218 0.8154928088 0.8606625199
+ 0.8170127273 0.8161591887 0.8613334894
+ 0.8177244067 0.8168199062 0.8620045781
+ 0.8184360266 0.8174793124 0.8626756072
+ 0.8191475868 0.8181387782 0.8633465767
+ 0.8198593259 0.8187981844 0.8640176058
+ 0.8205708861 0.8194577098 0.8646782041
+ 0.8212757707 0.8201162815 0.8653377891
+ 0.8219788074 0.8207699060 0.8659973145
+ 0.8226817846 0.8214235902 0.8666567802
+ 0.8233848214 0.8220772147 0.8673163056
+ 0.8240877986 0.8227308989 0.8679741025
+ 0.8247904181 0.8233845234 0.8686218858
+ 0.8254855275 0.8240357041 0.8692697287
+ 0.8261805177 0.8246836066 0.8699175119
+ 0.8268756270 0.8253313899 0.8705654144
+ 0.8275706172 0.8259792924 0.8712131977
+ 0.8282657266 0.8266270757 0.8718574047
+ 0.8289580941 0.8272749782 0.8724951744
+ 0.8296430111 0.8279188275 0.8731331229
+ 0.8303279281 0.8285604715 0.8737708926
+ 0.8310129046 0.8292021751 0.8744087219
+ 0.8316978216 0.8298439980 0.8750464916
+ 0.8323826790 0.8304857016 0.8756781816
+ 0.8330640197 0.8311274052 0.8763042092
+ 0.8337404132 0.8317648768 0.8769301176
+ 0.8344169259 0.8324015141 0.8775560260
+ 0.8350933194 0.8330382109 0.8781819940
+ 0.8357697725 0.8336749077 0.8788079023
+ 0.8364462256 0.8343114853 0.8794273734
+ 0.8371186256 0.8349481821 0.8800430298
+ 0.8377876878 0.8355782032 0.8806586266
+ 0.8384569287 0.8362079859 0.8812742233
+ 0.8391259909 0.8368378282 0.8818897009
+ 0.8397951722 0.8374676704 0.8825052977
+ 0.8404642940 0.8380975127 0.8831139207
+ 0.8411294222 0.8387269974 0.8837190270
+ 0.8417921066 0.8393514752 0.8843241930
+ 0.8424547911 0.8399760127 0.8849294186
+ 0.8431175947 0.8406004906 0.8855345249
+ 0.8437802792 0.8412250876 0.8861396909
+ 0.8444430232 0.8418496251 0.8867368102
+ 0.8451002240 0.8424736261 0.8873301148
+ 0.8457545042 0.8430926204 0.8879234195
+ 0.8464089036 0.8437114954 0.8885167241
+ 0.8470631838 0.8443304896 0.8891100287
+ 0.8477175832 0.8449494839 0.8897033930
+ 0.8483719230 0.8455684781 0.8902897239
+ 0.8490217924 0.8461869955 0.8908721209
+ 0.8496690989 0.8468005061 0.8914545178
+ 0.8503165245 0.8474140167 0.8920369148
+ 0.8509638906 0.8480275869 0.8926193118
+ 0.8516113162 0.8486410975 0.8932017088
+ 0.8522586823 0.8492546082 0.8937774897
+ 0.8529011011 0.8498679996 0.8943479061
+ 0.8535398841 0.8504769206 0.8949182034
+ 0.8541787267 0.8510857821 0.8954886198
+ 0.8548175097 0.8516947031 0.8960589767
+ 0.8554562926 0.8523036242 0.8966292739
+ 0.8560950756 0.8529124260 0.8971949220
+ 0.8567304015 0.8535212874 0.8977534175
+ 0.8573613763 0.8541247249 0.8983119130
+ 0.8579922915 0.8547276258 0.8988704085
+ 0.8586232066 0.8553304076 0.8994289041
+ 0.8592541814 0.8559333086 0.8999875188
+ 0.8598850965 0.8565362096 0.9005435705
+ 0.8605139852 0.8571389914 0.9010909200
+ 0.8611372113 0.8577383757 0.9016382098
+ 0.8617604971 0.8583366275 0.9021854997
+ 0.8623837829 0.8589348197 0.9027327895
+ 0.8630070090 0.8595330119 0.9032800794
+ 0.8636302948 0.8601312041 0.9038274288
+ 0.8642532229 0.8607293963 0.9043639898
+ 0.8648697734 0.8613250852 0.9049003124
+ 0.8654863834 0.8619186878 0.9054365158
+ 0.8661028743 0.8625122905 0.9059727192
+ 0.8667194843 0.8631058931 0.9065089822
+ 0.8673360944 0.8636994958 0.9070451856
+ 0.8679525852 0.8642930984 0.9075742960
+ 0.8685629964 0.8648849130 0.9080997705
+ 0.8691716194 0.8654721975 0.9086254239
+ 0.8697801828 0.8660594225 0.9091508985
+ 0.8703888059 0.8666465878 0.9096763730
+ 0.8709974289 0.8672338128 0.9102020264
+ 0.8716059923 0.8678210974 0.9107244015
+ 0.8722118735 0.8684083223 0.9112399817
+ 0.8728144169 0.8689904809 0.9117556214
+ 0.8734169006 0.8695725203 0.9122712016
+ 0.8740193844 0.8701543808 0.9127867818
+ 0.8746219277 0.8707364202 0.9133024216
+ 0.8752244115 0.8713182807 0.9138180017
+ 0.8758262992 0.8719003201 0.9143245220
+ 0.8764201999 0.8724784851 0.9148302078
+ 0.8770139813 0.8730542064 0.9153358936
+ 0.8776078820 0.8736298084 0.9158415794
+ 0.8782017827 0.8742055297 0.9163473248
+ 0.8787956834 0.8747810721 0.9168530107
+ 0.8793895245 0.8753566742 0.9173536897
+ 0.8799785972 0.8759317994 0.9178488255
+ 0.8805649877 0.8765037060 0.9183437824
+ 0.8811513186 0.8770756721 0.9188389182
+ 0.8817375898 0.8776475787 0.9193338752
+ 0.8823239207 0.8782194853 0.9198290110
+ 0.8829101920 0.8787915111 0.9203240275
+ 0.8834956288 0.8793634176 0.9208073020
+ 0.8840755820 0.8799321055 0.9212900996
+ 0.8846555948 0.8804993033 0.9217727780
+ 0.8852356076 0.8810665011 0.9222555757
+ 0.8858155012 0.8816336989 0.9227383137
+ 0.8863955140 0.8822008967 0.9232211113
+ 0.8869755268 0.8827680945 0.9236993790
+ 0.8875501156 0.8833345771 0.9241709113
+ 0.8881211281 0.8838980198 0.9246425033
+ 0.8886920810 0.8844614029 0.9251139760
+ 0.8892630935 0.8850247264 0.9255855083
+ 0.8898339868 0.8855881095 0.9260569811
+ 0.8904049993 0.8861514926 0.9265285134
+ 0.8909760118 0.8867148161 0.9269909859
+ 0.8915405869 0.8872753978 0.9274508953
+ 0.8921051025 0.8878340125 0.9279108047
+ 0.8926696777 0.8883925080 0.9283707142
+ 0.8932343125 0.8889510036 0.9288306236
+ 0.8937988281 0.8895096183 0.9292904735
+ 0.8943634033 0.8900681138 0.9297493100
+ 0.8949252963 0.8906266093 0.9301987886
+ 0.8954825997 0.8911815286 0.9306483269
+ 0.8960399032 0.8917360902 0.9310978055
+ 0.8965970874 0.8922907114 0.9315472841
+ 0.8971543908 0.8928452730 0.9319968224
+ 0.8977115750 0.8933998942 0.9324463010
+ 0.8982688785 0.8939545751 0.9328917265
+ 0.8988218904 0.8945080042 0.9333304167
+ 0.8993726969 0.8950576782 0.9337691069
+ 0.8999235034 0.8956074119 0.9342077971
+ 0.9004741907 0.8961570859 0.9346464872
+ 0.9010249972 0.8967068791 0.9350851774
+ 0.9015758038 0.8972566128 0.9355239272
+ 0.9021266103 0.8978062868 0.9359565973
+ 0.9026709199 0.8983541131 0.9363852739
+ 0.9032143950 0.8988997936 0.9368138909
+ 0.9037579298 0.8994455934 0.9372426271
+ 0.9043012857 0.8999912739 0.9376713037
+ 0.9048448205 0.9005370736 0.9380999207
+ 0.9053882957 0.9010828733 0.9385285974
+ 0.9059311748 0.9016286135 0.9389498234
+ 0.9064669013 0.9021710157 0.9393684864
+ 0.9070025086 0.9027118087 0.9397872090
+ 0.9075381160 0.9032527208 0.9402059913
+ 0.9080737829 0.9037935138 0.9406247139
+ 0.9086093903 0.9043343067 0.9410433769
+ 0.9091449976 0.9048752189 0.9414622188
+ 0.9096794724 0.9054160118 0.9418721199
+ 0.9102091789 0.9059522748 0.9422804713
+ 0.9107388258 0.9064875841 0.9426888824
+ 0.9112684727 0.9070228934 0.9430974126
+ 0.9117981791 0.9075582027 0.9435058236
+ 0.9123278856 0.9080935121 0.9439141750
+ 0.9128574729 0.9086288214 0.9443227053
+ 0.9133856893 0.9091640115 0.9447216988
+ 0.9139096141 0.9096950293 0.9451196194
+ 0.9144334793 0.9102253914 0.9455175996
+ 0.9149574041 0.9107558727 0.9459155798
+ 0.9154813290 0.9112864137 0.9463135004
+ 0.9160053134 0.9118168950 0.9467114806
+ 0.9165291786 0.9123473763 0.9471095204
+ 0.9170514941 0.9128779173 0.9474971890
+ 0.9175698161 0.9134051800 0.9478837252
+ 0.9180880785 0.9139323235 0.9482702017
+ 0.9186064005 0.9144592881 0.9486566782
+ 0.9191247225 0.9149863720 0.9490432143
+ 0.9196429849 0.9155133963 0.9494296908
+ 0.9201613069 0.9160404801 0.9498162270
+ 0.9206780195 0.9165676236 0.9501945972
+ 0.9211896062 0.9170905948 0.9505711794
+ 0.9217011929 0.9176132083 0.9509478807
+ 0.9222127795 0.9181358814 0.9513245225
+ 0.9227244258 0.9186584949 0.9517011046
+ 0.9232360721 0.9191811085 0.9520776868
+ 0.9237477183 0.9197037220 0.9524543881
+ 0.9242582917 0.9202262759 0.9528239965
+ 0.9247623086 0.9207435846 0.9531905055
+ 0.9252662063 0.9212597013 0.9535570741
+ 0.9257702231 0.9217758179 0.9539235830
+ 0.9262741804 0.9222918749 0.9542900920
+ 0.9267780781 0.9228079915 0.9546567202
+ 0.9272820950 0.9233241081 0.9550232291
+ 0.9277861118 0.9238402247 0.9553844929
+ 0.9282817841 0.9243530035 0.9557405710
+ 0.9287772179 0.9248641133 0.9560965896
+ 0.9292725921 0.9253752828 0.9564527273
+ 0.9297680259 0.9258863926 0.9568088055
+ 0.9302634001 0.9263976216 0.9571648836
+ 0.9307587743 0.9269086719 0.9575210214
+ 0.9312543273 0.9274199009 0.9578741193
+ 0.9317451715 0.9279295206 0.9582188725
+ 0.9322345853 0.9284372926 0.9585636258
+ 0.9327239990 0.9289451241 0.9589083791
+ 0.9332134724 0.9294528961 0.9592531919
+ 0.9337028861 0.9299607277 0.9595978856
+ 0.9341922998 0.9304684997 0.9599426985
+ 0.9346817136 0.9309763908 0.9602873921
+ 0.9351692200 0.9314835072 0.9606251121
+ 0.9356545210 0.9319880009 0.9609624743
+ 0.9361398220 0.9324923754 0.9612998962
+ 0.9366251230 0.9329968095 0.9616371989
+ 0.9371104240 0.9335011840 0.9619746208
+ 0.9375957251 0.9340056181 0.9623119235
+ 0.9380810261 0.9345099926 0.9626492858
+ 0.9385657907 0.9350144267 0.9629824758
+ 0.9390466809 0.9355158210 0.9633126855
+ 0.9395276904 0.9360166192 0.9636428952
+ 0.9400085807 0.9365174174 0.9639731050
+ 0.9404894710 0.9370182157 0.9643033147
+ 0.9409704804 0.9375190735 0.9646335244
+ 0.9414513707 0.9380198717 0.9649637938
+ 0.9419323206 0.9385207295 0.9652928710
+ 0.9424098134 0.9390196800 0.9656162262
+ 0.9428859949 0.9395166039 0.9659395218
+ 0.9433621168 0.9400135279 0.9662628770
+ 0.9438381791 0.9405103922 0.9665861726
+ 0.9443143010 0.9410073757 0.9669095278
+ 0.9447904825 0.9415042996 0.9672328234
+ 0.9452666044 0.9420012236 0.9675561190
+ 0.9457414746 0.9424980879 0.9678742886
+ 0.9462127090 0.9429908991 0.9681897759
+ 0.9466838837 0.9434838295 0.9685053229
+ 0.9471551180 0.9439765811 0.9688206911
+ 0.9476262927 0.9444695115 0.9691361785
+ 0.9480975270 0.9449623227 0.9694517255
+ 0.9485687017 0.9454551935 0.9697672129
+ 0.9490398765 0.9459481239 0.9700819254
+ 0.9495072961 0.9464387894 0.9703902006
+ 0.9499732256 0.9469273090 0.9706984162
+ 0.9504390955 0.9474158287 0.9710066915
+ 0.9509050846 0.9479044080 0.9713149071
+ 0.9513710141 0.9483929276 0.9716231823
+ 0.9518368840 0.9488813877 0.9719315171
+ 0.9523028135 0.9493700266 0.9722396731
+ 0.9527680874 0.9498584867 0.9725440741
+ 0.9532285929 0.9503428936 0.9728444219
+ 0.9536892176 0.9508270025 0.9731448293
+ 0.9541497827 0.9513109922 0.9734451175
+ 0.9546102881 0.9517951012 0.9737455249
+ 0.9550709128 0.9522790909 0.9740458727
+ 0.9555314183 0.9527631998 0.9743462205
+ 0.9559919834 0.9532471895 0.9746466279
+ 0.9564499259 0.9537299275 0.9749407768
+ 0.9569048285 0.9542092085 0.9752337933
+ 0.9573596716 0.9546884894 0.9755266905
+ 0.9578146935 0.9551678896 0.9758195877
+ 0.9582695961 0.9556471705 0.9761124849
+ 0.9587244987 0.9561265111 0.9764053822
+ 0.9591794014 0.9566057920 0.9766982794
+ 0.9596344233 0.9570850730 0.9769905806
+ 0.9600849748 0.9575614929 0.9772747159
+ 0.9605342150 0.9580358863 0.9775587916
+ 0.9609832764 0.9585102797 0.9778429270
+ 0.9614325166 0.9589846134 0.9781271219
+ 0.9618816972 0.9594590068 0.9784111977
+ 0.9623308778 0.9599334002 0.9786952734
+ 0.9627801180 0.9604076743 0.9789794087
+ 0.9632292986 0.9608821273 0.9792611003
+ 0.9636726975 0.9613522291 0.9795362949
+ 0.9641159773 0.9618213773 0.9798114896
+ 0.9645593166 0.9622905850 0.9800866246
+ 0.9650024772 0.9627596736 0.9803618193
+ 0.9654458165 0.9632288814 0.9806370139
+ 0.9658889771 0.9636980891 0.9809120893
+ 0.9663323164 0.9641671777 0.9811872840
+ 0.9667748213 0.9646363854 0.9814590812
+ 0.9672120214 0.9651002288 0.9817258716
+ 0.9676492214 0.9655638933 0.9819926023
+ 0.9680864215 0.9660276175 0.9822592735
+ 0.9685236216 0.9664912820 0.9825260043
+ 0.9689608216 0.9669550061 0.9827927947
+ 0.9693980217 0.9674186110 0.9830595255
+ 0.9698352218 0.9678822756 0.9833261967
+ 0.9702709913 0.9683455825 0.9835889935
+ 0.9707019925 0.9688035250 0.9838470817
+ 0.9711331129 0.9692615271 0.9841052890
+ 0.9715641141 0.9697194099 0.9843633771
+ 0.9719951153 0.9701772928 0.9846215248
+ 0.9724261165 0.9706352949 0.9848796725
+ 0.9728571177 0.9710931778 0.9851378202
+ 0.9732881188 0.9715511799 0.9853959084
+ 0.9737175703 0.9720084071 0.9856500030
+ 0.9741421938 0.9724602103 0.9858992100
+ 0.9745668173 0.9729120135 0.9861484170
+ 0.9749915004 0.9733638167 0.9863975048
+ 0.9754161239 0.9738156199 0.9866467118
+ 0.9758406878 0.9742674232 0.9868959188
+ 0.9762653112 0.9747192860 0.9871451259
+ 0.9766899943 0.9751710892 0.9873942733
+ 0.9771133065 0.9756222963 0.9876399040
+ 0.9775314927 0.9760677218 0.9878798723
+ 0.9779496789 0.9765130877 0.9881199002
+ 0.9783678055 0.9769583941 0.9883599281
+ 0.9787859917 0.9774038196 0.9885998964
+ 0.9792041779 0.9778491855 0.9888399243
+ 0.9796224236 0.9782946110 0.9890798926
+ 0.9800404906 0.9787399769 0.9893199205
+ 0.9804580808 0.9791854024 0.9895578027
+ 0.9808694720 0.9796236753 0.9897894263
+ 0.9812808037 0.9800621271 0.9900208712
+ 0.9816921949 0.9805004001 0.9902524948
+ 0.9821035862 0.9809387922 0.9904841185
+ 0.9825149179 0.9813771248 0.9907156825
+ 0.9829263091 0.9818153977 0.9909471869
+ 0.9833377004 0.9822537899 0.9911788106
+ 0.9837489724 0.9826921225 0.9914098978
+ 0.9841541052 0.9831243157 0.9916322827
+ 0.9845585823 0.9835553169 0.9918547273
+ 0.9849629998 0.9839861989 0.9920771718
+ 0.9853674769 0.9844172001 0.9922996163
+ 0.9857718945 0.9848480821 0.9925220013
+ 0.9861763716 0.9852790833 0.9927443862
+ 0.9865807891 0.9857100248 0.9929667711
+ 0.9869853258 0.9861410260 0.9931892157
+ 0.9873846173 0.9865669012 0.9934051037
+ 0.9877814054 0.9869893789 0.9936192036
+ 0.9881781936 0.9874119759 0.9938333035
+ 0.9885749817 0.9878345132 0.9940474033
+ 0.9889718294 0.9882571101 0.9942615032
+ 0.9893686175 0.9886797071 0.9944754839
+ 0.9897654057 0.9891021848 0.9946895838
+ 0.9901620746 0.9895247817 0.9949036837
+ 0.9905560017 0.9899445772 0.9951136112
+ 0.9909446836 0.9903581738 0.9953181148
+ 0.9913333058 0.9907717705 0.9955226779
+ 0.9917219281 0.9911854267 0.9957271814
+ 0.9921104908 0.9915990233 0.9959316850
+ 0.9924991727 0.9920125008 0.9961361885
+ 0.9928877950 0.9924260974 0.9963408113
+ 0.9932764173 0.9928396940 0.9965453148
+ 0.9936649799 0.9932532907 0.9967495203
+ 0.9940438867 0.9936568141 0.9969443083
+ 0.9944224954 0.9940596223 0.9971390963
+ 0.9948012233 0.9944624901 0.9973340034
+ 0.9951797724 0.9948652983 0.9975287914
+ 0.9955583811 0.9952681065 0.9977235794
+ 0.9959369898 0.9956709146 0.9979184270
+ 0.9963155985 0.9960737824 0.9981132150
+ 0.9966943264 0.9964765906 0.9983080029
+ 0.9970666766 0.9968733788 0.9984989166
+ 0.9974333048 0.9972642064 0.9986864924
+ 0.9977999926 0.9976549745 0.9988741875
+ 0.9981666803 0.9980459213 0.9990618229
+ 0.9985333085 0.9984366894 0.9992493987
+ 0.9988999963 0.9988275170 0.9994370937
+ 0.9992666841 0.9992182851 0.9996247292
+ 0.9996333122 0.9996091723 0.9998124242
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_futura_100.spi1d b/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_futura_100.spi1d
new file mode 100644
index 00000000000..348d8f1d9b5
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_futura_100.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0187414307 0.0199415907 0.0138841104
+ 0.0330222212 0.0346524492 0.0255766194
+ 0.0449542291 0.0472631715 0.0357697308
+ 0.0556400903 0.0585798696 0.0450413786
+ 0.0654912964 0.0689996779 0.0536506996
+ 0.0747707486 0.0787579194 0.0617258511
+ 0.0836306289 0.0879753232 0.0693477094
+ 0.0921674594 0.0967618302 0.0766232982
+ 0.1004453003 0.1051589996 0.0835988298
+ 0.1085427999 0.1132052019 0.0902485028
+ 0.1164767966 0.1209279969 0.0966249332
+ 0.1242111027 0.1283497959 0.1027311981
+ 0.1316560954 0.1354517043 0.1085847020
+ 0.1387570053 0.1422473937 0.1142328009
+ 0.1455107033 0.1487720013 0.1196969002
+ 0.1519546062 0.1550467014 0.1249829978
+ 0.1581331939 0.1611181051 0.1301161945
+ 0.1640816927 0.1669937074 0.1350999027
+ 0.1698216051 0.1726770997 0.1399576068
+ 0.1753643006 0.1782052964 0.1447027028
+ 0.1807104945 0.1835688949 0.1493282020
+ 0.1858936995 0.1887871027 0.1538430005
+ 0.1909191012 0.1938627958 0.1582642943
+ 0.1958166957 0.1988143027 0.1625947952
+ 0.2005814016 0.2036329061 0.1668373942
+ 0.2052128017 0.2083510011 0.1709935963
+ 0.2097522020 0.2129525989 0.1750802994
+ 0.2141969949 0.2174569964 0.1790975928
+ 0.2185294926 0.2218813002 0.1830428988
+ 0.2227485031 0.2262317985 0.1869215071
+ 0.2268646061 0.2304809988 0.1907352060
+ 0.2308858931 0.2346275002 0.1944852024
+ 0.2348421067 0.2386894971 0.1981807947
+ 0.2387396991 0.2426760942 0.2018260062
+ 0.2425788045 0.2466064990 0.2054218054
+ 0.2463494986 0.2504898012 0.2089662999
+ 0.2500706017 0.2543140054 0.2124685943
+ 0.2537479997 0.2580659986 0.2159260958
+ 0.2573781013 0.2617495954 0.2193453014
+ 0.2609572113 0.2653856874 0.2227171957
+ 0.2644815147 0.2689718008 0.2260479033
+ 0.2679471076 0.2725043893 0.2293380946
+ 0.2713502049 0.2759802938 0.2325894982
+ 0.2746953070 0.2793953121 0.2358044982
+ 0.2779825926 0.2827470899 0.2389748991
+ 0.2812089920 0.2860386968 0.2421178967
+ 0.2843785882 0.2892819047 0.2452265024
+ 0.2875038087 0.2924897075 0.2482994944
+ 0.2905904055 0.2956646979 0.2513419092
+ 0.2936390042 0.2988075912 0.2543503046
+ 0.2966530025 0.3019191027 0.2573288083
+ 0.2996253073 0.3050011992 0.2602812052
+ 0.3025568128 0.3080531061 0.2632032037
+ 0.3054536879 0.3110767007 0.2660993040
+ 0.3083193004 0.3140729070 0.2689616978
+ 0.3111566007 0.3170422912 0.2717953026
+ 0.3139680028 0.3199853003 0.2746086121
+ 0.3167569935 0.3229024112 0.2773948908
+ 0.3195263147 0.3257946074 0.2801466882
+ 0.3222785890 0.3286626935 0.2828755975
+ 0.3250167072 0.3315044045 0.2855885029
+ 0.3277421892 0.3343142867 0.2882772982
+ 0.3304488063 0.3370938897 0.2909384072
+ 0.3331305087 0.3398444057 0.2935771048
+ 0.3357870877 0.3425664902 0.2961899042
+ 0.3384202123 0.3452622890 0.2987827063
+ 0.3410323858 0.3479284048 0.3013578057
+ 0.3436256051 0.3505629897 0.3039124906
+ 0.3462015092 0.3531686962 0.3064478934
+ 0.3487611115 0.3557462096 0.3089591861
+ 0.3513003886 0.3582991958 0.3114418983
+ 0.3538151979 0.3608300984 0.3139019012
+ 0.3563049138 0.3633398116 0.3163512051
+ 0.3587693870 0.3658294976 0.3187870085
+ 0.3612132072 0.3682993948 0.3212068081
+ 0.3636367023 0.3707447946 0.3236055970
+ 0.3660412133 0.3731693029 0.3259812891
+ 0.3684293032 0.3755750954 0.3283393085
+ 0.3708001971 0.3779630959 0.3306787014
+ 0.3731575906 0.3803366125 0.3330000043
+ 0.3754999042 0.3826906979 0.3352980912
+ 0.3778310120 0.3850283921 0.3375810087
+ 0.3801496029 0.3873493969 0.3398480117
+ 0.3824588060 0.3896577060 0.3421055973
+ 0.3847584128 0.3919534981 0.3443531990
+ 0.3870503008 0.3942336142 0.3465890884
+ 0.3893356919 0.3964999914 0.3488120139
+ 0.3916150033 0.3987481892 0.3510178924
+ 0.3938865066 0.4009808004 0.3532077074
+ 0.3961476088 0.4031977952 0.3553779125
+ 0.3983986080 0.4054017067 0.3575282991
+ 0.4006389976 0.4075945020 0.3596653938
+ 0.4028654993 0.4097732902 0.3617888093
+ 0.4050788879 0.4119321108 0.3638970852
+ 0.4072808027 0.4140745103 0.3659907877
+ 0.4094718099 0.4162018001 0.3680689037
+ 0.4116508067 0.4183138907 0.3701283038
+ 0.4138199985 0.4204131961 0.3721699119
+ 0.4159773886 0.4225000143 0.3741934001
+ 0.4181219041 0.4245725870 0.3761979938
+ 0.4202522039 0.4266324937 0.3781862855
+ 0.4223701060 0.4286797941 0.3801617920
+ 0.4244759083 0.4307178855 0.3821251094
+ 0.4265703857 0.4327476919 0.3840759993
+ 0.4286541939 0.4347653985 0.3860141933
+ 0.4307268858 0.4367690086 0.3879393041
+ 0.4327893853 0.4387587011 0.3898504972
+ 0.4348411858 0.4407365918 0.3917472959
+ 0.4368841052 0.4427039027 0.3936302960
+ 0.4389176071 0.4446617961 0.3954991102
+ 0.4409425855 0.4466080964 0.3973535895
+ 0.4429590106 0.4485442936 0.3991936147
+ 0.4449672103 0.4504688084 0.4010188878
+ 0.4469676912 0.4523817897 0.4028322101
+ 0.4489580095 0.4542838037 0.4046368897
+ 0.4509370923 0.4561766982 0.4064337909
+ 0.4529055953 0.4580585063 0.4082230031
+ 0.4548639059 0.4599294066 0.4100044966
+ 0.4568125904 0.4617907107 0.4117785990
+ 0.4587523937 0.4636436999 0.4135451913
+ 0.4606837034 0.4654872119 0.4153045118
+ 0.4626069963 0.4673207998 0.4170565009
+ 0.4645206034 0.4691432118 0.4188013971
+ 0.4664235115 0.4709551036 0.4205392003
+ 0.4683176875 0.4727576971 0.4222700000
+ 0.4702025950 0.4745520949 0.4239938855
+ 0.4720798135 0.4763393104 0.4257110059
+ 0.4739468098 0.4781185091 0.4274213910
+ 0.4758000970 0.4798890054 0.4291251004
+ 0.4776405096 0.4816485941 0.4308224022
+ 0.4794681072 0.4833956063 0.4325130880
+ 0.4812825918 0.4851314127 0.4341974854
+ 0.4830833077 0.4868572056 0.4358755946
+ 0.4848699868 0.4885736108 0.4375469983
+ 0.4866446853 0.4902822077 0.4392102063
+ 0.4884060025 0.4919806123 0.4408645928
+ 0.4901559949 0.4936690032 0.4425103962
+ 0.4918906093 0.4953497946 0.4441474974
+ 0.4936125875 0.4970211089 0.4457770884
+ 0.4953204989 0.4986830056 0.4473989010
+ 0.4970144928 0.5003349185 0.4490132928
+ 0.4986953139 0.5019772053 0.4506205916
+ 0.5003637075 0.5036125779 0.4522204101
+ 0.5020195842 0.5052385926 0.4538131952
+ 0.5036631227 0.5068594813 0.4553956985
+ 0.5052949190 0.5084728003 0.4569694102
+ 0.5069147944 0.5100775957 0.4585345089
+ 0.5085229874 0.5116732717 0.4600914121
+ 0.5101199746 0.5132597089 0.4616405070
+ 0.5117021203 0.5148342848 0.4631803036
+ 0.5132743120 0.5164015293 0.4647122920
+ 0.5148364902 0.5179616809 0.4662373960
+ 0.5163900852 0.5195158124 0.4677560031
+ 0.5179367065 0.5210649967 0.4692681134
+ 0.5194708109 0.5226017237 0.4707722962
+ 0.5209966898 0.5241310000 0.4722703099
+ 0.5225142241 0.5256524086 0.4737617075
+ 0.5240231752 0.5271654725 0.4752461910
+ 0.5255233049 0.5286697149 0.4767219126
+ 0.5270152092 0.5301663876 0.4781898856
+ 0.5284978151 0.5316576958 0.4796513021
+ 0.5299711823 0.5331442952 0.4811064899
+ 0.5314347148 0.5346261263 0.4825553000
+ 0.5328863859 0.5360969901 0.4839963913
+ 0.5343297124 0.5375598073 0.4854325056
+ 0.5357651711 0.5390148759 0.4868634939
+ 0.5371924043 0.5404617190 0.4882858992
+ 0.5386118293 0.5419015884 0.4897007942
+ 0.5400264859 0.5433354974 0.4911100864
+ 0.5414369702 0.5447630286 0.4925136864
+ 0.5428367853 0.5461803079 0.4939090908
+ 0.5442283750 0.5475915074 0.4952997863
+ 0.5456125736 0.5489966869 0.4966861010
+ 0.5469890237 0.5503935814 0.4980660975
+ 0.5483577847 0.5517833829 0.4994400144
+ 0.5497220755 0.5531684160 0.5008088946
+ 0.5510820746 0.5545488000 0.5021709800
+ 0.5524330139 0.5559220910 0.5035272837
+ 0.5537772775 0.5572903156 0.5048794746
+ 0.5551130772 0.5586516261 0.5062263012
+ 0.5564405918 0.5600048900 0.5075680017
+ 0.5577619076 0.5613521934 0.5089064837
+ 0.5590745807 0.5626906157 0.5102406740
+ 0.5603765249 0.5640223026 0.5115708113
+ 0.5616722703 0.5653495193 0.5128980279
+ 0.5629596710 0.5666700006 0.5142201185
+ 0.5642386079 0.5679866076 0.5155370831
+ 0.5655131936 0.5692998171 0.5168507099
+ 0.5667812824 0.5706049204 0.5181574225
+ 0.5680419207 0.5719022155 0.5194594264
+ 0.5692980289 0.5731946230 0.5207582712
+ 0.5705438852 0.5744786859 0.5220487118
+ 0.5717846751 0.5757588148 0.5233348012
+ 0.5730205774 0.5770344734 0.5246167183
+ 0.5742480159 0.5783056021 0.5258914828
+ 0.5754718184 0.5795726776 0.5271635056
+ 0.5766893029 0.5808308721 0.5284305811
+ 0.5778992176 0.5820825100 0.5296934247
+ 0.5791049004 0.5833303928 0.5309540033
+ 0.5802994967 0.5845699906 0.5322073102
+ 0.5814914107 0.5858064890 0.5334576964
+ 0.5826792121 0.5870373845 0.5347031951
+ 0.5838587284 0.5882629156 0.5359424949
+ 0.5850344896 0.5894858837 0.5371791124
+ 0.5861983895 0.5906990170 0.5384079218
+ 0.5873590708 0.5919092894 0.5396336913
+ 0.5885140896 0.5931131840 0.5408535004
+ 0.5896620154 0.5943115950 0.5420675278
+ 0.5908060074 0.5955064297 0.5432779789
+ 0.5919439793 0.5966913104 0.5444819927
+ 0.5930796266 0.5978732705 0.5456839800
+ 0.5942065120 0.5990452170 0.5468795896
+ 0.5953297019 0.6002144217 0.5480728745
+ 0.5964481235 0.6013793945 0.5492628813
+ 0.5975626111 0.6025397182 0.5504478812
+ 0.5986750126 0.6036971211 0.5516301990
+ 0.5997776985 0.6048492789 0.5528064966
+ 0.6008782983 0.6060000062 0.5539814234
+ 0.6019700170 0.6071417928 0.5551493764
+ 0.6030591130 0.6082807779 0.5563148260
+ 0.6041415930 0.6094110012 0.5574722886
+ 0.6052209735 0.6105381846 0.5586267710
+ 0.6062965989 0.6116611958 0.5597772002
+ 0.6073693037 0.6127799749 0.5609225035
+ 0.6084402800 0.6138954759 0.5620642900
+ 0.6095039845 0.6150087714 0.5632020831
+ 0.6105654836 0.6161211729 0.5643385053
+ 0.6116194725 0.6172274947 0.5654675961
+ 0.6126726270 0.6183326840 0.5665956140
+ 0.6137179732 0.6194270253 0.5677173734
+ 0.6147624254 0.6205205917 0.5688384175
+ 0.6157985926 0.6216076016 0.5699521899
+ 0.6168330908 0.6226931810 0.5710644722
+ 0.6178600788 0.6237692833 0.5721685290
+ 0.6188859940 0.6248437166 0.5732709169
+ 0.6199086905 0.6259111166 0.5743672848
+ 0.6209291220 0.6269769073 0.5754616857
+ 0.6219440103 0.6280378103 0.5765504241
+ 0.6229550838 0.6290960908 0.5776373744
+ 0.6239585876 0.6301478148 0.5787205100
+ 0.6249598265 0.6311972737 0.5798012018
+ 0.6259567142 0.6322420239 0.5808768868
+ 0.6269508004 0.6332836747 0.5819506049
+ 0.6279395223 0.6343185902 0.5830199718
+ 0.6289266944 0.6353514194 0.5840864778
+ 0.6299108863 0.6363787055 0.5851466060
+ 0.6308935285 0.6374046803 0.5862044096
+ 0.6318724751 0.6384266019 0.5872561932
+ 0.6328493953 0.6394464970 0.5883064270
+ 0.6338198781 0.6404585242 0.5893509984
+ 0.6347895861 0.6414691806 0.5903946757
+ 0.6357561946 0.6424723268 0.5914332867
+ 0.6367220879 0.6434748769 0.5924714208
+ 0.6376814246 0.6444696784 0.5935050249
+ 0.6386405826 0.6454644799 0.5945385098
+ 0.6395891905 0.6464499831 0.5955650806
+ 0.6405377984 0.6474351883 0.5965915918
+ 0.6414811015 0.6484122276 0.5976113081
+ 0.6424236894 0.6493877172 0.5986298919
+ 0.6433591843 0.6503596902 0.5996431708
+ 0.6442922950 0.6513301134 0.6006544828
+ 0.6452214122 0.6522970200 0.6016616821
+ 0.6461476088 0.6532608867 0.6026659012
+ 0.6470720768 0.6542214155 0.6036679745
+ 0.6479939222 0.6551764011 0.6046671867
+ 0.6489133239 0.6561300755 0.6056650281
+ 0.6498240829 0.6570777893 0.6066576838
+ 0.6507347226 0.6580253839 0.6076505184
+ 0.6516370177 0.6589658856 0.6086354852
+ 0.6525393128 0.6599062085 0.6096205115
+ 0.6534368992 0.6608443856 0.6105999947
+ 0.6543331146 0.6617819071 0.6115779877
+ 0.6552255750 0.6627163291 0.6125519276
+ 0.6561149955 0.6636475921 0.6135221124
+ 0.6570025086 0.6645767093 0.6144911051
+ 0.6578854918 0.6654986143 0.6154568195
+ 0.6587684155 0.6664205790 0.6164224744
+ 0.6596441269 0.6673378944 0.6173813939
+ 0.6605197787 0.6682549715 0.6183400750
+ 0.6613910794 0.6691666245 0.6192939878
+ 0.6622604132 0.6700754762 0.6202455163
+ 0.6631278992 0.6709814072 0.6211943030
+ 0.6639922857 0.6718816757 0.6221385002
+ 0.6648563147 0.6727818251 0.6230823994
+ 0.6657119989 0.6736767888 0.6240196228
+ 0.6665678024 0.6745718122 0.6249567270
+ 0.6674181819 0.6754602790 0.6258906126
+ 0.6682661772 0.6763452888 0.6268228889
+ 0.6691122055 0.6772282124 0.6277527809
+ 0.6699538231 0.6781055927 0.6286767125
+ 0.6707953811 0.6789829731 0.6296005249
+ 0.6716330051 0.6798558831 0.6305189133
+ 0.6724700928 0.6807280779 0.6314365268
+ 0.6733044982 0.6815952063 0.6323506832
+ 0.6741359830 0.6824558973 0.6332612038
+ 0.6749671102 0.6833165288 0.6341714263
+ 0.6757913828 0.6841681004 0.6350759864
+ 0.6766155958 0.6850196719 0.6359806061
+ 0.6774365902 0.6858676076 0.6368827224
+ 0.6782553792 0.6867125034 0.6377828121
+ 0.6790735126 0.6875569224 0.6386821270
+ 0.6798856854 0.6883959174 0.6395736933
+ 0.6806979775 0.6892347932 0.6404653192
+ 0.6815052032 0.6900711060 0.6413521171
+ 0.6823093295 0.6909055114 0.6422356963
+ 0.6831128001 0.6917393804 0.6431186795
+ 0.6839104891 0.6925656199 0.6439942718
+ 0.6847081780 0.6933919191 0.6448698044
+ 0.6855018735 0.6942142844 0.6457418203
+ 0.6862921715 0.6950333118 0.6466106772
+ 0.6870825291 0.6958522201 0.6474797130
+ 0.6878690720 0.6966655254 0.6483433247
+ 0.6886556149 0.6974784732 0.6492068768
+ 0.6894404888 0.6982899904 0.6500678062
+ 0.6902230978 0.6990988851 0.6509246230
+ 0.6910058260 0.6999077797 0.6517813802
+ 0.6917819977 0.7007126808 0.6526325941
+ 0.6925566792 0.7015163898 0.6534823179
+ 0.6933307052 0.7023192048 0.6543310285
+ 0.6941010952 0.7031159997 0.6551743746
+ 0.6948714852 0.7039129138 0.6560177207
+ 0.6956394911 0.7047072053 0.6568580866
+ 0.6964054704 0.7054989934 0.6576957107
+ 0.6971715093 0.7062907815 0.6585332751
+ 0.6979302764 0.7070775032 0.6593660116
+ 0.6986879110 0.7078630924 0.6601977944
+ 0.6994447112 0.7086477280 0.6610285044
+ 0.7001975179 0.7094256878 0.6618531942
+ 0.7009503245 0.7102035880 0.6626778245
+ 0.7017009258 0.7109789848 0.6634991765
+ 0.7024487853 0.7117509246 0.6643164158
+ 0.7031968236 0.7125229239 0.6651335955
+ 0.7039384246 0.7132899761 0.6659477949
+ 0.7046775222 0.7140548825 0.6667606831
+ 0.7054166198 0.7148197889 0.6675736904
+ 0.7061507106 0.7155792713 0.6683797836
+ 0.7068846226 0.7163382769 0.6691855788
+ 0.7076175213 0.7170966268 0.6699900031
+ 0.7083460093 0.7178505063 0.6707876921
+ 0.7090746164 0.7186043859 0.6715853810
+ 0.7098006010 0.7193557024 0.6723811030
+ 0.7105224729 0.7201020122 0.6731733084
+ 0.7112444043 0.7208483219 0.6739653945
+ 0.7119640112 0.7215924263 0.6747537851
+ 0.7126817703 0.7223345041 0.6755387783
+ 0.7133995891 0.7230767012 0.6763237715
+ 0.7141135931 0.7238159776 0.6771062016
+ 0.7148258090 0.7245538831 0.6778873205
+ 0.7155380249 0.7252917290 0.6786683798
+ 0.7162464857 0.7260233164 0.6794440746
+ 0.7169541717 0.7267531157 0.6802182794
+ 0.7176619172 0.7274829149 0.6809926033
+ 0.7183669209 0.7282087207 0.6817620993
+ 0.7190716863 0.7289338708 0.6825309992
+ 0.7197765708 0.7296590209 0.6832998991
+ 0.7204757929 0.7303797007 0.6840652823
+ 0.7211748958 0.7311002016 0.6848304868
+ 0.7218738794 0.7318205833 0.6855955124
+ 0.7225683928 0.7325310707 0.6863517165
+ 0.7232629061 0.7332416177 0.6871078014
+ 0.7239571810 0.7339518070 0.6878635883
+ 0.7246487141 0.7346547842 0.6886121035
+ 0.7253403068 0.7353578210 0.6893606782
+ 0.7260314226 0.7360606194 0.6901090145
+ 0.7267171741 0.7367588282 0.6908516884
+ 0.7274029255 0.7374569178 0.6915943027
+ 0.7280883789 0.7381548882 0.6923367977
+ 0.7287694812 0.7388454080 0.6930751204
+ 0.7294505239 0.7395359278 0.6938133836
+ 0.7301315069 0.7402263880 0.6945515871
+ 0.7308093905 0.7409111261 0.6952871084
+ 0.7314873934 0.7415956259 0.6960226297
+ 0.7321652770 0.7422801256 0.6967579722
+ 0.7328376770 0.7429602146 0.6974878907
+ 0.7335097790 0.7436398268 0.6982172132
+ 0.7341818213 0.7443194985 0.6989465952
+ 0.7348498106 0.7449948192 0.6996716261
+ 0.7355170250 0.7456691861 0.7003955841
+ 0.7361841202 0.7463434935 0.7011196017
+ 0.7368490100 0.7470148206 0.7018402219
+ 0.7375128865 0.7476845980 0.7025592923
+ 0.7381768227 0.7483543754 0.7032784224
+ 0.7388374209 0.7490217090 0.7039942741
+ 0.7394952774 0.7496867180 0.7047075033
+ 0.7401531935 0.7503517270 0.7054206133
+ 0.7408087254 0.7510150075 0.7061315775
+ 0.7414602041 0.7516747713 0.7068389058
+ 0.7421118021 0.7523347139 0.7075461149
+ 0.7427623868 0.7529938221 0.7082526088
+ 0.7434083819 0.7536479831 0.7089549899
+ 0.7440543175 0.7543023229 0.7096574903
+ 0.7447003126 0.7549564838 0.7103599906
+ 0.7453430295 0.7556046247 0.7110564113
+ 0.7459853888 0.7562519908 0.7117524743
+ 0.7466279268 0.7568994761 0.7124484777
+ 0.7472671270 0.7575436831 0.7131392956
+ 0.7479048967 0.7581862807 0.7138277888
+ 0.7485427260 0.7588288784 0.7145162225
+ 0.7491782904 0.7594693899 0.7152029276
+ 0.7498108149 0.7601066232 0.7158870101
+ 0.7504433990 0.7607436776 0.7165712118
+ 0.7510756254 0.7613803744 0.7172548175
+ 0.7517048120 0.7620109916 0.7179335952
+ 0.7523341179 0.7626414895 0.7186123133
+ 0.7529633045 0.7632719874 0.7192909718
+ 0.7535892129 0.7638990879 0.7199658751
+ 0.7542141080 0.7645248771 0.7206395268
+ 0.7548390031 0.7651507258 0.7213131785
+ 0.7554618716 0.7657744884 0.7219849825
+ 0.7560818791 0.7663950920 0.7226539254
+ 0.7567018270 0.7670155764 0.7233228087
+ 0.7573217154 0.7676361799 0.7239916921
+ 0.7579385042 0.7682504058 0.7246547937
+ 0.7585554123 0.7688643932 0.7253178954
+ 0.7591722012 0.7694783807 0.7259808779
+ 0.7597867250 0.7700899839 0.7266423702
+ 0.7603995204 0.7706995010 0.7273027897
+ 0.7610123158 0.7713090181 0.7279632092
+ 0.7616242766 0.7719178796 0.7286229730
+ 0.7622311115 0.7725210786 0.7292783856
+ 0.7628380060 0.7731242776 0.7299337983
+ 0.7634449005 0.7737274170 0.7305892110
+ 0.7640485764 0.7743269205 0.7312399149
+ 0.7646508217 0.7749242187 0.7318879962
+ 0.7652528882 0.7755215168 0.7325360775
+ 0.7658544779 0.7761185169 0.7331836224
+ 0.7664529085 0.7767131925 0.7338275909
+ 0.7670513988 0.7773079872 0.7344716191
+ 0.7676498294 0.7779027224 0.7351155877
+ 0.7682449222 0.7784941196 0.7357556820
+ 0.7688378096 0.7790830731 0.7363932133
+ 0.7694306970 0.7796722054 0.7370308042
+ 0.7700235248 0.7802610993 0.7376680970
+ 0.7706120014 0.7808436155 0.7383009791
+ 0.7712004781 0.7814261913 0.7389338017
+ 0.7717890739 0.7820088267 0.7395666242
+ 0.7723761201 0.7825897932 0.7401980758
+ 0.7729613185 0.7831684947 0.7408279777
+ 0.7735465169 0.7837471962 0.7414578199
+ 0.7741317749 0.7843258977 0.7420876026
+ 0.7747126818 0.7849006057 0.7427113056
+ 0.7752926946 0.7854743004 0.7433335781
+ 0.7758728266 0.7860481143 0.7439559102
+ 0.7764521241 0.7866209745 0.7445772886
+ 0.7770282030 0.7871890068 0.7451937795
+ 0.7776042223 0.7877569795 0.7458102703
+ 0.7781801820 0.7883250117 0.7464267015
+ 0.7787547708 0.7888916135 0.7470412850
+ 0.7793279290 0.7894564271 0.7476536036
+ 0.7799009085 0.7900211811 0.7482659817
+ 0.7804740071 0.7905859947 0.7488783002
+ 0.7810425162 0.7911475897 0.7494871020
+ 0.7816095948 0.7917081714 0.7500947714
+ 0.7821766734 0.7922688127 0.7507023811
+ 0.7827436924 0.7928293943 0.7513099909
+ 0.7833052278 0.7933837771 0.7519133091
+ 0.7838668227 0.7939382195 0.7525165081
+ 0.7844284177 0.7944926023 0.7531198263
+ 0.7849892974 0.7950457931 0.7537218928
+ 0.7855485082 0.7955945134 0.7543202043
+ 0.7861077189 0.7961432934 0.7549185157
+ 0.7866668105 0.7966920733 0.7555168867
+ 0.7872235775 0.7972388268 0.7561128139
+ 0.7877774239 0.7977824807 0.7567057014
+ 0.7883312106 0.7983261943 0.7572985291
+ 0.7888849974 0.7988699079 0.7578914165
+ 0.7894352078 0.7994105816 0.7584812045
+ 0.7899829745 0.7999492288 0.7590687871
+ 0.7905306816 0.8004878163 0.7596564889
+ 0.7910785079 0.8010262847 0.7602441907
+ 0.7916234732 0.8015617132 0.7608277798
+ 0.7921676040 0.8020955920 0.7614096999
+ 0.7927116752 0.8026295900 0.7619916797
+ 0.7932558060 0.8031635284 0.7625735998
+ 0.7937961221 0.8036941886 0.7631514072
+ 0.7943354845 0.8042240739 0.7637282014
+ 0.7948749065 0.8047538996 0.7643049955
+ 0.7954143286 0.8052837849 0.7648817897
+ 0.7959489822 0.8058102131 0.7654550076
+ 0.7964830995 0.8063359261 0.7660276294
+ 0.7970170975 0.8068616986 0.7666001916
+ 0.7975512147 0.8073874712 0.7671728134
+ 0.7980824709 0.8079090118 0.7677428126
+ 0.7986134887 0.8084300160 0.7683125138
+ 0.7991445065 0.8089510202 0.7688822150
+ 0.7996755242 0.8094719052 0.7694519162
+ 0.8002029061 0.8099884987 0.7700183988
+ 0.8007299900 0.8105044961 0.7705844045
+ 0.8012570143 0.8110203743 0.7711504102
+ 0.8017840981 0.8115363717 0.7717164755
+ 0.8023071289 0.8120499849 0.7722783089
+ 0.8028293848 0.8125631213 0.7728394866
+ 0.8033518195 0.8130761981 0.7734007239
+ 0.8038741946 0.8135892749 0.7739619017
+ 0.8043946028 0.8140997291 0.7745202780
+ 0.8049145937 0.8146092296 0.7750778794
+ 0.8054345250 0.8151187897 0.7756354809
+ 0.8059545159 0.8156284094 0.7761932015
+ 0.8064721823 0.8161345720 0.7767478228
+ 0.8069888949 0.8166393042 0.7773010731
+ 0.8075056076 0.8171439767 0.7778543830
+ 0.8080223203 0.8176487088 0.7784076929
+ 0.8085361123 0.8181504011 0.7789580226
+ 0.8090476990 0.8186495900 0.7795059085
+ 0.8095592856 0.8191487789 0.7800536752
+ 0.8100708723 0.8196480274 0.7806016207
+ 0.8105810881 0.8201459050 0.7811478972
+ 0.8110890985 0.8206415176 0.7816914916
+ 0.8115971088 0.8211370707 0.7822352052
+ 0.8121051788 0.8216326833 0.7827789187
+ 0.8126127720 0.8221275210 0.7833216786
+ 0.8131183982 0.8226181865 0.7838603854
+ 0.8136240244 0.8231089115 0.7843990922
+ 0.8141295910 0.8235995770 0.7849379182
+ 0.8146352172 0.8240903020 0.7854766250
+ 0.8151367903 0.8245751858 0.7860131264
+ 0.8156381249 0.8250597119 0.7865493894
+ 0.8161394000 0.8255441785 0.7870855927
+ 0.8166406751 0.8260285854 0.7876219153
+ 0.8171395063 0.8265116215 0.7881566286
+ 0.8176370263 0.8269937038 0.7886903286
+ 0.8181344867 0.8274759054 0.7892240882
+ 0.8186320066 0.8279579878 0.7897579074
+ 0.8191282749 0.8284389973 0.7902898192
+ 0.8196223974 0.8289175034 0.7908182740
+ 0.8201165795 0.8293960094 0.7913469076
+ 0.8206107020 0.8298745155 0.7918754220
+ 0.8211048245 0.8303530216 0.7924038768
+ 0.8215956092 0.8308256269 0.7929295897
+ 0.8220863938 0.8312981129 0.7934553027
+ 0.8225771785 0.8317705989 0.7939808965
+ 0.8230679035 0.8322430849 0.7945066094
+ 0.8235569000 0.8327139020 0.7950305939
+ 0.8240448236 0.8331835866 0.7955533862
+ 0.8245326281 0.8336532116 0.7960761786
+ 0.8250204921 0.8341228962 0.7965989709
+ 0.8255078197 0.8345921040 0.7971209884
+ 0.8259931803 0.8350595236 0.7976391912
+ 0.8264786005 0.8355268240 0.7981575131
+ 0.8269640207 0.8359941840 0.7986757159
+ 0.8274493814 0.8364614844 0.7991939783
+ 0.8279315829 0.8369246721 0.7997112274
+ 0.8284127116 0.8373864293 0.8002278805
+ 0.8288937807 0.8378480077 0.8007447124
+ 0.8293749094 0.8383095860 0.8012614250
+ 0.8298550248 0.8387699723 0.8017773032
+ 0.8303318024 0.8392266035 0.8022907972
+ 0.8308085799 0.8396831751 0.8028041720
+ 0.8312854171 0.8401398063 0.8033176064
+ 0.8317621946 0.8405963778 0.8038309813
+ 0.8322365880 0.8410515785 0.8043408990
+ 0.8327100277 0.8415061831 0.8048493266
+ 0.8331834078 0.8419607878 0.8053576946
+ 0.8336567879 0.8424153924 0.8058661222
+ 0.8341296911 0.8428695202 0.8063743114
+ 0.8345996737 0.8433197737 0.8068807125
+ 0.8350697160 0.8437700868 0.8073871136
+ 0.8355396986 0.8442202806 0.8078935146
+ 0.8360096812 0.8446705937 0.8083999157
+ 0.8364778757 0.8451184034 0.8089042902
+ 0.8369445801 0.8455640078 0.8094068766
+ 0.8374112248 0.8460094929 0.8099095225
+ 0.8378779292 0.8464550972 0.8104121089
+ 0.8383445144 0.8469007015 0.8109146953
+ 0.8388080001 0.8473442197 0.8114140034
+ 0.8392711878 0.8477873802 0.8119127750
+ 0.8397343159 0.8482306004 0.8124117255
+ 0.8401975036 0.8486738801 0.8129106164
+ 0.8406596780 0.8491165042 0.8134090900
+ 0.8411186934 0.8495569229 0.8139066100
+ 0.8415778279 0.8499972224 0.8144040108
+ 0.8420367837 0.8504375815 0.8149014711
+ 0.8424957991 0.8508778811 0.8153988719
+ 0.8429536819 0.8513162136 0.8158944249
+ 0.8434103727 0.8517522812 0.8163877130
+ 0.8438671231 0.8521882892 0.8168810010
+ 0.8443238139 0.8526242971 0.8173742890
+ 0.8447803855 0.8530603051 0.8178675771
+ 0.8452352881 0.8534938097 0.8183590770
+ 0.8456894159 0.8539261818 0.8188499212
+ 0.8461434841 0.8543586731 0.8193408251
+ 0.8465976715 0.8547911048 0.8198316097
+ 0.8470517993 0.8552235961 0.8203225136
+ 0.8475030065 0.8556535244 0.8208127022
+ 0.8479539752 0.8560830951 0.8213027716
+ 0.8484050035 0.8565127254 0.8217929006
+ 0.8488559723 0.8569422960 0.8222830892
+ 0.8493067026 0.8573716283 0.8227729201
+ 0.8497545719 0.8577967286 0.8232586980
+ 0.8502025008 0.8582218885 0.8237444758
+ 0.8506504297 0.8586469889 0.8242303133
+ 0.8510982990 0.8590722084 0.8247160912
+ 0.8515453935 0.8594967723 0.8252013922
+ 0.8519896269 0.8599187732 0.8256844878
+ 0.8524339199 0.8603408933 0.8261677027
+ 0.8528780937 0.8607628942 0.8266509175
+ 0.8533223867 0.8611850142 0.8271340728
+ 0.8537651896 0.8616067171 0.8276169896
+ 0.8542045951 0.8620272875 0.8280991912
+ 0.8546440005 0.8624479175 0.8285813928
+ 0.8550834060 0.8628684878 0.8290637136
+ 0.8555228114 0.8632891178 0.8295459151
+ 0.8559610844 0.8637089133 0.8300266862
+ 0.8563969135 0.8641266227 0.8305044770
+ 0.8568326831 0.8645442724 0.8309822083
+ 0.8572685122 0.8649619818 0.8314598799
+ 0.8577042818 0.8653796911 0.8319376707
+ 0.8581392765 0.8657960892 0.8324145079
+ 0.8585724831 0.8662096262 0.8328894973
+ 0.8590056896 0.8666229844 0.8333644271
+ 0.8594390154 0.8670365214 0.8338394165
+ 0.8598722219 0.8674498796 0.8343142867
+ 0.8603044152 0.8678625226 0.8347889185
+ 0.8607339263 0.8682723045 0.8352627158
+ 0.8611633778 0.8686822057 0.8357365131
+ 0.8615928888 0.8690921068 0.8362103105
+ 0.8620223999 0.8695020080 0.8366839886
+ 0.8624514937 0.8699113727 0.8371570110
+ 0.8628783822 0.8703184128 0.8376260996
+ 0.8633052707 0.8707253933 0.8380951881
+ 0.8637322187 0.8711323142 0.8385642767
+ 0.8641591072 0.8715392947 0.8390334249
+ 0.8645859957 0.8719462156 0.8395023942
+ 0.8650113940 0.8723505139 0.8399685025
+ 0.8654367924 0.8727548122 0.8404346704
+ 0.8658621907 0.8731591105 0.8409007788
+ 0.8662877083 0.8735634089 0.8413670063
+ 0.8667131066 0.8739677072 0.8418331146
+ 0.8671352863 0.8743693829 0.8422979712
+ 0.8675571084 0.8747707009 0.8427627087
+ 0.8679788709 0.8751720190 0.8432275057
+ 0.8684006929 0.8755732775 0.8436921835
+ 0.8688225150 0.8759745955 0.8441569209
+ 0.8692411780 0.8763734102 0.8446184993
+ 0.8696581721 0.8767709136 0.8450784087
+ 0.8700752854 0.8771684170 0.8455383182
+ 0.8704923987 0.8775659204 0.8459982276
+ 0.8709095120 0.8779633045 0.8464580774
+ 0.8713259101 0.8783591986 0.8469166756
+ 0.8717415929 0.8787525892 0.8473734260
+ 0.8721572757 0.8791459799 0.8478301764
+ 0.8725730181 0.8795393705 0.8482869267
+ 0.8729887009 0.8799328208 0.8487436175
+ 0.8734040856 0.8803259134 0.8492001295
+ 0.8738173246 0.8807154894 0.8496552110
+ 0.8742303848 0.8811051250 0.8501102924
+ 0.8746436238 0.8814948201 0.8505653739
+ 0.8750568032 0.8818843961 0.8510203958
+ 0.8754699230 0.8822739720 0.8514754772
+ 0.8758795857 0.8826612830 0.8519273996
+ 0.8762881756 0.8830478191 0.8523783088
+ 0.8766967058 0.8834341764 0.8528292179
+ 0.8771052957 0.8838207126 0.8532801270
+ 0.8775138855 0.8842071891 0.8537309766
+ 0.8779212236 0.8845927715 0.8541811705
+ 0.8783264160 0.8849766850 0.8546299934
+ 0.8787316084 0.8853605986 0.8550788760
+ 0.8791368008 0.8857445121 0.8555276990
+ 0.8795419931 0.8861284852 0.8559765816
+ 0.8799471855 0.8865123987 0.8564254045
+ 0.8803501725 0.8868942857 0.8568723798
+ 0.8807529807 0.8872759938 0.8573192954
+ 0.8811559081 0.8876577020 0.8577662110
+ 0.8815587163 0.8880394101 0.8582130075
+ 0.8819615841 0.8884211183 0.8586599231
+ 0.8823627830 0.8888016939 0.8591055274
+ 0.8827620745 0.8891807795 0.8595495224
+ 0.8831614256 0.8895599842 0.8599935174
+ 0.8835607171 0.8899391294 0.8604375124
+ 0.8839600086 0.8903182745 0.8608815074
+ 0.8843594193 0.8906974196 0.8613255024
+ 0.8847563863 0.8910734057 0.8617683053
+ 0.8851532936 0.8914492130 0.8622109294
+ 0.8855502009 0.8918249011 0.8626536131
+ 0.8859471083 0.8922005892 0.8630962968
+ 0.8863440156 0.8925762773 0.8635389805
+ 0.8867403865 0.8929507732 0.8639808893
+ 0.8871359229 0.8933228850 0.8644214272
+ 0.8875315189 0.8936949968 0.8648619056
+ 0.8879269958 0.8940669894 0.8653023839
+ 0.8883224726 0.8944391012 0.8657429218
+ 0.8887181282 0.8948112130 0.8661834002
+ 0.8891111016 0.8951818943 0.8666223288
+ 0.8895033002 0.8955522180 0.8670606017
+ 0.8898953795 0.8959224224 0.8674988747
+ 0.8902875781 0.8962926865 0.8679373264
+ 0.8906797171 0.8966628909 0.8683755994
+ 0.8910716176 0.8970329762 0.8688138723
+ 0.8914600015 0.8974004984 0.8692520857
+ 0.8918483853 0.8977680802 0.8696902990
+ 0.8922368288 0.8981356025 0.8701285124
+ 0.8926252127 0.8985031247 0.8705667257
+ 0.8930135965 0.8988707066 0.8710048795
+ 0.8934013844 0.8992366195 0.8714421988
+ 0.8937880993 0.8995997906 0.8718780279
+ 0.8941748738 0.8999629021 0.8723136783
+ 0.8945615888 0.9003260732 0.8727493882
+ 0.8949483037 0.9006891847 0.8731852174
+ 0.8953350782 0.9010522962 0.8736209273
+ 0.8957204819 0.9014136791 0.8740552068
+ 0.8961051106 0.9017738104 0.8744884133
+ 0.8964896798 0.9021338820 0.8749216795
+ 0.8968743086 0.9024940729 0.8753550053
+ 0.8972588778 0.9028542042 0.8757882714
+ 0.8976435065 0.9032142758 0.8762215972
+ 0.8980247974 0.9035729766 0.8766545057
+ 0.8984053731 0.9039313197 0.8770872951
+ 0.8987858891 0.9042896032 0.8775202036
+ 0.8991664052 0.9046478868 0.8779529929
+ 0.8995469809 0.9050061703 0.8783857822
+ 0.8999274969 0.9053645134 0.8788185716
+ 0.9003065825 0.9057202935 0.8792489171
+ 0.9006856084 0.9060758948 0.8796789050
+ 0.9010645747 0.9064316154 0.8801090121
+ 0.9014436007 0.9067872167 0.8805390000
+ 0.9018226862 0.9071428180 0.8809691072
+ 0.9022015929 0.9074983001 0.8813989758
+ 0.9025796056 0.9078509808 0.8818262815
+ 0.9029576182 0.9082037210 0.8822537065
+ 0.9033355713 0.9085562825 0.8826810122
+ 0.9037135839 0.9089090228 0.8831083179
+ 0.9040915966 0.9092617035 0.8835356236
+ 0.9044691920 0.9096143246 0.8839628100
+ 0.9048432708 0.9099658132 0.8843894005
+ 0.9052175283 0.9103173018 0.8848158717
+ 0.9055917263 0.9106687903 0.8852424026
+ 0.9059658051 0.9110202789 0.8856688738
+ 0.9063400030 0.9113718867 0.8860954046
+ 0.9067137241 0.9117231965 0.8865216970
+ 0.9070836902 0.9120727777 0.8869451284
+ 0.9074537754 0.9124222994 0.8873686194
+ 0.9078238010 0.9127718210 0.8877919912
+ 0.9081938267 0.9131214023 0.8882154822
+ 0.9085637927 0.9134709239 0.8886389732
+ 0.9089336991 0.9138203263 0.8890622854
+ 0.9093015790 0.9141662121 0.8894826770
+ 0.9096695185 0.9145120978 0.8899031281
+ 0.9100373983 0.9148579836 0.8903235197
+ 0.9104052782 0.9152039289 0.8907439113
+ 0.9107732177 0.9155496955 0.8911643028
+ 0.9111409783 0.9158955812 0.8915846944
+ 0.9115064740 0.9162393212 0.8920040727
+ 0.9118716717 0.9165828228 0.8924233913
+ 0.9122369885 0.9169263244 0.8928427100
+ 0.9126023054 0.9172698259 0.8932620287
+ 0.9129676223 0.9176133275 0.8936812282
+ 0.9133328795 0.9179568291 0.8941004872
+ 0.9136958122 0.9182993770 0.8945177794
+ 0.9140580297 0.9186418056 0.8949344754
+ 0.9144203067 0.9189841151 0.8953511715
+ 0.9147825837 0.9193264842 0.8957679868
+ 0.9151449203 0.9196687937 0.8961846828
+ 0.9155071974 0.9200112224 0.8966013789
+ 0.9158688188 0.9203519225 0.8970177174
+ 0.9162300825 0.9206913710 0.8974336982
+ 0.9165912867 0.9210308790 0.8978497982
+ 0.9169526100 0.9213703871 0.8982657790
+ 0.9173138142 0.9217098951 0.8986818790
+ 0.9176750779 0.9220494032 0.8990979195
+ 0.9180358052 0.9223874211 0.8995137215
+ 0.9183956981 0.9227225184 0.8999291062
+ 0.9187554717 0.9230574965 0.9003444910
+ 0.9191153049 0.9233925939 0.9007598758
+ 0.9194750786 0.9237275720 0.9011753201
+ 0.9198349118 0.9240627289 0.9015907049
+ 0.9201946259 0.9243977070 0.9020060897
+ 0.9205502868 0.9247310162 0.9024195075
+ 0.9209061265 0.9250643253 0.9028329253
+ 0.9212617874 0.9253975749 0.9032462835
+ 0.9216175079 0.9257308841 0.9036595821
+ 0.9219732285 0.9260641932 0.9040730000
+ 0.9223288894 0.9263975024 0.9044864178
+ 0.9226825833 0.9267300963 0.9049000144
+ 0.9230353236 0.9270622730 0.9053136706
+ 0.9233880043 0.9273945093 0.9057273865
+ 0.9237406850 0.9277268052 0.9061412215
+ 0.9240934253 0.9280589819 0.9065548778
+ 0.9244461060 0.9283912182 0.9069685936
+ 0.9247984290 0.9287226796 0.9073820710
+ 0.9251496196 0.9290521741 0.9077947140
+ 0.9255006909 0.9293817282 0.9082072973
+ 0.9258518219 0.9297111034 0.9086199999
+ 0.9262030125 0.9300405979 0.9090325832
+ 0.9265540838 0.9303699732 0.9094452858
+ 0.9269052744 0.9306995273 0.9098579288
+ 0.9272540808 0.9310278296 0.9102687240
+ 0.9276024103 0.9313557148 0.9106789231
+ 0.9279507995 0.9316835999 0.9110891223
+ 0.9282991290 0.9320114851 0.9114993215
+ 0.9286473989 0.9323393106 0.9119095206
+ 0.9289957285 0.9326671958 0.9123197198
+ 0.9293431044 0.9329950809 0.9127299190
+ 0.9296882153 0.9333226085 0.9131399989
+ 0.9300333858 0.9336500764 0.9135500789
+ 0.9303784966 0.9339777231 0.9139602184
+ 0.9307237267 0.9343051910 0.9143702984
+ 0.9310687780 0.9346327782 0.9147803783
+ 0.9314138889 0.9349603057 0.9151905179
+ 0.9317582250 0.9352865219 0.9155995846
+ 0.9321020246 0.9356120825 0.9160081744
+ 0.9324458241 0.9359377027 0.9164168239
+ 0.9327896833 0.9362632036 0.9168254733
+ 0.9331334829 0.9365888238 0.9172341228
+ 0.9334774017 0.9369143844 0.9176427126
+ 0.9338210821 0.9372398257 0.9180511236
+ 0.9341632128 0.9375618100 0.9184569716
+ 0.9345054030 0.9378839135 0.9188628197
+ 0.9348474741 0.9382058978 0.9192686081
+ 0.9351897240 0.9385280013 0.9196743965
+ 0.9355319142 0.9388499856 0.9200801849
+ 0.9358739853 0.9391720891 0.9204859734
+ 0.9362149835 0.9394931793 0.9208915830
+ 0.9365543127 0.9398130178 0.9212968946
+ 0.9368935823 0.9401326776 0.9217022061
+ 0.9372329116 0.9404523969 0.9221073985
+ 0.9375721216 0.9407721162 0.9225127101
+ 0.9379113913 0.9410918951 0.9229180217
+ 0.9382507205 0.9414116144 0.9233232737
+ 0.9385885000 0.9417304993 0.9237279296
+ 0.9389253855 0.9420490861 0.9241321087
+ 0.9392623901 0.9423676133 0.9245362282
+ 0.9395993948 0.9426862001 0.9249404073
+ 0.9399363995 0.9430047274 0.9253445864
+ 0.9402732849 0.9433231950 0.9257488251
+ 0.9406102896 0.9436417818 0.9261528850
+ 0.9409458041 0.9439579844 0.9265553951
+ 0.9412810802 0.9442737103 0.9269576073
+ 0.9416162968 0.9445894957 0.9273598194
+ 0.9419515729 0.9449052811 0.9277619720
+ 0.9422867894 0.9452211261 0.9281641841
+ 0.9426221251 0.9455367923 0.9285663962
+ 0.9429572821 0.9458525777 0.9289686084
+ 0.9432895780 0.9461655021 0.9293698072
+ 0.9436218739 0.9464783072 0.9297710061
+ 0.9439542890 0.9467911720 0.9301720858
+ 0.9442865849 0.9471039772 0.9305732846
+ 0.9446190000 0.9474169016 0.9309744835
+ 0.9449512959 0.9477298260 0.9313756824
+ 0.9452832937 0.9480425119 0.9317768216
+ 0.9456123710 0.9483544827 0.9321771860
+ 0.9459415078 0.9486665130 0.9325776100
+ 0.9462705851 0.9489784837 0.9329779148
+ 0.9465997815 0.9492905140 0.9333782792
+ 0.9469289184 0.9496024847 0.9337787032
+ 0.9472579956 0.9499145150 0.9341790080
+ 0.9475868940 0.9502264261 0.9345791936
+ 0.9479146004 0.9505373836 0.9349784255
+ 0.9482423067 0.9508484006 0.9353774786
+ 0.9485700130 0.9511592984 0.9357767105
+ 0.9488977194 0.9514703155 0.9361758232
+ 0.9492254257 0.9517812729 0.9365749955
+ 0.9495530128 0.9520921707 0.9369741082
+ 0.9498804808 0.9524028897 0.9373731017
+ 0.9502063990 0.9527112842 0.9377706051
+ 0.9505323172 0.9530196786 0.9381682277
+ 0.9508581758 0.9533280730 0.9385656714
+ 0.9511839747 0.9536365271 0.9389632940
+ 0.9515098929 0.9539449215 0.9393607974
+ 0.9518358111 0.9542533755 0.9397584200
+ 0.9521614909 0.9545617104 0.9401558042
+ 0.9524834752 0.9548670053 0.9405503869
+ 0.9528055191 0.9551724195 0.9409449100
+ 0.9531275034 0.9554777741 0.9413394928
+ 0.9534494281 0.9557831883 0.9417340159
+ 0.9537714124 0.9560886025 0.9421285987
+ 0.9540933967 0.9563940167 0.9425231218
+ 0.9544153214 0.9566993117 0.9429177046
+ 0.9547337890 0.9570021033 0.9433081746
+ 0.9550518990 0.9573044777 0.9436982870
+ 0.9553700089 0.9576069117 0.9440883994
+ 0.9556879997 0.9579092860 0.9444785118
+ 0.9560061097 0.9582117200 0.9448686242
+ 0.9563242197 0.9585140944 0.9452586770
+ 0.9566423297 0.9588165283 0.9456487894
+ 0.9569590092 0.9591178298 0.9460378289
+ 0.9572750926 0.9594184756 0.9464262128
+ 0.9575912952 0.9597193003 0.9468145967
+ 0.9579073787 0.9600200057 0.9472030997
+ 0.9582235217 0.9603207707 0.9475914836
+ 0.9585396051 0.9606214762 0.9479799271
+ 0.9588558078 0.9609223008 0.9483683705
+ 0.9591705203 0.9612216949 0.9487560987
+ 0.9594833255 0.9615195990 0.9491428137
+ 0.9597961903 0.9618173838 0.9495295882
+ 0.9601091146 0.9621152878 0.9499164224
+ 0.9604219198 0.9624130726 0.9503030777
+ 0.9607347846 0.9627109766 0.9506899118
+ 0.9610477090 0.9630088210 0.9510766864
+ 0.9613602757 0.9633063078 0.9514631033
+ 0.9616711140 0.9636015296 0.9518467784
+ 0.9619820118 0.9638965726 0.9522305727
+ 0.9622929096 0.9641916752 0.9526143074
+ 0.9626036882 0.9644867778 0.9529979825
+ 0.9629145861 0.9647819996 0.9533817768
+ 0.9632254839 0.9650771022 0.9537655115
+ 0.9635363817 0.9653722048 0.9541491866
+ 0.9638459086 0.9656658769 0.9545314908
+ 0.9641550183 0.9659590721 0.9549131989
+ 0.9644640088 0.9662523866 0.9552949071
+ 0.9647731185 0.9665455818 0.9556766152
+ 0.9650822282 0.9668387771 0.9560583234
+ 0.9653912783 0.9671319723 0.9564399719
+ 0.9657003284 0.9674252272 0.9568217993
+ 0.9660084844 0.9677178264 0.9572029114
+ 0.9663146734 0.9680086970 0.9575825930
+ 0.9666209221 0.9682996869 0.9579622746
+ 0.9669271111 0.9685906768 0.9583420157
+ 0.9672331810 0.9688816071 0.9587218165
+ 0.9675394297 0.9691725969 0.9591014981
+ 0.9678456187 0.9694635272 0.9594811797
+ 0.9681518078 0.9697545171 0.9598609209
+ 0.9684557915 0.9700437784 0.9602388740
+ 0.9687592983 0.9703326225 0.9606165290
+ 0.9690628052 0.9706214070 0.9609941244
+ 0.9693661928 0.9709103107 0.9613717198
+ 0.9696696997 0.9711990952 0.9617493153
+ 0.9699732065 0.9714879990 0.9621269107
+ 0.9702767134 0.9717767835 0.9625045061
+ 0.9705796242 0.9720652103 0.9628816247
+ 0.9708809853 0.9723523855 0.9632573724
+ 0.9711824059 0.9726396203 0.9636331797
+ 0.9714838266 0.9729267955 0.9640089273
+ 0.9717851281 0.9732139707 0.9643846750
+ 0.9720864892 0.9735012054 0.9647604227
+ 0.9723879099 0.9737883806 0.9651361704
+ 0.9726892710 0.9740756154 0.9655119181
+ 0.9729892015 0.9743614793 0.9658862948
+ 0.9732881188 0.9746463895 0.9662597179
+ 0.9735869765 0.9749314189 0.9666332006
+ 0.9738860130 0.9752163291 0.9670066237
+ 0.9741848707 0.9755012989 0.9673801064
+ 0.9744839072 0.9757863283 0.9677535295
+ 0.9747828245 0.9760711789 0.9681270123
+ 0.9750816822 0.9763562083 0.9685003757
+ 0.9753785133 0.9766384959 0.9688717127
+ 0.9756751060 0.9769206047 0.9692428708
+ 0.9759716988 0.9772025943 0.9696140289
+ 0.9762682915 0.9774847031 0.9699851871
+ 0.9765648842 0.9777666926 0.9703562856
+ 0.9768614173 0.9780488014 0.9707275033
+ 0.9771580100 0.9783307910 0.9710986018
+ 0.9774541855 0.9786124229 0.9714694023
+ 0.9777483940 0.9788916707 0.9718384147
+ 0.9780427217 0.9791710973 0.9722074270
+ 0.9783368707 0.9794504046 0.9725763798
+ 0.9786310792 0.9797297120 0.9729453921
+ 0.9789252877 0.9800090194 0.9733144045
+ 0.9792196155 0.9802883267 0.9736832976
+ 0.9795138240 0.9805675745 0.9740523100
+ 0.9798069000 0.9808459282 0.9744206071
+ 0.9800981283 0.9811221957 0.9747872949
+ 0.9803891778 0.9813985825 0.9751541018
+ 0.9806804061 0.9816750288 0.9755209088
+ 0.9809715152 0.9819512963 0.9758877158
+ 0.9812626839 0.9822276831 0.9762545228
+ 0.9815537930 0.9825041294 0.9766213298
+ 0.9818450212 0.9827803969 0.9769880772
+ 0.9821346998 0.9830551147 0.9773538113
+ 0.9824227095 0.9833278060 0.9777181149
+ 0.9827107191 0.9836006165 0.9780824780
+ 0.9829987288 0.9838733077 0.9784469008
+ 0.9832866788 0.9841461182 0.9788112044
+ 0.9835746884 0.9844188094 0.9791756272
+ 0.9838626981 0.9846916199 0.9795399904
+ 0.9841507077 0.9849643111 0.9799042940
+ 0.9844372869 0.9852353930 0.9802669287
+ 0.9847224951 0.9855049849 0.9806277156
+ 0.9850078225 0.9857745171 0.9809886217
+ 0.9852930903 0.9860441089 0.9813495278
+ 0.9855784178 0.9863135815 0.9817103148
+ 0.9858636856 0.9865831733 0.9820712209
+ 0.9861490130 0.9868527055 0.9824320078
+ 0.9864342213 0.9871222973 0.9827929139
+ 0.9867178798 0.9873905778 0.9831522703
+ 0.9869999886 0.9876576066 0.9835103154
+ 0.9872819781 0.9879245758 0.9838681817
+ 0.9875640869 0.9881917238 0.9842262268
+ 0.9878461957 0.9884586930 0.9845842123
+ 0.9881281853 0.9887257218 0.9849420786
+ 0.9884102941 0.9889926910 0.9853001237
+ 0.9886924028 0.9892597795 0.9856579900
+ 0.9889730811 0.9895253778 0.9860141873
+ 0.9892522097 0.9897891879 0.9863678813
+ 0.9895312190 0.9900529981 0.9867215753
+ 0.9898102283 0.9903168082 0.9870752096
+ 0.9900891781 0.9905806184 0.9874289036
+ 0.9903681874 0.9908443093 0.9877825975
+ 0.9906473160 0.9911081195 0.9881362915
+ 0.9909263253 0.9913719296 0.9884899259
+ 0.9912045002 0.9916349053 0.9888418913
+ 0.9914805293 0.9918959737 0.9891892076
+ 0.9917563796 0.9921571016 0.9895365238
+ 0.9920324087 0.9924181104 0.9898838997
+ 0.9923083782 0.9926791787 0.9902312160
+ 0.9925844073 0.9929403067 0.9905784726
+ 0.9928603768 0.9932013154 0.9909257889
+ 0.9931364059 0.9934623837 0.9912732244
+ 0.9934120178 0.9937232733 0.9916203022
+ 0.9936820865 0.9939817786 0.9919636250
+ 0.9939520955 0.9942402244 0.9923068881
+ 0.9942222238 0.9944987297 0.9926502705
+ 0.9944921732 0.9947571754 0.9929935932
+ 0.9947623014 0.9950156212 0.9933369756
+ 0.9950323105 0.9952741265 0.9936802983
+ 0.9953023791 0.9955325723 0.9940236211
+ 0.9955723882 0.9957910180 0.9943670034
+ 0.9958366156 0.9960443974 0.9947049022
+ 0.9960989952 0.9962962866 0.9950411916
+ 0.9963614941 0.9965482950 0.9953776002
+ 0.9966238737 0.9968001842 0.9957138896
+ 0.9968863726 0.9970520735 0.9960501790
+ 0.9971488714 0.9973040223 0.9963865876
+ 0.9974113107 0.9975559115 0.9967228770
+ 0.9976738095 0.9978078008 0.9970592260
+ 0.9979344010 0.9980559945 0.9973912239
+ 0.9981926084 0.9982990026 0.9977173209
+ 0.9984508157 0.9985420108 0.9980434179
+ 0.9987090230 0.9987850189 0.9983695149
+ 0.9989671707 0.9990280271 0.9986956120
+ 0.9992253780 0.9992709756 0.9990217090
+ 0.9994835854 0.9995139837 0.9993478060
+ 0.9997417927 0.9997569919 0.9996739030
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_futura_200.spi1d b/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_futura_200.spi1d
new file mode 100644
index 00000000000..373a91ebeda
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_futura_200.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0190759301 0.0202765409 0.0141122499
+ 0.0335491784 0.0352048501 0.0259871501
+ 0.0456284918 0.0479410589 0.0363161191
+ 0.0564305596 0.0593791306 0.0456890501
+ 0.0664090514 0.0698935464 0.0543796085
+ 0.0757837966 0.0797363967 0.0625370890
+ 0.0847331807 0.0890476108 0.0702239573
+ 0.0933608115 0.0979082435 0.0775574669
+ 0.1017175987 0.1063619033 0.0845922306
+ 0.1099015996 0.1144784987 0.0912967026
+ 0.1179269999 0.1222776026 0.0977132320
+ 0.1257234961 0.1297329068 0.1038620025
+ 0.1332069039 0.1368501037 0.1097526997
+ 0.1403385997 0.1436758041 0.1154337972
+ 0.1471385062 0.1502327025 0.1209276021
+ 0.1536355019 0.1565580070 0.1262387037
+ 0.1598660052 0.1626631021 0.1313958019
+ 0.1658526063 0.1685642004 0.1363987029
+ 0.1715987027 0.1742689013 0.1412739009
+ 0.1771457046 0.1798011959 0.1460293978
+ 0.1825121045 0.1851902008 0.1506731957
+ 0.1877036989 0.1904155016 0.1552059054
+ 0.1927496940 0.1955112070 0.1596464962
+ 0.1976590008 0.2004680932 0.1639927030
+ 0.2024216950 0.2053215951 0.1682489067
+ 0.2070800066 0.2100495994 0.1724233031
+ 0.2116314024 0.2146542072 0.1765283942
+ 0.2160694003 0.2191715986 0.1805596054
+ 0.2203907967 0.2236115038 0.1845162958
+ 0.2246263027 0.2279452980 0.1884078979
+ 0.2287762016 0.2321790010 0.1922432035
+ 0.2328651994 0.2363519073 0.1960130930
+ 0.2368912995 0.2404530942 0.1997288018
+ 0.2408396006 0.2444870025 0.2033921927
+ 0.2446998060 0.2484596968 0.2069972008
+ 0.2484990954 0.2523579001 0.2105585039
+ 0.2522394061 0.2561706901 0.2140689939
+ 0.2559157014 0.2599090934 0.2175384015
+ 0.2595242858 0.2635894120 0.2209592015
+ 0.2630606890 0.2672078013 0.2243333012
+ 0.2665264904 0.2707605064 0.2276653051
+ 0.2699350119 0.2742443085 0.2309532017
+ 0.2732954025 0.2776700854 0.2342132032
+ 0.2766172886 0.2810553908 0.2374293953
+ 0.2799009979 0.2844128013 0.2406121045
+ 0.2831490934 0.2877435088 0.2437624931
+ 0.2863624096 0.2910458148 0.2468758970
+ 0.2895404994 0.2943179011 0.2499558926
+ 0.2926771045 0.2975485921 0.2530024946
+ 0.2957693934 0.3007347882 0.2560170889
+ 0.2988215983 0.3038783967 0.2590034902
+ 0.3018361032 0.3069826961 0.2619606853
+ 0.3048140109 0.3100473881 0.2648896873
+ 0.3077591062 0.3130752146 0.2677848041
+ 0.3106676936 0.3160668910 0.2706494033
+ 0.3135369122 0.3190228045 0.2734929919
+ 0.3163697124 0.3219431043 0.2763096094
+ 0.3191707134 0.3248273134 0.2790902853
+ 0.3219430149 0.3276773989 0.2818470001
+ 0.3246892989 0.3305040896 0.2845870852
+ 0.3274120092 0.3333109021 0.2873024046
+ 0.3301134109 0.3360993862 0.2899892926
+ 0.3327957988 0.3388687074 0.2926526964
+ 0.3354612887 0.3416137993 0.2952902913
+ 0.3381122947 0.3443362117 0.2979075015
+ 0.3407450020 0.3470380008 0.3005059063
+ 0.3433603942 0.3497211039 0.3030832112
+ 0.3459551930 0.3523826003 0.3056401014
+ 0.3485282063 0.3550176919 0.3081726134
+ 0.3510803878 0.3576203883 0.3106764853
+ 0.3536134064 0.3601945937 0.3131647110
+ 0.3561300039 0.3627431095 0.3156422973
+ 0.3586291075 0.3652668893 0.3181054890
+ 0.3611052930 0.3677676916 0.3205488920
+ 0.3635632992 0.3702487946 0.3229709864
+ 0.3660041094 0.3727082908 0.3253682852
+ 0.3684245944 0.3751434982 0.3277472854
+ 0.3708260059 0.3775567114 0.3301078975
+ 0.3732075989 0.3799484968 0.3324497938
+ 0.3755733967 0.3823226094 0.3347747028
+ 0.3779214025 0.3846783042 0.3370811045
+ 0.3802560866 0.3870177865 0.3393734097
+ 0.3825756013 0.3893364966 0.3416540921
+ 0.3848834038 0.3916386962 0.3439235091
+ 0.3871786892 0.3939253986 0.3461782932
+ 0.3894636929 0.3961988091 0.3484173119
+ 0.3917393088 0.3984617889 0.3506391943
+ 0.3940058053 0.4007127881 0.3528397083
+ 0.3962653875 0.4029492140 0.3550203145
+ 0.3985182941 0.4051673114 0.3571819961
+ 0.4007658064 0.4073692858 0.3593285978
+ 0.4030055106 0.4095577896 0.3614608049
+ 0.4052354097 0.4117330909 0.3635764122
+ 0.4074552953 0.4138962030 0.3656741083
+ 0.4096668959 0.4160450995 0.3677546084
+ 0.4118706882 0.4181813896 0.3698169887
+ 0.4140650928 0.4203011096 0.3718580902
+ 0.4162524045 0.4224058986 0.3738800883
+ 0.4184325933 0.4244979024 0.3758884072
+ 0.4206056893 0.4265781939 0.3778842986
+ 0.4227721095 0.4286450148 0.3798668981
+ 0.4249303937 0.4306966066 0.3818354011
+ 0.4270783961 0.4327369034 0.3837904930
+ 0.4292162061 0.4347665906 0.3857319951
+ 0.4313440025 0.4367870986 0.3876594007
+ 0.4334617853 0.4388001859 0.3895725906
+ 0.4355661869 0.4407989085 0.3914704919
+ 0.4376563132 0.4427832961 0.3933526874
+ 0.4397337139 0.4447549880 0.3952197134
+ 0.4417980909 0.4467160106 0.3970730901
+ 0.4438503087 0.4486671090 0.3989152014
+ 0.4458903074 0.4506083131 0.4007458985
+ 0.4479185045 0.4525383115 0.4025672972
+ 0.4499352872 0.4544585049 0.4043807089
+ 0.4519383013 0.4563668966 0.4061861932
+ 0.4539265931 0.4582642913 0.4079838991
+ 0.4559009075 0.4601486921 0.4097737968
+ 0.4578616917 0.4620200992 0.4115560949
+ 0.4598096013 0.4638800919 0.4133307934
+ 0.4617452919 0.4657298028 0.4150981009
+ 0.4636693895 0.4675683081 0.4168579876
+ 0.4655824006 0.4693951011 0.4186106920
+ 0.4674822092 0.4712128043 0.4203560948
+ 0.4693683088 0.4730215073 0.4220944047
+ 0.4712423086 0.4748198092 0.4238258004
+ 0.4731037021 0.4766085148 0.4255501926
+ 0.4749540985 0.4783886969 0.4272677004
+ 0.4767911136 0.4801594913 0.4289785922
+ 0.4786145985 0.4819203913 0.4306828082
+ 0.4804255068 0.4836716056 0.4323804080
+ 0.4822244942 0.4854123890 0.4340715110
+ 0.4840112031 0.4871422946 0.4357562065
+ 0.4857847989 0.4888612926 0.4374346137
+ 0.4875457883 0.4905700088 0.4391067922
+ 0.4892955124 0.4922698140 0.4407728910
+ 0.4910339117 0.4939587116 0.4424329102
+ 0.4927617908 0.4956364036 0.4440839887
+ 0.4944767952 0.4973056912 0.4457261860
+ 0.4961803854 0.4989677966 0.4473606944
+ 0.4978719950 0.5006220937 0.4489873052
+ 0.4995515049 0.5022668839 0.4506061971
+ 0.5012195706 0.5039017200 0.4522179067
+ 0.5028777719 0.5055288076 0.4538218975
+ 0.5045251250 0.5071460009 0.4554184973
+ 0.5061631799 0.5087574124 0.4570069015
+ 0.5077912807 0.5103607774 0.4585888088
+ 0.5094099045 0.5119572282 0.4601627886
+ 0.5110192895 0.5135468245 0.4617280960
+ 0.5126187801 0.5151286721 0.4632849991
+ 0.5142037272 0.5166985989 0.4648320079
+ 0.5157784224 0.5182607174 0.4663707018
+ 0.5173432231 0.5198156238 0.4679018855
+ 0.5188995004 0.5213642120 0.4694260061
+ 0.5204483271 0.5229077935 0.4709433019
+ 0.5219827294 0.5244423747 0.4724520147
+ 0.5235059857 0.5259712934 0.4739539921
+ 0.5250201821 0.5274928212 0.4754489958
+ 0.5265259743 0.5290061235 0.4769366086
+ 0.5280231833 0.5305104256 0.4784151018
+ 0.5295122862 0.5320072174 0.4798853099
+ 0.5309923887 0.5334973931 0.4813486040
+ 0.5324633718 0.5349810123 0.4828054905
+ 0.5339248180 0.5364567041 0.4842553139
+ 0.5353744030 0.5379219055 0.4856970906
+ 0.5368158221 0.5393791795 0.4871335924
+ 0.5382496715 0.5408291221 0.4885646999
+ 0.5396752954 0.5422707796 0.4899865091
+ 0.5410915017 0.5437059999 0.4914005101
+ 0.5425012708 0.5451353788 0.4928086102
+ 0.5439049006 0.5465584993 0.4942106903
+ 0.5452982187 0.5479696989 0.4956040084
+ 0.5466837883 0.5493730903 0.4969924986
+ 0.5480626225 0.5507693291 0.4983761907
+ 0.5494338274 0.5521574020 0.4997530878
+ 0.5507962704 0.5535387993 0.5011236072
+ 0.5521531105 0.5549157858 0.5024887919
+ 0.5535033941 0.5562884808 0.5038468242
+ 0.5548453927 0.5576546192 0.5051984787
+ 0.5561814904 0.5590159297 0.5065459013
+ 0.5575097203 0.5603706837 0.5078874826
+ 0.5588302016 0.5617178082 0.5092235804
+ 0.5601449013 0.5630592704 0.5105562210
+ 0.5614513755 0.5643923283 0.5118840933
+ 0.5627481937 0.5657188892 0.5132076144
+ 0.5640394092 0.5670406818 0.5145276785
+ 0.5653225780 0.5683544874 0.5158423781
+ 0.5665981770 0.5696623921 0.5171517730
+ 0.5678697228 0.5709664226 0.5184581280
+ 0.5691354275 0.5722628236 0.5197597146
+ 0.5703939795 0.5735521913 0.5210576057
+ 0.5716482997 0.5748370290 0.5223528743
+ 0.5728936195 0.5761141777 0.5236395001
+ 0.5741339922 0.5773866773 0.5249217153
+ 0.5753698945 0.5786542892 0.5261995196
+ 0.5765981078 0.5799149871 0.5274701118
+ 0.5778229833 0.5811718106 0.5287377834
+ 0.5790420771 0.5824205279 0.5300002098
+ 0.5802537799 0.5836634040 0.5312584043
+ 0.5814616084 0.5849028826 0.5325140953
+ 0.5826593041 0.5861350894 0.5337622166
+ 0.5838543773 0.5873640776 0.5350074172
+ 0.5850455165 0.5885868073 0.5362474918
+ 0.5862290263 0.5898029804 0.5374835134
+ 0.5874090195 0.5910161138 0.5387175083
+ 0.5885779858 0.5922204852 0.5399456024
+ 0.5897439718 0.5934225917 0.5411707163
+ 0.5909047127 0.5946190953 0.5423896909
+ 0.5920587778 0.5958110094 0.5436031222
+ 0.5932093859 0.5969995856 0.5448129773
+ 0.5943543911 0.5981795192 0.5460162163
+ 0.5954970121 0.5993567109 0.5472174883
+ 0.5966315269 0.6005250812 0.5484123826
+ 0.5977625847 0.6016913056 0.5496050715
+ 0.5988891721 0.6028537154 0.5507941842
+ 0.6000123024 0.6040124297 0.5519784093
+ 0.6011335254 0.6051688194 0.5531598926
+ 0.6022430062 0.6063209176 0.5543354154
+ 0.6033499241 0.6074718833 0.5555096269
+ 0.6044468284 0.6086149812 0.5566766262
+ 0.6055412292 0.6097556949 0.5578411222
+ 0.6066293716 0.6108884811 0.5589979887
+ 0.6077128053 0.6120188832 0.5601516962
+ 0.6087905169 0.6131458282 0.5613011718
+ 0.6098622084 0.6142669916 0.5624457002
+ 0.6109300256 0.6153838038 0.5635867715
+ 0.6119914055 0.6164928079 0.5647237897
+ 0.6130506992 0.6175984740 0.5658593178
+ 0.6141037941 0.6186978221 0.5669875741
+ 0.6151558757 0.6197956800 0.5681148171
+ 0.6162015200 0.6208844185 0.5692356229
+ 0.6172462106 0.6219723821 0.5703557730
+ 0.6182832122 0.6230551004 0.5714685917
+ 0.6193187833 0.6241365075 0.5725799799
+ 0.6203479767 0.6252096891 0.5736833215
+ 0.6213756204 0.6262813807 0.5747848749
+ 0.6223981977 0.6273471713 0.5758804083
+ 0.6234180927 0.6284117103 0.5769739151
+ 0.6244314909 0.6294723749 0.5780618191
+ 0.6254416108 0.6305295229 0.5791479945
+ 0.6264446974 0.6315774918 0.5802301764
+ 0.6274456978 0.6326224804 0.5813099742
+ 0.6284427047 0.6336600184 0.5823848248
+ 0.6294364929 0.6346951723 0.5834575295
+ 0.6304243207 0.6357244849 0.5845260024
+ 0.6314088106 0.6367521286 0.5855916739
+ 0.6323868036 0.6377754211 0.5866507888
+ 0.6333630085 0.6387977004 0.5877078176
+ 0.6343346238 0.6398169994 0.5887587070
+ 0.6353039742 0.6408346295 0.5898079872
+ 0.6362662911 0.6418454051 0.5908517241
+ 0.6372275949 0.6428552270 0.5918945074
+ 0.6381838918 0.6438586712 0.5929322243
+ 0.6391395926 0.6448618770 0.5939694047
+ 0.6400895119 0.6458585262 0.5950021148
+ 0.6410393715 0.6468551755 0.5960347056
+ 0.6419798732 0.6478437781 0.5970602036
+ 0.6429203153 0.6488320827 0.5980855227
+ 0.6438559890 0.6498137116 0.5991042852
+ 0.6447910070 0.6507939100 0.6001219749
+ 0.6457198262 0.6517695189 0.6011344194
+ 0.6466463208 0.6527429819 0.6021447182
+ 0.6475692987 0.6537116170 0.6031510234
+ 0.6484898925 0.6546760798 0.6041542292
+ 0.6494089961 0.6556367874 0.6051554084
+ 0.6503260732 0.6565908790 0.6061536074
+ 0.6512408853 0.6575438976 0.6071500778
+ 0.6521478295 0.6584920287 0.6081401706
+ 0.6530545950 0.6594399810 0.6091303229
+ 0.6539540291 0.6603807807 0.6101105809
+ 0.6548532844 0.6613214016 0.6110907793
+ 0.6557484865 0.6622567177 0.6120656133
+ 0.6566426754 0.6631903052 0.6130387783
+ 0.6575334072 0.6641204953 0.6140081286
+ 0.6584212780 0.6650474072 0.6149740219
+ 0.6593077183 0.6659724116 0.6159386039
+ 0.6601902246 0.6668912768 0.6168997884
+ 0.6610727906 0.6678102016 0.6178609729
+ 0.6619489789 0.6687254906 0.6188141704
+ 0.6628252268 0.6696406007 0.6197673082
+ 0.6636962295 0.6705511212 0.6207141280
+ 0.6645649076 0.6714593172 0.6216580272
+ 0.6654312015 0.6723641157 0.6225993037
+ 0.6662933826 0.6732622981 0.6235358715
+ 0.6671553850 0.6741604805 0.6244724989
+ 0.6680101156 0.6750528216 0.6254026294
+ 0.6688649058 0.6759452224 0.6263327003
+ 0.6697137952 0.6768317819 0.6272596717
+ 0.6705600023 0.6777151823 0.6281852722
+ 0.6714038253 0.6785969138 0.6291080713
+ 0.6722424030 0.6794738173 0.6300241947
+ 0.6730809212 0.6803507209 0.6309403181
+ 0.6739163995 0.6812239885 0.6318492293
+ 0.6747515202 0.6820967197 0.6327571273
+ 0.6755837798 0.6829648018 0.6336619854
+ 0.6764129996 0.6838271022 0.6345633268
+ 0.6772418022 0.6846892834 0.6354644895
+ 0.6780627966 0.6855434775 0.6363605261
+ 0.6788836718 0.6863977909 0.6372565031
+ 0.6797022223 0.6872488260 0.6381502748
+ 0.6805189848 0.6880972981 0.6390423775
+ 0.6813352108 0.6889454126 0.6399337053
+ 0.6821470261 0.6897872090 0.6408177018
+ 0.6829589009 0.6906291246 0.6417016983
+ 0.6837666035 0.6914675236 0.6425812244
+ 0.6845718026 0.6923034191 0.6434577703
+ 0.6853765249 0.6931388974 0.6443338990
+ 0.6861765981 0.6939678788 0.6452031136
+ 0.6869766116 0.6947969794 0.6460722089
+ 0.6877734065 0.6956220865 0.6469382048
+ 0.6885675192 0.6964433789 0.6478012800
+ 0.6893616915 0.6972646713 0.6486644149
+ 0.6901482940 0.6980792880 0.6495230198
+ 0.6909348965 0.6988936067 0.6503813863
+ 0.6917189956 0.6997050047 0.6512373090
+ 0.6924995184 0.7005112767 0.6520892978
+ 0.6932801008 0.7013177276 0.6529412866
+ 0.6940550804 0.7021173239 0.6537883878
+ 0.6948289275 0.7029148936 0.6546339989
+ 0.6956019998 0.7037113905 0.6554787755
+ 0.6963722706 0.7045007944 0.6563187242
+ 0.6971424818 0.7052903175 0.6571586132
+ 0.6979110241 0.7060778737 0.6579942703
+ 0.6986778975 0.7068635225 0.6588261724
+ 0.6994447112 0.7076489925 0.6596580148
+ 0.7002053261 0.7084293962 0.6604819894
+ 0.7009649873 0.7092086077 0.6613044739
+ 0.7017238736 0.7099866867 0.6621260047
+ 0.7024794817 0.7107571959 0.6629421115
+ 0.7032350898 0.7115277052 0.6637582183
+ 0.7039889097 0.7122963071 0.6645715833
+ 0.7047405839 0.7130622268 0.6653813124
+ 0.7054923177 0.7138280869 0.6661911011
+ 0.7062383890 0.7145891786 0.6669985056
+ 0.7069823742 0.7153481245 0.6678047180
+ 0.7077264190 0.7161070108 0.6686109900
+ 0.7084659934 0.7168573141 0.6694114208
+ 0.7092055082 0.7176067829 0.6702113748
+ 0.7099441886 0.7183555961 0.6710103154
+ 0.7106792927 0.7190998197 0.6718034148
+ 0.7114142776 0.7198439837 0.6725963950
+ 0.7121458054 0.7205855846 0.6733878255
+ 0.7128710747 0.7213221788 0.6741760969
+ 0.7135964036 0.7220587134 0.6749644876
+ 0.7143177986 0.7227926850 0.6757488847
+ 0.7150359154 0.7235242128 0.6765298843
+ 0.7157539725 0.7242556214 0.6773108244
+ 0.7164688706 0.7249854207 0.6780883074
+ 0.7171823978 0.7257142067 0.6788641214
+ 0.7178958058 0.7264429927 0.6796398163
+ 0.7186031938 0.7271656990 0.6804109812
+ 0.7193090916 0.7278866172 0.6811808944
+ 0.7200149894 0.7286074758 0.6819508076
+ 0.7207157016 0.7293236852 0.6827170253
+ 0.7214158773 0.7300391793 0.6834827065
+ 0.7221161127 0.7307546735 0.6842483878
+ 0.7228116989 0.7314674258 0.6850115061
+ 0.7235072255 0.7321798801 0.6857745051
+ 0.7242025733 0.7328923941 0.6865373254
+ 0.7248927951 0.7335966825 0.6872922182
+ 0.7255830169 0.7343010902 0.6880471110
+ 0.7262728810 0.7350053191 0.6888017058
+ 0.7269589901 0.7357040048 0.6895499825
+ 0.7276450992 0.7364026904 0.6902983785
+ 0.7283307910 0.7371011972 0.6910464764
+ 0.7290124297 0.7377966046 0.6917898059
+ 0.7296938896 0.7384920120 0.6925331950
+ 0.7303751707 0.7391871810 0.6932764053
+ 0.7310516238 0.7398741841 0.6940135956
+ 0.7317278981 0.7405611873 0.6947507858
+ 0.7324042916 0.7412481904 0.6954879761
+ 0.7330766916 0.7419282198 0.6962195039
+ 0.7337490916 0.7426078916 0.6969509721
+ 0.7344214916 0.7432876229 0.6976823807
+ 0.7350897193 0.7439622879 0.6984075904
+ 0.7357577085 0.7446364164 0.6991322041
+ 0.7364255786 0.7453106046 0.6998566985
+ 0.7370892763 0.7459799051 0.7005770206
+ 0.7377521992 0.7466480136 0.7012962103
+ 0.7384151220 0.7473161221 0.7020155191
+ 0.7390751839 0.7479804158 0.7027320862
+ 0.7397342920 0.7486426830 0.7034475207
+ 0.7403932810 0.7493051291 0.7041630149
+ 0.7410498261 0.7499645948 0.7048757076
+ 0.7417044044 0.7506214976 0.7055861950
+ 0.7423589826 0.7512784004 0.7062966228
+ 0.7430117130 0.7519339919 0.7070053816
+ 0.7436612844 0.7525870800 0.7077112794
+ 0.7443109155 0.7532402277 0.7084171772
+ 0.7449595928 0.7538927794 0.7091221809
+ 0.7456040978 0.7545416951 0.7098222971
+ 0.7462486029 0.7551906109 0.7105224729
+ 0.7468931079 0.7558395267 0.7112227082
+ 0.7475314736 0.7564836144 0.7119165063
+ 0.7481697202 0.7571272850 0.7126098871
+ 0.7488077879 0.7577710152 0.7133032084
+ 0.7494426966 0.7584123015 0.7139921784
+ 0.7500761151 0.7590525150 0.7146791220
+ 0.7507095933 0.7596926093 0.7153660059
+ 0.7513409257 0.7603306770 0.7160515785
+ 0.7519693971 0.7609655261 0.7167350054
+ 0.7525979280 0.7616001964 0.7174183130
+ 0.7532256842 0.7622345090 0.7181012034
+ 0.7538480163 0.7628622055 0.7187789083
+ 0.7544702888 0.7634899020 0.7194564939
+ 0.7550926208 0.7641175985 0.7201341987
+ 0.7557113767 0.7647429705 0.7208058834
+ 0.7563291788 0.7653676867 0.7214756012
+ 0.7569469213 0.7659922838 0.7221453786
+ 0.7575628161 0.7666150928 0.7228131890
+ 0.7581757903 0.7672348022 0.7234779000
+ 0.7587887049 0.7678545117 0.7241426110
+ 0.7594016790 0.7684742212 0.7248072028
+ 0.7600086927 0.7690863013 0.7254648209
+ 0.7606157064 0.7696982026 0.7261223197
+ 0.7612227201 0.7703102231 0.7267798185
+ 0.7618271708 0.7709196210 0.7274342179
+ 0.7624298930 0.7715268731 0.7280861735
+ 0.7630326152 0.7721343040 0.7287383080
+ 0.7636346817 0.7727413177 0.7293899059
+ 0.7642328143 0.7733443975 0.7300382853
+ 0.7648310065 0.7739474177 0.7306867242
+ 0.7654290795 0.7745504975 0.7313351035
+ 0.7660248876 0.7751491070 0.7319790125
+ 0.7666196227 0.7757449746 0.7326202989
+ 0.7672141790 0.7763409019 0.7332617044
+ 0.7678084970 0.7769364119 0.7339023948
+ 0.7684006095 0.7775282860 0.7345390916
+ 0.7689927816 0.7781202197 0.7351757288
+ 0.7695848942 0.7787120938 0.7358123064
+ 0.7701737285 0.7793018818 0.7364459038
+ 0.7707604170 0.7798901200 0.7370774150
+ 0.7713471055 0.7804782987 0.7377089858
+ 0.7719334960 0.7810664773 0.7383404970
+ 0.7725152969 0.7816480994 0.7389686704
+ 0.7730969787 0.7822297812 0.7395969033
+ 0.7736787200 0.7828114033 0.7402251959
+ 0.7742595077 0.7833915949 0.7408527136
+ 0.7748392820 0.7839698792 0.7414792776
+ 0.7754191160 0.7845481038 0.7421059012
+ 0.7759987712 0.7851263285 0.7427325845
+ 0.7765746117 0.7857019901 0.7433542013
+ 0.7771494985 0.7862771749 0.7439746261
+ 0.7777243853 0.7868523002 0.7445951104
+ 0.7782984972 0.7874264121 0.7452148199
+ 0.7788689733 0.7879943252 0.7458307743
+ 0.7794395089 0.7885621190 0.7464467883
+ 0.7800099254 0.7891299725 0.7470628023
+ 0.7805796862 0.7896950841 0.7476773858
+ 0.7811487913 0.7902569175 0.7482905984
+ 0.7817177773 0.7908186913 0.7489038110
+ 0.7822868824 0.7913805246 0.7495170236
+ 0.7828525901 0.7919393182 0.7501246929
+ 0.7834174037 0.7924969792 0.7507306933
+ 0.7839820981 0.7930546999 0.7513365746
+ 0.7845466733 0.7936124206 0.7519425154
+ 0.7851064205 0.7941638231 0.7525429130
+ 0.7856659889 0.7947151065 0.7531433105
+ 0.7862256169 0.7952665091 0.7537437081
+ 0.7867845893 0.7958167791 0.7543430924
+ 0.7873414755 0.7963629961 0.7549396157
+ 0.7878984809 0.7969092727 0.7555360198
+ 0.7884554267 0.7974554896 0.7561324835
+ 0.7890108228 0.7980003953 0.7567269802
+ 0.7895640731 0.7985432744 0.7573187947
+ 0.7901175022 0.7990862727 0.7579106092
+ 0.7906708121 0.7996292114 0.7585024834
+ 0.7912214994 0.8001691103 0.7590919137
+ 0.7917703986 0.8007066250 0.7596797943
+ 0.7923192978 0.8012441993 0.7602676153
+ 0.7928681970 0.8017817140 0.7608553767
+ 0.7934157252 0.8023154140 0.7614399195
+ 0.7939624786 0.8028475046 0.7620229721
+ 0.7945094109 0.8033794761 0.7626060843
+ 0.7950562239 0.8039115071 0.7631891966
+ 0.7956007123 0.8044400811 0.7637678981
+ 0.7961447239 0.8049678206 0.7643455863
+ 0.7966886163 0.8054953814 0.7649232745
+ 0.7972326279 0.8060231209 0.7655010223
+ 0.7977703810 0.8065471053 0.7660744786
+ 0.7983074784 0.8070703745 0.7666473985
+ 0.7988445759 0.8075938225 0.7672201991
+ 0.7993816733 0.8081170917 0.7677931190
+ 0.7999145985 0.8086366057 0.7683627009
+ 0.8004472256 0.8091554046 0.7689319849
+ 0.8009796739 0.8096743226 0.7695012093
+ 0.8015123010 0.8101931810 0.7700704932
+ 0.8020427823 0.8107082248 0.7706354260
+ 0.8025730848 0.8112226129 0.7711998224
+ 0.8031035066 0.8117371202 0.7717642188
+ 0.8036338091 0.8122515082 0.7723286152
+ 0.8041588068 0.8127616048 0.7728883028
+ 0.8046830297 0.8132709265 0.7734473944
+ 0.8052071929 0.8137801886 0.7740064263
+ 0.8057314754 0.8142895103 0.7745653987
+ 0.8062517047 0.8147963285 0.7751224041
+ 0.8067709208 0.8153023124 0.7756788135
+ 0.8072901964 0.8158082962 0.7762352824
+ 0.8078094125 0.8163142800 0.7767916918
+ 0.8083264232 0.8168172836 0.7773452997
+ 0.8088424802 0.8173186779 0.7778974771
+ 0.8093585968 0.8178201914 0.7784497142
+ 0.8098745942 0.8183215857 0.7790020108
+ 0.8103876710 0.8188199997 0.7795510292
+ 0.8108984828 0.8193156123 0.7800974250
+ 0.8114091754 0.8198112845 0.7806438208
+ 0.8119199872 0.8203068972 0.7811902165
+ 0.8124291897 0.8208017945 0.7817354202
+ 0.8129357100 0.8212953806 0.7822787166
+ 0.8134422898 0.8217890263 0.7828220129
+ 0.8139489293 0.8222826719 0.7833654284
+ 0.8144549727 0.8227757812 0.7839078903
+ 0.8149591088 0.8232660890 0.7844464779
+ 0.8154631853 0.8237565160 0.7849851251
+ 0.8159673810 0.8242468238 0.7855237722
+ 0.8164715171 0.8247371912 0.7860624194
+ 0.8169714212 0.8252223730 0.7865952253
+ 0.8174710274 0.8257070780 0.7871276140
+ 0.8179705739 0.8261917830 0.7876598835
+ 0.8184702992 0.8266764879 0.7881922722
+ 0.8189675808 0.8271585107 0.7887222767
+ 0.8194637895 0.8276389241 0.7892510891
+ 0.8199599981 0.8281193972 0.7897799015
+ 0.8204562068 0.8285998106 0.7903087139
+ 0.8209517002 0.8290792108 0.7908356786
+ 0.8214461803 0.8295565248 0.7913593054
+ 0.8219406009 0.8300337791 0.7918829918
+ 0.8224350214 0.8305110931 0.7924066186
+ 0.8229293823 0.8309884071 0.7929303050
+ 0.8234202266 0.8314602971 0.7934505939
+ 0.8239108920 0.8319321275 0.7939708829
+ 0.8244016767 0.8324038982 0.7944911718
+ 0.8248924017 0.8328756094 0.7950115204
+ 0.8253806829 0.8333445787 0.7955307961
+ 0.8258677125 0.8338115215 0.7960494757
+ 0.8263546228 0.8342785239 0.7965682149
+ 0.8268414736 0.8347455263 0.7970868945
+ 0.8273276091 0.8352121115 0.7976047993
+ 0.8278108239 0.8356773257 0.7981191874
+ 0.8282939792 0.8361424804 0.7986335754
+ 0.8287771940 0.8366076946 0.7991480827
+ 0.8292604089 0.8370729089 0.7996624708
+ 0.8297402859 0.8375352025 0.8001754284
+ 0.8302192092 0.8379961848 0.8006876707
+ 0.8306980133 0.8384572864 0.8012000918
+ 0.8311768770 0.8389183879 0.8017123938
+ 0.8316546082 0.8393784761 0.8022242785
+ 0.8321290016 0.8398349881 0.8027346134
+ 0.8326033950 0.8402916193 0.8032448888
+ 0.8330777884 0.8407480717 0.8037552834
+ 0.8335521817 0.8412047029 0.8042656183
+ 0.8340237737 0.8416597843 0.8047726750
+ 0.8344941735 0.8421143293 0.8052784204
+ 0.8349646926 0.8425686955 0.8057842255
+ 0.8354352117 0.8430231810 0.8062899113
+ 0.8359050751 0.8434774280 0.8067952991
+ 0.8363721967 0.8439291716 0.8072986007
+ 0.8368391991 0.8443809748 0.8078019023
+ 0.8373062015 0.8448328972 0.8083050847
+ 0.8377732038 0.8452847004 0.8088083863
+ 0.8382382989 0.8457334042 0.8093103766
+ 0.8387017846 0.8461793065 0.8098112941
+ 0.8391653895 0.8466250896 0.8103122711
+ 0.8396288753 0.8470708728 0.8108131886
+ 0.8400924206 0.8475167751 0.8113141060
+ 0.8405531049 0.8479586244 0.8118106723
+ 0.8410136104 0.8483998775 0.8123067021
+ 0.8414739966 0.8488411903 0.8128026724
+ 0.8419345021 0.8492823839 0.8132987022
+ 0.8423944116 0.8497232199 0.8137940764
+ 0.8428521752 0.8501616716 0.8142873049
+ 0.8433101177 0.8506001830 0.8147805929
+ 0.8437680006 0.8510386944 0.8152738214
+ 0.8442258835 0.8514773250 0.8157669902
+ 0.8446823955 0.8519136906 0.8162589073
+ 0.8451377153 0.8523477912 0.8167495131
+ 0.8455929160 0.8527818918 0.8172399998
+ 0.8460481763 0.8532159925 0.8177304864
+ 0.8465033770 0.8536500931 0.8182210922
+ 0.8469561934 0.8540809155 0.8187078834
+ 0.8474081755 0.8545101881 0.8191933036
+ 0.8478600979 0.8549395800 0.8196786046
+ 0.8483120203 0.8553689718 0.8201640248
+ 0.8487640023 0.8557983041 0.8206493258
+ 0.8492118716 0.8562254906 0.8211318851
+ 0.8496595025 0.8566523790 0.8216142058
+ 0.8501071930 0.8570793867 0.8220965266
+ 0.8505548239 0.8575062752 0.8225787878
+ 0.8510020971 0.8579329848 0.8230608106
+ 0.8514466286 0.8583570123 0.8235400915
+ 0.8518909812 0.8587809801 0.8240194917
+ 0.8523355126 0.8592050076 0.8244987726
+ 0.8527799249 0.8596289754 0.8249781132
+ 0.8532239199 0.8600522280 0.8254566789
+ 0.8536661863 0.8604717851 0.8259320855
+ 0.8541085124 0.8608914018 0.8264076114
+ 0.8545507789 0.8613110185 0.8268830180
+ 0.8549929857 0.8617305756 0.8273584843
+ 0.8554344177 0.8621492982 0.8278334141
+ 0.8558735251 0.8625652790 0.8283066154
+ 0.8563125134 0.8629813194 0.8287798166
+ 0.8567516208 0.8633973002 0.8292530179
+ 0.8571907282 0.8638132811 0.8297262788
+ 0.8576285839 0.8642284870 0.8301985264
+ 0.8580638766 0.8646416068 0.8306686282
+ 0.8584992886 0.8650546074 0.8311386704
+ 0.8589347005 0.8654677272 0.8316087127
+ 0.8593699932 0.8658807874 0.8320788145
+ 0.8598045707 0.8662930727 0.8325483799
+ 0.8602377176 0.8667033911 0.8330168724
+ 0.8606708050 0.8671137094 0.8334854245
+ 0.8611038923 0.8675240874 0.8339539170
+ 0.8615369797 0.8679344058 0.8344224095
+ 0.8619691730 0.8683441877 0.8348909020
+ 0.8623989820 0.8687524796 0.8353595138
+ 0.8628287911 0.8691607118 0.8358281255
+ 0.8632586002 0.8695690036 0.8362966180
+ 0.8636884093 0.8699771762 0.8367652297
+ 0.8641173840 0.8703852892 0.8372331858
+ 0.8645430207 0.8707920909 0.8376984000
+ 0.8649684787 0.8711990118 0.8381634951
+ 0.8653941154 0.8716058731 0.8386287093
+ 0.8658195734 0.8720127940 0.8390939236
+ 0.8662450910 0.8724194765 0.8395590186
+ 0.8666694164 0.8728235960 0.8400223255
+ 0.8670938015 0.8732277155 0.8404856920
+ 0.8675181866 0.8736317754 0.8409489989
+ 0.8679425120 0.8740358949 0.8414124250
+ 0.8683668971 0.8744400144 0.8418756723
+ 0.8687893152 0.8748406172 0.8423389196
+ 0.8692114949 0.8752405047 0.8428019881
+ 0.8696336746 0.8756405115 0.8432651758
+ 0.8700559139 0.8760403991 0.8437283039
+ 0.8704780936 0.8764404058 0.8441913724
+ 0.8708974123 0.8768380880 0.8446521759
+ 0.8713154197 0.8772345781 0.8451117277
+ 0.8717334867 0.8776311278 0.8455712199
+ 0.8721514940 0.8780276179 0.8460307717
+ 0.8725695014 0.8784241080 0.8464903235
+ 0.8729861975 0.8788195252 0.8469489813
+ 0.8734011054 0.8792132139 0.8474063873
+ 0.8738160133 0.8796069026 0.8478639126
+ 0.8742309213 0.8800007105 0.8483213782
+ 0.8746458292 0.8803943992 0.8487787843
+ 0.8750604987 0.8807877898 0.8492361903
+ 0.8754733205 0.8811789751 0.8496932983
+ 0.8758860230 0.8815701008 0.8501502872
+ 0.8762987852 0.8819612265 0.8506072760
+ 0.8767116070 0.8823524117 0.8510643244
+ 0.8771244287 0.8827434778 0.8515213132
+ 0.8775348067 0.8831323981 0.8519753814
+ 0.8779444098 0.8835206032 0.8524286151
+ 0.8783540726 0.8839088082 0.8528817892
+ 0.8787636757 0.8842970133 0.8533350229
+ 0.8791733980 0.8846852183 0.8537881970
+ 0.8795822263 0.8850721121 0.8542405963
+ 0.8799896836 0.8854566216 0.8546915054
+ 0.8803973198 0.8858410716 0.8551424742
+ 0.8808047771 0.8862255812 0.8555933833
+ 0.8812122941 0.8866102099 0.8560442924
+ 0.8816198111 0.8869947195 0.8564953208
+ 0.8820263147 0.8873755932 0.8569455743
+ 0.8824326992 0.8877562284 0.8573958874
+ 0.8828390837 0.8881369233 0.8578462005
+ 0.8832455277 0.8885174990 0.8582963943
+ 0.8836519122 0.8888980746 0.8587467074
+ 0.8840569258 0.8892776966 0.8591951728
+ 0.8844602108 0.8896561861 0.8596414924
+ 0.8848636150 0.8900346160 0.8600878119
+ 0.8852669001 0.8904129863 0.8605340719
+ 0.8856703043 0.8907914162 0.8609802723
+ 0.8860735893 0.8911697865 0.8614265919
+ 0.8864722848 0.8915463090 0.8618707061
+ 0.8868706226 0.8919227123 0.8623145819
+ 0.8872690201 0.8922989964 0.8627585173
+ 0.8876674175 0.8926753998 0.8632022738
+ 0.8880656958 0.8930518031 0.8636462092
+ 0.8884631991 0.8934273124 0.8640897870
+ 0.8888590932 0.8938013911 0.8645328283
+ 0.8892549872 0.8941754103 0.8649758101
+ 0.8896508813 0.8945494294 0.8654187918
+ 0.8900468946 0.8949235082 0.8658617735
+ 0.8904427886 0.8952975273 0.8663048148
+ 0.8908371925 0.8956699967 0.8667446971
+ 0.8912311792 0.8960419893 0.8671836257
+ 0.8916252255 0.8964139223 0.8676224947
+ 0.8920192122 0.8967859149 0.8680614233
+ 0.8924131989 0.8971577883 0.8685001731
+ 0.8928068876 0.8975296021 0.8689389229
+ 0.8931970000 0.8978990912 0.8693752289
+ 0.8935871124 0.8982686996 0.8698114753
+ 0.8939772844 0.8986381888 0.8702477813
+ 0.8943673968 0.8990076780 0.8706840873
+ 0.8947576284 0.8993772268 0.8711203933
+ 0.8951466084 0.8997455835 0.8715562820
+ 0.8955339193 0.9001119733 0.8719915152
+ 0.8959211707 0.9004784226 0.8724268079
+ 0.8963084817 0.9008446932 0.8728619814
+ 0.8966959119 0.9012110829 0.8732972145
+ 0.8970832229 0.9015774131 0.8737323880
+ 0.8974692822 0.9019417763 0.8741655946
+ 0.8978548050 0.9023047090 0.8745973706
+ 0.8982402086 0.9026677012 0.8750292063
+ 0.8986256123 0.9030305743 0.8754611015
+ 0.8990110755 0.9033935070 0.8758928776
+ 0.8993964791 0.9037564993 0.8763247132
+ 0.8997789025 0.9041181207 0.8767552972
+ 0.9001606107 0.9044793248 0.8771855831
+ 0.9005421996 0.9048405290 0.8776159286
+ 0.9009239078 0.9052016735 0.8780462146
+ 0.9013054967 0.9055628777 0.8784765005
+ 0.9016872048 0.9059240818 0.8789067864
+ 0.9020649195 0.9062829018 0.8793358207
+ 0.9024425149 0.9066416025 0.8797646165
+ 0.9028201103 0.9070003033 0.8801934719
+ 0.9031975865 0.9073588848 0.8806223869
+ 0.9035751820 0.9077175856 0.8810513020
+ 0.9039525986 0.9080762267 0.8814799786
+ 0.9043281078 0.9084306955 0.8819060922
+ 0.9047036171 0.9087852836 0.8823322058
+ 0.9050791264 0.9091398716 0.8827583194
+ 0.9054545760 0.9094944000 0.8831843734
+ 0.9058300853 0.9098489881 0.8836104274
+ 0.9062054157 0.9102032781 0.8840364814
+ 0.9065783024 0.9105550051 0.8844619989
+ 0.9069511890 0.9109066725 0.8848875165
+ 0.9073241949 0.9112585187 0.8853129148
+ 0.9076970816 0.9116101861 0.8857383728
+ 0.9080700874 0.9119619131 0.8861638904
+ 0.9084427953 0.9123135209 0.8865892291
+ 0.9088128209 0.9126635194 0.8870128989
+ 0.9091827869 0.9130135179 0.8874365091
+ 0.9095528126 0.9133635163 0.8878601789
+ 0.9099227786 0.9137135148 0.8882837892
+ 0.9102928042 0.9140635133 0.8887075186
+ 0.9106627107 0.9144133925 0.8891310096
+ 0.9110317826 0.9147610068 0.8895515203
+ 0.9114007950 0.9151085019 0.8899719119
+ 0.9117698073 0.9154561162 0.8903924227
+ 0.9121388793 0.9158036113 0.8908128738
+ 0.9125078917 0.9161511064 0.8912333250
+ 0.9128769040 0.9164987206 0.8916537762
+ 0.9132447243 0.9168428779 0.8920732737
+ 0.9136124253 0.9171867967 0.8924927115
+ 0.9139801264 0.9175307751 0.8929122090
+ 0.9143477082 0.9178748131 0.8933315873
+ 0.9147154093 0.9182186723 0.8937510848
+ 0.9150831103 0.9185627103 0.8941705227
+ 0.9154474735 0.9189047813 0.8945881724
+ 0.9158111215 0.9192463756 0.8950055242
+ 0.9161747098 0.9195880294 0.8954226971
+ 0.9165382981 0.9199296236 0.8958399296
+ 0.9169018865 0.9202712178 0.8962571025
+ 0.9172654748 0.9206128120 0.8966743946
+ 0.9176265001 0.9209533930 0.8970903158
+ 0.9179857969 0.9212933183 0.8975052834
+ 0.9183449745 0.9216331244 0.8979204297
+ 0.9187042117 0.9219729900 0.8983353972
+ 0.9190635085 0.9223129153 0.8987504244
+ 0.9194226861 0.9226527810 0.8991655111
+ 0.9197812080 0.9229915738 0.8995802999
+ 0.9201380014 0.9233281016 0.8999949098
+ 0.9204949141 0.9236646891 0.9004095197
+ 0.9208517075 0.9240012169 0.9008241296
+ 0.9212086201 0.9243378043 0.9012386799
+ 0.9215654135 0.9246743917 0.9016532898
+ 0.9219222069 0.9250109196 0.9020677805
+ 0.9222760797 0.9253453016 0.9024798870
+ 0.9226300716 0.9256798029 0.9028918743
+ 0.9229841232 0.9260141850 0.9033039808
+ 0.9233379960 0.9263486862 0.9037160873
+ 0.9236919880 0.9266831279 0.9041281939
+ 0.9240459800 0.9270175099 0.9045401812
+ 0.9243978262 0.9273512959 0.9049506783
+ 0.9247484803 0.9276847839 0.9053602219
+ 0.9250993133 0.9280182719 0.9057698250
+ 0.9254500270 0.9283518195 0.9061794281
+ 0.9258008003 0.9286853075 0.9065889716
+ 0.9261515141 0.9290186763 0.9069985747
+ 0.9265019298 0.9293516278 0.9074079990
+ 0.9268512726 0.9296824932 0.9078168273
+ 0.9272007942 0.9300134182 0.9082257152
+ 0.9275501966 0.9303442836 0.9086344838
+ 0.9278995991 0.9306753278 0.9090433121
+ 0.9282490015 0.9310061932 0.9094521999
+ 0.9285985231 0.9313371181 0.9098610282
+ 0.9289464951 0.9316648245 0.9102689028
+ 0.9292942286 0.9319915771 0.9106765985
+ 0.9296419024 0.9323183894 0.9110842943
+ 0.9299895763 0.9326452017 0.9114919901
+ 0.9303374290 0.9329720736 0.9118996859
+ 0.9306851029 0.9332988858 0.9123073816
+ 0.9310320020 0.9336249232 0.9127150178
+ 0.9313766956 0.9339488745 0.9131222963
+ 0.9317213893 0.9342728257 0.9135295749
+ 0.9320660830 0.9345967770 0.9139369130
+ 0.9324107766 0.9349207878 0.9143441916
+ 0.9327554703 0.9352446795 0.9147515297
+ 0.9331002235 0.9355686903 0.9151586890
+ 0.9334433079 0.9358913898 0.9155651927
+ 0.9337856770 0.9362136126 0.9159712195
+ 0.9341281056 0.9365357757 0.9163771868
+ 0.9344704747 0.9368579984 0.9167832136
+ 0.9348127842 0.9371802211 0.9171893001
+ 0.9351552129 0.9375023842 0.9175953269
+ 0.9354975224 0.9378244281 0.9180011749
+ 0.9358382225 0.9381431937 0.9184055924
+ 0.9361788034 0.9384620786 0.9188100100
+ 0.9365195036 0.9387809038 0.9192144275
+ 0.9368602037 0.9390997291 0.9196187854
+ 0.9372009039 0.9394186139 0.9200232029
+ 0.9375416040 0.9397373796 0.9204276204
+ 0.9378811121 0.9400548935 0.9208316207
+ 0.9382188916 0.9403703213 0.9212350845
+ 0.9385566115 0.9406856894 0.9216386080
+ 0.9388942719 0.9410011172 0.9220420718
+ 0.9392319918 0.9413164854 0.9224454761
+ 0.9395697117 0.9416319132 0.9228489995
+ 0.9399074912 0.9419472814 0.9232525229
+ 0.9402431250 0.9422618151 0.9236547947
+ 0.9405775070 0.9425758123 0.9240565896
+ 0.9409120083 0.9428898096 0.9244583249
+ 0.9412463903 0.9432038069 0.9248600006
+ 0.9415808916 0.9435179234 0.9252616763
+ 0.9419152737 0.9438319206 0.9256634116
+ 0.9422497749 0.9441459179 0.9260650873
+ 0.9425830245 0.9444586039 0.9264650941
+ 0.9429159760 0.9447709918 0.9268646836
+ 0.9432489872 0.9450834990 0.9272642732
+ 0.9435819983 0.9453958869 0.9276639223
+ 0.9439150095 0.9457083941 0.9280635118
+ 0.9442480206 0.9460207820 0.9284631014
+ 0.9445809722 0.9463332891 0.9288625717
+ 0.9449120760 0.9466425776 0.9292607903
+ 0.9452432990 0.9469519854 0.9296590090
+ 0.9455745220 0.9472612739 0.9300572276
+ 0.9459056258 0.9475706816 0.9304553866
+ 0.9462367892 0.9478800297 0.9308536053
+ 0.9465680122 0.9481893778 0.9312518239
+ 0.9468988180 0.9484986067 0.9316499233
+ 0.9472268820 0.9488059878 0.9320474863
+ 0.9475550056 0.9491134286 0.9324449897
+ 0.9478831887 0.9494208097 0.9328426123
+ 0.9482113123 0.9497281909 0.9332401156
+ 0.9485393763 0.9500355721 0.9336376190
+ 0.9488674998 0.9503430128 0.9340351820
+ 0.9491953254 0.9506502748 0.9344326854
+ 0.9495210052 0.9509568214 0.9348298907
+ 0.9498466849 0.9512634277 0.9352269769
+ 0.9501724243 0.9515699744 0.9356241822
+ 0.9504981041 0.9518765211 0.9360213876
+ 0.9508237839 0.9521831274 0.9364185929
+ 0.9511495233 0.9524896741 0.9368157983
+ 0.9514749050 0.9527959824 0.9372128248
+ 0.9517980814 0.9531002045 0.9376080036
+ 0.9521211982 0.9534044266 0.9380033016
+ 0.9524443150 0.9537085891 0.9383985996
+ 0.9527673721 0.9540126920 0.9387937784
+ 0.9530906081 0.9543169141 0.9391890764
+ 0.9534137249 0.9546210766 0.9395843744
+ 0.9537366033 0.9549251795 0.9399794936
+ 0.9540542960 0.9552258849 0.9403715134
+ 0.9543719888 0.9555265903 0.9407635927
+ 0.9546896815 0.9558274150 0.9411556125
+ 0.9550073743 0.9561281204 0.9415475726
+ 0.9553251266 0.9564288259 0.9419395924
+ 0.9556428790 0.9567294717 0.9423316717
+ 0.9559605718 0.9570301771 0.9427236915
+ 0.9562745094 0.9573286772 0.9431132078
+ 0.9565880895 0.9576269984 0.9435023069
+ 0.9569017291 0.9579253197 0.9438915253
+ 0.9572151899 0.9582235813 0.9442806244
+ 0.9575288296 0.9585217834 0.9446697831
+ 0.9578424096 0.9588201046 0.9450588822
+ 0.9581558704 0.9591184258 0.9454481006
+ 0.9584683776 0.9594156742 0.9458364844
+ 0.9587804079 0.9597126842 0.9462245703
+ 0.9590924978 0.9600095749 0.9466127157
+ 0.9594045281 0.9603065252 0.9470008016
+ 0.9597164989 0.9606034756 0.9473888874
+ 0.9600285888 0.9609004259 0.9477769732
+ 0.9603406191 0.9611973166 0.9481651187
+ 0.9606512785 0.9614930749 0.9485527873
+ 0.9609603882 0.9617875218 0.9489399791
+ 0.9612696171 0.9620819092 0.9493271708
+ 0.9615787268 0.9623762965 0.9497144818
+ 0.9618877769 0.9626706839 0.9501016736
+ 0.9621970057 0.9629650712 0.9504889250
+ 0.9625061154 0.9632595181 0.9508761168
+ 0.9628148079 0.9635536075 0.9512630105
+ 0.9631211162 0.9638456106 0.9516479969
+ 0.9634273052 0.9641376138 0.9520329833
+ 0.9637334943 0.9644294977 0.9524180293
+ 0.9640396833 0.9647215009 0.9528030157
+ 0.9643458724 0.9650135040 0.9531880021
+ 0.9646521211 0.9653053880 0.9535729885
+ 0.9649583101 0.9655973911 0.9539579153
+ 0.9652628899 0.9658880830 0.9543418884
+ 0.9655668736 0.9661784768 0.9547253847
+ 0.9658709168 0.9664688110 0.9551090002
+ 0.9661749005 0.9667590857 0.9554926157
+ 0.9664788246 0.9670494199 0.9558761120
+ 0.9667828083 0.9673396945 0.9562597275
+ 0.9670867920 0.9676300287 0.9566432834
+ 0.9673900008 0.9679197073 0.9570264220
+ 0.9676913023 0.9682080150 0.9574084878
+ 0.9679926038 0.9684962034 0.9577906132
+ 0.9682939053 0.9687843919 0.9581726789
+ 0.9685953259 0.9690726995 0.9585548043
+ 0.9688966274 0.9693608880 0.9589369297
+ 0.9691979289 0.9696490765 0.9593191147
+ 0.9694991708 0.9699373841 0.9597011805
+ 0.9697983861 0.9702233076 0.9600812197
+ 0.9700970054 0.9705085158 0.9604607821
+ 0.9703956246 0.9707937837 0.9608402848
+ 0.9706941843 0.9710791111 0.9612197876
+ 0.9709929228 0.9713643789 0.9615994096
+ 0.9712914824 0.9716497064 0.9619789124
+ 0.9715901017 0.9719349742 0.9623584151
+ 0.9718881845 0.9722197056 0.9627375007
+ 0.9721844792 0.9725024104 0.9631149769
+ 0.9724807143 0.9727851152 0.9634925127
+ 0.9727770090 0.9730678201 0.9638699889
+ 0.9730733037 0.9733504057 0.9642475247
+ 0.9733694792 0.9736331105 0.9646250010
+ 0.9736657739 0.9739158154 0.9650024772
+ 0.9739621282 0.9741985202 0.9653798938
+ 0.9742565155 0.9744799733 0.9657559991
+ 0.9745497704 0.9747607112 0.9661310911
+ 0.9748430252 0.9750415087 0.9665063024
+ 0.9751362801 0.9753221869 0.9668813944
+ 0.9754294753 0.9756029248 0.9672564864
+ 0.9757227898 0.9758836031 0.9676316977
+ 0.9760159850 0.9761644006 0.9680067897
+ 0.9763092995 0.9764450788 0.9683818817
+ 0.9765990973 0.9767239094 0.9687542915
+ 0.9768885970 0.9770026207 0.9691264033
+ 0.9771782160 0.9772812128 0.9694985747
+ 0.9774677157 0.9775598049 0.9698706865
+ 0.9777572751 0.9778385162 0.9702427983
+ 0.9780467749 0.9781171083 0.9706150293
+ 0.9783363938 0.9783958197 0.9709870815
+ 0.9786252975 0.9786741138 0.9713587761
+ 0.9789113998 0.9789509177 0.9717280865
+ 0.9791973829 0.9792277217 0.9720973969
+ 0.9794834852 0.9795044065 0.9724667072
+ 0.9797695279 0.9797812104 0.9728360176
+ 0.9800555110 0.9800580144 0.9732053280
+ 0.9803416133 0.9803346992 0.9735746980
+ 0.9806275964 0.9806115031 0.9739440084
+ 0.9809123874 0.9808875918 0.9743121266
+ 0.9811949134 0.9811623096 0.9746779799
+ 0.9814773798 0.9814370275 0.9750438929
+ 0.9817599058 0.9817116857 0.9754099250
+ 0.9820423722 0.9819864035 0.9757757783
+ 0.9823248982 0.9822611213 0.9761416912
+ 0.9826074243 0.9825357795 0.9765076041
+ 0.9828898907 0.9828104973 0.9768735170
+ 0.9831706285 0.9830839038 0.9772381186
+ 0.9834492803 0.9833558202 0.9776011109
+ 0.9837279916 0.9836276770 0.9779641032
+ 0.9840067029 0.9838995934 0.9783270955
+ 0.9842854738 0.9841713905 0.9786900282
+ 0.9845641851 0.9844433069 0.9790530205
+ 0.9848428965 0.9847152233 0.9794160128
+ 0.9851216078 0.9849870801 0.9797790051
+ 0.9853982925 0.9852576256 0.9801405072
+ 0.9856731296 0.9855268002 0.9805005789
+ 0.9859479070 0.9857959747 0.9808607101
+ 0.9862228036 0.9860652089 0.9812209010
+ 0.9864975810 0.9863345027 0.9815809727
+ 0.9867724180 0.9866036773 0.9819411039
+ 0.9870471954 0.9868729115 0.9823011756
+ 0.9873220921 0.9871420860 0.9826613069
+ 0.9875941277 0.9874101877 0.9830198288
+ 0.9878634810 0.9876769781 0.9833766818
+ 0.9881328940 0.9879438281 0.9837337136
+ 0.9884023070 0.9882106781 0.9840906262
+ 0.9886716008 0.9884775281 0.9844474792
+ 0.9889410138 0.9887443185 0.9848043919
+ 0.9892104268 0.9890111089 0.9851613045
+ 0.9894797802 0.9892780185 0.9855182171
+ 0.9897462130 0.9895430803 0.9858739972
+ 0.9900087714 0.9898058772 0.9862282276
+ 0.9902712703 0.9900686741 0.9865823984
+ 0.9905338287 0.9903314710 0.9869366288
+ 0.9907963276 0.9905943274 0.9872906804
+ 0.9910588264 0.9908571243 0.9876449108
+ 0.9913213849 0.9911199212 0.9879990816
+ 0.9915838838 0.9913827181 0.9883533120
+ 0.9918448925 0.9916440845 0.9887064099
+ 0.9921017885 0.9919016957 0.9890565872
+ 0.9923588037 0.9921593070 0.9894067049
+ 0.9926156998 0.9924169779 0.9897568822
+ 0.9928725958 0.9926745892 0.9901071191
+ 0.9931296110 0.9929322004 0.9904572964
+ 0.9933865070 0.9931898713 0.9908074141
+ 0.9936434031 0.9934474826 0.9911575913
+ 0.9939001203 0.9937049747 0.9915075898
+ 0.9941518903 0.9939597249 0.9918552041
+ 0.9944037795 0.9942144156 0.9922026992
+ 0.9946557283 0.9944692254 0.9925501943
+ 0.9949074984 0.9947239161 0.9928978086
+ 0.9951593876 0.9949786067 0.9932453036
+ 0.9954112172 0.9952334166 0.9935927987
+ 0.9956631064 0.9954881072 0.9939404130
+ 0.9959149957 0.9957427979 0.9942879081
+ 0.9961606860 0.9959961772 0.9946306944
+ 0.9964045882 0.9962491989 0.9949722290
+ 0.9966484904 0.9965021014 0.9953135848
+ 0.9968923926 0.9967551231 0.9956551194
+ 0.9971364141 0.9970080256 0.9959965944
+ 0.9973803163 0.9972609878 0.9963380098
+ 0.9976242185 0.9975138903 0.9966794848
+ 0.9978681207 0.9977669120 0.9970210195
+ 0.9981089234 0.9980177283 0.9973577261
+ 0.9983453155 0.9982655048 0.9976879954
+ 0.9985817075 0.9985132813 0.9980183244
+ 0.9988179803 0.9987609982 0.9983485937
+ 0.9990543723 0.9990087748 0.9986789227
+ 0.9992908239 0.9992566109 0.9990090728
+ 0.9995272160 0.9995043874 0.9993394017
+ 0.9997636080 0.9997522235 0.9996696711
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_futura_400.spi1d b/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_futura_400.spi1d
new file mode 100644
index 00000000000..030a8fb1234
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_futura_400.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0189804304 0.0202203300 0.0141742602
+ 0.0334178284 0.0351021588 0.0260934699
+ 0.0454768315 0.0478549302 0.0364666395
+ 0.0562601797 0.0592830218 0.0458958298
+ 0.0662030578 0.0697968081 0.0546298996
+ 0.0755658001 0.0796677694 0.0628222525
+ 0.0844966397 0.0889748707 0.0705531687
+ 0.0930858031 0.0978165492 0.0779282674
+ 0.1014240980 0.1062681973 0.0849699080
+ 0.1095660999 0.1143971011 0.0916869491
+ 0.1175450981 0.1221864969 0.0981442481
+ 0.1253249943 0.1296440959 0.1043419018
+ 0.1328340024 0.1367834061 0.1102854982
+ 0.1399984062 0.1436239928 0.1160039008
+ 0.1468109936 0.1502085030 0.1215291023
+ 0.1533181965 0.1565480977 0.1268731952
+ 0.1595371962 0.1626639962 0.1320544034
+ 0.1655108929 0.1685764045 0.1370812953
+ 0.1712646037 0.1742939055 0.1419793069
+ 0.1768248975 0.1798332930 0.1467563957
+ 0.1822118014 0.1852239966 0.1514313072
+ 0.1874231994 0.1904760003 0.1559925973
+ 0.1924864948 0.1955907047 0.1604602933
+ 0.1974117011 0.2005726993 0.1648356020
+ 0.2021995932 0.2054260969 0.1691132933
+ 0.2068601996 0.2101702988 0.1733085066
+ 0.2114142030 0.2148002982 0.1774341017
+ 0.2158668935 0.2193187028 0.1814931035
+ 0.2202159017 0.2237484008 0.1854856014
+ 0.2244572043 0.2280993015 0.1894098967
+ 0.2285912931 0.2323631048 0.1932736933
+ 0.2326336950 0.2365342975 0.1970842034
+ 0.2366016954 0.2406188995 0.2008334994
+ 0.2405177951 0.2446300983 0.2045322061
+ 0.2443760037 0.2485861927 0.2081629038
+ 0.2481773049 0.2524932921 0.2117401063
+ 0.2519231141 0.2563455105 0.2152681053
+ 0.2556205094 0.2601292133 0.2187464982
+ 0.2592709064 0.2638446987 0.2221813947
+ 0.2628698945 0.2674998045 0.2255706042
+ 0.2664135993 0.2711037993 0.2289170027
+ 0.2698990107 0.2746542096 0.2322203964
+ 0.2733238041 0.2781482935 0.2354855984
+ 0.2766858041 0.2815822065 0.2387184948
+ 0.2799929976 0.2849547863 0.2419216931
+ 0.2832500935 0.2882680893 0.2450876981
+ 0.2864542007 0.2915301919 0.2482271940
+ 0.2896077931 0.2947526872 0.2513332069
+ 0.2927064896 0.2979423106 0.2543987930
+ 0.2957524955 0.3010992110 0.2574329972
+ 0.2987526953 0.3042244911 0.2604371011
+ 0.3017115891 0.3073199987 0.2634117007
+ 0.3046318889 0.3103852868 0.2663584054
+ 0.3075189888 0.3134222031 0.2692733109
+ 0.3103761971 0.3164314032 0.2721604109
+ 0.3132067025 0.3194135129 0.2750195861
+ 0.3160125911 0.3223691881 0.2778514028
+ 0.3187975883 0.3252983987 0.2806541920
+ 0.3215644956 0.3282026947 0.2834334970
+ 0.3243156970 0.3310827017 0.2861855924
+ 0.3270539045 0.3339388072 0.2889156938
+ 0.3297814131 0.3367714882 0.2916230857
+ 0.3325003982 0.3395748138 0.2943058908
+ 0.3352132142 0.3423477113 0.2969624102
+ 0.3379161954 0.3450841904 0.2995971143
+ 0.3405976892 0.3477846980 0.3022120893
+ 0.3432567120 0.3504517972 0.3048096895
+ 0.3458822072 0.3530882001 0.3073847890
+ 0.3484756052 0.3556962013 0.3099358082
+ 0.3510380089 0.3582764864 0.3124623895
+ 0.3535713851 0.3608322144 0.3149712980
+ 0.3560791910 0.3633658886 0.3174606860
+ 0.3585632145 0.3658784032 0.3199287057
+ 0.3610230982 0.3683710098 0.3223791122
+ 0.3634631932 0.3708465993 0.3248122036
+ 0.3658835888 0.3732995093 0.3272255063
+ 0.3682858050 0.3757315874 0.3296200931
+ 0.3706724048 0.3781447113 0.3319934905
+ 0.3730427027 0.3805387020 0.3343470097
+ 0.3754003942 0.3829126954 0.3366861939
+ 0.3777439892 0.3852662146 0.3390057981
+ 0.3800773025 0.3876036108 0.3413096070
+ 0.3823992014 0.3899244070 0.3435958922
+ 0.3847126067 0.3922333121 0.3458688855
+ 0.3870173991 0.3945314884 0.3481296897
+ 0.3893153071 0.3968203068 0.3503778875
+ 0.3916071951 0.3991019130 0.3526121080
+ 0.3938935995 0.4013710022 0.3548285067
+ 0.3961760998 0.4036257863 0.3570280075
+ 0.3984551132 0.4058659971 0.3592115045
+ 0.4007292092 0.4080862999 0.3613776863
+ 0.4029959142 0.4102860093 0.3635272980
+ 0.4052543938 0.4124661088 0.3656620979
+ 0.4075042903 0.4146254957 0.3677802980
+ 0.4097425938 0.4167692065 0.3698835075
+ 0.4119692147 0.4188987911 0.3719711006
+ 0.4141839147 0.4210126996 0.3740384877
+ 0.4163868129 0.4231149852 0.3760899901
+ 0.4185790122 0.4252065122 0.3781270981
+ 0.4207611978 0.4272862077 0.3801490963
+ 0.4229308069 0.4293535054 0.3821552098
+ 0.4250904024 0.4314081967 0.3841435015
+ 0.4272392094 0.4334529042 0.3861171901
+ 0.4293777943 0.4354852140 0.3880780041
+ 0.4315068126 0.4375067949 0.3900259137
+ 0.4336226881 0.4395155013 0.3919605017
+ 0.4357245862 0.4415121973 0.3938809931
+ 0.4378120899 0.4434967041 0.3957869112
+ 0.4398863018 0.4454723895 0.3976789117
+ 0.4419437051 0.4474394917 0.3995566964
+ 0.4439849854 0.4493967891 0.4014219940
+ 0.4460108876 0.4513399899 0.4032762945
+ 0.4480217993 0.4532704055 0.4051195979
+ 0.4500184953 0.4551894069 0.4069514871
+ 0.4520016015 0.4570955932 0.4087724090
+ 0.4539715946 0.4589887857 0.4105815887
+ 0.4559291005 0.4608702958 0.4123832881
+ 0.4578745961 0.4627414048 0.4141762853
+ 0.4598087966 0.4646035135 0.4159627855
+ 0.4617320895 0.4664578140 0.4177407026
+ 0.4636450112 0.4683054090 0.4195122123
+ 0.4655455053 0.4701451063 0.4212754071
+ 0.4674327075 0.4719766080 0.4230324030
+ 0.4693084955 0.4737985134 0.4247812033
+ 0.4711722136 0.4756115079 0.4265238941
+ 0.4730255902 0.4774144888 0.4282588065
+ 0.4748682976 0.4792071879 0.4299876094
+ 0.4766997099 0.4809884131 0.4317089021
+ 0.4785183072 0.4827584922 0.4334239960
+ 0.4803259969 0.4845187962 0.4351322055
+ 0.4821228087 0.4862686992 0.4368340969
+ 0.4839096963 0.4880078137 0.4385294914
+ 0.4856866896 0.4897367954 0.4402182996
+ 0.4874519110 0.4914573133 0.4419007897
+ 0.4892069101 0.4931693077 0.4435743093
+ 0.4909515083 0.4948728085 0.4452398121
+ 0.4926868081 0.4965651035 0.4468953907
+ 0.4944101870 0.4982514977 0.4485433102
+ 0.4961231947 0.4999290109 0.4501810968
+ 0.4978268147 0.5015965104 0.4518086910
+ 0.4995205998 0.5032545924 0.4534263909
+ 0.5012040734 0.5049039721 0.4550347030
+ 0.5028777719 0.5065457225 0.4566338062
+ 0.5045427084 0.5081775188 0.4582231045
+ 0.5061982274 0.5097963214 0.4598028064
+ 0.5078454018 0.5114061832 0.4613744020
+ 0.5094835758 0.5130059123 0.4629381895
+ 0.5111126900 0.5145952106 0.4644944072
+ 0.5127326846 0.5161756873 0.4660434127
+ 0.5143399239 0.5177451968 0.4675836861
+ 0.5159363747 0.5193077922 0.4691169858
+ 0.5175241828 0.5208638906 0.4706437886
+ 0.5191026926 0.5224146247 0.4721643925
+ 0.5206707716 0.5239610076 0.4736790955
+ 0.5222259164 0.5254994035 0.4751864076
+ 0.5237668157 0.5270283818 0.4766879082
+ 0.5252965093 0.5285490751 0.4781832099
+ 0.5268157721 0.5300623775 0.4796718955
+ 0.5283229947 0.5315675139 0.4811522961
+ 0.5298194885 0.5330659151 0.4826253057
+ 0.5313063860 0.5345565081 0.4840922058
+ 0.5327833891 0.5360388160 0.4855529070
+ 0.5342487097 0.5375118852 0.4870058000
+ 0.5357007980 0.5389770865 0.4884487092
+ 0.5371450782 0.5404356718 0.4898858070
+ 0.5385817885 0.5418878198 0.4913172126
+ 0.5400090218 0.5433310866 0.4927395880
+ 0.5414276123 0.5447692871 0.4941565096
+ 0.5428383946 0.5462031960 0.4955680966
+ 0.5442407131 0.5476328731 0.4969739914
+ 0.5456290841 0.5490533710 0.4983738065
+ 0.5470101833 0.5504671931 0.4997689128
+ 0.5483844876 0.5518745184 0.5011597872
+ 0.5497499108 0.5532733202 0.5025461912
+ 0.5511074066 0.5546665788 0.5039262772
+ 0.5524582863 0.5560551286 0.5053020120
+ 0.5538002253 0.5574359298 0.5066723824
+ 0.5551335216 0.5588095188 0.5080367923
+ 0.5564607978 0.5601773858 0.5093978047
+ 0.5577800274 0.5615364909 0.5107548833
+ 0.5590916276 0.5628885031 0.5121051073
+ 0.5603979826 0.5642359853 0.5134513974
+ 0.5616976023 0.5655778050 0.5147926211
+ 0.5629879832 0.5669124126 0.5161284208
+ 0.5642735958 0.5682426095 0.5174611807
+ 0.5655525923 0.5695660710 0.5187898874
+ 0.5668237805 0.5708814859 0.5201147199
+ 0.5680909753 0.5721923113 0.5214365721
+ 0.5693522096 0.5734962225 0.5227527022
+ 0.5706079006 0.5747932792 0.5240650773
+ 0.5718598962 0.5760861039 0.5253748298
+ 0.5731037259 0.5773720741 0.5266771913
+ 0.5743418932 0.5786536932 0.5279759169
+ 0.5755749941 0.5799306035 0.5292711258
+ 0.5768011808 0.5811964869 0.5305575132
+ 0.5780242085 0.5824581981 0.5318406820
+ 0.5792413950 0.5837122202 0.5331183076
+ 0.5804504156 0.5849606991 0.5343890190
+ 0.5816553235 0.5862060785 0.5356559753
+ 0.5828509927 0.5874449015 0.5369136930
+ 0.5840438008 0.5886800289 0.5381681919
+ 0.5852320194 0.5899084210 0.5394172072
+ 0.5864148736 0.5911297202 0.5406591892
+ 0.5875951052 0.5923475027 0.5418981910
+ 0.5887641907 0.5935558081 0.5431274176
+ 0.5899302959 0.5947611928 0.5443540215
+ 0.5910912156 0.5959597826 0.5455750823
+ 0.5922474265 0.5971537828 0.5467911959
+ 0.5934010148 0.5983446836 0.5480040908
+ 0.5945463777 0.5995286107 0.5492113233
+ 0.5956892967 0.6007102132 0.5504168272
+ 0.5968241096 0.6018840075 0.5516167283
+ 0.5979555845 0.6030550003 0.5528140068
+ 0.5990828276 0.6042217016 0.5540074110
+ 0.6002063751 0.6053854227 0.5551959872
+ 0.6013283134 0.6065471768 0.5563817024
+ 0.6024429202 0.6077020764 0.5575634837
+ 0.6035555005 0.6088551879 0.5587441921
+ 0.6046581268 0.6099976897 0.5599179268
+ 0.6057583094 0.6111379862 0.5610895753
+ 0.6068522930 0.6122714281 0.5622550845
+ 0.6079434156 0.6134017706 0.5634173751
+ 0.6090310216 0.6145281196 0.5645756125
+ 0.6101149917 0.6156514287 0.5657300949
+ 0.6111965775 0.6167725921 0.5668820143
+ 0.6122707725 0.6178879738 0.5680285096
+ 0.6133425236 0.6190009117 0.5691730976
+ 0.6144058704 0.6201071143 0.5703091025
+ 0.6154682040 0.6212120056 0.5714436173
+ 0.6165214777 0.6223102212 0.5725712180
+ 0.6175739169 0.6234076023 0.5736979842
+ 0.6186174750 0.6244966984 0.5748155117
+ 0.6196597815 0.6255844831 0.5759319067
+ 0.6206961274 0.6266639233 0.5770416856
+ 0.6217305064 0.6277418733 0.5781496763
+ 0.6227589250 0.6288138032 0.5792517066
+ 0.6237844825 0.6298843026 0.5803521276
+ 0.6248034835 0.6309509873 0.5814481974
+ 0.6258192062 0.6320158839 0.5825421214
+ 0.6268281937 0.6330764294 0.5836308002
+ 0.6278346777 0.6341344714 0.5847169161
+ 0.6288362145 0.6351872087 0.5857974887
+ 0.6298360229 0.6362372041 0.5868756175
+ 0.6308323741 0.6372811794 0.5879486203
+ 0.6318262815 0.6383233070 0.5890188813
+ 0.6328150034 0.6393606067 0.5900835991
+ 0.6338009238 0.6403964162 0.5911462903
+ 0.6347796917 0.6414275765 0.5922037959
+ 0.6357566714 0.6424568295 0.5932598710
+ 0.6367279887 0.6434782147 0.5943114161
+ 0.6376978755 0.6444982290 0.5953620076
+ 0.6386622190 0.6455100775 0.5964084864
+ 0.6396257281 0.6465215087 0.5974544287
+ 0.6405826807 0.6475260854 0.5984926224
+ 0.6415395737 0.6485307217 0.5995308161
+ 0.6424885988 0.6495286226 0.6005603075
+ 0.6434376836 0.6505261064 0.6015896797
+ 0.6443789005 0.6515172720 0.6026117206
+ 0.6453189850 0.6525071859 0.6036325097
+ 0.6462522745 0.6534914970 0.6046487093
+ 0.6471831799 0.6544733047 0.6056631207
+ 0.6481100917 0.6554508209 0.6066738963
+ 0.6490340829 0.6564248204 0.6076821089
+ 0.6499556899 0.6573960781 0.6086879969
+ 0.6508737803 0.6583626866 0.6096904278
+ 0.6517899036 0.6593278050 0.6106911898
+ 0.6526989937 0.6602864265 0.6116858125
+ 0.6536079049 0.6612449884 0.6126803160
+ 0.6545088291 0.6621980071 0.6136667728
+ 0.6554095745 0.6631507874 0.6146532297
+ 0.6563045979 0.6640974879 0.6156343222
+ 0.6571980119 0.6650422812 0.6166138053
+ 0.6580873132 0.6659818292 0.6175904274
+ 0.6589732170 0.6669161916 0.6185643077
+ 0.6598567963 0.6678487062 0.6195365787
+ 0.6607350707 0.6687750220 0.6205043793
+ 0.6616132259 0.6697012782 0.6214722991
+ 0.6624845862 0.6706203818 0.6224306226
+ 0.6633558869 0.6715393066 0.6233887076
+ 0.6642240882 0.6724529266 0.6243417859
+ 0.6650909781 0.6733639836 0.6252925992
+ 0.6659563780 0.6742721200 0.6262406707
+ 0.6668195128 0.6751747727 0.6271843910
+ 0.6676822901 0.6760774255 0.6281278729
+ 0.6685385704 0.6769707799 0.6290643811
+ 0.6693950295 0.6778641939 0.6300008297
+ 0.6702473760 0.6787514091 0.6309322119
+ 0.6710978150 0.6796351075 0.6318609715
+ 0.6719467044 0.6805168986 0.6327874064
+ 0.6727918983 0.6813933253 0.6337075233
+ 0.6736372113 0.6822696924 0.6346276999
+ 0.6744775772 0.6831405163 0.6355414987
+ 0.6753175259 0.6840105057 0.6364545226
+ 0.6761547923 0.6848769188 0.6373646855
+ 0.6769893765 0.6857391000 0.6382718086
+ 0.6778236032 0.6866012216 0.6391788125
+ 0.6786518097 0.6874572039 0.6400815248
+ 0.6794800162 0.6883131862 0.6409841180
+ 0.6803044081 0.6891654730 0.6418827176
+ 0.6811261177 0.6900150180 0.6427782774
+ 0.6819474101 0.6908640862 0.6436731815
+ 0.6827651858 0.6917092800 0.6445615292
+ 0.6835830212 0.6925545931 0.6454498768
+ 0.6843972206 0.6933962703 0.6463342905
+ 0.6852092743 0.6942355037 0.6472160816
+ 0.6860206127 0.6950742006 0.6480973959
+ 0.6868252754 0.6959053874 0.6489725709
+ 0.6876299977 0.6967365742 0.6498478055
+ 0.6884319782 0.6975647807 0.6507201195
+ 0.6892318130 0.6983901858 0.6515899897
+ 0.6900315285 0.6992155910 0.6524599791
+ 0.6908273101 0.7000362873 0.6533246040
+ 0.6916229725 0.7008566856 0.6541891098
+ 0.6924160719 0.7016751170 0.6550511122
+ 0.6932054162 0.7024903297 0.6559094191
+ 0.6939945817 0.7033056021 0.6567676067
+ 0.6947793961 0.7041168213 0.6576201916
+ 0.6955630183 0.7049267292 0.6584712863
+ 0.6963458061 0.7057358027 0.6593216062
+ 0.6971247196 0.7065396905 0.6601678133
+ 0.6979035139 0.7073435187 0.6610140204
+ 0.6986786723 0.7081443071 0.6618571877
+ 0.6994504929 0.7089418769 0.6626976728
+ 0.7002223134 0.7097393870 0.6635380983
+ 0.7009885907 0.7105317712 0.6643719077
+ 0.7017540932 0.7113230824 0.6652045250
+ 0.7025185823 0.7121133804 0.6660360098
+ 0.7032787204 0.7128974795 0.6668620110
+ 0.7040386796 0.7136815786 0.6676880717
+ 0.7047963738 0.7144626975 0.6685119271
+ 0.7055510879 0.7152395248 0.6693329811
+ 0.7063059211 0.7160161734 0.6701539755
+ 0.7070568204 0.7167897224 0.6709715724
+ 0.7078062296 0.7175614834 0.6717876792
+ 0.7085556984 0.7183333039 0.6726037860
+ 0.7092993855 0.7191014290 0.6734123826
+ 0.7100430131 0.7198691964 0.6742205024
+ 0.7107855082 0.7206360102 0.6750273705
+ 0.7115231752 0.7213973999 0.6758279204
+ 0.7122610211 0.7221586704 0.6766282916
+ 0.7129974961 0.7229182124 0.6774265170
+ 0.7137318254 0.7236738801 0.6782206893
+ 0.7144662142 0.7244296074 0.6790148020
+ 0.7151979804 0.7251828909 0.6798056960
+ 0.7159276009 0.7259337902 0.6805936098
+ 0.7166572809 0.7266848087 0.6813815832
+ 0.7173827887 0.7274302840 0.6821650267
+ 0.7181063890 0.7281727791 0.6829462051
+ 0.7188299894 0.7289153934 0.6837273836
+ 0.7195504904 0.7296513915 0.6845042706
+ 0.7202703953 0.7303856015 0.6852802038
+ 0.7209903002 0.7311198115 0.6860560775
+ 0.7217056751 0.7318493724 0.6868286729
+ 0.7224205732 0.7325783968 0.6876009703
+ 0.7231354713 0.7333073020 0.6883733273
+ 0.7238441706 0.7340301275 0.6891400218
+ 0.7245526910 0.7347525954 0.6899065971
+ 0.7252612114 0.7354750037 0.6906729937
+ 0.7259656787 0.7361903191 0.6914319992
+ 0.7266703248 0.7369055152 0.6921910048
+ 0.7273744941 0.7376205921 0.6929497123
+ 0.7280738950 0.7383303046 0.6937026978
+ 0.7287732959 0.7390400171 0.6944558024
+ 0.7294721007 0.7397493720 0.6952087283
+ 0.7301635146 0.7404522896 0.6959573030
+ 0.7308549285 0.7411552072 0.6967059970
+ 0.7315459847 0.7418580055 0.6974545121
+ 0.7322310805 0.7425541878 0.6981990933
+ 0.7329162955 0.7432504296 0.6989436150
+ 0.7336012721 0.7439466119 0.6996881962
+ 0.7342811823 0.7446365952 0.7004261017
+ 0.7349609733 0.7453263998 0.7011638284
+ 0.7356408238 0.7460162044 0.7019016147
+ 0.7363131046 0.7467001081 0.7026333809
+ 0.7369849086 0.7473831773 0.7033646703
+ 0.7376567125 0.7480663061 0.7040959001
+ 0.7383230925 0.7487441897 0.7048221231
+ 0.7389885187 0.7494208217 0.7055472136
+ 0.7396538258 0.7500973940 0.7062721848
+ 0.7403153777 0.7507699132 0.7069926858
+ 0.7409753799 0.7514402866 0.7077111006
+ 0.7416353822 0.7521107197 0.7084295154
+ 0.7422909141 0.7527776957 0.7091451287
+ 0.7429429293 0.7534415126 0.7098584771
+ 0.7435948253 0.7541053891 0.7105718851
+ 0.7442438006 0.7547671199 0.7112827897
+ 0.7448878288 0.7554246187 0.7119894028
+ 0.7455319166 0.7560821176 0.7126960754
+ 0.7461751103 0.7567387223 0.7134013772
+ 0.7468137741 0.7573903203 0.7140998244
+ 0.7474524975 0.7580417991 0.7147980928
+ 0.7480912209 0.7586933970 0.7154964209
+ 0.7487258911 0.7593389750 0.7161883712
+ 0.7493603826 0.7599840760 0.7168800235
+ 0.7499948740 0.7606291771 0.7175716162
+ 0.7506251931 0.7612702250 0.7182598114
+ 0.7512537837 0.7619091272 0.7189463973
+ 0.7518823147 0.7625480294 0.7196329236
+ 0.7525088191 0.7631847262 0.7203181982
+ 0.7531324029 0.7638177872 0.7210013866
+ 0.7537561059 0.7644509077 0.7216845751
+ 0.7543792725 0.7650834918 0.7223674059
+ 0.7549992204 0.7657102942 0.7230455279
+ 0.7556189895 0.7663369775 0.7237235904
+ 0.7562388778 0.7669637203 0.7244017124
+ 0.7568544745 0.7675850987 0.7250748277
+ 0.7574688792 0.7682043910 0.7257462144
+ 0.7580832839 0.7688236833 0.7264177203
+ 0.7586959004 0.7694402933 0.7270871997
+ 0.7593057752 0.7700520158 0.7277535200
+ 0.7599158287 0.7706636190 0.7284198999
+ 0.7605257034 0.7712752819 0.7290862799
+ 0.7611322999 0.7718833089 0.7297480106
+ 0.7617387772 0.7724912167 0.7304096818
+ 0.7623453736 0.7730990052 0.7310714126
+ 0.7629489899 0.7737038136 0.7317304015
+ 0.7635505795 0.7743061781 0.7323871851
+ 0.7641521096 0.7749084830 0.7330440283
+ 0.7647531033 0.7755101919 0.7337000966
+ 0.7653506994 0.7761059999 0.7343516946
+ 0.7659481764 0.7767019272 0.7350031734
+ 0.7665457726 0.7772976756 0.7356547117
+ 0.7671412826 0.7778910995 0.7363024950
+ 0.7677358985 0.7784829140 0.7369480133
+ 0.7683303952 0.7790747881 0.7375935912
+ 0.7689242959 0.7796661258 0.7382383943
+ 0.7695142031 0.7802531719 0.7388777137
+ 0.7701042295 0.7808402181 0.7395170927
+ 0.7706941962 0.7814273238 0.7401564121
+ 0.7712818980 0.7820110917 0.7407931089
+ 0.7718682289 0.7825924754 0.7414278984
+ 0.7724546194 0.7831739187 0.7420626879
+ 0.7730407715 0.7837553024 0.7426972985
+ 0.7736244798 0.7843334079 0.7433282137
+ 0.7742081881 0.7849115729 0.7439591289
+ 0.7747918963 0.7854897976 0.7445899844
+ 0.7753731012 0.7860661745 0.7452182174
+ 0.7759513855 0.7866402864 0.7458429933
+ 0.7765296102 0.7872143984 0.7464678288
+ 0.7771078944 0.7877886295 0.7470927238
+ 0.7776818871 0.7883577943 0.7477130294
+ 0.7782551050 0.7889257073 0.7483323216
+ 0.7788282037 0.7894936800 0.7489516139
+ 0.7794010043 0.7900611162 0.7495700717
+ 0.7799720764 0.7906246781 0.7501844764
+ 0.7805430889 0.7911882997 0.7507988214
+ 0.7811141014 0.7917519212 0.7514132261
+ 0.7816827893 0.7923139930 0.7520251870
+ 0.7822489142 0.7928743958 0.7526345253
+ 0.7828149796 0.7934347987 0.7532438040
+ 0.7833812237 0.7939952016 0.7538530827
+ 0.7839428782 0.7945516706 0.7544584870
+ 0.7845032215 0.7951068282 0.7550626993
+ 0.7850636244 0.7956619859 0.7556669116
+ 0.7856239080 0.7962170839 0.7562711239
+ 0.7861807942 0.7967674732 0.7568696141
+ 0.7867377996 0.7973179221 0.7574681044
+ 0.7872946858 0.7978683114 0.7580665946
+ 0.7878506184 0.7984176874 0.7586637139
+ 0.7884032726 0.7989639044 0.7592564225
+ 0.7889561057 0.7995100021 0.7598490119
+ 0.7895088196 0.8000562191 0.7604417205
+ 0.7900593281 0.8006005883 0.7610327005
+ 0.7906069756 0.8011425138 0.7616212964
+ 0.7911546826 0.8016844988 0.7622098923
+ 0.7917025089 0.8022264242 0.7627984881
+ 0.7922484875 0.8027654886 0.7633846998
+ 0.7927935123 0.8033025861 0.7639691830
+ 0.7933384180 0.8038396239 0.7645537257
+ 0.7938833833 0.8043767214 0.7651382089
+ 0.7944257855 0.8049103022 0.7657201290
+ 0.7949671745 0.8054423928 0.7663009763
+ 0.7955086827 0.8059744239 0.7668818831
+ 0.7960500717 0.8065065145 0.7674626708
+ 0.7965880036 0.8070362210 0.7680410743
+ 0.7971251011 0.8075652122 0.7686188221
+ 0.7976623178 0.8080940843 0.7691965103
+ 0.7981994152 0.8086230755 0.7697743177
+ 0.7987347245 0.8091489077 0.7703492045
+ 0.7992696762 0.8096740842 0.7709236741
+ 0.7998046875 0.8101993203 0.7714982033
+ 0.8003398180 0.8107244968 0.7720727921
+ 0.8008722067 0.8112462759 0.7726444006
+ 0.8014042974 0.8117675781 0.7732155919
+ 0.8019365072 0.8122889996 0.7737869024
+ 0.8024685979 0.8128103018 0.7743582129
+ 0.8029965162 0.8133283257 0.7749258876
+ 0.8035238981 0.8138456941 0.7754932046
+ 0.8040512204 0.8143631816 0.7760605216
+ 0.8045786023 0.8148807287 0.7766278982
+ 0.8051033020 0.8153948188 0.7771916986
+ 0.8056275249 0.8159083128 0.7777550220
+ 0.8061518073 0.8164218068 0.7783182859
+ 0.8066759706 0.8169354200 0.7788816094
+ 0.8071985841 0.8174456954 0.7794430852
+ 0.8077207208 0.8179551959 0.7800040841
+ 0.8082427979 0.8184646964 0.7805652022
+ 0.8087648749 0.8189740777 0.7811262012
+ 0.8092843294 0.8194804788 0.7816848159
+ 0.8098024726 0.8199853897 0.7822422981
+ 0.8103206158 0.8204901814 0.7827997208
+ 0.8108388186 0.8209950924 0.7833572030
+ 0.8113549948 0.8214983940 0.7839121819
+ 0.8118696213 0.8220003843 0.7844650149
+ 0.8123841882 0.8225023746 0.7850177884
+ 0.8128988147 0.8230044842 0.7855706811
+ 0.8134121895 0.8235049844 0.7861223817
+ 0.8139237761 0.8240029812 0.7866721749
+ 0.8144353032 0.8245009780 0.7872220874
+ 0.8149467707 0.8249989152 0.7877719998
+ 0.8154575229 0.8254960775 0.7883214951
+ 0.8159641027 0.8259888887 0.7888690233
+ 0.8164708018 0.8264816999 0.7894164920
+ 0.8169775009 0.8269745111 0.7899640203
+ 0.8174842000 0.8274673223 0.7905114889
+ 0.8179872036 0.8279569149 0.7910552025
+ 0.8184900284 0.8284462094 0.7915986776
+ 0.8189927936 0.8289356232 0.7921422124
+ 0.8194956779 0.8294249177 0.7926856279
+ 0.8199970126 0.8299115896 0.7932267785
+ 0.8204975128 0.8303967714 0.7937667966
+ 0.8209980130 0.8308820128 0.7943068743
+ 0.8214985728 0.8313671947 0.7948468924
+ 0.8219977021 0.8318507075 0.7953858972
+ 0.8224940896 0.8323307037 0.7959229946
+ 0.8229905963 0.8328106999 0.7964602113
+ 0.8234871030 0.8332906961 0.7969973087
+ 0.8239834905 0.8337706923 0.7975344062
+ 0.8244758844 0.8342465758 0.7980670929
+ 0.8249682188 0.8347225189 0.7985997200
+ 0.8254604936 0.8351984024 0.7991324067
+ 0.8259528875 0.8356742859 0.7996649742
+ 0.8264433146 0.8361485004 0.8001952767
+ 0.8269324899 0.8366215229 0.8007240295
+ 0.8274217248 0.8370944858 0.8012526035
+ 0.8279109001 0.8375675082 0.8017812967
+ 0.8283994198 0.8380396962 0.8023093939
+ 0.8288854957 0.8385075927 0.8028346896
+ 0.8293715119 0.8389754891 0.8033601046
+ 0.8298575878 0.8394433856 0.8038854003
+ 0.8303436041 0.8399114013 0.8044108152
+ 0.8308259249 0.8403760791 0.8049324751
+ 0.8313068748 0.8408395052 0.8054528832
+ 0.8317878842 0.8413029909 0.8059732914
+ 0.8322690129 0.8417664170 0.8064936996
+ 0.8327487707 0.8422294855 0.8070130944
+ 0.8332253098 0.8426914215 0.8075290918
+ 0.8337017894 0.8431531787 0.8080450892
+ 0.8341782093 0.8436151147 0.8085610867
+ 0.8346546888 0.8440768719 0.8090770841
+ 0.8351281881 0.8445361853 0.8095903993
+ 0.8356006742 0.8449943066 0.8101025224
+ 0.8360731006 0.8454524279 0.8106147051
+ 0.8365455270 0.8459104896 0.8111268878
+ 0.8370172977 0.8463678956 0.8116385937
+ 0.8374856114 0.8468207121 0.8121470809
+ 0.8379539847 0.8472735286 0.8126556277
+ 0.8384222984 0.8477262855 0.8131639957
+ 0.8388906121 0.8481791019 0.8136724830
+ 0.8393570185 0.8486301899 0.8141798973
+ 0.8398215771 0.8490794897 0.8146862984
+ 0.8402863145 0.8495287895 0.8151926994
+ 0.8407509923 0.8499780893 0.8156991005
+ 0.8412157297 0.8504275084 0.8162055016
+ 0.8416776061 0.8508747816 0.8167092800
+ 0.8421391249 0.8513218760 0.8172127008
+ 0.8426007032 0.8517689705 0.8177161217
+ 0.8430622220 0.8522161245 0.8182194829
+ 0.8435230851 0.8526622057 0.8187221289
+ 0.8439813852 0.8531038761 0.8192216754
+ 0.8444396853 0.8535456061 0.8197212219
+ 0.8448979855 0.8539872766 0.8202207088
+ 0.8453562856 0.8544290066 0.8207201958
+ 0.8458127975 0.8548687100 0.8212186098
+ 0.8462672830 0.8553062081 0.8217157722
+ 0.8467218876 0.8557437062 0.8222129941
+ 0.8471763730 0.8561813235 0.8227102160
+ 0.8476309180 0.8566188216 0.8232073784
+ 0.8480827212 0.8570545912 0.8237022758
+ 0.8485333920 0.8574895859 0.8241963983
+ 0.8489841223 0.8579246998 0.8246904016
+ 0.8494347930 0.8583598137 0.8251844049
+ 0.8498855233 0.8587948084 0.8256785274
+ 0.8503341079 0.8592264056 0.8261687160
+ 0.8507825136 0.8596577048 0.8266587257
+ 0.8512309790 0.8600888848 0.8271486163
+ 0.8516793847 0.8605201840 0.8276385069
+ 0.8521276116 0.8609511256 0.8281282187
+ 0.8525732756 0.8613770008 0.8286157250
+ 0.8530188799 0.8618029952 0.8291031122
+ 0.8534644842 0.8622288704 0.8295904994
+ 0.8539102077 0.8626548052 0.8300778866
+ 0.8543549776 0.8630800843 0.8305646181
+ 0.8547968268 0.8635025024 0.8310487270
+ 0.8552384973 0.8639248013 0.8315327764
+ 0.8556802869 0.8643472195 0.8320168257
+ 0.8561220169 0.8647695184 0.8325008750
+ 0.8565629721 0.8651912212 0.8329836726
+ 0.8570019007 0.8656111956 0.8334634900
+ 0.8574408293 0.8660312295 0.8339433074
+ 0.8578798175 0.8664512038 0.8344230056
+ 0.8583186865 0.8668712974 0.8349028230
+ 0.8587570786 0.8672900796 0.8353816867
+ 0.8591942787 0.8677062988 0.8358588219
+ 0.8596314788 0.8681225181 0.8363357782
+ 0.8600686789 0.8685386777 0.8368129134
+ 0.8605058789 0.8689548969 0.8372899294
+ 0.8609418869 0.8693702221 0.8377658725
+ 0.8613752723 0.8697832823 0.8382393718
+ 0.8618087173 0.8701964021 0.8387128711
+ 0.8622421026 0.8706095219 0.8391863704
+ 0.8626756072 0.8710225224 0.8396599889
+ 0.8631076813 0.8714349866 0.8401322961
+ 0.8635362983 0.8718457222 0.8406013846
+ 0.8639649153 0.8722563982 0.8410704136
+ 0.8643935919 0.8726670146 0.8415395021
+ 0.8648222089 0.8730776906 0.8420084715
+ 0.8652505279 0.8734877110 0.8424770832
+ 0.8656774759 0.8738945723 0.8429431915
+ 0.8661044836 0.8743014932 0.8434094191
+ 0.8665313721 0.8747084141 0.8438755274
+ 0.8669583797 0.8751152754 0.8443416953
+ 0.8673852086 0.8755220175 0.8448076844
+ 0.8678094745 0.8759253025 0.8452700973
+ 0.8682336807 0.8763285875 0.8457326293
+ 0.8686580062 0.8767318726 0.8461951017
+ 0.8690822124 0.8771352172 0.8466575146
+ 0.8695064783 0.8775385022 0.8471199870
+ 0.8699274063 0.8779397011 0.8475784063
+ 0.8703479767 0.8783406019 0.8480362296
+ 0.8707684875 0.8787413836 0.8484939933
+ 0.8711889982 0.8791422844 0.8489518762
+ 0.8716096282 0.8795431852 0.8494096994
+ 0.8720285892 0.8799425960 0.8498654962
+ 0.8724468946 0.8803411722 0.8503202796
+ 0.8728652000 0.8807398081 0.8507750034
+ 0.8732835054 0.8811385036 0.8512297869
+ 0.8737016916 0.8815370798 0.8516845107
+ 0.8741189241 0.8819342852 0.8521381021
+ 0.8745344281 0.8823292851 0.8525899053
+ 0.8749498725 0.8827242255 0.8530418277
+ 0.8753653765 0.8831192255 0.8534936905
+ 0.8757808805 0.8835142255 0.8539454937
+ 0.8761960268 0.8839088082 0.8543971181
+ 0.8766077161 0.8842998147 0.8548464775
+ 0.8770195246 0.8846908212 0.8552958965
+ 0.8774312735 0.8850818872 0.8557451963
+ 0.8778430223 0.8854728937 0.8561946154
+ 0.8782547712 0.8858640194 0.8566439748
+ 0.8786643744 0.8862522244 0.8570917845
+ 0.8790733814 0.8866394758 0.8575391173
+ 0.8794823885 0.8870269060 0.8579865098
+ 0.8798913956 0.8874142170 0.8584337831
+ 0.8803004026 0.8878015280 0.8588811159
+ 0.8807088137 0.8881875873 0.8593277931
+ 0.8811159730 0.8885713816 0.8597732186
+ 0.8815233111 0.8889551759 0.8602187037
+ 0.8819304705 0.8893390298 0.8606641293
+ 0.8823376894 0.8897228837 0.8611094952
+ 0.8827450275 0.8901066780 0.8615549803
+ 0.8831487894 0.8904874921 0.8620001078
+ 0.8835523725 0.8908680081 0.8624451160
+ 0.8839560151 0.8912485242 0.8628901243
+ 0.8843594790 0.8916289806 0.8633351922
+ 0.8847631216 0.8920094967 0.8637802005
+ 0.8851652741 0.8923885822 0.8642246723
+ 0.8855656981 0.8927659988 0.8646684289
+ 0.8859661818 0.8931434155 0.8651121855
+ 0.8863667250 0.8935207725 0.8655558825
+ 0.8867670894 0.8938981891 0.8659995794
+ 0.8871675730 0.8942756057 0.8664432764
+ 0.8875674009 0.8946498036 0.8668851256
+ 0.8879672289 0.8950238228 0.8673267961
+ 0.8883669972 0.8953977823 0.8677684069
+ 0.8887668848 0.8957718015 0.8682100177
+ 0.8891667128 0.8961458206 0.8686516881
+ 0.8895655274 0.8965191841 0.8690931201
+ 0.8899627924 0.8968914151 0.8695340753
+ 0.8903599977 0.8972637057 0.8699750900
+ 0.8907573223 0.8976359963 0.8704161048
+ 0.8911545873 0.8980082870 0.8708571196
+ 0.8915517926 0.8983805776 0.8712980747
+ 0.8919457793 0.8987510800 0.8717380166
+ 0.8923385739 0.8991209269 0.8721774817
+ 0.8927314281 0.8994907141 0.8726168871
+ 0.8931242824 0.8998606205 0.8730564117
+ 0.8935170770 0.9002304077 0.8734958768
+ 0.8939098120 0.9006000161 0.8739352226
+ 0.8943005800 0.9009667039 0.8743724227
+ 0.8946915269 0.9013332725 0.8748096228
+ 0.8950822949 0.9017000198 0.8752468228
+ 0.8954731822 0.9020665884 0.8756840229
+ 0.8958641291 0.9024332762 0.8761211038
+ 0.8962544203 0.9027994275 0.8765580058
+ 0.8966438174 0.9031645060 0.8769943714
+ 0.8970330954 0.9035295844 0.8774306774
+ 0.8974224925 0.9038947225 0.8778669834
+ 0.8978118896 0.9042598009 0.8783034086
+ 0.8982012868 0.9046249986 0.8787397146
+ 0.8985881209 0.9049890041 0.8791750073
+ 0.8989732862 0.9053522944 0.8796095848
+ 0.8993585110 0.9057155848 0.8800442219
+ 0.8997436762 0.9060788751 0.8804787993
+ 0.9001290202 0.9064422250 0.8809133768
+ 0.9005141854 0.9068055153 0.8813480139
+ 0.9008963704 0.9071661234 0.8817806840
+ 0.9012778997 0.9075260162 0.8822128177
+ 0.9016594291 0.9078859091 0.8826448917
+ 0.9020408988 0.9082458019 0.8830770850
+ 0.9024224281 0.9086055756 0.8835092187
+ 0.9028040171 0.9089655280 0.8839412928
+ 0.9031841755 0.9093214869 0.8843724132
+ 0.9035643935 0.9096773267 0.8848034739
+ 0.9039446115 0.9100331068 0.8852344751
+ 0.9043248892 0.9103888273 0.8856655955
+ 0.9047051072 0.9107446074 0.8860967159
+ 0.9050850868 0.9111003280 0.8865275979
+ 0.9054622054 0.9114549756 0.8869568110
+ 0.9058393240 0.9118096828 0.8873859048
+ 0.9062163830 0.9121643901 0.8878151178
+ 0.9065935016 0.9125190973 0.8882442117
+ 0.9069706202 0.9128738046 0.8886734247
+ 0.9073473811 0.9132283926 0.8891022801
+ 0.9077209830 0.9135813117 0.8895288110
+ 0.9080945849 0.9139341712 0.8899552226
+ 0.9084683061 0.9142870903 0.8903816938
+ 0.9088419080 0.9146400094 0.8908082247
+ 0.9092155099 0.9149929285 0.8912346959
+ 0.9095889926 0.9153456092 0.8916611075
+ 0.9099609852 0.9156950712 0.8920863271
+ 0.9103329778 0.9160447121 0.8925114870
+ 0.9107050896 0.9163941741 0.8929367065
+ 0.9110770822 0.9167438149 0.8933618069
+ 0.9114490747 0.9170932770 0.8937870264
+ 0.9118210077 0.9174427986 0.8942121863
+ 0.9121910930 0.9177901149 0.8946360946
+ 0.9125611782 0.9181374907 0.8950601220
+ 0.9129313231 0.9184848070 0.8954840899
+ 0.9133014083 0.9188321233 0.8959079981
+ 0.9136714935 0.9191794991 0.8963320255
+ 0.9140415788 0.9195268154 0.8967558742
+ 0.9144073725 0.9198731780 0.8971791863
+ 0.9147729278 0.9202194810 0.8976023793
+ 0.9151384234 0.9205657840 0.8980255723
+ 0.9155039787 0.9209120274 0.8984488845
+ 0.9158694744 0.9212582707 0.8988720775
+ 0.9162350893 0.9216045737 0.8992952704
+ 0.9165984988 0.9219489098 0.8997182250
+ 0.9169613123 0.9222924709 0.9001411200
+ 0.9173241854 0.9226362109 0.9005638957
+ 0.9176871181 0.9229798913 0.9009867907
+ 0.9180498719 0.9233235121 0.9014096856
+ 0.9184128046 0.9236671925 0.9018325210
+ 0.9187752008 0.9240090251 0.9022544026
+ 0.9191372991 0.9243493080 0.9026756287
+ 0.9194992781 0.9246897101 0.9030967951
+ 0.9198613763 0.9250301123 0.9035180211
+ 0.9202234149 0.9253705144 0.9039391875
+ 0.9205855131 0.9257107973 0.9043604136
+ 0.9209464192 0.9260510802 0.9047812223
+ 0.9213050008 0.9263911247 0.9052013159
+ 0.9216637015 0.9267311096 0.9056212902
+ 0.9220224023 0.9270710945 0.9060413241
+ 0.9223809838 0.9274110794 0.9064614177
+ 0.9227396846 0.9277511239 0.9068813920
+ 0.9230982065 0.9280911088 0.9073014259
+ 0.9234530926 0.9284300804 0.9077206850
+ 0.9238079786 0.9287689924 0.9081398845
+ 0.9241629243 0.9291079044 0.9085592031
+ 0.9245178103 0.9294468760 0.9089784026
+ 0.9248725772 0.9297857881 0.9093977213
+ 0.9252275229 0.9301248193 0.9098169804
+ 0.9255810976 0.9304615259 0.9102349281
+ 0.9259340167 0.9307969809 0.9106521010
+ 0.9262868762 0.9311324954 0.9110692739
+ 0.9266399145 0.9314680099 0.9114865065
+ 0.9269927740 0.9318035841 0.9119036794
+ 0.9273456931 0.9321390986 0.9123209119
+ 0.9276980758 0.9324735999 0.9127377272
+ 0.9280486703 0.9328051209 0.9131532907
+ 0.9283993840 0.9331365824 0.9135689139
+ 0.9287499785 0.9334679842 0.9139844775
+ 0.9291006923 0.9337995052 0.9144001007
+ 0.9294514060 0.9341309071 0.9148157835
+ 0.9298020005 0.9344624281 0.9152314067
+ 0.9301499724 0.9347928762 0.9156460762
+ 0.9304972291 0.9351232052 0.9160605073
+ 0.9308444262 0.9354534745 0.9164749980
+ 0.9311916232 0.9357836843 0.9168894291
+ 0.9315388203 0.9361140132 0.9173039198
+ 0.9318860173 0.9364442825 0.9177182913
+ 0.9322326779 0.9367740154 0.9181321263
+ 0.9325779080 0.9371023774 0.9185441136
+ 0.9329230189 0.9374307990 0.9189561009
+ 0.9332681894 0.9377592206 0.9193680882
+ 0.9336133003 0.9380875826 0.9197800756
+ 0.9339584708 0.9384160042 0.9201921821
+ 0.9343037009 0.9387444258 0.9206042290
+ 0.9346480966 0.9390699267 0.9210147858
+ 0.9349920750 0.9393941760 0.9214248061
+ 0.9353361726 0.9397184253 0.9218348265
+ 0.9356803298 0.9400426745 0.9222449064
+ 0.9360243082 0.9403669238 0.9226549268
+ 0.9363684058 0.9406911135 0.9230648875
+ 0.9367122054 0.9410151839 0.9234749079
+ 0.9370527267 0.9413359165 0.9238840938
+ 0.9373931885 0.9416565895 0.9242933989
+ 0.9377337098 0.9419773817 0.9247027040
+ 0.9380741715 0.9422981143 0.9251120090
+ 0.9384146929 0.9426189065 0.9255211949
+ 0.9387552142 0.9429395795 0.9259305000
+ 0.9390947223 0.9432600141 0.9263395071
+ 0.9394326210 0.9435796142 0.9267479181
+ 0.9397705197 0.9438992739 0.9271563888
+ 0.9401084185 0.9442188740 0.9275647998
+ 0.9404463172 0.9445385933 0.9279732704
+ 0.9407842755 0.9448581934 0.9283816814
+ 0.9411221743 0.9451779127 0.9287902117
+ 0.9414592981 0.9454959035 0.9291977882
+ 0.9417958856 0.9458130002 0.9296048880
+ 0.9421325922 0.9461300969 0.9300119877
+ 0.9424692988 0.9464471936 0.9304192066
+ 0.9428058863 0.9467642903 0.9308263063
+ 0.9431425929 0.9470815063 0.9312335253
+ 0.9434792995 0.9473986030 0.9316406250
+ 0.9438139200 0.9477123022 0.9320465922
+ 0.9441481829 0.9480254054 0.9324523807
+ 0.9444825053 0.9483386278 0.9328582287
+ 0.9448167086 0.9486516714 0.9332640171
+ 0.9451509714 0.9489647746 0.9336698055
+ 0.9454852939 0.9492779970 0.9340755939
+ 0.9458196163 0.9495911002 0.9344813228
+ 0.9461503029 0.9499025941 0.9348856807
+ 0.9464811087 0.9502142072 0.9352900982
+ 0.9468119144 0.9505257010 0.9356945157
+ 0.9471427202 0.9508371949 0.9360988140
+ 0.9474734068 0.9511486888 0.9365031719
+ 0.9478042126 0.9514601827 0.9369075894
+ 0.9481347203 0.9517716765 0.9373118281
+ 0.9484633207 0.9520822167 0.9377142191
+ 0.9487919211 0.9523928165 0.9381167293
+ 0.9491205215 0.9527034163 0.9385191798
+ 0.9494491220 0.9530138969 0.9389216900
+ 0.9497776031 0.9533244967 0.9393242002
+ 0.9501062036 0.9536349773 0.9397267103
+ 0.9504346251 0.9539452195 0.9401286840
+ 0.9507619739 0.9542526007 0.9405273795
+ 0.9510893226 0.9545599818 0.9409261942
+ 0.9514166713 0.9548674226 0.9413250089
+ 0.9517440200 0.9551748037 0.9417237043
+ 0.9520713091 0.9554821253 0.9421225190
+ 0.9523987174 0.9557895064 0.9425212145
+ 0.9527255893 0.9560965896 0.9429191947
+ 0.9530493021 0.9564006925 0.9433112144
+ 0.9533730745 0.9567047954 0.9437032938
+ 0.9536967874 0.9570088983 0.9440953135
+ 0.9540205002 0.9573130012 0.9444872737
+ 0.9543442726 0.9576171041 0.9448792934
+ 0.9546679854 0.9579212070 0.9452713132
+ 0.9549915195 0.9582251906 0.9456630945
+ 0.9553105235 0.9585260153 0.9460486770
+ 0.9556294084 0.9588267803 0.9464343190
+ 0.9559482932 0.9591276050 0.9468199015
+ 0.9562671781 0.9594284296 0.9472054839
+ 0.9565861225 0.9597290754 0.9475911260
+ 0.9569051266 0.9600299001 0.9479767084
+ 0.9572240114 0.9603307247 0.9483622909
+ 0.9575372934 0.9606264234 0.9487441778
+ 0.9578500986 0.9609215260 0.9491255879
+ 0.9581627846 0.9612166286 0.9495071173
+ 0.9584754705 0.9615116715 0.9498885870
+ 0.9587882161 0.9618067741 0.9502701163
+ 0.9591010213 0.9621018767 0.9506515265
+ 0.9594137073 0.9623970985 0.9510329962
+ 0.9597231150 0.9626886845 0.9514123797
+ 0.9600310922 0.9629788995 0.9517909288
+ 0.9603391290 0.9632689953 0.9521692991
+ 0.9606471062 0.9635592103 0.9525477886
+ 0.9609550834 0.9638493061 0.9529262781
+ 0.9612631202 0.9641395211 0.9533047080
+ 0.9615712166 0.9644296765 0.9536831975
+ 0.9618782997 0.9647189975 0.9540600777
+ 0.9621844292 0.9650071859 0.9544352293
+ 0.9624904990 0.9652954936 0.9548102021
+ 0.9627966285 0.9655836821 0.9551852942
+ 0.9631026983 0.9658719897 0.9555603266
+ 0.9634088278 0.9661601782 0.9559352994
+ 0.9637148976 0.9664484859 0.9563103914
+ 0.9640207887 0.9667364955 0.9566850066
+ 0.9643250704 0.9670230150 0.9570569992
+ 0.9646294117 0.9673094153 0.9574289918
+ 0.9649336934 0.9675958753 0.9578009844
+ 0.9652379751 0.9678822756 0.9581729770
+ 0.9655423164 0.9681687951 0.9585450292
+ 0.9658465981 0.9684551954 0.9589170218
+ 0.9661508799 0.9687417150 0.9592890143
+ 0.9664528966 0.9690259099 0.9596589804
+ 0.9667541981 0.9693092108 0.9600282907
+ 0.9670553803 0.9695925713 0.9603976011
+ 0.9673566818 0.9698758721 0.9607669115
+ 0.9676579237 0.9701592922 0.9611362219
+ 0.9679592252 0.9704425931 0.9615054727
+ 0.9682604074 0.9707260132 0.9618747830
+ 0.9685606956 0.9710081220 0.9622433186
+ 0.9688587785 0.9712873101 0.9626101255
+ 0.9691568017 0.9715664983 0.9629768133
+ 0.9694548845 0.9718456864 0.9633435011
+ 0.9697530270 0.9721248746 0.9637103081
+ 0.9700509906 0.9724041224 0.9640769958
+ 0.9703490734 0.9726833105 0.9644438028
+ 0.9706472158 0.9729624987 0.9648104906
+ 0.9709429741 0.9732391238 0.9651746154
+ 0.9712383747 0.9735150933 0.9655379057
+ 0.9715337157 0.9737911224 0.9659013152
+ 0.9718289971 0.9740669727 0.9662647247
+ 0.9721243978 0.9743430018 0.9666280746
+ 0.9724196792 0.9746189713 0.9669914842
+ 0.9727150202 0.9748950005 0.9673548937
+ 0.9730095863 0.9751701951 0.9677174091
+ 0.9733015895 0.9754428864 0.9680770040
+ 0.9735935926 0.9757155776 0.9684365988
+ 0.9738855958 0.9759883285 0.9687961936
+ 0.9741775990 0.9762610197 0.9691557884
+ 0.9744696021 0.9765337110 0.9695153832
+ 0.9747616053 0.9768065214 0.9698749185
+ 0.9750537276 0.9770792127 0.9702345133
+ 0.9753432274 0.9773492813 0.9705916047
+ 0.9756311178 0.9776179194 0.9709470868
+ 0.9759190083 0.9778863788 0.9713026285
+ 0.9762068987 0.9781550169 0.9716581106
+ 0.9764947891 0.9784234762 0.9720135927
+ 0.9767827988 0.9786919951 0.9723690748
+ 0.9770706892 0.9789605737 0.9727246165
+ 0.9773585796 0.9792290926 0.9730800986
+ 0.9776431918 0.9794937968 0.9734309912
+ 0.9779276252 0.9797580838 0.9737815261
+ 0.9782118797 0.9800224900 0.9741320014
+ 0.9784963131 0.9802867770 0.9744824767
+ 0.9787806273 0.9805511236 0.9748330116
+ 0.9790650010 0.9808154106 0.9751834869
+ 0.9793493152 0.9810798168 0.9755340219
+ 0.9796329737 0.9813433886 0.9758836031
+ 0.9799132943 0.9816035032 0.9762284756
+ 0.9801936150 0.9818636179 0.9765734076
+ 0.9804738760 0.9821236730 0.9769182801
+ 0.9807541966 0.9823837876 0.9772632122
+ 0.9810345769 0.9826439023 0.9776080251
+ 0.9813148975 0.9829040170 0.9779528975
+ 0.9815952182 0.9831640720 0.9782978296
+ 0.9818738103 0.9834225178 0.9786403775
+ 0.9821494222 0.9836776853 0.9789785743
+ 0.9824249148 0.9839329123 0.9793167710
+ 0.9827005267 0.9841880798 0.9796550274
+ 0.9829760790 0.9844433069 0.9799932837
+ 0.9832515717 0.9846984744 0.9803314805
+ 0.9835271835 0.9849537015 0.9806696773
+ 0.9838027954 0.9852089286 0.9810078740
+ 0.9840760231 0.9854617715 0.9813424945
+ 0.9843466878 0.9857121110 0.9816730022
+ 0.9846174121 0.9859622717 0.9820033908
+ 0.9848880768 0.9862126112 0.9823338985
+ 0.9851588011 0.9864627719 0.9826642871
+ 0.9854295254 0.9867131114 0.9829946756
+ 0.9857001901 0.9869632721 0.9833251834
+ 0.9859709144 0.9872136116 0.9836555719
+ 0.9862385988 0.9874609709 0.9839816093
+ 0.9865036011 0.9877058268 0.9843034744
+ 0.9867686033 0.9879505038 0.9846252799
+ 0.9870337248 0.9881951809 0.9849470854
+ 0.9872987270 0.9884399772 0.9852690101
+ 0.9875637293 0.9886847138 0.9855908155
+ 0.9878286719 0.9889293909 0.9859126210
+ 0.9880936742 0.9891741872 0.9862344265
+ 0.9883552790 0.9894152284 0.9865508080
+ 0.9886137247 0.9896525741 0.9868618250
+ 0.9888721108 0.9898899198 0.9871727824
+ 0.9891304970 0.9901272058 0.9874837995
+ 0.9893888831 0.9903646111 0.9877948165
+ 0.9896472096 0.9906018972 0.9881057143
+ 0.9899055958 0.9908393025 0.9884166718
+ 0.9901639819 0.9910765886 0.9887276888
+ 0.9904199243 0.9913105965 0.9890335202
+ 0.9906725883 0.9915400147 0.9893323183
+ 0.9909251928 0.9917694926 0.9896311164
+ 0.9911777973 0.9919989109 0.9899299145
+ 0.9914304018 0.9922283292 0.9902285933
+ 0.9916830063 0.9924576879 0.9905273914
+ 0.9919356108 0.9926871061 0.9908261895
+ 0.9921882153 0.9929165244 0.9911249876
+ 0.9924386740 0.9931442142 0.9914202094
+ 0.9926838279 0.9933673143 0.9917060137
+ 0.9929288030 0.9935904145 0.9919918180
+ 0.9931738973 0.9938135147 0.9922776222
+ 0.9934189916 0.9940366149 0.9925634265
+ 0.9936640263 0.9942597151 0.9928491712
+ 0.9939091206 0.9944828153 0.9931349754
+ 0.9941540956 0.9947059751 0.9934207201
+ 0.9943984747 0.9949285984 0.9937055707
+ 0.9946327806 0.9951431751 0.9939746857
+ 0.9948670864 0.9953578115 0.9942438006
+ 0.9951013923 0.9955723882 0.9945129156
+ 0.9953356981 0.9957870841 0.9947819710
+ 0.9955700040 0.9960017204 0.9950512052
+ 0.9958043098 0.9962162971 0.9953203201
+ 0.9960386157 0.9964308739 0.9955893755
+ 0.9962729216 0.9966455102 0.9958584905
+ 0.9964994192 0.9968507290 0.9961140156
+ 0.9967237115 0.9970530868 0.9963654280
+ 0.9969478846 0.9972555041 0.9966169000
+ 0.9971721768 0.9974579215 0.9968683720
+ 0.9973964095 0.9976602793 0.9971199036
+ 0.9976207018 0.9978626966 0.9973713756
+ 0.9978448749 0.9980651140 0.9976227880
+ 0.9980692267 0.9982674718 0.9978743196
+ 0.9982891083 0.9984654784 0.9981188774
+ 0.9985029101 0.9986572862 0.9983540177
+ 0.9987167716 0.9988490939 0.9985892177
+ 0.9989306927 0.9990409017 0.9988242984
+ 0.9991444945 0.9992327094 0.9990593791
+ 0.9993584156 0.9994245768 0.9992945790
+ 0.9995722771 0.9996163845 0.9995297194
+ 0.9997860789 0.9998081923 0.9997649193
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_futura_ii_100.spi1d b/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_futura_ii_100.spi1d
new file mode 100644
index 00000000000..954536785a2
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_futura_ii_100.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0089918738 0.0088112270 0.0067409412
+ 0.0171655007 0.0167162009 0.0131348101
+ 0.0242981501 0.0235243607 0.0187877901
+ 0.0308058802 0.0297358502 0.0239518695
+ 0.0368227884 0.0355986990 0.0288143605
+ 0.0424588397 0.0412245393 0.0334390104
+ 0.0477601402 0.0466648601 0.0378785282
+ 0.0527938083 0.0519550890 0.0421676189
+ 0.0575832911 0.0571624711 0.0463436693
+ 0.0622247718 0.0623087510 0.0504317991
+ 0.0668161213 0.0673468485 0.0544279404
+ 0.0713887885 0.0722417235 0.0583436601
+ 0.0759282932 0.0769878626 0.0621980987
+ 0.0804320127 0.0816073194 0.0659957901
+ 0.0848805234 0.0860867798 0.0697494522
+ 0.0892914683 0.0904396772 0.0734607279
+ 0.0936586633 0.0946798995 0.0771252811
+ 0.0979755297 0.0988209695 0.0807478875
+ 0.1022336036 0.1028660983 0.0843302682
+ 0.1064319983 0.1068392023 0.0878701210
+ 0.1105559021 0.1107354984 0.0913715884
+ 0.1146129966 0.1145422980 0.0948381424
+ 0.1185963973 0.1182733998 0.0982583165
+ 0.1225240976 0.1219324991 0.1016350016
+ 0.1263933927 0.1255291998 0.1049719974
+ 0.1301935017 0.1290597022 0.1082687974
+ 0.1339209974 0.1325256974 0.1115282029
+ 0.1375810951 0.1359412074 0.1147558987
+ 0.1411647946 0.1393028945 0.1179407015
+ 0.1446768939 0.1426129043 0.1210891977
+ 0.1481269002 0.1458766013 0.1242009997
+ 0.1515025944 0.1490920037 0.1272723973
+ 0.1548155993 0.1522623003 0.1303056926
+ 0.1580781043 0.1553830951 0.1333058029
+ 0.1612831950 0.1584683955 0.1362698972
+ 0.1644275039 0.1615206003 0.1391921043
+ 0.1675149053 0.1645296961 0.1420771927
+ 0.1705511063 0.1675007045 0.1449283957
+ 0.1735346019 0.1704356074 0.1477468014
+ 0.1764681935 0.1733424962 0.1505275071
+ 0.1793411970 0.1762108952 0.1532687992
+ 0.1821642965 0.1790487021 0.1559778005
+ 0.1849396974 0.1818661988 0.1586564928
+ 0.1876723021 0.1846542954 0.1613045037
+ 0.1903574020 0.1874137968 0.1639243066
+ 0.1929987073 0.1901445985 0.1665160060
+ 0.1956039965 0.1928485036 0.1690804064
+ 0.1981741041 0.1955288947 0.1716223955
+ 0.2007140964 0.1981831044 0.1741400957
+ 0.2032240033 0.2008188963 0.1766290963
+ 0.2057044953 0.2034270018 0.1790864021
+ 0.2081623971 0.2060122043 0.1815200001
+ 0.2106028944 0.2085773945 0.1839299053
+ 0.2130292058 0.2111182064 0.1863144040
+ 0.2154411972 0.2136391997 0.1886768937
+ 0.2178471982 0.2161431015 0.1910151988
+ 0.2202418000 0.2186270058 0.1933256984
+ 0.2226282060 0.2210904956 0.1956081986
+ 0.2250116020 0.2235327959 0.1978694052
+ 0.2273910940 0.2259615064 0.2001121938
+ 0.2297631949 0.2283712029 0.2023327053
+ 0.2321317047 0.2307610959 0.2045315057
+ 0.2344924062 0.2331354022 0.2067105025
+ 0.2368433028 0.2354861945 0.2088731974
+ 0.2391863018 0.2378192991 0.2110181004
+ 0.2415205985 0.2401355058 0.2131436020
+ 0.2438464016 0.2424366027 0.2152539939
+ 0.2461618036 0.2447226048 0.2173456997
+ 0.2484730929 0.2469923943 0.2194202989
+ 0.2507739067 0.2492519021 0.2214788944
+ 0.2530598044 0.2514967918 0.2235199958
+ 0.2553376853 0.2537238002 0.2255467027
+ 0.2576029897 0.2559401989 0.2275560051
+ 0.2598524094 0.2581427991 0.2295472026
+ 0.2620919049 0.2603318095 0.2315239012
+ 0.2643215060 0.2625105977 0.2334856987
+ 0.2665401995 0.2646790147 0.2354328036
+ 0.2687489986 0.2668366134 0.2373681068
+ 0.2709451020 0.2689833045 0.2392894030
+ 0.2731316984 0.2711197138 0.2411931008
+ 0.2753098011 0.2732459903 0.2430835962
+ 0.2774744034 0.2753610909 0.2449620068
+ 0.2796306908 0.2774659097 0.2468270957
+ 0.2817795873 0.2795613110 0.2486820072
+ 0.2839165926 0.2816452086 0.2505275905
+ 0.2860453129 0.2837195992 0.2523604929
+ 0.2881659865 0.2857829928 0.2541792989
+ 0.2902776897 0.2878372073 0.2559899092
+ 0.2923803031 0.2898777127 0.2577917874
+ 0.2944732904 0.2919048965 0.2595866024
+ 0.2965568006 0.2939237952 0.2613756955
+ 0.2986293137 0.2959322035 0.2631560862
+ 0.3006938994 0.2979266047 0.2649283111
+ 0.3027508855 0.2999104857 0.2666937113
+ 0.3047966063 0.3018867075 0.2684526145
+ 0.3068324924 0.3038511872 0.2702021897
+ 0.3088631034 0.3058032095 0.2719438076
+ 0.3108848929 0.3077456951 0.2736783028
+ 0.3128944933 0.3096817136 0.2754063010
+ 0.3148933947 0.3116078973 0.2771281898
+ 0.3168857992 0.3135224879 0.2788479924
+ 0.3188689053 0.3154281080 0.2805649042
+ 0.3208411932 0.3173280954 0.2822758853
+ 0.3228051066 0.3192209005 0.2839803994
+ 0.3247616887 0.3211036026 0.2856811881
+ 0.3267089128 0.3229758143 0.2873789072
+ 0.3286511004 0.3248389959 0.2890717983
+ 0.3305900991 0.3266923130 0.2907603085
+ 0.3325229883 0.3285365999 0.2924445868
+ 0.3344469070 0.3303725123 0.2941254079
+ 0.3363626897 0.3322010040 0.2958011925
+ 0.3382742107 0.3340212107 0.2974714935
+ 0.3401803970 0.3358336091 0.2991386950
+ 0.3420785964 0.3376361132 0.3008036017
+ 0.3439661860 0.3394295871 0.3024663031
+ 0.3458459079 0.3412173986 0.3041245043
+ 0.3477211893 0.3429979980 0.3057765961
+ 0.3495895863 0.3447695971 0.3074248135
+ 0.3514491022 0.3465310931 0.3090695143
+ 0.3533000052 0.3482857049 0.3107109964
+ 0.3551431000 0.3500339985 0.3123489022
+ 0.3569791913 0.3517752886 0.3139818907
+ 0.3588086069 0.3535098135 0.3156122863
+ 0.3606314957 0.3552359939 0.3172419071
+ 0.3624485135 0.3569523096 0.3188686073
+ 0.3642578125 0.3586593866 0.3204928041
+ 0.3660599887 0.3603613079 0.3221142888
+ 0.3678553998 0.3620558083 0.3237330914
+ 0.3696443141 0.3637424111 0.3253495991
+ 0.3714273870 0.3654215038 0.3269616067
+ 0.3732031882 0.3670935929 0.3285692930
+ 0.3749721944 0.3687596917 0.3301742971
+ 0.3767344952 0.3704194129 0.3317768872
+ 0.3784905076 0.3720717132 0.3333773017
+ 0.3802404106 0.3737153113 0.3349755108
+ 0.3819842935 0.3753502071 0.3365707099
+ 0.3837207854 0.3769770861 0.3381618857
+ 0.3854480982 0.3785960078 0.3397505879
+ 0.3871636093 0.3802081048 0.3413363993
+ 0.3888713121 0.3818149865 0.3429175913
+ 0.3905732930 0.3834156990 0.3444958925
+ 0.3922694027 0.3850092888 0.3460716903
+ 0.3939583898 0.3865957856 0.3476448953
+ 0.3956395090 0.3881759942 0.3492155969
+ 0.3973124027 0.3897528052 0.3507837951
+ 0.3989773989 0.3913241029 0.3523463905
+ 0.4006344974 0.3928903043 0.3539063931
+ 0.4022842050 0.3944503963 0.3554647863
+ 0.4039269090 0.3960036933 0.3570212126
+ 0.4055627882 0.3975501060 0.3585749865
+ 0.4071914852 0.3990882933 0.3601273000
+ 0.4088127911 0.4006206095 0.3616780043
+ 0.4104264975 0.4021480083 0.3632257879
+ 0.4120318890 0.4036706090 0.3647710979
+ 0.4136281908 0.4051879048 0.3663145900
+ 0.4152132869 0.4066968858 0.3678534031
+ 0.4167909920 0.4081991017 0.3693884909
+ 0.4183610082 0.4096961021 0.3709208965
+ 0.4199230969 0.4111889005 0.3724510074
+ 0.4214732051 0.4126752913 0.3739764094
+ 0.4230127037 0.4141556919 0.3754990995
+ 0.4245432913 0.4156309962 0.3770196140
+ 0.4260652065 0.4171015918 0.3785375953
+ 0.4275765121 0.4185652137 0.3800503016
+ 0.4290784895 0.4200240970 0.3815599978
+ 0.4305722117 0.4214783013 0.3830671012
+ 0.4320571125 0.4229275882 0.3845714033
+ 0.4335275888 0.4243701994 0.3860712945
+ 0.4349885881 0.4258084893 0.3875694871
+ 0.4364405870 0.4272427857 0.3890654147
+ 0.4378808141 0.4286721051 0.3905574977
+ 0.4393113852 0.4300973117 0.3920451999
+ 0.4407345057 0.4315193892 0.3935315013
+ 0.4421485960 0.4329378009 0.3950169981
+ 0.4435501993 0.4343496859 0.3964990079
+ 0.4449434876 0.4357573986 0.3979789019
+ 0.4463286996 0.4371610880 0.3994567990
+ 0.4477010071 0.4385577142 0.4009310007
+ 0.4490672052 0.4399507046 0.4024015069
+ 0.4504272938 0.4413402975 0.4038689137
+ 0.4517762065 0.4427213967 0.4053323865
+ 0.4531182945 0.4440990090 0.4067929983
+ 0.4544540942 0.4454734921 0.4082511961
+ 0.4557775855 0.4468427896 0.4097048938
+ 0.4570952952 0.4482089877 0.4111567140
+ 0.4584074914 0.4495720863 0.4126070142
+ 0.4597108960 0.4509283006 0.4140538871
+ 0.4610100091 0.4522809982 0.4154989123
+ 0.4623034894 0.4536291957 0.4169419110
+ 0.4635887146 0.4549719095 0.4183813035
+ 0.4648694992 0.4563120902 0.4198183119
+ 0.4661431015 0.4576481879 0.4212512076
+ 0.4674094021 0.4589804113 0.4226809144
+ 0.4686715007 0.4603103101 0.4241088927
+ 0.4699237943 0.4616335034 0.4255332053
+ 0.4711718857 0.4629541039 0.4269537926
+ 0.4724155962 0.4642721117 0.4283713996
+ 0.4736534059 0.4655844867 0.4297845066
+ 0.4748887122 0.4668945074 0.4311957955
+ 0.4761190116 0.4681994021 0.4326032996
+ 0.4773451984 0.4694997966 0.4340074062
+ 0.4785684049 0.4707967937 0.4354093969
+ 0.4797854125 0.4720880985 0.4368061125
+ 0.4810002148 0.4733774066 0.4382002950
+ 0.4822092950 0.4746614993 0.4395891130
+ 0.4834147990 0.4759416878 0.4409742951
+ 0.4846169055 0.4772185087 0.4423570931
+ 0.4858146906 0.4784907103 0.4437364042
+ 0.4870111048 0.4797612131 0.4451141953
+ 0.4882034063 0.4810256064 0.4464867115
+ 0.4893937111 0.4822880924 0.4478574991
+ 0.4905807078 0.4835473895 0.4492256939
+ 0.4917649031 0.4848031998 0.4505923092
+ 0.4929473102 0.4860568047 0.4519579113
+ 0.4941253960 0.4873049855 0.4533194900
+ 0.4953022897 0.4885519147 0.4546799958
+ 0.4964750111 0.4897922873 0.4560363889
+ 0.4976463020 0.4910312891 0.4573906064
+ 0.4988138080 0.4922665060 0.4587404132
+ 0.4999791980 0.4934988022 0.4600867033
+ 0.5011422038 0.4947274923 0.4614296854
+ 0.5023019910 0.4959532917 0.4627693892
+ 0.5034598708 0.4971773922 0.4641076028
+ 0.5046142936 0.4983972907 0.4654398859
+ 0.5057677031 0.4996159971 0.4667710960
+ 0.5069164038 0.5008293986 0.4680955112
+ 0.5080643892 0.5020418763 0.4694189131
+ 0.5092083812 0.5032485127 0.4707360864
+ 0.5103514194 0.5044537783 0.4720517099
+ 0.5114902854 0.5056533813 0.4733619988
+ 0.5126280189 0.5068514943 0.4746705890
+ 0.5137624741 0.5080453753 0.4759756923
+ 0.5148952007 0.5092371702 0.4772787094
+ 0.5160247087 0.5104253888 0.4785786867
+ 0.5171523094 0.5116108060 0.4798755050
+ 0.5182775259 0.5127922893 0.4811685979
+ 0.5194002986 0.5139706731 0.4824582040
+ 0.5205205083 0.5151454806 0.4837445021
+ 0.5216385126 0.5163174272 0.4850262105
+ 0.5227543712 0.5174863935 0.4863041043
+ 0.5238677263 0.5186526775 0.4875771999
+ 0.5249785781 0.5198165774 0.4888466895
+ 0.5260874033 0.5209770203 0.4901134968
+ 0.5271940231 0.5221341848 0.4913783967
+ 0.5282983184 0.5232884884 0.4926396906
+ 0.5294001102 0.5244398713 0.4938982129
+ 0.5304998755 0.5255879164 0.4951525033
+ 0.5315973759 0.5267319083 0.4964028895
+ 0.5326929092 0.5278732777 0.4976496994
+ 0.5337855816 0.5290107727 0.4988923073
+ 0.5348768830 0.5301455259 0.5001319051
+ 0.5359653831 0.5312750936 0.5013670921
+ 0.5370525718 0.5324026942 0.5025998950
+ 0.5381363034 0.5335251093 0.5038275123
+ 0.5392193198 0.5346459746 0.5050536990
+ 0.5402988195 0.5357596874 0.5062742829
+ 0.5413780808 0.5368732214 0.5074942708
+ 0.5424528718 0.5379806757 0.5087080002
+ 0.5435277224 0.5390880704 0.5099217296
+ 0.5445986986 0.5401890874 0.5111290216
+ 0.5456693172 0.5412895083 0.5123360753
+ 0.5467364192 0.5423848033 0.5135380030
+ 0.5478023291 0.5434783101 0.5147387981
+ 0.5488657951 0.5445675254 0.5159347057
+ 0.5499275923 0.5456534028 0.5171278119
+ 0.5509874821 0.5467371941 0.5183176994
+ 0.5520446897 0.5478175282 0.5195037723
+ 0.5531010032 0.5488967896 0.5206878185
+ 0.5541540980 0.5499712825 0.5218651891
+ 0.5552070737 0.5510457754 0.5230425000
+ 0.5562556982 0.5521146059 0.5242115855
+ 0.5573040843 0.5531831980 0.5253806710
+ 0.5583497286 0.5542473793 0.5265437961
+ 0.5593940020 0.5553098917 0.5277050734
+ 0.5604363084 0.5563696027 0.5288618803
+ 0.5614761114 0.5574259162 0.5300140977
+ 0.5625151992 0.5584810972 0.5311648846
+ 0.5635510087 0.5595309734 0.5323101282
+ 0.5645866990 0.5605809093 0.5334553123
+ 0.5656185150 0.5616251826 0.5345945954
+ 0.5666496754 0.5626686215 0.5357334018
+ 0.5676786900 0.5637084246 0.5368676782
+ 0.5687059760 0.5647451878 0.5379989743
+ 0.5697323084 0.5657805800 0.5391280055
+ 0.5707550049 0.5668106079 0.5402505994
+ 0.5717777014 0.5678406954 0.5413731933
+ 0.5727970004 0.5688648820 0.5424870849
+ 0.5738158226 0.5698879957 0.5435999036
+ 0.5748323798 0.5709078908 0.5447078943
+ 0.5758466721 0.5719239712 0.5458114147
+ 0.5768607259 0.5729396939 0.5469142199
+ 0.5778710842 0.5739501119 0.5480110049
+ 0.5788813829 0.5749605894 0.5491077900
+ 0.5798888803 0.5759674907 0.5501992106
+ 0.5808948278 0.5769727230 0.5512881875
+ 0.5818998814 0.5779765844 0.5523753166
+ 0.5829018950 0.5789757967 0.5534570813
+ 0.5839039087 0.5799751282 0.5545389056
+ 0.5849025846 0.5809702873 0.5556156039
+ 0.5859003067 0.5819640756 0.5566909909
+ 0.5868967772 0.5829563141 0.5577639937
+ 0.5878906250 0.5839440823 0.5588322282
+ 0.5888844132 0.5849320292 0.5599002838
+ 0.5898746848 0.5859153867 0.5609617233
+ 0.5908641219 0.5868976116 0.5620216727
+ 0.5918524861 0.5878787041 0.5630789995
+ 0.5928381085 0.5888563991 0.5641300082
+ 0.5938236713 0.5898339748 0.5651810169
+ 0.5948061943 0.5908092260 0.5662257075
+ 0.5957874060 0.5917832851 0.5672683120
+ 0.5967680812 0.5927566886 0.5683094859
+ 0.5977455974 0.5937262774 0.5693448782
+ 0.5987229943 0.5946959257 0.5703802705
+ 0.5996980071 0.5956636071 0.5714107752
+ 0.6006711721 0.5966296196 0.5724381804
+ 0.6016442776 0.5975956917 0.5734654069
+ 0.6026139259 0.5985574722 0.5744841099
+ 0.6035832763 0.5995190740 0.5755028725
+ 0.6045511961 0.6004796028 0.5765179992
+ 0.6055163741 0.6014376879 0.5775272250
+ 0.6064814925 0.6023957729 0.5785365105
+ 0.6074441075 0.6033508778 0.5795394778
+ 0.6084054708 0.6043046117 0.5805402994
+ 0.6093667746 0.6052582264 0.5815405846
+ 0.6103240252 0.6062085032 0.5825338960
+ 0.6112812161 0.6071587205 0.5835272074
+ 0.6122370958 0.6081075072 0.5845175982
+ 0.6131905913 0.6090533137 0.5855029821
+ 0.6141440868 0.6099991798 0.5864884853
+ 0.6150950193 0.6109429002 0.5874683857
+ 0.6160442829 0.6118853092 0.5884453058
+ 0.6169936061 0.6128277183 0.5894222260
+ 0.6179397106 0.6137663126 0.5903909206
+ 0.6188852787 0.6147043109 0.5913589001
+ 0.6198304892 0.6156420112 0.5923253894
+ 0.6207720041 0.6165766120 0.5932837725
+ 0.6217133999 0.6175112128 0.5942422152
+ 0.6226537228 0.6184443831 0.5951976180
+ 0.6235914826 0.6193746924 0.5961477160
+ 0.6245294213 0.6203050017 0.5970978737
+ 0.6254649758 0.6212335825 0.5980439782
+ 0.6263986826 0.6221604943 0.5989869237
+ 0.6273323894 0.6230874062 0.5999299288
+ 0.6282635927 0.6240113974 0.6008661985
+ 0.6291937232 0.6249340177 0.6018002033
+ 0.6301239133 0.6258566976 0.6027342081
+ 0.6310505271 0.6267765164 0.6036599874
+ 0.6319764853 0.6276957989 0.6045848131
+ 0.6329025030 0.6286150813 0.6055094004
+ 0.6338251233 0.6295301914 0.6064245105
+ 0.6347475052 0.6304453015 0.6073396206
+ 0.6356697083 0.6313601136 0.6082538962
+ 0.6365880966 0.6322718263 0.6091607809
+ 0.6375064254 0.6331834793 0.6100676060
+ 0.6384242773 0.6340945959 0.6109727025
+ 0.6393392086 0.6350020766 0.6118695140
+ 0.6402540207 0.6359096169 0.6127663255
+ 0.6411681175 0.6368162036 0.6136608124
+ 0.6420788765 0.6377186179 0.6145474911
+ 0.6429896951 0.6386210918 0.6154342294
+ 0.6438996792 0.6395224929 0.6163187027
+ 0.6448069811 0.6404194832 0.6171966195
+ 0.6457142830 0.6413165927 0.6180744767
+ 0.6466206908 0.6422126889 0.6189501882
+ 0.6475239992 0.6431049109 0.6198194027
+ 0.6484273076 0.6439971924 0.6206886172
+ 0.6493299007 0.6448885202 0.6215558052
+ 0.6502298117 0.6457754970 0.6224160790
+ 0.6511296034 0.6466624737 0.6232764721
+ 0.6520287991 0.6475486159 0.6241351962
+ 0.6529247165 0.6484292150 0.6249868274
+ 0.6538205147 0.6493096948 0.6258383989
+ 0.6547160745 0.6501898170 0.6266890764
+ 0.6556084752 0.6510639787 0.6275333762
+ 0.6565008759 0.6519382000 0.6283777952
+ 0.6573932767 0.6528124213 0.6292219758
+ 0.6582819223 0.6536806226 0.6300593019
+ 0.6591703296 0.6545485854 0.6308966279
+ 0.6600587964 0.6554166079 0.6317338943
+ 0.6609442830 0.6562796235 0.6325649023
+ 0.6618294120 0.6571416855 0.6333950758
+ 0.6627144217 0.6580038071 0.6342253089
+ 0.6635968089 0.6588618159 0.6350504160
+ 0.6644778848 0.6597180963 0.6358736753
+ 0.6653590202 0.6605743766 0.6366969943
+ 0.6662384272 0.6614277959 0.6375163794
+ 0.6671161056 0.6622784734 0.6383327842
+ 0.6679939032 0.6631292105 0.6391491294
+ 0.6688703895 0.6639782190 0.6399635077
+ 0.6697443128 0.6648234725 0.6407744288
+ 0.6706181765 0.6656687856 0.6415852904
+ 0.6714916825 0.6665136218 0.6423954964
+ 0.6723623276 0.6673536897 0.6432008743
+ 0.6732327938 0.6681938171 0.6440063715
+ 0.6741033196 0.6690338850 0.6448118091
+ 0.6749706268 0.6698697209 0.6456125975
+ 0.6758372784 0.6707047820 0.6464126706
+ 0.6767038703 0.6715397835 0.6472128034
+ 0.6775687933 0.6723722219 0.6480097771
+ 0.6784321070 0.6732022762 0.6488046050
+ 0.6792954803 0.6740325093 0.6495993733
+ 0.6801578999 0.6748616099 0.6503927112
+ 0.6810173988 0.6756870151 0.6511822939
+ 0.6818770170 0.6765124798 0.6519718170
+ 0.6827365160 0.6773380041 0.6527613997
+ 0.6835916042 0.6781579256 0.6535460949
+ 0.6844462752 0.6789773107 0.6543303728
+ 0.6853010058 0.6797965765 0.6551148295
+ 0.6861529946 0.6806129813 0.6558970809
+ 0.6870027184 0.6814268231 0.6566780210
+ 0.6878523827 0.6822406054 0.6574587822
+ 0.6887013912 0.6830536127 0.6582391262
+ 0.6895464063 0.6838616729 0.6590166092
+ 0.6903914213 0.6846699119 0.6597940922
+ 0.6912363768 0.6854779720 0.6605716944
+ 0.6920778751 0.6862823963 0.6613466740
+ 0.6929180026 0.6870855093 0.6621211171
+ 0.6937581897 0.6878886223 0.6628953815
+ 0.6945971251 0.6886901855 0.6636688113
+ 0.6954327226 0.6894879937 0.6644400954
+ 0.6962683201 0.6902858019 0.6652113795
+ 0.6971039176 0.6910836101 0.6659826040
+ 0.6979358196 0.6918777227 0.6667515039
+ 0.6987668276 0.6926708817 0.6675199270
+ 0.6995977163 0.6934641004 0.6682882905
+ 0.7004268765 0.6942554712 0.6690558195
+ 0.7012518048 0.6950421929 0.6698213816
+ 0.7020766735 0.6958289742 0.6705870032
+ 0.7029017210 0.6966156960 0.6713526845
+ 0.7037221789 0.6973984838 0.6721162796
+ 0.7045413256 0.6981800199 0.6728792787
+ 0.7053604126 0.6989613771 0.6736422777
+ 0.7061784267 0.6997417808 0.6744047999
+ 0.7069919109 0.7005174756 0.6751654148
+ 0.7078052759 0.7012931108 0.6759259105
+ 0.7086187005 0.7020686865 0.6766865253
+ 0.7094289064 0.7028416991 0.6774455905
+ 0.7102369070 0.7036126852 0.6782038808
+ 0.7110447884 0.7043836713 0.6789621115
+ 0.7118527889 0.7051547170 0.6797204018
+ 0.7126556039 0.7059206963 0.6804764867
+ 0.7134582996 0.7066864967 0.6812325716
+ 0.7142608762 0.7074524164 0.6819887161
+ 0.7150620222 0.7082164884 0.6827440858
+ 0.7158594728 0.7089766860 0.6834982038
+ 0.7166571021 0.7097368836 0.6842523217
+ 0.7174546123 0.7104970813 0.6850063801
+ 0.7182490826 0.7112538218 0.6857591867
+ 0.7190417051 0.7120084167 0.6865115166
+ 0.7198343277 0.7127628922 0.6872637272
+ 0.7206268907 0.7135174870 0.6880158782
+ 0.7214152217 0.7142676115 0.6887664795
+ 0.7222030163 0.7150173187 0.6895170808
+ 0.7229908109 0.7157669067 0.6902676225
+ 0.7237780094 0.7165157795 0.6910178065
+ 0.7245612144 0.7172604799 0.6917667985
+ 0.7253444791 0.7180052996 0.6925156713
+ 0.7261276841 0.7187500000 0.6932647228
+ 0.7269088030 0.7194930911 0.6940131187
+ 0.7276861072 0.7202336192 0.6947606206
+ 0.7284634709 0.7209740877 0.6955081820
+ 0.7292407751 0.7217146754 0.6962556839
+ 0.7300150990 0.7224528193 0.6970024705
+ 0.7307869792 0.7231891155 0.6977487803
+ 0.7315589190 0.7239254117 0.6984950900
+ 0.7323307991 0.7246617079 0.6992413998
+ 0.7330988050 0.7253944278 0.6999868155
+ 0.7338652015 0.7261255980 0.7007319927
+ 0.7346317172 0.7268568277 0.7014772296
+ 0.7353981137 0.7275879979 0.7022224069
+ 0.7361603975 0.7283154130 0.7029678822
+ 0.7369217873 0.7290419936 0.7037134767
+ 0.7376831770 0.7297685742 0.7044590712
+ 0.7384446859 0.7304952145 0.7052047849
+ 0.7392014265 0.7312179208 0.7059507966
+ 0.7399578094 0.7319403291 0.7066968083
+ 0.7407141924 0.7326626778 0.7074428201
+ 0.7414705753 0.7333850861 0.7081888914
+ 0.7422224879 0.7341023088 0.7089354992
+ 0.7429742813 0.7348194718 0.7096819878
+ 0.7437260747 0.7355365753 0.7104285955
+ 0.7444778085 0.7362536788 0.7111750841
+ 0.7452235222 0.7369664907 0.7119207978
+ 0.7459692955 0.7376793027 0.7126665115
+ 0.7467150092 0.7383921146 0.7134122252
+ 0.7474606037 0.7391046882 0.7141578197
+ 0.7482010126 0.7398132086 0.7149025798
+ 0.7489414215 0.7405217290 0.7156472802
+ 0.7496817708 0.7412303090 0.7163920999
+ 0.7504222989 0.7419388294 0.7171369195
+ 0.7511572838 0.7426438928 0.7178807259
+ 0.7518922091 0.7433488965 0.7186245918
+ 0.7526270747 0.7440540195 0.7193683982
+ 0.7533621192 0.7447590828 0.7201123238
+ 0.7540926933 0.7454611063 0.7208564281
+ 0.7548229098 0.7461627722 0.7216005921
+ 0.7555531859 0.7468644977 0.7223448157
+ 0.7562834024 0.7475662231 0.7230889201
+ 0.7570096850 0.7482659221 0.7238321900
+ 0.7577350736 0.7489652038 0.7245752811
+ 0.7584605217 0.7496644258 0.7253183722
+ 0.7591857910 0.7503635883 0.7260615230
+ 0.7599074841 0.7510594130 0.7268037796
+ 0.7606273293 0.7517535090 0.7275456786
+ 0.7613471150 0.7524476051 0.7282875776
+ 0.7620670199 0.7531417012 0.7290294766
+ 0.7627841234 0.7538337111 0.7297707796
+ 0.7634984851 0.7545235753 0.7305114269
+ 0.7642129064 0.7552134991 0.7312520742
+ 0.7649273872 0.7559034228 0.7319927216
+ 0.7656403184 0.7565919757 0.7327328920
+ 0.7663499117 0.7572777867 0.7334721088
+ 0.7670595050 0.7579635978 0.7342113853
+ 0.7677689791 0.7586494088 0.7349506021
+ 0.7684782743 0.7593349814 0.7356896996
+ 0.7691832185 0.7600160837 0.7364274859
+ 0.7698879838 0.7606971860 0.7371652126
+ 0.7705928087 0.7613782883 0.7379028797
+ 0.7712976933 0.7620593905 0.7386407256
+ 0.7719981074 0.7627363801 0.7393770814
+ 0.7726973295 0.7634121776 0.7401133180
+ 0.7733964920 0.7640879750 0.7408493757
+ 0.7740957141 0.7647637129 0.7415854931
+ 0.7747924924 0.7654371262 0.7423207760
+ 0.7754864097 0.7661076188 0.7430552840
+ 0.7761803865 0.7667781115 0.7437896729
+ 0.7768744230 0.7674486041 0.7445241213
+ 0.7775678039 0.7681186199 0.7452582717
+ 0.7782570124 0.7687847018 0.7459908724
+ 0.7789462805 0.7694507241 0.7467234731
+ 0.7796354890 0.7701168060 0.7474560738
+ 0.7803246975 0.7707828879 0.7481886744
+ 0.7810096741 0.7714446783 0.7489197850
+ 0.7816932201 0.7721049190 0.7496504784
+ 0.7823767066 0.7727652192 0.7503811717
+ 0.7830601931 0.7734254003 0.7511119246
+ 0.7837420702 0.7740842104 0.7518419027
+ 0.7844206095 0.7747399211 0.7525705099
+ 0.7850990891 0.7753955722 0.7532991171
+ 0.7857775092 0.7760512829 0.7540277839
+ 0.7864559889 0.7767069936 0.7547563910
+ 0.7871304154 0.7773585916 0.7554832101
+ 0.7878041267 0.7780095935 0.7562096715
+ 0.7884777784 0.7786604762 0.7569361925
+ 0.7891514897 0.7793114185 0.7576625943
+ 0.7898237109 0.7799605727 0.7583882809
+ 0.7904931903 0.7806066871 0.7591124773
+ 0.7911627889 0.7812528014 0.7598366737
+ 0.7918323874 0.7818987966 0.7605609298
+ 0.7925019264 0.7825449109 0.7612851858
+ 0.7931671143 0.7831870914 0.7620074153
+ 0.7938314080 0.7838284969 0.7627292275
+ 0.7944955826 0.7844697833 0.7634510994
+ 0.7951598167 0.7851111889 0.7641729116
+ 0.7958226800 0.7857515812 0.7648941278
+ 0.7964813113 0.7863892913 0.7656133771
+ 0.7971398830 0.7870268822 0.7663328052
+ 0.7977985740 0.7876644731 0.7670521140
+ 0.7984572053 0.7883021832 0.7677714825
+ 0.7991123796 0.7889375091 0.7684891224
+ 0.7997658253 0.7895715833 0.7692058086
+ 0.8004190922 0.7902057171 0.7699226141
+ 0.8010724783 0.7908397913 0.7706393003
+ 0.8017258048 0.7914739251 0.7713559866
+ 0.8023747206 0.7921038866 0.7720699906
+ 0.8030235171 0.7927339077 0.7727841139
+ 0.8036723733 0.7933639288 0.7734981179
+ 0.8043212295 0.7939940095 0.7742121220
+ 0.8049684167 0.7946221232 0.7749251127
+ 0.8056119084 0.7952463031 0.7756363153
+ 0.8062555194 0.7958704829 0.7763475180
+ 0.8068990111 0.7964947224 0.7770587206
+ 0.8075426221 0.7971189022 0.7777698040
+ 0.8081833124 0.7977399826 0.7784792185
+ 0.8088219762 0.7983589172 0.7791873813
+ 0.8094608188 0.7989779115 0.7798956037
+ 0.8100996017 0.7995969057 0.7806038260
+ 0.8107383251 0.8002158999 0.7813121080
+ 0.8113725185 0.8008310199 0.7820175886
+ 0.8120058179 0.8014454246 0.7827227712
+ 0.8126389980 0.8020598292 0.7834278941
+ 0.8132722974 0.8026741743 0.7841330767
+ 0.8139054179 0.8032884002 0.7848380208
+ 0.8145325184 0.8038988113 0.7855399847
+ 0.8151596189 0.8045092821 0.7862420082
+ 0.8157867193 0.8051196933 0.7869439125
+ 0.8164138198 0.8057301044 0.7876458764
+ 0.8170399070 0.8063399196 0.7883471251
+ 0.8176615238 0.8069468737 0.7890458107
+ 0.8182830811 0.8075540066 0.7897444963
+ 0.8189046979 0.8081610203 0.7904431224
+ 0.8195263743 0.8087679744 0.7911418080
+ 0.8201465011 0.8093742728 0.7918393016
+ 0.8207632899 0.8099786043 0.7925345898
+ 0.8213800788 0.8105828762 0.7932298779
+ 0.8219968081 0.8111872077 0.7939251065
+ 0.8226135969 0.8117914796 0.7946203947
+ 0.8232282996 0.8123940229 0.7953141928
+ 0.8238397241 0.8129937053 0.7960060239
+ 0.8244510293 0.8135933876 0.7966976762
+ 0.8250623941 0.8141930103 0.7973895073
+ 0.8256736994 0.8147926927 0.7980812788
+ 0.8262823820 0.8153901100 0.7987713814
+ 0.8268874884 0.8159844279 0.7994595766
+ 0.8274924755 0.8165788054 0.8001477122
+ 0.8280975223 0.8171731234 0.8008359075
+ 0.8287026286 0.8177673817 0.8015239835
+ 0.8293048739 0.8183599710 0.8022106290
+ 0.8299033046 0.8189499974 0.8028950095
+ 0.8305016160 0.8195400238 0.8035795093
+ 0.8310999870 0.8201299906 0.8042638898
+ 0.8316984177 0.8207200170 0.8049483895
+ 0.8322945237 0.8213084936 0.8056312799
+ 0.8328866959 0.8218945265 0.8063120246
+ 0.8334789276 0.8224804997 0.8069925904
+ 0.8340710998 0.8230664730 0.8076732755
+ 0.8346632719 0.8236525059 0.8083540201
+ 0.8352540135 0.8242375851 0.8090333939
+ 0.8358410001 0.8248205781 0.8097102046
+ 0.8364279270 0.8254035711 0.8103870153
+ 0.8370147943 0.8259866238 0.8110637069
+ 0.8376017213 0.8265694976 0.8117405176
+ 0.8381876945 0.8271517754 0.8124166131
+ 0.8387684822 0.8277295828 0.8130893707
+ 0.8393492103 0.8283075094 0.8137621880
+ 0.8399299979 0.8288853765 0.8144350052
+ 0.8405107260 0.8294633031 0.8151078224
+ 0.8410913944 0.8300412297 0.8157805800
+ 0.8416661024 0.8306139112 0.8164492846
+ 0.8422405720 0.8311864138 0.8171179891
+ 0.8428151011 0.8317589760 0.8177868128
+ 0.8433896899 0.8323314786 0.8184555173
+ 0.8439642191 0.8329041004 0.8191242218
+ 0.8445343971 0.8334730864 0.8197888136
+ 0.8451033235 0.8340409994 0.8204522729
+ 0.8456721902 0.8346089125 0.8211157918
+ 0.8462411165 0.8351768255 0.8217793107
+ 0.8468099833 0.8357446790 0.8224428296
+ 0.8473765850 0.8363106847 0.8231034875
+ 0.8479408026 0.8368747234 0.8237618208
+ 0.8485050201 0.8374385834 0.8244199753
+ 0.8490692973 0.8380026221 0.8250783086
+ 0.8496335149 0.8385666013 0.8257365227
+ 0.8501964808 0.8391299844 0.8263936043
+ 0.8507544994 0.8396906853 0.8270465136
+ 0.8513123989 0.8402515054 0.8276994228
+ 0.8518704176 0.8408122063 0.8283522725
+ 0.8524283171 0.8413730264 0.8290051818
+ 0.8529862761 0.8419337273 0.8296582103
+ 0.8535385728 0.8424912095 0.8303064108
+ 0.8540899158 0.8430479765 0.8309540153
+ 0.8546411991 0.8436049223 0.8316016197
+ 0.8551924825 0.8441618085 0.8322492242
+ 0.8557438254 0.8447186947 0.8328968287
+ 0.8562924862 0.8452731967 0.8335418105
+ 0.8568379879 0.8458250165 0.8341839910
+ 0.8573834896 0.8463767767 0.8348261714
+ 0.8579289913 0.8469285965 0.8354684114
+ 0.8584744930 0.8474804163 0.8361105919
+ 0.8590198755 0.8480321169 0.8367525935
+ 0.8595604897 0.8485792279 0.8373904824
+ 0.8601011038 0.8491263986 0.8380283117
+ 0.8606415987 0.8496735096 0.8386662006
+ 0.8611822128 0.8502206206 0.8393040895
+ 0.8617228270 0.8507677913 0.8399419785
+ 0.8622605205 0.8513128757 0.8405768275
+ 0.8627955914 0.8518565297 0.8412091136
+ 0.8633307815 0.8524000049 0.8418415189
+ 0.8638659120 0.8529435992 0.8424739242
+ 0.8644011021 0.8534870744 0.8431062102
+ 0.8649361134 0.8540306091 0.8437383771
+ 0.8654658198 0.8545699716 0.8443654180
+ 0.8659955263 0.8551093936 0.8449923992
+ 0.8665251732 0.8556488156 0.8456193805
+ 0.8670548797 0.8561881781 0.8462464213
+ 0.8675845861 0.8567274809 0.8468734026
+ 0.8681117296 0.8572648168 0.8474978805
+ 0.8686357141 0.8577994704 0.8481194973
+ 0.8691598177 0.8583341241 0.8487411141
+ 0.8696838021 0.8588687778 0.8493627906
+ 0.8702077866 0.8594034910 0.8499844074
+ 0.8707317710 0.8599380851 0.8506060243
+ 0.8712515831 0.8604686856 0.8512223959
+ 0.8717706203 0.8609983921 0.8518378139
+ 0.8722895980 0.8615282178 0.8524531126
+ 0.8728085756 0.8620579243 0.8530684710
+ 0.8733276129 0.8625876904 0.8536838889
+ 0.8738456964 0.8631166816 0.8542981148
+ 0.8743596077 0.8636423945 0.8549072742
+ 0.8748735189 0.8641679883 0.8555164933
+ 0.8753873110 0.8646935821 0.8561257124
+ 0.8759012222 0.8652192950 0.8567348719
+ 0.8764150739 0.8657448888 0.8573440909
+ 0.8769264817 0.8662691116 0.8579511046
+ 0.8774347901 0.8667913079 0.8585553765
+ 0.8779432178 0.8673136234 0.8591597080
+ 0.8784515858 0.8678358793 0.8597639799
+ 0.8789598942 0.8683581948 0.8603683710
+ 0.8794683218 0.8688805103 0.8609727025
+ 0.8799737096 0.8694002032 0.8615736961
+ 0.8804777265 0.8699188232 0.8621733785
+ 0.8809818029 0.8704373240 0.8627730012
+ 0.8814858198 0.8709558845 0.8633726835
+ 0.8819897771 0.8714743853 0.8639724255
+ 0.8824939132 0.8719930053 0.8645719886
+ 0.8829929233 0.8725072145 0.8651664853
+ 0.8834912181 0.8730208278 0.8657605052
+ 0.8839895725 0.8735345006 0.8663544059
+ 0.8844879270 0.8740481138 0.8669483066
+ 0.8849862218 0.8745617270 0.8675422072
+ 0.8854843974 0.8750752807 0.8681359291
+ 0.8859770298 0.8755844831 0.8687235117
+ 0.8864694834 0.8760938048 0.8693109751
+ 0.8869621158 0.8766030073 0.8698986173
+ 0.8874546289 0.8771122098 0.8704861999
+ 0.8879472017 0.8776214719 0.8710737228
+ 0.8884391189 0.8781303167 0.8716604114
+ 0.8889269233 0.8786363006 0.8722419143
+ 0.8894146085 0.8791422844 0.8728232980
+ 0.8899024129 0.8796483278 0.8734048009
+ 0.8903900981 0.8801543117 0.8739861846
+ 0.8908779025 0.8806601763 0.8745676875
+ 0.8913648129 0.8811656237 0.8751479983
+ 0.8918477297 0.8816679120 0.8757237196
+ 0.8923305869 0.8821702003 0.8762993217
+ 0.8928135037 0.8826724291 0.8768749833
+ 0.8932964206 0.8831747174 0.8774505854
+ 0.8937792778 0.8836770058 0.8780263066
+ 0.8942611814 0.8841785789 0.8786008954
+ 0.8947380781 0.8846768141 0.8791710138
+ 0.8952149153 0.8851749897 0.8797410727
+ 0.8956918120 0.8856732249 0.8803111911
+ 0.8961687088 0.8861714005 0.8808813095
+ 0.8966454864 0.8866695762 0.8814514279
+ 0.8971219063 0.8871673942 0.8820207119
+ 0.8975936174 0.8876612782 0.8825843930
+ 0.8980653286 0.8881552815 0.8831480145
+ 0.8985369802 0.8886492252 0.8837116957
+ 0.8990086913 0.8891432285 0.8842753768
+ 0.8994804025 0.8896371126 0.8848391175
+ 0.8999521136 0.8901311159 0.8854026198
+ 0.9004188776 0.8906217217 0.8859593272
+ 0.9008855820 0.8911123276 0.8865159750
+ 0.9013522863 0.8916028738 0.8870726228
+ 0.9018189907 0.8920934796 0.8876292706
+ 0.9022856951 0.8925840855 0.8881859779
+ 0.9027525187 0.8930746913 0.8887426853
+ 0.9032139182 0.8935613036 0.8892936707
+ 0.9036744833 0.8940473199 0.8898438811
+ 0.9041351080 0.8945332170 0.8903939724
+ 0.9045956731 0.8950191736 0.8909441829
+ 0.9050561786 0.8955051899 0.8914942741
+ 0.9055168033 0.8959910870 0.8920444846
+ 0.9059740901 0.8964738250 0.8925905228
+ 0.9064297080 0.8969547153 0.8931344151
+ 0.9068853259 0.8974357247 0.8936784267
+ 0.9073408842 0.8979166150 0.8942223191
+ 0.9077963829 0.8983975053 0.8947662711
+ 0.9082520008 0.8988783956 0.8953102231
+ 0.9087055922 0.8993577957 0.8958514929
+ 0.9091560841 0.8998348713 0.8963887095
+ 0.9096066952 0.9003120065 0.8969259858
+ 0.9100571871 0.9007890224 0.8974633217
+ 0.9105077982 0.9012660980 0.8980004787
+ 0.9109582901 0.9017431736 0.8985378146
+ 0.9114084840 0.9022198915 0.8990743160
+ 0.9118540883 0.9026929140 0.8996040821
+ 0.9122998118 0.9031658173 0.9001339078
+ 0.9127454162 0.9036387801 0.9006636739
+ 0.9131910801 0.9041116834 0.9011934996
+ 0.9136366844 0.9045847058 0.9017233253
+ 0.9140822887 0.9050576091 0.9022530913
+ 0.9145244956 0.9055281878 0.9027777910
+ 0.9149652719 0.9059978724 0.9033007026
+ 0.9154061079 0.9064676166 0.9038236141
+ 0.9158468843 0.9069373012 0.9043465257
+ 0.9162877798 0.9074069262 0.9048693776
+ 0.9167286158 0.9078766108 0.9053922892
+ 0.9171674848 0.9083452225 0.9059128165
+ 0.9176024795 0.9088112712 0.9064283967
+ 0.9180374146 0.9092773795 0.9069439173
+ 0.9184722900 0.9097434878 0.9074594975
+ 0.9189072847 0.9102094769 0.9079750180
+ 0.9193422198 0.9106755853 0.9084905982
+ 0.9197770953 0.9111416936 0.9090061188
+ 0.9202072024 0.9116048217 0.9095147848
+ 0.9206364155 0.9120672941 0.9100224972
+ 0.9210656285 0.9125298262 0.9105300903
+ 0.9214947224 0.9129922986 0.9110376835
+ 0.9219238758 0.9134547114 0.9115452766
+ 0.9223530889 0.9139171839 0.9120529294
+ 0.9227808118 0.9143785834 0.9125580192
+ 0.9232053757 0.9148374200 0.9130582809
+ 0.9236298800 0.9152963161 0.9135584831
+ 0.9240545034 0.9157550931 0.9140588045
+ 0.9244791269 0.9162139893 0.9145590067
+ 0.9249035716 0.9166728854 0.9150593281
+ 0.9253281951 0.9171317220 0.9155594707
+ 0.9257494211 0.9175868034 0.9160538912
+ 0.9261695147 0.9180405736 0.9165465832
+ 0.9265896082 0.9184945226 0.9170392156
+ 0.9270097017 0.9189482927 0.9175319076
+ 0.9274297953 0.9194021821 0.9180244803
+ 0.9278498888 0.9198560119 0.9185171127
+ 0.9282693267 0.9203091860 0.9190087914
+ 0.9286841154 0.9207581282 0.9194943905
+ 0.9290989041 0.9212068915 0.9199801087
+ 0.9295135736 0.9216557145 0.9204657078
+ 0.9299284220 0.9221044779 0.9209513068
+ 0.9303432107 0.9225534201 0.9214370251
+ 0.9307579994 0.9230021834 0.9219226241
+ 0.9311705828 0.9234492183 0.9224053025
+ 0.9315806031 0.9238939285 0.9228845239
+ 0.9319906235 0.9243385792 0.9233636856
+ 0.9324005842 0.9247832894 0.9238429070
+ 0.9328106046 0.9252279997 0.9243221283
+ 0.9332206249 0.9256727099 0.9248012900
+ 0.9336305857 0.9261174202 0.9252805114
+ 0.9340372086 0.9265592098 0.9257540703
+ 0.9344422817 0.9269996285 0.9262254834
+ 0.9348474145 0.9274401069 0.9266968966
+ 0.9352524877 0.9278805256 0.9271683097
+ 0.9356576204 0.9283210039 0.9276397228
+ 0.9360626936 0.9287614226 0.9281110764
+ 0.9364678264 0.9292019010 0.9285824895
+ 0.9368677139 0.9296385050 0.9290475249
+ 0.9372671247 0.9300746918 0.9295117855
+ 0.9376664162 0.9305108786 0.9299762249
+ 0.9380658269 0.9309471250 0.9304406047
+ 0.9384651780 0.9313833117 0.9309049845
+ 0.9388645291 0.9318194985 0.9313693047
+ 0.9392635822 0.9322556257 0.9318333268
+ 0.9396575093 0.9326885939 0.9322912097
+ 0.9400513768 0.9331216216 0.9327492118
+ 0.9404454231 0.9335545897 0.9332070947
+ 0.9408392906 0.9339876175 0.9336650968
+ 0.9412332177 0.9344205856 0.9341230989
+ 0.9416270852 0.9348536134 0.9345809817
+ 0.9420204759 0.9352859855 0.9350377917
+ 0.9424101710 0.9357147813 0.9354882240
+ 0.9427999854 0.9361435771 0.9359384775
+ 0.9431897998 0.9365724921 0.9363889098
+ 0.9435796142 0.9370012879 0.9368392229
+ 0.9439694285 0.9374300838 0.9372895956
+ 0.9443591833 0.9378589988 0.9377400279
+ 0.9447481036 0.9382869005 0.9381886721
+ 0.9451332092 0.9387105107 0.9386302829
+ 0.9455183744 0.9391341209 0.9390718937
+ 0.9459034801 0.9395576715 0.9395135045
+ 0.9462885857 0.9399812222 0.9399551153
+ 0.9466736913 0.9404047728 0.9403967261
+ 0.9470589161 0.9408283830 0.9408382773
+ 0.9474430084 0.9412512183 0.9412782192
+ 0.9478216767 0.9416697025 0.9417101145
+ 0.9482004046 0.9420881867 0.9421418905
+ 0.9485790730 0.9425066710 0.9425737858
+ 0.9489578009 0.9429252148 0.9430056810
+ 0.9493365288 0.9433436990 0.9434375167
+ 0.9497151971 0.9437621832 0.9438694119
+ 0.9500933290 0.9441801906 0.9443004727
+ 0.9504646063 0.9445917010 0.9447228909
+ 0.9508358240 0.9450030923 0.9451454282
+ 0.9512069821 0.9454146028 0.9455677867
+ 0.9515783191 0.9458261132 0.9459903240
+ 0.9519494772 0.9462375045 0.9464128017
+ 0.9523206949 0.9466490149 0.9468352199
+ 0.9526919723 0.9470605254 0.9472576976
+ 0.9530565739 0.9474642873 0.9476736784
+ 0.9534208179 0.9478675127 0.9480893016
+ 0.9537848830 0.9482707977 0.9485049844
+ 0.9541491270 0.9486740828 0.9489206076
+ 0.9545133114 0.9490773082 0.9493361712
+ 0.9548773766 0.9494805932 0.9497517943
+ 0.9552416205 0.9498838782 0.9501674175
+ 0.9556018114 0.9502828717 0.9505789876
+ 0.9559605122 0.9506804943 0.9509891272
+ 0.9563192129 0.9510779977 0.9513992071
+ 0.9566779137 0.9514756203 0.9518092871
+ 0.9570366740 0.9518731236 0.9522194266
+ 0.9573953748 0.9522706866 0.9526295066
+ 0.9577540755 0.9526681900 0.9530395865
+ 0.9581105709 0.9530637264 0.9534469247
+ 0.9584643841 0.9534568191 0.9538511038
+ 0.9588183165 0.9538499117 0.9542552829
+ 0.9591721296 0.9542430043 0.9546595812
+ 0.9595260024 0.9546362162 0.9550638199
+ 0.9598798752 0.9550293088 0.9554679990
+ 0.9602336884 0.9554224014 0.9558722973
+ 0.9605869055 0.9558148980 0.9562754035
+ 0.9609360099 0.9562035203 0.9566727877
+ 0.9612851143 0.9565922022 0.9570701122
+ 0.9616342187 0.9569808245 0.9574674964
+ 0.9619833827 0.9573695064 0.9578648806
+ 0.9623324871 0.9577581882 0.9582623243
+ 0.9626815915 0.9581468105 0.9586595893
+ 0.9630306959 0.9585354924 0.9590569735
+ 0.9633762240 0.9589205980 0.9594489932
+ 0.9637206793 0.9593046904 0.9598394036
+ 0.9640650749 0.9596887827 0.9602298141
+ 0.9644095898 0.9600728750 0.9606202841
+ 0.9647539854 0.9604570270 0.9610106945
+ 0.9650985003 0.9608411193 0.9614012241
+ 0.9654428959 0.9612252116 0.9617915750
+ 0.9657856226 0.9616078138 0.9621797204
+ 0.9661247730 0.9619873166 0.9625632167
+ 0.9664641023 0.9623668194 0.9629465938
+ 0.9668033123 0.9627463222 0.9633300900
+ 0.9671425223 0.9631258249 0.9637135267
+ 0.9674816728 0.9635053277 0.9640970230
+ 0.9678210020 0.9638847113 0.9644804001
+ 0.9681602120 0.9642642140 0.9648638964
+ 0.9684944749 0.9646391869 0.9652413726
+ 0.9688279033 0.9650132060 0.9656177759
+ 0.9691612124 0.9653872252 0.9659941792
+ 0.9694945216 0.9657611847 0.9663705826
+ 0.9698278904 0.9661352038 0.9667469859
+ 0.9701611996 0.9665092230 0.9671233892
+ 0.9704945087 0.9668831825 0.9674997926
+ 0.9708263874 0.9672555923 0.9678742290
+ 0.9711539745 0.9676234126 0.9682434201
+ 0.9714816213 0.9679911137 0.9686124921
+ 0.9718093276 0.9683588743 0.9689816833
+ 0.9721369147 0.9687265754 0.9693508148
+ 0.9724645019 0.9690943956 0.9697200060
+ 0.9727920890 0.9694622159 0.9700891972
+ 0.9731197953 0.9698299170 0.9704583287
+ 0.9734438062 0.9701938033 0.9708225727
+ 0.9737656713 0.9705553055 0.9711840749
+ 0.9740875959 0.9709169269 0.9715456963
+ 0.9744095802 0.9712784290 0.9719071984
+ 0.9747315049 0.9716399908 0.9722688198
+ 0.9750534296 0.9720014930 0.9726303220
+ 0.9753754139 0.9723631144 0.9729918838
+ 0.9756972790 0.9727246165 0.9733533859
+ 0.9760133028 0.9730800986 0.9737070799
+ 0.9763289094 0.9734352231 0.9740604162
+ 0.9766445756 0.9737904072 0.9744136930
+ 0.9769601822 0.9741454720 0.9747670293
+ 0.9772757888 0.9745005965 0.9751201868
+ 0.9775915146 0.9748557210 0.9754735231
+ 0.9779071212 0.9752107859 0.9758267999
+ 0.9782214761 0.9755647182 0.9761784077
+ 0.9785307050 0.9759128094 0.9765232205
+ 0.9788398147 0.9762609005 0.9768680930
+ 0.9791489244 0.9766091108 0.9772129059
+ 0.9794579744 0.9769572020 0.9775577188
+ 0.9797672033 0.9773054123 0.9779024720
+ 0.9800763130 0.9776535034 0.9782472849
+ 0.9803854227 0.9780015945 0.9785920978
+ 0.9806922078 0.9783468843 0.9789335728
+ 0.9809947014 0.9786871076 0.9792693257
+ 0.9812973142 0.9790272117 0.9796050191
+ 0.9815999269 0.9793673754 0.9799407721
+ 0.9819024801 0.9797075987 0.9802765250
+ 0.9822049737 0.9800478220 0.9806122184
+ 0.9825075865 0.9803879857 0.9809479117
+ 0.9828101993 0.9807282090 0.9812836051
+ 0.9831092954 0.9810643196 0.9816148877
+ 0.9834046960 0.9813960195 0.9819414020
+ 0.9837002158 0.9817277789 0.9822679162
+ 0.9839956164 0.9820595980 0.9825943708
+ 0.9842910171 0.9823912978 0.9829208851
+ 0.9845864177 0.9827231169 0.9832475185
+ 0.9848818183 0.9830548167 0.9835739732
+ 0.9851772189 0.9833865762 0.9839004874
+ 0.9854683280 0.9837135077 0.9842218161
+ 0.9857556820 0.9840362072 0.9845384955
+ 0.9860429764 0.9843589067 0.9848552942
+ 0.9863303900 0.9846814871 0.9851719737
+ 0.9866176844 0.9850041866 0.9854887724
+ 0.9869050980 0.9853268862 0.9858055115
+ 0.9871923923 0.9856495261 0.9861223102
+ 0.9874798059 0.9859722257 0.9864389896
+ 0.9877628088 0.9862895012 0.9867501855
+ 0.9880418181 0.9866018295 0.9870560765
+ 0.9883208275 0.9869140983 0.9873620272
+ 0.9885997772 0.9872264266 0.9876679182
+ 0.9888787866 0.9875386953 0.9879738092
+ 0.9891577959 0.9878510237 0.9882797003
+ 0.9894368052 0.9881632924 0.9885855913
+ 0.9897158146 0.9884756207 0.9888914824
+ 0.9899904728 0.9887828231 0.9891915917
+ 0.9902597070 0.9890834093 0.9894841909
+ 0.9905288815 0.9893839955 0.9897767901
+ 0.9907981157 0.9896845818 0.9900693893
+ 0.9910672903 0.9899852276 0.9903619885
+ 0.9913365245 0.9902858138 0.9906545877
+ 0.9916056991 0.9905864000 0.9909471869
+ 0.9918748736 0.9908869863 0.9912399054
+ 0.9921408892 0.9911842942 0.9915285110
+ 0.9923989177 0.9914734960 0.9918072224
+ 0.9926568866 0.9917625785 0.9920858741
+ 0.9929149151 0.9920517802 0.9923645854
+ 0.9931728840 0.9923409820 0.9926434159
+ 0.9934309125 0.9926301241 0.9929221272
+ 0.9936888814 0.9929193258 0.9932007790
+ 0.9939469099 0.9932084084 0.9934794903
+ 0.9942042232 0.9934967756 0.9937573075
+ 0.9944509864 0.9937735200 0.9940230846
+ 0.9946978092 0.9940503240 0.9942888021
+ 0.9949445724 0.9943270087 0.9945545793
+ 0.9951913953 0.9946038127 0.9948202968
+ 0.9954382181 0.9948804975 0.9950860739
+ 0.9956849813 0.9951573014 0.9953517914
+ 0.9959318042 0.9954339862 0.9956176281
+ 0.9961786866 0.9957107902 0.9958834052
+ 0.9964144826 0.9959757924 0.9961376190
+ 0.9966472983 0.9962375760 0.9963884950
+ 0.9968799949 0.9964993000 0.9966394901
+ 0.9971128106 0.9967610240 0.9968904257
+ 0.9973455071 0.9970228076 0.9971414208
+ 0.9975783229 0.9972844720 0.9973922968
+ 0.9978110194 0.9975461960 0.9976432920
+ 0.9980437756 0.9978079200 0.9978942275
+ 0.9982696176 0.9980614185 0.9981374741
+ 0.9984859228 0.9983037710 0.9983702898
+ 0.9987022281 0.9985461235 0.9986031055
+ 0.9989184737 0.9987884164 0.9988359213
+ 0.9991347790 0.9990307093 0.9990686774
+ 0.9993510842 0.9992730021 0.9993016124
+ 0.9995673895 0.9995154142 0.9995344281
+ 0.9997836947 0.9997577071 0.9997671843
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_futura_ii_200.spi1d b/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_futura_ii_200.spi1d
new file mode 100644
index 00000000000..66c098890fe
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_futura_ii_200.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0175220203 0.0159201808 0.0112829898
+ 0.0302315596 0.0280031394 0.0208480097
+ 0.0407330506 0.0385310091 0.0291486792
+ 0.0501033999 0.0480892099 0.0366973914
+ 0.0587283783 0.0569948703 0.0437196717
+ 0.0668726563 0.0654532537 0.0503452383
+ 0.0746254995 0.0734657720 0.0566753708
+ 0.0821137205 0.0811266303 0.0627593473
+ 0.0893652514 0.0885340869 0.0686344281
+ 0.0964666009 0.0956818983 0.0743253529
+ 0.1034414992 0.1026156992 0.0798535123
+ 0.1102956012 0.1093306020 0.0852200314
+ 0.1170141026 0.1157635972 0.0904216021
+ 0.1235916987 0.1219805032 0.0954708308
+ 0.1299463063 0.1280032992 0.1003969014
+ 0.1360912025 0.1338655055 0.1052050963
+ 0.1420111060 0.1395675987 0.1098947003
+ 0.1477487981 0.1450989991 0.1144763976
+ 0.1533298045 0.1504811943 0.1189825982
+ 0.1587764025 0.1557295024 0.1233960986
+ 0.1640834063 0.1608278006 0.1277330071
+ 0.1692633927 0.1657993942 0.1319945008
+ 0.1743295044 0.1706517041 0.1361728013
+ 0.1792751998 0.1754034013 0.1402668059
+ 0.1841226965 0.1800453961 0.1442912966
+ 0.1888726950 0.1845912039 0.1482613981
+ 0.1935237944 0.1890432984 0.1521809995
+ 0.1980873048 0.1934227943 0.1560502052
+ 0.2025565058 0.1977252066 0.1598621011
+ 0.2069393992 0.2019387037 0.1636209041
+ 0.2112462074 0.2060763985 0.1673309952
+ 0.2154687047 0.2101363987 0.1709980965
+ 0.2196132988 0.2141312063 0.1746173948
+ 0.2236949950 0.2180649042 0.1781916022
+ 0.2277055979 0.2219256014 0.1817201972
+ 0.2316590995 0.2257197052 0.1852061003
+ 0.2355517000 0.2294515073 0.1886554062
+ 0.2393918931 0.2331303954 0.1920740008
+ 0.2431806028 0.2367579043 0.1954559982
+ 0.2469168007 0.2403406054 0.1987928003
+ 0.2505995929 0.2438685000 0.2020907998
+ 0.2542274892 0.2473488003 0.2053564936
+ 0.2578184903 0.2507809997 0.2085936964
+ 0.2613571882 0.2541683912 0.2117979974
+ 0.2648550868 0.2575106919 0.2149727941
+ 0.2683109939 0.2608149052 0.2181185931
+ 0.2717253864 0.2640857995 0.2212391943
+ 0.2750979960 0.2673158050 0.2243300974
+ 0.2784220874 0.2705042958 0.2273901999
+ 0.2817071974 0.2736572921 0.2304214984
+ 0.2849532962 0.2767716050 0.2334305048
+ 0.2881663144 0.2798540890 0.2364110053
+ 0.2913444042 0.2829042077 0.2393691987
+ 0.2944832146 0.2859222889 0.2423065007
+ 0.2975896001 0.2889142036 0.2452152967
+ 0.3006660938 0.2918727994 0.2480936944
+ 0.3037149906 0.2947992980 0.2509461045
+ 0.3067280948 0.2976973951 0.2537800968
+ 0.3097102046 0.3005683124 0.2565920949
+ 0.3126625121 0.3034102917 0.2593840063
+ 0.3155854940 0.3062278926 0.2621518970
+ 0.3184789121 0.3090203106 0.2648904026
+ 0.3213432133 0.3117856979 0.2676062882
+ 0.3241868913 0.3145250082 0.2703030109
+ 0.3270075023 0.3172332048 0.2729845047
+ 0.3298006058 0.3199186921 0.2756457031
+ 0.3325676918 0.3225826025 0.2782875001
+ 0.3353078067 0.3252244890 0.2809073031
+ 0.3380177915 0.3278487027 0.2835057080
+ 0.3406989872 0.3304544091 0.2860867977
+ 0.3433553874 0.3330389857 0.2886512876
+ 0.3459919989 0.3356043994 0.2911956012
+ 0.3486098945 0.3381497860 0.2937203944
+ 0.3512117863 0.3406724036 0.2962253094
+ 0.3537960052 0.3431720138 0.2987118959
+ 0.3563596904 0.3456499875 0.3011856973
+ 0.3589065075 0.3481073976 0.3036412895
+ 0.3614340127 0.3505432010 0.3060742915
+ 0.3639450073 0.3529601097 0.3084880114
+ 0.3664397895 0.3553602993 0.3108876050
+ 0.3689151108 0.3577440977 0.3132722974
+ 0.3713718057 0.3601129949 0.3156406879
+ 0.3738071918 0.3624683917 0.3179928064
+ 0.3762201071 0.3648113012 0.3203321099
+ 0.3786138892 0.3671433032 0.3226552010
+ 0.3809883893 0.3694634140 0.3249565065
+ 0.3833450079 0.3717713058 0.3272385001
+ 0.3856788874 0.3740625978 0.3295018971
+ 0.3879950047 0.3763391078 0.3317486942
+ 0.3902960122 0.3786000907 0.3339833021
+ 0.3925783932 0.3808402121 0.3362008929
+ 0.3948448002 0.3830653131 0.3384015858
+ 0.3970947862 0.3852767050 0.3405882120
+ 0.3993253112 0.3874705136 0.3427591920
+ 0.4015383124 0.3896510005 0.3449178934
+ 0.4037337899 0.3918201923 0.3470610082
+ 0.4059110880 0.3939774036 0.3491885066
+ 0.4080676138 0.3961207867 0.3513003886
+ 0.4102075100 0.3982515931 0.3533968031
+ 0.4123331010 0.4003694952 0.3554781973
+ 0.4144445062 0.4024741054 0.3575446904
+ 0.4165400863 0.4045642912 0.3595972955
+ 0.4186260104 0.4066396058 0.3616338074
+ 0.4207012057 0.4087007046 0.3636533022
+ 0.4227670133 0.4107474089 0.3656555116
+ 0.4248233140 0.4127795100 0.3676426113
+ 0.4268693924 0.4147967100 0.3696162105
+ 0.4289070964 0.4167988002 0.3715760112
+ 0.4309335947 0.4187847972 0.3735184968
+ 0.4329519868 0.4207592905 0.3754445016
+ 0.4349603057 0.4227212965 0.3773564994
+ 0.4369597137 0.4246717989 0.3792560101
+ 0.4389463067 0.4266099930 0.3811441064
+ 0.4409210086 0.4285362065 0.3830193877
+ 0.4428839087 0.4304524064 0.3848828077
+ 0.4448337853 0.4323602021 0.3867362142
+ 0.4467687905 0.4342601001 0.3885799944
+ 0.4486894906 0.4361515045 0.3904125988
+ 0.4505963922 0.4380353987 0.3922336102
+ 0.4524900913 0.4399108887 0.3940415084
+ 0.4543710947 0.4417791069 0.3958359063
+ 0.4562399089 0.4436390996 0.3976179957
+ 0.4580954909 0.4454919100 0.3993878961
+ 0.4599367976 0.4473369122 0.4011451006
+ 0.4617645144 0.4491747022 0.4028908908
+ 0.4635792077 0.4510050118 0.4046252966
+ 0.4653801918 0.4528281987 0.4063490927
+ 0.4671661854 0.4546442926 0.4080632031
+ 0.4689376950 0.4564531147 0.4097684920
+ 0.4706963003 0.4582554102 0.4114660919
+ 0.4724414945 0.4600501955 0.4131549895
+ 0.4741756022 0.4618388116 0.4148359001
+ 0.4758949876 0.4636174142 0.4165103137
+ 0.4776011109 0.4653869867 0.4181793034
+ 0.4792934954 0.4671463966 0.4198431969
+ 0.4809749126 0.4688977003 0.4215008914
+ 0.4826433957 0.4706400037 0.4231525958
+ 0.4842990041 0.4723741114 0.4247975051
+ 0.4859426916 0.4740991890 0.4264369905
+ 0.4875749052 0.4758136868 0.4280720055
+ 0.4891946912 0.4775179923 0.4297009110
+ 0.4908007979 0.4792113900 0.4313251078
+ 0.4923956096 0.4808942974 0.4329412878
+ 0.4939799905 0.4825680852 0.4345523119
+ 0.4955542982 0.4842331111 0.4361563027
+ 0.4971171916 0.4858896136 0.4377534986
+ 0.4986675084 0.4875380993 0.4393444955
+ 0.5002059937 0.4891777039 0.4409264028
+ 0.5017321706 0.4908088148 0.4425007105
+ 0.5032498837 0.4924311936 0.4440687895
+ 0.5047596097 0.4940446913 0.4456312060
+ 0.5062615871 0.4956491888 0.4471881092
+ 0.5077568889 0.4972448051 0.4487377107
+ 0.5092430115 0.4988301992 0.4502801001
+ 0.5107212067 0.5004084110 0.4518156946
+ 0.5121917129 0.5019794703 0.4533447921
+ 0.5136547089 0.5035430789 0.4548679888
+ 0.5151066184 0.5050961971 0.4563845992
+ 0.5165513754 0.5066397786 0.4578959048
+ 0.5179892778 0.5081757903 0.4594022036
+ 0.5194200277 0.5097053051 0.4609036148
+ 0.5208390951 0.5112237930 0.4623981118
+ 0.5222476125 0.5127363205 0.4638865888
+ 0.5236480236 0.5142416954 0.4653699994
+ 0.5250409842 0.5157390833 0.4668483138
+ 0.5264229774 0.5172262788 0.4683186114
+ 0.5277984142 0.5187063217 0.4697833955
+ 0.5291666985 0.5201799870 0.4712427855
+ 0.5305246711 0.5216469765 0.4726960957
+ 0.5318741798 0.5231056809 0.4741415083
+ 0.5332177877 0.5245596170 0.4755817056
+ 0.5345557928 0.5260090232 0.4770165980
+ 0.5358840227 0.5274482965 0.4784426987
+ 0.5372061729 0.5288820863 0.4798631072
+ 0.5385223031 0.5303105712 0.4812782109
+ 0.5398281813 0.5317319036 0.4826853871
+ 0.5411273837 0.5331465006 0.4840855002
+ 0.5424209237 0.5345557928 0.4854811132
+ 0.5437052250 0.5359572768 0.4868715107
+ 0.5449833870 0.5373530984 0.4882541895
+ 0.5462568998 0.5387449265 0.4896318913
+ 0.5475227237 0.5401304960 0.4910022914
+ 0.5487810969 0.5415118933 0.4923650026
+ 0.5500348210 0.5428903103 0.4937227964
+ 0.5512812138 0.5442638993 0.4950731993
+ 0.5525211096 0.5456309915 0.4964149892
+ 0.5537570119 0.5469937921 0.4977517128
+ 0.5549864769 0.5483481884 0.4990803897
+ 0.5562115908 0.5496984124 0.5004032850
+ 0.5574334264 0.5510452986 0.5017220974
+ 0.5586463809 0.5523828268 0.5030320883
+ 0.5598551035 0.5537164807 0.5043380260
+ 0.5610579252 0.5550454259 0.5056391954
+ 0.5622550249 0.5563679934 0.5069329143
+ 0.5634492040 0.5576872230 0.5082232952
+ 0.5646370053 0.5589987040 0.5095074773
+ 0.5658180714 0.5603044033 0.5107867122
+ 0.5669947863 0.5616064072 0.5120629072
+ 0.5681625009 0.5628957748 0.5133314133
+ 0.5693277121 0.5641813874 0.5145972967
+ 0.5704880953 0.5654600263 0.5158582926
+ 0.5716452003 0.5667315722 0.5171144009
+ 0.5728005171 0.5679996014 0.5183681846
+ 0.5739479065 0.5692597032 0.5196151137
+ 0.5750917792 0.5705173016 0.5208598971
+ 0.5762277842 0.5717689991 0.5221000910
+ 0.5773584247 0.5730172992 0.5233365297
+ 0.5784850717 0.5742632151 0.5245702863
+ 0.5796056986 0.5755022764 0.5257986784
+ 0.5807244778 0.5767388940 0.5270252228
+ 0.5818371773 0.5779654980 0.5282452703
+ 0.5829467773 0.5791882277 0.5294620991
+ 0.5840514898 0.5804045796 0.5306738019
+ 0.5851526856 0.5816155076 0.5318812132
+ 0.5862517953 0.5828229189 0.5330861211
+ 0.5873453021 0.5840238929 0.5342842937
+ 0.5884373188 0.5852233768 0.5354809761
+ 0.5895215273 0.5864148736 0.5366703868
+ 0.5906035900 0.5876041055 0.5378572941
+ 0.5916786194 0.5887857080 0.5390371084
+ 0.5927507281 0.5899624825 0.5402138233
+ 0.5938187242 0.5911325812 0.5413867235
+ 0.5948839784 0.5922974944 0.5425544977
+ 0.5959472060 0.5934585929 0.5437186956
+ 0.5970050097 0.5946133137 0.5448786020
+ 0.5980607271 0.5957654715 0.5460368991
+ 0.5991076231 0.5969123244 0.5471885204
+ 0.6001530290 0.5980582237 0.5483391285
+ 0.6011908054 0.5991981030 0.5494847894
+ 0.6022279263 0.6003370881 0.5506296754
+ 0.6032595038 0.6014683843 0.5517669916
+ 0.6042903066 0.6025981903 0.5529031754
+ 0.6053165793 0.6037194133 0.5540338755
+ 0.6063408852 0.6048387885 0.5551629066
+ 0.6073579788 0.6059514880 0.5562863946
+ 0.6083726883 0.6070622802 0.5574082732
+ 0.6093810201 0.6081678867 0.5585262775
+ 0.6103867292 0.6092718244 0.5596421957
+ 0.6113867760 0.6103717089 0.5607541203
+ 0.6123839021 0.6114696264 0.5618643761
+ 0.6133750081 0.6125634909 0.5629718900
+ 0.6143637896 0.6136540174 0.5640769005
+ 0.6153482199 0.6147373915 0.5651777983
+ 0.6163303256 0.6158183813 0.5662764907
+ 0.6173073053 0.6168941259 0.5673714280
+ 0.6182823181 0.6179677844 0.5684645772
+ 0.6192523837 0.6190360785 0.5695542097
+ 0.6202210188 0.6201022863 0.5706425905
+ 0.6211845875 0.6211615205 0.5717275143
+ 0.6221469045 0.6222187877 0.5728116035
+ 0.6231033206 0.6232674718 0.5738925934
+ 0.6240592003 0.6243153811 0.5749726295
+ 0.6250107288 0.6253551245 0.5760461092
+ 0.6259621978 0.6263948083 0.5771194100
+ 0.6269065142 0.6274272203 0.5781859756
+ 0.6278507113 0.6284595728 0.5792527199
+ 0.6287866235 0.6294867992 0.5803136826
+ 0.6297214031 0.6305134296 0.5813742280
+ 0.6306506991 0.6315355897 0.5824303031
+ 0.6315780878 0.6325563788 0.5834851861
+ 0.6325017214 0.6335713863 0.5845344067
+ 0.6334224939 0.6345824003 0.5855802298
+ 0.6343404055 0.6355903149 0.5866221189
+ 0.6352542043 0.6365941763 0.5876594186
+ 0.6361662745 0.6375966072 0.5886945724
+ 0.6370725036 0.6385940909 0.5897240043
+ 0.6379784942 0.6395912170 0.5907528996
+ 0.6388779283 0.6405804753 0.5917738080
+ 0.6397773027 0.6415697932 0.5927945971
+ 0.6406729221 0.6425516009 0.5938079953
+ 0.6415677071 0.6435316801 0.5948200226
+ 0.6424599886 0.6445075870 0.5958276987
+ 0.6433506012 0.6454802752 0.5968323946
+ 0.6442388892 0.6464512944 0.5978347063
+ 0.6451222897 0.6474183798 0.5988320112
+ 0.6460055113 0.6483852863 0.5998288989
+ 0.6468821764 0.6493440866 0.6008189917
+ 0.6477587819 0.6503030062 0.6018090248
+ 0.6486309767 0.6512538791 0.6027926207
+ 0.6495016217 0.6522020102 0.6037741899
+ 0.6503694057 0.6531463265 0.6047533154
+ 0.6512334943 0.6540852189 0.6057292223
+ 0.6520972252 0.6550235748 0.6067042947
+ 0.6529569030 0.6559551954 0.6076720953
+ 0.6538167000 0.6568868160 0.6086397767
+ 0.6546720862 0.6578143239 0.6096029878
+ 0.6555258036 0.6587402821 0.6105644703
+ 0.6563767791 0.6596642733 0.6115236282
+ 0.6572223902 0.6605846882 0.6124786735
+ 0.6580681205 0.6615051031 0.6134337783
+ 0.6589081883 0.6624196172 0.6143844128
+ 0.6597480774 0.6633337140 0.6153349876
+ 0.6605852842 0.6642439961 0.6162821054
+ 0.6614202261 0.6651508808 0.6172264814
+ 0.6622543931 0.6660568714 0.6181699038
+ 0.6630814075 0.6669554114 0.6191053987
+ 0.6639084816 0.6678538918 0.6200408936
+ 0.6647310257 0.6687464714 0.6209712029
+ 0.6655508876 0.6696357131 0.6218988895
+ 0.6663697958 0.6705237031 0.6228252053
+ 0.6671835184 0.6714056134 0.6237459183
+ 0.6679971218 0.6722874045 0.6246666908
+ 0.6688064933 0.6731655002 0.6255832911
+ 0.6696135998 0.6740418077 0.6264979839
+ 0.6704198122 0.6749172211 0.6274114847
+ 0.6712203026 0.6757869720 0.6283187866
+ 0.6720207930 0.6766569018 0.6292260289
+ 0.6728178263 0.6775221825 0.6301295757
+ 0.6736124158 0.6783844233 0.6310310960
+ 0.6744068861 0.6792463064 0.6319320798
+ 0.6751977801 0.6801002026 0.6328263879
+ 0.6759887934 0.6809539795 0.6337206960
+ 0.6767783165 0.6818047762 0.6346113086
+ 0.6775661707 0.6826521158 0.6354981065
+ 0.6783542037 0.6834993958 0.6363847852
+ 0.6791371703 0.6843413115 0.6372650266
+ 0.6799193025 0.6851823926 0.6381441951
+ 0.6807003021 0.6860218048 0.6390221119
+ 0.6814774275 0.6868560910 0.6398959160
+ 0.6822544932 0.6876903176 0.6407696009
+ 0.6830291152 0.6885216832 0.6416400075
+ 0.6838018894 0.6893510818 0.6425083876
+ 0.6845747232 0.6901804805 0.6433767080
+ 0.6853433847 0.6910036206 0.6442382932
+ 0.6861116886 0.6918261051 0.6450995803
+ 0.6868789792 0.6926466823 0.6459587216
+ 0.6876426935 0.6934604049 0.6468116045
+ 0.6884064078 0.6942741871 0.6476644874
+ 0.6891673207 0.6950843930 0.6485136151
+ 0.6899256110 0.6958913207 0.6493594050
+ 0.6906839013 0.6966981888 0.6502050757
+ 0.6914379001 0.6975011826 0.6510459781
+ 0.6921907067 0.6983032227 0.6518856883
+ 0.6929433942 0.6991050243 0.6527251005
+ 0.6936904788 0.6999025941 0.6535598040
+ 0.6944376230 0.7007001042 0.6543945074
+ 0.6951832175 0.7014958858 0.6552277207
+ 0.6959239244 0.7022861242 0.6560571194
+ 0.6966645718 0.7030763030 0.6568865180
+ 0.6974024773 0.7038636804 0.6577119827
+ 0.6981366873 0.7046473026 0.6585326791
+ 0.6988708973 0.7054308057 0.6593534946
+ 0.6996024251 0.7062115073 0.6601701975
+ 0.7003322840 0.7069903016 0.6609845161
+ 0.7010622025 0.7077690959 0.6617987752
+ 0.7017893791 0.7085446119 0.6626083255
+ 0.7025159001 0.7093191147 0.6634163260
+ 0.7032423019 0.7100936174 0.6642243266
+ 0.7039636970 0.7108619809 0.6650285125
+ 0.7046843171 0.7116296291 0.6658324003
+ 0.7054049969 0.7123970985 0.6666362286
+ 0.7061207294 0.7131581903 0.6674346924
+ 0.7068364024 0.7139192224 0.6682332158
+ 0.7075518966 0.7146798968 0.6690312028
+ 0.7082635164 0.7154349089 0.6698222160
+ 0.7089750171 0.7161899209 0.6706132889
+ 0.7096859217 0.7169442177 0.6714035273
+ 0.7103911042 0.7176927924 0.6721884012
+ 0.7110964060 0.7184414864 0.6729732752
+ 0.7118008137 0.7191895247 0.6737573743
+ 0.7125003934 0.7199338078 0.6745371819
+ 0.7131999731 0.7206779718 0.6753169894
+ 0.7138990164 0.7214214206 0.6760962009
+ 0.7145938277 0.7221598029 0.6768721938
+ 0.7152886987 0.7228981256 0.6776481867
+ 0.7159827948 0.7236354947 0.6784234047
+ 0.7166706920 0.7243661880 0.6791931987
+ 0.7173587084 0.7250968814 0.6799631119
+ 0.7180461884 0.7258272171 0.6807324290
+ 0.7187278867 0.7265521288 0.6814960837
+ 0.7194095850 0.7272771001 0.6822597980
+ 0.7200912833 0.7280020118 0.6830233932
+ 0.7207676768 0.7287219763 0.6837813854
+ 0.7214440703 0.7294420004 0.6845393777
+ 0.7221205235 0.7301620245 0.6852974296
+ 0.7227922082 0.7308751941 0.6860501766
+ 0.7234632969 0.7315877080 0.6868025064
+ 0.7241343856 0.7323002219 0.6875547767
+ 0.7248032093 0.7330073118 0.6883025169
+ 0.7254711986 0.7337129116 0.6890491247
+ 0.7261391878 0.7344185114 0.6897956729
+ 0.7268046141 0.7351201773 0.6905381083
+ 0.7274683118 0.7358196974 0.6912782192
+ 0.7281321287 0.7365190983 0.6920182705
+ 0.7287933230 0.7372158170 0.6927558780
+ 0.7294514775 0.7379088998 0.6934906840
+ 0.7301098108 0.7386021018 0.6942256093
+ 0.7307670712 0.7392935753 0.6949588060
+ 0.7314220071 0.7399803996 0.6956874728
+ 0.7320768237 0.7406671047 0.6964163184
+ 0.7327315807 0.7413536906 0.6971448064
+ 0.7333819270 0.7420334816 0.6978684068
+ 0.7340322137 0.7427132130 0.6985918880
+ 0.7346825004 0.7433928847 0.6993154287
+ 0.7353283763 0.7440670729 0.7000336051
+ 0.7359728813 0.7447395921 0.7007502913
+ 0.7366175056 0.7454121113 0.7014670968
+ 0.7372602820 0.7460821271 0.7021806240
+ 0.7379010916 0.7467494011 0.7028908730
+ 0.7385420203 0.7474167943 0.7036011219
+ 0.7391821146 0.7480832934 0.7043104172
+ 0.7398182154 0.7487462759 0.7050154209
+ 0.7404543757 0.7494093180 0.7057204247
+ 0.7410904765 0.7500723004 0.7064254284
+ 0.7417215705 0.7507299781 0.7071260214
+ 0.7423517108 0.7513865829 0.7078258991
+ 0.7429817915 0.7520431280 0.7085257769
+ 0.7436100841 0.7526969910 0.7092229724
+ 0.7442362905 0.7533478141 0.7099171877
+ 0.7448624969 0.7539986968 0.7106114030
+ 0.7454884052 0.7546491027 0.7113050222
+ 0.7461096048 0.7552949786 0.7119926810
+ 0.7467309237 0.7559409142 0.7126803994
+ 0.7473521233 0.7565869093 0.7133681774
+ 0.7479693294 0.7572283149 0.7140517831
+ 0.7485842705 0.7578672767 0.7147333026
+ 0.7491992712 0.7585062981 0.7154148817
+ 0.7498134971 0.7591440082 0.7160953879
+ 0.7504243255 0.7597767115 0.7167720199
+ 0.7510352135 0.7604094148 0.7174485922
+ 0.7516459823 0.7610421181 0.7181252241
+ 0.7522531152 0.7616708875 0.7187982202
+ 0.7528588176 0.7622982264 0.7194700241
+ 0.7534645200 0.7629255056 0.7201418281
+ 0.7540687919 0.7635515928 0.7208123207
+ 0.7546679974 0.7641733885 0.7214787006
+ 0.7552672029 0.7647953033 0.7221450806
+ 0.7558664083 0.7654170990 0.7228114009
+ 0.7564626932 0.7660366893 0.7234749794
+ 0.7570574880 0.7666552067 0.7241373062
+ 0.7576522827 0.7672737241 0.7247995734
+ 0.7582467794 0.7678917050 0.7254614234
+ 0.7588381767 0.7685058117 0.7261199951
+ 0.7594295740 0.7691199183 0.7267785072
+ 0.7600209713 0.7697339058 0.7274370193
+ 0.7606108189 0.7703450918 0.7280923128
+ 0.7611988783 0.7709534764 0.7287446260
+ 0.7617871165 0.7715619802 0.7293969989
+ 0.7623751760 0.7721704245 0.7300493121
+ 0.7629606128 0.7727757096 0.7306963205
+ 0.7635456920 0.7733805180 0.7313426733
+ 0.7641307116 0.7739853263 0.7319890857
+ 0.7647150159 0.7745891213 0.7326344252
+ 0.7652966976 0.7751892805 0.7332763076
+ 0.7658783793 0.7757894993 0.7339181900
+ 0.7664601207 0.7763897181 0.7345600724
+ 0.7670400143 0.7769867778 0.7352002859
+ 0.7676184773 0.7775810957 0.7358390093
+ 0.7681970000 0.7781754732 0.7364776731
+ 0.7687754035 0.7787699103 0.7371163964
+ 0.7693514228 0.7793611288 0.7377526164
+ 0.7699269056 0.7799516916 0.7383884192
+ 0.7705023289 0.7805421948 0.7390242219
+ 0.7710775137 0.7811324000 0.7396594882
+ 0.7716495991 0.7817180753 0.7402899265
+ 0.7722216845 0.7823038101 0.7409204245
+ 0.7727938294 0.7828894854 0.7415509224
+ 0.7733650208 0.7834734917 0.7421798110
+ 0.7739340067 0.7840530872 0.7428051829
+ 0.7745028734 0.7846328020 0.7434306741
+ 0.7750719190 0.7852125168 0.7440561056
+ 0.7756394148 0.7857902050 0.7446792126
+ 0.7762054205 0.7863658071 0.7452998757
+ 0.7767714262 0.7869415283 0.7459207177
+ 0.7773373127 0.7875170708 0.7465413809
+ 0.7779011726 0.7880907059 0.7471587062
+ 0.7784639001 0.7886632085 0.7477741838
+ 0.7790266275 0.7892357111 0.7483897805
+ 0.7795892954 0.7898082137 0.7490053177
+ 0.7801496983 0.7903760076 0.7496179938
+ 0.7807093263 0.7909423709 0.7502297759
+ 0.7812688947 0.7915087938 0.7508416176
+ 0.7818285227 0.7920752168 0.7514533997
+ 0.7823855877 0.7926365137 0.7520614862
+ 0.7829421759 0.7931969762 0.7526692152
+ 0.7834988832 0.7937574983 0.7532768846
+ 0.7840554714 0.7943180203 0.7538844943
+ 0.7846093178 0.7948756218 0.7544875145
+ 0.7851626873 0.7954329848 0.7550902963
+ 0.7857161760 0.7959904075 0.7556930184
+ 0.7862696052 0.7965477705 0.7562956810
+ 0.7868201733 0.7971013784 0.7568932176
+ 0.7873706222 0.7976546884 0.7574905753
+ 0.7879210114 0.7982081175 0.7580878735
+ 0.7884714007 0.7987614870 0.7586852908
+ 0.7890191078 0.7993094921 0.7592788935
+ 0.7895665765 0.7998571992 0.7598723769
+ 0.7901141047 0.8004049063 0.7604658008
+ 0.7906615734 0.8009526134 0.7610592842
+ 0.7912061810 0.8014960885 0.7616505027
+ 0.7917506099 0.8020390272 0.7622414231
+ 0.7922949195 0.8025820255 0.7628324032
+ 0.7928392887 0.8031250238 0.7634233832
+ 0.7933812141 0.8036649227 0.7640110850
+ 0.7939224839 0.8042042255 0.7645980716
+ 0.7944638729 0.8047435880 0.7651851177
+ 0.7950052023 0.8052828908 0.7657721043
+ 0.7955445051 0.8058183789 0.7663552165
+ 0.7960829735 0.8063523769 0.7669368982
+ 0.7966215014 0.8068864942 0.7675185800
+ 0.7971600294 0.8074206114 0.7681002021
+ 0.7976967096 0.8079521060 0.7686796188
+ 0.7982320786 0.8084818125 0.7692573071
+ 0.7987675071 0.8090115786 0.7698349953
+ 0.7993028760 0.8095412850 0.7704126835
+ 0.7998371124 0.8100696802 0.7709888816
+ 0.8003696203 0.8105961084 0.7715629935
+ 0.8009020090 0.8111224771 0.7721372247
+ 0.8014343977 0.8116489053 0.7727112770
+ 0.8019663095 0.8121743798 0.7732846141
+ 0.8024960160 0.8126959801 0.7738549113
+ 0.8030256033 0.8132175803 0.7744253278
+ 0.8035553098 0.8137391806 0.7749956250
+ 0.8040848970 0.8142607212 0.7755659819
+ 0.8046116829 0.8147786260 0.7761322856
+ 0.8051382899 0.8152961731 0.7766984105
+ 0.8056647778 0.8158138990 0.7772645950
+ 0.8061913848 0.8163315058 0.7778307796
+ 0.8067160845 0.8168472052 0.7783944011
+ 0.8072397709 0.8173617721 0.7789568901
+ 0.8077635169 0.8178765178 0.7795193195
+ 0.8082872033 0.8183912039 0.7800818086
+ 0.8088098764 0.8189039230 0.7806432843
+ 0.8093308210 0.8194131255 0.7812033892
+ 0.8098517060 0.8199223280 0.7817634940
+ 0.8103727102 0.8204315901 0.7823235989
+ 0.8108935952 0.8209407926 0.7828835845
+ 0.8114115000 0.8214446902 0.7834416032
+ 0.8119295239 0.8219487071 0.7839996219
+ 0.8124474287 0.8224527240 0.7845575809
+ 0.8129652739 0.8229566813 0.7851157188
+ 0.8134815097 0.8234592080 0.7856711745
+ 0.8139966130 0.8239607215 0.7862251997
+ 0.8145117164 0.8244621158 0.7867792845
+ 0.8150267005 0.8249636292 0.7873333097
+ 0.8155413270 0.8254641294 0.7878866196
+ 0.8160536885 0.8259606957 0.7884370089
+ 0.8165659904 0.8264572024 0.7889872789
+ 0.8170784116 0.8269537091 0.7895377278
+ 0.8175907731 0.8274502158 0.7900881171
+ 0.8181009889 0.8279432058 0.7906360030
+ 0.8186104298 0.8284350038 0.7911829948
+ 0.8191198111 0.8289268017 0.7917301059
+ 0.8196291924 0.8294185996 0.7922770977
+ 0.8201377988 0.8299099207 0.7928233147
+ 0.8206434250 0.8303995728 0.7933669090
+ 0.8211489916 0.8308892846 0.7939103842
+ 0.8216546178 0.8313789964 0.7944539785
+ 0.8221603036 0.8318687081 0.7949975133
+ 0.8226630092 0.8323553205 0.7955383062
+ 0.8231644034 0.8328405023 0.7960780263
+ 0.8236657977 0.8333258033 0.7966176867
+ 0.8241671920 0.8338109851 0.7971572876
+ 0.8246682286 0.8342955709 0.7976964116
+ 0.8251668215 0.8347756267 0.7982317209
+ 0.8256654739 0.8352555037 0.7987669706
+ 0.8261641264 0.8357354999 0.7993022203
+ 0.8266627192 0.8362154961 0.7998375297
+ 0.8271595240 0.8366938233 0.8003703952
+ 0.8276544809 0.8371704817 0.8009009957
+ 0.8281494975 0.8376471996 0.8014315963
+ 0.8286445141 0.8381239176 0.8019623160
+ 0.8291395903 0.8386006951 0.8024929166
+ 0.8296310902 0.8390740752 0.8030207157
+ 0.8301221132 0.8395469785 0.8035480976
+ 0.8306130767 0.8400198221 0.8040754199
+ 0.8311039805 0.8404927254 0.8046028018
+ 0.8315945864 0.8409647942 0.8051295280
+ 0.8320829272 0.8414331079 0.8056535125
+ 0.8325713277 0.8419014215 0.8061774969
+ 0.8330597281 0.8423696160 0.8067014217
+ 0.8335480094 0.8428379297 0.8072254062
+ 0.8340349197 0.8433049917 0.8077479005
+ 0.8345198035 0.8437706828 0.8082687855
+ 0.8350048065 0.8442363143 0.8087896109
+ 0.8354896903 0.8447020054 0.8093103766
+ 0.8359745741 0.8451675773 0.8098313212
+ 0.8364562988 0.8456311226 0.8103501797
+ 0.8369364142 0.8460934758 0.8108682036
+ 0.8374165297 0.8465558887 0.8113862276
+ 0.8378965259 0.8470183015 0.8119041920
+ 0.8383765817 0.8474807143 0.8124222159
+ 0.8388531804 0.8479387760 0.8129376173
+ 0.8393293023 0.8483963013 0.8134527206
+ 0.8398053050 0.8488537073 0.8139677048
+ 0.8402814269 0.8493111730 0.8144826889
+ 0.8407574296 0.8497685194 0.8149976730
+ 0.8412302732 0.8502224088 0.8155111074
+ 0.8417032957 0.8506761789 0.8160244226
+ 0.8421761990 0.8511301279 0.8165377975
+ 0.8426492214 0.8515838981 0.8170511127
+ 0.8431215286 0.8520373702 0.8175640702
+ 0.8435900211 0.8524886966 0.8180745840
+ 0.8440583944 0.8529400229 0.8185852170
+ 0.8445268869 0.8533912897 0.8190956712
+ 0.8449953198 0.8538426161 0.8196063042
+ 0.8454630971 0.8542929888 0.8201159835
+ 0.8459277749 0.8547400832 0.8206226230
+ 0.8463925719 0.8551871181 0.8211292028
+ 0.8468574286 0.8556342125 0.8216357827
+ 0.8473222256 0.8560811877 0.8221424818
+ 0.8477864265 0.8565273881 0.8226484060
+ 0.8482484221 0.8569706082 0.8231524229
+ 0.8487104177 0.8574137092 0.8236563802
+ 0.8491724133 0.8578569293 0.8241603971
+ 0.8496344090 0.8583000898 0.8246644139
+ 0.8500953913 0.8587425947 0.8251677155
+ 0.8505532742 0.8591822982 0.8256688714
+ 0.8510112166 0.8596221209 0.8261700869
+ 0.8514690995 0.8600618243 0.8266713023
+ 0.8519269824 0.8605015874 0.8271725178
+ 0.8523843288 0.8609408140 0.8276733160
+ 0.8528388143 0.8613771200 0.8281720281
+ 0.8532934189 0.8618134856 0.8286706805
+ 0.8537480235 0.8622499108 0.8291695118
+ 0.8542025089 0.8626862764 0.8296682239
+ 0.8546568751 0.8631222844 0.8301666975
+ 0.8551089764 0.8635547757 0.8306632042
+ 0.8555610180 0.8639872074 0.8311597109
+ 0.8560131192 0.8644195795 0.8316562176
+ 0.8564652205 0.8648520708 0.8321527243
+ 0.8569173217 0.8652845025 0.8326491714
+ 0.8573657870 0.8657131195 0.8331434131
+ 0.8578140736 0.8661414981 0.8336374760
+ 0.8582624197 0.8665698767 0.8341315985
+ 0.8587107062 0.8669981956 0.8346257806
+ 0.8591589928 0.8674265742 0.8351199031
+ 0.8596050143 0.8678531051 0.8356130719
+ 0.8600503206 0.8682789803 0.8361061215
+ 0.8604956269 0.8687049150 0.8365991116
+ 0.8609408736 0.8691307902 0.8370921016
+ 0.8613861799 0.8695567846 0.8375850916
+ 0.8618302941 0.8699809909 0.8380767703
+ 0.8622733951 0.8704040051 0.8385676146
+ 0.8627164960 0.8708269000 0.8390582800
+ 0.8631595969 0.8712497950 0.8395491242
+ 0.8636026978 0.8716726899 0.8400399089
+ 0.8640447855 0.8720946908 0.8405296803
+ 0.8644844890 0.8725144863 0.8410171270
+ 0.8649240732 0.8729342222 0.8415045738
+ 0.8653637171 0.8733540177 0.8419920206
+ 0.8658034205 0.8737736940 0.8424795270
+ 0.8662430048 0.8741934896 0.8429669142
+ 0.8666800261 0.8746116757 0.8434523940
+ 0.8671169877 0.8750299215 0.8439378142
+ 0.8675538898 0.8754481077 0.8444231749
+ 0.8679907918 0.8758662939 0.8449085951
+ 0.8684278131 0.8762844801 0.8453940153
+ 0.8688635230 0.8767014146 0.8458780050
+ 0.8692985177 0.8771173954 0.8463612199
+ 0.8697335124 0.8775334954 0.8468443155
+ 0.8701685071 0.8779495955 0.8473274708
+ 0.8706035018 0.8783656955 0.8478106856
+ 0.8710376024 0.8787810802 0.8482931852
+ 0.8714686036 0.8791939020 0.8487735987
+ 0.8718994856 0.8796067834 0.8492540121
+ 0.8723304272 0.8800197244 0.8497344255
+ 0.8727613091 0.8804326057 0.8502147794
+ 0.8731923103 0.8808454275 0.8506951928
+ 0.8736202717 0.8812555075 0.8511731029
+ 0.8740472794 0.8816646934 0.8516504765
+ 0.8744744062 0.8820738792 0.8521277905
+ 0.8749014735 0.8824831247 0.8526051044
+ 0.8753286004 0.8828923106 0.8530824184
+ 0.8757551908 0.8833009005 0.8535591960
+ 0.8761808276 0.8837080002 0.8540347815
+ 0.8766062856 0.8841150999 0.8545104265
+ 0.8770318031 0.8845221996 0.8549860120
+ 0.8774573207 0.8849292994 0.8554615974
+ 0.8778828979 0.8853362799 0.8559371829
+ 0.8783056736 0.8857411146 0.8564112782
+ 0.8787276149 0.8861449957 0.8568848968
+ 0.8791493773 0.8865488768 0.8573585153
+ 0.8795713186 0.8869528770 0.8578320742
+ 0.8799932003 0.8873568177 0.8583056927
+ 0.8804144263 0.8877601027 0.8587788939
+ 0.8808318973 0.8881598115 0.8592500091
+ 0.8812494874 0.8885595798 0.8597210050
+ 0.8816670775 0.8889592886 0.8601921201
+ 0.8820847273 0.8893591166 0.8606631160
+ 0.8825021982 0.8897588849 0.8611341715
+ 0.8829184175 0.8901572227 0.8616037965
+ 0.8833333850 0.8905543089 0.8620721102
+ 0.8837484121 0.8909513950 0.8625404835
+ 0.8841633797 0.8913484216 0.8630087972
+ 0.8845784068 0.8917455077 0.8634771705
+ 0.8849933743 0.8921425939 0.8639456034
+ 0.8854057193 0.8925368786 0.8644126058
+ 0.8858175278 0.8929308057 0.8648794293
+ 0.8862293959 0.8933246732 0.8653463125
+ 0.8866413236 0.8937187195 0.8658130765
+ 0.8870530725 0.8941125870 0.8662800193
+ 0.8874645233 0.8945059180 0.8667466044
+ 0.8878725767 0.8948956132 0.8672116995
+ 0.8882806897 0.8952853084 0.8676767945
+ 0.8886888027 0.8956750035 0.8681420088
+ 0.8890969157 0.8960648179 0.8686071038
+ 0.8895050287 0.8964545131 0.8690721989
+ 0.8899124265 0.8968430161 0.8695368171
+ 0.8903183937 0.8972294927 0.8700006008
+ 0.8907244802 0.8976160884 0.8704643250
+ 0.8911305070 0.8980026245 0.8709279895
+ 0.8915365934 0.8983891010 0.8713917136
+ 0.8919426203 0.8987755775 0.8718554974
+ 0.8923472166 0.8991609216 0.8723185062
+ 0.8927506208 0.8995451927 0.8727809787
+ 0.8931540847 0.8999295235 0.8732435703
+ 0.8935574889 0.9003137946 0.8737061024
+ 0.8939608932 0.9006981850 0.8741686940
+ 0.8943642974 0.9010825157 0.8746312261
+ 0.8947654963 0.9014645815 0.8750917912
+ 0.8951656818 0.9018456936 0.8755515218
+ 0.8955659270 0.9022269249 0.8760113120
+ 0.8959661126 0.9026079774 0.8764711022
+ 0.8963662982 0.9029892087 0.8769308925
+ 0.8967664838 0.9033703208 0.8773906231
+ 0.8971654773 0.9037498236 0.8778483868
+ 0.8975641727 0.9041286707 0.8783056736
+ 0.8979628086 0.9045075774 0.8787629008
+ 0.8983613849 0.9048866034 0.8792201877
+ 0.8987600803 0.9052655101 0.8796774745
+ 0.8991587162 0.9056444168 0.8801347017
+ 0.8995556235 0.9060223103 0.8805907965
+ 0.8999521136 0.9064000249 0.8810467124
+ 0.9003486037 0.9067776799 0.8815026283
+ 0.9007450938 0.9071552753 0.8819584250
+ 0.9011415839 0.9075329900 0.8824142814
+ 0.9015380740 0.9079107046 0.8828700781
+ 0.9019324183 0.9082859159 0.8833250999
+ 0.9023262262 0.9086604714 0.8837798834
+ 0.9027199149 0.9090350866 0.8842347264
+ 0.9031137228 0.9094097018 0.8846895099
+ 0.9035074711 0.9097843170 0.8851444125
+ 0.9039012790 0.9101588726 0.8855991960
+ 0.9042941928 0.9105305076 0.8860530257
+ 0.9046869278 0.9109010100 0.8865063787
+ 0.9050796032 0.9112715721 0.8869599104
+ 0.9054722786 0.9116421938 0.8874133229
+ 0.9058650136 0.9120126963 0.8878667951
+ 0.9062576890 0.9123833179 0.8883202076
+ 0.9066494107 0.9127531052 0.8887727261
+ 0.9070404172 0.9131224751 0.8892245293
+ 0.9074314237 0.9134919047 0.8896763921
+ 0.9078223705 0.9138612747 0.8901283145
+ 0.9082133770 0.9142307043 0.8905801773
+ 0.9086043835 0.9146000147 0.8910320997
+ 0.9089940190 0.9149683714 0.8914834261
+ 0.9093819857 0.9153357148 0.8919339776
+ 0.9097698927 0.9157028794 0.8923847079
+ 0.9101579189 0.9160702229 0.8928353190
+ 0.9105458856 0.9164373875 0.8932858706
+ 0.9109339118 0.9168046713 0.8937366009
+ 0.9113214016 0.9171708822 0.8941872120
+ 0.9117074013 0.9175342917 0.8946375847
+ 0.9120935202 0.9178975821 0.8950880170
+ 0.9124795794 0.9182608724 0.8955383897
+ 0.9128655791 0.9186242819 0.8959888220
+ 0.9132516980 0.9189875722 0.8964391947
+ 0.9136376977 0.9193509221 0.8968896866
+ 0.9140226841 0.9197127223 0.8973388076
+ 0.9144076109 0.9200745225 0.8977879286
+ 0.9147924781 0.9204362035 0.8982371092
+ 0.9151775241 0.9207980037 0.8986861706
+ 0.9155623913 0.9211596847 0.8991352916
+ 0.9159473181 0.9215214849 0.8995844126
+ 0.9163296819 0.9218823910 0.9000319839
+ 0.9167106748 0.9222429991 0.9004787207
+ 0.9170917869 0.9226036072 0.9009253979
+ 0.9174728990 0.9229642153 0.9013720751
+ 0.9178540111 0.9233248234 0.9018188119
+ 0.9182350039 0.9236853719 0.9022654891
+ 0.9186152220 0.9240450263 0.9027118087
+ 0.9189931750 0.9244018793 0.9031571150
+ 0.9193711877 0.9247587919 0.9036024809
+ 0.9197492003 0.9251158237 0.9040477872
+ 0.9201272130 0.9254726768 0.9044930935
+ 0.9205052257 0.9258295894 0.9049385190
+ 0.9208831787 0.9261866212 0.9053838253
+ 0.9212595224 0.9265406728 0.9058277011
+ 0.9216355085 0.9268943071 0.9062713981
+ 0.9220116138 0.9272480011 0.9067149758
+ 0.9223875999 0.9276016951 0.9071586728
+ 0.9227635860 0.9279553890 0.9076024294
+ 0.9231395721 0.9283090830 0.9080460072
+ 0.9235144258 0.9286624193 0.9084891081
+ 0.9238871932 0.9290151000 0.9089311957
+ 0.9242599010 0.9293677807 0.9093734026
+ 0.9246327281 0.9297205210 0.9098154902
+ 0.9250054955 0.9300732017 0.9102576971
+ 0.9253782034 0.9304258823 0.9106997848
+ 0.9257509708 0.9307786226 0.9111419916
+ 0.9261215925 0.9311289787 0.9115830064
+ 0.9264919162 0.9314789772 0.9120237827
+ 0.9268621802 0.9318289757 0.9124646187
+ 0.9272325039 0.9321790934 0.9129055142
+ 0.9276028275 0.9325290918 0.9133462906
+ 0.9279729724 0.9328790903 0.9137871265
+ 0.9283429980 0.9332283139 0.9142274857
+ 0.9287117720 0.9335752726 0.9146667123
+ 0.9290807247 0.9339222908 0.9151058793
+ 0.9294496179 0.9342694283 0.9155451059
+ 0.9298185110 0.9346163869 0.9159842730
+ 0.9301874042 0.9349634051 0.9164234996
+ 0.9305561781 0.9353104234 0.9168627262
+ 0.9309234023 0.9356566072 0.9173014760
+ 0.9312896132 0.9360023737 0.9177401066
+ 0.9316558242 0.9363480806 0.9181786180
+ 0.9320219755 0.9366937876 0.9186171889
+ 0.9323881865 0.9370396137 0.9190558195
+ 0.9327543974 0.9373853207 0.9194943905
+ 0.9331206083 0.9377310872 0.9199329019
+ 0.9334837794 0.9380753040 0.9203705788
+ 0.9338467121 0.9384195209 0.9208081961
+ 0.9342097044 0.9387636185 0.9212458730
+ 0.9345725775 0.9391077757 0.9216834903
+ 0.9349356294 0.9394518733 0.9221211076
+ 0.9352985024 0.9397959709 0.9225587249
+ 0.9356611967 0.9401394725 0.9229962230
+ 0.9360224009 0.9404795766 0.9234330058
+ 0.9363836050 0.9408196807 0.9238699079
+ 0.9367448092 0.9411597848 0.9243066907
+ 0.9371060133 0.9414998889 0.9247435927
+ 0.9374672771 0.9418399930 0.9251803756
+ 0.9378284812 0.9421800971 0.9256172776
+ 0.9381889105 0.9425194263 0.9260538816
+ 0.9385479093 0.9428572059 0.9264901876
+ 0.9389069080 0.9431951046 0.9269264936
+ 0.9392657876 0.9435328841 0.9273626804
+ 0.9396247864 0.9438707232 0.9277989864
+ 0.9399837852 0.9442085028 0.9282351732
+ 0.9403427839 0.9445464015 0.9286714792
+ 0.9407004118 0.9448838830 0.9291065931
+ 0.9410564899 0.9452211857 0.9295405746
+ 0.9414126873 0.9455584288 0.9299746752
+ 0.9417688847 0.9458956718 0.9304087162
+ 0.9421250820 0.9462329149 0.9308426976
+ 0.9424812794 0.9465702176 0.9312766790
+ 0.9428374767 0.9469074011 0.9317107797
+ 0.9431930184 0.9472429156 0.9321432114
+ 0.9435479045 0.9475771785 0.9325743914
+ 0.9439027905 0.9479115009 0.9330056906
+ 0.9442576766 0.9482458234 0.9334369898
+ 0.9446126223 0.9485800862 0.9338682294
+ 0.9449675083 0.9489144087 0.9342995286
+ 0.9453223944 0.9492486715 0.9347308278
+ 0.9456762075 0.9495813847 0.9351599216
+ 0.9460293055 0.9499132037 0.9355877042
+ 0.9463824034 0.9502449036 0.9360154867
+ 0.9467355013 0.9505766034 0.9364433289
+ 0.9470885992 0.9509083033 0.9368711114
+ 0.9474416971 0.9512400031 0.9372988939
+ 0.9477947950 0.9515718222 0.9377266169
+ 0.9481452107 0.9519032240 0.9381518960
+ 0.9484937191 0.9522345066 0.9385753274
+ 0.9488422275 0.9525657892 0.9389986992
+ 0.9491906166 0.9528970718 0.9394220710
+ 0.9495391250 0.9532284141 0.9398453832
+ 0.9498875141 0.9535596967 0.9402688146
+ 0.9502360225 0.9538909793 0.9406921864
+ 0.9505816102 0.9542205930 0.9411129951
+ 0.9509239197 0.9545481801 0.9415308833
+ 0.9512662292 0.9548758268 0.9419488907
+ 0.9516084790 0.9552034140 0.9423667789
+ 0.9519507885 0.9555310011 0.9427847266
+ 0.9522932172 0.9558585882 0.9432026148
+ 0.9526355267 0.9561861753 0.9436205029
+ 0.9529765248 0.9565111995 0.9440370202
+ 0.9533149004 0.9568306208 0.9444504976
+ 0.9536532164 0.9571499825 0.9448639154
+ 0.9539914727 0.9574694037 0.9452773929
+ 0.9543299079 0.9577888250 0.9456908107
+ 0.9546682239 0.9581081867 0.9461042881
+ 0.9550064802 0.9584276080 0.9465177059
+ 0.9553446174 0.9587466121 0.9469308853
+ 0.9556806087 0.9590610266 0.9473422170
+ 0.9560164809 0.9593753815 0.9477534294
+ 0.9563524723 0.9596897960 0.9481647015
+ 0.9566884041 0.9600043297 0.9485759735
+ 0.9570243955 0.9603186846 0.9489871860
+ 0.9573603272 0.9606330991 0.9493985176
+ 0.9576963186 0.9609475136 0.9498096704
+ 0.9580307007 0.9612603188 0.9502192140
+ 0.9583647251 0.9615727067 0.9506282806
+ 0.9586988091 0.9618852139 0.9510374069
+ 0.9590328932 0.9621976018 0.9514464736
+ 0.9593669176 0.9625099897 0.9518555999
+ 0.9597010016 0.9628223777 0.9522647262
+ 0.9600350857 0.9631348252 0.9526737928
+ 0.9603679180 0.9634457231 0.9530814290
+ 0.9606994987 0.9637547135 0.9534872770
+ 0.9610310793 0.9640638232 0.9538931847
+ 0.9613626003 0.9643728733 0.9542990923
+ 0.9616941810 0.9646819830 0.9547049999
+ 0.9620258212 0.9649910927 0.9551109076
+ 0.9623572826 0.9653000832 0.9555168152
+ 0.9626886845 0.9656090140 0.9559224248
+ 0.9630175829 0.9659156799 0.9563245773
+ 0.9633464813 0.9662224054 0.9567267895
+ 0.9636753798 0.9665290713 0.9571290016
+ 0.9640042782 0.9668357968 0.9575312138
+ 0.9643331766 0.9671425223 0.9579333067
+ 0.9646620750 0.9674491882 0.9583355188
+ 0.9649909735 0.9677559137 0.9587376714
+ 0.9653183818 0.9680610895 0.9591376185
+ 0.9656450152 0.9683653712 0.9595360160
+ 0.9659715295 0.9686697125 0.9599344730
+ 0.9662981033 0.9689739943 0.9603329897
+ 0.9666246176 0.9692782760 0.9607315063
+ 0.9669511914 0.9695824981 0.9611299038
+ 0.9672777057 0.9698867798 0.9615284204
+ 0.9676039219 0.9701907039 0.9619265199
+ 0.9679273963 0.9704914093 0.9623209834
+ 0.9682508111 0.9707919955 0.9627156258
+ 0.9685742855 0.9710927010 0.9631102085
+ 0.9688977003 0.9713934064 0.9635047913
+ 0.9692211747 0.9716939926 0.9638993740
+ 0.9695447087 0.9719946980 0.9642940164
+ 0.9698681235 0.9722954035 0.9646884799
+ 0.9701895118 0.9725940824 0.9650804996
+ 0.9705088735 0.9728909731 0.9654701948
+ 0.9708284140 0.9731879234 0.9658597708
+ 0.9711478949 0.9734848142 0.9662495255
+ 0.9714673162 0.9737817049 0.9666391015
+ 0.9717867970 0.9740785956 0.9670287967
+ 0.9721062183 0.9743754864 0.9674183726
+ 0.9724256992 0.9746723771 0.9678081274
+ 0.9727420211 0.9749661088 0.9681929946
+ 0.9730579257 0.9752594233 0.9685772061
+ 0.9733737707 0.9755526781 0.9689614773
+ 0.9736896157 0.9758459926 0.9693456888
+ 0.9740055203 0.9761393070 0.9697300196
+ 0.9743214250 0.9764326215 0.9701141715
+ 0.9746373296 0.9767258763 0.9704985023
+ 0.9749523997 0.9770184755 0.9708817005
+ 0.9752640724 0.9773074985 0.9712603092
+ 0.9755758047 0.9775965214 0.9716387987
+ 0.9758874774 0.9778854847 0.9720172882
+ 0.9761992097 0.9781745076 0.9723957777
+ 0.9765108824 0.9784634709 0.9727743268
+ 0.9768224955 0.9787524939 0.9731528163
+ 0.9771342278 0.9790415168 0.9735313058
+ 0.9774439931 0.9793285728 0.9739072919
+ 0.9777507782 0.9796128273 0.9742792845
+ 0.9780576229 0.9798970222 0.9746512175
+ 0.9783642888 0.9801810980 0.9750232100
+ 0.9786710739 0.9804652929 0.9753952026
+ 0.9789779186 0.9807494879 0.9757671952
+ 0.9792847037 0.9810336828 0.9761391282
+ 0.9795914888 0.9813178778 0.9765111208
+ 0.9798954725 0.9815995097 0.9768790007
+ 0.9801974297 0.9818789959 0.9772434831
+ 0.9804993272 0.9821584225 0.9776080847
+ 0.9808012247 0.9824379086 0.9779726267
+ 0.9811030030 0.9827173948 0.9783372283
+ 0.9814049006 0.9829968810 0.9787017703
+ 0.9817067981 0.9832764268 0.9790663123
+ 0.9820086956 0.9835559130 0.9794309139
+ 0.9823070168 0.9838317037 0.9797903895
+ 0.9826034904 0.9841055870 0.9801471829
+ 0.9828999043 0.9843794703 0.9805040956
+ 0.9831963778 0.9846534133 0.9808608890
+ 0.9834929109 0.9849272966 0.9812176824
+ 0.9837893248 0.9852011800 0.9815745950
+ 0.9840857983 0.9854751229 0.9819313884
+ 0.9843822718 0.9857488871 0.9822881818
+ 0.9846748710 0.9860187769 0.9826393127
+ 0.9849656820 0.9862868190 0.9829875827
+ 0.9852566123 0.9865549207 0.9833359718
+ 0.9855474234 0.9868229032 0.9836843014
+ 0.9858381748 0.9870908856 0.9840325713
+ 0.9861291051 0.9873589277 0.9843810201
+ 0.9864199162 0.9876269102 0.9847292900
+ 0.9867107272 0.9878948927 0.9850776196
+ 0.9869980216 0.9881591797 0.9854195118
+ 0.9872834086 0.9884213805 0.9857577085
+ 0.9875686765 0.9886837006 0.9860960245
+ 0.9878541231 0.9889459014 0.9864342213
+ 0.9881393909 0.9892082214 0.9867724180
+ 0.9884247780 0.9894704223 0.9871106744
+ 0.9887101054 0.9897326827 0.9874488711
+ 0.9889954925 0.9899948835 0.9877871871
+ 0.9892771244 0.9902533889 0.9881182909
+ 0.9895554185 0.9905087948 0.9884434938
+ 0.9898337722 0.9907642007 0.9887685776
+ 0.9901121855 0.9910196066 0.9890937209
+ 0.9903905988 0.9912750125 0.9894189239
+ 0.9906688929 0.9915304184 0.9897440076
+ 0.9909473062 0.9917857051 0.9900690913
+ 0.9912257195 0.9920411110 0.9903942943
+ 0.9915013909 0.9922938943 0.9907138944
+ 0.9917727113 0.9925420880 0.9910243154
+ 0.9920439720 0.9927902818 0.9913346767
+ 0.9923152924 0.9930384159 0.9916450977
+ 0.9925866127 0.9932866096 0.9919555187
+ 0.9928578734 0.9935348034 0.9922658801
+ 0.9931291938 0.9937829971 0.9925763011
+ 0.9934003949 0.9940311909 0.9928867221
+ 0.9936708212 0.9942783713 0.9931951165
+ 0.9939351082 0.9945191741 0.9934899211
+ 0.9941995144 0.9947599173 0.9937847257
+ 0.9944638014 0.9950006008 0.9940794110
+ 0.9947280884 0.9952414036 0.9943742156
+ 0.9949923754 0.9954820871 0.9946690202
+ 0.9952567220 0.9957227707 0.9949638247
+ 0.9955210090 0.9959635139 0.9952586293
+ 0.9957852960 0.9962043166 0.9955533743
+ 0.9960408211 0.9964358807 0.9958317876
+ 0.9962943792 0.9966655970 0.9961066842
+ 0.9965478778 0.9968951941 0.9963817000
+ 0.9968014956 0.9971249104 0.9966565967
+ 0.9970551133 0.9973546267 0.9969314933
+ 0.9973086119 0.9975842237 0.9972063899
+ 0.9975622296 0.9978138804 0.9974814057
+ 0.9978157878 0.9980435967 0.9977563024
+ 0.9980642200 0.9982674122 0.9980189800
+ 0.9983060956 0.9984840155 0.9982665777
+ 0.9985480905 0.9987004995 0.9985142946
+ 0.9987900853 0.9989171028 0.9987618923
+ 0.9990320802 0.9991337061 0.9990094900
+ 0.9992740750 0.9993503094 0.9992570877
+ 0.9995160103 0.9995667934 0.9995048046
+ 0.9997580051 0.9997833967 0.9997524023
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_futura_ii_400.spi1d b/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_futura_ii_400.spi1d
new file mode 100644
index 00000000000..f198692b6b4
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_futura_ii_400.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0171004608 0.0156014897 0.0110214697
+ 0.0296423100 0.0275058597 0.0204370096
+ 0.0400087796 0.0378916785 0.0286195297
+ 0.0492478795 0.0473487712 0.0360689983
+ 0.0577691793 0.0561984889 0.0429962091
+ 0.0658048466 0.0644933432 0.0495528691
+ 0.0734695420 0.0724152401 0.0558067188
+ 0.0808440894 0.0800366476 0.0618191212
+ 0.0879925117 0.0873461664 0.0676262975
+ 0.0949557200 0.0944325328 0.0732697919
+ 0.1018247008 0.1012879983 0.0787453130
+ 0.1086272970 0.1079066992 0.0840507299
+ 0.1152980998 0.1143304035 0.0892019123
+ 0.1217757985 0.1205366999 0.0942221731
+ 0.1280754060 0.1265349984 0.0991079137
+ 0.1341703981 0.1323578954 0.1038789004
+ 0.1400842071 0.1380200982 0.1085413024
+ 0.1458258033 0.1435257047 0.1130928993
+ 0.1513952017 0.1488672942 0.1175398976
+ 0.1568222046 0.1540704072 0.1219094992
+ 0.1621166021 0.1591500938 0.1262044013
+ 0.1672838926 0.1641122997 0.1304340065
+ 0.1723344028 0.1689572036 0.1346047074
+ 0.1772560030 0.1737031043 0.1387116015
+ 0.1820691973 0.1783441007 0.1427484006
+ 0.1867853999 0.1828867942 0.1467114985
+ 0.1914003938 0.1873379946 0.1506099999
+ 0.1959276944 0.1916999966 0.1544381976
+ 0.2003667951 0.1959740072 0.1582106054
+ 0.2047297060 0.2001685053 0.1619343013
+ 0.2090197951 0.2042849064 0.1656126976
+ 0.2132406980 0.2083213031 0.1692394018
+ 0.2173902988 0.2122910023 0.1728218049
+ 0.2214687020 0.2161971927 0.1763650030
+ 0.2254846990 0.2200367004 0.1798641980
+ 0.2294346988 0.2238188982 0.1833273023
+ 0.2333287001 0.2275474966 0.1867597997
+ 0.2371630073 0.2312255949 0.1901571006
+ 0.2409424931 0.2348573953 0.1935154945
+ 0.2446697950 0.2384261042 0.1968335062
+ 0.2483461946 0.2419455051 0.2001166940
+ 0.2519711852 0.2454174012 0.2033713013
+ 0.2555448115 0.2488500029 0.2066029012
+ 0.2590776980 0.2522298098 0.2098037004
+ 0.2625567913 0.2555679977 0.2129680067
+ 0.2659949958 0.2588672936 0.2161033005
+ 0.2693926096 0.2621265948 0.2192150950
+ 0.2727515101 0.2653498054 0.2222974002
+ 0.2760717869 0.2685379982 0.2253466994
+ 0.2793444991 0.2716934979 0.2283667028
+ 0.2825835049 0.2748126090 0.2313646972
+ 0.2857859135 0.2778981924 0.2343385071
+ 0.2889564931 0.2809517980 0.2372840047
+ 0.2920953929 0.2839730978 0.2402049005
+ 0.2951973081 0.2869609892 0.2431025058
+ 0.2982689142 0.2899155021 0.2459677011
+ 0.3013125062 0.2928346097 0.2488068938
+ 0.3043302894 0.2957249880 0.2516252100
+ 0.3073143959 0.2985872030 0.2544235885
+ 0.3102650940 0.3014270067 0.2572003901
+ 0.3131817877 0.3042409122 0.2599579096
+ 0.3160701096 0.3070298135 0.2626875937
+ 0.3189300001 0.3097898066 0.2653909028
+ 0.3217678964 0.3125233054 0.2680732906
+ 0.3245871961 0.3152284920 0.2707414031
+ 0.3273836076 0.3179099858 0.2733910084
+ 0.3301528096 0.3205696046 0.2760204077
+ 0.3328959048 0.3232055902 0.2786307931
+ 0.3356123865 0.3258267045 0.2812187076
+ 0.3382978141 0.3284305036 0.2837873995
+ 0.3409596980 0.3310135007 0.2863405049
+ 0.3436000943 0.3335742950 0.2888756096
+ 0.3462189138 0.3361156881 0.2913906872
+ 0.3488169909 0.3386341035 0.2938865125
+ 0.3513996005 0.3411293030 0.2963629961
+ 0.3539629877 0.3436000943 0.2988243103
+ 0.3565055132 0.3460493982 0.3012714982
+ 0.3590308130 0.3484821916 0.3036991060
+ 0.3615351915 0.3508949876 0.3061034977
+ 0.3640230000 0.3532888889 0.3084929883
+ 0.3664914966 0.3556644917 0.3108676076
+ 0.3689433038 0.3580288887 0.3132284880
+ 0.3713740110 0.3603788912 0.3155708909
+ 0.3737848103 0.3627198935 0.3179005086
+ 0.3761711121 0.3650496900 0.3202157021
+ 0.3785369992 0.3673666120 0.3225137889
+ 0.3808847964 0.3696695864 0.3247897923
+ 0.3832105994 0.3719570935 0.3270477951
+ 0.3855203986 0.3742293119 0.3292933106
+ 0.3878141046 0.3764826059 0.3315246105
+ 0.3900910914 0.3787195086 0.3337422907
+ 0.3923526108 0.3809430897 0.3359439075
+ 0.3945967853 0.3831507862 0.3381271064
+ 0.3968229890 0.3853423893 0.3402962089
+ 0.3990325034 0.3875181973 0.3424524069
+ 0.4012250900 0.3896811008 0.3445951045
+ 0.4033975899 0.3918299079 0.3467190862
+ 0.4055522084 0.3939658999 0.3488298059
+ 0.4076915085 0.3960888982 0.3509294987
+ 0.4098165929 0.3981984854 0.3530152142
+ 0.4119274020 0.4002932906 0.3550836146
+ 0.4140225053 0.4023733139 0.3571367860
+ 0.4161036909 0.4044389129 0.3591760099
+ 0.4181733131 0.4064899981 0.3611989915
+ 0.4202328026 0.4085263014 0.3632034063
+ 0.4222835898 0.4105474949 0.3651930988
+ 0.4243231118 0.4125525951 0.3671697974
+ 0.4263541996 0.4145421982 0.3691323996
+ 0.4283750057 0.4165202975 0.3710797131
+ 0.4303872883 0.4184862077 0.3730098903
+ 0.4323903918 0.4204401076 0.3749246895
+ 0.4343844950 0.4223816991 0.3768284917
+ 0.4363701046 0.4243108928 0.3787207901
+ 0.4383463860 0.4262312949 0.3806005120
+ 0.4403150082 0.4281423986 0.3824656010
+ 0.4422720969 0.4300462902 0.3843190074
+ 0.4442181885 0.4319409132 0.3861612082
+ 0.4461520910 0.4338287115 0.3879927993
+ 0.4480755031 0.4357072115 0.3898114860
+ 0.4499849975 0.4375792146 0.3916176856
+ 0.4518805146 0.4394420087 0.3934090137
+ 0.4537624121 0.4412986040 0.3951860964
+ 0.4556312859 0.4431461096 0.3969503045
+ 0.4574877024 0.4449875951 0.3987065852
+ 0.4593302011 0.4468202889 0.4004544914
+ 0.4611577094 0.4486469924 0.4021933973
+ 0.4629718959 0.4504652917 0.4039224088
+ 0.4647724032 0.4522775114 0.4056409895
+ 0.4665606022 0.4540818930 0.4073483944
+ 0.4683364928 0.4558798969 0.4090481102
+ 0.4700995982 0.4576708078 0.4107409120
+ 0.4718486965 0.4594548941 0.4124262929
+ 0.4735842943 0.4612326920 0.4141052067
+ 0.4753074944 0.4630033076 0.4157783985
+ 0.4770157039 0.4647684097 0.4174447060
+ 0.4787110090 0.4665257037 0.4191048145
+ 0.4803912044 0.4682776928 0.4207561910
+ 0.4820596874 0.4700196981 0.4224033952
+ 0.4837144017 0.4717536867 0.4240436852
+ 0.4853559136 0.4734789133 0.4256787002
+ 0.4869849980 0.4751960039 0.4273071885
+ 0.4886021018 0.4769046903 0.4289287925
+ 0.4902065098 0.4786028862 0.4305444062
+ 0.4917967021 0.4802902043 0.4321511984
+ 0.4933750033 0.4819664061 0.4337506890
+ 0.4949423969 0.4836333096 0.4353412986
+ 0.4964992106 0.4852910936 0.4369243979
+ 0.4980452061 0.4869402051 0.4385007024
+ 0.4995796978 0.4885810018 0.4400705099
+ 0.5011045933 0.4902119935 0.4416334033
+ 0.5026171207 0.4918344915 0.4431881905
+ 0.5041204095 0.4934495986 0.4447365105
+ 0.5056149960 0.4950574934 0.4462780058
+ 0.5071011186 0.4966585934 0.4478121996
+ 0.5085787773 0.4982511103 0.4493379891
+ 0.5100476146 0.4998351932 0.4508579075
+ 0.5115081072 0.5014110208 0.4523723125
+ 0.5129603744 0.5029789209 0.4538812935
+ 0.5144031048 0.5045387745 0.4553841949
+ 0.5158382058 0.5060889721 0.4568797052
+ 0.5172675848 0.5076315999 0.4583696127
+ 0.5186911821 0.5091663003 0.4598538876
+ 0.5201076865 0.5106902122 0.4613319039
+ 0.5215175152 0.5122056007 0.4628019035
+ 0.5229220986 0.5137131810 0.4642662108
+ 0.5243213177 0.5152136087 0.4657247961
+ 0.5257117152 0.5167068243 0.4671759903
+ 0.5270925760 0.5181897879 0.4686197937
+ 0.5284671783 0.5196657181 0.4700576961
+ 0.5298361778 0.5211349726 0.4714899957
+ 0.5311961174 0.5225929022 0.4729127884
+ 0.5325514078 0.5240452290 0.4743295908
+ 0.5339015126 0.5254917741 0.4757412076
+ 0.5352419019 0.5269278884 0.4771471024
+ 0.5365741253 0.5283558965 0.4785467982
+ 0.5379003286 0.5297778845 0.4799422026
+ 0.5392192006 0.5311921835 0.4813325107
+ 0.5405315757 0.5325987935 0.4827156961
+ 0.5418395996 0.5340006948 0.4840947092
+ 0.5431419015 0.5353968143 0.4854688942
+ 0.5444355011 0.5367845893 0.4868355095
+ 0.5457248092 0.5381672978 0.4881992936
+ 0.5470086932 0.5395433903 0.4895603955
+ 0.5482844114 0.5409129858 0.4909155071
+ 0.5495557189 0.5422785878 0.4922682941
+ 0.5508213043 0.5436385870 0.4936183095
+ 0.5520780087 0.5449923873 0.4949626923
+ 0.5533294082 0.5463421941 0.4963046014
+ 0.5545719862 0.5476844907 0.4976435006
+ 0.5558081865 0.5490229726 0.4989764988
+ 0.5570405126 0.5503587723 0.5003060102
+ 0.5582659245 0.5516861081 0.5016294718
+ 0.5594872832 0.5530081987 0.5029485226
+ 0.5607051253 0.5543255210 0.5042636991
+ 0.5619114041 0.5556346178 0.5055726767
+ 0.5631139278 0.5569404960 0.5068780780
+ 0.5643098950 0.5582408905 0.5081769228
+ 0.5655001998 0.5595366955 0.5094692111
+ 0.5666872859 0.5608298779 0.5107579827
+ 0.5678644180 0.5621141195 0.5120382905
+ 0.5690370202 0.5633950233 0.5133149028
+ 0.5702024102 0.5646705031 0.5145862103
+ 0.5713610053 0.5659371018 0.5158511996
+ 0.5725166798 0.5671998858 0.5171135068
+ 0.5736652017 0.5684533119 0.5183678865
+ 0.5748100877 0.5697032809 0.5196194053
+ 0.5759480000 0.5709466934 0.5208657980
+ 0.5770794153 0.5721855164 0.5221070051
+ 0.5782068968 0.5734214783 0.5233457088
+ 0.5793256760 0.5746489167 0.5245773196
+ 0.5804418921 0.5758739710 0.5258070230
+ 0.5815505981 0.5770922899 0.5270308852
+ 0.5826562047 0.5783078074 0.5282518268
+ 0.5837575793 0.5795192122 0.5294687152
+ 0.5848544240 0.5807257891 0.5306801200
+ 0.5859488249 0.5819299221 0.5318887830
+ 0.5870361924 0.5831274986 0.5330893993
+ 0.5881218910 0.5843237042 0.5342882276
+ 0.5891991258 0.5855125785 0.5354802012
+ 0.5902739763 0.5866997838 0.5366697907
+ 0.5913425088 0.5878822207 0.5378534198
+ 0.5924072266 0.5890613794 0.5390337706
+ 0.5934671760 0.5902367234 0.5402104855
+ 0.5945214033 0.5914065838 0.5413823128
+ 0.5955718160 0.5925731063 0.5425512791
+ 0.5966168046 0.5937318206 0.5437142253
+ 0.5976600051 0.5948877931 0.5448753834
+ 0.5986986160 0.5960369110 0.5460278988
+ 0.5997365713 0.5971850753 0.5471792221
+ 0.6007699966 0.5983254910 0.5483239293
+ 0.6018025875 0.5994653106 0.5494676232
+ 0.6028274298 0.6005986929 0.5506033897
+ 0.6038507819 0.6017305255 0.5517382026
+ 0.6048673987 0.6028541923 0.5528683066
+ 0.6058822274 0.6039755940 0.5539959073
+ 0.6068912745 0.6050894260 0.5551165938
+ 0.6078979969 0.6062008739 0.5562350750
+ 0.6088986993 0.6073063016 0.5573483109
+ 0.6098974943 0.6084094048 0.5584586859
+ 0.6108921766 0.6095077991 0.5595636964
+ 0.6118845940 0.6106038094 0.5606665015
+ 0.6128724813 0.6116948724 0.5617650151
+ 0.6138582826 0.6127820015 0.5628610849
+ 0.6148399115 0.6138613224 0.5639526248
+ 0.6158196926 0.6149377227 0.5650421977
+ 0.6167954803 0.6160081029 0.5661283135
+ 0.6177694201 0.6170759201 0.5672121048
+ 0.6187387109 0.6181375980 0.5682907104
+ 0.6197069287 0.6191977859 0.5693675280
+ 0.6206719279 0.6202535033 0.5704392195
+ 0.6216356754 0.6213079095 0.5715097785
+ 0.6225941181 0.6223561764 0.5725752711
+ 0.6235517263 0.6234036088 0.5736399889
+ 0.6245011091 0.6244416237 0.5746986270
+ 0.6254506111 0.6254796982 0.5757570267
+ 0.6263933778 0.6265093088 0.5768082142
+ 0.6273362041 0.6275388002 0.5778594017
+ 0.6282750964 0.6285620928 0.5789057016
+ 0.6292135119 0.6295846105 0.5799514055
+ 0.6301469803 0.6306030154 0.5809925795
+ 0.6310787201 0.6316199899 0.5820323825
+ 0.6320052743 0.6326320171 0.5830696821
+ 0.6329280138 0.6336405277 0.5841053724
+ 0.6338480115 0.6346455216 0.5851392150
+ 0.6347640753 0.6356455088 0.5861703753
+ 0.6356791258 0.6366437078 0.5871999264
+ 0.6365907192 0.6376357079 0.5882244110
+ 0.6375023127 0.6386275291 0.5892485976
+ 0.6384099126 0.6396116018 0.5902659297
+ 0.6393175721 0.6405956149 0.5912833214
+ 0.6402198076 0.6415734887 0.5922964215
+ 0.6411203146 0.6425495744 0.5933085084
+ 0.6420174241 0.6435208917 0.5943167210
+ 0.6429113746 0.6444880962 0.5953217745
+ 0.6438037157 0.6454532146 0.5963243246
+ 0.6446918845 0.6464130878 0.5973206162
+ 0.6455799937 0.6473729014 0.5983167887
+ 0.6464617848 0.6483271718 0.5993061066
+ 0.6473435760 0.6492815018 0.6002953053
+ 0.6482205987 0.6502330899 0.6012793183
+ 0.6490954757 0.6511834860 0.6022611856
+ 0.6499673724 0.6521314979 0.6032401919
+ 0.6508346200 0.6530753970 0.6042150855
+ 0.6517016292 0.6540189981 0.6051893830
+ 0.6525605917 0.6549540162 0.6061556935
+ 0.6534196734 0.6558889747 0.6071221232
+ 0.6542748213 0.6568189859 0.6080846786
+ 0.6551280022 0.6577466130 0.6090456247
+ 0.6559792757 0.6586722136 0.6100040078
+ 0.6568263173 0.6595928073 0.6109567881
+ 0.6576732993 0.6605134010 0.6119096279
+ 0.6585139036 0.6614270210 0.6128568053
+ 0.6593537927 0.6623396873 0.6138035059
+ 0.6601899862 0.6632481217 0.6147469282
+ 0.6610223055 0.6641519070 0.6156873107
+ 0.6618543863 0.6650553942 0.6166272759
+ 0.6626814008 0.6659533978 0.6175631881
+ 0.6635084748 0.6668512821 0.6184991002
+ 0.6643338203 0.6677461267 0.6194313169
+ 0.6651577950 0.6686387062 0.6203612089
+ 0.6659812927 0.6695305705 0.6212899089
+ 0.6668003798 0.6704167128 0.6222109795
+ 0.6676195860 0.6713029146 0.6231321096
+ 0.6684346199 0.6721845269 0.6240482926
+ 0.6692469716 0.6730633974 0.6249616146
+ 0.6700590253 0.6739416718 0.6258742213
+ 0.6708669066 0.6748149991 0.6267806888
+ 0.6716747284 0.6756882071 0.6276870966
+ 0.6724805236 0.6765586734 0.6285902858
+ 0.6732844710 0.6774268746 0.6294907928
+ 0.6740885973 0.6782950759 0.6303914189
+ 0.6748862267 0.6791549921 0.6312856078
+ 0.6756836176 0.6800147891 0.6321799159
+ 0.6764786839 0.6808714271 0.6330708861
+ 0.6772701740 0.6817231774 0.6339576244
+ 0.6780617833 0.6825749874 0.6348443031
+ 0.6788492799 0.6834219098 0.6357238293
+ 0.6796358228 0.6842675805 0.6366016269
+ 0.6804214120 0.6851121783 0.6374781132
+ 0.6812025905 0.6859521270 0.6383491158
+ 0.6819838285 0.6867920160 0.6392201185
+ 0.6827620864 0.6876285076 0.6400873065
+ 0.6835377216 0.6884618998 0.6409513950
+ 0.6843134165 0.6892954111 0.6418154836
+ 0.6850838065 0.6901227832 0.6426753998
+ 0.6858534217 0.6909493208 0.6435347199
+ 0.6866219044 0.6917747259 0.6443930268
+ 0.6873850822 0.6925947070 0.6452473998
+ 0.6881483197 0.6934146285 0.6461017132
+ 0.6889085770 0.6942318082 0.6469531059
+ 0.6896653175 0.6950455904 0.6478009820
+ 0.6904219985 0.6958593726 0.6486489773
+ 0.6911736131 0.6966683865 0.6494913101
+ 0.6919230819 0.6974754930 0.6503316164
+ 0.6926727295 0.6982825994 0.6511718035
+ 0.6934152246 0.6990849972 0.6520056725
+ 0.6941574216 0.6998872161 0.6528394222
+ 0.6948987842 0.7006883025 0.6536720991
+ 0.6956359148 0.7014837265 0.6545003057
+ 0.6963729858 0.7022790909 0.6553285122
+ 0.6971086264 0.7030712962 0.6561551094
+ 0.6978415251 0.7038580179 0.6569787860
+ 0.6985744238 0.7046447992 0.6578025818
+ 0.6993039250 0.7054278255 0.6586238742
+ 0.7000302076 0.7062076926 0.6594430208
+ 0.7007566094 0.7069876194 0.6602622271
+ 0.7014790177 0.7077631950 0.6610757113
+ 0.7021995783 0.7085369229 0.6618868113
+ 0.7029200792 0.7093105912 0.6626979113
+ 0.7036368847 0.7100790143 0.6635041833
+ 0.7043526769 0.7108461261 0.6643093824
+ 0.7050685287 0.7116131783 0.6651147008
+ 0.7057778239 0.7123737931 0.6659145951
+ 0.7064864039 0.7131338120 0.6667140722
+ 0.7071951032 0.7138937116 0.6675134897
+ 0.7078974843 0.7146461010 0.6683061123
+ 0.7085998058 0.7153983116 0.6690986156
+ 0.7093018889 0.7161502838 0.6698907018
+ 0.7100000978 0.7168943882 0.6706752181
+ 0.7106983066 0.7176384926 0.6714596748
+ 0.7113963962 0.7183822989 0.6722435951
+ 0.7120925784 0.7191202044 0.6730211973
+ 0.7127888799 0.7198581100 0.6737989187
+ 0.7134850025 0.7205957174 0.6745759845
+ 0.7141777277 0.7213283181 0.6753479838
+ 0.7148702741 0.7220609188 0.6761199236
+ 0.7155628204 0.7227932215 0.6768916249
+ 0.7162505984 0.7235177755 0.6776590943
+ 0.7169383764 0.7242423296 0.6784266233
+ 0.7176260948 0.7249668837 0.6791939735
+ 0.7183110714 0.7256841063 0.6799570918
+ 0.7189961076 0.7264013886 0.6807202101
+ 0.7196810246 0.7271186113 0.6814832091
+ 0.7203640938 0.7278298140 0.6822391748
+ 0.7210471034 0.7285404801 0.6829947233
+ 0.7217299938 0.7292512059 0.6837502122
+ 0.7224094272 0.7299574018 0.6845011711
+ 0.7230880857 0.7306627035 0.6852512956
+ 0.7237666845 0.7313678861 0.6860014200
+ 0.7244430184 0.7320697904 0.6867479086
+ 0.7251182199 0.7327703238 0.6874929070
+ 0.7257934213 0.7334707975 0.6882380247
+ 0.7264670730 0.7341670990 0.6889796257
+ 0.7271397114 0.7348600030 0.6897184253
+ 0.7278121710 0.7355527878 0.6904572845
+ 0.7284829021 0.7362431884 0.6911934018
+ 0.7291505933 0.7369294763 0.6919252872
+ 0.7298182249 0.7376158237 0.6926571131
+ 0.7304852009 0.7383013964 0.6933879256
+ 0.7311487794 0.7389839888 0.6941142082
+ 0.7318122983 0.7396667004 0.6948403716
+ 0.7324758768 0.7403492928 0.6955665946
+ 0.7331362963 0.7410271168 0.6962887049
+ 0.7337965965 0.7417047024 0.6970105767
+ 0.7344568968 0.7423822284 0.6977325082
+ 0.7351133823 0.7430555820 0.6984499097
+ 0.7357681990 0.7437270880 0.6991655231
+ 0.7364230156 0.7443987131 0.6998810172
+ 0.7370759249 0.7450683713 0.7005940080
+ 0.7377259731 0.7457355261 0.7013034821
+ 0.7383760810 0.7464025021 0.7020128965
+ 0.7390258908 0.7470691204 0.7027217150
+ 0.7396721244 0.7477303743 0.7034254074
+ 0.7403182983 0.7483916879 0.7041289806
+ 0.7409644723 0.7490528822 0.7048326731
+ 0.7416077852 0.7497091293 0.7055320740
+ 0.7422502041 0.7503637075 0.7062302828
+ 0.7428925037 0.7510182858 0.7069284916
+ 0.7435333729 0.7516707778 0.7076249719
+ 0.7441717982 0.7523202896 0.7083188891
+ 0.7448102236 0.7529696822 0.7090129256
+ 0.7454485893 0.7536191940 0.7097067833
+ 0.7460827231 0.7542620897 0.7103967071
+ 0.7467167974 0.7549051046 0.7110865116
+ 0.7473508716 0.7555481195 0.7117763758
+ 0.7479826212 0.7561879754 0.7124634981
+ 0.7486125231 0.7568256259 0.7131487131
+ 0.7492423058 0.7574632764 0.7138339281
+ 0.7498719096 0.7581006289 0.7145183086
+ 0.7504996061 0.7587358952 0.7151979804
+ 0.7511271834 0.7593712211 0.7158777118
+ 0.7517548203 0.7600064874 0.7165573835
+ 0.7523803115 0.7606381178 0.7172330022
+ 0.7530044913 0.7612677217 0.7179064155
+ 0.7536287904 0.7618973851 0.7185798883
+ 0.7542523742 0.7625262141 0.7192522883
+ 0.7548720837 0.7631500959 0.7199187875
+ 0.7554919124 0.7637740970 0.7205854058
+ 0.7561116219 0.7643979788 0.7212520242
+ 0.7567297816 0.7650203109 0.7219150066
+ 0.7573469877 0.7656415105 0.7225760221
+ 0.7579641938 0.7662625909 0.7232369781
+ 0.7585812807 0.7668836117 0.7238978148
+ 0.7591949105 0.7674986720 0.7245547175
+ 0.7598084807 0.7681139112 0.7252116203
+ 0.7604219913 0.7687290907 0.7258685231
+ 0.7610334754 0.7693409920 0.7265231013
+ 0.7616422772 0.7699488997 0.7271751165
+ 0.7622511983 0.7705568075 0.7278271914
+ 0.7628600001 0.7711647153 0.7284792066
+ 0.7634664774 0.7717682719 0.7291265130
+ 0.7640724778 0.7723709941 0.7297729254
+ 0.7646784782 0.7729737163 0.7304192781
+ 0.7652838826 0.7735757232 0.7310644984
+ 0.7658861279 0.7741742730 0.7317045927
+ 0.7664881945 0.7747728825 0.7323446870
+ 0.7670903802 0.7753714919 0.7329847813
+ 0.7676901221 0.7759671211 0.7336224914
+ 0.7682873011 0.7765594721 0.7342575788
+ 0.7688844204 0.7771518230 0.7348927855
+ 0.7694815993 0.7777441740 0.7355279922
+ 0.7700763941 0.7783325911 0.7361595035
+ 0.7706704736 0.7789196968 0.7367901206
+ 0.7712646127 0.7795069218 0.7374206781
+ 0.7718585730 0.7800940275 0.7380509973
+ 0.7724485993 0.7806769013 0.7386764884
+ 0.7730386257 0.7812598944 0.7393019795
+ 0.7736285925 0.7818428874 0.7399274707
+ 0.7742174268 0.7824249268 0.7405520082
+ 0.7748020887 0.7830036879 0.7411739230
+ 0.7753869295 0.7835826278 0.7417957187
+ 0.7759717107 0.7841613889 0.7424175143
+ 0.7765550017 0.7847386003 0.7430375218
+ 0.7771365047 0.7853134871 0.7436553240
+ 0.7777178884 0.7858883739 0.7442730069
+ 0.7782993913 0.7864633203 0.7448908091
+ 0.7788782716 0.7870357037 0.7455062270
+ 0.7794554830 0.7876065969 0.7461202145
+ 0.7800326943 0.7881773710 0.7467340827
+ 0.7806097865 0.7887482047 0.7473481297
+ 0.7811824083 0.7893161178 0.7479594946
+ 0.7817530036 0.7898828983 0.7485699058
+ 0.7823237181 0.7904496789 0.7491803765
+ 0.7828943729 0.7910165191 0.7497909069
+ 0.7834607959 0.7915802002 0.7503979802
+ 0.7840262055 0.7921432257 0.7510045171
+ 0.7845916152 0.7927060723 0.7516109943
+ 0.7851570249 0.7932690978 0.7522174716
+ 0.7857185006 0.7938284874 0.7528216839
+ 0.7862794995 0.7943874002 0.7534257174
+ 0.7868404984 0.7949463129 0.7540296912
+ 0.7874014974 0.7955052853 0.7546337247
+ 0.7879565954 0.7960606217 0.7552338839
+ 0.7885110974 0.7966156006 0.7558339238
+ 0.7890654802 0.7971706986 0.7564339042
+ 0.7896199822 0.7977256775 0.7570338249
+ 0.7901695967 0.7982773185 0.7576287985
+ 0.7907186747 0.7988284826 0.7582232952
+ 0.7912678123 0.7993797064 0.7588177919
+ 0.7918167710 0.7999309897 0.7594122887
+ 0.7923620939 0.8004786968 0.7600033283
+ 0.7929067016 0.8010259271 0.7605937719
+ 0.7934514284 0.8015732169 0.7611842752
+ 0.7939960957 0.8021203876 0.7617747188
+ 0.7945355177 0.8026636839 0.7623630762
+ 0.7950735092 0.8032060862 0.7629508972
+ 0.7956116199 0.8037484288 0.7635387778
+ 0.7961496711 0.8042907715 0.7641267180
+ 0.7966831923 0.8048292994 0.7647116780
+ 0.7972148061 0.8053662181 0.7652955055
+ 0.7977464199 0.8059030771 0.7658793926
+ 0.7982779741 0.8064399958 0.7664632797
+ 0.7988070846 0.8069747090 0.7670440078
+ 0.7993342876 0.8075076938 0.7676222920
+ 0.7998613715 0.8080406785 0.7682006955
+ 0.8003885746 0.8085737228 0.7687789798
+ 0.8009144068 0.8091049194 0.7693557739
+ 0.8014380932 0.8096331954 0.7699301243
+ 0.8019618988 0.8101614714 0.7705044150
+ 0.8024855852 0.8106899261 0.7710787058
+ 0.8030084968 0.8112171888 0.7716525197
+ 0.8035271764 0.8117402792 0.7722241282
+ 0.8040459752 0.8122633100 0.7727957964
+ 0.8045647144 0.8127862811 0.7733674049
+ 0.8050835133 0.8133093119 0.7739390135
+ 0.8055983782 0.8138288856 0.7745084763
+ 0.8061131239 0.8143482208 0.7750778198
+ 0.8066278100 0.8148674965 0.7756472230
+ 0.8071424961 0.8153867722 0.7762165070
+ 0.8076552153 0.8159031868 0.7767828703
+ 0.8081669211 0.8164179921 0.7773479819
+ 0.8086786270 0.8169327974 0.7779129744
+ 0.8091902137 0.8174476027 0.7784780264
+ 0.8097003102 0.8179603219 0.7790415287
+ 0.8102073073 0.8184689879 0.7796025872
+ 0.8107144237 0.8189777136 0.7801635861
+ 0.8112214804 0.8194864988 0.7807245851
+ 0.8117284775 0.8199952245 0.7812855840
+ 0.8122318983 0.8205006123 0.7818430066
+ 0.8127353191 0.8210061193 0.7824004889
+ 0.8132386804 0.8215116262 0.7829579711
+ 0.8137421012 0.8220170140 0.7835153937
+ 0.8142439127 0.8225206733 0.7840704918
+ 0.8147445917 0.8230230808 0.7846242189
+ 0.8152452707 0.8235256076 0.7851778269
+ 0.8157460093 0.8240280747 0.7857314944
+ 0.8162457943 0.8245295286 0.7862842083
+ 0.8167423010 0.8250265121 0.7868337035
+ 0.8172388077 0.8255233765 0.7873830795
+ 0.8177353144 0.8260204196 0.7879325747
+ 0.8182318211 0.8265172839 0.7884820104
+ 0.8187258244 0.8270121813 0.7890285850
+ 0.8192189932 0.8275064230 0.7895743251
+ 0.8197121024 0.8280006051 0.7901200056
+ 0.8202052712 0.8284947872 0.7906656265
+ 0.8206979036 0.8289883137 0.7912104726
+ 0.8211886883 0.8294799924 0.7917528152
+ 0.8216794729 0.8299716711 0.7922950983
+ 0.8221703172 0.8304634094 0.7928373814
+ 0.8226609826 0.8309550285 0.7933797240
+ 0.8231490850 0.8314424157 0.7939193249
+ 0.8236359954 0.8319281936 0.7944579124
+ 0.8241229057 0.8324139118 0.7949965000
+ 0.8246098161 0.8328995705 0.7955352068
+ 0.8250963092 0.8333846927 0.7960731983
+ 0.8255802989 0.8338664770 0.7966079116
+ 0.8260642290 0.8343483210 0.7971426845
+ 0.8265480995 0.8348299861 0.7976773977
+ 0.8270320892 0.8353117704 0.7982121110
+ 0.8275148869 0.8357924819 0.7987449169
+ 0.8279966712 0.8362724185 0.7992761135
+ 0.8284785748 0.8367521763 0.7998073101
+ 0.8289604187 0.8372321129 0.8003385067
+ 0.8294422030 0.8377118707 0.8008695841
+ 0.8299208879 0.8381869793 0.8013979197
+ 0.8303992152 0.8386614919 0.8019258976
+ 0.8308774829 0.8391360044 0.8024538755
+ 0.8313558102 0.8396105170 0.8029819131
+ 0.8318336010 0.8400840759 0.8035091162
+ 0.8323091865 0.8405542970 0.8040336967
+ 0.8327847719 0.8410243988 0.8045582771
+ 0.8332604170 0.8414946198 0.8050829172
+ 0.8337361217 0.8419647813 0.8056074977
+ 0.8342108130 0.8424335122 0.8061311245
+ 0.8346846104 0.8429005742 0.8066536188
+ 0.8351584077 0.8433678150 0.8071761131
+ 0.8356322050 0.8438348770 0.8076986074
+ 0.8361061215 0.8443019986 0.8082212210
+ 0.8365774751 0.8447657824 0.8087412715
+ 0.8370481133 0.8452283740 0.8092607260
+ 0.8375186920 0.8456910253 0.8097800016
+ 0.8379892111 0.8461534977 0.8102992773
+ 0.8384597898 0.8466160893 0.8108186722
+ 0.8389282227 0.8470754027 0.8113338947
+ 0.8393964171 0.8475344181 0.8118488789
+ 0.8398646116 0.8479933739 0.8123638034
+ 0.8403326869 0.8484523892 0.8128787875
+ 0.8408008218 0.8489112258 0.8133934736
+ 0.8412675261 0.8493679166 0.8139054179
+ 0.8417341113 0.8498246074 0.8144173026
+ 0.8422008157 0.8502812982 0.8149293065
+ 0.8426674008 0.8507381082 0.8154411912
+ 0.8431332707 0.8511940241 0.8159524202
+ 0.8435961008 0.8516469002 0.8164612055
+ 0.8440588713 0.8520997763 0.8169698715
+ 0.8445217013 0.8525527120 0.8174785972
+ 0.8449844718 0.8530055881 0.8179873228
+ 0.8454462886 0.8534573913 0.8184950948
+ 0.8459054232 0.8539065123 0.8190008998
+ 0.8463646173 0.8543556929 0.8195067048
+ 0.8468238115 0.8548048735 0.8200125098
+ 0.8472828865 0.8552539945 0.8205183148
+ 0.8477417231 0.8557022214 0.8210232854
+ 0.8481997848 0.8561481833 0.8215265274
+ 0.8486577868 0.8565942049 0.8220297098
+ 0.8491159081 0.8570402265 0.8225328922
+ 0.8495739102 0.8574863076 0.8230360746
+ 0.8500308990 0.8579313755 0.8235384226
+ 0.8504856229 0.8583744168 0.8240389228
+ 0.8509402275 0.8588173985 0.8245393038
+ 0.8513947725 0.8592604995 0.8250396848
+ 0.8518494964 0.8597034812 0.8255401850
+ 0.8523032069 0.8601452708 0.8260402083
+ 0.8527547121 0.8605837226 0.8265390992
+ 0.8532062173 0.8610221148 0.8270381093
+ 0.8536576033 0.8614605069 0.8275370002
+ 0.8541091084 0.8618988991 0.8280360103
+ 0.8545603752 0.8623365164 0.8285344243
+ 0.8550112247 0.8627706766 0.8290308118
+ 0.8554618955 0.8632047772 0.8295271993
+ 0.8559126854 0.8636388779 0.8300235271
+ 0.8563634157 0.8640729785 0.8305199146
+ 0.8568140268 0.8645070195 0.8310160041
+ 0.8572617769 0.8649371862 0.8315085769
+ 0.8577095270 0.8653674722 0.8320013285
+ 0.8581572771 0.8657976985 0.8324939013
+ 0.8586050272 0.8662279844 0.8329865932
+ 0.8590527773 0.8666582108 0.8334792256
+ 0.8594974279 0.8670850992 0.8339697123
+ 0.8599414825 0.8675115705 0.8344600201
+ 0.8603855968 0.8679379821 0.8349502087
+ 0.8608297110 0.8683645129 0.8354403973
+ 0.8612738848 0.8687909245 0.8359307051
+ 0.8617168069 0.8692150712 0.8364191055
+ 0.8621590734 0.8696380854 0.8369066715
+ 0.8626012802 0.8700612187 0.8373944163
+ 0.8630436063 0.8704841733 0.8378819823
+ 0.8634858727 0.8709071875 0.8383696079
+ 0.8639271855 0.8713290095 0.8388562799
+ 0.8643670082 0.8717489839 0.8393415809
+ 0.8648067713 0.8721688986 0.8398268819
+ 0.8652465940 0.8725888729 0.8403123021
+ 0.8656864166 0.8730089068 0.8407976031
+ 0.8661258817 0.8734285831 0.8412827253
+ 0.8665626049 0.8738455176 0.8417659998
+ 0.8669993281 0.8742625117 0.8422493935
+ 0.8674361110 0.8746795058 0.8427327275
+ 0.8678727746 0.8750964999 0.8432160020
+ 0.8683094978 0.8755133748 0.8436992764
+ 0.8687452078 0.8759278059 0.8441810012
+ 0.8691806197 0.8763412237 0.8446620703
+ 0.8696159720 0.8767547011 0.8451433182
+ 0.8700513840 0.8771681786 0.8456243873
+ 0.8704867959 0.8775817156 0.8461055160
+ 0.8709213734 0.8779937029 0.8465862870
+ 0.8713548183 0.8784034848 0.8470665216
+ 0.8717882037 0.8788132071 0.8475466967
+ 0.8722217083 0.8792229295 0.8480268717
+ 0.8726550937 0.8796325922 0.8485071063
+ 0.8730884790 0.8800423741 0.8489872217
+ 0.8735179901 0.8804501295 0.8494654894
+ 0.8739473224 0.8808577061 0.8499435782
+ 0.8743764758 0.8812652826 0.8504217267
+ 0.8748058081 0.8816729188 0.8508998752
+ 0.8752350211 0.8820804954 0.8513780236
+ 0.8756635189 0.8824869990 0.8518546820
+ 0.8760908842 0.8828920126 0.8523296714
+ 0.8765184283 0.8832970262 0.8528047204
+ 0.8769457936 0.8837019801 0.8532798290
+ 0.8773732781 0.8841069937 0.8537548184
+ 0.8778008223 0.8845118880 0.8542299271
+ 0.8782266974 0.8849135041 0.8547031283
+ 0.8786525726 0.8853148222 0.8551763296
+ 0.8790785074 0.8857160211 0.8556494713
+ 0.8795043230 0.8861172795 0.8561226130
+ 0.8799301982 0.8865185976 0.8565958142
+ 0.8803547025 0.8869189024 0.8570681810
+ 0.8807768822 0.8873174787 0.8575392962
+ 0.8811990023 0.8877161145 0.8580104113
+ 0.8816211820 0.8881146908 0.8584814072
+ 0.8820433021 0.8885133266 0.8589525223
+ 0.8824654818 0.8889119029 0.8594235778
+ 0.8828865886 0.8893092871 0.8598933816
+ 0.8833072782 0.8897061944 0.8603627086
+ 0.8837280869 0.8901032209 0.8608320951
+ 0.8841487765 0.8905001879 0.8613014221
+ 0.8845695257 0.8908970952 0.8617706895
+ 0.8849902153 0.8912938237 0.8622398973
+ 0.8854097128 0.8916872740 0.8627077937
+ 0.8858292103 0.8920807242 0.8631755710
+ 0.8862488270 0.8924741149 0.8636435270
+ 0.8866683245 0.8928675056 0.8641113043
+ 0.8870878220 0.8932608962 0.8645792007
+ 0.8875058293 0.8936526775 0.8650463820
+ 0.8879212141 0.8940414786 0.8655126095
+ 0.8883365989 0.8944302797 0.8659787178
+ 0.8887521029 0.8948190808 0.8664448857
+ 0.8891674876 0.8952078223 0.8669111133
+ 0.8895828724 0.8955966234 0.8673772812
+ 0.8899958134 0.8959844708 0.8678423166
+ 0.8904073238 0.8963717818 0.8683065176
+ 0.8908187151 0.8967590928 0.8687707782
+ 0.8912302256 0.8971464038 0.8692349792
+ 0.8916416168 0.8975337148 0.8696991801
+ 0.8920531273 0.8979210258 0.8701635003
+ 0.8924632072 0.8983063102 0.8706263900
+ 0.8928729892 0.8986909986 0.8710889816
+ 0.8932827115 0.8990756869 0.8715515733
+ 0.8936924934 0.8994604945 0.8720142245
+ 0.8941022754 0.8998451829 0.8724768758
+ 0.8945121169 0.9002298713 0.8729395270
+ 0.8949183226 0.9006112218 0.8734009266
+ 0.8953242898 0.9009922743 0.8738622069
+ 0.8957303762 0.9013733268 0.8743236065
+ 0.8961364031 0.9017543793 0.8747850060
+ 0.8965424895 0.9021354914 0.8752462864
+ 0.8969483972 0.9025166035 0.8757076263
+ 0.8973509073 0.9028971195 0.8761674166
+ 0.8977534175 0.9032775760 0.8766270876
+ 0.8981559277 0.9036580920 0.8770868778
+ 0.8985583186 0.9040386081 0.8775466084
+ 0.8989608288 0.9044191837 0.8780063987
+ 0.8993632197 0.9047995210 0.8784658909
+ 0.8997644186 0.9051784277 0.8789238930
+ 0.9001656175 0.9055572748 0.8793817759
+ 0.9005668163 0.9059361219 0.8798397183
+ 0.9009678960 0.9063150287 0.8802977204
+ 0.9013690948 0.9066938758 0.8807556033
+ 0.9017699957 0.9070724249 0.8812134266
+ 0.9021677971 0.9074478149 0.8816698194
+ 0.9025657177 0.9078232050 0.8821262717
+ 0.9029635191 0.9081985950 0.8825827241
+ 0.9033613801 0.9085739851 0.8830391765
+ 0.9037591815 0.9089493155 0.8834956288
+ 0.9041569233 0.9093245864 0.8839520812
+ 0.9045507908 0.9096974730 0.8844081163
+ 0.9049447179 0.9100704193 0.8848640919
+ 0.9053385854 0.9104431868 0.8853201270
+ 0.9057325125 0.9108160734 0.8857762218
+ 0.9061263800 0.9111890197 0.8862321973
+ 0.9065201879 0.9115619063 0.8866881728
+ 0.9069120288 0.9119333029 0.8871427774
+ 0.9073035121 0.9123045802 0.8875973225
+ 0.9076951146 0.9126759768 0.8880518079
+ 0.9080867171 0.9130473137 0.8885064125
+ 0.9084782004 0.9134187102 0.8889608979
+ 0.9088698030 0.9137899876 0.8894153833
+ 0.9092592001 0.9141587019 0.8898677826
+ 0.9096478820 0.9145267010 0.8903195858
+ 0.9100366235 0.9148947001 0.8907713890
+ 0.9104254246 0.9152626991 0.8912233114
+ 0.9108141065 0.9156306982 0.8916751146
+ 0.9112027884 0.9159986973 0.8921269178
+ 0.9115895033 0.9163650274 0.8925778270
+ 0.9119747877 0.9167301059 0.8930280209
+ 0.9123600721 0.9170951843 0.8934782743
+ 0.9127454162 0.9174603224 0.8939285278
+ 0.9131307006 0.9178254008 0.8943787217
+ 0.9135159850 0.9181904793 0.8948289752
+ 0.9139006734 0.9185553789 0.8952789903
+ 0.9142842293 0.9189199805 0.8957288265
+ 0.9146677256 0.9192845225 0.8961784840
+ 0.9150511026 0.9196491241 0.8966283202
+ 0.9154345989 0.9200137258 0.8970779777
+ 0.9158180952 0.9203782082 0.8975276947
+ 0.9162014723 0.9207428098 0.8979774117
+ 0.9165825844 0.9211050272 0.8984262943
+ 0.9169636965 0.9214671850 0.8988751769
+ 0.9173448086 0.9218295217 0.8993239999
+ 0.9177259207 0.9221916795 0.8997728825
+ 0.9181070924 0.9225540161 0.9002218246
+ 0.9184882045 0.9229161739 0.9006705880
+ 0.9188672900 0.9232757092 0.9011185765
+ 0.9192454815 0.9236338735 0.9015660286
+ 0.9196236134 0.9239919782 0.9020134807
+ 0.9200018048 0.9243502021 0.9024609923
+ 0.9203799963 0.9247083068 0.9029083848
+ 0.9207581282 0.9250664711 0.9033558965
+ 0.9211360216 0.9254242182 0.9038028717
+ 0.9215127826 0.9257805943 0.9042485952
+ 0.9218896031 0.9261369705 0.9046943188
+ 0.9222664237 0.9264934063 0.9051399827
+ 0.9226431847 0.9268497825 0.9055857062
+ 0.9230201244 0.9272062182 0.9060314298
+ 0.9233968854 0.9275625944 0.9064772129
+ 0.9237722158 0.9279180169 0.9069222808
+ 0.9241471291 0.9282730818 0.9073672891
+ 0.9245219827 0.9286280870 0.9078122973
+ 0.9248968959 0.9289832115 0.9082573056
+ 0.9252718091 0.9293382764 0.9087021947
+ 0.9256467223 0.9296934009 0.9091472030
+ 0.9260206819 0.9300473928 0.9095919132
+ 0.9263923764 0.9303987026 0.9100357890
+ 0.9267640710 0.9307498932 0.9104797244
+ 0.9271358252 0.9311012030 0.9109236002
+ 0.9275075197 0.9314523935 0.9113674760
+ 0.9278790951 0.9318037033 0.9118114114
+ 0.9282507896 0.9321550131 0.9122552872
+ 0.9286209941 0.9325038195 0.9126986265
+ 0.9289904833 0.9328516126 0.9131416082
+ 0.9293599725 0.9331995249 0.9135845900
+ 0.9297295213 0.9335473180 0.9140275717
+ 0.9300991297 0.9338951111 0.9144706726
+ 0.9304686189 0.9342429042 0.9149137139
+ 0.9308379889 0.9345906973 0.9153565764
+ 0.9312061071 0.9349374175 0.9157990217
+ 0.9315742254 0.9352840781 0.9162414074
+ 0.9319424033 0.9356307983 0.9166836739
+ 0.9323105216 0.9359775186 0.9171261191
+ 0.9326786995 0.9363241792 0.9175685048
+ 0.9330468178 0.9366708994 0.9180107713
+ 0.9334139228 0.9370164871 0.9184523225
+ 0.9337794185 0.9373604059 0.9188922048
+ 0.9341449142 0.9377043247 0.9193322062
+ 0.9345104098 0.9380481243 0.9197722077
+ 0.9348759055 0.9383919835 0.9202122092
+ 0.9352414012 0.9387359023 0.9206520915
+ 0.9356068969 0.9390798211 0.9210920930
+ 0.9359713793 0.9394215941 0.9215306044
+ 0.9363352060 0.9397622943 0.9219684005
+ 0.9366990924 0.9401029944 0.9224061966
+ 0.9370629787 0.9404436946 0.9228439927
+ 0.9374268055 0.9407843947 0.9232817888
+ 0.9377906919 0.9411249757 0.9237195849
+ 0.9381545782 0.9414656758 0.9241573811
+ 0.9385176897 0.9418051839 0.9245941043
+ 0.9388806820 0.9421443939 0.9250305891
+ 0.9392436743 0.9424837232 0.9254671931
+ 0.9396067262 0.9428228736 0.9259036779
+ 0.9399697781 0.9431622028 0.9263402224
+ 0.9403327703 0.9435014129 0.9267767072
+ 0.9406958222 0.9438406825 0.9272131920
+ 0.9410552979 0.9441781044 0.9276493788
+ 0.9414148927 0.9445155859 0.9280856252
+ 0.9417744875 0.9448531270 0.9285218120
+ 0.9421340823 0.9451906085 0.9289579988
+ 0.9424936175 0.9455280900 0.9293941259
+ 0.9428532124 0.9458655715 0.9298303127
+ 0.9432125092 0.9462026954 0.9302664995
+ 0.9435694218 0.9465367198 0.9307025075
+ 0.9439262748 0.9468708038 0.9311385751
+ 0.9442831874 0.9472048283 0.9315745831
+ 0.9446401000 0.9475389123 0.9320107102
+ 0.9449970126 0.9478729963 0.9324467182
+ 0.9453539848 0.9482070208 0.9328827858
+ 0.9457105994 0.9485409260 0.9333183765
+ 0.9460659027 0.9488738179 0.9337515235
+ 0.9464210868 0.9492065907 0.9341846108
+ 0.9467762709 0.9495394826 0.9346178174
+ 0.9471315145 0.9498723149 0.9350509048
+ 0.9474868178 0.9502052069 0.9354839921
+ 0.9478420019 0.9505379796 0.9359171987
+ 0.9481968880 0.9508708119 0.9363495708
+ 0.9485492110 0.9512028098 0.9367771745
+ 0.9489015937 0.9515348077 0.9372048974
+ 0.9492539167 0.9518669248 0.9376325011
+ 0.9496062994 0.9521989226 0.9380601048
+ 0.9499586225 0.9525309205 0.9384877086
+ 0.9503110051 0.9528629184 0.9389153719
+ 0.9506632090 0.9531947970 0.9393426776
+ 0.9510114789 0.9535222054 0.9397646785
+ 0.9513596892 0.9538496733 0.9401866794
+ 0.9517080188 0.9541772008 0.9406086802
+ 0.9520562291 0.9545047283 0.9410306811
+ 0.9524044991 0.9548320770 0.9414526224
+ 0.9527528286 0.9551596045 0.9418746233
+ 0.9531009793 0.9554870725 0.9422966242
+ 0.9534440041 0.9558085203 0.9427149892
+ 0.9537863135 0.9561291933 0.9431329966
+ 0.9541286230 0.9564499259 0.9435510039
+ 0.9544708729 0.9567705989 0.9439690113
+ 0.9548131824 0.9570913911 0.9443870187
+ 0.9551554918 0.9574121237 0.9448050261
+ 0.9554979205 0.9577327967 0.9452229738
+ 0.9558368921 0.9580510259 0.9456391931
+ 0.9561746120 0.9583681226 0.9460545182
+ 0.9565122724 0.9586851001 0.9464697838
+ 0.9568499923 0.9590021968 0.9468852282
+ 0.9571877122 0.9593192935 0.9473004937
+ 0.9575253725 0.9596363902 0.9477158785
+ 0.9578630924 0.9599534869 0.9481312037
+ 0.9581995010 0.9602695107 0.9485455155
+ 0.9585341215 0.9605841041 0.9489583969
+ 0.9588688016 0.9608986974 0.9493712783
+ 0.9592034817 0.9612134099 0.9497842193
+ 0.9595381021 0.9615280032 0.9501971006
+ 0.9598727822 0.9618425965 0.9506099224
+ 0.9602074027 0.9621571898 0.9510228038
+ 0.9605417848 0.9624714851 0.9514353871
+ 0.9608737826 0.9627835751 0.9518461227
+ 0.9612057805 0.9630956054 0.9522566795
+ 0.9615378976 0.9634075761 0.9526674151
+ 0.9618698955 0.9637196064 0.9530779719
+ 0.9622018933 0.9640315771 0.9534885883
+ 0.9625340104 0.9643437266 0.9538993239
+ 0.9628660083 0.9646556973 0.9543098807
+ 0.9631955028 0.9649661779 0.9547188878
+ 0.9635242820 0.9652761221 0.9551271796
+ 0.9638530016 0.9655861259 0.9555355906
+ 0.9641817212 0.9658960104 0.9559440017
+ 0.9645103812 0.9662060142 0.9563524127
+ 0.9648391008 0.9665158987 0.9567608237
+ 0.9651678205 0.9668259025 0.9571691751
+ 0.9654955268 0.9671350121 0.9575765729
+ 0.9658207297 0.9674422145 0.9579817057
+ 0.9661458731 0.9677494168 0.9583867788
+ 0.9664710760 0.9680566788 0.9587919116
+ 0.9667962790 0.9683638811 0.9591971040
+ 0.9671214819 0.9686710835 0.9596021771
+ 0.9674468040 0.9689784050 0.9600073099
+ 0.9677720070 0.9692856073 0.9604123831
+ 0.9680947065 0.9695898294 0.9608144760
+ 0.9684168100 0.9698932767 0.9612157941
+ 0.9687389135 0.9701967239 0.9616171718
+ 0.9690610170 0.9705001712 0.9620184898
+ 0.9693831205 0.9708036780 0.9624199271
+ 0.9697052836 0.9711071253 0.9628211856
+ 0.9700273871 0.9714105725 0.9632225037
+ 0.9703485966 0.9717134237 0.9636229277
+ 0.9706671238 0.9720138907 0.9640201926
+ 0.9709854722 0.9723144770 0.9644175172
+ 0.9713038802 0.9726150036 0.9648149014
+ 0.9716224074 0.9729155898 0.9652122259
+ 0.9719408154 0.9732161760 0.9656094909
+ 0.9722592831 0.9735167027 0.9660068154
+ 0.9725776911 0.9738172889 0.9664040804
+ 0.9728938937 0.9741159081 0.9667984843
+ 0.9732084870 0.9744132757 0.9671909213
+ 0.9735231996 0.9747105837 0.9675834179
+ 0.9738377929 0.9750080109 0.9679757953
+ 0.9741525054 0.9753053784 0.9683682919
+ 0.9744670987 0.9756028056 0.9687607884
+ 0.9747818112 0.9759001136 0.9691532254
+ 0.9750964046 0.9761974812 0.9695457220
+ 0.9754077196 0.9764910936 0.9699333906
+ 0.9757186174 0.9767844081 0.9703207016
+ 0.9760295749 0.9770777225 0.9707080126
+ 0.9763404727 0.9773709774 0.9710952044
+ 0.9766514897 0.9776641726 0.9714825153
+ 0.9769623876 0.9779574871 0.9718698263
+ 0.9772734046 0.9782508016 0.9722570777
+ 0.9775835872 0.9785434008 0.9726434946
+ 0.9778903127 0.9788324833 0.9730253816
+ 0.9781969786 0.9791216254 0.9734073877
+ 0.9785035849 0.9794107080 0.9737892747
+ 0.9788103104 0.9796997905 0.9741712213
+ 0.9791169763 0.9799888730 0.9745532274
+ 0.9794237018 0.9802780151 0.9749351144
+ 0.9797304273 0.9805672169 0.9753171206
+ 0.9800354242 0.9808546901 0.9756969213
+ 0.9803376198 0.9811394811 0.9760727882
+ 0.9806396961 0.9814242125 0.9764487147
+ 0.9809417725 0.9817090034 0.9768247008
+ 0.9812439084 0.9819936752 0.9772006273
+ 0.9815461040 0.9822785258 0.9775764942
+ 0.9818481803 0.9825631976 0.9779524803
+ 0.9821503162 0.9828479886 0.9783284068
+ 0.9824500084 0.9831303954 0.9787008166
+ 0.9827467799 0.9834101796 0.9790692925
+ 0.9830436707 0.9836900234 0.9794378281
+ 0.9833405018 0.9839698076 0.9798063040
+ 0.9836373925 0.9842494726 0.9801747799
+ 0.9839342237 0.9845293164 0.9805433154
+ 0.9842311144 0.9848091006 0.9809117913
+ 0.9845278859 0.9850888848 0.9812803268
+ 0.9848216176 0.9853662848 0.9816443920
+ 0.9851121902 0.9856415987 0.9820045233
+ 0.9854028225 0.9859169126 0.9823644757
+ 0.9856935143 0.9861922264 0.9827246070
+ 0.9859840870 0.9864674807 0.9830846786
+ 0.9862747192 0.9867427945 0.9834446907
+ 0.9865652919 0.9870181084 0.9838048220
+ 0.9868559837 0.9872933030 0.9841647744
+ 0.9871436954 0.9875661731 0.9845203161
+ 0.9874286056 0.9878365993 0.9848713875
+ 0.9877135158 0.9881070256 0.9852225184
+ 0.9879983068 0.9883773923 0.9855734706
+ 0.9882832170 0.9886478186 0.9859246016
+ 0.9885681272 0.9889181852 0.9862756729
+ 0.9888529778 0.9891886115 0.9866266847
+ 0.9891378880 0.9894589782 0.9869778156
+ 0.9894198179 0.9897269011 0.9873241782
+ 0.9896976948 0.9899914265 0.9876642823
+ 0.9899755120 0.9902557731 0.9880045056
+ 0.9902533889 0.9905201793 0.9883446097
+ 0.9905313253 0.9907847047 0.9886847138
+ 0.9908092022 0.9910491109 0.9890248179
+ 0.9910870194 0.9913135767 0.9893649817
+ 0.9913648963 0.9915779829 0.9897050858
+ 0.9916403294 0.9918411970 0.9900411963
+ 0.9919093251 0.9921011925 0.9903668165
+ 0.9921782017 0.9923611879 0.9906923175
+ 0.9924470782 0.9926211834 0.9910178781
+ 0.9927160144 0.9928811789 0.9913433790
+ 0.9929850101 0.9931411743 0.9916689992
+ 0.9932538867 0.9934012294 0.9919946194
+ 0.9935228229 0.9936612248 0.9923201203
+ 0.9937912822 0.9939208031 0.9926447868
+ 0.9940528274 0.9941738844 0.9929555058
+ 0.9943143129 0.9944270253 0.9932662249
+ 0.9945756793 0.9946801066 0.9935768843
+ 0.9948372245 0.9949333072 0.9938876033
+ 0.9950987101 0.9951863885 0.9941983223
+ 0.9953601956 0.9954395294 0.9945089817
+ 0.9956216216 0.9956926107 0.9948197007
+ 0.9958831072 0.9959456921 0.9951304793
+ 0.9961357713 0.9961907864 0.9954292774
+ 0.9963858724 0.9964336157 0.9957246780
+ 0.9966359735 0.9966763258 0.9960200787
+ 0.9968860745 0.9969190955 0.9963154793
+ 0.9971361756 0.9971618056 0.9966108799
+ 0.9973862767 0.9974045753 0.9969062805
+ 0.9976363778 0.9976472855 0.9972016811
+ 0.9978864789 0.9978901148 0.9974970818
+ 0.9981297851 0.9981291294 0.9977846742
+ 0.9983634949 0.9983630180 0.9980615973
+ 0.9985973239 0.9985967875 0.9983385205
+ 0.9988310933 0.9988306761 0.9986153841
+ 0.9990649223 0.9990645051 0.9988924265
+ 0.9992986917 0.9992983937 0.9991692901
+ 0.9995324016 0.9995322824 0.9994462132
+ 0.9997661710 0.9997661114 0.9997230768
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_hdc_100_plus.spi1d b/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_hdc_100_plus.spi1d
new file mode 100644
index 00000000000..41dbb8cc60c
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_hdc_100_plus.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0071816309 0.0082409112 0.0071816309
+ 0.0151500301 0.0168459192 0.0151500301
+ 0.0224017091 0.0247517005 0.0224017091
+ 0.0290685501 0.0319880284 0.0290685501
+ 0.0352958813 0.0386751406 0.0352958813
+ 0.0411669388 0.0448977016 0.0411669388
+ 0.0467281416 0.0507521592 0.0467281416
+ 0.0520455502 0.0562780313 0.0520455502
+ 0.0571411215 0.0615147501 0.0571411215
+ 0.0620320588 0.0665091425 0.0620320588
+ 0.0667356402 0.0713089630 0.0667356402
+ 0.0712965578 0.0759803429 0.0712965578
+ 0.0757385418 0.0805422887 0.0757385418
+ 0.0800764337 0.0850213692 0.0800764337
+ 0.0843147188 0.0894245878 0.0843147188
+ 0.0884548426 0.0937559828 0.0884548426
+ 0.0925132483 0.0980221704 0.0925132483
+ 0.0964898691 0.1022289991 0.0964898691
+ 0.1003945023 0.1063620001 0.1003945023
+ 0.1042160019 0.1104390025 0.1042160019
+ 0.1079747006 0.1144633964 0.1079747006
+ 0.1116577014 0.1184230000 0.1116577014
+ 0.1152791977 0.1223274022 0.1152791977
+ 0.1188424006 0.1261754930 0.1188424006
+ 0.1223476008 0.1299650073 0.1223476008
+ 0.1257933974 0.1337056011 0.1257933974
+ 0.1291857064 0.1373963058 0.1291857064
+ 0.1325111985 0.1410335004 0.1325111985
+ 0.1357868016 0.1446186006 0.1357868016
+ 0.1390141994 0.1481585056 0.1390141994
+ 0.1421941966 0.1516450942 0.1421941966
+ 0.1453281939 0.1550758928 0.1453281939
+ 0.1484290957 0.1584609002 0.1484290957
+ 0.1514863074 0.1617927998 0.1514863074
+ 0.1545145065 0.1650730968 0.1545145065
+ 0.1575087011 0.1683045030 0.1575087011
+ 0.1604654938 0.1714911014 0.1604654938
+ 0.1633878052 0.1746436059 0.1633878052
+ 0.1662711948 0.1777534932 0.1662711948
+ 0.1691236049 0.1808203012 0.1691236049
+ 0.1719461977 0.1838431954 0.1719461977
+ 0.1747328043 0.1868294030 0.1747328043
+ 0.1774906069 0.1897847056 0.1774906069
+ 0.1802141964 0.1927071065 0.1802141964
+ 0.1829040051 0.1955924034 0.1829040051
+ 0.1855681986 0.1984508038 0.1855681986
+ 0.1881995946 0.2012735009 0.1881995946
+ 0.1908040047 0.2040608972 0.1908040047
+ 0.1933835000 0.2068151981 0.1933835000
+ 0.1959407926 0.2095429003 0.1959407926
+ 0.1984723061 0.2122360021 0.1984723061
+ 0.2009814978 0.2149036974 0.2009814978
+ 0.2034648061 0.2175482064 0.2034648061
+ 0.2059251070 0.2201592028 0.2059251070
+ 0.2083660066 0.2227438986 0.2083660066
+ 0.2107862979 0.2253006995 0.2107862979
+ 0.2131928056 0.2278293073 0.2131928056
+ 0.2155797929 0.2303356975 0.2155797929
+ 0.2179521024 0.2328161001 0.2179521024
+ 0.2203088999 0.2352697998 0.2203088999
+ 0.2226427943 0.2377053052 0.2226427943
+ 0.2249636948 0.2401220948 0.2249636948
+ 0.2272658050 0.2425125986 0.2272658050
+ 0.2295507044 0.2448851019 0.2295507044
+ 0.2318232954 0.2472407967 0.2318232954
+ 0.2340773046 0.2495730072 0.2340773046
+ 0.2363186032 0.2518830895 0.2363186032
+ 0.2385478020 0.2541756034 0.2385478020
+ 0.2407571971 0.2564486861 0.2407571971
+ 0.2429528981 0.2587057948 0.2429528981
+ 0.2451367974 0.2609438896 0.2451367974
+ 0.2473030984 0.2631632090 0.2473030984
+ 0.2494540960 0.2653681040 0.2494540960
+ 0.2515927851 0.2675603926 0.2515927851
+ 0.2537161112 0.2697342932 0.2537161112
+ 0.2558267117 0.2718896866 0.2558267117
+ 0.2579267025 0.2740308046 0.2579267025
+ 0.2600139081 0.2761551142 0.2600139081
+ 0.2620905042 0.2782635987 0.2620905042
+ 0.2641522884 0.2803570926 0.2641522884
+ 0.2661997080 0.2824395895 0.2661997080
+ 0.2682358921 0.2845089138 0.2682358921
+ 0.2702636123 0.2865653038 0.2702636123
+ 0.2722778916 0.2886031866 0.2722778916
+ 0.2742806971 0.2906292975 0.2742806971
+ 0.2762736082 0.2926450074 0.2762736082
+ 0.2782565951 0.2946475148 0.2782565951
+ 0.2802278996 0.2966375053 0.2802278996
+ 0.2821829021 0.2986125946 0.2821829021
+ 0.2841286063 0.3005768061 0.2841286063
+ 0.2860676050 0.3025309145 0.2860676050
+ 0.2879948914 0.3044739962 0.2879948914
+ 0.2899109125 0.3064059913 0.2899109125
+ 0.2918199003 0.3083246052 0.2918199003
+ 0.2937203050 0.3102298975 0.2937203050
+ 0.2956117988 0.3121252954 0.2956117988
+ 0.2974927127 0.3140129149 0.2974927127
+ 0.2993623018 0.3158906996 0.2993623018
+ 0.3012244105 0.3177559078 0.3012244105
+ 0.3030805886 0.3196083009 0.3030805886
+ 0.3049291968 0.3214524984 0.3049291968
+ 0.3067674041 0.3232868016 0.3067674041
+ 0.3085950911 0.3251119852 0.3085950911
+ 0.3104135990 0.3269273937 0.3104135990
+ 0.3122237027 0.3287312090 0.3122237027
+ 0.3140270114 0.3305267096 0.3140270114
+ 0.3158223927 0.3323149085 0.3158223927
+ 0.3176110089 0.3340944946 0.3176110089
+ 0.3193928003 0.3358643055 0.3193928003
+ 0.3211658001 0.3376250863 0.3211658001
+ 0.3229303062 0.3393788934 0.3229303062
+ 0.3246853054 0.3411253095 0.3246853054
+ 0.3264288902 0.3428628147 0.3264288902
+ 0.3281643093 0.3445931077 0.3281643093
+ 0.3298931122 0.3463181853 0.3298931122
+ 0.3316138089 0.3480368853 0.3316138089
+ 0.3333249986 0.3497483134 0.3333249986
+ 0.3350282013 0.3514511883 0.3350282013
+ 0.3367244899 0.3531453907 0.3367244899
+ 0.3384152055 0.3548327088 0.3384152055
+ 0.3401009142 0.3565143049 0.3401009142
+ 0.3417800069 0.3581889868 0.3417800069
+ 0.3434512019 0.3598566949 0.3434512019
+ 0.3451134861 0.3615188897 0.3451134861
+ 0.3467679918 0.3631770015 0.3467679918
+ 0.3484159112 0.3648299873 0.3484159112
+ 0.3500581980 0.3664768934 0.3500581980
+ 0.3516958952 0.3681172132 0.3516958952
+ 0.3533272147 0.3697521985 0.3533272147
+ 0.3549514115 0.3713811040 0.3549514115
+ 0.3565692902 0.3730033040 0.3565692902
+ 0.3581799865 0.3746202886 0.3581799865
+ 0.3597826958 0.3762314916 0.3597826958
+ 0.3613792062 0.3778361976 0.3613792062
+ 0.3629701138 0.3794350028 0.3629701138
+ 0.3645544946 0.3810291886 0.3645544946
+ 0.3661319017 0.3826195002 0.3661319017
+ 0.3677032888 0.3842051923 0.3677032888
+ 0.3692691922 0.3857854009 0.3692691922
+ 0.3708305955 0.3873588145 0.3708305955
+ 0.3723872006 0.3889274001 0.3723872006
+ 0.3739395142 0.3904910982 0.3739395142
+ 0.3754872978 0.3920491040 0.3754872978
+ 0.3770299852 0.3936016858 0.3770299852
+ 0.3785668015 0.3951497972 0.3785668015
+ 0.3800952137 0.3966915905 0.3800952137
+ 0.3816176057 0.3982270956 0.3816176057
+ 0.3831363916 0.3997577131 0.3831363916
+ 0.3846518993 0.4012834132 0.3846518993
+ 0.3861635923 0.4028038085 0.3861635923
+ 0.3876700103 0.4043180048 0.3876700103
+ 0.3891699910 0.4058266878 0.3891699910
+ 0.3906654119 0.4073303044 0.3906654119
+ 0.3921560049 0.4088295996 0.3921560049
+ 0.3936414123 0.4103249907 0.3936414123
+ 0.3951213062 0.4118149877 0.3951213062
+ 0.3965955079 0.4132992923 0.3965955079
+ 0.3980641961 0.4147784114 0.3980641961
+ 0.3995279074 0.4162524939 0.3995279074
+ 0.4009875953 0.4177218080 0.4009875953
+ 0.4024423063 0.4191871881 0.4024423063
+ 0.4038924873 0.4206492007 0.4038924873
+ 0.4053378999 0.4221076965 0.4053378999
+ 0.4067766070 0.4235613942 0.4067766070
+ 0.4082114995 0.4250093997 0.4082114995
+ 0.4096431136 0.4264526963 0.4096431136
+ 0.4110710919 0.4278913140 0.4110710919
+ 0.4124928117 0.4293223023 0.4124928117
+ 0.4139108062 0.4307503104 0.4139108062
+ 0.4153253138 0.4321753085 0.4153253138
+ 0.4167349935 0.4335967898 0.4167349935
+ 0.4181382954 0.4350129068 0.4181382954
+ 0.4195368886 0.4364252090 0.4195368886
+ 0.4209308028 0.4378337860 0.4209308028
+ 0.4223197103 0.4392373860 0.4223197103
+ 0.4237053990 0.4406375885 0.4237053990
+ 0.4250878096 0.4420346022 0.4250878096
+ 0.4264639914 0.4434260130 0.4264639914
+ 0.4278368056 0.4448128045 0.4278368056
+ 0.4292069972 0.4461959004 0.4292069972
+ 0.4305736125 0.4475724995 0.4305736125
+ 0.4319368899 0.4489449859 0.4319368899
+ 0.4332974851 0.4503144026 0.4332974851
+ 0.4346528947 0.4516780972 0.4346528947
+ 0.4360040128 0.4530383050 0.4360040128
+ 0.4373517036 0.4543960094 0.4373517036
+ 0.4386920035 0.4557482898 0.4386920035
+ 0.4400289059 0.4570981860 0.4400289059
+ 0.4413625896 0.4584460855 0.4413625896
+ 0.4426892102 0.4597887993 0.4426892102
+ 0.4440130889 0.4611299038 0.4440130889
+ 0.4453332126 0.4624690115 0.4453332126
+ 0.4466494024 0.4638045132 0.4466494024
+ 0.4479633868 0.4651381075 0.4479633868
+ 0.4492729008 0.4664680064 0.4492729008
+ 0.4505785108 0.4677945077 0.4505785108
+ 0.4518812895 0.4691188931 0.4518812895
+ 0.4531790912 0.4704371989 0.4531790912
+ 0.4544754028 0.4717530906 0.4544754028
+ 0.4557689130 0.4730646908 0.4557689130
+ 0.4570592046 0.4743711948 0.4570592046
+ 0.4583478868 0.4756751955 0.4583478868
+ 0.4596310854 0.4769738019 0.4596310854
+ 0.4609121978 0.4782701135 0.4609121978
+ 0.4621888995 0.4795624018 0.4621888995
+ 0.4634611011 0.4808515906 0.4634611011
+ 0.4647307098 0.4821392894 0.4647307098
+ 0.4659950137 0.4834218919 0.4659950137
+ 0.4672574103 0.4847030044 0.4672574103
+ 0.4685145915 0.4859794974 0.4685145915
+ 0.4697686136 0.4872528017 0.4697686136
+ 0.4710184932 0.4885227978 0.4710184932
+ 0.4722628891 0.4897891879 0.4722628891
+ 0.4735049009 0.4910542071 0.4735049009
+ 0.4747408926 0.4923141003 0.4747408926
+ 0.4759756923 0.4935730100 0.4759756923
+ 0.4772061110 0.4948287904 0.4772061110
+ 0.4784345031 0.4960829020 0.4784345031
+ 0.4796591997 0.4973343015 0.4796591997
+ 0.4808802903 0.4985828102 0.4808802903
+ 0.4820986092 0.4998292029 0.4820986092
+ 0.4833118021 0.5010713935 0.4833118021
+ 0.4845229983 0.5023121834 0.4845229983
+ 0.4857310057 0.5035473704 0.4857310057
+ 0.4869383872 0.5047817826 0.4869383872
+ 0.4881415069 0.5060117245 0.4881415069
+ 0.4893437922 0.5072407722 0.4893437922
+ 0.4905417860 0.5084657073 0.4905417860
+ 0.4917384088 0.5096889138 0.4917384088
+ 0.4929305911 0.5109081864 0.4929305911
+ 0.4941214025 0.5121250749 0.4941214025
+ 0.4953092933 0.5133383274 0.4953092933
+ 0.4964950979 0.5145484209 0.4964950979
+ 0.4976781011 0.5157549977 0.4976781011
+ 0.4988583922 0.5169578195 0.4988583922
+ 0.5000360012 0.5181573033 0.5000360012
+ 0.5012102127 0.5193536878 0.5012102127
+ 0.5023818016 0.5205478072 0.5023818016
+ 0.5035495758 0.5217382908 0.5035495758
+ 0.5047146082 0.5229266286 0.5047146082
+ 0.5058754086 0.5241109133 0.5058754086
+ 0.5070334077 0.5252929926 0.5070334077
+ 0.5081868768 0.5264708996 0.5081868768
+ 0.5093373060 0.5276464224 0.5093373060
+ 0.5104840994 0.5288175941 0.5104840994
+ 0.5116283298 0.5299862027 0.5116283298
+ 0.5127689242 0.5311505795 0.5127689242
+ 0.5139064193 0.5323119164 0.5139064193
+ 0.5150403976 0.5334690809 0.5150403976
+ 0.5161709189 0.5346227884 0.5161709189
+ 0.5172979832 0.5357729197 0.5172979832
+ 0.5184208751 0.5369185805 0.5184208751
+ 0.5195422769 0.5380612016 0.5195422769
+ 0.5206609964 0.5391985774 0.5206609964
+ 0.5217785239 0.5403342843 0.5217785239
+ 0.5228924751 0.5414649844 0.5228924751
+ 0.5240058899 0.5425949097 0.5240058899
+ 0.5251148939 0.5437206030 0.5251148939
+ 0.5262238979 0.5448461771 0.5262238979
+ 0.5273274183 0.5459663868 0.5273274183
+ 0.5284308791 0.5470865965 0.5284308791
+ 0.5295295119 0.5482017994 0.5295295119
+ 0.5306270719 0.5493162274 0.5306270719
+ 0.5317205191 0.5504277945 0.5317205191
+ 0.5328117013 0.5515381098 0.5328117013
+ 0.5339006782 0.5526462197 0.5339006782
+ 0.5349869728 0.5537520051 0.5349869728
+ 0.5360723734 0.5548564792 0.5360723734
+ 0.5371550918 0.5559577942 0.5371550918
+ 0.5382375717 0.5570588112 0.5382375717
+ 0.5393161774 0.5581569076 0.5393161774
+ 0.5403949022 0.5592550039 0.5403949022
+ 0.5414698720 0.5603502989 0.5414698720
+ 0.5425440073 0.5614449978 0.5425440073
+ 0.5436155200 0.5625376105 0.5436155200
+ 0.5446845889 0.5636284947 0.5446845889
+ 0.5457528830 0.5647183061 0.5457528830
+ 0.5468186140 0.5658050179 0.5468186140
+ 0.5478842854 0.5668917894 0.5478842854
+ 0.5489463806 0.5679742098 0.5489463806
+ 0.5500082970 0.5690563917 0.5500082970
+ 0.5510675907 0.5701354742 0.5510675907
+ 0.5521252751 0.5712130070 0.5521252751
+ 0.5531818271 0.5722888112 0.5531818271
+ 0.5542349815 0.5733609796 0.5542349815
+ 0.5552883148 0.5744333267 0.5552883148
+ 0.5563371181 0.5755001903 0.5563371181
+ 0.5573856235 0.5765669942 0.5573856235
+ 0.5584312081 0.5776314139 0.5584312081
+ 0.5594745278 0.5786941051 0.5594745278
+ 0.5605170131 0.5797560811 0.5605170131
+ 0.5615549088 0.5808146000 0.5615549088
+ 0.5625928044 0.5818731189 0.5625928044
+ 0.5636265278 0.5829282999 0.5636265278
+ 0.5646585822 0.5839822888 0.5646585822
+ 0.5656889081 0.5850347877 0.5656889081
+ 0.5667148829 0.5860841274 0.5667148829
+ 0.5677409768 0.5871334076 0.5677409768
+ 0.5687615871 0.5881785154 0.5687615871
+ 0.5697811842 0.5892227888 0.5697811842
+ 0.5707985163 0.5902652144 0.5707985163
+ 0.5718113780 0.5913044214 0.5718113780
+ 0.5728244185 0.5923436284 0.5728244185
+ 0.5738328099 0.5933796167 0.5738328099
+ 0.5748404264 0.5944151878 0.5748404264
+ 0.5758461952 0.5954493880 0.5758461952
+ 0.5768483877 0.5964813232 0.5768483877
+ 0.5778505206 0.5975130796 0.5778505206
+ 0.5788481236 0.5985416770 0.5788481236
+ 0.5798444748 0.5995696187 0.5798444748
+ 0.5808395147 0.6005964875 0.5808395147
+ 0.5818299055 0.6016203165 0.5818299055
+ 0.5828202963 0.6026440859 0.5828202963
+ 0.5838078260 0.6036651134 0.5838078260
+ 0.5847936869 0.6046845913 0.5847936869
+ 0.5857794881 0.6057038903 0.5857794881
+ 0.5867608190 0.6067190170 0.5867608190
+ 0.5877420902 0.6077340841 0.5877420902
+ 0.5887213945 0.6087473035 0.5887213945
+ 0.5896978974 0.6097577810 0.5896978974
+ 0.5906744003 0.6107683182 0.5906744003
+ 0.5916472077 0.6117751002 0.5916472077
+ 0.5926188231 0.6127809286 0.5926188231
+ 0.5935899019 0.6137859821 0.5935899019
+ 0.5945563912 0.6147853136 0.5945563912
+ 0.5955228806 0.6157847047 0.5955228806
+ 0.5964874029 0.6167812943 0.5964874029
+ 0.5974487066 0.6177741289 0.5974487066
+ 0.5984100103 0.6187667847 0.5984100103
+ 0.5993676782 0.6197549105 0.5993676782
+ 0.6003236771 0.6207411289 0.6003236771
+ 0.6012796760 0.6217272878 0.6012796760
+ 0.6022304893 0.6227068901 0.6022304893
+ 0.6031810045 0.6236863136 0.6031810045
+ 0.6041305065 0.6246638894 0.6041305065
+ 0.6050754786 0.6256346703 0.6050754786
+ 0.6060203910 0.6266055107 0.6060203910
+ 0.6069629788 0.6275725961 0.6069629788
+ 0.6079022884 0.6285349131 0.6079022884
+ 0.6088414788 0.6294971108 0.6088414788
+ 0.6097772717 0.6304540038 0.6097772717
+ 0.6107106805 0.6314077973 0.6107106805
+ 0.6116440892 0.6323614717 0.6116440892
+ 0.6125729084 0.6333085895 0.6125729084
+ 0.6135004163 0.6342539191 0.6135004163
+ 0.6144278049 0.6351991892 0.6144278049
+ 0.6153497100 0.6361367702 0.6153497100
+ 0.6162710786 0.6370738149 0.6162710786
+ 0.6171923280 0.6380103230 0.6171923280
+ 0.6181074977 0.6389390826 0.6181074977
+ 0.6190227270 0.6398677826 0.6190227270
+ 0.6199370027 0.6407952905 0.6199370027
+ 0.6208459139 0.6417160034 0.6208459139
+ 0.6217548251 0.6426365972 0.6217548251
+ 0.6226627231 0.6435554028 0.6226627231
+ 0.6235666871 0.6444680095 0.6235666871
+ 0.6244707108 0.6453806162 0.6244707108
+ 0.6253734231 0.6462908983 0.6253734231
+ 0.6262723804 0.6471955180 0.6262723804
+ 0.6271713972 0.6481000781 0.6271713972
+ 0.6280689836 0.6490027905 0.6280689836
+ 0.6289629936 0.6499009728 0.6289629936
+ 0.6298570037 0.6507992148 0.6298570037
+ 0.6307495236 0.6516954899 0.6307495236
+ 0.6316384077 0.6525874138 0.6316384077
+ 0.6325272918 0.6534792781 0.6325272918
+ 0.6334148049 0.6543694139 0.6334148049
+ 0.6342985034 0.6552550793 0.6342985034
+ 0.6351823211 0.6561406851 0.6351823211
+ 0.6360648274 0.6570249200 0.6360648274
+ 0.6369432807 0.6579043865 0.6369432807
+ 0.6378217936 0.6587839127 0.6378217936
+ 0.6386997104 0.6596624255 0.6386997104
+ 0.6395745873 0.6605358124 0.6395745873
+ 0.6404494047 0.6614091992 0.6404494047
+ 0.6413241029 0.6622822285 0.6413241029
+ 0.6421937943 0.6631495953 0.6421937943
+ 0.6430636048 0.6640170217 0.6430636048
+ 0.6439334154 0.6648843884 0.6439334154
+ 0.6447985768 0.6657463908 0.6447985768
+ 0.6456633806 0.6666080952 0.6456633806
+ 0.6465281844 0.6674697995 0.6465281844
+ 0.6473892927 0.6683270931 0.6473892927
+ 0.6482492089 0.6691833138 0.6482492089
+ 0.6491091251 0.6700394750 0.6491091251
+ 0.6499661207 0.6708925962 0.6499661207
+ 0.6508212090 0.6717435718 0.6508212090
+ 0.6516762972 0.6725946069 0.6516762972
+ 0.6525288820 0.6734434962 0.6525288820
+ 0.6533777118 0.6742895246 0.6533777118
+ 0.6542264819 0.6751354933 0.6542264819
+ 0.6550742984 0.6759806871 0.6550742984
+ 0.6559169888 0.6768220067 0.6559169888
+ 0.6567596793 0.6776633263 0.6567596793
+ 0.6576023102 0.6785045862 0.6576023102
+ 0.6584395766 0.6793416739 0.6584395766
+ 0.6592763066 0.6801785231 0.6592763066
+ 0.6601129770 0.6810153127 0.6601129770
+ 0.6609460711 0.6818485260 0.6609460711
+ 0.6617770791 0.6826794744 0.6617770791
+ 0.6626080275 0.6835106015 0.6626080275
+ 0.6634371877 0.6843398213 0.6634371877
+ 0.6642624736 0.6851654053 0.6642624736
+ 0.6650878787 0.6859909892 0.6650878787
+ 0.6659132242 0.6868165731 0.6659132242
+ 0.6667333245 0.6876372099 0.6667333245
+ 0.6675531864 0.6884577274 0.6675531864
+ 0.6683731079 0.6892783046 0.6683731079
+ 0.6691898704 0.6900957823 0.6691898704
+ 0.6700046062 0.6909114718 0.6700046062
+ 0.6708192825 0.6917272210 0.6708192825
+ 0.6716328859 0.6925418973 0.6716328859
+ 0.6724424958 0.6933531761 0.6724424958
+ 0.6732522249 0.6941645145 0.6732522249
+ 0.6740617752 0.6949757934 0.6740617752
+ 0.6748675704 0.6957837939 0.6748675704
+ 0.6756724119 0.6965909004 0.6756724119
+ 0.6764771938 0.6973981261 0.6764771938
+ 0.6772803068 0.6982039213 0.6772803068
+ 0.6780803800 0.6990072131 0.6780803800
+ 0.6788805127 0.6998106241 0.6788805127
+ 0.6796805263 0.7006139159 0.6796805263
+ 0.6804767251 0.7014129758 0.6804767251
+ 0.6812722087 0.7022113800 0.6812722087
+ 0.6820678115 0.7030097842 0.6820678115
+ 0.6828618050 0.7038065195 0.6828618050
+ 0.6836528778 0.7046002746 0.6836528778
+ 0.6844441295 0.7053942084 0.6844441295
+ 0.6852353215 0.7061880827 0.6852353215
+ 0.6860229969 0.7069783807 0.6860229969
+ 0.6868100166 0.7077680826 0.6868100166
+ 0.6875969768 0.7085577846 0.6875969768
+ 0.6883826256 0.7093464136 0.6883826256
+ 0.6891641021 0.7101323009 0.6891641021
+ 0.6899456978 0.7109181881 0.6899456978
+ 0.6907271743 0.7117040753 0.6907271743
+ 0.6915053725 0.7124866843 0.6915053725
+ 0.6922817230 0.7132676244 0.6922817230
+ 0.6930580139 0.7140485048 0.6930580139
+ 0.6938341856 0.7148293257 0.6938341856
+ 0.6946055293 0.7156057954 0.6946055293
+ 0.6953768134 0.7163822055 0.6953768134
+ 0.6961480975 0.7171586752 0.6961480975
+ 0.6969177127 0.7179335952 0.6969177127
+ 0.6976842284 0.7187060714 0.6976842284
+ 0.6984508038 0.7194784880 0.6984508038
+ 0.6992173195 0.7202510238 0.6992173195
+ 0.6999806762 0.7210199833 0.6999806762
+ 0.7007427216 0.7217875719 0.7007427216
+ 0.7015047073 0.7225551009 0.7015047073
+ 0.7022666931 0.7233226895 0.7022666931
+ 0.7030245066 0.7240859270 0.7030245066
+ 0.7037820816 0.7248489857 0.7037820816
+ 0.7045397162 0.7256121039 0.7045397162
+ 0.7052962184 0.7263739109 0.7052962184
+ 0.7060483098 0.7271317244 0.7060483098
+ 0.7068005204 0.7278894186 0.7068005204
+ 0.7075526118 0.7286471128 0.7075526118
+ 0.7083024979 0.7294024825 0.7083024979
+ 0.7090494037 0.7301552892 0.7090494037
+ 0.7097964287 0.7309080958 0.7097964287
+ 0.7105432749 0.7316607833 0.7105432749
+ 0.7112872005 0.7324107289 0.7112872005
+ 0.7120292187 0.7331590056 0.7120292187
+ 0.7127712965 0.7339072227 0.7127712965
+ 0.7135133147 0.7346554995 0.7135133147
+ 0.7142516971 0.7354004979 0.7142516971
+ 0.7149891853 0.7361447215 0.7149891853
+ 0.7157266140 0.7368888855 0.7157266140
+ 0.7164639831 0.7376331091 0.7164639831
+ 0.7171975970 0.7383713126 0.7171975970
+ 0.7179307938 0.7391089201 0.7179307938
+ 0.7186638713 0.7398465872 0.7186638713
+ 0.7193971276 0.7405840755 0.7193971276
+ 0.7201262116 0.7413142920 0.7201262116
+ 0.7208554149 0.7420445085 0.7208554149
+ 0.7215844989 0.7427747846 0.7215844989
+ 0.7223134041 0.7435045242 0.7223134041
+ 0.7230387926 0.7442278266 0.7230387926
+ 0.7237643003 0.7449511290 0.7237643003
+ 0.7244896889 0.7456744909 0.7244896889
+ 0.7252147198 0.7463970780 0.7252147198
+ 0.7259353995 0.7471140027 0.7259353995
+ 0.7266560793 0.7478309870 0.7266560793
+ 0.7273768187 0.7485479116 0.7273768187
+ 0.7280970812 0.7492641807 0.7280970812
+ 0.7288134098 0.7499753237 0.7288134098
+ 0.7295296788 0.7506862879 0.7295296788
+ 0.7302460074 0.7513973117 0.7302460074
+ 0.7309620976 0.7521079779 0.7309620976
+ 0.7316743135 0.7528135777 0.7316743135
+ 0.7323865294 0.7535192966 0.7323865294
+ 0.7330986857 0.7542248964 0.7330986857
+ 0.7338109016 0.7549306154 0.7338109016
+ 0.7345194817 0.7556313276 0.7345194817
+ 0.7352281213 0.7563319802 0.7352281213
+ 0.7359365821 0.7570326924 0.7359365821
+ 0.7366451025 0.7577335238 0.7366451025
+ 0.7373495102 0.7584289908 0.7373495102
+ 0.7380533218 0.7591239214 0.7380533218
+ 0.7387570739 0.7598189116 0.7387570739
+ 0.7394608855 0.7605137825 0.7394608855
+ 0.7401614785 0.7612038255 0.7401614785
+ 0.7408609986 0.7618921995 0.7408609986
+ 0.7415605187 0.7625805736 0.7415605187
+ 0.7422599792 0.7632690072 0.7422599792
+ 0.7429572940 0.7639539838 0.7429572940
+ 0.7436528802 0.7646365166 0.7436528802
+ 0.7443485260 0.7653189898 0.7443485260
+ 0.7450441122 0.7660015225 0.7450441122
+ 0.7457385063 0.7666820288 0.7457385063
+ 0.7464305758 0.7673591971 0.7464305758
+ 0.7471227050 0.7680364251 0.7471227050
+ 0.7478148937 0.7687135935 0.7478148937
+ 0.7485067248 0.7693902850 0.7485067248
+ 0.7491956949 0.7700628042 0.7491956949
+ 0.7498847842 0.7707353830 0.7498847842
+ 0.7505738735 0.7714080215 0.7505738735
+ 0.7512630224 0.7720804811 0.7512630224
+ 0.7519487739 0.7727484703 0.7519487739
+ 0.7526339889 0.7734156251 0.7526339889
+ 0.7533192039 0.7740827203 0.7533192039
+ 0.7540044188 0.7747498751 0.7540044188
+ 0.7546877861 0.7754138112 0.7546877861
+ 0.7553694844 0.7760748863 0.7553694844
+ 0.7560511827 0.7767360806 0.7560511827
+ 0.7567330003 0.7773972154 0.7567330003
+ 0.7574139237 0.7780573964 0.7574139237
+ 0.7580912709 0.7787132263 0.7580912709
+ 0.7587686777 0.7793691158 0.7587686777
+ 0.7594460845 0.7800250053 0.7594460845
+ 0.7601234913 0.7806808949 0.7601234913
+ 0.7607979178 0.7813320756 0.7607979178
+ 0.7614712715 0.7819821835 0.7614712715
+ 0.7621448040 0.7826321721 0.7621448040
+ 0.7628182769 0.7832822800 0.7628182769
+ 0.7634900212 0.7839304209 0.7634900212
+ 0.7641587257 0.7845754027 0.7641587257
+ 0.7648273110 0.7852203250 0.7648273110
+ 0.7654958963 0.7858651876 0.7654958963
+ 0.7661646008 0.7865102291 0.7661646008
+ 0.7668293118 0.7871509790 0.7668293118
+ 0.7674936056 0.7877914906 0.7674936056
+ 0.7681578994 0.7884320021 0.7681578994
+ 0.7688220739 0.7890725136 0.7688220739
+ 0.7694842815 0.7897108197 0.7694842815
+ 0.7701433897 0.7903463244 0.7701433897
+ 0.7708023787 0.7909818292 0.7708023787
+ 0.7714614868 0.7916172743 0.7714614868
+ 0.7721205950 0.7922527194 0.7721205950
+ 0.7727754116 0.7928832173 0.7727754116
+ 0.7734296918 0.7935130000 0.7734296918
+ 0.7740839720 0.7941429019 0.7740839720
+ 0.7747381926 0.7947726846 0.7747381926
+ 0.7753911018 0.7954009771 0.7753911018
+ 0.7760409713 0.7960259914 0.7760409713
+ 0.7766909003 0.7966510057 0.7766909003
+ 0.7773407102 0.7972760201 0.7773407102
+ 0.7779905796 0.7979009748 0.7779905796
+ 0.7786368132 0.7985221744 0.7786368132
+ 0.7792813778 0.7991417050 0.7792813778
+ 0.7799261212 0.7997612953 0.7799261212
+ 0.7805706859 0.8003808856 0.7805706859
+ 0.7812150717 0.8010001779 0.7812150717
+ 0.7818549275 0.8016149998 0.7818549275
+ 0.7824947834 0.8022298813 0.7824947834
+ 0.7831345797 0.8028448224 0.7831345797
+ 0.7837744951 0.8034597039 0.7837744951
+ 0.7844126821 0.8040724993 0.7844126821
+ 0.7850481868 0.8046821952 0.7850481868
+ 0.7856836915 0.8052918911 0.7856836915
+ 0.7863191962 0.8059015274 0.7863191962
+ 0.7869547009 0.8065112233 0.7869547009
+ 0.7875875831 0.8071171045 0.7875875831
+ 0.7882192135 0.8077210188 0.7882192135
+ 0.7888507247 0.8083249927 0.7888507247
+ 0.7894822955 0.8089289069 0.7894822955
+ 0.7901139259 0.8095328808 0.7901139259
+ 0.7907413244 0.8101323843 0.7907413244
+ 0.7913681269 0.8107314110 0.7913681269
+ 0.7919949889 0.8113303781 0.7919949889
+ 0.7926219106 0.8119294047 0.7926219106
+ 0.7932484150 0.8125280738 0.7932484150
+ 0.7938709855 0.8131231070 0.7938709855
+ 0.7944936752 0.8137180209 0.7944936752
+ 0.7951163054 0.8143129945 0.7951163054
+ 0.7957389951 0.8149080276 0.7957389951
+ 0.7963607907 0.8155021071 0.7963607907
+ 0.7969797254 0.8160938025 0.7969797254
+ 0.7975987196 0.8166856170 0.7975987196
+ 0.7982177138 0.8172773123 0.7982177138
+ 0.7988365889 0.8178690076 0.7988365889
+ 0.7994540930 0.8184589148 0.7994540930
+ 0.8000686765 0.8190457821 0.8000686765
+ 0.8006833196 0.8196325898 0.8006833196
+ 0.8012979031 0.8202195168 0.8012979031
+ 0.8019124866 0.8208063245 0.8019124866
+ 0.8025255203 0.8213908076 0.8025255203
+ 0.8031362891 0.8219724298 0.8031362891
+ 0.8037471175 0.8225538731 0.8037471175
+ 0.8043578863 0.8231354952 0.8043578863
+ 0.8049687147 0.8237169981 0.8049687147
+ 0.8055779934 0.8242964149 0.8055779934
+ 0.8061854839 0.8248735070 0.8061854839
+ 0.8067929745 0.8254505992 0.8067929745
+ 0.8074005842 0.8260276914 0.8074005842
+ 0.8080080748 0.8266047835 0.8080080748
+ 0.8086137772 0.8271802068 0.8086137772
+ 0.8092173934 0.8277537823 0.8092173934
+ 0.8098208904 0.8283274174 0.8098208904
+ 0.8104245067 0.8289008737 0.8104245067
+ 0.8110281229 0.8294745088 0.8110281229
+ 0.8116297722 0.8300458193 0.8116297722
+ 0.8122286797 0.8306140900 0.8122286797
+ 0.8128275871 0.8311824203 0.8128275871
+ 0.8134266138 0.8317506909 0.8134266138
+ 0.8140255213 0.8323189020 0.8140255213
+ 0.8146228194 0.8328853846 0.8146228194
+ 0.8152164817 0.8334481120 0.8152164817
+ 0.8158102036 0.8340108991 0.8158102036
+ 0.8164039254 0.8345736265 0.8164039254
+ 0.8169975877 0.8351362944 0.8169975877
+ 0.8175904751 0.8356981277 0.8175904751
+ 0.8181796074 0.8362563252 0.8181796074
+ 0.8187686801 0.8368144035 0.8187686801
+ 0.8193578124 0.8373724818 0.8193578124
+ 0.8199468851 0.8379306793 0.8199468851
+ 0.8205358982 0.8384886980 0.8205358982
+ 0.8211209774 0.8390418887 0.8211209774
+ 0.8217059970 0.8395950794 0.8217059970
+ 0.8222910762 0.8401483893 0.8222910762
+ 0.8228762150 0.8407015800 0.8228762150
+ 0.8234611750 0.8412547708 0.8234611750
+ 0.8240435719 0.8418037891 0.8240435719
+ 0.8246251941 0.8423519135 0.8246251941
+ 0.8252068162 0.8428999782 0.8252068162
+ 0.8257884979 0.8434481025 0.8257884979
+ 0.8263701200 0.8439962268 0.8263701200
+ 0.8269495964 0.8445411921 0.8269495964
+ 0.8275271058 0.8450837731 0.8275271058
+ 0.8281046152 0.8456264138 0.8281046152
+ 0.8286821842 0.8461689949 0.8286821842
+ 0.8292596936 0.8467115760 0.8292596936
+ 0.8298364282 0.8472530246 0.8298364282
+ 0.8304104209 0.8477910757 0.8304104209
+ 0.8309844136 0.8483291268 0.8309844136
+ 0.8315584064 0.8488671780 0.8315584064
+ 0.8321323991 0.8494052291 0.8321323991
+ 0.8327063918 0.8499432802 0.8327063918
+ 0.8332766891 0.8504770994 0.8332766891
+ 0.8338465095 0.8510105014 0.8338465095
+ 0.8344163895 0.8515439034 0.8344163895
+ 0.8349862099 0.8520773053 0.8349862099
+ 0.8355559707 0.8526107073 0.8355559707
+ 0.8361235261 0.8531416059 0.8361235261
+ 0.8366885781 0.8536701202 0.8366885781
+ 0.8372538090 0.8541985750 0.8372538090
+ 0.8378189206 0.8547270894 0.8378189206
+ 0.8383839726 0.8552556038 0.8383839726
+ 0.8389489055 0.8557837009 0.8389489055
+ 0.8395100236 0.8563070893 0.8395100236
+ 0.8400710821 0.8568304777 0.8400710821
+ 0.8406322002 0.8573539257 0.8406322002
+ 0.8411933184 0.8578773141 0.8411933184
+ 0.8417543173 0.8584007025 0.8417543173
+ 0.8423134089 0.8589209914 0.8423134089
+ 0.8428711295 0.8594391942 0.8428711295
+ 0.8434287906 0.8599573970 0.8434287906
+ 0.8439865112 0.8604755998 0.8439865112
+ 0.8445441127 0.8609936833 0.8445441127
+ 0.8451015949 0.8615115881 0.8451015949
+ 0.8456565142 0.8620254993 0.8456565142
+ 0.8462113738 0.8625394106 0.8462113738
+ 0.8467662930 0.8630533218 0.8467662930
+ 0.8473210931 0.8635671735 0.8473210931
+ 0.8478760123 0.8640810847 0.8478760123
+ 0.8484287262 0.8645929098 0.8484287262
+ 0.8489791751 0.8651022911 0.8489791751
+ 0.8495296240 0.8656117916 0.8495296240
+ 0.8500800133 0.8661211729 0.8500800133
+ 0.8506304026 0.8666306734 0.8506304026
+ 0.8511807919 0.8671401739 0.8511807919
+ 0.8517271280 0.8676456213 0.8517271280
+ 0.8522726297 0.8681504130 0.8522726297
+ 0.8528181911 0.8686553240 0.8528181911
+ 0.8533636928 0.8691601157 0.8533636928
+ 0.8539093137 0.8696649075 0.8539093137
+ 0.8544539809 0.8701689839 0.8544539809
+ 0.8549953103 0.8706703186 0.8549953103
+ 0.8555366993 0.8711714745 0.8555366993
+ 0.8560780883 0.8716726899 0.8560780883
+ 0.8566194177 0.8721739054 0.8566194177
+ 0.8571608067 0.8726751804 0.8571608067
+ 0.8577004075 0.8731746078 0.8577004075
+ 0.8582382798 0.8736721873 0.8582382798
+ 0.8587760925 0.8741698861 0.8587760925
+ 0.8593140244 0.8746675253 0.8593140244
+ 0.8598517776 0.8751651049 0.8598517776
+ 0.8603895903 0.8756626844 0.8603895903
+ 0.8609246016 0.8761566877 0.8609246016
+ 0.8614584208 0.8766493797 0.8614584208
+ 0.8619921803 0.8771420121 0.8619921803
+ 0.8625261188 0.8776347041 0.8625261188
+ 0.8630598783 0.8781273961 0.8630598783
+ 0.8635936975 0.8786200285 0.8635936975
+ 0.8641244173 0.8791080713 0.8641244173
+ 0.8646547794 0.8795956969 0.8646547794
+ 0.8651853204 0.8800833821 0.8651853204
+ 0.8657156825 0.8805711269 0.8657156825
+ 0.8662461042 0.8810586929 0.8662461042
+ 0.8667764068 0.8815460801 0.8667764068
+ 0.8673040271 0.8820288181 0.8673040271
+ 0.8678315878 0.8825113773 0.8678315878
+ 0.8683593273 0.8829941154 0.8683593273
+ 0.8688868880 0.8834767938 0.8688868880
+ 0.8694145083 0.8839594722 0.8694145083
+ 0.8699415922 0.8844413757 0.8699415922
+ 0.8704659939 0.8849189878 0.8704659939
+ 0.8709903955 0.8853965998 0.8709903955
+ 0.8715146780 0.8858740926 0.8715146780
+ 0.8720390797 0.8863517046 0.8720390797
+ 0.8725634813 0.8868293166 0.8725634813
+ 0.8730871081 0.8873060942 0.8730871081
+ 0.8736078143 0.8877797127 0.8736078143
+ 0.8741285205 0.8882532716 0.8741285205
+ 0.8746492267 0.8887268901 0.8746492267
+ 0.8751698136 0.8892006278 0.8751698136
+ 0.8756905198 0.8896741867 0.8756905198
+ 0.8762103915 0.8901467919 0.8762103915
+ 0.8767271042 0.8906152844 0.8767271042
+ 0.8772436976 0.8910837770 0.8772436976
+ 0.8777604103 0.8915523887 0.8777604103
+ 0.8782770038 0.8920208812 0.8782770038
+ 0.8787937164 0.8924893737 0.8787937164
+ 0.8793097734 0.8929569721 0.8793097734
+ 0.8798230886 0.8934193254 0.8798230886
+ 0.8803362846 0.8938816190 0.8803362846
+ 0.8808495998 0.8943439126 0.8808495998
+ 0.8813629150 0.8948062062 0.8813629150
+ 0.8818761110 0.8952684999 0.8818761110
+ 0.8823893070 0.8957306147 0.8823893070
+ 0.8828998208 0.8961877823 0.8828998208
+ 0.8834103942 0.8966450095 0.8834103942
+ 0.8839209080 0.8971021771 0.8839209080
+ 0.8844314218 0.8975594044 0.8844314218
+ 0.8849418759 0.8980165720 0.8849418759
+ 0.8854525089 0.8984737992 0.8854525089
+ 0.8859602213 0.8989266157 0.8859602213
+ 0.8864675760 0.8993787766 0.8864675760
+ 0.8869749904 0.8998309970 0.8869749904
+ 0.8874824047 0.9002832174 0.8874824047
+ 0.8879898190 0.9007353783 0.8879898190
+ 0.8884971142 0.9011875987 0.8884971142
+ 0.8890014291 0.9016364217 0.8890014291
+ 0.8895040751 0.9020836949 0.8895040751
+ 0.8900067806 0.9025309086 0.8900067806
+ 0.8905096054 0.9029781222 0.8905096054
+ 0.8910123110 0.9034253955 0.8910123110
+ 0.8915150166 0.9038726091 0.8915150166
+ 0.8920161128 0.9043182135 0.8920161128
+ 0.8925150037 0.9047616124 0.8925150037
+ 0.8930137753 0.9052050114 0.8930137753
+ 0.8935126066 0.9056484103 0.8935126066
+ 0.8940114975 0.9060918093 0.8940114975
+ 0.8945103288 0.9065353274 0.8945103288
+ 0.8950086832 0.9069780707 0.8950086832
+ 0.8955042958 0.9074168801 0.8955042958
+ 0.8959999084 0.9078556895 0.8959999084
+ 0.8964955211 0.9082944989 0.8964955211
+ 0.8969910741 0.9087331891 0.8969910741
+ 0.8974866271 0.9091719985 0.8974866271
+ 0.8979821801 0.9096108079 0.8979821801
+ 0.8984758854 0.9100461006 0.8984758854
+ 0.8989689946 0.9104802012 0.8989689946
+ 0.8994619846 0.9109144211 0.8994619846
+ 0.8999550939 0.9113485217 0.8999550939
+ 0.9004480839 0.9117826819 0.9004480839
+ 0.9009411931 0.9122167826 0.9009411931
+ 0.9014332891 0.9126496911 0.9014332891
+ 0.9019234180 0.9130802751 0.9019234180
+ 0.9024136066 0.9135109186 0.9024136066
+ 0.9029036760 0.9139415026 0.9029036760
+ 0.9033939242 0.9143720865 0.9033939242
+ 0.9038839936 0.9148026705 0.9038839936
+ 0.9043741822 0.9152333140 0.9043741822
+ 0.9048606157 0.9156600237 0.9048606157
+ 0.9053465128 0.9160860777 0.9053465128
+ 0.9058324099 0.9165123105 0.9058324099
+ 0.9063184261 0.9169384241 0.9063184261
+ 0.9068043232 0.9173644781 0.9068043232
+ 0.9072902203 0.9177907109 0.9072902203
+ 0.9077749252 0.9182155728 0.9077749252
+ 0.9082573056 0.9186385274 0.9082573056
+ 0.9087396860 0.9190613031 0.9087396860
+ 0.9092221856 0.9194840789 0.9092221856
+ 0.9097046256 0.9199069142 0.9097046256
+ 0.9101871252 0.9203298092 0.9101871252
+ 0.9106695056 0.9207525849 0.9106695056
+ 0.9111497998 0.9211729765 0.9111497998
+ 0.9116293788 0.9215927124 0.9116293788
+ 0.9121090770 0.9220123887 0.9121090770
+ 0.9125887156 0.9224321246 0.9125887156
+ 0.9130684137 0.9228518009 0.9130684137
+ 0.9135479927 0.9232714772 0.9135479927
+ 0.9140272141 0.9236903787 0.9140272141
+ 0.9145038724 0.9241051078 0.9145038724
+ 0.9149804711 0.9245197177 0.9149804711
+ 0.9154571891 0.9249343276 0.9154571891
+ 0.9159337878 0.9253488779 0.9159337878
+ 0.9164105058 0.9257636070 0.9164105058
+ 0.9168871045 0.9261782169 0.9168871045
+ 0.9173616767 0.9265909791 0.9173616767
+ 0.9178339839 0.9270015955 0.9178339839
+ 0.9183062911 0.9274122715 0.9183062911
+ 0.9187785983 0.9278230071 0.9187785983
+ 0.9192509055 0.9282336831 0.9192509055
+ 0.9197230935 0.9286444187 0.9197230935
+ 0.9201954007 0.9290549755 0.9201954007
+ 0.9206650853 0.9294636846 0.9206650853
+ 0.9211338162 0.9298716784 0.9211338162
+ 0.9216024876 0.9302796125 0.9216024876
+ 0.9220712185 0.9306876063 0.9220712185
+ 0.9225397706 0.9310954809 0.9225397706
+ 0.9230085015 0.9315034151 0.9230085015
+ 0.9234771729 0.9319114089 0.9234771729
+ 0.9239432812 0.9323160052 0.9239432812
+ 0.9244090915 0.9327204227 0.9244090915
+ 0.9248750210 0.9331247211 0.9248750210
+ 0.9253407717 0.9335290790 0.9253407717
+ 0.9258067012 0.9339333773 0.9258067012
+ 0.9262725115 0.9343377948 0.9262725115
+ 0.9267380834 0.9347419143 0.9267380834
+ 0.9272007942 0.9351428747 0.9272007942
+ 0.9276636243 0.9355438948 0.9276636243
+ 0.9281262755 0.9359449744 0.9281262755
+ 0.9285889864 0.9363459945 0.9285889864
+ 0.9290516973 0.9367470145 0.9290516973
+ 0.9295145273 0.9371480942 0.9295145273
+ 0.9299765825 0.9375485778 0.9299765825
+ 0.9304360151 0.9379463792 0.9304360151
+ 0.9308953881 0.9383442998 0.9308953881
+ 0.9313548207 0.9387422204 0.9313548207
+ 0.9318141937 0.9391400814 0.9318141937
+ 0.9322736263 0.9395378828 0.9322736263
+ 0.9327328801 0.9399358034 0.9327328801
+ 0.9331911206 0.9403327703 0.9331911206
+ 0.9336444736 0.9407266974 0.9336444736
+ 0.9340978861 0.9411206245 0.9340978861
+ 0.9345511794 0.9415144920 0.9345511794
+ 0.9350045919 0.9419082999 0.9350045919
+ 0.9354580045 0.9423022270 0.9354580045
+ 0.9359112978 0.9426960945 0.9359112978
+ 0.9363633990 0.9430891275 0.9363633990
+ 0.9368094206 0.9434779882 0.9368094206
+ 0.9372553825 0.9438670278 0.9372553825
+ 0.9377014041 0.9442558885 0.9377014041
+ 0.9381474853 0.9446449280 0.9381474853
+ 0.9385935068 0.9450337887 0.9385935068
+ 0.9390395284 0.9454228282 0.9390395284
+ 0.9394848943 0.9458109736 0.9394848943
+ 0.9399245977 0.9461929798 0.9399245977
+ 0.9403643012 0.9465749264 0.9403643012
+ 0.9408038855 0.9469568729 0.9408038855
+ 0.9412435889 0.9473388195 0.9412435889
+ 0.9416832924 0.9477208257 0.9416832924
+ 0.9421229959 0.9481027126 0.9421229959
+ 0.9425626993 0.9484847188 0.9425626993
+ 0.9429975748 0.9488611221 0.9429975748
+ 0.9434322119 0.9492372274 0.9434322119
+ 0.9438669086 0.9496132731 0.9438669086
+ 0.9443014860 0.9499893785 0.9443014860
+ 0.9447361827 0.9503654838 0.9447361827
+ 0.9451708198 0.9507415891 0.9451708198
+ 0.9456055164 0.9511176944 0.9456055164
+ 0.9460369945 0.9514914751 0.9460369945
+ 0.9464673996 0.9518644810 0.9464673996
+ 0.9468979239 0.9522374272 0.9468979239
+ 0.9473283887 0.9526103735 0.9473283887
+ 0.9477587938 0.9529833794 0.9477587938
+ 0.9481893182 0.9533563852 0.9481893182
+ 0.9486197233 0.9537293911 0.9486197233
+ 0.9490481019 0.9541009068 0.9490481019
+ 0.9494742751 0.9544708729 0.9494742751
+ 0.9499005079 0.9548410177 0.9499005079
+ 0.9503266811 0.9552109838 0.9503266811
+ 0.9507529140 0.9555810094 0.9507529140
+ 0.9511790872 0.9559510946 0.9511790872
+ 0.9516053200 0.9563211203 0.9516053200
+ 0.9520307779 0.9566904902 0.9520307779
+ 0.9524527192 0.9570568800 0.9524527192
+ 0.9528746009 0.9574233890 0.9528746009
+ 0.9532964826 0.9577897787 0.9532964826
+ 0.9537184238 0.9581562877 0.9537184238
+ 0.9541404247 0.9585226774 0.9541404247
+ 0.9545623064 0.9588891268 0.9545623064
+ 0.9549841881 0.9592555761 0.9549841881
+ 0.9554026127 0.9596186876 0.9554026127
+ 0.9558200836 0.9599809051 0.9558200836
+ 0.9562376142 0.9603431821 0.9562376142
+ 0.9566550255 0.9607055187 0.9566550255
+ 0.9570724964 0.9610676765 0.9570724964
+ 0.9574900270 0.9614300132 0.9574900270
+ 0.9579074979 0.9617921710 0.9579074979
+ 0.9583234191 0.9621530771 0.9583234191
+ 0.9587361217 0.9625114202 0.9587361217
+ 0.9591488838 0.9628697038 0.9591488838
+ 0.9595617056 0.9632279873 0.9595617056
+ 0.9599744081 0.9635863900 0.9599744081
+ 0.9603871703 0.9639446735 0.9603871703
+ 0.9607999921 0.9643030167 0.9607999921
+ 0.9612128139 0.9646613002 0.9612128139
+ 0.9616206884 0.9650158882 0.9616206884
+ 0.9620277286 0.9653698802 0.9620277286
+ 0.9624347091 0.9657238126 0.9624347091
+ 0.9628416896 0.9660778046 0.9628416896
+ 0.9632487297 0.9664316773 0.9632487297
+ 0.9636557102 0.9667857289 0.9636557102
+ 0.9640626907 0.9671396017 0.9640626907
+ 0.9644678831 0.9674922824 0.9644678831
+ 0.9648684859 0.9678416252 0.9648684859
+ 0.9652690291 0.9681910276 0.9652690291
+ 0.9656695127 0.9685403109 0.9656695127
+ 0.9660701156 0.9688897133 0.9660701156
+ 0.9664705992 0.9692389965 0.9664705992
+ 0.9668712020 0.9695882797 0.9668712020
+ 0.9672716856 0.9699376822 0.9672716856
+ 0.9676678777 0.9702842832 0.9676678777
+ 0.9680616856 0.9706295133 0.9680616856
+ 0.9684556127 0.9709746242 0.9684556127
+ 0.9688494205 0.9713197947 0.9688494205
+ 0.9692432284 0.9716649055 0.9692432284
+ 0.9696370959 0.9720100760 0.9696370959
+ 0.9700309038 0.9723551869 0.9700309038
+ 0.9704247713 0.9727004170 0.9704247713
+ 0.9708117247 0.9730417132 0.9708117247
+ 0.9711983204 0.9733828902 0.9711983204
+ 0.9715849161 0.9737240076 0.9715849161
+ 0.9719715118 0.9740651846 0.9719715118
+ 0.9723581076 0.9744063020 0.9723581076
+ 0.9727448225 0.9747474790 0.9727448225
+ 0.9731314182 0.9750885963 0.9731314182
+ 0.9735164046 0.9754288793 0.9735164046
+ 0.9738947749 0.9757658243 0.9738947749
+ 0.9742732048 0.9761027098 0.9742732048
+ 0.9746515751 0.9764394760 0.9746515751
+ 0.9750298858 0.9767764211 0.9750298858
+ 0.9754083157 0.9771133065 0.9754083157
+ 0.9757866859 0.9774501920 0.9757866859
+ 0.9761651158 0.9777870178 0.9761651158
+ 0.9765400887 0.9781219959 0.9765400887
+ 0.9769093990 0.9784539938 0.9769093990
+ 0.9772787094 0.9787858725 0.9772787094
+ 0.9776480198 0.9791178107 0.9776480198
+ 0.9780173898 0.9794496894 0.9780173898
+ 0.9783867002 0.9797816873 0.9783867002
+ 0.9787560105 0.9801136255 0.9787560105
+ 0.9791253209 0.9804455042 0.9791253209
+ 0.9794902205 0.9807748199 0.9794902205
+ 0.9798504114 0.9811015129 0.9798504114
+ 0.9802107215 0.9814282060 0.9802107215
+ 0.9805709124 0.9817547798 0.9805709124
+ 0.9809311032 0.9820814729 0.9809311032
+ 0.9812914133 0.9824081063 0.9812914133
+ 0.9816516042 0.9827347994 0.9816516042
+ 0.9820119143 0.9830613732 0.9820119143
+ 0.9823670983 0.9833847284 0.9823670983
+ 0.9827178717 0.9837049842 0.9827178717
+ 0.9830688238 0.9840254188 0.9830688238
+ 0.9834197164 0.9843456745 0.9834197164
+ 0.9837704897 0.9846661091 0.9837704897
+ 0.9841213822 0.9849864244 0.9841213822
+ 0.9844722748 0.9853066802 0.9844722748
+ 0.9848231077 0.9856271148 0.9848231077
+ 0.9851688147 0.9859436154 0.9851688147
+ 0.9855098128 0.9862567186 0.9855098128
+ 0.9858506918 0.9865697026 0.9858506918
+ 0.9861915708 0.9868828058 0.9861915708
+ 0.9865326285 0.9871957898 0.9865326285
+ 0.9868735075 0.9875088930 0.9868735075
+ 0.9872145057 0.9878218770 0.9872145057
+ 0.9875553846 0.9881349802 0.9875553846
+ 0.9878913760 0.9884446859 0.9878913760
+ 0.9882211089 0.9887502193 0.9882211089
+ 0.9885507226 0.9890555739 0.9885507226
+ 0.9888803959 0.9893611073 0.9888803959
+ 0.9892101288 0.9896665215 0.9892101288
+ 0.9895396829 0.9899719954 0.9895396829
+ 0.9898694158 0.9902774096 0.9898694158
+ 0.9901990294 0.9905828834 0.9901990294
+ 0.9905248284 0.9908854961 0.9905248284
+ 0.9908407927 0.9911810160 0.9908407927
+ 0.9911568165 0.9914764166 0.9911568165
+ 0.9914727807 0.9917718768 0.9914727807
+ 0.9917888045 0.9920672774 0.9917888045
+ 0.9921048284 0.9923627973 0.9921048284
+ 0.9924207926 0.9926583171 0.9924207926
+ 0.9927368164 0.9929537177 0.9927368164
+ 0.9930515885 0.9932484031 0.9930515885
+ 0.9933490753 0.9935321808 0.9933490753
+ 0.9936466813 0.9938160181 0.9936466813
+ 0.9939442873 0.9940996766 0.9939442873
+ 0.9942418933 0.9943835139 0.9942418933
+ 0.9945394993 0.9946672916 0.9945394993
+ 0.9948371053 0.9949511290 0.9948371053
+ 0.9951347113 0.9952347875 0.9951347113
+ 0.9954321980 0.9955186248 0.9954321980
+ 0.9957144260 0.9957929850 0.9957144260
+ 0.9959921837 0.9960647821 0.9959921837
+ 0.9962701201 0.9963365793 0.9962701201
+ 0.9965478778 0.9966083765 0.9965478778
+ 0.9968256950 0.9968801737 0.9968256950
+ 0.9971035719 0.9971519709 0.9971035719
+ 0.9973813891 0.9974238276 0.9973813891
+ 0.9976593256 0.9976956248 0.9976593256
+ 0.9979289770 0.9979603291 0.9979289770
+ 0.9981878996 0.9982151985 0.9981878996
+ 0.9984468222 0.9984701872 0.9984468222
+ 0.9987056255 0.9987251759 0.9987056255
+ 0.9989644885 0.9989801049 0.9989644885
+ 0.9992234111 0.9992350936 0.9992234111
+ 0.9994822741 0.9994900823 0.9994822741
+ 0.9997410774 0.9997450113 0.9997410774
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_hdc_200_plus.spi1d b/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_hdc_200_plus.spi1d
new file mode 100644
index 00000000000..66e4d7e951b
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_hdc_200_plus.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0127044199 0.0141023202 0.0096477531
+ 0.0238081105 0.0259745792 0.0176070407
+ 0.0334607586 0.0364749506 0.0246724300
+ 0.0421523489 0.0458938591 0.0311751105
+ 0.0501546115 0.0544666387 0.0372429788
+ 0.0576152317 0.0623432994 0.0429810397
+ 0.0646389574 0.0696527734 0.0484409109
+ 0.0713031068 0.0764547214 0.0536791012
+ 0.0776453391 0.0828472674 0.0587162301
+ 0.0837018490 0.0889110714 0.0635792091
+ 0.0895045772 0.0946782306 0.0683003217
+ 0.0950731933 0.1001901999 0.0728791431
+ 0.1004388034 0.1054987013 0.0773395300
+ 0.1056184024 0.1106514037 0.0816663206
+ 0.1106417999 0.1156636998 0.0858941898
+ 0.1155219972 0.1205495000 0.0900247619
+ 0.1202521995 0.1252955049 0.0940808207
+ 0.1248437986 0.1299131066 0.0980586410
+ 0.1292977929 0.1344144046 0.1019453034
+ 0.1336303949 0.1388116032 0.1057268977
+ 0.1378560066 0.1431176960 0.1094207019
+ 0.1419790983 0.1473421007 0.1130444035
+ 0.1460126042 0.1514800042 0.1166006997
+ 0.1499602944 0.1555261016 0.1200909987
+ 0.1538154036 0.1594948024 0.1235229000
+ 0.1575873941 0.1633805931 0.1269004941
+ 0.1612810045 0.1671908945 0.1302188039
+ 0.1648989022 0.1709319055 0.1334829926
+ 0.1684425026 0.1746093035 0.1366928071
+ 0.1719215959 0.1782346964 0.1398548931
+ 0.1753377020 0.1818004996 0.1429744959
+ 0.1787009984 0.1853079051 0.1460445970
+ 0.1820088029 0.1887629032 0.1490730941
+ 0.1852703989 0.1921591014 0.1520525962
+ 0.1884782016 0.1955104023 0.1549959034
+ 0.1916348040 0.1988154948 0.1578975022
+ 0.1947418004 0.2020708025 0.1607636064
+ 0.1978072971 0.2052816004 0.1635923982
+ 0.2008365989 0.2084514052 0.1663880944
+ 0.2038186044 0.2115817070 0.1691492051
+ 0.2067597061 0.2146739066 0.1718768030
+ 0.2096651047 0.2177291960 0.1745762974
+ 0.2125398964 0.2207520008 0.1772498935
+ 0.2153764963 0.2237412930 0.1798918992
+ 0.2181748003 0.2266951948 0.1825038940
+ 0.2209406942 0.2296195030 0.1850908995
+ 0.2236783057 0.2325070053 0.1876516938
+ 0.2263896018 0.2353623956 0.1901890934
+ 0.2290693074 0.2381868958 0.1927060932
+ 0.2317135036 0.2409814000 0.1951995045
+ 0.2343312949 0.2437489927 0.1976688951
+ 0.2369202971 0.2464884967 0.2001180947
+ 0.2394883931 0.2492032051 0.2025482059
+ 0.2420337945 0.2518971860 0.2049552947
+ 0.2445555031 0.2545694113 0.2073439062
+ 0.2470511049 0.2572140098 0.2097100019
+ 0.2495238036 0.2598383129 0.2120579928
+ 0.2519746125 0.2624385953 0.2143891007
+ 0.2544065118 0.2650176883 0.2167063057
+ 0.2568238080 0.2675766945 0.2190068066
+ 0.2592222989 0.2701159120 0.2212958038
+ 0.2615979910 0.2726357877 0.2235656977
+ 0.2639487982 0.2751353979 0.2258211970
+ 0.2662819922 0.2776151896 0.2280610055
+ 0.2685964108 0.2800753117 0.2302847058
+ 0.2708936930 0.2825163007 0.2324967980
+ 0.2731778920 0.2849400938 0.2346933931
+ 0.2754473984 0.2873477042 0.2368790060
+ 0.2776994109 0.2897374034 0.2390515059
+ 0.2799314857 0.2921099067 0.2412095070
+ 0.2821440101 0.2944638133 0.2433556020
+ 0.2843374014 0.2968018055 0.2454877943
+ 0.2865155935 0.2991257012 0.2476056069
+ 0.2886820138 0.3014312983 0.2497113049
+ 0.2908358872 0.3037211895 0.2518028915
+ 0.2929798961 0.3059999049 0.2538796961
+ 0.2951102853 0.3082641065 0.2559436858
+ 0.2972272933 0.3105159104 0.2579965889
+ 0.2993307114 0.3127523959 0.2600373030
+ 0.3014214933 0.3149785101 0.2620668113
+ 0.3034971058 0.3171896935 0.2640840113
+ 0.3055574000 0.3193879128 0.2660909891
+ 0.3076024950 0.3215714097 0.2680850029
+ 0.3096376061 0.3237439990 0.2700704932
+ 0.3116613030 0.3259027898 0.2720479965
+ 0.3136739135 0.3280479014 0.2740156054
+ 0.3156760931 0.3301830888 0.2759723961
+ 0.3176679015 0.3323085010 0.2779215872
+ 0.3196499944 0.3344236016 0.2798638940
+ 0.3216224015 0.3365249038 0.2817943096
+ 0.3235847950 0.3386119902 0.2837162018
+ 0.3255361021 0.3406879008 0.2856321931
+ 0.3274742067 0.3427498937 0.2875392139
+ 0.3294023871 0.3448010087 0.2894361913
+ 0.3313204050 0.3468416929 0.2913256884
+ 0.3332281113 0.3488731086 0.2932091951
+ 0.3351263106 0.3508965969 0.2950840890
+ 0.3370158076 0.3529112935 0.2969497144
+ 0.3388954103 0.3549158871 0.2988080978
+ 0.3407635093 0.3569113910 0.3006610870
+ 0.3426195979 0.3588970900 0.3025059998
+ 0.3444670141 0.3608722985 0.3043417931
+ 0.3463074863 0.3628363907 0.3061706126
+ 0.3481400907 0.3647880852 0.3079940081
+ 0.3499644995 0.3667264879 0.3098114133
+ 0.3517807126 0.3686558902 0.3116197884
+ 0.3535911143 0.3705761135 0.3134202063
+ 0.3553932011 0.3724865019 0.3152152002
+ 0.3571878970 0.3743883967 0.3170050979
+ 0.3589738011 0.3762854040 0.3187876940
+ 0.3607504964 0.3781766891 0.3205623031
+ 0.3625178039 0.3800612986 0.3223307133
+ 0.3642742932 0.3819381893 0.3240945041
+ 0.3660207987 0.3838064969 0.3258526027
+ 0.3677580953 0.3856652975 0.3276030123
+ 0.3694871962 0.3875137866 0.3293435872
+ 0.3712058961 0.3893510997 0.3310768008
+ 0.3729172051 0.3911783993 0.3328061104
+ 0.3746241927 0.3929969072 0.3345299065
+ 0.3763248026 0.3948045075 0.3362461030
+ 0.3780199885 0.3966018856 0.3379529119
+ 0.3797098100 0.3983893096 0.3396534920
+ 0.3813967109 0.4001693130 0.3413507938
+ 0.3830771148 0.4019418955 0.3430429995
+ 0.3847537041 0.4037080109 0.3447282910
+ 0.3864229918 0.4054659009 0.3464050889
+ 0.3880873919 0.4072161019 0.3480730057
+ 0.3897438943 0.4089570045 0.3497362137
+ 0.3913944960 0.4106892049 0.3513950109
+ 0.3930368125 0.4124135971 0.3530482054
+ 0.3946720064 0.4141317010 0.3546941876
+ 0.3962987065 0.4158441126 0.3563325107
+ 0.3979170918 0.4175505042 0.3579638004
+ 0.3995271027 0.4192501009 0.3595893085
+ 0.4011279941 0.4209432900 0.3612098098
+ 0.4027225077 0.4226306081 0.3628252149
+ 0.4043093026 0.4243136942 0.3644339144
+ 0.4058884978 0.4259892106 0.3660350144
+ 0.4074592888 0.4276596904 0.3676308095
+ 0.4090228081 0.4293231964 0.3692201078
+ 0.4105781019 0.4309802949 0.3708019853
+ 0.4121260941 0.4326306880 0.3723767102
+ 0.4136680067 0.4342732131 0.3739450872
+ 0.4152038097 0.4359092116 0.3755083978
+ 0.4167321920 0.4375346899 0.3770667017
+ 0.4182567894 0.4391531050 0.3786197007
+ 0.4197764993 0.4407626987 0.3801665008
+ 0.4212917984 0.4423646033 0.3817074895
+ 0.4228025973 0.4439603090 0.3832431138
+ 0.4243074954 0.4455477893 0.3847720027
+ 0.4258069098 0.4471279085 0.3862960041
+ 0.4273006022 0.4487006068 0.3878161013
+ 0.4287903011 0.4502668977 0.3893316984
+ 0.4302769899 0.4518280029 0.3908422887
+ 0.4317578077 0.4533826113 0.3923459053
+ 0.4332346916 0.4549309909 0.3938423991
+ 0.4347065091 0.4564737976 0.3953357935
+ 0.4361734092 0.4580112100 0.3968257904
+ 0.4376364946 0.4595425129 0.3983112872
+ 0.4390909076 0.4610661864 0.3997904956
+ 0.4405421913 0.4625841975 0.4012655020
+ 0.4419898093 0.4640966058 0.4027357101
+ 0.4434331954 0.4656026065 0.4042006135
+ 0.4448713958 0.4671005905 0.4056580067
+ 0.4463051856 0.4685927927 0.4071114957
+ 0.4477353096 0.4700792134 0.4085614085
+ 0.4491625130 0.4715583026 0.4100078046
+ 0.4505859017 0.4730297029 0.4114479125
+ 0.4520066977 0.4744954109 0.4128834903
+ 0.4534246922 0.4759553075 0.4143148959
+ 0.4548385143 0.4774056971 0.4157409966
+ 0.4562489986 0.4788500965 0.4171645045
+ 0.4576565921 0.4802890122 0.4185852110
+ 0.4590603113 0.4817211926 0.4200018048
+ 0.4604597092 0.4831478894 0.4214130044
+ 0.4618560970 0.4845702946 0.4228211045
+ 0.4632489979 0.4859867096 0.4242258966
+ 0.4646365941 0.4873968959 0.4256238043
+ 0.4660210013 0.4888026118 0.4270183146
+ 0.4674021006 0.4902028143 0.4284090996
+ 0.4687772095 0.4915963113 0.4297944009
+ 0.4701490998 0.4929861128 0.4311766922
+ 0.4715175033 0.4943715930 0.4325557947
+ 0.4728797078 0.4957531989 0.4339298010
+ 0.4742386043 0.4971317947 0.4353007078
+ 0.4755935073 0.4985060096 0.4366675913
+ 0.4769422114 0.4998764992 0.4380275011
+ 0.4782876074 0.5012443066 0.4393840134
+ 0.4796282947 0.5026069880 0.4407353997
+ 0.4809632003 0.5039666891 0.4420841932
+ 0.4822948873 0.5053241849 0.4434312880
+ 0.4836206138 0.5066757202 0.4447737932
+ 0.4849415123 0.5080248713 0.4461131096
+ 0.4862594008 0.5093721151 0.4474501014
+ 0.4875693917 0.5107128024 0.4487794936
+ 0.4888761938 0.5120517015 0.4501057863
+ 0.4901781976 0.5133879185 0.4514274895
+ 0.4914737940 0.5147191286 0.4527435899
+ 0.4927662909 0.5160481930 0.4540570974
+ 0.4940516949 0.5173733234 0.4553644061
+ 0.4953328967 0.5186954737 0.4566692114
+ 0.4966096878 0.5200139880 0.4579710960
+ 0.4978792965 0.5213292241 0.4592679143
+ 0.4991464019 0.5226427913 0.4605629146
+ 0.5004069805 0.5239503980 0.4618535936
+ 0.5016648769 0.5252562761 0.4631414115
+ 0.5029193163 0.5265597105 0.4644250870
+ 0.5041680932 0.5278586149 0.4657050073
+ 0.5054149032 0.5291553736 0.4669832885
+ 0.5066552162 0.5304455757 0.4682553113
+ 0.5078933835 0.5317338109 0.4695254862
+ 0.5091258883 0.5330157876 0.4707902074
+ 0.5103549957 0.5342947245 0.4720515907
+ 0.5115808845 0.5355700254 0.4733094871
+ 0.5128020048 0.5368400216 0.4745627046
+ 0.5140215755 0.5381075740 0.4758141935
+ 0.5152375102 0.5393667817 0.4770599008
+ 0.5164520741 0.5406240225 0.4783042073
+ 0.5176615715 0.5418733954 0.4795426130
+ 0.5188698173 0.5431200266 0.4807788134
+ 0.5200755000 0.5443605781 0.4820106924
+ 0.5212779045 0.5455970168 0.4832395017
+ 0.5224775076 0.5468291044 0.4844653010
+ 0.5236744285 0.5480558872 0.4856874049
+ 0.5248702168 0.5492796898 0.4869076908
+ 0.5260608196 0.5504972935 0.4881236851
+ 0.5272505283 0.5517131090 0.4893389046
+ 0.5284340978 0.5529218912 0.4905493855
+ 0.5296168923 0.5541298985 0.4917592108
+ 0.5307930112 0.5553305745 0.4929626882
+ 0.5319678783 0.5565304160 0.4941650927
+ 0.5331379771 0.5577239990 0.4953621030
+ 0.5343062282 0.5589160919 0.4965574145
+ 0.5354691148 0.5601027012 0.4977473915
+ 0.5366293192 0.5612874031 0.4989356101
+ 0.5377836823 0.5624672771 0.5001201034
+ 0.5389350057 0.5636451840 0.5013015866
+ 0.5400810838 0.5648186207 0.5024777055
+ 0.5412240028 0.5659899116 0.5036516190
+ 0.5423620939 0.5671570897 0.5048221946
+ 0.5434969068 0.5683212280 0.5059906840
+ 0.5446271896 0.5694798827 0.5071563125
+ 0.5457543135 0.5706359148 0.5083196163
+ 0.5468770862 0.5717874765 0.5094795227
+ 0.5479968786 0.5729361773 0.5106369257
+ 0.5491123796 0.5740798712 0.5117905140
+ 0.5502251983 0.5752214193 0.5129418969
+ 0.5513336062 0.5763586164 0.5140898228
+ 0.5524396896 0.5774930120 0.5152366757
+ 0.5535413027 0.5786203146 0.5163816810
+ 0.5546411872 0.5797460079 0.5175253153
+ 0.5557361841 0.5808660984 0.5186645985
+ 0.5568301082 0.5819849968 0.5198031068
+ 0.5579187274 0.5830960274 0.5209382176
+ 0.5590069294 0.5842068791 0.5220727921
+ 0.5600894094 0.5853117108 0.5232008100
+ 0.5611718893 0.5864164233 0.5243288279
+ 0.5622487068 0.5875138044 0.5254526734
+ 0.5633254051 0.5886104107 0.5265762806
+ 0.5643972754 0.5897029042 0.5276951194
+ 0.5654681921 0.5907940269 0.5288128257
+ 0.5665354133 0.5918807983 0.5299268961
+ 0.5676007867 0.5929647088 0.5310389996
+ 0.5686635971 0.5940455198 0.5321475863
+ 0.5697237849 0.5951223969 0.5332525969
+ 0.5707824230 0.5961973071 0.5343558788
+ 0.5718374848 0.5972664952 0.5354554057
+ 0.5728921294 0.5983355045 0.5365543962
+ 0.5739423037 0.5993986130 0.5376480818
+ 0.5749924779 0.6004617214 0.5387417078
+ 0.5760387182 0.6015192866 0.5398297906
+ 0.5770841837 0.6025757790 0.5409170985
+ 0.5781269073 0.6036278009 0.5420001149
+ 0.5791680217 0.6046767235 0.5430803895
+ 0.5802066922 0.6057233810 0.5441582203
+ 0.5812410712 0.6067652106 0.5452312827
+ 0.5822750926 0.6078069210 0.5463038087
+ 0.5833042264 0.6088423729 0.5473703146
+ 0.5843334198 0.6098778844 0.5484367013
+ 0.5853577852 0.6109092832 0.5494986176
+ 0.5863807797 0.6119390130 0.5505589843
+ 0.5874018073 0.6129667163 0.5516161919
+ 0.5884202123 0.6139913201 0.5526692271
+ 0.5894376040 0.6150155067 0.5537214875
+ 0.5904482007 0.6160331964 0.5547677279
+ 0.5914587975 0.6170510054 0.5558139086
+ 0.5924654007 0.6180649996 0.5568549037
+ 0.5934706926 0.6190776229 0.5578941703
+ 0.5944733024 0.6200882196 0.5589315295
+ 0.5954716206 0.6210951805 0.5599654913
+ 0.5964698195 0.6221022010 0.5609995127
+ 0.5974636078 0.6231055260 0.5620262027
+ 0.5984573960 0.6241086125 0.5630527139
+ 0.5994476080 0.6251075268 0.5640758872
+ 0.6004350781 0.6261023879 0.5650966167
+ 0.6014220715 0.6270968914 0.5661162734
+ 0.6024059057 0.6280854940 0.5671287775
+ 0.6033896208 0.6290740967 0.5681412816
+ 0.6043697000 0.6300585866 0.5691496134
+ 0.6053478718 0.6310405731 0.5701557994
+ 0.6063256264 0.6320214868 0.5711603165
+ 0.6073008776 0.6329963207 0.5721578002
+ 0.6082761288 0.6339710951 0.5731552839
+ 0.6092479825 0.6349408031 0.5741487741
+ 0.6102185249 0.6359075904 0.5751404166
+ 0.6111885905 0.6368734837 0.5761309266
+ 0.6121569276 0.6378319860 0.5771154761
+ 0.6131250858 0.6387906075 0.5781000853
+ 0.6140908003 0.6397454143 0.5790807009
+ 0.6150550246 0.6406973004 0.5800589919
+ 0.6160188913 0.6416491270 0.5810368061
+ 0.6169794202 0.6425917149 0.5820075274
+ 0.6179398894 0.6435343027 0.5829781890
+ 0.6188982129 0.6444740891 0.5839462876
+ 0.6198542714 0.6454101801 0.5849115252
+ 0.6208103895 0.6463462710 0.5858767033
+ 0.6217638850 0.6472759247 0.5868369937
+ 0.6227170825 0.6482042074 0.5877965093
+ 0.6236690283 0.6491310000 0.5887547135
+ 0.6246173978 0.6500520706 0.5897085071
+ 0.6255657077 0.6509732008 0.5906623006
+ 0.6265100241 0.6518902183 0.5916125774
+ 0.6274515986 0.6528037786 0.5925605297
+ 0.6283932924 0.6537175179 0.5935084224
+ 0.6293299794 0.6546260715 0.5944507122
+ 0.6302664876 0.6555340886 0.5953925848
+ 0.6312015057 0.6564409733 0.5963330865
+ 0.6321321726 0.6573432088 0.5972688794
+ 0.6330627799 0.6582453847 0.5982046127
+ 0.6339905262 0.6591445804 0.5991371274
+ 0.6349157095 0.6600404978 0.6000667214
+ 0.6358407736 0.6609362960 0.6009961963
+ 0.6367601752 0.6618282199 0.6019207239
+ 0.6376782060 0.6627187133 0.6028438210
+ 0.6385959983 0.6636092067 0.6037667990
+ 0.6395090818 0.6644952893 0.6046833992
+ 0.6404222250 0.6653813124 0.6056001186
+ 0.6413338184 0.6662659049 0.6065152884
+ 0.6422404051 0.6671448946 0.6074264050
+ 0.6431471109 0.6680238843 0.6083375216
+ 0.6440510750 0.6689003706 0.6092464924
+ 0.6449515224 0.6697732806 0.6101529002
+ 0.6458520293 0.6706461906 0.6110591888
+ 0.6467483044 0.6715160012 0.6119620800
+ 0.6476420164 0.6723836064 0.6128628254
+ 0.6485357285 0.6732510924 0.6137633920
+ 0.6494253278 0.6741154790 0.6146603823
+ 0.6503136158 0.6749786735 0.6155561805
+ 0.6512019038 0.6758419275 0.6164519787
+ 0.6520848870 0.6766991019 0.6173437238
+ 0.6529672742 0.6775552034 0.6182348728
+ 0.6538497210 0.6784113050 0.6191260815
+ 0.6547253728 0.6792595983 0.6200146079
+ 0.6556010842 0.6801074147 0.6209030151
+ 0.6564763784 0.6809551120 0.6217911243
+ 0.6573458910 0.6817964911 0.6226750016
+ 0.6582155228 0.6826378107 0.6235588193
+ 0.6590843201 0.6834787726 0.6244422793
+ 0.6599482298 0.6843137145 0.6253234148
+ 0.6608120799 0.6851487160 0.6262044907
+ 0.6616752744 0.6859831810 0.6270849705
+ 0.6625339985 0.6868135929 0.6279615164
+ 0.6633927822 0.6876440048 0.6288381219
+ 0.6642509103 0.6884738207 0.6297143102
+ 0.6651049852 0.6892974973 0.6305881143
+ 0.6659591794 0.6901211739 0.6314619184
+ 0.6668125987 0.6909444928 0.6323351860
+ 0.6676605940 0.6917623281 0.6332045794
+ 0.6685085893 0.6925802231 0.6340739131
+ 0.6693562865 0.6933978796 0.6349430084
+ 0.6701996922 0.6942088008 0.6358096004
+ 0.6710430980 0.6950196028 0.6366763115
+ 0.6718865037 0.6958305240 0.6375429034
+ 0.6727249026 0.6966357827 0.6384050846
+ 0.6735633016 0.6974408031 0.6392672062
+ 0.6744015813 0.6982458830 0.6401293874
+ 0.6752368808 0.6990466118 0.6409891844
+ 0.6760717034 0.6998466849 0.6418486238
+ 0.6769065857 0.7006468177 0.6427081227
+ 0.6777368188 0.7014424205 0.6435642242
+ 0.6785656810 0.7022364736 0.6444191933
+ 0.6793946028 0.7030305266 0.6452742815
+ 0.6802213192 0.7038202882 0.6461277008
+ 0.6810467839 0.7046071291 0.6469801068
+ 0.6818721890 0.7053937912 0.6478325129
+ 0.6826949716 0.7061775923 0.6486828923
+ 0.6835147142 0.7069572210 0.6495308876
+ 0.6843342781 0.7077367902 0.6503788829
+ 0.6851524115 0.7085152864 0.6512262821
+ 0.6859658957 0.7092896104 0.6520717144
+ 0.6867793798 0.7100639939 0.6529170275
+ 0.6875926852 0.7108383775 0.6537624002
+ 0.6884006262 0.7116078138 0.6546034217
+ 0.6892085075 0.7123771906 0.6554443836
+ 0.6900163293 0.7131465077 0.6562854052
+ 0.6908203959 0.7139121294 0.6571244001
+ 0.6916232705 0.7146762013 0.6579627991
+ 0.6924263239 0.7154402733 0.6588011980
+ 0.6932265162 0.7162014246 0.6596375704
+ 0.6940239072 0.7169584036 0.6604716778
+ 0.6948214173 0.7177153230 0.6613057256
+ 0.6956177950 0.7184715867 0.6621391177
+ 0.6964092851 0.7192226052 0.6629688144
+ 0.6972007751 0.7199735045 0.6637985706
+ 0.6979923844 0.7207245231 0.6646283269
+ 0.6987801790 0.7214716077 0.6654537916
+ 0.6995673180 0.7222176194 0.6662783027
+ 0.7003543973 0.7229636908 0.6671028733
+ 0.7011383772 0.7237073183 0.6679254770
+ 0.7019187808 0.7244477272 0.6687458754
+ 0.7026991248 0.7251880765 0.6695662141
+ 0.7034789920 0.7259283066 0.6703861952
+ 0.7042531967 0.7266616821 0.6712015867
+ 0.7050274014 0.7273951173 0.6720169187
+ 0.7058014870 0.7281284928 0.6728321910
+ 0.7065715194 0.7288578749 0.6736438274
+ 0.7073392868 0.7295845747 0.6744530797
+ 0.7081069946 0.7303113937 0.6752625108
+ 0.7088738084 0.7310374975 0.6760708094
+ 0.7096366882 0.7317596078 0.6768743992
+ 0.7103996277 0.7324817777 0.6776779890
+ 0.7111625075 0.7332040071 0.6784815192
+ 0.7119218111 0.7339224219 0.6792811155
+ 0.7126796246 0.7346392274 0.6800791025
+ 0.7134374976 0.7353559136 0.6808769703
+ 0.7141941786 0.7360715866 0.6816738248
+ 0.7149465084 0.7367821932 0.6824663281
+ 0.7156988978 0.7374927998 0.6832587719
+ 0.7164512873 0.7382034063 0.6840512753
+ 0.7172005773 0.7389100790 0.6848403215
+ 0.7179483175 0.7396144867 0.6856274009
+ 0.7186959982 0.7403188944 0.6864145994
+ 0.7194433212 0.7410228848 0.6872013211
+ 0.7201871276 0.7417224050 0.6879833937
+ 0.7209308743 0.7424219251 0.6887655258
+ 0.7216746807 0.7431213856 0.6895475984
+ 0.7224153876 0.7438185811 0.6903271079
+ 0.7231531739 0.7445130944 0.6911041737
+ 0.7238910198 0.7452077270 0.6918814182
+ 0.7246286869 0.7459022999 0.6926584840
+ 0.7253618240 0.7465913296 0.6934313774
+ 0.7260943055 0.7472792864 0.6942036748
+ 0.7268267870 0.7479674220 0.6949760914
+ 0.7275583148 0.7486543059 0.6957473755
+ 0.7282862067 0.7493367791 0.6965150833
+ 0.7290140986 0.7500193715 0.6972827911
+ 0.7297419906 0.7507019043 0.6980504990
+ 0.7304679155 0.7513812184 0.6988149285
+ 0.7311919928 0.7520576119 0.6995764971
+ 0.7319161296 0.7527340055 0.7003381252
+ 0.7326402068 0.7534102798 0.7010996938
+ 0.7333592772 0.7540827990 0.7018569708
+ 0.7340772748 0.7547543049 0.7026134133
+ 0.7347953916 0.7554258108 0.7033697963
+ 0.7355127931 0.7560970187 0.7041258216
+ 0.7362236977 0.7567629218 0.7048764825
+ 0.7369347215 0.7574288845 0.7056272030
+ 0.7376456261 0.7580947876 0.7063779235
+ 0.7383548021 0.7587593198 0.7071272135
+ 0.7390602827 0.7594197989 0.7078732252
+ 0.7397658229 0.7600803971 0.7086191177
+ 0.7404711843 0.7607408762 0.7093651295
+ 0.7411739230 0.7613990903 0.7101075053
+ 0.7418738008 0.7620543838 0.7108464241
+ 0.7425737977 0.7627096772 0.7115852237
+ 0.7432736754 0.7633650899 0.7123240829
+ 0.7439711094 0.7640163898 0.7130596042
+ 0.7446671128 0.7646651864 0.7137932181
+ 0.7453631163 0.7653139830 0.7145268917
+ 0.7460591197 0.7659627795 0.7152605057
+ 0.7467520237 0.7666075230 0.7159891725
+ 0.7474439740 0.7672507167 0.7167164087
+ 0.7481361032 0.7678940296 0.7174435258
+ 0.7488281131 0.7685372233 0.7181707025
+ 0.7495164871 0.7691755295 0.7188938856
+ 0.7502045035 0.7698127031 0.7196164727
+ 0.7508924007 0.7704498768 0.7203391194
+ 0.7515802979 0.7710872293 0.7210617065
+ 0.7522624731 0.7717201710 0.7217788100
+ 0.7529442906 0.7723528147 0.7224954963
+ 0.7536261082 0.7729853988 0.7232123017
+ 0.7543079853 0.7736179829 0.7239289880
+ 0.7549846768 0.7742474079 0.7246403098
+ 0.7556613088 0.7748765945 0.7253513932
+ 0.7563378811 0.7755057812 0.7260624766
+ 0.7570145726 0.7761349082 0.7267736197
+ 0.7576869130 0.7767605186 0.7274788022
+ 0.7583590746 0.7773857713 0.7281838059
+ 0.7590312958 0.7780112028 0.7288888097
+ 0.7597035170 0.7786365151 0.7295936942
+ 0.7603724003 0.7792575955 0.7302941084
+ 0.7610409856 0.7798781991 0.7309941053
+ 0.7617095709 0.7804989219 0.7316941023
+ 0.7623782754 0.7811195254 0.7323940992
+ 0.7630437016 0.7817357779 0.7330893874
+ 0.7637084723 0.7823513150 0.7337840199
+ 0.7643734217 0.7829667926 0.7344784737
+ 0.7650381923 0.7835822105 0.7351731062
+ 0.7656989098 0.7841936946 0.7358644009
+ 0.7663580775 0.7848036885 0.7365546227
+ 0.7670173049 0.7854136229 0.7372447848
+ 0.7676765919 0.7860234976 0.7379350066
+ 0.7683327794 0.7866303921 0.7386223078
+ 0.7689871788 0.7872350216 0.7393077016
+ 0.7696415782 0.7878395915 0.7399932146
+ 0.7702959776 0.7884442210 0.7406786084
+ 0.7709481716 0.7890473008 0.7413616776
+ 0.7715978026 0.7896479964 0.7420418262
+ 0.7722473741 0.7902486920 0.7427219152
+ 0.7728970051 0.7908495069 0.7434018850
+ 0.7735458016 0.7914491296 0.7440809011
+ 0.7741922736 0.7920445800 0.7447561026
+ 0.7748388052 0.7926400900 0.7454311848
+ 0.7754852772 0.7932356000 0.7461063862
+ 0.7761318088 0.7938311100 0.7467815876
+ 0.7767726183 0.7944201231 0.7474523187
+ 0.7774134874 0.7950087786 0.7481228709
+ 0.7780542970 0.7955976129 0.7487936020
+ 0.7786952257 0.7961863875 0.7494642138
+ 0.7793319225 0.7967715263 0.7501307726
+ 0.7799670100 0.7973549962 0.7507957220
+ 0.7806020975 0.7979385257 0.7514606714
+ 0.7812373042 0.7985219955 0.7521256804
+ 0.7818704247 0.7991034985 0.7527887821
+ 0.7825008035 0.7996814251 0.7534492016
+ 0.7831311226 0.8002592921 0.7541096807
+ 0.7837613821 0.8008372784 0.7547701001
+ 0.7843915224 0.8014150858 0.7554302812
+ 0.7850180268 0.8019878864 0.7560858727
+ 0.7856444120 0.8025606275 0.7567415237
+ 0.7862709165 0.8031334281 0.7573971152
+ 0.7868974209 0.8037062287 0.7580528259
+ 0.7875211835 0.8042758703 0.7587059736
+ 0.7881436944 0.8048439026 0.7593579888
+ 0.7887662053 0.8054118752 0.7600100040
+ 0.7893887758 0.8059799075 0.7606620193
+ 0.7900099158 0.8065465093 0.7613126040
+ 0.7906270027 0.8071078062 0.7619590163
+ 0.7912439704 0.8076692224 0.7626054883
+ 0.7918611169 0.8082305789 0.7632519007
+ 0.7924780846 0.8087918758 0.7638983130
+ 0.7930914164 0.8093485236 0.7645419240
+ 0.7937036753 0.8099036813 0.7651848197
+ 0.7943159938 0.8104587793 0.7658277154
+ 0.7949283123 0.8110138774 0.7664706111
+ 0.7955389023 0.8115677238 0.7671121955
+ 0.7961457968 0.8121181130 0.7677505016
+ 0.7967525721 0.8126683831 0.7683889270
+ 0.7973595262 0.8132187128 0.7690272927
+ 0.7979663014 0.8137689829 0.7696655989
+ 0.7985696793 0.8143169284 0.7703021169
+ 0.7991721034 0.8148639798 0.7709379196
+ 0.7997745275 0.8154109716 0.7715737820
+ 0.8003767729 0.8159580827 0.7722095847
+ 0.8009781241 0.8165045977 0.7728447914
+ 0.8015751839 0.8170487285 0.7734771967
+ 0.8021721840 0.8175927997 0.7741094828
+ 0.8027691841 0.8181368709 0.7747418880
+ 0.8033663034 0.8186810017 0.7753742933
+ 0.8039602041 0.8192222714 0.7760047913
+ 0.8045521975 0.8197615743 0.7766340971
+ 0.8051440716 0.8203008175 0.7772634029
+ 0.8057360053 0.8208400011 0.7778927088
+ 0.8063278794 0.8213791847 0.7785220146
+ 0.8069158792 0.8219143748 0.7791473866
+ 0.8075037003 0.8224493265 0.7797725201
+ 0.8080914021 0.8229840994 0.7803977132
+ 0.8086792231 0.8235189915 0.7810227871
+ 0.8092660904 0.8240531087 0.7816470265
+ 0.8098508120 0.8245849013 0.7822685838
+ 0.8104354739 0.8251166940 0.7828900814
+ 0.8110200763 0.8256484866 0.7835115790
+ 0.8116047978 0.8261802793 0.7841330767
+ 0.8121870160 0.8267101049 0.7847530246
+ 0.8127670884 0.8272377849 0.7853714228
+ 0.8133472204 0.8277655244 0.7859897017
+ 0.8139272928 0.8282932043 0.7866080999
+ 0.8145074248 0.8288208842 0.7872264981
+ 0.8150827289 0.8293445706 0.7878416181
+ 0.8156566024 0.8298670053 0.7884557247
+ 0.8162304759 0.8303893805 0.7890698910
+ 0.8168044090 0.8309118748 0.7896839976
+ 0.8173784018 0.8314343095 0.7902982235
+ 0.8179473281 0.8319529295 0.7909085751
+ 0.8185161948 0.8324713707 0.7915189266
+ 0.8190850019 0.8329898119 0.7921292186
+ 0.8196539283 0.8335083127 0.7927395105
+ 0.8202221990 0.8340262771 0.7933492064
+ 0.8207868934 0.8345406055 0.7939547896
+ 0.8213515878 0.8350549936 0.7945603132
+ 0.8219162822 0.8355693817 0.7951657772
+ 0.8224810958 0.8360837102 0.7957714200
+ 0.8230450153 0.8365973234 0.7963758111
+ 0.8236066103 0.8371080756 0.7969769835
+ 0.8241683245 0.8376188278 0.7975782156
+ 0.8247299194 0.8381295800 0.7981793284
+ 0.8252915144 0.8386403918 0.7987805009
+ 0.8258516192 0.8391501904 0.7993801832
+ 0.8264086246 0.8396579027 0.7999768257
+ 0.8269655704 0.8401656747 0.8005735278
+ 0.8275225759 0.8406733871 0.8011701107
+ 0.8280795813 0.8411810994 0.8017666936
+ 0.8286346793 0.8416873217 0.8023620844
+ 0.8291863799 0.8421903253 0.8029553890
+ 0.8297381997 0.8426933289 0.8035488129
+ 0.8302899003 0.8431962729 0.8041421175
+ 0.8308416009 0.8436993957 0.8047354221
+ 0.8313921094 0.8442009091 0.8053274155
+ 0.8319404125 0.8446996808 0.8059173226
+ 0.8324885964 0.8451983929 0.8065071106
+ 0.8330368996 0.8456972241 0.8070968986
+ 0.8335850835 0.8461958766 0.8076868057
+ 0.8341315985 0.8466938734 0.8082754016
+ 0.8346744180 0.8471899033 0.8088614941
+ 0.8352171183 0.8476858735 0.8094475269
+ 0.8357598186 0.8481817842 0.8100336194
+ 0.8363025784 0.8486778140 0.8106197119
+ 0.8368440270 0.8491731286 0.8112050295
+ 0.8373814225 0.8496652842 0.8117879033
+ 0.8379188180 0.8501574993 0.8123707771
+ 0.8384562135 0.8506497741 0.8129537106
+ 0.8389936090 0.8511419892 0.8135365844
+ 0.8395305276 0.8516339064 0.8141192198
+ 0.8400635719 0.8521212935 0.8146995902
+ 0.8405966759 0.8526086807 0.8152799010
+ 0.8411297798 0.8530961275 0.8158602118
+ 0.8416628242 0.8535835147 0.8164405227
+ 0.8421959281 0.8540710211 0.8170207739
+ 0.8427261114 0.8545554280 0.8175972104
+ 0.8432559967 0.8550394773 0.8181732893
+ 0.8437858820 0.8555235863 0.8187493086
+ 0.8443158269 0.8560076952 0.8193253875
+ 0.8448457122 0.8564918041 0.8199014068
+ 0.8453723192 0.8569735885 0.8204749227
+ 0.8458976150 0.8574544191 0.8210471869
+ 0.8464229107 0.8579350710 0.8216195703
+ 0.8469482064 0.8584159017 0.8221920133
+ 0.8474735022 0.8588966727 0.8227642775
+ 0.8479961157 0.8593757749 0.8233352900
+ 0.8485156298 0.8598529100 0.8239045143
+ 0.8490350842 0.8603299856 0.8244736791
+ 0.8495544791 0.8608071208 0.8250429034
+ 0.8500739932 0.8612841964 0.8256121874
+ 0.8505926728 0.8617607951 0.8261809945
+ 0.8511074781 0.8622341752 0.8267477155
+ 0.8516222239 0.8627076149 0.8273143172
+ 0.8521370292 0.8631808758 0.8278809786
+ 0.8526517749 0.8636543155 0.8284475803
+ 0.8531665206 0.8641276956 0.8290143013
+ 0.8536782861 0.8645980954 0.8295775056
+ 0.8541892767 0.8650677204 0.8301398158
+ 0.8547003865 0.8655372858 0.8307021856
+ 0.8552113771 0.8660069108 0.8312644958
+ 0.8557224274 0.8664764762 0.8318268061
+ 0.8562318087 0.8669446111 0.8323876858
+ 0.8567386866 0.8674101233 0.8329463005
+ 0.8572456837 0.8678756952 0.8335049152
+ 0.8577526808 0.8683413267 0.8340634704
+ 0.8582596779 0.8688067794 0.8346220851
+ 0.8587666154 0.8692724109 0.8351806998
+ 0.8592697978 0.8697341084 0.8357362151
+ 0.8597729206 0.8701955080 0.8362916708
+ 0.8602761030 0.8706570268 0.8368471265
+ 0.8607792258 0.8711184859 0.8374025822
+ 0.8612822890 0.8715798855 0.8379580975
+ 0.8617836833 0.8720393777 0.8385115266
+ 0.8622832894 0.8724967837 0.8390629888
+ 0.8627830148 0.8729540706 0.8396145105
+ 0.8632826209 0.8734114170 0.8401659131
+ 0.8637822270 0.8738687038 0.8407173753
+ 0.8642818928 0.8743259907 0.8412687778
+ 0.8647763133 0.8747799993 0.8418176770
+ 0.8652706742 0.8752337098 0.8423663974
+ 0.8657649755 0.8756874800 0.8429151177
+ 0.8662593961 0.8761413097 0.8434638977
+ 0.8667536974 0.8765950203 0.8440126181
+ 0.8672459722 0.8770480156 0.8445599079
+ 0.8677352071 0.8774996996 0.8451051116
+ 0.8682243824 0.8779513836 0.8456501961
+ 0.8687136173 0.8784031272 0.8461953998
+ 0.8692027926 0.8788548112 0.8467404842
+ 0.8696920276 0.8793064952 0.8472856283
+ 0.8701782227 0.8797559738 0.8478285074
+ 0.8706634045 0.8802047968 0.8483706117
+ 0.8711487055 0.8806536198 0.8489127755
+ 0.8716340065 0.8811023831 0.8494548798
+ 0.8721193075 0.8815513253 0.8499971032
+ 0.8726040721 0.8819996119 0.8505387902
+ 0.8730852008 0.8824434280 0.8510770202
+ 0.8735662103 0.8828871846 0.8516153097
+ 0.8740472794 0.8833310008 0.8521534801
+ 0.8745284081 0.8837748170 0.8526918292
+ 0.8750094771 0.8842185140 0.8532299995
+ 0.8754889965 0.8846611977 0.8537666798
+ 0.8759661913 0.8851019740 0.8543009758
+ 0.8764433861 0.8855428100 0.8548352718
+ 0.8769205809 0.8859835863 0.8553696275
+ 0.8773978949 0.8864244223 0.8559039235
+ 0.8778750896 0.8868651986 0.8564382195
+ 0.8783500195 0.8873041272 0.8569704294
+ 0.8788238168 0.8877419829 0.8575013280
+ 0.8792976141 0.8881797791 0.8580322862
+ 0.8797712922 0.8886176944 0.8585631847
+ 0.8802450895 0.8890554905 0.8590942025
+ 0.8807188272 0.8894934058 0.8596251011
+ 0.8811894059 0.8899270296 0.8601537943
+ 0.8816593885 0.8903598189 0.8606820703
+ 0.8821293116 0.8907926083 0.8612102866
+ 0.8825992942 0.8912252784 0.8617386222
+ 0.8830692768 0.8916581273 0.8622667789
+ 0.8835391998 0.8920909166 0.8627951145
+ 0.8840066195 0.8925206065 0.8633205295
+ 0.8844739199 0.8929502964 0.8638458848
+ 0.8849412799 0.8933799863 0.8643712997
+ 0.8854085803 0.8938096762 0.8648967147
+ 0.8858758807 0.8942393064 0.8654221296
+ 0.8863430023 0.8946688175 0.8659473062
+ 0.8868073225 0.8950955272 0.8664698005
+ 0.8872717023 0.8955221772 0.8669921756
+ 0.8877360225 0.8959488869 0.8675147295
+ 0.8882004023 0.8963754773 0.8680372238
+ 0.8886647224 0.8968021870 0.8685597181
+ 0.8891286850 0.8972283006 0.8690819740
+ 0.8895897269 0.8976498842 0.8696026802
+ 0.8900507092 0.8980714083 0.8701235056
+ 0.8905116916 0.8984929919 0.8706442714
+ 0.8909726739 0.8989145160 0.8711650968
+ 0.8914337158 0.8993360996 0.8716859221
+ 0.8918942809 0.8997570872 0.8722062111
+ 0.8923516273 0.9001740813 0.8727232218
+ 0.8928089738 0.9005910754 0.8732401133
+ 0.8932663798 0.9010080099 0.8737571239
+ 0.8937237859 0.9014250040 0.8742740154
+ 0.8941810727 0.9018419981 0.8747909069
+ 0.8946381807 0.9022588134 0.8753076196
+ 0.8950915933 0.9026719928 0.8758205771
+ 0.8955450058 0.9030851722 0.8763335943
+ 0.8959984183 0.9034984112 0.8768466711
+ 0.8964517713 0.9039115906 0.8773596883
+ 0.8969051838 0.9043248296 0.8778727055
+ 0.8973585963 0.9047380090 0.8783857226
+ 0.8978086114 0.9051464796 0.8788955212
+ 0.8982583880 0.9055547118 0.8794052005
+ 0.8987082839 0.9059628844 0.8799148798
+ 0.8991581202 0.9063711166 0.8804246187
+ 0.8996080160 0.9067792892 0.8809341788
+ 0.9000577927 0.9071875215 0.8814439178
+ 0.9005057216 0.9075921774 0.8819513917
+ 0.9009531140 0.9079959989 0.8824583888
+ 0.9014005065 0.9083997011 0.8829653859
+ 0.9018480182 0.9088035226 0.8834723830
+ 0.9022954106 0.9092072845 0.8839793801
+ 0.9027428031 0.9096111059 0.8844863176
+ 0.9031882286 0.9100126028 0.8849915862
+ 0.9036322832 0.9104127884 0.8854957223
+ 0.9040763974 0.9108129144 0.8859999180
+ 0.9045205116 0.9112131000 0.8865039945
+ 0.9049645066 0.9116132259 0.8870080709
+ 0.9054086208 0.9120134115 0.8875123262
+ 0.9058511853 0.9124118090 0.8880149126
+ 0.9062910080 0.9128071070 0.8885148168
+ 0.9067307115 0.9132024050 0.8890147209
+ 0.9071704745 0.9135975838 0.8895145059
+ 0.9076102972 0.9139928818 0.8900144100
+ 0.9080501199 0.9143881202 0.8905143142
+ 0.9084897041 0.9147831798 0.8910140991
+ 0.9089263082 0.9151741862 0.8915116191
+ 0.9093629122 0.9155650735 0.8920090795
+ 0.9097993970 0.9159560800 0.8925067186
+ 0.9102360010 0.9163470268 0.8930041790
+ 0.9106726050 0.9167379737 0.8935016990
+ 0.9111092091 0.9171289206 0.8939992189
+ 0.9115434289 0.9175180197 0.8944947124
+ 0.9119766951 0.9179061055 0.8949893117
+ 0.9124100208 0.9182943106 0.8954837918
+ 0.9128432870 0.9186825156 0.8959783912
+ 0.9132764935 0.9190706015 0.8964728713
+ 0.9137098193 0.9194588065 0.8969674706
+ 0.9141420126 0.9198462963 0.8974612951
+ 0.9145715833 0.9202318192 0.8979535103
+ 0.9150012136 0.9206172824 0.8984456062
+ 0.9154307842 0.9210028052 0.8989377022
+ 0.9158604145 0.9213883281 0.8994297981
+ 0.9162899256 0.9217737913 0.8999218941
+ 0.9167194963 0.9221593142 0.9004141092
+ 0.9171459079 0.9225426912 0.9009035826
+ 0.9175716043 0.9229255915 0.9013926983
+ 0.9179974198 0.9233083725 0.9018816948
+ 0.9184231162 0.9236912131 0.9023706913
+ 0.9188488126 0.9240741134 0.9028596878
+ 0.9192745090 0.9244568944 0.9033486843
+ 0.9196990132 0.9248390794 0.9038369060
+ 0.9201207757 0.9252194166 0.9043233991
+ 0.9205424786 0.9255996943 0.9048098922
+ 0.9209643006 0.9259800911 0.9052963853
+ 0.9213860035 0.9263604283 0.9057828784
+ 0.9218078256 0.9267407060 0.9062693715
+ 0.9222295880 0.9271209836 0.9067559242
+ 0.9226487279 0.9274995923 0.9072409868
+ 0.9230669141 0.9278776050 0.9077255726
+ 0.9234851003 0.9282554984 0.9082100987
+ 0.9239032865 0.9286333919 0.9086946845
+ 0.9243214726 0.9290112853 0.9091792703
+ 0.9247395992 0.9293891788 0.9096639156
+ 0.9251574874 0.9297668934 0.9101482034
+ 0.9255725741 0.9301424026 0.9106302261
+ 0.9259877801 0.9305179119 0.9111121297
+ 0.9264029264 0.9308934212 0.9115940928
+ 0.9268180132 0.9312688708 0.9120761156
+ 0.9272332191 0.9316444993 0.9125580192
+ 0.9276483059 0.9320200086 0.9130399823
+ 0.9280616045 0.9323946238 0.9135211110
+ 0.9284722805 0.9327678084 0.9140009880
+ 0.9288828969 0.9331409931 0.9144809246
+ 0.9292935729 0.9335141778 0.9149606824
+ 0.9297043085 0.9338874817 0.9154406190
+ 0.9301149845 0.9342607260 0.9159204960
+ 0.9305256009 0.9346339107 0.9164003730
+ 0.9309334755 0.9350057244 0.9168785214
+ 0.9313400984 0.9353767037 0.9173557162
+ 0.9317467213 0.9357478023 0.9178329110
+ 0.9321532845 0.9361187816 0.9183101058
+ 0.9325597882 0.9364898205 0.9187873006
+ 0.9329664111 0.9368609190 0.9192644954
+ 0.9333729744 0.9372318983 0.9197416902
+ 0.9337769747 0.9376000166 0.9202169776
+ 0.9341807961 0.9379675984 0.9206920266
+ 0.9345844984 0.9383351803 0.9211670756
+ 0.9349882007 0.9387028217 0.9216421247
+ 0.9353919029 0.9390705228 0.9221171737
+ 0.9357956052 0.9394381046 0.9225922227
+ 0.9361993074 0.9398056865 0.9230672121
+ 0.9366000891 0.9401705861 0.9235394001
+ 0.9370008707 0.9405354857 0.9240115881
+ 0.9374017119 0.9409003854 0.9244837761
+ 0.9378024936 0.9412652850 0.9249560237
+ 0.9382032752 0.9416301847 0.9254282117
+ 0.9386041760 0.9419950843 0.9259003997
+ 0.9390046000 0.9423598051 0.9263724089
+ 0.9394022822 0.9427227974 0.9268422723
+ 0.9397999048 0.9430859089 0.9273123145
+ 0.9401975870 0.9434489012 0.9277822971
+ 0.9405953288 0.9438120127 0.9282522202
+ 0.9409930110 0.9441750050 0.9287222028
+ 0.9413906932 0.9445381165 0.9291921854
+ 0.9417877793 0.9449006915 0.9296612740
+ 0.9421823025 0.9452607036 0.9301261902
+ 0.9425768852 0.9456205964 0.9305911064
+ 0.9429714084 0.9459806085 0.9310560226
+ 0.9433658719 0.9463406205 0.9315208793
+ 0.9437603951 0.9467005730 0.9319856763
+ 0.9441549182 0.9470605254 0.9324505925
+ 0.9445487261 0.9474198818 0.9329144955
+ 0.9449381828 0.9477747083 0.9333720803
+ 0.9453276992 0.9481294751 0.9338297248
+ 0.9457172155 0.9484843016 0.9342873096
+ 0.9461067915 0.9488391280 0.9347448945
+ 0.9464963078 0.9491938949 0.9352024794
+ 0.9468858242 0.9495487809 0.9356601238
+ 0.9472748041 0.9499033093 0.9361174107
+ 0.9476565719 0.9502521157 0.9365684986
+ 0.9480383992 0.9506009221 0.9370197058
+ 0.9484201074 0.9509496093 0.9374709129
+ 0.9488018751 0.9512984157 0.9379221201
+ 0.9491835833 0.9516472220 0.9383733273
+ 0.9495654106 0.9519960284 0.9388244152
+ 0.9499471784 0.9523447156 0.9392756224
+ 0.9503229260 0.9526900053 0.9397230148
+ 0.9506981969 0.9530349970 0.9401701093
+ 0.9510734081 0.9533799291 0.9406172037
+ 0.9514486194 0.9537248015 0.9410642982
+ 0.9518237710 0.9540696740 0.9415112734
+ 0.9521991014 0.9544147253 0.9419584274
+ 0.9525743127 0.9547595978 0.9424055219
+ 0.9529467225 0.9551023841 0.9428507090
+ 0.9533181190 0.9554443955 0.9432951808
+ 0.9536895156 0.9557864070 0.9437395930
+ 0.9540607929 0.9561284184 0.9441841245
+ 0.9544321895 0.9564703703 0.9446285963
+ 0.9548035860 0.9568123817 0.9450731277
+ 0.9551749229 0.9571543932 0.9455174804
+ 0.9555448294 0.9574952722 0.9459602833
+ 0.9559131265 0.9578347802 0.9464008808
+ 0.9562813044 0.9581742883 0.9468415976
+ 0.9566496015 0.9585137963 0.9472823143
+ 0.9570177794 0.9588533044 0.9477229118
+ 0.9573860765 0.9591928124 0.9481636286
+ 0.9577543139 0.9595323205 0.9486042857
+ 0.9581220150 0.9598714113 0.9490444064
+ 0.9584864974 0.9602082968 0.9494813085
+ 0.9588509798 0.9605451226 0.9499182105
+ 0.9592155218 0.9608818889 0.9503551126
+ 0.9595801234 0.9612187743 0.9507918954
+ 0.9599446058 0.9615556002 0.9512287974
+ 0.9603090882 0.9618924856 0.9516656995
+ 0.9606735706 0.9622293115 0.9521026015
+ 0.9610344768 0.9625636935 0.9525365829
+ 0.9613944292 0.9628973007 0.9529696107
+ 0.9617542028 0.9632309079 0.9534025788
+ 0.9621140957 0.9635645151 0.9538357258
+ 0.9624739289 0.9638981223 0.9542686939
+ 0.9628337026 0.9642317295 0.9547017813
+ 0.9631935954 0.9645652771 0.9551348090
+ 0.9635519981 0.9648981094 0.9555665851
+ 0.9639074206 0.9652289152 0.9559956789
+ 0.9642627835 0.9655597210 0.9564247727
+ 0.9646183252 0.9658905268 0.9568538070
+ 0.9649736881 0.9662212729 0.9572829008
+ 0.9653291106 0.9665520787 0.9577119946
+ 0.9656844735 0.9668828845 0.9581410885
+ 0.9660398960 0.9672136903 0.9585701227
+ 0.9663916826 0.9675421119 0.9589954019
+ 0.9667426944 0.9678698778 0.9594197869
+ 0.9670937061 0.9681977034 0.9598442912
+ 0.9674447179 0.9685255289 0.9602686763
+ 0.9677956104 0.9688534141 0.9606931210
+ 0.9681466222 0.9691811800 0.9611175060
+ 0.9684975743 0.9695090055 0.9615418911
+ 0.9688472748 0.9698359966 0.9619650841
+ 0.9691932797 0.9701604247 0.9623844028
+ 0.9695392847 0.9704847932 0.9628037214
+ 0.9698852897 0.9708092213 0.9632229805
+ 0.9702312946 0.9711335897 0.9636424184
+ 0.9705772996 0.9714580178 0.9640616775
+ 0.9709233046 0.9717823863 0.9644809961
+ 0.9712691903 0.9721068144 0.9649003148
+ 0.9716116190 0.9724292159 0.9653162956
+ 0.9719517827 0.9727504253 0.9657304287
+ 0.9722920060 0.9730715156 0.9661443830
+ 0.9726322293 0.9733927250 0.9665583968
+ 0.9729723930 0.9737138152 0.9669724107
+ 0.9733124971 0.9740350246 0.9673864245
+ 0.9736527205 0.9743561745 0.9678003788
+ 0.9739928842 0.9746773243 0.9682143927
+ 0.9743273854 0.9749950767 0.9686228037
+ 0.9746615291 0.9753125906 0.9690306783
+ 0.9749956727 0.9756301045 0.9694386721
+ 0.9753298163 0.9759476185 0.9698466063
+ 0.9756639004 0.9762650728 0.9702546000
+ 0.9759979844 0.9765825868 0.9706624746
+ 0.9763321280 0.9769001007 0.9710705280
+ 0.9766650200 0.9772170186 0.9714773297
+ 0.9769923091 0.9775304198 0.9718787074
+ 0.9773195982 0.9778438807 0.9722800851
+ 0.9776468873 0.9781572819 0.9726815820
+ 0.9779741764 0.9784708023 0.9730830193
+ 0.9783015847 0.9787843227 0.9734843969
+ 0.9786288738 0.9790977240 0.9738858938
+ 0.9789562225 0.9794111848 0.9742872715
+ 0.9792808890 0.9797229767 0.9746860862
+ 0.9796009064 0.9800319076 0.9750801921
+ 0.9799209237 0.9803407788 0.9754742980
+ 0.9802408814 0.9806495905 0.9758684039
+ 0.9805610180 0.9809585214 0.9762625098
+ 0.9808809757 0.9812673926 0.9766566157
+ 0.9812009931 0.9815762043 0.9770507216
+ 0.9815210104 0.9818850756 0.9774448276
+ 0.9818372726 0.9821913242 0.9778347015
+ 0.9821496010 0.9824944139 0.9782199264
+ 0.9824618101 0.9827976227 0.9786050916
+ 0.9827740788 0.9831007123 0.9789903164
+ 0.9830862880 0.9834039211 0.9793756008
+ 0.9833986163 0.9837070107 0.9797608256
+ 0.9837108254 0.9840102196 0.9801459908
+ 0.9840230942 0.9843133092 0.9805312157
+ 0.9843308926 0.9846134782 0.9809110165
+ 0.9846346974 0.9849109054 0.9812859297
+ 0.9849383831 0.9852082729 0.9816609025
+ 0.9852421880 0.9855058193 0.9820358157
+ 0.9855459929 0.9858031869 0.9824107289
+ 0.9858497977 0.9861006141 0.9827855825
+ 0.9861536026 0.9863979816 0.9831604958
+ 0.9864572883 0.9866954088 0.9835355282
+ 0.9867570996 0.9869899154 0.9839053154
+ 0.9870529771 0.9872815013 0.9842700958
+ 0.9873489141 0.9875730872 0.9846349955
+ 0.9876447916 0.9878646731 0.9849997759
+ 0.9879406095 0.9881563783 0.9853646755
+ 0.9882364869 0.9884480238 0.9857295156
+ 0.9885324240 0.9887396097 0.9860944152
+ 0.9888283014 0.9890311956 0.9864593148
+ 0.9891207814 0.9893190861 0.9868193865
+ 0.9894089103 0.9896019101 0.9871731997
+ 0.9896969199 0.9898846745 0.9875268936
+ 0.9899849892 0.9901676178 0.9878807068
+ 0.9902729988 0.9904503822 0.9882345200
+ 0.9905611277 0.9907332063 0.9885882735
+ 0.9908490777 0.9910160899 0.9889420271
+ 0.9911370873 0.9912989140 0.9892957807
+ 0.9914227128 0.9915794730 0.9896461964
+ 0.9917017817 0.9918540716 0.9899876714
+ 0.9919809103 0.9921286702 0.9903292060
+ 0.9922599792 0.9924033284 0.9906706810
+ 0.9925391078 0.9926779866 0.9910122156
+ 0.9928181767 0.9929525852 0.9913538098
+ 0.9930973053 0.9932271838 0.9916952848
+ 0.9933763742 0.9935019016 0.9920368195
+ 0.9936547875 0.9937759042 0.9923774004
+ 0.9939225912 0.9940415025 0.9927039146
+ 0.9941903949 0.9943069816 0.9930304289
+ 0.9944581985 0.9945725799 0.9933570027
+ 0.9947260022 0.9948381186 0.9936835170
+ 0.9949938059 0.9951037169 0.9940099716
+ 0.9952616096 0.9953691959 0.9943366051
+ 0.9955294132 0.9956346750 0.9946631193
+ 0.9957972765 0.9959002733 0.9949895740
+ 0.9960541129 0.9961531162 0.9953014851
+ 0.9963079095 0.9964022040 0.9956092238
+ 0.9965615869 0.9966512918 0.9959169030
+ 0.9968153834 0.9969003797 0.9962245226
+ 0.9970691204 0.9971495271 0.9965322018
+ 0.9973229170 0.9973986149 0.9968398809
+ 0.9975765944 0.9976477027 0.9971476197
+ 0.9978303909 0.9978967905 0.9974551797
+ 0.9980784059 0.9981389046 0.9977517128
+ 0.9983186126 0.9983714819 0.9980326891
+ 0.9985588193 0.9986041784 0.9983137250
+ 0.9987990260 0.9988368154 0.9985948205
+ 0.9990391731 0.9990693927 0.9988757968
+ 0.9992793798 0.9993020892 0.9991568923
+ 0.9995195866 0.9995347261 0.9994379282
+ 0.9997597933 0.9997674227 0.9997190237
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_hdc_400_plus.spi1d b/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_hdc_400_plus.spi1d
new file mode 100644
index 00000000000..544bf935b5a
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_hdc_400_plus.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0188545007 0.0200409293 0.0140067302
+ 0.0332524888 0.0348740518 0.0258749295
+ 0.0452598706 0.0475615300 0.0362151787
+ 0.0559787415 0.0589470603 0.0456109904
+ 0.0658830702 0.0694492683 0.0543236583
+ 0.0752111897 0.0792194605 0.0625015125
+ 0.0841012076 0.0884407684 0.0702229664
+ 0.0926621929 0.0972259119 0.0775719434
+ 0.1009650975 0.1056030989 0.0846038684
+ 0.1090589985 0.1136253998 0.0913083479
+ 0.1170130968 0.1213366017 0.0977427885
+ 0.1247942969 0.1287464052 0.1039230004
+ 0.1323173046 0.1358782053 0.1098598987
+ 0.1394851059 0.1427361071 0.1155802011
+ 0.1463093013 0.1493203044 0.1211000010
+ 0.1528204978 0.1556663066 0.1264265031
+ 0.1590683013 0.1617784947 0.1315815002
+ 0.1650577933 0.1676822007 0.1365823001
+ 0.1708182991 0.1734001040 0.1414559036
+ 0.1763903052 0.1789600998 0.1462168992
+ 0.1817798018 0.1843533963 0.1508775055
+ 0.1870086044 0.1895903945 0.1554276943
+ 0.1920844018 0.1946922988 0.1598816961
+ 0.1970220059 0.1996600926 0.1642390937
+ 0.2018329054 0.2045013011 0.1684959978
+ 0.2065093070 0.2092238963 0.1726709008
+ 0.2110690027 0.2138542980 0.1767773032
+ 0.2155348957 0.2183912992 0.1808128059
+ 0.2198981047 0.2228228003 0.1847777069
+ 0.2241635025 0.2271593064 0.1886793971
+ 0.2283228040 0.2314175963 0.1925252974
+ 0.2323801965 0.2355985940 0.1963074058
+ 0.2363557965 0.2396991998 0.2000353038
+ 0.2402614951 0.2437127978 0.2036948055
+ 0.2441187054 0.2476392984 0.2072975934
+ 0.2479200959 0.2514924109 0.2108584046
+ 0.2516668141 0.2552962005 0.2143702954
+ 0.2553597987 0.2590639889 0.2178401053
+ 0.2590073943 0.2627837062 0.2212640047
+ 0.2626096010 0.2664473057 0.2246434987
+ 0.2661620975 0.2700594962 0.2279828042
+ 0.2696613073 0.2736192942 0.2312768996
+ 0.2731044888 0.2771342099 0.2345380038
+ 0.2764894962 0.2806042135 0.2377575040
+ 0.2798126042 0.2840265930 0.2409393936
+ 0.2830832899 0.2873997092 0.2440892011
+ 0.2863064110 0.2907201052 0.2471970022
+ 0.2894839048 0.2939862907 0.2502729893
+ 0.2926194966 0.2971968949 0.2533178031
+ 0.2957077026 0.3003590107 0.2563329041
+ 0.2987434864 0.3034782112 0.2593177855
+ 0.3017309904 0.3065663874 0.2622711957
+ 0.3046731055 0.3096238971 0.2652002871
+ 0.3075759113 0.3126527965 0.2681050003
+ 0.3104431033 0.3156541884 0.2709783912
+ 0.3132778108 0.3186286986 0.2738296092
+ 0.3160825074 0.3215768933 0.2766565979
+ 0.3188611865 0.3244988918 0.2794562876
+ 0.3216165900 0.3273960948 0.2822301984
+ 0.3243513107 0.3302688003 0.2849779129
+ 0.3270677924 0.3331151903 0.2877022028
+ 0.3297683895 0.3359293044 0.2903991938
+ 0.3324556947 0.3387104869 0.2930696011
+ 0.3351315856 0.3414531052 0.2957195044
+ 0.3377983868 0.3441590071 0.2983430922
+ 0.3404580057 0.3468317986 0.3009459972
+ 0.3431122899 0.3494741917 0.3035286963
+ 0.3457567990 0.3520886004 0.3060950041
+ 0.3483870029 0.3546772897 0.3086442053
+ 0.3509952128 0.3572408855 0.3111701012
+ 0.3535763919 0.3597824872 0.3136737049
+ 0.3561269045 0.3623043895 0.3161568940
+ 0.3586477935 0.3648073971 0.3186241984
+ 0.3611387014 0.3672929108 0.3210709095
+ 0.3636046052 0.3697636127 0.3234997094
+ 0.3660457134 0.3722181916 0.3259125948
+ 0.3684634864 0.3746534884 0.3283078969
+ 0.3708611131 0.3770717978 0.3306862116
+ 0.3732374012 0.3794744015 0.3330459893
+ 0.3755970895 0.3818623126 0.3353869021
+ 0.3779377937 0.3842301071 0.3377087116
+ 0.3802644014 0.3865832984 0.3400174975
+ 0.3825747967 0.3889225125 0.3423081040
+ 0.3848729134 0.3912503123 0.3445838094
+ 0.3871577978 0.3935666978 0.3468438089
+ 0.3894316852 0.3958694041 0.3490906954
+ 0.3916954100 0.3981603980 0.3513231874
+ 0.3939490914 0.4004369080 0.3535391092
+ 0.3961951137 0.4026972055 0.3557423055
+ 0.3984332085 0.4049367011 0.3579295874
+ 0.4006646872 0.4071569145 0.3600991964
+ 0.4028908908 0.4093607068 0.3622539937
+ 0.4051119983 0.4115476012 0.3643927872
+ 0.4073289931 0.4137150049 0.3665145040
+ 0.4095427990 0.4158644974 0.3686214983
+ 0.4117541909 0.4179973006 0.3707144856
+ 0.4139570892 0.4201147854 0.3727920055
+ 0.4161537886 0.4222174883 0.3748528957
+ 0.4183439910 0.4243085980 0.3768979013
+ 0.4205237925 0.4263896048 0.3789266050
+ 0.4226934910 0.4284594953 0.3809396923
+ 0.4248510003 0.4305211902 0.3829380870
+ 0.4269989133 0.4325712025 0.3849214911
+ 0.4291365147 0.4346114993 0.3868896961
+ 0.4312635958 0.4366433918 0.3888421953
+ 0.4333817959 0.4386653006 0.3907817900
+ 0.4354879856 0.4406721890 0.3927083015
+ 0.4375857115 0.4426656961 0.3946214020
+ 0.4396727085 0.4446468949 0.3965215981
+ 0.4417509139 0.4466181099 0.3984085917
+ 0.4438194931 0.4485799074 0.4002822936
+ 0.4458774030 0.4505313933 0.4021424949
+ 0.4479227960 0.4524719119 0.4039889872
+ 0.4499554038 0.4544002116 0.4058243036
+ 0.4519762993 0.4563159049 0.4076485038
+ 0.4539847076 0.4582194090 0.4094625115
+ 0.4559822977 0.4601128101 0.4112651944
+ 0.4579656124 0.4619938135 0.4130575061
+ 0.4599342942 0.4638626873 0.4148383141
+ 0.4618889093 0.4657208920 0.4166125953
+ 0.4638301134 0.4675695002 0.4183782041
+ 0.4657584131 0.4694097936 0.4201379120
+ 0.4676744044 0.4712429941 0.4218888879
+ 0.4695785046 0.4730699956 0.4236342013
+ 0.4714691937 0.4748862982 0.4253711104
+ 0.4733453989 0.4766918123 0.4271022975
+ 0.4752089083 0.4784876108 0.4288255870
+ 0.4770591855 0.4802748859 0.4305430055
+ 0.4788978100 0.4820528924 0.4322530031
+ 0.4807246923 0.4838208854 0.4339570105
+ 0.4825393856 0.4855782092 0.4356541038
+ 0.4843406081 0.4873236120 0.4373449087
+ 0.4861288071 0.4890565872 0.4390296042
+ 0.4879052043 0.4907774925 0.4407073855
+ 0.4896669984 0.4924885035 0.4423801005
+ 0.4914163053 0.4941891134 0.4440453053
+ 0.4931511879 0.4958809912 0.4457054138
+ 0.4948748052 0.4975647032 0.4473578930
+ 0.4965868890 0.4992407858 0.4490056038
+ 0.4982892871 0.5009080172 0.4506456852
+ 0.4999811053 0.5025680065 0.4522778988
+ 0.5016608238 0.5042217970 0.4539025128
+ 0.5033277869 0.5058667064 0.4555189908
+ 0.5049809813 0.5075010061 0.4571281075
+ 0.5066220760 0.5091261864 0.4587261975
+ 0.5082523823 0.5107440948 0.4603149891
+ 0.5098735094 0.5123543739 0.4618948102
+ 0.5114861131 0.5139557719 0.4634658098
+ 0.5130900741 0.5155460238 0.4650284052
+ 0.5146843791 0.5171270967 0.4665809870
+ 0.5162659287 0.5186967850 0.4681251943
+ 0.5178381205 0.5202578902 0.4696618021
+ 0.5194014907 0.5218108296 0.4711911976
+ 0.5209562182 0.5233557224 0.4727137089
+ 0.5225027204 0.5248928070 0.4742273986
+ 0.5240399241 0.5264220834 0.4757342041
+ 0.5255666971 0.5279446244 0.4772349000
+ 0.5270826221 0.5294610262 0.4787296057
+ 0.5285871029 0.5309712887 0.4802174866
+ 0.5300801992 0.5324715972 0.4816986024
+ 0.5315656066 0.5339645743 0.4831734896
+ 0.5330439210 0.5354511142 0.4846417010
+ 0.5345147848 0.5369303823 0.4861015081
+ 0.5359786153 0.5384036899 0.4875538051
+ 0.5374345779 0.5398699045 0.4889999032
+ 0.5388823748 0.5413284898 0.4904398918
+ 0.5403190255 0.5427761078 0.4918713868
+ 0.5417451859 0.5442144275 0.4932934940
+ 0.5431644917 0.5456464291 0.4947094917
+ 0.5445777774 0.5470724106 0.4961200953
+ 0.5459790826 0.5484896898 0.4975199103
+ 0.5473731756 0.5499022007 0.4989153147
+ 0.5487601161 0.5513098240 0.5003060102
+ 0.5501369238 0.5527070761 0.5016881227
+ 0.5515047908 0.5540965199 0.5030658245
+ 0.5528663993 0.5554798841 0.5044389963
+ 0.5542203188 0.5568554997 0.5058041215
+ 0.5555655956 0.5582247972 0.5071626902
+ 0.5569046140 0.5595903993 0.5085164905
+ 0.5582354069 0.5609512925 0.5098640919
+ 0.5595571995 0.5623037219 0.5112056732
+ 0.5608744025 0.5636506081 0.5125434995
+ 0.5621863008 0.5649901032 0.5138760209
+ 0.5634893179 0.5663208961 0.5152037144
+ 0.5647879243 0.5676466823 0.5165277719
+ 0.5660805702 0.5689647198 0.5178461075
+ 0.5673637986 0.5702759027 0.5191584826
+ 0.5686416030 0.5715829730 0.5204676986
+ 0.5699104071 0.5728827119 0.5217714906
+ 0.5711724758 0.5741752982 0.5230712891
+ 0.5724303126 0.5754632950 0.5243685842
+ 0.5736793280 0.5767428279 0.5256611705
+ 0.5749223232 0.5780189037 0.5269505978
+ 0.5761598945 0.5792912841 0.5282369256
+ 0.5773891807 0.5805559158 0.5295171142
+ 0.5786157250 0.5818173885 0.5307943821
+ 0.5798376203 0.5830736160 0.5320662856
+ 0.5810524225 0.5843229294 0.5333334804
+ 0.5822634101 0.5855684876 0.5345982909
+ 0.5834617019 0.5868036151 0.5358551741
+ 0.5846555233 0.5880358219 0.5371090174
+ 0.5858426094 0.5892624855 0.5383573771
+ 0.5870230794 0.5904846787 0.5395992994
+ 0.5882006884 0.5917047858 0.5408381224
+ 0.5893698931 0.5929183960 0.5420668125
+ 0.5905355811 0.5941283703 0.5432921052
+ 0.5916948915 0.5953302979 0.5445101261
+ 0.5928494930 0.5965275168 0.5457227826
+ 0.5940014720 0.5977213979 0.5469322205
+ 0.5951455235 0.5989087224 0.5481334925
+ 0.5962870121 0.6000937819 0.5493327975
+ 0.5974202752 0.6012709141 0.5505263209
+ 0.5985488296 0.6024438739 0.5517168045
+ 0.5996711254 0.6036102176 0.5529028773
+ 0.6007874012 0.6047713161 0.5540845990
+ 0.6019008160 0.6059291959 0.5552638173
+ 0.6030085087 0.6070817113 0.5564357042
+ 0.6041145921 0.6082327962 0.5576059818
+ 0.6052119732 0.6093747020 0.5587717295
+ 0.6063060164 0.6105144024 0.5599352717
+ 0.6073911786 0.6116470098 0.5610927939
+ 0.6084719896 0.6127761006 0.5622478127
+ 0.6095473170 0.6139001250 0.5633994937
+ 0.6106179953 0.6150193214 0.5645474792
+ 0.6116858125 0.6161350012 0.5656930804
+ 0.6127483249 0.6172463298 0.5668336153
+ 0.6138089895 0.6183556914 0.5679724216
+ 0.6148627996 0.6194601059 0.5691046715
+ 0.6159157157 0.6205636263 0.5702360272
+ 0.6169633269 0.6216604114 0.5713596940
+ 0.6180101037 0.6227564216 0.5724828839
+ 0.6190497279 0.6238446832 0.5736011267
+ 0.6200875044 0.6249315739 0.5747177005
+ 0.6211166978 0.6260104179 0.5758256912
+ 0.6221439838 0.6270869970 0.5769320130
+ 0.6231651902 0.6281551719 0.5780321956
+ 0.6241847873 0.6292213202 0.5791301131
+ 0.6252005100 0.6302810907 0.5802220702
+ 0.6262137294 0.6313390732 0.5813122988
+ 0.6272215247 0.6323928237 0.5823984742
+ 0.6282256246 0.6334443092 0.5834822059
+ 0.6292229891 0.6344907284 0.5845605731
+ 0.6302174926 0.6355344057 0.5856364965
+ 0.6312069297 0.6365721822 0.5867068172
+ 0.6321943998 0.6376072168 0.5877746940
+ 0.6331781745 0.6386352777 0.5888370872
+ 0.6341605186 0.6396614909 0.5898970962
+ 0.6351392865 0.6406822205 0.5909510255
+ 0.6361160278 0.6417014003 0.5920032263
+ 0.6370865107 0.6427150965 0.5930498242
+ 0.6380555034 0.6437277794 0.5940951109
+ 0.6390181184 0.6447337866 0.5951337814
+ 0.6399800181 0.6457393169 0.5961719155
+ 0.6409355998 0.6467369199 0.5972027779
+ 0.6418911219 0.6477345228 0.5982336998
+ 0.6428390741 0.6487230062 0.5992593169
+ 0.6437870860 0.6497110128 0.6002848744
+ 0.6447305083 0.6506903768 0.6013044715
+ 0.6456733942 0.6516680717 0.6023231745
+ 0.6466109157 0.6526402235 0.6033357978
+ 0.6475467086 0.6536098123 0.6043460965
+ 0.6484770179 0.6545764208 0.6053528786
+ 0.6494035721 0.6555402875 0.6063570976
+ 0.6503273249 0.6565018892 0.6073589921
+ 0.6512470245 0.6574596167 0.6083570719
+ 0.6521654129 0.6584159136 0.6093541980
+ 0.6530792713 0.6593660116 0.6103470922
+ 0.6539931297 0.6603162289 0.6113399863
+ 0.6548979282 0.6612582803 0.6123251915
+ 0.6558027267 0.6622002125 0.6133103967
+ 0.6567010283 0.6631376147 0.6142895222
+ 0.6575976014 0.6640735269 0.6152667999
+ 0.6584901810 0.6650068164 0.6162406206
+ 0.6593794823 0.6659374237 0.6172112823
+ 0.6602666974 0.6668658853 0.6181805134
+ 0.6611484885 0.6677879095 0.6191458106
+ 0.6620302200 0.6687098742 0.6201111078
+ 0.6629042029 0.6696240902 0.6210708022
+ 0.6637783051 0.6705380082 0.6220304966
+ 0.6646463871 0.6714469790 0.6229835153
+ 0.6655120850 0.6723536253 0.6239334941
+ 0.6663749814 0.6732575297 0.6248810291
+ 0.6672335863 0.6741561890 0.6258239746
+ 0.6680920124 0.6750550270 0.6267668009
+ 0.6689471006 0.6759482026 0.6277027726
+ 0.6698023081 0.6768413782 0.6286388040
+ 0.6706528068 0.6777299047 0.6295701861
+ 0.6715013981 0.6786159277 0.6304991841
+ 0.6723480821 0.6794993281 0.6314260960
+ 0.6731910110 0.6803758740 0.6323478818
+ 0.6740338206 0.6812524199 0.6332696080
+ 0.6748722792 0.6821228266 0.6341838837
+ 0.6757103205 0.6829922795 0.6350972056
+ 0.6765457988 0.6838589907 0.6360073090
+ 0.6773787141 0.6847224236 0.6369137168
+ 0.6782112718 0.6855856776 0.6378198266
+ 0.6790390015 0.6864398122 0.6387205124
+ 0.6798666716 0.6872938871 0.6396213174
+ 0.6806908250 0.6881433129 0.6405187845
+ 0.6815124750 0.6889889836 0.6414139867
+ 0.6823334098 0.6898341179 0.6423081756
+ 0.6831489205 0.6906722784 0.6431941986
+ 0.6839643717 0.6915106177 0.6440802217
+ 0.6847774982 0.6923443079 0.6449621916
+ 0.6855893135 0.6931747794 0.6458414197
+ 0.6864004731 0.6940047741 0.6467201710
+ 0.6872066855 0.6948273182 0.6475932002
+ 0.6880130172 0.6956499219 0.6484662294
+ 0.6888151765 0.6964679956 0.6493358016
+ 0.6896142960 0.6972820163 0.6502025723
+ 0.6904134154 0.6980959177 0.6510692835
+ 0.6912078261 0.6989029050 0.6519299746
+ 0.6920022964 0.6997095942 0.6527906060
+ 0.6927950978 0.7005147934 0.6536483169
+ 0.6935858130 0.7013174891 0.6545016766
+ 0.6943765283 0.7021203041 0.6553550959
+ 0.6951621175 0.7029188275 0.6562039852
+ 0.6959465146 0.7037159801 0.6570516229
+ 0.6967297792 0.7045122981 0.6578981876
+ 0.6975088120 0.7053027749 0.6587392092
+ 0.6982877254 0.7060933113 0.6595801711
+ 0.6990643144 0.7068814039 0.6604182720
+ 0.6998388171 0.7076671124 0.6612536907
+ 0.7006133199 0.7084527016 0.6620889902
+ 0.7013818026 0.7092331052 0.6629180908
+ 0.7021492720 0.7100123167 0.6637459993
+ 0.7029157877 0.7107905746 0.6645727754
+ 0.7036771774 0.7115622759 0.6653935909
+ 0.7044386268 0.7123339772 0.6662142873
+ 0.7051976919 0.7131032944 0.6670325994
+ 0.7059540153 0.7138692141 0.6678475738
+ 0.7067102790 0.7146351933 0.6686627269
+ 0.7074630260 0.7153962851 0.6694738865
+ 0.7082142234 0.7161549926 0.6702834964
+ 0.7089654803 0.7169137001 0.6710931063
+ 0.7097116709 0.7176669836 0.6718968153
+ 0.7104576826 0.7184197903 0.6727002263
+ 0.7112026811 0.7191722989 0.6735023856
+ 0.7119430900 0.7199227214 0.6742987037
+ 0.7126836181 0.7206730843 0.6750949025
+ 0.7134215236 0.7214214206 0.6758887768
+ 0.7141550779 0.7221655250 0.6766782999
+ 0.7148886919 0.7229096293 0.6774678230
+ 0.7156193852 0.7236497998 0.6782538295
+ 0.7163475752 0.7243860960 0.6790366769
+ 0.7170758247 0.7251223922 0.6798195839
+ 0.7178009748 0.7258551717 0.6805974841
+ 0.7185249925 0.7265861034 0.6813730001
+ 0.7192488909 0.7273170948 0.6821485162
+ 0.7199671268 0.7280430198 0.6829196215
+ 0.7206841111 0.7287673950 0.6836894155
+ 0.7214009762 0.7294918895 0.6844593287
+ 0.7221128941 0.7302092910 0.6852232814
+ 0.7228242755 0.7309256792 0.6859866977
+ 0.7235357165 0.7316421866 0.6867499948
+ 0.7242426872 0.7323533297 0.6875082850
+ 0.7249497175 0.7330641747 0.6882663965
+ 0.7256563902 0.7337750793 0.6890243888
+ 0.7263563275 0.7344793081 0.6897757053
+ 0.7270562053 0.7351834774 0.6905270219
+ 0.7277556062 0.7358874083 0.6912779808
+ 0.7284498811 0.7365834117 0.6920228004
+ 0.7291440964 0.7372794151 0.6927676201
+ 0.7298380136 0.7379751801 0.6935120821
+ 0.7305275798 0.7386654019 0.6942508817
+ 0.7312173247 0.7393556833 0.6949896812
+ 0.7319065928 0.7400457859 0.6957281828
+ 0.7325891256 0.7407314777 0.6964604259
+ 0.7332715988 0.7414172292 0.6971926093
+ 0.7339540124 0.7421028018 0.6979246736
+ 0.7346293926 0.7427842021 0.6986520290
+ 0.7353047729 0.7434653044 0.6993792057
+ 0.7359800935 0.7441465259 0.7001065016
+ 0.7366490960 0.7448238134 0.7008286715
+ 0.7373176217 0.7455006838 0.7015504241
+ 0.7379860878 0.7461774945 0.7022721171
+ 0.7386487722 0.7468507886 0.7029896975
+ 0.7393102050 0.7475231886 0.7037063241
+ 0.7399716973 0.7481955886 0.7044230103
+ 0.7406283021 0.7488650084 0.7051362991
+ 0.7412828207 0.7495329976 0.7058482170
+ 0.7419373989 0.7502009869 0.7065600157
+ 0.7425882220 0.7508667707 0.7072690129
+ 0.7432361841 0.7515305877 0.7079756260
+ 0.7438840866 0.7521942854 0.7086821795
+ 0.7445294261 0.7528566122 0.7093874216
+ 0.7451704741 0.7535158992 0.7100903988
+ 0.7458115220 0.7541753054 0.7107933760
+ 0.7464513183 0.7548338175 0.7114953995
+ 0.7470856905 0.7554876804 0.7121930122
+ 0.7477200031 0.7561414838 0.7128906250
+ 0.7483543158 0.7567954063 0.7135881782
+ 0.7489826083 0.7574434876 0.7142792940
+ 0.7496104836 0.7580910921 0.7149698138
+ 0.7502384186 0.7587388158 0.7156603932
+ 0.7508633137 0.7593836188 0.7163473964
+ 0.7514868975 0.7600269914 0.7170326114
+ 0.7521104217 0.7606704235 0.7177178264
+ 0.7527319193 0.7613118291 0.7184010744
+ 0.7533503771 0.7619500160 0.7190815210
+ 0.7539688945 0.7625880837 0.7197619081
+ 0.7545869946 0.7632259130 0.7204418182
+ 0.7552015185 0.7638580203 0.7211170197
+ 0.7558159828 0.7644901872 0.7217922807
+ 0.7564306259 0.7651224136 0.7224674821
+ 0.7570430040 0.7657516003 0.7231383920
+ 0.7576547265 0.7663797736 0.7238079906
+ 0.7582663894 0.7670078874 0.7244775295
+ 0.7588763237 0.7676342130 0.7251446843
+ 0.7594832778 0.7682573199 0.7258080840
+ 0.7600904107 0.7688804269 0.7264714837
+ 0.7606974244 0.7695034742 0.7271348238
+ 0.7613009214 0.7701197863 0.7277917266
+ 0.7619044185 0.7707359791 0.7284486294
+ 0.7625079155 0.7713521719 0.7291054130
+ 0.7631099820 0.7719650865 0.7297595143
+ 0.7637109756 0.7725753188 0.7304114103
+ 0.7643120885 0.7731856108 0.7310634255
+ 0.7649124265 0.7737953067 0.7317147851
+ 0.7655079961 0.7744010091 0.7323616743
+ 0.7661035061 0.7750065923 0.7330086827
+ 0.7666990757 0.7756121755 0.7336556911
+ 0.7672913074 0.7762138247 0.7342997193
+ 0.7678816915 0.7768129110 0.7349420190
+ 0.7684720755 0.7774121165 0.7355843782
+ 0.7690622211 0.7780106068 0.7362260818
+ 0.7696506977 0.7786043286 0.7368643284
+ 0.7702391148 0.7791979909 0.7375025153
+ 0.7708275914 0.7797915936 0.7381407022
+ 0.7714130878 0.7803828716 0.7387762070
+ 0.7719966769 0.7809723020 0.7394099236
+ 0.7725803256 0.7815617919 0.7400435805
+ 0.7731636167 0.7821511030 0.7406771779
+ 0.7737426162 0.7827333808 0.7413080931
+ 0.7743214965 0.7833157182 0.7419390082
+ 0.7749004960 0.7838979959 0.7425699234
+ 0.7754787803 0.7844783068 0.7431989908
+ 0.7760564089 0.7850558758 0.7438256741
+ 0.7766339779 0.7856335044 0.7444524765
+ 0.7772114873 0.7862110734 0.7450792193
+ 0.7777854800 0.7867867947 0.7457013726
+ 0.7783586979 0.7873620987 0.7463225126
+ 0.7789319158 0.7879372835 0.7469435930
+ 0.7795041800 0.7885116935 0.7475640774
+ 0.7800722718 0.7890805006 0.7481812835
+ 0.7806403041 0.7896494269 0.7487984896
+ 0.7812082767 0.7902181745 0.7494155765
+ 0.7817749977 0.7907847166 0.7500311732
+ 0.7823402286 0.7913483977 0.7506451011
+ 0.7829053998 0.7919120193 0.7512589097
+ 0.7834705114 0.7924757004 0.7518727779
+ 0.7840328813 0.7930366993 0.7524824739
+ 0.7845944762 0.7935966849 0.7530907989
+ 0.7851560116 0.7941566706 0.7536991239
+ 0.7857174277 0.7947167158 0.7543073297
+ 0.7862744927 0.7952712178 0.7549107075
+ 0.7868316174 0.7958257794 0.7555140853
+ 0.7873886824 0.7963802814 0.7561174035
+ 0.7879452109 0.7969337106 0.7567198277
+ 0.7885001898 0.7974827886 0.7573189139
+ 0.7890551090 0.7980319858 0.7579178810
+ 0.7896100283 0.7985811234 0.7585170269
+ 0.7901636958 0.7991284132 0.7591142058
+ 0.7907155752 0.7996730208 0.7597088218
+ 0.7912675738 0.8002175093 0.7603033781
+ 0.7918195128 0.8007619977 0.7608978748
+ 0.7923693061 0.8013039827 0.7614898086
+ 0.7929174900 0.8018441200 0.7620797753
+ 0.7934656739 0.8023841977 0.7626696825
+ 0.7940139174 0.8029242754 0.7632595897
+ 0.7945610285 0.8034613729 0.7638459802
+ 0.7951077223 0.8039970994 0.7644308209
+ 0.7956544161 0.8045328259 0.7650157213
+ 0.7962012291 0.8050686121 0.7656006217
+ 0.7967458963 0.8056014776 0.7661811709
+ 0.7972903252 0.8061336279 0.7667608261
+ 0.7978346944 0.8066657186 0.7673404217
+ 0.7983791232 0.8071978092 0.7679200172
+ 0.7989180088 0.8077269793 0.7684965134
+ 0.7994561791 0.8082556725 0.7690725923
+ 0.7999945283 0.8087844253 0.7696486115
+ 0.8005326986 0.8093131185 0.7702246904
+ 0.8010672927 0.8098369837 0.7707965970
+ 0.8016015887 0.8103603125 0.7713679075
+ 0.8021358848 0.8108835816 0.7719392776
+ 0.8026701808 0.8114069104 0.7725105882
+ 0.8032029867 0.8119258285 0.7730767131
+ 0.8037356138 0.8124440908 0.7736421227
+ 0.8042681813 0.8129622936 0.7742075920
+ 0.8048008084 0.8134806156 0.7747730017
+ 0.8053286076 0.8139951825 0.7753348947
+ 0.8058556914 0.8145089746 0.7758960724
+ 0.8063827753 0.8150228262 0.7764574289
+ 0.8069099188 0.8155366182 0.7770186067
+ 0.8074336052 0.8160470128 0.7775772214
+ 0.8079562783 0.8165563941 0.7781350017
+ 0.8084790707 0.8170658946 0.7786927819
+ 0.8090019226 0.8175752759 0.7792506218
+ 0.8095226288 0.8180813193 0.7798048258
+ 0.8100423813 0.8185856938 0.7803573012
+ 0.8105623126 0.8190901279 0.7809098959
+ 0.8110821247 0.8195945024 0.7814623713
+ 0.8115993142 0.8200960755 0.7820122838
+ 0.8121144772 0.8205952048 0.7825602293
+ 0.8126296997 0.8210942745 0.7831079960
+ 0.8131449819 0.8215934038 0.7836558223
+ 0.8136587739 0.8220912814 0.7842022181
+ 0.8141704798 0.8225870728 0.7847461104
+ 0.8146821260 0.8230829239 0.7852900028
+ 0.8151937723 0.8235787153 0.7858338952
+ 0.8157051206 0.8240739107 0.7863767743
+ 0.8162146807 0.8245658278 0.7869150043
+ 0.8167243004 0.8250576854 0.7874531150
+ 0.8172338009 0.8255496025 0.7879912853
+ 0.8177434206 0.8260415196 0.7885295153
+ 0.8182494044 0.8265284896 0.7890629172
+ 0.8187550902 0.8270152211 0.7895959020
+ 0.8192608953 0.8275017738 0.7901288867
+ 0.8197665811 0.8279885054 0.7906618714
+ 0.8202685714 0.8284724951 0.7911921144
+ 0.8207687140 0.8289551139 0.7917206883
+ 0.8212687969 0.8294377923 0.7922493219
+ 0.8217688799 0.8299204111 0.7927778959
+ 0.8222674727 0.8304020762 0.7933050990
+ 0.8227633834 0.8308820724 0.7938293219
+ 0.8232592940 0.8313620090 0.7943534851
+ 0.8237550855 0.8318418860 0.7948777080
+ 0.8242509961 0.8323218822 0.7954018712
+ 0.8247438073 0.8327968717 0.7959234715
+ 0.8252366185 0.8332718015 0.7964450121
+ 0.8257294297 0.8337466717 0.7969664931
+ 0.8262221813 0.8342216015 0.7974880934
+ 0.8267118931 0.8346939087 0.7980074286
+ 0.8271998763 0.8351643085 0.7985252738
+ 0.8276877999 0.8356347084 0.7990432978
+ 0.8281757832 0.8361051083 0.7995612025
+ 0.8286628127 0.8365753293 0.8000785112
+ 0.8291462064 0.8370444179 0.8005927205
+ 0.8296297193 0.8375133872 0.8011069894
+ 0.8301131129 0.8379824162 0.8016213179
+ 0.8305966258 0.8384515047 0.8021355867
+ 0.8310769796 0.8389179111 0.8026489019
+ 0.8315563798 0.8393831849 0.8031619191
+ 0.8320357800 0.8398485780 0.8036748767
+ 0.8325151801 0.8403139114 0.8041878939
+ 0.8329936266 0.8407778740 0.8047001958
+ 0.8334690928 0.8412373066 0.8052101731
+ 0.8339444995 0.8416966200 0.8057203293
+ 0.8344200253 0.8421559930 0.8062303066
+ 0.8348953724 0.8426154256 0.8067402840
+ 0.8353682756 0.8430727124 0.8072487116
+ 0.8358402252 0.8435291052 0.8077564240
+ 0.8363121152 0.8439856172 0.8082640767
+ 0.8367841244 0.8444420099 0.8087717295
+ 0.8372554779 0.8448981047 0.8092792034
+ 0.8377242088 0.8453521729 0.8097851276
+ 0.8381929994 0.8458061814 0.8102909923
+ 0.8386617899 0.8462603092 0.8107969165
+ 0.8391305208 0.8467143774 0.8113027811
+ 0.8395975828 0.8471655250 0.8118069172
+ 0.8400632739 0.8476139903 0.8123093247
+ 0.8405290246 0.8480623960 0.8128117919
+ 0.8409947157 0.8485109210 0.8133143187
+ 0.8414604068 0.8489593863 0.8138167858
+ 0.8419228196 0.8494048715 0.8143168092
+ 0.8423848748 0.8498501182 0.8148164153
+ 0.8428469896 0.8502953053 0.8153160214
+ 0.8433091044 0.8507404923 0.8158156872
+ 0.8437703252 0.8511855006 0.8163148761
+ 0.8442285061 0.8516296744 0.8168122768
+ 0.8446866274 0.8520739079 0.8173096180
+ 0.8451448083 0.8525180817 0.8178070188
+ 0.8456029892 0.8529623151 0.8183044195
+ 0.8460600972 0.8534045219 0.8187999129
+ 0.8465161920 0.8538445234 0.8192933798
+ 0.8469722867 0.8542845249 0.8197870255
+ 0.8474283814 0.8547245860 0.8202804923
+ 0.8478844166 0.8551645875 0.8207740188
+ 0.8483386040 0.8556007147 0.8212651014
+ 0.8487920165 0.8560351133 0.8217552900
+ 0.8492454290 0.8564695120 0.8222454786
+ 0.8496989012 0.8569039702 0.8227357268
+ 0.8501523137 0.8573384285 0.8232259154
+ 0.8506020904 0.8577691913 0.8237136006
+ 0.8510516286 0.8581997156 0.8242009878
+ 0.8515011072 0.8586301804 0.8246884942
+ 0.8519507051 0.8590605855 0.8251760006
+ 0.8523998260 0.8594908714 0.8256632090
+ 0.8528448939 0.8599187136 0.8261479735
+ 0.8532899022 0.8603464961 0.8266327977
+ 0.8537350297 0.8607742786 0.8271176219
+ 0.8541800976 0.8612021208 0.8276023865
+ 0.8546246290 0.8616291285 0.8280869722
+ 0.8550670743 0.8620529175 0.8285707831
+ 0.8555095792 0.8624767065 0.8290544748
+ 0.8559520245 0.8629004955 0.8295382261
+ 0.8563945293 0.8633242249 0.8300219178
+ 0.8568360806 0.8637471199 0.8305050731
+ 0.8572757244 0.8641673923 0.8309867978
+ 0.8577153087 0.8645877838 0.8314685225
+ 0.8581547737 0.8650081158 0.8319501877
+ 0.8585944176 0.8654283881 0.8324319124
+ 0.8590329289 0.8658478856 0.8329126835
+ 0.8594689965 0.8662654161 0.8333914876
+ 0.8599051237 0.8666828871 0.8338704109
+ 0.8603413105 0.8671004176 0.8343492150
+ 0.8607773781 0.8675178885 0.8348280191
+ 0.8612130284 0.8679342270 0.8353064060
+ 0.8616474867 0.8683475852 0.8357838988
+ 0.8620818853 0.8687611222 0.8362613916
+ 0.8625164032 0.8691744804 0.8367388844
+ 0.8629509211 0.8695878983 0.8372163773
+ 0.8633844852 0.8700003028 0.8376932740
+ 0.8638160825 0.8704100251 0.8381686211
+ 0.8642476797 0.8708196878 0.8386437893
+ 0.8646792769 0.8712294102 0.8391190767
+ 0.8651108742 0.8716390729 0.8395944238
+ 0.8655416965 0.8720481992 0.8400691152
+ 0.8659693003 0.8724551201 0.8405413032
+ 0.8663967848 0.8728619218 0.8410134912
+ 0.8668243885 0.8732687235 0.8414856791
+ 0.8672518730 0.8736755252 0.8419578075
+ 0.8676794171 0.8740822077 0.8424299955
+ 0.8681045771 0.8744865060 0.8429005742
+ 0.8685297966 0.8748908043 0.8433712125
+ 0.8689550161 0.8752951026 0.8438417912
+ 0.8693801761 0.8756992817 0.8443124890
+ 0.8698053956 0.8761035800 0.8447831273
+ 0.8702281117 0.8765046000 0.8452516198
+ 0.8706504107 0.8769050241 0.8457198143
+ 0.8710728288 0.8773053885 0.8461880088
+ 0.8714951277 0.8777058125 0.8466562033
+ 0.8719174862 0.8781061769 0.8471243978
+ 0.8723371029 0.8785045147 0.8475905061
+ 0.8727555275 0.8789016008 0.8480554223
+ 0.8731737733 0.8792986870 0.8485202789
+ 0.8735920787 0.8796957731 0.8489853144
+ 0.8740105033 0.8800929785 0.8494501710
+ 0.8744276166 0.8804891109 0.8499143720
+ 0.8748430014 0.8808835745 0.8503776193
+ 0.8752583861 0.8812779784 0.8508408070
+ 0.8756737709 0.8816725016 0.8513038754
+ 0.8760892153 0.8820670247 0.8517671227
+ 0.8765044212 0.8824610710 0.8522300124
+ 0.8769180179 0.8828517199 0.8526905179
+ 0.8773316145 0.8832423091 0.8531510830
+ 0.8777452111 0.8836328983 0.8536115885
+ 0.8781588078 0.8840234280 0.8540722132
+ 0.8785724044 0.8844140172 0.8545327187
+ 0.8789830208 0.8848019242 0.8549907207
+ 0.8793928027 0.8851888776 0.8554478288
+ 0.8798025250 0.8855758905 0.8559048772
+ 0.8802123070 0.8859630227 0.8563619852
+ 0.8806220293 0.8863499761 0.8568190932
+ 0.8810304999 0.8867359757 0.8572754264
+ 0.8814368844 0.8871203065 0.8577305079
+ 0.8818433285 0.8875045180 0.8581857085
+ 0.8822497725 0.8878887892 0.8586407900
+ 0.8826562166 0.8882731199 0.8590958714
+ 0.8830626011 0.8886573911 0.8595510125
+ 0.8834682703 0.8890393972 0.8600043058
+ 0.8838739991 0.8894212842 0.8604574800
+ 0.8842797279 0.8898031712 0.8609105945
+ 0.8846853971 0.8901851177 0.8613638282
+ 0.8850911260 0.8905668855 0.8618170023
+ 0.8854956031 0.8909478784 0.8622695208
+ 0.8858984709 0.8913276792 0.8627213240
+ 0.8863015175 0.8917074800 0.8631731272
+ 0.8867045045 0.8920872808 0.8636248708
+ 0.8871074915 0.8924670815 0.8640766740
+ 0.8875104785 0.8928470016 0.8645284772
+ 0.8879091144 0.8932240009 0.8649795055
+ 0.8883073926 0.8936008811 0.8654304147
+ 0.8887057900 0.8939777017 0.8658813238
+ 0.8891041279 0.8943545818 0.8663321733
+ 0.8895024061 0.8947314024 0.8667832017
+ 0.8899000287 0.8951069117 0.8672332168
+ 0.8902962208 0.8954799175 0.8676818013
+ 0.8906924725 0.8958529830 0.8681303263
+ 0.8910887241 0.8962259889 0.8685787916
+ 0.8914849162 0.8965989947 0.8690273166
+ 0.8918812275 0.8969720006 0.8694759011
+ 0.8922762275 0.8973435163 0.8699231148
+ 0.8926709294 0.8977146149 0.8703697920
+ 0.8930655122 0.8980855942 0.8708165288
+ 0.8934602141 0.8984566927 0.8712632060
+ 0.8938547969 0.8988276720 0.8717098832
+ 0.8942492008 0.8991985917 0.8721565008
+ 0.8946403265 0.8995674253 0.8726019263
+ 0.8950313926 0.8999361992 0.8730471730
+ 0.8954225779 0.9003049731 0.8734925985
+ 0.8958137035 0.9006738067 0.8739380240
+ 0.8962048292 0.9010425806 0.8743833899
+ 0.8965950012 0.9014102817 0.8748276830
+ 0.8969836235 0.9017760158 0.8752703071
+ 0.8973723054 0.9021416903 0.8757128716
+ 0.8977609277 0.9025074244 0.8761554956
+ 0.8981494904 0.9028730989 0.8765981197
+ 0.8985381126 0.9032387733 0.8770406246
+ 0.8989257812 0.9036024809 0.8774818182
+ 0.8993129730 0.9039648175 0.8779221773
+ 0.8997001052 0.9043270946 0.8783624768
+ 0.9000871778 0.9046893716 0.8788027763
+ 0.9004744291 0.9050518274 0.8792430758
+ 0.9008615017 0.9054141045 0.8796833754
+ 0.9012458920 0.9057751894 0.8801223040
+ 0.9016296864 0.9061359763 0.8805608749
+ 0.9020134211 0.9064968824 0.8809995055
+ 0.9023972154 0.9068577290 0.8814380169
+ 0.9027810097 0.9072185159 0.8818765879
+ 0.9031646848 0.9075793028 0.8823152184
+ 0.9035456777 0.9079378843 0.8827506900
+ 0.9039264917 0.9082962871 0.8831861019
+ 0.9043073058 0.9086548090 0.8836215138
+ 0.9046881795 0.9090132117 0.8840568066
+ 0.9050689936 0.9093716741 0.8844922185
+ 0.9054498076 0.9097300172 0.8849275112
+ 0.9058302045 0.9100852013 0.8853601813
+ 0.9062106013 0.9104403853 0.8857929111
+ 0.9065908790 0.9107956290 0.8862255812
+ 0.9069712758 0.9111508727 0.8866581917
+ 0.9073516726 0.9115061164 0.8870909214
+ 0.9077318907 0.9118611813 0.8875234127
+ 0.9081099033 0.9122149944 0.8879539967
+ 0.9084879756 0.9125688076 0.8883845210
+ 0.9088661075 0.9129226208 0.8888149858
+ 0.9092441201 0.9132763743 0.8892456293
+ 0.9096221924 0.9136301875 0.8896760941
+ 0.9099997878 0.9139838219 0.8901063204
+ 0.9103738070 0.9143360257 0.8905333281
+ 0.9107477069 0.9146881104 0.8909602761
+ 0.9111216068 0.9150401950 0.8913872838
+ 0.9114955068 0.9153922796 0.8918141723
+ 0.9118694067 0.9157444239 0.8922411799
+ 0.9122431874 0.9160963893 0.8926680088
+ 0.9126154184 0.9164451957 0.8930919170
+ 0.9129875898 0.9167940021 0.8935158253
+ 0.9133598208 0.9171428084 0.8939396739
+ 0.9137319922 0.9174916148 0.8943635821
+ 0.9141042233 0.9178404212 0.8947874904
+ 0.9144763947 0.9181892276 0.8952113986
+ 0.9148473740 0.9185342193 0.8956335783
+ 0.9152182937 0.9188787937 0.8960558176
+ 0.9155892134 0.9192234874 0.8964778781
+ 0.9159600735 0.9195681214 0.8969001174
+ 0.9163309932 0.9199128151 0.8973221779
+ 0.9167019725 0.9202573895 0.8977444172
+ 0.9170697927 0.9206014276 0.8981651068
+ 0.9174367785 0.9209452271 0.8985853791
+ 0.9178038836 0.9212889075 0.8990057111
+ 0.9181709290 0.9216327071 0.8994259834
+ 0.9185379148 0.9219765067 0.8998463750
+ 0.9189050198 0.9223201871 0.9002667069
+ 0.9192699194 0.9226629734 0.9006865025
+ 0.9196335077 0.9230049849 0.9011059999
+ 0.9199969769 0.9233471155 0.9015253782
+ 0.9203606248 0.9236891270 0.9019448757
+ 0.9207240939 0.9240310788 0.9023643732
+ 0.9210876226 0.9243732095 0.9027838111
+ 0.9214507937 0.9247142076 0.9032027721
+ 0.9218133092 0.9250528812 0.9036207795
+ 0.9221758246 0.9253916144 0.9040387273
+ 0.9225382209 0.9257302880 0.9044566751
+ 0.9229006767 0.9260690212 0.9048746824
+ 0.9232631922 0.9264076948 0.9052925706
+ 0.9236255884 0.9267463088 0.9057105780
+ 0.9239851832 0.9270828962 0.9061275721
+ 0.9243447781 0.9274194837 0.9065446854
+ 0.9247043729 0.9277560115 0.9069616795
+ 0.9250640273 0.9280925989 0.9073787928
+ 0.9254236221 0.9284291863 0.9077957869
+ 0.9257832170 0.9287657142 0.9082127810
+ 0.9261407256 0.9291017056 0.9086294770
+ 0.9264971018 0.9294372797 0.9090461135
+ 0.9268534780 0.9297729135 0.9094625711
+ 0.9272099137 0.9301084876 0.9098792076
+ 0.9275662899 0.9304441214 0.9102957249
+ 0.9279227257 0.9307796955 0.9107123017
+ 0.9282786846 0.9311146736 0.9111282825
+ 0.9286336899 0.9314478040 0.9115430117
+ 0.9289886951 0.9317808747 0.9119576216
+ 0.9293437004 0.9321138859 0.9123722911
+ 0.9296985865 0.9324470162 0.9127869010
+ 0.9300535917 0.9327800870 0.9132015705
+ 0.9304085970 0.9331132174 0.9136161804
+ 0.9307621717 0.9334436059 0.9140297771
+ 0.9311155081 0.9337733984 0.9144430757
+ 0.9314687252 0.9341030717 0.9148563743
+ 0.9318218827 0.9344329238 0.9152696729
+ 0.9321752191 0.9347625971 0.9156829715
+ 0.9325283766 0.9350923896 0.9160963297
+ 0.9328805208 0.9354220033 0.9165095091
+ 0.9332295060 0.9357516170 0.9169226885
+ 0.9335784912 0.9360811114 0.9173358083
+ 0.9339274764 0.9364106059 0.9177489877
+ 0.9342765212 0.9367401004 0.9181622267
+ 0.9346253872 0.9370697141 0.9185752869
+ 0.9349743724 0.9373992085 0.9189885259
+ 0.9353216887 0.9377279878 0.9194009900
+ 0.9356681705 0.9380565286 0.9198130965
+ 0.9360147715 0.9383850098 0.9202253222
+ 0.9363613129 0.9387134910 0.9206374884
+ 0.9367079139 0.9390419722 0.9210495949
+ 0.9370543957 0.9393705130 0.9214618206
+ 0.9374008775 0.9396988153 0.9218738079
+ 0.9377468228 0.9400240183 0.9222841263
+ 0.9380925894 0.9403492212 0.9226943851
+ 0.9384384751 0.9406743050 0.9231047034
+ 0.9387843013 0.9409995079 0.9235150218
+ 0.9391301870 0.9413247108 0.9239252806
+ 0.9394760728 0.9416499138 0.9243355989
+ 0.9398207068 0.9419735074 0.9247456193
+ 0.9401633739 0.9422945976 0.9251552224
+ 0.9405061007 0.9426156878 0.9255648851
+ 0.9408488274 0.9429367781 0.9259744883
+ 0.9411916137 0.9432579875 0.9263840914
+ 0.9415342808 0.9435790777 0.9267938137
+ 0.9418770075 0.9439002275 0.9272034168
+ 0.9422174096 0.9442206025 0.9276124835
+ 0.9425566196 0.9445406795 0.9280213118
+ 0.9428958297 0.9448608160 0.9284300804
+ 0.9432349801 0.9451808929 0.9288390279
+ 0.9435741901 0.9455009103 0.9292477965
+ 0.9439134002 0.9458209872 0.9296566248
+ 0.9442526102 0.9461411238 0.9300655127
+ 0.9445902705 0.9464595914 0.9304733276
+ 0.9449278116 0.9467778802 0.9308810234
+ 0.9452651739 0.9470962286 0.9312887192
+ 0.9456027150 0.9474143982 0.9316964149
+ 0.9459400773 0.9477326870 0.9321041107
+ 0.9462776184 0.9480509758 0.9325118065
+ 0.9466149807 0.9483692050 0.9329195023
+ 0.9469503760 0.9486842155 0.9333260059
+ 0.9472857118 0.9489991069 0.9337323904
+ 0.9476211071 0.9493141174 0.9341388941
+ 0.9479565024 0.9496291280 0.9345452785
+ 0.9482918978 0.9499440193 0.9349517822
+ 0.9486272931 0.9502589703 0.9353582263
+ 0.9489622712 0.9505736828 0.9357644916
+ 0.9492946267 0.9508864880 0.9361696243
+ 0.9496268034 0.9511991739 0.9365745783
+ 0.9499590993 0.9515119791 0.9369797111
+ 0.9502912760 0.9518247843 0.9373847842
+ 0.9506235719 0.9521374702 0.9377897978
+ 0.9509558082 0.9524502754 0.9381948709
+ 0.9512878060 0.9527629018 0.9385995269
+ 0.9516180754 0.9530745149 0.9390019178
+ 0.9519485235 0.9533861876 0.9394041896
+ 0.9522787929 0.9536978006 0.9398065209
+ 0.9526091218 0.9540094733 0.9402087927
+ 0.9529393911 0.9543210864 0.9406111836
+ 0.9532697797 0.9546328187 0.9410135150
+ 0.9535998702 0.9549441934 0.9414151907
+ 0.9539285898 0.9552533031 0.9418125749
+ 0.9542574286 0.9555622935 0.9422100186
+ 0.9545860887 0.9558714032 0.9426074028
+ 0.9549148083 0.9561805129 0.9430047870
+ 0.9552435875 0.9564896226 0.9434021711
+ 0.9555723071 0.9567986727 0.9437994957
+ 0.9559007883 0.9571076035 0.9441967010
+ 0.9562236071 0.9574112892 0.9445887208
+ 0.9565463066 0.9577149749 0.9449806213
+ 0.9568691254 0.9580187798 0.9453725219
+ 0.9571918845 0.9583225250 0.9457644224
+ 0.9575145841 0.9586262107 0.9461563230
+ 0.9578374028 0.9589298964 0.9465482235
+ 0.9581602216 0.9592335820 0.9469401240
+ 0.9584769011 0.9595324993 0.9473283291
+ 0.9587929249 0.9598308802 0.9477159977
+ 0.9591090083 0.9601292014 0.9481037259
+ 0.9594249725 0.9604275823 0.9484915137
+ 0.9597409964 0.9607260227 0.9488791823
+ 0.9600570798 0.9610242844 0.9492670298
+ 0.9603731036 0.9613227248 0.9496546984
+ 0.9606860280 0.9616187215 0.9500409961
+ 0.9609975219 0.9619138241 0.9504266977
+ 0.9613090158 0.9622088075 0.9508125186
+ 0.9616205096 0.9625037909 0.9511982203
+ 0.9619320035 0.9627988935 0.9515839219
+ 0.9622434974 0.9630938768 0.9519696236
+ 0.9625549912 0.9633889198 0.9523553848
+ 0.9628651738 0.9636827707 0.9527397752
+ 0.9631738067 0.9639751911 0.9531226158
+ 0.9634823203 0.9642676115 0.9535053968
+ 0.9637908936 0.9645599127 0.9538881183
+ 0.9640994072 0.9648522735 0.9542708993
+ 0.9644079804 0.9651446939 0.9546536803
+ 0.9647164941 0.9654371142 0.9550365210
+ 0.9650247097 0.9657291174 0.9554188848
+ 0.9653298855 0.9660187960 0.9557983279
+ 0.9656351805 0.9663084149 0.9561777711
+ 0.9659404755 0.9665980935 0.9565572739
+ 0.9662457705 0.9668877721 0.9569367170
+ 0.9665510058 0.9671773911 0.9573162198
+ 0.9668563008 0.9674671292 0.9576957226
+ 0.9671615958 0.9677568078 0.9580751061
+ 0.9674646854 0.9680448771 0.9584522843
+ 0.9677671194 0.9683324099 0.9588286877
+ 0.9680693746 0.9686200023 0.9592050910
+ 0.9683718085 0.9689074755 0.9595814943
+ 0.9686741829 0.9691951275 0.9599578977
+ 0.9689764977 0.9694827199 0.9603341818
+ 0.9692788720 0.9697701931 0.9607105851
+ 0.9695801735 0.9700570107 0.9610859156
+ 0.9698789120 0.9703419209 0.9614585042
+ 0.9701775908 0.9706267715 0.9618310928
+ 0.9704763889 0.9709116817 0.9622036815
+ 0.9707751274 0.9711965919 0.9625763297
+ 0.9710738063 0.9714813828 0.9629489183
+ 0.9713726044 0.9717662930 0.9633215070
+ 0.9716712832 0.9720512033 0.9636940956
+ 0.9719662070 0.9723331928 0.9640635252
+ 0.9722601175 0.9726145267 0.9644321799
+ 0.9725540876 0.9728958011 0.9648008943
+ 0.9728481174 0.9731770754 0.9651694894
+ 0.9731420279 0.9734582901 0.9655382037
+ 0.9734359980 0.9737396240 0.9659067988
+ 0.9737300277 0.9740208983 0.9662755132
+ 0.9740229845 0.9743015170 0.9666432738
+ 0.9743129015 0.9745799899 0.9670084119
+ 0.9746028185 0.9748585820 0.9673733711
+ 0.9748927951 0.9751371145 0.9677385092
+ 0.9751827121 0.9754155874 0.9681035280
+ 0.9754726887 0.9756941199 0.9684686065
+ 0.9757626057 0.9759727120 0.9688336253
+ 0.9760525823 0.9762511849 0.9691987038
+ 0.9763398170 0.9765279293 0.9695615172
+ 0.9766253829 0.9768033028 0.9699230194
+ 0.9769108891 0.9770787954 0.9702845216
+ 0.9771965146 0.9773542285 0.9706460238
+ 0.9774820209 0.9776297212 0.9710075259
+ 0.9777675867 0.9779050946 0.9713690281
+ 0.9780532122 0.9781805873 0.9717304707
+ 0.9783387184 0.9784560204 0.9720919132
+ 0.9786192775 0.9787276983 0.9724497199
+ 0.9788995981 0.9789990783 0.9728072286
+ 0.9791797996 0.9792703986 0.9731646776
+ 0.9794600010 0.9795417786 0.9735221267
+ 0.9797403216 0.9798130989 0.9738795757
+ 0.9800205231 0.9800844789 0.9742370844
+ 0.9803007245 0.9803557992 0.9745944738
+ 0.9805799723 0.9806264043 0.9749512076
+ 0.9808548093 0.9808933139 0.9753037095
+ 0.9811295867 0.9811602235 0.9756562710
+ 0.9814044237 0.9814270735 0.9760088921
+ 0.9816792011 0.9816939831 0.9763615131
+ 0.9819539785 0.9819608927 0.9767140150
+ 0.9822288752 0.9822278023 0.9770665765
+ 0.9825037122 0.9824947119 0.9774191976
+ 0.9827765226 0.9827601910 0.9777697921
+ 0.9830456972 0.9830228090 0.9781169295
+ 0.9833148718 0.9832854867 0.9784640074
+ 0.9835842252 0.9835482240 0.9788110256
+ 0.9838533998 0.9838109016 0.9791581035
+ 0.9841225743 0.9840735197 0.9795051813
+ 0.9843918085 0.9843361974 0.9798521996
+ 0.9846609831 0.9845988750 0.9801992774
+ 0.9849274158 0.9848592281 0.9805430770
+ 0.9851905704 0.9851167798 0.9808833003
+ 0.9854537249 0.9853743911 0.9812235236
+ 0.9857168794 0.9856320024 0.9815636277
+ 0.9859799743 0.9858896136 0.9819037914
+ 0.9862431884 0.9861472249 0.9822440147
+ 0.9865062833 0.9864048958 0.9825841188
+ 0.9867694974 0.9866625071 0.9829242826
+ 0.9870293140 0.9869173169 0.9832602739
+ 0.9872860909 0.9871696234 0.9835925102
+ 0.9875429273 0.9874218702 0.9839246869
+ 0.9877997041 0.9876741767 0.9842569232
+ 0.9880564809 0.9879264832 0.9845890999
+ 0.9883133173 0.9881787896 0.9849212766
+ 0.9885700941 0.9884310961 0.9852535129
+ 0.9888268709 0.9886834025 0.9855856895
+ 0.9890797734 0.9889330268 0.9859133959
+ 0.9893288016 0.9891800284 0.9862366915
+ 0.9895778894 0.9894269109 0.9865599871
+ 0.9898269176 0.9896739125 0.9868832827
+ 0.9900760055 0.9899207950 0.9872065783
+ 0.9903249741 0.9901676774 0.9875298738
+ 0.9905740023 0.9904146791 0.9878532290
+ 0.9908230901 0.9906616211 0.9881765246
+ 0.9910683036 0.9909055829 0.9884948134
+ 0.9913083911 0.9911454916 0.9888063073
+ 0.9915484786 0.9913855195 0.9891179204
+ 0.9917885065 0.9916254282 0.9894294143
+ 0.9920285940 0.9918652773 0.9897409081
+ 0.9922686219 0.9921053052 0.9900524020
+ 0.9925087094 0.9923452139 0.9903638959
+ 0.9927487969 0.9925851822 0.9906755090
+ 0.9929866791 0.9928228855 0.9909834266
+ 0.9932188988 0.9930546284 0.9912818074
+ 0.9934511185 0.9932863712 0.9915801883
+ 0.9936832786 0.9935181141 0.9918786883
+ 0.9939156175 0.9937499166 0.9921771288
+ 0.9941477776 0.9939817190 0.9924755096
+ 0.9943799973 0.9942134023 0.9927738905
+ 0.9946122169 0.9944452047 0.9930723906
+ 0.9948437810 0.9946765900 0.9933699965
+ 0.9950650930 0.9949020743 0.9936543703
+ 0.9952864051 0.9951274991 0.9939388037
+ 0.9955077171 0.9953529835 0.9942231178
+ 0.9957290292 0.9955784082 0.9945074916
+ 0.9959502816 0.9958038926 0.9947919250
+ 0.9961715937 0.9960293770 0.9950762987
+ 0.9963929057 0.9962548018 0.9953606725
+ 0.9966142178 0.9964802861 0.9956451058
+ 0.9968237877 0.9966976047 0.9959148765
+ 0.9970299006 0.9969125986 0.9961804748
+ 0.9972360730 0.9971275926 0.9964460731
+ 0.9974421859 0.9973425865 0.9967116117
+ 0.9976484179 0.9975575209 0.9969772100
+ 0.9978544712 0.9977725148 0.9972428083
+ 0.9980607033 0.9979875088 0.9975084066
+ 0.9982668161 0.9982025027 0.9977738857
+ 0.9984667897 0.9984105825 0.9980313182
+ 0.9986584783 0.9986093044 0.9982774258
+ 0.9988501072 0.9988079071 0.9985234737
+ 0.9990417957 0.9990066290 0.9987695813
+ 0.9992334247 0.9992052913 0.9990156293
+ 0.9994251132 0.9994040132 0.9992616773
+ 0.9996166825 0.9996026158 0.9995077848
+ 0.9998083711 0.9998012781 0.9997538924
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_optima_ii_100.spi1d b/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_optima_ii_100.spi1d
new file mode 100644
index 00000000000..8a56fcf0ff5
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_optima_ii_100.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0076661762 0.0083268499 0.0068440801
+ 0.0158262700 0.0170417801 0.0131509099
+ 0.0232411809 0.0250322502 0.0190004501
+ 0.0300489496 0.0323281400 0.0244449992
+ 0.0363852791 0.0390635394 0.0295583308
+ 0.0423460715 0.0453425013 0.0343772098
+ 0.0479932986 0.0512349084 0.0389431007
+ 0.0533834286 0.0567868613 0.0432897806
+ 0.0585362613 0.0620452613 0.0474547893
+ 0.0634827465 0.0670664310 0.0514379889
+ 0.0682476535 0.0719086230 0.0552622713
+ 0.0728643686 0.0766109228 0.0590022616
+ 0.0773498490 0.0812185779 0.0626629591
+ 0.0817248896 0.0857366771 0.0662265718
+ 0.0860022604 0.0901816636 0.0696830973
+ 0.0901876912 0.0945459083 0.0730567127
+ 0.0942838192 0.0988429263 0.0763788819
+ 0.0983011201 0.1030735970 0.0796598792
+ 0.1022287980 0.1072389036 0.0828902796
+ 0.1060905010 0.1113395020 0.0860634297
+ 0.1098807007 0.1153889000 0.0891731530
+ 0.1136023998 0.1193716973 0.0922177732
+ 0.1172552034 0.1232964024 0.0952064171
+ 0.1208416000 0.1271591038 0.0981551483
+ 0.1243667975 0.1309625953 0.1010731980
+ 0.1278326958 0.1347209960 0.1039592028
+ 0.1312370002 0.1384246945 0.1068119034
+ 0.1345919073 0.1420657933 0.1096345037
+ 0.1378999949 0.1456594020 0.1124313995
+ 0.1411581933 0.1492089927 0.1151997000
+ 0.1443776041 0.1527009010 0.1179367006
+ 0.1475483030 0.1561467052 0.1206402034
+ 0.1506752074 0.1595402956 0.1233116984
+ 0.1537552029 0.1628801972 0.1259557009
+ 0.1567965001 0.1661709994 0.1285720021
+ 0.1598031074 0.1694162935 0.1311601996
+ 0.1627652049 0.1726270020 0.1337202936
+ 0.1656907946 0.1757915020 0.1362521052
+ 0.1685829014 0.1789050996 0.1387566030
+ 0.1714359969 0.1819735020 0.1412398964
+ 0.1742600948 0.1850046962 0.1437025964
+ 0.1770537049 0.1879996955 0.1461455971
+ 0.1798166037 0.1909551024 0.1485693008
+ 0.1825578958 0.1938706934 0.1509743035
+ 0.1852674037 0.1967559010 0.1533614993
+ 0.1879525036 0.1996030957 0.1557313949
+ 0.1906042993 0.2024182975 0.1580837965
+ 0.1932311952 0.2052014023 0.1604201049
+ 0.1958318949 0.2079581022 0.1627393067
+ 0.1984055936 0.2106810957 0.1650432050
+ 0.2009532005 0.2133824974 0.1673322022
+ 0.2034747005 0.2160581946 0.1696034074
+ 0.2059706002 0.2187004983 0.1718567014
+ 0.2084430009 0.2213200927 0.1740909964
+ 0.2108965069 0.2239086032 0.1763089001
+ 0.2133263052 0.2264758050 0.1785116047
+ 0.2157393992 0.2290169001 0.1806990951
+ 0.2181292027 0.2315327972 0.1828715056
+ 0.2205027044 0.2340238988 0.1850311011
+ 0.2228585035 0.2364936024 0.1871781945
+ 0.2251935005 0.2389385998 0.1893118024
+ 0.2275121957 0.2413554937 0.1914346963
+ 0.2298126966 0.2437552065 0.1935469061
+ 0.2320972979 0.2461318970 0.1956477016
+ 0.2343686968 0.2484831065 0.1977396011
+ 0.2366248071 0.2508153021 0.1998216063
+ 0.2388661057 0.2531288862 0.2018945962
+ 0.2410929054 0.2554250956 0.2039602995
+ 0.2433024943 0.2577019930 0.2060160935
+ 0.2454963028 0.2599579096 0.2080630958
+ 0.2476740032 0.2621991932 0.2100999057
+ 0.2498372942 0.2644275129 0.2121268064
+ 0.2519871891 0.2666364014 0.2141437978
+ 0.2541207969 0.2688263953 0.2161484957
+ 0.2562352121 0.2710013986 0.2181435972
+ 0.2583388984 0.2731583118 0.2201271951
+ 0.2604309916 0.2752990127 0.2221024036
+ 0.2625060081 0.2774248123 0.2240664065
+ 0.2645739019 0.2795382142 0.2260230929
+ 0.2666332126 0.2816390097 0.2279690057
+ 0.2686808109 0.2837243974 0.2299083024
+ 0.2707110047 0.2857916951 0.2318374068
+ 0.2727304995 0.2878476977 0.2337605953
+ 0.2747409046 0.2898918092 0.2356743068
+ 0.2767409086 0.2919228971 0.2375825942
+ 0.2787257135 0.2939389050 0.2394821942
+ 0.2807008028 0.2959417999 0.2413766980
+ 0.2826663852 0.2979333103 0.2432633042
+ 0.2846207917 0.2999132872 0.2451453060
+ 0.2865644097 0.3018836081 0.2470199019
+ 0.2884986103 0.3038400114 0.2488902956
+ 0.2904250026 0.3057815135 0.2507540882
+ 0.2923448086 0.3077118099 0.2526113987
+ 0.2942551076 0.3096336126 0.2544620037
+ 0.2961547077 0.3115448952 0.2563053966
+ 0.2980456948 0.3134449124 0.2581430972
+ 0.2999280095 0.3153319061 0.2599739134
+ 0.3018029034 0.3172087073 0.2617988884
+ 0.3036679029 0.3190751076 0.2636143863
+ 0.3055250049 0.3209312856 0.2654233873
+ 0.3073746860 0.3227779865 0.2672255039
+ 0.3092148006 0.3246138990 0.2690199912
+ 0.3110457957 0.3264397979 0.2708095908
+ 0.3128677905 0.3282575011 0.2725906968
+ 0.3146800101 0.3300665915 0.2743658125
+ 0.3164839149 0.3318657875 0.2761324048
+ 0.3182795942 0.3336552978 0.2778904140
+ 0.3200652003 0.3354372978 0.2796432972
+ 0.3218409121 0.3372116983 0.2813872993
+ 0.3236100078 0.3389771879 0.2831256986
+ 0.3253748119 0.3407320082 0.2848586142
+ 0.3271335959 0.3424785137 0.2865825891
+ 0.3288846016 0.3442190886 0.2883006930
+ 0.3306263983 0.3459519148 0.2900108993
+ 0.3323577940 0.3476763070 0.2917132080
+ 0.3340801001 0.3493919075 0.2934105098
+ 0.3357945085 0.3511008918 0.2951011062
+ 0.3375023901 0.3528040051 0.2967849970
+ 0.3392041922 0.3545002043 0.2984645963
+ 0.3408981860 0.3561894000 0.3001382947
+ 0.3425840139 0.3578724861 0.3018057048
+ 0.3442628086 0.3595485985 0.3034670949
+ 0.3459351063 0.3612180948 0.3051221967
+ 0.3476001024 0.3628816009 0.3067719936
+ 0.3492591083 0.3645390868 0.3084169924
+ 0.3509126008 0.3661913872 0.3100563884
+ 0.3525592089 0.3678377867 0.3116889000
+ 0.3541980982 0.3694776893 0.3133162856
+ 0.3558301926 0.3711101115 0.3149392903
+ 0.3574565947 0.3727348149 0.3165563047
+ 0.3590759039 0.3743531108 0.3181675971
+ 0.3606899083 0.3759661019 0.3197731972
+ 0.3622973859 0.3775736094 0.3213737905
+ 0.3638975024 0.3791748881 0.3229694963
+ 0.3654907048 0.3807713985 0.3245606124
+ 0.3670778871 0.3823625147 0.3261463046
+ 0.3686599135 0.3839488924 0.3277261853
+ 0.3702372015 0.3855310977 0.3293007910
+ 0.3718093038 0.3871083856 0.3308694959
+ 0.3733766973 0.3886804879 0.3324309886
+ 0.3749383092 0.3902452886 0.3339884877
+ 0.3764936924 0.3918035924 0.3355414867
+ 0.3780421019 0.3933547139 0.3370898068
+ 0.3795835972 0.3948993087 0.3386338055
+ 0.3811194897 0.3964386880 0.3401749134
+ 0.3826521933 0.3979738951 0.3417122960
+ 0.3841798007 0.3995029926 0.3432452977
+ 0.3857024908 0.4010264874 0.3447737098
+ 0.3872196972 0.4025439918 0.3462958038
+ 0.3887315094 0.4040569961 0.3478113115
+ 0.3902386129 0.4055672884 0.3493227065
+ 0.3917382061 0.4070734084 0.3508295119
+ 0.3932329118 0.4085750878 0.3523303866
+ 0.3947235942 0.4100722969 0.3538272977
+ 0.3962103128 0.4115647078 0.3553214967
+ 0.3976925015 0.4130522907 0.3568125963
+ 0.3991701007 0.4145320952 0.3582983017
+ 0.4006435871 0.4160074890 0.3597793877
+ 0.4021126926 0.4174784124 0.3612557054
+ 0.4035769105 0.4189445972 0.3627254069
+ 0.4050329924 0.4204039872 0.3641889989
+ 0.4064843059 0.4218592048 0.3656494021
+ 0.4079307020 0.4233103096 0.3671061099
+ 0.4093720019 0.4247572124 0.3685575128
+ 0.4108068049 0.4261992872 0.3700045943
+ 0.4122380912 0.4276376069 0.3714494109
+ 0.4136658907 0.4290730059 0.3728919923
+ 0.4150888920 0.4305058122 0.3743301034
+ 0.4165056050 0.4319339991 0.3757638931
+ 0.4179174900 0.4333589077 0.3771938980
+ 0.4193247855 0.4347805977 0.3786191940
+ 0.4207271934 0.4361965060 0.3800374866
+ 0.4221262932 0.4376091063 0.3814533055
+ 0.4235219955 0.4390187860 0.3828668892
+ 0.4249120951 0.4404245913 0.3842754960
+ 0.4262982905 0.4418255091 0.3856791854
+ 0.4276815057 0.4432229102 0.3870786130
+ 0.4290600121 0.4446159899 0.3884716928
+ 0.4304330051 0.4460026920 0.3898597956
+ 0.4318026900 0.4473862946 0.3912445009
+ 0.4331685901 0.4487664998 0.3926242888
+ 0.4345290065 0.4501408041 0.3940002024
+ 0.4358857870 0.4515124857 0.3953734040
+ 0.4372372925 0.4528811872 0.3967424929
+ 0.4385837018 0.4542450011 0.3981088102
+ 0.4399270117 0.4556061029 0.3994731903
+ 0.4412651956 0.4569629133 0.4008344114
+ 0.4425975978 0.4583143890 0.4021924138
+ 0.4439268112 0.4596636891 0.4035479128
+ 0.4452503920 0.4610106945 0.4048978090
+ 0.4465709925 0.4623551965 0.4062455893
+ 0.4478893876 0.4636982977 0.4075908959
+ 0.4492019117 0.4650372863 0.4089311063
+ 0.4505116045 0.4663740098 0.4102692008
+ 0.4518170953 0.4677081108 0.4116033912
+ 0.4531182945 0.4690375030 0.4129329026
+ 0.4544177055 0.4703648090 0.4142597914
+ 0.4557136893 0.4716871977 0.4155794978
+ 0.4570071995 0.4730058014 0.4168972969
+ 0.4582982063 0.4743215144 0.4182122946
+ 0.4595845044 0.4756304026 0.4195236862
+ 0.4608688056 0.4769366980 0.4208334088
+ 0.4621477127 0.4782372117 0.4221383929
+ 0.4634240866 0.4795337915 0.4234414995
+ 0.4646978974 0.4808278084 0.4247420132
+ 0.4659669995 0.4821158051 0.4260379970
+ 0.4672344029 0.4834016860 0.4273321033
+ 0.4684959054 0.4846813977 0.4286206067
+ 0.4697546959 0.4859575927 0.4299075007
+ 0.4710089862 0.4872294962 0.4311901927
+ 0.4722594917 0.4884983897 0.4324694872
+ 0.4735080004 0.4897660017 0.4337458909
+ 0.4747509062 0.4910294116 0.4350179136
+ 0.4759922028 0.4922915101 0.4362885952
+ 0.4772273898 0.4935492873 0.4375523031
+ 0.4784607887 0.4948048890 0.4388141930
+ 0.4796907008 0.4960573018 0.4400705993
+ 0.4809170961 0.4973073006 0.4413250089
+ 0.4821406901 0.4985556006 0.4425770938
+ 0.4833607972 0.4998002946 0.4438262880
+ 0.4845795929 0.5010439754 0.4450738132
+ 0.4857935905 0.5022826791 0.4463163912
+ 0.4870069027 0.5035204291 0.4475578070
+ 0.4882164896 0.5047531128 0.4487918913
+ 0.4894252121 0.5059841275 0.4500248134
+ 0.4906300902 0.5072104931 0.4512509108
+ 0.4918332100 0.5084347725 0.4524757862
+ 0.4930329919 0.5096561909 0.4536970854
+ 0.4942300022 0.5108749270 0.4549165070
+ 0.4954235852 0.5120911002 0.4561327994
+ 0.4966148138 0.5133035183 0.4573467076
+ 0.4978038967 0.5145136714 0.4585579038
+ 0.4989897013 0.5157194734 0.4597668052
+ 0.5001736879 0.5169236064 0.4609735906
+ 0.5013538003 0.5181236863 0.4621770084
+ 0.5025321245 0.5193228126 0.4633781016
+ 0.5037057996 0.5205178857 0.4645760059
+ 0.5048779845 0.5217121840 0.4657720923
+ 0.5060449243 0.5229014754 0.4669648111
+ 0.5072103143 0.5240899920 0.4681558907
+ 0.5083714128 0.5252736807 0.4693433940
+ 0.5095313787 0.5264567137 0.4705292881
+ 0.5106868744 0.5276340246 0.4717121124
+ 0.5118411779 0.5288106203 0.4728935957
+ 0.5129907131 0.5299817920 0.4740710855
+ 0.5141386986 0.5311521292 0.4752467871
+ 0.5152817965 0.5323163867 0.4764178097
+ 0.5164232850 0.5334795713 0.4775865078
+ 0.5175597072 0.5346372724 0.4787499011
+ 0.5186939240 0.5357934833 0.4799101949
+ 0.5198233724 0.5369442105 0.4810669124
+ 0.5209500790 0.5380924940 0.4822207987
+ 0.5220733881 0.5392372012 0.4833728075
+ 0.5231938958 0.5403798223 0.4845224917
+ 0.5243116021 0.5415189862 0.4856700897
+ 0.5254257917 0.5426552296 0.4868142903
+ 0.5265377760 0.5437887907 0.4879572093
+ 0.5276451111 0.5449187160 0.4890958965
+ 0.5287510753 0.5460466743 0.4902341068
+ 0.5298516154 0.5471696258 0.4913682044
+ 0.5309517980 0.5482918024 0.4925023019
+ 0.5320447087 0.5494078994 0.4936308861
+ 0.5331376195 0.5505239964 0.4947592020
+ 0.5342239141 0.5516330004 0.4958822131
+ 0.5353093743 0.5527415872 0.4970037043
+ 0.5363904834 0.5538460016 0.4981215894
+ 0.5374696255 0.5549491048 0.4992372096
+ 0.5385463834 0.5560489893 0.5003510118
+ 0.5396206975 0.5571463108 0.5014619827
+ 0.5406937003 0.5582417250 0.5025722980
+ 0.5417628884 0.5593330860 0.5036795735
+ 0.5428320169 0.5604240894 0.5047869086
+ 0.5438956022 0.5615094900 0.5058897138
+ 0.5449593067 0.5625947714 0.5069922209
+ 0.5460199714 0.5636752248 0.5080906749
+ 0.5470796227 0.5647544265 0.5091872215
+ 0.5481380224 0.5658313036 0.5102818012
+ 0.5491948128 0.5669060946 0.5113732815
+ 0.5502511859 0.5679798722 0.5124642849
+ 0.5513052940 0.5690498948 0.5135501027
+ 0.5523592830 0.5701199174 0.5146359205
+ 0.5534104109 0.5711855888 0.5157186985
+ 0.5544610023 0.5722507834 0.5168005228
+ 0.5555099249 0.5733129978 0.5178806782
+ 0.5565569997 0.5743728876 0.5189586282
+ 0.5576034784 0.5754317045 0.5200362802
+ 0.5586465001 0.5764862895 0.5211094022
+ 0.5596894026 0.5775408745 0.5221825242
+ 0.5607293248 0.5785906911 0.5232514739
+ 0.5617681146 0.5796394944 0.5243185163
+ 0.5628052950 0.5806865096 0.5253840089
+ 0.5638393164 0.5817313194 0.5264452100
+ 0.5648733974 0.5827760100 0.5275064707
+ 0.5659030080 0.5838158727 0.5285636187
+ 0.5669323206 0.5848557949 0.5296201110
+ 0.5679587722 0.5858927965 0.5306740999
+ 0.5689827204 0.5869277716 0.5317248702
+ 0.5700063109 0.5879620910 0.5327755809
+ 0.5710247755 0.5889919996 0.5338218212
+ 0.5720431805 0.5900217891 0.5348678231
+ 0.5730581880 0.5910484195 0.5359107256
+ 0.5740705729 0.5920730829 0.5369504094
+ 0.5750827193 0.5930969715 0.5379900932
+ 0.5760906935 0.5941162705 0.5390231013
+ 0.5770987868 0.5951356888 0.5400561094
+ 0.5781041980 0.5961515903 0.5410866141
+ 0.5791074038 0.5971654058 0.5421143770
+ 0.5801107287 0.5981786847 0.5431421995
+ 0.5811091065 0.5991874933 0.5441660285
+ 0.5821076035 0.6001963019 0.5451896191
+ 0.5831037164 0.6012020707 0.5462111831
+ 0.5840969086 0.6022052765 0.5472295880
+ 0.5850901008 0.6032084823 0.5482478738
+ 0.5860803127 0.6042070985 0.5492616296
+ 0.5870699286 0.6052052975 0.5502738953
+ 0.5880584717 0.6062015891 0.5512850285
+ 0.5890443921 0.6071943045 0.5522903204
+ 0.5900301933 0.6081869006 0.5532956719
+ 0.5910136104 0.6091759801 0.5542973876
+ 0.5919954777 0.6101636887 0.5552961826
+ 0.5929774046 0.6111510992 0.5562950969
+ 0.5939552784 0.6121332049 0.5572906733
+ 0.5949330926 0.6131153107 0.5582858920
+ 0.5959095955 0.6140955091 0.5592799187
+ 0.5968831778 0.6150727272 0.5602700710
+ 0.5978568196 0.6160498857 0.5612602830
+ 0.5988277197 0.6170232296 0.5622476935
+ 0.5997968912 0.6179949045 0.5632326007
+ 0.6007661223 0.6189665794 0.5642176270
+ 0.6017311215 0.6199334264 0.5651969910
+ 0.6026958227 0.6209002137 0.5661752820
+ 0.6036596894 0.6218655705 0.5671530962
+ 0.6046196222 0.6228268743 0.5681259036
+ 0.6055796146 0.6237881780 0.5690985918
+ 0.6065375805 0.6247472167 0.5700702071
+ 0.6074926853 0.6257035732 0.5710396171
+ 0.6084479094 0.6266599894 0.5720090270
+ 0.6093999147 0.6276127100 0.5729761720
+ 0.6103500724 0.6285637021 0.5739415884
+ 0.6113001704 0.6295146942 0.5749070048
+ 0.6122449040 0.6304615140 0.5758687854
+ 0.6131883860 0.6314076781 0.5768293738
+ 0.6141319871 0.6323534846 0.5777900219
+ 0.6150689125 0.6332944036 0.5787457228
+ 0.6160058975 0.6342352033 0.5797008276
+ 0.6169418097 0.6351751089 0.5806555748
+ 0.6178718805 0.6361111999 0.5816044807
+ 0.6188020110 0.6370472908 0.5825533867
+ 0.6197304130 0.6379815936 0.5835011005
+ 0.6206536889 0.6389123797 0.5844430923
+ 0.6215770841 0.6398432255 0.5853852034
+ 0.6224973202 0.6407719851 0.5863258839
+ 0.6234118938 0.6416980028 0.5872634053
+ 0.6243265271 0.6426240802 0.5882009268
+ 0.6252374053 0.6435475945 0.5891368985
+ 0.6261436939 0.6444684267 0.5900704265
+ 0.6270499825 0.6453893185 0.5910037756
+ 0.6279519796 0.6463075876 0.5919355154
+ 0.6288496852 0.6472237706 0.5928648710
+ 0.6297472715 0.6481400132 0.5937942266
+ 0.6306408048 0.6490532160 0.5947210789
+ 0.6315302253 0.6499642134 0.5956451297
+ 0.6324197054 0.6508752108 0.5965691209
+ 0.6333047748 0.6517835855 0.5974907279
+ 0.6341857910 0.6526899934 0.5984091759
+ 0.6350668073 0.6535964012 0.5993278027
+ 0.6359438896 0.6545000076 0.6002436280
+ 0.6368169188 0.6554012895 0.6011555791
+ 0.6376898289 0.6563025713 0.6020675898
+ 0.6385591030 0.6572015882 0.6029770970
+ 0.6394237876 0.6580982804 0.6038823724
+ 0.6402884722 0.6589950919 0.6047877073
+ 0.6411507130 0.6598895788 0.6056910157
+ 0.6420087814 0.6607813239 0.6065897942
+ 0.6428670287 0.6616728902 0.6074885130
+ 0.6437233090 0.6625624895 0.6083862782
+ 0.6445748210 0.6634479761 0.6092801094
+ 0.6454262733 0.6643334031 0.6101740003
+ 0.6462768912 0.6652175188 0.6110675931
+ 0.6471220255 0.6660966277 0.6119573116
+ 0.6479671001 0.6669756770 0.6128469110
+ 0.6488121748 0.6678544283 0.6137366295
+ 0.6496508718 0.6687275171 0.6146218181
+ 0.6504895091 0.6696006060 0.6155067086
+ 0.6513282061 0.6704736948 0.6163915992
+ 0.6521630287 0.6713413000 0.6172724962
+ 0.6529970765 0.6722081900 0.6181520224
+ 0.6538311243 0.6730750799 0.6190316081
+ 0.6546623707 0.6739377975 0.6199085712
+ 0.6554920077 0.6747987270 0.6207835078
+ 0.6563215852 0.6756594777 0.6216583848
+ 0.6571496129 0.6765179038 0.6225318909
+ 0.6579748988 0.6773731709 0.6234022975
+ 0.6588003039 0.6782284975 0.6242725849
+ 0.6596251130 0.6790826917 0.6251426935
+ 0.6604462862 0.6799324751 0.6260074973
+ 0.6612675786 0.6807821989 0.6268723011
+ 0.6620888114 0.6816319823 0.6277372241
+ 0.6629067063 0.6824771762 0.6286000013
+ 0.6637240052 0.6833220124 0.6294621825
+ 0.6645414233 0.6841667295 0.6303244233
+ 0.6653565764 0.6850084066 0.6311848760
+ 0.6661701798 0.6858481765 0.6320434213
+ 0.6669837236 0.6866878867 0.6329019070
+ 0.6677964926 0.6875264049 0.6337599754
+ 0.6686064005 0.6883615851 0.6346150041
+ 0.6694163084 0.6891968250 0.6354699135
+ 0.6702262163 0.6900320053 0.6363248825
+ 0.6710332036 0.6908645034 0.6371762753
+ 0.6718395948 0.6916965842 0.6380265951
+ 0.6726461053 0.6925287247 0.6388769746
+ 0.6734504104 0.6933588982 0.6397256255
+ 0.6742519736 0.6941872239 0.6405714750
+ 0.6750535965 0.6950153708 0.6414173245
+ 0.6758551002 0.6958433986 0.6422631145
+ 0.6766521931 0.6966664791 0.6431037188
+ 0.6774494052 0.6974896193 0.6439439058
+ 0.6782464981 0.6983126998 0.6447842121
+ 0.6790412068 0.6991328001 0.6456223726
+ 0.6798340082 0.6999511123 0.6464583874
+ 0.6806266904 0.7007693052 0.6472944021
+ 0.6814191937 0.7015869021 0.6481302977
+ 0.6822078824 0.7024006248 0.6489617229
+ 0.6829966903 0.7032142878 0.6497930884
+ 0.6837854981 0.7040280104 0.6506243944
+ 0.6845712066 0.7048389912 0.6514533162
+ 0.6853544712 0.7056484222 0.6522796154
+ 0.6861379147 0.7064577937 0.6531059742
+ 0.6869211197 0.7072668076 0.6539323926
+ 0.6876996756 0.7080708742 0.6547545791
+ 0.6884782910 0.7088748813 0.6555765867
+ 0.6892567873 0.7096790075 0.6563987136
+ 0.6900330782 0.7104793787 0.6572191119
+ 0.6908069253 0.7112764716 0.6580371261
+ 0.6915807128 0.7120736241 0.6588550806
+ 0.6923545003 0.7128707170 0.6596730947
+ 0.6931245923 0.7136620879 0.6604871154
+ 0.6938942075 0.7144529819 0.6613001823
+ 0.6946637034 0.7152439952 0.6621131897
+ 0.6954323053 0.7160329819 0.6629254222
+ 0.6961976886 0.7168176174 0.6637337804
+ 0.6969630122 0.7176023126 0.6645420790
+ 0.6977283955 0.7183870077 0.6653504968
+ 0.6984916925 0.7191671133 0.6661558747
+ 0.6992534995 0.7199447751 0.6669585705
+ 0.7000153065 0.7207224965 0.6677613854
+ 0.7007771134 0.7215002179 0.6685642004
+ 0.7015355825 0.7222713232 0.6693624258
+ 0.7022938132 0.7230420709 0.6701598167
+ 0.7030519843 0.7238129973 0.6709572077
+ 0.7038096786 0.7245823145 0.6717540026
+ 0.7045649290 0.7253469229 0.6725463867
+ 0.7053201199 0.7261115909 0.6733387113
+ 0.7060751915 0.7268761992 0.6741309762
+ 0.7068290710 0.7276378274 0.6749218106
+ 0.7075812817 0.7283964157 0.6757097840
+ 0.7083334923 0.7291548848 0.6764978766
+ 0.7090857029 0.7299134731 0.6772860289
+ 0.7098354101 0.7306681275 0.6780707836
+ 0.7105838060 0.7314211130 0.6788532734
+ 0.7113320827 0.7321742177 0.6796358824
+ 0.7120804787 0.7329273224 0.6804183722
+ 0.7128257751 0.7336754799 0.6811972857
+ 0.7135705948 0.7344232798 0.6819751263
+ 0.7143152952 0.7351710200 0.6827530265
+ 0.7150601149 0.7359182835 0.6835308075
+ 0.7158017159 0.7366598248 0.6843031049
+ 0.7165433168 0.7374011874 0.6850749850
+ 0.7172849178 0.7381426096 0.6858468056
+ 0.7180262208 0.7388827205 0.6866185069
+ 0.7187647820 0.7396168113 0.6873862147
+ 0.7195035219 0.7403510213 0.6881539822
+ 0.7202422023 0.7410851717 0.6889218092
+ 0.7209799886 0.7418174744 0.6896888018
+ 0.7217146754 0.7425451279 0.6904516816
+ 0.7224494219 0.7432727218 0.6912146211
+ 0.7231841087 0.7440003157 0.6919776201
+ 0.7239174843 0.7447258234 0.6927394867
+ 0.7246472836 0.7454472184 0.6934980154
+ 0.7253772020 0.7461684942 0.6942564845
+ 0.7261071205 0.7468898892 0.6950148940
+ 0.7268354893 0.7476091981 0.6957721114
+ 0.7275608182 0.7483249903 0.6965253949
+ 0.7282860279 0.7490409017 0.6972786784
+ 0.7290111780 0.7497566938 0.6980319023
+ 0.7297351956 0.7504705787 0.6987839937
+ 0.7304564118 0.7511811852 0.6995325089
+ 0.7311775088 0.7518917918 0.7002809048
+ 0.7318987250 0.7526022792 0.7010293007
+ 0.7326188087 0.7533113956 0.7017766237
+ 0.7333359718 0.7540174723 0.7025194764
+ 0.7340533137 0.7547234893 0.7032623887
+ 0.7347705960 0.7554296255 0.7040053010
+ 0.7354866862 0.7561342120 0.7047476172
+ 0.7361978889 0.7568343878 0.7054864168
+ 0.7369092107 0.7575346828 0.7062252164
+ 0.7376204133 0.7582349181 0.7069640160
+ 0.7383310795 0.7589343190 0.7077025771
+ 0.7390366197 0.7596284151 0.7084372044
+ 0.7397419810 0.7603225112 0.7091717720
+ 0.7404474020 0.7610166073 0.7099062800
+ 0.7411528230 0.7617105842 0.7106409073
+ 0.7418531179 0.7623990178 0.7113716006
+ 0.7425531745 0.7630872726 0.7121018767
+ 0.7432532907 0.7637757063 0.7128322124
+ 0.7439532876 0.7644640207 0.7135624886
+ 0.7446492910 0.7651482821 0.7142896056
+ 0.7453442216 0.7658317089 0.7150154114
+ 0.7460390925 0.7665150762 0.7157412767
+ 0.7467340231 0.7671986222 0.7164672017
+ 0.7474262714 0.7678791881 0.7171908021
+ 0.7481164932 0.7685580850 0.7179121971
+ 0.7488067150 0.7692371011 0.7186335921
+ 0.7494968772 0.7699159980 0.7193549871
+ 0.7501856089 0.7705929279 0.7200750709
+ 0.7508713007 0.7712666988 0.7207918763
+ 0.7515569925 0.7719404101 0.7215088010
+ 0.7522428036 0.7726141810 0.7222256064
+ 0.7529281974 0.7732872963 0.7229424119
+ 0.7536085248 0.7739552259 0.7236546278
+ 0.7542889118 0.7746230960 0.7243667245
+ 0.7549691796 0.7752910256 0.7250788808
+ 0.7556495070 0.7759588957 0.7257910967
+ 0.7563261986 0.7766230106 0.7264999747
+ 0.7570015788 0.7772859931 0.7272074223
+ 0.7576768994 0.7779489756 0.7279146910
+ 0.7583522797 0.7786120772 0.7286220789
+ 0.7590258718 0.7792726755 0.7293279171
+ 0.7596967220 0.7799301147 0.7300304770
+ 0.7603675127 0.7805876136 0.7307329774
+ 0.7610384226 0.7812449932 0.7314354777
+ 0.7617092133 0.7819021940 0.7321380973
+ 0.7623745203 0.7825548053 0.7328367829
+ 0.7630398870 0.7832074165 0.7335352898
+ 0.7637053132 0.7838600278 0.7342339158
+ 0.7643706203 0.7845125198 0.7349324226
+ 0.7650331855 0.7851625085 0.7356290221
+ 0.7656937242 0.7858108282 0.7363240123
+ 0.7663542032 0.7864592075 0.7370188832
+ 0.7670148015 0.7871075869 0.7377138734
+ 0.7676746845 0.7877553105 0.7384086251
+ 0.7683306932 0.7884001732 0.7390993834
+ 0.7689867020 0.7890449762 0.7397902012
+ 0.7696425915 0.7896898985 0.7404810786
+ 0.7702986002 0.7903347015 0.7411718965
+ 0.7709521055 0.7909758091 0.7418606281
+ 0.7716041803 0.7916151285 0.7425476909
+ 0.7722561955 0.7922543287 0.7432348728
+ 0.7729082108 0.7928935289 0.7439219952
+ 0.7735598087 0.7935318947 0.7446089983
+ 0.7742068172 0.7941648960 0.7452918887
+ 0.7748538256 0.7947977781 0.7459747791
+ 0.7755008936 0.7954307795 0.7466577291
+ 0.7761479020 0.7960637808 0.7473406196
+ 0.7767928243 0.7966936827 0.7480217814
+ 0.7774356008 0.7973213196 0.7487009168
+ 0.7780783772 0.7979490161 0.7493799925
+ 0.7787212729 0.7985765934 0.7500591278
+ 0.7793641090 0.7992041707 0.7507382035
+ 0.7800034285 0.7998272181 0.7514144778
+ 0.7806422710 0.8004500270 0.7520902753
+ 0.7812811732 0.8010727763 0.7527660728
+ 0.7819200754 0.8016955256 0.7534418702
+ 0.7825579047 0.8023167253 0.7541171908
+ 0.7831923962 0.8029342890 0.7547907233
+ 0.7838268876 0.8035517931 0.7554641962
+ 0.7844614983 0.8041694164 0.7561377287
+ 0.7850959897 0.8047869205 0.7568112016
+ 0.7857282162 0.8054007888 0.7574830055
+ 0.7863587141 0.8060125113 0.7581532001
+ 0.7869892716 0.8066241741 0.7588235140
+ 0.7876198292 0.8072358966 0.7594937086
+ 0.7882503867 0.8078476191 0.7601639032
+ 0.7888780832 0.8084548712 0.7608323097
+ 0.7895054221 0.8090618253 0.7615002990
+ 0.7901325822 0.8096686006 0.7621682286
+ 0.7907598019 0.8102754951 0.7628362179
+ 0.7913867235 0.8108816743 0.7635040283
+ 0.7920100093 0.8114830852 0.7641686797
+ 0.7926331758 0.8120846152 0.7648333907
+ 0.7932564020 0.8126860857 0.7654981017
+ 0.7938796282 0.8132876158 0.7661628127
+ 0.7945017815 0.8138875961 0.7668269873
+ 0.7951213717 0.8144844770 0.7674893737
+ 0.7957410812 0.8150814176 0.7681518197
+ 0.7963607907 0.8156782985 0.7688142061
+ 0.7969803810 0.8162751794 0.7694767118
+ 0.7975987792 0.8168696761 0.7701377869
+ 0.7982153893 0.8174614906 0.7707970738
+ 0.7988319993 0.8180533051 0.7714563012
+ 0.7994486094 0.8186451197 0.7721155286
+ 0.8000652790 0.8192368746 0.7727746964
+ 0.8006798029 0.8198254108 0.7734327912
+ 0.8012925982 0.8204118013 0.7740896940
+ 0.8019053936 0.8209980726 0.7747467160
+ 0.8025181890 0.8215845227 0.7754036784
+ 0.8031309843 0.8221707940 0.7760605812
+ 0.8037403226 0.8227540851 0.7767156959
+ 0.8043475151 0.8233358264 0.7773694992
+ 0.8049547076 0.8239176273 0.7780233026
+ 0.8055619001 0.8244994283 0.7786769867
+ 0.8061690927 0.8250811100 0.7793307900
+ 0.8067730069 0.8256602883 0.7799832225
+ 0.8073750138 0.8262382746 0.7806347013
+ 0.8079770803 0.8268163800 0.7812862992
+ 0.8085792065 0.8273944855 0.7819377780
+ 0.8091812730 0.8279724717 0.7825893164
+ 0.8097804189 0.8285468221 0.7832390070
+ 0.8103780150 0.8291193843 0.7838873267
+ 0.8109756112 0.8296921253 0.7845357060
+ 0.8115732074 0.8302646875 0.7851840854
+ 0.8121708035 0.8308374286 0.7858325243
+ 0.8127658963 0.8314061761 0.7864795923
+ 0.8133594990 0.8319730759 0.7871257067
+ 0.8139529824 0.8325399160 0.7877718806
+ 0.8145465851 0.8331068158 0.7884181142
+ 0.8151401281 0.8336737156 0.7890642285
+ 0.8157312274 0.8342378736 0.7897089124
+ 0.8163201213 0.8348001242 0.7903519273
+ 0.8169090152 0.8353623152 0.7909948826
+ 0.8174979091 0.8359245062 0.7916380167
+ 0.8180868030 0.8364866972 0.7922809720
+ 0.8186740875 0.8370468020 0.7929232717
+ 0.8192589283 0.8376039267 0.7935640812
+ 0.8198438287 0.8381611109 0.7942048907
+ 0.8204286098 0.8387181759 0.7948457003
+ 0.8210135102 0.8392754197 0.7954866290
+ 0.8215975761 0.8398311734 0.7961269021
+ 0.8221790195 0.8403828740 0.7967646122
+ 0.8227605224 0.8409346938 0.7974023223
+ 0.8233419061 0.8414865136 0.7980399728
+ 0.8239232898 0.8420382142 0.7986776829
+ 0.8245046735 0.8425897956 0.7993155122
+ 0.8250821829 0.8431358933 0.7999498844
+ 0.8256595731 0.8436819911 0.8005841970
+ 0.8262370229 0.8442280889 0.8012183905
+ 0.8268144131 0.8447741866 0.8018527031
+ 0.8273919225 0.8453204036 0.8024870157
+ 0.8279669285 0.8458629251 0.8031185865
+ 0.8285411000 0.8464043140 0.8037490249
+ 0.8291152716 0.8469458222 0.8043794036
+ 0.8296893835 0.8474872112 0.8050099015
+ 0.8302636147 0.8480286002 0.8056402802
+ 0.8308361769 0.8485683799 0.8062694073
+ 0.8314064741 0.8491060734 0.8068965077
+ 0.8319767714 0.8496438265 0.8075236082
+ 0.8325471282 0.8501815200 0.8081507087
+ 0.8331174850 0.8507192135 0.8087778091
+ 0.8336874843 0.8512564898 0.8094046712
+ 0.8342546225 0.8517901897 0.8100280762
+ 0.8348217010 0.8523237705 0.8106514215
+ 0.8353887796 0.8528574705 0.8112748265
+ 0.8359557986 0.8533911109 0.8118981123
+ 0.8365228772 0.8539248109 0.8125215173
+ 0.8370872736 0.8544545770 0.8131418824
+ 0.8376504779 0.8549830914 0.8137606978
+ 0.8382136822 0.8555114865 0.8143793941
+ 0.8387768269 0.8560398817 0.8149982095
+ 0.8393399715 0.8565682769 0.8156170249
+ 0.8399021029 0.8570951819 0.8162348866
+ 0.8404610157 0.8576182127 0.8168491721
+ 0.8410199285 0.8581411242 0.8174635172
+ 0.8415787816 0.8586640954 0.8180779219
+ 0.8421378136 0.8591871262 0.8186922073
+ 0.8426967263 0.8597099781 0.8193064928
+ 0.8432520032 0.8602293730 0.8199177980
+ 0.8438060880 0.8607478738 0.8205277920
+ 0.8443602920 0.8612663150 0.8211377859
+ 0.8449144959 0.8617848158 0.8217477798
+ 0.8454685807 0.8623031974 0.8223577738
+ 0.8460217714 0.8628203869 0.8229669929
+ 0.8465716839 0.8633341193 0.8235728145
+ 0.8471217155 0.8638477921 0.8241786957
+ 0.8476716280 0.8643614054 0.8247845173
+ 0.8482214808 0.8648750782 0.8253902793
+ 0.8487715125 0.8653888106 0.8259961009
+ 0.8493191004 0.8658990860 0.8265994787
+ 0.8498654962 0.8664078712 0.8272011876
+ 0.8504120111 0.8669167757 0.8278030157
+ 0.8509584069 0.8674256206 0.8284047246
+ 0.8515049219 0.8679344058 0.8290064931
+ 0.8520511985 0.8684428930 0.8296083212
+ 0.8525946736 0.8689479232 0.8302060962
+ 0.8531380892 0.8694528937 0.8308039904
+ 0.8536815047 0.8699579239 0.8314018250
+ 0.8542249799 0.8704627752 0.8319995999
+ 0.8547683954 0.8709678054 0.8325974941
+ 0.8553109765 0.8714712262 0.8331940770
+ 0.8558521867 0.8719722033 0.8337880969
+ 0.8563933969 0.8724731803 0.8343821168
+ 0.8569346070 0.8729742765 0.8349761963
+ 0.8574758172 0.8734753132 0.8355702162
+ 0.8580170274 0.8739762902 0.8361642957
+ 0.8585556149 0.8744739294 0.8367559910
+ 0.8590927720 0.8749697804 0.8373463750
+ 0.8596299887 0.8754656911 0.8379368186
+ 0.8601672053 0.8759617209 0.8385272026
+ 0.8607044220 0.8764575720 0.8391175270
+ 0.8612416983 0.8769536018 0.8397079110
+ 0.8617749810 0.8774446845 0.8402953148
+ 0.8623077869 0.8779354095 0.8408821225
+ 0.8628407121 0.8784260750 0.8414688706
+ 0.8633735776 0.8789168000 0.8420556784
+ 0.8639063835 0.8794075251 0.8426426053
+ 0.8644390106 0.8798975945 0.8432291746
+ 0.8649681211 0.8803830147 0.8438127041
+ 0.8654972911 0.8808683753 0.8443961143
+ 0.8660264015 0.8813537955 0.8449795246
+ 0.8665555716 0.8818392158 0.8455628753
+ 0.8670848012 0.8823245764 0.8461462855
+ 0.8676131964 0.8828086853 0.8467290998
+ 0.8681393862 0.8832886815 0.8473091722
+ 0.8686655164 0.8837687969 0.8478893042
+ 0.8691915870 0.8842489123 0.8484694958
+ 0.8697177172 0.8847289085 0.8490496278
+ 0.8702437878 0.8852090240 0.8496297002
+ 0.8707692027 0.8856875896 0.8502088785
+ 0.8712928891 0.8861634731 0.8507859111
+ 0.8718166947 0.8866394162 0.8513628244
+ 0.8723403811 0.8871151805 0.8519396782
+ 0.8728641272 0.8875911236 0.8525167108
+ 0.8733878732 0.8880670071 0.8530936241
+ 0.8739106059 0.8885408044 0.8536695838
+ 0.8744313717 0.8890113831 0.8542435169
+ 0.8749523163 0.8894819021 0.8548172712
+ 0.8754730821 0.8899524808 0.8553912044
+ 0.8759940267 0.8904231191 0.8559650779
+ 0.8765147924 0.8908935785 0.8565390110
+ 0.8770341873 0.8913617134 0.8571118712
+ 0.8775507808 0.8918259144 0.8576828837
+ 0.8780673742 0.8922899961 0.8582537770
+ 0.8785840869 0.8927540779 0.8588247895
+ 0.8791006804 0.8932182193 0.8593956828
+ 0.8796172738 0.8936823010 0.8599665761
+ 0.8801329136 0.8941447139 0.8605368137
+ 0.8806458712 0.8946034908 0.8611049056
+ 0.8811588883 0.8950623274 0.8616731167
+ 0.8816719055 0.8955211043 0.8622412086
+ 0.8821849227 0.8959800005 0.8628093004
+ 0.8826978803 0.8964387774 0.8633773923
+ 0.8832104206 0.8968967199 0.8639450073
+ 0.8837205172 0.8973513246 0.8645104170
+ 0.8842306733 0.8978059292 0.8650758266
+ 0.8847408891 0.8982604742 0.8656411767
+ 0.8852511048 0.8987150788 0.8662065864
+ 0.8857613206 0.8991696835 0.8667719960
+ 0.8862714171 0.8996242285 0.8673374057
+ 0.8867782950 0.9000756741 0.8679000735
+ 0.8872851729 0.9005271792 0.8684629202
+ 0.8877921104 0.9009786844 0.8690257072
+ 0.8882989883 0.9014301896 0.8695884943
+ 0.8888059855 0.9018816948 0.8701512218
+ 0.8893129230 0.9023333192 0.8707140088
+ 0.8898167014 0.9027820826 0.8712748289
+ 0.8903198838 0.9032304287 0.8718351126
+ 0.8908231258 0.9036787152 0.8723952770
+ 0.8913263083 0.9041271210 0.8729556203
+ 0.8918294907 0.9045754075 0.8735159039
+ 0.8923326731 0.9050236940 0.8740761280
+ 0.8928335905 0.9054703116 0.8746351004
+ 0.8933327794 0.9059156179 0.8751929998
+ 0.8938320279 0.9063609838 0.8757507801
+ 0.8943310976 0.9068062901 0.8763086796
+ 0.8948302865 0.9072515965 0.8768665791
+ 0.8953294754 0.9076969028 0.8774244785
+ 0.8958278894 0.9081414938 0.8779817820
+ 0.8963238001 0.9085838795 0.8785374165
+ 0.8968197107 0.9090263247 0.8790928721
+ 0.8973156810 0.9094687104 0.8796485066
+ 0.8978115916 0.9099110961 0.8802040815
+ 0.8983076215 0.9103534818 0.8807597160
+ 0.8988034725 0.9107959270 0.8813151717
+ 0.8992962837 0.9112346172 0.8818688989
+ 0.8997886181 0.9116730094 0.8824223280
+ 0.9002810121 0.9121112823 0.8829756975
+ 0.9007734060 0.9125496745 0.8835291266
+ 0.9012656808 0.9129880071 0.8840824962
+ 0.9017580748 0.9134262800 0.8846358061
+ 0.9022489786 0.9138627052 0.8851882815
+ 0.9027383924 0.9142972231 0.8857396245
+ 0.9032276869 0.9147316813 0.8862909079
+ 0.9037171006 0.9151660800 0.8868421912
+ 0.9042065144 0.9156005979 0.8873934746
+ 0.9046958089 0.9160349965 0.8879448175
+ 0.9051852226 0.9164693952 0.8884961009
+ 0.9056711793 0.9169011116 0.8890454173
+ 0.9061573148 0.9173327088 0.8895946741
+ 0.9066432714 0.9177644253 0.8901439905
+ 0.9071292877 0.9181960821 0.8906934261
+ 0.9076154232 0.9186277986 0.8912426829
+ 0.9081013799 0.9190593958 0.8917919993
+ 0.9085853100 0.9194893241 0.8923398852
+ 0.9090666771 0.9199172854 0.8928862214
+ 0.9095481038 0.9203454256 0.8934323788
+ 0.9100295901 0.9207733870 0.8939787149
+ 0.9105110168 0.9212014079 0.8945249915
+ 0.9109923840 0.9216294885 0.8950712085
+ 0.9114738703 0.9220575094 0.8956174850
+ 0.9119517803 0.9224802852 0.8961616158
+ 0.9124293923 0.9229027033 0.8967053890
+ 0.9129070044 0.9233251214 0.8972491026
+ 0.9133846164 0.9237474799 0.8977928758
+ 0.9138621092 0.9241697788 0.8983367085
+ 0.9143397212 0.9245921969 0.8988804817
+ 0.9148163795 0.9250133038 0.8994235992
+ 0.9152907729 0.9254313111 0.8999646902
+ 0.9157652259 0.9258493185 0.9005057216
+ 0.9162396193 0.9262673259 0.9010468125
+ 0.9167140126 0.9266853929 0.9015879035
+ 0.9171885252 0.9271034002 0.9021288753
+ 0.9176629186 0.9275214076 0.9026700258
+ 0.9181352854 0.9279373884 0.9032099247
+ 0.9186062217 0.9283521175 0.9037488103
+ 0.9190772176 0.9287667274 0.9042876959
+ 0.9195482135 0.9291813970 0.9048265815
+ 0.9200190902 0.9295961261 0.9053655267
+ 0.9204900861 0.9300107956 0.9059044123
+ 0.9209610820 0.9304254055 0.9064432979
+ 0.9214289188 0.9308364987 0.9069793224
+ 0.9218962193 0.9312469959 0.9075146914
+ 0.9223635197 0.9316574931 0.9080500007
+ 0.9228308201 0.9320679903 0.9085853100
+ 0.9232981205 0.9324784875 0.9091206789
+ 0.9237653017 0.9328889847 0.9096559882
+ 0.9242324829 0.9332993031 0.9101912975
+ 0.9246969223 0.9337061048 0.9107241035
+ 0.9251613021 0.9341129065 0.9112569094
+ 0.9256256819 0.9345198274 0.9117897153
+ 0.9260901213 0.9349266291 0.9123224020
+ 0.9265545011 0.9353333712 0.9128552079
+ 0.9270188808 0.9357401729 0.9133880138
+ 0.9274827838 0.9361463189 0.9139202237
+ 0.9279441237 0.9365494251 0.9144498706
+ 0.9284055233 0.9369524121 0.9149795175
+ 0.9288668036 0.9373555183 0.9155091047
+ 0.9293280840 0.9377586246 0.9160386920
+ 0.9297894835 0.9381616116 0.9165682793
+ 0.9302508235 0.9385647178 0.9170979261
+ 0.9307109714 0.9389663935 0.9176266789
+ 0.9311680794 0.9393649101 0.9181531072
+ 0.9316251278 0.9397633076 0.9186794758
+ 0.9320821762 0.9401618242 0.9192059040
+ 0.9325392842 0.9405602813 0.9197322726
+ 0.9329962730 0.9409586787 0.9202587008
+ 0.9334533811 0.9413571954 0.9207851291
+ 0.9339085817 0.9417545795 0.9213101268
+ 0.9343593717 0.9421498775 0.9218313098
+ 0.9348102212 0.9425451756 0.9223526120
+ 0.9352610111 0.9429404736 0.9228739142
+ 0.9357118011 0.9433357716 0.9233952165
+ 0.9361625910 0.9437311292 0.9239163995
+ 0.9366133809 0.9441264272 0.9244377017
+ 0.9370620251 0.9445207715 0.9249573946
+ 0.9375048280 0.9449130297 0.9254726171
+ 0.9379475713 0.9453052282 0.9259877801
+ 0.9383903742 0.9456974268 0.9265030026
+ 0.9388331771 0.9460896254 0.9270182252
+ 0.9392759800 0.9464818239 0.9275333881
+ 0.9397187829 0.9468740225 0.9280486107
+ 0.9401605129 0.9472647905 0.9285627007
+ 0.9405969977 0.9476501942 0.9290714860
+ 0.9410336018 0.9480355978 0.9295802116
+ 0.9414702058 0.9484211206 0.9300889969
+ 0.9419068098 0.9488065243 0.9305977225
+ 0.9423432946 0.9491919279 0.9311063886
+ 0.9427798986 0.9495772719 0.9316151738
+ 0.9432163239 0.9499623179 0.9321237803
+ 0.9436482191 0.9503390789 0.9326291084
+ 0.9440801740 0.9507158995 0.9331343770
+ 0.9445121288 0.9510927200 0.9336397052
+ 0.9449440837 0.9514694810 0.9341449142
+ 0.9453759789 0.9518463016 0.9346501827
+ 0.9458078742 0.9522231221 0.9351555109
+ 0.9462398887 0.9526000023 0.9356607795
+ 0.9466683865 0.9529722929 0.9361640811
+ 0.9470962882 0.9533438087 0.9366669059
+ 0.9475240707 0.9537153840 0.9371697903
+ 0.9479519725 0.9540868998 0.9376726151
+ 0.9483798146 0.9544584155 0.9381753802
+ 0.9488077164 0.9548299909 0.9386783242
+ 0.9492354989 0.9552015066 0.9391810894
+ 0.9496610165 0.9555711746 0.9396826029
+ 0.9500846863 0.9559394717 0.9401828051
+ 0.9505084157 0.9563078284 0.9406831264
+ 0.9509320855 0.9566761255 0.9411833882
+ 0.9513558149 0.9570444226 0.9416837096
+ 0.9517794847 0.9574127197 0.9421839714
+ 0.9522032142 0.9577810168 0.9426841736
+ 0.9526256919 0.9581483006 0.9431836009
+ 0.9530442953 0.9585124254 0.9436798096
+ 0.9534628987 0.9588766098 0.9441760778
+ 0.9538815022 0.9592407942 0.9446722865
+ 0.9543001056 0.9596049190 0.9451684952
+ 0.9547187090 0.9599691033 0.9456648231
+ 0.9551373124 0.9603332281 0.9461609721
+ 0.9555559158 0.9606974125 0.9466571808
+ 0.9559701085 0.9610580802 0.9471496940
+ 0.9563835859 0.9614182115 0.9476413727
+ 0.9567971230 0.9617784023 0.9481331706
+ 0.9572104812 0.9621384740 0.9486249089
+ 0.9576240182 0.9624987245 0.9491167068
+ 0.9580374956 0.9628589153 0.9496085048
+ 0.9584509730 0.9632189870 0.9501001835
+ 0.9588623047 0.9635775089 0.9505898952
+ 0.9592704177 0.9639338851 0.9510766864
+ 0.9596785903 0.9642902017 0.9515634179
+ 0.9600868225 0.9646465182 0.9520500898
+ 0.9604949951 0.9650027752 0.9525368214
+ 0.9609032273 0.9653592110 0.9530236125
+ 0.9613113999 0.9657155275 0.9535102844
+ 0.9617195725 0.9660717845 0.9539970160
+ 0.9621226192 0.9664239883 0.9544786215
+ 0.9625251889 0.9667757750 0.9549596906
+ 0.9629278183 0.9671275020 0.9554407001
+ 0.9633303285 0.9674792886 0.9559217095
+ 0.9637328982 0.9678310752 0.9564027190
+ 0.9641355276 0.9681829214 0.9568837285
+ 0.9645379782 0.9685347080 0.9573647976
+ 0.9649384022 0.9688847065 0.9578434825
+ 0.9653344154 0.9692314267 0.9583176970
+ 0.9657304883 0.9695780873 0.9587917924
+ 0.9661265016 0.9699246883 0.9592658877
+ 0.9665225148 0.9702714086 0.9597399831
+ 0.9669185281 0.9706181288 0.9602141976
+ 0.9673146009 0.9709647894 0.9606882930
+ 0.9677106142 0.9713115096 0.9611623883
+ 0.9681016803 0.9716545939 0.9616312981
+ 0.9684907198 0.9719963074 0.9620978236
+ 0.9688798189 0.9723380208 0.9625642896
+ 0.9692687988 0.9726796746 0.9630308151
+ 0.9696578979 0.9730213881 0.9634972811
+ 0.9700468779 0.9733629823 0.9639638066
+ 0.9704359174 0.9737046957 0.9644302726
+ 0.9708248973 0.9740462899 0.9648967981
+ 0.9712070227 0.9743828177 0.9653550982
+ 0.9715890288 0.9747192860 0.9658132792
+ 0.9719710946 0.9750556946 0.9662715793
+ 0.9723531008 0.9753922224 0.9667298794
+ 0.9727351069 0.9757285714 0.9671881199
+ 0.9731171727 0.9760650992 0.9676464200
+ 0.9734991789 0.9764015079 0.9681046009
+ 0.9738795161 0.9767364264 0.9685608149
+ 0.9742544293 0.9770668149 0.9690101147
+ 0.9746292830 0.9773972034 0.9694594145
+ 0.9750041962 0.9777275920 0.9699087143
+ 0.9753791094 0.9780579805 0.9703580141
+ 0.9757540226 0.9783884883 0.9708073139
+ 0.9761288762 0.9787188768 0.9712566137
+ 0.9765037894 0.9790493250 0.9717059135
+ 0.9768754840 0.9793767929 0.9721511006
+ 0.9772428274 0.9797003865 0.9725903869
+ 0.9776101112 0.9800240993 0.9730296731
+ 0.9779773951 0.9803476930 0.9734690785
+ 0.9783446789 0.9806714058 0.9739084244
+ 0.9787119031 0.9809949994 0.9743477702
+ 0.9790791869 0.9813187122 0.9747871161
+ 0.9794464707 0.9816424251 0.9752265215
+ 0.9798092246 0.9819620252 0.9756602049
+ 0.9801679254 0.9822781086 0.9760888815
+ 0.9805266261 0.9825941920 0.9765176177
+ 0.9808852077 0.9829102755 0.9769461751
+ 0.9812439084 0.9832264185 0.9773749113
+ 0.9816026092 0.9835425019 0.9778035879
+ 0.9819613099 0.9838585854 0.9782322049
+ 0.9823198915 0.9841747284 0.9786608815
+ 0.9826725125 0.9844858050 0.9790827036
+ 0.9830206037 0.9847931862 0.9794991016
+ 0.9833686948 0.9851006866 0.9799156189
+ 0.9837167263 0.9854081273 0.9803320765
+ 0.9840648174 0.9857155085 0.9807485938
+ 0.9844129086 0.9860228896 0.9811649919
+ 0.9847608805 0.9863303900 0.9815815091
+ 0.9851089716 0.9866377711 0.9819980264
+ 0.9854506254 0.9869400859 0.9824073911
+ 0.9857869148 0.9872382283 0.9828109741
+ 0.9861232042 0.9875363708 0.9832146168
+ 0.9864594936 0.9878345132 0.9836181998
+ 0.9867957830 0.9881327152 0.9840217233
+ 0.9871320724 0.9884307981 0.9844253063
+ 0.9874684215 0.9887290001 0.9848288894
+ 0.9878047109 0.9890270829 0.9852324724
+ 0.9881356955 0.9893202186 0.9856290817
+ 0.9884604216 0.9896075130 0.9860175252
+ 0.9887850881 0.9898949265 0.9864059091
+ 0.9891096950 0.9901822209 0.9867942929
+ 0.9894344211 0.9904695153 0.9871826768
+ 0.9897590876 0.9907568097 0.9875711203
+ 0.9900838137 0.9910441041 0.9879595041
+ 0.9904084802 0.9913313985 0.9883478880
+ 0.9907290936 0.9916148782 0.9887315035
+ 0.9910402894 0.9918898940 0.9891040921
+ 0.9913514853 0.9921647906 0.9894766212
+ 0.9916628003 0.9924398065 0.9898492098
+ 0.9919739962 0.9927147031 0.9902216792
+ 0.9922851920 0.9929897189 0.9905943274
+ 0.9925965071 0.9932646751 0.9909667969
+ 0.9929077029 0.9935395718 0.9913393855
+ 0.9932175875 0.9938135147 0.9917104244
+ 0.9935122728 0.9940760732 0.9920637012
+ 0.9938070774 0.9943386912 0.9924169779
+ 0.9941018224 0.9946013093 0.9927703142
+ 0.9943966269 0.9948639274 0.9931235909
+ 0.9946913123 0.9951264858 0.9934769273
+ 0.9949861169 0.9953891039 0.9938303232
+ 0.9952808022 0.9956517220 0.9941835999
+ 0.9955756068 0.9959142804 0.9945368767
+ 0.9958524704 0.9961653948 0.9948744774
+ 0.9961246848 0.9964134097 0.9952080250
+ 0.9963967800 0.9966614842 0.9955413938
+ 0.9966689944 0.9969094992 0.9958748817
+ 0.9969412088 0.9971575141 0.9962083101
+ 0.9972134233 0.9974055886 0.9965417981
+ 0.9974855781 0.9976536036 0.9968752265
+ 0.9977576733 0.9979016185 0.9972087145
+ 0.9980192780 0.9981427789 0.9975314736
+ 0.9982668757 0.9983748794 0.9978399873
+ 0.9985144734 0.9986070991 0.9981486201
+ 0.9987620711 0.9988391995 0.9984571934
+ 0.9990097284 0.9990714192 0.9987657070
+ 0.9992572069 0.9993035197 0.9990742803
+ 0.9995048046 0.9995356798 0.9993829131
+ 0.9997524023 0.9997677803 0.9996914268
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_optima_ii_200.spi1d b/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_optima_ii_200.spi1d
new file mode 100644
index 00000000000..11a33289318
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_optima_ii_200.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0111121098 0.0121509498 0.0121509498
+ 0.0217311792 0.0234846398 0.0234846398
+ 0.0310309306 0.0335913785 0.0335913785
+ 0.0394427888 0.0427072011 0.0427072011
+ 0.0472172312 0.0510250889 0.0510250889
+ 0.0544895791 0.0587030984 0.0587030984
+ 0.0613539182 0.0658273399 0.0658273399
+ 0.0678610802 0.0724957809 0.0724957809
+ 0.0740588829 0.0787753463 0.0787753463
+ 0.0799922720 0.0847034305 0.0847034305
+ 0.0856926665 0.0903405622 0.0903405622
+ 0.0911944881 0.0957725719 0.0957725719
+ 0.0965085030 0.1010297015 0.1010297015
+ 0.1016504988 0.1061294973 0.1061294973
+ 0.1066408977 0.1110759974 0.1110759974
+ 0.1114827022 0.1158965006 0.1158965006
+ 0.1161810011 0.1205943003 0.1205943003
+ 0.1207583994 0.1251748055 0.1251748055
+ 0.1252014935 0.1296516955 0.1296516955
+ 0.1295239031 0.1340274960 0.1340274960
+ 0.1337441057 0.1383039951 0.1383039951
+ 0.1378667057 0.1424947977 0.1424947977
+ 0.1418835968 0.1466037929 0.1466037929
+ 0.1458135992 0.1506410986 0.1506410986
+ 0.1496558040 0.1545946002 0.1545946002
+ 0.1534211040 0.1584779024 0.1584779024
+ 0.1571090072 0.1622924954 0.1622924954
+ 0.1607228965 0.1660465002 0.1660465002
+ 0.1642647982 0.1697326005 0.1697326005
+ 0.1677455008 0.1733641028 0.1733641028
+ 0.1711609066 0.1769354939 0.1769354939
+ 0.1745131016 0.1804486960 0.1804486960
+ 0.1778111011 0.1839037985 0.1839037985
+ 0.1810566932 0.1873078942 0.1873078942
+ 0.1842480004 0.1906577051 0.1906577051
+ 0.1873922944 0.1939612031 0.1939612031
+ 0.1904910952 0.1972206980 0.1972206980
+ 0.1935475022 0.2004390955 0.2004390955
+ 0.1965657026 0.2036167979 0.2036167979
+ 0.1995460987 0.2067523003 0.2067523003
+ 0.2024825066 0.2098508030 0.2098508030
+ 0.2053820044 0.2129165977 0.2129165977
+ 0.2082439959 0.2159480006 0.2159480006
+ 0.2110687941 0.2189517021 0.2189517021
+ 0.2138601989 0.2219190001 0.2219190001
+ 0.2166164964 0.2248522043 0.2248522043
+ 0.2193437964 0.2277560979 0.2277560979
+ 0.2220394015 0.2306237966 0.2306237966
+ 0.2247070074 0.2334605008 0.2334605008
+ 0.2273449004 0.2362726033 0.2362726033
+ 0.2299581021 0.2390560061 0.2390560061
+ 0.2325424999 0.2418099940 0.2418099940
+ 0.2350990027 0.2445425987 0.2445425987
+ 0.2376336008 0.2472528070 0.2472528070
+ 0.2401454002 0.2499340028 0.2499340028
+ 0.2426387966 0.2525874972 0.2525874972
+ 0.2451128960 0.2552196980 0.2552196980
+ 0.2475619018 0.2578315139 0.2578315139
+ 0.2499863058 0.2604233027 0.2604233027
+ 0.2523908913 0.2629944980 0.2629944980
+ 0.2547743022 0.2655487061 0.2655487061
+ 0.2571432889 0.2680800855 0.2680800855
+ 0.2594946027 0.2705903947 0.2705903947
+ 0.2618246973 0.2730821967 0.2730821967
+ 0.2641352117 0.2755582929 0.2755582929
+ 0.2664259076 0.2780191004 0.2780191004
+ 0.2686997056 0.2804580927 0.2804580927
+ 0.2709574103 0.2828805149 0.2828805149
+ 0.2731972933 0.2852869034 0.2852869034
+ 0.2754215896 0.2876777947 0.2876777947
+ 0.2776325047 0.2900503874 0.2900503874
+ 0.2798275948 0.2924054861 0.2924054861
+ 0.2820053995 0.2947433889 0.2947433889
+ 0.2841629088 0.2970634997 0.2970634997
+ 0.2863053083 0.2993713021 0.2993713021
+ 0.2884348929 0.3016661108 0.3016661108
+ 0.2905501127 0.3039461970 0.3039461970
+ 0.2926583886 0.3062120080 0.3062120080
+ 0.2947568893 0.3084635139 0.3084635139
+ 0.2968437076 0.3106997013 0.3106997013
+ 0.2989166081 0.3129228055 0.3129228055
+ 0.3009737134 0.3151350021 0.3151350021
+ 0.3030146956 0.3173327148 0.3173327148
+ 0.3050420880 0.3195173144 0.3195173144
+ 0.3070568144 0.3216913044 0.3216913044
+ 0.3090623915 0.3238545060 0.3238545060
+ 0.3110578060 0.3260023892 0.3260023892
+ 0.3130468130 0.3281404078 0.3281404078
+ 0.3150278926 0.3302693069 0.3302693069
+ 0.3169982135 0.3323845863 0.3323845863
+ 0.3189576864 0.3344885111 0.3344885111
+ 0.3209047019 0.3365832865 0.3365832865
+ 0.3228406012 0.3386682868 0.3386682868
+ 0.3247657120 0.3407419920 0.3407419920
+ 0.3266789913 0.3428055942 0.3428055942
+ 0.3285810053 0.3448581100 0.3448581100
+ 0.3304736018 0.3468984962 0.3468984962
+ 0.3323583901 0.3489289880 0.3489289880
+ 0.3342367113 0.3509478867 0.3509478867
+ 0.3361082971 0.3529567122 0.3529567122
+ 0.3379718065 0.3549566865 0.3549566865
+ 0.3398267031 0.3569482863 0.3569482863
+ 0.3416717947 0.3589293957 0.3589293957
+ 0.3435060084 0.3609009981 0.3609009981
+ 0.3453314900 0.3628633916 0.3628633916
+ 0.3471463919 0.3648136854 0.3648136854
+ 0.3489513993 0.3667523861 0.3667523861
+ 0.3507472873 0.3686820865 0.3686820865
+ 0.3525382876 0.3706041873 0.3706041873
+ 0.3543233871 0.3725175858 0.3725175858
+ 0.3561016917 0.3744210899 0.3744210899
+ 0.3578726053 0.3763135970 0.3763135970
+ 0.3596351147 0.3781942129 0.3781942129
+ 0.3613910973 0.3800665140 0.3800665140
+ 0.3631403148 0.3819315135 0.3819315135
+ 0.3648819029 0.3837873042 0.3837873042
+ 0.3666147888 0.3856337070 0.3856337070
+ 0.3683386147 0.3874723017 0.3874723017
+ 0.3700559139 0.3893026114 0.3893026114
+ 0.3717651963 0.3911237121 0.3911237121
+ 0.3734667003 0.3929347992 0.3929347992
+ 0.3751592040 0.3947354853 0.3947354853
+ 0.3768459857 0.3965282142 0.3965282142
+ 0.3785249889 0.3983115852 0.3983115852
+ 0.3801974952 0.4000878930 0.4000878930
+ 0.3818610907 0.4018566012 0.4018566012
+ 0.3835192919 0.4036169052 0.4036169052
+ 0.3851707876 0.4053680897 0.4053680897
+ 0.3868159950 0.4071125984 0.4071125984
+ 0.3884536028 0.4088492990 0.4088492990
+ 0.3900853097 0.4105800986 0.4105800986
+ 0.3917112947 0.4123049974 0.4123049974
+ 0.3933308125 0.4140234888 0.4140234888
+ 0.3949447870 0.4157348871 0.4157348871
+ 0.3965539038 0.4174388051 0.4174388051
+ 0.3981573880 0.4191350937 0.4191350937
+ 0.3997552991 0.4208256006 0.4208256006
+ 0.4013460875 0.4225083888 0.4225083888
+ 0.4029329121 0.4241839945 0.4241839945
+ 0.4045143127 0.4258517921 0.4258517921
+ 0.4060910046 0.4275138080 0.4275138080
+ 0.4076623023 0.4291698933 0.4291698933
+ 0.4092277884 0.4308196008 0.4308196008
+ 0.4107879102 0.4324634969 0.4324634969
+ 0.4123404026 0.4340988100 0.4340988100
+ 0.4138863087 0.4357272089 0.4357272089
+ 0.4154250026 0.4373478889 0.4373478889
+ 0.4169568121 0.4389612079 0.4389612079
+ 0.4184818864 0.4405669868 0.4405669868
+ 0.4199990034 0.4421640933 0.4421640933
+ 0.4215070009 0.4437515140 0.4437515140
+ 0.4230087101 0.4453321993 0.4453321993
+ 0.4245057106 0.4469063878 0.4469063878
+ 0.4259983897 0.4484742880 0.4484742880
+ 0.4274863899 0.4500342011 0.4500342011
+ 0.4289681017 0.4515857995 0.4515857995
+ 0.4304446876 0.4531300068 0.4531300068
+ 0.4319162071 0.4546670914 0.4546670914
+ 0.4333826005 0.4561972916 0.4561972916
+ 0.4348441064 0.4577195942 0.4577195942
+ 0.4363026917 0.4592362046 0.4592362046
+ 0.4377590120 0.4607473016 0.4607473016
+ 0.4392131865 0.4622528851 0.4622528851
+ 0.4406625032 0.4637500048 0.4637500048
+ 0.4421091080 0.4652411938 0.4652411938
+ 0.4435526133 0.4667268991 0.4667268991
+ 0.4449920058 0.4682061076 0.4682061076
+ 0.4464268088 0.4696769118 0.4696769118
+ 0.4478574991 0.4711419940 0.4711419940
+ 0.4492841959 0.4726015031 0.4726015031
+ 0.4507060051 0.4740524888 0.4740524888
+ 0.4521220922 0.4754965901 0.4754965901
+ 0.4535340965 0.4769350886 0.4769350886
+ 0.4549413919 0.4783662856 0.4783662856
+ 0.4563410878 0.4797913134 0.4797913134
+ 0.4577364922 0.4812119901 0.4812119901
+ 0.4591276050 0.4826276898 0.4826276898
+ 0.4605121911 0.4840362966 0.4840362966
+ 0.4618934989 0.4854404926 0.4854404926
+ 0.4632714987 0.4868401885 0.4868401885
+ 0.4646422863 0.4882321954 0.4882321954
+ 0.4660094976 0.4896200001 0.4896200001
+ 0.4673734009 0.4910030961 0.4910030961
+ 0.4687319994 0.4923816025 0.4923816025
+ 0.4700880945 0.4937570095 0.4937570095
+ 0.4714413881 0.4951288104 0.4951288104
+ 0.4727892876 0.4964961112 0.4964961112
+ 0.4741345942 0.4978606999 0.4978606999
+ 0.4754764140 0.4992212057 0.4992212057
+ 0.4768131077 0.5005778074 0.5005778074
+ 0.4781472087 0.5019320250 0.5019320250
+ 0.4794766903 0.5032812953 0.5032812953
+ 0.4808017015 0.5046275854 0.5046275854
+ 0.4821242094 0.5059717894 0.5059717894
+ 0.4834404886 0.5073099732 0.5073099732
+ 0.4847536087 0.5086460710 0.5086460710
+ 0.4860630035 0.5099794865 0.5099794865
+ 0.4873664975 0.5113078952 0.5113078952
+ 0.4886673987 0.5126342773 0.5126342773
+ 0.4899624884 0.5139567852 0.5139567852
+ 0.4912536144 0.5152760744 0.5152760744
+ 0.4925413132 0.5165923238 0.5165923238
+ 0.4938223064 0.5179045796 0.5179045796
+ 0.4951008856 0.5192151070 0.5192151070
+ 0.4963732958 0.5205205083 0.5205205083
+ 0.4976417124 0.5218238235 0.5218238235
+ 0.4989061058 0.5231245160 0.5231245160
+ 0.5001640916 0.5244206190 0.5244206190
+ 0.5014199018 0.5257151127 0.5257151127
+ 0.5026680231 0.5270051956 0.5270051956
+ 0.5039132833 0.5282933712 0.5282933712
+ 0.5051530004 0.5295773745 0.5295773745
+ 0.5063877106 0.5308588743 0.5308588743
+ 0.5076187253 0.5321382880 0.5321382880
+ 0.5088446736 0.5334129930 0.5334129930
+ 0.5100693107 0.5346865058 0.5346865058
+ 0.5112869740 0.5359553099 0.5359553099
+ 0.5125030875 0.5372229815 0.5372229815
+ 0.5137143135 0.5384858847 0.5384858847
+ 0.5149223804 0.5397471189 0.5397471189
+ 0.5161263943 0.5410054922 0.5410054922
+ 0.5173262954 0.5422605872 0.5422605872
+ 0.5185235143 0.5435131192 0.5435131192
+ 0.5197150707 0.5447623730 0.5447623730
+ 0.5209047794 0.5460104942 0.5460104942
+ 0.5220907927 0.5472519994 0.5472519994
+ 0.5232760906 0.5484923720 0.5484923720
+ 0.5244560838 0.5497261286 0.5497261286
+ 0.5256354809 0.5509589911 0.5509589911
+ 0.5268111825 0.5521854162 0.5521854162
+ 0.5279856920 0.5534102917 0.5534102917
+ 0.5291559100 0.5546302199 0.5546302199
+ 0.5303248167 0.5558478832 0.5558478832
+ 0.5314909220 0.5570605993 0.5570605993
+ 0.5326548815 0.5582709908 0.5582709908
+ 0.5338155031 0.5594773889 0.5594773889
+ 0.5349742770 0.5606803298 0.5606803298
+ 0.5361307859 0.5618779063 0.5618779063
+ 0.5372846723 0.5630717278 0.5630717278
+ 0.5384358168 0.5642607808 0.5642607808
+ 0.5395848155 0.5654460788 0.5654460788
+ 0.5407317877 0.5666270256 0.5666270256
+ 0.5418760777 0.5678040981 0.5678040981
+ 0.5430176854 0.5689768791 0.5689768791
+ 0.5441573858 0.5701463819 0.5701463819
+ 0.5452948809 0.5713114142 0.5713114142
+ 0.5464299917 0.5724735260 0.5724735260
+ 0.5475621819 0.5736311078 0.5736311078
+ 0.5486928225 0.5747861266 0.5747861266
+ 0.5498210192 0.5759364963 0.5759364963
+ 0.5509474277 0.5770848989 0.5770848989
+ 0.5520703197 0.5782284141 0.5782284141
+ 0.5531921983 0.5793704987 0.5793704987
+ 0.5543109775 0.5805072188 0.5805072188
+ 0.5554292202 0.5816432238 0.5816432238
+ 0.5565428138 0.5827717781 0.5827717781
+ 0.5576562881 0.5839003921 0.5839003921
+ 0.5587658882 0.5850207806 0.5850207806
+ 0.5598756075 0.5861409903 0.5861409903
+ 0.5609806180 0.5872548819 0.5872548819
+ 0.5620849729 0.5883675814 0.5883675814
+ 0.5631865859 0.5894749165 0.5894749165
+ 0.5642871261 0.5905798078 0.5905798078
+ 0.5653848052 0.5916802287 0.5916802287
+ 0.5664801002 0.5927764773 0.5927764773
+ 0.5675740242 0.5938696861 0.5938696861
+ 0.5686653852 0.5949565172 0.5949565172
+ 0.5697557926 0.5960423946 0.5960423946
+ 0.5708405972 0.5971215963 0.5971215963
+ 0.5719254017 0.5982007980 0.5982007980
+ 0.5730047226 0.5992723107 0.5992723107
+ 0.5740836263 0.6003429890 0.6003429890
+ 0.5751580000 0.6014091969 0.6014091969
+ 0.5762305260 0.6024730802 0.6024730802
+ 0.5773004889 0.6035333276 0.6035333276
+ 0.5783671737 0.6045879722 0.6045879722
+ 0.5794330835 0.6056417823 0.6056417823
+ 0.5804936290 0.6066883802 0.6066883802
+ 0.5815541148 0.6077349782 0.6077349782
+ 0.5826098919 0.6087749004 0.6087749004
+ 0.5836648941 0.6098132730 0.6098132730
+ 0.5847159028 0.6108481884 0.6108481884
+ 0.5857632160 0.6118795872 0.6118795872
+ 0.5868092775 0.6129097939 0.6129097939
+ 0.5878490806 0.6139339209 0.6139339209
+ 0.5888888836 0.6149579883 0.6149579883
+ 0.5899229050 0.6159774065 0.6159774065
+ 0.5909554958 0.6169953942 0.6169953942
+ 0.5919851065 0.6180102229 0.6180102229
+ 0.5930107236 0.6190204024 0.6190204024
+ 0.5940359831 0.6200305223 0.6200305223
+ 0.5950549245 0.6210334897 0.6210334897
+ 0.5960736871 0.6220365167 0.6220365167
+ 0.5970885158 0.6230354905 0.6230354905
+ 0.5981007814 0.6240319014 0.6240319014
+ 0.5991119742 0.6250271201 0.6250271201
+ 0.6001179814 0.6260160208 0.6260160208
+ 0.6011241078 0.6270048022 0.6270048022
+ 0.6021257043 0.6279885173 0.6279885173
+ 0.6031255722 0.6289699078 0.6289699078
+ 0.6041241288 0.6299499273 0.6299499273
+ 0.6051182151 0.6309251785 0.6309251785
+ 0.6061123013 0.6319004297 0.6319004297
+ 0.6071022153 0.6328712106 0.6328712106
+ 0.6080906987 0.6338403821 0.6338403821
+ 0.6090779901 0.6348081827 0.6348081827
+ 0.6100609899 0.6357709169 0.6357709169
+ 0.6110439897 0.6367335916 0.6367335916
+ 0.6120234728 0.6376916766 0.6376916766
+ 0.6130014062 0.6386474967 0.6386474967
+ 0.6139786243 0.6396028996 0.6396028996
+ 0.6149513721 0.6405537724 0.6405537724
+ 0.6159241796 0.6415047050 0.6415047050
+ 0.6168935895 0.6424521804 0.6424521804
+ 0.6178600788 0.6433963180 0.6433963180
+ 0.6188266873 0.6443403959 0.6443403959
+ 0.6197869778 0.6452776790 0.6452776790
+ 0.6207470298 0.6462143064 0.6462143064
+ 0.6217051744 0.6471490860 0.6471490860
+ 0.6226593852 0.6480789185 0.6480789185
+ 0.6236134768 0.6490086913 0.6490086913
+ 0.6245638132 0.6499348283 0.6499348283
+ 0.6255118847 0.6508585811 0.6508585811
+ 0.6264600754 0.6517825127 0.6517825127
+ 0.6274017096 0.6527013183 0.6527013183
+ 0.6283431053 0.6536198854 0.6536198854
+ 0.6292824149 0.6545372009 0.6545372009
+ 0.6302164793 0.6554512978 0.6554512978
+ 0.6311504841 0.6563653946 0.6563653946
+ 0.6320812106 0.6572765708 0.6572765708
+ 0.6330093145 0.6581853032 0.6581853032
+ 0.6339374781 0.6590940952 0.6590940952
+ 0.6348599792 0.6599957943 0.6599957943
+ 0.6357815266 0.6608958244 0.6608958244
+ 0.6367025971 0.6617954969 0.6617954969
+ 0.6376188993 0.6626883149 0.6626883149
+ 0.6385352015 0.6635810733 0.6635810733
+ 0.6394497752 0.6644719243 0.6644719243
+ 0.6403601766 0.6653575897 0.6653575897
+ 0.6412705779 0.6662433147 0.6662433147
+ 0.6421788931 0.6671264172 0.6671264172
+ 0.6430848837 0.6680064797 0.6680064797
+ 0.6439908147 0.6688866019 0.6688866019
+ 0.6448925138 0.6697621942 0.6697621942
+ 0.6457918882 0.6706354022 0.6706354022
+ 0.6466913819 0.6715084910 0.6715084910
+ 0.6475862861 0.6723757982 0.6723757982
+ 0.6484801769 0.6732414961 0.6732414961
+ 0.6493741274 0.6741071939 0.6741071939
+ 0.6502627134 0.6749665737 0.6749665737
+ 0.6511508822 0.6758252978 0.6758252978
+ 0.6520388722 0.6766840219 0.6766840219
+ 0.6529223919 0.6775373220 0.6775373220
+ 0.6538059115 0.6783906221 0.6783906221
+ 0.6546888947 0.6792433858 0.6792433858
+ 0.6555675864 0.6800916791 0.6800916791
+ 0.6564462185 0.6809399128 0.6809399128
+ 0.6573243141 0.6817873716 0.6817873716
+ 0.6581990719 0.6826301217 0.6826301217
+ 0.6590738893 0.6834728122 0.6834728122
+ 0.6599478126 0.6843147278 0.6843147278
+ 0.6608172059 0.6851527095 0.6851527095
+ 0.6616867185 0.6859906912 0.6859906912
+ 0.6625552177 0.6868278980 0.6868278980
+ 0.6634197831 0.6876606941 0.6876606941
+ 0.6642844081 0.6884933710 0.6884933710
+ 0.6651483178 0.6893252730 0.6893252730
+ 0.6660085917 0.6901518106 0.6901518106
+ 0.6668688059 0.6909784079 0.6909784079
+ 0.6677287221 0.6918041706 0.6918041706
+ 0.6685851216 0.6926234961 0.6926234961
+ 0.6694415808 0.6934428215 0.6934428215
+ 0.6702979207 0.6942619085 0.6942619085
+ 0.6711509824 0.6950753927 0.6950753927
+ 0.6720041037 0.6958888769 0.6958888769
+ 0.6728572845 0.6967023015 0.6967023015
+ 0.6737046838 0.6975108981 0.6975108981
+ 0.6745517850 0.6983190179 0.6983190179
+ 0.6753988862 0.6991270781 0.6991270781
+ 0.6762413979 0.6999309063 0.6999309063
+ 0.6770828962 0.7007337213 0.7007337213
+ 0.6779245138 0.7015364766 0.7015364766
+ 0.6787626743 0.7023348808 0.7023348808
+ 0.6795991063 0.7031309009 0.7031309009
+ 0.6804355979 0.7039269209 0.7039269209
+ 0.6812698841 0.7047196031 0.7047196031
+ 0.6821017861 0.7055087090 0.7055087090
+ 0.6829338074 0.7062976956 0.7062976956
+ 0.6837641001 0.7070850730 0.7070850730
+ 0.6845905781 0.7078680992 0.7078680992
+ 0.6854171157 0.7086511850 0.7086511850
+ 0.6862432957 0.7094339728 0.7094339728
+ 0.6870644093 0.7102119923 0.7102119923
+ 0.6878855824 0.7109900117 0.7109900117
+ 0.6887066960 0.7117680907 0.7117680907
+ 0.6895229220 0.7125418782 0.7125418782
+ 0.6903378963 0.7133144736 0.7133144736
+ 0.6911528707 0.7140871286 0.7140871286
+ 0.6919643283 0.7148566246 0.7148566246
+ 0.6927723289 0.7156230807 0.7156230807
+ 0.6935803890 0.7163894773 0.7163894773
+ 0.6943870187 0.7171549797 0.7171549797
+ 0.6951882243 0.7179164886 0.7179164886
+ 0.6959893703 0.7186779976 0.7186779976
+ 0.6967905760 0.7194393873 0.7194393873
+ 0.6975867748 0.7201958895 0.7201958895
+ 0.6983821988 0.7209516168 0.7209516168
+ 0.6991776228 0.7217072248 0.7217072248
+ 0.6999700069 0.7224600911 0.7224600911
+ 0.7007597089 0.7232102752 0.7232102752
+ 0.7015494108 0.7239603996 0.7239603996
+ 0.7023385167 0.7247099280 0.7247099280
+ 0.7031233907 0.7254531980 0.7254531980
+ 0.7039083838 0.7261965275 0.7261965275
+ 0.7046933770 0.7269399166 0.7269399166
+ 0.7054750919 0.7276784778 0.7276784778
+ 0.7062553763 0.7284148932 0.7284148932
+ 0.7070357203 0.7291513085 0.7291513085
+ 0.7078148127 0.7298862934 0.7298862934
+ 0.7085903287 0.7306169271 0.7306169271
+ 0.7093657255 0.7313475013 0.7313475013
+ 0.7101411223 0.7320780158 0.7320780158
+ 0.7109115124 0.7328050733 0.7328050733
+ 0.7116804719 0.7335309982 0.7335309982
+ 0.7124493718 0.7342568040 0.7342568040
+ 0.7132170200 0.7349814773 0.7349814773
+ 0.7139806747 0.7357025146 0.7357025146
+ 0.7147443891 0.7364236116 0.7364236116
+ 0.7155081034 0.7371445894 0.7371445894
+ 0.7162681222 0.7378603816 0.7378603816
+ 0.7170267105 0.7385740280 0.7385740280
+ 0.7177852988 0.7392876148 0.7392876148
+ 0.7185432911 0.7400004268 0.7400004268
+ 0.7192980051 0.7407081723 0.7407081723
+ 0.7200527191 0.7414160967 0.7414160967
+ 0.7208074927 0.7421239018 0.7421239018
+ 0.7215601206 0.7428290248 0.7428290248
+ 0.7223110795 0.7435317039 0.7435317039
+ 0.7230620980 0.7442343831 0.7442343831
+ 0.7238131166 0.7449371815 0.7449371815
+ 0.7245600820 0.7456340194 0.7456340194
+ 0.7253068089 0.7463302016 0.7463302016
+ 0.7260534763 0.7470265031 0.7470265031
+ 0.7267987728 0.7477208972 0.7477208972
+ 0.7275406122 0.7484099865 0.7484099865
+ 0.7282822728 0.7490991950 0.7490991950
+ 0.7290241122 0.7497884035 0.7497884035
+ 0.7297623158 0.7504742146 0.7504742146
+ 0.7304981947 0.7511575818 0.7511575818
+ 0.7312340140 0.7518410087 0.7518410087
+ 0.7319697738 0.7525243759 0.7525243759
+ 0.7327011228 0.7532038093 0.7532038093
+ 0.7334318161 0.7538825870 0.7538825870
+ 0.7341625094 0.7545614839 0.7545614839
+ 0.7348924279 0.7552397847 0.7552397847
+ 0.7356168032 0.7559139729 0.7559139729
+ 0.7363412976 0.7565882802 0.7565882802
+ 0.7370656729 0.7572625279 0.7572625279
+ 0.7377883792 0.7579351068 0.7579351068
+ 0.7385078073 0.7586042881 0.7586042881
+ 0.7392271757 0.7592735291 0.7592735291
+ 0.7399466038 0.7599428296 0.7599428296
+ 0.7406626940 0.7606090903 0.7606090903
+ 0.7413759828 0.7612727880 0.7612727880
+ 0.7420892715 0.7619364262 0.7619364262
+ 0.7428025007 0.7626001239 0.7626001239
+ 0.7435113192 0.7632591724 0.7632591724
+ 0.7442179918 0.7639161944 0.7639161944
+ 0.7449247241 0.7645732164 0.7645732164
+ 0.7456315160 0.7652301788 0.7652301788
+ 0.7463331223 0.7658814788 0.7658814788
+ 0.7470337152 0.7665314078 0.7665314078
+ 0.7477343082 0.7671812773 0.7671812773
+ 0.7484349012 0.7678310871 0.7678310871
+ 0.7491310239 0.7684757710 0.7684757710
+ 0.7498267293 0.7691197991 0.7691197991
+ 0.7505223751 0.7697638273 0.7697638273
+ 0.7512180805 0.7704077959 0.7704077959
+ 0.7519093156 0.7710475922 0.7710475922
+ 0.7526003718 0.7716872096 0.7716872096
+ 0.7532914877 0.7723268270 0.7723268270
+ 0.7539826035 0.7729663849 0.7729663849
+ 0.7546687722 0.7736009955 0.7736009955
+ 0.7553548813 0.7742356062 0.7742356062
+ 0.7560411096 0.7748702168 0.7748702168
+ 0.7567272782 0.7755048275 0.7755048275
+ 0.7574092150 0.7761334777 0.7761334777
+ 0.7580910921 0.7767620087 0.7767620087
+ 0.7587730885 0.7773905993 0.7773905993
+ 0.7594550252 0.7780190706 0.7780190706
+ 0.7601323724 0.7786415219 0.7786415219
+ 0.7608097196 0.7792634964 0.7792634964
+ 0.7614868879 0.7798855901 0.7798855901
+ 0.7621641159 0.7805076241 0.7805076241
+ 0.7628363967 0.7811251283 0.7811251283
+ 0.7635082006 0.7817419171 0.7817419171
+ 0.7641798854 0.7823588252 0.7823588252
+ 0.7648516297 0.7829756141 0.7829756141
+ 0.7655196786 0.7835885286 0.7835885286
+ 0.7661867738 0.7842003107 0.7842003107
+ 0.7668539286 0.7848120928 0.7848120928
+ 0.7675210238 0.7854238749 0.7854238749
+ 0.7681856155 0.7860323191 0.7860323191
+ 0.7688488960 0.7866386771 0.7866386771
+ 0.7695121765 0.7872452140 0.7872452140
+ 0.7701753974 0.7878515720 0.7878515720
+ 0.7708364725 0.7884562016 0.7884562016
+ 0.7714951038 0.7890586853 0.7890586853
+ 0.7721537948 0.7896612287 0.7896612287
+ 0.7728124261 0.7902637124 0.7902637124
+ 0.7734698057 0.7908648252 0.7908648252
+ 0.7741237879 0.7914618850 0.7914618850
+ 0.7747778296 0.7920590043 0.7920590043
+ 0.7754318118 0.7926561832 0.7926561832
+ 0.7760856748 0.7932531834 0.7932531834
+ 0.7767338753 0.7938435078 0.7938435078
+ 0.7773820758 0.7944338918 0.7944338918
+ 0.7780303955 0.7950242162 0.7950242162
+ 0.7786785960 0.7956146002 0.7956146002
+ 0.7793235779 0.7962008715 0.7962008715
+ 0.7799674273 0.7967858911 0.7967858911
+ 0.7806112766 0.7973707914 0.7973707914
+ 0.7812551260 0.7979558110 0.7979558110
+ 0.7818971872 0.7985386252 0.7985386252
+ 0.7825371027 0.7991185188 0.7991185188
+ 0.7831770182 0.7996984124 0.7996984124
+ 0.7838168740 0.8002783060 0.8002783060
+ 0.7844563127 0.8008577824 0.8008577824
+ 0.7850909233 0.8014323711 0.8014323711
+ 0.7857254744 0.8020070791 0.8020070791
+ 0.7863600850 0.8025817871 0.8025817871
+ 0.7869946957 0.8031563759 0.8031563759
+ 0.7876250744 0.8037273288 0.8037273288
+ 0.7882537842 0.8042966127 0.8042966127
+ 0.7888823748 0.8048657775 0.8048657775
+ 0.7895110250 0.8054350019 0.8054350019
+ 0.7901381850 0.8060027957 0.8060027957
+ 0.7907618284 0.8065670133 0.8065670133
+ 0.7913854122 0.8071311116 0.8071311116
+ 0.7920088768 0.8076952100 0.8076952100
+ 0.7926325202 0.8082594275 0.8082594275
+ 0.7932527065 0.8088204861 0.8088204861
+ 0.7938721776 0.8093808889 0.8093808889
+ 0.7944917083 0.8099412918 0.8099412918
+ 0.7951111794 0.8105016947 0.8105016947
+ 0.7957289815 0.8110610247 0.8110610247
+ 0.7963436842 0.8116179109 0.8116179109
+ 0.7969583869 0.8121749163 0.8121749163
+ 0.7975730896 0.8127318025 0.8127318025
+ 0.7981876731 0.8132886887 0.8132886887
+ 0.7987986803 0.8138427734 0.8138427734
+ 0.7994089127 0.8143960834 0.8143960834
+ 0.8000190258 0.8149495125 0.8149495125
+ 0.8006290793 0.8155028224 0.8155028224
+ 0.8012378812 0.8160552979 0.8160552979
+ 0.8018423915 0.8166047931 0.8166047931
+ 0.8024469018 0.8171542883 0.8171542883
+ 0.8030514717 0.8177037835 0.8177037835
+ 0.8036559820 0.8182532787 0.8182532787
+ 0.8042569160 0.8187999725 0.8187999725
+ 0.8048557043 0.8193448782 0.8193448782
+ 0.8054544926 0.8198897839 0.8198897839
+ 0.8060532808 0.8204346895 0.8204346895
+ 0.8066521287 0.8209795952 0.8209795952
+ 0.8072462082 0.8215199113 0.8215199113
+ 0.8078402877 0.8220599890 0.8220599890
+ 0.8084343076 0.8226001859 0.8226001859
+ 0.8090283275 0.8231403232 0.8231403232
+ 0.8096209168 0.8236796260 0.8236796260
+ 0.8102098703 0.8242164254 0.8242164254
+ 0.8107990026 0.8247532248 0.8247532248
+ 0.8113880157 0.8252900839 0.8252900839
+ 0.8119770885 0.8258268833 0.8258268833
+ 0.8125630021 0.8263612986 0.8263612986
+ 0.8131465912 0.8268936872 0.8268936872
+ 0.8137301803 0.8274261951 0.8274261951
+ 0.8143138885 0.8279585838 0.8279585838
+ 0.8148974776 0.8284909725 0.8284909725
+ 0.8154776096 0.8290188909 0.8290188909
+ 0.8160567880 0.8295456767 0.8295456767
+ 0.8166360855 0.8300724030 0.8300724030
+ 0.8172153234 0.8305991888 0.8305991888
+ 0.8177946210 0.8311259151 0.8311259151
+ 0.8183705211 0.8316484094 0.8316484094
+ 0.8189464211 0.8321709037 0.8321709037
+ 0.8195223212 0.8326933980 0.8326933980
+ 0.8200982213 0.8332158923 0.8332158923
+ 0.8206732869 0.8337377906 0.8337377906
+ 0.8212442994 0.8342564106 0.8342564106
+ 0.8218153119 0.8347749710 0.8347749710
+ 0.8223863244 0.8352935910 0.8352935910
+ 0.8229573965 0.8358122706 0.8358122706
+ 0.8235266209 0.8363298774 0.8363298774
+ 0.8240911961 0.8368446231 0.8368446231
+ 0.8246557713 0.8373593092 0.8373593092
+ 0.8252205253 0.8378741145 0.8378741145
+ 0.8257851005 0.8383888006 0.8383888006
+ 0.8263477087 0.8389021754 0.8389021754
+ 0.8269069791 0.8394131064 0.8394131064
+ 0.8274661899 0.8399239779 0.8399239779
+ 0.8280254006 0.8404349089 0.8404349089
+ 0.8285846114 0.8409457803 0.8409457803
+ 0.8291420937 0.8414549232 0.8414549232
+ 0.8296970129 0.8419613242 0.8419613242
+ 0.8302518129 0.8424677253 0.8424677253
+ 0.8308066726 0.8429740071 0.8429740071
+ 0.8313614726 0.8434804082 0.8434804082
+ 0.8319147229 0.8439850211 0.8439850211
+ 0.8324651122 0.8444867730 0.8444867730
+ 0.8330155015 0.8449885845 0.8449885845
+ 0.8335660100 0.8454903960 0.8454903960
+ 0.8341163993 0.8459923267 0.8459923267
+ 0.8346651196 0.8464931250 0.8464931250
+ 0.8352108002 0.8469917774 0.8469917774
+ 0.8357564807 0.8474906087 0.8474906087
+ 0.8363021016 0.8479893804 0.8479893804
+ 0.8368477821 0.8484880924 0.8484880924
+ 0.8373925090 0.8489859104 0.8489859104
+ 0.8379346132 0.8494806290 0.8494806290
+ 0.8384767175 0.8499752879 0.8499752879
+ 0.8390188217 0.8504700065 0.8504700065
+ 0.8395608068 0.8509647250 0.8509647250
+ 0.8401023746 0.8514587879 0.8514587879
+ 0.8406404257 0.8519484997 0.8519484997
+ 0.8411784768 0.8524380922 0.8524380922
+ 0.8417165279 0.8529276848 0.8529276848
+ 0.8422545791 0.8534172773 0.8534172773
+ 0.8427925706 0.8539069295 0.8539069295
+ 0.8433259130 0.8543931246 0.8543931246
+ 0.8438590169 0.8548790812 0.8548790812
+ 0.8443921208 0.8553649783 0.8553649783
+ 0.8449252248 0.8558509946 0.8558509946
+ 0.8454583287 0.8563370109 0.8563370109
+ 0.8459873796 0.8568208218 0.8568208218
+ 0.8465151787 0.8573036194 0.8573036194
+ 0.8470429182 0.8577864766 0.8577864766
+ 0.8475707173 0.8582693934 0.8582693934
+ 0.8480983973 0.8587523103 0.8587523103
+ 0.8486241102 0.8592330217 0.8592330217
+ 0.8491476178 0.8597115278 0.8597115278
+ 0.8496711254 0.8601899147 0.8601899147
+ 0.8501945734 0.8606684208 0.8606684208
+ 0.8507180810 0.8611468077 0.8611468077
+ 0.8512408137 0.8616245985 0.8616245985
+ 0.8517602086 0.8620989919 0.8620989919
+ 0.8522796035 0.8625733852 0.8625733852
+ 0.8527989984 0.8630477786 0.8630477786
+ 0.8533183932 0.8635221720 0.8635221720
+ 0.8538377881 0.8639966249 0.8639966249
+ 0.8543522954 0.8644680977 0.8644680977
+ 0.8548657894 0.8649389744 0.8649389744
+ 0.8553792834 0.8654097915 0.8654097915
+ 0.8558928967 0.8658807278 0.8658807278
+ 0.8564063907 0.8663516045 0.8663516045
+ 0.8569173813 0.8668203950 0.8668203950
+ 0.8574250937 0.8672863841 0.8672863841
+ 0.8579329252 0.8677524924 0.8677524924
+ 0.8584406972 0.8682186007 0.8682186007
+ 0.8589485288 0.8686845899 0.8686845899
+ 0.8594563007 0.8691506982 0.8691506982
+ 0.8599594831 0.8696123958 0.8696123958
+ 0.8604626060 0.8700739741 0.8700739741
+ 0.8609657884 0.8705356121 0.8705356121
+ 0.8614689708 0.8709973097 0.8709973097
+ 0.8619722128 0.8714588881 0.8714588881
+ 0.8624734879 0.8719184995 0.8719184995
+ 0.8629732132 0.8723762035 0.8723762035
+ 0.8634728193 0.8728339076 0.8728339076
+ 0.8639724255 0.8732916117 0.8732916117
+ 0.8644720912 0.8737491965 0.8737491965
+ 0.8649716973 0.8742069006 0.8742069006
+ 0.8654679060 0.8746609092 0.8746609092
+ 0.8659641147 0.8751147985 0.8751147985
+ 0.8664603233 0.8755686283 0.8755686283
+ 0.8669564128 0.8760225177 0.8760225177
+ 0.8674526215 0.8764764071 0.8764764071
+ 0.8679472208 0.8769292831 0.8769292831
+ 0.8684396744 0.8773809075 0.8773809075
+ 0.8689323068 0.8778324723 0.8778324723
+ 0.8694248199 0.8782839775 0.8782839775
+ 0.8699172735 0.8787356019 0.8787356019
+ 0.8704097867 0.8791871071 0.8791871071
+ 0.8709002137 0.8796362281 0.8796362281
+ 0.8713902235 0.8800846934 0.8800846934
+ 0.8718801737 0.8805330992 0.8805330992
+ 0.8723701835 0.8809816241 0.8809816241
+ 0.8728601933 0.8814300895 0.8814300895
+ 0.8733496070 0.8818780184 0.8818780184
+ 0.8738359213 0.8823224902 0.8823224902
+ 0.8743221760 0.8827670217 0.8827670217
+ 0.8748083711 0.8832114935 0.8832114935
+ 0.8752946854 0.8836559057 0.8836559057
+ 0.8757808805 0.8841003776 0.8841003776
+ 0.8762651086 0.8845438957 0.8845438957
+ 0.8767464757 0.8849858046 0.8849858046
+ 0.8772279024 0.8854277730 0.8854277730
+ 0.8777093291 0.8858698010 0.8858698010
+ 0.8781906962 0.8863118291 0.8863118291
+ 0.8786721230 0.8867536783 0.8867536783
+ 0.8791509867 0.8871935010 0.8871935010
+ 0.8796287179 0.8876323104 0.8876323104
+ 0.8801062703 0.8880710006 0.8880710006
+ 0.8805840015 0.8885096908 0.8885096908
+ 0.8810616732 0.8889483809 0.8889483809
+ 0.8815392852 0.8893870711 0.8893870711
+ 0.8820139766 0.8898223042 0.8898223042
+ 0.8824881911 0.8902568817 0.8902568817
+ 0.8829622865 0.8906915188 0.8906915188
+ 0.8834365010 0.8911259770 0.8911259770
+ 0.8839107156 0.8915606141 0.8915606141
+ 0.8843848109 0.8919951916 0.8919951916
+ 0.8848553896 0.8924270868 0.8924270868
+ 0.8853260279 0.8928589821 0.8928589821
+ 0.8857964873 0.8932908773 0.8932908773
+ 0.8862671256 0.8937227726 0.8937227726
+ 0.8867377043 0.8941547275 0.8941547275
+ 0.8872079253 0.8945863247 0.8945863247
+ 0.8876746893 0.8950147033 0.8950147033
+ 0.8881413937 0.8954432011 0.8954432011
+ 0.8886082172 0.8958716989 0.8958716989
+ 0.8890749812 0.8963001966 0.8963001966
+ 0.8895418048 0.8967286944 0.8967286944
+ 0.8900079131 0.8971564770 0.8971564770
+ 0.8904703259 0.8975806832 0.8975806832
+ 0.8909326196 0.8980048895 0.8980048895
+ 0.8913949728 0.8984290957 0.8984290957
+ 0.8918573856 0.8988533020 0.8988533020
+ 0.8923196793 0.8992775083 0.8992775083
+ 0.8927813768 0.8997012973 0.8997012973
+ 0.8932392001 0.9001227021 0.9001227021
+ 0.8936970234 0.9005439878 0.9005439878
+ 0.8941549063 0.9009653926 0.9009653926
+ 0.8946127295 0.9013866782 0.9013866782
+ 0.8950704932 0.9018080831 0.9018080831
+ 0.8955280185 0.9022290707 0.9022290707
+ 0.8959823847 0.9026468992 0.9026468992
+ 0.8964369297 0.9030647278 0.9030647278
+ 0.8968912959 0.9034824967 0.9034824967
+ 0.8973457813 0.9039003253 0.9039003253
+ 0.8978002071 0.9043180943 0.9043180943
+ 0.8982545733 0.9047358036 0.9047358036
+ 0.8987048864 0.9051483870 0.9051483870
+ 0.8991550803 0.9055609107 0.9055609107
+ 0.8996052742 0.9059733152 0.9059733152
+ 0.9000555277 0.9063857794 0.9063857794
+ 0.9005057216 0.9067983031 0.9067983031
+ 0.9009559155 0.9072108269 0.9072108269
+ 0.9014015794 0.9076197743 0.9076197743
+ 0.9018465281 0.9080280066 0.9080280066
+ 0.9022914171 0.9084362984 0.9084362984
+ 0.9027363062 0.9088445902 0.9088445902
+ 0.9031810760 0.9092528820 0.9092528820
+ 0.9036260247 0.9096611738 0.9096611738
+ 0.9040681720 0.9100679755 0.9100679755
+ 0.9045090079 0.9104740024 0.9104740024
+ 0.9049497247 0.9108799100 0.9108799100
+ 0.9053903818 0.9112858772 0.9112858772
+ 0.9058312178 0.9116917849 0.9116917849
+ 0.9062718749 0.9120978117 0.9120978117
+ 0.9067112207 0.9125025868 0.9125025868
+ 0.9071481824 0.9129055142 0.9129055142
+ 0.9075852036 0.9133083820 0.9133083820
+ 0.9080221057 0.9137113094 0.9137113094
+ 0.9084591269 0.9141142964 0.9141142964
+ 0.9088960886 0.9145172238 0.9145172238
+ 0.9093328118 0.9149199128 0.9149199128
+ 0.9097660184 0.9153187871 0.9153187871
+ 0.9101991057 0.9157177210 0.9157177210
+ 0.9106323123 0.9161165953 0.9161165953
+ 0.9110653996 0.9165155292 0.9165155292
+ 0.9114986062 0.9169144034 0.9169144034
+ 0.9119318128 0.9173132777 0.9173132777
+ 0.9123622179 0.9177098274 0.9177098274
+ 0.9127916098 0.9181053042 0.9181053042
+ 0.9132210016 0.9185007811 0.9185007811
+ 0.9136503935 0.9188963175 0.9188963175
+ 0.9140797853 0.9192917943 0.9192917943
+ 0.9145091772 0.9196872711 0.9196872711
+ 0.9149373174 0.9200819731 0.9200819731
+ 0.9153624177 0.9204747081 0.9204747081
+ 0.9157875180 0.9208673835 0.9208673835
+ 0.9162126184 0.9212601781 0.9212601781
+ 0.9166377187 0.9216529131 0.9216529131
+ 0.9170628190 0.9220455885 0.9220455885
+ 0.9174879193 0.9224383831 0.9224383831
+ 0.9179093242 0.9228280187 0.9228280187
+ 0.9183300734 0.9232169986 0.9232169986
+ 0.9187508225 0.9236060977 0.9236060977
+ 0.9191715717 0.9239950776 0.9239950776
+ 0.9195923209 0.9243841171 0.9243841171
+ 0.9200131297 0.9247730970 0.9247730970
+ 0.9204329252 0.9251611829 0.9251611829
+ 0.9208505154 0.9255470037 0.9255470037
+ 0.9212682247 0.9259328842 0.9259328842
+ 0.9216858745 0.9263188243 0.9263188243
+ 0.9221035838 0.9267047048 0.9267047048
+ 0.9225212932 0.9270905852 0.9270905852
+ 0.9229388833 0.9274765253 0.9274765253
+ 0.9233536720 0.9278604984 0.9278604984
+ 0.9237673879 0.9282438755 0.9282438755
+ 0.9241812229 0.9286273122 0.9286273122
+ 0.9245948792 0.9290106893 0.9290106893
+ 0.9250087142 0.9293940067 0.9293940067
+ 0.9254223704 0.9297773838 0.9297773838
+ 0.9258356094 0.9301604033 0.9301604033
+ 0.9262446165 0.9305403829 0.9305403829
+ 0.9266535044 0.9309204221 0.9309204221
+ 0.9270625114 0.9313002825 0.9313002825
+ 0.9274715185 0.9316803217 0.9316803217
+ 0.9278804064 0.9320603013 0.9320603013
+ 0.9282894135 0.9324402213 0.9324402213
+ 0.9286968112 0.9328190088 0.9328190088
+ 0.9291023016 0.9331961274 0.9331961274
+ 0.9295076728 0.9335731864 0.9335731864
+ 0.9299131036 0.9339503050 0.9339503050
+ 0.9303184748 0.9343274236 0.9343274236
+ 0.9307240248 0.9347046018 0.9347046018
+ 0.9311293960 0.9350817204 0.9350817204
+ 0.9315326810 0.9354572296 0.9354572296
+ 0.9319350123 0.9358320832 0.9358320832
+ 0.9323372841 0.9362069964 0.9362069964
+ 0.9327396154 0.9365817904 0.9365817904
+ 0.9331418872 0.9369567037 0.9369567037
+ 0.9335442781 0.9373314977 0.9373314977
+ 0.9339466095 0.9377064109 0.9377064109
+ 0.9343459010 0.9380785227 0.9380785227
+ 0.9347448945 0.9384502172 0.9384502172
+ 0.9351438880 0.9388219118 0.9388219118
+ 0.9355428815 0.9391937256 0.9391937256
+ 0.9359418750 0.9395654202 0.9395654202
+ 0.9363409281 0.9399371147 0.9399371147
+ 0.9367398024 0.9403086901 0.9403086901
+ 0.9371359944 0.9406778812 0.9406778812
+ 0.9375321865 0.9410470128 0.9410470128
+ 0.9379284978 0.9414162040 0.9414162040
+ 0.9383246899 0.9417852759 0.9417852759
+ 0.9387210011 0.9421545267 0.9421545267
+ 0.9391171932 0.9425235987 0.9425235987
+ 0.9395130277 0.9428924918 0.9428924918
+ 0.9399057031 0.9432595968 0.9432595968
+ 0.9402983189 0.9436268210 0.9436268210
+ 0.9406909943 0.9439939260 0.9439939260
+ 0.9410837293 0.9443609715 0.9443609715
+ 0.9414764047 0.9447280765 0.9447280765
+ 0.9418690205 0.9450953007 0.9450953007
+ 0.9422609806 0.9454616904 0.9454616904
+ 0.9426497221 0.9458243847 0.9458243847
+ 0.9430382848 0.9461871982 0.9461871982
+ 0.9434270263 0.9465500116 0.9465500116
+ 0.9438155890 0.9469127059 0.9469127059
+ 0.9442042708 0.9472755194 0.9472755194
+ 0.9445928931 0.9476382732 0.9476382732
+ 0.9449806213 0.9480000734 0.9480000734
+ 0.9453629851 0.9483562708 0.9483562708
+ 0.9457452893 0.9487125278 0.9487125278
+ 0.9461275935 0.9490686059 0.9490686059
+ 0.9465098977 0.9494248033 0.9494248033
+ 0.9468922019 0.9497810006 0.9497810006
+ 0.9472745061 0.9501371980 0.9501371980
+ 0.9476562738 0.9504929781 0.9504929781
+ 0.9480308890 0.9508436918 0.9508436918
+ 0.9484055042 0.9511944056 0.9511944056
+ 0.9487801194 0.9515451193 0.9515451193
+ 0.9491547942 0.9518957734 0.9518957734
+ 0.9495294094 0.9522464871 0.9522464871
+ 0.9499040246 0.9525972009 0.9525972009
+ 0.9502785802 0.9529479146 0.9529479146
+ 0.9506484270 0.9532948732 0.9532948732
+ 0.9510179162 0.9536415935 0.9536415935
+ 0.9513872862 0.9539883733 0.9539883733
+ 0.9517567158 0.9543350935 0.9543350935
+ 0.9521262050 0.9546818137 0.9546818137
+ 0.9524955750 0.9550285935 0.9550285935
+ 0.9528651237 0.9553753138 0.9553753138
+ 0.9532322884 0.9557194710 0.9557194710
+ 0.9535986781 0.9560627937 0.9560627937
+ 0.9539651275 0.9564061165 0.9564061165
+ 0.9543313980 0.9567493796 0.9567493796
+ 0.9546977878 0.9570927024 0.9570927024
+ 0.9550641775 0.9574360251 0.9574360251
+ 0.9554306269 0.9577792883 0.9577792883
+ 0.9557952285 0.9581211805 0.9581211805
+ 0.9561576843 0.9584614038 0.9584614038
+ 0.9565201998 0.9588016272 0.9588016272
+ 0.9568827152 0.9591417909 0.9591417909
+ 0.9572451711 0.9594820142 0.9594820142
+ 0.9576076865 0.9598221183 0.9598221183
+ 0.9579702020 0.9601622820 0.9601622820
+ 0.9583321214 0.9605020285 0.9605020285
+ 0.9586902261 0.9608384967 0.9608384967
+ 0.9590482712 0.9611749053 0.9611749053
+ 0.9594063163 0.9615113735 0.9615113735
+ 0.9597644210 0.9618479013 0.9618479013
+ 0.9601225257 0.9621844292 0.9621844292
+ 0.9604805708 0.9625207782 0.9625207782
+ 0.9608386755 0.9628573060 0.9628573060
+ 0.9611936212 0.9631906748 0.9631906748
+ 0.9615474939 0.9635230899 0.9635230899
+ 0.9619014263 0.9638555050 0.9638555050
+ 0.9622552991 0.9641879201 0.9641879201
+ 0.9626091719 0.9645202756 0.9645202756
+ 0.9629632235 0.9648526907 0.9648526907
+ 0.9633170962 0.9651851058 0.9651851058
+ 0.9636694193 0.9655163288 0.9655163288
+ 0.9640185833 0.9658449292 0.9658449292
+ 0.9643678069 0.9661735892 0.9661735892
+ 0.9647169709 0.9665021896 0.9665021896
+ 0.9650661945 0.9668309093 0.9668309093
+ 0.9654154181 0.9671595097 0.9671595097
+ 0.9657645822 0.9674882293 0.9674882293
+ 0.9661138058 0.9678168297 0.9678168297
+ 0.9664589763 0.9681419134 0.9681419134
+ 0.9668033123 0.9684662819 0.9684662819
+ 0.9671475887 0.9687907100 0.9687907100
+ 0.9674918056 0.9691150784 0.9691150784
+ 0.9678360820 0.9694393873 0.9694393873
+ 0.9681804180 0.9697638154 0.9697638154
+ 0.9685246944 0.9700881839 0.9700881839
+ 0.9688677788 0.9704114199 0.9704114199
+ 0.9692075849 0.9707313180 0.9707313180
+ 0.9695475101 0.9710512161 0.9710512161
+ 0.9698873162 0.9713711143 0.9713711143
+ 0.9702271223 0.9716910124 0.9716910124
+ 0.9705669284 0.9720107913 0.9720107913
+ 0.9709066749 0.9723306894 0.9723306894
+ 0.9712464809 0.9726505876 0.9726505876
+ 0.9715837240 0.9729676843 0.9729676843
+ 0.9719191790 0.9732831717 0.9732831717
+ 0.9722548127 0.9735987186 0.9735987186
+ 0.9725903869 0.9739142060 0.9739142060
+ 0.9729259014 0.9742296934 0.9742296934
+ 0.9732614756 0.9745451808 0.9745451808
+ 0.9735971093 0.9748606086 0.9748606086
+ 0.9739326239 0.9751760960 0.9751760960
+ 0.9742640257 0.9754871130 0.9754871130
+ 0.9745951295 0.9757977724 0.9757977724
+ 0.9749261737 0.9761084914 0.9761084914
+ 0.9752572775 0.9764190912 0.9764190912
+ 0.9755883813 0.9767298102 0.9767298102
+ 0.9759194851 0.9770405293 0.9770405293
+ 0.9762505889 0.9773511291 0.9773511291
+ 0.9765807986 0.9776608944 0.9776608944
+ 0.9769067764 0.9779667258 0.9779667258
+ 0.9772328138 0.9782724977 0.9782724977
+ 0.9775589108 0.9785783291 0.9785783291
+ 0.9778848886 0.9788841009 0.9788841009
+ 0.9782109261 0.9791898727 0.9791898727
+ 0.9785370231 0.9794957042 0.9794957042
+ 0.9788630009 0.9798014164 0.9798014164
+ 0.9791870713 0.9801052809 0.9801052809
+ 0.9795076847 0.9804059267 0.9804059267
+ 0.9798284173 0.9807065129 0.9807065129
+ 0.9801490903 0.9810069799 0.9810069799
+ 0.9804697037 0.9813076258 0.9813076258
+ 0.9807903767 0.9816082120 0.9816082120
+ 0.9811111093 0.9819087982 0.9819087982
+ 0.9814317226 0.9822093248 0.9822093248
+ 0.9817494154 0.9825072885 0.9825072885
+ 0.9820637703 0.9828022718 0.9828022718
+ 0.9823781848 0.9830973148 0.9830973148
+ 0.9826925993 0.9833922982 0.9833922982
+ 0.9830070138 0.9836874008 0.9836874008
+ 0.9833214283 0.9839823842 0.9839823842
+ 0.9836357236 0.9842774272 0.9842774272
+ 0.9839500785 0.9845724106 0.9845724106
+ 0.9842607975 0.9848645926 0.9848645926
+ 0.9845681787 0.9851542115 0.9851542115
+ 0.9848756194 0.9854437709 0.9854437709
+ 0.9851830006 0.9857333899 0.9857333899
+ 0.9854903817 0.9860230088 0.9860230088
+ 0.9857978225 0.9863126874 0.9863126874
+ 0.9861052036 0.9866023064 0.9866023064
+ 0.9864125848 0.9868919253 0.9868919253
+ 0.9867162704 0.9871780872 0.9871780872
+ 0.9870163798 0.9874610901 0.9874610901
+ 0.9873164892 0.9877440929 0.9877440929
+ 0.9876165986 0.9880272150 0.9880272150
+ 0.9879167080 0.9883102179 0.9883102179
+ 0.9882168174 0.9885932207 0.9885932207
+ 0.9885169268 0.9888762236 0.9888762236
+ 0.9888169765 0.9891592264 0.9891592264
+ 0.9891130924 0.9894391894 0.9894391894
+ 0.9894037247 0.9897152781 0.9897152781
+ 0.9896944165 0.9899914265 0.9899914265
+ 0.9899849892 0.9902673960 0.9902673960
+ 0.9902756810 0.9905434847 0.9905434847
+ 0.9905663133 0.9908195734 0.9908195734
+ 0.9908568859 0.9910956025 0.9910956025
+ 0.9911475778 0.9913716912 0.9913716912
+ 0.9914352894 0.9916458726 0.9916458726
+ 0.9917153716 0.9919152260 0.9919152260
+ 0.9919955134 0.9921845198 0.9921845198
+ 0.9922757149 0.9924538136 0.9924538136
+ 0.9925557971 0.9927231073 0.9927231073
+ 0.9928358793 0.9929924011 0.9929924011
+ 0.9931160808 0.9932618141 0.9932618141
+ 0.9933962226 0.9935311079 0.9935311079
+ 0.9936755896 0.9937998056 0.9937998056
+ 0.9939448833 0.9940592051 0.9940592051
+ 0.9942141175 0.9943186045 0.9943186045
+ 0.9944832921 0.9945781231 0.9945781231
+ 0.9947525263 0.9948375225 0.9948375225
+ 0.9950217009 0.9950969815 0.9950969815
+ 0.9952909946 0.9953563809 0.9953563809
+ 0.9955602288 0.9956158996 0.9956158996
+ 0.9958294034 0.9958752990 0.9958752990
+ 0.9960865974 0.9961261749 0.9961261749
+ 0.9963403940 0.9963746071 0.9963746071
+ 0.9965941906 0.9966229796 0.9966229796
+ 0.9968479276 0.9968714118 0.9968714118
+ 0.9971017241 0.9971197844 0.9971197844
+ 0.9973555207 0.9973682165 0.9973682165
+ 0.9976093173 0.9976165891 0.9976165891
+ 0.9978629947 0.9978650212 0.9978650212
+ 0.9981094003 0.9981083274 0.9981083274
+ 0.9983456731 0.9983447790 0.9983447790
+ 0.9985821247 0.9985812902 0.9985812902
+ 0.9988183975 0.9988176823 0.9988176823
+ 0.9990546703 0.9990541935 0.9990541935
+ 0.9992910028 0.9992905855 0.9992905855
+ 0.9995273948 0.9995270967 0.9995270967
+ 0.9997637272 0.9997634888 0.9997634888
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_ultra_050.spi1d b/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_ultra_050.spi1d
new file mode 100644
index 00000000000..bbfcdf7c804
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_ultra_050.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0261295997 0.0275282897 0.0193712804
+ 0.0436814092 0.0463444404 0.0334131084
+ 0.0581157207 0.0624009110 0.0459993482
+ 0.0707884133 0.0767784268 0.0574880093
+ 0.0822683722 0.0900187567 0.0680924430
+ 0.0928523093 0.1023626998 0.0779986978
+ 0.1027420014 0.1139826998 0.0873259678
+ 0.1121006012 0.1249416992 0.0962512568
+ 0.1209674031 0.1352714002 0.1049458012
+ 0.1293299943 0.1450500935 0.1134937033
+ 0.1372125000 0.1543603987 0.1219277978
+ 0.1446518004 0.1632550061 0.1302694976
+ 0.1517110020 0.1717393994 0.1385125965
+ 0.1584471017 0.1798606068 0.1466525048
+ 0.1648889929 0.1876538992 0.1546880007
+ 0.1710644960 0.1951581985 0.1626233011
+ 0.1769893020 0.2023999989 0.1704642028
+ 0.1826931983 0.2093926072 0.1781909019
+ 0.1881920993 0.2161574960 0.1858115941
+ 0.1935151964 0.2226887047 0.1933328062
+ 0.1986732930 0.2290194929 0.2007412016
+ 0.2036796063 0.2351579070 0.2080101967
+ 0.2085503936 0.2411172986 0.2151511014
+ 0.2132862955 0.2469058037 0.2221754044
+ 0.2178914994 0.2525430918 0.2290547043
+ 0.2223861068 0.2580389082 0.2357912064
+ 0.2267823070 0.2634046972 0.2423840016
+ 0.2310760021 0.2686296105 0.2488331944
+ 0.2352629006 0.2737227976 0.2551515996
+ 0.2393413931 0.2787044942 0.2613373995
+ 0.2433319986 0.2835777998 0.2673675120
+ 0.2472561002 0.2883430123 0.2732523978
+ 0.2511121929 0.2930105031 0.2790116072
+ 0.2549034059 0.2975909114 0.2846449912
+ 0.2586241066 0.3020789027 0.2901515961
+ 0.2622672915 0.3064748049 0.2955358922
+ 0.2658410072 0.3107773066 0.3008053899
+ 0.2693549097 0.3150070012 0.3059557974
+ 0.2728112042 0.3191769123 0.3109906018
+ 0.2762080133 0.3232814074 0.3159134090
+ 0.2795439959 0.3273217976 0.3207265139
+ 0.2828184962 0.3312951028 0.3254382014
+ 0.2860270143 0.3351995945 0.3300522864
+ 0.2891789079 0.3390446007 0.3345699012
+ 0.2922790051 0.3428247869 0.3389827907
+ 0.2953406870 0.3465405107 0.3433066905
+ 0.2983652055 0.3501957953 0.3475450873
+ 0.3013558090 0.3538022935 0.3517045081
+ 0.3043130934 0.3573650122 0.3557837009
+ 0.3072336018 0.3608897924 0.3597820997
+ 0.3101125956 0.3643819094 0.3637022078
+ 0.3129473925 0.3678374887 0.3675518930
+ 0.3157351017 0.3712525070 0.3713383079
+ 0.3184793890 0.3746286929 0.3750616014
+ 0.3211834133 0.3779700100 0.3787159920
+ 0.3238503933 0.3812797964 0.3823012114
+ 0.3264833987 0.3845624030 0.3858228922
+ 0.3290852010 0.3878163993 0.3892802894
+ 0.3316572905 0.3910405934 0.3926731944
+ 0.3341959119 0.3942339122 0.3960165083
+ 0.3367032111 0.3973953128 0.3993082047
+ 0.3391802907 0.4005222023 0.4025487006
+ 0.3416261971 0.4036155939 0.4057467878
+ 0.3440423906 0.4066751897 0.4088996053
+ 0.3464320898 0.4097003937 0.4120030999
+ 0.3487968147 0.4126878977 0.4150581956
+ 0.3511416912 0.4156408012 0.4180706143
+ 0.3534660041 0.4185580909 0.4210394919
+ 0.3557670116 0.4214420021 0.4239597917
+ 0.3580501974 0.4243034124 0.4268440902
+ 0.3603110015 0.4271419048 0.4296903014
+ 0.3625530899 0.4299592078 0.4325061142
+ 0.3647739887 0.4327593148 0.4352906942
+ 0.3669759929 0.4355489016 0.4380438924
+ 0.3691574037 0.4383288026 0.4407683015
+ 0.3713135123 0.4410988092 0.4434654117
+ 0.3734453022 0.4438571036 0.4461325109
+ 0.3755545914 0.4466049075 0.4487735927
+ 0.3776372969 0.4493390918 0.4513854980
+ 0.3797005117 0.4520614147 0.4539698958
+ 0.3817447126 0.4547702968 0.4565226138
+ 0.3837673068 0.4574646056 0.4590449929
+ 0.3857727945 0.4601452947 0.4615412056
+ 0.3877620995 0.4628106952 0.4640046060
+ 0.3897323012 0.4654597938 0.4664371908
+ 0.3916867077 0.4680936038 0.4688445032
+ 0.3936245143 0.4707117081 0.4712260067
+ 0.3955442011 0.4733099043 0.4735803902
+ 0.3974477053 0.4758862853 0.4759103060
+ 0.3993369937 0.4784410894 0.4782153070
+ 0.4012120068 0.4809744954 0.4804973900
+ 0.4030661881 0.4834777117 0.4827564061
+ 0.4049043059 0.4859539866 0.4849967062
+ 0.4067262113 0.4884032905 0.4872167110
+ 0.4085322917 0.4908267856 0.4894092977
+ 0.4103249907 0.4932255149 0.4915755093
+ 0.4121057093 0.4955982864 0.4937163889
+ 0.4138723910 0.4979467094 0.4958330989
+ 0.4156245887 0.5002682805 0.4979225099
+ 0.4173628986 0.5025631189 0.4999859035
+ 0.4190871119 0.5048316121 0.5020250082
+ 0.4207980931 0.5070779920 0.5040426254
+ 0.4224953055 0.5093029141 0.5060408115
+ 0.4241782129 0.5115067959 0.5080217719
+ 0.4258452058 0.5136871934 0.5099846721
+ 0.4274975955 0.5158441067 0.5119276047
+ 0.4291372001 0.5179803967 0.5138525963
+ 0.4307664931 0.5200970173 0.5157613158
+ 0.4323846996 0.5221933722 0.5176572204
+ 0.4339928925 0.5242717862 0.5195353031
+ 0.4355897009 0.5263323784 0.5213940144
+ 0.4371742010 0.5283774137 0.5232350826
+ 0.4387458861 0.5304070115 0.5250611901
+ 0.4403051138 0.5324196219 0.5268712044
+ 0.4418540895 0.5344129205 0.5286645889
+ 0.4433917105 0.5363882184 0.5304409266
+ 0.4449174106 0.5383464098 0.5322008729
+ 0.4464308918 0.5402891040 0.5339469910
+ 0.4479325116 0.5422176123 0.5356794000
+ 0.4494239092 0.5441330075 0.5373972058
+ 0.4509055912 0.5460358262 0.5391005874
+ 0.4523760974 0.5479230881 0.5407894254
+ 0.4538336098 0.5497955084 0.5424653888
+ 0.4552780986 0.5516521931 0.5441265702
+ 0.4567125142 0.5534964204 0.5457723737
+ 0.4581381083 0.5553289056 0.5474044085
+ 0.4595550001 0.5571491718 0.5490232706
+ 0.4609611034 0.5589544773 0.5506296158
+ 0.4623560905 0.5607442260 0.5522220135
+ 0.4637416899 0.5625196099 0.5537992120
+ 0.4651190937 0.5642817020 0.5553634167
+ 0.4664886892 0.5660303235 0.5569143295
+ 0.4678488970 0.5677667856 0.5584530830
+ 0.4691990018 0.5694890022 0.5599805117
+ 0.4705401957 0.5711963773 0.5614979267
+ 0.4718737006 0.5728896260 0.5630066991
+ 0.4731974900 0.5745667219 0.5645061731
+ 0.4745135009 0.5762310028 0.5659909844
+ 0.4758217931 0.5778843760 0.5674638748
+ 0.4771224856 0.5795271993 0.5689262748
+ 0.4784156084 0.5811589956 0.5703796744
+ 0.4796993136 0.5827751756 0.5718243718
+ 0.4809752107 0.5843808055 0.5732576847
+ 0.4822460115 0.5859761834 0.5746794939
+ 0.4835121036 0.5875607729 0.5760902762
+ 0.4847720861 0.5891314745 0.5774900913
+ 0.4860242903 0.5906872153 0.5788798928
+ 0.4872705042 0.5922328234 0.5802617073
+ 0.4885112047 0.5937690735 0.5816357136
+ 0.4897463918 0.5952950716 0.5830007195
+ 0.4909757972 0.5968127251 0.5843585134
+ 0.4922001958 0.5983219147 0.5857095718
+ 0.4934197068 0.5998219848 0.5870532990
+ 0.4946334958 0.6013069153 0.5883836150
+ 0.4958420992 0.6027836800 0.5897060037
+ 0.4970462918 0.6042528749 0.5910214186
+ 0.4982447922 0.6057118773 0.5923281908
+ 0.4994386137 0.6071583033 0.5936253071
+ 0.5006300211 0.6085960865 0.5949164033
+ 0.5018193126 0.6100246906 0.5962014794
+ 0.5030052066 0.6114413142 0.5974758863
+ 0.5041871071 0.6128522754 0.5987439752
+ 0.5053647161 0.6142578721 0.6000061035
+ 0.5065345168 0.6156520247 0.6012579203
+ 0.5077012181 0.6170390844 0.6025043726
+ 0.5088649988 0.6184194088 0.6037459970
+ 0.5100249052 0.6197851896 0.6049779058
+ 0.5111827254 0.6211447716 0.6062039733
+ 0.5123385787 0.6224983931 0.6074249148
+ 0.5134863853 0.6238390207 0.6086357832
+ 0.5146304965 0.6251735091 0.6098436117
+ 0.5157698989 0.6265006065 0.6110476255
+ 0.5169038177 0.6278185248 0.6122431159
+ 0.5180357099 0.6291317940 0.6134337187
+ 0.5191645026 0.6304373145 0.6146162748
+ 0.5202901959 0.6317332983 0.6157922149
+ 0.5214136243 0.6330240965 0.6169643998
+ 0.5225296021 0.6343023181 0.6181287766
+ 0.5236412883 0.6355733275 0.6192877889
+ 0.5247489214 0.6368368864 0.6204416752
+ 0.5258507133 0.6380882263 0.6215860248
+ 0.5269507170 0.6393350959 0.6227265000
+ 0.5280470252 0.6405732036 0.6238588095
+ 0.5291407108 0.6418051720 0.6249852777
+ 0.5302323103 0.6430323720 0.6261076927
+ 0.5313162208 0.6442492008 0.6272221208
+ 0.5323973894 0.6454623938 0.6283330917
+ 0.5334717035 0.6466655731 0.6294345856
+ 0.5345426798 0.6478630900 0.6305302978
+ 0.5356101990 0.6490542889 0.6316205263
+ 0.5366739035 0.6502388120 0.6327043772
+ 0.5377362967 0.6514207721 0.6337860823
+ 0.5387936831 0.6525934935 0.6348581910
+ 0.5398488045 0.6537632942 0.6359266043
+ 0.5408974290 0.6549249887 0.6369863153
+ 0.5419415236 0.6560810804 0.6380411983
+ 0.5429813266 0.6572313905 0.6390917897
+ 0.5440160036 0.6583732963 0.6401355863
+ 0.5450487137 0.6595116258 0.6411771178
+ 0.5460764766 0.6606398225 0.6422092915
+ 0.5471035242 0.6617661715 0.6432397962
+ 0.5481255054 0.6628851295 0.6442614794
+ 0.5491452217 0.6640012264 0.6452804804
+ 0.5501583219 0.6651095748 0.6462923288
+ 0.5511676073 0.6662127972 0.6473004222
+ 0.5521715879 0.6673082113 0.6483036280
+ 0.5531716943 0.6683982015 0.6493026018
+ 0.5541684031 0.6694834828 0.6502984166
+ 0.5551614761 0.6705622077 0.6512870789
+ 0.5561527014 0.6716372967 0.6522722840
+ 0.5571410060 0.6727038026 0.6532505155
+ 0.5581284165 0.6737673879 0.6542266011
+ 0.5591105223 0.6748213768 0.6551975012
+ 0.5600913763 0.6758732796 0.6561676264
+ 0.5610644817 0.6769148111 0.6571305990
+ 0.5620365143 0.6779549718 0.6580929756
+ 0.5630018115 0.6789849997 0.6590462923
+ 0.5639665723 0.6800143123 0.6599991918
+ 0.5649260283 0.6810361147 0.6609457731
+ 0.5658853054 0.6820576191 0.6618922949
+ 0.5668407083 0.6830697060 0.6628310084
+ 0.5677961111 0.6840814948 0.6637696028
+ 0.5687469244 0.6850817800 0.6646987200
+ 0.5696974993 0.6860815883 0.6656274796
+ 0.5706422925 0.6870731711 0.6665499806
+ 0.5715867281 0.6880642176 0.6674721837
+ 0.5725247860 0.6890473962 0.6683868766
+ 0.5734621882 0.6900296211 0.6693009138
+ 0.5743951201 0.6910039783 0.6702064872
+ 0.5753269792 0.6919766068 0.6711105704
+ 0.5762560964 0.6929423809 0.6720092893
+ 0.5771843195 0.6939054728 0.6729062796
+ 0.5781095028 0.6948626041 0.6737989187
+ 0.5790330768 0.6958160996 0.6746891737
+ 0.5799536109 0.6967654824 0.6755756736
+ 0.5808709860 0.6977106929 0.6764587164
+ 0.5817859769 0.6986532807 0.6773390174
+ 0.5826966763 0.6995912194 0.6782149076
+ 0.5836061835 0.7005271912 0.6790891886
+ 0.5845115781 0.7014548779 0.6799582839
+ 0.5854169130 0.7023826241 0.6808270812
+ 0.5863186121 0.7033014894 0.6816880107
+ 0.5872203112 0.7042204142 0.6825488806
+ 0.5881202817 0.7051343918 0.6834049821
+ 0.5890197754 0.7060474157 0.6842601895
+ 0.5899165869 0.7069560289 0.6851115227
+ 0.5908117294 0.7078614831 0.6859601736
+ 0.5917043090 0.7087628841 0.6868060231
+ 0.5925924778 0.7096565962 0.6876469851
+ 0.5934802294 0.7105495930 0.6884872913
+ 0.5943630934 0.7114354968 0.6893228889
+ 0.5952460170 0.7123214006 0.6901584268
+ 0.5961257815 0.7132012248 0.6909888983
+ 0.5970050097 0.7140796185 0.6918182969
+ 0.5978829861 0.7149519920 0.6926438212
+ 0.5987598896 0.7158185244 0.6934657097
+ 0.5996358991 0.7166832089 0.6942861080
+ 0.6005082130 0.7175390124 0.6951001883
+ 0.6013805866 0.7183946967 0.6959143281
+ 0.6022471786 0.7192428708 0.6967222095
+ 0.6031126976 0.7200896144 0.6975290179
+ 0.6039757133 0.7209308743 0.6983324289
+ 0.6048358083 0.7217659950 0.6991323233
+ 0.6056957245 0.7226004004 0.6999315023
+ 0.6065520048 0.7234249711 0.7007243037
+ 0.6074082851 0.7242496014 0.7015169859
+ 0.6082630754 0.7250695229 0.7023050785
+ 0.6091169715 0.7258870006 0.7030910850
+ 0.6099703908 0.7267029285 0.7038756013
+ 0.6108219028 0.7275134921 0.7046552896
+ 0.6116734743 0.7283241749 0.7054349184
+ 0.6125208139 0.7291293740 0.7062094212
+ 0.6133667827 0.7299330831 0.7069824934
+ 0.6142112017 0.7307348251 0.7077537179
+ 0.6150516868 0.7315317988 0.7085208297
+ 0.6158921719 0.7323288918 0.7092878222
+ 0.6167293787 0.7331209779 0.7100501060
+ 0.6175658107 0.7339118123 0.7108113170
+ 0.6184015274 0.7347002029 0.7115700245
+ 0.6192352176 0.7354820967 0.7123227715
+ 0.6200687885 0.7362639904 0.7130755782
+ 0.6209005713 0.7370405197 0.7138231993
+ 0.6217315793 0.7378150225 0.7145689726
+ 0.6225616932 0.7385885119 0.7153139710
+ 0.6233869195 0.7393574119 0.7160546780
+ 0.6242122054 0.7401263118 0.7167953849
+ 0.6250342131 0.7408906817 0.7175316215
+ 0.6258537173 0.7416514754 0.7182646990
+ 0.6266732216 0.7424122095 0.7189977765
+ 0.6274886131 0.7431641817 0.7197247744
+ 0.6283037066 0.7439156771 0.7204515934
+ 0.6291179061 0.7446653247 0.7211769223
+ 0.6299300790 0.7454105020 0.7218992710
+ 0.6307423115 0.7461556792 0.7226216197
+ 0.6315525770 0.7468963265 0.7233393788
+ 0.6323618293 0.7476344109 0.7240548134
+ 0.6331710219 0.7483724952 0.7247703075
+ 0.6339744925 0.7491027117 0.7254779935
+ 0.6347777843 0.7498325706 0.7261853814
+ 0.6355797052 0.7505611777 0.7268915772
+ 0.6363769770 0.7512856722 0.7275938988
+ 0.6371744275 0.7520102859 0.7282962799
+ 0.6379693747 0.7527318001 0.7289955020
+ 0.6387621760 0.7534502149 0.7296919227
+ 0.6395549774 0.7541685104 0.7303882241
+ 0.6403455138 0.7548798919 0.7310792208
+ 0.6411350965 0.7555885911 0.7317686081
+ 0.6419246793 0.7562974095 0.7324578762
+ 0.6427112222 0.7570006847 0.7331432104
+ 0.6434975863 0.7577037215 0.7338283062
+ 0.6442831755 0.7584059834 0.7345126271
+ 0.6450635195 0.7591038942 0.7351925969
+ 0.6458438039 0.7598018050 0.7358726263
+ 0.6466221809 0.7604972720 0.7365499139
+ 0.6473965049 0.7611867189 0.7372214794
+ 0.6481707096 0.7618761063 0.7378931046
+ 0.6489428878 0.7625625134 0.7385625839
+ 0.6497123837 0.7632448077 0.7392295003
+ 0.6504818797 0.7639272213 0.7398964167
+ 0.6512495279 0.7646067142 0.7405610085
+ 0.6520156264 0.7652835846 0.7412236929
+ 0.6527817249 0.7659605145 0.7418864965
+ 0.6535456181 0.7666330934 0.7425445914
+ 0.6543081999 0.7673028111 0.7432000041
+ 0.6550709009 0.7679725885 0.7438554168
+ 0.6558291912 0.7686370015 0.7445067167
+ 0.6565855742 0.7692987919 0.7451562285
+ 0.6573420167 0.7699605227 0.7458056808
+ 0.6580939889 0.7706184983 0.7464519739
+ 0.6588441133 0.7712748051 0.7470970154
+ 0.6595942974 0.7719311118 0.7477421165
+ 0.6603410244 0.7725834250 0.7483826876
+ 0.6610863209 0.7732340097 0.7490215898
+ 0.6618314981 0.7738845944 0.7496606112
+ 0.6625742912 0.7745307088 0.7502961755
+ 0.6633158922 0.7751746774 0.7509304881
+ 0.6640574932 0.7758187056 0.7515646815
+ 0.6647968292 0.7764587998 0.7521967888
+ 0.6655347943 0.7770963907 0.7528278232
+ 0.6662726998 0.7777339816 0.7534586787
+ 0.6670070887 0.7783685923 0.7540869117
+ 0.6677386165 0.7790005803 0.7547128797
+ 0.6684702039 0.7796326280 0.7553389072
+ 0.6691988707 0.7802624106 0.7559623122
+ 0.6699240804 0.7808893919 0.7565826774
+ 0.6706492901 0.7815164924 0.7572029829
+ 0.6713730097 0.7821415067 0.7578222752
+ 0.6720930934 0.7827615142 0.7584391832
+ 0.6728131771 0.7833815813 0.7590560913
+ 0.6735327840 0.7840009928 0.7596722841
+ 0.6742489934 0.7846158147 0.7602841854
+ 0.6749653220 0.7852305174 0.7608960867
+ 0.6756814718 0.7858452797 0.7615079880
+ 0.6763954163 0.7864570022 0.7621135712
+ 0.6771090031 0.7870684266 0.7627189159
+ 0.6778227091 0.7876799107 0.7633240819
+ 0.6785330772 0.7882875800 0.7639262080
+ 0.6792423129 0.7888938189 0.7645270228
+ 0.6799514294 0.7894999981 0.7651277781
+ 0.6806576848 0.7901020050 0.7657262087
+ 0.6813606024 0.7906988859 0.7663218975
+ 0.6820635200 0.7912957072 0.7669175863
+ 0.6827654839 0.7918915749 0.7675123215
+ 0.6834632158 0.7924820781 0.7681027055
+ 0.6841610074 0.7930727005 0.7686930895
+ 0.6848587990 0.7936632037 0.7692834735
+ 0.6855531931 0.7942507863 0.7698693871
+ 0.6862471104 0.7948378921 0.7704545856
+ 0.6869410276 0.7954249978 0.7710397840
+ 0.6876335144 0.7960084081 0.7716224790
+ 0.6883248091 0.7965881228 0.7722026706
+ 0.6890159845 0.7971677780 0.7727829218
+ 0.6897066236 0.7977464795 0.7733623981
+ 0.6903933287 0.7983182073 0.7739374042
+ 0.6910800934 0.7988898158 0.7745124102
+ 0.6917667985 0.7994614840 0.7750874162
+ 0.6924489737 0.8000293970 0.7756578922
+ 0.6931294799 0.8005958796 0.7762268782
+ 0.6938099861 0.8011624217 0.7767959237
+ 0.6944890022 0.8017272949 0.7773637772
+ 0.6951643825 0.8022881746 0.7779290080
+ 0.6958398223 0.8028491139 0.7784942985
+ 0.6965152025 0.8034101129 0.7790595293
+ 0.6971874237 0.8039643764 0.7796214223
+ 0.6978589892 0.8045170903 0.7801826000
+ 0.6985304952 0.8050699234 0.7807437778
+ 0.6992011070 0.8056213260 0.7813032866
+ 0.6998698711 0.8061696291 0.7818598151
+ 0.7005386949 0.8067178130 0.7824162841
+ 0.7012075186 0.8072661161 0.7829726934
+ 0.7018737197 0.8078114986 0.7835255265
+ 0.7025392056 0.8083561063 0.7840774059
+ 0.7032046914 0.8089007139 0.7846292853
+ 0.7038692236 0.8094440103 0.7851802707
+ 0.7045302987 0.8099824190 0.7857282162
+ 0.7051913738 0.8105208278 0.7862762213
+ 0.7058525085 0.8110591769 0.7868241072
+ 0.7065104842 0.8115934730 0.7873699069
+ 0.7071666718 0.8121252060 0.7879143953
+ 0.7078229189 0.8126569986 0.7884590030
+ 0.7084791064 0.8131887913 0.7890034914
+ 0.7091314793 0.8137164712 0.7895429134
+ 0.7097837925 0.8142442107 0.7900823951
+ 0.7104362249 0.8147718906 0.7906218171
+ 0.7110877037 0.8152979016 0.7911595106
+ 0.7117375135 0.8158202767 0.7916939855
+ 0.7123872042 0.8163427114 0.7922285199
+ 0.7130370140 0.8168652058 0.7927629948
+ 0.7136846781 0.8173835278 0.7932949066
+ 0.7143312097 0.8178995252 0.7938255072
+ 0.7149778008 0.8184155226 0.7943559885
+ 0.7156242728 0.8189315200 0.7948865891
+ 0.7162669897 0.8194420934 0.7954136133
+ 0.7169092894 0.8199520707 0.7959402800
+ 0.7175515890 0.8204621077 0.7964671254
+ 0.7181931138 0.8209713101 0.7969928980
+ 0.7188305855 0.8214758039 0.7975142002
+ 0.7194681168 0.8219804168 0.7980353832
+ 0.7201055884 0.8224849105 0.7985566258
+ 0.7207418084 0.8229876161 0.7990764976
+ 0.7213757038 0.8234868050 0.7995939851
+ 0.7220094800 0.8239858747 0.8001114726
+ 0.7226433158 0.8244851232 0.8006290197
+ 0.7232757807 0.8249812126 0.8011451960
+ 0.7239069939 0.8254746199 0.8016602993
+ 0.7245383263 0.8259679079 0.8021754026
+ 0.7251694798 0.8264611959 0.8026905060
+ 0.7257997990 0.8269500136 0.8032016754
+ 0.7264295220 0.8274360895 0.8037108779
+ 0.7270591855 0.8279222846 0.8042200804
+ 0.7276890278 0.8284084797 0.8047292829
+ 0.7283164263 0.8288906813 0.8052350879
+ 0.7289428711 0.8293713927 0.8057398200
+ 0.7295694947 0.8298521042 0.8062443733
+ 0.7301961184 0.8303328753 0.8067491055
+ 0.7308188081 0.8308109045 0.8072515130
+ 0.7314406037 0.8312882185 0.8077533245
+ 0.7320623994 0.8317655921 0.8082550764
+ 0.7326841950 0.8322429061 0.8087568879
+ 0.7333028913 0.8327162862 0.8092550039
+ 0.7339209914 0.8331888914 0.8097522855
+ 0.7345389724 0.8336614966 0.8102496862
+ 0.7351570725 0.8341341019 0.8107470274
+ 0.7357730865 0.8346002102 0.8112403154
+ 0.7363885045 0.8350648880 0.8117327094
+ 0.7370039821 0.8355295062 0.8122249842
+ 0.7376194000 0.8359941244 0.8127173781
+ 0.7382336855 0.8364549279 0.8132079244
+ 0.7388474941 0.8369144201 0.8136978149
+ 0.7394614220 0.8373739719 0.8141875863
+ 0.7400751710 0.8378335238 0.8146774769
+ 0.7406880260 0.8382915258 0.8151652813
+ 0.7413002849 0.8387488127 0.8156523108
+ 0.7419126034 0.8392060995 0.8161392212
+ 0.7425248027 0.8396633863 0.8166260719
+ 0.7431349754 0.8401176929 0.8171094060
+ 0.7437434196 0.8405694962 0.8175901175
+ 0.7443519235 0.8410212994 0.8180707097
+ 0.7449604273 0.8414732218 0.8185513020
+ 0.7455673218 0.8419228196 0.8190304041
+ 0.7461718917 0.8423690200 0.8195071220
+ 0.7467764020 0.8428152204 0.8199838996
+ 0.7473809719 0.8432614207 0.8204606771
+ 0.7479851246 0.8437070847 0.8209370971
+ 0.7485867739 0.8441503048 0.8214123249
+ 0.7491886020 0.8445935845 0.8218876123
+ 0.7497903705 0.8450369239 0.8223627806
+ 0.7503920794 0.8454802036 0.8228381276
+ 0.7509921193 0.8459206223 0.8233087063
+ 0.7515920997 0.8463609219 0.8237791061
+ 0.7521920204 0.8468011022 0.8242496252
+ 0.7527918816 0.8472414017 0.8247200251
+ 0.7533906102 0.8476775289 0.8251867890
+ 0.7539888024 0.8481116891 0.8256520033
+ 0.7545868754 0.8485457897 0.8261172175
+ 0.7551851273 0.8489800096 0.8265823722
+ 0.7557817101 0.8494123220 0.8270465136
+ 0.7563759089 0.8498412967 0.8275086880
+ 0.7569699883 0.8502702713 0.8279709816
+ 0.7575641274 0.8506993055 0.8284332156
+ 0.7581582069 0.8511282802 0.8288952708
+ 0.7587482929 0.8515555859 0.8293542862
+ 0.7593383789 0.8519830108 0.8298131824
+ 0.7599285841 0.8524103165 0.8302720785
+ 0.7605187297 0.8528376222 0.8307309747
+ 0.7611069083 0.8532627225 0.8311864138
+ 0.7616940141 0.8536863923 0.8316398859
+ 0.7622811198 0.8541101217 0.8320934176
+ 0.7628682852 0.8545337915 0.8325468898
+ 0.7634549737 0.8549563885 0.8329998851
+ 0.7640401125 0.8553745747 0.8334509134
+ 0.7646251917 0.8557928205 0.8339020014
+ 0.7652102113 0.8562110066 0.8343530297
+ 0.7657952905 0.8566291928 0.8348039985
+ 0.7663789988 0.8570433855 0.8352537155
+ 0.7669621110 0.8574560881 0.8357028961
+ 0.7675452232 0.8578686714 0.8361520767
+ 0.7681282163 0.8582813144 0.8366013169
+ 0.7687104940 0.8586933017 0.8370494843
+ 0.7692893744 0.8591027856 0.8374937177
+ 0.7698683143 0.8595123291 0.8379380107
+ 0.7704473138 0.8599218130 0.8383821845
+ 0.7710261941 0.8603312969 0.8388264775
+ 0.7716023922 0.8607382774 0.8392679095
+ 0.7721772194 0.8611438274 0.8397077918
+ 0.7727519870 0.8615493774 0.8401476741
+ 0.7733268142 0.8619549870 0.8405876756
+ 0.7739014030 0.8623604178 0.8410274982
+ 0.7744730115 0.8627613187 0.8414660096
+ 0.7750446200 0.8631622195 0.8419045210
+ 0.7756162882 0.8635631800 0.8423430920
+ 0.7761878967 0.8639640808 0.8427816033
+ 0.7767586112 0.8643633723 0.8432186246
+ 0.7773280144 0.8647603989 0.8436536789
+ 0.7778974175 0.8651574254 0.8440887928
+ 0.7784668207 0.8655543923 0.8445239067
+ 0.7790362835 0.8659514189 0.8449590206
+ 0.7796040773 0.8663460016 0.8453900218
+ 0.7801712751 0.8667395711 0.8458197117
+ 0.7807385921 0.8671333194 0.8462492824
+ 0.7813057899 0.8675270081 0.8466789722
+ 0.7818729877 0.8679206967 0.8471086025
+ 0.7824358940 0.8683102727 0.8475356102
+ 0.7829989195 0.8686999083 0.8479626775
+ 0.7835618258 0.8690894842 0.8483896852
+ 0.7841247916 0.8694791198 0.8488166928
+ 0.7846866846 0.8698676229 0.8492432833
+ 0.7852454185 0.8702524900 0.8496683240
+ 0.7858040929 0.8706374168 0.8500934243
+ 0.7863628268 0.8710222244 0.8505184054
+ 0.7869215012 0.8714070916 0.8509433866
+ 0.7874788046 0.8717902899 0.8513662815
+ 0.7880342007 0.8721709847 0.8517863750
+ 0.7885895967 0.8725517988 0.8522065282
+ 0.7891449928 0.8729326129 0.8526266217
+ 0.7897003293 0.8733134270 0.8530467153
+ 0.7902544141 0.8736922145 0.8534634113
+ 0.7908074260 0.8740695715 0.8538776040
+ 0.7913604975 0.8744469285 0.8542917967
+ 0.7919135094 0.8748242259 0.8547059894
+ 0.7924665213 0.8752015829 0.8551203012
+ 0.7930179834 0.8755767941 0.8555328250
+ 0.7935686111 0.8759508729 0.8559445739
+ 0.7941192985 0.8763250709 0.8563563824
+ 0.7946699858 0.8766993284 0.8567680717
+ 0.7952206731 0.8770734072 0.8571798801
+ 0.7957680821 0.8774452806 0.8575891852
+ 0.7963144183 0.8778162003 0.8579975963
+ 0.7968606949 0.8781871796 0.8584060073
+ 0.7974069715 0.8785582185 0.8588144183
+ 0.7979531884 0.8789290786 0.8592228293
+ 0.7984963059 0.8792970777 0.8596280217
+ 0.7990381718 0.8796638846 0.8600320816
+ 0.7995802164 0.8800308108 0.8604362011
+ 0.8001220822 0.8803976774 0.8608403206
+ 0.8006640077 0.8807644844 0.8612444997
+ 0.8012034893 0.8811290264 0.8616467714
+ 0.8017420173 0.8814923167 0.8620483875
+ 0.8022804856 0.8818557262 0.8624501228
+ 0.8028190136 0.8822190762 0.8628516793
+ 0.8033574820 0.8825824857 0.8632534146
+ 0.8038944006 0.8829445243 0.8636533022
+ 0.8044304252 0.8833057880 0.8640521765
+ 0.8049663901 0.8836669922 0.8644511104
+ 0.8055024147 0.8840281963 0.8648499846
+ 0.8060383797 0.8843894005 0.8652489185
+ 0.8065730929 0.8847498894 0.8656460047
+ 0.8071064949 0.8851096034 0.8660413027
+ 0.8076400161 0.8854691982 0.8664366007
+ 0.8081734180 0.8858289123 0.8668318987
+ 0.8087068796 0.8861885071 0.8672271967
+ 0.8092389107 0.8865470290 0.8676213026
+ 0.8097679019 0.8869025707 0.8680127263
+ 0.8102967739 0.8872582912 0.8684040904
+ 0.8108258247 0.8876140118 0.8687955141
+ 0.8113546968 0.8879696727 0.8691868782
+ 0.8118832111 0.8883249760 0.8695781231
+ 0.8124076724 0.8886772990 0.8699674010
+ 0.8129323125 0.8890296221 0.8703566790
+ 0.8134567738 0.8893818855 0.8707460165
+ 0.8139812946 0.8897342086 0.8711354136
+ 0.8145058155 0.8900865912 0.8715246916
+ 0.8150272965 0.8904371858 0.8719115257
+ 0.8155483007 0.8907874227 0.8722978830
+ 0.8160691857 0.8911375999 0.8726842999
+ 0.8165901899 0.8914877772 0.8730705976
+ 0.8171110749 0.8918380141 0.8734570146
+ 0.8176307082 0.8921874762 0.8738412857
+ 0.8181489706 0.8925362229 0.8742238879
+ 0.8186672926 0.8928849101 0.8746063709
+ 0.8191856146 0.8932335973 0.8749889135
+ 0.8197038770 0.8935822845 0.8753713965
+ 0.8202217817 0.8939304948 0.8757534027
+ 0.8207373023 0.8942753077 0.8761324286
+ 0.8212528825 0.8946201801 0.8765113950
+ 0.8217685223 0.8949649930 0.8768904209
+ 0.8222841024 0.8953098059 0.8772693872
+ 0.8227996826 0.8956546187 0.8776484132
+ 0.8233128786 0.8959960938 0.8780251145
+ 0.8238251805 0.8963361979 0.8784009814
+ 0.8243374825 0.8966763020 0.8787769079
+ 0.8248497844 0.8970165253 0.8791527152
+ 0.8253620863 0.8973566294 0.8795285821
+ 0.8258733749 0.8976960182 0.8799036145
+ 0.8263819218 0.8980333209 0.8802763820
+ 0.8268905282 0.8983706236 0.8806490898
+ 0.8273990154 0.8987079263 0.8810219169
+ 0.8279076219 0.8990452886 0.8813946843
+ 0.8284161091 0.8993825912 0.8817673922
+ 0.8289219141 0.8997188807 0.8821375966
+ 0.8294265866 0.9000548124 0.8825070262
+ 0.8299313784 0.9003908038 0.8828763962
+ 0.8304362297 0.9007266760 0.8832458258
+ 0.8309410214 0.9010627270 0.8836151958
+ 0.8314452171 0.9013980031 0.8839840293
+ 0.8319470882 0.9017302990 0.8843502998
+ 0.8324490190 0.9020625949 0.8847165704
+ 0.8329507709 0.9023948908 0.8850830197
+ 0.8334527016 0.9027271867 0.8854492903
+ 0.8339545727 0.9030594826 0.8858156800
+ 0.8344553113 0.9033885002 0.8861801028
+ 0.8349552155 0.9037148952 0.8865432143
+ 0.8354550004 0.9040412903 0.8869063258
+ 0.8359549046 0.9043676853 0.8872693777
+ 0.8364546895 0.9046940804 0.8876324296
+ 0.8369545937 0.9050204754 0.8879954815
+ 0.8374524713 0.9053437710 0.8883556724
+ 0.8379502892 0.9056668282 0.8887156248
+ 0.8384481072 0.9059898257 0.8890755177
+ 0.8389458060 0.9063128233 0.8894352913
+ 0.8394436240 0.9066357017 0.8897951841
+ 0.8399409056 0.9069585204 0.8901546001
+ 0.8404362202 0.9072805047 0.8905115724
+ 0.8409314156 0.9076024294 0.8908686042
+ 0.8414266706 0.9079242945 0.8912255764
+ 0.8419219255 0.9082462192 0.8915826082
+ 0.8424171209 0.9085682034 0.8919395804
+ 0.8429111242 0.9088888168 0.8922954798
+ 0.8434032798 0.9092074037 0.8926500082
+ 0.8438953757 0.9095259905 0.8930044770
+ 0.8443875909 0.9098446965 0.8933590055
+ 0.8448796868 0.9101632833 0.8937134147
+ 0.8453719020 0.9104819894 0.8940678835
+ 0.8458622098 0.9107974172 0.8944209218
+ 0.8463512063 0.9111105800 0.8947728276
+ 0.8468402028 0.9114238024 0.8951247931
+ 0.8473293185 0.9117369056 0.8954768181
+ 0.8478183150 0.9120501280 0.8958287239
+ 0.8483073115 0.9123632908 0.8961806893
+ 0.8487946987 0.9126743078 0.8965306878
+ 0.8492814898 0.9129843712 0.8968799114
+ 0.8497682214 0.9132944942 0.8972290158
+ 0.8502548933 0.9136046171 0.8975781798
+ 0.8507416844 0.9139146805 0.8979274035
+ 0.8512284160 0.9142248034 0.8982766271
+ 0.8517140150 0.9145342708 0.8986228108
+ 0.8521993160 0.9148436785 0.8989682794
+ 0.8526844978 0.9151530266 0.8993136883
+ 0.8531697989 0.9154623747 0.8996590972
+ 0.8536550999 0.9157717228 0.9000046253
+ 0.8541402817 0.9160810113 0.9003499746
+ 0.8546243906 0.9163880944 0.9006927013
+ 0.8551082015 0.9166945219 0.9010347128
+ 0.8555920720 0.9170008898 0.9013767242
+ 0.8560758829 0.9173073173 0.9017186761
+ 0.8565596938 0.9176136851 0.9020606875
+ 0.8570435047 0.9179201126 0.9024026990
+ 0.8575248718 0.9182233214 0.9027428031
+ 0.8580054045 0.9185255170 0.9030823112
+ 0.8584859967 0.9188277125 0.9034218192
+ 0.8589665890 0.9191299081 0.9037613273
+ 0.8594471216 0.9194321036 0.9041007757
+ 0.8599277139 0.9197342992 0.9044402838
+ 0.8604061007 0.9200347066 0.9047783017
+ 0.8608834743 0.9203342199 0.9051156044
+ 0.8613607883 0.9206337929 0.9054529071
+ 0.8618381023 0.9209333062 0.9057902098
+ 0.8623154163 0.9212328196 0.9061275125
+ 0.8627927899 0.9215323925 0.9064648151
+ 0.8632687926 0.9218313098 0.9068005085
+ 0.8637437224 0.9221296906 0.9071345925
+ 0.8642185926 0.9224280119 0.9074686766
+ 0.8646935225 0.9227263927 0.9078028202
+ 0.8651683927 0.9230247736 0.9081369042
+ 0.8656433225 0.9233232141 0.9084709883
+ 0.8661177158 0.9236208200 0.9088042974
+ 0.8665909171 0.9239168167 0.9091358781
+ 0.8670641780 0.9242126942 0.9094673991
+ 0.8675373793 0.9245086908 0.9097989202
+ 0.8680106997 0.9248046279 0.9101303816
+ 0.8684839010 0.9251006246 0.9104620218
+ 0.8689571023 0.9253963828 0.9107934237
+ 0.8694286942 0.9256886244 0.9111229181
+ 0.8699004054 0.9259809256 0.9114524126
+ 0.8703719974 0.9262732267 0.9117819071
+ 0.8708435893 0.9265655279 0.9121115208
+ 0.8713153005 0.9268577099 0.9124410152
+ 0.8717868924 0.9271500111 0.9127705097
+ 0.8722561002 0.9274398088 0.9130979180
+ 0.8727244139 0.9277285933 0.9134243727
+ 0.8731926084 0.9280173182 0.9137510061
+ 0.8736609221 0.9283061028 0.9140775204
+ 0.8741291761 0.9285948873 0.9144040942
+ 0.8745974898 0.9288836718 0.9147307277
+ 0.8750646114 0.9291719198 0.9150562882
+ 0.8755295277 0.9294592738 0.9153801799
+ 0.8759943843 0.9297466278 0.9157040715
+ 0.8764593005 0.9300339222 0.9160280824
+ 0.8769242167 0.9303212166 0.9163519740
+ 0.8773891926 0.9306085110 0.9166759253
+ 0.8778541088 0.9308958054 0.9169998169
+ 0.8783167005 0.9311814904 0.9173220992
+ 0.8787789941 0.9314669967 0.9176442027
+ 0.8792414069 0.9317525029 0.9179663062
+ 0.8797037005 0.9320380092 0.9182885289
+ 0.8801661134 0.9323235154 0.9186105728
+ 0.8806284070 0.9326090217 0.9189326763
+ 0.8810901046 0.9328929186 0.9192541838
+ 0.8815506101 0.9331744909 0.9195749164
+ 0.8820111752 0.9334561825 0.9198955297
+ 0.8824717999 0.9337378144 0.9202160835
+ 0.8829324245 0.9340193868 0.9205368161
+ 0.8833928704 0.9343010783 0.9208574295
+ 0.8838534951 0.9345827103 0.9211781025
+ 0.8843126297 0.9348607063 0.9214954972
+ 0.8847714067 0.9351381063 0.9218124747
+ 0.8852301836 0.9354155064 0.9221295118
+ 0.8856890202 0.9356929064 0.9224464297
+ 0.8861477971 0.9359703064 0.9227634072
+ 0.8866065741 0.9362477064 0.9230803847
+ 0.8870645761 0.9365242720 0.9233967066
+ 0.8875198960 0.9367982149 0.9237111211
+ 0.8879752755 0.9370720983 0.9240254760
+ 0.8884305954 0.9373459816 0.9243398905
+ 0.8888859153 0.9376199245 0.9246544242
+ 0.8893412948 0.9378938079 0.9249687791
+ 0.8897966146 0.9381676912 0.9252831936
+ 0.8902500272 0.9384400249 0.9255968928
+ 0.8907018900 0.9387111068 0.9259101152
+ 0.8911538124 0.9389823079 0.9262232780
+ 0.8916056752 0.9392533898 0.9265365005
+ 0.8920575976 0.9395244718 0.9268497229
+ 0.8925095201 0.9397956133 0.9271628857
+ 0.8929613829 0.9400668144 0.9274761081
+ 0.8934110999 0.9403352737 0.9277874827
+ 0.8938602805 0.9406033158 0.9280986190
+ 0.8943095207 0.9408712983 0.9284096956
+ 0.8947588205 0.9411392808 0.9287207127
+ 0.8952080011 0.9414073229 0.9290317893
+ 0.8956571817 0.9416753054 0.9293429255
+ 0.8961064219 0.9419432282 0.9296538234
+ 0.8965536952 0.9422078133 0.9299619198
+ 0.8970010281 0.9424722791 0.9302698970
+ 0.8974484205 0.9427369237 0.9305778742
+ 0.8978956938 0.9430013895 0.9308859110
+ 0.8983430266 0.9432659149 0.9311940074
+ 0.8987902999 0.9435304999 0.9315019846
+ 0.8992372751 0.9437944889 0.9318097234
+ 0.8996827006 0.9440562725 0.9321159720
+ 0.9001281261 0.9443179965 0.9324222803
+ 0.9005734921 0.9445797801 0.9327287078
+ 0.9010189772 0.9448416233 0.9330350161
+ 0.9014644027 0.9451032877 0.9333413243
+ 0.9019098282 0.9453650713 0.9336475730
+ 0.9023545980 0.9456260204 0.9339538217
+ 0.9027975798 0.9458845258 0.9342594147
+ 0.9032405019 0.9461429715 0.9345651269
+ 0.9036834836 0.9464014769 0.9348707795
+ 0.9041265249 0.9466599822 0.9351763725
+ 0.9045695066 0.9469184875 0.9354820848
+ 0.9050124884 0.9471769929 0.9357876778
+ 0.9054549932 0.9474347234 0.9360926151
+ 0.9058961868 0.9476901293 0.9363955855
+ 0.9063374996 0.9479454756 0.9366984963
+ 0.9067788124 0.9482008815 0.9370014071
+ 0.9072200060 0.9484562874 0.9373043180
+ 0.9076613188 0.9487115741 0.9376072288
+ 0.9081025720 0.9489669800 0.9379101992
+ 0.9085432887 0.9492217898 0.9382125139
+ 0.9089823961 0.9494745135 0.9385129809
+ 0.9094215035 0.9497271776 0.9388133883
+ 0.9098604918 0.9499800205 0.9391139150
+ 0.9102995992 0.9502326846 0.9394143820
+ 0.9107387066 0.9504854083 0.9397147894
+ 0.9111778140 0.9507380724 0.9400153160
+ 0.9116166234 0.9509906173 0.9403156042
+ 0.9120534062 0.9512413144 0.9406144023
+ 0.9124903083 0.9514918923 0.9409132004
+ 0.9129270911 0.9517425895 0.9412119985
+ 0.9133639932 0.9519932866 0.9415107965
+ 0.9138007760 0.9522439837 0.9418095946
+ 0.9142376781 0.9524946809 0.9421083927
+ 0.9146745205 0.9527453780 0.9424071908
+ 0.9151092768 0.9529926777 0.9427046776
+ 0.9155439138 0.9532396197 0.9430022240
+ 0.9159784913 0.9534866214 0.9432995915
+ 0.9164131284 0.9537336230 0.9435970187
+ 0.9168477058 0.9539806247 0.9438943863
+ 0.9172822833 0.9542276263 0.9441918135
+ 0.9177169800 0.9544746280 0.9444893003
+ 0.9181497097 0.9547194839 0.9447842836
+ 0.9185816050 0.9549633861 0.9450783730
+ 0.9190135002 0.9552074075 0.9453724027
+ 0.9194452763 0.9554513097 0.9456663728
+ 0.9198771715 0.9556952715 0.9459604025
+ 0.9203091264 0.9559391737 0.9462544918
+ 0.9207410216 0.9561831951 0.9465485215
+ 0.9211720824 0.9564263821 0.9468415976
+ 0.9216020107 0.9566686153 0.9471331835
+ 0.9220318198 0.9569107294 0.9474248886
+ 0.9224616289 0.9571527839 0.9477164745
+ 0.9228914976 0.9573948979 0.9480081797
+ 0.9233213067 0.9576370120 0.9482998252
+ 0.9237511754 0.9578791857 0.9485914707
+ 0.9241809845 0.9581212997 0.9488831162
+ 0.9246084094 0.9583622217 0.9491736293
+ 0.9250357151 0.9586032033 0.9494642019
+ 0.9254630804 0.9588441253 0.9497547150
+ 0.9258903861 0.9590849876 0.9500452280
+ 0.9263178110 0.9593259096 0.9503356814
+ 0.9267451167 0.9595668912 0.9506263137
+ 0.9271724820 0.9598078132 0.9509168267
+ 0.9275984168 0.9600471854 0.9512062073
+ 0.9280232787 0.9602853060 0.9514948130
+ 0.9284480810 0.9605233073 0.9517832994
+ 0.9288728833 0.9607614279 0.9520719051
+ 0.9292978048 0.9609994888 0.9523603916
+ 0.9297226071 0.9612376094 0.9526489973
+ 0.9301474094 0.9614756703 0.9529374838
+ 0.9305720925 0.9617136121 0.9532259107
+ 0.9309926033 0.9619483948 0.9535105228
+ 0.9314129949 0.9621831179 0.9537950754
+ 0.9318335056 0.9624179006 0.9540796876
+ 0.9322540164 0.9626526237 0.9543642998
+ 0.9326745272 0.9628874063 0.9546489120
+ 0.9330949187 0.9631221294 0.9549335837
+ 0.9335154295 0.9633569121 0.9552181959
+ 0.9339327216 0.9635908008 0.9555017948
+ 0.9343463778 0.9638239145 0.9557842016
+ 0.9347600937 0.9640570283 0.9560666084
+ 0.9351738095 0.9642900229 0.9563490152
+ 0.9355874062 0.9645230770 0.9566314220
+ 0.9360011220 0.9647560716 0.9569138288
+ 0.9364147782 0.9649891853 0.9571961761
+ 0.9368284941 0.9652221799 0.9574785829
+ 0.9372366071 0.9654536247 0.9577592015
+ 0.9376435280 0.9656844735 0.9580392838
+ 0.9380503893 0.9659153223 0.9583194256
+ 0.9384573102 0.9661461711 0.9585996270
+ 0.9388641119 0.9663770795 0.9588797092
+ 0.9392709732 0.9666079879 0.9591597915
+ 0.9396778941 0.9668388963 0.9594399929
+ 0.9400843978 0.9670693874 0.9597195983
+ 0.9404869080 0.9672951102 0.9599938989
+ 0.9408894777 0.9675207734 0.9602683187
+ 0.9412919879 0.9677464962 0.9605426192
+ 0.9416946173 0.9679722190 0.9608169794
+ 0.9420971870 0.9681978822 0.9610913992
+ 0.9424996972 0.9684236050 0.9613656998
+ 0.9429023266 0.9686493278 0.9616401196
+ 0.9433040023 0.9688737988 0.9619129896
+ 0.9437037706 0.9690952897 0.9621827006
+ 0.9441037178 0.9693168998 0.9624524713
+ 0.9445034862 0.9695385098 0.9627221823
+ 0.9449033141 0.9697600007 0.9629918933
+ 0.9453032017 0.9699816108 0.9632616043
+ 0.9457030296 0.9702031016 0.9635313153
+ 0.9461029172 0.9704247117 0.9638010263
+ 0.9465014935 0.9706450105 0.9640696049
+ 0.9468985796 0.9708636999 0.9643365741
+ 0.9472957253 0.9710823298 0.9646036029
+ 0.9476928711 0.9713010192 0.9648706913
+ 0.9480900168 0.9715197086 0.9651377201
+ 0.9484871030 0.9717382789 0.9654048085
+ 0.9488843083 0.9719570279 0.9656717777
+ 0.9492813945 0.9721757174 0.9659388065
+ 0.9496768117 0.9723932743 0.9662050009
+ 0.9500706792 0.9726098180 0.9664703012
+ 0.9504644871 0.9728264213 0.9667354822
+ 0.9508582950 0.9730429053 0.9670007825
+ 0.9512521029 0.9732595086 0.9672660828
+ 0.9516459107 0.9734759927 0.9675313830
+ 0.9520397782 0.9736925960 0.9677966237
+ 0.9524335861 0.9739090800 0.9680619240
+ 0.9528253078 0.9741246104 0.9683256745
+ 0.9532151222 0.9743391275 0.9685881138
+ 0.9536048174 0.9745535254 0.9688504934
+ 0.9539945126 0.9747679830 0.9691128731
+ 0.9543843269 0.9749823809 0.9693753123
+ 0.9547740221 0.9751967788 0.9696376920
+ 0.9551637173 0.9754112959 0.9699000716
+ 0.9555534720 0.9756256938 0.9701625109
+ 0.9559414983 0.9758388996 0.9704235196
+ 0.9563273191 0.9760503173 0.9706826210
+ 0.9567130208 0.9762617946 0.9709417224
+ 0.9570987821 0.9764732122 0.9712008238
+ 0.9574846029 0.9766845703 0.9714599848
+ 0.9578703046 0.9768959880 0.9717190862
+ 0.9582561255 0.9771075249 0.9719781876
+ 0.9586418867 0.9773188829 0.9722372890
+ 0.9590265751 0.9775292873 0.9724956751
+ 0.9594085217 0.9777370095 0.9727519751
+ 0.9597904086 0.9779447913 0.9730082750
+ 0.9601722956 0.9781525135 0.9732645750
+ 0.9605541825 0.9783601761 0.9735208750
+ 0.9609361291 0.9785678983 0.9737771749
+ 0.9613180161 0.9787756801 0.9740334749
+ 0.9616999030 0.9789834023 0.9742897749
+ 0.9620816708 0.9791910052 0.9745460153
+ 0.9624596238 0.9793955088 0.9747992754
+ 0.9628375769 0.9796000719 0.9750527143
+ 0.9632155895 0.9798046947 0.9753059745
+ 0.9635934830 0.9800091982 0.9755592942
+ 0.9639714956 0.9802138209 0.9758126140
+ 0.9643493891 0.9804183841 0.9760659933
+ 0.9647274017 0.9806228876 0.9763193130
+ 0.9651054144 0.9808275104 0.9765725732
+ 0.9654802084 0.9810302258 0.9768230915
+ 0.9658539295 0.9812322855 0.9770727158
+ 0.9662274718 0.9814344049 0.9773222208
+ 0.9666011930 0.9816365242 0.9775717854
+ 0.9669749141 0.9818385839 0.9778214097
+ 0.9673485756 0.9820407033 0.9780709147
+ 0.9677222967 0.9822428226 0.9783204794
+ 0.9680960178 0.9824448824 0.9785699844
+ 0.9684677720 0.9826459289 0.9788182974
+ 0.9688364863 0.9828448296 0.9790642262
+ 0.9692050815 0.9830436707 0.9793102145
+ 0.9695736766 0.9832426906 0.9795560837
+ 0.9699423909 0.9834415913 0.9798020720
+ 0.9703109860 0.9836406112 0.9800480008
+ 0.9706795812 0.9838395119 0.9802939892
+ 0.9710482955 0.9840384126 0.9805399179
+ 0.9714168906 0.9842373729 0.9807859063
+ 0.9717804790 0.9844332933 0.9810283780
+ 0.9721437097 0.9846289158 0.9812706113
+ 0.9725068212 0.9848244786 0.9815129042
+ 0.9728699923 0.9850201011 0.9817550778
+ 0.9732331038 0.9852156043 0.9819973707
+ 0.9735962152 0.9854112267 0.9822396040
+ 0.9739593863 0.9856067896 0.9824817777
+ 0.9743224978 0.9858024120 0.9827240705
+ 0.9746835232 0.9859969020 0.9829645157
+ 0.9750407934 0.9861896038 0.9832020998
+ 0.9753981233 0.9863823056 0.9834396839
+ 0.9757553935 0.9865750074 0.9836772084
+ 0.9761127234 0.9867678285 0.9839147925
+ 0.9764701128 0.9869604707 0.9841523767
+ 0.9768273830 0.9871531725 0.9843899012
+ 0.9771847129 0.9873458743 0.9846274853
+ 0.9775419831 0.9875385761 0.9848651290
+ 0.9778943062 0.9877287149 0.9850988984
+ 0.9782450199 0.9879180193 0.9853315949
+ 0.9785957932 0.9881073236 0.9855642915
+ 0.9789465070 0.9882966280 0.9857969284
+ 0.9792972803 0.9884859920 0.9860296249
+ 0.9796479940 0.9886752963 0.9862623215
+ 0.9799987078 0.9888646007 0.9864950180
+ 0.9803494811 0.9890539050 0.9867277145
+ 0.9806995988 0.9892429113 0.9869599938
+ 0.9810422063 0.9894282222 0.9871879816
+ 0.9813848138 0.9896134138 0.9874159098
+ 0.9817274213 0.9897987247 0.9876437783
+ 0.9820700288 0.9899839163 0.9878718257
+ 0.9824125767 0.9901692271 0.9880996943
+ 0.9827551246 0.9903544188 0.9883276820
+ 0.9830976725 0.9905397296 0.9885556102
+ 0.9834402800 0.9907249212 0.9887835979
+ 0.9837800264 0.9909089208 0.9890096188
+ 0.9841130972 0.9910902977 0.9892314076
+ 0.9844462276 0.9912716150 0.9894531965
+ 0.9847792983 0.9914529920 0.9896751046
+ 0.9851124287 0.9916343093 0.9898968935
+ 0.9854454994 0.9918156266 0.9901186824
+ 0.9857786298 0.9919970036 0.9903404713
+ 0.9861117005 0.9921783209 0.9905623198
+ 0.9864447713 0.9923596978 0.9907841086
+ 0.9867734909 0.9925395250 0.9910029769
+ 0.9870970845 0.9927175045 0.9912183881
+ 0.9874207973 0.9928954840 0.9914339185
+ 0.9877445102 0.9930735230 0.9916493297
+ 0.9880681038 0.9932515025 0.9918648005
+ 0.9883918166 0.9934294820 0.9920802116
+ 0.9887155294 0.9936075211 0.9922956824
+ 0.9890391231 0.9937855005 0.9925110936
+ 0.9893627763 0.9939634800 0.9927266240
+ 0.9896805286 0.9941388965 0.9929388165
+ 0.9899929762 0.9943121076 0.9931482077
+ 0.9903056026 0.9944853187 0.9933575988
+ 0.9906181097 0.9946585298 0.9935669899
+ 0.9909306765 0.9948316813 0.9937765002
+ 0.9912433028 0.9950047731 0.9939858913
+ 0.9915558100 0.9951779842 0.9941952825
+ 0.9918683767 0.9953511953 0.9944046736
+ 0.9921808839 0.9955244064 0.9946141243
+ 0.9924861789 0.9956938028 0.9948195219
+ 0.9927850962 0.9958598018 0.9950211048
+ 0.9930838943 0.9960258007 0.9952228069
+ 0.9933826923 0.9961917996 0.9954243898
+ 0.9936814904 0.9963577986 0.9956260920
+ 0.9939802885 0.9965237975 0.9958277941
+ 0.9942790866 0.9966899157 0.9960293770
+ 0.9945780039 0.9968559146 0.9962310791
+ 0.9948768020 0.9970219135 0.9964327216
+ 0.9951673746 0.9971848130 0.9966300130
+ 0.9954472184 0.9973435998 0.9968215227
+ 0.9957271218 0.9975023866 0.9970129728
+ 0.9960069060 0.9976611733 0.9972046018
+ 0.9962868094 0.9978200197 0.9973961115
+ 0.9965665936 0.9979788065 0.9975876212
+ 0.9968464971 0.9981375933 0.9977790713
+ 0.9971262813 0.9982963800 0.9979707003
+ 0.9974061847 0.9984552264 0.9981622100
+ 0.9976803064 0.9986127019 0.9983515143
+ 0.9979380965 0.9987668991 0.9985346794
+ 0.9981958270 0.9989209771 0.9987179041
+ 0.9984536171 0.9990751743 0.9989010096
+ 0.9987112880 0.9992293119 0.9990841746
+ 0.9989690185 0.9993833899 0.9992673993
+ 0.9992268085 0.9995375872 0.9994505048
+ 0.9994844794 0.9996917248 0.9996337295
+ 0.9997423291 0.9998459220 0.9998167753
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_vista_100.spi1d b/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_vista_100.spi1d
new file mode 100644
index 00000000000..18c00d1d85b
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_vista_100.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0090248538 0.0088125290 0.0067258808
+ 0.0172150191 0.0167176109 0.0131098796
+ 0.0243747793 0.0235208403 0.0187523402
+ 0.0308876392 0.0297362003 0.0239069704
+ 0.0369180292 0.0355890803 0.0287567694
+ 0.0425458290 0.0411948487 0.0333772190
+ 0.0478529185 0.0466255695 0.0378036089
+ 0.0528910905 0.0519192591 0.0420932695
+ 0.0576865897 0.0571291298 0.0462520085
+ 0.0623513199 0.0622628704 0.0503120609
+ 0.0669768602 0.0672920421 0.0542953908
+ 0.0715567619 0.0721824616 0.0582090616
+ 0.0760855973 0.0769187585 0.0620570593
+ 0.0805741325 0.0815202296 0.0658472329
+ 0.0850307494 0.0859836414 0.0695805177
+ 0.0894547775 0.0903253108 0.0732729286
+ 0.0938297287 0.0945612267 0.0769176036
+ 0.0981539637 0.0986936092 0.0805180594
+ 0.1024200022 0.1027287021 0.0840807334
+ 0.1066194996 0.1066882983 0.0876046494
+ 0.1107435003 0.1105668023 0.0910888687
+ 0.1148013026 0.1143577993 0.0945325121
+ 0.1187836006 0.1180787012 0.0979359895
+ 0.1227072999 0.1217278987 0.1012983993
+ 0.1265697032 0.1253149062 0.1046219021
+ 0.1303700954 0.1288353056 0.1078997031
+ 0.1340970993 0.1322914958 0.1111387014
+ 0.1377590001 0.1356990933 0.1143449992
+ 0.1413495988 0.1390592009 0.1175180003
+ 0.1448680013 0.1423660964 0.1206526011
+ 0.1483224928 0.1456252038 0.1237441003
+ 0.1516993940 0.1488344073 0.1267928034
+ 0.1550139934 0.1519985944 0.1298023015
+ 0.1582762003 0.1551181972 0.1327774972
+ 0.1614779979 0.1581996977 0.1357243061
+ 0.1646181941 0.1612505019 0.1386376023
+ 0.1676993966 0.1642563939 0.1415113956
+ 0.1707275957 0.1672241986 0.1443507969
+ 0.1737034023 0.1701561958 0.1471655965
+ 0.1766317040 0.1730598062 0.1499509066
+ 0.1795026064 0.1759244055 0.1527041048
+ 0.1823239028 0.1787561029 0.1554242969
+ 0.1850987971 0.1815645993 0.1581097990
+ 0.1878297031 0.1843390018 0.1607618928
+ 0.1905121952 0.1870823056 0.1633782983
+ 0.1931522936 0.1898010969 0.1659625024
+ 0.1957568973 0.1924955994 0.1685173064
+ 0.1983253062 0.1951646954 0.1710429937
+ 0.2008654028 0.1978061944 0.1735426039
+ 0.2033737004 0.2004275024 0.1760165989
+ 0.2058539987 0.2030244023 0.1784628034
+ 0.2083114982 0.2055975944 0.1808815002
+ 0.2107529044 0.2081506997 0.1832714975
+ 0.2131794989 0.2106831074 0.1856442988
+ 0.2155988961 0.2131962031 0.1879992038
+ 0.2180117071 0.2156914026 0.1903316975
+ 0.2204127014 0.2181655020 0.1926410943
+ 0.2228053063 0.2206185013 0.1949304938
+ 0.2251946926 0.2230494022 0.1971997023
+ 0.2275789976 0.2254669964 0.1994490027
+ 0.2299547046 0.2278635949 0.2016751021
+ 0.2323268950 0.2302404940 0.2038796991
+ 0.2346891016 0.2326005995 0.2060652971
+ 0.2370416969 0.2349402010 0.2082331926
+ 0.2393849939 0.2372657061 0.2103780955
+ 0.2417193949 0.2395751029 0.2125052065
+ 0.2440440953 0.2418743074 0.2146157026
+ 0.2463590056 0.2441594005 0.2167119980
+ 0.2486687005 0.2464269996 0.2187922001
+ 0.2509658039 0.2486840934 0.2208545059
+ 0.2532486022 0.2509253025 0.2229007035
+ 0.2555230856 0.2531493902 0.2249286026
+ 0.2577824891 0.2553615868 0.2269378006
+ 0.2600266933 0.2575596869 0.2289337069
+ 0.2622607946 0.2597441971 0.2309127003
+ 0.2644844949 0.2619175017 0.2328774929
+ 0.2667022049 0.2640810013 0.2348311990
+ 0.2689101100 0.2662318051 0.2367679030
+ 0.2711063027 0.2683725059 0.2386890054
+ 0.2732926905 0.2705014944 0.2405951023
+ 0.2754707932 0.2726207078 0.2424882054
+ 0.2776342928 0.2747271955 0.2443652004
+ 0.2797912061 0.2768242061 0.2462334931
+ 0.2819392085 0.2789101899 0.2480895966
+ 0.2840760946 0.2809852958 0.2499316037
+ 0.2862043977 0.2830494046 0.2517591119
+ 0.2883251011 0.2851034105 0.2535771132
+ 0.2904368043 0.2871474028 0.2553840876
+ 0.2925382853 0.2891792059 0.2571800053
+ 0.2946313024 0.2912011147 0.2589674890
+ 0.2967143953 0.2932142019 0.2607443035
+ 0.2987858057 0.2952139080 0.2625100017
+ 0.3008505106 0.2972015142 0.2642692924
+ 0.3029071987 0.2991822064 0.2660228014
+ 0.3049511909 0.3011547029 0.2677705884
+ 0.3069872856 0.3031156063 0.2695144117
+ 0.3090176880 0.3050638139 0.2712531090
+ 0.3110390007 0.3070029020 0.2729856968
+ 0.3130499125 0.3089343011 0.2747122049
+ 0.3150539994 0.3108555079 0.2764343023
+ 0.3170512021 0.3127650023 0.2781510949
+ 0.3190402091 0.3146660924 0.2798615098
+ 0.3210211992 0.3165611923 0.2815661132
+ 0.3229936957 0.3184478879 0.2832651138
+ 0.3249579072 0.3203234971 0.2849591076
+ 0.3269129992 0.3221895099 0.2866472900
+ 0.3288631141 0.3240458071 0.2883332074
+ 0.3308089077 0.3258920908 0.2900170982
+ 0.3327476978 0.3277291059 0.2916966081
+ 0.3346762955 0.3295575976 0.2933689058
+ 0.3365967870 0.3313786089 0.2950361967
+ 0.3385129869 0.3331907094 0.2967014909
+ 0.3404223025 0.3349941075 0.2983629107
+ 0.3423224092 0.3367873132 0.3000209033
+ 0.3442116082 0.3385719061 0.3016754985
+ 0.3460933864 0.3403505981 0.3033275902
+ 0.3479698002 0.3421216011 0.3049786985
+ 0.3498382866 0.3438830078 0.3066262007
+ 0.3516973853 0.3456346095 0.3082687855
+ 0.3535484076 0.3473792970 0.3099066913
+ 0.3553937972 0.3491171896 0.3115408123
+ 0.3572331965 0.3508478105 0.3131729960
+ 0.3590649962 0.3525711000 0.3148024082
+ 0.3608897924 0.3542861938 0.3164277971
+ 0.3627074957 0.3559936881 0.3180496991
+ 0.3645170927 0.3576950133 0.3196698129
+ 0.3663190007 0.3593909144 0.3212881088
+ 0.3681136072 0.3610796034 0.3229044080
+ 0.3699010015 0.3627603948 0.3245167136
+ 0.3716816008 0.3644332886 0.3261250854
+ 0.3734537065 0.3660990894 0.3277314901
+ 0.3752183020 0.3677594066 0.3293341994
+ 0.3769755960 0.3694128990 0.3309333026
+ 0.3787257969 0.3710587025 0.3325302899
+ 0.3804695010 0.3726957142 0.3341256976
+ 0.3822059929 0.3743239939 0.3357195854
+ 0.3839339912 0.3759444058 0.3373118043
+ 0.3856526017 0.3775574863 0.3389019072
+ 0.3873623013 0.3791646957 0.3404884040
+ 0.3890652955 0.3807657957 0.3420729041
+ 0.3907626867 0.3823603094 0.3436552882
+ 0.3924534023 0.3839474916 0.3452340066
+ 0.3941374123 0.3855277002 0.3468089998
+ 0.3958151042 0.3871026039 0.3483793139
+ 0.3974870145 0.3886739910 0.3499442935
+ 0.3991512060 0.3902403116 0.3515053093
+ 0.4008058012 0.3918004930 0.3530634046
+ 0.4024530053 0.3933542967 0.3546175063
+ 0.4040930867 0.3949011862 0.3561685979
+ 0.4057264924 0.3964413106 0.3577178121
+ 0.4073539078 0.3979749084 0.3592661023
+ 0.4089717865 0.3995010853 0.3608109057
+ 0.4105815887 0.4010227919 0.3623529971
+ 0.4121825993 0.4025394022 0.3638921082
+ 0.4137746990 0.4040510952 0.3654282987
+ 0.4153572917 0.4055579901 0.3669610918
+ 0.4169301987 0.4070582092 0.3684917986
+ 0.4184952080 0.4085538983 0.3700191975
+ 0.4200516045 0.4100449979 0.3715431988
+ 0.4215987027 0.4115310907 0.3730638027
+ 0.4231320918 0.4130091071 0.3745814860
+ 0.4246563911 0.4144822061 0.3760955930
+ 0.4261722863 0.4159503877 0.3776068985
+ 0.4276798964 0.4174129963 0.3791159987
+ 0.4291754067 0.4188691974 0.3806217909
+ 0.4306622148 0.4203203917 0.3821237981
+ 0.4321402907 0.4217669070 0.3836225867
+ 0.4336062968 0.4232077003 0.3851186037
+ 0.4350613952 0.4246425927 0.3866108060
+ 0.4365088940 0.4260734916 0.3881003857
+ 0.4379490912 0.4275006056 0.3895873129
+ 0.4393770993 0.4289224148 0.3910715878
+ 0.4407972097 0.4303407967 0.3925527930
+ 0.4422096014 0.4317556918 0.3940311074
+ 0.4436098039 0.4331642091 0.3955051005
+ 0.4449998140 0.4345675111 0.3969767988
+ 0.4463821948 0.4359666109 0.3984459937
+ 0.4477544129 0.4373601079 0.3999111950
+ 0.4491179883 0.4387483895 0.4013735950
+ 0.4504755139 0.4401332140 0.4028339982
+ 0.4518243968 0.4415132105 0.4042919874
+ 0.4531635940 0.4428895116 0.4057449996
+ 0.4544965029 0.4442631900 0.4071955085
+ 0.4558199048 0.4456324875 0.4086431861
+ 0.4571351111 0.4469971061 0.4100872874
+ 0.4584454000 0.4483583868 0.4115292132
+ 0.4597485065 0.4497137070 0.4129675031
+ 0.4610452950 0.4510636032 0.4144037068
+ 0.4623377919 0.4524100125 0.4158385098
+ 0.4636217058 0.4537501931 0.4172705114
+ 0.4649001062 0.4550873041 0.4187003970
+ 0.4661735892 0.4564214945 0.4201287925
+ 0.4674373865 0.4577501118 0.4215534031
+ 0.4686970115 0.4590756893 0.4229756892
+ 0.4699491858 0.4603962004 0.4243943989
+ 0.4711951911 0.4617125988 0.4258098900
+ 0.4724380970 0.4630267918 0.4272238910
+ 0.4736748040 0.4643347859 0.4286344051
+ 0.4749085009 0.4656395018 0.4300416112
+ 0.4761387110 0.4669404924 0.4314455986
+ 0.4773631096 0.4682346880 0.4328455925
+ 0.4785852134 0.4695264101 0.4342440069
+ 0.4798015058 0.4708124995 0.4356383979
+ 0.4810144007 0.4720954001 0.4370301068
+ 0.4822235107 0.4733743072 0.4384193122
+ 0.4834271073 0.4746474028 0.4398039877
+ 0.4846287966 0.4759184122 0.4411869943
+ 0.4858255088 0.4771836102 0.4425632954
+ 0.4870207012 0.4784463942 0.4439373910
+ 0.4882127941 0.4797044098 0.4453079998
+ 0.4894016981 0.4809592068 0.4466761053
+ 0.4905884862 0.4822115898 0.4480428994
+ 0.4917714894 0.4834589958 0.4494043887
+ 0.4929533005 0.4847050011 0.4507643878
+ 0.4941304028 0.4859468937 0.4521192908
+ 0.4953059852 0.4871870875 0.4534727931
+ 0.4964784980 0.4884232879 0.4548236132
+ 0.4976483881 0.4896576107 0.4561721087
+ 0.4988156855 0.4908897877 0.4575186968
+ 0.4999799132 0.4921190143 0.4588620961
+ 0.5011426806 0.4933466911 0.4602043927
+ 0.5023010969 0.4945699871 0.4615409970
+ 0.5034586191 0.4957925081 0.4628765881
+ 0.5046117902 0.4970094860 0.4642063081
+ 0.5057641864 0.4982253909 0.4655351043
+ 0.5069122910 0.4994361997 0.4668604136
+ 0.5080590844 0.5006449223 0.4681833088
+ 0.5092027783 0.5018489957 0.4695020914
+ 0.5103443861 0.5030499101 0.4708178043
+ 0.5114830136 0.5042467117 0.4721299112
+ 0.5126193762 0.5054402947 0.4734382927
+ 0.5137537122 0.5066308975 0.4747439027
+ 0.5148848891 0.5078179240 0.4760439992
+ 0.5160142183 0.5090023875 0.4773412049
+ 0.5171405077 0.5101822019 0.4786339104
+ 0.5182654262 0.5113596916 0.4799247086
+ 0.5193868279 0.5125321746 0.4812121093
+ 0.5205066800 0.5137025714 0.4824982882
+ 0.5216233730 0.5148683786 0.4837796092
+ 0.5227389932 0.5160326958 0.4850594997
+ 0.5238509178 0.5171926022 0.4863342941
+ 0.5249615908 0.5183511972 0.4876079857
+ 0.5260689855 0.5195046067 0.4888750911
+ 0.5271754265 0.5206564069 0.4901408851
+ 0.5282781124 0.5218034983 0.4914003909
+ 0.5293796062 0.5229489207 0.4926582873
+ 0.5304781199 0.5240889788 0.4939117134
+ 0.5315753818 0.5252268910 0.4951637089
+ 0.5326694250 0.5263600945 0.4964101911
+ 0.5337619185 0.5274910927 0.4976545870
+ 0.5348516703 0.5286170840 0.4988938868
+ 0.5359399915 0.5297397971 0.5001304746
+ 0.5370256901 0.5308594704 0.5013629794
+ 0.5381091237 0.5319762826 0.5025923252
+ 0.5391908288 0.5330902934 0.5038173795
+ 0.5402699709 0.5342003703 0.5050377846
+ 0.5413478017 0.5353085995 0.5062550902
+ 0.5424222946 0.5364122987 0.5074666739
+ 0.5434960723 0.5375146866 0.5086768866
+ 0.5445663929 0.5386111736 0.5098820925
+ 0.5456367135 0.5397076011 0.5110868812
+ 0.5467023253 0.5407969952 0.5122858882
+ 0.5477678180 0.5418863893 0.5134847760
+ 0.5488299727 0.5429692864 0.5146782994
+ 0.5498914719 0.5440509915 0.5158712268
+ 0.5509498715 0.5451288819 0.5170599818
+ 0.5520067215 0.5462048054 0.5182471871
+ 0.5530617237 0.5472781062 0.5194309950
+ 0.5541145205 0.5483480096 0.5206112266
+ 0.5551661849 0.5494166017 0.5217891932
+ 0.5562142730 0.5504804254 0.5229610801
+ 0.5572623014 0.5515441895 0.5241327286
+ 0.5583065152 0.5526019931 0.5252950191
+ 0.5593506098 0.5536596179 0.5264571905
+ 0.5603913069 0.5547125936 0.5276136994
+ 0.5614306927 0.5557637811 0.5287684202
+ 0.5624685287 0.5568122864 0.5299198031
+ 0.5635039210 0.5578569174 0.5310674906
+ 0.5645387173 0.5589007735 0.5322136879
+ 0.5655695796 0.5599387884 0.5333532095
+ 0.5666003823 0.5609768033 0.5344926119
+ 0.5676280856 0.5620093942 0.5356252789
+ 0.5686550140 0.5630406141 0.5367568731
+ 0.5696796775 0.5640686154 0.5378847122
+ 0.5707020164 0.5650928020 0.5390092134
+ 0.5717239976 0.5661163926 0.5401322842
+ 0.5727424026 0.5671336055 0.5412485003
+ 0.5737608075 0.5681508183 0.5423645973
+ 0.5747758746 0.5691627264 0.5434734821
+ 0.5757898092 0.5701727271 0.5445804000
+ 0.5768023729 0.5711808205 0.5456839204
+ 0.5778123736 0.5721849203 0.5467820168
+ 0.5788223743 0.5731890202 0.5478801131
+ 0.5798283219 0.5741881132 0.5489701033
+ 0.5808337927 0.5751867294 0.5500597954
+ 0.5818374753 0.5761824846 0.5511454940
+ 0.5828391910 0.5771750808 0.5522276759
+ 0.5838407278 0.5781676173 0.5533092022
+ 0.5848379731 0.5791544914 0.5543829203
+ 0.5858352184 0.5801414251 0.5554565787
+ 0.5868303776 0.5811259151 0.5565248132
+ 0.5878236890 0.5821083188 0.5575889945
+ 0.5888170004 0.5830906034 0.5586525202
+ 0.5898060203 0.5840693712 0.5597082973
+ 0.5907949805 0.5850481987 0.5607640147
+ 0.5917819738 0.5860245824 0.5618162751
+ 0.5927671790 0.5869988799 0.5628659725
+ 0.5937523842 0.5879732966 0.5639154911
+ 0.5947332978 0.5889440179 0.5649582148
+ 0.5957140923 0.5899146795 0.5660009980
+ 0.5966933966 0.5908836126 0.5670400858
+ 0.5976703763 0.5918499231 0.5680750012
+ 0.5986474752 0.5928161144 0.5691099763
+ 0.5996209979 0.5937793851 0.5701385736
+ 0.6005936861 0.5947421193 0.5711663961
+ 0.6015655994 0.5957037807 0.5721924901
+ 0.6025345922 0.5966621041 0.5732141137
+ 0.6035035849 0.5976204276 0.5742357969
+ 0.6044700146 0.5985764861 0.5752530098
+ 0.6054347157 0.5995312929 0.5762677789
+ 0.6063994169 0.6004859805 0.5772826076
+ 0.6073606014 0.6014366150 0.5782899261
+ 0.6083216071 0.6023870111 0.5792971849
+ 0.6092813015 0.6033363938 0.5803018212
+ 0.6102380753 0.6042832136 0.5813007951
+ 0.6111947894 0.6052300930 0.5822998285
+ 0.6121494174 0.6061744094 0.5832931995
+ 0.6131024957 0.6071168780 0.5842832923
+ 0.6140555143 0.6080595255 0.5852733850
+ 0.6150048971 0.6089988947 0.5862563252
+ 0.6159536839 0.6099380255 0.5872384906
+ 0.6169021130 0.6108763814 0.5882192254
+ 0.6178473234 0.6118112206 0.5891932249
+ 0.6187924743 0.6127460003 0.5901671052
+ 0.6197360754 0.6136794090 0.5911372900
+ 0.6206771135 0.6146106720 0.5921025276
+ 0.6216180921 0.6155419946 0.5930677056
+ 0.6225569844 0.6164706945 0.5940269232
+ 0.6234943867 0.6173977852 0.5949828029
+ 0.6244317889 0.6183248162 0.5959386826
+ 0.6253659129 0.6192492247 0.5968865156
+ 0.6262990832 0.6201726794 0.5978326797
+ 0.6272323728 0.6210963130 0.5987787843
+ 0.6281622052 0.6220158935 0.5997148156
+ 0.6290917993 0.6229352951 0.6006507277
+ 0.6300209761 0.6238542795 0.6015853286
+ 0.6309465766 0.6247702837 0.6025123000
+ 0.6318721175 0.6256862879 0.6034393907
+ 0.6327968240 0.6266012788 0.6043639183
+ 0.6337187886 0.6275131106 0.6052818894
+ 0.6346408129 0.6284248829 0.6061998010
+ 0.6355614066 0.6293355823 0.6071143150
+ 0.6364793181 0.6302440166 0.6080229282
+ 0.6373972297 0.6311523914 0.6089316010
+ 0.6383137107 0.6320592165 0.6098359823
+ 0.6392281055 0.6329634190 0.6107351780
+ 0.6401425004 0.6338676810 0.6116343737
+ 0.6410549879 0.6347705126 0.6125288010
+ 0.6419653296 0.6356713772 0.6134184003
+ 0.6428756118 0.6365723014 0.6143079996
+ 0.6437842846 0.6374711990 0.6151924133
+ 0.6446911097 0.6383680105 0.6160721779
+ 0.6455978751 0.6392648816 0.6169518828
+ 0.6465027928 0.6401593089 0.6178272963
+ 0.6474056244 0.6410511136 0.6186987758
+ 0.6483083963 0.6419429183 0.6195703149
+ 0.6492096186 0.6428322792 0.6204382777
+ 0.6501089931 0.6437187791 0.6213029027
+ 0.6510083079 0.6446053982 0.6221675277
+ 0.6519060135 0.6454898715 0.6230288744
+ 0.6528013945 0.6463716030 0.6238865852
+ 0.6536967158 0.6472532749 0.6247442961
+ 0.6545909047 0.6481332779 0.6255992055
+ 0.6554828286 0.6490098834 0.6264498830
+ 0.6563746929 0.6498864293 0.6273005009
+ 0.6572657228 0.6507614851 0.6281492114
+ 0.6581537127 0.6516315937 0.6289927959
+ 0.6590415835 0.6525018215 0.6298364997
+ 0.6599292159 0.6533712149 0.6306790113
+ 0.6608136892 0.6542350054 0.6315155029
+ 0.6616982818 0.6550989151 0.6323519945
+ 0.6625828743 0.6559628248 0.6331884265
+ 0.6634635925 0.6568207741 0.6340178251
+ 0.6643443108 0.6576786041 0.6348472238
+ 0.6652249098 0.6585363150 0.6356766224
+ 0.6661028862 0.6593894958 0.6365011930
+ 0.6669800878 0.6602413058 0.6373249888
+ 0.6678574085 0.6610931754 0.6381487846
+ 0.6687322855 0.6619417071 0.6389691234
+ 0.6696056724 0.6627879143 0.6397873759
+ 0.6704791188 0.6636340022 0.6406056881
+ 0.6713513136 0.6644781828 0.6414217949
+ 0.6722213030 0.6653187871 0.6422346234
+ 0.6730912924 0.6661595106 0.6430473924
+ 0.6739609241 0.6669995189 0.6438593864
+ 0.6748270988 0.6678348184 0.6446667910
+ 0.6756932139 0.6686701179 0.6454741955
+ 0.6765593886 0.6695052981 0.6462816000
+ 0.6774228215 0.6703364253 0.6470842957
+ 0.6782855988 0.6711664796 0.6478862166
+ 0.6791484952 0.6719965935 0.6486880779
+ 0.6800094247 0.6728242040 0.6494870782
+ 0.6808683872 0.6736493111 0.6502835751
+ 0.6817274094 0.6744744182 0.6510801911
+ 0.6825857759 0.6752986908 0.6518756151
+ 0.6834415793 0.6761190295 0.6526666880
+ 0.6842973232 0.6769393086 0.6534578204
+ 0.6851530075 0.6777595878 0.6542488933
+ 0.6860055923 0.6785761118 0.6550366282
+ 0.6868575811 0.6793918014 0.6558237076
+ 0.6877095103 0.6802073717 0.6566109061
+ 0.6885594130 0.6810206175 0.6573961973
+ 0.6894065738 0.6818302274 0.6581792831
+ 0.6902536750 0.6826397777 0.6589624286
+ 0.6911007762 0.6834495068 0.6597452760
+ 0.6919429898 0.6842535734 0.6605246067
+ 0.6927852035 0.6850578189 0.6613038182
+ 0.6936272979 0.6858618855 0.6620830894
+ 0.6944670081 0.6866629720 0.6628600955
+ 0.6953045130 0.6874614954 0.6636353731
+ 0.6961420178 0.6882600188 0.6644108295
+ 0.6969792247 0.6890581846 0.6651858091
+ 0.6978119016 0.6898517013 0.6659575105
+ 0.6986445785 0.6906450987 0.6667290926
+ 0.6994773149 0.6914386153 0.6675007939
+ 0.7003065944 0.6922283173 0.6682701707
+ 0.7011330724 0.6930149794 0.6690381765
+ 0.7019597292 0.6938015819 0.6698061824
+ 0.7027862072 0.6945881844 0.6705740094
+ 0.7036067843 0.6953691244 0.6713399291
+ 0.7044274211 0.6961500049 0.6721059084
+ 0.7052479982 0.6969308257 0.6728718281
+ 0.7060660124 0.6977090240 0.6736367941
+ 0.7068808079 0.6984837055 0.6744008064
+ 0.7076956034 0.6992583871 0.6751648188
+ 0.7085103989 0.7000331879 0.6759287715
+ 0.7093204856 0.7008035183 0.6766912937
+ 0.7101296782 0.7015730739 0.6774535775
+ 0.7109388709 0.7023426890 0.6782159209
+ 0.7117468715 0.7031109929 0.6789777875
+ 0.7125505805 0.7038751245 0.6797384024
+ 0.7133544087 0.7046391964 0.6804990768
+ 0.7141581178 0.7054032087 0.6812598109
+ 0.7149589062 0.7061647773 0.6820197105
+ 0.7157574296 0.7069243193 0.6827788949
+ 0.7165558934 0.7076838017 0.6835381985
+ 0.7173544168 0.7084434032 0.6842973828
+ 0.7181484103 0.7091985941 0.6850554943
+ 0.7189418077 0.7099533081 0.6858134866
+ 0.7197352052 0.7107080221 0.6865714788
+ 0.7205278277 0.7114617229 0.6873291731
+ 0.7213162780 0.7122108936 0.6880860925
+ 0.7221047878 0.7129601240 0.6888428926
+ 0.7228932977 0.7137092948 0.6895998120
+ 0.7236797810 0.7144563198 0.6903561950
+ 0.7244635820 0.7152001262 0.6911119819
+ 0.7252473235 0.7159438729 0.6918678880
+ 0.7260311246 0.7166876197 0.6926236749
+ 0.7268118858 0.7174283862 0.6933789849
+ 0.7275910974 0.7181674242 0.6941339970
+ 0.7283703089 0.7189065218 0.6948890090
+ 0.7291494012 0.7196455002 0.6956440210
+ 0.7299249768 0.7203806043 0.6963983774
+ 0.7306997180 0.7211148739 0.6971526146
+ 0.7314745188 0.7218492031 0.6979069114
+ 0.7322493196 0.7225834727 0.6986610889
+ 0.7330183983 0.7233123183 0.6994134188
+ 0.7337874770 0.7240409851 0.7001656890
+ 0.7345564961 0.7247697115 0.7009178996
+ 0.7353249788 0.7254979014 0.7016698718
+ 0.7360888124 0.7262215018 0.7024201751
+ 0.7368525863 0.7269449830 0.7031704187
+ 0.7376164198 0.7276685834 0.7039207220
+ 0.7383791208 0.7283911705 0.7046704888
+ 0.7391375899 0.7291100025 0.7054188251
+ 0.7398961186 0.7298288941 0.7061672211
+ 0.7406545877 0.7305477262 0.7069156170
+ 0.7414119244 0.7312654257 0.7076634169
+ 0.7421655059 0.7319800258 0.7084097862
+ 0.7429192066 0.7326945066 0.7091562748
+ 0.7436727881 0.7334091067 0.7099028230
+ 0.7444245815 0.7341225147 0.7106482983
+ 0.7451719046 0.7348331809 0.7113916874
+ 0.7459192276 0.7355439067 0.7121351957
+ 0.7466664910 0.7362545729 0.7128785849
+ 0.7474122047 0.7369639277 0.7136210203
+ 0.7481539249 0.7376697063 0.7143614292
+ 0.7488955855 0.7383756042 0.7151017189
+ 0.7496371865 0.7390813828 0.7158420086
+ 0.7503774762 0.7397862077 0.7165814042
+ 0.7511134148 0.7404878736 0.7173187733
+ 0.7518494129 0.7411895990 0.7180560827
+ 0.7525852919 0.7418913245 0.7187933922
+ 0.7533203959 0.7425922751 0.7195299864
+ 0.7540513277 0.7432901263 0.7202641964
+ 0.7547823191 0.7439879179 0.7209984064
+ 0.7555131912 0.7446855903 0.7217326164
+ 0.7562438250 0.7453832030 0.7224665284
+ 0.7569695711 0.7460777760 0.7231976986
+ 0.7576953769 0.7467724085 0.7239289880
+ 0.7584211826 0.7474669814 0.7246602178
+ 0.7591469884 0.7481616139 0.7253913879
+ 0.7598674297 0.7488520145 0.7261208892
+ 0.7605875134 0.7495421171 0.7268503904
+ 0.7613074780 0.7502321005 0.7275798917
+ 0.7620275021 0.7509222031 0.7283093929
+ 0.7627431750 0.7516098022 0.7290375829
+ 0.7634574771 0.7522965074 0.7297652960
+ 0.7641718984 0.7529832125 0.7304931283
+ 0.7648862004 0.7536699772 0.7312207818
+ 0.7655977011 0.7543541789 0.7319474816
+ 0.7663068771 0.7550362945 0.7326734066
+ 0.7670161724 0.7557184100 0.7333992720
+ 0.7677254081 0.7564005256 0.7341251969
+ 0.7684330940 0.7570810914 0.7348505259
+ 0.7691373229 0.7577580214 0.7355744839
+ 0.7698414922 0.7584350109 0.7362985015
+ 0.7705457211 0.7591118813 0.7370225787
+ 0.7712497711 0.7597886920 0.7377464771
+ 0.7719480991 0.7604609728 0.7384685278
+ 0.7726464272 0.7611331940 0.7391905189
+ 0.7733446956 0.7618054748 0.7399126291
+ 0.7740430236 0.7624776959 0.7406346202
+ 0.7747374177 0.7631471157 0.7413551211
+ 0.7754303217 0.7638152242 0.7420752048
+ 0.7761231065 0.7644832730 0.7427952290
+ 0.7768160105 0.7651513815 0.7435151935
+ 0.7775070071 0.7658178210 0.7442349195
+ 0.7781947851 0.7664811015 0.7449539900
+ 0.7788826227 0.7671443820 0.7456731200
+ 0.7795704007 0.7678076029 0.7463921905
+ 0.7802581787 0.7684708834 0.7471113205
+ 0.7809401155 0.7691282034 0.7478293777
+ 0.7816219926 0.7697854042 0.7485474944
+ 0.7823038101 0.7704424858 0.7492656112
+ 0.7829856873 0.7710996866 0.7499837279
+ 0.7836645842 0.7717540264 0.7507011294
+ 0.7843410969 0.7724062204 0.7514179945
+ 0.7850177288 0.7730582952 0.7521349788
+ 0.7856941819 0.7737104893 0.7528519034
+ 0.7863702774 0.7743622065 0.7535687089
+ 0.7870417833 0.7750092745 0.7542843819
+ 0.7877132893 0.7756564021 0.7550001144
+ 0.7883847952 0.7763035297 0.7557157874
+ 0.7890563011 0.7769505978 0.7564315200
+ 0.7897251844 0.7775946259 0.7571462989
+ 0.7903923988 0.7782363892 0.7578606009
+ 0.7910594940 0.7788782716 0.7585750222
+ 0.7917265892 0.7795200944 0.7592893243
+ 0.7923933864 0.7801616192 0.7600035071
+ 0.7930548787 0.7807983756 0.7607163787
+ 0.7937164903 0.7814353108 0.7614293098
+ 0.7943781018 0.7820721269 0.7621421814
+ 0.7950395942 0.7827090025 0.7628551126
+ 0.7956982851 0.7833436728 0.7635670900
+ 0.7963539958 0.7839763761 0.7642784715
+ 0.7970097065 0.7846090794 0.7649897933
+ 0.7976654172 0.7852417827 0.7657011151
+ 0.7983211279 0.7858744860 0.7664124966
+ 0.7989718914 0.7865037918 0.7671223283
+ 0.7996219993 0.7871326208 0.7678319812
+ 0.8002722263 0.7877613902 0.7685415745
+ 0.8009223938 0.7883902192 0.7692512870
+ 0.8015714288 0.7890179753 0.7699605227
+ 0.8022168875 0.7896423936 0.7706683874
+ 0.8028622866 0.7902668118 0.7713763118
+ 0.8035078049 0.7908911705 0.7720841765
+ 0.8041532040 0.7915155888 0.7727922201
+ 0.8047962189 0.7921379209 0.7734990120
+ 0.8054372072 0.7927585840 0.7742050290
+ 0.8060783148 0.7933791876 0.7749111056
+ 0.8067193031 0.7939997911 0.7756171227
+ 0.8073604107 0.7946205139 0.7763231993
+ 0.8079984188 0.7952384949 0.7770274878
+ 0.8086358905 0.7958559990 0.7777315974
+ 0.8092733026 0.7964735031 0.7784357071
+ 0.8099107146 0.7970910072 0.7791396976
+ 0.8105478287 0.7977082133 0.7798436284
+ 0.8111795783 0.7983207703 0.7805455923
+ 0.8118113279 0.7989333272 0.7812476158
+ 0.8124430776 0.7995458841 0.7819495797
+ 0.8130748868 0.8001585007 0.7826516032
+ 0.8137050271 0.8007699251 0.7833529115
+ 0.8143305779 0.8013781905 0.7840527296
+ 0.8149561286 0.8019865155 0.7847524881
+ 0.8155816197 0.8025947809 0.7854523063
+ 0.8162071109 0.8032031059 0.7861521244
+ 0.8168302774 0.8038098216 0.7868509293
+ 0.8174502254 0.8044143915 0.7875484228
+ 0.8180701137 0.8050190210 0.7882459164
+ 0.8186900020 0.8056234717 0.7889434099
+ 0.8193098903 0.8062281013 0.7896409035
+ 0.8199270964 0.8068311214 0.7903370261
+ 0.8205420971 0.8074325919 0.7910320759
+ 0.8211570978 0.8080341220 0.7917271852
+ 0.8217719793 0.8086355925 0.7924222946
+ 0.8223869801 0.8092371225 0.7931174040
+ 0.8229985237 0.8098356128 0.7938109040
+ 0.8236079812 0.8104321957 0.7945033908
+ 0.8242173791 0.8110287189 0.7951959968
+ 0.8248267770 0.8116251826 0.7958884835
+ 0.8254361749 0.8122218251 0.7965810895
+ 0.8260415196 0.8128147125 0.7972719073
+ 0.8266444802 0.8134055734 0.7979617715
+ 0.8272475004 0.8139964938 0.7986516953
+ 0.8278505206 0.8145874739 0.7993416190
+ 0.8284534812 0.8151783943 0.8000316024
+ 0.8290522099 0.8157662749 0.8007196188
+ 0.8296483755 0.8163524866 0.8014068007
+ 0.8302447200 0.8169388175 0.8020939827
+ 0.8308408856 0.8175250292 0.8027811050
+ 0.8314371109 0.8181111813 0.8034682870
+ 0.8320297003 0.8186948895 0.8041536808
+ 0.8326196074 0.8192769289 0.8048380017
+ 0.8332095742 0.8198587894 0.8055223227
+ 0.8337996006 0.8204407096 0.8062065840
+ 0.8343895078 0.8210226893 0.8068909049
+ 0.8349767923 0.8216028810 0.8075736761
+ 0.8355613947 0.8221815228 0.8082550168
+ 0.8361459970 0.8227599859 0.8089362979
+ 0.8367305994 0.8233386278 0.8096176982
+ 0.8373152018 0.8239170909 0.8102989793
+ 0.8378980160 0.8244941235 0.8109787107
+ 0.8384776711 0.8250682950 0.8116558790
+ 0.8390573859 0.8256425858 0.8123331070
+ 0.8396371007 0.8262168169 0.8130102158
+ 0.8402168155 0.8267911077 0.8136873841
+ 0.8407955170 0.8273645043 0.8143637180
+ 0.8413699865 0.8279343843 0.8150367141
+ 0.8419443965 0.8285043836 0.8157097101
+ 0.8425189257 0.8290743232 0.8163827062
+ 0.8430932760 0.8296442032 0.8170557022
+ 0.8436678052 0.8302142024 0.8177286983
+ 0.8442364931 0.8307793736 0.8183974028
+ 0.8448051214 0.8313444853 0.8190662265
+ 0.8453736901 0.8319095969 0.8197348714
+ 0.8459423184 0.8324747086 0.8204035759
+ 0.8465108275 0.8330397010 0.8210722804
+ 0.8470758796 0.8336018920 0.8217378855
+ 0.8476396799 0.8341627717 0.8224022985
+ 0.8482034206 0.8347237706 0.8230667114
+ 0.8487671018 0.8352848291 0.8237311244
+ 0.8493307829 0.8358457088 0.8243954778
+ 0.8498923182 0.8364052773 0.8250575066
+ 0.8504505157 0.8369628191 0.8257161975
+ 0.8510087132 0.8375203013 0.8263750076
+ 0.8515669703 0.8380777836 0.8270336986
+ 0.8521252275 0.8386353254 0.8276925087
+ 0.8526831269 0.8391926289 0.8283507228
+ 0.8532357216 0.8397459984 0.8290038705
+ 0.8537883759 0.8402994871 0.8296570778
+ 0.8543409705 0.8408529162 0.8303104043
+ 0.8548936248 0.8414064050 0.8309636116
+ 0.8554462194 0.8419598937 0.8316168189
+ 0.8559948802 0.8425098062 0.8322660923
+ 0.8565415144 0.8430578709 0.8329136968
+ 0.8570882082 0.8436061144 0.8335613012
+ 0.8576349020 0.8441541791 0.8342089057
+ 0.8581814766 0.8447024226 0.8348565102
+ 0.8587269783 0.8452494144 0.8355026841
+ 0.8592686057 0.8457927704 0.8361449242
+ 0.8598102927 0.8463361263 0.8367869854
+ 0.8603519201 0.8468794227 0.8374292254
+ 0.8608934879 0.8474227190 0.8380714059
+ 0.8614351153 0.8479660153 0.8387135267
+ 0.8619735241 0.8485065103 0.8393514156
+ 0.8625109196 0.8490459919 0.8399881124
+ 0.8630483150 0.8495854735 0.8406246901
+ 0.8635855913 0.8501250148 0.8412613869
+ 0.8641229868 0.8506644964 0.8418980837
+ 0.8646594286 0.8512032032 0.8425334096
+ 0.8651921749 0.8517394066 0.8431646824
+ 0.8657249808 0.8522754908 0.8437960744
+ 0.8662577868 0.8528116941 0.8444274068
+ 0.8667905927 0.8533477783 0.8450586796
+ 0.8673233986 0.8538839817 0.8456900120
+ 0.8678523898 0.8544178009 0.8463178277
+ 0.8683791757 0.8549503088 0.8469436765
+ 0.8689060211 0.8554828167 0.8475697041
+ 0.8694328070 0.8560153246 0.8481956124
+ 0.8699597120 0.8565478921 0.8488215804
+ 0.8704863787 0.8570802808 0.8494471908
+ 0.8710079193 0.8576077819 0.8500669003
+ 0.8715295196 0.8581352830 0.8506866097
+ 0.8720510006 0.8586627841 0.8513063192
+ 0.8725726008 0.8591902852 0.8519260287
+ 0.8730940819 0.8597177863 0.8525456786
+ 0.8736137748 0.8602437973 0.8531630039
+ 0.8741300106 0.8607671261 0.8537763953
+ 0.8746461868 0.8612903953 0.8543899059
+ 0.8751623034 0.8618137240 0.8550032973
+ 0.8756784797 0.8623369932 0.8556168079
+ 0.8761947155 0.8628603220 0.8562303185
+ 0.8767071962 0.8633813858 0.8568397164
+ 0.8772177100 0.8639011979 0.8574470282
+ 0.8777281046 0.8644211292 0.8580543995
+ 0.8782384992 0.8649408817 0.8586617112
+ 0.8787490129 0.8654606938 0.8592690825
+ 0.8792594075 0.8659806252 0.8598763943
+ 0.8797658086 0.8664970994 0.8604782820
+ 0.8802716732 0.8670130968 0.8610795736
+ 0.8807774782 0.8675292134 0.8616809249
+ 0.8812834024 0.8680452108 0.8622822165
+ 0.8817893267 0.8685612082 0.8628833890
+ 0.8822947145 0.8690769076 0.8634842038
+ 0.8827946782 0.8695878983 0.8640792966
+ 0.8832945824 0.8700988889 0.8646745086
+ 0.8837944865 0.8706098795 0.8652696013
+ 0.8842945099 0.8711209297 0.8658648133
+ 0.8847944140 0.8716319203 0.8664600253
+ 0.8852931261 0.8721420169 0.8670535088
+ 0.8857870102 0.8726484776 0.8676418066
+ 0.8862808943 0.8731549978 0.8682301044
+ 0.8867747784 0.8736615181 0.8688184023
+ 0.8872687221 0.8741679788 0.8694065809
+ 0.8877626061 0.8746744990 0.8699948788
+ 0.8882550001 0.8751800060 0.8705809712
+ 0.8887438774 0.8756831288 0.8711625934
+ 0.8892328143 0.8761863112 0.8717442155
+ 0.8897215724 0.8766893744 0.8723257780
+ 0.8902105093 0.8771924973 0.8729074001
+ 0.8906993866 0.8776956201 0.8734890223
+ 0.8911864758 0.8781973720 0.8740683198
+ 0.8916702867 0.8786967993 0.8746433854
+ 0.8921542168 0.8791961074 0.8752185106
+ 0.8926380277 0.8796954155 0.8757935762
+ 0.8931217790 0.8801947236 0.8763688207
+ 0.8936055899 0.8806940913 0.8769438863
+ 0.8940873146 0.8811920285 0.8775168061
+ 0.8945649266 0.8816872239 0.8780856133
+ 0.8950424790 0.8821823001 0.8786544800
+ 0.8955200911 0.8826774955 0.8792232871
+ 0.8959977031 0.8831726909 0.8797922134
+ 0.8964753151 0.8836678863 0.8803610802
+ 0.8969513178 0.8841618896 0.8809276819
+ 0.8974236250 0.8846526742 0.8814892769
+ 0.8978958130 0.8851435781 0.8820508718
+ 0.8983680010 0.8856344223 0.8826125264
+ 0.8988403082 0.8861253262 0.8831741810
+ 0.8993124962 0.8866161108 0.8837357759
+ 0.8997837901 0.8871064186 0.8842961192
+ 0.9002509117 0.8875938058 0.8848509789
+ 0.9007179141 0.8880811930 0.8854060173
+ 0.9011849761 0.8885685802 0.8859608769
+ 0.9016519785 0.8890560269 0.8865159154
+ 0.9021189809 0.8895434141 0.8870707750
+ 0.9025859833 0.8900306821 0.8876255155
+ 0.9030467272 0.8905134201 0.8881742954
+ 0.9035072923 0.8909960985 0.8887230158
+ 0.9039679766 0.8914787173 0.8892716765
+ 0.9044287205 0.8919613957 0.8898203969
+ 0.9048894048 0.8924440742 0.8903691769
+ 0.9053500891 0.8929268122 0.8909178972
+ 0.9058066010 0.8934053183 0.8914616704
+ 0.9062620997 0.8938828707 0.8920044899
+ 0.9067175984 0.8943604827 0.8925474286
+ 0.9071730971 0.8948379755 0.8930901885
+ 0.9076285958 0.8953155875 0.8936330080
+ 0.9080840945 0.8957931995 0.8941758871
+ 0.9085366726 0.8962686062 0.8947150111
+ 0.9089869857 0.8967422247 0.8952515125
+ 0.9094372988 0.8972157836 0.8957878947
+ 0.9098876119 0.8976894021 0.8963243961
+ 0.9103379250 0.8981630206 0.8968607783
+ 0.9107881784 0.8986366987 0.8973972201
+ 0.9112372994 0.8991093040 0.8979318142
+ 0.9116824865 0.8995786905 0.8984611034
+ 0.9121276736 0.9000480771 0.8989903927
+ 0.9125729203 0.9005175233 0.8995196819
+ 0.9130182266 0.9009870291 0.9000489712
+ 0.9134634137 0.9014564157 0.9005783200
+ 0.9139086008 0.9019258022 0.9011074901
+ 0.9143493772 0.9023923278 0.9016308784
+ 0.9147896171 0.9028583765 0.9021536112
+ 0.9152297974 0.9033244848 0.9026762843
+ 0.9156699777 0.9037905931 0.9031988978
+ 0.9161102176 0.9042567015 0.9037215710
+ 0.9165503979 0.9047226906 0.9042443037
+ 0.9169877172 0.9051871896 0.9047639966
+ 0.9174218178 0.9056496024 0.9052804708
+ 0.9178559780 0.9061120749 0.9057971239
+ 0.9182900786 0.9065744877 0.9063135982
+ 0.9187241793 0.9070370197 0.9068300724
+ 0.9191582799 0.9074993730 0.9073466063
+ 0.9195923805 0.9079619050 0.9078630805
+ 0.9200205803 0.9084206820 0.9083728194
+ 0.9204487801 0.9088795185 0.9088826180
+ 0.9208769798 0.9093382955 0.9093922973
+ 0.9213051796 0.9097970724 0.9099020958
+ 0.9217333794 0.9102559090 0.9104117751
+ 0.9221615195 0.9107146263 0.9109215140
+ 0.9225875139 0.9111716747 0.9114277959
+ 0.9230108261 0.9116266966 0.9119303823
+ 0.9234341979 0.9120817780 0.9124330878
+ 0.9238576293 0.9125369191 0.9129356742
+ 0.9242808819 0.9129918814 0.9134383202
+ 0.9247043133 0.9134470224 0.9139409065
+ 0.9251276851 0.9139019847 0.9144436121
+ 0.9255468845 0.9143533707 0.9149402976
+ 0.9259656072 0.9148042798 0.9154363871
+ 0.9263843298 0.9152551889 0.9159325957
+ 0.9268029928 0.9157060981 0.9164286852
+ 0.9272217155 0.9161570072 0.9169248939
+ 0.9276403785 0.9166079164 0.9174209833
+ 0.9280576706 0.9170578122 0.9179155231
+ 0.9284709096 0.9175047278 0.9184057117
+ 0.9288840890 0.9179517031 0.9188959002
+ 0.9292973280 0.9183986187 0.9193860888
+ 0.9297105074 0.9188455939 0.9198762774
+ 0.9301236868 0.9192925096 0.9203665257
+ 0.9305369258 0.9197394848 0.9208567142
+ 0.9309471846 0.9201840758 0.9213432074
+ 0.9313554764 0.9206268787 0.9218271971
+ 0.9317637086 0.9210698009 0.9223111272
+ 0.9321720004 0.9215126038 0.9227951169
+ 0.9325801730 0.9219554067 0.9232789874
+ 0.9329885244 0.9223983288 0.9237629771
+ 0.9333966970 0.9228410721 0.9242469072
+ 0.9338006973 0.9232804775 0.9247245193
+ 0.9342038035 0.9237191081 0.9252008200
+ 0.9346070290 0.9241576791 0.9256771207
+ 0.9350100756 0.9245964289 0.9261534810
+ 0.9354133010 0.9250349998 0.9266297817
+ 0.9358164072 0.9254735708 0.9271062016
+ 0.9362192750 0.9259120822 0.9275822043
+ 0.9366164804 0.9263464808 0.9280517101
+ 0.9370136857 0.9267808795 0.9285210967
+ 0.9374108911 0.9272152781 0.9289906025
+ 0.9378080964 0.9276496768 0.9294601083
+ 0.9382053018 0.9280840755 0.9299296141
+ 0.9386025071 0.9285184741 0.9303991199
+ 0.9389988780 0.9289522767 0.9308673143
+ 0.9393916130 0.9293835163 0.9313306212
+ 0.9397842884 0.9298146963 0.9317938089
+ 0.9401770830 0.9302458763 0.9322569966
+ 0.9405698180 0.9306771159 0.9327201843
+ 0.9409624934 0.9311082959 0.9331833720
+ 0.9413552284 0.9315395951 0.9336466193
+ 0.9417470098 0.9319697022 0.9341077209
+ 0.9421362281 0.9323967099 0.9345635176
+ 0.9425255060 0.9328237176 0.9350193143
+ 0.9429147243 0.9332507849 0.9354749918
+ 0.9433040023 0.9336777925 0.9359307885
+ 0.9436932206 0.9341048002 0.9363865256
+ 0.9440824986 0.9345319271 0.9368423223
+ 0.9444702864 0.9349573851 0.9372959733
+ 0.9448544979 0.9353792071 0.9377450943
+ 0.9452388287 0.9358010292 0.9381942153
+ 0.9456230998 0.9362229109 0.9386432171
+ 0.9460073113 0.9366446733 0.9390922785
+ 0.9463915825 0.9370664954 0.9395413995
+ 0.9467759132 0.9374883175 0.9399905205
+ 0.9471582770 0.9379090071 0.9404376745
+ 0.9475358129 0.9383267164 0.9408801198
+ 0.9479132891 0.9387443066 0.9413226247
+ 0.9482908249 0.9391620159 0.9417650104
+ 0.9486683011 0.9395796061 0.9422073960
+ 0.9490457773 0.9399973154 0.9426497817
+ 0.9494233131 0.9404149055 0.9430922866
+ 0.9497994184 0.9408314824 0.9435328841
+ 0.9501690865 0.9412431121 0.9439659715
+ 0.9505386949 0.9416546822 0.9443989992
+ 0.9509084225 0.9420663118 0.9448320866
+ 0.9512780905 0.9424778819 0.9452651739
+ 0.9516478181 0.9428895116 0.9456983209
+ 0.9520174861 0.9433010817 0.9461312890
+ 0.9523869157 0.9437124729 0.9465638995
+ 0.9527491927 0.9441193938 0.9469869137
+ 0.9531115294 0.9445263147 0.9474099278
+ 0.9534738064 0.9449331760 0.9478328824
+ 0.9538360834 0.9453400970 0.9482558966
+ 0.9541984200 0.9457470179 0.9486789107
+ 0.9545606971 0.9461538792 0.9491018057
+ 0.9549229741 0.9465608001 0.9495248199
+ 0.9552813768 0.9469650984 0.9499412179
+ 0.9556391239 0.9473688006 0.9503563046
+ 0.9559966922 0.9477726221 0.9507713914
+ 0.9563543200 0.9481763244 0.9511865973
+ 0.9567118883 0.9485800862 0.9516016841
+ 0.9570695162 0.9489837885 0.9520167708
+ 0.9574272037 0.9493876100 0.9524319768
+ 0.9577826262 0.9497889876 0.9528437853
+ 0.9581363201 0.9501885772 0.9532533288
+ 0.9584900737 0.9505882263 0.9536628127
+ 0.9588438272 0.9509878159 0.9540722966
+ 0.9591975808 0.9513874054 0.9544817805
+ 0.9595512748 0.9517869949 0.9548913240
+ 0.9599050879 0.9521865845 0.9553006887
+ 0.9602577090 0.9525852203 0.9557086825
+ 0.9606065750 0.9529808164 0.9561120272
+ 0.9609556198 0.9533764124 0.9565153718
+ 0.9613046050 0.9537721276 0.9569187164
+ 0.9616534710 0.9541677237 0.9573221207
+ 0.9620025158 0.9545633197 0.9577255249
+ 0.9623513818 0.9549589753 0.9581288099
+ 0.9627004266 0.9553545713 0.9585322142
+ 0.9630452991 0.9557468891 0.9589298964
+ 0.9633895755 0.9561386704 0.9593268037
+ 0.9637339115 0.9565305114 0.9597237110
+ 0.9640781879 0.9569222927 0.9601204991
+ 0.9644225240 0.9573140740 0.9605174065
+ 0.9647668004 0.9577057958 0.9609143138
+ 0.9651110172 0.9580975771 0.9613112211
+ 0.9654532075 0.9584879279 0.9617047906
+ 0.9657922983 0.9588758945 0.9620940089
+ 0.9661315084 0.9592639804 0.9624832273
+ 0.9664705992 0.9596521258 0.9628723860
+ 0.9668096900 0.9600400925 0.9632616043
+ 0.9671489000 0.9604281783 0.9636508822
+ 0.9674879909 0.9608163238 0.9640401006
+ 0.9678270817 0.9612042904 0.9644293189
+ 0.9681611061 0.9615883827 0.9648113251
+ 0.9684945941 0.9619721174 0.9651926756
+ 0.9688280225 0.9623557925 0.9655740857
+ 0.9691613913 0.9627394080 0.9659554958
+ 0.9694948792 0.9631230831 0.9663369060
+ 0.9698283076 0.9635068178 0.9667183161
+ 0.9701616764 0.9638903737 0.9670996070
+ 0.9704933763 0.9642724991 0.9674782753
+ 0.9708213806 0.9646512270 0.9678518176
+ 0.9711495042 0.9650298953 0.9682253003
+ 0.9714776278 0.9654086828 0.9685987830
+ 0.9718056917 0.9657874107 0.9689723253
+ 0.9721336961 0.9661661983 0.9693458080
+ 0.9724618196 0.9665449262 0.9697191715
+ 0.9727898836 0.9669237137 0.9700927138
+ 0.9731143117 0.9672991037 0.9704605937
+ 0.9734373093 0.9676731825 0.9708260894
+ 0.9737601876 0.9680472016 0.9711915851
+ 0.9740831852 0.9684212804 0.9715570807
+ 0.9744061232 0.9687952995 0.9719226956
+ 0.9747291207 0.9691693783 0.9722881913
+ 0.9750519991 0.9695433974 0.9726536870
+ 0.9753749967 0.9699174762 0.9730191231
+ 0.9756926894 0.9702869058 0.9733765125
+ 0.9760103822 0.9706562757 0.9737339020
+ 0.9763280749 0.9710255861 0.9740912914
+ 0.9766458273 0.9713950157 0.9744486809
+ 0.9769635201 0.9717643857 0.9748060703
+ 0.9772812128 0.9721338153 0.9751635194
+ 0.9775989056 0.9725031853 0.9755209088
+ 0.9779152274 0.9728714228 0.9758762121
+ 0.9782270789 0.9732357860 0.9762253165
+ 0.9785388708 0.9736002088 0.9765743017
+ 0.9788507819 0.9739645720 0.9769234061
+ 0.9791625738 0.9743289948 0.9772723913
+ 0.9794744253 0.9746934772 0.9776214957
+ 0.9797862768 0.9750579000 0.9779704809
+ 0.9800981283 0.9754223228 0.9783195853
+ 0.9804072976 0.9757844210 0.9786648750
+ 0.9807128906 0.9761431813 0.9790049791
+ 0.9810184240 0.9765020013 0.9793450832
+ 0.9813238978 0.9768608212 0.9796851873
+ 0.9816294909 0.9772195816 0.9800254107
+ 0.9819350243 0.9775784016 0.9803655148
+ 0.9822404981 0.9779372215 0.9807056189
+ 0.9825460911 0.9782959819 0.9810457230
+ 0.9828479290 0.9786517024 0.9813808799
+ 0.9831464887 0.9790048003 0.9817116857
+ 0.9834451079 0.9793578982 0.9820424914
+ 0.9837437272 0.9797109962 0.9823732972
+ 0.9840422869 0.9800640941 0.9827041030
+ 0.9843410254 0.9804171920 0.9830349088
+ 0.9846395850 0.9807702899 0.9833657146
+ 0.9849382043 0.9811233878 0.9836965203
+ 0.9852322936 0.9814730883 0.9840217233
+ 0.9855231047 0.9818202257 0.9843425751
+ 0.9858139157 0.9821674228 0.9846634865
+ 0.9861047268 0.9825145006 0.9849843979
+ 0.9863954782 0.9828615785 0.9853054285
+ 0.9866862893 0.9832087755 0.9856262803
+ 0.9869771004 0.9835559130 0.9859471917
+ 0.9872679114 0.9839029908 0.9862681031
+ 0.9875541925 0.9842463732 0.9865829945
+ 0.9878368974 0.9845867157 0.9868929982
+ 0.9881196022 0.9849269986 0.9872030020
+ 0.9884023070 0.9852672815 0.9875130057
+ 0.9886850119 0.9856076241 0.9878228903
+ 0.9889677167 0.9859479070 0.9881328940
+ 0.9892504215 0.9862881899 0.9884428978
+ 0.9895331264 0.9866284728 0.9887529016
+ 0.9898114204 0.9869654179 0.9890568256
+ 0.9900845885 0.9872981906 0.9893537164
+ 0.9903576970 0.9876310825 0.9896506071
+ 0.9906309247 0.9879639149 0.9899474978
+ 0.9909039736 0.9882966876 0.9902443886
+ 0.9911772013 0.9886295795 0.9905412793
+ 0.9914503098 0.9889624119 0.9908382297
+ 0.9917234778 0.9892953038 0.9911351204
+ 0.9919933081 0.9896262288 0.9914277196
+ 0.9922555089 0.9899526834 0.9917106032
+ 0.9925177097 0.9902790785 0.9919934273
+ 0.9927799106 0.9906055927 0.9922763109
+ 0.9930421114 0.9909321070 0.9925591946
+ 0.9933043122 0.9912585020 0.9928420782
+ 0.9935665131 0.9915850163 0.9931250215
+ 0.9938287139 0.9919114709 0.9934079051
+ 0.9940900207 0.9922373891 0.9936895967
+ 0.9943411946 0.9925572872 0.9939587712
+ 0.9945924878 0.9928773046 0.9942278862
+ 0.9948437214 0.9931972027 0.9944971204
+ 0.9950950146 0.9935171008 0.9947661757
+ 0.9953461885 0.9938369989 0.9950354099
+ 0.9955974221 0.9941570163 0.9953045845
+ 0.9958487153 0.9944769144 0.9955736995
+ 0.9960998893 0.9947968125 0.9958428741
+ 0.9963402152 0.9951102734 0.9960997105
+ 0.9965775013 0.9954220057 0.9963533282
+ 0.9968149066 0.9957337976 0.9966068864
+ 0.9970521927 0.9960455894 0.9968605042
+ 0.9972895980 0.9963573217 0.9971140027
+ 0.9975268841 0.9966691136 0.9973676205
+ 0.9977642894 0.9969809055 0.9976211786
+ 0.9980015755 0.9972925782 0.9978747964
+ 0.9982318878 0.9975994229 0.9981204271
+ 0.9984529018 0.9978994727 0.9983553290
+ 0.9986739755 0.9981995225 0.9985902905
+ 0.9988949895 0.9984995723 0.9988251925
+ 0.9991160035 0.9987996817 0.9990602136
+ 0.9993370175 0.9990997910 0.9992951155
+ 0.9995579720 0.9993997812 0.9995300770
+ 0.9997789860 0.9996998906 0.9997649789
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_vista_200.spi1d b/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_vista_200.spi1d
new file mode 100644
index 00000000000..4ef1e35a89b
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_vista_200.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0182101503 0.0179095902 0.0133477096
+ 0.0321649686 0.0326713808 0.0245428905
+ 0.0435327813 0.0445400514 0.0339762792
+ 0.0535616502 0.0549106896 0.0424365215
+ 0.0627619624 0.0643109381 0.0502561592
+ 0.0713807195 0.0730527714 0.0576005317
+ 0.0795889422 0.0812662989 0.0646079034
+ 0.0874749497 0.0890629813 0.0713189989
+ 0.0951398313 0.0965353027 0.0778023675
+ 0.1026329994 0.1037214994 0.0840878412
+ 0.1098783985 0.1106367037 0.0901622772
+ 0.1168456972 0.1172993034 0.0960228518
+ 0.1235098019 0.1237140000 0.1016969979
+ 0.1299058944 0.1299183965 0.1071913987
+ 0.1360470951 0.1359218955 0.1125032008
+ 0.1419679970 0.1417497993 0.1176472977
+ 0.1476961970 0.1474111974 0.1226311028
+ 0.1532527953 0.1529219002 0.1274778992
+ 0.1586499959 0.1582891047 0.1321873963
+ 0.1639094949 0.1635248065 0.1367731988
+ 0.1690364927 0.1686291993 0.1412428021
+ 0.1740324050 0.1736201942 0.1455994993
+ 0.1789164990 0.1784920990 0.1498488039
+ 0.1836923957 0.1832599044 0.1539963931
+ 0.1883690059 0.1879281998 0.1580594927
+ 0.1929446012 0.1924999058 0.1620312035
+ 0.1974374950 0.1969808936 0.1659148932
+ 0.2018467933 0.2013725042 0.1697210968
+ 0.2061869949 0.2056811005 0.1734540015
+ 0.2104454935 0.2099131942 0.1771208942
+ 0.2146379054 0.2140665054 0.1807264984
+ 0.2187689990 0.2181411982 0.1842699945
+ 0.2228457928 0.2221457958 0.1877449006
+ 0.2268676013 0.2260929942 0.1911672056
+ 0.2308367044 0.2299744040 0.1945340037
+ 0.2347573936 0.2337978929 0.1978531927
+ 0.2386282980 0.2375611067 0.2011176944
+ 0.2424549013 0.2412583977 0.2043330073
+ 0.2462375015 0.2449042946 0.2075064927
+ 0.2499749959 0.2485097051 0.2106339037
+ 0.2536737919 0.2520638108 0.2137185931
+ 0.2573330998 0.2555652857 0.2167686969
+ 0.2609579861 0.2590112984 0.2197788060
+ 0.2645516098 0.2624117136 0.2227548957
+ 0.2681075931 0.2657625973 0.2257010043
+ 0.2716293931 0.2690761089 0.2286102027
+ 0.2751240134 0.2723546028 0.2314918935
+ 0.2785834074 0.2755965889 0.2343432009
+ 0.2820093036 0.2787989080 0.2371643037
+ 0.2854062021 0.2819635868 0.2399580032
+ 0.2887754142 0.2850886881 0.2427307069
+ 0.2921054959 0.2881690860 0.2454746962
+ 0.2953915000 0.2912029028 0.2481936961
+ 0.2986359894 0.2941966951 0.2508893013
+ 0.3018450141 0.2971538901 0.2535605133
+ 0.3050135970 0.3000777960 0.2562063038
+ 0.3081485033 0.3029662073 0.2588256896
+ 0.3112491965 0.3058190048 0.2614240944
+ 0.3143157065 0.3086350858 0.2640033066
+ 0.3173457086 0.3114137053 0.2665627897
+ 0.3203401864 0.3141573966 0.2691006958
+ 0.3232952952 0.3168714046 0.2716197073
+ 0.3262135088 0.3195553124 0.2741247118
+ 0.3290931880 0.3222120106 0.2766116858
+ 0.3319376111 0.3248479962 0.2790769935
+ 0.3347463012 0.3274633884 0.2815260887
+ 0.3375192881 0.3300592899 0.2839562893
+ 0.3402611911 0.3326362073 0.2863681912
+ 0.3429714143 0.3351945877 0.2887654006
+ 0.3456538916 0.3377344012 0.2911457121
+ 0.3483096957 0.3402554095 0.2935140133
+ 0.3509393930 0.3427593112 0.2958686948
+ 0.3535420001 0.3452464938 0.2982082963
+ 0.3561150134 0.3477157056 0.3005363941
+ 0.3586607873 0.3501690924 0.3028526008
+ 0.3611787856 0.3526060879 0.3051568866
+ 0.3636738956 0.3550266922 0.3074469864
+ 0.3661471903 0.3574325144 0.3097249866
+ 0.3686017990 0.3598220050 0.3119905889
+ 0.3710421920 0.3621949852 0.3142440021
+ 0.3734661043 0.3645452857 0.3164834976
+ 0.3758763969 0.3668780029 0.3187099993
+ 0.3782708049 0.3691841960 0.3209230006
+ 0.3806518912 0.3714686930 0.3231270015
+ 0.3830181956 0.3737291098 0.3253178000
+ 0.3853709102 0.3759689927 0.3274958134
+ 0.3877105117 0.3781890869 0.3296644986
+ 0.3900356889 0.3803892136 0.3318220973
+ 0.3923485875 0.3825727105 0.3339678943
+ 0.3946483135 0.3847385943 0.3360984921
+ 0.3969348967 0.3868887126 0.3382169902
+ 0.3992097080 0.3890219927 0.3403255939
+ 0.4014719129 0.3911359906 0.3424212933
+ 0.4037215114 0.3932318985 0.3445019126
+ 0.4059596956 0.3953123093 0.3465686142
+ 0.4081867933 0.3973782957 0.3486247063
+ 0.4103969038 0.3994235098 0.3506675959
+ 0.4125916958 0.4014526010 0.3526985049
+ 0.4147717953 0.4034663141 0.3547205925
+ 0.4169346094 0.4054656029 0.3567343056
+ 0.4190779030 0.4074513912 0.3587369919
+ 0.4212022126 0.4094235003 0.3607279956
+ 0.4233098924 0.4113812149 0.3627093136
+ 0.4254015088 0.4133256972 0.3646796942
+ 0.4274776876 0.4152582884 0.3666377068
+ 0.4295392036 0.4171769023 0.3685849011
+ 0.4315859079 0.4190813899 0.3705236912
+ 0.4336147010 0.4209738970 0.3724532127
+ 0.4356271923 0.4228563905 0.3743726909
+ 0.4376241863 0.4247288108 0.3762832880
+ 0.4396047890 0.4265901148 0.3781884909
+ 0.4415675104 0.4284402132 0.3800868988
+ 0.4435133040 0.4302783012 0.3819774091
+ 0.4454411864 0.4321058095 0.3838588893
+ 0.4473508894 0.4339239895 0.3857302964
+ 0.4492434859 0.4357284009 0.3875930905
+ 0.4511201978 0.4375185072 0.3894470930
+ 0.4529820085 0.4392957091 0.3912915885
+ 0.4548301101 0.4410578907 0.3931255937
+ 0.4566622972 0.4428066909 0.3949485123
+ 0.4584765136 0.4445427954 0.3967649043
+ 0.4602738023 0.4462682009 0.3985747099
+ 0.4620555043 0.4479798973 0.4003768861
+ 0.4638229907 0.4496806860 0.4021708071
+ 0.4655745029 0.4513705969 0.4039582014
+ 0.4673084915 0.4530492127 0.4057385027
+ 0.4690262079 0.4547170997 0.4075132012
+ 0.4707291126 0.4563761950 0.4092822969
+ 0.4724188149 0.4580253959 0.4110448956
+ 0.4740945101 0.4596652091 0.4128004014
+ 0.4757550955 0.4612967968 0.4145481884
+ 0.4774011075 0.4629195929 0.4162878096
+ 0.4790340960 0.4645322859 0.4180184007
+ 0.4806557000 0.4661347866 0.4197404087
+ 0.4822664857 0.4677279890 0.4214550853
+ 0.4838629961 0.4693109989 0.4231620133
+ 0.4854427874 0.4708836973 0.4248597026
+ 0.4870088995 0.4724482000 0.4265482128
+ 0.4885635972 0.4740057886 0.4282296002
+ 0.4901061058 0.4755555987 0.4299038947
+ 0.4916355014 0.4770967066 0.4315708876
+ 0.4931511879 0.4786292911 0.4332301915
+ 0.4946528077 0.4801545143 0.4348819852
+ 0.4961408973 0.4816705883 0.4365274012
+ 0.4976170063 0.4831782877 0.4381654859
+ 0.4990840852 0.4846773148 0.4397968054
+ 0.5005418062 0.4861674011 0.4414210916
+ 0.5019897819 0.4876480103 0.4430381060
+ 0.5034281015 0.4891189933 0.4446476102
+ 0.5048564076 0.4905793965 0.4462502003
+ 0.5062754154 0.4920318127 0.4478481114
+ 0.5076872110 0.4934777915 0.4494414032
+ 0.5090919137 0.4949184060 0.4510299861
+ 0.5104892850 0.4963541031 0.4526137114
+ 0.5118765831 0.4977797866 0.4541929066
+ 0.5132548809 0.4991959929 0.4557681084
+ 0.5146262050 0.5006046891 0.4573394060
+ 0.5159909725 0.5020067096 0.4589067101
+ 0.5173475742 0.5034021735 0.4604690969
+ 0.5186926126 0.5047916770 0.4620254934
+ 0.5200299025 0.5061759949 0.4635772109
+ 0.5213602781 0.5075541139 0.4651241004
+ 0.5226839185 0.5089235902 0.4666649997
+ 0.5240020156 0.5102841854 0.4681988955
+ 0.5253158808 0.5116395950 0.4697273076
+ 0.5266252756 0.5129901171 0.4712502062
+ 0.5279287100 0.5143331885 0.4727657139
+ 0.5292261243 0.5156680942 0.4742735922
+ 0.5305185914 0.5169963837 0.4757766128
+ 0.5318061113 0.5183182955 0.4772751927
+ 0.5330879092 0.5196315050 0.4787661135
+ 0.5343660116 0.5209389925 0.4802523851
+ 0.5356402993 0.5222411752 0.4817340076
+ 0.5369089246 0.5235363245 0.4832083881
+ 0.5381723046 0.5248249173 0.4846785069
+ 0.5394316912 0.5261074901 0.4861451089
+ 0.5406854153 0.5273811817 0.4876070917
+ 0.5419325829 0.5286462903 0.4890637100
+ 0.5431752801 0.5299065113 0.4905168116
+ 0.5444123149 0.5311611295 0.4919654131
+ 0.5456442237 0.5324099064 0.4934079051
+ 0.5468729138 0.5336548090 0.4948467910
+ 0.5480973125 0.5348948240 0.4962810874
+ 0.5493161082 0.5361279249 0.4977090061
+ 0.5505313873 0.5373569727 0.4991332889
+ 0.5517416000 0.5385804772 0.5005524158
+ 0.5529457927 0.5397964120 0.5019652843
+ 0.5541468859 0.5410084128 0.5033745766
+ 0.5553439856 0.5422148705 0.5047777891
+ 0.5565372705 0.5434154272 0.5061753988
+ 0.5577278137 0.5446121097 0.5075693727
+ 0.5589103103 0.5458009839 0.5089558959
+ 0.5600882173 0.5469862819 0.5103380084
+ 0.5612615943 0.5481684208 0.5117158890
+ 0.5624287128 0.5493460298 0.5130857825
+ 0.5635939837 0.5505207777 0.5144522190
+ 0.5647562146 0.5516902208 0.5158123970
+ 0.5659151077 0.5528519750 0.5171663761
+ 0.5670722127 0.5540099740 0.5185170174
+ 0.5682216287 0.5551596284 0.5198565125
+ 0.5693680048 0.5563063025 0.5211923718
+ 0.5705093145 0.5574489832 0.5225226283
+ 0.5716463923 0.5585880280 0.5238460898
+ 0.5727816820 0.5597252250 0.5251665711
+ 0.5739135742 0.5608549118 0.5264781117
+ 0.5750433803 0.5619807243 0.5277863741
+ 0.5761687756 0.5630995035 0.5290886760
+ 0.5772883892 0.5642123818 0.5303848982
+ 0.5784044862 0.5653222799 0.5316777825
+ 0.5795143247 0.5664256811 0.5329598784
+ 0.5806226730 0.5675271749 0.5342394114
+ 0.5817270875 0.5686224103 0.5355114937
+ 0.5828294754 0.5697141886 0.5367797017
+ 0.5839291215 0.5708016157 0.5380430222
+ 0.5850237012 0.5718852878 0.5393006206
+ 0.5861157179 0.5729672909 0.5405554175
+ 0.5872008204 0.5740441084 0.5418028235
+ 0.5882844925 0.5751196146 0.5430486798
+ 0.5893629789 0.5761870146 0.5442872047
+ 0.5904405713 0.5772519112 0.5455237031
+ 0.5915157199 0.5783103704 0.5467544794
+ 0.5925881267 0.5793656707 0.5479820967
+ 0.5936570168 0.5804172754 0.5492056012
+ 0.5947207212 0.5814660788 0.5504246950
+ 0.5957809091 0.5825130939 0.5516411066
+ 0.5968360901 0.5835543871 0.5528522134
+ 0.5978894830 0.5845938921 0.5540617108
+ 0.5989391208 0.5856245756 0.5552654266
+ 0.5999881029 0.5866541862 0.5564681888
+ 0.6010323763 0.5876761079 0.5576648116
+ 0.6020759940 0.5886973739 0.5588607192
+ 0.6031129956 0.5897135735 0.5600510836
+ 0.6041488051 0.5907285810 0.5612400770
+ 0.6051782966 0.5917387009 0.5624223948
+ 0.6062065959 0.5927467942 0.5636029243
+ 0.6072307825 0.5937488079 0.5647776127
+ 0.6082534790 0.5947481990 0.5659500957
+ 0.6092721820 0.5957416296 0.5671173930
+ 0.6102892160 0.5967329144 0.5682824850
+ 0.6113023162 0.5977199078 0.5694428086
+ 0.6123135090 0.5987045169 0.5706002116
+ 0.6133208871 0.5996844769 0.5717515945
+ 0.6143262982 0.6006621718 0.5729001760
+ 0.6153277755 0.6016355753 0.5740433931
+ 0.6163274050 0.6026067138 0.5751839876
+ 0.6173228025 0.6035735011 0.5763192177
+ 0.6183164120 0.6045382023 0.5774521828
+ 0.6193056703 0.6054980159 0.5785800815
+ 0.6202933788 0.6064559221 0.5797063112
+ 0.6212763786 0.6074082851 0.5808271170
+ 0.6222583055 0.6083593965 0.5819467902
+ 0.6232348084 0.6093046069 0.5830612183
+ 0.6242107153 0.6102492809 0.5841749907
+ 0.6251806021 0.6111894846 0.5852832198
+ 0.6261504889 0.6121296883 0.5863913894
+ 0.6271138787 0.6130650043 0.5874921083
+ 0.6280770898 0.6140003204 0.5885927081
+ 0.6290364861 0.6149287820 0.5896871090
+ 0.6299952865 0.6158562899 0.5907804966
+ 0.6309506893 0.6167783141 0.5918691754
+ 0.6319050193 0.6176983714 0.5929561257
+ 0.6328564286 0.6186152101 0.5940394998
+ 0.6338058114 0.6195300221 0.5951203108
+ 0.6347532272 0.6204434037 0.5961987972
+ 0.6356977224 0.6213548779 0.5972741246
+ 0.6366410255 0.6222651005 0.5983482003
+ 0.6375805140 0.6231712103 0.5994184017
+ 0.6385198832 0.6240770817 0.6004886031
+ 0.6394541860 0.6249756217 0.6015521884
+ 0.6403884888 0.6258741021 0.6026158929
+ 0.6413171291 0.6267682910 0.6036748886
+ 0.6422441006 0.6276612878 0.6047325730
+ 0.6431670189 0.6285513043 0.6057875156
+ 0.6440864801 0.6294386983 0.6068398952
+ 0.6450045109 0.6303241253 0.6078910232
+ 0.6459187269 0.6312044263 0.6089388132
+ 0.6468328238 0.6320846081 0.6099866033
+ 0.6477437019 0.6329575181 0.6110302806
+ 0.6486546993 0.6338304281 0.6120740771
+ 0.6495618224 0.6346995831 0.6131126285
+ 0.6504672766 0.6355671883 0.6141489744
+ 0.6513699889 0.6364325881 0.6151828170
+ 0.6522679925 0.6372947097 0.6162124276
+ 0.6531658173 0.6381564736 0.6172416806
+ 0.6540582776 0.6390134096 0.6182652116
+ 0.6549509168 0.6398702264 0.6192886233
+ 0.6558411717 0.6407238245 0.6203082800
+ 0.6567304134 0.6415758729 0.6213262081
+ 0.6576179862 0.6424263716 0.6223418713
+ 0.6585016847 0.6432734728 0.6233528256
+ 0.6593855023 0.6441205740 0.6243637204
+ 0.6602624059 0.6449629068 0.6253690124
+ 0.6611385942 0.6458048224 0.6263738275
+ 0.6620121002 0.6466442943 0.6273748279
+ 0.6628826857 0.6474813819 0.6283720732
+ 0.6637530923 0.6483181715 0.6293689013
+ 0.6646183133 0.6491507292 0.6303573847
+ 0.6654834747 0.6499832869 0.6313458085
+ 0.6663444042 0.6508116722 0.6323295832
+ 0.6672021747 0.6516373754 0.6333100796
+ 0.6680591702 0.6524623036 0.6342896819
+ 0.6689094901 0.6532815099 0.6352627873
+ 0.6697599292 0.6541007161 0.6362358928
+ 0.6706069708 0.6549171805 0.6372048855
+ 0.6714519858 0.6557319760 0.6381713152
+ 0.6722967029 0.6565461755 0.6391372085
+ 0.6731383204 0.6573548913 0.6400974989
+ 0.6739798784 0.6581636071 0.6410579085
+ 0.6748195887 0.6589679122 0.6420152187
+ 0.6756578088 0.6597688198 0.6429703236
+ 0.6764960289 0.6605696082 0.6439253092
+ 0.6773291230 0.6613646746 0.6448736787
+ 0.6781619787 0.6621596813 0.6458221078
+ 0.6789928079 0.6629531980 0.6467680931
+ 0.6798204780 0.6637446284 0.6477108002
+ 0.6806482077 0.6645358801 0.6486533880
+ 0.6814717054 0.6653245091 0.6495919824
+ 0.6822941899 0.6661124825 0.6505295038
+ 0.6831157207 0.6668993831 0.6514660120
+ 0.6839330792 0.6676816940 0.6523975730
+ 0.6847504973 0.6684640050 0.6533290744
+ 0.6855651736 0.6692435145 0.6542578936
+ 0.6863775253 0.6700205207 0.6551842093
+ 0.6871898174 0.6707975864 0.6561105847
+ 0.6879963279 0.6715716720 0.6570330858
+ 0.6888018250 0.6723455191 0.6579551101
+ 0.6896061897 0.6731184125 0.6588761210
+ 0.6904050112 0.6738871932 0.6597927213
+ 0.6912037730 0.6746560931 0.6607092023
+ 0.6920003891 0.6754217744 0.6616228223
+ 0.6927945018 0.6761841178 0.6625328064
+ 0.6935886145 0.6769462824 0.6634427905
+ 0.6943795085 0.6777051091 0.6643487811
+ 0.6951690912 0.6784626842 0.6652531028
+ 0.6959587932 0.6792201996 0.6661574841
+ 0.6967442036 0.6799734235 0.6670572758
+ 0.6975293159 0.6807262897 0.6679568291
+ 0.6983137727 0.6814782023 0.6688550711
+ 0.6990944743 0.6822254062 0.6697469950
+ 0.6998751163 0.6829724908 0.6706389785
+ 0.7006543279 0.6837174892 0.6715285182
+ 0.7014306784 0.6844587922 0.6724137068
+ 0.7022070885 0.6851999760 0.6732988954
+ 0.7029811740 0.6859381795 0.6741808057
+ 0.7037534118 0.6866738200 0.6750599742
+ 0.7045254707 0.6874092817 0.6759392023
+ 0.7052934766 0.6881412268 0.6768147945
+ 0.7060595751 0.6888713837 0.6776887774
+ 0.7068256140 0.6896017194 0.6785628200
+ 0.7075870037 0.6903280020 0.6794317961
+ 0.7083472013 0.6910533905 0.6802995801
+ 0.7091073990 0.6917787790 0.6811674237
+ 0.7098640800 0.6924982071 0.6820288897
+ 0.7106204033 0.6932169795 0.6828898191
+ 0.7113767266 0.6939358115 0.6837506890
+ 0.7121276259 0.6946483254 0.6846057177
+ 0.7128784060 0.6953607798 0.6854606867
+ 0.7136288881 0.6960731149 0.6863154173
+ 0.7143725157 0.6967815161 0.6871635914
+ 0.7151160836 0.6974899173 0.6880118847
+ 0.7158594131 0.6981980801 0.6888597012
+ 0.7165976167 0.6989027858 0.6897020936
+ 0.7173358798 0.6996076107 0.6905444860
+ 0.7180739045 0.7003120780 0.6913864017
+ 0.7188072801 0.7010132074 0.6922219992
+ 0.7195405960 0.7017142773 0.6930575967
+ 0.7202737927 0.7024151087 0.6938928962
+ 0.7210023999 0.7031126022 0.6947227716
+ 0.7217310071 0.7038099766 0.6955527067
+ 0.7224596143 0.7045074105 0.6963825822
+ 0.7231836915 0.7052016854 0.6972076297
+ 0.7239078283 0.7058959007 0.6980326772
+ 0.7246319056 0.7065901160 0.6988577247
+ 0.7253506184 0.7072818279 0.6996777058
+ 0.7260687947 0.7079733014 0.7004973292
+ 0.7267869711 0.7086647749 0.7013168931
+ 0.7275004983 0.7093524933 0.7021313906
+ 0.7282128930 0.7100393772 0.7029448152
+ 0.7289254069 0.7107263207 0.7037581801
+ 0.7296341062 0.7114102840 0.7045679092
+ 0.7303411961 0.7120929956 0.7053759098
+ 0.7310482860 0.7127758265 0.7061840296
+ 0.7317516804 0.7134565115 0.7069895864
+ 0.7324519753 0.7141355872 0.7077932954
+ 0.7331522107 0.7148147225 0.7085970044
+ 0.7338507175 0.7154917121 0.7093988061
+ 0.7345461249 0.7161653042 0.7101973295
+ 0.7352414727 0.7168390155 0.7109956741
+ 0.7359364033 0.7175115943 0.7117931843
+ 0.7366288900 0.7181801796 0.7125861049
+ 0.7373213172 0.7188488245 0.7133789062
+ 0.7380138040 0.7195172906 0.7141718268
+ 0.7387021184 0.7201828957 0.7149586082
+ 0.7393900752 0.7208483815 0.7157452106
+ 0.7400780916 0.7215139270 0.7165318131
+ 0.7407631874 0.7221763134 0.7173146009
+ 0.7414469719 0.7228373885 0.7180958986
+ 0.7421306968 0.7234985232 0.7188770771
+ 0.7428128123 0.7241570950 0.7196565866
+ 0.7434924841 0.7248123884 0.7204334736
+ 0.7441722155 0.7254676819 0.7212104201
+ 0.7448515892 0.7261224985 0.7219868898
+ 0.7455275059 0.7267739773 0.7227588296
+ 0.7462034225 0.7274255157 0.7235307097
+ 0.7468793988 0.7280768752 0.7243025899
+ 0.7475525737 0.7287256122 0.7250691056
+ 0.7482250929 0.7293733954 0.7258337736
+ 0.7488974929 0.7300211787 0.7265986204
+ 0.7495679855 0.7306671739 0.7273609042
+ 0.7502354980 0.7313104868 0.7281196117
+ 0.7509030104 0.7319536805 0.7288782001
+ 0.7515705228 0.7325968742 0.7296367884
+ 0.7522333264 0.7332357764 0.7303904295
+ 0.7528960109 0.7338746786 0.7311440110
+ 0.7535588145 0.7345135808 0.7318975925
+ 0.7542191148 0.7351499796 0.7326478958
+ 0.7548775077 0.7357847095 0.7333958745
+ 0.7555359006 0.7364193797 0.7341439128
+ 0.7561935782 0.7370532751 0.7348909974
+ 0.7568460703 0.7376828790 0.7356327176
+ 0.7574986815 0.7383124828 0.7363743782
+ 0.7581512928 0.7389420867 0.7371160984
+ 0.7588003278 0.7395684719 0.7378535271
+ 0.7594472766 0.7401931286 0.7385885119
+ 0.7600942850 0.7408177853 0.7393234968
+ 0.7607408166 0.7414417863 0.7400577068
+ 0.7613841295 0.7420616746 0.7407870889
+ 0.7620275021 0.7426816225 0.7415165901
+ 0.7626708746 0.7433015108 0.7422459722
+ 0.7633122802 0.7439180017 0.7429726720
+ 0.7639523745 0.7445324063 0.7436977029
+ 0.7645925283 0.7451466918 0.7444226146
+ 0.7652325034 0.7457607985 0.7451472878
+ 0.7658681273 0.7463697195 0.7458673120
+ 0.7665035725 0.7469785810 0.7465873957
+ 0.7671391964 0.7475875020 0.7473074198
+ 0.7677729130 0.7481939793 0.7480244040
+ 0.7684043050 0.7487975955 0.7487375736
+ 0.7690356970 0.7494012117 0.7494506836
+ 0.7696670890 0.7500048876 0.7501639128
+ 0.7702953815 0.7506046295 0.7508723140
+ 0.7709228992 0.7512034774 0.7515797019
+ 0.7715504766 0.7518025041 0.7522869706
+ 0.7721772194 0.7524008751 0.7529935837
+ 0.7727996707 0.7529972196 0.7536963820
+ 0.7734221816 0.7535933852 0.7543991804
+ 0.7740446925 0.7541896105 0.7551020980
+ 0.7746649981 0.7547839284 0.7558023930
+ 0.7752826810 0.7553762794 0.7565001845
+ 0.7759004831 0.7559686899 0.7571979761
+ 0.7765182853 0.7565611005 0.7578958273
+ 0.7771326900 0.7571496964 0.7585895061
+ 0.7777460814 0.7577372789 0.7592819929
+ 0.7783594728 0.7583248019 0.7599744201
+ 0.7789728045 0.7589122057 0.7606667280
+ 0.7795792222 0.7594966888 0.7613533735
+ 0.7801855803 0.7600811720 0.7620400190
+ 0.7807919979 0.7606657147 0.7627267241
+ 0.7813968062 0.7612491846 0.7634122968
+ 0.7819966078 0.7618296742 0.7640944123
+ 0.7825964093 0.7624102235 0.7647765279
+ 0.7831960917 0.7629907131 0.7654587030
+ 0.7837939262 0.7635689974 0.7661380172
+ 0.7843887806 0.7641444206 0.7668138146
+ 0.7849838138 0.7647197843 0.7674896717
+ 0.7855787873 0.7652952075 0.7681655288
+ 0.7861704826 0.7658686042 0.7688372731
+ 0.7867596745 0.7664408088 0.7695063949
+ 0.7873489261 0.7670128942 0.7701755166
+ 0.7879381776 0.7675850987 0.7708445787
+ 0.7885246873 0.7681542039 0.7715098858
+ 0.7891101837 0.7687221169 0.7721735835
+ 0.7896956205 0.7692900896 0.7728372812
+ 0.7902809978 0.7698580027 0.7735010982
+ 0.7908638120 0.7704228759 0.7741602063
+ 0.7914459109 0.7709870934 0.7748184204
+ 0.7920280099 0.7715513706 0.7754765153
+ 0.7926099896 0.7721155882 0.7761346102
+ 0.7931870222 0.7726777196 0.7767888904
+ 0.7937632799 0.7732396722 0.7774425745
+ 0.7943394780 0.7738016248 0.7780963182
+ 0.7949157953 0.7743635178 0.7787501216
+ 0.7954884768 0.7749227285 0.7793995142
+ 0.7960608006 0.7754815817 0.7800486088
+ 0.7966331244 0.7760406137 0.7806975842
+ 0.7972053885 0.7765995860 0.7813466787
+ 0.7977746129 0.7771558762 0.7819913030
+ 0.7983434796 0.7777119875 0.7826355100
+ 0.7989124060 0.7782680988 0.7832797170
+ 0.7994812727 0.7788242102 0.7839238048
+ 0.8000450134 0.7793778181 0.7845636010
+ 0.8006079793 0.7799311280 0.7852026820
+ 0.8011708856 0.7804843187 0.7858418226
+ 0.8017339110 0.7810376287 0.7864809036
+ 0.8022924066 0.7815880775 0.7871146202
+ 0.8028498292 0.7821378708 0.7877470851
+ 0.8034073114 0.7826877236 0.7883794904
+ 0.8039646745 0.7832375765 0.7890118957
+ 0.8045186996 0.7837849855 0.7896395922
+ 0.8050711751 0.7843313813 0.7902652025
+ 0.8056237102 0.7848778963 0.7908908129
+ 0.8061761856 0.7854242921 0.7915164232
+ 0.8067255020 0.7859687805 0.7921388745
+ 0.8072721958 0.7865118980 0.7927588820
+ 0.8078188896 0.7870550156 0.7933788896
+ 0.8083655834 0.7875980735 0.7939988971
+ 0.8089101911 0.7881401777 0.7946166992
+ 0.8094515800 0.7886806130 0.7952311039
+ 0.8099929094 0.7892209888 0.7958455086
+ 0.8105341792 0.7897614241 0.7964599133
+ 0.8110746741 0.7903016806 0.7970730066
+ 0.8116112947 0.7908411026 0.7976801991
+ 0.8121479154 0.7913805842 0.7982873917
+ 0.8126844764 0.7919200063 0.7988945842
+ 0.8132210970 0.7924594879 0.7995017767
+ 0.8137524128 0.7929970026 0.8001034260
+ 0.8142833114 0.7935343981 0.8007047176
+ 0.8148142099 0.7940719128 0.8013060093
+ 0.8153451085 0.7946093082 0.8019073009
+ 0.8158726096 0.7951447964 0.8025054932
+ 0.8163983226 0.7956792712 0.8031023145
+ 0.8169239759 0.7962138057 0.8036990762
+ 0.8174496889 0.7967482209 0.8042958975
+ 0.8179737926 0.7972822785 0.8048911095
+ 0.8184949160 0.7978156209 0.8054832816
+ 0.8190159798 0.7983487844 0.8060755134
+ 0.8195371032 0.7988821268 0.8066676855
+ 0.8200582862 0.7994152904 0.8072599173
+ 0.8205738068 0.7999464273 0.8078473806
+ 0.8210893273 0.8004773855 0.8084350228
+ 0.8216049075 0.8010084033 0.8090224862
+ 0.8221204281 0.8015394211 0.8096100092
+ 0.8226320148 0.8020684123 0.8101946115
+ 0.8231410980 0.8025962710 0.8107774258
+ 0.8236501217 0.8031241298 0.8113601804
+ 0.8241592050 0.8036519289 0.8119429946
+ 0.8246672153 0.8041794896 0.8125250936
+ 0.8251705170 0.8047057986 0.8131045103
+ 0.8256738186 0.8052322268 0.8136839271
+ 0.8261770010 0.8057584763 0.8142634034
+ 0.8266803026 0.8062849045 0.8148428202
+ 0.8271808028 0.8068094254 0.8154187202
+ 0.8276802897 0.8073332906 0.8159933090
+ 0.8281797171 0.8078572154 0.8165680170
+ 0.8286792040 0.8083810806 0.8171426058
+ 0.8291776180 0.8089041114 0.8177158237
+ 0.8296723962 0.8094245791 0.8182842731
+ 0.8301671743 0.8099449873 0.8188527822
+ 0.8306620121 0.8104655147 0.8194214106
+ 0.8311567903 0.8109859824 0.8199899197
+ 0.8316488266 0.8115053177 0.8205549717
+ 0.8321394920 0.8120239973 0.8211187720
+ 0.8326302767 0.8125427961 0.8216825724
+ 0.8331211209 0.8130615950 0.8222463727
+ 0.8336114883 0.8135799170 0.8228093982
+ 0.8341001868 0.8140959740 0.8233684897
+ 0.8345888853 0.8146120906 0.8239275217
+ 0.8350775242 0.8151282072 0.8244866133
+ 0.8355662227 0.8156443238 0.8250455856
+ 0.8360525966 0.8161584139 0.8256021738
+ 0.8365371227 0.8166708946 0.8261566162
+ 0.8370215297 0.8171833158 0.8267109990
+ 0.8375059962 0.8176957965 0.8272655010
+ 0.8379905224 0.8182082772 0.8278198838
+ 0.8384705782 0.8187190294 0.8283702135
+ 0.8389502168 0.8192296028 0.8289201260
+ 0.8394296765 0.8197401166 0.8294699192
+ 0.8399093151 0.8202505708 0.8300197124
+ 0.8403881788 0.8207604885 0.8305683136
+ 0.8408648968 0.8212682009 0.8311123848
+ 0.8413414955 0.8217757940 0.8316563964
+ 0.8418180943 0.8222835064 0.8322004080
+ 0.8422946930 0.8227912188 0.8327444792
+ 0.8427696228 0.8232969046 0.8332856894
+ 0.8432425857 0.8238008022 0.8338239789
+ 0.8437157273 0.8243045807 0.8343623281
+ 0.8441886902 0.8248084784 0.8349006772
+ 0.8446617723 0.8253123760 0.8354390264
+ 0.8451316953 0.8258146048 0.8359742165
+ 0.8456004858 0.8263162971 0.8365082145
+ 0.8460692167 0.8268179893 0.8370422125
+ 0.8465380073 0.8273196816 0.8375762105
+ 0.8470066786 0.8278213739 0.8381102085
+ 0.8474733233 0.8283202052 0.8386403918
+ 0.8479397297 0.8288187981 0.8391703963
+ 0.8484060764 0.8293173909 0.8397002816
+ 0.8488724828 0.8298161030 0.8402302861
+ 0.8493387103 0.8303142786 0.8407598138
+ 0.8498020768 0.8308088779 0.8412843943
+ 0.8502655029 0.8313035965 0.8418090940
+ 0.8507289290 0.8317981958 0.8423337936
+ 0.8511922956 0.8322929144 0.8428584933
+ 0.8516547084 0.8327869773 0.8433821201
+ 0.8521131873 0.8332791924 0.8439015746
+ 0.8525716066 0.8337715268 0.8444212079
+ 0.8530300856 0.8342636824 0.8449407220
+ 0.8534886241 0.8347560167 0.8454602957
+ 0.8539462090 0.8352472782 0.8459783792
+ 0.8544015884 0.8357362747 0.8464931250
+ 0.8548570871 0.8362252712 0.8470076919
+ 0.8553125858 0.8367143273 0.8475223184
+ 0.8557680249 0.8372033238 0.8480370045
+ 0.8562228084 0.8376908898 0.8485500813
+ 0.8566759229 0.8381757140 0.8490599990
+ 0.8571289778 0.8386605978 0.8495699167
+ 0.8575822115 0.8391454220 0.8500797749
+ 0.8580353260 0.8396301866 0.8505896926
+ 0.8584871292 0.8401141763 0.8510981798
+ 0.8589360118 0.8405964971 0.8516036868
+ 0.8593848944 0.8410786986 0.8521090746
+ 0.8598337770 0.8415609002 0.8526145816
+ 0.8602827191 0.8420432210 0.8531200290
+ 0.8607307076 0.8425244093 0.8536239862
+ 0.8611760139 0.8430032134 0.8541238904
+ 0.8616213202 0.8434820175 0.8546237946
+ 0.8620666862 0.8439608812 0.8551236987
+ 0.8625119925 0.8444396853 0.8556236029
+ 0.8629568219 0.8449175954 0.8561224937
+ 0.8633992076 0.8453921080 0.8566170931
+ 0.8638417125 0.8458666205 0.8571115732
+ 0.8642840981 0.8463410139 0.8576061130
+ 0.8647266030 0.8468155265 0.8581007123
+ 0.8651688099 0.8472898006 0.8585950136
+ 0.8656079173 0.8477615118 0.8590856194
+ 0.8660469055 0.8482331038 0.8595762849
+ 0.8664858937 0.8487048149 0.8600668907
+ 0.8669250011 0.8491765261 0.8605576158
+ 0.8673639894 0.8496481180 0.8610482216
+ 0.8677995801 0.8501166105 0.8615357280
+ 0.8682346940 0.8505846262 0.8620226979
+ 0.8686698079 0.8510527015 0.8625097871
+ 0.8691048026 0.8515207767 0.8629968762
+ 0.8695399165 0.8519887924 0.8634839058
+ 0.8699728847 0.8524538279 0.8639678955
+ 0.8704047799 0.8529173732 0.8644505143
+ 0.8708366156 0.8533809185 0.8649330735
+ 0.8712685108 0.8538445234 0.8654156923
+ 0.8717002869 0.8543081284 0.8658981919
+ 0.8721306920 0.8547704220 0.8663790226
+ 0.8725587130 0.8552309275 0.8668572903
+ 0.8729867935 0.8556914926 0.8673356175
+ 0.8734148741 0.8561519980 0.8678138852
+ 0.8738428950 0.8566126227 0.8682922125
+ 0.8742704988 0.8570727110 0.8687700033
+ 0.8746942878 0.8575295210 0.8692442775
+ 0.8751180172 0.8579862714 0.8697186112
+ 0.8755416870 0.8584430814 0.8701928854
+ 0.8759654760 0.8588998914 0.8706671000
+ 0.8763892055 0.8593567014 0.8711413741
+ 0.8768100739 0.8598098755 0.8716111183
+ 0.8772302270 0.8602619767 0.8720793724
+ 0.8776502013 0.8607140779 0.8725476861
+ 0.8780702949 0.8611662984 0.8730159998
+ 0.8784903288 0.8616183996 0.8734843135
+ 0.8789088130 0.8620693088 0.8739504814
+ 0.8793246746 0.8625183105 0.8744130135
+ 0.8797405958 0.8629671931 0.8748756051
+ 0.8801565170 0.8634161949 0.8753381968
+ 0.8805723190 0.8638650775 0.8758007884
+ 0.8809881806 0.8643140793 0.8762633801
+ 0.8814008832 0.8647593260 0.8767219186
+ 0.8818134069 0.8652043939 0.8771802187
+ 0.8822258711 0.8656494021 0.8776385188
+ 0.8826382756 0.8660945296 0.8780966997
+ 0.8830507994 0.8665394783 0.8785549998
+ 0.8834620118 0.8669828176 0.8790109158
+ 0.8838717937 0.8674241900 0.8794640899
+ 0.8842815161 0.8678655028 0.8799173236
+ 0.8846911788 0.8683068752 0.8803703785
+ 0.8851009011 0.8687481880 0.8808236122
+ 0.8855106831 0.8691896200 0.8812767863
+ 0.8859174252 0.8696290851 0.8817254901
+ 0.8863239288 0.8700686097 0.8821738958
+ 0.8867303729 0.8705080152 0.8826223016
+ 0.8871369958 0.8709474802 0.8830707073
+ 0.8875434995 0.8713868856 0.8835191131
+ 0.8879491091 0.8718252778 0.8839659095
+ 0.8883531094 0.8722618222 0.8844100833
+ 0.8887569904 0.8726983070 0.8848543167
+ 0.8891609907 0.8731347919 0.8852983713
+ 0.8895649910 0.8735713959 0.8857426047
+ 0.8899689913 0.8740078807 0.8861867189
+ 0.8903707862 0.8744425774 0.8866271973
+ 0.8907716870 0.8748766780 0.8870663047
+ 0.8911727071 0.8753107786 0.8875054717
+ 0.8915737271 0.8757449985 0.8879445791
+ 0.8919746876 0.8761790991 0.8883838058
+ 0.8923754096 0.8766130209 0.8888226151
+ 0.8927729726 0.8770452738 0.8892570734
+ 0.8931705952 0.8774775267 0.8896915913
+ 0.8935680985 0.8779097199 0.8901261091
+ 0.8939657211 0.8783419728 0.8905606270
+ 0.8943632245 0.8787742257 0.8909950852
+ 0.8947597742 0.8792054057 0.8914281130
+ 0.8951544762 0.8796346784 0.8918585181
+ 0.8955491781 0.8800640702 0.8922889233
+ 0.8959439993 0.8804934025 0.8927193284
+ 0.8963387012 0.8809227943 0.8931496739
+ 0.8967334032 0.8813521862 0.8935800791
+ 0.8971260786 0.8817800879 0.8940076232
+ 0.8975175023 0.8822070956 0.8944330812
+ 0.8979089856 0.8826341033 0.8948585987
+ 0.8983004093 0.8830611110 0.8952841163
+ 0.8986917734 0.8834881186 0.8957095742
+ 0.8990831971 0.8839151263 0.8961350918
+ 0.8994715810 0.8843405843 0.8965569735
+ 0.8998593092 0.8847656846 0.8969780207
+ 0.9002469778 0.8851909041 0.8973988891
+ 0.9006347060 0.8856160045 0.8978198767
+ 0.9010223746 0.8860412240 0.8982409239
+ 0.9014101028 0.8864663243 0.8986619115
+ 0.9017949104 0.8868888021 0.8990790844
+ 0.9021794796 0.8873111010 0.8994960785
+ 0.9025642276 0.8877333999 0.8999131918
+ 0.9029487967 0.8881556988 0.9003301859
+ 0.9033334851 0.8885779977 0.9007471800
+ 0.9037179947 0.8890001774 0.9011639953
+ 0.9041002989 0.8894202113 0.9015762210
+ 0.9044826031 0.8898401856 0.9019883871
+ 0.9048647881 0.8902602196 0.9024006128
+ 0.9052470922 0.8906801939 0.9028128982
+ 0.9056293964 0.8911002278 0.9032251239
+ 0.9060112834 0.8915200233 0.9036368132
+ 0.9063897133 0.8919382095 0.9040434957
+ 0.9067682028 0.8923563957 0.9044501781
+ 0.9071465731 0.8927745819 0.9048569202
+ 0.9075250030 0.8931927085 0.9052636027
+ 0.9079034925 0.8936108947 0.9056702852
+ 0.9082816243 0.8940287828 0.9060766101
+ 0.9086568952 0.8944442272 0.9064794779
+ 0.9090322256 0.8948596120 0.9068824053
+ 0.9094074965 0.8952749968 0.9072852731
+ 0.9097827077 0.8956903815 0.9076882005
+ 0.9101579785 0.8961058259 0.9080911279
+ 0.9105333090 0.8965210915 0.9084938765
+ 0.9109072089 0.8969342113 0.9088944793
+ 0.9112812281 0.8973472714 0.9092950225
+ 0.9116551280 0.8977603912 0.9096956253
+ 0.9120290875 0.8981735110 0.9100962281
+ 0.9124029875 0.8985865712 0.9104967713
+ 0.9127770066 0.8989996910 0.9108973742
+ 0.9131482840 0.8994112015 0.9112942219
+ 0.9135193825 0.8998224735 0.9116908908
+ 0.9138906002 0.9002338052 0.9120875001
+ 0.9142616987 0.9006450772 0.9124842286
+ 0.9146327972 0.9010564089 0.9128807783
+ 0.9150040150 0.9014678001 0.9132773876
+ 0.9153717160 0.9018769264 0.9136704803
+ 0.9157385230 0.9022855163 0.9140626192
+ 0.9161052704 0.9026941061 0.9144545794
+ 0.9164720774 0.9031026959 0.9148467183
+ 0.9168388844 0.9035112262 0.9152387977
+ 0.9172058105 0.9039198160 0.9156308770
+ 0.9175711274 0.9043270946 0.9160212278
+ 0.9179353714 0.9047334194 0.9164103270
+ 0.9182996750 0.9051396847 0.9167994261
+ 0.9186639786 0.9055461287 0.9171885848
+ 0.9190282822 0.9059523940 0.9175776839
+ 0.9193925858 0.9063587785 0.9179667830
+ 0.9197562933 0.9067645073 0.9183548093
+ 0.9201188087 0.9071691036 0.9187405109
+ 0.9204813242 0.9075737000 0.9191262126
+ 0.9208437800 0.9079781771 0.9195119143
+ 0.9212062955 0.9083827734 0.9198976159
+ 0.9215688109 0.9087874293 0.9202833176
+ 0.9219312072 0.9091919065 0.9206687808
+ 0.9222893715 0.9095938206 0.9210494161
+ 0.9226475954 0.9099956155 0.9214301109
+ 0.9230058193 0.9103975296 0.9218106866
+ 0.9233639836 0.9107993841 0.9221913218
+ 0.9237222075 0.9112012982 0.9225718975
+ 0.9240803123 0.9116032124 0.9229525924
+ 0.9244369268 0.9120035768 0.9233309031
+ 0.9247925282 0.9124032259 0.9237080812
+ 0.9251481891 0.9128028750 0.9240853786
+ 0.9255039096 0.9132025838 0.9244626164
+ 0.9258595705 0.9136022925 0.9248397946
+ 0.9262152910 0.9140018821 0.9252169728
+ 0.9265707731 0.9144011736 0.9255934954
+ 0.9269257188 0.9147990942 0.9259678721
+ 0.9272807240 0.9151970148 0.9263421893
+ 0.9276356101 0.9155949950 0.9267166257
+ 0.9279906154 0.9159929156 0.9270910025
+ 0.9283455014 0.9163908958 0.9274653792
+ 0.9287005067 0.9167888165 0.9278396964
+ 0.9290528893 0.9171856046 0.9282106161
+ 0.9294046760 0.9175820947 0.9285805225
+ 0.9297564030 0.9179785252 0.9289504290
+ 0.9301081896 0.9183750153 0.9293202758
+ 0.9304599166 0.9187715054 0.9296901822
+ 0.9308117032 0.9191678762 0.9300600886
+ 0.9311624765 0.9195644259 0.9304289222
+ 0.9315106869 0.9199606180 0.9307948947
+ 0.9318587780 0.9203569293 0.9311608076
+ 0.9322069883 0.9207531810 0.9315267801
+ 0.9325551987 0.9211494923 0.9318928123
+ 0.9329034090 0.9215456843 0.9322587848
+ 0.9332516193 0.9219419956 0.9326246977
+ 0.9335985184 0.9223375916 0.9329884052
+ 0.9339448810 0.9227328897 0.9333512187
+ 0.9342911839 0.9231281281 0.9337139130
+ 0.9346376061 0.9235234261 0.9340766072
+ 0.9349840283 0.9239187241 0.9344394207
+ 0.9353303909 0.9243140221 0.9348021150
+ 0.9356765747 0.9247090816 0.9351645112
+ 0.9360207915 0.9251027107 0.9355235100
+ 0.9363651276 0.9254962802 0.9358825088
+ 0.9367092848 0.9258899093 0.9362415075
+ 0.9370536208 0.9262835979 0.9366003871
+ 0.9373977780 0.9266772270 0.9369593859
+ 0.9377421141 0.9270707965 0.9373183846
+ 0.9380850196 0.9274641871 0.9376757145
+ 0.9384257793 0.9278573990 0.9380304813
+ 0.9387664795 0.9282506704 0.9383851886
+ 0.9391072989 0.9286438823 0.9387400150
+ 0.9394481182 0.9290370941 0.9390947223
+ 0.9397888780 0.9294303060 0.9394494891
+ 0.9401296973 0.9298235178 0.9398041964
+ 0.9404693842 0.9302158952 0.9401566982
+ 0.9408084750 0.9306079149 0.9405080080
+ 0.9411476254 0.9309998751 0.9408593178
+ 0.9414865971 0.9313920140 0.9412106276
+ 0.9418256879 0.9317839742 0.9415618777
+ 0.9421647787 0.9321759939 0.9419131875
+ 0.9425039291 0.9325680137 0.9422644973
+ 0.9428421259 0.9329584837 0.9426131845
+ 0.9431802034 0.9333485961 0.9429615140
+ 0.9435182810 0.9337388277 0.9433097839
+ 0.9438564181 0.9341289997 0.9436581135
+ 0.9441944957 0.9345191121 0.9440063834
+ 0.9445325732 0.9349092841 0.9443547130
+ 0.9448707104 0.9352995157 0.9447029829
+ 0.9452053905 0.9356890917 0.9450477958
+ 0.9455401897 0.9360786080 0.9453927279
+ 0.9458749294 0.9364681840 0.9457374811
+ 0.9462096095 0.9368578196 0.9460824132
+ 0.9465444088 0.9372473955 0.9464272261
+ 0.9468790889 0.9376369119 0.9467720985
+ 0.9472135901 0.9380264282 0.9471164942
+ 0.9475457072 0.9384145737 0.9474576116
+ 0.9478777051 0.9388027787 0.9477987289
+ 0.9482098222 0.9391909838 0.9481397867
+ 0.9485418797 0.9395791888 0.9484809041
+ 0.9488739967 0.9399673939 0.9488220215
+ 0.9492059946 0.9403555989 0.9491630793
+ 0.9495379925 0.9407432079 0.9495037794
+ 0.9498690963 0.9411267042 0.9498416781
+ 0.9502003193 0.9415103197 0.9501795769
+ 0.9505314231 0.9418938756 0.9505175948
+ 0.9508625865 0.9422774911 0.9508554935
+ 0.9511936903 0.9426611066 0.9511933923
+ 0.9515247941 0.9430447221 0.9515312910
+ 0.9518557191 0.9434276223 0.9518690109
+ 0.9521846175 0.9438055754 0.9522042871
+ 0.9525135756 0.9441835880 0.9525396228
+ 0.9528424740 0.9445616007 0.9528750181
+ 0.9531713724 0.9449396133 0.9532102942
+ 0.9535002708 0.9453176260 0.9535456896
+ 0.9538292289 0.9456955194 0.9538810253
+ 0.9541580081 0.9460734129 0.9542161226
+ 0.9544816017 0.9464468956 0.9545456171
+ 0.9548051953 0.9468203783 0.9548751116
+ 0.9551287889 0.9471939802 0.9552046061
+ 0.9554523826 0.9475675225 0.9555341005
+ 0.9557759166 0.9479411244 0.9558635950
+ 0.9560995102 0.9483146071 0.9561930895
+ 0.9564231038 0.9486880898 0.9565225840
+ 0.9567415714 0.9490590096 0.9568458200
+ 0.9570595026 0.9494295716 0.9571682215
+ 0.9573773146 0.9498001933 0.9574906230
+ 0.9576951861 0.9501708150 0.9578130245
+ 0.9580131173 0.9505413771 0.9581354260
+ 0.9583309889 0.9509119987 0.9584578276
+ 0.9586488008 0.9512825012 0.9587802291
+ 0.9589642882 0.9516518712 0.9591000080
+ 0.9592787027 0.9520208240 0.9594187140
+ 0.9595931172 0.9523895979 0.9597374201
+ 0.9599075913 0.9527583718 0.9600561261
+ 0.9602220058 0.9531273246 0.9603748918
+ 0.9605364203 0.9534960985 0.9606935978
+ 0.9608507752 0.9538649917 0.9610123038
+ 0.9611636996 0.9542328715 0.9613298178
+ 0.9614747763 0.9545994997 0.9616457224
+ 0.9617857933 0.9549661875 0.9619616866
+ 0.9620968103 0.9553328753 0.9622775912
+ 0.9624078274 0.9556996226 0.9625936151
+ 0.9627187848 0.9560663104 0.9629095197
+ 0.9630298018 0.9564329982 0.9632254839
+ 0.9633405209 0.9567993283 0.9635409713
+ 0.9636486173 0.9571633935 0.9638535976
+ 0.9639567733 0.9575273991 0.9641662836
+ 0.9642649889 0.9578914046 0.9644789100
+ 0.9645730853 0.9582554102 0.9647914767
+ 0.9648813009 0.9586194158 0.9651042223
+ 0.9651893973 0.9589834809 0.9654167891
+ 0.9654976130 0.9593474865 0.9657294154
+ 0.9658039808 0.9597097039 0.9660398960
+ 0.9661098123 0.9600713849 0.9663494825
+ 0.9664155245 0.9604331255 0.9666591883
+ 0.9667212963 0.9607948065 0.9669688940
+ 0.9670271277 0.9611564875 0.9672784805
+ 0.9673328996 0.9615182281 0.9675881863
+ 0.9676386118 0.9618799090 0.9678978920
+ 0.9679433107 0.9622406960 0.9682065248
+ 0.9682455063 0.9625995755 0.9685127139
+ 0.9685477018 0.9629585743 0.9688190222
+ 0.9688498974 0.9633175135 0.9691252112
+ 0.9691520929 0.9636763930 0.9694314003
+ 0.9694542885 0.9640353918 0.9697375894
+ 0.9697564840 0.9643942714 0.9700438976
+ 0.9700586796 0.9647533298 0.9703500867
+ 0.9703577757 0.9651095867 0.9706525803
+ 0.9706562161 0.9654654264 0.9709542990
+ 0.9709545970 0.9658210874 0.9712558985
+ 0.9712529182 0.9661768079 0.9715574980
+ 0.9715512991 0.9665325880 0.9718590975
+ 0.9718496799 0.9668883085 0.9721608162
+ 0.9721480012 0.9672440290 0.9724624157
+ 0.9724456072 0.9675989747 0.9727630019
+ 0.9727405906 0.9679515958 0.9730604291
+ 0.9730355740 0.9683042169 0.9733577967
+ 0.9733306766 0.9686567783 0.9736552238
+ 0.9736257195 0.9690095186 0.9739525914
+ 0.9739207029 0.9693620801 0.9742500186
+ 0.9742156863 0.9697147012 0.9745473862
+ 0.9745107293 0.9700673223 0.9748446941
+ 0.9748036265 0.9704176188 0.9751394987
+ 0.9750949740 0.9707666039 0.9754326940
+ 0.9753863811 0.9711155295 0.9757258296
+ 0.9756777883 0.9714645147 0.9760190248
+ 0.9759691954 0.9718133807 0.9763122201
+ 0.9762606025 0.9721624255 0.9766052961
+ 0.9765521288 0.9725112915 0.9768984914
+ 0.9768434763 0.9728602171 0.9771916270
+ 0.9771314263 0.9732053876 0.9774799943
+ 0.9774190784 0.9735503197 0.9777678847
+ 0.9777066708 0.9738951921 0.9780558944
+ 0.9779943228 0.9742401242 0.9783437848
+ 0.9782819748 0.9745849967 0.9786317945
+ 0.9785696268 0.9749299288 0.9789196849
+ 0.9788572788 0.9752748013 0.9792076945
+ 0.9791442752 0.9756188989 0.9794946909
+ 0.9794281721 0.9759591818 0.9797772765
+ 0.9797121286 0.9762995839 0.9800599217
+ 0.9799959064 0.9766399860 0.9803425074
+ 0.9802798033 0.9769803882 0.9806250930
+ 0.9805637002 0.9773206711 0.9809077978
+ 0.9808475971 0.9776610732 0.9811903834
+ 0.9811314940 0.9780014753 0.9814730287
+ 0.9814137816 0.9783400297 0.9817537069
+ 0.9816933274 0.9786750078 0.9820309877
+ 0.9819728136 0.9790101051 0.9823082089
+ 0.9822522998 0.9793450832 0.9825854897
+ 0.9825317860 0.9796801805 0.9828627110
+ 0.9828112721 0.9800152183 0.9831399918
+ 0.9830908179 0.9803503156 0.9834172726
+ 0.9833703041 0.9806852937 0.9836944938
+ 0.9836477041 0.9810177088 0.9839690924
+ 0.9839227200 0.9813470840 0.9842407703
+ 0.9841976762 0.9816765189 0.9845123887
+ 0.9844726920 0.9820057750 0.9847840071
+ 0.9847477078 0.9823352098 0.9850556254
+ 0.9850227237 0.9826645255 0.9853271842
+ 0.9852976203 0.9829939008 0.9855988026
+ 0.9855725765 0.9833232760 0.9858704209
+ 0.9858452082 0.9836488962 0.9861391783
+ 0.9861155152 0.9839711785 0.9864053130
+ 0.9863858223 0.9842935205 0.9866713285
+ 0.9866561890 0.9846158028 0.9869374037
+ 0.9869264960 0.9849380851 0.9872034788
+ 0.9871968031 0.9852603078 0.9874696136
+ 0.9874671102 0.9855825901 0.9877356291
+ 0.9877374172 0.9859048724 0.9880017042
+ 0.9880046248 0.9862229228 0.9882646799
+ 0.9882686138 0.9865366220 0.9885246158
+ 0.9885327220 0.9868503809 0.9887844920
+ 0.9887967110 0.9871640801 0.9890444875
+ 0.9890608191 0.9874778986 0.9893044233
+ 0.9893248081 0.9877915978 0.9895642996
+ 0.9895889163 0.9881054163 0.9898241758
+ 0.9898529053 0.9884191155 0.9900841713
+ 0.9901142120 0.9887291193 0.9903411865
+ 0.9903718829 0.9890338778 0.9905943871
+ 0.9906294942 0.9893386960 0.9908475280
+ 0.9908872247 0.9896435142 0.9911007285
+ 0.9911447763 0.9899483919 0.9913538098
+ 0.9914023876 0.9902532101 0.9916070104
+ 0.9916601181 0.9905580282 0.9918600917
+ 0.9919177294 0.9908627868 0.9921131730
+ 0.9921736121 0.9911643267 0.9923645854
+ 0.9924249053 0.9914569855 0.9926109910
+ 0.9926763177 0.9917497039 0.9928573966
+ 0.9929276109 0.9920424223 0.9931039214
+ 0.9931789041 0.9923352003 0.9933503270
+ 0.9934303164 0.9926279187 0.9935967922
+ 0.9936816096 0.9929205775 0.9938431978
+ 0.9939329028 0.9932134151 0.9940897226
+ 0.9941837192 0.9935051799 0.9943355918
+ 0.9944264293 0.9937829971 0.9945728183
+ 0.9946690202 0.9940606952 0.9948101044
+ 0.9949116111 0.9943385124 0.9950473905
+ 0.9951542020 0.9946163297 0.9952846169
+ 0.9953969121 0.9948940873 0.9955219030
+ 0.9956395030 0.9951717854 0.9957591891
+ 0.9958820939 0.9954496026 0.9959964752
+ 0.9961246848 0.9957274199 0.9962337017
+ 0.9963588715 0.9959930182 0.9964621067
+ 0.9965906739 0.9962550998 0.9966878295
+ 0.9968224764 0.9965171814 0.9969136119
+ 0.9970542789 0.9967793226 0.9971392751
+ 0.9972860217 0.9970414042 0.9973651171
+ 0.9975178242 0.9973034859 0.9975907803
+ 0.9977496266 0.9975656271 0.9978166223
+ 0.9979814291 0.9978277087 0.9980422854
+ 0.9982097745 0.9980804920 0.9982643723
+ 0.9984334707 0.9983204007 0.9984812737
+ 0.9986572862 0.9985604286 0.9986982942
+ 0.9988811016 0.9988002777 0.9989151955
+ 0.9991049170 0.9990401864 0.9991322160
+ 0.9993286729 0.9992802143 0.9993491173
+ 0.9995524287 0.9995201230 0.9995660782
+ 0.9997761846 0.9997600913 0.9997829795
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_vista_400.spi1d b/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_vista_400.spi1d
new file mode 100644
index 00000000000..334638846b9
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_vista_400.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0176717807 0.0159793403 0.0112875197
+ 0.0304853506 0.0281650797 0.0208594296
+ 0.0410733782 0.0387531407 0.0291500594
+ 0.0505116396 0.0483908802 0.0366822407
+ 0.0592069514 0.0573300086 0.0436884314
+ 0.0673851594 0.0657815933 0.0503007919
+ 0.0751756504 0.0738594905 0.0565973185
+ 0.0826697499 0.0815291628 0.0626588985
+ 0.0899700671 0.0889572278 0.0685112923
+ 0.0971127078 0.0961195603 0.0741866305
+ 0.1040614992 0.1030588970 0.0796945021
+ 0.1108867973 0.1097960994 0.0850348696
+ 0.1175592989 0.1162500009 0.0902234167
+ 0.1240769997 0.1224389970 0.0952606276
+ 0.1304063946 0.1284389049 0.1001622975
+ 0.1365357041 0.1342712045 0.1049377993
+ 0.1425068974 0.1399544030 0.1096132994
+ 0.1483051926 0.1454842985 0.1141887009
+ 0.1539328992 0.1508464068 0.1186479032
+ 0.1594130993 0.1560681015 0.1230128035
+ 0.1647385061 0.1611503065 0.1272864938
+ 0.1699229032 0.1660998017 0.1315000951
+ 0.1749854982 0.1709350944 0.1356704980
+ 0.1799377054 0.1756564975 0.1397946030
+ 0.1847759038 0.1802780032 0.1438630074
+ 0.1895146966 0.1848101020 0.1478590965
+ 0.1941531003 0.1892485023 0.1517767012
+ 0.1987002045 0.1936012954 0.1556075960
+ 0.2031593025 0.1978708953 0.1593558043
+ 0.2075425982 0.2020536959 0.1630499065
+ 0.2118435949 0.2061593980 0.1667018980
+ 0.2160740942 0.2101961970 0.1703169942
+ 0.2202394009 0.2141588926 0.1739034057
+ 0.2243397981 0.2180612981 0.1774580032
+ 0.2283758074 0.2218959928 0.1809788048
+ 0.2323485017 0.2256778032 0.1844571978
+ 0.2362571955 0.2294041961 0.1878990978
+ 0.2401061058 0.2330839932 0.1913042963
+ 0.2438924015 0.2367096990 0.1946662962
+ 0.2476287931 0.2402735949 0.1979884058
+ 0.2513082922 0.2437945008 0.2012688965
+ 0.2549471855 0.2472652048 0.2045135945
+ 0.2585380971 0.2506807148 0.2077264041
+ 0.2620711029 0.2540544868 0.2109075934
+ 0.2655648887 0.2573910058 0.2140623927
+ 0.2690165043 0.2606757879 0.2171906978
+ 0.2724193931 0.2639169097 0.2202925980
+ 0.2757751048 0.2671265006 0.2233645022
+ 0.2791010141 0.2702954113 0.2264122963
+ 0.2823888063 0.2734270096 0.2294276059
+ 0.2856281996 0.2765175104 0.2324116975
+ 0.2888259888 0.2795749009 0.2353696972
+ 0.2919923067 0.2826111019 0.2383048981
+ 0.2951227129 0.2856203914 0.2412146926
+ 0.2982215881 0.2885940969 0.2441015989
+ 0.3012860119 0.2915267050 0.2469657958
+ 0.3043090105 0.2944279015 0.2498013973
+ 0.3073101938 0.2973093092 0.2526110113
+ 0.3102934957 0.3001666963 0.2553977966
+ 0.3132512867 0.3029935062 0.2581652105
+ 0.3161765933 0.3057951033 0.2609097958
+ 0.3190675080 0.3085728884 0.2636330128
+ 0.3219313025 0.3113223910 0.2663359046
+ 0.3247652054 0.3140394092 0.2690128982
+ 0.3275650144 0.3167183995 0.2716695964
+ 0.3303397894 0.3193723857 0.2743076086
+ 0.3330946863 0.3220146000 0.2769277096
+ 0.3358342946 0.3246417940 0.2795312107
+ 0.3385555148 0.3272505105 0.2821188867
+ 0.3412531912 0.3298355937 0.2846879959
+ 0.3439249098 0.3323946893 0.2872357965
+ 0.3465682864 0.3349305987 0.2897650003
+ 0.3491815031 0.3374486864 0.2922779918
+ 0.3517724872 0.3399476111 0.2947722971
+ 0.3543426991 0.3424271047 0.2972482145
+ 0.3568890095 0.3448829055 0.2997061908
+ 0.3594169915 0.3473187089 0.3021450043
+ 0.3619238138 0.3497349918 0.3045690060
+ 0.3644065857 0.3521293998 0.3069755137
+ 0.3668681085 0.3545056880 0.3093619943
+ 0.3693178892 0.3568738103 0.3117316961
+ 0.3717587888 0.3592340052 0.3140853941
+ 0.3741885126 0.3615838885 0.3164219856
+ 0.3766059875 0.3639225960 0.3187406957
+ 0.3790099025 0.3662486970 0.3210408986
+ 0.3813976049 0.3685598075 0.3233255148
+ 0.3837701082 0.3708567023 0.3255949020
+ 0.3861232102 0.3731352985 0.3278453052
+ 0.3884578049 0.3753966093 0.3300752938
+ 0.3907732964 0.3776400983 0.3322862089
+ 0.3930662870 0.3798610866 0.3344799876
+ 0.3953461945 0.3820647001 0.3366613984
+ 0.3976148069 0.3842560053 0.3388288021
+ 0.3998697102 0.3864341080 0.3409801126
+ 0.4021120965 0.3886001110 0.3431150019
+ 0.4043419063 0.3907540143 0.3452382982
+ 0.4065585136 0.3928948939 0.3473502100
+ 0.4087597132 0.3950211108 0.3494505882
+ 0.4109471142 0.3971337974 0.3515371084
+ 0.4131202102 0.3992326856 0.3536098003
+ 0.4152786136 0.4013175070 0.3556677103
+ 0.4174210131 0.4033867121 0.3577109873
+ 0.4195466042 0.4054397941 0.3597368896
+ 0.4216561913 0.4074774981 0.3617466092
+ 0.4237481952 0.4094994962 0.3637399971
+ 0.4258198142 0.4115054905 0.3657152951
+ 0.4278750122 0.4134953022 0.3676727116
+ 0.4299133122 0.4154728055 0.3696179092
+ 0.4319362044 0.4174365997 0.3715522885
+ 0.4339421093 0.4193887115 0.3734749854
+ 0.4359337986 0.4213280082 0.3753845096
+ 0.4379098117 0.4232569933 0.3772805035
+ 0.4398722053 0.4251773953 0.3791654110
+ 0.4418199062 0.4270893037 0.3810392916
+ 0.4437533915 0.4289928973 0.3829011917
+ 0.4456734061 0.4308882058 0.3847497106
+ 0.4475804865 0.4327754080 0.3865840137
+ 0.4494752884 0.4346545041 0.3884027004
+ 0.4513584077 0.4365256131 0.3902072906
+ 0.4532304108 0.4383887947 0.3919999897
+ 0.4550901055 0.4402442873 0.3937804997
+ 0.4569362104 0.4420920908 0.3955484033
+ 0.4587698877 0.4439322948 0.3973042071
+ 0.4605911970 0.4457649887 0.3990490139
+ 0.4624013007 0.4475904107 0.4007813931
+ 0.4641987979 0.4494084120 0.4025042057
+ 0.4659827948 0.4512192011 0.4042207897
+ 0.4677540958 0.4530228972 0.4059314132
+ 0.4695135057 0.4548195899 0.4076353014
+ 0.4712609053 0.4566093981 0.4093317986
+ 0.4729954898 0.4583922923 0.4110203981
+ 0.4747171104 0.4601685107 0.4127005041
+ 0.4764277041 0.4619381130 0.4143716097
+ 0.4781259000 0.4637005925 0.4160360992
+ 0.4798142016 0.4654561877 0.4176951051
+ 0.4814904928 0.4672054946 0.4193486869
+ 0.4831553996 0.4689483941 0.4209963977
+ 0.4848085046 0.4706839025 0.4226379097
+ 0.4864495993 0.4724108875 0.4242731035
+ 0.4880791903 0.4741292000 0.4259015024
+ 0.4896988869 0.4758399129 0.4275228083
+ 0.4913074970 0.4775409997 0.4291365147
+ 0.4929072857 0.4792341888 0.4307413101
+ 0.4944972992 0.4809193015 0.4323380888
+ 0.4960778058 0.4825971127 0.4339267015
+ 0.4976491034 0.4842678010 0.4355069101
+ 0.4992105067 0.4859308898 0.4370785952
+ 0.5007578135 0.4875870049 0.4386403859
+ 0.5022947788 0.4892325103 0.4401915073
+ 0.5038217902 0.4908691049 0.4417355955
+ 0.5053405166 0.4924972057 0.4432739019
+ 0.5068516731 0.4941171110 0.4448068142
+ 0.5083519220 0.4957279861 0.4463337958
+ 0.5098429918 0.4973297119 0.4478540123
+ 0.5113254189 0.4989241958 0.4493685067
+ 0.5127993822 0.5005111098 0.4508773983
+ 0.5142660141 0.5020899177 0.4523806870
+ 0.5157235265 0.5036565065 0.4538762867
+ 0.5171709061 0.5052154064 0.4553655088
+ 0.5186092257 0.5067667961 0.4568488002
+ 0.5200390816 0.5083103776 0.4583263099
+ 0.5214567780 0.5098450780 0.4597958028
+ 0.5228651762 0.5113719106 0.4612582922
+ 0.5242664218 0.5128924847 0.4627147019
+ 0.5256614089 0.5144073963 0.4641650915
+ 0.5270467997 0.5159106255 0.4656063020
+ 0.5284280181 0.5174064040 0.4670408070
+ 0.5298041105 0.5188953876 0.4684692025
+ 0.5311722159 0.5203765035 0.4698903859
+ 0.5325285792 0.5218489766 0.4713025093
+ 0.5338789225 0.5233148932 0.4727083147
+ 0.5352239013 0.5247743726 0.4741083086
+ 0.5365588069 0.5262218714 0.4755015075
+ 0.5378903151 0.5276635885 0.4768893123
+ 0.5392178297 0.5290997028 0.4782724977
+ 0.5405359268 0.5305265784 0.4796496034
+ 0.5418452024 0.5319476128 0.4810225964
+ 0.5431485176 0.5333635211 0.4823926091
+ 0.5444443226 0.5347704887 0.4837583005
+ 0.5457333922 0.5361695886 0.4851197004
+ 0.5470187068 0.5375636816 0.4864782095
+ 0.5482994914 0.5389505029 0.4878326058
+ 0.5495707989 0.5403308272 0.4891827106
+ 0.5508363843 0.5417066813 0.4905301034
+ 0.5520933270 0.5430750251 0.4918732047
+ 0.5533440113 0.5444362164 0.4932124019
+ 0.5545908809 0.5457931161 0.4945487976
+ 0.5558316112 0.5471432805 0.4958792031
+ 0.5570693016 0.5484884977 0.4972046018
+ 0.5583047271 0.5498301983 0.4985263944
+ 0.5595293045 0.5511658192 0.4998416901
+ 0.5607494712 0.5524978042 0.5011532903
+ 0.5619639754 0.5538250208 0.5024604797
+ 0.5631700754 0.5551431775 0.5037620068
+ 0.5643717051 0.5564572215 0.5050604939
+ 0.5655639768 0.5577635169 0.5063533187
+ 0.5667486787 0.5590627193 0.5076419711
+ 0.5679283738 0.5603570938 0.5089282990
+ 0.5691004992 0.5616438985 0.5102069974
+ 0.5702697039 0.5629271865 0.5114836097
+ 0.5714333057 0.5642039180 0.5127562284
+ 0.5725921988 0.5654767156 0.5140225887
+ 0.5737485886 0.5667474866 0.5152860284
+ 0.5748950243 0.5680088997 0.5165405869
+ 0.5760377049 0.5692681074 0.5177925825
+ 0.5771713853 0.5705221891 0.5190386772
+ 0.5783004761 0.5717713237 0.5202798247
+ 0.5794264078 0.5730165839 0.5215175748
+ 0.5805451870 0.5742524266 0.5227484703
+ 0.5816622972 0.5754857063 0.5239772797
+ 0.5827761292 0.5767114758 0.5251995921
+ 0.5838869214 0.5779340267 0.5264189839
+ 0.5849927068 0.5791509748 0.5276340246
+ 0.5860930085 0.5803642869 0.5288445950
+ 0.5871897936 0.5815749764 0.5300526023
+ 0.5882819295 0.5827775002 0.5312535167
+ 0.5893725753 0.5839778781 0.5324525833
+ 0.5904521942 0.5851687789 0.5336431861
+ 0.5915297270 0.5863571763 0.5348318219
+ 0.5925999880 0.5875378251 0.5360146761
+ 0.5936675072 0.5887145996 0.5371940136
+ 0.5947307944 0.5898860097 0.5383685827
+ 0.5957894921 0.5910528898 0.5395389199
+ 0.5968446136 0.5922164917 0.5407065153
+ 0.5978962779 0.5933740139 0.5418683290
+ 0.5989465714 0.5945292115 0.5430281758
+ 0.5999879837 0.5956771970 0.5441824794
+ 0.6010277867 0.5968238711 0.5453361273
+ 0.6020594835 0.5979635715 0.5464810133
+ 0.6030905247 0.5991023779 0.5476251245
+ 0.6041157842 0.6002333760 0.5487617254
+ 0.6051399112 0.6013631821 0.5498968959
+ 0.6061576009 0.6024864912 0.5510259271
+ 0.6071736217 0.6036077142 0.5521529913
+ 0.6081838012 0.6047217250 0.5532745719
+ 0.6091915965 0.6058334112 0.5543937087
+ 0.6101928949 0.6069393754 0.5555071235
+ 0.6111915708 0.6080427766 0.5566176176
+ 0.6121845841 0.6091406941 0.5577220917
+ 0.6131750941 0.6102350950 0.5588241220
+ 0.6141607165 0.6113222241 0.5599215031
+ 0.6151443720 0.6124070883 0.5610160828
+ 0.6161242723 0.6134874821 0.5621057153
+ 0.6171023250 0.6145648956 0.5631932020
+ 0.6180763841 0.6156355739 0.5642765760
+ 0.6190484166 0.6167044044 0.5653579831
+ 0.6200155020 0.6177682281 0.5664346814
+ 0.6209805012 0.6188302040 0.5675101280
+ 0.6219391823 0.6198859811 0.5685818195
+ 0.6228963733 0.6209400296 0.5696520209
+ 0.6238467097 0.6219862103 0.5707165003
+ 0.6247966886 0.6230316758 0.5717800856
+ 0.6257433295 0.6240708828 0.5728380084
+ 0.6266897917 0.6251100898 0.5738958120
+ 0.6276292801 0.6261410713 0.5749465227
+ 0.6285687089 0.6271719933 0.5759971142
+ 0.6294990182 0.6281968951 0.5770409107
+ 0.6304280162 0.6292210221 0.5780838728
+ 0.6313526034 0.6302379966 0.5791224837
+ 0.6322757006 0.6312527061 0.5801597238
+ 0.6331943870 0.6322625875 0.5811929703
+ 0.6341099739 0.6332694292 0.5822238922
+ 0.6350240111 0.6342734098 0.5832517147
+ 0.6359356046 0.6352738142 0.5842757225
+ 0.6368461251 0.6362721920 0.5852975249
+ 0.6377531290 0.6372647285 0.5863136053
+ 0.6386598945 0.6382569075 0.5873292089
+ 0.6395592093 0.6392408013 0.5883370042
+ 0.6404585242 0.6402246952 0.5893447995
+ 0.6413550973 0.6412026286 0.5903472900
+ 0.6422510147 0.6421790719 0.5913487077
+ 0.6431431770 0.6431517005 0.5923461914
+ 0.6440324783 0.6441212296 0.5933409929
+ 0.6449189186 0.6450884938 0.5943337083
+ 0.6457985044 0.6460511088 0.5953221917
+ 0.6466779113 0.6470134854 0.5963103771
+ 0.6475521922 0.6479676962 0.5972914100
+ 0.6484264135 0.6489219069 0.5982723832
+ 0.6492943764 0.6498695016 0.5992498994
+ 0.6501600742 0.6508147120 0.6002262235
+ 0.6510232091 0.6517578959 0.6011999249
+ 0.6518825889 0.6526980996 0.6021702886
+ 0.6527417898 0.6536375880 0.6031401157
+ 0.6535974145 0.6545693278 0.6041048169
+ 0.6544529200 0.6555008888 0.6050693989
+ 0.6553012729 0.6564255953 0.6060274839
+ 0.6561468244 0.6573476791 0.6069834232
+ 0.6569896936 0.6582674980 0.6079360247
+ 0.6578274965 0.6591829062 0.6088829041
+ 0.6586652994 0.6600983739 0.6098297834
+ 0.6594979167 0.6610056758 0.6107699275
+ 0.6603302956 0.6619125009 0.6117097735
+ 0.6611601710 0.6628168225 0.6126456857
+ 0.6619879007 0.6637189984 0.6135783195
+ 0.6628152728 0.6646203995 0.6145102978
+ 0.6636397243 0.6655144095 0.6154376268
+ 0.6644641161 0.6664084196 0.6163650155
+ 0.6652842164 0.6672983170 0.6172876954
+ 0.6661018729 0.6681858897 0.6182081103
+ 0.6669185758 0.6690726876 0.6191273928
+ 0.6677302122 0.6699557900 0.6200417876
+ 0.6685419083 0.6708388925 0.6209561825
+ 0.6693503857 0.6717147827 0.6218646765
+ 0.6701574922 0.6725872159 0.6227704883
+ 0.6709632874 0.6734582186 0.6236749887
+ 0.6717622876 0.6743215919 0.6245731711
+ 0.6725612283 0.6751849055 0.6254714131
+ 0.6733565927 0.6760439873 0.6263654232
+ 0.6741496921 0.6769003272 0.6272568703
+ 0.6749426126 0.6777564287 0.6281480193
+ 0.6757320762 0.6786072850 0.6290338039
+ 0.6765215993 0.6794583201 0.6299195290
+ 0.6773090959 0.6803076863 0.6308029294
+ 0.6780942082 0.6811552048 0.6316838264
+ 0.6788793206 0.6820027232 0.6325647235
+ 0.6796609163 0.6828439832 0.6334397793
+ 0.6804419756 0.6836842895 0.6343142986
+ 0.6812220216 0.6845229864 0.6351867914
+ 0.6819983721 0.6853569150 0.6360538006
+ 0.6827747822 0.6861907244 0.6369209290
+ 0.6835479140 0.6870210767 0.6377838254
+ 0.6843187809 0.6878491044 0.6386439800
+ 0.6850897074 0.6886770129 0.6395043135
+ 0.6858559847 0.6894986033 0.6403582096
+ 0.6866217852 0.6903195977 0.6412116885
+ 0.6873862743 0.6911389828 0.6420640945
+ 0.6881462932 0.6919528246 0.6429128051
+ 0.6889063120 0.6927667260 0.6437615156
+ 0.6896629930 0.6935775876 0.6446070075
+ 0.6904165149 0.6943858266 0.6454496980
+ 0.6911699772 0.6951940060 0.6462923288
+ 0.6919187903 0.6959962845 0.6471291780
+ 0.6926661134 0.6967967749 0.6479645967
+ 0.6934133768 0.6975972056 0.6487997770
+ 0.6941565275 0.6983886957 0.6496288180
+ 0.6948996186 0.6991801262 0.6504579186
+ 0.6956412792 0.6999704242 0.6512849927
+ 0.6963785291 0.7007569075 0.6521068215
+ 0.6971156001 0.7015432715 0.6529284716
+ 0.6978498101 0.7023270130 0.6537482738
+ 0.6985800862 0.7031068802 0.6545658112
+ 0.6993104219 0.7038868070 0.6553832293
+ 0.7000390291 0.7046630979 0.6561965942
+ 0.7007665038 0.7054370046 0.6570075750
+ 0.7014939785 0.7062109113 0.6578186154
+ 0.7022175789 0.7069805264 0.6586261988
+ 0.7029399872 0.7077487707 0.6594328284
+ 0.7036622763 0.7085170746 0.6602393985
+ 0.7043780088 0.7092791796 0.6610412002
+ 0.7050929070 0.7100403905 0.6618425250
+ 0.7058076859 0.7108017206 0.6626436710
+ 0.7065191269 0.7115598917 0.6634386182
+ 0.7072305083 0.7123181224 0.6642333865
+ 0.7079415917 0.7130758762 0.6650279164
+ 0.7086470723 0.7138280869 0.6658183932
+ 0.7093526721 0.7145804167 0.6666089296
+ 0.7100573778 0.7153319120 0.6673982143
+ 0.7107548714 0.7160776854 0.6681799293
+ 0.7114523053 0.7168235183 0.6689617038
+ 0.7121492028 0.7175688744 0.6697422266
+ 0.7128425837 0.7183113098 0.6705163717
+ 0.7135359049 0.7190536857 0.6712905765
+ 0.7142282724 0.7197949886 0.6720638275
+ 0.7149152756 0.7205299139 0.6728317142
+ 0.7156022191 0.7212648988 0.6735996008
+ 0.7162883878 0.7219992280 0.6743667722
+ 0.7169690132 0.7227286100 0.6751294732
+ 0.7176495790 0.7234581113 0.6758921742
+ 0.7183300257 0.7241873145 0.6766545177
+ 0.7190073729 0.7249132991 0.6774132252
+ 0.7196847796 0.7256392837 0.6781718731
+ 0.7203623056 0.7263653278 0.6789305210
+ 0.7210342288 0.7270826101 0.6796817780
+ 0.7217060924 0.7277998924 0.6804329753
+ 0.7223780155 0.7285171747 0.6811842918
+ 0.7230476737 0.7292283773 0.6819289923
+ 0.7237172127 0.7299389243 0.6826732159
+ 0.7243866920 0.7306494117 0.6834173203
+ 0.7250542045 0.7313563228 0.6841576099
+ 0.7257212996 0.7320619822 0.6848968267
+ 0.7263882756 0.7327678204 0.6856359839
+ 0.7270516157 0.7334702015 0.6863722205
+ 0.7277126908 0.7341706157 0.6871067882
+ 0.7283738256 0.7348709702 0.6878414154
+ 0.7290335298 0.7355691195 0.6885737777
+ 0.7296916246 0.7362642884 0.6893038154
+ 0.7303497791 0.7369595170 0.6900337934
+ 0.7310072184 0.7376533151 0.6907622814
+ 0.7316623926 0.7383428216 0.6914864779
+ 0.7323176265 0.7390323281 0.6922107935
+ 0.7329726815 0.7397217155 0.6929348111
+ 0.7336215973 0.7404049039 0.6936529279
+ 0.7342703938 0.7410882115 0.6943709254
+ 0.7349191904 0.7417714000 0.6950889826
+ 0.7355654240 0.7424499989 0.6958044767
+ 0.7362108827 0.7431272268 0.6965193748
+ 0.7368562818 0.7438042760 0.6972342730
+ 0.7375000715 0.7444782853 0.6979461908
+ 0.7381421924 0.7451488972 0.6986551881
+ 0.7387843132 0.7458193898 0.6993641257
+ 0.7394251823 0.7464888096 0.7000715137
+ 0.7400605083 0.7471522093 0.7007719278
+ 0.7406957746 0.7478156090 0.7014722228
+ 0.7413311005 0.7484790087 0.7021725774
+ 0.7419633269 0.7491366267 0.7028682828
+ 0.7425947785 0.7497931123 0.7035630941
+ 0.7432262897 0.7504494786 0.7042579055
+ 0.7438560724 0.7511044741 0.7049499154
+ 0.7444838881 0.7517579198 0.7056387067
+ 0.7451115847 0.7524113059 0.7063274980
+ 0.7457391024 0.7530642748 0.7070159912
+ 0.7463619113 0.7537124157 0.7077018023
+ 0.7469847202 0.7543604970 0.7083876133
+ 0.7476075292 0.7550085783 0.7090734243
+ 0.7482284904 0.7556517720 0.7097554207
+ 0.7488484979 0.7562924027 0.7104355097
+ 0.7494685054 0.7569329739 0.7111154795
+ 0.7500876784 0.7575728297 0.7117941976
+ 0.7507038116 0.7582098246 0.7124679089
+ 0.7513198256 0.7588467002 0.7131415009
+ 0.7519357800 0.7594835758 0.7138150930
+ 0.7525480986 0.7601163983 0.7144855857
+ 0.7531589270 0.7607474923 0.7151550055
+ 0.7537698150 0.7613785863 0.7158244252
+ 0.7543799877 0.7620080113 0.7164921761
+ 0.7549877763 0.7626309991 0.7171549201
+ 0.7555956244 0.7632541060 0.7178174853
+ 0.7562034130 0.7638770938 0.7184802294
+ 0.7568084002 0.7644972801 0.7191396952
+ 0.7574118972 0.7651162148 0.7197976708
+ 0.7580155134 0.7657349706 0.7204558253
+ 0.7586185932 0.7663530707 0.7211132050
+ 0.7592173815 0.7669656277 0.7217658758
+ 0.7598162889 0.7675780058 0.7224187255
+ 0.7604150772 0.7681905031 0.7230715156
+ 0.7610118985 0.7688006759 0.7237222195
+ 0.7616066933 0.7694088817 0.7243710160
+ 0.7622014880 0.7700170875 0.7250198722
+ 0.7627962828 0.7706251740 0.7256687284
+ 0.7633875012 0.7712314725 0.7263153195
+ 0.7639781237 0.7718374133 0.7269614935
+ 0.7645688057 0.7724434137 0.7276077867
+ 0.7651584148 0.7730479240 0.7282524109
+ 0.7657443881 0.7736473083 0.7288914919
+ 0.7663304806 0.7742465734 0.7295305729
+ 0.7669165730 0.7748460174 0.7301695943
+ 0.7675005794 0.7754428983 0.7308055162
+ 0.7680826783 0.7760378122 0.7314386964
+ 0.7686648965 0.7766327262 0.7320718765
+ 0.7692471147 0.7772275209 0.7327051759
+ 0.7698258758 0.7778202891 0.7333346009
+ 0.7704041004 0.7784126997 0.7339633703
+ 0.7709822059 0.7790051103 0.7345920801
+ 0.7715600729 0.7795969248 0.7352203727
+ 0.7721338272 0.7801824808 0.7358438969
+ 0.7727075219 0.7807679772 0.7364673018
+ 0.7732812762 0.7813535929 0.7370908260
+ 0.7738538980 0.7819374800 0.7377125025
+ 0.7744238973 0.7825171947 0.7383304834
+ 0.7749938965 0.7830970287 0.7389485836
+ 0.7755638957 0.7836768031 0.7395666242
+ 0.7761321068 0.7842543721 0.7401825190
+ 0.7766981125 0.7848296165 0.7407962084
+ 0.7772641778 0.7854048014 0.7414098978
+ 0.7778303027 0.7859801054 0.7420237064
+ 0.7783936262 0.7865508795 0.7426350117
+ 0.7789554000 0.7871193290 0.7432450056
+ 0.7795171738 0.7876875997 0.7438551188
+ 0.7800790071 0.7882559896 0.7444651127
+ 0.7806380987 0.7888197899 0.7450724840
+ 0.7811962962 0.7893822789 0.7456791997
+ 0.7817544937 0.7899448276 0.7462859154
+ 0.7823126912 0.7905073166 0.7468925714
+ 0.7828676105 0.7910656929 0.7474957108
+ 0.7834218740 0.7916235924 0.7480981946
+ 0.7839761972 0.7921813726 0.7487007976
+ 0.7845305204 0.7927392125 0.7493032813
+ 0.7850810289 0.7932925820 0.7499018908
+ 0.7856311202 0.7938457131 0.7505000830
+ 0.7861812711 0.7943987250 0.7510983944
+ 0.7867314219 0.7949517965 0.7516967058
+ 0.7872781754 0.7955003977 0.7522919178
+ 0.7878248096 0.7960488200 0.7528868914
+ 0.7883713841 0.7965971828 0.7534819841
+ 0.7889180183 0.7971456051 0.7540770769
+ 0.7894610167 0.7976896763 0.7546678185
+ 0.7900037169 0.7982336283 0.7552582026
+ 0.7905464172 0.7987774014 0.7558485866
+ 0.7910891175 0.7993212938 0.7564390898
+ 0.7916281223 0.7998626232 0.7570242286
+ 0.7921667099 0.8004035950 0.7576088905
+ 0.7927052975 0.8009446263 0.7581936121
+ 0.7932438850 0.8014857173 0.7587782741
+ 0.7937796116 0.8020228744 0.7593606710
+ 0.7943146825 0.8025593758 0.7599425912
+ 0.7948498130 0.8030958772 0.7605245113
+ 0.7953848839 0.8036323190 0.7611063719
+ 0.7959170938 0.8041642904 0.7616853714
+ 0.7964482903 0.8046945930 0.7622634172
+ 0.7969794869 0.8052248955 0.7628415227
+ 0.7975106239 0.8057551980 0.7634195089
+ 0.7980393767 0.8062841296 0.7639942765
+ 0.7985665202 0.8068119287 0.7645670176
+ 0.7990936041 0.8073397875 0.7651396990
+ 0.7996206284 0.8078677058 0.7657123804
+ 0.8001462817 0.8083937764 0.7662832737
+ 0.8006699085 0.8089175224 0.7668517828
+ 0.8011934161 0.8094412088 0.7674202919
+ 0.8017169833 0.8099648952 0.7679886818
+ 0.8022397757 0.8104875088 0.7685561776
+ 0.8027595282 0.8110054135 0.7691202760
+ 0.8032791018 0.8115233779 0.7696843743
+ 0.8037986755 0.8120412827 0.7702484727
+ 0.8043184280 0.8125593066 0.7708125114
+ 0.8048341870 0.8130753040 0.7713751793
+ 0.8053497076 0.8135911822 0.7719377279
+ 0.8058652878 0.8141071200 0.7725002766
+ 0.8063809276 0.8146229982 0.7730628848
+ 0.8068935871 0.8151363730 0.7736229897
+ 0.8074046969 0.8156484962 0.7741820216
+ 0.8079158068 0.8161606789 0.7747409940
+ 0.8084269762 0.8166728020 0.7753000259
+ 0.8089368939 0.8171827197 0.7758569121
+ 0.8094444871 0.8176885247 0.7764102221
+ 0.8099520802 0.8181943893 0.7769634724
+ 0.8104596734 0.8187001944 0.7775169015
+ 0.8109673858 0.8192059994 0.7780702114
+ 0.8114724159 0.8197085261 0.7786207199
+ 0.8119773865 0.8202108741 0.7791712880
+ 0.8124824762 0.8207132816 0.7797217965
+ 0.8129875064 0.8212158084 0.7802724242
+ 0.8134900928 0.8217161894 0.7808198929
+ 0.8139910102 0.8222153783 0.7813655734
+ 0.8144919276 0.8227146268 0.7819113135
+ 0.8149927855 0.8232136965 0.7824569941
+ 0.8154932261 0.8237118125 0.7830020189
+ 0.8159909248 0.8242052197 0.7835443020
+ 0.8164886236 0.8246986270 0.7840867043
+ 0.8169863820 0.8251919150 0.7846289873
+ 0.8174840808 0.8256853223 0.7851713896
+ 0.8179801702 0.8261765242 0.7857123017
+ 0.8184756041 0.8266668916 0.7862526774
+ 0.8189710975 0.8271573782 0.7867931128
+ 0.8194664717 0.8276478052 0.7873336077
+ 0.8199610710 0.8281375170 0.7878730297
+ 0.8204528093 0.8286252022 0.7884094715
+ 0.8209444284 0.8291128278 0.7889459729
+ 0.8214361072 0.8296005130 0.7894824743
+ 0.8219277859 0.8300880790 0.7900189757
+ 0.8224173784 0.8305714130 0.7905547023
+ 0.8229061961 0.8310527205 0.7910900116
+ 0.8233950138 0.8315340281 0.7916253805
+ 0.8238837719 0.8320153952 0.7921606898
+ 0.8243722916 0.8324962258 0.7926955819
+ 0.8248590827 0.8329733014 0.7932277918
+ 0.8253458738 0.8334503770 0.7937598825
+ 0.8258327246 0.8339275122 0.7942920923
+ 0.8263195157 0.8344045877 0.7948243022
+ 0.8268045187 0.8348805904 0.7953537107
+ 0.8272879124 0.8353555799 0.7958806753
+ 0.8277711868 0.8358306289 0.7964078188
+ 0.8282545209 0.8363054991 0.7969347835
+ 0.8287379146 0.8367804885 0.7974618077
+ 0.8292189837 0.8372507095 0.7979866862
+ 0.8296996951 0.8377199769 0.7985112071
+ 0.8301805258 0.8381894231 0.7990357876
+ 0.8306612968 0.8386586905 0.7995604277
+ 0.8311417103 0.8391273022 0.8000841737
+ 0.8316208124 0.8395920992 0.8006044030
+ 0.8320997953 0.8400568962 0.8011245728
+ 0.8325788975 0.8405218124 0.8016448021
+ 0.8330578804 0.8409866095 0.8021649718
+ 0.8335351944 0.8414500952 0.8026837707
+ 0.8340101242 0.8419117928 0.8032010794
+ 0.8344849944 0.8423734903 0.8037183285
+ 0.8349598050 0.8428351879 0.8042355180
+ 0.8354346752 0.8432968855 0.8047528267
+ 0.8359069824 0.8437553048 0.8052688837
+ 0.8363779783 0.8442121744 0.8057845831
+ 0.8368489742 0.8446689844 0.8063002229
+ 0.8373200297 0.8451257944 0.8068159223
+ 0.8377910256 0.8455827236 0.8073315024
+ 0.8382608294 0.8460361958 0.8078433275
+ 0.8387305140 0.8464891911 0.8083544970
+ 0.8392001987 0.8469423056 0.8088657260
+ 0.8396698833 0.8473953009 0.8093768954
+ 0.8401396275 0.8478482962 0.8098881245
+ 0.8406054974 0.8482989073 0.8103969097
+ 0.8410714865 0.8487493992 0.8109058142
+ 0.8415374756 0.8492000103 0.8114145994
+ 0.8420035243 0.8496506214 0.8119235039
+ 0.8424689770 0.8501005769 0.8124318719
+ 0.8429316282 0.8505470157 0.8129380941
+ 0.8433941007 0.8509933949 0.8134443164
+ 0.8438566923 0.8514398932 0.8139504194
+ 0.8443192244 0.8518862724 0.8144565821
+ 0.8447815776 0.8523321152 0.8149620891
+ 0.8452432752 0.8527753949 0.8154653907
+ 0.8457049727 0.8532186747 0.8159685731
+ 0.8461666107 0.8536620140 0.8164718747
+ 0.8466283083 0.8541052938 0.8169751167
+ 0.8470892906 0.8545482159 0.8174781203
+ 0.8475477099 0.8549897075 0.8179804087
+ 0.8480061889 0.8554311991 0.8184826970
+ 0.8484646082 0.8558726907 0.8189849854
+ 0.8489230871 0.8563141823 0.8194872737
+ 0.8493804932 0.8567548990 0.8199887276
+ 0.8498343825 0.8571929932 0.8204873204
+ 0.8502882719 0.8576310277 0.8209857941
+ 0.8507422209 0.8580691218 0.8214843869
+ 0.8511961102 0.8585072160 0.8219829798
+ 0.8516497016 0.8589447141 0.8224810958
+ 0.8521021008 0.8593794107 0.8229773045
+ 0.8525546193 0.8598141074 0.8234735131
+ 0.8530070186 0.8602489233 0.8239697218
+ 0.8534594178 0.8606836200 0.8244658709
+ 0.8539115787 0.8611180186 0.8249620199
+ 0.8543611169 0.8615491986 0.8254572153
+ 0.8548105955 0.8619803190 0.8259524107
+ 0.8552600741 0.8624114990 0.8264474869
+ 0.8557096124 0.8628426194 0.8269426823
+ 0.8561590910 0.8632737994 0.8274378777
+ 0.8566038013 0.8637009859 0.8279286027
+ 0.8570482135 0.8641281128 0.8284192085
+ 0.8574925065 0.8645551205 0.8289096951
+ 0.8579369187 0.8649821281 0.8294003010
+ 0.8583812118 0.8654091954 0.8298907876
+ 0.8588234782 0.8658344150 0.8303787708
+ 0.8592652082 0.8662589788 0.8308660984
+ 0.8597068191 0.8666837215 0.8313534260
+ 0.8601484895 0.8671082854 0.8318405747
+ 0.8605902195 0.8675329089 0.8323279023
+ 0.8610305190 0.8679561019 0.8328140974
+ 0.8614696860 0.8683781028 0.8332993984
+ 0.8619089127 0.8687999845 0.8337846994
+ 0.8623480797 0.8692219853 0.8342700005
+ 0.8627873063 0.8696439862 0.8347553015
+ 0.8632252216 0.8700649738 0.8352395296
+ 0.8636596203 0.8704838157 0.8357210755
+ 0.8640940785 0.8709024787 0.8362026215
+ 0.8645285964 0.8713212013 0.8366841078
+ 0.8649629951 0.8717399836 0.8371655941
+ 0.8653975129 0.8721587062 0.8376470804
+ 0.8658297062 0.8725745082 0.8381273746
+ 0.8662618995 0.8729901910 0.8386076093
+ 0.8666940928 0.8734058738 0.8390877843
+ 0.8671262264 0.8738214970 0.8395680785
+ 0.8675584197 0.8742371798 0.8400483131
+ 0.8679893017 0.8746507168 0.8405265808
+ 0.8684194088 0.8750627041 0.8410037756
+ 0.8688495159 0.8754748106 0.8414809108
+ 0.8692796230 0.8758867979 0.8419579864
+ 0.8697096705 0.8762987852 0.8424351811
+ 0.8701388836 0.8767099977 0.8429118991
+ 0.8705646992 0.8771181107 0.8433871865
+ 0.8709903955 0.8775262237 0.8438625932
+ 0.8714162111 0.8779342771 0.8443378806
+ 0.8718420267 0.8783423901 0.8448132277
+ 0.8722677827 0.8787505031 0.8452885151
+ 0.8726921082 0.8791568875 0.8457635045
+ 0.8731160164 0.8795629144 0.8462383151
+ 0.8735398054 0.8799688220 0.8467131257
+ 0.8739637136 0.8803747892 0.8471878767
+ 0.8743875027 0.8807808161 0.8476626873
+ 0.8748108745 0.8811860085 0.8481363058
+ 0.8752331138 0.8815891743 0.8486071229
+ 0.8756552935 0.8819925189 0.8490779996
+ 0.8760774732 0.8823956847 0.8495488167
+ 0.8764997125 0.8827990294 0.8500195742
+ 0.8769218922 0.8832021952 0.8504905105
+ 0.8773404956 0.8836026192 0.8509593010
+ 0.8777579069 0.8840019703 0.8514273763
+ 0.8781753182 0.8844013810 0.8518955112
+ 0.8785927296 0.8848007917 0.8523637056
+ 0.8790100813 0.8852002025 0.8528317809
+ 0.8794270754 0.8855990767 0.8532996774
+ 0.8798415065 0.8859958053 0.8537663817
+ 0.8802559972 0.8863924146 0.8542332053
+ 0.8806704283 0.8867890835 0.8546999097
+ 0.8810849190 0.8871858120 0.8551666141
+ 0.8814992905 0.8875824213 0.8556333184
+ 0.8819131851 0.8879781961 0.8560982943
+ 0.8823264837 0.8883730769 0.8565617800
+ 0.8827397227 0.8887680769 0.8570253253
+ 0.8831530213 0.8891630173 0.8574888110
+ 0.8835663199 0.8895580173 0.8579522967
+ 0.8839796185 0.8899530172 0.8584157825
+ 0.8843892813 0.8903455138 0.8588786721
+ 0.8847984076 0.8907375932 0.8593413830
+ 0.8852074146 0.8911296725 0.8598040938
+ 0.8856164813 0.8915218115 0.8602668047
+ 0.8860256076 0.8919138908 0.8607295752
+ 0.8864343166 0.8923054934 0.8611919284
+ 0.8868409991 0.8926942945 0.8616520762
+ 0.8872476220 0.8930829763 0.8621122837
+ 0.8876541853 0.8934717774 0.8625724912
+ 0.8880609274 0.8938605189 0.8630326986
+ 0.8884674907 0.8942492008 0.8634929061
+ 0.8888738751 0.8946374059 0.8639521003
+ 0.8892799020 0.8950244188 0.8644095063
+ 0.8896859288 0.8954114914 0.8648669124
+ 0.8900917768 0.8957985044 0.8653243780
+ 0.8904978037 0.8961855769 0.8657817841
+ 0.8909037709 0.8965725899 0.8662391901
+ 0.8913077116 0.8969581127 0.8666961193
+ 0.8917099833 0.8973423243 0.8671525121
+ 0.8921123147 0.8977264762 0.8676090240
+ 0.8925145864 0.8981108069 0.8680654168
+ 0.8929169178 0.8984950185 0.8685219288
+ 0.8933190703 0.8988791704 0.8689783216
+ 0.8937194943 0.8992601037 0.8694334030
+ 0.8941190839 0.8996396065 0.8698878884
+ 0.8945186138 0.9000191092 0.8703424931
+ 0.8949180841 0.9003986120 0.8707969785
+ 0.8953176737 0.9007781148 0.8712515235
+ 0.8957172036 0.9011576176 0.8717060089
+ 0.8961154819 0.9015353918 0.8721609116
+ 0.8965135217 0.9019128084 0.8726158142
+ 0.8969115019 0.9022902250 0.8730707765
+ 0.8973094821 0.9026675820 0.8735256791
+ 0.8977075219 0.9030449986 0.8739807010
+ 0.8981055021 0.9034224153 0.8744356036
+ 0.8985009789 0.9037982821 0.8748894930
+ 0.8988959789 0.9041739702 0.8753430843
+ 0.8992909193 0.9045495987 0.8757967949
+ 0.8996858001 0.9049252868 0.8762505054
+ 0.9000808001 0.9053009152 0.8767040968
+ 0.9004756808 0.9056766033 0.8771578074
+ 0.9008677006 0.9060493112 0.8776090145
+ 0.9012590051 0.9064213037 0.8780596852
+ 0.9016503096 0.9067932963 0.8785104156
+ 0.9020416141 0.9071652889 0.8789610863
+ 0.9024329782 0.9075372815 0.8794118166
+ 0.9028242826 0.9079092741 0.8798624873
+ 0.9032142162 0.9082794189 0.8803126812
+ 0.9036036134 0.9086487889 0.8807626963
+ 0.9039930105 0.9090182185 0.8812127113
+ 0.9043824077 0.9093875885 0.8816627264
+ 0.9047718048 0.9097570181 0.8821126819
+ 0.9051612020 0.9101263881 0.8825628161
+ 0.9055489898 0.9104949236 0.8830112815
+ 0.9059358239 0.9108626842 0.8834589720
+ 0.9063225985 0.9112305045 0.8839067221
+ 0.9067094922 0.9115983844 0.8843544126
+ 0.9070963264 0.9119662046 0.8848021030
+ 0.9074832201 0.9123340845 0.8852497935
+ 0.9078686237 0.9127002954 0.8856955767
+ 0.9082522988 0.9130645990 0.8861392736
+ 0.9086359739 0.9134290218 0.8865829706
+ 0.9090197086 0.9137933254 0.8870267272
+ 0.9094033837 0.9141576886 0.8874704242
+ 0.9097871184 0.9145219922 0.8879141212
+ 0.9101704955 0.9148855805 0.8883572817
+ 0.9105526805 0.9152469039 0.8887993097
+ 0.9109349847 0.9156082273 0.8892412782
+ 0.9113172293 0.9159694910 0.8896833062
+ 0.9116994739 0.9163308144 0.8901252747
+ 0.9120817184 0.9166920185 0.8905673027
+ 0.9124640226 0.9170532823 0.8910092711
+ 0.9128441811 0.9174141288 0.8914495111
+ 0.9132243991 0.9177749157 0.8918895721
+ 0.9136046171 0.9181355834 0.8923298120
+ 0.9139847755 0.9184963703 0.8927698731
+ 0.9143649936 0.9188570976 0.8932099938
+ 0.9147452116 0.9192178845 0.8936501741
+ 0.9151231050 0.9195770025 0.8940905929
+ 0.9154999256 0.9199352860 0.8945311904
+ 0.9158766270 0.9202936888 0.8949717283
+ 0.9162533283 0.9206519723 0.8954123259
+ 0.9166300893 0.9210103154 0.8958528042
+ 0.9170067906 0.9213687181 0.8962934017
+ 0.9173828959 0.9217258096 0.8967335224
+ 0.9177572727 0.9220798016 0.8971729279
+ 0.9181317091 0.9224339128 0.8976122141
+ 0.9185060859 0.9227880239 0.8980515003
+ 0.9188805223 0.9231420159 0.8984909058
+ 0.9192548990 0.9234961271 0.8989301920
+ 0.9196293950 0.9238501787 0.8993694782
+ 0.9200025201 0.9242026806 0.8998063803
+ 0.9203755260 0.9245550036 0.9002429247
+ 0.9207484126 0.9249072075 0.9006794095
+ 0.9211214185 0.9252594709 0.9011157751
+ 0.9214943051 0.9256117940 0.9015523195
+ 0.9218673110 0.9259641171 0.9019888043
+ 0.9222391248 0.9263157845 0.9024249911
+ 0.9226092100 0.9266666770 0.9028608799
+ 0.9229792953 0.9270175099 0.9032967091
+ 0.9233493209 0.9273684025 0.9037325978
+ 0.9237194061 0.9277192950 0.9041684866
+ 0.9240894914 0.9280701280 0.9046043158
+ 0.9244595766 0.9284210205 0.9050402045
+ 0.9248281121 0.9287691116 0.9054753184
+ 0.9251965284 0.9291167259 0.9059103727
+ 0.9255648255 0.9294642806 0.9063454866
+ 0.9259331226 0.9298120141 0.9067806005
+ 0.9263014793 0.9301596284 0.9072157145
+ 0.9266697764 0.9305071831 0.9076508284
+ 0.9270378947 0.9308542013 0.9080855250
+ 0.9274052978 0.9311996102 0.9085192084
+ 0.9277727008 0.9315450191 0.9089530110
+ 0.9281402230 0.9318904281 0.9093868136
+ 0.9285076261 0.9322357178 0.9098204970
+ 0.9288750291 0.9325811267 0.9102542996
+ 0.9292423725 0.9329264760 0.9106879830
+ 0.9296076298 0.9332711101 0.9111205935
+ 0.9299712777 0.9336152077 0.9115526080
+ 0.9303351045 0.9339594245 0.9119845033
+ 0.9306988120 0.9343035221 0.9124163985
+ 0.9310625792 0.9346476197 0.9128482938
+ 0.9314264059 0.9349917769 0.9132803082
+ 0.9317901134 0.9353358746 0.9137122035
+ 0.9321511984 0.9356771708 0.9141423106
+ 0.9325122237 0.9360182285 0.9145721793
+ 0.9328730702 0.9363592863 0.9150022268
+ 0.9332339764 0.9367004037 0.9154322147
+ 0.9335948825 0.9370414019 0.9158620834
+ 0.9339559078 0.9373825192 0.9162920713
+ 0.9343165159 0.9377229810 0.9167218208
+ 0.9346756935 0.9380605817 0.9171506166
+ 0.9350348711 0.9383983016 0.9175792933
+ 0.9353941083 0.9387360215 0.9180080891
+ 0.9357532859 0.9390736222 0.9184368849
+ 0.9361125231 0.9394112825 0.9188656211
+ 0.9364717007 0.9397490025 0.9192944169
+ 0.9368298054 0.9400861263 0.9197227955
+ 0.9371858835 0.9404221773 0.9201506972
+ 0.9375420213 0.9407582879 0.9205787182
+ 0.9378980994 0.9410943985 0.9210066199
+ 0.9382542968 0.9414305091 0.9214345813
+ 0.9386103749 0.9417666197 0.9218624830
+ 0.9389665127 0.9421027899 0.9222903848
+ 0.9393215179 0.9424378872 0.9227181077
+ 0.9396752715 0.9427719712 0.9231454134
+ 0.9400290847 0.9431061745 0.9235727191
+ 0.9403830171 0.9434403181 0.9240000844
+ 0.9407367706 0.9437745214 0.9244273901
+ 0.9410905838 0.9441086054 0.9248546958
+ 0.9414445162 0.9444426894 0.9252821207
+ 0.9417976141 0.9447755218 0.9257091880
+ 0.9421502948 0.9451072812 0.9261360765
+ 0.9425029159 0.9454391003 0.9265630841
+ 0.9428554773 0.9457709193 0.9269899726
+ 0.9432082176 0.9461026788 0.9274169803
+ 0.9435607791 0.9464343786 0.9278439283
+ 0.9439134002 0.9467661977 0.9282708764
+ 0.9442645907 0.9470977187 0.9286978245
+ 0.9446147084 0.9474288821 0.9291247725
+ 0.9449648261 0.9477601051 0.9295517802
+ 0.9453148842 0.9480913281 0.9299787283
+ 0.9456650019 0.9484224916 0.9304056764
+ 0.9460151196 0.9487537146 0.9308326840
+ 0.9463651776 0.9490848780 0.9312595725
+ 0.9467138052 0.9494156241 0.9316855073
+ 0.9470613003 0.9497458935 0.9321106076
+ 0.9474087954 0.9500762224 0.9325357080
+ 0.9477561712 0.9504064918 0.9329606891
+ 0.9481037259 0.9507368207 0.9333857894
+ 0.9484512210 0.9510670900 0.9338108897
+ 0.9487985969 0.9513974190 0.9342358708
+ 0.9491446018 0.9517257214 0.9346597791
+ 0.9494888783 0.9520516992 0.9350821972
+ 0.9498332143 0.9523777962 0.9355046749
+ 0.9501774907 0.9527037740 0.9359272122
+ 0.9505218267 0.9530298114 0.9363496900
+ 0.9508661032 0.9533559084 0.9367721081
+ 0.9512103200 0.9536818862 0.9371945858
+ 0.9515535235 0.9540063143 0.9376161098
+ 0.9518942237 0.9543272853 0.9380356073
+ 0.9522349238 0.9546483159 0.9384549856
+ 0.9525756836 0.9549692869 0.9388744831
+ 0.9529163837 0.9552901983 0.9392939806
+ 0.9532570839 0.9556112289 0.9397134185
+ 0.9535977840 0.9559322000 0.9401329160
+ 0.9539381862 0.9562529922 0.9405519962
+ 0.9542763233 0.9565721750 0.9409685731
+ 0.9546142817 0.9568914175 0.9413852096
+ 0.9549522996 0.9572107196 0.9418017864
+ 0.9552903771 0.9575299025 0.9422184229
+ 0.9556283951 0.9578490853 0.9426349998
+ 0.9559664726 0.9581683874 0.9430515766
+ 0.9563044906 0.9584875703 0.9434682131
+ 0.9566408992 0.9588049054 0.9438832998
+ 0.9569768906 0.9591218233 0.9442980289
+ 0.9573128819 0.9594386816 0.9447128177
+ 0.9576488733 0.9597554803 0.9451274872
+ 0.9579848051 0.9600723982 0.9455422759
+ 0.9583207965 0.9603893161 0.9459570050
+ 0.9586567879 0.9607061744 0.9463717937
+ 0.9589915872 0.9610219002 0.9467856288
+ 0.9593248963 0.9613364935 0.9471985102
+ 0.9596583247 0.9616510868 0.9476113915
+ 0.9599916935 0.9619656205 0.9480242729
+ 0.9603250027 0.9622802138 0.9484372139
+ 0.9606583714 0.9625946879 0.9488500953
+ 0.9609917998 0.9629092813 0.9492629170
+ 0.9613248706 0.9632236958 0.9496756792
+ 0.9616556168 0.9635366201 0.9500876069
+ 0.9619864225 0.9638494849 0.9504995942
+ 0.9623171091 0.9641624093 0.9509115219
+ 0.9626479149 0.9644752741 0.9513233900
+ 0.9629786015 0.9647881985 0.9517353177
+ 0.9633094072 0.9651011825 0.9521471858
+ 0.9636400938 0.9654141068 0.9525591135
+ 0.9639695287 0.9657256007 0.9529703259
+ 0.9642981291 0.9660363197 0.9533810019
+ 0.9646267891 0.9663469791 0.9537916780
+ 0.9649553895 0.9666576982 0.9542024136
+ 0.9652839899 0.9669682980 0.9546130896
+ 0.9656125903 0.9672790170 0.9550238252
+ 0.9659413099 0.9675896764 0.9554345012
+ 0.9662696123 0.9679000974 0.9558449984
+ 0.9665955901 0.9682075977 0.9562532902
+ 0.9669216275 0.9685152173 0.9566615820
+ 0.9672476053 0.9688227177 0.9570698738
+ 0.9675735831 0.9691302180 0.9574782252
+ 0.9678996801 0.9694377780 0.9578865170
+ 0.9682257175 0.9697452784 0.9582948089
+ 0.9685516953 0.9700528979 0.9587031007
+ 0.9688763022 0.9703593254 0.9591103792
+ 0.9691995978 0.9706646800 0.9595170021
+ 0.9695230126 0.9709700942 0.9599235058
+ 0.9698463082 0.9712755084 0.9603301287
+ 0.9701697230 0.9715809226 0.9607365727
+ 0.9704930186 0.9718862772 0.9611431956
+ 0.9708163738 0.9721916914 0.9615496993
+ 0.9711397290 0.9724971056 0.9619563222
+ 0.9714608192 0.9728004932 0.9623609781
+ 0.9717814922 0.9731037021 0.9627655149
+ 0.9721022844 0.9734067917 0.9631699920
+ 0.9724230170 0.9737098813 0.9635745883
+ 0.9727438092 0.9740129709 0.9639791250
+ 0.9730644822 0.9743161798 0.9643836021
+ 0.9733852744 0.9746193290 0.9647880793
+ 0.9737054706 0.9749218822 0.9651920795
+ 0.9740229845 0.9752221107 0.9655939937
+ 0.9743404984 0.9755222797 0.9659960270
+ 0.9746580720 0.9758223891 0.9663978815
+ 0.9749755859 0.9761226177 0.9667997956
+ 0.9752930999 0.9764227271 0.9672017097
+ 0.9756106138 0.9767228961 0.9676036239
+ 0.9759281278 0.9770230055 0.9680054784
+ 0.9762442708 0.9773221016 0.9684066772
+ 0.9765583873 0.9776195288 0.9688066840
+ 0.9768725038 0.9779168963 0.9692066908
+ 0.9771866798 0.9782143235 0.9696066976
+ 0.9775007963 0.9785116911 0.9700067043
+ 0.9778149128 0.9788091779 0.9704067111
+ 0.9781290293 0.9791066051 0.9708067775
+ 0.9784432054 0.9794039726 0.9712067842
+ 0.9787554741 0.9796999097 0.9716057777
+ 0.9790663123 0.9799945951 0.9720041752
+ 0.9793770909 0.9802892804 0.9724025130
+ 0.9796879888 0.9805839062 0.9728007913
+ 0.9799988270 0.9808785915 0.9731991291
+ 0.9803097248 0.9811732769 0.9735975266
+ 0.9806205034 0.9814680219 0.9739958048
+ 0.9809312820 0.9817627072 0.9743940830
+ 0.9812394977 0.9820554852 0.9747912884
+ 0.9815462828 0.9823471904 0.9751877785
+ 0.9818530083 0.9826390147 0.9755843282
+ 0.9821597934 0.9829307199 0.9759808183
+ 0.9824665785 0.9832224846 0.9763773084
+ 0.9827733040 0.9835141897 0.9767737985
+ 0.9830800891 0.9838058949 0.9771704078
+ 0.9833868742 0.9840977192 0.9775668979
+ 0.9836912751 0.9843873978 0.9779617190
+ 0.9839947224 0.9846761227 0.9783557057
+ 0.9842982292 0.9849647880 0.9787496924
+ 0.9846016169 0.9852535129 0.9791436791
+ 0.9849050045 0.9855421782 0.9795376062
+ 0.9852083921 0.9858309031 0.9799315929
+ 0.9855117798 0.9861196280 0.9803255796
+ 0.9858152270 0.9864082932 0.9807196259
+ 0.9861156940 0.9866940975 0.9811127782
+ 0.9864144921 0.9869784117 0.9815055132
+ 0.9867134094 0.9872627258 0.9818981886
+ 0.9870122075 0.9875469804 0.9822909236
+ 0.9873110056 0.9878312945 0.9826835990
+ 0.9876099229 0.9881156087 0.9830763936
+ 0.9879087210 0.9883999228 0.9834691286
+ 0.9882075787 0.9886841774 0.9838618040
+ 0.9885028005 0.9889653921 0.9842537045
+ 0.9887949228 0.9892442226 0.9846450090
+ 0.9890869856 0.9895228744 0.9850361943
+ 0.9893791080 0.9898015857 0.9854274988
+ 0.9896711111 0.9900802970 0.9858188033
+ 0.9899631739 0.9903590083 0.9862099886
+ 0.9902552962 0.9906377196 0.9866012931
+ 0.9905474186 0.9909163713 0.9869924784
+ 0.9908375740 0.9911934733 0.9873834252
+ 0.9911243916 0.9914677739 0.9877734184
+ 0.9914113283 0.9917420745 0.9881634712
+ 0.9916980863 0.9920163751 0.9885535240
+ 0.9919849038 0.9922906756 0.9889435768
+ 0.9922717810 0.9925649762 0.9893336296
+ 0.9925585985 0.9928393960 0.9897236824
+ 0.9928454161 0.9931136966 0.9901136756
+ 0.9931316972 0.9933875203 0.9905033112
+ 0.9934136868 0.9936578870 0.9908893108
+ 0.9936957955 0.9939283133 0.9912753105
+ 0.9939777851 0.9941986799 0.9916613102
+ 0.9942598939 0.9944691062 0.9920473099
+ 0.9945418835 0.9947394729 0.9924331903
+ 0.9948239923 0.9950098991 0.9928191900
+ 0.9951061010 0.9952803850 0.9932051897
+ 0.9953880906 0.9955508113 0.9935911894
+ 0.9956638217 0.9958161116 0.9939712286
+ 0.9959380031 0.9960802794 0.9943498969
+ 0.9962123036 0.9963445067 0.9947286248
+ 0.9964866042 0.9966086745 0.9951072931
+ 0.9967609048 0.9968729019 0.9954860210
+ 0.9970350862 0.9971370101 0.9958646894
+ 0.9973093867 0.9974011779 0.9962432981
+ 0.9975836873 0.9976654053 0.9966220260
+ 0.9978551865 0.9979274273 0.9969990849
+ 0.9981232882 0.9981864095 0.9973741770
+ 0.9983913898 0.9984455109 0.9977493286
+ 0.9986594915 0.9987046123 0.9981244206
+ 0.9989275932 0.9989637136 0.9984995723
+ 0.9991956949 0.9992228150 0.9988747239
+ 0.9994637966 0.9994817972 0.9992498159
+ 0.9997318983 0.9997408986 0.9996249080
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_vista_800.spi1d b/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_vista_800.spi1d
new file mode 100644
index 00000000000..2289f6b2cde
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/agfa_agfacolor_vista_800.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0185100008 0.0164319202 0.0126006696
+ 0.0311950799 0.0276685897 0.0221115705
+ 0.0417797714 0.0372233018 0.0303079691
+ 0.0512531996 0.0458445400 0.0377487317
+ 0.0600418709 0.0538478307 0.0446756296
+ 0.0683360174 0.0614236407 0.0512225516
+ 0.0762501881 0.0686839372 0.0574930906
+ 0.0838661790 0.0756844804 0.0635228232
+ 0.0913166925 0.0824975967 0.0693578273
+ 0.0986084193 0.0892031565 0.0750138834
+ 0.1057450026 0.0958264992 0.0805220678
+ 0.1127896011 0.1024202034 0.0859134421
+ 0.1197260022 0.1089596003 0.0911877826
+ 0.1265023947 0.1154130027 0.0963427573
+ 0.1330948025 0.1217321977 0.1013797969
+ 0.1394809932 0.1279036999 0.1063025966
+ 0.1456708014 0.1339247972 0.1111140996
+ 0.1516747028 0.1397916973 0.1158170998
+ 0.1575195938 0.1455152035 0.1204319000
+ 0.1632243991 0.1510861963 0.1249561980
+ 0.1688113064 0.1565372944 0.1294070035
+ 0.1742866039 0.1618628055 0.1337791979
+ 0.1796312928 0.1670635045 0.1380856037
+ 0.1848537028 0.1721491963 0.1423334032
+ 0.1899529994 0.1771177948 0.1465034038
+ 0.1949339062 0.1819808930 0.1506060064
+ 0.1998192966 0.1867358983 0.1546511948
+ 0.2046055943 0.1913896054 0.1586488932
+ 0.2093106955 0.1959585994 0.1626013964
+ 0.2139423043 0.2004473954 0.1665008068
+ 0.2184966058 0.2048527002 0.1703405976
+ 0.2229668945 0.2091723979 0.1741351932
+ 0.2273671031 0.2134197950 0.1778849959
+ 0.2316877991 0.2175989002 0.1815871000
+ 0.2359403968 0.2217054963 0.1852401942
+ 0.2401207983 0.2257481962 0.1888412982
+ 0.2442404926 0.2297320962 0.1923972070
+ 0.2482959926 0.2336588949 0.1959189028
+ 0.2522906065 0.2375231981 0.1994097978
+ 0.2562406063 0.2413284928 0.2028710991
+ 0.2601419091 0.2450881004 0.2062990963
+ 0.2639907897 0.2487992048 0.2096917033
+ 0.2677909136 0.2524616122 0.2130511999
+ 0.2715432942 0.2560823858 0.2163791060
+ 0.2752490938 0.2596504092 0.2196782976
+ 0.2789067924 0.2631703019 0.2229489982
+ 0.2825185061 0.2666490972 0.2261860967
+ 0.2860870957 0.2700851858 0.2293913960
+ 0.2896127105 0.2734856904 0.2325628996
+ 0.2930983901 0.2768476009 0.2357040942
+ 0.2965483069 0.2801684141 0.2388191074
+ 0.2999581099 0.2834582031 0.2419067025
+ 0.3033216894 0.2867042124 0.2449615002
+ 0.3066503108 0.2899151146 0.2479871958
+ 0.3099426925 0.2930943966 0.2509889007
+ 0.3132070005 0.2962363064 0.2539705932
+ 0.3164420128 0.2993449867 0.2569276094
+ 0.3196372092 0.3024170995 0.2598538995
+ 0.3228017092 0.3054631948 0.2627541125
+ 0.3259347975 0.3084770143 0.2656317949
+ 0.3290332854 0.3114668131 0.2684907913
+ 0.3321030140 0.3144359887 0.2713276148
+ 0.3351433873 0.3173773885 0.2741436064
+ 0.3381536007 0.3202837110 0.2769415081
+ 0.3411369026 0.3231653869 0.2797215879
+ 0.3440904915 0.3260202110 0.2824831903
+ 0.3470189869 0.3288542926 0.2852219939
+ 0.3499220014 0.3316698968 0.2879402041
+ 0.3528007865 0.3344615102 0.2906357050
+ 0.3556517959 0.3372254968 0.2933070958
+ 0.3584778011 0.3399674892 0.2959615886
+ 0.3612776995 0.3426899016 0.2985951900
+ 0.3640502095 0.3453918099 0.3012051880
+ 0.3667984903 0.3480693996 0.3037928045
+ 0.3695279062 0.3507238925 0.3063583076
+ 0.3722384870 0.3533582091 0.3089059889
+ 0.3749296069 0.3559763134 0.3114354908
+ 0.3776003122 0.3585732877 0.3139464855
+ 0.3802514076 0.3611460924 0.3164429963
+ 0.3828811944 0.3637025952 0.3189218938
+ 0.3854868114 0.3662396967 0.3213779926
+ 0.3880729079 0.3687601089 0.3238114119
+ 0.3906360865 0.3712593019 0.3262237906
+ 0.3931770027 0.3737432957 0.3286206126
+ 0.3956986070 0.3762117028 0.3310020864
+ 0.3982034028 0.3786646128 0.3333649933
+ 0.4006921947 0.3811041117 0.3357118070
+ 0.4031597972 0.3835237026 0.3380421996
+ 0.4056158066 0.3859252036 0.3403576910
+ 0.4080604017 0.3883082867 0.3426569998
+ 0.4104911089 0.3906767964 0.3449401855
+ 0.4129078090 0.3930304050 0.3472093046
+ 0.4153085053 0.3953728974 0.3494597971
+ 0.4176962078 0.3977056146 0.3516952097
+ 0.4200707078 0.4000267088 0.3539173901
+ 0.4224311113 0.4023346007 0.3561232984
+ 0.4247764051 0.4046272933 0.3583106995
+ 0.4271036088 0.4069069028 0.3604839146
+ 0.4294143915 0.4091728926 0.3626427054
+ 0.4317080081 0.4114241898 0.3647843897
+ 0.4339860082 0.4136590064 0.3669061959
+ 0.4362483025 0.4158793986 0.3690074980
+ 0.4384947121 0.4180856943 0.3710916936
+ 0.4407278895 0.4202806056 0.3731572032
+ 0.4429492950 0.4224627912 0.3752071857
+ 0.4451586008 0.4246312082 0.3772436082
+ 0.4473553896 0.4267886877 0.3792651892
+ 0.4495382905 0.4289326072 0.3812715113
+ 0.4517078996 0.4310675859 0.3832643926
+ 0.4538640976 0.4331924021 0.3852454126
+ 0.4560067058 0.4353078902 0.3872154057
+ 0.4581354856 0.4374152124 0.3891724944
+ 0.4602501988 0.4395132959 0.3911151886
+ 0.4623506069 0.4416010976 0.3930422068
+ 0.4644348025 0.4436782002 0.3949519098
+ 0.4665004909 0.4457429945 0.3968465030
+ 0.4685483873 0.4477992058 0.3987269998
+ 0.4705809951 0.4498446882 0.4005940855
+ 0.4725970030 0.4518814087 0.4024456143
+ 0.4745942950 0.4539059103 0.4042817056
+ 0.4765745997 0.4559206069 0.4061039090
+ 0.4785369933 0.4579218924 0.4079152048
+ 0.4804831147 0.4599123001 0.4097140133
+ 0.4824160933 0.4618884921 0.4115009010
+ 0.4843369126 0.4638526142 0.4132741988
+ 0.4862442017 0.4658051133 0.4150344133
+ 0.4881368876 0.4677473903 0.4167799056
+ 0.4900161922 0.4696780145 0.4185154140
+ 0.4918822050 0.4715974033 0.4202412963
+ 0.4937359989 0.4735072851 0.4219577014
+ 0.4955778122 0.4754084051 0.4236656129
+ 0.4974071980 0.4772998095 0.4253664017
+ 0.4992232919 0.4791795909 0.4270611107
+ 0.5010253191 0.4810472131 0.4287497997
+ 0.5028162003 0.4829035103 0.4304314852
+ 0.5045911074 0.4847469032 0.4321100116
+ 0.5063520074 0.4865756035 0.4337812066
+ 0.5080993772 0.4883880019 0.4354482889
+ 0.5098353028 0.4901869893 0.4371086061
+ 0.5115584135 0.4919714034 0.4387632906
+ 0.5132681727 0.4937416911 0.4404115975
+ 0.5149654746 0.4954991937 0.4420526028
+ 0.5166510940 0.4972419143 0.4436877966
+ 0.5183221102 0.4989711940 0.4453130066
+ 0.5199794769 0.5006883740 0.4469313920
+ 0.5216261744 0.5023959875 0.4485433996
+ 0.5232623219 0.5040932894 0.4501496851
+ 0.5248879194 0.5057805181 0.4517503083
+ 0.5265035033 0.5074588060 0.4533442855
+ 0.5281016231 0.5091217756 0.4549309015
+ 0.5296890140 0.5107734203 0.4565131068
+ 0.5312656760 0.5124161243 0.4580908120
+ 0.5328325033 0.5140507221 0.4596638978
+ 0.5343909860 0.5156767964 0.4612325132
+ 0.5359356999 0.5172935128 0.4627946019
+ 0.5374701023 0.5189024210 0.4643518031
+ 0.5389943719 0.5205038190 0.4659039974
+ 0.5405091047 0.5220975280 0.4674513042
+ 0.5420141220 0.5236791968 0.4689922929
+ 0.5435104966 0.5252534747 0.4705272019
+ 0.5449982285 0.5268201232 0.4720568061
+ 0.5464764833 0.5283790827 0.4735811949
+ 0.5479413867 0.5299316049 0.4750989974
+ 0.5493953824 0.5314735174 0.4766100943
+ 0.5508413911 0.5330083966 0.4781157076
+ 0.5522797704 0.5345366001 0.4796159863
+ 0.5537052155 0.5360544920 0.4811086059
+ 0.5551214218 0.5375661254 0.4825947881
+ 0.5565286875 0.5390713811 0.4840748906
+ 0.5579245090 0.5405685902 0.4855479002
+ 0.5593087077 0.5420556068 0.4870094061
+ 0.5606855154 0.5435367227 0.4884645045
+ 0.5620552897 0.5450118780 0.4899129868
+ 0.5634167790 0.5464770794 0.4913502932
+ 0.5647714138 0.5479345918 0.4927789867
+ 0.5661193728 0.5493863225 0.4941999018
+ 0.5674555898 0.5508307815 0.4956082106
+ 0.5687829256 0.5522680879 0.4970068932
+ 0.5701043010 0.5537011027 0.4983989000
+ 0.5714179873 0.5551288724 0.4997817874
+ 0.5727239251 0.5565506816 0.5011560917
+ 0.5740242004 0.5579689145 0.5025244951
+ 0.5753160715 0.5593820214 0.5038843155
+ 0.5766007900 0.5607866049 0.5052357912
+ 0.5778805017 0.5621855855 0.5065827966
+ 0.5791519880 0.5635759830 0.5079236031
+ 0.5804169178 0.5649588108 0.5092585087
+ 0.5816770792 0.5663369298 0.5105897188
+ 0.5829272270 0.5677073002 0.5119146109
+ 0.5841702223 0.5690726042 0.5132346749
+ 0.5854083896 0.5704342723 0.5145516992
+ 0.5866373777 0.5717855096 0.5158618093
+ 0.5878623724 0.5731319785 0.5171685815
+ 0.5890823007 0.5744730830 0.5184715986
+ 0.5902937055 0.5758020282 0.5197688937
+ 0.5915008187 0.5771260858 0.5210636258
+ 0.5926988721 0.5784417987 0.5223534703
+ 0.5938925147 0.5797501802 0.5236395001
+ 0.5950831771 0.5810542107 0.5249232054
+ 0.5962653160 0.5823497176 0.5262010098
+ 0.5974434018 0.5836412907 0.5274763107
+ 0.5986136198 0.5849254727 0.5287467241
+ 0.5997778177 0.5862020850 0.5300114751
+ 0.6009387970 0.5874748230 0.5312736034
+ 0.6020932198 0.5887362957 0.5325291157
+ 0.6032456160 0.5899950862 0.5337823033
+ 0.6043936014 0.5912477970 0.5350301862
+ 0.6055356264 0.5924956203 0.5362746119
+ 0.6066730022 0.5937396884 0.5375164747
+ 0.6078019142 0.5949761868 0.5387526155
+ 0.6089282036 0.5962103009 0.5399869084
+ 0.6100460291 0.5974360704 0.5412151814
+ 0.6111602783 0.5986577868 0.5424402952
+ 0.6122679114 0.5998724103 0.5436596870
+ 0.6133708954 0.6010810733 0.5448756218
+ 0.6144707203 0.6022859216 0.5460891724
+ 0.6155622005 0.6034839749 0.5472962856
+ 0.6166514754 0.6046805978 0.5485017896
+ 0.6177281141 0.6058706045 0.5497025847
+ 0.6188026071 0.6070585251 0.5509018898
+ 0.6198686957 0.6082382798 0.5520957708
+ 0.6209319830 0.6094141006 0.5532882214
+ 0.6219903827 0.6105834842 0.5544781089
+ 0.6230461001 0.6117473245 0.5556638837
+ 0.6240993738 0.6129062772 0.5568463802
+ 0.6251472831 0.6140604019 0.5580248833
+ 0.6261926293 0.6152123213 0.5592017174
+ 0.6272296906 0.6163583994 0.5603731871
+ 0.6282647848 0.6175032258 0.5615437031
+ 0.6292926073 0.6186398864 0.5627098083
+ 0.6303197145 0.6197757125 0.5638754964
+ 0.6313399076 0.6209014058 0.5650361180
+ 0.6323593259 0.6220262051 0.5661963820
+ 0.6333720088 0.6231431961 0.5673534870
+ 0.6343832016 0.6242589951 0.5685095787
+ 0.6353875995 0.6253690720 0.5696610212
+ 0.6363899708 0.6264768839 0.5708104968
+ 0.6373851895 0.6275768280 0.5719538927
+ 0.6383780837 0.6286739707 0.5730956197
+ 0.6393638253 0.6297637224 0.5742328763
+ 0.6403476000 0.6308506727 0.5753682256
+ 0.6413263083 0.6319305897 0.5764986873
+ 0.6423032880 0.6330078840 0.5776277781
+ 0.6432760954 0.6340783238 0.5787534118
+ 0.6442463994 0.6351463199 0.5798763037
+ 0.6452097297 0.6362072825 0.5809919834
+ 0.6461709738 0.6372658014 0.5821056962
+ 0.6471257210 0.6383160949 0.5832133293
+ 0.6480792165 0.6393647790 0.5843191743
+ 0.6490263939 0.6404061913 0.5854179859
+ 0.6499727964 0.6414468288 0.5865159035
+ 0.6509122849 0.6424813271 0.5876076818
+ 0.6518514752 0.6435155869 0.5886991024
+ 0.6527829170 0.6445450187 0.5897815824
+ 0.6537142992 0.6455743909 0.5908641219
+ 0.6546376944 0.6465963721 0.5919384956
+ 0.6555603743 0.6476178765 0.5930123925
+ 0.6564759016 0.6486306787 0.5940799117
+ 0.6573897004 0.6496415138 0.5951458812
+ 0.6582992077 0.6506463289 0.5962070227
+ 0.6592066884 0.6516482234 0.5972657800
+ 0.6601099968 0.6526457071 0.5983211994
+ 0.6610093117 0.6536391973 0.5993734002
+ 0.6619052887 0.6546294093 0.6004229784
+ 0.6627947092 0.6556134224 0.6014679074
+ 0.6636828780 0.6565961838 0.6025115252
+ 0.6645650268 0.6575726271 0.6035487056
+ 0.6654471159 0.6585490704 0.6045858264
+ 0.6663234830 0.6595203876 0.6056172848
+ 0.6671994925 0.6604915261 0.6066485047
+ 0.6680691242 0.6614578962 0.6076750755
+ 0.6689361930 0.6624224782 0.6086999774
+ 0.6697993875 0.6633834243 0.6097220182
+ 0.6706585288 0.6643403172 0.6107410192
+ 0.6715161204 0.6652954221 0.6117582917
+ 0.6723682880 0.6662437916 0.6127699018
+ 0.6732205749 0.6671922207 0.6137815118
+ 0.6740664840 0.6681342721 0.6147891283
+ 0.6749119163 0.6690760255 0.6157965064
+ 0.6757528782 0.6700139046 0.6167991757
+ 0.6765912771 0.6709495783 0.6177995205
+ 0.6774272919 0.6718820930 0.6187973022
+ 0.6782582998 0.6728078723 0.6197900176
+ 0.6790893078 0.6737337112 0.6207826734
+ 0.6799132228 0.6746503115 0.6217687130
+ 0.6807367802 0.6755667925 0.6227545738
+ 0.6815574765 0.6764777899 0.6237366796
+ 0.6823765039 0.6773855090 0.6247165203
+ 0.6831939816 0.6782909036 0.6256946921
+ 0.6840069294 0.6791892052 0.6266679764
+ 0.6848198175 0.6800873876 0.6276412010
+ 0.6856262088 0.6809793711 0.6286085844
+ 0.6864315271 0.6818702221 0.6295750141
+ 0.6872345805 0.6827588081 0.6305391788
+ 0.6880347729 0.6836444139 0.6315007806
+ 0.6888350248 0.6845300198 0.6324623823
+ 0.6896290183 0.6854097843 0.6334151030
+ 0.6904228926 0.6862894893 0.6343677044
+ 0.6912125945 0.6871656179 0.6353166103
+ 0.6919984818 0.6880385280 0.6362622976
+ 0.6927841902 0.6889110208 0.6372076273
+ 0.6935647726 0.6897763014 0.6381461024
+ 0.6943454146 0.6906415820 0.6390845776
+ 0.6951224208 0.6915038824 0.6400200725
+ 0.6958963871 0.6923636794 0.6409534216
+ 0.6966701746 0.6932234168 0.6418864131
+ 0.6974359155 0.6940783858 0.6428129077
+ 0.6982017159 0.6949334145 0.6437392831
+ 0.6989647150 0.6957843900 0.6446622014
+ 0.6997249126 0.6966313720 0.6455814838
+ 0.7004849911 0.6974784732 0.6465008855
+ 0.7012411952 0.6983184814 0.6474134922
+ 0.7019971013 0.6991580725 0.6483256817
+ 0.7027515173 0.6999952793 0.6492353082
+ 0.7035031915 0.7008281946 0.6501401067
+ 0.7042549253 0.7016611099 0.6510447860
+ 0.7050036788 0.7024886012 0.6519446969
+ 0.7057514191 0.7033143044 0.6528429985
+ 0.7064986229 0.7041394114 0.6537404060
+ 0.7072420716 0.7049599886 0.6546317935
+ 0.7079855204 0.7057806253 0.6555231810
+ 0.7087271214 0.7065981030 0.6564105749
+ 0.7094665170 0.7074120045 0.6572937965
+ 0.7102057934 0.7082259059 0.6581770182
+ 0.7109420896 0.7090328932 0.6590545774
+ 0.7116774917 0.7098382115 0.6599308252
+ 0.7124124765 0.7106426954 0.6608062983
+ 0.7131438255 0.7114415169 0.6616767049
+ 0.7138749957 0.7122402787 0.6625469923
+ 0.7146041989 0.7130368948 0.6634144187
+ 0.7153301239 0.7138301134 0.6642774940
+ 0.7160559893 0.7146233916 0.6651405096
+ 0.7167779207 0.7154110074 0.6660001278
+ 0.7174975872 0.7161955833 0.6668580174
+ 0.7182173133 0.7169802785 0.6677159071
+ 0.7189335227 0.7177579999 0.6685678959
+ 0.7196493149 0.7185348868 0.6694192886
+ 0.7203645110 0.7193109989 0.6702697873
+ 0.7210751772 0.7200810909 0.6711146235
+ 0.7217859030 0.7208511829 0.6719594002
+ 0.7224943042 0.7216190100 0.6728019714
+ 0.7231976986 0.7223820090 0.6736403108
+ 0.7239010930 0.7231450081 0.6744784713
+ 0.7246015072 0.7239043713 0.6753134131
+ 0.7252988219 0.7246599793 0.6761450768
+ 0.7259960771 0.7254155874 0.6769768000
+ 0.7266904712 0.7261663079 0.6778048873
+ 0.7273831964 0.7269141078 0.6786310077
+ 0.7280758023 0.7276619077 0.6794571280
+ 0.7287634015 0.7284036279 0.6802788973
+ 0.7294492126 0.7291433215 0.6810994148
+ 0.7301350832 0.7298830152 0.6819198132
+ 0.7308161855 0.7306177020 0.6827344894
+ 0.7314965725 0.7313514948 0.6835482121
+ 0.7321768999 0.7320852876 0.6843619943
+ 0.7328532934 0.7328147292 0.6851683259
+ 0.7335293889 0.7335436940 0.6859741211
+ 0.7342054844 0.7342727184 0.6867799163
+ 0.7348755002 0.7349944711 0.6875799894
+ 0.7355453968 0.7357162237 0.6883801222
+ 0.7362151742 0.7364377975 0.6891800761
+ 0.7368800044 0.7371528745 0.6899746060
+ 0.7375447750 0.7378680706 0.6907690763
+ 0.7382096052 0.7385832071 0.6915634871
+ 0.7388706207 0.7392929196 0.6923534274
+ 0.7395316958 0.7400025725 0.6931431890
+ 0.7401927114 0.7407122850 0.6939331293
+ 0.7408468127 0.7414141893 0.6947162747
+ 0.7415009141 0.7421159744 0.6954995990
+ 0.7421548963 0.7428178191 0.6962828040
+ 0.7428026199 0.7435129285 0.6970598102
+ 0.7434499264 0.7442076206 0.6978365183
+ 0.7440971732 0.7449023128 0.6986131072
+ 0.7447416782 0.7455918193 0.6993851066
+ 0.7453858256 0.7462803721 0.7001565099
+ 0.7460299134 0.7469691038 0.7009277940
+ 0.7466691136 0.7476530075 0.7016950250
+ 0.7473068833 0.7483354807 0.7024608850
+ 0.7479445934 0.7490180135 0.7032269239
+ 0.7485784292 0.7496981025 0.7039886713
+ 0.7492100000 0.7503767014 0.7047483921
+ 0.7498415709 0.7510554194 0.7055081129
+ 0.7504718900 0.7517315149 0.7062641978
+ 0.7511010170 0.7524052262 0.7070168853
+ 0.7517300248 0.7530788183 0.7077695727
+ 0.7523571253 0.7537503839 0.7085205913
+ 0.7529804111 0.7544177175 0.7092683911
+ 0.7536036968 0.7550848722 0.7100160718
+ 0.7542262077 0.7557517290 0.7107632756
+ 0.7548426986 0.7564147711 0.7115064859
+ 0.7554591894 0.7570779920 0.7122498155
+ 0.7560756803 0.7577410936 0.7129930258
+ 0.7566884756 0.7583994865 0.7137312293
+ 0.7573007941 0.7590574026 0.7144687772
+ 0.7579131722 0.7597153187 0.7152063251
+ 0.7585223913 0.7603682280 0.7159397006
+ 0.7591298223 0.7610182762 0.7166706920
+ 0.7597371936 0.7616683841 0.7174018025
+ 0.7603425980 0.7623162270 0.7181308866
+ 0.7609441280 0.7629598975 0.7188568115
+ 0.7615455985 0.7636035085 0.7195826769
+ 0.7621468902 0.7642468810 0.7203084230
+ 0.7627450824 0.7648851871 0.7210304737
+ 0.7633432150 0.7655234933 0.7217525244
+ 0.7639414072 0.7661617994 0.7224745750
+ 0.7645366192 0.7667945027 0.7231923938
+ 0.7651305795 0.7674250007 0.7239086032
+ 0.7657245994 0.7680554986 0.7246248126
+ 0.7663164139 0.7686836720 0.7253388762
+ 0.7669041157 0.7693076730 0.7260494232
+ 0.7674916983 0.7699316144 0.7267599106
+ 0.7680794001 0.7705556154 0.7274703979
+ 0.7686625719 0.7711765170 0.7281758785
+ 0.7692456245 0.7717971802 0.7288811207
+ 0.7698286176 0.7724180222 0.7295863032
+ 0.7704098821 0.7730364203 0.7302888036
+ 0.7709895968 0.7736529112 0.7309889793
+ 0.7715693116 0.7742694020 0.7316892147
+ 0.7721486092 0.7748854160 0.7323889732
+ 0.7727230191 0.7754955888 0.7330843210
+ 0.7732973099 0.7761058211 0.7337794900
+ 0.7738716006 0.7767159939 0.7344747782
+ 0.7744429708 0.7773231864 0.7351666093
+ 0.7750123739 0.7779282928 0.7358562946
+ 0.7755817175 0.7785333991 0.7365459800
+ 0.7761507034 0.7791380882 0.7372353077
+ 0.7767155766 0.7797393203 0.7379208803
+ 0.7772805095 0.7803406119 0.7386065722
+ 0.7778455019 0.7809417844 0.7392922044
+ 0.7784079909 0.7815397978 0.7399750948
+ 0.7789685726 0.7821353078 0.7406558990
+ 0.7795292139 0.7827306986 0.7413367033
+ 0.7800899148 0.7833262086 0.7420175076
+ 0.7806466818 0.7839170098 0.7426925898
+ 0.7812033892 0.7845076919 0.7433677912
+ 0.7817602158 0.7850984931 0.7440428734
+ 0.7823156118 0.7856879234 0.7447155118
+ 0.7828689814 0.7862753272 0.7453842759
+ 0.7834224105 0.7868626118 0.7460532188
+ 0.7839757204 0.7874500155 0.7467219830
+ 0.7845265865 0.7880331874 0.7473868728
+ 0.7850766778 0.7886152267 0.7480508089
+ 0.7856268287 0.7891972065 0.7487146258
+ 0.7861765027 0.7897787094 0.7493779063
+ 0.7867226005 0.7903565168 0.7500371933
+ 0.7872688174 0.7909343243 0.7506964803
+ 0.7878149152 0.7915120721 0.7513558269
+ 0.7883592248 0.7920885086 0.7520118952
+ 0.7889010906 0.7926632762 0.7526640296
+ 0.7894430161 0.7932379842 0.7533161044
+ 0.7899848223 0.7938128114 0.7539681792
+ 0.7905251980 0.7943832278 0.7546153069
+ 0.7910649180 0.7949519753 0.7552605867
+ 0.7916046977 0.7955207229 0.7559058070
+ 0.7921444178 0.7960894704 0.7565510869
+ 0.7926815152 0.7966526747 0.7571910024
+ 0.7932183743 0.7972157001 0.7578307986
+ 0.7937554121 0.7977787256 0.7584705949
+ 0.7942914963 0.7983412147 0.7591093183
+ 0.7948241234 0.7989016175 0.7597439289
+ 0.7953568101 0.7994620800 0.7603784800
+ 0.7958894968 0.8000226021 0.7610130906
+ 0.7964202166 0.8005809188 0.7616454959
+ 0.7969478965 0.8011360168 0.7622743845
+ 0.7974755764 0.8016909957 0.7629033923
+ 0.7980033159 0.8022460938 0.7635322809
+ 0.7985295057 0.8027976751 0.7641590238
+ 0.7990543842 0.8033463955 0.7647839189
+ 0.7995793819 0.8038951755 0.7654088140
+ 0.8001043200 0.8044440150 0.7660337090
+ 0.8006263971 0.8049899936 0.7666553855
+ 0.8011472225 0.8055347204 0.7672758102
+ 0.8016679287 0.8060795069 0.7678961754
+ 0.8021886945 0.8066241741 0.7685164809
+ 0.8027051091 0.8071653843 0.7691326737
+ 0.8032202721 0.8077054024 0.7697477937
+ 0.8037353754 0.8082454801 0.7703629136
+ 0.8042505980 0.8087856174 0.7709779143
+ 0.8047627807 0.8093202114 0.7715882063
+ 0.8052744269 0.8098536730 0.7721974850
+ 0.8057860136 0.8103871942 0.7728068233
+ 0.8062974811 0.8109207153 0.7734162211
+ 0.8068054914 0.8114497066 0.7740216851
+ 0.8073129058 0.8119781017 0.7746266723
+ 0.8078203201 0.8125064969 0.7752317190
+ 0.8083277941 0.8130347729 0.7758368254
+ 0.8088303804 0.8135598898 0.7764384151
+ 0.8093321919 0.8140844107 0.7770395875
+ 0.8098341227 0.8146088719 0.7776407003
+ 0.8103358746 0.8151333928 0.7782418728
+ 0.8108342886 0.8156532049 0.7788380980
+ 0.8113318086 0.8161720037 0.7794333100
+ 0.8118293881 0.8166908026 0.7800284028
+ 0.8123269081 0.8172097206 0.7806236148
+ 0.8128222823 0.8177251816 0.7812144756
+ 0.8133168817 0.8182396889 0.7818040252
+ 0.8138114810 0.8187540770 0.7823935151
+ 0.8143060803 0.8192685843 0.7829831243
+ 0.8147979975 0.8197811246 0.7835692167
+ 0.8152884245 0.8202924728 0.7841535807
+ 0.8157786727 0.8208039999 0.7847380042
+ 0.8162690997 0.8213154078 0.7853223085
+ 0.8167579174 0.8218243122 0.7859038711
+ 0.8172453046 0.8223307729 0.7864828110
+ 0.8177325726 0.8228374124 0.7870616913
+ 0.8182200193 0.8233438730 0.7876405716
+ 0.8187068105 0.8238489032 0.7882180810
+ 0.8191924095 0.8243508935 0.7887930274
+ 0.8196780086 0.8248528838 0.7893679738
+ 0.8201637268 0.8253548741 0.7899429202
+ 0.8206487894 0.8258563876 0.7905169725
+ 0.8211302757 0.8263542056 0.7910869122
+ 0.8216118813 0.8268520832 0.7916566730
+ 0.8220934272 0.8273500204 0.7922264934
+ 0.8225749731 0.8278478980 0.7927963734
+ 0.8230516911 0.8283423185 0.7933602929
+ 0.8235278726 0.8288363218 0.7939236760
+ 0.8240039945 0.8293302059 0.7944871187
+ 0.8244801164 0.8298242092 0.7950503826
+ 0.8249552846 0.8303152919 0.7956107259
+ 0.8254299164 0.8308048248 0.7961691022
+ 0.8259044886 0.8312941790 0.7967274785
+ 0.8263791203 0.8317837119 0.7972859144
+ 0.8268527985 0.8322715759 0.7978432178
+ 0.8273245096 0.8327561021 0.7983981967
+ 0.8277962208 0.8332406282 0.7989532948
+ 0.8282678723 0.8337250948 0.7995082736
+ 0.8287395835 0.8342096210 0.8000633717
+ 0.8292062879 0.8346912861 0.8006147146
+ 0.8296728134 0.8351728916 0.8011659980
+ 0.8301392794 0.8356546164 0.8017172813
+ 0.8306058049 0.8361362219 0.8022685051
+ 0.8310710788 0.8366158009 0.8028172851
+ 0.8315353990 0.8370940089 0.8033642769
+ 0.8319997787 0.8375722170 0.8039113879
+ 0.8324642181 0.8380503058 0.8044583797
+ 0.8329282999 0.8385276794 0.8050045967
+ 0.8333910704 0.8390009999 0.8055471182
+ 0.8338539004 0.8394743204 0.8060895801
+ 0.8343166113 0.8399475813 0.8066321015
+ 0.8347793818 0.8404209018 0.8071746230
+ 0.8352388144 0.8408915997 0.8077148795
+ 0.8356966972 0.8413612843 0.8082543015
+ 0.8361546993 0.8418310285 0.8087937832
+ 0.8366125822 0.8423007131 0.8093332052
+ 0.8370695710 0.8427699208 0.8098720908
+ 0.8375232220 0.8432372808 0.8104090095
+ 0.8379768133 0.8437047005 0.8109459281
+ 0.8384304047 0.8441720009 0.8114827871
+ 0.8388838768 0.8446394205 0.8120197058
+ 0.8393365741 0.8451036811 0.8125535250
+ 0.8397887945 0.8455665112 0.8130859137
+ 0.8402410746 0.8460292220 0.8136183023
+ 0.8406932950 0.8464919925 0.8141508102
+ 0.8411452174 0.8469541073 0.8146827221
+ 0.8415938020 0.8474109769 0.8152111769
+ 0.8420425057 0.8478677869 0.8157396913
+ 0.8424912095 0.8483247161 0.8162680864
+ 0.8429399133 0.8487815261 0.8167966008
+ 0.8433864713 0.8492373228 0.8173233867
+ 0.8438311815 0.8496921062 0.8178485036
+ 0.8442757726 0.8501468897 0.8183735013
+ 0.8447204828 0.8506016731 0.8188986182
+ 0.8451651931 0.8510563970 0.8194236755
+ 0.8456082940 0.8515083194 0.8199456930
+ 0.8460512161 0.8519595861 0.8204671741
+ 0.8464940786 0.8524109125 0.8209887743
+ 0.8469370008 0.8528622985 0.8215103149
+ 0.8473795056 0.8533126116 0.8220310807
+ 0.8478202820 0.8537582755 0.8225489855
+ 0.8482609987 0.8542038798 0.8230667710
+ 0.8487017155 0.8546496034 0.8235846162
+ 0.8491423726 0.8550952077 0.8241025209
+ 0.8495807052 0.8555396795 0.8246183991
+ 0.8500161767 0.8559827209 0.8251321912
+ 0.8504515886 0.8564257026 0.8256459236
+ 0.8508870006 0.8568686247 0.8261595964
+ 0.8513224125 0.8573116064 0.8266733885
+ 0.8517556787 0.8577530980 0.8271840811
+ 0.8521881104 0.8581939936 0.8276935816
+ 0.8526204824 0.8586348295 0.8282030821
+ 0.8530527949 0.8590756059 0.8287125826
+ 0.8534852266 0.8595165014 0.8292220831
+ 0.8539168239 0.8599526286 0.8297290802
+ 0.8543483019 0.8603882194 0.8302358985
+ 0.8547797799 0.8608238101 0.8307427168
+ 0.8552113175 0.8612592816 0.8312494755
+ 0.8556426764 0.8616946936 0.8317559958
+ 0.8560702801 0.8621253967 0.8322589993
+ 0.8564978242 0.8625560999 0.8327620029
+ 0.8569254279 0.8629868031 0.8332650065
+ 0.8573529720 0.8634175062 0.8337680101
+ 0.8577799201 0.8638479114 0.8342701197
+ 0.8582031131 0.8642767072 0.8347682953
+ 0.8586263061 0.8647056222 0.8352664709
+ 0.8590494990 0.8651344180 0.8357647061
+ 0.8594726920 0.8655632138 0.8362628818
+ 0.8598954082 0.8659911156 0.8367602229
+ 0.8603163958 0.8664159179 0.8372551203
+ 0.8607373834 0.8668407202 0.8377498984
+ 0.8611584902 0.8672655225 0.8382447958
+ 0.8615794778 0.8676903248 0.8387396932
+ 0.8619998097 0.8681135774 0.8392338157
+ 0.8624181747 0.8685330153 0.8397259712
+ 0.8628365993 0.8689525127 0.8402181864
+ 0.8632550836 0.8693720102 0.8407104015
+ 0.8636735082 0.8697913885 0.8412026763
+ 0.8640908003 0.8702098131 0.8416935802
+ 0.8645054102 0.8706253171 0.8421815038
+ 0.8649199009 0.8710408807 0.8426694274
+ 0.8653343916 0.8714563847 0.8431572914
+ 0.8657490015 0.8718720078 0.8436452150
+ 0.8661630154 0.8722869754 0.8441321850
+ 0.8665751219 0.8726999760 0.8446164131
+ 0.8669872284 0.8731129766 0.8451005220
+ 0.8673992753 0.8735259771 0.8455846906
+ 0.8678115010 0.8739389777 0.8460687995
+ 0.8682234287 0.8743513823 0.8465524912
+ 0.8686344028 0.8747605085 0.8470336199
+ 0.8690453172 0.8751696944 0.8475146890
+ 0.8694562912 0.8755788207 0.8479956985
+ 0.8698672056 0.8759880066 0.8484768271
+ 0.8702781200 0.8763970137 0.8489577174
+ 0.8706849217 0.8768029213 0.8494340777
+ 0.8710917830 0.8772087097 0.8499104977
+ 0.8714985847 0.8776144981 0.8503869176
+ 0.8719053864 0.8780202866 0.8508632183
+ 0.8723123074 0.8784261942 0.8513395786
+ 0.8727166057 0.8788295984 0.8518124223
+ 0.8731204867 0.8792327046 0.8522846103
+ 0.8735244274 0.8796356916 0.8527569175
+ 0.8739284277 0.8800387979 0.8532291055
+ 0.8743323088 0.8804419041 0.8537012935
+ 0.8747352958 0.8808423877 0.8541712761
+ 0.8751378059 0.8812415004 0.8546400070
+ 0.8755401969 0.8816406131 0.8551086783
+ 0.8759427071 0.8820397258 0.8555774093
+ 0.8763452172 0.8824387789 0.8560460806
+ 0.8767465949 0.8828365803 0.8565135002
+ 0.8771464229 0.8832321167 0.8569787145
+ 0.8775460720 0.8836277127 0.8574439287
+ 0.8779459000 0.8840233088 0.8579090834
+ 0.8783457279 0.8844187856 0.8583742976
+ 0.8787450790 0.8848142028 0.8588392138
+ 0.8791409135 0.8852068782 0.8593007922
+ 0.8795366287 0.8855996132 0.8597623706
+ 0.8799324036 0.8859922886 0.8602240086
+ 0.8803281784 0.8863850236 0.8606855869
+ 0.8807238936 0.8867778182 0.8611472249
+ 0.8811178207 0.8871687055 0.8616060019
+ 0.8815109730 0.8875589967 0.8620637059
+ 0.8819041848 0.8879492879 0.8625215292
+ 0.8822973967 0.8883395791 0.8629792929
+ 0.8826907277 0.8887298703 0.8634371161
+ 0.8830834031 0.8891189098 0.8638935089
+ 0.8834751844 0.8895053864 0.8643475175
+ 0.8838670850 0.8898919821 0.8648015261
+ 0.8842589855 0.8902785778 0.8652554154
+ 0.8846508265 0.8906651735 0.8657094240
+ 0.8850427270 0.8910517097 0.8661633730
+ 0.8854306936 0.8914347291 0.8666151762
+ 0.8858184218 0.8918172717 0.8670668006
+ 0.8862060905 0.8921998739 0.8675184846
+ 0.8865936995 0.8925824761 0.8679701090
+ 0.8869814277 0.8929650784 0.8684217930
+ 0.8873677850 0.8933458924 0.8688719869
+ 0.8877524734 0.8937243819 0.8693205714
+ 0.8881371021 0.8941028714 0.8697690964
+ 0.8885217905 0.8944814205 0.8702176213
+ 0.8889064789 0.8948599100 0.8706660867
+ 0.8892911077 0.8952383995 0.8711146712
+ 0.8896743059 0.8956134915 0.8715596199
+ 0.8900573850 0.8959884048 0.8720040917
+ 0.8904405236 0.8963631988 0.8724486828
+ 0.8908236027 0.8967379928 0.8728932142
+ 0.8912066221 0.8971129060 0.8733376861
+ 0.8915888071 0.8974866271 0.8737813830
+ 0.8919690251 0.8978582025 0.8742234111
+ 0.8923493028 0.8982297778 0.8746654987
+ 0.8927295208 0.8986012936 0.8751075268
+ 0.8931097984 0.8989729285 0.8755494952
+ 0.8934900165 0.8993445039 0.8759915829
+ 0.8938673735 0.8997135758 0.8764312267
+ 0.8942434788 0.9000818133 0.8768699765
+ 0.8946197033 0.9004498720 0.8773087263
+ 0.8949959278 0.9008181095 0.8777474761
+ 0.8953720927 0.9011862874 0.8781862855
+ 0.8957480788 0.9015542269 0.8786247969
+ 0.8961216211 0.9019187093 0.8790593743
+ 0.8964951038 0.9022831917 0.8794940114
+ 0.8968685865 0.9026476741 0.8799285889
+ 0.8972421288 0.9030122161 0.8803632259
+ 0.8976156116 0.9033766985 0.8807978034
+ 0.8979886174 0.9037405849 0.8812314868
+ 0.8983604908 0.9041035175 0.8816633821
+ 0.8987324834 0.9044662714 0.8820952773
+ 0.8991044760 0.9048290849 0.8825271726
+ 0.8994765282 0.9051918983 0.8829591274
+ 0.8998485208 0.9055547714 0.8833910823
+ 0.9002189040 0.9059160948 0.8838210106
+ 0.9005880952 0.9062762856 0.8842495084
+ 0.9009574056 0.9066364765 0.8846780062
+ 0.9013267159 0.9069967270 0.8851063848
+ 0.9016959071 0.9073569179 0.8855348825
+ 0.9020652175 0.9077171087 0.8859633803
+ 0.9024326801 0.9080746174 0.8863885999
+ 0.9027997851 0.9084312916 0.8868126869
+ 0.9031668901 0.9087879062 0.8872368932
+ 0.9035339952 0.9091445804 0.8876610994
+ 0.9039011002 0.9095013142 0.8880853057
+ 0.9042682052 0.9098579884 0.8885095119
+ 0.9046338201 0.9102131128 0.8889309764
+ 0.9049991965 0.9105681777 0.8893523812
+ 0.9053646922 0.9109231830 0.8897737265
+ 0.9057301283 0.9112783074 0.8901950717
+ 0.9060956240 0.9116333723 0.8906164169
+ 0.9064608812 0.9119883776 0.8910375834
+ 0.9068235755 0.9123414755 0.8914554119
+ 0.9071862102 0.9126946926 0.8918731809
+ 0.9075487852 0.9130477905 0.8922908902
+ 0.9079114795 0.9134010077 0.8927087188
+ 0.9082741141 0.9137542248 0.8931264281
+ 0.9086365104 0.9141070843 0.8935438991
+ 0.9089967012 0.9144567251 0.8939571977
+ 0.9093567729 0.9148061872 0.8943704963
+ 0.9097169042 0.9151558280 0.8947837949
+ 0.9100769758 0.9155054092 0.8951970935
+ 0.9104372263 0.9158549905 0.8956103921
+ 0.9107971787 0.9162042737 0.8960235119
+ 0.9111555219 0.9165493846 0.8964337707
+ 0.9115139246 0.9168946147 0.8968440890
+ 0.9118723273 0.9172397256 0.8972544074
+ 0.9122306108 0.9175848961 0.8976647258
+ 0.9125890136 0.9179300070 0.8980749846
+ 0.9129472971 0.9182751179 0.8984851837
+ 0.9133043289 0.9186192155 0.8988931775
+ 0.9136611819 0.9189633131 0.8993011713
+ 0.9140180945 0.9193074107 0.8997092247
+ 0.9143750072 0.9196515083 0.9001170993
+ 0.9147319198 0.9199956059 0.9005250931
+ 0.9150887728 0.9203397036 0.9009330869
+ 0.9154434204 0.9206820130 0.9013389945
+ 0.9157977104 0.9210242033 0.9017447233
+ 0.9161520004 0.9213662744 0.9021503925
+ 0.9165062904 0.9217085242 0.9025561810
+ 0.9168605804 0.9220507145 0.9029619098
+ 0.9172148705 0.9223927855 0.9033675790
+ 0.9175676107 0.9227315784 0.9037716985
+ 0.9179198146 0.9230694175 0.9041752815
+ 0.9182720184 0.9234071970 0.9045788050
+ 0.9186242223 0.9237450957 0.9049823880
+ 0.9189764857 0.9240828753 0.9053859711
+ 0.9193286896 0.9244207144 0.9057894945
+ 0.9196799994 0.9247564077 0.9061918259
+ 0.9200307131 0.9250903726 0.9065930843
+ 0.9203813076 0.9254245162 0.9069944024
+ 0.9207320213 0.9257584810 0.9073956013
+ 0.9210826159 0.9260926247 0.9077969193
+ 0.9214332104 0.9264267087 0.9081981778
+ 0.9217830896 0.9267603755 0.9085987806
+ 0.9221310019 0.9270933867 0.9089978933
+ 0.9224789143 0.9274263978 0.9093968868
+ 0.9228268862 0.9277595282 0.9097959995
+ 0.9231747985 0.9280924797 0.9101951122
+ 0.9235227704 0.9284254909 0.9105942249
+ 0.9238706827 0.9287585020 0.9109932184
+ 0.9242162108 0.9290888906 0.9113901854
+ 0.9245617986 0.9294192791 0.9117870927
+ 0.9249073267 0.9297497272 0.9121840000
+ 0.9252527952 0.9300799966 0.9125810266
+ 0.9255983829 0.9304103851 0.9129778743
+ 0.9259439111 0.9307407737 0.9133749008
+ 0.9262884259 0.9310684204 0.9137703776
+ 0.9266322255 0.9313945174 0.9141650796
+ 0.9269760847 0.9317206740 0.9145597816
+ 0.9273198843 0.9320467710 0.9149544835
+ 0.9276638031 0.9323729277 0.9153491855
+ 0.9280076027 0.9326990247 0.9157438874
+ 0.9283512235 0.9330248237 0.9161379933
+ 0.9286935925 0.9333493114 0.9165306091
+ 0.9290360808 0.9336737990 0.9169231057
+ 0.9293785095 0.9339984059 0.9173156023
+ 0.9297209978 0.9343228936 0.9177080989
+ 0.9300634265 0.9346475005 0.9181007147
+ 0.9304059148 0.9349719882 0.9184932113
+ 0.9307463765 0.9352958202 0.9188840985
+ 0.9310864210 0.9356192946 0.9192745090
+ 0.9314262867 0.9359428883 0.9196649790
+ 0.9317662716 0.9362664223 0.9200553894
+ 0.9321063161 0.9365898967 0.9204457998
+ 0.9324461818 0.9369134903 0.9208363295
+ 0.9327856898 0.9372361898 0.9212262034
+ 0.9331235886 0.9375563860 0.9216144085
+ 0.9334616065 0.9378765821 0.9220026135
+ 0.9337995052 0.9381968975 0.9223908186
+ 0.9341375232 0.9385170937 0.9227790236
+ 0.9344754219 0.9388374090 0.9231672883
+ 0.9348133802 0.9391576052 0.9235554934
+ 0.9351503253 0.9394760132 0.9239422083
+ 0.9354866743 0.9397935271 0.9243283272
+ 0.9358232021 0.9401109815 0.9247143865
+ 0.9361596107 0.9404284954 0.9251005054
+ 0.9364960790 0.9407460093 0.9254866242
+ 0.9368324876 0.9410635233 0.9258726835
+ 0.9371687770 0.9413809776 0.9262586236
+ 0.9375026822 0.9416983128 0.9266427159
+ 0.9378365278 0.9420157075 0.9270266891
+ 0.9381703734 0.9423331022 0.9274107218
+ 0.9385042191 0.9426503778 0.9277948141
+ 0.9388381243 0.9429677725 0.9281787872
+ 0.9391719103 0.9432851076 0.9285628200
+ 0.9395049214 0.9436019063 0.9289460182
+ 0.9398363829 0.9439175129 0.9293279052
+ 0.9401680231 0.9442331791 0.9297096729
+ 0.9404994845 0.9445489049 0.9300916195
+ 0.9408311248 0.9448645115 0.9304735065
+ 0.9411625862 0.9451801777 0.9308552742
+ 0.9414941072 0.9454957843 0.9312372208
+ 0.9418246746 0.9458090067 0.9316176772
+ 0.9421545863 0.9461206794 0.9319974184
+ 0.9424844980 0.9464324117 0.9323772192
+ 0.9428144097 0.9467440844 0.9327569008
+ 0.9431443810 0.9470558167 0.9331367016
+ 0.9434742928 0.9473674893 0.9335163832
+ 0.9438042045 0.9476792812 0.9338961840
+ 0.9441329837 0.9479892850 0.9342741966
+ 0.9444615841 0.9482989907 0.9346519709
+ 0.9447901845 0.9486086965 0.9350296855
+ 0.9451187849 0.9489185214 0.9354074001
+ 0.9454473853 0.9492282271 0.9357851744
+ 0.9457759261 0.9495378733 0.9361628890
+ 0.9461045265 0.9498476982 0.9365406036
+ 0.9464306831 0.9501572847 0.9369168878
+ 0.9467568994 0.9504669905 0.9372932911
+ 0.9470831156 0.9507766962 0.9376695752
+ 0.9474092722 0.9510864019 0.9380459189
+ 0.9477354884 0.9513961077 0.9384223223
+ 0.9480617046 0.9517058134 0.9387986064
+ 0.9483876824 0.9520152807 0.9391748905
+ 0.9487118721 0.9523227215 0.9395511150
+ 0.9490361810 0.9526301026 0.9399273992
+ 0.9493604898 0.9529374838 0.9403036237
+ 0.9496846795 0.9532449245 0.9406797886
+ 0.9500089884 0.9535524249 0.9410560131
+ 0.9503332973 0.9538598061 0.9414321780
+ 0.9506573081 0.9541665912 0.9418082833
+ 0.9509801865 0.9544696212 0.9421828985
+ 0.9513030052 0.9547725916 0.9425575733
+ 0.9516258240 0.9550755024 0.9429323077
+ 0.9519485831 0.9553784728 0.9433069229
+ 0.9522714019 0.9556815028 0.9436815977
+ 0.9525942206 0.9559844136 0.9440562725
+ 0.9529168010 0.9562870860 0.9444304109
+ 0.9532371163 0.9565876126 0.9448000789
+ 0.9535574913 0.9568880200 0.9451699257
+ 0.9538778067 0.9571884871 0.9455395937
+ 0.9541981220 0.9574888945 0.9459093809
+ 0.9545183778 0.9577893019 0.9462791085
+ 0.9548388124 0.9580898285 0.9466487765
+ 0.9551590085 0.9583901763 0.9470183849
+ 0.9554758072 0.9586884975 0.9473823905
+ 0.9557926059 0.9589868784 0.9477463961
+ 0.9561094046 0.9592853189 0.9481102824
+ 0.9564262033 0.9595835805 0.9484742880
+ 0.9567428827 0.9598820210 0.9488382936
+ 0.9570596814 0.9601804018 0.9492021799
+ 0.9573764801 0.9604787827 0.9495661855
+ 0.9576882720 0.9607712030 0.9499266744
+ 0.9579992890 0.9610629082 0.9502866864
+ 0.9583104253 0.9613546133 0.9506466985
+ 0.9586215019 0.9616461992 0.9510068297
+ 0.9589325786 0.9619379044 0.9513667822
+ 0.9592437148 0.9622296095 0.9517267942
+ 0.9595547915 0.9625213146 0.9520869255
+ 0.9598625898 0.9628093243 0.9524452090
+ 0.9601690769 0.9630957246 0.9528027773
+ 0.9604755044 0.9633821249 0.9531604052
+ 0.9607818723 0.9636685252 0.9535179734
+ 0.9610882998 0.9639549255 0.9538757205
+ 0.9613947272 0.9642413259 0.9542332888
+ 0.9617010951 0.9645277262 0.9545909166
+ 0.9620065093 0.9648134112 0.9549475908
+ 0.9623104930 0.9650980830 0.9553031921
+ 0.9626144767 0.9653828144 0.9556587934
+ 0.9629185200 0.9656674862 0.9560143948
+ 0.9632223845 0.9659522176 0.9563699961
+ 0.9635264277 0.9662368894 0.9567255974
+ 0.9638304114 0.9665215015 0.9570811987
+ 0.9641342163 0.9668059945 0.9574365020
+ 0.9644362926 0.9670882821 0.9577893019
+ 0.9647383094 0.9673706293 0.9581422210
+ 0.9650403857 0.9676529169 0.9584950805
+ 0.9653425217 0.9679353237 0.9588479996
+ 0.9656445980 0.9682176113 0.9592007995
+ 0.9659466743 0.9684998989 0.9595537186
+ 0.9662488103 0.9687821865 0.9599065781
+ 0.9665489793 0.9690619707 0.9602572918
+ 0.9668484926 0.9693408012 0.9606072903
+ 0.9671481252 0.9696195722 0.9609572887
+ 0.9674475789 0.9698984027 0.9613072872
+ 0.9677472115 0.9701771140 0.9616572261
+ 0.9680467248 0.9704558849 0.9620072246
+ 0.9683462977 0.9707347155 0.9623572230
+ 0.9686446786 0.9710127711 0.9627063870
+ 0.9689406157 0.9712892175 0.9630538225
+ 0.9692364931 0.9715657234 0.9634011984
+ 0.9695323706 0.9718421102 0.9637485743
+ 0.9698283076 0.9721184969 0.9640960097
+ 0.9701241851 0.9723948836 0.9644433856
+ 0.9704201818 0.9726712704 0.9647908211
+ 0.9707161188 0.9729477167 0.9651381969
+ 0.9710099101 0.9732221961 0.9654831290
+ 0.9713031054 0.9734960794 0.9658272862
+ 0.9715964198 0.9737700224 0.9661715031
+ 0.9718896151 0.9740439057 0.9665157199
+ 0.9721829295 0.9743177891 0.9668598771
+ 0.9724761248 0.9745916724 0.9672040939
+ 0.9727693796 0.9748656750 0.9675483108
+ 0.9730619788 0.9751387239 0.9678918123
+ 0.9733523726 0.9754089713 0.9682325721
+ 0.9736428857 0.9756792784 0.9685735106
+ 0.9739332795 0.9759495854 0.9689142704
+ 0.9742236733 0.9762198925 0.9692552090
+ 0.9745141864 0.9764901996 0.9695960879
+ 0.9748045802 0.9767605066 0.9699369073
+ 0.9750950933 0.9770308137 0.9702777863
+ 0.9753832817 0.9772984982 0.9706165791
+ 0.9756699204 0.9775645137 0.9709541798
+ 0.9759566188 0.9778305292 0.9712917209
+ 0.9762431979 0.9780964851 0.9716293216
+ 0.9765298963 0.9783625007 0.9719668031
+ 0.9768165946 0.9786285162 0.9723044038
+ 0.9771031737 0.9788944721 0.9726418853
+ 0.9773898721 0.9791604877 0.9729794860
+ 0.9776729941 0.9794232845 0.9733135104
+ 0.9779558182 0.9796857238 0.9736471772
+ 0.9782385826 0.9799482226 0.9739809036
+ 0.9785215259 0.9802107215 0.9743145704
+ 0.9788042903 0.9804731011 0.9746482968
+ 0.9790871143 0.9807356000 0.9749820232
+ 0.9793698788 0.9809979796 0.9753156900
+ 0.9796521068 0.9812598825 0.9756488204
+ 0.9799309969 0.9815183878 0.9759784937
+ 0.9802098870 0.9817768931 0.9763082266
+ 0.9804887772 0.9820353985 0.9766378999
+ 0.9807677269 0.9822939038 0.9769675732
+ 0.9810466766 0.9825525284 0.9772973061
+ 0.9813256264 0.9828109741 0.9776269794
+ 0.9816045165 0.9830694795 0.9779567122
+ 0.9818817973 0.9833264947 0.9782847762
+ 0.9821562171 0.9835805297 0.9786099792
+ 0.9824305177 0.9838346243 0.9789351821
+ 0.9827048182 0.9840885997 0.9792603850
+ 0.9829791784 0.9843426943 0.9795857072
+ 0.9832534790 0.9845967293 0.9799109101
+ 0.9835278988 0.9848508239 0.9802361131
+ 0.9838021994 0.9851047993 0.9805613160
+ 0.9840744138 0.9853568077 0.9808841944
+ 0.9843440056 0.9856063724 0.9812043905
+ 0.9846137166 0.9858559966 0.9815247059
+ 0.9848834276 0.9861056209 0.9818449020
+ 0.9851530790 0.9863551855 0.9821652174
+ 0.9854227901 0.9866049290 0.9824854136
+ 0.9856923819 0.9868544936 0.9828057289
+ 0.9859620929 0.9871041179 0.9831259251
+ 0.9862291813 0.9873511195 0.9834434986
+ 0.9864938259 0.9875954986 0.9837586880
+ 0.9867584109 0.9878399968 0.9840738177
+ 0.9870229959 0.9880844951 0.9843888879
+ 0.9872875810 0.9883289933 0.9847040176
+ 0.9875522256 0.9885734916 0.9850190878
+ 0.9878168106 0.9888179898 0.9853342175
+ 0.9880813956 0.9890624881 0.9856492877
+ 0.9883427024 0.9893040061 0.9859611988
+ 0.9886007905 0.9895424843 0.9862697124
+ 0.9888588786 0.9897810817 0.9865782261
+ 0.9891169071 0.9900196195 0.9868866801
+ 0.9893749952 0.9902582169 0.9871953130
+ 0.9896330833 0.9904968143 0.9875038266
+ 0.9898911119 0.9907352924 0.9878122807
+ 0.9901492000 0.9909738898 0.9881207943
+ 0.9904044867 0.9912102818 0.9884263873
+ 0.9906560183 0.9914438128 0.9887279868
+ 0.9909074903 0.9916772246 0.9890295267
+ 0.9911590219 0.9919106960 0.9893310070
+ 0.9914104939 0.9921442270 0.9896326065
+ 0.9916620851 0.9923775792 0.9899340868
+ 0.9919136167 0.9926111102 0.9902356267
+ 0.9921650887 0.9928445816 0.9905372262
+ 0.9924147129 0.9930760264 0.9908366799
+ 0.9926593900 0.9933021069 0.9911310077
+ 0.9929041266 0.9935281873 0.9914252162
+ 0.9931489229 0.9937543273 0.9917194843
+ 0.9933936000 0.9939802885 0.9920136929
+ 0.9936382771 0.9942064285 0.9923080206
+ 0.9938830137 0.9944325089 0.9926022291
+ 0.9941276908 0.9946585894 0.9928964972
+ 0.9943717718 0.9948840141 0.9931902289
+ 0.9946069717 0.9950991869 0.9934738874
+ 0.9948421717 0.9953144193 0.9937577248
+ 0.9950773716 0.9955294728 0.9940413833
+ 0.9953125715 0.9957447052 0.9943252206
+ 0.9955477715 0.9959598184 0.9946088791
+ 0.9957829714 0.9961749911 0.9948927164
+ 0.9960181713 0.9963901043 0.9951763749
+ 0.9962533712 0.9966052771 0.9954602122
+ 0.9964799881 0.9968116283 0.9957352877
+ 0.9967042208 0.9970152974 0.9960079789
+ 0.9969282746 0.9972190857 0.9962807298
+ 0.9971525073 0.9974228144 0.9965534210
+ 0.9973766208 0.9976264834 0.9968259931
+ 0.9976006746 0.9978302121 0.9970986843
+ 0.9978249073 0.9980338812 0.9973713756
+ 0.9980490208 0.9982377291 0.9976441264
+ 0.9982699156 0.9984378219 0.9979118109
+ 0.9984861016 0.9986330867 0.9981728196
+ 0.9987024069 0.9988284111 0.9984338880
+ 0.9989187121 0.9990236163 0.9986948967
+ 0.9991348982 0.9992188811 0.9989559054
+ 0.9993512034 0.9994142056 0.9992169142
+ 0.9995675087 0.9996094704 0.9994779825
+ 0.9997836947 0.9998046756 0.9997389913
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/canon_optura_981111.slrr.spi1d b/release/datafiles/colormanagement/luts/film_response/canon_optura_981111.slrr.spi1d
new file mode 100644
index 00000000000..2081fd8d899
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/canon_optura_981111.slrr.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 1
+{
+ 0.0000000000
+ 0.0014726890
+ 0.0029453780
+ 0.0044180658
+ 0.0058907550
+ 0.0073634442
+ 0.0088361334
+ 0.0103471801
+ 0.0120028201
+ 0.0136584500
+ 0.0153140901
+ 0.0169697199
+ 0.0186253507
+ 0.0203142408
+ 0.0221658293
+ 0.0240174104
+ 0.0258690007
+ 0.0277205799
+ 0.0295721702
+ 0.0315769389
+ 0.0336277485
+ 0.0356785506
+ 0.0377293602
+ 0.0397801585
+ 0.0420004018
+ 0.0442409813
+ 0.0464815497
+ 0.0487221293
+ 0.0510343090
+ 0.0534415208
+ 0.0558487400
+ 0.0582559519
+ 0.0606994517
+ 0.0632383898
+ 0.0657773167
+ 0.0683162585
+ 0.0708854869
+ 0.0735143498
+ 0.0761432126
+ 0.0787720680
+ 0.0814261734
+ 0.0841023996
+ 0.0867786184
+ 0.0894548520
+ 0.0921387821
+ 0.0948246717
+ 0.0975105688
+ 0.1001949981
+ 0.1028613001
+ 0.1055274978
+ 0.1081937999
+ 0.1108473018
+ 0.1134739965
+ 0.1161006987
+ 0.1187274009
+ 0.1213281006
+ 0.1239041984
+ 0.1264802963
+ 0.1290563941
+ 0.1315979064
+ 0.1341194063
+ 0.1366408020
+ 0.1391623020
+ 0.1416479945
+ 0.1441158056
+ 0.1465836018
+ 0.1490515023
+ 0.1514890045
+ 0.1539075971
+ 0.1563262939
+ 0.1587449014
+ 0.1611427963
+ 0.1635183990
+ 0.1658940017
+ 0.1682696044
+ 0.1706354022
+ 0.1729750037
+ 0.1753146052
+ 0.1776542068
+ 0.1799937934
+ 0.1823045015
+ 0.1846151054
+ 0.1869256943
+ 0.1892361939
+ 0.1915317029
+ 0.1938195974
+ 0.1961075068
+ 0.1983955055
+ 0.2006783038
+ 0.2029488981
+ 0.2052195966
+ 0.2074902058
+ 0.2097609043
+ 0.2120196968
+ 0.2142771035
+ 0.2165344954
+ 0.2187919021
+ 0.2210443020
+ 0.2232909948
+ 0.2255375981
+ 0.2277843058
+ 0.2300308049
+ 0.2322676033
+ 0.2345044017
+ 0.2367410958
+ 0.2389778942
+ 0.2412088960
+ 0.2434349060
+ 0.2456609011
+ 0.2478868961
+ 0.2501122952
+ 0.2523249984
+ 0.2545377910
+ 0.2567506135
+ 0.2589632869
+ 0.2611669004
+ 0.2633624077
+ 0.2655578852
+ 0.2677533925
+ 0.2699488997
+ 0.2721224129
+ 0.2742953897
+ 0.2764684856
+ 0.2786414921
+ 0.2808037996
+ 0.2829482853
+ 0.2850928009
+ 0.2872372866
+ 0.2893818021
+ 0.2915014923
+ 0.2936109900
+ 0.2957204878
+ 0.2978301048
+ 0.2999396026
+ 0.3020089865
+ 0.3040772080
+ 0.3061453998
+ 0.3082135916
+ 0.3102754056
+ 0.3122963905
+ 0.3143174946
+ 0.3163385093
+ 0.3183594942
+ 0.3203707039
+ 0.3223395944
+ 0.3243085146
+ 0.3262774050
+ 0.3282462955
+ 0.3302091062
+ 0.3321220875
+ 0.3340350986
+ 0.3359481096
+ 0.3378610909
+ 0.3397741020
+ 0.3416356146
+ 0.3434903026
+ 0.3453449905
+ 0.3471997082
+ 0.3490543962
+ 0.3508799970
+ 0.3526752889
+ 0.3544706106
+ 0.3562659025
+ 0.3580613136
+ 0.3598566055
+ 0.3615975976
+ 0.3633337915
+ 0.3650701046
+ 0.3668062985
+ 0.3685424924
+ 0.3702695072
+ 0.3719482124
+ 0.3736267984
+ 0.3753054142
+ 0.3769840896
+ 0.3786627054
+ 0.3803300858
+ 0.3819536865
+ 0.3835771978
+ 0.3852007091
+ 0.3868241906
+ 0.3884477019
+ 0.3900690079
+ 0.3916406929
+ 0.3932124078
+ 0.3947840929
+ 0.3963558972
+ 0.3979276121
+ 0.3994992971
+ 0.4010384083
+ 0.4025622904
+ 0.4040861130
+ 0.4056099951
+ 0.4071337879
+ 0.4086576998
+ 0.4101763964
+ 0.4116567969
+ 0.4131371975
+ 0.4146175981
+ 0.4160979986
+ 0.4175783992
+ 0.4190588892
+ 0.4205251932
+ 0.4219667912
+ 0.4234085083
+ 0.4248501956
+ 0.4262919128
+ 0.4277335107
+ 0.4291751981
+ 0.4306024015
+ 0.4320102930
+ 0.4334180951
+ 0.4348258972
+ 0.4362337887
+ 0.4376415908
+ 0.4390495121
+ 0.4404478967
+ 0.4418269098
+ 0.4432058930
+ 0.4445849061
+ 0.4459638894
+ 0.4473429024
+ 0.4487217963
+ 0.4500991106
+ 0.4514541924
+ 0.4528093040
+ 0.4541643858
+ 0.4555194974
+ 0.4568746090
+ 0.4582296908
+ 0.4595848024
+ 0.4609268010
+ 0.4622628987
+ 0.4635990858
+ 0.4649352133
+ 0.4662713110
+ 0.4676074982
+ 0.4689435959
+ 0.4702768028
+ 0.4715988040
+ 0.4729208052
+ 0.4742426872
+ 0.4755646884
+ 0.4768866897
+ 0.4782086909
+ 0.4795306027
+ 0.4808464944
+ 0.4821588993
+ 0.4834713042
+ 0.4847837985
+ 0.4860962033
+ 0.4874086976
+ 0.4887211025
+ 0.4900333881
+ 0.4913406968
+ 0.4926480055
+ 0.4939553142
+ 0.4952625930
+ 0.4965699017
+ 0.4978772104
+ 0.4991844893
+ 0.5004913807
+ 0.5017976761
+ 0.5031039119
+ 0.5044102073
+ 0.5057165027
+ 0.5070226789
+ 0.5083289742
+ 0.5096353292
+ 0.5109434724
+ 0.5122525096
+ 0.5135614872
+ 0.5148705244
+ 0.5161795020
+ 0.5174884796
+ 0.5187975168
+ 0.5201069117
+ 0.5214219093
+ 0.5227369070
+ 0.5240519047
+ 0.5253669024
+ 0.5266819000
+ 0.5279968977
+ 0.5293118954
+ 0.5306311250
+ 0.5319548249
+ 0.5332785249
+ 0.5346022248
+ 0.5359259844
+ 0.5372496843
+ 0.5385733843
+ 0.5398970842
+ 0.5412306786
+ 0.5425651073
+ 0.5438994765
+ 0.5452339053
+ 0.5465683937
+ 0.5479028225
+ 0.5492371917
+ 0.5505766869
+ 0.5519229174
+ 0.5532690883
+ 0.5546153188
+ 0.5559614897
+ 0.5573077202
+ 0.5586538911
+ 0.5600001812
+ 0.5613582134
+ 0.5627163053
+ 0.5640742779
+ 0.5654324293
+ 0.5667904019
+ 0.5681484938
+ 0.5695065260
+ 0.5708712935
+ 0.5722399950
+ 0.5736086965
+ 0.5749773979
+ 0.5763460994
+ 0.5777148008
+ 0.5790835023
+ 0.5804548860
+ 0.5818316936
+ 0.5832085013
+ 0.5845853090
+ 0.5859621763
+ 0.5873389840
+ 0.5887157917
+ 0.5900928974
+ 0.5914738178
+ 0.5928547978
+ 0.5942357779
+ 0.5956166983
+ 0.5969976783
+ 0.5983787179
+ 0.5997595787
+ 0.6011396050
+ 0.6025193930
+ 0.6038991809
+ 0.6052790284
+ 0.6066588163
+ 0.6080386043
+ 0.6094183922
+ 0.6107937098
+ 0.6121658087
+ 0.6135379076
+ 0.6149100065
+ 0.6162821054
+ 0.6176542044
+ 0.6190263033
+ 0.6203941107
+ 0.6217511296
+ 0.6231080890
+ 0.6244651079
+ 0.6258221269
+ 0.6271792054
+ 0.6285362244
+ 0.6298931837
+ 0.6312292218
+ 0.6325632930
+ 0.6338974833
+ 0.6352316141
+ 0.6365658045
+ 0.6378998756
+ 0.6392341256
+ 0.6405552030
+ 0.6418588161
+ 0.6431624293
+ 0.6444659829
+ 0.6457697153
+ 0.6470733285
+ 0.6483768821
+ 0.6496804953
+ 0.6509557962
+ 0.6522219181
+ 0.6534879804
+ 0.6547541022
+ 0.6560202241
+ 0.6572862864
+ 0.6585524082
+ 0.6598184109
+ 0.6610473990
+ 0.6622701883
+ 0.6634929776
+ 0.6647157073
+ 0.6659384966
+ 0.6671612859
+ 0.6683840156
+ 0.6696068048
+ 0.6707972884
+ 0.6719723940
+ 0.6731474996
+ 0.6743227243
+ 0.6754977703
+ 0.6766729951
+ 0.6778481007
+ 0.6790233254
+ 0.6801899076
+ 0.6813148260
+ 0.6824398041
+ 0.6835647225
+ 0.6846895814
+ 0.6858144999
+ 0.6869394779
+ 0.6880643964
+ 0.6891893148
+ 0.6902999878
+ 0.6913738251
+ 0.6924476027
+ 0.6935213804
+ 0.6945952773
+ 0.6956691146
+ 0.6967428923
+ 0.6978167295
+ 0.6988906264
+ 0.6999644041
+ 0.7009894848
+ 0.7020128965
+ 0.7030364275
+ 0.7040597796
+ 0.7050833106
+ 0.7061067224
+ 0.7071300745
+ 0.7081536055
+ 0.7091770172
+ 0.7101910114
+ 0.7111660838
+ 0.7121412754
+ 0.7131164074
+ 0.7140914798
+ 0.7150666714
+ 0.7160418034
+ 0.7170169950
+ 0.7179921269
+ 0.7189671993
+ 0.7199423909
+ 0.7208750844
+ 0.7218052149
+ 0.7227352262
+ 0.7236652970
+ 0.7245953083
+ 0.7255253792
+ 0.7264555097
+ 0.7273855209
+ 0.7283155918
+ 0.7292456031
+ 0.7301679254
+ 0.7310569882
+ 0.7319461107
+ 0.7328351140
+ 0.7337241769
+ 0.7346132994
+ 0.7355023026
+ 0.7363914251
+ 0.7372804880
+ 0.7381694913
+ 0.7390586138
+ 0.7399476767
+ 0.7408025861
+ 0.7416555285
+ 0.7425082922
+ 0.7433611155
+ 0.7442138791
+ 0.7450668216
+ 0.7459195852
+ 0.7467724085
+ 0.7476251721
+ 0.7484781146
+ 0.7493308783
+ 0.7501770258
+ 0.7509987950
+ 0.7518206835
+ 0.7526425123
+ 0.7534642816
+ 0.7542861104
+ 0.7551078796
+ 0.7559298277
+ 0.7567515969
+ 0.7575734258
+ 0.7583951950
+ 0.7592170238
+ 0.7600377202
+ 0.7608340979
+ 0.7616304755
+ 0.7624269128
+ 0.7632232904
+ 0.7640197873
+ 0.7648162246
+ 0.7656126022
+ 0.7664089799
+ 0.7672054768
+ 0.7680019140
+ 0.7687982917
+ 0.7695947289
+ 0.7703816295
+ 0.7711585760
+ 0.7719355226
+ 0.7727125287
+ 0.7734894156
+ 0.7742664218
+ 0.7750433087
+ 0.7758203149
+ 0.7765973210
+ 0.7773742080
+ 0.7781512141
+ 0.7789281011
+ 0.7797051072
+ 0.7804738283
+ 0.7812374830
+ 0.7820013165
+ 0.7827649713
+ 0.7835286856
+ 0.7842923999
+ 0.7850561142
+ 0.7858198881
+ 0.7865836024
+ 0.7873473167
+ 0.7881109715
+ 0.7888746858
+ 0.7896384001
+ 0.7903987169
+ 0.7911556959
+ 0.7919127941
+ 0.7926697731
+ 0.7934268713
+ 0.7941839099
+ 0.7949410081
+ 0.7956979871
+ 0.7964550853
+ 0.7972121239
+ 0.7979692221
+ 0.7987263203
+ 0.7994832993
+ 0.8002405167
+ 0.8009977937
+ 0.8017551899
+ 0.8025125861
+ 0.8032699227
+ 0.8040273190
+ 0.8047845960
+ 0.8055419922
+ 0.8062993884
+ 0.8070567250
+ 0.8078141212
+ 0.8085715175
+ 0.8093287945
+ 0.8100870848
+ 0.8108522296
+ 0.8116173148
+ 0.8123824000
+ 0.8131474853
+ 0.8139125705
+ 0.8146777749
+ 0.8154429197
+ 0.8162080050
+ 0.8169730902
+ 0.8177381754
+ 0.8185033202
+ 0.8192685246
+ 0.8200343251
+ 0.8208150864
+ 0.8215959072
+ 0.8223767281
+ 0.8231574893
+ 0.8239383101
+ 0.8247190714
+ 0.8255000114
+ 0.8262807727
+ 0.8270615935
+ 0.8278424144
+ 0.8286231756
+ 0.8294039965
+ 0.8301904798
+ 0.8309953809
+ 0.8318002820
+ 0.8326051831
+ 0.8334100246
+ 0.8342149258
+ 0.8350198269
+ 0.8358247280
+ 0.8366295099
+ 0.8374344110
+ 0.8382393122
+ 0.8390442133
+ 0.8398489952
+ 0.8406803012
+ 0.8415176272
+ 0.8423550129
+ 0.8431922793
+ 0.8440296054
+ 0.8448669910
+ 0.8457043171
+ 0.8465415835
+ 0.8473790288
+ 0.8482162952
+ 0.8490536213
+ 0.8498910069
+ 0.8507630229
+ 0.8516402841
+ 0.8525176048
+ 0.8533949256
+ 0.8542721868
+ 0.8551493883
+ 0.8560267091
+ 0.8569039702
+ 0.8577812910
+ 0.8586584926
+ 0.8595358133
+ 0.8604339957
+ 0.8613557816
+ 0.8622775078
+ 0.8631992936
+ 0.8641210198
+ 0.8650426865
+ 0.8659644723
+ 0.8668861985
+ 0.8678079844
+ 0.8687297106
+ 0.8696514964
+ 0.8705996275
+ 0.8715636730
+ 0.8725277781
+ 0.8734918833
+ 0.8744559884
+ 0.8754202127
+ 0.8763843179
+ 0.8773484230
+ 0.8783125281
+ 0.8792766929
+ 0.8802478909
+ 0.8812404275
+ 0.8822329044
+ 0.8832253814
+ 0.8842179179
+ 0.8852105141
+ 0.8862029910
+ 0.8871955276
+ 0.8881880045
+ 0.8891804814
+ 0.8901726007
+ 0.8911628127
+ 0.8921530247
+ 0.8931431174
+ 0.8941333294
+ 0.8951234818
+ 0.8961136937
+ 0.8971037865
+ 0.8980939984
+ 0.8990842104
+ 0.9000707269
+ 0.9010120034
+ 0.9019532800
+ 0.9028946161
+ 0.9038360119
+ 0.9047772884
+ 0.9057186246
+ 0.9066599011
+ 0.9076012969
+ 0.9085425735
+ 0.9094839096
+ 0.9103804827
+ 0.9112226963
+ 0.9120650291
+ 0.9129071832
+ 0.9137495160
+ 0.9145917892
+ 0.9154340029
+ 0.9162762761
+ 0.9171184897
+ 0.9179608226
+ 0.9188029766
+ 0.9196453094
+ 0.9204097986
+ 0.9211177230
+ 0.9218255877
+ 0.9225335121
+ 0.9232413769
+ 0.9239493012
+ 0.9246572256
+ 0.9253650904
+ 0.9260730147
+ 0.9267808795
+ 0.9274888039
+ 0.9281967282
+ 0.9289045930
+ 0.9296125174
+ 0.9302552938
+ 0.9308195710
+ 0.9313837886
+ 0.9319481254
+ 0.9325122833
+ 0.9330765009
+ 0.9336407781
+ 0.9342049956
+ 0.9347692132
+ 0.9353334904
+ 0.9358977079
+ 0.9364619255
+ 0.9370262027
+ 0.9375904202
+ 0.9381545782
+ 0.9387189150
+ 0.9392830729
+ 0.9398472905
+ 0.9403160810
+ 0.9407495856
+ 0.9411829710
+ 0.9416164160
+ 0.9420498013
+ 0.9424831867
+ 0.9429165721
+ 0.9433500171
+ 0.9437834024
+ 0.9442167878
+ 0.9446501732
+ 0.9450836182
+ 0.9455170035
+ 0.9459503889
+ 0.9463838935
+ 0.9468172789
+ 0.9472507238
+ 0.9476841092
+ 0.9481174946
+ 0.9485508800
+ 0.9489843249
+ 0.9494177103
+ 0.9498510957
+ 0.9502140880
+ 0.9505401850
+ 0.9508662820
+ 0.9511923790
+ 0.9515184760
+ 0.9518445730
+ 0.9521707296
+ 0.9524968266
+ 0.9528229237
+ 0.9531490207
+ 0.9534751177
+ 0.9538012147
+ 0.9541273117
+ 0.9544534087
+ 0.9547795057
+ 0.9551056027
+ 0.9554316998
+ 0.9557577968
+ 0.9560838938
+ 0.9564099908
+ 0.9567360878
+ 0.9570621848
+ 0.9573882818
+ 0.9577143788
+ 0.9580404758
+ 0.9583665729
+ 0.9586927295
+ 0.9590188265
+ 0.9593449235
+ 0.9596710205
+ 0.9599971175
+ 0.9602413177
+ 0.9604846835
+ 0.9607281089
+ 0.9609714746
+ 0.9612150192
+ 0.9614583850
+ 0.9617018104
+ 0.9619451761
+ 0.9621887207
+ 0.9624320865
+ 0.9626755118
+ 0.9629188776
+ 0.9631623030
+ 0.9634057879
+ 0.9636492133
+ 0.9638925791
+ 0.9641360044
+ 0.9643794894
+ 0.9646229148
+ 0.9648662806
+ 0.9651097059
+ 0.9653531909
+ 0.9655966163
+ 0.9658399820
+ 0.9660834074
+ 0.9663268924
+ 0.9665703177
+ 0.9668136835
+ 0.9670571089
+ 0.9673005939
+ 0.9675440192
+ 0.9677873850
+ 0.9680308104
+ 0.9682741761
+ 0.9685177207
+ 0.9687610865
+ 0.9690045118
+ 0.9692478776
+ 0.9694914222
+ 0.9697347879
+ 0.9699782133
+ 0.9701654911
+ 0.9703474045
+ 0.9705291986
+ 0.9707109928
+ 0.9708927870
+ 0.9710745811
+ 0.9712563753
+ 0.9714382291
+ 0.9716200233
+ 0.9718018770
+ 0.9719836712
+ 0.9721655250
+ 0.9723473191
+ 0.9725291133
+ 0.9727109075
+ 0.9728927016
+ 0.9730746150
+ 0.9732564092
+ 0.9734382033
+ 0.9736199975
+ 0.9738017917
+ 0.9739835858
+ 0.9741653800
+ 0.9743471742
+ 0.9745290875
+ 0.9747108817
+ 0.9748926759
+ 0.9750745296
+ 0.9752563238
+ 0.9754381180
+ 0.9756199121
+ 0.9758018255
+ 0.9759836197
+ 0.9761654139
+ 0.9763472080
+ 0.9765290022
+ 0.9767107964
+ 0.9768925905
+ 0.9770743847
+ 0.9772562981
+ 0.9774380922
+ 0.9776198864
+ 0.9778016806
+ 0.9779834747
+ 0.9781653285
+ 0.9783471227
+ 0.9785289168
+ 0.9787107706
+ 0.9788926244
+ 0.9790744185
+ 0.9792562127
+ 0.9794380069
+ 0.9796198010
+ 0.9798015952
+ 0.9799835086
+ 0.9801241159
+ 0.9802607298
+ 0.9803972840
+ 0.9805337787
+ 0.9806703925
+ 0.9808070064
+ 0.9809435010
+ 0.9810801148
+ 0.9812166095
+ 0.9813532233
+ 0.9814897776
+ 0.9816262722
+ 0.9817628860
+ 0.9818994999
+ 0.9820359945
+ 0.9821726084
+ 0.9823091030
+ 0.9824457169
+ 0.9825822711
+ 0.9827188253
+ 0.9828553796
+ 0.9829919934
+ 0.9831284881
+ 0.9832651019
+ 0.9834015965
+ 0.9835382104
+ 0.9836748242
+ 0.9838113189
+ 0.9839478731
+ 0.9840844870
+ 0.9842209816
+ 0.9843575954
+ 0.9844942093
+ 0.9846307039
+ 0.9847673178
+ 0.9849038124
+ 0.9850404263
+ 0.9851769805
+ 0.9853134751
+ 0.9854500890
+ 0.9855867028
+ 0.9857231975
+ 0.9858598113
+ 0.9859963059
+ 0.9861329198
+ 0.9862694740
+ 0.9864060283
+ 0.9865425825
+ 0.9866791964
+ 0.9868156910
+ 0.9869523048
+ 0.9870887995
+ 0.9872254133
+ 0.9873620272
+ 0.9874985218
+ 0.9876350760
+ 0.9877716899
+ 0.9879081845
+ 0.9880447984
+ 0.9881814122
+ 0.9883179069
+ 0.9884545207
+ 0.9885910153
+ 0.9887276292
+ 0.9888641834
+ 0.9890006781
+ 0.9891372919
+ 0.9892739058
+ 0.9894104004
+ 0.9895470142
+ 0.9896835089
+ 0.9898201227
+ 0.9899566770
+ 0.9900705814
+ 0.9901739955
+ 0.9902775288
+ 0.9903808832
+ 0.9904842973
+ 0.9905877709
+ 0.9906911850
+ 0.9907945991
+ 0.9908980727
+ 0.9910014868
+ 0.9911049008
+ 0.9912083745
+ 0.9913117886
+ 0.9914152026
+ 0.9915186167
+ 0.9916220903
+ 0.9917255044
+ 0.9918289185
+ 0.9919323921
+ 0.9920358062
+ 0.9921392202
+ 0.9922426939
+ 0.9923461080
+ 0.9924495220
+ 0.9925529957
+ 0.9926564097
+ 0.9927598238
+ 0.9928632975
+ 0.9929667115
+ 0.9930701256
+ 0.9931734800
+ 0.9932770133
+ 0.9933804274
+ 0.9934837818
+ 0.9935873151
+ 0.9936907291
+ 0.9937940836
+ 0.9938976169
+ 0.9940009713
+ 0.9941043854
+ 0.9942079186
+ 0.9943112731
+ 0.9944146872
+ 0.9945182204
+ 0.9946215749
+ 0.9947249889
+ 0.9948284030
+ 0.9949318767
+ 0.9950352907
+ 0.9951387048
+ 0.9952421784
+ 0.9953455925
+ 0.9954490066
+ 0.9955524802
+ 0.9956558943
+ 0.9957593083
+ 0.9958627820
+ 0.9959661961
+ 0.9960696101
+ 0.9961730242
+ 0.9962764978
+ 0.9963799119
+ 0.9964833260
+ 0.9965867996
+ 0.9966902137
+ 0.9967936277
+ 0.9968971014
+ 0.9970005155
+ 0.9971039295
+ 0.9972074032
+ 0.9973108172
+ 0.9974141717
+ 0.9975177050
+ 0.9976211190
+ 0.9977244735
+ 0.9978278875
+ 0.9979314208
+ 0.9980347753
+ 0.9981381893
+ 0.9982417226
+ 0.9983450770
+ 0.9984484911
+ 0.9985520244
+ 0.9986553788
+ 0.9987587929
+ 0.9988623261
+ 0.9989656806
+ 0.9990690947
+ 0.9991726279
+ 0.9992759824
+ 0.9993793964
+ 0.9994828105
+ 0.9995862842
+ 0.9996896982
+ 0.9997931123
+ 0.9998965859
+ 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/canon_optura_981111.spi1d b/release/datafiles/colormanagement/luts/film_response/canon_optura_981111.spi1d
new file mode 100644
index 00000000000..23ca3fa440f
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/canon_optura_981111.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 1
+{
+ 0.0000000000
+ 0.0025450480
+ 0.0050900960
+ 0.0076351431
+ 0.0101884697
+ 0.0128504699
+ 0.0155124702
+ 0.0181744602
+ 0.0208844505
+ 0.0236991905
+ 0.0265139192
+ 0.0293286499
+ 0.0322732218
+ 0.0352584682
+ 0.0382437110
+ 0.0412991717
+ 0.0444549806
+ 0.0476107895
+ 0.0508038513
+ 0.0541130006
+ 0.0574221388
+ 0.0607581101
+ 0.0641886517
+ 0.0676191822
+ 0.0710741282
+ 0.0745844394
+ 0.0780947506
+ 0.0816211328
+ 0.0851665810
+ 0.0887120292
+ 0.0922535583
+ 0.0957928598
+ 0.0993321612
+ 0.1028394997
+ 0.1063392982
+ 0.1098392010
+ 0.1132792011
+ 0.1167163998
+ 0.1201502010
+ 0.1235113963
+ 0.1268725991
+ 0.1302281022
+ 0.1335085034
+ 0.1367888004
+ 0.1400675029
+ 0.1432684064
+ 0.1464692056
+ 0.1496700943
+ 0.1528047025
+ 0.1559316963
+ 0.1590587050
+ 0.1621396989
+ 0.1652007997
+ 0.1682619005
+ 0.1712982953
+ 0.1743023992
+ 0.1773066074
+ 0.1803057045
+ 0.1832617074
+ 0.1862176061
+ 0.1891735941
+ 0.1921004951
+ 0.1950162053
+ 0.1979319006
+ 0.2008378059
+ 0.2037197053
+ 0.2066015005
+ 0.2094834000
+ 0.2123412043
+ 0.2151937932
+ 0.2180463970
+ 0.2208905071
+ 0.2237161994
+ 0.2265419066
+ 0.2293675989
+ 0.2321725041
+ 0.2349714041
+ 0.2377703935
+ 0.2405633926
+ 0.2433333993
+ 0.2461033016
+ 0.2488732934
+ 0.2516236007
+ 0.2543602884
+ 0.2570970953
+ 0.2598339021
+ 0.2625338137
+ 0.2652313113
+ 0.2679288983
+ 0.2706156075
+ 0.2732666135
+ 0.2759177089
+ 0.2785687149
+ 0.2811945975
+ 0.2837912142
+ 0.2863877118
+ 0.2889842987
+ 0.2915427089
+ 0.2940768003
+ 0.2966108024
+ 0.2991448939
+ 0.3016327024
+ 0.3040969968
+ 0.3065612912
+ 0.3090254962
+ 0.3114438951
+ 0.3138321042
+ 0.3162203133
+ 0.3186084926
+ 0.3209632039
+ 0.3232708871
+ 0.3255786002
+ 0.3278863132
+ 0.3301869929
+ 0.3324112892
+ 0.3346355855
+ 0.3368599117
+ 0.3390842080
+ 0.3412589133
+ 0.3433989882
+ 0.3455390036
+ 0.3476791084
+ 0.3498190939
+ 0.3518827856
+ 0.3539395034
+ 0.3559961915
+ 0.3580527902
+ 0.3601051867
+ 0.3620809913
+ 0.3640567958
+ 0.3660326004
+ 0.3680082858
+ 0.3699840903
+ 0.3718833923
+ 0.3737820983
+ 0.3756807148
+ 0.3775793910
+ 0.3794780076
+ 0.3813242912
+ 0.3831506073
+ 0.3849770129
+ 0.3868033886
+ 0.3886297941
+ 0.3904395103
+ 0.3921990991
+ 0.3939588070
+ 0.3957183957
+ 0.3974781036
+ 0.3992376924
+ 0.4009630084
+ 0.4026620984
+ 0.4043611884
+ 0.4060603082
+ 0.4077593982
+ 0.4094584882
+ 0.4111205935
+ 0.4127655029
+ 0.4144104123
+ 0.4160552919
+ 0.4177002013
+ 0.4193451107
+ 0.4209614098
+ 0.4225586951
+ 0.4241560102
+ 0.4257532954
+ 0.4273506105
+ 0.4289478958
+ 0.4305312037
+ 0.4320875108
+ 0.4336437881
+ 0.4352000058
+ 0.4367563128
+ 0.4383125007
+ 0.4398688078
+ 0.4413934946
+ 0.4429152012
+ 0.4444369972
+ 0.4459587932
+ 0.4474805892
+ 0.4490022957
+ 0.4505144060
+ 0.4520080984
+ 0.4535017014
+ 0.4549953938
+ 0.4564889967
+ 0.4579826891
+ 0.4594762921
+ 0.4609557092
+ 0.4624272883
+ 0.4638989866
+ 0.4653705955
+ 0.4668422043
+ 0.4683139026
+ 0.4697855115
+ 0.4712435007
+ 0.4726991057
+ 0.4741545916
+ 0.4756101966
+ 0.4770658016
+ 0.4785214067
+ 0.4799770117
+ 0.4814223051
+ 0.4828675091
+ 0.4843125939
+ 0.4857577980
+ 0.4872029126
+ 0.4886480868
+ 0.4900929034
+ 0.4915328026
+ 0.4929727912
+ 0.4944128096
+ 0.4958527088
+ 0.4972926974
+ 0.4987326860
+ 0.5001726151
+ 0.5016121864
+ 0.5030518770
+ 0.5044915080
+ 0.5059311986
+ 0.5073708296
+ 0.5088104010
+ 0.5102508068
+ 0.5116943717
+ 0.5131379962
+ 0.5145816207
+ 0.5160253048
+ 0.5174689293
+ 0.5189124942
+ 0.5203580260
+ 0.5218092799
+ 0.5232605934
+ 0.5247119069
+ 0.5261632800
+ 0.5276145935
+ 0.5290659070
+ 0.5305209160
+ 0.5319827199
+ 0.5334445238
+ 0.5349063277
+ 0.5363680720
+ 0.5378299952
+ 0.5392917991
+ 0.5407599807
+ 0.5422341824
+ 0.5437083840
+ 0.5451825857
+ 0.5466567874
+ 0.5481309891
+ 0.5496053100
+ 0.5510889888
+ 0.5525763035
+ 0.5540636182
+ 0.5555508137
+ 0.5570381284
+ 0.5585253239
+ 0.5600126982
+ 0.5615121722
+ 0.5630118251
+ 0.5645112991
+ 0.5660107732
+ 0.5675103068
+ 0.5690099001
+ 0.5705127120
+ 0.5720220804
+ 0.5735315084
+ 0.5750408769
+ 0.5765503049
+ 0.5780596733
+ 0.5795689821
+ 0.5810825229
+ 0.5825976133
+ 0.5841127038
+ 0.5856277943
+ 0.5871428251
+ 0.5886579156
+ 0.5901730061
+ 0.5916877985
+ 0.5932027102
+ 0.5947175026
+ 0.5962324142
+ 0.5977472067
+ 0.5992619991
+ 0.6007729173
+ 0.6022800207
+ 0.6037871242
+ 0.6052942872
+ 0.6068013906
+ 0.6083084941
+ 0.6098155975
+ 0.6113082170
+ 0.6127988100
+ 0.6142895222
+ 0.6157801151
+ 0.6172707081
+ 0.6187613010
+ 0.6202476025
+ 0.6217123270
+ 0.6231769919
+ 0.6246417165
+ 0.6261065006
+ 0.6275712252
+ 0.6290358901
+ 0.6304885149
+ 0.6319180131
+ 0.6333473921
+ 0.6347767711
+ 0.6362062097
+ 0.6376355886
+ 0.6390650272
+ 0.6404792070
+ 0.6418644786
+ 0.6432499290
+ 0.6446353197
+ 0.6460205913
+ 0.6474059820
+ 0.6487913728
+ 0.6501702070
+ 0.6515042186
+ 0.6528382897
+ 0.6541723013
+ 0.6555063725
+ 0.6568403840
+ 0.6581745148
+ 0.6595085263
+ 0.6608067155
+ 0.6620839238
+ 0.6633611917
+ 0.6646384001
+ 0.6659157276
+ 0.6671929955
+ 0.6684702039
+ 0.6697474718
+ 0.6709765196
+ 0.6721935868
+ 0.6734107137
+ 0.6746279001
+ 0.6758450270
+ 0.6770620942
+ 0.6782792807
+ 0.6794964075
+ 0.6806775928
+ 0.6818333864
+ 0.6829891801
+ 0.6841449738
+ 0.6853008270
+ 0.6864566207
+ 0.6876124144
+ 0.6887682080
+ 0.6899240017
+ 0.6910231709
+ 0.6921185255
+ 0.6932137012
+ 0.6943089962
+ 0.6954041719
+ 0.6964995265
+ 0.6975947022
+ 0.6986898780
+ 0.6997851729
+ 0.7008336782
+ 0.7018709183
+ 0.7029079795
+ 0.7039451003
+ 0.7049822807
+ 0.7060194016
+ 0.7070565820
+ 0.7080937028
+ 0.7091308236
+ 0.7101591825
+ 0.7111420035
+ 0.7121248245
+ 0.7131077051
+ 0.7140905261
+ 0.7150732875
+ 0.7160561085
+ 0.7170389891
+ 0.7180218101
+ 0.7190045714
+ 0.7199873924
+ 0.7209213972
+ 0.7218546867
+ 0.7227879763
+ 0.7237213254
+ 0.7246546149
+ 0.7255879045
+ 0.7265211940
+ 0.7274544835
+ 0.7283877730
+ 0.7293211222
+ 0.7302423716
+ 0.7311316729
+ 0.7320209742
+ 0.7329102755
+ 0.7337995768
+ 0.7346888781
+ 0.7355781198
+ 0.7364674211
+ 0.7373567224
+ 0.7382460237
+ 0.7391353250
+ 0.7400234938
+ 0.7408747077
+ 0.7417259812
+ 0.7425771952
+ 0.7434284091
+ 0.7442796826
+ 0.7451308966
+ 0.7459822297
+ 0.7468333840
+ 0.7476845980
+ 0.7485358715
+ 0.7493870854
+ 0.7502294183
+ 0.7510489225
+ 0.7518684268
+ 0.7526878715
+ 0.7535073757
+ 0.7543268800
+ 0.7551463842
+ 0.7559658885
+ 0.7567853928
+ 0.7576048970
+ 0.7584244013
+ 0.7592439055
+ 0.7600615025
+ 0.7608557940
+ 0.7616500854
+ 0.7624443769
+ 0.7632387877
+ 0.7640330791
+ 0.7648273706
+ 0.7656217217
+ 0.7664160132
+ 0.7672104239
+ 0.7680047154
+ 0.7687990069
+ 0.7695932984
+ 0.7703787088
+ 0.7711545825
+ 0.7719305158
+ 0.7727065086
+ 0.7734823823
+ 0.7742583156
+ 0.7750343084
+ 0.7758101821
+ 0.7765861154
+ 0.7773621082
+ 0.7781379819
+ 0.7789139152
+ 0.7796899080
+ 0.7804589868
+ 0.7812235951
+ 0.7819883227
+ 0.7827528715
+ 0.7835174799
+ 0.7842820883
+ 0.7850466967
+ 0.7858114243
+ 0.7865759730
+ 0.7873405814
+ 0.7881051898
+ 0.7888697982
+ 0.7896345258
+ 0.7903971076
+ 0.7911577821
+ 0.7919185162
+ 0.7926793098
+ 0.7934399843
+ 0.7942007184
+ 0.7949615121
+ 0.7957221866
+ 0.7964829803
+ 0.7972437143
+ 0.7980043888
+ 0.7987651825
+ 0.7995259166
+ 0.8002882004
+ 0.8010529876
+ 0.8018177152
+ 0.8025825024
+ 0.8033472896
+ 0.8041120768
+ 0.8048768044
+ 0.8056415915
+ 0.8064063787
+ 0.8071712255
+ 0.8079360127
+ 0.8087006807
+ 0.8094655275
+ 0.8102341294
+ 0.8110113740
+ 0.8117886782
+ 0.8125661016
+ 0.8133434057
+ 0.8141207099
+ 0.8148980737
+ 0.8156753778
+ 0.8164526820
+ 0.8172299862
+ 0.8180074096
+ 0.8187847137
+ 0.8195620179
+ 0.8203489184
+ 0.8211479187
+ 0.8219469786
+ 0.8227460980
+ 0.8235452175
+ 0.8243442774
+ 0.8251432776
+ 0.8259423971
+ 0.8267415166
+ 0.8275405765
+ 0.8283395767
+ 0.8291386962
+ 0.8299378157
+ 0.8307659030
+ 0.8315964937
+ 0.8324270844
+ 0.8332576752
+ 0.8340882063
+ 0.8349187970
+ 0.8357493877
+ 0.8365799785
+ 0.8374106288
+ 0.8382411003
+ 0.8390716910
+ 0.8399022818
+ 0.8407692909
+ 0.8416411877
+ 0.8425130248
+ 0.8433849216
+ 0.8442568183
+ 0.8451285958
+ 0.8460004926
+ 0.8468723893
+ 0.8477442265
+ 0.8486161232
+ 0.8494880199
+ 0.8503803015
+ 0.8513019085
+ 0.8522233963
+ 0.8531450033
+ 0.8540664911
+ 0.8549880981
+ 0.8559095860
+ 0.8568311930
+ 0.8577526808
+ 0.8586742282
+ 0.8595957756
+ 0.8605474234
+ 0.8615226150
+ 0.8624976873
+ 0.8634728789
+ 0.8644480705
+ 0.8654232025
+ 0.8663983941
+ 0.8673735261
+ 0.8683487177
+ 0.8693237901
+ 0.8703135848
+ 0.8713365197
+ 0.8723592758
+ 0.8733820915
+ 0.8744049072
+ 0.8754277825
+ 0.8764505982
+ 0.8774734139
+ 0.8784962893
+ 0.8795191050
+ 0.8805549145
+ 0.8816024065
+ 0.8826497793
+ 0.8836972117
+ 0.8847445846
+ 0.8857920170
+ 0.8868393898
+ 0.8878868222
+ 0.8889341950
+ 0.8899816275
+ 0.8910092115
+ 0.8920364976
+ 0.8930637240
+ 0.8940910101
+ 0.8951181769
+ 0.8961455226
+ 0.8971728086
+ 0.8981999755
+ 0.8992273211
+ 0.9002348185
+ 0.9011824131
+ 0.9021301270
+ 0.9030777216
+ 0.9040253758
+ 0.9049729705
+ 0.9059206247
+ 0.9068682790
+ 0.9078158736
+ 0.9087635279
+ 0.9097111821
+ 0.9105666876
+ 0.9113819003
+ 0.9121969938
+ 0.9130122066
+ 0.9138273001
+ 0.9146425128
+ 0.9154576063
+ 0.9162728190
+ 0.9170879126
+ 0.9179031253
+ 0.9187182188
+ 0.9195333719
+ 0.9202811718
+ 0.9209386706
+ 0.9215962887
+ 0.9222537875
+ 0.9229114056
+ 0.9235690236
+ 0.9242265224
+ 0.9248840809
+ 0.9255415797
+ 0.9261991978
+ 0.9268566966
+ 0.9275143147
+ 0.9281718135
+ 0.9288293719
+ 0.9294869900
+ 0.9301112294
+ 0.9306169152
+ 0.9311227202
+ 0.9316285253
+ 0.9321342111
+ 0.9326400161
+ 0.9331458211
+ 0.9336515069
+ 0.9341573119
+ 0.9346631169
+ 0.9351688027
+ 0.9356746078
+ 0.9361804128
+ 0.9366860986
+ 0.9371919036
+ 0.9376977086
+ 0.9382033944
+ 0.9387091994
+ 0.9392150044
+ 0.9397206903
+ 0.9401693940
+ 0.9405475855
+ 0.9409257770
+ 0.9413040876
+ 0.9416822791
+ 0.9420604706
+ 0.9424387813
+ 0.9428169727
+ 0.9431952238
+ 0.9435734153
+ 0.9439517260
+ 0.9443299174
+ 0.9447081089
+ 0.9450864196
+ 0.9454646111
+ 0.9458428025
+ 0.9462211132
+ 0.9465993047
+ 0.9469774961
+ 0.9473558068
+ 0.9477339983
+ 0.9481121898
+ 0.9484903812
+ 0.9488686919
+ 0.9492468834
+ 0.9496250749
+ 0.9500024915
+ 0.9502819777
+ 0.9505615234
+ 0.9508408904
+ 0.9511203766
+ 0.9513999224
+ 0.9516794086
+ 0.9519588947
+ 0.9522383809
+ 0.9525179267
+ 0.9527974129
+ 0.9530767798
+ 0.9533563256
+ 0.9536358118
+ 0.9539152980
+ 0.9541947842
+ 0.9544742703
+ 0.9547538161
+ 0.9550331831
+ 0.9553127289
+ 0.9555922151
+ 0.9558717012
+ 0.9561511874
+ 0.9564306736
+ 0.9567102194
+ 0.9569895864
+ 0.9572690725
+ 0.9575486183
+ 0.9578281045
+ 0.9581075907
+ 0.9583870769
+ 0.9586666226
+ 0.9589459896
+ 0.9592254758
+ 0.9595050216
+ 0.9597845078
+ 0.9600471854
+ 0.9602534771
+ 0.9604598880
+ 0.9606661797
+ 0.9608724713
+ 0.9610788226
+ 0.9612851143
+ 0.9614914060
+ 0.9616976976
+ 0.9619039893
+ 0.9621102810
+ 0.9623166919
+ 0.9625229836
+ 0.9627292752
+ 0.9629356265
+ 0.9631419182
+ 0.9633482099
+ 0.9635545015
+ 0.9637607932
+ 0.9639670849
+ 0.9641734958
+ 0.9643797874
+ 0.9645860791
+ 0.9647923708
+ 0.9649987221
+ 0.9652050138
+ 0.9654113054
+ 0.9656175971
+ 0.9658238888
+ 0.9660302997
+ 0.9662365913
+ 0.9664428830
+ 0.9666491747
+ 0.9668555260
+ 0.9670618176
+ 0.9672681093
+ 0.9674744010
+ 0.9676806927
+ 0.9678869843
+ 0.9680933952
+ 0.9682996869
+ 0.9685059786
+ 0.9687122703
+ 0.9689186215
+ 0.9691249132
+ 0.9693312049
+ 0.9695374966
+ 0.9697437882
+ 0.9699501991
+ 0.9701160789
+ 0.9702693224
+ 0.9704223871
+ 0.9705755115
+ 0.9707286954
+ 0.9708818197
+ 0.9710348845
+ 0.9711880088
+ 0.9713411927
+ 0.9714943171
+ 0.9716473818
+ 0.9718006253
+ 0.9719536901
+ 0.9721068144
+ 0.9722599983
+ 0.9724131227
+ 0.9725661874
+ 0.9727193713
+ 0.9728724957
+ 0.9730256200
+ 0.9731786847
+ 0.9733319283
+ 0.9734849930
+ 0.9736381173
+ 0.9737913013
+ 0.9739444256
+ 0.9740974903
+ 0.9742506742
+ 0.9744037986
+ 0.9745569229
+ 0.9747101068
+ 0.9748631716
+ 0.9750162959
+ 0.9751694202
+ 0.9753226042
+ 0.9754757285
+ 0.9756287932
+ 0.9757819772
+ 0.9759351015
+ 0.9760882258
+ 0.9762414098
+ 0.9763944745
+ 0.9765475988
+ 0.9767007232
+ 0.9768539071
+ 0.9770069718
+ 0.9771600962
+ 0.9773132801
+ 0.9774664044
+ 0.9776195288
+ 0.9777727127
+ 0.9779257774
+ 0.9780789018
+ 0.9782320857
+ 0.9783852100
+ 0.9785382748
+ 0.9786913991
+ 0.9788445830
+ 0.9789977074
+ 0.9791507721
+ 0.9793040156
+ 0.9794570804
+ 0.9796102047
+ 0.9797633886
+ 0.9799165130
+ 0.9800521135
+ 0.9801667929
+ 0.9802814722
+ 0.9803960919
+ 0.9805107713
+ 0.9806255102
+ 0.9807401896
+ 0.9808548093
+ 0.9809694886
+ 0.9810842276
+ 0.9811989069
+ 0.9813135266
+ 0.9814282060
+ 0.9815428853
+ 0.9816575050
+ 0.9817721844
+ 0.9818869233
+ 0.9820016026
+ 0.9821162224
+ 0.9822309017
+ 0.9823455811
+ 0.9824602008
+ 0.9825748801
+ 0.9826896191
+ 0.9828042984
+ 0.9829189181
+ 0.9830335975
+ 0.9831482768
+ 0.9832628965
+ 0.9833775759
+ 0.9834923148
+ 0.9836069942
+ 0.9837216139
+ 0.9838362932
+ 0.9839509726
+ 0.9840655923
+ 0.9841802716
+ 0.9842950106
+ 0.9844096899
+ 0.9845243096
+ 0.9846389890
+ 0.9847537279
+ 0.9848682880
+ 0.9849830270
+ 0.9850977063
+ 0.9852123857
+ 0.9853270054
+ 0.9854416847
+ 0.9855564237
+ 0.9856711030
+ 0.9857857227
+ 0.9859004021
+ 0.9860150814
+ 0.9861297011
+ 0.9862443805
+ 0.9863591194
+ 0.9864737988
+ 0.9865884185
+ 0.9867030978
+ 0.9868177772
+ 0.9869323969
+ 0.9870470762
+ 0.9871618152
+ 0.9872764945
+ 0.9873911142
+ 0.9875057936
+ 0.9876204729
+ 0.9877350926
+ 0.9878497720
+ 0.9879645109
+ 0.9880791903
+ 0.9881938100
+ 0.9883084893
+ 0.9884232283
+ 0.9885377884
+ 0.9886525273
+ 0.9887672067
+ 0.9888818860
+ 0.9889965057
+ 0.9891111851
+ 0.9892259240
+ 0.9893404841
+ 0.9894552231
+ 0.9895699024
+ 0.9896845818
+ 0.9897992015
+ 0.9899138808
+ 0.9900215864
+ 0.9901083708
+ 0.9901952147
+ 0.9902818799
+ 0.9903687239
+ 0.9904555082
+ 0.9905421734
+ 0.9906290174
+ 0.9907158017
+ 0.9908025265
+ 0.9908893108
+ 0.9909760952
+ 0.9910628200
+ 0.9911496043
+ 0.9912363887
+ 0.9913231730
+ 0.9914098978
+ 0.9914966822
+ 0.9915835261
+ 0.9916701913
+ 0.9917569757
+ 0.9918438196
+ 0.9919304848
+ 0.9920173287
+ 0.9921041131
+ 0.9921907783
+ 0.9922776222
+ 0.9923644066
+ 0.9924510717
+ 0.9925379157
+ 0.9926247001
+ 0.9927114248
+ 0.9927982092
+ 0.9928849936
+ 0.9929717779
+ 0.9930585027
+ 0.9931452870
+ 0.9932320714
+ 0.9933187962
+ 0.9934055805
+ 0.9934924245
+ 0.9935790896
+ 0.9936658740
+ 0.9937527180
+ 0.9938393831
+ 0.9939262271
+ 0.9940130115
+ 0.9940996766
+ 0.9941865206
+ 0.9942733049
+ 0.9943600297
+ 0.9944468141
+ 0.9945335984
+ 0.9946203828
+ 0.9947071075
+ 0.9947938919
+ 0.9948806763
+ 0.9949674010
+ 0.9950541854
+ 0.9951410294
+ 0.9952276945
+ 0.9953144789
+ 0.9954013228
+ 0.9954879880
+ 0.9955747724
+ 0.9956616163
+ 0.9957482815
+ 0.9958351254
+ 0.9959219098
+ 0.9960085750
+ 0.9960954189
+ 0.9961822033
+ 0.9962689877
+ 0.9963557124
+ 0.9964424968
+ 0.9965292811
+ 0.9966160059
+ 0.9967027903
+ 0.9967895746
+ 0.9968762994
+ 0.9969630837
+ 0.9970499277
+ 0.9971365929
+ 0.9972233772
+ 0.9973102212
+ 0.9973968863
+ 0.9974836707
+ 0.9975705147
+ 0.9976572990
+ 0.9977440238
+ 0.9978308082
+ 0.9979175925
+ 0.9980043173
+ 0.9980911016
+ 0.9981778860
+ 0.9982646108
+ 0.9983513951
+ 0.9984381795
+ 0.9985249043
+ 0.9986116886
+ 0.9986984730
+ 0.9987851977
+ 0.9988719821
+ 0.9989588261
+ 0.9990454912
+ 0.9991322756
+ 0.9992191195
+ 0.9993059039
+ 0.9993926287
+ 0.9994794130
+ 0.9995661974
+ 0.9996529222
+ 0.9997397065
+ 0.9998264909
+ 0.9999132156
+ 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/canon_optura_981113.spi1d b/release/datafiles/colormanagement/luts/film_response/canon_optura_981113.spi1d
new file mode 100644
index 00000000000..b3ee4a4baee
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/canon_optura_981113.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 1
+{
+ 0.0000000000
+ 0.0135446005
+ 0.0202735607
+ 0.0249911100
+ 0.0297086593
+ 0.0336879417
+ 0.0376186185
+ 0.0414095595
+ 0.0449856818
+ 0.0485617891
+ 0.0520423800
+ 0.0554586984
+ 0.0588750206
+ 0.0622536913
+ 0.0656138808
+ 0.0689740628
+ 0.0723363981
+ 0.0756996870
+ 0.0790629685
+ 0.0824523792
+ 0.0858518705
+ 0.0892513692
+ 0.0926911235
+ 0.0961422473
+ 0.0995933712
+ 0.1030920967
+ 0.1065972000
+ 0.1101036966
+ 0.1136552989
+ 0.1172067970
+ 0.1207652017
+ 0.1243487000
+ 0.1279322952
+ 0.1315212995
+ 0.1351177990
+ 0.1387142986
+ 0.1423058063
+ 0.1458943933
+ 0.1494830996
+ 0.1530472934
+ 0.1566074044
+ 0.1601652950
+ 0.1636777967
+ 0.1671904027
+ 0.1706901938
+ 0.1741389930
+ 0.1775878072
+ 0.1810134947
+ 0.1843854934
+ 0.1877575070
+ 0.1911004037
+ 0.1943856031
+ 0.1976709068
+ 0.2009288967
+ 0.2041203976
+ 0.2073118985
+ 0.2104879022
+ 0.2135811001
+ 0.2166742980
+ 0.2197676003
+ 0.2227675021
+ 0.2257598937
+ 0.2287521958
+ 0.2316852063
+ 0.2345757037
+ 0.2374662012
+ 0.2403441072
+ 0.2431329042
+ 0.2459215969
+ 0.2487103939
+ 0.2514449954
+ 0.2541329861
+ 0.2568210065
+ 0.2595090866
+ 0.2621161044
+ 0.2647050917
+ 0.2672941089
+ 0.2698830068
+ 0.2723794878
+ 0.2748715878
+ 0.2773636878
+ 0.2798557878
+ 0.2822589874
+ 0.2846567929
+ 0.2870545983
+ 0.2894524038
+ 0.2917796075
+ 0.2940860093
+ 0.2963924110
+ 0.2986988127
+ 0.3009667993
+ 0.3031851053
+ 0.3054032922
+ 0.3076215982
+ 0.3098397851
+ 0.3119795024
+ 0.3141129911
+ 0.3162465096
+ 0.3183799982
+ 0.3204940856
+ 0.3225466013
+ 0.3245992064
+ 0.3266518116
+ 0.3287042975
+ 0.3307285011
+ 0.3327040076
+ 0.3346796036
+ 0.3366551101
+ 0.3386305869
+ 0.3405838013
+ 0.3424864113
+ 0.3443889916
+ 0.3462916017
+ 0.3481942117
+ 0.3500933051
+ 0.3519271910
+ 0.3537611067
+ 0.3555949926
+ 0.3574289083
+ 0.3592627943
+ 0.3610582054
+ 0.3628278077
+ 0.3645974100
+ 0.3663670123
+ 0.3681367040
+ 0.3699063063
+ 0.3716191053
+ 0.3733288050
+ 0.3750385046
+ 0.3767482042
+ 0.3784579039
+ 0.3801622093
+ 0.3818163872
+ 0.3834707141
+ 0.3851250112
+ 0.3867791891
+ 0.3884334862
+ 0.3900850117
+ 0.3916882873
+ 0.3932915032
+ 0.3948946893
+ 0.3964979947
+ 0.3981012106
+ 0.3997044861
+ 0.4012697041
+ 0.4028263986
+ 0.4043830931
+ 0.4059396982
+ 0.4074963927
+ 0.4090530872
+ 0.4105932117
+ 0.4121075869
+ 0.4136219919
+ 0.4151363969
+ 0.4166508019
+ 0.4181652069
+ 0.4196796119
+ 0.4211640060
+ 0.4226402938
+ 0.4241167009
+ 0.4255929887
+ 0.4270693958
+ 0.4285457134
+ 0.4300214946
+ 0.4314638972
+ 0.4329062998
+ 0.4343487024
+ 0.4357911050
+ 0.4372335076
+ 0.4386759102
+ 0.4401158094
+ 0.4415282011
+ 0.4429405034
+ 0.4443528950
+ 0.4457651973
+ 0.4471774995
+ 0.4485898912
+ 0.4500021935
+ 0.4513882101
+ 0.4527741969
+ 0.4541603029
+ 0.4555462897
+ 0.4569323957
+ 0.4583184123
+ 0.4597044885
+ 0.4610725939
+ 0.4624359906
+ 0.4637992978
+ 0.4651626050
+ 0.4665259123
+ 0.4678891897
+ 0.4692525864
+ 0.4706071019
+ 0.4719510078
+ 0.4732949138
+ 0.4746387899
+ 0.4759826958
+ 0.4773266017
+ 0.4786705077
+ 0.4800142050
+ 0.4813418090
+ 0.4826692939
+ 0.4839968979
+ 0.4853244126
+ 0.4866518974
+ 0.4879795015
+ 0.4893069863
+ 0.4906280935
+ 0.4919421077
+ 0.4932560027
+ 0.4945699871
+ 0.4958840013
+ 0.4971979856
+ 0.4985119104
+ 0.4998258948
+ 0.5011302829
+ 0.5024331212
+ 0.5037360191
+ 0.5050389171
+ 0.5063418150
+ 0.5076445937
+ 0.5089474916
+ 0.5102487206
+ 0.5115424991
+ 0.5128363967
+ 0.5141302943
+ 0.5154240727
+ 0.5167179704
+ 0.5180119276
+ 0.5193057060
+ 0.5205962062
+ 0.5218827128
+ 0.5231692791
+ 0.5244557858
+ 0.5257424116
+ 0.5270289779
+ 0.5283154845
+ 0.5296021104
+ 0.5308843851
+ 0.5321649909
+ 0.5334454775
+ 0.5347260237
+ 0.5360065103
+ 0.5372869968
+ 0.5385676026
+ 0.5398480892
+ 0.5411239266
+ 0.5423991084
+ 0.5436742902
+ 0.5449494720
+ 0.5462247133
+ 0.5474998951
+ 0.5487750769
+ 0.5500500798
+ 0.5513203144
+ 0.5525904298
+ 0.5538604856
+ 0.5551306009
+ 0.5564007759
+ 0.5576708913
+ 0.5589410067
+ 0.5602102280
+ 0.5614749193
+ 0.5627396107
+ 0.5640043020
+ 0.5652689934
+ 0.5665336847
+ 0.5677983761
+ 0.5690631270
+ 0.5703262091
+ 0.5715845227
+ 0.5728427768
+ 0.5741010904
+ 0.5753594041
+ 0.5766177177
+ 0.5778759718
+ 0.5791342854
+ 0.5803902149
+ 0.5816406012
+ 0.5828909874
+ 0.5841413736
+ 0.5853918195
+ 0.5866422057
+ 0.5878925920
+ 0.5891429782
+ 0.5903903246
+ 0.5916306973
+ 0.5928711295
+ 0.5941116214
+ 0.5953519940
+ 0.5965924263
+ 0.5978329182
+ 0.5990732908
+ 0.6003105044
+ 0.6015384197
+ 0.6027662754
+ 0.6039940715
+ 0.6052219868
+ 0.6064499021
+ 0.6076776981
+ 0.6089056134
+ 0.6101318002
+ 0.6113442183
+ 0.6125565171
+ 0.6137688756
+ 0.6149812937
+ 0.6161937118
+ 0.6174060702
+ 0.6186184883
+ 0.6198309064
+ 0.6210271716
+ 0.6222209930
+ 0.6234146953
+ 0.6246085167
+ 0.6258022189
+ 0.6269959807
+ 0.6281896830
+ 0.6293835044
+ 0.6305665970
+ 0.6317384839
+ 0.6329103708
+ 0.6340823174
+ 0.6352540851
+ 0.6364259720
+ 0.6375979185
+ 0.6387698054
+ 0.6399416924
+ 0.6410897970
+ 0.6422367096
+ 0.6433836222
+ 0.6445304751
+ 0.6456773281
+ 0.6468241811
+ 0.6479710937
+ 0.6491180062
+ 0.6502584815
+ 0.6513776183
+ 0.6524966955
+ 0.6536157131
+ 0.6547347903
+ 0.6558539271
+ 0.6569730043
+ 0.6580920815
+ 0.6592112184
+ 0.6603214145
+ 0.6614102721
+ 0.6624991894
+ 0.6635881066
+ 0.6646770239
+ 0.6657658815
+ 0.6668547988
+ 0.6679437160
+ 0.6690325737
+ 0.6701179743
+ 0.6711750031
+ 0.6722319126
+ 0.6732888818
+ 0.6743459105
+ 0.6754028797
+ 0.6764597893
+ 0.6775168180
+ 0.6785737872
+ 0.6796308160
+ 0.6806663275
+ 0.6816902161
+ 0.6827141047
+ 0.6837379932
+ 0.6847618818
+ 0.6857857704
+ 0.6868097186
+ 0.6878336072
+ 0.6888574958
+ 0.6898815036
+ 0.6908758283
+ 0.6918662190
+ 0.6928567290
+ 0.6938471198
+ 0.6948375106
+ 0.6958280206
+ 0.6968184114
+ 0.6978089213
+ 0.6987993121
+ 0.6997897029
+ 0.7007541060
+ 0.7017112970
+ 0.7026686072
+ 0.7036259174
+ 0.7045832276
+ 0.7055404782
+ 0.7064977884
+ 0.7074550986
+ 0.7084122896
+ 0.7093695998
+ 0.7103158832
+ 0.7112410069
+ 0.7121660709
+ 0.7130911946
+ 0.7140163183
+ 0.7149413824
+ 0.7158665061
+ 0.7167915106
+ 0.7177165747
+ 0.7186416984
+ 0.7195668221
+ 0.7204756141
+ 0.7213701010
+ 0.7222645879
+ 0.7231590748
+ 0.7240536213
+ 0.7249481082
+ 0.7258424759
+ 0.7267370224
+ 0.7276315093
+ 0.7285259962
+ 0.7294204831
+ 0.7303048968
+ 0.7311708927
+ 0.7320368886
+ 0.7329028845
+ 0.7337688208
+ 0.7346348166
+ 0.7355008125
+ 0.7363668084
+ 0.7372328043
+ 0.7380986810
+ 0.7389646769
+ 0.7398306727
+ 0.7406758070
+ 0.7415158749
+ 0.7423558831
+ 0.7431960106
+ 0.7440360188
+ 0.7448760867
+ 0.7457160950
+ 0.7465562224
+ 0.7473961711
+ 0.7482362986
+ 0.7490763068
+ 0.7499163747
+ 0.7507357001
+ 0.7515528202
+ 0.7523698211
+ 0.7531868219
+ 0.7540038824
+ 0.7548208833
+ 0.7556380033
+ 0.7564550042
+ 0.7572721243
+ 0.7580891252
+ 0.7589061260
+ 0.7597231865
+ 0.7605271935
+ 0.7613244057
+ 0.7621216774
+ 0.7629190087
+ 0.7637162805
+ 0.7645134926
+ 0.7653108239
+ 0.7661080956
+ 0.7669054270
+ 0.7677025795
+ 0.7684999108
+ 0.7692971826
+ 0.7700924873
+ 0.7708734870
+ 0.7716544271
+ 0.7724353075
+ 0.7732163072
+ 0.7739971876
+ 0.7747781873
+ 0.7755591273
+ 0.7763401270
+ 0.7771210074
+ 0.7779018879
+ 0.7786828876
+ 0.7794638276
+ 0.7802407742
+ 0.7810090184
+ 0.7817772031
+ 0.7825455070
+ 0.7833136916
+ 0.7840818763
+ 0.7848501801
+ 0.7856184244
+ 0.7863866091
+ 0.7871549129
+ 0.7879230976
+ 0.7886912823
+ 0.7894595265
+ 0.7902250886
+ 0.7909842730
+ 0.7917435169
+ 0.7925027013
+ 0.7932620049
+ 0.7940211892
+ 0.7947803736
+ 0.7955396175
+ 0.7962988019
+ 0.7970579863
+ 0.7978171706
+ 0.7985764742
+ 0.7993357182
+ 0.8000941873
+ 0.8008481264
+ 0.8016020060
+ 0.8023558855
+ 0.8031098247
+ 0.8038637042
+ 0.8046175838
+ 0.8053714037
+ 0.8061252832
+ 0.8068792224
+ 0.8076331019
+ 0.8083869815
+ 0.8091409206
+ 0.8098948002
+ 0.8106470704
+ 0.8113992214
+ 0.8121513724
+ 0.8129035234
+ 0.8136556149
+ 0.8144077063
+ 0.8151597977
+ 0.8159118891
+ 0.8166639805
+ 0.8174160719
+ 0.8181682825
+ 0.8189203739
+ 0.8196725249
+ 0.8204253912
+ 0.8211789131
+ 0.8219323754
+ 0.8226860166
+ 0.8234394789
+ 0.8241930008
+ 0.8249465227
+ 0.8257001042
+ 0.8264536262
+ 0.8272070885
+ 0.8279606104
+ 0.8287141919
+ 0.8294677138
+ 0.8302224278
+ 0.8309798241
+ 0.8317372799
+ 0.8324947953
+ 0.8332523108
+ 0.8340097070
+ 0.8347672224
+ 0.8355246782
+ 0.8362820745
+ 0.8370395899
+ 0.8377971053
+ 0.8385546207
+ 0.8393120170
+ 0.8400700092
+ 0.8408328295
+ 0.8415954709
+ 0.8423582911
+ 0.8431211114
+ 0.8438838720
+ 0.8446465731
+ 0.8454093933
+ 0.8461722136
+ 0.8469349146
+ 0.8476976752
+ 0.8484604955
+ 0.8492233157
+ 0.8499860168
+ 0.8507534862
+ 0.8515210152
+ 0.8522886038
+ 0.8530561924
+ 0.8538237214
+ 0.8545913100
+ 0.8553587794
+ 0.8561264277
+ 0.8568938971
+ 0.8576614857
+ 0.8584290147
+ 0.8591966033
+ 0.8599640727
+ 0.8607330918
+ 0.8615021706
+ 0.8622711897
+ 0.8630402088
+ 0.8638092875
+ 0.8645783067
+ 0.8653473854
+ 0.8661164045
+ 0.8668854833
+ 0.8676545024
+ 0.8684235215
+ 0.8691926003
+ 0.8699616194
+ 0.8707253933
+ 0.8714889288
+ 0.8722524047
+ 0.8730158806
+ 0.8737794161
+ 0.8745428920
+ 0.8753064871
+ 0.8760700226
+ 0.8768334985
+ 0.8775969744
+ 0.8783605099
+ 0.8791239858
+ 0.8798875213
+ 0.8806365728
+ 0.8813831210
+ 0.8821297288
+ 0.8828762770
+ 0.8836228848
+ 0.8843694925
+ 0.8851159811
+ 0.8858625889
+ 0.8866091967
+ 0.8873558044
+ 0.8881024122
+ 0.8888489008
+ 0.8895955086
+ 0.8903272748
+ 0.8910415769
+ 0.8917558193
+ 0.8924701214
+ 0.8931844234
+ 0.8938987255
+ 0.8946129084
+ 0.8953272104
+ 0.8960415125
+ 0.8967556953
+ 0.8974699974
+ 0.8981842995
+ 0.8988986015
+ 0.8996127844
+ 0.9003043175
+ 0.9009687901
+ 0.9016332030
+ 0.9022976756
+ 0.9029622078
+ 0.9036266804
+ 0.9042910933
+ 0.9049556255
+ 0.9056200981
+ 0.9062845707
+ 0.9069489837
+ 0.9076135159
+ 0.9082779884
+ 0.9089424014
+ 0.9096068740
+ 0.9102444053
+ 0.9108428955
+ 0.9114415050
+ 0.9120399952
+ 0.9126384854
+ 0.9132369757
+ 0.9138355255
+ 0.9144340158
+ 0.9150325060
+ 0.9156309962
+ 0.9162294865
+ 0.9168279767
+ 0.9174265265
+ 0.9180250168
+ 0.9186235070
+ 0.9192219973
+ 0.9198204875
+ 0.9203649759
+ 0.9208863974
+ 0.9214078188
+ 0.9219291210
+ 0.9224504828
+ 0.9229717851
+ 0.9234932065
+ 0.9240146279
+ 0.9245358706
+ 0.9250572920
+ 0.9255785942
+ 0.9261000156
+ 0.9266213775
+ 0.9271426797
+ 0.9276641011
+ 0.9281855226
+ 0.9287068248
+ 0.9292281866
+ 0.9297494888
+ 0.9302288294
+ 0.9306690097
+ 0.9311093092
+ 0.9315496087
+ 0.9319899082
+ 0.9324302077
+ 0.9328703880
+ 0.9333106875
+ 0.9337509871
+ 0.9341912866
+ 0.9346315861
+ 0.9350718260
+ 0.9355121255
+ 0.9359524250
+ 0.9363927245
+ 0.9368330240
+ 0.9372732043
+ 0.9377135038
+ 0.9381538033
+ 0.9385941029
+ 0.9390344024
+ 0.9394745827
+ 0.9399148822
+ 0.9402922988
+ 0.9406545758
+ 0.9410169125
+ 0.9413791895
+ 0.9417415261
+ 0.9421038032
+ 0.9424660802
+ 0.9428284168
+ 0.9431906939
+ 0.9435529709
+ 0.9439153075
+ 0.9442775846
+ 0.9446399212
+ 0.9450021982
+ 0.9453645945
+ 0.9457268715
+ 0.9460892081
+ 0.9464514852
+ 0.9468138218
+ 0.9471760988
+ 0.9475383759
+ 0.9479007125
+ 0.9482629895
+ 0.9486253262
+ 0.9489876032
+ 0.9493498802
+ 0.9497122169
+ 0.9500601292
+ 0.9503526092
+ 0.9506450295
+ 0.9509373903
+ 0.9512298107
+ 0.9515222907
+ 0.9518147111
+ 0.9521070719
+ 0.9523994923
+ 0.9526919723
+ 0.9529843926
+ 0.9532768130
+ 0.9535691738
+ 0.9538617134
+ 0.9541540742
+ 0.9544464946
+ 0.9547389150
+ 0.9550313950
+ 0.9553238153
+ 0.9556161761
+ 0.9559085965
+ 0.9562010765
+ 0.9564934969
+ 0.9567859173
+ 0.9570782781
+ 0.9573706985
+ 0.9576631784
+ 0.9579555988
+ 0.9582480192
+ 0.9585403800
+ 0.9588329196
+ 0.9591252804
+ 0.9594177008
+ 0.9597101212
+ 0.9600020051
+ 0.9602351189
+ 0.9604681134
+ 0.9607011080
+ 0.9609341025
+ 0.9611670971
+ 0.9614000916
+ 0.9616330862
+ 0.9618662000
+ 0.9620991945
+ 0.9623321891
+ 0.9625651836
+ 0.9627981782
+ 0.9630311728
+ 0.9632642269
+ 0.9634972811
+ 0.9637302756
+ 0.9639633298
+ 0.9641963243
+ 0.9644293189
+ 0.9646623135
+ 0.9648953080
+ 0.9651284218
+ 0.9653614163
+ 0.9655944109
+ 0.9658274055
+ 0.9660604000
+ 0.9662933946
+ 0.9665263891
+ 0.9667595029
+ 0.9669924974
+ 0.9672254920
+ 0.9674584866
+ 0.9676914811
+ 0.9679244757
+ 0.9681574702
+ 0.9683905840
+ 0.9686235785
+ 0.9688565731
+ 0.9690896273
+ 0.9693226218
+ 0.9695556164
+ 0.9697886109
+ 0.9700170755
+ 0.9702014923
+ 0.9703857899
+ 0.9705702066
+ 0.9707545042
+ 0.9709389210
+ 0.9711232185
+ 0.9713075757
+ 0.9714918733
+ 0.9716762900
+ 0.9718605876
+ 0.9720450044
+ 0.9722293019
+ 0.9724137187
+ 0.9725980163
+ 0.9727823734
+ 0.9729666710
+ 0.9731510878
+ 0.9733353853
+ 0.9735198021
+ 0.9737040997
+ 0.9738885164
+ 0.9740728140
+ 0.9742571712
+ 0.9744415283
+ 0.9746258855
+ 0.9748101830
+ 0.9749945998
+ 0.9751788974
+ 0.9753633142
+ 0.9755476117
+ 0.9757320285
+ 0.9759163260
+ 0.9761006236
+ 0.9762849808
+ 0.9764692783
+ 0.9766536951
+ 0.9768379927
+ 0.9770224094
+ 0.9772067070
+ 0.9773911238
+ 0.9775754213
+ 0.9777597785
+ 0.9779440761
+ 0.9781284928
+ 0.9783127904
+ 0.9784972072
+ 0.9786815047
+ 0.9788659215
+ 0.9790502191
+ 0.9792345762
+ 0.9794188738
+ 0.9796032906
+ 0.9797875881
+ 0.9799720049
+ 0.9801232815
+ 0.9802687764
+ 0.9804142118
+ 0.9805597067
+ 0.9807050824
+ 0.9808505774
+ 0.9809960127
+ 0.9811415076
+ 0.9812868834
+ 0.9814323783
+ 0.9815778136
+ 0.9817233086
+ 0.9818686843
+ 0.9820141792
+ 0.9821596146
+ 0.9823051095
+ 0.9824504852
+ 0.9825959802
+ 0.9827414155
+ 0.9828869104
+ 0.9830322862
+ 0.9831777811
+ 0.9833232164
+ 0.9834687114
+ 0.9836140871
+ 0.9837595820
+ 0.9839050174
+ 0.9840505123
+ 0.9841958880
+ 0.9843413830
+ 0.9844868183
+ 0.9846323133
+ 0.9847776890
+ 0.9849231839
+ 0.9850686193
+ 0.9852141142
+ 0.9853594899
+ 0.9855049849
+ 0.9856504202
+ 0.9857959151
+ 0.9859412909
+ 0.9860867858
+ 0.9862322211
+ 0.9863777161
+ 0.9865230918
+ 0.9866685867
+ 0.9868140221
+ 0.9869595170
+ 0.9871048927
+ 0.9872503877
+ 0.9873958230
+ 0.9875413179
+ 0.9876866937
+ 0.9878321886
+ 0.9879776239
+ 0.9881231189
+ 0.9882684946
+ 0.9884139895
+ 0.9885594249
+ 0.9887049198
+ 0.9888502955
+ 0.9889957905
+ 0.9891412258
+ 0.9892867208
+ 0.9894320965
+ 0.9895775914
+ 0.9897230864
+ 0.9898685217
+ 0.9900109768
+ 0.9901257753
+ 0.9902405739
+ 0.9903554916
+ 0.9904702902
+ 0.9905850887
+ 0.9906998873
+ 0.9908146858
+ 0.9909294844
+ 0.9910444021
+ 0.9911592007
+ 0.9912739992
+ 0.9913887978
+ 0.9915035963
+ 0.9916183949
+ 0.9917333126
+ 0.9918481112
+ 0.9919629097
+ 0.9920777082
+ 0.9921925068
+ 0.9923073053
+ 0.9924221039
+ 0.9925370216
+ 0.9926518202
+ 0.9927666187
+ 0.9928814173
+ 0.9929962158
+ 0.9931110144
+ 0.9932258725
+ 0.9933406711
+ 0.9934555292
+ 0.9935703278
+ 0.9936851263
+ 0.9937999249
+ 0.9939147830
+ 0.9940295815
+ 0.9941443801
+ 0.9942591786
+ 0.9943739772
+ 0.9944887757
+ 0.9946036935
+ 0.9947184920
+ 0.9948332906
+ 0.9949480891
+ 0.9950628877
+ 0.9951776862
+ 0.9952924848
+ 0.9954074025
+ 0.9955222011
+ 0.9956369996
+ 0.9957517982
+ 0.9958665967
+ 0.9959813952
+ 0.9960963130
+ 0.9962111115
+ 0.9963259101
+ 0.9964407086
+ 0.9965555072
+ 0.9966703057
+ 0.9967852235
+ 0.9969000220
+ 0.9970148206
+ 0.9971296191
+ 0.9972444177
+ 0.9973592162
+ 0.9974740148
+ 0.9975888729
+ 0.9977036715
+ 0.9978185296
+ 0.9979333282
+ 0.9980481267
+ 0.9981629252
+ 0.9982777834
+ 0.9983925819
+ 0.9985073805
+ 0.9986221790
+ 0.9987369776
+ 0.9988517761
+ 0.9989666939
+ 0.9990814924
+ 0.9991962910
+ 0.9993110895
+ 0.9994258881
+ 0.9995406866
+ 0.9996556044
+ 0.9997704029
+ 0.9998852015
+ 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/canon_optura_981114.spi1d b/release/datafiles/colormanagement/luts/film_response/canon_optura_981114.spi1d
new file mode 100644
index 00000000000..477d237a032
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/canon_optura_981114.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 1
+{
+ 0.0000000000
+ 0.0011549980
+ 0.0023099950
+ 0.0034649931
+ 0.0046199900
+ 0.0057749879
+ 0.0069299862
+ 0.0080849826
+ 0.0092399810
+ 0.0104988897
+ 0.0119577302
+ 0.0134165697
+ 0.0148754101
+ 0.0163342599
+ 0.0177931003
+ 0.0192519408
+ 0.0208822303
+ 0.0226929598
+ 0.0245036893
+ 0.0263144094
+ 0.0281251408
+ 0.0299358703
+ 0.0321105719
+ 0.0342986286
+ 0.0364867002
+ 0.0386747718
+ 0.0410060883
+ 0.0435574502
+ 0.0461088084
+ 0.0486601703
+ 0.0513551086
+ 0.0542088412
+ 0.0570625700
+ 0.0599162988
+ 0.0629694685
+ 0.0660286620
+ 0.0690878481
+ 0.0722158924
+ 0.0753731802
+ 0.0785304680
+ 0.0816907808
+ 0.0848537087
+ 0.0880166367
+ 0.0911577269
+ 0.0942621008
+ 0.0973664671
+ 0.1004566029
+ 0.1034670025
+ 0.1064774022
+ 0.1094878018
+ 0.1124091968
+ 0.1153123975
+ 0.1182155982
+ 0.1210779995
+ 0.1238754019
+ 0.1266727000
+ 0.1294700056
+ 0.1321890950
+ 0.1348897964
+ 0.1375904977
+ 0.1402821988
+ 0.1428993046
+ 0.1455163062
+ 0.1481333971
+ 0.1507305056
+ 0.1532779038
+ 0.1558253020
+ 0.1583727002
+ 0.1608998030
+ 0.1633909047
+ 0.1658820063
+ 0.1683731973
+ 0.1708489954
+ 0.1732959002
+ 0.1757428944
+ 0.1781897992
+ 0.1806280017
+ 0.1830410063
+ 0.1854541004
+ 0.1878671944
+ 0.1902772933
+ 0.1926648021
+ 0.1950524002
+ 0.1974398941
+ 0.1998274028
+ 0.2021971047
+ 0.2045654058
+ 0.2069337070
+ 0.2093019933
+ 0.2116595954
+ 0.2140129060
+ 0.2163662016
+ 0.2187193930
+ 0.2210668027
+ 0.2234072983
+ 0.2257477045
+ 0.2280880958
+ 0.2304262072
+ 0.2327540070
+ 0.2350818068
+ 0.2374096066
+ 0.2397374958
+ 0.2420527041
+ 0.2443664074
+ 0.2466800958
+ 0.2489937991
+ 0.2512977123
+ 0.2535941005
+ 0.2558904886
+ 0.2581869066
+ 0.2604787052
+ 0.2627533972
+ 0.2650280893
+ 0.2673028111
+ 0.2695775032
+ 0.2718302011
+ 0.2740780115
+ 0.2763257027
+ 0.2785733938
+ 0.2808091044
+ 0.2830238938
+ 0.2852387130
+ 0.2874535024
+ 0.2896682024
+ 0.2918500006
+ 0.2940258980
+ 0.2962017953
+ 0.2983776927
+ 0.3005422950
+ 0.3026734889
+ 0.3048047125
+ 0.3069359958
+ 0.3090671897
+ 0.3111704886
+ 0.3132519126
+ 0.3153333068
+ 0.3174147904
+ 0.3194962144
+ 0.3215366006
+ 0.3235639036
+ 0.3255912066
+ 0.3276185095
+ 0.3296456933
+ 0.3316256106
+ 0.3335955143
+ 0.3355652988
+ 0.3375352025
+ 0.3395051062
+ 0.3414301872
+ 0.3433403969
+ 0.3452506065
+ 0.3471607864
+ 0.3490709960
+ 0.3509500921
+ 0.3527995944
+ 0.3546490967
+ 0.3564985991
+ 0.3583481908
+ 0.3601911962
+ 0.3619799018
+ 0.3637686074
+ 0.3655573130
+ 0.3673459888
+ 0.3691348135
+ 0.3708924949
+ 0.3726212978
+ 0.3743501008
+ 0.3760789037
+ 0.3778077066
+ 0.3795365095
+ 0.3812226951
+ 0.3828932047
+ 0.3845637143
+ 0.3862341940
+ 0.3879047036
+ 0.3895752132
+ 0.3912039101
+ 0.3928183019
+ 0.3944328129
+ 0.3960472047
+ 0.3976615965
+ 0.3992759883
+ 0.4008611143
+ 0.4024221897
+ 0.4039832950
+ 0.4055444002
+ 0.4071055949
+ 0.4086667001
+ 0.4102205038
+ 0.4117313921
+ 0.4132421911
+ 0.4147531092
+ 0.4162639976
+ 0.4177747965
+ 0.4192857146
+ 0.4207718074
+ 0.4222356975
+ 0.4236997068
+ 0.4251635969
+ 0.4266274869
+ 0.4280914068
+ 0.4295552969
+ 0.4309889078
+ 0.4324092865
+ 0.4338296950
+ 0.4352501035
+ 0.4366703928
+ 0.4380908012
+ 0.4395112097
+ 0.4409053028
+ 0.4422855079
+ 0.4436658025
+ 0.4450460970
+ 0.4464263916
+ 0.4478066862
+ 0.4491870105
+ 0.4505521953
+ 0.4518958032
+ 0.4532394111
+ 0.4545829892
+ 0.4559265971
+ 0.4572702050
+ 0.4586139023
+ 0.4599575102
+ 0.4612688124
+ 0.4625791907
+ 0.4638895094
+ 0.4651997983
+ 0.4665100873
+ 0.4678204060
+ 0.4691306949
+ 0.4704309106
+ 0.4717111886
+ 0.4729914069
+ 0.4742717147
+ 0.4755519032
+ 0.4768322110
+ 0.4781123996
+ 0.4793927073
+ 0.4806587100
+ 0.4819119871
+ 0.4831652939
+ 0.4844186008
+ 0.4856719077
+ 0.4869252145
+ 0.4881784916
+ 0.4894317091
+ 0.4906719029
+ 0.4919010997
+ 0.4931303859
+ 0.4943596125
+ 0.4955888987
+ 0.4968182147
+ 0.4980474114
+ 0.4992766976
+ 0.5004972219
+ 0.5017052293
+ 0.5029131770
+ 0.5041211247
+ 0.5053290725
+ 0.5065370798
+ 0.5077450871
+ 0.5089530945
+ 0.5101585984
+ 0.5113480091
+ 0.5125373006
+ 0.5137265921
+ 0.5149158835
+ 0.5161052942
+ 0.5172945857
+ 0.5184838772
+ 0.5196732879
+ 0.5208507776
+ 0.5220239162
+ 0.5231968760
+ 0.5243700147
+ 0.5255430937
+ 0.5267161727
+ 0.5278891921
+ 0.5290622711
+ 0.5302324891
+ 0.5313915014
+ 0.5325505733
+ 0.5337095857
+ 0.5348685980
+ 0.5360276103
+ 0.5371866226
+ 0.5383455753
+ 0.5395045877
+ 0.5406568050
+ 0.5418037772
+ 0.5429506898
+ 0.5440977216
+ 0.5452446938
+ 0.5463917255
+ 0.5475386977
+ 0.5486857295
+ 0.5498327017
+ 0.5509709120
+ 0.5521076918
+ 0.5532444715
+ 0.5543813109
+ 0.5555180907
+ 0.5566548705
+ 0.5577917099
+ 0.5589284897
+ 0.5600647926
+ 0.5611929893
+ 0.5623211861
+ 0.5634493828
+ 0.5645775795
+ 0.5657057762
+ 0.5668339729
+ 0.5679622293
+ 0.5690904260
+ 0.5702171922
+ 0.5713382959
+ 0.5724593997
+ 0.5735803843
+ 0.5747014880
+ 0.5758225918
+ 0.5769436955
+ 0.5780646801
+ 0.5791857839
+ 0.5803052783
+ 0.5814204812
+ 0.5825356245
+ 0.5836508274
+ 0.5847659707
+ 0.5858811736
+ 0.5869963765
+ 0.5881115794
+ 0.5892267823
+ 0.5903404951
+ 0.5914508104
+ 0.5925611258
+ 0.5936715007
+ 0.5947818160
+ 0.5958921909
+ 0.5970025063
+ 0.5981128812
+ 0.5992231965
+ 0.6003323793
+ 0.6014387012
+ 0.6025450826
+ 0.6036515236
+ 0.6047579050
+ 0.6058642268
+ 0.6069706082
+ 0.6080769897
+ 0.6091833115
+ 0.6102889180
+ 0.6113919020
+ 0.6124950051
+ 0.6135979891
+ 0.6147010922
+ 0.6158041954
+ 0.6169071794
+ 0.6180102825
+ 0.6191133857
+ 0.6202158928
+ 0.6213160753
+ 0.6224163771
+ 0.6235166788
+ 0.6246169209
+ 0.6257172227
+ 0.6268175244
+ 0.6279177070
+ 0.6290180087
+ 0.6301180124
+ 0.6312158108
+ 0.6323136091
+ 0.6334114075
+ 0.6345092058
+ 0.6356070042
+ 0.6367048025
+ 0.6378026009
+ 0.6389003992
+ 0.6399981976
+ 0.6410936117
+ 0.6421890855
+ 0.6432846189
+ 0.6443799734
+ 0.6454755068
+ 0.6465709805
+ 0.6476663947
+ 0.6487619281
+ 0.6498574018
+ 0.6509507895
+ 0.6520439982
+ 0.6531370878
+ 0.6542302966
+ 0.6553233862
+ 0.6564165950
+ 0.6575096846
+ 0.6586028934
+ 0.6596959829
+ 0.6607874036
+ 0.6618781090
+ 0.6629688740
+ 0.6640595794
+ 0.6651502848
+ 0.6662409902
+ 0.6673316956
+ 0.6684224010
+ 0.6695131063
+ 0.6706023216
+ 0.6716902852
+ 0.6727783084
+ 0.6738662720
+ 0.6749542952
+ 0.6760423779
+ 0.6771304011
+ 0.6782184243
+ 0.6793063879
+ 0.6803932190
+ 0.6814782023
+ 0.6825631261
+ 0.6836479902
+ 0.6847329140
+ 0.6858178973
+ 0.6869028211
+ 0.6879876852
+ 0.6890726089
+ 0.6901569963
+ 0.6912384033
+ 0.6923196912
+ 0.6934009790
+ 0.6944823861
+ 0.6955636740
+ 0.6966450214
+ 0.6977263093
+ 0.6988077164
+ 0.6998890042
+ 0.7009665966
+ 0.7020437121
+ 0.7031208873
+ 0.7041980028
+ 0.7052751780
+ 0.7063522935
+ 0.7074295282
+ 0.7085065842
+ 0.7095838189
+ 0.7106578946
+ 0.7117301822
+ 0.7128025293
+ 0.7138748169
+ 0.7149469852
+ 0.7160192728
+ 0.7170916200
+ 0.7181639075
+ 0.7192360759
+ 0.7203068137
+ 0.7213733792
+ 0.7224400043
+ 0.7235066295
+ 0.7245730758
+ 0.7256397009
+ 0.7267063260
+ 0.7277728915
+ 0.7288395166
+ 0.7299060822
+ 0.7309666276
+ 0.7320265770
+ 0.7330865860
+ 0.7341464758
+ 0.7352064848
+ 0.7362664938
+ 0.7373265028
+ 0.7383863926
+ 0.7394464016
+ 0.7405027151
+ 0.7415549159
+ 0.7426071763
+ 0.7436593771
+ 0.7447115779
+ 0.7457638979
+ 0.7468160987
+ 0.7478684187
+ 0.7489206195
+ 0.7499728203
+ 0.7510163188
+ 0.7520595193
+ 0.7531027794
+ 0.7541459799
+ 0.7551891804
+ 0.7562325001
+ 0.7572757006
+ 0.7583189011
+ 0.7593622208
+ 0.7604013085
+ 0.7614340186
+ 0.7624667287
+ 0.7634993792
+ 0.7645320892
+ 0.7655647993
+ 0.7665975094
+ 0.7676302195
+ 0.7686629295
+ 0.7696955800
+ 0.7707195878
+ 0.7717399001
+ 0.7727602124
+ 0.7737805247
+ 0.7748007774
+ 0.7758212090
+ 0.7768415213
+ 0.7778617740
+ 0.7788820863
+ 0.7799023986
+ 0.7809095979
+ 0.7819153070
+ 0.7829210758
+ 0.7839267850
+ 0.7849326134
+ 0.7859383225
+ 0.7869439721
+ 0.7879498005
+ 0.7889555097
+ 0.7899612784
+ 0.7909504771
+ 0.7919390202
+ 0.7929275036
+ 0.7939161062
+ 0.7949045897
+ 0.7958930731
+ 0.7968816757
+ 0.7978702188
+ 0.7988587022
+ 0.7998473048
+ 0.8008186221
+ 0.8017867804
+ 0.8027549982
+ 0.8037232161
+ 0.8046914935
+ 0.8056597114
+ 0.8066279292
+ 0.8075960875
+ 0.8085643053
+ 0.8095325232
+ 0.8104882836
+ 0.8114324808
+ 0.8123767972
+ 0.8133209944
+ 0.8142651916
+ 0.8152093887
+ 0.8161537051
+ 0.8170979023
+ 0.8180420995
+ 0.8189862967
+ 0.8199306130
+ 0.8208488226
+ 0.8217648864
+ 0.8226810098
+ 0.8235970736
+ 0.8245131969
+ 0.8254293203
+ 0.8263453841
+ 0.8272615075
+ 0.8281775713
+ 0.8290936947
+ 0.8300095201
+ 0.8308929205
+ 0.8317763209
+ 0.8326597214
+ 0.8335431218
+ 0.8344264030
+ 0.8353098035
+ 0.8361932039
+ 0.8370766044
+ 0.8379600048
+ 0.8388434052
+ 0.8397268057
+ 0.8405842185
+ 0.8414300084
+ 0.8422756791
+ 0.8431215286
+ 0.8439673185
+ 0.8448129892
+ 0.8456587791
+ 0.8465046287
+ 0.8473502994
+ 0.8481960893
+ 0.8490418792
+ 0.8498876095
+ 0.8506965041
+ 0.8514996767
+ 0.8523029089
+ 0.8531060815
+ 0.8539093137
+ 0.8547124267
+ 0.8555155993
+ 0.8563187718
+ 0.8571220040
+ 0.8579251766
+ 0.8587284088
+ 0.8595315814
+ 0.8603150249
+ 0.8610708714
+ 0.8618267775
+ 0.8625826240
+ 0.8633384705
+ 0.8640943170
+ 0.8648502231
+ 0.8656061292
+ 0.8663619161
+ 0.8671178222
+ 0.8678736091
+ 0.8686295152
+ 0.8693854213
+ 0.8701316118
+ 0.8708360195
+ 0.8715404272
+ 0.8722447157
+ 0.8729491234
+ 0.8736534715
+ 0.8743578196
+ 0.8750622272
+ 0.8757665753
+ 0.8764709830
+ 0.8771752715
+ 0.8778796792
+ 0.8785840869
+ 0.8792883754
+ 0.8799927831
+ 0.8806430101
+ 0.8812925816
+ 0.8819422126
+ 0.8825919032
+ 0.8832414746
+ 0.8838911057
+ 0.8845406771
+ 0.8851904273
+ 0.8858399987
+ 0.8864896297
+ 0.8871392012
+ 0.8877888918
+ 0.8884385228
+ 0.8890880942
+ 0.8897377253
+ 0.8903535008
+ 0.8909463286
+ 0.8915392160
+ 0.8921319842
+ 0.8927248120
+ 0.8933175802
+ 0.8939105272
+ 0.8945032954
+ 0.8950961232
+ 0.8956890106
+ 0.8962817788
+ 0.8968746066
+ 0.8974674940
+ 0.8980603218
+ 0.8986530900
+ 0.8992459178
+ 0.8998388052
+ 0.9003897905
+ 0.9009250998
+ 0.9014605284
+ 0.9019957781
+ 0.9025312066
+ 0.9030665755
+ 0.9036018848
+ 0.9041373134
+ 0.9046726227
+ 0.9052079916
+ 0.9057434201
+ 0.9062787294
+ 0.9068140984
+ 0.9073494077
+ 0.9078847766
+ 0.9084202051
+ 0.9089555144
+ 0.9094908834
+ 0.9100235105
+ 0.9105020761
+ 0.9109807014
+ 0.9114593863
+ 0.9119380116
+ 0.9124165773
+ 0.9128953218
+ 0.9133738875
+ 0.9138525128
+ 0.9143311977
+ 0.9148098230
+ 0.9152883887
+ 0.9157670736
+ 0.9162456989
+ 0.9167243242
+ 0.9172030091
+ 0.9176815748
+ 0.9181602001
+ 0.9186388850
+ 0.9191175103
+ 0.9195960760
+ 0.9200661778
+ 0.9204902053
+ 0.9209141135
+ 0.9213380814
+ 0.9217619896
+ 0.9221860170
+ 0.9226099253
+ 0.9230338931
+ 0.9234578013
+ 0.9238818288
+ 0.9243056774
+ 0.9247297049
+ 0.9251536131
+ 0.9255775213
+ 0.9260014892
+ 0.9264253974
+ 0.9268494248
+ 0.9272732735
+ 0.9276973009
+ 0.9281212091
+ 0.9285451770
+ 0.9289690852
+ 0.9293931127
+ 0.9298170209
+ 0.9302117229
+ 0.9305840731
+ 0.9309564829
+ 0.9313287735
+ 0.9317011833
+ 0.9320735931
+ 0.9324460030
+ 0.9328184128
+ 0.9331908226
+ 0.9335631728
+ 0.9339355826
+ 0.9343079925
+ 0.9346802831
+ 0.9350526929
+ 0.9354251027
+ 0.9357975125
+ 0.9361699224
+ 0.9365422726
+ 0.9369146824
+ 0.9372870922
+ 0.9376595020
+ 0.9380317926
+ 0.9384042025
+ 0.9387766123
+ 0.9391490221
+ 0.9395213723
+ 0.9398937821
+ 0.9402320981
+ 0.9405568838
+ 0.9408816099
+ 0.9412062764
+ 0.9415311217
+ 0.9418557882
+ 0.9421805739
+ 0.9425053000
+ 0.9428300858
+ 0.9431548119
+ 0.9434794784
+ 0.9438043237
+ 0.9441289902
+ 0.9444537759
+ 0.9447785020
+ 0.9451032877
+ 0.9454280138
+ 0.9457526803
+ 0.9460775256
+ 0.9464021921
+ 0.9467269778
+ 0.9470517039
+ 0.9473763704
+ 0.9477012157
+ 0.9480258822
+ 0.9483507276
+ 0.9486753941
+ 0.9490001798
+ 0.9493249059
+ 0.9496495724
+ 0.9499744177
+ 0.9502593279
+ 0.9505407810
+ 0.9508221745
+ 0.9511036873
+ 0.9513852000
+ 0.9516667128
+ 0.9519482255
+ 0.9522296190
+ 0.9525110722
+ 0.9527925849
+ 0.9530740976
+ 0.9533556104
+ 0.9536370039
+ 0.9539185166
+ 0.9542000294
+ 0.9544814825
+ 0.9547629952
+ 0.9550443888
+ 0.9553259015
+ 0.9556074142
+ 0.9558889270
+ 0.9561703801
+ 0.9564517736
+ 0.9567332864
+ 0.9570147991
+ 0.9572963119
+ 0.9575778246
+ 0.9578592181
+ 0.9581406713
+ 0.9584221840
+ 0.9587036967
+ 0.9589852095
+ 0.9592666030
+ 0.9595481157
+ 0.9598296285
+ 0.9600958228
+ 0.9603385925
+ 0.9605814219
+ 0.9608241916
+ 0.9610670209
+ 0.9613097906
+ 0.9615526199
+ 0.9617953897
+ 0.9620382190
+ 0.9622809887
+ 0.9625238180
+ 0.9627665877
+ 0.9630094171
+ 0.9632521868
+ 0.9634950161
+ 0.9637377858
+ 0.9639806151
+ 0.9642233849
+ 0.9644662142
+ 0.9647089839
+ 0.9649518132
+ 0.9651945829
+ 0.9654374123
+ 0.9656801820
+ 0.9659230113
+ 0.9661657810
+ 0.9664086103
+ 0.9666513801
+ 0.9668942094
+ 0.9671369791
+ 0.9673798084
+ 0.9676225781
+ 0.9678654075
+ 0.9681081772
+ 0.9683510065
+ 0.9685937762
+ 0.9688366055
+ 0.9690793753
+ 0.9693222046
+ 0.9695649743
+ 0.9698078036
+ 0.9700434208
+ 0.9702520967
+ 0.9704607725
+ 0.9706693888
+ 0.9708781242
+ 0.9710866809
+ 0.9712954164
+ 0.9715039730
+ 0.9717127085
+ 0.9719213247
+ 0.9721300006
+ 0.9723386168
+ 0.9725472927
+ 0.9727559090
+ 0.9729645848
+ 0.9731732011
+ 0.9733818769
+ 0.9735904932
+ 0.9737992287
+ 0.9740077853
+ 0.9742165208
+ 0.9744251966
+ 0.9746338129
+ 0.9748424888
+ 0.9750511050
+ 0.9752597809
+ 0.9754683971
+ 0.9756770730
+ 0.9758856893
+ 0.9760944247
+ 0.9763029814
+ 0.9765117168
+ 0.9767202735
+ 0.9769290090
+ 0.9771376252
+ 0.9773463011
+ 0.9775549173
+ 0.9777635932
+ 0.9779723287
+ 0.9781808853
+ 0.9783896208
+ 0.9785981774
+ 0.9788069129
+ 0.9790155292
+ 0.9792242050
+ 0.9794328213
+ 0.9796414971
+ 0.9798501134
+ 0.9800503850
+ 0.9802291989
+ 0.9804080129
+ 0.9805868864
+ 0.9807657003
+ 0.9809445143
+ 0.9811233282
+ 0.9813022017
+ 0.9814810157
+ 0.9816598296
+ 0.9818385839
+ 0.9820175171
+ 0.9821962714
+ 0.9823750854
+ 0.9825540185
+ 0.9827327728
+ 0.9829115868
+ 0.9830904007
+ 0.9832692742
+ 0.9834480882
+ 0.9836269021
+ 0.9838057160
+ 0.9839845896
+ 0.9841634035
+ 0.9843422174
+ 0.9845209718
+ 0.9846999049
+ 0.9848787189
+ 0.9850574732
+ 0.9852364063
+ 0.9854152203
+ 0.9855939746
+ 0.9857727885
+ 0.9859517217
+ 0.9861304760
+ 0.9863092899
+ 0.9864881039
+ 0.9866669774
+ 0.9868457913
+ 0.9870246053
+ 0.9872034192
+ 0.9873822927
+ 0.9875611067
+ 0.9877399206
+ 0.9879187942
+ 0.9880976081
+ 0.9882764220
+ 0.9884551764
+ 0.9886341095
+ 0.9888129234
+ 0.9889916778
+ 0.9891704917
+ 0.9893494248
+ 0.9895281792
+ 0.9897069931
+ 0.9898858070
+ 0.9900553226
+ 0.9902083278
+ 0.9903612733
+ 0.9905142784
+ 0.9906672835
+ 0.9908202887
+ 0.9909732938
+ 0.9911262989
+ 0.9912793040
+ 0.9914323092
+ 0.9915853143
+ 0.9917383194
+ 0.9918913245
+ 0.9920443296
+ 0.9921972752
+ 0.9923502803
+ 0.9925032854
+ 0.9926561713
+ 0.9928091764
+ 0.9929621816
+ 0.9931151867
+ 0.9932681918
+ 0.9934211969
+ 0.9935742021
+ 0.9937272072
+ 0.9938802123
+ 0.9940332174
+ 0.9941862226
+ 0.9943392277
+ 0.9944921732
+ 0.9946451783
+ 0.9947981834
+ 0.9949511886
+ 0.9951041937
+ 0.9952571988
+ 0.9954102039
+ 0.9955630898
+ 0.9957160950
+ 0.9958691001
+ 0.9960221052
+ 0.9961751103
+ 0.9963281155
+ 0.9964811206
+ 0.9966341257
+ 0.9967870712
+ 0.9969400764
+ 0.9970930815
+ 0.9972460866
+ 0.9973990917
+ 0.9975520968
+ 0.9977051020
+ 0.9978581071
+ 0.9980111122
+ 0.9981641173
+ 0.9983171225
+ 0.9984701276
+ 0.9986230135
+ 0.9987760186
+ 0.9989290237
+ 0.9990820289
+ 0.9992349744
+ 0.9993879795
+ 0.9995409846
+ 0.9996939898
+ 0.9998469949
+ 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/eastman_double_x_neg_12min.spi1d b/release/datafiles/colormanagement/luts/film_response/eastman_double_x_neg_12min.spi1d
new file mode 100644
index 00000000000..d5e4ea9d0fb
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/eastman_double_x_neg_12min.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 1
+{
+ 0.0000000000
+ 0.0007793432
+ 0.0016043870
+ 0.0025048309
+ 0.0034564850
+ 0.0044531059
+ 0.0054927212
+ 0.0065743062
+ 0.0076966030
+ 0.0088652465
+ 0.0100406297
+ 0.0112482598
+ 0.0124893002
+ 0.0137513904
+ 0.0150318900
+ 0.0163053796
+ 0.0175968707
+ 0.0188959707
+ 0.0202209800
+ 0.0215417892
+ 0.0228415392
+ 0.0241345204
+ 0.0254166108
+ 0.0267051402
+ 0.0279715508
+ 0.0292299706
+ 0.0305107906
+ 0.0318148397
+ 0.0331244394
+ 0.0344182886
+ 0.0356710814
+ 0.0369000100
+ 0.0381264500
+ 0.0393604413
+ 0.0405932292
+ 0.0418275297
+ 0.0430539995
+ 0.0442756005
+ 0.0454925410
+ 0.0467148200
+ 0.0479568392
+ 0.0492201187
+ 0.0505055487
+ 0.0518039688
+ 0.0530999005
+ 0.0543935411
+ 0.0556728095
+ 0.0569286086
+ 0.0581700616
+ 0.0593975298
+ 0.0606211387
+ 0.0618490316
+ 0.0630754977
+ 0.0642991737
+ 0.0655274168
+ 0.0667622983
+ 0.0679954067
+ 0.0692288280
+ 0.0704668984
+ 0.0717051104
+ 0.0729388893
+ 0.0741742104
+ 0.0754114315
+ 0.0766490623
+ 0.0779046863
+ 0.0791758820
+ 0.0804568231
+ 0.0817457736
+ 0.0830455273
+ 0.0843512416
+ 0.0856669694
+ 0.0869878605
+ 0.0883099586
+ 0.0896294117
+ 0.0909416676
+ 0.0922398567
+ 0.0935223699
+ 0.0948002487
+ 0.0960806310
+ 0.0973561779
+ 0.0986227468
+ 0.0998791903
+ 0.1011310965
+ 0.1023767963
+ 0.1036218032
+ 0.1048732996
+ 0.1061237976
+ 0.1073772013
+ 0.1086406037
+ 0.1099131033
+ 0.1111890003
+ 0.1124633029
+ 0.1137432009
+ 0.1150280014
+ 0.1163161024
+ 0.1176021993
+ 0.1188817993
+ 0.1201585010
+ 0.1214374006
+ 0.1227219999
+ 0.1240141019
+ 0.1253069043
+ 0.1266023964
+ 0.1279031932
+ 0.1292033046
+ 0.1305052042
+ 0.1318120956
+ 0.1331252009
+ 0.1344417036
+ 0.1357488036
+ 0.1370531023
+ 0.1383568048
+ 0.1396605074
+ 0.1409630030
+ 0.1422598958
+ 0.1435438991
+ 0.1448162943
+ 0.1460811943
+ 0.1473405957
+ 0.1486002952
+ 0.1498605013
+ 0.1511213034
+ 0.1523707062
+ 0.1536183953
+ 0.1548663974
+ 0.1561181992
+ 0.1573731005
+ 0.1586305052
+ 0.1598910987
+ 0.1611555964
+ 0.1624190062
+ 0.1636800021
+ 0.1649398953
+ 0.1662012041
+ 0.1674640030
+ 0.1687299013
+ 0.1699973047
+ 0.1712664962
+ 0.1725308001
+ 0.1737935990
+ 0.1750548929
+ 0.1763173938
+ 0.1775805950
+ 0.1788450032
+ 0.1801103055
+ 0.1813762039
+ 0.1826315969
+ 0.1838831007
+ 0.1851277947
+ 0.1863732934
+ 0.1876191944
+ 0.1888664067
+ 0.1901142001
+ 0.1913629025
+ 0.1926099062
+ 0.1938558966
+ 0.1950968057
+ 0.1963375956
+ 0.1975809038
+ 0.1988252997
+ 0.2000714988
+ 0.2013193965
+ 0.2025685012
+ 0.2038163990
+ 0.2050641030
+ 0.2063076943
+ 0.2075518072
+ 0.2087996006
+ 0.2100487053
+ 0.2113008052
+ 0.2125546932
+ 0.2138112932
+ 0.2150679976
+ 0.2163249999
+ 0.2175804973
+ 0.2188349068
+ 0.2200877964
+ 0.2213395983
+ 0.2225918025
+ 0.2238440067
+ 0.2250992060
+ 0.2263558954
+ 0.2276154011
+ 0.2288765013
+ 0.2301405072
+ 0.2314060032
+ 0.2326692939
+ 0.2339307964
+ 0.2351918072
+ 0.2364521027
+ 0.2377136946
+ 0.2389771044
+ 0.2402402014
+ 0.2415028960
+ 0.2427645028
+ 0.2440197021
+ 0.2452747971
+ 0.2465146035
+ 0.2477540970
+ 0.2489840984
+ 0.2502116859
+ 0.2514351010
+ 0.2526553869
+ 0.2538737059
+ 0.2550880015
+ 0.2563014030
+ 0.2575060129
+ 0.2587105036
+ 0.2599005997
+ 0.2610872090
+ 0.2622725964
+ 0.2634567022
+ 0.2646411955
+ 0.2658275068
+ 0.2670137882
+ 0.2682031095
+ 0.2693929970
+ 0.2705830038
+ 0.2717730105
+ 0.2729629874
+ 0.2741507888
+ 0.2753385901
+ 0.2765288949
+ 0.2777211964
+ 0.2789132893
+ 0.2801041007
+ 0.2812949121
+ 0.2824903131
+ 0.2836886942
+ 0.2848882973
+ 0.2861017883
+ 0.2873153090
+ 0.2885307968
+ 0.2897481024
+ 0.2909654081
+ 0.2921859026
+ 0.2934064865
+ 0.2946256995
+ 0.2958427072
+ 0.2970597148
+ 0.2982782125
+ 0.2994971871
+ 0.3007166982
+ 0.3019422889
+ 0.3031679094
+ 0.3043949902
+ 0.3056245148
+ 0.3068540096
+ 0.3080824018
+ 0.3093104064
+ 0.3105382919
+ 0.3117617965
+ 0.3129849136
+ 0.3142082095
+ 0.3154324889
+ 0.3166567981
+ 0.3178820908
+ 0.3191089034
+ 0.3203358054
+ 0.3215647936
+ 0.3227958977
+ 0.3240269125
+ 0.3252558112
+ 0.3264834881
+ 0.3277111948
+ 0.3289369941
+ 0.3301621974
+ 0.3313874006
+ 0.3326055110
+ 0.3338221014
+ 0.3350386918
+ 0.3362470865
+ 0.3374541104
+ 0.3386611044
+ 0.3398616016
+ 0.3410609961
+ 0.3422603905
+ 0.3434514999
+ 0.3446409106
+ 0.3458304107
+ 0.3470165133
+ 0.3482016921
+ 0.3493868113
+ 0.3505715132
+ 0.3517560065
+ 0.3529404998
+ 0.3541254103
+ 0.3553107083
+ 0.3564960063
+ 0.3576815128
+ 0.3588675857
+ 0.3600535989
+ 0.3612394929
+ 0.3624249995
+ 0.3636103868
+ 0.3647958934
+ 0.3659862876
+ 0.3671767116
+ 0.3683671057
+ 0.3695602119
+ 0.3707543015
+ 0.3719483912
+ 0.3731409013
+ 0.3743312061
+ 0.3755215108
+ 0.3767108917
+ 0.3778904974
+ 0.3790701926
+ 0.3802497983
+ 0.3814249933
+ 0.3825984001
+ 0.3837718070
+ 0.3849433959
+ 0.3861109912
+ 0.3872785866
+ 0.3884460926
+ 0.3896096051
+ 0.3907724023
+ 0.3919351995
+ 0.3930951953
+ 0.3942511082
+ 0.3954069018
+ 0.3965628147
+ 0.3977113962
+ 0.3988589942
+ 0.4000065923
+ 0.4011510909
+ 0.4022890925
+ 0.4034270048
+ 0.4045650065
+ 0.4056946933
+ 0.4068213105
+ 0.4079478085
+ 0.4090737104
+ 0.4101923108
+ 0.4113109112
+ 0.4124295115
+ 0.4135465026
+ 0.4146609008
+ 0.4157753885
+ 0.4168899059
+ 0.4180073142
+ 0.4191260040
+ 0.4202446938
+ 0.4213634133
+ 0.4224787951
+ 0.4235939085
+ 0.4247091115
+ 0.4258244038
+ 0.4269405007
+ 0.4280565977
+ 0.4291726947
+ 0.4302915931
+ 0.4314163029
+ 0.4325410128
+ 0.4336656928
+ 0.4347921908
+ 0.4359208047
+ 0.4370495081
+ 0.4381780922
+ 0.4393090010
+ 0.4404419065
+ 0.4415748119
+ 0.4427076876
+ 0.4438371062
+ 0.4449638128
+ 0.4460904002
+ 0.4472169876
+ 0.4483405054
+ 0.4494614005
+ 0.4505822957
+ 0.4517031908
+ 0.4528234005
+ 0.4539428949
+ 0.4550623894
+ 0.4561819136
+ 0.4572989047
+ 0.4584122002
+ 0.4595254064
+ 0.4606387019
+ 0.4617524147
+ 0.4628674090
+ 0.4639823139
+ 0.4650971889
+ 0.4662118852
+ 0.4673239887
+ 0.4684360921
+ 0.4695481956
+ 0.4706602991
+ 0.4717625082
+ 0.4728631973
+ 0.4739638865
+ 0.4750646055
+ 0.4761615098
+ 0.4772560000
+ 0.4783504903
+ 0.4794450104
+ 0.4805378914
+ 0.4816266894
+ 0.4827154875
+ 0.4838042855
+ 0.4848932028
+ 0.4859696925
+ 0.4870451093
+ 0.4881204069
+ 0.4891957939
+ 0.4902659059
+ 0.4913307130
+ 0.4923956096
+ 0.4934605062
+ 0.4945251942
+ 0.4955861866
+ 0.4966472089
+ 0.4977082014
+ 0.4987691939
+ 0.4998275936
+ 0.5008835793
+ 0.5019395947
+ 0.5029956102
+ 0.5040516257
+ 0.5051162243
+ 0.5061810017
+ 0.5072458982
+ 0.5083106756
+ 0.5093780756
+ 0.5104498863
+ 0.5115215778
+ 0.5125933886
+ 0.5136651993
+ 0.5147346854
+ 0.5158032179
+ 0.5168716908
+ 0.5179402232
+ 0.5190086961
+ 0.5200641155
+ 0.5211194158
+ 0.5221747160
+ 0.5232300758
+ 0.5242825747
+ 0.5253263116
+ 0.5263699889
+ 0.5274137259
+ 0.5284574032
+ 0.5294985771
+ 0.5305367112
+ 0.5315749049
+ 0.5326129794
+ 0.5336511135
+ 0.5346894860
+ 0.5357280970
+ 0.5367668271
+ 0.5378053784
+ 0.5388441086
+ 0.5398868918
+ 0.5409319997
+ 0.5419769883
+ 0.5430220962
+ 0.5440670848
+ 0.5451143980
+ 0.5461627245
+ 0.5472109914
+ 0.5482593179
+ 0.5493075848
+ 0.5503467917
+ 0.5513814092
+ 0.5524160266
+ 0.5534505844
+ 0.5544852018
+ 0.5555140972
+ 0.5565391183
+ 0.5575640798
+ 0.5585891008
+ 0.5596141219
+ 0.5606383085
+ 0.5616616011
+ 0.5626850128
+ 0.5637083054
+ 0.5647315979
+ 0.5657541752
+ 0.5667750239
+ 0.5677956939
+ 0.5688164234
+ 0.5698372126
+ 0.5708575845
+ 0.5718625784
+ 0.5728675723
+ 0.5738726258
+ 0.5748776197
+ 0.5758826137
+ 0.5768746138
+ 0.5778616071
+ 0.5788486004
+ 0.5798354745
+ 0.5808225274
+ 0.5818051100
+ 0.5827798247
+ 0.5837545991
+ 0.5847293139
+ 0.5857040882
+ 0.5866789222
+ 0.5876461267
+ 0.5886127949
+ 0.5895795822
+ 0.5905464292
+ 0.5915130973
+ 0.5924791098
+ 0.5934441090
+ 0.5944091082
+ 0.5953741074
+ 0.5963391066
+ 0.5973042250
+ 0.5982726812
+ 0.5992414951
+ 0.6002103090
+ 0.6011791825
+ 0.6021479964
+ 0.6031122804
+ 0.6040681005
+ 0.6050239205
+ 0.6059796810
+ 0.6069355011
+ 0.6078913212
+ 0.6088355184
+ 0.6097744703
+ 0.6107134223
+ 0.6116523743
+ 0.6125913858
+ 0.6135302782
+ 0.6144611835
+ 0.6153919101
+ 0.6163225174
+ 0.6172531843
+ 0.6181837916
+ 0.6191145778
+ 0.6200459003
+ 0.6209772229
+ 0.6219084859
+ 0.6228398085
+ 0.6237710118
+ 0.6247057915
+ 0.6256468892
+ 0.6265881062
+ 0.6275292039
+ 0.6284703016
+ 0.6294115186
+ 0.6303575039
+ 0.6313095093
+ 0.6322615147
+ 0.6332135797
+ 0.6341655850
+ 0.6351175904
+ 0.6360645294
+ 0.6370056272
+ 0.6379467249
+ 0.6388878822
+ 0.6398289800
+ 0.6407700777
+ 0.6417067051
+ 0.6426376104
+ 0.6435685158
+ 0.6444994211
+ 0.6454303265
+ 0.6463611126
+ 0.6472914815
+ 0.6482210159
+ 0.6491504908
+ 0.6500799060
+ 0.6510093808
+ 0.6519389153
+ 0.6528680921
+ 0.6537961960
+ 0.6547242999
+ 0.6556524038
+ 0.6565805078
+ 0.6575086713
+ 0.6584367752
+ 0.6593579054
+ 0.6602786779
+ 0.6611993909
+ 0.6621202230
+ 0.6630408764
+ 0.6639617085
+ 0.6648803949
+ 0.6657980084
+ 0.6667156219
+ 0.6676332951
+ 0.6685509086
+ 0.6694685221
+ 0.6703848243
+ 0.6712977886
+ 0.6722108126
+ 0.6731237769
+ 0.6740368009
+ 0.6749498248
+ 0.6758627892
+ 0.6767727733
+ 0.6776821017
+ 0.6785914898
+ 0.6795008779
+ 0.6804103255
+ 0.6813195944
+ 0.6822264791
+ 0.6831287146
+ 0.6840307713
+ 0.6849328876
+ 0.6858351231
+ 0.6867371798
+ 0.6876392961
+ 0.6885449290
+ 0.6894515753
+ 0.6903582811
+ 0.6912649274
+ 0.6921715736
+ 0.6930782795
+ 0.6939843893
+ 0.6948862076
+ 0.6957879066
+ 0.6966897249
+ 0.6975914836
+ 0.6984933019
+ 0.6993951201
+ 0.7002941966
+ 0.7011892796
+ 0.7020843029
+ 0.7029793859
+ 0.7038745284
+ 0.7047696114
+ 0.7056646943
+ 0.7065535784
+ 0.7074385285
+ 0.7083234191
+ 0.7092083097
+ 0.7100932002
+ 0.7109780908
+ 0.7118629813
+ 0.7127363086
+ 0.7136055827
+ 0.7144749165
+ 0.7153440714
+ 0.7162134051
+ 0.7170826197
+ 0.7179518938
+ 0.7188181877
+ 0.7196837068
+ 0.7205492854
+ 0.7214148045
+ 0.7222803831
+ 0.7231459022
+ 0.7240114212
+ 0.7248805165
+ 0.7257506251
+ 0.7266206741
+ 0.7274907827
+ 0.7283608913
+ 0.7292309999
+ 0.7301011086
+ 0.7309634089
+ 0.7318221927
+ 0.7326809168
+ 0.7335395813
+ 0.7343984246
+ 0.7352570891
+ 0.7361158133
+ 0.7369657159
+ 0.7378072739
+ 0.7386490107
+ 0.7394906282
+ 0.7403321862
+ 0.7411738038
+ 0.7420154214
+ 0.7428557277
+ 0.7436921000
+ 0.7445284724
+ 0.7453650236
+ 0.7462013960
+ 0.7470378876
+ 0.7478743196
+ 0.7487106919
+ 0.7495496869
+ 0.7503886819
+ 0.7512277961
+ 0.7520667911
+ 0.7529059052
+ 0.7537449002
+ 0.7545840144
+ 0.7554156780
+ 0.7562410831
+ 0.7570664287
+ 0.7578917742
+ 0.7587171793
+ 0.7595425844
+ 0.7603678703
+ 0.7611923218
+ 0.7619991899
+ 0.7628061175
+ 0.7636129856
+ 0.7644199133
+ 0.7652267814
+ 0.7660337090
+ 0.7668405175
+ 0.7676423192
+ 0.7684385180
+ 0.7692347169
+ 0.7700309753
+ 0.7708271742
+ 0.7716233730
+ 0.7724196911
+ 0.7732158899
+ 0.7740070820
+ 0.7747973204
+ 0.7755873799
+ 0.7763776183
+ 0.7771677971
+ 0.7779579759
+ 0.7787482142
+ 0.7795379162
+ 0.7803233862
+ 0.7811089158
+ 0.7818945050
+ 0.7826799750
+ 0.7834655046
+ 0.7842510939
+ 0.7850366235
+ 0.7858232856
+ 0.7866128087
+ 0.7874022722
+ 0.7881917953
+ 0.7889813185
+ 0.7897707820
+ 0.7905603051
+ 0.7913498282
+ 0.7921416163
+ 0.7929369807
+ 0.7937325239
+ 0.7945278883
+ 0.7953233719
+ 0.7961187959
+ 0.7969142795
+ 0.7977098227
+ 0.7985072732
+ 0.7993078828
+ 0.8001083732
+ 0.8009089828
+ 0.8017095923
+ 0.8025102019
+ 0.8033106923
+ 0.8041113019
+ 0.8049136996
+ 0.8057196736
+ 0.8065257072
+ 0.8073316813
+ 0.8081377149
+ 0.8089436889
+ 0.8097497225
+ 0.8105556965
+ 0.8113610148
+ 0.8121625185
+ 0.8129640818
+ 0.8137655854
+ 0.8145672083
+ 0.8153687119
+ 0.8161702752
+ 0.8169717789
+ 0.8177734017
+ 0.8185741901
+ 0.8193749189
+ 0.8201755881
+ 0.8209763169
+ 0.8217771053
+ 0.8225777745
+ 0.8233785033
+ 0.8241791725
+ 0.8249862790
+ 0.8257976770
+ 0.8266091943
+ 0.8274207115
+ 0.8282322288
+ 0.8290436864
+ 0.8298552036
+ 0.8306667209
+ 0.8314790130
+ 0.8322961926
+ 0.8331133723
+ 0.8339306116
+ 0.8347477913
+ 0.8355649710
+ 0.8363820910
+ 0.8371992707
+ 0.8380165100
+ 0.8388273120
+ 0.8396344185
+ 0.8404415846
+ 0.8412486911
+ 0.8420559168
+ 0.8428630233
+ 0.8436701894
+ 0.8444772959
+ 0.8452842832
+ 0.8460859060
+ 0.8468874097
+ 0.8476889729
+ 0.8484904766
+ 0.8492919803
+ 0.8500936031
+ 0.8508951068
+ 0.8516967297
+ 0.8524969816
+ 0.8532947898
+ 0.8540925980
+ 0.8548902869
+ 0.8556880951
+ 0.8564857841
+ 0.8572835922
+ 0.8580814004
+ 0.8588790894
+ 0.8596730232
+ 0.8604632020
+ 0.8612535000
+ 0.8620436788
+ 0.8628339767
+ 0.8636242151
+ 0.8644145131
+ 0.8652046919
+ 0.8659949899
+ 0.8667806983
+ 0.8675637841
+ 0.8683468103
+ 0.8691297770
+ 0.8699129224
+ 0.8706958890
+ 0.8714789152
+ 0.8722620010
+ 0.8730450273
+ 0.8738256097
+ 0.8746048808
+ 0.8753840923
+ 0.8761633039
+ 0.8769425750
+ 0.8777217865
+ 0.8785009980
+ 0.8792803288
+ 0.8800594807
+ 0.8808330894
+ 0.8816019893
+ 0.8823708296
+ 0.8831397295
+ 0.8839085102
+ 0.8846774101
+ 0.8854461908
+ 0.8862150908
+ 0.8869838715
+ 0.8877493739
+ 0.8885086775
+ 0.8892679811
+ 0.8900274038
+ 0.8907867074
+ 0.8915460706
+ 0.8923053741
+ 0.8930646777
+ 0.8938241005
+ 0.8945831060
+ 0.8953374028
+ 0.8960916996
+ 0.8968459964
+ 0.8976002932
+ 0.8983545899
+ 0.8991088867
+ 0.8998631835
+ 0.9006174803
+ 0.9013717771
+ 0.9021221995
+ 0.9028707147
+ 0.9036192298
+ 0.9043676853
+ 0.9051162004
+ 0.9058647156
+ 0.9066131711
+ 0.9073616862
+ 0.9081102014
+ 0.9088572264
+ 0.9095978141
+ 0.9103382826
+ 0.9110788703
+ 0.9118193984
+ 0.9125599265
+ 0.9133005142
+ 0.9140409827
+ 0.9147815704
+ 0.9155220985
+ 0.9162616730
+ 0.9170007110
+ 0.9177396894
+ 0.9184786081
+ 0.9192175865
+ 0.9199566245
+ 0.9206956029
+ 0.9214345813
+ 0.9221735001
+ 0.9229124784
+ 0.9236471057
+ 0.9243810773
+ 0.9251152277
+ 0.9258491993
+ 0.9265832901
+ 0.9273173809
+ 0.9280514121
+ 0.9287855029
+ 0.9295194745
+ 0.9302524924
+ 0.9309753180
+ 0.9316980839
+ 0.9324210286
+ 0.9331437945
+ 0.9338666201
+ 0.9345893860
+ 0.9353122711
+ 0.9360350966
+ 0.9367579222
+ 0.9374781847
+ 0.9381874204
+ 0.9388967156
+ 0.9396058917
+ 0.9403151274
+ 0.9410244226
+ 0.9417335987
+ 0.9424427748
+ 0.9431521297
+ 0.9438613057
+ 0.9445694089
+ 0.9452716708
+ 0.9459741116
+ 0.9466764927
+ 0.9473788738
+ 0.9480813146
+ 0.9487836957
+ 0.9494860768
+ 0.9501885176
+ 0.9508908987
+ 0.9515926838
+ 0.9522830844
+ 0.9529734850
+ 0.9536638856
+ 0.9543542862
+ 0.9550446868
+ 0.9557350874
+ 0.9564254880
+ 0.9571158886
+ 0.9578062892
+ 0.9584966898
+ 0.9591748118
+ 0.9598501921
+ 0.9605255723
+ 0.9612010121
+ 0.9618763924
+ 0.9625517726
+ 0.9632272124
+ 0.9639025927
+ 0.9645779729
+ 0.9652534127
+ 0.9659177065
+ 0.9665694833
+ 0.9672212005
+ 0.9678729773
+ 0.9685248137
+ 0.9691764712
+ 0.9698283076
+ 0.9704800248
+ 0.9711318016
+ 0.9717835784
+ 0.9724348783
+ 0.9730530977
+ 0.9736713171
+ 0.9742894769
+ 0.9749076962
+ 0.9755259752
+ 0.9761441946
+ 0.9767624140
+ 0.9773805737
+ 0.9779987931
+ 0.9786170125
+ 0.9792193770
+ 0.9798017740
+ 0.9803841710
+ 0.9809666872
+ 0.9815490842
+ 0.9821314812
+ 0.9827138782
+ 0.9832963943
+ 0.9838787913
+ 0.9844611883
+ 0.9850435853
+ 0.9855896831
+ 0.9861239791
+ 0.9866582751
+ 0.9871926904
+ 0.9877269864
+ 0.9882612824
+ 0.9887955785
+ 0.9893299937
+ 0.9898642898
+ 0.9903985858
+ 0.9909328818
+ 0.9913933873
+ 0.9918504953
+ 0.9923074841
+ 0.9927644730
+ 0.9932215214
+ 0.9936786294
+ 0.9941356182
+ 0.9945926070
+ 0.9950495958
+ 0.9955067039
+ 0.9959604144
+ 0.9963275790
+ 0.9966949224
+ 0.9970620871
+ 0.9974293113
+ 0.9977965951
+ 0.9981638193
+ 0.9985311031
+ 0.9988983274
+ 0.9992654920
+ 0.9996327758
+ 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/eastman_double_x_neg_4min.spi1d b/release/datafiles/colormanagement/luts/film_response/eastman_double_x_neg_4min.spi1d
new file mode 100644
index 00000000000..4835f8421e1
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/eastman_double_x_neg_4min.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 1
+{
+ 0.0000000000
+ 0.0023687680
+ 0.0054706829
+ 0.0086651789
+ 0.0120176496
+ 0.0158339497
+ 0.0195765607
+ 0.0236159302
+ 0.0276366994
+ 0.0318052210
+ 0.0358720496
+ 0.0399059989
+ 0.0439607613
+ 0.0478296690
+ 0.0517273210
+ 0.0555948503
+ 0.0593124293
+ 0.0629053935
+ 0.0664692596
+ 0.0699850023
+ 0.0734276623
+ 0.0768507421
+ 0.0801614299
+ 0.0833590478
+ 0.0865080431
+ 0.0895957723
+ 0.0926453620
+ 0.0956536904
+ 0.0985890403
+ 0.1014889032
+ 0.1043139026
+ 0.1071280017
+ 0.1098439023
+ 0.1126044020
+ 0.1154047996
+ 0.1181370020
+ 0.1207929030
+ 0.1234567985
+ 0.1260991991
+ 0.1286775023
+ 0.1312310994
+ 0.1338002980
+ 0.1363786012
+ 0.1389155984
+ 0.1414254010
+ 0.1439868957
+ 0.1465484947
+ 0.1490968019
+ 0.1516236961
+ 0.1540950984
+ 0.1565376967
+ 0.1589566022
+ 0.1613540947
+ 0.1637308002
+ 0.1660850048
+ 0.1684197038
+ 0.1707345992
+ 0.1730296016
+ 0.1753066033
+ 0.1775436997
+ 0.1797461957
+ 0.1819386929
+ 0.1841226071
+ 0.1862974018
+ 0.1884626001
+ 0.1906190962
+ 0.1927487999
+ 0.1948511004
+ 0.1969520003
+ 0.1990513057
+ 0.2011491954
+ 0.2032300979
+ 0.2052827030
+ 0.2073220015
+ 0.2093351036
+ 0.2113271952
+ 0.2133180052
+ 0.2153075039
+ 0.2172959000
+ 0.2192790955
+ 0.2212336957
+ 0.2231718004
+ 0.2251033932
+ 0.2270285040
+ 0.2289548069
+ 0.2309035063
+ 0.2328732014
+ 0.2348369956
+ 0.2367957979
+ 0.2387501001
+ 0.2406919003
+ 0.2426078022
+ 0.2445061952
+ 0.2464056015
+ 0.2483084053
+ 0.2502099872
+ 0.2521064878
+ 0.2539938092
+ 0.2558684051
+ 0.2577266097
+ 0.2595650852
+ 0.2613835931
+ 0.2631973922
+ 0.2650325000
+ 0.2668823004
+ 0.2687312961
+ 0.2705838084
+ 0.2724444866
+ 0.2743074894
+ 0.2761450112
+ 0.2779580951
+ 0.2797524035
+ 0.2815274894
+ 0.2832885981
+ 0.2850483060
+ 0.2868123949
+ 0.2885822058
+ 0.2903468013
+ 0.2920975983
+ 0.2938277125
+ 0.2955364883
+ 0.2972253859
+ 0.2988938093
+ 0.3005304933
+ 0.3021554053
+ 0.3037792146
+ 0.3054072857
+ 0.3070620894
+ 0.3087309003
+ 0.3104070127
+ 0.3120703995
+ 0.3137196898
+ 0.3153668940
+ 0.3170216084
+ 0.3186618090
+ 0.3202942014
+ 0.3219175935
+ 0.3235363066
+ 0.3251608014
+ 0.3267996013
+ 0.3284519017
+ 0.3301031888
+ 0.3317410052
+ 0.3333635926
+ 0.3349764943
+ 0.3365670145
+ 0.3381485939
+ 0.3397214115
+ 0.3412905037
+ 0.3428558111
+ 0.3444117010
+ 0.3459688127
+ 0.3475267887
+ 0.3490850031
+ 0.3506405950
+ 0.3521885872
+ 0.3537277877
+ 0.3552600145
+ 0.3567726910
+ 0.3582783937
+ 0.3597534001
+ 0.3612213135
+ 0.3626750112
+ 0.3641248941
+ 0.3655717969
+ 0.3670117855
+ 0.3684495986
+ 0.3698936105
+ 0.3713377118
+ 0.3727797866
+ 0.3742178977
+ 0.3756431937
+ 0.3770616055
+ 0.3784677088
+ 0.3798623085
+ 0.3812437057
+ 0.3826156855
+ 0.3839798868
+ 0.3853352964
+ 0.3866848946
+ 0.3880395889
+ 0.3893971145
+ 0.3907648027
+ 0.3921375871
+ 0.3935118020
+ 0.3948867023
+ 0.3962557912
+ 0.3976216912
+ 0.3989877999
+ 0.4003542066
+ 0.4017100036
+ 0.4030559957
+ 0.4043887854
+ 0.4057038128
+ 0.4070141017
+ 0.4083139896
+ 0.4096128941
+ 0.4109064043
+ 0.4121997952
+ 0.4134868085
+ 0.4147739112
+ 0.4160555899
+ 0.4173362851
+ 0.4186184108
+ 0.4199014008
+ 0.4211877882
+ 0.4224792123
+ 0.4237694144
+ 0.4250515997
+ 0.4263338149
+ 0.4276081026
+ 0.4288811088
+ 0.4301379919
+ 0.4313819110
+ 0.4326207042
+ 0.4338417947
+ 0.4350628853
+ 0.4362733960
+ 0.4374822080
+ 0.4386931062
+ 0.4399060011
+ 0.4411188960
+ 0.4423305988
+ 0.4435423911
+ 0.4447481036
+ 0.4459505081
+ 0.4471527040
+ 0.4483538866
+ 0.4495550990
+ 0.4507592022
+ 0.4519644976
+ 0.4531674981
+ 0.4543609023
+ 0.4555541873
+ 0.4567396045
+ 0.4579207897
+ 0.4591009021
+ 0.4602701068
+ 0.4614393115
+ 0.4626025856
+ 0.4637596905
+ 0.4649167955
+ 0.4660637975
+ 0.4672091901
+ 0.4683555067
+ 0.4695048034
+ 0.4706541896
+ 0.4718030095
+ 0.4729512036
+ 0.4740993977
+ 0.4752402902
+ 0.4763796926
+ 0.4775182903
+ 0.4786491096
+ 0.4797798991
+ 0.4809078872
+ 0.4820297956
+ 0.4831517935
+ 0.4842692018
+ 0.4853824079
+ 0.4864956141
+ 0.4876025915
+ 0.4887068868
+ 0.4898110926
+ 0.4909138083
+ 0.4920162857
+ 0.4931187034
+ 0.4942246974
+ 0.4953309894
+ 0.4964371026
+ 0.4975334108
+ 0.4986295998
+ 0.4997260869
+ 0.5008261800
+ 0.5019261837
+ 0.5030261278
+ 0.5041244030
+ 0.5052226782
+ 0.5063204765
+ 0.5074101090
+ 0.5084996819
+ 0.5095893145
+ 0.5106704831
+ 0.5117517710
+ 0.5128329992
+ 0.5139064789
+ 0.5149794221
+ 0.5160521865
+ 0.5171185732
+ 0.5181834102
+ 0.5192481875
+ 0.5203077197
+ 0.5213642716
+ 0.5224208832
+ 0.5234770179
+ 0.5245326161
+ 0.5255880952
+ 0.5266445875
+ 0.5277037024
+ 0.5287628174
+ 0.5298218727
+ 0.5308706760
+ 0.5319193006
+ 0.5329679847
+ 0.5340090990
+ 0.5350469947
+ 0.5360848904
+ 0.5371162891
+ 0.5381368995
+ 0.5391575098
+ 0.5401778221
+ 0.5411760211
+ 0.5421741009
+ 0.5431722999
+ 0.5441654921
+ 0.5451557040
+ 0.5461459160
+ 0.5471357107
+ 0.5481235981
+ 0.5491116047
+ 0.5500994921
+ 0.5510740876
+ 0.5520431995
+ 0.5530123115
+ 0.5539786220
+ 0.5549340248
+ 0.5558893085
+ 0.5568445921
+ 0.5578002930
+ 0.5587561727
+ 0.5597121119
+ 0.5606679916
+ 0.5616241097
+ 0.5625802875
+ 0.5635365248
+ 0.5644925237
+ 0.5654482245
+ 0.5664039850
+ 0.5673596859
+ 0.5683150887
+ 0.5692703724
+ 0.5702255964
+ 0.5711804032
+ 0.5721278787
+ 0.5730754733
+ 0.5740230083
+ 0.5749645829
+ 0.5758937001
+ 0.5768228769
+ 0.5777519941
+ 0.5786722898
+ 0.5795848966
+ 0.5804976225
+ 0.5814102888
+ 0.5823227167
+ 0.5832350850
+ 0.5841473937
+ 0.5850597024
+ 0.5859693885
+ 0.5868784785
+ 0.5877876878
+ 0.5886967778
+ 0.5896003246
+ 0.5905032754
+ 0.5914062858
+ 0.5923094153
+ 0.5932080746
+ 0.5941067934
+ 0.5950053930
+ 0.5959041119
+ 0.5967944860
+ 0.5976848006
+ 0.5985751748
+ 0.5994654894
+ 0.6003587246
+ 0.6012520790
+ 0.6021453738
+ 0.6030387282
+ 0.6039313078
+ 0.6048238277
+ 0.6057162285
+ 0.6066086888
+ 0.6074911952
+ 0.6083701849
+ 0.6092491746
+ 0.6101281047
+ 0.6109964848
+ 0.6118568778
+ 0.6127172112
+ 0.6135776043
+ 0.6144360900
+ 0.6152914166
+ 0.6161466241
+ 0.6170017719
+ 0.6178573966
+ 0.6187161803
+ 0.6195750237
+ 0.6204338074
+ 0.6212925911
+ 0.6221556067
+ 0.6230198741
+ 0.6238840818
+ 0.6247482896
+ 0.6256136894
+ 0.6264808178
+ 0.6273478866
+ 0.6282148957
+ 0.6290820241
+ 0.6299490929
+ 0.6308162212
+ 0.6316832900
+ 0.6325504780
+ 0.6334146857
+ 0.6342768073
+ 0.6351389885
+ 0.6360011101
+ 0.6368619800
+ 0.6377084851
+ 0.6385549903
+ 0.6394014955
+ 0.6402480006
+ 0.6410933137
+ 0.6419374943
+ 0.6427816749
+ 0.6436259747
+ 0.6444702148
+ 0.6453065276
+ 0.6461421847
+ 0.6469779015
+ 0.6478136182
+ 0.6486436725
+ 0.6494596004
+ 0.6502755880
+ 0.6510915160
+ 0.6519075036
+ 0.6527132988
+ 0.6535121202
+ 0.6543108821
+ 0.6551098228
+ 0.6559085846
+ 0.6566948891
+ 0.6574789286
+ 0.6582627892
+ 0.6590468287
+ 0.6598308086
+ 0.6606147885
+ 0.6613988280
+ 0.6621828079
+ 0.6629667878
+ 0.6637505293
+ 0.6645327210
+ 0.6653149128
+ 0.6660971045
+ 0.6668794155
+ 0.6676582098
+ 0.6684288979
+ 0.6691997051
+ 0.6699703932
+ 0.6707410812
+ 0.6715074182
+ 0.6722648144
+ 0.6730222106
+ 0.6737796068
+ 0.6745370030
+ 0.6752945185
+ 0.6760522127
+ 0.6768100262
+ 0.6775677204
+ 0.6783254743
+ 0.6790840030
+ 0.6798446774
+ 0.6806052923
+ 0.6813660264
+ 0.6821267009
+ 0.6828873158
+ 0.6836469769
+ 0.6844068170
+ 0.6851665974
+ 0.6859263182
+ 0.6866860986
+ 0.6874372959
+ 0.6881881952
+ 0.6889392138
+ 0.6896901131
+ 0.6904410124
+ 0.6911798120
+ 0.6919142008
+ 0.6926484704
+ 0.6933829188
+ 0.6941173077
+ 0.6948506236
+ 0.6955826283
+ 0.6963145733
+ 0.6970465183
+ 0.6977785230
+ 0.6985105276
+ 0.6992424726
+ 0.6999745965
+ 0.7007066011
+ 0.7014386058
+ 0.7021707296
+ 0.7028998137
+ 0.7036275864
+ 0.7043554187
+ 0.7050831914
+ 0.7058110237
+ 0.7065402269
+ 0.7072740197
+ 0.7080078125
+ 0.7087416053
+ 0.7094753981
+ 0.7102091908
+ 0.7109380960
+ 0.7116650939
+ 0.7123920918
+ 0.7131190896
+ 0.7138460875
+ 0.7145711780
+ 0.7152836919
+ 0.7159962058
+ 0.7167087197
+ 0.7174212933
+ 0.7181338072
+ 0.7188457847
+ 0.7195572257
+ 0.7202687263
+ 0.7209801078
+ 0.7216914892
+ 0.7224029899
+ 0.7231106758
+ 0.7238175273
+ 0.7245242000
+ 0.7252308726
+ 0.7259377241
+ 0.7266442180
+ 0.7273383141
+ 0.7280324101
+ 0.7287266254
+ 0.7294207215
+ 0.7301148772
+ 0.7308074832
+ 0.7314937115
+ 0.7321799994
+ 0.7328662276
+ 0.7335523963
+ 0.7342386246
+ 0.7349203229
+ 0.7355914712
+ 0.7362626791
+ 0.7369338870
+ 0.7376050949
+ 0.7382763028
+ 0.7389466763
+ 0.7396153808
+ 0.7402840853
+ 0.7409527898
+ 0.7416214943
+ 0.7422903180
+ 0.7429624796
+ 0.7436416745
+ 0.7443209887
+ 0.7450001836
+ 0.7456793785
+ 0.7463586926
+ 0.7470390201
+ 0.7477223873
+ 0.7484058738
+ 0.7490894198
+ 0.7497729063
+ 0.7504563928
+ 0.7511395812
+ 0.7518200874
+ 0.7525004745
+ 0.7531809807
+ 0.7538614273
+ 0.7545418739
+ 0.7552223802
+ 0.7558920979
+ 0.7565605044
+ 0.7572287917
+ 0.7578970790
+ 0.7585654855
+ 0.7592337728
+ 0.7598943114
+ 0.7605494261
+ 0.7612044811
+ 0.7618595958
+ 0.7625148296
+ 0.7631698847
+ 0.7638273835
+ 0.7644920945
+ 0.7651568055
+ 0.7658215165
+ 0.7664862275
+ 0.7671508193
+ 0.7678154707
+ 0.7684820890
+ 0.7691490054
+ 0.7698159814
+ 0.7704828978
+ 0.7711498737
+ 0.7718167901
+ 0.7724804878
+ 0.7731373906
+ 0.7737944126
+ 0.7744513750
+ 0.7751083970
+ 0.7757654190
+ 0.7764223814
+ 0.7770789862
+ 0.7777354121
+ 0.7783918977
+ 0.7790483832
+ 0.7797049284
+ 0.7803612947
+ 0.7810173035
+ 0.7816702127
+ 0.7823230028
+ 0.7829759121
+ 0.7836287022
+ 0.7842816114
+ 0.7849345207
+ 0.7855864167
+ 0.7862372994
+ 0.7868881822
+ 0.7875390053
+ 0.7881898880
+ 0.7888407707
+ 0.7894915938
+ 0.7901493907
+ 0.7908108234
+ 0.7914720774
+ 0.7921335101
+ 0.7927948833
+ 0.7934563160
+ 0.7941176295
+ 0.7947735190
+ 0.7954280972
+ 0.7960826755
+ 0.7967371941
+ 0.7973917723
+ 0.7980462909
+ 0.7987009287
+ 0.7993466258
+ 0.7999910712
+ 0.8006355762
+ 0.8012802005
+ 0.8019247055
+ 0.8025692105
+ 0.8032137156
+ 0.8038467169
+ 0.8044781089
+ 0.8051096201
+ 0.8057410121
+ 0.8063725233
+ 0.8070039153
+ 0.8076354265
+ 0.8082551956
+ 0.8088722229
+ 0.8094893098
+ 0.8101062775
+ 0.8107234240
+ 0.8113403916
+ 0.8119574785
+ 0.8125758171
+ 0.8131948113
+ 0.8138139248
+ 0.8144329190
+ 0.8150519133
+ 0.8156709075
+ 0.8162900209
+ 0.8169054985
+ 0.8175162077
+ 0.8181269169
+ 0.8187375069
+ 0.8193482161
+ 0.8199589252
+ 0.8205695748
+ 0.8211792707
+ 0.8217806220
+ 0.8223819733
+ 0.8229833841
+ 0.8235847950
+ 0.8241862059
+ 0.8247876167
+ 0.8253890276
+ 0.8259866834
+ 0.8265830278
+ 0.8271793127
+ 0.8277755976
+ 0.8283720016
+ 0.8289682865
+ 0.8295645714
+ 0.8301581144
+ 0.8307436705
+ 0.8313292861
+ 0.8319149017
+ 0.8325005174
+ 0.8330860734
+ 0.8336716890
+ 0.8342573047
+ 0.8348429799
+ 0.8354287148
+ 0.8360143900
+ 0.8366001844
+ 0.8371859193
+ 0.8377715945
+ 0.8383573294
+ 0.8389438987
+ 0.8395407200
+ 0.8401374817
+ 0.8407343030
+ 0.8413311243
+ 0.8419278860
+ 0.8425247073
+ 0.8431215286
+ 0.8437163830
+ 0.8443077803
+ 0.8448992968
+ 0.8454906940
+ 0.8460822105
+ 0.8466736078
+ 0.8472651243
+ 0.8478565216
+ 0.8484436274
+ 0.8490272760
+ 0.8496111035
+ 0.8501948714
+ 0.8507785797
+ 0.8513624072
+ 0.8519461155
+ 0.8525298834
+ 0.8531131744
+ 0.8536962271
+ 0.8542792201
+ 0.8548622131
+ 0.8554453254
+ 0.8560283184
+ 0.8566113114
+ 0.8571943045
+ 0.8577736020
+ 0.8583512902
+ 0.8589290977
+ 0.8595069051
+ 0.8600847125
+ 0.8606625199
+ 0.8612403274
+ 0.8618180752
+ 0.8624026775
+ 0.8629906178
+ 0.8635786176
+ 0.8641664982
+ 0.8647544980
+ 0.8653423786
+ 0.8659303784
+ 0.8665183187
+ 0.8671081066
+ 0.8676996231
+ 0.8682910800
+ 0.8688824773
+ 0.8694739938
+ 0.8700655103
+ 0.8706569076
+ 0.8712484241
+ 0.8718379140
+ 0.8724226952
+ 0.8730074763
+ 0.8735923171
+ 0.8741770983
+ 0.8747618794
+ 0.8753467202
+ 0.8759315014
+ 0.8765162826
+ 0.8770982027
+ 0.8776800036
+ 0.8782619238
+ 0.8788437843
+ 0.8794255853
+ 0.8800075054
+ 0.8805894256
+ 0.8811712265
+ 0.8817477226
+ 0.8823202848
+ 0.8828929067
+ 0.8834654093
+ 0.8840379715
+ 0.8846104741
+ 0.8851830959
+ 0.8857555985
+ 0.8863282800
+ 0.8869022727
+ 0.8874762058
+ 0.8880501986
+ 0.8886241913
+ 0.8891981244
+ 0.8897721171
+ 0.8903459907
+ 0.8909199834
+ 0.8914952874
+ 0.8920720220
+ 0.8926486969
+ 0.8932253718
+ 0.8938022256
+ 0.8943789005
+ 0.8949555755
+ 0.8955323100
+ 0.8961089849
+ 0.8966785073
+ 0.8972461224
+ 0.8978137970
+ 0.8983814716
+ 0.8989492059
+ 0.8995168209
+ 0.9000844955
+ 0.9006522298
+ 0.9012197256
+ 0.9017801881
+ 0.9023407102
+ 0.9029011726
+ 0.9034616947
+ 0.9040222168
+ 0.9045826793
+ 0.9051432014
+ 0.9057037234
+ 0.9062626958
+ 0.9068132043
+ 0.9073637128
+ 0.9079142213
+ 0.9084647894
+ 0.9090152979
+ 0.9095658064
+ 0.9101163149
+ 0.9106668234
+ 0.9112154245
+ 0.9117550254
+ 0.9122946858
+ 0.9128342867
+ 0.9133738875
+ 0.9139136076
+ 0.9144532084
+ 0.9149928093
+ 0.9155325294
+ 0.9160724878
+ 0.9166154861
+ 0.9171584845
+ 0.9177014828
+ 0.9182446003
+ 0.9187875986
+ 0.9193305969
+ 0.9198735952
+ 0.9204165936
+ 0.9209595919
+ 0.9214972854
+ 0.9220345020
+ 0.9225717783
+ 0.9231091142
+ 0.9236463904
+ 0.9241837263
+ 0.9247208834
+ 0.9252582192
+ 0.9257954955
+ 0.9263281822
+ 0.9268587828
+ 0.9273893833
+ 0.9279199839
+ 0.9284505248
+ 0.9289811254
+ 0.9295117259
+ 0.9300423265
+ 0.9305728078
+ 0.9311010838
+ 0.9316242933
+ 0.9321475029
+ 0.9326707125
+ 0.9331939220
+ 0.9337170720
+ 0.9342402816
+ 0.9347636104
+ 0.9352868199
+ 0.9358100295
+ 0.9363203049
+ 0.9368283749
+ 0.9373363853
+ 0.9378443956
+ 0.9383524060
+ 0.9388604164
+ 0.9393684268
+ 0.9398764968
+ 0.9403845072
+ 0.9408923984
+ 0.9413998723
+ 0.9419075251
+ 0.9424151182
+ 0.9429225922
+ 0.9434301853
+ 0.9439377785
+ 0.9444453120
+ 0.9449529052
+ 0.9454603791
+ 0.9459722042
+ 0.9464867711
+ 0.9470013976
+ 0.9475159049
+ 0.9480304718
+ 0.9485449791
+ 0.9490596056
+ 0.9495741725
+ 0.9500886798
+ 0.9506033063
+ 0.9511142969
+ 0.9516245127
+ 0.9521347880
+ 0.9526450038
+ 0.9531552196
+ 0.9536654949
+ 0.9541757107
+ 0.9546859264
+ 0.9551960826
+ 0.9557064176
+ 0.9562019110
+ 0.9566963911
+ 0.9571908712
+ 0.9576854110
+ 0.9581798911
+ 0.9586743712
+ 0.9591689110
+ 0.9596635103
+ 0.9601579905
+ 0.9606524706
+ 0.9611294270
+ 0.9616053104
+ 0.9620811939
+ 0.9625570774
+ 0.9630330205
+ 0.9635089040
+ 0.9639847875
+ 0.9644606709
+ 0.9649366140
+ 0.9654123783
+ 0.9658750892
+ 0.9663354158
+ 0.9667956829
+ 0.9672560096
+ 0.9677162170
+ 0.9681764841
+ 0.9686368108
+ 0.9690970778
+ 0.9695574045
+ 0.9700176120
+ 0.9704771042
+ 0.9709361196
+ 0.9713950753
+ 0.9718540907
+ 0.9723131061
+ 0.9727721214
+ 0.9732310772
+ 0.9736900926
+ 0.9741491079
+ 0.9746081829
+ 0.9750655293
+ 0.9755191803
+ 0.9759730101
+ 0.9764267206
+ 0.9768803716
+ 0.9773342013
+ 0.9777879119
+ 0.9782416821
+ 0.9786953926
+ 0.9791491032
+ 0.9796028733
+ 0.9800477028
+ 0.9804913998
+ 0.9809350967
+ 0.9813787937
+ 0.9818224907
+ 0.9822661877
+ 0.9827098846
+ 0.9831535816
+ 0.9835972786
+ 0.9840409756
+ 0.9844785929
+ 0.9849042296
+ 0.9853296876
+ 0.9857553244
+ 0.9861809015
+ 0.9866064787
+ 0.9870321155
+ 0.9874576926
+ 0.9878833294
+ 0.9883089066
+ 0.9887344837
+ 0.9891439080
+ 0.9895455837
+ 0.9899473190
+ 0.9903489947
+ 0.9907506704
+ 0.9911524057
+ 0.9915542006
+ 0.9919558764
+ 0.9923576117
+ 0.9927592874
+ 0.9931610227
+ 0.9935230017
+ 0.9938808084
+ 0.9942384958
+ 0.9945963025
+ 0.9949539900
+ 0.9953116775
+ 0.9956694841
+ 0.9960271716
+ 0.9963849783
+ 0.9967427254
+ 0.9970995188
+ 0.9973632097
+ 0.9976267815
+ 0.9978904724
+ 0.9981542230
+ 0.9984179139
+ 0.9986816049
+ 0.9989452958
+ 0.9992089272
+ 0.9994726181
+ 0.9997363091
+ 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/eastman_double_x_neg_5min.spi1d b/release/datafiles/colormanagement/luts/film_response/eastman_double_x_neg_5min.spi1d
new file mode 100644
index 00000000000..d199eba7b45
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/eastman_double_x_neg_5min.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 1
+{
+ 0.0000000000
+ 0.0030272121
+ 0.0063094199
+ 0.0098175881
+ 0.0132390903
+ 0.0165068507
+ 0.0197617300
+ 0.0230012909
+ 0.0261860900
+ 0.0293740109
+ 0.0325979404
+ 0.0358636007
+ 0.0391314887
+ 0.0424252301
+ 0.0457398184
+ 0.0491124503
+ 0.0525345095
+ 0.0558606908
+ 0.0591593795
+ 0.0623592213
+ 0.0656063929
+ 0.0688082799
+ 0.0719619915
+ 0.0750681385
+ 0.0781241581
+ 0.0811320320
+ 0.0840930864
+ 0.0869851932
+ 0.0898269489
+ 0.0926580206
+ 0.0954112411
+ 0.0981268808
+ 0.1008647010
+ 0.1035747007
+ 0.1062444001
+ 0.1088567972
+ 0.1114612967
+ 0.1140118018
+ 0.1165103987
+ 0.1189728975
+ 0.1214018017
+ 0.1238031015
+ 0.1261426061
+ 0.1285005063
+ 0.1308861971
+ 0.1332633942
+ 0.1356558949
+ 0.1380044073
+ 0.1403446943
+ 0.1426548958
+ 0.1449654996
+ 0.1472640932
+ 0.1495569050
+ 0.1518307030
+ 0.1540544927
+ 0.1562412977
+ 0.1584434956
+ 0.1606242061
+ 0.1627897024
+ 0.1649412066
+ 0.1670477986
+ 0.1691658944
+ 0.1713186055
+ 0.1734748930
+ 0.1756159067
+ 0.1777509004
+ 0.1798588932
+ 0.1819704026
+ 0.1841046959
+ 0.1862291992
+ 0.1883134991
+ 0.1904103011
+ 0.1924743056
+ 0.1944988072
+ 0.1965171993
+ 0.1985401064
+ 0.2005351931
+ 0.2025036067
+ 0.2044758946
+ 0.2064372003
+ 0.2083602995
+ 0.2102862000
+ 0.2122135013
+ 0.2141225934
+ 0.2159958929
+ 0.2178680003
+ 0.2197511047
+ 0.2216199934
+ 0.2234732956
+ 0.2253248990
+ 0.2271879017
+ 0.2290568948
+ 0.2309205979
+ 0.2327875942
+ 0.2346781045
+ 0.2365760058
+ 0.2384558022
+ 0.2403216064
+ 0.2421821058
+ 0.2440275997
+ 0.2458492070
+ 0.2476378977
+ 0.2494101971
+ 0.2511883080
+ 0.2529624104
+ 0.2547251880
+ 0.2564688921
+ 0.2581931055
+ 0.2599115074
+ 0.2616336942
+ 0.2633337080
+ 0.2650091052
+ 0.2666670084
+ 0.2683193982
+ 0.2699855864
+ 0.2716380954
+ 0.2732735872
+ 0.2748895884
+ 0.2764844894
+ 0.2780745029
+ 0.2796624005
+ 0.2812372148
+ 0.2827902138
+ 0.2843335867
+ 0.2858856916
+ 0.2874445021
+ 0.2890088856
+ 0.2905732989
+ 0.2921339869
+ 0.2936922908
+ 0.2952659130
+ 0.2968513072
+ 0.2984412909
+ 0.3000228107
+ 0.3015750945
+ 0.3031128943
+ 0.3046396971
+ 0.3061710894
+ 0.3077040017
+ 0.3092370927
+ 0.3107506931
+ 0.3122516870
+ 0.3137294054
+ 0.3152104020
+ 0.3166939020
+ 0.3181836009
+ 0.3196648061
+ 0.3211343884
+ 0.3225882053
+ 0.3240387142
+ 0.3254922032
+ 0.3269436955
+ 0.3283936083
+ 0.3298347890
+ 0.3312718868
+ 0.3326953948
+ 0.3341206014
+ 0.3355478048
+ 0.3369952142
+ 0.3384498060
+ 0.3399038017
+ 0.3413537145
+ 0.3427903950
+ 0.3442232013
+ 0.3456513882
+ 0.3470813930
+ 0.3485122919
+ 0.3499529958
+ 0.3513954878
+ 0.3528392911
+ 0.3542819917
+ 0.3557189107
+ 0.3571557105
+ 0.3585920930
+ 0.3600325882
+ 0.3614800870
+ 0.3629246950
+ 0.3643657863
+ 0.3657987118
+ 0.3672237992
+ 0.3686499894
+ 0.3700770140
+ 0.3714995086
+ 0.3729186952
+ 0.3743284941
+ 0.3757312894
+ 0.3771198094
+ 0.3784962893
+ 0.3798680007
+ 0.3812347949
+ 0.3826048970
+ 0.3839792907
+ 0.3853527904
+ 0.3867248893
+ 0.3880946934
+ 0.3894568980
+ 0.3908174038
+ 0.3921599090
+ 0.3935025036
+ 0.3948425949
+ 0.3961825073
+ 0.3975262940
+ 0.3988716006
+ 0.4002110064
+ 0.4015452862
+ 0.4028792977
+ 0.4042125046
+ 0.4055452049
+ 0.4068675935
+ 0.4081901014
+ 0.4095175862
+ 0.4108465910
+ 0.4121741951
+ 0.4135001898
+ 0.4148246050
+ 0.4161387980
+ 0.4174529910
+ 0.4187706113
+ 0.4200890958
+ 0.4214057028
+ 0.4227195084
+ 0.4240333140
+ 0.4253349006
+ 0.4266364872
+ 0.4279260933
+ 0.4292064011
+ 0.4304861128
+ 0.4317606986
+ 0.4330351949
+ 0.4343157113
+ 0.4355998933
+ 0.4368841946
+ 0.4381690919
+ 0.4394541085
+ 0.4407306015
+ 0.4420005977
+ 0.4432705939
+ 0.4445107877
+ 0.4457508922
+ 0.4469895065
+ 0.4482258856
+ 0.4494622052
+ 0.4506838918
+ 0.4519014955
+ 0.4531166852
+ 0.4543156028
+ 0.4555146098
+ 0.4567095041
+ 0.4578996897
+ 0.4590897858
+ 0.4602785110
+ 0.4614667892
+ 0.4626550078
+ 0.4638502896
+ 0.4650456905
+ 0.4662390947
+ 0.4674263895
+ 0.4686135948
+ 0.4697979987
+ 0.4709784091
+ 0.4721589088
+ 0.4733403027
+ 0.4745222926
+ 0.4757043123
+ 0.4768933952
+ 0.4780850112
+ 0.4792765081
+ 0.4804633856
+ 0.4816494882
+ 0.4828355014
+ 0.4839955866
+ 0.4851537943
+ 0.4863120019
+ 0.4874627888
+ 0.4886133969
+ 0.4897640944
+ 0.4909220040
+ 0.4920799136
+ 0.4932379127
+ 0.4943912029
+ 0.4955444932
+ 0.4966978133
+ 0.4978221059
+ 0.4989440143
+ 0.5000659823
+ 0.5011757016
+ 0.5022830963
+ 0.5033904910
+ 0.5044888854
+ 0.5055838823
+ 0.5066789985
+ 0.5077672005
+ 0.5088503957
+ 0.5099335909
+ 0.5110126734
+ 0.5120856166
+ 0.5131585002
+ 0.5142297745
+ 0.5152938962
+ 0.5163578987
+ 0.5174219012
+ 0.5184922814
+ 0.5195631981
+ 0.5206341147
+ 0.5217061043
+ 0.5227789283
+ 0.5238515735
+ 0.5249236822
+ 0.5259944201
+ 0.5270652175
+ 0.5281358957
+ 0.5291953087
+ 0.5302540064
+ 0.5313128233
+ 0.5323665738
+ 0.5334162712
+ 0.5344660282
+ 0.5355166197
+ 0.5365738273
+ 0.5376309752
+ 0.5386883020
+ 0.5397393703
+ 0.5407869816
+ 0.5418345928
+ 0.5428798199
+ 0.5439077020
+ 0.5449357033
+ 0.5459637046
+ 0.5469853878
+ 0.5480024219
+ 0.5490195155
+ 0.5500364900
+ 0.5510535836
+ 0.5520707965
+ 0.5530878901
+ 0.5541033745
+ 0.5551161170
+ 0.5561287999
+ 0.5571414828
+ 0.5581471920
+ 0.5591498017
+ 0.5601524115
+ 0.5611549020
+ 0.5621367097
+ 0.5631183982
+ 0.5641000271
+ 0.5650776029
+ 0.5660427809
+ 0.5670080781
+ 0.5679733753
+ 0.5689417124
+ 0.5699135065
+ 0.5708853006
+ 0.5718570948
+ 0.5728263855
+ 0.5737943053
+ 0.5747622252
+ 0.5757302046
+ 0.5766975880
+ 0.5776649117
+ 0.5786321759
+ 0.5795994997
+ 0.5805698037
+ 0.5815405250
+ 0.5825111270
+ 0.5834817886
+ 0.5844538808
+ 0.5854260921
+ 0.5863983035
+ 0.5873705745
+ 0.5883414149
+ 0.5893121958
+ 0.5902829766
+ 0.5912536979
+ 0.5922099948
+ 0.5931643248
+ 0.5941184759
+ 0.5950728059
+ 0.5960159898
+ 0.5969563723
+ 0.5978966951
+ 0.5988370776
+ 0.5997706056
+ 0.6007006764
+ 0.6016308069
+ 0.6025608182
+ 0.6034846902
+ 0.6044021845
+ 0.6053197980
+ 0.6062374115
+ 0.6071522832
+ 0.6080605984
+ 0.6089687943
+ 0.6098771095
+ 0.6107851863
+ 0.6116871238
+ 0.6125890017
+ 0.6134908795
+ 0.6143928170
+ 0.6152886152
+ 0.6161820889
+ 0.6170755029
+ 0.6179689765
+ 0.6188614964
+ 0.6197524071
+ 0.6206433773
+ 0.6215342879
+ 0.6224251986
+ 0.6233009100
+ 0.6241760254
+ 0.6250510812
+ 0.6259261966
+ 0.6267927885
+ 0.6276513934
+ 0.6285099983
+ 0.6293684840
+ 0.6302270889
+ 0.6310849786
+ 0.6319429278
+ 0.6328008175
+ 0.6336587071
+ 0.6345123053
+ 0.6353611946
+ 0.6362100244
+ 0.6370587945
+ 0.6379076838
+ 0.6387491822
+ 0.6395896077
+ 0.6404299736
+ 0.6412703991
+ 0.6421101093
+ 0.6429476142
+ 0.6437851191
+ 0.6446226835
+ 0.6454601884
+ 0.6463015079
+ 0.6471462250
+ 0.6479908824
+ 0.6488355994
+ 0.6496803164
+ 0.6505240798
+ 0.6513677835
+ 0.6522114873
+ 0.6530550718
+ 0.6538987756
+ 0.6547306180
+ 0.6555622816
+ 0.6563938856
+ 0.6572256088
+ 0.6580554843
+ 0.6588743925
+ 0.6596933007
+ 0.6605123281
+ 0.6613311768
+ 0.6621484160
+ 0.6629601717
+ 0.6637719870
+ 0.6645838022
+ 0.6653956175
+ 0.6662080288
+ 0.6670222878
+ 0.6678364873
+ 0.6686508060
+ 0.6694651246
+ 0.6702783108
+ 0.6710888147
+ 0.6718993187
+ 0.6727098227
+ 0.6735203266
+ 0.6743295789
+ 0.6751338840
+ 0.6759383082
+ 0.6767426133
+ 0.6775469780
+ 0.6783509851
+ 0.6791514158
+ 0.6799517870
+ 0.6807522774
+ 0.6815527081
+ 0.6823530793
+ 0.6831542850
+ 0.6839554906
+ 0.6847568154
+ 0.6855580211
+ 0.6863592863
+ 0.6871563792
+ 0.6879516244
+ 0.6887468100
+ 0.6895419955
+ 0.6903371215
+ 0.6911249757
+ 0.6919013262
+ 0.6926776171
+ 0.6934539080
+ 0.6942301989
+ 0.6950061917
+ 0.6957769990
+ 0.6965478063
+ 0.6973184943
+ 0.6980893016
+ 0.6988599896
+ 0.6996240020
+ 0.7003840208
+ 0.7011440992
+ 0.7019041181
+ 0.7026641965
+ 0.7034214735
+ 0.7041661143
+ 0.7049108148
+ 0.7056553960
+ 0.7063999772
+ 0.7071446776
+ 0.7078785896
+ 0.7086068988
+ 0.7093350887
+ 0.7100633979
+ 0.7107917070
+ 0.7115197182
+ 0.7122437954
+ 0.7129678726
+ 0.7136920094
+ 0.7144160867
+ 0.7151402235
+ 0.7158653140
+ 0.7165917754
+ 0.7173182964
+ 0.7180448174
+ 0.7187712789
+ 0.7194977999
+ 0.7202196121
+ 0.7209396958
+ 0.7216597199
+ 0.7223798037
+ 0.7230998874
+ 0.7238199711
+ 0.7245283127
+ 0.7252361774
+ 0.7259441018
+ 0.7266520858
+ 0.7273600101
+ 0.7280663252
+ 0.7287629247
+ 0.7294594049
+ 0.7301560044
+ 0.7308526039
+ 0.7315490842
+ 0.7322456241
+ 0.7329418063
+ 0.7336379886
+ 0.7343341708
+ 0.7350304127
+ 0.7357265949
+ 0.7364248037
+ 0.7371274829
+ 0.7378302813
+ 0.7385330200
+ 0.7392356992
+ 0.7399383783
+ 0.7406404018
+ 0.7413403988
+ 0.7420405149
+ 0.7427405119
+ 0.7434405088
+ 0.7441406250
+ 0.7448390722
+ 0.7455317974
+ 0.7462245226
+ 0.7469171882
+ 0.7476099133
+ 0.7483025789
+ 0.7489954233
+ 0.7496907115
+ 0.7503858805
+ 0.7510811090
+ 0.7517763972
+ 0.7524716258
+ 0.7531669140
+ 0.7538704872
+ 0.7545759082
+ 0.7552812099
+ 0.7559865713
+ 0.7566918731
+ 0.7573972940
+ 0.7581034899
+ 0.7588102818
+ 0.7595170736
+ 0.7602239251
+ 0.7609307170
+ 0.7616376281
+ 0.7623426914
+ 0.7630413175
+ 0.7637398839
+ 0.7644385099
+ 0.7651370764
+ 0.7658355832
+ 0.7665342093
+ 0.7672234178
+ 0.7679098845
+ 0.7685962915
+ 0.7692828178
+ 0.7699692845
+ 0.7706558108
+ 0.7713416219
+ 0.7720258832
+ 0.7727100849
+ 0.7733944058
+ 0.7740787268
+ 0.7747629285
+ 0.7754471898
+ 0.7761262059
+ 0.7768033743
+ 0.7774804831
+ 0.7781575918
+ 0.7788347006
+ 0.7795119286
+ 0.7801874876
+ 0.7808486819
+ 0.7815099955
+ 0.7821711898
+ 0.7828325033
+ 0.7834938169
+ 0.7841550112
+ 0.7848129869
+ 0.7854657769
+ 0.7861186266
+ 0.7867714167
+ 0.7874242067
+ 0.7880769968
+ 0.7887297869
+ 0.7893806100
+ 0.7900301814
+ 0.7906798124
+ 0.7913293839
+ 0.7919788957
+ 0.7926285267
+ 0.7932780981
+ 0.7939221859
+ 0.7945647836
+ 0.7952073216
+ 0.7958499193
+ 0.7964923978
+ 0.7971348763
+ 0.7977774739
+ 0.7984188199
+ 0.7990599275
+ 0.7997009754
+ 0.8003420234
+ 0.8009830713
+ 0.8016241789
+ 0.8022652864
+ 0.8028982282
+ 0.8035295010
+ 0.8041607738
+ 0.8047922254
+ 0.8054234982
+ 0.8060547709
+ 0.8066862226
+ 0.8073112965
+ 0.8079345822
+ 0.8085579276
+ 0.8091812134
+ 0.8098044991
+ 0.8104277253
+ 0.8110510111
+ 0.8116706014
+ 0.8122878075
+ 0.8129050136
+ 0.8135222197
+ 0.8141394854
+ 0.8147566915
+ 0.8153738976
+ 0.8159893751
+ 0.8166022897
+ 0.8172150850
+ 0.8178278804
+ 0.8184407949
+ 0.8190535903
+ 0.8196663857
+ 0.8202791214
+ 0.8208892941
+ 0.8214995861
+ 0.8221098781
+ 0.8227202296
+ 0.8233304024
+ 0.8239406943
+ 0.8245509863
+ 0.8251606226
+ 0.8257699013
+ 0.8263791800
+ 0.8269885182
+ 0.8275977969
+ 0.8282071948
+ 0.8288164735
+ 0.8294249773
+ 0.8300309777
+ 0.8306369781
+ 0.8312429786
+ 0.8318489790
+ 0.8324549794
+ 0.8330609798
+ 0.8336669207
+ 0.8342692852
+ 0.8348699808
+ 0.8354706764
+ 0.8360713720
+ 0.8366721272
+ 0.8372727036
+ 0.8378733993
+ 0.8384736776
+ 0.8390662074
+ 0.8396586180
+ 0.8402510881
+ 0.8408436179
+ 0.8414360881
+ 0.8420284986
+ 0.8426210284
+ 0.8432112932
+ 0.8437972069
+ 0.8443831801
+ 0.8449690938
+ 0.8455551267
+ 0.8461410999
+ 0.8467270136
+ 0.8473129869
+ 0.8479040265
+ 0.8484994769
+ 0.8490949273
+ 0.8496903181
+ 0.8502858281
+ 0.8508812189
+ 0.8514766097
+ 0.8520721197
+ 0.8526653051
+ 0.8532572985
+ 0.8538494110
+ 0.8544414043
+ 0.8550335169
+ 0.8556255102
+ 0.8562176228
+ 0.8568096161
+ 0.8573905230
+ 0.8579664230
+ 0.8585423827
+ 0.8591184020
+ 0.8596943021
+ 0.8602703214
+ 0.8608462811
+ 0.8614221811
+ 0.8619980216
+ 0.8625736833
+ 0.8631494045
+ 0.8637250066
+ 0.8643007278
+ 0.8648763895
+ 0.8654521108
+ 0.8660277128
+ 0.8666040897
+ 0.8671810031
+ 0.8677579761
+ 0.8683350086
+ 0.8689119220
+ 0.8694888949
+ 0.8700659275
+ 0.8706427813
+ 0.8712193966
+ 0.8717948198
+ 0.8723701835
+ 0.8729457259
+ 0.8735210896
+ 0.8740965128
+ 0.8746719956
+ 0.8752474189
+ 0.8758227825
+ 0.8763949871
+ 0.8769670129
+ 0.8775389791
+ 0.8781110048
+ 0.8786829710
+ 0.8792549968
+ 0.8798270226
+ 0.8803989887
+ 0.8809679747
+ 0.8815342784
+ 0.8821007013
+ 0.8826671243
+ 0.8832334876
+ 0.8837999105
+ 0.8843662143
+ 0.8849325776
+ 0.8854988217
+ 0.8860610127
+ 0.8866233230
+ 0.8871855140
+ 0.8877478242
+ 0.8883100748
+ 0.8888723254
+ 0.8894345760
+ 0.8899968266
+ 0.8905580044
+ 0.8911178112
+ 0.8916776180
+ 0.8922374249
+ 0.8927971721
+ 0.8933569789
+ 0.8939167857
+ 0.8944765925
+ 0.8950363994
+ 0.8955954909
+ 0.8961544037
+ 0.8967131972
+ 0.8972721100
+ 0.8978309035
+ 0.8983898163
+ 0.8989487290
+ 0.8995075226
+ 0.9000663757
+ 0.9006261230
+ 0.9011856914
+ 0.9017453790
+ 0.9023050070
+ 0.9028646946
+ 0.9034243226
+ 0.9039840102
+ 0.9045435786
+ 0.9051036239
+ 0.9056655169
+ 0.9062274098
+ 0.9067893028
+ 0.9073511958
+ 0.9079130888
+ 0.9084749818
+ 0.9090368748
+ 0.9095988274
+ 0.9101592898
+ 0.9107123017
+ 0.9112653136
+ 0.9118183255
+ 0.9123712182
+ 0.9129241705
+ 0.9134771824
+ 0.9140301943
+ 0.9145832062
+ 0.9151350856
+ 0.9156765938
+ 0.9162181020
+ 0.9167596102
+ 0.9173009992
+ 0.9178425074
+ 0.9183840156
+ 0.9189255238
+ 0.9194669724
+ 0.9200084805
+ 0.9205374122
+ 0.9210653901
+ 0.9215933084
+ 0.9221212864
+ 0.9226492047
+ 0.9231771827
+ 0.9237051010
+ 0.9242330790
+ 0.9247609973
+ 0.9252843857
+ 0.9258053899
+ 0.9263263941
+ 0.9268475175
+ 0.9273685217
+ 0.9278895855
+ 0.9284105897
+ 0.9289315939
+ 0.9294527173
+ 0.9299737811
+ 0.9304950833
+ 0.9310163260
+ 0.9315376282
+ 0.9320588708
+ 0.9325801730
+ 0.9331014752
+ 0.9336227179
+ 0.9341440201
+ 0.9346653223
+ 0.9351785183
+ 0.9356899858
+ 0.9362015128
+ 0.9367129803
+ 0.9372245073
+ 0.9377359748
+ 0.9382475019
+ 0.9387590289
+ 0.9392704964
+ 0.9397779703
+ 0.9402741790
+ 0.9407703876
+ 0.9412665963
+ 0.9417628050
+ 0.9422590733
+ 0.9427552819
+ 0.9432514906
+ 0.9437476993
+ 0.9442439079
+ 0.9447419047
+ 0.9452412128
+ 0.9457404017
+ 0.9462395906
+ 0.9467388988
+ 0.9472380877
+ 0.9477373958
+ 0.9482365847
+ 0.9487358928
+ 0.9492350817
+ 0.9497361183
+ 0.9502375722
+ 0.9507390261
+ 0.9512404203
+ 0.9517418742
+ 0.9522433281
+ 0.9527447820
+ 0.9532461762
+ 0.9537475705
+ 0.9542490840
+ 0.9547458887
+ 0.9552422762
+ 0.9557387233
+ 0.9562351704
+ 0.9567316175
+ 0.9572281241
+ 0.9577245116
+ 0.9582208991
+ 0.9587174058
+ 0.9592137933
+ 0.9596955180
+ 0.9601761103
+ 0.9606567025
+ 0.9611372948
+ 0.9616180062
+ 0.9620985985
+ 0.9625791907
+ 0.9630599022
+ 0.9635404944
+ 0.9640210867
+ 0.9644860029
+ 0.9649478793
+ 0.9654096961
+ 0.9658715725
+ 0.9663333893
+ 0.9667953253
+ 0.9672570825
+ 0.9677190185
+ 0.9681807756
+ 0.9686427116
+ 0.9691007733
+ 0.9695566893
+ 0.9700127244
+ 0.9704685807
+ 0.9709244967
+ 0.9713804722
+ 0.9718363881
+ 0.9722923040
+ 0.9727482200
+ 0.9732041955
+ 0.9736583829
+ 0.9741089940
+ 0.9745596051
+ 0.9750102162
+ 0.9754608274
+ 0.9759113789
+ 0.9763619900
+ 0.9768124819
+ 0.9772630930
+ 0.9777137041
+ 0.9781643152
+ 0.9786108732
+ 0.9790568948
+ 0.9795029163
+ 0.9799489975
+ 0.9803950191
+ 0.9808409810
+ 0.9812871218
+ 0.9817330837
+ 0.9821791053
+ 0.9826251268
+ 0.9830691218
+ 0.9835088253
+ 0.9839485288
+ 0.9843881726
+ 0.9848278761
+ 0.9852675796
+ 0.9857072830
+ 0.9861469865
+ 0.9865866899
+ 0.9870265126
+ 0.9874662161
+ 0.9878935218
+ 0.9883149266
+ 0.9887362719
+ 0.9891576767
+ 0.9895790815
+ 0.9900006056
+ 0.9904220104
+ 0.9908434153
+ 0.9912648201
+ 0.9916862249
+ 0.9921076298
+ 0.9924955964
+ 0.9928798079
+ 0.9932640791
+ 0.9936484098
+ 0.9940326810
+ 0.9944170117
+ 0.9948012233
+ 0.9951854944
+ 0.9955698252
+ 0.9959540963
+ 0.9963378906
+ 0.9966707826
+ 0.9970036745
+ 0.9973366857
+ 0.9976695776
+ 0.9980025291
+ 0.9983354211
+ 0.9986683130
+ 0.9990012050
+ 0.9993342161
+ 0.9996671081
+ 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/eastman_double_x_neg_6min.spi1d b/release/datafiles/colormanagement/luts/film_response/eastman_double_x_neg_6min.spi1d
new file mode 100644
index 00000000000..1eb80666607
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/eastman_double_x_neg_6min.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 1
+{
+ 0.0000000000
+ 0.0022076759
+ 0.0048505990
+ 0.0077307681
+ 0.0106430203
+ 0.0134941395
+ 0.0164271407
+ 0.0193642899
+ 0.0222814996
+ 0.0253338106
+ 0.0283298604
+ 0.0312295891
+ 0.0340677910
+ 0.0368127897
+ 0.0395192690
+ 0.0422245711
+ 0.0448633991
+ 0.0473990701
+ 0.0498608798
+ 0.0522968508
+ 0.0547638610
+ 0.0572266914
+ 0.0596168712
+ 0.0619427115
+ 0.0641859174
+ 0.0663840473
+ 0.0685592070
+ 0.0707125664
+ 0.0728932172
+ 0.0750729963
+ 0.0772423595
+ 0.0793742388
+ 0.0814804435
+ 0.0835459232
+ 0.0855793729
+ 0.0876187608
+ 0.0896756127
+ 0.0917201489
+ 0.0937488973
+ 0.0957670510
+ 0.0977691785
+ 0.0997611210
+ 0.1017474979
+ 0.1037304029
+ 0.1057140008
+ 0.1076987982
+ 0.1096796989
+ 0.1116433963
+ 0.1136050969
+ 0.1155518964
+ 0.1174954027
+ 0.1194273010
+ 0.1213321984
+ 0.1232244000
+ 0.1250977069
+ 0.1269564033
+ 0.1288059056
+ 0.1306264997
+ 0.1324591935
+ 0.1342981011
+ 0.1361421049
+ 0.1379898936
+ 0.1398337930
+ 0.1416724026
+ 0.1435085982
+ 0.1453595012
+ 0.1472201943
+ 0.1490903944
+ 0.1509464979
+ 0.1527885944
+ 0.1546380967
+ 0.1564874053
+ 0.1583337933
+ 0.1601832062
+ 0.1620080024
+ 0.1638301015
+ 0.1656454057
+ 0.1674109995
+ 0.1691544950
+ 0.1708903015
+ 0.1726087034
+ 0.1743192971
+ 0.1760134995
+ 0.1776891053
+ 0.1793549061
+ 0.1810144931
+ 0.1826763004
+ 0.1843471974
+ 0.1860086024
+ 0.1876676977
+ 0.1893319935
+ 0.1910057068
+ 0.1926884055
+ 0.1943672001
+ 0.1960387975
+ 0.1977010965
+ 0.1993733943
+ 0.2010557055
+ 0.2027229965
+ 0.2043714970
+ 0.2060067058
+ 0.2076272964
+ 0.2092293054
+ 0.2108173966
+ 0.2123903036
+ 0.2139514983
+ 0.2155003995
+ 0.2170374990
+ 0.2185630947
+ 0.2200783044
+ 0.2215853930
+ 0.2230909020
+ 0.2245920002
+ 0.2260849029
+ 0.2275708020
+ 0.2290592045
+ 0.2305610031
+ 0.2320587039
+ 0.2335456014
+ 0.2350171953
+ 0.2364920974
+ 0.2379685044
+ 0.2394436002
+ 0.2409150004
+ 0.2423750013
+ 0.2438220978
+ 0.2452608943
+ 0.2466982007
+ 0.2481335998
+ 0.2495692968
+ 0.2510060966
+ 0.2524541020
+ 0.2539057136
+ 0.2553601861
+ 0.2568137050
+ 0.2582660913
+ 0.2597176135
+ 0.2611657083
+ 0.2626079023
+ 0.2640449107
+ 0.2654654086
+ 0.2668786049
+ 0.2682839036
+ 0.2696810961
+ 0.2710821927
+ 0.2724924982
+ 0.2739025056
+ 0.2753120065
+ 0.2767190933
+ 0.2781172097
+ 0.2795062065
+ 0.2808851004
+ 0.2822608054
+ 0.2836303115
+ 0.2849979103
+ 0.2863635123
+ 0.2877384126
+ 0.2891165912
+ 0.2905051112
+ 0.2918922901
+ 0.2932763994
+ 0.2946614027
+ 0.2960470021
+ 0.2974393070
+ 0.2988334000
+ 0.3002207875
+ 0.3016053140
+ 0.3029761910
+ 0.3043459952
+ 0.3057133853
+ 0.3070785999
+ 0.3084413111
+ 0.3098073900
+ 0.3111760020
+ 0.3125430048
+ 0.3139094114
+ 0.3152734935
+ 0.3166370094
+ 0.3179858923
+ 0.3193317950
+ 0.3206684887
+ 0.3220038116
+ 0.3233413100
+ 0.3246791065
+ 0.3260106146
+ 0.3273411989
+ 0.3286638856
+ 0.3299851120
+ 0.3313086033
+ 0.3326326013
+ 0.3339475095
+ 0.3352591991
+ 0.3365674019
+ 0.3378736973
+ 0.3391835093
+ 0.3404963911
+ 0.3418085873
+ 0.3431195915
+ 0.3444280922
+ 0.3457283974
+ 0.3470287025
+ 0.3483307958
+ 0.3496328890
+ 0.3509300053
+ 0.3522259891
+ 0.3535211980
+ 0.3548158109
+ 0.3561145067
+ 0.3574211001
+ 0.3587279022
+ 0.3600377142
+ 0.3613474965
+ 0.3626418114
+ 0.3639313877
+ 0.3652200997
+ 0.3665077984
+ 0.3677951992
+ 0.3690789044
+ 0.3703626096
+ 0.3716369867
+ 0.3729074895
+ 0.3741776943
+ 0.3754476011
+ 0.3767175078
+ 0.3779971004
+ 0.3792783916
+ 0.3805550933
+ 0.3818249106
+ 0.3830947876
+ 0.3843517900
+ 0.3856075108
+ 0.3868649006
+ 0.3881247044
+ 0.3893845975
+ 0.3906409144
+ 0.3918966949
+ 0.3931471109
+ 0.3943845928
+ 0.3956221938
+ 0.3968513906
+ 0.3980770111
+ 0.3993020058
+ 0.4005202949
+ 0.4017386138
+ 0.4029510021
+ 0.4041553140
+ 0.4053595066
+ 0.4065566957
+ 0.4077515006
+ 0.4089460075
+ 0.4101307988
+ 0.4113157094
+ 0.4124985933
+ 0.4136764109
+ 0.4148542881
+ 0.4160273969
+ 0.4171960950
+ 0.4183647931
+ 0.4195275903
+ 0.4206880033
+ 0.4218483865
+ 0.4230014086
+ 0.4241535068
+ 0.4253054857
+ 0.4264521897
+ 0.4275988936
+ 0.4287458956
+ 0.4298943877
+ 0.4310429096
+ 0.4321908951
+ 0.4333373010
+ 0.4344835877
+ 0.4356265068
+ 0.4367592037
+ 0.4378919899
+ 0.4390229881
+ 0.4401493967
+ 0.4412758946
+ 0.4424026012
+ 0.4435302019
+ 0.4446578026
+ 0.4457832873
+ 0.4469003975
+ 0.4480175972
+ 0.4491330087
+ 0.4502356052
+ 0.4513381124
+ 0.4524405897
+ 0.4535480142
+ 0.4546554983
+ 0.4557628930
+ 0.4568733871
+ 0.4579845965
+ 0.4590956867
+ 0.4602054060
+ 0.4613144100
+ 0.4624234140
+ 0.4635319114
+ 0.4646396935
+ 0.4657475054
+ 0.4668546915
+ 0.4679591954
+ 0.4690637887
+ 0.4701682925
+ 0.4712668061
+ 0.4723646045
+ 0.4734624028
+ 0.4745511115
+ 0.4756326973
+ 0.4767143130
+ 0.4777936935
+ 0.4788640141
+ 0.4799341857
+ 0.4810045063
+ 0.4820767939
+ 0.4831495881
+ 0.4842225015
+ 0.4852963984
+ 0.4863724113
+ 0.4874483049
+ 0.4885242879
+ 0.4895890057
+ 0.4906522930
+ 0.4917156994
+ 0.4927777052
+ 0.4938377142
+ 0.4948976934
+ 0.4959576130
+ 0.4970098138
+ 0.4980604947
+ 0.4991110861
+ 0.5001580119
+ 0.5011935830
+ 0.5022290945
+ 0.5032647252
+ 0.5042961836
+ 0.5053253174
+ 0.5063543916
+ 0.5073835254
+ 0.5083957911
+ 0.5094074011
+ 0.5104188919
+ 0.5114263892
+ 0.5124220848
+ 0.5134177208
+ 0.5144132972
+ 0.5154060721
+ 0.5163959265
+ 0.5173857808
+ 0.5183756948
+ 0.5193517208
+ 0.5203220844
+ 0.5212926269
+ 0.5222629905
+ 0.5232200027
+ 0.5241754055
+ 0.5251306891
+ 0.5260860920
+ 0.5270460844
+ 0.5280060768
+ 0.5289661288
+ 0.5299252272
+ 0.5308769941
+ 0.5318287015
+ 0.5327805281
+ 0.5337300897
+ 0.5346677899
+ 0.5356054902
+ 0.5365431905
+ 0.5374808908
+ 0.5384188890
+ 0.5393568873
+ 0.5402948856
+ 0.5412318110
+ 0.5421609879
+ 0.5430902243
+ 0.5440192819
+ 0.5449479818
+ 0.5458660722
+ 0.5467841029
+ 0.5477020741
+ 0.5486202240
+ 0.5495285988
+ 0.5504361987
+ 0.5513436794
+ 0.5522512794
+ 0.5531492829
+ 0.5540440083
+ 0.5549386740
+ 0.5558333993
+ 0.5567305088
+ 0.5576295853
+ 0.5585287809
+ 0.5594279766
+ 0.5603266954
+ 0.5612239838
+ 0.5621213913
+ 0.5630186796
+ 0.5639160275
+ 0.5648062229
+ 0.5656958818
+ 0.5665857196
+ 0.5674753785
+ 0.5683673024
+ 0.5692604780
+ 0.5701537132
+ 0.5710470080
+ 0.5719397068
+ 0.5728303194
+ 0.5737208724
+ 0.5746114850
+ 0.5755020976
+ 0.5763865113
+ 0.5772687793
+ 0.5781511068
+ 0.5790333748
+ 0.5799121857
+ 0.5807796121
+ 0.5816469789
+ 0.5825144053
+ 0.5833817720
+ 0.5842388868
+ 0.5850911736
+ 0.5859435201
+ 0.5867958069
+ 0.5876480937
+ 0.5885003805
+ 0.5893527269
+ 0.5902050734
+ 0.5910574198
+ 0.5919092298
+ 0.5927603841
+ 0.5936114788
+ 0.5944626927
+ 0.5953139067
+ 0.5961607099
+ 0.5970060825
+ 0.5978515148
+ 0.5986968279
+ 0.5995422006
+ 0.6003857255
+ 0.6012291908
+ 0.6020725965
+ 0.6029161215
+ 0.6037604809
+ 0.6046084166
+ 0.6054564118
+ 0.6063044071
+ 0.6071524024
+ 0.6080002189
+ 0.6088476777
+ 0.6096950769
+ 0.6105425954
+ 0.6113901138
+ 0.6122344732
+ 0.6130748987
+ 0.6139153838
+ 0.6147558093
+ 0.6155961752
+ 0.6164314151
+ 0.6172606945
+ 0.6180900931
+ 0.6189194918
+ 0.6197488904
+ 0.6205750704
+ 0.6213976741
+ 0.6222202778
+ 0.6230428815
+ 0.6238654852
+ 0.6246876121
+ 0.6255089045
+ 0.6263303161
+ 0.6271517277
+ 0.6279730201
+ 0.6287912726
+ 0.6296015978
+ 0.6304119825
+ 0.6312224269
+ 0.6320326924
+ 0.6328420043
+ 0.6336416006
+ 0.6344411969
+ 0.6352407932
+ 0.6360403895
+ 0.6368399858
+ 0.6376360059
+ 0.6384313703
+ 0.6392267942
+ 0.6400222182
+ 0.6408177018
+ 0.6416134238
+ 0.6424095035
+ 0.6432055831
+ 0.6440016031
+ 0.6447976828
+ 0.6455929279
+ 0.6463851929
+ 0.6471775770
+ 0.6479700208
+ 0.6487624049
+ 0.6495547891
+ 0.6503387094
+ 0.6511209011
+ 0.6519030929
+ 0.6526852250
+ 0.6534674168
+ 0.6542478204
+ 0.6550251245
+ 0.6558023095
+ 0.6565796137
+ 0.6573567986
+ 0.6581341028
+ 0.6589120030
+ 0.6596900225
+ 0.6604681015
+ 0.6612461209
+ 0.6620242000
+ 0.6628038287
+ 0.6635876894
+ 0.6643714905
+ 0.6651554108
+ 0.6659392715
+ 0.6667230725
+ 0.6675077081
+ 0.6682925820
+ 0.6690775156
+ 0.6698623896
+ 0.6706473827
+ 0.6714323163
+ 0.6722124815
+ 0.6729924083
+ 0.6737722158
+ 0.6745520830
+ 0.6753318906
+ 0.6761127114
+ 0.6768987179
+ 0.6776847839
+ 0.6784707904
+ 0.6792567968
+ 0.6800428033
+ 0.6808322072
+ 0.6816287041
+ 0.6824250817
+ 0.6832215786
+ 0.6840180159
+ 0.6848145127
+ 0.6856052279
+ 0.6863880754
+ 0.6871711016
+ 0.6879541278
+ 0.6887369752
+ 0.6895200014
+ 0.6902992129
+ 0.6910743713
+ 0.6918495297
+ 0.6926246881
+ 0.6933997869
+ 0.6941748857
+ 0.6949504018
+ 0.6957262158
+ 0.6965019703
+ 0.6972777843
+ 0.6980537176
+ 0.6988294721
+ 0.6996037960
+ 0.7003753781
+ 0.7011470795
+ 0.7019187212
+ 0.7026903033
+ 0.7034620047
+ 0.7042315006
+ 0.7049934268
+ 0.7057551742
+ 0.7065169811
+ 0.7072789073
+ 0.7080407143
+ 0.7088025808
+ 0.7095500827
+ 0.7102975249
+ 0.7110450268
+ 0.7117924094
+ 0.7125399113
+ 0.7132872939
+ 0.7140312195
+ 0.7147734761
+ 0.7155159116
+ 0.7162582874
+ 0.7170007229
+ 0.7177429795
+ 0.7184851170
+ 0.7192267179
+ 0.7199681997
+ 0.7207098007
+ 0.7214512825
+ 0.7221928835
+ 0.7229344249
+ 0.7236632705
+ 0.7243912816
+ 0.7251192927
+ 0.7258473039
+ 0.7265753150
+ 0.7273033261
+ 0.7280253768
+ 0.7287402749
+ 0.7294551134
+ 0.7301700115
+ 0.7308847904
+ 0.7315996289
+ 0.7323145270
+ 0.7330235839
+ 0.7337319255
+ 0.7344402075
+ 0.7351484895
+ 0.7358567715
+ 0.7365651131
+ 0.7372738123
+ 0.7379835248
+ 0.7386932969
+ 0.7394030094
+ 0.7401127219
+ 0.7408224940
+ 0.7415322065
+ 0.7422450781
+ 0.7429605126
+ 0.7436760068
+ 0.7443913817
+ 0.7451068759
+ 0.7458223104
+ 0.7465378046
+ 0.7472481728
+ 0.7479571104
+ 0.7486659884
+ 0.7493749261
+ 0.7500838041
+ 0.7507926822
+ 0.7515016198
+ 0.7522053123
+ 0.7529084086
+ 0.7536116242
+ 0.7543147206
+ 0.7550178766
+ 0.7557209730
+ 0.7564241886
+ 0.7571367025
+ 0.7578495145
+ 0.7585622072
+ 0.7592749000
+ 0.7599875927
+ 0.7607002854
+ 0.7614130974
+ 0.7621260881
+ 0.7628390789
+ 0.7635521293
+ 0.7642651200
+ 0.7649781108
+ 0.7656911016
+ 0.7664040923
+ 0.7671093941
+ 0.7678139210
+ 0.7685185075
+ 0.7692229748
+ 0.7699275017
+ 0.7706320286
+ 0.7713364959
+ 0.7720378041
+ 0.7727380991
+ 0.7734382749
+ 0.7741385102
+ 0.7748388052
+ 0.7755389810
+ 0.7762392163
+ 0.7769402266
+ 0.7776417136
+ 0.7783433199
+ 0.7790448070
+ 0.7797464132
+ 0.7804480195
+ 0.7811495066
+ 0.7818514109
+ 0.7825546861
+ 0.7832580209
+ 0.7839611769
+ 0.7846645117
+ 0.7853677869
+ 0.7860711217
+ 0.7867742777
+ 0.7874720097
+ 0.7881684899
+ 0.7888649702
+ 0.7895615101
+ 0.7902579904
+ 0.7909544706
+ 0.7916510105
+ 0.7923467755
+ 0.7930412889
+ 0.7937358022
+ 0.7944303155
+ 0.7951248288
+ 0.7958192229
+ 0.7965136766
+ 0.7972081900
+ 0.7979041934
+ 0.7986006141
+ 0.7992969751
+ 0.7999933958
+ 0.8006898165
+ 0.8013861775
+ 0.8020825982
+ 0.8027787209
+ 0.8034735918
+ 0.8041685224
+ 0.8048635125
+ 0.8055583835
+ 0.8062533140
+ 0.8069481850
+ 0.8076431155
+ 0.8083345890
+ 0.8090218902
+ 0.8097093105
+ 0.8103966117
+ 0.8110839128
+ 0.8117712736
+ 0.8124585748
+ 0.8131459951
+ 0.8138281703
+ 0.8145077229
+ 0.8151872754
+ 0.8158668280
+ 0.8165463209
+ 0.8172258139
+ 0.8179054260
+ 0.8185849190
+ 0.8192651868
+ 0.8199456930
+ 0.8206261992
+ 0.8213067055
+ 0.8219872117
+ 0.8226677179
+ 0.8233482242
+ 0.8240286708
+ 0.8247126937
+ 0.8253976107
+ 0.8260825872
+ 0.8267675042
+ 0.8274524808
+ 0.8281373978
+ 0.8288223147
+ 0.8295072913
+ 0.8301901221
+ 0.8308722973
+ 0.8315544724
+ 0.8322365880
+ 0.8329188228
+ 0.8336008787
+ 0.8342831135
+ 0.8349652290
+ 0.8356407285
+ 0.8363116980
+ 0.8369827867
+ 0.8376538157
+ 0.8383247852
+ 0.8389958143
+ 0.8396669030
+ 0.8403378725
+ 0.8410078287
+ 0.8416758180
+ 0.8423439264
+ 0.8430119157
+ 0.8436799049
+ 0.8443478942
+ 0.8450158834
+ 0.8456839919
+ 0.8463522196
+ 0.8470252752
+ 0.8476983905
+ 0.8483713865
+ 0.8490445018
+ 0.8497176170
+ 0.8503906727
+ 0.8510637283
+ 0.8517367840
+ 0.8524100780
+ 0.8530836105
+ 0.8537570834
+ 0.8544304967
+ 0.8551040292
+ 0.8557773829
+ 0.8564509153
+ 0.8571243882
+ 0.8577973843
+ 0.8584672809
+ 0.8591372967
+ 0.8598073125
+ 0.8604773283
+ 0.8611472249
+ 0.8618171811
+ 0.8624871969
+ 0.8631570935
+ 0.8638226986
+ 0.8644846082
+ 0.8651465774
+ 0.8658084869
+ 0.8664703965
+ 0.8671323061
+ 0.8677942157
+ 0.8684561253
+ 0.8691179752
+ 0.8697800040
+ 0.8704419136
+ 0.8711038828
+ 0.8717659116
+ 0.8724278212
+ 0.8730897903
+ 0.8737516999
+ 0.8744137287
+ 0.8750752807
+ 0.8757330179
+ 0.8763905764
+ 0.8770483136
+ 0.8777058721
+ 0.8783634901
+ 0.8790212274
+ 0.8796787858
+ 0.8803364038
+ 0.8809922934
+ 0.8816409111
+ 0.8822894096
+ 0.8829380274
+ 0.8835865855
+ 0.8842352033
+ 0.8848837018
+ 0.8855323195
+ 0.8861808777
+ 0.8868293166
+ 0.8874773979
+ 0.8881254196
+ 0.8887733817
+ 0.8894214034
+ 0.8900694847
+ 0.8907175064
+ 0.8913655281
+ 0.8920136094
+ 0.8926612735
+ 0.8933075070
+ 0.8939536810
+ 0.8945999742
+ 0.8952462077
+ 0.8958923817
+ 0.8965386152
+ 0.8971849084
+ 0.8978310823
+ 0.8984773159
+ 0.8991330266
+ 0.8997886777
+ 0.9004443884
+ 0.9011002183
+ 0.9017559290
+ 0.9024116993
+ 0.9030674100
+ 0.9037231803
+ 0.9043788910
+ 0.9050328135
+ 0.9056859016
+ 0.9063389897
+ 0.9069920778
+ 0.9076452851
+ 0.9082983732
+ 0.9089515209
+ 0.9096046090
+ 0.9102578163
+ 0.9109084010
+ 0.9115543962
+ 0.9122003913
+ 0.9128465056
+ 0.9134925008
+ 0.9141384959
+ 0.9147844911
+ 0.9154306054
+ 0.9160766006
+ 0.9167225957
+ 0.9173694253
+ 0.9180163145
+ 0.9186632037
+ 0.9193100929
+ 0.9199569821
+ 0.9206038713
+ 0.9212508202
+ 0.9218977094
+ 0.9225445986
+ 0.9231904149
+ 0.9238339067
+ 0.9244773984
+ 0.9251207709
+ 0.9257643223
+ 0.9264076948
+ 0.9270511866
+ 0.9276946187
+ 0.9283381104
+ 0.9289816022
+ 0.9296203852
+ 0.9302564859
+ 0.9308925867
+ 0.9315286875
+ 0.9321647882
+ 0.9328008890
+ 0.9334369898
+ 0.9340732098
+ 0.9347093105
+ 0.9353454113
+ 0.9359716177
+ 0.9365960956
+ 0.9372205138
+ 0.9378449917
+ 0.9384695292
+ 0.9390940070
+ 0.9397184849
+ 0.9403430223
+ 0.9409673810
+ 0.9415919185
+ 0.9422088861
+ 0.9428256154
+ 0.9434422851
+ 0.9440590143
+ 0.9446756840
+ 0.9452924132
+ 0.9459090829
+ 0.9465258121
+ 0.9471424818
+ 0.9477592111
+ 0.9483684897
+ 0.9489774704
+ 0.9495865703
+ 0.9501956105
+ 0.9508047104
+ 0.9514136910
+ 0.9520227909
+ 0.9526317716
+ 0.9532408714
+ 0.9538499117
+ 0.9544495940
+ 0.9550477862
+ 0.9556459785
+ 0.9562441707
+ 0.9568424225
+ 0.9574406147
+ 0.9580388069
+ 0.9586369991
+ 0.9592351913
+ 0.9598333836
+ 0.9604253769
+ 0.9610139728
+ 0.9616026878
+ 0.9621914029
+ 0.9627799988
+ 0.9633687139
+ 0.9639573097
+ 0.9645460248
+ 0.9651346803
+ 0.9657232761
+ 0.9663069248
+ 0.9668803215
+ 0.9674537182
+ 0.9680271149
+ 0.9686005116
+ 0.9691739082
+ 0.9697473049
+ 0.9703207016
+ 0.9708940983
+ 0.9714674950
+ 0.9720408916
+ 0.9725995064
+ 0.9731563926
+ 0.9737132192
+ 0.9742701054
+ 0.9748269916
+ 0.9753838181
+ 0.9759407043
+ 0.9764975905
+ 0.9770544171
+ 0.9776113033
+ 0.9781597257
+ 0.9786922932
+ 0.9792249203
+ 0.9797576070
+ 0.9802901745
+ 0.9808228016
+ 0.9813554287
+ 0.9818881154
+ 0.9824206829
+ 0.9829533100
+ 0.9834858775
+ 0.9840049744
+ 0.9845178723
+ 0.9850307703
+ 0.9855437279
+ 0.9860566854
+ 0.9865695834
+ 0.9870824814
+ 0.9875953794
+ 0.9881082773
+ 0.9886211753
+ 0.9891340733
+ 0.9896370173
+ 0.9901388884
+ 0.9906408191
+ 0.9911426902
+ 0.9916446209
+ 0.9921464920
+ 0.9926484227
+ 0.9931502938
+ 0.9936522245
+ 0.9941540956
+ 0.9946557879
+ 0.9951416850
+ 0.9956275225
+ 0.9961133003
+ 0.9965991974
+ 0.9970849752
+ 0.9975708127
+ 0.9980567098
+ 0.9985424876
+ 0.9990283251
+ 0.9995142221
+ 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/fujifilm_f-125.spi1d b/release/datafiles/colormanagement/luts/film_response/fujifilm_f-125.spi1d
new file mode 100644
index 00000000000..eee3fc33494
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/fujifilm_f-125.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0174498409 0.0158984791 0.0114764702
+ 0.0361074992 0.0300892591 0.0227251798
+ 0.0508534499 0.0413388014 0.0331778601
+ 0.0630743131 0.0511820987 0.0424059182
+ 0.0737055317 0.0595689416 0.0507076010
+ 0.0831899792 0.0670762509 0.0583669208
+ 0.0918336809 0.0739420429 0.0653621703
+ 0.0999075696 0.0803586915 0.0719582215
+ 0.1073999032 0.0863586813 0.0781143606
+ 0.1143994033 0.0919513777 0.0840181410
+ 0.1210075021 0.0972131789 0.0896857306
+ 0.1272652000 0.1023328975 0.0950955227
+ 0.1332022995 0.1073141024 0.1002841964
+ 0.1389860064 0.1120809987 0.1052708998
+ 0.1446685940 0.1166312024 0.1100749969
+ 0.1502207965 0.1210201979 0.1147160009
+ 0.1556082070 0.1252893060 0.1191812009
+ 0.1608344018 0.1294762045 0.1235382035
+ 0.1659597009 0.1336127967 0.1277814955
+ 0.1709610969 0.1376406997 0.1319573969
+ 0.1758396029 0.1415354013 0.1360505968
+ 0.1805783063 0.1453579962 0.1400354058
+ 0.1851565987 0.1491020024 0.1439131051
+ 0.1896200031 0.1527583003 0.1477226019
+ 0.1940072030 0.1563414037 0.1514364034
+ 0.1983578950 0.1599265933 0.1550768018
+ 0.2026146054 0.1634611934 0.1586581022
+ 0.2068161964 0.1669549942 0.1621633023
+ 0.2109510005 0.1704287976 0.1656109989
+ 0.2149749994 0.1738846004 0.1689939946
+ 0.2188791931 0.1773294955 0.1723017991
+ 0.2226788998 0.1807734072 0.1755644977
+ 0.2264375985 0.1841789037 0.1787340939
+ 0.2301400006 0.1875509024 0.1818515062
+ 0.2337515056 0.1908915937 0.1848967969
+ 0.2373262048 0.1941868067 0.1878945976
+ 0.2408698052 0.1974609047 0.1908354014
+ 0.2443857044 0.2007011026 0.1937474012
+ 0.2478293926 0.2038740963 0.1966456026
+ 0.2511906028 0.2069949955 0.1995196939
+ 0.2545030117 0.2100716978 0.2023606002
+ 0.2577551007 0.2130948007 0.2052040994
+ 0.2609705925 0.2161156982 0.2080169022
+ 0.2641761005 0.2191050053 0.2107931972
+ 0.2673386037 0.2220419943 0.2135623991
+ 0.2704797983 0.2249206007 0.2162752002
+ 0.2735692859 0.2277640998 0.2189542055
+ 0.2766304910 0.2305577993 0.2216016054
+ 0.2796724141 0.2333119065 0.2241947949
+ 0.2826831937 0.2360485047 0.2267569005
+ 0.2856605947 0.2387613952 0.2292927057
+ 0.2885996997 0.2414368987 0.2317842990
+ 0.2914834917 0.2441027015 0.2342378944
+ 0.2943134904 0.2467696965 0.2366532981
+ 0.2971065044 0.2494162023 0.2390290052
+ 0.2998841107 0.2520292997 0.2413756996
+ 0.3026126027 0.2546142042 0.2437071949
+ 0.3053067923 0.2571905851 0.2460273951
+ 0.3079755008 0.2597542107 0.2483306974
+ 0.3106071949 0.2622892857 0.2506220937
+ 0.3132098019 0.2647835910 0.2528899908
+ 0.3157896101 0.2672505081 0.2551301122
+ 0.3183388114 0.2697114050 0.2573640943
+ 0.3208617866 0.2721551955 0.2595869899
+ 0.3233729005 0.2745685875 0.2617990971
+ 0.3258588910 0.2769567966 0.2639977038
+ 0.3283306956 0.2793405056 0.2661921084
+ 0.3308002055 0.2817173004 0.2683886886
+ 0.3332616091 0.2840746939 0.2705698907
+ 0.3356887102 0.2864069939 0.2727307081
+ 0.3380911052 0.2887319922 0.2748725116
+ 0.3404774070 0.2910597026 0.2769970894
+ 0.3428531885 0.2933830023 0.2791089118
+ 0.3452278078 0.2956911922 0.2812050879
+ 0.3475916088 0.2979753911 0.2832851112
+ 0.3499327898 0.3002283871 0.2853564918
+ 0.3522517085 0.3024463058 0.2874124944
+ 0.3545554876 0.3046588004 0.2894454896
+ 0.3568528891 0.3068628013 0.2914513052
+ 0.3591203094 0.3090505004 0.2934390903
+ 0.3613556027 0.3112153113 0.2954114974
+ 0.3635644913 0.3133526146 0.2973645031
+ 0.3657538891 0.3154605031 0.2992906868
+ 0.3679293990 0.3175630867 0.3012037873
+ 0.3700731993 0.3196572065 0.3031010032
+ 0.3722012937 0.3217284083 0.3049888909
+ 0.3743169010 0.3237737119 0.3068724871
+ 0.3764213026 0.3257966936 0.3087452054
+ 0.3785130084 0.3278082013 0.3106024861
+ 0.3805955052 0.3298071027 0.3124460876
+ 0.3826780915 0.3317958117 0.3142769933
+ 0.3847546875 0.3337770998 0.3160952926
+ 0.3867942095 0.3357304037 0.3179017007
+ 0.3888104856 0.3376702964 0.3196955025
+ 0.3908145130 0.3396002054 0.3214753866
+ 0.3928089142 0.3415268064 0.3232490122
+ 0.3947995007 0.3434461057 0.3250178993
+ 0.3967804909 0.3453572989 0.3267830908
+ 0.3987523913 0.3472534120 0.3285475075
+ 0.4007174075 0.3491292894 0.3303103149
+ 0.4026708007 0.3509947956 0.3320707083
+ 0.4046143889 0.3528488874 0.3338232934
+ 0.4065484107 0.3546791077 0.3355642855
+ 0.4084819853 0.3565005064 0.3372963965
+ 0.4104149938 0.3583168089 0.3390068114
+ 0.4123412967 0.3601278961 0.3407028019
+ 0.4142560065 0.3619349003 0.3423874974
+ 0.4161522090 0.3637281060 0.3440541029
+ 0.4180339873 0.3655182123 0.3457126915
+ 0.4199067950 0.3673050106 0.3473584950
+ 0.4217523932 0.3690750003 0.3489893973
+ 0.4235874116 0.3708429039 0.3506138027
+ 0.4254117906 0.3726145029 0.3522236049
+ 0.4272232056 0.3743841052 0.3538290858
+ 0.4290306866 0.3761518002 0.3554284871
+ 0.4308294058 0.3779003918 0.3570241034
+ 0.4326210022 0.3796432018 0.3586181998
+ 0.4344018102 0.3813720942 0.3602060080
+ 0.4361707866 0.3830938041 0.3617906868
+ 0.4379333854 0.3848012090 0.3633658886
+ 0.4396809936 0.3864955008 0.3649328053
+ 0.4414246082 0.3881793916 0.3664895892
+ 0.4431430995 0.3898509145 0.3680340052
+ 0.4448564947 0.3915182054 0.3695713878
+ 0.4465528131 0.3931697011 0.3710972071
+ 0.4482432008 0.3948189020 0.3726201952
+ 0.4499239028 0.3964514136 0.3741200864
+ 0.4515936971 0.3980818987 0.3756181896
+ 0.4532519877 0.3997015953 0.3771077991
+ 0.4548968971 0.4013178945 0.3785969913
+ 0.4565317035 0.4029234946 0.3800840974
+ 0.4581527114 0.4045226872 0.3815703094
+ 0.4597654939 0.4061067104 0.3830527067
+ 0.4613632858 0.4076885879 0.3845353127
+ 0.4629530907 0.4092662036 0.3860189021
+ 0.4645408094 0.4108397961 0.3874995112
+ 0.4661273062 0.4124050140 0.3889681995
+ 0.4677076936 0.4139649868 0.3904353082
+ 0.4692842960 0.4155119956 0.3918946981
+ 0.4708591998 0.4170548022 0.3933512866
+ 0.4724324942 0.4185824096 0.3947859108
+ 0.4739956856 0.4201084077 0.3962202072
+ 0.4755468965 0.4216217101 0.3976345956
+ 0.4770910144 0.4231351018 0.3990488946
+ 0.4786213040 0.4246394038 0.4004501104
+ 0.4801476002 0.4261435866 0.4018495977
+ 0.4816561043 0.4276433885 0.4032416940
+ 0.4831644893 0.4291422963 0.4046311080
+ 0.4846526980 0.4306376874 0.4060145020
+ 0.4861406982 0.4321312904 0.4073927999
+ 0.4876179993 0.4336220026 0.4087674022
+ 0.4890919924 0.4351086915 0.4101338089
+ 0.4905653000 0.4365926087 0.4114997089
+ 0.4920378029 0.4380624890 0.4128586948
+ 0.4935061932 0.4395323992 0.4142177105
+ 0.4949601889 0.4409978986 0.4155749083
+ 0.4964140952 0.4424628019 0.4169315994
+ 0.4978365004 0.4439246953 0.4182890952
+ 0.4992552996 0.4453840852 0.4196475148
+ 0.5006620884 0.4468388855 0.4210050106
+ 0.5020588040 0.4482730925 0.4223509133
+ 0.5034533739 0.4497072101 0.4236967862
+ 0.5048360825 0.4511240125 0.4250375032
+ 0.5062186718 0.4525361061 0.4263758063
+ 0.5075957179 0.4539420903 0.4277085066
+ 0.5089703798 0.4553368986 0.4290247858
+ 0.5103421211 0.4567317963 0.4303410053
+ 0.5117046833 0.4581159055 0.4316442013
+ 0.5130673051 0.4594987035 0.4329437912
+ 0.5144175887 0.4608711898 0.4342381954
+ 0.5157638192 0.4622273147 0.4355193973
+ 0.5171049237 0.4635834098 0.4368005097
+ 0.5184270144 0.4649255872 0.4380722940
+ 0.5197492242 0.4662652016 0.4393407106
+ 0.5210537910 0.4676026106 0.4406091869
+ 0.5223482847 0.4689337909 0.4418779016
+ 0.5236423016 0.4702650905 0.4431464970
+ 0.5249115229 0.4715861082 0.4444108009
+ 0.5261808038 0.4729016125 0.4456712902
+ 0.5274490118 0.4742170870 0.4469316900
+ 0.5287154913 0.4755303860 0.4481886029
+ 0.5299819708 0.4768437147 0.4494448900
+ 0.5312492251 0.4781504869 0.4506979883
+ 0.5325167775 0.4794408083 0.4519374073
+ 0.5337843895 0.4807311893 0.4531767964
+ 0.5350342989 0.4820165038 0.4544104934
+ 0.5362828970 0.4832974970 0.4556373060
+ 0.5375289917 0.4845784903 0.4568639994
+ 0.5387613177 0.4858368039 0.4580819011
+ 0.5399935842 0.4870882928 0.4592955112
+ 0.5412209034 0.4883398116 0.4605090916
+ 0.5424383879 0.4895803928 0.4617215991
+ 0.5436558723 0.4908204079 0.4629341066
+ 0.5448678136 0.4920594990 0.4641464949
+ 0.5460734963 0.4932895899 0.4653517008
+ 0.5472792983 0.4945197105 0.4665569961
+ 0.5484790802 0.4957481027 0.4677614868
+ 0.5496746898 0.4969693124 0.4689593911
+ 0.5508701801 0.4981904924 0.4701572061
+ 0.5520610809 0.4994137883 0.4713543952
+ 0.5532492995 0.5006437898 0.4725480974
+ 0.5544373989 0.5018737912 0.4737417102
+ 0.5556218028 0.5030999184 0.4749346972
+ 0.5568041205 0.5043138862 0.4761235118
+ 0.5579863191 0.5055277944 0.4773122966
+ 0.5591588020 0.5067374706 0.4785006046
+ 0.5603247285 0.5079305172 0.4796842933
+ 0.5614907146 0.5091236234 0.4808681011
+ 0.5626431108 0.5103173256 0.4820516109
+ 0.5637829900 0.5115153193 0.4832226932
+ 0.5649229884 0.5127133131 0.4843936861
+ 0.5660511851 0.5139113069 0.4855647981
+ 0.5671615005 0.5151088834 0.4867219925
+ 0.5682718158 0.5163065195 0.4878776968
+ 0.5693790913 0.5175040960 0.4890333116
+ 0.5704758167 0.5186815858 0.4901837111
+ 0.5715726018 0.5198547244 0.4913321137
+ 0.5726693273 0.5210276842 0.4924804866
+ 0.5737720132 0.5221964717 0.4936192930
+ 0.5748748183 0.5233623981 0.4947485924
+ 0.5759775043 0.5245283246 0.4958778918
+ 0.5770760775 0.5256924033 0.4970034957
+ 0.5781732202 0.5268526077 0.4981164932
+ 0.5792703032 0.5280128121 0.4992294014
+ 0.5803601146 0.5291728973 0.5003424287
+ 0.5814397931 0.5303236246 0.5014445186
+ 0.5825194120 0.5314744115 0.5025454760
+ 0.5835987926 0.5326251984 0.5036464930
+ 0.5846728086 0.5337677002 0.5047429800
+ 0.5857468843 0.5349056125 0.5058357120
+ 0.5868209004 0.5360434055 0.5069283843
+ 0.5878757238 0.5371788144 0.5080201030
+ 0.5889192820 0.5383052826 0.5091047883
+ 0.5899627805 0.5394318104 0.5101894736
+ 0.5910035968 0.5405583978 0.5112742186
+ 0.5920301080 0.5416883826 0.5123528838
+ 0.5930566788 0.5428196192 0.5134283900
+ 0.5940833092 0.5439507961 0.5145038962
+ 0.5950983167 0.5450789928 0.5155786872
+ 0.5961067080 0.5461968184 0.5166484118
+ 0.5971152186 0.5473145843 0.5177180767
+ 0.5981239080 0.5484325290 0.5187878013
+ 0.5991356969 0.5495414734 0.5198484063
+ 0.6001476049 0.5506458879 0.5209016204
+ 0.6011593938 0.5517503023 0.5219547153
+ 0.6021643281 0.5528541207 0.5230079293
+ 0.6031603217 0.5539363027 0.5240486860
+ 0.6041563749 0.5550184250 0.5250884295
+ 0.6051524282 0.5561006069 0.5261281729
+ 0.6061363816 0.5571805835 0.5271657705
+ 0.6071165204 0.5582563877 0.5281966925
+ 0.6080965996 0.5593320727 0.5292276144
+ 0.6090764999 0.5604078770 0.5302584767
+ 0.6100435257 0.5614696145 0.5312880278
+ 0.6110104918 0.5625219941 0.5323162079
+ 0.6119775176 0.5635743737 0.5333443880
+ 0.6129397154 0.5646268129 0.5343726277
+ 0.6138859987 0.5656726956 0.5353969932
+ 0.6148322821 0.5667169094 0.5364199877
+ 0.6157786250 0.5677611828 0.5374429226
+ 0.6167212725 0.5688053966 0.5384659171
+ 0.6176583171 0.5698326230 0.5394816995
+ 0.6185953021 0.5708590150 0.5404965281
+ 0.6195322871 0.5718854070 0.5415111780
+ 0.6204634905 0.5729113817 0.5425258875
+ 0.6213884950 0.5739294291 0.5435299873
+ 0.6223133802 0.5749472976 0.5445337296
+ 0.6232383251 0.5759652853 0.5455372930
+ 0.6241629124 0.5769823194 0.5465409160
+ 0.6250872016 0.5779896975 0.5475350022
+ 0.6260113716 0.5789970756 0.5485289097
+ 0.6269357204 0.5800045133 0.5495228171
+ 0.6278557777 0.5810111165 0.5505167842
+ 0.6287717223 0.5820034742 0.5515152216
+ 0.6296874881 0.5829960108 0.5525137782
+ 0.6306033731 0.5839884281 0.5535123944
+ 0.6315113902 0.5849809051 0.5545110106
+ 0.6324080229 0.5859525204 0.5554962158
+ 0.6333045959 0.5869235992 0.5564795732
+ 0.6342011094 0.5878946185 0.5574629903
+ 0.6350932121 0.5888655782 0.5584464073
+ 0.6359726787 0.5898336172 0.5594201088
+ 0.6368522048 0.5908008814 0.5603901744
+ 0.6377316713 0.5917682052 0.5613601804
+ 0.6386104822 0.5927355289 0.5623303056
+ 0.6394773126 0.5936999917 0.5632957816
+ 0.6403442025 0.5946627259 0.5642570257
+ 0.6412109733 0.5956255198 0.5652183294
+ 0.6420779228 0.5965881944 0.5661795735
+ 0.6429408789 0.5975462794 0.5671393871
+ 0.6438030005 0.5984956026 0.5680949092
+ 0.6446650028 0.5994448066 0.5690503120
+ 0.6455270052 0.6003941298 0.5700057745
+ 0.6463868022 0.6013432741 0.5709612966
+ 0.6472437978 0.6022868752 0.5719025135
+ 0.6481007934 0.6032304764 0.5728424788
+ 0.6489577889 0.6041740775 0.5737825036
+ 0.6498141289 0.6051176786 0.5747225285
+ 0.6506562233 0.6060569286 0.5756577849
+ 0.6514983177 0.6069930792 0.5765889287
+ 0.6523404717 0.6079294086 0.5775198936
+ 0.6531826258 0.6088656783 0.5784509182
+ 0.6540184021 0.6098006964 0.5793818235
+ 0.6548498273 0.6107280850 0.5803099871
+ 0.6556811929 0.6116555929 0.5812382102
+ 0.6565124989 0.6125831008 0.5821664929
+ 0.6573433876 0.6135106087 0.5830947161
+ 0.6581645012 0.6144319773 0.5840185881
+ 0.6589856148 0.6153494716 0.5849387050
+ 0.6598067284 0.6162670255 0.5858588219
+ 0.6606277823 0.6171844006 0.5867788792
+ 0.6614431739 0.6181018949 0.5876989961
+ 0.6622517705 0.6190115213 0.5886114240
+ 0.6630604267 0.6199212074 0.5895230770
+ 0.6638690233 0.6208307743 0.5904347897
+ 0.6646776199 0.6217405200 0.5913465023
+ 0.6654757261 0.6226496100 0.5922542214
+ 0.6662709117 0.6235576868 0.5931503177
+ 0.6670660973 0.6244658232 0.5940464139
+ 0.6678612828 0.6253738999 0.5949425101
+ 0.6686561704 0.6262819767 0.5958386064
+ 0.6694442034 0.6271823049 0.5967332721
+ 0.6702321768 0.6280776262 0.5976269245
+ 0.6710202098 0.6289728880 0.5985203981
+ 0.6718081832 0.6298682094 0.5994138718
+ 0.6725955009 0.6307634711 0.6003074050
+ 0.6733806133 0.6316475272 0.6011890769
+ 0.6741657257 0.6325287223 0.6020658016
+ 0.6749507189 0.6334097981 0.6029425859
+ 0.6757357717 0.6342908740 0.6038193703
+ 0.6765164137 0.6351721287 0.6046960950
+ 0.6772890091 0.6360508800 0.6055694818
+ 0.6780614853 0.6369295716 0.6064420938
+ 0.6788340807 0.6378083229 0.6073147058
+ 0.6796066165 0.6386870146 0.6081873775
+ 0.6803761721 0.6395655870 0.6090599895
+ 0.6811413169 0.6404411793 0.6099300981
+ 0.6819062829 0.6413165927 0.6107999086
+ 0.6826714277 0.6421920061 0.6116697192
+ 0.6834365129 0.6430674195 0.6125395298
+ 0.6841984987 0.6439427733 0.6134092808
+ 0.6849551797 0.6448048949 0.6142743230
+ 0.6857119203 0.6456660032 0.6151384115
+ 0.6864687204 0.6465271115 0.6160026193
+ 0.6872254014 0.6473882198 0.6168667078
+ 0.6879792213 0.6482493281 0.6177309155
+ 0.6887251735 0.6491037011 0.6185951233
+ 0.6894711256 0.6499567032 0.6194592714
+ 0.6902170777 0.6508097053 0.6203234792
+ 0.6909629703 0.6516628265 0.6211876869
+ 0.6917080283 0.6525158286 0.6220518947
+ 0.6924436092 0.6533647776 0.6229112148
+ 0.6931793094 0.6542117000 0.6237667799
+ 0.6939148903 0.6550586224 0.6246222854
+ 0.6946504712 0.6559054852 0.6254779100
+ 0.6953861117 0.6567524076 0.6263334155
+ 0.6961168051 0.6575965285 0.6271870732
+ 0.6968464851 0.6584361792 0.6280364990
+ 0.6975762844 0.6592760086 0.6288859248
+ 0.6983060241 0.6601157188 0.6297354102
+ 0.6990358233 0.6609554887 0.6305847764
+ 0.6997650862 0.6617947817 0.6314343214
+ 0.7004939914 0.6626260877 0.6322728992
+ 0.7012230158 0.6634575129 0.6331112981
+ 0.7019519210 0.6642888784 0.6339496970
+ 0.7026808858 0.6651203036 0.6347880960
+ 0.7034088969 0.6659517288 0.6356264949
+ 0.7041271925 0.6667770743 0.6364635825
+ 0.7048454881 0.6675990224 0.6372997165
+ 0.7055637836 0.6684209108 0.6381359100
+ 0.7062821984 0.6692429185 0.6389719844
+ 0.7070004940 0.6700648069 0.6398081183
+ 0.7077152729 0.6708840132 0.6406437755
+ 0.7084274888 0.6716861129 0.6414728165
+ 0.7091398239 0.6724882722 0.6423017979
+ 0.7098520994 0.6732904911 0.6431307793
+ 0.7105643749 0.6740925908 0.6439598203
+ 0.7112765908 0.6748948097 0.6447888017
+ 0.7119773030 0.6756910086 0.6456167102
+ 0.7126780152 0.6764826775 0.6464434862
+ 0.7133787870 0.6772742867 0.6472703218
+ 0.7140794992 0.6780658960 0.6480970979
+ 0.7147802711 0.6788576245 0.6489239931
+ 0.7154778838 0.6796491742 0.6497508287
+ 0.7161695957 0.6804391742 0.6505677104
+ 0.7168614268 0.6812291145 0.6513826251
+ 0.7175530791 0.6820189953 0.6521974802
+ 0.7182449102 0.6828088164 0.6530123949
+ 0.7189366221 0.6835986972 0.6538271904
+ 0.7196236253 0.6843873262 0.6546415091
+ 0.7203075290 0.6851689219 0.6554480195
+ 0.7209913731 0.6859505177 0.6562544703
+ 0.7216752768 0.6867321730 0.6570609808
+ 0.7223592997 0.6875138283 0.6578674912
+ 0.7230432034 0.6882954240 0.6586740017
+ 0.7237169147 0.6890760064 0.6594784856
+ 0.7243875265 0.6898545027 0.6602771878
+ 0.7250581980 0.6906331182 0.6610758901
+ 0.7257289290 0.6914116144 0.6618745923
+ 0.7263996005 0.6921901107 0.6626732945
+ 0.7270702124 0.6929686069 0.6634719968
+ 0.7277340293 0.6937432885 0.6642683744
+ 0.7283964753 0.6945124269 0.6650602221
+ 0.7290591002 0.6952815056 0.6658521295
+ 0.7297216058 0.6960507035 0.6666439176
+ 0.7303841710 0.6968197823 0.6674357057
+ 0.7310466766 0.6975889206 0.6682276130
+ 0.7317048907 0.6983528733 0.6690183282
+ 0.7323622108 0.6991090178 0.6698067784
+ 0.7330195904 0.6998651028 0.6705952883
+ 0.7336769104 0.7006211877 0.6713837981
+ 0.7343342900 0.7013772726 0.6721723080
+ 0.7349916101 0.7021334171 0.6729608178
+ 0.7356424928 0.7028859258 0.6737465262
+ 0.7362912297 0.7036299109 0.6745222211
+ 0.7369397879 0.7043738961 0.6752979755
+ 0.7375885248 0.7051178217 0.6760736704
+ 0.7382372022 0.7058618069 0.6768494844
+ 0.7388858795 0.7066057920 0.6776251793
+ 0.7395280004 0.7073493004 0.6784006953
+ 0.7401649952 0.7080891132 0.6791678071
+ 0.7408019900 0.7088289857 0.6799349785
+ 0.7414389849 0.7095689178 0.6807020903
+ 0.7420759201 0.7103086710 0.6814693213
+ 0.7427129149 0.7110486031 0.6822363734
+ 0.7433465123 0.7117884159 0.6830036044
+ 0.7439708710 0.7125198841 0.6837611794
+ 0.7445952892 0.7132496834 0.6845157146
+ 0.7452197075 0.7139794230 0.6852701902
+ 0.7458441854 0.7147092223 0.6860247254
+ 0.7464686036 0.7154390216 0.6867792010
+ 0.7470930219 0.7161687016 0.6875336766
+ 0.7477155924 0.7168959975 0.6882864833
+ 0.7483379841 0.7176201940 0.6890364885
+ 0.7489603758 0.7183443904 0.6897866130
+ 0.7495828271 0.7190685868 0.6905366182
+ 0.7502052188 0.7197927833 0.6912866831
+ 0.7508276105 0.7205169797 0.6920368075
+ 0.7514470816 0.7212411761 0.6927868128
+ 0.7520624995 0.7219575047 0.6935216784
+ 0.7526779771 0.7226737142 0.6942551136
+ 0.7532935143 0.7233898044 0.6949886084
+ 0.7539088726 0.7241060138 0.6957219839
+ 0.7545244098 0.7248222232 0.6964554191
+ 0.7551398873 0.7255383730 0.6971887946
+ 0.7557541132 0.7262521982 0.6979203224
+ 0.7563681006 0.7269626856 0.6986479163
+ 0.7569820881 0.7276732922 0.6993755102
+ 0.7575961947 0.7283838987 0.7001032233
+ 0.7582101822 0.7290943861 0.7008308172
+ 0.7588242292 0.7298049927 0.7015584707
+ 0.7594367266 0.7305154800 0.7022861242
+ 0.7600427866 0.7312164903 0.7030051947
+ 0.7606487870 0.7319142818 0.7037203908
+ 0.7612549067 0.7326120138 0.7044355273
+ 0.7618610263 0.7333098054 0.7051507235
+ 0.7624670267 0.7340075970 0.7058659196
+ 0.7630730867 0.7347053885 0.7065809965
+ 0.7636762857 0.7354031801 0.7072961926
+ 0.7642757297 0.7360877991 0.7080059052
+ 0.7648751140 0.7367721796 0.7087152004
+ 0.7654743791 0.7374566197 0.7094244957
+ 0.7660738230 0.7381410003 0.7101337910
+ 0.7666732073 0.7388253808 0.7108430266
+ 0.7672724724 0.7395098805 0.7115523219
+ 0.7678692937 0.7401931286 0.7122616172
+ 0.7684640288 0.7408679724 0.7129713297
+ 0.7690587044 0.7415428758 0.7136811018
+ 0.7696534991 0.7422178984 0.7143908143
+ 0.7702481747 0.7428928018 0.7151005268
+ 0.7708429098 0.7435677052 0.7158101797
+ 0.7714375854 0.7442426085 0.7165200114
+ 0.7720239162 0.7449169755 0.7172291875
+ 0.7726042271 0.7455884814 0.7179328203
+ 0.7731844783 0.7462599874 0.7186363935
+ 0.7737647891 0.7469314933 0.7193400264
+ 0.7743450999 0.7476029992 0.7200435996
+ 0.7749254107 0.7482745051 0.7207471728
+ 0.7755057216 0.7489460111 0.7214508057
+ 0.7760874033 0.7496169209 0.7221543193
+ 0.7766703963 0.7502800822 0.7228549123
+ 0.7772535086 0.7509431839 0.7235553861
+ 0.7778365016 0.7516064048 0.7242559195
+ 0.7784196138 0.7522696257 0.7249565125
+ 0.7790026069 0.7529327869 0.7256569862
+ 0.7795857191 0.7535960078 0.7263575196
+ 0.7801663876 0.7542592287 0.7270581126
+ 0.7807425261 0.7549132109 0.7277507782
+ 0.7813186049 0.7555662990 0.7284420729
+ 0.7818946838 0.7562193871 0.7291333079
+ 0.7824708223 0.7568724751 0.7298246026
+ 0.7830467820 0.7575256228 0.7305157781
+ 0.7836229205 0.7581787109 0.7312070727
+ 0.7841988206 0.7588317990 0.7318983078
+ 0.7847698927 0.7594774961 0.7325916290
+ 0.7853410840 0.7601187229 0.7332865000
+ 0.7859122157 0.7607598901 0.7339814901
+ 0.7864832878 0.7614011168 0.7346764207
+ 0.7870544791 0.7620422840 0.7353712916
+ 0.7876256108 0.7626835108 0.7360662818
+ 0.7881966829 0.7633246779 0.7367612123
+ 0.7887653708 0.7639619708 0.7374557853
+ 0.7893326879 0.7645862103 0.7381486297
+ 0.7899000049 0.7652103901 0.7388414741
+ 0.7904673219 0.7658346295 0.7395343781
+ 0.7910345793 0.7664586902 0.7402272224
+ 0.7916018963 0.7670829296 0.7409201264
+ 0.7921692133 0.7677071095 0.7416129708
+ 0.7927350998 0.7683312893 0.7423058748
+ 0.7932925820 0.7689499259 0.7429925799
+ 0.7938501239 0.7695664763 0.7436763048
+ 0.7944076061 0.7701830268 0.7443599105
+ 0.7949650884 0.7707995772 0.7450435162
+ 0.7955226898 0.7714161277 0.7457271814
+ 0.7960801721 0.7720326185 0.7464107871
+ 0.7966377139 0.7726492286 0.7470945120
+ 0.7971891761 0.7732650042 0.7477774024
+ 0.7977350950 0.7738748193 0.7484462857
+ 0.7982810736 0.7744845152 0.7491152287
+ 0.7988271117 0.7750942707 0.7497841120
+ 0.7993730903 0.7757040262 0.7504529953
+ 0.7999191284 0.7763137817 0.7511218786
+ 0.8004651070 0.7769234776 0.7517908216
+ 0.8010110259 0.7775332928 0.7524597049
+ 0.8015481234 0.7781410813 0.7531278729
+ 0.8020827770 0.7787457705 0.7537946105
+ 0.8026174903 0.7793504000 0.7544614077
+ 0.8031522036 0.7799550295 0.7551280856
+ 0.8036869168 0.7805595994 0.7557948232
+ 0.8042215705 0.7811642885 0.7564616203
+ 0.8047562242 0.7817689180 0.7571282983
+ 0.8052908778 0.7823734879 0.7577949762
+ 0.8058195114 0.7829757929 0.7584580183
+ 0.8063477278 0.7835758924 0.7591165900
+ 0.8068758845 0.7841761112 0.7597752810
+ 0.8074041009 0.7847762704 0.7604339719
+ 0.8079321980 0.7853764296 0.7610926032
+ 0.8084604144 0.7859765887 0.7617512941
+ 0.8089885712 0.7865768075 0.7624099851
+ 0.8095167875 0.7871769071 0.7630686164
+ 0.8100429177 0.7877739072 0.7637246847
+ 0.8105689287 0.7883684039 0.7643780708
+ 0.8110948801 0.7889629006 0.7650315762
+ 0.8116210103 0.7895573974 0.7656850815
+ 0.8121470213 0.7901518941 0.7663385868
+ 0.8126729727 0.7907463908 0.7669919729
+ 0.8131991029 0.7913408279 0.7676454782
+ 0.8137251139 0.7919353247 0.7682989836
+ 0.8142498136 0.7925245762 0.7689477205
+ 0.8147743940 0.7931082845 0.7695900202
+ 0.8152989745 0.7936919928 0.7702323198
+ 0.8158236146 0.7942757010 0.7708745003
+ 0.8163480759 0.7948594093 0.7715167999
+ 0.8168727160 0.7954431772 0.7721590996
+ 0.8173972964 0.7960268855 0.7728013992
+ 0.8179218769 0.7966105938 0.7734436989
+ 0.8184441924 0.7971937060 0.7740848064
+ 0.8189654946 0.7977755070 0.7747216821
+ 0.8194869161 0.7983571887 0.7753584981
+ 0.8200082183 0.7989389896 0.7759953737
+ 0.8205295205 0.7995206714 0.7766323090
+ 0.8210508227 0.8001024127 0.7772691846
+ 0.8215721846 0.8006842136 0.7779061198
+ 0.8220934868 0.8012658954 0.7785429955
+ 0.8226118088 0.8018476963 0.7791798711
+ 0.8231247067 0.8024280071 0.7798110843
+ 0.8236376047 0.8030081987 0.7804415822
+ 0.8241505027 0.8035883904 0.7810720801
+ 0.8246634007 0.8041685820 0.7817025781
+ 0.8251761794 0.8047488928 0.7823330760
+ 0.8256890774 0.8053290844 0.7829635143
+ 0.8262019753 0.8059092760 0.7835940123
+ 0.8267148733 0.8064895868 0.7842245102
+ 0.8272213936 0.8070695996 0.7848517895
+ 0.8277270794 0.8076496124 0.7854750752
+ 0.8282328844 0.8082295060 0.7860983014
+ 0.8287385702 0.8088093996 0.7867215872
+ 0.8292443752 0.8093892932 0.7873448730
+ 0.8297501802 0.8099691868 0.7879682183
+ 0.8302559257 0.8105490804 0.7885915041
+ 0.8307616711 0.8111289740 0.7892147899
+ 0.8312665224 0.8117089868 0.7898380160
+ 0.8317692280 0.8122891188 0.7904539704
+ 0.8322719932 0.8128693104 0.7910689116
+ 0.8327746987 0.8134495020 0.7916837931
+ 0.8332775235 0.8140296936 0.7922986746
+ 0.8337802291 0.8146098852 0.7929136157
+ 0.8342829943 0.8151900768 0.7935284972
+ 0.8347858191 0.8157703280 0.7941433787
+ 0.8352885246 0.8163505197 0.7947583199
+ 0.8357869983 0.8169273734 0.7953717113
+ 0.8362827897 0.8174930811 0.7959778905
+ 0.8367785215 0.8180589080 0.7965841293
+ 0.8372743130 0.8186246753 0.7971904278
+ 0.8377701044 0.8191903830 0.7977966070
+ 0.8382657766 0.8197562099 0.7984027863
+ 0.8387616277 0.8203219175 0.7990090847
+ 0.8392574191 0.8208876848 0.7996153235
+ 0.8397530913 0.8214535117 0.8002215028
+ 0.8402497172 0.8220161200 0.8008267879
+ 0.8407465219 0.8225740194 0.8014301062
+ 0.8412433267 0.8231317997 0.8020334840
+ 0.8417400718 0.8236895800 0.8026369214
+ 0.8422368765 0.8242474794 0.8032401800
+ 0.8427336812 0.8248053193 0.8038436174
+ 0.8432304263 0.8253630996 0.8044469953
+ 0.8437271714 0.8259209991 0.8050503135
+ 0.8442239761 0.8264787793 0.8056536913
+ 0.8447151184 0.8270347118 0.8062539101
+ 0.8452048898 0.8275880218 0.8068488240
+ 0.8456946015 0.8281413913 0.8074436784
+ 0.8461843133 0.8286947012 0.8080385923
+ 0.8466740251 0.8292480111 0.8086336255
+ 0.8471636772 0.8298013210 0.8092284799
+ 0.8476533890 0.8303546906 0.8098233938
+ 0.8481432199 0.8309080005 0.8104183078
+ 0.8486328721 0.8314613104 0.8110132217
+ 0.8491188288 0.8320134878 0.8116052747
+ 0.8496029973 0.8325635791 0.8121902943
+ 0.8500872850 0.8331136107 0.8127751946
+ 0.8505715132 0.8336635828 0.8133600950
+ 0.8510558009 0.8342136741 0.8139451146
+ 0.8515400290 0.8347637057 0.8145300150
+ 0.8520243168 0.8353136778 0.8151149154
+ 0.8525084853 0.8358637094 0.8156998754
+ 0.8529927731 0.8364138007 0.8162847757
+ 0.8534749746 0.8369629979 0.8168694973
+ 0.8539546728 0.8375040889 0.8174484968
+ 0.8544343710 0.8380451798 0.8180274963
+ 0.8549141288 0.8385862708 0.8186064959
+ 0.8553938270 0.8391274214 0.8191856146
+ 0.8558735251 0.8396685123 0.8197646141
+ 0.8563532233 0.8402096033 0.8203436136
+ 0.8568329215 0.8407506943 0.8209226131
+ 0.8573125005 0.8412917852 0.8215016723
+ 0.8577917814 0.8418329954 0.8220806718
+ 0.8582649827 0.8423717022 0.8226525784
+ 0.8587383032 0.8429095149 0.8232210875
+ 0.8592115045 0.8434472084 0.8237894773
+ 0.8596848249 0.8439850211 0.8243579865
+ 0.8601580262 0.8445227742 0.8249264956
+ 0.8606312871 0.8450605869 0.8254948854
+ 0.8611046076 0.8455983996 0.8260633945
+ 0.8615778089 0.8461362123 0.8266319036
+ 0.8620511293 0.8466740251 0.8272002935
+ 0.8625226021 0.8472099900 0.8277677298
+ 0.8629927039 0.8477393985 0.8283293247
+ 0.8634628057 0.8482688069 0.8288909197
+ 0.8639330268 0.8487980962 0.8294523954
+ 0.8644031286 0.8493275046 0.8300139904
+ 0.8648731709 0.8498567939 0.8305755854
+ 0.8653432727 0.8503862023 0.8311371207
+ 0.8658133745 0.8509156108 0.8316987157
+ 0.8662835956 0.8514449000 0.8322603106
+ 0.8667536974 0.8519743085 0.8328217864
+ 0.8672150970 0.8524994254 0.8333820105
+ 0.8676754832 0.8530210257 0.8339408040
+ 0.8681359291 0.8535426259 0.8344995975
+ 0.8685963154 0.8540641069 0.8350583911
+ 0.8690567017 0.8545857072 0.8356171846
+ 0.8695170879 0.8551073074 0.8361760974
+ 0.8699774742 0.8556289077 0.8367348909
+ 0.8704379201 0.8561505079 0.8372936845
+ 0.8708983064 0.8566719890 0.8378524780
+ 0.8713576198 0.8571935892 0.8384112716
+ 0.8718056083 0.8577103019 0.8389707208
+ 0.8722537160 0.8582252860 0.8395304084
+ 0.8727017045 0.8587402105 0.8400899768
+ 0.8731498122 0.8592551947 0.8406497240
+ 0.8735978007 0.8597701788 0.8412094116
+ 0.8740459085 0.8602852225 0.8417689800
+ 0.8744938970 0.8608002067 0.8423287272
+ 0.8749418855 0.8613150716 0.8428884149
+ 0.8753899932 0.8618301153 0.8434481025
+ 0.8758366704 0.8623450994 0.8440076709
+ 0.8762751818 0.8628504872 0.8445582986
+ 0.8767135739 0.8633533716 0.8451061249
+ 0.8771520853 0.8638563752 0.8456537724
+ 0.8775904775 0.8643593192 0.8462015986
+ 0.8780289888 0.8648623228 0.8467493057
+ 0.8784673810 0.8653652072 0.8472970724
+ 0.8789058924 0.8658682108 0.8478447795
+ 0.8793442845 0.8663712144 0.8483924866
+ 0.8797827959 0.8668740988 0.8489403129
+ 0.8802210093 0.8673771024 0.8494880199
+ 0.8806512952 0.8678756952 0.8500298858
+ 0.8810817003 0.8683726192 0.8505687714
+ 0.8815121055 0.8688694835 0.8511077166
+ 0.8819423914 0.8693662882 0.8516464829
+ 0.8823727965 0.8698632121 0.8521854281
+ 0.8828032017 0.8703600764 0.8527243137
+ 0.8832334876 0.8708568811 0.8532631993
+ 0.8836638927 0.8713538051 0.8538020849
+ 0.8840942979 0.8718507290 0.8543409705
+ 0.8845247030 0.8723474741 0.8548799157
+ 0.8849477172 0.8728402853 0.8554143906
+ 0.8853685856 0.8733280897 0.8559429049
+ 0.8857895732 0.8738158941 0.8564714193
+ 0.8862105012 0.8743038177 0.8569998741
+ 0.8866314888 0.8747916222 0.8575283289
+ 0.8870524168 0.8752794862 0.8580567837
+ 0.8874734044 0.8757672906 0.8585852981
+ 0.8878942728 0.8762552142 0.8591138124
+ 0.8883153200 0.8767430186 0.8596423268
+ 0.8887361884 0.8772308826 0.8601707816
+ 0.8891549706 0.8777185082 0.8606991768
+ 0.8895698786 0.8782029152 0.8612251878
+ 0.8899849057 0.8786873817 0.8617511988
+ 0.8903998733 0.8791717887 0.8622772098
+ 0.8908147812 0.8796561956 0.8628032804
+ 0.8912298083 0.8801407218 0.8633292913
+ 0.8916447759 0.8806251287 0.8638553023
+ 0.8920598030 0.8811094761 0.8643813133
+ 0.8924747109 0.8815940022 0.8649073243
+ 0.8928896785 0.8820784092 0.8654333949
+ 0.8933047056 0.8825628161 0.8659594059
+ 0.8937178850 0.8830412030 0.8664832711
+ 0.8941305876 0.8835136890 0.8670049906
+ 0.8945432901 0.8839861751 0.8675267100
+ 0.8949561119 0.8844587207 0.8680483103
+ 0.8953688145 0.8849312067 0.8685700297
+ 0.8957815766 0.8854036927 0.8690915704
+ 0.8961942792 0.8858762980 0.8696132898
+ 0.8966071010 0.8863487840 0.8701350093
+ 0.8970198035 0.8868213296 0.8706566095
+ 0.8974326253 0.8872938156 0.8711783290
+ 0.8978449106 0.8877663016 0.8716999292
+ 0.8982529044 0.8882371187 0.8722208142
+ 0.8986608982 0.8887075186 0.8727415204
+ 0.8990687728 0.8891779184 0.8732621074
+ 0.8994768262 0.8896481991 0.8737828135
+ 0.8998848200 0.8901185989 0.8743034005
+ 0.9002928138 0.8905889988 0.8748241067
+ 0.9007008076 0.8910593987 0.8753446937
+ 0.9011088014 0.8915297985 0.8758653998
+ 0.9015167952 0.8920001984 0.8763859868
+ 0.9019247293 0.8924705982 0.8769065738
+ 0.9023321867 0.8929408789 0.8774272799
+ 0.9027374983 0.8934035897 0.8779382706
+ 0.9031428099 0.8938655853 0.8784481287
+ 0.9035481215 0.8943277001 0.8789578080
+ 0.9039533734 0.8947896957 0.8794676065
+ 0.9043586850 0.8952516913 0.8799774051
+ 0.9047639966 0.8957138062 0.8804872036
+ 0.9051693082 0.8961758018 0.8809968829
+ 0.9055746198 0.8966377974 0.8815066814
+ 0.9059798717 0.8970997930 0.8820164800
+ 0.9063851833 0.8975619078 0.8825262785
+ 0.9067893028 0.8980239034 0.8830360174
+ 0.9071872830 0.8984869719 0.8835430741
+ 0.9075853229 0.8989502788 0.8840497136
+ 0.9079833031 0.8994135857 0.8845561743
+ 0.9083812833 0.8998768926 0.8850628138
+ 0.9087793231 0.9003401995 0.8855693936
+ 0.9091774225 0.9008035064 0.8860759735
+ 0.9095754027 0.9012668133 0.8865826130
+ 0.9099733829 0.9017301202 0.8870890737
+ 0.9103714228 0.9021934271 0.8875957131
+ 0.9107694030 0.9026566744 0.8881022930
+ 0.9111673832 0.9031199813 0.8886088729
+ 0.9115555286 0.9035797715 0.8891084790
+ 0.9119430780 0.9040381908 0.8896042705
+ 0.9123308063 0.9044964910 0.8901001811
+ 0.9127184153 0.9049547911 0.8905960917
+ 0.9131060839 0.9054132104 0.8910920024
+ 0.9134936929 0.9058715105 0.8915879130
+ 0.9138813019 0.9063298106 0.8920838237
+ 0.9142689705 0.9067881703 0.8925796747
+ 0.9146565795 0.9072464705 0.8930755854
+ 0.9150443077 0.9077047706 0.8935714960
+ 0.9154319167 0.9081631899 0.8940674067
+ 0.9158164263 0.9086192250 0.8945624232
+ 0.9161984921 0.9090703130 0.8950551748
+ 0.9165806770 0.9095214009 0.8955479264
+ 0.9169628024 0.9099724889 0.8960406780
+ 0.9173449874 0.9104235768 0.8965334892
+ 0.9177271724 0.9108747244 0.8970261812
+ 0.9181092978 0.9113258123 0.8975189924
+ 0.9184914827 0.9117770195 0.8980118036
+ 0.9188736081 0.9122281075 0.8985044956
+ 0.9192557931 0.9126791954 0.8989973068
+ 0.9196379781 0.9131302834 0.8994901180
+ 0.9200199842 0.9135813713 0.8999828100
+ 0.9203976989 0.9140260220 0.9004676938
+ 0.9207754731 0.9144688249 0.9009500146
+ 0.9211533070 0.9149116278 0.9014322758
+ 0.9215310812 0.9153543711 0.9019145966
+ 0.9219087958 0.9157971740 0.9023969173
+ 0.9222866297 0.9162399769 0.9028791785
+ 0.9226644039 0.9166827798 0.9033614993
+ 0.9230421185 0.9171255827 0.9038438201
+ 0.9234198928 0.9175683856 0.9043260813
+ 0.9237977266 0.9180111885 0.9048084021
+ 0.9241755009 0.9184539914 0.9052907228
+ 0.9245520234 0.9188957214 0.9057729244
+ 0.9249256849 0.9193243980 0.9062542915
+ 0.9252995253 0.9197530150 0.9067355990
+ 0.9256731868 0.9201816916 0.9072170258
+ 0.9260470271 0.9206103086 0.9076983929
+ 0.9264206886 0.9210389256 0.9081798196
+ 0.9267945290 0.9214676023 0.9086611271
+ 0.9271683097 0.9218962193 0.9091424942
+ 0.9275419712 0.9223248959 0.9096239209
+ 0.9279158115 0.9227535129 0.9101052284
+ 0.9282894731 0.9231821895 0.9105865955
+ 0.9286633134 0.9236108065 0.9110680223
+ 0.9290362000 0.9240378141 0.9115486741
+ 0.9294080734 0.9244576097 0.9120259881
+ 0.9297800064 0.9248775244 0.9125033021
+ 0.9301518798 0.9252973199 0.9129806757
+ 0.9305236936 0.9257171154 0.9134579897
+ 0.9308956265 0.9261369109 0.9139353037
+ 0.9312674999 0.9265568256 0.9144126773
+ 0.9316393733 0.9269766212 0.9148899913
+ 0.9320111871 0.9273964167 0.9153673053
+ 0.9323831201 0.9278162718 0.9158446193
+ 0.9327549934 0.9282361269 0.9163219929
+ 0.9331269264 0.9286559224 0.9167993069
+ 0.9334965944 0.9290750027 0.9172763824
+ 0.9338625073 0.9294890165 0.9177514911
+ 0.9342283010 0.9299029708 0.9182265997
+ 0.9345940948 0.9303171039 0.9187017083
+ 0.9349600077 0.9307311177 0.9191766977
+ 0.9353258014 0.9311450720 0.9196518064
+ 0.9356915951 0.9315592051 0.9201269150
+ 0.9360575080 0.9319732189 0.9206020236
+ 0.9364233017 0.9323871732 0.9210770726
+ 0.9367890954 0.9328011870 0.9215521812
+ 0.9371550083 0.9332153201 0.9220272899
+ 0.9375208020 0.9336292744 0.9225023985
+ 0.9378861189 0.9340432882 0.9229773879
+ 0.9382457137 0.9344478846 0.9234445095
+ 0.9386053085 0.9348514080 0.9239102006
+ 0.9389649034 0.9352548122 0.9243760109
+ 0.9393244982 0.9356582165 0.9248417020
+ 0.9396840930 0.9360616207 0.9253073931
+ 0.9400436878 0.9364650846 0.9257732034
+ 0.9404032826 0.9368684888 0.9262388945
+ 0.9407628775 0.9372718930 0.9267047048
+ 0.9411224723 0.9376752973 0.9271703959
+ 0.9414821267 0.9380788207 0.9276362062
+ 0.9418417215 0.9384822249 0.9281018972
+ 0.9422013164 0.9388856292 0.9285677075
+ 0.9425578713 0.9392852187 0.9290300012
+ 0.9429129958 0.9396802187 0.9294880033
+ 0.9432681203 0.9400752783 0.9299458861
+ 0.9436231852 0.9404702783 0.9304038882
+ 0.9439783096 0.9408653975 0.9308617711
+ 0.9443333149 0.9412603974 0.9313197732
+ 0.9446883798 0.9416555166 0.9317777753
+ 0.9450435042 0.9420505762 0.9322357178
+ 0.9453986287 0.9424455762 0.9326937199
+ 0.9457536936 0.9428406954 0.9331517220
+ 0.9461086988 0.9432356954 0.9336096048
+ 0.9464638233 0.9436308146 0.9340676069
+ 0.9468188286 0.9440258145 0.9345256090
+ 0.9471713901 0.9444158077 0.9349750280
+ 0.9475240111 0.9448049068 0.9354225993
+ 0.9478765726 0.9451941252 0.9358702898
+ 0.9482290745 0.9455832243 0.9363179803
+ 0.9485816956 0.9459723234 0.9367656112
+ 0.9489343166 0.9463614225 0.9372133017
+ 0.9492868781 0.9467505217 0.9376609921
+ 0.9496394992 0.9471396804 0.9381086826
+ 0.9499921203 0.9475287795 0.9385563135
+ 0.9503446817 0.9479178786 0.9390040040
+ 0.9506971836 0.9483069777 0.9394516945
+ 0.9510498047 0.9486961961 0.9398993254
+ 0.9514018297 0.9490848184 0.9403468966
+ 0.9517515898 0.9494650960 0.9407904744
+ 0.9521014094 0.9498453736 0.9412341118
+ 0.9524511099 0.9502257109 0.9416778088
+ 0.9528009295 0.9506059885 0.9421213865
+ 0.9531506896 0.9509863257 0.9425650239
+ 0.9535005093 0.9513666034 0.9430087209
+ 0.9538503289 0.9517468810 0.9434522986
+ 0.9542000890 0.9521272182 0.9438959956
+ 0.9545499086 0.9525074959 0.9443395734
+ 0.9548997283 0.9528877735 0.9447832108
+ 0.9552494287 0.9532681704 0.9452269077
+ 0.9555991888 0.9536485076 0.9456704855
+ 0.9559475183 0.9540281892 0.9461137056
+ 0.9562901855 0.9543992281 0.9465476871
+ 0.9566329122 0.9547703266 0.9469817877
+ 0.9569756985 0.9551414251 0.9474158287
+ 0.9573184252 0.9555124044 0.9478498101
+ 0.9576610923 0.9558835030 0.9482839108
+ 0.9580038786 0.9562546015 0.9487178922
+ 0.9583466053 0.9566255808 0.9491519928
+ 0.9586892724 0.9569966793 0.9495859742
+ 0.9590321183 0.9573677778 0.9500200152
+ 0.9593747854 0.9577388167 0.9504541159
+ 0.9597175121 0.9581099153 0.9508880973
+ 0.9600601792 0.9584810138 0.9513220787
+ 0.9604027271 0.9588519931 0.9517561793
+ 0.9607350230 0.9592133760 0.9521834254
+ 0.9610671997 0.9595736265 0.9526095986
+ 0.9613994956 0.9599336982 0.9530358911
+ 0.9617316723 0.9602938294 0.9534621239
+ 0.9620639086 0.9606539011 0.9538882971
+ 0.9623962045 0.9610139728 0.9543144703
+ 0.9627283812 0.9613741040 0.9547407031
+ 0.9630606174 0.9617341757 0.9551668763
+ 0.9633929133 0.9620944262 0.9555931091
+ 0.9637250900 0.9624544978 0.9560192823
+ 0.9640573859 0.9628146291 0.9564455152
+ 0.9643896222 0.9631747007 0.9568716884
+ 0.9647217989 0.9635347724 0.9572979212
+ 0.9650493860 0.9638900161 0.9577190876
+ 0.9653742909 0.9642401934 0.9581351280
+ 0.9656991959 0.9645903707 0.9585509896
+ 0.9660241008 0.9649404883 0.9589669704
+ 0.9663490057 0.9652907252 0.9593828917
+ 0.9666739106 0.9656409025 0.9597988725
+ 0.9669988155 0.9659910798 0.9602147937
+ 0.9673237205 0.9663413167 0.9606307745
+ 0.9676485062 0.9666914940 0.9610466957
+ 0.9679734111 0.9670416713 0.9614626765
+ 0.9682983160 0.9673919082 0.9618785977
+ 0.9686232209 0.9677420855 0.9622945786
+ 0.9689481258 0.9680922031 0.9627104998
+ 0.9692727923 0.9684423804 0.9631264806
+ 0.9695920944 0.9687845111 0.9635347724
+ 0.9699112773 0.9691258073 0.9639422894
+ 0.9702305794 0.9694671035 0.9643498063
+ 0.9705498815 0.9698083997 0.9647573233
+ 0.9708691835 0.9701496959 0.9651647806
+ 0.9711884260 0.9704909921 0.9655722976
+ 0.9715077281 0.9708322883 0.9659798741
+ 0.9718269706 0.9711735845 0.9663873911
+ 0.9721462131 0.9715148807 0.9667949080
+ 0.9724655151 0.9718561769 0.9672024250
+ 0.9727848172 0.9721974730 0.9676098824
+ 0.9731040001 0.9725388288 0.9680173993
+ 0.9734233022 0.9728801250 0.9684249163
+ 0.9737418890 0.9732202291 0.9688311219
+ 0.9740585089 0.9735528827 0.9692280293
+ 0.9743750095 0.9738854766 0.9696248770
+ 0.9746916294 0.9742181897 0.9700219035
+ 0.9750080705 0.9745507836 0.9704188108
+ 0.9753245711 0.9748834968 0.9708157182
+ 0.9756411910 0.9752160907 0.9712126255
+ 0.9759576917 0.9755488038 0.9716095924
+ 0.9762743115 0.9758813977 0.9720064998
+ 0.9765908122 0.9762141109 0.9724034071
+ 0.9769073129 0.9765467048 0.9728003144
+ 0.9772238731 0.9768794179 0.9731972814
+ 0.9775403738 0.9772120118 0.9735941887
+ 0.9778568745 0.9775447249 0.9739910960
+ 0.9781730771 0.9778758287 0.9743868709
+ 0.9784877896 0.9781979918 0.9747753739
+ 0.9788025022 0.9785202742 0.9751638770
+ 0.9791172147 0.9788424969 0.9755523801
+ 0.9794319868 0.9791647196 0.9759408832
+ 0.9797466993 0.9794870019 0.9763293862
+ 0.9800614119 0.9798092246 0.9767180085
+ 0.9803761244 0.9801315069 0.9771065116
+ 0.9806908965 0.9804537296 0.9774950147
+ 0.9810056090 0.9807758927 0.9778835177
+ 0.9813203216 0.9810981750 0.9782720208
+ 0.9816349745 0.9814203978 0.9786605239
+ 0.9819498062 0.9817426801 0.9790490866
+ 0.9822645187 0.9820649028 0.9794375896
+ 0.9825791121 0.9823871255 0.9798260927
+ 0.9828888774 0.9827020764 0.9802024961
+ 0.9831985831 0.9830166101 0.9805781245
+ 0.9835082889 0.9833310843 0.9809536934
+ 0.9838181138 0.9836456776 0.9813293219
+ 0.9841278195 0.9839602113 0.9817048907
+ 0.9844375253 0.9842746854 0.9820805192
+ 0.9847471714 0.9845892191 0.9824560881
+ 0.9850569963 0.9849038124 0.9828317761
+ 0.9853667021 0.9852182865 0.9832074046
+ 0.9856764078 0.9855328202 0.9835829735
+ 0.9859861732 0.9858472943 0.9839586020
+ 0.9862958789 0.9861618876 0.9843341708
+ 0.9866055846 0.9864764214 0.9847097993
+ 0.9869154096 0.9867908955 0.9850854278
+ 0.9872199893 0.9871007800 0.9854502082
+ 0.9875209928 0.9874067903 0.9858055115
+ 0.9878221154 0.9877126813 0.9861608148
+ 0.9881231189 0.9880186915 0.9865159988
+ 0.9884241223 0.9883245826 0.9868713021
+ 0.9887251854 0.9886305928 0.9872264862
+ 0.9890261889 0.9889364839 0.9875817895
+ 0.9893273115 0.9892424941 0.9879369736
+ 0.9896283150 0.9895483851 0.9882922769
+ 0.9899293780 0.9898543954 0.9886475801
+ 0.9902303815 0.9901602864 0.9890028238
+ 0.9905313849 0.9904662967 0.9893581271
+ 0.9908325076 0.9907721877 0.9897133112
+ 0.9911335111 0.9910781980 0.9900686145
+ 0.9914345741 0.9913840890 0.9904237986
+ 0.9917227030 0.9916865230 0.9907621741
+ 0.9920099974 0.9919885993 0.9910988212
+ 0.9922972918 0.9922906160 0.9914355278
+ 0.9925847054 0.9925926924 0.9917721152
+ 0.9928719997 0.9928947091 0.9921088219
+ 0.9931594133 0.9931967854 0.9924454093
+ 0.9934467077 0.9934988022 0.9927819967
+ 0.9937341213 0.9938008785 0.9931187034
+ 0.9940214157 0.9941028953 0.9934552908
+ 0.9943088293 0.9944049716 0.9937918782
+ 0.9945961237 0.9947069883 0.9941285849
+ 0.9948834777 0.9950091243 0.9944651723
+ 0.9951707721 0.9953110814 0.9948018789
+ 0.9954581857 0.9956132174 0.9951385260
+ 0.9957451820 0.9959133267 0.9954729080
+ 0.9960289001 0.9961857200 0.9957746863
+ 0.9963124990 0.9964581728 0.9960765243
+ 0.9965962172 0.9967306256 0.9963783026
+ 0.9968798161 0.9970030785 0.9966800809
+ 0.9971634746 0.9972754717 0.9969819188
+ 0.9974470735 0.9975479841 0.9972836971
+ 0.9977307916 0.9978203773 0.9975854754
+ 0.9980143905 0.9980928898 0.9978873134
+ 0.9982981086 0.9983652830 0.9981892109
+ 0.9985817075 0.9986377954 0.9984909892
+ 0.9988654256 0.9989101887 0.9987928271
+ 0.9991490245 0.9991827011 0.9990946054
+ 0.9994326830 0.9994550943 0.9993963838
+ 0.9997162819 0.9997276068 0.9996982217
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/fujifilm_f-250.spi1d b/release/datafiles/colormanagement/luts/film_response/fujifilm_f-250.spi1d
new file mode 100644
index 00000000000..cf2405a3bf7
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/fujifilm_f-250.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0340563506 0.0275065694 0.0159309693
+ 0.0581281595 0.0446017683 0.0286259800
+ 0.0766732469 0.0585205704 0.0393032692
+ 0.0912864283 0.0693459511 0.0486846492
+ 0.1037112027 0.0783905834 0.0571168698
+ 0.1149740964 0.0866255537 0.0647848472
+ 0.1255443990 0.0943730623 0.0718255714
+ 0.1358117014 0.1018529013 0.0783746019
+ 0.1458894014 0.1092692986 0.0845360085
+ 0.1554104984 0.1165430993 0.0902841464
+ 0.1642753929 0.1235136986 0.0956311375
+ 0.1725185066 0.1300638020 0.1007089019
+ 0.1802159995 0.1362310052 0.1055677980
+ 0.1874677986 0.1420270056 0.1101925969
+ 0.1943995059 0.1475103050 0.1146183014
+ 0.2010439038 0.1526764929 0.1188452989
+ 0.2075248957 0.1576137990 0.1229263991
+ 0.2138666064 0.1623017043 0.1268835962
+ 0.2200817019 0.1667637974 0.1307622045
+ 0.2262571007 0.1710768938 0.1345600933
+ 0.2322959006 0.1752613038 0.1383388937
+ 0.2381743044 0.1792901009 0.1420553029
+ 0.2439599037 0.1831696928 0.1457192004
+ 0.2495301962 0.1869384944 0.1493068933
+ 0.2549104095 0.1905891001 0.1528359056
+ 0.2600974143 0.1941210032 0.1562989056
+ 0.2651267946 0.1975311041 0.1596667022
+ 0.2699950933 0.2007963061 0.1629731953
+ 0.2746872902 0.2039687932 0.1662473977
+ 0.2792500854 0.2070634067 0.1694674939
+ 0.2837044001 0.2100957930 0.1726872027
+ 0.2880541086 0.2130752951 0.1758597940
+ 0.2922781110 0.2160121948 0.1789810956
+ 0.2963983119 0.2189164013 0.1820618957
+ 0.3004223108 0.2217878997 0.1850834042
+ 0.3043056130 0.2246080041 0.1880794019
+ 0.3080697954 0.2273644060 0.1910150051
+ 0.3117355108 0.2300619930 0.1939160973
+ 0.3153220117 0.2327065021 0.1967920959
+ 0.3188439906 0.2353048027 0.1996531039
+ 0.3223091066 0.2378443033 0.2024717033
+ 0.3257097900 0.2403286994 0.2052704990
+ 0.3290207982 0.2427732944 0.2080609947
+ 0.3322731853 0.2452045977 0.2108310014
+ 0.3354865909 0.2476018071 0.2135528028
+ 0.3386512101 0.2499758005 0.2162420005
+ 0.3417851031 0.2523289025 0.2188850939
+ 0.3448846936 0.2546671927 0.2214843929
+ 0.3479135036 0.2569605112 0.2240575999
+ 0.3508971930 0.2591898143 0.2266031057
+ 0.3538430929 0.2613660097 0.2291243970
+ 0.3567287922 0.2634985149 0.2316229939
+ 0.3595845103 0.2655822933 0.2340888977
+ 0.3624258935 0.2676230967 0.2365391999
+ 0.3652456105 0.2696104944 0.2389807999
+ 0.3680748940 0.2715514004 0.2413962036
+ 0.3708611131 0.2734310031 0.2437824011
+ 0.3735972047 0.2752597928 0.2461562008
+ 0.3762691021 0.2770377994 0.2485167980
+ 0.3789086044 0.2787886858 0.2508699000
+ 0.3814966083 0.2805095911 0.2532047033
+ 0.3840735853 0.2822039127 0.2555142939
+ 0.3866173923 0.2838774920 0.2578059137
+ 0.3891361058 0.2855109870 0.2600739002
+ 0.3916285038 0.2871398032 0.2623229921
+ 0.3941093087 0.2887691855 0.2645553052
+ 0.3965596855 0.2904030979 0.2667697966
+ 0.3989767134 0.2920188010 0.2689580023
+ 0.4013713896 0.2936233878 0.2711285055
+ 0.4037455022 0.2952230871 0.2732937932
+ 0.4060991108 0.2968241870 0.2754479051
+ 0.4084275067 0.2984308898 0.2775818110
+ 0.4107517004 0.3000445962 0.2796877921
+ 0.4130510986 0.3016583025 0.2817656994
+ 0.4153209031 0.3032869101 0.2838352919
+ 0.4175666869 0.3049050868 0.2858906984
+ 0.4197983146 0.3065397143 0.2879244983
+ 0.4220117033 0.3081744909 0.2899451852
+ 0.4241906106 0.3098129034 0.2919526100
+ 0.4263457954 0.3114565909 0.2939467132
+ 0.4284875989 0.3130967915 0.2959286869
+ 0.4306012988 0.3147349954 0.2978995144
+ 0.4326950014 0.3163720965 0.2998577058
+ 0.4347662032 0.3180099130 0.3018037975
+ 0.4368287027 0.3196572065 0.3037435114
+ 0.4388831854 0.3213165104 0.3056769073
+ 0.4409214854 0.3229748011 0.3075988889
+ 0.4429436028 0.3246040940 0.3095020056
+ 0.4449625909 0.3262285888 0.3113960922
+ 0.4469791055 0.3278538883 0.3132843077
+ 0.4489935935 0.3294833004 0.3151693940
+ 0.4509986937 0.3311119974 0.3170453012
+ 0.4529815018 0.3327403069 0.3189097047
+ 0.4549526870 0.3343681991 0.3207617104
+ 0.4569247961 0.3359952867 0.3225966990
+ 0.4588770866 0.3376198113 0.3244307935
+ 0.4608316123 0.3392421007 0.3262627125
+ 0.4627926052 0.3408617973 0.3280918002
+ 0.4647417963 0.3424758017 0.3298951089
+ 0.4666925967 0.3440926969 0.3316844106
+ 0.4686441123 0.3457145989 0.3334603012
+ 0.4705764949 0.3473288119 0.3352111876
+ 0.4724830091 0.3489370942 0.3369530141
+ 0.4743657112 0.3505378962 0.3386858106
+ 0.4762322009 0.3521256149 0.3404065073
+ 0.4780816138 0.3537108004 0.3421171010
+ 0.4799089134 0.3552944958 0.3438138068
+ 0.4817309082 0.3568659127 0.3454996943
+ 0.4835452139 0.3584319055 0.3471781015
+ 0.4853380024 0.3599914014 0.3488380909
+ 0.4871332943 0.3615401089 0.3504877090
+ 0.4889298975 0.3630783856 0.3521300852
+ 0.4907036126 0.3646185100 0.3537611961
+ 0.4924693108 0.3661572933 0.3553892970
+ 0.4942173064 0.3676883876 0.3570109904
+ 0.4959532917 0.3692195117 0.3586300910
+ 0.4976806045 0.3707506955 0.3602473140
+ 0.4994089901 0.3722806871 0.3618556857
+ 0.5011367202 0.3738102019 0.3634608984
+ 0.5028569102 0.3753306866 0.3650502861
+ 0.5045688748 0.3768486083 0.3666361868
+ 0.5062633157 0.3783572018 0.3682140112
+ 0.5079504251 0.3798607886 0.3697811067
+ 0.5096306801 0.3813571036 0.3713372052
+ 0.5112873912 0.3828429878 0.3728885055
+ 0.5129328966 0.3843210936 0.3744373918
+ 0.5145742297 0.3857963085 0.3759793937
+ 0.5162146091 0.3872702122 0.3775196970
+ 0.5178315043 0.3887482882 0.3790464103
+ 0.5194466114 0.3902272880 0.3805716932
+ 0.5210654736 0.3916977048 0.3820922077
+ 0.5226833224 0.3931671977 0.3836125135
+ 0.5242862105 0.3946341872 0.3851282001
+ 0.5258901119 0.3961010873 0.3866432905
+ 0.5275049806 0.3975507915 0.3881508112
+ 0.5291187763 0.3990002871 0.3896571100
+ 0.5307204127 0.4004558921 0.3911463916
+ 0.5323221087 0.4019115865 0.3926354945
+ 0.5339249969 0.4033721089 0.3941121101
+ 0.5355278850 0.4048328102 0.3955886960
+ 0.5371186137 0.4062801898 0.3970466852
+ 0.5387089849 0.4077258110 0.3985038996
+ 0.5402762294 0.4091561139 0.3999438882
+ 0.5418404937 0.4105820954 0.4013813138
+ 0.5433958173 0.4120019972 0.4028140903
+ 0.5449482799 0.4134188890 0.4042451978
+ 0.5464795232 0.4148291945 0.4056676030
+ 0.5479968190 0.4162329137 0.4070835114
+ 0.5495104194 0.4176310897 0.4084953070
+ 0.5510190725 0.4190171063 0.4099004865
+ 0.5525225997 0.4204013050 0.4113028049
+ 0.5540046096 0.4217655063 0.4126909971
+ 0.5554866195 0.4231297076 0.4140791893
+ 0.5569679737 0.4244849980 0.4154512882
+ 0.5584493279 0.4258384109 0.4168216884
+ 0.5599154234 0.4271919131 0.4181849957
+ 0.5613729954 0.4285452962 0.4195438027
+ 0.5628271103 0.4298977852 0.4209015071
+ 0.5642738938 0.4312470853 0.4222564995
+ 0.5657206774 0.4325963855 0.4236116111
+ 0.5671554208 0.4339382946 0.4249607027
+ 0.5685896277 0.4352790117 0.4263094068
+ 0.5700142980 0.4366140068 0.4276516140
+ 0.5714316964 0.4379422963 0.4289883971
+ 0.5728462934 0.4392705858 0.4303236902
+ 0.5742422938 0.4405961931 0.4316473901
+ 0.5756382942 0.4419218898 0.4329712093
+ 0.5770087838 0.4432437122 0.4342881143
+ 0.5783665776 0.4445624053 0.4356010854
+ 0.5797222257 0.4458796084 0.4369125068
+ 0.5810663104 0.4471733868 0.4382139146
+ 0.5824103951 0.4484671950 0.4395152032
+ 0.5837360024 0.4497536123 0.4408144057
+ 0.5850501060 0.4510329962 0.4421119988
+ 0.5863640904 0.4523124993 0.4434092939
+ 0.5876724124 0.4535883069 0.4446893036
+ 0.5889807940 0.4548639953 0.4459693134
+ 0.5902798176 0.4561336040 0.4472444057
+ 0.5915662050 0.4573903978 0.4485121965
+ 0.5928525925 0.4586473107 0.4497799873
+ 0.5941187143 0.4598957002 0.4510425925
+ 0.5953786969 0.4611397982 0.4523034990
+ 0.5966371894 0.4623838067 0.4535635114
+ 0.5978767872 0.4636138082 0.4548071027
+ 0.5991163850 0.4648432136 0.4560508132
+ 0.6003507972 0.4660690129 0.4572936893
+ 0.6015748978 0.4672825933 0.4585348964
+ 0.6027989984 0.4684962034 0.4597761929
+ 0.6040027738 0.4697115123 0.4610106051
+ 0.6051900983 0.4709289968 0.4622390866
+ 0.6063774228 0.4721465111 0.4634675980
+ 0.6075572968 0.4733569920 0.4646885097
+ 0.6087344885 0.4745635092 0.4659062028
+ 0.6099116802 0.4757699072 0.4671239853
+ 0.6110656857 0.4769654870 0.4683316052
+ 0.6122164130 0.4781579971 0.4695374966
+ 0.6133670807 0.4793503881 0.4707433879
+ 0.6145061851 0.4805291891 0.4719372094
+ 0.6156448722 0.4817059934 0.4731302857
+ 0.6167832017 0.4828827083 0.4743235111
+ 0.6179025769 0.4840502143 0.4755181074
+ 0.6190220714 0.4852168858 0.4767127037
+ 0.6201403141 0.4863835871 0.4779073000
+ 0.6212201118 0.4875405133 0.4790931046
+ 0.6222999096 0.4886966050 0.4802789986
+ 0.6233797073 0.4898526967 0.4814648926
+ 0.6244452000 0.4909954071 0.4826442897
+ 0.6255105734 0.4921365082 0.4838235974
+ 0.6265758872 0.4932776093 0.4850027859
+ 0.6276177168 0.4943977892 0.4861753881
+ 0.6286571026 0.4955132902 0.4873471856
+ 0.6296964884 0.4966287911 0.4885190129
+ 0.6307348013 0.4977380931 0.4896813035
+ 0.6317728162 0.4988445044 0.4908406138
+ 0.6328107715 0.4999508858 0.4919998944
+ 0.6338409781 0.5010526180 0.4931561053
+ 0.6348659992 0.5021498799 0.4943102002
+ 0.6358910799 0.5032472014 0.4954642057
+ 0.6369110942 0.5043411851 0.4966160059
+ 0.6379228830 0.5054274201 0.4977641106
+ 0.6389346719 0.5065134764 0.4989121854
+ 0.6399447918 0.5075992942 0.5000599027
+ 0.6409429908 0.5086715221 0.5012037158
+ 0.6419411898 0.5097436905 0.5023475885
+ 0.6429393291 0.5108159184 0.5034914017
+ 0.6439177990 0.5118789077 0.5046312809
+ 0.6448913813 0.5129379034 0.5057700872
+ 0.6458649039 0.5139970183 0.5069088936
+ 0.6468328834 0.5150539875 0.5080435872
+ 0.6477934122 0.5161070824 0.5091723204
+ 0.6487538815 0.5171602964 0.5103009939
+ 0.6497141719 0.5182133913 0.5114297271
+ 0.6506603956 0.5192496181 0.5125468969
+ 0.6516065001 0.5202844143 0.5136641264
+ 0.6525526047 0.5213190913 0.5147812963
+ 0.6534926891 0.5223445892 0.5158960819
+ 0.6544277072 0.5233588815 0.5170087814
+ 0.6553627253 0.5243731141 0.5181214809
+ 0.6562976837 0.5253874063 0.5192341805
+ 0.6572293043 0.5263924003 0.5203433037
+ 0.6581609249 0.5273966789 0.5214524269
+ 0.6590924859 0.5284010172 0.5225614905
+ 0.6600255966 0.5294005275 0.5236659050
+ 0.6609606147 0.5303912163 0.5247640014
+ 0.6618955731 0.5313820243 0.5258620977
+ 0.6628304720 0.5323727131 0.5269600749
+ 0.6637492776 0.5333474278 0.5280525088
+ 0.6646643877 0.5343161225 0.5291435122
+ 0.6655796170 0.5352846980 0.5302343965
+ 0.6664931774 0.5362530947 0.5313249230
+ 0.6673964858 0.5372167230 0.5324121714
+ 0.6682997942 0.5381802917 0.5334994793
+ 0.6692031026 0.5391438007 0.5345867276
+ 0.6701043844 0.5401027799 0.5356699824
+ 0.6710026860 0.5410515070 0.5367466807
+ 0.6719009876 0.5420001745 0.5378234982
+ 0.6727992892 0.5429489017 0.5389001966
+ 0.6736878753 0.5438944101 0.5399749279
+ 0.6745703220 0.5448371172 0.5410481095
+ 0.6754528284 0.5457797050 0.5421212912
+ 0.6763352156 0.5467222929 0.5431944728
+ 0.6772043705 0.5476604104 0.5442599058
+ 0.6780694127 0.5485960841 0.5453224778
+ 0.6789343953 0.5495318174 0.5463851094
+ 0.6797993779 0.5504674911 0.5474476814
+ 0.6806520224 0.5513973236 0.5485045910
+ 0.6815025806 0.5523251891 0.5495604277
+ 0.6823530793 0.5532531142 0.5506160855
+ 0.6832036972 0.5541810989 0.5516719222
+ 0.6840479970 0.5551018715 0.5527248979
+ 0.6848915219 0.5560209155 0.5537775159
+ 0.6857351065 0.5569398999 0.5548300743
+ 0.6865785718 0.5578588843 0.5558826923
+ 0.6874216795 0.5587705970 0.5569267869
+ 0.6882647872 0.5596801043 0.5579692721
+ 0.6891077757 0.5605894923 0.5590118766
+ 0.6899508238 0.5614989996 0.5600544214
+ 0.6907768250 0.5624088049 0.5610944033
+ 0.6915978789 0.5633186102 0.5621334910
+ 0.6924189925 0.5642284751 0.5631725788
+ 0.6932401061 0.5651383996 0.5642117262
+ 0.6940519214 0.5660479069 0.5652444959
+ 0.6948580742 0.5669571161 0.5662732720
+ 0.6956644058 0.5678663254 0.5673021078
+ 0.6964706779 0.5687754750 0.5683308840
+ 0.6972733736 0.5696833730 0.5693569779
+ 0.6980714798 0.5705887079 0.5703790784
+ 0.6988695264 0.5714939833 0.5714011788
+ 0.6996675134 0.5723993182 0.5724232793
+ 0.7004622221 0.5733036995 0.5734450221
+ 0.7012382150 0.5741962790 0.5744643211
+ 0.7020143270 0.5750889182 0.5754836798
+ 0.7027903795 0.5759814978 0.5765029788
+ 0.7035663724 0.5768741965 0.5775223970
+ 0.7043431997 0.5777689219 0.5785338283
+ 0.7051200867 0.5786644220 0.5795432925
+ 0.7058969736 0.5795599818 0.5805526972
+ 0.7066739202 0.5804554820 0.5815622211
+ 0.7074453831 0.5813494921 0.5825701952
+ 0.7082093954 0.5822402835 0.5835762024
+ 0.7089732885 0.5831311941 0.5845820904
+ 0.7097373009 0.5840221047 0.5855880976
+ 0.7105011940 0.5849128962 0.5865939856
+ 0.7112401128 0.5857965946 0.5875905156
+ 0.7119778991 0.5866792202 0.5885863900
+ 0.7127156258 0.5875617862 0.5895823240
+ 0.7134532928 0.5884444714 0.5905781984
+ 0.7141891718 0.5893244147 0.5915713906
+ 0.7149226069 0.5901988745 0.5925608873
+ 0.7156559825 0.5910735130 0.5935503244
+ 0.7163894176 0.5919480920 0.5945397019
+ 0.7171227932 0.5928226709 0.5955291986
+ 0.7178444862 0.5936961174 0.5965164900
+ 0.7185636759 0.5945690870 0.5975033045
+ 0.7192828059 0.5954421759 0.5984901190
+ 0.7200019956 0.5963152051 0.5994768739
+ 0.7207183242 0.5971875191 0.6004620194
+ 0.7214186788 0.5980507731 0.6014366150
+ 0.7221192122 0.5989142060 0.6024110913
+ 0.7228196263 0.5997775197 0.6033856869
+ 0.7235201001 0.6006407738 0.6043602824
+ 0.7242172956 0.6015027165 0.6053301096
+ 0.7249100804 0.6023617983 0.6062927842
+ 0.7256028056 0.6032208800 0.6072555184
+ 0.7262955904 0.6040800214 0.6082183123
+ 0.7269883156 0.6049389839 0.6091809869
+ 0.7276725173 0.6057918072 0.6101375222
+ 0.7283511758 0.6066387892 0.6110895872
+ 0.7290298939 0.6074858904 0.6120417714
+ 0.7297086120 0.6083328724 0.6129938960
+ 0.7303872705 0.6091799736 0.6139460802
+ 0.7310575843 0.6100224853 0.6148930788
+ 0.7317247987 0.6108626127 0.6158381104
+ 0.7323920727 0.6117026210 0.6167830825
+ 0.7330592871 0.6125426888 0.6177281737
+ 0.7337265015 0.6133828163 0.6186732054
+ 0.7343794703 0.6142179966 0.6196153164
+ 0.7350285053 0.6150509715 0.6205565929
+ 0.7356774211 0.6158841252 0.6214978099
+ 0.7363263965 0.6167172194 0.6224390864
+ 0.7369753718 0.6175503135 0.6233803034
+ 0.7376106977 0.6183786988 0.6243141890
+ 0.7382416129 0.6192048192 0.6252453923
+ 0.7388725281 0.6200309992 0.6261765957
+ 0.7395033836 0.6208571196 0.6271077991
+ 0.7401342988 0.6216832995 0.6280390024
+ 0.7407568097 0.6225084066 0.6289677024
+ 0.7413746715 0.6233326197 0.6298949122
+ 0.7419925928 0.6241568923 0.6308221221
+ 0.7426105142 0.6249812245 0.6317493916
+ 0.7432283759 0.6258054972 0.6326766014
+ 0.7438343167 0.6266260743 0.6335960031
+ 0.7444267869 0.6274409294 0.6345061064
+ 0.7450193167 0.6282557249 0.6354162097
+ 0.7456117868 0.6290705204 0.6363263130
+ 0.7462043166 0.6298853159 0.6372364163
+ 0.7467948198 0.6306993961 0.6381446719
+ 0.7473781109 0.6315096021 0.6390461922
+ 0.7479612827 0.6323196888 0.6399477124
+ 0.7485445142 0.6331298947 0.6408491731
+ 0.7491278052 0.6339399815 0.6417506933
+ 0.7497109771 0.6347501874 0.6426522136
+ 0.7502849102 0.6355507970 0.6435450912
+ 0.7508574128 0.6363490820 0.6444365978
+ 0.7514299750 0.6371474862 0.6453281045
+ 0.7520025969 0.6379457712 0.6462196112
+ 0.7525750995 0.6387441158 0.6471111178
+ 0.7531384230 0.6395425200 0.6479977965
+ 0.7536910176 0.6403411031 0.6488788128
+ 0.7542436123 0.6411396861 0.6497598290
+ 0.7547962070 0.6419383287 0.6506407857
+ 0.7553488016 0.6427369118 0.6515218019
+ 0.7559013963 0.6435353756 0.6524028182
+ 0.7564553022 0.6443219781 0.6532747746
+ 0.7570090890 0.6451072097 0.6541464925
+ 0.7575628757 0.6458923221 0.6550180912
+ 0.7581167817 0.6466773748 0.6558898091
+ 0.7586706281 0.6474626064 0.6567614079
+ 0.7592213154 0.6482473016 0.6576269865
+ 0.7597671151 0.6490309238 0.6584824920
+ 0.7603129745 0.6498146057 0.6593379974
+ 0.7608588934 0.6505982876 0.6601936221
+ 0.7614046931 0.6513819098 0.6610491276
+ 0.7619506121 0.6521655917 0.6619045734
+ 0.7624893785 0.6529437900 0.6627510786
+ 0.7630257010 0.6537193060 0.6635940075
+ 0.7635619044 0.6544947028 0.6644368768
+ 0.7640982270 0.6552700996 0.6652798057
+ 0.7646344900 0.6560454965 0.6661226749
+ 0.7651708126 0.6568210125 0.6669656038
+ 0.7657119036 0.6575928926 0.6677941084
+ 0.7662529945 0.6583644748 0.6686221957
+ 0.7667940855 0.6591361761 0.6694504023
+ 0.7673352957 0.6599078178 0.6702784896
+ 0.7678763866 0.6606794000 0.6711065769
+ 0.7684165239 0.6614500880 0.6719334722
+ 0.7689508796 0.6622111201 0.6727535725
+ 0.7694852948 0.6629719734 0.6735736132
+ 0.7700197101 0.6637328863 0.6743935943
+ 0.7705541849 0.6644939184 0.6752135754
+ 0.7710886002 0.6652547717 0.6760336161
+ 0.7716192007 0.6660150290 0.6768512130
+ 0.7721378803 0.6667712927 0.6776608229
+ 0.7726566792 0.6675274968 0.6784703732
+ 0.7731754184 0.6682838202 0.6792799830
+ 0.7736940980 0.6690400839 0.6800895929
+ 0.7742128968 0.6697964072 0.6808992028
+ 0.7747325897 0.6705529094 0.6817058921
+ 0.7752555013 0.6713106036 0.6825023890
+ 0.7757782936 0.6720684171 0.6832988858
+ 0.7763012052 0.6728261113 0.6840953827
+ 0.7768241167 0.6735839248 0.6848918796
+ 0.7773470283 0.6743416190 0.6856883764
+ 0.7778692245 0.6750988960 0.6864832044
+ 0.7783874273 0.6758496761 0.6872665882
+ 0.7789055705 0.6766005158 0.6880499721
+ 0.7794237733 0.6773511767 0.6888334155
+ 0.7799419165 0.6781020164 0.6896167994
+ 0.7804601192 0.6788527966 0.6904001832
+ 0.7809783220 0.6796035767 0.6911836267
+ 0.7814986110 0.6803464890 0.6919562221
+ 0.7820190191 0.6810883880 0.6927281022
+ 0.7825394273 0.6818302870 0.6934999824
+ 0.7830597758 0.6825721860 0.6942719221
+ 0.7835801840 0.6833140850 0.6950438023
+ 0.7841004729 0.6840559840 0.6958156824
+ 0.7846269011 0.6847928166 0.6965779066
+ 0.7851561904 0.6855260730 0.6973350048
+ 0.7856854796 0.6862595081 0.6980922222
+ 0.7862148285 0.6869928837 0.6988493204
+ 0.7867441177 0.6877261996 0.6996064186
+ 0.7872734070 0.6884595752 0.7003635764
+ 0.7878013253 0.6891936064 0.7011185288
+ 0.7883257270 0.6899294853 0.7018678784
+ 0.7888501287 0.6906654835 0.7026172876
+ 0.7893745899 0.6914014816 0.7033666968
+ 0.7898989916 0.6921374202 0.7041161060
+ 0.7904235125 0.6928734183 0.7048655152
+ 0.7909479141 0.6936092973 0.7056149244
+ 0.7914677858 0.6943377256 0.7063497901
+ 0.7919868231 0.6950635910 0.7070816159
+ 0.7925058007 0.6957895756 0.7078133821
+ 0.7930247784 0.6965156198 0.7085452080
+ 0.7935438156 0.6972414851 0.7092769742
+ 0.7940626740 0.6979675293 0.7100086808
+ 0.7945836782 0.6986932755 0.7107384205
+ 0.7951102257 0.6994187832 0.7114617229
+ 0.7956367135 0.7001444101 0.7121850252
+ 0.7961632013 0.7008699179 0.7129083276
+ 0.7966896892 0.7015954256 0.7136315703
+ 0.7972161770 0.7023208737 0.7143548727
+ 0.7977427244 0.7030463815 0.7150781751
+ 0.7982670069 0.7037687898 0.7157930732
+ 0.7987899780 0.7044885755 0.7165021896
+ 0.7993130088 0.7052084208 0.7172113061
+ 0.7998359799 0.7059280872 0.7179204226
+ 0.8003590107 0.7066478729 0.7186294198
+ 0.8008819818 0.7073677182 0.7193384767
+ 0.8014048934 0.7080873847 0.7200475931
+ 0.8019158244 0.7088059783 0.7207496762
+ 0.8024243116 0.7095242143 0.7214503884
+ 0.8029329181 0.7102422714 0.7221511006
+ 0.8034414053 0.7109605074 0.7228518128
+ 0.8039500117 0.7116786838 0.7235525250
+ 0.8044584990 0.7123969197 0.7242532969
+ 0.8049671054 0.7131149769 0.7249540091
+ 0.8054732084 0.7138308883 0.7256454825
+ 0.8059793115 0.7145465016 0.7263367176
+ 0.8064854145 0.7152621150 0.7270278931
+ 0.8069915175 0.7159777284 0.7277191877
+ 0.8074976206 0.7166932821 0.7284104228
+ 0.8080037236 0.7174088955 0.7291015983
+ 0.8085097075 0.7181245089 0.7297927737
+ 0.8090131879 0.7188358903 0.7304673791
+ 0.8095167279 0.7195469737 0.7311419249
+ 0.8100202084 0.7202581167 0.7318164706
+ 0.8105236888 0.7209693193 0.7324910164
+ 0.8110272288 0.7216804028 0.7331656218
+ 0.8115307093 0.7223916054 0.7338401079
+ 0.8120341897 0.7231026888 0.7345147133
+ 0.8125367761 0.7238088846 0.7351782918
+ 0.8130393028 0.7245143056 0.7358410954
+ 0.8135418892 0.7252197862 0.7365038991
+ 0.8140444160 0.7259252071 0.7371665835
+ 0.8145468831 0.7266306877 0.7378293872
+ 0.8150494099 0.7273361087 0.7384921908
+ 0.8155519962 0.7280415893 0.7391549945
+ 0.8160499930 0.7287421227 0.7398017049
+ 0.8165466189 0.7294405103 0.7404432297
+ 0.8170431852 0.7301387787 0.7410846949
+ 0.8175398111 0.7308372259 0.7417262197
+ 0.8180363774 0.7315356135 0.7423676848
+ 0.8185330033 0.7322340012 0.7430092096
+ 0.8190296888 0.7329323888 0.7436506748
+ 0.8195242286 0.7336298227 0.7442870736
+ 0.8200165033 0.7343257070 0.7449178100
+ 0.8205088973 0.7350217104 0.7455484867
+ 0.8210011721 0.7357177138 0.7461792231
+ 0.8214935064 0.7364135981 0.7468098998
+ 0.8219857812 0.7371096015 0.7474406958
+ 0.8224781752 0.7378056049 0.7480713725
+ 0.8229702115 0.7385014892 0.7487009168
+ 0.8234596252 0.7391961217 0.7493168712
+ 0.8239489794 0.7398905754 0.7499328852
+ 0.8244382739 0.7405852079 0.7505488992
+ 0.8249276876 0.7412797809 0.7511649132
+ 0.8254171014 0.7419744134 0.7517809272
+ 0.8259065151 0.7426689267 0.7523968816
+ 0.8263958097 0.7433634996 0.7530128956
+ 0.8268806934 0.7440590262 0.7536231279
+ 0.8273624778 0.7447553277 0.7542291880
+ 0.8278442025 0.7454516888 0.7548351884
+ 0.8283259869 0.7461479902 0.7554411888
+ 0.8288077116 0.7468442917 0.7560473084
+ 0.8292894959 0.7475407124 0.7566533089
+ 0.8297712207 0.7482370138 0.7572593093
+ 0.8302530050 0.7489333153 0.7578654289
+ 0.8307291269 0.7496249080 0.7584576011
+ 0.8312050104 0.7503160834 0.7590492964
+ 0.8316810131 0.7510071993 0.7596409917
+ 0.8321568966 0.7516983747 0.7602326870
+ 0.8326328993 0.7523894906 0.7608243823
+ 0.8331087828 0.7530807257 0.7614160776
+ 0.8335847259 0.7537717819 0.7620077729
+ 0.8340600729 0.7544625998 0.7625957727
+ 0.8345336914 0.7551519275 0.7631717920
+ 0.8350073099 0.7558411956 0.7637478113
+ 0.8354809284 0.7565305233 0.7643237710
+ 0.8359544873 0.7572197914 0.7648997903
+ 0.8364281058 0.7579091191 0.7654758096
+ 0.8369017243 0.7585983872 0.7660518289
+ 0.8373752832 0.7592877150 0.7666277885
+ 0.8378481865 0.7599760294 0.7671977878
+ 0.8383200169 0.7606624961 0.7677584291
+ 0.8387917876 0.7613489032 0.7683190107
+ 0.8392636776 0.7620353103 0.7688795924
+ 0.8397355080 0.7627217770 0.7694401741
+ 0.8402072787 0.7634081841 0.7700008154
+ 0.8406791091 0.7640945911 0.7705613971
+ 0.8411508799 0.7647809982 0.7711219788
+ 0.8416199088 0.7654656768 0.7716754079
+ 0.8420853019 0.7661474943 0.7722191811
+ 0.8425505757 0.7668293118 0.7727630734
+ 0.8430159092 0.7675111294 0.7733069062
+ 0.8434813023 0.7681930065 0.7738506794
+ 0.8439465761 0.7688748240 0.7743945122
+ 0.8444120288 0.7695565820 0.7749384046
+ 0.8448773026 0.7702383995 0.7754821777
+ 0.8453407288 0.7709181905 0.7760233283
+ 0.8458008170 0.7715933919 0.7765594125
+ 0.8462607861 0.7722684741 0.7770954967
+ 0.8467208147 0.7729436755 0.7776315808
+ 0.8471809030 0.7736188173 0.7781677246
+ 0.8476408720 0.7742940187 0.7787038088
+ 0.8481009007 0.7749692202 0.7792398930
+ 0.8485609889 0.7756443024 0.7797759771
+ 0.8490195274 0.7763193250 0.7803099751
+ 0.8494699001 0.7769930959 0.7808322906
+ 0.8499203920 0.7776669264 0.7813544869
+ 0.8503708243 0.7783406973 0.7818766832
+ 0.8508211970 0.7790145278 0.7823989987
+ 0.8512716889 0.7796882987 0.7829211950
+ 0.8517221212 0.7803621292 0.7834433913
+ 0.8521726131 0.7810359001 0.7839657068
+ 0.8526229858 0.7817096710 0.7844879031
+ 0.8530669808 0.7823808193 0.7850015163
+ 0.8535096049 0.7830513120 0.7855132818
+ 0.8539522886 0.7837216854 0.7860249877
+ 0.8543949723 0.7843921781 0.7865368128
+ 0.8548377156 0.7850626111 0.7870485187
+ 0.8552803993 0.7857329845 0.7875602841
+ 0.8557230234 0.7864034772 0.7880721092
+ 0.8561657071 0.7870739102 0.7885838151
+ 0.8566074967 0.7877444029 0.7890909910
+ 0.8570477962 0.7884148955 0.7895907760
+ 0.8574879766 0.7890855074 0.7900906205
+ 0.8579282761 0.7897560000 0.7905902863
+ 0.8583685756 0.7904264927 0.7910900712
+ 0.8588088751 0.7910971045 0.7915899158
+ 0.8592491746 0.7917675972 0.7920895815
+ 0.8596894741 0.7924380898 0.7925894260
+ 0.8601297736 0.7931085825 0.7930892110
+ 0.8605728149 0.7937740088 0.7935796976
+ 0.8610163927 0.7944378257 0.7940679789
+ 0.8614599705 0.7951015830 0.7945562005
+ 0.8619036078 0.7957653999 0.7950444818
+ 0.8623471856 0.7964292169 0.7955328226
+ 0.8627907038 0.7970929742 0.7960211039
+ 0.8632342815 0.7977567911 0.7965093255
+ 0.8636779189 0.7984206080 0.7969976068
+ 0.8641206026 0.7990841866 0.7974848747
+ 0.8645566106 0.7997450233 0.7979636192
+ 0.8649924994 0.8004058003 0.7984423041
+ 0.8654283881 0.8010665774 0.7989211082
+ 0.8658643961 0.8017274141 0.7993997931
+ 0.8663002849 0.8023881912 0.7998784781
+ 0.8667361736 0.8030490279 0.8003572226
+ 0.8671721816 0.8037098050 0.8008359075
+ 0.8676080704 0.8043705821 0.8013145924
+ 0.8680428267 0.8050302267 0.8017914295
+ 0.8684741855 0.8056855798 0.8022627234
+ 0.8689056039 0.8063411117 0.8027340770
+ 0.8693370223 0.8069965243 0.8032054901
+ 0.8697683811 0.8076519966 0.8036769032
+ 0.8701997995 0.8083074093 0.8041483164
+ 0.8706312180 0.8089628220 0.8046196103
+ 0.8710625768 0.8096182942 0.8050910234
+ 0.8714941144 0.8102737069 0.8055623770
+ 0.8719242811 0.8109272718 0.8060321212
+ 0.8723520041 0.8115758896 0.8064982295
+ 0.8727797270 0.8122243881 0.8069642782
+ 0.8732073903 0.8128730059 0.8074303865
+ 0.8736351132 0.8135215044 0.8078963757
+ 0.8740627766 0.8141701221 0.8083624840
+ 0.8744904995 0.8148186207 0.8088285923
+ 0.8749181032 0.8154671788 0.8092945814
+ 0.8753458261 0.8161156774 0.8097606897
+ 0.8757717013 0.8167629242 0.8102260828
+ 0.8761911988 0.8174033165 0.8106889725
+ 0.8766106963 0.8180438280 0.8111518025
+ 0.8770301938 0.8186842203 0.8116146922
+ 0.8774496913 0.8193246126 0.8120775819
+ 0.8778691888 0.8199651241 0.8125404119
+ 0.8782886863 0.8206055164 0.8130033016
+ 0.8787081838 0.8212460279 0.8134661913
+ 0.8791276813 0.8218864202 0.8139290214
+ 0.8795471787 0.8225268722 0.8143919110
+ 0.8799598813 0.8231630921 0.8148487806
+ 0.8803725243 0.8237990737 0.8153055906
+ 0.8807851076 0.8244349957 0.8157624006
+ 0.8811976910 0.8250709772 0.8162190914
+ 0.8816102743 0.8257070184 0.8166759014
+ 0.8820229173 0.8263429999 0.8171327114
+ 0.8824356198 0.8269789219 0.8175895214
+ 0.8828482032 0.8276149035 0.8180462718
+ 0.8832607865 0.8282508850 0.8185030818
+ 0.8836668730 0.8288804889 0.8189595938
+ 0.8840687871 0.8295053840 0.8194159269
+ 0.8844708204 0.8301302791 0.8198722005
+ 0.8848727942 0.8307551146 0.8203284740
+ 0.8852748275 0.8313800097 0.8207848072
+ 0.8856766820 0.8320049047 0.8212410808
+ 0.8860787153 0.8326296806 0.8216974139
+ 0.8864806890 0.8332545757 0.8221536875
+ 0.8868827224 0.8338794708 0.8226100206
+ 0.8872836828 0.8345038891 0.8230658770
+ 0.8876764178 0.8351209760 0.8235191107
+ 0.8880689740 0.8357381225 0.8239722848
+ 0.8884617090 0.8363550901 0.8244253993
+ 0.8888543844 0.8369721770 0.8248785734
+ 0.8892471194 0.8375893235 0.8253316879
+ 0.8896397948 0.8382064104 0.8257849216
+ 0.8900324702 0.8388234973 0.8262379766
+ 0.8904250860 0.8394405842 0.8266912103
+ 0.8908178210 0.8400576711 0.8271443248
+ 0.8912085891 0.8406690955 0.8275967836
+ 0.8915970922 0.8412722945 0.8280482888
+ 0.8919855952 0.8418754935 0.8284997940
+ 0.8923739791 0.8424786925 0.8289512992
+ 0.8927624822 0.8430818915 0.8294028044
+ 0.8931509852 0.8436850905 0.8298543096
+ 0.8935394287 0.8442882895 0.8303058147
+ 0.8939278722 0.8448914886 0.8307573199
+ 0.8943163753 0.8454946876 0.8312088251
+ 0.8947048783 0.8460978866 0.8316602707
+ 0.8950937986 0.8466901183 0.8321077824
+ 0.8954830170 0.8472754955 0.8325530887
+ 0.8958721757 0.8478608131 0.8329983950
+ 0.8962613940 0.8484461904 0.8334437013
+ 0.8966506124 0.8490315080 0.8338890076
+ 0.8970397711 0.8496168852 0.8343343139
+ 0.8974289894 0.8502022028 0.8347796202
+ 0.8978182077 0.8507875204 0.8352249265
+ 0.8982074261 0.8513728976 0.8356701732
+ 0.8985965848 0.8519582152 0.8361154795
+ 0.8989794254 0.8525332212 0.8365576863
+ 0.8993595839 0.8531031013 0.8369985819
+ 0.8997398019 0.8536729217 0.8374395967
+ 0.9001200199 0.8542428017 0.8378804922
+ 0.9005001783 0.8548126817 0.8383213878
+ 0.9008803964 0.8553825021 0.8387622833
+ 0.9012606144 0.8559523821 0.8392031789
+ 0.9016407728 0.8565223217 0.8396441936
+ 0.9020209908 0.8570920825 0.8400850892
+ 0.9024012089 0.8576620221 0.8405259848
+ 0.9027789235 0.8582289219 0.8409655094
+ 0.9031550288 0.8587936759 0.8414040208
+ 0.9035310745 0.8593583703 0.8418424726
+ 0.9039072990 0.8599231839 0.8422811031
+ 0.9042834044 0.8604879975 0.8427196145
+ 0.9046595097 0.8610526919 0.8431581855
+ 0.9050356150 0.8616175056 0.8435966969
+ 0.9054117799 0.8621823192 0.8440352082
+ 0.9057878852 0.8627470136 0.8444737792
+ 0.9061639905 0.8633118272 0.8449122906
+ 0.9065403938 0.8638728857 0.8453506231
+ 0.9069172144 0.8644266129 0.8457884789
+ 0.9072939754 0.8649802804 0.8462263942
+ 0.9076709151 0.8655340075 0.8466644287
+ 0.9080476761 0.8660876751 0.8471022844
+ 0.9084244967 0.8666414022 0.8475401998
+ 0.9088013172 0.8671951294 0.8479781151
+ 0.9091781974 0.8677487969 0.8484159708
+ 0.9095550179 0.8683025241 0.8488538861
+ 0.9099317789 0.8688561916 0.8492919207
+ 0.9103087187 0.8694099188 0.8497297764
+ 0.9106770158 0.8699470162 0.8501740098
+ 0.9110450745 0.8704831004 0.8506183028
+ 0.9114131927 0.8710191846 0.8510627151
+ 0.9117813110 0.8715553284 0.8515071273
+ 0.9121494293 0.8720914125 0.8519514799
+ 0.9125174880 0.8726274967 0.8523958921
+ 0.9128857255 0.8731635213 0.8528403044
+ 0.9132537842 0.8736996055 0.8532845974
+ 0.9136219025 0.8742356896 0.8537290096
+ 0.9139900208 0.8747717738 0.8541734219
+ 0.9143564105 0.8753021955 0.8546187878
+ 0.9147205949 0.8758236766 0.8550655246
+ 0.9150847793 0.8763452768 0.8555122018
+ 0.9154489040 0.8768668175 0.8559588790
+ 0.9158130884 0.8773882985 0.8564056158
+ 0.9161772728 0.8779098988 0.8568522930
+ 0.9165413976 0.8784313798 0.8572989702
+ 0.9169055820 0.8789529204 0.8577457070
+ 0.9172698259 0.8794744015 0.8581923842
+ 0.9176338911 0.8799960017 0.8586391807
+ 0.9179980755 0.8805174828 0.8590859175
+ 0.9183627963 0.8810274005 0.8595321178
+ 0.9187275767 0.8815318942 0.8599780798
+ 0.9190924168 0.8820363283 0.8604242206
+ 0.9194573164 0.8825408220 0.8608701825
+ 0.9198220968 0.8830453157 0.8613162041
+ 0.9201869965 0.8835498095 0.8617622852
+ 0.9205517769 0.8840541840 0.8622083068
+ 0.9209166765 0.8845586777 0.8626543283
+ 0.9212815166 0.8850631714 0.8631004095
+ 0.9216464162 0.8855676055 0.8635463715
+ 0.9220111966 0.8860720992 0.8639923930
+ 0.9223688841 0.8865699172 0.8644400239
+ 0.9227253199 0.8870661259 0.8648878932
+ 0.9230818152 0.8875622749 0.8653358221
+ 0.9234381914 0.8880584836 0.8657836914
+ 0.9237946272 0.8885546923 0.8662316203
+ 0.9241510034 0.8890509009 0.8666793704
+ 0.9245073795 0.8895472288 0.8671272993
+ 0.9248638153 0.8900433779 0.8675752282
+ 0.9252201915 0.8905395865 0.8680230975
+ 0.9255766869 0.8910357952 0.8684710264
+ 0.9259331226 0.8915320039 0.8689187765
+ 0.9262825251 0.8920152187 0.8693681955
+ 0.9266303778 0.8924947977 0.8698179722
+ 0.9269781709 0.8929743767 0.8702676892
+ 0.9273260832 0.8934540153 0.8707175255
+ 0.9276738763 0.8939337134 0.8711671829
+ 0.9280217886 0.8944132924 0.8716170192
+ 0.9283695817 0.8948928714 0.8720666766
+ 0.9287174940 0.8953725100 0.8725165129
+ 0.9290654063 0.8958520889 0.8729661703
+ 0.9294131994 0.8963317275 0.8734158874
+ 0.9297611117 0.8968113065 0.8738657236
+ 0.9301087260 0.8972867727 0.8743184805
+ 0.9304562211 0.8977593184 0.8747732043
+ 0.9308035970 0.8982318044 0.8752279282
+ 0.9311510921 0.8987044096 0.8756825924
+ 0.9314985871 0.8991768956 0.8761373162
+ 0.9318460226 0.8996493816 0.8765919805
+ 0.9321935177 0.9001219869 0.8770467043
+ 0.9325410128 0.9005944729 0.8775014281
+ 0.9328885078 0.9010670781 0.8779560924
+ 0.9332358837 0.9015396237 0.8784108758
+ 0.9335833788 0.9020121098 0.8788655996
+ 0.9339289069 0.9024819732 0.8793206811
+ 0.9342687130 0.9029427171 0.8797768950
+ 0.9346085787 0.9034032822 0.8802332282
+ 0.9349483848 0.9038640261 0.8806893826
+ 0.9352881908 0.9043247104 0.8811457157
+ 0.9356281161 0.9047853947 0.8816019893
+ 0.9359679222 0.9052460194 0.8820582032
+ 0.9363077283 0.9057067037 0.8825144768
+ 0.9366474748 0.9061673880 0.8829706907
+ 0.9369874001 0.9066280723 0.8834270239
+ 0.9373272061 0.9070886970 0.8838832974
+ 0.9376670122 0.9075493813 0.8843395114
+ 0.9379975200 0.9080064297 0.8847972751
+ 0.9383242726 0.9084616899 0.8852556944
+ 0.9386510849 0.9089168906 0.8857141137
+ 0.9389780164 0.9093722105 0.8861724734
+ 0.9393048286 0.9098274708 0.8866308928
+ 0.9396315813 0.9102827907 0.8870893121
+ 0.9399585128 0.9107381105 0.8875476718
+ 0.9402853251 0.9111933708 0.8880060911
+ 0.9406121969 0.9116486907 0.8884645104
+ 0.9409390092 0.9121040106 0.8889229298
+ 0.9412658215 0.9125592709 0.8893812895
+ 0.9415925741 0.9130145907 0.8898397088
+ 0.9419143200 0.9134653211 0.8903028965
+ 0.9422358871 0.9139158130 0.8907660246
+ 0.9425575733 0.9143664241 0.8912292123
+ 0.9428793192 0.9148169756 0.8916922808
+ 0.9432010055 0.9152675271 0.8921554089
+ 0.9435225725 0.9157180786 0.8926185966
+ 0.9438443184 0.9161686897 0.8930817246
+ 0.9441660047 0.9166191816 0.8935449123
+ 0.9444875717 0.9170697927 0.8940079808
+ 0.9448093176 0.9175204039 0.8944711089
+ 0.9451310039 0.9179708958 0.8949342966
+ 0.9454516768 0.9184200168 0.8953979015
+ 0.9457663298 0.9188566804 0.8958650827
+ 0.9460809231 0.9192935228 0.8963323236
+ 0.9463955164 0.9197301865 0.8967995048
+ 0.9467101097 0.9201670289 0.8972666860
+ 0.9470247030 0.9206036925 0.8977338076
+ 0.9473394156 0.9210404158 0.8982009888
+ 0.9476540089 0.9214771986 0.8986682296
+ 0.9479686022 0.9219139218 0.8991354108
+ 0.9482831955 0.9223507047 0.8996024728
+ 0.9485977888 0.9227874279 0.9000697136
+ 0.9489123821 0.9232240915 0.9005368948
+ 0.9492262006 0.9236606956 0.9010049105
+ 0.9495301247 0.9240928888 0.9014831781
+ 0.9498339891 0.9245252013 0.9019615054
+ 0.9501379132 0.9249575138 0.9024397731
+ 0.9504417777 0.9253897071 0.9029181004
+ 0.9507457018 0.9258220196 0.9033964276
+ 0.9510496259 0.9262542725 0.9038746953
+ 0.9513534904 0.9266865253 0.9043530226
+ 0.9516574144 0.9271187782 0.9048312902
+ 0.9519612789 0.9275510907 0.9053096175
+ 0.9522652030 0.9279832840 0.9057878852
+ 0.9525691271 0.9284155965 0.9062662125
+ 0.9528729916 0.9288479090 0.9067444801
+ 0.9531697035 0.9292709231 0.9072285891
+ 0.9534651041 0.9296919107 0.9077138901
+ 0.9537603855 0.9301127791 0.9081990719
+ 0.9540557265 0.9305338264 0.9086843729
+ 0.9543510079 0.9309548140 0.9091696739
+ 0.9546462893 0.9313756824 0.9096549749
+ 0.9549415708 0.9317967296 0.9101402760
+ 0.9552369118 0.9322175980 0.9106255770
+ 0.9555321932 0.9326385856 0.9111108780
+ 0.9558275938 0.9330595732 0.9115961194
+ 0.9561228752 0.9334805012 0.9120814204
+ 0.9564182162 0.9339014888 0.9125667214
+ 0.9567111731 0.9343215823 0.9130539894
+ 0.9570007920 0.9347404242 0.9135441184
+ 0.9572904706 0.9351593256 0.9140341878
+ 0.9575802088 0.9355781078 0.9145243168
+ 0.9578698874 0.9359970093 0.9150145054
+ 0.9581596255 0.9364159107 0.9155045748
+ 0.9584493041 0.9368346930 0.9159947038
+ 0.9587389827 0.9372535944 0.9164847732
+ 0.9590287209 0.9376723766 0.9169749022
+ 0.9593183994 0.9380912781 0.9174650908
+ 0.9596080780 0.9385101199 0.9179552197
+ 0.9598978162 0.9389290214 0.9184452891
+ 0.9601874948 0.9393478036 0.9189354181
+ 0.9604712129 0.9397596717 0.9194250703
+ 0.9607533813 0.9401696920 0.9199147224
+ 0.9610357285 0.9405797124 0.9204041958
+ 0.9613178968 0.9409896135 0.9208937883
+ 0.9616001844 0.9413995743 0.9213833809
+ 0.9618824124 0.9418095946 0.9218729138
+ 0.9621647000 0.9422196150 0.9223625064
+ 0.9624469280 0.9426295757 0.9228520989
+ 0.9627290964 0.9430395961 0.9233415723
+ 0.9630113840 0.9434496164 0.9238312244
+ 0.9632936120 0.9438595772 0.9243208170
+ 0.9635758996 0.9442695975 0.9248104095
+ 0.9638580084 0.9446796179 0.9252998829
+ 0.9641314745 0.9450818896 0.9257894158
+ 0.9644048810 0.9454842806 0.9262788892
+ 0.9646784067 0.9458866119 0.9267684221
+ 0.9649518728 0.9462888837 0.9272578955
+ 0.9652252793 0.9466912150 0.9277474284
+ 0.9654988050 0.9470934868 0.9282369018
+ 0.9657722712 0.9474958181 0.9287263751
+ 0.9660456777 0.9478980899 0.9292159081
+ 0.9663192034 0.9483004808 0.9297053814
+ 0.9665926099 0.9487028122 0.9301949143
+ 0.9668660760 0.9491050839 0.9306843281
+ 0.9671396017 0.9495074153 0.9311738014
+ 0.9674128294 0.9499096274 0.9316633940
+ 0.9676774144 0.9503046274 0.9321550131
+ 0.9679421186 0.9506996274 0.9326465726
+ 0.9682067037 0.9510946274 0.9331381917
+ 0.9684712887 0.9514895082 0.9336298108
+ 0.9687359929 0.9518845081 0.9341213703
+ 0.9690005779 0.9522795081 0.9346129894
+ 0.9692652225 0.9526745081 0.9351046085
+ 0.9695299268 0.9530693889 0.9355962276
+ 0.9697945118 0.9534643888 0.9360877872
+ 0.9700590968 0.9538593888 0.9365794063
+ 0.9703238010 0.9542543888 0.9370710254
+ 0.9705883861 0.9546493292 0.9375625849
+ 0.9708530903 0.9550443292 0.9380542040
+ 0.9711099863 0.9554365277 0.9385489821
+ 0.9713655114 0.9558281898 0.9390444160
+ 0.9716209769 0.9562199116 0.9395396709
+ 0.9718766212 0.9566115141 0.9400351048
+ 0.9721320868 0.9570031762 0.9405304790
+ 0.9723876119 0.9573948979 0.9410259128
+ 0.9726430774 0.9577865005 0.9415212870
+ 0.9728987217 0.9581782222 0.9420167208
+ 0.9731541872 0.9585698247 0.9425120950
+ 0.9734097123 0.9589614868 0.9430075288
+ 0.9736652970 0.9593532085 0.9435027838
+ 0.9739208221 0.9597448111 0.9439982176
+ 0.9741762877 0.9601364732 0.9444935918
+ 0.9744294882 0.9605246186 0.9449895024
+ 0.9746801257 0.9609082937 0.9454861283
+ 0.9749307036 0.9612920880 0.9459825754
+ 0.9751814008 0.9616758823 0.9464792013
+ 0.9754319787 0.9620596170 0.9469757080
+ 0.9756826162 0.9624434114 0.9474722147
+ 0.9759331942 0.9628272057 0.9479687810
+ 0.9761837721 0.9632108808 0.9484652877
+ 0.9764344096 0.9635946751 0.9489619136
+ 0.9766849875 0.9639785290 0.9494584203
+ 0.9769356251 0.9643622041 0.9499549270
+ 0.9771862030 0.9647459984 0.9504514933
+ 0.9774367809 0.9651297927 0.9509480000
+ 0.9776874185 0.9655135274 0.9514446259
+ 0.9779301882 0.9658905268 0.9519404769
+ 0.9781720042 0.9662665129 0.9524363279
+ 0.9784138203 0.9666424990 0.9529321790
+ 0.9786555767 0.9670186043 0.9534279704
+ 0.9788973927 0.9673945904 0.9539238811
+ 0.9791392088 0.9677705765 0.9544196725
+ 0.9793810248 0.9681466222 0.9549155831
+ 0.9796229005 0.9685227275 0.9554113746
+ 0.9798647165 0.9688987136 0.9559072852
+ 0.9801064730 0.9692746997 0.9564030766
+ 0.9803482890 0.9696506858 0.9568989873
+ 0.9805901051 0.9700267911 0.9573947787
+ 0.9808319211 0.9704027772 0.9578906894
+ 0.9810727835 0.9707782269 0.9583864808
+ 0.9813064933 0.9711478949 0.9588822722
+ 0.9815400839 0.9715176225 0.9593781233
+ 0.9817737937 0.9718871713 0.9598739147
+ 0.9820073843 0.9722568989 0.9603695869
+ 0.9822410941 0.9726266265 0.9608653784
+ 0.9824746847 0.9729962945 0.9613612294
+ 0.9827083945 0.9733660221 0.9618570209
+ 0.9829419851 0.9737356901 0.9623526931
+ 0.9831756949 0.9741054177 0.9628484845
+ 0.9834094048 0.9744750857 0.9633442760
+ 0.9836429954 0.9748448133 0.9638401270
+ 0.9838767052 0.9752144814 0.9643357992
+ 0.9841102958 0.9755842090 0.9648315907
+ 0.9843431711 0.9759528041 0.9653275013
+ 0.9845708013 0.9763129950 0.9658238292
+ 0.9847983718 0.9766731858 0.9663200974
+ 0.9850260019 0.9770334959 0.9668164253
+ 0.9852535725 0.9773936868 0.9673126936
+ 0.9854812026 0.9777538776 0.9678090215
+ 0.9857087731 0.9781141877 0.9683052897
+ 0.9859364033 0.9784743786 0.9688016176
+ 0.9861639738 0.9788346291 0.9692978859
+ 0.9863917232 0.9791948795 0.9697942138
+ 0.9866192937 0.9795550704 0.9702904820
+ 0.9868469238 0.9799153209 0.9707868099
+ 0.9870744944 0.9802755713 0.9712830782
+ 0.9873021245 0.9806358218 0.9717794061
+ 0.9875296950 0.9809960127 0.9722756743
+ 0.9877505898 0.9813417196 0.9727702737
+ 0.9879710078 0.9816861153 0.9732648134
+ 0.9881914258 0.9820305109 0.9737592936
+ 0.9884117246 0.9823750257 0.9742537141
+ 0.9886320829 0.9827194214 0.9747481942
+ 0.9888525009 0.9830638170 0.9752426147
+ 0.9890729189 0.9834082723 0.9757370949
+ 0.9892932773 0.9837527275 0.9762315750
+ 0.9895136952 0.9840971231 0.9767259955
+ 0.9897341132 0.9844415188 0.9772204757
+ 0.9899544716 0.9847859740 0.9777150154
+ 0.9901748896 0.9851304293 0.9782093763
+ 0.9903953075 0.9854748249 0.9787039161
+ 0.9906157255 0.9858192801 0.9791983962
+ 0.9908351898 0.9861568809 0.9796867967
+ 0.9910538197 0.9864884019 0.9801697135
+ 0.9912725091 0.9868198037 0.9806526899
+ 0.9914911985 0.9871512055 0.9811356068
+ 0.9917098284 0.9874826074 0.9816185832
+ 0.9919285178 0.9878140092 0.9821015000
+ 0.9921472073 0.9881454110 0.9825844765
+ 0.9923658967 0.9884768724 0.9830673933
+ 0.9925845265 0.9888082743 0.9835504293
+ 0.9928032160 0.9891396761 0.9840332866
+ 0.9930219054 0.9894710779 0.9845163226
+ 0.9932404757 0.9898024797 0.9849991798
+ 0.9934592247 0.9901340008 0.9854822159
+ 0.9936779141 0.9904654026 0.9859650731
+ 0.9938964844 0.9907968044 0.9864481091
+ 0.9941064715 0.9911096096 0.9869107008
+ 0.9943155050 0.9914203286 0.9873710275
+ 0.9945245981 0.9917309880 0.9878314137
+ 0.9947335720 0.9920417070 0.9882918000
+ 0.9949426055 0.9923524261 0.9887521863
+ 0.9951516986 0.9926630855 0.9892125726
+ 0.9953606725 0.9929738045 0.9896730185
+ 0.9955697060 0.9932845235 0.9901334047
+ 0.9957787991 0.9935951829 0.9905936718
+ 0.9959877729 0.9939059019 0.9910541177
+ 0.9961968064 0.9942166209 0.9915145040
+ 0.9964057803 0.9945272803 0.9919748902
+ 0.9966148734 0.9948379993 0.9924352765
+ 0.9968239069 0.9951487184 0.9928957224
+ 0.9970322251 0.9954589009 0.9933549762
+ 0.9972301126 0.9957615733 0.9937980175
+ 0.9974278808 0.9960644245 0.9942409992
+ 0.9976258278 0.9963670969 0.9946839809
+ 0.9978235960 0.9966698885 0.9951270223
+ 0.9980214834 0.9969726205 0.9955700040
+ 0.9982193112 0.9972752929 0.9960129857
+ 0.9984171987 0.9975780845 0.9964560270
+ 0.9986150265 0.9978808165 0.9968990088
+ 0.9988129139 0.9981836081 0.9973419905
+ 0.9990106821 0.9984862804 0.9977849722
+ 0.9992086291 0.9987890124 0.9982280135
+ 0.9994063973 0.9990918040 0.9986709952
+ 0.9996042848 0.9993944764 0.9991139770
+ 0.9998021126 0.9996973276 0.9995570183
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/fujifilm_f-400.spi1d b/release/datafiles/colormanagement/luts/film_response/fujifilm_f-400.spi1d
new file mode 100644
index 00000000000..bd32b36f83a
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/fujifilm_f-400.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0603632890 0.0454680510 0.0325050801
+ 0.0916145369 0.0672334507 0.0560519211
+ 0.1141282991 0.0832497999 0.0737638026
+ 0.1319569051 0.0963873789 0.0874102712
+ 0.1474671066 0.1078206971 0.0974757820
+ 0.1610251069 0.1180547997 0.1053474993
+ 0.1732669026 0.1273127049 0.1128624976
+ 0.1844484061 0.1358955950 0.1203550026
+ 0.1948004961 0.1437651068 0.1278492957
+ 0.2044326067 0.1510639042 0.1352435946
+ 0.2135390937 0.1580073982 0.1424624026
+ 0.2222227007 0.1645933986 0.1493878067
+ 0.2305278927 0.1708792001 0.1560759991
+ 0.2384292036 0.1768720001 0.1626075953
+ 0.2459527999 0.1825958937 0.1688462943
+ 0.2531175911 0.1880602986 0.1748789996
+ 0.2599833906 0.1933407038 0.1807505935
+ 0.2665782869 0.1983918995 0.1864421070
+ 0.2729392946 0.2032617927 0.1920263022
+ 0.2790789902 0.2080129981 0.1974907964
+ 0.2850643992 0.2126218975 0.2027806044
+ 0.2908408046 0.2170598060 0.2078876942
+ 0.2965438068 0.2213744968 0.2128470987
+ 0.3020817935 0.2255962938 0.2176713943
+ 0.3074505031 0.2297365963 0.2223367989
+ 0.3126476109 0.2337452024 0.2268441021
+ 0.3176782131 0.2376385927 0.2312131971
+ 0.3225966990 0.2414472997 0.2354972064
+ 0.3274005949 0.2451924980 0.2396982014
+ 0.3320432901 0.2488888949 0.2437300980
+ 0.3365654051 0.2524788976 0.2476260960
+ 0.3410258889 0.2559857070 0.2514533103
+ 0.3453224003 0.2594096065 0.2552187145
+ 0.3495548964 0.2627862990 0.2589012980
+ 0.3537135124 0.2661119998 0.2625198960
+ 0.3577654064 0.2694039047 0.2660697997
+ 0.3617587984 0.2726261914 0.2695469856
+ 0.3657540083 0.2757805884 0.2729555070
+ 0.3696199059 0.2788713872 0.2763257921
+ 0.3734039068 0.2819064856 0.2796599865
+ 0.3770940006 0.2849085927 0.2829268873
+ 0.3806684911 0.2878705859 0.2861185074
+ 0.3841705024 0.2907994092 0.2892411947
+ 0.3875944912 0.2937094867 0.2923243046
+ 0.3909009099 0.2965498865 0.2953714132
+ 0.3941605091 0.2993265986 0.2983838916
+ 0.3973405063 0.3020490110 0.3013431132
+ 0.4004949033 0.3047288954 0.3042708039
+ 0.4036108851 0.3073731959 0.3071705103
+ 0.4066615999 0.3100095093 0.3100284040
+ 0.4096829891 0.3126212955 0.3128500879
+ 0.4127061069 0.3152045012 0.3156496882
+ 0.4156985879 0.3177570999 0.3184089959
+ 0.4186556935 0.3202543855 0.3211377859
+ 0.4215945005 0.3227119148 0.3238492906
+ 0.4244618118 0.3251400888 0.3265129030
+ 0.4272699058 0.3275529146 0.3291609883
+ 0.4300499856 0.3299373984 0.3317633867
+ 0.4328002036 0.3323051929 0.3343206048
+ 0.4354938865 0.3346739113 0.3368437886
+ 0.4381406009 0.3370254934 0.3393223882
+ 0.4407618046 0.3393487930 0.3417755067
+ 0.4433783889 0.3416441083 0.3441849053
+ 0.4459331930 0.3439005911 0.3465532959
+ 0.4484468997 0.3461334109 0.3488821089
+ 0.4509404898 0.3483205140 0.3511759937
+ 0.4534223080 0.3504905999 0.3534452021
+ 0.4558776915 0.3526290059 0.3557046950
+ 0.4582909048 0.3547618091 0.3579384089
+ 0.4606809914 0.3568730056 0.3601483107
+ 0.4630529881 0.3589904904 0.3623368144
+ 0.4653714001 0.3610835075 0.3645074964
+ 0.4676778913 0.3631530106 0.3666630983
+ 0.4699575007 0.3652003109 0.3688057065
+ 0.4722292125 0.3671888113 0.3709379137
+ 0.4745065868 0.3691641092 0.3730610013
+ 0.4767518938 0.3711192012 0.3751786053
+ 0.4789671004 0.3730652034 0.3772909939
+ 0.4811646044 0.3749937117 0.3793990016
+ 0.4833407998 0.3769024014 0.3814974129
+ 0.4854697883 0.3788143098 0.3835780919
+ 0.4875837862 0.3807007074 0.3856568933
+ 0.4896746874 0.3826003969 0.3877165020
+ 0.4917361140 0.3844895065 0.3897739947
+ 0.4937821031 0.3863629997 0.3918241858
+ 0.4958266914 0.3882220984 0.3938601017
+ 0.4978322089 0.3900676966 0.3958753943
+ 0.4998154044 0.3919059038 0.3978557885
+ 0.5017874837 0.3937377036 0.3998196125
+ 0.5037454963 0.3955607116 0.4017657936
+ 0.5056617856 0.3973649144 0.4036836028
+ 0.5075917840 0.3991670012 0.4055893123
+ 0.5095139742 0.4009510875 0.4074887931
+ 0.5114189982 0.4027169943 0.4093823135
+ 0.5132684112 0.4044859111 0.4112665951
+ 0.5151203871 0.4062362909 0.4131282866
+ 0.5169649720 0.4079819024 0.4149852991
+ 0.5187842846 0.4097360075 0.4168485999
+ 0.5205675960 0.4114727974 0.4186882079
+ 0.5223402977 0.4132055044 0.4205282927
+ 0.5241093040 0.4149374068 0.4223743081
+ 0.5258463025 0.4166536033 0.4241972864
+ 0.5275856256 0.4183549881 0.4260225892
+ 0.5293406248 0.4200339913 0.4278545082
+ 0.5310854912 0.4217008948 0.4296846986
+ 0.5328161120 0.4233531058 0.4315181971
+ 0.5345103741 0.4249719083 0.4333597124
+ 0.5362126827 0.4265843928 0.4351972938
+ 0.5379176140 0.4281908870 0.4370343983
+ 0.5396010876 0.4297637045 0.4388785958
+ 0.5412700772 0.4313359857 0.4407181144
+ 0.5429202914 0.4329077005 0.4425528049
+ 0.5445725918 0.4344569147 0.4443916082
+ 0.5462222099 0.4360015094 0.4462321103
+ 0.5478432775 0.4375520945 0.4480772018
+ 0.5494470000 0.4390931129 0.4499236941
+ 0.5510246158 0.4406209886 0.4517717957
+ 0.5525965095 0.4421330988 0.4536193013
+ 0.5541654825 0.4436380863 0.4554666877
+ 0.5557032228 0.4451265037 0.4573141932
+ 0.5572413206 0.4466089010 0.4591605067
+ 0.5587986708 0.4480651915 0.4610021114
+ 0.5603525043 0.4495176077 0.4628401995
+ 0.5618990064 0.4509631097 0.4646731913
+ 0.5634241104 0.4523977935 0.4664989114
+ 0.5649273992 0.4538224936 0.4683187902
+ 0.5664381981 0.4552442133 0.4701269865
+ 0.5679532290 0.4566642940 0.4719302058
+ 0.5694528818 0.4580616951 0.4737173021
+ 0.5709474087 0.4594523013 0.4755006135
+ 0.5723990798 0.4608454108 0.4772619009
+ 0.5738419890 0.4622389972 0.4790205061
+ 0.5752863288 0.4636129141 0.4807558954
+ 0.5767307281 0.4649848938 0.4824900925
+ 0.5781518221 0.4663662910 0.4842281938
+ 0.5795705914 0.4677484035 0.4859664142
+ 0.5809577703 0.4691171050 0.4876765907
+ 0.5823417902 0.4704849124 0.4893858135
+ 0.5837211013 0.4718532860 0.4910922945
+ 0.5850995779 0.4732218087 0.4927985966
+ 0.5864555240 0.4745810032 0.4944742918
+ 0.5878059864 0.4759384096 0.4961453974
+ 0.5891577005 0.4772793949 0.4978106916
+ 0.5905098915 0.4786145985 0.4994742870
+ 0.5918568969 0.4799452126 0.5011221766
+ 0.5932002068 0.4812729955 0.5027614236
+ 0.5945292115 0.4825868905 0.5043945909
+ 0.5958389044 0.4838840961 0.5060214996
+ 0.5971521139 0.4851810038 0.5076392889
+ 0.5984765887 0.4864774048 0.5092359781
+ 0.5998010039 0.4877730906 0.5108314157
+ 0.6011152864 0.4890460968 0.5124111176
+ 0.6024296284 0.4903191030 0.5139907002
+ 0.6037279963 0.4915966988 0.5155413747
+ 0.6050211787 0.4928756058 0.5170856118
+ 0.6063179970 0.4941464067 0.5186198950
+ 0.6076188087 0.4954087138 0.5201451778
+ 0.6089168191 0.4966705143 0.5216658711
+ 0.6101980805 0.4979301095 0.5231689811
+ 0.6114792824 0.4991895854 0.5246720910
+ 0.6127241850 0.5004386902 0.5261573792
+ 0.6139590144 0.5016852021 0.5276395082
+ 0.6151936054 0.5029277205 0.5291115046
+ 0.6164277196 0.5041645765 0.5305709839
+ 0.6176617742 0.5054013729 0.5320304036
+ 0.6188758016 0.5066292882 0.5334817767
+ 0.6200888753 0.5078570247 0.5349332094
+ 0.6212956905 0.5090678930 0.5363718271
+ 0.6224961281 0.5102629066 0.5378000140
+ 0.6236965060 0.5114579201 0.5392268896
+ 0.6248922944 0.5126475096 0.5406283140
+ 0.6260880828 0.5138370991 0.5420296192
+ 0.6272730827 0.5150145888 0.5434191227
+ 0.6284447908 0.5161781907 0.5447971225
+ 0.6296163797 0.5173417926 0.5461751223
+ 0.6307746768 0.5185059905 0.5475438237
+ 0.6319308877 0.5196703076 0.5489118099
+ 0.6330848932 0.5208293200 0.5502725840
+ 0.6342328191 0.5219740868 0.5516172051
+ 0.6353806257 0.5231189132 0.5529618263
+ 0.6365122199 0.5242677927 0.5542978048
+ 0.6376327872 0.5254191756 0.5556291938
+ 0.6387532949 0.5265706778 0.5569607019
+ 0.6398714185 0.5277099013 0.5582699180
+ 0.6409891248 0.5288481116 0.5595781803
+ 0.6421049833 0.5299884081 0.5608838797
+ 0.6432113051 0.5311387777 0.5621806979
+ 0.6443176270 0.5322890878 0.5634775162
+ 0.6454114914 0.5334355235 0.5647640824
+ 0.6464858055 0.5345761180 0.5660377741
+ 0.6475601792 0.5357167125 0.5673115849
+ 0.6486206055 0.5368447900 0.5685880780
+ 0.6496704817 0.5379639268 0.5698662996
+ 0.6507204175 0.5390831232 0.5711445212
+ 0.6517605186 0.5401955843 0.5724067092
+ 0.6527966261 0.5413054824 0.5736641288
+ 0.6538326740 0.5424153805 0.5749214292
+ 0.6548563242 0.5435019732 0.5761708021
+ 0.6558768749 0.5445836782 0.5774188042
+ 0.6568974853 0.5456653237 0.5786669254
+ 0.6579241753 0.5467439890 0.5798960924
+ 0.6589519978 0.5478222966 0.5811234713
+ 0.6599798203 0.5489006042 0.5823509097
+ 0.6609984040 0.5499593019 0.5835713744
+ 0.6620156169 0.5510154963 0.5847914219
+ 0.6630328894 0.5520715714 0.5860112906
+ 0.6640465260 0.5531296730 0.5872145891
+ 0.6650593877 0.5541881919 0.5884156823
+ 0.6660723090 0.5552465916 0.5896167755
+ 0.6670761704 0.5562924743 0.5908033848
+ 0.6680768728 0.5573346019 0.5919865966
+ 0.6690776944 0.5583767295 0.5931698084
+ 0.6700693965 0.5594154000 0.5943410993
+ 0.6710556746 0.5604522824 0.5955067277
+ 0.6720418930 0.5614892244 0.5966722965
+ 0.6730256081 0.5625199080 0.5978301167
+ 0.6740061045 0.5635436177 0.5989803076
+ 0.6749866009 0.5645673275 0.6001303792
+ 0.6759673953 0.5655882955 0.6012763977
+ 0.6769493818 0.5666012168 0.6024119258
+ 0.6779313087 0.5676140785 0.6035472751
+ 0.6789131761 0.5686269999 0.6046826243
+ 0.6798806787 0.5696319938 0.6058049798
+ 0.6808475256 0.5706369281 0.6069275141
+ 0.6818143129 0.5716418028 0.6080499887
+ 0.6827753782 0.5726358294 0.6091644168
+ 0.6837335229 0.5736240149 0.6102753282
+ 0.6846914887 0.5746123195 0.6113861203
+ 0.6856489778 0.5755988955 0.6124936938
+ 0.6866049767 0.5765814185 0.6135942936
+ 0.6875609756 0.5775640011 0.6146950126
+ 0.6885170937 0.5785465240 0.6157956719
+ 0.6894577146 0.5795089006 0.6168872714
+ 0.6903957129 0.5804682970 0.6179779172
+ 0.6913337111 0.5814276934 0.6190685034
+ 0.6922674179 0.5823866725 0.6201496124
+ 0.6931942105 0.5833454132 0.6212183833
+ 0.6941210032 0.5843039751 0.6222872138
+ 0.6950476766 0.5852625966 0.6233559847
+ 0.6959589720 0.5862057209 0.6244189143
+ 0.6968678236 0.5871466994 0.6254813075
+ 0.6977766156 0.5880876780 0.6265437007
+ 0.6986793280 0.5890266895 0.6276041269
+ 0.6995667219 0.5899611712 0.6286605000
+ 0.7004541159 0.5908957720 0.6297169924
+ 0.7013415098 0.5918303132 0.6307734251
+ 0.7022203803 0.5927559733 0.6318181753
+ 0.7030950189 0.5936775208 0.6328582764
+ 0.7039695978 0.5945990086 0.6338983774
+ 0.7048441172 0.5955204964 0.6349384189
+ 0.7057145834 0.5964314938 0.6359745860
+ 0.7065848708 0.5973424911 0.6370108128
+ 0.7074552178 0.5982534289 0.6380469203
+ 0.7083240151 0.5991623998 0.6390789747
+ 0.7091879845 0.6000658870 0.6401014924
+ 0.7100520134 0.6009693146 0.6411240101
+ 0.7109159827 0.6018726826 0.6421465278
+ 0.7117736936 0.6027743220 0.6431624889
+ 0.7126240134 0.6036738157 0.6441721916
+ 0.7134742141 0.6045733094 0.6451817751
+ 0.7143244743 0.6054729223 0.6461914778
+ 0.7151702046 0.6063696742 0.6471874118
+ 0.7160130143 0.6072648764 0.6481761932
+ 0.7168557048 0.6081600785 0.6491649151
+ 0.7176983953 0.6090552807 0.6501536965
+ 0.7185257077 0.6099364161 0.6511443853
+ 0.7193462253 0.6108118892 0.6521357298
+ 0.7201668024 0.6116873026 0.6531270146
+ 0.7209873199 0.6125627756 0.6541182995
+ 0.7217960954 0.6134387851 0.6550964117
+ 0.7226005793 0.6143149137 0.6560708880
+ 0.7234051228 0.6151911020 0.6570454240
+ 0.7242096066 0.6160672903 0.6580199003
+ 0.7250012755 0.6169329286 0.6589906216
+ 0.7257876992 0.6177945137 0.6599599719
+ 0.7265741825 0.6186562181 0.6609295011
+ 0.7273607254 0.6195178032 0.6618989706
+ 0.7281492949 0.6203829050 0.6628596187
+ 0.7289391756 0.6212499738 0.6638159752
+ 0.7297291160 0.6221169829 0.6647723913
+ 0.7305189967 0.6229839921 0.6657288074
+ 0.7313020229 0.6238461137 0.6666783094
+ 0.7320774198 0.6247032285 0.6676219106
+ 0.7328528762 0.6255602837 0.6685655117
+ 0.7336283922 0.6264173985 0.6695091128
+ 0.7344021201 0.6272711754 0.6704490185
+ 0.7351711988 0.6281173825 0.6713812947
+ 0.7359403968 0.6289635897 0.6723136902
+ 0.7367094755 0.6298096776 0.6732460856
+ 0.7374784946 0.6306557059 0.6741766930
+ 0.7382401228 0.6314933896 0.6750792861
+ 0.7390015721 0.6323310733 0.6759818792
+ 0.7397632003 0.6331688166 0.6768844724
+ 0.7405247092 0.6340065002 0.6777871251
+ 0.7412760854 0.6348341107 0.6786838174
+ 0.7420225143 0.6356573105 0.6795783043
+ 0.7427688837 0.6364803910 0.6804727912
+ 0.7435153127 0.6373035908 0.6813672781
+ 0.7442601919 0.6381258965 0.6822535992
+ 0.7450010777 0.6389461756 0.6831231713
+ 0.7457420230 0.6397663951 0.6839928031
+ 0.7464829087 0.6405866742 0.6848623753
+ 0.7472237945 0.6414070129 0.6857320070
+ 0.7479677796 0.6422203183 0.6865984797
+ 0.7487124205 0.6430320740 0.6874645948
+ 0.7494571209 0.6438438892 0.6883307099
+ 0.7502018213 0.6446557045 0.6891968250
+ 0.7509424090 0.6454676986 0.6900563836
+ 0.7516725063 0.6462804079 0.6909027100
+ 0.7524024844 0.6470929980 0.6917490959
+ 0.7531325817 0.6479057074 0.6925954223
+ 0.7538626790 0.6487182975 0.6934418082
+ 0.7545816898 0.6495214105 0.6942890882
+ 0.7552953959 0.6503202915 0.6951367855
+ 0.7560091019 0.6511192918 0.6959844828
+ 0.7567229271 0.6519181728 0.6968321800
+ 0.7574365735 0.6527169943 0.6976789236
+ 0.7581534982 0.6535111070 0.6985118985
+ 0.7588703036 0.6543052197 0.6993448734
+ 0.7595872283 0.6550993919 0.7001779079
+ 0.7603039742 0.6558935046 0.7010108829
+ 0.7610172033 0.6566845775 0.7018424273
+ 0.7617210150 0.6574687958 0.7026708722
+ 0.7624248266 0.6582528949 0.7034993768
+ 0.7631285191 0.6590371132 0.7043278813
+ 0.7638322711 0.6598212123 0.7051563859
+ 0.7645226121 0.6606013775 0.7059795260
+ 0.7651978135 0.6613773108 0.7067975998
+ 0.7658728957 0.6621533036 0.7076157928
+ 0.7665480971 0.6629291773 0.7084339857
+ 0.7672232985 0.6637052298 0.7092521191
+ 0.7678937912 0.6644771099 0.7100641727
+ 0.7685611248 0.6652464867 0.7108727098
+ 0.7692285180 0.6660159230 0.7116813064
+ 0.7698957920 0.6667852998 0.7124899030
+ 0.7705631256 0.6675546765 0.7132984996
+ 0.7712234855 0.6683161855 0.7141026258
+ 0.7718799114 0.6690734029 0.7149047256
+ 0.7725363970 0.6698306799 0.7157067060
+ 0.7731928825 0.6705878973 0.7165088058
+ 0.7738493085 0.6713451743 0.7173109055
+ 0.7744975090 0.6721003056 0.7181041241
+ 0.7751405239 0.6728541255 0.7188926935
+ 0.7757834792 0.6736080050 0.7196813822
+ 0.7764264941 0.6743618250 0.7204700112
+ 0.7770696282 0.6751157045 0.7212585807
+ 0.7777153850 0.6758605838 0.7220466137
+ 0.7783638835 0.6765974164 0.7228341103
+ 0.7790123820 0.6773343086 0.7236214876
+ 0.7796608806 0.6780712008 0.7244089842
+ 0.7803093791 0.6788079739 0.7251964808
+ 0.7809547782 0.6795421243 0.7259809971
+ 0.7815937996 0.6802709103 0.7267609239
+ 0.7822328806 0.6809996963 0.7275406718
+ 0.7828719020 0.6817284822 0.7283204794
+ 0.7835109830 0.6824573278 0.7291004062
+ 0.7841491103 0.6831848025 0.7298780084
+ 0.7847760916 0.6839002967 0.7306407094
+ 0.7854030132 0.6846157908 0.7314034104
+ 0.7860299945 0.6853312850 0.7321661711
+ 0.7866569757 0.6860468984 0.7329288721
+ 0.7872840166 0.6867623925 0.7336915731
+ 0.7879158854 0.6874758005 0.7344440222
+ 0.7885494828 0.6881886125 0.7351937890
+ 0.7891830206 0.6889013052 0.7359436154
+ 0.7898166180 0.6896141171 0.7366933227
+ 0.7904502153 0.6903269291 0.7374430895
+ 0.7910810709 0.6910367012 0.7381889224
+ 0.7917066216 0.6917409897 0.7389283180
+ 0.7923321128 0.6924453974 0.7396677136
+ 0.7929577231 0.6931496859 0.7404071093
+ 0.7935832143 0.6938540936 0.7411465049
+ 0.7942087054 0.6945583820 0.7418857813
+ 0.7948155999 0.6952574253 0.7426193953
+ 0.7954189181 0.6959553957 0.7433521152
+ 0.7960221171 0.6966534257 0.7440848947
+ 0.7966253757 0.6973515153 0.7448176146
+ 0.7972286940 0.6980494857 0.7455503941
+ 0.7978311181 0.6987463832 0.7462819219
+ 0.7984310985 0.6994404197 0.7470108271
+ 0.7990310788 0.7001342773 0.7477396131
+ 0.7996311188 0.7008281946 0.7484685183
+ 0.8002310991 0.7015221715 0.7491973042
+ 0.8008310795 0.7022160888 0.7499262094
+ 0.8014271259 0.7029095888 0.7506538033
+ 0.8020204902 0.7036026716 0.7513806820
+ 0.8026139140 0.7042958140 0.7521076202
+ 0.8032072783 0.7049888968 0.7528346181
+ 0.8038007021 0.7056819797 0.7535614967
+ 0.8043941855 0.7063751221 0.7542883754
+ 0.8049713969 0.7070598006 0.7550076842
+ 0.8055459857 0.7077432871 0.7557262182
+ 0.8061205745 0.7084268928 0.7564446926
+ 0.8066952229 0.7091103792 0.7571632266
+ 0.8072698712 0.7097939253 0.7578817010
+ 0.8078448176 0.7104768157 0.7585989237
+ 0.8084272742 0.7111461759 0.7593011260
+ 0.8090099096 0.7118155956 0.7600033879
+ 0.8095924258 0.7124850154 0.7607055902
+ 0.8101750016 0.7131544948 0.7614077926
+ 0.8107575178 0.7138239145 0.7621099949
+ 0.8113396168 0.7144926786 0.7628099918
+ 0.8119179010 0.7151576281 0.7634986043
+ 0.8124963045 0.7158225179 0.7641872764
+ 0.8130745888 0.7164874077 0.7648758888
+ 0.8136529922 0.7171524167 0.7655645013
+ 0.8142312765 0.7178173065 0.7662531137
+ 0.8148078918 0.7184810042 0.7669401169
+ 0.8153703213 0.7191364169 0.7676184177
+ 0.8159328103 0.7197918892 0.7682967782
+ 0.8164951801 0.7204474211 0.7689750791
+ 0.8170577288 0.7211027741 0.7696533799
+ 0.8176200986 0.7217583060 0.7703316808
+ 0.8181825876 0.7224134803 0.7710090876
+ 0.8187462091 0.7230613232 0.7716705799
+ 0.8193098903 0.7237089872 0.7723321915
+ 0.8198735714 0.7243567705 0.7729938030
+ 0.8204373121 0.7250046134 0.7736552954
+ 0.8210009933 0.7256522775 0.7743169069
+ 0.8215646148 0.7263001204 0.7749783993
+ 0.8221263289 0.7269431949 0.7756360173
+ 0.8226876259 0.7275854945 0.7762929201
+ 0.8232489228 0.7282276750 0.7769498825
+ 0.8238101006 0.7288699746 0.7776067853
+ 0.8243713975 0.7295122743 0.7782638073
+ 0.8249326944 0.7301545143 0.7789208293
+ 0.8254861832 0.7307953238 0.7795671821
+ 0.8260335922 0.7314348221 0.7802065015
+ 0.8265808821 0.7320743799 0.7808458209
+ 0.8271281719 0.7327139974 0.7814850807
+ 0.8276755810 0.7333536148 0.7821244001
+ 0.8282228708 0.7339931130 0.7827637196
+ 0.8287672997 0.7346323729 0.7834032774
+ 0.8292987943 0.7352702022 0.7840442061
+ 0.8298302293 0.7359080911 0.7846850157
+ 0.8303616047 0.7365459800 0.7853258848
+ 0.8308929801 0.7371838093 0.7859666944
+ 0.8314244747 0.7378216982 0.7866076231
+ 0.8319559097 0.7384595275 0.7872483730
+ 0.8324869275 0.7390930057 0.7878805995
+ 0.8330175877 0.7397248745 0.7885100245
+ 0.8335484266 0.7403566837 0.7891393900
+ 0.8340792060 0.7409886122 0.7897688150
+ 0.8346099257 0.7416204810 0.7903981805
+ 0.8351407051 0.7422522902 0.7910276055
+ 0.8356696963 0.7428832054 0.7916554809
+ 0.8361886144 0.7435089946 0.7922765017
+ 0.8367075920 0.7441349030 0.7928975821
+ 0.8372265100 0.7447606921 0.7935186028
+ 0.8377454281 0.7453864813 0.7941396832
+ 0.8382642865 0.7460123897 0.7947607040
+ 0.8387833238 0.7466381788 0.7953817844
+ 0.8392910957 0.7472589016 0.7959994078
+ 0.8397874236 0.7478746176 0.7966139913
+ 0.8402836919 0.7484902740 0.7972285748
+ 0.8407800198 0.7491058707 0.7978432178
+ 0.8412762880 0.7497215867 0.7984578013
+ 0.8417726159 0.7503373027 0.7990723848
+ 0.8422688842 0.7509530187 0.7996870279
+ 0.8427659869 0.7515618801 0.8002871871
+ 0.8432633877 0.7521684170 0.8008829951
+ 0.8437607884 0.7527748942 0.8014789224
+ 0.8442581892 0.7533814907 0.8020746708
+ 0.8447555900 0.7539880276 0.8026704788
+ 0.8452529907 0.7545946240 0.8032664061
+ 0.8457503915 0.7552011013 0.8038622141
+ 0.8462408781 0.7558019757 0.8044577241
+ 0.8467301726 0.7564020753 0.8050531149
+ 0.8472195864 0.7570022941 0.8056485057
+ 0.8477090001 0.7576023936 0.8062438965
+ 0.8481984138 0.7582024932 0.8068394065
+ 0.8486878276 0.7588025928 0.8074347973
+ 0.8491771817 0.7594026923 0.8080301881
+ 0.8496577144 0.7599987984 0.8086149096
+ 0.8501371741 0.7605946064 0.8091987967
+ 0.8506168127 0.7611902952 0.8097828031
+ 0.8510962725 0.7617859840 0.8103666902
+ 0.8515759110 0.7623817921 0.8109506965
+ 0.8520553708 0.7629774809 0.8115345836
+ 0.8525350094 0.7635732293 0.8121185899
+ 0.8530108929 0.7641665936 0.8127080798
+ 0.8534861207 0.7647594213 0.8132985234
+ 0.8539612889 0.7653523088 0.8138889074
+ 0.8544363976 0.7659451962 0.8144792914
+ 0.8549116254 0.7665380836 0.8150696754
+ 0.8553867936 0.7671309114 0.8156599998
+ 0.8558620214 0.7677237988 0.8162503839
+ 0.8563336730 0.7683117986 0.8168362975
+ 0.8568035960 0.7688974142 0.8174201250
+ 0.8572735190 0.7694829702 0.8180038929
+ 0.8577435017 0.7700685859 0.8185877204
+ 0.8582134247 0.7706542015 0.8191714883
+ 0.8586832881 0.7712398171 0.8197553754
+ 0.8591532111 0.7718253732 0.8203392029
+ 0.8596208096 0.7724086046 0.8209149837
+ 0.8600844741 0.7729880810 0.8214796185
+ 0.8605483174 0.7735676765 0.8220440745
+ 0.8610121012 0.7741472125 0.8226085901
+ 0.8614758253 0.7747266889 0.8231731057
+ 0.8619396091 0.7753062248 0.8237376213
+ 0.8624032736 0.7758857012 0.8243020773
+ 0.8628671169 0.7764651775 0.8248665929
+ 0.8633220196 0.7770413160 0.8254293203
+ 0.8637769222 0.7776173949 0.8259919882
+ 0.8642318249 0.7781934738 0.8265547752
+ 0.8646866083 0.7787696123 0.8271175027
+ 0.8651415110 0.7793456912 0.8276802897
+ 0.8655962944 0.7799218297 0.8282430172
+ 0.8660511971 0.7804979086 0.8288056850
+ 0.8665007949 0.7810693979 0.8293619752
+ 0.8669447899 0.7816361785 0.8299123049
+ 0.8673887849 0.7822030187 0.8304625750
+ 0.8678327799 0.7827697992 0.8310130239
+ 0.8682768941 0.7833365202 0.8315632939
+ 0.8687208891 0.7839033008 0.8321136236
+ 0.8691648841 0.7844700813 0.8326638937
+ 0.8696088791 0.7850369215 0.8332142234
+ 0.8700435758 0.7855976820 0.8337548971
+ 0.8704770207 0.7861577868 0.8342946172
+ 0.8709102869 0.7867177725 0.8348342776
+ 0.8713436127 0.7872778773 0.8353739977
+ 0.8717769980 0.7878379226 0.8359137177
+ 0.8722103238 0.7883980274 0.8364533782
+ 0.8726437092 0.7889580131 0.8369930983
+ 0.8730763793 0.7895172834 0.8375316858
+ 0.8735055923 0.7900726795 0.8380653262
+ 0.8739346862 0.7906280756 0.8385987878
+ 0.8743638992 0.7911834717 0.8391324282
+ 0.8747929931 0.7917389274 0.8396660089
+ 0.8752222061 0.7922942042 0.8401995897
+ 0.8756513000 0.7928496003 0.8407331705
+ 0.8760805130 0.7934049964 0.8412668109
+ 0.8765051961 0.7939593196 0.8417996168
+ 0.8769198060 0.7945113182 0.8423308134
+ 0.8773342967 0.7950633168 0.8428620100
+ 0.8777489066 0.7956153154 0.8433932066
+ 0.8781633973 0.7961671948 0.8439245224
+ 0.8785778880 0.7967191935 0.8444557190
+ 0.8789924979 0.7972711921 0.8449869156
+ 0.8794069886 0.7978231907 0.8455181122
+ 0.8798193932 0.7983725071 0.8460463881
+ 0.8802276850 0.7989166975 0.8465698957
+ 0.8806359768 0.7994610071 0.8470934033
+ 0.8810443282 0.8000053167 0.8476169109
+ 0.8814526200 0.8005495071 0.8481404185
+ 0.8818609118 0.8010938168 0.8486639261
+ 0.8822692037 0.8016381264 0.8491873741
+ 0.8826774955 0.8021823764 0.8497108817
+ 0.8830862045 0.8027231097 0.8502314091
+ 0.8834958076 0.8032547235 0.8507447243
+ 0.8839054704 0.8037862182 0.8512579799
+ 0.8843150735 0.8043177724 0.8517714143
+ 0.8847246766 0.8048493266 0.8522847295
+ 0.8851343989 0.8053808808 0.8527981043
+ 0.8855440021 0.8059123755 0.8533114195
+ 0.8859536052 0.8064439893 0.8538246751
+ 0.8863626719 0.8069751859 0.8543373942
+ 0.8867633939 0.8075023293 0.8548439145
+ 0.8871641159 0.8080292940 0.8553503752
+ 0.8875647783 0.8085563779 0.8558567762
+ 0.8879655004 0.8090834022 0.8563632965
+ 0.8883662820 0.8096104860 0.8568698168
+ 0.8887670040 0.8101376295 0.8573762774
+ 0.8891677260 0.8106645942 0.8578827977
+ 0.8895683885 0.8111916780 0.8583891988
+ 0.8899617195 0.8117120862 0.8588874936
+ 0.8903526068 0.8122305274 0.8593834043
+ 0.8907433748 0.8127487898 0.8598793149
+ 0.8911342025 0.8132671118 0.8603752255
+ 0.8915249705 0.8137853742 0.8608711958
+ 0.8919157982 0.8143036962 0.8613671064
+ 0.8923066854 0.8148220778 0.8618630171
+ 0.8926975131 0.8153403997 0.8623589277
+ 0.8930876851 0.8158568144 0.8628520966
+ 0.8934766054 0.8163688183 0.8633397818
+ 0.8938655853 0.8168808818 0.8638275266
+ 0.8942545056 0.8173928857 0.8643152118
+ 0.8946434259 0.8179048896 0.8648028970
+ 0.8950322866 0.8184170127 0.8652905822
+ 0.8954212070 0.8189290166 0.8657783270
+ 0.8958101869 0.8194410801 0.8662660122
+ 0.8961991072 0.8199530840 0.8667536974
+ 0.8965854049 0.8204619288 0.8672325015
+ 0.8969708085 0.8209697008 0.8677083850
+ 0.8973562121 0.8214774132 0.8681843281
+ 0.8977414966 0.8219851255 0.8686602116
+ 0.8981269002 0.8224927783 0.8691360950
+ 0.8985123038 0.8230004907 0.8696119785
+ 0.8988977075 0.8235082030 0.8700879216
+ 0.8992829919 0.8240159154 0.8705638051
+ 0.8996679783 0.8245236278 0.8710392118
+ 0.9000402093 0.8250293732 0.8715068102
+ 0.9004123807 0.8255351782 0.8719742894
+ 0.9007844925 0.8260409832 0.8724418879
+ 0.9011567235 0.8265467882 0.8729094267
+ 0.9015287757 0.8270524740 0.8733770251
+ 0.9019010067 0.8275582790 0.8738445044
+ 0.9022731781 0.8280640841 0.8743121028
+ 0.9026452899 0.8285698891 0.8747795820
+ 0.9030135274 0.8290756941 0.8752462268
+ 0.9033654928 0.8295813203 0.8757094145
+ 0.9037175179 0.8300868869 0.8761726022
+ 0.9040694833 0.8305925131 0.8766359091
+ 0.9044215083 0.8310980797 0.8770990968
+ 0.9047734737 0.8316035867 0.8775622845
+ 0.9051254988 0.8321092129 0.8780254722
+ 0.9054775238 0.8326147795 0.8784887791
+ 0.9058294892 0.8331204057 0.8789520264
+ 0.9061816931 0.8336247802 0.8794112802
+ 0.9065344930 0.8341253996 0.8798596859
+ 0.9068872929 0.8346260190 0.8803079724
+ 0.9072400928 0.8351265788 0.8807563782
+ 0.9075930119 0.8356270790 0.8812047243
+ 0.9079458117 0.8361276984 0.8816530704
+ 0.9082986116 0.8366283178 0.8821014762
+ 0.9086514115 0.8371288776 0.8825498223
+ 0.9090042114 0.8376294971 0.8829982281
+ 0.9093561769 0.8381295800 0.8834459186
+ 0.9097027183 0.8386269808 0.8838903904
+ 0.9100490808 0.8391245008 0.8843349218
+ 0.9103956223 0.8396219015 0.8847793937
+ 0.9107421041 0.8401193023 0.8852239251
+ 0.9110885859 0.8406167030 0.8856683969
+ 0.9114350080 0.8411141038 0.8861129880
+ 0.9117814898 0.8416115046 0.8865575194
+ 0.9121279716 0.8421089053 0.8870019913
+ 0.9124745131 0.8426063061 0.8874465227
+ 0.9128088951 0.8430963159 0.8878840804
+ 0.9131420851 0.8435854912 0.8883212209
+ 0.9134753942 0.8440747857 0.8887583017
+ 0.9138085842 0.8445640802 0.8891953826
+ 0.9141417742 0.8450533748 0.8896325231
+ 0.9144750237 0.8455426097 0.8900696039
+ 0.9148082137 0.8460319042 0.8905066848
+ 0.9151415229 0.8465211987 0.8909438252
+ 0.9154747128 0.8470103741 0.8913809061
+ 0.9158115983 0.8474963903 0.8918085098
+ 0.9161515832 0.8479797244 0.8922289014
+ 0.9164916277 0.8484628797 0.8926492929
+ 0.9168316126 0.8489462137 0.8930696249
+ 0.9171715975 0.8494294286 0.8934900165
+ 0.9175117016 0.8499127030 0.8939104080
+ 0.9178516865 0.8503959179 0.8943307996
+ 0.9181916714 0.8508791924 0.8947511911
+ 0.9185317159 0.8513624072 0.8951715827
+ 0.9188717008 0.8518455029 0.8955916166
+ 0.9192115068 0.8523247838 0.8960055113
+ 0.9195513129 0.8528040051 0.8964195251
+ 0.9198911190 0.8532832265 0.8968334198
+ 0.9202309847 0.8537623882 0.8972473741
+ 0.9205707908 0.8542416096 0.8976613283
+ 0.9209105968 0.8547207713 0.8980752230
+ 0.9212504029 0.8552001119 0.8984891772
+ 0.9215902090 0.8556792736 0.8989030719
+ 0.9219300151 0.8561584949 0.8993170261
+ 0.9222667813 0.8566346169 0.8997275829
+ 0.9225986004 0.8571056724 0.9001333117
+ 0.9229304194 0.8575767875 0.9005389214
+ 0.9232621193 0.8580479026 0.9009444714
+ 0.9235938787 0.8585190177 0.9013502002
+ 0.9239256978 0.8589900732 0.9017558098
+ 0.9242575169 0.8594611883 0.9021614194
+ 0.9245892763 0.8599323034 0.9025670886
+ 0.9249210954 0.8604034185 0.9029726982
+ 0.9252529144 0.8608745933 0.9033783078
+ 0.9255800247 0.8613454103 0.9037811160
+ 0.9259036779 0.8618162274 0.9041818976
+ 0.9262273908 0.8622869253 0.9045827985
+ 0.9265511036 0.8627576232 0.9049836993
+ 0.9268748164 0.8632283211 0.9053844810
+ 0.9271985292 0.8636990190 0.9057853818
+ 0.9275221825 0.8641697764 0.9061862826
+ 0.9278460145 0.8646404743 0.9065871239
+ 0.9281697273 0.8651111722 0.9069880247
+ 0.9284933805 0.8655819297 0.9073889256
+ 0.9288159013 0.8660464287 0.9077849984
+ 0.9291377068 0.8665074706 0.9081788063
+ 0.9294595122 0.8669685721 0.9085724950
+ 0.9297813773 0.8674296737 0.9089663029
+ 0.9301031828 0.8678907752 0.9093599916
+ 0.9304249883 0.8683518767 0.9097537994
+ 0.9307467937 0.8688129783 0.9101474881
+ 0.9310687184 0.8692740798 0.9105412960
+ 0.9313905239 0.8697351813 0.9109349847
+ 0.9317123294 0.8701962829 0.9113287926
+ 0.9320325851 0.8706560135 0.9117175937
+ 0.9323515892 0.8711144924 0.9121026993
+ 0.9326705933 0.8715730906 0.9124878049
+ 0.9329895973 0.8720316887 0.9128729105
+ 0.9333087206 0.8724902272 0.9132580161
+ 0.9336277246 0.8729488254 0.9136431217
+ 0.9339467287 0.8734074235 0.9140282273
+ 0.9342656732 0.8738659024 0.9144132733
+ 0.9345846772 0.8743245006 0.9147983789
+ 0.9349036813 0.8747830987 0.9151834846
+ 0.9352200031 0.8752396703 0.9155669212
+ 0.9355298877 0.8756920099 0.9159467816
+ 0.9358398914 0.8761444092 0.9163267016
+ 0.9361498952 0.8765966892 0.9167066216
+ 0.9364597797 0.8770490885 0.9170864820
+ 0.9367697835 0.8775014877 0.9174664021
+ 0.9370797873 0.8779538274 0.9178462029
+ 0.9373897910 0.8784062266 0.9182261229
+ 0.9376996756 0.8788586259 0.9186059833
+ 0.9380096793 0.8793109059 0.9189859033
+ 0.9383196831 0.8797633052 0.9193658233
+ 0.9386215210 0.8802114129 0.9197325110
+ 0.9389225245 0.8806591034 0.9200983047
+ 0.9392235279 0.8811067939 0.9204640985
+ 0.9395244718 0.8815544844 0.9208298922
+ 0.9398255944 0.8820021749 0.9211956859
+ 0.9401265979 0.8824499249 0.9215614796
+ 0.9404276013 0.8828976154 0.9219272733
+ 0.9407287240 0.8833453059 0.9222931266
+ 0.9410297275 0.8837931156 0.9226589203
+ 0.9413306713 0.8842408061 0.9230247140
+ 0.9416282177 0.8846876025 0.9233872294
+ 0.9419195056 0.8851327896 0.9237444997
+ 0.9422109127 0.8855779767 0.9241018295
+ 0.9425022006 0.8860232830 0.9244589806
+ 0.9427934885 0.8864685297 0.9248163104
+ 0.9430847764 0.8869137764 0.9251735210
+ 0.9433761239 0.8873590231 0.9255307913
+ 0.9436674714 0.8878043294 0.9258880019
+ 0.9439588189 0.8882495165 0.9262452722
+ 0.9442501068 0.8886947036 0.9266026020
+ 0.9445413947 0.8891400099 0.9269598126
+ 0.9448264241 0.8895812035 0.9273141026
+ 0.9451081157 0.8900203109 0.9276670814
+ 0.9453896880 0.8904594779 0.9280200005
+ 0.9456713796 0.8908985853 0.9283729792
+ 0.9459530115 0.8913378119 0.9287258983
+ 0.9462347031 0.8917769194 0.9290788770
+ 0.9465163946 0.8922160864 0.9294317961
+ 0.9467980266 0.8926551938 0.9297847748
+ 0.9470797181 0.8930943012 0.9301376939
+ 0.9473612905 0.8935335279 0.9304906726
+ 0.9476429820 0.8939725757 0.9308435917
+ 0.9479179978 0.8944123983 0.9311866164
+ 0.9481912255 0.8948522806 0.9315270782
+ 0.9484645128 0.8952922225 0.9318677187
+ 0.9487376809 0.8957322240 0.9322082996
+ 0.9490109086 0.8961721063 0.9325488806
+ 0.9492841959 0.8966119885 0.9328895211
+ 0.9495574236 0.8970518708 0.9332301021
+ 0.9498305917 0.8974918127 0.9335706830
+ 0.9501038790 0.8979318142 0.9339113235
+ 0.9503771067 0.8983716965 0.9342517853
+ 0.9506502748 0.8988115788 0.9345924258
+ 0.9509218931 0.8992447257 0.9349266291
+ 0.9511929750 0.8996757269 0.9352591038
+ 0.9514641166 0.9001067281 0.9355915189
+ 0.9517351985 0.9005377293 0.9359238744
+ 0.9520063996 0.9009686708 0.9362562895
+ 0.9522774816 0.9013996720 0.9365887046
+ 0.9525486231 0.9018306732 0.9369211197
+ 0.9528197050 0.9022616744 0.9372535944
+ 0.9530907869 0.9026926756 0.9375860095
+ 0.9533619285 0.9031236768 0.9379184246
+ 0.9536330104 0.9035546780 0.9382507801
+ 0.9538990855 0.9039816856 0.9385809898
+ 0.9541615248 0.9044054747 0.9389094710
+ 0.9544237852 0.9048293829 0.9392380118
+ 0.9546862245 0.9052531719 0.9395664930
+ 0.9549484849 0.9056770802 0.9398950934
+ 0.9552109241 0.9061009884 0.9402235746
+ 0.9554733038 0.9065247774 0.9405521154
+ 0.9557356238 0.9069486856 0.9408807158
+ 0.9559980035 0.9073724747 0.9412091970
+ 0.9562603235 0.9077963829 0.9415376782
+ 0.9565227032 0.9082202911 0.9418662190
+ 0.9567822218 0.9086430073 0.9421923161
+ 0.9570304155 0.9090616107 0.9425098896
+ 0.9572787285 0.9094802141 0.9428274035
+ 0.9575269818 0.9098988175 0.9431449771
+ 0.9577752948 0.9103174210 0.9434624910
+ 0.9580236077 0.9107360244 0.9437801242
+ 0.9582718015 0.9111546278 0.9440975785
+ 0.9585201144 0.9115732908 0.9444152117
+ 0.9587684274 0.9119918942 0.9447327256
+ 0.9590166807 0.9124104977 0.9450501800
+ 0.9592649937 0.9128291011 0.9453678131
+ 0.9595133066 0.9132477045 0.9456853271
+ 0.9597612023 0.9136605859 0.9459949136
+ 0.9600089192 0.9140707254 0.9463008046
+ 0.9602565765 0.9144809246 0.9466066957
+ 0.9605042934 0.9148911238 0.9469127059
+ 0.9607520103 0.9153013229 0.9472185969
+ 0.9609997272 0.9157114029 0.9475244880
+ 0.9612473845 0.9161216021 0.9478303790
+ 0.9614952207 0.9165318012 0.9481363893
+ 0.9617428780 0.9169420004 0.9484422803
+ 0.9619905949 0.9173520803 0.9487481713
+ 0.9622383118 0.9177622795 0.9490541816
+ 0.9624860287 0.9181724787 0.9493600726
+ 0.9627341032 0.9185807109 0.9496526122
+ 0.9629822969 0.9189888239 0.9499449730
+ 0.9632303715 0.9193968773 0.9502373934
+ 0.9634785056 0.9198051095 0.9505296946
+ 0.9637266994 0.9202132225 0.9508221149
+ 0.9639747739 0.9206213951 0.9511144161
+ 0.9642229080 0.9210295081 0.9514067769
+ 0.9644711018 0.9214376211 0.9516991973
+ 0.9647191763 0.9218457937 0.9519914985
+ 0.9649673104 0.9222539067 0.9522839189
+ 0.9652153850 0.9226620197 0.9525762200
+ 0.9654629827 0.9230692983 0.9528676867
+ 0.9657052755 0.9234678149 0.9531521797
+ 0.9659475088 0.9238663912 0.9534366727
+ 0.9661898017 0.9242649078 0.9537212253
+ 0.9664319754 0.9246634841 0.9540057182
+ 0.9666743279 0.9250620008 0.9542902112
+ 0.9669165015 0.9254605770 0.9545747042
+ 0.9671587944 0.9258590937 0.9548591971
+ 0.9674010277 0.9262577295 0.9551436901
+ 0.9676433206 0.9266563058 0.9554281235
+ 0.9678854942 0.9270548224 0.9557126164
+ 0.9681277871 0.9274533987 0.9559971094
+ 0.9683696032 0.9278519750 0.9562814832
+ 0.9685997963 0.9282519817 0.9565635920
+ 0.9688299894 0.9286519885 0.9568457007
+ 0.9690603018 0.9290519953 0.9571278095
+ 0.9692904949 0.9294521213 0.9574099779
+ 0.9695206881 0.9298521280 0.9576920867
+ 0.9697510004 0.9302520752 0.9579741955
+ 0.9699811935 0.9306520820 0.9582563043
+ 0.9702113867 0.9310522079 0.9585384130
+ 0.9704415798 0.9314522147 0.9588205814
+ 0.9706718922 0.9318522215 0.9591026902
+ 0.9709020853 0.9322522283 0.9593847990
+ 0.9711322784 0.9326522946 0.9596669078
+ 0.9713497162 0.9330475926 0.9599413872
+ 0.9715638161 0.9334416986 0.9602140784
+ 0.9717779160 0.9338359237 0.9604868889
+ 0.9719918966 0.9342300296 0.9607595801
+ 0.9722059965 0.9346240759 0.9610322714
+ 0.9724200964 0.9350183010 0.9613050222
+ 0.9726341963 0.9354124069 0.9615777731
+ 0.9728482962 0.9358065724 0.9618505239
+ 0.9730623960 0.9362006783 0.9621232152
+ 0.9732764959 0.9365949035 0.9623959064
+ 0.9734905958 0.9369890094 0.9626687169
+ 0.9737046957 0.9373831749 0.9629414082
+ 0.9739152193 0.9377775788 0.9632083178
+ 0.9741197228 0.9381725192 0.9634661078
+ 0.9743241072 0.9385674000 0.9637240171
+ 0.9745286107 0.9389622211 0.9639819264
+ 0.9747331142 0.9393571019 0.9642397761
+ 0.9749376178 0.9397519827 0.9644976258
+ 0.9751421213 0.9401469231 0.9647554755
+ 0.9753466249 0.9405416846 0.9650133848
+ 0.9755511284 0.9409366250 0.9652711749
+ 0.9757555723 0.9413315058 0.9655290842
+ 0.9759600759 0.9417263865 0.9657869935
+ 0.9761645794 0.9421213269 0.9660447836
+ 0.9763690233 0.9425160885 0.9663026929
+ 0.9765669107 0.9429088235 0.9665576220
+ 0.9767628908 0.9433009028 0.9668117166
+ 0.9769588113 0.9436929822 0.9670658112
+ 0.9771547914 0.9440850019 0.9673200250
+ 0.9773507118 0.9444770813 0.9675741196
+ 0.9775466919 0.9448692203 0.9678282142
+ 0.9777426124 0.9452611804 0.9680823088
+ 0.9779385924 0.9456533194 0.9683364034
+ 0.9781345129 0.9460453987 0.9685904980
+ 0.9783304930 0.9464374781 0.9688445926
+ 0.9785264134 0.9468294978 0.9690986872
+ 0.9787223935 0.9472215772 0.9693527818
+ 0.9789183140 0.9476137161 0.9696068764
+ 0.9791035056 0.9479907155 0.9698532224
+ 0.9792885184 0.9483674169 0.9700992703
+ 0.9794734120 0.9487441778 0.9703454971
+ 0.9796584249 0.9491209984 0.9705916047
+ 0.9798433781 0.9494978189 0.9708377719
+ 0.9800283909 0.9498745203 0.9710839987
+ 0.9802134037 0.9502512813 0.9713301063
+ 0.9803982973 0.9506281018 0.9715762734
+ 0.9805833101 0.9510049224 0.9718223810
+ 0.9807683229 0.9513816237 0.9720686078
+ 0.9809532762 0.9517583847 0.9723147750
+ 0.9811382890 0.9521352053 0.9725608826
+ 0.9813233018 0.9525119066 0.9728069901
+ 0.9815040231 0.9528858066 0.9730427265
+ 0.9816848040 0.9532597065 0.9732784033
+ 0.9818655849 0.9536336064 0.9735140800
+ 0.9820463061 0.9540073872 0.9737498760
+ 0.9822270870 0.9543812871 0.9739856124
+ 0.9824079275 0.9547551870 0.9742212892
+ 0.9825885892 0.9551290274 0.9744570255
+ 0.9827694297 0.9555029273 0.9746928215
+ 0.9829502106 0.9558768272 0.9749284983
+ 0.9831308722 0.9562507272 0.9751641750
+ 0.9833117127 0.9566245079 0.9753999114
+ 0.9834924936 0.9569984078 0.9756355882
+ 0.9836732149 0.9573723078 0.9758713841
+ 0.9838451743 0.9577409029 0.9761005044
+ 0.9840152264 0.9581084251 0.9763283134
+ 0.9841852784 0.9584758878 0.9765561223
+ 0.9843552709 0.9588434100 0.9767838717
+ 0.9845253229 0.9592108130 0.9770116806
+ 0.9846953750 0.9595782757 0.9772394896
+ 0.9848654270 0.9599457979 0.9774672985
+ 0.9850354791 0.9603133202 0.9776951075
+ 0.9852054715 0.9606807828 0.9779229164
+ 0.9853755832 0.9610483050 0.9781507254
+ 0.9855455756 0.9614158273 0.9783784747
+ 0.9857156277 0.9617832899 0.9786062837
+ 0.9858856797 0.9621506929 0.9788340926
+ 0.9860520959 0.9625151753 0.9790583253
+ 0.9862139821 0.9628759027 0.9792780876
+ 0.9863759875 0.9632365704 0.9794977903
+ 0.9865378737 0.9635972977 0.9797176123
+ 0.9866998792 0.9639580250 0.9799373746
+ 0.9868618250 0.9643186927 0.9801570773
+ 0.9870237112 0.9646794200 0.9803768992
+ 0.9871857166 0.9650400877 0.9805967212
+ 0.9873476028 0.9654006958 0.9808164239
+ 0.9875096083 0.9657614231 0.9810361862
+ 0.9876714945 0.9661220908 0.9812560081
+ 0.9878333807 0.9664828181 0.9814757109
+ 0.9879953861 0.9668434858 0.9816954732
+ 0.9881572723 0.9672042131 0.9819152951
+ 0.9883103967 0.9675583243 0.9821261764
+ 0.9884620905 0.9679114223 0.9823359251
+ 0.9886137843 0.9682645202 0.9825456142
+ 0.9887655973 0.9686176181 0.9827553034
+ 0.9889172912 0.9689707160 0.9829649925
+ 0.9890691042 0.9693238139 0.9831746817
+ 0.9892207980 0.9696769118 0.9833843708
+ 0.9893726110 0.9700300097 0.9835941195
+ 0.9895243049 0.9703831077 0.9838038087
+ 0.9896761179 0.9707363248 0.9840136170
+ 0.9898278117 0.9710894227 0.9842233062
+ 0.9899795055 0.9714425206 0.9844329953
+ 0.9901313186 0.9717956185 0.9846426845
+ 0.9902822971 0.9721478224 0.9848514795
+ 0.9904264808 0.9724920988 0.9850528240
+ 0.9905707240 0.9728363752 0.9852542281
+ 0.9907147884 0.9731807113 0.9854555130
+ 0.9908589721 0.9735249281 0.9856567979
+ 0.9910032153 0.9738692045 0.9858580828
+ 0.9911473989 0.9742134809 0.9860594273
+ 0.9912915230 0.9745578170 0.9862607121
+ 0.9914357066 0.9749019742 0.9864619970
+ 0.9915798903 0.9752463102 0.9866632819
+ 0.9917240739 0.9755905867 0.9868646264
+ 0.9918681979 0.9759349227 0.9870659113
+ 0.9920123816 0.9762790799 0.9872671962
+ 0.9921566248 0.9766234159 0.9874684811
+ 0.9922997952 0.9769669175 0.9876685143
+ 0.9924352765 0.9773039818 0.9878587723
+ 0.9925708771 0.9776411057 0.9880490899
+ 0.9927064180 0.9779782295 0.9882394075
+ 0.9928418994 0.9783154130 0.9884296060
+ 0.9929775000 0.9786524773 0.9886199236
+ 0.9931129813 0.9789896011 0.9888101816
+ 0.9932485223 0.9793267250 0.9890004992
+ 0.9933841228 0.9796637893 0.9891908169
+ 0.9935196042 0.9800009727 0.9893810153
+ 0.9936550856 0.9803380966 0.9895712733
+ 0.9937906861 0.9806752205 0.9897615910
+ 0.9939262271 0.9810122848 0.9899519086
+ 0.9940617085 0.9813494086 0.9901422262
+ 0.9941973090 0.9816865921 0.9903324246
+ 0.9943200946 0.9820179939 0.9905114174
+ 0.9944419265 0.9823489785 0.9906893969
+ 0.9945635796 0.9826800227 0.9908673167
+ 0.9946854115 0.9830108881 0.9910452962
+ 0.9948071241 0.9833418727 0.9912232757
+ 0.9949287772 0.9836729169 0.9914013147
+ 0.9950506091 0.9840037823 0.9915792942
+ 0.9951723218 0.9843348265 0.9917572737
+ 0.9952940941 0.9846658111 0.9919353127
+ 0.9954158068 0.9849967957 0.9921132922
+ 0.9955375791 0.9853277206 0.9922912717
+ 0.9956592917 0.9856587052 0.9924693108
+ 0.9957811236 0.9859896898 0.9926472902
+ 0.9959027767 0.9863206148 0.9928253293
+ 0.9960159063 0.9866454005 0.9930018783
+ 0.9961208105 0.9869645238 0.9931772947
+ 0.9962257147 0.9872835279 0.9933525920
+ 0.9963306785 0.9876025915 0.9935278893
+ 0.9964355826 0.9879215956 0.9937033057
+ 0.9965404868 0.9882405996 0.9938786030
+ 0.9966455102 0.9885597229 0.9940540195
+ 0.9967504144 0.9888787270 0.9942293167
+ 0.9968553185 0.9891976714 0.9944046736
+ 0.9969602823 0.9895167947 0.9945799708
+ 0.9970651865 0.9898357987 0.9947553873
+ 0.9971700907 0.9901549220 0.9949306846
+ 0.9972751141 0.9904739261 0.9951061010
+ 0.9973800182 0.9907928705 0.9952813983
+ 0.9974849224 0.9911119938 0.9954568148
+ 0.9975774884 0.9914191961 0.9956181049
+ 0.9976686239 0.9917250276 0.9957777858
+ 0.9977596998 0.9920307994 0.9959375858
+ 0.9978507757 0.9923365712 0.9960973263
+ 0.9979419708 0.9926424026 0.9962570071
+ 0.9980331063 0.9929481745 0.9964166880
+ 0.9981241822 0.9932541251 0.9965764880
+ 0.9982153177 0.9935598969 0.9967362285
+ 0.9983065128 0.9938657284 0.9968959093
+ 0.9983975887 0.9941715002 0.9970557094
+ 0.9984887242 0.9944772720 0.9972153902
+ 0.9985798001 0.9947832227 0.9973750710
+ 0.9986709952 0.9950889945 0.9975348711
+ 0.9987620711 0.9953948259 0.9976946115
+ 0.9988523722 0.9956995249 0.9978532791
+ 0.9989289045 0.9959862232 0.9979965091
+ 0.9990053773 0.9962729216 0.9981396198
+ 0.9990819097 0.9965596199 0.9982826710
+ 0.9991583824 0.9968463182 0.9984257817
+ 0.9992349148 0.9971330166 0.9985688925
+ 0.9993113875 0.9974197149 0.9987120032
+ 0.9993879199 0.9977064133 0.9988551140
+ 0.9994643927 0.9979931116 0.9989982247
+ 0.9995409250 0.9982798100 0.9991412759
+ 0.9996175170 0.9985665083 0.9992843866
+ 0.9996939898 0.9988532066 0.9994276166
+ 0.9997705221 0.9991399050 0.9995707273
+ 0.9998469949 0.9994266033 0.9997137785
+ 0.9999235272 0.9997133017 0.9998568892
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/fujifilm_fci.spi1d b/release/datafiles/colormanagement/luts/film_response/fujifilm_fci.spi1d
new file mode 100644
index 00000000000..c4ba530ab45
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/fujifilm_fci.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0033529000 0.0050222902 0.0032476850
+ 0.0072128819 0.0108181098 0.0077999481
+ 0.0113698002 0.0162938796 0.0123000797
+ 0.0156070897 0.0214859303 0.0166385006
+ 0.0199807901 0.0263246894 0.0207970906
+ 0.0243835095 0.0308334995 0.0247384906
+ 0.0286132805 0.0350737683 0.0284963101
+ 0.0324965417 0.0390635394 0.0320877396
+ 0.0360950083 0.0428937711 0.0354904681
+ 0.0395800695 0.0465790592 0.0387074091
+ 0.0429466292 0.0501471013 0.0416742302
+ 0.0462706387 0.0536180995 0.0443837605
+ 0.0495057292 0.0570361391 0.0468798988
+ 0.0526856817 0.0603578687 0.0492865406
+ 0.0557528697 0.0635878816 0.0516750701
+ 0.0587552190 0.0667311326 0.0540582016
+ 0.0617134199 0.0698272586 0.0564595386
+ 0.0646046400 0.0728573427 0.0588268489
+ 0.0674475282 0.0758241564 0.0611601882
+ 0.0702735782 0.0787356123 0.0634666085
+ 0.0730631575 0.0815977603 0.0657490194
+ 0.0758077726 0.0844080597 0.0680202469
+ 0.0785278529 0.0871943235 0.0702772215
+ 0.0811867565 0.0899614617 0.0725171790
+ 0.0838195309 0.0926874802 0.0747344568
+ 0.0863845199 0.0953808501 0.0769255832
+ 0.0889284089 0.0980331302 0.0790845528
+ 0.0914222598 0.1006408036 0.0812203065
+ 0.0939096585 0.1032157987 0.0833272487
+ 0.0963765979 0.1057695001 0.0854128227
+ 0.0988149419 0.1082855985 0.0874713212
+ 0.1012422964 0.1107629016 0.0895218775
+ 0.1036200002 0.1132119000 0.0915501490
+ 0.1059933975 0.1156331003 0.0935597792
+ 0.1083453968 0.1180197969 0.0955581069
+ 0.1106605977 0.1203960031 0.0975283831
+ 0.1129731014 0.1227459982 0.0994904488
+ 0.1152468994 0.1250717044 0.1014442965
+ 0.1174897999 0.1273722053 0.1033670977
+ 0.1197345033 0.1296402067 0.1052874029
+ 0.1219704002 0.1319027990 0.1072127968
+ 0.1241703033 0.1341574937 0.1091049984
+ 0.1263649017 0.1363900006 0.1109855026
+ 0.1285486072 0.1386093944 0.1128652021
+ 0.1306926012 0.1408098936 0.1147162989
+ 0.1328168064 0.1429897994 0.1165445000
+ 0.1349381059 0.1451606005 0.1183724999
+ 0.1370306015 0.1473139971 0.1202073991
+ 0.1390942931 0.1494463980 0.1220164970
+ 0.1411485970 0.1515574008 0.1238055974
+ 0.1432065070 0.1536653936 0.1255939007
+ 0.1452423036 0.1557527035 0.1273798943
+ 0.1472520977 0.1578146964 0.1291383952
+ 0.1492526978 0.1598653048 0.1308757067
+ 0.1512524039 0.1619043052 0.1326085031
+ 0.1532357931 0.1639177054 0.1343494058
+ 0.1552000046 0.1659058034 0.1360910982
+ 0.1571528018 0.1678874046 0.1378227025
+ 0.1591075957 0.1698614955 0.1395412982
+ 0.1610587984 0.1718100011 0.1412588060
+ 0.1629907042 0.1737367064 0.1429695040
+ 0.1649049968 0.1756578982 0.1446525007
+ 0.1668141931 0.1775816977 0.1463117003
+ 0.1687301993 0.1794971973 0.1479572952
+ 0.1706393063 0.1813943982 0.1495992988
+ 0.1725254953 0.1832813025 0.1512472928
+ 0.1743942946 0.1851720065 0.1529006958
+ 0.1762564927 0.1870612949 0.1545381993
+ 0.1781218946 0.1889400929 0.1561595052
+ 0.1799844950 0.1908051968 0.1577727944
+ 0.1818296015 0.1926642060 0.1593860984
+ 0.1836557984 0.1945220977 0.1609999985
+ 0.1854719967 0.1963763982 0.1625989974
+ 0.1872864068 0.1982188970 0.1641764939
+ 0.1891041994 0.2000444978 0.1657395959
+ 0.1909209043 0.2018636018 0.1672948003
+ 0.1927119941 0.2036861926 0.1688483953
+ 0.1944850981 0.2054955065 0.1704075038
+ 0.1962500066 0.2072805017 0.1719689965
+ 0.1980129927 0.2090491951 0.1735302061
+ 0.1997700036 0.2108096033 0.1750829965
+ 0.2015154958 0.2125660926 0.1766262054
+ 0.2032480985 0.2143186033 0.1781643927
+ 0.2049618065 0.2160613984 0.1797035038
+ 0.2066676021 0.2177938968 0.1812402010
+ 0.2083701938 0.2195162028 0.1827660948
+ 0.2100692987 0.2212309986 0.1842781007
+ 0.2117556036 0.2229442000 0.1857748926
+ 0.2134384066 0.2246554941 0.1872583032
+ 0.2151104063 0.2263627946 0.1887380928
+ 0.2167720050 0.2280618995 0.1902170032
+ 0.2184257954 0.2297437936 0.1916978061
+ 0.2200689018 0.2314164937 0.1931888014
+ 0.2217032015 0.2330885977 0.1946718991
+ 0.2233294994 0.2347614020 0.1961459965
+ 0.2249525934 0.2364338040 0.1976051033
+ 0.2265653014 0.2380886972 0.1990566999
+ 0.2281704992 0.2397311032 0.2005050927
+ 0.2297694981 0.2413610071 0.2019519955
+ 0.2313688993 0.2429879010 0.2034036070
+ 0.2329650968 0.2446155995 0.2048534006
+ 0.2345501930 0.2462483943 0.2062973976
+ 0.2361329943 0.2478673011 0.2077303976
+ 0.2377143055 0.2494771034 0.2091592997
+ 0.2392926067 0.2510702908 0.2105841041
+ 0.2408663034 0.2526575029 0.2120015025
+ 0.2424364984 0.2542414963 0.2134159952
+ 0.2439859062 0.2558271885 0.2148285061
+ 0.2455307990 0.2574067116 0.2162439972
+ 0.2470698953 0.2589786947 0.2176620960
+ 0.2486097962 0.2605280876 0.2190825939
+ 0.2501479089 0.2620697916 0.2204976976
+ 0.2516750991 0.2635981143 0.2218970954
+ 0.2531996965 0.2651236951 0.2232882977
+ 0.2547213137 0.2666468024 0.2246735990
+ 0.2562285066 0.2681731880 0.2260529995
+ 0.2577311993 0.2696993053 0.2274315953
+ 0.2592264116 0.2712090015 0.2288105935
+ 0.2607224882 0.2727130949 0.2301889062
+ 0.2622207999 0.2742044926 0.2315658033
+ 0.2637135983 0.2756915987 0.2329387963
+ 0.2652012110 0.2771748006 0.2343091965
+ 0.2666864991 0.2786591947 0.2356632948
+ 0.2681710124 0.2801440060 0.2370133996
+ 0.2696504891 0.2816297114 0.2383510023
+ 0.2711291909 0.2831149995 0.2396876067
+ 0.2726014853 0.2845805883 0.2410192937
+ 0.2740728855 0.2860446870 0.2423513979
+ 0.2755376995 0.2874991000 0.2436847985
+ 0.2770003974 0.2889532149 0.2450177968
+ 0.2784548104 0.2904062867 0.2463497967
+ 0.2799058855 0.2918587029 0.2476796955
+ 0.2813473046 0.2933095098 0.2490058988
+ 0.2827846110 0.2947534919 0.2503249049
+ 0.2842110097 0.2961812913 0.2516323030
+ 0.2856361866 0.2976050079 0.2529352903
+ 0.2870579064 0.2990190089 0.2542308867
+ 0.2884807885 0.3004320860 0.2555251122
+ 0.2899079919 0.3018426001 0.2568162084
+ 0.2913340926 0.3032543063 0.2581079900
+ 0.2927548885 0.3046708107 0.2594015896
+ 0.2941757143 0.3060868084 0.2606950998
+ 0.2955969870 0.3074971139 0.2619884014
+ 0.2970184088 0.3089073896 0.2632819116
+ 0.2984277010 0.3103012145 0.2645807862
+ 0.2998363078 0.3116944134 0.2658798099
+ 0.3012431860 0.3130815029 0.2671642900
+ 0.3026494980 0.3144671023 0.2684471011
+ 0.3040472865 0.3158538043 0.2697230875
+ 0.3054392934 0.3172411919 0.2709963024
+ 0.3068284094 0.3186290860 0.2722682953
+ 0.3082126975 0.3200176060 0.2735388875
+ 0.3095946908 0.3214035928 0.2748104036
+ 0.3109588921 0.3227730095 0.2760851979
+ 0.3123230934 0.3241423070 0.2773601115
+ 0.3136793077 0.3255028129 0.2786275148
+ 0.3150336146 0.3268615901 0.2798944116
+ 0.3163881004 0.3282201886 0.2811588943
+ 0.3177425861 0.3295786977 0.2824218869
+ 0.3190953135 0.3309383988 0.2836810946
+ 0.3204368949 0.3323050141 0.2849281132
+ 0.3217783868 0.3336715996 0.2861750126
+ 0.3231084049 0.3350208998 0.2874141932
+ 0.3244343996 0.3363648057 0.2886519134
+ 0.3257552087 0.3377039135 0.2898885906
+ 0.3270645142 0.3390335143 0.2911236882
+ 0.3283737898 0.3403630853 0.2923589051
+ 0.3296771944 0.3416889906 0.2935976982
+ 0.3309794068 0.3430142105 0.2948367894
+ 0.3322823942 0.3443411887 0.2960684001
+ 0.3335868120 0.3456712961 0.2972904146
+ 0.3348912001 0.3470014036 0.2985123992
+ 0.3361887038 0.3483262956 0.2997243106
+ 0.3374845088 0.3496501148 0.3009350896
+ 0.3387758136 0.3509699106 0.3021413982
+ 0.3400512934 0.3522767127 0.3033381999
+ 0.3413268030 0.3535835147 0.3045350015
+ 0.3425957859 0.3548851907 0.3057265878
+ 0.3438603878 0.3561838865 0.3069159091
+ 0.3451249003 0.3574824929 0.3081052899
+ 0.3463880122 0.3587825894 0.3092936873
+ 0.3476510942 0.3600828052 0.3104822040
+ 0.3489136994 0.3613828123 0.3116725981
+ 0.3501749933 0.3626824915 0.3128665984
+ 0.3514364064 0.3639822900 0.3140606880
+ 0.3526903093 0.3652707934 0.3152511120
+ 0.3539369106 0.3665491939 0.3164390028
+ 0.3551836014 0.3678277135 0.3176268935
+ 0.3564186096 0.3690966964 0.3188065886
+ 0.3576493859 0.3703624904 0.3199844956
+ 0.3588801026 0.3716283143 0.3211624026
+ 0.3601047099 0.3728910983 0.3223274946
+ 0.3613288105 0.3741537035 0.3234925866
+ 0.3625529110 0.3754166067 0.3246566951
+ 0.3637793064 0.3766838908 0.3258154094
+ 0.3650057018 0.3779512048 0.3269740045
+ 0.3662337065 0.3792163134 0.3281326890
+ 0.3674710095 0.3804695904 0.3292913139
+ 0.3687084019 0.3817228973 0.3304499090
+ 0.3699420094 0.3829731941 0.3316102922
+ 0.3711602986 0.3842121959 0.3327750862
+ 0.3723787069 0.3854511976 0.3339399993
+ 0.3735949099 0.3866888881 0.3351032138
+ 0.3748030066 0.3879219890 0.3362624049
+ 0.3760110140 0.3891550899 0.3374215961
+ 0.3772188127 0.3903886080 0.3385764062
+ 0.3784255981 0.3916240931 0.3397186995
+ 0.3796324134 0.3928596079 0.3408609927
+ 0.3808397949 0.3940944076 0.3420014083
+ 0.3820542097 0.3953225017 0.3431330025
+ 0.3832687140 0.3965505064 0.3442645073
+ 0.3844830990 0.3977786005 0.3453958035
+ 0.3856852055 0.3989897966 0.3465226889
+ 0.3868865967 0.4002004862 0.3476496041
+ 0.3880881071 0.4014112055 0.3487764895
+ 0.3892784119 0.4026145041 0.3499045968
+ 0.3904655874 0.4038158953 0.3510330021
+ 0.3916527927 0.4050172865 0.3521612883
+ 0.3928368986 0.4062179923 0.3532944024
+ 0.3940187097 0.4074181020 0.3544299901
+ 0.3952004015 0.4086182117 0.3555656970
+ 0.3963829875 0.4098179936 0.3566969037
+ 0.3975678086 0.4110169113 0.3578208089
+ 0.3987526894 0.4122158885 0.3589447141
+ 0.3999375105 0.4134148955 0.3600678146
+ 0.4011155963 0.4145950079 0.3611775935
+ 0.4022935033 0.4157749116 0.3622873127
+ 0.4034712911 0.4169546962 0.3633970916
+ 0.4046387970 0.4181272984 0.3645012081
+ 0.4057992101 0.4192951918 0.3656027913
+ 0.4069595933 0.4204632044 0.3667044044
+ 0.4081184864 0.4216302931 0.3678053021
+ 0.4092698991 0.4227936864 0.3689045906
+ 0.4104213119 0.4239571989 0.3700039089
+ 0.4115728140 0.4251207113 0.3711032867
+ 0.4127238989 0.4262751043 0.3721981943
+ 0.4138750136 0.4274260998 0.3732920885
+ 0.4150260091 0.4285770059 0.3743860126
+ 0.4161767960 0.4297257066 0.3754799068
+ 0.4173265100 0.4308654070 0.3765740991
+ 0.4184763134 0.4320049882 0.3776682913
+ 0.4196259975 0.4331446886 0.3787625134
+ 0.4207628965 0.4342770875 0.3798545003
+ 0.4218915105 0.4354051948 0.3809455037
+ 0.4230200946 0.4365333021 0.3820365965
+ 0.4241487980 0.4376614094 0.3831265867
+ 0.4252648056 0.4387851059 0.3842037916
+ 0.4263804853 0.4399087131 0.3852809966
+ 0.4274963140 0.4410324097 0.3863582909
+ 0.4286107123 0.4421544969 0.3874323070
+ 0.4297220111 0.4432731867 0.3885014951
+ 0.4308333099 0.4443919063 0.3895707130
+ 0.4319446087 0.4455106854 0.3906398118
+ 0.4330579937 0.4466271102 0.3917075098
+ 0.4341728985 0.4477419853 0.3927743137
+ 0.4352878034 0.4488568008 0.3938410878
+ 0.4364027083 0.4499715865 0.3949080110
+ 0.4375129938 0.4510774016 0.3959777057
+ 0.4386217892 0.4521808028 0.3970479965
+ 0.4397307038 0.4532842040 0.3981181979
+ 0.4408395886 0.4543874860 0.3991884887
+ 0.4419341087 0.4554865062 0.4002597928
+ 0.4430272877 0.4565851986 0.4013310969
+ 0.4441205859 0.4576838911 0.4024024010
+ 0.4452137053 0.4587827027 0.4034720063
+ 0.4462993145 0.4598833919 0.4045264125
+ 0.4473848939 0.4609842002 0.4055807889
+ 0.4484705031 0.4620848894 0.4066353142
+ 0.4495561123 0.4631853998 0.4076882005
+ 0.4506419003 0.4642808139 0.4087311029
+ 0.4517278075 0.4653762877 0.4097740948
+ 0.4528135955 0.4664717019 0.4108170867
+ 0.4538995028 0.4675666988 0.4118593931
+ 0.4549854994 0.4686492980 0.4128966033
+ 0.4560714960 0.4697318971 0.4139338136
+ 0.4571574926 0.4708144069 0.4149709940
+ 0.4582434893 0.4718970060 0.4160081148
+ 0.4593130946 0.4729729891 0.4170450866
+ 0.4603815079 0.4740487039 0.4180820882
+ 0.4614498913 0.4751243889 0.4191190898
+ 0.4625183940 0.4762001038 0.4201560915
+ 0.4635789990 0.4772703052 0.4211978018
+ 0.4646374881 0.4783391058 0.4222402871
+ 0.4656960070 0.4794079065 0.4232827127
+ 0.4667544961 0.4804767072 0.4243251085
+ 0.4678117931 0.4815419912 0.4253644943
+ 0.4688681960 0.4826048911 0.4264025092
+ 0.4699246883 0.4836677015 0.4274404049
+ 0.4709810913 0.4847306013 0.4284783900
+ 0.4720368981 0.4857918918 0.4295131862
+ 0.4730910957 0.4868499935 0.4305432141
+ 0.4741452932 0.4879080951 0.4315730929
+ 0.4751994908 0.4889661968 0.4326030910
+ 0.4762536883 0.4900242984 0.4336324930
+ 0.4772971869 0.4910764992 0.4346519113
+ 0.4783403873 0.4921286106 0.4356713891
+ 0.4793835878 0.4931806922 0.4366908967
+ 0.4804266989 0.4942328036 0.4377104044
+ 0.4814636111 0.4952807128 0.4387266040
+ 0.4824956954 0.4963257015 0.4397411942
+ 0.4835278988 0.4973706007 0.4407558143
+ 0.4845600128 0.4984155893 0.4417704046
+ 0.4855917990 0.4994598031 0.4427852035
+ 0.4866203964 0.5004987717 0.4438005090
+ 0.4876489937 0.5015376806 0.4448158145
+ 0.4886775911 0.5025765896 0.4458310902
+ 0.4897061884 0.5036156178 0.4468463957
+ 0.4907324910 0.5046514869 0.4478605092
+ 0.4917572141 0.5056853294 0.4488740861
+ 0.4927819073 0.5067191720 0.4498876035
+ 0.4938066006 0.5077530146 0.4509010911
+ 0.4948312938 0.5087867975 0.4519143999
+ 0.4958443046 0.5098149776 0.4529229105
+ 0.4968571067 0.5108430982 0.4539315104
+ 0.4978697896 0.5118712783 0.4549399912
+ 0.4988825917 0.5128993988 0.4559485912
+ 0.4998916090 0.5139253736 0.4569540024
+ 0.5008922219 0.5149468184 0.4579545856
+ 0.5018928051 0.5159683228 0.4589551985
+ 0.5028933883 0.5169898272 0.4599558115
+ 0.5038939714 0.5180112123 0.4609563947
+ 0.5048918128 0.5190292001 0.4619503915
+ 0.5058875084 0.5200446248 0.4629409909
+ 0.5068832040 0.5210601091 0.4639315009
+ 0.5078788996 0.5220755935 0.4649220109
+ 0.5088744760 0.5230910182 0.4659124911
+ 0.5098662972 0.5240967274 0.4668990970
+ 0.5108568072 0.5250995159 0.4678849876
+ 0.5118473172 0.5261024237 0.4688709080
+ 0.5128378868 0.5271052122 0.4698567986
+ 0.5138283968 0.5281080008 0.4708425999
+ 0.5148209929 0.5291042924 0.4718292058
+ 0.5158140063 0.5300996900 0.4728156924
+ 0.5168069005 0.5310950875 0.4738022983
+ 0.5177997947 0.5320904851 0.4747888148
+ 0.5187928081 0.5330858827 0.4757753909
+ 0.5197734237 0.5340675712 0.4767676890
+ 0.5207530260 0.5350484252 0.4777599871
+ 0.5217326283 0.5360292196 0.4787522852
+ 0.5227121115 0.5370100141 0.4797446132
+ 0.5236917138 0.5379908085 0.4807369113
+ 0.5246657729 0.5389664173 0.4817185104
+ 0.5256392956 0.5399416089 0.4826998115
+ 0.5266126990 0.5409168005 0.4836811125
+ 0.5275862217 0.5418918729 0.4846624136
+ 0.5285596251 0.5428671241 0.4856437147
+ 0.5295339823 0.5438383222 0.4866138101
+ 0.5305086970 0.5448085070 0.4875822067
+ 0.5314832926 0.5457786918 0.4885506034
+ 0.5324578881 0.5467488766 0.4895190895
+ 0.5334326029 0.5477191806 0.4904874861
+ 0.5344074965 0.5486854911 0.4914506078
+ 0.5353826284 0.5496494770 0.4924111962
+ 0.5363577008 0.5506135225 0.4933719039
+ 0.5373327732 0.5515775084 0.4943326116
+ 0.5383079052 0.5525414944 0.4952932000
+ 0.5392804146 0.5535004735 0.4962526858
+ 0.5402482152 0.5544509292 0.4972105920
+ 0.5412160158 0.5554013848 0.4981685877
+ 0.5421838164 0.5563517809 0.4991264939
+ 0.5431516171 0.5573021770 0.5000844002
+ 0.5441191792 0.5582525134 0.5010424852
+ 0.5450795889 0.5591980219 0.5020027161
+ 0.5460399985 0.5601435900 0.5029628873
+ 0.5470004082 0.5610890985 0.5039231181
+ 0.5479608178 0.5620347261 0.5048832297
+ 0.5489212275 0.5629801750 0.5058434010
+ 0.5498812795 0.5639281273 0.5067989230
+ 0.5508412719 0.5648773909 0.5077521801
+ 0.5518013239 0.5658267140 0.5087053776
+ 0.5527613759 0.5667759776 0.5096586943
+ 0.5537214279 0.5677253008 0.5106120110
+ 0.5546813011 0.5686742067 0.5115646720
+ 0.5556406975 0.5696194172 0.5125145912
+ 0.5566000938 0.5705646276 0.5134643912
+ 0.5575594902 0.5715097785 0.5144143105
+ 0.5585188866 0.5724549890 0.5153642297
+ 0.5594782829 0.5734001994 0.5163140893
+ 0.5604329705 0.5743389726 0.5172604918
+ 0.5613837242 0.5752723813 0.5182046294
+ 0.5623344183 0.5762056708 0.5191487074
+ 0.5632849932 0.5771390796 0.5200927854
+ 0.5642356873 0.5780724883 0.5210369825
+ 0.5651863813 0.5790058970 0.5219811201
+ 0.5661293268 0.5799363256 0.5229173899
+ 0.5670710802 0.5808663964 0.5238531828
+ 0.5680128932 0.5817964077 0.5247889757
+ 0.5689548254 0.5827264190 0.5257248878
+ 0.5698965788 0.5836563706 0.5266606808
+ 0.5708373189 0.5845860243 0.5275958776
+ 0.5717707872 0.5855131745 0.5285283923
+ 0.5727043152 0.5864403844 0.5294609070
+ 0.5736377239 0.5873675942 0.5303934813
+ 0.5745711923 0.5882948041 0.5313259959
+ 0.5755046010 0.5892218947 0.5322586298
+ 0.5764377117 0.5901458859 0.5331916809
+ 0.5773698092 0.5910627246 0.5341259241
+ 0.5783019066 0.5919793844 0.5350601077
+ 0.5792340040 0.5928962231 0.5359942913
+ 0.5801661015 0.5938128829 0.5369284749
+ 0.5810983181 0.5947296023 0.5378627181
+ 0.5820268989 0.5956423879 0.5387967229
+ 0.5829498768 0.5965489149 0.5397306085
+ 0.5838727951 0.5974555016 0.5406643748
+ 0.5847957134 0.5983620286 0.5415983200
+ 0.5857185721 0.5992684960 0.5425322056
+ 0.5866414905 0.6001750231 0.5434659719
+ 0.5875610113 0.6010807753 0.5443956852
+ 0.5884745121 0.6019853950 0.5453197956
+ 0.5893880129 0.6028900146 0.5462440252
+ 0.5903015137 0.6037945747 0.5471680760
+ 0.5912150145 0.6046991944 0.5480923057
+ 0.5921285152 0.6056038141 0.5490164757
+ 0.5930395126 0.6065080166 0.5499367118
+ 0.5939435959 0.6074110866 0.5508491993
+ 0.5948476791 0.6083140969 0.5517616868
+ 0.5957517028 0.6092172265 0.5526741743
+ 0.5966557860 0.6101201773 0.5535867810
+ 0.5975599289 0.6110233068 0.5544993281
+ 0.5984631777 0.6119254827 0.5554108024
+ 0.5993574858 0.6128194928 0.5563166142
+ 0.6002519131 0.6137136221 0.5572223067
+ 0.6011462808 0.6146075726 0.5581281185
+ 0.6020405889 0.6155017018 0.5590338111
+ 0.6029350162 0.6163957119 0.5599395037
+ 0.6038293242 0.6172897816 0.5608453155
+ 0.6047170162 0.6181768179 0.5617492795
+ 0.6056030989 0.6190621853 0.5626531243
+ 0.6064891219 0.6199476123 0.5635567904
+ 0.6073752046 0.6208329797 0.5644605756
+ 0.6082612276 0.6217185259 0.5653644204
+ 0.6091471910 0.6226038933 0.5662680864
+ 0.6100293994 0.6234887838 0.5671733022
+ 0.6109064221 0.6243731976 0.5680798888
+ 0.6117833257 0.6252574921 0.5689864159
+ 0.6126602888 0.6261419058 0.5698930025
+ 0.6135371923 0.6270262003 0.5707995892
+ 0.6144142151 0.6279106140 0.5717061758
+ 0.6152911782 0.6287949085 0.5726128221
+ 0.6161587834 0.6296725273 0.5735203028
+ 0.6170259714 0.6305497885 0.5744279027
+ 0.6178932190 0.6314271092 0.5753353834
+ 0.6187602878 0.6323043704 0.5762429237
+ 0.6196274757 0.6331816912 0.5771505237
+ 0.6204947233 0.6340590119 0.5780580044
+ 0.6213582158 0.6349307895 0.5789619088
+ 0.6222159863 0.6357945204 0.5798614025
+ 0.6230738163 0.6366583109 0.5807610154
+ 0.6239315867 0.6375219822 0.5816605091
+ 0.6247894168 0.6383857131 0.5825600028
+ 0.6256471872 0.6392493844 0.5834594965
+ 0.6265048981 0.6401131153 0.5843591094
+ 0.6273571253 0.6409724951 0.5852504969
+ 0.6282070279 0.6418303847 0.5861397982
+ 0.6290569901 0.6426882148 0.5870289803
+ 0.6299068928 0.6435461044 0.5879182816
+ 0.6307569146 0.6444038749 0.5888075829
+ 0.6316068172 0.6452617049 0.5896968842
+ 0.6324567795 0.6461195946 0.5905860066
+ 0.6333056092 0.6469790936 0.5914697051
+ 0.6341544986 0.6478387117 0.5923534036
+ 0.6350033283 0.6486982107 0.5932369828
+ 0.6358520985 0.6495578289 0.5941206813
+ 0.6367009282 0.6504173279 0.5950043797
+ 0.6375498176 0.6512768865 0.5958880782
+ 0.6383976936 0.6521351933 0.5967717171
+ 0.6392375231 0.6529834867 0.5976545215
+ 0.6400774121 0.6538317800 0.5985373855
+ 0.6409171820 0.6546800733 0.5994203091
+ 0.6417570114 0.6555284262 0.6003031135
+ 0.6425967813 0.6563767195 0.6011859775
+ 0.6434366107 0.6572250128 0.6020689011
+ 0.6442754269 0.6580716968 0.6029512286
+ 0.6451067924 0.6589083076 0.6038312912
+ 0.6459382772 0.6597449780 0.6047112942
+ 0.6467698216 0.6605815887 0.6055914164
+ 0.6476011872 0.6614183187 0.6064714193
+ 0.6484326720 0.6622549295 0.6073514819
+ 0.6492642164 0.6630915999 0.6082314849
+ 0.6500955820 0.6639279723 0.6091110110
+ 0.6509268880 0.6647610068 0.6099858880
+ 0.6517581940 0.6655939817 0.6108608842
+ 0.6525893807 0.6664270163 0.6117358208
+ 0.6534206867 0.6672599912 0.6126108170
+ 0.6542518735 0.6680930853 0.6134856939
+ 0.6550831795 0.6689261198 0.6143606901
+ 0.6559144855 0.6697590947 0.6152356267
+ 0.6567456722 0.6705949903 0.6160972714
+ 0.6575769782 0.6714311838 0.6169580817
+ 0.6584082246 0.6722674966 0.6178188920
+ 0.6592394710 0.6731036901 0.6186797023
+ 0.6600707769 0.6739400029 0.6195405126
+ 0.6609020233 0.6747761965 0.6204013228
+ 0.6617333293 0.6756125093 0.6212620735
+ 0.6625599861 0.6764392257 0.6221166849
+ 0.6633837223 0.6772598028 0.6229680777
+ 0.6642073989 0.6780803204 0.6238194704
+ 0.6650310755 0.6789008975 0.6246708035
+ 0.6658548117 0.6797214150 0.6255221963
+ 0.6666784883 0.6805419922 0.6263735294
+ 0.6675022244 0.6813625097 0.6272249222
+ 0.6683244705 0.6821811795 0.6280750036
+ 0.6691414714 0.6829928756 0.6289216280
+ 0.6699584723 0.6838045716 0.6297681928
+ 0.6707754731 0.6846163869 0.6306148171
+ 0.6715924740 0.6854280829 0.6314613819
+ 0.6724094748 0.6862397790 0.6323080063
+ 0.6732264757 0.6870514750 0.6331545711
+ 0.6740434766 0.6878631711 0.6340011954
+ 0.6748613715 0.6886737943 0.6348477006
+ 0.6756796837 0.6894840002 0.6356942058
+ 0.6764978766 0.6902940869 0.6365405917
+ 0.6773161888 0.6911042929 0.6373870969
+ 0.6781343818 0.6919143796 0.6382334828
+ 0.6789526939 0.6927245855 0.6390799880
+ 0.6797710061 0.6935346723 0.6399263740
+ 0.6805893183 0.6943448186 0.6407734752
+ 0.6814084053 0.6951546073 0.6416242123
+ 0.6822274923 0.6959642768 0.6424750090
+ 0.6830466986 0.6967741251 0.6433258057
+ 0.6838657856 0.6975837946 0.6441764832
+ 0.6846848726 0.6983935833 0.6450272799
+ 0.6855040193 0.6992033124 0.6458780169
+ 0.6863232255 0.7000131011 0.6467288136
+ 0.6871380806 0.7008184195 0.6475781798
+ 0.6879450083 0.7016159892 0.6484256983
+ 0.6887519956 0.7024134994 0.6492732167
+ 0.6895589828 0.7032110095 0.6501206756
+ 0.6903660297 0.7040085793 0.6509681940
+ 0.6911730170 0.7048060894 0.6518155932
+ 0.6919798851 0.7056037188 0.6526631117
+ 0.6927868724 0.7064012289 0.6535105705
+ 0.6935915947 0.7071955800 0.6543517113
+ 0.6943939924 0.7079871893 0.6551877260
+ 0.6951963902 0.7087786794 0.6560238004
+ 0.6959987879 0.7095702291 0.6568598151
+ 0.6968013048 0.7103617787 0.6576958895
+ 0.6976037025 0.7111533284 0.6585319042
+ 0.6984061003 0.7119448185 0.6593679786
+ 0.6992084980 0.7127364278 0.6602039933
+ 0.7000085711 0.7135254145 0.6610358953
+ 0.7008067966 0.7143123150 0.6618649960
+ 0.7016050220 0.7150992155 0.6626940966
+ 0.7024031878 0.7158861160 0.6635231972
+ 0.7032014132 0.7166730165 0.6643521786
+ 0.7039995790 0.7174599767 0.6651812792
+ 0.7047978044 0.7182468772 0.6660103798
+ 0.7055960298 0.7190337777 0.6668394804
+ 0.7063922286 0.7198162079 0.6676673889
+ 0.7071862221 0.7205935717 0.6684942245
+ 0.7079802155 0.7213708758 0.6693210006
+ 0.7087742090 0.7221482992 0.6701477766
+ 0.7095682025 0.7229256034 0.6709744930
+ 0.7103621960 0.7237030268 0.6718013287
+ 0.7111561894 0.7244802713 0.6726281047
+ 0.7119501829 0.7252575755 0.6734548807
+ 0.7127416134 0.7260324955 0.6742823720
+ 0.7135254741 0.7268006802 0.6751112938
+ 0.7143093944 0.7275689244 0.6759402752
+ 0.7150933146 0.7283371091 0.6767693162
+ 0.7158772945 0.7291052938 0.6775982976
+ 0.7166612148 0.7298734784 0.6784272790
+ 0.7174450755 0.7306417227 0.6792562008
+ 0.7182289958 0.7314097881 0.6800851822
+ 0.7190129757 0.7321779728 0.6809142232
+ 0.7197942138 0.7329385281 0.6817373037
+ 0.7205750942 0.7336984277 0.6825603843
+ 0.7213560939 0.7344583869 0.6833835244
+ 0.7221370935 0.7352182865 0.6842064857
+ 0.7229180932 0.7359783053 0.6850296259
+ 0.7236990929 0.7367382050 0.6858527064
+ 0.7244800925 0.7374982238 0.6866757870
+ 0.7252609730 0.7382581234 0.6874988079
+ 0.7260380983 0.7390146852 0.6883146763
+ 0.7268108726 0.7397677898 0.6891244054
+ 0.7275837064 0.7405210137 0.6899340749
+ 0.7283565998 0.7412741184 0.6907438040
+ 0.7291293740 0.7420272231 0.6915534735
+ 0.7299022079 0.7427803278 0.6923632026
+ 0.7306751013 0.7435334921 0.6931728721
+ 0.7314478755 0.7442865968 0.6939826012
+ 0.7322207093 0.7450397015 0.6947922707
+ 0.7329800129 0.7457880974 0.6955934167
+ 0.7337378860 0.7465360761 0.6963940263
+ 0.7344958186 0.7472841740 0.6971946955
+ 0.7352536917 0.7480322123 0.6979954243
+ 0.7360116243 0.7487801909 0.6987960935
+ 0.7367694974 0.7495282292 0.6995967031
+ 0.7375273705 0.7502762079 0.7003973722
+ 0.7382853031 0.7510241866 0.7011981010
+ 0.7390416265 0.7517700195 0.7019975781
+ 0.7397916913 0.7525079250 0.7027937174
+ 0.7405418754 0.7532457709 0.7035897970
+ 0.7412921190 0.7539836168 0.7043858767
+ 0.7420421839 0.7547215223 0.7051818967
+ 0.7427924275 0.7554594278 0.7059779763
+ 0.7435424924 0.7561972141 0.7067741156
+ 0.7442926764 0.7569351196 0.7075701952
+ 0.7450429201 0.7576729059 0.7083662748
+ 0.7457928061 0.7584072948 0.7091622949
+ 0.7465423942 0.7591359019 0.7099583149
+ 0.7472919226 0.7598643899 0.7107542157
+ 0.7480415106 0.7605929971 0.7115501761
+ 0.7487909794 0.7613216043 0.7123461962
+ 0.7495406270 0.7620502114 0.7131420970
+ 0.7502900958 0.7627788186 0.7139381170
+ 0.7510396838 0.7635074258 0.7147340178
+ 0.7517892122 0.7642359138 0.7155299783
+ 0.7525364161 0.7649617195 0.7163277864
+ 0.7532799244 0.7656834722 0.7171276808
+ 0.7540233731 0.7664054036 0.7179276943
+ 0.7547670007 0.7671272159 0.7187277079
+ 0.7555105090 0.7678490281 0.7195277214
+ 0.7562540770 0.7685709000 0.7203276157
+ 0.7569975853 0.7692927122 0.7211276293
+ 0.7577412128 0.7700145245 0.7219275832
+ 0.7584847212 0.7707362771 0.7227275968
+ 0.7592245936 0.7714542747 0.7235243917
+ 0.7599560022 0.7721639276 0.7243157029
+ 0.7606874108 0.7728734016 0.7251068950
+ 0.7614188790 0.7735829949 0.7258980870
+ 0.7621502876 0.7742925286 0.7266892791
+ 0.7628818154 0.7750021219 0.7274805903
+ 0.7636132240 0.7757117152 0.7282717824
+ 0.7643446922 0.7764211893 0.7290629745
+ 0.7650761008 0.7771307826 0.7298542261
+ 0.7658072114 0.7778394818 0.7306442261
+ 0.7665333748 0.7785378098 0.7314252257
+ 0.7672595978 0.7792360783 0.7322061062
+ 0.7679858208 0.7799345255 0.7329869866
+ 0.7687121034 0.7806327939 0.7337679267
+ 0.7694383264 0.7813311815 0.7345489264
+ 0.7701644897 0.7820295095 0.7353298068
+ 0.7708907127 0.7827278972 0.7361106873
+ 0.7716168761 0.7834262252 0.7368916869
+ 0.7723432183 0.7841246128 0.7376726270
+ 0.7730664015 0.7848206162 0.7384489775
+ 0.7737882733 0.7855157256 0.7392237782
+ 0.7745103240 0.7862107754 0.7399985790
+ 0.7752321959 0.7869058847 0.7407733798
+ 0.7759541869 0.7876011133 0.7415481806
+ 0.7766761184 0.7882962227 0.7423229814
+ 0.7773981094 0.7889912724 0.7430977821
+ 0.7781199813 0.7896863818 0.7438725829
+ 0.7788419724 0.7903814912 0.7446473837
+ 0.7795621753 0.7910752892 0.7454218268
+ 0.7802751064 0.7917634845 0.7461947799
+ 0.7809879780 0.7924516201 0.7469677925
+ 0.7817009091 0.7931398153 0.7477408051
+ 0.7824137807 0.7938280106 0.7485138178
+ 0.7831267118 0.7945162058 0.7492867708
+ 0.7838395834 0.7952044010 0.7500599027
+ 0.7845525146 0.7958925962 0.7508329153
+ 0.7852653861 0.7965807915 0.7516059279
+ 0.7859783173 0.7972689867 0.7523788810
+ 0.7866867781 0.7979509234 0.7531532049
+ 0.7873914838 0.7986276150 0.7539284229
+ 0.7880961895 0.7993041873 0.7547037005
+ 0.7888008952 0.7999808192 0.7554789782
+ 0.7895056009 0.8006573915 0.7562541962
+ 0.7902103066 0.8013340831 0.7570294738
+ 0.7909150124 0.8020107150 0.7578048110
+ 0.7916197181 0.8026872873 0.7585800290
+ 0.7923244238 0.8033639193 0.7593553066
+ 0.7930291295 0.8040404916 0.7601305246
+ 0.7937325239 0.8047140241 0.7609025836
+ 0.7944355011 0.8053864241 0.7616736889
+ 0.7951384783 0.8060588241 0.7624449134
+ 0.7958415151 0.8067312241 0.7632160187
+ 0.7965444922 0.8074036241 0.7639871240
+ 0.7972475290 0.8080759048 0.7647582889
+ 0.7979503870 0.8087483048 0.7655293941
+ 0.7986534238 0.8094207048 0.7663004994
+ 0.7993564010 0.8100931048 0.7670717239
+ 0.8000593781 0.8107655048 0.7678428292
+ 0.8007569909 0.8114361167 0.7686048746
+ 0.8014531732 0.8121061921 0.7693650126
+ 0.8021494150 0.8127763867 0.7701252103
+ 0.8028455973 0.8134465218 0.7708852887
+ 0.8035417795 0.8141167164 0.7716454864
+ 0.8042379022 0.8147869110 0.7724056244
+ 0.8049340844 0.8154569864 0.7731658220
+ 0.8056303263 0.8161271811 0.7739259005
+ 0.8063265085 0.8167973161 0.7746859789
+ 0.8070226908 0.8174675107 0.7754461765
+ 0.8077152967 0.8181294799 0.7762011886
+ 0.8084064126 0.8187881112 0.7769542933
+ 0.8090974092 0.8194466233 0.7777075171
+ 0.8097885251 0.8201050758 0.7784606218
+ 0.8104795218 0.8207635880 0.7792137265
+ 0.8111705780 0.8214221001 0.7799667716
+ 0.8118615746 0.8220806718 0.7807198763
+ 0.8125526905 0.8227391839 0.7814729810
+ 0.8132436872 0.8233976960 0.7822262049
+ 0.8139348030 0.8240562081 0.7829793096
+ 0.8146215081 0.8247125745 0.7837309837
+ 0.8153027892 0.8253661990 0.7844812274
+ 0.8159840703 0.8260198832 0.7852314115
+ 0.8166654706 0.8266735077 0.7859815955
+ 0.8173468113 0.8273271918 0.7867317796
+ 0.8180280924 0.8279808760 0.7874820232
+ 0.8187093735 0.8286345005 0.7882322073
+ 0.8193907142 0.8292881846 0.7889823914
+ 0.8200719953 0.8299418092 0.7897325754
+ 0.8207532763 0.8305954933 0.7904828191
+ 0.8214341998 0.8312489986 0.7912325859
+ 0.8221067190 0.8318998218 0.7919784188
+ 0.8227791786 0.8325507045 0.7927241921
+ 0.8234515786 0.8332015276 0.7934700251
+ 0.8241240978 0.8338522911 0.7942157984
+ 0.8247966170 0.8345031738 0.7949615717
+ 0.8254690766 0.8351539969 0.7957074046
+ 0.8261414766 0.8358048797 0.7964531779
+ 0.8268139958 0.8364557028 0.7971988916
+ 0.8274865150 0.8371065259 0.7979447246
+ 0.8281589150 0.8377574086 0.7986904979
+ 0.8288310170 0.8384053111 0.7994338274
+ 0.8295025229 0.8390501738 0.8001747727
+ 0.8301740885 0.8396950960 0.8009157777
+ 0.8308455944 0.8403400183 0.8016567826
+ 0.8315172195 0.8409848809 0.8023977876
+ 0.8321887255 0.8416298032 0.8031387925
+ 0.8328602910 0.8422747254 0.8038797975
+ 0.8335317969 0.8429197073 0.8046206832
+ 0.8342034221 0.8435646296 0.8053616881
+ 0.8348749280 0.8442094922 0.8061026931
+ 0.8355464935 0.8448544145 0.8068436980
+ 0.8362092972 0.8454958797 0.8075804114
+ 0.8368695974 0.8461365104 0.8083159924
+ 0.8375298977 0.8467770815 0.8090516925
+ 0.8381903172 0.8474177122 0.8097872734
+ 0.8388506174 0.8480582237 0.8105229735
+ 0.8395109177 0.8486987948 0.8112586141
+ 0.8401712775 0.8493394256 0.8119943142
+ 0.8408315778 0.8499799967 0.8127298951
+ 0.8414918780 0.8506206274 0.8134655952
+ 0.8421522975 0.8512610793 0.8142011762
+ 0.8428125978 0.8519017100 0.8149368763
+ 0.8434634209 0.8525397778 0.8156663179
+ 0.8441131711 0.8531776071 0.8163954020
+ 0.8447631001 0.8538153768 0.8171244860
+ 0.8454129100 0.8544532061 0.8178536296
+ 0.8460627794 0.8550910950 0.8185827136
+ 0.8467125893 0.8557289243 0.8193116784
+ 0.8473623991 0.8563666940 0.8200408220
+ 0.8480123281 0.8570045233 0.8207699060
+ 0.8486620784 0.8576422930 0.8214989901
+ 0.8493120074 0.8582801223 0.8222280741
+ 0.8499618173 0.8589180112 0.8229570985
+ 0.8506091237 0.8595502973 0.8236836791
+ 0.8512560725 0.8601819873 0.8244099021
+ 0.8519030809 0.8608136177 0.8251361847
+ 0.8525500894 0.8614451885 0.8258624077
+ 0.8531970978 0.8620768189 0.8265886903
+ 0.8538441062 0.8627085090 0.8273149133
+ 0.8544911146 0.8633400798 0.8280411959
+ 0.8551381230 0.8639717102 0.8287674189
+ 0.8557850718 0.8646034002 0.8294937015
+ 0.8564320803 0.8652349710 0.8302199244
+ 0.8570790291 0.8658666015 0.8309462070
+ 0.8577216268 0.8664917946 0.8316696286
+ 0.8583620787 0.8671138883 0.8323917985
+ 0.8590025902 0.8677359819 0.8331140280
+ 0.8596431017 0.8683581948 0.8338361979
+ 0.8602834940 0.8689802885 0.8345584869
+ 0.8609240055 0.8696023822 0.8352807164
+ 0.8615645170 0.8702244759 0.8360028863
+ 0.8622049093 0.8708466291 0.8367251158
+ 0.8628454208 0.8714687824 0.8374474049
+ 0.8634858727 0.8720908761 0.8381695747
+ 0.8641263843 0.8727130294 0.8388918042
+ 0.8647633195 0.8733326197 0.8396124840
+ 0.8653923869 0.8739467263 0.8403300047
+ 0.8660213947 0.8745607734 0.8410475850
+ 0.8666505218 0.8751748800 0.8417651057
+ 0.8672795296 0.8757889867 0.8424826860
+ 0.8679085970 0.8764030933 0.8432003260
+ 0.8685376048 0.8770172000 0.8439177871
+ 0.8691666722 0.8776313066 0.8446354270
+ 0.8697956800 0.8782454133 0.8453528881
+ 0.8704248071 0.8788595200 0.8460705280
+ 0.8710538149 0.8794736266 0.8467881083
+ 0.8716828823 0.8800876737 0.8475056291
+ 0.8723050952 0.8806946278 0.8482186794
+ 0.8729252815 0.8812993169 0.8489307165
+ 0.8735455275 0.8819040060 0.8496426940
+ 0.8741655946 0.8825086951 0.8503546715
+ 0.8747857809 0.8831133842 0.8510667086
+ 0.8754060268 0.8837180734 0.8517786860
+ 0.8760262132 0.8843228817 0.8524907231
+ 0.8766463995 0.8849275708 0.8532027006
+ 0.8772665262 0.8855323195 0.8539146781
+ 0.8778867126 0.8861370087 0.8546267152
+ 0.8785068989 0.8867416978 0.8553386927
+ 0.8791267276 0.8873459101 0.8560500741
+ 0.8797398210 0.8879420161 0.8567556143
+ 0.8803529739 0.8885381818 0.8574609756
+ 0.8809661865 0.8891344070 0.8581665158
+ 0.8815793991 0.8897305727 0.8588718772
+ 0.8821926117 0.8903266788 0.8595774174
+ 0.8828057051 0.8909229040 0.8602827787
+ 0.8834189177 0.8915191293 0.8609883189
+ 0.8840320706 0.8921152949 0.8616936803
+ 0.8846452832 0.8927114010 0.8623992205
+ 0.8852584958 0.8933076262 0.8631045818
+ 0.8858715892 0.8939037919 0.8638101220
+ 0.8864827156 0.8944979906 0.8645150065
+ 0.8870841861 0.8950834274 0.8652176857
+ 0.8876857162 0.8956688046 0.8659204841
+ 0.8882871866 0.8962541223 0.8666232228
+ 0.8888887167 0.8968394995 0.8673259020
+ 0.8894901872 0.8974248767 0.8680287004
+ 0.8900917768 0.8980103135 0.8687313795
+ 0.8906933069 0.8985956907 0.8694341779
+ 0.8912947774 0.8991811275 0.8701369166
+ 0.8918963075 0.8997665048 0.8708395958
+ 0.8924977779 0.9003518224 0.8715423942
+ 0.8930993080 0.9009371996 0.8722450733
+ 0.8936997056 0.9015216231 0.8729472756
+ 0.8942915797 0.9020984173 0.8736460209
+ 0.8948835135 0.9026752114 0.8743448257
+ 0.8954755068 0.9032518864 0.8750435114
+ 0.8960673809 0.9038286805 0.8757423162
+ 0.8966593742 0.9044054747 0.8764410019
+ 0.8972513080 0.9049823284 0.8771396875
+ 0.8978431821 0.9055591226 0.8778384924
+ 0.8984351754 0.9061359167 0.8785371780
+ 0.8990271091 0.9067127109 0.8792359829
+ 0.8996191025 0.9072895050 0.8799347281
+ 0.9002109766 0.9078662992 0.8806334138
+ 0.9008030295 0.9084430933 0.8813322186
+ 0.9013879895 0.9090055823 0.8820266724
+ 0.9019721150 0.9095662236 0.8827208281
+ 0.9025561810 0.9101268053 0.8834148049
+ 0.9031403065 0.9106875062 0.8841089010
+ 0.9037243724 0.9112480879 0.8848029971
+ 0.9043084979 0.9118087292 0.8854969740
+ 0.9048926234 0.9123693109 0.8861911297
+ 0.9054766893 0.9129298925 0.8868852258
+ 0.9060608149 0.9134904742 0.8875792027
+ 0.9066448808 0.9140511155 0.8882732987
+ 0.9072290063 0.9146116972 0.8889672756
+ 0.9078130722 0.9151722789 0.8896613717
+ 0.9083930254 0.9157286882 0.8903554082
+ 0.9089676142 0.9162800908 0.8910493851
+ 0.9095423222 0.9168314934 0.8917434216
+ 0.9101169705 0.9173828959 0.8924373984
+ 0.9106916189 0.9179342985 0.8931313753
+ 0.9112663269 0.9184857011 0.8938252926
+ 0.9118409753 0.9190371037 0.8945193291
+ 0.9124156237 0.9195885062 0.8952133060
+ 0.9129902720 0.9201399088 0.8959072828
+ 0.9135649800 0.9206913114 0.8966013193
+ 0.9141396880 0.9212427139 0.8972951770
+ 0.9147142768 0.9217941165 0.8979892135
+ 0.9152889848 0.9223455191 0.8986831903
+ 0.9158567786 0.9228839278 0.8993654251
+ 0.9164233804 0.9234200716 0.9000456929
+ 0.9169899821 0.9239562154 0.9007260203
+ 0.9175565839 0.9244924188 0.9014064074
+ 0.9181231260 0.9250285029 0.9020866752
+ 0.9186897278 0.9255647063 0.9027670026
+ 0.9192563295 0.9261007905 0.9034472704
+ 0.9198228717 0.9266369939 0.9041275978
+ 0.9203894734 0.9271730781 0.9048079848
+ 0.9209560156 0.9277092814 0.9054883122
+ 0.9215226173 0.9282454252 0.9061685801
+ 0.9220892191 0.9287816286 0.9068489075
+ 0.9226552248 0.9293168783 0.9075281024
+ 0.9232082963 0.9298372269 0.9081909060
+ 0.9237614274 0.9303573966 0.9088537097
+ 0.9243146181 0.9308776855 0.9095163941
+ 0.9248676896 0.9313979745 0.9101791978
+ 0.9254208207 0.9319182038 0.9108420014
+ 0.9259738922 0.9324384928 0.9115046859
+ 0.9265270829 0.9329587817 0.9121674895
+ 0.9270802140 0.9334790111 0.9128302932
+ 0.9276332855 0.9339993000 0.9134930968
+ 0.9281864762 0.9345195889 0.9141557813
+ 0.9287396073 0.9350398779 0.9148185849
+ 0.9292926788 0.9355601072 0.9154813886
+ 0.9298455119 0.9360799193 0.9161437750
+ 0.9303920269 0.9365919232 0.9168015718
+ 0.9309384823 0.9371039271 0.9174593091
+ 0.9314851165 0.9376158118 0.9181171060
+ 0.9320315719 0.9381278157 0.9187749028
+ 0.9325782061 0.9386398196 0.9194325805
+ 0.9331247211 0.9391518235 0.9200903773
+ 0.9336711764 0.9396638274 0.9207481146
+ 0.9342178106 0.9401757717 0.9214059114
+ 0.9347643256 0.9406877756 0.9220637083
+ 0.9353107810 0.9411997199 0.9227213860
+ 0.9358574152 0.9417117238 0.9233791828
+ 0.9364038706 0.9422237277 0.9240369797
+ 0.9369503856 0.9427356720 0.9246947169
+ 0.9374883771 0.9432380795 0.9253485203
+ 0.9380251169 0.9437391758 0.9260017276
+ 0.9385617971 0.9442402720 0.9266549945
+ 0.9390985966 0.9447414279 0.9273082018
+ 0.9396352768 0.9452425241 0.9279615283
+ 0.9401720166 0.9457436204 0.9286146760
+ 0.9407088161 0.9462447166 0.9292680025
+ 0.9412454963 0.9467458129 0.9299212098
+ 0.9417821765 0.9472469091 0.9305744767
+ 0.9423189163 0.9477481246 0.9312276840
+ 0.9428557158 0.9482492208 0.9318810105
+ 0.9433923960 0.9487503171 0.9325342178
+ 0.9439290762 0.9492514133 0.9331874847
+ 0.9444622993 0.9497454166 0.9338380098
+ 0.9449920058 0.9502323866 0.9344856739
+ 0.9455215931 0.9507192969 0.9351335168
+ 0.9460512996 0.9512062073 0.9357813001
+ 0.9465808868 0.9516931772 0.9364290833
+ 0.9471105933 0.9521800876 0.9370768070
+ 0.9476401806 0.9526671171 0.9377245903
+ 0.9481698275 0.9531540275 0.9383723736
+ 0.9486994743 0.9536408782 0.9390202165
+ 0.9492291212 0.9541279078 0.9396679997
+ 0.9497588277 0.9546148181 0.9403157234
+ 0.9502884150 0.9551017880 0.9409635067
+ 0.9508181214 0.9555886984 0.9416112900
+ 0.9513477087 0.9560756087 0.9422590733
+ 0.9518715739 0.9565510750 0.9428948164
+ 0.9523950815 0.9570255280 0.9435294867
+ 0.9529185295 0.9574998021 0.9441642165
+ 0.9534419179 0.9579741955 0.9447988868
+ 0.9539653063 0.9584485888 0.9454336166
+ 0.9544886947 0.9589229822 0.9460684061
+ 0.9550120831 0.9593973756 0.9467030764
+ 0.9555354714 0.9598717093 0.9473378062
+ 0.9560589194 0.9603461027 0.9479724765
+ 0.9565823078 0.9608204961 0.9486072063
+ 0.9571056962 0.9612948895 0.9492419958
+ 0.9576292038 0.9617692828 0.9498767257
+ 0.9581525922 0.9622436166 0.9505113959
+ 0.9586743712 0.9627162218 0.9511442780
+ 0.9591860175 0.9631766081 0.9517663717
+ 0.9596974850 0.9636369944 0.9523884058
+ 0.9602090716 0.9640974998 0.9530103803
+ 0.9607207179 0.9645578861 0.9536324739
+ 0.9612321854 0.9650183916 0.9542545080
+ 0.9617437720 0.9654787779 0.9548764825
+ 0.9622554183 0.9659392238 0.9554985762
+ 0.9627668858 0.9663997293 0.9561206102
+ 0.9632784724 0.9668601155 0.9567425847
+ 0.9637901187 0.9673205018 0.9573646784
+ 0.9643015862 0.9677810073 0.9579867125
+ 0.9648131728 0.9682413936 0.9586086869
+ 0.9653248191 0.9687018991 0.9592307210
+ 0.9658346176 0.9691603184 0.9598506093
+ 0.9663344026 0.9696068764 0.9604582787
+ 0.9668341279 0.9700533748 0.9610658884
+ 0.9673337936 0.9704999924 0.9616736174
+ 0.9678335786 0.9709466100 0.9622812271
+ 0.9683333039 0.9713931084 0.9628888965
+ 0.9688330293 0.9718397260 0.9634965062
+ 0.9693328142 0.9722862840 0.9641041756
+ 0.9698324800 0.9727329016 0.9647119045
+ 0.9703322053 0.9731794000 0.9653195143
+ 0.9708318710 0.9736260176 0.9659271836
+ 0.9713317156 0.9740725756 0.9665347934
+ 0.9718313813 0.9745190740 0.9671425223
+ 0.9723311067 0.9749656916 0.9677500725
+ 0.9728308916 0.9754123092 0.9683578014
+ 0.9733167291 0.9758465290 0.9689434767
+ 0.9738017917 0.9762800932 0.9695280790
+ 0.9742867947 0.9767135978 0.9701126814
+ 0.9747719169 0.9771471024 0.9706972241
+ 0.9752569795 0.9775807261 0.9712818265
+ 0.9757419825 0.9780141711 0.9718664289
+ 0.9762271047 0.9784476757 0.9724509716
+ 0.9767121077 0.9788812995 0.9730355740
+ 0.9771971703 0.9793148041 0.9736201763
+ 0.9776821733 0.9797484279 0.9742047787
+ 0.9781672955 0.9801818728 0.9747893214
+ 0.9786522985 0.9806153774 0.9753739238
+ 0.9791374207 0.9810490012 0.9759585261
+ 0.9796224236 0.9814825058 0.9765431285
+ 0.9801008105 0.9819086790 0.9771106243
+ 0.9805731773 0.9823285937 0.9776636958
+ 0.9810456038 0.9827483892 0.9782167077
+ 0.9815180898 0.9831681848 0.9787697196
+ 0.9819905162 0.9835880995 0.9793226719
+ 0.9824628830 0.9840078950 0.9798758030
+ 0.9829354286 0.9844278097 0.9804288149
+ 0.9834077954 0.9848476052 0.9809818268
+ 0.9838802814 0.9852675200 0.9815347791
+ 0.9843527079 0.9856873155 0.9820877910
+ 0.9848250747 0.9861071706 0.9826409221
+ 0.9852976203 0.9865270257 0.9831938744
+ 0.9857699871 0.9869468212 0.9837468863
+ 0.9862424731 0.9873666763 0.9842998981
+ 0.9867148995 0.9877864718 0.9848530293
+ 0.9871708751 0.9882004857 0.9853777289
+ 0.9876251817 0.9886139035 0.9858996868
+ 0.9880794883 0.9890273213 0.9864217043
+ 0.9885339141 0.9894406796 0.9869437218
+ 0.9889882207 0.9898540974 0.9874656796
+ 0.9894425273 0.9902675152 0.9879876971
+ 0.9898968935 0.9906808734 0.9885097146
+ 0.9903512001 0.9910942912 0.9890317917
+ 0.9908055067 0.9915077090 0.9895538092
+ 0.9912598729 0.9919211268 0.9900758266
+ 0.9917141795 0.9923344851 0.9905977845
+ 0.9921684861 0.9927479029 0.9911198020
+ 0.9926229119 0.9931613207 0.9916418195
+ 0.9930772185 0.9935746789 0.9921637774
+ 0.9935299754 0.9939873219 0.9926834702
+ 0.9939612746 0.9943881035 0.9931712747
+ 0.9943926930 0.9947890043 0.9936590791
+ 0.9948239923 0.9951897860 0.9941468239
+ 0.9952552915 0.9955906868 0.9946346283
+ 0.9956867099 0.9959915280 0.9951223731
+ 0.9961180091 0.9963924289 0.9956101179
+ 0.9965493083 0.9967932105 0.9960979223
+ 0.9969807267 0.9971941113 0.9965857267
+ 0.9974120259 0.9975948930 0.9970734119
+ 0.9978433251 0.9979957938 0.9975612164
+ 0.9982746840 0.9983965755 0.9980489016
+ 0.9987059832 0.9987974763 0.9985367060
+ 0.9991372824 0.9991983175 0.9990245104
+ 0.9995687008 0.9995992184 0.9995121956
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/fujifilm_fp2900z.spi1d b/release/datafiles/colormanagement/luts/film_response/fujifilm_fp2900z.spi1d
new file mode 100644
index 00000000000..4d2caa3c6da
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/fujifilm_fp2900z.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0008503073 0.0060487022 0.0064002438
+ 0.0031247020 0.0077070072 0.0084807090
+ 0.0065889051 0.0093767531 0.0092614815
+ 0.0087466193 0.0171994604 0.0101535600
+ 0.0108801499 0.0271614902 0.0109591102
+ 0.0145162800 0.0324796699 0.0117238201
+ 0.0193788800 0.0365465991 0.0124966996
+ 0.0240556896 0.0401393399 0.0133267604
+ 0.0285850298 0.0431072004 0.0142630199
+ 0.0330653489 0.0448529907 0.0153544797
+ 0.0372812003 0.0457478799 0.0166501496
+ 0.0410104282 0.0465190299 0.0183483995
+ 0.0442945287 0.0478400812 0.0208099205
+ 0.0474888906 0.0510223396 0.0238338206
+ 0.0509595312 0.0559057482 0.0271846093
+ 0.0551288798 0.0616184585 0.0307629295
+ 0.0602344498 0.0672886521 0.0349612683
+ 0.0657841787 0.0724673122 0.0396671183
+ 0.0712287277 0.0778958723 0.0446968898
+ 0.0760187581 0.0834463537 0.0498669893
+ 0.0797053277 0.0889106467 0.0549938083
+ 0.0827539414 0.0940806195 0.0598937795
+ 0.0854174793 0.0987935290 0.0646180511
+ 0.0878179371 0.1031830981 0.0695652813
+ 0.0900772810 0.1073582023 0.0744954869
+ 0.0923174620 0.1114075035 0.0791333169
+ 0.0946604684 0.1154199019 0.0832034126
+ 0.0972282588 0.1194840968 0.0864467174
+ 0.1001427993 0.1236867979 0.0890749767
+ 0.1034547016 0.1279577017 0.0913295001
+ 0.1070737988 0.1322295070 0.0933255404
+ 0.1109554023 0.1365102977 0.0951783583
+ 0.1150562018 0.1408081055 0.0970032215
+ 0.1193327978 0.1451306939 0.0989153683
+ 0.1237417012 0.1494861990 0.1010300964
+ 0.1282396019 0.1538825035 0.1034625992
+ 0.1330090016 0.1583275944 0.1061728969
+ 0.1381776035 0.1628293991 0.1090466008
+ 0.1436399072 0.1673959941 0.1120757982
+ 0.1492906064 0.1720408946 0.1152525023
+ 0.1550242007 0.1768026054 0.1185685992
+ 0.1607352942 0.1816647947 0.1220161989
+ 0.1663185954 0.1866011024 0.1255874038
+ 0.1716686040 0.1915850043 0.1292741001
+ 0.1766799986 0.1965896934 0.1330682933
+ 0.1812472045 0.2015890032 0.1369619966
+ 0.1853772998 0.2065560967 0.1409474015
+ 0.1893154979 0.2114645988 0.1450162977
+ 0.1930917948 0.2164134979 0.1491608024
+ 0.1967224926 0.2215435952 0.1533937007
+ 0.2002238035 0.2267996967 0.1579982042
+ 0.2036122978 0.2321251035 0.1629922986
+ 0.2069043070 0.2374628037 0.1682806015
+ 0.2101161033 0.2427562028 0.1737675965
+ 0.2132640928 0.2479483038 0.1793580055
+ 0.2163646966 0.2529824078 0.1849561036
+ 0.2194342017 0.2578017116 0.1904667020
+ 0.2224891037 0.2623493075 0.1957941055
+ 0.2255457044 0.2665685117 0.2008430064
+ 0.2286203057 0.2704024017 0.2055179030
+ 0.2317294031 0.2737948895 0.2097503990
+ 0.2348892987 0.2768653929 0.2138119936
+ 0.2381162941 0.2797451913 0.2177951038
+ 0.2414056957 0.2824516892 0.2216964066
+ 0.2446805984 0.2850024104 0.2255128026
+ 0.2479368001 0.2874149084 0.2292409986
+ 0.2511793077 0.2897064984 0.2328778058
+ 0.2544130981 0.2918949127 0.2364200950
+ 0.2576431930 0.2939974070 0.2398646027
+ 0.2608745992 0.2960315943 0.2432080954
+ 0.2641122043 0.2980149090 0.2464473993
+ 0.2673611939 0.2999647856 0.2495792955
+ 0.2706263959 0.3018988967 0.2526006103
+ 0.2739129066 0.3038344979 0.2555082142
+ 0.2772257030 0.3057892025 0.2582986951
+ 0.2805697918 0.3077805042 0.2609690130
+ 0.2839502096 0.3098258972 0.2635160089
+ 0.2874231935 0.3119427860 0.2659429908
+ 0.2910543084 0.3141488135 0.2682636976
+ 0.2948203087 0.3164612055 0.2704857886
+ 0.2986972034 0.3188976943 0.2726168931
+ 0.3026610911 0.3214755952 0.2746646106
+ 0.3066878021 0.3242133856 0.2766366005
+ 0.3107534945 0.3271133900 0.2785406113
+ 0.3148340881 0.3301571906 0.2803840935
+ 0.3189055920 0.3333252966 0.2821748853
+ 0.3229441047 0.3365986049 0.2839204967
+ 0.3269253969 0.3399577141 0.2856287062
+ 0.3308256865 0.3433833122 0.2873069942
+ 0.3346208036 0.3468560874 0.2889631093
+ 0.3382869065 0.3503566980 0.2906045914
+ 0.3417999148 0.3538660109 0.2922393084
+ 0.3451356888 0.3573645949 0.2938747108
+ 0.3482705057 0.3608331978 0.2955183983
+ 0.3511801958 0.3642525077 0.2971782088
+ 0.3538407981 0.3676030934 0.2988617122
+ 0.3562282920 0.3708657920 0.3005765080
+ 0.3583298028 0.3740212917 0.3023301959
+ 0.3602797091 0.3770503104 0.3041304946
+ 0.3621290028 0.3799622953 0.3059850931
+ 0.3638837039 0.3828690052 0.3079015911
+ 0.3655497134 0.3857800961 0.3098875880
+ 0.3671329916 0.3886910081 0.3119508028
+ 0.3686397970 0.3915975094 0.3140988052
+ 0.3700759113 0.3944953084 0.3163442016
+ 0.3714475036 0.3973797858 0.3187192976
+ 0.3727603853 0.4002467990 0.3212150037
+ 0.3740208149 0.4030919075 0.3238149881
+ 0.3752345145 0.4059107900 0.3265028894
+ 0.3764077127 0.4086990058 0.3292626143
+ 0.3775463104 0.4114522040 0.3320775926
+ 0.3786563873 0.4141660929 0.3349316120
+ 0.3797439933 0.4168362021 0.3378083110
+ 0.3808149099 0.4194582105 0.3406915069
+ 0.3818753958 0.4220277965 0.3435646892
+ 0.3829312921 0.4245404899 0.3464117050
+ 0.3839887977 0.4269919991 0.3492161930
+ 0.3850536942 0.4293780029 0.3519617915
+ 0.3861320913 0.4316940010 0.3546322882
+ 0.3872300982 0.4339357018 0.3572112024
+ 0.3883534968 0.4360988140 0.3596824110
+ 0.3895084858 0.4381788075 0.3620485067
+ 0.3907010853 0.4401713908 0.3643788993
+ 0.3919371068 0.4420722127 0.3666825891
+ 0.3932228088 0.4438770115 0.3689602911
+ 0.3945640028 0.4456013143 0.3712129891
+ 0.3959667087 0.4472714067 0.3734416068
+ 0.3974370956 0.4488897026 0.3756470084
+ 0.3989810050 0.4504584968 0.3778300881
+ 0.4006046057 0.4519804120 0.3799915910
+ 0.4023137093 0.4534575939 0.3821327090
+ 0.4041146040 0.4548926055 0.3842540085
+ 0.4060753882 0.4562878013 0.3863565922
+ 0.4082339108 0.4576455057 0.3884412050
+ 0.4105701149 0.4589681923 0.3905088902
+ 0.4130640924 0.4602581859 0.3925603926
+ 0.4156959951 0.4615179896 0.3945967853
+ 0.4184457064 0.4627498090 0.3966186941
+ 0.4212931991 0.4639562070 0.3986273110
+ 0.4242187142 0.4651395082 0.4006232023
+ 0.4272021055 0.4663020968 0.4026075006
+ 0.4302234948 0.4674463868 0.4045810997
+ 0.4332629144 0.4685747921 0.4065446854
+ 0.4363003075 0.4696896076 0.4084993005
+ 0.4393157065 0.4707933962 0.4104458094
+ 0.4422892928 0.4718883038 0.4123851061
+ 0.4452010095 0.4729770124 0.4143181145
+ 0.4480308890 0.4740616977 0.4162456095
+ 0.4507589042 0.4751448035 0.4181686044
+ 0.4533652067 0.4762287140 0.4200878143
+ 0.4558297098 0.4773159027 0.4220044017
+ 0.4581323862 0.4784086943 0.4239189923
+ 0.4602535069 0.4795095026 0.4258325994
+ 0.4622519016 0.4806207120 0.4277462065
+ 0.4642114937 0.4817445874 0.4296604991
+ 0.4661338031 0.4828838110 0.4315764010
+ 0.4680199921 0.4840404987 0.4334949851
+ 0.4698711932 0.4852172136 0.4354169965
+ 0.4716886878 0.4864163101 0.4373432994
+ 0.4734737873 0.4876401126 0.4392806888
+ 0.4752275944 0.4888910949 0.4412496090
+ 0.4769513011 0.4901716113 0.4432489872
+ 0.4786463082 0.4914839864 0.4452759027
+ 0.4803135991 0.4928306937 0.4473274052
+ 0.4819546044 0.4942142069 0.4494006038
+ 0.4835703969 0.4956367016 0.4514926076
+ 0.4851622880 0.4971008003 0.4536004961
+ 0.4867314994 0.4986090064 0.4557211995
+ 0.4882791936 0.5001742244 0.4578520060
+ 0.4898067117 0.5017988086 0.4599897861
+ 0.4913150966 0.5034782290 0.4621317089
+ 0.4928056002 0.5052075982 0.4642749131
+ 0.4942795932 0.5069822073 0.4664162993
+ 0.4957382083 0.5087974072 0.4685530961
+ 0.4971826971 0.5106484294 0.4706822038
+ 0.4986141920 0.5125305057 0.4728009105
+ 0.5000339746 0.5144389868 0.4749062061
+ 0.5014433265 0.5163691044 0.4769951105
+ 0.5028433204 0.5183159709 0.4790647030
+ 0.5042353272 0.5202751756 0.4811120927
+ 0.5056204796 0.5222417116 0.4831343889
+ 0.5070000291 0.5242109895 0.4851284921
+ 0.5083752275 0.5261781812 0.4870916903
+ 0.5097472072 0.5281386971 0.4890210032
+ 0.5111172199 0.5300877094 0.4909133911
+ 0.5124865770 0.5320205092 0.4927659929
+ 0.5138564110 0.5339323282 0.4945758879
+ 0.5152279735 0.5358185172 0.4963401854
+ 0.5166025162 0.5376741886 0.4980559051
+ 0.5179811716 0.5394948125 0.4997201860
+ 0.5193653107 0.5412756205 0.5013300180
+ 0.5207560062 0.5430117249 0.5028824806
+ 0.5221545100 0.5446984768 0.5043746829
+ 0.5235620141 0.5463312864 0.5058037043
+ 0.5249798894 0.5479233265 0.5071665049
+ 0.5264092088 0.5495030880 0.5084602833
+ 0.5278512836 0.5510712266 0.5096821785
+ 0.5293071866 0.5526280999 0.5108290911
+ 0.5307784081 0.5541737080 0.5118982196
+ 0.5322659016 0.5557085276 0.5128865242
+ 0.5337721109 0.5572324991 0.5137987733
+ 0.5353026986 0.5587460995 0.5146775842
+ 0.5368571877 0.5602493286 0.5155304074
+ 0.5384340286 0.5617424846 0.5163580179
+ 0.5400314927 0.5632258058 0.5171611905
+ 0.5416480899 0.5646995902 0.5179405808
+ 0.5432822704 0.5661638975 0.5186970830
+ 0.5449323058 0.5676190257 0.5194314122
+ 0.5465967059 0.5690650940 0.5201442242
+ 0.5482738018 0.5705024004 0.5208364129
+ 0.5499621034 0.5719311833 0.5215085745
+ 0.5516598821 0.5733516812 0.5221616030
+ 0.5533655882 0.5747640133 0.5227962136
+ 0.5550776720 0.5761684775 0.5234131217
+ 0.5567945242 0.5775651932 0.5240131021
+ 0.5585144758 0.5789545178 0.5245969892
+ 0.5602360964 0.5803365111 0.5251653790
+ 0.5619575977 0.5817114711 0.5257192254
+ 0.5636774898 0.5830796957 0.5262590051
+ 0.5653942227 0.5844413042 0.5267856717
+ 0.5671060085 0.5857964754 0.5273000002
+ 0.5688114166 0.5871455073 0.5278027058
+ 0.5705088973 0.5884885788 0.5282945037
+ 0.5721967220 0.5898259282 0.5287762284
+ 0.5738732815 0.5911576748 0.5292484164
+ 0.5755370855 0.5924841762 0.5297120810
+ 0.5771865249 0.5938054919 0.5301678181
+ 0.5788199902 0.5951220989 0.5306165218
+ 0.5804358125 0.5964338779 0.5310587883
+ 0.5820325017 0.5977414250 0.5314955115
+ 0.5836083889 0.5990446210 0.5319272876
+ 0.5851619244 0.6003437042 0.5323550105
+ 0.5866914988 0.6016390920 0.5327793956
+ 0.5881955028 0.6029310226 0.5332012177
+ 0.5896723866 0.6042193770 0.5336210728
+ 0.5911204815 0.6055046916 0.5340399146
+ 0.5925382972 0.6067870855 0.5344585180
+ 0.5939241052 0.6080667973 0.5348774195
+ 0.5952764153 0.6093440056 0.5352975130
+ 0.5965934992 0.6106188893 0.5357195735
+ 0.5978739262 0.6118916869 0.5361443162
+ 0.5991160274 0.6131626964 0.5365725160
+ 0.6003181934 0.6144319773 0.5370048285
+ 0.6014788747 0.6157000065 0.5374420881
+ 0.6025965214 0.6169667244 0.5378851295
+ 0.6036692858 0.6182324886 0.5383346081
+ 0.6046959162 0.6194974780 0.5387912989
+ 0.6056745052 0.6207618713 0.5392559171
+ 0.6066036820 0.6220260262 0.5397291780
+ 0.6074817777 0.6232900023 0.5402120948
+ 0.6083071828 0.6245540977 0.5407050848
+ 0.6090785265 0.6258184910 0.5412091017
+ 0.6098169088 0.6270834804 0.5417249203
+ 0.6105371714 0.6283515096 0.5422530770
+ 0.6112400889 0.6296306252 0.5427945852
+ 0.6119259000 0.6309205890 0.5433501005
+ 0.6125950217 0.6322209239 0.5439202785
+ 0.6132478714 0.6335307956 0.5445060134
+ 0.6138849854 0.6348494887 0.5451080203
+ 0.6145066023 0.6361764073 0.5457270145
+ 0.6151131988 0.6375107765 0.5463637114
+ 0.6157053113 0.6388520002 0.5470190048
+ 0.6162831783 0.6401991844 0.5476934910
+ 0.6168472767 0.6415519118 0.5483881235
+ 0.6173980832 0.6429092288 0.5491034985
+ 0.6179360747 0.6442704797 0.5498402715
+ 0.6184614897 0.6456350088 0.5505995154
+ 0.6189749241 0.6470022202 0.5513817072
+ 0.6194766164 0.6483712792 0.5521876812
+ 0.6199671030 0.6497414708 0.5530344248
+ 0.6204468012 0.6511121988 0.5539386868
+ 0.6209161282 0.6524828076 0.5548986197
+ 0.6213753819 0.6538524032 0.5559120178
+ 0.6218250990 0.6552203894 0.5569766164
+ 0.6222656965 0.6565861106 0.5580903888
+ 0.6226975918 0.6579487920 0.5592513084
+ 0.6231212020 0.6593078971 0.5604572296
+ 0.6235368848 0.6606624722 0.5617058873
+ 0.6239451170 0.6620119810 0.5629951954
+ 0.6243463159 0.6633557081 0.5643231869
+ 0.6247407794 0.6646929979 0.5656875968
+ 0.6251292229 0.6660230160 0.5670863986
+ 0.6255117059 0.6673452258 0.5685173273
+ 0.6258888841 0.6686587930 0.5699784160
+ 0.6262611151 0.6699631214 0.5714673996
+ 0.6266288161 0.6712573767 0.5729821920
+ 0.6269922853 0.6725410223 0.5745208263
+ 0.6273521781 0.6738132238 0.5760809779
+ 0.6277086735 0.6750733852 0.5776606202
+ 0.6280624270 0.6763207912 0.5792576075
+ 0.6284136772 0.6775547266 0.5808697939
+ 0.6287629008 0.6787744164 0.5824952126
+ 0.6291105151 0.6799793243 0.5841314793
+ 0.6294568777 0.6811686158 0.5857766271
+ 0.6298025250 0.6823415756 0.5874286294
+ 0.6301478148 0.6834977269 0.5890851021
+ 0.6304932237 0.6846361160 0.5907440782
+ 0.6308389902 0.6857560873 0.5924034715
+ 0.6311857104 0.6868569851 0.5940610766
+ 0.6315336823 0.6879382133 0.5957149267
+ 0.6318835020 0.6889989972 0.5973626971
+ 0.6322354078 0.6900386214 0.5990023017
+ 0.6325898767 0.6910563111 0.6006317139
+ 0.6329473853 0.6920514703 0.6022487283
+ 0.6333082914 0.6930233836 0.6038513184
+ 0.6336730123 0.6939712763 0.6054372191
+ 0.6340420246 0.6948946714 0.6070044041
+ 0.6344156265 0.6957926154 0.6085507870
+ 0.6347942948 0.6966645122 0.6100741029
+ 0.6351785064 0.6975097060 0.6115723848
+ 0.6355686188 0.6983274817 0.6130434275
+ 0.6359649897 0.6991170049 0.6144850850
+ 0.6363682151 0.6998777986 0.6158952713
+ 0.6367785931 0.7006090283 0.6172720194
+ 0.6371966004 0.7013099790 0.6186128855
+ 0.6376225948 0.7019799948 0.6199159026
+ 0.6380569935 0.7026184201 0.6211791039
+ 0.6385002136 0.7032272816 0.6224001050
+ 0.6389526725 0.7038217783 0.6235768795
+ 0.6394149065 0.7044044733 0.6247074008
+ 0.6398872137 0.7049757838 0.6257894039
+ 0.6403700113 0.7055358291 0.6268209219
+ 0.6408637762 0.7060847282 0.6277996898
+ 0.6413689256 0.7066227794 0.6287239790
+ 0.6418856978 0.7071502209 0.6296194792
+ 0.6424148083 0.7076671720 0.6305025220
+ 0.6429564953 0.7081741095 0.6313732862
+ 0.6435111761 0.7086709738 0.6322320104
+ 0.6440793276 0.7091581821 0.6330789924
+ 0.6446613073 0.7096359134 0.6339144111
+ 0.6452575922 0.7101042867 0.6347385049
+ 0.6458685994 0.7105637193 0.6355515718
+ 0.6464946866 0.7110142112 0.6363537908
+ 0.6471362710 0.7114561200 0.6371454000
+ 0.6477938890 0.7118896246 0.6379265785
+ 0.6484678984 0.7123149037 0.6386976838
+ 0.6491587162 0.7127323151 0.6394590139
+ 0.6498693228 0.7131419778 0.6402105093
+ 0.6506212950 0.7135441899 0.6409527063
+ 0.6514183879 0.7139390707 0.6416856050
+ 0.6522591114 0.7143269181 0.6424096227
+ 0.6531423926 0.7147079110 0.6431248784
+ 0.6540668011 0.7150822878 0.6438316703
+ 0.6550312042 0.7154504061 0.6445302963
+ 0.6560341716 0.7158122063 0.6452208161
+ 0.6570745707 0.7161681056 0.6459035873
+ 0.6581510901 0.7165182829 0.6465789080
+ 0.6592624187 0.7168630958 0.6472467780
+ 0.6604073048 0.7172024846 0.6479076743
+ 0.6615846157 0.7175369263 0.6485617161
+ 0.6627929211 0.7178664804 0.6492090821
+ 0.6640309095 0.7181913853 0.6498501897
+ 0.6652973890 0.7185119987 0.6504852176
+ 0.6665912271 0.7188284993 0.6511142254
+ 0.6679108739 0.7191410065 0.6517375708
+ 0.6692553163 0.7194498181 0.6523556113
+ 0.6706231833 0.7197551131 0.6529684067
+ 0.6720132232 0.7200570703 0.6535763144
+ 0.6734240055 0.7203561068 0.6541793942
+ 0.6748545170 0.7206522822 0.6547781229
+ 0.6763033271 0.7209458947 0.6553725004
+ 0.6777691841 0.7212371230 0.6559628844
+ 0.6792508960 0.7215262055 0.6565495729
+ 0.6807470918 0.7218133807 0.6571326852
+ 0.6822565198 0.7220988274 0.6577125192
+ 0.6837779880 0.7223827839 0.6582891941
+ 0.6853101850 0.7226654887 0.6588631272
+ 0.6868517995 0.7229471207 0.6594343781
+ 0.6884016991 0.7232279778 0.6600034237
+ 0.6899583936 0.7235082984 0.6605702043
+ 0.6915208101 0.7237882018 0.6611351967
+ 0.6930875182 0.7240679264 0.6616984010
+ 0.6946573853 0.7243477702 0.6622602940
+ 0.6962291002 0.7246279120 0.6628209949
+ 0.6978012919 0.7249085903 0.6633808017
+ 0.6993728876 0.7251899838 0.6639397740
+ 0.7009423971 0.7254723907 0.6644983888
+ 0.7025088072 0.7257559896 0.6650567055
+ 0.7040706277 0.7260410190 0.6656150222
+ 0.7056266069 0.7263275981 0.6661735773
+ 0.7071756124 0.7266160846 0.6667326093
+ 0.7087162733 0.7269067168 0.6672922969
+ 0.7102472782 0.7271996140 0.6678529978
+ 0.7117674947 0.7274950743 0.6684147716
+ 0.7132756114 0.7277932763 0.6689779758
+ 0.7147703171 0.7280943990 0.6695429087
+ 0.7162501812 0.7283987999 0.6701096892
+ 0.7177143097 0.7287065983 0.6706784964
+ 0.7191610932 0.7290180922 0.6712498069
+ 0.7205895185 0.7293334007 0.6718236208
+ 0.7219980955 0.7296528220 0.6724001765
+ 0.7233856916 0.7299764752 0.6729798913
+ 0.7247509956 0.7303047776 0.6735628843
+ 0.7260926962 0.7306377888 0.6741493940
+ 0.7274097204 0.7309758067 0.6747397184
+ 0.7287005186 0.7313190103 0.6753339767
+ 0.7299638987 0.7316675782 0.6759325266
+ 0.7311987281 0.7320219278 0.6765354276
+ 0.7324035764 0.7323821187 0.6771430969
+ 0.7335773706 0.7327483892 0.6777557731
+ 0.7347186208 0.7331209779 0.6783735752
+ 0.7358261943 0.7335001230 0.6789968014
+ 0.7368987799 0.7338860035 0.6796255708
+ 0.7379351258 0.7342789173 0.6802604198
+ 0.7389339209 0.7346789837 0.6809012294
+ 0.7398939133 0.7350866199 0.6815484166
+ 0.7408269048 0.7355018258 0.6821988821
+ 0.7417528033 0.7359247804 0.6828476787
+ 0.7426717877 0.7363560200 0.6834948063
+ 0.7435839772 0.7367956042 0.6841400862
+ 0.7444893718 0.7372435927 0.6847838163
+ 0.7453880906 0.7377005219 0.6854259968
+ 0.7462803125 0.7381662726 0.6860665083
+ 0.7471659184 0.7386413813 0.6867055893
+ 0.7480450869 0.7391259074 0.6873431802
+ 0.7489178777 0.7396200895 0.6879792809
+ 0.7497844100 0.7401241064 0.6886140704
+ 0.7506446242 0.7406383157 0.6892474890
+ 0.7514986992 0.7411627769 0.6898795962
+ 0.7523466945 0.7416979074 0.6905105114
+ 0.7531886101 0.7422437072 0.6911401153
+ 0.7540246844 0.7428004742 0.6917685866
+ 0.7548547983 0.7433686256 0.6923959255
+ 0.7556790709 0.7439481020 0.6930220723
+ 0.7564978004 0.7445440292 0.6936473250
+ 0.7573106885 0.7451735139 0.6942713857
+ 0.7581180930 0.7458376884 0.6948946118
+ 0.7589198947 0.7465357184 0.6955168843
+ 0.7597163916 0.7472668290 0.6961382031
+ 0.7605074048 0.7480301857 0.6967588067
+ 0.7612931728 0.7488250732 0.6973785162
+ 0.7620736957 0.7496505976 0.6979975104
+ 0.7628490925 0.7505061030 0.6986157894
+ 0.7636194229 0.7513905764 0.6992332935
+ 0.7643846869 0.7523034215 0.6998503208
+ 0.7651450038 0.7532438040 0.7004666924
+ 0.7659006119 0.7542108297 0.7010825276
+ 0.7666512728 0.7552037239 0.7016978264
+ 0.7673972845 0.7562217712 0.7023125887
+ 0.7681385875 0.7572641969 0.7029271126
+ 0.7688754201 0.7583301067 0.7035411000
+ 0.7696077228 0.7594187260 0.7041547894
+ 0.7703356147 0.7605292797 0.7047681808
+ 0.7710590959 0.7616609931 0.7053813934
+ 0.7717784047 0.7628129721 0.7059943080
+ 0.7724934220 0.7639846206 0.7066071033
+ 0.7732043266 0.7651749253 0.7072197199
+ 0.7739111781 0.7663831711 0.7078322768
+ 0.7746139765 0.7676087022 0.7084447742
+ 0.7753129005 0.7688505054 0.7090572715
+ 0.7760080099 0.7701079249 0.7096698880
+ 0.7766993046 0.7713800073 0.7102825046
+ 0.7773869038 0.7726660967 0.7108952999
+ 0.7780709267 0.7739654779 0.7115082145
+ 0.7787513733 0.7752770782 0.7121213078
+ 0.7794283032 0.7766004205 0.7127346992
+ 0.7801018953 0.7779344916 0.7133483887
+ 0.7807720900 0.7792785764 0.7139623761
+ 0.7814390063 0.7806318998 0.7145767808
+ 0.7821028233 0.7819936275 0.7151916027
+ 0.7827634215 0.7833629251 0.7158069015
+ 0.7834209800 0.7847390175 0.7164226174
+ 0.7840756178 0.7861210704 0.7170389891
+ 0.7847272754 0.7875084877 0.7176558971
+ 0.7853761911 0.7889003158 0.7182734013
+ 0.7860223055 0.7902957201 0.7188916206
+ 0.7866656780 0.7916939855 0.7195104957
+ 0.7873066068 0.7930942774 0.7201302052
+ 0.7879447937 0.7944958806 0.7207505703
+ 0.7885807157 0.7958979011 0.7213718891
+ 0.7892140746 0.7972996235 0.7219941020
+ 0.7898452282 0.7987000942 0.7226172090
+ 0.7904739976 0.8000987172 0.7232413292
+ 0.7911006808 0.8014945984 0.7238664031
+ 0.7917252779 0.8028869033 0.7244924903
+ 0.7923477888 0.8042749166 0.7251197100
+ 0.7929683924 0.8056578040 0.7257481217
+ 0.7935870886 0.8070347905 0.7263776064
+ 0.7942039967 0.8084051013 0.7270082831
+ 0.7948191166 0.8097679019 0.7276402712
+ 0.7954326272 0.8111224174 0.7282735705
+ 0.7960445285 0.8124678135 0.7289083004
+ 0.7966548204 0.8138033152 0.7295442820
+ 0.7972636819 0.8151280880 0.7301818132
+ 0.7978711724 0.8164414167 0.7308207154
+ 0.7984774113 0.8177425265 0.7314611077
+ 0.7990823984 0.8190305233 0.7321031094
+ 0.7996861935 0.8203045726 0.7327467203
+ 0.8002889752 0.8215640187 0.7333918810
+ 0.8008906841 0.8228080273 0.7340387702
+ 0.8014913797 0.8240358233 0.7346873879
+ 0.8020913005 0.8252465129 0.7353377938
+ 0.8026903868 0.8264393210 0.7359899879
+ 0.8032888174 0.8276134729 0.7366440296
+ 0.8038864732 0.8287683129 0.7372999787
+ 0.8044837117 0.8299028277 0.7379577756
+ 0.8050802946 0.8310164213 0.7386177182
+ 0.8056765199 0.8321080804 0.7392795086
+ 0.8062723279 0.8331770897 0.7399433851
+ 0.8068677783 0.8342227936 0.7406094074
+ 0.8074631095 0.8352441788 0.7412775755
+ 0.8080583215 0.8362407088 0.7419478893
+ 0.8086534142 0.8372113109 0.7426204085
+ 0.8092485070 0.8381553888 0.7432953119
+ 0.8098437190 0.8390719891 0.7439724207
+ 0.8104389906 0.8399605155 0.7446519136
+ 0.8110345006 0.8408200145 0.7453336716
+ 0.8116303086 0.8416497111 0.7460181117
+ 0.8122264743 0.8424487710 0.7467048168
+ 0.8128219247 0.8432167172 0.7473942041
+ 0.8134155869 0.8439698815 0.7480859756
+ 0.8140075803 0.8447198272 0.7487804890
+ 0.8145980835 0.8454664946 0.7494776249
+ 0.8151867986 0.8462098837 0.7501773834
+ 0.8157740235 0.8469501138 0.7508800030
+ 0.8163595200 0.8476870060 0.7515853047
+ 0.8169434071 0.8484206796 0.7522934079
+ 0.8175256848 0.8491510749 0.7530043721
+ 0.8181064725 0.8498781919 0.7537181973
+ 0.8186855912 0.8506020904 0.7544351220
+ 0.8192632198 0.8513227105 0.7551549077
+ 0.8198392987 0.8520401120 0.7558776736
+ 0.8204138279 0.8527541161 0.7566035986
+ 0.8209868073 0.8534649014 0.7573326230
+ 0.8215582967 0.8541724086 0.7580646873
+ 0.8221281767 0.8548766971 0.7588000894
+ 0.8226966858 0.8555775881 0.7595385909
+ 0.8232637048 0.8562753201 0.7602804899
+ 0.8238291740 0.8569697142 0.7610256076
+ 0.8243932724 0.8576607704 0.7617741823
+ 0.8249558806 0.8583486080 0.7625260949
+ 0.8255169988 0.8590331078 0.7632815242
+ 0.8260768056 0.8597143292 0.7640402913
+ 0.8266351223 0.8603922129 0.7648026943
+ 0.8271920085 0.8610668182 0.7655686736
+ 0.8277475238 0.8617380857 0.7663382292
+ 0.8283016086 0.8624060750 0.7671114802
+ 0.8288543820 0.8630707860 0.7678884268
+ 0.8294057846 0.8637322187 0.7686690092
+ 0.8299558163 0.8643901944 0.7694535255
+ 0.8305044770 0.8650450110 0.7702416778
+ 0.8310518861 0.8656963706 0.7710338831
+ 0.8315979838 0.8663445115 0.7718299031
+ 0.8321427107 0.8669893146 0.7726336718
+ 0.8326861858 0.8676307797 0.7734528184
+ 0.8332284093 0.8682689071 0.7742872238
+ 0.8337693214 0.8689036965 0.7751364708
+ 0.8343089223 0.8695350885 0.7760004997
+ 0.8348472714 0.8701633215 0.7768787146
+ 0.8353844285 0.8707880974 0.7777708173
+ 0.8359202743 0.8714094758 0.7786765099
+ 0.8364549875 0.8720275760 0.7795954943
+ 0.8369885087 0.8726423979 0.7805274129
+ 0.8375207782 0.8732538223 0.7814719081
+ 0.8380519152 0.8738619089 0.7824286222
+ 0.8385819197 0.8744665980 0.7833971977
+ 0.8391106129 0.8750680089 0.7843773961
+ 0.8396382928 0.8756660223 0.7853689194
+ 0.8401647210 0.8762605786 0.7863711715
+ 0.8406900764 0.8768519163 0.7873840928
+ 0.8412142992 0.8774397969 0.7884072065
+ 0.8417373896 0.8780243993 0.7894402146
+ 0.8422595263 0.8786056042 0.7904826999
+ 0.8427804112 0.8791834116 0.7915344834
+ 0.8433002830 0.8797578216 0.7925950885
+ 0.8438190818 0.8803288937 0.7936642766
+ 0.8443368077 0.8808965087 0.7947415709
+ 0.8448535800 0.8814607859 0.7958269119
+ 0.8453692198 0.8820217848 0.7969195843
+ 0.8458839059 0.8825793266 0.7980195880
+ 0.8463975787 0.8831334114 0.7991263866
+ 0.8469101787 0.8836842179 0.8002396822
+ 0.8474218845 0.8842315078 0.8013591766
+ 0.8479325771 0.8847755194 0.8024845123
+ 0.8484423161 0.8853160739 0.8036152720
+ 0.8489511013 0.8858531713 0.8047512770
+ 0.8494588733 0.8863869905 0.8058922291
+ 0.8499658704 0.8869172931 0.8070374727
+ 0.8504719138 0.8874443173 0.8081870079
+ 0.8509768844 0.8879678249 0.8093402982
+ 0.8514810801 0.8884878755 0.8104971051
+ 0.8519843817 0.8890047073 0.8116570711
+ 0.8524867892 0.8895179033 0.8128197789
+ 0.8529884219 0.8900278211 0.8139849901
+ 0.8534891009 0.8905342817 0.8151524067
+ 0.8539890051 0.8910372853 0.8163216114
+ 0.8544880152 0.8915368915 0.8174921870
+ 0.8549861908 0.8920329809 0.8186638951
+ 0.8554837108 0.8925257921 0.8198364973
+ 0.8559802771 0.8930150867 0.8210095167
+ 0.8564761281 0.8935009241 0.8221825957
+ 0.8569710851 0.8939834237 0.8233553767
+ 0.8574653864 0.8944622874 0.8245278001
+ 0.8579589725 0.8949378729 0.8256992102
+ 0.8584517241 0.8954100013 0.8268694282
+ 0.8589438200 0.8958786130 0.8280379772
+ 0.8594350815 0.8963438272 0.8292046785
+ 0.8599258065 0.8968055248 0.8303691745
+ 0.8604156971 0.8972638249 0.8315311074
+ 0.8609049916 0.8977186084 0.8326901197
+ 0.8613935113 0.8981699944 0.8338457942
+ 0.8618813753 0.8986179233 0.8349978924
+ 0.8623687029 0.8990622759 0.8361461163
+ 0.8628553152 0.8995032907 0.8372901082
+ 0.8633412719 0.8999407887 0.8384293914
+ 0.8638265729 0.9003748298 0.8395637870
+ 0.8643113971 0.9008052945 0.8406928778
+ 0.8647955060 0.9012324214 0.8418164253
+ 0.8652790785 0.9016559720 0.8429340124
+ 0.8657621145 0.9020761251 0.8440452218
+ 0.8662444949 0.9024927020 0.8451498747
+ 0.8667263985 0.9029058218 0.8462476134
+ 0.8672077060 0.9033154845 0.8473380208
+ 0.8676884770 0.9037215710 0.8484206796
+ 0.8681687713 0.9041243196 0.8494954705
+ 0.8686485291 0.9045233727 0.8505619764
+ 0.8691278100 0.9049190879 0.8516197801
+ 0.8696066141 0.9053112268 0.8526687026
+ 0.8700848818 0.9056999087 0.8537082076
+ 0.8705626726 0.9060850143 0.8547381163
+ 0.8710401058 0.9064666033 0.8557580113
+ 0.8715170026 0.9068447948 0.8567674756
+ 0.8719936013 0.9072194099 0.8577663898
+ 0.8724696040 0.9075905085 0.8587542772
+ 0.8729453087 0.9079579711 0.8597307801
+ 0.8734205961 0.9083220959 0.8606957197
+ 0.8738955259 0.9086825848 0.8616485000
+ 0.8743699789 0.9090396166 0.8625890017
+ 0.8748440742 0.9093930721 0.8635169268
+ 0.8753178716 0.9097430110 0.8644316196
+ 0.8757913709 0.9100893736 0.8653330803
+ 0.8762645125 0.9104322791 0.8662207723
+ 0.8767372966 0.9107716084 0.8670945168
+ 0.8772097826 0.9111074209 0.8679537773
+ 0.8776819706 0.9114395976 0.8687983751
+ 0.8781539202 0.9117683172 0.8696280122
+ 0.8786255121 0.9120935202 0.8704422116
+ 0.8790968060 0.9124150872 0.8712406158
+ 0.8795679212 0.9127336144 0.8720229864
+ 0.8800387979 0.9130501151 0.8727890253
+ 0.8805093765 0.9133645296 0.8735383153
+ 0.8809797764 0.9136769176 0.8742704988
+ 0.8814499974 0.9139872789 0.8749852777
+ 0.8819199800 0.9142956734 0.8756824136
+ 0.8823897839 0.9146021008 0.8763614297
+ 0.8828594089 0.9149065018 0.8770220280
+ 0.8833289146 0.9152089953 0.8776637912
+ 0.8837981820 0.9155095220 0.8782864809
+ 0.8842672706 0.9158080816 0.8788897991
+ 0.8847364187 0.9161047935 0.8794733882
+ 0.8852053285 0.9163995981 0.8800367713
+ 0.8856741190 0.9166926146 0.8805798292
+ 0.8861427903 0.9169837236 0.8811022043
+ 0.8866114020 0.9172729254 0.8816139102
+ 0.8870798945 0.9175602794 0.8821213841
+ 0.8875483871 0.9178459048 0.8826246262
+ 0.8880168200 0.9181296825 0.8831235766
+ 0.8884850740 0.9184116721 0.8836184740
+ 0.8889533877 0.9186918736 0.8841090798
+ 0.8894217014 0.9189704061 0.8845956922
+ 0.8898900151 0.9192472100 0.8850781918
+ 0.8903583288 0.9195222259 0.8855566978
+ 0.8908265829 0.9197955132 0.8860313296
+ 0.8912950158 0.9200671911 0.8865017891
+ 0.8917633295 0.9203370810 0.8869684935
+ 0.8922317028 0.9206054211 0.8874313235
+ 0.8927001953 0.9208720922 0.8878902197
+ 0.8931686878 0.9211370945 0.8883454204
+ 0.8936372995 0.9214004874 0.8887968063
+ 0.8941059709 0.9216622710 0.8892444968
+ 0.8945748210 0.9219225049 0.8896884918
+ 0.8950436711 0.9221811891 0.8901289105
+ 0.8955127001 0.9224383235 0.8905656934
+ 0.8959817886 0.9226939082 0.8909990191
+ 0.8964511156 0.9229478836 0.8914287090
+ 0.8969206214 0.9232004881 0.8918548822
+ 0.8973901868 0.9234514832 0.8922777176
+ 0.8978599906 0.9237011075 0.8926969767
+ 0.8983299732 0.9239491820 0.8931130171
+ 0.8988000751 0.9241958857 0.8935257196
+ 0.8992708921 0.9244412184 0.8939350843
+ 0.8997430205 0.9246850014 0.8943411708
+ 0.9002165794 0.9249274731 0.8947440982
+ 0.9006915092 0.9251685143 0.8951439261
+ 0.9011679292 0.9254081845 0.8955404758
+ 0.9016454816 0.9256466031 0.8959339857
+ 0.9021244049 0.9258835912 0.8963243961
+ 0.9026045203 0.9261192083 0.8967118263
+ 0.9030858278 0.9263535738 0.8970962763
+ 0.9035682082 0.9265866876 0.8974778056
+ 0.9040517807 0.9268184900 0.8978564143
+ 0.9045363069 0.9270491004 0.8982321024
+ 0.9050219059 0.9272783995 0.8986049891
+ 0.9055085182 0.9275065064 0.8989750743
+ 0.9059960246 0.9277334213 0.8993424177
+ 0.9064844251 0.9279590845 0.8997070789
+ 0.9069736004 0.9281836152 0.9000691175
+ 0.9074636102 0.9284068942 0.9004284143
+ 0.9079543948 0.9286291003 0.9007850885
+ 0.9084458947 0.9288501143 0.9011393189
+ 0.9089381099 0.9290701151 0.9014909267
+ 0.9094309211 0.9292889237 0.9018400908
+ 0.9099243283 0.9295065999 0.9021868110
+ 0.9104182720 0.9297233224 0.9025312066
+ 0.9109126925 0.9299389124 0.9028730989
+ 0.9114075899 0.9301534891 0.9032127857
+ 0.9119029045 0.9303669930 0.9035500884
+ 0.9123986959 0.9305794835 0.9038851857
+ 0.9128947258 0.9307910800 0.9042180777
+ 0.9133909941 0.9310016036 0.9045488238
+ 0.9138876200 0.9312111735 0.9048773050
+ 0.9143844247 0.9314197898 0.9052038193
+ 0.9148814082 0.9316275120 0.9055281878
+ 0.9153785110 0.9318342805 0.9058505893
+ 0.9158756733 0.9320402145 0.9061710238
+ 0.9163728952 0.9322451949 0.9064894915
+ 0.9168701172 0.9324492812 0.9068061113
+ 0.9173672795 0.9326525927 0.9071208239
+ 0.9178643823 0.9328550100 0.9074336886
+ 0.9183613062 0.9330565929 0.9077448249
+ 0.9188581109 0.9332574010 0.9080541134
+ 0.9193546772 0.9334573746 0.9083616734
+ 0.9198510051 0.9336565733 0.9086676836
+ 0.9203469753 0.9338549972 0.9089720249
+ 0.9208427072 0.9340527058 0.9092746973
+ 0.9213380218 0.9342496991 0.9095758796
+ 0.9218327999 0.9344459176 0.9098755717
+ 0.9223272204 0.9346414804 0.9101737142
+ 0.9228211045 0.9348363280 0.9104704857
+ 0.9233145118 0.9350305200 0.9107658267
+ 0.9238072038 0.9352239966 0.9110596776
+ 0.9242992997 0.9354168773 0.9113523960
+ 0.9247906804 0.9356092215 0.9116436839
+ 0.9252815247 0.9358007908 0.9119337797
+ 0.9257714152 0.9359918833 0.9122226834
+ 0.9262604713 0.9361823797 0.9125103951
+ 0.9267488122 0.9363722801 0.9127969742
+ 0.9272361994 0.9365615845 0.9130824804
+ 0.9277226925 0.9367504716 0.9133669734
+ 0.9282081723 0.9369388223 0.9136503935
+ 0.9286926985 0.9371265769 0.9139328003
+ 0.9291760921 0.9373139143 0.9142143130
+ 0.9296584129 0.9375007749 0.9144948721
+ 0.9301396012 0.9376872182 0.9147745967
+ 0.9306195974 0.9378731251 0.9150534868
+ 0.9310984015 0.9380586743 0.9153317213
+ 0.9315758944 0.9382438064 0.9156090021
+ 0.9320520163 0.9384285212 0.9158856869
+ 0.9325268865 0.9386128783 0.9161617160
+ 0.9330003262 0.9387968779 0.9164370894
+ 0.9334722757 0.9389805198 0.9167118073
+ 0.9339427948 0.9391639233 0.9169859886
+ 0.9344118237 0.9393469095 0.9172596931
+ 0.9348791838 0.9395294785 0.9175329804
+ 0.9353449941 0.9397119880 0.9178056717
+ 0.9358091950 0.9398940802 0.9180781245
+ 0.9362716079 0.9400759935 0.9183501005
+ 0.9367324114 0.9402576089 0.9186217785
+ 0.9371913075 0.9404391050 0.9188932180
+ 0.9376484752 0.9406203032 0.9191644192
+ 0.9381036758 0.9408013225 0.9194353223
+ 0.9385570884 0.9409821033 0.9197061062
+ 0.9390084743 0.9411628246 0.9199767709
+ 0.9394578934 0.9413434267 0.9202473164
+ 0.9399052858 0.9415237904 0.9205178022
+ 0.9403507113 0.9417039752 0.9207882881
+ 0.9407938719 0.9418842196 0.9210587740
+ 0.9412348866 0.9420642853 0.9213293791
+ 0.9416738153 0.9422444105 0.9216001034
+ 0.9421104193 0.9424244165 0.9218708873
+ 0.9425446987 0.9426043034 0.9221419096
+ 0.9429767132 0.9427841902 0.9224131107
+ 0.9434064031 0.9429640770 0.9226844907
+ 0.9438335896 0.9431440234 0.9229562879
+ 0.9442583919 0.9433240294 0.9232283831
+ 0.9446805716 0.9435039759 0.9235007763
+ 0.9451004267 0.9436839819 0.9237737060
+ 0.9455174804 0.9438641071 0.9240469933
+ 0.9459319711 0.9440442920 0.9243208170
+ 0.9463438988 0.9442245960 0.9245951176
+ 0.9467530251 0.9444050193 0.9248698950
+ 0.9471595287 0.9445855021 0.9251453876
+ 0.9475631118 0.9447662234 0.9254214764
+ 0.9479637742 0.9449470043 0.9256982803
+ 0.9483616948 0.9451280832 0.9259757996
+ 0.9487566948 0.9453092813 0.9262540936
+ 0.9491487741 0.9454907179 0.9265332222
+ 0.9495378137 0.9456723928 0.9268131256
+ 0.9499238133 0.9458541870 0.9270938039
+ 0.9503065944 0.9460363984 0.9273754954
+ 0.9506863952 0.9462187886 0.9276580811
+ 0.9510629773 0.9464014769 0.9279416800
+ 0.9514362812 0.9465845227 0.9282262921
+ 0.9518064857 0.9467678070 0.9285119772
+ 0.9521732926 0.9469515085 0.9287987947
+ 0.9525367022 0.9471355081 0.9290868044
+ 0.9528967738 0.9473198056 0.9293758869
+ 0.9532535076 0.9475045204 0.9296662211
+ 0.9536067247 0.9476897120 0.9299578071
+ 0.9539564252 0.9478752017 0.9302507043
+ 0.9543024898 0.9480612278 0.9305449128
+ 0.9546449780 0.9482476115 0.9308404922
+ 0.9549838901 0.9484344125 0.9311375022
+ 0.9553192258 0.9486218095 0.9314358830
+ 0.9556506872 0.9488096237 0.9317358136
+ 0.9559783936 0.9489979148 0.9320372939
+ 0.9563022852 0.9491868019 0.9323403239
+ 0.9566224217 0.9493761063 0.9326449037
+ 0.9569386244 0.9495660067 0.9329512119
+ 0.9572507739 0.9497565031 0.9332591891
+ 0.9575591087 0.9499475956 0.9335687757
+ 0.9578633904 0.9501392245 0.9338802099
+ 0.9581636190 0.9503315091 0.9341934919
+ 0.9584596753 0.9505243897 0.9345085025
+ 0.9587516189 0.9507179260 0.9348254204
+ 0.9590393901 0.9509121180 0.9351443052
+ 0.9593229294 0.9511070251 0.9354649782
+ 0.9596030712 0.9513025284 0.9357873797
+ 0.9598832726 0.9514988065 0.9361097813
+ 0.9601637125 0.9516956806 0.9364321828
+ 0.9604443908 0.9518933892 0.9367544055
+ 0.9607254267 0.9520918727 0.9370766282
+ 0.9610065818 0.9522910714 0.9373986721
+ 0.9612880945 0.9524911046 0.9377207160
+ 0.9615697265 0.9526919127 0.9380425811
+ 0.9618514776 0.9528934956 0.9383645058
+ 0.9621335864 0.9530959129 0.9386863112
+ 0.9624156952 0.9532992244 0.9390078783
+ 0.9626979828 0.9535033107 0.9393295050
+ 0.9629803896 0.9537082911 0.9396510720
+ 0.9632629752 0.9539142251 0.9399725199
+ 0.9635456204 0.9541209936 0.9402939081
+ 0.9638283253 0.9543287158 0.9406151175
+ 0.9641110897 0.9545372725 0.9409363270
+ 0.9643939137 0.9547469020 0.9412574172
+ 0.9646766782 0.9549574852 0.9415785074
+ 0.9649596214 0.9551690221 0.9418994188
+ 0.9652423859 0.9553815126 0.9422202706
+ 0.9655252099 0.9555950761 0.9425410032
+ 0.9658079743 0.9558095932 0.9428616762
+ 0.9660906792 0.9560251832 0.9431822896
+ 0.9663733840 0.9562419057 0.9435027838
+ 0.9666560292 0.9564597011 0.9438232780
+ 0.9669383764 0.9566785097 0.9441435933
+ 0.9672207832 0.9568983912 0.9444639087
+ 0.9675030112 0.9571195245 0.9447841048
+ 0.9677850008 0.9573416710 0.9451041818
+ 0.9680668712 0.9575650096 0.9454241991
+ 0.9683486223 0.9577894807 0.9457440972
+ 0.9686300755 0.9580152035 0.9460639954
+ 0.9689114094 0.9582421184 0.9463837147
+ 0.9691925049 0.9584702253 0.9467033744
+ 0.9694733024 0.9586989880 0.9470229745
+ 0.9697538018 0.9589279294 0.9473425150
+ 0.9700341225 0.9591571093 0.9476618767
+ 0.9703140259 0.9593864083 0.9479812980
+ 0.9705935717 0.9596158862 0.9483004808
+ 0.9708729982 0.9598456025 0.9486197233
+ 0.9711518884 0.9600754976 0.9489387274
+ 0.9714304805 0.9603055716 0.9492576718
+ 0.9717087150 0.9605358243 0.9495766163
+ 0.9719864726 0.9607661963 0.9498953819
+ 0.9722638726 0.9609969258 0.9502142072
+ 0.9725409150 0.9612277150 0.9505327940
+ 0.9728174210 0.9614586830 0.9508513808
+ 0.9730935097 0.9616897702 0.9511697888
+ 0.9733691216 0.9619212151 0.9514881968
+ 0.9736441970 0.9621527195 0.9518064857
+ 0.9739187956 0.9623845220 0.9521247149
+ 0.9741927981 0.9626163840 0.9524428248
+ 0.9744663835 0.9628484249 0.9527608752
+ 0.9747393131 0.9630807042 0.9530788064
+ 0.9750117064 0.9633131027 0.9533966780
+ 0.9752835035 0.9635457993 0.9537143707
+ 0.9755547047 0.9637786150 0.9540321231
+ 0.9758251905 0.9640114903 0.9543496966
+ 0.9760950804 0.9642447233 0.9546672106
+ 0.9763643742 0.9644780159 0.9549846053
+ 0.9766330123 0.9647116065 0.9553018808
+ 0.9769008756 0.9649453163 0.9556190968
+ 0.9771680832 0.9651790857 0.9559363127
+ 0.9774345160 0.9654132128 0.9562532902
+ 0.9777001739 0.9656473994 0.9565703273
+ 0.9779651761 0.9658818245 0.9568871856
+ 0.9782294035 0.9661164284 0.9572039843
+ 0.9784927964 0.9663510919 0.9575207233
+ 0.9787554145 0.9665859938 0.9578372836
+ 0.9790171981 0.9668210745 0.9581537843
+ 0.9792782068 0.9670563936 0.9584702253
+ 0.9795383215 0.9672918916 0.9587864876
+ 0.9797974825 0.9675275087 0.9591028094
+ 0.9800559282 0.9677633047 0.9594188929
+ 0.9803133011 0.9679992199 0.9597349763
+ 0.9805697799 0.9682353735 0.9600510001
+ 0.9808254242 0.9684717059 0.9603667855
+ 0.9810799956 0.9687082171 0.9606825709
+ 0.9813336730 0.9689447880 0.9609982967
+ 0.9815863967 0.9691815972 0.9613139033
+ 0.9818381071 0.9694185853 0.9616295099
+ 0.9820888042 0.9696558118 0.9619448781
+ 0.9823384285 0.9698930979 0.9622601867
+ 0.9825869799 0.9701306224 0.9625753760
+ 0.9828345180 0.9703683257 0.9628906250
+ 0.9830809832 0.9706060886 0.9632055759
+ 0.9833263755 0.9708440900 0.9635205865
+ 0.9835705757 0.9710823298 0.9638354778
+ 0.9838137031 0.9713206291 0.9641503096
+ 0.9840556979 0.9715592265 0.9644649029
+ 0.9842965007 0.9717978239 0.9647794962
+ 0.9845361114 0.9720367193 0.9650939703
+ 0.9847744703 0.9722756743 0.9654083848
+ 0.9850116968 0.9725148082 0.9657226801
+ 0.9852476716 0.9727541804 0.9660369754
+ 0.9854825139 0.9729936719 0.9663510919
+ 0.9857159853 0.9732332826 0.9666650891
+ 0.9859482050 0.9734731913 0.9669790864
+ 0.9861791134 0.9737132192 0.9672929049
+ 0.9864087105 0.9739533067 0.9676066041
+ 0.9866369963 0.9741935730 0.9679203033
+ 0.9868639112 0.9744340777 0.9682338834
+ 0.9870895147 0.9746747017 0.9685472846
+ 0.9873136878 0.9749155045 0.9688606858
+ 0.9875364900 0.9751564860 0.9691740274
+ 0.9877579212 0.9753975868 0.9694871902
+ 0.9879779220 0.9756389260 0.9698001742
+ 0.9881964922 0.9758803844 0.9701132178
+ 0.9884135723 0.9761220217 0.9704260826
+ 0.9886292219 0.9763637185 0.9707388878
+ 0.9888433218 0.9766055942 0.9710515738
+ 0.9890559912 0.9768477082 0.9713642001
+ 0.9892671108 0.9770898819 0.9716768265
+ 0.9894766212 0.9773322940 0.9719892144
+ 0.9896847010 0.9775748849 0.9723014832
+ 0.9898911119 0.9778175950 0.9726136923
+ 0.9900959730 0.9780604839 0.9729259014
+ 0.9902992249 0.9783034921 0.9732378721
+ 0.9905009270 0.9785466790 0.9735497832
+ 0.9907009006 0.9787899852 0.9738616943
+ 0.9908992052 0.9790335298 0.9741734266
+ 0.9910959005 0.9792770743 0.9744849801
+ 0.9912909269 0.9795209169 0.9747965932
+ 0.9914842248 0.9797648787 0.9751080275
+ 0.9916757941 0.9800090194 0.9754194021
+ 0.9918656945 0.9802532196 0.9757305980
+ 0.9920538068 0.9804975986 0.9760417938
+ 0.9922400713 0.9807422161 0.9763528705
+ 0.9924247265 0.9809868932 0.9766638279
+ 0.9926074743 0.9812318087 0.9769747257
+ 0.9927883744 0.9814767838 0.9772855043
+ 0.9929674864 0.9817218781 0.9775961041
+ 0.9931448102 0.9819672704 0.9779067039
+ 0.9933202267 0.9822127223 0.9782171845
+ 0.9934937954 0.9824582934 0.9785274863
+ 0.9936653972 0.9827041030 0.9788377881
+ 0.9938350916 0.9829499722 0.9791479707
+ 0.9940028787 0.9831960797 0.9794579744
+ 0.9941688180 0.9834423065 0.9797679782
+ 0.9943326712 0.9836885929 0.9800779223
+ 0.9944946170 0.9839351177 0.9803876877
+ 0.9946544766 0.9841818213 0.9806972742
+ 0.9948124290 0.9844285846 0.9810069203
+ 0.9949682951 0.9846755266 0.9813163877
+ 0.9951221943 0.9849225879 0.9816257954
+ 0.9952740073 0.9851698279 0.9819350243
+ 0.9954236746 0.9854171872 0.9822441936
+ 0.9955713153 0.9856647253 0.9825533032
+ 0.9957168102 0.9859123826 0.9828622937
+ 0.9958602190 0.9861602187 0.9831711054
+ 0.9960014820 0.9864081740 0.9834799170
+ 0.9961404800 0.9866563082 0.9837886095
+ 0.9962775111 0.9869045019 0.9840971828
+ 0.9964122176 0.9871528745 0.9844055772
+ 0.9965447187 0.9874014258 0.9847139716
+ 0.9966750145 0.9876500964 0.9850223064
+ 0.9968031049 0.9878988862 0.9853304029
+ 0.9969288707 0.9881477952 0.9856384993
+ 0.9970524907 0.9883968830 0.9859464169
+ 0.9971737266 0.9886462092 0.9862542748
+ 0.9972926974 0.9888954759 0.9865620136
+ 0.9974092841 0.9891449809 0.9868696928
+ 0.9975237250 0.9893947244 0.9871771932
+ 0.9976356030 0.9896445274 0.9874846935
+ 0.9977452159 0.9898943901 0.9877920151
+ 0.9978523850 0.9901443720 0.9880992770
+ 0.9979572296 0.9903945923 0.9884064198
+ 0.9980595708 0.9906449914 0.9887135029
+ 0.9981595278 0.9908953905 0.9890204072
+ 0.9982569814 0.9911460280 0.9893271923
+ 0.9983521104 0.9913967848 0.9896339178
+ 0.9984446168 0.9916477203 0.9899405837
+ 0.9985346794 0.9918987155 0.9902470708
+ 0.9986221790 0.9921497703 0.9905534983
+ 0.9987071753 0.9924011230 0.9908598065
+ 0.9987897277 0.9926524758 0.9911659956
+ 0.9988695979 0.9929041266 0.9914721251
+ 0.9989469051 0.9931557178 0.9917780757
+ 0.9990215898 0.9934074879 0.9920840263
+ 0.9990937710 0.9936594963 0.9923897982
+ 0.9991632104 0.9939116240 0.9926955104
+ 0.9992300868 0.9941638112 0.9930009842
+ 0.9992942810 0.9944161177 0.9933065176
+ 0.9993557930 0.9946686029 0.9936118722
+ 0.9994146228 0.9949212074 0.9939171076
+ 0.9994707108 0.9951738715 0.9942222834
+ 0.9995239973 0.9954267740 0.9945272803
+ 0.9995747209 0.9956797957 0.9948322773
+ 0.9996225238 0.9959328771 0.9951370955
+ 0.9996675849 0.9961860776 0.9954419136
+ 0.9997099042 0.9964395165 0.9957464933
+ 0.9997494221 0.9966930151 0.9960510135
+ 0.9997860789 0.9969465733 0.9963554144
+ 0.9998199940 0.9972004294 0.9966596961
+ 0.9998509288 0.9974542856 0.9969639182
+ 0.9998790026 0.9977083206 0.9972680211
+ 0.9999042153 0.9979624152 0.9975720048
+ 0.9999266267 0.9982166886 0.9978759289
+ 0.9999458790 0.9984710813 0.9981796145
+ 0.9999623895 0.9987255931 0.9984833002
+ 0.9999759197 0.9989802241 0.9987869263
+ 0.9999864101 0.9992349744 0.9990903139
+ 0.9999939799 0.9994899035 0.9993935823
+ 0.9999985099 0.9997448921 0.9996969104
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/kodak_dscs_3151.spi1d b/release/datafiles/colormanagement/luts/film_response/kodak_dscs_3151.spi1d
new file mode 100644
index 00000000000..3fe7c939fe1
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/kodak_dscs_3151.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0037204761 0.0029971090 0.0034317160
+ 0.0074409521 0.0059942179 0.0068634320
+ 0.0112108104 0.0089913281 0.0103168199
+ 0.0150894802 0.0121837398 0.0140005304
+ 0.0189681500 0.0154752200 0.0176842492
+ 0.0229456108 0.0187666994 0.0214565806
+ 0.0269588791 0.0222466905 0.0253789201
+ 0.0309982002 0.0258396305 0.0293012708
+ 0.0351190008 0.0294325706 0.0334015414
+ 0.0392398089 0.0332778692 0.0375403687
+ 0.0434244089 0.0371704884 0.0417546108
+ 0.0476234518 0.0411414988 0.0460793190
+ 0.0518433899 0.0453211293 0.0504178591
+ 0.0560905896 0.0495007597 0.0548906699
+ 0.0603392683 0.0539112613 0.0593634807
+ 0.0646051764 0.0583530813 0.0639266223
+ 0.0688710883 0.0629366115 0.0685047507
+ 0.0731304884 0.0676036403 0.0731234923
+ 0.0773875490 0.0723571181 0.0777619109
+ 0.0816316605 0.0772018284 0.0824085474
+ 0.0858552009 0.0820983425 0.0870628431
+ 0.0900777131 0.0870656669 0.0917078033
+ 0.0942465588 0.0920592695 0.0963367820
+ 0.0984154195 0.0970907733 0.1009529978
+ 0.1025395989 0.1021251008 0.1055205986
+ 0.1066365018 0.1071633995 0.1100865975
+ 0.1107179970 0.1121815965 0.1145633981
+ 0.1147293970 0.1171742007 0.1190401986
+ 0.1187407970 0.1221275032 0.1234276965
+ 0.1226869002 0.1270297021 0.1277907938
+ 0.1266030073 0.1318825036 0.1320898980
+ 0.1305056065 0.1366591007 0.1363231987
+ 0.1343199015 0.1413903981 0.1405382007
+ 0.1381341964 0.1460158974 0.1446315050
+ 0.1418946981 0.1506181061 0.1487247944
+ 0.1456034929 0.1550758928 0.1527182013
+ 0.1493123025 0.1595336050 0.1566662937
+ 0.1529341042 0.1638332009 0.1605917066
+ 0.1565361023 0.1681143939 0.1643936932
+ 0.1601340026 0.1722953022 0.1681956053
+ 0.1636296958 0.1763972044 0.1719217002
+ 0.1671254039 0.1804776043 0.1755793989
+ 0.1706026942 0.1844025999 0.1792372018
+ 0.1739941984 0.1883275062 0.1827841997
+ 0.1773857027 0.1921540052 0.1863020957
+ 0.1807540953 0.1959075928 0.1898200065
+ 0.1840445995 0.1996611059 0.1932110041
+ 0.1873351038 0.2032658011 0.1965949982
+ 0.1906071007 0.2068558931 0.1999790967
+ 0.1938004941 0.2104267031 0.2032371014
+ 0.1969940066 0.2138625979 0.2064943016
+ 0.2001820058 0.2172984928 0.2097516060
+ 0.2032828927 0.2207036018 0.2128987014
+ 0.2063837051 0.2239954025 0.2160367072
+ 0.2094846070 0.2272873074 0.2191746980
+ 0.2125124037 0.2305555940 0.2222305983
+ 0.2155255973 0.2337138951 0.2252573073
+ 0.2185387015 0.2368721068 0.2282838970
+ 0.2215092927 0.2400290966 0.2312657982
+ 0.2244399041 0.2430640012 0.2341890037
+ 0.2273703963 0.2460989058 0.2371121943
+ 0.2302929014 0.2491337955 0.2400342971
+ 0.2331458032 0.2520878017 0.2428618073
+ 0.2359987050 0.2550094128 0.2456893027
+ 0.2388516068 0.2579309940 0.2485169023
+ 0.2416612059 0.2608223855 0.2513025105
+ 0.2444415987 0.2636403143 0.2540419102
+ 0.2472219020 0.2664583027 0.2567811906
+ 0.2500022054 0.2692762017 0.2595205903
+ 0.2527149916 0.2720237970 0.2621931136
+ 0.2554276884 0.2747471035 0.2648515105
+ 0.2581403852 0.2774704993 0.2675099075
+ 0.2608334124 0.2801876962 0.2701635957
+ 0.2634831965 0.2828249037 0.2727478147
+ 0.2661330998 0.2854621112 0.2753320038
+ 0.2687830031 0.2880992889 0.2779161930
+ 0.2714012861 0.2907147110 0.2804872990
+ 0.2739928961 0.2932738066 0.2830036879
+ 0.2765845060 0.2958329022 0.2855201960
+ 0.2791759968 0.2983919084 0.2880367041
+ 0.2817308009 0.3009246886 0.2905395031
+ 0.2842684984 0.3034130037 0.2929942906
+ 0.2868061066 0.3059012890 0.2954489887
+ 0.2893437147 0.3083896041 0.2979038060
+ 0.2918444872 0.3108552992 0.3003503084
+ 0.2943322957 0.3132796884 0.3027490079
+ 0.2968201041 0.3157039881 0.3051475883
+ 0.2993079126 0.3181284070 0.3075462878
+ 0.3017626107 0.3205395937 0.3099448979
+ 0.3042044938 0.3229064047 0.3122938871
+ 0.3066464067 0.3252730966 0.3146417141
+ 0.3090882897 0.3276399076 0.3169896007
+ 0.3115035892 0.3300065100 0.3193373978
+ 0.3139032125 0.3323214948 0.3216522038
+ 0.3163028061 0.3346365094 0.3239541054
+ 0.3187023997 0.3369514942 0.3262560070
+ 0.3210841119 0.3392665088 0.3285579085
+ 0.3234448135 0.3415498137 0.3308443129
+ 0.3258054852 0.3438183963 0.3331047893
+ 0.3281661868 0.3460870087 0.3353652954
+ 0.3305189013 0.3483555913 0.3376257122
+ 0.3328438103 0.3506127894 0.3398861885
+ 0.3351686895 0.3528400064 0.3421114087
+ 0.3374935985 0.3550671935 0.3443346918
+ 0.3398185074 0.3572942913 0.3465578854
+ 0.3421131074 0.3595215082 0.3487811983
+ 0.3444052041 0.3617197871 0.3509894013
+ 0.3466972113 0.3639101088 0.3531793952
+ 0.3489891887 0.3661004007 0.3553692997
+ 0.3512642980 0.3682906926 0.3575592935
+ 0.3535260856 0.3704738915 0.3597491980
+ 0.3557879031 0.3726314902 0.3619127870
+ 0.3580496907 0.3747890890 0.3640730083
+ 0.3603076935 0.3769468069 0.3662331998
+ 0.3625417054 0.3791044056 0.3683933914
+ 0.3647755980 0.3812451065 0.3705467880
+ 0.3670096099 0.3833738863 0.3726806045
+ 0.3692435026 0.3855026960 0.3748143017
+ 0.3714604974 0.3876315057 0.3769479990
+ 0.3736687899 0.3897601962 0.3790816963
+ 0.3758769929 0.3918665051 0.3812020123
+ 0.3780852854 0.3939698935 0.3833121955
+ 0.3802903891 0.3960733116 0.3854224086
+ 0.3824748993 0.3981766999 0.3875325918
+ 0.3846592903 0.4002771080 0.3896428049
+ 0.3868438005 0.4023582935 0.3917357028
+ 0.3890283108 0.4044393897 0.3938251138
+ 0.3912005126 0.4065206051 0.3959144950
+ 0.3933627903 0.4086017013 0.3980039060
+ 0.3955250978 0.4106765091 0.4000923932
+ 0.3976874053 0.4127382934 0.4021633863
+ 0.3998498023 0.4148001075 0.4042344093
+ 0.4019927979 0.4168618023 0.4063053131
+ 0.4041343033 0.4189235866 0.4083763063
+ 0.4062758982 0.4209772944 0.4104438126
+ 0.4084174931 0.4230220914 0.4124985039
+ 0.4105539024 0.4250670075 0.4145531058
+ 0.4126757979 0.4271118045 0.4166077971
+ 0.4147978127 0.4291566908 0.4186624885
+ 0.4169197083 0.4311929047 0.4207122028
+ 0.4190416038 0.4332230985 0.4227524102
+ 0.4211533070 0.4352532029 0.4247925878
+ 0.4232563972 0.4372833967 0.4268329144
+ 0.4253596067 0.4393135011 0.4288730919
+ 0.4274626970 0.4413351119 0.4309074879
+ 0.4295659065 0.4433524013 0.4329349101
+ 0.4316546023 0.4453696907 0.4349622130
+ 0.4337396026 0.4473870099 0.4369894862
+ 0.4358245134 0.4494042993 0.4390167892
+ 0.4379095137 0.4514135122 0.4410381019
+ 0.4399943948 0.4534195065 0.4430536926
+ 0.4420616031 0.4554254115 0.4450694025
+ 0.4441286922 0.4574314058 0.4470849931
+ 0.4461956918 0.4594373107 0.4491006136
+ 0.4482628107 0.4614359140 0.4511103034
+ 0.4503270090 0.4634316862 0.4531151056
+ 0.4523763061 0.4654273987 0.4551199973
+ 0.4544255137 0.4674232006 0.4571247995
+ 0.4564746916 0.4694189131 0.4591296911
+ 0.4585238993 0.4714080989 0.4611288011
+ 0.4605681002 0.4733943939 0.4631234109
+ 0.4625990987 0.4753808081 0.4651181102
+ 0.4646301866 0.4773671925 0.4671126902
+ 0.4666613042 0.4793536067 0.4691073895
+ 0.4686923921 0.4813339114 0.4710964859
+ 0.4707168043 0.4833112955 0.4730812013
+ 0.4727292955 0.4852887094 0.4750658870
+ 0.4747416973 0.4872662127 0.4770506024
+ 0.4767540991 0.4892435968 0.4790352881
+ 0.4787665009 0.4912154973 0.4810147882
+ 0.4807713032 0.4931839108 0.4829894006
+ 0.4827642143 0.4951524138 0.4849640131
+ 0.4847570956 0.4971208870 0.4869385958
+ 0.4867500067 0.4990893006 0.4889132082
+ 0.4887427986 0.5010527968 0.4908829927
+ 0.4907281101 0.5030118823 0.4928469956
+ 0.4927003086 0.5049710274 0.4948109984
+ 0.4946725965 0.5069301128 0.4967750013
+ 0.4966447949 0.5088893175 0.4987390041
+ 0.4986169934 0.5108439922 0.5006989241
+ 0.5005825758 0.5127928853 0.5026513934
+ 0.5025327802 0.5147417784 0.5046039224
+ 0.5044829845 0.5166907907 0.5065565109
+ 0.5064331293 0.5186396837 0.5085089803
+ 0.5083832741 0.5205851197 0.5104585290
+ 0.5103294253 0.5225226283 0.5123981833
+ 0.5122557878 0.5244600177 0.5143380165
+ 0.5141823292 0.5263975263 0.5162776709
+ 0.5161086917 0.5283349156 0.5182175040
+ 0.5180351138 0.5302705169 0.5201560855
+ 0.5199615955 0.5321947932 0.5220813751
+ 0.5218629241 0.5341190100 0.5240067244
+ 0.5237637162 0.5360432863 0.5259320140
+ 0.5256645083 0.5379675031 0.5278573036
+ 0.5275653005 0.5398917198 0.5297827125
+ 0.5294660926 0.5418013930 0.5316932797
+ 0.5313469172 0.5437102914 0.5336021781
+ 0.5332199931 0.5456190705 0.5355110168
+ 0.5350930095 0.5475279093 0.5374197960
+ 0.5369660854 0.5494368076 0.5393285751
+ 0.5388391018 0.5513328910 0.5412250757
+ 0.5407006741 0.5532237291 0.5431150198
+ 0.5425437093 0.5551146269 0.5450049043
+ 0.5443866849 0.5570054054 0.5468947887
+ 0.5462297201 0.5588961840 0.5487846732
+ 0.5480726957 0.5607783198 0.5506668091
+ 0.5499156117 0.5626481175 0.5525349975
+ 0.5517275929 0.5645177960 0.5544031262
+ 0.5535380840 0.5663875937 0.5562713146
+ 0.5553485155 0.5682573915 0.5581395030
+ 0.5571590066 0.5701255202 0.5600075126
+ 0.5589694977 0.5719708800 0.5618509054
+ 0.5607649088 0.5738161802 0.5636942983
+ 0.5625402927 0.5756615996 0.5655375719
+ 0.5643156767 0.5775070190 0.5673810244
+ 0.5660911202 0.5793523192 0.5692244172
+ 0.5678665042 0.5811793804 0.5710514784
+ 0.5696418881 0.5829967260 0.5728666782
+ 0.5713872910 0.5848138928 0.5746818781
+ 0.5731251240 0.5866311789 0.5764971972
+ 0.5748628974 0.5884484053 0.5783123970
+ 0.5766006112 0.5902609825 0.5801253915
+ 0.5783383846 0.5920462012 0.5819090009
+ 0.5800744295 0.5938314199 0.5836926103
+ 0.5817720294 0.5956165791 0.5854762197
+ 0.5834695101 0.5974019170 0.5872597098
+ 0.5851671100 0.5991870761 0.5890433192
+ 0.5868647099 0.6009526253 0.5908104777
+ 0.5885621905 0.6027017832 0.5925588012
+ 0.5902531743 0.6044508815 0.5943070054
+ 0.5919080973 0.6062000990 0.5960553288
+ 0.5935629010 0.6079491973 0.5978035927
+ 0.5952177048 0.6096982956 0.5995517969
+ 0.5968725085 0.6114141941 0.6012710929
+ 0.5985273123 0.6131231785 0.6029803753
+ 0.6001772285 0.6148322225 0.6046897173
+ 0.6017869115 0.6165410876 0.6063989997
+ 0.6033965945 0.6182500720 0.6081082821
+ 0.6050062776 0.6199591160 0.6098175049
+ 0.6066160202 0.6216248870 0.6114888191
+ 0.6082255840 0.6232897043 0.6131554842
+ 0.6098353267 0.6249545217 0.6148222089
+ 0.6114025116 0.6266192198 0.6164888144
+ 0.6129649282 0.6282839775 0.6181554794
+ 0.6145272255 0.6299487948 0.6198222041
+ 0.6160895824 0.6315670013 0.6214476824
+ 0.6176518798 0.6331837177 0.6230683923
+ 0.6192142963 0.6348004937 0.6246889830
+ 0.6207520962 0.6364172101 0.6263095737
+ 0.6222651005 0.6380339265 0.6279302239
+ 0.6237781048 0.6396507025 0.6295508146
+ 0.6252911091 0.6412270069 0.6311358213
+ 0.6268041134 0.6427921057 0.6327071190
+ 0.6283171177 0.6443573236 0.6342784762
+ 0.6298301220 0.6459224224 0.6358497739
+ 0.6312978268 0.6474875808 0.6374210715
+ 0.6327596903 0.6490526795 0.6389924288
+ 0.6342216730 0.6505963206 0.6405450106
+ 0.6356835961 0.6521067023 0.6420642138
+ 0.6371455789 0.6536170840 0.6435832977
+ 0.6386075020 0.6551274061 0.6451023817
+ 0.6400669813 0.6566377878 0.6466215849
+ 0.6414763927 0.6581482291 0.6481407285
+ 0.6428859234 0.6596586108 0.6496598125
+ 0.6442952752 0.6611245275 0.6511365175
+ 0.6457048059 0.6625775099 0.6526008844
+ 0.6471142769 0.6640303731 0.6540653110
+ 0.6485236883 0.6654832959 0.6555296779
+ 0.6499332190 0.6669362783 0.6569941044
+ 0.6512916088 0.6683892012 0.6584585905
+ 0.6526474953 0.6698421240 0.6599230170
+ 0.6540033817 0.6712418795 0.6613336205
+ 0.6553593278 0.6726351976 0.6627411842
+ 0.6567150950 0.6740285158 0.6641489267
+ 0.6580709815 0.6754218936 0.6655564904
+ 0.6594269276 0.6768152118 0.6669641733
+ 0.6607514024 0.6782084703 0.6683717966
+ 0.6620529890 0.6796017885 0.6697794795
+ 0.6633545756 0.6809514165 0.6711379290
+ 0.6646561027 0.6822834015 0.6724871993
+ 0.6659576893 0.6836155057 0.6738365293
+ 0.6672592163 0.6849476099 0.6751857996
+ 0.6685608029 0.6862797141 0.6765351295
+ 0.6698623896 0.6876118183 0.6778843999
+ 0.6711149812 0.6889439225 0.6792336702
+ 0.6723617911 0.6902630925 0.6805573106
+ 0.6736087203 0.6915329099 0.6818472147
+ 0.6748554707 0.6928027868 0.6831371188
+ 0.6761022806 0.6940726042 0.6844270229
+ 0.6773492098 0.6953424811 0.6857169271
+ 0.6785960197 0.6966122985 0.6870067716
+ 0.6798428893 0.6978821754 0.6882966161
+ 0.6810417771 0.6991519928 0.6895865202
+ 0.6822339296 0.7004011273 0.6908357143
+ 0.6834260225 0.7016083002 0.6920655966
+ 0.6846179962 0.7028154731 0.6932954788
+ 0.6858100891 0.7040227056 0.6945254803
+ 0.6870021820 0.7052298784 0.6957554221
+ 0.6881942153 0.7064371109 0.6969853044
+ 0.6893863082 0.7076442838 0.6982151866
+ 0.6905518770 0.7088515162 0.6994451880
+ 0.6916894913 0.7100557089 0.7006422281
+ 0.6928271055 0.7112004161 0.7018120885
+ 0.6939646006 0.7123451233 0.7029820085
+ 0.6951022148 0.7134897709 0.7041519284
+ 0.6962398291 0.7146344781 0.7053217888
+ 0.6973773837 0.7157791853 0.7064917088
+ 0.6985148787 0.7169238925 0.7076616883
+ 0.6996524930 0.7180685997 0.7088316083
+ 0.7007526159 0.7192133069 0.7100014091
+ 0.7018362880 0.7203385830 0.7111117244
+ 0.7029200196 0.7214214802 0.7122220993
+ 0.7040035725 0.7225043178 0.7133324146
+ 0.7050873041 0.7235872149 0.7144426703
+ 0.7061709762 0.7246699929 0.7155529857
+ 0.7072547078 0.7257528901 0.7166634202
+ 0.7083383203 0.7268357873 0.7177736759
+ 0.7094219923 0.7279186249 0.7188839912
+ 0.7104809284 0.7290015221 0.7199943066
+ 0.7115116119 0.7300795913 0.7210462093
+ 0.7125421762 0.7311016917 0.7220978141
+ 0.7135729194 0.7321239114 0.7231494188
+ 0.7146034837 0.7331460118 0.7242009044
+ 0.7156342268 0.7341681719 0.7252525091
+ 0.7166647911 0.7351902723 0.7263041139
+ 0.7176954746 0.7362124920 0.7273557186
+ 0.7187260985 0.7372345924 0.7284073234
+ 0.7197567225 0.7382566929 0.7294588089
+ 0.7207477093 0.7392789125 0.7304825187
+ 0.7217264771 0.7402836084 0.7314764857
+ 0.7227051854 0.7412465811 0.7324705720
+ 0.7236840129 0.7422094941 0.7334647179
+ 0.7246627808 0.7431725264 0.7344586849
+ 0.7256414890 0.7441354990 0.7354527712
+ 0.7266203165 0.7450984120 0.7364467978
+ 0.7275990248 0.7460613847 0.7374408841
+ 0.7285777926 0.7470242977 0.7384349704
+ 0.7295565009 0.7479872704 0.7394289970
+ 0.7305076122 0.7489503026 0.7403993011
+ 0.7314357758 0.7499132156 0.7413372993
+ 0.7323639989 0.7508239746 0.7422754169
+ 0.7332922220 0.7517297268 0.7432134748
+ 0.7342203856 0.7526353002 0.7441515923
+ 0.7351486087 0.7535409927 0.7450897098
+ 0.7360768914 0.7544466257 0.7460278273
+ 0.7370051146 0.7553523183 0.7469658852
+ 0.7379332781 0.7562578917 0.7479040027
+ 0.7388615012 0.7571635842 0.7488421202
+ 0.7397897243 0.7580692172 0.7497801781
+ 0.7406799793 0.7589749098 0.7506768107
+ 0.7415592074 0.7598804832 0.7515608072
+ 0.7424383759 0.7607383132 0.7524446845
+ 0.7433176041 0.7615888119 0.7533286810
+ 0.7441967130 0.7624391913 0.7542126179
+ 0.7450758815 0.7632896900 0.7550964952
+ 0.7459551096 0.7641401887 0.7559804916
+ 0.7468342781 0.7649906874 0.7568644285
+ 0.7477135062 0.7658411264 0.7577484250
+ 0.7485926747 0.7666916251 0.7586323023
+ 0.7494719028 0.7675421238 0.7595162988
+ 0.7503321767 0.7683925033 0.7603765726
+ 0.7511640787 0.7692430019 0.7612084746
+ 0.7519959211 0.7700877190 0.7620403171
+ 0.7528278232 0.7708852887 0.7628720999
+ 0.7536597252 0.7716829181 0.7637040019
+ 0.7544915080 0.7724806070 0.7645357847
+ 0.7553234100 0.7732781768 0.7653676271
+ 0.7561553121 0.7740758061 0.7661995292
+ 0.7569870949 0.7748734951 0.7670313120
+ 0.7578189969 0.7756711245 0.7678630948
+ 0.7586507797 0.7764686942 0.7686949968
+ 0.7594826818 0.7772663832 0.7695267797
+ 0.7602974176 0.7780640125 0.7703371048
+ 0.7610837221 0.7788615823 0.7711189985
+ 0.7618700266 0.7796592712 0.7719008923
+ 0.7626562715 0.7804281116 0.7726829052
+ 0.7634426951 0.7811753154 0.7734647989
+ 0.7642289996 0.7819225788 0.7742466927
+ 0.7650153041 0.7826699018 0.7750285864
+ 0.7658017278 0.7834171057 0.7758104801
+ 0.7665879726 0.7841644287 0.7765923738
+ 0.7673742771 0.7849116921 0.7773743272
+ 0.7681607008 0.7856588960 0.7781562805
+ 0.7689470053 0.7864062190 0.7789381742
+ 0.7697333097 0.7871534824 0.7797201276
+ 0.7704908252 0.7879006863 0.7804713845
+ 0.7712334991 0.7886480093 0.7812057137
+ 0.7719761729 0.7893952727 0.7819399834
+ 0.7727187872 0.7901334167 0.7826743126
+ 0.7734615207 0.7908328772 0.7834085822
+ 0.7742041945 0.7915323973 0.7841429114
+ 0.7749469280 0.7922317982 0.7848771811
+ 0.7756894827 0.7929313183 0.7856115103
+ 0.7764322162 0.7936307788 0.7863457799
+ 0.7771748900 0.7943302989 0.7870801091
+ 0.7779176235 0.7950296998 0.7878143787
+ 0.7786601782 0.7957292199 0.7885487080
+ 0.7794029117 0.7964286804 0.7892829776
+ 0.7801374197 0.7971280813 0.7900161743
+ 0.7808383703 0.7978276014 0.7907052040
+ 0.7815393209 0.7985271215 0.7913942933
+ 0.7822402716 0.7992265224 0.7920833230
+ 0.7829412222 0.7999259830 0.7927722931
+ 0.7836421728 0.8005850911 0.7934613824
+ 0.7843431234 0.8012393117 0.7941504121
+ 0.7850440741 0.8018935919 0.7948395014
+ 0.7857450843 0.8025478721 0.7955284715
+ 0.7864459753 0.8032020926 0.7962175012
+ 0.7871469855 0.8038563728 0.7969065905
+ 0.7878478765 0.8045107126 0.7975956202
+ 0.7885488868 0.8051649928 0.7982845902
+ 0.7892497778 0.8058192134 0.7989736795
+ 0.7899507880 0.8064734936 0.7996627092
+ 0.7906147838 0.8071277738 0.8003299236
+ 0.7912759781 0.8077819943 0.8009759784
+ 0.7919371128 0.8084362745 0.8016222119
+ 0.7925983071 0.8090906143 0.8022683859
+ 0.7932595015 0.8097448945 0.8029146194
+ 0.7939206958 0.8103731275 0.8035606742
+ 0.7945818901 0.8109847903 0.8042069077
+ 0.7952430844 0.8115965128 0.8048530817
+ 0.7959042788 0.8122081757 0.8054991961
+ 0.7965654731 0.8128197789 0.8061454296
+ 0.7972267270 0.8134315014 0.8067916036
+ 0.7978879213 0.8140432239 0.8074377775
+ 0.7985491157 0.8146548271 0.8080838919
+ 0.7992103100 0.8152664900 0.8087301254
+ 0.7998715043 0.8158782125 0.8093762994
+ 0.8005021811 0.8164898157 0.8100209832
+ 0.8011255860 0.8171014786 0.8106266856
+ 0.8017489910 0.8177132010 0.8112323880
+ 0.8023723960 0.8183249235 0.8118380904
+ 0.8029958010 0.8189365268 0.8124437928
+ 0.8036192060 0.8195481896 0.8130494952
+ 0.8042424917 0.8201494217 0.8136551976
+ 0.8048658967 0.8207209706 0.8142609000
+ 0.8054893017 0.8212926984 0.8148664832
+ 0.8061127067 0.8218643069 0.8154721856
+ 0.8067361116 0.8224359155 0.8160778880
+ 0.8073595166 0.8230075836 0.8166835904
+ 0.8079829216 0.8235791922 0.8172892928
+ 0.8086063266 0.8241508007 0.8178949952
+ 0.8092296720 0.8247225285 0.8185006976
+ 0.8098530769 0.8252940774 0.8191064000
+ 0.8104491234 0.8258656859 0.8197119832
+ 0.8110365868 0.8264374137 0.8202977180
+ 0.8116241097 0.8270090222 0.8208652735
+ 0.8122116923 0.8275805712 0.8214328289
+ 0.8127992153 0.8281521797 0.8220003843
+ 0.8133867979 0.8287239075 0.8225678802
+ 0.8139743209 0.8292955160 0.8231354952
+ 0.8145617843 0.8298671246 0.8237029910
+ 0.8151494265 0.8304100037 0.8242706060
+ 0.8157368898 0.8309440017 0.8248381019
+ 0.8163244724 0.8314781189 0.8254057169
+ 0.8169119954 0.8320121765 0.8259732127
+ 0.8174995184 0.8325462937 0.8265408278
+ 0.8180871010 0.8330804110 0.8271083236
+ 0.8186746240 0.8336145282 0.8276758790
+ 0.8192622066 0.8341485858 0.8282433748
+ 0.8198497295 0.8346827030 0.8288109899
+ 0.8204119802 0.8352168202 0.8293784857
+ 0.8209655881 0.8357508779 0.8299461007
+ 0.8215191960 0.8362848759 0.8304811716
+ 0.8220728040 0.8368189931 0.8310129046
+ 0.8226264119 0.8373531103 0.8315445781
+ 0.8231800199 0.8378872275 0.8320763111
+ 0.8237336278 0.8384212852 0.8326079845
+ 0.8242871761 0.8389554024 0.8331397176
+ 0.8248407841 0.8394895196 0.8336713910
+ 0.8253943920 0.8400220275 0.8342031240
+ 0.8259480000 0.8405209780 0.8347347975
+ 0.8265016079 0.8410199881 0.8352664709
+ 0.8270552158 0.8415188789 0.8357982039
+ 0.8276088238 0.8420178890 0.8363298774
+ 0.8281623721 0.8425168991 0.8368616104
+ 0.8287159801 0.8430157900 0.8373932838
+ 0.8292695880 0.8435148001 0.8379250169
+ 0.8298231959 0.8440138102 0.8384566903
+ 0.8303549886 0.8445127010 0.8389884233
+ 0.8308765292 0.8450117111 0.8395200968
+ 0.8313980103 0.8455106020 0.8400486112
+ 0.8319196105 0.8460096121 0.8405466080
+ 0.8324410915 0.8465086222 0.8410447240
+ 0.8329625726 0.8470075130 0.8415427804
+ 0.8334841132 0.8475065231 0.8420407772
+ 0.8340057135 0.8480054736 0.8425388932
+ 0.8345271945 0.8485044241 0.8430370092
+ 0.8350486755 0.8490033746 0.8435351253
+ 0.8355702758 0.8495023847 0.8440331221
+ 0.8360918164 0.8500012159 0.8445311785
+ 0.8366132975 0.8504673839 0.8450292945
+ 0.8371348977 0.8509336114 0.8455272913
+ 0.8376563787 0.8513997197 0.8460254073
+ 0.8381779194 0.8518658876 0.8465235233
+ 0.8386995196 0.8523319960 0.8470215201
+ 0.8392210007 0.8527982235 0.8475195765
+ 0.8397424817 0.8532642722 0.8480176926
+ 0.8402487040 0.8537304997 0.8485158086
+ 0.8407400250 0.8541966081 0.8490138054
+ 0.8412312865 0.8546627760 0.8495119214
+ 0.8417226076 0.8551290035 0.8500093222
+ 0.8422138095 0.8555951118 0.8504759073
+ 0.8427050710 0.8560612798 0.8509424925
+ 0.8431963921 0.8565273881 0.8514090180
+ 0.8436875939 0.8569936156 0.8518756032
+ 0.8441789150 0.8574597239 0.8523421884
+ 0.8446701765 0.8579258919 0.8528087735
+ 0.8451614976 0.8583920002 0.8532752991
+ 0.8456526995 0.8588582277 0.8537418842
+ 0.8461440206 0.8593243957 0.8542085290
+ 0.8466352820 0.8597905040 0.8546749949
+ 0.8471266031 0.8602398038 0.8551415801
+ 0.8476178050 0.8606753945 0.8556082249
+ 0.8481091261 0.8611109257 0.8560746908
+ 0.8486003876 0.8615465164 0.8565412760
+ 0.8490915895 0.8619819880 0.8570079207
+ 0.8495829105 0.8624175787 0.8574743867
+ 0.8500698805 0.8628532290 0.8579409719
+ 0.8505327106 0.8632887006 0.8584076166
+ 0.8509954214 0.8637242913 0.8588742018
+ 0.8514581919 0.8641598225 0.8593407273
+ 0.8519209027 0.8645954132 0.8598073125
+ 0.8523836732 0.8650308847 0.8602566123
+ 0.8528465033 0.8654664755 0.8606936932
+ 0.8533092141 0.8659020066 0.8611307740
+ 0.8537719846 0.8663375974 0.8615679145
+ 0.8542348146 0.8667731285 0.8620049953
+ 0.8546975255 0.8672087193 0.8624420762
+ 0.8551602960 0.8676443100 0.8628792167
+ 0.8556230068 0.8680797815 0.8633162975
+ 0.8560857773 0.8685153723 0.8637533784
+ 0.8565486073 0.8689509034 0.8641905189
+ 0.8570113182 0.8693864942 0.8646275997
+ 0.8574740887 0.8698220253 0.8650646806
+ 0.8579369187 0.8702406883 0.8655018210
+ 0.8583996296 0.8706477880 0.8659389019
+ 0.8588624001 0.8710548282 0.8663759828
+ 0.8593251705 0.8714619279 0.8668131232
+ 0.8597878814 0.8718689084 0.8672502041
+ 0.8602361083 0.8722760081 0.8676872849
+ 0.8606721163 0.8726829886 0.8681244254
+ 0.8611080050 0.8730900884 0.8685615063
+ 0.8615438938 0.8734971285 0.8689985871
+ 0.8619799018 0.8739041090 0.8694357276
+ 0.8624157906 0.8743112087 0.8698728085
+ 0.8628516793 0.8747181892 0.8702903986
+ 0.8632876873 0.8751252890 0.8706998825
+ 0.8637235761 0.8755323291 0.8711094856
+ 0.8641595244 0.8759394288 0.8715190887
+ 0.8645954728 0.8763464093 0.8719285727
+ 0.8650314212 0.8767535090 0.8723381758
+ 0.8654673100 0.8771604896 0.8727477789
+ 0.8659031987 0.8775675893 0.8731573224
+ 0.8663392067 0.8779746294 0.8735669255
+ 0.8667750955 0.8783817291 0.8739765286
+ 0.8672109842 0.8787887096 0.8743860126
+ 0.8676469922 0.8791958094 0.8747956157
+ 0.8680828810 0.8796027899 0.8752052188
+ 0.8685188293 0.8800091743 0.8756147027
+ 0.8689547777 0.8803896904 0.8760243058
+ 0.8693907261 0.8807702065 0.8764339089
+ 0.8698266149 0.8811507821 0.8768433928
+ 0.8702474236 0.8815312982 0.8772529960
+ 0.8706580997 0.8819118142 0.8776625991
+ 0.8710687757 0.8822922707 0.8780720830
+ 0.8714795113 0.8826727867 0.8784816861
+ 0.8718901873 0.8830533028 0.8788912892
+ 0.8723009229 0.8834338188 0.8793007731
+ 0.8727115989 0.8838143945 0.8797103763
+ 0.8731222749 0.8841949105 0.8801124096
+ 0.8735330105 0.8845754266 0.8804963231
+ 0.8739436865 0.8849558830 0.8808801770
+ 0.8743544221 0.8853363991 0.8812639713
+ 0.8747650981 0.8857169151 0.8816478848
+ 0.8751757741 0.8860973716 0.8820317984
+ 0.8755865097 0.8864778876 0.8824155927
+ 0.8759971857 0.8868585229 0.8827995062
+ 0.8764079213 0.8872389793 0.8831834197
+ 0.8768185973 0.8876194954 0.8835672140
+ 0.8772292733 0.8880000114 0.8839511275
+ 0.8776400089 0.8883805275 0.8843349218
+ 0.8780506849 0.8887609839 0.8847187757
+ 0.8784614205 0.8891415000 0.8851026893
+ 0.8788720965 0.8895220757 0.8854864836
+ 0.8792827725 0.8899025917 0.8858703971
+ 0.8796935081 0.8902646899 0.8862543106
+ 0.8800982237 0.8906205893 0.8866381049
+ 0.8804851770 0.8909764290 0.8870220184
+ 0.8808721900 0.8913322091 0.8874058127
+ 0.8812592030 0.8916881084 0.8877897263
+ 0.8816462159 0.8920438886 0.8881735802
+ 0.8820331097 0.8923997879 0.8885573745
+ 0.8824201226 0.8927556276 0.8889412880
+ 0.8828070760 0.8931114078 0.8893252015
+ 0.8831940889 0.8934673071 0.8897089958
+ 0.8835811019 0.8938230872 0.8900871277
+ 0.8839681149 0.8941789269 0.8904470205
+ 0.8843551278 0.8945348263 0.8908069134
+ 0.8847420812 0.8948906064 0.8911666870
+ 0.8851290941 0.8952463865 0.8915265799
+ 0.8855161071 0.8956022859 0.8918864727
+ 0.8859031200 0.8959581256 0.8922464252
+ 0.8862900734 0.8963140249 0.8926063180
+ 0.8866770864 0.8966698050 0.8929662108
+ 0.8870640993 0.8970255852 0.8933259845
+ 0.8874511123 0.8973814845 0.8936858773
+ 0.8878381252 0.8977373242 0.8940458298
+ 0.8882250786 0.8980931044 0.8944057226
+ 0.8886120915 0.8984490037 0.8947656155
+ 0.8889991045 0.8988047838 0.8951255083
+ 0.8893861175 0.8991606832 0.8954852819
+ 0.8897730708 0.8995165229 0.8958451748
+ 0.8901509047 0.8998723030 0.8962051272
+ 0.8905156255 0.9002134800 0.8965650201
+ 0.8908804059 0.9005463719 0.8969249129
+ 0.8912451267 0.9008792043 0.8972848058
+ 0.8916099072 0.9012120962 0.8976445794
+ 0.8919746280 0.9015449882 0.8980044723
+ 0.8923392892 0.9018778801 0.8983644247
+ 0.8927041292 0.9022107720 0.8987243176
+ 0.8930687904 0.9025437236 0.8990842104
+ 0.8934335709 0.9028766155 0.8994441032
+ 0.8937982917 0.9032095075 0.8998038769
+ 0.8941630721 0.9035423994 0.9001536965
+ 0.8945277929 0.9038752913 0.9004911780
+ 0.8948925138 0.9042081833 0.9008287191
+ 0.8952572942 0.9045410752 0.9011662006
+ 0.8956220150 0.9048740268 0.9015038013
+ 0.8959867954 0.9052069187 0.9018412828
+ 0.8963515162 0.9055398107 0.9021788239
+ 0.8967161775 0.9058727026 0.9025163054
+ 0.8970810175 0.9062055945 0.9028539062
+ 0.8974456787 0.9065384865 0.9031913877
+ 0.8978105187 0.9068713784 0.9035289288
+ 0.8981751800 0.9072042704 0.9038664103
+ 0.8985400200 0.9075372219 0.9042040110
+ 0.8989046812 0.9078701138 0.9045414925
+ 0.8992694020 0.9082030058 0.9048789740
+ 0.8996341825 0.9085358977 0.9052165747
+ 0.8999989033 0.9088687897 0.9055541158
+ 0.9003428221 0.9092016816 0.9058915973
+ 0.9006866813 0.9095345736 0.9062290788
+ 0.9010306001 0.9098675251 0.9065666795
+ 0.9013743997 0.9101876020 0.9069042206
+ 0.9017183185 0.9104992151 0.9072417021
+ 0.9020621181 0.9108107090 0.9075791836
+ 0.9024059772 0.9111223221 0.9079167843
+ 0.9027498960 0.9114338756 0.9082543254
+ 0.9030936956 0.9117454886 0.9085918069
+ 0.9034376144 0.9120571017 0.9089292884
+ 0.9037814140 0.9123687148 0.9092668891
+ 0.9041252732 0.9126802087 0.9096043706
+ 0.9044691920 0.9129918218 0.9099419117
+ 0.9048129916 0.9133033752 0.9102622271
+ 0.9051569104 0.9136149883 0.9105789065
+ 0.9055007100 0.9139266014 0.9108955860
+ 0.9058446288 0.9142382145 0.9112123251
+ 0.9061884284 0.9145497084 0.9115288854
+ 0.9065322876 0.9148613214 0.9118456244
+ 0.9068762064 0.9151728749 0.9121623039
+ 0.9072200060 0.9154844880 0.9124789834
+ 0.9075639248 0.9157961011 0.9127957225
+ 0.9079077244 0.9161077142 0.9131124020
+ 0.9082515836 0.9164192080 0.9134290814
+ 0.9085955024 0.9167308211 0.9137458205
+ 0.9089393020 0.9170423746 0.9140625000
+ 0.9092832208 0.9173539877 0.9143791199
+ 0.9096270204 0.9176656008 0.9146957994
+ 0.9099708796 0.9179772139 0.9150124788
+ 0.9102967978 0.9182887077 0.9153292179
+ 0.9106211066 0.9186003208 0.9156458974
+ 0.9109454155 0.9189118743 0.9159625769
+ 0.9112696052 0.9192234874 0.9162793159
+ 0.9115939140 0.9195351005 0.9165959954
+ 0.9119182229 0.9198467135 0.9169126749
+ 0.9122424126 0.9201481938 0.9172292948
+ 0.9125667214 0.9204400182 0.9175459743
+ 0.9128909707 0.9207317829 0.9178627133
+ 0.9132152200 0.9210234880 0.9181793928
+ 0.9135395288 0.9213153124 0.9184960723
+ 0.9138637781 0.9216070771 0.9188128114
+ 0.9141880274 0.9218989015 0.9191294909
+ 0.9145122766 0.9221907258 0.9194461703
+ 0.9148365855 0.9224824905 0.9197629094
+ 0.9151608944 0.9227741957 0.9200747013
+ 0.9154850841 0.9230660200 0.9203718901
+ 0.9158093929 0.9233577847 0.9206691980
+ 0.9161337018 0.9236496091 0.9209665060
+ 0.9164578915 0.9239413738 0.9212638140
+ 0.9167822003 0.9242331982 0.9215610027
+ 0.9171065092 0.9245249033 0.9218583107
+ 0.9174306989 0.9248167276 0.9221556187
+ 0.9177550077 0.9251084924 0.9224528074
+ 0.9180793166 0.9254003167 0.9227501154
+ 0.9184035063 0.9256920815 0.9230474234
+ 0.9187278152 0.9259837866 0.9233446717
+ 0.9190521240 0.9262756109 0.9236419201
+ 0.9193763733 0.9265673757 0.9239392281
+ 0.9197006226 0.9268592000 0.9242364764
+ 0.9200235009 0.9271510243 0.9245337844
+ 0.9203293920 0.9274427891 0.9248309731
+ 0.9206352830 0.9277344942 0.9251282811
+ 0.9209411740 0.9280263186 0.9254255891
+ 0.9212471247 0.9283180833 0.9257227778
+ 0.9215530157 0.9286099076 0.9260200858
+ 0.9218589067 0.9289016724 0.9263173938
+ 0.9221647978 0.9291934967 0.9266147017
+ 0.9224706888 0.9294852018 0.9269118905
+ 0.9227765799 0.9297770262 0.9272091985
+ 0.9230824709 0.9300644994 0.9275065064
+ 0.9233884215 0.9303379059 0.9278036952
+ 0.9236943126 0.9306111932 0.9281010032
+ 0.9240002036 0.9308845997 0.9283983111
+ 0.9243060946 0.9311580062 0.9286956191
+ 0.9246119857 0.9314314127 0.9289928079
+ 0.9249178767 0.9317048192 0.9292901158
+ 0.9252238274 0.9319782257 0.9295874238
+ 0.9255297184 0.9322515726 0.9298846722
+ 0.9258356094 0.9325249791 0.9301708937
+ 0.9261415005 0.9327983856 0.9304500222
+ 0.9264473915 0.9330717921 0.9307292104
+ 0.9267532825 0.9333450794 0.9310083985
+ 0.9270591736 0.9336184859 0.9312875867
+ 0.9273651242 0.9338918924 0.9315667748
+ 0.9276710153 0.9341652989 0.9318460226
+ 0.9279769063 0.9344387054 0.9321250916
+ 0.9282827973 0.9347121119 0.9324042797
+ 0.9285886884 0.9349855185 0.9326835275
+ 0.9288945794 0.9352589250 0.9329627156
+ 0.9292004704 0.9355322719 0.9332419038
+ 0.9295064211 0.9358056188 0.9335210919
+ 0.9298123121 0.9360790253 0.9338002205
+ 0.9301115274 0.9363523722 0.9340794086
+ 0.9304001927 0.9366257787 0.9343585968
+ 0.9306889176 0.9368991852 0.9346377850
+ 0.9309775829 0.9371725917 0.9349169731
+ 0.9312661886 0.9374459982 0.9351962209
+ 0.9315549135 0.9377194047 0.9354752898
+ 0.9318435788 0.9379928112 0.9357544780
+ 0.9321323037 0.9382662177 0.9360337257
+ 0.9324209094 0.9385395050 0.9363129139
+ 0.9327095747 0.9388129115 0.9365921021
+ 0.9329982996 0.9390863180 0.9368712902
+ 0.9332870245 0.9393597245 0.9371504188
+ 0.9335756898 0.9396330714 0.9374296069
+ 0.9338642955 0.9399064779 0.9377087951
+ 0.9341530204 0.9401686192 0.9379879832
+ 0.9344416857 0.9404249191 0.9382671714
+ 0.9347304106 0.9406812787 0.9385464191
+ 0.9350190163 0.9409375787 0.9388254881
+ 0.9353076816 0.9411938787 0.9391046762
+ 0.9355964065 0.9414501786 0.9393839240
+ 0.9358850718 0.9417064786 0.9396631122
+ 0.9361737967 0.9419627786 0.9399423003
+ 0.9364624023 0.9422190785 0.9402080774
+ 0.9367511272 0.9424753785 0.9404703975
+ 0.9370397925 0.9427316785 0.9407327771
+ 0.9373285174 0.9429879785 0.9409950972
+ 0.9376171827 0.9432442784 0.9412574172
+ 0.9379057884 0.9435005784 0.9415196776
+ 0.9381945133 0.9437568784 0.9417821169
+ 0.9384831786 0.9440131783 0.9420443773
+ 0.9387719035 0.9442694783 0.9423066974
+ 0.9390605092 0.9445257783 0.9425690770
+ 0.9393491745 0.9447820783 0.9428313971
+ 0.9396378994 0.9450383782 0.9430937171
+ 0.9399266243 0.9452946782 0.9433560967
+ 0.9402031898 0.9455509782 0.9436184168
+ 0.9404757023 0.9458072782 0.9438806772
+ 0.9407482743 0.9460635781 0.9441431165
+ 0.9410207868 0.9463198781 0.9444053769
+ 0.9412932992 0.9465761781 0.9446676970
+ 0.9415658712 0.9468324780 0.9449300170
+ 0.9418383837 0.9470888972 0.9451923966
+ 0.9421108961 0.9473451972 0.9454547167
+ 0.9423835278 0.9476014972 0.9457169771
+ 0.9426559806 0.9478577971 0.9459794164
+ 0.9429286122 0.9481140971 0.9462416768
+ 0.9432011247 0.9483703971 0.9465039968
+ 0.9434735775 0.9486266971 0.9467663765
+ 0.9437462091 0.9488829970 0.9470286965
+ 0.9440187216 0.9491392970 0.9472910166
+ 0.9442911744 0.9493955970 0.9475533962
+ 0.9445638061 0.9496518970 0.9478157163
+ 0.9448363185 0.9499081969 0.9480779767
+ 0.9451087713 0.9501543045 0.9483402967
+ 0.9453814030 0.9503946900 0.9486026764
+ 0.9456539154 0.9506351948 0.9488649964
+ 0.9459264278 0.9508755803 0.9491273165
+ 0.9461989999 0.9511160254 0.9493896961
+ 0.9464715123 0.9513564706 0.9496520162
+ 0.9467440248 0.9515969157 0.9499142766
+ 0.9470165968 0.9518373013 0.9501661062
+ 0.9472891092 0.9520778060 0.9504126906
+ 0.9475616217 0.9523181915 0.9506592751
+ 0.9478341937 0.9525585771 0.9509059787
+ 0.9481067061 0.9527990818 0.9511526227
+ 0.9483792186 0.9530395269 0.9513992071
+ 0.9486517906 0.9532799125 0.9516459107
+ 0.9489243031 0.9535202980 0.9518924952
+ 0.9491968155 0.9537608027 0.9521390796
+ 0.9494693875 0.9540011883 0.9523857832
+ 0.9497419000 0.9542415738 0.9526324272
+ 0.9500135779 0.9544820786 0.9528790116
+ 0.9502710104 0.9547225237 0.9531255960
+ 0.9505283833 0.9549629092 0.9533722997
+ 0.9507858157 0.9552034140 0.9536188841
+ 0.9510431886 0.9554437995 0.9538655281
+ 0.9513006210 0.9556841850 0.9541121721
+ 0.9515579939 0.9559246898 0.9543588161
+ 0.9518154263 0.9561650753 0.9546054006
+ 0.9520727992 0.9564055204 0.9548519850
+ 0.9523301721 0.9566460252 0.9550986886
+ 0.9525876045 0.9568864107 0.9553452730
+ 0.9528449774 0.9571267962 0.9555919170
+ 0.9531024098 0.9573671818 0.9558386207
+ 0.9533597827 0.9576076865 0.9560852051
+ 0.9536172152 0.9578480721 0.9563317895
+ 0.9538745880 0.9580885172 0.9565784931
+ 0.9541320205 0.9583290219 0.9568250775
+ 0.9543893933 0.9585694075 0.9570717216
+ 0.9546468258 0.9588097930 0.9573183060
+ 0.9549041986 0.9590502977 0.9575650096
+ 0.9551615715 0.9592906833 0.9578115940
+ 0.9554190040 0.9595311284 0.9580581784
+ 0.9556763768 0.9597715735 0.9583048820
+ 0.9559338093 0.9600113034 0.9585515261
+ 0.9561911821 0.9602369070 0.9587981105
+ 0.9564486146 0.9604626298 0.9590448141
+ 0.9567059875 0.9606882930 0.9592913985
+ 0.9569634199 0.9609140158 0.9595379829
+ 0.9572207928 0.9611396790 0.9597846270
+ 0.9574782252 0.9613652825 0.9600294232
+ 0.9577355981 0.9615910053 0.9602614045
+ 0.9579929709 0.9618167281 0.9604933858
+ 0.9582504034 0.9620423913 0.9607254267
+ 0.9585077763 0.9622681141 0.9609574080
+ 0.9587652087 0.9624937773 0.9611893892
+ 0.9590225816 0.9627193809 0.9614213705
+ 0.9592800140 0.9629451036 0.9616534114
+ 0.9595373869 0.9631708264 0.9618853927
+ 0.9597948194 0.9633964896 0.9621173739
+ 0.9600493908 0.9636222124 0.9623494148
+ 0.9602925777 0.9638478160 0.9625813961
+ 0.9605358243 0.9640734792 0.9628133774
+ 0.9607790112 0.9642992020 0.9630454183
+ 0.9610221982 0.9645249248 0.9632773995
+ 0.9612653852 0.9647505879 0.9635093808
+ 0.9615085721 0.9649763107 0.9637414217
+ 0.9617518187 0.9652019143 0.9639734030
+ 0.9619951248 0.9654275775 0.9642053843
+ 0.9622383118 0.9656533003 0.9644374251
+ 0.9624814987 0.9658790231 0.9646694064
+ 0.9627246857 0.9661046863 0.9649013877
+ 0.9629678726 0.9663304090 0.9651334286
+ 0.9632111192 0.9665560126 0.9653654099
+ 0.9634543061 0.9667816758 0.9655973911
+ 0.9636976123 0.9670073986 0.9658293724
+ 0.9639407992 0.9672331214 0.9660614133
+ 0.9641839862 0.9674587846 0.9662933946
+ 0.9644271731 0.9676843882 0.9665253758
+ 0.9646704197 0.9679101110 0.9667574167
+ 0.9649136066 0.9681357741 0.9669893980
+ 0.9651567936 0.9683614969 0.9672213793
+ 0.9654000998 0.9685872197 0.9674534202
+ 0.9656432867 0.9688128829 0.9676854014
+ 0.9658864737 0.9690384865 0.9679173827
+ 0.9661297202 0.9692642093 0.9681494236
+ 0.9663729072 0.9694898725 0.9683814049
+ 0.9666160941 0.9697155952 0.9686133862
+ 0.9668592811 0.9699413180 0.9688454270
+ 0.9671025276 0.9701567888 0.9690774083
+ 0.9673457742 0.9703688025 0.9693093896
+ 0.9675890207 0.9705808163 0.9695413709
+ 0.9678322077 0.9707927108 0.9697734118
+ 0.9680753946 0.9710047245 0.9700049758
+ 0.9683185816 0.9712166786 0.9702234268
+ 0.9685618281 0.9714285731 0.9704418182
+ 0.9688050151 0.9716405869 0.9706600904
+ 0.9690483212 0.9718526006 0.9708784819
+ 0.9692915082 0.9720646143 0.9710968733
+ 0.9695346951 0.9722765088 0.9713152051
+ 0.9697778821 0.9724885225 0.9715335965
+ 0.9700199962 0.9727004766 0.9717519283
+ 0.9702498913 0.9729124904 0.9719703197
+ 0.9704797864 0.9731243849 0.9721887112
+ 0.9707096815 0.9733363986 0.9724069834
+ 0.9709395766 0.9735484123 0.9726253748
+ 0.9711694717 0.9737603068 0.9728438258
+ 0.9713994265 0.9739723206 0.9730620980
+ 0.9716293812 0.9741842747 0.9732804894
+ 0.9718592763 0.9743962884 0.9734988213
+ 0.9720891714 0.9746081829 0.9737172127
+ 0.9723191261 0.9748201966 0.9739356041
+ 0.9725490212 0.9750322104 0.9741538763
+ 0.9727789164 0.9752442241 0.9743723273
+ 0.9730088115 0.9754561186 0.9745907187
+ 0.9732388258 0.9756680727 0.9748089910
+ 0.9734687209 0.9758800864 0.9750273824
+ 0.9736986160 0.9760921001 0.9752457142
+ 0.9739285111 0.9763039947 0.9754641056
+ 0.9741584063 0.9765160084 0.9756824970
+ 0.9743883014 0.9767280221 0.9759008288
+ 0.9746181965 0.9769399166 0.9761192203
+ 0.9748480916 0.9771518707 0.9763376117
+ 0.9750781059 0.9773638844 0.9765558839
+ 0.9753080010 0.9775758982 0.9767742753
+ 0.9755378962 0.9777877927 0.9769926071
+ 0.9757677913 0.9779998064 0.9772109985
+ 0.9759976864 0.9782118201 0.9774293900
+ 0.9762275815 0.9784237742 0.9776477218
+ 0.9764574766 0.9786357284 0.9778661132
+ 0.9766874909 0.9788476825 0.9780845046
+ 0.9769173861 0.9790596962 0.9783027768
+ 0.9771472812 0.9792717099 0.9785212278
+ 0.9773771763 0.9794836044 0.9787395000
+ 0.9776070714 0.9796956182 0.9789578915
+ 0.9778370261 0.9799075723 0.9791762829
+ 0.9780669212 0.9801123738 0.9793946147
+ 0.9782968760 0.9803115726 0.9796130061
+ 0.9785267711 0.9805107713 0.9798313975
+ 0.9787567258 0.9807100296 0.9800468087
+ 0.9789866209 0.9809092879 0.9802525043
+ 0.9792165160 0.9811084867 0.9804580808
+ 0.9794464111 0.9813076854 0.9806637764
+ 0.9796763062 0.9815068841 0.9808694124
+ 0.9799063206 0.9817062020 0.9810751081
+ 0.9801288247 0.9819054008 0.9812806845
+ 0.9803462029 0.9821045995 0.9814863801
+ 0.9805637002 0.9823039174 0.9816920161
+ 0.9807810783 0.9825031161 0.9818977118
+ 0.9809985757 0.9827023149 0.9821032882
+ 0.9812160134 0.9829015136 0.9823089838
+ 0.9814333916 0.9831007719 0.9825146198
+ 0.9816508889 0.9832999706 0.9827203155
+ 0.9818683267 0.9834992290 0.9829258919
+ 0.9820858240 0.9836984277 0.9831315875
+ 0.9823032022 0.9838976860 0.9833372235
+ 0.9825206995 0.9840968847 0.9835429192
+ 0.9827380776 0.9842960835 0.9837484956
+ 0.9829555154 0.9844954014 0.9839541912
+ 0.9831730127 0.9846946001 0.9841598272
+ 0.9833903909 0.9848937988 0.9843655229
+ 0.9836078882 0.9850929976 0.9845710993
+ 0.9838253260 0.9852923155 0.9847767949
+ 0.9840428233 0.9854915142 0.9849823713
+ 0.9842602015 0.9856907129 0.9851881266
+ 0.9844775796 0.9858899117 0.9853937030
+ 0.9846950769 0.9860892296 0.9855993986
+ 0.9849125147 0.9862884283 0.9858049750
+ 0.9851300120 0.9864876270 0.9860106707
+ 0.9853473902 0.9866868854 0.9862163067
+ 0.9855648875 0.9868860841 0.9864220023
+ 0.9857823253 0.9870852828 0.9866275787
+ 0.9859997034 0.9872844815 0.9868332744
+ 0.9862172008 0.9874837995 0.9870389104
+ 0.9864345789 0.9876829982 0.9872446060
+ 0.9866520762 0.9878821969 0.9874501824
+ 0.9868695140 0.9880813956 0.9876558781
+ 0.9870870113 0.9882807136 0.9878615141
+ 0.9873043895 0.9884799123 0.9880672097
+ 0.9875218272 0.9886791110 0.9882727861
+ 0.9877393246 0.9888783097 0.9884784818
+ 0.9879567027 0.9890776277 0.9886841178
+ 0.9881742001 0.9892768264 0.9888898134
+ 0.9883915782 0.9894760251 0.9890953898
+ 0.9886090755 0.9896752834 0.9893010855
+ 0.9888265133 0.9898744822 0.9895067215
+ 0.9890438914 0.9900693297 0.9897124171
+ 0.9892613888 0.9902567267 0.9899179935
+ 0.9894788265 0.9904441237 0.9901164770
+ 0.9896963239 0.9906314015 0.9903103113
+ 0.9899137020 0.9908187985 0.9905040860
+ 0.9901241064 0.9910061955 0.9906979203
+ 0.9903299212 0.9911935925 0.9908916950
+ 0.9905356169 0.9913808703 0.9910855293
+ 0.9907413721 0.9915683270 0.9912793040
+ 0.9909471273 0.9917557240 0.9914730787
+ 0.9911528230 0.9919430017 0.9916669130
+ 0.9913585782 0.9921303988 0.9918606877
+ 0.9915642738 0.9923177958 0.9920545220
+ 0.9917700887 0.9925051928 0.9922482967
+ 0.9919757843 0.9926924706 0.9924420118
+ 0.9921815991 0.9928799272 0.9926357865
+ 0.9923872948 0.9930673242 0.9928296208
+ 0.9925931096 0.9932546020 0.9930233955
+ 0.9927988052 0.9934419990 0.9932171702
+ 0.9930046201 0.9936293960 0.9934110045
+ 0.9932103157 0.9938166738 0.9936047792
+ 0.9934160709 0.9940040708 0.9937986135
+ 0.9936218262 0.9941915274 0.9939923882
+ 0.9938275814 0.9943789244 0.9941862226
+ 0.9940332770 0.9945662022 0.9943799973
+ 0.9942390919 0.9947535992 0.9945737720
+ 0.9944447875 0.9949409962 0.9947676063
+ 0.9946506023 0.9951282740 0.9949613810
+ 0.9948562980 0.9953156710 0.9951552153
+ 0.9950621128 0.9955031276 0.9953489900
+ 0.9952678084 0.9956905246 0.9955427051
+ 0.9954735041 0.9958778024 0.9957364798
+ 0.9956793189 0.9960651994 0.9959303141
+ 0.9958850145 0.9962525964 0.9961240888
+ 0.9960908294 0.9964398742 0.9963179231
+ 0.9962965250 0.9966272712 0.9965116978
+ 0.9965022802 0.9968147278 0.9967054725
+ 0.9967079759 0.9970021248 0.9968993068
+ 0.9969137907 0.9971894026 0.9970930815
+ 0.9971194863 0.9973767996 0.9972869158
+ 0.9973253012 0.9975641966 0.9974806905
+ 0.9975309968 0.9977514744 0.9976745248
+ 0.9977368116 0.9979388714 0.9978682995
+ 0.9979425073 0.9981263280 0.9980620742
+ 0.9981483221 0.9983137250 0.9982559085
+ 0.9983540177 0.9985010028 0.9984496832
+ 0.9985597730 0.9986883998 0.9986433983
+ 0.9987655282 0.9988757968 0.9988371730
+ 0.9989712834 0.9990630746 0.9990310073
+ 0.9991769791 0.9992504716 0.9992247820
+ 0.9993827939 0.9994379282 0.9994186163
+ 0.9995884895 0.9996253252 0.9996123910
+ 0.9997943044 0.9998126030 0.9998062253
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/kodak_dscs_3152.spi1d b/release/datafiles/colormanagement/luts/film_response/kodak_dscs_3152.spi1d
new file mode 100644
index 00000000000..a144a4e50df
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/kodak_dscs_3152.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0031291239 0.0033278200 0.0041153808
+ 0.0062582470 0.0066556409 0.0082307607
+ 0.0093873711 0.0099834614 0.0125252204
+ 0.0128003703 0.0136352098 0.0169547293
+ 0.0162824895 0.0172885899 0.0214768499
+ 0.0197646003 0.0210279003 0.0262027308
+ 0.0235934593 0.0250145998 0.0309809893
+ 0.0274474602 0.0290013105 0.0359734409
+ 0.0314300507 0.0332363509 0.0410094596
+ 0.0356648304 0.0375544094 0.0462271497
+ 0.0398996100 0.0420100689 0.0514931008
+ 0.0445012413 0.0466454811 0.0568850897
+ 0.0491117798 0.0513610095 0.0623264983
+ 0.0540077388 0.0562863797 0.0678355098
+ 0.0589718111 0.0612730384 0.0733793527
+ 0.0641835630 0.0664475709 0.0789457336
+ 0.0694600120 0.0716837272 0.0845116675
+ 0.0749636367 0.0770548731 0.0900767818
+ 0.0805091709 0.0824873224 0.0955895111
+ 0.0862180665 0.0879941806 0.1010826975
+ 0.0919598788 0.0935461521 0.1064976007
+ 0.0977663025 0.0991239473 0.1118654013
+ 0.1035818979 0.1047077999 0.1171469018
+ 0.1094032973 0.1102901995 0.1223551035
+ 0.1151698977 0.1158241034 0.1274771988
+ 0.1209099963 0.1213333011 0.1325096041
+ 0.1265448928 0.1267662942 0.1374547929
+ 0.1321122050 0.1321426034 0.1423096061
+ 0.1375723034 0.1374354064 0.1470683962
+ 0.1429159939 0.1426412016 0.1517543048
+ 0.1481667012 0.1477651000 0.1563231945
+ 0.1532676965 0.1527830958 0.1608552933
+ 0.1582884043 0.1577192992 0.1652355939
+ 0.1631516069 0.1625491977 0.1696159989
+ 0.1679333001 0.1672876030 0.1738290042
+ 0.1725793928 0.1719401926 0.1780259013
+ 0.1771221012 0.1764778048 0.1821296066
+ 0.1815796942 0.1809709072 0.1861504018
+ 0.1858897954 0.1853097975 0.1901641935
+ 0.1901896000 0.1896487027 0.1940180957
+ 0.1942777932 0.1938105971 0.1978719980
+ 0.1983660012 0.1979569942 0.2016555071
+ 0.2023289055 0.2020100057 0.2053523958
+ 0.2062083930 0.2059722990 0.2090492994
+ 0.2100834996 0.2099346966 0.2126373947
+ 0.2137690037 0.2137262970 0.2161877006
+ 0.2174544036 0.2175149024 0.2197380066
+ 0.2210844010 0.2212477028 0.2231622040
+ 0.2245907933 0.2248737961 0.2265762985
+ 0.2280972004 0.2284999043 0.2299904972
+ 0.2315285057 0.2320373952 0.2332790941
+ 0.2348707020 0.2355124056 0.2365673035
+ 0.2382130027 0.2389874011 0.2398556024
+ 0.2414855063 0.2423633039 0.2430329025
+ 0.2446777970 0.2456984967 0.2462050021
+ 0.2478702068 0.2490337044 0.2493772060
+ 0.2510173023 0.2522774041 0.2524636090
+ 0.2540734112 0.2554838061 0.2555291057
+ 0.2571294904 0.2586902976 0.2585946023
+ 0.2601780891 0.2618266940 0.2616071105
+ 0.2631106079 0.2649149001 0.2645747066
+ 0.2660430968 0.2680031061 0.2675423026
+ 0.2689755857 0.2710529864 0.2704944909
+ 0.2718352973 0.2740328908 0.2733725905
+ 0.2746559978 0.2770127952 0.2762506008
+ 0.2774766088 0.2799926102 0.2791286111
+ 0.2802866101 0.2828738093 0.2819496095
+ 0.2830061018 0.2857545912 0.2847456932
+ 0.2857257128 0.2886354923 0.2875418067
+ 0.2884452939 0.2914687991 0.2903288901
+ 0.2911258042 0.2942593992 0.2930502892
+ 0.2937541902 0.2970499098 0.2957716882
+ 0.2963826954 0.2998403907 0.2984930873
+ 0.2990111113 0.3025532961 0.3011840880
+ 0.3015882969 0.3052614927 0.3038372993
+ 0.3041346967 0.3079696894 0.3064906001
+ 0.3066810966 0.3106591105 0.3091438115
+ 0.3092274964 0.3132922947 0.3117550015
+ 0.3117223978 0.3159255981 0.3143461943
+ 0.3141950965 0.3185588121 0.3169373870
+ 0.3166677058 0.3211610913 0.3195286095
+ 0.3191402853 0.3237262070 0.3220736086
+ 0.3215698004 0.3262912929 0.3246082962
+ 0.3239761889 0.3288562894 0.3271430135
+ 0.3263826966 0.3313871026 0.3296777904
+ 0.3287890851 0.3338901997 0.3321677148
+ 0.3311660886 0.3363932967 0.3346511126
+ 0.3335132897 0.3388963938 0.3371345103
+ 0.3358604908 0.3413681090 0.3396179080
+ 0.3382078111 0.3438149989 0.3420617878
+ 0.3405424953 0.3462618887 0.3444986045
+ 0.3428367972 0.3487088084 0.3469353914
+ 0.3451310992 0.3511315882 0.3493720889
+ 0.3474254012 0.3535273969 0.3517774940
+ 0.3497197032 0.3559232950 0.3541719019
+ 0.3519726098 0.3583191037 0.3565663099
+ 0.3542197943 0.3607012033 0.3589606881
+ 0.3564670086 0.3630507886 0.3613333106
+ 0.3587141931 0.3654003143 0.3636893034
+ 0.3609434068 0.3677498996 0.3660452068
+ 0.3631486893 0.3700976968 0.3684011996
+ 0.3653540909 0.3724052906 0.3707458973
+ 0.3675594032 0.3747127950 0.3730669022
+ 0.3697646856 0.3770203888 0.3753877878
+ 0.3719370067 0.3793280125 0.3777087927
+ 0.3741051853 0.3816084862 0.3800294101
+ 0.3762735128 0.3838779926 0.3823184967
+ 0.3784418106 0.3861474097 0.3846076131
+ 0.3806008995 0.3884168863 0.3868967891
+ 0.3827365041 0.3906759024 0.3891859055
+ 0.3848721981 0.3929106891 0.3914563060
+ 0.3870078027 0.3951455057 0.3937163949
+ 0.3891434073 0.3973802924 0.3959765136
+ 0.3912619054 0.3996151090 0.3982365131
+ 0.3933688104 0.4018237889 0.4004907012
+ 0.3954758048 0.4040271044 0.4027242064
+ 0.3975827098 0.4062303007 0.4049575925
+ 0.3996897042 0.4084335864 0.4071910083
+ 0.4017753005 0.4106284976 0.4094245136
+ 0.4038572013 0.4128029048 0.4116396904
+ 0.4059390128 0.4149773121 0.4138484895
+ 0.4080209136 0.4171518087 0.4160574079
+ 0.4101017118 0.4193261862 0.4182662964
+ 0.4121617079 0.4214822948 0.4204702079
+ 0.4142217934 0.4236302078 0.4226562977
+ 0.4162817895 0.4257782102 0.4248422980
+ 0.4183419049 0.4279260933 0.4270282984
+ 0.4203982055 0.4300732017 0.4292142987
+ 0.4224393070 0.4321965873 0.4313865900
+ 0.4244804084 0.4343200028 0.4335511923
+ 0.4265213907 0.4364433885 0.4357157946
+ 0.4285624921 0.4385668933 0.4378803074
+ 0.4305987060 0.4406827986 0.4400444925
+ 0.4326233864 0.4427833855 0.4421885908
+ 0.4346480072 0.4448839128 0.4443328083
+ 0.4366726875 0.4469844997 0.4464769065
+ 0.4386973083 0.4490849972 0.4486210942
+ 0.4407168925 0.4511733949 0.4507581890
+ 0.4427272975 0.4532522857 0.4528825879
+ 0.4447377026 0.4553312063 0.4550068974
+ 0.4467481077 0.4574100971 0.4571312964
+ 0.4487585127 0.4594889879 0.4592556953
+ 0.4507640898 0.4615522921 0.4613674879
+ 0.4527620971 0.4636105001 0.4634723961
+ 0.4547601044 0.4656687081 0.4655773938
+ 0.4567581117 0.4677268863 0.4676823020
+ 0.4587559998 0.4697850943 0.4697872102
+ 0.4607498944 0.4718252122 0.4718747139
+ 0.4627369046 0.4738632143 0.4739601016
+ 0.4647239149 0.4759013057 0.4760456085
+ 0.4667108953 0.4779393077 0.4781309962
+ 0.4686979055 0.4799773097 0.4802143872
+ 0.4706814885 0.4819954932 0.4822798967
+ 0.4726586044 0.4840134084 0.4843454957
+ 0.4746356905 0.4860314131 0.4864110053
+ 0.4766128063 0.4880493879 0.4884765148
+ 0.4785900116 0.4900667071 0.4905366004
+ 0.4805643857 0.4920643866 0.4925814867
+ 0.4825324118 0.4940621853 0.4946263134
+ 0.4845002890 0.4960598946 0.4966711104
+ 0.4864681959 0.4980576038 0.4987159967
+ 0.4884361029 0.5000547767 0.5007526875
+ 0.4904021919 0.5020316839 0.5027757287
+ 0.4923611879 0.5040085912 0.5047987103
+ 0.4943202138 0.5059854984 0.5068216920
+ 0.4962792099 0.5079624057 0.5088446140
+ 0.4982382059 0.5099393129 0.5108575821
+ 0.5001962185 0.5118951201 0.5128573179
+ 0.5021461844 0.5138502121 0.5148568749
+ 0.5040960908 0.5158053041 0.5168566108
+ 0.5060459971 0.5177603960 0.5188562870
+ 0.5079959035 0.5197154880 0.5208451152
+ 0.5099458098 0.5216509104 0.5228195786
+ 0.5118862987 0.5235828757 0.5247941017
+ 0.5138264894 0.5255150199 0.5267686248
+ 0.5157666802 0.5274469852 0.5287430882
+ 0.5177068710 0.5293790102 0.5307077169
+ 0.5196471214 0.5312942863 0.5326548815
+ 0.5215784907 0.5332015157 0.5346019864
+ 0.5235080123 0.5351088047 0.5365492105
+ 0.5254374146 0.5370160937 0.5384963751
+ 0.5273668766 0.5389233828 0.5404369235
+ 0.5292963982 0.5408189893 0.5423542857
+ 0.5312179923 0.5426995754 0.5442718267
+ 0.5331351161 0.5445801020 0.5461893082
+ 0.5350522995 0.5464606881 0.5481067896
+ 0.5369694829 0.5483412743 0.5500237942
+ 0.5388866067 0.5502184033 0.5519090295
+ 0.5407978296 0.5520700216 0.5537940860
+ 0.5427005887 0.5539215803 0.5556792021
+ 0.5446034074 0.5557731986 0.5575643778
+ 0.5465062857 0.5576248169 0.5594494939
+ 0.5484091043 0.5594763756 0.5613096952
+ 0.5503091812 0.5613054037 0.5631597042
+ 0.5521953106 0.5631254911 0.5650097132
+ 0.5540813208 0.5649455786 0.5668596029
+ 0.5559673905 0.5667657256 0.5687096119
+ 0.5578534007 0.5685858130 0.5705479980
+ 0.5597394705 0.5703982711 0.5723599195
+ 0.5616086125 0.5721842051 0.5741717219
+ 0.5634748936 0.5739700794 0.5759835839
+ 0.5653412938 0.5757560730 0.5777953863
+ 0.5672075748 0.5775420070 0.5796073079
+ 0.5690739751 0.5793278813 0.5813869238
+ 0.5709286928 0.5810908079 0.5831577182
+ 0.5727720857 0.5828397274 0.5849283934
+ 0.5746154189 0.5845885873 0.5866991878
+ 0.5764586926 0.5863376260 0.5884699821
+ 0.5783020854 0.5880864859 0.5902346969
+ 0.5801432729 0.5898354053 0.5919613838
+ 0.5819600224 0.5915482044 0.5936880708
+ 0.5837767124 0.5932571888 0.5954148173
+ 0.5855932832 0.5949661732 0.5971413851
+ 0.5874099731 0.5966752172 0.5988680720
+ 0.5892267227 0.5983842015 0.6005786061
+ 0.5910258293 0.6000909209 0.6022583842
+ 0.5928118229 0.6017571092 0.6039381027
+ 0.5945978761 0.6034232974 0.6056178212
+ 0.5963839889 0.6050894856 0.6072975993
+ 0.5981701016 0.6067556739 0.6089773178
+ 0.5999560952 0.6084219217 0.6106376052
+ 0.6017082930 0.6100856066 0.6122676730
+ 0.6034597158 0.6117061973 0.6138976812
+ 0.6052110195 0.6133267879 0.6155278087
+ 0.6069623828 0.6149473190 0.6171578765
+ 0.6087138057 0.6165679097 0.6187878847
+ 0.6104547977 0.6181885004 0.6204046011
+ 0.6121671796 0.6198089719 0.6219825745
+ 0.6138796806 0.6213870049 0.6235604882
+ 0.6155921221 0.6229591966 0.6251384020
+ 0.6173046231 0.6245315075 0.6267163754
+ 0.6190170050 0.6261038184 0.6282942891
+ 0.6207110882 0.6276760101 0.6298722029
+ 0.6223804951 0.6292483211 0.6314002275
+ 0.6240499020 0.6307939887 0.6329237819
+ 0.6257191896 0.6323155761 0.6344473958
+ 0.6273885965 0.6338371038 0.6359710097
+ 0.6290580034 0.6353585720 0.6374946237
+ 0.6307067871 0.6368800998 0.6390182972
+ 0.6323291063 0.6384016275 0.6405218840
+ 0.6339514256 0.6399230957 0.6419894099
+ 0.6355736852 0.6413943768 0.6434568167
+ 0.6371960044 0.6428629756 0.6449242830
+ 0.6388183236 0.6443315744 0.6463916898
+ 0.6404266953 0.6458001733 0.6478592157
+ 0.6419981718 0.6472687721 0.6493266225
+ 0.6435695887 0.6487373710 0.6507629156
+ 0.6451410055 0.6501982808 0.6521728039
+ 0.6467124820 0.6516122222 0.6535826921
+ 0.6482838988 0.6530259848 0.6549925208
+ 0.6498553753 0.6544399261 0.6564024091
+ 0.6513776183 0.6558538079 0.6578121781
+ 0.6528947949 0.6572676897 0.6592221260
+ 0.6544119716 0.6586815119 0.6606057286
+ 0.6559292078 0.6600915790 0.6619569063
+ 0.6574463844 0.6614493132 0.6633082032
+ 0.6589636207 0.6628069878 0.6646593809
+ 0.6604626775 0.6641647220 0.6660106778
+ 0.6619228125 0.6655225158 0.6673619151
+ 0.6633828282 0.6668801904 0.6687130928
+ 0.6648429036 0.6682379246 0.6700615883
+ 0.6663029790 0.6695955992 0.6713535786
+ 0.6677629948 0.6709131002 0.6726456285
+ 0.6692231297 0.6722136736 0.6739376187
+ 0.6706553102 0.6735141873 0.6752296090
+ 0.6720557809 0.6748147011 0.6765217185
+ 0.6734563112 0.6761152148 0.6778137088
+ 0.6748567820 0.6774157286 0.6791056991
+ 0.6762573719 0.6787163019 0.6803793907
+ 0.6776579022 0.6800159812 0.6816120744
+ 0.6790583730 0.6812587976 0.6828446984
+ 0.6804388165 0.6825014949 0.6840773225
+ 0.6817780137 0.6837441921 0.6853098869
+ 0.6831172109 0.6849870086 0.6865425110
+ 0.6844564080 0.6862297058 0.6877751946
+ 0.6857956052 0.6874724030 0.6890078187
+ 0.6871348023 0.6887152195 0.6902288795
+ 0.6884739995 0.6899579167 0.6914023161
+ 0.6898130774 0.6911445856 0.6925758123
+ 0.6910985112 0.6923294067 0.6937493086
+ 0.6923751831 0.6935142279 0.6949226856
+ 0.6936519146 0.6946989894 0.6960961819
+ 0.6949285269 0.6958836913 0.6972696185
+ 0.6962051988 0.6970685124 0.6984431148
+ 0.6974818110 0.6982532740 0.6996166110
+ 0.6987584829 0.6994379759 0.7007505894
+ 0.7000334263 0.7005925179 0.7018656135
+ 0.7012469769 0.7017195225 0.7029805183
+ 0.7024605870 0.7028465867 0.7040954232
+ 0.7036740780 0.7039735913 0.7052103281
+ 0.7048876882 0.7051007152 0.7063252926
+ 0.7061012983 0.7062277198 0.7074401975
+ 0.7073147893 0.7073547244 0.7085551023
+ 0.7085283995 0.7084817886 0.7096700072
+ 0.7097420096 0.7096087933 0.7107443810
+ 0.7109059095 0.7106986046 0.7118018270
+ 0.7120562792 0.7117685080 0.7128592134
+ 0.7132068276 0.7128384709 0.7139164805
+ 0.7143573165 0.7139083743 0.7149739265
+ 0.7155078053 0.7149783969 0.7160311937
+ 0.7166582942 0.7160483003 0.7170885801
+ 0.7178087831 0.7171183228 0.7181460261
+ 0.7189592123 0.7181882262 0.7192032933
+ 0.7201038003 0.7192581296 0.7202467918
+ 0.7211917043 0.7203109264 0.7212479115
+ 0.7222797275 0.7213246822 0.7222489715
+ 0.7233676910 0.7223384976 0.7232500911
+ 0.7244557142 0.7233523130 0.7242512107
+ 0.7255436182 0.7243661284 0.7252522707
+ 0.7266315818 0.7253798842 0.7262532711
+ 0.7277196050 0.7263938189 0.7272543907
+ 0.7288076282 0.7274075747 0.7282555103
+ 0.7298954725 0.7284213901 0.7292565703
+ 0.7309280038 0.7294352055 0.7302436233
+ 0.7319545150 0.7304247022 0.7311900258
+ 0.7329810262 0.7313836813 0.7321363091
+ 0.7340075970 0.7323426008 0.7330827117
+ 0.7350341082 0.7333015800 0.7340291142
+ 0.7360606194 0.7342606187 0.7349753976
+ 0.7370871902 0.7352195978 0.7359218001
+ 0.7381137013 0.7361785173 0.7368682027
+ 0.7391402125 0.7371374965 0.7378144860
+ 0.7401570082 0.7380964756 0.7387608886
+ 0.7411236167 0.7390553951 0.7397072911
+ 0.7420902252 0.7400135994 0.7406170964
+ 0.7430567741 0.7409192920 0.7415105104
+ 0.7440233827 0.7418249249 0.7424039245
+ 0.7449899912 0.7427306175 0.7432973981
+ 0.7459564805 0.7436363101 0.7441908121
+ 0.7469230890 0.7445420027 0.7450842261
+ 0.7478896976 0.7454476953 0.7459775805
+ 0.7488563061 0.7463533282 0.7468711138
+ 0.7498229146 0.7472590208 0.7477645278
+ 0.7507420182 0.7481647134 0.7486578822
+ 0.7516505122 0.7490704060 0.7495512962
+ 0.7525590062 0.7499759793 0.7504193783
+ 0.7534675002 0.7508316040 0.7512617707
+ 0.7543759942 0.7516856790 0.7521042824
+ 0.7552844882 0.7525398731 0.7529466748
+ 0.7561929822 0.7533940077 0.7537891269
+ 0.7571014762 0.7542482018 0.7546315789
+ 0.7580100298 0.7551022768 0.7554739714
+ 0.7589185238 0.7559564710 0.7563164234
+ 0.7598270178 0.7568106055 0.7571588755
+ 0.7606902122 0.7576647997 0.7580013275
+ 0.7615427971 0.7585189939 0.7588437796
+ 0.7623953223 0.7593731284 0.7596861720
+ 0.7632479072 0.7602140903 0.7604979873
+ 0.7641004920 0.7610186934 0.7612915039
+ 0.7649530172 0.7618231773 0.7620850205
+ 0.7658056021 0.7626277804 0.7628785968
+ 0.7666581273 0.7634323835 0.7636721134
+ 0.7675107121 0.7642369866 0.7644655704
+ 0.7683631778 0.7650415897 0.7652592063
+ 0.7692158222 0.7658461928 0.7660527229
+ 0.7700641155 0.7666506767 0.7668461800
+ 0.7708631158 0.7674552798 0.7676398158
+ 0.7716619968 0.7682598829 0.7684332728
+ 0.7724609971 0.7690644860 0.7692267895
+ 0.7732599974 0.7698690891 0.7700191736
+ 0.7740589976 0.7706338763 0.7707660198
+ 0.7748579979 0.7713909745 0.7715128064
+ 0.7756569982 0.7721480131 0.7722595930
+ 0.7764559984 0.7729051113 0.7730063796
+ 0.7772548795 0.7736622095 0.7737532258
+ 0.7780538797 0.7744193077 0.7745000720
+ 0.7788528800 0.7751764059 0.7752469182
+ 0.7796518803 0.7759335041 0.7759937048
+ 0.7804220915 0.7766906023 0.7767404914
+ 0.7811700106 0.7774475813 0.7774872780
+ 0.7819179296 0.7782046795 0.7782341242
+ 0.7826659083 0.7789617777 0.7789809108
+ 0.7834138274 0.7797188759 0.7797278166
+ 0.7841616869 0.7804474831 0.7804462910
+ 0.7849097252 0.7811592221 0.7811486125
+ 0.7856575847 0.7818710208 0.7818508744
+ 0.7864055037 0.7825827003 0.7825533152
+ 0.7871534824 0.7832944989 0.7832555771
+ 0.7879014015 0.7840061784 0.7839578986
+ 0.7886493206 0.7847179770 0.7846602201
+ 0.7893972993 0.7854297161 0.7853626013
+ 0.7901358008 0.7861415148 0.7860649228
+ 0.7908353209 0.7868531942 0.7867671847
+ 0.7915347815 0.7875649929 0.7874695063
+ 0.7922343016 0.7882766724 0.7881718874
+ 0.7929338217 0.7889884710 0.7888742089
+ 0.7936332226 0.7897002101 0.7895764709
+ 0.7943326831 0.7903869748 0.7902621031
+ 0.7950322032 0.7910556793 0.7909221053
+ 0.7957317233 0.7917243242 0.7915822268
+ 0.7964311838 0.7923929095 0.7922422886
+ 0.7971307039 0.7930616140 0.7929024100
+ 0.7978302240 0.7937301993 0.7935624719
+ 0.7985296845 0.7943987846 0.7942225933
+ 0.7992292047 0.7950674891 0.7948827147
+ 0.7999287248 0.7957360744 0.7955427766
+ 0.8005871177 0.7964047194 0.7962027788
+ 0.8012408018 0.7970734239 0.7968629003
+ 0.8018944860 0.7977420092 0.7975230217
+ 0.8025482297 0.7984105945 0.7981830835
+ 0.8032019138 0.7990792990 0.7988432050
+ 0.8038555980 0.7997478843 0.7995033264
+ 0.8045094013 0.8003910780 0.8001534939
+ 0.8051630855 0.8010187745 0.8007736206
+ 0.8058168292 0.8016465902 0.8013936877
+ 0.8064705133 0.8022742867 0.8020138144
+ 0.8071241975 0.8029021025 0.8026338816
+ 0.8077778816 0.8035297990 0.8032540083
+ 0.8084316254 0.8041576147 0.8038740754
+ 0.8090854287 0.8047853112 0.8044942021
+ 0.8097391129 0.8054131269 0.8051143289
+ 0.8103669286 0.8060408235 0.8057343960
+ 0.8109775186 0.8066685796 0.8063545227
+ 0.8115881085 0.8072962761 0.8069745898
+ 0.8121985793 0.8079240918 0.8075947165
+ 0.8128092289 0.8085517883 0.8082147837
+ 0.8134198189 0.8091796041 0.8088349104
+ 0.8140304089 0.8098073006 0.8094549775
+ 0.8146409988 0.8104082942 0.8100705743
+ 0.8152515888 0.8109974265 0.8106529117
+ 0.8158621788 0.8115864992 0.8112351894
+ 0.8164728284 0.8121755719 0.8118175864
+ 0.8170834184 0.8127647042 0.8123999238
+ 0.8176940084 0.8133537173 0.8129822016
+ 0.8183045983 0.8139427900 0.8135645986
+ 0.8189151883 0.8145319223 0.8141468763
+ 0.8195257187 0.8151209950 0.8147292733
+ 0.8201273084 0.8157101274 0.8153116107
+ 0.8206974268 0.8162992001 0.8158938885
+ 0.8212674856 0.8168882728 0.8164762855
+ 0.8218376040 0.8174774051 0.8170586228
+ 0.8224077225 0.8180664778 0.8176409006
+ 0.8229777813 0.8186556101 0.8182232976
+ 0.8235478997 0.8192446828 0.8188055754
+ 0.8241178989 0.8198336959 0.8193879724
+ 0.8246880174 0.8203967214 0.8199703097
+ 0.8252580762 0.8209493160 0.8205189109
+ 0.8258281946 0.8215019107 0.8210656047
+ 0.8263983130 0.8220545053 0.8216122985
+ 0.8269683719 0.8226072192 0.8221591115
+ 0.8275384903 0.8231598139 0.8227058053
+ 0.8281086087 0.8237124085 0.8232526183
+ 0.8286787271 0.8242650032 0.8237993121
+ 0.8292487860 0.8248177171 0.8243461251
+ 0.8298189044 0.8253703117 0.8248928189
+ 0.8303630948 0.8259229064 0.8254395127
+ 0.8308951855 0.8264755011 0.8259863257
+ 0.8314273953 0.8270282149 0.8265330195
+ 0.8319594860 0.8275808096 0.8270797729
+ 0.8324916959 0.8281334043 0.8276265264
+ 0.8330239058 0.8286859989 0.8281732798
+ 0.8335559964 0.8292385936 0.8287199736
+ 0.8340882063 0.8297913074 0.8292667866
+ 0.8346202970 0.8303225040 0.8298134804
+ 0.8351525068 0.8308408260 0.8303381801
+ 0.8356845975 0.8313590884 0.8308513761
+ 0.8362168074 0.8318774104 0.8313646913
+ 0.8367488980 0.8323956728 0.8318778872
+ 0.8372811079 0.8329139948 0.8323912024
+ 0.8378131986 0.8334323168 0.8329045177
+ 0.8383454084 0.8339505792 0.8334177136
+ 0.8388774991 0.8344689012 0.8339310288
+ 0.8394097090 0.8349872231 0.8344442248
+ 0.8399417996 0.8355054855 0.8349574804
+ 0.8404424191 0.8360238075 0.8354706764
+ 0.8409391046 0.8365421295 0.8359839916
+ 0.8414357901 0.8370603919 0.8364971876
+ 0.8419324756 0.8375787139 0.8370105028
+ 0.8424291015 0.8380969763 0.8375238180
+ 0.8429257870 0.8386152983 0.8380370140
+ 0.8434224725 0.8391336203 0.8385503292
+ 0.8439192176 0.8396518826 0.8390635252
+ 0.8444159031 0.8401595950 0.8395767808
+ 0.8449125886 0.8406456113 0.8400844932
+ 0.8454092741 0.8411316872 0.8405662775
+ 0.8459059000 0.8416177034 0.8410481215
+ 0.8464025855 0.8421037793 0.8415299058
+ 0.8468992710 0.8425897956 0.8420116901
+ 0.8473960161 0.8430758119 0.8424934745
+ 0.8478927016 0.8435618877 0.8429753184
+ 0.8483893871 0.8440479040 0.8434571028
+ 0.8488860130 0.8445339799 0.8439388871
+ 0.8493826985 0.8450199962 0.8444206715
+ 0.8498793840 0.8455060720 0.8449025154
+ 0.8503509760 0.8459920883 0.8453842998
+ 0.8508145809 0.8464781046 0.8458660841
+ 0.8512781858 0.8469641805 0.8463479280
+ 0.8517417908 0.8474501967 0.8468297124
+ 0.8522053957 0.8479362726 0.8473114967
+ 0.8526690006 0.8484222889 0.8477932811
+ 0.8531326056 0.8489084244 0.8482751250
+ 0.8535962105 0.8493943810 0.8487569094
+ 0.8540596962 0.8498803973 0.8492386937
+ 0.8545233011 0.8503437042 0.8497204781
+ 0.8549869061 0.8507995009 0.8501899242
+ 0.8554505110 0.8512551785 0.8506422043
+ 0.8559141159 0.8517109752 0.8510944843
+ 0.8563777208 0.8521667719 0.8515468240
+ 0.8568413258 0.8526226282 0.8519991040
+ 0.8573048711 0.8530784249 0.8524513841
+ 0.8577684760 0.8535342216 0.8529037237
+ 0.8582320213 0.8539898992 0.8533560038
+ 0.8586956263 0.8544456959 0.8538082838
+ 0.8591591716 0.8549014926 0.8542606235
+ 0.8596227765 0.8553572893 0.8547129035
+ 0.8600807190 0.8558130860 0.8551651835
+ 0.8605133891 0.8562688828 0.8556174040
+ 0.8609461784 0.8567246795 0.8560696840
+ 0.8613789082 0.8571804166 0.8565220237
+ 0.8618116975 0.8576362133 0.8569743037
+ 0.8622444272 0.8580920100 0.8574265838
+ 0.8626772165 0.8585478067 0.8578789234
+ 0.8631098866 0.8590036035 0.8583312035
+ 0.8635426760 0.8594594002 0.8587834835
+ 0.8639754057 0.8599150777 0.8592358232
+ 0.8644081950 0.8603479266 0.8596881032
+ 0.8648409247 0.8607752919 0.8601318002
+ 0.8652737141 0.8612027168 0.8605564237
+ 0.8657063842 0.8616302013 0.8609811068
+ 0.8661391735 0.8620576262 0.8614056706
+ 0.8665719032 0.8624849916 0.8618304133
+ 0.8670045733 0.8629124761 0.8622549772
+ 0.8674374223 0.8633399010 0.8626796007
+ 0.8678700924 0.8637673855 0.8631042838
+ 0.8683028817 0.8641948104 0.8635289073
+ 0.8687356114 0.8646221757 0.8639535904
+ 0.8691684008 0.8650497198 0.8643782139
+ 0.8696010709 0.8654770851 0.8648027778
+ 0.8700317144 0.8659045100 0.8652275205
+ 0.8704357147 0.8663319945 0.8656520844
+ 0.8708397746 0.8667594194 0.8660768270
+ 0.8712437749 0.8671867847 0.8665013909
+ 0.8716478944 0.8676143289 0.8669260740
+ 0.8720518947 0.8680416942 0.8673506975
+ 0.8724560142 0.8684691191 0.8677753210
+ 0.8728600144 0.8688966036 0.8682000041
+ 0.8732640743 0.8693240285 0.8686246276
+ 0.8736680746 0.8697515130 0.8690493107
+ 0.8740721941 0.8701677918 0.8694738746
+ 0.8744761944 0.8705686927 0.8698986173
+ 0.8748803139 0.8709695935 0.8703035116
+ 0.8752843142 0.8713704944 0.8707023263
+ 0.8756883740 0.8717713952 0.8711010218
+ 0.8760923743 0.8721722960 0.8714997768
+ 0.8764964938 0.8725731969 0.8718984723
+ 0.8769004941 0.8729740977 0.8722972870
+ 0.8773046136 0.8733749986 0.8726959825
+ 0.8777086139 0.8737758994 0.8730947971
+ 0.8781126738 0.8741769195 0.8734936118
+ 0.8785166740 0.8745778203 0.8738923073
+ 0.8789207935 0.8749787211 0.8742911220
+ 0.8793247938 0.8753796220 0.8746898174
+ 0.8797289133 0.8757805228 0.8750885725
+ 0.8801240921 0.8761814237 0.8754873276
+ 0.8805015087 0.8765823245 0.8758860826
+ 0.8808789253 0.8769832253 0.8762847781
+ 0.8812562227 0.8773841262 0.8766835928
+ 0.8816335797 0.8777850270 0.8770824075
+ 0.8820109963 0.8781859279 0.8774811029
+ 0.8823882937 0.8785868287 0.8778799176
+ 0.8827657104 0.8789877295 0.8782786131
+ 0.8831431270 0.8793885708 0.8786774278
+ 0.8835204244 0.8797894716 0.8790761232
+ 0.8838977814 0.8801786900 0.8794748783
+ 0.8842751980 0.8805547953 0.8798736930
+ 0.8846524954 0.8809309006 0.8802558780
+ 0.8850299120 0.8813070059 0.8806303740
+ 0.8854073286 0.8816831112 0.8810049891
+ 0.8857846260 0.8820592165 0.8813794851
+ 0.8861619830 0.8824353218 0.8817539811
+ 0.8865392804 0.8828114271 0.8821285963
+ 0.8869166970 0.8831874728 0.8825030923
+ 0.8872941136 0.8835635781 0.8828777075
+ 0.8876714110 0.8839396834 0.8832522035
+ 0.8880488276 0.8843157887 0.8836268187
+ 0.8884261847 0.8846918941 0.8840013146
+ 0.8888034821 0.8850679994 0.8843758106
+ 0.8891808987 0.8854441047 0.8847504258
+ 0.8895583153 0.8858202100 0.8851249218
+ 0.8899356127 0.8861963153 0.8854994774
+ 0.8902924061 0.8865724206 0.8858739734
+ 0.8906450272 0.8869485259 0.8862485886
+ 0.8909975886 0.8873245716 0.8866230845
+ 0.8913502097 0.8877006769 0.8869975805
+ 0.8917027116 0.8880767822 0.8873721957
+ 0.8920552731 0.8884528875 0.8877466917
+ 0.8924078941 0.8888289928 0.8881213069
+ 0.8927605152 0.8892050982 0.8884958029
+ 0.8931130171 0.8895812035 0.8888702989
+ 0.8934655786 0.8899573088 0.8892449141
+ 0.8938181996 0.8903127909 0.8896194100
+ 0.8941708207 0.8906658292 0.8899940252
+ 0.8945233226 0.8910186887 0.8903462291
+ 0.8948758841 0.8913716078 0.8906980753
+ 0.8952285051 0.8917245269 0.8910499811
+ 0.8955811262 0.8920775056 0.8914020061
+ 0.8959336281 0.8924304247 0.8917539120
+ 0.8962861896 0.8927832842 0.8921058178
+ 0.8966388106 0.8931362033 0.8924577236
+ 0.8969913721 0.8934891820 0.8928096294
+ 0.8973438740 0.8938421011 0.8931614757
+ 0.8976964951 0.8941950202 0.8935133815
+ 0.8980491161 0.8945478797 0.8938652873
+ 0.8984016776 0.8949009180 0.8942171931
+ 0.8987541795 0.8952537775 0.8945690989
+ 0.8991068006 0.8956066966 0.8949210048
+ 0.8994594216 0.8959596157 0.8952729106
+ 0.8998119831 0.8963125944 0.8956248164
+ 0.9001538157 0.8966655135 0.8959767222
+ 0.9004834294 0.8970183730 0.8963286281
+ 0.9008129239 0.8973712921 0.8966804743
+ 0.9011424780 0.8977242708 0.8970323801
+ 0.9014719725 0.8980771899 0.8973842859
+ 0.9018015862 0.8984301090 0.8977361917
+ 0.9021310806 0.8987830281 0.8980880976
+ 0.9024606943 0.8991360068 0.8984400034
+ 0.9027901888 0.8994889259 0.8987919092
+ 0.9031198025 0.8998417854 0.8991438150
+ 0.9034494162 0.9001827836 0.8994957209
+ 0.9037789106 0.9005141258 0.8998476267
+ 0.9041085243 0.9008454084 0.9001874924
+ 0.9044380188 0.9011766911 0.9005182981
+ 0.9047675729 0.9015079141 0.9008489847
+ 0.9050971270 0.9018391967 0.9011797905
+ 0.9054266810 0.9021704793 0.9015104771
+ 0.9057561755 0.9025018215 0.9018412828
+ 0.9060857892 0.9028331041 0.9021720290
+ 0.9064154029 0.9031643867 0.9025027752
+ 0.9067448974 0.9034956098 0.9028335214
+ 0.9070745111 0.9038268924 0.9031643271
+ 0.9074040055 0.9041581750 0.9034950137
+ 0.9077336192 0.9044895172 0.9038258195
+ 0.9080631137 0.9048207998 0.9041565061
+ 0.9083927274 0.9051520824 0.9044873118
+ 0.9087222219 0.9054833055 0.9048179984
+ 0.9090517759 0.9058145881 0.9051488042
+ 0.9093812704 0.9061458707 0.9054794908
+ 0.9097108841 0.9064772129 0.9058102965
+ 0.9100378156 0.9068084955 0.9061409831
+ 0.9103459716 0.9071397781 0.9064717889
+ 0.9106541872 0.9074711204 0.9068024755
+ 0.9109624028 0.9078022838 0.9071332812
+ 0.9112706184 0.9081336260 0.9074640274
+ 0.9115787745 0.9084649086 0.9077947140
+ 0.9118869901 0.9087961912 0.9081255198
+ 0.9121950865 0.9091274738 0.9084562063
+ 0.9125033021 0.9094588161 0.9087870121
+ 0.9128115177 0.9097899795 0.9091176987
+ 0.9131196737 0.9101138711 0.9094485044
+ 0.9134278893 0.9104250073 0.9097791910
+ 0.9137361050 0.9107360840 0.9101033807
+ 0.9140443206 0.9110472202 0.9104143977
+ 0.9143524766 0.9113582969 0.9107254148
+ 0.9146605730 0.9116693735 0.9110363722
+ 0.9149687886 0.9119803905 0.9113473892
+ 0.9152770042 0.9122915268 0.9116582870
+ 0.9155852199 0.9126026034 0.9119693041
+ 0.9158933759 0.9129136801 0.9122803211
+ 0.9162015915 0.9132248163 0.9125912786
+ 0.9165098071 0.9135358930 0.9129022956
+ 0.9168180227 0.9138470292 0.9132133126
+ 0.9171261191 0.9141579866 0.9135242105
+ 0.9174342752 0.9144691229 0.9138352275
+ 0.9177424908 0.9147801995 0.9141461849
+ 0.9180507064 0.9150912762 0.9144572020
+ 0.9183589220 0.9154024124 0.9147682190
+ 0.9186670780 0.9157134891 0.9150791764
+ 0.9189752936 0.9160246253 0.9153901935
+ 0.9192835093 0.9163355827 0.9157010913
+ 0.9195916057 0.9166467190 0.9160121083
+ 0.9198998213 0.9169577956 0.9163231254
+ 0.9201946259 0.9172688723 0.9166340828
+ 0.9204829931 0.9175800085 0.9169450998
+ 0.9207713008 0.9178910851 0.9172561169
+ 0.9210597277 0.9182022214 0.9175670147
+ 0.9213480949 0.9185131788 0.9178779721
+ 0.9216364026 0.9188243151 0.9181889892
+ 0.9219248295 0.9191353917 0.9185000062
+ 0.9222130775 0.9194465280 0.9188110232
+ 0.9225015044 0.9197576046 0.9191219807
+ 0.9227898717 0.9200645089 0.9194329977
+ 0.9230781794 0.9203566909 0.9197438955
+ 0.9233666062 0.9206489921 0.9200516939
+ 0.9236549139 0.9209411740 0.9203441739
+ 0.9239432812 0.9212334752 0.9206367135
+ 0.9242315888 0.9215257168 0.9209291935
+ 0.9245200157 0.9218178988 0.9212217927
+ 0.9248083830 0.9221101999 0.9215142727
+ 0.9250966907 0.9224023819 0.9218068123
+ 0.9253851175 0.9226946235 0.9220994115
+ 0.9256734252 0.9229869246 0.9223918915
+ 0.9259617925 0.9232791066 0.9226843715
+ 0.9262501001 0.9235714078 0.9229769111
+ 0.9265385270 0.9238635898 0.9232695103
+ 0.9268268943 0.9241557717 0.9235619903
+ 0.9271152020 0.9244480729 0.9238544703
+ 0.9274036288 0.9247403145 0.9241470098
+ 0.9276918769 0.9250324965 0.9244396091
+ 0.9279803038 0.9253247976 0.9247320890
+ 0.9282686710 0.9256169796 0.9250246286
+ 0.9285569787 0.9259092808 0.9253171086
+ 0.9288454056 0.9262015224 0.9256097078
+ 0.9291337132 0.9264937043 0.9259021878
+ 0.9294220805 0.9267860055 0.9261947274
+ 0.9297103882 0.9270781875 0.9264872074
+ 0.9299988151 0.9273704886 0.9267798066
+ 0.9302688241 0.9276626706 0.9270722866
+ 0.9305387735 0.9279549122 0.9273648262
+ 0.9308087826 0.9282472134 0.9276573062
+ 0.9310786724 0.9285393953 0.9279499054
+ 0.9313486814 0.9288315773 0.9282423854
+ 0.9316185713 0.9291238785 0.9285349250
+ 0.9318885803 0.9294161201 0.9288275242
+ 0.9321585298 0.9297084212 0.9291200042
+ 0.9324284792 0.9300006032 0.9294124842
+ 0.9326984882 0.9302752018 0.9297050238
+ 0.9329683781 0.9305499196 0.9299976230
+ 0.9332383871 0.9308245182 0.9302729964
+ 0.9335082769 0.9310991764 0.9305483103
+ 0.9337782860 0.9313737750 0.9308236241
+ 0.9340481758 0.9316484928 0.9310988784
+ 0.9343181849 0.9319230914 0.9313740730
+ 0.9345881939 0.9321978092 0.9316493869
+ 0.9348580837 0.9324725270 0.9319247007
+ 0.9351280928 0.9327471256 0.9322000146
+ 0.9353979826 0.9330217838 0.9324753284
+ 0.9356679916 0.9332963824 0.9327505827
+ 0.9359378815 0.9335711002 0.9330258965
+ 0.9362078905 0.9338456988 0.9333012104
+ 0.9364778996 0.9341204166 0.9335764050
+ 0.9367477894 0.9343950152 0.9338517189
+ 0.9370177984 0.9346696734 0.9341269732
+ 0.9372876883 0.9349442720 0.9344022870
+ 0.9375576973 0.9352189898 0.9346776009
+ 0.9378277063 0.9354937077 0.9349529147
+ 0.9380975962 0.9357683063 0.9352282286
+ 0.9383676052 0.9360430241 0.9355034828
+ 0.9386374950 0.9363176227 0.9357786775
+ 0.9389075041 0.9365922809 0.9360539913
+ 0.9391773939 0.9368668795 0.9363293052
+ 0.9394474030 0.9371415973 0.9366046190
+ 0.9397174120 0.9374161959 0.9368798733
+ 0.9399873018 0.9376909137 0.9371551871
+ 0.9402409792 0.9379655719 0.9374305010
+ 0.9404938817 0.9382401705 0.9377058148
+ 0.9407467842 0.9385148883 0.9379811287
+ 0.9409996271 0.9387894869 0.9382563233
+ 0.9412525296 0.9390642047 0.9385315776
+ 0.9415053725 0.9393388033 0.9388068914
+ 0.9417582750 0.9396135211 0.9390822053
+ 0.9420111775 0.9398881197 0.9393575191
+ 0.9422640800 0.9401531219 0.9396327734
+ 0.9425169230 0.9404113293 0.9399080873
+ 0.9427698255 0.9406695962 0.9401726127
+ 0.9430227280 0.9409278035 0.9404317737
+ 0.9432755709 0.9411860704 0.9406909943
+ 0.9435284734 0.9414442778 0.9409502149
+ 0.9437813759 0.9417026043 0.9412093759
+ 0.9440342188 0.9419608116 0.9414685965
+ 0.9442871213 0.9422190785 0.9417278171
+ 0.9445400238 0.9424772859 0.9419869781
+ 0.9447929263 0.9427356124 0.9422461987
+ 0.9450458288 0.9429938197 0.9425053000
+ 0.9452986717 0.9432520866 0.9427645206
+ 0.9455515146 0.9435104132 0.9430236816
+ 0.9458044171 0.9437686205 0.9432829022
+ 0.9460573196 0.9440268874 0.9435421228
+ 0.9463102221 0.9442850947 0.9438012838
+ 0.9465631247 0.9445434213 0.9440605044
+ 0.9468160272 0.9448016286 0.9443197250
+ 0.9470688105 0.9450598955 0.9445788860
+ 0.9473217130 0.9453181028 0.9448379874
+ 0.9475746155 0.9455764294 0.9450972080
+ 0.9478275180 0.9458345771 0.9453564286
+ 0.9480804205 0.9460929036 0.9456155896
+ 0.9483332038 0.9463511109 0.9458748102
+ 0.9485861063 0.9466093779 0.9461339712
+ 0.9488390088 0.9468675852 0.9463931918
+ 0.9490919113 0.9471259117 0.9466524124
+ 0.9493448138 0.9473841190 0.9469115734
+ 0.9495977163 0.9476423860 0.9471707940
+ 0.9498504996 0.9479007125 0.9474298954
+ 0.9500969052 0.9481589198 0.9476891160
+ 0.9503340125 0.9484171867 0.9479482770
+ 0.9505710006 0.9486753941 0.9482074976
+ 0.9508081079 0.9489337206 0.9484667182
+ 0.9510450959 0.9491919279 0.9487258792
+ 0.9512820840 0.9494501948 0.9489850998
+ 0.9515191913 0.9497084022 0.9492443204
+ 0.9517561793 0.9499667287 0.9495034814
+ 0.9519932270 0.9502115846 0.9497625828
+ 0.9522302747 0.9504545927 0.9500206113
+ 0.9524673223 0.9506974816 0.9502646923
+ 0.9527043104 0.9509404898 0.9505088925
+ 0.9529414177 0.9511833787 0.9507529736
+ 0.9531784058 0.9514263868 0.9509971738
+ 0.9534155130 0.9516692758 0.9512413144
+ 0.9536525011 0.9519122839 0.9514855146
+ 0.9538894892 0.9521551728 0.9517297149
+ 0.9541265965 0.9523981810 0.9519737959
+ 0.9543635845 0.9526411295 0.9522179961
+ 0.9546005726 0.9528840780 0.9524620771
+ 0.9548376799 0.9531270266 0.9527062774
+ 0.9550747275 0.9533699751 0.9529504180
+ 0.9553117156 0.9536129236 0.9531946182
+ 0.9555488229 0.9538558722 0.9534386992
+ 0.9557858109 0.9540988207 0.9536828995
+ 0.9560227990 0.9543418288 0.9539269805
+ 0.9562599063 0.9545847178 0.9541711807
+ 0.9564968944 0.9548277259 0.9544153810
+ 0.9567340016 0.9550706148 0.9546595216
+ 0.9569709897 0.9553136230 0.9549037218
+ 0.9572079778 0.9555565119 0.9551478028
+ 0.9574450850 0.9557995200 0.9553920031
+ 0.9576820731 0.9560424089 0.9556360841
+ 0.9579191208 0.9562854171 0.9558802843
+ 0.9581562281 0.9565284252 0.9561244249
+ 0.9583932161 0.9567713141 0.9563686252
+ 0.9586302042 0.9570143223 0.9566128254
+ 0.9588673115 0.9572572112 0.9568569064
+ 0.9591042995 0.9575002193 0.9571011066
+ 0.9593414068 0.9577431083 0.9573451877
+ 0.9595783949 0.9579861164 0.9575893879
+ 0.9598153830 0.9582290053 0.9578335285
+ 0.9600492120 0.9584720135 0.9580777287
+ 0.9602714777 0.9587149024 0.9583218098
+ 0.9604939222 0.9589579105 0.9585660100
+ 0.9607161880 0.9592007995 0.9588100910
+ 0.9609385133 0.9594438076 0.9590542912
+ 0.9611607790 0.9596866965 0.9592984915
+ 0.9613832235 0.9599297047 0.9595425725
+ 0.9616054893 0.9601625204 0.9597867727
+ 0.9618278146 0.9603912234 0.9600291252
+ 0.9620500803 0.9606198072 0.9602593184
+ 0.9622725248 0.9608485103 0.9604893923
+ 0.9624947906 0.9610772133 0.9607195258
+ 0.9627171159 0.9613059163 0.9609495997
+ 0.9629393816 0.9615346193 0.9611796737
+ 0.9631618261 0.9617632031 0.9614098072
+ 0.9633840919 0.9619919062 0.9616398811
+ 0.9636064172 0.9622206092 0.9618700147
+ 0.9638286829 0.9624493122 0.9621000886
+ 0.9640511274 0.9626778960 0.9623302817
+ 0.9642733932 0.9629065990 0.9625604153
+ 0.9644957185 0.9631353021 0.9627904892
+ 0.9647179842 0.9633640051 0.9630206227
+ 0.9649404287 0.9635927081 0.9632506967
+ 0.9651626945 0.9638212919 0.9634807706
+ 0.9653850198 0.9640499949 0.9637109041
+ 0.9656072855 0.9642786980 0.9639409781
+ 0.9658296704 0.9645074010 0.9641711712
+ 0.9660519958 0.9647359848 0.9644013047
+ 0.9662743211 0.9649646878 0.9646313787
+ 0.9664965868 0.9651933908 0.9648615122
+ 0.9667189717 0.9654220939 0.9650915861
+ 0.9669412971 0.9656506777 0.9653217196
+ 0.9671636224 0.9658793807 0.9655517936
+ 0.9673860073 0.9661080837 0.9657819271
+ 0.9676082730 0.9663367867 0.9660120010
+ 0.9678305984 0.9665654898 0.9662421942
+ 0.9680529237 0.9667940736 0.9664723277
+ 0.9682753086 0.9670227766 0.9667024016
+ 0.9684975743 0.9672514796 0.9669324756
+ 0.9687198997 0.9674801826 0.9671626091
+ 0.9689422250 0.9677088261 0.9673926830
+ 0.9691646099 0.9679375291 0.9676228166
+ 0.9693868756 0.9681661725 0.9678528905
+ 0.9696092010 0.9683948755 0.9680830836
+ 0.9698315263 0.9686235785 0.9683132172
+ 0.9700505733 0.9688522220 0.9685432911
+ 0.9702591896 0.9690809250 0.9687734246
+ 0.9704679251 0.9693096280 0.9690034986
+ 0.9706764817 0.9695382714 0.9692335725
+ 0.9708852172 0.9697669148 0.9694637060
+ 0.9710938931 0.9699956179 0.9696937799
+ 0.9713025093 0.9702112079 0.9699239135
+ 0.9715111852 0.9704266191 0.9701452851
+ 0.9717199206 0.9706419110 0.9703623056
+ 0.9719284773 0.9708573222 0.9705793262
+ 0.9721372128 0.9710726738 0.9707962871
+ 0.9723458886 0.9712880254 0.9710131884
+ 0.9725545049 0.9715033770 0.9712302089
+ 0.9727631807 0.9717187285 0.9714472294
+ 0.9729719162 0.9719340801 0.9716641903
+ 0.9731804729 0.9721494913 0.9718812108
+ 0.9733892083 0.9723647833 0.9720981717
+ 0.9735978842 0.9725801945 0.9723151922
+ 0.9738065004 0.9727954865 0.9725322127
+ 0.9740151763 0.9730108976 0.9727491736
+ 0.9742239118 0.9732261896 0.9729661942
+ 0.9744325280 0.9734416008 0.9731832147
+ 0.9746412039 0.9736570120 0.9734001756
+ 0.9748498797 0.9738723040 0.9736170769
+ 0.9750584960 0.9740877151 0.9738340974
+ 0.9752671719 0.9743030071 0.9740511179
+ 0.9754759073 0.9745184183 0.9742680788
+ 0.9756845236 0.9747338295 0.9744850993
+ 0.9758931994 0.9749491215 0.9747021198
+ 0.9761018753 0.9751644731 0.9749190807
+ 0.9763104916 0.9753798246 0.9751361012
+ 0.9765192270 0.9755951762 0.9753531218
+ 0.9767279029 0.9758105278 0.9755700827
+ 0.9769365191 0.9760258794 0.9757871032
+ 0.9771451950 0.9762412906 0.9760041237
+ 0.9773538709 0.9764565825 0.9762210846
+ 0.9775624871 0.9766719937 0.9764379859
+ 0.9777712226 0.9768872857 0.9766550064
+ 0.9779798985 0.9771026969 0.9768720269
+ 0.9781885147 0.9773179889 0.9770889878
+ 0.9783971906 0.9775334001 0.9773060083
+ 0.9786059260 0.9777488112 0.9775230289
+ 0.9788144827 0.9779641032 0.9777399898
+ 0.9790232182 0.9781795144 0.9779570103
+ 0.9792318940 0.9783948064 0.9781739712
+ 0.9794405103 0.9786102176 0.9783909917
+ 0.9796491861 0.9788256288 0.9786080122
+ 0.9798579216 0.9790409207 0.9788249731
+ 0.9800624847 0.9792562723 0.9790418744
+ 0.9802585244 0.9794716239 0.9792588949
+ 0.9804543853 0.9796869755 0.9794759154
+ 0.9806504250 0.9799023271 0.9796928763
+ 0.9808464050 0.9801108837 0.9799098969
+ 0.9810423851 0.9803137779 0.9801197052
+ 0.9812384248 0.9805167913 0.9803245068
+ 0.9814342856 0.9807196856 0.9805291891
+ 0.9816303253 0.9809225798 0.9807338715
+ 0.9818263054 0.9811254740 0.9809386730
+ 0.9820222855 0.9813284874 0.9811434150
+ 0.9822182059 0.9815313816 0.9813480973
+ 0.9824141860 0.9817342758 0.9815528989
+ 0.9826102257 0.9819372892 0.9817575812
+ 0.9828062057 0.9821401834 0.9819623232
+ 0.9830021858 0.9823430777 0.9821671247
+ 0.9831981063 0.9825459719 0.9823718071
+ 0.9833940864 0.9827489853 0.9825764894
+ 0.9835901260 0.9829518795 0.9827812910
+ 0.9837861061 0.9831547737 0.9829859734
+ 0.9839820266 0.9833577275 0.9831907153
+ 0.9841780066 0.9835606813 0.9833955169
+ 0.9843739867 0.9837635756 0.9836001992
+ 0.9845700264 0.9839665294 0.9838048816
+ 0.9847660065 0.9841694832 0.9840096235
+ 0.9849619269 0.9843723774 0.9842144251
+ 0.9851579070 0.9845752716 0.9844191074
+ 0.9853538871 0.9847782254 0.9846237898
+ 0.9855499268 0.9849811792 0.9848285913
+ 0.9857457876 0.9851840734 0.9850332737
+ 0.9859418273 0.9853870273 0.9852380157
+ 0.9861378074 0.9855899215 0.9854428172
+ 0.9863337874 0.9857928753 0.9856474996
+ 0.9865298271 0.9859958291 0.9858521819
+ 0.9867256880 0.9861987233 0.9860569835
+ 0.9869217277 0.9864016771 0.9862617254
+ 0.9871177077 0.9866045713 0.9864664078
+ 0.9873136878 0.9868075252 0.9866712093
+ 0.9875096083 0.9870104194 0.9868758917
+ 0.9877055883 0.9872133732 0.9870805740
+ 0.9879016280 0.9874163270 0.9872853756
+ 0.9880976081 0.9876192212 0.9874901175
+ 0.9882935882 0.9878221154 0.9876947999
+ 0.9884895086 0.9880251288 0.9878996015
+ 0.9886854887 0.9882280231 0.9881042838
+ 0.9888815284 0.9884309173 0.9883090258
+ 0.9890775084 0.9886338711 0.9885138273
+ 0.9892734289 0.9888368249 0.9887185097
+ 0.9894694090 0.9890397191 0.9889231920
+ 0.9896653891 0.9892426133 0.9891278744
+ 0.9898614287 0.9894456267 0.9893326759
+ 0.9900538921 0.9896485209 0.9895374179
+ 0.9902380705 0.9898514152 0.9897421002
+ 0.9904223084 0.9900512099 0.9899469018
+ 0.9906064868 0.9902426004 0.9901431203
+ 0.9907907248 0.9904338717 0.9903364182
+ 0.9909747839 0.9906252027 0.9905297160
+ 0.9911590219 0.9908164740 0.9907228947
+ 0.9913432002 0.9910078049 0.9909161925
+ 0.9915273786 0.9911991954 0.9911094904
+ 0.9917116165 0.9913905263 0.9913027883
+ 0.9918957949 0.9915817976 0.9914960265
+ 0.9920799732 0.9917731285 0.9916893244
+ 0.9922642112 0.9919645190 0.9918826222
+ 0.9924482703 0.9921557903 0.9920758009
+ 0.9926325083 0.9923471212 0.9922690988
+ 0.9928166866 0.9925383925 0.9924623966
+ 0.9930009246 0.9927297235 0.9926556945
+ 0.9931851029 0.9929211140 0.9928488731
+ 0.9933692813 0.9931123853 0.9930421710
+ 0.9935535192 0.9933037162 0.9932355285
+ 0.9937375784 0.9934949875 0.9934287071
+ 0.9939218163 0.9936863780 0.9936220050
+ 0.9941059947 0.9938777089 0.9938153028
+ 0.9942901731 0.9940689802 0.9940086007
+ 0.9944744110 0.9942603111 0.9942017794
+ 0.9946585894 0.9944517016 0.9943950772
+ 0.9948428273 0.9946429729 0.9945883751
+ 0.9950270057 0.9948343039 0.9947816730
+ 0.9952111244 0.9950255752 0.9949749112
+ 0.9953953028 0.9952169061 0.9951682091
+ 0.9955794811 0.9954082966 0.9953615069
+ 0.9957637191 0.9955996275 0.9955546856
+ 0.9959478974 0.9957908988 0.9957479835
+ 0.9961320758 0.9959822297 0.9959412813
+ 0.9963163137 0.9961736202 0.9961345792
+ 0.9965003729 0.9963648915 0.9963278174
+ 0.9966846108 0.9965562224 0.9965211153
+ 0.9968687892 0.9967474937 0.9967144132
+ 0.9970530272 0.9969388247 0.9969075918
+ 0.9972372055 0.9971302152 0.9971008897
+ 0.9974213839 0.9973214865 0.9972941875
+ 0.9976056218 0.9975128174 0.9974874854
+ 0.9977898002 0.9977040887 0.9976807237
+ 0.9979739189 0.9978954792 0.9978740215
+ 0.9981580973 0.9980868101 0.9980673194
+ 0.9983422756 0.9982780814 0.9982606173
+ 0.9985265136 0.9984694123 0.9984537959
+ 0.9987106919 0.9986606836 0.9986470938
+ 0.9988948703 0.9988520741 0.9988403916
+ 0.9990791082 0.9990434051 0.9990335703
+ 0.9992632866 0.9992346764 0.9992269278
+ 0.9994474053 0.9994260073 0.9994202256
+ 0.9996315837 0.9996173978 0.9996135235
+ 0.9998158216 0.9998087287 0.9998067021
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/kodak_dscs_3153.spi1d b/release/datafiles/colormanagement/luts/film_response/kodak_dscs_3153.spi1d
new file mode 100644
index 00000000000..589da4b3a27
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/kodak_dscs_3153.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0033556900 0.0036243461 0.0021771761
+ 0.0067113810 0.0072486931 0.0043543512
+ 0.0100719603 0.0109450798 0.0065315268
+ 0.0136722000 0.0148685100 0.0087087033
+ 0.0172724500 0.0187919401 0.0109967999
+ 0.0209288709 0.0229167007 0.0134465704
+ 0.0247608796 0.0271310192 0.0158963501
+ 0.0285928901 0.0314321816 0.0183461197
+ 0.0325581394 0.0359185003 0.0208943095
+ 0.0366007015 0.0404266603 0.0236469992
+ 0.0406721011 0.0451549515 0.0263996907
+ 0.0448958799 0.0498832315 0.0291523803
+ 0.0491196699 0.0548080616 0.0321348682
+ 0.0534582287 0.0597378612 0.0352196097
+ 0.0578269996 0.0648122802 0.0383043587
+ 0.0622479804 0.0698948205 0.0415499993
+ 0.0667206198 0.0750741214 0.0449920595
+ 0.0712093785 0.0802576020 0.0484341197
+ 0.0757424608 0.0854823887 0.0520806797
+ 0.0802765936 0.0907058865 0.0558979213
+ 0.0848271400 0.0959210992 0.0597151592
+ 0.0893776789 0.1011238992 0.0638853684
+ 0.0939087570 0.1062820032 0.0680840537
+ 0.0984367505 0.1114128977 0.0724848807
+ 0.1029269993 0.1164738983 0.0770553872
+ 0.1073973030 0.1214959025 0.0817479491
+ 0.1118313000 0.1264283061 0.0866615325
+ 0.1162149012 0.1313190013 0.0916693583
+ 0.1205834970 0.1361002028 0.0968769416
+ 0.1248577982 0.1408507973 0.1021751985
+ 0.1291321069 0.1454659998 0.1076091975
+ 0.1333063990 0.1500781029 0.1131248996
+ 0.1374552995 0.1545193046 0.1187048033
+ 0.1415515989 0.1589604020 0.1243304983
+ 0.1455647051 0.1632665992 0.1299701035
+ 0.1495777071 0.1675314009 0.1355862021
+ 0.1534643024 0.1717227995 0.1411814988
+ 0.1573361009 0.1758131981 0.1467006058
+ 0.1611633003 0.1799037009 0.1521570981
+ 0.1648924053 0.1838286966 0.1575206071
+ 0.1686214954 0.1877496988 0.1627777070
+ 0.1722615957 0.1916016042 0.1679431945
+ 0.1758497059 0.1953604072 0.1729734987
+ 0.1794376969 0.1991191953 0.1779143065
+ 0.1829102039 0.2027603984 0.1827175021
+ 0.1863611937 0.2063656002 0.1874202043
+ 0.1898120940 0.2099706978 0.1920142025
+ 0.1931387931 0.2134328038 0.1964761019
+ 0.1964582950 0.2168937027 0.2008883059
+ 0.1997777969 0.2203408033 0.2051143050
+ 0.2029809058 0.2236669958 0.2093403041
+ 0.2061755955 0.2269932926 0.2133757025
+ 0.2093703002 0.2303075939 0.2173759937
+ 0.2124706954 0.2335088998 0.2213031054
+ 0.2155478001 0.2367102057 0.2250909060
+ 0.2186249942 0.2399114966 0.2288787067
+ 0.2216414064 0.2430005968 0.2325274944
+ 0.2246086001 0.2460864037 0.2361178994
+ 0.2275757939 0.2491723001 0.2397083044
+ 0.2305241972 0.2521803081 0.2431315929
+ 0.2333890945 0.2551597953 0.2465402037
+ 0.2362540066 0.2581393123 0.2499487996
+ 0.2391189039 0.2610821128 0.2531935871
+ 0.2419181019 0.2639639974 0.2564358115
+ 0.2446880937 0.2668457925 0.2596780956
+ 0.2474582046 0.2697275877 0.2627840936
+ 0.2502210140 0.2725282907 0.2658750117
+ 0.2529034913 0.2753205895 0.2689658999
+ 0.2555859983 0.2781128883 0.2719655037
+ 0.2582685053 0.2808786035 0.2749192119
+ 0.2609224021 0.2835890055 0.2778730094
+ 0.2635244131 0.2862994075 0.2807919979
+ 0.2661263049 0.2890098095 0.2836216092
+ 0.2687281966 0.2916727960 0.2864513099
+ 0.2712922990 0.2943083942 0.2892810106
+ 0.2738203108 0.2969441116 0.2920272052
+ 0.2763482928 0.2995797098 0.2947449982
+ 0.2788763046 0.3021580875 0.2974627912
+ 0.2813667059 0.3047255874 0.3001739085
+ 0.2838270068 0.3072930872 0.3027910888
+ 0.2862873077 0.3098605871 0.3054082096
+ 0.2887476087 0.3123694956 0.3080253005
+ 0.2911775112 0.3148748875 0.3106203079
+ 0.2935760021 0.3173803985 0.3131470084
+ 0.2959744036 0.3198859096 0.3156735897
+ 0.2983728945 0.3223375976 0.3182002902
+ 0.3007532060 0.3247866929 0.3207036853
+ 0.3030953109 0.3272357881 0.3231492937
+ 0.3054375052 0.3296849132 0.3255949020
+ 0.3077796102 0.3320893943 0.3280405104
+ 0.3101190925 0.3344874084 0.3304716051
+ 0.3124099970 0.3368853033 0.3328445852
+ 0.3147009015 0.3392831981 0.3352177143
+ 0.3169918060 0.3416486979 0.3375906944
+ 0.3192827106 0.3440001905 0.3399637043
+ 0.3215416968 0.3463517129 0.3422729075
+ 0.3237861097 0.3487032950 0.3445810974
+ 0.3260306120 0.3510360122 0.3468891978
+ 0.3282749951 0.3533455133 0.3491973877
+ 0.3305096924 0.3556550145 0.3514679968
+ 0.3327121139 0.3579646051 0.3537184000
+ 0.3349145055 0.3602696061 0.3559688032
+ 0.3371168971 0.3625411093 0.3582192957
+ 0.3393192887 0.3648126125 0.3604589999
+ 0.3414955139 0.3670840859 0.3626582026
+ 0.3436599970 0.3693554997 0.3648572862
+ 0.3458243906 0.3716023862 0.3670564890
+ 0.3479889035 0.3738394976 0.3692556024
+ 0.3501509130 0.3760766089 0.3714247048
+ 0.3522812128 0.3783136904 0.3735783994
+ 0.3544115126 0.3805431128 0.3757320940
+ 0.3565418124 0.3827491105 0.3778859079
+ 0.3586719930 0.3849549890 0.3800387979
+ 0.3607907891 0.3871609867 0.3821524978
+ 0.3628903031 0.3893668950 0.3842661977
+ 0.3649899065 0.3915528059 0.3863798082
+ 0.3670895100 0.3937306106 0.3884935081
+ 0.3691891134 0.3959082961 0.3905969858
+ 0.3712717891 0.3980861008 0.3926754892
+ 0.3733437955 0.4002606869 0.3947539926
+ 0.3754158914 0.4024128914 0.3968324065
+ 0.3774879873 0.4045650959 0.3989109099
+ 0.3795599937 0.4067172110 0.4009746909
+ 0.3816126883 0.4088693857 0.4030224979
+ 0.3836601973 0.4110105038 0.4050701857
+ 0.3857075870 0.4131393135 0.4071179032
+ 0.3877550960 0.4152680933 0.4091657102
+ 0.3898024857 0.4173969030 0.4111976027
+ 0.3918300867 0.4195258021 0.4132185876
+ 0.3938556015 0.4216380119 0.4152396023
+ 0.3958810866 0.4237453938 0.4172605872
+ 0.3979066014 0.4258528054 0.4192816019
+ 0.3999319971 0.4279601872 0.4212876856
+ 0.4019384980 0.4300670028 0.4232856929
+ 0.4039444029 0.4321546853 0.4252836108
+ 0.4059503078 0.4342423081 0.4272815883
+ 0.4079560935 0.4363299906 0.4292795062
+ 0.4099619985 0.4384176135 0.4312647879
+ 0.4119505882 0.4405007958 0.4332428873
+ 0.4139389098 0.4425699115 0.4352209866
+ 0.4159272015 0.4446390867 0.4371992052
+ 0.4179156125 0.4467082024 0.4391773045
+ 0.4199039042 0.4487774074 0.4411455989
+ 0.4218772054 0.4508393109 0.4431068003
+ 0.4238497913 0.4528909028 0.4450680017
+ 0.4258224070 0.4549424946 0.4470292926
+ 0.4277949929 0.4569939971 0.4489904940
+ 0.4297676086 0.4590455890 0.4509448111
+ 0.4317277074 0.4610880911 0.4528915882
+ 0.4336861074 0.4631226957 0.4548385143
+ 0.4356445074 0.4651573002 0.4567854106
+ 0.4376029074 0.4671919048 0.4587321877
+ 0.4395613074 0.4692265093 0.4606749117
+ 0.4415096939 0.4712507129 0.4626095891
+ 0.4434551895 0.4732685983 0.4645442963
+ 0.4454007149 0.4752865136 0.4664790034
+ 0.4473460913 0.4773043096 0.4684137106
+ 0.4492915869 0.4793221951 0.4703465104
+ 0.4512295127 0.4813289046 0.4722707868
+ 0.4531629980 0.4833298922 0.4741952121
+ 0.4550965130 0.4853309095 0.4761194885
+ 0.4570299983 0.4873319864 0.4780437946
+ 0.4589635134 0.4893330038 0.4799681902
+ 0.4608916938 0.4913224876 0.4818837047
+ 0.4628139138 0.4933061898 0.4837990999
+ 0.4647361040 0.4952898920 0.4857144952
+ 0.4666582942 0.4972735941 0.4876298904
+ 0.4685805142 0.4992572963 0.4895452857
+ 0.4704998136 0.5012295842 0.4914546907
+ 0.4724110067 0.5031952262 0.4933620989
+ 0.4743221998 0.5051606894 0.4952695966
+ 0.4762333930 0.5071262717 0.4971770942
+ 0.4781445861 0.5090917945 0.4990845919
+ 0.4800555110 0.5110468864 0.5009883046
+ 0.4819557965 0.5129930973 0.5028885007
+ 0.4838559926 0.5149393082 0.5047886968
+ 0.4857563078 0.5168855190 0.5066888928
+ 0.4876565039 0.5188316703 0.5085890889
+ 0.4895567894 0.5207694769 0.5104873776
+ 0.4914484024 0.5226947069 0.5123804808
+ 0.4933373034 0.5246199965 0.5142735243
+ 0.4952262938 0.5265452862 0.5161666274
+ 0.4971151948 0.5284705758 0.5180596113
+ 0.4990041852 0.5303910971 0.5199525952
+ 0.5008875132 0.5322936177 0.5218384266
+ 0.5027645230 0.5341960788 0.5237240195
+ 0.5046414733 0.5360984802 0.5256096125
+ 0.5065184832 0.5380010009 0.5274953246
+ 0.5083954930 0.5399035215 0.5293809175
+ 0.5102707148 0.5417822003 0.5312609076
+ 0.5121346712 0.5436596274 0.5331382751
+ 0.5139986873 0.5455371141 0.5350157022
+ 0.5158627033 0.5474146008 0.5368930101
+ 0.5177267790 0.5492920280 0.5387703776
+ 0.5195907950 0.5511524081 0.5406445265
+ 0.5214436054 0.5530024171 0.5425122976
+ 0.5232933164 0.5548523068 0.5443801284
+ 0.5251430273 0.5567023158 0.5462480187
+ 0.5269926786 0.5585523248 0.5481157899
+ 0.5288422704 0.5603957176 0.5499836206
+ 0.5306860209 0.5622155070 0.5518401861
+ 0.5325195789 0.5640351772 0.5536966920
+ 0.5343531966 0.5658550262 0.5555531979
+ 0.5361868143 0.5676748157 0.5574097037
+ 0.5380203724 0.5694946051 0.5592660904
+ 0.5398539901 0.5712903738 0.5611143112
+ 0.5416709185 0.5730770826 0.5629572272
+ 0.5434862971 0.5748637915 0.5648000240
+ 0.5453017950 0.5766503811 0.5666428208
+ 0.5471172929 0.5784370899 0.5684856176
+ 0.5489326715 0.5802192092 0.5703253746
+ 0.5507397056 0.5819697976 0.5721517205
+ 0.5525346994 0.5837203264 0.5739780068
+ 0.5543295741 0.5854709148 0.5758042932
+ 0.5561246276 0.5872213840 0.5776305795
+ 0.5579195023 0.5889719725 0.5794569254
+ 0.5597143769 0.5907062888 0.5812692046
+ 0.5614898801 0.5924177170 0.5830757022
+ 0.5632616878 0.5941290259 0.5848821998
+ 0.5650333762 0.5958402753 0.5866885781
+ 0.5668051839 0.5975517035 0.5884950757
+ 0.5685769916 0.5992630124 0.5902976990
+ 0.5703436136 0.6009503007 0.5920805931
+ 0.5720893145 0.6026192904 0.5938634872
+ 0.5738348961 0.6042883992 0.5956465006
+ 0.5755805969 0.6059575081 0.5974293947
+ 0.5773262978 0.6076264977 0.5992122889
+ 0.5790719986 0.6092956066 0.6009799242
+ 0.5808039904 0.6109384894 0.6027352214
+ 0.5825204849 0.6125624180 0.6044905186
+ 0.5842369795 0.6141862273 0.6062458158
+ 0.5859534740 0.6158099771 0.6080011725
+ 0.5876700282 0.6174339056 0.6097565293
+ 0.5893865228 0.6190577149 0.6114842892
+ 0.5910822153 0.6206613779 0.6132075787
+ 0.5927662849 0.6222372055 0.6149309874
+ 0.5944504142 0.6238129735 0.6166543961
+ 0.5961344838 0.6253888011 0.6183778048
+ 0.5978186131 0.6269646287 0.6200990081
+ 0.5995026827 0.6285403967 0.6217858791
+ 0.6011615992 0.6301125288 0.6234729290
+ 0.6028100848 0.6316378117 0.6251598001
+ 0.6044585109 0.6331629753 0.6268466711
+ 0.6061068773 0.6346881986 0.6285337210
+ 0.6077553034 0.6362134814 0.6302152276
+ 0.6094037294 0.6377387047 0.6318612099
+ 0.6110271811 0.6392639279 0.6335071921
+ 0.6126366854 0.6407619119 0.6351531744
+ 0.6142461896 0.6422343254 0.6367992163
+ 0.6158555746 0.6437066793 0.6384451985
+ 0.6174650788 0.6451790929 0.6400886178
+ 0.6190745234 0.6466515064 0.6416891813
+ 0.6206660867 0.6481239796 0.6432899237
+ 0.6222333908 0.6495963931 0.6448904872
+ 0.6238006949 0.6510291100 0.6464911103
+ 0.6253681183 0.6524468064 0.6480916739
+ 0.6269354224 0.6538646221 0.6496922970
+ 0.6285027266 0.6552823186 0.6512529254
+ 0.6300681233 0.6567000151 0.6528040171
+ 0.6315903068 0.6581177115 0.6543551087
+ 0.6331124902 0.6595354080 0.6559062004
+ 0.6346346736 0.6609153748 0.6574572921
+ 0.6361569166 0.6622769237 0.6590083838
+ 0.6376791000 0.6636384726 0.6605402231
+ 0.6392014027 0.6650000215 0.6620379090
+ 0.6407008171 0.6663615108 0.6635357141
+ 0.6421751976 0.6677231193 0.6650334001
+ 0.6436495185 0.6690846086 0.6665312052
+ 0.6451238990 0.6704273820 0.6680288911
+ 0.6465982199 0.6717317104 0.6695266962
+ 0.6480726004 0.6730359793 0.6709856987
+ 0.6495469213 0.6743403077 0.6724267006
+ 0.6509864926 0.6756445765 0.6738678217
+ 0.6524105072 0.6769489050 0.6753088832
+ 0.6538345814 0.6782531738 0.6767500043
+ 0.6552587152 0.6795575023 0.6781910062
+ 0.6566827297 0.6808236241 0.6796321273
+ 0.6581068039 0.6820700169 0.6810289025
+ 0.6595308781 0.6833164096 0.6824105978
+ 0.6609197855 0.6845629215 0.6837922931
+ 0.6622915864 0.6858093143 0.6851739287
+ 0.6636633277 0.6870558262 0.6865556240
+ 0.6650350094 0.6883022189 0.6879372001
+ 0.6664068103 0.6895486116 0.6893188953
+ 0.6677784920 0.6907581091 0.6906694174
+ 0.6691501737 0.6919463873 0.6919894814
+ 0.6705014110 0.6931347847 0.6933096051
+ 0.6718192101 0.6943231821 0.6946297288
+ 0.6731368899 0.6955115795 0.6959499121
+ 0.6744546890 0.6966999769 0.6972699761
+ 0.6757724285 0.6978883743 0.6985900998
+ 0.6770902276 0.6990767717 0.6999102235
+ 0.6784079075 0.7002522945 0.7011716962
+ 0.6797257066 0.7013828754 0.7024288177
+ 0.6809998155 0.7025135159 0.7036859989
+ 0.6822623014 0.7036440969 0.7049431205
+ 0.6835249066 0.7047746778 0.7062003016
+ 0.6847875118 0.7059053183 0.7074574232
+ 0.6860501170 0.7070358992 0.7087146044
+ 0.6873127222 0.7081664801 0.7099717259
+ 0.6885753274 0.7092970014 0.7111666203
+ 0.6898378730 0.7104060054 0.7123600245
+ 0.6910517216 0.7114794254 0.7135534286
+ 0.6922584176 0.7125527859 0.7147467732
+ 0.6934651136 0.7136262059 0.7159401774
+ 0.6946716905 0.7146996260 0.7171337008
+ 0.6958783865 0.7157731056 0.7183271050
+ 0.6970850825 0.7168465257 0.7195205092
+ 0.6982917786 0.7179198861 0.7206757069
+ 0.6994984150 0.7189933062 0.7218052745
+ 0.7006723285 0.7200632095 0.7229349017
+ 0.7018228173 0.7210804224 0.7240644097
+ 0.7029731870 0.7220975757 0.7251939774
+ 0.7041236758 0.7231147885 0.7263236046
+ 0.7052742243 0.7241321206 0.7274531722
+ 0.7064247131 0.7251492739 0.7285827994
+ 0.7075752020 0.7261664867 0.7297123075
+ 0.7087255716 0.7271836996 0.7307947278
+ 0.7098761201 0.7282009125 0.7318609953
+ 0.7109766006 0.7292181253 0.7329272032
+ 0.7120710015 0.7302225828 0.7339934707
+ 0.7131654024 0.7311848998 0.7350596786
+ 0.7142598033 0.7321472168 0.7361260056
+ 0.7153543234 0.7331095934 0.7371922731
+ 0.7164487243 0.7340719104 0.7382584810
+ 0.7175431252 0.7350342274 0.7393248081
+ 0.7186375260 0.7359964848 0.7403681874
+ 0.7197319865 0.7369588017 0.7413722277
+ 0.7207844853 0.7379211187 0.7423762083
+ 0.7218233943 0.7388833761 0.7433801889
+ 0.7228623033 0.7398456931 0.7443842292
+ 0.7239012122 0.7407631874 0.7453882098
+ 0.7249401212 0.7416722178 0.7463921905
+ 0.7259790897 0.7425811887 0.7473962903
+ 0.7270179987 0.7434902191 0.7484002709
+ 0.7280569077 0.7443990707 0.7494043112
+ 0.7290958166 0.7453081012 0.7503836155
+ 0.7301275730 0.7462170720 0.7513269186
+ 0.7311120033 0.7471259832 0.7522702217
+ 0.7320963144 0.7480350137 0.7532135248
+ 0.7330806255 0.7489439845 0.7541568279
+ 0.7340649962 0.7498528957 0.7551000714
+ 0.7350493073 0.7507187128 0.7560433745
+ 0.7360336185 0.7515761256 0.7569866776
+ 0.7370179296 0.7524334788 0.7579299808
+ 0.7380023003 0.7532908916 0.7588732839
+ 0.7389866114 0.7541484237 0.7598165870
+ 0.7399709225 0.7550057769 0.7607126236
+ 0.7409034967 0.7558631897 0.7615972161
+ 0.7418344021 0.7567206025 0.7624816895
+ 0.7427654266 0.7575780153 0.7633662820
+ 0.7436963916 0.7584354281 0.7642508149
+ 0.7446272969 0.7592927814 0.7651354074
+ 0.7455583215 0.7601416111 0.7660198808
+ 0.7464892864 0.7609493732 0.7669044733
+ 0.7474203110 0.7617571950 0.7677890062
+ 0.7483512163 0.7625650167 0.7686735988
+ 0.7492821813 0.7633727789 0.7695580721
+ 0.7502012849 0.7641806006 0.7704144120
+ 0.7510803938 0.7649884224 0.7712424994
+ 0.7519595027 0.7657961845 0.7720705271
+ 0.7528386712 0.7666041255 0.7728986144
+ 0.7537177801 0.7674118876 0.7737267017
+ 0.7545968890 0.7682197094 0.7745547295
+ 0.7554759979 0.7690274715 0.7753828168
+ 0.7563552260 0.7698352933 0.7762109041
+ 0.7572342753 0.7706053257 0.7770388722
+ 0.7581133842 0.7713655829 0.7778670192
+ 0.7589924932 0.7721258998 0.7786949873
+ 0.7598717213 0.7728862166 0.7795230746
+ 0.7607079744 0.7736464739 0.7803282738
+ 0.7615370154 0.7744067907 0.7811022997
+ 0.7623659968 0.7751671076 0.7818763852
+ 0.7631949782 0.7759273052 0.7826504707
+ 0.7640240192 0.7766876221 0.7834246159
+ 0.7648531199 0.7774478793 0.7841985822
+ 0.7656821012 0.7782081962 0.7849727273
+ 0.7665110826 0.7789685130 0.7857468128
+ 0.7673401237 0.7797287703 0.7865208983
+ 0.7681691051 0.7804598808 0.7872949243
+ 0.7689980865 0.7811748981 0.7880690098
+ 0.7698271275 0.7818897963 0.7888430953
+ 0.7706180215 0.7826048136 0.7896171212
+ 0.7713987827 0.7833197117 0.7903652787
+ 0.7721796036 0.7840347290 0.7910879850
+ 0.7729604244 0.7847496271 0.7918108106
+ 0.7737411857 0.7854645848 0.7925335169
+ 0.7745220065 0.7861794829 0.7932562828
+ 0.7753028274 0.7868943810 0.7939789891
+ 0.7760835886 0.7876093984 0.7947018147
+ 0.7768645287 0.7883242965 0.7954245210
+ 0.7776452899 0.7890393138 0.7961472273
+ 0.7784261107 0.7897542119 0.7968699932
+ 0.7792068720 0.7904409170 0.7975926995
+ 0.7799876928 0.7911127210 0.7983155251
+ 0.7807230949 0.7917845249 0.7990381718
+ 0.7814577222 0.7924563289 0.7997609973
+ 0.7821922898 0.7931280732 0.8004512191
+ 0.7829269767 0.7937998772 0.8011254072
+ 0.7836616039 0.7944718003 0.8017995954
+ 0.7843962908 0.7951436043 0.8024737239
+ 0.7851309180 0.7958154082 0.8031479120
+ 0.7858656049 0.7964872122 0.8038221002
+ 0.7866001725 0.7971590161 0.8044962883
+ 0.7873347998 0.7978308201 0.8051704168
+ 0.7880694866 0.7985026836 0.8058446050
+ 0.7888041139 0.7991744876 0.8065187931
+ 0.7895388007 0.7998462915 0.8071929812
+ 0.7902569771 0.8004866242 0.8078672290
+ 0.7909476161 0.8011174798 0.8085412979
+ 0.7916381955 0.8017483950 0.8092154860
+ 0.7923287749 0.8023793101 0.8098896742
+ 0.7930194139 0.8030102253 0.8105255961
+ 0.7937099934 0.8036412001 0.8111540079
+ 0.7944005728 0.8042721152 0.8117824197
+ 0.7950912118 0.8049029708 0.8124107718
+ 0.7957817912 0.8055338860 0.8130391836
+ 0.7964723706 0.8061649203 0.8136675954
+ 0.7971630096 0.8067957759 0.8142960072
+ 0.7978535891 0.8074266911 0.8149244189
+ 0.7985442281 0.8080576062 0.8155527711
+ 0.7992348075 0.8086885214 0.8161811829
+ 0.7999253869 0.8093194962 0.8168095946
+ 0.8005787134 0.8099504113 0.8174380064
+ 0.8012273908 0.8105456829 0.8180664182
+ 0.8018761873 0.8111379147 0.8186947703
+ 0.8025249243 0.8117302060 0.8193231821
+ 0.8031736016 0.8123223782 0.8199515939
+ 0.8038223982 0.8129147291 0.8205404282
+ 0.8044710755 0.8135069013 0.8211258054
+ 0.8051198125 0.8140991926 0.8217111826
+ 0.8057686090 0.8146914244 0.8222966194
+ 0.8064172864 0.8152837157 0.8228819966
+ 0.8070660233 0.8158758879 0.8234674931
+ 0.8077148199 0.8164681792 0.8240528703
+ 0.8083634973 0.8170604110 0.8246383071
+ 0.8090121746 0.8176527023 0.8252236843
+ 0.8096609712 0.8182448745 0.8258091211
+ 0.8102908134 0.8188372254 0.8263946176
+ 0.8108997941 0.8194293976 0.8269799948
+ 0.8115088940 0.8200203776 0.8275653720
+ 0.8121178746 0.8205760717 0.8281508088
+ 0.8127269745 0.8211318851 0.8287361860
+ 0.8133360147 0.8216876984 0.8293216825
+ 0.8139451146 0.8222435117 0.8299071193
+ 0.8145542145 0.8227992058 0.8304585814
+ 0.8151631951 0.8233550191 0.8310037851
+ 0.8157722950 0.8239107728 0.8315489888
+ 0.8163812757 0.8244665265 0.8320941925
+ 0.8169903755 0.8250222802 0.8326392770
+ 0.8175994158 0.8255780935 0.8331844807
+ 0.8182085156 0.8261339068 0.8337296844
+ 0.8188176155 0.8266896009 0.8342748880
+ 0.8194265962 0.8272454143 0.8348199725
+ 0.8200334907 0.8278012276 0.8353651762
+ 0.8206049800 0.8283569217 0.8359103799
+ 0.8211765885 0.8289126754 0.8364555836
+ 0.8217481971 0.8294684887 0.8370007277
+ 0.8223196864 0.8300228119 0.8375458717
+ 0.8228912950 0.8305441737 0.8380910754
+ 0.8234627843 0.8310655951 0.8386362791
+ 0.8240343928 0.8315870166 0.8391814232
+ 0.8246060014 0.8321084976 0.8397266269
+ 0.8251774907 0.8326299191 0.8402529955
+ 0.8257490993 0.8331512809 0.8407605886
+ 0.8263205886 0.8336728215 0.8412681818
+ 0.8268921971 0.8341941833 0.8417757750
+ 0.8274638057 0.8347156048 0.8422834277
+ 0.8280352950 0.8352370858 0.8427910209
+ 0.8286069036 0.8357585073 0.8432986140
+ 0.8291783929 0.8362799287 0.8438062072
+ 0.8297500014 0.8368014097 0.8443138003
+ 0.8303017020 0.8373227715 0.8448213935
+ 0.8308379054 0.8378441930 0.8453289866
+ 0.8313741088 0.8383656144 0.8458365798
+ 0.8319103122 0.8388870955 0.8463441730
+ 0.8324465156 0.8394085169 0.8468517065
+ 0.8329827189 0.8399298787 0.8473592997
+ 0.8335189223 0.8404234052 0.8478668928
+ 0.8340551257 0.8409125805 0.8483744860
+ 0.8345913291 0.8414016962 0.8488820791
+ 0.8351274729 0.8418908715 0.8493896723
+ 0.8356636763 0.8423801064 0.8498973250
+ 0.8361998796 0.8428692222 0.8503770232
+ 0.8367360830 0.8433583975 0.8508495092
+ 0.8372722864 0.8438475132 0.8513221145
+ 0.8378084898 0.8443366885 0.8517947197
+ 0.8383446932 0.8448258042 0.8522673249
+ 0.8388810158 0.8453149796 0.8527398109
+ 0.8394172192 0.8458042145 0.8532124162
+ 0.8399534225 0.8462932706 0.8536850214
+ 0.8404592276 0.8467825055 0.8541575074
+ 0.8409621119 0.8472716212 0.8546301126
+ 0.8414651155 0.8477607965 0.8551027179
+ 0.8419679999 0.8482499719 0.8555753231
+ 0.8424710035 0.8487390876 0.8560478091
+ 0.8429738879 0.8492283225 0.8565204144
+ 0.8434768915 0.8497173786 0.8569930196
+ 0.8439797759 0.8501937985 0.8574656248
+ 0.8444827199 0.8506526947 0.8579381108
+ 0.8449857235 0.8511115909 0.8584107161
+ 0.8454886079 0.8515704274 0.8588833213
+ 0.8459916115 0.8520293236 0.8593558073
+ 0.8464944959 0.8524882197 0.8598284125
+ 0.8469973803 0.8529471159 0.8602802157
+ 0.8475003839 0.8534058928 0.8607202172
+ 0.8480033278 0.8538647890 0.8611602187
+ 0.8485062718 0.8543236852 0.8616002202
+ 0.8490092158 0.8547825813 0.8620402217
+ 0.8495122194 0.8552414775 0.8624802232
+ 0.8500142097 0.8557003140 0.8629202247
+ 0.8504859209 0.8561592102 0.8633602262
+ 0.8509575725 0.8566181064 0.8638002276
+ 0.8514292836 0.8570770025 0.8642402291
+ 0.8519009948 0.8575357795 0.8646801710
+ 0.8523727059 0.8579946756 0.8651201725
+ 0.8528444171 0.8584535718 0.8655601740
+ 0.8533161283 0.8589125276 0.8660001755
+ 0.8537877798 0.8593714237 0.8664401770
+ 0.8542594910 0.8598302007 0.8668801785
+ 0.8547312021 0.8602712154 0.8673201799
+ 0.8552029133 0.8607016802 0.8677601814
+ 0.8556746244 0.8611322045 0.8682001829
+ 0.8561462760 0.8615627289 0.8686401844
+ 0.8566179872 0.8619931936 0.8690801859
+ 0.8570896983 0.8624237180 0.8695201874
+ 0.8575614095 0.8628543019 0.8699601889
+ 0.8580331206 0.8632848263 0.8703727126
+ 0.8585047722 0.8637152910 0.8707824945
+ 0.8589764833 0.8641458154 0.8711922169
+ 0.8594481945 0.8645762801 0.8716019988
+ 0.8599199057 0.8650068045 0.8720117211
+ 0.8603671789 0.8654373288 0.8724213839
+ 0.8608096838 0.8658677936 0.8728312254
+ 0.8612521291 0.8662983179 0.8732408881
+ 0.8616945148 0.8667287827 0.8736507297
+ 0.8621369004 0.8671593070 0.8740603924
+ 0.8625792861 0.8675897717 0.8744701743
+ 0.8630216718 0.8680202961 0.8748798966
+ 0.8634641171 0.8684508204 0.8752896786
+ 0.8639065027 0.8688812852 0.8756994009
+ 0.8643488884 0.8693118095 0.8761091828
+ 0.8647912741 0.8697422743 0.8765189052
+ 0.8652337193 0.8701621294 0.8769286275
+ 0.8656761050 0.8705661297 0.8773384094
+ 0.8661184907 0.8709700108 0.8777480721
+ 0.8665608764 0.8713740110 0.8781579137
+ 0.8670033216 0.8717778921 0.8785675764
+ 0.8674457073 0.8721818924 0.8789774179
+ 0.8678880930 0.8725857735 0.8793870807
+ 0.8683304787 0.8729897141 0.8797969222
+ 0.8687729239 0.8733937144 0.8801925182
+ 0.8692153096 0.8737975955 0.8805741072
+ 0.8696576953 0.8742015958 0.8809558153
+ 0.8700938821 0.8746054769 0.8813375235
+ 0.8705089092 0.8750094771 0.8817191720
+ 0.8709238768 0.8754134178 0.8821008801
+ 0.8713387847 0.8758172989 0.8824825287
+ 0.8717538118 0.8762212992 0.8828641772
+ 0.8721687198 0.8766251802 0.8832458854
+ 0.8725836873 0.8770291805 0.8836275935
+ 0.8729987144 0.8774331212 0.8840093017
+ 0.8734136224 0.8778371215 0.8843908906
+ 0.8738285899 0.8782410026 0.8847725987
+ 0.8742436171 0.8786448836 0.8851543069
+ 0.8746585250 0.8790488839 0.8855360150
+ 0.8750734925 0.8794528246 0.8859177232
+ 0.8754885197 0.8798568249 0.8862993121
+ 0.8759034276 0.8802446723 0.8866810203
+ 0.8763183951 0.8806238174 0.8870627284
+ 0.8767334223 0.8810029030 0.8874443769
+ 0.8771482706 0.8813819885 0.8878260255
+ 0.8775632977 0.8817610741 0.8882076740
+ 0.8779783249 0.8821402192 0.8885893822
+ 0.8783931732 0.8825193048 0.8889710903
+ 0.8788082004 0.8828983903 0.8893527985
+ 0.8792232275 0.8832774758 0.8897343874
+ 0.8796380758 0.8836566210 0.8901082277
+ 0.8800498247 0.8840357065 0.8904638886
+ 0.8804391026 0.8844147921 0.8908194900
+ 0.8808283806 0.8847938776 0.8911752105
+ 0.8812177181 0.8851730227 0.8915308714
+ 0.8816069961 0.8855521083 0.8918864727
+ 0.8819962740 0.8859311938 0.8922421932
+ 0.8823856115 0.8863102794 0.8925979137
+ 0.8827748895 0.8866894245 0.8929535151
+ 0.8831642270 0.8870685101 0.8933091760
+ 0.8835535049 0.8874475956 0.8936648965
+ 0.8839427233 0.8878266811 0.8940204978
+ 0.8843320012 0.8882058263 0.8943762183
+ 0.8847212791 0.8885849118 0.8947318792
+ 0.8851106167 0.8889639974 0.8950874805
+ 0.8854998946 0.8893430829 0.8954432011
+ 0.8858891726 0.8897222877 0.8957989216
+ 0.8862785101 0.8900951147 0.8961545229
+ 0.8866677880 0.8904510140 0.8965101838
+ 0.8870571256 0.8908069134 0.8968659043
+ 0.8874464035 0.8911628127 0.8972215056
+ 0.8878356814 0.8915187120 0.8975772262
+ 0.8882250190 0.8918746114 0.8979328871
+ 0.8886142969 0.8922305107 0.8982884884
+ 0.8890035748 0.8925864100 0.8986442089
+ 0.8893929124 0.8929423094 0.8989998102
+ 0.8897821903 0.8932980895 0.8993554711
+ 0.8901609182 0.8936539888 0.8997111917
+ 0.8905261755 0.8940098882 0.9000623226
+ 0.8908914924 0.8943657875 0.9003939033
+ 0.8912568092 0.8947216868 0.9007254839
+ 0.8916221261 0.8950775862 0.9010570049
+ 0.8919873834 0.8954334855 0.9013885856
+ 0.8923527002 0.8957893848 0.9017202258
+ 0.8927180171 0.8961452842 0.9020516872
+ 0.8930832744 0.8965011239 0.9023833275
+ 0.8934485912 0.8968570232 0.9027149081
+ 0.8938139081 0.8972129226 0.9030464888
+ 0.8941792250 0.8975688219 0.9033780098
+ 0.8945444822 0.8979247212 0.9037095904
+ 0.8949097991 0.8982806206 0.9040411711
+ 0.8952751160 0.8986365199 0.9043726921
+ 0.8956403732 0.8989924192 0.9047042727
+ 0.8960056901 0.8993481994 0.9050359130
+ 0.8963710070 0.8997040987 0.9053673744
+ 0.8967363238 0.9000564218 0.9056990147
+ 0.8971015811 0.9003906250 0.9060305953
+ 0.8974668980 0.9007248282 0.9063621759
+ 0.8978322148 0.9010589719 0.9066936970
+ 0.8981974721 0.9013931751 0.9070252776
+ 0.8985627890 0.9017273784 0.9073569179
+ 0.8989281058 0.9020615816 0.9076883793
+ 0.8992933035 0.9023957849 0.9080200195
+ 0.8996586204 0.9027299881 0.9083516002
+ 0.9000225067 0.9030641913 0.9086831808
+ 0.9003654122 0.9033983946 0.9090147018
+ 0.9007081985 0.9037325978 0.9093462825
+ 0.9010511041 0.9040668011 0.9096779227
+ 0.9013940096 0.9044010043 0.9100087881
+ 0.9017369151 0.9047352076 0.9103180766
+ 0.9020798206 0.9050694108 0.9106273055
+ 0.9024227262 0.9054036140 0.9109365940
+ 0.9027655125 0.9057378173 0.9112458825
+ 0.9031084180 0.9060720801 0.9115551114
+ 0.9034513235 0.9064062834 0.9118643999
+ 0.9037942290 0.9067404866 0.9121736884
+ 0.9041370749 0.9070746899 0.9124829173
+ 0.9044799805 0.9074088931 0.9127922058
+ 0.9048228264 0.9077430964 0.9131013751
+ 0.9051656723 0.9080772996 0.9134107232
+ 0.9055085778 0.9084115028 0.9137200117
+ 0.9058514833 0.9087457061 0.9140291810
+ 0.9061943889 0.9090799093 0.9143385291
+ 0.9065371752 0.9094141126 0.9146478176
+ 0.9068800807 0.9097483158 0.9149569869
+ 0.9072229862 0.9100775123 0.9152662754
+ 0.9075658917 0.9103915095 0.9155756235
+ 0.9079087973 0.9107053876 0.9158847928
+ 0.9082517028 0.9110193849 0.9161940813
+ 0.9085944891 0.9113333821 0.9165033102
+ 0.9089373946 0.9116473198 0.9168125987
+ 0.9092803001 0.9119613171 0.9171218872
+ 0.9096232057 0.9122751951 0.9174311161
+ 0.9099661112 0.9125891924 0.9177404046
+ 0.9102901220 0.9129031897 0.9180496931
+ 0.9106121063 0.9132171273 0.9183589220
+ 0.9109339714 0.9135311246 0.9186682105
+ 0.9112560153 0.9138450027 0.9189774990
+ 0.9115778804 0.9141589999 0.9192867279
+ 0.9118999243 0.9144729972 0.9195960164
+ 0.9122217894 0.9147868752 0.9199051857
+ 0.9125437737 0.9151008725 0.9202002287
+ 0.9128656983 0.9154148102 0.9204887748
+ 0.9131876826 0.9157288074 0.9207773805
+ 0.9135096073 0.9160428047 0.9210659862
+ 0.9138315916 0.9163566828 0.9213547111
+ 0.9141535759 0.9166706800 0.9216433167
+ 0.9144755006 0.9169846177 0.9219319224
+ 0.9147974849 0.9172986150 0.9222205281
+ 0.9151194096 0.9176126122 0.9225090742
+ 0.9154413939 0.9179264903 0.9227977991
+ 0.9157633185 0.9182404876 0.9230864048
+ 0.9160853028 0.9185544252 0.9233750105
+ 0.9164072275 0.9188684225 0.9236636162
+ 0.9167292118 0.9191824198 0.9239522219
+ 0.9170510769 0.9194962978 0.9242408276
+ 0.9173731208 0.9198102951 0.9245294929
+ 0.9176951051 0.9201167822 0.9248180985
+ 0.9180170298 0.9204118252 0.9251067042
+ 0.9183390141 0.9207069278 0.9253953099
+ 0.9186608791 0.9210019112 0.9256839156
+ 0.9189829230 0.9212970138 0.9259725809
+ 0.9193047881 0.9215921164 0.9262611866
+ 0.9196267724 0.9218870997 0.9265497923
+ 0.9199486971 0.9221822023 0.9268383980
+ 0.9202542901 0.9224773049 0.9271270037
+ 0.9205567241 0.9227722883 0.9274156094
+ 0.9208590984 0.9230673909 0.9277042747
+ 0.9211614728 0.9233623743 0.9279928803
+ 0.9214640260 0.9236574769 0.9282814860
+ 0.9217664003 0.9239525795 0.9285700917
+ 0.9220687747 0.9242476225 0.9288586974
+ 0.9223712087 0.9245427251 0.9291474223
+ 0.9226737022 0.9248378277 0.9294360280
+ 0.9229760766 0.9251328111 0.9297245741
+ 0.9232785106 0.9254279137 0.9300122857
+ 0.9235808849 0.9257230163 0.9302818179
+ 0.9238833189 0.9260179996 0.9305514097
+ 0.9241858125 0.9263131022 0.9308208823
+ 0.9244881868 0.9266080856 0.9310904145
+ 0.9247906208 0.9269031882 0.9313598871
+ 0.9250929952 0.9271982908 0.9316294193
+ 0.9253954887 0.9274932742 0.9318988919
+ 0.9256979227 0.9277883768 0.9321684241
+ 0.9260002971 0.9280834794 0.9324380159
+ 0.9263026714 0.9283785224 0.9327074885
+ 0.9266052246 0.9286736250 0.9329770207
+ 0.9269075990 0.9289686084 0.9332464933
+ 0.9272099733 0.9292637110 0.9335160255
+ 0.9275124073 0.9295588136 0.9337854981
+ 0.9278147817 0.9298537970 0.9340549707
+ 0.9281172752 0.9301400185 0.9343245029
+ 0.9284197092 0.9304174185 0.9345940948
+ 0.9287220836 0.9306948781 0.9348636270
+ 0.9290245175 0.9309722781 0.9351330996
+ 0.9293270111 0.9312496781 0.9354025722
+ 0.9296293855 0.9315270782 0.9356721044
+ 0.9299318194 0.9318045974 0.9359415770
+ 0.9302201271 0.9320819974 0.9362111092
+ 0.9305043221 0.9323593974 0.9364805818
+ 0.9307885170 0.9326369166 0.9367501736
+ 0.9310727119 0.9329143167 0.9370197058
+ 0.9313569069 0.9331917167 0.9372891784
+ 0.9316411018 0.9334691167 0.9375587106
+ 0.9319252968 0.9337465763 0.9378281832
+ 0.9322094917 0.9340239763 0.9380977154
+ 0.9324936867 0.9343013763 0.9383671880
+ 0.9327778816 0.9345787764 0.9386367202
+ 0.9330620766 0.9348562956 0.9389063120
+ 0.9333462715 0.9351336956 0.9391757846
+ 0.9336305261 0.9354110956 0.9394453168
+ 0.9339147210 0.9356886148 0.9397147894
+ 0.9341989160 0.9359660149 0.9399843216
+ 0.9344831109 0.9362434149 0.9402372241
+ 0.9347673059 0.9365208149 0.9404889941
+ 0.9350515008 0.9367982745 0.9407408237
+ 0.9353356957 0.9370756745 0.9409927130
+ 0.9356198907 0.9373530746 0.9412444830
+ 0.9359040856 0.9376305938 0.9414963126
+ 0.9361882806 0.9379079938 0.9417482018
+ 0.9364724755 0.9381853938 0.9419999719
+ 0.9367566705 0.9384627938 0.9422518015
+ 0.9370409250 0.9387403131 0.9425036907
+ 0.9373251200 0.9390177131 0.9427555203
+ 0.9376093149 0.9392951131 0.9430072904
+ 0.9378935099 0.9395725727 0.9432591796
+ 0.9381777048 0.9398499727 0.9435110092
+ 0.9384618998 0.9401198030 0.9437627792
+ 0.9387460947 0.9403808117 0.9440147281
+ 0.9390302896 0.9406418204 0.9442664981
+ 0.9393144846 0.9409028292 0.9445183277
+ 0.9395986795 0.9411637187 0.9447702169
+ 0.9398828745 0.9414247274 0.9450219870
+ 0.9401571155 0.9416856766 0.9452738166
+ 0.9404243231 0.9419466257 0.9455257058
+ 0.9406914711 0.9422075748 0.9457774758
+ 0.9409586787 0.9424685836 0.9460293055
+ 0.9412258863 0.9427295923 0.9462810755
+ 0.9414930940 0.9429904819 0.9465330243
+ 0.9417603016 0.9432514906 0.9467847943
+ 0.9420275092 0.9435124993 0.9470366240
+ 0.9422945976 0.9437733889 0.9472885132
+ 0.9425618052 0.9440343976 0.9475402832
+ 0.9428290129 0.9442954063 0.9477921128
+ 0.9430962205 0.9445564151 0.9480440021
+ 0.9433634281 0.9448173046 0.9482957721
+ 0.9436305761 0.9450783134 0.9485476017
+ 0.9438977838 0.9453393221 0.9487994909
+ 0.9441649914 0.9456002116 0.9490513206
+ 0.9444321990 0.9458612204 0.9493030906
+ 0.9446994066 0.9461222291 0.9495549798
+ 0.9449666142 0.9463831782 0.9498068094
+ 0.9452338219 0.9466441274 0.9500548244
+ 0.9455010295 0.9469050765 0.9502903223
+ 0.9457681775 0.9471660852 0.9505258203
+ 0.9460353851 0.9474269748 0.9507611990
+ 0.9463025928 0.9476879835 0.9509966969
+ 0.9465698004 0.9479489923 0.9512321949
+ 0.9468370080 0.9482100010 0.9514675736
+ 0.9471042156 0.9484708905 0.9517030716
+ 0.9473714232 0.9487318993 0.9519386292
+ 0.9476385713 0.9489929080 0.9521741271
+ 0.9479057789 0.9492537975 0.9524095058
+ 0.9481729865 0.9495148063 0.9526450038
+ 0.9484401941 0.9497758150 0.9528805017
+ 0.9487074018 0.9500346184 0.9531158805
+ 0.9489746094 0.9502801895 0.9533513784
+ 0.9492418170 0.9505258203 0.9535868764
+ 0.9495090246 0.9507713914 0.9538223147
+ 0.9497761726 0.9510170221 0.9540578127
+ 0.9500408173 0.9512627125 0.9542933106
+ 0.9502921104 0.9515082836 0.9545286894
+ 0.9505435228 0.9517539144 0.9547641873
+ 0.9507948160 0.9519994855 0.9549996853
+ 0.9510461092 0.9522451162 0.9552351832
+ 0.9512975216 0.9524906874 0.9554706216
+ 0.9515488148 0.9527363181 0.9557061195
+ 0.9518002272 0.9529820085 0.9559416175
+ 0.9520515203 0.9532275796 0.9561769962
+ 0.9523028135 0.9534732103 0.9564124942
+ 0.9525542259 0.9537187815 0.9566479921
+ 0.9528055191 0.9539644122 0.9568833709
+ 0.9530568123 0.9542099833 0.9571189284
+ 0.9533082247 0.9544556141 0.9573544264
+ 0.9535595179 0.9547013044 0.9575898051
+ 0.9538108110 0.9549468756 0.9578253031
+ 0.9540622234 0.9551925063 0.9580608010
+ 0.9543135166 0.9554380774 0.9582962990
+ 0.9545649290 0.9556837082 0.9585316777
+ 0.9548162222 0.9559292793 0.9587671757
+ 0.9550675154 0.9561749101 0.9590026736
+ 0.9553189278 0.9564206004 0.9592381120
+ 0.9555702209 0.9566661716 0.9594736099
+ 0.9558215141 0.9569118023 0.9597091079
+ 0.9560729265 0.9571573734 0.9599444866
+ 0.9563242197 0.9574030042 0.9601684213
+ 0.9565755725 0.9576485753 0.9603887796
+ 0.9568269253 0.9578942060 0.9606090784
+ 0.9570782185 0.9581398964 0.9608293772
+ 0.9573295712 0.9583855271 0.9610496759
+ 0.9575809240 0.9586310983 0.9612699747
+ 0.9578322172 0.9588767290 0.9614903927
+ 0.9580836296 0.9591223001 0.9617106915
+ 0.9583349228 0.9593678713 0.9619309902
+ 0.9585862160 0.9596135020 0.9621512890
+ 0.9588376284 0.9598590732 0.9623715878
+ 0.9590889215 0.9600986838 0.9625920057
+ 0.9593402743 0.9603298903 0.9628123045
+ 0.9595916271 0.9605612159 0.9630326033
+ 0.9598429203 0.9607924819 0.9632529020
+ 0.9600886703 0.9610238075 0.9634733200
+ 0.9603253007 0.9612550735 0.9636936188
+ 0.9605618119 0.9614862800 0.9639139175
+ 0.9607983232 0.9617176056 0.9641342163
+ 0.9610348940 0.9619488716 0.9643545151
+ 0.9612714052 0.9621801972 0.9645748734
+ 0.9615079761 0.9624115229 0.9647951722
+ 0.9617444873 0.9626427293 0.9650154710
+ 0.9619809985 0.9628739953 0.9652358294
+ 0.9622176290 0.9631053209 0.9654561877
+ 0.9624540806 0.9633365870 0.9656764865
+ 0.9626907110 0.9635679126 0.9658967853
+ 0.9629272223 0.9637991190 0.9661170840
+ 0.9631636739 0.9640303850 0.9663373828
+ 0.9634003043 0.9642617106 0.9665578008
+ 0.9636368155 0.9644929767 0.9667780995
+ 0.9638733864 0.9647243023 0.9669983983
+ 0.9641098976 0.9649556279 0.9672186971
+ 0.9643464088 0.9651867747 0.9674391150
+ 0.9645829797 0.9654181004 0.9676594138
+ 0.9648194909 0.9656494260 0.9678797126
+ 0.9650561213 0.9658806920 0.9681000113
+ 0.9652925730 0.9661120176 0.9683203101
+ 0.9655292034 0.9663432240 0.9685407281
+ 0.9657657146 0.9665744901 0.9687610269
+ 0.9660022259 0.9668058157 0.9689813256
+ 0.9662387967 0.9670370817 0.9692016244
+ 0.9664753079 0.9672684073 0.9694219232
+ 0.9667118788 0.9674996138 0.9696422815
+ 0.9669483900 0.9677308798 0.9698625803
+ 0.9671849012 0.9679622054 0.9700775743
+ 0.9674214721 0.9681934714 0.9702839255
+ 0.9676579833 0.9684247971 0.9704902172
+ 0.9678946137 0.9686561227 0.9706965089
+ 0.9681311250 0.9688873291 0.9709028006
+ 0.9683675766 0.9691185951 0.9711090922
+ 0.9686042070 0.9693499207 0.9713153839
+ 0.9688407183 0.9695811868 0.9715216756
+ 0.9690772891 0.9698125124 0.9717280269
+ 0.9693138003 0.9700412154 0.9719343185
+ 0.9695503116 0.9702590704 0.9721406102
+ 0.9697868824 0.9704769850 0.9723469019
+ 0.9700220823 0.9706948996 0.9725531936
+ 0.9702448249 0.9709128141 0.9727594852
+ 0.9704675078 0.9711307287 0.9729657769
+ 0.9706903100 0.9713485837 0.9731721282
+ 0.9709129930 0.9715664983 0.9733784199
+ 0.9711356759 0.9717844129 0.9735847116
+ 0.9713584781 0.9720023274 0.9737908840
+ 0.9715812206 0.9722201824 0.9739971757
+ 0.9718039036 0.9724380970 0.9742035270
+ 0.9720267057 0.9726560116 0.9744098186
+ 0.9722493887 0.9728739262 0.9746161103
+ 0.9724720716 0.9730917811 0.9748224020
+ 0.9726948738 0.9733096957 0.9750286937
+ 0.9729176164 0.9735276103 0.9752349854
+ 0.9731402993 0.9737455845 0.9754412770
+ 0.9733631015 0.9739634991 0.9756476283
+ 0.9735857844 0.9741814137 0.9758539200
+ 0.9738085270 0.9743993282 0.9760602117
+ 0.9740313292 0.9746171832 0.9762665033
+ 0.9742540121 0.9748350978 0.9764727950
+ 0.9744768143 0.9750530124 0.9766790867
+ 0.9746994972 0.9752709270 0.9768853784
+ 0.9749221802 0.9754887819 0.9770917296
+ 0.9751449823 0.9757066965 0.9772980213
+ 0.9753677249 0.9759246111 0.9775043130
+ 0.9755904078 0.9761425257 0.9777106047
+ 0.9758132100 0.9763603806 0.9779168963
+ 0.9760358930 0.9765782952 0.9781231284
+ 0.9762585759 0.9767962098 0.9783294201
+ 0.9764813781 0.9770141244 0.9785357118
+ 0.9767041206 0.9772319794 0.9787420034
+ 0.9769268036 0.9774498940 0.9789482951
+ 0.9771496058 0.9776678085 0.9791545868
+ 0.9773722887 0.9778857231 0.9793608785
+ 0.9775949717 0.9781035781 0.9795672297
+ 0.9778177738 0.9783214927 0.9797735214
+ 0.9780405164 0.9785394073 0.9799798131
+ 0.9782631993 0.9787573218 0.9801744223
+ 0.9784860015 0.9789751768 0.9803677201
+ 0.9787086844 0.9791930914 0.9805610180
+ 0.9789314270 0.9794110060 0.9807543159
+ 0.9791542292 0.9796289206 0.9809476137
+ 0.9793769121 0.9798467755 0.9811409116
+ 0.9795997143 0.9800609946 0.9813342094
+ 0.9798223972 0.9802663922 0.9815275073
+ 0.9800425172 0.9804717898 0.9817208052
+ 0.9802523851 0.9806771874 0.9819141030
+ 0.9804621935 0.9808827043 0.9821074009
+ 0.9806721210 0.9810881019 0.9823006988
+ 0.9808819294 0.9812934995 0.9824939966
+ 0.9810917974 0.9814988971 0.9826872945
+ 0.9813016057 0.9817042947 0.9828805923
+ 0.9815114737 0.9819096923 0.9830738902
+ 0.9817212820 0.9821150899 0.9832671881
+ 0.9819312096 0.9823204875 0.9834604859
+ 0.9821410179 0.9825258851 0.9836537838
+ 0.9823508859 0.9827314019 0.9838470817
+ 0.9825606942 0.9829367995 0.9840403795
+ 0.9827706218 0.9831421971 0.9842336774
+ 0.9829803705 0.9833475947 0.9844269753
+ 0.9831902981 0.9835529923 0.9846202731
+ 0.9834001064 0.9837583899 0.9848135710
+ 0.9836099744 0.9839637876 0.9850069284
+ 0.9838197827 0.9841691852 0.9852002263
+ 0.9840297103 0.9843745828 0.9853935242
+ 0.9842395186 0.9845800996 0.9855868220
+ 0.9844493866 0.9847854972 0.9857801199
+ 0.9846591949 0.9849908948 0.9859734178
+ 0.9848691225 0.9851962924 0.9861667156
+ 0.9850788713 0.9854016900 0.9863600135
+ 0.9852887988 0.9856070876 0.9865533113
+ 0.9854986072 0.9858124852 0.9867466092
+ 0.9857084751 0.9860178828 0.9869399071
+ 0.9859182835 0.9862232804 0.9871332049
+ 0.9861282110 0.9864287972 0.9873265028
+ 0.9863380194 0.9866341949 0.9875198007
+ 0.9865478873 0.9868395925 0.9877130985
+ 0.9867578149 0.9870449901 0.9879063964
+ 0.9869676232 0.9872503877 0.9880996943
+ 0.9871774912 0.9874557853 0.9882929921
+ 0.9873872995 0.9876611829 0.9884862900
+ 0.9875972271 0.9878665805 0.9886795878
+ 0.9878069758 0.9880719781 0.9888730049
+ 0.9880169034 0.9882774949 0.9890663028
+ 0.9882267118 0.9884828925 0.9892596006
+ 0.9884365797 0.9886882901 0.9894528985
+ 0.9886463881 0.9888936877 0.9896461964
+ 0.9888563156 0.9890990853 0.9898394942
+ 0.9890661240 0.9893044829 0.9900307059
+ 0.9892759919 0.9895098805 0.9902120233
+ 0.9894858003 0.9897152781 0.9903932214
+ 0.9896957278 0.9899206758 0.9905744791
+ 0.9899054766 0.9901189804 0.9907557964
+ 0.9901087880 0.9903126955 0.9909369946
+ 0.9903066158 0.9905064702 0.9911183119
+ 0.9905043840 0.9907001853 0.9912995100
+ 0.9907022119 0.9908940196 0.9914808273
+ 0.9909000993 0.9910876751 0.9916620851
+ 0.9910979271 0.9912815094 0.9918432832
+ 0.9912956953 0.9914752245 0.9920246005
+ 0.9914935231 0.9916689992 0.9922057986
+ 0.9916914105 0.9918627143 0.9923871160
+ 0.9918891788 0.9920564294 0.9925683737
+ 0.9920870066 0.9922502041 0.9927495718
+ 0.9922847748 0.9924439192 0.9929308891
+ 0.9924827218 0.9926376939 0.9931120872
+ 0.9926804900 0.9928314090 0.9932934046
+ 0.9928783178 0.9930251837 0.9934747219
+ 0.9930760860 0.9932188988 0.9936559200
+ 0.9932739735 0.9934126735 0.9938371778
+ 0.9934718013 0.9936063886 0.9940183759
+ 0.9936696291 0.9938002229 0.9941996932
+ 0.9938673973 0.9939938784 0.9943810105
+ 0.9940652847 0.9941875935 0.9945622087
+ 0.9942631125 0.9943814278 0.9947435260
+ 0.9944608808 0.9945750833 0.9949247241
+ 0.9946587086 0.9947689176 0.9951059818
+ 0.9948565960 0.9949625731 0.9952871799
+ 0.9950544238 0.9951564074 0.9954684973
+ 0.9952521920 0.9953501225 0.9956498146
+ 0.9954500198 0.9955438972 0.9958310127
+ 0.9956479073 0.9957376122 0.9960122705
+ 0.9958456755 0.9959313273 0.9961935282
+ 0.9960435033 0.9961251020 0.9963747859
+ 0.9962412715 0.9963188171 0.9965561032
+ 0.9964392185 0.9965125918 0.9967373013
+ 0.9966369867 0.9967063069 0.9969186187
+ 0.9968348145 0.9969000816 0.9970998168
+ 0.9970325828 0.9970937967 0.9972810745
+ 0.9972305298 0.9972875714 0.9974623919
+ 0.9974282980 0.9974812865 0.9976435900
+ 0.9976261258 0.9976751208 0.9978249073
+ 0.9978238940 0.9978687763 0.9980061054
+ 0.9980217814 0.9980624914 0.9981874228
+ 0.9982196093 0.9982563257 0.9983686805
+ 0.9984173775 0.9984499812 0.9985498786
+ 0.9986152053 0.9986438155 0.9987311959
+ 0.9988130927 0.9988374710 0.9989123940
+ 0.9990109205 0.9990313053 0.9990937114
+ 0.9992086887 0.9992250204 0.9992750287
+ 0.9994065166 0.9994187951 0.9994562268
+ 0.9996044040 0.9996125102 0.9996374846
+ 0.9998021722 0.9998062849 0.9998186827
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/kodak_dscs_3154.spi1d b/release/datafiles/colormanagement/luts/film_response/kodak_dscs_3154.spi1d
new file mode 100644
index 00000000000..9810d26548e
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/kodak_dscs_3154.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0008270687 0.0012806139 0.0007092019
+ 0.0016541370 0.0025612270 0.0014184040
+ 0.0024812061 0.0038418409 0.0021276060
+ 0.0033082750 0.0051224548 0.0028368081
+ 0.0041353442 0.0064030681 0.0035460100
+ 0.0049624122 0.0076836818 0.0042552119
+ 0.0057894811 0.0089642964 0.0049644141
+ 0.0066165500 0.0102737201 0.0056736148
+ 0.0074436190 0.0117049702 0.0063828169
+ 0.0082706874 0.0131362099 0.0070920191
+ 0.0090977559 0.0145674599 0.0078012212
+ 0.0099248253 0.0159987099 0.0085104229
+ 0.0108320098 0.0174299609 0.0092196250
+ 0.0117472196 0.0188612100 0.0099288272
+ 0.0126624200 0.0203272700 0.0107055604
+ 0.0135776196 0.0219289195 0.0114898197
+ 0.0144928200 0.0235305596 0.0122740902
+ 0.0154080195 0.0251322109 0.0130583504
+ 0.0163232200 0.0267338492 0.0138426097
+ 0.0172384195 0.0283354893 0.0146268802
+ 0.0181536209 0.0299371406 0.0154111404
+ 0.0190688204 0.0317234285 0.0161953997
+ 0.0199840199 0.0335172787 0.0169796702
+ 0.0209966209 0.0353111215 0.0177639294
+ 0.0220109392 0.0371049605 0.0185481999
+ 0.0230252706 0.0388987996 0.0193324592
+ 0.0240395907 0.0407759696 0.0201293100
+ 0.0250539202 0.0427856296 0.0209981594
+ 0.0260682497 0.0447952896 0.0218669996
+ 0.0270825699 0.0468049496 0.0227358509
+ 0.0280968994 0.0488146096 0.0236046892
+ 0.0291112196 0.0509230010 0.0244735405
+ 0.0301393494 0.0531734005 0.0253423806
+ 0.0312651210 0.0554237999 0.0262112301
+ 0.0323909000 0.0576741993 0.0270800795
+ 0.0335166790 0.0599245988 0.0279489197
+ 0.0346424617 0.0624321401 0.0288177691
+ 0.0357682407 0.0649486035 0.0296866093
+ 0.0368940197 0.0674650520 0.0306164194
+ 0.0380197987 0.0699815080 0.0315806195
+ 0.0391455814 0.0727861822 0.0325448215
+ 0.0403015316 0.0755929798 0.0335090198
+ 0.0415524915 0.0783997923 0.0344732217
+ 0.0428034514 0.0813405216 0.0354374312
+ 0.0440544114 0.0844588801 0.0364016294
+ 0.0453053713 0.0875772387 0.0373658314
+ 0.0465563312 0.0907685384 0.0383300297
+ 0.0478072912 0.0942139179 0.0392942317
+ 0.0490582511 0.0976593122 0.0402872488
+ 0.0503439009 0.1012116969 0.0413589515
+ 0.0517351814 0.1049906015 0.0424306504
+ 0.0531264618 0.1087696031 0.0435023494
+ 0.0545177385 0.1127699018 0.0445740595
+ 0.0559090301 0.1168769971 0.0456457585
+ 0.0573003106 0.1210578978 0.0467174612
+ 0.0586915910 0.1254729033 0.0477891602
+ 0.0600922108 0.1298878938 0.0488608703
+ 0.0616402999 0.1345676035 0.0499325693
+ 0.0631883815 0.1392543018 0.0511177592
+ 0.0647364631 0.1441261023 0.0523105711
+ 0.0662845522 0.1490330994 0.0535033792
+ 0.0678326264 0.1540661007 0.0546961986
+ 0.0693807229 0.1591300964 0.0558890104
+ 0.0710334405 0.1642663032 0.0570818186
+ 0.0727559403 0.1694173962 0.0582746305
+ 0.0744784400 0.1745833009 0.0594674386
+ 0.0762009397 0.1797512025 0.0607356615
+ 0.0779234320 0.1848731041 0.0620646887
+ 0.0796459317 0.1899926066 0.0633937269
+ 0.0815215707 0.1950089037 0.0647227690
+ 0.0834368318 0.2000242025 0.0660518110
+ 0.0853521004 0.2048937976 0.0673808381
+ 0.0872673616 0.2097633928 0.0687098801
+ 0.0891826227 0.2144646943 0.0700433925
+ 0.0912189633 0.2191573977 0.0715252534
+ 0.0933454409 0.2236897051 0.0730071068
+ 0.0954719111 0.2281869054 0.0744889826
+ 0.0975983888 0.2325620949 0.0759708434
+ 0.0997248664 0.2368548959 0.0774526969
+ 0.1020506024 0.2410928011 0.0789345577
+ 0.1044057980 0.2451802045 0.0804644004
+ 0.1067610979 0.2492675036 0.0821170136
+ 0.1091163978 0.2531898916 0.0837696269
+ 0.1116243005 0.2570762932 0.0854222402
+ 0.1142238006 0.2609150112 0.0870748535
+ 0.1168233976 0.2646088004 0.0887274593
+ 0.1194228977 0.2683025002 0.0904237032
+ 0.1222214997 0.2718980014 0.0922659934
+ 0.1250769049 0.2754099071 0.0941082835
+ 0.1279322952 0.2789216936 0.0959505737
+ 0.1308598965 0.2823159099 0.0977928713
+ 0.1339771003 0.2856579125 0.0996351615
+ 0.1370943040 0.2889998853 0.1016450971
+ 0.1402291059 0.2922315896 0.1036963984
+ 0.1436063051 0.2954162955 0.1057477966
+ 0.1469835043 0.2986010015 0.1077990979
+ 0.1503873020 0.3017044067 0.1098503992
+ 0.1540133953 0.3047442138 0.1121131033
+ 0.1576395929 0.3077841103 0.1143923029
+ 0.1613450944 0.3107880056 0.1166715994
+ 0.1651988029 0.3136951029 0.1189509034
+ 0.1690524071 0.3166022003 0.1213624030
+ 0.1730536968 0.3195092976 0.1238868013
+ 0.1771031022 0.3223156929 0.1264111996
+ 0.1811967939 0.3251017034 0.1289356053
+ 0.1854016036 0.3278875947 0.1316096932
+ 0.1896062940 0.3306469023 0.1343929023
+ 0.1939094067 0.3333224058 0.1371762007
+ 0.1982226968 0.3359979987 0.1399594992
+ 0.2025707066 0.3386735022 0.1430062056
+ 0.2069430053 0.3412984908 0.1460568011
+ 0.2113184035 0.3438735902 0.1491073966
+ 0.2157011032 0.3464488089 0.1523478031
+ 0.2200832069 0.3490239978 0.1556666940
+ 0.2244319022 0.3515425920 0.1589855999
+ 0.2287805974 0.3540267050 0.1624847949
+ 0.2330776006 0.3565106988 0.1660633981
+ 0.2373543978 0.3589948118 0.1696420014
+ 0.2415924072 0.3614296019 0.1734369993
+ 0.2457672954 0.3638310134 0.1772560030
+ 0.2499420941 0.3662323952 0.1811341941
+ 0.2539947033 0.3686338067 0.1851633936
+ 0.2580456138 0.3710030019 0.1891925931
+ 0.2620247900 0.3733294904 0.1933576018
+ 0.2659370899 0.3756558895 0.1975566000
+ 0.2698495090 0.3779824078 0.2018067986
+ 0.2736209035 0.3802998960 0.2061281949
+ 0.2773866057 0.3825586140 0.2104569972
+ 0.2811067104 0.3848172128 0.2148493975
+ 0.2847231030 0.3870758116 0.2192417979
+ 0.2883394957 0.3893344998 0.2236506939
+ 0.2918758094 0.3915497959 0.2280631959
+ 0.2953441143 0.3937469125 0.2324603051
+ 0.2988123894 0.3959440887 0.2368455976
+ 0.3021861017 0.3981412947 0.2412119061
+ 0.3055104911 0.4003298879 0.2455295026
+ 0.3088349998 0.4024715126 0.2498470992
+ 0.3120698929 0.4046129882 0.2540681958
+ 0.3152567148 0.4067544937 0.2582857013
+ 0.3184433877 0.4088960886 0.2624298036
+ 0.3215635121 0.4110131860 0.2665235102
+ 0.3246200085 0.4131042957 0.2705960870
+ 0.3276765049 0.4151954055 0.2745501995
+ 0.3307037055 0.4172866046 0.2785041928
+ 0.3336381018 0.4193777144 0.2823660076
+ 0.3365724981 0.4214367867 0.2861714959
+ 0.3395070136 0.4234822094 0.2899771035
+ 0.3423467875 0.4255276918 0.2936319113
+ 0.3451676071 0.4275731146 0.2972859144
+ 0.3479883969 0.4296185970 0.3009010851
+ 0.3507789969 0.4316303134 0.3044045866
+ 0.3534946144 0.4336344004 0.3079079986
+ 0.3562101126 0.4356383979 0.3113526106
+ 0.3589256108 0.4376423955 0.3147099912
+ 0.3615824878 0.4396465123 0.3180673122
+ 0.3642010987 0.4416194856 0.3213653862
+ 0.3668195903 0.4435859025 0.3245829940
+ 0.3694381118 0.4455522895 0.3278006911
+ 0.3719865084 0.4475187063 0.3309766054
+ 0.3745158017 0.4494850039 0.3340623081
+ 0.3770450950 0.4514260888 0.3371481001
+ 0.3795743883 0.4533582032 0.3402245045
+ 0.3820356131 0.4552902877 0.3431868851
+ 0.3844830990 0.4572224021 0.3461492956
+ 0.3869304955 0.4591544867 0.3491117060
+ 0.3893780112 0.4610689878 0.3519938886
+ 0.3917695880 0.4629696906 0.3548417091
+ 0.3941422105 0.4648705125 0.3576894999
+ 0.3965147138 0.4667713046 0.3605172932
+ 0.3988873065 0.4686720073 0.3632592857
+ 0.4012235105 0.4705640972 0.3660013080
+ 0.4035275877 0.4724361002 0.3687433004
+ 0.4058316052 0.4743080139 0.3714326024
+ 0.4081357121 0.4761799872 0.3740772903
+ 0.4104278982 0.4780519009 0.3767220080
+ 0.4126693010 0.4799239039 0.3793666065
+ 0.4149107933 0.4817703068 0.3819434941
+ 0.4171522856 0.4836156964 0.3844990134
+ 0.4193938076 0.4854609966 0.3870545030
+ 0.4215936065 0.4873062968 0.3896099925
+ 0.4237779975 0.4891516864 0.3920964897
+ 0.4259622991 0.4909836054 0.3945704997
+ 0.4281466901 0.4928041101 0.3970445096
+ 0.4303230941 0.4946246147 0.3995184898
+ 0.4324553013 0.4964450002 0.4019325972
+ 0.4345873892 0.4982655048 0.4043321908
+ 0.4367195070 0.5000848770 0.4067319036
+ 0.4388515949 0.5018820167 0.4091314971
+ 0.4409618080 0.5036790967 0.4114879966
+ 0.4430460930 0.5054761171 0.4138199091
+ 0.4451304972 0.5072731972 0.4161519110
+ 0.4472149014 0.5090702772 0.4184837937
+ 0.4492993057 0.5108565092 0.4207941890
+ 0.4513547122 0.5126311779 0.4230645001
+ 0.4533953965 0.5144059062 0.4253348112
+ 0.4554361105 0.5161805749 0.4276050925
+ 0.4574767947 0.5179553032 0.4298754930
+ 0.4595173895 0.5197299719 0.4320927858
+ 0.4615274966 0.5214862823 0.4343070984
+ 0.4635280967 0.5232393146 0.4365214109
+ 0.4655286074 0.5249922872 0.4387356937
+ 0.4675292075 0.5267453194 0.4409281015
+ 0.4695298076 0.5284982920 0.4430915117
+ 0.4715020955 0.5302482843 0.4452548027
+ 0.4734657109 0.5319799185 0.4474182129
+ 0.4754293859 0.5337114930 0.4495815039
+ 0.4773930013 0.5354431868 0.4517075121
+ 0.4793567061 0.5371748209 0.4538244009
+ 0.4812973142 0.5389063954 0.4559414089
+ 0.4832268059 0.5406302214 0.4580583870
+ 0.4851562977 0.5423403978 0.4601719081
+ 0.4870857894 0.5440505743 0.4622465968
+ 0.4890153110 0.5457608104 0.4643214047
+ 0.4909291863 0.5474711061 0.4663960934
+ 0.4928269088 0.5491812825 0.4684709013
+ 0.4947246015 0.5508800745 0.4705354869
+ 0.4966222942 0.5525686145 0.4725716114
+ 0.4985199869 0.5542569757 0.4746077955
+ 0.5004112124 0.5559453964 0.4766440094
+ 0.5022791028 0.5576338172 0.4786801040
+ 0.5041469932 0.5593221784 0.4807038903
+ 0.5060148835 0.5609971285 0.4827046990
+ 0.5078828931 0.5626630187 0.4847055078
+ 0.5097507834 0.5643289089 0.4867062867
+ 0.5115942955 0.5659946799 0.4887070954
+ 0.5134339929 0.5676606297 0.4906964004
+ 0.5152738094 0.5693264008 0.4926646054
+ 0.5171135068 0.5709782243 0.4946328104
+ 0.5189533234 0.5726205111 0.4966011047
+ 0.5207813978 0.5742626786 0.4985693097
+ 0.5225942135 0.5759049058 0.5005292892
+ 0.5244070292 0.5775471926 0.5024672747
+ 0.5262197852 0.5791894197 0.5044053197
+ 0.5280326009 0.5808190107 0.5063433051
+ 0.5298454762 0.5824362040 0.5082812905
+ 0.5316343904 0.5840533972 0.5102161169
+ 0.5334210992 0.5856705904 0.5121259093
+ 0.5352079272 0.5872877836 0.5140355825
+ 0.5369945765 0.5889049768 0.5159453154
+ 0.5387812853 0.5905135870 0.5178549886
+ 0.5405598879 0.5921041965 0.5197647810
+ 0.5423210263 0.5936946869 0.5216510296
+ 0.5440822244 0.5952851772 0.5235339999
+ 0.5458433032 0.5968757272 0.5254169106
+ 0.5476043820 0.5984662175 0.5272998810
+ 0.5493655801 0.6000556946 0.5291827917
+ 0.5511103868 0.6016175747 0.5310512185
+ 0.5528460741 0.6031795144 0.5329084992
+ 0.5545817018 0.6047413945 0.5347657800
+ 0.5563173890 0.6063032746 0.5366231203
+ 0.5580530763 0.6078652143 0.5384802818
+ 0.5597887039 0.6094270945 0.5403330922
+ 0.5615018010 0.6109694839 0.5421653986
+ 0.5632117987 0.6125006080 0.5439975858
+ 0.5649217963 0.6140317917 0.5458298922
+ 0.5666316748 0.6155629158 0.5476621985
+ 0.5683416724 0.6170939803 0.5494945049
+ 0.5700508952 0.6186252236 0.5513088703
+ 0.5717346072 0.6201528907 0.5531163812
+ 0.5734183192 0.6216509938 0.5549240112
+ 0.5751019120 0.6231490970 0.5567315221
+ 0.5767856240 0.6246472001 0.5585390925
+ 0.5784692764 0.6261453032 0.5603417754
+ 0.5801506042 0.6276432872 0.5621244907
+ 0.5818070769 0.6291413903 0.5639072061
+ 0.5834636092 0.6306244135 0.5656898022
+ 0.5851200819 0.6320869923 0.5674725175
+ 0.5867766142 0.6335496902 0.5692551136
+ 0.5884330869 0.6350123286 0.5710229874
+ 0.5900881290 0.6364750266 0.5727801919
+ 0.5917161703 0.6379376054 0.5745375156
+ 0.5933442712 0.6394003034 0.5762947202
+ 0.5949723721 0.6408405900 0.5780519247
+ 0.5966004729 0.6422653794 0.5798091292
+ 0.5982285738 0.6436902285 0.5815427899
+ 0.5998566747 0.6451150179 0.5832737088
+ 0.6014575958 0.6465398073 0.5850045085
+ 0.6030557752 0.6479645967 0.5867353082
+ 0.6046540737 0.6493893862 0.5884662271
+ 0.6062523127 0.6507912278 0.5901939273
+ 0.6078504920 0.6521757841 0.5918970108
+ 0.6094486713 0.6535604000 0.5936000943
+ 0.6110262275 0.6549450159 0.5953032970
+ 0.6125928164 0.6563295126 0.5970063806
+ 0.6141594052 0.6577141285 0.5987095237
+ 0.6157259941 0.6590986848 0.6004055142
+ 0.6172925830 0.6604683995 0.6020792723
+ 0.6188592911 0.6618105173 0.6037530899
+ 0.6204167008 0.6631525755 0.6054267883
+ 0.6219497919 0.6644946933 0.6071006060
+ 0.6234828234 0.6658368111 0.6087743044
+ 0.6250159144 0.6671789289 0.6104397178
+ 0.6265488863 0.6685209274 0.6120821238
+ 0.6280819774 0.6698629856 0.6137245297
+ 0.6296150088 0.6711651087 0.6153669953
+ 0.6311213970 0.6724625826 0.6170094013
+ 0.6326187849 0.6737599969 0.6186518073
+ 0.6341162920 0.6750574708 0.6202881932
+ 0.6356136799 0.6763550043 0.6218971014
+ 0.6371111274 0.6776524782 0.6235058904
+ 0.6386085153 0.6789500117 0.6251147985
+ 0.6401032805 0.6802387238 0.6267235875
+ 0.6415628791 0.6814897060 0.6283324957
+ 0.6430225968 0.6827408075 0.6299412847
+ 0.6444821954 0.6839917898 0.6315155029
+ 0.6459417939 0.6852428913 0.6330882907
+ 0.6474015117 0.6864938736 0.6346611977
+ 0.6488611102 0.6877449751 0.6362339854
+ 0.6503120065 0.6889960170 0.6378068924
+ 0.6517316103 0.6902375817 0.6393796802
+ 0.6531512737 0.6914405823 0.6409292221
+ 0.6545709968 0.6926437020 0.6424635053
+ 0.6559906006 0.6938467026 0.6439977884
+ 0.6574103236 0.6950497031 0.6455320716
+ 0.6588299274 0.6962528229 0.6470664144
+ 0.6602421999 0.6974558234 0.6486006975
+ 0.6616197824 0.6986588836 0.6501314044
+ 0.6629973054 0.6998618841 0.6516245008
+ 0.6643748879 0.7010213137 0.6531175971
+ 0.6657524109 0.7021750808 0.6546106935
+ 0.6671299934 0.7033289075 0.6561039090
+ 0.6685075164 0.7044826746 0.6575970054
+ 0.6698850989 0.7056365013 0.6590901017
+ 0.6712222099 0.7067903280 0.6605660915
+ 0.6725556254 0.7079440951 0.6620154977
+ 0.6738889813 0.7090979218 0.6634649038
+ 0.6752223969 0.7102407813 0.6649141908
+ 0.6765558124 0.7113444209 0.6663635969
+ 0.6778892279 0.7124481201 0.6678130031
+ 0.6792225838 0.7135518193 0.6692622900
+ 0.6805368066 0.7146555185 0.6706889868
+ 0.6818242073 0.7157592177 0.6720920801
+ 0.6831117272 0.7168627977 0.6734951735
+ 0.6843991280 0.7179664969 0.6748983264
+ 0.6856865287 0.7190701962 0.6763014197
+ 0.6869739294 0.7201659083 0.6777045727
+ 0.6882612705 0.7212188840 0.6791077256
+ 0.6895486712 0.7222719789 0.6804931164
+ 0.6908051968 0.7233250737 0.6818476915
+ 0.6920449734 0.7243781090 0.6832023263
+ 0.6932848096 0.7254312038 0.6845569015
+ 0.6945245862 0.7264842987 0.6859114766
+ 0.6957643032 0.7275372744 0.6872661114
+ 0.6970040798 0.7285904288 0.6886206269
+ 0.6982439160 0.7296434045 0.6899752021
+ 0.6994836926 0.7306630015 0.6912801862
+ 0.7006949186 0.7316653132 0.6925842166
+ 0.7018857002 0.7326676250 0.6938881874
+ 0.7030766010 0.7336698771 0.6951922178
+ 0.7042673826 0.7346723080 0.6964963078
+ 0.7054582238 0.7356746197 0.6978002787
+ 0.7066490054 0.7366768718 0.6991043091
+ 0.7078399062 0.7376793027 0.7003920078
+ 0.7090306878 0.7386816144 0.7016437054
+ 0.7102121711 0.7396839261 0.7028955221
+ 0.7113531232 0.7406517267 0.7041472197
+ 0.7124938965 0.7416034937 0.7053989768
+ 0.7136347294 0.7425553799 0.7066507936
+ 0.7147756219 0.7435072064 0.7079024911
+ 0.7159163952 0.7444590926 0.7091543078
+ 0.7170572281 0.7454109192 0.7103886008
+ 0.7181981206 0.7463628054 0.7115867734
+ 0.7193388939 0.7473145723 0.7127850056
+ 0.7204583883 0.7482665181 0.7139831781
+ 0.7215486169 0.7492182851 0.7151812911
+ 0.7226387858 0.7501612902 0.7163795233
+ 0.7237290144 0.7510632277 0.7175776958
+ 0.7248191237 0.7519652247 0.7187758088
+ 0.7259092927 0.7528672218 0.7199739814
+ 0.7269995213 0.7537690997 0.7211189270
+ 0.7280896902 0.7546710968 0.7222625017
+ 0.7291797996 0.7555730939 0.7234061956
+ 0.7302573919 0.7564749718 0.7245498896
+ 0.7312965989 0.7573770285 0.7256935835
+ 0.7323358059 0.7582790256 0.7268372178
+ 0.7333750129 0.7591809034 0.7279809117
+ 0.7344142199 0.7600783706 0.7291246057
+ 0.7354534268 0.7609313726 0.7302554250
+ 0.7364925742 0.7617843747 0.7313441038
+ 0.7375317812 0.7626373768 0.7324327826
+ 0.7385709882 0.7634903789 0.7335215211
+ 0.7396101952 0.7643433809 0.7346101999
+ 0.7406175137 0.7651963830 0.7356988788
+ 0.7416058183 0.7660493851 0.7367876172
+ 0.7425940037 0.7669023871 0.7378762960
+ 0.7435823083 0.7677553892 0.7389649749
+ 0.7445706129 0.7686083913 0.7400509715
+ 0.7455587983 0.7694613934 0.7410846949
+ 0.7465471029 0.7702968121 0.7421182990
+ 0.7475354075 0.7711020112 0.7431520224
+ 0.7485235929 0.7719072104 0.7441856861
+ 0.7495118976 0.7727124095 0.7452194095
+ 0.7504745722 0.7735176086 0.7462530732
+ 0.7514122725 0.7743229270 0.7472867966
+ 0.7523499727 0.7751281261 0.7483205199
+ 0.7532876730 0.7759333253 0.7493541837
+ 0.7542254925 0.7767385244 0.7503672838
+ 0.7551631927 0.7775437236 0.7513464093
+ 0.7561008930 0.7783489823 0.7523254156
+ 0.7570385933 0.7791541815 0.7533044815
+ 0.7579764128 0.7799593806 0.7542834878
+ 0.7589141130 0.7807205915 0.7552626133
+ 0.7598518133 0.7814794779 0.7562416792
+ 0.7607476115 0.7822383046 0.7572206855
+ 0.7616354823 0.7829971910 0.7581998110
+ 0.7625234127 0.7837560773 0.7591788173
+ 0.7634112835 0.7845150232 0.7601491809
+ 0.7642992139 0.7852737904 0.7610744238
+ 0.7651870847 0.7860326767 0.7619994879
+ 0.7660750151 0.7867916226 0.7629246712
+ 0.7669628859 0.7875505090 0.7638499141
+ 0.7678508162 0.7883092761 0.7647750974
+ 0.7687386870 0.7890682220 0.7657002807
+ 0.7696266174 0.7898271084 0.7666255236
+ 0.7704861760 0.7905514240 0.7675507069
+ 0.7713252902 0.7912656069 0.7684757710
+ 0.7721645236 0.7919796705 0.7694010139
+ 0.7730035782 0.7926939130 0.7703076005
+ 0.7738426924 0.7934079766 0.7711800933
+ 0.7746818066 0.7941222191 0.7720525265
+ 0.7755209208 0.7948362827 0.7729249001
+ 0.7763599753 0.7955505252 0.7737973928
+ 0.7771990895 0.7962645888 0.7746698260
+ 0.7780382037 0.7969787717 0.7755423188
+ 0.7788773179 0.7976928949 0.7764146924
+ 0.7797163725 0.7984070778 0.7772871852
+ 0.7805240154 0.7991213202 0.7781596184
+ 0.7813156247 0.7998353839 0.7790321112
+ 0.7821071744 0.8005164862 0.7799044847
+ 0.7828987241 0.8011876941 0.7807313204
+ 0.7836902738 0.8018589020 0.7815523744
+ 0.7844818830 0.8025301099 0.7823736072
+ 0.7852734923 0.8032013178 0.7831947207
+ 0.7860651016 0.8038725853 0.7840157747
+ 0.7868565917 0.8045437932 0.7848370075
+ 0.7876482010 0.8052150011 0.7856581211
+ 0.7884398103 0.8058862090 0.7864792943
+ 0.7892314196 0.8065574169 0.7873004079
+ 0.7900215983 0.8072286248 0.7881215811
+ 0.7907671928 0.8078997731 0.7889426947
+ 0.7915127277 0.8085709810 0.7897638083
+ 0.7922583222 0.8092421889 0.7905495763
+ 0.7930037975 0.8099133968 0.7913212180
+ 0.7937493920 0.8105489016 0.7920926809
+ 0.7944949269 0.8111789823 0.7928642035
+ 0.7952405214 0.8118091822 0.7936357856
+ 0.7959859967 0.8124393821 0.7944073081
+ 0.7967315912 0.8130695224 0.7951787710
+ 0.7974771261 0.8136997223 0.7959504128
+ 0.7982227206 0.8143298030 0.7967218757
+ 0.7989683151 0.8149600029 0.7974933982
+ 0.7997137904 0.8155900836 0.7982649803
+ 0.8004320264 0.8162202835 0.7990365028
+ 0.8011332154 0.8168504238 0.7998080254
+ 0.8018345237 0.8174806237 0.8005437255
+ 0.8025357127 0.8181107044 0.8012676239
+ 0.8032369018 0.8187409043 0.8019914031
+ 0.8039380908 0.8193711042 0.8027151823
+ 0.8046392798 0.8200011253 0.8034390807
+ 0.8053405285 0.8205922246 0.8041629195
+ 0.8060417175 0.8211833239 0.8048866987
+ 0.8067429066 0.8217743039 0.8056105971
+ 0.8074440956 0.8223654032 0.8063343763
+ 0.8081452847 0.8229563832 0.8070582151
+ 0.8088464737 0.8235474825 0.8077819943
+ 0.8095477223 0.8241385818 0.8085058928
+ 0.8102337718 0.8247296214 0.8092296720
+ 0.8108925223 0.8253207207 0.8099535108
+ 0.8115512133 0.8259118199 0.8106346130
+ 0.8122099042 0.8265028000 0.8113127947
+ 0.8128685951 0.8270938993 0.8119909763
+ 0.8135272264 0.8276848793 0.8126692176
+ 0.8141859174 0.8282759786 0.8133473992
+ 0.8148446083 0.8288670778 0.8140255809
+ 0.8155032992 0.8294581175 0.8147038221
+ 0.8161619902 0.8300461173 0.8153820038
+ 0.8168206215 0.8306000829 0.8160601258
+ 0.8174793124 0.8311539888 0.8167383075
+ 0.8181380033 0.8317080140 0.8174164891
+ 0.8187966943 0.8322619796 0.8180946708
+ 0.8194553852 0.8328160048 0.8187729120
+ 0.8201069832 0.8333699107 0.8194510937
+ 0.8207250834 0.8339238763 0.8201209903
+ 0.8213431239 0.8344779015 0.8207557201
+ 0.8219612241 0.8350318074 0.8213903904
+ 0.8225793242 0.8355857730 0.8220251203
+ 0.8231973052 0.8361397982 0.8226597905
+ 0.8238154054 0.8366938233 0.8232945204
+ 0.8244335055 0.8372477293 0.8239293098
+ 0.8250514865 0.8378016949 0.8245639801
+ 0.8256695867 0.8383557200 0.8251987100
+ 0.8262876868 0.8389096260 0.8258333802
+ 0.8269057274 0.8394635916 0.8264681101
+ 0.8275238276 0.8400164843 0.8271027803
+ 0.8281419277 0.8405354023 0.8277375102
+ 0.8287599087 0.8410543203 0.8283722997
+ 0.8293780088 0.8415731192 0.8290070295
+ 0.8299961090 0.8420919776 0.8296416998
+ 0.8305758238 0.8426108956 0.8302584291
+ 0.8311551809 0.8431298137 0.8308519125
+ 0.8317345977 0.8436486721 0.8314453959
+ 0.8323140740 0.8441675901 0.8320388794
+ 0.8328934908 0.8446865082 0.8326324224
+ 0.8334729075 0.8452054262 0.8332257867
+ 0.8340523839 0.8457242846 0.8338193297
+ 0.8346318007 0.8462432027 0.8344128132
+ 0.8352112174 0.8467620015 0.8350062966
+ 0.8357906938 0.8472809196 0.8355997205
+ 0.8363701105 0.8477997780 0.8361932039
+ 0.8369495273 0.8483186960 0.8367866874
+ 0.8375290036 0.8488376141 0.8373801708
+ 0.8381084204 0.8493564725 0.8379737139
+ 0.8386877775 0.8498753905 0.8385670781
+ 0.8392673135 0.8503690958 0.8391606212
+ 0.8398466706 0.8508548737 0.8397541046
+ 0.8403992057 0.8513407111 0.8403248191
+ 0.8409420252 0.8518266082 0.8408793211
+ 0.8414847851 0.8523123860 0.8414338231
+ 0.8420276046 0.8527982235 0.8419883251
+ 0.8425704837 0.8532840014 0.8425428271
+ 0.8431133032 0.8537697792 0.8430973291
+ 0.8436561227 0.8542556167 0.8436517715
+ 0.8441988826 0.8547413945 0.8442062736
+ 0.8447417021 0.8552271724 0.8447607756
+ 0.8452845216 0.8557130098 0.8453152776
+ 0.8458272815 0.8561987877 0.8458697796
+ 0.8463702202 0.8566846251 0.8464242816
+ 0.8469129801 0.8571704030 0.8469787836
+ 0.8474557996 0.8576561809 0.8475332856
+ 0.8479986191 0.8581420183 0.8480879068
+ 0.8485413790 0.8586277962 0.8486424088
+ 0.8490841985 0.8591135740 0.8491969109
+ 0.8496270180 0.8595994115 0.8497514129
+ 0.8501589894 0.8600798249 0.8502855897
+ 0.8506671786 0.8605344296 0.8508033752
+ 0.8511754274 0.8609890938 0.8513212204
+ 0.8516836166 0.8614438176 0.8518390059
+ 0.8521918058 0.8618984818 0.8523567915
+ 0.8526999950 0.8623532057 0.8528745770
+ 0.8532081842 0.8628078103 0.8533924222
+ 0.8537163734 0.8632624745 0.8539102077
+ 0.8542246819 0.8637171984 0.8544279933
+ 0.8547328711 0.8641719222 0.8549457788
+ 0.8552411199 0.8646265268 0.8554636240
+ 0.8557493091 0.8650811911 0.8559814095
+ 0.8562574983 0.8655359149 0.8564991951
+ 0.8567656875 0.8659905791 0.8570169806
+ 0.8572738767 0.8664453030 0.8575347066
+ 0.8577821255 0.8668999076 0.8580524921
+ 0.8582903147 0.8673545718 0.8585702777
+ 0.8587985039 0.8678092957 0.8590881228
+ 0.8593066931 0.8682640195 0.8596059084
+ 0.8598148823 0.8687186241 0.8601155281
+ 0.8603023887 0.8691732883 0.8605988026
+ 0.8607779741 0.8696280122 0.8610820770
+ 0.8612535000 0.8700773716 0.8615654111
+ 0.8617290854 0.8705028296 0.8620486856
+ 0.8622046709 0.8709282875 0.8625320196
+ 0.8626803160 0.8713536859 0.8630152941
+ 0.8631559014 0.8717792034 0.8634986281
+ 0.8636314869 0.8722046018 0.8639819026
+ 0.8641070724 0.8726301193 0.8644651771
+ 0.8645827174 0.8730555177 0.8649485111
+ 0.8650581837 0.8734809756 0.8654317856
+ 0.8655338287 0.8739064932 0.8659151793
+ 0.8660094142 0.8743318915 0.8663985133
+ 0.8664849997 0.8747574091 0.8668817878
+ 0.8669605851 0.8751828074 0.8673651218
+ 0.8674361706 0.8756083250 0.8678483963
+ 0.8679118156 0.8760337234 0.8683316708
+ 0.8683874011 0.8764591813 0.8688150048
+ 0.8688629866 0.8768845797 0.8692982793
+ 0.8693385124 0.8773100972 0.8697816133
+ 0.8698140979 0.8777354956 0.8702471852
+ 0.8702710271 0.8781610131 0.8706982136
+ 0.8707159758 0.8785864711 0.8711491823
+ 0.8711609244 0.8790119290 0.8716002107
+ 0.8716058135 0.8794373870 0.8720511198
+ 0.8720507026 0.8798627853 0.8725020885
+ 0.8724955916 0.8802697062 0.8729531169
+ 0.8729405999 0.8806678057 0.8734040856
+ 0.8733854890 0.8810659051 0.8738551140
+ 0.8738303781 0.8814638853 0.8743060827
+ 0.8742753267 0.8818619847 0.8747571111
+ 0.8747202754 0.8822600842 0.8752080798
+ 0.8751652241 0.8826581836 0.8756589890
+ 0.8756101131 0.8830562234 0.8761100173
+ 0.8760550022 0.8834543228 0.8765609860
+ 0.8764998913 0.8838524222 0.8770120144
+ 0.8769448996 0.8842504025 0.8774629831
+ 0.8773897886 0.8846485019 0.8779140115
+ 0.8778346777 0.8850466013 0.8783649802
+ 0.8782796264 0.8854447007 0.8788160086
+ 0.8787245750 0.8858426809 0.8792669773
+ 0.8791695237 0.8862407804 0.8797178864
+ 0.8796144128 0.8866388798 0.8801575899
+ 0.8800554872 0.8870369196 0.8805783987
+ 0.8804715872 0.8874350190 0.8809990883
+ 0.8808878064 0.8878331184 0.8814198971
+ 0.8813039064 0.8882312179 0.8818407059
+ 0.8817201257 0.8886291981 0.8822613955
+ 0.8821362257 0.8890272975 0.8826822042
+ 0.8825523853 0.8894253969 0.8831030130
+ 0.8829684854 0.8898233771 0.8835237026
+ 0.8833847046 0.8902072906 0.8839445114
+ 0.8838008046 0.8905797005 0.8843653202
+ 0.8842170238 0.8909522295 0.8847860098
+ 0.8846331239 0.8913245797 0.8852068186
+ 0.8850492835 0.8916971087 0.8856276274
+ 0.8854653835 0.8920695186 0.8860483170
+ 0.8858816028 0.8924419880 0.8864691257
+ 0.8862977028 0.8928143978 0.8868898749
+ 0.8867139220 0.8931869268 0.8873106241
+ 0.8871300817 0.8935592771 0.8877313733
+ 0.8875461817 0.8939318061 0.8881521821
+ 0.8879624009 0.8943042159 0.8885728717
+ 0.8883785009 0.8946766853 0.8889936805
+ 0.8887947202 0.8950490952 0.8894144893
+ 0.8892108202 0.8954216242 0.8898351789
+ 0.8896269798 0.8957939744 0.8902388215
+ 0.8900402784 0.8961665034 0.8906313777
+ 0.8904294968 0.8965389729 0.8910239935
+ 0.8908187151 0.8969113827 0.8914164901
+ 0.8912078738 0.8972839117 0.8918091059
+ 0.8915970922 0.8976563215 0.8922016025
+ 0.8919863105 0.8980287910 0.8925942183
+ 0.8923755288 0.8984012008 0.8929867148
+ 0.8927648067 0.8987737298 0.8933792710
+ 0.8931540251 0.8991460800 0.8937718868
+ 0.8935431838 0.8995186090 0.8941643834
+ 0.8939324021 0.8998910189 0.8945569992
+ 0.8943216205 0.9002465010 0.8949494958
+ 0.8947107792 0.9005951285 0.8953421116
+ 0.8950999975 0.9009435773 0.8957346082
+ 0.8954892159 0.9012920856 0.8961272240
+ 0.8958783746 0.9016405940 0.8965197802
+ 0.8962675929 0.9019891024 0.8969122767
+ 0.8966568112 0.9023376107 0.8973048925
+ 0.8970460296 0.9026861191 0.8976973891
+ 0.8974351883 0.9030346870 0.8980900049
+ 0.8978244066 0.9033831954 0.8984825015
+ 0.8982136250 0.9037317038 0.8988751173
+ 0.8986027837 0.9040802121 0.8992676735
+ 0.8989920020 0.9044287205 0.8996602297
+ 0.8993812203 0.9047772288 0.9000492096
+ 0.8997703791 0.9051256776 0.9004154801
+ 0.9001492858 0.9054743052 0.9007818103
+ 0.9005132914 0.9058228135 0.9011480212
+ 0.9008772969 0.9061713219 0.9015142918
+ 0.9012413025 0.9065197706 0.9018806219
+ 0.9016053081 0.9068682790 0.9022467732
+ 0.9019693732 0.9072167873 0.9026131034
+ 0.9023333788 0.9075652957 0.9029793143
+ 0.9026973844 0.9079139233 0.9033455849
+ 0.9030613899 0.9082623720 0.9037119150
+ 0.9034253955 0.9086108804 0.9040781260
+ 0.9037894011 0.9089593887 0.9044443965
+ 0.9041534066 0.9093078971 0.9048107266
+ 0.9045174122 0.9096564054 0.9051768780
+ 0.9048814178 0.9100046158 0.9055432081
+ 0.9052454233 0.9103307724 0.9059094787
+ 0.9056094289 0.9106569886 0.9062756896
+ 0.9059733748 0.9109830856 0.9066420197
+ 0.9063374996 0.9113093019 0.9070082903
+ 0.9067015052 0.9116355181 0.9073745012
+ 0.9070655107 0.9119616747 0.9077407718
+ 0.9074295163 0.9122877717 0.9081071019
+ 0.9077935219 0.9126139879 0.9084733129
+ 0.9081575274 0.9129402041 0.9088395834
+ 0.9085214734 0.9132663012 0.9092057943
+ 0.9088854790 0.9135925174 0.9095721245
+ 0.9092494845 0.9139186740 0.9099383950
+ 0.9096134901 0.9142448902 0.9102842808
+ 0.9099774957 0.9145709872 0.9106261134
+ 0.9103195071 0.9148972034 0.9109678864
+ 0.9106599092 0.9152234197 0.9113097191
+ 0.9110003710 0.9155495763 0.9116513729
+ 0.9113408923 0.9158756733 0.9119932055
+ 0.9116814137 0.9162018895 0.9123349786
+ 0.9120218158 0.9165281057 0.9126768112
+ 0.9123622775 0.9168542027 0.9130185843
+ 0.9127027988 0.9171804190 0.9133604169
+ 0.9130433202 0.9175065756 0.9137021899
+ 0.9133837819 0.9178327918 0.9140440226
+ 0.9137241840 0.9181588888 0.9143857956
+ 0.9140647054 0.9184851050 0.9147276282
+ 0.9144052267 0.9188113213 0.9150692821
+ 0.9147456884 0.9191374183 0.9154111147
+ 0.9150860906 0.9194635749 0.9157528877
+ 0.9154266119 0.9197897911 0.9160947204
+ 0.9157670736 0.9201086164 0.9164364934
+ 0.9161075950 0.9204139113 0.9167783260
+ 0.9164479971 0.9207192063 0.9171200991
+ 0.9167885184 0.9210246205 0.9174618721
+ 0.9171289802 0.9213299155 0.9178037047
+ 0.9174695015 0.9216352105 0.9181454778
+ 0.9178099036 0.9219406247 0.9184871912
+ 0.9181504250 0.9222459197 0.9188290238
+ 0.9184908867 0.9225512743 0.9191707969
+ 0.9188314080 0.9228566289 0.9195126295
+ 0.9191719294 0.9231619239 0.9198544025
+ 0.9195122719 0.9234672785 0.9201831222
+ 0.9198527932 0.9237725735 0.9205021858
+ 0.9201807976 0.9240779281 0.9208211899
+ 0.9204993248 0.9243832827 0.9211401939
+ 0.9208179116 0.9246885777 0.9214591980
+ 0.9211363792 0.9249939919 0.9217783213
+ 0.9214549065 0.9252992868 0.9220973253
+ 0.9217733741 0.9256045818 0.9224163294
+ 0.9220920205 0.9259099960 0.9227353930
+ 0.9224104881 0.9262152910 0.9230543971
+ 0.9227290154 0.9265205860 0.9233734012
+ 0.9230474830 0.9268260002 0.9236925244
+ 0.9233661294 0.9271312952 0.9240115285
+ 0.9236845970 0.9274367094 0.9243304729
+ 0.9240031242 0.9277420044 0.9246494770
+ 0.9243215919 0.9280472994 0.9249686003
+ 0.9246401787 0.9283527136 0.9252876043
+ 0.9249587059 0.9286580086 0.9256066084
+ 0.9252771735 0.9289633036 0.9259256721
+ 0.9255957007 0.9292687178 0.9262446761
+ 0.9259142876 0.9295740128 0.9265636802
+ 0.9262328148 0.9298794270 0.9268828034
+ 0.9265512824 0.9301729798 0.9272018075
+ 0.9268698096 0.9304589033 0.9275208116
+ 0.9271882772 0.9307448268 0.9278398752
+ 0.9275069237 0.9310306907 0.9281588793
+ 0.9278253913 0.9313166142 0.9284778833
+ 0.9281439185 0.9316025972 0.9287968874
+ 0.9284623861 0.9318885207 0.9291160107
+ 0.9287809730 0.9321743846 0.9294350147
+ 0.9290995002 0.9324603081 0.9297540188
+ 0.9294180274 0.9327462912 0.9300681949
+ 0.9297364950 0.9330322146 0.9303660989
+ 0.9300515056 0.9333180785 0.9306640029
+ 0.9303495884 0.9336040020 0.9309619069
+ 0.9306476116 0.9338899851 0.9312596917
+ 0.9309456944 0.9341759086 0.9315575957
+ 0.9312437773 0.9344617724 0.9318554997
+ 0.9315418005 0.9347476959 0.9321534038
+ 0.9318398833 0.9350336194 0.9324513078
+ 0.9321380258 0.9353196025 0.9327492118
+ 0.9324359894 0.9356055260 0.9330469966
+ 0.9327340722 0.9358913898 0.9333449006
+ 0.9330320954 0.9361773133 0.9336428046
+ 0.9333301783 0.9364632964 0.9339407086
+ 0.9336283207 0.9367492199 0.9342386127
+ 0.9339262843 0.9370350838 0.9345363975
+ 0.9342244267 0.9373210073 0.9348343015
+ 0.9345223904 0.9376069903 0.9351322055
+ 0.9348204732 0.9378929138 0.9354301095
+ 0.9351186156 0.9381787777 0.9357280135
+ 0.9354165792 0.9384647012 0.9360259175
+ 0.9357147217 0.9387506247 0.9363237023
+ 0.9360128045 0.9390366077 0.9366216063
+ 0.9363108277 0.9393224716 0.9369195104
+ 0.9366089106 0.9396083951 0.9372174144
+ 0.9369068742 0.9398943186 0.9375153184
+ 0.9372050166 0.9401689172 0.9378132224
+ 0.9375030994 0.9404367208 0.9381110072
+ 0.9378011227 0.9407045245 0.9384089112
+ 0.9380992055 0.9409723878 0.9387068152
+ 0.9383972287 0.9412401915 0.9390047193
+ 0.9386953115 0.9415081143 0.9393026233
+ 0.9389933944 0.9417759180 0.9396004081
+ 0.9392914176 0.9420437813 0.9398983121
+ 0.9395895004 0.9423115849 0.9401832819
+ 0.9398875833 0.9425793886 0.9404615164
+ 0.9401736856 0.9428473115 0.9407398105
+ 0.9404526949 0.9431151152 0.9410179853
+ 0.9407318234 0.9433829784 0.9412962198
+ 0.9410107732 0.9436507821 0.9415745139
+ 0.9412897825 0.9439185858 0.9418526888
+ 0.9415687919 0.9441865087 0.9421309829
+ 0.9418478012 0.9444543123 0.9424092174
+ 0.9421268106 0.9447221756 0.9426875114
+ 0.9424058199 0.9449899793 0.9429656863
+ 0.9426848292 0.9452577829 0.9432439804
+ 0.9429637790 0.9455257058 0.9435222149
+ 0.9432427883 0.9457935095 0.9438003898
+ 0.9435217977 0.9460613728 0.9440786839
+ 0.9438008070 0.9463291764 0.9443569183
+ 0.9440798163 0.9465970993 0.9446352124
+ 0.9443588257 0.9468649030 0.9449133873
+ 0.9446377754 0.9471327066 0.9451916814
+ 0.9449167848 0.9474006295 0.9454699159
+ 0.9451957941 0.9476683736 0.9457480907
+ 0.9454748034 0.9479362965 0.9460263848
+ 0.9457538128 0.9482041001 0.9463046193
+ 0.9460328221 0.9484719038 0.9465829134
+ 0.9463117719 0.9487398267 0.9468610883
+ 0.9465907812 0.9490075707 0.9471393824
+ 0.9468697906 0.9492754936 0.9474176168
+ 0.9471487999 0.9495432973 0.9476959109
+ 0.9474278092 0.9498111010 0.9479740858
+ 0.9477068186 0.9500740170 0.9482523203
+ 0.9479858279 0.9503250122 0.9485306144
+ 0.9482647777 0.9505760074 0.9488087893
+ 0.9485437870 0.9508270025 0.9490870833
+ 0.9488227963 0.9510779977 0.9493653178
+ 0.9491018057 0.9513291121 0.9496436119
+ 0.9493808150 0.9515801072 0.9499217868
+ 0.9496598244 0.9518311024 0.9501869082
+ 0.9499387741 0.9520820975 0.9504470229
+ 0.9502040148 0.9523330927 0.9507070184
+ 0.9504652023 0.9525840878 0.9509670138
+ 0.9507265091 0.9528350830 0.9512270093
+ 0.9509876966 0.9530860782 0.9514870048
+ 0.9512490034 0.9533370733 0.9517470002
+ 0.9515101910 0.9535881281 0.9520069957
+ 0.9517714977 0.9538391232 0.9522671103
+ 0.9520328045 0.9540901184 0.9525271058
+ 0.9522939920 0.9543411136 0.9527871013
+ 0.9525552988 0.9545921087 0.9530470967
+ 0.9528164864 0.9548432231 0.9533070922
+ 0.9530777931 0.9550942183 0.9535670877
+ 0.9533389807 0.9553452134 0.9538270831
+ 0.9536002874 0.9555962086 0.9540871978
+ 0.9538615942 0.9558472037 0.9543471932
+ 0.9541227818 0.9560981989 0.9546071887
+ 0.9543840885 0.9563491940 0.9548671842
+ 0.9546452761 0.9566001892 0.9551271796
+ 0.9549065828 0.9568511844 0.9553871751
+ 0.9551677704 0.9571021795 0.9556471705
+ 0.9554290771 0.9573531747 0.9559072852
+ 0.9556903839 0.9576042295 0.9561672807
+ 0.9559515715 0.9578552246 0.9564272761
+ 0.9562128782 0.9581062198 0.9566872716
+ 0.9564741254 0.9583572149 0.9569473267
+ 0.9567353725 0.9586083293 0.9572073221
+ 0.9569966197 0.9588593245 0.9574673176
+ 0.9572579265 0.9591103196 0.9577273726
+ 0.9575191736 0.9593613148 0.9579874277
+ 0.9577804208 0.9596123099 0.9582474232
+ 0.9580417275 0.9598633051 0.9585074186
+ 0.9583029151 0.9601072073 0.9587674141
+ 0.9585642219 0.9603425264 0.9590274096
+ 0.9588255286 0.9605777860 0.9592875242
+ 0.9590867162 0.9608132243 0.9595475197
+ 0.9593480229 0.9610484838 0.9598075151
+ 0.9596092105 0.9612839222 0.9600630999
+ 0.9598705173 0.9615191817 0.9603062272
+ 0.9601234198 0.9617545009 0.9605492949
+ 0.9603682160 0.9619898796 0.9607924223
+ 0.9606128931 0.9622251987 0.9610354900
+ 0.9608576298 0.9624605179 0.9612786174
+ 0.9611024261 0.9626958966 0.9615216851
+ 0.9613471031 0.9629312158 0.9617648125
+ 0.9615918994 0.9631665945 0.9620078802
+ 0.9618365765 0.9634019136 0.9622510076
+ 0.9620813727 0.9636371732 0.9624940753
+ 0.9623261094 0.9638726115 0.9627372026
+ 0.9625709057 0.9641078711 0.9629802704
+ 0.9628155828 0.9643431902 0.9632233977
+ 0.9630603194 0.9645786285 0.9634665251
+ 0.9633051157 0.9648138881 0.9637095928
+ 0.9635497928 0.9650493264 0.9639527202
+ 0.9637945890 0.9652845860 0.9641957879
+ 0.9640393257 0.9655199051 0.9644389153
+ 0.9642841220 0.9657552838 0.9646819830
+ 0.9645287991 0.9659906030 0.9649251103
+ 0.9647734761 0.9662259817 0.9651681781
+ 0.9650182724 0.9664613008 0.9654113054
+ 0.9652630091 0.9666966200 0.9656543732
+ 0.9655078053 0.9669319987 0.9658975005
+ 0.9657524824 0.9671673179 0.9661406279
+ 0.9659972787 0.9674025774 0.9663836956
+ 0.9662420154 0.9676380157 0.9666268229
+ 0.9664868116 0.9678732753 0.9668698907
+ 0.9667314887 0.9681087136 0.9671130180
+ 0.9669762254 0.9683439732 0.9673560858
+ 0.9672210217 0.9685792923 0.9675992131
+ 0.9674656987 0.9688146710 0.9678422809
+ 0.9677104950 0.9690499902 0.9680854082
+ 0.9679551721 0.9692854285 0.9683284760
+ 0.9682000279 0.9695206881 0.9685716033
+ 0.9684447050 0.9697560072 0.9688146710
+ 0.9686893821 0.9699913859 0.9690577984
+ 0.9689341784 0.9702126980 0.9693009257
+ 0.9691789150 0.9704334140 0.9695439935
+ 0.9694237113 0.9706541896 0.9697871208
+ 0.9696683884 0.9708749056 0.9700282216
+ 0.9699131846 0.9710956812 0.9702556133
+ 0.9701480269 0.9713163972 0.9704830050
+ 0.9703773856 0.9715371728 0.9707103968
+ 0.9706068039 0.9717580080 0.9709377885
+ 0.9708361030 0.9719787240 0.9711652994
+ 0.9710655212 0.9721994996 0.9713926911
+ 0.9712948799 0.9724202156 0.9716200829
+ 0.9715242982 0.9726409912 0.9718474746
+ 0.9717537165 0.9728617072 0.9720749259
+ 0.9719830155 0.9730824828 0.9723023176
+ 0.9722123742 0.9733031988 0.9725297093
+ 0.9724417925 0.9735239744 0.9727571011
+ 0.9726712108 0.9737448096 0.9729844928
+ 0.9729006290 0.9739655256 0.9732118845
+ 0.9731299281 0.9741863012 0.9734392762
+ 0.9733592868 0.9744070172 0.9736667275
+ 0.9735887051 0.9746277928 0.9738941193
+ 0.9738181233 0.9748485088 0.9741215110
+ 0.9740474820 0.9750692844 0.9743489027
+ 0.9742767811 0.9752901196 0.9745762944
+ 0.9745061994 0.9755107760 0.9748036861
+ 0.9747356176 0.9757316113 0.9750310779
+ 0.9749649763 0.9759523273 0.9752585292
+ 0.9751943946 0.9761731029 0.9754859209
+ 0.9754236937 0.9763938189 0.9757133722
+ 0.9756531119 0.9766145945 0.9759408236
+ 0.9758824706 0.9768353105 0.9761682153
+ 0.9761118889 0.9770560861 0.9763956070
+ 0.9763413072 0.9772769213 0.9766229987
+ 0.9765706062 0.9774975777 0.9768503904
+ 0.9768000245 0.9777184129 0.9770777822
+ 0.9770293832 0.9779391289 0.9773051739
+ 0.9772588015 0.9781599045 0.9775326252
+ 0.9774881005 0.9783806205 0.9777600169
+ 0.9777175188 0.9786013961 0.9779874086
+ 0.9779468775 0.9788221717 0.9782148004
+ 0.9781762958 0.9790428877 0.9784421921
+ 0.9784057140 0.9792637229 0.9786695838
+ 0.9786350131 0.9794843793 0.9788969755
+ 0.9788643718 0.9797052145 0.9791244268
+ 0.9790937901 0.9799258709 0.9793518186
+ 0.9793232083 0.9801377058 0.9795792103
+ 0.9795526266 0.9803448915 0.9798066020
+ 0.9797819257 0.9805520177 0.9800319076
+ 0.9800106287 0.9807592034 0.9802446961
+ 0.9802256823 0.9809663892 0.9804576039
+ 0.9804407954 0.9811735749 0.9806703925
+ 0.9806559086 0.9813808203 0.9808831811
+ 0.9808710217 0.9815880060 0.9810960889
+ 0.9810860753 0.9817951918 0.9813088775
+ 0.9813011289 0.9820023775 0.9815217853
+ 0.9815161824 0.9822095037 0.9817345738
+ 0.9817312956 0.9824166894 0.9819474816
+ 0.9819464087 0.9826238751 0.9821602702
+ 0.9821615219 0.9828311205 0.9823731780
+ 0.9823765755 0.9830383062 0.9825860262
+ 0.9825916886 0.9832454920 0.9827988148
+ 0.9828066826 0.9834526777 0.9830117226
+ 0.9830217957 0.9836598039 0.9832245111
+ 0.9832369089 0.9838669896 0.9834374189
+ 0.9834520221 0.9840741754 0.9836502075
+ 0.9836670756 0.9842814207 0.9838631153
+ 0.9838821888 0.9844886065 0.9840759039
+ 0.9840973020 0.9846957922 0.9842888117
+ 0.9843124151 0.9849029779 0.9845016003
+ 0.9845274091 0.9851101041 0.9847143888
+ 0.9847425222 0.9853172898 0.9849272966
+ 0.9849575758 0.9855244756 0.9851400852
+ 0.9851726890 0.9857317209 0.9853529930
+ 0.9853878021 0.9859389067 0.9855657816
+ 0.9856029153 0.9861460924 0.9857786894
+ 0.9858180285 0.9863532782 0.9859914780
+ 0.9860330224 0.9865604043 0.9862043262
+ 0.9862480760 0.9867675900 0.9864171743
+ 0.9864631891 0.9869747758 0.9866300225
+ 0.9866783023 0.9871820211 0.9868428707
+ 0.9868934155 0.9873892069 0.9870557189
+ 0.9871085286 0.9875963926 0.9872686267
+ 0.9873235822 0.9878035784 0.9874814153
+ 0.9875385761 0.9880108237 0.9876943231
+ 0.9877536893 0.9882178903 0.9879071116
+ 0.9879688025 0.9884250760 0.9881199002
+ 0.9881839156 0.9886323214 0.9883328080
+ 0.9883990288 0.9888395071 0.9885455966
+ 0.9886140823 0.9890466928 0.9887585044
+ 0.9888291955 0.9892538786 0.9889712930
+ 0.9890443087 0.9894611239 0.9891842008
+ 0.9892593026 0.9896681905 0.9893969893
+ 0.9894744158 0.9898753762 0.9896098971
+ 0.9896895289 0.9900776148 0.9898226857
+ 0.9899045825 0.9902721047 0.9900333285
+ 0.9901123047 0.9904667139 0.9902325869
+ 0.9903141260 0.9906613231 0.9904320240
+ 0.9905158877 0.9908558130 0.9906312823
+ 0.9907177091 0.9910504222 0.9908306003
+ 0.9909194112 0.9912449121 0.9910299778
+ 0.9911211729 0.9914395213 0.9912292957
+ 0.9913229942 0.9916340113 0.9914286137
+ 0.9915248156 0.9918286204 0.9916279912
+ 0.9917265773 0.9920232296 0.9918273091
+ 0.9919283986 0.9922177196 0.9920266271
+ 0.9921302199 0.9924123287 0.9922260046
+ 0.9923319817 0.9926068187 0.9924253225
+ 0.9925338030 0.9928014278 0.9926245809
+ 0.9927356243 0.9929959178 0.9928240180
+ 0.9929373264 0.9931905270 0.9930232763
+ 0.9931390882 0.9933850765 0.9932225943
+ 0.9933409095 0.9935796261 0.9934219718
+ 0.9935426712 0.9937741756 0.9936212897
+ 0.9937444925 0.9939687252 0.9938206077
+ 0.9939463139 0.9941632748 0.9940199852
+ 0.9941480756 0.9943578243 0.9942193031
+ 0.9943498969 0.9945523739 0.9944186211
+ 0.9945517182 0.9947469831 0.9946179986
+ 0.9947534800 0.9949414730 0.9948173165
+ 0.9949551821 0.9951360822 0.9950165749
+ 0.9951570034 0.9953305721 0.9952160120
+ 0.9953588247 0.9955251813 0.9954152703
+ 0.9955605865 0.9957196712 0.9956145883
+ 0.9957624078 0.9959142804 0.9958140254
+ 0.9959642291 0.9961088896 0.9960132837
+ 0.9961659908 0.9963033795 0.9962127209
+ 0.9963678122 0.9964979887 0.9964119792
+ 0.9965695739 0.9966924787 0.9966112971
+ 0.9967713952 0.9968870878 0.9968106747
+ 0.9969730973 0.9970815778 0.9970099926
+ 0.9971749187 0.9972761869 0.9972093105
+ 0.9973766804 0.9974707961 0.9974086881
+ 0.9975785017 0.9976652861 0.9976080060
+ 0.9977803230 0.9978598952 0.9978073239
+ 0.9979820848 0.9980543852 0.9980067015
+ 0.9981839061 0.9982489944 0.9982060194
+ 0.9983857274 0.9984434843 0.9984052777
+ 0.9985874891 0.9986380935 0.9986047149
+ 0.9987893105 0.9988327026 0.9988039732
+ 0.9989910126 0.9990271926 0.9990032911
+ 0.9991927743 0.9992218018 0.9992027283
+ 0.9993945956 0.9994162917 0.9994019866
+ 0.9995964170 0.9996109009 0.9996013045
+ 0.9997981787 0.9998053908 0.9998006821
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/kodak_dscs_3155.spi1d b/release/datafiles/colormanagement/luts/film_response/kodak_dscs_3155.spi1d
new file mode 100644
index 00000000000..8fe8fd615e0
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/kodak_dscs_3155.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0048120469 0.0048120469 0.0048120469
+ 0.0096240947 0.0096240947 0.0096240947
+ 0.0145009197 0.0145009197 0.0145009197
+ 0.0193832405 0.0193832405 0.0193832405
+ 0.0242968407 0.0242968407 0.0242968407
+ 0.0292149596 0.0292149596 0.0292149596
+ 0.0341353305 0.0341353305 0.0341353305
+ 0.0390561298 0.0390561298 0.0390561298
+ 0.0439544208 0.0439544208 0.0439544208
+ 0.0488473810 0.0488473810 0.0488473810
+ 0.0536984690 0.0536984690 0.0536984690
+ 0.0585366711 0.0585366711 0.0585366711
+ 0.0633208230 0.0633208230 0.0633208230
+ 0.0680815428 0.0680815428 0.0680815428
+ 0.0727850720 0.0727850720 0.0727850720
+ 0.0774499997 0.0774499997 0.0774499997
+ 0.0820651725 0.0820651725 0.0820651725
+ 0.0866203383 0.0866203383 0.0866203383
+ 0.0911446288 0.0911446288 0.0911446288
+ 0.0955801234 0.0955801234 0.0955801234
+ 0.1000152007 0.1000152007 0.1000152007
+ 0.1043246016 0.1043246016 0.1043246016
+ 0.1086340994 0.1086340994 0.1086340994
+ 0.1128552034 0.1128552034 0.1128552034
+ 0.1170352995 0.1170352995 0.1170352995
+ 0.1211775988 0.1211775988 0.1211775988
+ 0.1252277046 0.1252277046 0.1252277046
+ 0.1292777061 0.1292777061 0.1292777061
+ 0.1332218945 0.1332218945 0.1332218945
+ 0.1371431053 0.1371431053 0.1371431053
+ 0.1410301030 0.1410301030 0.1410301030
+ 0.1448252946 0.1448252946 0.1448252946
+ 0.1486205012 0.1486205012 0.1486205012
+ 0.1523379982 0.1523379982 0.1523379982
+ 0.1560111046 0.1560111046 0.1560111046
+ 0.1596841961 0.1596841961 0.1596841961
+ 0.1632499993 0.1632499993 0.1632499993
+ 0.1668058038 0.1668058038 0.1668058038
+ 0.1703501940 0.1703501940 0.1703501940
+ 0.1737938970 0.1737938970 0.1737938970
+ 0.1772377044 0.1772377044 0.1772377044
+ 0.1806603968 0.1806603968 0.1806603968
+ 0.1839977056 0.1839977056 0.1839977056
+ 0.1873349994 0.1873349994 0.1873349994
+ 0.1906519979 0.1906519979 0.1906519979
+ 0.1938886046 0.1938886046 0.1938886046
+ 0.1971253008 0.1971253008 0.1971253008
+ 0.2003512979 0.2003512979 0.2003512979
+ 0.2034929991 0.2034929991 0.2034929991
+ 0.2066347003 0.2066347003 0.2066347003
+ 0.2097764015 0.2097764015 0.2097764015
+ 0.2128352970 0.2128352970 0.2128352970
+ 0.2158876956 0.2158876956 0.2158876956
+ 0.2189401984 0.2189401984 0.2189401984
+ 0.2219379991 0.2219379991 0.2219379991
+ 0.2249068022 0.2249068022 0.2249068022
+ 0.2278755009 0.2278755009 0.2278755009
+ 0.2308219969 0.2308219969 0.2308219969
+ 0.2337123007 0.2337123007 0.2337123007
+ 0.2366026938 0.2366026938 0.2366026938
+ 0.2394929975 0.2394929975 0.2394929975
+ 0.2423229069 0.2423229069 0.2423229069
+ 0.2451398969 0.2451398969 0.2451398969
+ 0.2479569018 0.2479569018 0.2479569018
+ 0.2507550120 0.2507550120 0.2507550120
+ 0.2535035014 0.2535035014 0.2535035014
+ 0.2562519908 0.2562519908 0.2562519908
+ 0.2590003908 0.2590003908 0.2590003908
+ 0.2617082000 0.2617082000 0.2617082000
+ 0.2643926144 0.2643926144 0.2643926144
+ 0.2670770884 0.2670770884 0.2670770884
+ 0.2697615027 0.2697615027 0.2697615027
+ 0.2723914981 0.2723914981 0.2723914981
+ 0.2750161886 0.2750161886 0.2750161886
+ 0.2776409090 0.2776409090 0.2776409090
+ 0.2802599967 0.2802599967 0.2802599967
+ 0.2828288972 0.2828288972 0.2828288972
+ 0.2853977978 0.2853977978 0.2853977978
+ 0.2879666984 0.2879666984 0.2879666984
+ 0.2905246913 0.2905246913 0.2905246913
+ 0.2930414975 0.2930414975 0.2930414975
+ 0.2955583036 0.2955583036 0.2955583036
+ 0.2980751097 0.2980751097 0.2980751097
+ 0.3005805016 0.3005805016 0.3005805016
+ 0.3030486107 0.3030486107 0.3030486107
+ 0.3055166900 0.3055166900 0.3055166900
+ 0.3079847991 0.3079847991 0.3079847991
+ 0.3104445040 0.3104445040 0.3104445040
+ 0.3128669858 0.3128669858 0.3128669858
+ 0.3152895868 0.3152895868 0.3152895868
+ 0.3177120984 0.3177120984 0.3177120984
+ 0.3201321959 0.3201321959 0.3201321959
+ 0.3225120902 0.3225120902 0.3225120902
+ 0.3248918951 0.3248918951 0.3248918951
+ 0.3272717893 0.3272717893 0.3272717893
+ 0.3296515942 0.3296515942 0.3296515942
+ 0.3319971859 0.3319971859 0.3319971859
+ 0.3343369961 0.3343369961 0.3343369961
+ 0.3366766870 0.3366766870 0.3366766870
+ 0.3390164971 0.3390164971 0.3390164971
+ 0.3413344026 0.3413344026 0.3413344026
+ 0.3436363935 0.3436363935 0.3436363935
+ 0.3459384143 0.3459384143 0.3459384143
+ 0.3482404947 0.3482404947 0.3482404947
+ 0.3505341113 0.3505341113 0.3505341113
+ 0.3528004885 0.3528004885 0.3528004885
+ 0.3550668955 0.3550668955 0.3550668955
+ 0.3573333025 0.3573333025 0.3573333025
+ 0.3595997095 0.3595997095 0.3595997095
+ 0.3618383110 0.3618383110 0.3618383110
+ 0.3640710115 0.3640710115 0.3640710115
+ 0.3663035929 0.3663035929 0.3663035929
+ 0.3685362935 0.3685362935 0.3685362935
+ 0.3707579076 0.3707579076 0.3707579076
+ 0.3729583919 0.3729583919 0.3729583919
+ 0.3751589060 0.3751589060 0.3751589060
+ 0.3773593903 0.3773593903 0.3773593903
+ 0.3795599043 0.3795599043 0.3795599043
+ 0.3817358911 0.3817358911 0.3817358911
+ 0.3839055896 0.3839055896 0.3839055896
+ 0.3860754073 0.3860754073 0.3860754073
+ 0.3882451952 0.3882451952 0.3882451952
+ 0.3904092908 0.3904092908 0.3904092908
+ 0.3925495148 0.3925495148 0.3925495148
+ 0.3946897089 0.3946897089 0.3946897089
+ 0.3968299031 0.3968299031 0.3968299031
+ 0.3989700973 0.3989700973 0.3989700973
+ 0.4010953903 0.4010953903 0.4010953903
+ 0.4032069147 0.4032069147 0.4032069147
+ 0.4053184092 0.4053184092 0.4053184092
+ 0.4074299037 0.4074299037 0.4074299037
+ 0.4095414877 0.4095414877 0.4095414877
+ 0.4116311073 0.4116311073 0.4116311073
+ 0.4137147069 0.4137147069 0.4137147069
+ 0.4157981873 0.4157981873 0.4157981873
+ 0.4178817868 0.4178817868 0.4178817868
+ 0.4199653864 0.4199653864 0.4199653864
+ 0.4220218956 0.4220218956 0.4220218956
+ 0.4240779877 0.4240779877 0.4240779877
+ 0.4261341095 0.4261341095 0.4261341095
+ 0.4281901121 0.4281901121 0.4281901121
+ 0.4302429855 0.4302429855 0.4302429855
+ 0.4322718084 0.4322718084 0.4322718084
+ 0.4343006909 0.4343006909 0.4343006909
+ 0.4363296032 0.4363296032 0.4363296032
+ 0.4383583963 0.4383583963 0.4383583963
+ 0.4403820932 0.4403820932 0.4403820932
+ 0.4423837960 0.4423837960 0.4423837960
+ 0.4443854988 0.4443854988 0.4443854988
+ 0.4463872015 0.4463872015 0.4463872015
+ 0.4483889043 0.4483889043 0.4483889043
+ 0.4503852129 0.4503852129 0.4503852129
+ 0.4523595870 0.4523595870 0.4523595870
+ 0.4543339908 0.4543339908 0.4543339908
+ 0.4563083053 0.4563083053 0.4563083053
+ 0.4582827091 0.4582827091 0.4582827091
+ 0.4602535069 0.4602535069 0.4602535069
+ 0.4622001946 0.4622001946 0.4622001946
+ 0.4641467929 0.4641467929 0.4641467929
+ 0.4660935104 0.4660935104 0.4660935104
+ 0.4680401981 0.4680401981 0.4680401981
+ 0.4699868858 0.4699868858 0.4699868858
+ 0.4719055891 0.4719055891 0.4719055891
+ 0.4738239944 0.4738239944 0.4738239944
+ 0.4757424891 0.4757424891 0.4757424891
+ 0.4776608944 0.4776608944 0.4776608944
+ 0.4795793891 0.4795793891 0.4795793891
+ 0.4814752936 0.4814752936 0.4814752936
+ 0.4833647907 0.4833647907 0.4833647907
+ 0.4852542877 0.4852542877 0.4852542877
+ 0.4871438146 0.4871438146 0.4871438146
+ 0.4890333116 0.4890333116 0.4890333116
+ 0.4909082949 0.4909082949 0.4909082949
+ 0.4927679002 0.4927679002 0.4927679002
+ 0.4946275949 0.4946275949 0.4946275949
+ 0.4964872897 0.4964872897 0.4964872897
+ 0.4983470142 0.4983470142 0.4983470142
+ 0.5002033114 0.5002033114 0.5002033114
+ 0.5020321012 0.5020321012 0.5020321012
+ 0.5038608909 0.5038608909 0.5038608909
+ 0.5056896806 0.5056896806 0.5056896806
+ 0.5075185895 0.5075185895 0.5075185895
+ 0.5093473792 0.5093473792 0.5093473792
+ 0.5111556053 0.5111556053 0.5111556053
+ 0.5129525065 0.5129525065 0.5129525065
+ 0.5147492886 0.5147492886 0.5147492886
+ 0.5165460706 0.5165460706 0.5165460706
+ 0.5183429122 0.5183429122 0.5183429122
+ 0.5201370716 0.5201370716 0.5201370716
+ 0.5219007134 0.5219007134 0.5219007134
+ 0.5236642957 0.5236642957 0.5236642957
+ 0.5254278183 0.5254278183 0.5254278183
+ 0.5271914005 0.5271914005 0.5271914005
+ 0.5289549232 0.5289549232 0.5289549232
+ 0.5307043791 0.5307043791 0.5307043791
+ 0.5324332714 0.5324332714 0.5324332714
+ 0.5341622829 0.5341622829 0.5341622829
+ 0.5358911753 0.5358911753 0.5358911753
+ 0.5376201868 0.5376201868 0.5376201868
+ 0.5393490791 0.5393490791 0.5393490791
+ 0.5410556197 0.5410556197 0.5410556197
+ 0.5427485704 0.5427485704 0.5427485704
+ 0.5444415212 0.5444415212 0.5444415212
+ 0.5461344719 0.5461344719 0.5461344719
+ 0.5478274226 0.5478274226 0.5478274226
+ 0.5495203733 0.5495203733 0.5495203733
+ 0.5511866212 0.5511866212 0.5511866212
+ 0.5528420806 0.5528420806 0.5528420806
+ 0.5544977188 0.5544977188 0.5544977188
+ 0.5561531782 0.5561531782 0.5561531782
+ 0.5578088164 0.5578088164 0.5578088164
+ 0.5594642758 0.5594642758 0.5594642758
+ 0.5610936284 0.5610936284 0.5610936284
+ 0.5627104044 0.5627104044 0.5627104044
+ 0.5643271208 0.5643271208 0.5643271208
+ 0.5659437776 0.5659437776 0.5659437776
+ 0.5675606132 0.5675606132 0.5675606132
+ 0.5691773295 0.5691773295 0.5691773295
+ 0.5707743168 0.5707743168 0.5707743168
+ 0.5723509192 0.5723509192 0.5723509192
+ 0.5739275217 0.5739275217 0.5739275217
+ 0.5755040050 0.5755040050 0.5755040050
+ 0.5770806074 0.5770806074 0.5770806074
+ 0.5786570907 0.5786570907 0.5786570907
+ 0.5802274942 0.5802274942 0.5802274942
+ 0.5817626119 0.5817626119 0.5817626119
+ 0.5832977295 0.5832977295 0.5832977295
+ 0.5848327279 0.5848327279 0.5848327279
+ 0.5863677859 0.5863677859 0.5863677859
+ 0.5879029036 0.5879029036 0.5879029036
+ 0.5894379020 0.5894379020 0.5894379020
+ 0.5909458995 0.5909458995 0.5909458995
+ 0.5924382806 0.5924382806 0.5924382806
+ 0.5939307213 0.5939307213 0.5939307213
+ 0.5954229832 0.5954229832 0.5954229832
+ 0.5969154239 0.5969154239 0.5969154239
+ 0.5984076858 0.5984076858 0.5984076858
+ 0.5999001265 0.5999001265 0.5999001265
+ 0.6013516188 0.6013516188 0.6013516188
+ 0.6028001904 0.6028001904 0.6028001904
+ 0.6042487025 0.6042487025 0.6042487025
+ 0.6056972742 0.6056972742 0.6056972742
+ 0.6071457863 0.6071457863 0.6071457863
+ 0.6085944176 0.6085944176 0.6085944176
+ 0.6100416183 0.6100416183 0.6100416183
+ 0.6114454269 0.6114454269 0.6114454269
+ 0.6128491759 0.6128491759 0.6128491759
+ 0.6142529845 0.6142529845 0.6142529845
+ 0.6156567931 0.6156567931 0.6156567931
+ 0.6170606017 0.6170606017 0.6170606017
+ 0.6184644103 0.6184644103 0.6184644103
+ 0.6198682785 0.6198682785 0.6198682785
+ 0.6212307811 0.6212307811 0.6212307811
+ 0.6225889921 0.6225889921 0.6225889921
+ 0.6239473224 0.6239473224 0.6239473224
+ 0.6253055930 0.6253055930 0.6253055930
+ 0.6266638041 0.6266638041 0.6266638041
+ 0.6280220747 0.6280220747 0.6280220747
+ 0.6293802857 0.6293802857 0.6293802857
+ 0.6307135224 0.6307135224 0.6307135224
+ 0.6320255995 0.6320255995 0.6320255995
+ 0.6333376765 0.6333376765 0.6333376765
+ 0.6346498132 0.6346498132 0.6346498132
+ 0.6359618902 0.6359618902 0.6359618902
+ 0.6372740269 0.6372740269 0.6372740269
+ 0.6385861039 0.6385861039 0.6385861039
+ 0.6398981810 0.6398981810 0.6398981810
+ 0.6411672831 0.6411672831 0.6411672831
+ 0.6424328089 0.6424328089 0.6424328089
+ 0.6436982751 0.6436982751 0.6436982751
+ 0.6449638009 0.6449638009 0.6449638009
+ 0.6462293863 0.6462293863 0.6462293863
+ 0.6474949121 0.6474949121 0.6474949121
+ 0.6487603784 0.6487603784 0.6487603784
+ 0.6500248909 0.6500248909 0.6500248909
+ 0.6512436271 0.6512436271 0.6512436271
+ 0.6524624228 0.6524624228 0.6524624228
+ 0.6536810994 0.6536810994 0.6536810994
+ 0.6548997760 0.6548997760 0.6548997760
+ 0.6561185122 0.6561185122 0.6561185122
+ 0.6573371887 0.6573371887 0.6573371887
+ 0.6585559249 0.6585559249 0.6585559249
+ 0.6597746015 0.6597746015 0.6597746015
+ 0.6609550714 0.6609550714 0.6609550714
+ 0.6621270180 0.6621270180 0.6621270180
+ 0.6632987857 0.6632987857 0.6632987857
+ 0.6644706726 0.6644706726 0.6644706726
+ 0.6656426191 0.6656426191 0.6656426191
+ 0.6668143868 0.6668143868 0.6668143868
+ 0.6679862738 0.6679862738 0.6679862738
+ 0.6691582203 0.6691582203 0.6691582203
+ 0.6703168750 0.6703168750 0.6703168750
+ 0.6714420915 0.6714420915 0.6714420915
+ 0.6725673079 0.6725673079 0.6725673079
+ 0.6736925244 0.6736925244 0.6736925244
+ 0.6748176813 0.6748176813 0.6748176813
+ 0.6759428978 0.6759428978 0.6759428978
+ 0.6770681143 0.6770681143 0.6770681143
+ 0.6781932712 0.6781932712 0.6781932712
+ 0.6793184876 0.6793184876 0.6793184876
+ 0.6804254055 0.6804254055 0.6804254055
+ 0.6815043092 0.6815043092 0.6815043092
+ 0.6825832129 0.6825832129 0.6825832129
+ 0.6836621165 0.6836621165 0.6836621165
+ 0.6847409010 0.6847409010 0.6847409010
+ 0.6858198047 0.6858198047 0.6858198047
+ 0.6868987083 0.6868987083 0.6868987083
+ 0.6879776120 0.6879776120 0.6879776120
+ 0.6890565157 0.6890565157 0.6890565157
+ 0.6901295781 0.6901295781 0.6901295781
+ 0.6911628246 0.6911628246 0.6911628246
+ 0.6921958923 0.6921958923 0.6921958923
+ 0.6932290196 0.6932290196 0.6932290196
+ 0.6942620873 0.6942620873 0.6942620873
+ 0.6952952147 0.6952952147 0.6952952147
+ 0.6963282824 0.6963282824 0.6963282824
+ 0.6973615289 0.6973615289 0.6973615289
+ 0.6983945966 0.6983945966 0.6983945966
+ 0.6994277239 0.6994277239 0.6994277239
+ 0.7004407048 0.7004407048 0.7004407048
+ 0.7014287710 0.7014287710 0.7014287710
+ 0.7024167776 0.7024167776 0.7024167776
+ 0.7034049034 0.7034049034 0.7034049034
+ 0.7043930292 0.7043930292 0.7043930292
+ 0.7053809762 0.7053809762 0.7053809762
+ 0.7063691020 0.7063691020 0.7063691020
+ 0.7073571086 0.7073571086 0.7073571086
+ 0.7083451748 0.7083451748 0.7083451748
+ 0.7093333006 0.7093333006 0.7093333006
+ 0.7103068829 0.7103068829 0.7103068829
+ 0.7112507820 0.7112507820 0.7112507820
+ 0.7121946812 0.7121946812 0.7121946812
+ 0.7131385207 0.7131385207 0.7131385207
+ 0.7140824199 0.7140824199 0.7140824199
+ 0.7150263190 0.7150263190 0.7150263190
+ 0.7159700990 0.7159700990 0.7159700990
+ 0.7169139981 0.7169139981 0.7169139981
+ 0.7178577781 0.7178577781 0.7178577781
+ 0.7188016772 0.7188016772 0.7188016772
+ 0.7197455764 0.7197455764 0.7197455764
+ 0.7206578851 0.7206578851 0.7206578851
+ 0.7215585113 0.7215585113 0.7215585113
+ 0.7224591970 0.7224591970 0.7224591970
+ 0.7233598828 0.7233598828 0.7233598828
+ 0.7242605090 0.7242605090 0.7242605090
+ 0.7251611948 0.7251611948 0.7251611948
+ 0.7260618806 0.7260618806 0.7260618806
+ 0.7269625068 0.7269625068 0.7269625068
+ 0.7278631926 0.7278631926 0.7278631926
+ 0.7287638783 0.7287638783 0.7287638783
+ 0.7296645045 0.7296645045 0.7296645045
+ 0.7305387855 0.7305387855 0.7305387855
+ 0.7313973904 0.7313973904 0.7313973904
+ 0.7322559953 0.7322559953 0.7322559953
+ 0.7331146002 0.7331146002 0.7331146002
+ 0.7339732051 0.7339732051 0.7339732051
+ 0.7348316908 0.7348316908 0.7348316908
+ 0.7356902957 0.7356902957 0.7356902957
+ 0.7365489006 0.7365489006 0.7365489006
+ 0.7374075055 0.7374075055 0.7374075055
+ 0.7382661104 0.7382661104 0.7382661104
+ 0.7391247153 0.7391247153 0.7391247153
+ 0.7399833202 0.7399833202 0.7399833202
+ 0.7408018112 0.7408018112 0.7408018112
+ 0.7416195273 0.7416195273 0.7416195273
+ 0.7424373031 0.7424373031 0.7424373031
+ 0.7432550192 0.7432550192 0.7432550192
+ 0.7440726757 0.7440726757 0.7440726757
+ 0.7448903918 0.7448903918 0.7448903918
+ 0.7457082272 0.7457082272 0.7457082272
+ 0.7465258837 0.7465258837 0.7465258837
+ 0.7473435998 0.7473435998 0.7473435998
+ 0.7481613755 0.7481613755 0.7481613755
+ 0.7489790916 0.7489790916 0.7489790916
+ 0.7497968078 0.7497968078 0.7497968078
+ 0.7505847812 0.7505847812 0.7505847812
+ 0.7513629794 0.7513629794 0.7513629794
+ 0.7521411777 0.7521411777 0.7521411777
+ 0.7529193759 0.7529193759 0.7529193759
+ 0.7536975145 0.7536975145 0.7536975145
+ 0.7544757128 0.7544757128 0.7544757128
+ 0.7552539110 0.7552539110 0.7552539110
+ 0.7560319901 0.7560319901 0.7560319901
+ 0.7568101883 0.7568101883 0.7568101883
+ 0.7575883865 0.7575883865 0.7575883865
+ 0.7583665848 0.7583665848 0.7583665848
+ 0.7591447234 0.7591447234 0.7591447234
+ 0.7599229217 0.7599229217 0.7599229217
+ 0.7606667280 0.7606667280 0.7606667280
+ 0.7614067197 0.7614067197 0.7614067197
+ 0.7621465921 0.7621465921 0.7621465921
+ 0.7628865838 0.7628865838 0.7628865838
+ 0.7636265755 0.7636265755 0.7636265755
+ 0.7643666267 0.7643666267 0.7643666267
+ 0.7651066184 0.7651066184 0.7651066184
+ 0.7658466101 0.7658466101 0.7658466101
+ 0.7665864825 0.7665864825 0.7665864825
+ 0.7673264742 0.7673264742 0.7673264742
+ 0.7680665255 0.7680665255 0.7680665255
+ 0.7688065171 0.7688065171 0.7688065171
+ 0.7695465088 0.7695465088 0.7695465088
+ 0.7702721953 0.7702721953 0.7702721953
+ 0.7709754109 0.7709754109 0.7709754109
+ 0.7716786265 0.7716786265 0.7716786265
+ 0.7723817825 0.7723817825 0.7723817825
+ 0.7730849981 0.7730849981 0.7730849981
+ 0.7737882733 0.7737882733 0.7737882733
+ 0.7744914889 0.7744914889 0.7744914889
+ 0.7751947045 0.7751947045 0.7751947045
+ 0.7758979201 0.7758979201 0.7758979201
+ 0.7766010761 0.7766010761 0.7766010761
+ 0.7773042917 0.7773042917 0.7773042917
+ 0.7780075073 0.7780075073 0.7780075073
+ 0.7787107229 0.7787107229 0.7787107229
+ 0.7794138789 0.7794138789 0.7794138789
+ 0.7801111937 0.7801111937 0.7801111937
+ 0.7807791233 0.7807791233 0.7807791233
+ 0.7814469934 0.7814469934 0.7814469934
+ 0.7821149230 0.7821149230 0.7821149230
+ 0.7827826738 0.7827826738 0.7827826738
+ 0.7834506035 0.7834506035 0.7834506035
+ 0.7841184735 0.7841184735 0.7841184735
+ 0.7847864032 0.7847864032 0.7847864032
+ 0.7854542136 0.7854542136 0.7854542136
+ 0.7861220837 0.7861220837 0.7861220837
+ 0.7867900133 0.7867900133 0.7867900133
+ 0.7874578834 0.7874578834 0.7874578834
+ 0.7881256938 0.7881256938 0.7881256938
+ 0.7887936234 0.7887936234 0.7887936234
+ 0.7894614935 0.7894614935 0.7894614935
+ 0.7901228070 0.7901228070 0.7901228070
+ 0.7907568216 0.7907568216 0.7907568216
+ 0.7913907766 0.7913907766 0.7913907766
+ 0.7920247912 0.7920247912 0.7920247912
+ 0.7926588058 0.7926588058 0.7926588058
+ 0.7932928801 0.7932928801 0.7932928801
+ 0.7939268947 0.7939268947 0.7939268947
+ 0.7945609093 0.7945609093 0.7945609093
+ 0.7951949239 0.7951949239 0.7951949239
+ 0.7958288789 0.7958288789 0.7958288789
+ 0.7964628935 0.7964628935 0.7964628935
+ 0.7970969081 0.7970969081 0.7970969081
+ 0.7977309227 0.7977309227 0.7977309227
+ 0.7983648777 0.7983648777 0.7983648777
+ 0.7989988923 0.7989988923 0.7989988923
+ 0.7996329069 0.7996329069 0.7996329069
+ 0.8002532721 0.8002532721 0.8002532721
+ 0.8008549213 0.8008549213 0.8008549213
+ 0.8014565110 0.8014565110 0.8014565110
+ 0.8020581007 0.8020581007 0.8020581007
+ 0.8026596904 0.8026596904 0.8026596904
+ 0.8032613993 0.8032613993 0.8032613993
+ 0.8038629889 0.8038629889 0.8038629889
+ 0.8044645786 0.8044645786 0.8044645786
+ 0.8050662279 0.8050662279 0.8050662279
+ 0.8056678176 0.8056678176 0.8056678176
+ 0.8062694073 0.8062694073 0.8062694073
+ 0.8068709970 0.8068709970 0.8068709970
+ 0.8074725866 0.8074725866 0.8074725866
+ 0.8080741763 0.8080741763 0.8080741763
+ 0.8086758256 0.8086758256 0.8086758256
+ 0.8092774153 0.8092774153 0.8092774153
+ 0.8098791242 0.8098791242 0.8098791242
+ 0.8104559183 0.8104559183 0.8104559183
+ 0.8110265732 0.8110265732 0.8110265732
+ 0.8115972877 0.8115972877 0.8115972877
+ 0.8121680021 0.8121680021 0.8121680021
+ 0.8127385974 0.8127385974 0.8127385974
+ 0.8133093119 0.8133093119 0.8133093119
+ 0.8138800263 0.8138800263 0.8138800263
+ 0.8144506216 0.8144506216 0.8144506216
+ 0.8150212765 0.8150212765 0.8150212765
+ 0.8155919909 0.8155919909 0.8155919909
+ 0.8161625862 0.8161625862 0.8161625862
+ 0.8167333007 0.8167333007 0.8167333007
+ 0.8173040152 0.8173040152 0.8173040152
+ 0.8178747296 0.8178747296 0.8178747296
+ 0.8184453249 0.8184453249 0.8184453249
+ 0.8190159798 0.8190159798 0.8190159798
+ 0.8195866942 0.8195866942 0.8195866942
+ 0.8201491833 0.8201491833 0.8201491833
+ 0.8206903934 0.8206903934 0.8206903934
+ 0.8212316036 0.8212316036 0.8212316036
+ 0.8217726946 0.8217726946 0.8217726946
+ 0.8223139048 0.8223139048 0.8223139048
+ 0.8228551149 0.8228551149 0.8228551149
+ 0.8233962059 0.8233962059 0.8233962059
+ 0.8239374161 0.8239374161 0.8239374161
+ 0.8244786263 0.8244786263 0.8244786263
+ 0.8250197768 0.8250197768 0.8250197768
+ 0.8255609274 0.8255609274 0.8255609274
+ 0.8261020780 0.8261020780 0.8261020780
+ 0.8266432881 0.8266432881 0.8266432881
+ 0.8271844983 0.8271844983 0.8271844983
+ 0.8277255893 0.8277255893 0.8277255893
+ 0.8282667994 0.8282667994 0.8282667994
+ 0.8288080096 0.8288080096 0.8288080096
+ 0.8293492198 0.8293492198 0.8293492198
+ 0.8298903108 0.8298903108 0.8298903108
+ 0.8304091096 0.8304091096 0.8304091096
+ 0.8309221864 0.8309221864 0.8309221864
+ 0.8314353228 0.8314353228 0.8314353228
+ 0.8319483995 0.8319483995 0.8319483995
+ 0.8324614763 0.8324614763 0.8324614763
+ 0.8329746127 0.8329746127 0.8329746127
+ 0.8334876895 0.8334876895 0.8334876895
+ 0.8340008259 0.8340008259 0.8340008259
+ 0.8345139027 0.8345139027 0.8345139027
+ 0.8350269794 0.8350269794 0.8350269794
+ 0.8355401158 0.8355401158 0.8355401158
+ 0.8360531926 0.8360531926 0.8360531926
+ 0.8365663290 0.8365663290 0.8365663290
+ 0.8370794058 0.8370794058 0.8370794058
+ 0.8375924826 0.8375924826 0.8375924826
+ 0.8381056190 0.8381056190 0.8381056190
+ 0.8386186957 0.8386186957 0.8386186957
+ 0.8391317725 0.8391317725 0.8391317725
+ 0.8396449089 0.8396449089 0.8396449089
+ 0.8401497006 0.8401497006 0.8401497006
+ 0.8406361938 0.8406361938 0.8406361938
+ 0.8411226273 0.8411226273 0.8411226273
+ 0.8416090012 0.8416090012 0.8416090012
+ 0.8420953751 0.8420953751 0.8420953751
+ 0.8425818086 0.8425818086 0.8425818086
+ 0.8430681825 0.8430681825 0.8430681825
+ 0.8435546160 0.8435546160 0.8435546160
+ 0.8440409899 0.8440409899 0.8440409899
+ 0.8445274234 0.8445274234 0.8445274234
+ 0.8450137973 0.8450137973 0.8450137973
+ 0.8455001712 0.8455001712 0.8455001712
+ 0.8459866047 0.8459866047 0.8459866047
+ 0.8464729786 0.8464729786 0.8464729786
+ 0.8469594121 0.8469594121 0.8469594121
+ 0.8474457860 0.8474457860 0.8474457860
+ 0.8479322195 0.8479322195 0.8479322195
+ 0.8484185934 0.8484185934 0.8484185934
+ 0.8489050269 0.8489050269 0.8489050269
+ 0.8493914008 0.8493914008 0.8493914008
+ 0.8498777747 0.8498777747 0.8498777747
+ 0.8503453135 0.8503453135 0.8503453135
+ 0.8508062959 0.8508062959 0.8508062959
+ 0.8512673974 0.8512673974 0.8512673974
+ 0.8517283797 0.8517283797 0.8517283797
+ 0.8521894813 0.8521894813 0.8521894813
+ 0.8526505828 0.8526505828 0.8526505828
+ 0.8531116247 0.8531116247 0.8531116247
+ 0.8535727262 0.8535727262 0.8535727262
+ 0.8540337086 0.8540337086 0.8540337086
+ 0.8544948101 0.8544948101 0.8544948101
+ 0.8549559116 0.8549559116 0.8549559116
+ 0.8554168940 0.8554168940 0.8554168940
+ 0.8558779955 0.8558779955 0.8558779955
+ 0.8563390970 0.8563390970 0.8563390970
+ 0.8568000793 0.8568000793 0.8568000793
+ 0.8572611809 0.8572611809 0.8572611809
+ 0.8577222228 0.8577222228 0.8577222228
+ 0.8581833243 0.8581833243 0.8581833243
+ 0.8586444259 0.8586444259 0.8586444259
+ 0.8591054082 0.8591054082 0.8591054082
+ 0.8595665097 0.8595665097 0.8595665097
+ 0.8600261211 0.8600261211 0.8600261211
+ 0.8604630828 0.8604630828 0.8604630828
+ 0.8609001040 0.8609001040 0.8609001040
+ 0.8613371849 0.8613371849 0.8613371849
+ 0.8617742062 0.8617742062 0.8617742062
+ 0.8622112274 0.8622112274 0.8622112274
+ 0.8626481891 0.8626481891 0.8626481891
+ 0.8630852103 0.8630852103 0.8630852103
+ 0.8635222912 0.8635222912 0.8635222912
+ 0.8639593124 0.8639593124 0.8639593124
+ 0.8643962741 0.8643962741 0.8643962741
+ 0.8648332953 0.8648332953 0.8648332953
+ 0.8652703166 0.8652703166 0.8652703166
+ 0.8657073975 0.8657073975 0.8657073975
+ 0.8661444187 0.8661444187 0.8661444187
+ 0.8665813804 0.8665813804 0.8665813804
+ 0.8670184016 0.8670184016 0.8670184016
+ 0.8674554229 0.8674554229 0.8674554229
+ 0.8678925037 0.8678925037 0.8678925037
+ 0.8683295250 0.8683295250 0.8683295250
+ 0.8687664866 0.8687664866 0.8687664866
+ 0.8692035079 0.8692035079 0.8692035079
+ 0.8696405888 0.8696405888 0.8696405888
+ 0.8700734973 0.8700734973 0.8700734973
+ 0.8704878092 0.8704878092 0.8704878092
+ 0.8709020019 0.8709020019 0.8709020019
+ 0.8713161945 0.8713161945 0.8713161945
+ 0.8717305064 0.8717305064 0.8717305064
+ 0.8721446991 0.8721446991 0.8721446991
+ 0.8725590110 0.8725590110 0.8725590110
+ 0.8729732037 0.8729732037 0.8729732037
+ 0.8733873963 0.8733873963 0.8733873963
+ 0.8738017082 0.8738017082 0.8738017082
+ 0.8742159009 0.8742159009 0.8742159009
+ 0.8746302128 0.8746302128 0.8746302128
+ 0.8750444055 0.8750444055 0.8750444055
+ 0.8754585981 0.8754585981 0.8754585981
+ 0.8758729100 0.8758729100 0.8758729100
+ 0.8762871027 0.8762871027 0.8762871027
+ 0.8767014146 0.8767014146 0.8767014146
+ 0.8771156073 0.8771156073 0.8771156073
+ 0.8775297999 0.8775297999 0.8775297999
+ 0.8779441118 0.8779441118 0.8779441118
+ 0.8783583045 0.8783583045 0.8783583045
+ 0.8787726164 0.8787726164 0.8787726164
+ 0.8791868091 0.8791868091 0.8791868091
+ 0.8796010017 0.8796010017 0.8796010017
+ 0.8800144792 0.8800144792 0.8800144792
+ 0.8804072142 0.8804072142 0.8804072142
+ 0.8807997704 0.8807997704 0.8807997704
+ 0.8811925054 0.8811925054 0.8811925054
+ 0.8815851808 0.8815851808 0.8815851808
+ 0.8819777966 0.8819777966 0.8819777966
+ 0.8823704720 0.8823704720 0.8823704720
+ 0.8827632070 0.8827632070 0.8827632070
+ 0.8831558228 0.8831558228 0.8831558228
+ 0.8835484982 0.8835484982 0.8835484982
+ 0.8839411736 0.8839411736 0.8839411736
+ 0.8843337893 0.8843337893 0.8843337893
+ 0.8847265244 0.8847265244 0.8847265244
+ 0.8851191998 0.8851191998 0.8851191998
+ 0.8855118752 0.8855118752 0.8855118752
+ 0.8859044909 0.8859044909 0.8859044909
+ 0.8862972260 0.8862972260 0.8862972260
+ 0.8866899014 0.8866899014 0.8866899014
+ 0.8870825171 0.8870825171 0.8870825171
+ 0.8874751925 0.8874751925 0.8874751925
+ 0.8878679276 0.8878679276 0.8878679276
+ 0.8882604837 0.8882604837 0.8882604837
+ 0.8886532187 0.8886532187 0.8886532187
+ 0.8890458941 0.8890458941 0.8890458941
+ 0.8894385099 0.8894385099 0.8894385099
+ 0.8898311853 0.8898311853 0.8898311853
+ 0.8902121782 0.8902121782 0.8902121782
+ 0.8905845284 0.8905845284 0.8905845284
+ 0.8909568191 0.8909568191 0.8909568191
+ 0.8913289905 0.8913289905 0.8913289905
+ 0.8917012811 0.8917012811 0.8917012811
+ 0.8920735121 0.8920735121 0.8920735121
+ 0.8924458027 0.8924458027 0.8924458027
+ 0.8928180933 0.8928180933 0.8928180933
+ 0.8931903243 0.8931903243 0.8931903243
+ 0.8935626149 0.8935626149 0.8935626149
+ 0.8939347863 0.8939347863 0.8939347863
+ 0.8943070769 0.8943070769 0.8943070769
+ 0.8946794271 0.8946794271 0.8946794271
+ 0.8950515985 0.8950515985 0.8950515985
+ 0.8954238892 0.8954238892 0.8954238892
+ 0.8957961202 0.8957961202 0.8957961202
+ 0.8961684108 0.8961684108 0.8961684108
+ 0.8965405822 0.8965405822 0.8965405822
+ 0.8969128728 0.8969128728 0.8969128728
+ 0.8972852230 0.8972852230 0.8972852230
+ 0.8976573944 0.8976573944 0.8976573944
+ 0.8980296850 0.8980296850 0.8980296850
+ 0.8984019160 0.8984019160 0.8984019160
+ 0.8987742066 0.8987742066 0.8987742066
+ 0.8991464972 0.8991464972 0.8991464972
+ 0.8995187283 0.8995187283 0.8995187283
+ 0.8998910189 0.8998910189 0.8998910189
+ 0.9002496004 0.9002496004 0.9002496004
+ 0.9006025195 0.9006025195 0.9006025195
+ 0.9009554982 0.9009554982 0.9009554982
+ 0.9013084769 0.9013084769 0.9013084769
+ 0.9016613960 0.9016613960 0.9016613960
+ 0.9020143747 0.9020143747 0.9020143747
+ 0.9023672938 0.9023672938 0.9023672938
+ 0.9027202725 0.9027202725 0.9027202725
+ 0.9030731916 0.9030731916 0.9030731916
+ 0.9034261703 0.9034261703 0.9034261703
+ 0.9037792087 0.9037792087 0.9037792087
+ 0.9041321278 0.9041321278 0.9041321278
+ 0.9044851065 0.9044851065 0.9044851065
+ 0.9048380256 0.9048380256 0.9048380256
+ 0.9051910043 0.9051910043 0.9051910043
+ 0.9055439234 0.9055439234 0.9055439234
+ 0.9058969021 0.9058969021 0.9058969021
+ 0.9062498808 0.9062498808 0.9062498808
+ 0.9066027999 0.9066027999 0.9066027999
+ 0.9069557786 0.9069557786 0.9069557786
+ 0.9073086977 0.9073086977 0.9073086977
+ 0.9076616764 0.9076616764 0.9076616764
+ 0.9080145955 0.9080145955 0.9080145955
+ 0.9083675742 0.9083675742 0.9083675742
+ 0.9087206125 0.9087206125 0.9087206125
+ 0.9090734720 0.9090734720 0.9090734720
+ 0.9094265103 0.9094265103 0.9094265103
+ 0.9097794294 0.9097794294 0.9097794294
+ 0.9101254940 0.9101254940 0.9101254940
+ 0.9104602933 0.9104602933 0.9104602933
+ 0.9107949734 0.9107949734 0.9107949734
+ 0.9111297131 0.9111297131 0.9111297131
+ 0.9114643931 0.9114643931 0.9114643931
+ 0.9117990732 0.9117990732 0.9117990732
+ 0.9121338129 0.9121338129 0.9121338129
+ 0.9124684930 0.9124684930 0.9124684930
+ 0.9128032923 0.9128032923 0.9128032923
+ 0.9131379724 0.9131379724 0.9131379724
+ 0.9134727120 0.9134727120 0.9134727120
+ 0.9138073921 0.9138073921 0.9138073921
+ 0.9141420722 0.9141420722 0.9141420722
+ 0.9144768119 0.9144768119 0.9144768119
+ 0.9148114920 0.9148114920 0.9148114920
+ 0.9151462913 0.9151462913 0.9151462913
+ 0.9154809713 0.9154809713 0.9154809713
+ 0.9158157110 0.9158157110 0.9158157110
+ 0.9161503911 0.9161503911 0.9161503911
+ 0.9164850712 0.9164850712 0.9164850712
+ 0.9168198109 0.9168198109 0.9168198109
+ 0.9171544909 0.9171544909 0.9171544909
+ 0.9174892902 0.9174892902 0.9174892902
+ 0.9178239703 0.9178239703 0.9178239703
+ 0.9181587100 0.9181587100 0.9181587100
+ 0.9184933901 0.9184933901 0.9184933901
+ 0.9188281298 0.9188281298 0.9188281298
+ 0.9191628098 0.9191628098 0.9191628098
+ 0.9194974899 0.9194974899 0.9194974899
+ 0.9198322892 0.9198322892 0.9198322892
+ 0.9201583862 0.9201583862 0.9201583862
+ 0.9204757810 0.9204757810 0.9204757810
+ 0.9207932949 0.9207932949 0.9207932949
+ 0.9211108088 0.9211108088 0.9211108088
+ 0.9214283228 0.9214283228 0.9214283228
+ 0.9217457771 0.9217457771 0.9217457771
+ 0.9220631719 0.9220631719 0.9220631719
+ 0.9223806858 0.9223806858 0.9223806858
+ 0.9226981997 0.9226981997 0.9226981997
+ 0.9230157137 0.9230157137 0.9230157137
+ 0.9233332276 0.9233332276 0.9233332276
+ 0.9236506224 0.9236506224 0.9236506224
+ 0.9239680767 0.9239680767 0.9239680767
+ 0.9242855906 0.9242855906 0.9242855906
+ 0.9246031046 0.9246031046 0.9246031046
+ 0.9249204993 0.9249204993 0.9249204993
+ 0.9252380133 0.9252380133 0.9252380133
+ 0.9255555272 0.9255555272 0.9255555272
+ 0.9258729815 0.9258729815 0.9258729815
+ 0.9261904955 0.9261904955 0.9261904955
+ 0.9265078902 0.9265078902 0.9265078902
+ 0.9268254042 0.9268254042 0.9268254042
+ 0.9271429181 0.9271429181 0.9271429181
+ 0.9274603724 0.9274603724 0.9274603724
+ 0.9277778268 0.9277778268 0.9277778268
+ 0.9280952811 0.9280952811 0.9280952811
+ 0.9284127951 0.9284127951 0.9284127951
+ 0.9287303090 0.9287303090 0.9287303090
+ 0.9290478230 0.9290478230 0.9290478230
+ 0.9293652177 0.9293652177 0.9293652177
+ 0.9296826720 0.9296826720 0.9296826720
+ 0.9300001860 0.9300001860 0.9300001860
+ 0.9303014278 0.9303014278 0.9303014278
+ 0.9306026101 0.9306026101 0.9306026101
+ 0.9309037924 0.9309037924 0.9309037924
+ 0.9312049747 0.9312049747 0.9312049747
+ 0.9315062165 0.9315062165 0.9315062165
+ 0.9318073988 0.9318073988 0.9318073988
+ 0.9321085811 0.9321085811 0.9321085811
+ 0.9324098229 0.9324098229 0.9324098229
+ 0.9327110052 0.9327110052 0.9327110052
+ 0.9330121875 0.9330121875 0.9330121875
+ 0.9333134294 0.9333134294 0.9333134294
+ 0.9336146116 0.9336146116 0.9336146116
+ 0.9339157939 0.9339157939 0.9339157939
+ 0.9342169762 0.9342169762 0.9342169762
+ 0.9345182180 0.9345182180 0.9345182180
+ 0.9348194003 0.9348194003 0.9348194003
+ 0.9351205826 0.9351205826 0.9351205826
+ 0.9354218245 0.9354218245 0.9354218245
+ 0.9357230067 0.9357230067 0.9357230067
+ 0.9360241890 0.9360241890 0.9360241890
+ 0.9363253713 0.9363253713 0.9363253713
+ 0.9366264939 0.9366264939 0.9366264939
+ 0.9369276762 0.9369276762 0.9369276762
+ 0.9372289181 0.9372289181 0.9372289181
+ 0.9375301003 0.9375301003 0.9375301003
+ 0.9378312826 0.9378312826 0.9378312826
+ 0.9381325245 0.9381325245 0.9381325245
+ 0.9384337068 0.9384337068 0.9384337068
+ 0.9387348890 0.9387348890 0.9387348890
+ 0.9390360713 0.9390360713 0.9390360713
+ 0.9393373132 0.9393373132 0.9393373132
+ 0.9396384954 0.9396384954 0.9396384954
+ 0.9399396777 0.9399396777 0.9399396777
+ 0.9402285814 0.9402285814 0.9402285814
+ 0.9405145049 0.9405145049 0.9405145049
+ 0.9408003092 0.9408003092 0.9408003092
+ 0.9410861135 0.9410861135 0.9410861135
+ 0.9413719177 0.9413719177 0.9413719177
+ 0.9416577816 0.9416577816 0.9416577816
+ 0.9419435859 0.9419435859 0.9419435859
+ 0.9422293901 0.9422293901 0.9422293901
+ 0.9425153136 0.9425153136 0.9425153136
+ 0.9428011179 0.9428011179 0.9428011179
+ 0.9430869222 0.9430869222 0.9430869222
+ 0.9433727264 0.9433727264 0.9433727264
+ 0.9436585903 0.9436585903 0.9436585903
+ 0.9439443946 0.9439443946 0.9439443946
+ 0.9442301989 0.9442301989 0.9442301989
+ 0.9445160031 0.9445160031 0.9445160031
+ 0.9448019266 0.9448019266 0.9448019266
+ 0.9450876713 0.9450876713 0.9450876713
+ 0.9453734756 0.9453734756 0.9453734756
+ 0.9456593990 0.9456593990 0.9456593990
+ 0.9459452033 0.9459452033 0.9459452033
+ 0.9462310076 0.9462310076 0.9462310076
+ 0.9465168118 0.9465168118 0.9465168118
+ 0.9468026757 0.9468026757 0.9468026757
+ 0.9470884800 0.9470884800 0.9470884800
+ 0.9473742843 0.9473742843 0.9473742843
+ 0.9476600885 0.9476600885 0.9476600885
+ 0.9479460120 0.9479460120 0.9479460120
+ 0.9482318163 0.9482318163 0.9482318163
+ 0.9485176206 0.9485176206 0.9485176206
+ 0.9488034248 0.9488034248 0.9488034248
+ 0.9490892887 0.9490892887 0.9490892887
+ 0.9493750930 0.9493750930 0.9493750930
+ 0.9496608973 0.9496608973 0.9496608973
+ 0.9499468207 0.9499468207 0.9499468207
+ 0.9502208233 0.9502208233 0.9502208233
+ 0.9504920840 0.9504920840 0.9504920840
+ 0.9507634044 0.9507634044 0.9507634044
+ 0.9510347247 0.9510347247 0.9510347247
+ 0.9513059855 0.9513059855 0.9513059855
+ 0.9515774250 0.9515774250 0.9515774250
+ 0.9518486857 0.9518486857 0.9518486857
+ 0.9521200061 0.9521200061 0.9521200061
+ 0.9523913264 0.9523913264 0.9523913264
+ 0.9526625872 0.9526625872 0.9526625872
+ 0.9529339075 0.9529339075 0.9529339075
+ 0.9532052279 0.9532052279 0.9532052279
+ 0.9534766078 0.9534766078 0.9534766078
+ 0.9537479281 0.9537479281 0.9537479281
+ 0.9540191889 0.9540191889 0.9540191889
+ 0.9542905092 0.9542905092 0.9542905092
+ 0.9545618296 0.9545618296 0.9545618296
+ 0.9548330903 0.9548330903 0.9548330903
+ 0.9551044106 0.9551044106 0.9551044106
+ 0.9553757906 0.9553757906 0.9553757906
+ 0.9556471109 0.9556471109 0.9556471109
+ 0.9559183717 0.9559183717 0.9559183717
+ 0.9561896920 0.9561896920 0.9561896920
+ 0.9564610124 0.9564610124 0.9564610124
+ 0.9567322731 0.9567322731 0.9567322731
+ 0.9570037127 0.9570037127 0.9570037127
+ 0.9572749734 0.9572749734 0.9572749734
+ 0.9575462937 0.9575462937 0.9575462937
+ 0.9578176141 0.9578176141 0.9578176141
+ 0.9580888748 0.9580888748 0.9580888748
+ 0.9583601952 0.9583601952 0.9583601952
+ 0.9586315155 0.9586315155 0.9586315155
+ 0.9589028955 0.9589028955 0.9589028955
+ 0.9591742158 0.9591742158 0.9591742158
+ 0.9594454765 0.9594454765 0.9594454765
+ 0.9597167969 0.9597167969 0.9597167969
+ 0.9599881172 0.9599881172 0.9599881172
+ 0.9602463245 0.9602463245 0.9602463245
+ 0.9605039954 0.9605039954 0.9605039954
+ 0.9607616067 0.9607616067 0.9607616067
+ 0.9610192180 0.9610192180 0.9610192180
+ 0.9612768292 0.9612768292 0.9612768292
+ 0.9615343809 0.9615343809 0.9615343809
+ 0.9617919922 0.9617919922 0.9617919922
+ 0.9620497227 0.9620497227 0.9620497227
+ 0.9623072743 0.9623072743 0.9623072743
+ 0.9625648856 0.9625648856 0.9625648856
+ 0.9628224969 0.9628224969 0.9628224969
+ 0.9630801082 0.9630801082 0.9630801082
+ 0.9633377194 0.9633377194 0.9633377194
+ 0.9635953903 0.9635953903 0.9635953903
+ 0.9638530016 0.9638530016 0.9638530016
+ 0.9641106129 0.9641106129 0.9641106129
+ 0.9643682241 0.9643682241 0.9643682241
+ 0.9646257758 0.9646257758 0.9646257758
+ 0.9648833871 0.9648833871 0.9648833871
+ 0.9651411176 0.9651411176 0.9651411176
+ 0.9653987288 0.9653987288 0.9653987288
+ 0.9656562805 0.9656562805 0.9656562805
+ 0.9659138918 0.9659138918 0.9659138918
+ 0.9661715031 0.9661715031 0.9661715031
+ 0.9664291143 0.9664291143 0.9664291143
+ 0.9666867852 0.9666867852 0.9666867852
+ 0.9669443965 0.9669443965 0.9669443965
+ 0.9672020078 0.9672020078 0.9672020078
+ 0.9674596190 0.9674596190 0.9674596190
+ 0.9677171707 0.9677171707 0.9677171707
+ 0.9679747820 0.9679747820 0.9679747820
+ 0.9682325125 0.9682325125 0.9682325125
+ 0.9684901237 0.9684901237 0.9684901237
+ 0.9687476754 0.9687476754 0.9687476754
+ 0.9690052867 0.9690052867 0.9690052867
+ 0.9692628980 0.9692628980 0.9692628980
+ 0.9695205092 0.9695205092 0.9695205092
+ 0.9697781801 0.9697781801 0.9697781801
+ 0.9700340033 0.9700340033 0.9700340033
+ 0.9702786803 0.9702786803 0.9702786803
+ 0.9705232978 0.9705232978 0.9705232978
+ 0.9707679749 0.9707679749 0.9707679749
+ 0.9710127115 0.9710127115 0.9710127115
+ 0.9712573886 0.9712573886 0.9712573886
+ 0.9715021253 0.9715021253 0.9715021253
+ 0.9717468023 0.9717468023 0.9717468023
+ 0.9719914794 0.9719914794 0.9719914794
+ 0.9722362161 0.9722362161 0.9722362161
+ 0.9724807739 0.9724807739 0.9724807739
+ 0.9727255106 0.9727255106 0.9727255106
+ 0.9729701877 0.9729701877 0.9729701877
+ 0.9732149243 0.9732149243 0.9732149243
+ 0.9734596014 0.9734596014 0.9734596014
+ 0.9737042785 0.9737042785 0.9737042785
+ 0.9739490151 0.9739490151 0.9739490151
+ 0.9741935730 0.9741935730 0.9741935730
+ 0.9744383097 0.9744383097 0.9744383097
+ 0.9746829867 0.9746829867 0.9746829867
+ 0.9749277234 0.9749277234 0.9749277234
+ 0.9751724005 0.9751724005 0.9751724005
+ 0.9754170775 0.9754170775 0.9754170775
+ 0.9756618142 0.9756618142 0.9756618142
+ 0.9759064913 0.9759064913 0.9759064913
+ 0.9761511087 0.9761511087 0.9761511087
+ 0.9763957858 0.9763957858 0.9763957858
+ 0.9766405225 0.9766405225 0.9766405225
+ 0.9768851995 0.9768851995 0.9768851995
+ 0.9771298766 0.9771298766 0.9771298766
+ 0.9773746133 0.9773746133 0.9773746133
+ 0.9776192904 0.9776192904 0.9776192904
+ 0.9778640270 0.9778640270 0.9778640270
+ 0.9781085849 0.9781085849 0.9781085849
+ 0.9783533216 0.9783533216 0.9783533216
+ 0.9785979986 0.9785979986 0.9785979986
+ 0.9788426757 0.9788426757 0.9788426757
+ 0.9790874124 0.9790874124 0.9790874124
+ 0.9793320894 0.9793320894 0.9793320894
+ 0.9795768261 0.9795768261 0.9795768261
+ 0.9798213840 0.9798213840 0.9798213840
+ 0.9800627828 0.9800627828 0.9800627828
+ 0.9802953005 0.9802953005 0.9802953005
+ 0.9805278182 0.9805278182 0.9805278182
+ 0.9807602763 0.9807602763 0.9807602763
+ 0.9809927940 0.9809927940 0.9809927940
+ 0.9812251925 0.9812251925 0.9812251925
+ 0.9814577103 0.9814577103 0.9814577103
+ 0.9816902280 0.9816902280 0.9816902280
+ 0.9819226861 0.9819226861 0.9819226861
+ 0.9821552038 0.9821552038 0.9821552038
+ 0.9823877215 0.9823877215 0.9823877215
+ 0.9826201200 0.9826201200 0.9826201200
+ 0.9828525782 0.9828525782 0.9828525782
+ 0.9830850959 0.9830850959 0.9830850959
+ 0.9833176136 0.9833176136 0.9833176136
+ 0.9835500717 0.9835500717 0.9835500717
+ 0.9837825894 0.9837825894 0.9837825894
+ 0.9840149879 0.9840149879 0.9840149879
+ 0.9842475057 0.9842475057 0.9842475057
+ 0.9844800234 0.9844800234 0.9844800234
+ 0.9847124815 0.9847124815 0.9847124815
+ 0.9849449992 0.9849449992 0.9849449992
+ 0.9851775169 0.9851775169 0.9851775169
+ 0.9854099154 0.9854099154 0.9854099154
+ 0.9856423736 0.9856423736 0.9856423736
+ 0.9858748913 0.9858748913 0.9858748913
+ 0.9861074090 0.9861074090 0.9861074090
+ 0.9863399267 0.9863399267 0.9863399267
+ 0.9865723848 0.9865723848 0.9865723848
+ 0.9868047833 0.9868047833 0.9868047833
+ 0.9870373011 0.9870373011 0.9870373011
+ 0.9872698188 0.9872698188 0.9872698188
+ 0.9875022769 0.9875022769 0.9875022769
+ 0.9877347946 0.9877347946 0.9877347946
+ 0.9879673123 0.9879673123 0.9879673123
+ 0.9881997108 0.9881997108 0.9881997108
+ 0.9884322286 0.9884322286 0.9884322286
+ 0.9886646867 0.9886646867 0.9886646867
+ 0.9888972044 0.9888972044 0.9888972044
+ 0.9891297221 0.9891297221 0.9891297221
+ 0.9893621206 0.9893621206 0.9893621206
+ 0.9895945787 0.9895945787 0.9895945787
+ 0.9898270965 0.9898270965 0.9898270965
+ 0.9900565743 0.9900565743 0.9900565743
+ 0.9902775884 0.9902775884 0.9902775884
+ 0.9904986024 0.9904986024 0.9904986024
+ 0.9907194972 0.9907194972 0.9907194972
+ 0.9909405112 0.9909405112 0.9909405112
+ 0.9911615252 0.9911615252 0.9911615252
+ 0.9913824201 0.9913824201 0.9913824201
+ 0.9916033745 0.9916033745 0.9916033745
+ 0.9918243885 0.9918243885 0.9918243885
+ 0.9920452833 0.9920452833 0.9920452833
+ 0.9922662973 0.9922662973 0.9922662973
+ 0.9924871922 0.9924871922 0.9924871922
+ 0.9927082062 0.9927082062 0.9927082062
+ 0.9929292202 0.9929292202 0.9929292202
+ 0.9931501150 0.9931501150 0.9931501150
+ 0.9933711290 0.9933711290 0.9933711290
+ 0.9935920835 0.9935920835 0.9935920835
+ 0.9938129783 0.9938129783 0.9938129783
+ 0.9940339923 0.9940339923 0.9940339923
+ 0.9942548871 0.9942548871 0.9942548871
+ 0.9944759011 0.9944759011 0.9944759011
+ 0.9946969151 0.9946969151 0.9946969151
+ 0.9949178100 0.9949178100 0.9949178100
+ 0.9951388240 0.9951388240 0.9951388240
+ 0.9953597784 0.9953597784 0.9953597784
+ 0.9955806732 0.9955806732 0.9955806732
+ 0.9958016872 0.9958016872 0.9958016872
+ 0.9960227013 0.9960227013 0.9960227013
+ 0.9962435961 0.9962435961 0.9962435961
+ 0.9964646101 0.9964646101 0.9964646101
+ 0.9966855049 0.9966855049 0.9966855049
+ 0.9969065189 0.9969065189 0.9969065189
+ 0.9971274734 0.9971274734 0.9971274734
+ 0.9973484278 0.9973484278 0.9973484278
+ 0.9975693822 0.9975693822 0.9975693822
+ 0.9977903962 0.9977903962 0.9977903962
+ 0.9980112910 0.9980112910 0.9980112910
+ 0.9982323050 0.9982323050 0.9982323050
+ 0.9984533191 0.9984533191 0.9984533191
+ 0.9986742139 0.9986742139 0.9986742139
+ 0.9988952279 0.9988952279 0.9988952279
+ 0.9991161227 0.9991161227 0.9991161227
+ 0.9993370771 0.9993370771 0.9993370771
+ 0.9995580912 0.9995580912 0.9995580912
+ 0.9997789860 0.9997789860 0.9997789860
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/kodak_dscs_3156.spi1d b/release/datafiles/colormanagement/luts/film_response/kodak_dscs_3156.spi1d
new file mode 100644
index 00000000000..5f4ce9fe5ec
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/kodak_dscs_3156.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0012913510 0.0008980598 0.0004710060
+ 0.0025827030 0.0017961200 0.0009420120
+ 0.0038740539 0.0026941791 0.0014130180
+ 0.0051654060 0.0035922390 0.0018840240
+ 0.0064567570 0.0044902992 0.0023550300
+ 0.0077481088 0.0053883591 0.0028260360
+ 0.0090394598 0.0062864190 0.0032970421
+ 0.0103690401 0.0071844789 0.0037680480
+ 0.0118096303 0.0080825379 0.0042390539
+ 0.0132502196 0.0089805983 0.0047100601
+ 0.0146908201 0.0098786578 0.0051810662
+ 0.0161314104 0.0108593097 0.0056520719
+ 0.0175720006 0.0118528605 0.0061230781
+ 0.0190125909 0.0128464103 0.0065940842
+ 0.0205063205 0.0138399703 0.0070650899
+ 0.0221158192 0.0148335202 0.0075360960
+ 0.0237253308 0.0158270709 0.0080071017
+ 0.0253348406 0.0168206207 0.0084781079
+ 0.0269443505 0.0178141799 0.0089491140
+ 0.0285538603 0.0188077297 0.0094201202
+ 0.0301827304 0.0198012795 0.0098911263
+ 0.0319830701 0.0208809301 0.0103980303
+ 0.0337834209 0.0219821204 0.0109157199
+ 0.0355837606 0.0230832994 0.0114334105
+ 0.0373841003 0.0241844803 0.0119511103
+ 0.0391844399 0.0252856594 0.0124687999
+ 0.0411023311 0.0263868403 0.0129864896
+ 0.0431175716 0.0274880193 0.0135041801
+ 0.0451328084 0.0285892002 0.0140218800
+ 0.0471480489 0.0296903793 0.0145395696
+ 0.0491632894 0.0308787897 0.0150572602
+ 0.0513193496 0.0321012996 0.0155749600
+ 0.0535753891 0.0333238207 0.0160926506
+ 0.0558314398 0.0345463417 0.0166103393
+ 0.0580874793 0.0357688516 0.0171280298
+ 0.0603842996 0.0369913690 0.0176457297
+ 0.0629082322 0.0382138900 0.0181634203
+ 0.0654321536 0.0394364111 0.0186811108
+ 0.0679560676 0.0407326184 0.0191988107
+ 0.0705360919 0.0420918800 0.0197164994
+ 0.0733550414 0.0434511304 0.0202579591
+ 0.0761739910 0.0448103808 0.0208282005
+ 0.0789929330 0.0461696312 0.0213984400
+ 0.0820178986 0.0475288890 0.0219686702
+ 0.0851573721 0.0488881394 0.0225389097
+ 0.0882968530 0.0502754003 0.0231091492
+ 0.0915927812 0.0517885610 0.0236793794
+ 0.0950742513 0.0533017218 0.0242496207
+ 0.0985557213 0.0548148789 0.0248198602
+ 0.1022457033 0.0563280284 0.0253900904
+ 0.1060836017 0.0578411892 0.0259603299
+ 0.1099215001 0.0593543500 0.0265305694
+ 0.1141121984 0.0609665997 0.0271007996
+ 0.1183103025 0.0626525879 0.0276710391
+ 0.1227174997 0.0643385872 0.0282412805
+ 0.1272657067 0.0660245866 0.0288115107
+ 0.1319428980 0.0677105933 0.0293817502
+ 0.1368145049 0.0693965778 0.0299519897
+ 0.1417827010 0.0712067708 0.0305764992
+ 0.1469336003 0.0730861723 0.0312060006
+ 0.1521732956 0.0749655813 0.0318355002
+ 0.1575435996 0.0768449828 0.0324649997
+ 0.1629938930 0.0787243918 0.0330944993
+ 0.1685118973 0.0806729570 0.0337239988
+ 0.1740811020 0.0827676505 0.0343534984
+ 0.1796693951 0.0848623365 0.0349830016
+ 0.1852522939 0.0869570300 0.0356125012
+ 0.1908237040 0.0890517235 0.0362420008
+ 0.1963316947 0.0912766010 0.0368715003
+ 0.2017958015 0.0936091468 0.0375009999
+ 0.2071722001 0.0959417075 0.0381304994
+ 0.2124657035 0.0982742608 0.0387599990
+ 0.2176671028 0.1006745026 0.0393894985
+ 0.2227557003 0.1032672003 0.0400210209
+ 0.2277524024 0.1058600023 0.0407175012
+ 0.2326270938 0.1084527001 0.0414139815
+ 0.2374019027 0.1111586019 0.0421104617
+ 0.2420724034 0.1140320972 0.0428069495
+ 0.2466181964 0.1169055998 0.0435034297
+ 0.2511056960 0.1197791025 0.0441999100
+ 0.2554233968 0.1229275018 0.0448963903
+ 0.2597410083 0.1260987967 0.0455928706
+ 0.2638502121 0.1292701066 0.0462893508
+ 0.2679460049 0.1326791048 0.0469858386
+ 0.2719362974 0.1361591071 0.0476823188
+ 0.2758204043 0.1396390945 0.0483787991
+ 0.2797045112 0.1433980018 0.0490752794
+ 0.2834044099 0.1471890956 0.0497717597
+ 0.2870891094 0.1510583013 0.0505192392
+ 0.2907347083 0.1551516056 0.0512915812
+ 0.2942334116 0.1592448950 0.0520639084
+ 0.2977321148 0.1635666043 0.0528362505
+ 0.3011702895 0.1679400951 0.0536085814
+ 0.3044967949 0.1724427938 0.0543809198
+ 0.3078233004 0.1770606041 0.0551532507
+ 0.3110949993 0.1817495972 0.0559255891
+ 0.3142628968 0.1865632981 0.0566979311
+ 0.3174307942 0.1914165020 0.0574702583
+ 0.3205712140 0.1963680983 0.0582426004
+ 0.3235935867 0.2013394982 0.0590149313
+ 0.3266159892 0.2063657045 0.0597872697
+ 0.3296383023 0.2113949060 0.0606219508
+ 0.3325434029 0.2164323032 0.0614803396
+ 0.3354324996 0.2214559019 0.0623387285
+ 0.3383215964 0.2264461070 0.0631971210
+ 0.3411597013 0.2314081937 0.0640555099
+ 0.3439269960 0.2363009006 0.0649138913
+ 0.3466942906 0.2411601990 0.0657722801
+ 0.3494617045 0.2459158003 0.0666306689
+ 0.3521394134 0.2506479919 0.0674890578
+ 0.3547956049 0.2552376986 0.0683474466
+ 0.3574517071 0.2598274946 0.0692058429
+ 0.3601036966 0.2642399073 0.0700715408
+ 0.3626584113 0.2686452866 0.0710277036
+ 0.3652130067 0.2729164064 0.0719838589
+ 0.3677676022 0.2771278918 0.0729400069
+ 0.3703106046 0.2812767923 0.0738961697
+ 0.3727726042 0.2852917016 0.0748523325
+ 0.3752346039 0.2893066108 0.0758084878
+ 0.3776965141 0.2931610048 0.0767646432
+ 0.3801530898 0.2969819903 0.0777207986
+ 0.3825305104 0.3007636070 0.0786769614
+ 0.3849078119 0.3043971956 0.0796331167
+ 0.3872852027 0.3080308139 0.0806578100
+ 0.3896625936 0.3115825951 0.0817251801
+ 0.3919736147 0.3150376081 0.0827925429
+ 0.3942736089 0.3184925914 0.0838598981
+ 0.3965736926 0.3218528032 0.0849272683
+ 0.3988736868 0.3251396120 0.0859946311
+ 0.4011375904 0.3284263909 0.0870619863
+ 0.4033668935 0.3316313028 0.0881293565
+ 0.4055961072 0.3347609043 0.0891967192
+ 0.4078254104 0.3378903866 0.0902953967
+ 0.4100531042 0.3409723938 0.0914893299
+ 0.4122174084 0.3439559937 0.0926832631
+ 0.4143818021 0.3469395041 0.0938771889
+ 0.4165461957 0.3499230146 0.0950711221
+ 0.4187105894 0.3527748883 0.0962650478
+ 0.4208509922 0.3556233943 0.0974589810
+ 0.4229558110 0.3584718108 0.0986529067
+ 0.4250606000 0.3612624109 0.0998468399
+ 0.4271655083 0.3639861941 0.1011663005
+ 0.4292702973 0.3667100072 0.1025042981
+ 0.4313394129 0.3694337904 0.1038423032
+ 0.4333893955 0.3720667064 0.1051801965
+ 0.4354394078 0.3746758103 0.1065182015
+ 0.4374893904 0.3772849143 0.1078561991
+ 0.4395394921 0.3798938990 0.1091940999
+ 0.4415503144 0.3824017942 0.1105972007
+ 0.4435496926 0.3849053979 0.1120989993
+ 0.4455491900 0.3874089122 0.1136007011
+ 0.4475485981 0.3899124861 0.1151024029
+ 0.4495480955 0.3923225105 0.1166040972
+ 0.4515112042 0.3947291076 0.1181057990
+ 0.4534637928 0.3971355855 0.1196075976
+ 0.4554164112 0.3995422125 0.1212465018
+ 0.4573689997 0.4018765986 0.1229339987
+ 0.4593215883 0.4041940868 0.1246215031
+ 0.4612458050 0.4065114856 0.1263090074
+ 0.4631549120 0.4088290036 0.1279965043
+ 0.4650638998 0.4111058116 0.1296840012
+ 0.4669730067 0.4133413136 0.1315421015
+ 0.4688819945 0.4155766964 0.1334394962
+ 0.4707742035 0.4178121984 0.1353369951
+ 0.4726425111 0.4200460017 0.1372344047
+ 0.4745109081 0.4222060144 0.1391319036
+ 0.4763793051 0.4243659079 0.1411572993
+ 0.4782476127 0.4265258014 0.1432905942
+ 0.4801135957 0.4286858141 0.1454239935
+ 0.4819437861 0.4308184981 0.1475573033
+ 0.4837738872 0.4329088032 0.1496907026
+ 0.4856041074 0.4349991083 0.1520487964
+ 0.4874342084 0.4370894134 0.1544450074
+ 0.4892643988 0.4391798079 0.1568412036
+ 0.4910728931 0.4412310123 0.1592375040
+ 0.4928669035 0.4432570040 0.1618310958
+ 0.4946610034 0.4452829957 0.1645168066
+ 0.4964550138 0.4473089874 0.1672026068
+ 0.4982489944 0.4493350089 0.1698883027
+ 0.5000422001 0.4513210058 0.1728748977
+ 0.5018019080 0.4532875121 0.1758745015
+ 0.5035614967 0.4552539885 0.1788741052
+ 0.5053212047 0.4572204053 0.1820818037
+ 0.5070807934 0.4591869116 0.1854145974
+ 0.5088403821 0.4611209929 0.1887473017
+ 0.5105888247 0.4630320966 0.1922948956
+ 0.5123155117 0.4649432898 0.1959716976
+ 0.5140420794 0.4668545127 0.1996484995
+ 0.5157688260 0.4687657058 0.2036353946
+ 0.5174953938 0.4706586897 0.2076551020
+ 0.5192220807 0.4725184143 0.2118106931
+ 0.5209311843 0.4743781090 0.2161566019
+ 0.5226259232 0.4762378037 0.2205363065
+ 0.5243206024 0.4780975878 0.2251745015
+ 0.5260154009 0.4799573123 0.2298126072
+ 0.5277100801 0.4817700088 0.2346820980
+ 0.5294048190 0.4835816026 0.2395613045
+ 0.5310792923 0.4853931963 0.2446004003
+ 0.5327429175 0.4872049093 0.2496553957
+ 0.5344064832 0.4890165031 0.2548052073
+ 0.5360699892 0.4908075035 0.2599619925
+ 0.5377336144 0.4925738871 0.2651447952
+ 0.5393971205 0.4943403900 0.2703250945
+ 0.5410410762 0.4961068928 0.2754637897
+ 0.5426740050 0.4978733957 0.2805902958
+ 0.5443068743 0.4996398985 0.2856245041
+ 0.5459396839 0.5013725162 0.2906390131
+ 0.5475726128 0.5030964017 0.2955218852
+ 0.5492054224 0.5048202872 0.3003894985
+ 0.5508226156 0.5065442920 0.3050881028
+ 0.5524250269 0.5082681775 0.3097867072
+ 0.5540273190 0.5099921227 0.3142902851
+ 0.5556296706 0.5116760135 0.3187845051
+ 0.5572320223 0.5133596063 0.3231228888
+ 0.5588343740 0.5150431991 0.3274034858
+ 0.5604283810 0.5167267919 0.3315997124
+ 0.5620002151 0.5184103847 0.3356657028
+ 0.5635718703 0.5200918913 0.3397318125
+ 0.5651437044 0.5217370987 0.3436022103
+ 0.5667154193 0.5233823061 0.3474588096
+ 0.5682871938 0.5250275135 0.3512471020
+ 0.5698590279 0.5266727209 0.3549034894
+ 0.5714026093 0.5283179283 0.3585597873
+ 0.5729435086 0.5299631953 0.3621017039
+ 0.5744842887 0.5315724015 0.3655692935
+ 0.5760251880 0.5331807733 0.3690369129
+ 0.5775660276 0.5347892046 0.3723773956
+ 0.5791069269 0.5363975167 0.3756690919
+ 0.5806344748 0.5380058885 0.3789606988
+ 0.5821440220 0.5396143198 0.3821411133
+ 0.5836533904 0.5411956906 0.3852699995
+ 0.5851628184 0.5427685976 0.3883990049
+ 0.5866721869 0.5443415046 0.3914547861
+ 0.5881816745 0.5459142923 0.3944340944
+ 0.5896911025 0.5474871993 0.3974134028
+ 0.5911749005 0.5490601063 0.4003747106
+ 0.5926522017 0.5506191254 0.4032168984
+ 0.5941295028 0.5521575212 0.4060590863
+ 0.5956066847 0.5536959171 0.4089013040
+ 0.5970839858 0.5552341938 0.4116666019
+ 0.5985612869 0.5567725897 0.4143835008
+ 0.6000376940 0.5583109856 0.4171003997
+ 0.6014819145 0.5598493814 0.4198172987
+ 0.6029260755 0.5613573790 0.4224275053
+ 0.6043702960 0.5628619790 0.4250301123
+ 0.6058145761 0.5643666983 0.4276326001
+ 0.6072587967 0.5658714175 0.4302257001
+ 0.6087030172 0.5673760772 0.4327239990
+ 0.6101437807 0.5688806772 0.4352222979
+ 0.6115540266 0.5703768730 0.4377205968
+ 0.6129640937 0.5718483925 0.4402106106
+ 0.6143742800 0.5733199120 0.4426138103
+ 0.6157845259 0.5747913718 0.4450170994
+ 0.6171945930 0.5762628913 0.4474202991
+ 0.6186047792 0.5777344108 0.4498234987
+ 0.6200146079 0.5792058706 0.4521464109
+ 0.6213896275 0.5806623101 0.4544628859
+ 0.6227645874 0.5821009278 0.4567793906
+ 0.6241396070 0.5835396051 0.4590958953
+ 0.6255146265 0.5849782228 0.4613640904
+ 0.6268895864 0.5864169002 0.4636014104
+ 0.6282646060 0.5878555179 0.4658387005
+ 0.6296396255 0.5892940760 0.4680759907
+ 0.6309878230 0.5907161236 0.4703032076
+ 0.6323264837 0.5921220183 0.4724679887
+ 0.6336652040 0.5935279727 0.4746327996
+ 0.6350039244 0.5949339271 0.4767976999
+ 0.6363425255 0.5963398218 0.4789625108
+ 0.6376811862 0.5977457166 0.4810926914
+ 0.6390199065 0.5991516113 0.4831911922
+ 0.6403484941 0.6005445123 0.4852896035
+ 0.6416497231 0.6019176841 0.4873880148
+ 0.6429507732 0.6032907963 0.4894863963
+ 0.6442520022 0.6046640277 0.4915387034
+ 0.6455531716 0.6060370803 0.4935761094
+ 0.6468542814 0.6074103117 0.4956134856
+ 0.6481555104 0.6087834239 0.4976508021
+ 0.6494566202 0.6101527810 0.4996882081
+ 0.6507353187 0.6114928722 0.5016778708
+ 0.6519978046 0.6128330827 0.5036588907
+ 0.6532601714 0.6141732931 0.5056399703
+ 0.6545227170 0.6155133843 0.5076211095
+ 0.6557852030 0.6168535948 0.5096021295
+ 0.6570476890 0.6181936860 0.5115414858
+ 0.6583101749 0.6195338964 0.5134704709
+ 0.6595727205 0.6208522916 0.5153993964
+ 0.6608088017 0.6221591830 0.5173283815
+ 0.6620315909 0.6234660149 0.5192573071
+ 0.6632543206 0.6247729063 0.5211564898
+ 0.6644769907 0.6260796785 0.5230368972
+ 0.6656997204 0.6273866296 0.5249174237
+ 0.6669223905 0.6286934018 0.5267977715
+ 0.6681451201 0.6300002933 0.5286782980
+ 0.6693677902 0.6312733889 0.5305452943
+ 0.6705707908 0.6325464845 0.5323804021
+ 0.6717528105 0.6338195801 0.5342155099
+ 0.6729347110 0.6350926757 0.5360506177
+ 0.6741166115 0.6363657713 0.5378857255
+ 0.6752985716 0.6376389265 0.5397207737
+ 0.6764804721 0.6389120221 0.5415198207
+ 0.6776624918 0.6401801705 0.5433121920
+ 0.6788443923 0.6414189935 0.5451046228
+ 0.6800253987 0.6426578760 0.5468971133
+ 0.6811656952 0.6438966990 0.5486894846
+ 0.6823059916 0.6451355815 0.5504710078
+ 0.6834462881 0.6463744044 0.5522230268
+ 0.6845865846 0.6476132870 0.5539749861
+ 0.6857268810 0.6488522291 0.5557268858
+ 0.6868671179 0.6500884891 0.5574789047
+ 0.6880074143 0.6512925029 0.5592309237
+ 0.6891477108 0.6524965167 0.5609611869
+ 0.6902772784 0.6537005901 0.5626745224
+ 0.6913753152 0.6549046040 0.5643877983
+ 0.6924731731 0.6561086774 0.5661010742
+ 0.6935710907 0.6573126912 0.5678144097
+ 0.6946691275 0.6585168242 0.5695276856
+ 0.6957669854 0.6597207785 0.5712140203
+ 0.6968650222 0.6608976722 0.5728901029
+ 0.6979628801 0.6620662808 0.5745661259
+ 0.6990607977 0.6632350087 0.5762422085
+ 0.7001525760 0.6644036174 0.5779181719
+ 0.7012076974 0.6655722857 0.5795943141
+ 0.7022626996 0.6667408943 0.5812429190
+ 0.7033178210 0.6679096222 0.5828827024
+ 0.7043728828 0.6690781713 0.5845226049
+ 0.7054278851 0.6702393293 0.5861623883
+ 0.7064830065 0.6713719964 0.5878022909
+ 0.7075381279 0.6725047231 0.5894420743
+ 0.7085930705 0.6736373901 0.5910584927
+ 0.7096481919 0.6747701168 0.5926628113
+ 0.7106745243 0.6759027839 0.5942670703
+ 0.7116863132 0.6770355105 0.5958713889
+ 0.7126982212 0.6781681776 0.5974757075
+ 0.7137101293 0.6793009043 0.5990800261
+ 0.7147219777 0.6804196239 0.6006693244
+ 0.7157338262 0.6815158129 0.6022384763
+ 0.7167456746 0.6826120019 0.6038076282
+ 0.7177575827 0.6837081909 0.6053767204
+ 0.7187694907 0.6848043799 0.6069458723
+ 0.7197813988 0.6859006286 0.6085150242
+ 0.7207592726 0.6869968176 0.6100823283
+ 0.7217279077 0.6880930066 0.6116163135
+ 0.7226964235 0.6891891956 0.6131502986
+ 0.7236649990 0.6902757883 0.6146842837
+ 0.7246335745 0.6913350224 0.6162183881
+ 0.7256022096 0.6923943162 0.6177523732
+ 0.7265707850 0.6934534907 0.6192864180
+ 0.7275393009 0.6945127249 0.6208015084
+ 0.7285078764 0.6955720186 0.6223003268
+ 0.7294765115 0.6966311932 0.6237990260
+ 0.7304251790 0.6976904273 0.6252977252
+ 0.7313506007 0.6987497211 0.6267964244
+ 0.7322760224 0.6998088956 0.6282951236
+ 0.7332013845 0.7008374929 0.6297938228
+ 0.7341268063 0.7018594146 0.6312615871
+ 0.7350522280 0.7028812170 0.6327245831
+ 0.7359775901 0.7039030790 0.6341875196
+ 0.7369030118 0.7049250007 0.6356505156
+ 0.7378283739 0.7059468031 0.6371133924
+ 0.7387537956 0.7069687247 0.6385763288
+ 0.7396792173 0.7079905868 0.6400383115
+ 0.7405766249 0.7090123892 0.6414648294
+ 0.7414591908 0.7100329995 0.6428912878
+ 0.7423416972 0.7110173106 0.6443178058
+ 0.7432242036 0.7120015025 0.6457443833
+ 0.7441068292 0.7129856944 0.6471709013
+ 0.7449892759 0.7139698863 0.6485974193
+ 0.7458719015 0.7149540782 0.6500232816
+ 0.7467544079 0.7159383297 0.6514126062
+ 0.7476369739 0.7169225216 0.6528018117
+ 0.7485194802 0.7179067731 0.6541910768
+ 0.7494021058 0.7188910246 0.6555804014
+ 0.7502709031 0.7198752165 0.6569697261
+ 0.7511112094 0.7208263874 0.6583588719
+ 0.7519513965 0.7217727900 0.6597481966
+ 0.7527915835 0.7227191925 0.6611062288
+ 0.7536318898 0.7236654758 0.6624572873
+ 0.7544720769 0.7246118784 0.6638084054
+ 0.7553123236 0.7255582809 0.6651595235
+ 0.7561525106 0.7265046835 0.6665105820
+ 0.7569928169 0.7274510860 0.6678617001
+ 0.7578330040 0.7283974886 0.6692128181
+ 0.7586731911 0.7293438911 0.6705474854
+ 0.7595134974 0.7302786708 0.6718593836
+ 0.7603362203 0.7311872244 0.6731712818
+ 0.7611348033 0.7320957184 0.6744831800
+ 0.7619335055 0.7330042124 0.6757950187
+ 0.7627320886 0.7339128256 0.6771069169
+ 0.7635306716 0.7348213196 0.6784188151
+ 0.7643293738 0.7357298136 0.6797307134
+ 0.7651280165 0.7366383076 0.6810106039
+ 0.7659267187 0.7375468016 0.6822822094
+ 0.7667253017 0.7384554148 0.6835538149
+ 0.7675240040 0.7393639088 0.6848254800
+ 0.7683225870 0.7402610779 0.6860970855
+ 0.7691212296 0.7411319017 0.6873686910
+ 0.7699198723 0.7420026064 0.6886402965
+ 0.7706819177 0.7428733706 0.6899120212
+ 0.7714399099 0.7437440753 0.6911451221
+ 0.7721979022 0.7446148992 0.6923754811
+ 0.7729557753 0.7454857230 0.6936057806
+ 0.7737138271 0.7463564277 0.6948360801
+ 0.7744718194 0.7472271919 0.6960663795
+ 0.7752296925 0.7480978966 0.6972966790
+ 0.7759876847 0.7489687204 0.6985270977
+ 0.7767456770 0.7498394847 0.6997573972
+ 0.7775036097 0.7506796122 0.7009537816
+ 0.7782616019 0.7515128255 0.7021418214
+ 0.7790195942 0.7523460984 0.7033298016
+ 0.7797775269 0.7531793118 0.7045179009
+ 0.7805075049 0.7540125847 0.7057058811
+ 0.7812259197 0.7548457980 0.7068939209
+ 0.7819442153 0.7556790113 0.7080820203
+ 0.7826625705 0.7565122843 0.7092700005
+ 0.7833809257 0.7573454976 0.7104414105
+ 0.7840992808 0.7581787705 0.7115862966
+ 0.7848175764 0.7590119839 0.7127311826
+ 0.7855359912 0.7598451972 0.7138760090
+ 0.7862542868 0.7606481910 0.7150208950
+ 0.7869727015 0.7614442706 0.7161657810
+ 0.7876909971 0.7622404099 0.7173107266
+ 0.7884094119 0.7630366087 0.7184554935
+ 0.7891278267 0.7638326883 0.7196003795
+ 0.7898461223 0.7646288276 0.7207167149
+ 0.7905343175 0.7654249072 0.7218176723
+ 0.7912142277 0.7662209868 0.7229186893
+ 0.7918941975 0.7670171261 0.7240195870
+ 0.7925741076 0.7678132057 0.7251206040
+ 0.7932540178 0.7686092854 0.7262216210
+ 0.7939339876 0.7694054246 0.7273225784
+ 0.7946138978 0.7701922059 0.7284234762
+ 0.7952939272 0.7709516883 0.7295244932
+ 0.7959737778 0.7717111707 0.7306001782
+ 0.7966536880 0.7724707127 0.7316566706
+ 0.7973337173 0.7732301950 0.7327132821
+ 0.7980136275 0.7739896774 0.7337697744
+ 0.7986935973 0.7747492194 0.7348263264
+ 0.7993735075 0.7755087018 0.7358828187
+ 0.8000504971 0.7762681842 0.7369393110
+ 0.8006933928 0.7770277262 0.7379958034
+ 0.8013362288 0.7777872086 0.7390522957
+ 0.8019790053 0.7785466909 0.7401041985
+ 0.8026219010 0.7793061733 0.7411159277
+ 0.8032646775 0.7800626159 0.7421275973
+ 0.8039075732 0.7807862163 0.7431393266
+ 0.8045504093 0.7815096974 0.7441509962
+ 0.8051931858 0.7822332978 0.7451627254
+ 0.8058360815 0.7829567790 0.7461743951
+ 0.8064789176 0.7836803794 0.7471861243
+ 0.8071216941 0.7844039202 0.7481977940
+ 0.8077645898 0.7851275206 0.7492095232
+ 0.8084074259 0.7858511209 0.7502114177
+ 0.8090502024 0.7865746021 0.7511780858
+ 0.8096930981 0.7872982025 0.7521448731
+ 0.8103172779 0.7880216837 0.7531116009
+ 0.8109244108 0.7887452841 0.7540783286
+ 0.8115314841 0.7894688249 0.7550451159
+ 0.8121386766 0.7901830077 0.7560117841
+ 0.8127458096 0.7908713818 0.7569785714
+ 0.8133528829 0.7915598154 0.7579452991
+ 0.8139600754 0.7922481894 0.7589120269
+ 0.8145672083 0.7929366231 0.7598788142
+ 0.8151742816 0.7936249971 0.7608063221
+ 0.8157814145 0.7943133712 0.7617281079
+ 0.8163886070 0.7950018048 0.7626500130
+ 0.8169956803 0.7956901193 0.7635719180
+ 0.8176028132 0.7963784933 0.7644938231
+ 0.8182100058 0.7970669270 0.7654156089
+ 0.8188170791 0.7977553010 0.7663375139
+ 0.8194242120 0.7984436750 0.7672594190
+ 0.8200296164 0.7991321087 0.7681813240
+ 0.8206024766 0.7998204827 0.7691031098
+ 0.8211753964 0.8004835248 0.7700238228
+ 0.8217483163 0.8011376858 0.7709010839
+ 0.8223211169 0.8017917871 0.7717785239
+ 0.8228939772 0.8024458885 0.7726557851
+ 0.8234668970 0.8030999899 0.7735331059
+ 0.8240398169 0.8037540913 0.7744104862
+ 0.8246126771 0.8044083118 0.7752878070
+ 0.8251855969 0.8050624132 0.7761651278
+ 0.8257585168 0.8057165146 0.7770425081
+ 0.8263313770 0.8063706160 0.7779198289
+ 0.8269041777 0.8070247173 0.7787970901
+ 0.8274770975 0.8076788187 0.7796744704
+ 0.8280500174 0.8083329797 0.7805240750
+ 0.8286228776 0.8089870811 0.7813575268
+ 0.8291957974 0.8096411824 0.7821907997
+ 0.8297687173 0.8102803230 0.7830241919
+ 0.8303220272 0.8109011054 0.7838575244
+ 0.8308622241 0.8115220070 0.7846909165
+ 0.8314023018 0.8121427894 0.7855241895
+ 0.8319424987 0.8127635717 0.7863575816
+ 0.8324825764 0.8133844733 0.7871909142
+ 0.8330227733 0.8140053153 0.7880243063
+ 0.8335629106 0.8146260977 0.7888575792
+ 0.8341031075 0.8152469993 0.7896909714
+ 0.8346431851 0.8158677816 0.7904971242
+ 0.8351833820 0.8164886236 0.7912873030
+ 0.8357235193 0.8171095252 0.7920774221
+ 0.8362637162 0.8177303076 0.7928674817
+ 0.8368037939 0.8183512092 0.7936577201
+ 0.8373439908 0.8189719915 0.7944477797
+ 0.8378841281 0.8195927739 0.7952378988
+ 0.8384243250 0.8202025890 0.7960280776
+ 0.8389644027 0.8207911849 0.7968181968
+ 0.8395045996 0.8213797808 0.7976083159
+ 0.8400421143 0.8219683766 0.7983984947
+ 0.8405510783 0.8225570917 0.7991886139
+ 0.8410599828 0.8231456876 0.7999786735
+ 0.8415690064 0.8237342834 0.8007277846
+ 0.8420779109 0.8243228793 0.8014757037
+ 0.8425868154 0.8249114752 0.8022235036
+ 0.8430957794 0.8255001903 0.8029714227
+ 0.8436046839 0.8260887861 0.8037192822
+ 0.8441137075 0.8266773820 0.8044672012
+ 0.8446226120 0.8272659779 0.8052151203
+ 0.8451315165 0.8278546929 0.8059629798
+ 0.8456404805 0.8284432888 0.8067108989
+ 0.8461493850 0.8290318847 0.8074588180
+ 0.8466584086 0.8296204805 0.8082066774
+ 0.8471673131 0.8301981091 0.8089544773
+ 0.8476762176 0.8307555914 0.8097023964
+ 0.8481851816 0.8313131928 0.8104255795
+ 0.8486940861 0.8318706751 0.8111323714
+ 0.8492031097 0.8324282765 0.8118392229
+ 0.8497120142 0.8329858184 0.8125458956
+ 0.8502081037 0.8335434198 0.8132526875
+ 0.8506873250 0.8341009021 0.8139594793
+ 0.8511666059 0.8346583843 0.8146662712
+ 0.8516458869 0.8352159858 0.8153731227
+ 0.8521251082 0.8357735276 0.8160799146
+ 0.8526043892 0.8363311291 0.8167867064
+ 0.8530836105 0.8368886113 0.8174934983
+ 0.8535628915 0.8374462128 0.8182002902
+ 0.8540421724 0.8380036950 0.8189070821
+ 0.8545213938 0.8385611773 0.8196138144
+ 0.8550006747 0.8391187787 0.8203026056
+ 0.8554800153 0.8396763206 0.8209695816
+ 0.8559591770 0.8402212858 0.8216364980
+ 0.8564385176 0.8407490253 0.8223034739
+ 0.8569177985 0.8412765861 0.8229705095
+ 0.8573970199 0.8418043256 0.8236374855
+ 0.8578763008 0.8423318863 0.8243045211
+ 0.8583555818 0.8428596258 0.8249714971
+ 0.8588348031 0.8433871865 0.8256384730
+ 0.8593140841 0.8439149261 0.8263055086
+ 0.8597934246 0.8444424868 0.8269724846
+ 0.8602566123 0.8449702263 0.8276394010
+ 0.8607078195 0.8454977870 0.8283063769
+ 0.8611589074 0.8460255265 0.8289734125
+ 0.8616099954 0.8465530872 0.8296403885
+ 0.8620610833 0.8470808268 0.8302897215
+ 0.8625121713 0.8476083875 0.8309183121
+ 0.8629633784 0.8481361270 0.8315469027
+ 0.8634145260 0.8486636877 0.8321754932
+ 0.8638656139 0.8491914272 0.8328040838
+ 0.8643167019 0.8497189879 0.8334327936
+ 0.8647677898 0.8502333164 0.8340613842
+ 0.8652189970 0.8507323265 0.8346899748
+ 0.8656700850 0.8512312174 0.8353186250
+ 0.8661211729 0.8517302275 0.8359472156
+ 0.8665723205 0.8522291780 0.8365758061
+ 0.8670234084 0.8527281880 0.8372043967
+ 0.8674746156 0.8532270789 0.8378329873
+ 0.8679257035 0.8537260890 0.8384615779
+ 0.8683767915 0.8542250991 0.8390902281
+ 0.8688278794 0.8547241092 0.8397188783
+ 0.8692790270 0.8552231193 0.8403270841
+ 0.8697301745 0.8557220101 0.8409187794
+ 0.8701705933 0.8562210202 0.8415105939
+ 0.8705950975 0.8567199707 0.8421024084
+ 0.8710194826 0.8572189808 0.8426941037
+ 0.8714439869 0.8577179909 0.8432859182
+ 0.8718684912 0.8582168818 0.8438776135
+ 0.8722929955 0.8587158918 0.8444694281
+ 0.8727173805 0.8592149019 0.8450611234
+ 0.8731418848 0.8597139120 0.8456528783
+ 0.8735663891 0.8602011204 0.8462445736
+ 0.8739908934 0.8606727123 0.8468363881
+ 0.8744153976 0.8611443043 0.8474280834
+ 0.8748397827 0.8616157770 0.8480198979
+ 0.8752642870 0.8620874286 0.8486115932
+ 0.8756887913 0.8625589013 0.8492034078
+ 0.8761132956 0.8630304933 0.8497951031
+ 0.8765377998 0.8635020256 0.8503637910
+ 0.8769621849 0.8639736176 0.8509203196
+ 0.8773866892 0.8644450903 0.8514767885
+ 0.8778111935 0.8649166822 0.8520333171
+ 0.8782356977 0.8653882146 0.8525897861
+ 0.8786600828 0.8658598065 0.8531463146
+ 0.8790845871 0.8663312793 0.8537027836
+ 0.8795090914 0.8668028712 0.8542593122
+ 0.8799335957 0.8672744036 0.8548157811
+ 0.8803368211 0.8677459955 0.8553723097
+ 0.8807361126 0.8682175279 0.8559287786
+ 0.8811354041 0.8686891198 0.8564853072
+ 0.8815348148 0.8691605926 0.8570417166
+ 0.8819341063 0.8696321845 0.8575981855
+ 0.8823333979 0.8700979948 0.8581547141
+ 0.8827326894 0.8705433011 0.8587111831
+ 0.8831319809 0.8709887266 0.8592677116
+ 0.8835312724 0.8714340925 0.8598241806
+ 0.8839306235 0.8718795180 0.8603577018
+ 0.8843299150 0.8723248839 0.8608806133
+ 0.8847292066 0.8727701902 0.8614034057
+ 0.8851284981 0.8732156157 0.8619263172
+ 0.8855277896 0.8736609817 0.8624492288
+ 0.8859272003 0.8741064072 0.8629720211
+ 0.8863264918 0.8745517135 0.8634948730
+ 0.8867257833 0.8749970794 0.8640177846
+ 0.8871250749 0.8754425049 0.8645406961
+ 0.8875244260 0.8758878708 0.8650634885
+ 0.8879237175 0.8763331771 0.8655864000
+ 0.8883230090 0.8767786026 0.8661093116
+ 0.8887223005 0.8772240281 0.8666321039
+ 0.8891215920 0.8776693940 0.8671550155
+ 0.8895208836 0.8781148195 0.8676779270
+ 0.8899201751 0.8785601258 0.8682007790
+ 0.8903005719 0.8790054917 0.8687235713
+ 0.8906760812 0.8794509172 0.8692464828
+ 0.8910517097 0.8798962831 0.8697693944
+ 0.8914272785 0.8803225160 0.8702744246
+ 0.8918027878 0.8807430267 0.8707653284
+ 0.8921784163 0.8811634183 0.8712561727
+ 0.8925539851 0.8815839291 0.8717470765
+ 0.8929294944 0.8820043206 0.8722379804
+ 0.8933051229 0.8824247718 0.8727290034
+ 0.8936806917 0.8828452229 0.8732199073
+ 0.8940562010 0.8832656741 0.8737108111
+ 0.8944318295 0.8836861849 0.8742017150
+ 0.8948073983 0.8841065764 0.8746926188
+ 0.8951830268 0.8845270872 0.8751835227
+ 0.8955584764 0.8849474788 0.8756744862
+ 0.8959341049 0.8853679895 0.8761653900
+ 0.8963096738 0.8857883811 0.8766562939
+ 0.8966851830 0.8862088919 0.8771471977
+ 0.8970608115 0.8866292834 0.8776381016
+ 0.8974363804 0.8870497942 0.8781290054
+ 0.8978118896 0.8874701858 0.8786200285
+ 0.8981875181 0.8878906965 0.8791108727
+ 0.8985630870 0.8883110881 0.8796017766
+ 0.8989385962 0.8887315989 0.8800870180
+ 0.8993142247 0.8891521096 0.8805475831
+ 0.8996897936 0.8895725012 0.8810082078
+ 0.9000614882 0.8899930120 0.8814688921
+ 0.9004147053 0.8903900981 0.8819295168
+ 0.9007679224 0.8907868862 0.8823900819
+ 0.9011210799 0.8911836743 0.8828508258
+ 0.9014742970 0.8915804029 0.8833113909
+ 0.9018275142 0.8919771910 0.8837720156
+ 0.9021806717 0.8923739791 0.8842326999
+ 0.9025338888 0.8927707076 0.8846933246
+ 0.9028872252 0.8931674957 0.8851538897
+ 0.9032403827 0.8935642838 0.8856145740
+ 0.9035935998 0.8939610720 0.8860751987
+ 0.9039468169 0.8943578005 0.8865358233
+ 0.9042999744 0.8947545886 0.8869965076
+ 0.9046531916 0.8951513767 0.8874570727
+ 0.9050064087 0.8955481052 0.8879176974
+ 0.9053596258 0.8959448934 0.8883783221
+ 0.9057129025 0.8963416815 0.8888390064
+ 0.9060661197 0.8967384100 0.8892995715
+ 0.9064192772 0.8971351981 0.8897601962
+ 0.9067724943 0.8975319862 0.8902071118
+ 0.9071257114 0.8979287744 0.8906391263
+ 0.9074789286 0.8983255029 0.8910710812
+ 0.9078320861 0.8987222910 0.8915032148
+ 0.9081853032 0.8991190791 0.8919352293
+ 0.9085385203 0.8995158076 0.8923671842
+ 0.9088917971 0.8999125957 0.8927991986
+ 0.9092450142 0.9002919197 0.8932312131
+ 0.9095981717 0.9006661773 0.8936632276
+ 0.9099513888 0.9010404944 0.8940951824
+ 0.9102864861 0.9014148116 0.8945271969
+ 0.9106187224 0.9017891288 0.8949592113
+ 0.9109507799 0.9021633863 0.8953912258
+ 0.9112830162 0.9025377035 0.8958231807
+ 0.9116151929 0.9029120207 0.8962551951
+ 0.9119474292 0.9032862782 0.8966872096
+ 0.9122796059 0.9036605954 0.8971192241
+ 0.9126117229 0.9040349126 0.8975511789
+ 0.9129438996 0.9044092298 0.8979831934
+ 0.9132760763 0.9047834873 0.8984152079
+ 0.9136083126 0.9051578045 0.8988472223
+ 0.9139404893 0.9055321217 0.8992791772
+ 0.9142726064 0.9059063792 0.8997111917
+ 0.9146047831 0.9062806964 0.9001343250
+ 0.9149370193 0.9066550732 0.9005392790
+ 0.9152691960 0.9070293903 0.9009442925
+ 0.9156013727 0.9074037075 0.9013493061
+ 0.9159336090 0.9077780247 0.9017543197
+ 0.9162657261 0.9081522822 0.9021592736
+ 0.9165979028 0.9085265994 0.9025642872
+ 0.9169300795 0.9089009166 0.9029693007
+ 0.9172623158 0.9092751741 0.9033743143
+ 0.9175944924 0.9096494913 0.9037793279
+ 0.9179266095 0.9100223780 0.9041842818
+ 0.9182587862 0.9103754759 0.9045892954
+ 0.9185910225 0.9107285142 0.9049943089
+ 0.9189231992 0.9110814929 0.9053993225
+ 0.9192553759 0.9114345908 0.9058042765
+ 0.9195876122 0.9117876291 0.9062092900
+ 0.9199197292 0.9121406078 0.9066143036
+ 0.9202368855 0.9124937057 0.9070193172
+ 0.9205493927 0.9128466845 0.9074242711
+ 0.9208617806 0.9131997228 0.9078292847
+ 0.9211742282 0.9135528207 0.9082342982
+ 0.9214866161 0.9139057994 0.9086393118
+ 0.9217990041 0.9142587781 0.9090443254
+ 0.9221115112 0.9146118760 0.9094492793
+ 0.9224238992 0.9149649143 0.9098542929
+ 0.9227362871 0.9153178930 0.9102429748
+ 0.9230486751 0.9156708717 0.9106225967
+ 0.9233611822 0.9160240293 0.9110022187
+ 0.9236736298 0.9163770080 0.9113817811
+ 0.9239860177 0.9167299867 0.9117614031
+ 0.9242984056 0.9170830846 0.9121410251
+ 0.9246109128 0.9174361229 0.9125205874
+ 0.9249233007 0.9177891016 0.9129002094
+ 0.9252356887 0.9181421995 0.9132797122
+ 0.9255480766 0.9184951782 0.9136592746
+ 0.9258605242 0.9188482165 0.9140388966
+ 0.9261729717 0.9192013144 0.9144185185
+ 0.9264854193 0.9195542932 0.9147980809
+ 0.9267978072 0.9199072719 0.9151777029
+ 0.9271101952 0.9202455282 0.9155573249
+ 0.9274227023 0.9205784202 0.9159368873
+ 0.9277350903 0.9209113121 0.9163165092
+ 0.9280474782 0.9212443233 0.9166960120
+ 0.9283599257 0.9215772152 0.9170755744
+ 0.9286723137 0.9219101071 0.9174551964
+ 0.9289848208 0.9222429991 0.9178348184
+ 0.9292972088 0.9225758910 0.9182143807
+ 0.9296095967 0.9229087830 0.9185940027
+ 0.9299219847 0.9232416749 0.9189736247
+ 0.9302204847 0.9235746861 0.9193531871
+ 0.9305143952 0.9239075780 0.9197328091
+ 0.9308083057 0.9242405295 0.9201052785
+ 0.9311022162 0.9245734215 0.9204609990
+ 0.9313960075 0.9249063134 0.9208167195
+ 0.9316899180 0.9252392054 0.9211723804
+ 0.9319838285 0.9255720973 0.9215281010
+ 0.9322776794 0.9259051085 0.9218838215
+ 0.9325714707 0.9262380004 0.9222394824
+ 0.9328653812 0.9265708923 0.9225953221
+ 0.9331592917 0.9269037843 0.9229509830
+ 0.9334532022 0.9272366762 0.9233067036
+ 0.9337469935 0.9275696278 0.9236624241
+ 0.9340409040 0.9279025197 0.9240180850
+ 0.9343348145 0.9282354712 0.9243738055
+ 0.9346287251 0.9285684228 0.9247295260
+ 0.9349225163 0.9289013147 0.9250851870
+ 0.9352164268 0.9292342067 0.9254410267
+ 0.9355102777 0.9295670986 0.9257966876
+ 0.9358041286 0.9298999906 0.9261524081
+ 0.9360979795 0.9302197099 0.9265081286
+ 0.9363918900 0.9305335879 0.9268637896
+ 0.9366858006 0.9308475256 0.9272195101
+ 0.9369795918 0.9311614037 0.9275751710
+ 0.9372735023 0.9314752817 0.9279308915
+ 0.9375674129 0.9317892194 0.9282866120
+ 0.9378613234 0.9321032166 0.9286423922
+ 0.9381551147 0.9324170947 0.9289981127
+ 0.9384490252 0.9327309728 0.9293537736
+ 0.9387428761 0.9330449104 0.9297094941
+ 0.9390367866 0.9333587885 0.9300611019
+ 0.9393305779 0.9336727262 0.9303944111
+ 0.9396244884 0.9339867234 0.9307277203
+ 0.9399183989 0.9343006015 0.9310610294
+ 0.9401996732 0.9346144795 0.9313942790
+ 0.9404761791 0.9349284172 0.9317277074
+ 0.9407526851 0.9352422953 0.9320610166
+ 0.9410290718 0.9355561733 0.9323943257
+ 0.9413055778 0.9358701706 0.9327275753
+ 0.9415820837 0.9361841083 0.9330608845
+ 0.9418585896 0.9364979863 0.9333941936
+ 0.9421349764 0.9368119240 0.9337275028
+ 0.9424114823 0.9371258020 0.9340608120
+ 0.9426879883 0.9374397993 0.9343941808
+ 0.9429644942 0.9377536774 0.9347274899
+ 0.9432408810 0.9380676150 0.9350607991
+ 0.9435173869 0.9383814931 0.9353941083
+ 0.9437938929 0.9386953712 0.9357274175
+ 0.9440703988 0.9390093088 0.9360607266
+ 0.9443467855 0.9393233061 0.9363939762
+ 0.9446232915 0.9396371841 0.9367272854
+ 0.9448997974 0.9399511218 0.9370607138
+ 0.9451763034 0.9402499199 0.9373940229
+ 0.9454526901 0.9405459166 0.9377272725
+ 0.9457291961 0.9408419132 0.9380605817
+ 0.9460057020 0.9411379099 0.9383938909
+ 0.9462822080 0.9414339066 0.9387272000
+ 0.9465587139 0.9417299032 0.9390605092
+ 0.9468351007 0.9420258999 0.9393938780
+ 0.9471116066 0.9423218966 0.9397271872
+ 0.9473881125 0.9426178932 0.9400566816
+ 0.9476646185 0.9429138899 0.9403690100
+ 0.9479410052 0.9432098269 0.9406812787
+ 0.9482175112 0.9435058236 0.9409937263
+ 0.9484940171 0.9438018203 0.9413059950
+ 0.9487705231 0.9440978169 0.9416183233
+ 0.9490469098 0.9443938136 0.9419305921
+ 0.9493234158 0.9446898103 0.9422429800
+ 0.9495999217 0.9449858069 0.9425553083
+ 0.9498764277 0.9452818036 0.9428675771
+ 0.9501438141 0.9455778003 0.9431800246
+ 0.9504039884 0.9458737969 0.9434922934
+ 0.9506642222 0.9461697936 0.9438046217
+ 0.9509242773 0.9464657903 0.9441168904
+ 0.9511845112 0.9467617869 0.9444292784
+ 0.9514446855 0.9470577836 0.9447416067
+ 0.9517048001 0.9473537803 0.9450538754
+ 0.9519649744 0.9476497769 0.9453663230
+ 0.9522252083 0.9479457736 0.9456785917
+ 0.9524853230 0.9482417703 0.9459909201
+ 0.9527454972 0.9485378265 0.9463031888
+ 0.9530056715 0.9488338232 0.9466155767
+ 0.9532657862 0.9491298199 0.9469279051
+ 0.9535260201 0.9494258165 0.9472401738
+ 0.9537861943 0.9497218132 0.9475526214
+ 0.9540463090 0.9500167966 0.9478648901
+ 0.9543064833 0.9502959251 0.9481772184
+ 0.9545667171 0.9505749941 0.9484894872
+ 0.9548268914 0.9508541226 0.9488018751
+ 0.9550870061 0.9511331916 0.9491142035
+ 0.9553471804 0.9514123201 0.9494264722
+ 0.9556074142 0.9516913891 0.9497389197
+ 0.9558675289 0.9519705176 0.9500480294
+ 0.9561277032 0.9522495866 0.9503406882
+ 0.9563878775 0.9525287747 0.9506334066
+ 0.9566479921 0.9528079033 0.9509260058
+ 0.9569082260 0.9530869722 0.9512187243
+ 0.9571684003 0.9533661008 0.9515113831
+ 0.9574285150 0.9536452293 0.9518041015
+ 0.9576886892 0.9539242983 0.9520968199
+ 0.9579489231 0.9542034268 0.9523894787
+ 0.9582089782 0.9544824958 0.9526821971
+ 0.9584692121 0.9547616243 0.9529749155
+ 0.9587293863 0.9550406933 0.9532675743
+ 0.9589895010 0.9553198814 0.9535602927
+ 0.9592496753 0.9555990100 0.9538530111
+ 0.9595099092 0.9558780789 0.9541457295
+ 0.9597700238 0.9561572075 0.9544383883
+ 0.9600284100 0.9564362764 0.9547309875
+ 0.9602733254 0.9567154050 0.9550237060
+ 0.9605181813 0.9569944739 0.9553164244
+ 0.9607630968 0.9572736025 0.9556090832
+ 0.9610080123 0.9575526714 0.9559018016
+ 0.9612529278 0.9578318000 0.9561945200
+ 0.9614977837 0.9581109881 0.9564871788
+ 0.9617425799 0.9583901167 0.9567798972
+ 0.9619874954 0.9586691856 0.9570726156
+ 0.9622324109 0.9589483142 0.9573652744
+ 0.9624773264 0.9592273831 0.9576579928
+ 0.9627221823 0.9595065117 0.9579507113
+ 0.9629670978 0.9597855806 0.9582434297
+ 0.9632120132 0.9600610137 0.9585360885
+ 0.9634569287 0.9603242278 0.9588286877
+ 0.9637017846 0.9605875015 0.9591214061
+ 0.9639465809 0.9608507156 0.9594141245
+ 0.9641914964 0.9611139297 0.9597067833
+ 0.9644364119 0.9613770843 0.9599995017
+ 0.9646813273 0.9616402984 0.9602739215
+ 0.9649261832 0.9619035125 0.9605482221
+ 0.9651710987 0.9621667266 0.9608225226
+ 0.9654160142 0.9624298811 0.9610968828
+ 0.9656609297 0.9626930952 0.9613711834
+ 0.9659057260 0.9629563093 0.9616456032
+ 0.9661505818 0.9632195830 0.9619199038
+ 0.9663954973 0.9634827971 0.9621942043
+ 0.9666404128 0.9637460113 0.9624686241
+ 0.9668853283 0.9640092254 0.9627429247
+ 0.9671301842 0.9642723799 0.9630172253
+ 0.9673750997 0.9645355940 0.9632915854
+ 0.9676200151 0.9647988081 0.9635658860
+ 0.9678648114 0.9650620222 0.9638401866
+ 0.9681097269 0.9653251767 0.9641146064
+ 0.9683545828 0.9655883908 0.9643889070
+ 0.9685994983 0.9658517241 0.9646632075
+ 0.9688444138 0.9661148787 0.9649376273
+ 0.9690893292 0.9663780928 0.9652119279
+ 0.9693341851 0.9666413069 0.9654862285
+ 0.9695791006 0.9669045210 0.9657605886
+ 0.9698240161 0.9671676755 0.9660348892
+ 0.9700648189 0.9674308896 0.9663093090
+ 0.9702954292 0.9676941037 0.9665836096
+ 0.9705259800 0.9679573178 0.9668579102
+ 0.9707565904 0.9682204723 0.9671322703
+ 0.9709870815 0.9684838057 0.9674065709
+ 0.9712176919 0.9687470198 0.9676808715
+ 0.9714483023 0.9690101743 0.9679552913
+ 0.9716789126 0.9692733884 0.9682295918
+ 0.9719094038 0.9695366025 0.9685038924
+ 0.9721400142 0.9697998166 0.9687783122
+ 0.9723706245 0.9700593948 0.9690526128
+ 0.9726011753 0.9703077078 0.9693269134
+ 0.9728317857 0.9705559015 0.9696012735
+ 0.9730622768 0.9708042145 0.9698755741
+ 0.9732928872 0.9710524082 0.9701405764
+ 0.9735234976 0.9713007212 0.9703977704
+ 0.9737541080 0.9715489149 0.9706549048
+ 0.9739845991 0.9717972279 0.9709120989
+ 0.9742152095 0.9720454216 0.9711692929
+ 0.9744458199 0.9722936749 0.9714264870
+ 0.9746763706 0.9725419283 0.9716836810
+ 0.9749069810 0.9727901816 0.9719408751
+ 0.9751374722 0.9730383754 0.9721981287
+ 0.9753680825 0.9732866883 0.9724552035
+ 0.9755986929 0.9735348821 0.9727123976
+ 0.9758293033 0.9737831950 0.9729695916
+ 0.9760597944 0.9740313888 0.9732267857
+ 0.9762904048 0.9742797017 0.9734839797
+ 0.9765210152 0.9745278955 0.9737411737
+ 0.9767516255 0.9747762084 0.9739984274
+ 0.9769821763 0.9750244021 0.9742556214
+ 0.9772127271 0.9752727151 0.9745126963
+ 0.9774432778 0.9755209088 0.9747698903
+ 0.9776738882 0.9757692218 0.9750270844
+ 0.9779044986 0.9760174155 0.9752842784
+ 0.9781349897 0.9762657285 0.9755414724
+ 0.9783656001 0.9765139222 0.9757987261
+ 0.9785962105 0.9767621756 0.9760559201
+ 0.9788268209 0.9770104885 0.9763129950
+ 0.9790573716 0.9772586823 0.9765701890
+ 0.9792879224 0.9775069952 0.9768273830
+ 0.9795184731 0.9777551889 0.9770845771
+ 0.9797490835 0.9780035019 0.9773417711
+ 0.9799796939 0.9782516956 0.9775990248
+ 0.9801980257 0.9785000086 0.9778562188
+ 0.9804152250 0.9787482023 0.9781134129
+ 0.9806324244 0.9789965153 0.9783704877
+ 0.9808496237 0.9792447090 0.9786276817
+ 0.9810667038 0.9794930220 0.9788848758
+ 0.9812839031 0.9797412157 0.9791421294
+ 0.9815011024 0.9799895287 0.9793993235
+ 0.9817183018 0.9802241921 0.9796565175
+ 0.9819355011 0.9804583788 0.9799137115
+ 0.9821525812 0.9806926250 0.9801601768
+ 0.9823697805 0.9809268117 0.9804013968
+ 0.9825869799 0.9811609983 0.9806426167
+ 0.9828041792 0.9813951850 0.9808837175
+ 0.9830213785 0.9816293120 0.9811248779
+ 0.9832385182 0.9818634987 0.9813660979
+ 0.9834557176 0.9820976853 0.9816073179
+ 0.9836729169 0.9823318720 0.9818484783
+ 0.9838901162 0.9825661182 0.9820895791
+ 0.9841073155 0.9828003049 0.9823307991
+ 0.9843243957 0.9830343723 0.9825720191
+ 0.9845415950 0.9832686186 0.9828131795
+ 0.9847587943 0.9835028052 0.9830542803
+ 0.9849759936 0.9837369919 0.9832955003
+ 0.9851931930 0.9839711785 0.9835367203
+ 0.9854102731 0.9842054248 0.9837778807
+ 0.9856274724 0.9844396114 0.9840189815
+ 0.9858446717 0.9846736789 0.9842602015
+ 0.9860618711 0.9849079251 0.9845014215
+ 0.9862790108 0.9851421118 0.9847425818
+ 0.9864962101 0.9853762984 0.9849838018
+ 0.9867134094 0.9856104851 0.9852249026
+ 0.9869306087 0.9858446717 0.9854661226
+ 0.9871478081 0.9860787988 0.9857072830
+ 0.9873648882 0.9863129854 0.9859485030
+ 0.9875820875 0.9865471721 0.9861896038
+ 0.9877992868 0.9867814183 0.9864308238
+ 0.9880164862 0.9870156050 0.9866719842
+ 0.9882336855 0.9872497916 0.9869132042
+ 0.9884508252 0.9874839783 0.9871544242
+ 0.9886680245 0.9877181053 0.9873955250
+ 0.9888852239 0.9879522920 0.9876366854
+ 0.9891024232 0.9881864786 0.9878779054
+ 0.9893196225 0.9884207249 0.9881191254
+ 0.9895367026 0.9886549115 0.9883602262
+ 0.9897539020 0.9888890982 0.9886013865
+ 0.9899711013 0.9891232252 0.9888426065
+ 0.9901773930 0.9893574119 0.9890838265
+ 0.9903820157 0.9895915985 0.9893249273
+ 0.9905866981 0.9898257852 0.9895660877
+ 0.9907913208 0.9900565743 0.9898073077
+ 0.9909960032 0.9902775884 0.9900454879
+ 0.9912006259 0.9904984832 0.9902716875
+ 0.9914051890 0.9907194972 0.9904980063
+ 0.9916098714 0.9909405112 0.9907242060
+ 0.9918144941 0.9911614060 0.9909504056
+ 0.9920191169 0.9913824201 0.9911767244
+ 0.9922237992 0.9916033149 0.9914029241
+ 0.9924284220 0.9918243289 0.9916291833
+ 0.9926331043 0.9920452833 0.9918553829
+ 0.9928377271 0.9922661781 0.9920815825
+ 0.9930422902 0.9924871922 0.9923079014
+ 0.9932469726 0.9927082062 0.9925341010
+ 0.9934515953 0.9929291010 0.9927603006
+ 0.9936562181 0.9931501150 0.9929866195
+ 0.9938609004 0.9933711290 0.9932128191
+ 0.9940655231 0.9935920238 0.9934390783
+ 0.9942702055 0.9938129783 0.9936652780
+ 0.9944748282 0.9940339923 0.9938914776
+ 0.9946793914 0.9942548871 0.9941177964
+ 0.9948840737 0.9944759011 0.9943439960
+ 0.9950886965 0.9946967959 0.9945703149
+ 0.9952933192 0.9949178100 0.9947965145
+ 0.9954980016 0.9951388240 0.9950227141
+ 0.9957026243 0.9953597188 0.9952489734
+ 0.9959073067 0.9955806732 0.9954751730
+ 0.9961119294 0.9958016872 0.9957014918
+ 0.9963164926 0.9960225821 0.9959276915
+ 0.9965211749 0.9962435961 0.9961538911
+ 0.9967257977 0.9964646101 0.9963802099
+ 0.9969304204 0.9966855049 0.9966064095
+ 0.9971351027 0.9969065189 0.9968327284
+ 0.9973397255 0.9971274734 0.9970589280
+ 0.9975444078 0.9973484278 0.9972851276
+ 0.9977489710 0.9975693822 0.9975113869
+ 0.9979535937 0.9977903962 0.9977375865
+ 0.9981582761 0.9980112910 0.9979637861
+ 0.9983628988 0.9982323050 0.9981901050
+ 0.9985675216 0.9984531999 0.9984163046
+ 0.9987722039 0.9986742139 0.9986426234
+ 0.9989768267 0.9988952279 0.9988688231
+ 0.9991815090 0.9991161227 0.9990950227
+ 0.9993860722 0.9993370771 0.9993212819
+ 0.9995906949 0.9995580912 0.9995474815
+ 0.9997953773 0.9997789860 0.9997738004
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/kodak_ektachrome_100.spi1d b/release/datafiles/colormanagement/luts/film_response/kodak_ektachrome_100.spi1d
new file mode 100644
index 00000000000..f78872faaf9
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/kodak_ektachrome_100.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0004029108 0.0002821621 0.0001828344
+ 0.0008352380 0.0005855577 0.0003765924
+ 0.0012884660 0.0009102127 0.0005832637
+ 0.0017661640 0.0012608080 0.0008021335
+ 0.0022727679 0.0016344450 0.0010323920
+ 0.0028016400 0.0020279640 0.0012744220
+ 0.0033602209 0.0024469071 0.0015256481
+ 0.0039473702 0.0028940800 0.0017888939
+ 0.0045624170 0.0033709989 0.0020655000
+ 0.0052064499 0.0038755860 0.0023565269
+ 0.0058913450 0.0044098911 0.0026614380
+ 0.0066106170 0.0049738358 0.0029808299
+ 0.0073703690 0.0055717099 0.0033126650
+ 0.0081646843 0.0062076761 0.0036578199
+ 0.0090046516 0.0068754591 0.0040169759
+ 0.0098797111 0.0075756288 0.0043923021
+ 0.0108015500 0.0083136391 0.0047826152
+ 0.0117765898 0.0090896897 0.0051890090
+ 0.0128089404 0.0099051362 0.0056110788
+ 0.0138962502 0.0107623404 0.0060491539
+ 0.0150366900 0.0116626900 0.0065042591
+ 0.0162367094 0.0126068601 0.0069758608
+ 0.0174948201 0.0135949403 0.0074637011
+ 0.0188118201 0.0146293398 0.0079666628
+ 0.0201881006 0.0157077797 0.0084832394
+ 0.0216275994 0.0168280900 0.0090179667
+ 0.0231346209 0.0179986991 0.0095704449
+ 0.0247129407 0.0192209203 0.0101442495
+ 0.0263695195 0.0204982292 0.0107389204
+ 0.0280960202 0.0218272507 0.0113510201
+ 0.0298976302 0.0232012607 0.0119804395
+ 0.0317782089 0.0246255603 0.0126269804
+ 0.0337512381 0.0260962192 0.0132909399
+ 0.0358026214 0.0276108794 0.0139709497
+ 0.0379312597 0.0291825198 0.0146665303
+ 0.0401499309 0.0308093708 0.0153818596
+ 0.0424532183 0.0324951895 0.0161184706
+ 0.0448440388 0.0342448987 0.0168759096
+ 0.0473214611 0.0360610783 0.0176607408
+ 0.0498819388 0.0379341505 0.0184673797
+ 0.0525423586 0.0398601405 0.0192978401
+ 0.0553006493 0.0418499894 0.0201489609
+ 0.0581430085 0.0438929684 0.0210218206
+ 0.0610603690 0.0459916182 0.0219117906
+ 0.0640591532 0.0481535792 0.0228250604
+ 0.0671426877 0.0503738187 0.0237576701
+ 0.0703096837 0.0526381992 0.0247094091
+ 0.0735653490 0.0549571402 0.0256804898
+ 0.0769181773 0.0573286191 0.0266711209
+ 0.0803592205 0.0597677194 0.0276827496
+ 0.0838969871 0.0622712001 0.0287114196
+ 0.0875223130 0.0648275465 0.0297578406
+ 0.0912306681 0.0674386173 0.0308247507
+ 0.0950332806 0.0701159835 0.0319116488
+ 0.0989207476 0.0728433207 0.0330191404
+ 0.1029006988 0.0756310001 0.0341475010
+ 0.1069691032 0.0784748793 0.0352968313
+ 0.1111252010 0.0813758895 0.0364708304
+ 0.1153606027 0.0843334123 0.0376655087
+ 0.1196606010 0.0873407498 0.0388817117
+ 0.1240456998 0.0903989002 0.0401183404
+ 0.1285089999 0.0934979469 0.0413741618
+ 0.1330395043 0.0966412276 0.0426500700
+ 0.1376578957 0.0998382494 0.0439491197
+ 0.1423473954 0.1030810028 0.0452704318
+ 0.1471080929 0.1063693017 0.0466123708
+ 0.1519421935 0.1097078994 0.0479735583
+ 0.1568460017 0.1131009012 0.0493564717
+ 0.1618086994 0.1165459007 0.0507622100
+ 0.1668350995 0.1200487018 0.0521893688
+ 0.1719325930 0.1235952005 0.0536371209
+ 0.1770922989 0.1271920949 0.0551049188
+ 0.1823212057 0.1308318973 0.0565952100
+ 0.1875973940 0.1345200986 0.0581106283
+ 0.1929260045 0.1382502019 0.0596516207
+ 0.1983052045 0.1420248002 0.0612149313
+ 0.2037338018 0.1458451003 0.0627992302
+ 0.2092058957 0.1496911049 0.0644068494
+ 0.2147053927 0.1535611004 0.0660389215
+ 0.2202475965 0.1574510038 0.0676914304
+ 0.2258259058 0.1613723040 0.0693570822
+ 0.2314376980 0.1653227061 0.0710399523
+ 0.2370904982 0.1692909002 0.0727412999
+ 0.2427740991 0.1732849032 0.0744594336
+ 0.2484734952 0.1773027033 0.0761927664
+ 0.2541978061 0.1813420951 0.0779421404
+ 0.2599338889 0.1854172051 0.0797097385
+ 0.2656922042 0.1895329952 0.0814976320
+ 0.2714639008 0.1936807036 0.0833064169
+ 0.2772484124 0.1978671998 0.0851336494
+ 0.2830584943 0.2020945996 0.0869752765
+ 0.2888925076 0.2063394040 0.0888287425
+ 0.2947472036 0.2105993927 0.0906959027
+ 0.3006064892 0.2148775011 0.0925794691
+ 0.3064776063 0.2191728055 0.0944826677
+ 0.3123730123 0.2234859020 0.0964089409
+ 0.3182818890 0.2278206050 0.0983487070
+ 0.3241820931 0.2321731001 0.1003040969
+ 0.3300934136 0.2365338057 0.1022775024
+ 0.3360261023 0.2409182042 0.1042753011
+ 0.3419634998 0.2453251928 0.1062982008
+ 0.3478932977 0.2497422993 0.1083303019
+ 0.3538097143 0.2541579902 0.1103701964
+ 0.3597145975 0.2585824132 0.1124206036
+ 0.3656162918 0.2630195916 0.1144891009
+ 0.3715220988 0.2674663961 0.1165636033
+ 0.3774074912 0.2719157040 0.1186439022
+ 0.3832853138 0.2763611078 0.1207353026
+ 0.3891583085 0.2808066010 0.1228388026
+ 0.3950240016 0.2852618098 0.1249521971
+ 0.4008567035 0.2897278070 0.1270755976
+ 0.4066801071 0.2942065001 0.1292198002
+ 0.4124872983 0.2987079918 0.1313749999
+ 0.4182811975 0.3031933904 0.1335413009
+ 0.4240790904 0.3076609075 0.1357281953
+ 0.4298571944 0.3121108115 0.1379179060
+ 0.4356110096 0.3165585101 0.1401115060
+ 0.4413394928 0.3209869862 0.1423158050
+ 0.4470395148 0.3254047930 0.1445332021
+ 0.4527026117 0.3298167884 0.1467590034
+ 0.4583334923 0.3342174888 0.1489966065
+ 0.4639326930 0.3386009932 0.1512416005
+ 0.4695220888 0.3429653049 0.1534925997
+ 0.4750846922 0.3473365903 0.1557577997
+ 0.4806160927 0.3517040908 0.1580404937
+ 0.4860872924 0.3560670912 0.1603357941
+ 0.4915176928 0.3604130149 0.1626514047
+ 0.4969187081 0.3647586107 0.1649708003
+ 0.5022816062 0.3691031039 0.1672956944
+ 0.5076225996 0.3734341860 0.1696293950
+ 0.5129231811 0.3777643144 0.1719669998
+ 0.5181546807 0.3820936084 0.1743122041
+ 0.5233271718 0.3864077926 0.1766573936
+ 0.5284634233 0.3907110095 0.1790025979
+ 0.5335465074 0.3950001001 0.1813486069
+ 0.5385751724 0.3992711008 0.1836972982
+ 0.5435780883 0.4035327137 0.1860560030
+ 0.5485448241 0.4077767134 0.1884246022
+ 0.5534678102 0.4120056033 0.1908023953
+ 0.5583646297 0.4162251055 0.1931803972
+ 0.5632166862 0.4203993082 0.1955589950
+ 0.5680477023 0.4245612025 0.1979466975
+ 0.5728545189 0.4287038147 0.2003419995
+ 0.5775995255 0.4328233004 0.2027534992
+ 0.5823162794 0.4369328022 0.2051690072
+ 0.5869674087 0.4410141110 0.2075875998
+ 0.5915768743 0.4450846910 0.2100103050
+ 0.5961518884 0.4491345882 0.2124343067
+ 0.6006463170 0.4531683922 0.2148666978
+ 0.6051229239 0.4571923018 0.2172998041
+ 0.6095721126 0.4611825943 0.2197346985
+ 0.6139861941 0.4651634991 0.2221716940
+ 0.6183604002 0.4691112041 0.2246143073
+ 0.6226823926 0.4730412066 0.2270615995
+ 0.6269859076 0.4769391119 0.2295158058
+ 0.6312270761 0.4808132946 0.2319785058
+ 0.6354541779 0.4846689999 0.2344491929
+ 0.6396340728 0.4885058105 0.2369215935
+ 0.6438084245 0.4923363924 0.2393949032
+ 0.6479752064 0.4961437881 0.2418684959
+ 0.6520851254 0.4999468923 0.2443421036
+ 0.6561610103 0.5037171841 0.2468205988
+ 0.6601614952 0.5074794292 0.2493008971
+ 0.6641432047 0.5112071037 0.2517744899
+ 0.6680347919 0.5149219036 0.2542459071
+ 0.6719154716 0.5186061263 0.2567091882
+ 0.6757277846 0.5222734809 0.2591697872
+ 0.6795322895 0.5259137750 0.2616206110
+ 0.6833059192 0.5295230746 0.2640681863
+ 0.6870679259 0.5330942273 0.2665097117
+ 0.6908019781 0.5366339087 0.2689489126
+ 0.6945022941 0.5401414037 0.2713932097
+ 0.6981444955 0.5436180830 0.2738403976
+ 0.7017527223 0.5470659733 0.2762868106
+ 0.7053136826 0.5504943728 0.2787325978
+ 0.7088435292 0.5539047718 0.2811723053
+ 0.7123348117 0.5572900772 0.2836047113
+ 0.7157995105 0.5606504083 0.2860364020
+ 0.7192326784 0.5639901757 0.2884666920
+ 0.7226405144 0.5673059225 0.2908954918
+ 0.7260167003 0.5705996752 0.2933177948
+ 0.7293487191 0.5738595724 0.2957400084
+ 0.7326173782 0.5771085024 0.2981606126
+ 0.7358595133 0.5803325772 0.3005810976
+ 0.7390533090 0.5835512877 0.3029994965
+ 0.7422223091 0.5867486000 0.3054173887
+ 0.7453266978 0.5899420977 0.3078261018
+ 0.7484182715 0.5930835009 0.3102284968
+ 0.7514507174 0.5962249041 0.3126305044
+ 0.7544791102 0.5993114114 0.3150317967
+ 0.7574347258 0.6023926139 0.3174335063
+ 0.7603902817 0.6054285169 0.3198406994
+ 0.7632429004 0.6084480286 0.3222478032
+ 0.7660846710 0.6114342213 0.3246580958
+ 0.7688931227 0.6143910885 0.3270691931
+ 0.7716894150 0.6173362732 0.3294793069
+ 0.7744498253 0.6202554703 0.3318881989
+ 0.7771797776 0.6231728196 0.3342961073
+ 0.7798776031 0.6260603070 0.3366977870
+ 0.7825078964 0.6289477944 0.3390995860
+ 0.7851305008 0.6318117976 0.3414917886
+ 0.7876675725 0.6346691847 0.3438811004
+ 0.7902047038 0.6375092864 0.3462617099
+ 0.7926716805 0.6403307915 0.3486273885
+ 0.7951231003 0.6431398988 0.3509930074
+ 0.7975525260 0.6458842754 0.3533450067
+ 0.7999621034 0.6486287117 0.3556961119
+ 0.8023657799 0.6513149738 0.3580406904
+ 0.8047469854 0.6539878845 0.3603785932
+ 0.8071283102 0.6566321254 0.3627164066
+ 0.8094397187 0.6592395902 0.3650526106
+ 0.8117408156 0.6618456841 0.3673886955
+ 0.8139895797 0.6644176841 0.3697170913
+ 0.8161870241 0.6669896841 0.3720383942
+ 0.8183761239 0.6695259213 0.3743596971
+ 0.8205000162 0.6720392704 0.3766688108
+ 0.8226239085 0.6745491028 0.3789778948
+ 0.8247258067 0.6770399213 0.3812792897
+ 0.8268182278 0.6795307994 0.3835709095
+ 0.8289020061 0.6819990277 0.3858624995
+ 0.8309609294 0.6844567060 0.3881478012
+ 0.8330196738 0.6869028211 0.3904320002
+ 0.8350235224 0.6892951131 0.3927091956
+ 0.8370118737 0.6916874051 0.3949654102
+ 0.8389791846 0.6940457821 0.3972215950
+ 0.8408939242 0.6963855028 0.3994632065
+ 0.8428086042 0.6987230182 0.4016954005
+ 0.8446682096 0.7010375261 0.4039277136
+ 0.8465105295 0.7033519149 0.4061439037
+ 0.8483420014 0.7056419253 0.4083589911
+ 0.8501332998 0.7079067230 0.4105660021
+ 0.8519244790 0.7101715803 0.4127483070
+ 0.8536859751 0.7123854160 0.4149304926
+ 0.8554301858 0.7145920992 0.4171046913
+ 0.8571730852 0.7167863250 0.4192717075
+ 0.8588685989 0.7189391255 0.4214386046
+ 0.8605639935 0.7210919857 0.4236004949
+ 0.8622372150 0.7232128978 0.4257610142
+ 0.8638756275 0.7253087163 0.4279214144
+ 0.8655139804 0.7274044156 0.4300718904
+ 0.8671008945 0.7294499874 0.4322223067
+ 0.8686684966 0.7314872742 0.4343703091
+ 0.8702337742 0.7335180044 0.4365068972
+ 0.8717327714 0.7355036736 0.4386434853
+ 0.8732318878 0.7374892831 0.4407753050
+ 0.8747140765 0.7394585013 0.4428966939
+ 0.8761591911 0.7413989902 0.4450182021
+ 0.8776043057 0.7433394194 0.4471280873
+ 0.8790065050 0.7452735901 0.4492236078
+ 0.8803750873 0.7472031116 0.4513190985
+ 0.8817436099 0.7491325736 0.4533992112
+ 0.8830839992 0.7510256767 0.4554660916
+ 0.8844164014 0.7529067993 0.4575330019
+ 0.8857486844 0.7547879815 0.4595870972
+ 0.8870559931 0.7566236854 0.4616327882
+ 0.8883624077 0.7584543824 0.4636783898
+ 0.8896635771 0.7602844834 0.4657067060
+ 0.8909289837 0.7620761991 0.4677248001
+ 0.8921945095 0.7638679147 0.4697428942
+ 0.8934394121 0.7656568289 0.4717616141
+ 0.8946236968 0.7674204707 0.4737805128
+ 0.8958079815 0.7691841722 0.4757995009
+ 0.8969696164 0.7709385753 0.4778141081
+ 0.8980888724 0.7726433873 0.4798257947
+ 0.8992081881 0.7743480802 0.4818373919
+ 0.9003195167 0.7760472894 0.4838384986
+ 0.9014195800 0.7777205706 0.4858298898
+ 0.9025197029 0.7793939114 0.4878214002
+ 0.9035978913 0.7810617089 0.4898056984
+ 0.9046490788 0.7827023864 0.4917800128
+ 0.9057002068 0.7843430042 0.4937543869
+ 0.9067236185 0.7859767079 0.4957253933
+ 0.9077128172 0.7875623107 0.4976881146
+ 0.9087020159 0.7891479731 0.4996508062
+ 0.9096745849 0.7907313108 0.5016111732
+ 0.9106239080 0.7922711968 0.5035545826
+ 0.9115731716 0.7938110232 0.5054979920
+ 0.9124993086 0.7953509092 0.5074414015
+ 0.9133828282 0.7968598008 0.5093576908
+ 0.9142662287 0.7983667254 0.5112711787
+ 0.9151422977 0.7998737097 0.5131847262
+ 0.9159966707 0.8013570905 0.5150825977
+ 0.9168511033 0.8028343916 0.5169728994
+ 0.9176996946 0.8043118119 0.5188632011
+ 0.9185072780 0.8057656884 0.5207424760
+ 0.9193148017 0.8072052002 0.5226051807
+ 0.9201223254 0.8086445928 0.5244678855
+ 0.9209262133 0.8100745082 0.5263286233
+ 0.9217298031 0.8114904165 0.5281689167
+ 0.9225333929 0.8129063249 0.5300090909
+ 0.9233224988 0.8143162727 0.5318493843
+ 0.9241070151 0.8156955242 0.5336812139
+ 0.9248914719 0.8170747161 0.5355101228
+ 0.9256622195 0.8184539080 0.5373389721
+ 0.9264205098 0.8198124170 0.5391626954
+ 0.9271788001 0.8211680055 0.5409774184
+ 0.9279240966 0.8225237131 0.5427920222
+ 0.9286308885 0.8238555193 0.5446066260
+ 0.9293376803 0.8251689076 0.5463947058
+ 0.9300444722 0.8264822960 0.5481811166
+ 0.9307246208 0.8277850151 0.5499675870
+ 0.9314032793 0.8290479183 0.5517386198
+ 0.9320818782 0.8303108215 0.5534932017
+ 0.9327319860 0.8315737247 0.5552479029
+ 0.9333636761 0.8327975273 0.5570024848
+ 0.9339953065 0.8340129256 0.5587229133
+ 0.9346169233 0.8352283239 0.5604429841
+ 0.9352049828 0.8364298940 0.5621631742
+ 0.9357931018 0.8376104832 0.5638735890
+ 0.9363812208 0.8387910128 0.5655727983
+ 0.9369478822 0.8399716020 0.5672720075
+ 0.9375097752 0.8411086798 0.5689712167
+ 0.9380717874 0.8422427773 0.5706508160
+ 0.9386349916 0.8433768749 0.5723282099
+ 0.9392004013 0.8445004821 0.5740054846
+ 0.9397658110 0.8456103802 0.5756754279
+ 0.9403312206 0.8467202783 0.5773270726
+ 0.9408558011 0.8478301764 0.5789787173
+ 0.9413745999 0.8489074111 0.5806304216
+ 0.9418935180 0.8499805927 0.5822653174
+ 0.9423980713 0.8510538936 0.5838909149
+ 0.9428763986 0.8521230221 0.5855165124
+ 0.9433547258 0.8531830907 0.5871421099
+ 0.9438331127 0.8542432189 0.5887404084
+ 0.9443081021 0.8553032875 0.5903375149
+ 0.9447823763 0.8563414812 0.5919346213
+ 0.9452565908 0.8573703170 0.5935288072
+ 0.9457269907 0.8583989739 0.5951129794
+ 0.9461808801 0.8594260216 0.5966972113
+ 0.9466348290 0.8604149818 0.5982813835
+ 0.9470885992 0.8614040017 0.5998545289
+ 0.9475203156 0.8623930812 0.6014149189
+ 0.9479331970 0.8633654118 0.6029751897
+ 0.9483461976 0.8643069267 0.6045355797
+ 0.9487591982 0.8652483821 0.6060755253
+ 0.9491466284 0.8661898971 0.6076046824
+ 0.9495298862 0.8671160936 0.6091338992
+ 0.9499133229 0.8680329919 0.6106631756
+ 0.9502913952 0.8689497709 0.6121817827
+ 0.9506375790 0.8698666096 0.6136978269
+ 0.9509837031 0.8707538843 0.6152138710
+ 0.9513298869 0.8716354966 0.6167299747
+ 0.9516645074 0.8725172281 0.6182156801
+ 0.9519801736 0.8733978868 0.6196988225
+ 0.9522958994 0.8742434978 0.6211817861
+ 0.9526115060 0.8750889897 0.6226648092
+ 0.9529042244 0.8759344816 0.6241227984
+ 0.9531800151 0.8767787218 0.6255803704
+ 0.9534558058 0.8776161075 0.6270378828
+ 0.9537314773 0.8784536123 0.6284952760
+ 0.9539870024 0.8792909980 0.6299347878
+ 0.9542350173 0.8801239729 0.6313741803
+ 0.9544829726 0.8809452057 0.6328135729
+ 0.9547309875 0.8817663789 0.6342530847
+ 0.9549531937 0.8825874925 0.6356778741
+ 0.9551706910 0.8833963275 0.6371027231
+ 0.9553881884 0.8841794729 0.6385273933
+ 0.9556056857 0.8849627972 0.6399521232
+ 0.9558088183 0.8857461214 0.6413484812
+ 0.9560105801 0.8865262866 0.6427426934
+ 0.9562124014 0.8873007894 0.6441369057
+ 0.9564142227 0.8880752921 0.6455309987
+ 0.9566016793 0.8888496757 0.6469084024
+ 0.9567884803 0.8896216154 0.6482821703
+ 0.9569752812 0.8903880119 0.6496559978
+ 0.9571620822 0.8911542892 0.6510298252
+ 0.9573429823 0.8919206858 0.6523879170
+ 0.9575235844 0.8926829100 0.6537382007
+ 0.9577041864 0.8934323192 0.6550884843
+ 0.9578847289 0.8941817284 0.6564388871
+ 0.9580754042 0.8949311972 0.6577758193
+ 0.9582675099 0.8956754208 0.6590979099
+ 0.9584596157 0.8963845968 0.6604200006
+ 0.9586517215 0.8970937729 0.6617420912
+ 0.9588462114 0.8978030086 0.6630570889
+ 0.9590412974 0.8985121846 0.6643490791
+ 0.9592363834 0.8991947770 0.6656410098
+ 0.9594315290 0.8998764753 0.6669330001
+ 0.9596217275 0.9005582929 0.6682248712
+ 0.9598088861 0.9012399912 0.6695014238
+ 0.9599962234 0.9018872976 0.6707772017
+ 0.9601835012 0.9025238752 0.6720529199
+ 0.9603782296 0.9031605124 0.6733285785
+ 0.9605820775 0.9037970901 0.6746001244
+ 0.9607859850 0.9044255018 0.6758689880
+ 0.9609898925 0.9050459862 0.6771379709
+ 0.9611927271 0.9056665897 0.6784068942
+ 0.9613916874 0.9062871933 0.6796714067
+ 0.9615907073 0.9069045186 0.6809216142
+ 0.9617896080 0.9075098038 0.6821717024
+ 0.9619886279 0.9081152081 0.6834219098
+ 0.9621633887 0.9087206125 0.6846719980
+ 0.9623364210 0.9093260169 0.6859096885
+ 0.9625093937 0.9099286199 0.6871445179
+ 0.9626824260 0.9105308056 0.6883792281
+ 0.9628574252 0.9111331105 0.6896139979
+ 0.9630337954 0.9117352962 0.6908426285
+ 0.9632101059 0.9123305082 0.6920586824
+ 0.9633864760 0.9129180908 0.6932747960
+ 0.9635632038 0.9135056138 0.6944910288
+ 0.9637411237 0.9140931964 0.6957070827
+ 0.9639191031 0.9146800041 0.6969081163
+ 0.9640970230 0.9152501225 0.6981055140
+ 0.9642748833 0.9158201814 0.6993029118
+ 0.9644508958 0.9163902998 0.7005001903
+ 0.9646263719 0.9169602990 0.7016944289
+ 0.9648019075 0.9175173044 0.7028782964
+ 0.9649773836 0.9180638790 0.7040622234
+ 0.9651508927 0.9186105132 0.7052459717
+ 0.9653204083 0.9191570878 0.7064298987
+ 0.9654898047 0.9197033048 0.7075976133
+ 0.9656593204 0.9202299118 0.7087550759
+ 0.9658287168 0.9207565784 0.7099125981
+ 0.9659901857 0.9212831855 0.7110701203
+ 0.9661499262 0.9218099117 0.7122275233
+ 0.9663096070 0.9223287106 0.7133823037
+ 0.9664692283 0.9228376746 0.7145369053
+ 0.9666253924 0.9233465791 0.7156915069
+ 0.9667711854 0.9238554835 0.7168461084
+ 0.9669169188 0.9243643880 0.7179933786
+ 0.9670627117 0.9248356819 0.7191138864
+ 0.9672083855 0.9252979159 0.7202343941
+ 0.9673423171 0.9257600904 0.7213549018
+ 0.9674692750 0.9262223244 0.7224754095
+ 0.9675962925 0.9266850948 0.7235804796
+ 0.9677233100 0.9271525741 0.7246658802
+ 0.9678503275 0.9276201725 0.7257512808
+ 0.9679561853 0.9280877113 0.7268366814
+ 0.9680612087 0.9285551906 0.7279220819
+ 0.9681661725 0.9290199280 0.7289987803
+ 0.9682713151 0.9294800162 0.7300698757
+ 0.9683721066 0.9299402237 0.7311409712
+ 0.9684600830 0.9304003716 0.7322121263
+ 0.9685481191 0.9308605194 0.7332832217
+ 0.9686360955 0.9313055873 0.7343558073
+ 0.9687241912 0.9317405820 0.7354289889
+ 0.9687963128 0.9321755767 0.7365021110
+ 0.9688509703 0.9326105714 0.7375752926
+ 0.9689058065 0.9330456257 0.7386484146
+ 0.9689605236 0.9334610105 0.7396969199
+ 0.9690153003 0.9338703752 0.7407392263
+ 0.9690718055 0.9342797995 0.7417815924
+ 0.9691293836 0.9346892238 0.7428238988
+ 0.9691869020 0.9350985885 0.7438662052
+ 0.9692444205 0.9354946017 0.7448874712
+ 0.9693019986 0.9358887076 0.7459040284
+ 0.9693595767 0.9362828135 0.7469205260
+ 0.9694172740 0.9366768003 0.7479370236
+ 0.9694749713 0.9370709062 0.7489535213
+ 0.9695327282 0.9374542832 0.7499631047
+ 0.9695904255 0.9378368855 0.7509707212
+ 0.9696562290 0.9382194877 0.7519782782
+ 0.9697234035 0.9386020899 0.7529858947
+ 0.9697905779 0.9389846921 0.7539935112
+ 0.9698578119 0.9393534064 0.7549921870
+ 0.9699249864 0.9397209883 0.7559866905
+ 0.9700003266 0.9400886297 0.7569811940
+ 0.9700766802 0.9404562116 0.7579756975
+ 0.9701529741 0.9408237934 0.7589702010
+ 0.9702293873 0.9411832094 0.7599533200
+ 0.9703058004 0.9415413737 0.7609264255
+ 0.9703885913 0.9418995976 0.7618994713
+ 0.9704725742 0.9422578216 0.7628725767
+ 0.9705566168 0.9426159859 0.7638456225
+ 0.9706404805 0.9429603815 0.7648131251
+ 0.9707245231 0.9433007836 0.7657690048
+ 0.9708133936 0.9436411858 0.7667248249
+ 0.9709036946 0.9439815879 0.7676807046
+ 0.9709941149 0.9443218708 0.7686365843
+ 0.9710844755 0.9446520805 0.7695921063
+ 0.9711748958 0.9449757934 0.7705423832
+ 0.9712682962 0.9452995062 0.7714927793
+ 0.9713637233 0.9456232190 0.7724431753
+ 0.9714590907 0.9459468722 0.7733935118
+ 0.9715543985 0.9462659955 0.7743439078
+ 0.9716498256 0.9465780258 0.7752857804
+ 0.9717406034 0.9468899965 0.7762247920
+ 0.9718248844 0.9472020268 0.7771639228
+ 0.9719092846 0.9475139976 0.7781028748
+ 0.9719936848 0.9478241205 0.7790420055
+ 0.9720780849 0.9481198788 0.7799775004
+ 0.9721639752 0.9484158158 0.7809069157
+ 0.9722574949 0.9487115741 0.7818363905
+ 0.9723510146 0.9490075111 0.7827658057
+ 0.9724445939 0.9493033886 0.7836952806
+ 0.9725381136 0.9495918155 0.7846246958
+ 0.9726316929 0.9498783946 0.7855424881
+ 0.9727249742 0.9501649141 0.7864595056
+ 0.9728183150 0.9504513741 0.7873764038
+ 0.9729115963 0.9507378936 0.7882934213
+ 0.9730048776 0.9510220885 0.7892103791
+ 0.9730982184 0.9513028860 0.7901170850
+ 0.9731950164 0.9515836239 0.7910107970
+ 0.9732956290 0.9518643022 0.7919045091
+ 0.9733961225 0.9521449804 0.7927982211
+ 0.9734966755 0.9524257779 0.7936918736
+ 0.9735972285 0.9526972175 0.7945855856
+ 0.9736980200 0.9529681802 0.7954729199
+ 0.9738026261 0.9532393217 0.7963594198
+ 0.9739071131 0.9535102844 0.7972459197
+ 0.9740117192 0.9537813067 0.7981324196
+ 0.9741162062 0.9540500045 0.7990188003
+ 0.9742208123 0.9543160200 0.7999022007
+ 0.9743257165 0.9545819759 0.8007770777
+ 0.9744309187 0.9548478723 0.8016518950
+ 0.9745361209 0.9551138878 0.8025267720
+ 0.9746413231 0.9553797841 0.8034017086
+ 0.9747465253 0.9556449056 0.8042765856
+ 0.9748516083 0.9559097886 0.8051419854
+ 0.9749541283 0.9561746716 0.8060011268
+ 0.9750565290 0.9564396739 0.8068600893
+ 0.9751588702 0.9567046165 0.8077191710
+ 0.9752613902 0.9569633007 0.8085781932
+ 0.9753637910 0.9572036862 0.8094372749
+ 0.9754638076 0.9574440718 0.8102779984
+ 0.9755604267 0.9576845765 0.8111159205
+ 0.9756569266 0.9579250216 0.8119537234
+ 0.9757534266 0.9581654072 0.8127915263
+ 0.9758499861 0.9584035873 0.8136293888
+ 0.9759464860 0.9586400986 0.8144659996
+ 0.9760364890 0.9588767290 0.8152853847
+ 0.9761242867 0.9591131806 0.8161048293
+ 0.9762120247 0.9593496919 0.8169242144
+ 0.9762998223 0.9595862031 0.8177435994
+ 0.9763875008 0.9598243833 0.8185629845
+ 0.9764752984 0.9600629807 0.8193802834
+ 0.9765614867 0.9603015184 0.8201889992
+ 0.9766476154 0.9605401158 0.8209977150
+ 0.9767338037 0.9607787132 0.8218063712
+ 0.9768199921 0.9610170722 0.8226152062
+ 0.9769061804 0.9612380862 0.8234239221
+ 0.9769896269 0.9614589810 0.8242325187
+ 0.9770637155 0.9616798759 0.8250408173
+ 0.9771376848 0.9619007707 0.8258491158
+ 0.9772117138 0.9621217847 0.8266574144
+ 0.9772858024 0.9623394012 0.8274655938
+ 0.9773597717 0.9625350237 0.8282738924
+ 0.9774324298 0.9627305865 0.8290752172
+ 0.9775022864 0.9629262090 0.8298593760
+ 0.9775723219 0.9631217718 0.8306434751
+ 0.9776422977 0.9633173943 0.8314276934
+ 0.9777122736 0.9635074139 0.8322117925
+ 0.9777823091 0.9636734724 0.8329960108
+ 0.9778506756 0.9638395905 0.8337736726
+ 0.9779173136 0.9640057087 0.8345307708
+ 0.9779838920 0.9641718268 0.8352878094
+ 0.9780504704 0.9643378854 0.8360449076
+ 0.9781171083 0.9645028710 0.8368018866
+ 0.9781836867 0.9646632075 0.8375589848
+ 0.9782491922 0.9648234844 0.8383142948
+ 0.9783133864 0.9649837017 0.8390561938
+ 0.9783775806 0.9651439786 0.8397982121
+ 0.9784417748 0.9653041959 0.8405401111
+ 0.9785060287 0.9654663801 0.8412820101
+ 0.9785702229 0.9656417966 0.8420239091
+ 0.9786368012 0.9658172727 0.8427659273
+ 0.9787064791 0.9659928083 0.8434938788
+ 0.9787762761 0.9661682844 0.8442208171
+ 0.9788460135 0.9663438201 0.8449476957
+ 0.9789156914 0.9665191770 0.8456746936
+ 0.9789854288 0.9667049050 0.8464015722
+ 0.9790521264 0.9668906927 0.8471285105
+ 0.9791120887 0.9670764804 0.8478465080
+ 0.9791721106 0.9672623277 0.8485602736
+ 0.9792320728 0.9674479961 0.8492740989
+ 0.9792920947 0.9676337838 0.8499878049
+ 0.9793521166 0.9678208232 0.8507015705
+ 0.9794105291 0.9680082202 0.8514152765
+ 0.9794589877 0.9681956172 0.8521232009
+ 0.9795076251 0.9683828950 0.8528202772
+ 0.9795562029 0.9685702920 0.8535174131
+ 0.9796047807 0.9687576890 0.8542146087
+ 0.9796532989 0.9689376950 0.8549116850
+ 0.9797018766 0.9691110253 0.8556088805
+ 0.9797381759 0.9692844152 0.8563060164
+ 0.9797729850 0.9694576859 0.8569779992
+ 0.9798077941 0.9696310163 0.8576492071
+ 0.9798427224 0.9698044062 0.8583204150
+ 0.9798774719 0.9699763060 0.8589916229
+ 0.9799122810 0.9701421857 0.8596627712
+ 0.9799376130 0.9703081250 0.8603339791
+ 0.9799560905 0.9704741240 0.8609988093
+ 0.9799745083 0.9706400037 0.8616573811
+ 0.9799929857 0.9708058834 0.8623160124
+ 0.9800114036 0.9709718227 0.8629745841
+ 0.9800298810 0.9711270928 0.8636332154
+ 0.9800478220 0.9712795019 0.8642917871
+ 0.9800634980 0.9714319110 0.8649504185
+ 0.9800791740 0.9715842009 0.8655930758
+ 0.9800949097 0.9717366099 0.8662353754
+ 0.9801105857 0.9718890190 0.8668777943
+ 0.9801263213 0.9720391035 0.8675202131
+ 0.9801419973 0.9721841812 0.8681625724
+ 0.9801493883 0.9723293185 0.8688049912
+ 0.9801540971 0.9724743962 0.8694401979
+ 0.9801586866 0.9726194739 0.8700637817
+ 0.9801633954 0.9727646112 0.8706874251
+ 0.9801681042 0.9729096293 0.8713108897
+ 0.9801728129 0.9730468988 0.8719344735
+ 0.9801768064 0.9731817245 0.8725581169
+ 0.9801785946 0.9733164907 0.8731817007
+ 0.9801803827 0.9734513164 0.8737874031
+ 0.9801821709 0.9735862017 0.8743858933
+ 0.9801840186 0.9737210274 0.8749843836
+ 0.9801859260 0.9738534093 0.8755828738
+ 0.9801877141 0.9739726186 0.8761814237
+ 0.9801887274 0.9740918279 0.8767799139
+ 0.9801893234 0.9742109776 0.8773784041
+ 0.9801899195 0.9743301272 0.8779736757
+ 0.9801905155 0.9744492769 0.8785690069
+ 0.9801911116 0.9745684862 0.8791642189
+ 0.9801917076 0.9746857285 0.8797594905
+ 0.9801923037 0.9748008251 0.8803547025
+ 0.9801943898 0.9749158025 0.8809499741
+ 0.9801964760 0.9750308990 0.8815435767
+ 0.9801986814 0.9751458764 0.8821282983
+ 0.9802008271 0.9752609134 0.8827130198
+ 0.9802029729 0.9753760099 0.8832976222
+ 0.9802051187 0.9754949212 0.8838822842
+ 0.9802073240 0.9756155014 0.8844670057
+ 0.9802094102 0.9757360220 0.8850517273
+ 0.9802116156 0.9758566022 0.8856287003
+ 0.9802137017 0.9759771824 0.8861843944
+ 0.9802159071 0.9760977030 0.8867400289
+ 0.9802179933 0.9762182832 0.8872956038
+ 0.9802200794 0.9763411283 0.8878511786
+ 0.9802222848 0.9764642119 0.8884068131
+ 0.9802243710 0.9765874147 0.8889623880
+ 0.9802265763 0.9767104983 0.8895106912
+ 0.9802287221 0.9768335819 0.8900415897
+ 0.9802309275 0.9769567847 0.8905724883
+ 0.9802330136 0.9770799279 0.8911035061
+ 0.9802352190 0.9772124887 0.8916344047
+ 0.9802373052 0.9773454070 0.8921653032
+ 0.9802395105 0.9774783254 0.8926963210
+ 0.9802415967 0.9776111841 0.8932245970
+ 0.9802438021 0.9777441025 0.8937453032
+ 0.9802458882 0.9778770208 0.8942660093
+ 0.9802479744 0.9780098796 0.8947867155
+ 0.9802501798 0.9781574011 0.8953074217
+ 0.9802523255 0.9783051014 0.8958281875
+ 0.9802544713 0.9784528017 0.8963488936
+ 0.9802566171 0.9786006212 0.8968678117
+ 0.9802588224 0.9787483215 0.8973752856
+ 0.9802609086 0.9788960218 0.8978827000
+ 0.9802631140 0.9790437222 0.8983901739
+ 0.9802652001 0.9791916013 0.8988977075
+ 0.9802674055 0.9793394804 0.8994051814
+ 0.9802694917 0.9794874191 0.8999127150
+ 0.9802716970 0.9796352983 0.9004201889
+ 0.9802737832 0.9797831774 0.9009217024
+ 0.9802759290 0.9799311161 0.9014229178
+ 0.9802780747 0.9800789952 0.9019240737
+ 0.9802802205 0.9802207947 0.9024252892
+ 0.9802927971 0.9803609848 0.9029263854
+ 0.9803174734 0.9805011749 0.9034276009
+ 0.9803423285 0.9806414247 0.9039288163
+ 0.9803670049 0.9807816148 0.9044218063
+ 0.9803916812 0.9809218049 0.9049109221
+ 0.9804164171 0.9810619950 0.9053999782
+ 0.9804412127 0.9811941981 0.9058890939
+ 0.9804722071 0.9813209176 0.9063782096
+ 0.9805197120 0.9814475179 0.9068673253
+ 0.9805672169 0.9815741777 0.9073563814
+ 0.9806147814 0.9817007780 0.9078388810
+ 0.9806622863 0.9818274975 0.9083073139
+ 0.9807097912 0.9819540977 0.9087758064
+ 0.9807572961 0.9820784926 0.9092441797
+ 0.9808050990 0.9821977019 0.9097126126
+ 0.9808717966 0.9823167920 0.9101811051
+ 0.9809383750 0.9824360013 0.9106494784
+ 0.9810050726 0.9825550914 0.9111179709
+ 0.9810717106 0.9826743007 0.9115676880
+ 0.9811384082 0.9827933908 0.9120151997
+ 0.9812049866 0.9829124808 0.9124627113
+ 0.9812716842 0.9830338955 0.9129102230
+ 0.9813528061 0.9831554294 0.9133576751
+ 0.9814409018 0.9832769036 0.9138051867
+ 0.9815291166 0.9833983779 0.9142525792
+ 0.9816172123 0.9835199118 0.9146981835
+ 0.9817053080 0.9836413860 0.9151405096
+ 0.9817934036 0.9837629199 0.9155828953
+ 0.9818816185 0.9838852882 0.9160252213
+ 0.9819723964 0.9840087891 0.9164674878
+ 0.9820711017 0.9841321707 0.9169098735
+ 0.9821699262 0.9842556715 0.9173521996
+ 0.9822685719 0.9843791127 0.9177945852
+ 0.9823673964 0.9845024943 0.9182294011
+ 0.9824661016 0.9846259952 0.9186623096
+ 0.9825648069 0.9847493768 0.9190952182
+ 0.9826635718 0.9848722816 0.9195280075
+ 0.9827668071 0.9849951267 0.9199609160
+ 0.9828714132 0.9851179123 0.9203937054
+ 0.9829760194 0.9852408171 0.9208266139
+ 0.9830806255 0.9853636026 0.9212580919
+ 0.9831852913 0.9854863882 0.9216784835
+ 0.9832898974 0.9856092930 0.9220989943
+ 0.9833945036 0.9857273102 0.9225193858
+ 0.9834997058 0.9858360887 0.9229398966
+ 0.9836072922 0.9859449267 0.9233602881
+ 0.9837149978 0.9860537052 0.9237807989
+ 0.9838227034 0.9861624837 0.9242011905
+ 0.9839304090 0.9862713218 0.9246129990
+ 0.9840379953 0.9863801003 0.9250090122
+ 0.9841457009 0.9864888787 0.9254049063
+ 0.9842534065 0.9865922928 0.9258008003
+ 0.9843615294 0.9866927266 0.9261968136
+ 0.9844700098 0.9867932200 0.9265927076
+ 0.9845784903 0.9868935943 0.9269887209
+ 0.9846869707 0.9869940281 0.9273846149
+ 0.9847955108 0.9870945215 0.9277727008
+ 0.9849039912 0.9871948957 0.9281532168
+ 0.9850124121 0.9872953296 0.9285337925
+ 0.9851208925 0.9873874187 0.9289144278
+ 0.9852285981 0.9874783158 0.9292948842
+ 0.9853361249 0.9875692129 0.9296755195
+ 0.9854434729 0.9876601100 0.9300559759
+ 0.9855508804 0.9877510071 0.9304366112
+ 0.9856582880 0.9878419042 0.9308059812
+ 0.9857658148 0.9879328012 0.9311676025
+ 0.9858732224 0.9880235195 0.9315292239
+ 0.9859805703 0.9881017208 0.9318907261
+ 0.9860852957 0.9881799817 0.9322522879
+ 0.9861897826 0.9882581830 0.9326137900
+ 0.9862943888 0.9883363843 0.9329754114
+ 0.9863988757 0.9884145856 0.9333369136
+ 0.9865034223 0.9884927869 0.9336916804
+ 0.9866079092 0.9885709882 0.9340415001
+ 0.9867123961 0.9886481762 0.9343912005
+ 0.9868168831 0.9887102842 0.9347409010
+ 0.9869164228 0.9887723923 0.9350907207
+ 0.9870160222 0.9888346195 0.9354404211
+ 0.9871155024 0.9888967276 0.9357901216
+ 0.9872151017 0.9889587760 0.9361398816
+ 0.9873145819 0.9890210032 0.9364842176
+ 0.9874141812 0.9890831113 0.9368222952
+ 0.9875137210 0.9891446233 0.9371604919
+ 0.9876132011 0.9891886115 0.9374986887
+ 0.9877052903 0.9892325997 0.9378368855
+ 0.9877973795 0.9892765880 0.9381750226
+ 0.9878895283 0.9893206954 0.9385132194
+ 0.9879816175 0.9893646836 0.9388514161
+ 0.9880737066 0.9894086719 0.9391885996
+ 0.9881657958 0.9894527197 0.9395235181
+ 0.9882578850 0.9894968271 0.9398584962
+ 0.9883499742 0.9895275831 0.9401934147
+ 0.9884337187 0.9895573258 0.9405282736
+ 0.9885166287 0.9895870090 0.9408631921
+ 0.9885994792 0.9896166921 0.9411981106
+ 0.9886823893 0.9896463752 0.9415330291
+ 0.9887652993 0.9896761179 0.9418678880
+ 0.9888483286 0.9897058010 0.9422001839
+ 0.9889311790 0.9897354841 0.9425324798
+ 0.9890140891 0.9897568822 0.9428647161
+ 0.9890915155 0.9897748828 0.9431970119
+ 0.9891669154 0.9897928834 0.9435293078
+ 0.9892423153 0.9898108840 0.9438614845
+ 0.9893177152 0.9898290038 0.9441937804
+ 0.9893931150 0.9898470044 0.9445260167
+ 0.9894685149 0.9898650050 0.9448490143
+ 0.9895439148 0.9898830056 0.9451668262
+ 0.9896193147 0.9898968935 0.9454845786
+ 0.9896823168 0.9899048805 0.9458023906
+ 0.9897314906 0.9899129272 0.9461202025
+ 0.9897806048 0.9899209142 0.9464380145
+ 0.9898297191 0.9899289012 0.9467557073
+ 0.9898788929 0.9899368882 0.9470735192
+ 0.9899280071 0.9899448752 0.9473884106
+ 0.9899771214 0.9899529815 0.9476900101
+ 0.9900262952 0.9899609089 0.9479916096
+ 0.9900729060 0.9899665117 0.9482933283
+ 0.9901000857 0.9899721146 0.9485949278
+ 0.9901273847 0.9899777174 0.9488965869
+ 0.9901546836 0.9899833202 0.9491981864
+ 0.9901819229 0.9899889231 0.9494997859
+ 0.9902092218 0.9899945259 0.9498015046
+ 0.9902365208 0.9900001287 0.9501004815
+ 0.9902637005 0.9900057912 0.9503980279
+ 0.9902909994 0.9900106788 0.9506955147
+ 0.9903110862 0.9900152087 0.9509931207
+ 0.9903277755 0.9900196195 0.9512906075
+ 0.9903444052 0.9900240898 0.9515880942
+ 0.9903609753 0.9900286198 0.9518855810
+ 0.9903776050 0.9900329709 0.9521831274
+ 0.9903942943 0.9900375009 0.9524806142
+ 0.9904109240 0.9900419116 0.9527738094
+ 0.9904274940 0.9900463820 0.9530668855
+ 0.9904429913 0.9900497794 0.9533600211
+ 0.9904512763 0.9900531173 0.9536530972
+ 0.9904596210 0.9900565147 0.9539461732
+ 0.9904679060 0.9900599122 0.9542394280
+ 0.9904761910 0.9900631905 0.9545325041
+ 0.9904844761 0.9900665879 0.9548255801
+ 0.9904927015 0.9900699854 0.9551169872
+ 0.9905009866 0.9900733232 0.9554036856
+ 0.9905092716 0.9900764227 0.9556903243
+ 0.9905135036 0.9900786877 0.9559770226
+ 0.9905136228 0.9900810122 0.9562636018
+ 0.9905136824 0.9900833964 0.9565503001
+ 0.9905138016 0.9900857210 0.9568368793
+ 0.9905139208 0.9900879860 0.9571235776
+ 0.9905139804 0.9900904298 0.9574102163
+ 0.9905140996 0.9900926948 0.9576948285
+ 0.9905142188 0.9900950193 0.9579765797
+ 0.9905142188 0.9900968075 0.9582585096
+ 0.9905145168 0.9900981784 0.9585403204
+ 0.9905148149 0.9900994897 0.9588220716
+ 0.9905151725 0.9901009202 0.9591038823
+ 0.9905154705 0.9901022911 0.9593858123
+ 0.9905158281 0.9901036024 0.9596676230
+ 0.9905161262 0.9901049733 0.9599493742
+ 0.9905164838 0.9901064038 0.9602293968
+ 0.9905167818 0.9901077151 0.9605073929
+ 0.9905170798 0.9901083708 0.9607855082
+ 0.9905173779 0.9901089072 0.9610636234
+ 0.9905176759 0.9901093245 0.9613416791
+ 0.9905180931 0.9901098013 0.9616196752
+ 0.9905183911 0.9901102185 0.9618977904
+ 0.9905186892 0.9901106954 0.9621759057
+ 0.9905189872 0.9901111126 0.9624540210
+ 0.9905194044 0.9901115894 0.9627259970
+ 0.9905197024 0.9901120067 0.9629914761
+ 0.9905200005 0.9901124835 0.9632570148
+ 0.9905202985 0.9901130199 0.9635224938
+ 0.9905205965 0.9901136160 0.9637879729
+ 0.9905210137 0.9901140928 0.9640535116
+ 0.9905213118 0.9901146293 0.9643189907
+ 0.9905216098 0.9901151061 0.9645845294
+ 0.9905219078 0.9901155829 0.9648500085
+ 0.9905223250 0.9901161194 0.9651170969
+ 0.9905226231 0.9901167154 0.9653869867
+ 0.9905229211 0.9901171923 0.9656568170
+ 0.9905232191 0.9901177287 0.9659267068
+ 0.9905235171 0.9901182055 0.9661965966
+ 0.9905238748 0.9901186824 0.9664664268
+ 0.9905241728 0.9901192188 0.9667363167
+ 0.9905244708 0.9901198149 0.9670060873
+ 0.9905248284 0.9901202917 0.9672759771
+ 0.9905251861 0.9901208282 0.9675456285
+ 0.9905254841 0.9901213050 0.9678133130
+ 0.9905257821 0.9901217818 0.9680811167
+ 0.9905260801 0.9901223183 0.9683488011
+ 0.9905264974 0.9901229143 0.9686166048
+ 0.9905267954 0.9901233912 0.9688842893
+ 0.9905270934 0.9901239276 0.9691520929
+ 0.9905273914 0.9901244044 0.9694197774
+ 0.9905276895 0.9901248813 0.9696875811
+ 0.9905281067 0.9901254177 0.9699553251
+ 0.9905284047 0.9901258945 0.9702137709
+ 0.9905287027 0.9901264906 0.9704701900
+ 0.9905290008 0.9901270270 0.9707266092
+ 0.9905294180 0.9901275039 0.9709830284
+ 0.9905297160 0.9901279807 0.9712393880
+ 0.9905300140 0.9901285172 0.9714958072
+ 0.9905303121 0.9901289940 0.9717522264
+ 0.9905306101 0.9901295900 0.9720085859
+ 0.9905310273 0.9901301265 0.9722651243
+ 0.9905313253 0.9901306033 0.9725131989
+ 0.9905316234 0.9901310802 0.9727489948
+ 0.9905319214 0.9901316166 0.9729847908
+ 0.9905322790 0.9901320934 0.9732205868
+ 0.9905325770 0.9901326895 0.9734563828
+ 0.9905328751 0.9901332259 0.9736921787
+ 0.9905331731 0.9901337028 0.9739279747
+ 0.9905334711 0.9901341796 0.9741637707
+ 0.9905338883 0.9901347160 0.9743996263
+ 0.9905341864 0.9901351929 0.9746354222
+ 0.9905344844 0.9901357889 0.9748558998
+ 0.9905347824 0.9901363254 0.9750742912
+ 0.9905351996 0.9901368022 0.9752926230
+ 0.9905354977 0.9901372790 0.9755108953
+ 0.9905357957 0.9901378155 0.9757292867
+ 0.9905360937 0.9901382923 0.9759476185
+ 0.9905363917 0.9901388884 0.9761658907
+ 0.9905368090 0.9901394248 0.9763842821
+ 0.9905371070 0.9901399016 0.9766026139
+ 0.9905374050 0.9901403785 0.9768189192
+ 0.9905377030 0.9901409149 0.9770290852
+ 0.9905450940 0.9901413918 0.9772393107
+ 0.9905598164 0.9901419282 0.9774494767
+ 0.9905744791 0.9901425242 0.9776597023
+ 0.9905890822 0.9901430011 0.9778699279
+ 0.9906038046 0.9901434779 0.9780800939
+ 0.9906185269 0.9901440144 0.9782903194
+ 0.9906330705 0.9901444912 0.9785004854
+ 0.9906477928 0.9901450276 0.9787107110
+ 0.9906623960 0.9901456237 0.9789108038
+ 0.9906771183 0.9901518822 0.9791017771
+ 0.9906994104 0.9901679754 0.9792928100
+ 0.9907227159 0.9901841879 0.9794839025
+ 0.9907460213 0.9902004004 0.9796748757
+ 0.9907693267 0.9902166128 0.9798659086
+ 0.9907925725 0.9902328253 0.9800568819
+ 0.9908158779 0.9902489781 0.9802479148
+ 0.9908391833 0.9902651906 0.9804388881
+ 0.9908624887 0.9902812839 0.9806299210
+ 0.9908857942 0.9902974963 0.9808201790
+ 0.9909120202 0.9903177023 0.9810101986
+ 0.9909530282 0.9903402925 0.9812002182
+ 0.9909939766 0.9903628826 0.9813901782
+ 0.9910349250 0.9903854728 0.9815803170
+ 0.9910758734 0.9904081225 0.9817702770
+ 0.9911168814 0.9904307127 0.9819602966
+ 0.9911578298 0.9904533029 0.9821503162
+ 0.9911987782 0.9904758930 0.9823402762
+ 0.9912397861 0.9904984832 0.9825302958
+ 0.9912806749 0.9905210733 0.9827157855
+ 0.9913269281 0.9905534983 0.9828997254
+ 0.9913831949 0.9905890822 0.9830836058
+ 0.9914394021 0.9906246066 0.9832674265
+ 0.9914957285 0.9906600714 0.9834513068
+ 0.9915518761 0.9906957150 0.9836351871
+ 0.9916082025 0.9907311797 0.9838191271
+ 0.9916644096 0.9907668233 0.9840028882
+ 0.9917206764 0.9908022881 0.9841868281
+ 0.9917770028 0.9908378124 0.9843707085
+ 0.9918332100 0.9908733964 0.9845507741
+ 0.9918966293 0.9909213781 0.9847291708
+ 0.9919701815 0.9909728169 0.9849076271
+ 0.9920437932 0.9910240769 0.9850859046
+ 0.9921175241 0.9910753965 0.9852643013
+ 0.9921910763 0.9911267757 0.9854426980
+ 0.9922646880 0.9911780953 0.9856210947
+ 0.9923382998 0.9912294149 0.9857994914
+ 0.9924119115 0.9912807941 0.9859778881
+ 0.9924855232 0.9913321137 0.9861562848
+ 0.9925590754 0.9913833737 0.9863287807
+ 0.9926332831 0.9914423823 0.9864963889
+ 0.9927082062 0.9915043712 0.9866638780
+ 0.9927831888 0.9915664196 0.9868314266
+ 0.9928581119 0.9916284084 0.9869989157
+ 0.9929330945 0.9916903973 0.9871664047
+ 0.9930080175 0.9917523861 0.9873338938
+ 0.9930830002 0.9918143153 0.9875013828
+ 0.9931579828 0.9918763041 0.9876688719
+ 0.9932329059 0.9919382930 0.9878364801
+ 0.9933078885 0.9920002818 0.9879997969
+ 0.9933835864 0.9920656085 0.9881514907
+ 0.9934617877 0.9921336174 0.9883031845
+ 0.9935399890 0.9922016859 0.9884548783
+ 0.9936181903 0.9922698140 0.9886065722
+ 0.9936962724 0.9923378825 0.9887583256
+ 0.9937744737 0.9924060106 0.9889100194
+ 0.9938526750 0.9924740791 0.9890617132
+ 0.9939308763 0.9925422072 0.9892134070
+ 0.9940090775 0.9926102757 0.9893651009
+ 0.9940872788 0.9926782846 0.9895167947
+ 0.9941654801 0.9927479029 0.9896612763
+ 0.9942458868 0.9928218722 0.9898049235
+ 0.9943264127 0.9928959012 0.9899485111
+ 0.9944068789 0.9929698706 0.9900920987
+ 0.9944872856 0.9930438995 0.9902356863
+ 0.9945678115 0.9931179881 0.9903792739
+ 0.9946482778 0.9931920171 0.9905229211
+ 0.9947286844 0.9932659864 0.9906665087
+ 0.9948092103 0.9933400154 0.9908100963
+ 0.9948896766 0.9934139848 0.9909536839
+ 0.9949702024 0.9934880137 0.9910960197
+ 0.9950510263 0.9935687184 0.9912365079
+ 0.9951320887 0.9936506152 0.9913768768
+ 0.9952132106 0.9937325120 0.9915173054
+ 0.9952942729 0.9938144088 0.9916576743
+ 0.9953753948 0.9938963056 0.9917981029
+ 0.9954563975 0.9939782023 0.9919384718
+ 0.9955375195 0.9940600991 0.9920789003
+ 0.9956185818 0.9941418767 0.9922193885
+ 0.9956997037 0.9942237735 0.9923598170
+ 0.9957808256 0.9943056703 0.9925001860
+ 0.9958618283 0.9943904281 0.9926363230
+ 0.9959421158 0.9944810271 0.9927713275
+ 0.9960222840 0.9945715070 0.9929062724
+ 0.9961025715 0.9946621060 0.9930412173
+ 0.9961829185 0.9947527051 0.9931762218
+ 0.9962632060 0.9948431849 0.9933112264
+ 0.9963434935 0.9949337840 0.9934461117
+ 0.9964237809 0.9950243235 0.9935811162
+ 0.9965040088 0.9951149225 0.9937161207
+ 0.9965842962 0.9952055216 0.9938511252
+ 0.9966645837 0.9952960014 0.9939857125
+ 0.9967439771 0.9953925014 0.9941160083
+ 0.9968224764 0.9954916239 0.9942464232
+ 0.9969010949 0.9955906868 0.9943767190
+ 0.9969795942 0.9956899285 0.9945070148
+ 0.9970582128 0.9957889915 0.9946373105
+ 0.9971367121 0.9958881140 0.9947676063
+ 0.9972152710 0.9959872961 0.9948979020
+ 0.9972937703 0.9960864186 0.9950283170
+ 0.9973723888 0.9961854815 0.9951586127
+ 0.9974510074 0.9962846041 0.9952889085
+ 0.9975295067 0.9963837862 0.9954196215
+ 0.9976075292 0.9964898825 0.9955514073
+ 0.9976853132 0.9965963960 0.9956831932
+ 0.9977632165 0.9967029095 0.9958150983
+ 0.9978411198 0.9968094230 0.9959468842
+ 0.9979189038 0.9969159961 0.9960787296
+ 0.9979968071 0.9970225096 0.9962105751
+ 0.9980745912 0.9971290231 0.9963424206
+ 0.9981524944 0.9972354770 0.9964742064
+ 0.9982303977 0.9973421097 0.9966061115
+ 0.9983081818 0.9974486232 0.9967378974
+ 0.9983860850 0.9975554943 0.9968718290
+ 0.9984629154 0.9976667166 0.9970114231
+ 0.9985396862 0.9977778792 0.9971510768
+ 0.9986165166 0.9978891015 0.9972906709
+ 0.9986932874 0.9980002046 0.9974303246
+ 0.9987701178 0.9981114268 0.9975699186
+ 0.9988468885 0.9982225895 0.9977095723
+ 0.9989237189 0.9983338118 0.9978492260
+ 0.9990004897 0.9984449744 0.9979888201
+ 0.9990773201 0.9985561967 0.9981284142
+ 0.9991542101 0.9986674190 0.9982680082
+ 0.9992305040 0.9987785816 0.9984086156
+ 0.9993004799 0.9988896251 0.9985532761
+ 0.9993703961 0.9990006089 0.9986979961
+ 0.9994403720 0.9991117120 0.9988425970
+ 0.9995102882 0.9992226958 0.9989873171
+ 0.9995803237 0.9993337989 0.9991319776
+ 0.9996501803 0.9994447827 0.9992766976
+ 0.9997202158 0.9995558262 0.9994212985
+ 0.9997900724 0.9996669292 0.9995660186
+ 0.9998601079 0.9997779131 0.9997106791
+ 0.9999300241 0.9998890162 0.9998552799
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/kodak_ektachrome_100_plus.spi1d b/release/datafiles/colormanagement/luts/film_response/kodak_ektachrome_100_plus.spi1d
new file mode 100644
index 00000000000..9b7575b81c5
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/kodak_ektachrome_100_plus.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0004568259 0.0001897309 0.0001937342
+ 0.0009166480 0.0003902519 0.0003960232
+ 0.0013811550 0.0006009749 0.0006110691
+ 0.0018588870 0.0008188499 0.0008411508
+ 0.0023563609 0.0010459250 0.0010869150
+ 0.0028804501 0.0012829941 0.0013466120
+ 0.0034379531 0.0015326150 0.0016192500
+ 0.0040225340 0.0017928330 0.0019048119
+ 0.0046354202 0.0020639880 0.0022035320
+ 0.0052711908 0.0023474649 0.0025181000
+ 0.0059363251 0.0026404259 0.0028487111
+ 0.0066329152 0.0029452001 0.0031957659
+ 0.0073490841 0.0032632940 0.0035582529
+ 0.0080807637 0.0035944299 0.0039348011
+ 0.0088355178 0.0039396151 0.0043245698
+ 0.0096289609 0.0043014390 0.0047304570
+ 0.0104655102 0.0046766838 0.0051527582
+ 0.0113350702 0.0050640670 0.0055932738
+ 0.0122496197 0.0054649492 0.0060512018
+ 0.0131988404 0.0058779810 0.0065282308
+ 0.0141810300 0.0063044452 0.0070242109
+ 0.0151987597 0.0067441980 0.0075386940
+ 0.0162404794 0.0072005908 0.0080726901
+ 0.0173083302 0.0076743681 0.0086258948
+ 0.0184124205 0.0081653623 0.0091975229
+ 0.0195518192 0.0086749326 0.0097900750
+ 0.0207353197 0.0092027588 0.0103992401
+ 0.0219628699 0.0097467797 0.0110272104
+ 0.0232388396 0.0103067802 0.0116758104
+ 0.0245534405 0.0108824596 0.0123488903
+ 0.0259076506 0.0114777200 0.0130474502
+ 0.0273041893 0.0120923202 0.0137724997
+ 0.0287391301 0.0127261700 0.0145242196
+ 0.0302102603 0.0133811496 0.0153033203
+ 0.0317212492 0.0140584502 0.0161061808
+ 0.0332731493 0.0147604104 0.0169263799
+ 0.0348760188 0.0154822599 0.0177620295
+ 0.0365183204 0.0162258204 0.0186164491
+ 0.0382087417 0.0169929601 0.0194896292
+ 0.0399495289 0.0177801996 0.0203795508
+ 0.0417297594 0.0185851697 0.0212911796
+ 0.0435510091 0.0194129106 0.0222245902
+ 0.0454129390 0.0202547908 0.0231861304
+ 0.0473076887 0.0211168006 0.0241758395
+ 0.0492347218 0.0219969898 0.0251984708
+ 0.0512037501 0.0229012799 0.0262466706
+ 0.0532191209 0.0238268599 0.0273228493
+ 0.0552755818 0.0247761197 0.0284204800
+ 0.0573842004 0.0257481597 0.0295423996
+ 0.0595382415 0.0267426297 0.0306846593
+ 0.0617300794 0.0277668294 0.0318456888
+ 0.0639634207 0.0288175102 0.0330268405
+ 0.0662460178 0.0298932791 0.0342224501
+ 0.0685783774 0.0309970807 0.0354311503
+ 0.0709521696 0.0321253613 0.0366570689
+ 0.0733637214 0.0332747698 0.0379007794
+ 0.0758268237 0.0344457105 0.0391649790
+ 0.0783338398 0.0356396101 0.0404515490
+ 0.0808990374 0.0368562713 0.0417614505
+ 0.0835125297 0.0380946510 0.0430966802
+ 0.0861754268 0.0393532701 0.0444576107
+ 0.0888888985 0.0406360887 0.0458458997
+ 0.0916479379 0.0419454388 0.0472616889
+ 0.0944517180 0.0432827994 0.0486994199
+ 0.0972917899 0.0446463488 0.0501526110
+ 0.1001828983 0.0460356399 0.0516319200
+ 0.1031202003 0.0474530496 0.0531338789
+ 0.1061026007 0.0488977507 0.0546585694
+ 0.1091277003 0.0503737107 0.0562016517
+ 0.1121969000 0.0518880300 0.0577665791
+ 0.1153125986 0.0534419082 0.0593559109
+ 0.1184772998 0.0550320297 0.0609692894
+ 0.1216840968 0.0566530786 0.0626069382
+ 0.1249388009 0.0583061315 0.0642700866
+ 0.1282431036 0.0599966310 0.0659606308
+ 0.1315928996 0.0617280900 0.0676777512
+ 0.1349757016 0.0634948835 0.0694218278
+ 0.1383993030 0.0652914569 0.0711889118
+ 0.1418682933 0.0671163797 0.0729750469
+ 0.1453785002 0.0689697564 0.0747864991
+ 0.1489267945 0.0708598867 0.0766221583
+ 0.1525138021 0.0727824494 0.0784773678
+ 0.1561374068 0.0747363791 0.0803539827
+ 0.1597927064 0.0767190233 0.0822619572
+ 0.1634854972 0.0787282810 0.0842007920
+ 0.1672230065 0.0807615295 0.0861660689
+ 0.1710027009 0.0828175321 0.0881549865
+ 0.1748190969 0.0849011689 0.0901617482
+ 0.1786739975 0.0870237797 0.0921890587
+ 0.1825643927 0.0891877636 0.0942407027
+ 0.1864794940 0.0913877636 0.0963157490
+ 0.1904242039 0.0936163589 0.0984156132
+ 0.1944115013 0.0958681777 0.1005403996
+ 0.1984315068 0.0981432199 0.1026867032
+ 0.2024817020 0.1004460007 0.1048531979
+ 0.2065692991 0.1027875021 0.1070401967
+ 0.2106909007 0.1051672027 0.1092483029
+ 0.2148406059 0.1075756028 0.1114758030
+ 0.2190158069 0.1100080982 0.1137152985
+ 0.2232162058 0.1124617979 0.1159678996
+ 0.2274380028 0.1149377003 0.1182356998
+ 0.2316682935 0.1174454018 0.1205220968
+ 0.2359098047 0.1199733987 0.1228303015
+ 0.2401736975 0.1225221008 0.1251548976
+ 0.2444601953 0.1250932068 0.1274984032
+ 0.2487654984 0.1276911050 0.1298629940
+ 0.2530876994 0.1303067952 0.1322595030
+ 0.2574402988 0.1329407990 0.1346741021
+ 0.2618153989 0.1355946958 0.1371085942
+ 0.2662160099 0.1382690966 0.1395681947
+ 0.2706286907 0.1409652978 0.1420474052
+ 0.2750388086 0.1436827034 0.1445465982
+ 0.2794604897 0.1464273036 0.1470647007
+ 0.2838951945 0.1492000073 0.1496022046
+ 0.2883372903 0.1519946009 0.1521558017
+ 0.2927843034 0.1548147053 0.1547247022
+ 0.2972404063 0.1576558053 0.1573172063
+ 0.3016996980 0.1605056971 0.1599285007
+ 0.3061661124 0.1633636951 0.1625496000
+ 0.3106426001 0.1662496030 0.1651808023
+ 0.3151304126 0.1691479981 0.1678352952
+ 0.3196105063 0.1720582992 0.1704951972
+ 0.3240850866 0.1749927998 0.1731574982
+ 0.3285588920 0.1779374033 0.1758297980
+ 0.3330225945 0.1808930039 0.1785068065
+ 0.3374676108 0.1838704050 0.1811906993
+ 0.3418787122 0.1868537068 0.1838902980
+ 0.3462742865 0.1898439974 0.1865974069
+ 0.3506546915 0.1928507984 0.1893136948
+ 0.3550148010 0.1958658993 0.1920381039
+ 0.3593491912 0.1988967061 0.1947682947
+ 0.3636716902 0.2019404024 0.1975080073
+ 0.3679802120 0.2049918026 0.2002497017
+ 0.3722729981 0.2080595046 0.2029945999
+ 0.3765603900 0.2111341059 0.2057335973
+ 0.3808422089 0.2142200023 0.2084708959
+ 0.3850818872 0.2173251063 0.2112185955
+ 0.3893063068 0.2204380035 0.2139669061
+ 0.3935188055 0.2235597968 0.2167157978
+ 0.3977065980 0.2266864032 0.2194723934
+ 0.4018787146 0.2298216969 0.2222321928
+ 0.4060066938 0.2329684943 0.2249837965
+ 0.4101200104 0.2361215949 0.2277349979
+ 0.4142099917 0.2392960936 0.2304856032
+ 0.4182651937 0.2424751967 0.2332389951
+ 0.4223062098 0.2456675023 0.2359952033
+ 0.4263221025 0.2488580942 0.2387603074
+ 0.4303199053 0.2520464957 0.2415284067
+ 0.4342919886 0.2552388906 0.2442979962
+ 0.4382177889 0.2584339082 0.2470681965
+ 0.4421251118 0.2616392970 0.2498411983
+ 0.4459949136 0.2648470998 0.2526099086
+ 0.4498532116 0.2680524886 0.2553699017
+ 0.4536815882 0.2712588012 0.2581270933
+ 0.4574846029 0.2744691968 0.2608813047
+ 0.4612646103 0.2776809931 0.2636286914
+ 0.4650110900 0.2808963060 0.2663717866
+ 0.4687466919 0.2841087878 0.2691045105
+ 0.4724290967 0.2873168886 0.2718333900
+ 0.4761005938 0.2905252874 0.2745406926
+ 0.4797236025 0.2937338948 0.2772436142
+ 0.4833352864 0.2969321907 0.2799426019
+ 0.4869242013 0.3001225889 0.2826412022
+ 0.4905020893 0.3033182919 0.2853288949
+ 0.4940682054 0.3065170944 0.2880161107
+ 0.4975984991 0.3097181022 0.2906906009
+ 0.5011065006 0.3129202127 0.2933647931
+ 0.5045886040 0.3161264956 0.2960147858
+ 0.5080611110 0.3193351030 0.2986648083
+ 0.5115216970 0.3225524127 0.3013044894
+ 0.5149798989 0.3257744014 0.3039439917
+ 0.5184119940 0.3289855123 0.3065662980
+ 0.5218411088 0.3321900964 0.3091877103
+ 0.5252186060 0.3353936970 0.3117879033
+ 0.5285930037 0.3385963142 0.3143858016
+ 0.5319072008 0.3417963088 0.3169586957
+ 0.5352197886 0.3449935913 0.3195259869
+ 0.5384925008 0.3481869996 0.3220764101
+ 0.5417643785 0.3513746858 0.3246203065
+ 0.5449957848 0.3545599878 0.3271425962
+ 0.5482258201 0.3577390015 0.3296504021
+ 0.5514274836 0.3609147966 0.3321473897
+ 0.5546270013 0.3640691936 0.3346312940
+ 0.5577927828 0.3672235906 0.3371109962
+ 0.5609536767 0.3703644872 0.3395805061
+ 0.5640918016 0.3735049069 0.3420476019
+ 0.5672239065 0.3766363859 0.3444921076
+ 0.5703287125 0.3797653019 0.3469367027
+ 0.5734214783 0.3828806877 0.3493632078
+ 0.5764908195 0.3859854937 0.3517870903
+ 0.5795422792 0.3890849948 0.3541991115
+ 0.5825762749 0.3921729028 0.3566043973
+ 0.5855858922 0.3952594101 0.3590024114
+ 0.5885831118 0.3983199000 0.3613883853
+ 0.5915424228 0.4013803899 0.3637714088
+ 0.5944979191 0.4044235051 0.3661235869
+ 0.5973832011 0.4074612856 0.3684759140
+ 0.6002684832 0.4104872942 0.3708046079
+ 0.6031265855 0.4134992957 0.3731263876
+ 0.6059790850 0.4165073037 0.3754419982
+ 0.6088135242 0.4194850922 0.3777495921
+ 0.6116350889 0.4224627912 0.3800561130
+ 0.6144289970 0.4254232049 0.3823485970
+ 0.6171646714 0.4283778071 0.3846412003
+ 0.6198990941 0.4313283861 0.3869284093
+ 0.6225900054 0.4342721999 0.3892132044
+ 0.6252809763 0.4372158945 0.3914948106
+ 0.6279500127 0.4401437044 0.3937678039
+ 0.6306102276 0.4430705905 0.3960408866
+ 0.6332606077 0.4459845126 0.3983030021
+ 0.6358942986 0.4488858879 0.4005627036
+ 0.6385279298 0.4517867863 0.4028213918
+ 0.6411197186 0.4546740949 0.4050782025
+ 0.6437116265 0.4575614929 0.4073350132
+ 0.6462585926 0.4604415894 0.4095784128
+ 0.6487771869 0.4633156955 0.4118196964
+ 0.6512870789 0.4661892056 0.4140588045
+ 0.6537609100 0.4690420032 0.4162935913
+ 0.6562346816 0.4718948007 0.4185284078
+ 0.6586757898 0.4747399092 0.4207589924
+ 0.6611058712 0.4775764942 0.4229885936
+ 0.6635295749 0.4804131091 0.4252167940
+ 0.6659365296 0.4832342863 0.4274396896
+ 0.6683434248 0.4860537946 0.4296625853
+ 0.6707113981 0.4888609052 0.4318814874
+ 0.6730682254 0.4916389883 0.4340975881
+ 0.6754177213 0.4944170117 0.4363138080
+ 0.6777454019 0.4971829057 0.4385361969
+ 0.6800730824 0.4999426007 0.4407587945
+ 0.6823896766 0.5027021766 0.4429790080
+ 0.6847013831 0.5054432154 0.4451938868
+ 0.6870059967 0.5081841946 0.4474087059
+ 0.6892570853 0.5109151006 0.4496183991
+ 0.6915082932 0.5136244893 0.4518249035
+ 0.6937376857 0.5163338184 0.4540314078
+ 0.6959462762 0.5190213919 0.4562326968
+ 0.6981548071 0.5216943026 0.4584333897
+ 0.7003312111 0.5243672132 0.4606317878
+ 0.7025029063 0.5270034075 0.4628174901
+ 0.7046647072 0.5296329856 0.4650033116
+ 0.7067890167 0.5322594047 0.4671837091
+ 0.7089133263 0.5348445177 0.4693551958
+ 0.7110230923 0.5374295712 0.4715267122
+ 0.7131193280 0.5399996042 0.4736973047
+ 0.7152153850 0.5425274968 0.4758673906
+ 0.7172769904 0.5450553894 0.4780373871
+ 0.7193294168 0.5475718975 0.4801994860
+ 0.7213792801 0.5500730276 0.4823586047
+ 0.7233660817 0.5525740981 0.4845176935
+ 0.7253528237 0.5550534725 0.4866720140
+ 0.7273290753 0.5575155020 0.4888255000
+ 0.7292746902 0.5599774718 0.4909788966
+ 0.7312203050 0.5624241233 0.4931291044
+ 0.7331498861 0.5648627281 0.4952791035
+ 0.7350592017 0.5673012733 0.4974288940
+ 0.7369683981 0.5697147846 0.4995673001
+ 0.7388588190 0.5721186996 0.5017058253
+ 0.7407366037 0.5745226145 0.5038431287
+ 0.7426143289 0.5768790841 0.5059599280
+ 0.7444639802 0.5792204738 0.5080766082
+ 0.7463030815 0.5815619826 0.5101922750
+ 0.7481421232 0.5838884115 0.5122897029
+ 0.7499330044 0.5862100720 0.5143870711
+ 0.7517132163 0.5885317922 0.5164837837
+ 0.7534933090 0.5908361077 0.5185531974
+ 0.7552289963 0.5931339860 0.5206226110
+ 0.7569586039 0.5954319835 0.5226920247
+ 0.7586882710 0.5977076292 0.5247408152
+ 0.7603802085 0.5999724269 0.5267890096
+ 0.7620685101 0.6022372842 0.5288370848
+ 0.7637568116 0.6044870019 0.5308629870
+ 0.7654249072 0.6067258120 0.5328854918
+ 0.7670909762 0.6089646220 0.5349079967
+ 0.7687572241 0.6111888885 0.5369161963
+ 0.7703763843 0.6133955717 0.5389193892
+ 0.7719892263 0.6156023145 0.5409225225
+ 0.7736020088 0.6177954078 0.5429117084
+ 0.7751833797 0.6199551821 0.5448905230
+ 0.7767575979 0.6221150160 0.5468692780
+ 0.7783316970 0.6242699027 0.5488427281
+ 0.7799007893 0.6263784170 0.5508071780
+ 0.7814676762 0.6284868121 0.5527716875
+ 0.7830346823 0.6305952072 0.5547339916
+ 0.7845696211 0.6326767802 0.5566831827
+ 0.7860810757 0.6347541213 0.5586323738
+ 0.7875925899 0.6368314028 0.5605816245
+ 0.7890849113 0.6388925910 0.5625146031
+ 0.7905498147 0.6409428716 0.5644453764
+ 0.7920145988 0.6429932117 0.5663762093
+ 0.7934713960 0.6450356841 0.5682945848
+ 0.7948976159 0.6470593810 0.5702040195
+ 0.7963238955 0.6490830779 0.5721132755
+ 0.7977501154 0.6511068940 0.5740166903
+ 0.7991691232 0.6531022191 0.5759012103
+ 0.8005877733 0.6550961733 0.5777856112
+ 0.8020066023 0.6570903063 0.5796700716
+ 0.8034045100 0.6590561271 0.5815389156
+ 0.8047934771 0.6610018015 0.5834053159
+ 0.8061826229 0.6629474759 0.5852717757
+ 0.8075594902 0.6648828983 0.5871319771
+ 0.8089175820 0.6667698026 0.5889847875
+ 0.8102757931 0.6686565876 0.5908375978
+ 0.8116320968 0.6705434918 0.5926902294
+ 0.8129532933 0.6724057198 0.5945152044
+ 0.8142744899 0.6742588282 0.5963401794
+ 0.8155958056 0.6761118174 0.5981652141
+ 0.8168948889 0.6779593229 0.5999823809
+ 0.8181831241 0.6797894835 0.6017925739
+ 0.8194714189 0.6816197038 0.6036027074
+ 0.8207564950 0.6834499836 0.6054127812
+ 0.8220325708 0.6852660775 0.6072114706
+ 0.8233085871 0.6870769262 0.6090102196
+ 0.8245846033 0.6888877153 0.6108089089
+ 0.8258383870 0.6906918287 0.6126012802
+ 0.8270868063 0.6924620271 0.6143857241
+ 0.8283351064 0.6942321062 0.6161699891
+ 0.8295804858 0.6960023046 0.6179543734
+ 0.8308194280 0.6977444887 0.6197059155
+ 0.8320583105 0.6994649768 0.6214510202
+ 0.8332971931 0.7011855245 0.6231961846
+ 0.8345112801 0.7029060125 0.6249343753
+ 0.8357185721 0.7046008110 0.6266446710
+ 0.8369258046 0.7062937021 0.6283550262
+ 0.8381229043 0.7079864740 0.6300653219
+ 0.8392837048 0.7096688151 0.6317604184
+ 0.8404445052 0.7113192081 0.6334416270
+ 0.8416053057 0.7129697204 0.6351227164
+ 0.8427382708 0.7146201134 0.6368038058
+ 0.8438537121 0.7162567973 0.6384651065
+ 0.8449690938 0.7178813815 0.6401215792
+ 0.8460845947 0.7195060253 0.6417779922
+ 0.8471649885 0.7211306095 0.6434329748
+ 0.8482443094 0.7227483988 0.6450561881
+ 0.8493235707 0.7243642807 0.6466792822
+ 0.8503887057 0.7259801030 0.6483023763
+ 0.8514184952 0.7275959253 0.6499150991
+ 0.8524482250 0.7291961908 0.6514953971
+ 0.8534778953 0.7307960987 0.6530758142
+ 0.8544930816 0.7323961258 0.6546561122
+ 0.8554970026 0.7339910865 0.6562228203
+ 0.8565009236 0.7355558872 0.6577693820
+ 0.8575047851 0.7371206880 0.6593158841
+ 0.8584917784 0.7386854887 0.6608623862
+ 0.8594745994 0.7402415276 0.6623889208
+ 0.8604573011 0.7417721748 0.6638967991
+ 0.8614401221 0.7433028817 0.6654046774
+ 0.8623782992 0.7448335886 0.6669126153
+ 0.8633162975 0.7463521957 0.6683937907
+ 0.8642541766 0.7478467226 0.6698569059
+ 0.8651856780 0.7493410707 0.6713200212
+ 0.8660802841 0.7508355975 0.6727830768
+ 0.8669748902 0.7523164153 0.6742259264
+ 0.8678696156 0.7537738085 0.6756564975
+ 0.8687558770 0.7552313209 0.6770871878
+ 0.8696188927 0.7566887140 0.6785178185
+ 0.8704819083 0.7581344843 0.6799271703
+ 0.8713449240 0.7595599294 0.6813234091
+ 0.8722006083 0.7609851956 0.6827195883
+ 0.8730415106 0.7624105215 0.6841157079
+ 0.8738824725 0.7638270259 0.6854910851
+ 0.8747234941 0.7652239203 0.6868504286
+ 0.8755509257 0.7666208744 0.6882097721
+ 0.8763540983 0.7680178285 0.6895691156
+ 0.8771572709 0.7694097161 0.6909182072
+ 0.8779605031 0.7707833052 0.6922556162
+ 0.8787578940 0.7721568942 0.6935930252
+ 0.8795443177 0.7735304832 0.6949303746
+ 0.8803306818 0.7749016285 0.6962568164
+ 0.8811172247 0.7762401104 0.6975601912
+ 0.8818970919 0.7775787115 0.6988636851
+ 0.8826605082 0.7789173126 0.7001671195
+ 0.8834239841 0.7802559137 0.7014654875
+ 0.8841875196 0.7815645933 0.7027323842
+ 0.8849436045 0.7828695774 0.7039992213
+ 0.8856664896 0.7841745019 0.7052659988
+ 0.8863893151 0.7854794860 0.7065327764
+ 0.8871122003 0.7867677808 0.7077702880
+ 0.8878350854 0.7880474925 0.7090048194
+ 0.8885604143 0.7893270850 0.7102392912
+ 0.8892856836 0.7906067967 0.7114737034
+ 0.8900108933 0.7918794155 0.7126892805
+ 0.8907362223 0.7931404114 0.7138935924
+ 0.8914461732 0.7944014072 0.7150977850
+ 0.8921533227 0.7956624031 0.7163020968
+ 0.8928604126 0.7969211936 0.7174999714
+ 0.8935676217 0.7981446981 0.7186828256
+ 0.8942708969 0.7993682027 0.7198656797
+ 0.8949717283 0.8005917072 0.7210485935
+ 0.8956726193 0.8018152118 0.7222315073
+ 0.8963733912 0.8030143976 0.7233734727
+ 0.8970720768 0.8042024970 0.7245125771
+ 0.8977661729 0.8053905964 0.7256516814
+ 0.8984603286 0.8065786958 0.7267907262
+ 0.8991544247 0.8077601790 0.7279145122
+ 0.8998485208 0.8089237809 0.7290235758
+ 0.9005149007 0.8100873828 0.7301326990
+ 0.9011809230 0.8112509847 0.7312418222
+ 0.9018470049 0.8124147058 0.7323492169
+ 0.9025130272 0.8135333061 0.7334213853
+ 0.9031683207 0.8146411777 0.7344936728
+ 0.9038167000 0.8157489896 0.7355659008
+ 0.9044650793 0.8168568015 0.7366381288
+ 0.9051135182 0.8179541826 0.7376983166
+ 0.9057582021 0.8190261722 0.7387477160
+ 0.9063869119 0.8200982213 0.7397971153
+ 0.9070156217 0.8211702108 0.7408465743
+ 0.9076442122 0.8222423196 0.7418959737
+ 0.9082729220 0.8232967854 0.7429301143
+ 0.9088765979 0.8243448734 0.7439635992
+ 0.9094702005 0.8253930211 0.7449972034
+ 0.9100638032 0.8264411092 0.7460306883
+ 0.9106575251 0.8274878860 0.7470514178
+ 0.9112505913 0.8285259008 0.7480484843
+ 0.9118415713 0.8295637965 0.7490454912
+ 0.9124326706 0.8306018114 0.7500426173
+ 0.9130237103 0.8316397071 0.7510396242
+ 0.9136146903 0.8326591849 0.7520161271
+ 0.9142035246 0.8336567283 0.7529833913
+ 0.9147909284 0.8346542120 0.7539507151
+ 0.9153783917 0.8356516957 0.7549179792
+ 0.9159657955 0.8366491795 0.7558851838
+ 0.9165533185 0.8376235962 0.7568265200
+ 0.9171171784 0.8385900259 0.7577672005
+ 0.9176810980 0.8395562768 0.7587078214
+ 0.9182450771 0.8405227065 0.7596483827
+ 0.9188089967 0.8414890766 0.7605820894
+ 0.9193634987 0.8424319029 0.7614898086
+ 0.9198989272 0.8433743119 0.7623975277
+ 0.9204342961 0.8443166018 0.7633051276
+ 0.9209697843 0.8452588916 0.7642127872
+ 0.9215052128 0.8461968899 0.7651119828
+ 0.9220255017 0.8471127748 0.7659983039
+ 0.9225360751 0.8480286002 0.7668846250
+ 0.9230468273 0.8489444852 0.7677708864
+ 0.9235574007 0.8498603106 0.7686572075
+ 0.9240680933 0.8507688046 0.7695332766
+ 0.9245592952 0.8516598940 0.7703999877
+ 0.9250469208 0.8525511026 0.7712668180
+ 0.9255344272 0.8534421921 0.7721335888
+ 0.9260219932 0.8543332815 0.7730002999
+ 0.9265089035 0.8552088737 0.7738537788
+ 0.9269595146 0.8560588956 0.7746983767
+ 0.9274101257 0.8569089174 0.7755429745
+ 0.9278606176 0.8577588797 0.7763875723
+ 0.9283112288 0.8586089015 0.7772322297
+ 0.9287610054 0.8594486117 0.7780702710
+ 0.9292058945 0.8602731228 0.7789046168
+ 0.9296509027 0.8610975742 0.7797389030
+ 0.9300957918 0.8619220853 0.7805731893
+ 0.9305406809 0.8627465963 0.7814074755
+ 0.9309821129 0.8635640740 0.7822362781
+ 0.9314101934 0.8643702269 0.7830613256
+ 0.9318383932 0.8651763201 0.7838863730
+ 0.9322664738 0.8659824133 0.7847114205
+ 0.9326946139 0.8667885065 0.7855364084
+ 0.9331154227 0.8675866127 0.7863515019
+ 0.9335113764 0.8683658838 0.7871572971
+ 0.9339073896 0.8691452146 0.7879629731
+ 0.9343034029 0.8699244857 0.7887688279
+ 0.9346994758 0.8707038164 0.7895745039
+ 0.9350925088 0.8714814186 0.7903773189
+ 0.9354733229 0.8722500205 0.7911751866
+ 0.9358540773 0.8730186224 0.7919729948
+ 0.9362348914 0.8737872243 0.7927709222
+ 0.9366155863 0.8745558262 0.7935687900
+ 0.9369941950 0.8753244281 0.7943630815
+ 0.9373536110 0.8760707974 0.7951408029
+ 0.9377130270 0.8768165112 0.7959185839
+ 0.9380723834 0.8775621057 0.7966964245
+ 0.9384316802 0.8783078194 0.7974742055
+ 0.9387910962 0.8790534139 0.7982519865
+ 0.9391242266 0.8797795773 0.7990127802
+ 0.9394561052 0.8804981112 0.7997723222
+ 0.9397879839 0.8812165260 0.8005318046
+ 0.9401199222 0.8819350004 0.8012912869
+ 0.9404518008 0.8826534748 0.8020508289
+ 0.9407855868 0.8833674192 0.8027989864
+ 0.9411200881 0.8840746284 0.8035404086
+ 0.9414545298 0.8847818971 0.8042817116
+ 0.9417889714 0.8854891062 0.8050230145
+ 0.9421234727 0.8861963749 0.8057643771
+ 0.9424526095 0.8869026899 0.8065025806
+ 0.9427763224 0.8875902891 0.8072319031
+ 0.9430999160 0.8882780075 0.8079612255
+ 0.9434236288 0.8889656067 0.8086904883
+ 0.9437472224 0.8896532059 0.8094198108
+ 0.9440696836 0.8903409243 0.8101490736
+ 0.9443870783 0.8910048008 0.8108692765
+ 0.9447045922 0.8916543722 0.8115875721
+ 0.9450219870 0.8923041224 0.8123059273
+ 0.9453393817 0.8929538131 0.8130242229
+ 0.9456567764 0.8936033845 0.8137425184
+ 0.9459626079 0.8942502141 0.8144533038
+ 0.9462655187 0.8948795795 0.8151500821
+ 0.9465684891 0.8955091238 0.8158469200
+ 0.9468713999 0.8961384892 0.8165438175
+ 0.9471743703 0.8967679739 0.8172405958
+ 0.9474688172 0.8973973989 0.8179373741
+ 0.9477491975 0.8980208039 0.8186287880
+ 0.9480295777 0.8986400962 0.8193188906
+ 0.9483100176 0.8992593884 0.8200089931
+ 0.9485903978 0.8998786807 0.8206989765
+ 0.9488707781 0.9004979730 0.8213890791
+ 0.9491494298 0.9011172056 0.8220766783
+ 0.9494279027 0.9017202854 0.8227545023
+ 0.9497063160 0.9023234844 0.8234323859
+ 0.9499847889 0.9029266238 0.8241102099
+ 0.9502632022 0.9035297036 0.8247880936
+ 0.9505476952 0.9041329026 0.8254659176
+ 0.9508438706 0.9047262073 0.8261309862
+ 0.9511401057 0.9053006768 0.8267852068
+ 0.9514362812 0.9058750868 0.8274394274
+ 0.9517325163 0.9064496160 0.8280935884
+ 0.9520286918 0.9070240855 0.8287478089
+ 0.9523310065 0.9075986147 0.8294020295
+ 0.9526355267 0.9081652761 0.8300411105
+ 0.9529399872 0.9087274075 0.8306767941
+ 0.9532445073 0.9092894197 0.8313124776
+ 0.9535490274 0.9098513722 0.8319482803
+ 0.9538534284 0.9104133844 0.8325840235
+ 0.9541549087 0.9109753966 0.8332191706
+ 0.9544565082 0.9115229845 0.8338392973
+ 0.9547581077 0.9120678902 0.8344593048
+ 0.9550595880 0.9126127958 0.8350793123
+ 0.9553611875 0.9131575823 0.8356993794
+ 0.9556581974 0.9137024879 0.8363193870
+ 0.9559459090 0.9142473936 0.8369358778
+ 0.9562335014 0.9147704840 0.8375366926
+ 0.9565210938 0.9152935147 0.8381375074
+ 0.9568086863 0.9158164859 0.8387383223
+ 0.9570962787 0.9163393974 0.8393390775
+ 0.9573791027 0.9168624282 0.8399398923
+ 0.9576573968 0.9173836112 0.8405390978
+ 0.9579358101 0.9178845882 0.8411338925
+ 0.9582142234 0.9183856249 0.8417286873
+ 0.9584925771 0.9188866019 0.8423236012
+ 0.9587709904 0.9193875790 0.8429183960
+ 0.9590389132 0.9198886156 0.8435133100
+ 0.9593018293 0.9203869104 0.8441042900
+ 0.9595646262 0.9208633900 0.8446862102
+ 0.9598274827 0.9213399291 0.8452680111
+ 0.9600902796 0.9218164086 0.8458498716
+ 0.9603531957 0.9222928882 0.8464317918
+ 0.9606087208 0.9227694273 0.8470137119
+ 0.9608618021 0.9232439995 0.8475909233
+ 0.9611148834 0.9236922264 0.8481546044
+ 0.9613680243 0.9241403937 0.8487182856
+ 0.9616211057 0.9245886207 0.8492819071
+ 0.9618741870 0.9250367880 0.8498455882
+ 0.9621182084 0.9254850149 0.8504093289
+ 0.9623593092 0.9259333014 0.8509712815
+ 0.9626005292 0.9263677001 0.8515232801
+ 0.9628416896 0.9268016815 0.8520752788
+ 0.9630827904 0.9272356033 0.8526272774
+ 0.9633240104 0.9276695848 0.8531792760
+ 0.9635608792 0.9281035066 0.8537312746
+ 0.9637960792 0.9285374880 0.8542832732
+ 0.9640312791 0.9289491773 0.8548194766
+ 0.9642664790 0.9293550849 0.8553553224
+ 0.9645017982 0.9297609925 0.8558911085
+ 0.9647369981 0.9301669002 0.8564267755
+ 0.9649640918 0.9305728078 0.8569626212
+ 0.9651858807 0.9309787154 0.8574984074
+ 0.9654077888 0.9313749075 0.8580273986
+ 0.9656295776 0.9317634106 0.8585538864
+ 0.9658514261 0.9321519136 0.8590804935
+ 0.9660732150 0.9325404763 0.8596069813
+ 0.9662867188 0.9329289794 0.8601335287
+ 0.9664887190 0.9333174825 0.8606600761
+ 0.9666907787 0.9337003827 0.8611857295
+ 0.9668927789 0.9340664744 0.8617103100
+ 0.9670948982 0.9344326258 0.8622347713
+ 0.9672968984 0.9347985983 0.8627592921
+ 0.9674957991 0.9351646900 0.8632838130
+ 0.9676799178 0.9355307817 0.8638082743
+ 0.9678639174 0.9358968735 0.8643323183
+ 0.9680479169 0.9362515807 0.8648458719
+ 0.9682319164 0.9366047978 0.8653594851
+ 0.9684159756 0.9369578958 0.8658730984
+ 0.9685999751 0.9373109937 0.8663867116
+ 0.9687842727 0.9376642108 0.8669003248
+ 0.9689685702 0.9380173087 0.8674138784
+ 0.9691529274 0.9383693933 0.8679202795
+ 0.9693372250 0.9387202263 0.8684219718
+ 0.9695215225 0.9390708804 0.8689237833
+ 0.9697058201 0.9394217134 0.8694254756
+ 0.9698892236 0.9397724271 0.8699272275
+ 0.9700716734 0.9401232004 0.8704289794
+ 0.9702541232 0.9404739141 0.8709301949
+ 0.9704365134 0.9408150911 0.8714262247
+ 0.9706190228 0.9411553741 0.8719220757
+ 0.9708014131 0.9414957166 0.8724181056
+ 0.9709836841 0.9418359995 0.8729140759
+ 0.9711577892 0.9421764016 0.8734099865
+ 0.9713318944 0.9425166845 0.8739060163
+ 0.9715059996 0.9428496957 0.8744006157
+ 0.9716801047 0.9431682229 0.8748937249
+ 0.9718542099 0.9434866905 0.8753868937
+ 0.9720283747 0.9438052177 0.8758801222
+ 0.9721953273 0.9441236854 0.8763732910
+ 0.9723548889 0.9444422722 0.8768664002
+ 0.9725145102 0.9447607994 0.8773596287
+ 0.9726741910 0.9450662732 0.8778408170
+ 0.9728338122 0.9453657866 0.8783197999
+ 0.9729933739 0.9456652999 0.8787987828
+ 0.9731529951 0.9459646940 0.8792778254
+ 0.9732946754 0.9462642074 0.8797568083
+ 0.9734343886 0.9465637207 0.8802356720
+ 0.9735741019 0.9468631744 0.8807138205
+ 0.9737136960 0.9471693039 0.8811848164
+ 0.9738534093 0.9474757910 0.8816556931
+ 0.9739931226 0.9477822781 0.8821266890
+ 0.9741299152 0.9480888247 0.8825976849
+ 0.9742575288 0.9483953118 0.8830686212
+ 0.9743850827 0.9487017989 0.8835396171
+ 0.9745125771 0.9490079880 0.8840103149
+ 0.9746401906 0.9493122101 0.8844805956
+ 0.9747678041 0.9496163726 0.8849508166
+ 0.9748952985 0.9499207139 0.8854210973
+ 0.9750214219 0.9502248764 0.8858913183
+ 0.9751458764 0.9505292177 0.8863615990
+ 0.9752703905 0.9508333802 0.8868318200
+ 0.9753949046 0.9511339068 0.8872954845
+ 0.9755194783 0.9514247775 0.8877508044
+ 0.9756439924 0.9517157078 0.8882061243
+ 0.9757685065 0.9520065784 0.8886613846
+ 0.9758896232 0.9522975087 0.8891167045
+ 0.9760090113 0.9525884986 0.8895720243
+ 0.9761283994 0.9528794289 0.8900272846
+ 0.9762479067 0.9531695247 0.8904743195
+ 0.9763672948 0.9534580112 0.8909124732
+ 0.9764866829 0.9537466168 0.8913506866
+ 0.9766061902 0.9540351033 0.8917888999
+ 0.9767202735 0.9543237090 0.8922271132
+ 0.9768331051 0.9546121955 0.8926653266
+ 0.9769458771 0.9549006820 0.8931034803
+ 0.9770585895 0.9551869035 0.8935418129
+ 0.9771714211 0.9554678202 0.8939803243
+ 0.9772841930 0.9557486773 0.8944187760
+ 0.9773970246 0.9560295939 0.8948572874
+ 0.9775123000 0.9563105106 0.8952959180
+ 0.9776281118 0.9565914273 0.8957344294
+ 0.9777439237 0.9568722844 0.8961728811
+ 0.9778596759 0.9571502805 0.8966065049
+ 0.9779754877 0.9574174285 0.8970314264
+ 0.9780912995 0.9576845169 0.8974562883
+ 0.9782071114 0.9579516053 0.8978813291
+ 0.9783318043 0.9582186937 0.8983061910
+ 0.9784587026 0.9584857821 0.8987311125
+ 0.9785856009 0.9587529898 0.8991559744
+ 0.9787124991 0.9590197206 0.8995798230
+ 0.9788395166 0.9592756033 0.8999984860
+ 0.9789664149 0.9595314860 0.9004172087
+ 0.9790933132 0.9597874284 0.9008359909
+ 0.9792243838 0.9600433111 0.9012547135
+ 0.9793574214 0.9602991939 0.9016733766
+ 0.9794905186 0.9605550766 0.9020922184
+ 0.9796234965 0.9608110189 0.9025108814
+ 0.9797564745 0.9610598087 0.9029234052
+ 0.9798895717 0.9613065720 0.9033355117
+ 0.9800226092 0.9615533948 0.9037474990
+ 0.9801558256 0.9618002176 0.9041596055
+ 0.9802892208 0.9620471001 0.9045715928
+ 0.9804226160 0.9622939229 0.9049835801
+ 0.9805560112 0.9625406861 0.9053956866
+ 0.9806892872 0.9627807736 0.9057967067
+ 0.9808226824 0.9630126953 0.9061899185
+ 0.9809560776 0.9632446766 0.9065830708
+ 0.9810881019 0.9634765983 0.9069762826
+ 0.9812154174 0.9637085199 0.9073694944
+ 0.9813426733 0.9639403820 0.9077627063
+ 0.9814701080 0.9641724229 0.9081559181
+ 0.9815974236 0.9644042850 0.9085468054
+ 0.9817246795 0.9646360278 0.9089267254
+ 0.9818521142 0.9648677111 0.9093065262
+ 0.9819794297 0.9650995135 0.9096863866
+ 0.9821053743 0.9653311968 0.9100661874
+ 0.9822311997 0.9655628800 0.9104459882
+ 0.9823570251 0.9657946825 0.9108259082
+ 0.9824826717 0.9660264254 0.9112057090
+ 0.9826084971 0.9662542939 0.9115757942
+ 0.9827343225 0.9664790034 0.9119412899
+ 0.9828600883 0.9667037129 0.9123067856
+ 0.9829840064 0.9669284225 0.9126722217
+ 0.9831055999 0.9671530724 0.9130377173
+ 0.9832271934 0.9673777819 0.9134030938
+ 0.9833487868 0.9676026106 0.9137685895
+ 0.9834703803 0.9678273201 0.9141318202
+ 0.9835919738 0.9680370092 0.9144750237
+ 0.9837136269 0.9682462811 0.9148182273
+ 0.9838352203 0.9684554935 0.9151614904
+ 0.9839490056 0.9686648250 0.9155046940
+ 0.9840624928 0.9688740969 0.9158478975
+ 0.9841759801 0.9690833092 0.9161911011
+ 0.9842895269 0.9692925811 0.9165343046
+ 0.9844030142 0.9694945812 0.9168791175
+ 0.9845163822 0.9696804285 0.9172258973
+ 0.9846299291 0.9698662758 0.9175727963
+ 0.9847432971 0.9700521231 0.9179195762
+ 0.9848564267 0.9702379704 0.9182664156
+ 0.9849694967 0.9704238176 0.9186133146
+ 0.9850826859 0.9706097245 0.9189600945
+ 0.9851958156 0.9707955718 0.9193068743
+ 0.9853088856 0.9709764719 0.9196500182
+ 0.9854220748 0.9711537957 0.9199913740
+ 0.9855352044 0.9713311195 0.9203327894
+ 0.9856474996 0.9715083838 0.9206743240
+ 0.9857596159 0.9716858268 0.9210156798
+ 0.9858716130 0.9718630910 0.9213570952
+ 0.9859836102 0.9720404148 0.9216985703
+ 0.9860956073 0.9722176790 0.9220399857
+ 0.9862076044 0.9723867774 0.9223676920
+ 0.9863196015 0.9725531936 0.9226933122
+ 0.9864315987 0.9727196097 0.9230188727
+ 0.9865403175 0.9728860259 0.9233446121
+ 0.9866489172 0.9730523825 0.9236701727
+ 0.9867573977 0.9732187986 0.9239959121
+ 0.9868658781 0.9733852148 0.9243214726
+ 0.9869744182 0.9735515714 0.9246470928
+ 0.9870830178 0.9737042189 0.9249747992
+ 0.9871914983 0.9738543034 0.9253026247
+ 0.9872993231 0.9740043283 0.9256303906
+ 0.9874020219 0.9741542935 0.9259580970
+ 0.9875046015 0.9743043184 0.9262859225
+ 0.9876071811 0.9744542837 0.9266136885
+ 0.9877098203 0.9746043086 0.9269413948
+ 0.9878123999 0.9747542739 0.9272692204
+ 0.9879150987 0.9748876095 0.9276003242
+ 0.9880176783 0.9750179052 0.9279316068
+ 0.9881187081 0.9751480818 0.9282628298
+ 0.9882128835 0.9752783775 0.9285941124
+ 0.9883071184 0.9754086733 0.9289252758
+ 0.9884012938 0.9755390286 0.9292566180
+ 0.9884955287 0.9756692052 0.9295879006
+ 0.9885897040 0.9757995009 0.9299191236
+ 0.9886838794 0.9759184122 0.9302431941
+ 0.9887781143 0.9760339260 0.9305663109
+ 0.9888703227 0.9761493802 0.9308894873
+ 0.9889534116 0.9762648940 0.9312126040
+ 0.9890366197 0.9763804078 0.9315357208
+ 0.9891197085 0.9764959216 0.9318587780
+ 0.9892027974 0.9766113758 0.9321818948
+ 0.9892858863 0.9767268896 0.9325050116
+ 0.9893689752 0.9768431187 0.9328215718
+ 0.9894521236 0.9769597054 0.9331353903
+ 0.9895340800 0.9770764112 0.9334493279
+ 0.9896032810 0.9771929979 0.9337630868
+ 0.9896724820 0.9773095846 0.9340769053
+ 0.9897418022 0.9774262905 0.9343907833
+ 0.9898110032 0.9775428772 0.9347046018
+ 0.9898802042 0.9776595235 0.9350184798
+ 0.9899495244 0.9777796865 0.9353330135
+ 0.9900187254 0.9779065847 0.9356483817
+ 0.9900879264 0.9780334830 0.9359638095
+ 0.9901421070 0.9781603813 0.9362791181
+ 0.9901946187 0.9782872796 0.9365944862
+ 0.9902470708 0.9784141779 0.9369099140
+ 0.9902997017 0.9785410762 0.9372252822
+ 0.9903522134 0.9786679745 0.9375407100
+ 0.9904047847 0.9787948132 0.9378561974
+ 0.9904572964 0.9789273143 0.9381728768
+ 0.9905098081 0.9790598154 0.9384894967
+ 0.9905501008 0.9791921973 0.9388061762
+ 0.9905833006 0.9793246984 0.9391229153
+ 0.9906166196 0.9794571996 0.9394394755
+ 0.9906498194 0.9795895815 0.9397562146
+ 0.9906830192 0.9797220826 0.9400727749
+ 0.9907162189 0.9798545837 0.9403895140
+ 0.9907494187 0.9799873829 0.9406992793
+ 0.9907826185 0.9801204205 0.9410055280
+ 0.9908105135 0.9802533984 0.9413117170
+ 0.9908241034 0.9803863764 0.9416180253
+ 0.9908378124 0.9805194139 0.9419242144
+ 0.9908514023 0.9806525111 0.9422304034
+ 0.9908649921 0.9807854891 0.9425367117
+ 0.9908785820 0.9809185266 0.9428429008
+ 0.9908922911 0.9810513854 0.9431486726
+ 0.9909058809 0.9811798930 0.9434512854
+ 0.9909194708 0.9813084006 0.9437538981
+ 0.9909344912 0.9814370275 0.9440565705
+ 0.9909498096 0.9815654755 0.9443591833
+ 0.9909651279 0.9816941023 0.9446619153
+ 0.9909805059 0.9818226099 0.9449645281
+ 0.9909958243 0.9819511771 0.9452670813
+ 0.9910110831 0.9820796847 0.9455698133
+ 0.9910264015 0.9822043180 0.9458690882
+ 0.9910417199 0.9823232293 0.9461650848
+ 0.9910593033 0.9824422002 0.9464610219
+ 0.9910830855 0.9825611711 0.9467570186
+ 0.9911068082 0.9826800823 0.9470530152
+ 0.9911304712 0.9827991128 0.9473490119
+ 0.9911543131 0.9829180241 0.9476450086
+ 0.9911779761 0.9830369949 0.9479410052
+ 0.9912016988 0.9831560254 0.9482370019
+ 0.9912254214 0.9832714796 0.9485340714
+ 0.9912492037 0.9833855033 0.9488316178
+ 0.9912775159 0.9834995270 0.9491291046
+ 0.9913085103 0.9836134911 0.9494264722
+ 0.9913393855 0.9837275147 0.9497240186
+ 0.9913703799 0.9838414788 0.9500213861
+ 0.9914013147 0.9839556217 0.9503188729
+ 0.9914323092 0.9840695858 0.9506164193
+ 0.9914631844 0.9841836095 0.9509137869
+ 0.9914941788 0.9842914939 0.9512110949
+ 0.9915251136 0.9843987226 0.9515084028
+ 0.9915609956 0.9845058918 0.9518057108
+ 0.9915972948 0.9846131206 0.9521030188
+ 0.9916337132 0.9847202897 0.9524002075
+ 0.9916700125 0.9848275185 0.9526975155
+ 0.9917063117 0.9849346876 0.9529948235
+ 0.9917426705 0.9850419164 0.9532920718
+ 0.9917790294 0.9851490855 0.9535887241
+ 0.9918153286 0.9852461815 0.9538760185
+ 0.9918519855 0.9853430986 0.9541633129
+ 0.9918923974 0.9854400158 0.9544506073
+ 0.9919328094 0.9855368733 0.9547379017
+ 0.9919732213 0.9856337905 0.9550251961
+ 0.9920135736 0.9857307076 0.9553123713
+ 0.9920539856 0.9858275056 0.9555997252
+ 0.9920943975 0.9859244227 0.9558870196
+ 0.9921348095 0.9860212803 0.9561737180
+ 0.9921752214 0.9861149192 0.9564520121
+ 0.9922161102 0.9862084985 0.9567303061
+ 0.9922596216 0.9863020778 0.9570086002
+ 0.9923030138 0.9863955975 0.9572867751
+ 0.9923465252 0.9864891768 0.9575651288
+ 0.9923899770 0.9865828156 0.9578434229
+ 0.9924334884 0.9866762757 0.9581217170
+ 0.9924769998 0.9867699146 0.9583998919
+ 0.9925205112 0.9868633747 0.9586781859
+ 0.9925640225 0.9869536757 0.9589493871
+ 0.9926077724 0.9870436192 0.9592202902
+ 0.9926536083 0.9871335030 0.9594913125
+ 0.9926993251 0.9872233868 0.9597622156
+ 0.9927451015 0.9873132706 0.9600331187
+ 0.9927908778 0.9874032140 0.9603040218
+ 0.9928365946 0.9874930978 0.9605749249
+ 0.9928823709 0.9875829816 0.9608458877
+ 0.9929282069 0.9876729250 0.9611167908
+ 0.9929739237 0.9877598286 0.9613807201
+ 0.9930197001 0.9878454208 0.9616423249
+ 0.9930669069 0.9879310131 0.9619039893
+ 0.9931141138 0.9880164862 0.9621657133
+ 0.9931613207 0.9881020784 0.9624273777
+ 0.9932085276 0.9881876707 0.9626889825
+ 0.9932556748 0.9882733226 0.9629507065
+ 0.9933028221 0.9883589149 0.9632123709
+ 0.9933500290 0.9884445071 0.9634739757
+ 0.9933971763 0.9885308146 0.9637349844
+ 0.9934443831 0.9886181951 0.9639952183
+ 0.9934918880 0.9887055755 0.9642552733
+ 0.9935395122 0.9887928963 0.9645155072
+ 0.9935870767 0.9888802767 0.9647756219
+ 0.9936347008 0.9889677167 0.9650356770
+ 0.9936823249 0.9890550971 0.9652959108
+ 0.9937298894 0.9891424775 0.9655560255
+ 0.9937775135 0.9892299175 0.9658161998
+ 0.9938250780 0.9893172979 0.9660758972
+ 0.9938727021 0.9894027710 0.9663285017
+ 0.9939200282 0.9894883037 0.9665812254
+ 0.9939668179 0.9895737767 0.9668337703
+ 0.9940136075 0.9896594286 0.9670864940
+ 0.9940603971 0.9897449017 0.9673390985
+ 0.9941071868 0.9898303747 0.9675918221
+ 0.9941540956 0.9899159074 0.9678444266
+ 0.9942008853 0.9900014997 0.9680969715
+ 0.9942476749 0.9900869727 0.9683496952
+ 0.9942945242 0.9901695848 0.9685934186
+ 0.9943410754 0.9902492166 0.9688298702
+ 0.9943857789 0.9903287888 0.9690665007
+ 0.9944304228 0.9904084206 0.9693030119
+ 0.9944751263 0.9904879928 0.9695395827
+ 0.9945198298 0.9905676246 0.9697762132
+ 0.9945644140 0.9906471968 0.9700127244
+ 0.9946091175 0.9907268286 0.9702492952
+ 0.9946537018 0.9908064008 0.9704858065
+ 0.9946984053 0.9908859730 0.9707223773
+ 0.9947431087 0.9909566045 0.9709470272
+ 0.9947856069 0.9910261035 0.9711709023
+ 0.9948266745 0.9910956025 0.9713948965
+ 0.9948678017 0.9911652207 0.9716188908
+ 0.9949088097 0.9912347198 0.9718428254
+ 0.9949498773 0.9913042188 0.9720668197
+ 0.9949908853 0.9913737774 0.9722908139
+ 0.9950320125 0.9914432764 0.9725146890
+ 0.9950730801 0.9915127754 0.9727386832
+ 0.9951140881 0.9915797710 0.9729639292
+ 0.9951552153 0.9916355014 0.9731928706
+ 0.9951915145 0.9916911721 0.9734219909
+ 0.9952275753 0.9917469025 0.9736511111
+ 0.9952636957 0.9918025732 0.9738801122
+ 0.9952998161 0.9918583035 0.9741091728
+ 0.9953358769 0.9919139743 0.9743381739
+ 0.9953719974 0.9919697046 0.9745672941
+ 0.9954081178 0.9920253754 0.9747962952
+ 0.9954441786 0.9920811057 0.9750254154
+ 0.9954802990 0.9921348095 0.9752535820
+ 0.9955152273 0.9921852946 0.9754807949
+ 0.9955464005 0.9922357798 0.9757078886
+ 0.9955775142 0.9922863245 0.9759351015
+ 0.9956086874 0.9923368096 0.9761621952
+ 0.9956398010 0.9923872948 0.9763892889
+ 0.9956709743 0.9924377799 0.9766165018
+ 0.9957020879 0.9924883246 0.9768435955
+ 0.9957333207 0.9925388098 0.9770708084
+ 0.9957643747 0.9925892949 0.9772979021
+ 0.9957956076 0.9926403165 0.9775205851
+ 0.9958270788 0.9926918149 0.9777389169
+ 0.9958592057 0.9927433729 0.9779571891
+ 0.9958912134 0.9927948713 0.9781755209
+ 0.9959232807 0.9928464293 0.9783937931
+ 0.9959554076 0.9928979874 0.9786121249
+ 0.9959874749 0.9929494858 0.9788303971
+ 0.9960194826 0.9930011034 0.9790487289
+ 0.9960516095 0.9930526018 0.9792670012
+ 0.9960836768 0.9931041002 0.9794852138
+ 0.9961156845 0.9931588173 0.9797025919
+ 0.9961478114 0.9932174087 0.9799190164
+ 0.9961798787 0.9932761192 0.9801353216
+ 0.9962120056 0.9933347702 0.9803516269
+ 0.9962440133 0.9933934808 0.9805679917
+ 0.9962760806 0.9934520721 0.9807842970
+ 0.9963082075 0.9935107827 0.9810007215
+ 0.9963402152 0.9935694933 0.9812170267
+ 0.9963722825 0.9936280847 0.9814332724
+ 0.9964044094 0.9936867952 0.9816496968
+ 0.9964364767 0.9937475920 0.9818658829
+ 0.9964681864 0.9938132763 0.9820817709
+ 0.9964997172 0.9938790202 0.9822977781
+ 0.9965311289 0.9939447045 0.9825137258
+ 0.9965624809 0.9940103889 0.9827296734
+ 0.9965938926 0.9940760732 0.9829456210
+ 0.9966253042 0.9941418171 0.9831615090
+ 0.9966567159 0.9942075014 0.9833775163
+ 0.9966881275 0.9942731857 0.9835934043
+ 0.9967194796 0.9943389297 0.9838094115
+ 0.9967508912 0.9944049120 0.9840244055
+ 0.9967818856 0.9944759011 0.9842302203
+ 0.9968118072 0.9945470095 0.9844359159
+ 0.9968416095 0.9946179986 0.9846416712
+ 0.9968714714 0.9946889877 0.9848474860
+ 0.9969013929 0.9947599769 0.9850531816
+ 0.9969311953 0.9948310256 0.9852589965
+ 0.9969611168 0.9949020743 0.9854648113
+ 0.9969909787 0.9949731231 0.9856705070
+ 0.9970209002 0.9950441122 0.9858763218
+ 0.9970507026 0.9951151013 0.9860820174
+ 0.9970806837 0.9951882958 0.9862825871
+ 0.9971145988 0.9952625036 0.9864811897
+ 0.9971485138 0.9953365922 0.9866797924
+ 0.9971824288 0.9954108000 0.9868783951
+ 0.9972162843 0.9954848886 0.9870769978
+ 0.9972501993 0.9955590963 0.9872756004
+ 0.9972841144 0.9956331849 0.9874743223
+ 0.9973180294 0.9957073927 0.9876729250
+ 0.9973520041 0.9957814813 0.9878715277
+ 0.9973859191 0.9958556890 0.9880700707
+ 0.9974197745 0.9959298968 0.9882662892
+ 0.9974561930 0.9960047007 0.9884554744
+ 0.9974939227 0.9960793853 0.9886447787
+ 0.9975317121 0.9961541295 0.9888340235
+ 0.9975695014 0.9962288737 0.9890233278
+ 0.9976071715 0.9963036180 0.9892125130
+ 0.9976450205 0.9963783026 0.9894018173
+ 0.9976828098 0.9964529872 0.9895910025
+ 0.9977204800 0.9965277910 0.9897803068
+ 0.9977583289 0.9966024756 0.9899694920
+ 0.9977961183 0.9966772199 0.9901587963
+ 0.9978342056 0.9967505932 0.9903476834
+ 0.9978744984 0.9968233109 0.9905365109
+ 0.9979146719 0.9968960285 0.9907252789
+ 0.9979549050 0.9969686866 0.9909141064
+ 0.9979951978 0.9970412850 0.9911028147
+ 0.9980353713 0.9971140027 0.9912915826
+ 0.9980756044 0.9971867204 0.9914804101
+ 0.9981158972 0.9972593784 0.9916691780
+ 0.9981560707 0.9973320961 0.9918578863
+ 0.9981964231 0.9974046946 0.9920467138
+ 0.9982365966 0.9974774122 0.9922354817
+ 0.9982774258 0.9975458980 0.9924197197
+ 0.9983186722 0.9976140857 0.9926037192
+ 0.9983600974 0.9976822734 0.9927877188
+ 0.9984014034 0.9977505207 0.9929717779
+ 0.9984427094 0.9978188276 0.9931557775
+ 0.9984840155 0.9978870153 0.9933397770
+ 0.9985253215 0.9979552031 0.9935238957
+ 0.9985666275 0.9980235100 0.9937078953
+ 0.9986079931 0.9980916977 0.9938918948
+ 0.9986492991 0.9981598854 0.9940760136
+ 0.9986906052 0.9982272983 0.9942585826
+ 0.9987317920 0.9982891083 0.9944334030
+ 0.9987729192 0.9983509779 0.9946082234
+ 0.9988141060 0.9984129071 0.9947831035
+ 0.9988551736 0.9984747171 0.9949579239
+ 0.9988964200 0.9985365868 0.9951328039
+ 0.9989374876 0.9985983968 0.9953076243
+ 0.9989786148 0.9986603260 0.9954825044
+ 0.9990198016 0.9987221956 0.9956573248
+ 0.9990609288 0.9987840056 0.9958320856
+ 0.9991021156 0.9988458753 0.9960070252
+ 0.9991431832 0.9989060760 0.9961810708
+ 0.9991831779 0.9989601970 0.9963524938
+ 0.9992231131 0.9990143776 0.9965239167
+ 0.9992631078 0.9990684986 0.9966952801
+ 0.9993029833 0.9991226196 0.9968667030
+ 0.9993429780 0.9991768003 0.9970381856
+ 0.9993829131 0.9992309213 0.9972096086
+ 0.9994229078 0.9992849827 0.9973809719
+ 0.9994627833 0.9993392229 0.9975523949
+ 0.9995027781 0.9993932843 0.9977238178
+ 0.9995427132 0.9994474053 0.9978951812
+ 0.9995825291 0.9995000958 0.9980673790
+ 0.9996204972 0.9995455146 0.9982430935
+ 0.9996584058 0.9995909929 0.9984188080
+ 0.9996963739 0.9996364117 0.9985945225
+ 0.9997342825 0.9996818900 0.9987701774
+ 0.9997723103 0.9997273088 0.9989458919
+ 0.9998102188 0.9997727871 0.9991214871
+ 0.9998481870 0.9998182058 0.9992972016
+ 0.9998860955 0.9998636842 0.9994729161
+ 0.9999241233 0.9999091029 0.9996485710
+ 0.9999619722 0.9999545813 0.9998242855
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/kodak_ektachrome_320t.spi1d b/release/datafiles/colormanagement/luts/film_response/kodak_ektachrome_320t.spi1d
new file mode 100644
index 00000000000..64ffe96f861
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/kodak_ektachrome_320t.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0002252978 0.0001790309 0.0001295420
+ 0.0004642465 0.0003632053 0.0002623819
+ 0.0007179323 0.0005541568 0.0004006781
+ 0.0009859804 0.0007514893 0.0005452139
+ 0.0012678721 0.0009573574 0.0006973416
+ 0.0015588400 0.0011699020 0.0008563135
+ 0.0018630330 0.0013911340 0.0010223610
+ 0.0021819880 0.0016211460 0.0011926870
+ 0.0025155889 0.0018565780 0.0013685439
+ 0.0028599249 0.0021005161 0.0015487690
+ 0.0032150650 0.0023508291 0.0017341210
+ 0.0035848729 0.0026105260 0.0019261140
+ 0.0039705001 0.0028831610 0.0021247759
+ 0.0043733879 0.0031664821 0.0023306201
+ 0.0047887620 0.0034602690 0.0025444049
+ 0.0052145422 0.0037645160 0.0027661640
+ 0.0056500668 0.0040802141 0.0029950261
+ 0.0061007268 0.0044055800 0.0032312879
+ 0.0065691760 0.0047432170 0.0034755419
+ 0.0070610601 0.0050931652 0.0037271639
+ 0.0075698970 0.0054551372 0.0039859852
+ 0.0080941729 0.0058285771 0.0042510540
+ 0.0086274194 0.0062132268 0.0045252559
+ 0.0091798287 0.0066124098 0.0048091090
+ 0.0097458120 0.0070239422 0.0051020859
+ 0.0103271501 0.0074481708 0.0054048309
+ 0.0109248599 0.0078837927 0.0057164561
+ 0.0115405796 0.0083313556 0.0060368772
+ 0.0121761197 0.0087913852 0.0063676350
+ 0.0128270397 0.0092629055 0.0067081312
+ 0.0134987198 0.0097476542 0.0070575029
+ 0.0141942296 0.0102479504 0.0074174819
+ 0.0149099398 0.0107645998 0.0077879899
+ 0.0156464409 0.0112993503 0.0081683872
+ 0.0164025500 0.0118529601 0.0085596293
+ 0.0171775799 0.0124243395 0.0089649754
+ 0.0179736298 0.0130097996 0.0093868207
+ 0.0187904108 0.0136122899 0.0098197656
+ 0.0196329206 0.0142326104 0.0102641098
+ 0.0205026697 0.0148694804 0.0107198805
+ 0.0213967599 0.0155238304 0.0111865401
+ 0.0223194696 0.0161926802 0.0116670104
+ 0.0232650694 0.0168744400 0.0121609699
+ 0.0242343191 0.0175730493 0.0126681803
+ 0.0252331793 0.0182904303 0.0131873302
+ 0.0262477491 0.0190270096 0.0137195401
+ 0.0272829495 0.0197816994 0.0142644998
+ 0.0283390097 0.0205556992 0.0148215797
+ 0.0294161700 0.0213519502 0.0153918499
+ 0.0305210594 0.0221705697 0.0159767196
+ 0.0316550806 0.0230139699 0.0165775400
+ 0.0328192115 0.0238830894 0.0171922501
+ 0.0340085700 0.0247773398 0.0178213306
+ 0.0352222398 0.0256955195 0.0184620898
+ 0.0364655294 0.0266327392 0.0191150103
+ 0.0377436206 0.0275894795 0.0197834391
+ 0.0390567891 0.0285663195 0.0204676799
+ 0.0404002182 0.0295625906 0.0211681798
+ 0.0417738296 0.0305766594 0.0218840092
+ 0.0431732200 0.0316094011 0.0226133801
+ 0.0445903614 0.0326650515 0.0233574491
+ 0.0460246801 0.0337462984 0.0241182297
+ 0.0474831313 0.0348512717 0.0248960592
+ 0.0489709415 0.0359775797 0.0256870594
+ 0.0504862815 0.0371238813 0.0264920406
+ 0.0520257801 0.0382876694 0.0273139309
+ 0.0535882413 0.0394724905 0.0281523801
+ 0.0551759303 0.0406848602 0.0290120896
+ 0.0567948110 0.0419235602 0.0298898704
+ 0.0584423989 0.0431861505 0.0307816397
+ 0.0601175204 0.0444719717 0.0316898413
+ 0.0618218705 0.0457797199 0.0326160900
+ 0.0635616332 0.0471059717 0.0335598104
+ 0.0653382763 0.0484526493 0.0345212892
+ 0.0671429336 0.0498179607 0.0355015099
+ 0.0689680427 0.0512084812 0.0364993811
+ 0.0708093792 0.0526283309 0.0375161916
+ 0.0726710036 0.0540754311 0.0385530815
+ 0.0745575577 0.0555453300 0.0396075509
+ 0.0764711723 0.0570352189 0.0406817608
+ 0.0784109309 0.0585439503 0.0417732410
+ 0.0803771317 0.0600703284 0.0428790301
+ 0.0823737681 0.0616120808 0.0439984985
+ 0.0844059363 0.0631667823 0.0451391600
+ 0.0864771232 0.0647454932 0.0462969095
+ 0.0885818601 0.0663540736 0.0474717803
+ 0.0907145590 0.0679863468 0.0486642793
+ 0.0928772986 0.0696446896 0.0498744808
+ 0.0950741023 0.0713270679 0.0511019900
+ 0.0973075032 0.0730293319 0.0523469895
+ 0.0995769203 0.0747480765 0.0536088012
+ 0.1018780991 0.0764901415 0.0548868291
+ 0.1042044014 0.0782487020 0.0561818182
+ 0.1065538973 0.0800288767 0.0574982315
+ 0.1089283004 0.0818311423 0.0588314198
+ 0.1113215014 0.0836538672 0.0601810999
+ 0.1137316003 0.0854980275 0.0615520887
+ 0.1161573976 0.0873684287 0.0629485399
+ 0.1185979992 0.0892611369 0.0643650293
+ 0.1210614964 0.0911754370 0.0658011809
+ 0.1235487014 0.0931112692 0.0672666430
+ 0.1260568053 0.0950720683 0.0687462613
+ 0.1285867989 0.0970498696 0.0702391118
+ 0.1311426014 0.0990442634 0.0717507899
+ 0.1337202042 0.1010560021 0.0732835308
+ 0.1363096982 0.1031069979 0.0748315826
+ 0.1389120072 0.1051762030 0.0763994083
+ 0.1415282041 0.1072625965 0.0779832006
+ 0.1441825926 0.1093714982 0.0795782432
+ 0.1468576044 0.1115005016 0.0811884925
+ 0.1495531946 0.1136446968 0.0828164518
+ 0.1522718966 0.1158049032 0.0844542831
+ 0.1550171971 0.1179929972 0.0861058980
+ 0.1577734947 0.1201986000 0.0877750516
+ 0.1605415046 0.1224215031 0.0894542485
+ 0.1633353978 0.1246768013 0.0911507979
+ 0.1661441028 0.1269477010 0.0928589627
+ 0.1689610034 0.1292310059 0.0945746303
+ 0.1717838943 0.1315293014 0.0963099599
+ 0.1746120006 0.1338451058 0.0980574191
+ 0.1774456948 0.1361752003 0.0998183563
+ 0.1802875996 0.1385367960 0.1016084999
+ 0.1831531972 0.1409143060 0.1034116000
+ 0.1860264987 0.1433060020 0.1052436978
+ 0.1889072955 0.1457217932 0.1070917994
+ 0.1918103993 0.1481487006 0.1089527979
+ 0.1947200000 0.1505914032 0.1108305007
+ 0.1976352930 0.1530454010 0.1127144024
+ 0.2005549073 0.1555085927 0.1146150976
+ 0.2034773976 0.1579966992 0.1165283024
+ 0.2064062953 0.1605020016 0.1184550002
+ 0.2093463987 0.1630198956 0.1204015985
+ 0.2122935951 0.1655519009 0.1223547012
+ 0.2152556032 0.1680873036 0.1243321002
+ 0.2182167023 0.1706292033 0.1263145953
+ 0.2211762965 0.1731802970 0.1283138990
+ 0.2241538018 0.1757373065 0.1303219944
+ 0.2271365970 0.1783048064 0.1323408037
+ 0.2301204056 0.1808757931 0.1343753040
+ 0.2331143022 0.1834571958 0.1364185959
+ 0.2361201942 0.1860488951 0.1384806037
+ 0.2391359061 0.1886530071 0.1405466050
+ 0.2421551943 0.1912735999 0.1426350027
+ 0.2451844066 0.1939011961 0.1447259039
+ 0.2482129037 0.1965422034 0.1468326002
+ 0.2512401044 0.1991859972 0.1489423960
+ 0.2542673051 0.2018409967 0.1510629058
+ 0.2572943866 0.2045024037 0.1531887054
+ 0.2603251040 0.2071764022 0.1553260982
+ 0.2633563876 0.2098606974 0.1574766040
+ 0.2663846016 0.2125551999 0.1596474946
+ 0.2694126070 0.2152567953 0.1618286073
+ 0.2724404037 0.2179622054 0.1640225053
+ 0.2754598856 0.2206754982 0.1662251055
+ 0.2784681916 0.2233911008 0.1684374958
+ 0.2814692855 0.2261153013 0.1706584990
+ 0.2844651043 0.2288406044 0.1728888005
+ 0.2874703109 0.2315697968 0.1751244962
+ 0.2904790938 0.2343001068 0.1773661971
+ 0.2934839129 0.2370491028 0.1796108931
+ 0.2964878976 0.2397976965 0.1818595976
+ 0.2994953096 0.2425439954 0.1841097027
+ 0.3025026917 0.2452909946 0.1863622963
+ 0.3054913878 0.2480435967 0.1886177063
+ 0.3084802032 0.2507981956 0.1908794940
+ 0.3114694059 0.2535662055 0.1931429952
+ 0.3144572079 0.2563355863 0.1954129934
+ 0.3174341023 0.2591148913 0.1976844966
+ 0.3204114139 0.2618939877 0.1999710053
+ 0.3233911097 0.2646703124 0.2022576034
+ 0.3263702095 0.2674466074 0.2045578957
+ 0.3293448985 0.2702299058 0.2068590969
+ 0.3323191106 0.2730130851 0.2091719061
+ 0.3352886140 0.2757953107 0.2114882022
+ 0.3382574916 0.2785772979 0.2138084024
+ 0.3412111998 0.2813608050 0.2161314934
+ 0.3441649079 0.2841446996 0.2184565067
+ 0.3471063972 0.2869217098 0.2207846045
+ 0.3500475883 0.2896957994 0.2231137007
+ 0.3529730141 0.2924658060 0.2254499942
+ 0.3558960855 0.2952325046 0.2277863026
+ 0.3588060141 0.2979984879 0.2301243991
+ 0.3617117107 0.3007633984 0.2324627936
+ 0.3645960987 0.3035242856 0.2348098010
+ 0.3674674034 0.3062672913 0.2371633947
+ 0.3703210056 0.3090102971 0.2395182997
+ 0.3731533885 0.3117265999 0.2418767959
+ 0.3759778142 0.3144418001 0.2442353964
+ 0.3787800074 0.3171553910 0.2465995997
+ 0.3815816045 0.3198683858 0.2489643991
+ 0.3843731880 0.3225778937 0.2513361871
+ 0.3871648014 0.3252829909 0.2537139058
+ 0.3899506927 0.3279863000 0.2560917139
+ 0.3927353919 0.3306789994 0.2584705949
+ 0.3955127001 0.3333716094 0.2608495951
+ 0.3982842863 0.3360339999 0.2632276118
+ 0.4010469019 0.3386904001 0.2656053007
+ 0.4037859142 0.3413349092 0.2679820061
+ 0.4065249860 0.3439669013 0.2703562975
+ 0.4092408121 0.3465988040 0.2727305889
+ 0.4119558036 0.3492295146 0.2751063108
+ 0.4146685004 0.3518601954 0.2774823904
+ 0.4173798859 0.3544926047 0.2798556983
+ 0.4200862050 0.3571256995 0.2822236121
+ 0.4227792919 0.3597556055 0.2845914066
+ 0.4254722893 0.3623783886 0.2869648039
+ 0.4281426072 0.3650011122 0.2893395126
+ 0.4308102131 0.3676072955 0.2917163968
+ 0.4334703088 0.3702105880 0.2940998971
+ 0.4361222088 0.3728044033 0.2964833975
+ 0.4387736022 0.3753828108 0.2988683879
+ 0.4414154887 0.3779611886 0.3012540936
+ 0.4440574050 0.3805244863 0.3036401868
+ 0.4466896951 0.3830857873 0.3060306907
+ 0.4493151903 0.3856397867 0.3084211946
+ 0.4519402087 0.3881801963 0.3108114004
+ 0.4545603991 0.3907206953 0.3132013977
+ 0.4571805894 0.3932437003 0.3155913949
+ 0.4597933888 0.3957622051 0.3179830909
+ 0.4624007940 0.3982788026 0.3203752935
+ 0.4650070071 0.4007883966 0.3227669895
+ 0.4675796926 0.4032979906 0.3251537979
+ 0.4701522887 0.4057931900 0.3275406957
+ 0.4727115929 0.4082787931 0.3299230933
+ 0.4752551019 0.4107643068 0.3322981000
+ 0.4777986109 0.4132384062 0.3346731067
+ 0.4803014100 0.4157119989 0.3370327055
+ 0.4827977121 0.4181810915 0.3393830955
+ 0.4852870107 0.4206390083 0.3417334855
+ 0.4877533019 0.4230970144 0.3440715075
+ 0.4902195036 0.4255495965 0.3464072049
+ 0.4926728904 0.4279986918 0.3487423956
+ 0.4951168895 0.4304477870 0.3510628939
+ 0.4975608885 0.4328849018 0.3533833921
+ 0.4999994040 0.4353202879 0.3556984961
+ 0.5024372935 0.4377534091 0.3579910994
+ 0.5048713088 0.4401684999 0.3602836132
+ 0.5072880983 0.4425837100 0.3625684083
+ 0.5097048879 0.4449890852 0.3648371100
+ 0.5121037960 0.4473744929 0.3671058118
+ 0.5144798160 0.4497599006 0.3693706095
+ 0.5168557167 0.4521426857 0.3716300130
+ 0.5192152858 0.4545232058 0.3738893867
+ 0.5215666294 0.4569036067 0.3761452138
+ 0.5239177942 0.4592863917 0.3783971071
+ 0.5262326002 0.4616703987 0.3806490004
+ 0.5285415053 0.4640542865 0.3828856945
+ 0.5308492184 0.4664343894 0.3851085007
+ 0.5331150889 0.4688135087 0.3873313069
+ 0.5353810191 0.4711925089 0.3895424902
+ 0.5376406908 0.4735459089 0.3917432129
+ 0.5398690104 0.4758956134 0.3939439058
+ 0.5420972705 0.4782454073 0.3961327970
+ 0.5443140864 0.4805634022 0.3983095884
+ 0.5464997292 0.4828793108 0.4004862905
+ 0.5486851931 0.4851951003 0.4026562870
+ 0.5508528948 0.4874885082 0.4048171043
+ 0.5529860854 0.4897811115 0.4069780111
+ 0.5551192164 0.4920735955 0.4091326892
+ 0.5572410822 0.4943391979 0.4112750888
+ 0.5593448877 0.4966034889 0.4134174883
+ 0.5614485741 0.4988678992 0.4155569077
+ 0.5635406971 0.5010880828 0.4176844060
+ 0.5656147003 0.5033046007 0.4198119938
+ 0.5676888227 0.5055211186 0.4219393134
+ 0.5697504878 0.5077061057 0.4240606129
+ 0.5717914104 0.5098856091 0.4261820018
+ 0.5738322139 0.5120651722 0.4283033907
+ 0.5758668780 0.5142083168 0.4304130077
+ 0.5778881907 0.5163393021 0.4325203001
+ 0.5799093843 0.5184702277 0.4346275926
+ 0.5819228292 0.5205832124 0.4367291033
+ 0.5839092731 0.5226848125 0.4388267994
+ 0.5858957171 0.5247864127 0.4409244955
+ 0.5878791809 0.5268790722 0.4430136979
+ 0.5898365974 0.5289608240 0.4450865090
+ 0.5917940140 0.5310423970 0.4471594095
+ 0.5937513709 0.5331161022 0.4492312074
+ 0.5956690907 0.5351639986 0.4512765110
+ 0.5975846052 0.5372117758 0.4533218145
+ 0.5995001197 0.5392596722 0.4553669989
+ 0.6013880968 0.5412784815 0.4573917985
+ 0.6032671928 0.5432971716 0.4594076872
+ 0.6051464081 0.5453159213 0.4614236057
+ 0.6070122123 0.5473181009 0.4634315073
+ 0.6088663936 0.5493139029 0.4654226899
+ 0.6107205153 0.5513098240 0.4674139023
+ 0.6125701070 0.5532947779 0.4694051147
+ 0.6144073009 0.5552641749 0.4713697135
+ 0.6162444949 0.5572335720 0.4733316898
+ 0.6180818081 0.5592026711 0.4752937853
+ 0.6199104190 0.5611671209 0.4772514999
+ 0.6217387915 0.5631313920 0.4792042077
+ 0.6235671043 0.5650957823 0.4811568856
+ 0.6253790855 0.5670524836 0.4831095934
+ 0.6271820068 0.5690057278 0.4850563109
+ 0.6289849281 0.5709587932 0.4870027900
+ 0.6307768226 0.5729085207 0.4889493883
+ 0.6325399876 0.5748482943 0.4908913076
+ 0.6343032122 0.5767881870 0.4928275049
+ 0.6360663772 0.5787280798 0.4947637022
+ 0.6378102899 0.5806527734 0.4966998994
+ 0.6395515203 0.5825737715 0.4986213148
+ 0.6412925720 0.5844948292 0.5005409122
+ 0.6430225968 0.5864080787 0.5024604797
+ 0.6447380185 0.5883042812 0.5043705106
+ 0.6464533806 0.5902004242 0.5062571168
+ 0.6481688023 0.5920965075 0.5081436038
+ 0.6498512030 0.5939829946 0.5100302100
+ 0.6515321136 0.5958667994 0.5119035840
+ 0.6532130241 0.5977506042 0.5137699842
+ 0.6548699141 0.5996311903 0.5156363249
+ 0.6564965248 0.6014996767 0.5175027251
+ 0.6581230760 0.6033681035 0.5193520188
+ 0.6597496867 0.6052364707 0.5212007165
+ 0.6613441706 0.6070837975 0.5230494738
+ 0.6629346013 0.6089169979 0.5248932838
+ 0.6645249724 0.6107501984 0.5267223120
+ 0.6661086082 0.6125832796 0.5285513997
+ 0.6676759124 0.6143841743 0.5303804278
+ 0.6692432761 0.6161835194 0.5322028995
+ 0.6708106995 0.6179828048 0.5340183973
+ 0.6723604202 0.6197698712 0.5358340144
+ 0.6739010811 0.6215232015 0.5376495123
+ 0.6754419208 0.6232764721 0.5394585729
+ 0.6769825816 0.6250298023 0.5412647724
+ 0.6784970164 0.6267579794 0.5430709720
+ 0.6800110936 0.6284642816 0.5448771119
+ 0.6815252900 0.6301707029 0.5466737747
+ 0.6830374002 0.6318771243 0.5484687090
+ 0.6845443249 0.6335585117 0.5502635837
+ 0.6860511899 0.6352325082 0.5520585775
+ 0.6875581145 0.6369063854 0.5538393855
+ 0.6890510917 0.6385803223 0.5556197762
+ 0.6905319095 0.6402255893 0.5574001074
+ 0.6920126081 0.6418696046 0.5591800213
+ 0.6934934258 0.6435136199 0.5609490871
+ 0.6949405074 0.6451522708 0.5627182126
+ 0.6963760257 0.6467463970 0.5644872189
+ 0.6978114843 0.6483405232 0.5662546158
+ 0.6992468834 0.6499347091 0.5680006146
+ 0.7006595135 0.6515222788 0.5697466135
+ 0.7020696998 0.6530866027 0.5714926720
+ 0.7034800053 0.6546509266 0.5732375979
+ 0.7048898935 0.6562151909 0.5749657750
+ 0.7062891126 0.6577690244 0.5766940713
+ 0.7076883912 0.6592959762 0.5784224272
+ 0.7090877295 0.6608229876 0.5801504254
+ 0.7104840875 0.6623499990 0.5818541050
+ 0.7118595243 0.6638725996 0.5835577846
+ 0.7132350206 0.6653854251 0.5852615237
+ 0.7146103978 0.6668980718 0.5869652033
+ 0.7159860134 0.6684108973 0.5886417031
+ 0.7173621058 0.6699141264 0.5903154016
+ 0.7187381983 0.6713935733 0.5919892192
+ 0.7201142907 0.6728730798 0.5936629772
+ 0.7214856148 0.6743525863 0.5953096747
+ 0.7228314281 0.6758230925 0.5969482064
+ 0.7241771221 0.6772614717 0.5985866785
+ 0.7255228758 0.6786999702 0.6002252102
+ 0.7268646955 0.6801384091 0.6018486023
+ 0.7281752825 0.6815736294 0.6034609079
+ 0.7294859290 0.6829831004 0.6050732136
+ 0.7307965159 0.6843926907 0.6066855192
+ 0.7321065068 0.6858022213 0.6082887053
+ 0.7333903909 0.6872118115 0.6098747253
+ 0.7346742749 0.6885958910 0.6114608049
+ 0.7359582782 0.6899790168 0.6130468249
+ 0.7372422218 0.6913622022 0.6146309972
+ 0.7385115027 0.6927453279 0.6161890030
+ 0.7397789955 0.6941304803 0.6177470088
+ 0.7410464883 0.6955162883 0.6193048954
+ 0.7423139811 0.6969019771 0.6208629012
+ 0.7435634732 0.6982877851 0.6223968267
+ 0.7448058128 0.6996648908 0.6239222288
+ 0.7460480928 0.7010340095 0.6254476905
+ 0.7472903728 0.7024030089 0.6269730926
+ 0.7485197783 0.7037721276 0.6284868121
+ 0.7497360110 0.7051346898 0.6299803257
+ 0.7509521842 0.7064757943 0.6314738989
+ 0.7521684170 0.7078167796 0.6329674721
+ 0.7533807158 0.7091578841 0.6344609857
+ 0.7545793056 0.7104989886 0.6359264851
+ 0.7557778955 0.7118229270 0.6373904943
+ 0.7569764256 0.7131447792 0.6388545036
+ 0.7581750154 0.7144666910 0.6403185129
+ 0.7593536973 0.7157886028 0.6417623162
+ 0.7605302930 0.7170932889 0.6431841850
+ 0.7617068887 0.7183820009 0.6446061730
+ 0.7628834844 0.7196707129 0.6460281014
+ 0.7640433908 0.7209593058 0.6474500895
+ 0.7651894093 0.7222459912 0.6488506198
+ 0.7663354278 0.7235112786 0.6502503753
+ 0.7674813867 0.7247765064 0.6516500711
+ 0.7686260939 0.7260417938 0.6530498266
+ 0.7697625160 0.7273070812 0.6544442773
+ 0.7708989978 0.7285519838 0.6558309197
+ 0.7720354795 0.7297835946 0.6572173834
+ 0.7731719017 0.7310153246 0.6586040258
+ 0.7742877007 0.7322468758 0.6599906087
+ 0.7753937244 0.7334775925 0.6613616943
+ 0.7764996886 0.7346972227 0.6627286077
+ 0.7776057124 0.7359166741 0.6640955210
+ 0.7787057161 0.7371363044 0.6654623747
+ 0.7797777057 0.7383558154 0.6668282747
+ 0.7808495760 0.7395550013 0.6681864858
+ 0.7819216251 0.7407342792 0.6695446968
+ 0.7829934955 0.7419134974 0.6709029078
+ 0.7840589285 0.7430927753 0.6722611785
+ 0.7851203084 0.7442719936 0.6736127734
+ 0.7861816883 0.7454271913 0.6749550104
+ 0.7872430086 0.7465791702 0.6762971282
+ 0.7883045077 0.7477310896 0.6776393056
+ 0.7893705964 0.7488831282 0.6789814234
+ 0.7904366851 0.7500287294 0.6803113818
+ 0.7915027738 0.7511497736 0.6816344857
+ 0.7925689220 0.7522708774 0.6829575896
+ 0.7936292291 0.7533919811 0.6842806935
+ 0.7946795225 0.7545130849 0.6856039166
+ 0.7957298160 0.7556204796 0.6869193912
+ 0.7967801094 0.7567132115 0.6882331967
+ 0.7978304029 0.7578058243 0.6895471215
+ 0.7988722920 0.7588983774 0.6908609867
+ 0.7999097109 0.7599909902 0.6921749115
+ 0.8009471893 0.7610651851 0.6934753060
+ 0.8019847274 0.7621316910 0.6947749853
+ 0.8030220866 0.7631980777 0.6960747838
+ 0.8040328026 0.7642645240 0.6973745227
+ 0.8050405979 0.7653309107 0.6986737847
+ 0.8060483932 0.7663741708 0.6999592781
+ 0.8070561886 0.7674140930 0.7012447715
+ 0.8080614805 0.7684540153 0.7025303245
+ 0.8090434074 0.7694938779 0.7038156986
+ 0.8100252748 0.7705338001 0.7050995827
+ 0.8110070825 0.7715379000 0.7063539028
+ 0.8119890094 0.7725417018 0.7076082230
+ 0.8129674792 0.7735455036 0.7088624835
+ 0.8139352798 0.7745493054 0.7101168036
+ 0.8149030805 0.7755506039 0.7113707066
+ 0.8158710003 0.7765091062 0.7126060128
+ 0.8168388009 0.7774677277 0.7138411999
+ 0.8177986741 0.7784262896 0.7150765061
+ 0.8187428117 0.7793847919 0.7163118124
+ 0.8196867704 0.7803425789 0.7175469995
+ 0.8206307888 0.7812892795 0.7187737226
+ 0.8215748072 0.7822360992 0.7199997902
+ 0.8225091100 0.7831827998 0.7212259173
+ 0.8234264851 0.7841296196 0.7224519849
+ 0.8243438005 0.7850759029 0.7236781120
+ 0.8252611756 0.7860084176 0.7248950005
+ 0.8261786103 0.7869408727 0.7261095047
+ 0.8270888925 0.7878733873 0.7273240089
+ 0.8279858232 0.7888059020 0.7285385728
+ 0.8288828135 0.7897384167 0.7297530770
+ 0.8297798038 0.7906383872 0.7309511900
+ 0.8306767941 0.7915360928 0.7321383953
+ 0.8315675855 0.7924336791 0.7333257198
+ 0.8324421048 0.7933313847 0.7345129251
+ 0.8333166242 0.7942289710 0.7357000709
+ 0.8341910839 0.7951080203 0.7368817925
+ 0.8350657225 0.7959815860 0.7380530834
+ 0.8359373212 0.7968552709 0.7392244935
+ 0.8367924094 0.7977288961 0.7403959036
+ 0.8376473784 0.7986025810 0.7415671945
+ 0.8385024071 0.7994632721 0.7427378297
+ 0.8393573761 0.8003144264 0.7438889742
+ 0.8402125239 0.8011655211 0.7450402975
+ 0.8410465717 0.8020166159 0.7461915016
+ 0.8418799043 0.8028677106 0.7473427057
+ 0.8427131772 0.8037161231 0.7484940290
+ 0.8435465097 0.8045580983 0.7496194839
+ 0.8443799019 0.8054001927 0.7507324815
+ 0.8452067971 0.8062422276 0.7518454194
+ 0.8460311890 0.8070843220 0.7529584169
+ 0.8468557000 0.8079264164 0.7540712953
+ 0.8476800919 0.8087493777 0.7551763058
+ 0.8485044837 0.8095721006 0.7562569976
+ 0.8493136764 0.8103948832 0.7573378086
+ 0.8501023054 0.8112176061 0.7584185004
+ 0.8508908749 0.8120403886 0.7594993114
+ 0.8516795039 0.8128635883 0.7605800033
+ 0.8524680734 0.8136872053 0.7616460919
+ 0.8532543182 0.8145108223 0.7627075911
+ 0.8540086150 0.8153343797 0.7637690902
+ 0.8547629714 0.8161579967 0.7648305893
+ 0.8555173278 0.8169798255 0.7658920884
+ 0.8562716842 0.8177930117 0.7669504285
+ 0.8570259809 0.8186061978 0.7679973245
+ 0.8577690721 0.8194193840 0.7690442204
+ 0.8585063815 0.8202325106 0.7700911164
+ 0.8592435718 0.8210456967 0.7711378932
+ 0.8599808812 0.8218513727 0.7721847892
+ 0.8607181907 0.8226534724 0.7732229233
+ 0.8614515066 0.8234555125 0.7742553949
+ 0.8621680737 0.8242576122 0.7752879858
+ 0.8628845811 0.8250595927 0.7763205171
+ 0.8636012077 0.8258600831 0.7773531079
+ 0.8643177748 0.8266490102 0.7783856988
+ 0.8650344014 0.8274379969 0.7793797255
+ 0.8657494187 0.8282269239 0.7803717256
+ 0.8664636016 0.8290157914 0.7813637853
+ 0.8671777844 0.8298047185 0.7823559046
+ 0.8678920269 0.8305819035 0.7833480239
+ 0.8686062098 0.8313472867 0.7843325734
+ 0.8693193793 0.8321127295 0.7852917910
+ 0.8700184822 0.8328779936 0.7862508893
+ 0.8707175851 0.8336433768 0.7872101068
+ 0.8714166880 0.8344088197 0.7881693244
+ 0.8721157908 0.8351647258 0.7891284227
+ 0.8728148937 0.8359184861 0.7900806069
+ 0.8734970093 0.8366723061 0.7910240293
+ 0.8741555810 0.8374261856 0.7919672728
+ 0.8748142123 0.8381800056 0.7929106951
+ 0.8754727840 0.8389329910 0.7938539982
+ 0.8761314750 0.8396766782 0.7947974205
+ 0.8767901063 0.8404204249 0.7957333922
+ 0.8774240017 0.8411641121 0.7966641784
+ 0.8780478835 0.8419076800 0.7975950241
+ 0.8786717057 0.8426514268 0.7985258102
+ 0.8792955279 0.8433899879 0.7994565964
+ 0.8799194098 0.8441156745 0.8003873825
+ 0.8805431724 0.8448413014 0.8012884855
+ 0.8811553121 0.8455669880 0.8021752238
+ 0.8817664981 0.8462926149 0.8030619025
+ 0.8823778033 0.8470183015 0.8039487004
+ 0.8829889894 0.8477351069 0.8048353791
+ 0.8836002946 0.8484396935 0.8057221174
+ 0.8842098713 0.8491442800 0.8065841794
+ 0.8848046064 0.8498489261 0.8074355125
+ 0.8853992820 0.8505535126 0.8082867861
+ 0.8859940171 0.8512580991 0.8091381192
+ 0.8865886927 0.8519487977 0.8099893928
+ 0.8871833086 0.8526254892 0.8108407259
+ 0.8877705932 0.8533021212 0.8116824031
+ 0.8883280158 0.8539788127 0.8125190139
+ 0.8888853788 0.8546553850 0.8133556247
+ 0.8894428015 0.8553320169 0.8141922951
+ 0.8900002241 0.8560088277 0.8150289059
+ 0.8905575871 0.8566855788 0.8158655167
+ 0.8911083937 0.8573625088 0.8166936040
+ 0.8916376829 0.8580393195 0.8175144792
+ 0.8921670914 0.8587161899 0.8183354735
+ 0.8926963806 0.8593930006 0.8191564083
+ 0.8932257295 0.8600615859 0.8199774027
+ 0.8937550783 0.8607198000 0.8207982779
+ 0.8942791820 0.8613780141 0.8216099739
+ 0.8947834969 0.8620361090 0.8224058747
+ 0.8952878118 0.8626943231 0.8232018948
+ 0.8957921863 0.8633524776 0.8239977956
+ 0.8962965012 0.8640044928 0.8247938156
+ 0.8968008161 0.8646433949 0.8255897760
+ 0.8973022103 0.8652822971 0.8263819218
+ 0.8977811933 0.8659210801 0.8271486163
+ 0.8982601166 0.8665599823 0.8279151917
+ 0.8987389803 0.8671988845 0.8286818862
+ 0.8992179036 0.8678355217 0.8294485211
+ 0.8996968865 0.8684571981 0.8302152157
+ 0.9001758099 0.8690788746 0.8309819102
+ 0.9006456137 0.8697006106 0.8317354918
+ 0.9011150002 0.8703222871 0.8324862123
+ 0.9015843272 0.8709440827 0.8332368731
+ 0.9020537138 0.8715658188 0.8339877129
+ 0.9025231004 0.8721610904 0.8347383738
+ 0.9029924273 0.8727529049 0.8354892135
+ 0.9034619927 0.8733446002 0.8362295032
+ 0.9039316773 0.8739364147 0.8369569182
+ 0.9044014812 0.8745281100 0.8376842737
+ 0.9048712254 0.8751199245 0.8384116888
+ 0.9053409100 0.8756937981 0.8391389847
+ 0.9058105946 0.8762534857 0.8398663998
+ 0.9062727094 0.8768131137 0.8405938148
+ 0.9067248106 0.8773728013 0.8413041234
+ 0.9071769118 0.8779324889 0.8420143127
+ 0.9076290131 0.8784921169 0.8427246213
+ 0.9080811143 0.8790519238 0.8434348702
+ 0.9085332751 0.8796120286 0.8441451192
+ 0.9089835286 0.8801720738 0.8448554277
+ 0.9094098210 0.8807322979 0.8455566764
+ 0.9098359942 0.8812924027 0.8462482095
+ 0.9102622867 0.8818526268 0.8469398022
+ 0.9106885791 0.8824126720 0.8476313949
+ 0.9111148119 0.8829627037 0.8483229876
+ 0.9115411043 0.8835083246 0.8490145206
+ 0.9119545221 0.8840540051 0.8497061133
+ 0.9123607874 0.8845996857 0.8503819108
+ 0.9127669930 0.8851453066 0.8510559201
+ 0.9131733179 0.8856909871 0.8517298102
+ 0.9135795236 0.8862351179 0.8524037004
+ 0.9139857888 0.8867712021 0.8530777097
+ 0.9143912196 0.8873074055 0.8537515998
+ 0.9147915244 0.8878436089 0.8544242978
+ 0.9151918292 0.8883798122 0.8550928831
+ 0.9155920744 0.8889160156 0.8557615280
+ 0.9159923792 0.8894522190 0.8564301133
+ 0.9163928032 0.8899856806 0.8570985794
+ 0.9167931080 0.8905174136 0.8577672243
+ 0.9171940088 0.8910490274 0.8584358096
+ 0.9175955057 0.8915805817 0.8590922952
+ 0.9179968834 0.8921123147 0.8597366810
+ 0.9183983207 0.8926439285 0.8603811860
+ 0.9187998176 0.8931754827 0.8610256910
+ 0.9192011952 0.8936873078 0.8616700768
+ 0.9196026921 0.8941966891 0.8623145819
+ 0.9199982882 0.8947061896 0.8629590869
+ 0.9203935862 0.8952155709 0.8635929823
+ 0.9207888246 0.8957250714 0.8642224073
+ 0.9211840034 0.8962345123 0.8648517728
+ 0.9215791821 0.8967435956 0.8654811978
+ 0.9219744205 0.8972501755 0.8661106229
+ 0.9223681092 0.8977568150 0.8667399883
+ 0.9227561951 0.8982635140 0.8673694134
+ 0.9231444001 0.8987700939 0.8679875731
+ 0.9235324860 0.8992767930 0.8686034083
+ 0.9239205718 0.8997833729 0.8692191839
+ 0.9243087769 0.9002879262 0.8698350191
+ 0.9246969223 0.9007881284 0.8704507947
+ 0.9250844717 0.9012882710 0.8710665703
+ 0.9254714251 0.9017884135 0.8716825247
+ 0.9258583188 0.9022886157 0.8722918034
+ 0.9262452126 0.9027888179 0.8729001880
+ 0.9266321063 0.9032890201 0.8735085726
+ 0.9270188808 0.9037815928 0.8741170168
+ 0.9274057746 0.9042645097 0.8747254014
+ 0.9277873039 0.9047474265 0.8753337860
+ 0.9281644821 0.9052304029 0.8759421706
+ 0.9285417199 0.9057133198 0.8765338063
+ 0.9289188981 0.9061961770 0.8771222234
+ 0.9292961955 0.9066790938 0.8777105212
+ 0.9296733737 0.9071536064 0.8782988787
+ 0.9300506115 0.9076185226 0.8788872957
+ 0.9304202199 0.9080834985 0.8794757128
+ 0.9307851791 0.9085484147 0.8800640106
+ 0.9311501980 0.9090133905 0.8806303740
+ 0.9315152764 0.9094783068 0.8811889887
+ 0.9318802953 0.9099432826 0.8817476034
+ 0.9322453141 0.9103996754 0.8823062181
+ 0.9326102734 0.9108446240 0.8828647733
+ 0.9329578280 0.9112895131 0.8834233880
+ 0.9332942963 0.9117342830 0.8839820027
+ 0.9336308241 0.9121791720 0.8845335245
+ 0.9339672923 0.9126241207 0.8850793839
+ 0.9343038201 0.9130688906 0.8856253028
+ 0.9346402884 0.9135128260 0.8861711025
+ 0.9349768162 0.9139543176 0.8867170215
+ 0.9352998137 0.9143959284 0.8872628808
+ 0.9356107712 0.9148374200 0.8878087997
+ 0.9359217882 0.9152789116 0.8883525729
+ 0.9362328053 0.9157204032 0.8888916969
+ 0.9365438819 0.9161620140 0.8894308209
+ 0.9368548989 0.9166017175 0.8899700046
+ 0.9371659160 0.9170259833 0.8905091286
+ 0.9374731183 0.9174504280 0.8910481930
+ 0.9377737045 0.9178748131 0.8915873170
+ 0.9380741715 0.9182991982 0.8921263814
+ 0.9383748174 0.9187235832 0.8926637769
+ 0.9386752844 0.9191479087 0.8932011127
+ 0.9389758706 0.9195722938 0.8937383294
+ 0.9392765164 0.9199801087 0.8942756057
+ 0.9395747185 0.9203845263 0.8948128819
+ 0.9398567080 0.9207890034 0.8953502178
+ 0.9401388168 0.9211934209 0.8958874941
+ 0.9404208064 0.9215978980 0.8964194059
+ 0.9407027960 0.9220023751 0.8969466090
+ 0.9409849048 0.9224067926 0.8974738717
+ 0.9412668943 0.9228081107 0.8980011940
+ 0.9415488839 0.9232060909 0.8985285163
+ 0.9418272972 0.9236040115 0.8990557194
+ 0.9421048760 0.9240018725 0.8995829821
+ 0.9423825145 0.9243999124 0.9001092911
+ 0.9426599741 0.9247977734 0.9006150961
+ 0.9429376125 0.9251956940 0.9011210203
+ 0.9432151914 0.9255933166 0.9016268253
+ 0.9434927106 0.9259833097 0.9021326900
+ 0.9437695742 0.9263733029 0.9026384950
+ 0.9440454841 0.9267632961 0.9031443000
+ 0.9443213940 0.9271534085 0.9036502242
+ 0.9445973039 0.9275434017 0.9041491747
+ 0.9448732138 0.9279333949 0.9046404958
+ 0.9451491237 0.9283233881 0.9051318169
+ 0.9454249740 0.9286991954 0.9056230783
+ 0.9457010031 0.9290624261 0.9061143994
+ 0.9459671974 0.9294254780 0.9066057205
+ 0.9462327957 0.9297887087 0.9070969224
+ 0.9464982748 0.9301518798 0.9075881839
+ 0.9467638135 0.9305151105 0.9080798030
+ 0.9470294118 0.9308782816 0.9085714817
+ 0.9472948909 0.9312413931 0.9090631008
+ 0.9475604296 0.9315894246 0.9095547199
+ 0.9478178024 0.9319362044 0.9100463986
+ 0.9480611086 0.9322831035 0.9105380177
+ 0.9483044744 0.9326300025 0.9110296965
+ 0.9485477805 0.9329767823 0.9115203023
+ 0.9487910867 0.9333236814 0.9119966030
+ 0.9490345120 0.9336705804 0.9124727845
+ 0.9492778182 0.9340136051 0.9129490852
+ 0.9495211244 0.9343457222 0.9134253860
+ 0.9497414231 0.9346777797 0.9139016271
+ 0.9499527812 0.9350097775 0.9143779278
+ 0.9501643181 0.9353418946 0.9148542285
+ 0.9503756762 0.9356740117 0.9153259993
+ 0.9505872130 0.9360061288 0.9157835841
+ 0.9507985711 0.9363381267 0.9162412286
+ 0.9510101080 0.9366635084 0.9166988134
+ 0.9512215257 0.9369819164 0.9171562791
+ 0.9514275789 0.9373003840 0.9176139235
+ 0.9516335726 0.9376189113 0.9180715084
+ 0.9518396258 0.9379373193 0.9185290933
+ 0.9520456791 0.9382557869 0.9189860821
+ 0.9522516727 0.9385743141 0.9194421172
+ 0.9524577856 0.9388927221 0.9198979735
+ 0.9526637793 0.9392104745 0.9203540087
+ 0.9528685808 0.9395279288 0.9208099246
+ 0.9530680180 0.9398452044 0.9212657809
+ 0.9532672763 0.9401625991 0.9217218161
+ 0.9534667134 0.9404799938 0.9221776724
+ 0.9536660910 0.9407973289 0.9226272106
+ 0.9538655281 0.9411147237 0.9230633974
+ 0.9540649056 0.9414321184 0.9234995246
+ 0.9542642832 0.9417477250 0.9239355922
+ 0.9544624090 0.9420624971 0.9243717194
+ 0.9546576738 0.9423773289 0.9248077869
+ 0.9548529983 0.9426922202 0.9252439737
+ 0.9550482035 0.9430069923 0.9256801009
+ 0.9552435279 0.9433218837 0.9261130095
+ 0.9554387927 0.9436367154 0.9265359044
+ 0.9556339979 0.9439516068 0.9269587994
+ 0.9558293223 0.9442648888 0.9273816943
+ 0.9560242295 0.9445775747 0.9278045297
+ 0.9562184215 0.9448903799 0.9282274246
+ 0.9564124942 0.9452031255 0.9286503196
+ 0.9566066861 0.9455158114 0.9290730953
+ 0.9568008780 0.9458284974 0.9294950962
+ 0.9569950104 0.9461413026 0.9299049973
+ 0.9571892023 0.9464539886 0.9303148985
+ 0.9573832750 0.9467725158 0.9307246804
+ 0.9575788975 0.9470949173 0.9311345816
+ 0.9577786922 0.9474173188 0.9315444827
+ 0.9579784274 0.9477397799 0.9319543242
+ 0.9581782222 0.9480621815 0.9323642254
+ 0.9583780169 0.9483845830 0.9327741265
+ 0.9585776925 0.9487069845 0.9331759810
+ 0.9587774873 0.9490293860 0.9335759282
+ 0.9589772820 0.9493505955 0.9339758158
+ 0.9591774940 0.9496698976 0.9343758225
+ 0.9593815804 0.9499891996 0.9347757101
+ 0.9595857263 0.9503086209 0.9351757169
+ 0.9597898126 0.9506279230 0.9355756044
+ 0.9599938989 0.9509472251 0.9359754920
+ 0.9601979852 0.9512665272 0.9363701940
+ 0.9604020715 0.9515858889 0.9367583990
+ 0.9606062174 0.9519029856 0.9371466041
+ 0.9608103037 0.9522051215 0.9375349283
+ 0.9610272050 0.9525070786 0.9379230738
+ 0.9612463713 0.9528092146 0.9383112788
+ 0.9614655972 0.9531112909 0.9386994839
+ 0.9616847038 0.9534133077 0.9390878081
+ 0.9619039297 0.9537153840 0.9394757748
+ 0.9621229768 0.9540174007 0.9398490787
+ 0.9623422027 0.9543194771 0.9402223229
+ 0.9625613093 0.9546111822 0.9405955076
+ 0.9627830982 0.9548994899 0.9409686923
+ 0.9630070925 0.9551877975 0.9413419962
+ 0.9632312059 0.9554761052 0.9417151809
+ 0.9634553194 0.9557644129 0.9420884252
+ 0.9636793733 0.9560527802 0.9424616098
+ 0.9639034271 0.9563410878 0.9428309202
+ 0.9641274810 0.9566293955 0.9431958199
+ 0.9643515944 0.9569211006 0.9435607791
+ 0.9645748734 0.9572210908 0.9439256787
+ 0.9647920132 0.9575210214 0.9442906976
+ 0.9650089741 0.9578210115 0.9446555972
+ 0.9652261138 0.9581208825 0.9450206161
+ 0.9654431939 0.9584208131 0.9453855157
+ 0.9656602144 0.9587208033 0.9457504749
+ 0.9658772945 0.9590206742 0.9461066127
+ 0.9660943747 0.9593207240 0.9464613199
+ 0.9663113952 0.9596204162 0.9468160272
+ 0.9665256739 0.9599201083 0.9471706152
+ 0.9667379260 0.9602196813 0.9475253224
+ 0.9669501185 0.9605193734 0.9478799105
+ 0.9671623111 0.9608191252 0.9482346177
+ 0.9673745036 0.9611188173 0.9485892057
+ 0.9675868154 0.9614183903 0.9489434958
+ 0.9677990079 0.9617180824 0.9492951035
+ 0.9680112004 0.9620164037 0.9496467113
+ 0.9682233930 0.9623020887 0.9499983191
+ 0.9684261084 0.9625877142 0.9503499866
+ 0.9686285853 0.9628733993 0.9507015944
+ 0.9688311219 0.9631590843 0.9510532022
+ 0.9690335989 0.9634447098 0.9514048100
+ 0.9692360759 0.9637303948 0.9517564178
+ 0.9694386125 0.9640160203 0.9521070719
+ 0.9696410894 0.9643017054 0.9524558187
+ 0.9698436260 0.9645820260 0.9528045058
+ 0.9700453281 0.9648528099 0.9531531930
+ 0.9702448845 0.9651235938 0.9535018802
+ 0.9704446197 0.9653943777 0.9538506269
+ 0.9706441760 0.9656652212 0.9541993737
+ 0.9708439112 0.9659358859 0.9545481205
+ 0.9710435271 0.9662067294 0.9548968077
+ 0.9712432027 0.9664775133 0.9552431107
+ 0.9714428782 0.9667482972 0.9555861950
+ 0.9716424942 0.9670147896 0.9559292197
+ 0.9718437195 0.9672774076 0.9562721848
+ 0.9720464945 0.9675399065 0.9566152096
+ 0.9722493291 0.9678025246 0.9569581747
+ 0.9724521041 0.9680650830 0.9573013186
+ 0.9726549983 0.9683277011 0.9576442838
+ 0.9728577733 0.9685903192 0.9579873085
+ 0.9730606079 0.9688528776 0.9583258033
+ 0.9732633829 0.9691154957 0.9586578012
+ 0.9734662175 0.9693738818 0.9589897990
+ 0.9736676216 0.9696295261 0.9593217969
+ 0.9738680124 0.9698851109 0.9596537948
+ 0.9740685225 0.9701406956 0.9599856734
+ 0.9742689133 0.9703962803 0.9603176713
+ 0.9744693041 0.9706519246 0.9606497288
+ 0.9746698141 0.9709075093 0.9609817266
+ 0.9748702049 0.9711630940 0.9613105059
+ 0.9750707150 0.9714187980 0.9616318941
+ 0.9752711058 0.9716637135 0.9619532824
+ 0.9754704237 0.9719005227 0.9622746706
+ 0.9756690860 0.9721373916 0.9625961185
+ 0.9758678079 0.9723742008 0.9629175067
+ 0.9760664105 0.9726111293 0.9632390141
+ 0.9762650728 0.9728478789 0.9635604024
+ 0.9764636755 0.9730846882 0.9638817906
+ 0.9766623974 0.9733216166 0.9642019868
+ 0.9768610001 0.9735584259 0.9645112753
+ 0.9770597219 0.9737908244 0.9648205042
+ 0.9772512913 0.9740175009 0.9651297927
+ 0.9774367809 0.9742441773 0.9654390812
+ 0.9776223898 0.9744709134 0.9657483101
+ 0.9778078794 0.9746975899 0.9660575986
+ 0.9779934287 0.9749243259 0.9663668871
+ 0.9781789780 0.9751510024 0.9666761160
+ 0.9783645272 0.9753776789 0.9669854045
+ 0.9785500765 0.9756044149 0.9672716260
+ 0.9787356257 0.9758260846 0.9675518870
+ 0.9789177179 0.9760301113 0.9678322077
+ 0.9790937901 0.9762340784 0.9681125283
+ 0.9792699218 0.9764381051 0.9683927894
+ 0.9794459939 0.9766421914 0.9686729908
+ 0.9796221256 0.9768462181 0.9689533114
+ 0.9797981977 0.9770501852 0.9692335725
+ 0.9799743295 0.9772542119 0.9695138931
+ 0.9801504016 0.9774581790 0.9697943926
+ 0.9803264737 0.9776623249 0.9700750709
+ 0.9805015922 0.9778532982 0.9703558087
+ 0.9806643128 0.9780429006 0.9706364870
+ 0.9808269739 0.9782323837 0.9709172249
+ 0.9809898138 0.9784219861 0.9711979032
+ 0.9811524749 0.9786115289 0.9714785814
+ 0.9813151956 0.9788010716 0.9717593193
+ 0.9814779162 0.9789906144 0.9720399976
+ 0.9816406965 0.9791802168 0.9723206758
+ 0.9818034172 0.9793697000 0.9725946784
+ 0.9819660783 0.9795542955 0.9728677869
+ 0.9821212888 0.9797332883 0.9731410146
+ 0.9822732210 0.9799122810 0.9734141231
+ 0.9824250937 0.9800912738 0.9736872911
+ 0.9825769067 0.9802703261 0.9739603996
+ 0.9827287793 0.9804493189 0.9742336273
+ 0.9828807116 0.9806283116 0.9745066762
+ 0.9830325842 0.9808073044 0.9747799039
+ 0.9831845164 0.9809862971 0.9750474095
+ 0.9833363891 0.9811652899 0.9753007293
+ 0.9834849238 0.9813308120 0.9755538702
+ 0.9836212993 0.9814954996 0.9758071899
+ 0.9837576747 0.9816601872 0.9760603905
+ 0.9838941097 0.9818249941 0.9763137102
+ 0.9840304852 0.9819896817 0.9765669107
+ 0.9841669798 0.9821544290 0.9768201709
+ 0.9843034148 0.9823191762 0.9770733714
+ 0.9844397902 0.9824839234 0.9773266912
+ 0.9845762253 0.9826486111 0.9775664210
+ 0.9847126007 0.9828112721 0.9777957797
+ 0.9848353863 0.9829697013 0.9780251980
+ 0.9849503040 0.9831280708 0.9782546163
+ 0.9850652814 0.9832863808 0.9784839749
+ 0.9851801991 0.9834448099 0.9787133932
+ 0.9852951169 0.9836031199 0.9789428115
+ 0.9854100943 0.9837614894 0.9791722894
+ 0.9855250120 0.9839199185 0.9794017076
+ 0.9856399298 0.9840782285 0.9796311259
+ 0.9857547879 0.9842365980 0.9798449278
+ 0.9858698249 0.9843990207 0.9800536036
+ 0.9859718084 0.9845643044 0.9802622199
+ 0.9860730767 0.9847295880 0.9804708958
+ 0.9861744046 0.9848948717 0.9806795716
+ 0.9862756729 0.9850602746 0.9808881879
+ 0.9863771200 0.9852256179 0.9810969234
+ 0.9864783883 0.9853909016 0.9813054800
+ 0.9865797162 0.9855561852 0.9815142155
+ 0.9866809845 0.9857215285 0.9817228913
+ 0.9867823124 0.9858868122 0.9819098115
+ 0.9868842959 0.9860410094 0.9820920825
+ 0.9869905710 0.9861913919 0.9822744727
+ 0.9870967865 0.9863417149 0.9824568033
+ 0.9872030020 0.9864919782 0.9826391935
+ 0.9873092771 0.9866423011 0.9828215241
+ 0.9874154925 0.9867926240 0.9830037951
+ 0.9875218272 0.9869430065 0.9831861854
+ 0.9876279831 0.9870933294 0.9833685160
+ 0.9877343178 0.9872435927 0.9835509062
+ 0.9878404737 0.9873939157 0.9837235212
+ 0.9879497886 0.9875226021 0.9838936925
+ 0.9880681038 0.9876458049 0.9840639234
+ 0.9881862998 0.9877688885 0.9842339754
+ 0.9883046150 0.9878919721 0.9844042063
+ 0.9884228706 0.9880151749 0.9845743775
+ 0.9885411859 0.9881383181 0.9847446084
+ 0.9886595011 0.9882614017 0.9849147201
+ 0.9887778163 0.9883846045 0.9850848913
+ 0.9888960123 0.9885076880 0.9852551222
+ 0.9890143275 0.9886307716 0.9854249954
+ 0.9891341925 0.9887586832 0.9855948091
+ 0.9892588854 0.9888883233 0.9857646227
+ 0.9893836975 0.9890179038 0.9859343767
+ 0.9895085096 0.9891474247 0.9861043096
+ 0.9896333218 0.9892770052 0.9862741232
+ 0.9897580743 0.9894065857 0.9864438772
+ 0.9898828268 0.9895361066 0.9866136909
+ 0.9900075793 0.9896656871 0.9867835045
+ 0.9901323915 0.9897953272 0.9869533181
+ 0.9902572036 0.9899247885 0.9871199131
+ 0.9903820157 0.9900571704 0.9872816801
+ 0.9905074835 0.9901915789 0.9874433875
+ 0.9906330109 0.9903261065 0.9876052141
+ 0.9907584190 0.9904605150 0.9877669215
+ 0.9908838868 0.9905949831 0.9879286885
+ 0.9910094142 0.9907293916 0.9880905151
+ 0.9911348224 0.9908639193 0.9882522225
+ 0.9912602901 0.9909983277 0.9884139895
+ 0.9913856983 0.9911326766 0.9885756969
+ 0.9915112257 0.9912672043 0.9887369871
+ 0.9916366935 0.9914013147 0.9888862967
+ 0.9917575717 0.9915347099 0.9890357256
+ 0.9918779731 0.9916681051 0.9891850948
+ 0.9919983149 0.9918015003 0.9893345237
+ 0.9921187162 0.9919348955 0.9894838929
+ 0.9922391176 0.9920682907 0.9896332026
+ 0.9923595190 0.9922016263 0.9897825718
+ 0.9924799204 0.9923350215 0.9899320006
+ 0.9926003218 0.9924684167 0.9900814295
+ 0.9927207232 0.9926018119 0.9902307987
+ 0.9928411245 0.9927352071 0.9903745055
+ 0.9929553270 0.9928619862 0.9905139208
+ 0.9930647016 0.9929882884 0.9906532764
+ 0.9931741953 0.9931144714 0.9907926917
+ 0.9932836294 0.9932407737 0.9909321070
+ 0.9933931231 0.9933670759 0.9910715222
+ 0.9935024977 0.9934933186 0.9912108779
+ 0.9936119914 0.9936196208 0.9913502932
+ 0.9937214851 0.9937458038 0.9914897084
+ 0.9938309193 0.9938721061 0.9916291237
+ 0.9939404130 0.9939982891 0.9917684793
+ 0.9940490127 0.9941191077 0.9919059277
+ 0.9941514730 0.9942321777 0.9920433164
+ 0.9942539930 0.9943454266 0.9921807051
+ 0.9943563938 0.9944584966 0.9923179746
+ 0.9944589138 0.9945716858 0.9924554229
+ 0.9945613742 0.9946848154 0.9925928116
+ 0.9946638942 0.9947978854 0.9927302003
+ 0.9947664142 0.9949110746 0.9928675294
+ 0.9948688149 0.9950242043 0.9930049181
+ 0.9949712753 0.9951373935 0.9931423068
+ 0.9950737953 0.9952505231 0.9932782054
+ 0.9951713085 0.9953569770 0.9934102893
+ 0.9952647090 0.9954618812 0.9935423732
+ 0.9953581095 0.9955667853 0.9936743975
+ 0.9954516292 0.9956716895 0.9938064814
+ 0.9955450296 0.9957765937 0.9939386249
+ 0.9956383705 0.9958814979 0.9940707088
+ 0.9957317710 0.9959864020 0.9942027926
+ 0.9958252907 0.9960911870 0.9943348765
+ 0.9959186912 0.9961960912 0.9944670200
+ 0.9960120916 0.9963009953 0.9945989847
+ 0.9961054921 0.9964051247 0.9947274923
+ 0.9961966872 0.9965000153 0.9948515892
+ 0.9962875843 0.9965949059 0.9949758053
+ 0.9963784814 0.9966897964 0.9951000214
+ 0.9964693785 0.9967846870 0.9952241182
+ 0.9965602756 0.9968795776 0.9953482747
+ 0.9966511726 0.9969745278 0.9954724908
+ 0.9967421293 0.9970694184 0.9955965877
+ 0.9968330264 0.9971643090 0.9957208037
+ 0.9969239235 0.9972591996 0.9958449006
+ 0.9970148206 0.9973540902 0.9959691167
+ 0.9971055984 0.9974477887 0.9960889220
+ 0.9971954226 0.9975377917 0.9962046742
+ 0.9972853065 0.9976279140 0.9963206053
+ 0.9973750710 0.9977179170 0.9964364171
+ 0.9974650145 0.9978079200 0.9965522289
+ 0.9975547791 0.9978979230 0.9966681004
+ 0.9976447225 0.9979879260 0.9967839122
+ 0.9977344871 0.9980779290 0.9968997240
+ 0.9978243709 0.9981678724 0.9970155954
+ 0.9979141951 0.9982579947 0.9971314073
+ 0.9980040789 0.9983479977 0.9972472191
+ 0.9980940223 0.9984341860 0.9973635077
+ 0.9981843829 0.9985107780 0.9974802732
+ 0.9982746840 0.9985873103 0.9975970984
+ 0.9983651042 0.9986637831 0.9977139235
+ 0.9984555244 0.9987403750 0.9978306890
+ 0.9985458851 0.9988169074 0.9979475141
+ 0.9986361861 0.9988934994 0.9980642796
+ 0.9987266064 0.9989699721 0.9981811047
+ 0.9988170266 0.9990465045 0.9982979298
+ 0.9989073873 0.9991230965 0.9984146953
+ 0.9989976883 0.9991996288 0.9985315204
+ 0.9990869761 0.9992740154 0.9986500740
+ 0.9991700053 0.9993399978 0.9987728000
+ 0.9992529750 0.9994059801 0.9988955259
+ 0.9993360043 0.9994720221 0.9990181923
+ 0.9994189739 0.9995380044 0.9991409779
+ 0.9995020032 0.9996039867 0.9992637038
+ 0.9995849729 0.9996700287 0.9993864298
+ 0.9996680021 0.9997360110 0.9995090961
+ 0.9997509718 0.9998019934 0.9996318221
+ 0.9998340011 0.9998679757 0.9997546077
+ 0.9999169707 0.9999340177 0.9998772740
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/kodak_ektachrome_400x.spi1d b/release/datafiles/colormanagement/luts/film_response/kodak_ektachrome_400x.spi1d
new file mode 100644
index 00000000000..3216d6e77c6
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/kodak_ektachrome_400x.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0003428414 0.0002644671 0.0001401811
+ 0.0007192744 0.0005423503 0.0002875368
+ 0.0011335440 0.0008326409 0.0004389792
+ 0.0015786689 0.0011433410 0.0005958441
+ 0.0020476291 0.0014799440 0.0007588092
+ 0.0025404820 0.0018298780 0.0009286210
+ 0.0030616501 0.0021946840 0.0011060070
+ 0.0036125139 0.0025735211 0.0012919310
+ 0.0041929889 0.0029686880 0.0014847160
+ 0.0048043700 0.0033767780 0.0016857330
+ 0.0054497430 0.0038043610 0.0018942290
+ 0.0061183511 0.0042493441 0.0021089639
+ 0.0068146689 0.0047143549 0.0023315491
+ 0.0075340671 0.0051967530 0.0025640430
+ 0.0082950303 0.0057056639 0.0028035671
+ 0.0090911062 0.0062496541 0.0030509511
+ 0.0099175517 0.0068204752 0.0033067439
+ 0.0107904803 0.0074211471 0.0035727150
+ 0.0117002502 0.0080482997 0.0038465990
+ 0.0126570398 0.0087003373 0.0041274340
+ 0.0136648295 0.0093829166 0.0044194721
+ 0.0147075197 0.0101065598 0.0047251140
+ 0.0157950595 0.0108555797 0.0050429730
+ 0.0169297699 0.0116311004 0.0053711529
+ 0.0181103703 0.0124387797 0.0057113222
+ 0.0193332806 0.0132759996 0.0060676620
+ 0.0206129998 0.0141413296 0.0064390958
+ 0.0219328105 0.0150437802 0.0068241018
+ 0.0233088601 0.0159855708 0.0072196471
+ 0.0247331504 0.0169505794 0.0076266280
+ 0.0262072906 0.0179369505 0.0080475174
+ 0.0277359709 0.0189558994 0.0084815770
+ 0.0293284301 0.0200254805 0.0089281071
+ 0.0309679396 0.0211107805 0.0093870452
+ 0.0326597206 0.0222219098 0.0098592760
+ 0.0343937390 0.0233689900 0.0103457300
+ 0.0361940786 0.0245578606 0.0108465999
+ 0.0380464606 0.0257728007 0.0113617396
+ 0.0399493314 0.0270075500 0.0118910903
+ 0.0419140086 0.0282745995 0.0124359597
+ 0.0439488515 0.0296080001 0.0129955998
+ 0.0460439511 0.0309876800 0.0135690300
+ 0.0481984690 0.0323878303 0.0141631197
+ 0.0504118018 0.0338152684 0.0147708496
+ 0.0526927300 0.0352800488 0.0153927896
+ 0.0550270416 0.0367900804 0.0160309207
+ 0.0574264787 0.0383353084 0.0166857298
+ 0.0598822795 0.0398985818 0.0173553694
+ 0.0623928793 0.0414841883 0.0180462394
+ 0.0649654418 0.0431171395 0.0187484995
+ 0.0676013976 0.0448169708 0.0194632709
+ 0.0702958703 0.0465711690 0.0201920494
+ 0.0730418488 0.0483480282 0.0209390707
+ 0.0758519098 0.0501504205 0.0217033103
+ 0.0787305906 0.0519958399 0.0224795192
+ 0.0816697702 0.0538894385 0.0232669692
+ 0.0846705586 0.0558331497 0.0240675099
+ 0.0877186880 0.0578123406 0.0248920992
+ 0.0908257365 0.0598101094 0.0257320199
+ 0.0940086022 0.0618289597 0.0265861396
+ 0.0972353294 0.0639070272 0.0274642892
+ 0.1005206034 0.0660314709 0.0283592492
+ 0.1038618013 0.0682074204 0.0292693600
+ 0.1072567031 0.0704347715 0.0302035604
+ 0.1107103974 0.0726976171 0.0311573707
+ 0.1142259985 0.0749783218 0.0321260095
+ 0.1177944019 0.0772918463 0.0331200808
+ 0.1214151010 0.0796481296 0.0341317691
+ 0.1250821054 0.0820898935 0.0351568311
+ 0.1287855953 0.0845760182 0.0362133905
+ 0.1325509995 0.0870889798 0.0372799113
+ 0.1363651007 0.0896213502 0.0383602083
+ 0.1402193010 0.0921822414 0.0394625701
+ 0.1441060007 0.0947721824 0.0405752398
+ 0.1480046958 0.0973958895 0.0417135507
+ 0.1519186944 0.1000884995 0.0428665988
+ 0.1558499932 0.1028292999 0.0440348983
+ 0.1598220021 0.1056241989 0.0452243313
+ 0.1638336033 0.1084792018 0.0464208983
+ 0.1678801030 0.1113488972 0.0476398095
+ 0.1719820052 0.1142351031 0.0488679707
+ 0.1761175990 0.1171704978 0.0501159504
+ 0.1802733988 0.1201329008 0.0513837487
+ 0.1844418943 0.1231521964 0.0526686385
+ 0.1886288971 0.1262086034 0.0539824814
+ 0.1928298026 0.1292911023 0.0553071685
+ 0.1970759928 0.1324020028 0.0566712618
+ 0.2013373971 0.1355181038 0.0580410585
+ 0.2056180984 0.1386440992 0.0594506897
+ 0.2099272013 0.1417901963 0.0608652011
+ 0.2142390013 0.1449521929 0.0623159185
+ 0.2185354978 0.1481644064 0.0637758672
+ 0.2228298932 0.1513926983 0.0652757511
+ 0.2271223068 0.1547017992 0.0667859018
+ 0.2314382046 0.1580224037 0.0683313832
+ 0.2357621044 0.1613737047 0.0698857680
+ 0.2401127070 0.1647437066 0.0714698881
+ 0.2444832027 0.1681362987 0.0730611980
+ 0.2488923073 0.1715582013 0.0746805519
+ 0.2533152103 0.1749991030 0.0763059929
+ 0.2577489913 0.1784823984 0.0779676214
+ 0.2621993124 0.1819818020 0.0796313584
+ 0.2666550875 0.1855379939 0.0813349113
+ 0.2711015940 0.1891071051 0.0830384567
+ 0.2755472958 0.1927215010 0.0847683027
+ 0.2799974084 0.1963423938 0.0865003392
+ 0.2844476104 0.2000225931 0.0882561207
+ 0.2888987958 0.2037090063 0.0900193900
+ 0.2933452129 0.2073960006 0.0917988792
+ 0.2977733016 0.2110829949 0.0935909674
+ 0.3021937013 0.2147787064 0.0953960270
+ 0.3065907061 0.2184758037 0.0972275063
+ 0.3109777868 0.2221865058 0.0990616009
+ 0.3153359890 0.2259006053 0.1009372994
+ 0.3196929097 0.2296067029 0.1028129980
+ 0.3240458071 0.2333091944 0.1047334969
+ 0.3283928931 0.2370095998 0.1066685989
+ 0.3327110112 0.2407082021 0.1086295024
+ 0.3370262086 0.2444002032 0.1106277034
+ 0.3413048983 0.2480811030 0.1126269996
+ 0.3455835879 0.2517619133 0.1146645993
+ 0.3498139083 0.2554424107 0.1167021990
+ 0.3540413976 0.2591229081 0.1187660992
+ 0.3582440019 0.2627831101 0.1208472997
+ 0.3624396026 0.2664416134 0.1229355037
+ 0.3666112125 0.2701123059 0.1250668019
+ 0.3707655966 0.2737897933 0.1271981001
+ 0.3749122918 0.2774769068 0.1293662041
+ 0.3790445030 0.2811841965 0.1315550953
+ 0.3831717968 0.2848913968 0.1337489933
+ 0.3872435987 0.2885521054 0.1359899044
+ 0.3913154006 0.2922112942 0.1382308006
+ 0.3953064978 0.2958714068 0.1404815018
+ 0.3992744088 0.2995322049 0.1427416056
+ 0.4032138884 0.3031899035 0.1450016946
+ 0.4071162045 0.3068281114 0.1472705007
+ 0.4110161960 0.3104662001 0.1495404989
+ 0.4148718119 0.3140855134 0.1518152952
+ 0.4187273979 0.3176954091 0.1541071981
+ 0.4225727022 0.3213038146 0.1563991010
+ 0.4264118969 0.3249039054 0.1586962938
+ 0.4302516878 0.3285039961 0.1609987020
+ 0.4340943098 0.3320690989 0.1633010954
+ 0.4379369915 0.3356105089 0.1656249017
+ 0.4417563081 0.3391517997 0.1679558009
+ 0.4455639124 0.3426533043 0.1702867001
+ 0.4493665993 0.3461548090 0.1726520061
+ 0.4531346858 0.3496446013 0.1750191003
+ 0.4569028914 0.3531137109 0.1773868054
+ 0.4606313109 0.3565827906 0.1797600985
+ 0.4643262029 0.3600330055 0.1821334064
+ 0.4680210054 0.3634741902 0.1845103949
+ 0.4716567993 0.3669154048 0.1869013011
+ 0.4752872884 0.3703399003 0.1892922968
+ 0.4789054096 0.3737635016 0.1916884929
+ 0.4824860990 0.3771829009 0.1940988004
+ 0.4860669076 0.3805834055 0.1965090930
+ 0.4896276891 0.3839837909 0.1989264935
+ 0.4931711853 0.3873957992 0.2013619989
+ 0.4967147112 0.3908275962 0.2037975937
+ 0.5001958013 0.3942595124 0.2062384039
+ 0.5036591887 0.3976672888 0.2086957991
+ 0.5071225762 0.4010519087 0.2111531943
+ 0.5105044842 0.4044364095 0.2136141956
+ 0.5138846040 0.4077871144 0.2160944939
+ 0.5172544718 0.4111149907 0.2185747027
+ 0.5205571055 0.4144429862 0.2210548967
+ 0.5238596201 0.4177626073 0.2235321999
+ 0.5271421075 0.4210774004 0.2260096073
+ 0.5303608179 0.4243923128 0.2284868956
+ 0.5335794091 0.4276579022 0.2309691012
+ 0.5367782116 0.4308958948 0.2334523946
+ 0.5399305224 0.4341338873 0.2359357029
+ 0.5430827141 0.4373329878 0.2384334058
+ 0.5462197065 0.4405049086 0.2409410030
+ 0.5493230820 0.4436767995 0.2434486002
+ 0.5524265170 0.4468128979 0.2459536940
+ 0.5555045009 0.4499109983 0.2484524995
+ 0.5585151911 0.4530090988 0.2509512901
+ 0.5615258813 0.4560930133 0.2534500957
+ 0.5645241141 0.4591484070 0.2559669018
+ 0.5674679279 0.4622037113 0.2584846020
+ 0.5704116821 0.4652596116 0.2610023916
+ 0.5733518004 0.4683186114 0.2635214031
+ 0.5762202740 0.4713774920 0.2660414875
+ 0.5790888071 0.4744364917 0.2685616016
+ 0.5819572806 0.4774442017 0.2710804045
+ 0.5847468972 0.4804444015 0.2735868096
+ 0.5875238180 0.4834446013 0.2760930955
+ 0.5903006792 0.4864538014 0.2785995007
+ 0.5930446982 0.4894700050 0.2811084092
+ 0.5957688093 0.4924862981 0.2836191952
+ 0.5984929204 0.4954943061 0.2861298919
+ 0.6011797786 0.4984689057 0.2886404097
+ 0.6037912965 0.5014435053 0.2911294997
+ 0.6064026952 0.5044180751 0.2936185896
+ 0.6090142131 0.5073412061 0.2961077094
+ 0.6115440130 0.5102497935 0.2985940874
+ 0.6140723825 0.5131583810 0.3010762036
+ 0.6166006923 0.5160554051 0.3035584092
+ 0.6191328168 0.5189260840 0.3060404956
+ 0.6216673851 0.5217968822 0.3085111082
+ 0.6242020726 0.5246676803 0.3109765947
+ 0.6267291903 0.5274786949 0.3134421110
+ 0.6292034984 0.5302724242 0.3159075975
+ 0.6316779256 0.5330660939 0.3183633983
+ 0.6341521740 0.5358421206 0.3208185136
+ 0.6366034746 0.5385411978 0.3232735991
+ 0.6390401721 0.5412402749 0.3257263005
+ 0.6414769292 0.5439392924 0.3281632960
+ 0.6439121962 0.5465759039 0.3306002915
+ 0.6463143826 0.5491589904 0.3330372870
+ 0.6487165093 0.5517421961 0.3354707062
+ 0.6511186957 0.5543252826 0.3378941119
+ 0.6535044909 0.5568907857 0.3403174877
+ 0.6558670998 0.5594527125 0.3427408934
+ 0.6582297087 0.5620146990 0.3451600075
+ 0.6605921984 0.5645741224 0.3475705981
+ 0.6629050970 0.5670986772 0.3499810994
+ 0.6651992202 0.5696232915 0.3523916006
+ 0.6674932837 0.5721479058 0.3547942042
+ 0.6697874069 0.5746628046 0.3571807146
+ 0.6720268130 0.5771465898 0.3595671952
+ 0.6742650867 0.5796303749 0.3619537950
+ 0.6765033007 0.5821142197 0.3643409908
+ 0.6787335277 0.5846080780 0.3667303920
+ 0.6809238791 0.5871208906 0.3691197932
+ 0.6831144094 0.5896338224 0.3715091050
+ 0.6853048205 0.5921465755 0.3738974929
+ 0.6874766946 0.5946516991 0.3762792051
+ 0.6896049976 0.5971447825 0.3786608875
+ 0.6917333007 0.5996379256 0.3810425997
+ 0.6938616037 0.6021310091 0.3834243119
+ 0.6959702969 0.6046125293 0.3858002126
+ 0.6980445981 0.6070746183 0.3881756961
+ 0.7001190186 0.6095365882 0.3905512989
+ 0.7021933198 0.6119986773 0.3929268122
+ 0.7042300105 0.6144391894 0.3952862024
+ 0.7062014937 0.6168267131 0.3976376057
+ 0.7081729770 0.6192142963 0.3999890983
+ 0.7101445198 0.6216018200 0.4023405910
+ 0.7120977044 0.6239740252 0.4046814144
+ 0.7140085101 0.6262511015 0.4070011973
+ 0.7159193754 0.6285281777 0.4093208909
+ 0.7178301811 0.6308053732 0.4116407037
+ 0.7197390199 0.6330825090 0.4139603972
+ 0.7216380239 0.6352655292 0.4162608087
+ 0.7235370874 0.6374403238 0.4185597897
+ 0.7254360914 0.6396151185 0.4208588004
+ 0.7273350954 0.6417899728 0.4231578112
+ 0.7291654944 0.6438943744 0.4254482090
+ 0.7309942245 0.6459581256 0.4277282059
+ 0.7328227758 0.6480216980 0.4300082028
+ 0.7346515059 0.6500852704 0.4322882891
+ 0.7364507914 0.6521360278 0.4345682859
+ 0.7382380962 0.6541525126 0.4368130863
+ 0.7400254011 0.6561689973 0.4390538931
+ 0.7418125868 0.6581856012 0.4412946999
+ 0.7435858846 0.6602020860 0.4435355067
+ 0.7453356981 0.6621177197 0.4457657039
+ 0.7470855117 0.6640151739 0.4479677975
+ 0.7488353252 0.6659126282 0.4501698911
+ 0.7505850792 0.6678100824 0.4523718953
+ 0.7522721887 0.6696808934 0.4545739889
+ 0.7539572716 0.6715016961 0.4567523003
+ 0.7556424141 0.6733224988 0.4589129984
+ 0.7573276162 0.6751433015 0.4610736966
+ 0.7590008974 0.6769641042 0.4632343948
+ 0.7606620789 0.6787366271 0.4653950036
+ 0.7623233199 0.6804947853 0.4675134122
+ 0.7639845014 0.6822531223 0.4696210027
+ 0.7656456828 0.6840112805 0.4717285931
+ 0.7672730088 0.6857655048 0.4738362134
+ 0.7688981295 0.6874911189 0.4759437144
+ 0.7705233097 0.6892166138 0.4780164063
+ 0.7721484900 0.6909422278 0.4800868034
+ 0.7737551928 0.6926677227 0.4821572006
+ 0.7753220201 0.6943894029 0.4842276871
+ 0.7768889070 0.6961051822 0.4862979054
+ 0.7784556746 0.6978209019 0.4883329868
+ 0.7800226212 0.6995366812 0.4903681874
+ 0.7815604806 0.7012524009 0.4924033880
+ 0.7830802798 0.7029501796 0.4944385886
+ 0.7846000791 0.7046359777 0.4964737892
+ 0.7861198783 0.7063217163 0.4984565973
+ 0.7876396775 0.7080073953 0.5004389286
+ 0.7891361713 0.7096931934 0.5024212003
+ 0.7906283140 0.7113500237 0.5044035912
+ 0.7921203971 0.7129955292 0.5063859224
+ 0.7936124802 0.7146410942 0.5083438754
+ 0.7951045036 0.7162865996 0.5102990866
+ 0.7965341210 0.7179322243 0.5122541785
+ 0.7979624867 0.7195677161 0.5142092705
+ 0.7993909717 0.7212001085 0.5161644220
+ 0.8008195162 0.7228323817 0.5181018710
+ 0.8022456169 0.7244647741 0.5200322866
+ 0.8036258817 0.7260971069 0.5219627023
+ 0.8050063252 0.7276834846 0.5238931179
+ 0.8063865900 0.7292519212 0.5258234739
+ 0.8077669144 0.7308204174 0.5277478099
+ 0.8091464043 0.7323887944 0.5296645164
+ 0.8105019927 0.7339571714 0.5315812826
+ 0.8118575215 0.7355170846 0.5334979892
+ 0.8132131100 0.7370710969 0.5354146957
+ 0.8145685792 0.7386251092 0.5373278856
+ 0.8159241080 0.7401791215 0.5392090082
+ 0.8172050714 0.7417330742 0.5410900712
+ 0.8184810877 0.7432689071 0.5429710746
+ 0.8197571039 0.7447763085 0.5448521972
+ 0.8210331798 0.7462838292 0.5467333198
+ 0.8223091960 0.7477911711 0.5485991836
+ 0.8235437870 0.7492985725 0.5504574180
+ 0.8247652054 0.7507972121 0.5523154736
+ 0.8259866834 0.7522162199 0.5541737080
+ 0.8272081017 0.7536352873 0.5560318232
+ 0.8284295797 0.7550544143 0.5578854084
+ 0.8296269178 0.7564734817 0.5597094297
+ 0.8307995200 0.7578924894 0.5615333915
+ 0.8319721818 0.7592418194 0.5633574128
+ 0.8331449032 0.7605643868 0.5651813745
+ 0.8343175054 0.7618870139 0.5670053959
+ 0.8354796767 0.7632095814 0.5688126087
+ 0.8365802765 0.7645322084 0.5706043243
+ 0.8376808167 0.7658463717 0.5723959208
+ 0.8387814164 0.7671360970 0.5741875768
+ 0.8398818970 0.7684258819 0.5759791732
+ 0.8409824967 0.7697157264 0.5777708888
+ 0.8420794010 0.7710055113 0.5795426965
+ 0.8431748152 0.7722951770 0.5813097954
+ 0.8442702293 0.7735279799 0.5830768943
+ 0.8453655839 0.7747368217 0.5848439932
+ 0.8464609981 0.7759457231 0.5866110921
+ 0.8475471139 0.7771545053 0.5883777738
+ 0.8485909104 0.7783632874 0.5900940895
+ 0.8496348262 0.7795684934 0.5918104053
+ 0.8506786823 0.7807170153 0.5935267210
+ 0.8517224789 0.7818654180 0.5952430964
+ 0.8527663946 0.7830138803 0.5969594121
+ 0.8537737131 0.7841622829 0.5986704230
+ 0.8547530770 0.7853106856 0.6003401279
+ 0.8557325006 0.7864531875 0.6020097733
+ 0.8567119241 0.7875832915 0.6036794186
+ 0.8576912880 0.7887133956 0.6053491235
+ 0.8586707115 0.7898433805 0.6070188284
+ 0.8596333861 0.7909734845 0.6086828709
+ 0.8605933189 0.7921035886 0.6103072166
+ 0.8615533113 0.7932407856 0.6119315028
+ 0.8625131845 0.7943854928 0.6135557890
+ 0.8634731770 0.7955302000 0.6151800752
+ 0.8644313216 0.7966749072 0.6168044209
+ 0.8653596044 0.7978194952 0.6184266806
+ 0.8662878871 0.7989642024 0.6199904084
+ 0.8672162294 0.8000708222 0.6215540767
+ 0.8681445122 0.8011484742 0.6231178045
+ 0.8690729141 0.8022263050 0.6246814728
+ 0.8699941039 0.8033040166 0.6262450814
+ 0.8708788157 0.8043817282 0.6278088093
+ 0.8717635870 0.8054593801 0.6293694973
+ 0.8726484179 0.8065189123 0.6309295893
+ 0.8735331297 0.8075633049 0.6324898005
+ 0.8744179010 0.8086076975 0.6340498924
+ 0.8752959967 0.8096520901 0.6356101036
+ 0.8761417270 0.8106964827 0.6371701956
+ 0.8769873977 0.8117408752 0.6387233734
+ 0.8778331280 0.8127887249 0.6402710080
+ 0.8786787987 0.8138411045 0.6418185830
+ 0.8795245290 0.8148934841 0.6433662176
+ 0.8803673983 0.8159459233 0.6449137926
+ 0.8811801076 0.8169983029 0.6464614868
+ 0.8819928765 0.8180506825 0.6480066180
+ 0.8828055859 0.8190910220 0.6495386958
+ 0.8836184144 0.8200846910 0.6510708928
+ 0.8844311237 0.8210783005 0.6526029706
+ 0.8852438927 0.8220720291 0.6541351080
+ 0.8860117793 0.8230656981 0.6556673050
+ 0.8867745996 0.8240593076 0.6571993828
+ 0.8875373006 0.8250529766 0.6587041020
+ 0.8883000016 0.8260309100 0.6601948738
+ 0.8890628219 0.8270068169 0.6616855860
+ 0.8898255229 0.8279826045 0.6631764174
+ 0.8905583024 0.8289585114 0.6646671891
+ 0.8912715912 0.8299342990 0.6661580205
+ 0.8919848800 0.8309102058 0.6676467061
+ 0.8926982284 0.8318812847 0.6691030264
+ 0.8934115767 0.8328469992 0.6705592871
+ 0.8941249251 0.8338125944 0.6720156074
+ 0.8948332071 0.8347781897 0.6734719276
+ 0.8955228925 0.8357439041 0.6749281883
+ 0.8962126970 0.8367094994 0.6763845086
+ 0.8969023824 0.8376750946 0.6778261065
+ 0.8975921869 0.8385697007 0.6792402864
+ 0.8982818723 0.8394591808 0.6806545854
+ 0.8989716768 0.8403486013 0.6820688248
+ 0.8996360898 0.8412380219 0.6834830046
+ 0.9002904892 0.8421275020 0.6848973036
+ 0.9009450078 0.8430169225 0.6863114834
+ 0.9015994072 0.8438990116 0.6877009869
+ 0.9022538066 0.8447635770 0.6890684962
+ 0.9029083252 0.8456280828 0.6904361248
+ 0.9035584927 0.8464927077 0.6918036938
+ 0.9041764140 0.8473572731 0.6931712031
+ 0.9047942758 0.8482218981 0.6945387721
+ 0.9054121971 0.8490865231 0.6959062815
+ 0.9060301781 0.8499292731 0.6972550750
+ 0.9066480994 0.8507544994 0.6985912919
+ 0.9072660208 0.8515797257 0.6999275088
+ 0.9078578949 0.8524048924 0.7012637258
+ 0.9084116817 0.8532301188 0.7025998831
+ 0.9089655280 0.8540552855 0.7039362192
+ 0.9095193148 0.8548805118 0.7052723765
+ 0.9100729823 0.8557091951 0.7065873146
+ 0.9106268287 0.8565393090 0.7078853250
+ 0.9111806154 0.8573694825 0.7091832161
+ 0.9117125273 0.8581997156 0.7104812264
+ 0.9122291207 0.8590298891 0.7117791176
+ 0.9127455950 0.8598600030 0.7130771279
+ 0.9132621288 0.8606901765 0.7143750191
+ 0.9137787223 0.8614907861 0.7156553864
+ 0.9142951965 0.8622807264 0.7169089913
+ 0.9148116708 0.8630706072 0.7181627154
+ 0.9153102040 0.8638604879 0.7194163203
+ 0.9157993793 0.8646503091 0.7206699252
+ 0.9162884951 0.8654401898 0.7219234705
+ 0.9167776108 0.8662300706 0.7231771946
+ 0.9172667861 0.8670079708 0.7244259715
+ 0.9177559018 0.8677796721 0.7256401777
+ 0.9182450175 0.8685513735 0.7268543243
+ 0.9187002778 0.8693230152 0.7280684114
+ 0.9191343188 0.8700947165 0.7292826176
+ 0.9195683002 0.8708662987 0.7304967046
+ 0.9200022817 0.8716380000 0.7317107916
+ 0.9204363227 0.8723940253 0.7329249978
+ 0.9208703041 0.8731313944 0.7341042161
+ 0.9213042855 0.8738688231 0.7352702022
+ 0.9217389822 0.8746061921 0.7364361882
+ 0.9221745729 0.8753436804 0.7376021743
+ 0.9226102233 0.8760811090 0.7387682796
+ 0.9230456948 0.8768184781 0.7399343252
+ 0.9234812856 0.8775455952 0.7411003113
+ 0.9239168763 0.8782122135 0.7422618270
+ 0.9243525267 0.8788788915 0.7434059978
+ 0.9247846007 0.8795455098 0.7445502877
+ 0.9252011776 0.8802121878 0.7456945777
+ 0.9256178141 0.8808789253 0.7468389273
+ 0.9260342717 0.8815454841 0.7479830980
+ 0.9264509082 0.8822122216 0.7491273880
+ 0.9268674850 0.8828688264 0.7502716780
+ 0.9272841215 0.8835214972 0.7514011860
+ 0.9277005792 0.8841741085 0.7525197268
+ 0.9280946255 0.8848267794 0.7536382079
+ 0.9284824133 0.8854793906 0.7547566891
+ 0.9288702011 0.8861320019 0.7558751702
+ 0.9292579889 0.8867846727 0.7569937110
+ 0.9296457767 0.8874309063 0.7581123114
+ 0.9300336242 0.8880439997 0.7592307925
+ 0.9304214716 0.8886572123 0.7603214979
+ 0.9308112860 0.8892703056 0.7614058256
+ 0.9312064052 0.8898835182 0.7624900937
+ 0.9316015244 0.8904966116 0.7635744214
+ 0.9319965839 0.8911098242 0.7646586895
+ 0.9323917031 0.8917229176 0.7657430172
+ 0.9327868223 0.8923314214 0.7668272853
+ 0.9331818819 0.8929349184 0.7679116130
+ 0.9335770011 0.8935384154 0.7689800262
+ 0.9339686036 0.8941419125 0.7700471282
+ 0.9343581796 0.8947455287 0.7711141109
+ 0.9347478151 0.8953490257 0.7721812129
+ 0.9351373911 0.8959525228 0.7732483149
+ 0.9355270267 0.8965560198 0.7743152976
+ 0.9359166026 0.8971521854 0.7753823996
+ 0.9363061786 0.8977450132 0.7764495015
+ 0.9366958141 0.8983377814 0.7774727941
+ 0.9370884895 0.8989306092 0.7784914970
+ 0.9374815822 0.8995233774 0.7795102000
+ 0.9378746748 0.9001162052 0.7805289030
+ 0.9382678270 0.9007089734 0.7815477252
+ 0.9386609197 0.9013018012 0.7825664282
+ 0.9390540123 0.9018632174 0.7835850716
+ 0.9394471049 0.9024146795 0.7846037745
+ 0.9398401976 0.9029660821 0.7855820060
+ 0.9402080178 0.9035176039 0.7865473032
+ 0.9405754209 0.9040690064 0.7875126004
+ 0.9409428835 0.9046205282 0.7884777784
+ 0.9413102865 0.9051718712 0.7894430757
+ 0.9416776896 0.9057233930 0.7904083729
+ 0.9420450926 0.9062736034 0.7913736105
+ 0.9424126148 0.9068232179 0.7923389077
+ 0.9427800179 0.9073727727 0.7932832241
+ 0.9431211948 0.9079225063 0.7942044735
+ 0.9434615970 0.9084721208 0.7951257825
+ 0.9438019991 0.9090217948 0.7960470915
+ 0.9441424012 0.9095714092 0.7969682813
+ 0.9444829226 0.9101210237 0.7978895903
+ 0.9448233247 0.9106593132 0.7988108993
+ 0.9451637268 0.9111868739 0.7997322083
+ 0.9455041289 0.9117143750 0.8006522059
+ 0.9458433986 0.9122418761 0.8015512228
+ 0.9461824298 0.9127693772 0.8024501204
+ 0.9465214014 0.9132968783 0.8033490777
+ 0.9468603730 0.9138243794 0.8042480946
+ 0.9471994042 0.9143518806 0.8051471114
+ 0.9475384951 0.9148817062 0.8060461283
+ 0.9478775263 0.9154210091 0.8069450855
+ 0.9482164979 0.9159603715 0.8078441024
+ 0.9485536218 0.9164997935 0.8087291718
+ 0.9488890767 0.9170392156 0.8096008897
+ 0.9492245913 0.9175785184 0.8104726076
+ 0.9495601058 0.9181178808 0.8113443255
+ 0.9498956203 0.9186573029 0.8122159839
+ 0.9502310157 0.9191967249 0.8130877018
+ 0.9505664706 0.9197019935 0.8139594197
+ 0.9509019852 0.9201949835 0.8148310781
+ 0.9512333870 0.9206879139 0.8157027960
+ 0.9515367150 0.9211807847 0.8165382743
+ 0.9518401027 0.9216737747 0.8173654079
+ 0.9521434903 0.9221667051 0.8181924820
+ 0.9524468184 0.9226595759 0.8190196753
+ 0.9527502060 0.9231525064 0.8198468089
+ 0.9530535936 0.9236370921 0.8206740022
+ 0.9533569813 0.9240685105 0.8215010762
+ 0.9536603093 0.9244999290 0.8223283291
+ 0.9539365172 0.9249312282 0.8231554031
+ 0.9541925788 0.9253625870 0.8239536285
+ 0.9544487000 0.9257940054 0.8247510791
+ 0.9547048807 0.9262254238 0.8255487084
+ 0.9549610019 0.9266567230 0.8263462782
+ 0.9552171230 0.9270880818 0.8271439075
+ 0.9554733038 0.9275091887 0.8279414773
+ 0.9557294250 0.9279149771 0.8287389874
+ 0.9559856057 0.9283208251 0.8295366168
+ 0.9562343955 0.9287264943 0.8303341866
+ 0.9564822912 0.9291322827 0.8311038017
+ 0.9567301273 0.9295380116 0.8318734765
+ 0.9569780231 0.9299438000 0.8326432109
+ 0.9572259188 0.9303495884 0.8334128261
+ 0.9574738145 0.9307553172 0.8341825008
+ 0.9577217102 0.9311472178 0.8349521756
+ 0.9579694867 0.9315264225 0.8357219100
+ 0.9582170844 0.9319056273 0.8364915252
+ 0.9584596753 0.9322847724 0.8372612000
+ 0.9587022066 0.9326639771 0.8380025029
+ 0.9589446783 0.9330431223 0.8387396932
+ 0.9591872096 0.9334223270 0.8394770026
+ 0.9594296813 0.9338014722 0.8402141929
+ 0.9596722126 0.9341806769 0.8409515023
+ 0.9599146843 0.9345543981 0.8416886926
+ 0.9601572156 0.9349225760 0.8424260020
+ 0.9603989124 0.9352908134 0.8431631923
+ 0.9606298208 0.9356588721 0.8439005017
+ 0.9608606100 0.9360271096 0.8446270823
+ 0.9610915184 0.9363952875 0.8453466296
+ 0.9613224268 0.9367635250 0.8460661769
+ 0.9615532756 0.9371317029 0.8467857838
+ 0.9617841840 0.9374998808 0.8475053906
+ 0.9620149732 0.9378612041 0.8482248783
+ 0.9622458816 0.9382085204 0.8489444852
+ 0.9624767900 0.9385557771 0.8496640921
+ 0.9627113938 0.9389030933 0.8503836989
+ 0.9629462957 0.9392504096 0.8510984778
+ 0.9631810784 0.9395977259 0.8517916203
+ 0.9634159207 0.9399449825 0.8524847031
+ 0.9636507034 0.9402922988 0.8531777263
+ 0.9638856053 0.9406396151 0.8538708091
+ 0.9641203880 0.9409868717 0.8545638919
+ 0.9643551707 0.9413303137 0.8552569151
+ 0.9645900726 0.9416738153 0.8559499979
+ 0.9648157954 0.9420171976 0.8566430211
+ 0.9650372267 0.9423606992 0.8573361039
+ 0.9652585983 0.9427040815 0.8580203056
+ 0.9654800892 0.9430475831 0.8586984873
+ 0.9657015204 0.9433910251 0.8593767285
+ 0.9659228921 0.9437345266 0.8600549102
+ 0.9661443233 0.9440779090 0.8607330918
+ 0.9663656950 0.9444156289 0.8614112735
+ 0.9665871263 0.9447482824 0.8620895147
+ 0.9668061733 0.9450809956 0.8627676964
+ 0.9670186043 0.9454137087 0.8634458780
+ 0.9672309160 0.9457464218 0.8641241193
+ 0.9674432278 0.9460790157 0.8647658229
+ 0.9676554799 0.9464117289 0.8654016256
+ 0.9678679109 0.9467443824 0.8660374284
+ 0.9680802226 0.9470770955 0.8666731715
+ 0.9682924747 0.9474098086 0.8673089743
+ 0.9685047865 0.9477065802 0.8679447770
+ 0.9687172174 0.9479998946 0.8685806990
+ 0.9689158201 0.9482930899 0.8692165017
+ 0.9691076875 0.9485862851 0.8698523045
+ 0.9692996740 0.9488794804 0.8704881072
+ 0.9694917202 0.9491726756 0.8711016178
+ 0.9696837068 0.9494658709 0.8717142940
+ 0.9698755741 0.9497591257 0.8723270893
+ 0.9700676203 0.9500523210 0.8729398847
+ 0.9702596068 0.9503493905 0.8735526204
+ 0.9704515934 0.9506735206 0.8741654158
+ 0.9706435204 0.9509977102 0.8747782111
+ 0.9708371758 0.9513218999 0.8753908873
+ 0.9710310102 0.9516459703 0.8760036826
+ 0.9712247849 0.9519702196 0.8766164780
+ 0.9714186192 0.9522942901 0.8772181273
+ 0.9716123939 0.9526184797 0.8778185844
+ 0.9718062282 0.9529427290 0.8784192204
+ 0.9720000029 0.9532667994 0.8790197968
+ 0.9721937776 0.9535914063 0.8796203136
+ 0.9723876119 0.9539176226 0.8802208900
+ 0.9725819230 0.9542437792 0.8808215261
+ 0.9727863073 0.9545699954 0.8814219832
+ 0.9729905725 0.9548962116 0.8820226192
+ 0.9731948972 0.9552224278 0.8826230764
+ 0.9733992815 0.9555485845 0.8832188249
+ 0.9736036062 0.9558748007 0.8838123083
+ 0.9738078713 0.9562010169 0.8844056726
+ 0.9740121961 0.9565271735 0.8849992156
+ 0.9742165804 0.9568511248 0.8855926991
+ 0.9744209051 0.9571459889 0.8861861825
+ 0.9746251702 0.9574409127 0.8867797256
+ 0.9748240113 0.9577358961 0.8873730898
+ 0.9750226736 0.9580308199 0.8879665732
+ 0.9752213955 0.9583256841 0.8885601163
+ 0.9754201770 0.9586207271 0.8891478777
+ 0.9756188989 0.9589155912 0.8897228837
+ 0.9758176208 0.9592105150 0.8902978897
+ 0.9760162830 0.9595054984 0.8908728957
+ 0.9762151241 0.9598004222 0.8914479017
+ 0.9764137864 0.9600865245 0.8920229077
+ 0.9766125083 0.9603704214 0.8925979137
+ 0.9767935276 0.9606543183 0.8931729198
+ 0.9769693017 0.9609382749 0.8937479258
+ 0.9771450758 0.9612221718 0.8943228722
+ 0.9773209095 0.9615061283 0.8948978782
+ 0.9774966836 0.9617900848 0.8954554200
+ 0.9776725173 0.9620739818 0.8960071206
+ 0.9778482914 0.9623578787 0.8965588808
+ 0.9780241251 0.9626418948 0.8971105814
+ 0.9781998992 0.9629204869 0.8976622820
+ 0.9783756733 0.9631900191 0.8982141018
+ 0.9785385132 0.9634596109 0.8987658024
+ 0.9786810875 0.9637290835 0.8993175030
+ 0.9788236022 0.9639986157 0.8998693228
+ 0.9789661765 0.9642680883 0.9004210234
+ 0.9791086912 0.9645376801 0.9009723067
+ 0.9792513251 0.9648072124 0.9015076160
+ 0.9793937802 0.9650766850 0.9020429850
+ 0.9795364141 0.9653462172 0.9025782943
+ 0.9796789289 0.9656158090 0.9031136036
+ 0.9798215032 0.9658737183 0.9036489725
+ 0.9799640179 0.9661279917 0.9041842818
+ 0.9800881743 0.9663822055 0.9047195911
+ 0.9802088141 0.9666364789 0.9052549005
+ 0.9803295135 0.9668908119 0.9057903290
+ 0.9804500937 0.9671450853 0.9063255787
+ 0.9805706739 0.9673992991 0.9068583846
+ 0.9806913733 0.9676535726 0.9073730111
+ 0.9808120131 0.9679079056 0.9078876972
+ 0.9809325933 0.9681621790 0.9084023237
+ 0.9810532928 0.9684163928 0.9089170098
+ 0.9811738729 0.9686573148 0.9094316959
+ 0.9812927842 0.9688978791 0.9099463224
+ 0.9813982248 0.9691385031 0.9104610085
+ 0.9815034866 0.9693791270 0.9109755754
+ 0.9816088080 0.9696196914 0.9114903212
+ 0.9817141294 0.9698603153 0.9120050073
+ 0.9818193913 0.9701009989 0.9125185013
+ 0.9819247127 0.9703416228 0.9130074978
+ 0.9820299745 0.9705821872 0.9134966135
+ 0.9821352959 0.9708228111 0.9139856100
+ 0.9822406173 0.9710630178 0.9144747257
+ 0.9823458791 0.9712886810 0.9149637222
+ 0.9824467897 0.9715144038 0.9154527783
+ 0.9825308919 0.9717401266 0.9159417748
+ 0.9826151133 0.9719656706 0.9164308906
+ 0.9826992154 0.9721913934 0.9169198871
+ 0.9827833176 0.9724171162 0.9174090028
+ 0.9828674793 0.9726427794 0.9178979993
+ 0.9829515815 0.9728683829 0.9183769822
+ 0.9830356836 0.9730941057 0.9188531041
+ 0.9831197858 0.9733198285 0.9193292260
+ 0.9832040071 0.9735454917 0.9198052883
+ 0.9832881093 0.9737340212 0.9202814102
+ 0.9833707809 0.9739177823 0.9207574725
+ 0.9834439754 0.9741016030 0.9212337136
+ 0.9835172892 0.9742854238 0.9217097759
+ 0.9835904837 0.9744691253 0.9221858978
+ 0.9836636782 0.9746528864 0.9226620197
+ 0.9837368727 0.9748367071 0.9231380820
+ 0.9838101864 0.9750205278 0.9236043096
+ 0.9838833809 0.9752042890 0.9240511060
+ 0.9839565754 0.9753881097 0.9244979024
+ 0.9840298891 0.9755718708 0.9249446988
+ 0.9841030836 0.9757249951 0.9253914952
+ 0.9841762781 0.9758548141 0.9258382916
+ 0.9842556119 0.9759846926 0.9262850881
+ 0.9843357205 0.9761145711 0.9267318249
+ 0.9844158292 0.9762445092 0.9271786213
+ 0.9844958782 0.9763743877 0.9276254177
+ 0.9845761061 0.9765042067 0.9280722141
+ 0.9846562147 0.9766340852 0.9285190105
+ 0.9847363234 0.9767640233 0.9289492965
+ 0.9848164916 0.9768939018 0.9293727875
+ 0.9848966002 0.9770237803 0.9297962785
+ 0.9849767089 0.9771535993 0.9302198291
+ 0.9850568175 0.9772822857 0.9306433201
+ 0.9851419926 0.9774109721 0.9310668111
+ 0.9852340221 0.9775397778 0.9314903021
+ 0.9853258729 0.9776685238 0.9319137931
+ 0.9854179025 0.9777972102 0.9323372841
+ 0.9855098724 0.9779258966 0.9327607751
+ 0.9856017828 0.9780547023 0.9331843257
+ 0.9856938124 0.9781833887 0.9336078167
+ 0.9857857227 0.9783120751 0.9340065718
+ 0.9858776927 0.9784408808 0.9344022870
+ 0.9859697223 0.9785696268 0.9347980022
+ 0.9860615730 0.9787036777 0.9351937175
+ 0.9861536026 0.9788467884 0.9355893731
+ 0.9862487912 0.9789898992 0.9359850883
+ 0.9863448143 0.9791330099 0.9363806844
+ 0.9864408970 0.9792761207 0.9367763996
+ 0.9865369201 0.9794191718 0.9371721148
+ 0.9866328835 0.9795622230 0.9375677705
+ 0.9867290258 0.9797052741 0.9379634857
+ 0.9868249893 0.9798483849 0.9383592010
+ 0.9869210124 0.9799914956 0.9387403131
+ 0.9870170951 0.9801346064 0.9391192794
+ 0.9871131182 0.9802777171 0.9394981861
+ 0.9872090816 0.9804211855 0.9398772120
+ 0.9873052239 0.9805650711 0.9402561784
+ 0.9874122143 0.9807090163 0.9406352043
+ 0.9875195026 0.9808530211 0.9410141706
+ 0.9876267910 0.9809969068 0.9413931966
+ 0.9877340198 0.9811409116 0.9417721033
+ 0.9878413081 0.9812847972 0.9421511292
+ 0.9879485965 0.9814286828 0.9425300956
+ 0.9880558848 0.9815726876 0.9429091215
+ 0.9881631136 0.9817165732 0.9432799816
+ 0.9882704020 0.9818605781 0.9436467290
+ 0.9883776903 0.9820045233 0.9440134168
+ 0.9884849787 0.9821479917 0.9443802238
+ 0.9885923266 0.9822906852 0.9447469115
+ 0.9887036085 0.9824334979 0.9451135993
+ 0.9888151288 0.9825763106 0.9454804063
+ 0.9889264703 0.9827191234 0.9458470941
+ 0.9890379906 0.9828618765 0.9462139010
+ 0.9891495109 0.9830046892 0.9465805888
+ 0.9892609715 0.9831475019 0.9469472766
+ 0.9893724918 0.9832903147 0.9473140836
+ 0.9894838929 0.9834331274 0.9476754069
+ 0.9895954132 0.9835758805 0.9480211139
+ 0.9897068739 0.9837186933 0.9483667016
+ 0.9898183942 0.9838594198 0.9487122893
+ 0.9899299145 0.9839885831 0.9490579963
+ 0.9900401235 0.9841178060 0.9494035840
+ 0.9901499152 0.9842470884 0.9497491717
+ 0.9902598262 0.9843763113 0.9500948787
+ 0.9903696179 0.9845055938 0.9504405260
+ 0.9904795289 0.9846348166 0.9507861137
+ 0.9905893207 0.9847640991 0.9511318207
+ 0.9906991124 0.9848933220 0.9514774084
+ 0.9908090234 0.9850226045 0.9518229961
+ 0.9909188151 0.9851518273 0.9521476030
+ 0.9910287261 0.9852811098 0.9524605274
+ 0.9911385179 0.9854102731 0.9527733922
+ 0.9912483096 0.9855383039 0.9530863166
+ 0.9913557172 0.9856656790 0.9533991814
+ 0.9914582968 0.9857931137 0.9537121058
+ 0.9915608764 0.9859204888 0.9540249705
+ 0.9916635156 0.9860478044 0.9543378949
+ 0.9917660952 0.9861751795 0.9546508193
+ 0.9918686748 0.9863026142 0.9549636841
+ 0.9919713140 0.9864299893 0.9552766085
+ 0.9920738935 0.9865574241 0.9555894732
+ 0.9921764731 0.9866846800 0.9559023976
+ 0.9922791123 0.9868121147 0.9562044144
+ 0.9923816919 0.9869394898 0.9565039873
+ 0.9924842715 0.9870668054 0.9568036795
+ 0.9925869107 0.9871830940 0.9571033120
+ 0.9926795959 0.9872993827 0.9574030042
+ 0.9927687049 0.9874156713 0.9577025771
+ 0.9928578734 0.9875320196 0.9580023289
+ 0.9929469824 0.9876484275 0.9583019018
+ 0.9930362105 0.9877647161 0.9586015940
+ 0.9931253195 0.9878810048 0.9589012265
+ 0.9932144880 0.9879972935 0.9592009187
+ 0.9933035970 0.9881135821 0.9595004916
+ 0.9933928251 0.9882298708 0.9598001838
+ 0.9934818745 0.9883462787 0.9600859880
+ 0.9935711026 0.9884626269 0.9603683949
+ 0.9936602116 0.9885759950 0.9606508017
+ 0.9937493801 0.9886701107 0.9609330893
+ 0.9938194156 0.9887642264 0.9612154961
+ 0.9938877821 0.9888582230 0.9614979029
+ 0.9939562082 0.9889522791 0.9617803097
+ 0.9940245748 0.9890463948 0.9620627165
+ 0.9940930009 0.9891405106 0.9623451233
+ 0.9941614866 0.9892346263 0.9626274109
+ 0.9942299128 0.9893286228 0.9629098177
+ 0.9942982793 0.9894226789 0.9631922245
+ 0.9943667054 0.9895167947 0.9634745717
+ 0.9944350719 0.9896109104 0.9637439251
+ 0.9945034981 0.9897050261 0.9640030265
+ 0.9945719838 0.9897977114 0.9642621875
+ 0.9946404099 0.9898560047 0.9645212889
+ 0.9946832061 0.9899142981 0.9647803903
+ 0.9947232008 0.9899725914 0.9650396109
+ 0.9947631955 0.9900308847 0.9652987123
+ 0.9948033094 0.9900891781 0.9655578732
+ 0.9948433042 0.9901474714 0.9658169746
+ 0.9948832989 0.9902058244 0.9660760760
+ 0.9949232936 0.9902641177 0.9663352966
+ 0.9949632883 0.9903224111 0.9665943980
+ 0.9950032830 0.9903807044 0.9668534994
+ 0.9950432777 0.9904391170 0.9671121836
+ 0.9950833917 0.9904974103 0.9673674703
+ 0.9951233864 0.9905557036 0.9676228166
+ 0.9951633811 0.9905830026 0.9678779840
+ 0.9951838851 0.9905992150 0.9681332707
+ 0.9951946735 0.9906154275 0.9683884978
+ 0.9952054024 0.9906315804 0.9686437845
+ 0.9952160716 0.9906477928 0.9688990116
+ 0.9952269197 0.9906640053 0.9691542983
+ 0.9952375889 0.9906800985 0.9694095254
+ 0.9952483177 0.9906963110 0.9696648121
+ 0.9952589869 0.9907125235 0.9699200988
+ 0.9952697754 0.9907286763 0.9701753259
+ 0.9952805042 0.9907448888 0.9704306126
+ 0.9952911735 0.9907611012 0.9706832170
+ 0.9953020215 0.9907773137 0.9709324241
+ 0.9953126907 0.9907947183 0.9711815715
+ 0.9953212142 0.9908165932 0.9714307785
+ 0.9953212142 0.9908384085 0.9716799855
+ 0.9953212142 0.9908602834 0.9719290733
+ 0.9953212142 0.9908822179 0.9721782804
+ 0.9953212142 0.9909040928 0.9724274874
+ 0.9953212142 0.9909260273 0.9726766944
+ 0.9953212142 0.9909479022 0.9729259014
+ 0.9953212142 0.9909697771 0.9731751084
+ 0.9953212142 0.9909917116 0.9734243155
+ 0.9953212142 0.9910135865 0.9736735225
+ 0.9953212142 0.9910355210 0.9739227295
+ 0.9953212142 0.9910573959 0.9741604924
+ 0.9953212142 0.9910792708 0.9743885994
+ 0.9953212142 0.9911091924 0.9746165872
+ 0.9953212142 0.9911481738 0.9748446941
+ 0.9953212142 0.9911870956 0.9750726819
+ 0.9953212142 0.9912260771 0.9753007889
+ 0.9953212142 0.9912649989 0.9755288959
+ 0.9953212142 0.9913039804 0.9757568836
+ 0.9953212142 0.9913429022 0.9759849906
+ 0.9953212142 0.9913818836 0.9762129784
+ 0.9953212142 0.9914208055 0.9764410853
+ 0.9953212142 0.9914597869 0.9766690731
+ 0.9953212142 0.9914987087 0.9768971801
+ 0.9953212142 0.9915376902 0.9771252871
+ 0.9953212142 0.9915766120 0.9773470759
+ 0.9953212142 0.9916155934 0.9775602818
+ 0.9953212142 0.9916595817 0.9777734280
+ 0.9953212142 0.9917085767 0.9779865742
+ 0.9953212142 0.9917575717 0.9781997800
+ 0.9953212142 0.9918066263 0.9784129262
+ 0.9953212142 0.9918555021 0.9786260724
+ 0.9953212142 0.9919044971 0.9788392186
+ 0.9953212142 0.9919534922 0.9790524244
+ 0.9953212142 0.9920024872 0.9792655706
+ 0.9953212142 0.9920514822 0.9794787169
+ 0.9953212142 0.9921004176 0.9796919227
+ 0.9953212142 0.9921494126 0.9799050093
+ 0.9953212142 0.9921984076 0.9801182151
+ 0.9953212142 0.9922474027 0.9803304076
+ 0.9953212142 0.9922963977 0.9805278778
+ 0.9953212142 0.9923471808 0.9807254076
+ 0.9953224063 0.9924020767 0.9809228182
+ 0.9953249097 0.9924570918 0.9811202884
+ 0.9953272939 0.9925119877 0.9813178182
+ 0.9953297973 0.9925670028 0.9815152884
+ 0.9953323007 0.9926218987 0.9817128181
+ 0.9953346848 0.9926769137 0.9819102883
+ 0.9953371882 0.9927318096 0.9821078181
+ 0.9953395724 0.9927868247 0.9823052883
+ 0.9953420758 0.9928417206 0.9825028181
+ 0.9953445196 0.9928966761 0.9827002287
+ 0.9953470230 0.9929515719 0.9828976989
+ 0.9953494072 0.9930065870 0.9830952287
+ 0.9953519106 0.9930614829 0.9832865000
+ 0.9953542948 0.9931164980 0.9834707975
+ 0.9953567982 0.9931734204 0.9836549759
+ 0.9953591824 0.9932305217 0.9838392735
+ 0.9953616858 0.9932876825 0.9840235710
+ 0.9953641891 0.9933447838 0.9842079282
+ 0.9953665733 0.9934020042 0.9843922257
+ 0.9953690767 0.9934591055 0.9845765233
+ 0.9953715205 0.9935163260 0.9847608209
+ 0.9953740239 0.9935734272 0.9849451184
+ 0.9953764081 0.9936305881 0.9851294160
+ 0.9953789115 0.9936876893 0.9853137136
+ 0.9953812957 0.9937449098 0.9854980111
+ 0.9953837991 0.9938020110 0.9856823087
+ 0.9953861833 0.9938591719 0.9858666062
+ 0.9953886867 0.9939162731 0.9860420227
+ 0.9953911901 0.9939727783 0.9862126112
+ 0.9953935742 0.9940270185 0.9863831997
+ 0.9953960776 0.9940811992 0.9865537882
+ 0.9953985214 0.9941353798 0.9867243767
+ 0.9954010248 0.9941896200 0.9868950248
+ 0.9954034090 0.9942439198 0.9870656133
+ 0.9954059124 0.9942981005 0.9872363210
+ 0.9954082966 0.9943522811 0.9874069095
+ 0.9954108000 0.9944065213 0.9875774980
+ 0.9954131842 0.9944607019 0.9877480865
+ 0.9954156876 0.9945148826 0.9879186749
+ 0.9954180717 0.9945691228 0.9880893230
+ 0.9954205751 0.9946233034 0.9882599115
+ 0.9954230785 0.9946774840 0.9884305000
+ 0.9954255223 0.9947317243 0.9885919094
+ 0.9954280257 0.9947829843 0.9887465835
+ 0.9954304099 0.9948282242 0.9889013767
+ 0.9954329133 0.9948732853 0.9890561104
+ 0.9954352975 0.9949185252 0.9892109036
+ 0.9954378009 0.9949635863 0.9893655777
+ 0.9954401851 0.9950088263 0.9895203114
+ 0.9954426885 0.9950540066 0.9896751046
+ 0.9954450727 0.9950991273 0.9898297787
+ 0.9954475760 0.9951443076 0.9899845719
+ 0.9954500198 0.9951894283 0.9901393056
+ 0.9954525232 0.9952346087 0.9902940989
+ 0.9954550266 0.9952797890 0.9904487729
+ 0.9954574108 0.9953249097 0.9906036258
+ 0.9954599142 0.9953700900 0.9907582998
+ 0.9954622984 0.9954152107 0.9909070134
+ 0.9954648018 0.9954605103 0.9910390973
+ 0.9954801202 0.9955064058 0.9911711812
+ 0.9955012202 0.9955521822 0.9913033247
+ 0.9955222011 0.9955980778 0.9914354086
+ 0.9955431819 0.9956439137 0.9915674925
+ 0.9955642223 0.9956898093 0.9916995764
+ 0.9955853224 0.9957355857 0.9918317199
+ 0.9956063032 0.9957814813 0.9919638038
+ 0.9956272840 0.9958273172 0.9920958877
+ 0.9956483245 0.9958732128 0.9922279716
+ 0.9956693053 0.9959189892 0.9923601151
+ 0.9956904054 0.9959648848 0.9924923182
+ 0.9957113862 0.9960107207 0.9926244020
+ 0.9957324266 0.9960566163 0.9927564859
+ 0.9957534075 0.9961023927 0.9928886294
+ 0.9957743883 0.9961482882 0.9930137992
+ 0.9957994223 0.9961935878 0.9931361079
+ 0.9958305955 0.9962387085 0.9932584167
+ 0.9958618283 0.9962838292 0.9933807254
+ 0.9958930016 0.9963290095 0.9935030937
+ 0.9959241748 0.9963740706 0.9936254025
+ 0.9959552884 0.9964193106 0.9937477112
+ 0.9959865212 0.9964643717 0.9938700199
+ 0.9960176945 0.9965096116 0.9939923882
+ 0.9960489273 0.9965546727 0.9941146970
+ 0.9960801005 0.9965999126 0.9942370057
+ 0.9961112738 0.9966449738 0.9943593144
+ 0.9961425066 0.9966902137 0.9944816828
+ 0.9961736798 0.9967352748 0.9946039915
+ 0.9962049127 0.9967803955 0.9947263002
+ 0.9962360859 0.9968255758 0.9948486090
+ 0.9962673187 0.9968703985 0.9949529171
+ 0.9963043928 0.9969134927 0.9950549006
+ 0.9963427782 0.9969565868 0.9951568842
+ 0.9963811040 0.9969998002 0.9952589273
+ 0.9964194894 0.9970428944 0.9953609109
+ 0.9964578152 0.9970859885 0.9954628944
+ 0.9964962006 0.9971290827 0.9955649972
+ 0.9965345263 0.9971721768 0.9956669807
+ 0.9965729117 0.9972152710 0.9957690239
+ 0.9966111779 0.9972584248 0.9958710074
+ 0.9966496229 0.9973015189 0.9959729910
+ 0.9966878891 0.9973446131 0.9960749745
+ 0.9967262745 0.9973878264 0.9961770177
+ 0.9967646003 0.9974309206 0.9962790012
+ 0.9968029857 0.9974740148 0.9963809848
+ 0.9968413115 0.9975171089 0.9964830279
+ 0.9968796968 0.9975619912 0.9965667129
+ 0.9969285727 0.9976121783 0.9966462255
+ 0.9969775081 0.9976624250 0.9967256784
+ 0.9970263839 0.9977126122 0.9968051910
+ 0.9970752001 0.9977626801 0.9968847036
+ 0.9971240759 0.9978129268 0.9969642162
+ 0.9971730113 0.9978631139 0.9970437884
+ 0.9972218871 0.9979133010 0.9971233010
+ 0.9972707033 0.9979634285 0.9972028136
+ 0.9973195791 0.9980136156 0.9972823262
+ 0.9973685145 0.9980638027 0.9973617792
+ 0.9974173903 0.9981139898 0.9974412918
+ 0.9974662066 0.9981641769 0.9975208044
+ 0.9975150824 0.9982143044 0.9976003170
+ 0.9975640178 0.9982644916 0.9976798296
+ 0.9976128936 0.9983146787 0.9977592826
+ 0.9976617098 0.9983649850 0.9978352189
+ 0.9977235794 0.9984163046 0.9979071021
+ 0.9977864027 0.9984676242 0.9979789257
+ 0.9978492260 0.9985188842 0.9980508089
+ 0.9979119897 0.9985702038 0.9981226921
+ 0.9979748130 0.9986215234 0.9981945157
+ 0.9980375767 0.9986727834 0.9982663989
+ 0.9981004000 0.9987241030 0.9983382821
+ 0.9981632233 0.9987754226 0.9984102249
+ 0.9982259870 0.9988266826 0.9984819889
+ 0.9982886910 0.9988780022 0.9985538721
+ 0.9983515143 0.9989293218 0.9986258149
+ 0.9984142780 0.9989805818 0.9986975789
+ 0.9984771013 0.9990319014 0.9987695217
+ 0.9985399246 0.9990832210 0.9988414049
+ 0.9986026883 0.9991344810 0.9989132881
+ 0.9986655116 0.9991858006 0.9989851117
+ 0.9987378716 0.9992346764 0.9990463257
+ 0.9988167882 0.9992824793 0.9991058707
+ 0.9988957047 0.9993302822 0.9991654754
+ 0.9989746213 0.9993782043 0.9992250800
+ 0.9990534782 0.9994260073 0.9992846847
+ 0.9991322756 0.9994738102 0.9993442893
+ 0.9992111921 0.9995216727 0.9994038939
+ 0.9992901087 0.9995694757 0.9994634986
+ 0.9993690252 0.9996172786 0.9995231032
+ 0.9994478226 0.9996652007 0.9995828271
+ 0.9995266795 0.9997130036 0.9996423721
+ 0.9996055961 0.9997608066 0.9997019768
+ 0.9996845126 0.9998087287 0.9997615814
+ 0.9997634292 0.9998564720 0.9998211861
+ 0.9998422265 0.9999042749 0.9998807907
+ 0.9999210835 0.9999521971 0.9999403954
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/kodak_ektachrome_64.spi1d b/release/datafiles/colormanagement/luts/film_response/kodak_ektachrome_64.spi1d
new file mode 100644
index 00000000000..31d4b94e115
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/kodak_ektachrome_64.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0003177276 0.0001941380 0.0001446141
+ 0.0006504654 0.0003951061 0.0002949580
+ 0.0010024470 0.0006061521 0.0004526987
+ 0.0013694729 0.0008284810 0.0006180415
+ 0.0017452050 0.0010607000 0.0007899137
+ 0.0021349210 0.0013002760 0.0009697909
+ 0.0025417069 0.0015479270 0.0011566620
+ 0.0029633259 0.0018080650 0.0013511210
+ 0.0033958510 0.0020795320 0.0015535100
+ 0.0038457969 0.0023645640 0.0017640300
+ 0.0043162489 0.0026637421 0.0019820260
+ 0.0048077060 0.0029760071 0.0022097649
+ 0.0053204661 0.0033004310 0.0024460619
+ 0.0058609000 0.0036376549 0.0026919940
+ 0.0064359619 0.0039854120 0.0029474010
+ 0.0070374971 0.0043447139 0.0032128871
+ 0.0076601300 0.0047178762 0.0034874950
+ 0.0083078844 0.0051065790 0.0037723500
+ 0.0089809727 0.0055108499 0.0040672510
+ 0.0096816579 0.0059318668 0.0043718130
+ 0.0104107000 0.0063705379 0.0046862401
+ 0.0111686802 0.0068254122 0.0050117052
+ 0.0119535998 0.0072979759 0.0053493860
+ 0.0127734104 0.0077873981 0.0056989561
+ 0.0136253396 0.0082948767 0.0060607451
+ 0.0145092504 0.0088192495 0.0064340578
+ 0.0154185202 0.0093626482 0.0068193851
+ 0.0163518004 0.0099276053 0.0072161448
+ 0.0173176397 0.0105159301 0.0076254872
+ 0.0183163304 0.0111296400 0.0080476142
+ 0.0193513595 0.0117682600 0.0084802704
+ 0.0204212200 0.0124294702 0.0089247832
+ 0.0215315297 0.0131156798 0.0093830954
+ 0.0226835497 0.0138275698 0.0098542161
+ 0.0238747206 0.0145641901 0.0103377597
+ 0.0251002200 0.0153265698 0.0108324597
+ 0.0263673309 0.0161136203 0.0113382703
+ 0.0276758503 0.0169268306 0.0118559897
+ 0.0290231593 0.0177657008 0.0123869004
+ 0.0304085892 0.0186326504 0.0129301697
+ 0.0318260118 0.0195293408 0.0134853199
+ 0.0332819484 0.0204478092 0.0140506905
+ 0.0347733498 0.0213932004 0.0146252401
+ 0.0363029502 0.0223640501 0.0152128004
+ 0.0378724001 0.0233600903 0.0158141498
+ 0.0394730903 0.0243795607 0.0164301693
+ 0.0411083102 0.0254261997 0.0170600507
+ 0.0427853093 0.0264967792 0.0177041702
+ 0.0444947183 0.0275935791 0.0183603093
+ 0.0462447405 0.0287111904 0.0190260392
+ 0.0480214991 0.0298579894 0.0197018404
+ 0.0498294383 0.0310345795 0.0203909706
+ 0.0516717583 0.0322387293 0.0210961197
+ 0.0535553694 0.0334732905 0.0218155701
+ 0.0554724000 0.0347375497 0.0225481000
+ 0.0574280284 0.0360305011 0.0232938007
+ 0.0594230108 0.0373505987 0.0240523200
+ 0.0614495687 0.0386989899 0.0248243101
+ 0.0635085627 0.0400783718 0.0256102104
+ 0.0656058565 0.0414873511 0.0264102798
+ 0.0677408203 0.0429296084 0.0272227693
+ 0.0699115321 0.0444077104 0.0280466098
+ 0.0721197501 0.0459156111 0.0288844202
+ 0.0743607506 0.0474466383 0.0297372099
+ 0.0766320974 0.0490012988 0.0306023601
+ 0.0789411888 0.0505829789 0.0314776190
+ 0.0812913403 0.0521959811 0.0323632210
+ 0.0836748034 0.0538401082 0.0332610384
+ 0.0860934034 0.0555139296 0.0341722593
+ 0.0885434672 0.0572180599 0.0350961611
+ 0.0910215825 0.0589511804 0.0360324383
+ 0.0935282633 0.0607071407 0.0369832404
+ 0.0960653424 0.0624810904 0.0379483290
+ 0.0986272693 0.0642725229 0.0389264598
+ 0.1012184024 0.0660862923 0.0399172194
+ 0.1038417965 0.0679221675 0.0409205295
+ 0.1064930037 0.0697782189 0.0419377983
+ 0.1091663986 0.0716602802 0.0429698490
+ 0.1118554026 0.0735708624 0.0440155715
+ 0.1145604029 0.0755072236 0.0450732484
+ 0.1172852963 0.0774691924 0.0461424887
+ 0.1200316027 0.0794569179 0.0472251885
+ 0.1228056028 0.0814680681 0.0483251885
+ 0.1256061941 0.0835034922 0.0494407713
+ 0.1284314990 0.0855652988 0.0505689494
+ 0.1312845945 0.0876543671 0.0517092496
+ 0.1341657043 0.0897689089 0.0528627299
+ 0.1370669007 0.0919097364 0.0540304407
+ 0.1399842948 0.0940792933 0.0552122705
+ 0.1429264992 0.0962784812 0.0564116687
+ 0.1458958983 0.0985052586 0.0576241314
+ 0.1488838047 0.1007623002 0.0588485189
+ 0.1518885940 0.1030460969 0.0600855909
+ 0.1549195051 0.1053560004 0.0613366812
+ 0.1579769999 0.1076906994 0.0626053810
+ 0.1610527933 0.1100478992 0.0638882369
+ 0.1641492993 0.1124247015 0.0651839301
+ 0.1672637016 0.1148206964 0.0664921403
+ 0.1703891009 0.1172372997 0.0678140298
+ 0.1735228002 0.1196703017 0.0691531822
+ 0.1766714007 0.1221214011 0.0705029890
+ 0.1798343062 0.1245933995 0.0718628988
+ 0.1830091029 0.1270965040 0.0732344314
+ 0.1861923933 0.1296184957 0.0746224895
+ 0.1893824935 0.1321596056 0.0760240182
+ 0.1925912052 0.1347205937 0.0774392113
+ 0.1958242953 0.1373080015 0.0788744465
+ 0.1990808994 0.1399126947 0.0803256184
+ 0.2023572028 0.1425279975 0.0817875490
+ 0.2056479007 0.1451531053 0.0832600370
+ 0.2089466006 0.1477964967 0.0847453102
+ 0.2122559994 0.1504597068 0.0862387866
+ 0.2155746967 0.1531386971 0.0877406523
+ 0.2189022005 0.1558340043 0.0892590731
+ 0.2222436965 0.1585476995 0.0907859504
+ 0.2255931050 0.1612742990 0.0923209935
+ 0.2289551944 0.1640138030 0.0938680470
+ 0.2323365957 0.1667792052 0.0954221934
+ 0.2357338965 0.1695535034 0.0969835818
+ 0.2391352057 0.1723369062 0.0985596627
+ 0.2425421029 0.1751406044 0.1001449004
+ 0.2459709942 0.1779552996 0.1017419994
+ 0.2494048029 0.1807786971 0.1033572033
+ 0.2528398931 0.1836172044 0.1049804986
+ 0.2562730014 0.1864625067 0.1066166982
+ 0.2597048879 0.1893129051 0.1082694978
+ 0.2631390095 0.1921741962 0.1099312007
+ 0.2665784955 0.1950452030 0.1116095036
+ 0.2700111866 0.1979237944 0.1132924035
+ 0.2734400928 0.2008170038 0.1149808988
+ 0.2768634856 0.2037173063 0.1166793033
+ 0.2802909017 0.2066275030 0.1183826998
+ 0.2837207019 0.2095531970 0.1201020032
+ 0.2871545851 0.2124857008 0.1218283027
+ 0.2905927896 0.2154320031 0.1235624999
+ 0.2940321863 0.2183827013 0.1253096014
+ 0.2974657118 0.2213367969 0.1270615011
+ 0.3008908927 0.2242961973 0.1288305074
+ 0.3043087125 0.2272599936 0.1306017935
+ 0.3077211082 0.2302363962 0.1323782951
+ 0.3111295104 0.2332222015 0.1341592073
+ 0.3145295084 0.2362163067 0.1359436959
+ 0.3179244995 0.2392161936 0.1377421021
+ 0.3213168085 0.2422180027 0.1395442933
+ 0.3247092962 0.2452265024 0.1413614005
+ 0.3281050920 0.2482353002 0.1431804001
+ 0.3315083981 0.2512444854 0.1450074017
+ 0.3348960876 0.2542502880 0.1468372047
+ 0.3382737041 0.2572538853 0.1486722976
+ 0.3416486979 0.2602624893 0.1505120993
+ 0.3450245857 0.2632722855 0.1523568034
+ 0.3484072983 0.2662931085 0.1542067975
+ 0.3517858982 0.2693150043 0.1560602039
+ 0.3551585078 0.2723414004 0.1579221934
+ 0.3585281074 0.2753702104 0.1597875059
+ 0.3618960977 0.2784039080 0.1616556942
+ 0.3652538955 0.2814370096 0.1635244936
+ 0.3686091900 0.2844694853 0.1653988063
+ 0.3719412088 0.2874999940 0.1672738940
+ 0.3752706051 0.2905291021 0.1691565067
+ 0.3785892129 0.2935574949 0.1710398048
+ 0.3819032013 0.2965855002 0.1729318947
+ 0.3852080107 0.2996020913 0.1748245955
+ 0.3885084093 0.3026154935 0.1767162979
+ 0.3918038011 0.3056125045 0.1786078960
+ 0.3950856030 0.3086062074 0.1804991066
+ 0.3983576894 0.3115797043 0.1823901981
+ 0.4016107023 0.3145501018 0.1842828989
+ 0.4048540890 0.3175120950 0.1861757934
+ 0.4080660939 0.3204728961 0.1880692989
+ 0.4112665951 0.3234159946 0.1899631023
+ 0.4144412875 0.3263562918 0.1918607950
+ 0.4176087081 0.3292810023 0.1937602013
+ 0.4207499921 0.3322027028 0.1956637949
+ 0.4238848984 0.3351123035 0.1975702047
+ 0.4270057082 0.3380188048 0.1994725019
+ 0.4301230907 0.3409165144 0.2013705969
+ 0.4332121015 0.3438107073 0.2032697052
+ 0.4362936020 0.3467020988 0.2051707059
+ 0.4393599927 0.3495917916 0.2070730031
+ 0.4424214065 0.3524695039 0.2089823037
+ 0.4454444051 0.3553349078 0.2108915001
+ 0.4484499991 0.3581919074 0.2128047943
+ 0.4514287114 0.3610335886 0.2147184014
+ 0.4543898106 0.3638724089 0.2166287005
+ 0.4573354125 0.3666979969 0.2185377926
+ 0.4602653980 0.3695237041 0.2204501927
+ 0.4631789029 0.3723416924 0.2223664969
+ 0.4660640955 0.3751595914 0.2242840976
+ 0.4689424038 0.3779619932 0.2262071967
+ 0.4717960060 0.3807600141 0.2281304002
+ 0.4746480882 0.3835526109 0.2300624996
+ 0.4774642885 0.3863407075 0.2319957018
+ 0.4802804887 0.3891260922 0.2339314967
+ 0.4830631018 0.3919047117 0.2358691990
+ 0.4858393073 0.3946832120 0.2378090024
+ 0.4886021912 0.3974429071 0.2397564054
+ 0.4913567901 0.4002025127 0.2417037040
+ 0.4941014051 0.4029656053 0.2436508983
+ 0.4968290031 0.4057300985 0.2455980927
+ 0.4995543063 0.4084877074 0.2475478053
+ 0.5022572875 0.4112327099 0.2495003939
+ 0.5049604177 0.4139777124 0.2514531016
+ 0.5076419115 0.4167033136 0.2534070015
+ 0.5103181005 0.4194287956 0.2553609014
+ 0.5129829049 0.4221394062 0.2573103011
+ 0.5156350732 0.4248403907 0.2592563927
+ 0.5182831287 0.4275377989 0.2612015903
+ 0.5209032893 0.4302201867 0.2631373107
+ 0.5235236287 0.4329026937 0.2650730908
+ 0.5261074901 0.4355578125 0.2670041025
+ 0.5286799073 0.4382039905 0.2689318061
+ 0.5312321782 0.4408400953 0.2708589137
+ 0.5337486863 0.4434512854 0.2727747858
+ 0.5362653136 0.4460625947 0.2746906877
+ 0.5387454033 0.4486452043 0.2766082883
+ 0.5412231088 0.4512208104 0.2785277963
+ 0.5436828136 0.4537886977 0.2804473042
+ 0.5461235046 0.4563367963 0.2823554873
+ 0.5485640168 0.4588850141 0.2842623889
+ 0.5509892702 0.4614095986 0.2861675918
+ 0.5534147024 0.4639258087 0.2880688012
+ 0.5558288097 0.4664359093 0.2899698913
+ 0.5582318902 0.4689145088 0.2918665111
+ 0.5606350899 0.4713929892 0.2937605083
+ 0.5629963875 0.4738500118 0.2956545055
+ 0.5653566718 0.4762899876 0.2975474000
+ 0.5677015781 0.4787299931 0.2994402945
+ 0.5700250864 0.4811362922 0.3013291955
+ 0.5723484755 0.4835399985 0.3032068908
+ 0.5746430159 0.4859381914 0.3050845861
+ 0.5769314766 0.4883219898 0.3069567978
+ 0.5792130232 0.4907056987 0.3088240921
+ 0.5814688802 0.4930708110 0.3106913865
+ 0.5837246776 0.4954228103 0.3125565946
+ 0.5859628916 0.4977746904 0.3144212067
+ 0.5881881118 0.5000953078 0.3162856996
+ 0.5904132128 0.5024111271 0.3181492090
+ 0.5926191807 0.5047224760 0.3200125992
+ 0.5948230028 0.5070027113 0.3218753934
+ 0.5970178246 0.5092828870 0.3237349093
+ 0.5991765857 0.5115441084 0.3255943954
+ 0.6013354063 0.5137696862 0.3274545968
+ 0.6034780741 0.5159952044 0.3293164074
+ 0.6056026816 0.5182105899 0.3311783075
+ 0.6077274084 0.5204172730 0.3330385983
+ 0.6098302007 0.5226240754 0.3348967135
+ 0.6119242907 0.5248165131 0.3367548883
+ 0.6140184999 0.5270028710 0.3386108875
+ 0.6160811782 0.5291892886 0.3404648006
+ 0.6181414723 0.5313519239 0.3423185945
+ 0.6201986074 0.5335099101 0.3441708982
+ 0.6222298145 0.5356678963 0.3460218906
+ 0.6242610812 0.5378025174 0.3478729129
+ 0.6262831092 0.5399355888 0.3497231901
+ 0.6282786727 0.5420684218 0.3515729904
+ 0.6302741766 0.5441771150 0.3534227014
+ 0.6322615147 0.5462856889 0.3552713096
+ 0.6342349052 0.5483934283 0.3571187854
+ 0.6362084150 0.5504837036 0.3589664102
+ 0.6381633878 0.5525740981 0.3608083129
+ 0.6400970817 0.5546634793 0.3626450896
+ 0.6420307159 0.5567383170 0.3644818962
+ 0.6439446807 0.5588130951 0.3663117886
+ 0.6458404064 0.5608872771 0.3681330979
+ 0.6477361917 0.5629431009 0.3699544966
+ 0.6496070027 0.5649988055 0.3717769086
+ 0.6514570713 0.5670546293 0.3736014068
+ 0.6533071995 0.5690968037 0.3754259944
+ 0.6551311016 0.5711386800 0.3772482872
+ 0.6569324732 0.5731804967 0.3790614903
+ 0.6587339044 0.5751888156 0.3808746040
+ 0.6605200768 0.5771927238 0.3826875985
+ 0.6622908711 0.5791965723 0.3844920993
+ 0.6640617251 0.5811750889 0.3862965107
+ 0.6658166051 0.5831453800 0.3881008923
+ 0.6675499082 0.5851157904 0.3898971975
+ 0.6692832112 0.5870721936 0.3916915953
+ 0.6710019112 0.5890191197 0.3934859037
+ 0.6726891994 0.5909659863 0.3952794969
+ 0.6743766069 0.5928977728 0.3970726132
+ 0.6760562062 0.5948076248 0.3988656104
+ 0.6776999831 0.5967172980 0.4006549120
+ 0.6793438196 0.5986235142 0.4024339914
+ 0.6809874177 0.6005135775 0.4042131007
+ 0.6826078892 0.6024037004 0.4059922099
+ 0.6842284203 0.6042937040 0.4077546000
+ 0.6858488917 0.6061664820 0.4095160961
+ 0.6874536872 0.6080377102 0.4112777114
+ 0.6890544891 0.6099088788 0.4130330980
+ 0.6906551719 0.6117550135 0.4147844911
+ 0.6922481060 0.6135854721 0.4165357947
+ 0.6938346028 0.6154159904 0.4182860851
+ 0.6954210997 0.6172372103 0.4200322032
+ 0.6969972849 0.6190348268 0.4217784107
+ 0.6985461712 0.6208323240 0.4235245883
+ 0.7000951767 0.6226298809 0.4252654016
+ 0.7016441226 0.6243864298 0.4270048141
+ 0.7031658292 0.6261391044 0.4287441969
+ 0.7046864033 0.6278917193 0.4304836094
+ 0.7062069774 0.6296277046 0.4322234094
+ 0.7077113986 0.6313474774 0.4339630902
+ 0.7092053294 0.6330673099 0.4357028008
+ 0.7106992006 0.6347842813 0.4374335110
+ 0.7121831179 0.6364610791 0.4391623139
+ 0.7136318088 0.6381378770 0.4408909976
+ 0.7150804996 0.6398146749 0.4426156878
+ 0.7165293097 0.6414784789 0.4443300068
+ 0.7179604173 0.6431329846 0.4460442066
+ 0.7193871140 0.6447873712 0.4477584064
+ 0.7208138108 0.6464402080 0.4494678080
+ 0.7222303152 0.6480689049 0.4511752129
+ 0.7236266732 0.6496976018 0.4528824985
+ 0.7250230908 0.6513261795 0.4545893967
+ 0.7264196277 0.6529368162 0.4562911987
+ 0.7277973294 0.6545298100 0.4579930007
+ 0.7291715741 0.6561228037 0.4596947134
+ 0.7305458188 0.6577157974 0.4613985121
+ 0.7319157720 0.6592859030 0.4631048143
+ 0.7332760096 0.6608538032 0.4648110867
+ 0.7346363068 0.6624217033 0.4665173888
+ 0.7359964848 0.6639863253 0.4682199955
+ 0.7373399734 0.6655421257 0.4699214101
+ 0.7386773825 0.6670979857 0.4716227055
+ 0.7400146723 0.6686539054 0.4733240902
+ 0.7413491011 0.6702005863 0.4750083089
+ 0.7426620722 0.6717411876 0.4766924977
+ 0.7439751029 0.6732819080 0.4783768058
+ 0.7452880740 0.6748226285 0.4800589979
+ 0.7465865016 0.6763488054 0.4817341864
+ 0.7478682995 0.6778733134 0.4834094048
+ 0.7491500974 0.6793978214 0.4850845933
+ 0.7504318953 0.6809164882 0.4867551029
+ 0.7516843081 0.6823992729 0.4884186983
+ 0.7529281974 0.6838821173 0.4900822937
+ 0.7541720867 0.6853649020 0.4917457998
+ 0.7554147243 0.6868361831 0.4934011996
+ 0.7566283941 0.6882851720 0.4950498044
+ 0.7578421831 0.6897342205 0.4966984093
+ 0.7590559721 0.6911832094 0.4983471036
+ 0.7602614760 0.6926218867 0.4999813139
+ 0.7614449263 0.6940507293 0.5016077161
+ 0.7626283765 0.6954795122 0.5032340884
+ 0.7638118267 0.6969082952 0.5048604012
+ 0.7649738789 0.6983196139 0.5064805746
+ 0.7661107183 0.6997205019 0.5080981851
+ 0.7672476172 0.7011213899 0.5097157955
+ 0.7683845162 0.7025222778 0.5113334060
+ 0.7695062757 0.7039136291 0.5129374266
+ 0.7706182003 0.7053009868 0.5145360827
+ 0.7717301250 0.7066884041 0.5161347985
+ 0.7728418708 0.7080758810 0.5177333951
+ 0.7739313245 0.7094560266 0.5193111897
+ 0.7750114799 0.7108336091 0.5208796263
+ 0.7760915756 0.7122113109 0.5224481225
+ 0.7771716714 0.7135888934 0.5240164995
+ 0.7782340050 0.7149400711 0.5255811214
+ 0.7792907953 0.7162821293 0.5271432996
+ 0.7803477049 0.7176241279 0.5287054777
+ 0.7814046144 0.7189661264 0.5302677155
+ 0.7824332118 0.7202813029 0.5318275094
+ 0.7834541202 0.7215846181 0.5333846807
+ 0.7844750285 0.7228879929 0.5349419713
+ 0.7854959965 0.7241913080 0.5364993215
+ 0.7865008712 0.7254747152 0.5380507708
+ 0.7875007987 0.7267451286 0.5395910144
+ 0.7885007858 0.7280154228 0.5411313176
+ 0.7895007730 0.7292857170 0.5426715016
+ 0.7904886007 0.7305502295 0.5442109704
+ 0.7914711237 0.7318078876 0.5457459092
+ 0.7924535871 0.7330656052 0.5472807288
+ 0.7934361100 0.7343233228 0.5488154888
+ 0.7943943143 0.7355695963 0.5503503084
+ 0.7953352928 0.7367874980 0.5518705845
+ 0.7962762713 0.7380053997 0.5533890128
+ 0.7972173095 0.7392233014 0.5549073815
+ 0.7981507182 0.7404392958 0.5564258099
+ 0.7990738750 0.7416235209 0.5579320788
+ 0.7999970913 0.7428076863 0.5594297051
+ 0.8009203076 0.7439919710 0.5609273911
+ 0.8018379807 0.7451761961 0.5624250174
+ 0.8027368188 0.7463406920 0.5639188886
+ 0.8036355972 0.7474998236 0.5654007196
+ 0.8045343757 0.7486588955 0.5668826103
+ 0.8054332137 0.7498180866 0.5683643818
+ 0.8063105941 0.7509673834 0.5698462725
+ 0.8071876168 0.7521057129 0.5713130832
+ 0.8080645800 0.7532439232 0.5727772713
+ 0.8089416027 0.7543821931 0.5742415190
+ 0.8098158240 0.7555181980 0.5757057071
+ 0.8106887937 0.7566338778 0.5771644711
+ 0.8115618229 0.7577496767 0.5786156058
+ 0.8124346733 0.7588654757 0.5800666213
+ 0.8132982850 0.7599812150 0.5815176964
+ 0.8141440153 0.7610852718 0.5829687715
+ 0.8149898052 0.7621840835 0.5843982100
+ 0.8158354759 0.7632827759 0.5858259201
+ 0.8166813254 0.7643815875 0.5872535706
+ 0.8174951077 0.7654762268 0.5886812210
+ 0.8183075190 0.7665566802 0.5901004076
+ 0.8191198707 0.7676370740 0.5915061831
+ 0.8199322820 0.7687175870 0.5929120183
+ 0.8207353950 0.7697979808 0.5943177938
+ 0.8215301037 0.7708619833 0.5957236290
+ 0.8223248124 0.7719196081 0.5971149802
+ 0.8231195211 0.7729771137 0.5985029936
+ 0.8239132166 0.7740346193 0.5998910069
+ 0.8246840835 0.7750877142 0.6012789011
+ 0.8254551291 0.7761170268 0.6026648283
+ 0.8262259960 0.7771462798 0.6040399075
+ 0.8269969821 0.7781755924 0.6054151058
+ 0.8277590871 0.7792049050 0.6067903042
+ 0.8285127878 0.7802203894 0.6081655025
+ 0.8292664289 0.7812247872 0.6095303893
+ 0.8300201297 0.7822293043 0.6108843088
+ 0.8307737112 0.7832337022 0.6122382283
+ 0.8315144181 0.7842381001 0.6135920882
+ 0.8322539926 0.7852112055 0.6149461269
+ 0.8329936862 0.7861806750 0.6162794232
+ 0.8337333202 0.7871502042 0.6176058054
+ 0.8344634175 0.7881196737 0.6189321876
+ 0.8351711035 0.7890831828 0.6202585101
+ 0.8358789086 0.7900207043 0.6215848923
+ 0.8365865946 0.7909581065 0.6228948832
+ 0.8372943997 0.7918956280 0.6242042184
+ 0.8379939198 0.7928329706 0.6255134940
+ 0.8386886120 0.7937645912 0.6268228292
+ 0.8393831849 0.7946882248 0.6281303167
+ 0.8400778174 0.7956116796 0.6294245124
+ 0.8407723904 0.7965353131 0.6307187080
+ 0.8414523005 0.7974588871 0.6320130229
+ 0.8421304226 0.7983703017 0.6333072186
+ 0.8428084850 0.7992740870 0.6345958710
+ 0.8434864879 0.8001778126 0.6358658075
+ 0.8441630006 0.8010815978 0.6371356845
+ 0.8448262811 0.8019853830 0.6384056211
+ 0.8454895020 0.8028789163 0.6396754980
+ 0.8461527824 0.8037689924 0.6409432292
+ 0.8468161225 0.8046591878 0.6422051191
+ 0.8474723101 0.8055493236 0.6434670091
+ 0.8481097817 0.8064395189 0.6447290182
+ 0.8487473130 0.8073065877 0.6459909081
+ 0.8493847847 0.8081693053 0.6472480297
+ 0.8500223160 0.8090320826 0.6484932899
+ 0.8506528139 0.8098948002 0.6497384906
+ 0.8512719870 0.8107575178 0.6509838104
+ 0.8518912196 0.8115878105 0.6522290111
+ 0.8525105119 0.8124132156 0.6534695029
+ 0.8531296849 0.8132386804 0.6546944976
+ 0.8537434936 0.8140640855 0.6559193730
+ 0.8543506861 0.8148896098 0.6571443081
+ 0.8549579978 0.8157023191 0.6583693027
+ 0.8555651903 0.8165128231 0.6595931053
+ 0.8561723828 0.8173233271 0.6608086228
+ 0.8567661047 0.8181337714 0.6620242000
+ 0.8573439121 0.8189442754 0.6632397771
+ 0.8579216003 0.8197408915 0.6644554138
+ 0.8584992886 0.8205333948 0.6656709909
+ 0.8590769768 0.8213258982 0.6668658853
+ 0.8596463799 0.8221184015 0.6680600047
+ 0.8602035046 0.8229109049 0.6692541838
+ 0.8607606888 0.8236929774 0.6704483032
+ 0.8613178134 0.8244690895 0.6716424227
+ 0.8618749976 0.8252452016 0.6728152037
+ 0.8624271750 0.8260213137 0.6739807129
+ 0.8629680276 0.8267974854 0.6751462221
+ 0.8635088801 0.8275653720 0.6763116717
+ 0.8640497923 0.8283231854 0.6774771810
+ 0.8645905852 0.8290811181 0.6786333919
+ 0.8651301265 0.8298389912 0.6797791719
+ 0.8656617999 0.8305969238 0.6809248924
+ 0.8661935925 0.8313513994 0.6820706725
+ 0.8667253256 0.8320925832 0.6832165122
+ 0.8672569990 0.8328338265 0.6843608022
+ 0.8677886724 0.8335750103 0.6854962111
+ 0.8683093786 0.8343161941 0.6866315007
+ 0.8688293099 0.8350573778 0.6877667904
+ 0.8693491817 0.8357766271 0.6889020801
+ 0.8698691130 0.8364936113 0.6900374889
+ 0.8703891039 0.8372104764 0.6911699772
+ 0.8708937764 0.8379275203 0.6923016906
+ 0.8713908792 0.8386443853 0.6934332848
+ 0.8718879819 0.8393507004 0.6945648789
+ 0.8723850846 0.8400480151 0.6956964731
+ 0.8728821874 0.8407453895 0.6968225241
+ 0.8733705282 0.8414428234 0.6979349852
+ 0.8738415837 0.8421400785 0.6990476251
+ 0.8743125796 0.8428345919 0.7001600862
+ 0.8747836947 0.8435099125 0.7012727261
+ 0.8752548099 0.8441851735 0.7023853064
+ 0.8757258058 0.8448604941 0.7034785748
+ 0.8761900067 0.8455356956 0.7045670152
+ 0.8766540289 0.8462110162 0.7056552768
+ 0.8771178722 0.8468806148 0.7067435980
+ 0.8775817752 0.8475472927 0.7078319192
+ 0.8780456781 0.8482139111 0.7089164257
+ 0.8785020113 0.8488805294 0.7099874020
+ 0.8789511919 0.8495470881 0.7110584974
+ 0.8794003725 0.8502116799 0.7121295929
+ 0.8798494935 0.8508617282 0.7132006288
+ 0.8802986741 0.8515115976 0.7142717242
+ 0.8807477951 0.8521615267 0.7153381109
+ 0.8811936975 0.8528113961 0.7164012194
+ 0.8816397190 0.8534613252 0.7174643278
+ 0.8820856214 0.8541015983 0.7185273767
+ 0.8825315237 0.8547332287 0.7195906043
+ 0.8829774261 0.8553647995 0.7206537127
+ 0.8834267855 0.8559963703 0.7216954231
+ 0.8838804960 0.8566280007 0.7227349877
+ 0.8843340874 0.8572596908 0.7237744927
+ 0.8847877979 0.8578745127 0.7248139977
+ 0.8852415085 0.8584867120 0.7258535028
+ 0.8856950998 0.8590989709 0.7268896103
+ 0.8861432076 0.8597112894 0.7279071808
+ 0.8865901828 0.8603236079 0.7289246917
+ 0.8870372176 0.8609315753 0.7299422026
+ 0.8874841928 0.8615155816 0.7309597731
+ 0.8879311085 0.8620995879 0.7319772840
+ 0.8883765936 0.8626837134 0.7329847217
+ 0.8888130188 0.8632677197 0.7339726090
+ 0.8892495036 0.8638517857 0.7349603772
+ 0.8896859288 0.8644294739 0.7359483242
+ 0.8901224136 0.8649967909 0.7369360924
+ 0.8905587792 0.8655641079 0.7379239798
+ 0.8909912109 0.8661314249 0.7389044762
+ 0.8914173841 0.8666986227 0.7398765087
+ 0.8918436170 0.8672658801 0.7408484817
+ 0.8922697902 0.8678284287 0.7418205738
+ 0.8926960230 0.8683868051 0.7427926064
+ 0.8931223154 0.8689451218 0.7437645793
+ 0.8935400248 0.8695034981 0.7447342873
+ 0.8939518929 0.8700618148 0.7457019091
+ 0.8943638206 0.8706201911 0.7466694713
+ 0.8947756886 0.8711758852 0.7476369739
+ 0.8951874971 0.8717300892 0.7486045957
+ 0.8955994248 0.8722842932 0.7495722175
+ 0.8960080743 0.8728384972 0.7505385876
+ 0.8964155912 0.8733927011 0.7515040040
+ 0.8968231082 0.8739469051 0.7524694800
+ 0.8972306252 0.8744983077 0.7534348965
+ 0.8976380229 0.8750482798 0.7544003129
+ 0.8980454803 0.8755983114 0.7553657293
+ 0.8984466195 0.8761482835 0.7563228011
+ 0.8988459110 0.8766983151 0.7572699785
+ 0.8992452025 0.8772484064 0.7582172155
+ 0.8996444941 0.8777912259 0.7591643929
+ 0.9000439048 0.8783296943 0.7601115108
+ 0.9004431963 0.8788682222 0.7610586882
+ 0.9008390903 0.8794066906 0.7620021105
+ 0.9012339711 0.8799452186 0.7629373074
+ 0.9016289711 0.8804838061 0.7638723850
+ 0.9020239711 0.8810167909 0.7648075819
+ 0.9024189711 0.8815448284 0.7657427788
+ 0.9028139114 0.8820728064 0.7666779757
+ 0.9032065868 0.8826007843 0.7676120996
+ 0.9035984278 0.8831288218 0.7685371041
+ 0.9039902091 0.8836567998 0.7694622278
+ 0.9043819904 0.8841773272 0.7703871727
+ 0.9047737718 0.8846845031 0.7713122964
+ 0.9051656127 0.8851916790 0.7722373009
+ 0.9055474997 0.8856989145 0.7731624246
+ 0.9059227109 0.8862062097 0.7740741968
+ 0.9062979221 0.8867133856 0.7749837041
+ 0.9066730738 0.8872200251 0.7758932710
+ 0.9070482850 0.8877230883 0.7768027782
+ 0.9074234962 0.8882262111 0.7777122855
+ 0.9077919126 0.8887292147 0.7786217928
+ 0.9081501961 0.8892322779 0.7795184851
+ 0.9085084796 0.8897352815 0.7804030776
+ 0.9088668227 0.8902384043 0.7812876105
+ 0.9092251062 0.8907387853 0.7821720839
+ 0.9095833898 0.8912386894 0.7830566168
+ 0.9099410176 0.8917385936 0.7839412093
+ 0.9102939963 0.8922384977 0.7848230004
+ 0.9106469750 0.8927385211 0.7856823802
+ 0.9110000134 0.8932384253 0.7865417004
+ 0.9113529921 0.8937345147 0.7874010801
+ 0.9117060900 0.8942261934 0.7882605195
+ 0.9120591283 0.8947178721 0.7891197801
+ 0.9124001861 0.8952096105 0.7899792194
+ 0.9127386212 0.8957012892 0.7908260822
+ 0.9130769968 0.8961930871 0.7916657925
+ 0.9134153724 0.8966842890 0.7925053835
+ 0.9137538075 0.8971561790 0.7933450937
+ 0.9140921831 0.8976281881 0.7941846848
+ 0.9144207835 0.8981001973 0.7950243950
+ 0.9147356153 0.8985722065 0.7958624959
+ 0.9150503874 0.8990442157 0.7966837883
+ 0.9153652191 0.8995161057 0.7975050807
+ 0.9156799912 0.8999810219 0.7983263731
+ 0.9159948230 0.9004393816 0.7991477847
+ 0.9163095951 0.9008978009 0.7999690771
+ 0.9166138768 0.9013561010 0.8007904291
+ 0.9169176221 0.9018145204 0.8015990257
+ 0.9172213078 0.9022728205 0.8023931980
+ 0.9175249934 0.9027311802 0.8031873107
+ 0.9178286791 0.9031661749 0.8039814830
+ 0.9181324244 0.9035997987 0.8047757149
+ 0.9184330106 0.9040333033 0.8055698872
+ 0.9187291861 0.9044669271 0.8063641191
+ 0.9190254211 0.9049004912 0.8071421981
+ 0.9193214774 0.9053339958 0.8079159856
+ 0.9196177125 0.9057644010 0.8086897135
+ 0.9199138284 0.9061868787 0.8094635010
+ 0.9202100039 0.9066092968 0.8102372289
+ 0.9205018878 0.9070317745 0.8110108972
+ 0.9207926989 0.9074543118 0.8117843866
+ 0.9210835099 0.9078767896 0.8125452995
+ 0.9213743210 0.9082993269 0.8133062124
+ 0.9216650724 0.9087104201 0.8140671253
+ 0.9219558835 0.9091129899 0.8148279786
+ 0.9222459793 0.9095156193 0.8155888915
+ 0.9225308895 0.9099181890 0.8163498044
+ 0.9228156805 0.9103208184 0.8171091080
+ 0.9231005907 0.9107235074 0.8178617954
+ 0.9233853817 0.9111260772 0.8186144233
+ 0.9236702919 0.9115067720 0.8193669915
+ 0.9239550829 0.9118813276 0.8201196790
+ 0.9242395163 0.9122558832 0.8208723068
+ 0.9245231748 0.9126303792 0.8216248751
+ 0.9248068929 0.9130049944 0.8223708868
+ 0.9250906110 0.9133794904 0.8230999112
+ 0.9253743291 0.9137541056 0.8238288164
+ 0.9256579280 0.9141280055 0.8245577812
+ 0.9259415865 0.9145019054 0.8252866864
+ 0.9262230992 0.9148758054 0.8260157108
+ 0.9265028238 0.9152497053 0.8267446160
+ 0.9267824888 0.9156236053 0.8274663091
+ 0.9270622134 0.9159975052 0.8281710148
+ 0.9273418784 0.9163714051 0.8288756013
+ 0.9276214838 0.9167358279 0.8295801878
+ 0.9279012084 0.9171000123 0.8302847743
+ 0.9281796813 0.9174641967 0.8309894204
+ 0.9284574986 0.9178283811 0.8316941261
+ 0.9287353158 0.9181925058 0.8323919773
+ 0.9290130734 0.9185566902 0.8330684900
+ 0.9292908907 0.9189208746 0.8337450027
+ 0.9295685887 0.9192627072 0.8344215155
+ 0.9298464060 0.9196035266 0.8350980878
+ 0.9301217794 0.9199442863 0.8357746005
+ 0.9303957820 0.9202849865 0.8364511132
+ 0.9306699038 0.9206258059 0.8371245265
+ 0.9309440255 0.9209665060 0.8377707005
+ 0.9312180877 0.9213073254 0.8384168744
+ 0.9314922094 0.9216343164 0.8390631080
+ 0.9317662716 0.9219589829 0.8397092819
+ 0.9320312738 0.9222837090 0.8403555155
+ 0.9322906733 0.9226084948 0.8410016894
+ 0.9325500727 0.9229332209 0.8416479230
+ 0.9328094721 0.9232580066 0.8422836065
+ 0.9330688119 0.9235826731 0.8429179788
+ 0.9333282113 0.9238941073 0.8435524106
+ 0.9335876107 0.9241997004 0.8441867828
+ 0.9338458180 0.9245051742 0.8448212147
+ 0.9341027141 0.9248107076 0.8454555869
+ 0.9343596101 0.9251161814 0.8460900187
+ 0.9346163869 0.9254217148 0.8467177749
+ 0.9348732829 0.9257271886 0.8473411202
+ 0.9351301789 0.9260296226 0.8479645252
+ 0.9353870749 0.9263281822 0.8485878706
+ 0.9356436729 0.9266266823 0.8492112160
+ 0.9358993769 0.9269253016 0.8498346210
+ 0.9361552000 0.9272238016 0.8504580259
+ 0.9364109039 0.9275224209 0.8510761857
+ 0.9366667271 0.9278209209 0.8516775966
+ 0.9369223714 0.9281198978 0.8522790074
+ 0.9371781945 0.9284216762 0.8528804183
+ 0.9374338984 0.9287235737 0.8534818292
+ 0.9376984239 0.9290254116 0.8540831804
+ 0.9379627705 0.9293273091 0.8546845913
+ 0.9382272959 0.9296290874 0.8552860022
+ 0.9384917021 0.9299309850 0.8558799028
+ 0.9387561083 0.9302328229 0.8564717770
+ 0.9390205741 0.9305325747 0.8570637703
+ 0.9392849803 0.9308316112 0.8576557040
+ 0.9395543933 0.9311305285 0.8582475781
+ 0.9398267269 0.9314295053 0.8588395119
+ 0.9400988817 0.9317284822 0.8594313860
+ 0.9403710961 0.9320273995 0.8600232005
+ 0.9406434298 0.9323263764 0.8606147766
+ 0.9409155846 0.9326242208 0.8612062931
+ 0.9411879182 0.9329177737 0.8617979288
+ 0.9414601922 0.9332113862 0.8623893857
+ 0.9417330027 0.9335049987 0.8629810214
+ 0.9420056939 0.9337986112 0.8635724783
+ 0.9422785044 0.9340922236 0.8641641140
+ 0.9425511956 0.9343857765 0.8647502065
+ 0.9428240061 0.9346793890 0.8653333783
+ 0.9430966973 0.9349703789 0.8659164906
+ 0.9433695078 0.9352599978 0.8664996028
+ 0.9436365962 0.9355496168 0.8670827150
+ 0.9439011216 0.9358391762 0.8676658273
+ 0.9441655278 0.9361287951 0.8682489991
+ 0.9444299936 0.9364184141 0.8688321114
+ 0.9446943998 0.9367079735 0.8694059253
+ 0.9449589252 0.9369975924 0.8699793220
+ 0.9452232718 0.9372946024 0.8705525994
+ 0.9454872012 0.9375914931 0.8711258769
+ 0.9457437992 0.9378883839 0.8716992736
+ 0.9460003972 0.9381853938 0.8722726107
+ 0.9462569952 0.9384822845 0.8728458881
+ 0.9465134740 0.9387792945 0.8734164834
+ 0.9467700720 0.9390761852 0.8739734888
+ 0.9470267296 0.9393727779 0.8745303750
+ 0.9472833276 0.9396685958 0.8750873804
+ 0.9475367069 0.9399644136 0.8756443858
+ 0.9477851987 0.9402601719 0.8762012720
+ 0.9480336905 0.9405561090 0.8767582774
+ 0.9482821822 0.9408519268 0.8773152828
+ 0.9485306740 0.9411476851 0.8778693080
+ 0.9487792253 0.9414435029 0.8784165978
+ 0.9490277171 0.9417338967 0.8789640069
+ 0.9492762089 0.9420179129 0.8795112967
+ 0.9495244026 0.9423019886 0.8800587058
+ 0.9497724175 0.9425861239 0.8806061149
+ 0.9500203729 0.9428701997 0.8811534047
+ 0.9502683878 0.9431542754 0.8817008138
+ 0.9505164027 0.9434382915 0.8822470903
+ 0.9507644176 0.9437224269 0.8827915788
+ 0.9510124922 0.9440007806 0.8833361864
+ 0.9512605071 0.9442747831 0.8838806748
+ 0.9515028000 0.9445487857 0.8844252229
+ 0.9517431855 0.9448227882 0.8849697113
+ 0.9519836903 0.9450967908 0.8855141997
+ 0.9522241950 0.9453707933 0.8860588074
+ 0.9524646997 0.9456447959 0.8865966797
+ 0.9527052045 0.9459187984 0.8871210217
+ 0.9529457092 0.9461904168 0.8876453042
+ 0.9531862140 0.9464601874 0.8881695867
+ 0.9534236193 0.9467300177 0.8886939883
+ 0.9536604285 0.9469999075 0.8892182708
+ 0.9538971782 0.9472696781 0.8897426128
+ 0.9541339278 0.9475396276 0.8902668953
+ 0.9543706775 0.9478093982 0.8907887936
+ 0.9546074867 0.9480792284 0.8913012743
+ 0.9548442960 0.9483507872 0.8918138146
+ 0.9550809860 0.9486241937 0.8923262954
+ 0.9553158283 0.9488974810 0.8928387761
+ 0.9555500746 0.9491708279 0.8933513761
+ 0.9557843804 0.9494441152 0.8938639164
+ 0.9560186863 0.9497175217 0.8943763971
+ 0.9562528729 0.9499908090 0.8948888779
+ 0.9564871788 0.9502640963 0.8953927159
+ 0.9567214847 0.9505357742 0.8958964944
+ 0.9569557905 0.9508042932 0.8964002132
+ 0.9571847916 0.9510728717 0.8969039917
+ 0.9574114084 0.9513413906 0.8974078298
+ 0.9576380253 0.9516100287 0.8979116082
+ 0.9578645825 0.9518784881 0.8984153271
+ 0.9580911994 0.9521470070 0.8989191055
+ 0.9583178759 0.9524155855 0.8994185925
+ 0.9585444927 0.9526826739 0.8999162912
+ 0.9587711096 0.9529364109 0.9004138708
+ 0.9589902163 0.9531900287 0.9009116292
+ 0.9592015147 0.9534437060 0.9014092088
+ 0.9594126940 0.9536973238 0.9019069076
+ 0.9596238732 0.9539508820 0.9024044871
+ 0.9598351121 0.9542046189 0.9029021859
+ 0.9600464106 0.9544581771 0.9033970833
+ 0.9602575898 0.9547119141 0.9038860798
+ 0.9604688287 0.9549633861 0.9043750167
+ 0.9606760144 0.9552143216 0.9048638940
+ 0.9608663917 0.9554650784 0.9053527713
+ 0.9610567093 0.9557158947 0.9058417082
+ 0.9612470865 0.9559667706 0.9063305855
+ 0.9614375234 0.9562175870 0.9068195224
+ 0.9616279006 0.9564685225 0.9073083997
+ 0.9618182778 0.9567192793 0.9077844024
+ 0.9620087147 0.9569705129 0.9082577825
+ 0.9621990919 0.9572222233 0.9087312222
+ 0.9623833895 0.9574738741 0.9092046022
+ 0.9625663757 0.9577257037 0.9096779823
+ 0.9627494216 0.9579774141 0.9101514220
+ 0.9629324079 0.9582291245 0.9106246829
+ 0.9631155133 0.9584808946 0.9110981226
+ 0.9632984996 0.9587326050 0.9115682244
+ 0.9634814858 0.9589843154 0.9120290875
+ 0.9636644721 0.9592264891 0.9124898911
+ 0.9638484120 0.9594662786 0.9129506946
+ 0.9640339017 0.9597061872 0.9134116173
+ 0.9642195106 0.9599459767 0.9138724208
+ 0.9644050002 0.9601858258 0.9143332243
+ 0.9645904899 0.9604256749 0.9147940278
+ 0.9647760987 0.9606655240 0.9152548909
+ 0.9649615884 0.9609053731 0.9157108068
+ 0.9651471972 0.9611442089 0.9161633849
+ 0.9653326869 0.9613788724 0.9166160226
+ 0.9655120969 0.9616137147 0.9170686007
+ 0.9656897783 0.9618483782 0.9175212979
+ 0.9658675194 0.9620831013 0.9179738760
+ 0.9660452008 0.9623178840 0.9184265137
+ 0.9662228227 0.9625526071 0.9188790917
+ 0.9664005041 0.9627872705 0.9193317294
+ 0.9665781856 0.9630219936 0.9197779894
+ 0.9667559266 0.9632468820 0.9202229977
+ 0.9669327736 0.9634612799 0.9206681252
+ 0.9671043158 0.9636756778 0.9211130738
+ 0.9672759175 0.9638900757 0.9215580821
+ 0.9674474001 0.9641044736 0.9220032096
+ 0.9676188827 0.9643189907 0.9224482179
+ 0.9677904844 0.9645333886 0.9228932858
+ 0.9679620266 0.9647477865 0.9233382940
+ 0.9681335092 0.9649621844 0.9237800241
+ 0.9683051109 0.9651690125 0.9242216945
+ 0.9684718251 0.9653723240 0.9246633053
+ 0.9686310291 0.9655755758 0.9251049757
+ 0.9687901139 0.9657788873 0.9255465865
+ 0.9689491987 0.9659821987 0.9259883165
+ 0.9691084027 0.9661855102 0.9264299273
+ 0.9692674875 0.9663888216 0.9268715978
+ 0.9694265723 0.9665920138 0.9273126125
+ 0.9695857763 0.9667953253 0.9277383089
+ 0.9697449207 0.9669919014 0.9281641245
+ 0.9699026942 0.9671866894 0.9285898209
+ 0.9700592756 0.9673815966 0.9290155172
+ 0.9702159166 0.9675763845 0.9294412136
+ 0.9703724980 0.9677711725 0.9298669100
+ 0.9705290794 0.9679660201 0.9302927256
+ 0.9706857204 0.9681608081 0.9307184219
+ 0.9708423018 0.9683555961 0.9311441183
+ 0.9709988832 0.9685503840 0.9315564036
+ 0.9711555243 0.9687359929 0.9319686294
+ 0.9713115096 0.9689192772 0.9323807955
+ 0.9714668989 0.9691025019 0.9327929020
+ 0.9716224074 0.9692857862 0.9332051277
+ 0.9717779160 0.9694690108 0.9336172938
+ 0.9719334245 0.9696522951 0.9340295196
+ 0.9720888138 0.9698355198 0.9344416857
+ 0.9722443223 0.9700188041 0.9348539114
+ 0.9723997712 0.9702020288 0.9352610111
+ 0.9725552797 0.9703844786 0.9356672168
+ 0.9727123976 0.9705666900 0.9360734224
+ 0.9728708863 0.9707489014 0.9364796281
+ 0.9730293751 0.9709311128 0.9368857741
+ 0.9731879234 0.9711133242 0.9372920990
+ 0.9733464122 0.9712954164 0.9376983047
+ 0.9735049009 0.9714776278 0.9381045103
+ 0.9736633897 0.9716597795 0.9385107160
+ 0.9738218784 0.9718419909 0.9389162064
+ 0.9739804268 0.9720212221 0.9393213987
+ 0.9741386175 0.9721977711 0.9397264719
+ 0.9742962122 0.9723743796 0.9401317239
+ 0.9744538069 0.9725509882 0.9405367970
+ 0.9746114016 0.9727275968 0.9409419894
+ 0.9747691154 0.9729040861 0.9413471222
+ 0.9749267101 0.9730806947 0.9417521954
+ 0.9750843048 0.9732573032 0.9421573877
+ 0.9752420187 0.9734339118 0.9425604939
+ 0.9753996134 0.9736099839 0.9429581165
+ 0.9755573869 0.9737846851 0.9433556795
+ 0.9757156968 0.9739593267 0.9437533021
+ 0.9758740067 0.9741340280 0.9441508055
+ 0.9760323763 0.9743086100 0.9445484281
+ 0.9761906862 0.9744831920 0.9449459910
+ 0.9763489962 0.9746578932 0.9453436136
+ 0.9765074253 0.9748324752 0.9457411766
+ 0.9766656756 0.9750071764 0.9461387992
+ 0.9768239856 0.9751818180 0.9465218186
+ 0.9769824147 0.9753580093 0.9469017982
+ 0.9771348834 0.9755343795 0.9472817183
+ 0.9772865176 0.9757108092 0.9476615787
+ 0.9774382114 0.9758871794 0.9480414987
+ 0.9775897861 0.9760636091 0.9484214187
+ 0.9777414203 0.9762399793 0.9488013983
+ 0.9778929949 0.9764164090 0.9491813183
+ 0.9780446887 0.9765927792 0.9495611787
+ 0.9781963229 0.9767692089 0.9499387145
+ 0.9783478975 0.9769436717 0.9503098726
+ 0.9785013795 0.9771149158 0.9506810904
+ 0.9786573052 0.9772862196 0.9510523081
+ 0.9788131118 0.9774574041 0.9514235258
+ 0.9789689779 0.9776285887 0.9517948031
+ 0.9791249037 0.9777997732 0.9521660209
+ 0.9792807102 0.9779710174 0.9525371790
+ 0.9794365764 0.9781423211 0.9529083967
+ 0.9795925021 0.9783135056 0.9532796144
+ 0.9797484279 0.9784846902 0.9536480904
+ 0.9799041748 0.9786469936 0.9540150762
+ 0.9800559878 0.9788064957 0.9543820024
+ 0.9802073240 0.9789659977 0.9547489882
+ 0.9803586006 0.9791253805 0.9551159143
+ 0.9805098772 0.9792848825 0.9554827809
+ 0.9806612730 0.9794443846 0.9558498263
+ 0.9808126092 0.9796038866 0.9562166929
+ 0.9809638858 0.9797633886 0.9565836787
+ 0.9811152220 0.9799227715 0.9569506049
+ 0.9812664986 0.9800817966 0.9573094845
+ 0.9814171195 0.9802325964 0.9576671720
+ 0.9815658927 0.9803833961 0.9580247998
+ 0.9817147255 0.9805341959 0.9583824873
+ 0.9818633795 0.9806848764 0.9587401748
+ 0.9820122123 0.9808356762 0.9590978026
+ 0.9821609259 0.9809864759 0.9594554901
+ 0.9823096991 0.9811372757 0.9598131776
+ 0.9824584126 0.9812880754 0.9601708055
+ 0.9826071858 0.9814388752 0.9605284929
+ 0.9827558994 0.9815893173 0.9608864188
+ 0.9829031229 0.9817385077 0.9612444043
+ 0.9830487967 0.9818876982 0.9616022706
+ 0.9831944108 0.9820368886 0.9619601965
+ 0.9833400846 0.9821860790 0.9623181820
+ 0.9834856987 0.9823353291 0.9626761079
+ 0.9836313725 0.9824845195 0.9630339742
+ 0.9837771058 0.9826337099 0.9633920193
+ 0.9839227200 0.9827829003 0.9637498856
+ 0.9840683937 0.9829320908 0.9641076922
+ 0.9842140079 0.9830825925 0.9644622207
+ 0.9843599200 0.9832354188 0.9648168087
+ 0.9845057726 0.9833881855 0.9651712775
+ 0.9846516848 0.9835410118 0.9655258060
+ 0.9847975969 0.9836937785 0.9658802748
+ 0.9849435091 0.9838467240 0.9662348032
+ 0.9850894213 0.9839994907 0.9665892720
+ 0.9852352738 0.9841523170 0.9669439197
+ 0.9853813052 0.9843050838 0.9672983885
+ 0.9855272174 0.9844579101 0.9676529169
+ 0.9856731296 0.9846124053 0.9679955244
+ 0.9858202934 0.9847701192 0.9683375955
+ 0.9859679937 0.9849278927 0.9686797857
+ 0.9861156940 0.9850856066 0.9690219164
+ 0.9862633944 0.9852433801 0.9693641067
+ 0.9864110947 0.9854010940 0.9697061777
+ 0.9865589142 0.9855589271 0.9700484276
+ 0.9867066145 0.9857165813 0.9703904986
+ 0.9868543148 0.9858744144 0.9707326889
+ 0.9870020151 0.9860321283 0.9710748196
+ 0.9871497154 0.9861894846 0.9714078903
+ 0.9872943163 0.9863452911 0.9717383981
+ 0.9874371886 0.9865010977 0.9720689058
+ 0.9875801206 0.9866569042 0.9723994136
+ 0.9877228737 0.9868127704 0.9727299213
+ 0.9878658056 0.9869685769 0.9730604291
+ 0.9880086780 0.9871243834 0.9733908772
+ 0.9881514907 0.9872803092 0.9737213850
+ 0.9882944226 0.9874361157 0.9740518928
+ 0.9884372950 0.9875919223 0.9743824005
+ 0.9885801077 0.9877477288 0.9747108221
+ 0.9887198210 0.9878988266 0.9750369191
+ 0.9888557196 0.9880496860 0.9753628969
+ 0.9889916182 0.9882006049 0.9756889939
+ 0.9891275167 0.9883515239 0.9760150909
+ 0.9892634749 0.9885023832 0.9763411880
+ 0.9893993735 0.9886533022 0.9766672254
+ 0.9895352721 0.9888042212 0.9769933224
+ 0.9896711707 0.9889550805 0.9773194194
+ 0.9898071885 0.9891059995 0.9776453972
+ 0.9899430871 0.9892569184 0.9779708982
+ 0.9900798202 0.9894033074 0.9782887101
+ 0.9902198911 0.9895470738 0.9786065817
+ 0.9903600216 0.9896908998 0.9789245129
+ 0.9905000925 0.9898347259 0.9792423248
+ 0.9906402826 0.9899784923 0.9795601964
+ 0.9907804132 0.9901223183 0.9798781276
+ 0.9909204841 0.9902660847 0.9801958799
+ 0.9910606146 0.9904099107 0.9805138111
+ 0.9912006855 0.9905536771 0.9808316827
+ 0.9913408756 0.9906975031 0.9811494946
+ 0.9914810061 0.9908416271 0.9814661145
+ 0.9916189909 0.9909868836 0.9817817807
+ 0.9917564988 0.9911323190 0.9820973873
+ 0.9918940067 0.9912775755 0.9824131131
+ 0.9920315146 0.9914230108 0.9827287197
+ 0.9921690226 0.9915683270 0.9830443263
+ 0.9923064709 0.9917137027 0.9833599925
+ 0.9924440980 0.9918590188 0.9836755991
+ 0.9925816059 0.9920043945 0.9839913249
+ 0.9927191138 0.9921497107 0.9843068719
+ 0.9928566217 0.9922950268 0.9846224785
+ 0.9929937124 0.9924386144 0.9849327803
+ 0.9931297898 0.9925811291 0.9852427244
+ 0.9932658076 0.9927235842 0.9855526090
+ 0.9934018850 0.9928659797 0.9858624935
+ 0.9935380220 0.9930084944 0.9861723781
+ 0.9936740994 0.9931508899 0.9864822030
+ 0.9938101768 0.9932934046 0.9867920876
+ 0.9939463139 0.9934358001 0.9871019721
+ 0.9940823913 0.9935783148 0.9874119163
+ 0.9942185283 0.9937207103 0.9877216816
+ 0.9943544865 0.9938632250 0.9880297184
+ 0.9944881201 0.9940040112 0.9883286953
+ 0.9946203232 0.9941446781 0.9886276722
+ 0.9947524071 0.9942854047 0.9889267087
+ 0.9948846102 0.9944260716 0.9892256856
+ 0.9950168133 0.9945669174 0.9895246029
+ 0.9951490164 0.9947075844 0.9898235798
+ 0.9952812195 0.9948483109 0.9901226163
+ 0.9954133034 0.9949889779 0.9904215932
+ 0.9955455065 0.9951297045 0.9907206297
+ 0.9956777096 0.9952703714 0.9910196066
+ 0.9958099127 0.9954108000 0.9913132787
+ 0.9959365129 0.9955487251 0.9915956259
+ 0.9960625768 0.9956865907 0.9918777943
+ 0.9961885810 0.9958245158 0.9921600223
+ 0.9963147044 0.9959623814 0.9924421906
+ 0.9964408278 0.9961003065 0.9927244186
+ 0.9965668917 0.9962381721 0.9930065870
+ 0.9966928959 0.9963760972 0.9932888150
+ 0.9968190193 0.9965140224 0.9935709834
+ 0.9969450831 0.9966518879 0.9938532114
+ 0.9970712066 0.9967898130 0.9941353798
+ 0.9971972108 0.9969279766 0.9944099784
+ 0.9973220825 0.9970669746 0.9946690202
+ 0.9974470139 0.9972059131 0.9949278831
+ 0.9975720048 0.9973449111 0.9951869249
+ 0.9976968765 0.9974839091 0.9954459071
+ 0.9978219271 0.9976229072 0.9957048297
+ 0.9979467988 0.9977619052 0.9959638119
+ 0.9980716705 0.9979009032 0.9962226748
+ 0.9981967211 0.9980399013 0.9964817166
+ 0.9983215928 0.9981788993 0.9967406988
+ 0.9984465241 0.9983178973 0.9969996214
+ 0.9985718727 0.9984570742 0.9972563982
+ 0.9987018108 0.9985973835 0.9975059032
+ 0.9988316298 0.9987375736 0.9977552891
+ 0.9989613891 0.9988778830 0.9980046749
+ 0.9990912080 0.9990180731 0.9982541203
+ 0.9992210865 0.9991583824 0.9985035062
+ 0.9993509054 0.9992986917 0.9987528920
+ 0.9994807243 0.9994388819 0.9990022779
+ 0.9996104836 0.9995791912 0.9992517829
+ 0.9997404218 0.9997195005 0.9995012283
+ 0.9998701811 0.9998596907 0.9997506142
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/kodak_ektachrome_64t.spi1d b/release/datafiles/colormanagement/luts/film_response/kodak_ektachrome_64t.spi1d
new file mode 100644
index 00000000000..e0066fa23fd
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/kodak_ektachrome_64t.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0007026231 0.0005291322 0.0003438386
+ 0.0014857050 0.0011212280 0.0007142003
+ 0.0023536440 0.0017713160 0.0011152170
+ 0.0033091281 0.0024790310 0.0015472880
+ 0.0043581589 0.0032436289 0.0020068779
+ 0.0055047469 0.0040647909 0.0024986709
+ 0.0067437058 0.0049467869 0.0030213159
+ 0.0080656186 0.0058862939 0.0035776510
+ 0.0094755674 0.0068916250 0.0041668881
+ 0.0109947799 0.0079634041 0.0047885012
+ 0.0125997197 0.0091056926 0.0054450892
+ 0.0142905395 0.0103072003 0.0061361468
+ 0.0160812791 0.0115757296 0.0068590711
+ 0.0179866701 0.0129182898 0.0076176482
+ 0.0199946500 0.0143368002 0.0084124254
+ 0.0220939498 0.0158436093 0.0092439801
+ 0.0242956392 0.0174334496 0.0101133203
+ 0.0266019199 0.0191023294 0.0110254698
+ 0.0290070400 0.0208547898 0.0119773299
+ 0.0315142386 0.0226893406 0.0129693104
+ 0.0341268592 0.0246077292 0.0140018696
+ 0.0368515886 0.0266096294 0.0150737204
+ 0.0396952704 0.0286963899 0.0161837209
+ 0.0426549911 0.0308631808 0.0173352305
+ 0.0457203016 0.0331055112 0.0185222793
+ 0.0488859490 0.0354270898 0.0197516698
+ 0.0521433800 0.0378220901 0.0210211892
+ 0.0554969683 0.0402937494 0.0223336108
+ 0.0589461401 0.0428398289 0.0236905906
+ 0.0624969490 0.0454611294 0.0250933897
+ 0.0661549270 0.0481612310 0.0265355706
+ 0.0699189603 0.0509477705 0.0280245394
+ 0.0737859830 0.0538181216 0.0295602791
+ 0.0777632222 0.0567707308 0.0311385598
+ 0.0818370879 0.0598130785 0.0327619798
+ 0.0860176310 0.0629488677 0.0344315693
+ 0.0903011784 0.0661693737 0.0361473896
+ 0.0946921036 0.0694710910 0.0379051082
+ 0.0991754308 0.0728540421 0.0397059508
+ 0.1037482023 0.0763145164 0.0415495113
+ 0.1084047034 0.0798475519 0.0434369706
+ 0.1131415963 0.0834460035 0.0453708693
+ 0.1179561019 0.0871294513 0.0473461710
+ 0.1228469983 0.0908933803 0.0493673384
+ 0.1278257072 0.0947273821 0.0514261499
+ 0.1328838021 0.0986372530 0.0535301305
+ 0.1380223036 0.1026311964 0.0556773506
+ 0.1432214975 0.1067062020 0.0578665212
+ 0.1484941989 0.1108566970 0.0601071604
+ 0.1538525969 0.1150842011 0.0623893999
+ 0.1592795998 0.1193784997 0.0647117496
+ 0.1647690982 0.1237355024 0.0670745894
+ 0.1703308970 0.1281584054 0.0694851503
+ 0.1759331971 0.1326268017 0.0719340369
+ 0.1815855950 0.1371477991 0.0744230300
+ 0.1872842014 0.1417109966 0.0769482180
+ 0.1930216998 0.1463264972 0.0795174912
+ 0.1988134980 0.1509988010 0.0821337178
+ 0.2046463042 0.1557403058 0.0847895518
+ 0.2105436027 0.1605253071 0.0874943137
+ 0.2164897025 0.1653804928 0.0902354270
+ 0.2224933952 0.1702827066 0.0930147171
+ 0.2285283953 0.1752299964 0.0958402529
+ 0.2345996946 0.1802355051 0.0987048224
+ 0.2407190949 0.1852916926 0.1016040966
+ 0.2468644977 0.1903931051 0.1045442000
+ 0.2530235052 0.1955378056 0.1075213999
+ 0.2591835856 0.2007202953 0.1105407029
+ 0.2653717995 0.2059361935 0.1135976985
+ 0.2715786099 0.2111911029 0.1166936010
+ 0.2777847946 0.2164549977 0.1198228002
+ 0.2839922011 0.2217417061 0.1229953989
+ 0.2902092040 0.2270426005 0.1262023002
+ 0.2964079082 0.2323473990 0.1294420958
+ 0.3025959134 0.2376510054 0.1327183992
+ 0.3087722957 0.2429573983 0.1360210031
+ 0.3149321079 0.2482704073 0.1393564939
+ 0.3210678101 0.2535850108 0.1427318007
+ 0.3272047043 0.2589012980 0.1461382955
+ 0.3333187997 0.2642197907 0.1495731026
+ 0.3394154012 0.2695527971 0.1530420035
+ 0.3454918861 0.2748903036 0.1565402001
+ 0.3515484929 0.2802191973 0.1600638032
+ 0.3576078117 0.2855531871 0.1636112034
+ 0.3636479080 0.2909021080 0.1671815962
+ 0.3696722090 0.2962611914 0.1707742065
+ 0.3756689131 0.3016174138 0.1743832976
+ 0.3816395998 0.3069770932 0.1780118048
+ 0.3875685036 0.3123393059 0.1816574037
+ 0.3934744000 0.3176954985 0.1853218973
+ 0.3993682861 0.3230510056 0.1890095025
+ 0.4052383006 0.3284165859 0.1927215010
+ 0.4110727012 0.3337813914 0.1964581013
+ 0.4168589115 0.3391354084 0.2002173960
+ 0.4226124883 0.3444840014 0.2039882988
+ 0.4283437133 0.3498201966 0.2077811956
+ 0.4340476990 0.3551411927 0.2115973979
+ 0.4397180080 0.3604322970 0.2154300958
+ 0.4453499019 0.3657175899 0.2192791998
+ 0.4509378076 0.3709863126 0.2231477052
+ 0.4564813077 0.3762353063 0.2270365059
+ 0.4619686007 0.3814581037 0.2309399992
+ 0.4674080908 0.3866479099 0.2348691970
+ 0.4728043079 0.3918175101 0.2388215065
+ 0.4781545103 0.3969655931 0.2427939028
+ 0.4834581017 0.4020648003 0.2467841059
+ 0.4887135029 0.4071336091 0.2507896125
+ 0.4939058125 0.4121663868 0.2548081875
+ 0.4990504086 0.4171527028 0.2588363886
+ 0.5041617155 0.4221054912 0.2628706992
+ 0.5092216134 0.4270165861 0.2669112086
+ 0.5142281055 0.4319120049 0.2709617913
+ 0.5191956758 0.4367876947 0.2750129104
+ 0.5241003036 0.4416337907 0.2790606022
+ 0.5289487243 0.4464288056 0.2831023932
+ 0.5337404013 0.4511983097 0.2871333063
+ 0.5384750962 0.4559360147 0.2911599874
+ 0.5431362987 0.4606370032 0.2951760888
+ 0.5477464795 0.4652822018 0.2991817892
+ 0.5523136854 0.4699006975 0.3031803966
+ 0.5568382740 0.4744859934 0.3071657121
+ 0.5613049269 0.4790317118 0.3111445010
+ 0.5657191277 0.4835188091 0.3151197135
+ 0.5700793862 0.4879747033 0.3190810978
+ 0.5743808150 0.4923951924 0.3230370879
+ 0.5786144733 0.4967536032 0.3269884884
+ 0.5828108191 0.5010759830 0.3309372962
+ 0.5869714022 0.5053607821 0.3348788023
+ 0.5910838246 0.5095916986 0.3388131857
+ 0.5951429009 0.5137745738 0.3427393138
+ 0.5991551280 0.5179340243 0.3466500044
+ 0.6030982733 0.5220689774 0.3505468071
+ 0.6069651246 0.5261592269 0.3544330001
+ 0.6107723713 0.5302231908 0.3583126962
+ 0.6144962907 0.5342565775 0.3621850014
+ 0.6181483865 0.5382382274 0.3660446107
+ 0.6217647195 0.5421987772 0.3698979020
+ 0.6253350973 0.5461328030 0.3737412989
+ 0.6288506985 0.5500105023 0.3775792122
+ 0.6323326230 0.5538635254 0.3814140856
+ 0.6357542872 0.5576797724 0.3852416873
+ 0.6391350031 0.5614629984 0.3890604079
+ 0.6424909234 0.5652248263 0.3928706050
+ 0.6457951069 0.5689184070 0.3966498971
+ 0.6490675807 0.5725790858 0.4004212022
+ 0.6523084044 0.5761985779 0.4041798115
+ 0.6554991007 0.5797787905 0.4079318047
+ 0.6586679220 0.5833429098 0.4116778970
+ 0.6617909074 0.5868695974 0.4154145122
+ 0.6648769975 0.5903773904 0.4191451073
+ 0.6679384708 0.5938647985 0.4228456020
+ 0.6709473133 0.5972957015 0.4265331924
+ 0.6739342213 0.6007062197 0.4302001894
+ 0.6768646836 0.6040558815 0.4338527918
+ 0.6797602177 0.6073855162 0.4374971986
+ 0.6826251745 0.6106783748 0.4411129951
+ 0.6854385138 0.6139551997 0.4447222054
+ 0.6882362962 0.6172215939 0.4483056068
+ 0.6909871101 0.6204239726 0.4518764913
+ 0.6937232018 0.6236106753 0.4554122090
+ 0.6964259148 0.6267350912 0.4589309096
+ 0.6990894079 0.6298514009 0.4624271989
+ 0.7017171979 0.6329439878 0.4658999145
+ 0.7042943835 0.6360031962 0.4693557024
+ 0.7068523169 0.6390181780 0.4727905095
+ 0.7093623877 0.6420083046 0.4762170017
+ 0.7118644714 0.6449810863 0.4796274900
+ 0.7143244743 0.6479082704 0.4830344915
+ 0.7167754769 0.6508182287 0.4864130020
+ 0.7191916108 0.6536681056 0.4897888005
+ 0.7215893865 0.6565065980 0.4931452870
+ 0.7239490151 0.6593149900 0.4965006113
+ 0.7262917757 0.6621205807 0.4998255074
+ 0.7286117077 0.6648774147 0.5031486154
+ 0.7308964729 0.6676303744 0.5064402819
+ 0.7331464291 0.6703311205 0.5097302794
+ 0.7353671193 0.6730266809 0.5129926205
+ 0.7375649214 0.6756759286 0.5162526965
+ 0.7397302985 0.6783176064 0.5194661021
+ 0.7418738008 0.6808996201 0.5226792097
+ 0.7439814806 0.6834768057 0.5258497000
+ 0.7460665703 0.6860129833 0.5290201902
+ 0.7481163740 0.6885464191 0.5321524143
+ 0.7501432896 0.6910448074 0.5352824926
+ 0.7521458268 0.6935424209 0.5383893847
+ 0.7541307211 0.6960023046 0.5414927006
+ 0.7560967207 0.6984623075 0.5445662737
+ 0.7580459714 0.7008609176 0.5476304889
+ 0.7599691153 0.7032560110 0.5506601930
+ 0.7618615031 0.7055974007 0.5536696911
+ 0.7637408972 0.7079290748 0.5566582084
+ 0.7655979991 0.7102227807 0.5596238971
+ 0.7674412727 0.7125021815 0.5625798106
+ 0.7692431808 0.7147536278 0.5655139089
+ 0.7710394859 0.7169851065 0.5684432983
+ 0.7727897167 0.7192016244 0.5713353753
+ 0.7745398879 0.7213971019 0.5742275119
+ 0.7762631774 0.7235780954 0.5770719051
+ 0.7779850960 0.7257089019 0.5799102783
+ 0.7796735764 0.7278391123 0.5827142000
+ 0.7813516259 0.7299191952 0.5854988098
+ 0.7830191255 0.7319993973 0.5882691145
+ 0.7846779227 0.7340465784 0.5910149813
+ 0.7863258123 0.7360842228 0.5937579870
+ 0.7879499197 0.7381075025 0.5964655280
+ 0.7895722985 0.7401170731 0.5991730094
+ 0.7911682725 0.7421147823 0.6018517017
+ 0.7927643061 0.7440714836 0.6045210958
+ 0.7943251133 0.7460281849 0.6071749926
+ 0.7958757281 0.7479510903 0.6098067760
+ 0.7974109054 0.7498708963 0.6124358773
+ 0.7989286184 0.7517752051 0.6150038242
+ 0.8004400134 0.7536681890 0.6175717711
+ 0.8019111753 0.7555513978 0.6200997233
+ 0.8033823967 0.7573989034 0.6226056814
+ 0.8048381209 0.7592465281 0.6251029968
+ 0.8062893748 0.7610545754 0.6275702119
+ 0.8077279925 0.7628545165 0.6300374269
+ 0.8091471791 0.7646414042 0.6324740052
+ 0.8105664849 0.7664098144 0.6349017024
+ 0.8119462729 0.7681781054 0.6373167038
+ 0.8133255243 0.7698963284 0.6397023201
+ 0.8146849871 0.7716131806 0.6420879960
+ 0.8160281777 0.7733101845 0.6444455981
+ 0.8173695207 0.7749879956 0.6467962861
+ 0.8186913133 0.7766653895 0.6491395235
+ 0.8200129867 0.7783104777 0.6514626145
+ 0.8213170171 0.7799556255 0.6537855864
+ 0.8226091266 0.7815762162 0.6560755968
+ 0.8238981962 0.7831717730 0.6583523750
+ 0.8251538873 0.7847673893 0.6606240273
+ 0.8264095783 0.7863461971 0.6628612876
+ 0.8276506066 0.7879241705 0.6650987267
+ 0.8288792968 0.7894842029 0.6673101187
+ 0.8301079869 0.7910140753 0.6694974899
+ 0.8313009739 0.7925441265 0.6716848016
+ 0.8324930072 0.7940390110 0.6738216877
+ 0.8336700201 0.7955235243 0.6759517193
+ 0.8348218799 0.7970044017 0.6780722141
+ 0.8359737992 0.7984637022 0.6801573038
+ 0.8371133804 0.7999228835 0.6822422743
+ 0.8382487893 0.8013638258 0.6843022108
+ 0.8393824100 0.8027846813 0.6863384247
+ 0.8404983878 0.8042055964 0.6883745193
+ 0.8416143060 0.8055989742 0.6903743148
+ 0.8427138925 0.8069851995 0.6923640966
+ 0.8437898159 0.8083692193 0.6943526864
+ 0.8448657990 0.8097262979 0.6963012815
+ 0.8459321260 0.8110834956 0.6982498765
+ 0.8469941020 0.8124284744 0.7001879215
+ 0.8480560780 0.8137484789 0.7020930052
+ 0.8491019011 0.8150684834 0.7039980888
+ 0.8501470089 0.8163607121 0.7058871984
+ 0.8511853814 0.8176304102 0.7077549100
+ 0.8521944284 0.8189001083 0.7096226215
+ 0.8532034159 0.8201503158 0.7114666104
+ 0.8542025089 0.8213939071 0.7132933736
+ 0.8551856279 0.8226374984 0.7151201963
+ 0.8561686873 0.8238468766 0.7169187069
+ 0.8571283221 0.8250527978 0.7187049985
+ 0.8580685258 0.8262571096 0.7204912901
+ 0.8590087295 0.8274198174 0.7222427130
+ 0.8599494100 0.8285825253 0.7239848971
+ 0.8608903289 0.8297395110 0.7257270217
+ 0.8618311882 0.8308607936 0.7274336815
+ 0.8627600074 0.8319821954 0.7291340828
+ 0.8636854887 0.8330979943 0.7308344841
+ 0.8646110892 0.8341925740 0.7325049043
+ 0.8655208945 0.8352872729 0.7341710925
+ 0.8664281964 0.8363729715 0.7358372808
+ 0.8673354983 0.8374316096 0.7374768853
+ 0.8682217002 0.8384901285 0.7391127944
+ 0.8691056967 0.8395386934 0.7407485843
+ 0.8699898124 0.8405579925 0.7423660159
+ 0.8708515763 0.8415772915 0.7439796925
+ 0.8717116117 0.8425924182 0.7455934882
+ 0.8725715280 0.8435931206 0.7471752763
+ 0.8734114170 0.8445938230 0.7487472296
+ 0.8742489219 0.8455908895 0.7503191829
+ 0.8750864267 0.8465701938 0.7518702149
+ 0.8759170175 0.8475493789 0.7534102798
+ 0.8767464161 0.8485258222 0.7549505234
+ 0.8775756955 0.8494656086 0.7564716935
+ 0.8783869743 0.8504052758 0.7579756975
+ 0.8791924715 0.8513450027 0.7594797015
+ 0.8799980283 0.8522825241 0.7609726191
+ 0.8807792068 0.8532198071 0.7624449730
+ 0.8815463185 0.8541572094 0.7639175057
+ 0.8823133707 0.8550791144 0.7653834224
+ 0.8830744028 0.8559969068 0.7668110132
+ 0.8838288188 0.8569146991 0.7682386041
+ 0.8845831156 0.8578169942 0.7696663141
+ 0.8853343725 0.8587086201 0.7710726857
+ 0.8860781193 0.8596001863 0.7724769711
+ 0.8868216872 0.8604816794 0.7738813162
+ 0.8875637054 0.8613451123 0.7752763033
+ 0.8882815242 0.8622086048 0.7766659856
+ 0.8889992833 0.8630689979 0.7780556083
+ 0.8897172213 0.8639014959 0.7794315815
+ 0.8904141784 0.8647338748 0.7807787061
+ 0.8911063075 0.8655663729 0.7821257710
+ 0.8917983770 0.8663951159 0.7834728956
+ 0.8924919963 0.8672229052 0.7847924829
+ 0.8931869864 0.8680506945 0.7861111760
+ 0.8938819766 0.8688691258 0.7874299884
+ 0.8945751190 0.8696764112 0.7887393832
+ 0.8952596188 0.8704836965 0.7900424004
+ 0.8959441185 0.8712878227 0.7913452983
+ 0.8966286182 0.8720598817 0.7926430702
+ 0.8972942233 0.8728318810 0.7939155102
+ 0.8979557157 0.8736039996 0.7951877713
+ 0.8986173272 0.8743599057 0.7964602113
+ 0.8992745876 0.8751083016 0.7977172136
+ 0.8999263048 0.8758566976 0.7989680767
+ 0.9005779028 0.8766024709 0.8002188802
+ 0.9012296200 0.8773398995 0.8014593720
+ 0.9018729925 0.8780772090 0.8026626706
+ 0.9025161862 0.8788145781 0.8038660288
+ 0.9031593800 0.8795428872 0.8050693274
+ 0.9037922025 0.8802682757 0.8062509894
+ 0.9044145942 0.8809937239 0.8074226975
+ 0.9050371051 0.8817160130 0.8085945249
+ 0.9056594968 0.8824285269 0.8097618222
+ 0.9062777162 0.8831409812 0.8108941913
+ 0.9068958759 0.8838534951 0.8120266199
+ 0.9075139761 0.8845480084 0.8131589890
+ 0.9081308842 0.8852338791 0.8142759204
+ 0.9087464213 0.8859198093 0.8153775930
+ 0.9093617797 0.8866025805 0.8164793253
+ 0.9099771976 0.8872501254 0.8175811172
+ 0.9105805159 0.8878976703 0.8186519146
+ 0.9111816287 0.8885452151 0.8197175860
+ 0.9117826819 0.8891865015 0.8207833171
+ 0.9123781919 0.8898199797 0.8218469024
+ 0.9129536748 0.8904533982 0.8229005933
+ 0.9135290980 0.8910868764 0.8239542246
+ 0.9141045809 0.8917121887 0.8250077963
+ 0.9146608114 0.8923351169 0.8260518909
+ 0.9152011871 0.8929579854 0.8270838261
+ 0.9157415032 0.8935797215 0.8281157017
+ 0.9162818789 0.8941801190 0.8291476965
+ 0.9168179035 0.8947805762 0.8301671743
+ 0.9173532128 0.8953809738 0.8311806917
+ 0.9178884029 0.8959742785 0.8321940899
+ 0.9184231758 0.8965504169 0.8332076073
+ 0.9189543128 0.8971264958 0.8341963291
+ 0.9194852710 0.8977025747 0.8351811171
+ 0.9200162888 0.8982679844 0.8361659050
+ 0.9205431938 0.8988227844 0.8371505141
+ 0.9210606217 0.8993775249 0.8381142020
+ 0.9215779901 0.8999322057 0.8390778899
+ 0.9220954180 0.9004656076 0.8400415778
+ 0.9226071239 0.9009882212 0.8410019279
+ 0.9231125712 0.9015107751 0.8419361115
+ 0.9236180782 0.9020333290 0.8428702950
+ 0.9241235256 0.9025334716 0.8438045979
+ 0.9246153235 0.9030274749 0.8447362781
+ 0.9250978231 0.9035214782 0.8456568718
+ 0.9255803227 0.9040154815 0.8465775847
+ 0.9260628223 0.9045063853 0.8474981785
+ 0.9265328050 0.9049968123 0.8484144211
+ 0.9269970059 0.9054871798 0.8493136764
+ 0.9274612069 0.9059776068 0.8502129912
+ 0.9279254079 0.9064562917 0.8511123061
+ 0.9283785820 0.9069336057 0.8520066738
+ 0.9288275838 0.9074109793 0.8528792262
+ 0.9292767048 0.9078882933 0.8537517190
+ 0.9297257066 0.9083464146 0.8546240926
+ 0.9301574826 0.9088020921 0.8554927111
+ 0.9305828214 0.9092578888 0.8563321233
+ 0.9310081005 0.9097136259 0.8571714759
+ 0.9314333797 0.9101629257 0.8580110073
+ 0.9318456054 0.9106109142 0.8588501811
+ 0.9322518110 0.9110590219 0.8596740961
+ 0.9326580763 0.9115070105 0.8604980111
+ 0.9330642819 0.9119517207 0.8613219261
+ 0.9334682822 0.9123954177 0.8621457815
+ 0.9338707924 0.9128389955 0.8629440069
+ 0.9342733026 0.9132825732 0.8637380004
+ 0.9346758127 0.9137256145 0.8645321131
+ 0.9350727201 0.9141682982 0.8653261065
+ 0.9354630113 0.9146109819 0.8661041856
+ 0.9358533025 0.9150536060 0.8668742180
+ 0.9362437129 0.9154921770 0.8676440716
+ 0.9366282821 0.9159253836 0.8684141040
+ 0.9369992018 0.9163584709 0.8691806197
+ 0.9373700023 0.9167916179 0.8699421883
+ 0.9377409220 0.9172230959 0.8707038164
+ 0.9381108284 0.9176480174 0.8714653850
+ 0.9384678006 0.9180728793 0.8722239733
+ 0.9388247728 0.9184976816 0.8729615808
+ 0.9391818047 0.9189226031 0.8736993074
+ 0.9395387769 0.9193425775 0.8744369149
+ 0.9398884177 0.9197623134 0.8751745820
+ 0.9402360916 0.9201819897 0.8758922219
+ 0.9405838847 0.9206016064 0.8766046166
+ 0.9409316182 0.9210132957 0.8773170114
+ 0.9412720203 0.9214196801 0.8780294061
+ 0.9416047931 0.9218261838 0.8787423968
+ 0.9419375062 0.9222326279 0.8794564009
+ 0.9422702193 0.9226341248 0.8801705241
+ 0.9426016808 0.9230197072 0.8808845282
+ 0.9429249763 0.9234051704 0.8815984726
+ 0.9432482719 0.9237906933 0.8823022246
+ 0.9435716271 0.9241762161 0.8830056190
+ 0.9438948035 0.9245483875 0.8837090731
+ 0.9442144036 0.9249175191 0.8844125271
+ 0.9445325136 0.9252867103 0.8851082921
+ 0.9448506236 0.9256557822 0.8857964277
+ 0.9451687932 0.9260243177 0.8864845037
+ 0.9454866052 0.9263916016 0.8871726990
+ 0.9458038807 0.9267588258 0.8878607750
+ 0.9461210966 0.9271261096 0.8885198236
+ 0.9464383721 0.9274932742 0.8891779184
+ 0.9467555881 0.9278637767 0.8898360729
+ 0.9470669031 0.9282348752 0.8904942274
+ 0.9473763108 0.9286059737 0.8911436796
+ 0.9476857185 0.9289770126 0.8917800188
+ 0.9479951262 0.9293472171 0.8924162984
+ 0.9483039975 0.9297147989 0.8930525780
+ 0.9486111999 0.9300825000 0.8936889172
+ 0.9489184022 0.9304502010 0.8942996860
+ 0.9492256045 0.9308179021 0.8949031234
+ 0.9495326877 0.9311780930 0.8955063820
+ 0.9498348832 0.9315345883 0.8961097002
+ 0.9501338005 0.9318912029 0.8967118263
+ 0.9504327774 0.9322476983 0.8973019719
+ 0.9507316947 0.9326038957 0.8978921175
+ 0.9510306716 0.9329422712 0.8984823227
+ 0.9513161778 0.9332805872 0.8990725279
+ 0.9516012073 0.9336189032 0.8996539712
+ 0.9518861771 0.9339572787 0.9002208710
+ 0.9521712065 0.9342914224 0.9007877707
+ 0.9524512291 0.9346157908 0.9013546109
+ 0.9527168274 0.9349402189 0.9019215107
+ 0.9529824257 0.9352647066 0.9024795890
+ 0.9532480240 0.9355890751 0.9030315876
+ 0.9535136223 0.9359090924 0.9035837054
+ 0.9537726045 0.9362252951 0.9041357040
+ 0.9540249705 0.9365414977 0.9046877027
+ 0.9542772770 0.9368577003 0.9052293897
+ 0.9545297027 0.9371739030 0.9057677984
+ 0.9547821283 0.9374797940 0.9063060880
+ 0.9550374746 0.9377818108 0.9068444967
+ 0.9552941918 0.9380838871 0.9073829055
+ 0.9555509090 0.9383859038 0.9079146981
+ 0.9558076262 0.9386879206 0.9084457159
+ 0.9560642838 0.9389883280 0.9089766145
+ 0.9563276768 0.9392884970 0.9095075727
+ 0.9565923810 0.9395886064 0.9100385904
+ 0.9568570852 0.9398887157 0.9105516076
+ 0.9571216702 0.9401888251 0.9110634923
+ 0.9573863745 0.9404814839 0.9115753770
+ 0.9576531053 0.9407737255 0.9120873809
+ 0.9579198956 0.9410659075 0.9125993252
+ 0.9581868052 0.9413580894 0.9130939245
+ 0.9584535956 0.9416502714 0.9135876894
+ 0.9587203860 0.9419289231 0.9140815139
+ 0.9589838982 0.9422072768 0.9145752788
+ 0.9592472911 0.9424856901 0.9150691032
+ 0.9595106244 0.9427641034 0.9155386090
+ 0.9597740173 0.9430423975 0.9160056710
+ 0.9600374103 0.9433137178 0.9164727926
+ 0.9602922201 0.9435846806 0.9169399142
+ 0.9605466127 0.9438555837 0.9174069762
+ 0.9608010054 0.9441264868 0.9178671837
+ 0.9610555172 0.9443975091 0.9183259010
+ 0.9613099098 0.9446647167 0.9187846184
+ 0.9615522027 0.9449313283 0.9192432165
+ 0.9617928863 0.9451979995 0.9197018743
+ 0.9620336294 0.9454646707 0.9201496840
+ 0.9622743130 0.9457312822 0.9205917716
+ 0.9625151157 0.9459909201 0.9210339785
+ 0.9627497196 0.9462481141 0.9214761853
+ 0.9629824162 0.9465051889 0.9219183922
+ 0.9632151127 0.9467623830 0.9223541021
+ 0.9634478092 0.9470195174 0.9227821827
+ 0.9636805058 0.9472687244 0.9232103229
+ 0.9639062881 0.9475113153 0.9236382842
+ 0.9641271234 0.9477539062 0.9240664244
+ 0.9643478990 0.9479964972 0.9244915843
+ 0.9645686746 0.9482392073 0.9249045253
+ 0.9647895098 0.9484791160 0.9253175259
+ 0.9650083780 0.9487127066 0.9257304072
+ 0.9652239084 0.9489462972 0.9261432886
+ 0.9654393196 0.9491798878 0.9265562296
+ 0.9656546712 0.9494134784 0.9269577861
+ 0.9658702016 0.9496471286 0.9273576736
+ 0.9660856128 0.9498767257 0.9277576208
+ 0.9663015008 0.9501063228 0.9281575084
+ 0.9665173888 0.9503358006 0.9285573959
+ 0.9667332768 0.9505653977 0.9289472103
+ 0.9669492245 0.9507949948 0.9293261766
+ 0.9671651125 0.9510244727 0.9297050834
+ 0.9673789144 0.9512541294 0.9300841093
+ 0.9675917029 0.9514836073 0.9304630756
+ 0.9678044915 0.9517130852 0.9308412075
+ 0.9680173993 0.9519426823 0.9312015176
+ 0.9682301879 0.9521713257 0.9315618277
+ 0.9684410095 0.9523969293 0.9319220185
+ 0.9686465859 0.9526224732 0.9322823286
+ 0.9688522816 0.9528480172 0.9326425791
+ 0.9690579176 0.9530736208 0.9330028892
+ 0.9692634940 0.9532991052 0.9333631992
+ 0.9694690704 0.9535260201 0.9337235093
+ 0.9696654081 0.9537532926 0.9340837002
+ 0.9698594809 0.9539806843 0.9344440103
+ 0.9700536728 0.9542080164 0.9348043203
+ 0.9702479243 0.9544352889 0.9351575971
+ 0.9704419971 0.9546620846 0.9355108738
+ 0.9706341028 0.9548869133 0.9358642101
+ 0.9708212018 0.9551116228 0.9362174273
+ 0.9710081816 0.9553362727 0.9365707040
+ 0.9711952806 0.9555611014 0.9369189143
+ 0.9713823795 0.9557858109 0.9372587800
+ 0.9715694189 0.9560061097 0.9375988245
+ 0.9717484713 0.9562234282 0.9379386902
+ 0.9719241261 0.9564408064 0.9382786155
+ 0.9720997214 0.9566581845 0.9386184812
+ 0.9722753167 0.9568755031 0.9389562011
+ 0.9724509120 0.9570928812 0.9392927885
+ 0.9726263285 0.9572992921 0.9396293759
+ 0.9727976918 0.9575052261 0.9399660826
+ 0.9729689956 0.9577109814 0.9403027296
+ 0.9731404185 0.9579169154 0.9406393766
+ 0.9733117223 0.9581226707 0.9409670830
+ 0.9734830856 0.9583271146 0.9412943721
+ 0.9736548066 0.9585263133 0.9416217208
+ 0.9738274217 0.9587255120 0.9419491291
+ 0.9739999175 0.9589247108 0.9422764182
+ 0.9741724133 0.9591240287 0.9426026940
+ 0.9743450284 0.9593232274 0.9429237247
+ 0.9745175242 0.9595177770 0.9432445765
+ 0.9746888876 0.9597066045 0.9435654879
+ 0.9748594165 0.9598953724 0.9438865185
+ 0.9750298858 0.9600841999 0.9442073703
+ 0.9752004147 0.9602730274 0.9445272088
+ 0.9753708839 0.9604617953 0.9448443055
+ 0.9755414724 0.9606478810 0.9451612830
+ 0.9757080078 0.9608321786 0.9454783201
+ 0.9758731723 0.9610164762 0.9457954168
+ 0.9760383964 0.9612007737 0.9461123943
+ 0.9762036204 0.9613850713 0.9464284778
+ 0.9763687849 0.9615694284 0.9467430115
+ 0.9765340090 0.9617481232 0.9470574856
+ 0.9766919017 0.9619243741 0.9473719001
+ 0.9768484235 0.9621006846 0.9476863742
+ 0.9770050049 0.9622771144 0.9480009079
+ 0.9771615267 0.9624534249 0.9483118057
+ 0.9773181081 0.9626296759 0.9486168027
+ 0.9774745703 0.9628033042 0.9489219189
+ 0.9776207805 0.9629759192 0.9492269158
+ 0.9777655005 0.9631485939 0.9495319128
+ 0.9779102802 0.9633212090 0.9498370290
+ 0.9780550003 0.9634938240 0.9501398802
+ 0.9781997800 0.9636663795 0.9504382014
+ 0.9783445001 0.9638398290 0.9507365227
+ 0.9784767032 0.9640133977 0.9510347843
+ 0.9786067009 0.9641870856 0.9513331056
+ 0.9787368178 0.9643607736 0.9516314268
+ 0.9788668752 0.9645345211 0.9519273043
+ 0.9789968729 0.9647082090 0.9522131085
+ 0.9791269898 0.9648808241 0.9524989128
+ 0.9792442918 0.9650526047 0.9527845979
+ 0.9793577790 0.9652245045 0.9530704021
+ 0.9794713259 0.9653962851 0.9533562064
+ 0.9795848131 0.9655681849 0.9536418915
+ 0.9796983004 0.9657400250 0.9539101720
+ 0.9798117280 0.9659097195 0.9541785121
+ 0.9799193740 0.9660761952 0.9544466734
+ 0.9800233841 0.9662427902 0.9547150135
+ 0.9801273942 0.9664093852 0.9549832940
+ 0.9802314043 0.9665759802 0.9552515745
+ 0.9803354144 0.9667425752 0.9555094838
+ 0.9804394245 0.9669076800 0.9557638168
+ 0.9805418849 0.9670665264 0.9560182095
+ 0.9806420207 0.9672253132 0.9562726021
+ 0.9807420969 0.9673839808 0.9565269947
+ 0.9808421731 0.9675428271 0.9567813873
+ 0.9809423089 0.9677016139 0.9570345283
+ 0.9810423851 0.9678602815 0.9572860003
+ 0.9811419249 0.9680219889 0.9575374126
+ 0.9812365174 0.9681841135 0.9577888250
+ 0.9813309908 0.9683461785 0.9580402970
+ 0.9814255834 0.9685081840 0.9582917094
+ 0.9815201163 0.9686703086 0.9585428834
+ 0.9816147089 0.9688323736 0.9587876201
+ 0.9817091823 0.9689944983 0.9590322971
+ 0.9817987084 0.9691566229 0.9592769146
+ 0.9818863273 0.9693186879 0.9595215917
+ 0.9819738865 0.9694808125 0.9597663283
+ 0.9820615053 0.9696428776 0.9600110054
+ 0.9821491241 0.9698050022 0.9602541924
+ 0.9822366834 0.9699668884 0.9604964256
+ 0.9823241830 0.9701260924 0.9607385993
+ 0.9824113846 0.9702852964 0.9609807730
+ 0.9824985862 0.9704445004 0.9612230062
+ 0.9825857878 0.9706035852 0.9614651203
+ 0.9826729298 0.9707627892 0.9617071152
+ 0.9827600718 0.9709219933 0.9619415998
+ 0.9828472733 0.9710779786 0.9621762037
+ 0.9829329252 0.9712315798 0.9624108076
+ 0.9830182195 0.9713851213 0.9626452923
+ 0.9831033945 0.9715387225 0.9628798962
+ 0.9831886888 0.9716922045 0.9631145000
+ 0.9832739234 0.9718458056 0.9633466005
+ 0.9833592176 0.9719992876 0.9635754228
+ 0.9834436178 0.9721450210 0.9638043046
+ 0.9835252166 0.9722905159 0.9640331864
+ 0.9836068749 0.9724360704 0.9642621279
+ 0.9836885929 0.9725816250 0.9644908905
+ 0.9837701917 0.9727271199 0.9647197723
+ 0.9838519096 0.9728726149 0.9649403095
+ 0.9839335084 0.9730172753 0.9651581049
+ 0.9840176105 0.9731602073 0.9653759003
+ 0.9841032028 0.9733030796 0.9655936956
+ 0.9841887951 0.9734460711 0.9658116102
+ 0.9842743874 0.9735890031 0.9660294056
+ 0.9843600988 0.9737318754 0.9662470818
+ 0.9844456911 0.9738749266 0.9664586186
+ 0.9845312834 0.9740148783 0.9666702151
+ 0.9846189022 0.9741529226 0.9668816924
+ 0.9847068191 0.9742910266 0.9670932293
+ 0.9847946167 0.9744290709 0.9673047066
+ 0.9848824739 0.9745671749 0.9675163031
+ 0.9849703908 0.9747052193 0.9677258134
+ 0.9850581884 0.9748433232 0.9679268003
+ 0.9851459861 0.9749873877 0.9681277871
+ 0.9852334261 0.9751328230 0.9683287740
+ 0.9853208065 0.9752783179 0.9685298204
+ 0.9854081869 0.9754236937 0.9687308073
+ 0.9854956269 0.9755691886 0.9689317942
+ 0.9855828881 0.9757146835 0.9691283703
+ 0.9856703281 0.9758601189 0.9693145752
+ 0.9857584238 0.9760093093 0.9695008993
+ 0.9858487844 0.9761587977 0.9696871042
+ 0.9859390855 0.9763082862 0.9698734283
+ 0.9860295057 0.9764577746 0.9700595737
+ 0.9861198068 0.9766073227 0.9702458978
+ 0.9862102270 0.9767568111 0.9704262018
+ 0.9863005280 0.9769061804 0.9705942273
+ 0.9863908887 0.9770559072 0.9707623124
+ 0.9864816070 0.9772055745 0.9709302783
+ 0.9865723252 0.9773551822 0.9710983038
+ 0.9866629839 0.9775049090 0.9712663889
+ 0.9867537022 0.9776545763 0.9714344144
+ 0.9868444204 0.9778043032 0.9715989828
+ 0.9869350195 0.9779539108 0.9717546105
+ 0.9870250821 0.9781007171 0.9719101787
+ 0.9871137738 0.9782474041 0.9720658064
+ 0.9872025251 0.9783940911 0.9722213745
+ 0.9872910976 0.9785407782 0.9723770022
+ 0.9873797894 0.9786874056 0.9725325704
+ 0.9874684811 0.9788340926 0.9726879001
+ 0.9875571132 0.9789807796 0.9728415012
+ 0.9876449704 0.9791290164 0.9729952216
+ 0.9877302051 0.9792773128 0.9731488824
+ 0.9878153205 0.9794257283 0.9733024836
+ 0.9879004955 0.9795740843 0.9734562039
+ 0.9879856110 0.9797223806 0.9736099243
+ 0.9880707860 0.9798707962 0.9737635255
+ 0.9881559014 0.9800190926 0.9739124179
+ 0.9882411957 0.9801667929 0.9740610719
+ 0.9883286953 0.9803141952 0.9742097855
+ 0.9884161949 0.9804617167 0.9743584991
+ 0.9885035753 0.9806091189 0.9745070934
+ 0.9885910749 0.9807565212 0.9746558070
+ 0.9886785746 0.9809039235 0.9748045206
+ 0.9887660146 0.9810513258 0.9749522209
+ 0.9888535142 0.9811971784 0.9750993252
+ 0.9889419079 0.9813411236 0.9752464890
+ 0.9890304208 0.9814851284 0.9753937125
+ 0.9891189933 0.9816290736 0.9755408764
+ 0.9892076254 0.9817730784 0.9756880999
+ 0.9892961979 0.9819170237 0.9758353233
+ 0.9893847108 0.9820610285 0.9759811163
+ 0.9894732833 0.9822043180 0.9761242867
+ 0.9895619154 0.9823424220 0.9762675166
+ 0.9896506071 0.9824805260 0.9764106870
+ 0.9897391796 0.9826186895 0.9765539169
+ 0.9898278117 0.9827567935 0.9766970873
+ 0.9899165034 0.9828948975 0.9768403172
+ 0.9900050759 0.9830330014 0.9769834280
+ 0.9900938272 0.9831712246 0.9771208167
+ 0.9901822805 0.9833034277 0.9772574902
+ 0.9902700186 0.9834333062 0.9773942232
+ 0.9903578162 0.9835631847 0.9775308967
+ 0.9904454947 0.9836931229 0.9776676297
+ 0.9905332923 0.9838230014 0.9778043032
+ 0.9906209707 0.9839528799 0.9779409766
+ 0.9907088280 0.9840828180 0.9780768752
+ 0.9907965064 0.9842103124 0.9782114029
+ 0.9908831120 0.9843295217 0.9783458114
+ 0.9909690022 0.9844487906 0.9784802794
+ 0.9910550117 0.9845681190 0.9786148071
+ 0.9911409020 0.9846873283 0.9787492752
+ 0.9912267923 0.9848065972 0.9788838029
+ 0.9913126826 0.9849258065 0.9790182114
+ 0.9913986921 0.9850450754 0.9791532755
+ 0.9914844036 0.9851558208 0.9792885184
+ 0.9915674925 0.9852620959 0.9794237018
+ 0.9916505814 0.9853683114 0.9795590043
+ 0.9917337894 0.9854745269 0.9796941876
+ 0.9918168783 0.9855806828 0.9798293710
+ 0.9919000864 0.9856870174 0.9799646139
+ 0.9919831753 0.9857931733 0.9800996780
+ 0.9920663834 0.9858993888 0.9802330732
+ 0.9921478033 0.9859907031 0.9803665876
+ 0.9922270775 0.9860820174 0.9805001020
+ 0.9923064709 0.9861732721 0.9806334972
+ 0.9923858047 0.9862647057 0.9807670116
+ 0.9924650788 0.9863560200 0.9809004068
+ 0.9925444126 0.9864472747 0.9810339212
+ 0.9926236868 0.9865385890 0.9811660051
+ 0.9927030802 0.9866275787 0.9812954068
+ 0.9927787781 0.9867103100 0.9814248085
+ 0.9928531051 0.9867929220 0.9815542102
+ 0.9929273725 0.9868754745 0.9816836119
+ 0.9930018187 0.9869580865 0.9818130732
+ 0.9930760860 0.9870408177 0.9819424748
+ 0.9931504130 0.9871234298 0.9820718765
+ 0.9932246804 0.9872059822 0.9821982980
+ 0.9932990074 0.9872871041 0.9823215008
+ 0.9933676124 0.9873663783 0.9824448228
+ 0.9934356213 0.9874455929 0.9825680852
+ 0.9935035706 0.9875249267 0.9826912880
+ 0.9935715795 0.9876040816 0.9828146100
+ 0.9936395884 0.9876832962 0.9829378724
+ 0.9937075973 0.9877625704 0.9830611944
+ 0.9937756062 0.9878417850 0.9831799269
+ 0.9938433766 0.9879186749 0.9832950234
+ 0.9939035773 0.9879934192 0.9834101796
+ 0.9939638972 0.9880682230 0.9835252762
+ 0.9940240979 0.9881430268 0.9836404920
+ 0.9940842986 0.9882177711 0.9837555885
+ 0.9941444993 0.9882925749 0.9838708043
+ 0.9942047000 0.9883673191 0.9839859009
+ 0.9942649007 0.9884421229 0.9840955734
+ 0.9943246841 0.9885138273 0.9842007160
+ 0.9943755865 0.9885829091 0.9843057990
+ 0.9944264293 0.9886521101 0.9844108224
+ 0.9944772720 0.9887213111 0.9845159054
+ 0.9945281148 0.9887903929 0.9846209884
+ 0.9945790172 0.9888595939 0.9847260714
+ 0.9946299195 0.9889286757 0.9848312140
+ 0.9946807027 0.9889978766 0.9849311113
+ 0.9947316051 0.9890637994 0.9850243926
+ 0.9947717190 0.9891260266 0.9851177931
+ 0.9948117137 0.9891883135 0.9852110744
+ 0.9948517084 0.9892506003 0.9853044748
+ 0.9948915839 0.9893128872 0.9853978157
+ 0.9949315786 0.9893751740 0.9854912162
+ 0.9949715734 0.9894374013 0.9855846167
+ 0.9950115085 0.9894996881 0.9856761098
+ 0.9950515032 0.9895594120 0.9857621193
+ 0.9950813055 0.9896134734 0.9858481288
+ 0.9951090217 0.9896675944 0.9859341979
+ 0.9951366782 0.9897217155 0.9860202074
+ 0.9951645136 0.9897757769 0.9861062169
+ 0.9951922297 0.9898298979 0.9861922860
+ 0.9952198863 0.9898840189 0.9862782955
+ 0.9952477217 0.9899380207 0.9863643050
+ 0.9952753782 0.9899916053 0.9864417911
+ 0.9952955842 0.9900360703 0.9865189195
+ 0.9953106046 0.9900807142 0.9865959883
+ 0.9953256845 0.9901251793 0.9866731763
+ 0.9953408241 0.9901698232 0.9867503047
+ 0.9953557849 0.9902142882 0.9868274927
+ 0.9953709245 0.9902588725 0.9869046211
+ 0.9953858852 0.9903033972 0.9869816899
+ 0.9954010248 0.9903479815 0.9870569706
+ 0.9954146743 0.9903848171 0.9871309996
+ 0.9954246283 0.9904186130 0.9872050285
+ 0.9954345822 0.9904522896 0.9872788787
+ 0.9954444766 0.9904860854 0.9873529077
+ 0.9954544902 0.9905198216 0.9874268770
+ 0.9954643846 0.9905534983 0.9875009060
+ 0.9954743981 0.9905872941 0.9875748754
+ 0.9954842925 0.9906209707 0.9876483083
+ 0.9954943061 0.9906514287 0.9877181053
+ 0.9954999089 0.9906733036 0.9877879024
+ 0.9955047965 0.9906951189 0.9878576994
+ 0.9955096245 0.9907169938 0.9879274964
+ 0.9955145121 0.9907388091 0.9879974127
+ 0.9955192804 0.9907606840 0.9880672097
+ 0.9955242276 0.9907824993 0.9881370068
+ 0.9955291152 0.9908043742 0.9882068038
+ 0.9955338836 0.9908261895 0.9882770777
+ 0.9955371022 0.9908388257 0.9883475900
+ 0.9955371022 0.9908484817 0.9884182215
+ 0.9955371022 0.9908581972 0.9884887934
+ 0.9955371022 0.9908677936 0.9885594249
+ 0.9955371022 0.9908775091 0.9886299968
+ 0.9955371022 0.9908872247 0.9887005091
+ 0.9955371022 0.9908968806 0.9887710810
+ 0.9955371022 0.9909064770 0.9888417125
+ 0.9955371022 0.9909154773 0.9889119267
+ 0.9955376983 0.9909201860 0.9889820218
+ 0.9955384135 0.9909248948 0.9890521765
+ 0.9955391884 0.9909297228 0.9891223907
+ 0.9955399036 0.9909343719 0.9891924858
+ 0.9955406189 0.9909390807 0.9892627001
+ 0.9955413938 0.9909437895 0.9893327951
+ 0.9955421090 0.9909486175 0.9894030094
+ 0.9955428839 0.9909533262 0.9894726872
+ 0.9955435991 0.9909560084 0.9895405769
+ 0.9955443740 0.9909560084 0.9896085262
+ 0.9955450892 0.9909560084 0.9896764159
+ 0.9955459237 0.9909560084 0.9897443056
+ 0.9955465794 0.9909560084 0.9898123145
+ 0.9955472946 0.9909560084 0.9898802042
+ 0.9955481291 0.9909560084 0.9899480939
+ 0.9955487847 0.9909560084 0.9900159836
+ 0.9955496192 0.9909560084 0.9900823832
+ 0.9955502748 0.9909573793 0.9901462197
+ 0.9955511093 0.9909597039 0.9902099967
+ 0.9955518246 0.9909620285 0.9902737141
+ 0.9955524802 0.9909642935 0.9903374910
+ 0.9955533147 0.9909666181 0.9904012084
+ 0.9955539703 0.9909688830 0.9904649854
+ 0.9955548048 0.9909712076 0.9905287027
+ 0.9955555201 0.9909734726 0.9905924797
+ 0.9955562949 0.9909757972 0.9906535745
+ 0.9955570102 0.9909781218 0.9907112718
+ 0.9955577850 0.9909803867 0.9907689095
+ 0.9955585003 0.9909827113 0.9908266068
+ 0.9955592155 0.9909849763 0.9908841848
+ 0.9955599904 0.9909873009 0.9909418821
+ 0.9955607057 0.9909896255 0.9909995198
+ 0.9955614805 0.9909918904 0.9910572171
+ 0.9955621958 0.9909942150 0.9911147952
+ 0.9955629706 0.9909964800 0.9911692739
+ 0.9955636859 0.9910038114 0.9912189841
+ 0.9955644011 0.9910129905 0.9912686944
+ 0.9955651760 0.9910221100 0.9913184047
+ 0.9955658913 0.9910312891 0.9913681149
+ 0.9955667257 0.9910405278 0.9914177060
+ 0.9955673814 0.9910495877 0.9914674163
+ 0.9955682158 0.9910588264 0.9915171266
+ 0.9955688715 0.9910680056 0.9915667772
+ 0.9955697060 0.9910771251 0.9916139841
+ 0.9955704212 0.9910891056 0.9916545749
+ 0.9955710769 0.9911026955 0.9916951060
+ 0.9955719113 0.9911162853 0.9917356968
+ 0.9955726266 0.9911298752 0.9917762280
+ 0.9955734015 0.9911434054 0.9918168187
+ 0.9955741167 0.9911569953 0.9918574095
+ 0.9955748916 0.9911705852 0.9918978810
+ 0.9955756068 0.9911841750 0.9919384718
+ 0.9955763221 0.9911978245 0.9919788837
+ 0.9955770969 0.9912132025 0.9920160770
+ 0.9955778122 0.9912310243 0.9920532703
+ 0.9955785871 0.9912489057 0.9920905232
+ 0.9955793023 0.9912667274 0.9921277165
+ 0.9955800772 0.9912844896 0.9921649098
+ 0.9955807924 0.9913023114 0.9922021031
+ 0.9955816269 0.9913200736 0.9922392964
+ 0.9955822825 0.9913378954 0.9922764897
+ 0.9955829978 0.9913557172 0.9923136830
+ 0.9955837727 0.9913741946 0.9923480153
+ 0.9955844879 0.9913958907 0.9923812747
+ 0.9955853224 0.9914177060 0.9924144745
+ 0.9955859780 0.9914395213 0.9924477935
+ 0.9955868125 0.9914612770 0.9924809933
+ 0.9955875278 0.9914830923 0.9925143123
+ 0.9955881834 0.9915049076 0.9925475121
+ 0.9955890179 0.9915266037 0.9925807118
+ 0.9955896735 0.9915484190 0.9926139712
+ 0.9955905080 0.9915701747 0.9926487803
+ 0.9955912232 0.9915946722 0.9926875234
+ 0.9955919981 0.9916201234 0.9927260876
+ 0.9955927134 0.9916453958 0.9927647710
+ 0.9955934882 0.9916707873 0.9928033948
+ 0.9955942035 0.9916961193 0.9928420782
+ 0.9955949187 0.9917215109 0.9928807020
+ 0.9955956936 0.9917467833 0.9929193854
+ 0.9955964088 0.9917721748 0.9929580092
+ 0.9955971837 0.9917975068 0.9929966927
+ 0.9955980182 0.9918254018 0.9930391908
+ 0.9956101775 0.9918603897 0.9930828214
+ 0.9956223965 0.9918953180 0.9931263924
+ 0.9956346154 0.9919303060 0.9931700826
+ 0.9956468940 0.9919652939 0.9932137132
+ 0.9956591129 0.9920002222 0.9932574034
+ 0.9956712723 0.9920352101 0.9933009744
+ 0.9956834912 0.9920700788 0.9933447242
+ 0.9956957102 0.9921051264 0.9933882952
+ 0.9957079291 0.9921399951 0.9934325218
+ 0.9957221746 0.9921805263 0.9934805036
+ 0.9957391024 0.9922237992 0.9935284853
+ 0.9957559705 0.9922670722 0.9935765266
+ 0.9957728982 0.9923102856 0.9936243892
+ 0.9957898259 0.9923536181 0.9936723709
+ 0.9958066940 0.9923968911 0.9937204123
+ 0.9958236814 0.9924401045 0.9937682748
+ 0.9958406091 0.9924833775 0.9938163161
+ 0.9958574772 0.9925267100 0.9938642979
+ 0.9958744049 0.9925699234 0.9939137101
+ 0.9958940744 0.9926193953 0.9939653277
+ 0.9959146976 0.9926689863 0.9940168262
+ 0.9959353805 0.9927186966 0.9940683842
+ 0.9959560037 0.9927682877 0.9941200018
+ 0.9959766865 0.9928179979 0.9941715002
+ 0.9959973097 0.9928675890 0.9942231178
+ 0.9960179925 0.9929172993 0.9942746162
+ 0.9960386157 0.9929668903 0.9943261743
+ 0.9960592985 0.9930166006 0.9943777919
+ 0.9960799217 0.9930669069 0.9944308996
+ 0.9961034060 0.9931212068 0.9944851995
+ 0.9961270094 0.9931753874 0.9945394993
+ 0.9961506128 0.9932296276 0.9945937991
+ 0.9961740971 0.9932839274 0.9946479797
+ 0.9961977005 0.9933381081 0.9947022796
+ 0.9962213039 0.9933922887 0.9947565794
+ 0.9962449074 0.9934465885 0.9948108792
+ 0.9962685108 0.9935008287 0.9948651791
+ 0.9962921143 0.9935550094 0.9949194789
+ 0.9963157773 0.9936100245 0.9949749112
+ 0.9963418245 0.9936673045 0.9950308800
+ 0.9963676929 0.9937245846 0.9950869083
+ 0.9963936210 0.9937819242 0.9951428771
+ 0.9964196086 0.9938392043 0.9951989055
+ 0.9964454770 0.9938964844 0.9952549934
+ 0.9964715242 0.9939538240 0.9953110218
+ 0.9964973927 0.9940111041 0.9953669906
+ 0.9965233207 0.9940683842 0.9954230189
+ 0.9965493083 0.9941257238 0.9954789877
+ 0.9965752959 0.9941834211 0.9955353737
+ 0.9966030717 0.9942424893 0.9955919981
+ 0.9966309071 0.9943016768 0.9956486225
+ 0.9966586828 0.9943608046 0.9957051873
+ 0.9966865182 0.9944199920 0.9957618713
+ 0.9967144132 0.9944791794 0.9958184958
+ 0.9967421889 0.9945383072 0.9958751202
+ 0.9967700243 0.9945974946 0.9959316850
+ 0.9967978001 0.9946566224 0.9959883094
+ 0.9968255758 0.9947158098 0.9960448742
+ 0.9968534112 0.9947745800 0.9961013198
+ 0.9968826771 0.9948306084 0.9961574078
+ 0.9969120026 0.9948865175 0.9962133765
+ 0.9969413280 0.9949424267 0.9962695241
+ 0.9969705939 0.9949982762 0.9963254929
+ 0.9969999194 0.9950541854 0.9963815212
+ 0.9970293045 0.9951100945 0.9964376092
+ 0.9970585704 0.9951661229 0.9964935780
+ 0.9970878959 0.9952219725 0.9965497255
+ 0.9971172214 0.9952778816 0.9966056943
+ 0.9971464872 0.9953337908 0.9966616035
+ 0.9971768856 0.9953922033 0.9967159033
+ 0.9972077012 0.9954509735 0.9967702031
+ 0.9972383976 0.9955098033 0.9968245029
+ 0.9972692132 0.9955686927 0.9968789220
+ 0.9973000288 0.9956275225 0.9969332218
+ 0.9973307848 0.9956862926 0.9969875216
+ 0.9973614812 0.9957451224 0.9970418811
+ 0.9973922968 0.9958038926 0.9970961809
+ 0.9974231124 0.9958627224 0.9971504807
+ 0.9974539280 0.9959216118 0.9972047806
+ 0.9974855185 0.9959818721 0.9972571731
+ 0.9975185990 0.9960436821 0.9973087907
+ 0.9975516796 0.9961054921 0.9973604083
+ 0.9975848198 0.9961673021 0.9974119067
+ 0.9976179004 0.9962291121 0.9974635243
+ 0.9976509809 0.9962909222 0.9975150824
+ 0.9976841211 0.9963526726 0.9975667000
+ 0.9977172017 0.9964144826 0.9976183176
+ 0.9977502823 0.9964762926 0.9976698756
+ 0.9977834225 0.9965381026 0.9977214932
+ 0.9978165030 0.9965999722 0.9977722764
+ 0.9978520870 0.9966641068 0.9978203177
+ 0.9978877902 0.9967283010 0.9978682995
+ 0.9979234934 0.9967923760 0.9979162812
+ 0.9979591966 0.9968565702 0.9979643226
+ 0.9979950190 0.9969207048 0.9980123043
+ 0.9980307221 0.9969848990 0.9980602860
+ 0.9980664253 0.9970489740 0.9981083274
+ 0.9981021881 0.9971132278 0.9981563091
+ 0.9981378913 0.9971773028 0.9982042909
+ 0.9981735945 0.9972414970 0.9982522726
+ 0.9982103705 0.9973062277 0.9982975721
+ 0.9982488155 0.9973716736 0.9983413815
+ 0.9982872009 0.9974371791 0.9983850718
+ 0.9983255863 0.9975026846 0.9984288812
+ 0.9983639717 0.9975680709 0.9984725714
+ 0.9984024167 0.9976335764 0.9985163808
+ 0.9984408021 0.9976990819 0.9985600710
+ 0.9984791875 0.9977645874 0.9986038804
+ 0.9985176921 0.9978300929 0.9986475706
+ 0.9985560775 0.9978954792 0.9986913800
+ 0.9985945225 0.9979609847 0.9987350702
+ 0.9986345768 0.9980263114 0.9987767935
+ 0.9986755252 0.9980915785 0.9988182187
+ 0.9987164140 0.9981567860 0.9988597035
+ 0.9987573028 0.9982221127 0.9989011288
+ 0.9987981915 0.9982873797 0.9989426136
+ 0.9988390803 0.9983525872 0.9989839792
+ 0.9988800287 0.9984179139 0.9990255237
+ 0.9989209175 0.9984831214 0.9990668893
+ 0.9989618063 0.9985483885 0.9991083741
+ 0.9990026951 0.9986137152 0.9991497993
+ 0.9990435839 0.9986789227 0.9991911054
+ 0.9990863204 0.9987418056 0.9992294908
+ 0.9991291761 0.9988046288 0.9992678165
+ 0.9991720915 0.9988675117 0.9993060827
+ 0.9992150068 0.9989302754 0.9993445277
+ 0.9992579222 0.9989930987 0.9993827939
+ 0.9993007779 0.9990559220 0.9994211793
+ 0.9993436933 0.9991186857 0.9994595051
+ 0.9993866086 0.9991815090 0.9994978905
+ 0.9994295239 0.9992442727 0.9995362163
+ 0.9994723797 0.9993070960 0.9995746017
+ 0.9995154142 0.9993696809 0.9996126294
+ 0.9995594025 0.9994270205 0.9996479154
+ 0.9996035099 0.9994843006 0.9996830821
+ 0.9996474981 0.9995415807 0.9997183084
+ 0.9996916056 0.9995989203 0.9997534752
+ 0.9997357130 0.9996562004 0.9997887015
+ 0.9997797012 0.9997134805 0.9998239279
+ 0.9998238087 0.9997708201 0.9998590946
+ 0.9998677969 0.9998281002 0.9998943806
+ 0.9999119043 0.9998853803 0.9999296069
+ 0.9999558926 0.9999427199 0.9999647737
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/kodak_ektachrome_e100s.spi1d b/release/datafiles/colormanagement/luts/film_response/kodak_ektachrome_e100s.spi1d
new file mode 100644
index 00000000000..cad63e66e7c
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/kodak_ektachrome_e100s.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0003622885 0.0002231146 0.0002231146
+ 0.0007382494 0.0004596260 0.0004596260
+ 0.0011324980 0.0007107497 0.0007107497
+ 0.0015447290 0.0009748340 0.0009748340
+ 0.0019822840 0.0012541140 0.0012541140
+ 0.0024496829 0.0015510730 0.0015510730
+ 0.0029426741 0.0018673710 0.0018673710
+ 0.0034610520 0.0022024000 0.0022024000
+ 0.0040061148 0.0025572821 0.0025572821
+ 0.0045792251 0.0029304300 0.0029304300
+ 0.0051838872 0.0033235741 0.0033235741
+ 0.0058237561 0.0037373570 0.0037373570
+ 0.0064960350 0.0041693011 0.0041693011
+ 0.0072039221 0.0046230098 0.0046230098
+ 0.0079505397 0.0050979760 0.0050979760
+ 0.0087367687 0.0055915830 0.0055915830
+ 0.0095584840 0.0061070491 0.0061070491
+ 0.0104124900 0.0066442229 0.0066442229
+ 0.0112989703 0.0071999640 0.0071999640
+ 0.0122200102 0.0077770371 0.0077770371
+ 0.0131755099 0.0083772372 0.0083772372
+ 0.0141713005 0.0089993617 0.0089993617
+ 0.0152068604 0.0096444618 0.0096444618
+ 0.0162801705 0.0103151305 0.0103151305
+ 0.0173835605 0.0110131698 0.0110131698
+ 0.0185210407 0.0117386896 0.0117386896
+ 0.0196854398 0.0124893300 0.0124893300
+ 0.0208813995 0.0132624302 0.0132624302
+ 0.0221185796 0.0140622798 0.0140622798
+ 0.0234044399 0.0148894899 0.0148894899
+ 0.0247398503 0.0157391094 0.0157391094
+ 0.0261158608 0.0166204907 0.0166204907
+ 0.0275394097 0.0175324902 0.0175324902
+ 0.0290060304 0.0184764005 0.0184764005
+ 0.0305129606 0.0194491595 0.0194491595
+ 0.0320634693 0.0204504505 0.0204504505
+ 0.0336536989 0.0214823205 0.0214823205
+ 0.0352861397 0.0225437600 0.0225437600
+ 0.0369675495 0.0236390196 0.0236390196
+ 0.0386981517 0.0247705802 0.0247705802
+ 0.0404745191 0.0259348303 0.0259348303
+ 0.0422977097 0.0271375105 0.0271375105
+ 0.0441726409 0.0283817798 0.0283817798
+ 0.0460996106 0.0296590906 0.0296590906
+ 0.0480887406 0.0309759099 0.0309759099
+ 0.0501275212 0.0323227607 0.0323227607
+ 0.0522207692 0.0337067991 0.0337067991
+ 0.0543671884 0.0351255499 0.0351255499
+ 0.0565663688 0.0365805998 0.0365805998
+ 0.0588187315 0.0380711295 0.0380711295
+ 0.0611272007 0.0396083593 0.0396083593
+ 0.0634748489 0.0411784090 0.0411784090
+ 0.0658760667 0.0427908003 0.0427908003
+ 0.0683400705 0.0444480814 0.0444480814
+ 0.0708511695 0.0461456515 0.0461456515
+ 0.0734233931 0.0478809699 0.0478809699
+ 0.0760477036 0.0496524908 0.0496524908
+ 0.0787281767 0.0514654815 0.0514654815
+ 0.0814533383 0.0533178188 0.0533178188
+ 0.0842291415 0.0552090518 0.0552090518
+ 0.0870640278 0.0571336001 0.0571336001
+ 0.0899450928 0.0590961091 0.0590961091
+ 0.0928783119 0.0610942282 0.0610942282
+ 0.0958742201 0.0631353706 0.0631353706
+ 0.0989081487 0.0652145892 0.0652145892
+ 0.1019897982 0.0673257634 0.0673257634
+ 0.1051272005 0.0694703013 0.0694703013
+ 0.1083052009 0.0716492608 0.0716492608
+ 0.1115389019 0.0738634914 0.0738634914
+ 0.1148212031 0.0761086568 0.0761086568
+ 0.1181529984 0.0783852488 0.0783852488
+ 0.1215258017 0.0806891099 0.0806891099
+ 0.1249411032 0.0830274820 0.0830274820
+ 0.1283981055 0.0854015574 0.0854015574
+ 0.1318998039 0.0878068879 0.0878068879
+ 0.1354435980 0.0902427882 0.0902427882
+ 0.1390310973 0.0927055702 0.0927055702
+ 0.1426659971 0.0952004492 0.0952004492
+ 0.1463364065 0.0977323800 0.0977323800
+ 0.1500398070 0.1002930999 0.1002930999
+ 0.1537826061 0.1028838009 0.1028838009
+ 0.1575697958 0.1055003032 0.1055003032
+ 0.1613817066 0.1081380993 0.1081380993
+ 0.1652164012 0.1108009964 0.1108009964
+ 0.1690932959 0.1134867966 0.1134867966
+ 0.1729968935 0.1161940992 0.1161940992
+ 0.1769410968 0.1189275980 0.1189275980
+ 0.1809352040 0.1216920018 0.1216920018
+ 0.1849523038 0.1244781017 0.1244781017
+ 0.1889985055 0.1272816956 0.1272816956
+ 0.1930781007 0.1301010996 0.1301010996
+ 0.1971940994 0.1329389066 0.1329389066
+ 0.2013469040 0.1358011961 0.1358011961
+ 0.2055312991 0.1386940926 0.1386940926
+ 0.2097439021 0.1416130960 0.1416130960
+ 0.2139831036 0.1445533037 0.1445533037
+ 0.2182556987 0.1475161016 0.1475161016
+ 0.2225302011 0.1505060941 0.1505060941
+ 0.2268306017 0.1535229981 0.1535229981
+ 0.2311580926 0.1565562934 0.1565562934
+ 0.2355093956 0.1596101969 0.1596101969
+ 0.2398717999 0.1626808047 0.1626808047
+ 0.2442272007 0.1657689065 0.1657689065
+ 0.2485899031 0.1688731015 0.1688731015
+ 0.2529604137 0.1719909012 0.1719909012
+ 0.2573277056 0.1751365066 0.1751365066
+ 0.2616989017 0.1782941073 0.1782941073
+ 0.2660799026 0.1814624071 0.1814624071
+ 0.2704606056 0.1846423000 0.1846423000
+ 0.2748312056 0.1878450066 0.1878450066
+ 0.2791987956 0.1910510063 0.1910510063
+ 0.2835668027 0.1942614019 0.1942614019
+ 0.2879388928 0.1974803954 0.1974803954
+ 0.2923108041 0.2007077038 0.2007077038
+ 0.2966752946 0.2039379030 0.2039379030
+ 0.3010303974 0.2071726024 0.2071726024
+ 0.3053742945 0.2104312927 0.2104312927
+ 0.3097003102 0.2136991024 0.2136991024
+ 0.3140352070 0.2169768065 0.2169768065
+ 0.3183707893 0.2202724963 0.2202724963
+ 0.3226906061 0.2235676050 0.2235676050
+ 0.3270021975 0.2268693000 0.2268693000
+ 0.3313120902 0.2301850021 0.2301850021
+ 0.3356218934 0.2334984988 0.2334984988
+ 0.3399325907 0.2368156016 0.2368156016
+ 0.3442339897 0.2401401997 0.2401401997
+ 0.3485251963 0.2434774041 0.2434774041
+ 0.3527927101 0.2468263060 0.2468263060
+ 0.3570409119 0.2501969039 0.2501969039
+ 0.3612729013 0.2535721958 0.2535721958
+ 0.3654753864 0.2569538951 0.2569538951
+ 0.3696604967 0.2603574097 0.2603574097
+ 0.3738316894 0.2637628019 0.2637628019
+ 0.3779726923 0.2671697140 0.2671697140
+ 0.3820927143 0.2705962062 0.2705962062
+ 0.3861967027 0.2740235031 0.2740235031
+ 0.3902786970 0.2774519026 0.2774519026
+ 0.3943498135 0.2808937132 0.2808937132
+ 0.3984076083 0.2843413949 0.2843413949
+ 0.4024240077 0.2878027856 0.2878027856
+ 0.4064257145 0.2912661135 0.2912661135
+ 0.4104036987 0.2947317958 0.2947317958
+ 0.4143416882 0.2981860042 0.2981860042
+ 0.4182564914 0.3016363978 0.3016363978
+ 0.4221282005 0.3050855994 0.3050855994
+ 0.4259957075 0.3085319102 0.3085319102
+ 0.4298554957 0.3119722009 0.3119722009
+ 0.4336968064 0.3154138923 0.3154138923
+ 0.4375284910 0.3188566864 0.3188566864
+ 0.4413171113 0.3222773075 0.3222773075
+ 0.4450969100 0.3256925941 0.3256925941
+ 0.4488551915 0.3290956020 0.3290956020
+ 0.4526067972 0.3324885964 0.3324885964
+ 0.4563522935 0.3358506858 0.3358506858
+ 0.4600827098 0.3392089009 0.3392089009
+ 0.4638085067 0.3425619900 0.3425619900
+ 0.4674848914 0.3459056914 0.3459056914
+ 0.4711487889 0.3492426872 0.3492426872
+ 0.4747653008 0.3525683880 0.3525683880
+ 0.4783576131 0.3558900058 0.3558900058
+ 0.4819136858 0.3591865897 0.3591865897
+ 0.4854589999 0.3624787927 0.3624787927
+ 0.4889962077 0.3657391071 0.3657391071
+ 0.4925225973 0.3689970076 0.3689970076
+ 0.4960449040 0.3722279966 0.3722279966
+ 0.4995129108 0.3754577041 0.3754577041
+ 0.5029718280 0.3786748946 0.3786748946
+ 0.5064191222 0.3818857074 0.3818857074
+ 0.5098642111 0.3850541115 0.3850541115
+ 0.5132802725 0.3882220984 0.3882220984
+ 0.5166903138 0.3913877010 0.3913877010
+ 0.5200588107 0.3945508003 0.3945508003
+ 0.5234236717 0.3976989985 0.3976989985
+ 0.5267717838 0.4008451104 0.4008451104
+ 0.5301045775 0.4039750993 0.4039750993
+ 0.5333794951 0.4071030021 0.4071030021
+ 0.5366390944 0.4102006853 0.4102006853
+ 0.5398436189 0.4132984877 0.4132984877
+ 0.5430372953 0.4163655937 0.4163655937
+ 0.5461881757 0.4194326997 0.4194326997
+ 0.5493322015 0.4224604964 0.4224604964
+ 0.5524412990 0.4254842997 0.4254842997
+ 0.5555446744 0.4284946918 0.4284946918
+ 0.5586010814 0.4315015972 0.4315015972
+ 0.5616549253 0.4344901145 0.4344901145
+ 0.5646228194 0.4374687970 0.4374687970
+ 0.5675905943 0.4404281080 0.4404281080
+ 0.5705261230 0.4433673024 0.4433673024
+ 0.5734590292 0.4462912083 0.4462912083
+ 0.5763446093 0.4491803050 0.4491803050
+ 0.5792183876 0.4520643055 0.4520643055
+ 0.5820407867 0.4549018145 0.4549018145
+ 0.5848355889 0.4577394128 0.4577394128
+ 0.5875927210 0.4605427086 0.4605427086
+ 0.5903086066 0.4633406997 0.4633406997
+ 0.5930045843 0.4661261141 0.4661261141
+ 0.5956503153 0.4689033926 0.4689033926
+ 0.5982949138 0.4716737866 0.4716737866
+ 0.6009235978 0.4744301140 0.4744301140
+ 0.6035524011 0.4771854877 0.4771854877
+ 0.6061716080 0.4799031019 0.4799031019
+ 0.6087887883 0.4826206863 0.4826206863
+ 0.6113740206 0.4853239954 0.4853239954
+ 0.6139330864 0.4880208969 0.4880208969
+ 0.6164814830 0.4907048047 0.4907048047
+ 0.6189994812 0.4933629036 0.4933629036
+ 0.6215174794 0.4960210919 0.4960210919
+ 0.6240079999 0.4986290932 0.4986290932
+ 0.6264969110 0.5012347102 0.5012347102
+ 0.6289771795 0.5038244128 0.5038244128
+ 0.6314516068 0.5064008236 0.5064008236
+ 0.6339148283 0.5089727044 0.5089727044
+ 0.6363407969 0.5115088224 0.5115088224
+ 0.6387668252 0.5140448213 0.5140448213
+ 0.6411426067 0.5165610909 0.5165610909
+ 0.6435087919 0.5190668106 0.5190668106
+ 0.6458575130 0.5215663910 0.5215663910
+ 0.6481820941 0.5240356922 0.5240356922
+ 0.6505066752 0.5265049934 0.5265049934
+ 0.6528093815 0.5289555192 0.5289555192
+ 0.6551114917 0.5313962102 0.5313962102
+ 0.6573888063 0.5338327885 0.5338327885
+ 0.6596413255 0.5362383723 0.5362383723
+ 0.6618937254 0.5386438966 0.5386438966
+ 0.6641113162 0.5410385132 0.5410385132
+ 0.6663289070 0.5434240103 0.5434240103
+ 0.6685289741 0.5458095074 0.5458095074
+ 0.6707097888 0.5481578112 0.5481578112
+ 0.6728904843 0.5505042076 0.5505042076
+ 0.6750382781 0.5528417826 0.5528417826
+ 0.6771832705 0.5551611185 0.5551611185
+ 0.6793134809 0.5574803948 0.5574803948
+ 0.6814150810 0.5597792864 0.5597792864
+ 0.6835166812 0.5620682836 0.5620682836
+ 0.6855754852 0.5643572211 0.5643572211
+ 0.6876184940 0.5665962100 0.5665962100
+ 0.6896557808 0.5688347220 0.5688347220
+ 0.6916378736 0.5710633993 0.5710633993
+ 0.6936199069 0.5732669830 0.5732669830
+ 0.6955876946 0.5754706860 0.5754706860
+ 0.6975364089 0.5776560903 0.5776560903
+ 0.6994851232 0.5798259974 0.5798259974
+ 0.7013980150 0.5819959044 0.5819959044
+ 0.7032977939 0.5841305852 0.5841305852
+ 0.7051973939 0.5862547755 0.5862547755
+ 0.7070760727 0.5883789062 0.5883789062
+ 0.7089548111 0.5904625058 0.5904625058
+ 0.7108243704 0.5925447941 0.5925447941
+ 0.7126672864 0.5946221948 0.5946221948
+ 0.7145102024 0.5966691971 0.5966691971
+ 0.7163286209 0.5987161994 0.5987161994
+ 0.7181193829 0.6007555127 0.6007555127
+ 0.7199102044 0.6027747989 0.6027747989
+ 0.7216753960 0.6047940254 0.6047940254
+ 0.7234271765 0.6068055034 0.6068055034
+ 0.7251790166 0.6088048220 0.6088048220
+ 0.7269017100 0.6108040214 0.6108040214
+ 0.7286177278 0.6127884984 0.6127884984
+ 0.7303336263 0.6147556901 0.6147556901
+ 0.7319886088 0.6167228818 0.6167228818
+ 0.7336395979 0.6186692119 0.6186692119
+ 0.7352887988 0.6205952168 0.6205952168
+ 0.7368847132 0.6225212216 0.6225212216
+ 0.7384806275 0.6244304776 0.6244304776
+ 0.7400730848 0.6263242960 0.6263242960
+ 0.7416328788 0.6282181740 0.6282181740
+ 0.7431927919 0.6301015019 0.6301015019
+ 0.7447494268 0.6319742799 0.6319742799
+ 0.7462829947 0.6338471174 0.6338471174
+ 0.7478165030 0.6356995106 0.6356995106
+ 0.7493439913 0.6375269890 0.6375269890
+ 0.7508273125 0.6393544078 0.6393544078
+ 0.7523106933 0.6411694288 0.6411694288
+ 0.7537910938 0.6429628134 0.6429628134
+ 0.7552406788 0.6447560787 0.6447560787
+ 0.7566903234 0.6465445161 0.6465445161
+ 0.7581396103 0.6483175755 0.6483175755
+ 0.7595729828 0.6500906944 0.6500906944
+ 0.7610062957 0.6518586874 0.6518586874
+ 0.7624397278 0.6535770297 0.6535770297
+ 0.7638341784 0.6552951932 0.6552951932
+ 0.7652254105 0.6570134759 0.6570134759
+ 0.7666165233 0.6587092280 0.6587092280
+ 0.7679901719 0.6604024768 0.6604024768
+ 0.7693589926 0.6620957851 0.6620957851
+ 0.7707278728 0.6637632847 0.6637632847
+ 0.7720705867 0.6654189229 0.6654189229
+ 0.7733970284 0.6670743823 0.6670743823
+ 0.7747234702 0.6687203050 0.6687203050
+ 0.7760393023 0.6703534126 0.6703534126
+ 0.7773399949 0.6719865203 0.6719865203
+ 0.7786408067 0.6736162901 0.6736162901
+ 0.7799372077 0.6752253771 0.6752253771
+ 0.7812135220 0.6768345833 0.6768345833
+ 0.7824897170 0.6784437895 0.6784437895
+ 0.7837659717 0.6800181270 0.6800181270
+ 0.7850177884 0.6815842986 0.6815842986
+ 0.7862669826 0.6831504703 0.6831504703
+ 0.7875161767 0.6846908927 0.6846908927
+ 0.7887520194 0.6861993074 0.6861993074
+ 0.7899786830 0.6877077222 0.6877077222
+ 0.7912054062 0.6892145872 0.6892145872
+ 0.7924262285 0.6906890869 0.6906890869
+ 0.7936294079 0.6921635866 0.6921635866
+ 0.7948325872 0.6936382055 0.6936382055
+ 0.7960357070 0.6950960159 0.6950960159
+ 0.7972220778 0.6965432167 0.6965432167
+ 0.7984061241 0.6979902983 0.6979902983
+ 0.7995899916 0.6994342804 0.6994342804
+ 0.8007580042 0.7008578181 0.7008578181
+ 0.8019068241 0.7022812963 0.7022812963
+ 0.8030557036 0.7037047744 0.7037047744
+ 0.8042045236 0.7051180005 0.7051180005
+ 0.8053393960 0.7065249085 0.7065249085
+ 0.8064743876 0.7079318166 0.7079318166
+ 0.8076093793 0.7093364000 0.7093364000
+ 0.8087307215 0.7107117772 0.7107117772
+ 0.8098388910 0.7120870948 0.7120870948
+ 0.8109471798 0.7134624124 0.7134624124
+ 0.8120555282 0.7148199081 0.7148199081
+ 0.8131191134 0.7161585093 0.7161585093
+ 0.8141819239 0.7174972296 0.7174972296
+ 0.8152446747 0.7188357711 0.7188357711
+ 0.8162903190 0.7201492190 0.7201492190
+ 0.8173117042 0.7214584947 0.7214584947
+ 0.8183330894 0.7227677703 0.7227677703
+ 0.8193544149 0.7240737081 0.7240737081
+ 0.8203511238 0.7253654003 0.7253654003
+ 0.8213419914 0.7266569734 0.7266569734
+ 0.8223329186 0.7279486060 0.7279486060
+ 0.8233172894 0.7292181849 0.7292181849
+ 0.8242688179 0.7304645777 0.7304645777
+ 0.8252202272 0.7317109704 0.7317109704
+ 0.8261716962 0.7329574227 0.7329574227
+ 0.8271054029 0.7341820002 0.7341820002
+ 0.8280197978 0.7353988290 0.7353988290
+ 0.8289341927 0.7366157174 0.7366157174
+ 0.8298485875 0.7378326058 0.7378326058
+ 0.8307464719 0.7390285134 0.7390285134
+ 0.8316389918 0.7402232885 0.7402232885
+ 0.8325315118 0.7414181828 0.7414181828
+ 0.8334239721 0.7426074743 0.7426074743
+ 0.8342829943 0.7437586784 0.7437586784
+ 0.8351417184 0.7449098229 0.7449098229
+ 0.8360003829 0.7460609078 0.7460609078
+ 0.8368576169 0.7472000122 0.7472000122
+ 0.8377087116 0.7483038902 0.7483038902
+ 0.8385598063 0.7494078875 0.7494078875
+ 0.8394109011 0.7505118251 0.7505118251
+ 0.8402518034 0.7516049743 0.7516049743
+ 0.8410723209 0.7526779175 0.7526779175
+ 0.8418927789 0.7537506819 0.7537506819
+ 0.8427134156 0.7548235059 0.7548235059
+ 0.8435238004 0.7558841705 0.7558841705
+ 0.8443217278 0.7569258809 0.7569258809
+ 0.8451194763 0.7579675913 0.7579675913
+ 0.8459174037 0.7590093017 0.7590093017
+ 0.8467006087 0.7600433230 0.7600433230
+ 0.8474699259 0.7610656023 0.7610656023
+ 0.8482393026 0.7620878220 0.7620878220
+ 0.8490086198 0.7631099820 0.7631099820
+ 0.8497787714 0.7641208768 0.7641208768
+ 0.8505498171 0.7651112080 0.7651112080
+ 0.8513206840 0.7661014795 0.7661014795
+ 0.8520916104 0.7670918107 0.7670918107
+ 0.8528512120 0.7680724263 0.7680724263
+ 0.8536006212 0.7690268159 0.7690268159
+ 0.8543499708 0.7699812055 0.7699812055
+ 0.8550993800 0.7709355950 0.7709355950
+ 0.8558359146 0.7718878984 0.7718878984
+ 0.8565574884 0.7728270292 0.7728270292
+ 0.8572790027 0.7737662196 0.7737662196
+ 0.8580005765 0.7747054100 0.7747054100
+ 0.8587099910 0.7756444812 0.7756444812
+ 0.8593978286 0.7765566707 0.7765566707
+ 0.8600856066 0.7774680257 0.7774680257
+ 0.8607733846 0.7783793211 0.7783793211
+ 0.8614575863 0.7792906165 0.7792906165
+ 0.8621283770 0.7801936865 0.7801936865
+ 0.8627992272 0.7810940146 0.7810940146
+ 0.8634700179 0.7819942832 0.7819942832
+ 0.8641406894 0.7828946114 0.7828946114
+ 0.8648099899 0.7837845087 0.7837845087
+ 0.8654794097 0.7846636772 0.7846636772
+ 0.8661487103 0.7855427861 0.7855427861
+ 0.8668180108 0.7864218950 0.7864218950
+ 0.8674687743 0.7872971892 0.7872971892
+ 0.8681142926 0.7881550193 0.7881550193
+ 0.8687598109 0.7890126705 0.7890126705
+ 0.8694053292 0.7898705006 0.7898705006
+ 0.8700295091 0.7907282114 0.7907282114
+ 0.8706318736 0.7915742993 0.7915742993
+ 0.8712342978 0.7924178839 0.7924178839
+ 0.8718366027 0.7932615280 0.7932615280
+ 0.8724340200 0.7941049933 0.7941049933
+ 0.8730055094 0.7949374914 0.7949374914
+ 0.8735769987 0.7957543135 0.7957543135
+ 0.8741484880 0.7965711951 0.7965711951
+ 0.8747199774 0.7973880172 0.7973880172
+ 0.8752837777 0.7982048988 0.7982048988
+ 0.8758454919 0.7989869118 0.7989869118
+ 0.8764070868 0.7997676134 0.7997676134
+ 0.8769688010 0.8005483150 0.8005483150
+ 0.8775206208 0.8013290167 0.8013290167
+ 0.8780546188 0.8021016717 0.8021016717
+ 0.8785886765 0.8028652072 0.8028652072
+ 0.8791226745 0.8036286831 0.8036286831
+ 0.8796567917 0.8043922186 0.8043922186
+ 0.8801620007 0.8051556945 0.8051556945
+ 0.8806633949 0.8058984876 0.8058984876
+ 0.8811649084 0.8066393733 0.8066393733
+ 0.8816663027 0.8073803186 0.8073803186
+ 0.8821567297 0.8081210852 0.8081210852
+ 0.8826276064 0.8088607192 0.8088607192
+ 0.8830984831 0.8095976114 0.8095976114
+ 0.8835694194 0.8103343844 0.8103343844
+ 0.8840402961 0.8110712171 0.8110712171
+ 0.8845028877 0.8118081093 0.8118081093
+ 0.8849632740 0.8125373125 0.8125373125
+ 0.8854237199 0.8132628202 0.8132628202
+ 0.8858841062 0.8139883280 0.8139883280
+ 0.8863461018 0.8147137761 0.8147137761
+ 0.8868156075 0.8154392838 0.8154392838
+ 0.8872851133 0.8161317110 0.8161317110
+ 0.8877546191 0.8168231845 0.8168231845
+ 0.8882240057 0.8175147176 0.8175147176
+ 0.8886895180 0.8182061911 0.8182061911
+ 0.8891507983 0.8188943863 0.8188943863
+ 0.8896121979 0.8195710182 0.8195710182
+ 0.8900735974 0.8202475905 0.8202475905
+ 0.8905348778 0.8209241033 0.8209241033
+ 0.8909785748 0.8216006756 0.8216006756
+ 0.8914170861 0.8222699761 0.8222699761
+ 0.8918557167 0.8229292035 0.8229292035
+ 0.8922942281 0.8235884905 0.8235884905
+ 0.8927327991 0.8242477179 0.8242477179
+ 0.8931676149 0.8249068856 0.8249068856
+ 0.8936023712 0.8255603909 0.8255603909
+ 0.8940371871 0.8262094259 0.8262094259
+ 0.8944720030 0.8268585205 0.8268585205
+ 0.8949096203 0.8275076151 0.8275076151
+ 0.8953595161 0.8281567097 0.8281567097
+ 0.8958094716 0.8287855983 0.8287855983
+ 0.8962594271 0.8294041753 0.8294041753
+ 0.8967093825 0.8300228119 0.8300228119
+ 0.8971595168 0.8306415081 0.8306415081
+ 0.8976098895 0.8312600851 0.8312600851
+ 0.8980603218 0.8318728209 0.8318728209
+ 0.8985106945 0.8324831128 0.8324831128
+ 0.8989611268 0.8330934048 0.8330934048
+ 0.8994054198 0.8337035775 0.8337035775
+ 0.8998395801 0.8343139291 0.8343139291
+ 0.9002736807 0.8349158764 0.8349158764
+ 0.9007077813 0.8355141878 0.8355141878
+ 0.9011420012 0.8361124992 0.8361124992
+ 0.9015651941 0.8367106915 0.8367106915
+ 0.9019711018 0.8373090029 0.8373090029
+ 0.9023771286 0.8378884792 0.8378884792
+ 0.9027829766 0.8384566903 0.8384566903
+ 0.9031888843 0.8390247822 0.8390247822
+ 0.9035964012 0.8395929933 0.8395929933
+ 0.9040068984 0.8401612043 0.8401612043
+ 0.9044172764 0.8407253027 0.8407253027
+ 0.9048277140 0.8412854075 0.8412854075
+ 0.9052380919 0.8418455124 0.8418455124
+ 0.9056466222 0.8424056768 0.8424056768
+ 0.9060494900 0.8429657817 0.8429657817
+ 0.9064524770 0.8435230255 0.8435230255
+ 0.9068554044 0.8440740705 0.8440740705
+ 0.9072582722 0.8446251750 0.8446251750
+ 0.9076607823 0.8451762795 0.8451762795
+ 0.9080597162 0.8457275033 0.8457275033
+ 0.9084585905 0.8462774158 0.8462774158
+ 0.9088575244 0.8468161225 0.8468161225
+ 0.9092563987 0.8473547101 0.8473547101
+ 0.9096552730 0.8478932977 0.8478932977
+ 0.9100391865 0.8484320045 0.8484320045
+ 0.9104216099 0.8489705920 0.8489705920
+ 0.9108039141 0.8494958878 0.8494958878
+ 0.9111862779 0.8500180244 0.8500180244
+ 0.9115687013 0.8505399823 0.8505399823
+ 0.9119420052 0.8510619998 0.8510619998
+ 0.9123104215 0.8515840173 0.8515840173
+ 0.9126788974 0.8521022201 0.8521022201
+ 0.9130473137 0.8526157737 0.8526157737
+ 0.9134156704 0.8531293273 0.8531293273
+ 0.9137811065 0.8536428809 0.8536428809
+ 0.9141399860 0.8541564941 0.8541564941
+ 0.9144989848 0.8546689749 0.8546689749
+ 0.9148579240 0.8551610112 0.8551610112
+ 0.9152169228 0.8556529880 0.8556529880
+ 0.9155759215 0.8561450243 0.8561450243
+ 0.9159141779 0.8566370010 0.8566370010
+ 0.9162515998 0.8571289182 0.8571289182
+ 0.9165889025 0.8576136231 0.8576136231
+ 0.9169263244 0.8580930233 0.8580930233
+ 0.9172636867 0.8585724235 0.8585724235
+ 0.9175904989 0.8590518832 0.8590518832
+ 0.9179077148 0.8595312834 0.8595312834
+ 0.9182248116 0.8600099087 0.8600099087
+ 0.9185420275 0.8604763150 0.8604763150
+ 0.9188591242 0.8609427810 0.8609427810
+ 0.9191758037 0.8614091873 0.8614091873
+ 0.9194787145 0.8618755937 0.8618755937
+ 0.9197816253 0.8623420000 0.8623420000
+ 0.9200844169 0.8628141284 0.8628141284
+ 0.9203873277 0.8632925153 0.8632925153
+ 0.9206901789 0.8637707829 0.8637707829
+ 0.9209961295 0.8642491102 0.8642491102
+ 0.9213051796 0.8647273779 0.8647273779
+ 0.9216142893 0.8652058244 0.8652058244
+ 0.9219235182 0.8656808734 0.8656808734
+ 0.9222326279 0.8661553860 0.8661553860
+ 0.9225417972 0.8666298985 0.8666298985
+ 0.9228463769 0.8671044111 0.8671044111
+ 0.9231504202 0.8675789237 0.8675789237
+ 0.9234544039 0.8680508733 0.8680508733
+ 0.9237583876 0.8685060740 0.8685060740
+ 0.9240623713 0.8689612746 0.8689612746
+ 0.9243630767 0.8694164753 0.8694164753
+ 0.9246509075 0.8698716164 0.8698716164
+ 0.9249386787 0.8703268170 0.8703268170
+ 0.9252265096 0.8707792163 0.8707792163
+ 0.9255142212 0.8712267280 0.8712267280
+ 0.9258019924 0.8716741204 0.8716741204
+ 0.9260783792 0.8721215725 0.8721215725
+ 0.9263415933 0.8725690246 0.8725690246
+ 0.9266049266 0.8730164766 0.8730164766
+ 0.9268680811 0.8734666109 0.8734666109
+ 0.9271314144 0.8739191890 0.8739191890
+ 0.9273946285 0.8743718266 0.8743718266
+ 0.9276558757 0.8748244047 0.8748244047
+ 0.9279161096 0.8752769232 0.8752769232
+ 0.9281764030 0.8757295012 0.8757295012
+ 0.9284366965 0.8761757016 0.8761757016
+ 0.9286969900 0.8766183257 0.8766183257
+ 0.9289572835 0.8770608902 0.8770608902
+ 0.9292187095 0.8775033951 0.8775033951
+ 0.9294803143 0.8779460192 0.8779460192
+ 0.9297419190 0.8783885837 0.8783885837
+ 0.9300035238 0.8788154125 0.8788154125
+ 0.9302651286 0.8792347908 0.8792347908
+ 0.9305267930 0.8796542287 0.8796542287
+ 0.9307944179 0.8800736070 0.8800736070
+ 0.9310628176 0.8804931045 0.8804931045
+ 0.9313312173 0.8809124827 0.8809124827
+ 0.9315996170 0.8813328147 0.8813328147
+ 0.9318680167 0.8817536831 0.8817536831
+ 0.9321364164 0.8821746111 0.8821746111
+ 0.9324026108 0.8825954199 0.8825954199
+ 0.9326686263 0.8830162883 0.8830162883
+ 0.9329345822 0.8834370971 0.8834370971
+ 0.9332005978 0.8838580251 0.8838580251
+ 0.9334664941 0.8842790127 0.8842790127
+ 0.9337325096 0.8846998811 0.8846998811
+ 0.9339888096 0.8851209283 0.8851209283
+ 0.9342433810 0.8855419159 0.8855419159
+ 0.9344980121 0.8859627843 0.8859627843
+ 0.9347525835 0.8863782883 0.8863782883
+ 0.9350072145 0.8867862821 0.8867862821
+ 0.9352617860 0.8871942759 0.8871942759
+ 0.9355120063 0.8876023293 0.8876023293
+ 0.9357606769 0.8880103230 0.8880103230
+ 0.9360094070 0.8884181976 0.8884181976
+ 0.9362581968 0.8888232708 0.8888232708
+ 0.9365069270 0.8892168999 0.8892168999
+ 0.9367555976 0.8896105289 0.8896105289
+ 0.9369971156 0.8900040984 0.8900040984
+ 0.9372326732 0.8903976083 0.8903976083
+ 0.9374684095 0.8907911777 0.8907911777
+ 0.9377040267 0.8911848068 0.8911848068
+ 0.9379395843 0.8915761113 0.8915761113
+ 0.9381753206 0.8919671178 0.8919671178
+ 0.9384089708 0.8923581839 0.8923581839
+ 0.9386385083 0.8927491903 0.8927491903
+ 0.9388679266 0.8931403160 0.8931403160
+ 0.9390972853 0.8935313225 0.8935313225
+ 0.9393268228 0.8939135075 0.8939135075
+ 0.9395561814 0.8942884803 0.8942884803
+ 0.9397855997 0.8946635723 0.8946635723
+ 0.9400131106 0.8950387239 0.8950387239
+ 0.9402405024 0.8954138160 0.8954138160
+ 0.9404678941 0.8957887888 0.8957887888
+ 0.9406952858 0.8961619735 0.8961619735
+ 0.9409226775 0.8965228200 0.8965228200
+ 0.9411501288 0.8968836069 0.8968836069
+ 0.9413790703 0.8972443938 0.8972443938
+ 0.9416092038 0.8976051211 0.8976051211
+ 0.9418392777 0.8979659081 0.8979659081
+ 0.9420694113 0.8983266950 0.8983266950
+ 0.9422994852 0.8986871243 0.8986871243
+ 0.9425296187 0.8990470767 0.8990470767
+ 0.9427592158 0.8994072080 0.8994072080
+ 0.9429851174 0.8997672796 0.8997672796
+ 0.9432110190 0.9001272917 0.9001272917
+ 0.9434369206 0.9004874229 0.9004874229
+ 0.9436628222 0.9008464217 0.9008464217
+ 0.9438887239 0.9011930227 0.9011930227
+ 0.9441146255 0.9015396237 0.9015396237
+ 0.9443339109 0.9018862247 0.9018862247
+ 0.9445490241 0.9022328258 0.9022328258
+ 0.9447640777 0.9025794268 0.9025794268
+ 0.9449791908 0.9029260278 0.9029260278
+ 0.9451943040 0.9032617211 0.9032617211
+ 0.9454094172 0.9035840034 0.9035840034
+ 0.9456244111 0.9039062262 0.9039062262
+ 0.9458345175 0.9042283893 0.9042283893
+ 0.9460445046 0.9045506120 0.9045506120
+ 0.9462546110 0.9048727751 0.9048727751
+ 0.9464645982 0.9051949978 0.9051949978
+ 0.9466745853 0.9055181146 0.9055181146
+ 0.9468846917 0.9058414102 0.9058414102
+ 0.9470942020 0.9061647058 0.9061647058
+ 0.9473028183 0.9064880013 0.9064880013
+ 0.9475114942 0.9068112969 0.9068112969
+ 0.9477201104 0.9071347117 0.9071347117
+ 0.9479287267 0.9074580073 0.9074580073
+ 0.9481372833 0.9077845216 0.9077845216
+ 0.9483458996 0.9081110954 0.9081110954
+ 0.9485498071 0.9084377289 0.9084377289
+ 0.9487506747 0.9087643027 0.9087643027
+ 0.9489514828 0.9090908766 0.9090908766
+ 0.9491522908 0.9094176292 0.9094176292
+ 0.9493530989 0.9097433090 0.9097433090
+ 0.9495540261 0.9100611806 0.9100611806
+ 0.9497547746 0.9103791714 0.9103791714
+ 0.9499650002 0.9106972218 0.9106972218
+ 0.9501776099 0.9110150933 0.9110150933
+ 0.9503902197 0.9113330841 0.9113330841
+ 0.9506028295 0.9116510749 0.9116510749
+ 0.9508153796 0.9119694829 0.9119694829
+ 0.9510279894 0.9122899771 0.9122899771
+ 0.9512405992 0.9126105905 0.9126105905
+ 0.9514577985 0.9129310846 0.9129310846
+ 0.9516754150 0.9132516980 0.9132516980
+ 0.9518930912 0.9135721922 0.9135721922
+ 0.9521107078 0.9138928056 0.9138928056
+ 0.9523283839 0.9142141938 0.9142141938
+ 0.9525460005 0.9145398736 0.9145398736
+ 0.9527636766 0.9148656130 0.9148656130
+ 0.9529777169 0.9151912928 0.9151912928
+ 0.9531913996 0.9155169725 0.9155169725
+ 0.9534052014 0.9158427119 0.9158427119
+ 0.9536188841 0.9161683917 0.9161683917
+ 0.9538326859 0.9164946079 0.9164946079
+ 0.9540464878 0.9168255925 0.9168255925
+ 0.9542601705 0.9171565771 0.9171565771
+ 0.9544739723 0.9174876213 0.9174876213
+ 0.9546877146 0.9178186059 0.9178186059
+ 0.9549015164 0.9181495905 0.9181495905
+ 0.9551151991 0.9184805155 0.9184805155
+ 0.9553288817 0.9188115001 0.9188115001
+ 0.9555426836 0.9191362858 0.9191362858
+ 0.9557564259 0.9194607139 0.9194607139
+ 0.9559655190 0.9197850823 0.9197850823
+ 0.9561733007 0.9201093912 0.9201093912
+ 0.9563812017 0.9204338193 0.9204338193
+ 0.9565889835 0.9207581878 0.9207581878
+ 0.9567968845 0.9210826159 0.9210826159
+ 0.9570047259 0.9214031100 0.9214031100
+ 0.9572126269 0.9217219949 0.9217219949
+ 0.9574205279 0.9220409989 0.9220409989
+ 0.9576283097 0.9223598838 0.9223598838
+ 0.9578362107 0.9226788878 0.9226788878
+ 0.9580441117 0.9229977727 0.9229977727
+ 0.9582520127 0.9233167768 0.9233167768
+ 0.9584599137 0.9236333966 0.9236333966
+ 0.9586678147 0.9239464998 0.9239464998
+ 0.9588736892 0.9242596030 0.9242596030
+ 0.9590756893 0.9245728254 0.9245728254
+ 0.9592776895 0.9248859286 0.9248859286
+ 0.9594796896 0.9251989722 0.9251989722
+ 0.9596816897 0.9255120754 0.9255120754
+ 0.9598835707 0.9258251786 0.9258251786
+ 0.9600855708 0.9261450171 0.9261450171
+ 0.9602875710 0.9264646769 0.9264646769
+ 0.9604778290 0.9267843962 0.9267843962
+ 0.9606677890 0.9271041751 0.9271041751
+ 0.9608578086 0.9274238944 0.9274238944
+ 0.9610478282 0.9277436137 0.9277436137
+ 0.9612377882 0.9280633926 0.9280633926
+ 0.9614278078 0.9283816814 0.9283816814
+ 0.9616177082 0.9286987782 0.9286987782
+ 0.9617974758 0.9290158749 0.9290158749
+ 0.9619693160 0.9293330908 0.9293330908
+ 0.9621409774 0.9296501875 0.9296501875
+ 0.9623126984 0.9299672842 0.9299672842
+ 0.9624844193 0.9302843809 0.9302843809
+ 0.9626560807 0.9306014776 0.9306014776
+ 0.9628278017 0.9309071898 0.9309071898
+ 0.9629982710 0.9312127233 0.9312127233
+ 0.9631454945 0.9315180779 0.9315180779
+ 0.9632925987 0.9318236113 0.9318236113
+ 0.9634398222 0.9321290851 0.9321290851
+ 0.9635869861 0.9324346185 0.9324346185
+ 0.9637340903 0.9327399731 0.9327399731
+ 0.9638813138 0.9330422282 0.9330422282
+ 0.9640284777 0.9333382249 0.9333382249
+ 0.9641625285 0.9336342812 0.9336342812
+ 0.9642810822 0.9339302778 0.9339302778
+ 0.9643996954 0.9342262745 0.9342262745
+ 0.9645183086 0.9345223904 0.9345223904
+ 0.9646369219 0.9348183870 0.9348183870
+ 0.9647554755 0.9351143837 0.9351143837
+ 0.9648740888 0.9354104996 0.9354104996
+ 0.9649927020 0.9357064962 0.9357064962
+ 0.9651054740 0.9360026121 0.9360026121
+ 0.9652165771 0.9362986088 0.9362986088
+ 0.9653276801 0.9365946054 0.9365946054
+ 0.9654389024 0.9368907213 0.9368907213
+ 0.9655500054 0.9371867180 0.9371867180
+ 0.9656612277 0.9374827743 0.9374827743
+ 0.9657722712 0.9377809167 0.9377809167
+ 0.9658837914 0.9380794764 0.9380794764
+ 0.9660049081 0.9383779764 0.9383779764
+ 0.9661260247 0.9386765957 0.9386765957
+ 0.9662470818 0.9389750957 0.9389750957
+ 0.9663681984 0.9392737150 0.9392737150
+ 0.9664893150 0.9395722151 0.9395722151
+ 0.9666103721 0.9398707747 0.9398707747
+ 0.9667314887 0.9401614070 0.9401614070
+ 0.9668537974 0.9404516220 0.9404516220
+ 0.9669811130 0.9407417774 0.9407417774
+ 0.9671084285 0.9410318732 0.9410318732
+ 0.9672356844 0.9413220882 0.9413220882
+ 0.9673628807 0.9416123033 0.9416123033
+ 0.9674901962 0.9419023991 0.9419023991
+ 0.9676175117 0.9421926141 0.9421926141
+ 0.9677448273 0.9424642920 0.9424642920
+ 0.9678722024 0.9427356124 0.9427356124
+ 0.9680001140 0.9430068731 0.9430068731
+ 0.9681280255 0.9432781935 0.9432781935
+ 0.9682558775 0.9435495138 0.9435495138
+ 0.9683837891 0.9438207150 0.9438207150
+ 0.9685117006 0.9440919757 0.9440919757
+ 0.9686396122 0.9443632960 0.9443632960
+ 0.9687675238 0.9446105957 0.9446105957
+ 0.9688940048 0.9448559284 0.9448559284
+ 0.9690169096 0.9451010823 0.9451010823
+ 0.9691396952 0.9453462958 0.9453462958
+ 0.9692625999 0.9455916286 0.9455916286
+ 0.9693853855 0.9458367825 0.9458367825
+ 0.9695081711 0.9460821152 0.9460821152
+ 0.9696310759 0.9463273287 0.9463273287
+ 0.9697539210 0.9465690255 0.9465690255
+ 0.9698749781 0.9468097091 0.9468097091
+ 0.9699872136 0.9470502734 0.9470502734
+ 0.9700993896 0.9472910166 0.9472910166
+ 0.9702115059 0.9475315809 0.9475315809
+ 0.9703236818 0.9477723241 0.9477723241
+ 0.9704359174 0.9480128884 0.9480128884
+ 0.9705479741 0.9482535124 0.9482535124
+ 0.9706602097 0.9484931827 0.9484931827
+ 0.9707723260 0.9487320185 0.9487320185
+ 0.9708713889 0.9489706755 0.9489706755
+ 0.9709702730 0.9492095113 0.9492095113
+ 0.9710690975 0.9494482875 0.9494482875
+ 0.9711679220 0.9496871233 0.9496871233
+ 0.9712666869 0.9499258995 0.9499258995
+ 0.9713655114 0.9501646757 0.9501646757
+ 0.9714642763 0.9504017234 0.9504017234
+ 0.9715631008 0.9506325722 0.9506325722
+ 0.9716647267 0.9508634806 0.9508634806
+ 0.9717674255 0.9510943890 0.9510943890
+ 0.9718701243 0.9513254166 0.9513254166
+ 0.9719728231 0.9515563250 0.9515563250
+ 0.9720755219 0.9517871737 0.9517871737
+ 0.9721782207 0.9520180821 0.9520180821
+ 0.9722809792 0.9522489905 0.9522489905
+ 0.9723836780 0.9524822235 0.9524822235
+ 0.9724901915 0.9527158737 0.9527158737
+ 0.9726037979 0.9529495835 0.9529495835
+ 0.9727175236 0.9531832933 0.9531832933
+ 0.9728311896 0.9534170032 0.9534170032
+ 0.9729447961 0.9536505938 0.9536505938
+ 0.9730585217 0.9538843036 0.9538843036
+ 0.9731721878 0.9541180134 0.9541180134
+ 0.9732859135 0.9543501735 0.9543501735
+ 0.9733995199 0.9545791745 0.9545791745
+ 0.9735301733 0.9548081160 0.9548081160
+ 0.9736629128 0.9550369978 0.9550369978
+ 0.9737957120 0.9552658796 0.9552658796
+ 0.9739285111 0.9554948211 0.9554948211
+ 0.9740611911 0.9557238221 0.9557238221
+ 0.9741939902 0.9559527040 0.9559527040
+ 0.9743267894 0.9561815858 0.9561815858
+ 0.9744595289 0.9564020038 0.9564020038
+ 0.9745973945 0.9566190243 0.9566190243
+ 0.9747449160 0.9568361044 0.9568361044
+ 0.9748924971 0.9570531249 0.9570531249
+ 0.9750400186 0.9572700858 0.9572700858
+ 0.9751874804 0.9574871063 0.9574871063
+ 0.9753351212 0.9577041268 0.9577041268
+ 0.9754825830 0.9579210877 0.9579210877
+ 0.9756301045 0.9581381083 0.9581381083
+ 0.9757776856 0.9583560228 0.9583560228
+ 0.9759315848 0.9585739970 0.9585739970
+ 0.9760882258 0.9587919116 0.9587919116
+ 0.9762448072 0.9590098262 0.9590098262
+ 0.9764013886 0.9592276812 0.9592276812
+ 0.9765580297 0.9594457150 0.9594457150
+ 0.9767146111 0.9596636295 0.9596636295
+ 0.9768711925 0.9598814845 0.9598814845
+ 0.9770277739 0.9601004124 0.9601004124
+ 0.9771844149 0.9603220224 0.9603220224
+ 0.9773445129 0.9605436921 0.9605436921
+ 0.9775046706 0.9607654214 0.9607654214
+ 0.9776650071 0.9609870911 0.9609870911
+ 0.9778252244 0.9612088203 0.9612088203
+ 0.9779855013 0.9614304900 0.9614304900
+ 0.9781457186 0.9616522193 0.9616522193
+ 0.9783058763 0.9618738890 0.9618738890
+ 0.9784662127 0.9620940089 0.9620940089
+ 0.9786261916 0.9623115063 0.9623115063
+ 0.9787849188 0.9625288844 0.9625288844
+ 0.9789437056 0.9627463818 0.9627463818
+ 0.9791023731 0.9629638195 0.9629638195
+ 0.9792612195 0.9631813169 0.9631813169
+ 0.9794198871 0.9633988142 0.9633988142
+ 0.9795786738 0.9636161923 0.9636161923
+ 0.9797374010 0.9638336897 0.9638336897
+ 0.9798961878 0.9640504122 0.9640504122
+ 0.9800534844 0.9642658830 0.9642658830
+ 0.9802057147 0.9644814730 0.9644814730
+ 0.9803580046 0.9646970034 0.9646970034
+ 0.9805101752 0.9649125934 0.9649125934
+ 0.9806625247 0.9651281834 0.9651281834
+ 0.9808148146 0.9653437138 0.9653437138
+ 0.9809669852 0.9655593038 0.9655593038
+ 0.9811192751 0.9657747746 0.9657747746
+ 0.9812715054 0.9659873843 0.9659873843
+ 0.9814214110 0.9661936760 0.9661936760
+ 0.9815621972 0.9664000273 0.9664000273
+ 0.9817029834 0.9666063190 0.9666063190
+ 0.9818438292 0.9668126106 0.9668126106
+ 0.9819844961 0.9670189023 0.9670189023
+ 0.9821252823 0.9672251940 0.9672251940
+ 0.9822661281 0.9674314260 0.9674314260
+ 0.9824067950 0.9676377177 0.9676377177
+ 0.9825475812 0.9678443074 0.9678443074
+ 0.9826868773 0.9680523872 0.9680523872
+ 0.9828112125 0.9682605267 0.9682605267
+ 0.9829354882 0.9684684873 0.9684684873
+ 0.9830598235 0.9686766267 0.9686766267
+ 0.9831839800 0.9688847065 0.9688847065
+ 0.9833083153 0.9690927863 0.9690927863
+ 0.9834325910 0.9693009257 0.9693009257
+ 0.9835569263 0.9695090055 0.9695090055
+ 0.9836812019 0.9697170854 0.9697170854
+ 0.9838054180 0.9699230194 0.9699230194
+ 0.9839122891 0.9701287746 0.9701287746
+ 0.9840167165 0.9703344703 0.9703344703
+ 0.9841210246 0.9705402255 0.9705402255
+ 0.9842253923 0.9707459211 0.9707459211
+ 0.9843298197 0.9709516168 0.9709516168
+ 0.9844341278 0.9711573124 0.9711573124
+ 0.9845384955 0.9713630080 0.9713630080
+ 0.9846428037 0.9715687037 0.9715687037
+ 0.9847471714 0.9717782140 0.9717782140
+ 0.9848499894 0.9719914198 0.9719914198
+ 0.9849516153 0.9722046256 0.9722046256
+ 0.9850531816 0.9724177718 0.9724177718
+ 0.9851548076 0.9726309180 0.9726309180
+ 0.9852563143 0.9728441238 0.9728441238
+ 0.9853578806 0.9730573297 0.9730573297
+ 0.9854595065 0.9732704759 0.9732704759
+ 0.9855610728 0.9734836817 0.9734836817
+ 0.9856626987 0.9736968279 0.9736968279
+ 0.9857648015 0.9739102125 0.9739102125
+ 0.9858701229 0.9741235971 0.9741235971
+ 0.9859753847 0.9743369222 0.9743369222
+ 0.9860807061 0.9745503068 0.9745503068
+ 0.9861860275 0.9747636914 0.9747636914
+ 0.9862912893 0.9749770164 0.9749770164
+ 0.9863966107 0.9751904011 0.9751904011
+ 0.9865018725 0.9754037857 0.9754037857
+ 0.9866071939 0.9756171703 0.9756171703
+ 0.9867125154 0.9758273959 0.9758273959
+ 0.9868178964 0.9760339856 0.9760339856
+ 0.9869232774 0.9762405753 0.9762405753
+ 0.9870287776 0.9764472842 0.9764472842
+ 0.9871342778 0.9766538739 0.9766538739
+ 0.9872397184 0.9768605232 0.9768605232
+ 0.9873452187 0.9770671129 0.9770671129
+ 0.9874507189 0.9772738218 0.9772738218
+ 0.9875562191 0.9774804115 0.9774804115
+ 0.9876616001 0.9776870012 0.9776870012
+ 0.9877671003 0.9778900146 0.9778900146
+ 0.9878692031 0.9780920148 0.9780920148
+ 0.9879713058 0.9782938957 0.9782938957
+ 0.9880735278 0.9784958959 0.9784958959
+ 0.9881755710 0.9786978960 0.9786978960
+ 0.9882776737 0.9788998961 0.9788998961
+ 0.9883798957 0.9791017771 0.9791017771
+ 0.9884819984 0.9793037772 0.9793037772
+ 0.9885841012 0.9795057774 0.9795057774
+ 0.9886862040 0.9797077179 0.9797077179
+ 0.9887884855 0.9798991084 0.9798991084
+ 0.9888911843 0.9800903797 0.9800903797
+ 0.9889938831 0.9802817702 0.9802817702
+ 0.9890967011 0.9804731011 0.9804731011
+ 0.9891993999 0.9806643724 0.9806643724
+ 0.9893020988 0.9808558226 0.9808558226
+ 0.9894047976 0.9810470939 0.9810470939
+ 0.9895074964 0.9812384844 0.9812384844
+ 0.9896101952 0.9814298153 0.9814298153
+ 0.9897128940 0.9816213250 0.9816213250
+ 0.9898141026 0.9818137884 0.9818137884
+ 0.9899132252 0.9820061922 0.9820061922
+ 0.9900122881 0.9821987152 0.9821987152
+ 0.9901114106 0.9823911190 0.9823911190
+ 0.9902104735 0.9825835824 0.9825835824
+ 0.9903095961 0.9827759862 0.9827759862
+ 0.9904087186 0.9829685092 0.9829685092
+ 0.9905077815 0.9831609130 0.9831609130
+ 0.9906069040 0.9833533764 0.9833533764
+ 0.9907060266 0.9835463166 0.9835463166
+ 0.9908010960 0.9837430716 0.9837430716
+ 0.9908921719 0.9839398265 0.9839398265
+ 0.9909833074 0.9841365218 0.9841365218
+ 0.9910743833 0.9843332767 0.9843332767
+ 0.9911653996 0.9845299721 0.9845299721
+ 0.9912564754 0.9847267270 0.9847267270
+ 0.9913476110 0.9849234819 0.9849234819
+ 0.9914386868 0.9851201773 0.9851201773
+ 0.9915298223 0.9853168726 0.9853168726
+ 0.9916208982 0.9855136275 0.9855136275
+ 0.9917073250 0.9857079983 0.9857079983
+ 0.9917883277 0.9859024286 0.9859024286
+ 0.9918693900 0.9860966802 0.9860966802
+ 0.9919503927 0.9862911105 0.9862911105
+ 0.9920313954 0.9864854217 0.9864854217
+ 0.9921123981 0.9866797924 0.9866797924
+ 0.9921934009 0.9868742228 0.9868742228
+ 0.9922744036 0.9870684743 0.9870684743
+ 0.9923554063 0.9872629046 0.9872629046
+ 0.9924364090 0.9874572754 0.9874572754
+ 0.9925166965 0.9876400828 0.9876400828
+ 0.9925954938 0.9878200889 0.9878200889
+ 0.9926741719 0.9880000949 0.9880000949
+ 0.9927530289 0.9881801009 0.9881801009
+ 0.9928318262 0.9883599877 0.9883599877
+ 0.9929105043 0.9885399938 0.9885399938
+ 0.9929893017 0.9887199998 0.9887199998
+ 0.9930680990 0.9889000058 0.9889000058
+ 0.9931467772 0.9890800118 0.9890800118
+ 0.9932255745 0.9892598987 0.9892598987
+ 0.9933044910 0.9894347787 0.9894347787
+ 0.9933881760 0.9896039963 0.9896039963
+ 0.9934718013 0.9897732735 0.9897732735
+ 0.9935554266 0.9899424911 0.9899424911
+ 0.9936391115 0.9901117086 0.9901117086
+ 0.9937226772 0.9902809858 0.9902809858
+ 0.9938063025 0.9904502034 0.9904502034
+ 0.9938899875 0.9906194210 0.9906194210
+ 0.9939736128 0.9907886982 0.9907886982
+ 0.9940572977 0.9909579158 0.9909579158
+ 0.9941409230 0.9911267161 0.9911267161
+ 0.9942286015 0.9912837148 0.9912837148
+ 0.9943184853 0.9914405942 0.9914405942
+ 0.9944083095 0.9915975928 0.9915975928
+ 0.9944980741 0.9917545915 0.9917545915
+ 0.9945880175 0.9919115901 0.9919115901
+ 0.9946777821 0.9920685887 0.9920685887
+ 0.9947676063 0.9922255874 0.9922255874
+ 0.9948573709 0.9923825860 0.9923825860
+ 0.9949473143 0.9925395846 0.9925395846
+ 0.9950370789 0.9926965833 0.9926965833
+ 0.9951277971 0.9928529263 0.9928529263
+ 0.9952226877 0.9930083752 0.9930083752
+ 0.9953176975 0.9931638837 0.9931638837
+ 0.9954125881 0.9933193922 0.9933193922
+ 0.9955074787 0.9934750199 0.9934750199
+ 0.9956024289 0.9936305285 0.9936305285
+ 0.9956973791 0.9937859774 0.9937859774
+ 0.9957923293 0.9939414859 0.9939414859
+ 0.9958872199 0.9940969944 0.9940969944
+ 0.9959821105 0.9942525029 0.9942525029
+ 0.9960770011 0.9944080710 0.9944080710
+ 0.9961733222 0.9945561886 0.9945561886
+ 0.9962705970 0.9947028756 0.9947028756
+ 0.9963678718 0.9948495030 0.9948495030
+ 0.9964652061 0.9949960709 0.9949960709
+ 0.9965624809 0.9951426983 0.9951426983
+ 0.9966596961 0.9952893853 0.9952893853
+ 0.9967569709 0.9954360127 0.9954360127
+ 0.9968543053 0.9955825806 0.9955825806
+ 0.9969515800 0.9957293272 0.9957293272
+ 0.9970489144 0.9958758950 0.9958758950
+ 0.9971461892 0.9960218072 0.9960218072
+ 0.9972419143 0.9961522818 0.9961522818
+ 0.9973374009 0.9962828159 0.9962828159
+ 0.9974328876 0.9964132905 0.9964132905
+ 0.9975283742 0.9965438247 0.9965438247
+ 0.9976239204 0.9966742992 0.9966742992
+ 0.9977192879 0.9968047738 0.9968047738
+ 0.9978147745 0.9969353080 0.9969353080
+ 0.9979103208 0.9970657825 0.9970657825
+ 0.9980058074 0.9971963167 0.9971963167
+ 0.9981012940 0.9973267913 0.9973267913
+ 0.9981966019 0.9974548221 0.9974548221
+ 0.9982848763 0.9975687265 0.9975687265
+ 0.9983732104 0.9976826906 0.9976826906
+ 0.9984614849 0.9977965951 0.9977965951
+ 0.9985498190 0.9979106188 0.9979106188
+ 0.9986380935 0.9980245233 0.9980245233
+ 0.9987264276 0.9981384277 0.9981384277
+ 0.9988147020 0.9982523918 0.9982523918
+ 0.9989029765 0.9983662963 0.9983662963
+ 0.9989913106 0.9984803200 0.9984803200
+ 0.9990795851 0.9985942245 0.9985942245
+ 0.9991670847 0.9987086058 0.9987086058
+ 0.9992427826 0.9988260269 0.9988260269
+ 0.9993184805 0.9989433885 0.9989433885
+ 0.9993941784 0.9990608096 0.9990608096
+ 0.9994698763 0.9991781712 0.9991781712
+ 0.9995456934 0.9992955923 0.9992955923
+ 0.9996213913 0.9994130135 0.9994130135
+ 0.9996970892 0.9995303750 0.9995303750
+ 0.9997727871 0.9996477962 0.9996477962
+ 0.9998486042 0.9997652173 0.9997652173
+ 0.9999243021 0.9998825788 0.9998825788
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/kodak_gold_100.spi1d b/release/datafiles/colormanagement/luts/film_response/kodak_gold_100.spi1d
new file mode 100644
index 00000000000..fe5e2189264
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/kodak_gold_100.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0085512707 0.0085512707 0.0040388089
+ 0.0166211706 0.0166211706 0.0078869723
+ 0.0239217207 0.0239217207 0.0115889302
+ 0.0305970907 0.0305970907 0.0151835401
+ 0.0367598310 0.0367598310 0.0186785609
+ 0.0425867885 0.0425867885 0.0220463201
+ 0.0481229611 0.0481229611 0.0253170207
+ 0.0533615910 0.0533615910 0.0285046306
+ 0.0583925582 0.0583925582 0.0316370614
+ 0.0632038563 0.0632038563 0.0346923992
+ 0.0678458065 0.0678458065 0.0376951098
+ 0.0723663494 0.0723663494 0.0406254604
+ 0.0767436773 0.0767436773 0.0434999615
+ 0.0809408724 0.0809408724 0.0463499017
+ 0.0850247815 0.0850247815 0.0491519198
+ 0.0890202522 0.0890202522 0.0518954284
+ 0.0929083526 0.0929083526 0.0545983687
+ 0.0967549235 0.0967549235 0.0572627783
+ 0.1004967019 0.1004967019 0.0598945618
+ 0.1041401029 0.1041401029 0.0624886788
+ 0.1076878980 0.1076878980 0.0650598332
+ 0.1111321002 0.1111321002 0.0676003397
+ 0.1145434007 0.1145434007 0.0700881407
+ 0.1179336980 0.1179336980 0.0725532621
+ 0.1213003024 0.1213003024 0.0749963596
+ 0.1246234998 0.1246234998 0.0774110928
+ 0.1278907061 0.1278907061 0.0798068568
+ 0.1311019957 0.1311019957 0.0821953192
+ 0.1342176050 0.1342176050 0.0845582336
+ 0.1372642964 0.1372642964 0.0868936703
+ 0.1402868927 0.1402868927 0.0891988575
+ 0.1433071941 0.1433071941 0.0914948583
+ 0.1463229060 0.1463229060 0.0937692001
+ 0.1493196040 0.1493196040 0.0960261002
+ 0.1522929072 0.1522929072 0.0982703716
+ 0.1552488059 0.1552488059 0.1005069017
+ 0.1581514031 0.1581514031 0.1027444005
+ 0.1609746069 0.1609746069 0.1049712971
+ 0.1637527943 0.1637527943 0.1071826965
+ 0.1664921939 0.1664921939 0.1093685031
+ 0.1691893935 0.1691893935 0.1115406975
+ 0.1718754023 0.1718754023 0.1136908978
+ 0.1745572984 0.1745572984 0.1158114970
+ 0.1772463024 0.1772463024 0.1179215983
+ 0.1799204051 0.1799204051 0.1200228035
+ 0.1825827062 0.1825827062 0.1221131980
+ 0.1852307022 0.1852307022 0.1241903976
+ 0.1878415048 0.1878415048 0.1262644976
+ 0.1904177964 0.1904177964 0.1283268929
+ 0.1929835975 0.1929835975 0.1303768009
+ 0.1955551058 0.1955551058 0.1324191988
+ 0.1980939955 0.1980939955 0.1344535947
+ 0.2005960941 0.2005960941 0.1364852041
+ 0.2030780017 0.2030780017 0.1385065019
+ 0.2055498958 0.2055498958 0.1404985934
+ 0.2080249041 0.2080249041 0.1424852014
+ 0.2104936987 0.2104936987 0.1444734931
+ 0.2129532993 0.2129532993 0.1464570016
+ 0.2153917998 0.2153917998 0.1484331042
+ 0.2178138942 0.2178138942 0.1504009962
+ 0.2202032059 0.2202032059 0.1523738950
+ 0.2225545049 0.2225545049 0.1543436050
+ 0.2248750031 0.2248750031 0.1563021988
+ 0.2271793038 0.2271793038 0.1582521945
+ 0.2294784039 0.2294784039 0.1601931006
+ 0.2317692935 0.2317692935 0.1621181965
+ 0.2340328991 0.2340328991 0.1640346050
+ 0.2362951934 0.2362951934 0.1659477949
+ 0.2385396957 0.2385396957 0.1678593010
+ 0.2407682985 0.2407682985 0.1697596014
+ 0.2429841012 0.2429841012 0.1716434956
+ 0.2451926023 0.2451926023 0.1735229045
+ 0.2473980039 0.2473980039 0.1754001975
+ 0.2495967001 0.2495967001 0.1772678047
+ 0.2518011928 0.2518011928 0.1791307926
+ 0.2540042996 0.2540042996 0.1809882969
+ 0.2561990917 0.2561990917 0.1828391999
+ 0.2583766878 0.2583766878 0.1846980006
+ 0.2605302930 0.2605302930 0.1865592003
+ 0.2626619041 0.2626619041 0.1884168983
+ 0.2647795081 0.2647795081 0.1902665943
+ 0.2668896914 0.2668896914 0.1921050996
+ 0.2689956129 0.2689956129 0.1939377934
+ 0.2710914016 0.2710914016 0.1957681030
+ 0.2731707096 0.2731707096 0.1975923926
+ 0.2752295136 0.2752295136 0.1994120032
+ 0.2772876024 0.2772876024 0.2012308985
+ 0.2793470919 0.2793470919 0.2030453980
+ 0.2813898921 0.2813898921 0.2048553973
+ 0.2834160924 0.2834160924 0.2066580951
+ 0.2854352891 0.2854352891 0.2084507048
+ 0.2874428928 0.2874428928 0.2102348953
+ 0.2894397080 0.2894397080 0.2120144963
+ 0.2914342880 0.2914342880 0.2137901038
+ 0.2934266925 0.2934266925 0.2155577987
+ 0.2954250872 0.2954250872 0.2173161060
+ 0.2974228859 0.2974228859 0.2190670073
+ 0.2994059920 0.2994059920 0.2208126932
+ 0.3013804853 0.3013804853 0.2225555927
+ 0.3033458889 0.3033458889 0.2242987007
+ 0.3052974939 0.3052974939 0.2260434926
+ 0.3072321117 0.3072321117 0.2277884930
+ 0.3091601133 0.3091601133 0.2295302004
+ 0.3110798895 0.3110798895 0.2312685996
+ 0.3129976094 0.3129976094 0.2329937071
+ 0.3149156868 0.3149156868 0.2347085029
+ 0.3168309927 0.3168309927 0.2364155948
+ 0.3187418878 0.3187418878 0.2381125987
+ 0.3206557930 0.3206557930 0.2397992015
+ 0.3225586116 0.3225586116 0.2414820939
+ 0.3244569898 0.3244569898 0.2431667000
+ 0.3263500929 0.3263500929 0.2448462993
+ 0.3282350898 0.3282350898 0.2465201020
+ 0.3301092982 0.3301092982 0.2481863946
+ 0.3319670856 0.3319670856 0.2498456985
+ 0.3338209093 0.3338209093 0.2515039146
+ 0.3356688023 0.3356688023 0.2531544864
+ 0.3375090063 0.3375090063 0.2548001111
+ 0.3393396139 0.3393396139 0.2564423978
+ 0.3411692083 0.3411692083 0.2580820024
+ 0.3429956138 0.3429956138 0.2597126067
+ 0.3448179960 0.3448179960 0.2613438070
+ 0.3466367126 0.3466367126 0.2629727125
+ 0.3484556079 0.3484556079 0.2645977139
+ 0.3502711058 0.3502711058 0.2662194967
+ 0.3520781100 0.3520781100 0.2678410113
+ 0.3538728952 0.3538728952 0.2694599032
+ 0.3556573093 0.3556573093 0.2710745037
+ 0.3574326932 0.3574326932 0.2726924121
+ 0.3591986001 0.3591986001 0.2743096948
+ 0.3609502912 0.3609502912 0.2759279013
+ 0.3626965880 0.3626965880 0.2775534987
+ 0.3644376099 0.3644376099 0.2791810930
+ 0.3661716878 0.3661716878 0.2808074951
+ 0.3679068089 0.3679068089 0.2824282944
+ 0.3696404099 0.3696404099 0.2840456963
+ 0.3713721931 0.3713721931 0.2856619060
+ 0.3730970919 0.3730970919 0.2872773111
+ 0.3748179972 0.3748179972 0.2888830006
+ 0.3765349090 0.3765349090 0.2904838920
+ 0.3782503903 0.3782503903 0.2920790017
+ 0.3799589872 0.3799589872 0.2936722934
+ 0.3816598058 0.3816598058 0.2952640057
+ 0.3833526969 0.3833526969 0.2968522906
+ 0.3850415051 0.3850415051 0.2984321117
+ 0.3867242932 0.3867242932 0.3000073135
+ 0.3883965015 0.3883965015 0.3015750051
+ 0.3900654912 0.3900654912 0.3031345010
+ 0.3917332888 0.3917332888 0.3046869040
+ 0.3933978081 0.3933978081 0.3062342107
+ 0.3950597942 0.3950597942 0.3077783883
+ 0.3967128098 0.3967128098 0.3093160987
+ 0.3983623087 0.3983623087 0.3108538985
+ 0.4000048041 0.4000048041 0.3123919070
+ 0.4016445875 0.4016445875 0.3139241934
+ 0.4032827914 0.4032827914 0.3154524863
+ 0.4049166143 0.4049166143 0.3169719875
+ 0.4065478146 0.4065478146 0.3184897006
+ 0.4081723094 0.4081723094 0.3200064003
+ 0.4097915888 0.4097915888 0.3215180039
+ 0.4114066064 0.4114066064 0.3230280876
+ 0.4130186141 0.4130186141 0.3245337009
+ 0.4146288931 0.4146288931 0.3260375857
+ 0.4162240028 0.4162240028 0.3275386989
+ 0.4178164005 0.4178164005 0.3290353119
+ 0.4194015861 0.4194015861 0.3305288851
+ 0.4209814072 0.4209814072 0.3320241868
+ 0.4225557148 0.4225557148 0.3335199058
+ 0.4241304100 0.4241304100 0.3350135982
+ 0.4257053137 0.4257053137 0.3365071118
+ 0.4272772074 0.4272772074 0.3379994035
+ 0.4288483858 0.4288483858 0.3394888043
+ 0.4304055870 0.4304055870 0.3409718871
+ 0.4319624007 0.4319624007 0.3424525857
+ 0.4335188866 0.4335188866 0.3439300954
+ 0.4350732863 0.4350732863 0.3454062939
+ 0.4366205037 0.4366205037 0.3468815088
+ 0.4381664991 0.4381664991 0.3483560085
+ 0.4397099912 0.4397099912 0.3498300910
+ 0.4412516952 0.4412516952 0.3513006866
+ 0.4427905977 0.4427905977 0.3527697921
+ 0.4443261921 0.4443261921 0.3542422950
+ 0.4458572865 0.4458572865 0.3557159901
+ 0.4473834038 0.4473834038 0.3571884036
+ 0.4489029944 0.4489029944 0.3586604893
+ 0.4504176080 0.4504176080 0.3601266146
+ 0.4519256949 0.4519256949 0.3615907133
+ 0.4534310102 0.4534310102 0.3630562127
+ 0.4549323916 0.4549323916 0.3645220101
+ 0.4564324915 0.4564324915 0.3659847081
+ 0.4579305947 0.4579305947 0.3674460053
+ 0.4594289064 0.4594289064 0.3689005077
+ 0.4609279037 0.4609279037 0.3703509867
+ 0.4624246955 0.4624246955 0.3718009889
+ 0.4639141858 0.4639141858 0.3732503951
+ 0.4654031098 0.4654031098 0.3746976852
+ 0.4668875039 0.4668875039 0.3761422932
+ 0.4683718085 0.4683718085 0.3775857091
+ 0.4698401988 0.4698401988 0.3790262043
+ 0.4713082910 0.4713082910 0.3804647923
+ 0.4727697968 0.4727697968 0.3818928897
+ 0.4742299914 0.4742299914 0.3833209872
+ 0.4756909013 0.4756909013 0.3847407997
+ 0.4771521986 0.4771521986 0.3861603141
+ 0.4786089063 0.4786089063 0.3875763118
+ 0.4800598919 0.4800598919 0.3889910877
+ 0.4815098047 0.4815098047 0.3904035985
+ 0.4829556048 0.4829556048 0.3918142915
+ 0.4844014049 0.4844014049 0.3932228088
+ 0.4858314991 0.4858314991 0.3946261108
+ 0.4872612059 0.4872612059 0.3960292935
+ 0.4886828065 0.4886828065 0.3974260986
+ 0.4901008904 0.4901008904 0.3988228142
+ 0.4915114045 0.4915114045 0.4002167881
+ 0.4929108918 0.4929108918 0.4016098976
+ 0.4943102002 0.4943102002 0.4030028880
+ 0.4957073927 0.4957073927 0.4043959975
+ 0.4971045852 0.4971045852 0.4057886899
+ 0.4984934032 0.4984934032 0.4071742892
+ 0.4998792112 0.4998792112 0.4085598886
+ 0.5012617707 0.5012617707 0.4099406004
+ 0.5026388168 0.5026388168 0.4113186896
+ 0.5040158033 0.5040158033 0.4126941860
+ 0.5053874850 0.5053874850 0.4140625894
+ 0.5067589283 0.5067589283 0.4154309928
+ 0.5081269145 0.5081269145 0.4167915881
+ 0.5094919205 0.5094919205 0.4181506932
+ 0.5108559132 0.5108559132 0.4195038080
+ 0.5122082829 0.5122082829 0.4208473861
+ 0.5135607719 0.5135607719 0.4221909940
+ 0.5149065852 0.5149065852 0.4235303998
+ 0.5162479877 0.5162479877 0.4248695076
+ 0.5175889134 0.5175889134 0.4262058139
+ 0.5189247727 0.5189247727 0.4275380969
+ 0.5202606916 0.5202606916 0.4288704097
+ 0.5215886235 0.5215886235 0.4302046895
+ 0.5229104161 0.5229104161 0.4315393865
+ 0.5242322087 0.5242322087 0.4328733981
+ 0.5255554914 0.5255554914 0.4342060983
+ 0.5268787742 0.5268787742 0.4355388880
+ 0.5281956792 0.5281956792 0.4368667901
+ 0.5295035243 0.5295035243 0.4381929040
+ 0.5308111906 0.5308111906 0.4395191073
+ 0.5321189761 0.5321189761 0.4408474863
+ 0.5334268212 0.5334268212 0.4421758950
+ 0.5347332954 0.5347332954 0.4435034096
+ 0.5360326171 0.5360326171 0.4448300004
+ 0.5373319983 0.5373319983 0.4461565018
+ 0.5386298895 0.5386298895 0.4474779069
+ 0.5399259925 0.5399259925 0.4487977922
+ 0.5412220955 0.5412220955 0.4501172900
+ 0.5425089002 0.5425089002 0.4514313042
+ 0.5437930822 0.5437930822 0.4527452886
+ 0.5450770259 0.5450770259 0.4540582001
+ 0.5463545918 0.5463545918 0.4553689063
+ 0.5476322174 0.5476322174 0.4566796124
+ 0.5489053726 0.5489053726 0.4579856992
+ 0.5501675010 0.5501675010 0.4592883885
+ 0.5514295101 0.5514295101 0.4605911970
+ 0.5526881218 0.5526881218 0.4618827999
+ 0.5539432168 0.5539432168 0.4631715119
+ 0.5551983714 0.5551983714 0.4644601941
+ 0.5564481020 0.5564481020 0.4657382965
+ 0.5576952100 0.5576952100 0.4670161009
+ 0.5589423180 0.5589423180 0.4682930112
+ 0.5601819158 0.5601819158 0.4695635140
+ 0.5614199042 0.5614199042 0.4708338976
+ 0.5626578927 0.5626578927 0.4721035063
+ 0.5638862252 0.5638862252 0.4733701050
+ 0.5651137829 0.5651137829 0.4746366143
+ 0.5663412213 0.5663412213 0.4759002030
+ 0.5675578117 0.5675578117 0.4771572948
+ 0.5687745214 0.5687745214 0.4784145057
+ 0.5699902177 0.5699902177 0.4796695113
+ 0.5711944103 0.5711944103 0.4809209108
+ 0.5723987222 0.5723987222 0.4821723998
+ 0.5736017227 0.5736017227 0.4834229946
+ 0.5747933984 0.5747933984 0.4846724868
+ 0.5759850144 0.5759850144 0.4859218895
+ 0.5771753788 0.5771753788 0.4871684015
+ 0.5783529878 0.5783529878 0.4884099960
+ 0.5795305967 0.5795305967 0.4896515906
+ 0.5807074904 0.5807074904 0.4908894002
+ 0.5818707943 0.5818707943 0.4921191931
+ 0.5830342174 0.5830342174 0.4933489859
+ 0.5841975808 0.5841975808 0.4945765138
+ 0.5853506923 0.5853506923 0.4957973957
+ 0.5865036249 0.5865036249 0.4970183074
+ 0.5876564980 0.5876564980 0.4982382059
+ 0.5888124108 0.5888124108 0.4994524121
+ 0.5899686813 0.5899686813 0.5006666183
+ 0.5911250710 0.5911250710 0.5018808246
+ 0.5922722220 0.5922722220 0.5030846000
+ 0.5934156775 0.5934156775 0.5042884946
+ 0.5945591927 0.5945591927 0.5054923296
+ 0.5956988931 0.5956988931 0.5066840053
+ 0.5968354940 0.5968354940 0.5078731179
+ 0.5979719758 0.5979719758 0.5090621710
+ 0.5991039276 0.5991039276 0.5102484822
+ 0.6002264023 0.6002264023 0.5114330053
+ 0.6013488770 0.6013488770 0.5126175284
+ 0.6024705768 0.6024705768 0.5138002038
+ 0.6035845876 0.6035845876 0.5149796009
+ 0.6046985984 0.6046985984 0.5161591172
+ 0.6058124900 0.6058124900 0.5173382759
+ 0.6069167256 0.6069167256 0.5185145736
+ 0.6080183983 0.6080183983 0.5196908116
+ 0.6091201901 0.6091201901 0.5208671093
+ 0.6102225184 0.6102225184 0.5220367908
+ 0.6113256216 0.6113256216 0.5232045054
+ 0.6124286056 0.6124286056 0.5243722200
+ 0.6135300994 0.6135300994 0.5255355239
+ 0.6146209836 0.6146209836 0.5266925097
+ 0.6157119274 0.6157119274 0.5278496146
+ 0.6168028712 0.6168028712 0.5290066004
+ 0.6178948283 0.6178948283 0.5301629901
+ 0.6189870238 0.6189870238 0.5313194990
+ 0.6200792193 0.6200792193 0.5324760079
+ 0.6211677194 0.6211677194 0.5336307287
+ 0.6222478747 0.6222478747 0.5347841978
+ 0.6233282089 0.6233282089 0.5359376073
+ 0.6244084239 0.6244084239 0.5370901227
+ 0.6254897118 0.6254897118 0.5382356048
+ 0.6265712976 0.6265712976 0.5393812060
+ 0.6276528239 0.6276528239 0.5405266881
+ 0.6287301183 0.6287301183 0.5416650176
+ 0.6297997832 0.6297997832 0.5427989960
+ 0.6308693886 0.6308693886 0.5439329147
+ 0.6319391131 0.6319391131 0.5450661778
+ 0.6330032945 0.6330032945 0.5461930037
+ 0.6340664029 0.6340664029 0.5473198295
+ 0.6351293921 0.6351293921 0.5484464765
+ 0.6361892819 0.6361892819 0.5495709777
+ 0.6372389197 0.6372389197 0.5506932139
+ 0.6382886171 0.6382886171 0.5518153906
+ 0.6393381953 0.6393381953 0.5529376864
+ 0.6403782964 0.6403782964 0.5540469885
+ 0.6414123774 0.6414123774 0.5551546812
+ 0.6424465179 0.6424465179 0.5562624931
+ 0.6434807181 0.6434807181 0.5573676229
+ 0.6445010900 0.6445010900 0.5584642291
+ 0.6455209851 0.6455209851 0.5595607758
+ 0.6465408802 0.6465408802 0.5606573820
+ 0.6475573182 0.6475573182 0.5617504716
+ 0.6485638022 0.6485638022 0.5628405809
+ 0.6495704055 0.6495704055 0.5639305711
+ 0.6505770087 0.6505770087 0.5650206804
+ 0.6515771747 0.6515771747 0.5661026239
+ 0.6525719166 0.6525719166 0.5671824217
+ 0.6535665989 0.6535665989 0.5682622194
+ 0.6545614004 0.6545614004 0.5693418980
+ 0.6555476785 0.6555476785 0.5704169869
+ 0.6565313935 0.6565313935 0.5714920163
+ 0.6575151086 0.6575151086 0.5725671053
+ 0.6584988236 0.6584988236 0.5736408830
+ 0.6594734192 0.6594734192 0.5747092962
+ 0.6604474783 0.6604474783 0.5757777095
+ 0.6614215970 0.6614215970 0.5768461227
+ 0.6623948812 0.6623948812 0.5779128075
+ 0.6633601785 0.6633601785 0.5789762139
+ 0.6643254757 0.6643254757 0.5800395012
+ 0.6652907133 0.6652907133 0.5811027884
+ 0.6662545800 0.6662545800 0.5821601152
+ 0.6672123075 0.6672123075 0.5832095742
+ 0.6681699157 0.6681699157 0.5842590928
+ 0.6691275835 0.6691275835 0.5853086114
+ 0.6700835824 0.6700835824 0.5863516927
+ 0.6710343957 0.6710343957 0.5873885155
+ 0.6719852090 0.6719852090 0.5884252787
+ 0.6729360223 0.6729360223 0.5894619823
+ 0.6738809943 0.6738809943 0.5904929042
+ 0.6748093963 0.6748093963 0.5915179849
+ 0.6757377982 0.6757377982 0.5925431252
+ 0.6766662002 0.6766662002 0.5935683250
+ 0.6775926948 0.6775926948 0.5945895910
+ 0.6785131097 0.6785131097 0.5956068039
+ 0.6794335842 0.6794335842 0.5966240168
+ 0.6803539991 0.6803539991 0.5976412296
+ 0.6812713742 0.6812713742 0.5986567140
+ 0.6821733713 0.6821733713 0.5996695757
+ 0.6830754280 0.6830754280 0.6006824970
+ 0.6839774251 0.6839774251 0.6016954780
+ 0.6848791242 0.6848791242 0.6027052999
+ 0.6857768893 0.6857768893 0.6037077904
+ 0.6866745949 0.6866745949 0.6047102213
+ 0.6875724196 0.6875724196 0.6057127118
+ 0.6884701252 0.6884701252 0.6067149043
+ 0.6893548965 0.6893548965 0.6077160239
+ 0.6902378798 0.6902378798 0.6087170243
+ 0.6911209822 0.6911209822 0.6097180247
+ 0.6920040250 0.6920040250 0.6107190251
+ 0.6928865910 0.6928865910 0.6117115021
+ 0.6937689781 0.6937689781 0.6127033234
+ 0.6946514249 0.6946514249 0.6136950850
+ 0.6955338120 0.6955338120 0.6146869063
+ 0.6964113712 0.6964113712 0.6156741977
+ 0.6972827911 0.6972827911 0.6166592240
+ 0.6981540918 0.6981540918 0.6176441908
+ 0.6990255117 0.6990255117 0.6186292171
+ 0.6998962164 0.6998962164 0.6196087003
+ 0.7007628083 0.7007628083 0.6205787063
+ 0.7016295195 0.7016295195 0.6215487123
+ 0.7024961114 0.7024961114 0.6225187182
+ 0.7033627033 0.7033627033 0.6234884858
+ 0.7042225003 0.7042225003 0.6244485974
+ 0.7050803900 0.7050803900 0.6254087090
+ 0.7059382796 0.7059382796 0.6263688207
+ 0.7067962885 0.7067962885 0.6273288727
+ 0.7076508999 0.7076508999 0.6282864809
+ 0.7085005045 0.7085005045 0.6292427778
+ 0.7093501091 0.7093501091 0.6301990747
+ 0.7101997137 0.7101997137 0.6311553717
+ 0.7110493183 0.7110493183 0.6321104765
+ 0.7118933797 0.7118933797 0.6330611706
+ 0.7127372026 0.7127372026 0.6340118051
+ 0.7135810852 0.7135810852 0.6349623799
+ 0.7144250274 0.7144250274 0.6359130740
+ 0.7152673006 0.7152673006 0.6368628144
+ 0.7161080241 0.7161080241 0.6378120780
+ 0.7169486880 0.7169486880 0.6387614012
+ 0.7177892923 0.7177892923 0.6397107244
+ 0.7186300159 0.7186300159 0.6406584978
+ 0.7194681168 0.7194681168 0.6415982842
+ 0.7203060985 0.7203060985 0.6425381899
+ 0.7211440802 0.7211440802 0.6434779763
+ 0.7219821215 0.7219821215 0.6444178820
+ 0.7228178978 0.7228178978 0.6453549862
+ 0.7236496806 0.7236496806 0.6462903023
+ 0.7244815826 0.7244815826 0.6472254992
+ 0.7253134847 0.7253134847 0.6481606960
+ 0.7261453271 0.7261453271 0.6490960121
+ 0.7269656062 0.7269656062 0.6500247121
+ 0.7277814746 0.7277814746 0.6509529948
+ 0.7285972834 0.7285972834 0.6518813968
+ 0.7294130921 0.7294130921 0.6528097987
+ 0.7302284837 0.7302284837 0.6537358165
+ 0.7310312986 0.7310312986 0.6546552181
+ 0.7318341136 0.7318341136 0.6555745006
+ 0.7326369286 0.7326369286 0.6564939022
+ 0.7334398031 0.7334398031 0.6574133039
+ 0.7342393994 0.7342393994 0.6583278179
+ 0.7350317240 0.7350317240 0.6592379212
+ 0.7358239889 0.7358239889 0.6601479053
+ 0.7366163135 0.7366163135 0.6610580087
+ 0.7374085188 0.7374085188 0.6619681120
+ 0.7381967902 0.7381967902 0.6628733873
+ 0.7389813066 0.7389813066 0.6637769938
+ 0.7397658229 0.7397658229 0.6646806002
+ 0.7405503988 0.7405503988 0.6655843258
+ 0.7413349152 0.7413349152 0.6664878726
+ 0.7421157956 0.7421157956 0.6673874855
+ 0.7428950071 0.7428950071 0.6682866216
+ 0.7436742187 0.7436742187 0.6691858172
+ 0.7444533706 0.7444533706 0.6700848937
+ 0.7452325821 0.7452325821 0.6709840894
+ 0.7460039258 0.7460039258 0.6718817949
+ 0.7467731833 0.7467731833 0.6727795005
+ 0.7475423813 0.7475423813 0.6736772060
+ 0.7483115792 0.7483115792 0.6745749712
+ 0.7490807772 0.7490807772 0.6754717827
+ 0.7498486042 0.7498486042 0.6763551831
+ 0.7506161928 0.7506161928 0.6772385240
+ 0.7513837814 0.7513837814 0.6781218052
+ 0.7521514297 0.7521514297 0.6790052056
+ 0.7529190183 0.7529190183 0.6798881292
+ 0.7536765933 0.7536765933 0.6807652712
+ 0.7544323802 0.7544323802 0.6816424131
+ 0.7551882863 0.7551882863 0.6825196147
+ 0.7559440732 0.7559440732 0.6833966970
+ 0.7566999793 0.7566999793 0.6842737198
+ 0.7574527860 0.7574527860 0.6851336956
+ 0.7582048178 0.7582048178 0.6859937906
+ 0.7589567900 0.7589567900 0.6868538260
+ 0.7597088218 0.7597088218 0.6877138019
+ 0.7604607940 0.7604607940 0.6885737777
+ 0.7612053156 0.7612053156 0.6894273758
+ 0.7619463801 0.7619463801 0.6902801991
+ 0.7626876235 0.7626876235 0.6911330819
+ 0.7634288073 0.7634288073 0.6919859052
+ 0.7641698718 0.7641698718 0.6928387284
+ 0.7649000883 0.7649000883 0.6936817169
+ 0.7656204104 0.7656204104 0.6945211887
+ 0.7663406134 0.7663406134 0.6953607202
+ 0.7670608759 0.7670608759 0.6962001920
+ 0.7677811980 0.7677811980 0.6970396042
+ 0.7684996128 0.7684996128 0.6978752017
+ 0.7692136168 0.7692136168 0.6987071037
+ 0.7699276209 0.7699276209 0.6995388865
+ 0.7706416249 0.7706416249 0.7003707886
+ 0.7713556290 0.7713556290 0.7012026906
+ 0.7720690966 0.7720690966 0.7020341158
+ 0.7727692723 0.7727692723 0.7028638721
+ 0.7734695077 0.7734695077 0.7036936879
+ 0.7741696835 0.7741696835 0.7045235038
+ 0.7748699188 0.7748699188 0.7053533792
+ 0.7755700946 0.7755700946 0.7061831951
+ 0.7762656212 0.7762656212 0.7070057988
+ 0.7769591808 0.7769591808 0.7078278065
+ 0.7776529193 0.7776529193 0.7086496949
+ 0.7783464789 0.7783464789 0.7094715834
+ 0.7790400982 0.7790400982 0.7102934718
+ 0.7797309756 0.7797309756 0.7111132741
+ 0.7804160714 0.7804160714 0.7119309902
+ 0.7811012268 0.7811012268 0.7127488256
+ 0.7817863226 0.7817863226 0.7135666013
+ 0.7824714184 0.7824714184 0.7143843174
+ 0.7831565142 0.7831565142 0.7152014971
+ 0.7838354707 0.7838354707 0.7160099149
+ 0.7845135927 0.7845135927 0.7168182135
+ 0.7851915956 0.7851915956 0.7176265717
+ 0.7858697176 0.7858697176 0.7184348702
+ 0.7865477800 0.7865477800 0.7192432880
+ 0.7872189879 0.7872189879 0.7200449109
+ 0.7878777981 0.7878777981 0.7208411098
+ 0.7885367274 0.7885367274 0.7216373086
+ 0.7891955972 0.7891955972 0.7224333882
+ 0.7898544073 0.7898544073 0.7232295871
+ 0.7905132771 0.7905132771 0.7240257859
+ 0.7911655903 0.7911655903 0.7248097062
+ 0.7918161750 0.7918161750 0.7255933881
+ 0.7924668193 0.7924668193 0.7263771296
+ 0.7931174040 0.7931174040 0.7271608114
+ 0.7937679887 0.7937679887 0.7279444933
+ 0.7944167256 0.7944167256 0.7287240028
+ 0.7950556278 0.7950556278 0.7294961214
+ 0.7956945896 0.7956945896 0.7302681208
+ 0.7963336110 0.7963336110 0.7310401797
+ 0.7969725728 0.7969725728 0.7318121791
+ 0.7976115942 0.7976115942 0.7325842977
+ 0.7982401848 0.7982401848 0.7333511114
+ 0.7988576889 0.7988576889 0.7341153026
+ 0.7994753122 0.7994753122 0.7348794937
+ 0.8000928164 0.8000928164 0.7356436849
+ 0.8007103205 0.8007103205 0.7364078760
+ 0.8013278246 0.8013278246 0.7371721268
+ 0.8019409180 0.8019409180 0.7379267216
+ 0.8025524020 0.8025524020 0.7386804819
+ 0.8031638861 0.8031638861 0.7394343019
+ 0.8037754297 0.8037754297 0.7401881218
+ 0.8043869138 0.8043869138 0.7409418225
+ 0.8049983978 0.8049983978 0.7416955233
+ 0.8055992126 0.8055992126 0.7424479723
+ 0.8061988950 0.8061988950 0.7432004809
+ 0.8067986965 0.8067986965 0.7439529896
+ 0.8073984981 0.8073984981 0.7447054982
+ 0.8079982996 0.8079982996 0.7454580069
+ 0.8085979223 0.8085979223 0.7462081909
+ 0.8091943860 0.8091943860 0.7469503880
+ 0.8097909093 0.8097909093 0.7476925850
+ 0.8103873134 0.8103873134 0.7484347820
+ 0.8109837770 0.8109837770 0.7491769791
+ 0.8115803003 0.8115803003 0.7499191761
+ 0.8121759295 0.8121759295 0.7506610751
+ 0.8127642274 0.8127642274 0.7514020801
+ 0.8133525252 0.8133525252 0.7521430850
+ 0.8139408231 0.8139408231 0.7528840899
+ 0.8145290017 0.8145290017 0.7536250949
+ 0.8151172996 0.8151172996 0.7543660998
+ 0.8157039881 0.8157039881 0.7551041842
+ 0.8162763119 0.8162763119 0.7558351159
+ 0.8168486953 0.8168486953 0.7565659285
+ 0.8174210787 0.8174210787 0.7572966814
+ 0.8179934025 0.8179934025 0.7580274940
+ 0.8185657859 0.8185657859 0.7587584257
+ 0.8191381097 0.8191381097 0.7594878078
+ 0.8197093010 0.8197093010 0.7602121234
+ 0.8202804923 0.8202804923 0.7609363794
+ 0.8208516836 0.8208516836 0.7616605759
+ 0.8214228749 0.8214228749 0.7623848915
+ 0.8219941258 0.8219941258 0.7631092072
+ 0.8225653172 0.8225653172 0.7638326287
+ 0.8231304884 0.8231304884 0.7645456791
+ 0.8236950040 0.8236950040 0.7652587891
+ 0.8242594004 0.8242594004 0.7659717798
+ 0.8248239160 0.8248239160 0.7666848898
+ 0.8253883719 0.8253883719 0.7673979998
+ 0.8259528875 0.8259528875 0.7681111097
+ 0.8265138268 0.8265138268 0.7688196898
+ 0.8270732164 0.8270732164 0.7695276737
+ 0.8276326060 0.8276326060 0.7702357173
+ 0.8281919956 0.8281919956 0.7709437013
+ 0.8287513852 0.8287513852 0.7716516852
+ 0.8293107748 0.8293107748 0.7723596096
+ 0.8298665881 0.8298665881 0.7730653286
+ 0.8304176927 0.8304176927 0.7737694979
+ 0.8309687972 0.8309687972 0.7744737267
+ 0.8315199018 0.8315199018 0.7751778960
+ 0.8320710063 0.8320710063 0.7758821249
+ 0.8326221108 0.8326221108 0.7765862942
+ 0.8331729174 0.8331729174 0.7772877216
+ 0.8337209225 0.8337209225 0.7779809833
+ 0.8342689276 0.8342689276 0.7786744237
+ 0.8348168135 0.8348168135 0.7793678045
+ 0.8353648186 0.8353648186 0.7800611854
+ 0.8359127045 0.8359127045 0.7807545066
+ 0.8364607096 0.8364607096 0.7814478874
+ 0.8370041251 0.8370041251 0.7821326256
+ 0.8375453949 0.8375453949 0.7828158140
+ 0.8380867243 0.8380867243 0.7834990025
+ 0.8386281133 0.8386281133 0.7841823101
+ 0.8391693830 0.8391693830 0.7848654985
+ 0.8397107124 0.8397107124 0.7855486870
+ 0.8402513862 0.8402513862 0.7862282991
+ 0.8407893777 0.8407893777 0.7869021297
+ 0.8413274288 0.8413274288 0.7875759006
+ 0.8418654799 0.8418654799 0.7882496119
+ 0.8424034715 0.8424034715 0.7889233828
+ 0.8429415226 0.8429415226 0.7895972133
+ 0.8434795737 0.8434795737 0.7902709246
+ 0.8440154791 0.8440154791 0.7909373045
+ 0.8445503712 0.8445503712 0.7916023135
+ 0.8450853229 0.8450853229 0.7922673225
+ 0.8456202149 0.8456202149 0.7929322124
+ 0.8461551070 0.8461551070 0.7935972214
+ 0.8466899991 0.8466899991 0.7942621112
+ 0.8472244143 0.8472244143 0.7949252725
+ 0.8477507234 0.8477507234 0.7955821753
+ 0.8482769728 0.8482769728 0.7962390184
+ 0.8488032818 0.8488032818 0.7968958020
+ 0.8493295908 0.8493295908 0.7975527048
+ 0.8498557806 0.8498557806 0.7982094884
+ 0.8503820896 0.8503820896 0.7988663912
+ 0.8509023786 0.8509023786 0.7995193005
+ 0.8514125943 0.8514125943 0.8001686931
+ 0.8519228101 0.8519228101 0.8008180857
+ 0.8524330258 0.8524330258 0.8014674783
+ 0.8529431224 0.8529431224 0.8021169901
+ 0.8534532785 0.8534532785 0.8027663827
+ 0.8539634943 0.8539634943 0.8034157753
+ 0.8544731736 0.8544731736 0.8040614128
+ 0.8549826145 0.8549826145 0.8047059178
+ 0.8554919958 0.8554919958 0.8053503036
+ 0.8560013175 0.8560013175 0.8059946895
+ 0.8565106988 0.8565106988 0.8066391945
+ 0.8570200801 0.8570200801 0.8072835803
+ 0.8575295210 0.8575295210 0.8079280257
+ 0.8580337167 0.8580337167 0.8085677028
+ 0.8585366011 0.8585366011 0.8092070818
+ 0.8590394258 0.8590394258 0.8098465204
+ 0.8595423102 0.8595423102 0.8104857802
+ 0.8600450754 0.8600450754 0.8111252189
+ 0.8605480194 0.8605480194 0.8117644787
+ 0.8610509038 0.8610509038 0.8124037981
+ 0.8615514040 0.8615514040 0.8130391240
+ 0.8620514870 0.8620514870 0.8136743903
+ 0.8625516891 0.8625516891 0.8143097162
+ 0.8630518913 0.8630518913 0.8149451017
+ 0.8635520935 0.8635520935 0.8155804276
+ 0.8640522957 0.8640522957 0.8162156940
+ 0.8645523787 0.8645523787 0.8168507218
+ 0.8650534749 0.8650534749 0.8174775243
+ 0.8655548096 0.8655548096 0.8181043863
+ 0.8660560250 0.8660560250 0.8187311888
+ 0.8665571809 0.8665571809 0.8193581104
+ 0.8670583963 0.8670583963 0.8199849129
+ 0.8675596714 0.8675596714 0.8206117749
+ 0.8680608869 0.8680608869 0.8212385774
+ 0.8685551882 0.8685551882 0.8218612075
+ 0.8690482974 0.8690482974 0.8224837184
+ 0.8695412874 0.8695412874 0.8231062293
+ 0.8700343966 0.8700343966 0.8237286210
+ 0.8705273867 0.8705273867 0.8243510723
+ 0.8710203767 0.8710203767 0.8249735832
+ 0.8715134859 0.8715134859 0.8255960941
+ 0.8719956875 0.8719956875 0.8262088895
+ 0.8724732995 0.8724732995 0.8268200159
+ 0.8729509711 0.8729509711 0.8274310827
+ 0.8734285831 0.8734285831 0.8280420899
+ 0.8739063144 0.8739063144 0.8286532164
+ 0.8743839264 0.8743839264 0.8292642832
+ 0.8748615980 0.8748615980 0.8298754096
+ 0.8753389120 0.8753389120 0.8304854035
+ 0.8758158088 0.8758158088 0.8310946822
+ 0.8762927055 0.8762927055 0.8317040801
+ 0.8767696023 0.8767696023 0.8323134780
+ 0.8772464991 0.8772464991 0.8329228163
+ 0.8777233958 0.8777233958 0.8335322142
+ 0.8782002926 0.8782002926 0.8341416121
+ 0.8786755800 0.8786755800 0.8347480297
+ 0.8791444898 0.8791444898 0.8353486061
+ 0.8796133995 0.8796133995 0.8359493017
+ 0.8800823092 0.8800823092 0.8365498781
+ 0.8805512190 0.8805512190 0.8371505737
+ 0.8810201287 0.8810201287 0.8377512097
+ 0.8814889789 0.8814889789 0.8383519053
+ 0.8819578886 0.8819578886 0.8389524817
+ 0.8824142218 0.8824142218 0.8395484090
+ 0.8828679919 0.8828679919 0.8401440978
+ 0.8833217025 0.8833217025 0.8407397866
+ 0.8837754726 0.8837754726 0.8413354158
+ 0.8842293024 0.8842293024 0.8419311047
+ 0.8846830726 0.8846830726 0.8425267935
+ 0.8851369023 0.8851369023 0.8431224823
+ 0.8855882287 0.8855882287 0.8437144756
+ 0.8860356212 0.8860356212 0.8443030119
+ 0.8864830136 0.8864830136 0.8448914886
+ 0.8869304061 0.8869304061 0.8454800844
+ 0.8873776793 0.8873776793 0.8460686207
+ 0.8878250718 0.8878250718 0.8466570973
+ 0.8882725239 0.8882725239 0.8472455740
+ 0.8887199163 0.8887199163 0.8478341103
+ 0.8891612291 0.8891612291 0.8484159112
+ 0.8896014094 0.8896014094 0.8489974737
+ 0.8900417089 0.8900417089 0.8495792150
+ 0.8904820085 0.8904820085 0.8501607776
+ 0.8909221888 0.8909221888 0.8507425189
+ 0.8913624883 0.8913624883 0.8513240814
+ 0.8918027282 0.8918027282 0.8519057035
+ 0.8922411799 0.8922411799 0.8524854779
+ 0.8926743269 0.8926743269 0.8530620933
+ 0.8931074142 0.8931074142 0.8536388278
+ 0.8935403824 0.8935403824 0.8542153835
+ 0.8939735293 0.8939735293 0.8547919989
+ 0.8944066167 0.8944066167 0.8553686142
+ 0.8948397040 0.8948397040 0.8559452891
+ 0.8952727914 0.8952727914 0.8565219045
+ 0.8957030177 0.8957030177 0.8570963740
+ 0.8961309195 0.8961309195 0.8576697707
+ 0.8965588212 0.8965588212 0.8582432866
+ 0.8969867229 0.8969867229 0.8588168025
+ 0.8974146843 0.8974146843 0.8593901992
+ 0.8978425860 0.8978425860 0.8599637151
+ 0.8982704878 0.8982704878 0.8605371714
+ 0.8986983895 0.8986983895 0.8611106873
+ 0.8991193175 0.8991193175 0.8616771102
+ 0.8995382190 0.8995382190 0.8622428179
+ 0.8999571204 0.8999571204 0.8628084064
+ 0.9003760219 0.9003760219 0.8633741140
+ 0.9007949233 0.9007949233 0.8639398217
+ 0.9012138247 0.9012138247 0.8645054102
+ 0.9016327262 0.9016327262 0.8650711179
+ 0.9020516276 0.9020516276 0.8656365275
+ 0.9024695158 0.9024695158 0.8661962152
+ 0.9028872848 0.9028872848 0.8667557836
+ 0.9033051729 0.9033051729 0.8673154116
+ 0.9037230015 0.9037230015 0.8678750992
+ 0.9041407704 0.9041407704 0.8684347272
+ 0.9045585990 0.9045585990 0.8689942956
+ 0.9049764872 0.9049764872 0.8695539236
+ 0.9053943157 0.9053943157 0.8701127172
+ 0.9058037996 0.9058037996 0.8706625104
+ 0.9062129855 0.9062129855 0.8712123036
+ 0.9066222906 0.9066222906 0.8717620969
+ 0.9070315957 0.9070315957 0.8723118901
+ 0.9074407816 0.9074407816 0.8728616834
+ 0.9078500867 0.9078500867 0.8734114170
+ 0.9082593918 0.9082593918 0.8739612103
+ 0.9086686969 0.9086686969 0.8745108247
+ 0.9090744257 0.9090744257 0.8750563860
+ 0.9094799757 0.9094799757 0.8756021261
+ 0.9098855853 0.9098855853 0.8761476874
+ 0.9102911949 0.9102911949 0.8766933084
+ 0.9106968045 0.9106968045 0.8772389293
+ 0.9111024141 0.9111024141 0.8777846098
+ 0.9115080237 0.9115080237 0.8783301711
+ 0.9119135737 0.9119135737 0.8788757920
+ 0.9123172760 0.9123172760 0.8794146180
+ 0.9127206802 0.9127206802 0.8799529076
+ 0.9131240845 0.9131240845 0.8804911971
+ 0.9135274291 0.9135274291 0.8810294867
+ 0.9139307737 0.9139307737 0.8815677762
+ 0.9143341780 0.9143341780 0.8821061254
+ 0.9147375822 0.9147375822 0.8826442957
+ 0.9151409268 0.9151409268 0.8831825852
+ 0.9155405164 0.9155405164 0.8837168813
+ 0.9159377217 0.9159377217 0.8842496276
+ 0.9163349271 0.9163349271 0.8847821951
+ 0.9167321920 0.9167321920 0.8853148818
+ 0.9171293974 0.9171293974 0.8858476281
+ 0.9175266027 0.9175266027 0.8863803148
+ 0.9179238081 0.9179238081 0.8869130015
+ 0.9183210135 0.9183210135 0.8874456882
+ 0.9187163711 0.9187163711 0.8879768252
+ 0.9191077948 0.9191077948 0.8885056973
+ 0.9194992185 0.9194992185 0.8890346885
+ 0.9198907018 0.9198907018 0.8895636201
+ 0.9202821255 0.9202821255 0.8900926113
+ 0.9206734896 0.9206734896 0.8906214833
+ 0.9210649133 0.9210649133 0.8911504745
+ 0.9214563966 0.9214563966 0.8916794062
+ 0.9218478203 0.9218478203 0.8922079802
+ 0.9222431183 0.9222431183 0.8927248120
+ 0.9226387143 0.9226387143 0.8932415843
+ 0.9230343103 0.9230343103 0.8937584162
+ 0.9234299064 0.9234299064 0.8942751288
+ 0.9238255024 0.9238255024 0.8947919011
+ 0.9242212176 0.9242212176 0.8953086734
+ 0.9246168137 0.9246168137 0.8958255053
+ 0.9250124097 0.9250124097 0.8963422179
+ 0.9254066944 0.9254066944 0.8968577981
+ 0.9257994294 0.9257994294 0.8973724246
+ 0.9261922240 0.9261922240 0.8978869915
+ 0.9265850186 0.9265850186 0.8984016776
+ 0.9269778132 0.9269778132 0.8989163041
+ 0.9273704886 0.9273704886 0.8994308710
+ 0.9277632833 0.9277632833 0.8999454975
+ 0.9281560779 0.9281560779 0.9004601240
+ 0.9285488129 0.9285488129 0.9009746909
+ 0.9289314151 0.9289314151 0.9014821053
+ 0.9293128252 0.9293128252 0.9019892216
+ 0.9296941161 0.9296941161 0.9024963975
+ 0.9300754070 0.9300754070 0.9030035138
+ 0.9304568172 0.9304568172 0.9035106897
+ 0.9308381081 0.9308381081 0.9040178061
+ 0.9312195182 0.9312195182 0.9045249820
+ 0.9316008091 0.9316008091 0.9050320983
+ 0.9319807887 0.9319807887 0.9055399895
+ 0.9323564172 0.9323564172 0.9060496092
+ 0.9327319860 0.9327319860 0.9065591097
+ 0.9331076145 0.9331076145 0.9070687294
+ 0.9334831834 0.9334831834 0.9075781703
+ 0.9338588119 0.9338588119 0.9080877900
+ 0.9342343807 0.9342343807 0.9085972905
+ 0.9346100092 0.9346100092 0.9091069102
+ 0.9349855781 0.9349855781 0.9096164107
+ 0.9353610277 0.9353610277 0.9101235867
+ 0.9357361794 0.9357361794 0.9106287956
+ 0.9361115098 0.9361115098 0.9111341238
+ 0.9364867210 0.9364867210 0.9116392732
+ 0.9368619919 0.9368619919 0.9121444821
+ 0.9372372031 0.9372372031 0.9126498103
+ 0.9376124740 0.9376124740 0.9131550193
+ 0.9379876852 0.9379876852 0.9136602879
+ 0.9383630157 0.9383630157 0.9141654968
+ 0.9387336969 0.9387336969 0.9146683216
+ 0.9391016960 0.9391016960 0.9151700735
+ 0.9394698143 0.9394698143 0.9156718850
+ 0.9398378134 0.9398378134 0.9161736965
+ 0.9402058125 0.9402058125 0.9166755080
+ 0.9405738115 0.9405738115 0.9171772003
+ 0.9409418106 0.9409418106 0.9176790118
+ 0.9413098097 0.9413098097 0.9181808233
+ 0.9416779280 0.9416779280 0.9186825752
+ 0.9420405030 0.9420405030 0.9191823006
+ 0.9424005747 0.9424005747 0.9196813107
+ 0.9427607059 0.9427607059 0.9201803803
+ 0.9431207180 0.9431207180 0.9206793904
+ 0.9434807897 0.9434807897 0.9211784005
+ 0.9438409209 0.9438409209 0.9216774106
+ 0.9442009926 0.9442009926 0.9221764803
+ 0.9445611238 0.9445611238 0.9226754904
+ 0.9449210763 0.9449210763 0.9231745005
+ 0.9452818036 0.9452818036 0.9236670136
+ 0.9456428289 0.9456428289 0.9241566062
+ 0.9460036755 0.9460036755 0.9246463180
+ 0.9463647008 0.9463647008 0.9251359105
+ 0.9467257261 0.9467257261 0.9256255031
+ 0.9470866919 0.9470866919 0.9261152148
+ 0.9474475980 0.9474475980 0.9266048074
+ 0.9478086233 0.9478086233 0.9270945191
+ 0.9481695890 0.9481695890 0.9275841117
+ 0.9485284090 0.9485284090 0.9280738831
+ 0.9488850236 0.9488850236 0.9285637140
+ 0.9492415786 0.9492415786 0.9290536046
+ 0.9495981932 0.9495981932 0.9295433760
+ 0.9499548078 0.9499548078 0.9300333261
+ 0.9503114223 0.9503114223 0.9305232167
+ 0.9506679773 0.9506679773 0.9310129881
+ 0.9510245919 0.9510245919 0.9315028787
+ 0.9513812065 0.9513812065 0.9319928288
+ 0.9517353773 0.9517353773 0.9324811101
+ 0.9520826936 0.9520826936 0.9329659939
+ 0.9524298906 0.9524298906 0.9334508777
+ 0.9527770877 0.9527770877 0.9339358211
+ 0.9531244040 0.9531244040 0.9344208241
+ 0.9534716010 0.9534716010 0.9349057078
+ 0.9538187981 0.9538187981 0.9353905916
+ 0.9541659951 0.9541659951 0.9358754754
+ 0.9545133114 0.9545133114 0.9363604784
+ 0.9548605084 0.9548605084 0.9368454218
+ 0.9552074075 0.9552074075 0.9373251796
+ 0.9555541873 0.9555541873 0.9378048778
+ 0.9559010267 0.9559010267 0.9382845759
+ 0.9562478065 0.9562478065 0.9387642145
+ 0.9565945864 0.9565945864 0.9392439127
+ 0.9569414258 0.9569414258 0.9397236109
+ 0.9572882056 0.9572882056 0.9402033091
+ 0.9576349854 0.9576349854 0.9406828880
+ 0.9579818249 0.9579818249 0.9411625862
+ 0.9583277106 0.9583277106 0.9416403770
+ 0.9586725235 0.9586725235 0.9421163201
+ 0.9590172172 0.9590172172 0.9425923228
+ 0.9593619704 0.9593619704 0.9430683255
+ 0.9597067237 0.9597067237 0.9435443282
+ 0.9600514770 0.9600514770 0.9440202713
+ 0.9603962898 0.9603962898 0.9444962144
+ 0.9607409835 0.9607409835 0.9449722171
+ 0.9610857964 0.9610857964 0.9454482198
+ 0.9614306092 0.9614306092 0.9459242225
+ 0.9617655277 0.9617655277 0.9463955164
+ 0.9620996714 0.9620996714 0.9468665719
+ 0.9624338150 0.9624338150 0.9473378062
+ 0.9627678990 0.9627678990 0.9478089213
+ 0.9631021023 0.9631021023 0.9482800961
+ 0.9634361863 0.9634361863 0.9487512112
+ 0.9637703896 0.9637703896 0.9492223859
+ 0.9641044736 0.9641044736 0.9496935010
+ 0.9644386172 0.9644386172 0.9501646757
+ 0.9647706747 0.9647706747 0.9506316185
+ 0.9650973082 0.9650973082 0.9510896206
+ 0.9654238820 0.9654238820 0.9515476823
+ 0.9657505155 0.9657505155 0.9520056844
+ 0.9660770893 0.9660770893 0.9524638057
+ 0.9664037228 0.9664037228 0.9529218078
+ 0.9667302966 0.9667302966 0.9533798099
+ 0.9670568705 0.9670568705 0.9538378716
+ 0.9673835039 0.9673835039 0.9542958736
+ 0.9677100778 0.9677100778 0.9547539949
+ 0.9680343866 0.9680343866 0.9552072287
+ 0.9683567286 0.9683567286 0.9556567073
+ 0.9686790109 0.9686790109 0.9561061859
+ 0.9690012932 0.9690012932 0.9565556049
+ 0.9693235159 0.9693235159 0.9570050836
+ 0.9696457982 0.9696457982 0.9574546218
+ 0.9699680805 0.9699680805 0.9579041004
+ 0.9702903032 0.9702903032 0.9583535790
+ 0.9706125855 0.9706125855 0.9588031173
+ 0.9709349275 0.9709349275 0.9592525959
+ 0.9712525010 0.9712525010 0.9596999288
+ 0.9715678096 0.9715678096 0.9601463079
+ 0.9718831182 0.9718831182 0.9605926275
+ 0.9721983075 0.9721983075 0.9610390067
+ 0.9725136161 0.9725136161 0.9614853859
+ 0.9728289247 0.9728289247 0.9619318247
+ 0.9731441736 0.9731441736 0.9623782039
+ 0.9734594226 0.9734594226 0.9628245234
+ 0.9737746716 0.9737746716 0.9632709026
+ 0.9740899801 0.9740899801 0.9637172818
+ 0.9744006991 0.9744006991 0.9641577005
+ 0.9747095108 0.9747095108 0.9645959735
+ 0.9750183225 0.9750183225 0.9650343060
+ 0.9753270745 0.9753270745 0.9654725194
+ 0.9756358266 0.9756358266 0.9659107924
+ 0.9759445786 0.9759445786 0.9663491249
+ 0.9762533903 0.9762533903 0.9667872787
+ 0.9765622020 0.9765622020 0.9672256112
+ 0.9768708944 0.9768708944 0.9676638246
+ 0.9771797061 0.9771797061 0.9681020975
+ 0.9774832129 0.9774832129 0.9685348868
+ 0.9777835011 0.9777835011 0.9689648747
+ 0.9780837893 0.9780837893 0.9693949223
+ 0.9783840775 0.9783840775 0.9698249102
+ 0.9786844254 0.9786844254 0.9702548981
+ 0.9789847136 0.9789847136 0.9706848264
+ 0.9792850018 0.9792850018 0.9711148143
+ 0.9795852900 0.9795852900 0.9715448022
+ 0.9798855782 0.9798855782 0.9719747901
+ 0.9801859260 0.9801859260 0.9724047780
+ 0.9804825187 0.9804825187 0.9728298187
+ 0.9807745814 0.9807745814 0.9732491970
+ 0.9810665846 0.9810665846 0.9736686945
+ 0.9813587070 0.9813587070 0.9740880728
+ 0.9816508293 0.9816508293 0.9745075107
+ 0.9819427729 0.9819427729 0.9749270082
+ 0.9822348952 0.9822348952 0.9753463864
+ 0.9825268984 0.9825268984 0.9757658243
+ 0.9828190207 0.9828190207 0.9761853218
+ 0.9831110239 0.9831110239 0.9766047001
+ 0.9834020734 0.9834020734 0.9770221114
+ 0.9836878181 0.9836878181 0.9774296284
+ 0.9839735031 0.9839735031 0.9778370857
+ 0.9842591882 0.9842591882 0.9782447219
+ 0.9845448732 0.9845448732 0.9786521792
+ 0.9848306179 0.9848306179 0.9790596962
+ 0.9851163030 0.9851163030 0.9794672132
+ 0.9854019880 0.9854019880 0.9798747897
+ 0.9856876135 0.9856876135 0.9802823067
+ 0.9859732985 0.9859732985 0.9806898236
+ 0.9862589836 0.9862589836 0.9810972810
+ 0.9865384102 0.9865384102 0.9814953208
+ 0.9868156910 0.9868156910 0.9818902016
+ 0.9870929122 0.9870929122 0.9822852015
+ 0.9873701930 0.9873701930 0.9826802015
+ 0.9876474142 0.9876474142 0.9830750823
+ 0.9879245758 0.9879245758 0.9834700823
+ 0.9882019162 0.9882019162 0.9838650823
+ 0.9884790778 0.9884790778 0.9842600226
+ 0.9887564182 0.9887564182 0.9846550226
+ 0.9890335798 0.9890335798 0.9850500226
+ 0.9893082976 0.9893082976 0.9854415059
+ 0.9895743132 0.9895743132 0.9858223200
+ 0.9898403287 0.9898403287 0.9862031937
+ 0.9901062846 0.9901062846 0.9865840077
+ 0.9903723001 0.9903723001 0.9869648218
+ 0.9906383157 0.9906383157 0.9873455763
+ 0.9909042120 0.9909042120 0.9877265096
+ 0.9911702275 0.9911702275 0.9881073236
+ 0.9914361835 0.9914361835 0.9884880781
+ 0.9917021990 0.9917021990 0.9888688922
+ 0.9919682145 0.9919682145 0.9892497063
+ 0.9922304153 0.9922304153 0.9896146059
+ 0.9924901128 0.9924901128 0.9899690151
+ 0.9927496910 0.9927496910 0.9903233051
+ 0.9930093288 0.9930093288 0.9906777143
+ 0.9932690263 0.9932690263 0.9910321236
+ 0.9935286045 0.9935286045 0.9913864136
+ 0.9937881827 0.9937881827 0.9917408228
+ 0.9940478206 0.9940478206 0.9920951724
+ 0.9943075180 0.9943075180 0.9924495220
+ 0.9945670962 0.9945670962 0.9928038716
+ 0.9948266745 0.9948266745 0.9931582808
+ 0.9950770140 0.9950770140 0.9934852719
+ 0.9953256249 0.9953256249 0.9938076735
+ 0.9955741167 0.9955741167 0.9941300750
+ 0.9958227277 0.9958227277 0.9944524169
+ 0.9960712194 0.9960712194 0.9947748184
+ 0.9963197708 0.9963197708 0.9950972199
+ 0.9965683222 0.9965683222 0.9954195023
+ 0.9968168736 0.9968168736 0.9957419038
+ 0.9970654249 0.9970654249 0.9960643053
+ 0.9973139763 0.9973139763 0.9963865876
+ 0.9975625277 0.9975625277 0.9967089891
+ 0.9977846146 0.9977846146 0.9970085025
+ 0.9980061054 0.9980061054 0.9973075986
+ 0.9982277155 0.9982277155 0.9976068139
+ 0.9984492064 0.9984492064 0.9979059100
+ 0.9986708164 0.9986708164 0.9982051253
+ 0.9988923073 0.9988923073 0.9985042214
+ 0.9991137981 0.9991137981 0.9988033772
+ 0.9993354082 0.9993354082 0.9991024733
+ 0.9995568991 0.9995568991 0.9994016886
+ 0.9997785091 0.9997785091 0.9997007847
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/kodak_gold_200.spi1d b/release/datafiles/colormanagement/luts/film_response/kodak_gold_200.spi1d
new file mode 100644
index 00000000000..7681128f810
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/kodak_gold_200.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0069576460 0.0052925618 0.0033476830
+ 0.0141364904 0.0107551003 0.0067514139
+ 0.0207183994 0.0159495007 0.0101133399
+ 0.0267989002 0.0208614096 0.0133742504
+ 0.0324718915 0.0254526306 0.0165257901
+ 0.0378164984 0.0299201701 0.0196132604
+ 0.0428869314 0.0341088213 0.0225949902
+ 0.0477258898 0.0381722189 0.0255131796
+ 0.0523908511 0.0420860387 0.0283894595
+ 0.0568610094 0.0458872616 0.0311939605
+ 0.0611275584 0.0495900512 0.0339626707
+ 0.0653016865 0.0531945191 0.0367048383
+ 0.0693744496 0.0567364991 0.0393822007
+ 0.0733573064 0.0602095909 0.0420081317
+ 0.0771774426 0.0635916665 0.0445935093
+ 0.0809165314 0.0668876693 0.0471374691
+ 0.0845568478 0.0701269805 0.0496489182
+ 0.0881353170 0.0733123422 0.0521427989
+ 0.0916419923 0.0764425769 0.0546066016
+ 0.0950766504 0.0795146525 0.0570084900
+ 0.0984379798 0.0825331509 0.0593760982
+ 0.1017495021 0.0855173692 0.0617147498
+ 0.1049598977 0.0884445384 0.0640344396
+ 0.1081260964 0.0913117006 0.0663272068
+ 0.1112463027 0.0941295624 0.0686026216
+ 0.1143177003 0.0968901590 0.0708457306
+ 0.1173487976 0.0996170789 0.0730642602
+ 0.1203667000 0.1023124009 0.0752720088
+ 0.1233123019 0.1049759015 0.0774757266
+ 0.1262118965 0.1076003984 0.0796506926
+ 0.1290674955 0.1101882979 0.0817981884
+ 0.1318753064 0.1127377972 0.0839270800
+ 0.1346521974 0.1152800992 0.0860472471
+ 0.1373953074 0.1178082004 0.0881496072
+ 0.1401219070 0.1203086972 0.0902255625
+ 0.1428176016 0.1227945015 0.0922822729
+ 0.1454751045 0.1252799928 0.0943331197
+ 0.1481045038 0.1277426928 0.0963695124
+ 0.1507305056 0.1301932037 0.0983908027
+ 0.1533288956 0.1326095015 0.1003959030
+ 0.1558901072 0.1350027025 0.1023878008
+ 0.1584240943 0.1373652965 0.1043625996
+ 0.1609431952 0.1397027969 0.1063340977
+ 0.1634577960 0.1420170069 0.1083092019
+ 0.1659422070 0.1442991942 0.1102795005
+ 0.1683879048 0.1465636939 0.1122395992
+ 0.1708077043 0.1488011926 0.1141989976
+ 0.1732032001 0.1510327011 0.1161565036
+ 0.1755875945 0.1532423943 0.1181034967
+ 0.1779661030 0.1554349959 0.1200399995
+ 0.1803372949 0.1576205045 0.1219606996
+ 0.1826853007 0.1597833931 0.1238709986
+ 0.1850018948 0.1619350016 0.1257669926
+ 0.1873046011 0.1640775949 0.1276451051
+ 0.1896051019 0.1661971062 0.1295011044
+ 0.1918939054 0.1682944000 0.1313541979
+ 0.1941768974 0.1703854054 0.1332028955
+ 0.1964391023 0.1724753976 0.1350436956
+ 0.1986718029 0.1745598018 0.1368709952
+ 0.2008887976 0.1766363978 0.1386903971
+ 0.2030901015 0.1787001044 0.1405090988
+ 0.2052837014 0.1807560027 0.1423261017
+ 0.2074694037 0.1827982068 0.1441355944
+ 0.2096378058 0.1848137975 0.1459414959
+ 0.2117996961 0.1868076026 0.1477414072
+ 0.2139513046 0.1887951046 0.1495409012
+ 0.2160806060 0.1907595992 0.1513372064
+ 0.2181894034 0.1927050054 0.1531285048
+ 0.2202865928 0.1946384013 0.1549127996
+ 0.2223830074 0.1965693980 0.1566943973
+ 0.2244744003 0.1984919012 0.1584592015
+ 0.2265536934 0.2003978044 0.1602202058
+ 0.2286141068 0.2022926956 0.1619769037
+ 0.2306680977 0.2041870058 0.1637236029
+ 0.2327179015 0.2060835958 0.1654655933
+ 0.2347580940 0.2079713047 0.1672006994
+ 0.2367894948 0.2098497003 0.1689288020
+ 0.2388225049 0.2117146999 0.1706545055
+ 0.2408446074 0.2135720998 0.1723743975
+ 0.2428611964 0.2154268026 0.1740881950
+ 0.2448751032 0.2172740996 0.1757902950
+ 0.2468796968 0.2191029936 0.1774809957
+ 0.2488763928 0.2209150046 0.1791640073
+ 0.2508633137 0.2227170020 0.1808429956
+ 0.2528334856 0.2245123982 0.1825204939
+ 0.2547827065 0.2263000011 0.1841987073
+ 0.2567098141 0.2280700058 0.1858744025
+ 0.2586239874 0.2298292071 0.1875447035
+ 0.2605265081 0.2315824926 0.1892118007
+ 0.2624250948 0.2333337963 0.1908793002
+ 0.2643153071 0.2350836992 0.1925469935
+ 0.2661927938 0.2368271947 0.1942107975
+ 0.2680534124 0.2385641932 0.1958703995
+ 0.2698996067 0.2402985990 0.1975174993
+ 0.2717376053 0.2420333028 0.1991517991
+ 0.2735638916 0.2437696010 0.2007769942
+ 0.2753801942 0.2455032021 0.2023956031
+ 0.2771906853 0.2472324073 0.2040095031
+ 0.2789969146 0.2489607930 0.2056213021
+ 0.2808091938 0.2506855130 0.2072338015
+ 0.2826234102 0.2524011135 0.2088443041
+ 0.2844350040 0.2541044950 0.2104482055
+ 0.2862409055 0.2558018863 0.2120479047
+ 0.2880494893 0.2574988008 0.2136453986
+ 0.2898606062 0.2591859102 0.2152310014
+ 0.2916708887 0.2608619034 0.2168077976
+ 0.2934772968 0.2625282109 0.2183786035
+ 0.2952775061 0.2641865015 0.2199451029
+ 0.2970677912 0.2658401132 0.2215090990
+ 0.2988429070 0.2674838006 0.2230720073
+ 0.3006018996 0.2691144943 0.2246360928
+ 0.3023515940 0.2707369030 0.2262039930
+ 0.3040930927 0.2723526061 0.2277673930
+ 0.3058268130 0.2739633918 0.2293279022
+ 0.3075599968 0.2755722106 0.2308869064
+ 0.3092887998 0.2771736085 0.2324458063
+ 0.3110117018 0.2787660062 0.2339975983
+ 0.3127267957 0.2803517878 0.2355509996
+ 0.3144324124 0.2819328010 0.2371080071
+ 0.3161234856 0.2835094035 0.2386678010
+ 0.3178110123 0.2850857973 0.2402258068
+ 0.3194932044 0.2866651118 0.2417753041
+ 0.3211686909 0.2882451117 0.2433187068
+ 0.3228329122 0.2898192108 0.2448568046
+ 0.3244825006 0.2913886905 0.2463894933
+ 0.3261260092 0.2929497957 0.2479178011
+ 0.3277656138 0.2945039868 0.2494443953
+ 0.3293995857 0.2960574031 0.2509700954
+ 0.3310334086 0.2976092100 0.2524966896
+ 0.3326669931 0.2991577983 0.2540231049
+ 0.3343001902 0.3007017970 0.2555483878
+ 0.3359291852 0.3022336960 0.2570703030
+ 0.3375551999 0.3037579954 0.2585889101
+ 0.3391782939 0.3052760959 0.2601051033
+ 0.3408016860 0.3067946136 0.2616184056
+ 0.3424184024 0.3083077967 0.2631227970
+ 0.3440291882 0.3098174036 0.2646223903
+ 0.3456344008 0.3113240898 0.2661170959
+ 0.3472355008 0.3128254116 0.2675963044
+ 0.3488337100 0.3143222034 0.2690717876
+ 0.3504329920 0.3158083856 0.2705436051
+ 0.3520256877 0.3172895908 0.2720068991
+ 0.3536128998 0.3187673986 0.2734695077
+ 0.3551953137 0.3202396035 0.2749320865
+ 0.3567740023 0.3217110932 0.2763895094
+ 0.3583478928 0.3231821060 0.2778449059
+ 0.3599140942 0.3246476054 0.2792975903
+ 0.3614780009 0.3261092901 0.2807494998
+ 0.3630394042 0.3275642991 0.2822004855
+ 0.3645978868 0.3290148973 0.2836417854
+ 0.3661546111 0.3304624856 0.2850796878
+ 0.3677040935 0.3318977952 0.2865127027
+ 0.3692491949 0.3333328068 0.2879436016
+ 0.3707874119 0.3347673118 0.2893734872
+ 0.3723173141 0.3362007141 0.2908020020
+ 0.3738436997 0.3376331925 0.2922300100
+ 0.3753637075 0.3390626013 0.2936573029
+ 0.3768812120 0.3404957056 0.2950794101
+ 0.3783938885 0.3419339061 0.2964994907
+ 0.3798997998 0.3433656096 0.2979145050
+ 0.3814015985 0.3447945118 0.2993288934
+ 0.3829030991 0.3462235928 0.3007413149
+ 0.3844040930 0.3476490080 0.3021497130
+ 0.3859013915 0.3490602970 0.3035539091
+ 0.3873961866 0.3504692018 0.3049587905
+ 0.3888866007 0.3518750966 0.3063640893
+ 0.3903723955 0.3532764912 0.3077667952
+ 0.3918546140 0.3546754122 0.3091700077
+ 0.3933346868 0.3560653925 0.3105787933
+ 0.3948141932 0.3574534059 0.3119877875
+ 0.3962810040 0.3588356972 0.3133974075
+ 0.3977459073 0.3602159917 0.3148044050
+ 0.3992024958 0.3615838885 0.3162082136
+ 0.4006575048 0.3629511893 0.3176136911
+ 0.4021052122 0.3643172085 0.3190205097
+ 0.4035489857 0.3656820059 0.3204261065
+ 0.4049836993 0.3670449853 0.3218308985
+ 0.4064174891 0.3684046865 0.3232277036
+ 0.4078499079 0.3697603047 0.3246217966
+ 0.4092806876 0.3711144030 0.3260087967
+ 0.4107097983 0.3724671006 0.3273941875
+ 0.4121398926 0.3738192022 0.3287746906
+ 0.4135712087 0.3751707971 0.3301542997
+ 0.4149979949 0.3765240014 0.3315235972
+ 0.4164206088 0.3778783083 0.3328914046
+ 0.4178411961 0.3792268932 0.3342565000
+ 0.4192601144 0.3805715144 0.3356212080
+ 0.4206768870 0.3819119930 0.3369806111
+ 0.4220918119 0.3832496107 0.3383392990
+ 0.4235030115 0.3845824897 0.3396934867
+ 0.4249098897 0.3859112859 0.3410468102
+ 0.4263136089 0.3872357011 0.3423964083
+ 0.4277122915 0.3885548115 0.3437449038
+ 0.4291099906 0.3898749053 0.3450933099
+ 0.4305053949 0.3911963999 0.3464416862
+ 0.4319001138 0.3925139904 0.3477911949
+ 0.4332916141 0.3938207030 0.3491415083
+ 0.4346827865 0.3951269984 0.3504894078
+ 0.4360674918 0.3964309096 0.3518337011
+ 0.4374521971 0.3977347016 0.3531750143
+ 0.4388273954 0.3990345001 0.3545077145
+ 0.4402016103 0.4003342092 0.3558402061
+ 0.4415682852 0.4016295075 0.3571698070
+ 0.4429320991 0.4029237032 0.3584994078
+ 0.4442929029 0.4042161107 0.3598237038
+ 0.4456507862 0.4055073857 0.3611471951
+ 0.4470078051 0.4067941010 0.3624671996
+ 0.4483624101 0.4080730081 0.3637853861
+ 0.4497171044 0.4093518853 0.3651016057
+ 0.4510729909 0.4106301963 0.3664149940
+ 0.4524287879 0.4119085073 0.3677273989
+ 0.4537774920 0.4131798148 0.3690330088
+ 0.4551241994 0.4144499004 0.3703387082
+ 0.4564689100 0.4157176912 0.3716449142
+ 0.4578113854 0.4169836044 0.3729512095
+ 0.4591516852 0.4182476103 0.3742561936
+ 0.4604795873 0.4195050895 0.3755598962
+ 0.4618076086 0.4207625091 0.3768633008
+ 0.4631280005 0.4220119119 0.3781648874
+ 0.4644466043 0.4232602119 0.3794665039
+ 0.4657608867 0.4245094061 0.3807671964
+ 0.4670695066 0.4257597029 0.3820675910
+ 0.4683777988 0.4270094037 0.3833664060
+ 0.4696762860 0.4282543957 0.3846625090
+ 0.4709748924 0.4294993877 0.3859587014
+ 0.4722695947 0.4307434857 0.3872511983
+ 0.4735617936 0.4319871962 0.3885434866
+ 0.4748536050 0.4332297146 0.3898344040
+ 0.4761427939 0.4344683886 0.3911238909
+ 0.4774321020 0.4357070923 0.3924132884
+ 0.4787220955 0.4369412065 0.3936966956
+ 0.4800123870 0.4381737113 0.3949801922
+ 0.4813013077 0.4394079149 0.3962610066
+ 0.4825831950 0.4406479895 0.3975391090
+ 0.4838651121 0.4418880939 0.3988172114
+ 0.4851444066 0.4431279004 0.4000911117
+ 0.4864222109 0.4443677068 0.4013648033
+ 0.4876995981 0.4456071854 0.4026384950
+ 0.4889726043 0.4468455017 0.4039121866
+ 0.4902456999 0.4480836987 0.4051857889
+ 0.4915165007 0.4493125081 0.4064609110
+ 0.4927848876 0.4505336881 0.4077362120
+ 0.4940532148 0.4517548084 0.4090102911
+ 0.4953213036 0.4529699087 0.4102798104
+ 0.4965893030 0.4541845024 0.4115493000
+ 0.4978551865 0.4553967118 0.4128125012
+ 0.4991137087 0.4566031992 0.4140706956
+ 0.5003721714 0.4578095973 0.4153288901
+ 0.5016276836 0.4590105116 0.4165867865
+ 0.5028806925 0.4602079988 0.4178445935
+ 0.5041337013 0.4614056051 0.4191029072
+ 0.5053765774 0.4626047909 0.4203636944
+ 0.5066177249 0.4638043046 0.4216246009
+ 0.5078586936 0.4650028944 0.4228836000
+ 0.5090987086 0.4661977887 0.4241401851
+ 0.5103386045 0.4673928022 0.4253968894
+ 0.5115761161 0.4685871899 0.4266510904
+ 0.5128089190 0.4697811902 0.4279040992
+ 0.5140416026 0.4709751010 0.4291571975
+ 0.5152726173 0.4721660018 0.4304040968
+ 0.5165020823 0.4733552933 0.4316503108
+ 0.5177316070 0.4745444953 0.4328961074
+ 0.5189521909 0.4757269919 0.4341362119
+ 0.5201696157 0.4769079983 0.4353761971
+ 0.5213869810 0.4780888855 0.4366151094
+ 0.5225998163 0.4792577922 0.4378497899
+ 0.5238118768 0.4804260135 0.4390844107
+ 0.5250239968 0.4815933108 0.4403162897
+ 0.5262380242 0.4827486873 0.4415428042
+ 0.5274519920 0.4839040935 0.4427692890
+ 0.5286653042 0.4850594103 0.4439926147
+ 0.5298718810 0.4862147868 0.4452114105
+ 0.5310785174 0.4873701930 0.4464302063
+ 0.5322846174 0.4885238111 0.4476467967
+ 0.5334876776 0.4896706939 0.4488607943
+ 0.5346907973 0.4908174872 0.4500747919
+ 0.5358918905 0.4919629097 0.4512878060
+ 0.5370826721 0.4931035042 0.4524998069
+ 0.5382735133 0.4942440987 0.4537116885
+ 0.5394629836 0.4953829944 0.4549197853
+ 0.5406448841 0.4965158999 0.4561235011
+ 0.5418269038 0.4976488054 0.4573271871
+ 0.5430071950 0.4987801909 0.4585284889
+ 0.5441747904 0.4999046922 0.4597266018
+ 0.5453423858 0.5010291934 0.4609247148
+ 0.5465098023 0.5021533966 0.4621219039
+ 0.5476737022 0.5032743216 0.4633173048
+ 0.5488376021 0.5043951869 0.4645127952
+ 0.5500016212 0.5055161715 0.4657061100
+ 0.5511487722 0.5066317916 0.4668928087
+ 0.5522946715 0.5077472925 0.4680793881
+ 0.5534405112 0.5088629127 0.4692654908
+ 0.5545827150 0.5099775791 0.4704455137
+ 0.5557237267 0.5110921264 0.4716255963
+ 0.5568647981 0.5122066140 0.4728055894
+ 0.5579981804 0.5133147240 0.4739825130
+ 0.5591266751 0.5144196153 0.4751591980
+ 0.5602552295 0.5155246258 0.4763357937
+ 0.5613806248 0.5166273117 0.4775057137
+ 0.5625013113 0.5177274942 0.4786727130
+ 0.5636219978 0.5188276768 0.4798397124
+ 0.5647404194 0.5199279785 0.4809997082
+ 0.5658451915 0.5210285187 0.4821512997
+ 0.5669500828 0.5221291184 0.4833030105
+ 0.5680549145 0.5232295990 0.4844540060
+ 0.5691527128 0.5243226886 0.4856021106
+ 0.5702494979 0.5254151821 0.4867500961
+ 0.5713462234 0.5265076756 0.4878982008
+ 0.5724427104 0.5276014209 0.4890469909
+ 0.5735387802 0.5286958218 0.4901959002
+ 0.5746350288 0.5297902226 0.4913448989
+ 0.5757296085 0.5308814049 0.4924908876
+ 0.5768179297 0.5319637060 0.4936339855
+ 0.5779061913 0.5330458879 0.4947771132
+ 0.5789945722 0.5341281295 0.4959191084
+ 0.5800734758 0.5352011919 0.4970515966
+ 0.5811501741 0.5362728834 0.4981842041
+ 0.5822268724 0.5373445749 0.4993166924
+ 0.5832991004 0.5384107232 0.5004442930
+ 0.5843636990 0.5394697189 0.5015696883
+ 0.5854284167 0.5405287147 0.5026950240
+ 0.5864930749 0.5415875912 0.5038194060
+ 0.5875535011 0.5426415801 0.5049406290
+ 0.5886135101 0.5436955094 0.5060616732
+ 0.5896735787 0.5447493196 0.5071828961
+ 0.5907285810 0.5458040833 0.5082973838
+ 0.5917763710 0.5468599796 0.5094091892
+ 0.5928242803 0.5479158163 0.5105209947
+ 0.5938721895 0.5489715934 0.5116317272
+ 0.5949155092 0.5500273705 0.5127375722
+ 0.5959581733 0.5510830879 0.5138434768
+ 0.5970007777 0.5521388054 0.5149493814
+ 0.5980414748 0.5531933904 0.5160537958
+ 0.5990775228 0.5542458892 0.5171571970
+ 0.6001135111 0.5552983284 0.5182604790
+ 0.6011496186 0.5563508272 0.5193638802
+ 0.6021804810 0.5573993921 0.5204594731
+ 0.6032091975 0.5584467053 0.5215548873
+ 0.6042377949 0.5594938993 0.5226503015
+ 0.6052662134 0.5605403781 0.5237420797
+ 0.6062859893 0.5615794063 0.5248262882
+ 0.6073058248 0.5626183152 0.5259104967
+ 0.6083257198 0.5636572838 0.5269945860
+ 0.6093432903 0.5646920800 0.5280733109
+ 0.6103563905 0.5657204986 0.5291488171
+ 0.6113694906 0.5667489171 0.5302242041
+ 0.6123825908 0.5677773952 0.5312995911
+ 0.6133952141 0.5688034892 0.5323687792
+ 0.6144075990 0.5698282719 0.5334370732
+ 0.6154199243 0.5708531737 0.5345054865
+ 0.6164321899 0.5718780756 0.5355728865
+ 0.6174443960 0.5728979111 0.5366333723
+ 0.6184564233 0.5739170909 0.5376937985
+ 0.6194685102 0.5749362707 0.5387542248
+ 0.6204805970 0.5759549737 0.5398129225
+ 0.6214926243 0.5769659281 0.5408675075
+ 0.6225045919 0.5779768825 0.5419220924
+ 0.6235166192 0.5789877772 0.5429766774
+ 0.6245272756 0.5799971223 0.5440295935
+ 0.6255301237 0.5809996724 0.5450801849
+ 0.6265329719 0.5820024014 0.5461307168
+ 0.6275358796 0.5830050111 0.5471813083
+ 0.6285378933 0.5840060711 0.5482295156
+ 0.6295374036 0.5850033760 0.5492755175
+ 0.6305369139 0.5860008001 0.5503215790
+ 0.6315364242 0.5869981050 0.5513677001
+ 0.6325309277 0.5879935026 0.5524119735
+ 0.6335136890 0.5889853239 0.5534552932
+ 0.6344965100 0.5899770856 0.5544984937
+ 0.6354792714 0.5909689069 0.5555416942
+ 0.6364601254 0.5919576883 0.5565804243
+ 0.6374369264 0.5929412246 0.5576159954
+ 0.6384136081 0.5939248204 0.5586516261
+ 0.6393904090 0.5949084163 0.5596871972
+ 0.6403620839 0.5958868861 0.5607174039
+ 0.6413215995 0.5968555808 0.5617434978
+ 0.6422811151 0.5978243947 0.5627695918
+ 0.6432405114 0.5987930894 0.5637956858
+ 0.6441984773 0.5997601151 0.5648216009
+ 0.6451513767 0.6007226706 0.5658472776
+ 0.6461042762 0.6016852260 0.5668728948
+ 0.6470571756 0.6026477218 0.5678985715
+ 0.6480082870 0.6036084294 0.5689231753
+ 0.6489437819 0.6045597792 0.5699462295
+ 0.6498792171 0.6055111885 0.5709691048
+ 0.6508147120 0.6064625978 0.5719920993
+ 0.6517502069 0.6074140072 0.5730134845
+ 0.6526796222 0.6083596945 0.5740293860
+ 0.6536086798 0.6093053818 0.5750454068
+ 0.6545377970 0.6102510095 0.5760613084
+ 0.6554667950 0.6111965775 0.5770772099
+ 0.6563835144 0.6121419072 0.5780894756
+ 0.6572958231 0.6130869985 0.5791018009
+ 0.6582080126 0.6140322089 0.5801141262
+ 0.6591202021 0.6149773002 0.5811263919
+ 0.6600306034 0.6159195900 0.5821347833
+ 0.6609390974 0.6168593168 0.5831419230
+ 0.6618475914 0.6177989841 0.5841491222
+ 0.6627560854 0.6187387705 0.5851562023
+ 0.6636629105 0.6196792722 0.5861611962
+ 0.6645622253 0.6206220984 0.5871635079
+ 0.6654614806 0.6215649247 0.5881658792
+ 0.6663607955 0.6225078106 0.5891681910
+ 0.6672601104 0.6234505773 0.5901697874
+ 0.6681554914 0.6243839860 0.5911645889
+ 0.6690502167 0.6253163815 0.5921593904
+ 0.6699448824 0.6262487769 0.5931541920
+ 0.6708396077 0.6271811724 0.5941489935
+ 0.6717275977 0.6281095743 0.5951371193
+ 0.6726074219 0.6290342212 0.5961226821
+ 0.6734871864 0.6299588084 0.5971081853
+ 0.6743670106 0.6308833957 0.5980938077
+ 0.6752467752 0.6318072081 0.5990791917
+ 0.6761245131 0.6327196956 0.6000642180
+ 0.6770021915 0.6336323023 0.6010491848
+ 0.6778799295 0.6345447898 0.6020342112
+ 0.6787576079 0.6354573965 0.6030192971
+ 0.6796311140 0.6363689899 0.6039971709
+ 0.6805009842 0.6372799277 0.6049730778
+ 0.6813709140 0.6381908059 0.6059491038
+ 0.6822407246 0.6391018033 0.6069250703
+ 0.6831105947 0.6400123835 0.6078994870
+ 0.6839790940 0.6409156919 0.6088691950
+ 0.6848475933 0.6418190002 0.6098389030
+ 0.6857160926 0.6427223086 0.6108086705
+ 0.6865844727 0.6436256766 0.6117783785
+ 0.6874501705 0.6445271969 0.6127467155
+ 0.6883115768 0.6454266906 0.6137142777
+ 0.6891731024 0.6463261843 0.6146818995
+ 0.6900346279 0.6472256780 0.6156495214
+ 0.6908959746 0.6481251717 0.6166170239
+ 0.6917508841 0.6490163803 0.6175795197
+ 0.6926038861 0.6499059200 0.6185420156
+ 0.6934568882 0.6507952809 0.6195045114
+ 0.6943098903 0.6516848207 0.6204670072
+ 0.6951622963 0.6525734067 0.6214286089
+ 0.6960077286 0.6534568071 0.6223886013
+ 0.6968531013 0.6543400884 0.6233485937
+ 0.6976984739 0.6552234888 0.6243085861
+ 0.6985439062 0.6561068296 0.6252685785
+ 0.6993870735 0.6569851041 0.6262217164
+ 0.7002261877 0.6578559279 0.6271703839
+ 0.7010654211 0.6587265730 0.6281189919
+ 0.7019044757 0.6595973969 0.6290677190
+ 0.7027435899 0.6604681015 0.6300163269
+ 0.7035796046 0.6613349915 0.6309583187
+ 0.7044131756 0.6621994972 0.6318988800
+ 0.7052468061 0.6630640030 0.6328393817
+ 0.7060803771 0.6639283895 0.6337800026
+ 0.7069140077 0.6647928953 0.6347205043
+ 0.7077404857 0.6656516790 0.6356571913
+ 0.7085642815 0.6665087938 0.6365938187
+ 0.7093880773 0.6673660278 0.6375303864
+ 0.7102118731 0.6682230830 0.6384670138
+ 0.7110357881 0.6690803170 0.6394029856
+ 0.7118616104 0.6699306965 0.6403322220
+ 0.7126877904 0.6707803011 0.6412613988
+ 0.7135139704 0.6716299057 0.6421905756
+ 0.7143402100 0.6724795103 0.6431198120
+ 0.7151665092 0.6733291149 0.6440477967
+ 0.7159851789 0.6741706729 0.6449677944
+ 0.7168028951 0.6750116944 0.6458877921
+ 0.7176206708 0.6758527756 0.6468077898
+ 0.7184385061 0.6766939163 0.6477277875
+ 0.7192562819 0.6775348783 0.6486470103
+ 0.7200725079 0.6783677936 0.6495617032
+ 0.7208884954 0.6792001724 0.6504762769
+ 0.7217044830 0.6800324917 0.6513909101
+ 0.7225204110 0.6808648705 0.6523056030
+ 0.7233363986 0.6816973090 0.6532199979
+ 0.7241454124 0.6825289130 0.6541327238
+ 0.7249531150 0.6833605170 0.6550455093
+ 0.7257608771 0.6841921210 0.6559581757
+ 0.7265685797 0.6850237250 0.6568709016
+ 0.7273762822 0.6858553290 0.6577836275
+ 0.7281739712 0.6866853833 0.6586869955
+ 0.7289680243 0.6875150800 0.6595901251
+ 0.7297620773 0.6883447766 0.6604931951
+ 0.7305560708 0.6891744733 0.6613963842
+ 0.7313501239 0.6900042295 0.6622995138
+ 0.7321395278 0.6908270121 0.6631954908
+ 0.7329254746 0.6916458011 0.6640897989
+ 0.7337114811 0.6924644709 0.6649841070
+ 0.7344974875 0.6932832003 0.6658784747
+ 0.7352834940 0.6941019893 0.6667727828
+ 0.7360627055 0.6949160099 0.6676589251
+ 0.7368296981 0.6957229972 0.6685394049
+ 0.7375966907 0.6965299845 0.6694198847
+ 0.7383636832 0.6973370910 0.6703003049
+ 0.7391306758 0.6981440783 0.6711807847
+ 0.7398970723 0.6989498138 0.6720594168
+ 0.7406572104 0.6997461915 0.6729338169
+ 0.7414172292 0.7005426884 0.6738082767
+ 0.7421773076 0.7013391256 0.6746826768
+ 0.7429373860 0.7021355033 0.6755570769
+ 0.7436974049 0.7029320002 0.6764315963
+ 0.7444459200 0.7037230134 0.6772987247
+ 0.7451906204 0.7045127153 0.6781656742
+ 0.7459353209 0.7053024173 0.6790326238
+ 0.7466799021 0.7060920000 0.6798995733
+ 0.7474246025 0.7068817019 0.6807665825
+ 0.7481679916 0.7076675892 0.6816290021
+ 0.7489092946 0.7084479928 0.6824882030
+ 0.7496504784 0.7092282772 0.6833475232
+ 0.7503917217 0.7100086808 0.6842067242
+ 0.7511329055 0.7107890844 0.6850659847
+ 0.7518740892 0.7115694284 0.6859251857
+ 0.7526044250 0.7123498917 0.6867846847
+ 0.7533336878 0.7131304145 0.6876441836
+ 0.7540628910 0.7139108777 0.6885036230
+ 0.7547922134 0.7146914005 0.6893631220
+ 0.7555214167 0.7154719234 0.6902225018
+ 0.7562506199 0.7162482738 0.6910750866
+ 0.7569795251 0.7170194983 0.6919236183
+ 0.7577084899 0.7177907825 0.6927719712
+ 0.7584375143 0.7185620070 0.6936205029
+ 0.7591664791 0.7193332911 0.6944689751
+ 0.7598955035 0.7201045156 0.6953169107
+ 0.7606170177 0.7208759189 0.6961556077
+ 0.7613371015 0.7216472030 0.6969943047
+ 0.7620571852 0.7224184871 0.6978331208
+ 0.7627773285 0.7231898904 0.6986718178
+ 0.7634974122 0.7239611745 0.6995105147
+ 0.7642151713 0.7247301936 0.7003443837
+ 0.7649244070 0.7254924178 0.7011716962
+ 0.7656335831 0.7262545228 0.7019990087
+ 0.7663428783 0.7270166874 0.7028263211
+ 0.7670521140 0.7277787924 0.7036535740
+ 0.7677612901 0.7285410166 0.7044810057
+ 0.7684661150 0.7293031812 0.7053043842
+ 0.7691670060 0.7300654054 0.7061262727
+ 0.7698678970 0.7308276296 0.7069482803
+ 0.7705687284 0.7315897942 0.7077702880
+ 0.7712696195 0.7323520184 0.7085922956
+ 0.7719705105 0.7331141829 0.7094143033
+ 0.7726665735 0.7338690162 0.7102290988
+ 0.7733613253 0.7346221209 0.7110437751
+ 0.7740560174 0.7353752255 0.7118585110
+ 0.7747508287 0.7361282706 0.7126731873
+ 0.7754455209 0.7368813753 0.7134879231
+ 0.7761402130 0.7376344800 0.7143009901
+ 0.7768254876 0.7383875847 0.7151066065
+ 0.7775105238 0.7391408086 0.7159122229
+ 0.7781955004 0.7398939133 0.7167177796
+ 0.7788804173 0.7406470776 0.7175235152
+ 0.7795653939 0.7414001822 0.7183290720
+ 0.7802500725 0.7421522141 0.7191318870
+ 0.7809323072 0.7428963184 0.7199280858
+ 0.7816144824 0.7436404824 0.7207242846
+ 0.7822967172 0.7443845868 0.7215204239
+ 0.7829788923 0.7451288104 0.7223166227
+ 0.7836611271 0.7458729148 0.7231128216
+ 0.7843412757 0.7466160059 0.7239063978
+ 0.7850098014 0.7473546267 0.7246955037
+ 0.7856782079 0.7480933070 0.7254844904
+ 0.7863466740 0.7488319278 0.7262734771
+ 0.7870151997 0.7495706081 0.7270625234
+ 0.7876836061 0.7503092289 0.7278516293
+ 0.7883511186 0.7510460019 0.7286369205
+ 0.7890127897 0.7517744899 0.7294149995
+ 0.7896745801 0.7525030971 0.7301930785
+ 0.7903363109 0.7532315850 0.7309712172
+ 0.7909979820 0.7539601922 0.7317492962
+ 0.7916597128 0.7546886802 0.7325273752
+ 0.7923207879 0.7554165721 0.7333045006
+ 0.7929738760 0.7561392784 0.7340788841
+ 0.7936270237 0.7568619847 0.7348533273
+ 0.7942801118 0.7575846910 0.7356275916
+ 0.7949333191 0.7583073974 0.7364019752
+ 0.7955864072 0.7590301037 0.7371764183
+ 0.7962394953 0.7597528100 0.7379497886
+ 0.7968860865 0.7604665160 0.7387167215
+ 0.7975323200 0.7611799240 0.7394834757
+ 0.7981784940 0.7618933916 0.7402504086
+ 0.7988247275 0.7626067996 0.7410172820
+ 0.7994709015 0.7633203268 0.7417842150
+ 0.8001170754 0.7640337944 0.7425510883
+ 0.8007584810 0.7647390962 0.7433149815
+ 0.8013982177 0.7654420137 0.7440785766
+ 0.8020377755 0.7661449909 0.7448422909
+ 0.8026775122 0.7668480277 0.7456058860
+ 0.8033171892 0.7675510049 0.7463694811
+ 0.8039568067 0.7682539821 0.7471331954
+ 0.8045893908 0.7689520717 0.7478901148
+ 0.8052138090 0.7696456909 0.7486435175
+ 0.8058382869 0.7703393102 0.7493969202
+ 0.8064628243 0.7710329294 0.7501503825
+ 0.8070873022 0.7717264891 0.7509037852
+ 0.8077117801 0.7724201083 0.7516571879
+ 0.8083351851 0.7731121182 0.7524083853
+ 0.8089513183 0.7737967968 0.7531548738
+ 0.8095672727 0.7744815946 0.7539014220
+ 0.8101834059 0.7751662731 0.7546479106
+ 0.8107994795 0.7758510709 0.7553943992
+ 0.8114156127 0.7765358090 0.7561408877
+ 0.8120316863 0.7772204876 0.7568873763
+ 0.8126400709 0.7778990865 0.7576224804
+ 0.8132457137 0.7785758972 0.7583565116
+ 0.8138511777 0.7792527080 0.7590904236
+ 0.8144568205 0.7799293995 0.7598243952
+ 0.8150624037 0.7806062102 0.7605584264
+ 0.8156679869 0.7812829018 0.7612923980
+ 0.8162711859 0.7819581032 0.7620232105
+ 0.8168674707 0.7826291919 0.7627500296
+ 0.8174636960 0.7833003998 0.7634767890
+ 0.8180599809 0.7839716077 0.7642034888
+ 0.8186563253 0.7846428156 0.7649303079
+ 0.8192526102 0.7853139043 0.7656571269
+ 0.8198487759 0.7859851122 0.7663838863
+ 0.8204402924 0.7866560817 0.7671036124
+ 0.8210297227 0.7873269916 0.7678225040
+ 0.8216190934 0.7879980206 0.7685413957
+ 0.8222085834 0.7886688709 0.7692602873
+ 0.8227980137 0.7893397808 0.7699791789
+ 0.8233875036 0.7900106907 0.7706980705
+ 0.8239762187 0.7906810045 0.7714146972
+ 0.8245580792 0.7913463712 0.7721254230
+ 0.8251398802 0.7920119166 0.7728360295
+ 0.8257218003 0.7926774025 0.7735465765
+ 0.8263037205 0.7933428288 0.7742571831
+ 0.8268855214 0.7940083146 0.7749677896
+ 0.8274673820 0.7946738005 0.7756783962
+ 0.8280459046 0.7953346968 0.7763838172
+ 0.8286194801 0.7959898114 0.7770854831
+ 0.8291931152 0.7966449857 0.7777872086
+ 0.8297666907 0.7973002195 0.7784888744
+ 0.8303403258 0.7979552746 0.7791904807
+ 0.8309139013 0.7986105084 0.7798922062
+ 0.8314874768 0.7992656827 0.7805938721
+ 0.8320547938 0.7999172211 0.7812880278
+ 0.8326187134 0.8005670905 0.7819803953
+ 0.8331826925 0.8012170196 0.7826728821
+ 0.8337466121 0.8018668294 0.7833653092
+ 0.8343105912 0.8025166988 0.7840577960
+ 0.8348745704 0.8031666279 0.7847502232
+ 0.8354384899 0.8038163781 0.7854425907
+ 0.8359956145 0.8044540882 0.7861267924
+ 0.8365511894 0.8050895929 0.7868108153
+ 0.8371068239 0.8057252169 0.7874947786
+ 0.8376625180 0.8063607216 0.7881788015
+ 0.8382180929 0.8069962263 0.7888628244
+ 0.8387737274 0.8076316714 0.7895467877
+ 0.8393293023 0.8082672954 0.7902303934
+ 0.8398807049 0.8088986278 0.7909095287
+ 0.8404316902 0.8095297217 0.7915886045
+ 0.8409826756 0.8101608157 0.7922676206
+ 0.8415337205 0.8107919097 0.7929466963
+ 0.8420847058 0.8114230037 0.7936257720
+ 0.8426356912 0.8120540977 0.7943047881
+ 0.8431866765 0.8126851916 0.7949832082
+ 0.8437362909 0.8133051991 0.7956548929
+ 0.8442857862 0.8139246702 0.7963265777
+ 0.8448352814 0.8145442009 0.7969983816
+ 0.8453847766 0.8151637912 0.7976701260
+ 0.8459343910 0.8157833219 0.7983418107
+ 0.8464838862 0.8164027929 0.7990134954
+ 0.8470333815 0.8170223236 0.7996851802
+ 0.8475741148 0.8176347017 0.8003575802
+ 0.8481134772 0.8182463050 0.8010299802
+ 0.8486528993 0.8188579082 0.8017024994
+ 0.8491923213 0.8194695115 0.8023748994
+ 0.8497316837 0.8200811148 0.8030472994
+ 0.8502712250 0.8206927180 0.8037198186
+ 0.8508105874 0.8213043213 0.8043922186
+ 0.8513522744 0.8219084144 0.8050565720
+ 0.8518949151 0.8225101233 0.8057200909
+ 0.8524376154 0.8231118917 0.8063836098
+ 0.8529801965 0.8237137198 0.8070471287
+ 0.8535227776 0.8243154287 0.8077105284
+ 0.8540654182 0.8249171972 0.8083739877
+ 0.8546079993 0.8255189061 0.8090375066
+ 0.8551477790 0.8261185288 0.8096969724
+ 0.8556851149 0.8267164230 0.8103548288
+ 0.8562222719 0.8273143172 0.8110125065
+ 0.8567596078 0.8279122114 0.8116701841
+ 0.8572968245 0.8285101056 0.8123279214
+ 0.8578341007 0.8291079998 0.8129855990
+ 0.8583713174 0.8297058940 0.8136432767
+ 0.8589066863 0.8303020000 0.8142979741
+ 0.8594359756 0.8308932185 0.8149477839
+ 0.8599653244 0.8314844966 0.8155977130
+ 0.8604946136 0.8320757151 0.8162475228
+ 0.8610237837 0.8326669931 0.8168973923
+ 0.8615530729 0.8332582116 0.8175472021
+ 0.8620824218 0.8338493705 0.8181970716
+ 0.8626117110 0.8344407082 0.8188468814
+ 0.8631411791 0.8350260854 0.8194969296
+ 0.8636707067 0.8356109262 0.8201467991
+ 0.8642001748 0.8361955881 0.8207967877
+ 0.8647297025 0.8367804289 0.8214467764
+ 0.8652591705 0.8373650908 0.8220967054
+ 0.8657886982 0.8379498124 0.8227466941
+ 0.8663182259 0.8385345936 0.8233966231
+ 0.8668442965 0.8391172886 0.8240422010
+ 0.8673655987 0.8396975994 0.8246843815
+ 0.8678870201 0.8402777910 0.8253266215
+ 0.8684083223 0.8408579826 0.8259688020
+ 0.8689296842 0.8414382935 0.8266109824
+ 0.8694509864 0.8420184851 0.8272532225
+ 0.8699724078 0.8425986767 0.8278954029
+ 0.8704937100 0.8431789279 0.8285375834
+ 0.8710048795 0.8437566757 0.8291798830
+ 0.8715147972 0.8443341851 0.8298223019
+ 0.8720247149 0.8449115753 0.8304646015
+ 0.8725346923 0.8454890847 0.8311069012
+ 0.8730446100 0.8460665941 0.8317492008
+ 0.8735545278 0.8466441035 0.8323916197
+ 0.8740643859 0.8472216129 0.8330339193
+ 0.8745729923 0.8477984071 0.8336730003
+ 0.8750782013 0.8483735919 0.8343076706
+ 0.8755834103 0.8489488959 0.8349422812
+ 0.8760886192 0.8495240808 0.8355768919
+ 0.8765938282 0.8500993252 0.8362116218
+ 0.8770989776 0.8506745100 0.8368461728
+ 0.8776041865 0.8512498140 0.8374807835
+ 0.8781093955 0.8518249989 0.8381155133
+ 0.8786090016 0.8523975015 0.8387501836
+ 0.8791047931 0.8529682755 0.8393849134
+ 0.8796005249 0.8535389900 0.8400195837
+ 0.8800961971 0.8541098237 0.8406543732
+ 0.8805919886 0.8546805978 0.8412891030
+ 0.8810877204 0.8552513719 0.8419238925
+ 0.8815835118 0.8558220863 0.8425586224
+ 0.8820791841 0.8563929200 0.8431932926
+ 0.8825731277 0.8569598198 0.8438208103
+ 0.8830664754 0.8575260043 0.8444479108
+ 0.8835598826 0.8580921292 0.8450748920
+ 0.8840534091 0.8586583138 0.8457019925
+ 0.8845468163 0.8592243791 0.8463289738
+ 0.8850402236 0.8597906232 0.8469560146
+ 0.8855336905 0.8603568077 0.8475831151
+ 0.8860270977 0.8609228730 0.8482097983
+ 0.8865162134 0.8614861965 0.8488330245
+ 0.8870049715 0.8620492816 0.8494560719
+ 0.8874937892 0.8626124859 0.8500791788
+ 0.8879824877 0.8631756902 0.8507024050
+ 0.8884713054 0.8637387753 0.8513255119
+ 0.8889601231 0.8643019795 0.8519486189
+ 0.8894488811 0.8648651242 0.8525717854
+ 0.8899376988 0.8654280901 0.8531945944
+ 0.8904203176 0.8659834862 0.8538153768
+ 0.8909028172 0.8665388227 0.8544362187
+ 0.8913853765 0.8670940995 0.8550570011
+ 0.8918679953 0.8676494956 0.8556777835
+ 0.8923504949 0.8682047725 0.8562985063
+ 0.8928331137 0.8687602282 0.8569192886
+ 0.8933156133 0.8693155050 0.8575400710
+ 0.8937981725 0.8698707819 0.8581606150
+ 0.8942810297 0.8704199791 0.8587781191
+ 0.8947638273 0.8709689975 0.8593956232
+ 0.8952466846 0.8715180755 0.8600131869
+ 0.8957294822 0.8720670938 0.8606306911
+ 0.8962123990 0.8726161718 0.8612481952
+ 0.8966951966 0.8731653094 0.8618656993
+ 0.8971779943 0.8737143278 0.8624832034
+ 0.8976609111 0.8742634058 0.8631008267
+ 0.8981388211 0.8748087883 0.8637112975
+ 0.8986158967 0.8753535748 0.8643215895
+ 0.8990929723 0.8758984208 0.8649318814
+ 0.8995701075 0.8764432073 0.8655421138
+ 0.9000471234 0.8769881129 0.8661524057
+ 0.9005241990 0.8775328994 0.8667626977
+ 0.9010012746 0.8780776858 0.8673729897
+ 0.9014782906 0.8786225915 0.8679832816
+ 0.9019498825 0.8791623712 0.8685910106
+ 0.9024183154 0.8796998262 0.8691979051
+ 0.9028868079 0.8802371025 0.8698047996
+ 0.9033551812 0.8807744980 0.8704116940
+ 0.9038236737 0.8813118935 0.8710185289
+ 0.9042921066 0.8818492293 0.8716254234
+ 0.9047604799 0.8823866248 0.8722323179
+ 0.9052289724 0.8829239011 0.8728392124
+ 0.9056965113 0.8834607005 0.8734431267
+ 0.9061623216 0.8839964867 0.8740432858
+ 0.9066281915 0.8845322132 0.8746436238
+ 0.9070940018 0.8850679994 0.8752437830
+ 0.9075598121 0.8856037855 0.8758441210
+ 0.9080256224 0.8861395121 0.8764442801
+ 0.9084914923 0.8866752982 0.8770446181
+ 0.9089573026 0.8872110248 0.8776447773
+ 0.9094231129 0.8877468109 0.8782445788
+ 0.9098821282 0.8882740736 0.8788375258
+ 0.9103407860 0.8888012767 0.8794304132
+ 0.9107996225 0.8893284202 0.8800233006
+ 0.9112582803 0.8898556232 0.8806161284
+ 0.9117169976 0.8903827071 0.8812090158
+ 0.9121757150 0.8909099102 0.8818019032
+ 0.9126343727 0.8914369941 0.8823947906
+ 0.9130930901 0.8919641972 0.8829876184
+ 0.9135512710 0.8924918771 0.8835765123
+ 0.9140090942 0.8930202723 0.8841624260
+ 0.9144667983 0.8935487270 0.8847482800
+ 0.9149245024 0.8940771222 0.8853343129
+ 0.9153823256 0.8946055174 0.8859202266
+ 0.9158400297 0.8951339126 0.8865060806
+ 0.9162976742 0.8956621885 0.8870919943
+ 0.9167554975 0.8961905837 0.8876780272
+ 0.9172132015 0.8967189789 0.8882638216
+ 0.9176644087 0.8972421288 0.8888434768
+ 0.9181149006 0.8977648020 0.8894230723
+ 0.9185655117 0.8982874751 0.8900027871
+ 0.9190160036 0.8988103271 0.8905823827
+ 0.9194664955 0.8993330002 0.8911620975
+ 0.9199171066 0.8998556733 0.8917416930
+ 0.9203675985 0.9003784060 0.8923214078
+ 0.9208182096 0.9009010792 0.8929010034
+ 0.9212675095 0.9014238715 0.8934786916
+ 0.9217131734 0.9019467831 0.8940525055
+ 0.9221590161 0.9024696946 0.8946262002
+ 0.9226046801 0.9029926062 0.8952000141
+ 0.9230504036 0.9035155177 0.8957738280
+ 0.9234961271 0.9040384293 0.8963475823
+ 0.9239419103 0.9045612812 0.8969212770
+ 0.9243875742 0.9050841928 0.8974950910
+ 0.9248332977 0.9056071043 0.8980689049
+ 0.9252752066 0.9061285257 0.8986396790
+ 0.9257131219 0.9066482782 0.8992083073
+ 0.9261509776 0.9071682096 0.8997768164
+ 0.9265888929 0.9076880813 0.9003453851
+ 0.9270266891 0.9082080126 0.9009140134
+ 0.9274646044 0.9087278247 0.9014825821
+ 0.9279025197 0.9092476964 0.9020512104
+ 0.9283403754 0.9097676277 0.9026197791
+ 0.9287782907 0.9102874994 0.9031882882
+ 0.9292140007 0.9107999802 0.9037535191
+ 0.9296483994 0.9113087058 0.9043173194
+ 0.9300829172 0.9118173122 0.9048811793
+ 0.9305173159 0.9123259783 0.9054449797
+ 0.9309517741 0.9128345847 0.9060088992
+ 0.9313861728 0.9133433104 0.9065728188
+ 0.9318206906 0.9138519168 0.9071366191
+ 0.9322550893 0.9143605828 0.9077004790
+ 0.9326896071 0.9148693085 0.9082642794
+ 0.9331244230 0.9153769016 0.9088249803
+ 0.9335594177 0.9158840775 0.9093847871
+ 0.9339944124 0.9163913131 0.9099445939
+ 0.9344294071 0.9168984294 0.9105042815
+ 0.9348644018 0.9174056053 0.9110640883
+ 0.9352993965 0.9179127812 0.9116238952
+ 0.9357343912 0.9184200168 0.9121837020
+ 0.9361693859 0.9189271927 0.9127433896
+ 0.9366044998 0.9194344282 0.9133031964
+ 0.9370371103 0.9199361205 0.9138603806
+ 0.9374685287 0.9204351902 0.9144166708
+ 0.9378998876 0.9209342003 0.9149729013
+ 0.9383313060 0.9214332104 0.9155290723
+ 0.9387627244 0.9219322205 0.9160854220
+ 0.9391940832 0.9224311709 0.9166415930
+ 0.9396255016 0.9229301810 0.9171978831
+ 0.9400569201 0.9234291911 0.9177541137
+ 0.9404882789 0.9239282012 0.9183102846
+ 0.9409155250 0.9244257212 0.9188649058
+ 0.9413387179 0.9249218106 0.9194182158
+ 0.9417619705 0.9254179001 0.9199715257
+ 0.9421852231 0.9259139895 0.9205247760
+ 0.9426084161 0.9264100790 0.9210780859
+ 0.9430316091 0.9269062281 0.9216313958
+ 0.9434548020 0.9274023175 0.9221848249
+ 0.9438781142 0.9278984070 0.9227380753
+ 0.9443013072 0.9283944964 0.9232913852
+ 0.9447239041 0.9288893938 0.9238408208
+ 0.9451450109 0.9293813109 0.9243822098
+ 0.9455661178 0.9298732281 0.9249237180
+ 0.9459871054 0.9303650856 0.9254652262
+ 0.9464082122 0.9308570027 0.9260066748
+ 0.9468291998 0.9313489199 0.9265481830
+ 0.9472503066 0.9318407774 0.9270896912
+ 0.9476714134 0.9323326945 0.9276311994
+ 0.9480924010 0.9328246117 0.9281727076
+ 0.9485135078 0.9333165288 0.9287142158
+ 0.9489266276 0.9338006973 0.9292520881
+ 0.9493390918 0.9342843890 0.9297899008
+ 0.9497516155 0.9347680807 0.9303277731
+ 0.9501640797 0.9352517724 0.9308655858
+ 0.9505766034 0.9357355833 0.9314035177
+ 0.9509891272 0.9362192750 0.9319412708
+ 0.9514014721 0.9367030263 0.9324790835
+ 0.9518139958 0.9371867180 0.9330170155
+ 0.9522265196 0.9376704097 0.9335548282
+ 0.9526365995 0.9381523132 0.9340875149
+ 0.9530441761 0.9386324883 0.9346156716
+ 0.9534518123 0.9391127229 0.9351440072
+ 0.9538593888 0.9395927787 0.9356722236
+ 0.9542670250 0.9400730133 0.9362003803
+ 0.9546746016 0.9405531287 0.9367287159
+ 0.9550821781 0.9410333037 0.9372568727
+ 0.9554898143 0.9415134192 0.9377852082
+ 0.9558972716 0.9419935942 0.9383134246
+ 0.9563049078 0.9424737096 0.9388415813
+ 0.9567065835 0.9429457784 0.9393643737
+ 0.9571079016 0.9434173703 0.9398869872
+ 0.9575092196 0.9438890219 0.9404097199
+ 0.9579104185 0.9443606138 0.9409322739
+ 0.9583116770 0.9448322058 0.9414550066
+ 0.9587129951 0.9453037977 0.9419776797
+ 0.9591141939 0.9457753897 0.9425002933
+ 0.9595155120 0.9462471008 0.9430230260
+ 0.9599167705 0.9467186928 0.9435455799
+ 0.9603134990 0.9471881986 0.9440639019
+ 0.9606987238 0.9476525784 0.9445734024
+ 0.9610838294 0.9481170177 0.9450829029
+ 0.9614689946 0.9485813975 0.9455924034
+ 0.9618542194 0.9490458965 0.9461019039
+ 0.9622393250 0.9495102763 0.9466114044
+ 0.9626244903 0.9499747157 0.9471209049
+ 0.9630097151 0.9504390955 0.9476304054
+ 0.9633948803 0.9509035945 0.9481399059
+ 0.9637799859 0.9513679743 0.9486494064
+ 0.9641588926 0.9518290758 0.9491565824
+ 0.9645323157 0.9522874951 0.9496620297
+ 0.9649056196 0.9527457952 0.9501674175
+ 0.9652789831 0.9532042146 0.9506728053
+ 0.9656522870 0.9536625147 0.9511781931
+ 0.9660257101 0.9541208744 0.9516835809
+ 0.9663990140 0.9545791745 0.9521890283
+ 0.9667723775 0.9550374746 0.9526944160
+ 0.9671456814 0.9554958940 0.9531999230
+ 0.9675191045 0.9559541941 0.9537053108
+ 0.9678881764 0.9564117789 0.9542062283
+ 0.9682552218 0.9568691254 0.9547054172
+ 0.9686222076 0.9573262930 0.9552046061
+ 0.9689893126 0.9577835798 0.9557037950
+ 0.9693562984 0.9582408071 0.9562029839
+ 0.9697232842 0.9586980939 0.9567021728
+ 0.9700903296 0.9591553211 0.9572014213
+ 0.9704573750 0.9596126080 0.9577006102
+ 0.9708244205 0.9600697756 0.9581997991
+ 0.9711914062 0.9605271220 0.9586989880
+ 0.9715511799 0.9609804749 0.9591947794
+ 0.9719079137 0.9614323974 0.9596894979
+ 0.9722645283 0.9618843198 0.9601842165
+ 0.9726212025 0.9623361230 0.9606788754
+ 0.9729778767 0.9627879858 0.9611735940
+ 0.9733346105 0.9632399082 0.9616683125
+ 0.9736912847 0.9636917710 0.9621629715
+ 0.9740480185 0.9641436934 0.9626576900
+ 0.9744045734 0.9645954967 0.9631524086
+ 0.9747613072 0.9650474191 0.9636471272
+ 0.9751121998 0.9654958248 0.9641352892
+ 0.9754595757 0.9659423232 0.9646201730
+ 0.9758070111 0.9663887024 0.9651051164
+ 0.9761543870 0.9668352008 0.9655900002
+ 0.9765018225 0.9672815800 0.9660750031
+ 0.9768491983 0.9677280784 0.9665598869
+ 0.9771965146 0.9681745172 0.9670447707
+ 0.9775438905 0.9686208963 0.9675297141
+ 0.9778913260 0.9690673947 0.9680147171
+ 0.9782387018 0.9695137739 0.9684996009
+ 0.9785814285 0.9699571133 0.9689792991
+ 0.9789180160 0.9703966975 0.9694532752
+ 0.9792547226 0.9708362222 0.9699273109
+ 0.9795914292 0.9712756872 0.9704012871
+ 0.9799280763 0.9717152119 0.9708753228
+ 0.9802647829 0.9721547961 0.9713492990
+ 0.9806014895 0.9725943208 0.9718232751
+ 0.9809380770 0.9730337858 0.9722973108
+ 0.9812747836 0.9734733105 0.9727712870
+ 0.9816114902 0.9739128947 0.9732453823
+ 0.9819465280 0.9743511081 0.9737172723
+ 0.9822719097 0.9747827053 0.9741798043
+ 0.9825971723 0.9752143025 0.9746423960
+ 0.9829226136 0.9756458998 0.9751049280
+ 0.9832479954 0.9760774970 0.9755674005
+ 0.9835733175 0.9765089750 0.9760299921
+ 0.9838986993 0.9769405723 0.9764925241
+ 0.9842240810 0.9773722291 0.9769549966
+ 0.9845495224 0.9778038263 0.9774175286
+ 0.9848747849 0.9782354236 0.9778801203
+ 0.9852002263 0.9786669016 0.9783425927
+ 0.9855154157 0.9790912867 0.9787945747
+ 0.9858270288 0.9795132279 0.9792435169
+ 0.9861387014 0.9799351096 0.9796923995
+ 0.9864503741 0.9803571105 0.9801412225
+ 0.9867621064 0.9807789922 0.9805901051
+ 0.9870737791 0.9812008739 0.9810389876
+ 0.9873855114 0.9816228747 0.9814878702
+ 0.9876971245 0.9820448160 0.9819366932
+ 0.9880087972 0.9824666977 0.9823855758
+ 0.9883205295 0.9828886986 0.9828345180
+ 0.9886283278 0.9833080173 0.9832788706
+ 0.9889227748 0.9837185740 0.9837099910
+ 0.9892172813 0.9841291904 0.9841409922
+ 0.9895117879 0.9845399261 0.9845719934
+ 0.9898062944 0.9849504828 0.9850029945
+ 0.9901008010 0.9853610992 0.9854339957
+ 0.9903953075 0.9857717156 0.9858649969
+ 0.9906898141 0.9861822724 0.9862959981
+ 0.9909843206 0.9865928888 0.9867269993
+ 0.9912788272 0.9870036244 0.9871580005
+ 0.9915732741 0.9874141812 0.9875890017
+ 0.9918602109 0.9878157973 0.9880052805
+ 0.9921419024 0.9882115126 0.9884120822
+ 0.9924237132 0.9886071086 0.9888188839
+ 0.9927054048 0.9890027046 0.9892256856
+ 0.9929870963 0.9893983006 0.9896324873
+ 0.9932689071 0.9897938967 0.9900392890
+ 0.9935505986 0.9901894927 0.9904460907
+ 0.9938322902 0.9905850887 0.9908528924
+ 0.9941141009 0.9909806848 0.9912596941
+ 0.9943957925 0.9913762808 0.9916664958
+ 0.9946774840 0.9917719960 0.9920732975
+ 0.9949371219 0.9921513796 0.9924513102
+ 0.9951925874 0.9925280213 0.9928246140
+ 0.9954481125 0.9929047227 0.9931977987
+ 0.9957035780 0.9932813048 0.9935709834
+ 0.9959591031 0.9936578870 0.9939442277
+ 0.9962146282 0.9940345287 0.9943174124
+ 0.9964702129 0.9944111109 0.9946905971
+ 0.9967256784 0.9947876930 0.9950639009
+ 0.9969812036 0.9951642752 0.9954370856
+ 0.9972367287 0.9955409169 0.9958102703
+ 0.9974921942 0.9959174991 0.9961835146
+ 0.9977207184 0.9962887168 0.9965307713
+ 0.9979485869 0.9966598749 0.9968776703
+ 0.9981765151 0.9970309734 0.9972246289
+ 0.9984045029 0.9974020720 0.9975715280
+ 0.9986323714 0.9977731705 0.9979184866
+ 0.9988602996 0.9981443882 0.9982653856
+ 0.9990882874 0.9985154867 0.9986122847
+ 0.9993162155 0.9988865852 0.9989591837
+ 0.9995440841 0.9992576838 0.9993062019
+ 0.9997720718 0.9996289015 0.9996531010
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/kodak_kaf-2001.spi1d b/release/datafiles/colormanagement/luts/film_response/kodak_kaf-2001.spi1d
new file mode 100644
index 00000000000..5eb8e03ba4a
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/kodak_kaf-2001.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 1
+{
+ 0.0000000000
+ 0.0007931371
+ 0.0016355170
+ 0.0025503801
+ 0.0035146240
+ 0.0045273229
+ 0.0055715218
+ 0.0066442778
+ 0.0077339248
+ 0.0088365739
+ 0.0099448124
+ 0.0110545401
+ 0.0121633904
+ 0.0132660801
+ 0.0143607901
+ 0.0154447202
+ 0.0165135600
+ 0.0175563600
+ 0.0185688492
+ 0.0195335001
+ 0.0204569604
+ 0.0213513691
+ 0.0222338792
+ 0.0231126193
+ 0.0239920896
+ 0.0248705894
+ 0.0257443301
+ 0.0266080908
+ 0.0274574608
+ 0.0282867905
+ 0.0290999208
+ 0.0299087707
+ 0.0307223909
+ 0.0315502807
+ 0.0323930904
+ 0.0332537815
+ 0.0341344401
+ 0.0350381099
+ 0.0359668396
+ 0.0369246788
+ 0.0379154012
+ 0.0389400795
+ 0.0400040112
+ 0.0411124304
+ 0.0422693789
+ 0.0434693992
+ 0.0447056293
+ 0.0459665395
+ 0.0472429208
+ 0.0485244282
+ 0.0498028807
+ 0.0510769486
+ 0.0523513183
+ 0.0536344387
+ 0.0549293309
+ 0.0562351793
+ 0.0575465411
+ 0.0588550903
+ 0.0601528510
+ 0.0614360608
+ 0.0626917332
+ 0.0639152676
+ 0.0650884286
+ 0.0662079304
+ 0.0672680065
+ 0.0682774335
+ 0.0692317113
+ 0.0701425374
+ 0.0710024387
+ 0.0718212798
+ 0.0725976974
+ 0.0733437091
+ 0.0740561932
+ 0.0747447014
+ 0.0754096508
+ 0.0760633573
+ 0.0767156705
+ 0.0773765966
+ 0.0780583993
+ 0.0787628815
+ 0.0794979781
+ 0.0802626163
+ 0.0810654610
+ 0.0819049180
+ 0.0827899724
+ 0.0837192386
+ 0.0847032070
+ 0.0857442319
+ 0.0868611634
+ 0.0880450904
+ 0.0892995670
+ 0.0906111673
+ 0.0919737294
+ 0.0933712497
+ 0.0947946832
+ 0.0962312222
+ 0.0976707786
+ 0.0991016179
+ 0.1005088016
+ 0.1018795967
+ 0.1031991988
+ 0.1044576988
+ 0.1056412980
+ 0.1067342982
+ 0.1077463999
+ 0.1087004021
+ 0.1096137986
+ 0.1104959026
+ 0.1113545969
+ 0.1121921018
+ 0.1130077988
+ 0.1137992963
+ 0.1145685986
+ 0.1153163984
+ 0.1160470024
+ 0.1167626977
+ 0.1174698994
+ 0.1181747988
+ 0.1188858002
+ 0.1196158975
+ 0.1203754023
+ 0.1211868003
+ 0.1220536008
+ 0.1229866967
+ 0.1239702031
+ 0.1250043064
+ 0.1260707974
+ 0.1271626055
+ 0.1282667071
+ 0.1293743998
+ 0.1304752976
+ 0.1315566003
+ 0.1326127052
+ 0.1336387992
+ 0.1346348971
+ 0.1355908066
+ 0.1365199983
+ 0.1374216974
+ 0.1383025050
+ 0.1391607970
+ 0.1400025934
+ 0.1408285946
+ 0.1416438073
+ 0.1424539983
+ 0.1432684958
+ 0.1440957040
+ 0.1449375004
+ 0.1457988024
+ 0.1466775984
+ 0.1475750059
+ 0.1484851986
+ 0.1494164020
+ 0.1503666043
+ 0.1513417959
+ 0.1523495018
+ 0.1534101069
+ 0.1545234025
+ 0.1556780040
+ 0.1568565965
+ 0.1580476016
+ 0.1592365056
+ 0.1604065001
+ 0.1615456045
+ 0.1626373976
+ 0.1636672020
+ 0.1646257043
+ 0.1655281931
+ 0.1663973033
+ 0.1672482938
+ 0.1680918038
+ 0.1689291000
+ 0.1697597057
+ 0.1705808938
+ 0.1713818014
+ 0.1721594036
+ 0.1729159951
+ 0.1736537963
+ 0.1743783057
+ 0.1750947982
+ 0.1758113056
+ 0.1765365005
+ 0.1772823930
+ 0.1780716032
+ 0.1789128035
+ 0.1798152030
+ 0.1807664931
+ 0.1817689985
+ 0.1828158051
+ 0.1839095950
+ 0.1850427985
+ 0.1862190962
+ 0.1874303073
+ 0.1886713058
+ 0.1899241060
+ 0.1911779046
+ 0.1924244016
+ 0.1936572939
+ 0.1948782951
+ 0.1960881054
+ 0.1972880065
+ 0.1984702945
+ 0.1996252984
+ 0.2007281035
+ 0.2017628998
+ 0.2027094960
+ 0.2036039978
+ 0.2044609040
+ 0.2053059042
+ 0.2061520070
+ 0.2070064992
+ 0.2078751028
+ 0.2087562978
+ 0.2096406966
+ 0.2105236948
+ 0.2113939971
+ 0.2122493982
+ 0.2130886018
+ 0.2139182985
+ 0.2147479951
+ 0.2155908048
+ 0.2164690942
+ 0.2174035013
+ 0.2184235007
+ 0.2195228934
+ 0.2206815928
+ 0.2218745053
+ 0.2230865955
+ 0.2243078947
+ 0.2255353034
+ 0.2267691046
+ 0.2280129045
+ 0.2292630970
+ 0.2305141985
+ 0.2317567021
+ 0.2329764068
+ 0.2341637015
+ 0.2353121042
+ 0.2364190072
+ 0.2374805957
+ 0.2384950072
+ 0.2394600958
+ 0.2403741032
+ 0.2412285060
+ 0.2420233935
+ 0.2427742034
+ 0.2434999943
+ 0.2442153990
+ 0.2449319065
+ 0.2456566989
+ 0.2463952005
+ 0.2471493930
+ 0.2479220033
+ 0.2487130016
+ 0.2495251000
+ 0.2503561974
+ 0.2512075901
+ 0.2520760000
+ 0.2529664040
+ 0.2538853884
+ 0.2548437119
+ 0.2558579147
+ 0.2569623888
+ 0.2581419051
+ 0.2593897879
+ 0.2606801093
+ 0.2619997859
+ 0.2633245885
+ 0.2646321058
+ 0.2659066021
+ 0.2671222091
+ 0.2682681084
+ 0.2693215907
+ 0.2703152001
+ 0.2712577879
+ 0.2721709907
+ 0.2730554938
+ 0.2739250958
+ 0.2747743130
+ 0.2756054997
+ 0.2764146030
+ 0.2772051990
+ 0.2779743075
+ 0.2787271142
+ 0.2794634998
+ 0.2801890969
+ 0.2809084058
+ 0.2816320062
+ 0.2823747098
+ 0.2831506133
+ 0.2839820981
+ 0.2848649919
+ 0.2858025134
+ 0.2867873013
+ 0.2878226936
+ 0.2889021933
+ 0.2900269926
+ 0.2911930978
+ 0.2923978865
+ 0.2936300933
+ 0.2948761880
+ 0.2961241901
+ 0.2973628938
+ 0.2985885143
+ 0.2998012006
+ 0.3010047972
+ 0.3021970987
+ 0.3033716977
+ 0.3045161963
+ 0.3056159914
+ 0.3066501915
+ 0.3076123893
+ 0.3085128963
+ 0.3093748093
+ 0.3102149069
+ 0.3110443950
+ 0.3118737936
+ 0.3127109110
+ 0.3135589957
+ 0.3144189119
+ 0.3152843118
+ 0.3161520958
+ 0.3170174956
+ 0.3178755939
+ 0.3187314868
+ 0.3195927143
+ 0.3204680979
+ 0.3213739991
+ 0.3223293126
+ 0.3233569860
+ 0.3244507909
+ 0.3255977035
+ 0.3267756999
+ 0.3279756904
+ 0.3291803002
+ 0.3303748071
+ 0.3315485120
+ 0.3326843977
+ 0.3337798119
+ 0.3348152936
+ 0.3358032107
+ 0.3367348909
+ 0.3376190960
+ 0.3384444118
+ 0.3392320871
+ 0.3399783969
+ 0.3406944871
+ 0.3413780928
+ 0.3420386910
+ 0.3426808119
+ 0.3433162868
+ 0.3439547122
+ 0.3446053863
+ 0.3452802002
+ 0.3459802866
+ 0.3467136025
+ 0.3474789858
+ 0.3482855856
+ 0.3491322994
+ 0.3500328958
+ 0.3509812057
+ 0.3519834876
+ 0.3530359864
+ 0.3541389108
+ 0.3552891910
+ 0.3564738035
+ 0.3576740026
+ 0.3588739932
+ 0.3600645959
+ 0.3612402976
+ 0.3623969853
+ 0.3635292947
+ 0.3646346033
+ 0.3657099903
+ 0.3667556047
+ 0.3677704930
+ 0.3687556982
+ 0.3697125912
+ 0.3706437945
+ 0.3715595901
+ 0.3724690080
+ 0.3733772933
+ 0.3742752969
+ 0.3751674891
+ 0.3760527074
+ 0.3769319057
+ 0.3778083026
+ 0.3786880076
+ 0.3795790076
+ 0.3804906011
+ 0.3814407885
+ 0.3824321926
+ 0.3834637105
+ 0.3845176101
+ 0.3855882883
+ 0.3866708875
+ 0.3877635002
+ 0.3888686001
+ 0.3899909854
+ 0.3911277056
+ 0.3922775984
+ 0.3934313059
+ 0.3945826888
+ 0.3957261145
+ 0.3968504965
+ 0.3979482055
+ 0.3990120888
+ 0.4000467956
+ 0.4010437131
+ 0.4020088017
+ 0.4029388130
+ 0.4038451016
+ 0.4047274888
+ 0.4055930078
+ 0.4064427018
+ 0.4072813094
+ 0.4081071913
+ 0.4089260995
+ 0.4097451866
+ 0.4105694890
+ 0.4114066064
+ 0.4122569859
+ 0.4131241143
+ 0.4140050113
+ 0.4148985147
+ 0.4158008993
+ 0.4167236090
+ 0.4176675081
+ 0.4186491966
+ 0.4196803868
+ 0.4207774997
+ 0.4219251871
+ 0.4231063128
+ 0.4243052900
+ 0.4255081117
+ 0.4267005026
+ 0.4278686941
+ 0.4290013015
+ 0.4300687015
+ 0.4310568869
+ 0.4319736958
+ 0.4328454137
+ 0.4336949885
+ 0.4345388114
+ 0.4353840053
+ 0.4362317026
+ 0.4370762110
+ 0.4379085898
+ 0.4387196004
+ 0.4395040870
+ 0.4402616024
+ 0.4409970045
+ 0.4417150915
+ 0.4424203932
+ 0.4431223869
+ 0.4438334107
+ 0.4445698857
+ 0.4453583956
+ 0.4462080896
+ 0.4471251965
+ 0.4480918944
+ 0.4491102993
+ 0.4501725137
+ 0.4512811005
+ 0.4524315000
+ 0.4536258876
+ 0.4548498988
+ 0.4561010897
+ 0.4573644996
+ 0.4586338103
+ 0.4599033892
+ 0.4611744881
+ 0.4624508917
+ 0.4637391865
+ 0.4650414884
+ 0.4663577974
+ 0.4676811099
+ 0.4690015018
+ 0.4703139961
+ 0.4716050029
+ 0.4728696048
+ 0.4740908146
+ 0.4752691984
+ 0.4763813913
+ 0.4774327874
+ 0.4784271121
+ 0.4793924987
+ 0.4803338945
+ 0.4812591970
+ 0.4821656942
+ 0.4830561876
+ 0.4839268029
+ 0.4847800136
+ 0.4856149852
+ 0.4864366055
+ 0.4872506857
+ 0.4880648851
+ 0.4888868928
+ 0.4897224009
+ 0.4905739129
+ 0.4914413095
+ 0.4923292100
+ 0.4932385087
+ 0.4941751063
+ 0.4951438010
+ 0.4961484075
+ 0.4971834123
+ 0.4982456863
+ 0.4993270040
+ 0.5004199147
+ 0.5015118122
+ 0.5025907755
+ 0.5036478043
+ 0.5046734214
+ 0.5056589842
+ 0.5065951943
+ 0.5074753761
+ 0.5082963705
+ 0.5090649724
+ 0.5098019242
+ 0.5105221868
+ 0.5112395287
+ 0.5119636059
+ 0.5126994252
+ 0.5134509206
+ 0.5142197013
+ 0.5150089860
+ 0.5158177018
+ 0.5166478157
+ 0.5174968243
+ 0.5183656812
+ 0.5192511082
+ 0.5201653838
+ 0.5211125016
+ 0.5221105218
+ 0.5231735706
+ 0.5243276954
+ 0.5255516171
+ 0.5268324018
+ 0.5281450152
+ 0.5294731259
+ 0.5307943225
+ 0.5320841074
+ 0.5333306789
+ 0.5345025063
+ 0.5355963111
+ 0.5366004109
+ 0.5375565886
+ 0.5384708047
+ 0.5393584967
+ 0.5402259827
+ 0.5410857797
+ 0.5419417024
+ 0.5427981019
+ 0.5436624289
+ 0.5445290208
+ 0.5453966260
+ 0.5462577939
+ 0.5471146107
+ 0.5479719043
+ 0.5488393903
+ 0.5497273803
+ 0.5506578088
+ 0.5516471267
+ 0.5527126789
+ 0.5538355112
+ 0.5549985170
+ 0.5561832786
+ 0.5573828816
+ 0.5585942864
+ 0.5598186255
+ 0.5610554814
+ 0.5623052716
+ 0.5635616183
+ 0.5648146272
+ 0.5660511851
+ 0.5672566295
+ 0.5684217215
+ 0.5695446134
+ 0.5706257820
+ 0.5716617107
+ 0.5726498961
+ 0.5735875964
+ 0.5744670033
+ 0.5752794743
+ 0.5760352015
+ 0.5767551064
+ 0.5774592161
+ 0.5781627893
+ 0.5788754821
+ 0.5796039104
+ 0.5803539157
+ 0.5811277032
+ 0.5819321871
+ 0.5827584863
+ 0.5836037993
+ 0.5844542980
+ 0.5853049755
+ 0.5861505866
+ 0.5869960189
+ 0.5878553987
+ 0.5887522101
+ 0.5897055268
+ 0.5907446146
+ 0.5918523073
+ 0.5930091739
+ 0.5941920877
+ 0.5953928828
+ 0.5965957046
+ 0.5977848172
+ 0.5989491940
+ 0.6000605226
+ 0.6011224985
+ 0.6021242142
+ 0.6030789018
+ 0.6039801836
+ 0.6048383713
+ 0.6056500077
+ 0.6064301133
+ 0.6071758270
+ 0.6078960896
+ 0.6085894704
+ 0.6092637181
+ 0.6099225283
+ 0.6105781794
+ 0.6112405062
+ 0.6119177938
+ 0.6126191020
+ 0.6133441925
+ 0.6141006947
+ 0.6148883104
+ 0.6157158017
+ 0.6165835857
+ 0.6175035834
+ 0.6184763908
+ 0.6195145249
+ 0.6206189990
+ 0.6218029857
+ 0.6230565906
+ 0.6243699789
+ 0.6257280111
+ 0.6271185279
+ 0.6285330057
+ 0.6299641132
+ 0.6314023137
+ 0.6328353286
+ 0.6342498064
+ 0.6356307864
+ 0.6369662285
+ 0.6382427216
+ 0.6394453049
+ 0.6405580044
+ 0.6415867805
+ 0.6425542831
+ 0.6434767246
+ 0.6443691254
+ 0.6452344060
+ 0.6460803747
+ 0.6469035745
+ 0.6477041245
+ 0.6484807730
+ 0.6492365003
+ 0.6499711871
+ 0.6506897807
+ 0.6513956785
+ 0.6520953774
+ 0.6527956128
+ 0.6535081267
+ 0.6542478800
+ 0.6550295949
+ 0.6558724046
+ 0.6567714214
+ 0.6577283144
+ 0.6587334871
+ 0.6597931981
+ 0.6608967781
+ 0.6620492935
+ 0.6632428169
+ 0.6644775271
+ 0.6657373905
+ 0.6670100093
+ 0.6682801247
+ 0.6695359945
+ 0.6707767248
+ 0.6719986200
+ 0.6732079983
+ 0.6743972898
+ 0.6755645871
+ 0.6766923070
+ 0.6777756810
+ 0.6787837744
+ 0.6797292233
+ 0.6806203127
+ 0.6814811826
+ 0.6823214889
+ 0.6831535101
+ 0.6839842200
+ 0.6848192215
+ 0.6856622100
+ 0.6865146756
+ 0.6873624921
+ 0.6882051826
+ 0.6890435219
+ 0.6898779273
+ 0.6907151937
+ 0.6915640235
+ 0.6924375296
+ 0.6933465004
+ 0.6943172812
+ 0.6953549981
+ 0.6964592934
+ 0.6976081729
+ 0.6987894177
+ 0.6999887824
+ 0.7011907101
+ 0.7023807764
+ 0.7035446763
+ 0.7046695948
+ 0.7057371736
+ 0.7067508101
+ 0.7077292204
+ 0.7086814046
+ 0.7096115947
+ 0.7105264068
+ 0.7114247084
+ 0.7123047709
+ 0.7131667137
+ 0.7140098214
+ 0.7148374915
+ 0.7156537771
+ 0.7164676785
+ 0.7172846794
+ 0.7181128860
+ 0.7189571261
+ 0.7198163867
+ 0.7206944227
+ 0.7215924859
+ 0.7225160003
+ 0.7234672904
+ 0.7244563103
+ 0.7254763842
+ 0.7265270948
+ 0.7275997996
+ 0.7286885977
+ 0.7297828197
+ 0.7308688164
+ 0.7319386005
+ 0.7329788804
+ 0.7339875102
+ 0.7349454761
+ 0.7358558774
+ 0.7367025018
+ 0.7374975085
+ 0.7382442951
+ 0.7389717102
+ 0.7396886945
+ 0.7404084206
+ 0.7411383986
+ 0.7418810129
+ 0.7426424026
+ 0.7434210181
+ 0.7442209125
+ 0.7450360060
+ 0.7458639741
+ 0.7466968894
+ 0.7475343943
+ 0.7483779788
+ 0.7492403984
+ 0.7501326203
+ 0.7510781288
+ 0.7520893216
+ 0.7531732917
+ 0.7543053031
+ 0.7554739714
+ 0.7566642761
+ 0.7578607798
+ 0.7590482831
+ 0.7602115273
+ 0.7613403201
+ 0.7624225020
+ 0.7634521127
+ 0.7644327283
+ 0.7653704882
+ 0.7662618756
+ 0.7671076059
+ 0.7679154277
+ 0.7686895132
+ 0.7694332004
+ 0.7701491714
+ 0.7708417177
+ 0.7715176940
+ 0.7721850276
+ 0.7728537917
+ 0.7735335827
+ 0.7742335796
+ 0.7749583125
+ 0.7757118940
+ 0.7764955759
+ 0.7773144841
+ 0.7781693935
+ 0.7790681720
+ 0.7800117135
+ 0.7810093164
+ 0.7820671797
+ 0.7831969857
+ 0.7843930721
+ 0.7856580019
+ 0.7869743705
+ 0.7883390784
+ 0.7897359133
+ 0.7911605239
+ 0.7926027179
+ 0.7940539122
+ 0.7954995036
+ 0.7969205976
+ 0.7983062267
+ 0.7996307015
+ 0.8008906841
+ 0.8020377755
+ 0.8030900955
+ 0.8040465713
+ 0.8049607873
+ 0.8058419228
+ 0.8067098856
+ 0.8075734973
+ 0.8084387779
+ 0.8093091846
+ 0.8101882935
+ 0.8110724092
+ 0.8119565248
+ 0.8128302097
+ 0.8136907816
+ 0.8145390153
+ 0.8153827786
+ 0.8162342906
+ 0.8171085715
+ 0.8180341125
+ 0.8190286756
+ 0.8201074004
+ 0.8212432861
+ 0.8224158287
+ 0.8236094713
+ 0.8248127103
+ 0.8260108232
+ 0.8271877766
+ 0.8283281922
+ 0.8294121027
+ 0.8304437995
+ 0.8314198852
+ 0.8323469162
+ 0.8332254887
+ 0.8340582848
+ 0.8348531723
+ 0.8356149197
+ 0.8363471031
+ 0.8370530009
+ 0.8377360106
+ 0.8384007215
+ 0.8390572071
+ 0.8397147059
+ 0.8403840065
+ 0.8410733938
+ 0.8417865038
+ 0.8425278068
+ 0.8432993889
+ 0.8441076279
+ 0.8449550271
+ 0.8458499908
+ 0.8467941880
+ 0.8477939963
+ 0.8488482833
+ 0.8499671817
+ 0.8511453867
+ 0.8523722291
+ 0.8536306024
+ 0.8549143076
+ 0.8562114239
+ 0.8575189710
+ 0.8588296771
+ 0.8601360917
+ 0.8614333272
+ 0.8627083898
+ 0.8639556766
+ 0.8651599884
+ 0.8663218021
+ 0.8674148917
+ 0.8684523106
+ 0.8694357276
+ 0.8703922033
+ 0.8713268042
+ 0.8722450137
+ 0.8731473088
+ 0.8740348220
+ 0.8749024868
+ 0.8757532239
+ 0.8765848875
+ 0.8774042130
+ 0.8782153726
+ 0.8790270090
+ 0.8798487186
+ 0.8806846738
+ 0.8815388083
+ 0.8824067116
+ 0.8832883239
+ 0.8841770291
+ 0.8850684762
+ 0.8859568238
+ 0.8868265748
+ 0.8876711726
+ 0.8884992003
+ 0.8893253803
+ 0.8901607990
+ 0.8910120130
+ 0.8918834925
+ 0.8927683234
+ 0.8936566114
+ 0.8945342898
+ 0.8953920007
+ 0.8962271810
+ 0.8970484138
+ 0.8978644013
+ 0.8986830711
+ 0.8995125890
+ 0.9003558159
+ 0.9012147188
+ 0.9020918012
+ 0.9029911757
+ 0.9039173126
+ 0.9048787951
+ 0.9058734775
+ 0.9069008231
+ 0.9079614282
+ 0.9090539217
+ 0.9101731777
+ 0.9113155007
+ 0.9124684930
+ 0.9136266112
+ 0.9147831798
+ 0.9159303904
+ 0.9170637727
+ 0.9181826115
+ 0.9192898273
+ 0.9203851819
+ 0.9214702845
+ 0.9225413203
+ 0.9235910773
+ 0.9246032834
+ 0.9255704284
+ 0.9264910221
+ 0.9273847938
+ 0.9282647967
+ 0.9291424155
+ 0.9300234914
+ 0.9309046865
+ 0.9317824841
+ 0.9326478243
+ 0.9334927201
+ 0.9343230128
+ 0.9351406097
+ 0.9359554052
+ 0.9367738962
+ 0.9376012087
+ 0.9384446144
+ 0.9393029213
+ 0.9401808977
+ 0.9410789013
+ 0.9420050979
+ 0.9429584146
+ 0.9439467192
+ 0.9449679255
+ 0.9460309148
+ 0.9471349120
+ 0.9482825994
+ 0.9494689107
+ 0.9506921768
+ 0.9519376755
+ 0.9531915188
+ 0.9544414282
+ 0.9556764960
+ 0.9568939209
+ 0.9580923915
+ 0.9592747092
+ 0.9604387283
+ 0.9615803957
+ 0.9626855850
+ 0.9637448192
+ 0.9647368789
+ 0.9656659961
+ 0.9665510058
+ 0.9674115777
+ 0.9682607055
+ 0.9691076875
+ 0.9699587822
+ 0.9708169103
+ 0.9716814160
+ 0.9725438952
+ 0.9734039903
+ 0.9742600918
+ 0.9751064181
+ 0.9759439826
+ 0.9767826200
+ 0.9776347280
+ 0.9785134792
+ 0.9794371724
+ 0.9804236293
+ 0.9814878702
+ 0.9826123118
+ 0.9837834239
+ 0.9849817157
+ 0.9861915708
+ 0.9873952866
+ 0.9885756969
+ 0.9897236228
+ 0.9908238053
+ 0.9918766022
+ 0.9928745031
+ 0.9938510060
+ 0.9947990775
+ 0.9957082272
+ 0.9965645075
+ 0.9973732829
+ 0.9981198907
+ 0.9988123775
+ 0.9994353056
+ 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/kodak_kaf-3000.spi1d b/release/datafiles/colormanagement/luts/film_response/kodak_kaf-3000.spi1d
new file mode 100644
index 00000000000..179c1dfa3e9
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/kodak_kaf-3000.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 1
+{
+ 0.0000000000
+ 0.0008239537
+ 0.0017113760
+ 0.0026572610
+ 0.0036410000
+ 0.0046517309
+ 0.0056753629
+ 0.0066966042
+ 0.0077035818
+ 0.0086956657
+ 0.0096768690
+ 0.0106551796
+ 0.0116374604
+ 0.0126282601
+ 0.0136336396
+ 0.0146547500
+ 0.0156989004
+ 0.0167712905
+ 0.0178667009
+ 0.0189784598
+ 0.0201001503
+ 0.0212287605
+ 0.0223587994
+ 0.0234838799
+ 0.0245989803
+ 0.0257005394
+ 0.0267930105
+ 0.0278819893
+ 0.0289712399
+ 0.0300603900
+ 0.0311466791
+ 0.0322293788
+ 0.0333095305
+ 0.0343901701
+ 0.0354710110
+ 0.0365408882
+ 0.0375862904
+ 0.0386093296
+ 0.0396146104
+ 0.0406112485
+ 0.0416014791
+ 0.0425814800
+ 0.0435459092
+ 0.0444903001
+ 0.0454233699
+ 0.0463445894
+ 0.0472576804
+ 0.0481645502
+ 0.0490692593
+ 0.0499759391
+ 0.0508891717
+ 0.0518166013
+ 0.0527626611
+ 0.0537226386
+ 0.0546919592
+ 0.0556649007
+ 0.0566373095
+ 0.0576051287
+ 0.0585623085
+ 0.0595092699
+ 0.0604476705
+ 0.0613846295
+ 0.0623276606
+ 0.0632801205
+ 0.0642424524
+ 0.0652119219
+ 0.0661871582
+ 0.0671750307
+ 0.0681754425
+ 0.0691855326
+ 0.0701999068
+ 0.0712177306
+ 0.0722424909
+ 0.0732808188
+ 0.0743458495
+ 0.0754341781
+ 0.0765458792
+ 0.0776749030
+ 0.0788224265
+ 0.0799827874
+ 0.0811530426
+ 0.0823262334
+ 0.0834952369
+ 0.0846570507
+ 0.0858169273
+ 0.0869782567
+ 0.0881420672
+ 0.0893090963
+ 0.0904768184
+ 0.0916401520
+ 0.0927933380
+ 0.0939279124
+ 0.0950335264
+ 0.0961028486
+ 0.0971330479
+ 0.0981383100
+ 0.0991264507
+ 0.1001088023
+ 0.1010833979
+ 0.1020457000
+ 0.1029841006
+ 0.1038997024
+ 0.1047933027
+ 0.1056651995
+ 0.1065146998
+ 0.1073456034
+ 0.1081662029
+ 0.1089894995
+ 0.1098269969
+ 0.1106915995
+ 0.1115795970
+ 0.1124866977
+ 0.1134070009
+ 0.1143371984
+ 0.1152724028
+ 0.1162075028
+ 0.1171367019
+ 0.1180611029
+ 0.1189863980
+ 0.1199202016
+ 0.1209200025
+ 0.1219737977
+ 0.1230672970
+ 0.1241782010
+ 0.1253035069
+ 0.1264393032
+ 0.1275773048
+ 0.1287124008
+ 0.1298429966
+ 0.1309712976
+ 0.1321021020
+ 0.1332444996
+ 0.1343923956
+ 0.1355278045
+ 0.1366423070
+ 0.1377331018
+ 0.1388027072
+ 0.1398545951
+ 0.1408876032
+ 0.1419010013
+ 0.1428834945
+ 0.1438401043
+ 0.1447667032
+ 0.1456668973
+ 0.1465339959
+ 0.1473750025
+ 0.1481927037
+ 0.1490017027
+ 0.1498129964
+ 0.1506288052
+ 0.1514475048
+ 0.1522585005
+ 0.1530572027
+ 0.1538338065
+ 0.1545996070
+ 0.1553678066
+ 0.1561364979
+ 0.1569079012
+ 0.1576897949
+ 0.1584908068
+ 0.1593147069
+ 0.1601596028
+ 0.1610313058
+ 0.1619254947
+ 0.1628465056
+ 0.1637898982
+ 0.1647551060
+ 0.1657350957
+ 0.1667309999
+ 0.1677470058
+ 0.1687898934
+ 0.1698749065
+ 0.1710059941
+ 0.1721913069
+ 0.1734060049
+ 0.1746453941
+ 0.1758995950
+ 0.1771610975
+ 0.1784185022
+ 0.1796668023
+ 0.1809030026
+ 0.1821372062
+ 0.1833820045
+ 0.1846434027
+ 0.1859240979
+ 0.1872127950
+ 0.1884990036
+ 0.1897740960
+ 0.1910288036
+ 0.1922529936
+ 0.1934324950
+ 0.1945621967
+ 0.1956468970
+ 0.1966817975
+ 0.1976771951
+ 0.1986268014
+ 0.1995413005
+ 0.2004172951
+ 0.2012622952
+ 0.2020770013
+ 0.2028657049
+ 0.2036325037
+ 0.2043817043
+ 0.2051236928
+ 0.2058676034
+ 0.2066213936
+ 0.2074044049
+ 0.2082141936
+ 0.2090529948
+ 0.2099052966
+ 0.2107656002
+ 0.2116280943
+ 0.2124830037
+ 0.2133235037
+ 0.2141488940
+ 0.2149658054
+ 0.2157903016
+ 0.2166465074
+ 0.2175375968
+ 0.2184633017
+ 0.2194138020
+ 0.2203830928
+ 0.2213633060
+ 0.2223457992
+ 0.2233193070
+ 0.2242776006
+ 0.2252182066
+ 0.2261507064
+ 0.2270810008
+ 0.2280130982
+ 0.2289510965
+ 0.2298972011
+ 0.2308543026
+ 0.2318239957
+ 0.2328100950
+ 0.2338117063
+ 0.2348213047
+ 0.2358337045
+ 0.2368506938
+ 0.2378790975
+ 0.2389242053
+ 0.2399875969
+ 0.2410621047
+ 0.2421357036
+ 0.2432024926
+ 0.2442667931
+ 0.2453292012
+ 0.2463901937
+ 0.2474516928
+ 0.2485162020
+ 0.2495937049
+ 0.2506928146
+ 0.2518276870
+ 0.2529919147
+ 0.2541776896
+ 0.2553750873
+ 0.2565745115
+ 0.2577669024
+ 0.2589448988
+ 0.2600898147
+ 0.2612054944
+ 0.2622891963
+ 0.2633585930
+ 0.2644208074
+ 0.2654806077
+ 0.2665413916
+ 0.2676038146
+ 0.2686690092
+ 0.2697396874
+ 0.2708159983
+ 0.2718920112
+ 0.2729560137
+ 0.2739931047
+ 0.2749989033
+ 0.2759633064
+ 0.2768782079
+ 0.2777278125
+ 0.2785072923
+ 0.2792311013
+ 0.2799170017
+ 0.2805862129
+ 0.2812471092
+ 0.2819086015
+ 0.2825776935
+ 0.2832584083
+ 0.2839589119
+ 0.2846930027
+ 0.2854613066
+ 0.2862626016
+ 0.2870804965
+ 0.2879104912
+ 0.2887445986
+ 0.2895751894
+ 0.2903952003
+ 0.2912051082
+ 0.2920134962
+ 0.2928391099
+ 0.2937021852
+ 0.2946189046
+ 0.2955986857
+ 0.2966246903
+ 0.2976948917
+ 0.2987993956
+ 0.2999471128
+ 0.3011271954
+ 0.3023349047
+ 0.3035596907
+ 0.3047932982
+ 0.3060269952
+ 0.3072519898
+ 0.3084549904
+ 0.3096269071
+ 0.3107633889
+ 0.3118777871
+ 0.3129779100
+ 0.3140724897
+ 0.3151645064
+ 0.3162542880
+ 0.3173392117
+ 0.3184188902
+ 0.3194957972
+ 0.3205688894
+ 0.3216289878
+ 0.3226647973
+ 0.3236807883
+ 0.3246811926
+ 0.3256719112
+ 0.3266536891
+ 0.3276238143
+ 0.3285810947
+ 0.3295294940
+ 0.3304790854
+ 0.3314437866
+ 0.3324182034
+ 0.3333995938
+ 0.3343864977
+ 0.3353833854
+ 0.3363946080
+ 0.3374285102
+ 0.3384769857
+ 0.3395330906
+ 0.3405885100
+ 0.3416405916
+ 0.3426834047
+ 0.3437139094
+ 0.3447251916
+ 0.3457196951
+ 0.3466978967
+ 0.3476671875
+ 0.3486328125
+ 0.3495933115
+ 0.3505493999
+ 0.3514994979
+ 0.3524489999
+ 0.3534050882
+ 0.3543708026
+ 0.3553416133
+ 0.3563007116
+ 0.3572334945
+ 0.3581455946
+ 0.3590348959
+ 0.3599027991
+ 0.3607496023
+ 0.3615792990
+ 0.3623996973
+ 0.3632219136
+ 0.3640663028
+ 0.3649503887
+ 0.3658618033
+ 0.3667995036
+ 0.3677533865
+ 0.3687168062
+ 0.3696813881
+ 0.3706347942
+ 0.3715701103
+ 0.3724884987
+ 0.3733963072
+ 0.3743011057
+ 0.3752076924
+ 0.3761194050
+ 0.3770408034
+ 0.3779734969
+ 0.3789207041
+ 0.3798849881
+ 0.3808659017
+ 0.3818587959
+ 0.3828561008
+ 0.3838579953
+ 0.3848698139
+ 0.3859066069
+ 0.3869642019
+ 0.3880375028
+ 0.3891113997
+ 0.3901838064
+ 0.3912554085
+ 0.3923274875
+ 0.3934000134
+ 0.3944740891
+ 0.3955540955
+ 0.3966433108
+ 0.3977557123
+ 0.3989006877
+ 0.4000787139
+ 0.4012784064
+ 0.4024907053
+ 0.4037069976
+ 0.4049186110
+ 0.4061144888
+ 0.4072830081
+ 0.4084154963
+ 0.4095208943
+ 0.4106051922
+ 0.4116787910
+ 0.4127461016
+ 0.4138118029
+ 0.4148772061
+ 0.4159424007
+ 0.4170075953
+ 0.4180721939
+ 0.4191268086
+ 0.4201577902
+ 0.4211621881
+ 0.4221380055
+ 0.4230895936
+ 0.4240145087
+ 0.4249120951
+ 0.4257782996
+ 0.4266144037
+ 0.4274252057
+ 0.4282115996
+ 0.4289813936
+ 0.4297375083
+ 0.4304881990
+ 0.4312418997
+ 0.4320062995
+ 0.4327985048
+ 0.4336202145
+ 0.4344716072
+ 0.4353393018
+ 0.4362154007
+ 0.4370937943
+ 0.4379679859
+ 0.4388278127
+ 0.4396711886
+ 0.4405008852
+ 0.4413329065
+ 0.4421812892
+ 0.4430595934
+ 0.4439747036
+ 0.4449261129
+ 0.4459050000
+ 0.4469138086
+ 0.4479498863
+ 0.4490180016
+ 0.4501048923
+ 0.4512071908
+ 0.4523200095
+ 0.4534398019
+ 0.4545612931
+ 0.4556761980
+ 0.4567787051
+ 0.4578686059
+ 0.4589490891
+ 0.4600251913
+ 0.4611012936
+ 0.4621792138
+ 0.4632557929
+ 0.4643296897
+ 0.4654009044
+ 0.4664717913
+ 0.4675419927
+ 0.4686031938
+ 0.4696451128
+ 0.4706639946
+ 0.4716722965
+ 0.4726729095
+ 0.4736702144
+ 0.4746587873
+ 0.4756379128
+ 0.4766108096
+ 0.4775831103
+ 0.4785614014
+ 0.4795452058
+ 0.4805310071
+ 0.4815202951
+ 0.4825159013
+ 0.4835259020
+ 0.4845573902
+ 0.4856084883
+ 0.4866689146
+ 0.4877327979
+ 0.4888001978
+ 0.4898718894
+ 0.4909470081
+ 0.4920218885
+ 0.4930953085
+ 0.4941661954
+ 0.4952344000
+ 0.4963006973
+ 0.4973612130
+ 0.4984084964
+ 0.4994311035
+ 0.5004292727
+ 0.5014035106
+ 0.5023515224
+ 0.5032755733
+ 0.5041642785
+ 0.5050222874
+ 0.5058479905
+ 0.5066505075
+ 0.5074304938
+ 0.5081961155
+ 0.5089520812
+ 0.5097069740
+ 0.5104699135
+ 0.5112537742
+ 0.5120664239
+ 0.5129058957
+ 0.5137627721
+ 0.5146341920
+ 0.5155118704
+ 0.5163893104
+ 0.5172569752
+ 0.5181056857
+ 0.5189391971
+ 0.5197678208
+ 0.5206072927
+ 0.5214716196
+ 0.5223724246
+ 0.5233045220
+ 0.5242694020
+ 0.5252612829
+ 0.5262829065
+ 0.5273327231
+ 0.5284060836
+ 0.5294969082
+ 0.5305972099
+ 0.5317053795
+ 0.5328170061
+ 0.5339269042
+ 0.5350281000
+ 0.5361132026
+ 0.5371879935
+ 0.5382577777
+ 0.5393270850
+ 0.5403997898
+ 0.5414752960
+ 0.5425496101
+ 0.5436221957
+ 0.5446935892
+ 0.5457674861
+ 0.5468341112
+ 0.5478798747
+ 0.5489076972
+ 0.5499224067
+ 0.5509316921
+ 0.5519384742
+ 0.5529379845
+ 0.5539290905
+ 0.5549092293
+ 0.5558865070
+ 0.5568640232
+ 0.5578449965
+ 0.5588300228
+ 0.5598173738
+ 0.5608099103
+ 0.5618140101
+ 0.5628398061
+ 0.5638893247
+ 0.5649536848
+ 0.5660216212
+ 0.5670881271
+ 0.5681570768
+ 0.5692278743
+ 0.5702992082
+ 0.5713713169
+ 0.5724447966
+ 0.5735238791
+ 0.5746114850
+ 0.5757126212
+ 0.5768241882
+ 0.5779408813
+ 0.5790569782
+ 0.5801681280
+ 0.5812727213
+ 0.5823650956
+ 0.5834385157
+ 0.5844845176
+ 0.5854976773
+ 0.5864800811
+ 0.5874279737
+ 0.5883439779
+ 0.5892180204
+ 0.5900630951
+ 0.5908904076
+ 0.5917155147
+ 0.5925496817
+ 0.5933985710
+ 0.5942596197
+ 0.5951249003
+ 0.5959877968
+ 0.5968421102
+ 0.5976834297
+ 0.5984950066
+ 0.5992792249
+ 0.6000332832
+ 0.6007766724
+ 0.6015186906
+ 0.6022672057
+ 0.6030321717
+ 0.6038194895
+ 0.6046321988
+ 0.6054781079
+ 0.6063600779
+ 0.6072819233
+ 0.6082324982
+ 0.6092107296
+ 0.6102107763
+ 0.6112337708
+ 0.6122769713
+ 0.6133307219
+ 0.6143916249
+ 0.6154521704
+ 0.6165164113
+ 0.6175839901
+ 0.6186556220
+ 0.6197301745
+ 0.6208109260
+ 0.6219016910
+ 0.6230133772
+ 0.6241537929
+ 0.6253302097
+ 0.6265388727
+ 0.6277642846
+ 0.6289970875
+ 0.6302282214
+ 0.6314477921
+ 0.6326466203
+ 0.6338086724
+ 0.6349387169
+ 0.6360424757
+ 0.6371321082
+ 0.6382141113
+ 0.6392921209
+ 0.6403672099
+ 0.6414381862
+ 0.6425055265
+ 0.6435723901
+ 0.6446369290
+ 0.6456918120
+ 0.6467275023
+ 0.6477332711
+ 0.6487026811
+ 0.6496292949
+ 0.6505001187
+ 0.6513100863
+ 0.6520529985
+ 0.6527563930
+ 0.6534317136
+ 0.6540933847
+ 0.6547484994
+ 0.6554052234
+ 0.6560714245
+ 0.6567540765
+ 0.6574617028
+ 0.6582099795
+ 0.6589958072
+ 0.6598116755
+ 0.6606448889
+ 0.6614922881
+ 0.6623446941
+ 0.6631942987
+ 0.6640357971
+ 0.6648727059
+ 0.6657136083
+ 0.6665757895
+ 0.6674811244
+ 0.6684336066
+ 0.6694403887
+ 0.6704826951
+ 0.6715667248
+ 0.6726835966
+ 0.6738361716
+ 0.6750171781
+ 0.6762194037
+ 0.6774324775
+ 0.6786479950
+ 0.6798574924
+ 0.6810536981
+ 0.6822184920
+ 0.6833531857
+ 0.6844527125
+ 0.6855350137
+ 0.6866068244
+ 0.6876752973
+ 0.6887421012
+ 0.6898087859
+ 0.6908742785
+ 0.6919373870
+ 0.6929990053
+ 0.6940523982
+ 0.6950901151
+ 0.6961060762
+ 0.6971120238
+ 0.6981120706
+ 0.6991108060
+ 0.7001062036
+ 0.7010952830
+ 0.7020772099
+ 0.7030572295
+ 0.7040420771
+ 0.7050337195
+ 0.7060307860
+ 0.7070298195
+ 0.7080342174
+ 0.7090519071
+ 0.7100886703
+ 0.7111470103
+ 0.7122195959
+ 0.7132937908
+ 0.7143607140
+ 0.7154163122
+ 0.7164533138
+ 0.7174721956
+ 0.7184677124
+ 0.7194433808
+ 0.7204009295
+ 0.7213470936
+ 0.7222880721
+ 0.7232226133
+ 0.7241495252
+ 0.7250617146
+ 0.7259560227
+ 0.7268221974
+ 0.7276610136
+ 0.7284513116
+ 0.7291994095
+ 0.7299144268
+ 0.7306104898
+ 0.7312946916
+ 0.7319728136
+ 0.7326508164
+ 0.7333354950
+ 0.7340328097
+ 0.7347601056
+ 0.7355272174
+ 0.7363470793
+ 0.7372058034
+ 0.7380936742
+ 0.7390053868
+ 0.7399355173
+ 0.7408784032
+ 0.7418274879
+ 0.7427803278
+ 0.7437379956
+ 0.7447054982
+ 0.7456836104
+ 0.7466775775
+ 0.7476887703
+ 0.7487217188
+ 0.7497777939
+ 0.7508600950
+ 0.7519810796
+ 0.7531362176
+ 0.7543209195
+ 0.7555187941
+ 0.7567229867
+ 0.7579241991
+ 0.7591124177
+ 0.7602767944
+ 0.7614082098
+ 0.7625083923
+ 0.7635900974
+ 0.7646592855
+ 0.7657235861
+ 0.7667865157
+ 0.7678502202
+ 0.7689155936
+ 0.7699834704
+ 0.7710577846
+ 0.7721307278
+ 0.7731891870
+ 0.7742263079
+ 0.7752460241
+ 0.7762551904
+ 0.7772603035
+ 0.7782598138
+ 0.7792512178
+ 0.7802270055
+ 0.7811887860
+ 0.7821359038
+ 0.7830716968
+ 0.7839983106
+ 0.7849181890
+ 0.7858353853
+ 0.7867543101
+ 0.7876856923
+ 0.7886385918
+ 0.7896096706
+ 0.7905899286
+ 0.7915676236
+ 0.7925336957
+ 0.7934818268
+ 0.7944025993
+ 0.7952839136
+ 0.7961304784
+ 0.7969564199
+ 0.7977765799
+ 0.7986037731
+ 0.7994433045
+ 0.8003032207
+ 0.8011813164
+ 0.8020802736
+ 0.8030009270
+ 0.8039441705
+ 0.8048942089
+ 0.8058394194
+ 0.8067725897
+ 0.8077021837
+ 0.8086333871
+ 0.8095719814
+ 0.8105241060
+ 0.8114864826
+ 0.8124600053
+ 0.8134480119
+ 0.8144549131
+ 0.8154819012
+ 0.8165273070
+ 0.8175873160
+ 0.8186547160
+ 0.8197259903
+ 0.8207991123
+ 0.8218631744
+ 0.8229097724
+ 0.8239313960
+ 0.8249354959
+ 0.8259270191
+ 0.8269088864
+ 0.8278800249
+ 0.8288375139
+ 0.8297861814
+ 0.8307325840
+ 0.8316870928
+ 0.8326554894
+ 0.8336303234
+ 0.8346098065
+ 0.8355954289
+ 0.8365911245
+ 0.8376066089
+ 0.8386394978
+ 0.8396871090
+ 0.8407385945
+ 0.8417950273
+ 0.8428555131
+ 0.8439220190
+ 0.8449907899
+ 0.8460597992
+ 0.8471270800
+ 0.8481943011
+ 0.8492627144
+ 0.8503319025
+ 0.8513954878
+ 0.8524438739
+ 0.8534613848
+ 0.8544461131
+ 0.8553860188
+ 0.8562803864
+ 0.8571103811
+ 0.8578768969
+ 0.8585957885
+ 0.8592829704
+ 0.8599522114
+ 0.8606104255
+ 0.8612663150
+ 0.8619267941
+ 0.8625972271
+ 0.8632894158
+ 0.8640218973
+ 0.8647894859
+ 0.8655846119
+ 0.8664000034
+ 0.8672314882
+ 0.8680710793
+ 0.8689119220
+ 0.8697466254
+ 0.8705791235
+ 0.8714179993
+ 0.8722798824
+ 0.8731784225
+ 0.8741275072
+ 0.8751282096
+ 0.8761690259
+ 0.8772516847
+ 0.8783689141
+ 0.8795279264
+ 0.8807160258
+ 0.8819314837
+ 0.8831598163
+ 0.8843933940
+ 0.8856235147
+ 0.8868407011
+ 0.8880308867
+ 0.8891866803
+ 0.8903077245
+ 0.8914114833
+ 0.8925023079
+ 0.8935890198
+ 0.8946737051
+ 0.8957551122
+ 0.8968315125
+ 0.8979024887
+ 0.8989741206
+ 0.9000406861
+ 0.9010896087
+ 0.9021161199
+ 0.9031258225
+ 0.9041231871
+ 0.9051136971
+ 0.9060966969
+ 0.9070687890
+ 0.9080281854
+ 0.9089828134
+ 0.9099376798
+ 0.9109022021
+ 0.9118763208
+ 0.9128565788
+ 0.9138407707
+ 0.9148361087
+ 0.9158486128
+ 0.9168851972
+ 0.9179406762
+ 0.9190021753
+ 0.9200580716
+ 0.9210987091
+ 0.9221140742
+ 0.9230914712
+ 0.9240095019
+ 0.9248781800
+ 0.9257149100
+ 0.9265410900
+ 0.9273703098
+ 0.9282112718
+ 0.9290707111
+ 0.9299505949
+ 0.9308521152
+ 0.9317784905
+ 0.9327259064
+ 0.9336796999
+ 0.9346215725
+ 0.9355351925
+ 0.9364286065
+ 0.9372990131
+ 0.9381507039
+ 0.9389857054
+ 0.9398118854
+ 0.9406411052
+ 0.9414886832
+ 0.9423733950
+ 0.9433202744
+ 0.9443135262
+ 0.9453420043
+ 0.9463896155
+ 0.9474490881
+ 0.9485102892
+ 0.9495586157
+ 0.9505851269
+ 0.9515897036
+ 0.9525790811
+ 0.9535614848
+ 0.9545397162
+ 0.9555109143
+ 0.9564700127
+ 0.9574239254
+ 0.9583799839
+ 0.9593443274
+ 0.9603207707
+ 0.9613075852
+ 0.9623004794
+ 0.9633029103
+ 0.9643172026
+ 0.9653546214
+ 0.9664106965
+ 0.9674816728
+ 0.9685521722
+ 0.9696255922
+ 0.9707052708
+ 0.9717903733
+ 0.9728767872
+ 0.9739595056
+ 0.9750362039
+ 0.9761099815
+ 0.9771819115
+ 0.9782528877
+ 0.9793108106
+ 0.9803507924
+ 0.9813615084
+ 0.9823462963
+ 0.9833049178
+ 0.9842357039
+ 0.9851344228
+ 0.9859966040
+ 0.9868291020
+ 0.9876328707
+ 0.9884179831
+ 0.9891839027
+ 0.9899348021
+ 0.9906693101
+ 0.9913892150
+ 0.9920961857
+ 0.9927936792
+ 0.9934824109
+ 0.9941564202
+ 0.9948133826
+ 0.9954445958
+ 0.9960510731
+ 0.9966241717
+ 0.9971635938
+ 0.9976590276
+ 0.9981124997
+ 0.9985358715
+ 0.9989339113
+ 0.9993115067
+ 0.9996662736
+ 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/kodak_kai-0311.spi1d b/release/datafiles/colormanagement/luts/film_response/kodak_kai-0311.spi1d
new file mode 100644
index 00000000000..a382f093ee8
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/kodak_kai-0311.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 1
+{
+ 0.0000000000
+ 0.0016059499
+ 0.0032039359
+ 0.0047925338
+ 0.0063681109
+ 0.0079261437
+ 0.0094620753
+ 0.0109717799
+ 0.0124478899
+ 0.0138870701
+ 0.0152903199
+ 0.0166584495
+ 0.0179926194
+ 0.0192952193
+ 0.0205696207
+ 0.0218127500
+ 0.0230190307
+ 0.0241936091
+ 0.0253404994
+ 0.0264616702
+ 0.0275589097
+ 0.0286343992
+ 0.0296888705
+ 0.0307215601
+ 0.0317354687
+ 0.0327326916
+ 0.0337138698
+ 0.0346802585
+ 0.0356336907
+ 0.0365758091
+ 0.0375103503
+ 0.0384392217
+ 0.0393667594
+ 0.0402943417
+ 0.0412232615
+ 0.0421543792
+ 0.0430876091
+ 0.0440218188
+ 0.0449589603
+ 0.0459001884
+ 0.0468437783
+ 0.0477895401
+ 0.0487375483
+ 0.0496875793
+ 0.0506395511
+ 0.0515942089
+ 0.0525525808
+ 0.0535144582
+ 0.0544794910
+ 0.0554478317
+ 0.0564199202
+ 0.0573957488
+ 0.0583746210
+ 0.0593575612
+ 0.0603439212
+ 0.0613333285
+ 0.0623258613
+ 0.0633219033
+ 0.0643215328
+ 0.0653229132
+ 0.0663260892
+ 0.0673301816
+ 0.0683355704
+ 0.0693410188
+ 0.0703461990
+ 0.0713518485
+ 0.0723578706
+ 0.0733634382
+ 0.0743684769
+ 0.0753747523
+ 0.0763814375
+ 0.0773879215
+ 0.0783942565
+ 0.0794009119
+ 0.0804076791
+ 0.0814127624
+ 0.0824181885
+ 0.0834240466
+ 0.0844298676
+ 0.0854352489
+ 0.0864404887
+ 0.0874472633
+ 0.0884538963
+ 0.0894602016
+ 0.0904667079
+ 0.0914734229
+ 0.0924795270
+ 0.0934846178
+ 0.0944902077
+ 0.0954962522
+ 0.0965018719
+ 0.0975077078
+ 0.0985157192
+ 0.0995259583
+ 0.1005385965
+ 0.1015558019
+ 0.1025787964
+ 0.1036100015
+ 0.1046487987
+ 0.1056960970
+ 0.1067529991
+ 0.1078196988
+ 0.1088960990
+ 0.1099824011
+ 0.1110825986
+ 0.1121942028
+ 0.1133178994
+ 0.1144538969
+ 0.1156022996
+ 0.1167630032
+ 0.1179357022
+ 0.1191222966
+ 0.1203233972
+ 0.1215377003
+ 0.1227634028
+ 0.1240004003
+ 0.1252481937
+ 0.1265043020
+ 0.1277696937
+ 0.1290419996
+ 0.1303198040
+ 0.1316013932
+ 0.1328857988
+ 0.1341720074
+ 0.1354583055
+ 0.1367450058
+ 0.1380295008
+ 0.1393115968
+ 0.1405912936
+ 0.1418687999
+ 0.1431439966
+ 0.1444166005
+ 0.1456868947
+ 0.1469538957
+ 0.1482183039
+ 0.1494797021
+ 0.1507384926
+ 0.1519940048
+ 0.1532454938
+ 0.1544931978
+ 0.1557371020
+ 0.1569786072
+ 0.1582174003
+ 0.1594552994
+ 0.1606920063
+ 0.1619275063
+ 0.1631624997
+ 0.1643957943
+ 0.1656281948
+ 0.1668587029
+ 0.1680880040
+ 0.1693165004
+ 0.1705441028
+ 0.1717692018
+ 0.1729893982
+ 0.1742039025
+ 0.1754093021
+ 0.1766050011
+ 0.1777881980
+ 0.1789582074
+ 0.1801135987
+ 0.1812521964
+ 0.1823734939
+ 0.1834750026
+ 0.1845587045
+ 0.1856247932
+ 0.1866752952
+ 0.1877115965
+ 0.1887340993
+ 0.1897435039
+ 0.1907389015
+ 0.1917219013
+ 0.1926929951
+ 0.1936533004
+ 0.1946032941
+ 0.1955437064
+ 0.1964759976
+ 0.1974004060
+ 0.1983195990
+ 0.1992345005
+ 0.2001473010
+ 0.2010585964
+ 0.2019691020
+ 0.2028799951
+ 0.2037910968
+ 0.2047035992
+ 0.2056163996
+ 0.2065296024
+ 0.2074443996
+ 0.2083611935
+ 0.2092798948
+ 0.2101999074
+ 0.2111200988
+ 0.2120410055
+ 0.2129642069
+ 0.2138908952
+ 0.2148218006
+ 0.2157568038
+ 0.2166953981
+ 0.2176382989
+ 0.2185852975
+ 0.2195377946
+ 0.2204961032
+ 0.2214609981
+ 0.2224321067
+ 0.2234085947
+ 0.2243912965
+ 0.2253790945
+ 0.2263737023
+ 0.2273754030
+ 0.2283847928
+ 0.2294009030
+ 0.2304224074
+ 0.2314486951
+ 0.2324783951
+ 0.2335128933
+ 0.2345526069
+ 0.2355960011
+ 0.2366417050
+ 0.2376891971
+ 0.2387381941
+ 0.2397857010
+ 0.2408334017
+ 0.2418812960
+ 0.2429291010
+ 0.2439766973
+ 0.2450250983
+ 0.2460754067
+ 0.2471272945
+ 0.2481832057
+ 0.2492412031
+ 0.2503012121
+ 0.2513638139
+ 0.2524305880
+ 0.2535029054
+ 0.2545804977
+ 0.2556641996
+ 0.2567521036
+ 0.2578442991
+ 0.2589425147
+ 0.2600479126
+ 0.2611603141
+ 0.2622781098
+ 0.2634013891
+ 0.2645292878
+ 0.2656618953
+ 0.2667996883
+ 0.2679435015
+ 0.2690925896
+ 0.2702454925
+ 0.2714022100
+ 0.2725617886
+ 0.2737230957
+ 0.2748858929
+ 0.2760506868
+ 0.2772169113
+ 0.2783834040
+ 0.2795504928
+ 0.2807163894
+ 0.2818816900
+ 0.2830451131
+ 0.2842077017
+ 0.2853684127
+ 0.2865259051
+ 0.2876791954
+ 0.2888275087
+ 0.2899697125
+ 0.2911050022
+ 0.2922331095
+ 0.2933534086
+ 0.2944662869
+ 0.2955724895
+ 0.2966713011
+ 0.2977609038
+ 0.2988406122
+ 0.2999115884
+ 0.3009747863
+ 0.3020302951
+ 0.3030776978
+ 0.3041163087
+ 0.3051471114
+ 0.3061706126
+ 0.3071883917
+ 0.3082000911
+ 0.3092052937
+ 0.3102042973
+ 0.3111982048
+ 0.3121899068
+ 0.3131796122
+ 0.3141691983
+ 0.3151580095
+ 0.3161459863
+ 0.3171347082
+ 0.3181253076
+ 0.3191179037
+ 0.3201133013
+ 0.3211115897
+ 0.3221124113
+ 0.3231154978
+ 0.3241209090
+ 0.3251287043
+ 0.3261393011
+ 0.3271540999
+ 0.3281734884
+ 0.3291963935
+ 0.3302215934
+ 0.3312487006
+ 0.3322781920
+ 0.3333105147
+ 0.3343453109
+ 0.3353832066
+ 0.3364242017
+ 0.3374665082
+ 0.3385097980
+ 0.3395538926
+ 0.3405987024
+ 0.3416439891
+ 0.3426909149
+ 0.3437392116
+ 0.3447869122
+ 0.3458350003
+ 0.3468832076
+ 0.3479309082
+ 0.3489786088
+ 0.3500263095
+ 0.3510748148
+ 0.3521223962
+ 0.3531706035
+ 0.3542183042
+ 0.3552643061
+ 0.3563081026
+ 0.3573493958
+ 0.3583877981
+ 0.3594241142
+ 0.3604596853
+ 0.3614932895
+ 0.3625242114
+ 0.3635517061
+ 0.3645758927
+ 0.3655968010
+ 0.3666146100
+ 0.3676308095
+ 0.3686437011
+ 0.3696531951
+ 0.3706597984
+ 0.3716636896
+ 0.3726654053
+ 0.3736641109
+ 0.3746609092
+ 0.3756552041
+ 0.3766474128
+ 0.3776386082
+ 0.3786295056
+ 0.3796210885
+ 0.3806126118
+ 0.3816055954
+ 0.3825981021
+ 0.3835909069
+ 0.3845843971
+ 0.3855786026
+ 0.3865729868
+ 0.3875676095
+ 0.3885630965
+ 0.3895589113
+ 0.3905552030
+ 0.3915528059
+ 0.3925518990
+ 0.3935522139
+ 0.3945525885
+ 0.3955546916
+ 0.3965587914
+ 0.3975653052
+ 0.3985737860
+ 0.3995841146
+ 0.4005962908
+ 0.4016096890
+ 0.4026258886
+ 0.4036448896
+ 0.4046654999
+ 0.4056873918
+ 0.4067110121
+ 0.4077360928
+ 0.4087626040
+ 0.4097931087
+ 0.4108271897
+ 0.4118641913
+ 0.4129031003
+ 0.4139435887
+ 0.4149853885
+ 0.4160276055
+ 0.4170711040
+ 0.4181162119
+ 0.4191623926
+ 0.4202099144
+ 0.4212583899
+ 0.4223065972
+ 0.4233539999
+ 0.4244020879
+ 0.4254502952
+ 0.4264976084
+ 0.4275454879
+ 0.4285939932
+ 0.4296421111
+ 0.4306895137
+ 0.4317376912
+ 0.4327858984
+ 0.4338330925
+ 0.4348810017
+ 0.4359295964
+ 0.4369775951
+ 0.4380249977
+ 0.4390732050
+ 0.4401214123
+ 0.4411686063
+ 0.4422164857
+ 0.4432651997
+ 0.4443131089
+ 0.4453606009
+ 0.4464088082
+ 0.4474568963
+ 0.4485040903
+ 0.4495520890
+ 0.4506008029
+ 0.4516485929
+ 0.4526961148
+ 0.4537442923
+ 0.4547924101
+ 0.4558396041
+ 0.4568876028
+ 0.4579362869
+ 0.4589839876
+ 0.4600316882
+ 0.4610798061
+ 0.4621278942
+ 0.4631750882
+ 0.4642232060
+ 0.4652718902
+ 0.4663195014
+ 0.4673672020
+ 0.4684154093
+ 0.4694634080
+ 0.4705106914
+ 0.4715586901
+ 0.4726074934
+ 0.4736549854
+ 0.4747028053
+ 0.4757508934
+ 0.4767988920
+ 0.4778462052
+ 0.4788942039
+ 0.4799430966
+ 0.4809904993
+ 0.4820382893
+ 0.4830864966
+ 0.4841342866
+ 0.4851816893
+ 0.4862298071
+ 0.4872786999
+ 0.4883260131
+ 0.4893738031
+ 0.4904220104
+ 0.4914698005
+ 0.4925172925
+ 0.4935654104
+ 0.4946143031
+ 0.4956614971
+ 0.4967094064
+ 0.4977576137
+ 0.4988053143
+ 0.4998528063
+ 0.5009009838
+ 0.5019497871
+ 0.5029969215
+ 0.5040448904
+ 0.5050930977
+ 0.5061408281
+ 0.5071883202
+ 0.5082365870
+ 0.5092852712
+ 0.5103324056
+ 0.5113804936
+ 0.5124287009
+ 0.5134763122
+ 0.5145239234
+ 0.5155721903
+ 0.5166208148
+ 0.5176678896
+ 0.5187159777
+ 0.5197641850
+ 0.5208117962
+ 0.5218594074
+ 0.5229076743
+ 0.5239562988
+ 0.5250033736
+ 0.5260515809
+ 0.5270997882
+ 0.5281472802
+ 0.5291950107
+ 0.5302432775
+ 0.5312917829
+ 0.5323389769
+ 0.5333871245
+ 0.5344352722
+ 0.5354828238
+ 0.5365304947
+ 0.5375788808
+ 0.5386273265
+ 0.5396745205
+ 0.5407227278
+ 0.5417708755
+ 0.5428183079
+ 0.5438659787
+ 0.5449144840
+ 0.5459626913
+ 0.5470100045
+ 0.5480582118
+ 0.5491064191
+ 0.5501537919
+ 0.5512015820
+ 0.5522500873
+ 0.5532981753
+ 0.5543456078
+ 0.5553936958
+ 0.5564420223
+ 0.5574892759
+ 0.5585371256
+ 0.5595856905
+ 0.5606337190
+ 0.5616810918
+ 0.5627292991
+ 0.5637775064
+ 0.5648247004
+ 0.5658726096
+ 0.5669211745
+ 0.5679692030
+ 0.5690163970
+ 0.5700634122
+ 0.5711091757
+ 0.5721533895
+ 0.5731964707
+ 0.5742384791
+ 0.5752782226
+ 0.5763154030
+ 0.5773493052
+ 0.5783768892
+ 0.5793967247
+ 0.5804104805
+ 0.5814169049
+ 0.5824149251
+ 0.5834047794
+ 0.5843868852
+ 0.5853602290
+ 0.5863254070
+ 0.5872825980
+ 0.5882346034
+ 0.5891796947
+ 0.5901175141
+ 0.5910484195
+ 0.5919718146
+ 0.5928866863
+ 0.5937936902
+ 0.5946958065
+ 0.5955929160
+ 0.5964863896
+ 0.5973765254
+ 0.5982630849
+ 0.5991474986
+ 0.6000298262
+ 0.6009125710
+ 0.6017950773
+ 0.6026778221
+ 0.6035615206
+ 0.6044462919
+ 0.6053317189
+ 0.6062173843
+ 0.6071026921
+ 0.6079885960
+ 0.6088755727
+ 0.6097620726
+ 0.6106479764
+ 0.6115351915
+ 0.6124256849
+ 0.6133217216
+ 0.6142216921
+ 0.6151272058
+ 0.6160376072
+ 0.6169527173
+ 0.6178737283
+ 0.6188027263
+ 0.6197397113
+ 0.6206821203
+ 0.6216303110
+ 0.6225833893
+ 0.6235426068
+ 0.6245095134
+ 0.6254850030
+ 0.6264699101
+ 0.6274635792
+ 0.6284654737
+ 0.6294741035
+ 0.6304889917
+ 0.6315106750
+ 0.6325399280
+ 0.6335754991
+ 0.6346142292
+ 0.6356559992
+ 0.6366981864
+ 0.6377419233
+ 0.6387875080
+ 0.6398347020
+ 0.6408823729
+ 0.6419299841
+ 0.6429790854
+ 0.6440268755
+ 0.6450746059
+ 0.6461223960
+ 0.6471703053
+ 0.6482179761
+ 0.6492655277
+ 0.6503146887
+ 0.6513624191
+ 0.6524100900
+ 0.6534578800
+ 0.6545057893
+ 0.6555535197
+ 0.6566010714
+ 0.6576502919
+ 0.6586980224
+ 0.6597455740
+ 0.6607934833
+ 0.6618412733
+ 0.6628890038
+ 0.6639366746
+ 0.6649858952
+ 0.6660335064
+ 0.6670811772
+ 0.6681290269
+ 0.6691768169
+ 0.6702244878
+ 0.6712722778
+ 0.6723213792
+ 0.6733689904
+ 0.6744167209
+ 0.6754645109
+ 0.6765123010
+ 0.6775599718
+ 0.6786078811
+ 0.6796569228
+ 0.6807044744
+ 0.6817513704
+ 0.6827965975
+ 0.6838402748
+ 0.6848834753
+ 0.6859273911
+ 0.6869723797
+ 0.6880162954
+ 0.6890599728
+ 0.6901013255
+ 0.6911396980
+ 0.6921761036
+ 0.6932122111
+ 0.6942487955
+ 0.6952843070
+ 0.6963180900
+ 0.6973488927
+ 0.6983770728
+ 0.6994026899
+ 0.7004272938
+ 0.7014517188
+ 0.7024747133
+ 0.7034965158
+ 0.7045164704
+ 0.7055342793
+ 0.7065513730
+ 0.7075693011
+ 0.7085878849
+ 0.7096056938
+ 0.7106239200
+ 0.7116401792
+ 0.7126544118
+ 0.7136672139
+ 0.7146797776
+ 0.7156928778
+ 0.7167074084
+ 0.7177237272
+ 0.7187396884
+ 0.7197557092
+ 0.7207708955
+ 0.7217856050
+ 0.7227994204
+ 0.7238122225
+ 0.7248240113
+ 0.7258350253
+ 0.7268440127
+ 0.7278503776
+ 0.7288548946
+ 0.7298564911
+ 0.7308545709
+ 0.7318491936
+ 0.7328398228
+ 0.7338244915
+ 0.7348057032
+ 0.7357832789
+ 0.7367560267
+ 0.7377241850
+ 0.7386888862
+ 0.7396495938
+ 0.7406045794
+ 0.7415547967
+ 0.7425006032
+ 0.7434419990
+ 0.7443798780
+ 0.7453150749
+ 0.7462481856
+ 0.7471804023
+ 0.7481107712
+ 0.7490395904
+ 0.7499657869
+ 0.7508903742
+ 0.7518150210
+ 0.7527397871
+ 0.7536643744
+ 0.7545883060
+ 0.7555134296
+ 0.7564398050
+ 0.7573670149
+ 0.7582947016
+ 0.7592232227
+ 0.7601537108
+ 0.7610865235
+ 0.7620201111
+ 0.7629551888
+ 0.7638924122
+ 0.7648314238
+ 0.7657712102
+ 0.7667114735
+ 0.7676535845
+ 0.7685970068
+ 0.7695416212
+ 0.7704880238
+ 0.7714353204
+ 0.7723832130
+ 0.7733322978
+ 0.7742838264
+ 0.7752370238
+ 0.7761909962
+ 0.7771469951
+ 0.7781038880
+ 0.7790613770
+ 0.7800198793
+ 0.7809798121
+ 0.7819411755
+ 0.7829020023
+ 0.7838628888
+ 0.7848243117
+ 0.7857862115
+ 0.7867478132
+ 0.7877084017
+ 0.7886680961
+ 0.7896274924
+ 0.7905864716
+ 0.7915449142
+ 0.7925025225
+ 0.7934594154
+ 0.7944151759
+ 0.7953701019
+ 0.7963243127
+ 0.7972785234
+ 0.7982317209
+ 0.7991852760
+ 0.8001390100
+ 0.8010920286
+ 0.8020442128
+ 0.8029962182
+ 0.8039492965
+ 0.8049013019
+ 0.8058534861
+ 0.8068069220
+ 0.8077614903
+ 0.8087171912
+ 0.8096737266
+ 0.8106310964
+ 0.8115898967
+ 0.8125504851
+ 0.8135117292
+ 0.8144730926
+ 0.8154355288
+ 0.8163995743
+ 0.8173645139
+ 0.8183292150
+ 0.8192948103
+ 0.8202611208
+ 0.8212277889
+ 0.8221948743
+ 0.8231617808
+ 0.8241283894
+ 0.8250942826
+ 0.8260607123
+ 0.8270269036
+ 0.8279932737
+ 0.8289610147
+ 0.8299307227
+ 0.8309032917
+ 0.8318769932
+ 0.8328524828
+ 0.8338282704
+ 0.8348054886
+ 0.8357861042
+ 0.8367711902
+ 0.8377606273
+ 0.8387532234
+ 0.8397489190
+ 0.8407462239
+ 0.8417472839
+ 0.8427532911
+ 0.8437641859
+ 0.8447790146
+ 0.8457974195
+ 0.8468207717
+ 0.8478456736
+ 0.8488733768
+ 0.8499053717
+ 0.8509420156
+ 0.8519824147
+ 0.8530250788
+ 0.8540698290
+ 0.8551142812
+ 0.8561593294
+ 0.8572056293
+ 0.8582528830
+ 0.8593006134
+ 0.8603482842
+ 0.8613973856
+ 0.8624451160
+ 0.8634920716
+ 0.8645371199
+ 0.8655791283
+ 0.8666179776
+ 0.8676548004
+ 0.8686900735
+ 0.8697226048
+ 0.8707528710
+ 0.8717787862
+ 0.8727999926
+ 0.8738167882
+ 0.8748298287
+ 0.8758404255
+ 0.8768457770
+ 0.8778470755
+ 0.8788424730
+ 0.8798323870
+ 0.8808172941
+ 0.8817983866
+ 0.8827769756
+ 0.8837512732
+ 0.8847230077
+ 0.8856912255
+ 0.8866552711
+ 0.8876156807
+ 0.8885743022
+ 0.8895329833
+ 0.8904910088
+ 0.8914486766
+ 0.8924050927
+ 0.8933603764
+ 0.8943151832
+ 0.8952693939
+ 0.8962222934
+ 0.8971732855
+ 0.8981227875
+ 0.8990685940
+ 0.9000113010
+ 0.9009503126
+ 0.9018849134
+ 0.9028136134
+ 0.9037343860
+ 0.9046463966
+ 0.9055463076
+ 0.9064350128
+ 0.9073122144
+ 0.9081791043
+ 0.9090356827
+ 0.9098809958
+ 0.9107148051
+ 0.9115344882
+ 0.9123430252
+ 0.9131417871
+ 0.9139323235
+ 0.9147145152
+ 0.9154878259
+ 0.9162527919
+ 0.9170091748
+ 0.9177588224
+ 0.9185020924
+ 0.9192394018
+ 0.9199714065
+ 0.9206994176
+ 0.9214246869
+ 0.9221466780
+ 0.9228668809
+ 0.9235867262
+ 0.9243060946
+ 0.9250255823
+ 0.9257463217
+ 0.9264692068
+ 0.9271945953
+ 0.9279209971
+ 0.9286499023
+ 0.9293829203
+ 0.9301195741
+ 0.9308602214
+ 0.9316061139
+ 0.9323577285
+ 0.9331133962
+ 0.9338728786
+ 0.9346380830
+ 0.9354091287
+ 0.9361863136
+ 0.9369704127
+ 0.9377611279
+ 0.9385566115
+ 0.9393566251
+ 0.9401628971
+ 0.9409751892
+ 0.9417932034
+ 0.9426162839
+ 0.9434437156
+ 0.9442740083
+ 0.9451068044
+ 0.9459424019
+ 0.9467787147
+ 0.9476162195
+ 0.9484547973
+ 0.9492936134
+ 0.9501317143
+ 0.9509698153
+ 0.9518089294
+ 0.9526466727
+ 0.9534838200
+ 0.9543187022
+ 0.9551491737
+ 0.9559733272
+ 0.9567909241
+ 0.9575985074
+ 0.9583951831
+ 0.9591814876
+ 0.9599570036
+ 0.9607214928
+ 0.9614744782
+ 0.9622160196
+ 0.9629415870
+ 0.9636477828
+ 0.9643381238
+ 0.9650136828
+ 0.9656763077
+ 0.9663271904
+ 0.9669669271
+ 0.9675945044
+ 0.9682068825
+ 0.9688068032
+ 0.9693955779
+ 0.9699755907
+ 0.9705489278
+ 0.9711167216
+ 0.9716787934
+ 0.9722322226
+ 0.9727811813
+ 0.9733269215
+ 0.9738715291
+ 0.9744166136
+ 0.9749621153
+ 0.9755073190
+ 0.9760522246
+ 0.9765970707
+ 0.9771423936
+ 0.9776893854
+ 0.9782382250
+ 0.9787877202
+ 0.9793367982
+ 0.9798851013
+ 0.9804323912
+ 0.9809777737
+ 0.9815199971
+ 0.9820588231
+ 0.9825943708
+ 0.9831265211
+ 0.9836531281
+ 0.9841737151
+ 0.9846891761
+ 0.9851980805
+ 0.9857000709
+ 0.9861956239
+ 0.9866847992
+ 0.9871674180
+ 0.9876440167
+ 0.9881147146
+ 0.9885799289
+ 0.9890390038
+ 0.9894917011
+ 0.9899380803
+ 0.9903783798
+ 0.9908131957
+ 0.9912436008
+ 0.9916706085
+ 0.9920943975
+ 0.9925168157
+ 0.9929386973
+ 0.9933599234
+ 0.9937797189
+ 0.9941993952
+ 0.9946184158
+ 0.9950373173
+ 0.9954559803
+ 0.9958732724
+ 0.9962888956
+ 0.9967045188
+ 0.9971199036
+ 0.9975342751
+ 0.9979482293
+ 0.9983612895
+ 0.9987732172
+ 0.9991837740
+ 0.9995930195
+ 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/kodak_kai-0372.spi1d b/release/datafiles/colormanagement/luts/film_response/kodak_kai-0372.spi1d
new file mode 100644
index 00000000000..11eae36ae74
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/kodak_kai-0372.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 1
+{
+ 0.0000000000
+ 0.0014187270
+ 0.0028485169
+ 0.0042931479
+ 0.0057487562
+ 0.0072099129
+ 0.0086716842
+ 0.0101303104
+ 0.0115825599
+ 0.0130244503
+ 0.0144514600
+ 0.0158604495
+ 0.0172503907
+ 0.0186199509
+ 0.0199686904
+ 0.0212968104
+ 0.0226029102
+ 0.0238885507
+ 0.0251513291
+ 0.0263916291
+ 0.0276103709
+ 0.0288079195
+ 0.0299857892
+ 0.0311455000
+ 0.0322885215
+ 0.0334165096
+ 0.0345297195
+ 0.0356270298
+ 0.0367095582
+ 0.0377803184
+ 0.0388391204
+ 0.0398863591
+ 0.0409265012
+ 0.0419625007
+ 0.0429961495
+ 0.0440296903
+ 0.0450651906
+ 0.0461052805
+ 0.0471526794
+ 0.0482083187
+ 0.0492714494
+ 0.0503420308
+ 0.0514214598
+ 0.0525106192
+ 0.0536095686
+ 0.0547187701
+ 0.0558380783
+ 0.0569689386
+ 0.0581119917
+ 0.0592671484
+ 0.0604341701
+ 0.0616126209
+ 0.0628031567
+ 0.0640061498
+ 0.0652208924
+ 0.0664469600
+ 0.0676843375
+ 0.0689309686
+ 0.0701846108
+ 0.0714438409
+ 0.0727065727
+ 0.0739705265
+ 0.0752329826
+ 0.0764907077
+ 0.0777410120
+ 0.0789828077
+ 0.0802149475
+ 0.0814361572
+ 0.0826453418
+ 0.0838416368
+ 0.0850252435
+ 0.0861970633
+ 0.0873567313
+ 0.0885045677
+ 0.0896422267
+ 0.0907687172
+ 0.0918845534
+ 0.0929897428
+ 0.0940850228
+ 0.0951717719
+ 0.0962497294
+ 0.0973178074
+ 0.0983761922
+ 0.0994268134
+ 0.1004718989
+ 0.1015126035
+ 0.1025492996
+ 0.1035822034
+ 0.1046125963
+ 0.1056426987
+ 0.1066747978
+ 0.1077087969
+ 0.1087436005
+ 0.1097813025
+ 0.1108229011
+ 0.1118687019
+ 0.1129188985
+ 0.1139732003
+ 0.1150322035
+ 0.1160956025
+ 0.1171633974
+ 0.1182366982
+ 0.1193158031
+ 0.1204013005
+ 0.1214938983
+ 0.1225937977
+ 0.1236993000
+ 0.1248105019
+ 0.1259278059
+ 0.1270509064
+ 0.1281802952
+ 0.1293144971
+ 0.1304522008
+ 0.1315927953
+ 0.1327365935
+ 0.1338832974
+ 0.1350333989
+ 0.1361864060
+ 0.1373412013
+ 0.1384979934
+ 0.1396571994
+ 0.1408192068
+ 0.1419841945
+ 0.1431522071
+ 0.1443247050
+ 0.1455022991
+ 0.1466850936
+ 0.1478727013
+ 0.1490653008
+ 0.1502631009
+ 0.1514662057
+ 0.1526743025
+ 0.1538881063
+ 0.1551087052
+ 0.1563372016
+ 0.1575720012
+ 0.1588124931
+ 0.1600576937
+ 0.1613081992
+ 0.1625638008
+ 0.1638233066
+ 0.1650867015
+ 0.1663545072
+ 0.1676256955
+ 0.1688988060
+ 0.1701712012
+ 0.1714410037
+ 0.1727070063
+ 0.1739681065
+ 0.1752225012
+ 0.1764675975
+ 0.1777033061
+ 0.1789285988
+ 0.1801432073
+ 0.1813486964
+ 0.1825450063
+ 0.1837306023
+ 0.1849053055
+ 0.1860695928
+ 0.1872238964
+ 0.1883683056
+ 0.1895032972
+ 0.1906294972
+ 0.1917479932
+ 0.1928582937
+ 0.1939616054
+ 0.1950584054
+ 0.1961483955
+ 0.1972329021
+ 0.1983121932
+ 0.1993871927
+ 0.2004588991
+ 0.2015292943
+ 0.2025997043
+ 0.2036705017
+ 0.2047414035
+ 0.2058123052
+ 0.2068836987
+ 0.2079551965
+ 0.2090263963
+ 0.2100979984
+ 0.2111708969
+ 0.2122471929
+ 0.2133263052
+ 0.2144072950
+ 0.2154909968
+ 0.2165782005
+ 0.2176689953
+ 0.2187630981
+ 0.2198591977
+ 0.2209576964
+ 0.2220599949
+ 0.2231667042
+ 0.2242773026
+ 0.2253910005
+ 0.2265066952
+ 0.2276258022
+ 0.2287493050
+ 0.2298769057
+ 0.2310086936
+ 0.2321445048
+ 0.2332839072
+ 0.2344263941
+ 0.2355709970
+ 0.2367177010
+ 0.2378668934
+ 0.2390172035
+ 0.2401686013
+ 0.2413198054
+ 0.2424692959
+ 0.2436169982
+ 0.2447617054
+ 0.2459024042
+ 0.2470397949
+ 0.2481732070
+ 0.2493015975
+ 0.2504242957
+ 0.2515400052
+ 0.2526471913
+ 0.2537457049
+ 0.2548359036
+ 0.2559179068
+ 0.2569903135
+ 0.2580535114
+ 0.2591086030
+ 0.2601554990
+ 0.2611947060
+ 0.2622261941
+ 0.2632490993
+ 0.2642633021
+ 0.2652696073
+ 0.2662687898
+ 0.2672609985
+ 0.2682465911
+ 0.2692261040
+ 0.2702012062
+ 0.2711735070
+ 0.2721416056
+ 0.2731072903
+ 0.2740713060
+ 0.2750340104
+ 0.2759960890
+ 0.2769576907
+ 0.2779189944
+ 0.2788805068
+ 0.2798438966
+ 0.2808105946
+ 0.2817816138
+ 0.2827576995
+ 0.2837403119
+ 0.2847315073
+ 0.2857330143
+ 0.2867462039
+ 0.2877714932
+ 0.2888084948
+ 0.2898587883
+ 0.2909233868
+ 0.2920028865
+ 0.2930966914
+ 0.2942047119
+ 0.2953279912
+ 0.2964681983
+ 0.2976255119
+ 0.2987984121
+ 0.2999858856
+ 0.3011890948
+ 0.3024066985
+ 0.3036352992
+ 0.3048754930
+ 0.3061271012
+ 0.3073874116
+ 0.3086515963
+ 0.3099172115
+ 0.3111822903
+ 0.3124446869
+ 0.3137021959
+ 0.3149535060
+ 0.3161973953
+ 0.3174318075
+ 0.3186556995
+ 0.3198691010
+ 0.3210715055
+ 0.3222627044
+ 0.3234440982
+ 0.3246166110
+ 0.3257783055
+ 0.3269309998
+ 0.3280749023
+ 0.3292089999
+ 0.3303337097
+ 0.3314495981
+ 0.3325574100
+ 0.3336577117
+ 0.3347519934
+ 0.3358413875
+ 0.3369264007
+ 0.3380081058
+ 0.3390851021
+ 0.3401587903
+ 0.3412316144
+ 0.3423039913
+ 0.3433766961
+ 0.3444486856
+ 0.3455202878
+ 0.3465914130
+ 0.3476617932
+ 0.3487313986
+ 0.3498007059
+ 0.3508692086
+ 0.3519366980
+ 0.3530029953
+ 0.3540687859
+ 0.3551346064
+ 0.3562012017
+ 0.3572680950
+ 0.3583359122
+ 0.3594044149
+ 0.3604733944
+ 0.3615426123
+ 0.3626110852
+ 0.3636786044
+ 0.3647457063
+ 0.3658131063
+ 0.3668813109
+ 0.3679508865
+ 0.3690212965
+ 0.3700926006
+ 0.3711653054
+ 0.3722378910
+ 0.3733103871
+ 0.3743830025
+ 0.3754549921
+ 0.3765265942
+ 0.3775976896
+ 0.3786680102
+ 0.3797375858
+ 0.3808068037
+ 0.3818753064
+ 0.3829427958
+ 0.3840090036
+ 0.3850749135
+ 0.3861418962
+ 0.3872109056
+ 0.3882800937
+ 0.3893499076
+ 0.3904218972
+ 0.3914968073
+ 0.3925746083
+ 0.3936544955
+ 0.3947367072
+ 0.3958213925
+ 0.3969092071
+ 0.3980003893
+ 0.3990949988
+ 0.4001933932
+ 0.4012970924
+ 0.4024052918
+ 0.4035159945
+ 0.4046308994
+ 0.4057500064
+ 0.4068731964
+ 0.4080010056
+ 0.4091325998
+ 0.4102680981
+ 0.4114075899
+ 0.4125505984
+ 0.4136967063
+ 0.4148448110
+ 0.4159938991
+ 0.4171437919
+ 0.4182941914
+ 0.4194458127
+ 0.4205985963
+ 0.4217509925
+ 0.4229008853
+ 0.4240474999
+ 0.4251902997
+ 0.4263280034
+ 0.4274600148
+ 0.4285857975
+ 0.4297052026
+ 0.4308179021
+ 0.4319226146
+ 0.4330177009
+ 0.4341033101
+ 0.4351783991
+ 0.4362432957
+ 0.4372982979
+ 0.4383428991
+ 0.4393776059
+ 0.4404034913
+ 0.4414204061
+ 0.4424285889
+ 0.4434289932
+ 0.4444229007
+ 0.4454112053
+ 0.4463939071
+ 0.4473721981
+ 0.4483464062
+ 0.4493157864
+ 0.4502818882
+ 0.4512456954
+ 0.4522084892
+ 0.4531711042
+ 0.4541336894
+ 0.4550961852
+ 0.4560593963
+ 0.4570237100
+ 0.4579895139
+ 0.4589586854
+ 0.4599328041
+ 0.4609122872
+ 0.4618987143
+ 0.4628936052
+ 0.4638980031
+ 0.4649139047
+ 0.4659439027
+ 0.4669868946
+ 0.4680424035
+ 0.4691106081
+ 0.4701919854
+ 0.4712862968
+ 0.4723939002
+ 0.4735164940
+ 0.4746555984
+ 0.4758110046
+ 0.4769817889
+ 0.4781683981
+ 0.4793711007
+ 0.4805893898
+ 0.4818193913
+ 0.4830603004
+ 0.4843108952
+ 0.4855696857
+ 0.4868358970
+ 0.4881083071
+ 0.4893856049
+ 0.4906665087
+ 0.4919497073
+ 0.4932326972
+ 0.4945130944
+ 0.4957897067
+ 0.4970611036
+ 0.4983257055
+ 0.4995830953
+ 0.5008316040
+ 0.5020682216
+ 0.5032951832
+ 0.5045124292
+ 0.5057162046
+ 0.5069069862
+ 0.5080850720
+ 0.5092489123
+ 0.5103979707
+ 0.5115343928
+ 0.5126597285
+ 0.5137739182
+ 0.5148767829
+ 0.5159683228
+ 0.5170493722
+ 0.5181217790
+ 0.5191835165
+ 0.5202353001
+ 0.5212790966
+ 0.5223165751
+ 0.5233479738
+ 0.5243744254
+ 0.5253980756
+ 0.5264204144
+ 0.5274419188
+ 0.5284639001
+ 0.5294873118
+ 0.5305123925
+ 0.5315392017
+ 0.5325689912
+ 0.5336017013
+ 0.5346363187
+ 0.5356730819
+ 0.5367122293
+ 0.5377532840
+ 0.5387955904
+ 0.5398390293
+ 0.5408840179
+ 0.5419310927
+ 0.5429803729
+ 0.5440319777
+ 0.5450868011
+ 0.5461450219
+ 0.5472044945
+ 0.5482643843
+ 0.5493268967
+ 0.5503926873
+ 0.5514603257
+ 0.5525295138
+ 0.5535998940
+ 0.5546712279
+ 0.5557432771
+ 0.5568156838
+ 0.5578880906
+ 0.5589600801
+ 0.5600317717
+ 0.5611037016
+ 0.5621762276
+ 0.5632488728
+ 0.5643215775
+ 0.5653941035
+ 0.5664659739
+ 0.5675367713
+ 0.5686054826
+ 0.5696707964
+ 0.5707319975
+ 0.5717889071
+ 0.5728414059
+ 0.5738887787
+ 0.5749312043
+ 0.5759691000
+ 0.5770025849
+ 0.5780308247
+ 0.5790535808
+ 0.5800703168
+ 0.5810797811
+ 0.5820823908
+ 0.5830807090
+ 0.5840756297
+ 0.5850659013
+ 0.5860515833
+ 0.5870333910
+ 0.5880113840
+ 0.5889859200
+ 0.5899571776
+ 0.5909250975
+ 0.5918905139
+ 0.5928549767
+ 0.5938175917
+ 0.5947793126
+ 0.5957412124
+ 0.5967022181
+ 0.5976634026
+ 0.5986256003
+ 0.5995882750
+ 0.6005504727
+ 0.6015123725
+ 0.6024752855
+ 0.6034411192
+ 0.6044095755
+ 0.6053802967
+ 0.6063545942
+ 0.6073334813
+ 0.6083168983
+ 0.6093050838
+ 0.6102979183
+ 0.6112931967
+ 0.6122915149
+ 0.6132950187
+ 0.6143041849
+ 0.6153184175
+ 0.6163371205
+ 0.6173605919
+ 0.6183896065
+ 0.6194241047
+ 0.6204634905
+ 0.6215072870
+ 0.6225566268
+ 0.6236104965
+ 0.6246663928
+ 0.6257253885
+ 0.6267880201
+ 0.6278533936
+ 0.6289204955
+ 0.6299880743
+ 0.6310554743
+ 0.6321223974
+ 0.6331890821
+ 0.6342563033
+ 0.6353240013
+ 0.6363924742
+ 0.6374620795
+ 0.6385326982
+ 0.6396048069
+ 0.6406791806
+ 0.6417564750
+ 0.6428371072
+ 0.6439194083
+ 0.6450036168
+ 0.6460906863
+ 0.6471815109
+ 0.6482766867
+ 0.6493766904
+ 0.6504800916
+ 0.6515864134
+ 0.6526964903
+ 0.6538105011
+ 0.6549285054
+ 0.6560505033
+ 0.6571758986
+ 0.6583045721
+ 0.6594374180
+ 0.6605746746
+ 0.6617149115
+ 0.6628565192
+ 0.6639989018
+ 0.6651424170
+ 0.6662871838
+ 0.6674332023
+ 0.6685804129
+ 0.6697282791
+ 0.6708768010
+ 0.6720256209
+ 0.6731721759
+ 0.6743155122
+ 0.6754553914
+ 0.6765918732
+ 0.6777250171
+ 0.6788529754
+ 0.6799747944
+ 0.6810904145
+ 0.6821988225
+ 0.6832993031
+ 0.6843917966
+ 0.6854761839
+ 0.6865515113
+ 0.6876170039
+ 0.6886734962
+ 0.6897208095
+ 0.6907575727
+ 0.6917873025
+ 0.6928105950
+ 0.6938270926
+ 0.6948360205
+ 0.6958370209
+ 0.6968308091
+ 0.6978185773
+ 0.6988012791
+ 0.6997786760
+ 0.7007514834
+ 0.7017211914
+ 0.7026876807
+ 0.7036520243
+ 0.7046157122
+ 0.7055789828
+ 0.7065418959
+ 0.7075042725
+ 0.7084662914
+ 0.7094286084
+ 0.7103922963
+ 0.7113580704
+ 0.7123268843
+ 0.7132992744
+ 0.7142757773
+ 0.7152578831
+ 0.7162470222
+ 0.7172421813
+ 0.7182437181
+ 0.7192531824
+ 0.7202717066
+ 0.7212985754
+ 0.7223340273
+ 0.7233784199
+ 0.7244324088
+ 0.7254965901
+ 0.7265704274
+ 0.7276533246
+ 0.7287458181
+ 0.7298483849
+ 0.7309604883
+ 0.7320820093
+ 0.7332108021
+ 0.7343450189
+ 0.7354853153
+ 0.7366309166
+ 0.7377815247
+ 0.7389364839
+ 0.7400947213
+ 0.7412542105
+ 0.7424135208
+ 0.7435715199
+ 0.7447264194
+ 0.7458763719
+ 0.7470207214
+ 0.7481592894
+ 0.7492917776
+ 0.7504174113
+ 0.7515341043
+ 0.7526403069
+ 0.7537366748
+ 0.7548218966
+ 0.7558972239
+ 0.7569634914
+ 0.7580205798
+ 0.7590687275
+ 0.7601084113
+ 0.7611390948
+ 0.7621600032
+ 0.7631716728
+ 0.7641760707
+ 0.7651739717
+ 0.7661651969
+ 0.7671486735
+ 0.7681260109
+ 0.7690988183
+ 0.7700666189
+ 0.7710312009
+ 0.7719941735
+ 0.7729566097
+ 0.7739174962
+ 0.7748776078
+ 0.7758383155
+ 0.7767999768
+ 0.7777621150
+ 0.7787244916
+ 0.7796872258
+ 0.7806501985
+ 0.7816135883
+ 0.7825772762
+ 0.7835413218
+ 0.7845047116
+ 0.7854663730
+ 0.7864274979
+ 0.7873893976
+ 0.7883517742
+ 0.7893143296
+ 0.7902770042
+ 0.7912396193
+ 0.7922011018
+ 0.7931612134
+ 0.7941213846
+ 0.7950831056
+ 0.7960450053
+ 0.7970073223
+ 0.7979699969
+ 0.7989329100
+ 0.7998961806
+ 0.8008598089
+ 0.8018236756
+ 0.8027874231
+ 0.8037496805
+ 0.8047108054
+ 0.8056722879
+ 0.8066347241
+ 0.8075972199
+ 0.8085597754
+ 0.8095226288
+ 0.8104845881
+ 0.8114448190
+ 0.8124048710
+ 0.8133671284
+ 0.8143309951
+ 0.8152961731
+ 0.8162639141
+ 0.8172360063
+ 0.8182134032
+ 0.8191961050
+ 0.8201839924
+ 0.8211780787
+ 0.8221784234
+ 0.8231853843
+ 0.8242005110
+ 0.8252243996
+ 0.8262565136
+ 0.8272976875
+ 0.8283491135
+ 0.8294097185
+ 0.8304784894
+ 0.8315557837
+ 0.8326426744
+ 0.8337395787
+ 0.8348457217
+ 0.8359597921
+ 0.8370814919
+ 0.8382107019
+ 0.8393465281
+ 0.8404887915
+ 0.8416360021
+ 0.8427860141
+ 0.8439379930
+ 0.8450908065
+ 0.8462439775
+ 0.8473960161
+ 0.8485453725
+ 0.8496916890
+ 0.8508347273
+ 0.8519737124
+ 0.8531072140
+ 0.8542333841
+ 0.8553516269
+ 0.8564621210
+ 0.8575645089
+ 0.8586577177
+ 0.8597412109
+ 0.8608148098
+ 0.8618785143
+ 0.8629317284
+ 0.8639749885
+ 0.8650091290
+ 0.8660346270
+ 0.8670523167
+ 0.8680629730
+ 0.8690673709
+ 0.8700646162
+ 0.8710550070
+ 0.8720393777
+ 0.8730176091
+ 0.8739910126
+ 0.8749604225
+ 0.8759278059
+ 0.8768939972
+ 0.8778584003
+ 0.8788213134
+ 0.8797836900
+ 0.8807460070
+ 0.8817077279
+ 0.8826689720
+ 0.8836311102
+ 0.8845937848
+ 0.8855553865
+ 0.8865150809
+ 0.8874728084
+ 0.8884277940
+ 0.8893800974
+ 0.8903309107
+ 0.8912788033
+ 0.8922230005
+ 0.8931636810
+ 0.8941028714
+ 0.8950411081
+ 0.8959773779
+ 0.8969107866
+ 0.8978416920
+ 0.8987693787
+ 0.8996942043
+ 0.9006167054
+ 0.9015371799
+ 0.9024555087
+ 0.9033702016
+ 0.9042806029
+ 0.9051871896
+ 0.9060915709
+ 0.9069947004
+ 0.9078966975
+ 0.9087975025
+ 0.9096974730
+ 0.9105958939
+ 0.9114922881
+ 0.9123886228
+ 0.9132850766
+ 0.9141798019
+ 0.9150691032
+ 0.9159536958
+ 0.9168338180
+ 0.9177089930
+ 0.9185785055
+ 0.9194408059
+ 0.9202948809
+ 0.9211413264
+ 0.9219813943
+ 0.9228157997
+ 0.9236447215
+ 0.9244682193
+ 0.9252852798
+ 0.9260939956
+ 0.9268960953
+ 0.9276924133
+ 0.9284831285
+ 0.9292683005
+ 0.9300467968
+ 0.9308174849
+ 0.9315804839
+ 0.9323381186
+ 0.9330930114
+ 0.9338461757
+ 0.9345973730
+ 0.9353471994
+ 0.9360958934
+ 0.9368441105
+ 0.9375926256
+ 0.9383410811
+ 0.9390903115
+ 0.9398398995
+ 0.9405894279
+ 0.9413390756
+ 0.9420892000
+ 0.9428393245
+ 0.9435886741
+ 0.9443354011
+ 0.9450780153
+ 0.9458169937
+ 0.9465532899
+ 0.9472861886
+ 0.9480143785
+ 0.9487375021
+ 0.9494557977
+ 0.9501700997
+ 0.9508795142
+ 0.9515821934
+ 0.9522789717
+ 0.9529712796
+ 0.9536584020
+ 0.9543386102
+ 0.9550122023
+ 0.9556815028
+ 0.9563481808
+ 0.9570119977
+ 0.9576709867
+ 0.9583243728
+ 0.9589740038
+ 0.9596223235
+ 0.9602677822
+ 0.9609097242
+ 0.9615486264
+ 0.9621847272
+ 0.9628177285
+ 0.9634479284
+ 0.9640747905
+ 0.9646962881
+ 0.9653108716
+ 0.9659178257
+ 0.9665163755
+ 0.9671065211
+ 0.9676873088
+ 0.9682564139
+ 0.9688133001
+ 0.9693595767
+ 0.9698956013
+ 0.9704216719
+ 0.9709377885
+ 0.9714441895
+ 0.9719427228
+ 0.9724339247
+ 0.9729166031
+ 0.9733896852
+ 0.9738553166
+ 0.9743154049
+ 0.9747707248
+ 0.9752202034
+ 0.9756631851
+ 0.9761012197
+ 0.9765369296
+ 0.9769701958
+ 0.9774006009
+ 0.9778288007
+ 0.9782562256
+ 0.9786834121
+ 0.9791104794
+ 0.9795380831
+ 0.9799662828
+ 0.9803938866
+ 0.9808201194
+ 0.9812436104
+ 0.9816619754
+ 0.9820752144
+ 0.9824826717
+ 0.9828830957
+ 0.9832751155
+ 0.9836578965
+ 0.9840303063
+ 0.9843910933
+ 0.9847406745
+ 0.9850798845
+ 0.9854090214
+ 0.9857276082
+ 0.9860363007
+ 0.9863356948
+ 0.9866275191
+ 0.9869117141
+ 0.9871860147
+ 0.9874522090
+ 0.9877108932
+ 0.9879605770
+ 0.9882022738
+ 0.9884371161
+ 0.9886657000
+ 0.9888893962
+ 0.9891092777
+ 0.9893258214
+ 0.9895405769
+ 0.9897546768
+ 0.9899684191
+ 0.9901812077
+ 0.9903942943
+ 0.9906080961
+ 0.9908217788
+ 0.9910365939
+ 0.9912521243
+ 0.9914677143
+ 0.9916833043
+ 0.9918984771
+ 0.9921129942
+ 0.9923266172
+ 0.9925395846
+ 0.9927518964
+ 0.9929633737
+ 0.9931753278
+ 0.9933875799
+ 0.9935998917
+ 0.9938135147
+ 0.9940276146
+ 0.9942417741
+ 0.9944561124
+ 0.9946699739
+ 0.9948837757
+ 0.9950978160
+ 0.9953122139
+ 0.9955270886
+ 0.9957417846
+ 0.9959560037
+ 0.9961696267
+ 0.9963824153
+ 0.9965956211
+ 0.9968093038
+ 0.9970229864
+ 0.9972379208
+ 0.9974533916
+ 0.9976689816
+ 0.9978845716
+ 0.9980998039
+ 0.9983143210
+ 0.9985278249
+ 0.9987403750
+ 0.9989517927
+ 0.9991620183
+ 0.9993718863
+ 0.9995810986
+ 0.9997903705
+ 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/kodak_kai-1010.spi1d b/release/datafiles/colormanagement/luts/film_response/kodak_kai-1010.spi1d
new file mode 100644
index 00000000000..8fb1df72c44
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/kodak_kai-1010.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 1
+{
+ 0.0000000000
+ 0.0015970930
+ 0.0032108270
+ 0.0048384252
+ 0.0064732390
+ 0.0081081763
+ 0.0097375941
+ 0.0113548804
+ 0.0129528800
+ 0.0145261399
+ 0.0160703696
+ 0.0175831709
+ 0.0190630294
+ 0.0205102507
+ 0.0219259299
+ 0.0233127493
+ 0.0246715993
+ 0.0260010492
+ 0.0272994898
+ 0.0285670608
+ 0.0298028998
+ 0.0310098194
+ 0.0321902186
+ 0.0333435684
+ 0.0344703794
+ 0.0355738886
+ 0.0366554409
+ 0.0377166718
+ 0.0387589782
+ 0.0397843607
+ 0.0407951698
+ 0.0417945310
+ 0.0427865982
+ 0.0437750705
+ 0.0447619408
+ 0.0457485691
+ 0.0467366986
+ 0.0477271006
+ 0.0487186685
+ 0.0497123487
+ 0.0507081710
+ 0.0517065898
+ 0.0527076609
+ 0.0537111685
+ 0.0547169782
+ 0.0557249896
+ 0.0567362607
+ 0.0577516407
+ 0.0587707087
+ 0.0597942285
+ 0.0608223192
+ 0.0618541911
+ 0.0628895611
+ 0.0639279112
+ 0.0649689585
+ 0.0660121813
+ 0.0670581907
+ 0.0681073666
+ 0.0691590682
+ 0.0702132285
+ 0.0712696612
+ 0.0723281205
+ 0.0733884126
+ 0.0744497478
+ 0.0755119175
+ 0.0765746608
+ 0.0776376799
+ 0.0787018836
+ 0.0797673315
+ 0.0808331519
+ 0.0818990618
+ 0.0829651132
+ 0.0840317011
+ 0.0850984082
+ 0.0861652717
+ 0.0872325823
+ 0.0882994309
+ 0.0893664882
+ 0.0904344097
+ 0.0915023014
+ 0.0925698727
+ 0.0936371982
+ 0.0947050005
+ 0.0957735702
+ 0.0968423486
+ 0.0979111120
+ 0.0989789367
+ 0.1000462994
+ 0.1011143997
+ 0.1021834984
+ 0.1032544971
+ 0.1043291986
+ 0.1054088995
+ 0.1064950973
+ 0.1075880006
+ 0.1086886004
+ 0.1097972989
+ 0.1109144986
+ 0.1120416969
+ 0.1131796017
+ 0.1143285036
+ 0.1154886037
+ 0.1166604012
+ 0.1178442016
+ 0.1190397963
+ 0.1202476025
+ 0.1214689016
+ 0.1227027997
+ 0.1239494979
+ 0.1252094954
+ 0.1264819056
+ 0.1277655959
+ 0.1290591955
+ 0.1303616017
+ 0.1316712052
+ 0.1329866052
+ 0.1343073994
+ 0.1356315017
+ 0.1369580030
+ 0.1382858008
+ 0.1396144927
+ 0.1409430057
+ 0.1422718018
+ 0.1436003000
+ 0.1449290067
+ 0.1462575048
+ 0.1475863010
+ 0.1489147991
+ 0.1502435058
+ 0.1515720040
+ 0.1529008001
+ 0.1542291939
+ 0.1555580050
+ 0.1568865031
+ 0.1582152992
+ 0.1595436931
+ 0.1608725041
+ 0.1622010022
+ 0.1635297984
+ 0.1648582071
+ 0.1661870033
+ 0.1675153971
+ 0.1688434035
+ 0.1701688021
+ 0.1714915931
+ 0.1728098989
+ 0.1741224974
+ 0.1754271984
+ 0.1767227948
+ 0.1780070066
+ 0.1792788059
+ 0.1805343926
+ 0.1817727983
+ 0.1829933971
+ 0.1841960996
+ 0.1853809059
+ 0.1865482926
+ 0.1876983047
+ 0.1888300031
+ 0.1899435073
+ 0.1910407990
+ 0.1921222061
+ 0.1931896061
+ 0.1942428052
+ 0.1952829063
+ 0.1963098943
+ 0.1973251998
+ 0.1983291954
+ 0.1993234009
+ 0.2003085017
+ 0.2012864053
+ 0.2022587955
+ 0.2032283992
+ 0.2041957974
+ 0.2051616013
+ 0.2061273009
+ 0.2070931047
+ 0.2080595940
+ 0.2090270072
+ 0.2099955976
+ 0.2109649032
+ 0.2119348943
+ 0.2129058987
+ 0.2138797939
+ 0.2148582041
+ 0.2158416957
+ 0.2168301046
+ 0.2178225964
+ 0.2188192010
+ 0.2198204994
+ 0.2208279073
+ 0.2218416035
+ 0.2228616029
+ 0.2238875031
+ 0.2249186039
+ 0.2259557992
+ 0.2269994020
+ 0.2280489057
+ 0.2291045040
+ 0.2301660031
+ 0.2312328964
+ 0.2323053926
+ 0.2333831042
+ 0.2344655991
+ 0.2355525047
+ 0.2366431057
+ 0.2377368063
+ 0.2388329953
+ 0.2399305999
+ 0.2410296053
+ 0.2421302944
+ 0.2432314008
+ 0.2443311065
+ 0.2454299033
+ 0.2465299964
+ 0.2476332933
+ 0.2487404048
+ 0.2498511970
+ 0.2509643137
+ 0.2520790994
+ 0.2531974018
+ 0.2543210089
+ 0.2554507852
+ 0.2565864921
+ 0.2577267885
+ 0.2588709891
+ 0.2600202858
+ 0.2611759901
+ 0.2623381019
+ 0.2635067105
+ 0.2646813989
+ 0.2658607960
+ 0.2670449913
+ 0.2682338953
+ 0.2694280148
+ 0.2706277072
+ 0.2718321085
+ 0.2730394900
+ 0.2742492855
+ 0.2754603922
+ 0.2766728103
+ 0.2778874040
+ 0.2791036963
+ 0.2803192139
+ 0.2815321982
+ 0.2827436030
+ 0.2839539051
+ 0.2851620913
+ 0.2863675058
+ 0.2875689864
+ 0.2887648046
+ 0.2899549007
+ 0.2911390960
+ 0.2923170924
+ 0.2934887111
+ 0.2946529090
+ 0.2958090901
+ 0.2969568968
+ 0.2980965972
+ 0.2992289066
+ 0.3003537953
+ 0.3014717996
+ 0.3025816977
+ 0.3036831915
+ 0.3047770858
+ 0.3058654070
+ 0.3069495857
+ 0.3080292046
+ 0.3091028929
+ 0.3101705909
+ 0.3112339079
+ 0.3122943938
+ 0.3133535087
+ 0.3144116104
+ 0.3154678941
+ 0.3165228963
+ 0.3175787926
+ 0.3186368942
+ 0.3196958899
+ 0.3207564056
+ 0.3218187094
+ 0.3228828907
+ 0.3239508867
+ 0.3250220120
+ 0.3260951936
+ 0.3271706104
+ 0.3282474875
+ 0.3293263912
+ 0.3304072917
+ 0.3314906955
+ 0.3325760067
+ 0.3336637020
+ 0.3347538114
+ 0.3358460069
+ 0.3369395137
+ 0.3380326927
+ 0.3391278088
+ 0.3402253985
+ 0.3413242996
+ 0.3424232900
+ 0.3435212970
+ 0.3446190953
+ 0.3457185030
+ 0.3468185961
+ 0.3479177952
+ 0.3490158916
+ 0.3501127958
+ 0.3512093127
+ 0.3523041010
+ 0.3533973098
+ 0.3544895947
+ 0.3555799127
+ 0.3566688895
+ 0.3577584922
+ 0.3588475883
+ 0.3599354923
+ 0.3610216081
+ 0.3621057868
+ 0.3631885946
+ 0.3642696142
+ 0.3653489947
+ 0.3664267957
+ 0.3675036132
+ 0.3685795963
+ 0.3696550131
+ 0.3707289100
+ 0.3718005121
+ 0.3728711009
+ 0.3739413917
+ 0.3750106096
+ 0.3760792017
+ 0.3771468997
+ 0.3782134950
+ 0.3792808056
+ 0.3803485930
+ 0.3814165890
+ 0.3824853003
+ 0.3835538924
+ 0.3846215010
+ 0.3856872022
+ 0.3867521882
+ 0.3878181875
+ 0.3888849020
+ 0.3899520934
+ 0.3910199106
+ 0.3920885026
+ 0.3931584954
+ 0.3942297995
+ 0.3953022957
+ 0.3963758051
+ 0.3974499106
+ 0.3985247016
+ 0.3996005952
+ 0.4006777108
+ 0.4017564952
+ 0.4028376937
+ 0.4039207101
+ 0.4050048888
+ 0.4060907960
+ 0.4071780145
+ 0.4082660973
+ 0.4093562067
+ 0.4104484916
+ 0.4115422070
+ 0.4126375020
+ 0.4137335122
+ 0.4148307145
+ 0.4159297049
+ 0.4170301855
+ 0.4181306064
+ 0.4192298055
+ 0.4203279912
+ 0.4214271009
+ 0.4225274920
+ 0.4236279130
+ 0.4247274995
+ 0.4258260131
+ 0.4269242883
+ 0.4280230105
+ 0.4291217029
+ 0.4302200079
+ 0.4313178957
+ 0.4324154854
+ 0.4335126877
+ 0.4346086085
+ 0.4357028902
+ 0.4367968142
+ 0.4378911853
+ 0.4389862120
+ 0.4400813878
+ 0.4411762953
+ 0.4422703981
+ 0.4433647990
+ 0.4444605112
+ 0.4455575943
+ 0.4466555119
+ 0.4477527142
+ 0.4488491118
+ 0.4499464929
+ 0.4510458112
+ 0.4521470070
+ 0.4532484114
+ 0.4543491900
+ 0.4554497004
+ 0.4565511048
+ 0.4576537907
+ 0.4587570131
+ 0.4598602057
+ 0.4609631896
+ 0.4620659947
+ 0.4631690979
+ 0.4642724097
+ 0.4653758109
+ 0.4664795995
+ 0.4675835967
+ 0.4686864913
+ 0.4697881043
+ 0.4708893895
+ 0.4719910920
+ 0.4730935991
+ 0.4741966128
+ 0.4752987921
+ 0.4763998985
+ 0.4775001109
+ 0.4785997868
+ 0.4797008038
+ 0.4808028042
+ 0.4819043875
+ 0.4830043018
+ 0.4841024876
+ 0.4852007926
+ 0.4863008857
+ 0.4874025881
+ 0.4885045886
+ 0.4896053970
+ 0.4907051027
+ 0.4918052852
+ 0.4929065108
+ 0.4940088987
+ 0.4951120019
+ 0.4962143004
+ 0.4973159134
+ 0.4984172881
+ 0.4995189011
+ 0.5006219745
+ 0.5017260909
+ 0.5028306842
+ 0.5039374232
+ 0.5050470233
+ 0.5061581731
+ 0.5072711706
+ 0.5083870292
+ 0.5095049739
+ 0.5106257796
+ 0.5117477775
+ 0.5128695965
+ 0.5139923096
+ 0.5151175261
+ 0.5162450075
+ 0.5173735023
+ 0.5185019970
+ 0.5196316242
+ 0.5207641125
+ 0.5218989849
+ 0.5230355859
+ 0.5241733193
+ 0.5253111720
+ 0.5264499187
+ 0.5275893807
+ 0.5287293792
+ 0.5298690200
+ 0.5310084820
+ 0.5321471095
+ 0.5332846045
+ 0.5344207883
+ 0.5355551839
+ 0.5366871953
+ 0.5378178954
+ 0.5389484763
+ 0.5400791168
+ 0.5412082076
+ 0.5423350930
+ 0.5434600115
+ 0.5445839763
+ 0.5457080007
+ 0.5468308926
+ 0.5479511023
+ 0.5490679741
+ 0.5501825213
+ 0.5512952805
+ 0.5524055958
+ 0.5535135269
+ 0.5546203852
+ 0.5557265282
+ 0.5568308234
+ 0.5579332709
+ 0.5590345860
+ 0.5601357222
+ 0.5612370968
+ 0.5623382926
+ 0.5634381175
+ 0.5645357966
+ 0.5656321049
+ 0.5667272210
+ 0.5678204894
+ 0.5689107776
+ 0.5699964166
+ 0.5710760951
+ 0.5721501112
+ 0.5732188821
+ 0.5742821097
+ 0.5753387213
+ 0.5763881803
+ 0.5774298906
+ 0.5784643292
+ 0.5794925094
+ 0.5805140138
+ 0.5815274119
+ 0.5825325847
+ 0.5835304260
+ 0.5845211148
+ 0.5855050087
+ 0.5864828229
+ 0.5874555707
+ 0.5884236097
+ 0.5893865824
+ 0.5903437138
+ 0.5912957191
+ 0.5922436714
+ 0.5931885242
+ 0.5941303968
+ 0.5950701833
+ 0.5960083008
+ 0.5969455242
+ 0.5978826284
+ 0.5988199711
+ 0.5997573733
+ 0.6006944180
+ 0.6016309261
+ 0.6025679111
+ 0.6035056710
+ 0.6044442058
+ 0.6053841710
+ 0.6063274741
+ 0.6072760224
+ 0.6082304716
+ 0.6091914177
+ 0.6101577878
+ 0.6111288071
+ 0.6121054292
+ 0.6130893230
+ 0.6140809059
+ 0.6150801778
+ 0.6160869002
+ 0.6171011925
+ 0.6181237102
+ 0.6191561222
+ 0.6201986074
+ 0.6212494969
+ 0.6223081946
+ 0.6233735085
+ 0.6244443059
+ 0.6255208850
+ 0.6266024113
+ 0.6276888251
+ 0.6287800074
+ 0.6298750043
+ 0.6309717894
+ 0.6320694089
+ 0.6331679225
+ 0.6342682838
+ 0.6353698969
+ 0.6364706755
+ 0.6375694871
+ 0.6386672854
+ 0.6397666931
+ 0.6408684254
+ 0.6419709921
+ 0.6430730224
+ 0.6441742182
+ 0.6452761889
+ 0.6463810205
+ 0.6474881172
+ 0.6485970020
+ 0.6497082114
+ 0.6508216262
+ 0.6519368887
+ 0.6530544162
+ 0.6541745067
+ 0.6552979946
+ 0.6564245224
+ 0.6575521231
+ 0.6586806178
+ 0.6598100066
+ 0.6609410048
+ 0.6620740294
+ 0.6632086039
+ 0.6643440127
+ 0.6654803157
+ 0.6666182280
+ 0.6677569747
+ 0.6688960791
+ 0.6700353026
+ 0.6711744070
+ 0.6723119020
+ 0.6734473109
+ 0.6745814085
+ 0.6757146120
+ 0.6768456101
+ 0.6779726744
+ 0.6790955067
+ 0.6802144051
+ 0.6813290119
+ 0.6824392080
+ 0.6835449934
+ 0.6846470833
+ 0.6857451797
+ 0.6868383884
+ 0.6879264116
+ 0.6890088916
+ 0.6900870204
+ 0.6911612749
+ 0.6922308803
+ 0.6932950020
+ 0.6943535805
+ 0.6954085231
+ 0.6964603066
+ 0.6975083947
+ 0.6985530257
+ 0.6995959282
+ 0.7006379962
+ 0.7016788721
+ 0.7027179003
+ 0.7037551999
+ 0.7047919035
+ 0.7058281898
+ 0.7068638206
+ 0.7078987956
+ 0.7089341879
+ 0.7099704742
+ 0.7110071182
+ 0.7120435834
+ 0.7130793929
+ 0.7141141295
+ 0.7151473761
+ 0.7161788940
+ 0.7172086835
+ 0.7182366848
+ 0.7192623019
+ 0.7202852964
+ 0.7213062048
+ 0.7223259211
+ 0.7233440876
+ 0.7243599892
+ 0.7253736258
+ 0.7263845205
+ 0.7273933291
+ 0.7283999920
+ 0.7294043899
+ 0.7304064035
+ 0.7314063907
+ 0.7324048877
+ 0.7334017158
+ 0.7343968749
+ 0.7353904247
+ 0.7363826036
+ 0.7373743057
+ 0.7383652925
+ 0.7393556833
+ 0.7403460741
+ 0.7413364053
+ 0.7423262000
+ 0.7433158755
+ 0.7443063855
+ 0.7452973723
+ 0.7462878227
+ 0.7472770810
+ 0.7482659221
+ 0.7492548823
+ 0.7502439022
+ 0.7512320876
+ 0.7522203922
+ 0.7532092929
+ 0.7541986108
+ 0.7551875114
+ 0.7561764121
+ 0.7571650743
+ 0.7581533194
+ 0.7591395974
+ 0.7601243854
+ 0.7611085773
+ 0.7620921731
+ 0.7630745769
+ 0.7640557885
+ 0.7650362253
+ 0.7660158277
+ 0.7669950724
+ 0.7679738998
+ 0.7689527273
+ 0.7699314952
+ 0.7709106803
+ 0.7718899846
+ 0.7728688121
+ 0.7738466263
+ 0.7748246789
+ 0.7758036852
+ 0.7767832279
+ 0.7777634859
+ 0.7787454724
+ 0.7797296047
+ 0.7807155252
+ 0.7817035913
+ 0.7826942801
+ 0.7836887836
+ 0.7846868038
+ 0.7856897116
+ 0.7866985202
+ 0.7877131104
+ 0.7887325287
+ 0.7897546887
+ 0.7907801867
+ 0.7918102145
+ 0.7928441763
+ 0.7938814163
+ 0.7949218750
+ 0.7959659100
+ 0.7970144153
+ 0.7980663180
+ 0.7991213799
+ 0.8001785874
+ 0.8012385964
+ 0.8023005128
+ 0.8033639193
+ 0.8044286966
+ 0.8054934740
+ 0.8065580130
+ 0.8076239824
+ 0.8086903095
+ 0.8097563982
+ 0.8108221292
+ 0.8118875027
+ 0.8129522204
+ 0.8140147924
+ 0.8150777221
+ 0.8161420822
+ 0.8172072172
+ 0.8182731867
+ 0.8193401098
+ 0.8204079866
+ 0.8214777708
+ 0.8225491047
+ 0.8236216903
+ 0.8246955872
+ 0.8257701993
+ 0.8268460035
+ 0.8279229999
+ 0.8290016055
+ 0.8300824761
+ 0.8311660886
+ 0.8322516084
+ 0.8333384991
+ 0.8344269991
+ 0.8355159163
+ 0.8366057277
+ 0.8376973867
+ 0.8387901783
+ 0.8398838043
+ 0.8409780264
+ 0.8420727849
+ 0.8431686759
+ 0.8442658782
+ 0.8453642130
+ 0.8464624882
+ 0.8475595713
+ 0.8486564159
+ 0.8497542143
+ 0.8508523703
+ 0.8519496918
+ 0.8530451059
+ 0.8541380763
+ 0.8552293777
+ 0.8563184738
+ 0.8574041724
+ 0.8584862947
+ 0.8595638275
+ 0.8606367111
+ 0.8617051244
+ 0.8627687097
+ 0.8638274074
+ 0.8648813963
+ 0.8659303784
+ 0.8669738770
+ 0.8680111766
+ 0.8690428734
+ 0.8700705171
+ 0.8710942268
+ 0.8721132874
+ 0.8731275201
+ 0.8741363287
+ 0.8751401901
+ 0.8761405945
+ 0.8771389127
+ 0.8781350851
+ 0.8791291118
+ 0.8801203966
+ 0.8811098933
+ 0.8820986748
+ 0.8830870986
+ 0.8840739131
+ 0.8850582242
+ 0.8860396743
+ 0.8870177269
+ 0.8879904747
+ 0.8889573812
+ 0.8899183869
+ 0.8908733130
+ 0.8918204904
+ 0.8927587271
+ 0.8936867714
+ 0.8946046233
+ 0.8955129981
+ 0.8964123726
+ 0.8973016739
+ 0.8981794715
+ 0.8990461230
+ 0.8999027014
+ 0.9007506967
+ 0.9015905857
+ 0.9024220705
+ 0.9032449722
+ 0.9040595293
+ 0.9048662186
+ 0.9056664705
+ 0.9064612985
+ 0.9072514176
+ 0.9080368280
+ 0.9088181257
+ 0.9095960855
+ 0.9103735089
+ 0.9111509919
+ 0.9119281173
+ 0.9127063155
+ 0.9134865999
+ 0.9142683744
+ 0.9150518179
+ 0.9158385992
+ 0.9166294932
+ 0.9174247980
+ 0.9182245731
+ 0.9190281034
+ 0.9198362827
+ 0.9206498861
+ 0.9214689732
+ 0.9222937822
+ 0.9231243134
+ 0.9239605069
+ 0.9248024225
+ 0.9256507754
+ 0.9265056252
+ 0.9273657203
+ 0.9282308221
+ 0.9291006923
+ 0.9299767017
+ 0.9308583736
+ 0.9317452908
+ 0.9326366186
+ 0.9335306883
+ 0.9344261289
+ 0.9353219867
+ 0.9362199903
+ 0.9371207952
+ 0.9380227923
+ 0.9389240742
+ 0.9398236871
+ 0.9407200813
+ 0.9416117072
+ 0.9424964190
+ 0.9433727860
+ 0.9442400932
+ 0.9450957775
+ 0.9459366202
+ 0.9467617273
+ 0.9475710988
+ 0.9483641982
+ 0.9491404891
+ 0.9498987198
+ 0.9506378770
+ 0.9513601065
+ 0.9520673156
+ 0.9527601004
+ 0.9534382224
+ 0.9541031122
+ 0.9547548890
+ 0.9553934932
+ 0.9560201764
+ 0.9566345811
+ 0.9572381973
+ 0.9578328729
+ 0.9584187269
+ 0.9589971900
+ 0.9595693946
+ 0.9601373076
+ 0.9607033134
+ 0.9612680078
+ 0.9618327022
+ 0.9623975158
+ 0.9629616737
+ 0.9635255933
+ 0.9640890956
+ 0.9646533728
+ 0.9652183056
+ 0.9657815099
+ 0.9663417935
+ 0.9668993950
+ 0.9674541950
+ 0.9680057764
+ 0.9685540199
+ 0.9690970778
+ 0.9696341753
+ 0.9701663256
+ 0.9706926942
+ 0.9712131023
+ 0.9717286825
+ 0.9722387791
+ 0.9727417827
+ 0.9732379913
+ 0.9737278819
+ 0.9742118120
+ 0.9746910930
+ 0.9751664996
+ 0.9756376147
+ 0.9761040211
+ 0.9765653014
+ 0.9770221114
+ 0.9774755836
+ 0.9779269099
+ 0.9783759117
+ 0.9788222909
+ 0.9792655706
+ 0.9797067046
+ 0.9801476002
+ 0.9805889726
+ 0.9810296893
+ 0.9814689755
+ 0.9819055796
+ 0.9823380709
+ 0.9827659726
+ 0.9831880927
+ 0.9836019874
+ 0.9840061069
+ 0.9844006896
+ 0.9847850204
+ 0.9851579070
+ 0.9855204225
+ 0.9858720899
+ 0.9862110019
+ 0.9865372181
+ 0.9868519902
+ 0.9871559739
+ 0.9874501824
+ 0.9877349734
+ 0.9880086184
+ 0.9882714152
+ 0.9885252118
+ 0.9887697101
+ 0.9890058041
+ 0.9892352223
+ 0.9894577861
+ 0.9896727204
+ 0.9898800850
+ 0.9900823832
+ 0.9902830720
+ 0.9904839993
+ 0.9906855226
+ 0.9908869267
+ 0.9910880923
+ 0.9912897944
+ 0.9914922714
+ 0.9916949272
+ 0.9918974042
+ 0.9920992851
+ 0.9923006296
+ 0.9925016761
+ 0.9927030206
+ 0.9929041266
+ 0.9931046963
+ 0.9933041930
+ 0.9935020804
+ 0.9936985970
+ 0.9938936234
+ 0.9940873981
+ 0.9942802787
+ 0.9944714904
+ 0.9946609735
+ 0.9948499203
+ 0.9950379729
+ 0.9952244163
+ 0.9954094291
+ 0.9955927134
+ 0.9957733750
+ 0.9959521890
+ 0.9961301088
+ 0.9963076711
+ 0.9964857101
+ 0.9966629744
+ 0.9968385100
+ 0.9970129728
+ 0.9971876144
+ 0.9973618984
+ 0.9975370169
+ 0.9977136254
+ 0.9978904128
+ 0.9980655909
+ 0.9982392192
+ 0.9984129071
+ 0.9985876083
+ 0.9987636805
+ 0.9989405274
+ 0.9991179705
+ 0.9992954731
+ 0.9994722009
+ 0.9996479750
+ 0.9998239875
+ 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/kodak_kodachrome_200.spi1d b/release/datafiles/colormanagement/luts/film_response/kodak_kodachrome_200.spi1d
new file mode 100644
index 00000000000..05790a82756
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/kodak_kodachrome_200.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0001730574 0.0002039562 0.0002358485
+ 0.0003522631 0.0004149732 0.0004803593
+ 0.0005379661 0.0006318853 0.0007290206
+ 0.0007310679 0.0008542882 0.0009827145
+ 0.0009340477 0.0010819150 0.0012466050
+ 0.0011457250 0.0013172789 0.0015175150
+ 0.0013664630 0.0015590760 0.0017966420
+ 0.0015953979 0.0018074680 0.0020813060
+ 0.0018292820 0.0020661030 0.0023712160
+ 0.0020738509 0.0023327931 0.0026701461
+ 0.0023281691 0.0026087810 0.0029817061
+ 0.0025920530 0.0028905689 0.0033033220
+ 0.0028679480 0.0031836890 0.0036326619
+ 0.0031529539 0.0034913400 0.0039701960
+ 0.0034448660 0.0038095911 0.0043217931
+ 0.0037472011 0.0041361330 0.0046877442
+ 0.0040617771 0.0044678152 0.0050627491
+ 0.0043859989 0.0048073409 0.0054407581
+ 0.0047217272 0.0051559508 0.0058272062
+ 0.0050699208 0.0055170869 0.0062212390
+ 0.0054345722 0.0058912761 0.0066273510
+ 0.0058116391 0.0062767328 0.0070466590
+ 0.0062011848 0.0066723628 0.0074762749
+ 0.0066031339 0.0070798998 0.0079114493
+ 0.0070177661 0.0075020911 0.0083535369
+ 0.0074442741 0.0079338206 0.0088046975
+ 0.0078795254 0.0083771208 0.0092653846
+ 0.0083278697 0.0088326121 0.0097344546
+ 0.0087915091 0.0092987726 0.0102126198
+ 0.0092691761 0.0097725317 0.0107003897
+ 0.0097623114 0.0102546504 0.0111954799
+ 0.0102694500 0.0107495701 0.0116990302
+ 0.0107906098 0.0112578301 0.0122114504
+ 0.0113268001 0.0117790196 0.0127311097
+ 0.0118786199 0.0123126702 0.0132614998
+ 0.0124431401 0.0128612900 0.0138018904
+ 0.0130219003 0.0134234196 0.0143521996
+ 0.0136152301 0.0139996996 0.0149130402
+ 0.0142232198 0.0145876799 0.0154852197
+ 0.0148449196 0.0151869999 0.0160684697
+ 0.0154783595 0.0158025604 0.0166603103
+ 0.0161256995 0.0164336897 0.0172653906
+ 0.0167863201 0.0170805994 0.0178804602
+ 0.0174631495 0.0177476797 0.0185050704
+ 0.0181544498 0.0184269901 0.0191421397
+ 0.0188641995 0.0191224609 0.0197905600
+ 0.0195880793 0.0198333003 0.0204491094
+ 0.0203275606 0.0205603093 0.0211143699
+ 0.0210811403 0.0212992709 0.0217879806
+ 0.0218534302 0.0220546499 0.0224671308
+ 0.0226451308 0.0228254497 0.0231546499
+ 0.0234524105 0.0236116406 0.0238485206
+ 0.0242763907 0.0244143009 0.0245480109
+ 0.0251218900 0.0252302606 0.0252581500
+ 0.0259851404 0.0260641407 0.0259789899
+ 0.0268620700 0.0269184001 0.0267140791
+ 0.0277548693 0.0277873296 0.0274658203
+ 0.0286648702 0.0286731608 0.0282310992
+ 0.0295908507 0.0295777693 0.0290101692
+ 0.0305334404 0.0304972902 0.0298030600
+ 0.0314947292 0.0314330608 0.0306055099
+ 0.0324744582 0.0323868990 0.0314168893
+ 0.0334764086 0.0333601981 0.0322372504
+ 0.0344995111 0.0343528390 0.0330651999
+ 0.0355402492 0.0353610590 0.0339045897
+ 0.0365981199 0.0363844894 0.0347526409
+ 0.0376747511 0.0374244489 0.0356094018
+ 0.0387722701 0.0384774804 0.0364748016
+ 0.0398925804 0.0395460315 0.0373485014
+ 0.0410357118 0.0406353809 0.0382347293
+ 0.0421971716 0.0417462699 0.0391340293
+ 0.0433758609 0.0428716205 0.0400448591
+ 0.0445724390 0.0440130197 0.0409630090
+ 0.0457868986 0.0451716594 0.0418913700
+ 0.0470213406 0.0463434607 0.0428329296
+ 0.0482786596 0.0475279316 0.0437831692
+ 0.0495616607 0.0487296283 0.0447406098
+ 0.0508708991 0.0499518812 0.0457080491
+ 0.0522039905 0.0511935391 0.0466858111
+ 0.0535621308 0.0524507686 0.0476739705
+ 0.0549456812 0.0537222885 0.0486743301
+ 0.0563542917 0.0550098717 0.0496832319
+ 0.0577872396 0.0563169084 0.0507013202
+ 0.0592435412 0.0576429814 0.0517350510
+ 0.0607235916 0.0589821301 0.0527782217
+ 0.0622299090 0.0603348911 0.0538305715
+ 0.0637641624 0.0617051981 0.0548948608
+ 0.0653300881 0.0630972311 0.0559714995
+ 0.0669195279 0.0645076036 0.0570586994
+ 0.0685284436 0.0659297109 0.0581539795
+ 0.0701561198 0.0673606992 0.0592579208
+ 0.0718030334 0.0688040778 0.0603738800
+ 0.0734695569 0.0702652484 0.0615030490
+ 0.0751590133 0.0717460513 0.0626446307
+ 0.0768723935 0.0732394904 0.0637940615
+ 0.0786073431 0.0747426003 0.0649530664
+ 0.0803640932 0.0762560293 0.0661245733
+ 0.0821429417 0.0777818337 0.0673098490
+ 0.0839471966 0.0793204084 0.0685084313
+ 0.0857824534 0.0808681324 0.0697233528
+ 0.0876402482 0.0824251175 0.0709487796
+ 0.0895186588 0.0839939788 0.0721847713
+ 0.0914160535 0.0855768770 0.0734331012
+ 0.0933414400 0.0871768892 0.0746951923
+ 0.0952875987 0.0887894779 0.0759687126
+ 0.0972552076 0.0904145017 0.0772481188
+ 0.0992452875 0.0920512825 0.0785354823
+ 0.1012666970 0.0936988667 0.0798321664
+ 0.1033084020 0.0953587517 0.0811416209
+ 0.1053688005 0.0970306993 0.0824629217
+ 0.1074498966 0.0987144411 0.0837924406
+ 0.1095537990 0.1004106030 0.0851297081
+ 0.1116733998 0.1021208018 0.0864788592
+ 0.1138081029 0.1038433984 0.0878428370
+ 0.1159645021 0.1055795997 0.0892181471
+ 0.1181332022 0.1073433980 0.0906047598
+ 0.1203133017 0.1091196015 0.0920063481
+ 0.1225123033 0.1109066978 0.0934172571
+ 0.1247252971 0.1127050966 0.0948378369
+ 0.1269482970 0.1145213023 0.0962786898
+ 0.1291864067 0.1163515970 0.0977344289
+ 0.1314398050 0.1182034016 0.0992026329
+ 0.1337047964 0.1200674996 0.1006904021
+ 0.1359920055 0.1219405010 0.1021960005
+ 0.1382973045 0.1238282993 0.1037138999
+ 0.1406147927 0.1257331967 0.1052495018
+ 0.1429530978 0.1276489943 0.1068022996
+ 0.1453036964 0.1295824945 0.1083668992
+ 0.1476657987 0.1315266043 0.1099525020
+ 0.1500508040 0.1334788054 0.1115524024
+ 0.1524461955 0.1354573965 0.1131626964
+ 0.1548593938 0.1374479979 0.1147975996
+ 0.1572892964 0.1394518018 0.1164444983
+ 0.1597270072 0.1414680034 0.1181050986
+ 0.1621783972 0.1434909999 0.1197827980
+ 0.1646371931 0.1455283016 0.1214680970
+ 0.1671067029 0.1475757957 0.1231684014
+ 0.1695881933 0.1496292949 0.1248828992
+ 0.1720747054 0.1517004967 0.1266061962
+ 0.1745768040 0.1537802070 0.1283615977
+ 0.1770841032 0.1558783948 0.1301272064
+ 0.1796021014 0.1579937041 0.1319141984
+ 0.1821261942 0.1601195037 0.1337158978
+ 0.1846542060 0.1622675061 0.1355265975
+ 0.1871972978 0.1644203067 0.1373614073
+ 0.1897435039 0.1665845066 0.1392045021
+ 0.1922962070 0.1687586010 0.1410738975
+ 0.1948485970 0.1709450036 0.1429603994
+ 0.1974000037 0.1731521040 0.1448680013
+ 0.1999529004 0.1753689051 0.1467960030
+ 0.2025073022 0.1776115000 0.1487334073
+ 0.2050623000 0.1798598021 0.1506955028
+ 0.2076175958 0.1821341962 0.1526625007
+ 0.2101784945 0.1844155937 0.1546497941
+ 0.2127404958 0.1867152005 0.1566448063
+ 0.2153038979 0.1890224069 0.1586592048
+ 0.2178677022 0.1913391948 0.1606916934
+ 0.2204349041 0.1936641932 0.1627465039
+ 0.2230034024 0.1959953010 0.1648250967
+ 0.2255780995 0.1983426064 0.1669203043
+ 0.2281538993 0.2006970942 0.1690406948
+ 0.2307337970 0.2030775994 0.1711710989
+ 0.2333167940 0.2054647952 0.1733302027
+ 0.2359074056 0.2078783959 0.1754958034
+ 0.2384988964 0.2102957964 0.1776867956
+ 0.2410926074 0.2127331942 0.1798807979
+ 0.2436847985 0.2151719928 0.1820942014
+ 0.2462743968 0.2176246047 0.1843084991
+ 0.2488645017 0.2200776041 0.1865465939
+ 0.2514558136 0.2225456983 0.1887851954
+ 0.2540476024 0.2250140011 0.1910569072
+ 0.2566407025 0.2275063992 0.1933290064
+ 0.2592354119 0.2299994975 0.1956388056
+ 0.2618348897 0.2325156033 0.1979486048
+ 0.2644349933 0.2350329012 0.2002822012
+ 0.2670376897 0.2375658005 0.2026163042
+ 0.2696410120 0.2401002944 0.2049711943
+ 0.2722525895 0.2426490933 0.2073276043
+ 0.2748641074 0.2452007979 0.2097111940
+ 0.2774798870 0.2477629036 0.2120991051
+ 0.2800959945 0.2503288984 0.2145109028
+ 0.2827027142 0.2529033124 0.2169295996
+ 0.2853069007 0.2554830909 0.2193607986
+ 0.2879045010 0.2580693960 0.2217984051
+ 0.2904979885 0.2606629133 0.2242448032
+ 0.2930887938 0.2632611990 0.2266992033
+ 0.2956756949 0.2658706009 0.2291606069
+ 0.2982619107 0.2684814036 0.2316346020
+ 0.3008450866 0.2711029053 0.2341126055
+ 0.3034282923 0.2737244070 0.2366093993
+ 0.3060013056 0.2763522863 0.2391061932
+ 0.3085739017 0.2789807022 0.2416251004
+ 0.3111369014 0.2816146910 0.2441447973
+ 0.3136956990 0.2842512131 0.2466782033
+ 0.3162499070 0.2868914008 0.2492164969
+ 0.3187974095 0.2895368934 0.2517606020
+ 0.3213433921 0.2921831906 0.2543109953
+ 0.3238751888 0.2948344946 0.2568640113
+ 0.3264068961 0.2974858880 0.2594281137
+ 0.3289282918 0.3001478016 0.2619921863
+ 0.3314462900 0.3028118908 0.2645705938
+ 0.3339582086 0.3054809868 0.2671507895
+ 0.3364607096 0.3081552088 0.2697336972
+ 0.3389630914 0.3108294010 0.2723186910
+ 0.3414388001 0.3135038018 0.2749026120
+ 0.3439145088 0.3161781132 0.2774826884
+ 0.3463768065 0.3188591003 0.2800627947
+ 0.3488295972 0.3215422034 0.2826369107
+ 0.3512794971 0.3242281079 0.2852098048
+ 0.3537116945 0.3269194067 0.2877875865
+ 0.3561440110 0.3296107054 0.2903720140
+ 0.3585642874 0.3322994113 0.2929564118
+ 0.3609788120 0.3349879086 0.2955451012
+ 0.3633924127 0.3376730978 0.2981339097
+ 0.3658021092 0.3403542042 0.3007180095
+ 0.3682116866 0.3430353105 0.3032977879
+ 0.3706200123 0.3457179964 0.3058773875
+ 0.3730275035 0.3484008908 0.3084514141
+ 0.3754344881 0.3510805964 0.3110255003
+ 0.3778376877 0.3537563086 0.3135905862
+ 0.3802408874 0.3564321101 0.3161478043
+ 0.3826422989 0.3591000140 0.3187049925
+ 0.3850421906 0.3617669940 0.3212369084
+ 0.3874421120 0.3644312024 0.3237684965
+ 0.3898290098 0.3670895100 0.3262920082
+ 0.3922148049 0.3697476983 0.3288041949
+ 0.3945944011 0.3723874092 0.3313164115
+ 0.3969587982 0.3750202060 0.3338195086
+ 0.3993231058 0.3776504993 0.3363206089
+ 0.4016804099 0.3802587092 0.3388189077
+ 0.4040333927 0.3828668892 0.3413054943
+ 0.4063864946 0.3854654133 0.3437921107
+ 0.4087263942 0.3880515099 0.3462659121
+ 0.4110653996 0.3906376958 0.3487288952
+ 0.4134008884 0.3932111859 0.3511919975
+ 0.4157232046 0.3957807124 0.3536264896
+ 0.4180454910 0.3983494937 0.3560566008
+ 0.4203620851 0.4009037912 0.3584819138
+ 0.4226720035 0.4034580886 0.3608815968
+ 0.4249818921 0.4060049951 0.3632813096
+ 0.4272814989 0.4085350931 0.3656719923
+ 0.4295763969 0.4110653102 0.3680498004
+ 0.4318712056 0.4135862887 0.3704276979
+ 0.4341445863 0.4160991907 0.3727912009
+ 0.4364148080 0.4186122119 0.3751470149
+ 0.4386841953 0.4211213887 0.3775027096
+ 0.4409301877 0.4236291945 0.3798316121
+ 0.4431762993 0.4261370003 0.3821555972
+ 0.4454182088 0.4286366105 0.3844789863
+ 0.4476383030 0.4311352968 0.3867709041
+ 0.4498583972 0.4336335957 0.3890627027
+ 0.4520725906 0.4361194074 0.3913497925
+ 0.4542694986 0.4386051893 0.3936108947
+ 0.4564662874 0.4410878122 0.3958719075
+ 0.4586519897 0.4435504973 0.3981297910
+ 0.4608140886 0.4460130930 0.4003787935
+ 0.4629763067 0.4484688938 0.4026277065
+ 0.4651244879 0.4508990049 0.4048694074
+ 0.4672470987 0.4533290863 0.4070971012
+ 0.4693697989 0.4557510018 0.4093249142
+ 0.4714809954 0.4581488967 0.4115391076
+ 0.4735712111 0.4605467916 0.4137321115
+ 0.4756614864 0.4629383981 0.4159250855
+ 0.4777419865 0.4653125107 0.4181059897
+ 0.4798024893 0.4676867127 0.4202688932
+ 0.4818629026 0.4700528085 0.4224317074
+ 0.4839158952 0.4723933935 0.4245786965
+ 0.4859476089 0.4747340083 0.4266997874
+ 0.4879794121 0.4770675004 0.4288209081
+ 0.4900068939 0.4793699086 0.4309298098
+ 0.4920125008 0.4816722870 0.4330140054
+ 0.4940181971 0.4839723110 0.4350981116
+ 0.4960232973 0.4862492085 0.4371761978
+ 0.4980137050 0.4885261953 0.4392358065
+ 0.5000041127 0.4908030927 0.4412953854
+ 0.5019946098 0.4930540919 0.4433520138
+ 0.5039594769 0.4953044951 0.4453881085
+ 0.5059207082 0.4975548983 0.4474242032
+ 0.5078818798 0.4997824132 0.4494602084
+ 0.5098254085 0.5020049810 0.4514681101
+ 0.5117604136 0.5042275190 0.4534752965
+ 0.5136954188 0.5064237118 0.4554825127
+ 0.5156211853 0.5086045861 0.4574632049
+ 0.5175352097 0.5107855201 0.4594367146
+ 0.5194491744 0.5129476190 0.4614103138
+ 0.5213580728 0.5150821805 0.4633643031
+ 0.5232421756 0.5172169209 0.4653035104
+ 0.5251262784 0.5193458796 0.4672426879
+ 0.5270103812 0.5214424729 0.4691694975
+ 0.5288773179 0.5235390067 0.4710688889
+ 0.5307416916 0.5256354809 0.4729683995
+ 0.5326061249 0.5277007818 0.4748673141
+ 0.5344613791 0.5297605991 0.4767382145
+ 0.5363087058 0.5318204165 0.4786092043
+ 0.5381559134 0.5338671207 0.4804801047
+ 0.5400000215 0.5359017849 0.4823342860
+ 0.5418263078 0.5379365087 0.4841809869
+ 0.5436527133 0.5399680138 0.4860278070
+ 0.5454791188 0.5419824719 0.4878644049
+ 0.5472977161 0.5439968705 0.4896807075
+ 0.5491135716 0.5460113287 0.4914970100
+ 0.5509294868 0.5480144024 0.4933133125
+ 0.5527412295 0.5500137210 0.4951044023
+ 0.5545426011 0.5520130992 0.4968936145
+ 0.5563439727 0.5540094972 0.4986828864
+ 0.5581454039 0.5559996963 0.5004619956
+ 0.5599331260 0.5579897761 0.5022308230
+ 0.5617172718 0.5599799752 0.5039995909
+ 0.5635015965 0.5619543791 0.5057681203
+ 0.5652781725 0.5639256835 0.5075237751
+ 0.5670350790 0.5658969283 0.5092794895
+ 0.5687919259 0.5678616166 0.5110352039
+ 0.5705487728 0.5698119998 0.5127810836
+ 0.5722795725 0.5717625022 0.5145177245
+ 0.5740000010 0.5737128854 0.5162543058
+ 0.5757204890 0.5756404996 0.5179908276
+ 0.5774372816 0.5775611997 0.5197011828
+ 0.5791262984 0.5794818997 0.5214105248
+ 0.5808153152 0.5813961029 0.5231198072
+ 0.5825042129 0.5832800865 0.5248202085
+ 0.5841786861 0.5851641297 0.5265055895
+ 0.5858368874 0.5870479941 0.5281910896
+ 0.5874952078 0.5889140964 0.5298765898
+ 0.5891535282 0.5907651186 0.5315344930
+ 0.5907946825 0.5926162004 0.5331832170
+ 0.5924314260 0.5944672227 0.5348318219
+ 0.5940682292 0.5962749720 0.5364782810
+ 0.5957034230 0.5980765820 0.5381013751
+ 0.5973179936 0.5998781919 0.5397245884
+ 0.5989326239 0.6016728878 0.5413476825
+ 0.6005473137 0.6034333706 0.5429692268
+ 0.6021553278 0.6051939130 0.5445882082
+ 0.6037486792 0.6069543958 0.5462071896
+ 0.6053420901 0.6087045074 0.5478262901
+ 0.6069355011 0.6104400754 0.5494415760
+ 0.6085183024 0.6121757030 0.5510547757
+ 0.6100909710 0.6139113903 0.5526679754
+ 0.6116636992 0.6156324148 0.5542811751
+ 0.6132364273 0.6173446774 0.5558875799
+ 0.6147910953 0.6190569997 0.5574927926
+ 0.6163368225 0.6207693219 0.5590980053
+ 0.6178824902 0.6224603057 0.5607026815
+ 0.6194280982 0.6241456866 0.5622801781
+ 0.6209585071 0.6258311272 0.5638577938
+ 0.6224846840 0.6275166273 0.5654352903
+ 0.6240109205 0.6291700006 0.5670077801
+ 0.6255372167 0.6308205724 0.5685514212
+ 0.6270471811 0.6324712038 0.5700950027
+ 0.6285545826 0.6341215968 0.5716385841
+ 0.6300619841 0.6357386112 0.5731750131
+ 0.6315693855 0.6373555064 0.5746886730
+ 0.6330655813 0.6389724016 0.5762023926
+ 0.6345605254 0.6405878067 0.5777161121
+ 0.6360552907 0.6421716809 0.5792214870
+ 0.6375501156 0.6437556744 0.5807061791
+ 0.6390339136 0.6453396082 0.5821908116
+ 0.6405161023 0.6469221711 0.5836755037
+ 0.6419982910 0.6484758854 0.5851554871
+ 0.6434804797 0.6500297189 0.5866240859
+ 0.6449518800 0.6515833735 0.5880926847
+ 0.6464208961 0.6531370878 0.5895612240
+ 0.6478899121 0.6546549797 0.5910267234
+ 0.6493589282 0.6561728716 0.5924829245
+ 0.6508315802 0.6576908231 0.5939390063
+ 0.6523056030 0.6592087150 0.5953950882
+ 0.6537796259 0.6606941223 0.5968484879
+ 0.6552537084 0.6621763706 0.5982881188
+ 0.6567261219 0.6636587977 0.5997276902
+ 0.6581972837 0.6651412249 0.6011673808
+ 0.6596685052 0.6666092873 0.6026061773
+ 0.6611397266 0.6680734754 0.6040263772
+ 0.6626036763 0.6695376039 0.6054465771
+ 0.6640564799 0.6710017920 0.6068667769
+ 0.6655092835 0.6724609733 0.6082869768
+ 0.6669620872 0.6739168167 0.6096944213
+ 0.6684113145 0.6753727198 0.6110997796
+ 0.6698417068 0.6768286228 0.6125053167
+ 0.6712719798 0.6782851815 0.6139106750
+ 0.6727023125 0.6797429919 0.6153100133
+ 0.6741325855 0.6812009215 0.6167058945
+ 0.6755437255 0.6826586723 0.6181018949
+ 0.6769521236 0.6841160059 0.6194978952
+ 0.6783605218 0.6855689287 0.6208894253
+ 0.6797689795 0.6870219111 0.6222738028
+ 0.6811653972 0.6884748936 0.6236581206
+ 0.6825522780 0.6899278760 0.6250424981
+ 0.6839390993 0.6913648248 0.6264259219
+ 0.6853259206 0.6927976012 0.6277984977
+ 0.6867079735 0.6942304969 0.6291711926
+ 0.6880686283 0.6956632733 0.6305438280
+ 0.6894292831 0.6970888972 0.6319164038
+ 0.6907898784 0.6985052824 0.6332756281
+ 0.6921504736 0.6999217272 0.6346296072
+ 0.6934959888 0.7013381124 0.6359835863
+ 0.6948367953 0.7027540803 0.6373376250
+ 0.6961774826 0.7041571140 0.6386855245
+ 0.6975182295 0.7055600882 0.6400206089
+ 0.6988571882 0.7069631219 0.6413556933
+ 0.7001917958 0.7083662152 0.6426907778
+ 0.7015264034 0.7097566724 0.6440259218
+ 0.7028610110 0.7111378908 0.6453583837
+ 0.7041956186 0.7125192285 0.6466904879
+ 0.7055236101 0.7139005065 0.6480225921
+ 0.7068496943 0.7152801752 0.6493546963
+ 0.7081757784 0.7166393995 0.6506857872
+ 0.7095018029 0.7179986238 0.6520152092
+ 0.7108235955 0.7193577886 0.6533446908
+ 0.7121292949 0.7207170129 0.6546741128
+ 0.7134348750 0.7220675945 0.6560035944
+ 0.7147405148 0.7234103084 0.6573339105
+ 0.7160462141 0.7247529030 0.6586644053
+ 0.7173392177 0.7260956168 0.6599950194
+ 0.7186235189 0.7274382114 0.6613255143
+ 0.7199078798 0.7287701964 0.6626539230
+ 0.7211923003 0.7301012278 0.6639747024
+ 0.7224767208 0.7314321995 0.6652954817
+ 0.7237458229 0.7327631712 0.6666163206
+ 0.7250137925 0.7340887785 0.6679372191
+ 0.7262817025 0.7353991866 0.6692438722
+ 0.7275496721 0.7367095947 0.6705400944
+ 0.7288151979 0.7380200028 0.6718363166
+ 0.7300717235 0.7393304110 0.6731324792
+ 0.7313283086 0.7406290770 0.6744287014
+ 0.7325847745 0.7419185042 0.6757104993
+ 0.7338414192 0.7432078719 0.6769903898
+ 0.7350922823 0.7444974184 0.6782702208
+ 0.7363361716 0.7457867861 0.6795499921
+ 0.7375801206 0.7470659018 0.6808269024
+ 0.7388241291 0.7483425140 0.6820834875
+ 0.7400680184 0.7496191263 0.6833400726
+ 0.7413054109 0.7508956790 0.6845965981
+ 0.7425388098 0.7521722913 0.6858531833
+ 0.7437722087 0.7534267902 0.6871013045
+ 0.7450056076 0.7546814084 0.6883319020
+ 0.7462391257 0.7559359074 0.6895623803
+ 0.7474638224 0.7571905255 0.6907929778
+ 0.7486857176 0.7584406137 0.6920235753
+ 0.7499076128 0.7596641779 0.6932476759
+ 0.7511295080 0.7608876824 0.6944645047
+ 0.7523514032 0.7621111870 0.6956813931
+ 0.7535635829 0.7633348107 0.6968982816
+ 0.7547737956 0.7645512819 0.6981152296
+ 0.7559840083 0.7657446265 0.6993272901
+ 0.7571942210 0.7669377923 0.7005357742
+ 0.7584043741 0.7681310773 0.7017441988
+ 0.7596076727 0.7693244219 0.7029526830
+ 0.7608097196 0.7705097795 0.7041612267
+ 0.7620118260 0.7716736197 0.7053571939
+ 0.7632138729 0.7728374004 0.7065454125
+ 0.7644159794 0.7740011811 0.7077335715
+ 0.7655978799 0.7751650810 0.7089217901
+ 0.7667754889 0.7763243914 0.7101098895
+ 0.7679529786 0.7774704099 0.7112854123
+ 0.7691305876 0.7786164284 0.7124524117
+ 0.7703080773 0.7797623873 0.7136192918
+ 0.7714644074 0.7809084058 0.7147862911
+ 0.7726129889 0.7820516229 0.7159532905
+ 0.7737615705 0.7831820846 0.7171167135
+ 0.7749102116 0.7843126059 0.7182772160
+ 0.7760587931 0.7854431868 0.7194375992
+ 0.7771977186 0.7865737081 0.7205979824
+ 0.7783300877 0.7877029777 0.7217584252
+ 0.7794623971 0.7888091207 0.7229158282
+ 0.7805947065 0.7899152040 0.7240688205
+ 0.7817270160 0.7910214067 0.7252218723
+ 0.7828512192 0.7921274900 0.7263749242
+ 0.7839630246 0.7932336926 0.7275279164
+ 0.7850748897 0.7943174243 0.7286769748
+ 0.7861866951 0.7953978181 0.7298130989
+ 0.7872986197 0.7964780927 0.7309491038
+ 0.7884055972 0.7975584865 0.7320852280
+ 0.7894845009 0.7986388803 0.7332212925
+ 0.7905632854 0.7997053862 0.7343574166
+ 0.7916421294 0.8007637262 0.7354778051
+ 0.7927209735 0.8018221259 0.7365983129
+ 0.7937998176 0.8028805256 0.7377187014
+ 0.7948549986 0.8039388061 0.7388392091
+ 0.7959054112 0.8049921989 0.7399595976
+ 0.7969558835 0.8060358167 0.7410690188
+ 0.7980064154 0.8070793748 0.7421737909
+ 0.7990568280 0.8081229925 0.7432786822
+ 0.8000957966 0.8091667295 0.7443835735
+ 0.8011217117 0.8102102876 0.7454885244
+ 0.8021476269 0.8112317920 0.7465876937
+ 0.8031734824 0.8122528791 0.7476770878
+ 0.8041993976 0.8132740259 0.7487664819
+ 0.8052238822 0.8142951727 0.7498558760
+ 0.8062176704 0.8153163195 0.7509453297
+ 0.8072115183 0.8163194060 0.7520347238
+ 0.8082051873 0.8173090816 0.7531046867
+ 0.8091989756 0.8182986975 0.7541738749
+ 0.8101927042 0.8192883730 0.7552431822
+ 0.8111652136 0.8202779889 0.7563123703
+ 0.8121206760 0.8212653995 0.7573816776
+ 0.8130761981 0.8222320080 0.7584378123
+ 0.8140317798 0.8231986761 0.7594807744
+ 0.8149873018 0.8241654038 0.7605237961
+ 0.8159424067 0.8251320720 0.7615668178
+ 0.8168678880 0.8260987997 0.7626097202
+ 0.8177933097 0.8270537257 0.7636526823
+ 0.8187186718 0.8279997706 0.7646675706
+ 0.8196440935 0.8289458752 0.7656818032
+ 0.8205695152 0.8298919797 0.7666959763
+ 0.8214858174 0.8308380842 0.7677102089
+ 0.8223888278 0.8317841887 0.7687243819
+ 0.8232917786 0.8327031732 0.7697293162
+ 0.8241947889 0.8336216807 0.7707198262
+ 0.8250979185 0.8345401883 0.7717103958
+ 0.8260009289 0.8354586959 0.7727010250
+ 0.8268916011 0.8363772035 0.7736914754
+ 0.8277779818 0.8372876048 0.7746821046
+ 0.8286644816 0.8381816149 0.7756630182
+ 0.8295509219 0.8390756845 0.7766405940
+ 0.8304374218 0.8399696946 0.7776182890
+ 0.8313233852 0.8408638239 0.7785959840
+ 0.8321877122 0.8417577744 0.7795736194
+ 0.8330519795 0.8426352143 0.7805503011
+ 0.8339163065 0.8435022831 0.7815071940
+ 0.8347805738 0.8443694711 0.7824640870
+ 0.8356449008 0.8452367187 0.7834209204
+ 0.8365029097 0.8461037874 0.7843778133
+ 0.8373395801 0.8469709754 0.7853347063
+ 0.8381764293 0.8478137851 0.7862827182
+ 0.8390132189 0.8486523032 0.7872080207
+ 0.8398498893 0.8494908214 0.7881333232
+ 0.8406866789 0.8503292203 0.7890586257
+ 0.8415160179 0.8511676788 0.7899839282
+ 0.8423328996 0.8520057797 0.7909091711
+ 0.8431499004 0.8528186083 0.7918230891
+ 0.8439669013 0.8536313176 0.7927232981
+ 0.8447839022 0.8544440269 0.7936236262
+ 0.8456009030 0.8552566767 0.7945237756
+ 0.8464123011 0.8560693860 0.7954239845
+ 0.8472172022 0.8568791151 0.7963243127
+ 0.8480221033 0.8576657772 0.7972148061
+ 0.8488271236 0.8584524989 0.7980977297
+ 0.8496320248 0.8592392206 0.7989805937
+ 0.8504369259 0.8600258827 0.7998635173
+ 0.8512371778 0.8608126044 0.8007463813
+ 0.8520324230 0.8615955114 0.8016293049
+ 0.8528277278 0.8623574972 0.8024988174
+ 0.8536229134 0.8631194234 0.8033595085
+ 0.8544182181 0.8638814092 0.8042201996
+ 0.8552135229 0.8646433949 0.8050808907
+ 0.8559978008 0.8654053211 0.8059417009
+ 0.8567681909 0.8661652207 0.8068023920
+ 0.8575387001 0.8669108748 0.8076456189
+ 0.8583090901 0.8676565289 0.8084762096
+ 0.8590794802 0.8684021235 0.8093069196
+ 0.8598498702 0.8691477776 0.8101375103
+ 0.8606119752 0.8698933721 0.8109682202
+ 0.8613570929 0.8706384897 0.8117988706
+ 0.8621020913 0.8713684082 0.8126195073
+ 0.8628472090 0.8720982075 0.8134300709
+ 0.8635922074 0.8728280067 0.8142405748
+ 0.8643373251 0.8735578060 0.8150511980
+ 0.8650797009 0.8742876053 0.8158618212
+ 0.8658074141 0.8750174046 0.8166723847
+ 0.8665351272 0.8757197857 0.8174800873
+ 0.8672627807 0.8764181733 0.8182824254
+ 0.8679904938 0.8771166205 0.8190848231
+ 0.8687182069 0.8778150082 0.8198871017
+ 0.8694459200 0.8785135150 0.8206894994
+ 0.8701534271 0.8792119026 0.8214918971
+ 0.8708590865 0.8798918724 0.8222925067
+ 0.8715646863 0.8805618882 0.8230811954
+ 0.8722702861 0.8812319040 0.8238700032
+ 0.8729758859 0.8819019794 0.8246586919
+ 0.8736816049 0.8825719953 0.8254473805
+ 0.8743742704 0.8832420111 0.8262361884
+ 0.8750584722 0.8839061260 0.8270248771
+ 0.8757427931 0.8845593929 0.8277987242
+ 0.8764269948 0.8852127194 0.8285697103
+ 0.8771111965 0.8858659863 0.8293406963
+ 0.8777955174 0.8865193725 0.8301116824
+ 0.8784751296 0.8871726990 0.8308827281
+ 0.8791388869 0.8878260255 0.8316535950
+ 0.8798025846 0.8884590268 0.8324189782
+ 0.8804662824 0.8890919089 0.8331785202
+ 0.8811300993 0.8897247910 0.8339378834
+ 0.8817937970 0.8903576732 0.8346974254
+ 0.8824576139 0.8909906745 0.8354569077
+ 0.8831110001 0.8916236162 0.8362162709
+ 0.8837615848 0.8922482729 0.8369745016
+ 0.8844121099 0.8928667903 0.8377140760
+ 0.8850625753 0.8934854269 0.8384537101
+ 0.8857132196 0.8941038847 0.8391932845
+ 0.8863636851 0.8947224021 0.8399327993
+ 0.8870092034 0.8953409195 0.8406723738
+ 0.8876399994 0.8959586024 0.8414120078
+ 0.8882709146 0.8965657949 0.8421400785
+ 0.8889017105 0.8971729279 0.8428595066
+ 0.8895326257 0.8977800012 0.8435789943
+ 0.8901634216 0.8983871937 0.8442984223
+ 0.8907942772 0.8989943266 0.8450179100
+ 0.8914089799 0.8996015191 0.8457372785
+ 0.8920158744 0.9001982212 0.8464565277
+ 0.8926227093 0.9007843733 0.8471537828
+ 0.8932296038 0.9013705850 0.8478512168
+ 0.8938364983 0.9019567966 0.8485484719
+ 0.8944432735 0.9025430083 0.8492457867
+ 0.8950501084 0.9031292200 0.8499431014
+ 0.8956450820 0.9037153721 0.8506404161
+ 0.8962401152 0.9042838812 0.8513295054
+ 0.8968350887 0.9048495293 0.8520048261
+ 0.8974301815 0.9054149985 0.8526800871
+ 0.8980252147 0.9059805274 0.8533554077
+ 0.8986201882 0.9065459967 0.8540307283
+ 0.8992115259 0.9071115851 0.8547059894
+ 0.8997929096 0.9076750875 0.8553813100
+ 0.9003742933 0.9082267284 0.8560460806
+ 0.9009556174 0.9087783098 0.8567056060
+ 0.9015370011 0.9093298912 0.8573651910
+ 0.9021183848 0.9098814726 0.8580247760
+ 0.9026998281 0.9104331136 0.8586843014
+ 0.9032738805 0.9109846950 0.8593438864
+ 0.9038397074 0.9115307927 0.8600034714
+ 0.9044054747 0.9120668769 0.8606566191
+ 0.9049713016 0.9126030207 0.8613088727
+ 0.9055371284 0.9131391048 0.8619611859
+ 0.9061030149 0.9136751294 0.8626134992
+ 0.9066687822 0.9142112136 0.8632658124
+ 0.9072257876 0.9147472978 0.8639181256
+ 0.9077767730 0.9152768850 0.8645702004
+ 0.9083276987 0.9157999158 0.8652151227
+ 0.9088786840 0.9163230062 0.8658599854
+ 0.9094297290 0.9168459773 0.8665049076
+ 0.9099807143 0.9173690081 0.8671498895
+ 0.9105315804 0.9178919792 0.8677948117
+ 0.9110671878 0.9184150100 0.8684396744
+ 0.9115940928 0.9189338088 0.8690823913
+ 0.9121209979 0.9194490910 0.8697077036
+ 0.9126479030 0.9199643731 0.8703330159
+ 0.9131749272 0.9204797149 0.8709583282
+ 0.9137017727 0.9209951162 0.8715835214
+ 0.9142286777 0.9215103984 0.8722087741
+ 0.9147396088 0.9220256805 0.8728340864
+ 0.9152405262 0.9225335121 0.8734576106
+ 0.9157413244 0.9230350852 0.8740668297
+ 0.9162421227 0.9235367775 0.8746759892
+ 0.9167429805 0.9240384102 0.8752852082
+ 0.9172437787 0.9245399833 0.8758944273
+ 0.9177445769 0.9250416756 0.8765035868
+ 0.9182330966 0.9255433083 0.8771128058
+ 0.9187096953 0.9260321856 0.8777214885
+ 0.9191861749 0.9265064001 0.8783164024
+ 0.9196627736 0.9269806743 0.8789111972
+ 0.9201393127 0.9274548888 0.8795061111
+ 0.9206159115 0.9279291034 0.8801010251
+ 0.9210923910 0.9284033775 0.8806958199
+ 0.9215654731 0.9288775921 0.8812906742
+ 0.9220311046 0.9293445945 0.8818855286
+ 0.9224967957 0.9297950268 0.8824583292
+ 0.9229624271 0.9302453995 0.8830280900
+ 0.9234281182 0.9306957722 0.8835980296
+ 0.9238938093 0.9311462045 0.8841677904
+ 0.9243593812 0.9315965772 0.8847376108
+ 0.9248239994 0.9320470095 0.8853073716
+ 0.9252728820 0.9324961901 0.8858771920
+ 0.9257218242 0.9329271913 0.8864341974
+ 0.9261707067 0.9333581924 0.8869844079
+ 0.9266195893 0.9337891936 0.8875344992
+ 0.9270685911 0.9342203140 0.8880845904
+ 0.9275174737 0.9346513152 0.8886348009
+ 0.9279664159 0.9350823164 0.8891848922
+ 0.9283986092 0.9355133772 0.8897349834
+ 0.9288244843 0.9359328151 0.8902794123
+ 0.9292504191 0.9363483191 0.8908125758
+ 0.9296762943 0.9367638826 0.8913459182
+ 0.9301022291 0.9371793866 0.8918790817
+ 0.9305281043 0.9375948906 0.8924124241
+ 0.9309539795 0.9380103946 0.8929455876
+ 0.9313746095 0.9384258986 0.8934788108
+ 0.9317831993 0.9388350248 0.8940120935
+ 0.9321917892 0.9392321110 0.8945347071
+ 0.9326003790 0.9396290779 0.8950567245
+ 0.9330090880 0.9400262237 0.8955786824
+ 0.9334176779 0.9404231906 0.8961006999
+ 0.9338263273 0.9408202767 0.8966227770
+ 0.9342349172 0.9412173033 0.8971447945
+ 0.9346324205 0.9416143894 0.8976668119
+ 0.9350271821 0.9419872165 0.8981863856
+ 0.9354221225 0.9423564076 0.8987035155
+ 0.9358168840 0.9427254796 0.8992205262
+ 0.9362118244 0.9430946708 0.8997374773
+ 0.9366065860 0.9434638023 0.9002544880
+ 0.9370014071 0.9438329935 0.9007714987
+ 0.9373939037 0.9442021251 0.9012885094
+ 0.9377782941 0.9445647001 0.9018055797
+ 0.9381626844 0.9449126720 0.9023094177
+ 0.9385470748 0.9452607036 0.9028121829
+ 0.9389315844 0.9456086159 0.9033150077
+ 0.9393159747 0.9459565878 0.9038177729
+ 0.9397004247 0.9463046193 0.9043205976
+ 0.9400848150 0.9466525912 0.9048234224
+ 0.9404577017 0.9470005035 0.9053261876
+ 0.9408218265 0.9473389983 0.9058225155
+ 0.9411860108 0.9476727843 0.9063037038
+ 0.9415500760 0.9480065703 0.9067848921
+ 0.9419142008 0.9483404160 0.9072660804
+ 0.9422783852 0.9486742020 0.9077473283
+ 0.9426425099 0.9490079880 0.9082283974
+ 0.9430066943 0.9493417740 0.9087095857
+ 0.9433518052 0.9496756196 0.9091907740
+ 0.9436928034 0.9499998093 0.9096608162
+ 0.9440338016 0.9503235817 0.9101228118
+ 0.9443747997 0.9506472945 0.9105848074
+ 0.9447157979 0.9509710073 0.9110468030
+ 0.9450569153 0.9512947202 0.9115087986
+ 0.9453979135 0.9516184926 0.9119707942
+ 0.9457389116 0.9519422054 0.9124327898
+ 0.9460589290 0.9522647262 0.9128947854
+ 0.9463787079 0.9525792003 0.9133455157
+ 0.9466984868 0.9528936744 0.9137930870
+ 0.9470183253 0.9532083273 0.9142407179
+ 0.9473382235 0.9535228014 0.9146882296
+ 0.9476580024 0.9538373947 0.9151358008
+ 0.9479777813 0.9541519284 0.9155833721
+ 0.9482966065 0.9544664025 0.9160308838
+ 0.9486029744 0.9547755718 0.9164785147
+ 0.9489094019 0.9550681114 0.9169083238
+ 0.9492158294 0.9553607106 0.9173362255
+ 0.9495223165 0.9556531906 0.9177641273
+ 0.9498286843 0.9559456706 0.9181920290
+ 0.9501351118 0.9562382102 0.9186198115
+ 0.9504414797 0.9565308094 0.9190477133
+ 0.9507477880 0.9568232894 0.9194756150
+ 0.9510523081 0.9571123123 0.9199035168
+ 0.9513568878 0.9573916793 0.9203202724
+ 0.9516614079 0.9576711059 0.9207363725
+ 0.9519659877 0.9579504728 0.9211524725
+ 0.9522706270 0.9582298994 0.9215685129
+ 0.9525750875 0.9585093260 0.9219846129
+ 0.9528797269 0.9587886930 0.9224005938
+ 0.9531841874 0.9590681195 0.9228166938
+ 0.9534816146 0.9593474865 0.9232327938
+ 0.9537789822 0.9596264958 0.9236450791
+ 0.9540762901 0.9599055052 0.9240568280
+ 0.9543737173 0.9601845145 0.9244685769
+ 0.9546710253 0.9604635239 0.9248803854
+ 0.9549683928 0.9607424736 0.9252920747
+ 0.9552657008 0.9610214829 0.9257038832
+ 0.9555630088 0.9613004923 0.9261155725
+ 0.9558495283 0.9615790844 0.9265273809
+ 0.9561336040 0.9618505239 0.9269320965
+ 0.9564176202 0.9621219039 0.9273340702
+ 0.9567016959 0.9623932838 0.9277362227
+ 0.9569857121 0.9626647234 0.9281383157
+ 0.9572697878 0.9629361033 0.9285402894
+ 0.9575538039 0.9632074833 0.9289423823
+ 0.9578378797 0.9634789228 0.9293444157
+ 0.9581202269 0.9637503028 0.9297465086
+ 0.9584012032 0.9640163779 0.9301460981
+ 0.9586821795 0.9642812014 0.9305431843
+ 0.9589632154 0.9645460248 0.9309402704
+ 0.9592441916 0.9648107886 0.9313374758
+ 0.9595252872 0.9650756121 0.9317346215
+ 0.9598063231 0.9653403759 0.9321317077
+ 0.9600872993 0.9656051993 0.9325287938
+ 0.9603686929 0.9658700228 0.9329259992
+ 0.9606518149 0.9661340714 0.9333214760
+ 0.9609349966 0.9663974047 0.9337096810
+ 0.9612181187 0.9666607976 0.9340978265
+ 0.9615011811 0.9669241905 0.9344859719
+ 0.9617843032 0.9671875238 0.9348741770
+ 0.9620674253 0.9674509168 0.9352623820
+ 0.9623506069 0.9677141905 0.9356505871
+ 0.9626337290 0.9679775834 0.9360387921
+ 0.9629138708 0.9682406783 0.9364269972
+ 0.9631931782 0.9685000777 0.9368088841
+ 0.9634724855 0.9687594771 0.9371889234
+ 0.9637517929 0.9690188169 0.9375690222
+ 0.9640312195 0.9692782164 0.9379490018
+ 0.9643105268 0.9695376158 0.9383289814
+ 0.9645897746 0.9697968960 0.9387090802
+ 0.9648690820 0.9700562954 0.9390891194
+ 0.9651448727 0.9703155756 0.9394692183
+ 0.9654085040 0.9705702066 0.9398465157
+ 0.9656721950 0.9708209038 0.9402164221
+ 0.9659358263 0.9710716009 0.9405863881
+ 0.9661995173 0.9713222980 0.9409562945
+ 0.9664632082 0.9715729952 0.9413263202
+ 0.9667267799 0.9718236923 0.9416962266
+ 0.9669904709 0.9720743895 0.9420661926
+ 0.9672541022 0.9723250866 0.9424360991
+ 0.9675124884 0.9725757241 0.9428061247
+ 0.9677672982 0.9728142023 0.9431679249
+ 0.9680221081 0.9730519056 0.9435257912
+ 0.9682769179 0.9732896090 0.9438837171
+ 0.9685317278 0.9735273123 0.9442415833
+ 0.9687864780 0.9737650752 0.9445996284
+ 0.9690412879 0.9740027785 0.9449574947
+ 0.9692960978 0.9742404819 0.9453154206
+ 0.9695509076 0.9744781852 0.9456732869
+ 0.9698060155 0.9747121930 0.9460312128
+ 0.9700611830 0.9749348760 0.9463843107
+ 0.9703164101 0.9751574993 0.9467371702
+ 0.9705715179 0.9753801823 0.9470902085
+ 0.9708266854 0.9756028056 0.9474431276
+ 0.9710819125 0.9758254886 0.9477961063
+ 0.9713370800 0.9760481715 0.9481490254
+ 0.9715921879 0.9762707949 0.9485020041
+ 0.9718468189 0.9764934778 0.9488549829
+ 0.9720928073 0.9767106771 0.9492064714
+ 0.9723387957 0.9769214988 0.9495524764
+ 0.9725847840 0.9771322012 0.9498984814
+ 0.9728307724 0.9773430228 0.9502444863
+ 0.9730768204 0.9775537848 0.9505904913
+ 0.9733228087 0.9777646065 0.9509364963
+ 0.9735687971 0.9779753089 0.9512825012
+ 0.9738147855 0.9781860709 0.9516285062
+ 0.9740588069 0.9783968925 0.9519745111
+ 0.9742915034 0.9786027074 0.9523156285
+ 0.9745242000 0.9788047075 0.9526464939
+ 0.9747567773 0.9790067077 0.9529774189
+ 0.9749894738 0.9792087078 0.9533084035
+ 0.9752221704 0.9794108272 0.9536393285
+ 0.9754549265 0.9796128273 0.9539703131
+ 0.9756876230 0.9798148274 0.9543011785
+ 0.9759202003 0.9800168276 0.9546322227
+ 0.9761514068 0.9802188277 0.9549630880
+ 0.9763734937 0.9804111123 0.9552907944
+ 0.9765955806 0.9805964828 0.9556127787
+ 0.9768176079 0.9807819128 0.9559348226
+ 0.9770396948 0.9809672832 0.9562568069
+ 0.9772617817 0.9811527133 0.9565787911
+ 0.9774839282 0.9813380837 0.9569007754
+ 0.9777060151 0.9815235138 0.9572228193
+ 0.9779281020 0.9817088842 0.9575446844
+ 0.9781497121 0.9818943143 0.9578667283
+ 0.9783595204 0.9820705056 0.9581860900
+ 0.9785693884 0.9822378159 0.9584987760
+ 0.9787791967 0.9824051261 0.9588115811
+ 0.9789891243 0.9825723767 0.9591243267
+ 0.9791988730 0.9827396870 0.9594370723
+ 0.9794088006 0.9829071164 0.9597498178
+ 0.9796186090 0.9830744267 0.9600626230
+ 0.9798284769 0.9832416773 0.9603753090
+ 0.9800382853 0.9834089875 0.9606881142
+ 0.9802370071 0.9835721850 0.9609987736
+ 0.9804332852 0.9837269783 0.9612951279
+ 0.9806296825 0.9838817716 0.9615914822
+ 0.9808260202 0.9840366244 0.9618877769
+ 0.9810224175 0.9841914177 0.9621840715
+ 0.9812188148 0.9843462110 0.9624804258
+ 0.9814150929 0.9845011234 0.9627767205
+ 0.9816114902 0.9846559167 0.9630730152
+ 0.9818078279 0.9848107100 0.9633693099
+ 0.9819964767 0.9849649072 0.9636656046
+ 0.9821782112 0.9851077199 0.9639506936
+ 0.9823600054 0.9852504730 0.9642338157
+ 0.9825417995 0.9853932858 0.9645169973
+ 0.9827235937 0.9855362177 0.9648001790
+ 0.9829053879 0.9856789708 0.9650833011
+ 0.9830871224 0.9858217835 0.9653664827
+ 0.9832689166 0.9859645963 0.9656497240
+ 0.9834507108 0.9861074090 0.9659329057
+ 0.9836298227 0.9862502217 0.9662160277
+ 0.9837905765 0.9863815904 0.9664933085
+ 0.9839512706 0.9865074158 0.9667642713
+ 0.9841120243 0.9866331816 0.9670352936
+ 0.9842727780 0.9867590070 0.9673063159
+ 0.9844334722 0.9868847728 0.9675772786
+ 0.9845942855 0.9870105982 0.9678484201
+ 0.9847549796 0.9871364236 0.9681193829
+ 0.9849156737 0.9872621894 0.9683904052
+ 0.9850764871 0.9873880148 0.9686614275
+ 0.9852262139 0.9875094891 0.9689320922
+ 0.9853692055 0.9876127243 0.9691805243
+ 0.9855121970 0.9877158999 0.9694290161
+ 0.9856551886 0.9878190160 0.9696773887
+ 0.9857981801 0.9879221916 0.9699258208
+ 0.9859411120 0.9880254269 0.9701743126
+ 0.9860841036 0.9881286025 0.9704226851
+ 0.9862270951 0.9882317781 0.9706711769
+ 0.9863700867 0.9883350134 0.9709196091
+ 0.9865130186 0.9884381890 0.9711681008
+ 0.9866449833 0.9885314703 0.9714096785
+ 0.9867771268 0.9886183739 0.9716426134
+ 0.9869090915 0.9887052774 0.9718756080
+ 0.9870411754 0.9887921810 0.9721086025
+ 0.9871733189 0.9888790846 0.9723415971
+ 0.9873052835 0.9889659882 0.9725744724
+ 0.9874374270 0.9890528917 0.9728075266
+ 0.9875693917 0.9891397953 0.9730405211
+ 0.9877014756 0.9892266989 0.9732735157
+ 0.9878289104 0.9893134832 0.9735063910
+ 0.9879450202 0.9893946052 0.9737377763
+ 0.9880610704 0.9894750714 0.9739686251
+ 0.9881772995 0.9895555973 0.9741994739
+ 0.9882934093 0.9896361232 0.9744303226
+ 0.9884095192 0.9897165895 0.9746611714
+ 0.9885256886 0.9897971153 0.9748920202
+ 0.9886417985 0.9898777008 0.9751229286
+ 0.9887579083 0.9899582267 0.9753537774
+ 0.9888740778 0.9900386930 0.9755846262
+ 0.9889798164 0.9901186228 0.9758154750
+ 0.9890741706 0.9901947975 0.9760391712
+ 0.9891685247 0.9902709723 0.9762626886
+ 0.9892628193 0.9903472066 0.9764863253
+ 0.9893571138 0.9904233813 0.9767099023
+ 0.9894514084 0.9904996157 0.9769334793
+ 0.9895458221 0.9905757904 0.9771571159
+ 0.9896401167 0.9906520247 0.9773806930
+ 0.9897344112 0.9907281995 0.9776043296
+ 0.9898287058 0.9908043742 0.9778279066
+ 0.9899169207 0.9908795953 0.9780502915
+ 0.9900001884 0.9909514785 0.9782621861
+ 0.9900833964 0.9910233021 0.9784740806
+ 0.9901666045 0.9910951853 0.9786859751
+ 0.9902498126 0.9911670089 0.9788979292
+ 0.9903330207 0.9912388921 0.9791098237
+ 0.9904162884 0.9913107157 0.9793217182
+ 0.9904994965 0.9913825989 0.9795336127
+ 0.9905827045 0.9914544225 0.9797455072
+ 0.9906659126 0.9915261865 0.9799574018
+ 0.9907503128 0.9915974736 0.9801694751
+ 0.9908356071 0.9916664958 0.9803833961
+ 0.9909210205 0.9917355180 0.9805971980
+ 0.9910063744 0.9918044806 0.9808109999
+ 0.9910917878 0.9918735027 0.9810249209
+ 0.9911772013 0.9919425249 0.9812387228
+ 0.9912626147 0.9920114875 0.9814525247
+ 0.9913480282 0.9920805097 0.9816663861
+ 0.9914333820 0.9921495914 0.9818801880
+ 0.9915186763 0.9922186136 0.9820939898
+ 0.9916055202 0.9922881126 0.9823077917
+ 0.9916943908 0.9923617244 0.9825233221
+ 0.9917833805 0.9924353957 0.9827387929
+ 0.9918723106 0.9925091267 0.9829543233
+ 0.9919611812 0.9925826788 0.9831697941
+ 0.9920501709 0.9926564097 0.9833853245
+ 0.9921391010 0.9927300215 0.9836007953
+ 0.9922280908 0.9928036928 0.9838163257
+ 0.9923170209 0.9928774238 0.9840317965
+ 0.9924060106 0.9929509759 0.9842473269
+ 0.9924944043 0.9930247068 0.9844626784
+ 0.9925794005 0.9931048155 0.9846640825
+ 0.9926643968 0.9931856990 0.9848614931
+ 0.9927493930 0.9932667017 0.9850590229
+ 0.9928343892 0.9933475852 0.9852564931
+ 0.9929193854 0.9934285283 0.9854540229
+ 0.9930043817 0.9935094714 0.9856514931
+ 0.9930893779 0.9935904145 0.9858490229
+ 0.9931743741 0.9936712980 0.9860464931
+ 0.9932593703 0.9937523007 0.9862440228
+ 0.9933443069 0.9938331842 0.9864414930
+ 0.9934259057 0.9939159155 0.9866343737
+ 0.9935063124 0.9940000772 0.9868218899
+ 0.9935867786 0.9940842986 0.9870094061
+ 0.9936671853 0.9941684008 0.9871969223
+ 0.9937477112 0.9942526221 0.9873843789
+ 0.9938281178 0.9943367243 0.9875720143
+ 0.9939085841 0.9944208860 0.9877594709
+ 0.9939889908 0.9945051074 0.9879469872
+ 0.9940693974 0.9945892096 0.9881345034
+ 0.9941499233 0.9946733713 0.9883220792
+ 0.9942312241 0.9947574139 0.9885097146
+ 0.9943147898 0.9948405027 0.9887015224
+ 0.9943982959 0.9949235916 0.9888933897
+ 0.9944819212 0.9950066805 0.9890851974
+ 0.9945654869 0.9950898290 0.9892770052
+ 0.9946489930 0.9951729178 0.9894688129
+ 0.9947326183 0.9952560067 0.9896606803
+ 0.9948161840 0.9953390956 0.9898524880
+ 0.9948996902 0.9954221845 0.9900442958
+ 0.9949833155 0.9955052733 0.9902361035
+ 0.9950668812 0.9955884218 0.9904279709
+ 0.9951515198 0.9956672788 0.9906188846
+ 0.9952365160 0.9957426190 0.9908090234
+ 0.9953215122 0.9958178997 0.9909991026
+ 0.9954065084 0.9958932996 0.9911891818
+ 0.9954916239 0.9959685802 0.9913793206
+ 0.9955766201 0.9960439205 0.9915693998
+ 0.9956616163 0.9961193204 0.9917594790
+ 0.9957466722 0.9961946011 0.9919496179
+ 0.9958317280 0.9962698817 0.9921396971
+ 0.9959167242 0.9963452816 0.9923297763
+ 0.9960017800 0.9964206219 0.9925199151
+ 0.9960864782 0.9964954853 0.9927043915
+ 0.9961711764 0.9965702891 0.9928877950
+ 0.9962558746 0.9966450930 0.9930710793
+ 0.9963405728 0.9967198968 0.9932544231
+ 0.9964252710 0.9967947006 0.9934378266
+ 0.9965100288 0.9968695045 0.9936211109
+ 0.9965947270 0.9969443083 0.9938043952
+ 0.9966794252 0.9970191121 0.9939877987
+ 0.9967641234 0.9970939159 0.9941710830
+ 0.9968488216 0.9971687198 0.9943544269
+ 0.9969335198 0.9972440004 0.9945374727
+ 0.9970176220 0.9973254204 0.9947144985
+ 0.9971017241 0.9974067807 0.9948914051
+ 0.9971858859 0.9974880815 0.9950683117
+ 0.9972699881 0.9975695014 0.9952452779
+ 0.9973540902 0.9976508021 0.9954221845
+ 0.9974381924 0.9977322221 0.9955992103
+ 0.9975224137 0.9978135824 0.9957761168
+ 0.9976065159 0.9978948832 0.9959530830
+ 0.9976906180 0.9979763031 0.9961299896
+ 0.9977747798 0.9980576038 0.9963068962
+ 0.9978600740 0.9981396198 0.9964826107
+ 0.9979493022 0.9982247949 0.9966511130
+ 0.9980384707 0.9983099103 0.9968194962
+ 0.9981275797 0.9983950257 0.9969878793
+ 0.9982168078 0.9984800816 0.9971563220
+ 0.9983059764 0.9985653162 0.9973248243
+ 0.9983952045 0.9986503720 0.9974932075
+ 0.9984843731 0.9987354875 0.9976615906
+ 0.9985736012 0.9988206029 0.9978299737
+ 0.9986627102 0.9989057779 0.9979984760
+ 0.9987518787 0.9989908934 0.9981669188
+ 0.9988439083 0.9990757704 0.9983330965
+ 0.9989489913 0.9991598725 0.9984846115
+ 0.9990540743 0.9992439151 0.9986361265
+ 0.9991592169 0.9993278980 0.9987877011
+ 0.9992642999 0.9994118810 0.9989392161
+ 0.9993693829 0.9994959235 0.9990907907
+ 0.9994745255 0.9995799065 0.9992423058
+ 0.9995796084 0.9996638894 0.9993938208
+ 0.9996846914 0.9997479916 0.9995453954
+ 0.9997897744 0.9998319745 0.9996969104
+ 0.9998949170 0.9999160171 0.9998484850
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/kodak_kodachrome_25.spi1d b/release/datafiles/colormanagement/luts/film_response/kodak_kodachrome_25.spi1d
new file mode 100644
index 00000000000..b450b1b92cb
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/kodak_kodachrome_25.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0001187211 0.0001161198 0.0001305900
+ 0.0002416660 0.0002335670 0.0002639299
+ 0.0003686174 0.0003530100 0.0003996764
+ 0.0004986166 0.0004744168 0.0005390237
+ 0.0006320932 0.0005989556 0.0006801367
+ 0.0007689670 0.0007275027 0.0008226076
+ 0.0009098884 0.0008590615 0.0009674262
+ 0.0010546240 0.0009952968 0.0011148060
+ 0.0012056520 0.0011357040 0.0012659699
+ 0.0013610790 0.0012804960 0.0014208819
+ 0.0015210240 0.0014290370 0.0015805050
+ 0.0016857639 0.0015831300 0.0017423360
+ 0.0018555140 0.0017423540 0.0019072110
+ 0.0020300581 0.0019068220 0.0020741550
+ 0.0022078981 0.0020767010 0.0022443461
+ 0.0023916010 0.0022511871 0.0024184019
+ 0.0025805370 0.0024301831 0.0025977520
+ 0.0027740600 0.0026134001 0.0027815269
+ 0.0029722259 0.0028022721 0.0029672419
+ 0.0031753390 0.0029984950 0.0031548510
+ 0.0033845089 0.0032002409 0.0033454280
+ 0.0036013669 0.0034078530 0.0035393371
+ 0.0038235600 0.0036215940 0.0037365381
+ 0.0040512760 0.0038406281 0.0039370959
+ 0.0042870231 0.0040662498 0.0041424572
+ 0.0045294450 0.0042975969 0.0043519312
+ 0.0047791190 0.0045345472 0.0045640962
+ 0.0050357901 0.0047785440 0.0047785449
+ 0.0052975160 0.0050289081 0.0049969312
+ 0.0055647590 0.0052849171 0.0052185720
+ 0.0058401441 0.0055476031 0.0054451409
+ 0.0061251819 0.0058162622 0.0056769978
+ 0.0064190081 0.0060910610 0.0059134620
+ 0.0067208251 0.0063716578 0.0061544981
+ 0.0070298752 0.0066589769 0.0064014881
+ 0.0073465379 0.0069537512 0.0066520870
+ 0.0076715760 0.0072558299 0.0069075110
+ 0.0080045266 0.0075645968 0.0071683591
+ 0.0083457762 0.0078814235 0.0074348552
+ 0.0086941188 0.0082036890 0.0077047022
+ 0.0090481956 0.0085330773 0.0079792934
+ 0.0094094584 0.0088689746 0.0082590310
+ 0.0097797252 0.0092114061 0.0085430183
+ 0.0101604396 0.0095595680 0.0088318810
+ 0.0105508799 0.0099120708 0.0091247372
+ 0.0109501397 0.0102693997 0.0094229234
+ 0.0113572897 0.0106335897 0.0097273486
+ 0.0117729101 0.0110058896 0.0100365505
+ 0.0121964402 0.0113846296 0.0103524001
+ 0.0126260100 0.0117704803 0.0106731104
+ 0.0130626997 0.0121654198 0.0109990695
+ 0.0135076502 0.0125680296 0.0113301203
+ 0.0139606902 0.0129768401 0.0116658099
+ 0.0144202998 0.0133933499 0.0120067801
+ 0.0148866000 0.0138179902 0.0123553397
+ 0.0153607102 0.0142508997 0.0127089303
+ 0.0158437602 0.0146913100 0.0130658597
+ 0.0163364708 0.0151374601 0.0134272100
+ 0.0168359205 0.0155895501 0.0137940804
+ 0.0173442401 0.0160493609 0.0141672902
+ 0.0178608205 0.0165161695 0.0145466598
+ 0.0183882900 0.0169901606 0.0149336299
+ 0.0189235695 0.0174715705 0.0153278597
+ 0.0194664709 0.0179615095 0.0157276094
+ 0.0200162604 0.0184623506 0.0161328409
+ 0.0205752291 0.0189736001 0.0165440794
+ 0.0211429205 0.0194928199 0.0169631094
+ 0.0217175093 0.0200189203 0.0173870400
+ 0.0222972203 0.0205519404 0.0178171601
+ 0.0228821803 0.0210929699 0.0182553697
+ 0.0234732702 0.0216418691 0.0187003091
+ 0.0240713898 0.0221973900 0.0191515498
+ 0.0246774498 0.0227600299 0.0196103808
+ 0.0252923407 0.0233312007 0.0200770292
+ 0.0259165801 0.0239111893 0.0205497108
+ 0.0265481994 0.0245017596 0.0210285001
+ 0.0271885395 0.0251027998 0.0215149205
+ 0.0278372504 0.0257091504 0.0220096204
+ 0.0284956601 0.0263228696 0.0225120597
+ 0.0291631296 0.0269445796 0.0230217203
+ 0.0298364591 0.0275744200 0.0235392991
+ 0.0305197891 0.0282128304 0.0240652803
+ 0.0312113408 0.0288609006 0.0246002506
+ 0.0319130905 0.0295199603 0.0251446608
+ 0.0326239392 0.0301856901 0.0256962199
+ 0.0333417691 0.0308586191 0.0262538604
+ 0.0340690203 0.0315388404 0.0268181600
+ 0.0347989090 0.0322262309 0.0273908004
+ 0.0355309397 0.0329242386 0.0279702805
+ 0.0362654515 0.0336307585 0.0285563804
+ 0.0370042995 0.0343444385 0.0291495994
+ 0.0377499983 0.0350654498 0.0297501199
+ 0.0385023095 0.0357952416 0.0303586796
+ 0.0392612107 0.0365385190 0.0309723206
+ 0.0400277786 0.0372893997 0.0315904692
+ 0.0408011489 0.0380479097 0.0322141387
+ 0.0415779687 0.0388149507 0.0328444093
+ 0.0423575304 0.0395870805 0.0334823392
+ 0.0431431308 0.0403656401 0.0341259614
+ 0.0439345613 0.0411506817 0.0347744413
+ 0.0447305702 0.0419436581 0.0354271904
+ 0.0455311611 0.0427440405 0.0360897183
+ 0.0463386402 0.0435508788 0.0367595218
+ 0.0471522398 0.0443644710 0.0374358408
+ 0.0479747392 0.0451885909 0.0381190106
+ 0.0488112308 0.0460180305 0.0388101190
+ 0.0496566407 0.0468529202 0.0395072289
+ 0.0505135618 0.0476984307 0.0402105600
+ 0.0513870418 0.0485514998 0.0409212708
+ 0.0522648282 0.0494111106 0.0416350588
+ 0.0531454012 0.0502829701 0.0423520505
+ 0.0540309697 0.0511616506 0.0430774391
+ 0.0549204089 0.0520450994 0.0438090898
+ 0.0558179915 0.0529359803 0.0445459113
+ 0.0567257814 0.0538352691 0.0452902392
+ 0.0576398782 0.0547406413 0.0460413806
+ 0.0585679710 0.0556575507 0.0467979498
+ 0.0595032796 0.0565782711 0.0475642905
+ 0.0604466088 0.0575027503 0.0483360402
+ 0.0614023097 0.0584334396 0.0491129309
+ 0.0623621605 0.0593668409 0.0499006808
+ 0.0633294508 0.0603048317 0.0506933182
+ 0.0643018410 0.0612500012 0.0514932014
+ 0.0652783364 0.0621989109 0.0522950403
+ 0.0662618205 0.0631573200 0.0530990995
+ 0.0672477037 0.0641201437 0.0539113805
+ 0.0682398304 0.0650890917 0.0547297895
+ 0.0692377687 0.0660655573 0.0555534288
+ 0.0702422187 0.0670448914 0.0563857108
+ 0.0712599233 0.0680295005 0.0572213605
+ 0.0722822472 0.0690181032 0.0580649488
+ 0.0733231679 0.0700139031 0.0589125901
+ 0.0743673295 0.0710175782 0.0597636290
+ 0.0754222274 0.0720258802 0.0606212094
+ 0.0764820576 0.0730462894 0.0614807904
+ 0.0775483102 0.0740699619 0.0623459816
+ 0.0786194429 0.0751056671 0.0632140934
+ 0.0796934590 0.0761416107 0.0640869290
+ 0.0807745531 0.0771779865 0.0649647191
+ 0.0818573833 0.0782172531 0.0658454672
+ 0.0829574317 0.0792589337 0.0667318478
+ 0.0840600133 0.0803091377 0.0676197112
+ 0.0851803720 0.0813626423 0.0685161799
+ 0.0863037184 0.0824246481 0.0694149882
+ 0.0874389708 0.0834880322 0.0703213289
+ 0.0885784179 0.0845618397 0.0712313801
+ 0.0897280127 0.0856374800 0.0721469596
+ 0.0908830017 0.0867242888 0.0730709806
+ 0.0920473710 0.0878123492 0.0740019605
+ 0.0932181776 0.0889043733 0.0749416873
+ 0.0943980217 0.0899982378 0.0758856833
+ 0.0955819637 0.0910960734 0.0768347234
+ 0.0967710093 0.0921994597 0.0777852014
+ 0.0979645699 0.0933120996 0.0787435994
+ 0.0991635621 0.0944301113 0.0797032714
+ 0.1003675982 0.0955557898 0.0806734487
+ 0.1015781984 0.0966856703 0.0816444829
+ 0.1027939990 0.0978211835 0.0826287419
+ 0.1040176004 0.0989596322 0.0836134627
+ 0.1052478999 0.1001020968 0.0846056491
+ 0.1064907983 0.1012483984 0.0855979323
+ 0.1077373996 0.1024006978 0.0865952373
+ 0.1089940965 0.1035557985 0.0875926092
+ 0.1102522984 0.1047163978 0.0886019021
+ 0.1115181968 0.1058802009 0.0896116272
+ 0.1127844006 0.1070526987 0.0906278268
+ 0.1140555963 0.1082267985 0.0916445777
+ 0.1153267995 0.1094079986 0.0926688984
+ 0.1166016012 0.1105891988 0.0936945230
+ 0.1178767011 0.1117718965 0.0947236270
+ 0.1191575974 0.1129546016 0.0957538188
+ 0.1204406992 0.1141434982 0.0967877209
+ 0.1217328012 0.1153329015 0.0978235975
+ 0.1230328009 0.1165269986 0.0988596827
+ 0.1243387014 0.1177226007 0.0998959318
+ 0.1256576031 0.1189235002 0.1009349972
+ 0.1269775033 0.1201286018 0.1019790992
+ 0.1283123046 0.1213376969 0.1030249000
+ 0.1296471059 0.1225541010 0.1040780023
+ 0.1309920996 0.1237716004 0.1051312014
+ 0.1323397011 0.1249968037 0.1061976030
+ 0.1336949021 0.1262219995 0.1072641984
+ 0.1350574046 0.1274487972 0.1083405018
+ 0.1364232004 0.1286759973 0.1094200984
+ 0.1378028989 0.1299048960 0.1105057970
+ 0.1391825974 0.1311350018 0.1115979999
+ 0.1405749023 0.1323675066 0.1126938015
+ 0.1419695020 0.1336061060 0.1138031036
+ 0.1433696002 0.1348447949 0.1149123013
+ 0.1447755992 0.1360920966 0.1160330996
+ 0.1461827010 0.1373400986 0.1171550006
+ 0.1476009935 0.1385940015 0.1182890981
+ 0.1490193009 0.1398521960 0.1194318980
+ 0.1504455954 0.1411112994 0.1205772012
+ 0.1518757045 0.1423743069 0.1217304021
+ 0.1533088982 0.1436371952 0.1228836030
+ 0.1547531039 0.1449093074 0.1240445971
+ 0.1561972052 0.1461839974 0.1252069026
+ 0.1576558948 0.1474615037 0.1263778955
+ 0.1591195017 0.1487443000 0.1275596023
+ 0.1605871022 0.1500270963 0.1287415028
+ 0.1620666981 0.1513230950 0.1299324036
+ 0.1635462940 0.1526210010 0.1311233938
+ 0.1650296003 0.1539209038 0.1323246062
+ 0.1665142030 0.1552240998 0.1335338056
+ 0.1680004001 0.1565274000 0.1347434968
+ 0.1694938987 0.1578350067 0.1359594017
+ 0.1709873974 0.1591434032 0.1371753067
+ 0.1724853069 0.1604537964 0.1383929998
+ 0.1739861071 0.1617684960 0.1396120936
+ 0.1754869968 0.1630831063 0.1408315003
+ 0.1769933999 0.1644009054 0.1420598030
+ 0.1784998029 0.1657195985 0.1432881951
+ 0.1800076067 0.1670403928 0.1445214003
+ 0.1815180033 0.1683724970 0.1457598060
+ 0.1830282956 0.1697044969 0.1469981968
+ 0.1845442951 0.1710446030 0.1482491940
+ 0.1860629022 0.1723918021 0.1495018005
+ 0.1875815988 0.1737388968 0.1507571042
+ 0.1891085953 0.1750912964 0.1520196050
+ 0.1906356961 0.1764443964 0.1532821953
+ 0.1921654046 0.1777988970 0.1545532942
+ 0.1937022060 0.1791588962 0.1558299065
+ 0.1952389926 0.1805189997 0.1571063995
+ 0.1967843026 0.1818803996 0.1583925039
+ 0.1983377039 0.1832433045 0.1596792042
+ 0.1998911053 0.1846061945 0.1609704942
+ 0.2014496028 0.1859742999 0.1622772068
+ 0.2030100971 0.1873442978 0.1635839045
+ 0.2045706064 0.1887143999 0.1648986936
+ 0.2061385065 0.1900894940 0.1662220061
+ 0.2077071965 0.1914649010 0.1675451994
+ 0.2092768997 0.1928412020 0.1688794047
+ 0.2108619064 0.1942230016 0.1702177972
+ 0.2124470025 0.1956048012 0.1715561002
+ 0.2140337974 0.1969860941 0.1729072928
+ 0.2156284004 0.1983664036 0.1742596030
+ 0.2172230035 0.1997465938 0.1756128073
+ 0.2188204974 0.2011310011 0.1769745052
+ 0.2204252034 0.2025205046 0.1783363074
+ 0.2220298946 0.2039099038 0.1797029972
+ 0.2236385942 0.2053045928 0.1810847074
+ 0.2252545953 0.2067034990 0.1824664026
+ 0.2268707007 0.2081024051 0.1838538945
+ 0.2284909934 0.2095097005 0.1852518022
+ 0.2301183045 0.2109221071 0.1866496950
+ 0.2317456007 0.2123343945 0.1880539954
+ 0.2333762050 0.2137437016 0.1894665956
+ 0.2350125015 0.2151515931 0.1908791959
+ 0.2366486937 0.2165593952 0.1922982931
+ 0.2382874936 0.2179677039 0.1937243044
+ 0.2399311960 0.2193762958 0.1951504052
+ 0.2415750027 0.2207849026 0.1965806931
+ 0.2432212979 0.2221989036 0.1980153024
+ 0.2448745072 0.2236157060 0.1994500011
+ 0.2465275973 0.2250325978 0.2008942068
+ 0.2481831014 0.2264544070 0.2023486942
+ 0.2498493940 0.2278795987 0.2038031965
+ 0.2515155971 0.2293048054 0.2052644044
+ 0.2531822920 0.2307375968 0.2067341059
+ 0.2548569143 0.2321777046 0.2082037032
+ 0.2565315068 0.2336179018 0.2096809000
+ 0.2582060993 0.2350665033 0.2111717016
+ 0.2598899007 0.2365286052 0.2126623988
+ 0.2615750134 0.2379907966 0.2141568065
+ 0.2632600963 0.2394558936 0.2156627029
+ 0.2649540901 0.2409311980 0.2171684951
+ 0.2666524947 0.2424065024 0.2186762989
+ 0.2683508992 0.2438821048 0.2202025950
+ 0.2700530887 0.2453690022 0.2217289060
+ 0.2717601955 0.2468558997 0.2232550979
+ 0.2734673023 0.2483427972 0.2247944027
+ 0.2751758993 0.2498389930 0.2263347954
+ 0.2768929005 0.2513372898 0.2278753072
+ 0.2786099911 0.2528356910 0.2294308990
+ 0.2803269923 0.2543384135 0.2309931070
+ 0.2820504904 0.2558448911 0.2325553000
+ 0.2837752998 0.2573513091 0.2341264933
+ 0.2854999900 0.2588596940 0.2357089967
+ 0.2872273922 0.2603740990 0.2372916043
+ 0.2889575064 0.2618885040 0.2388751954
+ 0.2906875908 0.2634029090 0.2404648066
+ 0.2924185097 0.2649247050 0.2420545071
+ 0.2941546142 0.2664470971 0.2436441034
+ 0.2958906889 0.2679696083 0.2452432960
+ 0.2976269126 0.2694908977 0.2468443960
+ 0.2993660867 0.2710112929 0.2484454066
+ 0.3011066020 0.2725316882 0.2500450909
+ 0.3028470874 0.2740519941 0.2516433001
+ 0.3045875132 0.2755717933 0.2532413900
+ 0.3063274026 0.2770917118 0.2548404038
+ 0.3080672026 0.2786116004 0.2564507127
+ 0.3098070920 0.2801361978 0.2580609918
+ 0.3115398884 0.2816629112 0.2596713006
+ 0.3132705092 0.2831897140 0.2612847984
+ 0.3150011003 0.2847178876 0.2629001141
+ 0.3167325854 0.2862516940 0.2645153999
+ 0.3184674084 0.2877854109 0.2661319077
+ 0.3202022016 0.2893190980 0.2677547932
+ 0.3219369948 0.2908464968 0.2693777084
+ 0.3236666918 0.2923713028 0.2710005045
+ 0.3253937066 0.2938959897 0.2726289034
+ 0.3271206915 0.2954205871 0.2742598951
+ 0.3288466036 0.2969438136 0.2758910060
+ 0.3305548131 0.2984670103 0.2775225043
+ 0.3322629035 0.2999902070 0.2791568041
+ 0.3339709938 0.3015184104 0.2807911932
+ 0.3356797099 0.3030506968 0.2824254930
+ 0.3373891115 0.3045830131 0.2840622962
+ 0.3390985131 0.3061152101 0.2857011855
+ 0.3408079147 0.3076440990 0.2873399854
+ 0.3425270021 0.3091726899 0.2889789045
+ 0.3442499042 0.3107013106 0.2906231880
+ 0.3459726870 0.3122313023 0.2922680080
+ 0.3476955891 0.3137654960 0.2939127982
+ 0.3494232893 0.3152998090 0.2955600917
+ 0.3511509895 0.3168340027 0.2972145975
+ 0.3528788090 0.3183681071 0.2988691032
+ 0.3546074033 0.3199020922 0.3005236089
+ 0.3563388884 0.3214359879 0.3021857142
+ 0.3580704033 0.3229700029 0.3038538992
+ 0.3598020077 0.3245058954 0.3055221140
+ 0.3615402877 0.3260425031 0.3071902990
+ 0.3632878065 0.3275789917 0.3088661134
+ 0.3650352955 0.3291155100 0.3105435967
+ 0.3667826951 0.3306686878 0.3122211099
+ 0.3685362041 0.3322221935 0.3138988018
+ 0.3702940941 0.3337756097 0.3155812025
+ 0.3720518947 0.3353295028 0.3172636032
+ 0.3738098145 0.3368858099 0.3189460039
+ 0.3755826056 0.3384419978 0.3206303120
+ 0.3773621023 0.3399981856 0.3223223090
+ 0.3791415989 0.3415560126 0.3240141869
+ 0.3809210956 0.3431178033 0.3257062137
+ 0.3827106953 0.3446795046 0.3274028003
+ 0.3845036030 0.3462412059 0.3291088939
+ 0.3862965107 0.3478037119 0.3308149874
+ 0.3880893886 0.3493674099 0.3325211108
+ 0.3898766935 0.3509311080 0.3342320919
+ 0.3916623890 0.3524948061 0.3359496891
+ 0.3934481144 0.3540599942 0.3376674056
+ 0.3952338099 0.3556275070 0.3393850923
+ 0.3970318139 0.3571951091 0.3411099911
+ 0.3988335133 0.3587625921 0.3428429961
+ 0.4006352127 0.3603334129 0.3445760012
+ 0.4024369121 0.3619092107 0.3463088870
+ 0.4042539001 0.3634850085 0.3480437994
+ 0.4060774148 0.3650608063 0.3497805893
+ 0.4079008996 0.3666354120 0.3515174985
+ 0.4097244143 0.3682079017 0.3532544076
+ 0.4115552008 0.3697803915 0.3549940884
+ 0.4133909941 0.3713529110 0.3567374945
+ 0.4152266979 0.3729279935 0.3584809899
+ 0.4170624912 0.3745107949 0.3602243960
+ 0.4189001918 0.3760935962 0.3619695008
+ 0.4207401872 0.3776763082 0.3637174964
+ 0.4225800931 0.3792597950 0.3654656112
+ 0.4244200885 0.3808481097 0.3672136962
+ 0.4262587130 0.3824365139 0.3689666986
+ 0.4280926883 0.3840247989 0.3707352877
+ 0.4299268126 0.3856132030 0.3725039065
+ 0.4317609072 0.3872022033 0.3742724061
+ 0.4335947931 0.3887912929 0.3760411143
+ 0.4354149997 0.3903804123 0.3778105080
+ 0.4372350872 0.3919695020 0.3795798123
+ 0.4390552044 0.3935660124 0.3813492060
+ 0.4408754110 0.3951654136 0.3831185997
+ 0.4426893890 0.3967649043 0.3848997056
+ 0.4445011020 0.3983643949 0.3866828084
+ 0.4463126957 0.3999699950 0.3884659111
+ 0.4481244087 0.4015834928 0.3902488947
+ 0.4499397874 0.4031969011 0.3920351863
+ 0.4517613053 0.4048103988 0.3938237131
+ 0.4535827041 0.4064252973 0.3956122100
+ 0.4554041922 0.4080508053 0.3974005878
+ 0.4572255909 0.4096763134 0.3991900980
+ 0.4590497911 0.4113017917 0.4009819925
+ 0.4608739018 0.4129272997 0.4027737975
+ 0.4626981020 0.4145581126 0.4045656919
+ 0.4645222127 0.4161905944 0.4063574970
+ 0.4663369954 0.4178231061 0.4081600904
+ 0.4681450129 0.4194557071 0.4099633992
+ 0.4699530005 0.4210889935 0.4117667079
+ 0.4717608988 0.4227238894 0.4135699868
+ 0.4735681117 0.4243587852 0.4153786004
+ 0.4753684103 0.4259937108 0.4171918035
+ 0.4771685898 0.4276286066 0.4190050066
+ 0.4789687991 0.4292654097 0.4208182096
+ 0.4807690084 0.4309025109 0.4226312041
+ 0.4825682044 0.4325394928 0.4244414866
+ 0.4843665957 0.4341765046 0.4262517989
+ 0.4861649871 0.4358190894 0.4280619919
+ 0.4879634082 0.4374710917 0.4298723042
+ 0.4897617102 0.4391230941 0.4316802025
+ 0.4915564060 0.4407750964 0.4334864914
+ 0.4933511019 0.4424270988 0.4352926910
+ 0.4951457083 0.4440836906 0.4370990098
+ 0.4969404042 0.4457412958 0.4389046133
+ 0.4987323880 0.4473989010 0.4406982064
+ 0.5005198121 0.4490565062 0.4424918890
+ 0.5023072958 0.4507141113 0.4442855120
+ 0.5040947795 0.4523720145 0.4460791945
+ 0.5058822036 0.4540297985 0.4478673041
+ 0.5076612830 0.4556876123 0.4496487081
+ 0.5094367862 0.4573453963 0.4514302015
+ 0.5112122893 0.4589950144 0.4532116055
+ 0.5129877925 0.4606379867 0.4549930990
+ 0.5147632957 0.4622808993 0.4567654133
+ 0.5165187120 0.4639238119 0.4585354924
+ 0.5182737112 0.4655668139 0.4603056014
+ 0.5200287104 0.4672066867 0.4620757997
+ 0.5217838287 0.4688459933 0.4638450146
+ 0.5235412717 0.4704853892 0.4656072855
+ 0.5253081918 0.4721247852 0.4673697054
+ 0.5270751119 0.4737643003 0.4691320062
+ 0.5288419724 0.4754061103 0.4708943069
+ 0.5306090117 0.4770478904 0.4726507962
+ 0.5323774219 0.4786897004 0.4743973911
+ 0.5341482759 0.4803315997 0.4761438966
+ 0.5359191895 0.4819717109 0.4778904021
+ 0.5376901031 0.4836075008 0.4796369076
+ 0.5394610167 0.4852432907 0.4813722968
+ 0.5412335992 0.4868789911 0.4830994010
+ 0.5430079103 0.4885148108 0.4848263860
+ 0.5447822213 0.4901467860 0.4865534008
+ 0.5465564728 0.4917733967 0.4882805049
+ 0.5483307838 0.4934000075 0.4900054038
+ 0.5500996709 0.4950265884 0.4917294979
+ 0.5518643856 0.4966531992 0.4934537113
+ 0.5536291003 0.4982692897 0.4951778054
+ 0.5553938746 0.4998747110 0.4969018996
+ 0.5571585894 0.5014801025 0.4986188114
+ 0.5589029789 0.5030853748 0.5003340244
+ 0.5606324077 0.5046908259 0.5020492077
+ 0.5623617768 0.5062916875 0.5037645102
+ 0.5640913248 0.5078886151 0.5054796934
+ 0.5658206940 0.5094854236 0.5071663260
+ 0.5675324798 0.5110822916 0.5088484883
+ 0.5692291260 0.5126792192 0.5105305910
+ 0.5709257126 0.5142681003 0.5122128129
+ 0.5726222992 0.5158489943 0.5138949156
+ 0.5743188858 0.5174300075 0.5155733228
+ 0.5760101080 0.5190109015 0.5172510743
+ 0.5776947141 0.5205919147 0.5189288259
+ 0.5793792009 0.5221624970 0.5206065774
+ 0.5810636878 0.5237188935 0.5222843289
+ 0.5827482939 0.5252754092 0.5239499807
+ 0.5844303966 0.5268318057 0.5256124735
+ 0.5861067772 0.5283882022 0.5272750854
+ 0.5877830982 0.5299438238 0.5289375782
+ 0.5894594789 0.5314972997 0.5306000710
+ 0.5911359191 0.5330507159 0.5322602987
+ 0.5928109884 0.5346041918 0.5339192748
+ 0.5944728255 0.5361576080 0.5355783105
+ 0.5961346030 0.5377094746 0.5372374058
+ 0.5977964997 0.5392475128 0.5388963819
+ 0.5994582772 0.5407854915 0.5405499935
+ 0.6011201143 0.5423235297 0.5421981215
+ 0.6027656794 0.5438615084 0.5438463092
+ 0.6044077277 0.5453994274 0.5454944968
+ 0.6060497165 0.5469250083 0.5471426845
+ 0.6076918244 0.5484485030 0.5487864017
+ 0.6093338132 0.5499718785 0.5504183173
+ 0.6109706163 0.5514953732 0.5520501733
+ 0.6126019955 0.5530188084 0.5536820292
+ 0.6142334938 0.5545319915 0.5553138852
+ 0.6158648729 0.5560368896 0.5569456816
+ 0.6174963713 0.5575417876 0.5585566759
+ 0.6191260219 0.5590466857 0.5601673126
+ 0.6207424998 0.5605515838 0.5617777705
+ 0.6223589182 0.5620545745 0.5633884072
+ 0.6239753962 0.5635496974 0.5649989843
+ 0.6255918741 0.5650447011 0.5666049719
+ 0.6272084117 0.5665397048 0.5682082772
+ 0.6288107038 0.5680348277 0.5698117018
+ 0.6304064989 0.5695297718 0.5714150071
+ 0.6320024133 0.5710126162 0.5730183125
+ 0.6335982084 0.5724920034 0.5746158957
+ 0.6351940036 0.5739712715 0.5761947036
+ 0.6367834806 0.5754505992 0.5777735114
+ 0.6383458972 0.5769299269 0.5793523788
+ 0.6399083138 0.5784004927 0.5809311867
+ 0.6414706707 0.5798507929 0.5825099945
+ 0.6430330873 0.5813010931 0.5840647817
+ 0.6445955038 0.5827513933 0.5856127143
+ 0.6461372972 0.5842016935 0.5871605873
+ 0.6476672888 0.5856518745 0.5887084007
+ 0.6491973996 0.5870863795 0.5902562737
+ 0.6507273912 0.5885158777 0.5917943120
+ 0.6522575021 0.5899453759 0.5933035016
+ 0.6537867785 0.5913748741 0.5948126912
+ 0.6552811861 0.5928043723 0.5963220000
+ 0.6567755938 0.5942304730 0.5978311896
+ 0.6582700014 0.5956394076 0.5993403792
+ 0.6597645283 0.5970482826 0.6008219123
+ 0.6612588763 0.5984572768 0.6022902131
+ 0.6627463102 0.5998662114 0.6037583947
+ 0.6642202735 0.6012750864 0.6052265763
+ 0.6656942964 0.6026799083 0.6066948771
+ 0.6671683192 0.6040807962 0.6081615090
+ 0.6686422825 0.6054816842 0.6095842719
+ 0.6701163054 0.6068825722 0.6110069752
+ 0.6715676188 0.6082835793 0.6124296784
+ 0.6730042100 0.6096845269 0.6138523817
+ 0.6744406819 0.6110807061 0.6152750850
+ 0.6758772135 0.6124755740 0.6166884899
+ 0.6773136854 0.6138706207 0.6180831194
+ 0.6787502170 0.6152656078 0.6194776297
+ 0.6801577210 0.6166605949 0.6208721995
+ 0.6815580130 0.6180554032 0.6222668290
+ 0.6829584241 0.6194347143 0.6236612797
+ 0.6843587160 0.6208140254 0.6250466704
+ 0.6857591271 0.6221933961 0.6264250875
+ 0.6871594191 0.6235727072 0.6278035045
+ 0.6885198951 0.6249520779 0.6291819215
+ 0.6898779273 0.6263288856 0.6305602789
+ 0.6912357807 0.6276934147 0.6319386959
+ 0.6925938129 0.6290578842 0.6332967877
+ 0.6939517856 0.6304224133 0.6346477866
+ 0.6953091025 0.6317868829 0.6359987855
+ 0.6966227889 0.6331512928 0.6373497844
+ 0.6979364753 0.6345124841 0.6387007833
+ 0.6992502213 0.6358644962 0.6400517821
+ 0.7005639076 0.6372163892 0.6413751841
+ 0.7018774748 0.6385684013 0.6426938176
+ 0.7031903863 0.6399202943 0.6440123916
+ 0.7044675946 0.6412723064 0.6453310251
+ 0.7057446837 0.6426153183 0.6466495991
+ 0.7070218921 0.6439368129 0.6479681730
+ 0.7082989812 0.6452583075 0.6492698789
+ 0.7095761895 0.6465796828 0.6505696774
+ 0.7108533978 0.6479011774 0.6518694162
+ 0.7121080160 0.6492226720 0.6531692147
+ 0.7133617997 0.6505348086 0.6544690132
+ 0.7146157026 0.6518198252 0.6557686925
+ 0.7158694863 0.6531049013 0.6570504904
+ 0.7171233296 0.6543899179 0.6583297849
+ 0.7183771133 0.6556748748 0.6596090198
+ 0.7195919752 0.6569600105 0.6608883142
+ 0.7207996845 0.6582419872 0.6621676087
+ 0.7220073938 0.6595075130 0.6634469032
+ 0.7232151031 0.6607730985 0.6647216082
+ 0.7244228721 0.6620386243 0.6659951806
+ 0.7256305814 0.6633040905 0.6672688723
+ 0.7268121243 0.6645696759 0.6685425043
+ 0.7279800177 0.6658352017 0.6698160768
+ 0.7291477919 0.6670749784 0.6710897088
+ 0.7303156257 0.6683145165 0.6723518968
+ 0.7314835191 0.6695539951 0.6736078858
+ 0.7326512933 0.6707934737 0.6748638749
+ 0.7338057160 0.6720330119 0.6761198044
+ 0.7349399924 0.6732723713 0.6773757935
+ 0.7360742092 0.6744793057 0.6786317229
+ 0.7372084260 0.6756755710 0.6798825264
+ 0.7383427024 0.6768718958 0.6811262965
+ 0.7394769192 0.6780682206 0.6823701859
+ 0.7406092882 0.6792644858 0.6836140156
+ 0.7417197227 0.6804608107 0.6848577857
+ 0.7428302169 0.6816480756 0.6861016750
+ 0.7439405918 0.6828244925 0.6873413920
+ 0.7450510263 0.6840010285 0.6885573864
+ 0.7461614013 0.6851773858 0.6897733212
+ 0.7472717762 0.6863538027 0.6909891963
+ 0.7483662963 0.6875302196 0.6922051907
+ 0.7494534254 0.6887052059 0.6934211254
+ 0.7505404949 0.6898639202 0.6946370006
+ 0.7516276240 0.6910225153 0.6958392859
+ 0.7527148128 0.6921812296 0.6970379949
+ 0.7538018823 0.6933398843 0.6982367039
+ 0.7548860908 0.6944984794 0.6994354129
+ 0.7559602857 0.6956571937 0.7006341219
+ 0.7570344210 0.6968036890 0.7018327713
+ 0.7581086159 0.6979433894 0.7030227184
+ 0.7591826916 0.6990832090 0.7041977048
+ 0.7602568865 0.7002230287 0.7053728104
+ 0.7613310218 0.7013627291 0.7065479159
+ 0.7623906136 0.7025024891 0.7077229023
+ 0.7634438276 0.7036383748 0.7088980079
+ 0.7644969225 0.7047494054 0.7100731134
+ 0.7655500174 0.7058604956 0.7112265229
+ 0.7666031122 0.7069715858 0.7123770118
+ 0.7676562071 0.7080826759 0.7135276198
+ 0.7687063813 0.7091938257 0.7146781087
+ 0.7697265148 0.7103049159 0.7158285975
+ 0.7707465887 0.7114003897 0.7169790864
+ 0.7717667222 0.7124834061 0.7181215286
+ 0.7727867961 0.7135664225 0.7192468047
+ 0.7738069296 0.7146493793 0.7203720808
+ 0.7748268843 0.7157322764 0.7214972973
+ 0.7758402824 0.7168152928 0.7226225734
+ 0.7768442035 0.7178983092 0.7237479091
+ 0.7778481245 0.7189552784 0.7248731256
+ 0.7788519859 0.7200095057 0.7259737253
+ 0.7798559070 0.7210636735 0.7270630002
+ 0.7808597088 0.7221180201 0.7281523943
+ 0.7818635702 0.7231721878 0.7292417288
+ 0.7828533053 0.7242264152 0.7303311229
+ 0.7838358283 0.7252786756 0.7314203978
+ 0.7848182917 0.7263221145 0.7325097919
+ 0.7858008742 0.7273653746 0.7335510850
+ 0.7867833972 0.7284088135 0.7345916033
+ 0.7877659202 0.7294521928 0.7356320024
+ 0.7887483835 0.7304955721 0.7366725206
+ 0.7897030711 0.7315390110 0.7377129793
+ 0.7906526923 0.7325803041 0.7387534976
+ 0.7916023135 0.7336180806 0.7397875190
+ 0.7925518751 0.7346559763 0.7407963872
+ 0.7935014963 0.7356938720 0.7418051958
+ 0.7944511175 0.7367317080 0.7428141236
+ 0.7954006791 0.7377696037 0.7438229918
+ 0.7963156104 0.7388074994 0.7448318005
+ 0.7972288132 0.7398343086 0.7458407283
+ 0.7981420159 0.7408506870 0.7468411922
+ 0.7990550995 0.7418671250 0.7478262782
+ 0.7999683022 0.7428835034 0.7488114238
+ 0.8008813858 0.7438998818 0.7497966290
+ 0.8017945886 0.7449163795 0.7507817149
+ 0.8026857972 0.7459328175 0.7517668009
+ 0.8035765886 0.7469387054 0.7527520061
+ 0.8044673800 0.7479367852 0.7537305951
+ 0.8053581119 0.7489348054 0.7547006011
+ 0.8062489033 0.7499328852 0.7556706071
+ 0.8071396947 0.7509309053 0.7566406131
+ 0.8080304861 0.7519289255 0.7576106191
+ 0.8089057207 0.7529270053 0.7585806251
+ 0.8097798228 0.7539178133 0.7595505714
+ 0.8106539249 0.7549026012 0.7605128884
+ 0.8115280271 0.7558873892 0.7614648938
+ 0.8124021888 0.7568721771 0.7624170184
+ 0.8132762909 0.7578570843 0.7633690834
+ 0.8141503930 0.7588418722 0.7643210888
+ 0.8150117993 0.7598267198 0.7652732134
+ 0.8158702850 0.7607942820 0.7662252188
+ 0.8167288899 0.7617409825 0.7671691775
+ 0.8175873756 0.7626876831 0.7680981755
+ 0.8184459805 0.7636343837 0.7690271735
+ 0.8193045259 0.7645810843 0.7699561715
+ 0.8201630116 0.7655277848 0.7708852887
+ 0.8210126758 0.7664744854 0.7718142867
+ 0.8218567967 0.7674121261 0.7727432847
+ 0.8227009177 0.7683262229 0.7736694813
+ 0.8235449791 0.7692403197 0.7745841146
+ 0.8243891001 0.7701544166 0.7754986882
+ 0.8252332211 0.7710685134 0.7764133215
+ 0.8260772824 0.7719824910 0.7773278952
+ 0.8269128799 0.7728965878 0.7782425284
+ 0.8277320266 0.7738102078 0.7791571021
+ 0.8285509944 0.7747033834 0.7800716758
+ 0.8293700814 0.7755966783 0.7809833884
+ 0.8301892281 0.7764899135 0.7818949223
+ 0.8310083151 0.7773832083 0.7828063965
+ 0.8318274021 0.7782763839 0.7837178707
+ 0.8326464295 0.7791696787 0.7846295238
+ 0.8334459066 0.7800629139 0.7855409980
+ 0.8342450261 0.7809472084 0.7864524722
+ 0.8350440860 0.7818276286 0.7873616815
+ 0.8358432055 0.7827079892 0.7882695794
+ 0.8366423845 0.7835882902 0.7891774774
+ 0.8374415040 0.7844687104 0.7900853753
+ 0.8382406235 0.7853490710 0.7909933925
+ 0.8390303850 0.7862293720 0.7919012904
+ 0.8398123980 0.7871022224 0.7928091884
+ 0.8405944705 0.7879561782 0.7937148809
+ 0.8413766026 0.7888103127 0.7946143746
+ 0.8421586156 0.7896643281 0.7955139279
+ 0.8429406881 0.7905182838 0.7964133024
+ 0.8437227011 0.7913722992 0.7973127961
+ 0.8445037007 0.7922263741 0.7982122898
+ 0.8452532887 0.7930803895 0.7991117835
+ 0.8460028768 0.7939234972 0.8000112772
+ 0.8467524052 0.7947638035 0.8008962870
+ 0.8475019932 0.7956042290 0.8017777801
+ 0.8482515812 0.7964444757 0.8026592135
+ 0.8490012288 0.7972847819 0.8035405874
+ 0.8497508168 0.7981252074 0.8044220209
+ 0.8504915833 0.7989655137 0.8053035140
+ 0.8512210250 0.7998054028 0.8061848879
+ 0.8519504070 0.8006436229 0.8070607185
+ 0.8526797891 0.8014817834 0.8079198003
+ 0.8534091711 0.8023201227 0.8087788820
+ 0.8541386127 0.8031582832 0.8096380234
+ 0.8548679948 0.8039965034 0.8104969859
+ 0.8555973768 0.8048347831 0.8113561273
+ 0.8563107252 0.8056730032 0.8122152090
+ 0.8570188284 0.8065040112 0.8130742908
+ 0.8577268720 0.8073294759 0.8139200807
+ 0.8584349751 0.8081550002 0.8147575855
+ 0.8591430783 0.8089805841 0.8155952096
+ 0.8598511815 0.8098061085 0.8164327741
+ 0.8605592251 0.8106316924 0.8172702789
+ 0.8612673283 0.8114572167 0.8181079030
+ 0.8619577289 0.8122826815 0.8189455271
+ 0.8626478910 0.8130952716 0.8197829723
+ 0.8633381128 0.8139054179 0.8205946088
+ 0.8640282750 0.8147153854 0.8214033842
+ 0.8647184968 0.8155254722 0.8222122192
+ 0.8654087186 0.8163354993 0.8230209947
+ 0.8660988808 0.8171455860 0.8238298297
+ 0.8667852283 0.8179556131 0.8246386051
+ 0.8674482107 0.8187654018 0.8254473805
+ 0.8681111932 0.8195549250 0.8262543082
+ 0.8687742949 0.8203443289 0.8270450234
+ 0.8694372773 0.8211337924 0.8278357983
+ 0.8701003194 0.8219231963 0.8286265135
+ 0.8707633018 0.8227127194 0.8294172883
+ 0.8714262843 0.8235021830 0.8302080035
+ 0.8720872998 0.8242915869 0.8309987783
+ 0.8727403283 0.8250802159 0.8317894936
+ 0.8733932972 0.8258609772 0.8325753212
+ 0.8740463257 0.8266419172 0.8333438039
+ 0.8746992946 0.8274227977 0.8341122866
+ 0.8753523231 0.8282036781 0.8348808289
+ 0.8760052919 0.8289846182 0.8356493115
+ 0.8766583204 0.8297654986 0.8364177942
+ 0.8773071170 0.8305463791 0.8371862173
+ 0.8779379725 0.8313267827 0.8379547000
+ 0.8785688877 0.8321037292 0.8387172222
+ 0.8791998029 0.8328806162 0.8394616246
+ 0.8798307180 0.8336575031 0.8402060866
+ 0.8804615736 0.8344345093 0.8409506083
+ 0.8810924888 0.8352113962 0.8416950703
+ 0.8817234039 0.8359882832 0.8424395919
+ 0.8823524117 0.8367652297 0.8431841135
+ 0.8829597831 0.8375415206 0.8439285755
+ 0.8835672736 0.8383017182 0.8446694016
+ 0.8841748238 0.8390619159 0.8453953266
+ 0.8847821951 0.8398221135 0.8461210728
+ 0.8853896856 0.8405823112 0.8468469977
+ 0.8859971762 0.8413426280 0.8475728035
+ 0.8866046071 0.8421028256 0.8482987285
+ 0.8872120976 0.8428630233 0.8490244746
+ 0.8877959847 0.8436232209 0.8497503996
+ 0.8883770108 0.8443626761 0.8504748940
+ 0.8889580965 0.8450992703 0.8511757255
+ 0.8895391226 0.8458358049 0.8518766165
+ 0.8901200891 0.8465722799 0.8525773883
+ 0.8907011151 0.8473088145 0.8532782793
+ 0.8912820816 0.8480454087 0.8539791107
+ 0.8918631077 0.8487818837 0.8546800017
+ 0.8924347758 0.8495184183 0.8553807735
+ 0.8930004239 0.8502457142 0.8560817242
+ 0.8935660124 0.8509672284 0.8567734957
+ 0.8941316009 0.8516888022 0.8574634194
+ 0.8946971893 0.8524103165 0.8581532240
+ 0.8952628970 0.8531318903 0.8588430882
+ 0.8958284855 0.8538534045 0.8595330119
+ 0.8963940740 0.8545749784 0.8602228761
+ 0.8969566822 0.8552964926 0.8609126806
+ 0.8975095749 0.8560137153 0.8616026044
+ 0.8980625272 0.8567193747 0.8622909784
+ 0.8986153007 0.8574250937 0.8629779816
+ 0.8991681933 0.8581306934 0.8636649847
+ 0.8997210264 0.8588364124 0.8643519878
+ 0.9002739191 0.8595420718 0.8650388718
+ 0.9008268118 0.8602476716 0.8657258749
+ 0.9013795853 0.8609533906 0.8664128780
+ 0.9019126892 0.8616591096 0.8670998812
+ 0.9024397731 0.8623467088 0.8677850962
+ 0.9029669166 0.8630310297 0.8684529066
+ 0.9034940004 0.8637151718 0.8691207170
+ 0.9040210843 0.8643994927 0.8697885871
+ 0.9045482278 0.8650836945 0.8704563975
+ 0.9050753117 0.8657680154 0.8711242080
+ 0.9056023955 0.8664522171 0.8717920184
+ 0.9061269760 0.8671364784 0.8724598885
+ 0.9066426754 0.8678159714 0.8731276989
+ 0.9071583152 0.8684850931 0.8737882972
+ 0.9076738954 0.8691542149 0.8744438291
+ 0.9081895947 0.8698232174 0.8750993013
+ 0.9087051749 0.8704922795 0.8757547736
+ 0.9092208147 0.8711614013 0.8764103055
+ 0.9097363949 0.8718305230 0.8770657778
+ 0.9102520943 0.8724995852 0.8777213097
+ 0.9107689857 0.8731687069 0.8783767223
+ 0.9112870097 0.8738380075 0.8790321946
+ 0.9118049741 0.8745074868 0.8796920180
+ 0.9123229980 0.8751769066 0.8803519011
+ 0.9128410220 0.8758463264 0.8810117245
+ 0.9133591056 0.8765158057 0.8816714883
+ 0.9138771296 0.8771852255 0.8823313117
+ 0.9143950939 0.8778547049 0.8829911947
+ 0.9149131179 0.8785241246 0.8836510181
+ 0.9154273868 0.8791936040 0.8843107820
+ 0.9159408808 0.8798611164 0.8849681020
+ 0.9164543748 0.8805286884 0.8856195807
+ 0.9169679284 0.8811962008 0.8862711191
+ 0.9174814224 0.8818637133 0.8869225979
+ 0.9179949164 0.8825312853 0.8875740767
+ 0.9185084105 0.8831987977 0.8882256746
+ 0.9190219045 0.8838664293 0.8888772130
+ 0.9195353985 0.8845338821 0.8895286918
+ 0.9200410843 0.8851994872 0.8901801705
+ 0.9205467105 0.8858562112 0.8908231258
+ 0.9210522175 0.8865129948 0.8914582133
+ 0.9215577841 0.8871697187 0.8920934200
+ 0.9220634103 0.8878263831 0.8927285075
+ 0.9225689769 0.8884831071 0.8933635950
+ 0.9230744839 0.8891397715 0.8939986825
+ 0.9235801101 0.8897964954 0.8946338892
+ 0.9240844846 0.8904532194 0.8952689767
+ 0.9245653152 0.8911066055 0.8959041238
+ 0.9250460863 0.8917511106 0.8965278268
+ 0.9255269170 0.8923956156 0.8971452713
+ 0.9260076880 0.8930401206 0.8977627754
+ 0.9264885187 0.8936846256 0.8983802795
+ 0.9269692898 0.8943290710 0.8989977241
+ 0.9274501204 0.8949735761 0.8996152282
+ 0.9279310107 0.8956180811 0.9002326727
+ 0.9284117222 0.8962625861 0.9008501768
+ 0.9288892150 0.8969045281 0.9014676809
+ 0.9293668270 0.8975396156 0.9020715952
+ 0.9298443198 0.8981747031 0.9026690125
+ 0.9303218126 0.8988097906 0.9032663703
+ 0.9307994246 0.8994448185 0.9038637877
+ 0.9312769175 0.9000799060 0.9044612050
+ 0.9317544103 0.9007149935 0.9050586224
+ 0.9322319031 0.9013500810 0.9056559801
+ 0.9327095151 0.9019851089 0.9062533975
+ 0.9331722856 0.9026165009 0.9068508148
+ 0.9336332083 0.9032307267 0.9074404240
+ 0.9340941906 0.9038448930 0.9080247879
+ 0.9345551133 0.9044591188 0.9086092114
+ 0.9350160956 0.9050732851 0.9091936946
+ 0.9354770780 0.9056875110 0.9097781181
+ 0.9359380007 0.9063016772 0.9103624821
+ 0.9363989830 0.9069159031 0.9109470248
+ 0.9368600249 0.9075301290 0.9115313888
+ 0.9373095036 0.9081442952 0.9121158719
+ 0.9377532005 0.9087433815 0.9126855135
+ 0.9381968975 0.9093422294 0.9132357836
+ 0.9386405945 0.9099410176 0.9137859941
+ 0.9390842915 0.9105398059 0.9143362045
+ 0.9395279884 0.9111385942 0.9148864746
+ 0.9399716854 0.9117373824 0.9154366851
+ 0.9404153824 0.9123361707 0.9159868956
+ 0.9408590794 0.9129350185 0.9165371060
+ 0.9412962198 0.9135338068 0.9170873761
+ 0.9417200089 0.9141229987 0.9176347852
+ 0.9421437979 0.9147080183 0.9181675911
+ 0.9425675869 0.9152929187 0.9187005162
+ 0.9429913759 0.9158778191 0.9192333221
+ 0.9434152246 0.9164627194 0.9197661877
+ 0.9438390136 0.9170476198 0.9202991128
+ 0.9442628026 0.9176325202 0.9208319187
+ 0.9446865916 0.9182174802 0.9213647842
+ 0.9451104999 0.9188023806 0.9218975902
+ 0.9455274940 0.9193829298 0.9224305153
+ 0.9459438920 0.9199525118 0.9229544997
+ 0.9463601708 0.9205220938 0.9234762192
+ 0.9467766285 0.9210916758 0.9239978790
+ 0.9471930265 0.9216613173 0.9245195985
+ 0.9476093054 0.9222308993 0.9250413775
+ 0.9480257034 0.9228004813 0.9255630970
+ 0.9484419823 0.9233701229 0.9260848165
+ 0.9488583803 0.9239397049 0.9266064763
+ 0.9492663741 0.9245092869 0.9271281958
+ 0.9496603012 0.9250699878 0.9276459217
+ 0.9500542879 0.9256283045 0.9281548262
+ 0.9504482150 0.9261865020 0.9286637902
+ 0.9508420825 0.9267448187 0.9291728139
+ 0.9512361288 0.9273030758 0.9296817780
+ 0.9516299963 0.9278613925 0.9301908016
+ 0.9520239234 0.9284197092 0.9306998253
+ 0.9524179101 0.9289779067 0.9312087297
+ 0.9528117776 0.9295362234 0.9317176938
+ 0.9531949759 0.9300904870 0.9322267175
+ 0.9535744190 0.9306278229 0.9327245951
+ 0.9539538026 0.9311652184 0.9332185984
+ 0.9543331861 0.9317024946 0.9337126017
+ 0.9547126293 0.9322397709 0.9342067242
+ 0.9550918937 0.9327772260 0.9347007275
+ 0.9554712772 0.9333145022 0.9351947904
+ 0.9558507204 0.9338517785 0.9356887937
+ 0.9562301040 0.9343891144 0.9361827970
+ 0.9566094875 0.9349265099 0.9366769195
+ 0.9569786787 0.9354528785 0.9371693134
+ 0.9573479295 0.9359676838 0.9376392961
+ 0.9577171206 0.9364824891 0.9381092787
+ 0.9580863714 0.9369972944 0.9385793209
+ 0.9584556222 0.9375120997 0.9390493035
+ 0.9588248134 0.9380269051 0.9395192862
+ 0.9591940045 0.9385417104 0.9399893880
+ 0.9595631957 0.9390563965 0.9404593706
+ 0.9599325061 0.9395712018 0.9409294128
+ 0.9602993131 0.9400860071 0.9413993955
+ 0.9606528878 0.9405859709 0.9418666959
+ 0.9610065818 0.9410789013 0.9423272014
+ 0.9613602161 0.9415717125 0.9427877069
+ 0.9617139101 0.9420645237 0.9432482123
+ 0.9620674849 0.9425572753 0.9437087178
+ 0.9624211788 0.9430500865 0.9441692233
+ 0.9627748728 0.9435428977 0.9446297288
+ 0.9631285071 0.9440357089 0.9450901747
+ 0.9634822011 0.9445285201 0.9455507994
+ 0.9638335109 0.9450212717 0.9460113049
+ 0.9641757011 0.9455037117 0.9464758039
+ 0.9645178914 0.9459828138 0.9469466209
+ 0.9648600817 0.9464619160 0.9474173784
+ 0.9652022719 0.9469410181 0.9478881955
+ 0.9655445218 0.9474201202 0.9483590126
+ 0.9658865929 0.9478992224 0.9488298297
+ 0.9662287831 0.9483783245 0.9493005872
+ 0.9665709734 0.9488574266 0.9497714043
+ 0.9669132233 0.9493365288 0.9502422214
+ 0.9672523737 0.9498155713 0.9507129788
+ 0.9675732851 0.9502952099 0.9511811733
+ 0.9678940773 0.9507750273 0.9516453743
+ 0.9682149887 0.9512547255 0.9521095753
+ 0.9685357809 0.9517344236 0.9525737166
+ 0.9688566923 0.9522141814 0.9530379176
+ 0.9691774845 0.9526938796 0.9535021186
+ 0.9694983959 0.9531735778 0.9539663196
+ 0.9698193073 0.9536533952 0.9544305205
+ 0.9701400995 0.9541330934 0.9548947215
+ 0.9704610109 0.9546129107 0.9553589225
+ 0.9707775712 0.9550942779 0.9558221102
+ 0.9710940123 0.9555768967 0.9562827945
+ 0.9714105129 0.9560595751 0.9567434788
+ 0.9717268944 0.9565421939 0.9572042227
+ 0.9720433950 0.9570248127 0.9576649070
+ 0.9723598957 0.9575073719 0.9581255913
+ 0.9726762772 0.9579899907 0.9585862756
+ 0.9729927778 0.9584727287 0.9590470195
+ 0.9733092785 0.9589552879 0.9595077038
+ 0.9736257195 0.9594379067 0.9599683881
+ 0.9739437103 0.9599211216 0.9604294896
+ 0.9742622972 0.9604055285 0.9608955979
+ 0.9745808840 0.9608898163 0.9613618255
+ 0.9748994708 0.9613741040 0.9618278742
+ 0.9752181768 0.9618583918 0.9622939825
+ 0.9755368233 0.9623427987 0.9627602100
+ 0.9758554101 0.9628270864 0.9632263184
+ 0.9761739969 0.9633113742 0.9636924267
+ 0.9764927030 0.9637957215 0.9641585946
+ 0.9768112898 0.9642801285 0.9646247029
+ 0.9771254063 0.9647644162 0.9650908113
+ 0.9774289727 0.9652258158 0.9655427933
+ 0.9777324796 0.9656870961 0.9659900069
+ 0.9780361056 0.9661483765 0.9664372206
+ 0.9783396125 0.9666097164 0.9668844938
+ 0.9786431789 0.9670709968 0.9673317075
+ 0.9789466858 0.9675322771 0.9677789211
+ 0.9792503119 0.9679936171 0.9682261944
+ 0.9795538187 0.9684548974 0.9686734080
+ 0.9798573852 0.9689161777 0.9691206217
+ 0.9801608920 0.9693775177 0.9695677757
+ 0.9804582000 0.9698340297 0.9700127244
+ 0.9807540178 0.9702861905 0.9704523087
+ 0.9810497165 0.9707384109 0.9708918929
+ 0.9813454151 0.9711905718 0.9713315964
+ 0.9816411734 0.9716427922 0.9717711806
+ 0.9819368720 0.9720950127 0.9722108245
+ 0.9822325706 0.9725471139 0.9726504087
+ 0.9825283885 0.9729992747 0.9730899930
+ 0.9828240871 0.9734514952 0.9735295773
+ 0.9831197858 0.9739037156 0.9739692807
+ 0.9834141135 0.9743558764 0.9744089246
+ 0.9837012887 0.9748013020 0.9748445153
+ 0.9839885831 0.9752463102 0.9752789736
+ 0.9842758179 0.9756913185 0.9757133722
+ 0.9845629930 0.9761363268 0.9761477709
+ 0.9848502874 0.9765812755 0.9765822291
+ 0.9851375222 0.9770262837 0.9770166278
+ 0.9854248166 0.9774712920 0.9774510264
+ 0.9857119918 0.9779163003 0.9778854251
+ 0.9859992266 0.9783613086 0.9783198237
+ 0.9862865210 0.9788061976 0.9787542224
+ 0.9865726829 0.9792487025 0.9791879058
+ 0.9868577123 0.9796836972 0.9796146154
+ 0.9871426225 0.9801185727 0.9800413847
+ 0.9874275923 0.9805535078 0.9804680943
+ 0.9877125025 0.9809883833 0.9808948040
+ 0.9879974723 0.9814233184 0.9813215733
+ 0.9882823825 0.9818581939 0.9817482829
+ 0.9885674119 0.9822931886 0.9821749926
+ 0.9888523221 0.9827281237 0.9826018214
+ 0.9891372919 0.9831629992 0.9830284715
+ 0.9894222021 0.9835978746 0.9834551811
+ 0.9896981120 0.9840263128 0.9838774800
+ 0.9899675846 0.9844464064 0.9842901230
+ 0.9902371764 0.9848663807 0.9847027063
+ 0.9905067086 0.9852864146 0.9851151705
+ 0.9907763004 0.9857063890 0.9855278134
+ 0.9910457730 0.9861264825 0.9859403968
+ 0.9913154244 0.9865465164 0.9863529205
+ 0.9915848970 0.9869664907 0.9867655039
+ 0.9918544888 0.9873865843 0.9871780276
+ 0.9921240211 0.9878066182 0.9875906110
+ 0.9923936129 0.9882265925 0.9880031943
+ 0.9926524758 0.9886332750 0.9884101152
+ 0.9929050803 0.9890270233 0.9888089895
+ 0.9931576252 0.9894207120 0.9892079830
+ 0.9934101105 0.9898144007 0.9896069169
+ 0.9936627150 0.9902082086 0.9900057912
+ 0.9939152002 0.9906018972 0.9904047251
+ 0.9941678047 0.9909955859 0.9908037186
+ 0.9944202900 0.9913892746 0.9912025928
+ 0.9946727753 0.9917830229 0.9916015267
+ 0.9949253798 0.9921767116 0.9920004010
+ 0.9951779246 0.9925704002 0.9923992753
+ 0.9954192042 0.9929419160 0.9927871823
+ 0.9956508279 0.9932870269 0.9931579232
+ 0.9958823919 0.9936321974 0.9935287237
+ 0.9961140156 0.9939773083 0.9938995242
+ 0.9963455796 0.9943224788 0.9942703247
+ 0.9965772033 0.9946675897 0.9946411252
+ 0.9968088269 0.9950128198 0.9950119257
+ 0.9970403910 0.9953578711 0.9953826070
+ 0.9972720146 0.9957031012 0.9957534075
+ 0.9975035191 0.9960482121 0.9961242080
+ 0.9977350831 0.9963933825 0.9964950085
+ 0.9979518056 0.9967247844 0.9968441129
+ 0.9981380105 0.9970226288 0.9971309900
+ 0.9983242154 0.9973202944 0.9974179268
+ 0.9985104203 0.9976180196 0.9977048039
+ 0.9986966252 0.9979158044 0.9979916811
+ 0.9988827705 0.9982135296 0.9982786179
+ 0.9990689754 0.9985113144 0.9985654950
+ 0.9992551804 0.9988089800 0.9988523722
+ 0.9994413853 0.9991068244 0.9991393089
+ 0.9996275902 0.9994044900 0.9994261861
+ 0.9998137951 0.9997022748 0.9997131228
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/kodak_kodachrome_64.spi1d b/release/datafiles/colormanagement/luts/film_response/kodak_kodachrome_64.spi1d
new file mode 100644
index 00000000000..1de002a9cca
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/kodak_kodachrome_64.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0001951461 0.0001957432 0.0001951461
+ 0.0003971827 0.0004013765 0.0003971827
+ 0.0006093314 0.0006168035 0.0006093314
+ 0.0008331265 0.0008421433 0.0008331265
+ 0.0010693250 0.0010800430 0.0010693250
+ 0.0013165741 0.0013327420 0.0013165741
+ 0.0015723180 0.0015964990 0.0015723180
+ 0.0018371070 0.0018691909 0.0018371070
+ 0.0021111390 0.0021534991 0.0021111390
+ 0.0023975959 0.0024501081 0.0023975959
+ 0.0026947369 0.0027620669 0.0026947369
+ 0.0030043761 0.0030861360 0.0030043761
+ 0.0033243729 0.0034196740 0.0033243729
+ 0.0036564060 0.0037631679 0.0036564060
+ 0.0040000519 0.0041189152 0.0040000519
+ 0.0043583522 0.0044872048 0.0043583522
+ 0.0047301622 0.0048662322 0.0047301622
+ 0.0051159370 0.0052598631 0.0051159370
+ 0.0055168238 0.0056668199 0.0055168238
+ 0.0059318189 0.0060855579 0.0059318189
+ 0.0063606128 0.0065190848 0.0063606128
+ 0.0068039121 0.0069621201 0.0068039121
+ 0.0072610150 0.0074171298 0.0072610150
+ 0.0077324822 0.0078812325 0.0077324822
+ 0.0082186935 0.0083566681 0.0082186935
+ 0.0087195607 0.0088426983 0.0087195607
+ 0.0092373807 0.0093412735 0.0092373807
+ 0.0097713200 0.0098493528 0.0097713200
+ 0.0103215296 0.0103719197 0.0103215296
+ 0.0108859697 0.0109069496 0.0108859697
+ 0.0114682503 0.0114534898 0.0114682503
+ 0.0120688202 0.0120149804 0.0120688202
+ 0.0126871103 0.0125900703 0.0126871103
+ 0.0133261904 0.0131813204 0.0133261904
+ 0.0139810601 0.0137880603 0.0139810601
+ 0.0146569004 0.0144142900 0.0146569004
+ 0.0153518198 0.0150552802 0.0153518198
+ 0.0160680693 0.0157083794 0.0160680693
+ 0.0168081895 0.0163766202 0.0168081895
+ 0.0175653305 0.0170597993 0.0175653305
+ 0.0183405094 0.0177551508 0.0183405094
+ 0.0191343091 0.0184656195 0.0191343091
+ 0.0199443996 0.0191936009 0.0199443996
+ 0.0207724404 0.0199350491 0.0207724404
+ 0.0216247104 0.0206901692 0.0216247104
+ 0.0224967394 0.0214668401 0.0224967394
+ 0.0233900901 0.0222598594 0.0233900901
+ 0.0243038405 0.0230733994 0.0243038405
+ 0.0252429191 0.0239060391 0.0252429191
+ 0.0262041409 0.0247574691 0.0262041409
+ 0.0271870699 0.0256274194 0.0271870699
+ 0.0281923302 0.0265152995 0.0281923302
+ 0.0292217396 0.0274243094 0.0292217396
+ 0.0302699897 0.0283501595 0.0302699897
+ 0.0313403010 0.0292933993 0.0313403010
+ 0.0324379094 0.0302557293 0.0324379094
+ 0.0335581601 0.0312350094 0.0335581601
+ 0.0347037092 0.0322324112 0.0347037092
+ 0.0358735509 0.0332520008 0.0358735509
+ 0.0370708592 0.0342949703 0.0370708592
+ 0.0382963195 0.0353550985 0.0382963195
+ 0.0395508707 0.0364397392 0.0395508707
+ 0.0408340394 0.0375451893 0.0408340394
+ 0.0421415716 0.0386712812 0.0421415716
+ 0.0434691012 0.0398181006 0.0434691012
+ 0.0448197499 0.0409855917 0.0448197499
+ 0.0461917110 0.0421767011 0.0461917110
+ 0.0475859195 0.0433861688 0.0475859195
+ 0.0489974618 0.0446146913 0.0489974618
+ 0.0504221395 0.0458587706 0.0504221395
+ 0.0518664904 0.0471218303 0.0518664904
+ 0.0533314086 0.0484039001 0.0533314086
+ 0.0548129790 0.0497035906 0.0548129790
+ 0.0563097298 0.0510205887 0.0563097298
+ 0.0578255616 0.0523589589 0.0578255616
+ 0.0593563803 0.0537226684 0.0593563803
+ 0.0609117001 0.0551059917 0.0609117001
+ 0.0624887496 0.0565031916 0.0624887496
+ 0.0640849099 0.0579188913 0.0640849099
+ 0.0657032207 0.0593533292 0.0657032207
+ 0.0673418716 0.0608051494 0.0673418716
+ 0.0690022632 0.0622783490 0.0690022632
+ 0.0706820935 0.0637728870 0.0706820935
+ 0.0723833889 0.0652925819 0.0723833889
+ 0.0741088763 0.0668374375 0.0741088763
+ 0.0758581236 0.0684004799 0.0758581236
+ 0.0776309818 0.0699783191 0.0776309818
+ 0.0794283003 0.0715712607 0.0794283003
+ 0.0812476426 0.0731753632 0.0812476426
+ 0.0830830187 0.0747953877 0.0830830187
+ 0.0849313214 0.0764375329 0.0849313214
+ 0.0867945403 0.0780991465 0.0867945403
+ 0.0886720195 0.0797795132 0.0886720195
+ 0.0905641615 0.0814804882 0.0905641615
+ 0.0924730599 0.0832031295 0.0924730599
+ 0.0944008604 0.0849441215 0.0944008604
+ 0.0963497087 0.0866999105 0.0963497087
+ 0.0983169824 0.0884718299 0.0983169824
+ 0.1002992019 0.0902594104 0.1002992019
+ 0.1022920981 0.0920619667 0.1022920981
+ 0.1043059006 0.0938806906 0.1043059006
+ 0.1063338965 0.0957234576 0.1063338965
+ 0.1083754003 0.0975851119 0.1083754003
+ 0.1104298979 0.0994653329 0.1104298979
+ 0.1125015020 0.1013638005 0.1125015020
+ 0.1145863980 0.1032824963 0.1145863980
+ 0.1166832000 0.1052192971 0.1166832000
+ 0.1187919974 0.1071742028 0.1187919974
+ 0.1209281981 0.1091483980 0.1209281981
+ 0.1230840012 0.1111427024 0.1230840012
+ 0.1252560019 0.1131450012 0.1252560019
+ 0.1274449974 0.1151549965 0.1274449974
+ 0.1296389997 0.1171758026 0.1296389997
+ 0.1318369955 0.1192134991 0.1318369955
+ 0.1340391934 0.1212674007 0.1340391934
+ 0.1362587065 0.1233419999 0.1362587065
+ 0.1384842992 0.1254397035 0.1384842992
+ 0.1407155991 0.1275476962 0.1407155991
+ 0.1429519951 0.1296651959 0.1429519951
+ 0.1451932937 0.1317926049 0.1451932937
+ 0.1474387050 0.1339260936 0.1474387050
+ 0.1496894062 0.1360657066 0.1496894062
+ 0.1519508958 0.1382188946 0.1519508958
+ 0.1542215943 0.1403802931 0.1542215943
+ 0.1564984024 0.1425506026 0.1564984024
+ 0.1587806046 0.1447318047 0.1587806046
+ 0.1610693038 0.1469233930 0.1610693038
+ 0.1633670926 0.1491298974 0.1633670926
+ 0.1656686068 0.1513458043 0.1656686068
+ 0.1679760069 0.1535694003 0.1679760069
+ 0.1702944934 0.1558119059 0.1702944934
+ 0.1726182997 0.1580559015 0.1726182997
+ 0.1749459952 0.1603008062 0.1749459952
+ 0.1772750020 0.1625521928 0.1772750020
+ 0.1796054989 0.1648124009 0.1796054989
+ 0.1819469035 0.1670871973 0.1819469035
+ 0.1842930019 0.1693769991 0.1842930019
+ 0.1866527051 0.1716732979 0.1866527051
+ 0.1890151054 0.1739847064 0.1890151054
+ 0.1913814992 0.1763011068 0.1913814992
+ 0.1937530041 0.1786264926 0.1937530041
+ 0.1961268932 0.1809585989 0.1961268932
+ 0.1984995008 0.1832942963 0.1984995008
+ 0.2008748949 0.1856396049 0.2008748949
+ 0.2032615989 0.1879891008 0.2032615989
+ 0.2056463957 0.1903553009 0.2056463957
+ 0.2080287933 0.1927254945 0.2080287933
+ 0.2104109973 0.1951016933 0.2104109973
+ 0.2127932012 0.1974837035 0.2127932012
+ 0.2151795030 0.1998693049 0.2151795030
+ 0.2175665051 0.2022628039 0.2175665051
+ 0.2199523002 0.2046581060 0.2199523002
+ 0.2223390937 0.2070544064 0.2223390937
+ 0.2247312069 0.2094524950 0.2247312069
+ 0.2271240950 0.2118602991 0.2271240950
+ 0.2295188010 0.2142691016 0.2295188010
+ 0.2319131047 0.2166801989 0.2319131047
+ 0.2343070954 0.2190932930 0.2343070954
+ 0.2366984040 0.2215093970 0.2366984040
+ 0.2390874028 0.2239297926 0.2390874028
+ 0.2414730936 0.2263545990 0.2414730936
+ 0.2438565046 0.2287807018 0.2438565046
+ 0.2462437004 0.2312079072 0.2462437004
+ 0.2486331016 0.2336384058 0.2486331016
+ 0.2510172129 0.2360707074 0.2510172129
+ 0.2533988059 0.2385022044 0.2533988059
+ 0.2557758093 0.2409331948 0.2557758093
+ 0.2581504881 0.2433750033 0.2581504881
+ 0.2605293095 0.2458223999 0.2605293095
+ 0.2629100978 0.2482777983 0.2629100978
+ 0.2652882934 0.2507374883 0.2652882934
+ 0.2676649988 0.2532019913 0.2676649988
+ 0.2700409889 0.2556692958 0.2700409889
+ 0.2724165916 0.2581461072 0.2724165916
+ 0.2747870982 0.2606298029 0.2747870982
+ 0.2771523893 0.2631142139 0.2771523893
+ 0.2795102894 0.2655993104 0.2795102894
+ 0.2818570137 0.2680785954 0.2818570137
+ 0.2842001915 0.2705487907 0.2842001915
+ 0.2865338027 0.2730177939 0.2865338027
+ 0.2888650894 0.2754839063 0.2888650894
+ 0.2911804914 0.2779509127 0.2911804914
+ 0.2934958041 0.2804240882 0.2934958041
+ 0.2957996130 0.2828972936 0.2957996130
+ 0.2981027961 0.2853642106 0.2981027961
+ 0.3004046082 0.2878307104 0.3004046082
+ 0.3027057946 0.2902925909 0.3027057946
+ 0.3050028980 0.2927531898 0.3050028980
+ 0.3072963953 0.2952114940 0.3072963953
+ 0.3095870912 0.2976680100 0.3095870912
+ 0.3118711114 0.3001233041 0.3118711114
+ 0.3141548038 0.3025760055 0.3141548038
+ 0.3164271116 0.3050285876 0.3164271116
+ 0.3186993897 0.3074803948 0.3186993897
+ 0.3209618926 0.3099322915 0.3209618926
+ 0.3232209980 0.3123745024 0.3232209980
+ 0.3254742026 0.3148137033 0.3254742026
+ 0.3277195096 0.3172554970 0.3277195096
+ 0.3299638033 0.3197003901 0.3299638033
+ 0.3321967125 0.3221448064 0.3321967125
+ 0.3344297111 0.3245866895 0.3344297111
+ 0.3366633058 0.3270285130 0.3366633058
+ 0.3388971984 0.3294712901 0.3388971984
+ 0.3411270976 0.3319145143 0.3411270976
+ 0.3433490098 0.3343560100 0.3433490098
+ 0.3455708921 0.3367947936 0.3455708921
+ 0.3477726877 0.3392334878 0.3477726877
+ 0.3499726951 0.3416740894 0.3499726951
+ 0.3521771133 0.3441148996 0.3521771133
+ 0.3543866873 0.3465546072 0.3543866873
+ 0.3565962017 0.3489935100 0.3565962017
+ 0.3587929904 0.3514319956 0.3587929904
+ 0.3609898984 0.3538624048 0.3609898984
+ 0.3631897867 0.3562928140 0.3631897867
+ 0.3653928041 0.3587242961 0.3653928041
+ 0.3675957918 0.3611567020 0.3675957918
+ 0.3697830141 0.3635889888 0.3697830141
+ 0.3719697893 0.3660191894 0.3719697893
+ 0.3741520047 0.3684493899 0.3741520047
+ 0.3763279915 0.3708696961 0.3763279915
+ 0.3785040975 0.3732793927 0.3785040975
+ 0.3806638122 0.3756890893 0.3806638122
+ 0.3828206062 0.3780809045 0.3828206062
+ 0.3849751055 0.3804706931 0.3849751055
+ 0.3871222138 0.3828578889 0.3871222138
+ 0.3892692924 0.3852390945 0.3892692924
+ 0.3914063871 0.3876202106 0.3914063871
+ 0.3935371041 0.3899951875 0.3935371041
+ 0.3956677020 0.3923670948 0.3956677020
+ 0.3977789879 0.3947389126 0.3977789879
+ 0.3998892009 0.3970890045 0.3998892009
+ 0.4019930959 0.3994390965 0.4019930959
+ 0.4040785134 0.4017911851 0.4040785134
+ 0.4061638117 0.4041475952 0.4061638117
+ 0.4082497060 0.4065040052 0.4082497060
+ 0.4103358984 0.4088486135 0.4103358984
+ 0.4124220908 0.4111852944 0.4124220908
+ 0.4144963026 0.4135220051 0.4144963026
+ 0.4165670872 0.4158436060 0.4165670872
+ 0.4186378121 0.4181624949 0.4186378121
+ 0.4206883013 0.4204812944 0.4206883013
+ 0.4227387011 0.4227986038 0.4227387011
+ 0.4247851968 0.4251160026 0.4247851968
+ 0.4268149137 0.4274305999 0.4268149137
+ 0.4288446903 0.4297378063 0.4288446903
+ 0.4308727980 0.4320450127 0.4308727980
+ 0.4328976870 0.4343562126 0.4328976870
+ 0.4349226058 0.4366728067 0.4349226058
+ 0.4369452894 0.4389894009 0.4369452894
+ 0.4389654100 0.4412983954 0.4389654100
+ 0.4409855008 0.4436013103 0.4409855008
+ 0.4429948926 0.4459043145 0.4429948926
+ 0.4449959099 0.4482020140 0.4449959099
+ 0.4469969869 0.4504969120 0.4469969869
+ 0.4489865005 0.4527918994 0.4489865005
+ 0.4509691894 0.4550856948 0.4509691894
+ 0.4529519081 0.4573791921 0.4529519081
+ 0.4549242854 0.4596726894 0.4549242854
+ 0.4568913877 0.4619601071 0.4568913877
+ 0.4588586092 0.4642454982 0.4588586092
+ 0.4608167112 0.4665308893 0.4608167112
+ 0.4627703130 0.4688045979 0.4627703130
+ 0.4647239149 0.4710747004 0.4647239149
+ 0.4666719139 0.4733447134 0.4666719139
+ 0.4686164856 0.4756112993 0.4686164856
+ 0.4705610871 0.4778766036 0.4705610871
+ 0.4724955857 0.4801419973 0.4724955857
+ 0.4744223058 0.4823893905 0.4744223058
+ 0.4763489962 0.4846282899 0.4763489962
+ 0.4782694876 0.4868671000 0.4782694876
+ 0.4801832139 0.4890891910 0.4801832139
+ 0.4820967913 0.4912990928 0.4820967913
+ 0.4840039015 0.4935089946 0.4840039015
+ 0.4858981967 0.4957109988 0.4858981967
+ 0.4877924025 0.4979032874 0.4877924025
+ 0.4896839857 0.5000956059 0.4896839857
+ 0.4915628135 0.5022779703 0.4915628135
+ 0.4934414923 0.5044360161 0.4934414923
+ 0.4953202009 0.5065940022 0.4953202009
+ 0.4971916080 0.5087499022 0.4971916080
+ 0.4990628064 0.5108857751 0.4990628064
+ 0.5009341240 0.5130217075 0.5009341240
+ 0.5027933121 0.5151576996 0.5027933121
+ 0.5046482086 0.5172629952 0.5046482086
+ 0.5065031052 0.5193634033 0.5065031052
+ 0.5083466172 0.5214638710 0.5083466172
+ 0.5101770759 0.5235527754 0.5101770759
+ 0.5120074749 0.5256341100 0.5120074749
+ 0.5138359070 0.5277153850 0.5138359070
+ 0.5156533122 0.5297918916 0.5156533122
+ 0.5174707174 0.5318573117 0.5174707174
+ 0.5192881227 0.5339226127 0.5192881227
+ 0.5211005211 0.5359879732 0.5211005211
+ 0.5229117274 0.5380240083 0.5229117274
+ 0.5247228742 0.5400587916 0.5247228742
+ 0.5265293121 0.5420935750 0.5265293121
+ 0.5283294916 0.5441210866 0.5283294916
+ 0.5301296711 0.5461434126 0.5301296711
+ 0.5319293737 0.5481657982 0.5319293737
+ 0.5337138772 0.5501838923 0.5337138772
+ 0.5354983807 0.5521820784 0.5354983807
+ 0.5372828841 0.5541803241 0.5372828841
+ 0.5390647054 0.5561785102 0.5390647054
+ 0.5408445001 0.5581638813 0.5408445001
+ 0.5426242948 0.5601447225 0.5426242948
+ 0.5444021821 0.5621253848 0.5444021821
+ 0.5461611152 0.5640997291 0.5461611152
+ 0.5479199290 0.5660542846 0.5479199290
+ 0.5496788025 0.5680087805 0.5496788025
+ 0.5514246821 0.5699632764 0.5514246821
+ 0.5531604886 0.5718948841 0.5531604886
+ 0.5548964143 0.5738177896 0.5548964143
+ 0.5566322207 0.5757405758 0.5566322207
+ 0.5583571196 0.5776597857 0.5583571196
+ 0.5600818992 0.5795599818 0.5600818992
+ 0.5618067980 0.5814602971 0.5618067980
+ 0.5635148287 0.5833604932 0.5635148287
+ 0.5651975274 0.5852445960 0.5651975274
+ 0.5668801069 0.5871161819 0.5668801069
+ 0.5685628057 0.5889877081 0.5685628057
+ 0.5702366233 0.5908592939 0.5702366233
+ 0.5719075203 0.5926998258 0.5719075203
+ 0.5735784769 0.5945379734 0.5735784769
+ 0.5752487183 0.5963761210 0.5752487183
+ 0.5769106746 0.5982087851 0.5769106746
+ 0.5785726905 0.6000252962 0.5785726905
+ 0.5802345872 0.6018419266 0.5802345872
+ 0.5818874240 0.6036584973 0.5818874240
+ 0.5835233927 0.6054543257 0.5835233927
+ 0.5851594210 0.6072319746 0.5851594210
+ 0.5867953897 0.6090096831 0.5867953897
+ 0.5884160995 0.6107872725 0.5884160995
+ 0.5900263786 0.6125335097 0.5900263786
+ 0.5916365981 0.6142706275 0.5916365981
+ 0.5932468176 0.6160078049 0.5932468176
+ 0.5948414207 0.6177449226 0.5948414207
+ 0.5964319110 0.6194577217 0.5964319110
+ 0.5980222821 0.6211699843 0.5980222821
+ 0.5996127725 0.6228823066 0.5996127725
+ 0.6011689901 0.6245880127 0.6011689901
+ 0.6027231812 0.6262522936 0.6027231812
+ 0.6042773724 0.6279166937 0.6042773724
+ 0.6058307290 0.6295809746 0.6058307290
+ 0.6073688269 0.6312366724 0.6073688269
+ 0.6089069843 0.6328672767 0.6089069843
+ 0.6104450822 0.6344978213 0.6104450822
+ 0.6119816899 0.6361284256 0.6119816899
+ 0.6135081053 0.6377481818 0.6135081053
+ 0.6150345206 0.6393465996 0.6150345206
+ 0.6165608764 0.6409450173 0.6165608764
+ 0.6180859804 0.6425433755 0.6180859804
+ 0.6196045876 0.6441305876 0.6196045876
+ 0.6211233139 0.6456986070 0.6211233139
+ 0.6226419210 0.6472666860 0.6226419210
+ 0.6241582036 0.6488348246 0.6241582036
+ 0.6256613135 0.6503942013 0.6256613135
+ 0.6271644831 0.6519383788 0.6271644831
+ 0.6286675930 0.6534824967 0.6286675930
+ 0.6301684976 0.6550266743 0.6301684976
+ 0.6316462159 0.6565703154 0.6316462159
+ 0.6331238747 0.6581128836 0.6331238747
+ 0.6346017122 0.6596555114 0.6346017122
+ 0.6360793710 0.6611980796 0.6360793710
+ 0.6375383735 0.6627355218 0.6375383735
+ 0.6389971972 0.6642531753 0.6389971972
+ 0.6404560208 0.6657708883 0.6404560208
+ 0.6419147849 0.6672887206 0.6419147849
+ 0.6433644891 0.6688051224 0.6433644891
+ 0.6448125243 0.6703053713 0.6448125243
+ 0.6462605000 0.6718056202 0.6462605000
+ 0.6477084756 0.6733058095 0.6477084756
+ 0.6491544247 0.6748061180 0.6491544247
+ 0.6505993009 0.6762984991 0.6505993009
+ 0.6520441771 0.6777899265 0.6520441771
+ 0.6534891129 0.6792812943 0.6534891129
+ 0.6549304724 0.6807727218 0.6549304724
+ 0.6563671231 0.6822533011 0.6563671231
+ 0.6578037143 0.6837282181 0.6578037143
+ 0.6592403054 0.6852030158 0.6592403054
+ 0.6606746912 0.6866778731 0.6606746912
+ 0.6620953083 0.6881393194 0.6620953083
+ 0.6635159254 0.6895787120 0.6635159254
+ 0.6649364829 0.6910182238 0.6649364829
+ 0.6663571000 0.6924576163 0.6663571000
+ 0.6677600145 0.6938955784 0.6677600145
+ 0.6691588163 0.6953092813 0.6691588163
+ 0.6705574989 0.6967229843 0.6705574989
+ 0.6719563007 0.6981366873 0.6719563007
+ 0.6733427048 0.6995503902 0.6733427048
+ 0.6747133136 0.7009537220 0.6747133136
+ 0.6760839224 0.7023522854 0.6760839224
+ 0.6774544120 0.7037507892 0.6774544120
+ 0.6788250208 0.7051494122 0.6788250208
+ 0.6801913977 0.7065389752 0.6801913977
+ 0.6815578938 0.7079041004 0.6815578938
+ 0.6829243898 0.7092692852 0.6829243898
+ 0.6842908859 0.7106345296 0.6842908859
+ 0.6856526136 0.7119995952 0.6856526136
+ 0.6870101094 0.7133480906 0.6870101094
+ 0.6883677244 0.7146925926 0.6883677244
+ 0.6897252202 0.7160370946 0.6897252202
+ 0.6910821199 0.7173815966 0.6910821199
+ 0.6924132109 0.7187203765 0.6924132109
+ 0.6937443018 0.7200453877 0.6937443018
+ 0.6950753927 0.7213705182 0.6950753927
+ 0.6964064837 0.7226955295 0.6964064837
+ 0.6977304816 0.7240206003 0.6977304816
+ 0.6990460753 0.7253168225 0.6990460753
+ 0.7003617287 0.7266023755 0.7003617287
+ 0.7016773224 0.7278879881 0.7016773224
+ 0.7029929161 0.7291736007 0.7029929161
+ 0.7043045759 0.7304561734 0.7043045759
+ 0.7056154013 0.7317163944 0.7056154013
+ 0.7069262266 0.7329766154 0.7069262266
+ 0.7082371116 0.7342368960 0.7082371116
+ 0.7095441818 0.7354971170 0.7095441818
+ 0.7108336091 0.7367405891 0.7108336091
+ 0.7121229768 0.7379640937 0.7121229768
+ 0.7134124041 0.7391875982 0.7134124041
+ 0.7147017717 0.7404111028 0.7147017717
+ 0.7159798741 0.7416346073 0.7159798741
+ 0.7172445059 0.7428414226 0.7172445059
+ 0.7185090184 0.7440423965 0.7185090184
+ 0.7197735906 0.7452433705 0.7197735906
+ 0.7210381031 0.7464445233 0.7210381031
+ 0.7222943902 0.7476454973 0.7222943902
+ 0.7235469222 0.7488263845 0.7235469222
+ 0.7247992754 0.7500069737 0.7247992754
+ 0.7260518074 0.7511875033 0.7260518074
+ 0.7273042202 0.7523680925 0.7273042202
+ 0.7285580039 0.7535430193 0.7285580039
+ 0.7298120260 0.7546893954 0.7298120260
+ 0.7310661077 0.7558357120 0.7310661077
+ 0.7323200703 0.7569820881 0.7323200703
+ 0.7335740924 0.7581285238 0.7335740924
+ 0.7348139286 0.7592620850 0.7348139286
+ 0.7360535264 0.7603654861 0.7360535264
+ 0.7372931838 0.7614690065 0.7372931838
+ 0.7385329008 0.7625724077 0.7385329008
+ 0.7397707105 0.7636758089 0.7397707105
+ 0.7409819961 0.7647761106 0.7409819961
+ 0.7421932817 0.7658712268 0.7421932817
+ 0.7434046865 0.7669662833 0.7434046865
+ 0.7446159720 0.7680615187 0.7446159720
+ 0.7458249927 0.7691565752 0.7458249927
+ 0.7470089793 0.7702389956 0.7470089793
+ 0.7481930852 0.7713027000 0.7481930852
+ 0.7493770719 0.7723662853 0.7493770719
+ 0.7505611181 0.7734299898 0.7505611181
+ 0.7517436147 0.7744936943 0.7517436147
+ 0.7528991103 0.7755483985 0.7528991103
+ 0.7540546060 0.7765882015 0.7540546060
+ 0.7552101016 0.7776281238 0.7552101016
+ 0.7563655972 0.7786679268 0.7563655972
+ 0.7575210929 0.7797077894 0.7575210929
+ 0.7586535215 0.7807422280 0.7586535215
+ 0.7597848773 0.7817639112 0.7597848773
+ 0.7609164119 0.7827855945 0.7609164119
+ 0.7620478868 0.7838072181 0.7620478868
+ 0.7631794214 0.7848289013 0.7631794214
+ 0.7643039823 0.7858467102 0.7643039823
+ 0.7654271126 0.7868434787 0.7654271126
+ 0.7665501833 0.7878404260 0.7665501833
+ 0.7676733136 0.7888373137 0.7676733136
+ 0.7687965035 0.7898342013 0.7687965035
+ 0.7699062824 0.7908310890 0.7699062824
+ 0.7710080147 0.7917973995 0.7710080147
+ 0.7721098065 0.7927626967 0.7721098065
+ 0.7732115984 0.7937279940 0.7732115984
+ 0.7743132710 0.7946931720 0.7743132710
+ 0.7754092216 0.7956585288 0.7754092216
+ 0.7764948010 0.7966089845 0.7764948010
+ 0.7775803804 0.7975537777 0.7775803804
+ 0.7786660790 0.7984985113 0.7786660790
+ 0.7797517180 0.7994433045 0.7797517180
+ 0.7808365822 0.8003879786 0.7808365822
+ 0.7819091082 0.8013278842 0.7819091082
+ 0.7829815745 0.8022608757 0.7829815745
+ 0.7840539813 0.8031939268 0.7840539813
+ 0.7851265073 0.8041269183 0.7851265073
+ 0.7861989737 0.8050599098 0.7861989737
+ 0.7872558832 0.8059914708 0.7872558832
+ 0.7883058190 0.8068947196 0.7883058190
+ 0.7893555760 0.8077979088 0.7893555760
+ 0.7904053926 0.8087010980 0.7904053926
+ 0.7914553285 0.8096042871 0.7914553285
+ 0.7924997807 0.8105074763 0.7924997807
+ 0.7935289741 0.8113902807 0.7935289741
+ 0.7945582867 0.8122608066 0.7945582867
+ 0.7955874801 0.8131312728 0.7955874801
+ 0.7966167927 0.8140019178 0.7966167927
+ 0.7976459861 0.8148723841 0.7976459861
+ 0.7986531258 0.8157399297 0.7986531258
+ 0.7996534705 0.8165895939 0.7996534705
+ 0.8006538749 0.8174393773 0.8006538749
+ 0.8016542792 0.8182891011 0.8016542792
+ 0.8026548028 0.8191388249 0.8026548028
+ 0.8036468029 0.8199884892 0.8036468029
+ 0.8046095967 0.8208152056 0.8046095967
+ 0.8055725098 0.8216269016 0.8055725098
+ 0.8065354228 0.8224384785 0.8065354228
+ 0.8074982762 0.8232501745 0.8074982762
+ 0.8084611893 0.8240618110 0.8084611893
+ 0.8094077110 0.8248733878 0.8094077110
+ 0.8103441000 0.8256731033 0.8103441000
+ 0.8112804890 0.8264726996 0.8112804890
+ 0.8122168779 0.8272724152 0.8122168779
+ 0.8131533265 0.8280720711 0.8131533265
+ 0.8140897155 0.8288717270 0.8140897155
+ 0.8150094748 0.8296630979 0.8150094748
+ 0.8159283996 0.8304389119 0.8159283996
+ 0.8168473244 0.8312146068 0.8168473244
+ 0.8177661896 0.8319904208 0.8177661896
+ 0.8186851144 0.8327661157 0.8186851144
+ 0.8195986152 0.8335418105 0.8195986152
+ 0.8204926848 0.8343117237 0.8204926848
+ 0.8213868737 0.8350778818 0.8213868737
+ 0.8222811222 0.8358440995 0.8222811222
+ 0.8231751919 0.8366103768 0.8231751919
+ 0.8240693808 0.8373765945 0.8240693808
+ 0.8249509931 0.8381428719 0.8249509931
+ 0.8258157969 0.8389006257 0.8258157969
+ 0.8266806006 0.8396567106 0.8266806006
+ 0.8275455236 0.8404127955 0.8275455236
+ 0.8284103274 0.8411688805 0.8284103274
+ 0.8292750716 0.8419250250 0.8292750716
+ 0.8301308751 0.8426809907 0.8301308751
+ 0.8309800029 0.8434000015 0.8309800029
+ 0.8318290710 0.8441187143 0.8318290710
+ 0.8326780796 0.8448373079 0.8326780796
+ 0.8335272074 0.8455560207 0.8335272074
+ 0.8343762755 0.8462746143 0.8343762755
+ 0.8352112174 0.8469917774 0.8352112174
+ 0.8360387087 0.8476917148 0.8360387087
+ 0.8368662000 0.8483915925 0.8368662000
+ 0.8376936913 0.8490914702 0.8376936913
+ 0.8385211825 0.8497914076 0.8385211825
+ 0.8393486738 0.8504914045 0.8393486738
+ 0.8401600718 0.8511893749 0.8401600718
+ 0.8409640193 0.8518716097 0.8409640193
+ 0.8417677879 0.8525537848 0.8417677879
+ 0.8425716162 0.8532360196 0.8425716162
+ 0.8433753848 0.8539181948 0.8433753848
+ 0.8441792130 0.8546004295 0.8441792130
+ 0.8449677825 0.8552805781 0.8449677825
+ 0.8457477093 0.8559337258 0.8457477093
+ 0.8465275764 0.8565866947 0.8465275764
+ 0.8473075032 0.8572397828 0.8473075032
+ 0.8480873704 0.8578928709 0.8480873704
+ 0.8488671780 0.8585458994 0.8488671780
+ 0.8496319056 0.8591989875 0.8496319056
+ 0.8503823876 0.8598427773 0.8503823876
+ 0.8511329889 0.8604860902 0.8511329889
+ 0.8518834710 0.8611295223 0.8518834710
+ 0.8526340723 0.8617728949 0.8526340723
+ 0.8533846736 0.8624163270 0.8533846736
+ 0.8541216850 0.8630596995 0.8541216850
+ 0.8548328876 0.8636872172 0.8548328876
+ 0.8555439711 0.8643105030 0.8555439711
+ 0.8562551737 0.8649337888 0.8562551737
+ 0.8569663167 0.8655570149 0.8569663167
+ 0.8576774001 0.8661803007 0.8576774001
+ 0.8583872914 0.8668035865 0.8583872914
+ 0.8590850830 0.8674191236 0.8590850830
+ 0.8597828150 0.8680282831 0.8597828150
+ 0.8604806066 0.8686373830 0.8604806066
+ 0.8611783981 0.8692466021 0.8611783981
+ 0.8618761897 0.8698558211 0.8618761897
+ 0.8625739813 0.8704649806 0.8625739813
+ 0.8632513881 0.8710712790 0.8632513881
+ 0.8639233112 0.8716691136 0.8639233112
+ 0.8645951748 0.8722668886 0.8645951748
+ 0.8652670979 0.8728647232 0.8652670979
+ 0.8659390211 0.8734624982 0.8659390211
+ 0.8666108847 0.8740602732 0.8666108847
+ 0.8672788739 0.8746581078 0.8672788739
+ 0.8679410815 0.8752396703 0.8679410815
+ 0.8686032891 0.8758190274 0.8686032891
+ 0.8692653775 0.8763983250 0.8692653775
+ 0.8699275851 0.8769776225 0.8699275851
+ 0.8705897927 0.8775568008 0.8705897927
+ 0.8712518811 0.8781360984 0.8712518811
+ 0.8719059825 0.8787040114 0.8719059825
+ 0.8725597262 0.8792570233 0.8725597262
+ 0.8732132912 0.8798100948 0.8732132912
+ 0.8738669753 0.8803631067 0.8738669753
+ 0.8745207191 0.8809161186 0.8745207191
+ 0.8751742840 0.8814691901 0.8751742840
+ 0.8758152127 0.8820222020 0.8758152127
+ 0.8764392734 0.8825591207 0.8764392734
+ 0.8770633936 0.8830946088 0.8770633936
+ 0.8776875138 0.8836302161 0.8776875138
+ 0.8783116937 0.8841657043 0.8783116937
+ 0.8789358139 0.8847011924 0.8789358139
+ 0.8795598745 0.8852367997 0.8795598745
+ 0.8801736236 0.8857638836 0.8801736236
+ 0.8807854056 0.8862745762 0.8807854056
+ 0.8813971281 0.8867853284 0.8813971281
+ 0.8820089102 0.8872959018 0.8820089102
+ 0.8826205730 0.8878065944 0.8826205730
+ 0.8832324147 0.8883172870 0.8832324147
+ 0.8838424087 0.8888279796 0.8838424087
+ 0.8844444752 0.8893265724 0.8844444752
+ 0.8850466013 0.8898196220 0.8850466013
+ 0.8856487274 0.8903126717 0.8856487274
+ 0.8862507939 0.8908057213 0.8862507939
+ 0.8868529201 0.8912987709 0.8868529201
+ 0.8874549866 0.8917918205 0.8874549866
+ 0.8880429268 0.8922848105 0.8880429268
+ 0.8886129260 0.8927574158 0.8886129260
+ 0.8891829252 0.8932290077 0.8891829252
+ 0.8897529840 0.8937007189 0.8897529840
+ 0.8903229833 0.8941723108 0.8903229833
+ 0.8908931017 0.8946439028 0.8908931017
+ 0.8914631009 0.8951156139 0.8914631009
+ 0.8920254111 0.8955851793 0.8920254111
+ 0.8925833702 0.8960440755 0.8925833702
+ 0.8931413889 0.8965029716 0.8931413889
+ 0.8936994076 0.8969618082 0.8936994076
+ 0.8942574263 0.8974207044 0.8942574263
+ 0.8948153257 0.8978796005 0.8948153257
+ 0.8953732848 0.8983384967 0.8953732848
+ 0.8959251046 0.8987923265 0.8959251046
+ 0.8964747787 0.8992335200 0.8964747787
+ 0.8970245719 0.8996747136 0.8970245719
+ 0.8975743055 0.9001159072 0.8975743055
+ 0.8981240988 0.9005571008 0.8981240988
+ 0.8986737728 0.9009982944 0.8986737728
+ 0.8992236257 0.9014394283 0.8992236257
+ 0.8997610211 0.9018741846 0.8997610211
+ 0.9002953172 0.9022963047 0.9002953172
+ 0.9008296132 0.9027183056 0.9008296132
+ 0.9013640285 0.9031404257 0.9013640285
+ 0.9018983245 0.9035624266 0.9018983245
+ 0.9024326205 0.9039844871 0.9024326205
+ 0.9029669166 0.9044064879 0.9029669166
+ 0.9034835100 0.9048255086 0.9034835100
+ 0.9039946795 0.9052377939 0.9039946795
+ 0.9045059085 0.9056500196 0.9045059085
+ 0.9050170779 0.9060623050 0.9050170779
+ 0.9055283070 0.9064744711 0.9055283070
+ 0.9060394764 0.9068868160 0.9060394764
+ 0.9065507054 0.9072989821 0.9065507054
+ 0.9070444107 0.9077087045 0.9070444107
+ 0.9075291157 0.9081088901 0.9075291157
+ 0.9080138206 0.9085091949 0.9080138206
+ 0.9084984064 0.9089093804 0.9084984064
+ 0.9089831114 0.9093096256 0.9089831114
+ 0.9094678164 0.9097098708 0.9094678164
+ 0.9099525213 0.9101101160 0.9099525213
+ 0.9104328752 0.9105101824 0.9104328752
+ 0.9109085202 0.9109075069 0.9109085202
+ 0.9113841057 0.9113047719 0.9113841057
+ 0.9118596911 0.9117019773 0.9118596911
+ 0.9123352170 0.9120993018 0.9123352170
+ 0.9128108025 0.9124966264 0.9128108025
+ 0.9132863879 0.9128937721 0.9132863879
+ 0.9137566090 0.9132910967 0.9137566090
+ 0.9142068028 0.9136837125 0.9142068028
+ 0.9146568775 0.9140750170 0.9146568775
+ 0.9151070714 0.9144663215 0.9151070714
+ 0.9155572057 0.9148576260 0.9155572057
+ 0.9160073996 0.9152488708 0.9160073996
+ 0.9164574742 0.9156401753 0.9164574742
+ 0.9169077277 0.9160314798 0.9169077277
+ 0.9173452258 0.9164192080 0.9173452258
+ 0.9177808166 0.9168025851 0.9177808166
+ 0.9182164073 0.9171860218 0.9182164073
+ 0.9186519980 0.9175693989 0.9186519980
+ 0.9190875292 0.9179527760 0.9190875292
+ 0.9195231199 0.9183362126 0.9195231199
+ 0.9199587107 0.9187195897 0.9199587107
+ 0.9203907251 0.9191030860 0.9203907251
+ 0.9208180904 0.9194877148 0.9208180904
+ 0.9212455153 0.9198724031 0.9212455153
+ 0.9216729999 0.9202570915 0.9216729999
+ 0.9221004248 0.9206417203 0.9221004248
+ 0.9225277901 0.9210264087 0.9225277901
+ 0.9229552746 0.9214110970 0.9229552746
+ 0.9233826995 0.9217957258 0.9233826995
+ 0.9237878919 0.9221795201 0.9237878919
+ 0.9241918921 0.9225625992 0.9241918921
+ 0.9245958924 0.9229457974 0.9245958924
+ 0.9249997735 0.9233288765 0.9249997735
+ 0.9254037738 0.9237120152 0.9254037738
+ 0.9258077741 0.9240950942 0.9258077741
+ 0.9262117743 0.9244781733 0.9262117743
+ 0.9266104102 0.9248613119 0.9266104102
+ 0.9269998074 0.9252420068 0.9269998074
+ 0.9273892045 0.9256225824 0.9273892045
+ 0.9277786016 0.9260032177 0.9277786016
+ 0.9281679988 0.9263836741 0.9281679988
+ 0.9285573959 0.9267643094 0.9285573959
+ 0.9289467931 0.9271448851 0.9289467931
+ 0.9293361902 0.9275255203 0.9293361902
+ 0.9297145009 0.9279053807 0.9297145009
+ 0.9300879240 0.9282836914 0.9300879240
+ 0.9304612875 0.9286620021 0.9304612875
+ 0.9308347106 0.9290403128 0.9308347106
+ 0.9312080741 0.9294186831 0.9312080741
+ 0.9315814972 0.9297969937 0.9315814972
+ 0.9319549203 0.9301753044 0.9319549203
+ 0.9323282838 0.9305536151 0.9323282838
+ 0.9326866269 0.9309234023 0.9326866269
+ 0.9330440164 0.9312868118 0.9330440164
+ 0.9334015250 0.9316502810 0.9334015250
+ 0.9337589741 0.9320136905 0.9337589741
+ 0.9341164827 0.9323772192 0.9341164827
+ 0.9344739914 0.9327406287 0.9344739914
+ 0.9348315001 0.9331040978 0.9348315001
+ 0.9351881146 0.9334675074 0.9351881146
+ 0.9355376959 0.9338105917 0.9355376959
+ 0.9358873963 0.9341468215 0.9358873963
+ 0.9362370968 0.9344829917 0.9362370968
+ 0.9365866780 0.9348192215 0.9365866780
+ 0.9369363785 0.9351553917 0.9369363785
+ 0.9372860789 0.9354916215 0.9372860789
+ 0.9376357794 0.9358279109 0.9376357794
+ 0.9379813075 0.9361640811 0.9379813075
+ 0.9383106828 0.9364855886 0.9383106828
+ 0.9386399984 0.9368044734 0.9386399984
+ 0.9389693141 0.9371232986 0.9389693141
+ 0.9392986298 0.9374421239 0.9392986298
+ 0.9396280050 0.9377608895 0.9396280050
+ 0.9399573207 0.9380797148 0.9399573207
+ 0.9402865767 0.9383985996 0.9402865767
+ 0.9406142831 0.9387174249 0.9406142831
+ 0.9409353733 0.9390224218 0.9409353733
+ 0.9412565231 0.9393249750 0.9412565231
+ 0.9415774941 0.9396277070 0.9415774941
+ 0.9418985844 0.9399303198 0.9418985844
+ 0.9422196746 0.9402328730 0.9422196746
+ 0.9425407052 0.9405354857 0.9425407052
+ 0.9428617954 0.9408380985 0.9428617954
+ 0.9431818128 0.9411407113 0.9431818128
+ 0.9434933066 0.9414327741 0.9434933066
+ 0.9438048005 0.9417217970 0.9438048005
+ 0.9441161752 0.9420107007 0.9441161752
+ 0.9444277287 0.9422997236 0.9444277287
+ 0.9447392225 0.9425886273 0.9447392225
+ 0.9450505972 0.9428775907 0.9450505972
+ 0.9453620911 0.9431664944 0.9453620911
+ 0.9456735849 0.9434555173 0.9456735849
+ 0.9459661841 0.9437438250 0.9459661841
+ 0.9462574720 0.9440317750 0.9462574720
+ 0.9465487003 0.9443197250 0.9465487003
+ 0.9468399882 0.9446076155 0.9468399882
+ 0.9471312165 0.9448956251 0.9471312165
+ 0.9474225044 0.9451835155 0.9474225044
+ 0.9477136731 0.9454715252 0.9477136731
+ 0.9480050206 0.9457594156 0.9480050206
+ 0.9482976794 0.9460437298 0.9482976794
+ 0.9485909939 0.9463211894 0.9485909939
+ 0.9488844275 0.9465987086 0.9488844275
+ 0.9491778016 0.9468762279 0.9491778016
+ 0.9494711757 0.9471536875 0.9494711757
+ 0.9497646093 0.9474310875 0.9497646093
+ 0.9500579834 0.9477086067 0.9500579834
+ 0.9503514171 0.9479861259 0.9503514171
+ 0.9506422281 0.9482635856 0.9506422281
+ 0.9509274960 0.9485384226 0.9509274960
+ 0.9512127042 0.9488133192 0.9512127042
+ 0.9514979720 0.9490882158 0.9514979720
+ 0.9517831802 0.9493629932 0.9517831802
+ 0.9520685077 0.9496378899 0.9520685077
+ 0.9523537159 0.9499127269 0.9523537159
+ 0.9526389241 0.9501876235 0.9526389241
+ 0.9529241920 0.9504625201 0.9529241920
+ 0.9532032013 0.9507294893 0.9532032013
+ 0.9534810781 0.9509904981 0.9534810781
+ 0.9537590742 0.9512513876 0.9537590742
+ 0.9540370703 0.9515123963 0.9540370703
+ 0.9543150067 0.9517734051 0.9543150067
+ 0.9545930028 0.9520342946 0.9545930028
+ 0.9548709989 0.9522953033 0.9548709989
+ 0.9551489949 0.9525561929 0.9551489949
+ 0.9554250240 0.9528167844 0.9554250240
+ 0.9556970000 0.9530668259 0.9556970000
+ 0.9559689760 0.9533166885 0.9559689760
+ 0.9562410712 0.9535666108 0.9562410712
+ 0.9565131068 0.9538165927 0.9565131068
+ 0.9567850828 0.9540665150 0.9567850828
+ 0.9570571184 0.9543164968 0.9570571184
+ 0.9573290944 0.9545664191 0.9573290944
+ 0.9576011896 0.9548164010 0.9576011896
+ 0.9578632116 0.9550620914 0.9578632116
+ 0.9581208229 0.9553020000 0.9581208229
+ 0.9583783746 0.9555419087 0.9583783746
+ 0.9586359859 0.9557818174 0.9586359859
+ 0.9588935971 0.9560217261 0.9588935971
+ 0.9591512084 0.9562615156 0.9591512084
+ 0.9594088197 0.9565014243 0.9594088197
+ 0.9596663713 0.9567412734 0.9596663713
+ 0.9599239826 0.9569811821 0.9599239826
+ 0.9601870775 0.9572148919 0.9601870775
+ 0.9604502916 0.9574459791 0.9604502916
+ 0.9607136250 0.9576771259 0.9607136250
+ 0.9609768987 0.9579082131 0.9609768987
+ 0.9612401128 0.9581393003 0.9612401128
+ 0.9615033865 0.9583703876 0.9615033865
+ 0.9617667198 0.9586014748 0.9617667198
+ 0.9620298743 0.9588325024 0.9620298743
+ 0.9622896910 0.9590635896 0.9622896910
+ 0.9625295997 0.9592813849 0.9625295997
+ 0.9627695084 0.9594975710 0.9627695084
+ 0.9630094171 0.9597136974 0.9630094171
+ 0.9632493258 0.9599298835 0.9632493258
+ 0.9634891748 0.9601460099 0.9634891748
+ 0.9637290835 0.9603621960 0.9637290835
+ 0.9639688730 0.9605783820 0.9639688730
+ 0.9642087817 0.9607945085 0.9642087817
+ 0.9644483924 0.9610106945 0.9644483924
+ 0.9646872282 0.9612244964 0.9646872282
+ 0.9649258852 0.9614382982 0.9649258852
+ 0.9651646018 0.9616519809 0.9651646018
+ 0.9654033184 0.9618657827 0.9654033184
+ 0.9656419754 0.9620795846 0.9656419754
+ 0.9658808112 0.9622933865 0.9658808112
+ 0.9661195278 0.9625071883 0.9661195278
+ 0.9663581848 0.9627209902 0.9663581848
+ 0.9665971994 0.9629346728 0.9665971994
+ 0.9668369889 0.9631499052 0.9668369889
+ 0.9670768976 0.9633650780 0.9670768976
+ 0.9673168063 0.9635801911 0.9673168063
+ 0.9675567150 0.9637954235 0.9675567150
+ 0.9677965045 0.9640105963 0.9677965045
+ 0.9680364132 0.9642258286 0.9680364132
+ 0.9682763219 0.9644410014 0.9682763219
+ 0.9685161114 0.9646561146 0.9685161114
+ 0.9687551260 0.9648712873 0.9687551260
+ 0.9689875245 0.9650797844 0.9689875245
+ 0.9692199230 0.9652873874 0.9692199230
+ 0.9694522023 0.9654949903 0.9694522023
+ 0.9696846008 0.9657025933 0.9696846008
+ 0.9699168801 0.9659103155 0.9699168801
+ 0.9701492786 0.9661179185 0.9701492786
+ 0.9703816175 0.9663255215 0.9703816175
+ 0.9706140161 0.9665331244 0.9706140161
+ 0.9708464146 0.9667407274 0.9708464146
+ 0.9710645080 0.9669466019 0.9710645080
+ 0.9712811708 0.9671518207 0.9712811708
+ 0.9714977741 0.9673569202 0.9714977741
+ 0.9717144966 0.9675620198 0.9717144966
+ 0.9719312191 0.9677671790 0.9719312191
+ 0.9721478820 0.9679722786 0.9721478820
+ 0.9723646045 0.9681774974 0.9723646045
+ 0.9725812078 0.9683825970 0.9725812078
+ 0.9727978706 0.9685876966 0.9727978706
+ 0.9730128050 0.9687932730 0.9730128050
+ 0.9732266068 0.9689996243 0.9732266068
+ 0.9734402895 0.9692057967 0.9734402895
+ 0.9736539721 0.9694120884 0.9736539721
+ 0.9738677144 0.9696183205 0.9738677144
+ 0.9740815163 0.9698246121 0.9740815163
+ 0.9742951989 0.9700307846 0.9742951989
+ 0.9745088816 0.9702370763 0.9745088816
+ 0.9747226834 0.9704433084 0.9747226834
+ 0.9749327898 0.9706496000 0.9749327898
+ 0.9751276970 0.9708499908 0.9751276970
+ 0.9753227234 0.9710503817 0.9753227234
+ 0.9755175710 0.9712507129 0.9755175710
+ 0.9757124782 0.9714511037 0.9757124782
+ 0.9759075046 0.9716514945 0.9759075046
+ 0.9761024117 0.9718518853 0.9761024117
+ 0.9762973785 0.9720522761 0.9762973785
+ 0.9764922857 0.9722527266 0.9764922857
+ 0.9766871929 0.9724531174 0.9766871929
+ 0.9768773913 0.9726468921 0.9768773913
+ 0.9770653844 0.9728342891 0.9770653844
+ 0.9772533774 0.9730216265 0.9772533774
+ 0.9774413109 0.9732090235 0.9774413109
+ 0.9776293039 0.9733963013 0.9776293039
+ 0.9778172970 0.9735835791 0.9778172970
+ 0.9780052900 0.9737709761 0.9780052900
+ 0.9781932235 0.9739583135 0.9781932235
+ 0.9783812165 0.9741457105 0.9783812165
+ 0.9785689116 0.9743329883 0.9785689116
+ 0.9787533879 0.9745092988 0.9787533879
+ 0.9789379239 0.9746842980 0.9789379239
+ 0.9791222811 0.9748592973 0.9791222811
+ 0.9793068171 0.9750342965 0.9793068171
+ 0.9794911742 0.9752092957 0.9794911742
+ 0.9796757102 0.9753842950 0.9796757102
+ 0.9798601270 0.9755592942 0.9798601270
+ 0.9800446033 0.9757342935 0.9800446033
+ 0.9802290201 0.9759092927 0.9802290201
+ 0.9804099202 0.9760805964 0.9804099202
+ 0.9805839062 0.9762361050 0.9805839062
+ 0.9807580113 0.9763916731 0.9807580113
+ 0.9809321165 0.9765471816 0.9809321165
+ 0.9811062217 0.9767026901 0.9811062217
+ 0.9812802076 0.9768583179 0.9812802076
+ 0.9814543128 0.9770138264 0.9814543128
+ 0.9816284180 0.9771692753 0.9816284180
+ 0.9818025231 0.9773249030 0.9818025231
+ 0.9819766283 0.9774804115 0.9819766283
+ 0.9821426272 0.9776375294 0.9821426272
+ 0.9823012948 0.9777972102 0.9823012948
+ 0.9824600816 0.9779568911 0.9824600816
+ 0.9826188087 0.9781165719 0.9826188087
+ 0.9827775955 0.9782761931 0.9827775955
+ 0.9829363227 0.9784358740 0.9829363227
+ 0.9830951095 0.9785956144 0.9830951095
+ 0.9832537770 0.9787552953 0.9832537770
+ 0.9834125042 0.9789149761 0.9834125042
+ 0.9835712910 0.9790747166 0.9835712910
+ 0.9837297201 0.9792376757 0.9837297201
+ 0.9838877916 0.9794046283 0.9838877916
+ 0.9840459824 0.9795715213 0.9840459824
+ 0.9842041135 0.9797384143 0.9842041135
+ 0.9843623042 0.9799053073 0.9843623042
+ 0.9845203757 0.9800723195 0.9845203757
+ 0.9846786261 0.9802392125 0.9846786261
+ 0.9848366976 0.9804061055 0.9848366976
+ 0.9849948883 0.9805729985 0.9849948883
+ 0.9851530194 0.9807398915 0.9851530194
+ 0.9853115082 0.9809073210 0.9853115082
+ 0.9854704142 0.9810754061 0.9854704142
+ 0.9856293201 0.9812434912 0.9856293201
+ 0.9857881069 0.9814115167 0.9857881069
+ 0.9859470129 0.9815796018 0.9859470129
+ 0.9861057997 0.9817476869 0.9861057997
+ 0.9862647057 0.9819157124 0.9862647057
+ 0.9864236116 0.9820837975 0.9864236116
+ 0.9865823984 0.9822518826 0.9865823984
+ 0.9867413044 0.9824199080 0.9867413044
+ 0.9868972898 0.9825896025 0.9868972898
+ 0.9870492816 0.9827628732 0.9870492816
+ 0.9872012138 0.9829362035 0.9872012138
+ 0.9873532057 0.9831094742 0.9873532057
+ 0.9875051975 0.9832828045 0.9875051975
+ 0.9876571894 0.9834560752 0.9876571894
+ 0.9878091812 0.9836292863 0.9878091812
+ 0.9879611731 0.9838026166 0.9879611731
+ 0.9881131053 0.9839758873 0.9881131053
+ 0.9882650971 0.9841492176 0.9882650971
+ 0.9884155989 0.9843227863 0.9884155989
+ 0.9885584116 0.9845007062 0.9885584116
+ 0.9887011051 0.9846786261 0.9887011051
+ 0.9888437986 0.9848564863 0.9888437986
+ 0.9889864922 0.9850344062 0.9889864922
+ 0.9891293049 0.9852123260 0.9891293049
+ 0.9892719984 0.9853901863 0.9892719984
+ 0.9894146919 0.9855681062 0.9894146919
+ 0.9895573854 0.9857460260 0.9895573854
+ 0.9897001982 0.9859238863 0.9897001982
+ 0.9898428917 0.9861018062 0.9898428917
+ 0.9899815917 0.9862813950 0.9899815917
+ 0.9901192784 0.9864618182 0.9901192784
+ 0.9902570248 0.9866421819 0.9902570248
+ 0.9903945923 0.9868224859 0.9903945923
+ 0.9905322790 0.9870029092 0.9905322790
+ 0.9906700253 0.9871832728 0.9906700253
+ 0.9908077121 0.9873635769 0.9908077121
+ 0.9909452796 0.9875440001 0.9909452796
+ 0.9910830259 0.9877244234 0.9910830259
+ 0.9912207127 0.9879047871 0.9912207127
+ 0.9913563728 0.9880853295 0.9913563728
+ 0.9914879799 0.9882667065 0.9914879799
+ 0.9916195273 0.9884480238 0.9916195273
+ 0.9917510152 0.9886294007 0.9917510152
+ 0.9918825030 0.9888107181 0.9918825030
+ 0.9920139909 0.9889919758 0.9920139909
+ 0.9921454787 0.9891734123 0.9921454787
+ 0.9922770262 0.9893547297 0.9922770262
+ 0.9924085140 0.9895361066 0.9924085140
+ 0.9925400019 0.9897174239 0.9925400019
+ 0.9926714897 0.9898986816 0.9926714897
+ 0.9928073883 0.9900819063 0.9928073883
+ 0.9929450154 0.9902659059 0.9929450154
+ 0.9930827022 0.9904500246 0.9930827022
+ 0.9932203293 0.9906340241 0.9932203293
+ 0.9933580160 0.9908180833 0.9933580160
+ 0.9934955835 0.9910022020 0.9934955835
+ 0.9936332107 0.9911862016 0.9936332107
+ 0.9937708974 0.9913703203 0.9937708974
+ 0.9939085245 0.9915543795 0.9939085245
+ 0.9940462112 0.9917383790 0.9940462112
+ 0.9941837192 0.9919224977 0.9941837192
+ 0.9943144917 0.9921045899 0.9943144917
+ 0.9944453835 0.9922866821 0.9944453835
+ 0.9945762157 0.9924687147 0.9945762157
+ 0.9947069883 0.9926506877 0.9947069883
+ 0.9948378205 0.9928327799 0.9948378205
+ 0.9949685931 0.9930148125 0.9949685931
+ 0.9950994253 0.9931967854 0.9950994253
+ 0.9952301979 0.9933788776 0.9952301979
+ 0.9953609705 0.9935609102 0.9953609705
+ 0.9954918027 0.9937428832 0.9954918027
+ 0.9956232905 0.9939253926 0.9956232905
+ 0.9957578778 0.9941105843 0.9957578778
+ 0.9958925843 0.9942957163 0.9958925843
+ 0.9960271716 0.9944809079 0.9960271716
+ 0.9961618781 0.9946660995 0.9961618781
+ 0.9962965250 0.9948512912 0.9962965250
+ 0.9964311123 0.9950364232 0.9964311123
+ 0.9965658188 0.9952216148 0.9965658188
+ 0.9967004061 0.9954068065 0.9967004061
+ 0.9968351126 0.9955918789 0.9968351126
+ 0.9969696999 0.9957770705 0.9969696999
+ 0.9971042275 0.9959601164 0.9971042275
+ 0.9972379804 0.9961351752 0.9972379804
+ 0.9973717928 0.9963101745 0.9973717928
+ 0.9975057244 0.9964852929 0.9975057244
+ 0.9976394773 0.9966604114 0.9976394773
+ 0.9977734089 0.9968354702 0.9977734089
+ 0.9979072213 0.9970105290 0.9979072213
+ 0.9980410933 0.9971855879 0.9980410933
+ 0.9981749058 0.9973607063 0.9981749058
+ 0.9983087778 0.9975357056 0.9983087778
+ 0.9984425902 0.9977108240 0.9984425902
+ 0.9985756874 0.9978886843 0.9985756874
+ 0.9987052083 0.9980806112 0.9987052083
+ 0.9988346100 0.9982725978 0.9988346100
+ 0.9989640713 0.9984645247 0.9989640713
+ 0.9990935922 0.9986563921 0.9990935922
+ 0.9992231131 0.9988483787 0.9992231131
+ 0.9993525743 0.9990403056 0.9993525743
+ 0.9994820952 0.9992322922 0.9994820952
+ 0.9996114969 0.9994242191 0.9996114969
+ 0.9997410178 0.9996160865 0.9997410178
+ 0.9998704791 0.9998080730 0.9998704791
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/kodak_max_zoom_800.spi1d b/release/datafiles/colormanagement/luts/film_response/kodak_max_zoom_800.spi1d
new file mode 100644
index 00000000000..bb80ebdb783
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/kodak_max_zoom_800.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0084391097 0.0075763101 0.0055803522
+ 0.0169892292 0.0151253100 0.0110553904
+ 0.0246818494 0.0219931193 0.0160910394
+ 0.0317661613 0.0282940008 0.0208101291
+ 0.0382325202 0.0340048485 0.0251940992
+ 0.0441172384 0.0393486507 0.0293568596
+ 0.0496861897 0.0445001610 0.0333589911
+ 0.0550585985 0.0493195914 0.0371792093
+ 0.0601223111 0.0539280511 0.0408726782
+ 0.0649642274 0.0583757199 0.0444436409
+ 0.0695851371 0.0626427680 0.0479431897
+ 0.0740094930 0.0667798966 0.0513359718
+ 0.0783147216 0.0707852617 0.0546398088
+ 0.0825306326 0.0747059137 0.0578773208
+ 0.0866608396 0.0785023794 0.0610598996
+ 0.0907057226 0.0822077468 0.0641641617
+ 0.0946363509 0.0858238488 0.0672321990
+ 0.0984090120 0.0893622264 0.0702527389
+ 0.1020661965 0.0928608030 0.0732008815
+ 0.1056471020 0.0963046327 0.0760966092
+ 0.1091898009 0.0996690318 0.0789577886
+ 0.1126779020 0.1029520035 0.0817804411
+ 0.1161487997 0.1061682031 0.0845761225
+ 0.1195472032 0.1093337014 0.0873135701
+ 0.1229045019 0.1124323979 0.0900195017
+ 0.1262066960 0.1155048013 0.0926894471
+ 0.1294586062 0.1185453981 0.0953314528
+ 0.1326504052 0.1215455979 0.0979523510
+ 0.1357606053 0.1245016977 0.1005545035
+ 0.1388241053 0.1273857951 0.1031209007
+ 0.1418274045 0.1302534044 0.1056765020
+ 0.1447373033 0.1330838054 0.1081990004
+ 0.1476096958 0.1358837932 0.1106970012
+ 0.1504617035 0.1386432946 0.1131801978
+ 0.1533035040 0.1413915008 0.1156400964
+ 0.1561179012 0.1440995932 0.1180797964
+ 0.1589269936 0.1467884034 0.1204816997
+ 0.1617161930 0.1494296938 0.1228761971
+ 0.1644722074 0.1520594060 0.1252495944
+ 0.1672009975 0.1546591967 0.1275874972
+ 0.1699149013 0.1572349966 0.1299159974
+ 0.1725970954 0.1597743034 0.1322304010
+ 0.1752271056 0.1622851938 0.1345029026
+ 0.1778230965 0.1647903025 0.1367422938
+ 0.1803787053 0.1672617942 0.1389641017
+ 0.1828950047 0.1697237939 0.1411608011
+ 0.1853982061 0.1721518934 0.1433494985
+ 0.1878785938 0.1745534986 0.1455025971
+ 0.1903571934 0.1769458950 0.1476327926
+ 0.1928332001 0.1793050021 0.1497652978
+ 0.1952915937 0.1816422045 0.1519078016
+ 0.1977207959 0.1839872003 0.1540307999
+ 0.2001152039 0.1863050014 0.1561508030
+ 0.2025077045 0.1886059940 0.1582663059
+ 0.2049013972 0.1908763051 0.1603844017
+ 0.2072762996 0.1931104958 0.1624784023
+ 0.2096343935 0.1953328997 0.1645596027
+ 0.2119597048 0.1975608021 0.1666202992
+ 0.2142512947 0.1997732073 0.1686652005
+ 0.2165051997 0.2019650936 0.1706995964
+ 0.2187242955 0.2041545063 0.1727278978
+ 0.2209309936 0.2063177973 0.1747494042
+ 0.2231297940 0.2084506005 0.1767428070
+ 0.2253059000 0.2105776966 0.1787129939
+ 0.2274693996 0.2127068937 0.1806745976
+ 0.2296334058 0.2148050070 0.1826314926
+ 0.2317734957 0.2168878019 0.1845801026
+ 0.2338978052 0.2189736068 0.1865082979
+ 0.2360040992 0.2210465968 0.1884184927
+ 0.2380760014 0.2230933011 0.1903171986
+ 0.2401296049 0.2251244932 0.1922022998
+ 0.2421852946 0.2271171063 0.1940843016
+ 0.2442210019 0.2290779948 0.1959476024
+ 0.2462366074 0.2310225964 0.1977925003
+ 0.2482510954 0.2329605967 0.1996293068
+ 0.2502493858 0.2348946929 0.2014590949
+ 0.2522226870 0.2368202060 0.2032801062
+ 0.2541834116 0.2387333065 0.2050863057
+ 0.2561317980 0.2406367958 0.2068803012
+ 0.2580586970 0.2425450981 0.2086673975
+ 0.2599673867 0.2444512993 0.2104519010
+ 0.2618735135 0.2463417053 0.2122323960
+ 0.2637856007 0.2482246011 0.2140039951
+ 0.2656947076 0.2501086891 0.2157679945
+ 0.2675924003 0.2519941926 0.2175332010
+ 0.2694917023 0.2538610101 0.2192887962
+ 0.2713840008 0.2557184100 0.2210364938
+ 0.2732622921 0.2575724125 0.2227811962
+ 0.2751278877 0.2594226897 0.2245233059
+ 0.2769821882 0.2612658143 0.2262614965
+ 0.2788152099 0.2630968094 0.2279942930
+ 0.2806366980 0.2649213970 0.2297101021
+ 0.2824515104 0.2667475939 0.2314116955
+ 0.2842657864 0.2685596049 0.2331091017
+ 0.2860780060 0.2703500092 0.2348040938
+ 0.2878656983 0.2721207142 0.2364936024
+ 0.2896395028 0.2738777995 0.2381702960
+ 0.2914094925 0.2756209075 0.2398329973
+ 0.2931736112 0.2773512006 0.2414873987
+ 0.2949214876 0.2790701985 0.2431395948
+ 0.2966547906 0.2807764113 0.2447883040
+ 0.2983818054 0.2824758887 0.2464286983
+ 0.3001014888 0.2841669023 0.2480624020
+ 0.3017992973 0.2858343124 0.2496916056
+ 0.3034814894 0.2875004113 0.2513076067
+ 0.3051558137 0.2891632915 0.2529129982
+ 0.3068262041 0.2908203900 0.2545062900
+ 0.3085027933 0.2924638093 0.2560915053
+ 0.3101766109 0.2941013873 0.2576715052
+ 0.3118444085 0.2957335114 0.2592464983
+ 0.3135068119 0.2973626852 0.2608287036
+ 0.3151695132 0.2989872992 0.2624095082
+ 0.3168335855 0.3006061018 0.2639889121
+ 0.3184846938 0.3022069037 0.2655547857
+ 0.3201304972 0.3038052917 0.2671144009
+ 0.3217692077 0.3054029942 0.2686659992
+ 0.3234055936 0.3069913089 0.2702147961
+ 0.3250352144 0.3085735142 0.2717638910
+ 0.3266384900 0.3101415038 0.2733153105
+ 0.3282344043 0.3117021918 0.2748562098
+ 0.3298248947 0.3132582009 0.2763910890
+ 0.3314053118 0.3148199916 0.2779105008
+ 0.3329854906 0.3163794875 0.2794237137
+ 0.3345662951 0.3179340065 0.2809270918
+ 0.3361378908 0.3194747865 0.2824262977
+ 0.3377039135 0.3210082948 0.2839238942
+ 0.3392634988 0.3225387931 0.2854253054
+ 0.3408218026 0.3240653872 0.2869231999
+ 0.3423773050 0.3255797923 0.2884125113
+ 0.3439236879 0.3270798028 0.2898918986
+ 0.3454602063 0.3285647929 0.2913635075
+ 0.3469888866 0.3300414979 0.2928242981
+ 0.3485142887 0.3315150142 0.2942822874
+ 0.3500323892 0.3329941928 0.2957330048
+ 0.3515473902 0.3344734013 0.2971836030
+ 0.3530417979 0.3359495103 0.2986334860
+ 0.3545320034 0.3374226987 0.3000814021
+ 0.3560110033 0.3388882875 0.3015252054
+ 0.3574849069 0.3403522074 0.3029659092
+ 0.3589515090 0.3418137133 0.3044033051
+ 0.3604162931 0.3432742059 0.3058296144
+ 0.3618794084 0.3447338939 0.3072482944
+ 0.3633390963 0.3461844921 0.3086608946
+ 0.3647964895 0.3476294875 0.3100705147
+ 0.3662520945 0.3490661085 0.3114804029
+ 0.3677066863 0.3504985869 0.3128904998
+ 0.3691571951 0.3519344032 0.3143031001
+ 0.3706058860 0.3533715010 0.3157165051
+ 0.3720482886 0.3548054099 0.3171201050
+ 0.3734880090 0.3562380075 0.3185209036
+ 0.3749237061 0.3576630950 0.3199110925
+ 0.3763574958 0.3590848148 0.3212977052
+ 0.3777863979 0.3605031073 0.3226788938
+ 0.3792122900 0.3619194031 0.3240576982
+ 0.3806298971 0.3633339107 0.3254354894
+ 0.3820405006 0.3647469878 0.3268128037
+ 0.3834429979 0.3661527932 0.3281848133
+ 0.3848352134 0.3675504029 0.3295519948
+ 0.3862208128 0.3689433932 0.3309170902
+ 0.3875918090 0.3703270853 0.3322786987
+ 0.3889611959 0.3717108071 0.3336370885
+ 0.3903222978 0.3730942905 0.3349848986
+ 0.3916833997 0.3744777143 0.3363322914
+ 0.3930288851 0.3758434951 0.3376722932
+ 0.3943736851 0.3772087991 0.3390122950
+ 0.3957099915 0.3785588145 0.3403486907
+ 0.3970431089 0.3799039125 0.3416841924
+ 0.3983731866 0.3812474012 0.3430136144
+ 0.3996999860 0.3825891912 0.3443383873
+ 0.4010235071 0.3839282095 0.3456582129
+ 0.4023340046 0.3852578998 0.3469654024
+ 0.4036445916 0.3865875006 0.3482725918
+ 0.4049448073 0.3878997862 0.3495655954
+ 0.4062437117 0.3892104924 0.3508580923
+ 0.4075376093 0.3905136883 0.3521454036
+ 0.4088271856 0.3918113112 0.3534295857
+ 0.4101122916 0.3931080997 0.3547120988
+ 0.4113762975 0.3944020867 0.3559896052
+ 0.4126402140 0.3956961036 0.3572671115
+ 0.4138968885 0.3969767988 0.3585371077
+ 0.4151513875 0.3982538879 0.3598057032
+ 0.4164057970 0.3995262980 0.3610734046
+ 0.4176602066 0.4007898867 0.3623399138
+ 0.4189145863 0.4020535052 0.3636063933
+ 0.4201653004 0.4033161998 0.3648683131
+ 0.4214152992 0.4045788944 0.3661297858
+ 0.4226615131 0.4058408141 0.3673880100
+ 0.4239003062 0.4071016014 0.3686417937
+ 0.4251390994 0.4083622992 0.3698956072
+ 0.4263815880 0.4096068144 0.3711366951
+ 0.4276249111 0.4108476937 0.3723761141
+ 0.4288657010 0.4120868146 0.3736143112
+ 0.4300980866 0.4133198857 0.3748500049
+ 0.4313304126 0.4145531058 0.3760857880
+ 0.4325571954 0.4157873988 0.3773151934
+ 0.4337803125 0.4170222878 0.3785417974
+ 0.4350034893 0.4182572067 0.3797681034
+ 0.4362299144 0.4194813967 0.3809858859
+ 0.4374563098 0.4207052886 0.3822036982
+ 0.4386776090 0.4219268858 0.3834176064
+ 0.4398860931 0.4231427014 0.3846245110
+ 0.4410946071 0.4243586063 0.3858315051
+ 0.4422994852 0.4255749881 0.3870328963
+ 0.4435017109 0.4267917871 0.3882313073
+ 0.4447039068 0.4280084968 0.3894298077
+ 0.4459021091 0.4292202890 0.3906225860
+ 0.4470992088 0.4304310977 0.3918147981
+ 0.4482960999 0.4316413999 0.3930067122
+ 0.4494735003 0.4328393936 0.3941971064
+ 0.4506509900 0.4340375066 0.3953875005
+ 0.4518275857 0.4352346957 0.3965758979
+ 0.4530000091 0.4364287853 0.3977586031
+ 0.4541724920 0.4376227856 0.3989411891
+ 0.4553438127 0.4388133883 0.4001224041
+ 0.4565126896 0.4399971962 0.4013010859
+ 0.4576815069 0.4411810040 0.4024797976
+ 0.4588429928 0.4423573911 0.4036575854
+ 0.4599938095 0.4435240030 0.4048345089
+ 0.4611446857 0.4446905851 0.4060113132
+ 0.4622924924 0.4458532035 0.4071837068
+ 0.4634366930 0.4470112920 0.4083524048
+ 0.4645808041 0.4481694102 0.4095211029
+ 0.4657213092 0.4493247867 0.4106839895
+ 0.4668577015 0.4504772127 0.4118421078
+ 0.4679940939 0.4516296983 0.4130002856
+ 0.4691272080 0.4527780116 0.4141499102
+ 0.4702562094 0.4539214969 0.4152916968
+ 0.4713852108 0.4550648928 0.4164333940
+ 0.4725120962 0.4562053084 0.4175724983
+ 0.4736359119 0.4573408067 0.4187080860
+ 0.4747596085 0.4584763944 0.4198437035
+ 0.4758782089 0.4596096873 0.4209780991
+ 0.4769828022 0.4607372880 0.4221099913
+ 0.4780873954 0.4618648887 0.4232420027
+ 0.4791901112 0.4629899859 0.4243740141
+ 0.4802770019 0.4640980959 0.4255062938
+ 0.4813640118 0.4652062058 0.4266386926
+ 0.4824509025 0.4663142860 0.4277710021
+ 0.4835343957 0.4674096107 0.4288952053
+ 0.4846175909 0.4685041010 0.4300192893
+ 0.4857007861 0.4695985019 0.4311434031
+ 0.4867846966 0.4706852138 0.4322606921
+ 0.4878689945 0.4717684984 0.4333756864
+ 0.4889532924 0.4728518128 0.4344907105
+ 0.4900343120 0.4739331901 0.4356062114
+ 0.4911102951 0.4750120044 0.4367220104
+ 0.4921863079 0.4760906994 0.4378378987
+ 0.4932622910 0.4771688879 0.4389531910
+ 0.4943380952 0.4782414138 0.4400649071
+ 0.4954138100 0.4793137908 0.4411765039
+ 0.4964896142 0.4803862870 0.4422881901
+ 0.4975619018 0.4814558029 0.4433946908
+ 0.4986326098 0.4825241864 0.4444997013
+ 0.4997034073 0.4835925102 0.4456045926
+ 0.5007709861 0.4846589863 0.4467051029
+ 0.5018302202 0.4857206941 0.4477970898
+ 0.5028892756 0.4867824912 0.4488891065
+ 0.5039485097 0.4878442883 0.4499810040
+ 0.5050029755 0.4888986051 0.4510704875
+ 0.5060563087 0.4899514019 0.4521594942
+ 0.5071097016 0.4910041988 0.4532485902
+ 0.5081599951 0.4920547903 0.4543373883
+ 0.5092030168 0.4931007922 0.4554258883
+ 0.5102459788 0.4941467047 0.4565143883
+ 0.5112890005 0.4951925874 0.4576028883
+ 0.5123233795 0.4962320924 0.4586854875
+ 0.5133545995 0.4972695112 0.4597668052
+ 0.5143858790 0.4983069003 0.4608480036
+ 0.5154163241 0.4993439913 0.4619261920
+ 0.5164411068 0.5003792048 0.4629918933
+ 0.5174658895 0.5014144182 0.4640575945
+ 0.5184906721 0.5024495721 0.4651232958
+ 0.5195080042 0.5034834743 0.4661859870
+ 0.5205168128 0.5045161247 0.4672459960
+ 0.5215256214 0.5055487752 0.4683060944
+ 0.5225343704 0.5065814257 0.4693661034
+ 0.5235391855 0.5076125264 0.4704234004
+ 0.5245428085 0.5086430907 0.4714801013
+ 0.5255464911 0.5096737742 0.4725368917
+ 0.5265501142 0.5107042789 0.4735935032
+ 0.5275589824 0.5117307901 0.4746482074
+ 0.5285679102 0.5127573013 0.4757030010
+ 0.5295767188 0.5137838721 0.4767577052
+ 0.5305829048 0.5148088932 0.4778087139
+ 0.5315781236 0.5158286095 0.4788492024
+ 0.5325732827 0.5168482065 0.4798896909
+ 0.5335685015 0.5178679228 0.4809302986
+ 0.5345616937 0.5188835859 0.4819678068
+ 0.5355507731 0.5198920965 0.4830011129
+ 0.5365399122 0.5209006071 0.4840342999
+ 0.5375291109 0.5219091773 0.4850674868
+ 0.5385140777 0.5229142904 0.4861018956
+ 0.5394936800 0.5239152908 0.4871374071
+ 0.5404732823 0.5249161720 0.4881727993
+ 0.5414528847 0.5259171724 0.4892083108
+ 0.5424301028 0.5269111991 0.4902406037
+ 0.5434045196 0.5278977156 0.4912700951
+ 0.5443788171 0.5288841724 0.4922995865
+ 0.5453531742 0.5298706889 0.4933289886
+ 0.5463275909 0.5308517814 0.4943523109
+ 0.5473020077 0.5318266153 0.4953694046
+ 0.5482764244 0.5328012705 0.4963865876
+ 0.5492507815 0.5337759852 0.4974038005
+ 0.5502228141 0.5347477794 0.4984166026
+ 0.5511909127 0.5357149243 0.4994237125
+ 0.5521588922 0.5366820097 0.5004308820
+ 0.5531268716 0.5376489758 0.5014380217
+ 0.5540925264 0.5386124253 0.5024443269
+ 0.5550501943 0.5395649076 0.5034484267
+ 0.5560079813 0.5405173898 0.5044525266
+ 0.5569657087 0.5414698124 0.5054566264
+ 0.5579233170 0.5424215198 0.5064595938
+ 0.5588781238 0.5433623791 0.5074540973
+ 0.5598328710 0.5443031788 0.5084484816
+ 0.5607876778 0.5452440977 0.5094429851
+ 0.5617424846 0.5461850166 0.5104374886
+ 0.5626881123 0.5471224189 0.5114172101
+ 0.5636314154 0.5480589867 0.5123947859
+ 0.5645747781 0.5489956737 0.5133724809
+ 0.5655180812 0.5499323010 0.5143501163
+ 0.5664566755 0.5508654118 0.5153220296
+ 0.5673907995 0.5517954230 0.5162897706
+ 0.5683248043 0.5527253747 0.5172575712
+ 0.5692589283 0.5536553860 0.5182253718
+ 0.5701919794 0.5545833111 0.5191931129
+ 0.5711194873 0.5555014014 0.5201603770
+ 0.5720471144 0.5564193726 0.5211277008
+ 0.5729746819 0.5573375225 0.5220949054
+ 0.5739021897 0.5582554936 0.5230622292
+ 0.5748242736 0.5591751933 0.5240322948
+ 0.5757443905 0.5600954294 0.5250031948
+ 0.5766643882 0.5610156059 0.5259739757
+ 0.5775845051 0.5619357824 0.5269448757
+ 0.5785031915 0.5628547072 0.5279111862
+ 0.5794178843 0.5637699962 0.5288679004
+ 0.5803325176 0.5646852851 0.5298246741
+ 0.5812472105 0.5656005740 0.5307815075
+ 0.5821619034 0.5665159225 0.5317382216
+ 0.5830687881 0.5674222708 0.5326874852
+ 0.5839726925 0.5683256984 0.5336347222
+ 0.5848765969 0.5692290068 0.5345818996
+ 0.5857805014 0.5701323152 0.5355291963
+ 0.5866835713 0.5710356236 0.5364757776
+ 0.5875809193 0.5719385743 0.5374200940
+ 0.5884782076 0.5728415251 0.5383644104
+ 0.5893754959 0.5737444758 0.5393087268
+ 0.5902727246 0.5746474266 0.5402529836
+ 0.5911679864 0.5755448937 0.5411959887
+ 0.5920606852 0.5764362812 0.5421379209
+ 0.5929535031 0.5773277283 0.5430796742
+ 0.5938463211 0.5782189965 0.5440214872
+ 0.5947390795 0.5791103840 0.5449634194
+ 0.5956212878 0.5799939036 0.5458949208
+ 0.5964996219 0.5808746815 0.5468239188
+ 0.5973780155 0.5817555785 0.5477527976
+ 0.5982564092 0.5826364160 0.5486817956
+ 0.5991346836 0.5835173130 0.5496106148
+ 0.6000012755 0.5843989253 0.5505310297
+ 0.6008672118 0.5852805972 0.5514513254
+ 0.6017332077 0.5861622095 0.5523716807
+ 0.6025990844 0.5870438814 0.5532919765
+ 0.6034640074 0.5879251957 0.5542123914
+ 0.6043193936 0.5888038874 0.5551329255
+ 0.6051747203 0.5896825194 0.5560534000
+ 0.6060299873 0.5905610919 0.5569739938
+ 0.6068853140 0.5914397240 0.5578945279
+ 0.6077398062 0.5923171043 0.5588160753
+ 0.6085901856 0.5931892991 0.5597410798
+ 0.6094405055 0.5940614939 0.5606660247
+ 0.6102908254 0.5949336886 0.5615910292
+ 0.6111412048 0.5958060026 0.5625159144
+ 0.6119889021 0.5966781974 0.5634377003
+ 0.6128252149 0.5975505114 0.5643500090
+ 0.6136614084 0.5984228253 0.5652621984
+ 0.6144977212 0.5992950201 0.5661745071
+ 0.6153339148 0.6001672745 0.5670866966
+ 0.6161686182 0.6010373831 0.5679973960
+ 0.6169930100 0.6018946171 0.5689010024
+ 0.6178174019 0.6027516723 0.5698046088
+ 0.6186416745 0.6036089063 0.5707082152
+ 0.6194661260 0.6044660807 0.5716118813
+ 0.6202905178 0.6053230762 0.5725151896
+ 0.6211113930 0.6061736941 0.5734145045
+ 0.6219323277 0.6070241928 0.5743138194
+ 0.6227532029 0.6078748107 0.5752130747
+ 0.6235740781 0.6087254286 0.5761123896
+ 0.6243950725 0.6095759273 0.5770117044
+ 0.6252127886 0.6104241014 0.5779047012
+ 0.6260297894 0.6112717986 0.5787969232
+ 0.6268466711 0.6121194959 0.5796890259
+ 0.6276636720 0.6129671931 0.5805811286
+ 0.6284806728 0.6138148904 0.5814732909
+ 0.6292939782 0.6146571040 0.5823628902
+ 0.6301044226 0.6154950857 0.5832508206
+ 0.6309146881 0.6163331270 0.5841388106
+ 0.6317250729 0.6171712279 0.5850268006
+ 0.6325353980 0.6180092096 0.5859146714
+ 0.6333454847 0.6188457012 0.5868017077
+ 0.6341544986 0.6196774244 0.5876858830
+ 0.6349633932 0.6205092072 0.5885701776
+ 0.6357724071 0.6213408709 0.5894544721
+ 0.6365814209 0.6221725941 0.5903387070
+ 0.6373903155 0.6230043173 0.5912230015
+ 0.6381942034 0.6238338947 0.5921056867
+ 0.6389968991 0.6246629953 0.5929881930
+ 0.6397994757 0.6254922152 0.5938706994
+ 0.6406021714 0.6263213158 0.5947532058
+ 0.6414049268 0.6271504164 0.5956355929
+ 0.6422066092 0.6279762983 0.5965138078
+ 0.6430063248 0.6287959814 0.5973852873
+ 0.6438059807 0.6296157837 0.5982567072
+ 0.6446056962 0.6304355264 0.5991281271
+ 0.6454054117 0.6312552094 0.5999996066
+ 0.6462051868 0.6320748925 0.6008710265
+ 0.6469957829 0.6328898072 0.6017335057
+ 0.6477838159 0.6337034106 0.6025940776
+ 0.6485717297 0.6345170736 0.6034547091
+ 0.6493597031 0.6353306770 0.6043154001
+ 0.6501476765 0.6361442804 0.6051759720
+ 0.6509342790 0.6369585991 0.6060351729
+ 0.6517130733 0.6377763152 0.6068887711
+ 0.6524918079 0.6385939717 0.6077424288
+ 0.6532706022 0.6394116879 0.6085960269
+ 0.6540492773 0.6402294040 0.6094496250
+ 0.6548280716 0.6410471201 0.6103032231
+ 0.6556051970 0.6418619156 0.6111536026
+ 0.6563801169 0.6426733732 0.6120008230
+ 0.6571549773 0.6434847713 0.6128481030
+ 0.6579298973 0.6442962289 0.6136953235
+ 0.6587048173 0.6451076269 0.6145424843
+ 0.6594796777 0.6459190249 0.6153897047
+ 0.6602489948 0.6467270255 0.6162346005
+ 0.6610152721 0.6475332975 0.6170787215
+ 0.6617817283 0.6483396292 0.6179227829
+ 0.6625480056 0.6491457820 0.6187667847
+ 0.6633144021 0.6499521136 0.6196109056
+ 0.6640806794 0.6507583857 0.6204549074
+ 0.6648426056 0.6515669823 0.6212937236
+ 0.6656033993 0.6523761153 0.6221314073
+ 0.6663640738 0.6531851888 0.6229692101
+ 0.6671249270 0.6539943218 0.6238070130
+ 0.6678856015 0.6548035145 0.6246448159
+ 0.6686462760 0.6556125879 0.6254826188
+ 0.6694011092 0.6564118862 0.6263144016
+ 0.6701549292 0.6572096944 0.6271455884
+ 0.6709085703 0.6580076218 0.6279767752
+ 0.6716623902 0.6588053703 0.6288080215
+ 0.6724160910 0.6596031785 0.6296392083
+ 0.6731699109 0.6604009867 0.6304703951
+ 0.6739165187 0.6611961722 0.6312931180
+ 0.6746615767 0.6619908214 0.6321147084
+ 0.6754066944 0.6627854109 0.6329362988
+ 0.6761518121 0.6635800004 0.6337578297
+ 0.6768969893 0.6643745899 0.6345794201
+ 0.6776421070 0.6651691794 0.6354010105
+ 0.6783866882 0.6659619808 0.6362180114
+ 0.6791309714 0.6667541862 0.6370335817
+ 0.6798753738 0.6675463915 0.6378492713
+ 0.6806197762 0.6683385968 0.6386650205
+ 0.6813641787 0.6691308022 0.6394807100
+ 0.6821085215 0.6699230075 0.6402962804
+ 0.6828457713 0.6707084775 0.6411076188
+ 0.6835768819 0.6714885235 0.6419157982
+ 0.6843081117 0.6722685099 0.6427239776
+ 0.6850392222 0.6730484962 0.6435320973
+ 0.6857702732 0.6738284826 0.6443402767
+ 0.6865015030 0.6746084094 0.6451485157
+ 0.6872311234 0.6753873229 0.6459537148
+ 0.6879568100 0.6761630774 0.6467525959
+ 0.6886826158 0.6769388914 0.6475514174
+ 0.6894083023 0.6777147055 0.6483502984
+ 0.6901339889 0.6784905195 0.6491491199
+ 0.6908596754 0.6792662740 0.6499480009
+ 0.6915854216 0.6800420880 0.6507468224
+ 0.6923050880 0.6808115244 0.6515396833
+ 0.6930242777 0.6815804243 0.6523323059
+ 0.6937434077 0.6823492050 0.6531249285
+ 0.6944625974 0.6831181049 0.6539174914
+ 0.6951817274 0.6838870049 0.6547101140
+ 0.6959009171 0.6846559048 0.6555026770
+ 0.6966161728 0.6854197979 0.6562970281
+ 0.6973273754 0.6861783862 0.6570926905
+ 0.6980385184 0.6869369745 0.6578884721
+ 0.6987496018 0.6876956224 0.6586841941
+ 0.6994606853 0.6884542108 0.6594799757
+ 0.7001718283 0.6892127991 0.6602758169
+ 0.7008829117 0.6899713874 0.6610714793
+ 0.7015895844 0.6907256246 0.6618655920
+ 0.7022960782 0.6914795041 0.6626598239
+ 0.7030025125 0.6922335029 0.6634538770
+ 0.7037090063 0.6929875016 0.6642479897
+ 0.7044153810 0.6937413812 0.6650421023
+ 0.7051218152 0.6944953799 0.6658362150
+ 0.7058250904 0.6952432990 0.6666283011
+ 0.7065216899 0.6959791780 0.6674168706
+ 0.7072182894 0.6967151165 0.6682054996
+ 0.7079148889 0.6974509954 0.6689941287
+ 0.7086114287 0.6981868744 0.6697826982
+ 0.7093080282 0.6989226937 0.6705713272
+ 0.7100046277 0.6996585727 0.6713598967
+ 0.7106981277 0.7003877759 0.6721469760
+ 0.7113897204 0.7011129260 0.6729333997
+ 0.7120811939 0.7018380165 0.6737198234
+ 0.7127727866 0.7025631070 0.6745061278
+ 0.7134643793 0.7032880783 0.6752924919
+ 0.7141559720 0.7040132284 0.6760789156
+ 0.7148475051 0.7047383189 0.6768652201
+ 0.7155426741 0.7054607272 0.6776456833
+ 0.7162386775 0.7061824799 0.6784251928
+ 0.7169346809 0.7069042921 0.6792047024
+ 0.7176308036 0.7076261044 0.6799842715
+ 0.7183268070 0.7083479166 0.6807637811
+ 0.7190228105 0.7090697289 0.6815432906
+ 0.7197188139 0.7097914815 0.6823228002
+ 0.7204080224 0.7105045915 0.6830921769
+ 0.7210965157 0.7112171054 0.6838611960
+ 0.7217851281 0.7119296193 0.6846302748
+ 0.7224736214 0.7126420140 0.6853992939
+ 0.7231621742 0.7133545280 0.6861683130
+ 0.7238507271 0.7140669823 0.6869373918
+ 0.7245392799 0.7147794962 0.6877064109
+ 0.7252277136 0.7154844999 0.6884679794
+ 0.7259160280 0.7161890268 0.6892294884
+ 0.7266044021 0.7168934941 0.6899909973
+ 0.7272927165 0.7175980806 0.6907523870
+ 0.7279810905 0.7183026075 0.6915138960
+ 0.7286694050 0.7190070748 0.6922754049
+ 0.7293577790 0.7197117209 0.6930367947
+ 0.7300446033 0.7204123139 0.6937997937
+ 0.7307311893 0.7211123109 0.6945629120
+ 0.7314177752 0.7218121886 0.6953259706
+ 0.7321043015 0.7225121856 0.6960890889
+ 0.7327908874 0.7232121825 0.6968522072
+ 0.7334774733 0.7239121795 0.6976153255
+ 0.7341641188 0.7246121764 0.6983783841
+ 0.7348474860 0.7253112793 0.6991379261
+ 0.7355294824 0.7260100842 0.6998959780
+ 0.7362114787 0.7267090082 0.7006539702
+ 0.7368934155 0.7274078131 0.7014120817
+ 0.7375754118 0.7281066179 0.7021701932
+ 0.7382574081 0.7288054228 0.7029281855
+ 0.7389392853 0.7295042276 0.7036862969
+ 0.7396183014 0.7302008867 0.7044391036
+ 0.7402927279 0.7308946252 0.7051851749
+ 0.7409670949 0.7315883040 0.7059314251
+ 0.7416415811 0.7322819829 0.7066774964
+ 0.7423160076 0.7329757214 0.7074236870
+ 0.7429903746 0.7336694002 0.7081698179
+ 0.7436649203 0.7343631983 0.7089160085
+ 0.7443389893 0.7350566983 0.7096619010
+ 0.7450042963 0.7357468009 0.7104052901
+ 0.7456694841 0.7364367843 0.7111486793
+ 0.7463346720 0.7371268868 0.7118921280
+ 0.7469999790 0.7378168702 0.7126353979
+ 0.7476652265 0.7385069728 0.7133787870
+ 0.7483304739 0.7391970158 0.7141221762
+ 0.7489957213 0.7398871183 0.7148655057
+ 0.7496609092 0.7405748963 0.7156080008
+ 0.7503259182 0.7412611246 0.7163497806
+ 0.7509909868 0.7419472933 0.7170916200
+ 0.7516561151 0.7426335216 0.7178335190
+ 0.7523211241 0.7433196902 0.7185752988
+ 0.7529861927 0.7440059185 0.7193170786
+ 0.7536513209 0.7446920872 0.7200589180
+ 0.7543162704 0.7453783154 0.7208005786
+ 0.7549796104 0.7460603714 0.7215341926
+ 0.7556427717 0.7467426062 0.7222678065
+ 0.7563059926 0.7474247217 0.7230014205
+ 0.7569692731 0.7481067777 0.7237349749
+ 0.7576324940 0.7487888932 0.7244685888
+ 0.7582957149 0.7494711280 0.7252022028
+ 0.7589588761 0.7501531839 0.7259358168
+ 0.7596207261 0.7508332729 0.7266669273
+ 0.7602791786 0.7515090108 0.7273933887
+ 0.7609376907 0.7521848083 0.7281197906
+ 0.7615962029 0.7528604865 0.7288463116
+ 0.7622547150 0.7535362244 0.7295727134
+ 0.7629132271 0.7542120218 0.7302991152
+ 0.7635716796 0.7548877001 0.7310255766
+ 0.7642301917 0.7555633783 0.7317519784
+ 0.7648857832 0.7562360168 0.7324793935
+ 0.7655386925 0.7569059134 0.7332075834
+ 0.7661917210 0.7575758100 0.7339357734
+ 0.7668445706 0.7582457066 0.7346640229
+ 0.7674975991 0.7589156032 0.7353920937
+ 0.7681505084 0.7595854998 0.7361202836
+ 0.7688034773 0.7602553964 0.7368484735
+ 0.7694563866 0.7609252930 0.7375766039
+ 0.7701069713 0.7615932822 0.7383013964
+ 0.7707563043 0.7622603774 0.7390245795
+ 0.7714055777 0.7629274726 0.7397478223
+ 0.7720549107 0.7635946274 0.7404710054
+ 0.7727041841 0.7642617226 0.7411941886
+ 0.7733533978 0.7649288177 0.7419173717
+ 0.7740026712 0.7655959129 0.7426406145
+ 0.7746520042 0.7662630081 0.7433637977
+ 0.7752993703 0.7669281960 0.7440791726
+ 0.7759457231 0.7675923109 0.7447909713
+ 0.7765920162 0.7682564259 0.7455028296
+ 0.7772383094 0.7689204812 0.7462146282
+ 0.7778846025 0.7695845962 0.7469264269
+ 0.7785308957 0.7702487111 0.7476382256
+ 0.7791771889 0.7709128261 0.7483499050
+ 0.7798236012 0.7715768814 0.7490617037
+ 0.7804623246 0.7722384930 0.7497718930
+ 0.7810946703 0.7728980184 0.7504810095
+ 0.7817270756 0.7735574841 0.7511901259
+ 0.7823594213 0.7742168903 0.7518991232
+ 0.7829918265 0.7748764157 0.7526081800
+ 0.7836241722 0.7755358815 0.7533171773
+ 0.7842565775 0.7761954069 0.7540262938
+ 0.7848889828 0.7768548727 0.7547354102
+ 0.7855191231 0.7775127292 0.7554432154
+ 0.7861444950 0.7781673074 0.7561488748
+ 0.7867699265 0.7788218856 0.7568545938
+ 0.7873954177 0.7794765830 0.7575603127
+ 0.7880207896 0.7801312208 0.7582659721
+ 0.7886462212 0.7807857990 0.7589715719
+ 0.7892715931 0.7814403772 0.7596772909
+ 0.7898970842 0.7820950150 0.7603830099
+ 0.7905223966 0.7827494740 0.7610880733
+ 0.7911401987 0.7833991051 0.7617810965
+ 0.7917578816 0.7840486765 0.7624740005
+ 0.7923756838 0.7846983075 0.7631670237
+ 0.7929934859 0.7853478789 0.7638599873
+ 0.7936112285 0.7859973907 0.7645528913
+ 0.7942289710 0.7866470218 0.7652459145
+ 0.7948467135 0.7872965932 0.7659388185
+ 0.7954645157 0.7879462242 0.7666317821
+ 0.7960770130 0.7885926962 0.7673208714
+ 0.7966856956 0.7892370224 0.7680076957
+ 0.7972943783 0.7898812890 0.7686944008
+ 0.7979031205 0.7905256152 0.7693811059
+ 0.7985118032 0.7911698818 0.7700678110
+ 0.7991204858 0.7918142080 0.7707545757
+ 0.7997291088 0.7924584746 0.7714412808
+ 0.8003377914 0.7931028008 0.7721279860
+ 0.8009464741 0.7937468290 0.7728148103
+ 0.8015543222 0.7943841815 0.7735018730
+ 0.8021621108 0.7950215936 0.7741889954
+ 0.8027698994 0.7956590056 0.7748761773
+ 0.8033776879 0.7962964177 0.7755632997
+ 0.8039855957 0.7969338298 0.7762504816
+ 0.8045933843 0.7975711823 0.7769376040
+ 0.8052011728 0.7982085943 0.7776247859
+ 0.8058090210 0.7988460064 0.7783119082
+ 0.8064159751 0.7994800806 0.7789977193
+ 0.8070214987 0.8001086712 0.7796815038
+ 0.8076270223 0.8007372022 0.7803652883
+ 0.8082324862 0.8013656735 0.7810490131
+ 0.8088380098 0.8019942045 0.7817327976
+ 0.8094434738 0.8026227951 0.7824165225
+ 0.8100489974 0.8032513261 0.7831003070
+ 0.8106545210 0.8038797975 0.7837840915
+ 0.8112599850 0.8045083284 0.7844678164
+ 0.8118627071 0.8051316142 0.7851473093
+ 0.8124632239 0.8057510257 0.7858238816
+ 0.8130636811 0.8063703775 0.7865005732
+ 0.8136641979 0.8069897890 0.7871773243
+ 0.8142647147 0.8076092005 0.7878538966
+ 0.8148651719 0.8082286119 0.7885305882
+ 0.8154656887 0.8088480234 0.7892072201
+ 0.8160662055 0.8094673753 0.7898839116
+ 0.8166667223 0.8100867867 0.7905604839
+ 0.8172659874 0.8107038736 0.7912366986
+ 0.8178647161 0.8113198876 0.7919127941
+ 0.8184633851 0.8119359016 0.7925887704
+ 0.8190621138 0.8125519156 0.7932648063
+ 0.8196607828 0.8131679296 0.7939407825
+ 0.8202595115 0.8137838840 0.7946168184
+ 0.8208581805 0.8143998981 0.7952927947
+ 0.8214569092 0.8150159121 0.7959687710
+ 0.8220555782 0.8156319261 0.7966448069
+ 0.8226491213 0.8162443042 0.7973200083
+ 0.8232396245 0.8168547153 0.7979946733
+ 0.8238301873 0.8174651861 0.7986695170
+ 0.8244208097 0.8180755973 0.7993443012
+ 0.8250113726 0.8186861277 0.8000190258
+ 0.8256019950 0.8192964792 0.8006938100
+ 0.8261926174 0.8199068904 0.8013685942
+ 0.8267831802 0.8205174208 0.8020433187
+ 0.8273738027 0.8211277723 0.8027181029
+ 0.8279619217 0.8217353821 0.8033875227
+ 0.8285475969 0.8223400116 0.8040519953
+ 0.8291332126 0.8229447007 0.8047165871
+ 0.8297188878 0.8235492706 0.8053811789
+ 0.8303046227 0.8241540194 0.8060457110
+ 0.8308901787 0.8247585893 0.8067103028
+ 0.8314759135 0.8253632784 0.8073748946
+ 0.8320615888 0.8259679079 0.8080394864
+ 0.8326472044 0.8265725970 0.8087040186
+ 0.8332327008 0.8271760941 0.8093675971
+ 0.8338174224 0.8277755976 0.8100281954
+ 0.8344022036 0.8283752203 0.8106889129
+ 0.8349869251 0.8289747834 0.8113495111
+ 0.8355717063 0.8295742869 0.8120101094
+ 0.8361564279 0.8301739097 0.8126708269
+ 0.8367410898 0.8307734132 0.8133314252
+ 0.8373258710 0.8313729763 0.8139920831
+ 0.8379105926 0.8319725990 0.8146526814
+ 0.8384953737 0.8325721025 0.8153132796
+ 0.8390772939 0.8331714272 0.8159744740
+ 0.8396586180 0.8337705731 0.8166357279
+ 0.8402400017 0.8343697786 0.8172969222
+ 0.8408213258 0.8349689245 0.8179581165
+ 0.8414027095 0.8355680704 0.8186193109
+ 0.8419839740 0.8361672759 0.8192806244
+ 0.8425654173 0.8367664814 0.8199418187
+ 0.8431466818 0.8373656869 0.8206030130
+ 0.8437281251 0.8379648924 0.8212642074
+ 0.8443076015 0.8385624290 0.8219218254
+ 0.8448830247 0.8391563296 0.8225721121
+ 0.8454583883 0.8397501707 0.8232223988
+ 0.8460338116 0.8403440118 0.8238726258
+ 0.8466091752 0.8409379125 0.8245229125
+ 0.8471845984 0.8415316939 0.8251731992
+ 0.8477599025 0.8421255946 0.8258234859
+ 0.8483353257 0.8427193761 0.8264737129
+ 0.8489106894 0.8433132768 0.8271239996
+ 0.8494861126 0.8439071178 0.8277742863
+ 0.8500558138 0.8444991112 0.8284201026
+ 0.8506222963 0.8450899720 0.8290638924
+ 0.8511888981 0.8456808925 0.8297076821
+ 0.8517553806 0.8462718129 0.8303514719
+ 0.8523219228 0.8468626738 0.8309952021
+ 0.8528885245 0.8474537134 0.8316389918
+ 0.8534550071 0.8480445743 0.8322827816
+ 0.8540216088 0.8486354947 0.8329265118
+ 0.8545880914 0.8492264152 0.8335703015
+ 0.8551546931 0.8498172760 0.8342140913
+ 0.8557175994 0.8504027724 0.8348590136
+ 0.8562799096 0.8509873748 0.8355041742
+ 0.8568422794 0.8515719771 0.8361492753
+ 0.8574045897 0.8521565795 0.8367943764
+ 0.8579670191 0.8527411819 0.8374394774
+ 0.8585293293 0.8533257842 0.8380845785
+ 0.8590915799 0.8539103866 0.8387296796
+ 0.8596540093 0.8544949889 0.8393748999
+ 0.8602163196 0.8550797105 0.8400200009
+ 0.8607786894 0.8556643128 0.8406651020
+ 0.8613408804 0.8562449217 0.8413107991
+ 0.8619030714 0.8568252921 0.8419564962
+ 0.8624653816 0.8574056029 0.8426023126
+ 0.8630275726 0.8579859734 0.8432480097
+ 0.8635898232 0.8585664034 0.8438937068
+ 0.8641520739 0.8591467738 0.8445394039
+ 0.8647143245 0.8597272038 0.8451852202
+ 0.8652765155 0.8603075743 0.8458309174
+ 0.8658387065 0.8608880043 0.8464766145
+ 0.8664010167 0.8614683747 0.8471223116
+ 0.8669610023 0.8620395064 0.8477607965
+ 0.8675208092 0.8626096249 0.8483986259
+ 0.8680804968 0.8631796241 0.8490363955
+ 0.8686403036 0.8637496829 0.8496742249
+ 0.8691999912 0.8643196821 0.8503119946
+ 0.8697597980 0.8648898005 0.8509498835
+ 0.8703196049 0.8654597998 0.8515877128
+ 0.8708792925 0.8660299182 0.8522254825
+ 0.8714390993 0.8665999174 0.8528633118
+ 0.8719987869 0.8671699762 0.8535010815
+ 0.8725550175 0.8677337766 0.8541374803
+ 0.8731096983 0.8682951927 0.8547734022
+ 0.8736643195 0.8688564897 0.8554093242
+ 0.8742190003 0.8694179058 0.8560451865
+ 0.8747736216 0.8699792027 0.8566811085
+ 0.8753283024 0.8705404997 0.8573169708
+ 0.8758829236 0.8711019158 0.8579528928
+ 0.8764376044 0.8716632128 0.8585888147
+ 0.8769922256 0.8722246289 0.8592246175
+ 0.8775469065 0.8727859259 0.8598604798
+ 0.8781003952 0.8733474016 0.8604974151
+ 0.8786519766 0.8739091754 0.8611357212
+ 0.8792036176 0.8744710088 0.8617740870
+ 0.8797551990 0.8750327826 0.8624123931
+ 0.8803067803 0.8755946755 0.8630506992
+ 0.8808584213 0.8761565089 0.8636891246
+ 0.8814098835 0.8767182827 0.8643273711
+ 0.8819615245 0.8772801161 0.8649656773
+ 0.8825131059 0.8778418899 0.8656041026
+ 0.8830646873 0.8784037232 0.8662424088
+ 0.8836163282 0.8789654970 0.8668807149
+ 0.8841652870 0.8795219064 0.8675110936
+ 0.8847140074 0.8800777793 0.8681409955
+ 0.8852627277 0.8806337714 0.8687707782
+ 0.8858113885 0.8811897039 0.8694006205
+ 0.8863601089 0.8817455769 0.8700305223
+ 0.8869088292 0.8823016286 0.8706603050
+ 0.8874574900 0.8828575015 0.8712900877
+ 0.8880062103 0.8834133744 0.8719198704
+ 0.8885548711 0.8839693069 0.8725497723
+ 0.8891035914 0.8845252991 0.8731796145
+ 0.8896498084 0.8850799799 0.8738080263
+ 0.8901898265 0.8856320977 0.8744335175
+ 0.8907297850 0.8861840963 0.8750590086
+ 0.8912699223 0.8867360950 0.8756844997
+ 0.8918098807 0.8872882128 0.8763099909
+ 0.8923500180 0.8878402114 0.8769354820
+ 0.8928899765 0.8883923292 0.8775609732
+ 0.8934299946 0.8889443278 0.8781865239
+ 0.8939700723 0.8894963861 0.8788120151
+ 0.8945100904 0.8900483847 0.8794375062
+ 0.8950502276 0.8906005025 0.8800629973
+ 0.8955878019 0.8911523819 0.8806902766
+ 0.8961235285 0.8917043209 0.8813189268
+ 0.8966590762 0.8922562003 0.8819475174
+ 0.8971948028 0.8928080201 0.8825762272
+ 0.8977304101 0.8933598995 0.8832048178
+ 0.8982660770 0.8939117789 0.8838335276
+ 0.8988016844 0.8944637179 0.8844621181
+ 0.8993372917 0.8950155973 0.8850907087
+ 0.8998730183 0.8955674171 0.8857194185
+ 0.9004086256 0.8961192966 0.8863480091
+ 0.9009442925 0.8966711760 0.8869767189
+ 0.9014744759 0.8972206712 0.8876035810
+ 0.9020017982 0.8977689147 0.8882297873
+ 0.9025291800 0.8983170986 0.8888558745
+ 0.9030565023 0.8988652825 0.8894820213
+ 0.9035838246 0.8994135261 0.8901082277
+ 0.9041110873 0.8999617100 0.8907343149
+ 0.9046384096 0.9005097747 0.8913604021
+ 0.9051656723 0.9010580182 0.8919866085
+ 0.9056929946 0.9016062021 0.8926126957
+ 0.9062203169 0.9021543860 0.8932387829
+ 0.9067475796 0.9027026296 0.8938649893
+ 0.9072715044 0.9032499790 0.8944861889
+ 0.9077931046 0.9037966728 0.8951045275
+ 0.9083147049 0.9043434858 0.8957228065
+ 0.9088363051 0.9048901796 0.8963410854
+ 0.9093579054 0.9054369926 0.8969594240
+ 0.9098795056 0.9059836864 0.8975777030
+ 0.9104011059 0.9065304995 0.8981959224
+ 0.9109227061 0.9070771933 0.8988142014
+ 0.9114443064 0.9076240063 0.8994324803
+ 0.9119659066 0.9081707001 0.9000508189
+ 0.9124875069 0.9087175131 0.9006690979
+ 0.9130079150 0.9092611074 0.9012864828
+ 0.9135265946 0.9098002911 0.9019027948
+ 0.9140452743 0.9103394747 0.9025191069
+ 0.9145638943 0.9108787179 0.9031354189
+ 0.9150825739 0.9114179015 0.9037516713
+ 0.9156013131 0.9119570851 0.9043679833
+ 0.9161199927 0.9124963284 0.9049841762
+ 0.9166386724 0.9130355120 0.9056004882
+ 0.9171572924 0.9135746956 0.9062168002
+ 0.9176759720 0.9141138792 0.9068331122
+ 0.9181947112 0.9146531224 0.9074494243
+ 0.9187132120 0.9151920080 0.9080653191
+ 0.9192286134 0.9157255292 0.9086763859
+ 0.9197440147 0.9162589908 0.9092875123
+ 0.9202594161 0.9167925715 0.9098985791
+ 0.9207748175 0.9173260927 0.9105097055
+ 0.9212902188 0.9178596735 0.9111207724
+ 0.9218056202 0.9183931947 0.9117318988
+ 0.9223210216 0.9189267159 0.9123430252
+ 0.9228364229 0.9194602966 0.9129540920
+ 0.9233518243 0.9199938178 0.9135652184
+ 0.9238672256 0.9205272794 0.9141762853
+ 0.9243826270 0.9210609198 0.9147874117
+ 0.9248952866 0.9215934277 0.9153928161
+ 0.9254056215 0.9221249819 0.9159939289
+ 0.9259160161 0.9226565957 0.9165949821
+ 0.9264264107 0.9231882095 0.9171959758
+ 0.9269366860 0.9237198830 0.9177970886
+ 0.9274470806 0.9242514968 0.9183982015
+ 0.9279574752 0.9247831106 0.9189993143
+ 0.9284678102 0.9253147840 0.9196004272
+ 0.9289782047 0.9258463979 0.9202014208
+ 0.9294885993 0.9263780117 0.9208024740
+ 0.9299988747 0.9269096255 0.9214035869
+ 0.9305093288 0.9274412990 0.9220046997
+ 0.9310135245 0.9279668927 0.9225972295
+ 0.9315168858 0.9284918904 0.9231889248
+ 0.9320203066 0.9290168881 0.9237805009
+ 0.9325237870 0.9295418262 0.9243721962
+ 0.9330272079 0.9300668240 0.9249637723
+ 0.9335306287 0.9305917025 0.9255555272
+ 0.9340341091 0.9311167002 0.9261471033
+ 0.9345374703 0.9316416979 0.9267387986
+ 0.9350408912 0.9321665764 0.9273303747
+ 0.9355443120 0.9326915741 0.9279221296
+ 0.9360477924 0.9332165718 0.9285137057
+ 0.9365504980 0.9337409139 0.9291048050
+ 0.9370446801 0.9342573285 0.9296892881
+ 0.9375388026 0.9347736835 0.9302738905
+ 0.9380329847 0.9352902174 0.9308584929
+ 0.9385271072 0.9358065724 0.9314429760
+ 0.9390212893 0.9363229871 0.9320275784
+ 0.9395154119 0.9368394017 0.9326121807
+ 0.9400095940 0.9373558760 0.9331967235
+ 0.9405037165 0.9378722906 0.9337813258
+ 0.9409978986 0.9383887053 0.9343659282
+ 0.9414920211 0.9389051199 0.9349504113
+ 0.9419862032 0.9394215941 0.9355350137
+ 0.9424793124 0.9399371743 0.9361184239
+ 0.9429621100 0.9404459000 0.9366925955
+ 0.9434450269 0.9409546256 0.9372667074
+ 0.9439278841 0.9414631724 0.9378408194
+ 0.9444106817 0.9419718981 0.9384148717
+ 0.9448935986 0.9424806237 0.9389889836
+ 0.9453763962 0.9429891706 0.9395630956
+ 0.9458593130 0.9434978962 0.9401373267
+ 0.9463421106 0.9440066218 0.9407113791
+ 0.9468250275 0.9445152283 0.9412854910
+ 0.9473078847 0.9450238943 0.9418596029
+ 0.9477906823 0.9455326200 0.9424337149
+ 0.9482735991 0.9460412264 0.9430078268
+ 0.9487515092 0.9465460181 0.9435728788
+ 0.9492291808 0.9470505714 0.9441375732
+ 0.9497069120 0.9475551844 0.9447023273
+ 0.9501845837 0.9480597973 0.9452670813
+ 0.9506623149 0.9485644102 0.9458317757
+ 0.9511399865 0.9490690231 0.9463965297
+ 0.9516175985 0.9495735168 0.9469612241
+ 0.9520953298 0.9500781298 0.9475259781
+ 0.9525730014 0.9505826831 0.9480906725
+ 0.9530506730 0.9510872960 0.9486554265
+ 0.9535284042 0.9515919089 0.9492201209
+ 0.9540060759 0.9520965219 0.9497848749
+ 0.9544798732 0.9525997043 0.9503433108
+ 0.9549517035 0.9531021118 0.9508985281
+ 0.9554234743 0.9536045194 0.9514538050
+ 0.9558951855 0.9541069269 0.9520090222
+ 0.9563670158 0.9546092749 0.9525641799
+ 0.9568387270 0.9551116824 0.9531193972
+ 0.9573104978 0.9556140900 0.9536746740
+ 0.9577823281 0.9561164975 0.9542298913
+ 0.9582539797 0.9566189051 0.9547851086
+ 0.9587258101 0.9571213722 0.9553403258
+ 0.9591975212 0.9576237798 0.9558954835
+ 0.9596692920 0.9581261873 0.9564508200
+ 0.9601396918 0.9586272836 0.9570031166
+ 0.9606035948 0.9591223001 0.9575427771
+ 0.9610674977 0.9596173167 0.9580823779
+ 0.9615314007 0.9601122737 0.9586220980
+ 0.9619953036 0.9606072903 0.9591618180
+ 0.9624592066 0.9611024261 0.9597014189
+ 0.9629231095 0.9615973830 0.9602410793
+ 0.9633870125 0.9620923996 0.9607807994
+ 0.9638509154 0.9625874162 0.9613204002
+ 0.9643148184 0.9630824924 0.9618601203
+ 0.9647787809 0.9635775089 0.9623997808
+ 0.9652426839 0.9640725255 0.9629393816
+ 0.9657065868 0.9645674825 0.9634791017
+ 0.9661654830 0.9650583267 0.9640104771
+ 0.9666200876 0.9655454755 0.9645349979
+ 0.9670745730 0.9660326242 0.9650595188
+ 0.9675291777 0.9665197730 0.9655839801
+ 0.9679837823 0.9670069218 0.9661085010
+ 0.9684383869 0.9674940705 0.9666330218
+ 0.9688928723 0.9679812193 0.9671574831
+ 0.9693474770 0.9684684277 0.9676818848
+ 0.9698020816 0.9689555764 0.9682064056
+ 0.9702566862 0.9694427252 0.9687309265
+ 0.9707111716 0.9699298739 0.9692553878
+ 0.9711657763 0.9704170227 0.9697799087
+ 0.9716203809 0.9709041715 0.9703044295
+ 0.9720690846 0.9713829756 0.9708178043
+ 0.9725155234 0.9718586206 0.9713271856
+ 0.9729619026 0.9723342061 0.9718365073
+ 0.9734084010 0.9728097916 0.9723458290
+ 0.9738547802 0.9732853770 0.9728550911
+ 0.9743012190 0.9737610221 0.9733644724
+ 0.9747477174 0.9742366076 0.9738737941
+ 0.9751940966 0.9747121930 0.9743831158
+ 0.9756405950 0.9751877785 0.9748924971
+ 0.9760869741 0.9756634235 0.9754018188
+ 0.9765334129 0.9761390090 0.9759110808
+ 0.9769799113 0.9766145945 0.9764205217
+ 0.9774262905 0.9770901799 0.9769297838
+ 0.9778676033 0.9775533080 0.9774206877
+ 0.9783070087 0.9780119061 0.9779049754
+ 0.9787464142 0.9784705043 0.9783893824
+ 0.9791858196 0.9789291024 0.9788737893
+ 0.9796252251 0.9793877006 0.9793581963
+ 0.9800645709 0.9798462987 0.9798424840
+ 0.9805039763 0.9803048968 0.9803268909
+ 0.9809433818 0.9807634950 0.9808112979
+ 0.9813829064 0.9812219739 0.9812957048
+ 0.9818223119 0.9816805720 0.9817801118
+ 0.9822617173 0.9821392298 0.9822643995
+ 0.9827011228 0.9825978279 0.9827488065
+ 0.9831405282 0.9830564260 0.9832332134
+ 0.9835739136 0.9835022092 0.9837002158
+ 0.9840028286 0.9839385152 0.9841542840
+ 0.9844316244 0.9843747020 0.9846084714
+ 0.9848604798 0.9848110080 0.9850625992
+ 0.9852893949 0.9852473140 0.9855167866
+ 0.9857181907 0.9856835008 0.9859709144
+ 0.9861471057 0.9861198068 0.9864251018
+ 0.9865760207 0.9865561128 0.9868792295
+ 0.9870048165 0.9869922996 0.9873334169
+ 0.9874336720 0.9874286056 0.9877874851
+ 0.9878625870 0.9878647923 0.9882416725
+ 0.9882913828 0.9883010983 0.9886958003
+ 0.9887202978 0.9887374043 0.9891499877
+ 0.9891455173 0.9891687036 0.9895961881
+ 0.9895583987 0.9895836115 0.9900164008
+ 0.9899712801 0.9899985790 0.9904366136
+ 0.9903842807 0.9904134870 0.9908568263
+ 0.9907972217 0.9908285141 0.9912769794
+ 0.9912101030 0.9912434220 0.9916970730
+ 0.9916231036 0.9916582704 0.9921172857
+ 0.9920359850 0.9920732975 0.9925374985
+ 0.9924489260 0.9924882054 0.9929577112
+ 0.9928618073 0.9929031134 0.9933779240
+ 0.9932748079 0.9933180809 0.9937980771
+ 0.9936876893 0.9937329888 0.9942182899
+ 0.9941005707 0.9941480160 0.9946383834
+ 0.9945135117 0.9945629239 0.9950585961
+ 0.9949113131 0.9949585795 0.9954301715
+ 0.9953026772 0.9953464270 0.9957817197
+ 0.9956942201 0.9957342148 0.9961332083
+ 0.9960855842 0.9961220026 0.9964848161
+ 0.9964770079 0.9965097904 0.9968363047
+ 0.9968684912 0.9968975782 0.9971877933
+ 0.9972599149 0.9972854257 0.9975392818
+ 0.9976513982 0.9976732135 0.9978908896
+ 0.9980428219 0.9980610013 0.9982423782
+ 0.9984341860 0.9984487891 0.9985939264
+ 0.9988257289 0.9988365769 0.9989454150
+ 0.9992170930 0.9992244244 0.9992970228
+ 0.9996085763 0.9996122122 0.9996485114
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/kodak_portra_100t.spi1d b/release/datafiles/colormanagement/luts/film_response/kodak_portra_100t.spi1d
new file mode 100644
index 00000000000..b71e38e9bd1
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/kodak_portra_100t.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0078889886 0.0072905929 0.0057835742
+ 0.0155280400 0.0142424498 0.0110800304
+ 0.0223259609 0.0204148795 0.0157516599
+ 0.0282847900 0.0258345399 0.0199356508
+ 0.0338022411 0.0308287591 0.0238022301
+ 0.0387409404 0.0354198888 0.0274327602
+ 0.0434868000 0.0397184007 0.0308620799
+ 0.0479348600 0.0437957905 0.0341565795
+ 0.0521249995 0.0477067716 0.0373548716
+ 0.0560929887 0.0514680110 0.0404086895
+ 0.0599000603 0.0551049784 0.0433653891
+ 0.0636395887 0.0585507713 0.0462335311
+ 0.0673073381 0.0619252101 0.0490648411
+ 0.0708674565 0.0652377531 0.0518452115
+ 0.0742941722 0.0684634522 0.0545356311
+ 0.0776154101 0.0715824589 0.0571359284
+ 0.0808518305 0.0746066868 0.0596979707
+ 0.0840119570 0.0775315836 0.0622345991
+ 0.0870610103 0.0803711265 0.0647289529
+ 0.0900357366 0.0831752867 0.0671606734
+ 0.0929580331 0.0859571993 0.0695598572
+ 0.0958346874 0.0887065008 0.0719215125
+ 0.0986543819 0.0914179012 0.0742511526
+ 0.1014280990 0.0940862000 0.0765401274
+ 0.1041439995 0.0967277288 0.0788079128
+ 0.1068262011 0.0993322283 0.0810511932
+ 0.1094703972 0.1018816978 0.0832685530
+ 0.1121027023 0.1043870971 0.0854593366
+ 0.1147300974 0.1068421006 0.0876216292
+ 0.1173269004 0.1092239022 0.0897513777
+ 0.1198854968 0.1115904003 0.0918506086
+ 0.1224000975 0.1139374003 0.0939252079
+ 0.1248695031 0.1162879989 0.0959772170
+ 0.1273149997 0.1186162010 0.0980132222
+ 0.1297475994 0.1209222972 0.1000507995
+ 0.1321358979 0.1232006028 0.1020739973
+ 0.1344795972 0.1254397035 0.1040984020
+ 0.1368041933 0.1276575029 0.1060978994
+ 0.1391019970 0.1298466027 0.1080757976
+ 0.1413698047 0.1320064962 0.1100341976
+ 0.1435928941 0.1341473013 0.1119635031
+ 0.1457892954 0.1362611055 0.1138700023
+ 0.1479541063 0.1383730024 0.1157647967
+ 0.1501048058 0.1404493004 0.1176467985
+ 0.1522224993 0.1425213069 0.1195039973
+ 0.1543388963 0.1445824057 0.1213504001
+ 0.1564362943 0.1466197073 0.1231838018
+ 0.1585174948 0.1486462057 0.1250088066
+ 0.1605857015 0.1506392062 0.1268348992
+ 0.1626347005 0.1526177973 0.1286439002
+ 0.1646862030 0.1546075940 0.1304429024
+ 0.1667335927 0.1565793008 0.1322406977
+ 0.1687652022 0.1585436016 0.1340295970
+ 0.1707780957 0.1604935974 0.1357980967
+ 0.1727759987 0.1624072939 0.1375523061
+ 0.1747658998 0.1643151045 0.1393052936
+ 0.1767490953 0.1662092954 0.1410588026
+ 0.1787372977 0.1680783033 0.1427990049
+ 0.1807080060 0.1699371934 0.1445256025
+ 0.1826650947 0.1718004048 0.1462455988
+ 0.1846058965 0.1736536026 0.1479606032
+ 0.1865195930 0.1754879057 0.1496645957
+ 0.1884177029 0.1773201972 0.1513437033
+ 0.1903073043 0.1791377962 0.1530140042
+ 0.1921796948 0.1809280068 0.1546792984
+ 0.1940302998 0.1827086061 0.1563450992
+ 0.1958549023 0.1844934970 0.1580031067
+ 0.1976682991 0.1862594038 0.1596433967
+ 0.1994695961 0.1880051941 0.1612734050
+ 0.2012577057 0.1897480041 0.1628941000
+ 0.2030259073 0.1914830059 0.1645098031
+ 0.2047819048 0.1931872070 0.1661248058
+ 0.2065176964 0.1948740035 0.1677244008
+ 0.2082248926 0.1965582073 0.1693145037
+ 0.2099235952 0.1982422024 0.1708988994
+ 0.2116315067 0.1999278069 0.1724735051
+ 0.2133346945 0.2015964985 0.1740391999
+ 0.2150184065 0.2032589018 0.1755944937
+ 0.2167019993 0.2049262971 0.1771457046
+ 0.2183800042 0.2065898031 0.1786843985
+ 0.2200523019 0.2082391977 0.1802140027
+ 0.2217144072 0.2098809928 0.1817325056
+ 0.2233763039 0.2115218937 0.1832381040
+ 0.2250375003 0.2131509036 0.1847354025
+ 0.2266878933 0.2147578001 0.1862273067
+ 0.2283222973 0.2163494974 0.1877095997
+ 0.2299540937 0.2179363966 0.1891891062
+ 0.2315769047 0.2195288986 0.1906653941
+ 0.2331923991 0.2211087048 0.1921359003
+ 0.2347972989 0.2226725072 0.1936012954
+ 0.2363962978 0.2242244929 0.1950621009
+ 0.2379969060 0.2257725000 0.1965180039
+ 0.2395913005 0.2273270935 0.1979725063
+ 0.2411745936 0.2288744003 0.1994252056
+ 0.2427513003 0.2304067016 0.2008765042
+ 0.2443210930 0.2319256067 0.2023257017
+ 0.2458810061 0.2334371954 0.2037705034
+ 0.2474320978 0.2349530011 0.2052136958
+ 0.2489770949 0.2364764959 0.2066580951
+ 0.2505179048 0.2380003035 0.2081031054
+ 0.2520565093 0.2395125926 0.2095465064
+ 0.2535842061 0.2410165966 0.2109802067
+ 0.2551011145 0.2425200939 0.2124101967
+ 0.2566075027 0.2440229058 0.2138369977
+ 0.2581019104 0.2455164939 0.2152577937
+ 0.2595993876 0.2469965965 0.2166765928
+ 0.2610979974 0.2484685034 0.2180949003
+ 0.2625960112 0.2499337047 0.2195139974
+ 0.2640933990 0.2513996959 0.2209234983
+ 0.2655884027 0.2528609037 0.2223280966
+ 0.2670783103 0.2543111145 0.2237278074
+ 0.2685579062 0.2557500899 0.2251172066
+ 0.2700324059 0.2571833134 0.2265006006
+ 0.2715004086 0.2586081922 0.2278756052
+ 0.2729619145 0.2600342035 0.2292470932
+ 0.2744210064 0.2614606023 0.2306170017
+ 0.2758783996 0.2628875077 0.2319861054
+ 0.2773306072 0.2643063962 0.2333521992
+ 0.2787795067 0.2657200098 0.2347161025
+ 0.2802197933 0.2671194077 0.2360662967
+ 0.2816554010 0.2685183883 0.2374131978
+ 0.2830832005 0.2699165940 0.2387543023
+ 0.2845051885 0.2713209987 0.2400884926
+ 0.2859246135 0.2727270126 0.2414194047
+ 0.2873364091 0.2741222978 0.2427445948
+ 0.2887467146 0.2755121887 0.2440689951
+ 0.2901543975 0.2768926919 0.2453920990
+ 0.2915565968 0.2782715857 0.2467114031
+ 0.2929557860 0.2796497047 0.2480283976
+ 0.2943511903 0.2810314000 0.2493402064
+ 0.2957446873 0.2824105918 0.2506507039
+ 0.2971296012 0.2837719917 0.2519558966
+ 0.2985079885 0.2851282954 0.2532579899
+ 0.2998743057 0.2864750028 0.2545535862
+ 0.3012337983 0.2878203988 0.2558461130
+ 0.3025875092 0.2891646028 0.2571358085
+ 0.3039326966 0.2905083001 0.2584241033
+ 0.3052744865 0.2918517888 0.2597118020
+ 0.3066090047 0.2931913137 0.2609947026
+ 0.3079420924 0.2945300043 0.2622764111
+ 0.3092617095 0.2958604097 0.2635529041
+ 0.3105807900 0.2971901000 0.2648288012
+ 0.3119010031 0.2985129058 0.2660990953
+ 0.3132201135 0.2998352051 0.2673687041
+ 0.3145304024 0.3011538088 0.2686296105
+ 0.3158377111 0.3024721146 0.2698898911
+ 0.3171265125 0.3037881851 0.2711451054
+ 0.3184145093 0.3051016033 0.2723999918
+ 0.3196972907 0.3063997030 0.2736532986
+ 0.3209798932 0.3076966107 0.2749058902
+ 0.3222613931 0.3089852929 0.2761533856
+ 0.3235423863 0.3102742136 0.2774004936
+ 0.3248170912 0.3115651011 0.2786423862
+ 0.3260917962 0.3128559887 0.2798843086
+ 0.3273518085 0.3141461015 0.2811206877
+ 0.3286117911 0.3154362142 0.2823570967
+ 0.3298718929 0.3167093098 0.2835853994
+ 0.3311319947 0.3179805875 0.2848125100
+ 0.3323861063 0.3192439079 0.2860355973
+ 0.3336383998 0.3205048144 0.2872571945
+ 0.3348825872 0.3217664957 0.2884761989
+ 0.3361215889 0.3230285943 0.2896933854
+ 0.3373571038 0.3242911100 0.2909066081
+ 0.3385877907 0.3255540133 0.2921139002
+ 0.3398196995 0.3268145919 0.2933216989
+ 0.3410564065 0.3280658126 0.2945317924
+ 0.3422931135 0.3293170929 0.2957417965
+ 0.3435252011 0.3305566907 0.2969467938
+ 0.3447571099 0.3317956924 0.2981514931
+ 0.3459787965 0.3330340087 0.2993502021
+ 0.3471955061 0.3342720866 0.3005459011
+ 0.3484120071 0.3355073035 0.3017396927
+ 0.3496277034 0.3367376029 0.3029299974
+ 0.3508433104 0.3379676044 0.3041202128
+ 0.3520529866 0.3391881883 0.3053084910
+ 0.3532628119 0.3404087126 0.3064967096
+ 0.3544704020 0.3416185081 0.3076831102
+ 0.3556770086 0.3428226113 0.3088682890
+ 0.3568829894 0.3440254033 0.3100539148
+ 0.3580872118 0.3452241123 0.3112407029
+ 0.3592914045 0.3464227021 0.3124274015
+ 0.3604977131 0.3476234078 0.3136095107
+ 0.3617044985 0.3488247097 0.3147901893
+ 0.3629097939 0.3500243127 0.3159680068
+ 0.3641118109 0.3512204885 0.3171392083
+ 0.3653138876 0.3524166942 0.3183102906
+ 0.3665078878 0.3536022007 0.3194763064
+ 0.3677001894 0.3547854125 0.3206410110
+ 0.3688907921 0.3559671938 0.3218050003
+ 0.3700768948 0.3571453989 0.3229666948
+ 0.3712630868 0.3583235145 0.3241283894
+ 0.3724423051 0.3595018089 0.3252857924
+ 0.3736186028 0.3606801927 0.3264412880
+ 0.3747946024 0.3618564010 0.3275963068
+ 0.3759672940 0.3630137146 0.3287459016
+ 0.3771401048 0.3641709983 0.3298955858
+ 0.3783135116 0.3653210104 0.3310425878
+ 0.3794879019 0.3664624989 0.3321863115
+ 0.3806622028 0.3676039875 0.3333300054
+ 0.3818334043 0.3687413037 0.3344663978
+ 0.3830037117 0.3698773980 0.3356004953
+ 0.3841735125 0.3710137904 0.3367342949
+ 0.3853363097 0.3721551001 0.3378620148
+ 0.3864991069 0.3732962906 0.3389897943
+ 0.3876604140 0.3744358122 0.3401161134
+ 0.3888185024 0.3755710125 0.3412387073
+ 0.3899765909 0.3767063022 0.3423613906
+ 0.3911325037 0.3778327107 0.3434790969
+ 0.3922863007 0.3789506853 0.3445914984
+ 0.3934400976 0.3800686896 0.3457039893
+ 0.3945881128 0.3811818957 0.3468174934
+ 0.3957333863 0.3822929859 0.3479315042
+ 0.3968786001 0.3834039867 0.3490453959
+ 0.3980174065 0.3845176995 0.3501490057
+ 0.3991548121 0.3856320083 0.3512499034
+ 0.4002921879 0.3867461979 0.3523508012
+ 0.4014247954 0.3878605962 0.3534472883
+ 0.4025569856 0.3889749944 0.3545432985
+ 0.4036892951 0.3900893927 0.3556393087
+ 0.4048125148 0.3911888003 0.3567320108
+ 0.4059354067 0.3922877014 0.3578243852
+ 0.4070582986 0.3933865130 0.3589169085
+ 0.4081676006 0.3944776952 0.3600068986
+ 0.4092766047 0.3955687881 0.3610968888
+ 0.4103856981 0.3966597915 0.3621867895
+ 0.4114840925 0.3977529109 0.3632732928
+ 0.4125820994 0.3988460898 0.3643594980
+ 0.4136799872 0.3999392986 0.3654457033
+ 0.4147689044 0.4010387957 0.3665322065
+ 0.4158565998 0.4021390080 0.3676187098
+ 0.4169442952 0.4032391906 0.3687050939
+ 0.4180271924 0.4043292999 0.3697864115
+ 0.4191086888 0.4054166079 0.3708660007
+ 0.4201901853 0.4065037966 0.3719455004
+ 0.4212687910 0.4075860977 0.3730236888
+ 0.4223456979 0.4086655080 0.3741010129
+ 0.4234224856 0.4097448885 0.3751783073
+ 0.4244934916 0.4108251035 0.3762541115
+ 0.4255565107 0.4119066000 0.3773277998
+ 0.4266194999 0.4129880965 0.3784016073
+ 0.4276801050 0.4140700102 0.3794747889
+ 0.4287301898 0.4151534140 0.3805457950
+ 0.4297803044 0.4162367880 0.3816167116
+ 0.4308303893 0.4173201919 0.3826876879
+ 0.4318735898 0.4183954000 0.3837552965
+ 0.4329161942 0.4194698036 0.3848226070
+ 0.4339587092 0.4205440879 0.3858897984
+ 0.4349972010 0.4216128886 0.3869574070
+ 0.4360328019 0.4226776063 0.3880251944
+ 0.4370684922 0.4237422943 0.3890931010
+ 0.4381031096 0.4248071015 0.3901597857
+ 0.4391340017 0.4258719981 0.3912216127
+ 0.4401648939 0.4269368947 0.3922834098
+ 0.4411959052 0.4280017018 0.3933452070
+ 0.4422194064 0.4290623963 0.3943997025
+ 0.4432410896 0.4301218987 0.3954519928
+ 0.4442627132 0.4311814904 0.3965043128
+ 0.4452854097 0.4322386980 0.3975546062
+ 0.4463103116 0.4332911074 0.3986003101
+ 0.4473350942 0.4343433976 0.3996460140
+ 0.4483599067 0.4353958070 0.4006916881
+ 0.4493798018 0.4364373982 0.4017345905
+ 0.4503985941 0.4374763966 0.4027766883
+ 0.4514173865 0.4385155141 0.4038187861
+ 0.4524323940 0.4395537078 0.4048602879
+ 0.4534361959 0.4405891001 0.4059000015
+ 0.4544399977 0.4416244924 0.4069396853
+ 0.4554437995 0.4426599145 0.4079793990
+ 0.4564459026 0.4436990917 0.4090223908
+ 0.4574469030 0.4447405040 0.4100672901
+ 0.4584479928 0.4457817972 0.4111123085
+ 0.4594491124 0.4468230903 0.4121572077
+ 0.4604510069 0.4478600025 0.4131881893
+ 0.4614529908 0.4488969147 0.4142186940
+ 0.4624550045 0.4499337971 0.4152492881
+ 0.4634560049 0.4509662986 0.4162780941
+ 0.4644544125 0.4519883096 0.4173018932
+ 0.4654527009 0.4530102015 0.4183256924
+ 0.4664511085 0.4540322125 0.4193494916
+ 0.4674443901 0.4550513029 0.4203704000
+ 0.4684332907 0.4560678899 0.4213885963
+ 0.4694221020 0.4570845068 0.4224067032
+ 0.4704109132 0.4581010938 0.4234248996
+ 0.4714013934 0.4591206014 0.4244410992
+ 0.4723925889 0.4601413012 0.4254566133
+ 0.4733838141 0.4611620009 0.4264720976
+ 0.4743750095 0.4621827006 0.4274876118
+ 0.4753603935 0.4631980062 0.4285031855
+ 0.4763449132 0.4642125070 0.4295187891
+ 0.4773294032 0.4652270079 0.4305343926
+ 0.4783138931 0.4662415087 0.4315499961
+ 0.4792841971 0.4672405124 0.4325644970
+ 0.4802536964 0.4682387114 0.4335789979
+ 0.4812232852 0.4692369103 0.4345934987
+ 0.4821928144 0.4702351093 0.4356079996
+ 0.4831587970 0.4712263942 0.4366190135
+ 0.4841246903 0.4722175002 0.4376297891
+ 0.4850907028 0.4732086957 0.4386407137
+ 0.4860565960 0.4741998911 0.4396516085
+ 0.4870223999 0.4751932025 0.4406566024
+ 0.4879881144 0.4761866033 0.4416612983
+ 0.4889538884 0.4771799147 0.4426659942
+ 0.4899196029 0.4781732857 0.4436706901
+ 0.4908815026 0.4791612923 0.4446693063
+ 0.4918429852 0.4801487923 0.4456669092
+ 0.4928044081 0.4811362028 0.4466646016
+ 0.4937658906 0.4821236134 0.4476622045
+ 0.4947195053 0.4831021130 0.4486567080
+ 0.4956707954 0.4840778112 0.4496499896
+ 0.4966219962 0.4850535095 0.4506433010
+ 0.4975732863 0.4860292077 0.4516366124
+ 0.4985210896 0.4869993031 0.4526301026
+ 0.4994663000 0.4879654050 0.4536238015
+ 0.5004115105 0.4889315069 0.4546175897
+ 0.5013567209 0.4898976088 0.4556112885
+ 0.5022984147 0.4908634126 0.4566054046
+ 0.5032333732 0.4918287992 0.4576002955
+ 0.5041682720 0.4927941859 0.4585951865
+ 0.5051032901 0.4937596023 0.4595901966
+ 0.5060374737 0.4947249889 0.4605847895
+ 0.5069562197 0.4956893921 0.4615682960
+ 0.5078749061 0.4966539145 0.4625518024
+ 0.5087934732 0.4976184070 0.4635351896
+ 0.5097122192 0.4985828996 0.4645186961
+ 0.5106272101 0.4995400012 0.4654968977
+ 0.5115404725 0.5004938245 0.4664725959
+ 0.5124536753 0.5014476180 0.4674482942
+ 0.5133669972 0.5024012923 0.4684239030
+ 0.5142818093 0.5033521056 0.4693973958
+ 0.5152004957 0.5042945743 0.4703643918
+ 0.5161191821 0.5052371025 0.4713312984
+ 0.5170379281 0.5061795712 0.4722982943
+ 0.5179566145 0.5071220994 0.4732652009
+ 0.5188748837 0.5080627203 0.4742276073
+ 0.5197929740 0.5090026855 0.4751887023
+ 0.5207111835 0.5099428296 0.4761497974
+ 0.5216293931 0.5108827949 0.4771108925
+ 0.5225464106 0.5118234158 0.4780718088
+ 0.5234599113 0.5127655268 0.4790318906
+ 0.5243734121 0.5137075186 0.4799919128
+ 0.5252867937 0.5146496296 0.4809519947
+ 0.5262002945 0.5155916810 0.4819121063
+ 0.5271133780 0.5165237784 0.4828720093
+ 0.5280262232 0.5174506903 0.4838317931
+ 0.5289388895 0.5183774829 0.4847916067
+ 0.5298516750 0.5193043947 0.4857513011
+ 0.5307645202 0.5202311873 0.4867111146
+ 0.5316731930 0.5211473107 0.4876579940
+ 0.5325819254 0.5220631957 0.4886044860
+ 0.5334905982 0.5229790807 0.4895510077
+ 0.5343992710 0.5238950253 0.4904974997
+ 0.5353068709 0.5248103142 0.4914431870
+ 0.5362116098 0.5257238150 0.4923861027
+ 0.5371162891 0.5266373754 0.4933289886
+ 0.5380210280 0.5275508761 0.4942719936
+ 0.5389257073 0.5284643769 0.4952149093
+ 0.5398265719 0.5293797851 0.4961544871
+ 0.5407235026 0.5302973986 0.4970901012
+ 0.5416203141 0.5312148929 0.4980256855
+ 0.5425171256 0.5321325064 0.4989612997
+ 0.5434139967 0.5330500007 0.4998969138
+ 0.5443124175 0.5339617729 0.5008286834
+ 0.5452117920 0.5348700881 0.5017580986
+ 0.5461112261 0.5357784033 0.5026873946
+ 0.5470106006 0.5366867185 0.5036168098
+ 0.5479100943 0.5375949740 0.5045462251
+ 0.5488089919 0.5384951830 0.5054730773
+ 0.5497077107 0.5393918157 0.5063987970
+ 0.5506064892 0.5402885079 0.5073245764
+ 0.5515052080 0.5411852002 0.5082504153
+ 0.5524039268 0.5420818925 0.5091760755
+ 0.5533022285 0.5429762006 0.5100972056
+ 0.5542001724 0.5438696742 0.5110161901
+ 0.5550982952 0.5447632074 0.5119352937
+ 0.5559964180 0.5456566811 0.5128542781
+ 0.5568944216 0.5465502143 0.5137733221
+ 0.5577896833 0.5474457145 0.5146881938
+ 0.5586835146 0.5483422875 0.5156006813
+ 0.5595772862 0.5492389202 0.5165132880
+ 0.5604711175 0.5501356125 0.5174257755
+ 0.5613648891 0.5510321856 0.5183383822
+ 0.5622547269 0.5519235730 0.5192475915
+ 0.5631409883 0.5528106093 0.5201537013
+ 0.5640273094 0.5536975861 0.5210598111
+ 0.5649135709 0.5545846224 0.5219659209
+ 0.5657997727 0.5554715991 0.5228719711
+ 0.5666835904 0.5563544035 0.5237771869
+ 0.5675624013 0.5572292209 0.5246803164
+ 0.5684412718 0.5581040978 0.5255835056
+ 0.5693200827 0.5589789152 0.5264865756
+ 0.5701988935 0.5598536730 0.5273898244
+ 0.5710769296 0.5607281923 0.5282927155
+ 0.5719450116 0.5615991950 0.5291919112
+ 0.5728130937 0.5624700785 0.5300911069
+ 0.5736811757 0.5633410215 0.5309904218
+ 0.5745493174 0.5642119050 0.5318896174
+ 0.5754173994 0.5650827885 0.5327888131
+ 0.5762851238 0.5659552813 0.5336858034
+ 0.5771527290 0.5668284297 0.5345818996
+ 0.5780202746 0.5677015185 0.5354781151
+ 0.5788878798 0.5685747266 0.5363742113
+ 0.5797554851 0.5694478154 0.5372703075
+ 0.5806217790 0.5703194737 0.5381652713
+ 0.5814853907 0.5711885095 0.5390577912
+ 0.5823488832 0.5720576048 0.5399503112
+ 0.5832124949 0.5729265809 0.5408427119
+ 0.5840761065 0.5737956762 0.5417351723
+ 0.5849397182 0.5746647120 0.5426276922
+ 0.5858016014 0.5755252838 0.5435200930
+ 0.5866631269 0.5763844252 0.5444124937
+ 0.5875247121 0.5772435069 0.5453047752
+ 0.5883861780 0.5781025290 0.5461971760
+ 0.5892478228 0.5789616108 0.5470895171
+ 0.5901088119 0.5798196197 0.5479819179
+ 0.5909687281 0.5806747079 0.5488741994
+ 0.5918287039 0.5815299153 0.5497664213
+ 0.5926886201 0.5823850036 0.5506587029
+ 0.5935484767 0.5832400918 0.5515509844
+ 0.5944083929 0.5840952992 0.5524433255
+ 0.5952606797 0.5849506259 0.5533313751
+ 0.5961092114 0.5858058929 0.5542173982
+ 0.5969576836 0.5866612196 0.5551033020
+ 0.5978062153 0.5875164866 0.5559893250
+ 0.5986546874 0.5883718729 0.5568752289
+ 0.5995032191 0.5892271996 0.5577610731
+ 0.6003429294 0.5900741816 0.5586416721
+ 0.6011822820 0.5909208059 0.5595219135
+ 0.6020215750 0.5917673707 0.5604020953
+ 0.6028609872 0.5926139951 0.5612822771
+ 0.6037002802 0.5934606194 0.5621625185
+ 0.6045382023 0.5943056941 0.5630425215
+ 0.6053689718 0.5951434970 0.5639213920
+ 0.6061998010 0.5959812999 0.5648003221
+ 0.6070305705 0.5968191028 0.5656793118
+ 0.6078615189 0.5976567864 0.5665581822
+ 0.6086922884 0.5984945893 0.5674371123
+ 0.6095213890 0.5993313789 0.5683159828
+ 0.6103464961 0.6001660228 0.5691947937
+ 0.6111717224 0.6010006070 0.5700736046
+ 0.6119968891 0.6018350720 0.5709522963
+ 0.6128221154 0.6026697159 0.5718311071
+ 0.6136472821 0.6035043001 0.5727099180
+ 0.6144716144 0.6043398976 0.5735872984
+ 0.6152943969 0.6051772237 0.5744621754
+ 0.6161171794 0.6060143709 0.5753371716
+ 0.6169400215 0.6068516970 0.5762121081
+ 0.6177628040 0.6076890230 0.5770869851
+ 0.6185857058 0.6085262895 0.5779619813
+ 0.6194078922 0.6093611121 0.5788385272
+ 0.6202291846 0.6101909280 0.5797184110
+ 0.6210504770 0.6110206842 0.5805981755
+ 0.6218718290 0.6118505001 0.5814781189
+ 0.6226930022 0.6126803756 0.5823580027
+ 0.6235142946 0.6135101914 0.5832378268
+ 0.6243357062 0.6143385172 0.5841162801
+ 0.6251572967 0.6151615977 0.5849894285
+ 0.6259788871 0.6159847975 0.5858625770
+ 0.6268004775 0.6168079972 0.5867357254
+ 0.6276221275 0.6176310778 0.5876088738
+ 0.6284437180 0.6184542775 0.5884820223
+ 0.6292651892 0.6192772985 0.5893549919
+ 0.6300833821 0.6200963259 0.5902221799
+ 0.6309016943 0.6209151745 0.5910894275
+ 0.6317198873 0.6217342019 0.5919566154
+ 0.6325381994 0.6225532293 0.5928236842
+ 0.6333565116 0.6233721972 0.5936908722
+ 0.6341747046 0.6241912246 0.5945581198
+ 0.6349883080 0.6250126958 0.5954239964
+ 0.6358004212 0.6258351207 0.5962893963
+ 0.6366125941 0.6266574860 0.5971549153
+ 0.6374247074 0.6274797916 0.5980203152
+ 0.6382368207 0.6283022165 0.5988857746
+ 0.6390489936 0.6291245222 0.5997511744
+ 0.6398593783 0.6299480796 0.6006168723
+ 0.6406673789 0.6307734847 0.6014829874
+ 0.6414753199 0.6315988898 0.6023491025
+ 0.6422833204 0.6324242949 0.6032152176
+ 0.6430912018 0.6332497001 0.6040812731
+ 0.6438992023 0.6340751052 0.6049473882
+ 0.6447070837 0.6349005103 0.6058135033
+ 0.6455112100 0.6357209086 0.6066793203
+ 0.6463152170 0.6365411878 0.6075451970
+ 0.6471192241 0.6373614073 0.6084110141
+ 0.6479231119 0.6381816268 0.6092767715
+ 0.6487271190 0.6390019059 0.6101427078
+ 0.6495311260 0.6398221254 0.6110085249
+ 0.6503347754 0.6406397820 0.6118733883
+ 0.6511383057 0.6414539814 0.6127370000
+ 0.6519417763 0.6422681808 0.6136006117
+ 0.6527453065 0.6430823803 0.6144642234
+ 0.6535487771 0.6438966990 0.6153277755
+ 0.6543523073 0.6447108984 0.6161913872
+ 0.6551557779 0.6455250978 0.6170549989
+ 0.6559563279 0.6463404298 0.6179105043
+ 0.6567561030 0.6471558809 0.6187639832
+ 0.6575558782 0.6479713917 0.6196174026
+ 0.6583557129 0.6487870216 0.6204708219
+ 0.6591554880 0.6496024728 0.6213243008
+ 0.6599553227 0.6504179835 0.6221777201
+ 0.6607547998 0.6512334943 0.6230304241
+ 0.6615508795 0.6520485878 0.6238759756
+ 0.6623470187 0.6528638005 0.6247217059
+ 0.6631432176 0.6536788940 0.6255673170
+ 0.6639392972 0.6544939876 0.6264129281
+ 0.6647353768 0.6553090811 0.6272584796
+ 0.6655315161 0.6561242938 0.6281040907
+ 0.6663259268 0.6569358706 0.6289486289
+ 0.6671159267 0.6577392220 0.6297904253
+ 0.6679059863 0.6585425735 0.6306322813
+ 0.6686959863 0.6593459845 0.6314740777
+ 0.6694861054 0.6601492763 0.6323158741
+ 0.6702761054 0.6609526873 0.6331576705
+ 0.6710662246 0.6617559791 0.6339995265
+ 0.6718522906 0.6625568271 0.6348415017
+ 0.6726325750 0.6633538008 0.6356834769
+ 0.6734127998 0.6641507149 0.6365255713
+ 0.6741930842 0.6649476886 0.6373677254
+ 0.6749733090 0.6657446027 0.6382098198
+ 0.6757534742 0.6665415764 0.6390517950
+ 0.6765338182 0.6673386097 0.6398938894
+ 0.6773107052 0.6681358814 0.6407364011
+ 0.6780828834 0.6689336896 0.6415793896
+ 0.6788551211 0.6697314978 0.6424224973
+ 0.6796272993 0.6705293059 0.6432656050
+ 0.6803994775 0.6713271141 0.6441085935
+ 0.6811717153 0.6721249223 0.6449517012
+ 0.6819438934 0.6729226708 0.6457946897
+ 0.6827138066 0.6737201810 0.6466346979
+ 0.6834788918 0.6745169163 0.6474680901
+ 0.6842439771 0.6753137112 0.6483014226
+ 0.6850091219 0.6761105061 0.6491346955
+ 0.6857742071 0.6769071817 0.6499680281
+ 0.6865392923 0.6777039766 0.6508014202
+ 0.6873043776 0.6785007715 0.6516346931
+ 0.6880689263 0.6792957187 0.6524670720
+ 0.6888297200 0.6800801754 0.6532937884
+ 0.6895905137 0.6808646917 0.6541203856
+ 0.6903513074 0.6816490889 0.6549469829
+ 0.6911121011 0.6824336052 0.6557736993
+ 0.6918728948 0.6832181215 0.6566002965
+ 0.6926336884 0.6840025187 0.6574270129
+ 0.6933944821 0.6847869754 0.6582536101
+ 0.6941537261 0.6855652928 0.6590738297
+ 0.6949126720 0.6863427758 0.6598929167
+ 0.6956717968 0.6871201992 0.6607121229
+ 0.6964308023 0.6878976226 0.6615312099
+ 0.6971898079 0.6886749864 0.6623502970
+ 0.6979488134 0.6894524097 0.6631695032
+ 0.6987078190 0.6902298927 0.6639885902
+ 0.6994645000 0.6910073161 0.6648052931
+ 0.7002186179 0.6917846799 0.6656193733
+ 0.7009727955 0.6925622225 0.6664335132
+ 0.7017269731 0.6933395863 0.6672475934
+ 0.7024810910 0.6941171288 0.6680616140
+ 0.7032353282 0.6948944926 0.6688756943
+ 0.7039895058 0.6956719756 0.6696897745
+ 0.7047435045 0.6964492798 0.6705039144
+ 0.7054880261 0.6972190738 0.6713137031
+ 0.7062326074 0.6979889870 0.6721233726
+ 0.7069771290 0.6987587810 0.6729332209
+ 0.7077215910 0.6995285749 0.6737430096
+ 0.7084661722 0.7002984881 0.6745527983
+ 0.7092106938 0.7010682821 0.6753625274
+ 0.7099552751 0.7018380761 0.6761723161
+ 0.7106971145 0.7026013136 0.6769785881
+ 0.7114353776 0.7033559084 0.6777802110
+ 0.7121738195 0.7041105032 0.6785817742
+ 0.7129122019 0.7048650980 0.6793833971
+ 0.7136505246 0.7056195736 0.6801850200
+ 0.7143889070 0.7063742280 0.6809865236
+ 0.7151272893 0.7071288228 0.6817880869
+ 0.7158656120 0.7078834176 0.6825897098
+ 0.7165970206 0.7086318135 0.6833915710
+ 0.7173261046 0.7093781829 0.6841934919
+ 0.7180553079 0.7101244926 0.6849954128
+ 0.7187843919 0.7108709216 0.6857973933
+ 0.7195134759 0.7116172910 0.6865993142
+ 0.7202426791 0.7123637199 0.6874011755
+ 0.7209718227 0.7131100893 0.6882030964
+ 0.7217009068 0.7138565183 0.6890050769
+ 0.7224162817 0.7146016955 0.6897974014
+ 0.7231312990 0.7153468132 0.6905894279
+ 0.7238463163 0.7160919905 0.6913813949
+ 0.7245612144 0.7168372273 0.6921733022
+ 0.7252761722 0.7175822854 0.6929653287
+ 0.7259911895 0.7183275223 0.6937571764
+ 0.7267062068 0.7190726995 0.6945492029
+ 0.7274206877 0.7198178172 0.6953408718
+ 0.7281301022 0.7205628157 0.6961287260
+ 0.7288395166 0.7213078141 0.6969165802
+ 0.7295488715 0.7220528126 0.6977043748
+ 0.7302582860 0.7227978110 0.6984922886
+ 0.7309677005 0.7235428095 0.6992802024
+ 0.7316771150 0.7242878079 0.7000679970
+ 0.7323865294 0.7250328064 0.7008559108
+ 0.7330961823 0.7257779241 0.7016434073
+ 0.7338085175 0.7265239954 0.7024263740
+ 0.7345207930 0.7272701263 0.7032094002
+ 0.7352331281 0.7280163169 0.7039923072
+ 0.7359454036 0.7287623882 0.7047752738
+ 0.7366576791 0.7295085192 0.7055583000
+ 0.7373700142 0.7302545905 0.7063413262
+ 0.7380822897 0.7310007215 0.7071242929
+ 0.7387946248 0.7317467928 0.7079071999
+ 0.7395036817 0.7324852943 0.7086831927
+ 0.7402127981 0.7332236171 0.7094588876
+ 0.7409217954 0.7339618206 0.7102347016
+ 0.7416307926 0.7347000837 0.7110103965
+ 0.7423397899 0.7354382873 0.7117860913
+ 0.7430489063 0.7361766100 0.7125617862
+ 0.7437579036 0.7369148731 0.7133374810
+ 0.7444669008 0.7376530766 0.7141131759
+ 0.7451686263 0.7383893132 0.7148858905
+ 0.7458680272 0.7391248941 0.7156574726
+ 0.7465673089 0.7398604155 0.7164289951
+ 0.7472665906 0.7405959964 0.7172005773
+ 0.7479659915 0.7413315177 0.7179722190
+ 0.7486652732 0.7420669794 0.7187438011
+ 0.7493646145 0.7428026199 0.7195153832
+ 0.7500640154 0.7435380816 0.7202870250
+ 0.7507627010 0.7442746162 0.7210568786
+ 0.7514607906 0.7450124025 0.7218245268
+ 0.7521588206 0.7457501888 0.7225919962
+ 0.7528567910 0.7464879751 0.7233595252
+ 0.7535548210 0.7472257018 0.7241271138
+ 0.7542527914 0.7479634881 0.7248945832
+ 0.7549508214 0.7487012744 0.7256621718
+ 0.7556489110 0.7494391203 0.7264297009
+ 0.7563468814 0.7501769066 0.7271971703
+ 0.7570462227 0.7509121895 0.7279605269
+ 0.7577455044 0.7516474724 0.7287237048
+ 0.7584449053 0.7523828149 0.7294868827
+ 0.7591441870 0.7531180978 0.7302501202
+ 0.7598435879 0.7538533807 0.7310132980
+ 0.7605429292 0.7545887232 0.7317764163
+ 0.7612422109 0.7553240061 0.7325395942
+ 0.7619416118 0.7560592890 0.7333027720
+ 0.7626401782 0.7567914128 0.7340652943
+ 0.7633376718 0.7575193048 0.7348269820
+ 0.7640352249 0.7582470775 0.7355887294
+ 0.7647327781 0.7589750290 0.7363502979
+ 0.7654302716 0.7597029209 0.7371119857
+ 0.7661278844 0.7604308128 0.7378736138
+ 0.7668253779 0.7611585855 0.7386353016
+ 0.7675229907 0.7618864775 0.7393969297
+ 0.7682204843 0.7626144290 0.7401586175
+ 0.7689135075 0.7633404136 0.7409185767
+ 0.7696049809 0.7640656829 0.7416778803
+ 0.7702965140 0.7647910714 0.7424373031
+ 0.7709881067 0.7655165195 0.7431966066
+ 0.7716795802 0.7662419081 0.7439560294
+ 0.7723711133 0.7669671774 0.7447152734
+ 0.7730625868 0.7676926255 0.7454746962
+ 0.7737541199 0.7684180140 0.7462341189
+ 0.7744455934 0.7691434026 0.7469934225
+ 0.7751392722 0.7698696852 0.7477499843
+ 0.7758330107 0.7705960274 0.7485064268
+ 0.7765266895 0.7713223100 0.7492629290
+ 0.7772204280 0.7720487118 0.7500193119
+ 0.7779141068 0.7727749944 0.7507756948
+ 0.7786077857 0.7735012770 0.7515321970
+ 0.7793015242 0.7742276788 0.7522885799
+ 0.7799953222 0.7749540210 0.7530450225
+ 0.7806888223 0.7756797075 0.7538012266
+ 0.7813785076 0.7763937712 0.7545518279
+ 0.7820681930 0.7771078944 0.7553023100
+ 0.7827579975 0.7778220177 0.7560529113
+ 0.7834476829 0.7785360217 0.7568033934
+ 0.7841374874 0.7792500854 0.7575538754
+ 0.7848271728 0.7799642086 0.7583044767
+ 0.7855169773 0.7806782722 0.7590550184
+ 0.7862067223 0.7813923955 0.7598056197
+ 0.7868962884 0.7821062803 0.7605561018
+ 0.7875761986 0.7828112841 0.7613086104
+ 0.7882561088 0.7835162878 0.7620609999
+ 0.7889360785 0.7842212915 0.7628135085
+ 0.7896159887 0.7849262953 0.7635658979
+ 0.7902958989 0.7856312990 0.7643182874
+ 0.7909759283 0.7863363028 0.7650707960
+ 0.7916557789 0.7870413065 0.7658231854
+ 0.7923356891 0.7877463102 0.7665756941
+ 0.7930157185 0.7884513736 0.7673280835
+ 0.7936940193 0.7891541123 0.7680817842
+ 0.7943720818 0.7898566127 0.7688357830
+ 0.7950502038 0.7905589938 0.7695897222
+ 0.7957283258 0.7912613750 0.7703436017
+ 0.7964063883 0.7919638157 0.7710976005
+ 0.7970845103 0.7926663160 0.7718514800
+ 0.7977625728 0.7933686972 0.7726054788
+ 0.7984406948 0.7940710783 0.7733594179
+ 0.7991188169 0.7947735190 0.7741132975
+ 0.7997971773 0.7954763770 0.7748653293
+ 0.8004758954 0.7961794734 0.7756156921
+ 0.8011544943 0.7968826890 0.7763661146
+ 0.8018332124 0.7975857854 0.7771165967
+ 0.8025118113 0.7982890010 0.7778670192
+ 0.8031905293 0.7989920974 0.7786175013
+ 0.8038691282 0.7996953130 0.7793679237
+ 0.8045477867 0.8003984094 0.7801182866
+ 0.8052263856 0.8011015058 0.7808688283
+ 0.8059049249 0.8018025160 0.7816187143
+ 0.8065828085 0.8024935126 0.7823663950
+ 0.8072608113 0.8031843901 0.7831140757
+ 0.8079386950 0.8038753867 0.7838618159
+ 0.8086165786 0.8045663238 0.7846094966
+ 0.8092945218 0.8052573204 0.7853571773
+ 0.8099725246 0.8059481978 0.7861049175
+ 0.8106504083 0.8066391945 0.7868525982
+ 0.8113282919 0.8073300719 0.7876002789
+ 0.8120061755 0.8080211282 0.7883480191
+ 0.8126829267 0.8087062240 0.7890954018
+ 0.8133587837 0.8093882203 0.7898424864
+ 0.8140347004 0.8100702167 0.7905896902
+ 0.8147106767 0.8107520938 0.7913368940
+ 0.8153865933 0.8114340901 0.7920840979
+ 0.8160626292 0.8121160865 0.7928311825
+ 0.8167384863 0.8127980828 0.7935783863
+ 0.8174144030 0.8134800196 0.7943255901
+ 0.8180903792 0.8141620159 0.7950726748
+ 0.8187662959 0.8148440123 0.7958198786
+ 0.8194429874 0.8155233860 0.7965657711
+ 0.8201196194 0.8162028193 0.7973116040
+ 0.8207963109 0.8168823123 0.7980574965
+ 0.8214728832 0.8175616860 0.7988033891
+ 0.8221495748 0.8182411194 0.7995492220
+ 0.8228263259 0.8189204931 0.8002951145
+ 0.8235028982 0.8195999265 0.8010408878
+ 0.8241795897 0.8202794194 0.8017867804
+ 0.8248562217 0.8209587932 0.8025326133
+ 0.8255324960 0.8216388822 0.8032788038
+ 0.8262073994 0.8223220706 0.8040260077
+ 0.8268823028 0.8230053782 0.8047732711
+ 0.8275572062 0.8236886263 0.8055204749
+ 0.8282319903 0.8243718743 0.8062677979
+ 0.8289068937 0.8250551224 0.8070150018
+ 0.8295817971 0.8257383108 0.8077623248
+ 0.8302565813 0.8264216185 0.8085095286
+ 0.8309314847 0.8271048069 0.8092567921
+ 0.8316063881 0.8277881145 0.8100039959
+ 0.8322811723 0.8284710050 0.8107491732
+ 0.8329560161 0.8291531205 0.8114882708
+ 0.8336306810 0.8298351169 0.8122274280
+ 0.8343054056 0.8305171728 0.8129665256
+ 0.8349801898 0.8311992884 0.8137056231
+ 0.8356549144 0.8318814039 0.8144447207
+ 0.8363295794 0.8325635195 0.8151838183
+ 0.8370043039 0.8332455754 0.8159229159
+ 0.8376790881 0.8339275718 0.8166620135
+ 0.8383538127 0.8346096873 0.8174011111
+ 0.8390284777 0.8352907896 0.8181397915
+ 0.8397032022 0.8359678984 0.8188765049
+ 0.8403778076 0.8366451263 0.8196132779
+ 0.8410524726 0.8373221755 0.8203501105
+ 0.8417270780 0.8379992843 0.8210868835
+ 0.8424018025 0.8386765122 0.8218235970
+ 0.8430765271 0.8393536210 0.8225604296
+ 0.8437510729 0.8400307298 0.8232972026
+ 0.8444257975 0.8407077789 0.8240339756
+ 0.8451004028 0.8413850069 0.8247706890
+ 0.8457751274 0.8420621157 0.8255075216
+ 0.8464422822 0.8427348137 0.8262410164
+ 0.8471094966 0.8434073925 0.8269745111
+ 0.8477767110 0.8440800905 0.8277080059
+ 0.8484439254 0.8447527289 0.8284415007
+ 0.8491110802 0.8454254270 0.8291749954
+ 0.8497782946 0.8460981250 0.8299083710
+ 0.8504455090 0.8467707038 0.8306419253
+ 0.8511127234 0.8474434018 0.8313754201
+ 0.8517798185 0.8481160998 0.8321089149
+ 0.8524469733 0.8487886786 0.8328424096
+ 0.8531115055 0.8494626284 0.8335720897
+ 0.8537746072 0.8501369953 0.8342999220
+ 0.8544377089 0.8508114219 0.8350275755
+ 0.8551008105 0.8514857888 0.8357554078
+ 0.8557639122 0.8521602154 0.8364831209
+ 0.8564270735 0.8528345823 0.8372108936
+ 0.8570901752 0.8535091281 0.8379387259
+ 0.8577532768 0.8541834950 0.8386663795
+ 0.8584163785 0.8548579216 0.8393942118
+ 0.8590794802 0.8555322886 0.8401219249
+ 0.8597424030 0.8562076092 0.8408495188
+ 0.8604043722 0.8568869233 0.8415760994
+ 0.8610665202 0.8575661778 0.8423027992
+ 0.8617284894 0.8582454920 0.8430293798
+ 0.8623905182 0.8589248061 0.8437560797
+ 0.8630526066 0.8596040010 0.8444827199
+ 0.8637145758 0.8602833152 0.8452093005
+ 0.8643766046 0.8609626293 0.8459360003
+ 0.8650386930 0.8616418839 0.8466625810
+ 0.8657007217 0.8623211980 0.8473892212
+ 0.8663626909 0.8630003929 0.8481159210
+ 0.8670225143 0.8636755943 0.8488407731
+ 0.8676806092 0.8643475175 0.8495643139
+ 0.8683385849 0.8650195003 0.8502879143
+ 0.8689966798 0.8656914234 0.8510113955
+ 0.8696547747 0.8663634062 0.8517348766
+ 0.8703128099 0.8670353889 0.8524584770
+ 0.8709709048 0.8677073121 0.8531820178
+ 0.8716288805 0.8683792949 0.8539056182
+ 0.8722869754 0.8690512180 0.8546290994
+ 0.8729450703 0.8697232008 0.8553525805
+ 0.8736031055 0.8703951836 0.8560761809
+ 0.8742563128 0.8710637093 0.8567957282
+ 0.8749082088 0.8717314005 0.8575140834
+ 0.8755602241 0.8723990917 0.8582326174
+ 0.8762121201 0.8730667830 0.8589509726
+ 0.8768640161 0.8737344742 0.8596695065
+ 0.8775159717 0.8744022846 0.8603879809
+ 0.8781679273 0.8750699759 0.8611063957
+ 0.8788198829 0.8757377267 0.8618249297
+ 0.8794717789 0.8764054179 0.8625432849
+ 0.8801236749 0.8770731091 0.8632618189
+ 0.8807756901 0.8777408004 0.8639801741
+ 0.8814250231 0.8784101009 0.8646934032
+ 0.8820741177 0.8790795803 0.8654057980
+ 0.8827230930 0.8797491193 0.8661181927
+ 0.8833721280 0.8804187179 0.8668307066
+ 0.8840212226 0.8810881972 0.8675431013
+ 0.8846701980 0.8817576766 0.8682554960
+ 0.8853191733 0.8824272156 0.8689680099
+ 0.8859683275 0.8830966949 0.8696804047
+ 0.8866173029 0.8837661743 0.8703927994
+ 0.8872662783 0.8844357133 0.8711053133
+ 0.8879153728 0.8851051927 0.8718177080
+ 0.8885645270 0.8857750893 0.8725255728
+ 0.8892136812 0.8864449859 0.8732324839
+ 0.8898627758 0.8871150017 0.8739395142
+ 0.8905119896 0.8877848983 0.8746464252
+ 0.8911612034 0.8884547949 0.8753533959
+ 0.8918102980 0.8891248107 0.8760603070
+ 0.8924595118 0.8897947073 0.8767672777
+ 0.8931086063 0.8904647231 0.8774741888
+ 0.8937578201 0.8911346197 0.8781810999
+ 0.8944069743 0.8918045163 0.8788880706
+ 0.8950561285 0.8924744725 0.8795949817
+ 0.8957039118 0.8931388259 0.8802983165
+ 0.8963508010 0.8937997222 0.8809992075
+ 0.8969975710 0.8944606185 0.8817002177
+ 0.8976445198 0.8951215148 0.8824012280
+ 0.8982914090 0.8957824111 0.8831021786
+ 0.8989382982 0.8964433074 0.8838031888
+ 0.8995851278 0.8971043229 0.8845040798
+ 0.9002320170 0.8977652192 0.8852050900
+ 0.9008789062 0.8984261155 0.8859061003
+ 0.9015257955 0.8990870118 0.8866071105
+ 0.9021726847 0.8997479081 0.8873080015
+ 0.9028183222 0.9004076123 0.8880085945
+ 0.9034605026 0.9010636806 0.8887078166
+ 0.9041026831 0.9017199278 0.8894069791
+ 0.9047449231 0.9023761153 0.8901063204
+ 0.9053872228 0.9030323029 0.8908054829
+ 0.9060294032 0.9036884904 0.8915048242
+ 0.9066715837 0.9043446183 0.8922039866
+ 0.9073138237 0.9050008059 0.8929033279
+ 0.9079560041 0.9056569934 0.8936024904
+ 0.9085981846 0.9063131809 0.8943017721
+ 0.9092404246 0.9069694281 0.8950009942
+ 0.9098826051 0.9076254964 0.8957002759
+ 0.9105213881 0.9082816243 0.8964002132
+ 0.9111589789 0.9089375138 0.8971003890
+ 0.9117966294 0.9095935225 0.8978006244
+ 0.9124342203 0.9102494717 0.8985008001
+ 0.9130718112 0.9109054804 0.8992009759
+ 0.9137094021 0.9115614891 0.8999012709
+ 0.9143469930 0.9122173786 0.9006015062
+ 0.9149845839 0.9128733873 0.9013016820
+ 0.9156221747 0.9135293961 0.9020019174
+ 0.9162598252 0.9141854048 0.9027020931
+ 0.9168974161 0.9148412943 0.9034023285
+ 0.9175344110 0.9154965281 0.9041017890
+ 0.9181634784 0.9161416292 0.9047920108
+ 0.9187926054 0.9167866707 0.9054822922
+ 0.9194216728 0.9174317718 0.9061725140
+ 0.9200507998 0.9180769920 0.9068626761
+ 0.9206799865 0.9187220931 0.9075530171
+ 0.9213091135 0.9193671942 0.9082431793
+ 0.9219381809 0.9200122952 0.9089334011
+ 0.9225673079 0.9206575155 0.9096236825
+ 0.9231963754 0.9213026166 0.9103139043
+ 0.9238255024 0.9219477177 0.9110041857
+ 0.9244546294 0.9225928187 0.9116944075
+ 0.9250795841 0.9232333899 0.9123820066
+ 0.9256916046 0.9238601923 0.9130614996
+ 0.9263036847 0.9244869947 0.9137409925
+ 0.9269157052 0.9251136780 0.9144204855
+ 0.9275277853 0.9257404804 0.9150999784
+ 0.9281398058 0.9263672233 0.9157794714
+ 0.9287518263 0.9269940257 0.9164590836
+ 0.9293639064 0.9276207089 0.9171385765
+ 0.9299759269 0.9282475114 0.9178181291
+ 0.9305880070 0.9288743138 0.9184976220
+ 0.9312000275 0.9295009971 0.9191771150
+ 0.9318121076 0.9301277995 0.9198566079
+ 0.9324201941 0.9307510853 0.9205334187
+ 0.9330167174 0.9313644767 0.9212021232
+ 0.9336131811 0.9319778085 0.9218708873
+ 0.9342097044 0.9325911999 0.9225397110
+ 0.9348061085 0.9332044721 0.9232084155
+ 0.9354025722 0.9338178039 0.9238771796
+ 0.9359990954 0.9344311953 0.9245458841
+ 0.9365956187 0.9350445271 0.9252147079
+ 0.9371920824 0.9356579185 0.9258834720
+ 0.9377886057 0.9362711906 0.9265521765
+ 0.9383851290 0.9368845820 0.9272210002
+ 0.9389814734 0.9374979138 0.9278897047
+ 0.9395771027 0.9381104708 0.9285578728
+ 0.9401646256 0.9387161732 0.9292200804
+ 0.9407520294 0.9393218756 0.9298822880
+ 0.9413393736 0.9399275780 0.9305444956
+ 0.9419268966 0.9405332804 0.9312068224
+ 0.9425143003 0.9411389232 0.9318689704
+ 0.9431017041 0.9417446256 0.9325311780
+ 0.9436892271 0.9423503280 0.9331933856
+ 0.9442765713 0.9429559708 0.9338555932
+ 0.9448639750 0.9435616732 0.9345179200
+ 0.9454514980 0.9441673756 0.9351801276
+ 0.9460389018 0.9447730780 0.9358422756
+ 0.9466264248 0.9453787804 0.9365044832
+ 0.9472072124 0.9459720850 0.9371623993
+ 0.9477860928 0.9465619922 0.9378191233
+ 0.9483650923 0.9471517801 0.9384757876
+ 0.9489439726 0.9477416277 0.9391323924
+ 0.9495229721 0.9483314753 0.9397891164
+ 0.9501019120 0.9489213228 0.9404457211
+ 0.9506809115 0.9495111704 0.9411023855
+ 0.9512599111 0.9501010180 0.9417591095
+ 0.9518387914 0.9506909251 0.9424157143
+ 0.9524177909 0.9512807131 0.9430723786
+ 0.9529966712 0.9518705010 0.9437291026
+ 0.9535756707 0.9524604082 0.9443857074
+ 0.9541510940 0.9530453086 0.9450407028
+ 0.9547178149 0.9536182880 0.9456915855
+ 0.9552845955 0.9541913867 0.9463424087
+ 0.9558513761 0.9547644258 0.9469932914
+ 0.9564182162 0.9553375244 0.9476441145
+ 0.9569848776 0.9559105039 0.9482949972
+ 0.9575517178 0.9564834833 0.9489458203
+ 0.9581184983 0.9570565820 0.9495967031
+ 0.9586852789 0.9576296210 0.9502475262
+ 0.9592519999 0.9582027197 0.9508984089
+ 0.9598187804 0.9587756991 0.9515491724
+ 0.9603856206 0.9593486786 0.9522001147
+ 0.9609522820 0.9599217772 0.9528508782
+ 0.9615089297 0.9604855180 0.9534955025
+ 0.9620596170 0.9610437751 0.9541364908
+ 0.9626103044 0.9616020918 0.9547774792
+ 0.9631609917 0.9621605277 0.9554185271
+ 0.9637116790 0.9627187848 0.9560595155
+ 0.9642623067 0.9632771015 0.9567005038
+ 0.9648129940 0.9638354182 0.9573414922
+ 0.9653636813 0.9643937945 0.9579824805
+ 0.9659144282 0.9649521112 0.9586235285
+ 0.9664651155 0.9655104280 0.9592645168
+ 0.9670158029 0.9660686851 0.9599055052
+ 0.9675664902 0.9666271210 0.9605464935
+ 0.9681171775 0.9671853781 0.9611874819
+ 0.9686546922 0.9677324295 0.9618178010
+ 0.9691889882 0.9682767987 0.9624454975
+ 0.9697234035 0.9688212276 0.9630730748
+ 0.9702578187 0.9693654776 0.9637007713
+ 0.9707921147 0.9699099064 0.9643284082
+ 0.9713264704 0.9704542160 0.9649561048
+ 0.9718608856 0.9709985852 0.9655836821
+ 0.9723951817 0.9715428948 0.9662113786
+ 0.9729295969 0.9720873237 0.9668390155
+ 0.9734640121 0.9726316929 0.9674667120
+ 0.9739983082 0.9731760025 0.9680942893
+ 0.9745327234 0.9737203717 0.9687219858
+ 0.9750670791 0.9742646813 0.9693496227
+ 0.9755846262 0.9747933149 0.9699637890
+ 0.9760981202 0.9753180742 0.9705746174
+ 0.9766116142 0.9758427739 0.9711853862
+ 0.9771251082 0.9763675928 0.9717962742
+ 0.9776384830 0.9768922925 0.9724071026
+ 0.9781519771 0.9774171114 0.9730178714
+ 0.9786654711 0.9779418111 0.9736286998
+ 0.9791790247 0.9784665704 0.9742395878
+ 0.9796923995 0.9789913297 0.9748504162
+ 0.9802058935 0.9795160890 0.9754611850
+ 0.9807193875 0.9800407887 0.9760720730
+ 0.9812328815 0.9805656075 0.9766829014
+ 0.9817463160 0.9810903072 0.9772937298
+ 0.9822406173 0.9815968871 0.9778919816
+ 0.9827232957 0.9820926189 0.9784827828
+ 0.9832059741 0.9825881720 0.9790735841
+ 0.9836887121 0.9830839038 0.9796643257
+ 0.9841712713 0.9835795164 0.9802551270
+ 0.9846540093 0.9840751886 0.9808458090
+ 0.9851366878 0.9845708013 0.9814366102
+ 0.9856194258 0.9850664735 0.9820274115
+ 0.9861021042 0.9855620861 0.9826180935
+ 0.9865847826 0.9860578179 0.9832088947
+ 0.9870674014 0.9865533710 0.9837995768
+ 0.9875500798 0.9870491028 0.9843903780
+ 0.9880328178 0.9875447154 0.9849811792
+ 0.9885063171 0.9880321026 0.9855628014
+ 0.9889544845 0.9884964824 0.9861189723
+ 0.9894027114 0.9889609218 0.9866752028
+ 0.9898508787 0.9894253016 0.9872314930
+ 0.9902991056 0.9898896813 0.9877877235
+ 0.9907472730 0.9903541207 0.9883438945
+ 0.9911954999 0.9908185005 0.9889001250
+ 0.9916437268 0.9912828803 0.9894564152
+ 0.9920918941 0.9917473197 0.9900125861
+ 0.9925400019 0.9922116995 0.9905688167
+ 0.9929882288 0.9926760793 0.9911249876
+ 0.9934363961 0.9931405187 0.9916812778
+ 0.9938846231 0.9936048985 0.9922375083
+ 0.9943327904 0.9940692782 0.9927936792
+ 0.9947488904 0.9945036173 0.9933192730
+ 0.9951528907 0.9949263930 0.9938331842
+ 0.9955567718 0.9953492284 0.9943470955
+ 0.9959607124 0.9957720041 0.9948610067
+ 0.9963645935 0.9961947799 0.9953749180
+ 0.9967685938 0.9966176152 0.9958888292
+ 0.9971724749 0.9970403910 0.9964026809
+ 0.9975764155 0.9974632263 0.9969165921
+ 0.9979804158 0.9978860021 0.9974305034
+ 0.9983842969 0.9983087778 0.9979444146
+ 0.9987881780 0.9987316132 0.9984583259
+ 0.9991921186 0.9991543889 0.9989721775
+ 0.9995961189 0.9995772243 0.9994860888
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/kodak_portra_160nc.spi1d b/release/datafiles/colormanagement/luts/film_response/kodak_portra_160nc.spi1d
new file mode 100644
index 00000000000..e61ba0ee85a
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/kodak_portra_160nc.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0104342103 0.0097368704 0.0081004426
+ 0.0202932805 0.0187927708 0.0152669698
+ 0.0287755504 0.0266450606 0.0213894807
+ 0.0361699387 0.0334015600 0.0267654601
+ 0.0427807011 0.0394648015 0.0316598192
+ 0.0487997085 0.0450807586 0.0361505710
+ 0.0544521399 0.0502359308 0.0404325016
+ 0.0596807487 0.0550900213 0.0445077084
+ 0.0646303892 0.0597528182 0.0484247990
+ 0.0693302229 0.0641593412 0.0521505699
+ 0.0737845525 0.0683351308 0.0556968004
+ 0.0780915692 0.0723901764 0.0591261685
+ 0.0822694898 0.0763313472 0.0624415018
+ 0.0863260701 0.0801697522 0.0657054484
+ 0.0902359709 0.0839016736 0.0689003170
+ 0.0940105170 0.0874804035 0.0719991401
+ 0.0976487026 0.0909066126 0.0750158876
+ 0.1011712030 0.0942689478 0.0779601783
+ 0.1046311036 0.0975821987 0.0808535069
+ 0.1080254018 0.1008832976 0.0837027133
+ 0.1113561988 0.1041185036 0.0864896476
+ 0.1146244034 0.1072700024 0.0892440900
+ 0.1178375036 0.1103363037 0.0919481963
+ 0.1209478006 0.1133145019 0.0945950523
+ 0.1239672974 0.1161829010 0.0971959010
+ 0.1269288063 0.1190017015 0.0997639596
+ 0.1298519969 0.1217684969 0.1022854969
+ 0.1327518970 0.1245191991 0.1047450975
+ 0.1356167048 0.1272488981 0.1071709991
+ 0.1384285986 0.1299587935 0.1095672026
+ 0.1411979049 0.1326563060 0.1119202971
+ 0.1438945979 0.1353050023 0.1142712981
+ 0.1465526074 0.1378984004 0.1166002005
+ 0.1491758972 0.1404460073 0.1189038008
+ 0.1517738998 0.1429633051 0.1211721972
+ 0.1543568969 0.1454481930 0.1234188005
+ 0.1569266021 0.1478973031 0.1256408989
+ 0.1594693065 0.1503026038 0.1278519034
+ 0.1619731039 0.1526698023 0.1300269067
+ 0.1644496024 0.1550289989 0.1322003007
+ 0.1668978930 0.1573766023 0.1343421042
+ 0.1693100929 0.1597099006 0.1364780068
+ 0.1717022955 0.1620142013 0.1385955065
+ 0.1740535051 0.1643050015 0.1406960934
+ 0.1763895005 0.1665803045 0.1427800953
+ 0.1786942929 0.1688499004 0.1448349953
+ 0.1809858978 0.1710920930 0.1468731016
+ 0.1832552999 0.1733157039 0.1488973945
+ 0.1855040044 0.1754987985 0.1508941948
+ 0.1877363026 0.1776573956 0.1528868973
+ 0.1899455935 0.1797675043 0.1548427939
+ 0.1921364963 0.1818484068 0.1567813009
+ 0.1943152994 0.1839254946 0.1587089002
+ 0.1964662969 0.1859872043 0.1605975032
+ 0.1986126006 0.1880321950 0.1624716967
+ 0.2007299960 0.1900521070 0.1643451005
+ 0.2028377950 0.1920509040 0.1662126929
+ 0.2049141973 0.1940355003 0.1680644006
+ 0.2069772035 0.1960064024 0.1699177027
+ 0.2090151012 0.1979558021 0.1717617065
+ 0.2110265940 0.1998984069 0.1735890955
+ 0.2130140960 0.2018423975 0.1754163951
+ 0.2149661928 0.2037782073 0.1772357970
+ 0.2169061005 0.2057027072 0.1790401042
+ 0.2188301980 0.2076229006 0.1808345020
+ 0.2207366973 0.2095226049 0.1826318949
+ 0.2226286978 0.2114018947 0.1844107956
+ 0.2245007008 0.2132596970 0.1861657947
+ 0.2263693064 0.2151038945 0.1879153997
+ 0.2282283008 0.2169471979 0.1896584928
+ 0.2300662994 0.2187916934 0.1913760006
+ 0.2318931073 0.2206248939 0.1930719018
+ 0.2337073982 0.2224474996 0.1947627068
+ 0.2355096936 0.2242646962 0.1964586973
+ 0.2373178005 0.2260648012 0.1981409937
+ 0.2391194999 0.2278497964 0.1998063028
+ 0.2409114987 0.2296245992 0.2014670074
+ 0.2427058071 0.2313791960 0.2031272948
+ 0.2444884032 0.2331136018 0.2047773004
+ 0.2462590933 0.2348330021 0.2064110041
+ 0.2480255961 0.2365438938 0.2080343962
+ 0.2497811019 0.2382504940 0.2096567005
+ 0.2515194118 0.2399522066 0.2112801969
+ 0.2532550991 0.2416505069 0.2129054964
+ 0.2549892068 0.2433426976 0.2145148963
+ 0.2567017972 0.2450259030 0.2161193043
+ 0.2584092021 0.2467028052 0.2177298963
+ 0.2601015866 0.2483644933 0.2193389982
+ 0.2617790103 0.2500090897 0.2209367007
+ 0.2634465098 0.2516413033 0.2225185931
+ 0.2651093900 0.2532702088 0.2240934074
+ 0.2667602897 0.2549068034 0.2256740034
+ 0.2683969140 0.2565379143 0.2272486985
+ 0.2700237036 0.2581647933 0.2288096994
+ 0.2716447115 0.2597900033 0.2303546071
+ 0.2732641101 0.2614181042 0.2318903059
+ 0.2748670876 0.2630349994 0.2334287018
+ 0.2764695883 0.2646454871 0.2349649072
+ 0.2780736983 0.2662520111 0.2364968956
+ 0.2796798050 0.2678571939 0.2380219996
+ 0.2812705934 0.2694469988 0.2395333946
+ 0.2828595936 0.2710259855 0.2410411984
+ 0.2844449878 0.2725957036 0.2425480038
+ 0.2860139906 0.2741582990 0.2440553010
+ 0.2875689864 0.2757219076 0.2455565929
+ 0.2891198993 0.2772797048 0.2470498979
+ 0.2906715870 0.2788243890 0.2485287040
+ 0.2922109962 0.2803615928 0.2500022054
+ 0.2937461138 0.2818956077 0.2514745891
+ 0.2952778041 0.2834267020 0.2529469132
+ 0.2968105972 0.2849394083 0.2543964088
+ 0.2983357012 0.2864452004 0.2558352947
+ 0.2998512089 0.2879436016 0.2572622895
+ 0.3013514876 0.2894333899 0.2586838007
+ 0.3028486967 0.2909137011 0.2601067126
+ 0.3043426871 0.2923789024 0.2615340948
+ 0.3058384061 0.2938305140 0.2629559040
+ 0.3073315024 0.2952756882 0.2643721104
+ 0.3088150918 0.2967103124 0.2657704055
+ 0.3102928102 0.2981418073 0.2671636939
+ 0.3117668927 0.2995713055 0.2685531974
+ 0.3132205009 0.3009906113 0.2699464858
+ 0.3146683872 0.3024047017 0.2713372111
+ 0.3161059022 0.3038088977 0.2727209032
+ 0.3175452054 0.3052091897 0.2740899920
+ 0.3189851940 0.3066073060 0.2754499018
+ 0.3204107881 0.3079979122 0.2767995894
+ 0.3218325078 0.3093867898 0.2781487107
+ 0.3232437968 0.3107711971 0.2794989049
+ 0.3246552944 0.3121513128 0.2808524072
+ 0.3260669112 0.3135269880 0.2822099924
+ 0.3274610937 0.3148944974 0.2835561037
+ 0.3288491964 0.3162589073 0.2848969996
+ 0.3302272856 0.3176145852 0.2862280905
+ 0.3316037059 0.3189670146 0.2875579000
+ 0.3329727948 0.3203001022 0.2888858914
+ 0.3343341947 0.3216342926 0.2902134955
+ 0.3356775939 0.3229714930 0.2915399969
+ 0.3370169997 0.3243103921 0.2928608954
+ 0.3383513093 0.3256517947 0.2941726148
+ 0.3396857977 0.3269968033 0.2954798043
+ 0.3410206139 0.3283447921 0.2967823148
+ 0.3423599005 0.3296887875 0.2980845869
+ 0.3437018096 0.3310303092 0.2993867099
+ 0.3450402915 0.3323693871 0.3006789982
+ 0.3463771939 0.3337073028 0.3019658029
+ 0.3477115035 0.3350473046 0.3032433093
+ 0.3490447998 0.3363879919 0.3045162857
+ 0.3503681123 0.3377214968 0.3057813048
+ 0.3516876996 0.3390519917 0.3070425987
+ 0.3530015051 0.3403775096 0.3083038032
+ 0.3543129861 0.3417007923 0.3095650971
+ 0.3556298018 0.3430233002 0.3108316958
+ 0.3569492996 0.3443453014 0.3121018112
+ 0.3582645059 0.3456591964 0.3133673072
+ 0.3595766127 0.3469670117 0.3146286905
+ 0.3608855009 0.3482683003 0.3158847988
+ 0.3621911108 0.3495621085 0.3171336055
+ 0.3634957969 0.3508524001 0.3183821142
+ 0.3647992015 0.3521358073 0.3196297884
+ 0.3661004901 0.3534179032 0.3208785057
+ 0.3673923910 0.3546931148 0.3221335113
+ 0.3686844110 0.3559682965 0.3233886063
+ 0.3699693084 0.3572291136 0.3246343136
+ 0.3712542057 0.3584896028 0.3258793950
+ 0.3725373149 0.3597457111 0.3271150887
+ 0.3738197982 0.3610003889 0.3283470869
+ 0.3750964105 0.3622534871 0.3295781016
+ 0.3763675094 0.3635050952 0.3308078945
+ 0.3776369989 0.3647533059 0.3320389092
+ 0.3789013028 0.3659900129 0.3332746923
+ 0.3801654875 0.3672266901 0.3345105052
+ 0.3814153969 0.3684552014 0.3357368112
+ 0.3826642036 0.3696827888 0.3369618058
+ 0.3838984966 0.3709067106 0.3381794989
+ 0.3851222992 0.3721277118 0.3393906951
+ 0.3863449097 0.3733451962 0.3406014144
+ 0.3875628114 0.3745481074 0.3418095112
+ 0.3887807131 0.3757509887 0.3430176079
+ 0.3899891078 0.3769412935 0.3442226052
+ 0.3911952078 0.3781279922 0.3454265893
+ 0.3923954070 0.3793081939 0.3466267884
+ 0.3935852945 0.3804757893 0.3478181064
+ 0.3947750926 0.3816434145 0.3490093946
+ 0.3959554136 0.3828100860 0.3501937985
+ 0.3971343935 0.3839766979 0.3513768911
+ 0.3983117044 0.3851422071 0.3525578976
+ 0.3994863927 0.3863059878 0.3537346125
+ 0.4006612003 0.3874697983 0.3549112976
+ 0.4018234015 0.3886323869 0.3560853004
+ 0.4029830992 0.3897947073 0.3572584987
+ 0.4041410089 0.3909561932 0.3584313095
+ 0.4052937031 0.3921152949 0.3596020937
+ 0.4064464867 0.3932743073 0.3607727885
+ 0.4075922072 0.3944297135 0.3619342148
+ 0.4087341130 0.3955830038 0.3630889952
+ 0.4098758996 0.3967362046 0.3642438948
+ 0.4110023081 0.3978854120 0.3653908968
+ 0.4121286869 0.3990345001 0.3665375113
+ 0.4132547975 0.4001820982 0.3676846027
+ 0.4143803120 0.4013260901 0.3688332140
+ 0.4155057073 0.4024702013 0.3699817061
+ 0.4166313112 0.4036095142 0.3711296916
+ 0.4177572131 0.4047453105 0.3722772896
+ 0.4188829958 0.4058811963 0.3734247983
+ 0.4199970961 0.4070141912 0.3745591044
+ 0.4211089909 0.4081465006 0.3756898940
+ 0.4222208858 0.4092785120 0.3768205941
+ 0.4233328998 0.4104020000 0.3779422939
+ 0.4244450033 0.4115254879 0.3790639043
+ 0.4255572855 0.4126478136 0.3801856935
+ 0.4266704023 0.4137653112 0.3813084066
+ 0.4277834892 0.4148826897 0.3824310899
+ 0.4288921058 0.4160000980 0.3835541010
+ 0.4299925864 0.4171172976 0.3846774995
+ 0.4310930073 0.4182344079 0.3858009875
+ 0.4321939051 0.4193536937 0.3869203925
+ 0.4332954884 0.4204756916 0.3880335093
+ 0.4343971014 0.4215976894 0.3891465962
+ 0.4354996085 0.4227164984 0.3902549148
+ 0.4366030097 0.4238317907 0.3913570940
+ 0.4377062917 0.4249469936 0.3924593031
+ 0.4388040006 0.4260604084 0.3935610950
+ 0.4398961961 0.4271718860 0.3946624100
+ 0.4409883022 0.4282833934 0.3957636952
+ 0.4420804083 0.4293954074 0.3968654871
+ 0.4431723058 0.4305078983 0.3979677856
+ 0.4442642033 0.4316205084 0.3990701139
+ 0.4453507066 0.4327288866 0.4001703858
+ 0.4464294016 0.4338311851 0.4012669921
+ 0.4475080073 0.4349335134 0.4023635983
+ 0.4485828876 0.4360336959 0.4034568965
+ 0.4496490061 0.4371289909 0.4045400023
+ 0.4507152140 0.4382242858 0.4056229889
+ 0.4517813921 0.4393191934 0.4067057967
+ 0.4528484046 0.4404121935 0.4077850878
+ 0.4539153874 0.4415051043 0.4088644981
+ 0.4549823999 0.4425981045 0.4099437892
+ 0.4560458958 0.4436711967 0.4110217094
+ 0.4571090937 0.4447430074 0.4120995104
+ 0.4581724107 0.4458146989 0.4131771922
+ 0.4592300057 0.4468767941 0.4142549038
+ 0.4602853060 0.4479345977 0.4153324962
+ 0.4613406062 0.4489924014 0.4164102077
+ 0.4623945951 0.4500474930 0.4174832106
+ 0.4634467959 0.4510987103 0.4185484946
+ 0.4644989967 0.4521498978 0.4196138084
+ 0.4655506909 0.4532003999 0.4206787944
+ 0.4665969014 0.4542433918 0.4217385948
+ 0.4676432014 0.4552864134 0.4227983057
+ 0.4686895013 0.4563294947 0.4238579869
+ 0.4697276056 0.4573652148 0.4249185920
+ 0.4707626998 0.4583980143 0.4259794950
+ 0.4717977941 0.4594308138 0.4270403981
+ 0.4728317857 0.4604609907 0.4280979037
+ 0.4738632143 0.4614850879 0.4291453958
+ 0.4748947024 0.4625090957 0.4301928878
+ 0.4759261906 0.4635331929 0.4312404990
+ 0.4769518971 0.4645487964 0.4322755933
+ 0.4779764116 0.4655626118 0.4333074987
+ 0.4790009856 0.4665764868 0.4343394041
+ 0.4800215960 0.4675863981 0.4353694916
+ 0.4810340106 0.4685879052 0.4363949895
+ 0.4820463955 0.4695892930 0.4374206066
+ 0.4830586910 0.4705908000 0.4384461045
+ 0.4840714037 0.4715859890 0.4394738078
+ 0.4850840867 0.4725790918 0.4405022860
+ 0.4860967994 0.4735723138 0.4415307939
+ 0.4871076941 0.4745646119 0.4425587952
+ 0.4881089032 0.4755522013 0.4435825944
+ 0.4891101122 0.4765397906 0.4446065128
+ 0.4901114106 0.4775272906 0.4456303120
+ 0.4911071956 0.4785116911 0.4466493130
+ 0.4920977056 0.4794926047 0.4476625025
+ 0.4930881858 0.4804734886 0.4486756027
+ 0.4940786958 0.4814544916 0.4496887922
+ 0.4950703979 0.4824301004 0.4506951869
+ 0.4960624874 0.4834043086 0.4516992867
+ 0.4970546067 0.4843784869 0.4527033865
+ 0.4980463088 0.4853524864 0.4537074864
+ 0.4990282059 0.4863195121 0.4547115862
+ 0.5000100732 0.4872865975 0.4557158053
+ 0.5009920001 0.4882535934 0.4567199051
+ 0.5019717216 0.4892205000 0.4577234983
+ 0.5029439926 0.4901863933 0.4587247968
+ 0.5039163828 0.4911524057 0.4597260952
+ 0.5048887134 0.4921183884 0.4607273936
+ 0.5058619976 0.4930835068 0.4617233872
+ 0.5068370104 0.4940471947 0.4627084136
+ 0.5078119040 0.4950107932 0.4636934102
+ 0.5087867975 0.4959745109 0.4646784067
+ 0.5097575188 0.4969376922 0.4656594992
+ 0.5107231736 0.4979003966 0.4666348100
+ 0.5116888285 0.4988631010 0.4676100016
+ 0.5126544833 0.4998258054 0.4685853124
+ 0.5136160254 0.5007869005 0.4695602953
+ 0.5145732164 0.5017461777 0.4705348015
+ 0.5155304074 0.5027055740 0.4715093076
+ 0.5164874792 0.5036649108 0.4724838138
+ 0.5174427032 0.5046222210 0.4734596908
+ 0.5183954835 0.5055770278 0.4744375944
+ 0.5193483829 0.5065317750 0.4754154980
+ 0.5203012228 0.5074865818 0.4763934016
+ 0.5212494731 0.5084401965 0.4773665071
+ 0.5221908092 0.5093917847 0.4783307016
+ 0.5231320858 0.5103434920 0.4792948067
+ 0.5240733027 0.5112950802 0.4802590013
+ 0.5250124931 0.5122454166 0.4812211096
+ 0.5259457231 0.5131919980 0.4821757078
+ 0.5268787742 0.5141385794 0.4831303060
+ 0.5278120041 0.5150852203 0.4840849936
+ 0.5287448764 0.5160313845 0.4850395918
+ 0.5296741724 0.5169715881 0.4859933853
+ 0.5306035280 0.5179117918 0.4869472086
+ 0.5315328836 0.5188519955 0.4879010022
+ 0.5324621797 0.5197921991 0.4888547957
+ 0.5333819985 0.5207303166 0.4898129106
+ 0.5343000293 0.5216680169 0.4907721877
+ 0.5352180004 0.5226057172 0.4917314053
+ 0.5361359715 0.5235434175 0.4926905930
+ 0.5370497108 0.5244811177 0.4936460853
+ 0.5379598141 0.5254188180 0.4945977032
+ 0.5388697982 0.5263565183 0.4955492914
+ 0.5397799015 0.5272942185 0.4965009093
+ 0.5406906009 0.5282303095 0.4974510968
+ 0.5416039824 0.5291588902 0.4983924925
+ 0.5425174832 0.5300874114 0.4993340075
+ 0.5434309244 0.5310158730 0.5002753735
+ 0.5443444252 0.5319445133 0.5012168884
+ 0.5452517867 0.5328708887 0.5021572113
+ 0.5461574793 0.5337966084 0.5030971766
+ 0.5470631123 0.5347223878 0.5040370822
+ 0.5479686856 0.5356481075 0.5049769878
+ 0.5488722920 0.5365749002 0.5059170723
+ 0.5497710109 0.5375043154 0.5068572760
+ 0.5506697893 0.5384337902 0.5077975988
+ 0.5515685081 0.5393632054 0.5087379217
+ 0.5524672270 0.5402926207 0.5096781850
+ 0.5533673763 0.5412126780 0.5106148124
+ 0.5542681217 0.5421293974 0.5115498900
+ 0.5551686883 0.5430461168 0.5124850273
+ 0.5560693741 0.5439627767 0.5134201050
+ 0.5569679737 0.5448786020 0.5143538713
+ 0.5578554273 0.5457888842 0.5152763128
+ 0.5587428212 0.5466991067 0.5161986947
+ 0.5596302152 0.5476093888 0.5171210766
+ 0.5605176091 0.5485196114 0.5180435181
+ 0.5614027977 0.5494297743 0.5189639926
+ 0.5622857213 0.5503401160 0.5198820829
+ 0.5631685853 0.5512502789 0.5208001733
+ 0.5640513897 0.5521605015 0.5217183828
+ 0.5649343133 0.5530707240 0.5226364732
+ 0.5658143759 0.5539742112 0.5235576034
+ 0.5666937232 0.5548753738 0.5244798064
+ 0.5675728917 0.5557765961 0.5254021287
+ 0.5684521794 0.5566778183 0.5263242722
+ 0.5693315268 0.5575789213 0.5272465944
+ 0.5701966882 0.5584716201 0.5281707048
+ 0.5710616112 0.5593640208 0.5290948749
+ 0.5719264746 0.5602563024 0.5300192237
+ 0.5727913976 0.5611487031 0.5309433937
+ 0.5736559033 0.5620400906 0.5318667889
+ 0.5745171905 0.5629237890 0.5327801108
+ 0.5753784776 0.5638076067 0.5336934924
+ 0.5762398243 0.5646913052 0.5346068144
+ 0.5771011114 0.5655751228 0.5355200768
+ 0.5779622793 0.5664567947 0.5364326835
+ 0.5788232088 0.5673298240 0.5373411775
+ 0.5796840787 0.5682027936 0.5382497907
+ 0.5805448890 0.5690757036 0.5391582847
+ 0.5814058185 0.5699486732 0.5400668979
+ 0.5822650790 0.5708199739 0.5409761071
+ 0.5831186175 0.5716847777 0.5418882966
+ 0.5839720964 0.5725495219 0.5428004861
+ 0.5848255754 0.5734142065 0.5437126756
+ 0.5856791139 0.5742788911 0.5446249247
+ 0.5865321159 0.5751429796 0.5455365181
+ 0.5873820782 0.5760030746 0.5464432240
+ 0.5882321000 0.5768632293 0.5473498702
+ 0.5890821218 0.5777233839 0.5482565165
+ 0.5899320841 0.5785834789 0.5491632223
+ 0.5907821059 0.5794435143 0.5500699282
+ 0.5916317105 0.5802974105 0.5509622097
+ 0.5924813151 0.5811514258 0.5518543720
+ 0.5933309793 0.5820053816 0.5527465940
+ 0.5941805840 0.5828593969 0.5536388159
+ 0.5950301886 0.5837132931 0.5545309782
+ 0.5958740115 0.5845609903 0.5554181933
+ 0.5967167020 0.5854074955 0.5563042164
+ 0.5975593925 0.5862538815 0.5571901202
+ 0.5984022021 0.5871003866 0.5580760837
+ 0.5992448926 0.5879467726 0.5589619875
+ 0.6000844836 0.5887897015 0.5598490238
+ 0.6009218097 0.5896298885 0.5607368946
+ 0.6017590761 0.5904700756 0.5616248250
+ 0.6025965214 0.5913102031 0.5625126958
+ 0.6034337878 0.5921503901 0.5634006262
+ 0.6042696834 0.5929887891 0.5642879009
+ 0.6051009893 0.5938212872 0.5651726723
+ 0.6059322953 0.5946537852 0.5660576224
+ 0.6067636013 0.5954862833 0.5669425130
+ 0.6075949073 0.5963187218 0.5678274035
+ 0.6084262133 0.5971512198 0.5687121749
+ 0.6092525721 0.5979760885 0.5695930719
+ 0.6100782156 0.5987992883 0.5704730153
+ 0.6109036803 0.5996224880 0.5713528991
+ 0.6117292047 0.6004456878 0.5722327232
+ 0.6125547886 0.6012688875 0.5731126070
+ 0.6133785844 0.6020901203 0.5739895105
+ 0.6141995192 0.6029073000 0.5748600960
+ 0.6150202751 0.6037245989 0.5757306814
+ 0.6158410907 0.6045418978 0.5766013265
+ 0.6166620255 0.6053591967 0.5774719119
+ 0.6174827814 0.6061763763 0.5783424973
+ 0.6182973981 0.6069906950 0.5792120099
+ 0.6191102862 0.6078041792 0.5800812840
+ 0.6199231744 0.6086177230 0.5809506178
+ 0.6207361817 0.6094312072 0.5818198919
+ 0.6215491295 0.6102446914 0.5826891065
+ 0.6223602295 0.6110575199 0.5835583806
+ 0.6231619120 0.6118662953 0.5844280720
+ 0.6239635944 0.6126750708 0.5852977037
+ 0.6247653961 0.6134839058 0.5861672759
+ 0.6255670786 0.6142926812 0.5870369077
+ 0.6263688207 0.6151015162 0.5879064798
+ 0.6271702051 0.6159092188 0.5887740254
+ 0.6279712915 0.6167153120 0.5896387100
+ 0.6287723780 0.6175215244 0.5905032754
+ 0.6295735240 0.6183276176 0.5913679004
+ 0.6303744912 0.6191337705 0.5922325850
+ 0.6311755776 0.6199399233 0.5930972099
+ 0.6319767833 0.6207464933 0.5939545035
+ 0.6327779293 0.6215533018 0.5948076844
+ 0.6335790753 0.6223601103 0.5956608057
+ 0.6343802810 0.6231669188 0.5965139866
+ 0.6351814866 0.6239737272 0.5973672271
+ 0.6359826922 0.6247804761 0.5982202888
+ 0.6367757916 0.6255866289 0.5990706086
+ 0.6375672221 0.6263926029 0.5999200940
+ 0.6383585930 0.6271985173 0.6007695794
+ 0.6391499043 0.6280043721 0.6016191244
+ 0.6399412751 0.6288104057 0.6024686098
+ 0.6407327056 0.6296163201 0.6033179760
+ 0.6415246129 0.6304203272 0.6041709185
+ 0.6423165202 0.6312239766 0.6050243974
+ 0.6431084275 0.6320276260 0.6058778763
+ 0.6439003944 0.6328312755 0.6067314744
+ 0.6446923018 0.6336349845 0.6075850129
+ 0.6454842091 0.6344386935 0.6084384918
+ 0.6462714076 0.6352415085 0.6092901230
+ 0.6470577121 0.6360440850 0.6101412773
+ 0.6478440166 0.6368467808 0.6109923720
+ 0.6486303806 0.6376494169 0.6118435860
+ 0.6494166851 0.6384519935 0.6126946807
+ 0.6502029896 0.6392546892 0.6135458946
+ 0.6509804726 0.6400555968 0.6143918037
+ 0.6517549157 0.6408560276 0.6152355075
+ 0.6525294185 0.6416562796 0.6160792112
+ 0.6533038020 0.6424565911 0.6169229150
+ 0.6540781856 0.6432569027 0.6177666187
+ 0.6548526883 0.6440572739 0.6186103225
+ 0.6556271911 0.6448554993 0.6194509268
+ 0.6564018726 0.6456521153 0.6202887297
+ 0.6571764946 0.6464486718 0.6211264729
+ 0.6579511762 0.6472452879 0.6219642162
+ 0.6587259173 0.6480419040 0.6228020191
+ 0.6595004797 0.6488385201 0.6236398220
+ 0.6602733731 0.6496348977 0.6244779825
+ 0.6610416770 0.6504310966 0.6253173947
+ 0.6618101001 0.6512271762 0.6261568069
+ 0.6625784039 0.6520233750 0.6269962192
+ 0.6633468270 0.6528195143 0.6278355718
+ 0.6641150713 0.6536157131 0.6286749244
+ 0.6648834944 0.6544117928 0.6295142770
+ 0.6656407118 0.6552035809 0.6303495765
+ 0.6663972139 0.6559950113 0.6311843991
+ 0.6671535969 0.6567865014 0.6320192814
+ 0.6679100990 0.6575778723 0.6328541040
+ 0.6686664820 0.6583693027 0.6336889267
+ 0.6694229841 0.6591607928 0.6345236897
+ 0.6701784730 0.6599478722 0.6353541017
+ 0.6709331274 0.6607304215 0.6361792088
+ 0.6716876030 0.6615129113 0.6370043159
+ 0.6724421978 0.6622954011 0.6378294230
+ 0.6731967926 0.6630778909 0.6386544704
+ 0.6739513278 0.6638603210 0.6394795775
+ 0.6747059226 0.6646428108 0.6403046846
+ 0.6754562259 0.6654220223 0.6411225200
+ 0.6762061715 0.6662008762 0.6419395804
+ 0.6769562960 0.6669799089 0.6427568197
+ 0.6777064204 0.6677588820 0.6435738802
+ 0.6784564257 0.6685379148 0.6443911195
+ 0.6792064905 0.6693168283 0.6452081800
+ 0.6799539924 0.6700953245 0.6460253000
+ 0.6806966066 0.6708728075 0.6468420029
+ 0.6814391017 0.6716501713 0.6476588249
+ 0.6821817160 0.6724277139 0.6484755278
+ 0.6829242706 0.6732050776 0.6492922902
+ 0.6836668253 0.6739826202 0.6501089931
+ 0.6844093800 0.6747599840 0.6509258151
+ 0.6851518154 0.6755318046 0.6517397165
+ 0.6858941913 0.6762999892 0.6525517702
+ 0.6866366267 0.6770682931 0.6533638239
+ 0.6873788834 0.6778365970 0.6541758180
+ 0.6881213188 0.6786047816 0.6549878716
+ 0.6888636947 0.6793730855 0.6557999253
+ 0.6896060705 0.6801413894 0.6566119194
+ 0.6903458238 0.6809049249 0.6574186087
+ 0.6910849214 0.6816673875 0.6582239866
+ 0.6918240786 0.6824299097 0.6590293050
+ 0.6925632954 0.6831923723 0.6598346829
+ 0.6933023930 0.6839548945 0.6606400013
+ 0.6940416098 0.6847174168 0.6614453793
+ 0.6947807074 0.6854798794 0.6622506976
+ 0.6955140829 0.6862388253 0.6630463004
+ 0.6962471008 0.6869974136 0.6638408899
+ 0.6969801188 0.6877560019 0.6646354795
+ 0.6977130771 0.6885147095 0.6654301882
+ 0.6984460950 0.6892732978 0.6662247777
+ 0.6991791129 0.6900318861 0.6670194268
+ 0.6999120116 0.6907905936 0.6678140163
+ 0.7006403208 0.6915383935 0.6686055064
+ 0.7013683915 0.6922855973 0.6693965793
+ 0.7020965219 0.6930328012 0.6701877713
+ 0.7028244734 0.6937800050 0.6709790230
+ 0.7035526037 0.6945272088 0.6717702150
+ 0.7042806745 0.6952744126 0.6725614071
+ 0.7050086856 0.6960216165 0.6733525991
+ 0.7057327032 0.6967638135 0.6741454005
+ 0.7064561248 0.6975051165 0.6749384999
+ 0.7071794868 0.6982464194 0.6757315993
+ 0.7079027891 0.6989877820 0.6765246987
+ 0.7086262107 0.6997290850 0.6773177981
+ 0.7093495727 0.7004703879 0.6781108975
+ 0.7100729942 0.7012118101 0.6789039969
+ 0.7107927203 0.7019538879 0.6796910167
+ 0.7115108967 0.7026965022 0.6804748774
+ 0.7122290134 0.7034389973 0.6812587976
+ 0.7129471898 0.7041814923 0.6820427775
+ 0.7136653066 0.7049241066 0.6828266978
+ 0.7143834829 0.7056666017 0.6836106181
+ 0.7151015997 0.7064090967 0.6843945980
+ 0.7158182263 0.7071503997 0.6851742268
+ 0.7165327072 0.7078899145 0.6859470010
+ 0.7172471285 0.7086293101 0.6867198944
+ 0.7179616094 0.7093688250 0.6874927282
+ 0.7186759710 0.7101082206 0.6882656217
+ 0.7193905115 0.7108476758 0.6890385151
+ 0.7201048732 0.7115870714 0.6898112893
+ 0.7208188772 0.7123262882 0.6905841231
+ 0.7215241194 0.7130588889 0.6913529038
+ 0.7222291827 0.7137916088 0.6921218038
+ 0.7229344249 0.7145242095 0.6928905845
+ 0.7236396074 0.7152568102 0.6936594248
+ 0.7243446708 0.7159894109 0.6944282055
+ 0.7250499129 0.7167220712 0.6951969862
+ 0.7257549763 0.7174546719 0.6959658861
+ 0.7264562845 0.7181851268 0.6967344284
+ 0.7271547914 0.7189137936 0.6975026131
+ 0.7278531790 0.7196425796 0.6982707977
+ 0.7285516262 0.7203713059 0.6990389824
+ 0.7292500734 0.7210999727 0.6998072267
+ 0.7299485207 0.7218288183 0.7005754113
+ 0.7306470275 0.7225574851 0.7013435960
+ 0.7313454151 0.7232862115 0.7021117806
+ 0.7320457101 0.7240095735 0.7028660774
+ 0.7327460051 0.7247328758 0.7036200762
+ 0.7334461808 0.7254562974 0.7043740153
+ 0.7341464758 0.7261795998 0.7051280141
+ 0.7348467708 0.7269030213 0.7058818936
+ 0.7355470061 0.7276263237 0.7066358924
+ 0.7362473011 0.7283496857 0.7073897719
+ 0.7369453907 0.7290710211 0.7081403732
+ 0.7376388907 0.7297881246 0.7088832259
+ 0.7383323908 0.7305051088 0.7096260190
+ 0.7390258908 0.7312222123 0.7103686929
+ 0.7397195101 0.7319391966 0.7111114860
+ 0.7404130101 0.7326561809 0.7118542194
+ 0.7411065102 0.7333732843 0.7125970125
+ 0.7418000102 0.7340903282 0.7133396864
+ 0.7424902916 0.7348045707 0.7140802741
+ 0.7431777716 0.7355164289 0.7148187757
+ 0.7438653708 0.7362282276 0.7155572176
+ 0.7445529103 0.7369400263 0.7162957191
+ 0.7452403903 0.7376518250 0.7170342207
+ 0.7459279895 0.7383636832 0.7177727222
+ 0.7466155291 0.7390754819 0.7185112238
+ 0.7473030090 0.7397872806 0.7192496061
+ 0.7479922771 0.7404950857 0.7199897766
+ 0.7486823797 0.7412006855 0.7207309008
+ 0.7493724227 0.7419062853 0.7214720249
+ 0.7500625253 0.7426118851 0.7222132087
+ 0.7507526278 0.7433174849 0.7229542732
+ 0.7514426708 0.7440230846 0.7236953974
+ 0.7521327734 0.7447286844 0.7244365215
+ 0.7528228760 0.7454342842 0.7251777053
+ 0.7535089850 0.7461348772 0.7259193063
+ 0.7541931868 0.7468327880 0.7266612053
+ 0.7548773885 0.7475308180 0.7274032235
+ 0.7555614710 0.7482287288 0.7281451225
+ 0.7562456727 0.7489265800 0.7288870215
+ 0.7569298744 0.7496244907 0.7296289802
+ 0.7576140165 0.7503225207 0.7303708792
+ 0.7582982183 0.7510203719 0.7311127782
+ 0.7589793801 0.7517145872 0.7318496704
+ 0.7596583962 0.7524058223 0.7325822115
+ 0.7603374124 0.7530969977 0.7333146930
+ 0.7610164285 0.7537881732 0.7340471148
+ 0.7616953254 0.7544794083 0.7347795963
+ 0.7623742819 0.7551705837 0.7355120778
+ 0.7630532980 0.7558618188 0.7362444997
+ 0.7637323141 0.7565529943 0.7369769812
+ 0.7644116879 0.7572417259 0.7377079725
+ 0.7650921941 0.7579252720 0.7384359241
+ 0.7657725811 0.7586089969 0.7391638756
+ 0.7664530277 0.7592927217 0.7398918271
+ 0.7671334147 0.7599763274 0.7406197190
+ 0.7678138018 0.7606599927 0.7413476110
+ 0.7684941888 0.7613437176 0.7420756221
+ 0.7691746950 0.7620273232 0.7428035140
+ 0.7698547840 0.7627109885 0.7435314059
+ 0.7705252171 0.7633913159 0.7442615032
+ 0.7711957097 0.7640715837 0.7449914813
+ 0.7718660831 0.7647519708 0.7457215190
+ 0.7725365162 0.7654322982 0.7464514971
+ 0.7732068896 0.7661126852 0.7471815944
+ 0.7738773227 0.7667930126 0.7479115725
+ 0.7745476961 0.7674732804 0.7486416101
+ 0.7752181292 0.7681537271 0.7493717074
+ 0.7758864760 0.7688329220 0.7501016855
+ 0.7765535116 0.7695114017 0.7508317232
+ 0.7772204876 0.7701898217 0.7515617013
+ 0.7778875232 0.7708683014 0.7522916794
+ 0.7785544991 0.7715467215 0.7530217767
+ 0.7792214155 0.7722252011 0.7537518144
+ 0.7798883915 0.7729036212 0.7544817924
+ 0.7805554271 0.7735821009 0.7552117705
+ 0.7812224030 0.7742605805 0.7559416890
+ 0.7818884850 0.7749400735 0.7566617131
+ 0.7825545073 0.7756196856 0.7573816776
+ 0.7832205892 0.7762991786 0.7581015825
+ 0.7838866711 0.7769787908 0.7588216066
+ 0.7845528126 0.7776582837 0.7595415711
+ 0.7852188945 0.7783377767 0.7602615952
+ 0.7858849764 0.7790173888 0.7609816194
+ 0.7865511179 0.7796968818 0.7617015839
+ 0.7872148752 0.7803745866 0.7624198198
+ 0.7878748178 0.7810488939 0.7631347179
+ 0.7885347009 0.7817232013 0.7638494968
+ 0.7891945839 0.7823975086 0.7645643950
+ 0.7898545265 0.7830718756 0.7652792931
+ 0.7905144095 0.7837461829 0.7659941912
+ 0.7911742926 0.7844204903 0.7667090893
+ 0.7918342948 0.7850949168 0.7674239278
+ 0.7924941778 0.7857692242 0.7681388259
+ 0.7931510806 0.7864413261 0.7688534856
+ 0.7938057780 0.7871118188 0.7695679069
+ 0.7944605947 0.7877823114 0.7702823877
+ 0.7951152921 0.7884528041 0.7709968090
+ 0.7957701087 0.7891234159 0.7717112899
+ 0.7964249253 0.7897939086 0.7724257112
+ 0.7970796227 0.7904644012 0.7731400728
+ 0.7977343798 0.7911348939 0.7738546133
+ 0.7983890772 0.7918053865 0.7745689750
+ 0.7990390062 0.7924752831 0.7752832174
+ 0.7996864915 0.7931450009 0.7759972811
+ 0.8003339767 0.7938145995 0.7767112851
+ 0.8009815216 0.7944843173 0.7774252892
+ 0.8016290069 0.7951539159 0.7781392932
+ 0.8022764921 0.7958235741 0.7788534164
+ 0.8029239774 0.7964931726 0.7795674205
+ 0.8035715222 0.7971628904 0.7802814245
+ 0.8042190075 0.7978324890 0.7809954882
+ 0.8048598766 0.7984976172 0.7817047834
+ 0.8054972887 0.7991601825 0.7824113965
+ 0.8061345816 0.7998228073 0.7831178904
+ 0.8067719936 0.8004853725 0.7838245034
+ 0.8074094057 0.8011479974 0.7845311165
+ 0.8080468178 0.8018106222 0.7852376103
+ 0.8086841106 0.8024731874 0.7859442234
+ 0.8093215227 0.8031358123 0.7866507769
+ 0.8099588752 0.8037983775 0.7873573899
+ 0.8105943203 0.8044582009 0.7880617976
+ 0.8112279177 0.8051152229 0.7887639999
+ 0.8118613958 0.8057723045 0.7894663215
+ 0.8124949932 0.8064293265 0.7901685238
+ 0.8131284714 0.8070862889 0.7908707261
+ 0.8137621284 0.8077433109 0.7915729880
+ 0.8143956065 0.8084002733 0.7922751904
+ 0.8150292039 0.8090572953 0.7929773927
+ 0.8156626821 0.8097143769 0.7936797142
+ 0.8162947893 0.8103706837 0.7943819761
+ 0.8169224262 0.8110250235 0.7950844765
+ 0.8175500035 0.8116793036 0.7957870960
+ 0.8181775808 0.8123335838 0.7964897156
+ 0.8188052177 0.8129879236 0.7971922755
+ 0.8194326758 0.8136422038 0.7978948951
+ 0.8200603127 0.8142964244 0.7985973954
+ 0.8206878901 0.8149507046 0.7993000150
+ 0.8213155270 0.8156049848 0.8000025749
+ 0.8219431043 0.8162593246 0.8007051945
+ 0.8225635290 0.8169105053 0.8014042974
+ 0.8231825829 0.8175610900 0.8021026254
+ 0.8238015771 0.8182116747 0.8028008938
+ 0.8244206905 0.8188623190 0.8034992814
+ 0.8250398040 0.8195129037 0.8041976094
+ 0.8256589174 0.8201634884 0.8048958778
+ 0.8262779117 0.8208140731 0.8055942059
+ 0.8268970251 0.8214647174 0.8062925935
+ 0.8275160789 0.8221153021 0.8069909215
+ 0.8281350136 0.8227658272 0.8076866269
+ 0.8287534714 0.8234161139 0.8083760738
+ 0.8293719888 0.8240664005 0.8090655804
+ 0.8299906254 0.8247166872 0.8097550869
+ 0.8306090832 0.8253669739 0.8104445934
+ 0.8312276006 0.8260173798 0.8111341000
+ 0.8318461776 0.8266677260 0.8118236065
+ 0.8324646950 0.8273180127 0.8125131130
+ 0.8330832124 0.8279682994 0.8132026196
+ 0.8337017298 0.8286185861 0.8138921261
+ 0.8343204260 0.8292688131 0.8145787716
+ 0.8349391818 0.8299189210 0.8152639866
+ 0.8355578780 0.8305690289 0.8159490824
+ 0.8361766934 0.8312191963 0.8166342974
+ 0.8367953897 0.8318693042 0.8173193932
+ 0.8374142051 0.8325194716 0.8180044889
+ 0.8380329013 0.8331695795 0.8186897039
+ 0.8386517167 0.8338196874 0.8193747997
+ 0.8392704129 0.8344699144 0.8200598955
+ 0.8398892283 0.8351200223 0.8207451105
+ 0.8405013084 0.8357700706 0.8214318156
+ 0.8411123753 0.8364201188 0.8221188188
+ 0.8417235017 0.8370702267 0.8228058219
+ 0.8423346281 0.8377202749 0.8234927058
+ 0.8429456949 0.8383703232 0.8241797090
+ 0.8435568213 0.8390203714 0.8248667121
+ 0.8441678882 0.8396704197 0.8255537152
+ 0.8447790146 0.8403205276 0.8262405992
+ 0.8453900814 0.8409705162 0.8269276023
+ 0.8460012078 0.8416206241 0.8276146054
+ 0.8466123939 0.8422645926 0.8282997012
+ 0.8472235799 0.8429083228 0.8289846778
+ 0.8478348255 0.8435521126 0.8296697140
+ 0.8484458923 0.8441957831 0.8303546906
+ 0.8490570784 0.8448395133 0.8310397267
+ 0.8496683240 0.8454831839 0.8317247033
+ 0.8502795100 0.8461269736 0.8324096799
+ 0.8508906960 0.8467707038 0.8330947161
+ 0.8515018821 0.8474143744 0.8337796926
+ 0.8521130085 0.8480581045 0.8344647288
+ 0.8527246714 0.8486986756 0.8351467848
+ 0.8533365130 0.8493388295 0.8358284831
+ 0.8539482951 0.8499789834 0.8365101814
+ 0.8545600176 0.8506191969 0.8371918797
+ 0.8551717997 0.8512594104 0.8378735781
+ 0.8557835817 0.8518995047 0.8385552764
+ 0.8563953042 0.8525397182 0.8392369151
+ 0.8570070863 0.8531798720 0.8399186134
+ 0.8576189280 0.8538200259 0.8406003118
+ 0.8582305908 0.8544601798 0.8412820101
+ 0.8588374257 0.8550989032 0.8419591784
+ 0.8594421744 0.8557369709 0.8426344991
+ 0.8600469828 0.8563752174 0.8433098197
+ 0.8606517911 0.8570132852 0.8439850211
+ 0.8612565994 0.8576514125 0.8446602821
+ 0.8618612885 0.8582894802 0.8453356028
+ 0.8624660969 0.8589276075 0.8460108042
+ 0.8630709052 0.8595656753 0.8466861248
+ 0.8636757135 0.8602039218 0.8473613858
+ 0.8642805219 0.8608419895 0.8480365872
+ 0.8648855090 0.8614770174 0.8487117887
+ 0.8654909730 0.8621069193 0.8493868113
+ 0.8660963774 0.8627368212 0.8500617146
+ 0.8667019010 0.8633667231 0.8507366776
+ 0.8673073053 0.8639966249 0.8514117002
+ 0.8679128289 0.8646265268 0.8520867229
+ 0.8685181737 0.8652564287 0.8527616262
+ 0.8691236973 0.8658862710 0.8534365892
+ 0.8697291017 0.8665162921 0.8541116118
+ 0.8703346252 0.8671461940 0.8547865152
+ 0.8709400296 0.8677760959 0.8554614782
+ 0.8715463281 0.8684011102 0.8561388254
+ 0.8721526861 0.8690257072 0.8568162918
+ 0.8727591038 0.8696503043 0.8574938178
+ 0.8733655214 0.8702749014 0.8581712842
+ 0.8739719987 0.8708994985 0.8588488102
+ 0.8745784163 0.8715240955 0.8595262766
+ 0.8751847744 0.8721486926 0.8602038026
+ 0.8757911921 0.8727732897 0.8608813286
+ 0.8763976097 0.8733978868 0.8615587950
+ 0.8770040274 0.8740224242 0.8622363210
+ 0.8776084781 0.8746458292 0.8629111052
+ 0.8782086968 0.8752664924 0.8635792732
+ 0.8788089752 0.8758872151 0.8642475009
+ 0.8794091940 0.8765078187 0.8649157286
+ 0.8800094724 0.8771284819 0.8655838966
+ 0.8806096911 0.8777492046 0.8662521243
+ 0.8812100291 0.8783698082 0.8669202924
+ 0.8818103075 0.8789904714 0.8675885201
+ 0.8824105263 0.8796111941 0.8682566881
+ 0.8830108047 0.8802317977 0.8689249158
+ 0.8836110234 0.8808525205 0.8695930839
+ 0.8842111826 0.8814677000 0.8702577949
+ 0.8848112822 0.8820785880 0.8709195852
+ 0.8854113817 0.8826894164 0.8715813160
+ 0.8860116005 0.8833001852 0.8722429872
+ 0.8866117001 0.8839110136 0.8729047775
+ 0.8872117996 0.8845217824 0.8735665083
+ 0.8878118992 0.8851326108 0.8742281795
+ 0.8884119987 0.8857433796 0.8748900294
+ 0.8890120983 0.8863543272 0.8755517006
+ 0.8896123171 0.8869650960 0.8762133718
+ 0.8902124166 0.8875759244 0.8768752217
+ 0.8908076882 0.8881832957 0.8775365949
+ 0.8914005160 0.8887888193 0.8781977892
+ 0.8919934034 0.8893944025 0.8788589835
+ 0.8925861716 0.8899999857 0.8795201778
+ 0.8931789994 0.8906055093 0.8801813722
+ 0.8937718272 0.8912110925 0.8808426261
+ 0.8943647146 0.8918166757 0.8815038204
+ 0.8949574828 0.8924221992 0.8821650147
+ 0.8955503106 0.8930277824 0.8828263283
+ 0.8961430788 0.8936333060 0.8834875226
+ 0.8967359066 0.8942388892 0.8841487169
+ 0.8973246217 0.8948436975 0.8848111033
+ 0.8979104757 0.8954480290 0.8854743838
+ 0.8984965086 0.8960524201 0.8861377835
+ 0.8990824223 0.8966566920 0.8868011236
+ 0.8996682763 0.8972610235 0.8874644041
+ 0.9002543092 0.8978654146 0.8881276846
+ 0.9008402228 0.8984696865 0.8887910247
+ 0.9014261961 0.8990740180 0.8894543052
+ 0.9020121098 0.8996782899 0.8901175857
+ 0.9025980234 0.9002826810 0.8907809258
+ 0.9031839967 0.9008870125 0.8914443254
+ 0.9037700891 0.9014902115 0.8921037912
+ 0.9043565989 0.9020918012 0.8927577138
+ 0.9049429893 0.9026933908 0.8934116960
+ 0.9055293798 0.9032949805 0.8940656185
+ 0.9061157703 0.9038965702 0.8947194815
+ 0.9067022800 0.9044982195 0.8953734040
+ 0.9072886705 0.9050998092 0.8960273266
+ 0.9078751206 0.9057013988 0.8966811895
+ 0.9084615707 0.9063029885 0.8973351121
+ 0.9090480208 0.9069045782 0.8979889750
+ 0.9096344113 0.9075062275 0.8986428976
+ 0.9102206826 0.9081075191 0.8992965221
+ 0.9108051062 0.9087041020 0.8999441266
+ 0.9113894105 0.9093006849 0.9005916119
+ 0.9119737744 0.9098973274 0.9012390971
+ 0.9125580788 0.9104939103 0.9018865824
+ 0.9131425023 0.9110904932 0.9025341868
+ 0.9137269258 0.9116870761 0.9031816721
+ 0.9143111706 0.9122837186 0.9038292170
+ 0.9148955941 0.9128803015 0.9044768214
+ 0.9154798985 0.9134768844 0.9051243067
+ 0.9160643220 0.9140735269 0.9057717919
+ 0.9166486263 0.9146699905 0.9064192772
+ 0.9172297716 0.9152629972 0.9070658088
+ 0.9178082943 0.9158529043 0.9077115059
+ 0.9183868766 0.9164428711 0.9083572030
+ 0.9189653993 0.9170327783 0.9090027809
+ 0.9195439816 0.9176228046 0.9096484780
+ 0.9201225042 0.9182127118 0.9102941155
+ 0.9207010865 0.9188026786 0.9109398127
+ 0.9212796092 0.9193927050 0.9115853906
+ 0.9218580723 0.9199826121 0.9122310877
+ 0.9224367142 0.9205725789 0.9128767252
+ 0.9230151772 0.9211624861 0.9135224223
+ 0.9235938191 0.9217525125 0.9141680002
+ 0.9241641760 0.9223377109 0.9148079753
+ 0.9247336984 0.9229223728 0.9154471159
+ 0.9253032207 0.9235070944 0.9160863161
+ 0.9258726239 0.9240918159 0.9167255163
+ 0.9264420867 0.9246764183 0.9173647165
+ 0.9270116091 0.9252610803 0.9180039167
+ 0.9275810719 0.9258458018 0.9186431170
+ 0.9281504750 0.9264305234 0.9192823172
+ 0.9287199974 0.9270151854 0.9199213982
+ 0.9292895198 0.9275997877 0.9205605984
+ 0.9298589826 0.9281845093 0.9211997986
+ 0.9304273725 0.9287682176 0.9218379855
+ 0.9309837222 0.9293403029 0.9224632978
+ 0.9315400124 0.9299123883 0.9230884910
+ 0.9320963025 0.9304844737 0.9237136841
+ 0.9326524734 0.9310566187 0.9243389964
+ 0.9332088232 0.9316285849 0.9249641895
+ 0.9337651134 0.9322006702 0.9255895019
+ 0.9343214035 0.9327728152 0.9262146950
+ 0.9348776937 0.9333449006 0.9268398881
+ 0.9354339242 0.9339169860 0.9274652004
+ 0.9359902143 0.9344890118 0.9280903935
+ 0.9365465045 0.9350610971 0.9287157059
+ 0.9371017814 0.9356322885 0.9293395877
+ 0.9376482964 0.9361947179 0.9299502969
+ 0.9381946921 0.9367572069 0.9305610061
+ 0.9387412071 0.9373196959 0.9311717153
+ 0.9392877221 0.9378821254 0.9317824244
+ 0.9398341775 0.9384446144 0.9323930740
+ 0.9403805733 0.9390071034 0.9330037832
+ 0.9409270883 0.9395694733 0.9336146116
+ 0.9414736032 0.9401320219 0.9342253208
+ 0.9420201182 0.9406945109 0.9348359704
+ 0.9425665140 0.9412570000 0.9354466796
+ 0.9431130290 0.9418194294 0.9360573888
+ 0.9436594844 0.9423819184 0.9366680980
+ 0.9441972971 0.9429398775 0.9372712970
+ 0.9447346926 0.9434977174 0.9378741980
+ 0.9452720881 0.9440554976 0.9384769797
+ 0.9458096027 0.9446132779 0.9390798807
+ 0.9463469982 0.9451711178 0.9396827221
+ 0.9468843937 0.9457287788 0.9402856231
+ 0.9474219084 0.9462866187 0.9408884048
+ 0.9479593039 0.9468443990 0.9414913058
+ 0.9484966993 0.9474021792 0.9420940876
+ 0.9490342140 0.9479600191 0.9426969290
+ 0.9495716095 0.9485177994 0.9432997704
+ 0.9501090050 0.9490755796 0.9439026117
+ 0.9506387115 0.9496260285 0.9444972873
+ 0.9511643052 0.9501724839 0.9450876117
+ 0.9516900182 0.9507189989 0.9456778765
+ 0.9522156119 0.9512655139 0.9462682009
+ 0.9527412057 0.9518120289 0.9468585253
+ 0.9532667994 0.9523584843 0.9474487901
+ 0.9537923932 0.9529049993 0.9480391145
+ 0.9543179870 0.9534515142 0.9486293197
+ 0.9548435807 0.9539980292 0.9492195845
+ 0.9553691745 0.9545444846 0.9498099089
+ 0.9558948278 0.9550909996 0.9504001737
+ 0.9564204216 0.9556375146 0.9509904981
+ 0.9569442272 0.9561818838 0.9515780210
+ 0.9574593902 0.9567170143 0.9521524906
+ 0.9579746127 0.9572520852 0.9527270198
+ 0.9584897757 0.9577872157 0.9533016086
+ 0.9590049982 0.9583222866 0.9538760781
+ 0.9595202208 0.9588574171 0.9544506073
+ 0.9600353837 0.9593924880 0.9550250769
+ 0.9605506063 0.9599276185 0.9555996060
+ 0.9610658288 0.9604626298 0.9561740756
+ 0.9615809917 0.9609977007 0.9567486048
+ 0.9620962143 0.9615327716 0.9573231936
+ 0.9626114964 0.9620679021 0.9578977227
+ 0.9631267190 0.9626029730 0.9584721923
+ 0.9636358023 0.9631323218 0.9590396285
+ 0.9641396999 0.9636566043 0.9596006870
+ 0.9646437168 0.9641808867 0.9601618052
+ 0.9651476145 0.9647052288 0.9607229829
+ 0.9656515121 0.9652295113 0.9612841010
+ 0.9661555290 0.9657537937 0.9618452787
+ 0.9666594267 0.9662780762 0.9624063969
+ 0.9671633244 0.9668024182 0.9629675150
+ 0.9676672816 0.9673267007 0.9635286927
+ 0.9681711793 0.9678509831 0.9640898108
+ 0.9686750770 0.9683753252 0.9646509886
+ 0.9691790938 0.9688996077 0.9652121067
+ 0.9696829915 0.9694238901 0.9657732248
+ 0.9701765180 0.9699373245 0.9663273096
+ 0.9706659913 0.9704464078 0.9668784738
+ 0.9711555243 0.9709556103 0.9674296975
+ 0.9716449976 0.9714648128 0.9679809809
+ 0.9721345901 0.9719740152 0.9685322046
+ 0.9726241231 0.9724830985 0.9690834880
+ 0.9731135964 0.9729923010 0.9696347117
+ 0.9736031294 0.9735015035 0.9701858759
+ 0.9740926027 0.9740107059 0.9707372189
+ 0.9745820761 0.9745197892 0.9712883830
+ 0.9750717282 0.9750289917 0.9718397260
+ 0.9755612016 0.9755381942 0.9723908901
+ 0.9760506749 0.9760473967 0.9729421139
+ 0.9765306115 0.9765431881 0.9734861851
+ 0.9770072103 0.9770342112 0.9740275145
+ 0.9774836898 0.9775252938 0.9745689034
+ 0.9779602885 0.9780163765 0.9751102924
+ 0.9784368277 0.9785073996 0.9756516814
+ 0.9789134264 0.9789984822 0.9761930704
+ 0.9793899059 0.9794895053 0.9767343998
+ 0.9798665047 0.9799805880 0.9772757888
+ 0.9803431034 0.9804716110 0.9778171778
+ 0.9808195829 0.9809626937 0.9783586264
+ 0.9812961817 0.9814537764 0.9789000154
+ 0.9817727208 0.9819447994 0.9794412851
+ 0.9822493196 0.9824358821 0.9799826741
+ 0.9827123284 0.9829128981 0.9805108905
+ 0.9831652045 0.9833794236 0.9810290933
+ 0.9836181998 0.9838458896 0.9815472960
+ 0.9840711951 0.9843124151 0.9820654988
+ 0.9845240712 0.9847788811 0.9825838208
+ 0.9849771261 0.9852454066 0.9831020236
+ 0.9854301214 0.9857119918 0.9836202264
+ 0.9858829975 0.9861785173 0.9841384292
+ 0.9863359928 0.9866449833 0.9846565723
+ 0.9867889881 0.9871115088 0.9851748943
+ 0.9872419238 0.9875779748 0.9856930971
+ 0.9876949191 0.9880445004 0.9862112999
+ 0.9881477952 0.9885110855 0.9867295027
+ 0.9885957837 0.9889689088 0.9872413278
+ 0.9890270829 0.9893978834 0.9877312779
+ 0.9894583821 0.9898269176 0.9882212877
+ 0.9898896813 0.9902558923 0.9887112975
+ 0.9903209805 0.9906849265 0.9892013073
+ 0.9907522798 0.9911139011 0.9896913171
+ 0.9911835790 0.9915428758 0.9901813269
+ 0.9916148782 0.9919719100 0.9906713963
+ 0.9920461774 0.9924008846 0.9911614060
+ 0.9924774766 0.9928299189 0.9916514158
+ 0.9929087758 0.9932588935 0.9921414256
+ 0.9933400750 0.9936879277 0.9926313758
+ 0.9937713742 0.9941169024 0.9931213856
+ 0.9942026734 0.9945458770 0.9936113954
+ 0.9946215749 0.9949464798 0.9940770864
+ 0.9950352907 0.9953352213 0.9945327044
+ 0.9954490066 0.9957239032 0.9949883223
+ 0.9958627224 0.9961127043 0.9954438806
+ 0.9962764978 0.9965013862 0.9958994985
+ 0.9966902137 0.9968901277 0.9963551760
+ 0.9971039295 0.9972789288 0.9968107939
+ 0.9975175858 0.9976676106 0.9972664118
+ 0.9979314208 0.9980562925 0.9977220297
+ 0.9983450770 0.9984450936 0.9981775880
+ 0.9987587929 0.9988337755 0.9986332059
+ 0.9991725087 0.9992225170 0.9990888238
+ 0.9995862842 0.9996113181 0.9995443821
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/kodak_portra_160vc.spi1d b/release/datafiles/colormanagement/luts/film_response/kodak_portra_160vc.spi1d
new file mode 100644
index 00000000000..1025144f16f
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/kodak_portra_160vc.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0077699851 0.0072091222 0.0057455739
+ 0.0153281903 0.0140618198 0.0110133700
+ 0.0220492706 0.0201340895 0.0156183802
+ 0.0279948898 0.0255677104 0.0198130608
+ 0.0334264189 0.0305160508 0.0236329101
+ 0.0383813009 0.0350662991 0.0272729397
+ 0.0430751182 0.0393643305 0.0306853205
+ 0.0474476218 0.0434310399 0.0339677408
+ 0.0515641496 0.0472853705 0.0371497907
+ 0.0555446185 0.0509948209 0.0402266905
+ 0.0594275706 0.0545908697 0.0432020612
+ 0.0631866604 0.0580725186 0.0460699908
+ 0.0668074489 0.0614085086 0.0488363616
+ 0.0702805966 0.0646550804 0.0515515506
+ 0.0736529976 0.0678500831 0.0542215705
+ 0.0769146830 0.0709684193 0.0568457693
+ 0.0801084563 0.0739683583 0.0594256707
+ 0.0832033977 0.0768856406 0.0619675815
+ 0.0862210765 0.0797707886 0.0644541681
+ 0.0891883075 0.0826155171 0.0668781176
+ 0.0921097621 0.0853902176 0.0692649484
+ 0.0950033367 0.0881099030 0.0716069788
+ 0.0978709385 0.0907903165 0.0739388466
+ 0.1006767005 0.0934374928 0.0762372017
+ 0.1034490988 0.0960375518 0.0785102323
+ 0.1061699986 0.0985936001 0.0807417631
+ 0.1088621020 0.1011143997 0.0829524100
+ 0.1115100011 0.1035860032 0.0851420909
+ 0.1141035035 0.1060298979 0.0873048082
+ 0.1166575998 0.1084465012 0.0894576833
+ 0.1191660017 0.1108224019 0.0915750787
+ 0.1216190010 0.1131646037 0.0936675370
+ 0.1240210012 0.1154721975 0.0957391188
+ 0.1263785958 0.1177325025 0.0977701619
+ 0.1287032962 0.1199773997 0.0997919589
+ 0.1309965998 0.1222233996 0.1018017009
+ 0.1332729012 0.1244523004 0.1037892997
+ 0.1355164945 0.1266828030 0.1057759970
+ 0.1377673000 0.1288989931 0.1077485010
+ 0.1400064975 0.1310786009 0.1096967012
+ 0.1422519982 0.1332331002 0.1116394028
+ 0.1444955021 0.1353804022 0.1135682017
+ 0.1467241049 0.1374987066 0.1154882982
+ 0.1489524990 0.1396068931 0.1173892990
+ 0.1511590034 0.1416790038 0.1192753017
+ 0.1533526033 0.1437290013 0.1211493984
+ 0.1555102021 0.1457712948 0.1229984984
+ 0.1576402932 0.1477762014 0.1248319969
+ 0.1597459018 0.1497581005 0.1266517043
+ 0.1618217975 0.1517187059 0.1284562945
+ 0.1638692021 0.1536567956 0.1302371025
+ 0.1658921987 0.1555901021 0.1320014000
+ 0.1678850949 0.1574811935 0.1337444037
+ 0.1698528975 0.1593548954 0.1354825944
+ 0.1718069017 0.1612353027 0.1372071058
+ 0.1737360060 0.1631090939 0.1389127970
+ 0.1756428927 0.1649706960 0.1406110972
+ 0.1775456071 0.1668394953 0.1423041970
+ 0.1794250011 0.1687040031 0.1439954042
+ 0.1812936962 0.1705541015 0.1456899941
+ 0.1831597984 0.1724057049 0.1473833025
+ 0.1850039065 0.1742419004 0.1490696967
+ 0.1868477017 0.1760638058 0.1507641971
+ 0.1886914074 0.1778782010 0.1524640024
+ 0.1905229986 0.1796796024 0.1541469991
+ 0.1923421025 0.1814686954 0.1558177024
+ 0.1941601038 0.1832399964 0.1574839056
+ 0.1959781945 0.1850111932 0.1591470987
+ 0.1978068054 0.1867780983 0.1608041972
+ 0.1996330023 0.1885201037 0.1624432057
+ 0.2014473975 0.1902448982 0.1640713960
+ 0.2032514960 0.1919703931 0.1656913012
+ 0.2050576061 0.1936956942 0.1672880948
+ 0.2068455070 0.1953990012 0.1688698977
+ 0.2086115927 0.1970870048 0.1704351008
+ 0.2103770971 0.1987718940 0.1719868034
+ 0.2121285051 0.2004460990 0.1735249013
+ 0.2138638943 0.2020982951 0.1750528961
+ 0.2155895978 0.2037346959 0.1765847057
+ 0.2173081934 0.2053682953 0.1781219989
+ 0.2190068960 0.2069963962 0.1796503961
+ 0.2206840962 0.2086153030 0.1811677068
+ 0.2223511040 0.2102248967 0.1826826036
+ 0.2240124047 0.2118259966 0.1841962934
+ 0.2256612033 0.2134266943 0.1857064962
+ 0.2272907943 0.2150333971 0.1872134954
+ 0.2289057970 0.2166189998 0.1887131035
+ 0.2305078059 0.2181905061 0.1902053952
+ 0.2321005017 0.2197569013 0.1916909963
+ 0.2336920053 0.2213245928 0.1931720972
+ 0.2352899015 0.2228953987 0.1946519017
+ 0.2368838936 0.2244486064 0.1961286962
+ 0.2384622991 0.2259978950 0.1976062059
+ 0.2400310934 0.2275449038 0.1990849972
+ 0.2415942997 0.2290931940 0.2005598992
+ 0.2431554943 0.2306476980 0.2020221055
+ 0.2447042018 0.2321884036 0.2034724057
+ 0.2462362051 0.2337166965 0.2049137056
+ 0.2477615029 0.2352366000 0.2063475996
+ 0.2492882013 0.2367514074 0.2077756971
+ 0.2508074939 0.2382549047 0.2092022002
+ 0.2523134053 0.2397526950 0.2106287032
+ 0.2538112998 0.2412422001 0.2120527029
+ 0.2553072870 0.2427164018 0.2134691030
+ 0.2568025887 0.2441851944 0.2148848027
+ 0.2582916915 0.2456547022 0.2162963003
+ 0.2597728968 0.2471264005 0.2177021056
+ 0.2612324953 0.2485917062 0.2190997005
+ 0.2626926899 0.2500481904 0.2204964012
+ 0.2641533017 0.2514964044 0.2218922973
+ 0.2656058967 0.2529383004 0.2232878953
+ 0.2670469880 0.2543821037 0.2246783972
+ 0.2684782147 0.2558273077 0.2260642052
+ 0.2699055076 0.2572557926 0.2274404019
+ 0.2713302076 0.2586747110 0.2288105041
+ 0.2727521956 0.2600823939 0.2301730961
+ 0.2741548121 0.2614834905 0.2315272987
+ 0.2755548060 0.2628856003 0.2328795046
+ 0.2769533098 0.2642917037 0.2342298031
+ 0.2783550918 0.2656919062 0.2355791926
+ 0.2797575891 0.2670885921 0.2369273007
+ 0.2811529040 0.2684741020 0.2382656932
+ 0.2825410068 0.2698574066 0.2396034002
+ 0.2839199007 0.2712377012 0.2409401983
+ 0.2853043079 0.2726213932 0.2422693074
+ 0.2866902053 0.2740063071 0.2435951978
+ 0.2880729139 0.2753944993 0.2449122965
+ 0.2894502878 0.2767789960 0.2462285012
+ 0.2908177972 0.2781563997 0.2475429028
+ 0.2921772897 0.2795270979 0.2488564998
+ 0.2935316861 0.2808933854 0.2501694858
+ 0.2948884964 0.2822520137 0.2514741123
+ 0.2962454855 0.2836092114 0.2527768016
+ 0.2975969017 0.2849698961 0.2540780902
+ 0.2989454865 0.2863264978 0.2553772032
+ 0.3002853096 0.2876687944 0.2566682100
+ 0.3016225100 0.2890065014 0.2579559088
+ 0.3029560149 0.2903367877 0.2592380047
+ 0.3042886853 0.2916674018 0.2605186999
+ 0.3056207895 0.2929981947 0.2617981136
+ 0.3069526851 0.2943269908 0.2630766928
+ 0.3082844913 0.2956545949 0.2643547952
+ 0.3096182942 0.2969661951 0.2656278014
+ 0.3109529912 0.2982715070 0.2668986917
+ 0.3122856021 0.2995666862 0.2681745887
+ 0.3136177063 0.3008590043 0.2694520056
+ 0.3149411976 0.3021504879 0.2707208097
+ 0.3162628114 0.3034417927 0.2719872892
+ 0.3175767064 0.3047347069 0.2732458115
+ 0.3188889921 0.3060280085 0.2745023072
+ 0.3202066123 0.3073163033 0.2757557929
+ 0.3215256035 0.3086032867 0.2770085931
+ 0.3228304088 0.3098782003 0.2782612145
+ 0.3241305947 0.3111487925 0.2795138955
+ 0.3254284859 0.3124164939 0.2807643116
+ 0.3267253041 0.3136827946 0.2820135057
+ 0.3280225098 0.3149532080 0.2832610905
+ 0.3293201029 0.3162268996 0.2845073938
+ 0.3306170106 0.3174982071 0.2857488990
+ 0.3319132030 0.3187662959 0.2869836092
+ 0.3332048953 0.3200294971 0.2882154882
+ 0.3344849050 0.3212794960 0.2894394994
+ 0.3357647061 0.3225289881 0.2906630933
+ 0.3370434046 0.3237726986 0.2918823063
+ 0.3383221924 0.3250164092 0.2931014895
+ 0.3395951092 0.3262596130 0.2943179011
+ 0.3408671021 0.3275027871 0.2955336869
+ 0.3421292007 0.3287386000 0.2967428863
+ 0.3433851898 0.3299694955 0.2979474962
+ 0.3446362913 0.3311983943 0.2991509140
+ 0.3458774090 0.3324227929 0.3003517985
+ 0.3471182883 0.3336473107 0.3015527129
+ 0.3483507931 0.3348652124 0.3027420044
+ 0.3495832980 0.3360829949 0.3039312065
+ 0.3508102000 0.3373039961 0.3051137030
+ 0.3520343006 0.3385266066 0.3062925041
+ 0.3532547951 0.3397471011 0.3074702024
+ 0.3544664085 0.3409624100 0.3086448014
+ 0.3556779921 0.3421775997 0.3098194897
+ 0.3568766117 0.3433755934 0.3109912872
+ 0.3580735922 0.3445712030 0.3121627867
+ 0.3592629135 0.3457629979 0.3133305013
+ 0.3604426980 0.3469501138 0.3144932091
+ 0.3616225123 0.3481371999 0.3156560063
+ 0.3627896905 0.3493269086 0.3168224096
+ 0.3639565110 0.3505167067 0.3179889917
+ 0.3651241064 0.3517034054 0.3191502094
+ 0.3662925065 0.3528864980 0.3203046918
+ 0.3674609065 0.3540695012 0.3214592934
+ 0.3686209023 0.3552398086 0.3226110041
+ 0.3697803020 0.3564088047 0.3237625062
+ 0.3709327877 0.3575739861 0.3249132931
+ 0.3720724881 0.3587315083 0.3260628879
+ 0.3732121885 0.3598890007 0.3272125125
+ 0.3743419051 0.3610461056 0.3283613026
+ 0.3754678965 0.3622029126 0.3295099139
+ 0.3765943944 0.3633604050 0.3306581080
+ 0.3777253032 0.3645246029 0.3318021894
+ 0.3788562119 0.3656888902 0.3329462111
+ 0.3799856901 0.3668493927 0.3340887129
+ 0.3811131120 0.3680044115 0.3352287114
+ 0.3822405040 0.3691594899 0.3363687098
+ 0.3833586872 0.3703058958 0.3375062048
+ 0.3844727874 0.3714483976 0.3386425078
+ 0.3855867982 0.3725908995 0.3397788107
+ 0.3867011964 0.3737317026 0.3409082890
+ 0.3878157139 0.3748725057 0.3420371115
+ 0.3889299929 0.3760136962 0.3431653976
+ 0.3900434077 0.3771579862 0.3442898989
+ 0.3911567926 0.3783023059 0.3454144001
+ 0.3922654092 0.3794414103 0.3465386033
+ 0.3933632076 0.3805679977 0.3476622999
+ 0.3944610059 0.3816947043 0.3487859070
+ 0.3955565989 0.3828161955 0.3499088883
+ 0.3966492116 0.3839308023 0.3510310948
+ 0.3977417946 0.3850454092 0.3521533012
+ 0.3988339901 0.3861593008 0.3532767892
+ 0.3999255896 0.3872723877 0.3544014096
+ 0.4010173082 0.3883855045 0.3555260003
+ 0.4021055102 0.3894925117 0.3566437066
+ 0.4031910896 0.3905951083 0.3577559888
+ 0.4042766988 0.3916975856 0.3588683009
+ 0.4053548872 0.3927960992 0.3599740863
+ 0.4064280987 0.3938918114 0.3610751033
+ 0.4075013101 0.3949874938 0.3621760905
+ 0.4085747004 0.3960804939 0.3632729053
+ 0.4096482992 0.3971712887 0.3643661141
+ 0.4107218087 0.3982622027 0.3654592037
+ 0.4117960930 0.3993507028 0.3665483892
+ 0.4128710926 0.4004369974 0.3676328957
+ 0.4139460921 0.4015232921 0.3687174916
+ 0.4150182009 0.4026117027 0.3698010147
+ 0.4160853922 0.4037036896 0.3708826005
+ 0.4171527028 0.4047957063 0.3719643056
+ 0.4182184935 0.4058865011 0.3730461895
+ 0.4192796946 0.4069728851 0.3741292059
+ 0.4203408957 0.4080593884 0.3752123117
+ 0.4214020073 0.4091454148 0.3762952089
+ 0.4224613011 0.4102149904 0.3773654103
+ 0.4235205054 0.4112845063 0.3784357011
+ 0.4245797992 0.4123539925 0.3795059025
+ 0.4256359935 0.4134182930 0.3805727065
+ 0.4266915023 0.4144811928 0.3816384077
+ 0.4277468920 0.4155440927 0.3827041090
+ 0.4287993014 0.4166063070 0.3837668896
+ 0.4298486114 0.4176676869 0.3848268092
+ 0.4308980107 0.4187290967 0.3858866096
+ 0.4319469929 0.4197882116 0.3869450092
+ 0.4329943061 0.4208357930 0.3879956901
+ 0.4340417087 0.4218834043 0.3890464008
+ 0.4350889921 0.4229309857 0.3900969923
+ 0.4361298084 0.4239682853 0.3911440074
+ 0.4371689856 0.4250029922 0.3921900094
+ 0.4382081926 0.4260376990 0.3932358921
+ 0.4392425120 0.4270702899 0.3942803144
+ 0.4402691126 0.4280996025 0.3953221142
+ 0.4412955940 0.4291290045 0.3963639140
+ 0.4423221946 0.4301582873 0.3974055946
+ 0.4433423877 0.4311893880 0.3984431028
+ 0.4443620145 0.4322207868 0.3994801044
+ 0.4453817010 0.4332520962 0.4005171955
+ 0.4464051127 0.4342832863 0.4015508890
+ 0.4474340975 0.4353140891 0.4025794864
+ 0.4484629929 0.4363448918 0.4036081135
+ 0.4494918883 0.4373758137 0.4046367109
+ 0.4505175948 0.4384073019 0.4056606889
+ 0.4515425861 0.4394389093 0.4066838920
+ 0.4525676072 0.4404704869 0.4077070057
+ 0.4535906017 0.4415003955 0.4087300897
+ 0.4546070099 0.4425247014 0.4097532928
+ 0.4556233883 0.4435490072 0.4107764065
+ 0.4566397965 0.4445734024 0.4117994905
+ 0.4576533139 0.4455991089 0.4128246903
+ 0.4586645961 0.4466257989 0.4138514996
+ 0.4596759081 0.4476524889 0.4148781896
+ 0.4606871903 0.4486792088 0.4159049988
+ 0.4616912901 0.4497005045 0.4169327021
+ 0.4626944065 0.4507211149 0.4179604948
+ 0.4636974931 0.4517416060 0.4189884067
+ 0.4646998942 0.4527609050 0.4200156033
+ 0.4656972885 0.4537692964 0.4210371971
+ 0.4666947126 0.4547776878 0.4220587909
+ 0.4676921070 0.4557861090 0.4230804145
+ 0.4686877131 0.4567916095 0.4241015017
+ 0.4696792960 0.4577902853 0.4251210093
+ 0.4706709981 0.4587889910 0.4261406064
+ 0.4716626108 0.4597877860 0.4271601140
+ 0.4726535082 0.4607864022 0.4281783998
+ 0.4736435115 0.4617848992 0.4291948974
+ 0.4746335149 0.4627833962 0.4302113950
+ 0.4756234884 0.4637818933 0.4312278926
+ 0.4766106009 0.4647786915 0.4322431087
+ 0.4775952101 0.4657739997 0.4332571924
+ 0.4785799086 0.4667693079 0.4342711866
+ 0.4795644879 0.4677644968 0.4352853000
+ 0.4805473983 0.4687533975 0.4362984002
+ 0.4815289080 0.4697372913 0.4373108149
+ 0.4825105071 0.4707211852 0.4383231103
+ 0.4834921062 0.4717051089 0.4393354952
+ 0.4844721854 0.4726847112 0.4403477013
+ 0.4854511917 0.4736607075 0.4413597882
+ 0.4864301980 0.4746366143 0.4423719049
+ 0.4874091148 0.4756126106 0.4433839917
+ 0.4883851111 0.4765883088 0.4443916976
+ 0.4893577993 0.4775637090 0.4453943074
+ 0.4903304875 0.4785391092 0.4463968873
+ 0.4913032055 0.4795145094 0.4473994076
+ 0.4922738075 0.4804913104 0.4484009147
+ 0.4932405055 0.4814707935 0.4494000971
+ 0.4942072034 0.4824503064 0.4503993094
+ 0.4951739907 0.4834297895 0.4513984025
+ 0.4961400926 0.4844071865 0.4523966908
+ 0.4971033931 0.4853728116 0.4533889890
+ 0.4980666041 0.4863384068 0.4543812871
+ 0.4990297854 0.4873039126 0.4553737044
+ 0.4999929965 0.4882695079 0.4563660026
+ 0.5009500980 0.4892266095 0.4573510885
+ 0.5019065142 0.4901829064 0.4583353102
+ 0.5028629899 0.4911391139 0.4593194127
+ 0.5038195252 0.4920954108 0.4603036046
+ 0.5047739148 0.4930514991 0.4612889886
+ 0.5057268739 0.4940074086 0.4622752070
+ 0.5066800117 0.4949632883 0.4632613957
+ 0.5076330900 0.4959192872 0.4642477036
+ 0.5085847974 0.4968729913 0.4652321041
+ 0.5095326900 0.4978204072 0.4662106931
+ 0.5104805231 0.4987677932 0.4671893120
+ 0.5114284158 0.4997152090 0.4681679010
+ 0.5123761892 0.5006626248 0.4691464901
+ 0.5133184791 0.5016015172 0.4701164067
+ 0.5142596960 0.5025386214 0.4710843861
+ 0.5152009130 0.5034757853 0.4720525146
+ 0.5161420703 0.5044130087 0.4730204940
+ 0.5170794725 0.5053501725 0.4739845991
+ 0.5180101991 0.5062875152 0.4749414027
+ 0.5189409852 0.5072247982 0.4758982956
+ 0.5198717117 0.5081620812 0.4768550992
+ 0.5208024979 0.5090993047 0.4778119028
+ 0.5217247009 0.5100327730 0.4787622094
+ 0.5226451755 0.5109654069 0.4797109962
+ 0.5235655904 0.5118979812 0.4806598127
+ 0.5244860053 0.5128306150 0.4816085100
+ 0.5254061222 0.5137627125 0.4825567007
+ 0.5263252258 0.5146926045 0.4835023880
+ 0.5272442102 0.5156226158 0.4844481051
+ 0.5281633139 0.5165526271 0.4853937924
+ 0.5290824175 0.5174825191 0.4863395095
+ 0.5299966931 0.5184153914 0.4872838855
+ 0.5309072733 0.5193507075 0.4882271886
+ 0.5318177938 0.5202859044 0.4891706109
+ 0.5327283740 0.5212211013 0.4901140034
+ 0.5336390138 0.5221564174 0.4910573065
+ 0.5345441103 0.5230833292 0.4919950068
+ 0.5354480147 0.5240085125 0.4929313958
+ 0.5363519788 0.5249336958 0.4938678145
+ 0.5372558832 0.5258588791 0.4948042035
+ 0.5381596088 0.5267838836 0.4957407117
+ 0.5390570760 0.5277035236 0.4966802001
+ 0.5399546027 0.5286231041 0.4976195991
+ 0.5408521295 0.5295426846 0.4985590875
+ 0.5417495966 0.5304622054 0.4994986057
+ 0.5426462889 0.5313823819 0.5004374981
+ 0.5435394049 0.5323048830 0.5013735890
+ 0.5444325805 0.5332273841 0.5023097992
+ 0.5453258157 0.5341498852 0.5032458901
+ 0.5462188721 0.5350723863 0.5041819811
+ 0.5471100807 0.5359948874 0.5051165819
+ 0.5479956269 0.5369172096 0.5060467720
+ 0.5488811731 0.5378395915 0.5069770217
+ 0.5497667789 0.5387619138 0.5079072118
+ 0.5506523848 0.5396841764 0.5088372827
+ 0.5515369177 0.5406029820 0.5097665787
+ 0.5524184704 0.5415124297 0.5106934905
+ 0.5533000827 0.5424216986 0.5116204023
+ 0.5541815758 0.5433310866 0.5125473142
+ 0.5550631881 0.5442404747 0.5134742260
+ 0.5559430122 0.5451484919 0.5144008994
+ 0.5568165183 0.5460516214 0.5153269768
+ 0.5576900840 0.5469545722 0.5162531734
+ 0.5585635900 0.5478577018 0.5171793103
+ 0.5594370961 0.5487607121 0.5181055069
+ 0.5603092909 0.5496640205 0.5190312862
+ 0.5611693859 0.5505691171 0.5199540257
+ 0.5620294809 0.5514742732 0.5208765864
+ 0.5628895760 0.5523794293 0.5217992067
+ 0.5637496710 0.5532845855 0.5227218866
+ 0.5646098852 0.5541896820 0.5236445069
+ 0.5654671192 0.5550884008 0.5245587230
+ 0.5663241148 0.5559865236 0.5254719853
+ 0.5671809912 0.5568845272 0.5263851881
+ 0.5680379868 0.5577825904 0.5272983909
+ 0.5688949227 0.5586807132 0.5282117128
+ 0.5697519183 0.5595684052 0.5291250944
+ 0.5706089139 0.5604503751 0.5300387144
+ 0.5714659095 0.5613324046 0.5309522748
+ 0.5723227859 0.5622143745 0.5318658948
+ 0.5731797814 0.5630964041 0.5327795148
+ 0.5740355849 0.5639759898 0.5336920023
+ 0.5748888254 0.5648500919 0.5346015096
+ 0.5757420063 0.5657241940 0.5355110765
+ 0.5765951872 0.5665982962 0.5364207029
+ 0.5774484873 0.5674723983 0.5373303294
+ 0.5783017278 0.5683465004 0.5382397771
+ 0.5791468024 0.5692207813 0.5391464233
+ 0.5799911022 0.5700951219 0.5400525928
+ 0.5808354020 0.5709695220 0.5409587026
+ 0.5816797018 0.5718438029 0.5418648720
+ 0.5825240016 0.5727180839 0.5427711010
+ 0.5833687782 0.5735895038 0.5436769128
+ 0.5842140913 0.5744568110 0.5445824265
+ 0.5850595236 0.5753241181 0.5454878807
+ 0.5859047771 0.5761914253 0.5463933945
+ 0.5867500901 0.5770586729 0.5472989082
+ 0.5875955224 0.5779259801 0.5482044220
+ 0.5884351730 0.5787826777 0.5491033792
+ 0.5892739892 0.5796378255 0.5500012040
+ 0.5901129246 0.5804927945 0.5508990288
+ 0.5909516811 0.5813478231 0.5517967939
+ 0.5917904973 0.5822029114 0.5526946187
+ 0.5926260948 0.5830556154 0.5535923243
+ 0.5934513211 0.5839005113 0.5544894934
+ 0.5942764282 0.5847454071 0.5553867221
+ 0.5951015949 0.5855903029 0.5562840104
+ 0.5959268212 0.5864353180 0.5571811795
+ 0.5967519283 0.5872802138 0.5580784082
+ 0.5975750089 0.5881240964 0.5589731932
+ 0.5983961225 0.5889670253 0.5598654747
+ 0.5992172956 0.5898098946 0.5607578158
+ 0.6000384092 0.5906528234 0.5616500974
+ 0.6008595824 0.5914956927 0.5625423789
+ 0.6016806960 0.5923386216 0.5634347200
+ 0.6025013924 0.5931785107 0.5643216968
+ 0.6033217907 0.5940173864 0.5652067065
+ 0.6041421890 0.5948563218 0.5660917163
+ 0.6049627066 0.5956951976 0.5669767261
+ 0.6057831049 0.5965340734 0.5678616762
+ 0.6066035032 0.5973730087 0.5687466860
+ 0.6074202061 0.5982081890 0.5696277022
+ 0.6082363725 0.5990427732 0.5705081224
+ 0.6090525985 0.5998774171 0.5713884830
+ 0.6098688245 0.6007121205 0.5722689033
+ 0.6106849909 0.6015467048 0.5731493235
+ 0.6115012169 0.6023812890 0.5740296841
+ 0.6123086214 0.6032109857 0.5749081969
+ 0.6131153107 0.6040402055 0.5757864714
+ 0.6139221191 0.6048694849 0.5766646862
+ 0.6147289276 0.6056988239 0.5775430202
+ 0.6155356765 0.6065281034 0.5784212947
+ 0.6163424850 0.6073573232 0.5792995095
+ 0.6171492934 0.6081854105 0.5801749825
+ 0.6179562211 0.6090133786 0.5810500979
+ 0.6187630296 0.6098414063 0.5819252133
+ 0.6195698977 0.6106693745 0.5828003287
+ 0.6203767061 0.6114974022 0.5836755037
+ 0.6211835742 0.6123253107 0.5845506191
+ 0.6219863296 0.6131554246 0.5854259729
+ 0.6227880716 0.6139858961 0.5863015056
+ 0.6235898733 0.6148164272 0.5871769786
+ 0.6243916750 0.6156468987 0.5880525112
+ 0.6251934767 0.6164774895 0.5889279842
+ 0.6259952784 0.6173080206 0.5898035169
+ 0.6267918944 0.6181306243 0.5906723738
+ 0.6275851727 0.6189482212 0.5915369987
+ 0.6283785105 0.6197658777 0.5924015045
+ 0.6291717887 0.6205834746 0.5932661295
+ 0.6299651265 0.6214010715 0.5941306949
+ 0.6307584047 0.6222187877 0.5949952006
+ 0.6315498948 0.6230332851 0.5958583951
+ 0.6323379278 0.6238421202 0.5967187881
+ 0.6331260204 0.6246507764 0.5975791812
+ 0.6339139938 0.6254594922 0.5984395146
+ 0.6347020268 0.6262683272 0.5992999077
+ 0.6354900002 0.6270769835 0.6001603007
+ 0.6362780929 0.6278856993 0.6010206938
+ 0.6370700002 0.6286913753 0.6018776298
+ 0.6378619075 0.6294969916 0.6027345061
+ 0.6386538148 0.6303027272 0.6035913825
+ 0.6394457817 0.6311082840 0.6044483185
+ 0.6402376890 0.6319140196 0.6053051949
+ 0.6410297155 0.6327196956 0.6061620116
+ 0.6418200135 0.6335238814 0.6070173979
+ 0.6426091194 0.6343269944 0.6078712940
+ 0.6433981061 0.6351301074 0.6087253094
+ 0.6441872120 0.6359332204 0.6095792055
+ 0.6449761987 0.6367362738 0.6104332209
+ 0.6457653046 0.6375393867 0.6112871170
+ 0.6465541720 0.6383423209 0.6121410131
+ 0.6473349929 0.6391350031 0.6129897237
+ 0.6481158733 0.6399276853 0.6138383746
+ 0.6488966942 0.6407204270 0.6146870852
+ 0.6496775150 0.6415132284 0.6155357957
+ 0.6504582763 0.6423059106 0.6163845062
+ 0.6512390971 0.6430985928 0.6172332168
+ 0.6520215869 0.6438899040 0.6180806756
+ 0.6528064013 0.6446790099 0.6189264059
+ 0.6535912752 0.6454681754 0.6197721958
+ 0.6543760896 0.6462572813 0.6206179261
+ 0.6551610231 0.6470463872 0.6214635968
+ 0.6559458971 0.6478356123 0.6223093271
+ 0.6567307115 0.6486247182 0.6231549978
+ 0.6575127840 0.6494132280 0.6240007281
+ 0.6582934856 0.6502012014 0.6248463988
+ 0.6590741873 0.6509892941 0.6256921291
+ 0.6598550081 0.6517773867 0.6265377998
+ 0.6606357098 0.6525654793 0.6273834109
+ 0.6614164114 0.6533535719 0.6282290816
+ 0.6621971726 0.6541417241 0.6290748119
+ 0.6629760265 0.6549354196 0.6299114823
+ 0.6637545228 0.6557300091 0.6307469010
+ 0.6645330787 0.6565244794 0.6315823197
+ 0.6653115749 0.6573191285 0.6324176788
+ 0.6660900712 0.6581135988 0.6332530975
+ 0.6668686867 0.6589081883 0.6340885758
+ 0.6676471829 0.6597027183 0.6349239945
+ 0.6684235930 0.6604955792 0.6357483864
+ 0.6691998839 0.6612884998 0.6365724802
+ 0.6699762940 0.6620813012 0.6373966932
+ 0.6707525849 0.6628742218 0.6382207870
+ 0.6715289950 0.6636670232 0.6390450001
+ 0.6723052859 0.6644598842 0.6398692131
+ 0.6730816960 0.6652526855 0.6406933069
+ 0.6738588214 0.6660354733 0.6415144801
+ 0.6746358275 0.6668183208 0.6423355937
+ 0.6754128933 0.6676011086 0.6431567073
+ 0.6761900187 0.6683838964 0.6439778209
+ 0.6769670844 0.6691666842 0.6447988749
+ 0.6777442098 0.6699494123 0.6456201077
+ 0.6785212159 0.6707322001 0.6464412212
+ 0.6792948246 0.6715126038 0.6472591758
+ 0.6800680757 0.6722927094 0.6480770111
+ 0.6808413863 0.6730728745 0.6488947272
+ 0.6816146970 0.6738529801 0.6497125030
+ 0.6823881269 0.6746330857 0.6505302191
+ 0.6831613779 0.6754133105 0.6513479948
+ 0.6839346886 0.6761934161 0.6521657705
+ 0.6847041249 0.6769770980 0.6529843807
+ 0.6854723096 0.6777619720 0.6538034081
+ 0.6862404943 0.6785469055 0.6546223760
+ 0.6870086193 0.6793317199 0.6554414034
+ 0.6877768040 0.6801165938 0.6562603116
+ 0.6885449886 0.6809015274 0.6570792794
+ 0.6893131137 0.6816864014 0.6578983068
+ 0.6900815964 0.6824722290 0.6587166190
+ 0.6908504963 0.6832591295 0.6595342159
+ 0.6916193962 0.6840459108 0.6603516936
+ 0.6923881769 0.6848328114 0.6611691713
+ 0.6931570768 0.6856197119 0.6619867086
+ 0.6939259768 0.6864064932 0.6628043056
+ 0.6946948171 0.6871933937 0.6636217833
+ 0.6954628825 0.6879794002 0.6644390821
+ 0.6962239146 0.6887571216 0.6652535796
+ 0.6969848275 0.6895347238 0.6660680771
+ 0.6977458000 0.6903123856 0.6668826938
+ 0.6985067725 0.6910901070 0.6676971912
+ 0.6992678046 0.6918678284 0.6685116887
+ 0.7000287175 0.6926453710 0.6693261862
+ 0.7007896900 0.6934230924 0.6701408029
+ 0.7015470862 0.6941987276 0.6709529757
+ 0.7023022771 0.6949729919 0.6717637181
+ 0.7030575275 0.6957471967 0.6725745201
+ 0.7038127184 0.6965215206 0.6733852029
+ 0.7045679092 0.6972957850 0.6741960049
+ 0.7053231001 0.6980701089 0.6750066876
+ 0.7060784101 0.6988443136 0.6758173704
+ 0.7068333030 0.6996185780 0.6766281128
+ 0.7075828910 0.7003933787 0.6774358153
+ 0.7083325982 0.7011681199 0.6782433987
+ 0.7090821862 0.7019429207 0.6790511012
+ 0.7098318934 0.7027176023 0.6798588037
+ 0.7105816007 0.7034922838 0.6806665063
+ 0.7113311887 0.7042670846 0.6814742088
+ 0.7120808959 0.7050418258 0.6822819114
+ 0.7128294110 0.7058115005 0.6830887198
+ 0.7135760784 0.7065724730 0.6838940978
+ 0.7143228054 0.7073335052 0.6846994758
+ 0.7150694132 0.7080944777 0.6855047941
+ 0.7158160806 0.7088556290 0.6863101721
+ 0.7165628076 0.7096166015 0.6871154904
+ 0.7173094749 0.7103775740 0.6879209280
+ 0.7180560827 0.7111386061 0.6887263060
+ 0.7187995911 0.7118936777 0.6895337105
+ 0.7195408940 0.7126445174 0.6903426051
+ 0.7202820778 0.7133952975 0.6911514997
+ 0.7210233808 0.7141461968 0.6919603944
+ 0.7217646241 0.7148969769 0.6927692890
+ 0.7225059271 0.7156478763 0.6935781837
+ 0.7232471704 0.7163987160 0.6943870783
+ 0.7239884138 0.7171496153 0.6951959729
+ 0.7247272134 0.7178981900 0.6960002184
+ 0.7254649997 0.7186459899 0.6968023777
+ 0.7262027860 0.7193936706 0.6976047158
+ 0.7269405723 0.7201414108 0.6984068751
+ 0.7276784182 0.7208890915 0.6992090940
+ 0.7284160852 0.7216367722 0.7000113130
+ 0.7291538715 0.7223845124 0.7008134723
+ 0.7298917174 0.7231323123 0.7016156912
+ 0.7306271195 0.7238802910 0.7024155259
+ 0.7313616276 0.7246286273 0.7032142282
+ 0.7320960760 0.7253767848 0.7040128708
+ 0.7328305244 0.7261251211 0.7048115730
+ 0.7335649729 0.7268732786 0.7056102753
+ 0.7342994809 0.7276216149 0.7064089775
+ 0.7350339890 0.7283697724 0.7072076797
+ 0.7357683778 0.7291179895 0.7080063820
+ 0.7364991903 0.7298579812 0.7088025808
+ 0.7372276783 0.7305926085 0.7095971107
+ 0.7379561067 0.7313271761 0.7103915811
+ 0.7386844754 0.7320618033 0.7111861110
+ 0.7394129038 0.7327963710 0.7119805217
+ 0.7401413918 0.7335309982 0.7127749920
+ 0.7408698201 0.7342656255 0.7135695219
+ 0.7415981889 0.7350000739 0.7143639922
+ 0.7423244119 0.7357305884 0.7151564956
+ 0.7430471778 0.7364547253 0.7159457207
+ 0.7437700033 0.7371786833 0.7167348862
+ 0.7444928288 0.7379027009 0.7175241113
+ 0.7452155948 0.7386267781 0.7183133960
+ 0.7459384203 0.7393507957 0.7191026211
+ 0.7466611862 0.7400748730 0.7198917866
+ 0.7473840117 0.7407988906 0.7206810117
+ 0.7481065989 0.7415227294 0.7214697003
+ 0.7488253713 0.7422428727 0.7222498059
+ 0.7495442033 0.7429631948 0.7230297923
+ 0.7502629757 0.7436835170 0.7238097787
+ 0.7509818077 0.7444037199 0.7245898843
+ 0.7517006993 0.7451239824 0.7253698707
+ 0.7524194717 0.7458441854 0.7261499763
+ 0.7531383038 0.7465645075 0.7269300222
+ 0.7538570762 0.7472847104 0.7277100086
+ 0.7545717955 0.7480040193 0.7284893990
+ 0.7552838922 0.7487226725 0.7292684913
+ 0.7559961081 0.7494413853 0.7300475240
+ 0.7567083240 0.7501600981 0.7308264971
+ 0.7574204206 0.7508788109 0.7316055894
+ 0.7581325769 0.7515975237 0.7323846221
+ 0.7588447928 0.7523161769 0.7331635952
+ 0.7595570087 0.7530348897 0.7339426875
+ 0.7602682710 0.7537531853 0.7347213030
+ 0.7609707117 0.7544673085 0.7354943752
+ 0.7616729736 0.7551813126 0.7362675071
+ 0.7623752952 0.7558953166 0.7370406985
+ 0.7630776167 0.7566093802 0.7378137708
+ 0.7637799978 0.7573233843 0.7385869026
+ 0.7644823194 0.7580373883 0.7393599749
+ 0.7651845813 0.7587515116 0.7401331067
+ 0.7658869028 0.7594655156 0.7409062982
+ 0.7665888071 0.7601786256 0.7416762710
+ 0.7672901750 0.7608903050 0.7424415946
+ 0.7679914832 0.7616019845 0.7432069182
+ 0.7686929107 0.7623137236 0.7439723015
+ 0.7693942189 0.7630254030 0.7447376251
+ 0.7700955868 0.7637370825 0.7455030084
+ 0.7707968950 0.7644488811 0.7462682724
+ 0.7714983225 0.7651606202 0.7470335960
+ 0.7721995711 0.7658722997 0.7477989793
+ 0.7729007006 0.7665820122 0.7485641241
+ 0.7736015916 0.7672904134 0.7493289709
+ 0.7743026018 0.7679988742 0.7500939965
+ 0.7750034928 0.7687073946 0.7508589029
+ 0.7757043839 0.7694157958 0.7516239285
+ 0.7764053941 0.7701243162 0.7523887753
+ 0.7771062851 0.7708327174 0.7531538010
+ 0.7778071761 0.7715411782 0.7539188266
+ 0.7785081267 0.7722496986 0.7546836734
+ 0.7792059779 0.7729594111 0.7554478049
+ 0.7799026966 0.7736696005 0.7562115788
+ 0.7805994153 0.7743797898 0.7569754124
+ 0.7812960744 0.7750899196 0.7577391863
+ 0.7819927931 0.7758001089 0.7585030198
+ 0.7826895118 0.7765102983 0.7592667937
+ 0.7833861709 0.7772204876 0.7600306273
+ 0.7840828896 0.7779306769 0.7607944012
+ 0.7847796082 0.7786409259 0.7615581751
+ 0.7854750156 0.7793545127 0.7623156905
+ 0.7861698866 0.7800694704 0.7630702257
+ 0.7868646979 0.7807846069 0.7638248205
+ 0.7875596285 0.7814996243 0.7645792961
+ 0.7882543802 0.7822147012 0.7653338909
+ 0.7889491916 0.7829297185 0.7660884261
+ 0.7896441221 0.7836447954 0.7668430209
+ 0.7903388739 0.7843598127 0.7675974965
+ 0.7910338044 0.7850748897 0.7683520913
+ 0.7917258739 0.7857853770 0.7691050172
+ 0.7924156785 0.7864919901 0.7698563933
+ 0.7931054831 0.7871986032 0.7706078887
+ 0.7937952876 0.7879050970 0.7713593245
+ 0.7944852114 0.7886117101 0.7721108198
+ 0.7951750159 0.7893183231 0.7728621960
+ 0.7958648205 0.7900248766 0.7736136913
+ 0.7965546250 0.7907314897 0.7743651271
+ 0.7972444296 0.7914381027 0.7751166224
+ 0.7979317904 0.7921432853 0.7758662105
+ 0.7986127138 0.7928448915 0.7766107917
+ 0.7992935777 0.7935463786 0.7773553729
+ 0.7999745011 0.7942479253 0.7781000733
+ 0.8006554246 0.7949494123 0.7788447142
+ 0.8013362885 0.7956508994 0.7795892954
+ 0.8020172119 0.7963523865 0.7803338766
+ 0.8026980758 0.7970538735 0.7810785174
+ 0.8033789992 0.7977554798 0.7818232179
+ 0.8040599227 0.7984570265 0.7825677991
+ 0.8047353029 0.7991585135 0.7833089828
+ 0.8054097891 0.7998598814 0.7840498090
+ 0.8060843945 0.8005614281 0.7847905159
+ 0.8067588806 0.8012629151 0.7855312228
+ 0.8074334264 0.8019642830 0.7862719893
+ 0.8081079721 0.8026658297 0.7870126963
+ 0.8087825179 0.8033673167 0.7877534032
+ 0.8094571233 0.8040686846 0.7884941101
+ 0.8101316094 0.8047701716 0.7892348766
+ 0.8108057976 0.8054717779 0.7899757028
+ 0.8114792705 0.8061736822 0.7907167077
+ 0.8121528029 0.8068755865 0.7914577127
+ 0.8128262758 0.8075774908 0.7921987772
+ 0.8134996891 0.8082793951 0.7929397821
+ 0.8141732216 0.8089812994 0.7936807871
+ 0.8148466945 0.8096832037 0.7944217920
+ 0.8155202270 0.8103851080 0.7951627970
+ 0.8161935806 0.8110868931 0.7959039211
+ 0.8168671131 0.8117887974 0.7966449261
+ 0.8175389767 0.8124853969 0.7973858118
+ 0.8182101250 0.8131793737 0.7981265783
+ 0.8188812733 0.8138735294 0.7988674045
+ 0.8195524216 0.8145676255 0.7996081710
+ 0.8202236295 0.8152617216 0.8003489971
+ 0.8208947182 0.8159558177 0.8010898232
+ 0.8215658069 0.8166497946 0.8018305898
+ 0.8222370148 0.8173438907 0.8025714159
+ 0.8229081035 0.8180379868 0.8033121824
+ 0.8235793114 0.8187320828 0.8040530086
+ 0.8242446780 0.8194221854 0.8047931194
+ 0.8249096274 0.8201119900 0.8055329919
+ 0.8255745173 0.8208016753 0.8062729836
+ 0.8262394071 0.8214914203 0.8070129156
+ 0.8269042969 0.8221811056 0.8077529073
+ 0.8275691867 0.8228709102 0.8084927797
+ 0.8282340169 0.8235605955 0.8092327714
+ 0.8288989067 0.8242502809 0.8099727035
+ 0.8295637965 0.8249400258 0.8107126951
+ 0.8302286863 0.8256297708 0.8114526272
+ 0.8308899999 0.8263183832 0.8121870756
+ 0.8315511942 0.8270071149 0.8129215240
+ 0.8322123885 0.8276957870 0.8136559129
+ 0.8328735828 0.8283843994 0.8143903017
+ 0.8335347772 0.8290730715 0.8151246905
+ 0.8341959715 0.8297618032 0.8158590198
+ 0.8348572254 0.8304504156 0.8165934086
+ 0.8355184197 0.8311390877 0.8173277974
+ 0.8361796141 0.8318278193 0.8180621862
+ 0.8368408084 0.8325163722 0.8187965751
+ 0.8374971747 0.8331937194 0.8195257187
+ 0.8381533027 0.8338699937 0.8202543855
+ 0.8388093710 0.8345463872 0.8209831119
+ 0.8394654989 0.8352227807 0.8217117190
+ 0.8401216269 0.8358991742 0.8224403858
+ 0.8407776952 0.8365755081 0.8231691122
+ 0.8414338231 0.8372519016 0.8238977790
+ 0.8420898914 0.8379282951 0.8246265054
+ 0.8427460194 0.8386046886 0.8253551722
+ 0.8434020877 0.8392810822 0.8260837793
+ 0.8440536261 0.8399528265 0.8268138170
+ 0.8447033763 0.8406227827 0.8275440931
+ 0.8453533053 0.8412929177 0.8282744884
+ 0.8460031152 0.8419629931 0.8290048838
+ 0.8466529846 0.8426330090 0.8297352195
+ 0.8473027945 0.8433030844 0.8304656148
+ 0.8479527235 0.8439732194 0.8311958909
+ 0.8486024737 0.8446431756 0.8319262862
+ 0.8492524028 0.8453133106 0.8326566815
+ 0.8499022126 0.8459833860 0.8333870173
+ 0.8505504727 0.8466514945 0.8341168165
+ 0.8511967063 0.8473168015 0.8348454833
+ 0.8518428206 0.8479821086 0.8355743289
+ 0.8524889946 0.8486474156 0.8363031149
+ 0.8531351089 0.8493127227 0.8370317817
+ 0.8537812829 0.8499780297 0.8377606273
+ 0.8544273973 0.8506432772 0.8384894133
+ 0.8550735712 0.8513085842 0.8392181993
+ 0.8557196856 0.8519738913 0.8399469256
+ 0.8563657999 0.8526391983 0.8406757116
+ 0.8570119739 0.8533045053 0.8414044976
+ 0.8576570153 0.8539714217 0.8421310186
+ 0.8583019972 0.8546383977 0.8428574204
+ 0.8589469790 0.8553053737 0.8435838223
+ 0.8595920205 0.8559722900 0.8443102241
+ 0.8602368832 0.8566393256 0.8450366259
+ 0.8608819246 0.8573063016 0.8457630277
+ 0.8615269065 0.8579732180 0.8464894295
+ 0.8621718884 0.8586401939 0.8472157717
+ 0.8628168702 0.8593072295 0.8479421139
+ 0.8634617925 0.8599740863 0.8486685157
+ 0.8641055226 0.8606404066 0.8493939042
+ 0.8647466898 0.8613052964 0.8501170874
+ 0.8653877974 0.8619701266 0.8508402705
+ 0.8660289049 0.8626350164 0.8515635729
+ 0.8666700125 0.8632999063 0.8522868156
+ 0.8673111796 0.8639646769 0.8530099988
+ 0.8679522872 0.8646296263 0.8537331820
+ 0.8685933948 0.8652945161 0.8544564843
+ 0.8692345023 0.8659592867 0.8551797271
+ 0.8698757291 0.8666241765 0.8559029102
+ 0.8705167770 0.8672891259 0.8566260934
+ 0.8711531758 0.8679519296 0.8573492169
+ 0.8717862964 0.8686133027 0.8580722213
+ 0.8724194169 0.8692746758 0.8587951064
+ 0.8730524182 0.8699361086 0.8595181108
+ 0.8736854792 0.8705974221 0.8602411151
+ 0.8743184805 0.8712587953 0.8609640002
+ 0.8749516010 0.8719202280 0.8616870046
+ 0.8755847216 0.8725816011 0.8624100089
+ 0.8762177229 0.8732429147 0.8631328940
+ 0.8768507838 0.8739042878 0.8638558984
+ 0.8774839044 0.8745657206 0.8645789027
+ 0.8781164885 0.8752220869 0.8652966022
+ 0.8787490129 0.8758761287 0.8660116792
+ 0.8793814778 0.8765301108 0.8667268157
+ 0.8800138831 0.8771839738 0.8674418926
+ 0.8806464076 0.8778380156 0.8681570888
+ 0.8812788725 0.8784919977 0.8688722253
+ 0.8819113970 0.8791459799 0.8695873022
+ 0.8825438023 0.8798000216 0.8703024983
+ 0.8831763268 0.8804540038 0.8710175753
+ 0.8838087916 0.8811079860 0.8717327118
+ 0.8844413161 0.8817619085 0.8724479079
+ 0.8850709200 0.8824151754 0.8731632233
+ 0.8856989741 0.8830680847 0.8738787770
+ 0.8863270283 0.8837209940 0.8745942712
+ 0.8869550824 0.8843739033 0.8753098845
+ 0.8875830770 0.8850268126 0.8760253787
+ 0.8882111907 0.8856797218 0.8767408729
+ 0.8888391852 0.8863325715 0.8774564862
+ 0.8894672990 0.8869854808 0.8781719804
+ 0.8900952935 0.8876383901 0.8788874745
+ 0.8907234073 0.8882912993 0.8796030879
+ 0.8913514018 0.8889442086 0.8803185821
+ 0.8919770122 0.8895980120 0.8810324073
+ 0.8925994039 0.8902531266 0.8817437887
+ 0.8932216763 0.8909081221 0.8824552298
+ 0.8938440084 0.8915631771 0.8831664920
+ 0.8944662809 0.8922182918 0.8838778734
+ 0.8950886130 0.8928732872 0.8845893145
+ 0.8957110047 0.8935284019 0.8853006959
+ 0.8963332772 0.8941833973 0.8860120773
+ 0.8969556093 0.8948385119 0.8867235184
+ 0.8975778818 0.8954935074 0.8874347806
+ 0.8982002735 0.8961486220 0.8881462216
+ 0.8988224864 0.8968032002 0.8888574839
+ 0.8994441032 0.8974525928 0.8895666003
+ 0.9000657201 0.8981019258 0.8902757764
+ 0.9006872773 0.8987513185 0.8909850121
+ 0.9013088942 0.8994005919 0.8916941881
+ 0.9019305110 0.9000499845 0.8924034238
+ 0.9025521278 0.9006993771 0.8931125998
+ 0.9031736851 0.9013487101 0.8938217759
+ 0.9037953019 0.9019981027 0.8945308924
+ 0.9044169188 0.9026473761 0.8952401280
+ 0.9050384760 0.9032968283 0.8959493041
+ 0.9056600928 0.9039461017 0.8966584802
+ 0.9062818885 0.9045925736 0.8973668218
+ 0.9069039822 0.9052367806 0.8980745077
+ 0.9075260162 0.9058809876 0.8987820745
+ 0.9081479907 0.9065251946 0.8994898200
+ 0.9087700844 0.9071695209 0.9001973867
+ 0.9093921185 0.9078137279 0.9009050727
+ 0.9100140929 0.9084578753 0.9016128182
+ 0.9106361866 0.9091020823 0.9023203850
+ 0.9112582207 0.9097462893 0.9030280709
+ 0.9118801951 0.9103906155 0.9037356973
+ 0.9125022888 0.9110348225 0.9044433832
+ 0.9131243229 0.9116790295 0.9051510096
+ 0.9137399197 0.9123209715 0.9058520794
+ 0.9143548012 0.9129626751 0.9065523744
+ 0.9149696827 0.9136044979 0.9072527885
+ 0.9155846834 0.9142462015 0.9079532027
+ 0.9161996245 0.9148880243 0.9086536169
+ 0.9168145061 0.9155297875 0.9093539715
+ 0.9174293876 0.9161714911 0.9100543261
+ 0.9180443883 0.9168133140 0.9107546806
+ 0.9186593294 0.9174550176 0.9114550948
+ 0.9192742109 0.9180967808 0.9121555090
+ 0.9198892117 0.9187384844 0.9128558040
+ 0.9205033779 0.9193800092 0.9135550857
+ 0.9211103916 0.9200189710 0.9142435193
+ 0.9217175245 0.9206579924 0.9149317741
+ 0.9223244786 0.9212968946 0.9156202078
+ 0.9229314923 0.9219359159 0.9163085222
+ 0.9235386252 0.9225748777 0.9169968963
+ 0.9241455793 0.9232137799 0.9176852107
+ 0.9247527122 0.9238528013 0.9183735847
+ 0.9253597260 0.9244918227 0.9190618992
+ 0.9259667993 0.9251307845 0.9197502732
+ 0.9265738130 0.9257696867 0.9204387069
+ 0.9271808863 0.9264087081 0.9211270213
+ 0.9277874231 0.9270467758 0.9218143225
+ 0.9283900261 0.9276784062 0.9224932790
+ 0.9289926887 0.9283099771 0.9231721759
+ 0.9295952916 0.9289416075 0.9238511920
+ 0.9301978946 0.9295731783 0.9245300889
+ 0.9308004975 0.9302048087 0.9252091050
+ 0.9314031005 0.9308363795 0.9258880019
+ 0.9320058227 0.9314680099 0.9265670180
+ 0.9326084256 0.9320995212 0.9272459149
+ 0.9332110286 0.9327310920 0.9279248714
+ 0.9338135719 0.9333627224 0.9286038876
+ 0.9344161749 0.9339942932 0.9292827845
+ 0.9350188971 0.9346259236 0.9299618006
+ 0.9356135726 0.9352514148 0.9306330085
+ 0.9362081289 0.9358767867 0.9313039184
+ 0.9368026257 0.9365020990 0.9319748878
+ 0.9373971820 0.9371274710 0.9326457977
+ 0.9379916787 0.9377527833 0.9333167076
+ 0.9385861754 0.9383780956 0.9339876771
+ 0.9391806722 0.9390035272 0.9346585870
+ 0.9397752285 0.9396287799 0.9353296161
+ 0.9403697252 0.9402542114 0.9360005260
+ 0.9409642816 0.9408795238 0.9366714954
+ 0.9415587783 0.9415047765 0.9373424053
+ 0.9421532750 0.9421302080 0.9380133748
+ 0.9427425861 0.9427515268 0.9386783242
+ 0.9433292150 0.9433708787 0.9393401742
+ 0.9439157844 0.9439901710 0.9400020242
+ 0.9445024133 0.9446095824 0.9406638741
+ 0.9450889826 0.9452288747 0.9413257837
+ 0.9456756115 0.9458482265 0.9419876933
+ 0.9462621808 0.9464675784 0.9426494837
+ 0.9468489289 0.9470868707 0.9433113933
+ 0.9474354982 0.9477062821 0.9439733028
+ 0.9480221272 0.9483255744 0.9446350932
+ 0.9486086965 0.9489449263 0.9452970028
+ 0.9491953254 0.9495642781 0.9459589124
+ 0.9497808814 0.9501816034 0.9466190934
+ 0.9503620863 0.9507901073 0.9472720027
+ 0.9509434104 0.9513986707 0.9479249120
+ 0.9515246153 0.9520071745 0.9485778809
+ 0.9521058798 0.9526157975 0.9492307901
+ 0.9526870847 0.9532243013 0.9498836994
+ 0.9532684088 0.9538329244 0.9505366087
+ 0.9538496137 0.9544414878 0.9511895776
+ 0.9544308782 0.9550499916 0.9518424869
+ 0.9550120831 0.9556586146 0.9524953961
+ 0.9555934072 0.9562671185 0.9531484246
+ 0.9561746120 0.9568756819 0.9538012743
+ 0.9567558765 0.9574841857 0.9544541836
+ 0.9573335052 0.9580839872 0.9551010728
+ 0.9579079747 0.9586765170 0.9557430148
+ 0.9584826231 0.9592689872 0.9563847780
+ 0.9590572119 0.9598613977 0.9570267200
+ 0.9596316814 0.9604539275 0.9576684833
+ 0.9602062702 0.9610463977 0.9583104253
+ 0.9607809186 0.9616388083 0.9589521885
+ 0.9613553882 0.9622312784 0.9595940709
+ 0.9619299769 0.9628238082 0.9602360129
+ 0.9625046253 0.9634162784 0.9608777761
+ 0.9630790949 0.9640086889 0.9615197182
+ 0.9636536837 0.9646012187 0.9621614814
+ 0.9642282724 0.9651936889 0.9628034234
+ 0.9647949934 0.9657722712 0.9634308219
+ 0.9653589129 0.9663459063 0.9640529156
+ 0.9659227133 0.9669194818 0.9646750093
+ 0.9664865732 0.9674929976 0.9652972221
+ 0.9670504928 0.9680665731 0.9659193158
+ 0.9676142931 0.9686402082 0.9665414095
+ 0.9681782126 0.9692137837 0.9671635032
+ 0.9687420726 0.9697872996 0.9677855968
+ 0.9693059921 0.9703608751 0.9684076905
+ 0.9698697925 0.9709345102 0.9690297842
+ 0.9704337120 0.9715080857 0.9696519971
+ 0.9709975719 0.9720816016 0.9702740908
+ 0.9715613723 0.9726551771 0.9708961844
+ 0.9721186161 0.9732081294 0.9714968801
+ 0.9726734757 0.9737539291 0.9720901847
+ 0.9732283950 0.9742997289 0.9726834893
+ 0.9737833142 0.9748454094 0.9732767940
+ 0.9743381739 0.9753912091 0.9738700986
+ 0.9748930931 0.9759370089 0.9744634032
+ 0.9754480124 0.9764826894 0.9750567079
+ 0.9760028720 0.9770284891 0.9756498933
+ 0.9765577912 0.9775742888 0.9762431979
+ 0.9771127105 0.9781200290 0.9768365026
+ 0.9776676297 0.9786658287 0.9774298072
+ 0.9782224894 0.9792116284 0.9780231118
+ 0.9787774086 0.9797573090 0.9786164165
+ 0.9793238044 0.9802883863 0.9791917205
+ 0.9798640013 0.9808087945 0.9797537923
+ 0.9804041982 0.9813292027 0.9803159237
+ 0.9809442759 0.9818496108 0.9808779955
+ 0.9814844728 0.9823700190 0.9814401269
+ 0.9820247293 0.9828904271 0.9820021987
+ 0.9825649261 0.9834107757 0.9825642705
+ 0.9831050038 0.9839311838 0.9831264019
+ 0.9836452007 0.9844515920 0.9836884737
+ 0.9841853976 0.9849720001 0.9842506051
+ 0.9847255945 0.9854924083 0.9848126769
+ 0.9852656722 0.9860128760 0.9853748083
+ 0.9858059287 0.9865332842 0.9859368205
+ 0.9863404036 0.9870470166 0.9864904881
+ 0.9868565202 0.9875389934 0.9870164990
+ 0.9873725176 0.9880309105 0.9875423908
+ 0.9878885150 0.9885228872 0.9880682826
+ 0.9884045124 0.9890148044 0.9885942936
+ 0.9889205098 0.9895067811 0.9891201854
+ 0.9894366264 0.9899986982 0.9896460772
+ 0.9899526238 0.9904906750 0.9901720881
+ 0.9904686213 0.9909825921 0.9906979799
+ 0.9909846187 0.9914746284 0.9912238717
+ 0.9915006161 0.9919664860 0.9917498827
+ 0.9920166731 0.9924585223 0.9922757745
+ 0.9925326705 0.9929504991 0.9928017855
+ 0.9930487275 0.9934424162 0.9933276772
+ 0.9935505986 0.9939172864 0.9938179255
+ 0.9940466881 0.9943851829 0.9942935109
+ 0.9945427775 0.9948530793 0.9947689772
+ 0.9950389266 0.9953209758 0.9952446222
+ 0.9955350161 0.9957888722 0.9957200885
+ 0.9960311055 0.9962568283 0.9961956739
+ 0.9965273142 0.9967247248 0.9966711998
+ 0.9970234036 0.9971926212 0.9971467257
+ 0.9975194931 0.9976605177 0.9976223111
+ 0.9980155826 0.9981284142 0.9980977774
+ 0.9985116720 0.9985963106 0.9985734224
+ 0.9990078211 0.9990642071 0.9990488887
+ 0.9995039105 0.9995321035 0.9995244741
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/kodak_portra_400nc.spi1d b/release/datafiles/colormanagement/luts/film_response/kodak_portra_400nc.spi1d
new file mode 100644
index 00000000000..b475f263b36
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/kodak_portra_400nc.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0114686396 0.0107471403 0.0087564439
+ 0.0217512399 0.0202643294 0.0160814300
+ 0.0303464700 0.0281717796 0.0221705399
+ 0.0377242714 0.0349318609 0.0275946204
+ 0.0443095490 0.0409396514 0.0324226208
+ 0.0503021218 0.0464737117 0.0369786993
+ 0.0558728315 0.0517093204 0.0412629806
+ 0.0610256903 0.0566021390 0.0452965386
+ 0.0659263134 0.0612265393 0.0491837002
+ 0.0706434101 0.0656422004 0.0528963394
+ 0.0751574785 0.0698595867 0.0564641915
+ 0.0794606581 0.0738903284 0.0599343516
+ 0.0835847408 0.0778156295 0.0632929727
+ 0.0876147822 0.0816217065 0.0665517896
+ 0.0915386677 0.0853431597 0.0697500929
+ 0.0953285396 0.0889591500 0.0728649125
+ 0.0989516675 0.0924931094 0.0759018511
+ 0.1024663970 0.0958689004 0.0788350999
+ 0.1058961004 0.0991332605 0.0816867501
+ 0.1092602983 0.1023299024 0.0844683573
+ 0.1125695035 0.1054401994 0.0872167125
+ 0.1157974973 0.1085370034 0.0899668783
+ 0.1189695969 0.1115973964 0.0926889405
+ 0.1221098974 0.1145918965 0.0953712016
+ 0.1251875013 0.1175365001 0.0979943499
+ 0.1281960011 0.1204660982 0.1005420014
+ 0.1311468929 0.1233218014 0.1030569002
+ 0.1340449005 0.1260855943 0.1055212021
+ 0.1368933022 0.1287900954 0.1079170033
+ 0.1396844983 0.1314754933 0.1103053018
+ 0.1424379051 0.1341181993 0.1126656979
+ 0.1451424062 0.1367079020 0.1150159985
+ 0.1478171945 0.1392980963 0.1173409969
+ 0.1504548937 0.1418841928 0.1196570992
+ 0.1530500054 0.1444393992 0.1219561994
+ 0.1555911005 0.1469538957 0.1242327988
+ 0.1581020057 0.1494355053 0.1264850050
+ 0.1605874002 0.1518718004 0.1287028939
+ 0.1630426943 0.1542987972 0.1308919936
+ 0.1654826999 0.1566974074 0.1330559999
+ 0.1679003984 0.1590469033 0.1351830959
+ 0.1703007966 0.1613458991 0.1372949034
+ 0.1726765931 0.1636165977 0.1393575966
+ 0.1750312001 0.1658513993 0.1414173990
+ 0.1773743033 0.1680632979 0.1434593946
+ 0.1796950996 0.1702526957 0.1454783976
+ 0.1819853038 0.1724139005 0.1474941969
+ 0.1842298955 0.1745467931 0.1494760960
+ 0.1864486933 0.1766640991 0.1514540017
+ 0.1886311024 0.1787831932 0.1534274966
+ 0.1907832026 0.1809104979 0.1553764045
+ 0.1929026991 0.1830410957 0.1573255062
+ 0.1950244009 0.1851601005 0.1592600048
+ 0.1971314996 0.1872643977 0.1611716002
+ 0.1992381066 0.1893534064 0.1630840003
+ 0.2013241053 0.1914180070 0.1649879962
+ 0.2034000009 0.1934722960 0.1668666005
+ 0.2054556012 0.1955029964 0.1687465012
+ 0.2074957937 0.1975183934 0.1706251055
+ 0.2095358968 0.1995349973 0.1724743992
+ 0.2115648985 0.2015223950 0.1743170023
+ 0.2135839015 0.2034906000 0.1761588007
+ 0.2155832052 0.2054294050 0.1779755950
+ 0.2175676972 0.2073418945 0.1797723025
+ 0.2195197046 0.2092444003 0.1815697998
+ 0.2214522064 0.2111348063 0.1833599955
+ 0.2233704031 0.2130120993 0.1851364970
+ 0.2252652049 0.2148773074 0.1868986040
+ 0.2271434069 0.2167267948 0.1886556000
+ 0.2290212065 0.2185603976 0.1903920025
+ 0.2308852971 0.2203781009 0.1921014935
+ 0.2327376008 0.2221764028 0.1937994957
+ 0.2345706969 0.2239618003 0.1954976022
+ 0.2363775074 0.2257477045 0.1971796006
+ 0.2381743938 0.2275269926 0.1988390982
+ 0.2399536967 0.2292968929 0.2004887015
+ 0.2417089045 0.2310636044 0.2021429986
+ 0.2434546947 0.2328283936 0.2037986070
+ 0.2451961935 0.2345885932 0.2054408938
+ 0.2469274998 0.2363439947 0.2070686072
+ 0.2486505061 0.2380899042 0.2086946070
+ 0.2503683865 0.2398183942 0.2103239000
+ 0.2520723045 0.2415340990 0.2119438946
+ 0.2537688017 0.2432458997 0.2135417014
+ 0.2554596066 0.2449575067 0.2151297927
+ 0.2571457028 0.2466547936 0.2167214006
+ 0.2588266134 0.2483399063 0.2183215022
+ 0.2605035007 0.2500117123 0.2199174017
+ 0.2621727884 0.2516688108 0.2215020061
+ 0.2638291121 0.2533113062 0.2230799049
+ 0.2654761076 0.2549428046 0.2246621996
+ 0.2671324015 0.2565666139 0.2262382060
+ 0.2687830031 0.2581740022 0.2278027982
+ 0.2704266906 0.2597663105 0.2293560058
+ 0.2720651031 0.2613466978 0.2309001982
+ 0.2737013996 0.2629151940 0.2324444950
+ 0.2753258049 0.2644810081 0.2339832038
+ 0.2769433856 0.2660413086 0.2355152965
+ 0.2785556018 0.2675940990 0.2370389998
+ 0.2801620960 0.2691347897 0.2385461032
+ 0.2817465067 0.2706714869 0.2400489002
+ 0.2833232880 0.2722041011 0.2415542006
+ 0.2848966122 0.2737326026 0.2430642992
+ 0.2864696980 0.2752566040 0.2445680946
+ 0.2880344093 0.2767753899 0.2460584939
+ 0.2895927131 0.2782889903 0.2475391030
+ 0.2911433876 0.2797945142 0.2490137070
+ 0.2926709950 0.2812936008 0.2504926920
+ 0.2941831052 0.2827874124 0.2519704103
+ 0.2956764996 0.2842740119 0.2534419000
+ 0.2971622944 0.2857593000 0.2548941076
+ 0.2986418903 0.2872450948 0.2563388944
+ 0.3001124859 0.2887324095 0.2577767074
+ 0.3015663028 0.2902269065 0.2592169046
+ 0.3030163050 0.2917178869 0.2606565952
+ 0.3044652939 0.2931961119 0.2620925903
+ 0.3059149981 0.2946687043 0.2635230124
+ 0.3073624074 0.2961393893 0.2649494112
+ 0.3087939918 0.2976126969 0.2663621902
+ 0.3102258146 0.2990801930 0.2677738965
+ 0.3116576970 0.3005422950 0.2691845894
+ 0.3130910993 0.3019973040 0.2705928087
+ 0.3145203888 0.3034510911 0.2719972134
+ 0.3159373105 0.3049038947 0.2733885944
+ 0.3173550963 0.3063476980 0.2747704983
+ 0.3187735975 0.3077847958 0.2761443853
+ 0.3201943040 0.3092113137 0.2775141895
+ 0.3216128945 0.3106358945 0.2788833082
+ 0.3230192065 0.3120585084 0.2802532911
+ 0.3244253993 0.3134770095 0.2816143036
+ 0.3258317113 0.3148897886 0.2829608023
+ 0.3272288144 0.3162913918 0.2842969000
+ 0.3286210001 0.3176868856 0.2856262922
+ 0.3300077021 0.3190723956 0.2869521081
+ 0.3313938081 0.3204556108 0.2882770896
+ 0.3327834904 0.3218250871 0.2896099091
+ 0.3341748118 0.3231914043 0.2909416854
+ 0.3355718851 0.3245447874 0.2922688127
+ 0.3369680941 0.3258947134 0.2935900092
+ 0.3383626044 0.3272379041 0.2948979139
+ 0.3397515118 0.3285779953 0.2962028980
+ 0.3411338925 0.3299140036 0.2975037992
+ 0.3425045013 0.3312394917 0.2988072932
+ 0.3438651860 0.3325557113 0.3001132905
+ 0.3452149034 0.3338659108 0.3014146984
+ 0.3465574980 0.3351719081 0.3027124107
+ 0.3478950858 0.3364771008 0.3039973974
+ 0.3492299020 0.3377816975 0.3052738011
+ 0.3505575955 0.3390836120 0.3065445125
+ 0.3518814147 0.3403840065 0.3078114986
+ 0.3531937003 0.3416804969 0.3090800047
+ 0.3544990122 0.3429746926 0.3103496134
+ 0.3558034003 0.3442664146 0.3116236925
+ 0.3571070135 0.3455562890 0.3129017055
+ 0.3584021032 0.3468429148 0.3141731024
+ 0.3596883118 0.3481261134 0.3154368103
+ 0.3609679937 0.3494060040 0.3166972995
+ 0.3622376919 0.3506805003 0.3179521859
+ 0.3635073900 0.3519532084 0.3192068040
+ 0.3647772074 0.3532207906 0.3204610050
+ 0.3660452962 0.3544875979 0.3217146099
+ 0.3672988117 0.3557465971 0.3229593039
+ 0.3685522974 0.3570055962 0.3242039979
+ 0.3697921932 0.3582544923 0.3254339099
+ 0.3710305989 0.3595022857 0.3266617060
+ 0.3722676039 0.3607459962 0.3278838992
+ 0.3735038042 0.3619877994 0.3291031122
+ 0.3747293949 0.3632284999 0.3303220868
+ 0.3759411871 0.3644677997 0.3315409124
+ 0.3771511018 0.3657064140 0.3327583075
+ 0.3783504069 0.3669404984 0.3339653015
+ 0.3795498013 0.3681747019 0.3351722956
+ 0.3807409108 0.3694047034 0.3363747001
+ 0.3819305003 0.3706338108 0.3375759125
+ 0.3831126988 0.3718604147 0.3387717009
+ 0.3842875063 0.3730843961 0.3399612010
+ 0.3854615092 0.3743064106 0.3411506116
+ 0.3866302967 0.3755132854 0.3423393965
+ 0.3877991140 0.3767201900 0.3435282111
+ 0.3889720142 0.3779211938 0.3447239101
+ 0.3901464939 0.3791198134 0.3459227979
+ 0.3913210928 0.3803184032 0.3471212983
+ 0.3924961090 0.3815169036 0.3483184874
+ 0.3936710954 0.3827154934 0.3495157063
+ 0.3948434889 0.3839044869 0.3507024050
+ 0.3960154057 0.3850910068 0.3518857956
+ 0.3971866965 0.3862751126 0.3530685008
+ 0.3983570039 0.3874529898 0.3542487919
+ 0.3995273113 0.3886308074 0.3554292023
+ 0.4006893039 0.3898057938 0.3566128016
+ 0.4018486142 0.3909797966 0.3577977121
+ 0.4030069113 0.3921526968 0.3589808941
+ 0.4041604102 0.3933204114 0.3601540029
+ 0.4053137898 0.3944880962 0.3613269925
+ 0.4064702988 0.3956514001 0.3624922931
+ 0.4076293111 0.3968113065 0.3636507988
+ 0.4087882042 0.3979710937 0.3648093045
+ 0.4099336863 0.3991281092 0.3659642935
+ 0.4110778868 0.4002847970 0.3671188951
+ 0.4122214019 0.4014416039 0.3682743013
+ 0.4133622944 0.4025982916 0.3694328070
+ 0.4145030975 0.4037550092 0.3705911934
+ 0.4156427979 0.4049058855 0.3717437983
+ 0.4167811871 0.4060513079 0.3728901148
+ 0.4179196954 0.4071967900 0.3740364909
+ 0.4190456867 0.4083349109 0.3751721084
+ 0.4201678038 0.4094707966 0.3763037920
+ 0.4212898910 0.4106067121 0.3774355054
+ 0.4224098921 0.4117316902 0.3785631061
+ 0.4235298932 0.4128564000 0.3796902895
+ 0.4246496856 0.4139792919 0.3808172047
+ 0.4257684946 0.4150904119 0.3819408119
+ 0.4268873036 0.4162015915 0.3830643892
+ 0.4280022085 0.4173096120 0.3841860890
+ 0.4291062951 0.4184089899 0.3853017092
+ 0.4302105010 0.4195083976 0.3864172995
+ 0.4313144088 0.4206028879 0.3875293136
+ 0.4324178994 0.4216887951 0.3886339068
+ 0.4335213900 0.4227746129 0.3897385001
+ 0.4346221089 0.4238578081 0.3908396959
+ 0.4357188940 0.4249371886 0.3919354081
+ 0.4368157089 0.4260165095 0.3930310011
+ 0.4379082918 0.4270943105 0.3941242993
+ 0.4389953017 0.4281699061 0.3952139020
+ 0.4400823116 0.4292455018 0.3963035047
+ 0.4411674142 0.4303215146 0.3973940909
+ 0.4422496855 0.4313979149 0.3984861970
+ 0.4433319867 0.4324742854 0.3995783925
+ 0.4444083869 0.4335477054 0.4006663859
+ 0.4454728067 0.4346148074 0.4017446041
+ 0.4465371966 0.4356819093 0.4028229117
+ 0.4475978017 0.4367474020 0.4038993120
+ 0.4486451149 0.4378075898 0.4049679935
+ 0.4496923983 0.4388678074 0.4060367942
+ 0.4507394135 0.4399277866 0.4071055055
+ 0.4517830014 0.4409854114 0.4081743062
+ 0.4528265893 0.4420430064 0.4092431962
+ 0.4538702071 0.4431006014 0.4103119969
+ 0.4549070001 0.4441545904 0.4113866985
+ 0.4559428096 0.4452080131 0.4124625027
+ 0.4569785893 0.4462614954 0.4135383964
+ 0.4580070078 0.4473111033 0.4146097898
+ 0.4590308964 0.4483582973 0.4156782031
+ 0.4600548148 0.4494056106 0.4167467058
+ 0.4610792100 0.4504511952 0.4178118110
+ 0.4621045887 0.4514938891 0.4188697040
+ 0.4631299078 0.4525366127 0.4199275970
+ 0.4641552866 0.4535791874 0.4209854901
+ 0.4651829898 0.4546158910 0.4220423996
+ 0.4662106931 0.4556525946 0.4230993092
+ 0.4672383964 0.4566892982 0.4241561890
+ 0.4682591856 0.4577207863 0.4252122045
+ 0.4692761898 0.4587494135 0.4262678027
+ 0.4702933133 0.4597780108 0.4273233116
+ 0.4713107944 0.4608063996 0.4283765852
+ 0.4723303020 0.4618338943 0.4294205010
+ 0.4733496904 0.4628615081 0.4304643869
+ 0.4743691981 0.4638890922 0.4315083921
+ 0.4753845930 0.4649214149 0.4325434864
+ 0.4763987958 0.4659551084 0.4335753918
+ 0.4774129987 0.4669888914 0.4346072972
+ 0.4784238040 0.4680216014 0.4356386065
+ 0.4794248044 0.4690510035 0.4366680086
+ 0.4804258049 0.4700804055 0.4376974106
+ 0.4814268053 0.4711098969 0.4387268126
+ 0.4824292958 0.4721364081 0.4397540987
+ 0.4834325016 0.4731616974 0.4407801926
+ 0.4844357967 0.4741868973 0.4418064058
+ 0.4854384959 0.4752117991 0.4428318143
+ 0.4864360988 0.4762332141 0.4438445866
+ 0.4874337018 0.4772545099 0.4448573887
+ 0.4884313047 0.4782758951 0.4458701015
+ 0.4894233942 0.4792912900 0.4468775094
+ 0.4904080927 0.4802986085 0.4478765130
+ 0.4913927913 0.4813058972 0.4488754869
+ 0.4923774898 0.4823131859 0.4498746097
+ 0.4933621883 0.4833154976 0.4508705139
+ 0.4943468869 0.4843156934 0.4518648982
+ 0.4953315854 0.4853160083 0.4528594017
+ 0.4963161945 0.4863162041 0.4538537860
+ 0.4972892106 0.4873186946 0.4548524916
+ 0.4982616901 0.4883211851 0.4558514953
+ 0.4992341995 0.4893237948 0.4568504989
+ 0.5002049804 0.4903247058 0.4578497112
+ 0.5011661053 0.4913162887 0.4588507116
+ 0.5021272898 0.4923079908 0.4598517120
+ 0.5030884743 0.4932996035 0.4608527124
+ 0.5040500164 0.4942877889 0.4618506134
+ 0.5050122142 0.4952678084 0.4628399909
+ 0.5059744120 0.4962477982 0.4638293982
+ 0.5069364905 0.4972277880 0.4648188055
+ 0.5078973770 0.4982069135 0.4658063948
+ 0.5088561773 0.4991844893 0.4667905867
+ 0.5098149180 0.5001621842 0.4677748084
+ 0.5107737184 0.5011398196 0.4687590897
+ 0.5117294192 0.5021172762 0.4697437882
+ 0.5126808882 0.5030944943 0.4707294106
+ 0.5136322975 0.5040717721 0.4717150033
+ 0.5145838261 0.5050491095 0.4727005959
+ 0.5155330896 0.5060225725 0.4736824036
+ 0.5164790154 0.5069903135 0.4746578038
+ 0.5174250007 0.5079579949 0.4756332040
+ 0.5183709264 0.5089256763 0.4766086042
+ 0.5193127990 0.5098916888 0.4775812924
+ 0.5202462077 0.5108541250 0.4785476029
+ 0.5211796165 0.5118165016 0.4795139134
+ 0.5221130252 0.5127789974 0.4804801941
+ 0.5230445862 0.5137407780 0.4814454019
+ 0.5239686966 0.5147001743 0.4824050069
+ 0.5248929262 0.5156595111 0.4833647013
+ 0.5258170962 0.5166189075 0.4843243062
+ 0.5267412066 0.5175781846 0.4852839112
+ 0.5276607275 0.5185251236 0.4862455130
+ 0.5285801291 0.5194721222 0.4872071147
+ 0.5294994712 0.5204190016 0.4881686866
+ 0.5304189920 0.5213660002 0.4891302884
+ 0.5313292146 0.5223047137 0.4900931120
+ 0.5322365761 0.5232409239 0.4910562038
+ 0.5331441164 0.5241770744 0.4920192957
+ 0.5340514779 0.5251134038 0.4929825068
+ 0.5349549055 0.5260437131 0.4939421117
+ 0.5358536243 0.5269672871 0.4948973954
+ 0.5367524028 0.5278909802 0.4958527088
+ 0.5376511216 0.5288146138 0.4968079925
+ 0.5385501981 0.5297368169 0.4977625012
+ 0.5394514799 0.5306468010 0.4987092912
+ 0.5403528214 0.5315569043 0.4996561110
+ 0.5412541032 0.5324670076 0.5006029010
+ 0.5421553850 0.5333769917 0.5015497208
+ 0.5430505276 0.5342804193 0.5024966002
+ 0.5439429879 0.5351806879 0.5034434199
+ 0.5448353887 0.5360810161 0.5043902993
+ 0.5457279086 0.5369812846 0.5053371191
+ 0.5466185808 0.5378801227 0.5062835217
+ 0.5475032926 0.5387730002 0.5072280169
+ 0.5483881235 0.5396658778 0.5081725121
+ 0.5492727757 0.5405586958 0.5091168880
+ 0.5501574874 0.5414515734 0.5100613832
+ 0.5510445833 0.5423436761 0.5109959245
+ 0.5519328117 0.5432354808 0.5119252205
+ 0.5528209805 0.5441272259 0.5128543973
+ 0.5537092090 0.5450189710 0.5137836933
+ 0.5545967221 0.5459102988 0.5147123933
+ 0.5554770827 0.5467962027 0.5156326890
+ 0.5563575029 0.5476821065 0.5165529251
+ 0.5572379231 0.5485680103 0.5174731016
+ 0.5581182837 0.5494539142 0.5183933973
+ 0.5589959025 0.5503361821 0.5193132758
+ 0.5598695874 0.5512136221 0.5202329159
+ 0.5607432723 0.5520910025 0.5211526155
+ 0.5616170168 0.5529683828 0.5220721960
+ 0.5624907017 0.5538457036 0.5229917765
+ 0.5633659959 0.5547165871 0.5239105821
+ 0.5642418861 0.5555846095 0.5248289704
+ 0.5651177168 0.5564525723 0.5257474184
+ 0.5659936070 0.5573204756 0.5266659260
+ 0.5668694973 0.5581884980 0.5275843143
+ 0.5677334070 0.5590493083 0.5284937024
+ 0.5685961246 0.5599092841 0.5294020176
+ 0.5694587827 0.5607693791 0.5303102136
+ 0.5703215003 0.5616294146 0.5312184095
+ 0.5711839199 0.5624892712 0.5321263075
+ 0.5720422268 0.5633450747 0.5330240726
+ 0.5729004741 0.5642009974 0.5339217782
+ 0.5737587214 0.5650569201 0.5348194838
+ 0.5746170282 0.5659127235 0.5357171893
+ 0.5754747987 0.5667679906 0.5366147161
+ 0.5763297081 0.5676189065 0.5375100970
+ 0.5771846175 0.5684698820 0.5384054184
+ 0.5780395269 0.5693207979 0.5393007994
+ 0.5788943768 0.5701717734 0.5401961803
+ 0.5797473192 0.5710228086 0.5410919785
+ 0.5805879831 0.5718737841 0.5419911146
+ 0.5814288259 0.5727248788 0.5428900719
+ 0.5822694898 0.5735759735 0.5437892079
+ 0.5831102133 0.5744271278 0.5446882248
+ 0.5839506984 0.5752779245 0.5455867052
+ 0.5847879052 0.5761266947 0.5464770794
+ 0.5856251717 0.5769755244 0.5473675132
+ 0.5864624977 0.5778242946 0.5482578874
+ 0.5872997046 0.5786731243 0.5491483212
+ 0.5881369710 0.5795218945 0.5500386953
+ 0.5889738798 0.5803651810 0.5509185791
+ 0.5898107290 0.5812082887 0.5517979264
+ 0.5906475782 0.5820513964 0.5526772141
+ 0.5914844871 0.5828943849 0.5535565019
+ 0.5923212767 0.5837374926 0.5544357896
+ 0.5931525826 0.5845798850 0.5553128123
+ 0.5939822793 0.5854220986 0.5561890006
+ 0.5948119760 0.5862641931 0.5570651889
+ 0.5956416130 0.5871064067 0.5579413772
+ 0.5964713097 0.5879485011 0.5588176250
+ 0.5972992182 0.5887913704 0.5596930981
+ 0.5981255174 0.5896348953 0.5605677962
+ 0.5989518166 0.5904784799 0.5614423752
+ 0.5997781157 0.5913220048 0.5623170733
+ 0.6006044149 0.5921655297 0.5631917715
+ 0.6014305949 0.5930098891 0.5640664101
+ 0.6022564769 0.5938585997 0.5649405122
+ 0.6030824184 0.5947071910 0.5658146739
+ 0.6039084196 0.5955557823 0.5666887760
+ 0.6047343016 0.5964043736 0.5675628781
+ 0.6055601835 0.5972530246 0.5684370995
+ 0.6063808799 0.5980986953 0.5693032742
+ 0.6072000861 0.5989435911 0.5701668262
+ 0.6080192924 0.5997886062 0.5710303783
+ 0.6088384986 0.6006335020 0.5718938708
+ 0.6096577048 0.6014783978 0.5727574229
+ 0.6104760170 0.6023222804 0.5736197233
+ 0.6112921238 0.6031637192 0.5744786263
+ 0.6121081710 0.6040052176 0.5753375292
+ 0.6129242778 0.6048465967 0.5761963725
+ 0.6137403846 0.6056880951 0.5770552158
+ 0.6145564914 0.6065294743 0.5779141188
+ 0.6153724194 0.6073685288 0.5787752271
+ 0.6161882877 0.6082066298 0.5796372294
+ 0.6170042157 0.6090446711 0.5804991722
+ 0.6178200245 0.6098828912 0.5813611746
+ 0.6186358929 0.6107209921 0.5822231770
+ 0.6194511056 0.6115579009 0.5830852985
+ 0.6202605963 0.6123844981 0.5839483142
+ 0.6210700870 0.6132110953 0.5848112106
+ 0.6218796968 0.6140376925 0.5856742263
+ 0.6226891875 0.6148642898 0.5865371823
+ 0.6234986782 0.6156908870 0.5874001980
+ 0.6243069768 0.6165152192 0.5882589817
+ 0.6251134276 0.6173359752 0.5891109109
+ 0.6259198189 0.6181567907 0.5899628997
+ 0.6267263293 0.6189776063 0.5908148289
+ 0.6275327206 0.6197984219 0.5916668177
+ 0.6283391118 0.6206191778 0.5925186872
+ 0.6291438937 0.6214398742 0.5933675170
+ 0.6299477220 0.6222605109 0.5942140818
+ 0.6307514906 0.6230810285 0.5950608253
+ 0.6315551996 0.6239016056 0.5959073901
+ 0.6323590279 0.6247221231 0.5967540145
+ 0.6331627965 0.6255427003 0.5976006985
+ 0.6339570284 0.6263571978 0.5984491706
+ 0.6347482204 0.6271697283 0.5992982984
+ 0.6355394125 0.6279821992 0.6001474261
+ 0.6363306046 0.6287947297 0.6009964943
+ 0.6371217966 0.6296073198 0.6018456221
+ 0.6379129887 0.6304197907 0.6026948094
+ 0.6387022138 0.6312273741 0.6035407782
+ 0.6394910812 0.6320338845 0.6043862104
+ 0.6402798891 0.6328405142 0.6052315235
+ 0.6410686970 0.6336470246 0.6060767770
+ 0.6418575048 0.6344534755 0.6069220901
+ 0.6426463127 0.6352599859 0.6077674031
+ 0.6434336901 0.6360661983 0.6086056828
+ 0.6442208290 0.6368721128 0.6094418764
+ 0.6450079083 0.6376780868 0.6102781296
+ 0.6457949877 0.6384841204 0.6111143827
+ 0.6465821266 0.6392900944 0.6119505763
+ 0.6473692060 0.6400961280 0.6127868295
+ 0.6481484771 0.6408988237 0.6136180162
+ 0.6489244103 0.6417000294 0.6144466996
+ 0.6497004032 0.6425011158 0.6152755022
+ 0.6504762769 0.6433023214 0.6161041856
+ 0.6512522101 0.6441034079 0.6169329286
+ 0.6520280838 0.6449046135 0.6177616119
+ 0.6528034210 0.6457012296 0.6185904145
+ 0.6535782218 0.6464933753 0.6194192767
+ 0.6543530226 0.6472855210 0.6202481985
+ 0.6551278234 0.6480777264 0.6210771203
+ 0.6559026241 0.6488698125 0.6219059825
+ 0.6566773057 0.6496618986 0.6227349043
+ 0.6574509144 0.6504533291 0.6235638261
+ 0.6582205296 0.6512417793 0.6243926287
+ 0.6589900851 0.6520304084 0.6252213120
+ 0.6597597003 0.6528189778 0.6260501146
+ 0.6605293155 0.6536074877 0.6268787980
+ 0.6612988710 0.6543961167 0.6277076006
+ 0.6620684266 0.6551846862 0.6285362840
+ 0.6628314257 0.6559717059 0.6293578744
+ 0.6635934114 0.6567586064 0.6301782727
+ 0.6643555164 0.6575453877 0.6309986711
+ 0.6651175022 0.6583322883 0.6318191290
+ 0.6658794880 0.6591191292 0.6326395273
+ 0.6666415930 0.6599059105 0.6334599257
+ 0.6674026251 0.6606888175 0.6342766881
+ 0.6681625247 0.6614663005 0.6350883245
+ 0.6689224243 0.6622439027 0.6359000206
+ 0.6696822047 0.6630213857 0.6367117167
+ 0.6704421043 0.6637989879 0.6375232935
+ 0.6712018847 0.6645764709 0.6383349895
+ 0.6719617844 0.6653540134 0.6391466856
+ 0.6727159023 0.6661242843 0.6399570704
+ 0.6734694839 0.6668937802 0.6407673955
+ 0.6742231250 0.6676632762 0.6415776014
+ 0.6749765873 0.6684327722 0.6423879266
+ 0.6757302284 0.6692023277 0.6431981921
+ 0.6764838099 0.6699718237 0.6440083981
+ 0.6772350073 0.6707385778 0.6448181868
+ 0.6779803038 0.6714984775 0.6456267834
+ 0.6787256002 0.6722583771 0.6464353204
+ 0.6794708967 0.6730182767 0.6472437978
+ 0.6802163124 0.6737781763 0.6480523944
+ 0.6809616089 0.6745380759 0.6488608718
+ 0.6817069054 0.6752979755 0.6496694088
+ 0.6824505925 0.6760519147 0.6504725218
+ 0.6831930876 0.6768013239 0.6512712836
+ 0.6839357018 0.6775506735 0.6520701051
+ 0.6846781969 0.6783000827 0.6528689265
+ 0.6854206920 0.6790493727 0.6536676884
+ 0.6861631870 0.6797987819 0.6544665098
+ 0.6869056821 0.6805481911 0.6552652717
+ 0.6876466274 0.6812918782 0.6560565233
+ 0.6883869171 0.6820340157 0.6568452716
+ 0.6891273260 0.6827760935 0.6576340795
+ 0.6898676157 0.6835181713 0.6584228873
+ 0.6906079054 0.6842603087 0.6592115760
+ 0.6913483143 0.6850023866 0.6600003839
+ 0.6920886040 0.6857444048 0.6607891917
+ 0.6928188801 0.6864817142 0.6615756750
+ 0.6935479045 0.6872183084 0.6623616815
+ 0.6942768097 0.6879549026 0.6631476879
+ 0.6950057745 0.6886916161 0.6639338136
+ 0.6957347989 0.6894282103 0.6647198200
+ 0.6964638233 0.6901648045 0.6655058861
+ 0.6971927285 0.6909013987 0.6662918925
+ 0.6979197860 0.6916376948 0.6670784950
+ 0.6986466050 0.6923738718 0.6678652167
+ 0.6993734241 0.6931101084 0.6686518788
+ 0.7001003027 0.6938462853 0.6694386005
+ 0.7008271217 0.6945825219 0.6702252030
+ 0.7015538812 0.6953186989 0.6710119247
+ 0.7022808194 0.6960549951 0.6717985868
+ 0.7030063272 0.6967895031 0.6725746989
+ 0.7037315965 0.6975237131 0.6733481884
+ 0.7044569254 0.6982578039 0.6741216779
+ 0.7051821947 0.6989920139 0.6748952270
+ 0.7059075236 0.6997262239 0.6756685972
+ 0.7066327929 0.7004603744 0.6764420867
+ 0.7073581219 0.7011945248 0.6772155762
+ 0.7080765963 0.7019280195 0.6779829264
+ 0.7087914944 0.7026610970 0.6787465811
+ 0.7095062733 0.7033942938 0.6795102954
+ 0.7102211714 0.7041273713 0.6802740097
+ 0.7109360099 0.7048605084 0.6810376048
+ 0.7116509080 0.7055935860 0.6818013191
+ 0.7123658061 0.7063267231 0.6825649738
+ 0.7130801082 0.7070569992 0.6833276749
+ 0.7137935758 0.7077823877 0.6840885878
+ 0.7145071030 0.7085077763 0.6848495007
+ 0.7152206898 0.7092332244 0.6856104732
+ 0.7159342170 0.7099586129 0.6863713861
+ 0.7166476846 0.7106840014 0.6871322989
+ 0.7173612118 0.7114093900 0.6878932714
+ 0.7180746794 0.7121347785 0.6886541843
+ 0.7187874913 0.7128537893 0.6894174218
+ 0.7195001841 0.7135729194 0.6901807785
+ 0.7202129960 0.7142918706 0.6909440756
+ 0.7209258080 0.7150110006 0.6917073727
+ 0.7216385007 0.7157300115 0.6924707294
+ 0.7223513126 0.7164490223 0.6932340264
+ 0.7230641246 0.7171680927 0.6939973235
+ 0.7237719297 0.7178853154 0.6947563887
+ 0.7244753242 0.7186009884 0.6955114007
+ 0.7251787782 0.7193167210 0.6962664127
+ 0.7258821726 0.7200323939 0.6970214248
+ 0.7265856862 0.7207481265 0.6977763772
+ 0.7272890806 0.7214637995 0.6985313892
+ 0.7279925942 0.7221794128 0.6992864013
+ 0.7286959887 0.7228950858 0.7000414133
+ 0.7293974161 0.7236070037 0.7007868290
+ 0.7300986052 0.7243188024 0.7015315890
+ 0.7307999134 0.7250304818 0.7022762895
+ 0.7315011024 0.7257422209 0.7030211091
+ 0.7322024107 0.7264540195 0.7037658095
+ 0.7329035997 0.7271656990 0.7045106292
+ 0.7336049080 0.7278773785 0.7052553296
+ 0.7343035936 0.7285876274 0.7059991956
+ 0.7349956036 0.7292935252 0.7067406774
+ 0.7356876731 0.7299994826 0.7074822187
+ 0.7363798022 0.7307054996 0.7082235813
+ 0.7370718122 0.7314115167 0.7089651227
+ 0.7377638817 0.7321174741 0.7097066045
+ 0.7384558916 0.7328234911 0.7104480267
+ 0.7391480207 0.7335295081 0.7111895084
+ 0.7398372293 0.7342340946 0.7119327188
+ 0.7405235767 0.7349374294 0.7126777768
+ 0.7412099838 0.7356405854 0.7134228945
+ 0.7418963909 0.7363438010 0.7141680121
+ 0.7425827980 0.7370470762 0.7149130702
+ 0.7432692051 0.7377502918 0.7156581879
+ 0.7439556122 0.7384536266 0.7164033055
+ 0.7446420193 0.7391567826 0.7171484232
+ 0.7453268766 0.7398598194 0.7178943753
+ 0.7460108995 0.7405626178 0.7186409831
+ 0.7466949224 0.7412652969 0.7193875909
+ 0.7473788857 0.7419680953 0.7201341987
+ 0.7480629086 0.7426708937 0.7208808064
+ 0.7487468719 0.7433736920 0.7216274142
+ 0.7494308949 0.7440764904 0.7223740220
+ 0.7501149178 0.7447792292 0.7231205106
+ 0.7507920861 0.7454807758 0.7238616943
+ 0.7514652014 0.7461814880 0.7245994210
+ 0.7521383166 0.7468823195 0.7253370285
+ 0.7528113127 0.7475829720 0.7260746956
+ 0.7534844279 0.7482838035 0.7268123031
+ 0.7541574836 0.7489845753 0.7275499105
+ 0.7548305988 0.7496852875 0.7282875776
+ 0.7555037141 0.7503861189 0.7290251851
+ 0.7561715245 0.7510858178 0.7297608852
+ 0.7568343878 0.7517846227 0.7304946780
+ 0.7574973106 0.7524833083 0.7312284708
+ 0.7581601739 0.7531821132 0.7319623232
+ 0.7588232160 0.7538809180 0.7326961160
+ 0.7594860792 0.7545796037 0.7334299088
+ 0.7601490021 0.7552784085 0.7341635823
+ 0.7608119249 0.7559772134 0.7348973751
+ 0.7614743710 0.7566753030 0.7356321216
+ 0.7621356845 0.7573720217 0.7363687754
+ 0.7627969980 0.7580686808 0.7371054888
+ 0.7634583116 0.7587653995 0.7378422022
+ 0.7641196251 0.7594621181 0.7385789156
+ 0.7647809982 0.7601587772 0.7393156290
+ 0.7654423118 0.7608554959 0.7400524020
+ 0.7661036253 0.7615522146 0.7407891154
+ 0.7667648792 0.7622489929 0.7415258288
+ 0.7674220204 0.7629417777 0.7422630191
+ 0.7680791020 0.7636345029 0.7430003285
+ 0.7687361240 0.7643272877 0.7437375188
+ 0.7693930864 0.7650200725 0.7444748282
+ 0.7700502276 0.7657127976 0.7452120185
+ 0.7707071900 0.7664055824 0.7459493279
+ 0.7713642120 0.7670983076 0.7466865182
+ 0.7720212936 0.7677910924 0.7474238276
+ 0.7726746202 0.7684819102 0.7481557727
+ 0.7733249068 0.7691711783 0.7488833070
+ 0.7739751935 0.7698603868 0.7496107817
+ 0.7746254802 0.7705495954 0.7503383160
+ 0.7752758265 0.7712389231 0.7510657907
+ 0.7759261131 0.7719280720 0.7517933249
+ 0.7765762806 0.7726173997 0.7525207996
+ 0.7772266269 0.7733066082 0.7532482743
+ 0.7778769135 0.7739958167 0.7539758086
+ 0.7785270810 0.7746813893 0.7546988130
+ 0.7791771889 0.7753669024 0.7554215789
+ 0.7798274159 0.7760524154 0.7561445236
+ 0.7804775238 0.7767379284 0.7568672895
+ 0.7811276913 0.7774235010 0.7575901747
+ 0.7817777991 0.7781090140 0.7583130002
+ 0.7824279070 0.7787945271 0.7590358853
+ 0.7830780745 0.7794799805 0.7597587109
+ 0.7837272286 0.7801622152 0.7604821920
+ 0.7843742967 0.7808375955 0.7612072229
+ 0.7850214839 0.7815129757 0.7619320750
+ 0.7856686115 0.7821882963 0.7626569867
+ 0.7863156796 0.7828636765 0.7633818984
+ 0.7869629264 0.7835391164 0.7641068101
+ 0.7876099944 0.7842144966 0.7648317218
+ 0.7882571220 0.7848898768 0.7655565739
+ 0.7889041901 0.7855653167 0.7662814856
+ 0.7895485163 0.7862368822 0.7670075297
+ 0.7901902795 0.7869054079 0.7677345276
+ 0.7908321023 0.7875739932 0.7684614062
+ 0.7914739847 0.7882425189 0.7691884041
+ 0.7921158075 0.7889109850 0.7699152827
+ 0.7927575707 0.7895795107 0.7706422806
+ 0.7933995128 0.7902479768 0.7713692188
+ 0.7940412760 0.7909166217 0.7720962167
+ 0.7946830988 0.7915850878 0.7728230953
+ 0.7953270078 0.7922512889 0.7735466957
+ 0.7959719896 0.7929161191 0.7742683291
+ 0.7966169715 0.7935810089 0.7749899030
+ 0.7972620130 0.7942458987 0.7757114768
+ 0.7979069948 0.7949107289 0.7764332294
+ 0.7985519171 0.7955756187 0.7771548033
+ 0.7991968989 0.7962405086 0.7778763771
+ 0.7998418808 0.7969053984 0.7785980105
+ 0.8004869223 0.7975702286 0.7793195844
+ 0.8011307120 0.7982336879 0.7800378203
+ 0.8017739058 0.7988961935 0.7807539105
+ 0.8024169803 0.7995588183 0.7814698815
+ 0.8030601144 0.8002213836 0.7821859121
+ 0.8037033081 0.8008840084 0.7829018831
+ 0.8043463826 0.8015465140 0.7836179137
+ 0.8049895763 0.8022090793 0.7843340039
+ 0.8056327105 0.8028717041 0.7850499749
+ 0.8062757850 0.8035342097 0.7857660055
+ 0.8069155812 0.8041942716 0.7864825130
+ 0.8075515032 0.8048514128 0.7871994972
+ 0.8081874251 0.8055086136 0.7879164815
+ 0.8088234067 0.8061658144 0.7886335254
+ 0.8094593287 0.8068230152 0.7893505096
+ 0.8100953102 0.8074802160 0.7900676131
+ 0.8107311726 0.8081374168 0.7907845974
+ 0.8113672137 0.8087946177 0.7915015817
+ 0.8120030761 0.8094516993 0.7922186255
+ 0.8126395941 0.8101087809 0.7929350138
+ 0.8132783771 0.8107650876 0.7936488986
+ 0.8139171004 0.8114215136 0.7943627834
+ 0.8145558834 0.8120778203 0.7950767279
+ 0.8151946068 0.8127341866 0.7957904935
+ 0.8158333898 0.8133906126 0.7965043783
+ 0.8164721131 0.8140469193 0.7972183228
+ 0.8171108961 0.8147032857 0.7979322076
+ 0.8177496195 0.8153595924 0.7986459732
+ 0.8183884025 0.8160160184 0.7993599176
+ 0.8190252781 0.8166726828 0.8000699878
+ 0.8196616769 0.8173294067 0.8007791042
+ 0.8202980757 0.8179860711 0.8014882803
+ 0.8209344745 0.8186429143 0.8021973968
+ 0.8215708733 0.8192995787 0.8029065132
+ 0.8222072721 0.8199563026 0.8036156297
+ 0.8228437901 0.8206130862 0.8043248057
+ 0.8234801888 0.8212698102 0.8050339222
+ 0.8241165876 0.8219264746 0.8057429790
+ 0.8247510195 0.8225817084 0.8064500093
+ 0.8253805041 0.8232325912 0.8071511984
+ 0.8260099292 0.8238834739 0.8078523874
+ 0.8266394138 0.8245344758 0.8085535169
+ 0.8272687793 0.8251854181 0.8092547059
+ 0.8278983235 0.8258364201 0.8099558949
+ 0.8285278082 0.8264873028 0.8106570840
+ 0.8291571736 0.8271383047 0.8113582730
+ 0.8297867179 0.8277891874 0.8120595217
+ 0.8304160833 0.8284401298 0.8127607107
+ 0.8310465217 0.8290880919 0.8134608269
+ 0.8316774964 0.8297342062 0.8141604066
+ 0.8323084116 0.8303803205 0.8148599267
+ 0.8329393864 0.8310263753 0.8155595064
+ 0.8335703015 0.8316724896 0.8162590265
+ 0.8342012763 0.8323186040 0.8169584870
+ 0.8348321915 0.8329647779 0.8176581264
+ 0.8354632258 0.8336108923 0.8183575869
+ 0.8360940814 0.8342570066 0.8190571070
+ 0.8367251158 0.8349031210 0.8197566867
+ 0.8373507261 0.8355441093 0.8204557896
+ 0.8379753232 0.8361840844 0.8211548924
+ 0.8385999203 0.8368241787 0.8218539953
+ 0.8392245173 0.8374642134 0.8225530982
+ 0.8398491144 0.8381041884 0.8232522011
+ 0.8404737711 0.8387442231 0.8239513040
+ 0.8410984278 0.8393843174 0.8246504068
+ 0.8417230248 0.8400242925 0.8253493905
+ 0.8423476219 0.8406643271 0.8260484934
+ 0.8429722190 0.8413044214 0.8267475963
+ 0.8435915112 0.8419380188 0.8274425268
+ 0.8442103863 0.8425710201 0.8281369209
+ 0.8448292017 0.8432040811 0.8288313746
+ 0.8454480767 0.8438372016 0.8295258284
+ 0.8460670114 0.8444703221 0.8302202821
+ 0.8466858268 0.8451033831 0.8309146762
+ 0.8473047018 0.8457365036 0.8316091895
+ 0.8479235768 0.8463695049 0.8323035836
+ 0.8485423923 0.8470026255 0.8329980969
+ 0.8491613269 0.8476356864 0.8336924911
+ 0.8497756720 0.8482635021 0.8343786001
+ 0.8503894210 0.8488906026 0.8350632787
+ 0.8510032296 0.8495177031 0.8357480764
+ 0.8516169190 0.8501448035 0.8364328146
+ 0.8522306085 0.8507717848 0.8371176124
+ 0.8528444171 0.8513988853 0.8378022909
+ 0.8534581065 0.8520259857 0.8384870291
+ 0.8540717959 0.8526530266 0.8391718268
+ 0.8546856046 0.8532801270 0.8398565054
+ 0.8552992940 0.8539072275 0.8405413032
+ 0.8559076786 0.8545295000 0.8412235975
+ 0.8565136194 0.8551496863 0.8419046998
+ 0.8571195006 0.8557698727 0.8425859213
+ 0.8577255011 0.8563901186 0.8432670832
+ 0.8583313823 0.8570103049 0.8439481854
+ 0.8589373231 0.8576303720 0.8446294069
+ 0.8595432043 0.8582506180 0.8453105092
+ 0.8601492047 0.8588708043 0.8459916711
+ 0.8607550859 0.8594909906 0.8466727734
+ 0.8613610268 0.8601111770 0.8473539948
+ 0.8619657755 0.8607302904 0.8480353951
+ 0.8625686765 0.8613476157 0.8487172723
+ 0.8631715178 0.8619648814 0.8493992090
+ 0.8637742996 0.8625822067 0.8500810862
+ 0.8643772006 0.8631994724 0.8507630825
+ 0.8649799824 0.8638167977 0.8514450192
+ 0.8655828238 0.8644341230 0.8521268964
+ 0.8661857247 0.8650513291 0.8528087735
+ 0.8667885065 0.8656685948 0.8534907103
+ 0.8673914075 0.8662859201 0.8541725874
+ 0.8679941893 0.8669031858 0.8548545241
+ 0.8685936928 0.8675162196 0.8555287719
+ 0.8691927195 0.8681287169 0.8562021255
+ 0.8697918057 0.8687412143 0.8568754196
+ 0.8703907728 0.8693537116 0.8575487137
+ 0.8709899187 0.8699662089 0.8582220078
+ 0.8715888858 0.8705787063 0.8588953018
+ 0.8721879721 0.8711912036 0.8595685959
+ 0.8727869987 0.8718037009 0.8602418900
+ 0.8733860850 0.8724161983 0.8609151840
+ 0.8739851117 0.8730286956 0.8615884781
+ 0.8745809793 0.8736391068 0.8622589707
+ 0.8751688004 0.8742442727 0.8629223108
+ 0.8757566214 0.8748494983 0.8635854721
+ 0.8763445020 0.8754547238 0.8642486930
+ 0.8769323230 0.8760598898 0.8649119735
+ 0.8775202036 0.8766651750 0.8655751944
+ 0.8781080246 0.8772704005 0.8662384152
+ 0.8786959052 0.8778756261 0.8669016957
+ 0.8792837262 0.8784807920 0.8675649166
+ 0.8798714876 0.8790860176 0.8682280779
+ 0.8804594278 0.8796913028 0.8688914180
+ 0.8810451031 0.8802946210 0.8695524931
+ 0.8816289902 0.8808963895 0.8702116013
+ 0.8822128773 0.8814982176 0.8708708286
+ 0.8827967048 0.8820999861 0.8715299964
+ 0.8833805919 0.8827018142 0.8721891046
+ 0.8839644790 0.8833035827 0.8728482723
+ 0.8845484257 0.8839052916 0.8735073805
+ 0.8851323128 0.8845071197 0.8741666079
+ 0.8857161999 0.8851088881 0.8748257756
+ 0.8863000274 0.8857107162 0.8754848838
+ 0.8868839145 0.8863124847 0.8761441112
+ 0.8874658942 0.8869127035 0.8768044114
+ 0.8880469203 0.8875120878 0.8774654865
+ 0.8886278272 0.8881114721 0.8781265020
+ 0.8892087936 0.8887107968 0.8787875772
+ 0.8897898197 0.8893101811 0.8794485927
+ 0.8903707266 0.8899096251 0.8801097274
+ 0.8909516931 0.8905088902 0.8807706833
+ 0.8915325999 0.8911082745 0.8814318180
+ 0.8921136260 0.8917077184 0.8820927739
+ 0.8926944733 0.8923069835 0.8827539086
+ 0.8932754993 0.8929064274 0.8834149241
+ 0.8938503861 0.8935058713 0.8840740919
+ 0.8944211006 0.8941053748 0.8847320080
+ 0.8949918151 0.8947049975 0.8853899240
+ 0.8955624104 0.8953045011 0.8860477805
+ 0.8961331248 0.8959041238 0.8867056966
+ 0.8967037797 0.8965036273 0.8873636127
+ 0.8972744942 0.8971031904 0.8880215287
+ 0.8978450894 0.8977026939 0.8886793852
+ 0.8984158039 0.8983023167 0.8893373013
+ 0.8989865184 0.8989018202 0.8899952173
+ 0.8995571733 0.8995013237 0.8906530738
+ 0.9001259804 0.9000989199 0.8913081884
+ 0.9006919265 0.9006931782 0.8919588923
+ 0.9012578726 0.9012876153 0.8926094770
+ 0.9018238187 0.9018818736 0.8932601810
+ 0.9023898244 0.9024763107 0.8939108849
+ 0.9029557109 0.9030706286 0.8945615888
+ 0.9035217166 0.9036650062 0.8952121735
+ 0.9040876031 0.9042593241 0.8958628774
+ 0.9046536088 0.9048537016 0.8965135813
+ 0.9052194953 0.9054480195 0.8971642852
+ 0.9057855010 0.9060423970 0.8978149295
+ 0.9063512087 0.9066365957 0.8984653950
+ 0.9069120884 0.9072268009 0.8991103768
+ 0.9074729085 0.9078170061 0.8997554183
+ 0.9080337882 0.9084072113 0.9004002810
+ 0.9085947275 0.9089974165 0.9010453224
+ 0.9091554880 0.9095876217 0.9016903043
+ 0.9097164273 0.9101778865 0.9023352265
+ 0.9102773070 0.9107680917 0.9029802084
+ 0.9108381867 0.9113582969 0.9036251903
+ 0.9113990068 0.9119485021 0.9042701721
+ 0.9119598866 0.9125387073 0.9049150944
+ 0.9125208259 0.9131289124 0.9055600762
+ 0.9130790234 0.9137184024 0.9062044024
+ 0.9136350155 0.9143071771 0.9068480134
+ 0.9141910076 0.9148960114 0.9074916244
+ 0.9147469997 0.9154847860 0.9081352949
+ 0.9153029919 0.9160736799 0.9087789059
+ 0.9158589840 0.9166625142 0.9094225168
+ 0.9164149761 0.9172512889 0.9100661874
+ 0.9169710279 0.9178401232 0.9107097983
+ 0.9175270200 0.9184290171 0.9113535285
+ 0.9180830121 0.9190177917 0.9119970798
+ 0.9186390042 0.9196066260 0.9126406908
+ 0.9191949964 0.9201954007 0.9132844210
+ 0.9197478294 0.9207763076 0.9139227867
+ 0.9203000069 0.9213560820 0.9145606160
+ 0.9208523035 0.9219357967 0.9151983261
+ 0.9214046001 0.9225155711 0.9158360958
+ 0.9219568968 0.9230954051 0.9164738059
+ 0.9225091934 0.9236751795 0.9171115756
+ 0.9230613708 0.9242548943 0.9177492857
+ 0.9236137271 0.9248347282 0.9183871150
+ 0.9241660237 0.9254145026 0.9190248251
+ 0.9247183204 0.9259942770 0.9196625948
+ 0.9252706170 0.9265739918 0.9203003049
+ 0.9258226752 0.9271532297 0.9209372997
+ 0.9263734221 0.9277231097 0.9215620756
+ 0.9269239902 0.9282929897 0.9221869111
+ 0.9274746776 0.9288629889 0.9228116870
+ 0.9280253053 0.9294329286 0.9234365225
+ 0.9285759926 0.9300028086 0.9240614176
+ 0.9291266203 0.9305726886 0.9246861935
+ 0.9296773076 0.9311426282 0.9253110290
+ 0.9302278757 0.9317126274 0.9259358048
+ 0.9307786226 0.9322825074 0.9265605807
+ 0.9313291907 0.9328523874 0.9271854162
+ 0.9318798780 0.9334223270 0.9278101921
+ 0.9324297905 0.9339916706 0.9284340143
+ 0.9329723716 0.9345554709 0.9290462136
+ 0.9335150719 0.9351192117 0.9296582937
+ 0.9340577126 0.9356828928 0.9302704930
+ 0.9346002936 0.9362466931 0.9308826923
+ 0.9351428747 0.9368103743 0.9314947724
+ 0.9356855154 0.9373741150 0.9321069717
+ 0.9362280965 0.9379379153 0.9327191114
+ 0.9367706776 0.9385015965 0.9333313107
+ 0.9373133183 0.9390652776 0.9339435101
+ 0.9378558993 0.9396290779 0.9345555902
+ 0.9383984804 0.9401928186 0.9351677895
+ 0.9389411211 0.9407566190 0.9357799292
+ 0.9394807220 0.9413191080 0.9363880754
+ 0.9400200844 0.9418814778 0.9369959235
+ 0.9405596256 0.9424440265 0.9376037717
+ 0.9410989881 0.9430063963 0.9382116795
+ 0.9416384101 0.9435688853 0.9388195276
+ 0.9421778917 0.9441313148 0.9394273758
+ 0.9427173138 0.9446938038 0.9400352836
+ 0.9432566762 0.9452561736 0.9406430721
+ 0.9437962174 0.9458187222 0.9412509799
+ 0.9443355799 0.9463812113 0.9418588877
+ 0.9448750019 0.9469435811 0.9424667954
+ 0.9454144835 0.9475061297 0.9430745840
+ 0.9459543228 0.9480664730 0.9436799884
+ 0.9464944005 0.9486256838 0.9442839026
+ 0.9470344782 0.9491848946 0.9448878169
+ 0.9475746155 0.9497442245 0.9454916716
+ 0.9481146932 0.9503033757 0.9460955858
+ 0.9486547709 0.9508627057 0.9466995001
+ 0.9491950274 0.9514219165 0.9473034143
+ 0.9497351050 0.9519811869 0.9479073286
+ 0.9502751827 0.9525403976 0.9485111833
+ 0.9508153200 0.9530997276 0.9491150975
+ 0.9513553977 0.9536588788 0.9497190118
+ 0.9518954754 0.9542182088 0.9503229856
+ 0.9524348974 0.9547764063 0.9509251714
+ 0.9529715180 0.9553294778 0.9515191913
+ 0.9535080194 0.9558826089 0.9521132112
+ 0.9540445209 0.9564357996 0.9527071714
+ 0.9545810819 0.9569888711 0.9533010721
+ 0.9551175833 0.9575420022 0.9538950920
+ 0.9556540847 0.9580950737 0.9544891119
+ 0.9561907053 0.9586482048 0.9550830722
+ 0.9567272067 0.9592013955 0.9556770921
+ 0.9572637081 0.9597545266 0.9562711120
+ 0.9578003287 0.9603075981 0.9568650723
+ 0.9583367705 0.9608607292 0.9574589729
+ 0.9588732719 0.9614138007 0.9580529928
+ 0.9594082236 0.9619622827 0.9586417079
+ 0.9599416256 0.9625064731 0.9592257142
+ 0.9604749084 0.9630507231 0.9598097205
+ 0.9610083103 0.9635949135 0.9603936076
+ 0.9615417123 0.9641392231 0.9609776139
+ 0.9620749950 0.9646834135 0.9615616202
+ 0.9626083970 0.9652276039 0.9621456265
+ 0.9631417990 0.9657717943 0.9627295136
+ 0.9636752009 0.9663161039 0.9633135200
+ 0.9642084837 0.9668602943 0.9638975263
+ 0.9647418857 0.9674044847 0.9644814134
+ 0.9652752876 0.9679486752 0.9650654197
+ 0.9658085704 0.9684929848 0.9656494260
+ 0.9663383961 0.9690269232 0.9662256837
+ 0.9668667912 0.9695569277 0.9667990208
+ 0.9673951864 0.9700868130 0.9673721790
+ 0.9679235816 0.9706168175 0.9679455161
+ 0.9684519768 0.9711467028 0.9685187936
+ 0.9689803720 0.9716767073 0.9690920115
+ 0.9695087075 0.9722065926 0.9696652889
+ 0.9700371027 0.9727365971 0.9702386260
+ 0.9705654979 0.9732664824 0.9708117843
+ 0.9710938931 0.9737964272 0.9713851213
+ 0.9716222882 0.9743263721 0.9719583988
+ 0.9721506834 0.9748563170 0.9725316167
+ 0.9726790786 0.9753863215 0.9731048942
+ 0.9732028842 0.9759041071 0.9736629725
+ 0.9737251997 0.9764174819 0.9742156267
+ 0.9742473960 0.9769309759 0.9747681022
+ 0.9747695923 0.9774444103 0.9753205776
+ 0.9752919078 0.9779577851 0.9758731723
+ 0.9758141041 0.9784712195 0.9764257073
+ 0.9763363004 0.9789845943 0.9769781828
+ 0.9768586159 0.9794980288 0.9775307178
+ 0.9773808122 0.9800114036 0.9780833125
+ 0.9779031277 0.9805248976 0.9786357880
+ 0.9784253240 0.9810382724 0.9791883230
+ 0.9789475203 0.9815517068 0.9797409177
+ 0.9794697762 0.9820650816 0.9802933931
+ 0.9799848199 0.9825599790 0.9808300734
+ 0.9804943800 0.9830408096 0.9813547134
+ 0.9810041189 0.9835215807 0.9818794131
+ 0.9815136790 0.9840024114 0.9824039936
+ 0.9820232987 0.9844831824 0.9829286933
+ 0.9825329781 0.9849640131 0.9834532738
+ 0.9830425978 0.9854447842 0.9839779735
+ 0.9835522175 0.9859256148 0.9845026135
+ 0.9840617776 0.9864063859 0.9850273132
+ 0.9845715165 0.9868872166 0.9855518937
+ 0.9850810766 0.9873679876 0.9860765934
+ 0.9855906963 0.9878488183 0.9866011739
+ 0.9861003757 0.9883295894 0.9871258736
+ 0.9866076112 0.9888011813 0.9876428843
+ 0.9871065021 0.9892416000 0.9881339073
+ 0.9876055121 0.9896820188 0.9886249900
+ 0.9881045222 0.9901223779 0.9891160131
+ 0.9886034727 0.9905629158 0.9896070957
+ 0.9891024828 0.9910032749 0.9900981188
+ 0.9896014929 0.9914436936 0.9905890822
+ 0.9901003838 0.9918841124 0.9910802245
+ 0.9905993938 0.9923244715 0.9915711880
+ 0.9910984039 0.9927648902 0.9920622706
+ 0.9915974140 0.9932053089 0.9925532937
+ 0.9920964241 0.9936457276 0.9930443764
+ 0.9925953746 0.9940860868 0.9935353994
+ 0.9930943847 0.9945266247 0.9940264821
+ 0.9935892224 0.9949312806 0.9944710732
+ 0.9940823913 0.9953212142 0.9948964119
+ 0.9945755005 0.9957110882 0.9953216910
+ 0.9950686097 0.9961010218 0.9957470298
+ 0.9955617785 0.9964908957 0.9961723089
+ 0.9960548878 0.9968808293 0.9965975881
+ 0.9965479970 0.9972707033 0.9970229268
+ 0.9970412254 0.9976605773 0.9974482059
+ 0.9975342751 0.9980505109 0.9978734851
+ 0.9980275035 0.9984403849 0.9982988238
+ 0.9985206127 0.9988303185 0.9987241030
+ 0.9990137219 0.9992201924 0.9991493821
+ 0.9995068908 0.9996101260 0.9995747209
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/kodak_portra_400vc.spi1d b/release/datafiles/colormanagement/luts/film_response/kodak_portra_400vc.spi1d
new file mode 100644
index 00000000000..3bbe6e7b633
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/kodak_portra_400vc.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0086291339 0.0078005488 0.0061553409
+ 0.0166279394 0.0149212098 0.0115477303
+ 0.0234502498 0.0210635699 0.0162159093
+ 0.0294977706 0.0264640693 0.0204165298
+ 0.0349041112 0.0313926600 0.0242713001
+ 0.0398604982 0.0359628201 0.0279128905
+ 0.0445825197 0.0402758084 0.0313868709
+ 0.0489878207 0.0443142913 0.0346947797
+ 0.0532177314 0.0482137911 0.0378837399
+ 0.0572355017 0.0519315116 0.0409737006
+ 0.0610651597 0.0555156991 0.0439543799
+ 0.0647805408 0.0590067990 0.0468649715
+ 0.0684034899 0.0623898692 0.0496960990
+ 0.0719185919 0.0656935796 0.0524532497
+ 0.0753464922 0.0688895881 0.0551457889
+ 0.0786892101 0.0719943792 0.0577957407
+ 0.0819205269 0.0749978498 0.0603696108
+ 0.0850563273 0.0779183879 0.0628900677
+ 0.0881082267 0.0807836503 0.0653679967
+ 0.0910997614 0.0836165026 0.0678165331
+ 0.0940506533 0.0864003077 0.0702505037
+ 0.0969373211 0.0891356766 0.0726604089
+ 0.0997503623 0.0918305814 0.0750340968
+ 0.1025146991 0.0944881588 0.0773660317
+ 0.1052661017 0.0971041918 0.0796465725
+ 0.1079823002 0.0997008383 0.0818920732
+ 0.1106742024 0.1022529975 0.0840972289
+ 0.1133475006 0.1047334000 0.0862670168
+ 0.1159679964 0.1071522981 0.0884032026
+ 0.1185553968 0.1095331982 0.0905269608
+ 0.1210843995 0.1118893027 0.0926406905
+ 0.1235641018 0.1142370030 0.0947492719
+ 0.1260133982 0.1165516973 0.0968295410
+ 0.1284331977 0.1188732013 0.0988966897
+ 0.1308183968 0.1211699992 0.1009425968
+ 0.1331772059 0.1234538034 0.1029729024
+ 0.1355085969 0.1256996989 0.1049892977
+ 0.1378096938 0.1279380023 0.1069732010
+ 0.1400966942 0.1301369965 0.1089397967
+ 0.1423414052 0.1323242038 0.1109104976
+ 0.1445591003 0.1344671994 0.1128705963
+ 0.1467431933 0.1365955025 0.1148163974
+ 0.1489122063 0.1386837959 0.1167598963
+ 0.1510476023 0.1407471001 0.1186747029
+ 0.1531807929 0.1428090930 0.1205610037
+ 0.1553075016 0.1448387057 0.1224154979
+ 0.1574216038 0.1468652934 0.1242436990
+ 0.1595198959 0.1488717943 0.1260575950
+ 0.1615947932 0.1508519948 0.1278496981
+ 0.1636703014 0.1528411955 0.1296253949
+ 0.1657373011 0.1548041999 0.1313930005
+ 0.1677850038 0.1567573994 0.1331461966
+ 0.1698163003 0.1587090939 0.1349010020
+ 0.1718430966 0.1606369019 0.1366534978
+ 0.1738559008 0.1625535041 0.1383929998
+ 0.1758597046 0.1644703001 0.1401329041
+ 0.1778582931 0.1663694978 0.1418718994
+ 0.1798356026 0.1682510972 0.1436001062
+ 0.1817937940 0.1701292992 0.1453143060
+ 0.1837290972 0.1719716042 0.1470246017
+ 0.1856500059 0.1737944931 0.1487206072
+ 0.1875600070 0.1756183952 0.1504009068
+ 0.1894560009 0.1774290055 0.1520728022
+ 0.1913280934 0.1792113930 0.1537348032
+ 0.1931733042 0.1809861064 0.1554002017
+ 0.1949937940 0.1827580035 0.1570577025
+ 0.1968041956 0.1845048070 0.1587098986
+ 0.1985995024 0.1862314939 0.1603520066
+ 0.2003758997 0.1879574060 0.1619874984
+ 0.2021435946 0.1896872967 0.1636175960
+ 0.2039009035 0.1914020032 0.1652458012
+ 0.2056314051 0.1931017041 0.1668601930
+ 0.2073460072 0.1948022991 0.1684632003
+ 0.2090656012 0.1965142041 0.1700568050
+ 0.2107871026 0.1982153952 0.1716396064
+ 0.2125017941 0.1999046952 0.1732196957
+ 0.2142132074 0.2015919983 0.1747861952
+ 0.2159194946 0.2032641023 0.1763374954
+ 0.2176184952 0.2049120069 0.1778807938
+ 0.2193064988 0.2065432072 0.1794188023
+ 0.2209898978 0.2081688046 0.1809532940
+ 0.2226741016 0.2097914070 0.1824879944
+ 0.2243521959 0.2114066035 0.1840219945
+ 0.2260199040 0.2130115032 0.1855459064
+ 0.2276818007 0.2146048993 0.1870635003
+ 0.2293322980 0.2161996961 0.1885785013
+ 0.2309723049 0.2177951932 0.1900880039
+ 0.2325980961 0.2193817049 0.1915943027
+ 0.2342166007 0.2209558040 0.1930999011
+ 0.2358343005 0.2225205004 0.1946053058
+ 0.2374477983 0.2240840048 0.1961077005
+ 0.2390588969 0.2256534994 0.1975979954
+ 0.2406685948 0.2272066027 0.1990832984
+ 0.2422688007 0.2287465930 0.2005632073
+ 0.2438556999 0.2302782983 0.2020380944
+ 0.2454296947 0.2318089008 0.2035095990
+ 0.2469906062 0.2333444953 0.2049811035
+ 0.2485449016 0.2348676026 0.2064442933
+ 0.2500948012 0.2363775969 0.2079003006
+ 0.2516424954 0.2378765941 0.2093524039
+ 0.2531889081 0.2393742949 0.2107995003
+ 0.2547358871 0.2408725023 0.2122382969
+ 0.2562828064 0.2423699051 0.2136691064
+ 0.2578260899 0.2438611984 0.2150931954
+ 0.2593621910 0.2453383952 0.2165144980
+ 0.2608925104 0.2468091995 0.2179322988
+ 0.2624158859 0.2482766062 0.2193447053
+ 0.2639254928 0.2497424036 0.2207508981
+ 0.2654292881 0.2512080073 0.2221533954
+ 0.2669275999 0.2526736856 0.2235517055
+ 0.2684175968 0.2541224957 0.2249393016
+ 0.2699044943 0.2555668056 0.2263229042
+ 0.2713881135 0.2570067048 0.2277022004
+ 0.2728621960 0.2584454119 0.2290780991
+ 0.2743291855 0.2598778009 0.2304508984
+ 0.2757858038 0.2613000870 0.2318188995
+ 0.2772283852 0.2627094984 0.2331835032
+ 0.2786627114 0.2641144991 0.2345474958
+ 0.2800801098 0.2655147016 0.2359123975
+ 0.2814942896 0.2669171095 0.2372698933
+ 0.2829064131 0.2683207989 0.2386226058
+ 0.2843183875 0.2697081864 0.2399670929
+ 0.2857283056 0.2710885108 0.2413100004
+ 0.2871338129 0.2724551857 0.2426497042
+ 0.2885296047 0.2738170922 0.2439855933
+ 0.2899203002 0.2751764059 0.2453195006
+ 0.2913027108 0.2765411139 0.2466553003
+ 0.2926810980 0.2779048085 0.2479909062
+ 0.2940480113 0.2792651057 0.2493253052
+ 0.2954030931 0.2806189060 0.2506527901
+ 0.2967463136 0.2819663882 0.2519730926
+ 0.2980836928 0.2833054066 0.2532927990
+ 0.2994191051 0.2846412957 0.2546122074
+ 0.3007619083 0.2859781981 0.2559292912
+ 0.3021047115 0.2873162031 0.2572456896
+ 0.3034440875 0.2886605859 0.2585586011
+ 0.3047791123 0.2899999022 0.2598730028
+ 0.3061031103 0.2913272977 0.2611911893
+ 0.3074271083 0.2926500142 0.2625049949
+ 0.3087511957 0.2939665914 0.2638128996
+ 0.3100728095 0.2952839136 0.2651130855
+ 0.3113921881 0.2966020107 0.2664063871
+ 0.3127081990 0.2979249954 0.2676930130
+ 0.3140223026 0.2992509007 0.2689754069
+ 0.3153294921 0.3005655110 0.2702546120
+ 0.3166336119 0.3018752038 0.2715322971
+ 0.3179413080 0.3031772077 0.2728073001
+ 0.3192504048 0.3044762909 0.2740811110
+ 0.3205552101 0.3057742119 0.2753461003
+ 0.3218581975 0.3070715070 0.2766075134
+ 0.3231492043 0.3083544075 0.2778604031
+ 0.3244349062 0.3096314073 0.2791095972
+ 0.3257190883 0.3108929992 0.2803491056
+ 0.3270024955 0.3121466935 0.2815833986
+ 0.3282819092 0.3133935034 0.2828159034
+ 0.3295584023 0.3146354854 0.2840468884
+ 0.3308312893 0.3158772886 0.2852747142
+ 0.3321002126 0.3171189129 0.2864989042
+ 0.3333649933 0.3183605075 0.2877179980
+ 0.3346219063 0.3196018934 0.2889271975
+ 0.3358792067 0.3208408952 0.2901360095
+ 0.3371385932 0.3220691979 0.2913432121
+ 0.3383980095 0.3232975006 0.2925504148
+ 0.3396492004 0.3245128095 0.2937470973
+ 0.3409003019 0.3257280886 0.2949436903
+ 0.3421368003 0.3269419074 0.2961353958
+ 0.3433690071 0.3281553984 0.2973257005
+ 0.3445987105 0.3293735981 0.2985163927
+ 0.3458260894 0.3305962980 0.2997077107
+ 0.3470515013 0.3318206072 0.3008984029
+ 0.3482699096 0.3330497146 0.3020871878
+ 0.3494882882 0.3342789114 0.3032760024
+ 0.3507004976 0.3354977071 0.3044616878
+ 0.3519122005 0.3367156088 0.3056469858
+ 0.3531202972 0.3379318118 0.3068349957
+ 0.3543255925 0.3391467035 0.3080250025
+ 0.3555307984 0.3403621018 0.3092128932
+ 0.3567352891 0.3415792882 0.3103924990
+ 0.3579396904 0.3427965045 0.3115719855
+ 0.3591400981 0.3439978957 0.3127532005
+ 0.3603394926 0.3451952934 0.3139348030
+ 0.3615379930 0.3463875949 0.3151153028
+ 0.3627347052 0.3475709856 0.3162938058
+ 0.3639313877 0.3487544060 0.3174723089
+ 0.3651260138 0.3499352038 0.3186487854
+ 0.3663201928 0.3511157036 0.3198249936
+ 0.3675152957 0.3522970974 0.3210014999
+ 0.3687118888 0.3534801006 0.3221786916
+ 0.3699085116 0.3546631038 0.3233557940
+ 0.3711037934 0.3558301926 0.3245329857
+ 0.3722988069 0.3569942117 0.3257102966
+ 0.3734931946 0.3581548035 0.3268885911
+ 0.3746860027 0.3593055010 0.3280701935
+ 0.3758786917 0.3604561985 0.3292517960
+ 0.3770669103 0.3616054058 0.3304269016
+ 0.3782525063 0.3627535999 0.3315981925
+ 0.3794381022 0.3639019132 0.3327696025
+ 0.3806130886 0.3650487065 0.3339313865
+ 0.3817881048 0.3661954105 0.3350929916
+ 0.3829604089 0.3673394918 0.3362526000
+ 0.3841269910 0.3684779108 0.3374074101
+ 0.3852936029 0.3696162999 0.3385623097
+ 0.3864552975 0.3707447052 0.3397139013
+ 0.3876137137 0.3718662858 0.3408631980
+ 0.3887721896 0.3729878962 0.3420126140
+ 0.3899284899 0.3741044998 0.3431645036
+ 0.3910844922 0.3752200007 0.3443169892
+ 0.3922401071 0.3763357997 0.3454687893
+ 0.3933893144 0.3774558902 0.3466030955
+ 0.3945386112 0.3785760105 0.3477374911
+ 0.3956862092 0.3796963990 0.3488697112
+ 0.3968279064 0.3808178902 0.3499937057
+ 0.3979696035 0.3819392920 0.3511176109
+ 0.3991076052 0.3830555975 0.3522385061
+ 0.4002385139 0.3841623068 0.3533534110
+ 0.4013693929 0.3852689862 0.3544682860
+ 0.4024933875 0.3863726854 0.3555805981
+ 0.4036085010 0.3874725103 0.3566895127
+ 0.4047234952 0.3885723054 0.3577983975
+ 0.4058330059 0.3896723092 0.3589071929
+ 0.4069365859 0.3907727003 0.3600156903
+ 0.4080401957 0.3918730021 0.3611243069
+ 0.4091409147 0.3929738104 0.3622342050
+ 0.4102385938 0.3940750062 0.3633455932
+ 0.4113362134 0.3951762021 0.3644570112
+ 0.4124296904 0.3962723017 0.3655647933
+ 0.4135183096 0.3973628879 0.3666686118
+ 0.4146068990 0.3984535933 0.3677723110
+ 0.4156936109 0.3995419145 0.3688744903
+ 0.4167774022 0.4006268978 0.3699742854
+ 0.4178611040 0.4017120004 0.3710741103
+ 0.4189420044 0.4027974904 0.3721716106
+ 0.4200159013 0.4038844109 0.3732632101
+ 0.4210897088 0.4049712121 0.3743548989
+ 0.4221613109 0.4060561061 0.3754456043
+ 0.4232189953 0.4071291983 0.3765301108
+ 0.4242765903 0.4082024097 0.3776144981
+ 0.4253341854 0.4092755914 0.3786988854
+ 0.4263879955 0.4103333056 0.3797815144
+ 0.4274415076 0.4113903046 0.3808639050
+ 0.4284951091 0.4124472141 0.3819462955
+ 0.4295487106 0.4134993851 0.3830277026
+ 0.4306023121 0.4145495892 0.3841085136
+ 0.4316559136 0.4155999124 0.3851892948
+ 0.4327076077 0.4166513085 0.3862665892
+ 0.4337567091 0.4177044034 0.3873386979
+ 0.4348058105 0.4187574983 0.3884108961
+ 0.4358538985 0.4198100865 0.3894824088
+ 0.4368919134 0.4208576977 0.3905462921
+ 0.4379299879 0.4219053984 0.3916102946
+ 0.4389680028 0.4229530990 0.3926742971
+ 0.4400067031 0.4239928126 0.3937354982
+ 0.4410456121 0.4250294864 0.3947955072
+ 0.4420844913 0.4260661900 0.3958554864
+ 0.4431211054 0.4271000028 0.3969140053
+ 0.4441522956 0.4281272888 0.3979691863
+ 0.4451833963 0.4291546047 0.3990243077
+ 0.4462144971 0.4301818907 0.4000793993
+ 0.4472317100 0.4312092960 0.4011329114
+ 0.4482460916 0.4322367013 0.4021860957
+ 0.4492605031 0.4332641959 0.4032391906
+ 0.4502733946 0.4342932105 0.4042918980
+ 0.4512828887 0.4353255928 0.4053437114
+ 0.4522925019 0.4363580048 0.4063954949
+ 0.4533020854 0.4373905063 0.4074473083
+ 0.4543111026 0.4384124875 0.4084874094
+ 0.4553197920 0.4394313991 0.4095237851
+ 0.4563286006 0.4404503107 0.4105601907
+ 0.4573364854 0.4414677918 0.4115959108
+ 0.4583398104 0.4424777925 0.4126274884
+ 0.4593431056 0.4434877038 0.4136590958
+ 0.4603464007 0.4444975853 0.4146907032
+ 0.4613440037 0.4455075860 0.4157181084
+ 0.4623357058 0.4465177059 0.4167410135
+ 0.4633274078 0.4475277066 0.4177640080
+ 0.4643191993 0.4485377967 0.4187869132
+ 0.4653109908 0.4495514035 0.4198037088
+ 0.4663026929 0.4505659938 0.4208188057
+ 0.4672945142 0.4515804946 0.4218339026
+ 0.4682861865 0.4525944889 0.4228489995
+ 0.4692744911 0.4535953999 0.4238614142
+ 0.4702627957 0.4545961916 0.4248737097
+ 0.4712511003 0.4555971026 0.4258860946
+ 0.4722385108 0.4565958977 0.4268980026
+ 0.4732227027 0.4575876892 0.4279080927
+ 0.4742070138 0.4585795999 0.4289183021
+ 0.4751912951 0.4595713913 0.4299283922
+ 0.4761728942 0.4605633020 0.4309360981
+ 0.4771496952 0.4615552127 0.4319396913
+ 0.4781264961 0.4625470936 0.4329431951
+ 0.4791032970 0.4635390043 0.4339466989
+ 0.4800817966 0.4645307064 0.4349519014
+ 0.4810624123 0.4655222893 0.4359593987
+ 0.4820429981 0.4665139019 0.4369668067
+ 0.4830236137 0.4675053954 0.4379743040
+ 0.4840019941 0.4684920907 0.4389804900
+ 0.4849779904 0.4694738090 0.4399853051
+ 0.4859539866 0.4704554975 0.4409902096
+ 0.4869301021 0.4714370966 0.4419949949
+ 0.4879001081 0.4724138081 0.4429973066
+ 0.4888631999 0.4733850062 0.4439963996
+ 0.4898262918 0.4743562043 0.4449956119
+ 0.4907892942 0.4753274024 0.4459947944
+ 0.4917517006 0.4762980044 0.4469918907
+ 0.4927130938 0.4772675931 0.4479857981
+ 0.4936743975 0.4782372117 0.4489797056
+ 0.4946357012 0.4792068005 0.4499736130
+ 0.4955956042 0.4801762998 0.4509660006
+ 0.4965516925 0.4811457098 0.4519538879
+ 0.4975079000 0.4821150899 0.4529418051
+ 0.4984639883 0.4830844998 0.4539296925
+ 0.4994196892 0.4840534031 0.4549174011
+ 0.5003700852 0.4850172102 0.4559034109
+ 0.5013206005 0.4859808981 0.4568893015
+ 0.5022711158 0.4869445860 0.4578751922
+ 0.5032215118 0.4879083037 0.4588611126
+ 0.5041645169 0.4888612032 0.4598459005
+ 0.5051059127 0.4898119867 0.4608305097
+ 0.5060474277 0.4907627106 0.4618149996
+ 0.5069888234 0.4917134941 0.4627996087
+ 0.5079312921 0.4926620126 0.4637798965
+ 0.5088745952 0.4936085045 0.4647563100
+ 0.5098178983 0.4945549965 0.4657326937
+ 0.5107612014 0.4955014884 0.4667089880
+ 0.5117039084 0.4964486957 0.4676840901
+ 0.5126433969 0.4973995090 0.4686524868
+ 0.5135828853 0.4983502924 0.4696210027
+ 0.5145223737 0.4993009865 0.4705893993
+ 0.5154619217 0.5002518296 0.4715577960
+ 0.5163952708 0.5012043118 0.4725238979
+ 0.5173267126 0.5021573901 0.4734891057
+ 0.5182582140 0.5031105280 0.4744544029
+ 0.5191895962 0.5040636063 0.4754197001
+ 0.5201197863 0.5050135255 0.4763843119
+ 0.5210466981 0.5059555173 0.4773474038
+ 0.5219736099 0.5068973899 0.4783104062
+ 0.5229005218 0.5078393817 0.4792734981
+ 0.5238274932 0.5087813735 0.4802365899
+ 0.5247486830 0.5097197294 0.4811953008
+ 0.5256680846 0.5106567144 0.4821526110
+ 0.5265874267 0.5115938187 0.4831098914
+ 0.5275068283 0.5125308037 0.4840672016
+ 0.5284252763 0.5134680271 0.4850249887
+ 0.5293390155 0.5144063234 0.4859859049
+ 0.5302528143 0.5153445005 0.4869467914
+ 0.5311664939 0.5162826777 0.4879077077
+ 0.5320801735 0.5172209740 0.4888687134
+ 0.5329914093 0.5181534290 0.4898253977
+ 0.5338997245 0.5190796256 0.4907774925
+ 0.5348079801 0.5200058222 0.4917295873
+ 0.5357164145 0.5209320784 0.4926817119
+ 0.5366247296 0.5218582749 0.4936338067
+ 0.5375316739 0.5227739215 0.4945797026
+ 0.5384383202 0.5236862898 0.4955236018
+ 0.5393447876 0.5245985985 0.4964675009
+ 0.5402513742 0.5255110264 0.4974114001
+ 0.5411579013 0.5264232755 0.4983552992
+ 0.5420578122 0.5273302197 0.4992960095
+ 0.5429574251 0.5282369256 0.5002363920
+ 0.5438570976 0.5291436911 0.5011768937
+ 0.5447567105 0.5300503969 0.5021173954
+ 0.5456550717 0.5309572220 0.5030577779
+ 0.5465437174 0.5318645835 0.5039975047
+ 0.5474323034 0.5327720046 0.5049371123
+ 0.5483208895 0.5336794257 0.5058767796
+ 0.5492094755 0.5345867872 0.5068165064
+ 0.5500965118 0.5354917049 0.5077555180
+ 0.5509771109 0.5363870263 0.5086914897
+ 0.5518578291 0.5372822881 0.5096275210
+ 0.5527384281 0.5381776094 0.5105633736
+ 0.5536190271 0.5390728712 0.5114994049
+ 0.5545002222 0.5399649739 0.5124346018
+ 0.5553833246 0.5408456922 0.5133668780
+ 0.5562664866 0.5417262912 0.5142992139
+ 0.5571495891 0.5426068902 0.5152313709
+ 0.5580328107 0.5434876084 0.5161637068
+ 0.5589159131 0.5443671942 0.5170946121
+ 0.5597988963 0.5452414751 0.5180175900
+ 0.5606818795 0.5461158156 0.5189406872
+ 0.5615649223 0.5469899774 0.5198637843
+ 0.5624479055 0.5478643179 0.5207868218
+ 0.5633308887 0.5487385988 0.5217097998
+ 0.5642132163 0.5496147871 0.5226305127
+ 0.5650954247 0.5504909158 0.5235512257
+ 0.5659775734 0.5513671041 0.5244718790
+ 0.5668599010 0.5522431731 0.5253925920
+ 0.5677421093 0.5531194210 0.5263133049
+ 0.5686208010 0.5539948940 0.5272328854
+ 0.5694987178 0.5548701882 0.5281524062
+ 0.5703766942 0.5557454824 0.5290718079
+ 0.5712546110 0.5566208959 0.5299912095
+ 0.5721325874 0.5574961901 0.5309106112
+ 0.5730063915 0.5583639145 0.5318285227
+ 0.5738772154 0.5592259765 0.5327451229
+ 0.5747479200 0.5600880980 0.5336617231
+ 0.5756186843 0.5609502196 0.5345783234
+ 0.5764895082 0.5618122816 0.5354949236
+ 0.5773584247 0.5626726747 0.5364094973
+ 0.5782213807 0.5635278821 0.5373175144
+ 0.5790842772 0.5643829703 0.5382254124
+ 0.5799472928 0.5652381182 0.5391334295
+ 0.5808103085 0.5660933256 0.5400413871
+ 0.5816733241 0.5669484138 0.5409492850
+ 0.5825272799 0.5678043962 0.5418502092
+ 0.5833795071 0.5686606169 0.5427495241
+ 0.5842316747 0.5695167184 0.5436487794
+ 0.5850839019 0.5703728795 0.5445482135
+ 0.5859361291 0.5712291002 0.5454475284
+ 0.5867881775 0.5720869899 0.5463449955
+ 0.5876401067 0.5729479790 0.5472388864
+ 0.5884919167 0.5738090873 0.5481327772
+ 0.5893437862 0.5746700764 0.5490267277
+ 0.5901955962 0.5755311847 0.5499206781
+ 0.5910475254 0.5763922930 0.5508146286
+ 0.5918961763 0.5772445202 0.5517038107
+ 0.5927441716 0.5780944824 0.5525919199
+ 0.5935921073 0.5789445043 0.5534799099
+ 0.5944401026 0.5797945857 0.5543678999
+ 0.5952879786 0.5806446075 0.5552558899
+ 0.5961351991 0.5814933777 0.5561434031
+ 0.5969787836 0.5823364854 0.5570282936
+ 0.5978223085 0.5831795931 0.5579131246
+ 0.5986657739 0.5840227008 0.5587978959
+ 0.5995092988 0.5848656893 0.5596827865
+ 0.6003528833 0.5857087970 0.5605676174
+ 0.6011931896 0.5865523219 0.5614522099
+ 0.6020298004 0.5873963237 0.5623363853
+ 0.6028664112 0.5882403255 0.5632206202
+ 0.6037030220 0.5890843272 0.5641047955
+ 0.6045395732 0.5899283290 0.5649890900
+ 0.6053761840 0.5907722712 0.5658733249
+ 0.6062102914 0.5916194916 0.5667579174
+ 0.6070430875 0.5924683213 0.5676426291
+ 0.6078760028 0.5933170915 0.5685272813
+ 0.6087087989 0.5941658020 0.5694121122
+ 0.6095417142 0.5950145721 0.5702968240
+ 0.6103746295 0.5958634019 0.5711815953
+ 0.6112043858 0.5967034101 0.5720716119
+ 0.6120336056 0.5975413918 0.5729628205
+ 0.6128627062 0.5983793736 0.5738540292
+ 0.6136919260 0.5992174149 0.5747451782
+ 0.6145210862 0.6000553966 0.5756365061
+ 0.6153501868 0.6008933783 0.5765277147
+ 0.6161777973 0.6017255187 0.5774099231
+ 0.6170051098 0.6025568247 0.5782908201
+ 0.6178324223 0.6033880115 0.5791717172
+ 0.6186597943 0.6042193174 0.5800524950
+ 0.6194871068 0.6050505042 0.5809333920
+ 0.6203144193 0.6058818102 0.5818142295
+ 0.6211380959 0.6067138910 0.5826920271
+ 0.6219611764 0.6075462103 0.5835691094
+ 0.6227841973 0.6083784103 0.5844463110
+ 0.6236072779 0.6092107296 0.5853233933
+ 0.6244302988 0.6100429893 0.5862005949
+ 0.6252533793 0.6108751893 0.5870776772
+ 0.6260753274 0.6117079258 0.5879529119
+ 0.6268969178 0.6125406027 0.5888274908
+ 0.6277183890 0.6133733988 0.5897021294
+ 0.6285399199 0.6142061949 0.5905765891
+ 0.6293615103 0.6150388718 0.5914512277
+ 0.6301829815 0.6158717275 0.5923258066
+ 0.6310017109 0.6166999936 0.5932002068
+ 0.6318179965 0.6175248027 0.5940744281
+ 0.6326344013 0.6183496118 0.5949487090
+ 0.6334508061 0.6191744208 0.5958228707
+ 0.6342670918 0.6199991703 0.5966970921
+ 0.6350834966 0.6208239794 0.5975713730
+ 0.6358969808 0.6216465235 0.5984457135
+ 0.6367033720 0.6224632263 0.5993201137
+ 0.6375098228 0.6232798100 0.6001945138
+ 0.6383162141 0.6240965128 0.6010689735
+ 0.6391226053 0.6249132156 0.6019433737
+ 0.6399289966 0.6257297993 0.6028177738
+ 0.6407353878 0.6265465021 0.6036921740
+ 0.6415356994 0.6273627281 0.6045618057
+ 0.6423354745 0.6281787753 0.6054310799
+ 0.6431353092 0.6289948821 0.6063002944
+ 0.6439350843 0.6298109889 0.6071695089
+ 0.6447349191 0.6306270957 0.6080387235
+ 0.6455346942 0.6314432025 0.6089078784
+ 0.6463314891 0.6322597861 0.6097748876
+ 0.6471250057 0.6330770850 0.6106392741
+ 0.6479185820 0.6338943243 0.6115037799
+ 0.6487122178 0.6347116232 0.6123682261
+ 0.6495056748 0.6355288029 0.6132326722
+ 0.6502993107 0.6363461018 0.6140971184
+ 0.6510928869 0.6371632814 0.6149616241
+ 0.6518819928 0.6379770041 0.6158189178
+ 0.6526708007 0.6387906075 0.6166757941
+ 0.6534597278 0.6396042109 0.6175327897
+ 0.6542485952 0.6404178143 0.6183897257
+ 0.6550374031 0.6412314177 0.6192467213
+ 0.6558262706 0.6420449018 0.6201035976
+ 0.6566126943 0.6428549886 0.6209588051
+ 0.6573941112 0.6436582804 0.6218106151
+ 0.6581755280 0.6444615722 0.6226623058
+ 0.6589568853 0.6452649236 0.6235139966
+ 0.6597383022 0.6460682154 0.6243656874
+ 0.6605197191 0.6468715072 0.6252173781
+ 0.6613010168 0.6476747990 0.6260691881
+ 0.6620833874 0.6484764218 0.6269180179
+ 0.6628664136 0.6492767930 0.6277649999
+ 0.6636493206 0.6500772834 0.6286119819
+ 0.6644322872 0.6508777738 0.6294590831
+ 0.6652151942 0.6516783237 0.6303061247
+ 0.6659982204 0.6524788141 0.6311531067
+ 0.6667811275 0.6532791853 0.6320002079
+ 0.6675598025 0.6540803909 0.6328403950
+ 0.6683375835 0.6548817754 0.6336792111
+ 0.6691154242 0.6556832194 0.6345179081
+ 0.6698932052 0.6564844847 0.6353567243
+ 0.6706709862 0.6572859287 0.6361954212
+ 0.6714488268 0.6580871940 0.6370341778
+ 0.6722266078 0.6588885784 0.6378728747
+ 0.6729933023 0.6596770287 0.6387121081
+ 0.6737592816 0.6604645252 0.6395512223
+ 0.6745253205 0.6612520814 0.6403903961
+ 0.6752912998 0.6620395780 0.6412295103
+ 0.6760572791 0.6628271937 0.6420686841
+ 0.6768233180 0.6636146903 0.6429077983
+ 0.6775892973 0.6644023061 0.6437469721
+ 0.6783525944 0.6651803851 0.6445764899
+ 0.6791155934 0.6659579873 0.6454054117
+ 0.6798787117 0.6667355895 0.6462342739
+ 0.6806417704 0.6675131917 0.6470631957
+ 0.6814048886 0.6682907939 0.6478921175
+ 0.6821680069 0.6690683961 0.6487209797
+ 0.6829311252 0.6698459983 0.6495499015
+ 0.6836892962 0.6706212759 0.6503704190
+ 0.6844468117 0.6713961959 0.6511895061
+ 0.6852043271 0.6721711755 0.6520085931
+ 0.6859617829 0.6729462147 0.6528277993
+ 0.6867192984 0.6737210751 0.6536468863
+ 0.6874766946 0.6744961143 0.6544659734
+ 0.6882342100 0.6752710938 0.6552851796
+ 0.6889876127 0.6760479808 0.6560990810
+ 0.6897391081 0.6768258810 0.6569107175
+ 0.6904906034 0.6776037216 0.6577221751
+ 0.6912420988 0.6783815026 0.6585338116
+ 0.6919935942 0.6791594028 0.6593453884
+ 0.6927450895 0.6799371839 0.6601569057
+ 0.6934965849 0.6807150841 0.6609684825
+ 0.6942445040 0.6814894080 0.6617767215
+ 0.6949872971 0.6822587848 0.6625800729
+ 0.6957302094 0.6830282211 0.6633834243
+ 0.6964730024 0.6837977171 0.6641867757
+ 0.6972159147 0.6845670938 0.6649901867
+ 0.6979587078 0.6853365898 0.6657935977
+ 0.6987016201 0.6861060262 0.6665970087
+ 0.6994444132 0.6868749261 0.6674001813
+ 0.7001873255 0.6876338124 0.6682003736
+ 0.7009301782 0.6883925796 0.6690005064
+ 0.7016730905 0.6891514063 0.6698006988
+ 0.7024160028 0.6899102926 0.6706007719
+ 0.7031589150 0.6906691194 0.6714010239
+ 0.7039018273 0.6914280057 0.6722010970
+ 0.7046446800 0.6921867728 0.6730012894
+ 0.7053861022 0.6929436922 0.6738013029
+ 0.7061262727 0.6936991215 0.6746010780
+ 0.7068666220 0.6944546103 0.6754009128
+ 0.7076067924 0.6952099800 0.6762006879
+ 0.7083470821 0.6959655285 0.6770005226
+ 0.7090873718 0.6967208982 0.6778002977
+ 0.7098276019 0.6974763870 0.6786001921
+ 0.7105678916 0.6982318759 0.6794000268
+ 0.7113052011 0.6989892721 0.6801937222
+ 0.7120423913 0.6997467875 0.6809874177
+ 0.7127797008 0.7005043030 0.6817811728
+ 0.7135170102 0.7012618184 0.6825749278
+ 0.7142542005 0.7020192742 0.6833686233
+ 0.7149915099 0.7027767897 0.6841623187
+ 0.7157288194 0.7035343051 0.6849560142
+ 0.7164642215 0.7042888999 0.6857504845
+ 0.7171959281 0.7050374746 0.6865466833
+ 0.7179275155 0.7057859898 0.6873428822
+ 0.7186592221 0.7065346241 0.6881390810
+ 0.7193908095 0.7072831988 0.6889352798
+ 0.7201225162 0.7080317736 0.6897314191
+ 0.7208541036 0.7087804079 0.6905276179
+ 0.7215858102 0.7095289826 0.6913238168
+ 0.7223190069 0.7102715969 0.6921185255
+ 0.7230535150 0.7110090256 0.6929119229
+ 0.7237880230 0.7117465138 0.6937052011
+ 0.7245225906 0.7124840021 0.6944985986
+ 0.7252570987 0.7132214904 0.6952919960
+ 0.7259916067 0.7139589787 0.6960853934
+ 0.7267261147 0.7146965265 0.6968787909
+ 0.7274606228 0.7154340148 0.6976721883
+ 0.7281941175 0.7161688209 0.6984621882
+ 0.7289270163 0.7169021964 0.6992504001
+ 0.7296599150 0.7176355720 0.7000386715
+ 0.7303928137 0.7183690071 0.7008268833
+ 0.7311257720 0.7191023827 0.7016150951
+ 0.7318586707 0.7198358178 0.7024034262
+ 0.7325916290 0.7205691934 0.7031915784
+ 0.7333245277 0.7213026285 0.7039797902
+ 0.7340542078 0.7220379114 0.7047694921
+ 0.7347822189 0.7227740884 0.7055600286
+ 0.7355102897 0.7235103846 0.7063505054
+ 0.7362383008 0.7242466211 0.7071409822
+ 0.7369663715 0.7249829173 0.7079313993
+ 0.7376943827 0.7257190943 0.7087218761
+ 0.7384225130 0.7264553905 0.7095124125
+ 0.7391505241 0.7271916270 0.7103028893
+ 0.7398774028 0.7279284000 0.7110937238
+ 0.7406033874 0.7286654115 0.7118847966
+ 0.7413293719 0.7294024825 0.7126759291
+ 0.7420554161 0.7301396132 0.7134671211
+ 0.7427814007 0.7308766842 0.7142581940
+ 0.7435073853 0.7316136956 0.7150493264
+ 0.7442334294 0.7323508263 0.7158403993
+ 0.7449594140 0.7330878973 0.7166314721
+ 0.7456837893 0.7338215709 0.7174229026
+ 0.7464053035 0.7345489264 0.7182146907
+ 0.7471268177 0.7352762222 0.7190064788
+ 0.7478482127 0.7360035181 0.7197983265
+ 0.7485697269 0.7367308140 0.7205901146
+ 0.7492911816 0.7374581099 0.7213820219
+ 0.7500126958 0.7381855249 0.7221738100
+ 0.7507342100 0.7389128208 0.7229655981
+ 0.7514556050 0.7396399975 0.7237573266
+ 0.7521721721 0.7403625846 0.7245445251
+ 0.7528889179 0.7410852909 0.7253317833
+ 0.7536056042 0.7418079972 0.7261189818
+ 0.7543221712 0.7425305843 0.7269061804
+ 0.7550389171 0.7432532907 0.7276934981
+ 0.7557556033 0.7439759970 0.7284806967
+ 0.7564721704 0.7446985841 0.7292678952
+ 0.7571889162 0.7454212904 0.7300552130
+ 0.7579010725 0.7461451888 0.7308400273
+ 0.7586101890 0.7468699813 0.7316231132
+ 0.7593191862 0.7475947738 0.7324061990
+ 0.7600283027 0.7483196259 0.7331892848
+ 0.7607374191 0.7490442991 0.7339723706
+ 0.7614464164 0.7497690916 0.7347555161
+ 0.7621554732 0.7504938841 0.7355386019
+ 0.7628644705 0.7512186766 0.7363216877
+ 0.7635735869 0.7519437075 0.7371047735
+ 0.7642832994 0.7526741028 0.7378858924
+ 0.7649930120 0.7534046173 0.7386670709
+ 0.7657027245 0.7541350126 0.7394481897
+ 0.7664124966 0.7548654079 0.7402294278
+ 0.7671222091 0.7555958033 0.7410104871
+ 0.7678319216 0.7563263178 0.7417917252
+ 0.7685415745 0.7570567131 0.7425727844
+ 0.7692512870 0.7577871084 0.7433540225
+ 0.7699596882 0.7585147023 0.7441341877
+ 0.7706660032 0.7592375278 0.7449126244
+ 0.7713723183 0.7599601746 0.7456911206
+ 0.7720785737 0.7606830001 0.7464696169
+ 0.7727848887 0.7614058256 0.7472481132
+ 0.7734912038 0.7621284723 0.7480264902
+ 0.7741973996 0.7628512979 0.7488049865
+ 0.7749037147 0.7635740042 0.7495834827
+ 0.7756100297 0.7642968297 0.7503619790
+ 0.7763124108 0.7650169730 0.7511404753
+ 0.7770121098 0.7657353282 0.7519189715
+ 0.7777118087 0.7664536238 0.7526975274
+ 0.7784113884 0.7671719790 0.7534760833
+ 0.7791110873 0.7678902745 0.7542545795
+ 0.7798107266 0.7686086297 0.7550330758
+ 0.7805104256 0.7693269849 0.7558116913
+ 0.7812101245 0.7700452805 0.7565901875
+ 0.7819097042 0.7707635760 0.7573688030
+ 0.7826066017 0.7714834213 0.7581411004
+ 0.7833021283 0.7722039223 0.7589104176
+ 0.7839977145 0.7729244232 0.7596796751
+ 0.7846931815 0.7736448050 0.7604489923
+ 0.7853888273 0.7743653059 0.7612183094
+ 0.7860842943 0.7750858068 0.7619876266
+ 0.7867798805 0.7758061886 0.7627568841
+ 0.7874754071 0.7765266895 0.7635262012
+ 0.7881708741 0.7772471905 0.7642955184
+ 0.7888624072 0.7779653072 0.7650622725
+ 0.7895516157 0.7786822915 0.7658277750
+ 0.7902408838 0.7793992162 0.7665932775
+ 0.7909300923 0.7801160812 0.7673587799
+ 0.7916194201 0.7808331251 0.7681242824
+ 0.7923086286 0.7815499902 0.7688897848
+ 0.7929978967 0.7822669148 0.7696552873
+ 0.7936871052 0.7829838991 0.7704207897
+ 0.7943763733 0.7837008238 0.7711862922
+ 0.7950640917 0.7844138741 0.7719494104
+ 0.7957503200 0.7851232290 0.7727103233
+ 0.7964366078 0.7858325243 0.7734711170
+ 0.7971227765 0.7865418196 0.7742319703
+ 0.7978091240 0.7872511744 0.7749928236
+ 0.7984952927 0.7879605293 0.7757536769
+ 0.7991815209 0.7886698246 0.7765144706
+ 0.7998678088 0.7893791199 0.7772753835
+ 0.8005539775 0.7900884151 0.7780361772
+ 0.8012402058 0.7907962799 0.7787957788
+ 0.8019264936 0.7914993763 0.7795513272
+ 0.8026127219 0.7922024131 0.7803066969
+ 0.8032988906 0.7929055095 0.7810621262
+ 0.8039851189 0.7936086059 0.7818176150
+ 0.8046712875 0.7943117023 0.7825729847
+ 0.8053575754 0.7950147986 0.7833284140
+ 0.8060438037 0.7957177758 0.7840839028
+ 0.8067299724 0.7964208722 0.7848392725
+ 0.8074162006 0.7971240282 0.7855947018
+ 0.8081002235 0.7978271842 0.7863516212
+ 0.8087838292 0.7985303998 0.7871088982
+ 0.8094673753 0.7992336154 0.7878661156
+ 0.8101509809 0.7999367714 0.7886233926
+ 0.8108345866 0.8006399870 0.7893806100
+ 0.8115181923 0.8013432026 0.7901378274
+ 0.8122016788 0.8020464778 0.7908951044
+ 0.8128852844 0.8027496934 0.7916523218
+ 0.8135688901 0.8034529090 0.7924095988
+ 0.8142508864 0.8041560054 0.7931652069
+ 0.8149294853 0.8048589826 0.7939171791
+ 0.8156080842 0.8055620790 0.7946692705
+ 0.8162866831 0.8062651157 0.7954213023
+ 0.8169652820 0.8069680929 0.7961732745
+ 0.8176438808 0.8076711297 0.7969254255
+ 0.8183224797 0.8083741069 0.7976773977
+ 0.8190010190 0.8090770841 0.7984294295
+ 0.8196796179 0.8097801208 0.7991815209
+ 0.8203582168 0.8104832172 0.7999334931
+ 0.8210343719 0.8111814260 0.8006806970
+ 0.8217092156 0.8118773103 0.8014255166
+ 0.8223841190 0.8125730753 0.8021702170
+ 0.8230590224 0.8132688999 0.8029149175
+ 0.8237338066 0.8139647245 0.8036596775
+ 0.8244087100 0.8146606088 0.8044043779
+ 0.8250836134 0.8153563738 0.8051490784
+ 0.8257583976 0.8160521984 0.8058938980
+ 0.8264333010 0.8167480230 0.8066385984
+ 0.8271082044 0.8174437881 0.8073834181
+ 0.8277801871 0.8181331158 0.8081256151
+ 0.8284516931 0.8188214898 0.8088673949
+ 0.8291233182 0.8195099235 0.8096091747
+ 0.8297948837 0.8201981783 0.8103510141
+ 0.8304665089 0.8208866119 0.8110929132
+ 0.8311380148 0.8215749860 0.8118346930
+ 0.8318095803 0.8222633004 0.8125764728
+ 0.8324812055 0.8229516745 0.8133183122
+ 0.8331527710 0.8236399889 0.8140602112
+ 0.8338242769 0.8243284225 0.8148019910
+ 0.8344954848 0.8250157833 0.8155404925
+ 0.8351665735 0.8257030845 0.8162788153
+ 0.8358377218 0.8263903856 0.8170171976
+ 0.8365089297 0.8270778060 0.8177555203
+ 0.8371800184 0.8277651072 0.8184939027
+ 0.8378511071 0.8284524083 0.8192322254
+ 0.8385221958 0.8291397095 0.8199704885
+ 0.8391934037 0.8298270702 0.8207088709
+ 0.8398644924 0.8305143714 0.8214471936
+ 0.8405355811 0.8312016726 0.8221855760
+ 0.8412041068 0.8318877816 0.8229212165
+ 0.8418722749 0.8325737119 0.8236564994
+ 0.8425405025 0.8332597017 0.8243917823
+ 0.8432086706 0.8339456916 0.8251271248
+ 0.8438770175 0.8346316218 0.8258624077
+ 0.8445451856 0.8353176117 0.8265976906
+ 0.8452134132 0.8360034823 0.8273329735
+ 0.8458815813 0.8366894722 0.8280683160
+ 0.8465498090 0.8373754025 0.8288035989
+ 0.8472179770 0.8380613923 0.8295388818
+ 0.8478839993 0.8387414813 0.8302717209
+ 0.8485488892 0.8394191861 0.8310034275
+ 0.8492138982 0.8400970101 0.8317350745
+ 0.8498789072 0.8407747149 0.8324669003
+ 0.8505439162 0.8414524198 0.8331986070
+ 0.8512089252 0.8421301842 0.8339303136
+ 0.8518738747 0.8428078890 0.8346620202
+ 0.8525388837 0.8434855938 0.8353937864
+ 0.8532038927 0.8441634178 0.8361254930
+ 0.8538689017 0.8448411226 0.8368571997
+ 0.8545317054 0.8455154896 0.8375867009
+ 0.8551911116 0.8461846709 0.8383126259
+ 0.8558505177 0.8468537927 0.8390386105
+ 0.8565099835 0.8475229740 0.8397644758
+ 0.8571693897 0.8481922150 0.8404904008
+ 0.8578287959 0.8488612771 0.8412163258
+ 0.8584882021 0.8495305181 0.8419421911
+ 0.8591476083 0.8501995802 0.8426681161
+ 0.8598070145 0.8508688211 0.8433941007
+ 0.8604664207 0.8515380025 0.8441200256
+ 0.8611258268 0.8522071242 0.8448458910
+ 0.8617823720 0.8528741002 0.8455688953
+ 0.8624386787 0.8535410166 0.8462917209
+ 0.8630949855 0.8542078137 0.8470144272
+ 0.8637512922 0.8548746109 0.8477371931
+ 0.8644075990 0.8555414081 0.8484598994
+ 0.8650639057 0.8562082052 0.8491827250
+ 0.8657202125 0.8568751216 0.8499054909
+ 0.8663765192 0.8575419188 0.8506281972
+ 0.8670328259 0.8582087159 0.8513510227
+ 0.8676890731 0.8588755131 0.8520737290
+ 0.8683446050 0.8595426083 0.8527960777
+ 0.8689982891 0.8602101803 0.8535174727
+ 0.8696519136 0.8608778119 0.8542389870
+ 0.8703055978 0.8615455031 0.8549603820
+ 0.8709592223 0.8622130752 0.8556818962
+ 0.8716129065 0.8628807068 0.8564032912
+ 0.8722665906 0.8635482788 0.8571248055
+ 0.8729202151 0.8642160296 0.8578462005
+ 0.8735738993 0.8648836017 0.8585677147
+ 0.8742275238 0.8655511737 0.8592891097
+ 0.8748812079 0.8662188053 0.8600106239
+ 0.8755341172 0.8668799996 0.8607301712
+ 0.8761864901 0.8675361276 0.8614482284
+ 0.8768388033 0.8681921959 0.8621662855
+ 0.8774911761 0.8688483238 0.8628842831
+ 0.8781434894 0.8695043921 0.8636023998
+ 0.8787959218 0.8701604009 0.8643205166
+ 0.8794481754 0.8708165288 0.8650385141
+ 0.8801006079 0.8714725971 0.8657565713
+ 0.8807529211 0.8721287251 0.8664746284
+ 0.8814052939 0.8727847934 0.8671926856
+ 0.8820576072 0.8734409213 0.8679106832
+ 0.8827077150 0.8740913868 0.8686279058
+ 0.8833565116 0.8747391105 0.8693444729
+ 0.8840054274 0.8753867745 0.8700612187
+ 0.8846542835 0.8760343790 0.8707777858
+ 0.8853030801 0.8766821027 0.8714944720
+ 0.8859519958 0.8773298264 0.8722112179
+ 0.8866009116 0.8779774904 0.8729277849
+ 0.8872497082 0.8786250949 0.8736444712
+ 0.8878986239 0.8792728186 0.8743610978
+ 0.8885474205 0.8799204826 0.8750777841
+ 0.8891962767 0.8805680871 0.8757944107
+ 0.8898416162 0.8812143803 0.8765113950
+ 0.8904845715 0.8818597794 0.8772286177
+ 0.8911275268 0.8825051785 0.8779457808
+ 0.8917704821 0.8831505775 0.8786630034
+ 0.8924134970 0.8837959766 0.8793802857
+ 0.8930563927 0.8844413757 0.8800975084
+ 0.8936994076 0.8850867748 0.8808146715
+ 0.8943423033 0.8857321143 0.8815318942
+ 0.8949853182 0.8863775134 0.8822491169
+ 0.8956282735 0.8870229125 0.8829662800
+ 0.8962712288 0.8876683116 0.8836835027
+ 0.8969116211 0.8883140087 0.8844001293
+ 0.8975483775 0.8889601827 0.8851156831
+ 0.8981850743 0.8896064162 0.8858312964
+ 0.8988217711 0.8902524710 0.8865469098
+ 0.8994585276 0.8908987045 0.8872625232
+ 0.9000952244 0.8915448785 0.8879780769
+ 0.9007319212 0.8921909928 0.8886936903
+ 0.9013686180 0.8928372264 0.8894093037
+ 0.9020053148 0.8934834003 0.8901249170
+ 0.9026420116 0.8941295147 0.8908404112
+ 0.9032788277 0.8947756886 0.8915560246
+ 0.9039149880 0.8954212070 0.8922712803
+ 0.9045432806 0.8960561156 0.8929808736
+ 0.9051715732 0.8966909051 0.8936905265
+ 0.9057999253 0.8973258138 0.8944001794
+ 0.9064282179 0.8979606032 0.8951097727
+ 0.9070565104 0.8985955119 0.8958194256
+ 0.9076849222 0.8992303014 0.8965290189
+ 0.9083132148 0.8998652101 0.8972386718
+ 0.9089415073 0.9004999995 0.8979483247
+ 0.9095697999 0.9011349082 0.8986579180
+ 0.9101980925 0.9017696977 0.8993675113
+ 0.9108263850 0.9024046063 0.9000772238
+ 0.9114509225 0.9030348063 0.9007843137
+ 0.9120721817 0.9036613703 0.9014893770
+ 0.9126935005 0.9042879939 0.9021945000
+ 0.9133148193 0.9049146175 0.9028996229
+ 0.9139360785 0.9055411816 0.9036046267
+ 0.9145573974 0.9061678052 0.9043096900
+ 0.9151787162 0.9067944288 0.9050148129
+ 0.9157999754 0.9074209929 0.9057198763
+ 0.9164212942 0.9080476165 0.9064249992
+ 0.9170426130 0.9086741805 0.9071301222
+ 0.9176638722 0.9093006849 0.9078351855
+ 0.9182853103 0.9099273086 0.9085403085
+ 0.9188956022 0.9105505943 0.9092364907
+ 0.9195045829 0.9111735225 0.9099317789
+ 0.9201136827 0.9117963910 0.9106270075
+ 0.9207227826 0.9124193192 0.9113222957
+ 0.9213318229 0.9130421281 0.9120175242
+ 0.9219409227 0.9136649966 0.9127128124
+ 0.9225499034 0.9142879248 0.9134079814
+ 0.9231590033 0.9149107933 0.9141033292
+ 0.9237679839 0.9155337214 0.9147984982
+ 0.9243770838 0.9161565900 0.9154937863
+ 0.9249861240 0.9167795181 0.9161890149
+ 0.9255942106 0.9174020886 0.9168831706
+ 0.9261904955 0.9180212021 0.9175652862
+ 0.9267867804 0.9186403751 0.9182474017
+ 0.9273831248 0.9192596078 0.9189295173
+ 0.9279794097 0.9198787808 0.9196115732
+ 0.9285756946 0.9204980135 0.9202936888
+ 0.9291719794 0.9211171269 0.9209758043
+ 0.9297683239 0.9217363000 0.9216579199
+ 0.9303646088 0.9223554730 0.9223399758
+ 0.9309607744 0.9229747057 0.9230220914
+ 0.9315571189 0.9235938787 0.9237042069
+ 0.9321534038 0.9242129922 0.9243863225
+ 0.9327489734 0.9248315096 0.9250671268
+ 0.9333375096 0.9254437089 0.9257367849
+ 0.9339259863 0.9260557890 0.9264063835
+ 0.9345145226 0.9266679287 0.9270759821
+ 0.9351029992 0.9272801280 0.9277455807
+ 0.9356915951 0.9278922081 0.9284152985
+ 0.9362800717 0.9285042882 0.9290848970
+ 0.9368686080 0.9291164875 0.9297544956
+ 0.9374570847 0.9297286272 0.9304240942
+ 0.9380456209 0.9303408265 0.9310936928
+ 0.9386342168 0.9309529066 0.9317634106
+ 0.9392226934 0.9315649867 0.9324330091
+ 0.9398112297 0.9321771860 0.9331026077
+ 0.9403957725 0.9327827096 0.9337632060
+ 0.9409803152 0.9333879948 0.9344233274
+ 0.9415647984 0.9339932799 0.9350835085
+ 0.9421492815 0.9345986247 0.9357436895
+ 0.9427338243 0.9352039099 0.9364038110
+ 0.9433181882 0.9358091950 0.9370639920
+ 0.9439026713 0.9364144802 0.9377241731
+ 0.9444872141 0.9370198250 0.9383842945
+ 0.9450716972 0.9376251101 0.9390444756
+ 0.9456561804 0.9382303953 0.9397047162
+ 0.9462407231 0.9388356805 0.9403647780
+ 0.9468250871 0.9394410253 0.9410250187
+ 0.9474024773 0.9400426149 0.9416800141
+ 0.9479761124 0.9406421781 0.9423323274
+ 0.9485496879 0.9412418008 0.9429845214
+ 0.9491233230 0.9418414831 0.9436367750
+ 0.9496968985 0.9424411058 0.9442890882
+ 0.9502704740 0.9430407286 0.9449412823
+ 0.9508441091 0.9436402917 0.9455935955
+ 0.9514176846 0.9442399740 0.9462457895
+ 0.9519913197 0.9448395967 0.9468981028
+ 0.9525648952 0.9454392195 0.9475504160
+ 0.9531384706 0.9460387826 0.9482026100
+ 0.9537121058 0.9466385245 0.9488549232
+ 0.9542835951 0.9472373724 0.9495049119
+ 0.9548454881 0.9478332996 0.9501445293
+ 0.9554073811 0.9484291077 0.9507842064
+ 0.9559693933 0.9490249753 0.9514238238
+ 0.9565312862 0.9496209025 0.9520635009
+ 0.9570931792 0.9502167106 0.9527031779
+ 0.9576550722 0.9508125782 0.9533427954
+ 0.9582170248 0.9514083862 0.9539824724
+ 0.9587789178 0.9520043135 0.9546220899
+ 0.9593408108 0.9526001811 0.9552618265
+ 0.9599027038 0.9531959891 0.9559013844
+ 0.9604645967 0.9537919164 0.9565411210
+ 0.9610264897 0.9543877244 0.9571806788
+ 0.9615818262 0.9549801946 0.9578106999
+ 0.9621313214 0.9555696845 0.9584323764
+ 0.9626806974 0.9561592937 0.9590541124
+ 0.9632301927 0.9567487836 0.9596757293
+ 0.9637796879 0.9573382735 0.9602974057
+ 0.9643291831 0.9579278827 0.9609190822
+ 0.9648786783 0.9585173726 0.9615408182
+ 0.9654281735 0.9591069221 0.9621623755
+ 0.9659777284 0.9596964717 0.9627841115
+ 0.9665271044 0.9602860212 0.9634057879
+ 0.9670765996 0.9608755112 0.9640274048
+ 0.9676260948 0.9614651203 0.9646490812
+ 0.9681755900 0.9620546103 0.9652708173
+ 0.9687122703 0.9626389146 0.9658780098
+ 0.9692441821 0.9632211924 0.9664797187
+ 0.9697760940 0.9638035297 0.9670814276
+ 0.9703080058 0.9643858075 0.9676830769
+ 0.9708399177 0.9649680853 0.9682847857
+ 0.9713717103 0.9655504227 0.9688864946
+ 0.9719036222 0.9661327004 0.9694882035
+ 0.9724354744 0.9667149782 0.9700899124
+ 0.9729673862 0.9672973156 0.9706916213
+ 0.9734992981 0.9678795934 0.9712932706
+ 0.9740310907 0.9684618711 0.9718949795
+ 0.9745630026 0.9690440893 0.9724966288
+ 0.9750949144 0.9696264267 0.9730982780
+ 0.9756121039 0.9702054262 0.9736818075
+ 0.9761241078 0.9707831144 0.9742587805
+ 0.9766359925 0.9713609219 0.9748356938
+ 0.9771479964 0.9719387293 0.9754127264
+ 0.9776600003 0.9725164175 0.9759895802
+ 0.9781718850 0.9730942249 0.9765666127
+ 0.9786838889 0.9736719131 0.9771435857
+ 0.9791958928 0.9742497206 0.9777204990
+ 0.9797077775 0.9748274088 0.9782974720
+ 0.9802197814 0.9754052162 0.9788743854
+ 0.9807317853 0.9759829044 0.9794514179
+ 0.9812437296 0.9765607119 0.9800282717
+ 0.9817556739 0.9771384001 0.9806053042
+ 0.9822546244 0.9777116776 0.9811592102
+ 0.9827439189 0.9782817960 0.9816957712
+ 0.9832330942 0.9788517952 0.9822325110
+ 0.9837223291 0.9794217944 0.9827690721
+ 0.9842115045 0.9799917936 0.9833058119
+ 0.9847007990 0.9805617929 0.9838423729
+ 0.9851899743 0.9811317921 0.9843789935
+ 0.9856792092 0.9817017913 0.9849156737
+ 0.9861685038 0.9822717905 0.9854522943
+ 0.9866576791 0.9828417897 0.9859889746
+ 0.9871469140 0.9834119081 0.9865255952
+ 0.9876360893 0.9839819074 0.9870622754
+ 0.9881253839 0.9845519066 0.9875988960
+ 0.9886041284 0.9851186275 0.9881225228
+ 0.9890480042 0.9856745005 0.9886025786
+ 0.9894918799 0.9862303734 0.9890826941
+ 0.9899358153 0.9867863059 0.9895628095
+ 0.9903796911 0.9873421788 0.9900428057
+ 0.9908236265 0.9878981113 0.9905229211
+ 0.9912675023 0.9884539843 0.9910029769
+ 0.9917113781 0.9890099168 0.9914829731
+ 0.9921553135 0.9895657897 0.9919630885
+ 0.9925991893 0.9901217222 0.9924432039
+ 0.9930431247 0.9906775951 0.9929233193
+ 0.9934868813 0.9912334085 0.9934033155
+ 0.9939308167 0.9917892814 0.9938833714
+ 0.9943746924 0.9923452139 0.9943634868
+ 0.9947882295 0.9928944707 0.9947875738
+ 0.9951890707 0.9934411049 0.9951885939
+ 0.9955899715 0.9939876795 0.9955894947
+ 0.9959908724 0.9945343137 0.9959905148
+ 0.9963918924 0.9950808287 0.9963914156
+ 0.9967927933 0.9956274033 0.9967923760
+ 0.9971936941 0.9961739779 0.9971932769
+ 0.9975945950 0.9967206120 0.9975942969
+ 0.9979954958 0.9972671270 0.9979951978
+ 0.9983963966 0.9978137016 0.9983962178
+ 0.9987972975 0.9983602762 0.9987971187
+ 0.9991981983 0.9989069104 0.9991980791
+ 0.9995990992 0.9994534254 0.9995989799
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/colormanagement/luts/film_response/kodak_portra_800.spi1d b/release/datafiles/colormanagement/luts/film_response/kodak_portra_800.spi1d
new file mode 100644
index 00000000000..754cb9b7965
--- /dev/null
+++ b/release/datafiles/colormanagement/luts/film_response/kodak_portra_800.spi1d
@@ -0,0 +1,1030 @@
+Version 1
+From 0.0 1.0
+Length 1024
+Components 3
+{
+ 0.0000000000 0.0000000000 0.0000000000
+ 0.0088124285 0.0079260534 0.0079260534
+ 0.0173182599 0.0154689904 0.0154689904
+ 0.0250097904 0.0223134402 0.0223134402
+ 0.0318675414 0.0285592694 0.0285592694
+ 0.0382458083 0.0343292207 0.0343292207
+ 0.0440907888 0.0397338495 0.0397338495
+ 0.0496913791 0.0447938815 0.0447938815
+ 0.0549593382 0.0496262200 0.0496262200
+ 0.0600188002 0.0542288311 0.0542288311
+ 0.0648257434 0.0586788617 0.0586788617
+ 0.0694660619 0.0629591122 0.0629591122
+ 0.0739658996 0.0670659617 0.0670659617
+ 0.0782863200 0.0710892603 0.0710892603
+ 0.0824507698 0.0749912113 0.0749912113
+ 0.0864929035 0.0788405612 0.0788405612
+ 0.0904697403 0.0825625733 0.0825625733
+ 0.0943273082 0.0861979574 0.0861979574
+ 0.0981024578 0.0897707865 0.0897707865
+ 0.1018401012 0.0932211131 0.0932211131
+ 0.1054691002 0.0966563523 0.0966563523
+ 0.1090489030 0.1000294015 0.1000294015
+ 0.1125440001 0.1033191979 0.1033191979
+ 0.1159221008 0.1065331027 0.1065331027
+ 0.1192713007 0.1097005978 0.1097005978
+ 0.1225581989 0.1128138974 0.1128138974
+ 0.1257860959 0.1158875003 0.1158875003
+ 0.1289588958 0.1189555973 0.1189555973
+ 0.1321441978 0.1219801009 0.1219801009
+ 0.1352636069 0.1249566972 0.1249566972
+ 0.1383159012 0.1278752983 0.1278752983
+ 0.1413581967 0.1307422966 0.1307422966
+ 0.1443576962 0.1336016953 0.1336016953
+ 0.1472717971 0.1364331990 0.1364331990
+ 0.1501350999 0.1392025054 0.1392025054
+ 0.1529815942 0.1419408023 0.1419408023
+ 0.1558008045 0.1446657926 0.1446657926
+ 0.1586032957 0.1473688930 0.1473688930
+ 0.1613503993 0.1500454992 0.1500454992
+ 0.1640668958 0.1526847035 0.1526847035
+ 0.1667777002 0.1552831978 0.1552831978
+ 0.1694519967 0.1578582972 0.1578582972
+ 0.1720923930 0.1604107022 0.1604107022
+ 0.1746968031 0.1629472971 0.1629472971
+ 0.1772591025 0.1654641926 0.1654641926
+ 0.1797759980 0.1679515988 0.1679515988
+ 0.1822800934 0.1704009026 0.1704009026
+ 0.1847687066 0.1728225946 0.1728225946
+ 0.1872310042 0.1752288938 0.1752288938
+ 0.1896561980 0.1776168942 0.1776168942
+ 0.1920384020 0.1799840033 0.1799840033
+ 0.1944015026 0.1823205948 0.1823205948
+ 0.1967525929 0.1846179962 0.1846179962
+ 0.1990911067 0.1869053990 0.1869053990
+ 0.2014010996 0.1891890019 0.1891890019
+ 0.2037014961 0.1914498061 0.1914498061
+ 0.2060168982 0.1936779022 0.1936779022
+ 0.2083324045 0.1958771050 0.1958771050
+ 0.2106439024 0.1980604976 0.1980604976
+ 0.2129282951 0.2002373040 0.2002373040
+ 0.2151844054 0.2024063021 0.2024063021
+ 0.2174350023 0.2045633942 0.2045633942
+ 0.2196764946 0.2067063004 0.2067063004
+ 0.2219022959 0.2088321000 0.2088321000
+ 0.2241204977 0.2109334022 0.2109334022
+ 0.2263171971 0.2130157053 0.2130157053
+ 0.2284786999 0.2150927931 0.2150927931
+ 0.2306168973 0.2171598971 0.2171598971
+ 0.2327332944 0.2192052007 0.2192052007
+ 0.2348272949 0.2212346047 0.2212346047
+ 0.2369115055 0.2232697010 0.2232697010
+ 0.2389767021 0.2253111005 0.2253111005
+ 0.2410169989 0.2273571938 0.2273571938
+ 0.2430370003 0.2294019014 0.2294019014
+ 0.2450459003 0.2314381003 0.2314381003
+ 0.2470474988 0.2334637046 0.2334637046
+ 0.2490427047 0.2354702950 0.2354702950
+ 0.2510350049 0.2374535054 0.2374535054
+ 0.2530182004 0.2394181937 0.2394181937
+ 0.2549867928 0.2413693964 0.2413693964
+ 0.2569330931 0.2433117926 0.2433117926
+ 0.2588599026 0.2452446073 0.2452446073
+ 0.2607747018 0.2471683025 0.2471683025
+ 0.2626813948 0.2490822971 0.2490822971
+ 0.2645846903 0.2509844899 0.2509844899
+ 0.2664898038 0.2528660893 0.2528660893
+ 0.2683837116 0.2547389865 0.2547389865
+ 0.2702631950 0.2566035986 0.2566035986
+ 0.2721140981 0.2584480941 0.2584480941
+ 0.2739478052 0.2602775097 0.2602775097
+ 0.2757706046 0.2620961070 0.2620961070
+ 0.2775853872 0.2639020085 0.2639020085
+ 0.2794038057 0.2656953037 0.2656953037
+ 0.2812230885 0.2674824893 0.2674824893
+ 0.2830418050 0.2692643106 0.2692643106
+ 0.2848351002 0.2710475922 0.2710475922
+ 0.2866136134 0.2728300095 0.2728300095
+ 0.2883686125 0.2746050954 0.2746050954
+ 0.2901135087 0.2763741016 0.2763741016
+ 0.2918516994 0.2781391144 0.2781391144
+ 0.2935769856 0.2798882127 0.2798882127
+ 0.2953031063 0.2816232145 0.2816232145
+ 0.2970305085 0.2833353877 0.2833353877
+ 0.2987627089 0.2850272954 0.2850272954
+ 0.3004961908 0.2867107093 0.2867107093
+ 0.3022179008 0.2883763909 0.2883763909
+ 0.3039326966 0.2900390029 0.2900390029
+ 0.3056339025 0.2916957140 0.2916957140
+ 0.3073236048 0.2933523953 0.2933523953
+ 0.3090057075 0.2950091958 0.2950091958
+ 0.3106757104 0.2966647148 0.2966647148
+ 0.3123432994 0.2983194888 0.2983194888
+ 0.3140107989 0.2999661863 0.2999661863
+ 0.3156793118 0.3016082942 0.3016082942
+ 0.3173511028 0.3032361865 0.3032361865
+ 0.3190175891 0.3048543036 0.3048543036
+ 0.3206757009 0.3064570129 0.3064570129
+ 0.3223229051 0.3080512881 0.3080512881
+ 0.3239594102 0.3096374869 0.3096374869
+ 0.3255836964 0.3112207055 0.3112207055
+ 0.3271996081 0.3128018975 0.3128018975
+ 0.3288047910 0.3143788874 0.3143788874
+ 0.3304041922 0.3159537017 0.3159537017
+ 0.3320013881 0.3175298870 0.3175298870
+ 0.3335976005 0.3191067874 0.3191067874
+ 0.3351888955 0.3206779063 0.3206779063
+ 0.3367778063 0.3222463131 0.3222463131
+ 0.3383550048 0.3238070011 0.3238070011
+ 0.3399255872 0.3253633976 0.3253633976
+ 0.3414827883 0.3269123137 0.3269123137
+ 0.3430297971 0.3284555078 0.3284555078
+ 0.3445636928 0.3299894929 0.3299894929
+ 0.3460822105 0.3315128088 0.3315128088
+ 0.3475958109 0.3330293894 0.3330293894
+ 0.3490990102 0.3345321119 0.3345321119
+ 0.3506017923 0.3360328078 0.3360328078
+ 0.3521026969 0.3375233114 0.3375233114
+ 0.3536036015 0.3390137851 0.3390137851
+ 0.3551059067 0.3404915035 0.3404915035
+ 0.3566082120 0.3419683874 0.3419683874
+ 0.3580994904 0.3434371054 0.3434371054
+ 0.3595857024 0.3449020982 0.3449020982
+ 0.3610610068 0.3463630974 0.3463630974
+ 0.3625203967 0.3478182852 0.3478182852
+ 0.3639777005 0.3492721915 0.3492721915
+ 0.3654133976 0.3507139981 0.3507139981
+ 0.3668490946 0.3521556854 0.3521556854
+ 0.3682768941 0.3535880148 0.3535880148
+ 0.3697017133 0.3550168872 0.3550168872
+ 0.3711271882 0.3564417064 0.3564417064
+ 0.3725540042 0.3578588068 0.3578588068
+ 0.3739807904 0.3592759073 0.3592759073
+ 0.3754133880 0.3606815040 0.3606815040
+ 0.3768466115 0.3620859981 0.3620859981
+ 0.3782753050 0.3634850979 0.3634850979
+ 0.3796978891 0.3648771048 0.3648771048
+ 0.3811204135 0.3662689924 0.3662689924
+ 0.3825325072 0.3676514030 0.3676514030
+ 0.3839435875 0.3690330088 0.3690330088
+ 0.3853504956 0.3704110980 0.3704110980
+ 0.3867498934 0.3717832863 0.3717832863
+ 0.3881492913 0.3731555045 0.3731555045
+ 0.3895345032 0.3745233119 0.3745233119
+ 0.3909151852 0.3758895993 0.3758895993
+ 0.3922944069 0.3772548139 0.3772548139
+ 0.3936628103 0.3786112964 0.3786112964
+ 0.3950310946 0.3799678087 0.3799678087
+ 0.3963941932 0.3813194036 0.3813194036
+ 0.3977501988 0.3826650083 0.3826650083
+ 0.3991062939 0.3840106130 0.3840106130
+ 0.4004457891 0.3853495121 0.3853495121
+ 0.4017783105 0.3866856992 0.3866856992
+ 0.4031107128 0.3880218863 0.3880218863
+ 0.4044226110 0.3893507123 0.3893507123
+ 0.4057329893 0.3906790018 0.3906790018
+ 0.4070420861 0.3920061886 0.3920061886
+ 0.4083415866 0.3933256865 0.3933256865
+ 0.4096410871 0.3946452141 0.3946452141
+ 0.4109367132 0.3959634900 0.3959634900
+ 0.4122210145 0.3972786963 0.3972786963
+ 0.4135052860 0.3985939026 0.3985939026
+ 0.4147841930 0.3999078870 0.3999078870
+ 0.4160529971 0.4012196958 0.4012196958
+ 0.4173217118 0.4025315046 0.4025315046
+ 0.4185839891 0.4038358033 0.4038358033
+ 0.4198360145 0.4051288962 0.4051288962
+ 0.4210878909 0.4064218998 0.4064218998
+ 0.4223288000 0.4077093899 0.4077093899
+ 0.4235515893 0.4089880884 0.4089880884
+ 0.4247742891 0.4102669060 0.4102669060
+ 0.4259923995 0.4115405083 0.4115405083
+ 0.4272009134 0.4128041863 0.4128041863
+ 0.4284093082 0.4140678942 0.4140678942
+ 0.4296151102 0.4153267145 0.4153267145
+ 0.4308117032 0.4165697992 0.4165697992
+ 0.4320083857 0.4178129137 0.4178129137
+ 0.4332041144 0.4190546870 0.4190546870
+ 0.4343877137 0.4202808142 0.4202808142
+ 0.4355713129 0.4215069115 0.4215069115
+ 0.4367547929 0.4227330089 0.4227330089
+ 0.4379391968 0.4239530861 0.4239530861
+ 0.4391236901 0.4251722991 0.4251722991
+ 0.4403083026 0.4263913929 0.4263913929
+ 0.4414936900 0.4276081026 0.4276081026
+ 0.4426796138 0.4288231134 0.4288231134
+ 0.4438655972 0.4300382137 0.4300382137
+ 0.4450480044 0.4312498868 0.4312498868
+ 0.4462217093 0.4324539900 0.4324539900
+ 0.4473954141 0.4336580038 0.4336580038
+ 0.4485690892 0.4348619878 0.4348619878
+ 0.4497332871 0.4360530078 0.4360530078
+ 0.4508967996 0.4372431040 0.4372431040
+ 0.4520604014 0.4384332895 0.4384332895
+ 0.4532183111 0.4396133125 0.4396133125
+ 0.4543708861 0.4407838881 0.4407838881
+ 0.4555234909 0.4419544041 0.4419544041
+ 0.4566758871 0.4431242943 0.4431242943
+ 0.4578221142 0.4442783892 0.4442783892
+ 0.4589683115 0.4454325140 0.4454325140
+ 0.4601145089 0.4465866089 0.4465866089
+ 0.4612562060 0.4477371871 0.4477371871
+ 0.4623934925 0.4488846064 0.4488846064
+ 0.4635308087 0.4500319064 0.4500319064
+ 0.4646682143 0.4511792958 0.4511792958
+ 0.4657953978 0.4523159862 0.4523159862
+ 0.4669215977 0.4534518123 0.4534518123
+ 0.4680477977 0.4545876086 0.4545876086
+ 0.4691722989 0.4557209909 0.4557209909
+ 0.4702917933 0.4568476975 0.4568476975
+ 0.4714111984 0.4579744935 0.4579744935
+ 0.4725306928 0.4591012895 0.4591012895
+ 0.4736500978 0.4602225125 0.4602225125
+ 0.4747695029 0.4613394141 0.4613394141
+ 0.4758889973 0.4624564052 0.4624564052
+ 0.4770084023 0.4635733068 0.4635733068
+ 0.4781275094 0.4646795094 0.4646795094
+ 0.4792464077 0.4657829106 0.4657829106
+ 0.4803653955 0.4668863118 0.4668863118
+ 0.4814842939 0.4679895937 0.4679895937
+ 0.4825977981 0.4690910876 0.4690910876
+ 0.4837110043 0.4701924026 0.4701924026
+ 0.4848242104 0.4712938070 0.4712938070
+ 0.4859367907 0.4723945856 0.4723945856
+ 0.4870401919 0.4734885097 0.4734885097
+ 0.4881435037 0.4745824933 0.4745824933
+ 0.4892467856 0.4756763875 0.4756763875
+ 0.4903483987 0.4767695963 0.4767695963
+ 0.4914352894 0.4778566062 0.4778566062
+ 0.4925222099 0.4789434969 0.4789434969
+ 0.4936090112 0.4800305068 0.4800305068
+ 0.4946955144 0.4811173975 0.4811173975
+ 0.4957770109 0.4822036028 0.4822036028
+ 0.4968583882 0.4832898080 0.4832898080
+ 0.4979399145 0.4843761027 0.4843761027
+ 0.4990214109 0.4854621887 0.4854621887
+ 0.5000975728 0.4865370989 0.4865370989
+ 0.5011737943 0.4876120090 0.4876120090
+ 0.5022500157 0.4886868894 0.4886868894
+ 0.5033261776 0.4897617996 0.4897617996
+ 0.5043833256 0.4908238053 0.4908238053
+ 0.5054367781 0.4918834865 0.4918834865
+ 0.5064904094 0.4929431975 0.4929431975
+ 0.5075439811 0.4940029085 0.4940029085
+ 0.5085870028 0.4950586855 0.4950586855
+ 0.5096237063 0.4961124063 0.4961124063
+ 0.5106604099 0.4971660078 0.4971660078
+ 0.5116971135 0.4982196093 0.4982196093
+ 0.5127326250 0.4992741942 0.4992741942
+ 0.5137655139 0.5003306270 0.5003306270
+ 0.5147984028 0.5013868809 0.5013868809
+ 0.5158312917 0.5024433136 0.5024433136
+ 0.5168641806 0.5034996271 0.5034996271
+ 0.5178936124 0.5045477748 0.5045477748
+ 0.5189229250 0.5055958033 0.5055958033
+ 0.5199521780 0.5066437721 0.5066437721
+ 0.5209816098 0.5076918006 0.5076918006
+ 0.5220068097 0.5087348819 0.5087348819
+ 0.5230284929 0.5097740889 0.5097740889
+ 0.5240502954 0.5108131766 0.5108131766
+ 0.5250719786 0.5118523240 0.5118523240
+ 0.5260933042 0.5128911138 0.5128911138
+ 0.5271025896 0.5139240026 0.5139240026
+ 0.5281118751 0.5149567723 0.5149567723
+ 0.5291212201 0.5159897208 0.5159897208
+ 0.5301305056 0.5170226097 0.5170226097
+ 0.5311338902 0.5180504918 0.5180504918
+ 0.5321304202 0.5190727711 0.5190727711
+ 0.5331268907 0.5200952291 0.5200952291
+ 0.5341234207 0.5211176276 0.5211176276
+ 0.5351197720 0.5221399069 0.5221399069
+ 0.5361112952 0.5231561065 0.5231561065
+ 0.5371016860 0.5241708755 0.5241708755
+ 0.5380920172 0.5251858234 0.5251858234
+ 0.5390822887 0.5262005925 0.5262005925
+ 0.5400725007 0.5272145271 0.5272145271
+ 0.5410608053 0.5282195807 0.5282195807
+ 0.5420491099 0.5292246938 0.5292246938
+ 0.5430374742 0.5302299261 0.5302299261
+ 0.5440257788 0.5312349796 0.5312349796
+ 0.5450109243 0.5322359800 0.5322359800
+ 0.5459877849 0.5332267880 0.5332267880
+ 0.5469647050 0.5342177153 0.5342177153
+ 0.5479416251 0.5352085233 0.5352085233
+ 0.5489184856 0.5361993909 0.5361993909
+ 0.5498880744 0.5371838212 0.5371838212
+ 0.5508465767 0.5381588936 0.5381588936
+ 0.5518051982 0.5391340256 0.5391340256
+ 0.5527637005 0.5401090980 0.5401090980
+ 0.5537223220 0.5410841703 0.5410841703
+ 0.5546782017 0.5420532823 0.5420532823
+ 0.5556306839 0.5430148244 0.5430148244
+ 0.5565832853 0.5439764261 0.5439764261
+ 0.5575358272 0.5449379086 0.5449379086
+ 0.5584883094 0.5458995104 0.5458995104
+ 0.5594409704 0.5468540192 0.5468540192
+ 0.5603938103 0.5477982163 0.5477982163
+ 0.5613465905 0.5487424135 0.5487424135
+ 0.5622994900 0.5496866107 0.5496866107
+ 0.5632522702 0.5506308079 0.5506308079
+ 0.5642018914 0.5515701175 0.5515701175
+ 0.5651431084 0.5524966717 0.5524966717
+ 0.5660842061 0.5534232855 0.5534232855
+ 0.5670254230 0.5543497801 0.5543497801
+ 0.5679665804 0.5552763939 0.5552763939
+ 0.5689064860 0.5562021732 0.5562021732
+ 0.5698277950 0.5571172237 0.5571172237
+ 0.5707491040 0.5580322146 0.5580322146
+ 0.5716704130 0.5589473248 0.5589473248
+ 0.5725917220 0.5598623157 0.5598623157
+ 0.5735129714 0.5607773066 0.5607773066
+ 0.5744280815 0.5616865754 0.5616865754
+ 0.5753415227 0.5625941753 0.5625941753
+ 0.5762547851 0.5635017753 0.5635017753
+ 0.5771682262 0.5644093752 0.5644093752
+ 0.5780814886 0.5653169751 0.5653169751
+ 0.5789892077 0.5662230849 0.5662230849
+ 0.5798879862 0.5671266913 0.5671266913
+ 0.5807867050 0.5680304170 0.5680304170
+ 0.5816854835 0.5689340234 0.5689340234
+ 0.5825843215 0.5698376894 0.5698376894
+ 0.5834829807 0.5707412958 0.5707412958
+ 0.5843644738 0.5716376901 0.5716376901
+ 0.5852444768 0.5725334883 0.5725334883
+ 0.5861244798 0.5734294057 0.5734294057
+ 0.5870044827 0.5743252039 0.5743252039
+ 0.5878844857 0.5752210021 0.5752210021
+ 0.5887588263 0.5761132240 0.5761132240
+ 0.5896230936 0.5769993067 0.5769993067
+ 0.5904874802 0.5778853893 0.5778853893
+ 0.5913518071 0.5787714124 0.5787714124
+ 0.5922161937 0.5796574950 0.5796574950
+ 0.5930805206 0.5805435777 0.5805435777
+ 0.5939381719 0.5814265013 0.5814265013
+ 0.5947932005 0.5823081732 0.5823081732
+ 0.5956482291 0.5831899047 0.5831899047
+ 0.5965033174 0.5840715170 0.5840715170
+ 0.5973582864 0.5849531889 0.5849531889
+ 0.5982133150 0.5858349204 0.5858349204
+ 0.5990638733 0.5867123008 0.5867123008
+ 0.5999143124 0.5875896811 0.5875896811
+ 0.6007646918 0.5884671211 0.5884671211
+ 0.6016150713 0.5893443823 0.5893443823
+ 0.6024655104 0.5902218223 0.5902218223
+ 0.6033152938 0.5910989046 0.5910989046
+ 0.6041615009 0.5919741988 0.5919741988
+ 0.6050077081 0.5928496122 0.5928496122
+ 0.6058537960 0.5937249064 0.5937249064
+ 0.6067000031 0.5946002007 0.5946002007
+ 0.6075462103 0.5954756141 0.5954756141
+ 0.6083909273 0.5963500142 0.5963500142
+ 0.6092299223 0.5972210169 0.5972210169
+ 0.6100689769 0.5980920792 0.5980920792
+ 0.6109080911 0.5989630818 0.5989630818
+ 0.6117472053 0.5998342037 0.5998342037
+ 0.6125863194 0.6007053256 0.6007053256
+ 0.6134225726 0.6015741229 0.6015741229
+ 0.6142470241 0.6024342179 0.6024342179
+ 0.6150714755 0.6032943130 0.6032943130
+ 0.6158959866 0.6041544080 0.6041544080
+ 0.6167204976 0.6050143838 0.6050143838
+ 0.6175450087 0.6058744788 0.6058744788
+ 0.6183692813 0.6067342162 0.6067342162
+ 0.6191921234 0.6075887084 0.6075887084
+ 0.6200149059 0.6084432006 0.6084432006
+ 0.6208376884 0.6092978120 0.6092978120
+ 0.6216604710 0.6101523042 0.6101523042
+ 0.6224833131 0.6110067964 0.6110067964
+ 0.6233062148 0.6118612885 0.6118612885
+ 0.6241316199 0.6127145290 0.6127145290
+ 0.6249575019 0.6135674119 0.6135674119
+ 0.6257833242 0.6144202948 0.6144202948
+ 0.6266092062 0.6152731776 0.6152731776
+ 0.6274350882 0.6161261201 0.6161261201
+ 0.6282610297 0.6169791222 0.6169791222
+ 0.6290842295 0.6178271174 0.6178271174
+ 0.6299049258 0.6186708808 0.6186708808
+ 0.6307256222 0.6195145845 0.6195145845
+ 0.6315463781 0.6203582883 0.6203582883
+ 0.6323670745 0.6212021112 0.6212021112
+ 0.6331877708 0.6220458150 0.6220458150
+ 0.6340078712 0.6228886247 0.6228886247
+ 0.6348218918 0.6237223148 0.6237223148
+ 0.6356359124 0.6245561242 0.6245561242
+ 0.6364498734 0.6253898740 0.6253898740
+ 0.6372638941 0.6262236238 0.6262236238
+ 0.6380779147 0.6270573735 0.6270573735
+ 0.6388918757 0.6278911829 0.6278911829
+ 0.6397082210 0.6287242174 0.6287242174
+ 0.6405261755 0.6295565963 0.6295565963
+ 0.6413441896 0.6303889751 0.6303889751
+ 0.6421622038 0.6312214136 0.6312214136
+ 0.6429802775 0.6320537925 0.6320537925
+ 0.6437982917 0.6328861713 0.6328861713
+ 0.6446163058 0.6337186098 0.6337186098
+ 0.6454324722 0.6345450282 0.6345450282
+ 0.6462485194 0.6353709102 0.6353709102
+ 0.6470645070 0.6361969113 0.6361969113
+ 0.6478806138 0.6370227933 0.6370227933
+ 0.6486966014 0.6378486753 0.6378486753
+ 0.6495125890 0.6386746168 0.6386746168
+ 0.6503264904 0.6394987106 0.6394987106
+ 0.6511304975 0.6403145790 0.6403145790
+ 0.6519343853 0.6411305070 0.6411305070
+ 0.6527382731 0.6419463754 0.6419463754
+ 0.6535422206 0.6427623034 0.6427623034
+ 0.6543462276 0.6435781717 0.6435781717
+ 0.6551501155 0.6443940997 0.6443940997
+ 0.6559516191 0.6452056170 0.6452056170
+ 0.6567478776 0.6460080147 0.6460080147
+ 0.6575443149 0.6468102932 0.6468102932
+ 0.6583405733 0.6476125717 0.6476125717
+ 0.6591368914 0.6484150290 0.6484150290
+ 0.6599332094 0.6492173076 0.6492173076
+ 0.6607295871 0.6500195861 0.6500195861
+ 0.6615231037 0.6508170962 0.6508170962
+ 0.6623113751 0.6516057849 0.6516057849
+ 0.6630997062 0.6523944736 0.6523944736
+ 0.6638879776 0.6531832218 0.6531832218
+ 0.6646761894 0.6539719105 0.6539719105
+ 0.6654645205 0.6547605991 0.6547605991
+ 0.6662527919 0.6555492878 0.6555492878
+ 0.6670367718 0.6563370228 0.6563370228
+ 0.6678087711 0.6571220756 0.6571220756
+ 0.6685808897 0.6579073071 0.6579073071
+ 0.6693528891 0.6586924195 0.6586924195
+ 0.6701248884 0.6594774723 0.6594774723
+ 0.6708970070 0.6602627039 0.6602627039
+ 0.6716690063 0.6610478163 0.6610478163
+ 0.6724401712 0.6618329883 0.6618329883
+ 0.6731992960 0.6626194119 0.6626194119
+ 0.6739584208 0.6634057760 0.6634057760
+ 0.6747174859 0.6641921997 0.6641921997
+ 0.6754766703 0.6649786234 0.6649786234
+ 0.6762357950 0.6657649875 0.6657649875
+ 0.6769949198 0.6665514112 0.6665514112
+ 0.6777541041 0.6673377752 0.6673377752
+ 0.6785085201 0.6681154966 0.6681154966
+ 0.6792613268 0.6688904762 0.6688904762
+ 0.6800141931 0.6696655154 0.6696655154
+ 0.6807669997 0.6704404950 0.6704404950
+ 0.6815198064 0.6712154746 0.6712154746
+ 0.6822726727 0.6719905138 0.6719905138
+ 0.6830254793 0.6727654934 0.6727654934
+ 0.6837748289 0.6735368967 0.6735368967
+ 0.6845164895 0.6743007898 0.6743007898
+ 0.6852582097 0.6750648022 0.6750648022
+ 0.6859998703 0.6758286953 0.6758286953
+ 0.6867415905 0.6765927076 0.6765927076
+ 0.6874831915 0.6773566008 0.6773566008
+ 0.6882249117 0.6781204939 0.6781204939
+ 0.6889665723 0.6788845062 0.6788845062
+ 0.6897013187 0.6796460152 0.6796460152
+ 0.6904339194 0.6804066896 0.6804066896
+ 0.6911664009 0.6811674833 0.6811674833
+ 0.6918990016 0.6819282770 0.6819282770
+ 0.6926314831 0.6826890111 0.6826890111
+ 0.6933640242 0.6834498048 0.6834498048
+ 0.6940966249 0.6842104793 0.6842104793
+ 0.6948286295 0.6849713922 0.6849713922
+ 0.6955537796 0.6857334971 0.6857334971
+ 0.6962791085 0.6864956021 0.6864956021
+ 0.6970043778 0.6872575879 0.6872575879
+ 0.6977297068 0.6880196929 0.6880196929
+ 0.6984549761 0.6887817979 0.6887817979
+ 0.6991803050 0.6895439029 0.6895439029
+ 0.6999055743 0.6903060079 0.6903060079
+ 0.7006272078 0.6910654902 0.6910654902
+ 0.7013388276 0.6918187141 0.6918187141
+ 0.7020503879 0.6925718188 0.6925718188
+ 0.7027621269 0.6933249235 0.6933249235
+ 0.7034736872 0.6940780282 0.6940780282
+ 0.7041853070 0.6948311925 0.6948311925
+ 0.7048969865 0.6955842972 0.6955842972
+ 0.7056086063 0.6963374019 0.6963374019
+ 0.7063143849 0.6970837116 0.6970837116
+ 0.7070090175 0.6978172064 0.6978172064
+ 0.7077037096 0.6985507011 0.6985507011
+ 0.7083982825 0.6992840767 0.6992840767
+ 0.7090929151 0.7000175714 0.7000175714
+ 0.7097874880 0.7007511258 0.7007511258
+ 0.7104821205 0.7014846206 0.7014846206
+ 0.7111766934 0.7022181153 0.7022181153
+ 0.7118694186 0.7029485703 0.7029485703
+ 0.7125568986 0.7036715150 0.7036715150
+ 0.7132444978 0.7043945193 0.7043945193
+ 0.7139320970 0.7051174045 0.7051174045
+ 0.7146195769 0.7058404088 0.7058404088
+ 0.7153071761 0.7065634131 0.7065634131
+ 0.7159947753 0.7072862983 0.7072862983
+ 0.7166823745 0.7080093026 0.7080093026
+ 0.7173694968 0.7087321281 0.7087321281
+ 0.7180529237 0.7094535828 0.7094535828
+ 0.7187362909 0.7101749778 0.7101749778
+ 0.7194197178 0.7108964920 0.7108964920
+ 0.7201030254 0.7116180062 0.7116180062
+ 0.7207863927 0.7123395205 0.7123395205
+ 0.7214698195 0.7130609155 0.7130609155
+ 0.7221531272 0.7137824297 0.7137824297
+ 0.7228364944 0.7145038843 0.7145038843
+ 0.7235093117 0.7152239084 0.7152239084
+ 0.7241787910 0.7159435153 0.7159435153
+ 0.7248482704 0.7166631222 0.7166631222
+ 0.7255179286 0.7173827291 0.7173827291
+ 0.7261874080 0.7181022763 0.7181022763
+ 0.7268568873 0.7188218832 0.7188218832
+ 0.7275264263 0.7195414901 0.7195414901
+ 0.7281959057 0.7202610970 0.7202610970
+ 0.7288634181 0.7209777236 0.7209777236
+ 0.7295259833 0.7216871977 0.7216871977
+ 0.7301887274 0.7223966718 0.7223966718
+ 0.7308512926 0.7231062055 0.7231062055
+ 0.7315139771 0.7238156796 0.7238156796
+ 0.7321766019 0.7245252132 0.7245252132
+ 0.7328392863 0.7252346873 0.7252346873
+ 0.7335019112 0.7259442210 0.7259442210
+ 0.7341645956 0.7266536951 0.7266536951
+ 0.7348304987 0.7273570895 0.7273570895
+ 0.7354977727 0.7280579209 0.7280579209
+ 0.7361652255 0.7287588120 0.7287588120
+ 0.7368324995 0.7294595838 0.7294595838
+ 0.7374997735 0.7301604152 0.7301604152
+ 0.7381672263 0.7308611870 0.7308611870
+ 0.7388345003 0.7315620184 0.7315620184
+ 0.7395017743 0.7322629094 0.7322629094
+ 0.7401691079 0.7329636812 0.7329636812
+ 0.7408332229 0.7336601019 0.7336601019
+ 0.7414970994 0.7343564034 0.7343564034
+ 0.7421609163 0.7350527048 0.7350527048
+ 0.7428247929 0.7357490063 0.7357490063
+ 0.7434887290 0.7364453077 0.7364453077
+ 0.7441526055 0.7371416092 0.7371416092
+ 0.7448164225 0.7378379107 0.7378379107
+ 0.7454802990 0.7385342121 0.7385342121
+ 0.7461434007 0.7392303944 0.7392303944
+ 0.7467958927 0.7399262190 0.7399262190
+ 0.7474485040 0.7406219244 0.7406219244
+ 0.7481011152 0.7413176894 0.7413176894
+ 0.7487536073 0.7420133948 0.7420133948
+ 0.7494062185 0.7427091002 0.7427091002
+ 0.7500588298 0.7434049249 0.7434049249
+ 0.7507113218 0.7441005707 0.7441005707
+ 0.7513638735 0.7447963953 0.7447963953
+ 0.7520164847 0.7454916835 0.7454916835
+ 0.7526692152 0.7461783290 0.7461783290
+ 0.7533218861 0.7468649745 0.7468649745
+ 0.7539746165 0.7475516796 0.7475516796
+ 0.7546272874 0.7482383251 0.7482383251
+ 0.7552800179 0.7489249706 0.7489249706
+ 0.7559326887 0.7496116757 0.7496116757
+ 0.7565854192 0.7502983212 0.7502983212
+ 0.7572380900 0.7509850264 0.7509850264
+ 0.7578908205 0.7516716719 0.7516716719
+ 0.7585409880 0.7523459196 0.7523459196
+ 0.7591909766 0.7530183792 0.7530183792
+ 0.7598409057 0.7536908984 0.7536908984
+ 0.7604907751 0.7543634176 0.7543634176
+ 0.7611407042 0.7550358772 0.7550358772
+ 0.7617905736 0.7557083964 0.7557083964
+ 0.7624406219 0.7563807964 0.7563807964
+ 0.7630904913 0.7570533156 0.7570533156
+ 0.7637404203 0.7577257752 0.7577257752
+ 0.7643836737 0.7583953738 0.7583953738
+ 0.7650216222 0.7590625286 0.7590625286
+ 0.7656595111 0.7597296238 0.7597296238
+ 0.7662972808 0.7603967190 0.7603967190
+ 0.7669352293 0.7610638738 0.7610638738
+ 0.7675729990 0.7617310286 0.7617310286
+ 0.7682108879 0.7623981237 0.7623981237
+ 0.7688487768 0.7630652785 0.7630652785
+ 0.7694866061 0.7637323737 0.7637323737
+ 0.7701240778 0.7643994093 0.7643994093
+ 0.7707566023 0.7650648952 0.7650648952
+ 0.7713890076 0.7657303810 0.7657303810
+ 0.7720214725 0.7663959265 0.7663959265
+ 0.7726539969 0.7670614123 0.7670614123
+ 0.7732864022 0.7677268982 0.7677268982
+ 0.7739189267 0.7683923841 0.7683923841
+ 0.7745512724 0.7690579295 0.7690579295
+ 0.7751837969 0.7697234154 0.7697234154
+ 0.7758163214 0.7703889012 0.7703889012
+ 0.7764492035 0.7710499763 0.7710499763
+ 0.7770828009 0.7717056870 0.7717056870
+ 0.7777163982 0.7723612785 0.7723612785
+ 0.7783499956 0.7730169892 0.7730169892
+ 0.7789835930 0.7736726999 0.7736726999
+ 0.7796171904 0.7743282914 0.7743282914
+ 0.7802507877 0.7749840021 0.7749840021
+ 0.7808843851 0.7756395936 0.7756395936
+ 0.7815179825 0.7762953043 0.7762953043
+ 0.7821515799 0.7769508958 0.7769508958
+ 0.7827799916 0.7775998712 0.7775998712
+ 0.7834056020 0.7782453895 0.7782453895
+ 0.7840312719 0.7788907886 0.7788907886
+ 0.7846568823 0.7795363069 0.7795363069
+ 0.7852826118 0.7801818252 0.7801818252
+ 0.7859082222 0.7808272243 0.7808272243
+ 0.7865338922 0.7814726830 0.7814726830
+ 0.7871595025 0.7821182013 0.7821182013
+ 0.7877851725 0.7827636003 0.7827636003
+ 0.7884107828 0.7834091187 0.7834091187
+ 0.7890290022 0.7840545177 0.7840545177
+ 0.7896440029 0.7846997976 0.7846997976
+ 0.7902588844 0.7853450775 0.7853450775
+ 0.7908738852 0.7859904170 0.7859904170
+ 0.7914888859 0.7866356969 0.7866356969
+ 0.7921038866 0.7872809768 0.7872809768
+ 0.7927188873 0.7879263163 0.7879263163
+ 0.7933338881 0.7885715961 0.7885715961
+ 0.7939488888 0.7892168760 0.7892168760
+ 0.7945638895 0.7898622155 0.7898622155
+ 0.7951788902 0.7905039191 0.7905039191
+ 0.7957940102 0.7911430001 0.7911430001
+ 0.7964090705 0.7917820811 0.7917820811
+ 0.7970241904 0.7924212813 0.7924212813
+ 0.7976393104 0.7930604219 0.7930604219
+ 0.7982543707 0.7936995029 0.7936995029
+ 0.7988696098 0.7943387032 0.7943387032
+ 0.7994847298 0.7949777842 0.7949777842
+ 0.8000997901 0.7956169248 0.7956169248
+ 0.8007149100 0.7962561250 0.7962561250
+ 0.8013291955 0.7968928814 0.7968928814
+ 0.8019415736 0.7975248098 0.7975248098
+ 0.8025540709 0.7981566787 0.7981566787
+ 0.8031666279 0.7987886071 0.7987886071
+ 0.8037791252 0.7994204760 0.7994204760
+ 0.8043916225 0.8000524044 0.8000524044
+ 0.8050041199 0.8006842732 0.8006842732
+ 0.8056166172 0.8013160825 0.8013160825
+ 0.8062291145 0.8019480109 0.8019480109
+ 0.8068416119 0.8025798798 0.8025798798
+ 0.8074541092 0.8032118082 0.8032118082
+ 0.8080565929 0.8038352728 0.8038352728
+ 0.8086578250 0.8044574857 0.8044574857
+ 0.8092588782 0.8050796986 0.8050796986
+ 0.8098599911 0.8057019114 0.8057019114
+ 0.8104611039 0.8063241839 0.8063241839
+ 0.8110622764 0.8069463968 0.8069463968
+ 0.8116633892 0.8075686097 0.8075686097
+ 0.8122645020 0.8081908226 0.8081908226
+ 0.8128656745 0.8088130951 0.8088130951
+ 0.8134667873 0.8094353080 0.8094353080
+ 0.8140665889 0.8100557923 0.8100557923
+ 0.8146625757 0.8106715083 0.8106715083
+ 0.8152586818 0.8112871051 0.8112871051
+ 0.8158547282 0.8119028211 0.8119028211
+ 0.8164507151 0.8125184178 0.8125184178
+ 0.8170468211 0.8131340742 0.8131340742
+ 0.8176428080 0.8137496710 0.8137496710
+ 0.8182387948 0.8143653870 0.8143653870
+ 0.8188349009 0.8149809837 0.8149809837
+ 0.8194308877 0.8155966997 0.8155966997
+ 0.8200268745 0.8162122965 0.8162122965
+ 0.8206235170 0.8168265820 0.8168265820
+ 0.8212205768 0.8174393773 0.8174393773
+ 0.8218176961 0.8180521131 0.8180521131
+ 0.8224148154 0.8186649084 0.8186649084
+ 0.8230118752 0.8192775846 0.8192775846
+ 0.8236089945 0.8198903799 0.8198903799
+ 0.8242061138 0.8205031157 0.8205031157
+ 0.8248031735 0.8211159110 0.8211159110
+ 0.8254002929 0.8217287064 0.8217287064
+ 0.8259974122 0.8223413825 0.8223413825
+ 0.8265944719 0.8229541779 0.8229541779
+ 0.8271877766 0.8235660791 0.8235660791
+ 0.8277773857 0.8241772056 0.8241772056
+ 0.8283669949 0.8247882724 0.8247882724
+ 0.8289566040 0.8253993988 0.8253993988
+ 0.8295462728 0.8260105252 0.8260105252
+ 0.8301358819 0.8266214728 0.8266214728
+ 0.8307254910 0.8272325993 0.8272325993
+ 0.8313151002 0.8278437257 0.8278437257
+ 0.8319047093 0.8284547925 0.8284547925
+ 0.8324943185 0.8290659189 0.8290659189
+ 0.8330839276 0.8296769857 0.8296769857
+ 0.8336697817 0.8302866220 0.8302866220
+ 0.8342493773 0.8308938146 0.8308938146
+ 0.8348289728 0.8315008879 0.8315008879
+ 0.8354085088 0.8321080208 0.8321080208
+ 0.8359881043 0.8327152133 0.8327152133
+ 0.8365676999 0.8333222866 0.8333222866
+ 0.8371472955 0.8339294195 0.8339294195
+ 0.8377267718 0.8345366120 0.8345366120
+ 0.8383064270 0.8351436853 0.8351436853
+ 0.8388860226 0.8357508183 0.8357508183
+ 0.8394654989 0.8363580108 0.8363580108
+ 0.8400450945 0.8369646072 0.8369646072
+ 0.8406248093 0.8375620246 0.8375620246
+ 0.8412045240 0.8381593823 0.8381593823
+ 0.8417841196 0.8387567997 0.8387567997
+ 0.8423637748 0.8393542171 0.8393542171
+ 0.8429434896 0.8399515748 0.8399515748
+ 0.8435232043 0.8405489922 0.8405489922
+ 0.8441029191 0.8411465287 0.8411465287
+ 0.8446825743 0.8417438865 0.8417438865
+ 0.8452622294 0.8423413038 0.8423413038
+ 0.8458418846 0.8429387212 0.8429387212
+ 0.8464215994 0.8435360789 0.8435360789
+ 0.8469976187 0.8441309929 0.8441309929
+ 0.8475704789 0.8447238207 0.8447238207
+ 0.8481433988 0.8453165889 0.8453165889
+ 0.8487163186 0.8459094167 0.8459094167
+ 0.8492891788 0.8465021849 0.8465021849
+ 0.8498620987 0.8470950127 0.8470950127
+ 0.8504350185 0.8476877809 0.8476877809
+ 0.8510079980 0.8482806087 0.8482806087
+ 0.8515809178 0.8488733768 0.8488733768
+ 0.8521537781 0.8494662046 0.8494662046
+ 0.8527266979 0.8500589728 0.8500589728
+ 0.8532996178 0.8506518006 0.8506518006
+ 0.8538609147 0.8512412906 0.8512412906
+ 0.8544201851 0.8518301845 0.8518301845
+ 0.8549793959 0.8524190784 0.8524190784
+ 0.8555387259 0.8530079126 0.8530079126
+ 0.8560978770 0.8535968065 0.8535968065
+ 0.8566572070 0.8541857004 0.8541857004
+ 0.8572164178 0.8547745943 0.8547745943
+ 0.8577756882 0.8553634882 0.8553634882
+ 0.8583348989 0.8559523821 0.8559523821
+ 0.8588942289 0.8565412760 0.8565412760
+ 0.8594533801 0.8571302295 0.8571302295
+ 0.8600127101 0.8577190042 0.8577190042
+ 0.8605682254 0.8583009243 0.8583009243
+ 0.8611236215 0.8588824272 0.8588824272
+ 0.8616790771 0.8594639897 0.8594639897
+ 0.8622344732 0.8600456119 0.8600456119
+ 0.8627899289 0.8606271148 0.8606271148
+ 0.8633453250 0.8612086773 0.8612086773
+ 0.8639007211 0.8617901802 0.8617901802
+ 0.8644561172 0.8623718023 0.8623718023
+ 0.8650115132 0.8629534245 0.8629534245
+ 0.8655669093 0.8635349274 0.8635349274
+ 0.8661223054 0.8641164899 0.8641164899
+ 0.8666777015 0.8646979928 0.8646979928
+ 0.8672348261 0.8652762175 0.8652762175
+ 0.8677921295 0.8658539057 0.8658539057
+ 0.8683493733 0.8664317131 0.8664317131
+ 0.8689066768 0.8670094013 0.8670094013
+ 0.8694639206 0.8675870895 0.8675870895
+ 0.8700212240 0.8681647778 0.8681647778
+ 0.8705785275 0.8687425852 0.8687425852
+ 0.8711357713 0.8693202734 0.8693202734
+ 0.8716930747 0.8698980212 0.8698980212
+ 0.8722503781 0.8704758286 0.8704758286
+ 0.8728076816 0.8710535169 0.8710535169
+ 0.8733649850 0.8716312051 0.8716312051
+ 0.8739185929 0.8722062111 0.8722062111
+ 0.8744698763 0.8727794290 0.8727794290
+ 0.8750212193 0.8733525276 0.8733525276
+ 0.8755723834 0.8739256859 0.8739256859
+ 0.8761237264 0.8744989038 0.8744989038
+ 0.8766748905 0.8750720024 0.8750720024
+ 0.8772261739 0.8756452203 0.8756452203
+ 0.8777773976 0.8762183785 0.8762183785
+ 0.8783286810 0.8767915964 0.8767915964
+ 0.8788799047 0.8773646951 0.8773646951
+ 0.8794311881 0.8779379129 0.8779379129
+ 0.8799824119 0.8785110712 0.8785110712
+ 0.8805326223 0.8790833950 0.8790833950
+ 0.8810753822 0.8796498775 0.8796498775
+ 0.8816182017 0.8802164197 0.8802164197
+ 0.8821610212 0.8807829022 0.8807829022
+ 0.8827037811 0.8813493252 0.8813493252
+ 0.8832466006 0.8819158077 0.8819158077
+ 0.8837893009 0.8824822903 0.8824822903
+ 0.8843321204 0.8830487728 0.8830487728
+ 0.8848748803 0.8836153150 0.8836153150
+ 0.8854176998 0.8841817975 0.8841817975
+ 0.8859605193 0.8847482204 0.8847482204
+ 0.8865032792 0.8853147030 0.8853147030
+ 0.8870459795 0.8858811855 0.8858811855
+ 0.8875892162 0.8864449859 0.8864449859
+ 0.8881329894 0.8870056272 0.8870056272
+ 0.8886767030 0.8875662088 0.8875662088
+ 0.8892204762 0.8881267905 0.8881267905
+ 0.8897641897 0.8886873126 0.8886873126
+ 0.8903079033 0.8892478943 0.8892478943
+ 0.8908516765 0.8898084760 0.8898084760
+ 0.8913953900 0.8903689981 0.8903689981
+ 0.8919392228 0.8909295797 0.8909295797
+ 0.8924828768 0.8914902210 0.8914902210
+ 0.8930265903 0.8920506835 0.8920506835
+ 0.8935704231 0.8926113248 0.8926113248
+ 0.8941140771 0.8931719065 0.8931719065
+ 0.8946548104 0.8937309980 0.8937309980
+ 0.8951931000 0.8942890167 0.8942890167
+ 0.8957313895 0.8948469162 0.8948469162
+ 0.8962696791 0.8954048753 0.8954048753
+ 0.8968080282 0.8959628940 0.8959628940
+ 0.8973463774 0.8965209126 0.8965209126
+ 0.8978847265 0.8970788121 0.8970788121
+ 0.8984230161 0.8976367712 0.8976367712
+ 0.8989613056 0.8981947899 0.8981947899
+ 0.8994995952 0.8987526894 0.8987526894
+ 0.9000378847 0.8993107080 0.8993107080
+ 0.9005761743 0.8998687267 0.8998687267
+ 0.9011145234 0.9004266262 0.9004266262
+ 0.9016473293 0.9009829760 0.9009829760
+ 0.9021736979 0.9015374184 0.9015374184
+ 0.9027001858 0.9020918012 0.9020918012
+ 0.9032266140 0.9026463032 0.9026463032
+ 0.9037529826 0.9032006860 0.9032006860
+ 0.9042794108 0.9037551284 0.9037551284
+ 0.9048057795 0.9043095112 0.9043095112
+ 0.9053322077 0.9048638940 0.9048638940
+ 0.9058586955 0.9054183960 0.9054183960
+ 0.9063851237 0.9059727788 0.9059727788
+ 0.9069114923 0.9065272212 0.9065272212
+ 0.9074379206 0.9070816040 0.9070816040
+ 0.9079642892 0.9076361060 0.9076361060
+ 0.9084903002 0.9081891179 0.9081891179
+ 0.9090139866 0.9087343812 0.9087343812
+ 0.9095376730 0.9092797041 0.9092797041
+ 0.9100614190 0.9098249078 0.9098249078
+ 0.9105851054 0.9103701711 0.9103701711
+ 0.9111087918 0.9109154940 0.9109154940
+ 0.9116324782 0.9114606977 0.9114606977
+ 0.9121562243 0.9120060205 0.9120060205
+ 0.9126799107 0.9125512838 0.9125512838
+ 0.9132035971 0.9130964875 0.9130964875
+ 0.9137272835 0.9136418104 0.9136418104
+ 0.9142510295 0.9141870737 0.9141870737
+ 0.9147747755 0.9147322774 0.9147322774
+ 0.9152985215 0.9152776003 0.9152776003
+ 0.9158238173 0.9158192277 0.9158192277
+ 0.9163501263 0.9163584709 0.9163584709
+ 0.9168763757 0.9168977737 0.9168977737
+ 0.9174026847 0.9174370766 0.9174370766
+ 0.9179289937 0.9179763794 0.9179763794
+ 0.9184553027 0.9185156226 0.9185156226
+ 0.9189816117 0.9190549254 0.9190549254
+ 0.9195079207 0.9195942283 0.9195942283
+ 0.9200342298 0.9201334715 0.9201334715
+ 0.9205604792 0.9206727743 0.9206727743
+ 0.9210867882 0.9212120771 0.9212120771
+ 0.9216129780 0.9217513800 0.9217513800
+ 0.9221392870 0.9222906828 0.9222906828
+ 0.9226655960 0.9228299856 0.9228299856
+ 0.9231876731 0.9233682752 0.9233682752
+ 0.9237092137 0.9239063859 0.9239063859
+ 0.9242306948 0.9244444966 0.9244444966
+ 0.9247521162 0.9249826074 0.9249826074
+ 0.9252735972 0.9255207777 0.9255207777
+ 0.9257950783 0.9260588884 0.9260588884
+ 0.9263164997 0.9265969992 0.9265969992
+ 0.9268379807 0.9271351099 0.9271351099
+ 0.9273594022 0.9276732206 0.9276732206
+ 0.9278808832 0.9282112718 0.9282112718
+ 0.9284024239 0.9287495017 0.9287495017
+ 0.9289237857 0.9292876124 0.9292876124
+ 0.9294453263 0.9298257232 0.9298257232
+ 0.9299668074 0.9303637743 0.9303637743
+ 0.9304789901 0.9308947921 0.9308947921
+ 0.9309902191 0.9314250946 0.9314250946
+ 0.9315013885 0.9319552779 0.9319552779
+ 0.9320126176 0.9324855804 0.9324855804
+ 0.9325237274 0.9330158234 0.9330158234
+ 0.9330348969 0.9335461259 0.9335461259
+ 0.9335461259 0.9340763092 0.9340763092
+ 0.9340572953 0.9346066117 0.9346066117
+ 0.9345685244 0.9351367950 0.9351367950
+ 0.9350796938 0.9356669784 0.9356669784
+ 0.9355909228 0.9361972809 0.9361972809
+ 0.9361019731 0.9367275238 0.9367275238
+ 0.9366132021 0.9372578263 0.9372578263
+ 0.9371243715 0.9377880096 0.9377880096
+ 0.9376301169 0.9383096099 0.9383096099
+ 0.9381334186 0.9388273954 0.9388273954
+ 0.9386367202 0.9393453002 0.9393453002
+ 0.9391400218 0.9398630857 0.9398630857
+ 0.9396432042 0.9403809905 0.9403809905
+ 0.9401465058 0.9408987761 0.9408987761
+ 0.9406498075 0.9414166808 0.9414166808
+ 0.9411531091 0.9419345260 0.9419345260
+ 0.9416564107 0.9424523115 0.9424523115
+ 0.9421597123 0.9429702163 0.9429702163
+ 0.9426630139 0.9434880018 0.9434880018
+ 0.9431663156 0.9440059066 0.9440059066
+ 0.9436694980 0.9445236921 0.9445236921
+ 0.9441727996 0.9450414777 0.9450414777
+ 0.9446740746 0.9455562234 0.9455562234
+ 0.9451695085 0.9460619092 0.9460619092
+ 0.9456648827 0.9465677142 0.9465677142
+ 0.9461603761 0.9470734000 0.9470734000
+ 0.9466558099 0.9475792050 0.9475792050
+ 0.9471513033 0.9480848908 0.9480848908
+ 0.9476466775 0.9485906959 0.9485906959
+ 0.9481421709 0.9490963817 0.9490963817
+ 0.9486376047 0.9496021867 0.9496021867
+ 0.9491330981 0.9501078725 0.9501078725
+ 0.9496284723 0.9506136775 0.9506136775
+ 0.9501240253 0.9511194229 0.9511194229
+ 0.9506193995 0.9516252279 0.9516252279
+ 0.9511148930 0.9521309137 0.9521309137
+ 0.9516103268 0.9526367188 0.9526367188
+ 0.9520999789 0.9531362057 0.9531362057
+ 0.9525858164 0.9536315799 0.9536315799
+ 0.9530715942 0.9541268945 0.9541268945
+ 0.9535574913 0.9546223283 0.9546223283
+ 0.9540433288 0.9551175833 0.9551175833
+ 0.9545291066 0.9556128979 0.9556128979
+ 0.9550148845 0.9561082721 0.9561082721
+ 0.9555007219 0.9566035867 0.9566035867
+ 0.9559866190 0.9570990205 0.9570990205
+ 0.9564723969 0.9575942755 0.9575942755
+ 0.9569581747 0.9580897093 0.9580897093
+ 0.9574440122 0.9585850239 0.9585850239
+ 0.9579297900 0.9590802789 0.9590802789
+ 0.9584156871 0.9595757127 0.9595757127
+ 0.9589015245 0.9600710273 0.9600710273
+ 0.9593812823 0.9605569243 0.9605569243
+ 0.9598584771 0.9610384107 0.9610384107
+ 0.9603356123 0.9615200162 0.9615200162
+ 0.9608128071 0.9620016217 0.9620016217
+ 0.9612900019 0.9624832273 0.9624832273
+ 0.9617670774 0.9629647136 0.9629647136
+ 0.9622442722 0.9634463191 0.9634463191
+ 0.9627214074 0.9639279246 0.9639279246
+ 0.9631986022 0.9644094706 0.9644094706
+ 0.9636756778 0.9648910165 0.9648910165
+ 0.9641528726 0.9653726220 0.9653726220
+ 0.9646300077 0.9658542275 0.9658542275
+ 0.9651072025 0.9663357735 0.9663357735
+ 0.9655842781 0.9668173194 0.9668173194
+ 0.9660614729 0.9672989249 0.9672989249
+ 0.9665307999 0.9677714705 0.9677714705
+ 0.9669935107 0.9682365060 0.9682365060
+ 0.9674562216 0.9687014818 0.9687014818
+ 0.9679188728 0.9691665173 0.9691665173
+ 0.9683815837 0.9696314931 0.9696314931
+ 0.9688442945 0.9700965285 0.9700965285
+ 0.9693070054 0.9705615044 0.9705615044
+ 0.9697697163 0.9710264802 0.9710264802
+ 0.9702324271 0.9714915156 0.9714915156
+ 0.9706950188 0.9719564915 0.9719564915
+ 0.9711577296 0.9724215269 0.9724215269
+ 0.9716203809 0.9728865027 0.9728865027
+ 0.9720830917 0.9733514786 0.9733514786
+ 0.9725458026 0.9738165140 0.9738165140
+ 0.9730085135 0.9742814898 0.9742814898
+ 0.9734690189 0.9747437239 0.9747437239
+ 0.9739159942 0.9751892090 0.9751892090
+ 0.9743630886 0.9756346941 0.9756346941
+ 0.9748101830 0.9760801792 0.9760801792
+ 0.9752572775 0.9765257835 0.9765257835
+ 0.9757043719 0.9769713283 0.9769713283
+ 0.9761515260 0.9774168134 0.9774168134
+ 0.9765985012 0.9778622985 0.9778622985
+ 0.9770455956 0.9783079028 0.9783079028
+ 0.9774926901 0.9787533879 0.9787533879
+ 0.9779397845 0.9791988730 0.9791988730
+ 0.9783868790 0.9796444178 0.9796444178
+ 0.9788339734 0.9800899029 0.9800899029
+ 0.9792810082 0.9805355072 0.9805355072
+ 0.9797281027 0.9809809923 0.9809809923
+ 0.9801751971 0.9814264774 0.9814264774
+ 0.9806160927 0.9818611741 0.9818611741
+ 0.9810506105 0.9822847247 0.9822847247
+ 0.9814851284 0.9827082753 0.9827082753
+ 0.9819195271 0.9831318855 0.9831318855
+ 0.9823539853 0.9835553765 0.9835553765
+ 0.9827885032 0.9839789867 0.9839789867
+ 0.9832230210 0.9844024777 0.9844024777
+ 0.9836574793 0.9848260880 0.9848260880
+ 0.9840919971 0.9852495790 0.9852495790
+ 0.9845265150 0.9856731892 0.9856731892
+ 0.9849609733 0.9860966802 0.9860966802
+ 0.9853954911 0.9865202904 0.9865202904
+ 0.9858298898 0.9869437814 0.9869437814
+ 0.9862644076 0.9873673916 0.9873673916
+ 0.9866989255 0.9877910018 0.9877910018
+ 0.9871333838 0.9882144928 0.9882144928
+ 0.9875543714 0.9886164069 0.9886164069
+ 0.9879658818 0.9890031219 0.9890031219
+ 0.9883775115 0.9893897772 0.9893897772
+ 0.9887890220 0.9897766113 0.9897766113
+ 0.9892005920 0.9901633263 0.9901633263
+ 0.9896121025 0.9905501008 0.9905501008
+ 0.9900236726 0.9909368157 0.9909368157
+ 0.9904351830 0.9913235903 0.9913235903
+ 0.9908468127 0.9917103052 0.9917103052
+ 0.9912583232 0.9920970201 0.9920970201
+ 0.9916698933 0.9924837947 0.9924837947
+ 0.9920814037 0.9928705096 0.9928705096
+ 0.9924929738 0.9932572842 0.9932572842
+ 0.9929044843 0.9936439991 0.9936439991
+ 0.9933161139 0.9940307736 0.9940307736
+ 0.9937276244 0.9944174886 0.9944174886
+ 0.9941204190 0.9947785139 0.9947785139
+ 0.9944878221 0.9951047897 0.9951047897
+ 0.9948552847 0.9954311848 0.9954311848
+ 0.9952228069 0.9957575202 0.9957575202
+ 0.9955903292 0.9960837960 0.9960837960
+ 0.9959577918 0.9964101911 0.9964101911
+ 0.9963251948 0.9967365265 0.9967365265
+ 0.9966927171 0.9970629215 0.9970629215
+ 0.9970601797 0.9973891973 0.9973891973
+ 0.9974277020 0.9977155924 0.9977155924
+ 0.9977951050 0.9980419278 0.9980419278
+ 0.9981626272 0.9983683228 0.9983683228
+ 0.9985300899 0.9986945987 0.9986945987
+ 0.9988976121 0.9990209937 0.9990209937
+ 0.9992650151 0.9993473291 0.9993473291
+ 0.9996324778 0.9996737242 0.9996737242
+ 1.0000000000 1.0000000000 1.0000000000
+}
diff --git a/release/datafiles/preview_cycles.blend b/release/datafiles/preview_cycles.blend
index b4c9e1ea8fa..d813e23b4cf 100644
--- a/release/datafiles/preview_cycles.blend
+++ b/release/datafiles/preview_cycles.blend
Binary files differ
diff --git a/release/datafiles/prvicons.png b/release/datafiles/prvicons.png
index 1636e644b12..f8f744aadb3 100644
--- a/release/datafiles/prvicons.png
+++ b/release/datafiles/prvicons.png
Binary files differ
diff --git a/release/datafiles/prvicons.sh b/release/datafiles/prvicons.sh
index 144dd9da362..1a82b4db71c 100755
--- a/release/datafiles/prvicons.sh
+++ b/release/datafiles/prvicons.sh
@@ -1,4 +1,7 @@
#!/bin/sh
# This script updates icons from the SVG file
-inkscape prvicons.svg --without-gui --export-png=prvicons.png
+BASEDIR=$(dirname $0)
+
+inkscape $BASEDIR/prvicons.svg --without-gui --export-png=$BASEDIR/prvicons.png
+
diff --git a/release/datafiles/prvicons.svg b/release/datafiles/prvicons.svg
index d373410db73..4e7bac725bd 100644
--- a/release/datafiles/prvicons.svg
+++ b/release/datafiles/prvicons.svg
@@ -14,7 +14,7 @@
height="192"
id="svg2"
sodipodi:version="0.32"
- inkscape:version="0.48.3.1 r9886"
+ inkscape:version="0.48.4 r9939"
version="1.0"
sodipodi:docname="prvicons.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
@@ -22,6 +22,64 @@
inkscape:export-filename="blender_icons.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ gridtolerance="10000"
+ guidetolerance="10000"
+ objecttolerance="10000"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="5.6568542"
+ inkscape:cx="118.09116"
+ inkscape:cy="73.89985"
+ inkscape:document-units="px"
+ inkscape:current-layer="g32752"
+ showgrid="false"
+ inkscape:window-width="1920"
+ inkscape:window-height="1018"
+ inkscape:window-x="-8"
+ inkscape:window-y="-8"
+ inkscape:snap-nodes="true"
+ inkscape:snap-bbox="false"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:object-nodes="false"
+ inkscape:object-paths="false"
+ inkscape:snap-intersection-line-segments="true"
+ inkscape:snap-intersection-grid-guide="false"
+ inkscape:window-maximized="1"
+ inkscape:bbox-paths="false"
+ inkscape:snap-global="true"
+ inkscape:snap-bbox-midpoints="false"
+ inkscape:snap-grids="true"
+ inkscape:snap-to-guides="false"
+ inkscape:snap-page="false"
+ units="px"
+ inkscape:snap-center="false"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0">
+ <inkscape:grid
+ originy="0px"
+ originx="0px"
+ snapvisiblegridlinesonly="true"
+ empopacity="0.25098039"
+ empcolor="#7f7f7f"
+ dotted="false"
+ opacity="0.09803922"
+ color="#808080"
+ empspacing="4"
+ spacingy="0.25px"
+ spacingx="0.25px"
+ enabled="true"
+ visible="true"
+ id="grid17394"
+ type="xygrid" />
+ </sodipodi:namedview>
<title
id="title49470">Blender icons v. 2.5.06</title>
<defs
@@ -29,17478 +87,17848 @@
<linearGradient
id="linearGradient30958">
<stop
- id="stop30960"
+ style="stop-color:#fff9cf;stop-opacity:1;"
offset="0"
- style="stop-color:#fff9cf;stop-opacity:1;" />
+ id="stop30960" />
<stop
- id="stop30962"
+ style="stop-color:#c7bc52;stop-opacity:1;"
offset="1"
- style="stop-color:#c7bc52;stop-opacity:1;" />
+ id="stop30962" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- id="linearGradient29312">
+ id="linearGradient29312"
+ inkscape:collect="always">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop29314"
offset="0"
- id="stop29314" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop29316"
offset="1"
- id="stop29316" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient29304">
<stop
- style="stop-color:#11233f;stop-opacity:1;"
+ id="stop29306"
offset="0"
- id="stop29306" />
+ style="stop-color:#11233f;stop-opacity:1;" />
<stop
- style="stop-color:#162d50;stop-opacity:0;"
+ id="stop29308"
offset="1"
- id="stop29308" />
+ style="stop-color:#162d50;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- id="linearGradient27896">
+ id="linearGradient27896"
+ inkscape:collect="always">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop27898"
offset="0"
- id="stop27898" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop27900"
offset="1"
- id="stop27900" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- id="linearGradient27854">
+ id="linearGradient27854"
+ inkscape:collect="always">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop27856"
offset="0"
- id="stop27856" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop27858"
offset="1"
- id="stop27858" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient24343">
<stop
- id="stop24345"
+ style="stop-color:#184990;stop-opacity:1;"
offset="0"
- style="stop-color:#184990;stop-opacity:1;" />
+ id="stop24345" />
<stop
- id="stop24347"
+ style="stop-color:#c1d5f3;stop-opacity:1;"
offset="1"
- style="stop-color:#c1d5f3;stop-opacity:1;" />
+ id="stop24347" />
</linearGradient>
<linearGradient
id="linearGradient25417">
<stop
- id="stop25419"
+ style="stop-color:#60553b;stop-opacity:1;"
offset="0"
- style="stop-color:#60553b;stop-opacity:1;" />
+ id="stop25419" />
<stop
- id="stop25421"
+ style="stop-color:#b0a17f;stop-opacity:1;"
offset="1"
- style="stop-color:#b0a17f;stop-opacity:1;" />
+ id="stop25421" />
</linearGradient>
<linearGradient
id="linearGradient25108">
<stop
- id="stop25110"
+ style="stop-color:white;stop-opacity:1;"
offset="0"
- style="stop-color:white;stop-opacity:1;" />
+ id="stop25110" />
<stop
- id="stop25112"
+ style="stop-color:#c6c6c6;stop-opacity:1;"
offset="1"
- style="stop-color:#c6c6c6;stop-opacity:1;" />
+ id="stop25112" />
</linearGradient>
<linearGradient
id="linearGradient43807">
<stop
- style="stop-color:#e31b1b;stop-opacity:1;"
+ id="stop43809"
offset="0"
- id="stop43809" />
+ style="stop-color:#e31b1b;stop-opacity:1;" />
<stop
- style="stop-color:#930000;stop-opacity:1;"
+ id="stop43811"
offset="1"
- id="stop43811" />
+ style="stop-color:#930000;stop-opacity:1;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- id="linearGradient38845">
+ id="linearGradient38845"
+ inkscape:collect="always">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop38847"
offset="0"
- id="stop38847" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop38849"
offset="1"
- id="stop38849" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient38831">
<stop
- style="stop-color:#182b42;stop-opacity:1;"
+ id="stop38833"
offset="0"
- id="stop38833" />
+ style="stop-color:#182b42;stop-opacity:1;" />
<stop
- id="stop38836"
+ style="stop-color:#598ac7;stop-opacity:1;"
offset="0.38971797"
- style="stop-color:#598ac7;stop-opacity:1;" />
+ id="stop38836" />
<stop
- style="stop-color:#f1f1f1;stop-opacity:1;"
+ id="stop38838"
offset="1"
- id="stop38838" />
+ style="stop-color:#f1f1f1;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient38256">
<stop
- id="stop38258"
+ style="stop-color:#e7e0c7;stop-opacity:1;"
offset="0"
- style="stop-color:#e7e0c7;stop-opacity:1;" />
+ id="stop38258" />
<stop
- id="stop38260"
+ style="stop-color:#f1eddf;stop-opacity:0;"
offset="1"
- style="stop-color:#f1eddf;stop-opacity:0;" />
+ id="stop38260" />
</linearGradient>
<linearGradient
id="linearGradient71814">
<stop
- style="stop-color:#6e0d00;stop-opacity:1;"
+ id="stop71816"
offset="0"
- id="stop71816" />
+ style="stop-color:#6e0d00;stop-opacity:1;" />
<stop
- style="stop-color:#6f2913;stop-opacity:0;"
+ id="stop71818"
offset="1"
- id="stop71818" />
+ style="stop-color:#6f2913;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient37667">
<stop
- id="stop37669"
+ style="stop-color:black;stop-opacity:1;"
offset="0"
- style="stop-color:black;stop-opacity:1;" />
+ id="stop37669" />
<stop
- id="stop37671"
+ style="stop-color:black;stop-opacity:0"
offset="1"
- style="stop-color:black;stop-opacity:0" />
+ id="stop37671" />
</linearGradient>
<linearGradient
id="linearGradient39080">
<stop
- style="stop-color:#1a2a3d;stop-opacity:1;"
+ id="stop39082"
offset="0"
- id="stop39082" />
+ style="stop-color:#1a2a3d;stop-opacity:1;" />
<stop
- id="stop39084"
+ style="stop-color:#95b0d1;stop-opacity:1;"
offset="0.5"
- style="stop-color:#95b0d1;stop-opacity:1;" />
+ id="stop39084" />
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop39086"
offset="1"
- id="stop39086" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient40809">
<stop
- style="stop-color:#0059d7;stop-opacity:1;"
+ id="stop40811"
offset="0"
- id="stop40811" />
+ style="stop-color:#0059d7;stop-opacity:1;" />
<stop
- style="stop-color:#b7d4ff;stop-opacity:1;"
+ id="stop40813"
offset="1"
- id="stop40813" />
+ style="stop-color:#b7d4ff;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient40703">
<stop
- style="stop-color:#143564;stop-opacity:1;"
+ id="stop40705"
offset="0"
- id="stop40705" />
+ style="stop-color:#143564;stop-opacity:1;" />
<stop
- style="stop-color:#c1d7f8;stop-opacity:1;"
+ id="stop40707"
offset="1"
- id="stop40707" />
+ style="stop-color:#c1d7f8;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient37925">
<stop
- id="stop37927"
+ style="stop-color:#e7cbab;stop-opacity:1;"
offset="0"
- style="stop-color:#e7cbab;stop-opacity:1;" />
+ id="stop37927" />
<stop
- id="stop37929"
+ style="stop-color:#af7333;stop-opacity:1;"
offset="1"
- style="stop-color:#af7333;stop-opacity:1;" />
+ id="stop37929" />
</linearGradient>
<linearGradient
id="linearGradient36273">
<stop
- id="stop36275"
+ style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
- style="stop-color:#ffffff;stop-opacity:1;" />
+ id="stop36275" />
<stop
- id="stop36277"
+ style="stop-color:#ffffff;stop-opacity:1"
offset="1"
- style="stop-color:#ffffff;stop-opacity:1" />
+ id="stop36277" />
</linearGradient>
<linearGradient
id="linearGradient35411">
<stop
- id="stop35414"
+ style="stop-color:#2b5385;stop-opacity:1;"
offset="0"
- style="stop-color:#2b5385;stop-opacity:1;" />
+ id="stop35414" />
<stop
- id="stop35416"
+ style="stop-color:#ffffff;stop-opacity:1;"
offset="1"
- style="stop-color:#ffffff;stop-opacity:1;" />
+ id="stop35416" />
</linearGradient>
<linearGradient
id="linearGradient31356">
<stop
- id="stop31358"
+ style="stop-color:#1a1a1a;stop-opacity:1"
offset="0"
- style="stop-color:#1a1a1a;stop-opacity:1" />
+ id="stop31358" />
<stop
- id="stop31360"
+ style="stop-color:#1a1a1a;stop-opacity:0;"
offset="1"
- style="stop-color:#1a1a1a;stop-opacity:0;" />
+ id="stop31360" />
</linearGradient>
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="radialGradient28107"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.7228842,8.5733105e-8,-9.4831885e-8,0.7995973,71.917045,14.582004)"
- cx="256.49512"
- cy="81.396774"
- fx="256.49512"
+ r="3.779551"
fy="81.396774"
- r="3.779551" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient28105"
+ fx="256.49512"
+ cy="81.396774"
+ cx="256.49512"
+ gradientTransform="matrix(0.7228842,8.5733105e-8,-9.4831885e-8,0.7995973,71.917045,14.582004)"
gradientUnits="userSpaceOnUse"
- x1="875.73486"
- y1="422.77902"
- x2="885.04938"
- y2="427.01648" />
+ id="radialGradient28107"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient28887"
- id="linearGradient28103"
+ y2="427.01648"
+ x2="885.04938"
+ y1="422.77902"
+ x1="875.73486"
gradientUnits="userSpaceOnUse"
- x1="873.09998"
- y1="422.09964"
+ id="linearGradient28105"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="429.23453"
x2="881.01172"
- y2="429.23453" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient29149"
- id="radialGradient28101"
+ y1="422.09964"
+ x1="873.09998"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.6572588,1.2500456,-1.6473175,2.2058465,774.83033,-697.31982)"
- cx="76.180473"
- cy="500.20651"
- fx="76.180473"
- fy="500.20651"
- r="3.1650217" />
+ id="linearGradient28103"
+ xlink:href="#linearGradient28887"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient29149"
- id="radialGradient28099"
+ r="3.1650217"
+ fy="500.20651"
+ fx="76.180473"
+ cy="500.20651"
+ cx="76.180473"
+ gradientTransform="matrix(1.6572588,1.2500456,-1.6473175,2.2058465,774.83033,-697.31982)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
- cx="75.217888"
- cy="500.66806"
- fx="75.217888"
+ id="radialGradient28101"
+ xlink:href="#linearGradient29149"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.1650217"
fy="500.66806"
- r="3.1650217" />
+ fx="75.217888"
+ cy="500.66806"
+ cx="75.217888"
+ gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient28099"
+ xlink:href="#linearGradient29149"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient28887">
<stop
- style="stop-color:#2158a7;stop-opacity:1;"
+ id="stop28889"
offset="0"
- id="stop28889" />
+ style="stop-color:#2158a7;stop-opacity:1;" />
<stop
- style="stop-color:#2f73d5;stop-opacity:0.19607843;"
+ id="stop28891"
offset="1"
- id="stop28891" />
+ style="stop-color:#2f73d5;stop-opacity:0.19607843;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient44421"
- gradientUnits="userSpaceOnUse"
- x1="209"
- y1="238"
+ y2="251.71078"
x2="226.625"
- y2="251.71078" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient44557"
- gradientUnits="userSpaceOnUse"
- x1="209"
y1="238"
+ x1="209"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient44421"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="251.71078"
x2="226.625"
- y2="251.71078" />
+ y1="238"
+ x1="209"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient44557"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient24168">
<stop
- id="stop24170"
+ style="stop-color:#182437;stop-opacity:1;"
offset="0"
- style="stop-color:#182437;stop-opacity:1;" />
+ id="stop24170" />
<stop
- id="stop24172"
+ style="stop-color:#2b4163;stop-opacity:0;"
offset="1"
- style="stop-color:#2b4163;stop-opacity:0;" />
+ id="stop24172" />
</linearGradient>
<linearGradient
id="linearGradient24144">
<stop
- id="stop24146"
+ style="stop-color:#3d361a;stop-opacity:1;"
offset="0"
- style="stop-color:#3d361a;stop-opacity:1;" />
+ id="stop24146" />
<stop
- style="stop-color:#d1c595;stop-opacity:1;"
+ id="stop24148"
offset="0.17958513"
- id="stop24148" />
+ style="stop-color:#d1c595;stop-opacity:1;" />
<stop
- id="stop24150"
+ style="stop-color:#ffffff;stop-opacity:1;"
offset="1"
- style="stop-color:#ffffff;stop-opacity:1;" />
+ id="stop24150" />
</linearGradient>
<linearGradient
id="linearGradient24101">
<stop
- style="stop-color:#643400;stop-opacity:1;"
+ id="stop24103"
offset="0"
- id="stop24103" />
+ style="stop-color:#643400;stop-opacity:1;" />
<stop
- id="stop24105"
+ style="stop-color:#ed983d;stop-opacity:1;"
offset="0.22606115"
- style="stop-color:#ed983d;stop-opacity:1;" />
+ id="stop24105" />
<stop
- style="stop-color:#fff0d5;stop-opacity:1;"
+ id="stop24107"
offset="1"
- id="stop24107" />
+ style="stop-color:#fff0d5;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient24081">
<stop
- id="stop24083"
+ style="stop-color:#b45d00;stop-opacity:1;"
offset="0"
- style="stop-color:#b45d00;stop-opacity:1;" />
+ id="stop24083" />
<stop
- style="stop-color:#ff982a;stop-opacity:1;"
+ id="stop24085"
offset="0.3167825"
- id="stop24085" />
+ style="stop-color:#ff982a;stop-opacity:1;" />
<stop
- id="stop24087"
+ style="stop-color:#ffedd5;stop-opacity:1;"
offset="1"
- style="stop-color:#ffedd5;stop-opacity:1;" />
+ id="stop24087" />
</linearGradient>
<linearGradient
id="linearGradient23302">
<stop
- id="stop23304"
+ style="stop-color:#b45d00;stop-opacity:1;"
offset="0"
- style="stop-color:#b45d00;stop-opacity:1;" />
+ id="stop23304" />
<stop
- style="stop-color:#ff982a;stop-opacity:1;"
+ id="stop23306"
offset="0.39332664"
- id="stop23306" />
+ style="stop-color:#ff982a;stop-opacity:1;" />
<stop
- id="stop23308"
+ style="stop-color:#ffedd5;stop-opacity:1;"
offset="1"
- style="stop-color:#ffedd5;stop-opacity:1;" />
+ id="stop23308" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- id="linearGradient24735">
+ id="linearGradient24735"
+ inkscape:collect="always">
<stop
- style="stop-color:#000000;stop-opacity:1;"
+ id="stop24737"
offset="0"
- id="stop24737" />
+ style="stop-color:#000000;stop-opacity:1;" />
<stop
- style="stop-color:#000000;stop-opacity:0;"
+ id="stop24739"
offset="1"
- id="stop24739" />
+ style="stop-color:#000000;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient24727">
<stop
- style="stop-color:#3d361a;stop-opacity:1;"
+ id="stop24729"
offset="0"
- id="stop24729" />
+ style="stop-color:#3d361a;stop-opacity:1;" />
<stop
- id="stop24731"
+ style="stop-color:#d1c595;stop-opacity:1;"
offset="0.77520341"
- style="stop-color:#d1c595;stop-opacity:1;" />
+ id="stop24731" />
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop24733"
offset="1"
- id="stop24733" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient24711">
<stop
- style="stop-color:#3d361a;stop-opacity:1;"
+ id="stop24713"
offset="0"
- id="stop24713" />
+ style="stop-color:#3d361a;stop-opacity:1;" />
<stop
- id="stop24715"
+ style="stop-color:#d1c595;stop-opacity:1;"
offset="0.21609697"
- style="stop-color:#d1c595;stop-opacity:1;" />
+ id="stop24715" />
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop24717"
offset="1"
- id="stop24717" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient24695">
<stop
- style="stop-color:#3d361a;stop-opacity:1;"
+ id="stop24697"
offset="0"
- id="stop24697" />
+ style="stop-color:#3d361a;stop-opacity:1;" />
<stop
- id="stop24699"
+ style="stop-color:#d1c595;stop-opacity:1;"
offset="0.60401857"
- style="stop-color:#d1c595;stop-opacity:1;" />
+ id="stop24699" />
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop24701"
offset="1"
- id="stop24701" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient24687">
<stop
- style="stop-color:#3d361a;stop-opacity:1;"
+ id="stop24689"
offset="0"
- id="stop24689" />
+ style="stop-color:#3d361a;stop-opacity:1;" />
<stop
- id="stop24691"
+ style="stop-color:#d1c595;stop-opacity:1;"
offset="0.59630167"
- style="stop-color:#d1c595;stop-opacity:1;" />
+ id="stop24691" />
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop24693"
offset="1"
- id="stop24693" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient24679">
<stop
- style="stop-color:#3d361a;stop-opacity:1;"
+ id="stop24681"
offset="0"
- id="stop24681" />
+ style="stop-color:#3d361a;stop-opacity:1;" />
<stop
- id="stop24683"
+ style="stop-color:#d1c595;stop-opacity:1;"
offset="0.45537567"
- style="stop-color:#d1c595;stop-opacity:1;" />
+ id="stop24683" />
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop24685"
offset="1"
- id="stop24685" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient24671">
<stop
- style="stop-color:#3d361a;stop-opacity:1;"
+ id="stop24673"
offset="0"
- id="stop24673" />
+ style="stop-color:#3d361a;stop-opacity:1;" />
<stop
- id="stop24675"
+ style="stop-color:#d1c595;stop-opacity:1;"
offset="0.29527253"
- style="stop-color:#d1c595;stop-opacity:1;" />
+ id="stop24675" />
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop24677"
offset="1"
- id="stop24677" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient23705">
<stop
- id="stop23707"
+ style="stop-color:#d4d2bf;stop-opacity:1;"
offset="0"
- style="stop-color:#d4d2bf;stop-opacity:1;" />
+ id="stop23707" />
<stop
- id="stop23709"
+ style="stop-color:#857f5d;stop-opacity:1;"
offset="1"
- style="stop-color:#857f5d;stop-opacity:1;" />
+ id="stop23709" />
</linearGradient>
<linearGradient
id="linearGradient23906">
<stop
- id="stop23908"
+ style="stop-color:#ff921d;stop-opacity:1;"
offset="0"
- style="stop-color:#ff921d;stop-opacity:1;" />
+ id="stop23908" />
<stop
- id="stop23910"
+ style="stop-color:#ffa751;stop-opacity:0;"
offset="1"
- style="stop-color:#ffa751;stop-opacity:0;" />
+ id="stop23910" />
</linearGradient>
<linearGradient
id="linearGradient42459">
<stop
- style="stop-color:#e7dfab;stop-opacity:1;"
+ id="stop42461"
offset="0"
- id="stop42461" />
+ style="stop-color:#e7dfab;stop-opacity:1;" />
<stop
- style="stop-color:#af9d33;stop-opacity:1;"
+ id="stop42463"
offset="1"
- id="stop42463" />
+ style="stop-color:#af9d33;stop-opacity:1;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient41723"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(744,397)"
- x1="-287"
- y1="-276.1875"
+ y2="-271.9375"
x2="-281.4375"
- y2="-271.9375" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient41721"
+ y1="-276.1875"
+ x1="-287"
+ gradientTransform="translate(744,397)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.695652,0,0,0.869703,342.06514,-90.66358)"
- x1="171.42436"
- y1="259.71194"
- x2="170.20523"
- y2="244.96393" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient41723"
xlink:href="#linearGradient319"
- id="linearGradient24246"
- gradientUnits="userSpaceOnUse"
- x1="426.12415"
- y1="179.12074"
- x2="425"
- y2="179.12285" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24143"
- id="linearGradient24244"
+ y2="244.96393"
+ x2="170.20523"
+ y1="259.71194"
+ x1="171.42436"
+ gradientTransform="matrix(0.695652,0,0,0.869703,342.06514,-90.66358)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(186,-105)"
- x1="246.12868"
- y1="283.63254"
- x2="237.75459"
- y2="266.34406" />
+ id="linearGradient41721"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="179.12285"
+ x2="425"
+ y1="179.12074"
+ x1="426.12415"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient24246"
xlink:href="#linearGradient319"
- id="linearGradient24278"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="266.34406"
+ x2="237.75459"
+ y1="283.63254"
+ x1="246.12868"
+ gradientTransform="translate(186,-105)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(744,397)"
- x1="-287.56247"
- y1="-276.71042"
- x2="-282.59851"
- y2="-271.35284" />
+ id="linearGradient24244"
+ xlink:href="#linearGradient24143"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient24276"
+ y2="-271.35284"
+ x2="-282.59851"
+ y1="-276.71042"
+ x1="-287.56247"
+ gradientTransform="translate(744,397)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.695652,0,0,0.869703,342.06514,-90.66358)"
- x1="190.33647"
- y1="266.7905"
+ id="linearGradient24278"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="247.58694"
x2="170.9689"
- y2="247.58694" />
+ y1="266.7905"
+ x1="190.33647"
+ gradientTransform="matrix(0.695652,0,0,0.869703,342.06514,-90.66358)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient24276"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient24143">
<stop
- id="stop24145"
+ style="stop-color:#3d361a;stop-opacity:1;"
offset="0"
- style="stop-color:#3d361a;stop-opacity:1;" />
+ id="stop24145" />
<stop
- style="stop-color:#d1c595;stop-opacity:1;"
+ id="stop24669"
offset="0.5"
- id="stop24669" />
+ style="stop-color:#d1c595;stop-opacity:1;" />
<stop
- id="stop24147"
+ style="stop-color:#ffffff;stop-opacity:1;"
offset="1"
- style="stop-color:#ffffff;stop-opacity:1;" />
+ id="stop24147" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24687"
- id="linearGradient24238"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.043478,0,0,0.956667,304.84783,-86.57833)"
- x1="120.2969"
- y1="281.26645"
+ y2="260.21841"
x2="116.37123"
- y2="260.21841" />
+ y1="281.26645"
+ x1="120.2969"
+ gradientTransform="matrix(1.043478,0,0,0.956667,304.84783,-86.57833)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient24238"
+ xlink:href="#linearGradient24687"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient24642">
<stop
- style="stop-color:#d0dbe8;stop-opacity:1;"
+ id="stop24644"
offset="0"
- id="stop24644" />
+ style="stop-color:#d0dbe8;stop-opacity:1;" />
<stop
- style="stop-color:#6ca3e9;stop-opacity:0;"
+ id="stop24646"
offset="1"
- id="stop24646" />
+ style="stop-color:#6ca3e9;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient24632">
<stop
- style="stop-color:#28394f;stop-opacity:1;"
+ id="stop24634"
offset="0"
- id="stop24634" />
+ style="stop-color:#28394f;stop-opacity:1;" />
<stop
- id="stop24636"
+ style="stop-color:#0d386a;stop-opacity:0.78431374;"
offset="0.17637014"
- style="stop-color:#0d386a;stop-opacity:0.78431374;" />
+ id="stop24636" />
<stop
- id="stop24638"
+ style="stop-color:#18437d;stop-opacity:0.47058824;"
offset="0.35274029"
- style="stop-color:#18437d;stop-opacity:0.47058824;" />
+ id="stop24638" />
<stop
- style="stop-color:#154e94;stop-opacity:0;"
+ id="stop24640"
offset="1"
- id="stop24640" />
+ style="stop-color:#154e94;stop-opacity:0;" />
</linearGradient>
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient22562"
- id="radialGradient23167"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9934369,-0.1143813,0.1033636,0.8977446,-30.451879,30.134649)"
- cx="-0.10810681"
- cy="294.60239"
- fx="-0.10810681"
+ r="6.6750002"
fy="294.60239"
- r="6.6750002" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient23201"
+ fx="-0.10810681"
+ cy="294.60239"
+ cx="-0.10810681"
+ gradientTransform="matrix(0.9934369,-0.1143813,0.1033636,0.8977446,-30.451879,30.134649)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-61,0)"
- x1="22.75"
- y1="245"
- x2="24.25"
- y2="245" />
+ id="radialGradient23167"
+ xlink:href="#linearGradient22562"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient23199"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-1,0)"
- x1="22.75"
+ y2="245"
+ x2="24.25"
y1="245"
+ x1="22.75"
+ gradientTransform="translate(-61,0)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient23201"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="245"
x2="24.5"
- y2="245" />
+ y1="245"
+ x1="22.75"
+ gradientTransform="translate(-1,0)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient23199"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<mask
- maskUnits="userSpaceOnUse"
- id="mask23189">
+ id="mask23189"
+ maskUnits="userSpaceOnUse">
<g
- transform="translate(-28,49)"
- id="g23193">
+ id="g23193"
+ transform="translate(-28,49)">
<rect
- y="237"
- x="22"
- height="16"
- width="9"
+ style="fill:url(#linearGradient23199);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.79999995;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect23195"
- style="fill:url(#linearGradient23199);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.79999995;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
- <rect
- transform="scale(-1,1)"
- style="fill:url(#linearGradient23201);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.79999995;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- id="rect23197"
width="9"
height="16"
- x="-38"
+ x="22"
y="237" />
+ <rect
+ y="237"
+ x="-38"
+ height="16"
+ width="9"
+ id="rect23197"
+ style="fill:url(#linearGradient23201);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.79999995;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ transform="scale(-1,1)" />
</g>
</mask>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient24208"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-46.000005,-117)"
- x1="257.75"
- y1="388"
+ y2="388"
x2="272"
- y2="388" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient24206"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-54.000005,-120)"
- x1="258.52756"
y1="388"
- x2="279"
- y2="388" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient24204"
+ x1="257.75"
+ gradientTransform="translate(-46.000005,-117)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-48.983883,-126)"
- x1="259.75"
- y1="388"
- x2="273"
- y2="388" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient24208"
xlink:href="#linearGradient319"
- id="linearGradient24202"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-52.983883,-129)"
- x1="258"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="388"
+ x2="279"
y1="388"
- x2="273"
- y2="388" />
+ x1="258.52756"
+ gradientTransform="translate(-54.000005,-120)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient24206"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="388"
+ x2="273"
+ y1="388"
+ x1="259.75"
+ gradientTransform="translate(-48.983883,-126)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient24204"
xlink:href="#linearGradient319"
- id="linearGradient23379"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="388"
+ x2="273"
+ y1="388"
+ x1="258"
+ gradientTransform="translate(-52.983883,-129)"
gradientUnits="userSpaceOnUse"
- x1="126.37032"
- y1="110.87843"
- x2="139.86742"
- y2="126.57021" />
+ id="linearGradient24202"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient15437"
- id="linearGradient23377"
+ y2="126.57021"
+ x2="139.86742"
+ y1="110.87843"
+ x1="126.37032"
gradientUnits="userSpaceOnUse"
- x1="137.88235"
- y1="124.67203"
- x2="131.3092"
- y2="117.24104" />
+ id="linearGradient23379"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient13938"
- id="linearGradient23375"
+ y2="117.24104"
+ x2="131.3092"
+ y1="124.67203"
+ x1="137.88235"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9995363,0,0,-1.0036971,220.01067,167.35026)"
- x1="52.06274"
- y1="96.767769"
- x2="44.999863"
- y2="103.57072" />
+ id="linearGradient23377"
+ xlink:href="#linearGradient15437"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient14232"
- id="linearGradient23373"
+ y2="103.57072"
+ x2="44.999863"
+ y1="96.767769"
+ x1="52.06274"
+ gradientTransform="matrix(0.9995363,0,0,-1.0036971,220.01067,167.35026)"
gradientUnits="userSpaceOnUse"
- x1="122.38876"
- y1="108.82882"
+ id="linearGradient23375"
+ xlink:href="#linearGradient13938"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="121.20407"
x2="133.88583"
- y2="121.20407" />
+ y1="108.82882"
+ x1="122.38876"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient23373"
+ xlink:href="#linearGradient14232"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient23974">
<stop
- id="stop23976"
+ style="stop-color:#2561b7;stop-opacity:1;"
offset="0"
- style="stop-color:#2561b7;stop-opacity:1;" />
+ id="stop23976" />
<stop
- id="stop23978"
+ style="stop-color:#f9fbff;stop-opacity:1"
offset="1"
- style="stop-color:#f9fbff;stop-opacity:1" />
+ id="stop23978" />
</linearGradient>
<linearGradient
id="linearGradient40983">
<stop
- style="stop-color:#6a9ae0;stop-opacity:1;"
+ id="stop40985"
offset="0"
- id="stop40985" />
+ style="stop-color:#6a9ae0;stop-opacity:1;" />
<stop
- style="stop-color:#5189db;stop-opacity:0;"
+ id="stop40987"
offset="1"
- id="stop40987" />
+ style="stop-color:#5189db;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient23280"
- gradientUnits="userSpaceOnUse"
- x1="127.60629"
- y1="112.12571"
+ y2="126.72997"
x2="140.72693"
- y2="126.72997" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient23278"
+ y1="112.12571"
+ x1="127.60629"
gradientUnits="userSpaceOnUse"
- x1="125.01582"
- y1="110.86718"
- x2="132.46898"
- y2="119.54019" />
+ id="linearGradient23280"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="linearGradient23276"
+ y2="119.54019"
+ x2="132.46898"
+ y1="110.86718"
+ x1="125.01582"
gradientUnits="userSpaceOnUse"
- x1="139.37782"
- y1="126.3454"
- x2="131.71249"
- y2="118.34238" />
+ id="linearGradient23278"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient14418"
- id="linearGradient23274"
+ y2="118.34238"
+ x2="131.71249"
+ y1="126.3454"
+ x1="139.37782"
gradientUnits="userSpaceOnUse"
- x1="144.8255"
- y1="132.15414"
+ id="linearGradient23276"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="117.10313"
x2="130.10634"
- y2="117.10313" />
+ y1="132.15414"
+ x1="144.8255"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient23274"
+ xlink:href="#linearGradient14418"
+ inkscape:collect="always" />
<linearGradient
- id="linearGradient30777"
- inkscape:collect="always">
+ inkscape:collect="always"
+ id="linearGradient30777">
<stop
- id="stop30779"
+ style="stop-color:#acacac;stop-opacity:1"
offset="0"
- style="stop-color:#acacac;stop-opacity:1" />
+ id="stop30779" />
<stop
- id="stop30781"
+ style="stop-color:black;stop-opacity:0;"
offset="1"
- style="stop-color:black;stop-opacity:0;" />
+ id="stop30781" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- id="linearGradient29485">
+ id="linearGradient29485"
+ inkscape:collect="always">
<stop
- style="stop-color:black;stop-opacity:1;"
+ id="stop29487"
offset="0"
- id="stop29487" />
+ style="stop-color:black;stop-opacity:1;" />
<stop
- style="stop-color:black;stop-opacity:0;"
+ id="stop29489"
offset="1"
- id="stop29489" />
+ style="stop-color:black;stop-opacity:0;" />
</linearGradient>
<filter
- inkscape:collect="always"
- x="-0.55821538"
- width="2.1164308"
- y="-1.0219563"
- height="3.0439126"
+ color-interpolation-filters="sRGB"
id="filter20578"
- color-interpolation-filters="sRGB">
+ height="3.0439126"
+ y="-1.0219563"
+ width="2.1164308"
+ x="-0.55821538"
+ inkscape:collect="always">
<feGaussianBlur
- inkscape:collect="always"
+ id="feGaussianBlur20580"
stdDeviation="2.0410255"
- id="feGaussianBlur20580" />
+ inkscape:collect="always" />
</filter>
<clipPath
- clipPathUnits="userSpaceOnUse"
- id="clipPath20586">
+ id="clipPath20586"
+ clipPathUnits="userSpaceOnUse">
<path
- sodipodi:type="arc"
- style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- id="path34889"
- sodipodi:cx="53"
- sodipodi:cy="554"
- sodipodi:rx="4.5"
- sodipodi:ry="2.25"
+ transform="matrix(1.870472,0.1894819,-0.6587894,2.4281336,319.59052,-798.11661)"
d="m 57.5,554 a 4.5,2.25 0 1 1 -9,0 4.5,2.25 0 1 1 9,0 z"
- transform="matrix(1.870472,0.1894819,-0.6587894,2.4281336,319.59052,-798.11661)" />
+ sodipodi:ry="2.25"
+ sodipodi:rx="4.5"
+ sodipodi:cy="554"
+ sodipodi:cx="53"
+ id="path34889"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ sodipodi:type="arc" />
</clipPath>
<radialGradient
- id="aigrd2"
- cx="20.892099"
- cy="114.5684"
- r="5.256"
- fx="20.892099"
+ gradientUnits="userSpaceOnUse"
fy="114.5684"
- gradientUnits="userSpaceOnUse">
+ fx="20.892099"
+ r="5.256"
+ cy="114.5684"
+ cx="20.892099"
+ id="aigrd2">
<stop
- offset="0"
+ id="stop15566"
style="stop-color:#F0F0F0"
- id="stop15566" />
+ offset="0" />
<stop
- offset="1.0000000"
+ id="stop15568"
style="stop-color:#9a9a9a;stop-opacity:1.0000000;"
- id="stop15568" />
+ offset="1.0000000" />
</radialGradient>
<filter
- inkscape:collect="always"
- x="-0.45600089"
- width="1.9120018"
- y="-0.50666559"
- height="2.0133312"
+ color-interpolation-filters="sRGB"
id="filter63011"
- color-interpolation-filters="sRGB">
+ height="2.0133312"
+ y="-0.50666559"
+ width="1.9120018"
+ x="-0.45600089"
+ inkscape:collect="always">
<feGaussianBlur
- inkscape:collect="always"
+ id="feGaussianBlur63013"
stdDeviation="1.899998"
- id="feGaussianBlur63013" />
+ inkscape:collect="always" />
</filter>
<clipPath
- clipPathUnits="userSpaceOnUse"
- id="clipPath13106">
+ id="clipPath13106"
+ clipPathUnits="userSpaceOnUse">
<path
- style="fill:url(#linearGradient13110);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;display:inline"
- d="m 125.5,433.5 23,0 0,41 -33,0 0,-31 10,-10 z"
- id="path34850"
- sodipodi:nodetypes="cccccc"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- inkscape:export-xdpi="90"
+ inkscape:connector-curvature="0"
inkscape:export-ydpi="90"
- inkscape:connector-curvature="0" />
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ sodipodi:nodetypes="cccccc"
+ id="path34850"
+ d="m 125.5,433.5 23,0 0,41 -33,0 0,-31 10,-10 z"
+ style="fill:url(#linearGradient13110);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;display:inline" />
</clipPath>
<linearGradient
id="linearGradient58334">
<stop
- id="stop58336"
+ style="stop-color:#ffffff;stop-opacity:0.87628865;"
offset="0.0000000"
- style="stop-color:#ffffff;stop-opacity:0.87628865;" />
+ id="stop58336" />
<stop
- id="stop58338"
+ style="stop-color:#fffffe;stop-opacity:0.0000000;"
offset="1.0000000"
- style="stop-color:#fffffe;stop-opacity:0.0000000;" />
+ id="stop58338" />
</linearGradient>
<linearGradient
id="linearGradient8864">
<stop
- id="stop8866"
+ style="stop-color:#b43214;stop-opacity:1;"
offset="0"
- style="stop-color:#b43214;stop-opacity:1;" />
+ id="stop8866" />
<stop
- id="stop8868"
+ style="stop-color:#e86830;stop-opacity:1;"
offset="1"
- style="stop-color:#e86830;stop-opacity:1;" />
+ id="stop8868" />
</linearGradient>
<linearGradient
id="linearGradient20324">
<stop
- id="stop20326"
+ style="stop-color:#35241b;stop-opacity:1;"
offset="0"
- style="stop-color:#35241b;stop-opacity:1;" />
+ id="stop20326" />
<stop
- style="stop-color:#69390e;stop-opacity:0.8392157;"
+ id="stop20328"
offset="0.17637014"
- id="stop20328" />
+ style="stop-color:#69390e;stop-opacity:0.8392157;" />
<stop
- style="stop-color:#6c5b15;stop-opacity:0.67843139;"
+ id="stop20330"
offset="0.35274029"
- id="stop20330" />
+ style="stop-color:#6c5b15;stop-opacity:0.67843139;" />
<stop
- id="stop20332"
+ style="stop-color:#947b15;stop-opacity:0;"
offset="1"
- style="stop-color:#947b15;stop-opacity:0;" />
+ id="stop20332" />
</linearGradient>
<linearGradient
id="linearGradient37623">
<stop
- id="stop37625"
+ style="stop-color:#e5e1ca;stop-opacity:1;"
offset="0"
- style="stop-color:#e5e1ca;stop-opacity:1;" />
+ id="stop37625" />
<stop
- id="stop37627"
+ style="stop-color:#d6ca22;stop-opacity:0;"
offset="1"
- style="stop-color:#d6ca22;stop-opacity:0;" />
+ id="stop37627" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- id="linearGradient36116">
+ id="linearGradient36116"
+ inkscape:collect="always">
<stop
- style="stop-color:#000000;stop-opacity:1;"
+ id="stop36118"
offset="0"
- id="stop36118" />
+ style="stop-color:#000000;stop-opacity:1;" />
<stop
- style="stop-color:#000000;stop-opacity:0;"
+ id="stop36120"
offset="1"
- id="stop36120" />
+ style="stop-color:#000000;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient22852"
- gradientUnits="userSpaceOnUse"
- x1="133.94305"
- y1="116.00471"
+ y2="133.14267"
x2="117.29694"
- y2="133.14267" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient22850"
+ y1="116.00471"
+ x1="133.94305"
gradientUnits="userSpaceOnUse"
- x1="136.55727"
- y1="125.87247"
- x2="129.70895"
- y2="118.00132" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient22852"
xlink:href="#linearGradient319"
- id="linearGradient22896"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0.01387,0)"
- x1="441.98615"
- y1="77.44017"
- x2="424.75217"
- y2="75.5" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient22846"
+ y2="118.00132"
+ x2="129.70895"
+ y1="125.87247"
+ x1="136.55727"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0.01387,0)"
- x1="438.61115"
- y1="78"
- x2="424.75217"
- y2="75.5" />
+ id="linearGradient22850"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient22844"
+ y2="75.5"
+ x2="424.75217"
+ y1="77.44017"
+ x1="441.98615"
+ gradientTransform="translate(0.01387,0)"
gradientUnits="userSpaceOnUse"
+ id="linearGradient22896"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="75.5"
+ x2="424.75217"
+ y1="78"
+ x1="438.61115"
gradientTransform="translate(0.01387,0)"
- x1="437.98615"
- y1="77"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient22846"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="75.5"
x2="424.75217"
- y2="75.5" />
+ y1="77"
+ x1="437.98615"
+ gradientTransform="translate(0.01387,0)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient22844"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient22562">
<stop
- style="stop-color:#001e50;stop-opacity:1;"
+ id="stop22564"
offset="0"
- id="stop22564" />
+ style="stop-color:#001e50;stop-opacity:1;" />
<stop
- style="stop-color:#1e3e70;stop-opacity:0;"
+ id="stop22566"
offset="1"
- id="stop22566" />
+ style="stop-color:#1e3e70;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient22562"
- id="linearGradient22842"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(399.01387,-202)"
- x1="28.4375"
- y1="277"
+ y2="276.92188"
x2="23.25"
- y2="276.92188" />
+ y1="277"
+ x1="28.4375"
+ gradientTransform="translate(399.01387,-202)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient22842"
+ xlink:href="#linearGradient22562"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient22556">
<stop
- id="stop22558"
+ style="stop-color:#6a9bef;stop-opacity:1"
offset="0"
- style="stop-color:#6a9bef;stop-opacity:1" />
+ id="stop22558" />
<stop
- style="stop-color:#bccee8;stop-opacity:0.58450705;"
+ id="stop22568"
offset="0.77941167"
- id="stop22568" />
+ style="stop-color:#bccee8;stop-opacity:0.58450705;" />
<stop
- id="stop22560"
+ style="stop-color:#ccdaed;stop-opacity:0;"
offset="1"
- style="stop-color:#ccdaed;stop-opacity:0;" />
+ id="stop22560" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient22556"
- id="linearGradient22840"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.785748,0,0,0.78488,265.93616,46.1048)"
- x1="210.08989"
- y1="38.088879"
+ y2="38.088879"
x2="199.27217"
- y2="38.088879" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="radialGradient22838"
+ y1="38.088879"
+ x1="210.08989"
+ gradientTransform="matrix(0.785748,0,0,0.78488,265.93616,46.1048)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8128508,0,0,0.8128508,80.474142,14.46897)"
- cx="430.00003"
- cy="77.3125"
- fx="430.00003"
+ id="linearGradient22840"
+ xlink:href="#linearGradient22556"
+ inkscape:collect="always" />
+ <radialGradient
+ r="8"
fy="77.3125"
- r="8" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient22882"
- id="linearGradient22848"
+ fx="430.00003"
+ cy="77.3125"
+ cx="430.00003"
+ gradientTransform="matrix(0.8128508,0,0,0.8128508,80.474142,14.46897)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.1929722,0,0,0.5,-462.63135,-59)"
- x1="24"
- y1="285"
+ id="radialGradient22838"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="285"
x2="31.538462"
- y2="285" />
+ y1="285"
+ x1="24"
+ gradientTransform="matrix(1.1929722,0,0,0.5,-462.63135,-59)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient22848"
+ xlink:href="#linearGradient22882"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient22882">
<stop
- style="stop-color:#323232;stop-opacity:0;"
+ id="stop22884"
offset="0"
- id="stop22884" />
+ style="stop-color:#323232;stop-opacity:0;" />
<stop
- id="stop22886"
+ style="stop-color:#323232;stop-opacity:0.49803922;"
offset="0.21233012"
- style="stop-color:#323232;stop-opacity:0.49803922;" />
+ id="stop22886" />
<stop
- id="stop22888"
+ style="stop-color:#323232;stop-opacity:1;"
offset="0.54086536"
- style="stop-color:#323232;stop-opacity:1;" />
+ id="stop22888" />
<stop
- style="stop-color:#323232;stop-opacity:0.49803922;"
+ id="stop22890"
offset="0.83381736"
- id="stop22890" />
+ style="stop-color:#323232;stop-opacity:0.49803922;" />
<stop
- style="stop-color:#323232;stop-opacity:0;"
+ id="stop22892"
offset="1"
- id="stop22892" />
+ style="stop-color:#323232;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient22882"
- id="linearGradient22880"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.0369025,0,0,1.5,-458.38567,-344)"
- x1="23.959812"
- y1="285"
+ y2="285"
x2="31.498274"
- y2="285" />
+ y1="285"
+ x1="23.959812"
+ gradientTransform="matrix(1.0369025,0,0,1.5,-458.38567,-344)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient22880"
+ xlink:href="#linearGradient22882"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient35407">
<stop
- id="stop35409"
+ style="stop-color:#a17306;stop-opacity:1;"
offset="0"
- style="stop-color:#a17306;stop-opacity:1;" />
+ id="stop35409" />
<stop
- style="stop-color:#cca649;stop-opacity:1;"
+ id="stop35411"
offset="0.43277758"
- id="stop35411" />
+ style="stop-color:#cca649;stop-opacity:1;" />
<stop
- id="stop35413"
+ style="stop-color:#f9f5e9;stop-opacity:1;"
offset="1"
- style="stop-color:#f9f5e9;stop-opacity:1;" />
+ id="stop35413" />
</linearGradient>
<linearGradient
id="linearGradient35391">
<stop
- id="stop35393"
+ style="stop-color:#322800;stop-opacity:1;"
offset="0"
- style="stop-color:#322800;stop-opacity:1;" />
+ id="stop35393" />
<stop
- id="stop35395"
+ style="stop-color:#6e4800;stop-opacity:0;"
offset="1"
- style="stop-color:#6e4800;stop-opacity:0;" />
+ id="stop35395" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- id="linearGradient34157">
+ id="linearGradient34157"
+ inkscape:collect="always">
<stop
- style="stop-color:#000000;stop-opacity:1;"
+ id="stop34159"
offset="0"
- id="stop34159" />
+ style="stop-color:#000000;stop-opacity:1;" />
<stop
- style="stop-color:#000000;stop-opacity:0;"
+ id="stop34161"
offset="1"
- id="stop34161" />
+ style="stop-color:#000000;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient38256"
- id="linearGradient22457"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,-18)"
- x1="-25.5"
- y1="36.828632"
+ y2="26.027344"
x2="-25.5"
- y2="26.027344" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient22455"
+ y1="36.828632"
+ x1="-25.5"
+ gradientTransform="translate(0,-18)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-354,-314.00002)"
- x1="308"
- y1="323"
- x2="343.26239"
- y2="340" />
+ id="linearGradient22457"
+ xlink:href="#linearGradient38256"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient22453"
+ y2="340"
+ x2="343.26239"
+ y1="323"
+ x1="308"
+ gradientTransform="translate(-354,-314.00002)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,-18)"
- x1="-27.299919"
- y1="37"
+ id="linearGradient22455"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="23.414351"
x2="-25.5"
- y2="23.414351" />
+ y1="37"
+ x1="-27.299919"
+ gradientTransform="translate(0,-18)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient22453"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient21609">
<stop
- id="stop21611"
+ style="stop-color:black;stop-opacity:1"
offset="0"
- style="stop-color:black;stop-opacity:1" />
+ id="stop21611" />
<stop
- id="stop21613"
+ style="stop-color:white;stop-opacity:1;"
offset="1"
- style="stop-color:white;stop-opacity:1;" />
+ id="stop21613" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient21609"
- id="linearGradient20961"
- gradientUnits="userSpaceOnUse"
- x1="162"
- y1="103.71875"
+ y2="103.75"
x2="165"
- y2="103.75" />
+ y1="103.71875"
+ x1="162"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient20961"
+ xlink:href="#linearGradient21609"
+ inkscape:collect="always" />
<mask
- maskUnits="userSpaceOnUse"
- id="mask20957">
+ id="mask20957"
+ maskUnits="userSpaceOnUse">
<rect
- y="101"
- x="162"
- height="5"
- width="8"
+ style="fill:url(#linearGradient20961);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.29999995;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect20959"
- style="fill:url(#linearGradient20961);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.29999995;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ width="8"
+ height="5"
+ x="162"
+ y="101" />
</mask>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient32335"
- gradientUnits="userSpaceOnUse"
- x1="285.39999"
- y1="323.80002"
+ y2="325"
x2="286.60001"
- y2="325" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient22081"
+ y1="323.80002"
+ x1="285.39999"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-157.00004,-233.00002)"
- x1="308"
- y1="323"
+ id="linearGradient32335"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="337.517"
x2="337.80573"
- y2="337.517" />
+ y1="323"
+ x1="308"
+ gradientTransform="translate(-157.00004,-233.00002)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient22081"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- id="linearGradient19900">
+ id="linearGradient19900"
+ inkscape:collect="always">
<stop
- style="stop-color:#1a1a1a;stop-opacity:1;"
+ id="stop19902"
offset="0"
- id="stop19902" />
+ style="stop-color:#1a1a1a;stop-opacity:1;" />
<stop
- style="stop-color:#1a1a1a;stop-opacity:0;"
+ id="stop19904"
offset="1"
- id="stop19904" />
+ style="stop-color:#1a1a1a;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient18105">
<stop
- id="stop18107"
+ style="stop-color:#162d50;stop-opacity:1"
offset="0"
- style="stop-color:#162d50;stop-opacity:1" />
+ id="stop18107" />
<stop
- id="stop18109"
+ style="stop-color:#1e3e70;stop-opacity:0;"
offset="1"
- style="stop-color:#1e3e70;stop-opacity:0;" />
+ id="stop18109" />
</linearGradient>
<linearGradient
id="linearGradient18056">
<stop
- id="stop18058"
+ style="stop-color:#162d50;stop-opacity:1"
offset="0"
- style="stop-color:#162d50;stop-opacity:1" />
+ id="stop18058" />
<stop
- id="stop18060"
+ style="stop-color:#295498;stop-opacity:0.34057972;"
offset="1"
- style="stop-color:#295498;stop-opacity:0.34057972;" />
+ id="stop18060" />
</linearGradient>
<linearGradient
id="linearGradient21327">
<stop
- style="stop-color:#1e3e70;stop-opacity:1;"
+ id="stop21329"
offset="0"
- id="stop21329" />
+ style="stop-color:#1e3e70;stop-opacity:1;" />
<stop
- style="stop-color:#1e3e70;stop-opacity:0;"
+ id="stop21331"
offset="1"
- id="stop21331" />
+ style="stop-color:#1e3e70;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient19625">
<stop
- id="stop19627"
+ style="stop-color:#2258a6;stop-opacity:1;"
offset="0"
- style="stop-color:#2258a6;stop-opacity:1;" />
+ id="stop19627" />
<stop
- id="stop19629"
+ style="stop-color:#c1d7f8;stop-opacity:1;"
offset="1"
- style="stop-color:#c1d7f8;stop-opacity:1;" />
+ id="stop19629" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient35391"
- id="linearGradient20217"
- x1="408.75"
- y1="-35.483223"
- x2="408.75"
+ gradientUnits="userSpaceOnUse"
y2="-40.000008"
- gradientUnits="userSpaceOnUse" />
+ x2="408.75"
+ y1="-35.483223"
+ x1="408.75"
+ id="linearGradient20217"
+ xlink:href="#linearGradient35391"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient18821">
<stop
- style="stop-color:#fc6b58;stop-opacity:1;"
+ id="stop18823"
offset="0"
- id="stop18823" />
+ style="stop-color:#fc6b58;stop-opacity:1;" />
<stop
- style="stop-color:#fc6b58;stop-opacity:0;"
+ id="stop18825"
offset="1"
- id="stop18825" />
+ style="stop-color:#fc6b58;stop-opacity:0;" />
</linearGradient>
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient18821"
- id="radialGradient22187"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
- cx="75.554794"
- cy="500.26215"
- fx="75.554794"
+ r="3.1650217"
fy="500.26215"
- r="3.1650217" />
+ fx="75.554794"
+ cy="500.26215"
+ cx="75.554794"
+ gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient22187"
+ xlink:href="#linearGradient18821"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient29149">
<stop
- id="stop29151"
+ style="stop-color:#76adff;stop-opacity:1;"
offset="0"
- style="stop-color:#76adff;stop-opacity:1;" />
+ id="stop29151" />
<stop
- id="stop29153"
+ style="stop-color:#a5c9ff;stop-opacity:0;"
offset="1"
- style="stop-color:#a5c9ff;stop-opacity:0;" />
+ id="stop29153" />
</linearGradient>
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient29149"
- id="radialGradient21820"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
- cx="75.217888"
- cy="500.66806"
- fx="75.217888"
+ r="3.1650217"
fy="500.66806"
- r="3.1650217" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="radialGradient21818"
+ fx="75.217888"
+ cy="500.66806"
+ cx="75.217888"
+ gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.4624192,0,0,1.4467089,-36.975824,-224.99718)"
- cx="79.959885"
- cy="503.81497"
- fx="79.959885"
+ id="radialGradient21820"
+ xlink:href="#linearGradient29149"
+ inkscape:collect="always" />
+ <radialGradient
+ r="2.9089756"
fy="503.81497"
- r="2.9089756" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient21816"
+ fx="79.959885"
+ cy="503.81497"
+ cx="79.959885"
+ gradientTransform="matrix(1.4624192,0,0,1.4467089,-36.975824,-224.99718)"
gradientUnits="userSpaceOnUse"
- x1="89.526657"
- y1="511.42972"
- x2="78.000008"
- y2="501.04794" />
+ id="radialGradient21818"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient21814"
+ y2="501.04794"
+ x2="78.000008"
+ y1="511.42972"
+ x1="89.526657"
gradientUnits="userSpaceOnUse"
- x1="80.768944"
- y1="504.67188"
+ id="linearGradient21816"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="501.58331"
x2="76.885078"
- y2="501.58331" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient14262"
- id="radialGradient21741"
+ y1="504.67188"
+ x1="80.768944"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.3949409,0.3949425,-0.4243709,0.4254619,321.60762,256.85923)"
- cx="75.95578"
- cy="492.15359"
- fx="75.95578"
+ id="linearGradient21814"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.1650217"
fy="492.15359"
- r="3.1650217" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient15809"
- id="linearGradient21773"
+ fx="75.95578"
+ cy="492.15359"
+ cx="75.95578"
+ gradientTransform="matrix(0.3949409,0.3949425,-0.4243709,0.4254619,321.60762,256.85923)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9281768,0,0,0.9971589,401.42265,-484.56523)"
- x1="88.874489"
- y1="502.71924"
- x2="41.311054"
- y2="501.10059" />
+ id="radialGradient21741"
+ xlink:href="#linearGradient14262"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient21776"
+ y2="501.10059"
+ x2="41.311054"
+ y1="502.71924"
+ x1="88.874489"
+ gradientTransform="matrix(0.9281768,0,0,0.9971589,401.42265,-484.56523)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8666667,0,0,0.9166667,406.13333,-443.79167)"
- x1="108"
- y1="500"
+ id="linearGradient21773"
+ xlink:href="#linearGradient15809"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="500"
x2="54.8125"
- y2="500" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient14262"
- id="radialGradient22166"
+ y1="500"
+ x1="108"
+ gradientTransform="matrix(0.8666667,0,0,0.9166667,406.13333,-443.79167)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8886193,0.8021825,-0.8051059,0.8972684,411.80247,-8.668512)"
- cx="74.518959"
- cy="499.99969"
- fx="74.518959"
- fy="499.99969"
- r="3.1650217" />
+ id="linearGradient21776"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="radialGradient22164"
+ r="3.1650217"
+ fy="499.99969"
+ fx="74.518959"
+ cy="499.99969"
+ cx="74.518959"
+ gradientTransform="matrix(0.8886193,0.8021825,-0.8051059,0.8972684,411.80247,-8.668512)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.4624192,0,0,1.4467089,-36.975824,-224.99718)"
- cx="79.959885"
- cy="503.81497"
- fx="79.959885"
+ id="radialGradient22166"
+ xlink:href="#linearGradient14262"
+ inkscape:collect="always" />
+ <radialGradient
+ r="2.9089756"
fy="503.81497"
- r="2.9089756" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient22162"
+ fx="79.959885"
+ cy="503.81497"
+ cx="79.959885"
+ gradientTransform="matrix(1.4624192,0,0,1.4467089,-36.975824,-224.99718)"
gradientUnits="userSpaceOnUse"
- x1="89.526657"
- y1="511.42972"
- x2="78.000008"
- y2="501.04794" />
+ id="radialGradient22164"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient22160"
+ y2="501.04794"
+ x2="78.000008"
+ y1="511.42972"
+ x1="89.526657"
gradientUnits="userSpaceOnUse"
- x1="80.768944"
- y1="504.67188"
+ id="linearGradient22162"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="501.58331"
x2="76.885078"
- y2="501.58331" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient14262"
- id="radialGradient22158"
+ y1="504.67188"
+ x1="80.768944"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.3949409,0.3949425,-0.4243709,0.4254619,321.60762,256.85923)"
- cx="75.95578"
- cy="492.15359"
- fx="75.95578"
+ id="linearGradient22160"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.1650217"
fy="492.15359"
- r="3.1650217" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient15809"
- id="linearGradient22156"
+ fx="75.95578"
+ cy="492.15359"
+ cx="75.95578"
+ gradientTransform="matrix(0.3949409,0.3949425,-0.4243709,0.4254619,321.60762,256.85923)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,0.9971589,396,-484.56523)"
- x1="88.874489"
- y1="502.71924"
- x2="41.311054"
- y2="501.10059" />
+ id="radialGradient22158"
+ xlink:href="#linearGradient14262"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient22154"
+ y2="501.10059"
+ x2="41.311054"
+ y1="502.71924"
+ x1="88.874489"
+ gradientTransform="matrix(1,0,0,0.9971589,396,-484.56523)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8666667,0,0,0.9166667,406.13333,-443.79167)"
- x1="108"
- y1="500"
+ id="linearGradient22156"
+ xlink:href="#linearGradient15809"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="500"
x2="54.8125"
- y2="500" />
+ y1="500"
+ x1="108"
+ gradientTransform="matrix(0.8666667,0,0,0.9166667,406.13333,-443.79167)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient22154"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- id="linearGradient16500">
+ id="linearGradient16500"
+ inkscape:collect="always">
<stop
- style="stop-color:black;stop-opacity:1;"
+ id="stop16502"
offset="0"
- id="stop16502" />
+ style="stop-color:black;stop-opacity:1;" />
<stop
- style="stop-color:black;stop-opacity:0;"
+ id="stop16504"
offset="1"
- id="stop16504" />
+ style="stop-color:black;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- id="linearGradient15809">
+ id="linearGradient15809"
+ inkscape:collect="always">
<stop
- style="stop-color:#000000;stop-opacity:1;"
+ id="stop15811"
offset="0"
- id="stop15811" />
+ style="stop-color:#000000;stop-opacity:1;" />
<stop
- style="stop-color:#000000;stop-opacity:0;"
+ id="stop15813"
offset="1"
- id="stop15813" />
+ style="stop-color:#000000;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient15437">
<stop
- id="stop15439"
+ style="stop-color:#20529e;stop-opacity:1;"
offset="0"
- style="stop-color:#20529e;stop-opacity:1;" />
+ id="stop15439" />
<stop
- id="stop15441"
+ style="stop-color:#1d3f71;stop-opacity:0;"
offset="1"
- style="stop-color:#1d3f71;stop-opacity:0;" />
+ id="stop15441" />
</linearGradient>
<linearGradient
id="linearGradient15425">
<stop
- style="stop-color:#8c0000;stop-opacity:1;"
+ id="stop15427"
offset="0"
- id="stop15427" />
+ style="stop-color:#8c0000;stop-opacity:1;" />
<stop
- style="stop-color:#c80000;stop-opacity:0;"
+ id="stop15429"
offset="1"
- id="stop15429" />
+ style="stop-color:#c80000;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient14262">
<stop
- id="stop14264"
+ style="stop-color:#2661b6;stop-opacity:1;"
offset="0"
- style="stop-color:#2661b6;stop-opacity:1;" />
+ id="stop14264" />
<stop
- id="stop14266"
+ style="stop-color:#c1d7f8;stop-opacity:0;"
offset="1"
- style="stop-color:#c1d7f8;stop-opacity:0;" />
+ id="stop14266" />
</linearGradient>
<clipPath
- clipPathUnits="userSpaceOnUse"
- id="clipPath17188">
+ id="clipPath17188"
+ clipPathUnits="userSpaceOnUse">
<path
- style="fill:#d3d7cf;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- d="m 240.5,-19.90625 c -1.87005,0 -3.40625,1.536202 -3.40625,3.40625 l 0,2 c 0,1.87005 1.53621,3.40625 3.40625,3.40625 l 0,-2.8125 c -0.33932,0 -0.59375,-0.254431 -0.59375,-0.59375 l 0,-2 c 0,-0.339319 0.25443,-0.59375 0.59375,-0.59375 l 0,-2.8125 z"
+ inkscape:connector-curvature="0"
id="path17190"
- inkscape:connector-curvature="0" />
+ d="m 240.5,-19.90625 c -1.87005,0 -3.40625,1.536202 -3.40625,3.40625 l 0,2 c 0,1.87005 1.53621,3.40625 3.40625,3.40625 l 0,-2.8125 c -0.33932,0 -0.59375,-0.254431 -0.59375,-0.59375 l 0,-2 c 0,-0.339319 0.25443,-0.59375 0.59375,-0.59375 l 0,-2.8125 z"
+ style="fill:#d3d7cf;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
</clipPath>
<linearGradient
id="linearGradient18344">
<stop
- style="stop-color:#6c6c6c;stop-opacity:1;"
+ id="stop18346"
offset="0"
- id="stop18346" />
+ style="stop-color:#6c6c6c;stop-opacity:1;" />
<stop
- style="stop-color:#f0f0f0;stop-opacity:1;"
+ id="stop18348"
offset="1"
- id="stop18348" />
+ style="stop-color:#f0f0f0;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient5060">
<stop
- id="stop5062"
+ style="stop-color:black;stop-opacity:1;"
offset="0"
- style="stop-color:black;stop-opacity:1;" />
+ id="stop5062" />
<stop
- id="stop5064"
+ style="stop-color:#000000;stop-opacity:0;"
offset="1"
- style="stop-color:#000000;stop-opacity:0;" />
+ id="stop5064" />
</linearGradient>
<linearGradient
id="linearGradient27957">
<stop
- id="stop27959"
+ style="stop-color:#ffffff;stop-opacity:0;"
offset="0"
- style="stop-color:#ffffff;stop-opacity:0;" />
+ id="stop27959" />
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop27963"
offset="0.59290552"
- id="stop27963" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- id="stop27961"
+ style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
- style="stop-color:#ffffff;stop-opacity:0;" />
+ id="stop27961" />
</linearGradient>
<linearGradient
id="linearGradient23647">
<stop
- style="stop-color:white;stop-opacity:1;"
+ id="stop23649"
offset="0"
- id="stop23649" />
+ style="stop-color:white;stop-opacity:1;" />
<stop
- style="stop-color:black;stop-opacity:1;"
+ id="stop23651"
offset="1"
- id="stop23651" />
+ style="stop-color:black;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient23390">
<stop
- style="stop-color:#000000;stop-opacity:1.0000000"
+ id="stop23392"
offset="0.0000000"
- id="stop23392" />
+ style="stop-color:#000000;stop-opacity:1.0000000" />
<stop
- style="stop-color:#ffffff;stop-opacity:1.0000000"
+ id="stop23400"
offset="1.0000000"
- id="stop23400" />
+ style="stop-color:#ffffff;stop-opacity:1.0000000" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- id="linearGradient16359">
+ id="linearGradient16359"
+ inkscape:collect="always">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop16361"
offset="0"
- id="stop16361" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop16363"
offset="1"
- id="stop16363" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient15746"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1.207032,0,0,0.903901,679.26,-38.98429)"
- x1="386.09836"
- y1="230.09529"
+ y2="248.10277"
x2="388.35962"
- y2="248.10277" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient15744"
+ y1="230.09529"
+ x1="386.09836"
+ gradientTransform="matrix(-1.207032,0,0,0.903901,679.26,-38.98429)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1.207032,0,0,0.903901,679.30638,-38.92179)"
- x1="390.61163"
- y1="229.34804"
- x2="390.55936"
- y2="248.24983" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient15746"
xlink:href="#linearGradient37542"
- id="linearGradient15683"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1.203777,0,0,0.903901,837.9645,-18.01568)"
- x1="383.67041"
- y1="225.94354"
- x2="385.60632"
- y2="248.55901" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="248.24983"
+ x2="390.55936"
+ y1="229.34804"
+ x1="390.61163"
+ gradientTransform="matrix(-1.207032,0,0,0.903901,679.30638,-38.92179)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient15744"
xlink:href="#linearGradient37542"
- id="linearGradient15681"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="248.55901"
+ x2="385.60632"
+ y1="225.94354"
+ x1="383.67041"
+ gradientTransform="matrix(-1.203777,0,0,0.903901,837.9645,-18.01568)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1.207032,0,0,0.903901,839.2424,-18.01568)"
- x1="391.80222"
- y1="230.5647"
- x2="387.94211"
- y2="247.83209" />
+ id="linearGradient15683"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030"
- id="linearGradient13545"
+ y2="247.83209"
+ x2="387.94211"
+ y1="230.5647"
+ x1="391.80222"
+ gradientTransform="matrix(-1.207032,0,0,0.903901,839.2424,-18.01568)"
gradientUnits="userSpaceOnUse"
- x1="126.37006"
- y1="112.31642"
- x2="137.11284"
- y2="126.19643" />
+ id="linearGradient15681"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030"
- id="linearGradient15878"
+ y2="126.19643"
+ x2="137.11284"
+ y1="112.31642"
+ x1="126.37006"
gradientUnits="userSpaceOnUse"
- x1="190.68166"
- y1="244.14676"
+ id="linearGradient13545"
+ xlink:href="#linearGradient9030"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="226.33672"
x2="174.75458"
- y2="226.33672" />
+ y1="244.14676"
+ x1="190.68166"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient15878"
+ xlink:href="#linearGradient9030"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient20756">
<stop
- style="stop-color:#932200;stop-opacity:1;"
+ id="stop20758"
offset="0"
- id="stop20758" />
+ style="stop-color:#932200;stop-opacity:1;" />
<stop
- style="stop-color:#f8420a;stop-opacity:1;"
+ id="stop20760"
offset="1"
- id="stop20760" />
+ style="stop-color:#f8420a;stop-opacity:1;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20756"
- id="linearGradient13543"
- gradientUnits="userSpaceOnUse"
- x1="126.45676"
- y1="110.59049"
+ y2="122.08995"
x2="134.94949"
- y2="122.08995" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient15693"
+ y1="110.59049"
+ x1="126.45676"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,1.253963,1,0,169,-94.7765)"
- x1="228.5468"
- y1="118.5"
- x2="235"
- y2="118.5" />
+ id="linearGradient13543"
+ xlink:href="#linearGradient20756"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient15691"
+ y2="118.5"
+ x2="235"
+ y1="118.5"
+ x1="228.5468"
+ gradientTransform="matrix(0,1.253963,1,0,169,-94.7765)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.222225,0,0,1,-87.33412,169)"
- x1="215.07817"
- y1="109.00085"
- x2="235.90916"
- y2="121.88217" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient15693"
xlink:href="#linearGradient319"
- id="linearGradient15689"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,1.253963,1,0,169,-94.7765)"
- x1="228.5468"
- y1="118.5"
- x2="235"
- y2="118.5" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient15687"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.222225,0,0,1,-87.33412,169)"
- x1="217.22589"
- y1="107.25085"
+ y2="121.88217"
x2="235.90916"
- y2="121" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient15854"
+ y1="109.00085"
+ x1="215.07817"
+ gradientTransform="matrix(1.222225,0,0,1,-87.33412,169)"
gradientUnits="userSpaceOnUse"
- x1="381.56296"
- y1="234.59885"
- x2="393"
- y2="247.99632" />
+ id="linearGradient15691"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient31456"
- id="linearGradient13639"
+ y2="118.5"
+ x2="235"
+ y1="118.5"
+ x1="228.5468"
+ gradientTransform="matrix(0,1.253963,1,0,169,-94.7765)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8329616,0,0,0.8433415,58.576199,29.193917)"
- x1="399.987"
- y1="259.26602"
- x2="385.88068"
- y2="241.70195" />
+ id="linearGradient15689"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23178"
- id="linearGradient52023"
+ y2="121"
+ x2="235.90916"
+ y1="107.25085"
+ x1="217.22589"
+ gradientTransform="matrix(1.222225,0,0,1,-87.33412,169)"
gradientUnits="userSpaceOnUse"
- x1="390.75"
- y1="244.5312"
- x2="395.9375"
- y2="250.9062" />
+ id="linearGradient15687"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient31456"
- id="linearGradient14661"
+ y2="247.99632"
+ x2="393"
+ y1="234.59885"
+ x1="381.56296"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8329616,0,0,0.8433415,58.576199,29.193917)"
- x1="400.88739"
- y1="257.4874"
- x2="385.88068"
- y2="241.70195" />
+ id="linearGradient15854"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23178"
- id="linearGradient52025"
+ y2="241.70195"
+ x2="385.88068"
+ y1="259.26602"
+ x1="399.987"
+ gradientTransform="matrix(0.8329616,0,0,0.8433415,58.576199,29.193917)"
gradientUnits="userSpaceOnUse"
- x1="391.01859"
- y1="241.86644"
- x2="396.79285"
- y2="247.83134" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient13639"
xlink:href="#linearGradient31456"
- id="linearGradient15995"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="250.9062"
+ x2="395.9375"
+ y1="244.5312"
+ x1="390.75"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8329616,0,0,0.8433415,58.576199,29.193917)"
- x1="399.08661"
- y1="257.41327"
+ id="linearGradient52023"
+ xlink:href="#linearGradient23178"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="241.70195"
x2="385.88068"
- y2="241.70195" />
+ y1="257.4874"
+ x1="400.88739"
+ gradientTransform="matrix(0.8329616,0,0,0.8433415,58.576199,29.193917)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient14661"
+ xlink:href="#linearGradient31456"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient15993"
+ y2="247.83134"
+ x2="396.79285"
+ y1="241.86644"
+ x1="391.01859"
gradientUnits="userSpaceOnUse"
- x1="381.5"
- y1="231.7812"
- x2="393.4375"
- y2="247.1562" />
+ id="linearGradient52025"
+ xlink:href="#linearGradient23178"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient15997"
+ y2="241.70195"
+ x2="385.88068"
+ y1="257.41327"
+ x1="399.08661"
+ gradientTransform="matrix(0.8329616,0,0,0.8433415,58.576199,29.193917)"
gradientUnits="userSpaceOnUse"
- x1="381.5"
+ id="linearGradient15995"
+ xlink:href="#linearGradient31456"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="247.1562"
+ x2="393.4375"
y1="231.7812"
+ x1="381.5"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient15993"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="247.1562"
x2="393.4375"
- y2="247.1562" />
+ y1="231.7812"
+ x1="381.5"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient15997"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient47130">
<stop
- style="stop-color:#ed7b00;stop-opacity:1;"
+ id="stop47132"
offset="0"
- id="stop47132" />
+ style="stop-color:#ed7b00;stop-opacity:1;" />
<stop
- style="stop-color:white;stop-opacity:1;"
+ id="stop47134"
offset="1"
- id="stop47134" />
+ style="stop-color:white;stop-opacity:1;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23178"
- id="linearGradient52027"
- gradientUnits="userSpaceOnUse"
- x1="329.28757"
- y1="244.97151"
+ y2="254.18553"
x2="339.84518"
- y2="254.18553" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient15436"
+ y1="244.97151"
+ x1="329.28757"
gradientUnits="userSpaceOnUse"
- x1="319.75095"
- y1="234.63918"
+ id="linearGradient52027"
+ xlink:href="#linearGradient23178"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="248.68198"
x2="333.94208"
- y2="248.68198" />
+ y1="234.63918"
+ x1="319.75095"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient15436"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient32842">
<stop
- style="stop-color:#183e75;stop-opacity:1;"
+ id="stop32844"
offset="0"
- id="stop32844" />
+ style="stop-color:#183e75;stop-opacity:1;" />
<stop
- style="stop-color:#1d3f71;stop-opacity:0;"
+ id="stop32846"
offset="1"
- id="stop32846" />
+ style="stop-color:#1d3f71;stop-opacity:0;" />
</linearGradient>
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="radialGradient13900"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(2.2541045,-1.3755453,0.900369,1.4754358,-3699.4512,2858.7)"
- cx="2357.1072"
- cy="826.77924"
- fx="2357.1072"
+ r="6.1896501"
fy="826.77924"
- r="6.1896501" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient40983"
- id="linearGradient38692"
+ fx="2357.1072"
+ cy="826.77924"
+ cx="2357.1072"
+ gradientTransform="matrix(2.2541045,-1.3755453,0.900369,1.4754358,-3699.4512,2858.7)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(2226.9963,823)"
- x1="130.70599"
- y1="18.44199"
- x2="130.70599"
- y2="21.94199" />
- <linearGradient
- inkscape:collect="always"
+ id="radialGradient13900"
xlink:href="#linearGradient319"
- id="linearGradient15717"
- gradientUnits="userSpaceOnUse"
- x1="328.38852"
- y1="33.505165"
- x2="331.44778"
- y2="36.739578" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient15715"
+ y2="21.94199"
+ x2="130.70599"
+ y1="18.44199"
+ x1="130.70599"
+ gradientTransform="translate(2226.9963,823)"
gradientUnits="userSpaceOnUse"
- x1="320.2735"
- y1="25.109356"
- x2="332.41409"
- y2="37.468754" />
+ id="linearGradient38692"
+ xlink:href="#linearGradient40983"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient15713"
- gradientUnits="userSpaceOnUse"
- x1="329.18762"
- y1="34.005215"
+ y2="36.739578"
x2="331.44778"
- y2="36.739578" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient15711"
+ y1="33.505165"
+ x1="328.38852"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(2.011921e-5,12.000013)"
- x1="326.483"
- y1="31.446384"
- x2="337.3125"
- y2="41.875" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient15717"
xlink:href="#linearGradient319"
- id="linearGradient15709"
- gradientUnits="userSpaceOnUse"
- x1="332.49747"
- y1="38.166924"
- x2="326.41843"
- y2="31.22842" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="37.468754"
+ x2="332.41409"
+ y1="25.109356"
+ x1="320.2735"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient15715"
xlink:href="#linearGradient37542"
- id="linearGradient15707"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="36.739578"
+ x2="331.44778"
+ y1="34.005215"
+ x1="329.18762"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(2.011921e-5,12.000013)"
- x1="323.37836"
- y1="30.3883"
- x2="343.5636"
- y2="53.758793" />
+ id="linearGradient15713"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="41.875"
+ x2="337.3125"
+ y1="31.446384"
+ x1="326.483"
+ gradientTransform="translate(2.011921e-5,12.000013)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient15711"
xlink:href="#linearGradient319"
- id="linearGradient15646"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="31.22842"
+ x2="326.41843"
+ y1="38.166924"
+ x1="332.49747"
gradientUnits="userSpaceOnUse"
- x1="279.00009"
- y1="-16.62501"
- x2="291.93054"
- y2="-6.3206272" />
+ id="linearGradient15709"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="53.758793"
+ x2="343.5636"
+ y1="30.3883"
+ x1="323.37836"
+ gradientTransform="translate(2.011921e-5,12.000013)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient15707"
xlink:href="#linearGradient37542"
- id="linearGradient15644"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="-6.3206272"
+ x2="291.93054"
+ y1="-16.62501"
+ x1="279.00009"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.000006,0,0,1,258.9997,-253)"
- x1="25.437477"
- y1="238.54002"
+ id="linearGradient15646"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="263.79816"
x2="51.01355"
- y2="263.79816" />
+ y1="238.54002"
+ x1="25.437477"
+ gradientTransform="matrix(1.000006,0,0,1,258.9997,-253)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient15644"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient20973">
<stop
- id="stop20975"
+ style="stop-color:#15ff00;stop-opacity:1;"
offset="0"
- style="stop-color:#15ff00;stop-opacity:1;" />
+ id="stop20975" />
<stop
- id="stop20977"
+ style="stop-color:#15ff00;stop-opacity:0;"
offset="1"
- style="stop-color:#15ff00;stop-opacity:0;" />
+ id="stop20977" />
</linearGradient>
<linearGradient
id="linearGradient20962">
<stop
- style="stop-color:#00a8ff;stop-opacity:1;"
+ id="stop20965"
offset="0"
- id="stop20965" />
+ style="stop-color:#00a8ff;stop-opacity:1;" />
<stop
- style="stop-color:#00a8ff;stop-opacity:0;"
+ id="stop20967"
offset="1"
- id="stop20967" />
+ style="stop-color:#00a8ff;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient20036">
<stop
- style="stop-color:#ffb55e;stop-opacity:1;"
+ id="stop20038"
offset="0"
- id="stop20038" />
+ style="stop-color:#ffb55e;stop-opacity:1;" />
<stop
- style="stop-color:#ff8400;stop-opacity:0;"
+ id="stop20040"
offset="1"
- id="stop20040" />
+ style="stop-color:#ff8400;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient15574"
- gradientUnits="userSpaceOnUse"
- x1="197.63152"
- y1="169.14206"
+ y2="160.02296"
x2="190.41687"
- y2="160.02296" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient15358"
+ y1="169.14206"
+ x1="197.63152"
gradientUnits="userSpaceOnUse"
- x1="47.655102"
- y1="93.805557"
- x2="59.057678"
- y2="105.27895"
- gradientTransform="matrix(1.1000194,0,0,1.0998287,-4.6508478,-9.2334126)" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient15574"
xlink:href="#linearGradient37542"
- id="linearGradient15356"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9995967,0,0,1.0002103,-78.949724,-0.02739749)"
- x1="109.04134"
- y1="75.666725"
- x2="135.45256"
- y2="103.11092" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient15362"
+ gradientTransform="matrix(1.1000194,0,0,1.0998287,-4.6508478,-9.2334126)"
+ y2="105.27895"
+ x2="59.057678"
+ y1="93.805557"
+ x1="47.655102"
gradientUnits="userSpaceOnUse"
- x1="130.39502"
- y1="116.31751"
- x2="140.66667"
- y2="125.94853" />
+ id="linearGradient15358"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="linearGradient15360"
+ y2="103.11092"
+ x2="135.45256"
+ y1="75.666725"
+ x1="109.04134"
+ gradientTransform="matrix(0.9995967,0,0,1.0002103,-78.949724,-0.02739749)"
gradientUnits="userSpaceOnUse"
- x1="124.40742"
- y1="111.98244"
- x2="135.36497"
- y2="120.87388" />
+ id="linearGradient15356"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="linearGradient21531"
+ y2="125.94853"
+ x2="140.66667"
+ y1="116.31751"
+ x1="130.39502"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.2859754,0,0,1,39.669142,20)"
- x1="348.06064"
- y1="220.55545"
- x2="363.71661"
- y2="239.94608" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient15362"
xlink:href="#linearGradient319"
- id="linearGradient14517"
- gradientUnits="userSpaceOnUse"
- x1="5.9836898"
- y1="71.51989"
- x2="18.01141"
- y2="84.75" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient14511"
+ y2="120.87388"
+ x2="135.36497"
+ y1="111.98244"
+ x1="124.40742"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.923955,0,0,1,-18.1369,-168)"
- x1="3.3959732"
- y1="216.62332"
- x2="35.029804"
- y2="248.37102" />
+ id="linearGradient15360"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient16069"
+ y2="239.94608"
+ x2="363.71661"
+ y1="220.55545"
+ x1="348.06064"
+ gradientTransform="matrix(1.2859754,0,0,1,39.669142,20)"
gradientUnits="userSpaceOnUse"
- x1="5.9836898"
- y1="71.51989"
- x2="17.011419"
- y2="82.75" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient21531"
xlink:href="#linearGradient10069"
- id="linearGradient16067"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.2859754,0,0,1,-440.36032,-147)"
- x1="348.06064"
- y1="220.55545"
- x2="363.71661"
- y2="239.94608" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient16063"
+ y2="84.75"
+ x2="18.01141"
+ y1="71.51989"
+ x1="5.9836898"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.923955,0,0,1,-18.1369,-168)"
- x1="6.9917974"
- y1="219.61856"
- x2="35.029804"
- y2="248.37102" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient14517"
xlink:href="#linearGradient319"
- id="linearGradient16154"
- gradientUnits="userSpaceOnUse"
- x1="5.9836898"
- y1="71.51989"
- x2="18.51141"
- y2="85.5" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="248.37102"
+ x2="35.029804"
+ y1="216.62332"
+ x1="3.3959732"
+ gradientTransform="matrix(0.923955,0,0,1,-18.1369,-168)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient14511"
xlink:href="#linearGradient37542"
- id="linearGradient16150"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="82.75"
+ x2="17.011419"
+ y1="71.51989"
+ x1="5.9836898"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.923955,0,0,1,-18.1369,-168)"
- x1="3.8504581"
- y1="217.4549"
- x2="33.15686"
- y2="247.71701" />
+ id="linearGradient16069"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient15734"
+ y2="239.94608"
+ x2="363.71661"
+ y1="220.55545"
+ x1="348.06064"
+ gradientTransform="matrix(1.2859754,0,0,1,-440.36032,-147)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8520698,0,0,0.7746114,324.58589,47.486124)"
- x1="9.5404434"
- y1="223.47467"
+ id="linearGradient16067"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="248.37102"
x2="35.029804"
- y2="248.37102" />
+ y1="219.61856"
+ x1="6.9917974"
+ gradientTransform="matrix(0.923955,0,0,1,-18.1369,-168)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient16063"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="85.5"
+ x2="18.51141"
+ y1="71.51989"
+ x1="5.9836898"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient16154"
xlink:href="#linearGradient319"
- id="linearGradient16174"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="247.71701"
+ x2="33.15686"
+ y1="217.4549"
+ x1="3.8504581"
+ gradientTransform="matrix(0.923955,0,0,1,-18.1369,-168)"
gradientUnits="userSpaceOnUse"
- x1="5.9836898"
- y1="71.51989"
- x2="18.51141"
- y2="85.5" />
+ id="linearGradient16150"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="248.37102"
+ x2="35.029804"
+ y1="223.47467"
+ x1="9.5404434"
+ gradientTransform="matrix(0.8520698,0,0,0.7746114,324.58589,47.486124)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient15734"
xlink:href="#linearGradient37542"
- id="linearGradient16170"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="85.5"
+ x2="18.51141"
+ y1="71.51989"
+ x1="5.9836898"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.923955,0,0,1,-18.1369,-168)"
- x1="2.911078"
- y1="217.3624"
- x2="33.15686"
- y2="247.71701" />
+ id="linearGradient16174"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient15736"
+ y2="247.71701"
+ x2="33.15686"
+ y1="217.3624"
+ x1="2.911078"
+ gradientTransform="matrix(0.923955,0,0,1,-18.1369,-168)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8520698,0,0,0.7746114,324.58589,47.486124)"
- x1="9.5404434"
- y1="223.47467"
+ id="linearGradient16170"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="248.37102"
x2="35.029804"
- y2="248.37102" />
+ y1="223.47467"
+ x1="9.5404434"
+ gradientTransform="matrix(0.8520698,0,0,0.7746114,324.58589,47.486124)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient15736"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient13998">
<stop
- id="stop14000"
+ style="stop-color:#f57d07;stop-opacity:1;"
offset="0"
- style="stop-color:#f57d07;stop-opacity:1;" />
+ id="stop14000" />
<stop
- id="stop14002"
+ style="stop-color:white;stop-opacity:1;"
offset="1"
- style="stop-color:white;stop-opacity:1;" />
+ id="stop14002" />
</linearGradient>
<linearGradient
id="linearGradient4343">
<stop
- id="stop4345"
+ style="stop-color:white;stop-opacity:1;"
offset="0"
- style="stop-color:white;stop-opacity:1;" />
+ id="stop4345" />
<stop
- id="stop4347"
+ style="stop-color:#fff9f9;stop-opacity:0;"
offset="1"
- style="stop-color:#fff9f9;stop-opacity:0;" />
+ id="stop4347" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient15057"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.3333334,0,0,0.8333334,747.50001,337.33345)"
- x1="-285.65732"
- y1="-274.23453"
+ y2="-268.04858"
x2="-279.44821"
- y2="-268.04858" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient15053"
+ y1="-274.23453"
+ x1="-285.65732"
+ gradientTransform="matrix(1.3333334,0,0,0.8333334,747.50001,337.33345)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,1.166667,-441,-81.66662)"
- x1="43.647511"
- y1="164.125"
- x2="75.731438"
- y2="164.5" />
+ id="linearGradient15057"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient15705"
+ y2="164.5"
+ x2="75.731438"
+ y1="164.125"
+ x1="43.647511"
+ gradientTransform="matrix(1,0,0,1.166667,-441,-81.66662)"
gradientUnits="userSpaceOnUse"
- x1="148.71947"
- y1="166.53206"
- x2="147"
- y2="165" />
+ id="linearGradient15053"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient15703"
+ y2="165"
+ x2="147"
+ y1="166.53206"
+ x1="148.71947"
gradientUnits="userSpaceOnUse"
- x1="146.80022"
- y1="158.34668"
- x2="150.08357"
- y2="162.03282" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient15705"
xlink:href="#linearGradient37542"
- id="linearGradient15701"
- gradientUnits="userSpaceOnUse"
- x1="148.71947"
- y1="166.53206"
- x2="147"
- y2="165" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient15699"
+ y2="162.03282"
+ x2="150.08357"
+ y1="158.34668"
+ x1="146.80022"
gradientUnits="userSpaceOnUse"
- x1="122.84515"
- y1="126.83902"
- x2="149.88129"
- y2="164.94562" />
+ id="linearGradient15703"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient15742"
+ y2="165"
+ x2="147"
+ y1="166.53206"
+ x1="148.71947"
gradientUnits="userSpaceOnUse"
- x1="392.0101"
- y1="224.99998"
- x2="392.0101"
- y2="249.99998" />
+ id="linearGradient15701"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient15721"
+ y2="164.94562"
+ x2="149.88129"
+ y1="126.83902"
+ x1="122.84515"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(19.97577,-6.0080883)"
- x1="227.57907"
- y1="118.47696"
- x2="235"
- y2="118.5" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient15699"
xlink:href="#linearGradient37542"
- id="linearGradient15719"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(19.97577,-6.0080883)"
- x1="222.4996"
- y1="110.37873"
- x2="233.08319"
- y2="121" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient15723"
+ y2="249.99998"
+ x2="392.0101"
+ y1="224.99998"
+ x1="392.0101"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,-6.0080883)"
- x1="230.95012"
- y1="100.89436"
- x2="230.74091"
- y2="124.09359" />
+ id="linearGradient15742"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient15778"
+ y2="118.5"
+ x2="235"
+ y1="118.47696"
+ x1="227.57907"
+ gradientTransform="translate(19.97577,-6.0080883)"
gradientUnits="userSpaceOnUse"
- x1="126.37006"
- y1="112.31642"
- x2="135.54141"
- y2="122.0597" />
+ id="linearGradient15721"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030"
- id="linearGradient15780"
+ y2="121"
+ x2="233.08319"
+ y1="110.37873"
+ x1="222.4996"
+ gradientTransform="translate(19.97577,-6.0080883)"
gradientUnits="userSpaceOnUse"
- x1="190.68166"
- y1="244.14676"
- x2="174.75458"
- y2="226.33672" />
+ id="linearGradient15719"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient15776"
+ y2="124.09359"
+ x2="230.74091"
+ y1="100.89436"
+ x1="230.95012"
+ gradientTransform="translate(0,-6.0080883)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,10.767079)"
- x1="132.35471"
- y1="246.32236"
- x2="129.81586"
- y2="243.70523" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient15723"
xlink:href="#linearGradient37542"
- id="linearGradient15774"
- gradientUnits="userSpaceOnUse"
- x1="103.53399"
- y1="88.301094"
- x2="136.3542"
- y2="123.17216" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient15450"
- gradientUnits="userSpaceOnUse"
- x1="126.37006"
+ y2="122.0597"
+ x2="135.54141"
y1="112.31642"
- x2="144.22272"
- y2="129.82761" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030"
- id="linearGradient15452"
+ x1="126.37006"
gradientUnits="userSpaceOnUse"
- x1="190.68166"
- y1="244.14676"
- x2="174.75458"
- y2="226.33672" />
+ id="linearGradient15778"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030"
- id="linearGradient15448"
+ y2="226.33672"
+ x2="174.75458"
+ y1="244.14676"
+ x1="190.68166"
gradientUnits="userSpaceOnUse"
- x1="132.12782"
+ id="linearGradient15780"
+ xlink:href="#linearGradient9030"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="243.70523"
+ x2="129.81586"
y1="246.32236"
- x2="129.24866"
- y2="243.31177" />
+ x1="132.35471"
+ gradientTransform="translate(0,10.767079)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient15776"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="123.17216"
+ x2="136.3542"
+ y1="88.301094"
+ x1="103.53399"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient15774"
xlink:href="#linearGradient37542"
- id="linearGradient15446"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="129.82761"
+ x2="144.22272"
+ y1="112.31642"
+ x1="126.37006"
gradientUnits="userSpaceOnUse"
- x1="87.969383"
- y1="69.87941"
- x2="135.40274"
- y2="121.19196" />
+ id="linearGradient15450"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient15582"
+ y2="226.33672"
+ x2="174.75458"
+ y1="244.14676"
+ x1="190.68166"
gradientUnits="userSpaceOnUse"
- x1="9.062501"
- y1="117.46875"
- x2="24.625006"
- y2="131.65625" />
+ id="linearGradient15452"
+ xlink:href="#linearGradient9030"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient15584"
+ y2="243.31177"
+ x2="129.24866"
+ y1="246.32236"
+ x1="132.12782"
gradientUnits="userSpaceOnUse"
- x1="28.607456"
- y1="116.80592"
- x2="43.766914"
- y2="131.5226" />
+ id="linearGradient15448"
+ xlink:href="#linearGradient9030"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient15124"
+ y2="121.19196"
+ x2="135.40274"
+ y1="69.87941"
+ x1="87.969383"
gradientUnits="userSpaceOnUse"
- x1="328.38852"
- y1="33.505165"
- x2="331.44778"
- y2="36.739578" />
+ id="linearGradient15446"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient30208"
- id="linearGradient15122"
+ y2="131.65625"
+ x2="24.625006"
+ y1="117.46875"
+ x1="9.062501"
gradientUnits="userSpaceOnUse"
- x1="328.95557"
- y1="33.94022"
- x2="331.74063"
- y2="37.044456" />
+ id="linearGradient15582"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="131.5226"
+ x2="43.766914"
+ y1="116.80592"
+ x1="28.607456"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient15584"
xlink:href="#linearGradient37542"
- id="linearGradient16025"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="36.739578"
+ x2="331.44778"
+ y1="33.505165"
+ x1="328.38852"
gradientUnits="userSpaceOnUse"
- x1="192.11751"
- y1="122.12527"
- x2="184.43379"
- y2="112.34031" />
+ id="linearGradient15124"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient15580"
+ y2="37.044456"
+ x2="331.74063"
+ y1="33.94022"
+ x1="328.95557"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-0.395521,0,0,-0.3955,275.223,171.0515)"
- x1="213.51967"
- y1="121.417"
- x2="204.05295"
- y2="111.7235" />
+ id="linearGradient15122"
+ xlink:href="#linearGradient30208"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient15578"
+ y2="112.34031"
+ x2="184.43379"
+ y1="122.12527"
+ x1="192.11751"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.607961,0,0,0.607967,64.49194,51.63899)"
- x1="213.53587"
- y1="122.66508"
- x2="203.33264"
- y2="112.67535" />
+ id="linearGradient16025"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="111.7235"
+ x2="204.05295"
+ y1="121.417"
+ x1="213.51967"
+ gradientTransform="matrix(-0.395521,0,0,-0.3955,275.223,171.0515)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient15580"
xlink:href="#linearGradient37542"
- id="linearGradient15748"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="112.67535"
+ x2="203.33264"
+ y1="122.66508"
+ x1="213.53587"
+ gradientTransform="matrix(0.607961,0,0,0.607967,64.49194,51.63899)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.707107,-0.707107,0.707107,0.707107,-241.7085,428.4841)"
- x1="349.04059"
- y1="143.70836"
+ id="linearGradient15578"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="117.00745"
x2="336.72485"
- y2="117.00745" />
+ y1="143.70836"
+ x1="349.04059"
+ gradientTransform="matrix(0.707107,-0.707107,0.707107,0.707107,-241.7085,428.4841)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient15748"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient10585">
<stop
- id="stop10587"
+ style="stop-color:#d7d7d7;stop-opacity:1.0000000;"
offset="0.0000000"
- style="stop-color:#d7d7d7;stop-opacity:1.0000000;" />
+ id="stop10587" />
<stop
- id="stop10595"
+ style="stop-color:#000000;stop-opacity:1.0000000;"
offset="1.0000000"
- style="stop-color:#000000;stop-opacity:1.0000000;" />
+ id="stop10595" />
</linearGradient>
<linearGradient
id="linearGradient4138">
<stop
- style="stop-color:#6c432f;stop-opacity:1;"
+ id="stop4140"
offset="0"
- id="stop4140" />
+ style="stop-color:#6c432f;stop-opacity:1;" />
<stop
- style="stop-color:#c0966d;stop-opacity:1;"
+ id="stop4142"
offset="1"
- id="stop4142" />
+ style="stop-color:#c0966d;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient31320">
<stop
- style="stop-color:white;stop-opacity:1;"
+ id="stop31322"
offset="0"
- id="stop31322" />
+ style="stop-color:white;stop-opacity:1;" />
<stop
- style="stop-color:white;stop-opacity:0;"
+ id="stop31324"
offset="1"
- id="stop31324" />
+ style="stop-color:white;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient12678">
<stop
- id="stop12680"
+ style="stop-color:#d40000;stop-opacity:1"
offset="0"
- style="stop-color:#d40000;stop-opacity:1" />
+ id="stop12680" />
<stop
- id="stop12682"
+ style="stop-color:#000000;stop-opacity:0;"
offset="1"
- style="stop-color:#000000;stop-opacity:0;" />
+ id="stop12682" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient13991"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(1.691866,0.00341)"
- x1="86.452194"
- y1="101.22832"
+ y2="81.14637"
x2="110.48556"
- y2="81.14637" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient13520"
+ y1="101.22832"
+ x1="86.452194"
+ gradientTransform="translate(1.691866,0.00341)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(1.401389,-3.2412)"
- x1="130.59862"
- y1="121.2412"
- x2="142.29109"
- y2="133.53448" />
+ id="linearGradient13991"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="133.53448"
+ x2="142.29109"
+ y1="121.2412"
+ x1="130.59862"
+ gradientTransform="translate(1.401389,-3.2412)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient13520"
xlink:href="#linearGradient319"
- id="linearGradient23215"
- x1="147.07098"
- y1="134.18185"
- x2="129.67148"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientUnits="userSpaceOnUse"
y2="115.54105"
- gradientUnits="userSpaceOnUse" />
+ x2="129.67148"
+ y1="134.18185"
+ x1="147.07098"
+ id="linearGradient23215"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient23178">
<stop
- style="stop-color:#ff992b;stop-opacity:1;"
+ id="stop23180"
offset="0"
- id="stop23180" />
+ style="stop-color:#ff992b;stop-opacity:1;" />
<stop
- style="stop-color:white;stop-opacity:1;"
+ id="stop23182"
offset="1"
- id="stop23182" />
+ style="stop-color:white;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient13973">
<stop
- style="stop-color:#3c4c18;stop-opacity:1;"
+ id="stop13975"
offset="0"
- id="stop13975" />
+ style="stop-color:#3c4c18;stop-opacity:1;" />
<stop
- style="stop-color:#9aff31;stop-opacity:0;"
+ id="stop13977"
offset="1"
- id="stop13977" />
+ style="stop-color:#9aff31;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient13938">
<stop
- id="stop13940"
+ style="stop-color:#6e0c00;stop-opacity:1;"
offset="0"
- style="stop-color:#6e0c00;stop-opacity:1;" />
+ id="stop13940" />
<stop
- id="stop13942"
+ style="stop-color:#ee3800;stop-opacity:0;"
offset="1"
- style="stop-color:#ee3800;stop-opacity:0;" />
+ id="stop13942" />
</linearGradient>
<linearGradient
id="linearGradient14232">
<stop
- style="stop-color:#fff32a;stop-opacity:1;"
+ id="stop14234"
offset="0"
- id="stop14234" />
+ style="stop-color:#fff32a;stop-opacity:1;" />
<stop
- style="stop-color:#fff551;stop-opacity:0;"
+ id="stop14236"
offset="1"
- id="stop14236" />
+ style="stop-color:#fff551;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient14418">
<stop
- id="stop14420"
+ style="stop-color:#fa2509;stop-opacity:1;"
offset="0"
- style="stop-color:#fa2509;stop-opacity:1;" />
+ id="stop14420" />
<stop
- id="stop14422"
+ style="stop-color:#fa2509;stop-opacity:0;"
offset="1"
- style="stop-color:#fa2509;stop-opacity:0;" />
+ id="stop14422" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030"
- id="linearGradient14935"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-26,2.9206276e-6)"
- x1="474"
- y1="73.999992"
+ y2="77.499992"
x2="477.25"
- y2="77.499992" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030"
- id="linearGradient14841"
+ y1="73.999992"
+ x1="474"
+ gradientTransform="translate(-26,2.9206276e-6)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-6,1.4603138e-6)"
- x1="474.84375"
- y1="75"
- x2="477.5"
- y2="77.5" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient14935"
xlink:href="#linearGradient9030"
- id="linearGradient18852"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,-22)"
- x1="148.15451"
- y1="-216.25"
- x2="157.91019"
- y2="-216.25" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient18850"
+ y2="77.5"
+ x2="477.5"
+ y1="75"
+ x1="474.84375"
+ gradientTransform="translate(-6,1.4603138e-6)"
gradientUnits="userSpaceOnUse"
- x1="107.15463"
- y1="-227.83138"
- x2="105.81714"
- y2="-219.8996" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient14841"
xlink:href="#linearGradient9030"
- id="linearGradient18848"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(20.000285,-20.002166)"
- x1="123.36729"
- y1="-219.24783"
- x2="136.51436"
- y2="-217.99782" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient18845"
+ y2="-216.25"
+ x2="157.91019"
+ y1="-216.25"
+ x1="148.15451"
+ gradientTransform="translate(0,-22)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(20.000285,-20.002166)"
- x1="135.30351"
- y1="-219.54408"
- x2="123.63815"
- y2="-219.49783" />
+ id="linearGradient18852"
+ xlink:href="#linearGradient9030"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient18843"
+ y2="-219.8996"
+ x2="105.81714"
+ y1="-227.83138"
+ x1="107.15463"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,-22)"
- x1="157.97339"
- y1="-215.99998"
- x2="146.36111"
- y2="-215.99998" />
+ id="linearGradient18850"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030"
- id="linearGradient18901"
+ y2="-217.99782"
+ x2="136.51436"
+ y1="-219.24783"
+ x1="123.36729"
+ gradientTransform="translate(20.000285,-20.002166)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(279.04534,461.00001)"
- x1="151"
- y1="-234"
- x2="149.95467"
- y2="-239.14549" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient18848"
xlink:href="#linearGradient9030"
- id="linearGradient18904"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="-219.49783"
+ x2="123.63815"
+ y1="-219.54408"
+ x1="135.30351"
+ gradientTransform="translate(20.000285,-20.002166)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(280.04419,461)"
- x1="151"
- y1="-234"
- x2="150.25"
- y2="-236.85815" />
+ id="linearGradient18845"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="linearGradient18898"
+ y2="-215.99998"
+ x2="146.36111"
+ y1="-215.99998"
+ x1="157.97339"
+ gradientTransform="translate(0,-22)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(280.99885,461)"
- x1="150.11926"
- y1="-235.21587"
- x2="145.20955"
- y2="-241.85452" />
+ id="linearGradient18843"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="linearGradient18896"
+ y2="-239.14549"
+ x2="149.95467"
+ y1="-234"
+ x1="151"
+ gradientTransform="translate(279.04534,461.00001)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(280,461)"
- x1="150.95467"
- y1="-234.00002"
- x2="147.41411"
- y2="-239.28557" />
+ id="linearGradient18901"
+ xlink:href="#linearGradient9030"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="linearGradient17819"
+ y2="-236.85815"
+ x2="150.25"
+ y1="-234"
+ x1="151"
+ gradientTransform="translate(280.04419,461)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(280,459)"
- x1="150.95467"
- y1="-234.00002"
- x2="147.41411"
- y2="-239.28557" />
+ id="linearGradient18904"
+ xlink:href="#linearGradient9030"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="linearGradient17817"
+ y2="-241.85452"
+ x2="145.20955"
+ y1="-235.21587"
+ x1="150.11926"
+ gradientTransform="translate(280.99885,461)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(280,461)"
- x1="150.95467"
- y1="-234.00002"
+ id="linearGradient18898"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="-239.28557"
x2="147.41411"
- y2="-239.28557" />
+ y1="-234.00002"
+ x1="150.95467"
+ gradientTransform="translate(280,461)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient18896"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030"
- id="linearGradient17535"
+ y2="-239.28557"
+ x2="147.41411"
+ y1="-234.00002"
+ x1="150.95467"
+ gradientTransform="translate(280,459)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,-22)"
- x1="148.15451"
- y1="-216.25"
- x2="157.91019"
- y2="-216.25" />
+ id="linearGradient17819"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient17533"
+ y2="-239.28557"
+ x2="147.41411"
+ y1="-234.00002"
+ x1="150.95467"
+ gradientTransform="translate(280,461)"
gradientUnits="userSpaceOnUse"
- x1="107.15463"
- y1="-227.83138"
- x2="105.81714"
- y2="-219.8996" />
+ id="linearGradient17817"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030"
- id="linearGradient17531"
+ y2="-216.25"
+ x2="157.91019"
+ y1="-216.25"
+ x1="148.15451"
+ gradientTransform="translate(0,-22)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(20.000285,-20.002166)"
- x1="123.36729"
- y1="-219.24783"
- x2="136.51436"
- y2="-217.99782" />
+ id="linearGradient17535"
+ xlink:href="#linearGradient9030"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient17529"
+ y2="-219.8996"
+ x2="105.81714"
+ y1="-227.83138"
+ x1="107.15463"
gradientUnits="userSpaceOnUse"
+ id="linearGradient17533"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="-217.99782"
+ x2="136.51436"
+ y1="-219.24783"
+ x1="123.36729"
gradientTransform="translate(20.000285,-20.002166)"
- x1="135.30351"
- y1="-219.54408"
- x2="123.63815"
- y2="-219.49783" />
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient17531"
+ xlink:href="#linearGradient9030"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient17527"
+ y2="-219.49783"
+ x2="123.63815"
+ y1="-219.54408"
+ x1="135.30351"
+ gradientTransform="translate(20.000285,-20.002166)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,-22)"
- x1="157.97339"
- y1="-215.99998"
+ id="linearGradient17529"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="-215.99998"
x2="146.36111"
- y2="-215.99998" />
+ y1="-215.99998"
+ x1="157.97339"
+ gradientTransform="translate(0,-22)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient17527"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- id="linearGradient18207">
+ id="linearGradient18207"
+ inkscape:collect="always">
<stop
- style="stop-color:#000000;stop-opacity:1;"
+ id="stop18209"
offset="0"
- id="stop18209" />
+ style="stop-color:#000000;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:1"
+ id="stop18211"
offset="1"
- id="stop18211" />
+ style="stop-color:#ffffff;stop-opacity:1" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient18207"
- id="linearGradient18213"
- x1="481.46063"
- y1="219"
- x2="519.44189"
+ gradientUnits="userSpaceOnUse"
y2="218.48816"
- gradientUnits="userSpaceOnUse" />
+ x2="519.44189"
+ y1="219"
+ x1="481.46063"
+ id="linearGradient18213"
+ xlink:href="#linearGradient18207"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030"
- id="linearGradient17506"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,-22)"
- x1="148.15451"
- y1="-216.25"
+ y2="-216.25"
x2="157.91019"
- y2="-216.25" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient17504"
+ y1="-216.25"
+ x1="148.15451"
+ gradientTransform="translate(0,-22)"
gradientUnits="userSpaceOnUse"
- x1="107.15463"
- y1="-227.83138"
- x2="105.81714"
- y2="-219.8996" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient17506"
xlink:href="#linearGradient9030"
- id="linearGradient17502"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(20.000285,-20.002166)"
- x1="123.36729"
- y1="-219.24783"
- x2="136.51436"
- y2="-217.99782" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient17500"
+ y2="-219.8996"
+ x2="105.81714"
+ y1="-227.83138"
+ x1="107.15463"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(20.000285,-20.002166)"
- x1="135.30351"
- y1="-219.54408"
- x2="123.63815"
- y2="-219.49783" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient17504"
xlink:href="#linearGradient1610"
- id="linearGradient17498"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="-217.99782"
+ x2="136.51436"
+ y1="-219.24783"
+ x1="123.36729"
+ gradientTransform="translate(20.000285,-20.002166)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,-22)"
- x1="157.97339"
- y1="-215.99998"
- x2="146.36111"
- y2="-215.99998" />
+ id="linearGradient17502"
+ xlink:href="#linearGradient9030"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="-219.49783"
+ x2="123.63815"
+ y1="-219.54408"
+ x1="135.30351"
+ gradientTransform="translate(20.000285,-20.002166)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient17500"
xlink:href="#linearGradient1610"
- id="linearGradient18670"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="-215.99998"
+ x2="146.36111"
+ y1="-215.99998"
+ x1="157.97339"
+ gradientTransform="translate(0,-22)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.2078427,0,0,1.0516432,-357.40769,69.427229)"
- x1="362.28571"
- y1="-45.098213"
+ id="linearGradient17498"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="-54.124699"
x2="352.46426"
- y2="-54.124699" />
+ y1="-45.098213"
+ x1="362.28571"
+ gradientTransform="matrix(1.2078427,0,0,1.0516432,-357.40769,69.427229)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient18670"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<mask
- maskUnits="userSpaceOnUse"
- id="mask18666">
+ id="mask18666"
+ maskUnits="userSpaceOnUse">
<rect
- y="6"
- x="62.921577"
- height="14.000001"
- width="15.098035"
+ style="fill:url(#linearGradient18670);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.5;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect18668"
- style="fill:url(#linearGradient18670);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.5;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ width="15.098035"
+ height="14.000001"
+ x="62.921577"
+ y="6" />
</mask>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="linearGradient15592"
- gradientUnits="userSpaceOnUse"
- x1="127.50285"
- y1="114.74636"
+ y2="118.69846"
x2="132.35237"
- y2="118.69846" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="linearGradient15590"
- gradientUnits="userSpaceOnUse"
- x1="127.50285"
y1="114.74636"
- x2="135.54628"
- y2="120.58403" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="linearGradient15596"
+ x1="127.50285"
gradientUnits="userSpaceOnUse"
- x1="124.52369"
- y1="112.22441"
- x2="131.10667"
- y2="118.10129" />
+ id="linearGradient15592"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="120.58403"
+ x2="135.54628"
+ y1="114.74636"
+ x1="127.50285"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient15590"
xlink:href="#linearGradient10069"
- id="linearGradient15594"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="118.10129"
+ x2="131.10667"
+ y1="112.22441"
+ x1="124.52369"
gradientUnits="userSpaceOnUse"
- x1="127.50285"
- y1="114.74636"
+ id="linearGradient15596"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="120.14633"
x2="134.62978"
- y2="120.14633" />
+ y1="114.74636"
+ x1="127.50285"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient15594"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient14219">
<stop
- id="stop14221"
+ style="stop-color:#ff8605;stop-opacity:1;"
offset="0"
- style="stop-color:#ff8605;stop-opacity:1;" />
+ id="stop14221" />
<stop
- id="stop14223"
+ style="stop-color:#9c6700;stop-opacity:0;"
offset="1"
- style="stop-color:#9c6700;stop-opacity:0;" />
+ id="stop14223" />
</linearGradient>
<linearGradient
id="linearGradient31456">
<stop
- style="stop-color:#2b1600;stop-opacity:1;"
+ id="stop31458"
offset="0"
- id="stop31458" />
+ style="stop-color:#2b1600;stop-opacity:1;" />
<stop
- style="stop-color:#6e3900;stop-opacity:0;"
+ id="stop31460"
offset="1"
- id="stop31460" />
+ style="stop-color:#6e3900;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient19425">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop19427"
offset="0"
- id="stop19427" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- id="stop19431"
+ style="stop-color:#fffffe;stop-opacity:0.65789473;"
offset="0.63109845"
- style="stop-color:#fffffe;stop-opacity:0.65789473;" />
+ id="stop19431" />
<stop
- style="stop-color:#fffffe;stop-opacity:0.0000000;"
+ id="stop19429"
offset="1.0000000"
- id="stop19429" />
+ style="stop-color:#fffffe;stop-opacity:0.0000000;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- id="linearGradient30208">
+ id="linearGradient30208"
+ inkscape:collect="always">
<stop
- style="stop-color:black;stop-opacity:1;"
+ id="stop30210"
offset="0"
- id="stop30210" />
+ style="stop-color:black;stop-opacity:1;" />
<stop
- style="stop-color:black;stop-opacity:0;"
+ id="stop30212"
offset="1"
- id="stop30212" />
+ style="stop-color:black;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient15782"
- gradientUnits="userSpaceOnUse"
- x1="125.19086"
- y1="125.66204"
+ y2="118"
x2="132.98256"
- y2="118" />
+ y1="125.66204"
+ x1="125.19086"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient15782"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient9030">
<stop
- style="stop-color:white;stop-opacity:1;"
+ id="stop9032"
offset="0"
- id="stop9032" />
+ style="stop-color:white;stop-opacity:1;" />
<stop
- style="stop-color:white;stop-opacity:0;"
+ id="stop9034"
offset="1"
- id="stop9034" />
+ style="stop-color:white;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient1610">
<stop
- style="stop-color:black;stop-opacity:1;"
+ id="stop1611"
offset="0"
- id="stop1611" />
+ style="stop-color:black;stop-opacity:1;" />
<stop
- style="stop-color:white;stop-opacity:1;"
+ id="stop1612"
offset="1"
- id="stop1612" />
+ style="stop-color:white;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient37542">
<stop
- id="stop37544"
+ style="stop-color:#000000;stop-opacity:1;"
offset="0"
- style="stop-color:#000000;stop-opacity:1;" />
+ id="stop37544" />
<stop
- id="stop37546"
+ style="stop-color:#ffffff;stop-opacity:1;"
offset="1"
- style="stop-color:#ffffff;stop-opacity:1;" />
+ id="stop37546" />
</linearGradient>
<linearGradient
id="linearGradient30124">
<stop
- style="stop-color:#1d4a8c;stop-opacity:1;"
+ id="stop30126"
offset="0"
- id="stop30126" />
+ style="stop-color:#1d4a8c;stop-opacity:1;" />
<stop
- style="stop-color:#c1d4f2;stop-opacity:1;"
+ id="stop30128"
offset="1"
- id="stop30128" />
+ style="stop-color:#c1d4f2;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient15893">
<stop
- style="stop-color:#2968c3;stop-opacity:1;"
+ id="stop15895"
offset="0"
- id="stop15895" />
+ style="stop-color:#2968c3;stop-opacity:1;" />
<stop
- id="stop15897"
+ style="stop-color:#b5ccf0;stop-opacity:1;"
offset="0.37679368"
- style="stop-color:#b5ccf0;stop-opacity:1;" />
+ id="stop15897" />
<stop
- style="stop-color:#b5ccf0;stop-opacity:1;"
+ id="stop15899"
offset="0.59786767"
- id="stop15899" />
+ style="stop-color:#b5ccf0;stop-opacity:1;" />
<stop
- style="stop-color:#2968c3;stop-opacity:1;"
+ id="stop15901"
offset="1"
- id="stop15901" />
+ style="stop-color:#2968c3;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient319">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop320"
offset="0"
- id="stop320" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop321"
offset="1"
- id="stop321" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- id="linearGradient24000">
+ id="linearGradient24000"
+ inkscape:collect="always">
<stop
- style="stop-color:white;stop-opacity:1;"
+ id="stop24002"
offset="0"
- id="stop24002" />
+ style="stop-color:white;stop-opacity:1;" />
<stop
- style="stop-color:white;stop-opacity:0;"
+ id="stop24004"
offset="1"
- id="stop24004" />
+ style="stop-color:white;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient10069">
<stop
- style="stop-color:#000000;stop-opacity:1;"
+ id="stop10071"
offset="0"
- id="stop10071" />
+ style="stop-color:#000000;stop-opacity:1;" />
<stop
- style="stop-color:#000000;stop-opacity:0;"
+ id="stop10073"
offset="1"
- id="stop10073" />
+ style="stop-color:#000000;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient32998">
<stop
- style="stop-color:#2968c3;stop-opacity:1;"
+ id="stop33000"
offset="0"
- id="stop33000" />
+ style="stop-color:#2968c3;stop-opacity:1;" />
<stop
- style="stop-color:#c1d7f8;stop-opacity:1;"
+ id="stop33002"
offset="1"
- id="stop33002" />
+ style="stop-color:#c1d7f8;stop-opacity:1;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient21364"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.888889,0,0,1,-32.5,115.5045)"
- x1="261.83936"
- y1="11.593864"
+ y2="29.392145"
x2="277.86761"
- y2="29.392145" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient21366"
+ y1="11.593864"
+ x1="261.83936"
+ gradientTransform="matrix(0.888889,0,0,1,-32.5,115.5045)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.888889,0,0,1,-32.9445,114.0045)"
- x1="272.05627"
- y1="24.537012"
- x2="283.42514"
- y2="37.115723" />
+ id="linearGradient21364"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient21368"
+ y2="37.115723"
+ x2="283.42514"
+ y1="24.537012"
+ x1="272.05627"
+ gradientTransform="matrix(0.888889,0,0,1,-32.9445,114.0045)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(124,-102.00001)"
- x1="85.1875"
- y1="239.125"
- x2="92.8125"
- y2="245.625" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient21366"
xlink:href="#linearGradient37542"
- id="linearGradient21370"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="245.625"
+ x2="92.8125"
+ y1="239.125"
+ x1="85.1875"
+ gradientTransform="translate(124,-102.00001)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.888889,0,0,1,-32.5,115.5045)"
- x1="261.83936"
- y1="11.593864"
- x2="277.86761"
- y2="29.392145" />
+ id="linearGradient21368"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient21372"
+ y2="29.392145"
+ x2="277.86761"
+ y1="11.593864"
+ x1="261.83936"
+ gradientTransform="matrix(0.888889,0,0,1,-32.5,115.5045)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.888889,0,0,1,-32.9445,114.0045)"
- x1="272.05627"
- y1="24.537012"
- x2="283.42514"
- y2="37.115723" />
+ id="linearGradient21370"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient21374"
+ y2="37.115723"
+ x2="283.42514"
+ y1="24.537012"
+ x1="272.05627"
+ gradientTransform="matrix(0.888889,0,0,1,-32.9445,114.0045)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(124,-102.00001)"
- x1="85.1875"
- y1="239.125"
- x2="92.8125"
- y2="245.625" />
- <radialGradient
- inkscape:collect="always"
+ id="linearGradient21372"
xlink:href="#linearGradient37542"
- id="radialGradient21517"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="245.625"
+ x2="92.8125"
+ y1="239.125"
+ x1="85.1875"
+ gradientTransform="translate(124,-102.00001)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.891843,0,0,0.909224,-173.99085,171.21624)"
- cx="350.5"
- cy="14.5"
- fx="350.5"
+ id="linearGradient21374"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <radialGradient
+ r="6.9000001"
fy="14.5"
- r="6.9000001" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="linearGradient21641"
+ fx="350.5"
+ cy="14.5"
+ cx="350.5"
+ gradientTransform="matrix(0.891843,0,0,0.909224,-173.99085,171.21624)"
gradientUnits="userSpaceOnUse"
- x1="127.50285"
- y1="114.74636"
- x2="133.62564"
- y2="120.24665" />
+ id="radialGradient21517"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="linearGradient21643"
+ y2="120.24665"
+ x2="133.62564"
+ y1="114.74636"
+ x1="127.50285"
gradientUnits="userSpaceOnUse"
- x1="126.15096"
- y1="113.21745"
- x2="132"
- y2="118" />
+ id="linearGradient21641"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient20796"
+ y2="118"
+ x2="132"
+ y1="113.21745"
+ x1="126.15096"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(159.9998,-41.00751)"
- x1="261.44702"
- y1="234.6606"
- x2="274.30609"
- y2="247.73561" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient21643"
xlink:href="#linearGradient10069"
- id="linearGradient20798"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(199.9999,105.99249)"
- x1="235.46884"
- y1="103"
- x2="228.71886"
- y2="94.53125" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient21862"
+ y2="247.73561"
+ x2="274.30609"
+ y1="234.6606"
+ x1="261.44702"
+ gradientTransform="translate(159.9998,-41.00751)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.923955,0,0,1,-18.1369,-168)"
- x1="3.2344713"
- y1="215.76874"
- x2="33.15686"
- y2="247.71701" />
+ id="linearGradient20796"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient21864"
+ y2="94.53125"
+ x2="228.71886"
+ y1="103"
+ x1="235.46884"
+ gradientTransform="translate(199.9999,105.99249)"
gradientUnits="userSpaceOnUse"
- x1="5.9836898"
- y1="71.51989"
- x2="19.011419"
- y2="86" />
+ id="linearGradient20798"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient21902"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.923955,0,0,1,-18.1369,-168)"
- x1="3.3268692"
- y1="215.35608"
+ y2="247.71701"
x2="33.15686"
- y2="247.71701" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient21904"
+ y1="215.76874"
+ x1="3.2344713"
+ gradientTransform="matrix(0.923955,0,0,1,-18.1369,-168)"
gradientUnits="userSpaceOnUse"
- x1="5.9836898"
+ id="linearGradient21862"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="86"
+ x2="19.011419"
y1="71.51989"
- x2="18.51141"
- y2="85.5" />
+ x1="5.9836898"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient21864"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient31646"
+ y2="247.71701"
+ x2="33.15686"
+ y1="215.35608"
+ x1="3.3268692"
+ gradientTransform="matrix(0.923955,0,0,1,-18.1369,-168)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.000006,0,0,1,258.9997,-237)"
- x1="24.374985"
- y1="238.33629"
- x2="55.384842"
- y2="269.1373" />
+ id="linearGradient21902"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="85.5"
+ x2="18.51141"
+ y1="71.51989"
+ x1="5.9836898"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient21904"
xlink:href="#linearGradient319"
- id="linearGradient31648"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="269.1373"
+ x2="55.384842"
+ y1="238.33629"
+ x1="24.374985"
+ gradientTransform="matrix(1.000006,0,0,1,258.9997,-237)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,16)"
- x1="278.55817"
- y1="-16.978563"
+ id="linearGradient31646"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="-5.8786855"
x2="291.577"
- y2="-5.8786855" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20036"
- id="radialGradient31650"
+ y1="-16.978563"
+ x1="278.55817"
+ gradientTransform="translate(0,16)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.816279,0,-3.646264e-6,0.779872,56.32029,28.34496)"
- cx="306.55292"
- cy="11.818644"
- fx="306.55292"
- fy="11.818644"
- r="4.25" />
+ id="linearGradient31648"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient14418"
- id="radialGradient31652"
+ r="4.25"
+ fy="11.818644"
+ fx="306.55292"
+ cy="11.818644"
+ cx="306.55292"
+ gradientTransform="matrix(0.816279,0,-3.646264e-6,0.779872,56.32029,28.34496)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.580596,1.138426,-0.692447,0.961382,-175.3891,-329.6844)"
- cx="312.80765"
- cy="10.620173"
- fx="312.80765"
- fy="10.620173"
- r="4.25" />
+ id="radialGradient31650"
+ xlink:href="#linearGradient20036"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20962"
- id="radialGradient31654"
+ r="4.25"
+ fy="10.620173"
+ fx="312.80765"
+ cy="10.620173"
+ cx="312.80765"
+ gradientTransform="matrix(1.580596,1.138426,-0.692447,0.961382,-175.3891,-329.6844)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.48445,-0.00657397,0.00734631,1.660903,-154.1629,19.305572)"
- cx="313.74268"
- cy="15.619254"
- fx="313.74268"
- fy="15.619254"
- r="4.25" />
+ id="radialGradient31652"
+ xlink:href="#linearGradient14418"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20973"
- id="radialGradient31656"
+ r="4.25"
+ fy="15.619254"
+ fx="313.74268"
+ cy="15.619254"
+ cx="313.74268"
+ gradientTransform="matrix(1.48445,-0.00657397,0.00734631,1.660903,-154.1629,19.305572)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.756245,0,-3.378096e-6,0.722516,72.63115,31.07857)"
- cx="309.0571"
- cy="15.518281"
- fx="309.0571"
+ id="radialGradient31654"
+ xlink:href="#linearGradient20962"
+ inkscape:collect="always" />
+ <radialGradient
+ r="4.25"
fy="15.518281"
- r="4.25" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient31664"
+ fx="309.0571"
+ cy="15.518281"
+ cx="309.0571"
+ gradientTransform="matrix(0.756245,0,-3.378096e-6,0.722516,72.63115,31.07857)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8579582,0,0,0.9285714,7.397998,-211.96428)"
- x1="-6.3249049"
- y1="205.0083"
- x2="32.351238"
- y2="248.75177" />
+ id="radialGradient31656"
+ xlink:href="#linearGradient20973"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="linearGradient31666"
+ y2="248.75177"
+ x2="32.351238"
+ y1="205.0083"
+ x1="-6.3249049"
+ gradientTransform="matrix(0.8579582,0,0,0.9285714,7.397998,-211.96428)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-0.9569715,-1,0,259,351.18743)"
- x1="347.6467"
- y1="216.75188"
- x2="345.98633"
- y2="243.92201" />
+ id="linearGradient31664"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient31668"
+ y2="243.92201"
+ x2="345.98633"
+ y1="216.75188"
+ x1="347.6467"
+ gradientTransform="matrix(0,-0.9569715,-1,0,259,351.18743)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9166667,0,0,0.9166667,24.364541,-55.041665)"
- x1="5.9836898"
- y1="71.51989"
- x2="18.01141"
- y2="84.75" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient31666"
xlink:href="#linearGradient10069"
- id="linearGradient31672"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-0.9297203,-1.2117965,0,305.73028,342.22894)"
- x1="346.15555"
- y1="218.2382"
- x2="346.58698"
- y2="238.44429" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient31694"
+ y2="84.75"
+ x2="18.01141"
+ y1="71.51989"
+ x1="5.9836898"
+ gradientTransform="matrix(0.9166667,0,0,0.9166667,24.364541,-55.041665)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9166695,0,0,0.9203753,-10.025729,345.78566)"
- x1="80.60067"
- y1="108.47212"
- x2="68.0271"
- y2="94.239906" />
+ id="linearGradient31668"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient13938"
- id="linearGradient31696"
+ y2="238.44429"
+ x2="346.58698"
+ y1="218.2382"
+ x1="346.15555"
+ gradientTransform="matrix(0,-0.9297203,-1.2117965,0,305.73028,342.22894)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-15.983875,338)"
- x1="70.55275"
- y1="97.5"
- x2="79.355118"
- y2="107.18619" />
+ id="linearGradient31672"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient31698"
+ y2="94.239906"
+ x2="68.0271"
+ y1="108.47212"
+ x1="80.60067"
+ gradientTransform="matrix(0.9166695,0,0,0.9203753,-10.025729,345.78566)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9998599,0,0,0.9960071,-15.972985,338.41149)"
- x1="64.998215"
- y1="90.951675"
- x2="86.00116"
- y2="112.03586" />
+ id="linearGradient31694"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient31932"
+ y2="107.18619"
+ x2="79.355118"
+ y1="97.5"
+ x1="70.55275"
+ gradientTransform="translate(-15.983875,338)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.888889,0,0,1,105.5221,92.482413)"
- x1="257.0376"
- y1="10.838325"
- x2="277.61203"
- y2="31.019331" />
+ id="linearGradient31696"
+ xlink:href="#linearGradient13938"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="linearGradient31934"
+ y2="112.03586"
+ x2="86.00116"
+ y1="90.951675"
+ x1="64.998215"
+ gradientTransform="matrix(0.9998599,0,0,0.9960071,-15.972985,338.41149)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.7827973,0,0,0.9989462,77.082208,42.08484)"
- x1="332.03717"
- y1="68.624634"
- x2="346.08932"
- y2="83.002625" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient31698"
xlink:href="#linearGradient319"
- id="linearGradient31936"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(262,-125)"
- x1="79.329903"
- y1="236"
- x2="92.8125"
- y2="245.625" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24000"
- id="linearGradient33666"
+ y2="31.019331"
+ x2="277.61203"
+ y1="10.838325"
+ x1="257.0376"
+ gradientTransform="matrix(0.888889,0,0,1,105.5221,92.482413)"
gradientUnits="userSpaceOnUse"
- x1="124.14184"
- y1="126.23546"
- x2="132"
- y2="118" />
+ id="linearGradient31932"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient33668"
+ y2="83.002625"
+ x2="346.08932"
+ y1="68.624634"
+ x1="332.03717"
+ gradientTransform="matrix(0.7827973,0,0,0.9989462,77.082208,42.08484)"
gradientUnits="userSpaceOnUse"
- x1="125.45158"
- y1="125.94608"
- x2="133.53401"
- y2="116.55647" />
+ id="linearGradient31934"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="245.625"
+ x2="92.8125"
+ y1="236"
+ x1="79.329903"
+ gradientTransform="translate(262,-125)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient31936"
xlink:href="#linearGradient319"
- id="linearGradient33670"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="118"
+ x2="132"
+ y1="126.23546"
+ x1="124.14184"
gradientUnits="userSpaceOnUse"
- x1="142.97318"
- y1="107.64013"
- x2="130.82327"
- y2="119.554" />
+ id="linearGradient33666"
+ xlink:href="#linearGradient24000"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient33681"
+ y2="116.55647"
+ x2="133.53401"
+ y1="125.94608"
+ x1="125.45158"
gradientUnits="userSpaceOnUse"
- x1="139.93341"
- y1="110.56118"
- x2="132"
- y2="118.66972" />
+ id="linearGradient33668"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient32842"
- id="linearGradient33700"
+ y2="119.554"
+ x2="130.82327"
+ y1="107.64013"
+ x1="142.97318"
gradientUnits="userSpaceOnUse"
- x1="149.55772"
- y1="98.630066"
- x2="123.9021"
- y2="127.60542" />
+ id="linearGradient33670"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="118.66972"
+ x2="132"
+ y1="110.56118"
+ x1="139.93341"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient33681"
xlink:href="#linearGradient319"
- id="linearGradient10540"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="127.60542"
+ x2="123.9021"
+ y1="98.630066"
+ x1="149.55772"
gradientUnits="userSpaceOnUse"
- x1="130.95198"
- y1="117.09563"
- x2="140.66667"
- y2="125.94853" />
+ id="linearGradient33700"
+ xlink:href="#linearGradient32842"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient11333"
+ y2="125.94853"
+ x2="140.66667"
+ y1="117.09563"
+ x1="130.95198"
gradientUnits="userSpaceOnUse"
- x1="119.1647"
- y1="106.08605"
- x2="133.01006"
- y2="119.79803" />
+ id="linearGradient10540"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient28057"
+ y2="119.79803"
+ x2="133.01006"
+ y1="106.08605"
+ x1="119.1647"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-425,393.99999)"
- x1="225.6198"
- y1="5.7625732"
+ id="linearGradient11333"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="14.103563"
x2="236.47855"
- y2="14.103563" />
+ y1="5.7625732"
+ x1="225.6198"
+ gradientTransform="translate(-425,393.99999)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient28057"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient30208"
- id="linearGradient28077"
- x1="306.26187"
- y1="272"
- x2="307"
+ gradientUnits="userSpaceOnUse"
y2="263.55374"
- gradientUnits="userSpaceOnUse" />
+ x2="307"
+ y1="272"
+ x1="306.26187"
+ id="linearGradient28077"
+ xlink:href="#linearGradient30208"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient28474"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,10)"
- x1="431.05026"
- y1="121.42467"
+ y2="110.49417"
x2="446.26407"
- y2="110.49417" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient28528"
- gradientUnits="userSpaceOnUse"
+ y1="121.42467"
+ x1="431.05026"
gradientTransform="translate(0,10)"
- x1="442.69827"
- y1="107.56771"
- x2="450.27414"
- y2="122.95798" />
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient28474"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient28530"
+ y2="122.95798"
+ x2="450.27414"
+ y1="107.56771"
+ x1="442.69827"
+ gradientTransform="translate(0,10)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-474,158.25)"
- x1="437.57828"
- y1="104.34499"
- x2="447.96875"
- y2="117.90625" />
+ id="linearGradient28528"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient28532"
+ y2="117.90625"
+ x2="447.96875"
+ y1="104.34499"
+ x1="437.57828"
+ gradientTransform="translate(-474,158.25)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,10)"
- x1="-38.103703"
- y1="266.11719"
+ id="linearGradient28530"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="253.23859"
x2="-20.826464"
- y2="253.23859" />
+ y1="266.11719"
+ x1="-38.103703"
+ gradientTransform="translate(0,10)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient28532"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient10982"
- x1="207.04637"
- y1="182.09375"
- x2="213.7883"
+ gradientUnits="userSpaceOnUse"
y2="182.52524"
- gradientUnits="userSpaceOnUse" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient10984"
- x1="212.04637"
+ x2="213.7883"
y1="182.09375"
- x2="222.35799"
- y2="182.77524"
- gradientUnits="userSpaceOnUse" />
- <linearGradient
- inkscape:collect="always"
+ x1="207.04637"
+ id="linearGradient10982"
xlink:href="#linearGradient319"
- id="linearGradient11762"
- x1="371.98389"
- y1="203"
- x2="376.48389"
- y2="203"
- gradientUnits="userSpaceOnUse" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ gradientUnits="userSpaceOnUse"
+ y2="182.77524"
+ x2="222.35799"
+ y1="182.09375"
+ x1="212.04637"
+ id="linearGradient10984"
xlink:href="#linearGradient319"
- id="linearGradient11764"
- x1="366.98389"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientUnits="userSpaceOnUse"
+ y2="203"
+ x2="376.48389"
y1="203"
- x2="370.98389"
- y2="202.75"
- gradientUnits="userSpaceOnUse" />
+ x1="371.98389"
+ id="linearGradient11762"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ gradientUnits="userSpaceOnUse"
+ y2="202.75"
+ x2="370.98389"
+ y1="203"
+ x1="366.98389"
+ id="linearGradient11764"
xlink:href="#linearGradient319"
- id="linearGradient11766"
- x1="391.62881"
- y1="243.48854"
- x2="386.13718"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientUnits="userSpaceOnUse"
y2="244.68996"
- gradientUnits="userSpaceOnUse" />
+ x2="386.13718"
+ y1="243.48854"
+ x1="391.62881"
+ id="linearGradient11766"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="radialGradient12427"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.050372,0,0,1.050372,-3.551238,-0.730396)"
- cx="70.5"
- cy="14.5"
- fx="70.5"
+ r="1.5"
fy="14.5"
- r="1.5" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient14219"
- id="radialGradient12429"
+ fx="70.5"
+ cy="14.5"
+ cx="70.5"
+ gradientTransform="matrix(1.050372,0,0,1.050372,-3.551238,-0.730396)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.5007214,0.3131662,-0.3623683,0.5793905,300.02235,-93.056748)"
- cx="70.470596"
- cy="14.649424"
- fx="70.470596"
+ id="radialGradient12427"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
+ <radialGradient
+ r="5.5192375"
fy="14.649424"
- r="5.5192375" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16359"
- id="linearGradient12602"
+ fx="70.470596"
+ cy="14.649424"
+ cx="70.470596"
+ gradientTransform="matrix(0.5007214,0.3131662,-0.3623683,0.5793905,300.02235,-93.056748)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,-1,456.04574,-116.51416)"
- x1="88.079262"
- y1="66.110847"
- x2="95.954262"
- y2="58.272621" />
+ id="radialGradient12429"
+ xlink:href="#linearGradient14219"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient31456"
- id="linearGradient12114"
+ y2="58.272621"
+ x2="95.954262"
+ y1="66.110847"
+ x1="88.079262"
+ gradientTransform="matrix(1,0,0,-1,456.04574,-116.51416)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-1438.0001,-418)"
- x1="1663.8125"
- y1="722"
+ id="linearGradient12602"
+ xlink:href="#linearGradient16359"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="726.37006"
x2="1661.8125"
- y2="726.37006" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient19425"
- id="radialGradient12116"
+ y1="722"
+ x1="1663.8125"
+ gradientTransform="translate(-1438.0001,-418)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.1378252,-0.2988982,2.5269117,1.1651875,-1830.2675,-33.64056)"
- cx="1662.2664"
- cy="722.19189"
- fx="1662.2664"
+ id="linearGradient12114"
+ xlink:href="#linearGradient31456"
+ inkscape:collect="always" />
+ <radialGradient
+ r="5.5"
fy="722.19189"
- r="5.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient12118"
+ fx="1662.2664"
+ cy="722.19189"
+ cx="1662.2664"
+ gradientTransform="matrix(0.1378252,-0.2988982,2.5269117,1.1651875,-1830.2675,-33.64056)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8167109,0,0,0.8433415,-1397.7474,-388.72044)"
- x1="1984.5453"
- y1="828.21777"
- x2="1978.11"
- y2="829.35315" />
+ id="radialGradient12116"
+ xlink:href="#linearGradient19425"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient30208"
- id="linearGradient12213"
+ y2="829.35315"
+ x2="1978.11"
+ y1="828.21777"
+ x1="1984.5453"
+ gradientTransform="matrix(0.8167109,0,0,0.8433415,-1397.7474,-388.72044)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-1297,-948)"
- x1="1663.8125"
- y1="722"
+ id="linearGradient12118"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="726.37006"
x2="1661.8125"
- y2="726.37006" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient19425"
- id="radialGradient12215"
+ y1="722"
+ x1="1663.8125"
+ gradientTransform="translate(-1297,-948)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.1378252,-0.2988982,2.5269117,1.1651875,-1689.2674,-563.64056)"
- cx="1662.2664"
- cy="722.19189"
- fx="1662.2664"
+ id="linearGradient12213"
+ xlink:href="#linearGradient30208"
+ inkscape:collect="always" />
+ <radialGradient
+ r="5.5"
fy="722.19189"
- r="5.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient12217"
+ fx="1662.2664"
+ cy="722.19189"
+ cx="1662.2664"
+ gradientTransform="matrix(0.1378252,-0.2988982,2.5269117,1.1651875,-1689.2674,-563.64056)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8167109,0,0,0.8433415,-1256.7473,-918.72044)"
- x1="1984.3658"
- y1="827.77124"
- x2="1979.2772"
- y2="827.32849" />
+ id="radialGradient12215"
+ xlink:href="#linearGradient19425"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient12305"
+ y2="827.32849"
+ x2="1979.2772"
+ y1="827.77124"
+ x1="1984.3658"
+ gradientTransform="matrix(0.8167109,0,0,0.8433415,-1256.7473,-918.72044)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.2000005,0,0,1.1997014,-125.70008,-191.68873)"
- x1="257.24991"
- y1="147.38998"
- x2="262.24991"
- y2="152.46707" />
+ id="linearGradient12217"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient12307"
- gradientUnits="userSpaceOnUse"
+ y2="152.46707"
+ x2="262.24991"
+ y1="147.38998"
+ x1="257.24991"
gradientTransform="matrix(1.2000005,0,0,1.1997014,-125.70008,-191.68873)"
- x1="258.08322"
- y1="147.87068"
- x2="264.16571"
- y2="153.8233" />
- <linearGradient
- inkscape:collect="always"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient12305"
xlink:href="#linearGradient1610"
- id="linearGradient13046"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="153.8233"
+ x2="264.16571"
+ y1="147.87068"
+ x1="258.08322"
+ gradientTransform="matrix(1.2000005,0,0,1.1997014,-125.70008,-191.68873)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(360,-161.99999)"
- x1="-80"
- y1="151"
+ id="linearGradient12307"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="152.24998"
x2="-80"
- y2="152.24998" />
+ y1="151"
+ x1="-80"
+ gradientTransform="translate(360,-161.99999)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient13046"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<mask
- maskUnits="userSpaceOnUse"
- id="mask13041">
+ id="mask13041"
+ maskUnits="userSpaceOnUse">
<rect
- style="fill:url(#linearGradient13046);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- id="rect13043"
- width="7"
- height="8"
+ y="-12"
x="276"
- y="-12" />
+ height="8"
+ width="7"
+ id="rect13043"
+ style="fill:url(#linearGradient13046);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
</mask>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient13056"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(360,-145.93749)"
- x1="-80"
- y1="151"
+ y2="152.24998"
x2="-80"
- y2="152.24998" />
+ y1="151"
+ x1="-80"
+ gradientTransform="translate(360,-145.93749)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient13056"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<mask
- maskUnits="userSpaceOnUse"
- id="mask13052">
+ id="mask13052"
+ maskUnits="userSpaceOnUse">
<rect
- y="4.0625"
- x="276"
- height="8"
- width="7"
- id="rect13054"
+ transform="scale(1,-1)"
style="fill:url(#linearGradient13056);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- transform="scale(1,-1)" />
+ id="rect13054"
+ width="7"
+ height="8"
+ x="276"
+ y="4.0625" />
</mask>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient14167"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-636.98388,52.01562)"
- x1="443.86667"
- y1="133.98936"
+ y2="143.58749"
x2="451.98389"
- y2="143.58749" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient4138"
- id="linearGradient14169"
+ y1="133.98936"
+ x1="443.86667"
+ gradientTransform="translate(-636.98388,52.01562)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-635.98388,53.01562)"
- x1="456.03769"
- y1="135.76678"
- x2="453.61005"
- y2="133.00301" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient14167"
xlink:href="#linearGradient37542"
- id="linearGradient14171"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-636.98388,52.01562)"
- x1="449.14645"
- y1="136.18045"
- x2="453.24457"
- y2="138.7879" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="133.00301"
+ x2="453.61005"
+ y1="135.76678"
+ x1="456.03769"
+ gradientTransform="translate(-635.98388,53.01562)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient14169"
xlink:href="#linearGradient4138"
- id="linearGradient14173"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="138.7879"
+ x2="453.24457"
+ y1="136.18045"
+ x1="449.14645"
+ gradientTransform="translate(-636.98388,52.01562)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-635.98388,53.01562)"
- x1="456.03769"
- y1="135.76678"
- x2="454.31345"
- y2="133.62801" />
+ id="linearGradient14171"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient13112"
+ y2="133.62801"
+ x2="454.31345"
+ y1="135.76678"
+ x1="456.03769"
+ gradientTransform="translate(-635.98388,53.01562)"
gradientUnits="userSpaceOnUse"
- x1="133.42287"
- y1="120.62622"
- x2="126.67323"
- y2="113.20281" />
+ id="linearGradient14173"
+ xlink:href="#linearGradient4138"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient13114"
+ y2="113.20281"
+ x2="126.67323"
+ y1="120.62622"
+ x1="133.42287"
gradientUnits="userSpaceOnUse"
- x1="120.77391"
- y1="106.19939"
- x2="144.64095"
- y2="129.62753" />
+ id="linearGradient13112"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient16027"
+ y2="129.62753"
+ x2="144.64095"
+ y1="106.19939"
+ x1="120.77391"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8289081,0,0,2.1560411,236.27148,-864.45588)"
- x1="212"
- y1="435.59741"
- x2="211.99998"
- y2="435.32159" />
+ id="linearGradient13114"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23647"
- id="linearGradient16031"
+ y2="435.32159"
+ x2="211.99998"
+ y1="435.59741"
+ x1="212"
+ gradientTransform="matrix(0.8289081,0,0,2.1560411,236.27148,-864.45588)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.1035181,0,0,1,158.18497,-359.77344)"
- x1="229.6875"
- y1="440.51562"
+ id="linearGradient16027"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="440.57812"
x2="238.53125"
- y2="440.57812" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23390"
- id="radialGradient16034"
+ y1="440.51562"
+ x1="229.6875"
+ gradientTransform="matrix(1.1035181,0,0,1,158.18497,-359.77344)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.8126517,-0.04317018,0.04642643,1.9485655,-18.817545,-774.28453)"
- cx="224.32494"
- cy="441.84744"
- fx="224.32494"
+ id="linearGradient16031"
+ xlink:href="#linearGradient23647"
+ inkscape:collect="always" />
+ <radialGradient
+ r="6.7191267"
fy="441.84744"
- r="6.7191267" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient30208"
- id="linearGradient16036"
+ fx="224.32494"
+ cy="441.84744"
+ cx="224.32494"
+ gradientTransform="matrix(1.8126517,-0.04317018,0.04642643,1.9485655,-18.817545,-774.28453)"
gradientUnits="userSpaceOnUse"
- x1="211.99998"
- y1="435.7319"
- x2="211.99998"
- y2="436.07974"
- gradientTransform="matrix(0.9803611,0,0,2.1560411,204.16345,-864.45588)" />
+ id="radialGradient16034"
+ xlink:href="#linearGradient23390"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23647"
- id="linearGradient16039"
+ gradientTransform="matrix(0.9803611,0,0,2.1560411,204.16345,-864.45588)"
+ y2="436.07974"
+ x2="211.99998"
+ y1="435.7319"
+ x1="211.99998"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(182,-359.75)"
- x1="221.96414"
- y1="439.75"
- x2="238.87605"
- y2="448.88205" />
+ id="linearGradient16036"
+ xlink:href="#linearGradient30208"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient17337"
+ y2="448.88205"
+ x2="238.87605"
+ y1="439.75"
+ x1="221.96414"
+ gradientTransform="translate(182,-359.75)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1.0041772,0,0,0.9688607,-81.584854,117.13687)"
- x1="-4.9152389"
- y1="252.69086"
- x2="-45.689278"
- y2="252.63284" />
+ id="linearGradient16039"
+ xlink:href="#linearGradient23647"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient17339"
+ y2="252.63284"
+ x2="-45.689278"
+ y1="252.69086"
+ x1="-4.9152389"
+ gradientTransform="matrix(-1.0041772,0,0,0.9688607,-81.584854,117.13687)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9993234,0,0,1.0050357,-171.92846,305.72314)"
- x1="107.96875"
- y1="53.875"
- x2="117"
- y2="60.125" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient17337"
xlink:href="#linearGradient37542"
- id="linearGradient17656"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.0008786,0,0,1.081555,-21.021535,-187.45087)"
- x1="-12.839478"
- y1="201"
- x2="44.522621"
- y2="256.70349" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient17658"
+ y2="60.125"
+ x2="117"
+ y1="53.875"
+ x1="107.96875"
+ gradientTransform="matrix(0.9993234,0,0,1.0050357,-171.92846,305.72314)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.099576,0,0,1.0999923,190.46996,204.85062)"
- x1="9.6310225"
- y1="76"
- x2="15"
- y2="81" />
+ id="linearGradient17339"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient17712"
+ y2="256.70349"
+ x2="44.522621"
+ y1="201"
+ x1="-12.839478"
+ gradientTransform="matrix(1.0008786,0,0,1.081555,-21.021535,-187.45087)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1.0041772,0,0,0.9688607,370.43125,-83.863716)"
- x1="-5.6700387"
- y1="250.87607"
- x2="-46.452946"
- y2="251.42462" />
+ id="linearGradient17656"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient17714"
+ y2="81"
+ x2="15"
+ y1="76"
+ x1="9.6310225"
+ gradientTransform="matrix(1.099576,0,0,1.0999923,190.46996,204.85062)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9993234,0,0,1.0050357,280.08766,104.72255)"
- x1="102.61966"
- y1="50.742527"
- x2="117"
- y2="60.125" />
+ id="linearGradient17658"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030"
- id="linearGradient12655"
+ y2="251.42462"
+ x2="-46.452946"
+ y1="250.87607"
+ x1="-5.6700387"
+ gradientTransform="matrix(-1.0041772,0,0,0.9688607,370.43125,-83.863716)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8193413,0,0,0.8193419,-388.72692,-564.02452)"
- x1="150.4086"
- y1="104.61366"
- x2="151.40744"
- y2="105.64391" />
+ id="linearGradient17712"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient30208"
- id="linearGradient12658"
+ y2="60.125"
+ x2="117"
+ y1="50.742527"
+ x1="102.61966"
+ gradientTransform="matrix(0.9993234,0,0,1.0050357,280.08766,104.72255)"
gradientUnits="userSpaceOnUse"
- x1="150.4086"
- y1="104.61366"
- x2="151.40744"
- y2="105.64391"
- gradientTransform="matrix(0.8193413,0,0,0.8193419,141.28585,391.96271)" />
+ id="linearGradient17714"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient30208"
- id="linearGradient13511"
+ y2="105.64391"
+ x2="151.40744"
+ y1="104.61366"
+ x1="150.4086"
+ gradientTransform="matrix(0.8193413,0,0,0.8193419,-388.72692,-564.02452)"
gradientUnits="userSpaceOnUse"
+ id="linearGradient12655"
+ xlink:href="#linearGradient9030"
+ inkscape:collect="always" />
+ <linearGradient
gradientTransform="matrix(0.8193413,0,0,0.8193419,141.28585,391.96271)"
- x1="150.4086"
- y1="104.61366"
+ y2="105.64391"
x2="151.40744"
- y2="105.64391" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030"
- id="linearGradient13513"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8193413,0,0,0.8193419,-388.72692,-564.02452)"
- x1="150.4086"
y1="104.61366"
- x2="151.40744"
- y2="105.64391" />
+ x1="150.4086"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient12658"
+ xlink:href="#linearGradient30208"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="105.64391"
+ x2="151.40744"
+ y1="104.61366"
+ x1="150.4086"
+ gradientTransform="matrix(0.8193413,0,0,0.8193419,141.28585,391.96271)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient13511"
xlink:href="#linearGradient30208"
- id="linearGradient13527"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="105.64391"
+ x2="151.40744"
+ y1="104.61366"
+ x1="150.4086"
+ gradientTransform="matrix(0.8193413,0,0,0.8193419,-388.72692,-564.02452)"
gradientUnits="userSpaceOnUse"
- x1="328.95557"
- y1="33.94022"
- x2="331.74063"
- y2="37.044456" />
+ id="linearGradient13513"
+ xlink:href="#linearGradient9030"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient13529"
+ y2="37.044456"
+ x2="331.74063"
+ y1="33.94022"
+ x1="328.95557"
gradientUnits="userSpaceOnUse"
- x1="328.38852"
- y1="33.505165"
- x2="331.44778"
- y2="36.739578" />
+ id="linearGradient13527"
+ xlink:href="#linearGradient30208"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient14568"
+ y2="36.739578"
+ x2="331.44778"
+ y1="33.505165"
+ x1="328.38852"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(68.016116,127.00002)"
- x1="97.983887"
- y1="127.99998"
- x2="88.983887"
- y2="115.99998" />
+ id="linearGradient13529"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient14570"
+ y2="115.99998"
+ x2="88.983887"
+ y1="127.99998"
+ x1="97.983887"
+ gradientTransform="translate(68.016116,127.00002)"
gradientUnits="userSpaceOnUse"
- x1="94.485573"
- y1="122.13319"
- x2="89.207298"
- y2="125.83332" />
+ id="linearGradient14568"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient14572"
+ y2="125.83332"
+ x2="89.207298"
+ y1="122.13319"
+ x1="94.485573"
gradientUnits="userSpaceOnUse"
- x1="88.560204"
- y1="127.88263"
+ id="linearGradient14570"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="123.83599"
x2="94.011101"
- y2="123.83599" />
+ y1="127.88263"
+ x1="88.560204"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient14572"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient47130"
- id="linearGradient13699"
- x1="-162.89217"
- y1="245"
- x2="-174.18907"
+ gradientUnits="userSpaceOnUse"
y2="224.99274"
- gradientUnits="userSpaceOnUse" />
+ x2="-174.18907"
+ y1="245"
+ x1="-162.89217"
+ id="linearGradient13699"
+ xlink:href="#linearGradient47130"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient13998"
- id="linearGradient26282"
- gradientUnits="userSpaceOnUse"
- x1="13.5"
- y1="57.827747"
+ y2="53.875874"
x2="11.472005"
- y2="53.875874" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient13998"
- id="linearGradient26284"
+ y1="57.827747"
+ x1="13.5"
gradientUnits="userSpaceOnUse"
- x1="-18.600719"
- y1="501.96539"
- x2="-26.642899"
- y2="487.60382" />
+ id="linearGradient26282"
+ xlink:href="#linearGradient13998"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient26286"
+ y2="487.60382"
+ x2="-26.642899"
+ y1="501.96539"
+ x1="-18.600719"
gradientUnits="userSpaceOnUse"
- x1="15.027407"
- y1="60.637787"
- x2="13.5"
- y2="57.750687" />
+ id="linearGradient26284"
+ xlink:href="#linearGradient13998"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient26288"
+ y2="57.750687"
+ x2="13.5"
+ y1="60.637787"
+ x1="15.027407"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0.03018343,0.1408617)"
- x1="-32.067383"
- y1="490.70178"
- x2="-22.25"
- y2="500" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient26286"
xlink:href="#linearGradient319"
- id="linearGradient14198"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(218.01612,129)"
- x1="87.03125"
- y1="241"
- x2="92.8125"
- y2="245.625" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient14204"
+ y2="500"
+ x2="-22.25"
+ y1="490.70178"
+ x1="-32.067383"
+ gradientTransform="translate(0.03018343,0.1408617)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.888889,0,0,1,61.53822,346.48241)"
- x1="246.89435"
- y1="-4.4418921"
- x2="277.68143"
- y2="30.743095" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient26288"
xlink:href="#linearGradient319"
- id="linearGradient15195"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9166695,0,0,0.9203753,-10.025729,345.78566)"
- x1="80.60067"
- y1="108.47212"
- x2="68.0271"
- y2="94.239906" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient71814"
- id="linearGradient15209"
+ y2="245.625"
+ x2="92.8125"
+ y1="241"
+ x1="87.03125"
+ gradientTransform="translate(218.01612,129)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-15.983875,338)"
- x1="70.55275"
- y1="97.5"
- x2="79.355118"
- y2="107.18619" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient14198"
xlink:href="#linearGradient319"
- id="linearGradient15211"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9998599,0,0,0.9960071,-15.972985,338.41149)"
- x1="61.465469"
- y1="88.058716"
- x2="86.00116"
- y2="112.03586" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient15363"
+ y2="30.743095"
+ x2="277.68143"
+ y1="-4.4418921"
+ x1="246.89435"
+ gradientTransform="matrix(0.888889,0,0,1,61.53822,346.48241)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9999519,0,0,0.9998051,-33.993941,254.01926)"
- x1="101.21339"
- y1="68.783279"
- x2="135.45256"
- y2="103.11092" />
+ id="linearGradient14204"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="94.239906"
+ x2="68.0271"
+ y1="108.47212"
+ x1="80.60067"
+ gradientTransform="matrix(0.9166695,0,0,0.9203753,-10.025729,345.78566)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient15195"
xlink:href="#linearGradient319"
- id="linearGradient15365"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="107.18619"
+ x2="79.355118"
+ y1="97.5"
+ x1="70.55275"
+ gradientTransform="translate(-15.983875,338)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.1004102,0,0,1.0993832,40.331334,244.81698)"
- x1="47.655102"
- y1="93.805557"
- x2="59.057678"
- y2="105.27895" />
+ id="linearGradient15209"
+ xlink:href="#linearGradient71814"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10585"
- id="linearGradient15367"
+ y2="112.03586"
+ x2="86.00116"
+ y1="88.058716"
+ x1="61.465469"
+ gradientTransform="matrix(0.9998599,0,0,0.9960071,-15.972985,338.41149)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1.032977,0,0,1,128.82015,107.77516)"
- x1="12.330792"
- y1="246.97107"
- x2="41.654194"
- y2="247.3784" />
+ id="linearGradient15211"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient18207"
- id="linearGradient15383"
+ y2="103.11092"
+ x2="135.45256"
+ y1="68.783279"
+ x1="101.21339"
+ gradientTransform="matrix(0.9999519,0,0,0.9998051,-33.993941,254.01926)"
gradientUnits="userSpaceOnUse"
- x1="-132.24858"
- y1="313.87549"
- x2="-171.01999"
- y2="223.69542" />
+ id="linearGradient15363"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="105.27895"
+ x2="59.057678"
+ y1="93.805557"
+ x1="47.655102"
+ gradientTransform="matrix(1.1004102,0,0,1.0993832,40.331334,244.81698)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient15365"
xlink:href="#linearGradient319"
- id="linearGradient14377"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="247.3784"
+ x2="41.654194"
+ y1="246.97107"
+ x1="12.330792"
+ gradientTransform="matrix(-1.032977,0,0,1,128.82015,107.77516)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(1.691866,0.00341)"
- x1="86.452194"
- y1="101.22832"
- x2="110.48556"
- y2="81.14637" />
+ id="linearGradient15367"
+ xlink:href="#linearGradient10585"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient16638"
+ y2="223.69542"
+ x2="-171.01999"
+ y1="313.87549"
+ x1="-132.24858"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(42,0)"
- x1="108"
- y1="500"
- x2="54.8125"
- y2="500" />
+ id="linearGradient15383"
+ xlink:href="#linearGradient18207"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient15809"
- id="linearGradient16640"
+ y2="81.14637"
+ x2="110.48556"
+ y1="101.22832"
+ x1="86.452194"
+ gradientTransform="translate(1.691866,0.00341)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(42,0)"
- x1="85.874489"
- y1="501.74075"
- x2="26.561054"
- y2="498.48148" />
+ id="linearGradient14377"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="500"
+ x2="54.8125"
+ y1="500"
+ x1="108"
+ gradientTransform="translate(42,0)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient16638"
xlink:href="#linearGradient1610"
- id="linearGradient16642"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="498.48148"
+ x2="26.561054"
+ y1="501.74075"
+ x1="85.874489"
+ gradientTransform="translate(42,0)"
gradientUnits="userSpaceOnUse"
- x1="80.768944"
- y1="504.67188"
- x2="76.885078"
- y2="501.58331" />
+ id="linearGradient16640"
+ xlink:href="#linearGradient15809"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient16644"
+ y2="501.58331"
+ x2="76.885078"
+ y1="504.67188"
+ x1="80.768944"
gradientUnits="userSpaceOnUse"
- x1="89.526657"
- y1="511.42972"
+ id="linearGradient16642"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="501.04794"
x2="78.000008"
- y2="501.04794" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient14262"
- id="radialGradient16646"
+ y1="511.42972"
+ x1="89.526657"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.3949409,0.3949425,-0.4243709,0.4254619,300.60762,256.85923)"
- cx="75.95578"
- cy="492.15359"
- fx="75.95578"
- fy="492.15359"
- r="3.1650217" />
- <radialGradient
- inkscape:collect="always"
+ id="linearGradient16644"
xlink:href="#linearGradient319"
- id="radialGradient16648"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.4624192,0,0,1.4467089,-36.975824,-224.99718)"
- cx="79.959885"
- cy="503.81497"
- fx="79.959885"
- fy="503.81497"
- r="2.9089756" />
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
+ r="3.1650217"
+ fy="492.15359"
+ fx="75.95578"
+ cy="492.15359"
+ cx="75.95578"
+ gradientTransform="matrix(0.3949409,0.3949425,-0.4243709,0.4254619,300.60762,256.85923)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient16646"
xlink:href="#linearGradient14262"
- id="radialGradient16650"
+ inkscape:collect="always" />
+ <radialGradient
+ r="2.9089756"
+ fy="503.81497"
+ fx="79.959885"
+ cy="503.81497"
+ cx="79.959885"
+ gradientTransform="matrix(1.4624192,0,0,1.4467089,-36.975824,-224.99718)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8886193,0.8021825,-0.8051059,0.8972684,411.80247,-8.668512)"
- cx="74.518959"
- cy="499.99969"
- fx="74.518959"
- fy="499.99969"
- r="3.1650217" />
+ id="radialGradient16648"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient18821"
- id="radialGradient32447"
+ r="3.1650217"
+ fy="499.99969"
+ fx="74.518959"
+ cy="499.99969"
+ cx="74.518959"
+ gradientTransform="matrix(0.8886193,0.8021825,-0.8051059,0.8972684,411.80247,-8.668512)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
- cx="75.054749"
- cy="499.87418"
- fx="75.054749"
+ id="radialGradient16650"
+ xlink:href="#linearGradient14262"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.1650217"
fy="499.87418"
- r="3.1650217" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient30231"
+ fx="75.054749"
+ cy="499.87418"
+ cx="75.054749"
+ gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
gradientUnits="userSpaceOnUse"
- x1="441.48248"
- y1="105.03784"
- x2="446.73828"
- y2="111.74544" />
+ id="radialGradient32447"
+ xlink:href="#linearGradient18821"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24101"
- id="linearGradient30233"
+ y2="111.74544"
+ x2="446.73828"
+ y1="105.03784"
+ x1="441.48248"
gradientUnits="userSpaceOnUse"
- x1="445.37457"
- y1="112.86145"
- x2="425.92511"
- y2="84.928581" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient30231"
xlink:href="#linearGradient319"
- id="linearGradient30235"
- gradientUnits="userSpaceOnUse"
- x1="440.68439"
- y1="106.0996"
- x2="446.00906"
- y2="110.93529" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient30237"
+ y2="84.928581"
+ x2="425.92511"
+ y1="112.86145"
+ x1="445.37457"
gradientUnits="userSpaceOnUse"
- x1="440.34833"
- y1="105.74502"
- x2="445.36435"
- y2="110.27587" />
+ id="linearGradient30233"
+ xlink:href="#linearGradient24101"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient30239"
+ y2="110.93529"
+ x2="446.00906"
+ y1="106.0996"
+ x1="440.68439"
gradientUnits="userSpaceOnUse"
- x1="440.7211"
- y1="104.97093"
- x2="445.36435"
- y2="110.27587" />
+ id="linearGradient30235"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23302"
- id="linearGradient30241"
+ y2="110.27587"
+ x2="445.36435"
+ y1="105.74502"
+ x1="440.34833"
gradientUnits="userSpaceOnUse"
- x1="414.99771"
- y1="-35"
- x2="414.99771"
- y2="-36.625011" />
+ id="linearGradient30237"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24081"
- id="linearGradient30243"
+ y2="110.27587"
+ x2="445.36435"
+ y1="104.97093"
+ x1="440.7211"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-0.004608,0)"
- x1="416.00461"
- y1="-34"
- x2="415.94211"
- y2="-37.718761" />
+ id="linearGradient30239"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient30245"
+ y2="-36.625011"
+ x2="414.99771"
+ y1="-35"
+ x1="414.99771"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-0.004608,0)"
- x1="416.5"
- y1="-29.933779"
- x2="416.5"
- y2="-37.5" />
+ id="linearGradient30241"
+ xlink:href="#linearGradient23302"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20324"
- id="linearGradient30247"
+ y2="-37.718761"
+ x2="415.94211"
+ y1="-34"
+ x1="416.00461"
+ gradientTransform="translate(-0.004608,0)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-1,0)"
- x1="416.41162"
- y1="-34.342831"
- x2="416.46497"
- y2="-39.140816" />
+ id="linearGradient30243"
+ xlink:href="#linearGradient24081"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient30249"
+ y2="-37.5"
+ x2="416.5"
+ y1="-29.933779"
+ x1="416.5"
+ gradientTransform="translate(-0.004608,0)"
gradientUnits="userSpaceOnUse"
- x1="409.00003"
- y1="-40.99012"
- x2="413.49658"
- y2="-34.707108" />
+ id="linearGradient30245"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient30326"
+ y2="-39.140816"
+ x2="416.46497"
+ y1="-34.342831"
+ x1="416.41162"
+ gradientTransform="translate(-1,0)"
gradientUnits="userSpaceOnUse"
- x1="446.05634"
- y1="112.72269"
- x2="436.76331"
- y2="100.6615" />
+ id="linearGradient30247"
+ xlink:href="#linearGradient20324"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient30328"
+ y2="-34.707108"
+ x2="413.49658"
+ y1="-40.99012"
+ x1="409.00003"
gradientUnits="userSpaceOnUse"
- x1="440.03735"
- y1="103.53646"
- x2="446.73828"
- y2="111.74544" />
+ id="linearGradient30249"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient30330"
+ y2="100.6615"
+ x2="436.76331"
+ y1="112.72269"
+ x1="446.05634"
gradientUnits="userSpaceOnUse"
- x1="447.06949"
- y1="114.61743"
- x2="432.36887"
- y2="94.07222" />
+ id="linearGradient30326"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient30332"
+ y2="111.74544"
+ x2="446.73828"
+ y1="103.53646"
+ x1="440.03735"
gradientUnits="userSpaceOnUse"
- x1="438.92477"
- y1="103.46223"
- x2="446.00906"
- y2="110.93529" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient30328"
xlink:href="#linearGradient319"
- id="linearGradient30334"
- gradientUnits="userSpaceOnUse"
- x1="439.0434"
- y1="104.06953"
- x2="445.36435"
- y2="110.27587" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient30336"
+ y2="94.07222"
+ x2="432.36887"
+ y1="114.61743"
+ x1="447.06949"
gradientUnits="userSpaceOnUse"
- x1="439.04333"
- y1="104.0401"
- x2="445.36435"
- y2="110.27587" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient30330"
xlink:href="#linearGradient1610"
- id="linearGradient30338"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="110.93529"
+ x2="446.00906"
+ y1="103.46223"
+ x1="438.92477"
gradientUnits="userSpaceOnUse"
- x1="415.00003"
- y1="-33.99012"
- x2="415"
- y2="-36.25" />
+ id="linearGradient30332"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient30340"
+ y2="110.27587"
+ x2="445.36435"
+ y1="104.06953"
+ x1="439.0434"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-0.004608,0)"
- x1="415.41223"
- y1="-31.506163"
- x2="415.45193"
- y2="-37.520515" />
+ id="linearGradient30334"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient30342"
+ y2="110.27587"
+ x2="445.36435"
+ y1="104.0401"
+ x1="439.04333"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-0.004608,0)"
- x1="416.5"
- y1="-29.933779"
- x2="416.5"
- y2="-37.5" />
+ id="linearGradient30336"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient30344"
+ y2="-36.25"
+ x2="415"
+ y1="-33.99012"
+ x1="415.00003"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-1,0)"
- x1="416.5"
- y1="-33.8125"
- x2="416.46497"
- y2="-39.140816" />
+ id="linearGradient30338"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient30346"
+ y2="-37.520515"
+ x2="415.45193"
+ y1="-31.506163"
+ x1="415.41223"
+ gradientTransform="translate(-0.004608,0)"
gradientUnits="userSpaceOnUse"
- x1="409.00003"
- y1="-40.99012"
- x2="413.49658"
- y2="-34.707108" />
+ id="linearGradient30340"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient30348"
+ y2="-37.5"
+ x2="416.5"
+ y1="-29.933779"
+ x1="416.5"
+ gradientTransform="translate(-0.004608,0)"
gradientUnits="userSpaceOnUse"
- x1="408.75"
- y1="-35.483223"
- x2="408.75"
- y2="-40.000008" />
+ id="linearGradient30342"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient30394"
+ y2="-39.140816"
+ x2="416.46497"
+ y1="-33.8125"
+ x1="416.5"
+ gradientTransform="translate(-1,0)"
gradientUnits="userSpaceOnUse"
- x1="446.05634"
- y1="112.72269"
- x2="436.76331"
- y2="100.6615" />
+ id="linearGradient30344"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient30396"
+ y2="-34.707108"
+ x2="413.49658"
+ y1="-40.99012"
+ x1="409.00003"
gradientUnits="userSpaceOnUse"
- x1="440.03735"
- y1="103.53646"
- x2="446.73828"
- y2="111.74544" />
+ id="linearGradient30346"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient30398"
+ y2="-40.000008"
+ x2="408.75"
+ y1="-35.483223"
+ x1="408.75"
gradientUnits="userSpaceOnUse"
- x1="447.06949"
- y1="114.61743"
- x2="432.36887"
- y2="94.07222" />
+ id="linearGradient30348"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient30400"
+ y2="100.6615"
+ x2="436.76331"
+ y1="112.72269"
+ x1="446.05634"
gradientUnits="userSpaceOnUse"
- x1="438.92477"
- y1="103.46223"
- x2="446.00906"
- y2="110.93529" />
+ id="linearGradient30394"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="111.74544"
+ x2="446.73828"
+ y1="103.53646"
+ x1="440.03735"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient30396"
xlink:href="#linearGradient319"
- id="linearGradient30402"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="94.07222"
+ x2="432.36887"
+ y1="114.61743"
+ x1="447.06949"
gradientUnits="userSpaceOnUse"
- x1="439.0434"
- y1="104.06953"
- x2="445.36435"
- y2="110.27587" />
+ id="linearGradient30398"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient30404"
+ y2="110.93529"
+ x2="446.00906"
+ y1="103.46223"
+ x1="438.92477"
gradientUnits="userSpaceOnUse"
- x1="439.04333"
- y1="104.0401"
- x2="445.36435"
- y2="110.27587" />
+ id="linearGradient30400"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient30406"
+ y2="110.27587"
+ x2="445.36435"
+ y1="104.06953"
+ x1="439.0434"
gradientUnits="userSpaceOnUse"
- x1="415.00003"
- y1="-33.99012"
- x2="415"
- y2="-36.25" />
+ id="linearGradient30402"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient30408"
+ y2="110.27587"
+ x2="445.36435"
+ y1="104.0401"
+ x1="439.04333"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-0.004608,0)"
- x1="415.41223"
- y1="-31.506163"
- x2="415.45193"
- y2="-37.520515" />
+ id="linearGradient30404"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient30410"
+ y2="-36.25"
+ x2="415"
+ y1="-33.99012"
+ x1="415.00003"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-0.004608,0)"
- x1="416.5"
- y1="-29.933779"
- x2="416.5"
- y2="-37.5" />
+ id="linearGradient30406"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient30412"
+ y2="-37.520515"
+ x2="415.45193"
+ y1="-31.506163"
+ x1="415.41223"
+ gradientTransform="translate(-0.004608,0)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-1,0)"
- x1="416.5"
- y1="-33.8125"
- x2="416.46497"
- y2="-39.140816" />
+ id="linearGradient30408"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient30414"
+ y2="-37.5"
+ x2="416.5"
+ y1="-29.933779"
+ x1="416.5"
+ gradientTransform="translate(-0.004608,0)"
gradientUnits="userSpaceOnUse"
- x1="409.00003"
- y1="-40.99012"
- x2="413.49658"
- y2="-34.707108" />
+ id="linearGradient30410"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="-39.140816"
+ x2="416.46497"
+ y1="-33.8125"
+ x1="416.5"
+ gradientTransform="translate(-1,0)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient30412"
xlink:href="#linearGradient16500"
- id="linearGradient30416"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="-34.707108"
+ x2="413.49658"
+ y1="-40.99012"
+ x1="409.00003"
gradientUnits="userSpaceOnUse"
- x1="408.75"
- y1="-35.483223"
- x2="408.75"
- y2="-40.000008" />
+ id="linearGradient30414"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient17429"
+ y2="-40.000008"
+ x2="408.75"
+ y1="-35.483223"
+ x1="408.75"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.081988,0,0,1.0833333,-394.58897,440.54169)"
- x1="326.51352"
- y1="32.007874"
- x2="347.91187"
- y2="57.261913" />
+ id="linearGradient30416"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient17431"
+ y2="57.261913"
+ x2="347.91187"
+ y1="32.007874"
+ x1="326.51352"
+ gradientTransform="matrix(1.081988,0,0,1.0833333,-394.58897,440.54169)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.0983862,0,0,1.0999999,-400.00857,439.95001)"
- x1="317.30908"
- y1="22.7787"
+ id="linearGradient17429"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="38.161732"
x2="330.87869"
- y2="38.161732" />
+ y1="22.7787"
+ x1="317.30908"
+ gradientTransform="matrix(1.0983862,0,0,1.0999999,-400.00857,439.95001)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient17431"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<mask
- maskUnits="userSpaceOnUse"
- id="mask17570">
+ id="mask17570"
+ maskUnits="userSpaceOnUse">
<path
- sodipodi:nodetypes="cccc"
- style="fill:#ffffff;fill-rule:evenodd;stroke:none"
- d="m -44,358 0,14 14,-14 -14,0 z"
+ inkscape:connector-curvature="0"
id="path17572"
- inkscape:connector-curvature="0" />
+ d="m -44,358 0,14 14,-14 -14,0 z"
+ style="fill:#ffffff;fill-rule:evenodd;stroke:none"
+ sodipodi:nodetypes="cccc" />
</mask>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient18682"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8461524,0,0,0.9230835,365.8517,-147.63686)"
- x1="27.405855"
- y1="189.20862"
+ y2="248.37102"
x2="35.029804"
- y2="248.37102" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient18690"
+ y1="189.20862"
+ x1="27.405855"
+ gradientTransform="matrix(0.8461524,0,0,0.9230835,365.8517,-147.63686)"
gradientUnits="userSpaceOnUse"
- x1="29.972469"
- y1="164"
- x2="29.972469"
- y2="168"
- gradientTransform="translate(359.05264,-81.98142)" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient18682"
xlink:href="#linearGradient37542"
- id="linearGradient18752"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.923955,0,0,1,-18.1369,-168)"
- x1="30.435225"
- y1="202.99998"
- x2="30.435225"
- y2="251.99998" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient18756"
+ gradientTransform="translate(359.05264,-81.98142)"
+ y2="168"
+ x2="29.972469"
+ y1="164"
+ x1="29.972469"
gradientUnits="userSpaceOnUse"
- x1="5.9836898"
- y1="71.51989"
- x2="16.733877"
- y2="88"
- gradientTransform="matrix(1,0,0,1.2222204,0,-15.888744)" />
+ id="linearGradient18690"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient18779"
+ y2="251.99998"
+ x2="30.435225"
+ y1="202.99998"
+ x1="30.435225"
+ gradientTransform="matrix(0.923955,0,0,1,-18.1369,-168)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.6923077,0,0,-0.6923079,29.049874,351.11545)"
- x1="7.9951181"
- y1="264.90152"
- x2="32.267426"
- y2="237.9342" />
+ id="linearGradient18752"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient18823"
+ gradientTransform="matrix(1,0,0,1.2222204,0,-15.888744)"
+ y2="88"
+ x2="16.733877"
+ y1="71.51989"
+ x1="5.9836898"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-122.98388,276)"
- x1="-55.936718"
- y1="77.808868"
- x2="-55.844753"
- y2="84.217026" />
+ id="linearGradient18756"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient18831"
+ y2="237.9342"
+ x2="32.267426"
+ y1="264.90152"
+ x1="7.9951181"
+ gradientTransform="matrix(0.6923077,0,0,-0.6923079,29.049874,351.11545)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.5384613,0,0,0.538461,-189.69233,224.07704)"
- x1="29.142912"
- y1="161.42842"
- x2="29.142912"
- y2="252.42851" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient18779"
xlink:href="#linearGradient37542"
- id="linearGradient18841"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.462416,0,0,0.538461,-193.81309,224.07705)"
- x1="29.871567"
- y1="153.99983"
- x2="29.871567"
- y2="252.4285" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient18846"
+ y2="84.217026"
+ x2="-55.844753"
+ y1="77.808868"
+ x1="-55.936718"
+ gradientTransform="translate(-122.98388,276)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.462416,0,0,0.461541,-193.81309,236.42243)"
- x1="29.871567"
- y1="174.58366"
- x2="29.871567"
- y2="259.08319" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient18823"
xlink:href="#linearGradient319"
- id="linearGradient18854"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.2500001,0,0,2.2000001,-102.35484,177)"
- x1="-55.936718"
- y1="77.808868"
- x2="-55.844753"
- y2="84.217026" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient18858"
+ y2="252.42851"
+ x2="29.142912"
+ y1="161.42842"
+ x1="29.142912"
+ gradientTransform="matrix(0.5384613,0,0,0.538461,-189.69233,224.07704)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,0.8000001,-122.98388,285.5)"
- x1="-55.936718"
- y1="77.808868"
- x2="-55.844753"
- y2="84.217026" />
+ id="linearGradient18831"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient18862"
+ y2="252.4285"
+ x2="29.871567"
+ y1="153.99983"
+ x1="29.871567"
+ gradientTransform="matrix(0.462416,0,0,0.538461,-193.81309,224.07705)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(2.0000001,0,0,1.6000003,163.54205,53.499972)"
- x1="-60.266121"
- y1="74.0625"
- x2="-54.766121"
- y2="84.6875" />
+ id="linearGradient18841"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030"
- id="linearGradient32725"
+ y2="259.08319"
+ x2="29.871567"
+ y1="174.58366"
+ x1="29.871567"
+ gradientTransform="matrix(0.462416,0,0,0.461541,-193.81309,236.42243)"
gradientUnits="userSpaceOnUse"
- x1="-88.0625"
- y1="364"
- x2="-44.983891"
- y2="411.9375" />
+ id="linearGradient18846"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient32727"
+ y2="84.217026"
+ x2="-55.844753"
+ y1="77.808868"
+ x1="-55.936718"
+ gradientTransform="matrix(1.2500001,0,0,2.2000001,-102.35484,177)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9166695,0,0,0.9203753,-117.02574,313.78567)"
- x1="80.60067"
- y1="108.47212"
- x2="68.0271"
- y2="94.239906" />
+ id="linearGradient18854"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5060"
- id="linearGradient32729"
+ y2="84.217026"
+ x2="-55.844753"
+ y1="77.808868"
+ x1="-55.936718"
+ gradientTransform="matrix(1,0,0,0.8000001,-122.98388,285.5)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.6666675,0,0,0.6666633,-101.32265,336.66698)"
- x1="61.983898"
- y1="88.999977"
- x2="89.770271"
- y2="121.709" />
+ id="linearGradient18858"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="84.6875"
+ x2="-54.766121"
+ y1="74.0625"
+ x1="-60.266121"
+ gradientTransform="matrix(2.0000001,0,0,1.6000003,163.54205,53.499972)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient18862"
xlink:href="#linearGradient319"
- id="linearGradient32731"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="411.9375"
+ x2="-44.983891"
+ y1="364"
+ x1="-88.0625"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9998599,0,0,0.9960071,-122.97299,306.4115)"
- x1="61.465469"
- y1="88.058716"
- x2="86.00116"
- y2="112.03586" />
+ id="linearGradient32725"
+ xlink:href="#linearGradient9030"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient32749"
+ y2="94.239906"
+ x2="68.0271"
+ y1="108.47212"
+ x1="80.60067"
+ gradientTransform="matrix(0.9166695,0,0,0.9203753,-117.02574,313.78567)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.081988,0,0,1.0833333,-123.05997,-52.467545)"
- x1="326.72092"
- y1="33.927608"
- x2="352.03485"
- y2="60.463093" />
+ id="linearGradient32727"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient32751"
+ y2="121.709"
+ x2="89.770271"
+ y1="88.999977"
+ x1="61.983898"
+ gradientTransform="matrix(0.6666675,0,0,0.6666633,-101.32265,336.66698)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-15.983875,338)"
- x1="-46.417774"
- y1="1.9796312"
- x2="-21.988398"
- y2="27" />
+ id="linearGradient32729"
+ xlink:href="#linearGradient5060"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="112.03586"
+ x2="86.00116"
+ y1="88.058716"
+ x1="61.465469"
+ gradientTransform="matrix(0.9998599,0,0,0.9960071,-122.97299,306.4115)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient32731"
xlink:href="#linearGradient319"
- id="linearGradient32753"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="60.463093"
+ x2="352.03485"
+ y1="33.927608"
+ x1="326.72092"
+ gradientTransform="matrix(1.081988,0,0,1.0833333,-123.05997,-52.467545)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.0983862,0,0,1.0999999,-128.47957,-53.059225)"
- x1="324.13901"
- y1="28.882492"
- x2="333.96365"
- y2="39.250004" />
+ id="linearGradient32749"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient17135"
+ y2="27"
+ x2="-21.988398"
+ y1="1.9796312"
+ x1="-46.417774"
+ gradientTransform="translate(-15.983875,338)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(18,0)"
- x1="-51.6875"
- y1="442.6875"
- x2="-42.377892"
- y2="452.20007" />
+ id="linearGradient32751"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="39.250004"
+ x2="333.96365"
+ y1="28.882492"
+ x1="324.13901"
+ gradientTransform="matrix(1.0983862,0,0,1.0999999,-128.47957,-53.059225)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient32753"
xlink:href="#linearGradient319"
- id="linearGradient17177"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="452.20007"
+ x2="-42.377892"
+ y1="442.6875"
+ x1="-51.6875"
+ gradientTransform="translate(18,0)"
gradientUnits="userSpaceOnUse"
- x1="28.322077"
- y1="160.10768"
+ id="linearGradient17135"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="164.34546"
x2="32.679554"
- y2="164.34546" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5060"
- id="radialGradient17179"
+ y1="160.10768"
+ x1="28.322077"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-6.8461644e-7,-1.8,1.1087755,0.00352366,-193.46828,187.54551)"
- cx="4.351675"
- cy="81.592964"
- fx="4.351675"
- fy="81.592964"
- r="5" />
+ id="linearGradient17177"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient18344"
- id="radialGradient17181"
+ r="5"
+ fy="81.592964"
+ fx="4.351675"
+ cy="81.592964"
+ cx="4.351675"
+ gradientTransform="matrix(-6.8461644e-7,-1.8,1.1087755,0.00352366,-193.46828,187.54551)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.5123107,0.9569981,-0.5028837,0.7946898,-131.57281,-236.33663)"
- cx="244.14325"
- cy="-14.13948"
- fx="244.14325"
+ id="radialGradient17179"
+ xlink:href="#linearGradient5060"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.4000001"
fy="-14.13948"
- r="3.4000001" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient17214"
+ fx="244.14325"
+ cy="-14.13948"
+ cx="244.14325"
+ gradientTransform="matrix(1.5123107,0.9569981,-0.5028837,0.7946898,-131.57281,-236.33663)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.923955,0,0,1,-18.1369,-168)"
- x1="29.352921"
- y1="199"
- x2="29.352921"
- y2="250" />
+ id="radialGradient17181"
+ xlink:href="#linearGradient18344"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient17216"
+ y2="250"
+ x2="29.352921"
+ y1="199"
+ x1="29.352921"
+ gradientTransform="matrix(0.923955,0,0,1,-18.1369,-168)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,1.2222204,0,-15.888744)"
- x1="5.9836898"
- y1="71.51989"
- x2="16.733877"
- y2="88" />
+ id="linearGradient17214"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="linearGradient17218"
+ y2="88"
+ x2="16.733877"
+ y1="71.51989"
+ x1="5.9836898"
+ gradientTransform="matrix(1,0,0,1.2222204,0,-15.888744)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.2859748,0,0,1,-272.87621,148)"
- x1="348.06064"
- y1="220.55545"
- x2="363.71661"
- y2="239.94608" />
+ id="linearGradient17216"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="linearGradient17220"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.4289612,0,0,1,-326.93899,144.5)"
- x1="348.06064"
- y1="220.55545"
+ y2="239.94608"
x2="363.71661"
- y2="239.94608" />
+ y1="220.55545"
+ x1="348.06064"
+ gradientTransform="matrix(0.2859748,0,0,1,-272.87621,148)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient17218"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient17222"
+ y2="239.94608"
+ x2="363.71661"
+ y1="220.55545"
+ x1="348.06064"
+ gradientTransform="matrix(0.4289612,0,0,1,-326.93899,144.5)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.923955,0,0,1,-18.1369,-168)"
- x1="29.352921"
- y1="199"
- x2="29.352921"
- y2="250" />
+ id="linearGradient17220"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient17224"
+ y2="250"
+ x2="29.352921"
+ y1="199"
+ x1="29.352921"
+ gradientTransform="matrix(0.923955,0,0,1,-18.1369,-168)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,1.2222204,0,-15.888744)"
- x1="5.9836898"
- y1="71.51989"
- x2="16.733877"
- y2="88" />
+ id="linearGradient17222"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="linearGradient17226"
+ y2="88"
+ x2="16.733877"
+ y1="71.51989"
+ x1="5.9836898"
+ gradientTransform="matrix(1,0,0,1.2222204,0,-15.888744)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.2868892,0,0,1,-644.69395,148)"
- x1="348.06064"
- y1="220.55545"
- x2="363.71661"
- y2="239.94608" />
+ id="linearGradient17224"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient17242"
+ y2="239.94608"
+ x2="363.71661"
+ y1="220.55545"
+ x1="348.06064"
+ gradientTransform="matrix(1.2868892,0,0,1,-644.69395,148)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.923955,0,0,1,-18.1369,-168)"
- x1="9.5404434"
- y1="223.47467"
- x2="36.247395"
- y2="249.62102" />
+ id="linearGradient17226"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient17244"
+ y2="249.62102"
+ x2="36.247395"
+ y1="223.47467"
+ x1="9.5404434"
+ gradientTransform="matrix(0.923955,0,0,1,-18.1369,-168)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,1.2222204,0,-15.888744)"
- x1="5.9836898"
- y1="71.51989"
- x2="16.733877"
- y2="88" />
+ id="linearGradient17242"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient18712"
+ y2="88"
+ x2="16.733877"
+ y1="71.51989"
+ x1="5.9836898"
+ gradientTransform="matrix(1,0,0,1.2222204,0,-15.888744)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8167109,0,0,0.8433415,239.34332,-149.78578)"
- x1="103.65562"
- y1="49.547874"
- x2="120.79755"
- y2="57.84819" />
+ id="linearGradient17244"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient18721"
+ y2="57.84819"
+ x2="120.79755"
+ y1="49.547874"
+ x1="103.65562"
+ gradientTransform="matrix(0.8167109,0,0,0.8433415,239.34332,-149.78578)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1.004219,0,0,0.980922,244.3928,19.4113)"
- x1="-88.73024"
- y1="-120.6127"
- x2="-78.787354"
- y2="-128.30418" />
+ id="linearGradient18712"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient31320"
- id="linearGradient18728"
+ y2="-128.30418"
+ x2="-78.787354"
+ y1="-120.6127"
+ x1="-88.73024"
+ gradientTransform="matrix(-1.004219,0,0,0.980922,244.3928,19.4113)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1.004219,0,0,0.980922,222.97812,19.5574)"
- x1="68.688324"
- y1="51.42366"
- x2="72.671516"
- y2="55.501457" />
+ id="linearGradient18721"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient14262"
- id="linearGradient18765"
+ y2="55.501457"
+ x2="72.671516"
+ y1="51.42366"
+ x1="68.688324"
+ gradientTransform="matrix(-1.004219,0,0,0.980922,222.97812,19.5574)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1.004219,0,0,0.980922,309.42934,-349.44584)"
- x1="-26.207859"
- y1="252.77303"
- x2="-5.4963508"
- y2="253.15045" />
+ id="linearGradient18728"
+ xlink:href="#linearGradient31320"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient34157"
- id="linearGradient35488"
+ y2="253.15045"
+ x2="-5.4963508"
+ y1="252.77303"
+ x1="-26.207859"
+ gradientTransform="matrix(-1.004219,0,0,0.980922,309.42934,-349.44584)"
gradientUnits="userSpaceOnUse"
- x1="270.66064"
- y1="68.113258"
- x2="257.38638"
- y2="81.382545" />
+ id="linearGradient18765"
+ xlink:href="#linearGradient14262"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient35490"
+ y2="81.382545"
+ x2="257.38638"
+ y1="68.113258"
+ x1="270.66064"
gradientUnits="userSpaceOnUse"
- x1="256.38586"
- y1="80.515495"
+ id="linearGradient35488"
+ xlink:href="#linearGradient34157"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="74.562462"
x2="262.43726"
- y2="74.562462" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient29149"
- id="radialGradient35492"
+ y1="80.515495"
+ x1="256.38586"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
- cx="75.217888"
- cy="500.66806"
- fx="75.217888"
- fy="500.66806"
- r="3.1650217" />
+ id="linearGradient35490"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient18821"
- id="radialGradient35494"
- gradientUnits="userSpaceOnUse"
+ r="3.1650217"
+ fy="500.66806"
+ fx="75.217888"
+ cy="500.66806"
+ cx="75.217888"
gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
- cx="75.554794"
- cy="500.26215"
- fx="75.554794"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient35492"
+ xlink:href="#linearGradient29149"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.1650217"
fy="500.26215"
- r="3.1650217" />
+ fx="75.554794"
+ cy="500.26215"
+ cx="75.554794"
+ gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient35494"
+ xlink:href="#linearGradient18821"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="radialGradient35967"
- cx="257.35309"
- cy="79.598709"
- fx="257.35309"
- fy="79.598709"
- r="3.779551"
+ gradientTransform="matrix(0.656002,0,0,0.656002,88.923481,27.003843)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.656002,0,0,0.656002,88.923481,27.003843)" />
+ r="3.779551"
+ fy="79.598709"
+ fx="257.35309"
+ cy="79.598709"
+ cx="257.35309"
+ id="radialGradient35967"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<clipPath
- clipPathUnits="userSpaceOnUse"
- id="clipPath18524">
+ id="clipPath18524"
+ clipPathUnits="userSpaceOnUse">
<path
- inkscape:export-ydpi="90"
- inkscape:export-xdpi="90"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
- transform="matrix(-1.1435655,0,0,1.1436475,512.11415,45.72091)"
- d="m 262,78.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
- sodipodi:ry="3.5"
- sodipodi:rx="3.5"
- sodipodi:cy="78.5"
- sodipodi:cx="258.5"
- id="path18526"
- style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.69954133;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;display:inline"
- sodipodi:type="arc"
+ inkscape:transform-center-y="-6.3853012"
inkscape:transform-center-x="-6.3473305"
- inkscape:transform-center-y="-6.3853012" />
+ sodipodi:type="arc"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.69954133;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;display:inline"
+ id="path18526"
+ sodipodi:cx="258.5"
+ sodipodi:cy="78.5"
+ sodipodi:rx="3.5"
+ sodipodi:ry="3.5"
+ d="m 262,78.5 a 3.5,3.5 0 1 1 -7,0 3.5,3.5 0 1 1 7,0 z"
+ transform="matrix(-1.1435655,0,0,1.1436475,512.11415,45.72091)"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
</clipPath>
<mask
- maskUnits="userSpaceOnUse"
- id="mask18634">
+ id="mask18634"
+ maskUnits="userSpaceOnUse">
<path
- sodipodi:nodetypes="ccccscc"
- style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- d="m 207,134 0,14 11,0 0,-7.5625 c -1.97252,-0.24738 -3.5,-1.89814 -3.5,-3.9375 0,-0.94675 0.35614,-1.81444 0.90625,-2.5 L 207,134 z"
+ inkscape:connector-curvature="0"
id="path18636"
- inkscape:connector-curvature="0" />
+ d="m 207,134 0,14 11,0 0,-7.5625 c -1.97252,-0.24738 -3.5,-1.89814 -3.5,-3.9375 0,-0.94675 0.35614,-1.81444 0.90625,-2.5 L 207,134 z"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ sodipodi:nodetypes="ccccscc" />
</mask>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient18478"
- gradientUnits="userSpaceOnUse"
- x1="172.5625"
- y1="601.5"
+ y2="585.28772"
x2="159.13864"
- y2="585.28772" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient18480"
+ y1="601.5"
+ x1="172.5625"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-97.983877,565.25)"
- x1="249.64528"
- y1="1.5973248"
- x2="271.98389"
- y2="35.75" />
+ id="linearGradient18478"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient18739"
+ y2="35.75"
+ x2="271.98389"
+ y1="1.5973248"
+ x1="249.64528"
+ gradientTransform="translate(-97.983877,565.25)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.707654,0,0,0.707942,43.55464,-148.13985)"
- x1="35.597904"
- y1="158.14117"
- x2="16.173666"
- y2="173.23431" />
+ id="linearGradient18480"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient4343"
- id="linearGradient18741"
+ y2="173.23431"
+ x2="16.173666"
+ y1="158.14117"
+ x1="35.597904"
+ gradientTransform="matrix(0.707654,0,0,0.707942,43.55464,-148.13985)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.5990464,-0.03583042,0.03242597,0.6546824,59.652868,-253.61658)"
- x1="-12.264804"
- y1="333.22653"
- x2="-10.869003"
- y2="334.86029" />
+ id="linearGradient18739"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient18743"
+ y2="334.86029"
+ x2="-10.869003"
+ y1="333.22653"
+ x1="-12.264804"
+ gradientTransform="matrix(0.5990464,-0.03583042,0.03242597,0.6546824,59.652868,-253.61658)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(250.01612,148)"
- x1="-190.37566"
- y1="-180.13821"
- x2="-189.34792"
- y2="-182" />
+ id="linearGradient18741"
+ xlink:href="#linearGradient4343"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient19045"
+ y2="-182"
+ x2="-189.34792"
+ y1="-180.13821"
+ x1="-190.37566"
+ gradientTransform="translate(250.01612,148)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,1.172144,-461,-82.584001)"
- x1="42.033173"
- y1="164.51399"
- x2="75.32457"
- y2="164.51399" />
+ id="linearGradient18743"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient19047"
+ y2="164.51399"
+ x2="75.32457"
+ y1="164.51399"
+ x1="42.033173"
+ gradientTransform="matrix(1,0,0,1.172144,-461,-82.584001)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(298,-53.749881)"
- x1="118.1319"
- y1="157.11609"
- x2="85.577972"
- y2="157.54283" />
+ id="linearGradient19045"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient19049"
+ y2="157.54283"
+ x2="85.577972"
+ y1="157.11609"
+ x1="118.1319"
+ gradientTransform="translate(298,-53.749881)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.3333334,0,0,0.8333334,767.51613,327.08335)"
- x1="-285.65732"
- y1="-274.23453"
- x2="-279.44821"
- y2="-268.04858" />
+ id="linearGradient19047"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient35583"
+ y2="-268.04858"
+ x2="-279.44821"
+ y1="-274.23453"
+ x1="-285.65732"
+ gradientTransform="matrix(1.3333334,0,0,0.8333334,767.51613,327.08335)"
gradientUnits="userSpaceOnUse"
- x1="-0.78523314"
- y1="-33.408295"
- x2="4.952816"
- y2="-27.882322" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient19049"
xlink:href="#linearGradient319"
- id="linearGradient35585"
- gradientUnits="userSpaceOnUse"
- x1="-0.78523314"
- y1="-33.408295"
- x2="3.1666665"
- y2="-29.550003" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient35587"
+ y2="-27.882322"
+ x2="4.952816"
+ y1="-33.408295"
+ x1="-0.78523314"
gradientUnits="userSpaceOnUse"
- x1="-3.5"
- y1="-35.5"
- x2="2.6932251"
- y2="-29.488832" />
+ id="linearGradient35583"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient35589"
+ y2="-29.550003"
+ x2="3.1666665"
+ y1="-33.408295"
+ x1="-0.78523314"
gradientUnits="userSpaceOnUse"
- x1="4.9341426"
- y1="-29.678047"
- x2="4.8398785e-16"
- y2="-32.351803" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient35585"
xlink:href="#linearGradient319"
- id="linearGradient35591"
- gradientUnits="userSpaceOnUse"
- x1="0.5079475"
- y1="-32.317398"
- x2="4.2000003"
- y2="-28.597046" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5060"
- id="linearGradient35593"
+ y2="-29.488832"
+ x2="2.6932251"
+ y1="-35.5"
+ x1="-3.5"
gradientUnits="userSpaceOnUse"
- x1="2.8144052"
- y1="-28.1"
- x2="-4.375"
- y2="-36.441402" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient35587"
xlink:href="#linearGradient319"
- id="linearGradient35595"
- gradientUnits="userSpaceOnUse"
- x1="-2.7708333"
- y1="-35.5"
- x2="1.1666667"
- y2="-32" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient35740"
+ y2="-32.351803"
+ x2="4.8398785e-16"
+ y1="-29.678047"
+ x1="4.9341426"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.707654,0,0,0.707942,-206.46148,-296.13985)"
- x1="35.597904"
- y1="158.14117"
- x2="10.490564"
- y2="176.41806" />
+ id="linearGradient35589"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient35742"
+ y2="-28.597046"
+ x2="4.2000003"
+ y1="-32.317398"
+ x1="0.5079475"
gradientUnits="userSpaceOnUse"
- x1="58.060974"
- y1="-23.721956"
- x2="40"
- y2="-35" />
+ id="linearGradient35591"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient35744"
+ y2="-36.441402"
+ x2="-4.375"
+ y1="-28.1"
+ x1="2.8144052"
gradientUnits="userSpaceOnUse"
- x1="46.1875"
- y1="-28.59375"
- x2="41.099998"
- y2="-33.59375" />
+ id="linearGradient35593"
+ xlink:href="#linearGradient5060"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient36116"
- id="linearGradient35746"
+ y2="-32"
+ x2="1.1666667"
+ y1="-35.5"
+ x1="-2.7708333"
gradientUnits="userSpaceOnUse"
- x1="46"
- y1="-32"
- x2="43.883884"
- y2="-33.939339" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient35595"
xlink:href="#linearGradient319"
- id="linearGradient35748"
- gradientUnits="userSpaceOnUse"
- x1="41"
- y1="-29"
- x2="43"
- y2="-27" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient35750"
+ y2="176.41806"
+ x2="10.490564"
+ y1="158.14117"
+ x1="35.597904"
+ gradientTransform="matrix(0.707654,0,0,0.707942,-206.46148,-296.13985)"
gradientUnits="userSpaceOnUse"
- x1="48.662914"
- y1="-27.071922"
- x2="43.47097"
- y2="-32.337086" />
+ id="linearGradient35740"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient35752"
+ y2="-35"
+ x2="40"
+ y1="-23.721956"
+ x1="58.060974"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(6.3,-4.7)"
- x1="39.200001"
- y1="-30.799999"
- x2="41.200001"
- y2="-28.640625" />
+ id="linearGradient35742"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient35754"
+ y2="-33.59375"
+ x2="41.099998"
+ y1="-28.59375"
+ x1="46.1875"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(5.315625,-3.75)"
- x1="39.200001"
- y1="-30.799999"
- x2="41.325001"
- y2="-28.765625" />
+ id="linearGradient35744"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient35756"
+ y2="-33.939339"
+ x2="43.883884"
+ y1="-32"
+ x1="46"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(3.3,0.3)"
- x1="38.700001"
- y1="-31.299999"
- x2="40.012501"
- y2="-29.799999" />
+ id="linearGradient35746"
+ xlink:href="#linearGradient36116"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient35772"
+ y2="-27"
+ x2="43"
+ y1="-29"
+ x1="41"
gradientUnits="userSpaceOnUse"
- x1="51.912914"
- y1="-24.696922"
- x2="40.75"
- y2="-35.75"
- gradientTransform="translate(-0.75,4.75)" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient35748"
xlink:href="#linearGradient319"
- id="linearGradient51774"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="-32.337086"
+ x2="43.47097"
+ y1="-27.071922"
+ x1="48.662914"
gradientUnits="userSpaceOnUse"
- x1="135.32962"
- y1="120.04005"
- x2="130.7244"
- y2="116.31882" />
+ id="linearGradient35750"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="-28.640625"
+ x2="41.200001"
+ y1="-30.799999"
+ x1="39.200001"
+ gradientTransform="translate(6.3,-4.7)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient35752"
xlink:href="#linearGradient319"
- id="linearGradient51776"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="-28.765625"
+ x2="41.325001"
+ y1="-30.799999"
+ x1="39.200001"
+ gradientTransform="translate(5.315625,-3.75)"
gradientUnits="userSpaceOnUse"
- x1="130.9015"
- y1="115.23484"
- x2="143.88347"
- y2="129.27184" />
+ id="linearGradient35754"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient8864"
- id="linearGradient51804"
+ y2="-29.799999"
+ x2="40.012501"
+ y1="-31.299999"
+ x1="38.700001"
+ gradientTransform="translate(3.3,0.3)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9993234,0,0,1.0050357,111.43697,300.37199)"
- x1="107.78085"
- y1="50.778313"
- x2="111.53449"
- y2="46.679707" />
+ id="linearGradient35756"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient51806"
+ gradientTransform="translate(-0.75,4.75)"
+ y2="-35.75"
+ x2="40.75"
+ y1="-24.696922"
+ x1="51.912914"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9993234,0,0,1.0050357,111.55698,300.497)"
- x1="115.37703"
- y1="51.021076"
- x2="112.87534"
- y2="51.021076" />
+ id="linearGradient35772"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient51808"
+ y2="116.31882"
+ x2="130.7244"
+ y1="120.04005"
+ x1="135.32962"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9993234,0,0,1.0050357,111.35699,300.55457)"
- x1="110.57378"
- y1="50.963791"
- x2="108.07208"
- y2="50.963791" />
+ id="linearGradient51774"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="129.27184"
+ x2="143.88347"
+ y1="115.23484"
+ x1="130.9015"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient51776"
xlink:href="#linearGradient319"
- id="linearGradient51810"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="46.679707"
+ x2="111.53449"
+ y1="50.778313"
+ x1="107.78085"
+ gradientTransform="matrix(0.9993234,0,0,1.0050357,111.43697,300.37199)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.5192341,-0.5192341,0.5184617,0.5184617,100.36783,218.31526)"
- x1="-13.691219"
- y1="241.78653"
- x2="0.92051411"
- y2="237.27565" />
+ id="linearGradient51804"
+ xlink:href="#linearGradient8864"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient51812"
+ y2="51.021076"
+ x2="112.87534"
+ y1="51.021076"
+ x1="115.37703"
+ gradientTransform="matrix(0.9993234,0,0,1.0050357,111.55698,300.497)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.5192341,-0.5192341,0.5184617,0.5184617,100.13133,218.33837)"
- x1="-9.0782614"
- y1="249.96617"
- x2="-2.9318311"
- y2="240.68927" />
+ id="linearGradient51806"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="50.963791"
+ x2="108.07208"
+ y1="50.963791"
+ x1="110.57378"
+ gradientTransform="matrix(0.9993234,0,0,1.0050357,111.35699,300.55457)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient51808"
xlink:href="#linearGradient37542"
- id="linearGradient68937"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="237.27565"
+ x2="0.92051411"
+ y1="241.78653"
+ x1="-13.691219"
+ gradientTransform="matrix(0.5192341,-0.5192341,0.5184617,0.5184617,100.36783,218.31526)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(439.89375,-187.79999)"
- x1="-5.3499999"
- y1="251.51265"
- x2="-8.5254431"
- y2="248.125" />
+ id="linearGradient51810"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient68939"
+ y2="240.68927"
+ x2="-2.9318311"
+ y1="249.96617"
+ x1="-9.0782614"
+ gradientTransform="matrix(0.5192341,-0.5192341,0.5184617,0.5184617,100.13133,218.33837)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(439.89375,-187.79999)"
- x1="-10.35"
- y1="245.89999"
- x2="-13.091064"
- y2="242.8" />
+ id="linearGradient51812"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="248.125"
+ x2="-8.5254431"
+ y1="251.51265"
+ x1="-5.3499999"
+ gradientTransform="translate(439.89375,-187.79999)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient68937"
xlink:href="#linearGradient37542"
- id="linearGradient68941"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="242.8"
+ x2="-13.091064"
+ y1="245.89999"
+ x1="-10.35"
+ gradientTransform="translate(439.89375,-187.79999)"
gradientUnits="userSpaceOnUse"
- x1="-41.065678"
- y1="240.10526"
- x2="-15.758821"
- y2="244.11874" />
+ id="linearGradient68939"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient68943"
+ y2="244.11874"
+ x2="-15.758821"
+ y1="240.10526"
+ x1="-41.065678"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(440.2082,-188.0039)"
- x1="-10.991813"
- y1="237.9574"
- x2="-7.0786314"
- y2="246.7774" />
+ id="linearGradient68941"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient68945"
+ y2="246.7774"
+ x2="-7.0786314"
+ y1="237.9574"
+ x1="-10.991813"
+ gradientTransform="translate(440.2082,-188.0039)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(439.9582,-188.0039)"
- x1="-5.1338587"
- y1="244.08765"
- x2="-14.193665"
- y2="251.35759" />
+ id="linearGradient68943"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient8864"
- id="linearGradient68947"
+ y2="251.35759"
+ x2="-14.193665"
+ y1="244.08765"
+ x1="-5.1338587"
+ gradientTransform="translate(439.9582,-188.0039)"
gradientUnits="userSpaceOnUse"
- x1="-15.6"
- y1="247.38559"
- x2="-3.321322"
- y2="245.68124" />
+ id="linearGradient68945"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient68949"
+ y2="245.68124"
+ x2="-3.321322"
+ y1="247.38559"
+ x1="-15.6"
gradientUnits="userSpaceOnUse"
- x1="-5.3499999"
- y1="251.51265"
- x2="-8.7065439"
- y2="248.125" />
+ id="linearGradient68947"
+ xlink:href="#linearGradient8864"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient68951"
+ y2="248.125"
+ x2="-8.7065439"
+ y1="251.51265"
+ x1="-5.3499999"
gradientUnits="userSpaceOnUse"
- x1="-10.35"
- y1="245.89999"
- x2="-13.125"
- y2="242.81946" />
+ id="linearGradient68949"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient68953"
+ y2="242.81946"
+ x2="-13.125"
+ y1="245.89999"
+ x1="-10.35"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0.25,0.2058042)"
- x1="-12.538609"
- y1="240.79787"
- x2="0.92051411"
- y2="237.27565" />
+ id="linearGradient68951"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient68955"
+ y2="237.27565"
+ x2="0.92051411"
+ y1="240.79787"
+ x1="-12.538609"
+ gradientTransform="translate(0.25,0.2058042)"
gradientUnits="userSpaceOnUse"
- x1="-7.20822"
- y1="247.4906"
- x2="-1.7751017"
- y2="239.86711" />
+ id="linearGradient68953"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient69009"
+ y2="239.86711"
+ x2="-1.7751017"
+ y1="247.4906"
+ x1="-7.20822"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.5466301,0,0,1.6489946,-293.01107,-16.485383)"
- x1="582"
- y1="49.294117"
+ id="linearGradient68955"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="47.176472"
x2="582"
- y2="47.176472" />
+ y1="49.294117"
+ x1="582"
+ gradientTransform="matrix(1.5466301,0,0,1.6489946,-293.01107,-16.485383)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient69009"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<mask
- maskUnits="userSpaceOnUse"
- id="mask69005">
+ id="mask69005"
+ maskUnits="userSpaceOnUse">
<rect
- style="fill:url(#linearGradient69009);fill-opacity:1;display:inline"
- id="rect69007"
- width="24.746082"
- height="26.383913"
+ y="39.580433"
x="596.30127"
- y="39.580433" />
+ height="26.383913"
+ width="24.746082"
+ id="rect69007"
+ style="fill:url(#linearGradient69009);fill-opacity:1;display:inline" />
</mask>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="linearGradient20269"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(12.999999,359)"
- x1="247"
- y1="99"
+ y2="94"
x2="247"
- y2="94" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient20275"
+ y1="99"
+ x1="247"
+ gradientTransform="translate(12.999999,359)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(15.081669,359)"
- x1="245.63066"
- y1="106.28436"
+ id="linearGradient20269"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="94.440376"
x2="245.80791"
- y2="94.440376" />
+ y1="106.28436"
+ x1="245.63066"
+ gradientTransform="translate(15.081669,359)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient20275"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient20283"
- x1="263.5"
- y1="455.25"
- x2="263.5"
+ gradientUnits="userSpaceOnUse"
y2="460.5"
- gradientUnits="userSpaceOnUse" />
- <linearGradient
- inkscape:collect="always"
+ x2="263.5"
+ y1="455.25"
+ x1="263.5"
+ id="linearGradient20283"
xlink:href="#linearGradient319"
- id="linearGradient20303"
- gradientUnits="userSpaceOnUse"
- x1="264"
- y1="452"
- x2="264"
- y2="460.6622"
- gradientTransform="matrix(1,0,0,0.6,-5,182.8)" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ gradientTransform="matrix(1,0,0,0.6,-5,182.8)"
+ y2="460.6622"
+ x2="264"
+ y1="452"
+ x1="264"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient20303"
xlink:href="#linearGradient319"
- id="linearGradient20309"
- x1="268"
- y1="462"
- x2="256"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientUnits="userSpaceOnUse"
y2="459"
- gradientUnits="userSpaceOnUse" />
+ x2="256"
+ y1="462"
+ x1="268"
+ id="linearGradient20309"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#aigrd2"
- id="radialGradient21565"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.2798768,0,0,0.279916,6.0465962,-0.3619733)"
- cx="20.892099"
- cy="114.5684"
- fx="20.892099"
+ r="5.256"
fy="114.5684"
- r="5.256" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#aigrd2"
- id="radialGradient21567"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.2798768,0,0,0.279916,6.0465962,-0.3619733)"
- cx="20.892099"
- cy="114.5684"
fx="20.892099"
+ cy="114.5684"
+ cx="20.892099"
+ gradientTransform="matrix(0.2798768,0,0,0.279916,6.0465962,-0.3619733)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient21565"
+ xlink:href="#aigrd2"
+ inkscape:collect="always" />
+ <radialGradient
+ r="5.256"
fy="114.5684"
- r="5.256" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient21594"
+ fx="20.892099"
+ cy="114.5684"
+ cx="20.892099"
+ gradientTransform="matrix(0.2798768,0,0,0.279916,6.0465962,-0.3619733)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(2.4126967,0,0,2.7035619,-536.07088,379.29465)"
- x1="236.94902"
- y1="-14.103641"
- x2="276.89801"
- y2="32.076183" />
+ id="radialGradient21567"
+ xlink:href="#aigrd2"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5060"
- id="linearGradient21596"
+ y2="32.076183"
+ x2="276.89801"
+ y1="-14.103641"
+ x1="236.94902"
+ gradientTransform="matrix(2.4126967,0,0,2.7035619,-536.07088,379.29465)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-47.00001,58.00194)"
- x1="160.14388"
- y1="376.27383"
- x2="174.29811"
- y2="383.69843" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient21594"
xlink:href="#linearGradient1610"
- id="linearGradient21647"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(2.4126967,0,0,2.7035619,-536.07088,379.29465)"
- x1="236.94902"
- y1="-14.103641"
- x2="276.89801"
- y2="31.515814" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5060"
- id="linearGradient21649"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-47.00001,58.00194)"
- x1="160.14388"
- y1="376.27383"
+ y2="383.69843"
x2="174.29811"
- y2="383.69843" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient21977"
+ y1="376.27383"
+ x1="160.14388"
+ gradientTransform="translate(-47.00001,58.00194)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(2.4126967,0,0,2.7035619,-536.07088,379.29465)"
- x1="236.94902"
- y1="-14.103641"
+ id="linearGradient21596"
+ xlink:href="#linearGradient5060"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="31.515814"
x2="276.89801"
- y2="31.515814" />
+ y1="-14.103641"
+ x1="236.94902"
+ gradientTransform="matrix(2.4126967,0,0,2.7035619,-536.07088,379.29465)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient21647"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="383.69843"
+ x2="174.29811"
+ y1="376.27383"
+ x1="160.14388"
+ gradientTransform="translate(-47.00001,58.00194)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient21649"
xlink:href="#linearGradient5060"
- id="linearGradient21979"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="31.515814"
+ x2="276.89801"
+ y1="-14.103641"
+ x1="236.94902"
+ gradientTransform="matrix(2.4126967,0,0,2.7035619,-536.07088,379.29465)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-47.00001,58.00194)"
- x1="160.14388"
- y1="376.27383"
+ id="linearGradient21977"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="383.69843"
x2="174.29811"
- y2="383.69843" />
+ y1="376.27383"
+ x1="160.14388"
+ gradientTransform="translate(-47.00001,58.00194)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient21979"
+ xlink:href="#linearGradient5060"
+ inkscape:collect="always" />
<clipPath
- clipPathUnits="userSpaceOnUse"
- id="clipPath22590">
+ id="clipPath22590"
+ clipPathUnits="userSpaceOnUse">
<rect
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.20000005;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- id="rect22592"
- width="12"
- height="14"
+ y="490.00012"
x="-30"
- y="490.00012" />
+ height="14"
+ width="12"
+ id="rect22592"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.20000005;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
</clipPath>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient23595"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,1.1666667,-737,357.33333)"
- x1="771.0965"
- y1="354.28479"
+ y2="358.85715"
x2="772"
- y2="358.85715" />
+ y1="354.28479"
+ x1="771.0965"
+ gradientTransform="matrix(1,0,0,1.1666667,-737,357.33333)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient23595"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<mask
- maskUnits="userSpaceOnUse"
- id="mask23591">
+ id="mask23591"
+ maskUnits="userSpaceOnUse">
<rect
- mask="none"
- style="fill:url(#linearGradient23595);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- id="rect23593"
- width="11"
- height="14"
+ y="768"
x="30"
- y="768" />
+ height="14"
+ width="11"
+ id="rect23593"
+ style="fill:url(#linearGradient23595);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ mask="none" />
</mask>
<clipPath
- clipPathUnits="userSpaceOnUse"
- id="clipPath23877">
+ id="clipPath23877"
+ clipPathUnits="userSpaceOnUse">
<rect
- transform="scale(1,-1)"
- y="-540"
- x="952"
- height="6"
- width="15"
+ style="fill:#ff0000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect23879"
- style="fill:#ff0000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ width="15"
+ height="6"
+ x="952"
+ y="-540"
+ transform="scale(1,-1)" />
</clipPath>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient23978"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(2.4126967,0,0,2.7035619,-536.07088,379.29465)"
- x1="236.94902"
- y1="-14.103641"
+ y2="31.515814"
x2="276.89801"
- y2="31.515814" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5060"
- id="linearGradient23980"
+ y1="-14.103641"
+ x1="236.94902"
+ gradientTransform="matrix(2.4126967,0,0,2.7035619,-536.07088,379.29465)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-47.00001,58.00194)"
- x1="160.14388"
- y1="376.27383"
- x2="174.29811"
- y2="383.69843" />
+ id="linearGradient23978"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient31320"
- id="linearGradient23982"
+ y2="383.69843"
+ x2="174.29811"
+ y1="376.27383"
+ x1="160.14388"
+ gradientTransform="translate(-47.00001,58.00194)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,0.733333,808.99997,-697.8)"
- x1="150.5"
- y1="239.9987"
- x2="150.5"
- y2="237" />
+ id="linearGradient23980"
+ xlink:href="#linearGradient5060"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient29485"
- id="linearGradient23986"
+ y2="237"
+ x2="150.5"
+ y1="239.9987"
+ x1="150.5"
+ gradientTransform="matrix(1,0,0,0.733333,808.99997,-697.8)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,1,1,0,715,364)"
- x1="147.0625"
- y1="243.76387"
- x2="142.9375"
- y2="243.69914" />
+ id="linearGradient23982"
+ xlink:href="#linearGradient31320"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient30777"
- id="linearGradient23988"
+ y2="243.69914"
+ x2="142.9375"
+ y1="243.76387"
+ x1="147.0625"
+ gradientTransform="matrix(0,1,1,0,715,364)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,1.2857143,364,645.14283)"
- x1="148"
- y1="244.11113"
+ id="linearGradient23986"
+ xlink:href="#linearGradient29485"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="244.11113"
x2="144"
- y2="244.11113" />
+ y1="244.11113"
+ x1="148"
+ gradientTransform="matrix(1,0,0,1.2857143,364,645.14283)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient23988"
+ xlink:href="#linearGradient30777"
+ inkscape:collect="always" />
<linearGradient
- id="linearGradient3564"
- inkscape:collect="always">
+ inkscape:collect="always"
+ id="linearGradient3564">
<stop
- id="stop3566"
+ style="stop-color:white;stop-opacity:1;"
offset="0"
- style="stop-color:white;stop-opacity:1;" />
+ id="stop3566" />
<stop
- id="stop3568"
+ style="stop-color:white;stop-opacity:0;"
offset="1"
- style="stop-color:white;stop-opacity:0;" />
+ id="stop3568" />
</linearGradient>
<linearGradient
id="linearGradient39155">
<stop
- id="stop39157"
+ style="stop-color:white;stop-opacity:1;"
offset="0"
- style="stop-color:white;stop-opacity:1;" />
+ id="stop39157" />
<stop
- id="stop39159"
+ style="stop-color:#dadada;stop-opacity:1;"
offset="1"
- style="stop-color:#dadada;stop-opacity:1;" />
+ id="stop39159" />
</linearGradient>
<linearGradient
- id="linearGradient39171"
- inkscape:collect="always">
+ inkscape:collect="always"
+ id="linearGradient39171">
<stop
- id="stop39173"
+ style="stop-color:white;stop-opacity:1;"
offset="0"
- style="stop-color:white;stop-opacity:1;" />
+ id="stop39173" />
<stop
- id="stop39175"
+ style="stop-color:white;stop-opacity:0;"
offset="1"
- style="stop-color:white;stop-opacity:0;" />
+ id="stop39175" />
</linearGradient>
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient18821"
- id="radialGradient21442"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
- cx="75.554794"
- cy="500.26215"
- fx="75.554794"
+ r="3.1650217"
fy="500.26215"
- r="3.1650217" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient39155"
- id="linearGradient21444"
+ fx="75.554794"
+ cy="500.26215"
+ cx="75.554794"
+ gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
gradientUnits="userSpaceOnUse"
- x1="31.1875"
- y1="18.875"
- x2="29.875"
- y2="34.375" />
+ id="radialGradient21442"
+ xlink:href="#linearGradient18821"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient3564"
- id="linearGradient21446"
+ y2="34.375"
+ x2="29.875"
+ y1="18.875"
+ x1="31.1875"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.06818845,0,0,0.06818845,22.51112,27.02885)"
- x1="185.9903"
- y1="193.33229"
+ id="linearGradient21444"
+ xlink:href="#linearGradient39155"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="-458.05771"
x2="190.46461"
- y2="-458.05771" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient39171"
- id="radialGradient21448"
+ y1="193.33229"
+ x1="185.9903"
+ gradientTransform="matrix(0.06818845,0,0,0.06818845,22.51112,27.02885)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.647222,0,0,1.26792,-15.47413,-5.79794)"
- cx="26.109201"
- cy="19.668886"
- fx="26.109201"
+ id="linearGradient21446"
+ xlink:href="#linearGradient3564"
+ inkscape:collect="always" />
+ <radialGradient
+ r="20.278975"
fy="19.668886"
- r="20.278975" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient22274"
+ fx="26.109201"
+ cy="19.668886"
+ cx="26.109201"
+ gradientTransform="matrix(1.647222,0,0,1.26792,-15.47413,-5.79794)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(2.4126967,0,0,2.7035619,-536.07088,379.29465)"
- x1="236.94902"
- y1="-14.103641"
- x2="276.89801"
- y2="32.076183" />
+ id="radialGradient21448"
+ xlink:href="#linearGradient39171"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5060"
- id="linearGradient22276"
+ y2="32.076183"
+ x2="276.89801"
+ y1="-14.103641"
+ x1="236.94902"
+ gradientTransform="matrix(2.4126967,0,0,2.7035619,-536.07088,379.29465)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-47.00001,58.00194)"
- x1="160.14388"
- y1="376.27383"
- x2="174.29811"
- y2="383.69843" />
+ id="linearGradient22274"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient38718"
+ y2="383.69843"
+ x2="174.29811"
+ y1="376.27383"
+ x1="160.14388"
+ gradientTransform="translate(-47.00001,58.00194)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8167109,0,0,0.8433415,239.34332,-149.78578)"
- x1="104.90227"
- y1="53.227627"
- x2="121.22078"
- y2="56.357628" />
+ id="linearGradient22276"
+ xlink:href="#linearGradient5060"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient38721"
+ y2="56.357628"
+ x2="121.22078"
+ y1="53.227627"
+ x1="104.90227"
+ gradientTransform="matrix(0.8167109,0,0,0.8433415,239.34332,-149.78578)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(207,-246.99988)"
- x1="-56.5"
- y1="342.0625"
- x2="-49"
- y2="341" />
+ id="linearGradient38718"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient39281"
+ y2="341"
+ x2="-49"
+ y1="342.0625"
+ x1="-56.5"
+ gradientTransform="translate(207,-246.99988)"
gradientUnits="userSpaceOnUse"
- x1="171"
- y1="71"
- x2="177"
- y2="77" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient38721"
xlink:href="#linearGradient319"
- id="linearGradient39283"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.1944456,0,0,1.2000039,-34.222431,-14.950295)"
- x1="175.17659"
- y1="74.972061"
- x2="176.40117"
- y2="76.182281" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient39285"
+ y2="77"
+ x2="177"
+ y1="71"
+ x1="171"
gradientUnits="userSpaceOnUse"
- x1="165.19363"
- y1="64.53186"
- x2="176.15442"
- y2="76.210785" />
+ id="linearGradient39281"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient39287"
+ y2="76.182281"
+ x2="176.40117"
+ y1="74.972061"
+ x1="175.17659"
+ gradientTransform="matrix(1.1944456,0,0,1.2000039,-34.222431,-14.950295)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.1718933,0,0,1.127086,-30.219387,-9.3173845)"
- x1="172.30418"
- y1="69.838829"
- x2="176.84593"
- y2="75.947906" />
+ id="linearGradient39283"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient39289"
+ y2="76.210785"
+ x2="176.15442"
+ y1="64.53186"
+ x1="165.19363"
gradientUnits="userSpaceOnUse"
- x1="171"
- y1="70"
- x2="177"
- y2="77" />
+ id="linearGradient39285"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient39291"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.1718933,0,0,1.127086,-30.219387,-9.3173845)"
- x1="175.1628"
- y1="74.125008"
+ y2="75.947906"
x2="176.84593"
- y2="75.947906" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient39293"
+ y1="69.838829"
+ x1="172.30418"
+ gradientTransform="matrix(1.1718933,0,0,1.127086,-30.219387,-9.3173845)"
gradientUnits="userSpaceOnUse"
- x1="171"
- y1="70"
- x2="177"
- y2="77" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient39287"
xlink:href="#linearGradient319"
- id="linearGradient39295"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.1718933,0,0,1.127086,-30.219387,-9.3173845)"
- x1="175.1628"
- y1="74.125008"
- x2="176.84593"
- y2="75.947906" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient39008"
+ y2="77"
+ x2="177"
+ y1="70"
+ x1="171"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8167109,0,0,0.8433415,239.34332,-149.78578)"
- x1="104.90227"
- y1="53.227627"
- x2="117.12428"
- y2="61.720783" />
+ id="linearGradient39289"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient39010"
+ y2="75.947906"
+ x2="176.84593"
+ y1="74.125008"
+ x1="175.1628"
+ gradientTransform="matrix(1.1718933,0,0,1.127086,-30.219387,-9.3173845)"
gradientUnits="userSpaceOnUse"
- x1="-56.5"
- y1="340.32199"
- x2="-56.5"
- y2="348" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient39291"
xlink:href="#linearGradient319"
- id="linearGradient39012"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,13)"
- x1="-56.8125"
- y1="329.06256"
- x2="-47.214466"
- y2="329.26965" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient39014"
+ y2="77"
+ x2="177"
+ y1="70"
+ x1="171"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8167109,0,0,0.8433415,239.34332,-149.78578)"
- x1="104.90227"
- y1="53.227627"
- x2="117.12428"
- y2="61.720783" />
+ id="linearGradient39293"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient39016"
+ y2="75.947906"
+ x2="176.84593"
+ y1="74.125008"
+ x1="175.1628"
+ gradientTransform="matrix(1.1718933,0,0,1.127086,-30.219387,-9.3173845)"
gradientUnits="userSpaceOnUse"
- x1="-56.5"
- y1="340.32199"
- x2="-56.5"
- y2="348" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient39295"
xlink:href="#linearGradient319"
- id="linearGradient39018"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="61.720783"
+ x2="117.12428"
+ y1="53.227627"
+ x1="104.90227"
+ gradientTransform="matrix(0.8167109,0,0,0.8433415,239.34332,-149.78578)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,13)"
- x1="-56.8125"
- y1="329.06256"
- x2="-47.214466"
- y2="329.26965" />
+ id="linearGradient39008"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="348"
+ x2="-56.5"
+ y1="340.32199"
+ x1="-56.5"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient39010"
xlink:href="#linearGradient319"
- id="linearGradient39020"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="329.26965"
+ x2="-47.214466"
+ y1="329.06256"
+ x1="-56.8125"
+ gradientTransform="translate(0,13)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8167109,0,0,0.8433415,239.34332,-149.78578)"
- x1="104.90227"
- y1="53.227627"
+ id="linearGradient39012"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="61.720783"
x2="117.12428"
- y2="61.720783" />
+ y1="53.227627"
+ x1="104.90227"
+ gradientTransform="matrix(0.8167109,0,0,0.8433415,239.34332,-149.78578)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient39014"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="348"
+ x2="-56.5"
+ y1="340.32199"
+ x1="-56.5"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient39016"
xlink:href="#linearGradient319"
- id="linearGradient39022"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="329.26965"
+ x2="-47.214466"
+ y1="329.06256"
+ x1="-56.8125"
+ gradientTransform="translate(0,13)"
gradientUnits="userSpaceOnUse"
- x1="-56.5"
- y1="340.32199"
- x2="-56.5"
- y2="348" />
+ id="linearGradient39018"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="61.720783"
+ x2="117.12428"
+ y1="53.227627"
+ x1="104.90227"
+ gradientTransform="matrix(0.8167109,0,0,0.8433415,239.34332,-149.78578)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient39020"
xlink:href="#linearGradient319"
- id="linearGradient39024"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="348"
+ x2="-56.5"
+ y1="340.32199"
+ x1="-56.5"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,0.7972867,61.99991,2.2419)"
- x1="260.67468"
- y1="108.02418"
+ id="linearGradient39022"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="126.37626"
x2="273.9993"
- y2="126.37626" />
+ y1="108.02418"
+ x1="260.67468"
+ gradientTransform="matrix(1,0,0,0.7972867,61.99991,2.2419)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient39024"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient39026"
- x1="1127.7983"
- y1="448.375"
- x2="1153.0486"
+ gradientUnits="userSpaceOnUse"
y2="430.25"
- gradientUnits="userSpaceOnUse" />
+ x2="1153.0486"
+ y1="448.375"
+ x1="1127.7983"
+ id="linearGradient39026"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient14418"
- id="linearGradient57417"
- gradientUnits="userSpaceOnUse"
- x1="146.82516"
- y1="134.65511"
+ y2="117.10313"
x2="130.10634"
- y2="117.10313" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="linearGradient57419"
+ y1="134.65511"
+ x1="146.82516"
gradientUnits="userSpaceOnUse"
- x1="139.37782"
- y1="126.3454"
- x2="131.71249"
- y2="118.34238" />
+ id="linearGradient57417"
+ xlink:href="#linearGradient14418"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient57421"
+ y2="118.34238"
+ x2="131.71249"
+ y1="126.3454"
+ x1="139.37782"
gradientUnits="userSpaceOnUse"
- x1="125.01582"
- y1="110.86718"
- x2="132.46898"
- y2="119.54019" />
+ id="linearGradient57419"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient57423"
+ y2="119.54019"
+ x2="132.46898"
+ y1="110.86718"
+ x1="125.01582"
gradientUnits="userSpaceOnUse"
- x1="127.60629"
- y1="112.12571"
- x2="140.72693"
- y2="126.72997" />
+ id="linearGradient57421"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient57454"
+ y2="126.72997"
+ x2="140.72693"
+ y1="112.12571"
+ x1="127.60629"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(258.00306,-231.00101)"
- x1="75.25"
- y1="393.25"
+ id="linearGradient57423"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="391.5"
x2="73.5"
- y2="391.5" />
+ y1="393.25"
+ x1="75.25"
+ gradientTransform="translate(258.00306,-231.00101)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient57454"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<mask
- maskUnits="userSpaceOnUse"
- id="mask57450">
+ id="mask57450"
+ maskUnits="userSpaceOnUse">
<rect
- y="154.99899"
- x="326.00305"
- height="15"
- width="15"
+ style="fill:url(#linearGradient57454);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect57452"
- style="fill:url(#linearGradient57454);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ width="15"
+ height="15"
+ x="326.00305"
+ y="154.99899" />
</mask>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient22891"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.728189,0,0,1.727271,-357.88848,243.63713)"
- x1="174.99828"
- y1="12.918247"
+ y2="12.551482"
x2="167.59578"
- y2="12.551482" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient30124"
- id="linearGradient22893"
- gradientUnits="userSpaceOnUse"
+ y1="12.918247"
+ x1="174.99828"
gradientTransform="matrix(1.728189,0,0,1.727271,-357.88848,243.63713)"
- x1="169.47711"
- y1="10.424105"
- x2="169.47711"
- y2="8.1183796" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient30124"
- id="linearGradient22895"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1.728189,0,0,1.727271,237.88848,243.63713)"
- x1="169.41847"
- y1="10.306772"
- x2="169.4877"
- y2="7.9604731" />
+ id="linearGradient22891"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient22897"
+ y2="8.1183796"
+ x2="169.47711"
+ y1="10.424105"
+ x1="169.47711"
+ gradientTransform="matrix(1.728189,0,0,1.727271,-357.88848,243.63713)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-215.00008,249.00001)"
- x1="145.00008"
- y1="11.99999"
- x2="160.31258"
- y2="19.34374" />
+ id="linearGradient22893"
+ xlink:href="#linearGradient30124"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient22899"
+ y2="7.9604731"
+ x2="169.4877"
+ y1="10.306772"
+ x1="169.41847"
+ gradientTransform="matrix(-1.728189,0,0,1.727271,237.88848,243.63713)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-215.00008,249.00001)"
- x1="149.00008"
- y1="10.924165"
- x2="171.37508"
- y2="19.12499" />
+ id="linearGradient22895"
+ xlink:href="#linearGradient30124"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient32842"
- id="linearGradient22901"
+ y2="19.34374"
+ x2="160.31258"
+ y1="11.99999"
+ x1="145.00008"
+ gradientTransform="translate(-215.00008,249.00001)"
gradientUnits="userSpaceOnUse"
- x1="-68.25"
- y1="263"
- x2="-56"
- y2="265.53439" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient22897"
xlink:href="#linearGradient319"
- id="linearGradient22903"
- gradientUnits="userSpaceOnUse"
- x1="-66"
- y1="264"
- x2="-57"
- y2="264.75" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient32998"
- id="linearGradient22905"
+ y2="19.12499"
+ x2="171.37508"
+ y1="10.924165"
+ x1="149.00008"
+ gradientTransform="translate(-215.00008,249.00001)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.728189,0,0,1.727271,-357.88848,243.63713)"
- x1="176.42079"
- y1="12.946938"
- x2="169.47711"
- y2="12.36799" />
+ id="linearGradient22899"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient22933"
+ y2="265.53439"
+ x2="-56"
+ y1="263"
+ x1="-68.25"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(15.081669,359)"
- x1="245.63066"
- y1="106.28436"
- x2="245.80791"
- y2="94.440376" />
+ id="linearGradient22901"
+ xlink:href="#linearGradient32842"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="264.75"
+ x2="-57"
+ y1="264"
+ x1="-66"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient22903"
xlink:href="#linearGradient319"
- id="linearGradient22935"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="12.36799"
+ x2="169.47711"
+ y1="12.946938"
+ x1="176.42079"
+ gradientTransform="matrix(1.728189,0,0,1.727271,-357.88848,243.63713)"
gradientUnits="userSpaceOnUse"
- x1="268"
- y1="462"
- x2="256"
- y2="459" />
+ id="linearGradient22905"
+ xlink:href="#linearGradient32998"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="linearGradient22937"
+ y2="94.440376"
+ x2="245.80791"
+ y1="106.28436"
+ x1="245.63066"
+ gradientTransform="translate(15.081669,359)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(12.999999,359)"
- x1="247"
- y1="99"
- x2="247"
- y2="94" />
+ id="linearGradient22933"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="459"
+ x2="256"
+ y1="462"
+ x1="268"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient22935"
xlink:href="#linearGradient319"
- id="linearGradient22939"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="94"
+ x2="247"
+ y1="99"
+ x1="247"
+ gradientTransform="translate(12.999999,359)"
gradientUnits="userSpaceOnUse"
- x1="263.5"
- y1="455.25"
- x2="263.5"
- y2="460.5" />
+ id="linearGradient22937"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient22941"
+ y2="460.5"
+ x2="263.5"
+ y1="455.25"
+ x1="263.5"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,0.6,-5,182.8)"
- x1="264"
- y1="452"
- x2="264"
- y2="460.6622" />
+ id="linearGradient22939"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="460.6622"
+ x2="264"
+ y1="452"
+ x1="264"
+ gradientTransform="matrix(1,0,0,0.6,-5,182.8)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient22941"
xlink:href="#linearGradient319"
- id="linearGradient22970"
- x1="-197.84375"
- y1="399.90625"
- x2="-191"
- y2="409"
- gradientUnits="userSpaceOnUse" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient19625"
- id="linearGradient23241"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-6,0)"
- x1="480.09564"
- y1="163.08553"
- x2="476.76578"
- y2="162.94037" />
+ y2="409"
+ x2="-191"
+ y1="399.90625"
+ x1="-197.84375"
+ id="linearGradient22970"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030"
- id="linearGradient23243"
+ y2="162.94037"
+ x2="476.76578"
+ y1="163.08553"
+ x1="480.09564"
+ gradientTransform="translate(-6,0)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(342.00029,383.00889)"
- x1="123.36729"
- y1="-219.24783"
+ id="linearGradient23241"
+ xlink:href="#linearGradient19625"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="-218.00888"
x2="134.30893"
- y2="-218.00888" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient12678"
- id="radialGradient23245"
+ y1="-219.24783"
+ x1="123.36729"
+ gradientTransform="translate(342.00029,383.00889)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.0982561,0,0,1.2662999,-45.858153,-42.45126)"
- cx="470.15939"
- cy="164.46814"
- fx="470.15939"
+ id="linearGradient23243"
+ xlink:href="#linearGradient9030"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.500145"
fy="164.46814"
- r="3.500145" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient23247"
+ fx="470.15939"
+ cy="164.46814"
+ cx="470.15939"
+ gradientTransform="matrix(1.0982561,0,0,1.2662999,-45.858153,-42.45126)"
gradientUnits="userSpaceOnUse"
- x1="128.7561"
- y1="115.77483"
- x2="132.35237"
- y2="118.69846" />
+ id="radialGradient23245"
+ xlink:href="#linearGradient12678"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030"
- id="linearGradient23250"
+ y2="118.69846"
+ x2="132.35237"
+ y1="115.77483"
+ x1="128.7561"
gradientUnits="userSpaceOnUse"
- x1="127.30917"
- y1="111.48133"
- x2="138.30522"
- y2="124.69373" />
+ id="linearGradient23247"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient23445"
+ y2="124.69373"
+ x2="138.30522"
+ y1="111.48133"
+ x1="127.30917"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-6,0)"
- x1="480.09564"
- y1="163.08553"
- x2="475.50031"
- y2="162.92206" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient23250"
xlink:href="#linearGradient9030"
- id="linearGradient23447"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(342.00029,383.00889)"
- x1="123.36729"
- y1="-219.24783"
- x2="134.30893"
- y2="-218.00888" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient23531"
+ y2="162.92206"
+ x2="475.50031"
+ y1="163.08553"
+ x1="480.09564"
+ gradientTransform="translate(-6,0)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.728189,0,0,1.727271,-142.8884,-5.3628832)"
- x1="172.37032"
- y1="12.147777"
- x2="175.38158"
- y2="15.699567" />
+ id="linearGradient23445"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient23533"
+ y2="-218.00888"
+ x2="134.30893"
+ y1="-219.24783"
+ x1="123.36729"
+ gradientTransform="translate(342.00029,383.00889)"
gradientUnits="userSpaceOnUse"
- x1="155.82454"
- y1="16.845156"
- x2="158.41653"
- y2="19.99999" />
+ id="linearGradient23447"
+ xlink:href="#linearGradient9030"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient40843"
+ y2="15.699567"
+ x2="175.38158"
+ y1="12.147777"
+ x1="172.37032"
+ gradientTransform="matrix(1.728189,0,0,1.727271,-142.8884,-5.3628832)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.727201,9.075096e-6,0,1.728246,-147.7149,-10.37485)"
- x1="171.03941"
- y1="11.121979"
- x2="175.33569"
- y2="16.202652" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient23531"
xlink:href="#linearGradient23974"
- id="linearGradient40845"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.728189,0,0,1.727271,-142.8884,-5.3628832)"
- x1="172.18394"
- y1="11.912162"
- x2="176.46956"
- y2="16.427906" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient40847"
+ y2="19.99999"
+ x2="158.41653"
+ y1="16.845156"
+ x1="155.82454"
gradientUnits="userSpaceOnUse"
- x1="156.00008"
- y1="16.99999"
- x2="159.00008"
- y2="19.99999" />
+ id="linearGradient23533"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="16.202652"
+ x2="175.33569"
+ y1="11.121979"
+ x1="171.03941"
+ gradientTransform="matrix(1.727201,9.075096e-6,0,1.728246,-147.7149,-10.37485)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient40843"
xlink:href="#linearGradient23974"
- id="linearGradient40965"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="16.427906"
+ x2="176.46956"
+ y1="11.912162"
+ x1="172.18394"
+ gradientTransform="matrix(1.728189,0,0,1.727271,-142.8884,-5.3628832)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-20,14)"
- x1="62.107086"
- y1="223.54628"
- x2="96.812675"
- y2="258.38593" />
+ id="linearGradient40845"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient32842"
- id="linearGradient40967"
+ y2="19.99999"
+ x2="159.00008"
+ y1="16.99999"
+ x1="156.00008"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-21,0)"
- x1="79.04213"
- y1="253.5"
- x2="60.155113"
- y2="234.7775" />
+ id="linearGradient40847"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="258.38593"
+ x2="96.812675"
+ y1="223.54628"
+ x1="62.107086"
+ gradientTransform="translate(-20,14)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient40965"
xlink:href="#linearGradient23974"
- id="linearGradient24098"
- x1="208.25"
- y1="-133.89581"
- x2="204.01923"
- y2="-111.15749"
- gradientUnits="userSpaceOnUse" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient23510"
+ y2="234.7775"
+ x2="60.155113"
+ y1="253.5"
+ x1="79.04213"
+ gradientTransform="translate(-21,0)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.1000194,0,0,1.0998287,-4.3008215,-8.6726798)"
- x1="47.655102"
- y1="93.805557"
- x2="59.057678"
- y2="105.27895" />
+ id="linearGradient40967"
+ xlink:href="#linearGradient32842"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient23512"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.728189,0,0,1.727271,-142.53857,-4.802156)"
- x1="110.16959"
- y1="57.061836"
- x2="117.55341"
- y2="64.995972" />
+ y2="-111.15749"
+ x2="204.01923"
+ y1="-133.89581"
+ x1="208.25"
+ id="linearGradient24098"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="105.27895"
+ x2="59.057678"
+ y1="93.805557"
+ x1="47.655102"
+ gradientTransform="matrix(1.1000194,0,0,1.0998287,-4.3008215,-8.6726798)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient23510"
xlink:href="#linearGradient319"
- id="linearGradient23514"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="64.995972"
+ x2="117.55341"
+ y1="57.061836"
+ x1="110.16959"
+ gradientTransform="matrix(1.728189,0,0,1.727271,-142.53857,-4.802156)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.1000194,0,0,1.0998287,-4.3010161,-8.6726854)"
- x1="47.612946"
- y1="93.555946"
- x2="54.252415"
- y2="100.44998" />
+ id="linearGradient23512"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient23550"
+ y2="100.44998"
+ x2="54.252415"
+ y1="93.555946"
+ x1="47.612946"
+ gradientTransform="matrix(1.1000194,0,0,1.0998287,-4.3010161,-8.6726854)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(1,0.01738631)"
- x1="468.07968"
- y1="275.27036"
- x2="510"
- y2="266.99997" />
+ id="linearGradient23514"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient18105"
- id="linearGradient23555"
+ y2="266.99997"
+ x2="510"
+ y1="275.27036"
+ x1="468.07968"
+ gradientTransform="translate(1,0.01738631)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(1,3.959006e-5)"
- x1="492.95264"
- y1="267.42996"
- x2="496.73859"
- y2="270.36874" />
+ id="linearGradient23550"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient23581"
+ y2="270.36874"
+ x2="496.73859"
+ y1="267.42996"
+ x1="492.95264"
+ gradientTransform="translate(1,3.959006e-5)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9993234,0,0,1.0050357,404.07104,216.722)"
- x1="116.75796"
- y1="52.264809"
- x2="103.18628"
- y2="55.747272" />
+ id="linearGradient23555"
+ xlink:href="#linearGradient18105"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient21327"
- id="linearGradient23585"
+ y2="55.747272"
+ x2="103.18628"
+ y1="52.264809"
+ x1="116.75796"
+ gradientTransform="matrix(0.9993234,0,0,1.0050357,404.07104,216.722)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(1,-1.0000037)"
- x1="500.71924"
- y1="270.24997"
+ id="linearGradient23581"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="274"
x2="477"
- y2="274" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient32842"
- id="radialGradient23610"
+ y1="270.24997"
+ x1="500.71924"
+ gradientTransform="translate(1,-1.0000037)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.5274943,0,0,0.7696585,194.81546,86.715119)"
- cx="412.10059"
- cy="375.96332"
- fx="412.10059"
- fy="375.96332"
- r="4.4262571" />
+ id="linearGradient23585"
+ xlink:href="#linearGradient21327"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24343"
- id="radialGradient23612"
+ r="4.4262571"
+ fy="375.96332"
+ fx="412.10059"
+ cy="375.96332"
+ cx="412.10059"
+ gradientTransform="matrix(0.5274943,0,0,0.7696585,194.81546,86.715119)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.0009003,-1.5278593,1.1592123,0.7594114,-59.938837,957.7287)"
- cx="409.55594"
- cy="52.367992"
- fx="409.55594"
+ id="radialGradient23610"
+ xlink:href="#linearGradient32842"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.8798895"
fy="52.367992"
- r="3.8798895" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient23562"
+ fx="409.55594"
+ cy="52.367992"
+ cx="409.55594"
+ gradientTransform="matrix(1.0009003,-1.5278593,1.1592123,0.7594114,-59.938837,957.7287)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.1004102,0,0,1.0993832,461.68129,182.37748)"
- x1="47.612946"
- y1="93.555946"
- x2="56.524509"
- y2="101.25028" />
+ id="radialGradient23612"
+ xlink:href="#linearGradient24343"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient23565"
+ y2="101.25028"
+ x2="56.524509"
+ y1="93.555946"
+ x1="47.612946"
+ gradientTransform="matrix(1.1004102,0,0,1.0993832,461.68129,182.37748)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.728803,0,0,1.7265713,323.39462,186.24644)"
- x1="115.45872"
- y1="58.869785"
- x2="106.20376"
- y2="58.354706" />
+ id="linearGradient23562"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient22847"
+ y2="58.354706"
+ x2="106.20376"
+ y1="58.869785"
+ x1="115.45872"
+ gradientTransform="matrix(1.728803,0,0,1.7265713,323.39462,186.24644)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.728803,0,0,1.7265713,347.39462,166.24644)"
- x1="110.54202"
- y1="56.645538"
- x2="115.53827"
- y2="63.567348" />
+ id="linearGradient23565"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient22849"
+ y2="63.567348"
+ x2="115.53827"
+ y1="56.645538"
+ x1="110.54202"
+ gradientTransform="matrix(1.728803,0,0,1.7265713,347.39462,166.24644)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.2445337,0,0,1.5876961,523.20711,115.4619)"
- x1="47.655102"
- y1="93.805557"
- x2="59.057678"
- y2="105.27895" />
+ id="linearGradient22847"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient22851"
+ y2="105.27895"
+ x2="59.057678"
+ y1="93.805557"
+ x1="47.655102"
+ gradientTransform="matrix(0.2445337,0,0,1.5876961,523.20711,115.4619)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.1004102,0,0,1.0993832,503.28129,157.47747)"
- x1="29.506693"
- y1="100.66651"
- x2="34.276955"
- y2="105.98901" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient22849"
xlink:href="#linearGradient319"
- id="linearGradient24052"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8167109,0,0,0.8433415,239.34332,-149.78578)"
- x1="104.90227"
- y1="53.227627"
- x2="117.12428"
- y2="61.720783" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient24054"
+ y2="105.98901"
+ x2="34.276955"
+ y1="100.66651"
+ x1="29.506693"
+ gradientTransform="matrix(1.1004102,0,0,1.0993832,503.28129,157.47747)"
gradientUnits="userSpaceOnUse"
- x1="-56.5"
- y1="340.32199"
- x2="-56.5"
- y2="348" />
+ id="linearGradient22851"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="61.720783"
+ x2="117.12428"
+ y1="53.227627"
+ x1="104.90227"
+ gradientTransform="matrix(0.8167109,0,0,0.8433415,239.34332,-149.78578)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient24052"
xlink:href="#linearGradient319"
- id="linearGradient24056"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="348"
+ x2="-56.5"
+ y1="340.32199"
+ x1="-56.5"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,13)"
- x1="-56.8125"
- y1="329.06256"
+ id="linearGradient24054"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="329.26965"
x2="-47.214466"
- y2="329.26965" />
+ y1="329.06256"
+ x1="-56.8125"
+ gradientTransform="translate(0,13)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient24056"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient24066"
- x1="202.5"
- y1="143.84116"
- x2="202.5"
- y2="132.60213"
+ gradientTransform="translate(-259,202)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-259,202)" />
+ y2="132.60213"
+ x2="202.5"
+ y1="143.84116"
+ x1="202.5"
+ id="linearGradient24066"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="radialGradient23738"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.050372,0,0,1.050372,-3.551238,-0.730396)"
- cx="70.5"
- cy="14.5"
- fx="70.5"
+ r="1.5"
fy="14.5"
- r="1.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient23750"
+ fx="70.5"
+ cy="14.5"
+ cx="70.5"
+ gradientTransform="matrix(1.050372,0,0,1.050372,-3.551238,-0.730396)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,1.172144,59.49999,53.45766)"
- x1="445.5"
- y1="148.90862"
- x2="433.5"
- y2="148.69533" />
+ id="radialGradient23738"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient23752"
+ y2="148.69533"
+ x2="433.5"
+ y1="148.90862"
+ x1="445.5"
+ gradientTransform="matrix(1,0,0,1.172144,59.49999,53.45766)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.6499984,0,0,0.5439483,434.02514,137.87435)"
- x1="113.71248"
- y1="158.24995"
- x2="91.499992"
- y2="158.24994" />
+ id="linearGradient23750"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient23754"
+ y2="158.24994"
+ x2="91.499992"
+ y1="158.24995"
+ x1="113.71248"
+ gradientTransform="matrix(0.6499984,0,0,0.5439483,434.02514,137.87435)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.0052083,0,0,0.5057472,778.49218,365.83334)"
- x1="-285.65732"
- y1="-274.23453"
- x2="-279.44821"
- y2="-268.04858" />
+ id="linearGradient23752"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient23914"
+ y2="-268.04858"
+ x2="-279.44821"
+ y1="-274.23453"
+ x1="-285.65732"
+ gradientTransform="matrix(1.0052083,0,0,0.5057472,778.49218,365.83334)"
gradientUnits="userSpaceOnUse"
- x1="29.200638"
- y1="160.18758"
+ id="linearGradient23754"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="164.13913"
x2="32.928555"
- y2="164.13913" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5060"
- id="radialGradient23916"
+ y1="160.18758"
+ x1="29.200638"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.02887268,-1.2550276,0.795821,0.01830762,8.763469,168.20647)"
- cx="11.708446"
- cy="81.275032"
- fx="11.708446"
- fy="81.275032"
- r="5" />
+ id="linearGradient23914"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5060"
- id="radialGradient23918"
+ r="5"
+ fy="81.275032"
+ fx="11.708446"
+ cy="81.275032"
+ cx="11.708446"
+ gradientTransform="matrix(0.02887268,-1.2550276,0.795821,0.01830762,8.763469,168.20647)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.01269957,-0.9297674,1.1086869,0.01514236,-16.51473,165.70609)"
- cx="4.7455525"
- cy="82.433929"
- fx="4.7455525"
+ id="radialGradient23916"
+ xlink:href="#linearGradient5060"
+ inkscape:collect="always" />
+ <radialGradient
+ r="5"
fy="82.433929"
- r="5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient24460"
+ fx="4.7455525"
+ cy="82.433929"
+ cx="4.7455525"
+ gradientTransform="matrix(0.01269957,-0.9297674,1.1086869,0.01514236,-16.51473,165.70609)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(383,-37.999994)"
- x1="-80"
- y1="151"
+ id="radialGradient23918"
+ xlink:href="#linearGradient5060"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="152.24998"
x2="-80"
- y2="152.24998" />
+ y1="151"
+ x1="-80"
+ gradientTransform="translate(383,-37.999994)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient24460"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<mask
- maskUnits="userSpaceOnUse"
- id="mask24456">
+ id="mask24456"
+ maskUnits="userSpaceOnUse">
<rect
- y="108"
- x="299"
- height="17"
- width="7"
- id="rect24458"
+ mask="none"
style="fill:url(#linearGradient24460);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- mask="none" />
+ id="rect24458"
+ width="7"
+ height="17"
+ x="299"
+ y="108" />
</mask>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient24470"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(360,-142.95536)"
- x1="-80"
- y1="151"
+ y2="152.24998"
x2="-80"
- y2="152.24998" />
+ y1="151"
+ x1="-80"
+ gradientTransform="translate(360,-142.95536)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient24470"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<mask
- maskUnits="userSpaceOnUse"
- id="mask24466">
+ id="mask24466"
+ maskUnits="userSpaceOnUse">
<rect
- transform="scale(1,-1)"
- style="fill:url(#linearGradient24470);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- id="rect24468"
- width="7"
- height="9"
+ y="4.0625"
x="276"
- y="4.0625" />
+ height="9"
+ width="7"
+ id="rect24468"
+ style="fill:url(#linearGradient24470);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ transform="scale(1,-1)" />
</mask>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient23971"
- gradientUnits="userSpaceOnUse"
- x1="154.24324"
- y1="-11.628862"
+ y2="-22.846634"
x2="134.08138"
- y2="-22.846634" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient23973"
+ y1="-11.628862"
+ x1="154.24324"
gradientUnits="userSpaceOnUse"
- x1="134.12642"
- y1="-21.522242"
- x2="132.29695"
- y2="-23.945318" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient23971"
xlink:href="#linearGradient1610"
- id="linearGradient23975"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="-23.945318"
+ x2="132.29695"
+ y1="-21.522242"
+ x1="134.12642"
gradientUnits="userSpaceOnUse"
- x1="134.6615"
- y1="-21.3074"
- x2="131.69801"
- y2="-24.343456" />
+ id="linearGradient23973"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="-24.343456"
+ x2="131.69801"
+ y1="-21.3074"
+ x1="134.6615"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient23975"
xlink:href="#linearGradient1610"
- id="linearGradient24099"
- x1="137.5"
- y1="-18"
- x2="135.25"
- y2="-21"
- gradientUnits="userSpaceOnUse" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient24539"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.728189,0,0,1.727271,-142.53857,-4.802156)"
- x1="107.39532"
- y1="58.065113"
- x2="127.70434"
- y2="58.065113" />
+ y2="-21"
+ x2="135.25"
+ y1="-18"
+ x1="137.5"
+ id="linearGradient24099"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient24541"
+ y2="58.065113"
+ x2="127.70434"
+ y1="58.065113"
+ x1="107.39532"
+ gradientTransform="matrix(1.728189,0,0,1.727271,-142.53857,-4.802156)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1.1000194,0,0,1.0998287,110.29549,-8.6726854)"
- x1="30.389694"
- y1="95.008034"
- x2="65.52562"
- y2="93.69249" />
+ id="linearGradient24539"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient24543"
+ y2="93.69249"
+ x2="65.52562"
+ y1="95.008034"
+ x1="30.389694"
+ gradientTransform="matrix(-1.1000194,0,0,1.0998287,110.29549,-8.6726854)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-6,0)"
- x1="483.00034"
- y1="163"
- x2="476.68781"
- y2="162.85956" />
+ id="linearGradient24541"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030"
- id="linearGradient24545"
+ y2="162.85956"
+ x2="476.68781"
+ y1="163"
+ x1="483.00034"
+ gradientTransform="translate(-6,0)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(342.00029,383.00889)"
- x1="123.36729"
- y1="-219.24783"
- x2="134.30893"
- y2="-218.00888" />
+ id="linearGradient24543"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient24547"
+ y2="-218.00888"
+ x2="134.30893"
+ y1="-219.24783"
+ x1="123.36729"
+ gradientTransform="translate(342.00029,383.00889)"
gradientUnits="userSpaceOnUse"
- x1="475.00034"
- y1="155"
- x2="469.75034"
- y2="155" />
+ id="linearGradient24545"
+ xlink:href="#linearGradient9030"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient24549"
+ y2="155"
+ x2="469.75034"
+ y1="155"
+ x1="475.00034"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-6,-6e-5)"
- x1="442.81525"
- y1="290.49384"
- x2="436.5"
- y2="290.5249" />
+ id="linearGradient24547"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient18105"
- id="linearGradient24551"
+ y2="290.5249"
+ x2="436.5"
+ y1="290.49384"
+ x1="442.81525"
+ gradientTransform="translate(-6,-6e-5)"
gradientUnits="userSpaceOnUse"
- x1="445.99902"
- y1="288.5"
+ id="linearGradient24549"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="288.5"
x2="407.3793"
- y2="288.5" />
+ y1="288.5"
+ x1="445.99902"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient24551"
+ xlink:href="#linearGradient18105"
+ inkscape:collect="always" />
<clipPath
- clipPathUnits="userSpaceOnUse"
- id="clipPath24168">
+ id="clipPath24168"
+ clipPathUnits="userSpaceOnUse">
<path
- style="fill:#808080;fill-rule:evenodd;stroke:none"
- d="m 134.27489,222.11125 c -3.9249,-6.46418 -7.61892,6.46419 -11.54381,0 l 0,0 -1.61614,0 0,8.77283 14.77608,0 0,-8.77283 -1.61613,0 z"
- id="path24170"
+ inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccc"
- inkscape:connector-curvature="0" />
+ id="path24170"
+ d="m 134.27489,222.11125 c -3.9249,-6.46418 -7.61892,6.46419 -11.54381,0 l 0,0 -1.61614,0 0,8.77283 14.77608,0 0,-8.77283 -1.61613,0 z"
+ style="fill:#808080;fill-rule:evenodd;stroke:none" />
</clipPath>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="linearGradient24112"
- gradientUnits="userSpaceOnUse"
- x1="124.40742"
- y1="111.98244"
+ y2="120.87388"
x2="135.36497"
- y2="120.87388" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient24114"
+ y1="111.98244"
+ x1="124.40742"
gradientUnits="userSpaceOnUse"
- x1="130.39502"
- y1="116.31751"
- x2="140.66667"
- y2="125.94853" />
+ id="linearGradient24112"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient24116"
+ y2="125.94853"
+ x2="140.66667"
+ y1="116.31751"
+ x1="130.39502"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,1)"
- x1="302.84085"
- y1="243.23151"
- x2="308.82889"
- y2="244.70323" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient24114"
xlink:href="#linearGradient319"
- id="linearGradient24118"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.6879084,0,0,0.6879446,216.19282,166.82605)"
- x1="121.7408"
- y1="115.90587"
- x2="130.01318"
- y2="116.60553" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient24121"
+ y2="244.70323"
+ x2="308.82889"
+ y1="243.23151"
+ x1="302.84085"
+ gradientTransform="translate(0,1)"
gradientUnits="userSpaceOnUse"
- x1="135.698"
- y1="122.92034"
- x2="129.70906"
- y2="117.15551" />
+ id="linearGradient24116"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient24123"
+ y2="116.60553"
+ x2="130.01318"
+ y1="115.90587"
+ x1="121.7408"
+ gradientTransform="matrix(0.6879084,0,0,0.6879446,216.19282,166.82605)"
gradientUnits="userSpaceOnUse"
- x1="125.81818"
- y1="111.81818"
- x2="143.88347"
- y2="129.27184" />
+ id="linearGradient24118"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient24189"
+ y2="117.15551"
+ x2="129.70906"
+ y1="122.92034"
+ x1="135.698"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-93.937441,254)"
- x1="162.61801"
- y1="4.5569806"
- x2="180.11391"
- y2="23.410421" />
+ id="linearGradient24121"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient24192"
+ y2="129.27184"
+ x2="143.88347"
+ y1="111.81818"
+ x1="125.81818"
gradientUnits="userSpaceOnUse"
- x1="167.43744"
- y1="23.749996"
- x2="175.06059"
- y2="32.144764"
- gradientTransform="translate(-94.937441,240)" />
+ id="linearGradient24123"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient24209"
- gradientUnits="userSpaceOnUse"
+ y2="23.410421"
+ x2="180.11391"
+ y1="4.5569806"
+ x1="162.61801"
gradientTransform="translate(-93.937441,254)"
- x1="166.86487"
- y1="12.306217"
- x2="173.93744"
- y2="19" />
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient24189"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient24268"
+ gradientTransform="translate(-94.937441,240)"
+ y2="32.144764"
+ x2="175.06059"
+ y1="23.749996"
+ x1="167.43744"
gradientUnits="userSpaceOnUse"
- x1="186.74992"
- y1="10.795519"
- x2="189.24992"
- y2="9.0189686"
- gradientTransform="matrix(1,0,0,-0.985055,75.000075,275.63418)" />
+ id="linearGradient24192"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient24272"
+ y2="19"
+ x2="173.93744"
+ y1="12.306217"
+ x1="166.86487"
+ gradientTransform="translate(-93.937441,254)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.2000005,0,0,1.1817719,-50.700005,86.809844)"
- x1="258.08322"
- y1="148.24248"
- x2="264.99994"
- y2="154.24899" />
+ id="linearGradient24209"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient24277"
+ gradientTransform="matrix(1,0,0,-0.985055,75.000075,275.63418)"
+ y2="9.0189686"
+ x2="189.24992"
+ y1="10.795519"
+ x1="186.74992"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.2000005,0,0,1.1817719,-50.700005,86.809844)"
- x1="258.08322"
+ id="linearGradient24268"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="154.24899"
+ x2="264.99994"
y1="148.24248"
+ x1="258.08322"
+ gradientTransform="matrix(1.2000005,0,0,1.1817719,-50.700005,86.809844)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient24272"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="154.24899"
x2="264.99994"
- y2="154.24899" />
+ y1="148.24248"
+ x1="258.08322"
+ gradientTransform="matrix(1.2000005,0,0,1.1817719,-50.700005,86.809844)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient24277"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient21327"
- id="linearGradient24395"
- x1="-27.5"
- y1="268.76776"
- x2="-39.875"
+ gradientUnits="userSpaceOnUse"
y2="277.4375"
- gradientUnits="userSpaceOnUse" />
+ x2="-39.875"
+ y1="268.76776"
+ x1="-27.5"
+ id="linearGradient24395"
+ xlink:href="#linearGradient21327"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient15893"
- id="linearGradient41127"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,1,594,-42.40625)"
- x1="409.45645"
- y1="52.77837"
+ y2="55.86327"
x2="402.30673"
- y2="55.86327" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient27957"
- id="linearGradient41129"
+ y1="52.77837"
+ x1="409.45645"
+ gradientTransform="matrix(-1,0,0,1,594,-42.40625)"
gradientUnits="userSpaceOnUse"
- x1="180.20316"
- y1="8.0551176"
- x2="192.75177"
- y2="12.942369" />
+ id="linearGradient41127"
+ xlink:href="#linearGradient15893"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient41170"
+ y2="12.942369"
+ x2="192.75177"
+ y1="8.0551176"
+ x1="180.20316"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,0.9846154,-138.98388,3.9846124)"
- x1="266.93381"
- y1="199.60616"
- x2="291.45029"
- y2="230.76723" />
+ id="linearGradient41129"
+ xlink:href="#linearGradient27957"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient41172"
+ y2="230.76723"
+ x2="291.45029"
+ y1="199.60616"
+ x1="266.93381"
+ gradientTransform="matrix(1,0,0,0.9846154,-138.98388,3.9846124)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0.01612278,0)"
- x1="268.21783"
- y1="200.66605"
+ id="linearGradient41170"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="224.1875"
x2="284.9375"
- y2="224.1875" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="radialGradient41174"
+ y1="200.66605"
+ x1="268.21783"
+ gradientTransform="translate(0.01612278,0)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.25,0,0,1.375,-66.483877,-73.5)"
- cx="269.99997"
- cy="197"
- fx="269.99997"
+ id="linearGradient41172"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <radialGradient
+ r="2"
fy="197"
- r="2" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient41963"
+ fx="269.99997"
+ cy="197"
+ cx="269.99997"
+ gradientTransform="matrix(1.25,0,0,1.375,-66.483877,-73.5)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(274,-63.999901)"
- x1="113.71248"
- y1="158.24995"
- x2="87.522514"
- y2="157.99994" />
+ id="radialGradient41174"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient42069"
+ y2="157.99994"
+ x2="87.522514"
+ y1="158.24995"
+ x1="113.71248"
+ gradientTransform="translate(274,-63.999901)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,0.9846154,-138.98388,3.9846124)"
- x1="266.93381"
- y1="199.60616"
+ id="linearGradient41963"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="230.76723"
x2="291.45029"
- y2="230.76723" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="radialGradient42091"
+ y1="199.60616"
+ x1="266.93381"
+ gradientTransform="matrix(1,0,0,0.9846154,-138.98388,3.9846124)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.25,0,0,1.375,-66.483877,-73.5)"
- cx="269.99997"
- cy="197"
- fx="269.99997"
+ id="linearGradient42069"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <radialGradient
+ r="2"
fy="197"
- r="2" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient42093"
+ fx="269.99997"
+ cy="197"
+ cx="269.99997"
+ gradientTransform="matrix(1.25,0,0,1.375,-66.483877,-73.5)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0.01612278,0)"
- x1="276.39999"
- y1="215.3125"
- x2="265.70886"
- y2="196.576" />
- <radialGradient
- inkscape:collect="always"
+ id="radialGradient42091"
xlink:href="#linearGradient10069"
- id="radialGradient42115"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="196.576"
+ x2="265.70886"
+ y1="215.3125"
+ x1="276.39999"
+ gradientTransform="translate(0.01612278,0)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.25,0,0,1.375,-66.483877,-73.5)"
- cx="269.99997"
- cy="197"
- fx="269.99997"
+ id="linearGradient42093"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
+ <radialGradient
+ r="2"
fy="197"
- r="2" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient42121"
+ fx="269.99997"
+ cy="197"
+ cx="269.99997"
+ gradientTransform="matrix(1.25,0,0,1.375,-66.483877,-73.5)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(60,-342)"
- x1="206"
- y1="535"
- x2="212"
- y2="549" />
+ id="radialGradient42115"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient42155"
+ y2="549"
+ x2="212"
+ y1="535"
+ x1="206"
+ gradientTransform="translate(60,-342)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,0.9846154,-138.98388,3.9846124)"
- x1="263"
- y1="193.93752"
- x2="296.25"
- y2="239.89455" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient42121"
xlink:href="#linearGradient319"
- id="linearGradient42290"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="239.89455"
+ x2="296.25"
+ y1="193.93752"
+ x1="263"
+ gradientTransform="matrix(1,0,0,0.9846154,-138.98388,3.9846124)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0.01612278,0)"
- x1="265.98389"
- y1="195"
+ id="linearGradient42155"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="232"
x2="290.98389"
- y2="232" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="radialGradient42292"
+ y1="195"
+ x1="265.98389"
+ gradientTransform="translate(0.01612278,0)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.25,0,0,1.375,-66.483877,-73.5)"
- cx="269.99997"
- cy="197"
- fx="269.99997"
+ id="linearGradient42290"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <radialGradient
+ r="2"
fy="197"
- r="2" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient40722"
+ fx="269.99997"
+ cy="197"
+ cx="269.99997"
+ gradientTransform="matrix(1.25,0,0,1.375,-66.483877,-73.5)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9819031,0,0,0.9481466,-88.271503,-83.584533)"
- x1="1.6577729"
- y1="253.01927"
- x2="-57.772419"
- y2="253.62515" />
+ id="radialGradient42292"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient40724"
+ y2="253.62515"
+ x2="-57.772419"
+ y1="253.01927"
+ x1="1.6577729"
+ gradientTransform="matrix(0.9819031,0,0,0.9481466,-88.271503,-83.584533)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-0.977157,0,0,0.9835482,0.06815071,100.43848)"
- x1="107.84375"
- y1="57.374996"
- x2="116.99999"
- y2="60.125" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient40722"
xlink:href="#linearGradient37542"
- id="linearGradient40734"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,13)"
- x1="241.17908"
- y1="214.40446"
- x2="279.89563"
- y2="254.94975" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient40736"
+ y2="60.125"
+ x2="116.99999"
+ y1="57.374996"
+ x1="107.84375"
+ gradientTransform="matrix(-0.977157,0,0,0.9835482,0.06815071,100.43848)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.6025789,0,0,0.668336,263.48819,85.675422)"
- x1="49.543404"
- y1="230.81766"
- x2="73.932747"
- y2="247.27646" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient40724"
xlink:href="#linearGradient319"
- id="linearGradient40738"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9120445,0,0,1,25.749745,8.9261515)"
- x1="305.12527"
- y1="239.03134"
- x2="308.97327"
- y2="242" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient40740"
+ y2="254.94975"
+ x2="279.89563"
+ y1="214.40446"
+ x1="241.17908"
+ gradientTransform="translate(0,13)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.584271,0,0,0.661005,267.80323,78.438648)"
- x1="51.682816"
- y1="229.19724"
- x2="73.932762"
- y2="247.35141" />
+ id="linearGradient40734"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient40742"
+ y2="247.27646"
+ x2="73.932747"
+ y1="230.81766"
+ x1="49.543404"
+ gradientTransform="matrix(0.6025789,0,0,0.668336,263.48819,85.675422)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9103441,0,0,0.989031,29.299938,2.5312404)"
- x1="305.12527"
- y1="239.03134"
- x2="307.25021"
- y2="241.62509" />
+ id="linearGradient40736"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient40758"
+ y2="242"
+ x2="308.97327"
+ y1="239.03134"
+ x1="305.12527"
+ gradientTransform="matrix(0.9120445,0,0,1,25.749745,8.9261515)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(15.997359,-17.993456)"
- x1="199.4335"
- y1="294.81082"
- x2="196.00264"
- y2="259.99347" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient40738"
xlink:href="#linearGradient319"
- id="linearGradient40760"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.7501745,0,0,1.0021005,51.339144,-0.5240716)"
- x1="207.19595"
- y1="249.22464"
- x2="207.81319"
- y2="250.25" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient40762"
+ y2="247.35141"
+ x2="73.932762"
+ y1="229.19724"
+ x1="51.682816"
+ gradientTransform="matrix(0.584271,0,0,0.661005,267.80323,78.438648)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.7501745,0,0,1.0021005,59.339161,-0.5240716)"
- x1="207.19595"
- y1="249.22464"
- x2="207.81319"
- y2="250.25" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient40740"
xlink:href="#linearGradient37542"
- id="linearGradient40788"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.043478,0,0,0.956667,-7.152175,20.92167)"
- x1="146.51619"
- y1="217.52046"
- x2="174.56255"
- y2="252.52081" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030"
- id="linearGradient40790"
+ y2="241.62509"
+ x2="307.25021"
+ y1="239.03134"
+ x1="305.12527"
+ gradientTransform="matrix(0.9103441,0,0,0.989031,29.299938,2.5312404)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(81.000002,13.499998)"
- x1="87.765625"
- y1="242.39062"
- x2="96"
- y2="251.40294" />
+ id="linearGradient40742"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient18056"
- id="linearGradient40792"
+ y2="259.99347"
+ x2="196.00264"
+ y1="294.81082"
+ x1="199.4335"
+ gradientTransform="translate(15.997359,-17.993456)"
gradientUnits="userSpaceOnUse"
- x1="170.42908"
- y1="237.25"
- x2="170.71698"
- y2="249.15927" />
+ id="linearGradient40758"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient40794"
+ y2="250.25"
+ x2="207.81319"
+ y1="249.22464"
+ x1="207.19595"
+ gradientTransform="matrix(0.7501745,0,0,1.0021005,51.339144,-0.5240716)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,10)"
- x1="168.5625"
- y1="249.55817"
- x2="168.5"
- y2="240.10249" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient40760"
xlink:href="#linearGradient319"
- id="linearGradient40545"
- gradientUnits="userSpaceOnUse"
- x1="279.38629"
- y1="-16.946415"
- x2="293.80472"
- y2="-2.5475447" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient40547"
+ y2="250.25"
+ x2="207.81319"
+ y1="249.22464"
+ x1="207.19595"
+ gradientTransform="matrix(0.7501745,0,0,1.0021005,59.339161,-0.5240716)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9230687,0,0,0.9230801,261.38476,-234.15464)"
- x1="43.921535"
- y1="261.52924"
- x2="29.429007"
- y2="243.98439" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient40762"
xlink:href="#linearGradient319"
- id="linearGradient22249"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-1,0)"
- x1="387"
- y1="410"
- x2="388.78125"
- y2="411.78125" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient22251"
+ y2="252.52081"
+ x2="174.56255"
+ y1="217.52046"
+ x1="146.51619"
+ gradientTransform="matrix(1.043478,0,0,0.956667,-7.152175,20.92167)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-1,0)"
- x1="386.88852"
- y1="409.84152"
- x2="389.14081"
- y2="412.45016" />
+ id="linearGradient40788"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient22253"
+ y2="251.40294"
+ x2="96"
+ y1="242.39062"
+ x1="87.765625"
+ gradientTransform="translate(81.000002,13.499998)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-1,0)"
- x1="387"
- y1="409.86362"
- x2="388.86676"
- y2="411.88974" />
+ id="linearGradient40790"
+ xlink:href="#linearGradient9030"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient23775"
+ y2="249.15927"
+ x2="170.71698"
+ y1="237.25"
+ x1="170.42908"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-0.9230769,0,0,-0.9258123,59.615385,471.81593)"
- x1="-0.71355486"
- y1="209.97131"
- x2="37.5"
- y2="252.16492" />
+ id="linearGradient40792"
+ xlink:href="#linearGradient18056"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient23777"
+ y2="240.10249"
+ x2="168.5"
+ y1="249.55817"
+ x1="168.5625"
+ gradientTransform="translate(0,10)"
gradientUnits="userSpaceOnUse"
- x1="72.698921"
- y1="599.20789"
- x2="77.111115"
- y2="604.11108" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient40794"
xlink:href="#linearGradient37542"
- id="linearGradient23351"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.923955,0,0,1,82.8792,399.00004)"
- x1="-7.445384"
- y1="204.24995"
- x2="33.682159"
- y2="250.99995" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient23353"
+ y2="-2.5475447"
+ x2="293.80472"
+ y1="-16.946415"
+ x1="279.38629"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(80.02752,483.00004)"
- x1="29.972469"
- y1="164"
- x2="36.972481"
- y2="168.00002" />
+ id="linearGradient40545"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient23355"
+ y2="243.98439"
+ x2="29.429007"
+ y1="261.52924"
+ x1="43.921535"
+ gradientTransform="matrix(0.9230687,0,0,0.9230801,261.38476,-234.15464)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-224,-1290)"
- x1="113"
- y1="646"
- x2="111"
- y2="644" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient40547"
xlink:href="#linearGradient319"
- id="linearGradient23357"
- gradientUnits="userSpaceOnUse"
- x1="113"
- y1="646"
- x2="111.5"
- y2="644.5" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient23599"
- x1="191"
- y1="158.72728"
- x2="196.59441"
- y2="167.67831"
+ y2="411.78125"
+ x2="388.78125"
+ y1="410"
+ x1="387"
+ gradientTransform="translate(-1,0)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.89375,0,0,0.89375,20.29375,17.10625)" />
+ id="linearGradient22249"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37623"
- id="linearGradient22692"
+ y2="412.45016"
+ x2="389.14081"
+ y1="409.84152"
+ x1="386.88852"
+ gradientTransform="translate(-1,0)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-0.6363637,0.6315788,0,-191.68403,523.2955)"
- x1="150.5"
- y1="647.75"
- x2="150.53571"
- y2="641.54156" />
+ id="linearGradient22251"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37623"
- id="linearGradient22695"
+ y2="411.88974"
+ x2="388.86676"
+ y1="409.86362"
+ x1="387"
+ gradientTransform="translate(-1,0)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-0.6363637,0,0,-0.6315788,314.2955,837.68414)"
- x1="150.5"
- y1="647.75"
- x2="150.53571"
- y2="641.54156" />
+ id="linearGradient22253"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37623"
- id="linearGradient22698"
+ y2="252.16492"
+ x2="37.5"
+ y1="209.97131"
+ x1="-0.71355486"
+ gradientTransform="matrix(-0.9230769,0,0,-0.9258123,59.615385,471.81593)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,0.6363637,-0.6315788,0,628.68411,331.70458)"
- x1="150.5"
- y1="647.75"
- x2="150.53571"
- y2="641.54156" />
+ id="linearGradient23775"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37623"
- id="linearGradient22701"
+ y2="604.11108"
+ x2="77.111115"
+ y1="599.20789"
+ x1="72.698921"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.6363637,0,0,0.6315788,122.70458,17.31597)"
- x1="150.5"
- y1="647.75"
- x2="150.53571"
- y2="641.54156" />
+ id="linearGradient23777"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20324"
- id="linearGradient22704"
+ y2="250.99995"
+ x2="33.682159"
+ y1="204.24995"
+ x1="-7.445384"
+ gradientTransform="matrix(0.923955,0,0,1,82.8792,399.00004)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-0.6363637,0,0,-0.6315788,311.11368,825.05254)"
- x1="145.53571"
- y1="627.08325"
- x2="145.53571"
- y2="623.12494" />
+ id="linearGradient23351"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20324"
- id="linearGradient22707"
+ y2="168.00002"
+ x2="36.972481"
+ y1="164"
+ x1="29.972469"
+ gradientTransform="translate(80.02752,483.00004)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-0.6363637,0.6315788,0,-179.05245,520.11368)"
- x1="145.53571"
- y1="627.08325"
- x2="145.53571"
- y2="623.12494" />
+ id="linearGradient23353"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20324"
- id="linearGradient22711"
+ y2="644"
+ x2="111"
+ y1="646"
+ x1="113"
+ gradientTransform="translate(-224,-1290)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,0.6363637,-0.6315788,0,616.05253,334.8864)"
- x1="145.53571"
- y1="627.08325"
- x2="145.53571"
- y2="623.12494" />
+ id="linearGradient23355"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20324"
- id="linearGradient22715"
+ y2="644.5"
+ x2="111.5"
+ y1="646"
+ x1="113"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.6363637,0,0,0.6315788,125.8864,29.94755)"
- x1="145.53571"
- y1="627.08325"
- x2="145.53571"
- y2="623.12494" />
+ id="linearGradient23357"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20324"
- id="linearGradient23132"
+ gradientTransform="matrix(0.89375,0,0,0.89375,20.29375,17.10625)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,0.6357342,-0.636363,0,628.0905,358.45254)"
- x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
+ y2="167.67831"
+ x2="196.59441"
+ y1="158.72728"
+ x1="191"
+ id="linearGradient23599"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20324"
- id="linearGradient23134"
+ y2="641.54156"
+ x2="150.53571"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0,-0.6363637,0.6315788,0,-191.68403,523.2955)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-0.636363,0,0,-0.6357342,320.09081,851.14655)"
- x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
+ id="linearGradient22692"
+ xlink:href="#linearGradient37623"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20324"
- id="linearGradient23136"
+ y2="641.54156"
+ x2="150.53571"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(-0.6363637,0,0,-0.6315788,314.2955,837.68414)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-0.6357342,0.636363,0,-173.09051,543.4512)"
- x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
+ id="linearGradient22695"
+ xlink:href="#linearGradient37623"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20324"
- id="linearGradient23138"
+ y2="641.54156"
+ x2="150.53571"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0,0.6363637,-0.6315788,0,628.68411,331.70458)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.636363,0,0,0.6357342,134.90918,50.757191)"
- x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient22698"
xlink:href="#linearGradient37623"
- id="linearGradient23140"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.636363,0,0,0.6357342,131.72737,31.593709)"
- x1="150.5"
- y1="647.75"
- x2="150.5"
- y2="642" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37623"
- id="linearGradient23142"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,0.6357342,-0.636363,0,640.81777,348.82507)"
- x1="150.5"
+ y2="641.54156"
+ x2="150.53571"
y1="647.75"
- x2="150.5"
- y2="642" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37623"
- id="linearGradient23144"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.636363,0,0,-0.6357342,131.72737,857.41243)"
x1="150.5"
- y1="647.75"
- x2="150.5"
- y2="642" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37623"
- id="linearGradient23147"
+ gradientTransform="matrix(0.6363637,0,0,0.6315788,122.70458,17.31597)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-0.6357342,0.636363,0,-185.81777,540.18107)"
- x1="150.5"
- y1="647.75"
- x2="150.5"
- y2="642" />
+ id="linearGradient22701"
+ xlink:href="#linearGradient37623"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20324"
- id="linearGradient23177"
+ y2="623.12494"
+ x2="145.53571"
+ y1="627.08325"
+ x1="145.53571"
+ gradientTransform="matrix(-0.6363637,0,0,-0.6315788,311.11368,825.05254)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,1,-1,0,850,297)"
- x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient22704"
xlink:href="#linearGradient20324"
- id="linearGradient23179"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,-1,366,1072)"
- x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20324"
- id="linearGradient23181"
+ y2="623.12494"
+ x2="145.53571"
+ y1="627.08325"
+ x1="145.53571"
+ gradientTransform="matrix(0,-0.6363637,0.6315788,0,-179.05245,520.11368)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-1,1,0,-409,588)"
- x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient22707"
xlink:href="#linearGradient20324"
- id="linearGradient23183"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(75,-187)"
- x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37623"
- id="linearGradient23185"
+ y2="623.12494"
+ x2="145.53571"
+ y1="627.08325"
+ x1="145.53571"
+ gradientTransform="matrix(0,0.6363637,-0.6315788,0,616.05253,334.8864)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(70,-207)"
- x1="150.5"
- y1="647.75"
- x2="150.5"
- y2="642" />
+ id="linearGradient22711"
+ xlink:href="#linearGradient20324"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37623"
- id="linearGradient23187"
+ y2="623.12494"
+ x2="145.53571"
+ y1="627.08325"
+ x1="145.53571"
+ gradientTransform="matrix(0.6363637,0,0,0.6315788,125.8864,29.94755)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,1,-1,0,870,292)"
- x1="150.5"
- y1="647.75"
- x2="150.5"
- y2="642" />
+ id="linearGradient22715"
+ xlink:href="#linearGradient20324"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37623"
- id="linearGradient23189"
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="matrix(0,0.6357342,-0.636363,0,628.0905,358.45254)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,-1,70,1092)"
- x1="150.5"
- y1="647.75"
- x2="150.5"
- y2="642" />
+ id="linearGradient23132"
+ xlink:href="#linearGradient20324"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37623"
- id="linearGradient23191"
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="matrix(-0.636363,0,0,-0.6357342,320.09081,851.14655)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-1,1,0,-429,593)"
- x1="150.5"
- y1="647.75"
- x2="150.5"
- y2="642" />
+ id="linearGradient23134"
+ xlink:href="#linearGradient20324"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37623"
- id="linearGradient23231"
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="matrix(0,-0.6357342,0.636363,0,-173.09051,543.4512)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-0.8181822,0.8181823,0,-304.90941,555.63645)"
- x1="150.5"
- y1="647.75"
- x2="150.5"
- y2="642" />
+ id="linearGradient23136"
+ xlink:href="#linearGradient20324"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37623"
- id="linearGradient23235"
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="matrix(0.636363,0,0,0.6357342,134.90918,50.757191)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8181823,0,0,-0.8181822,103.36356,963.90937)"
- x1="150.5"
- y1="647.75"
- x2="150.5"
- y2="642" />
+ id="linearGradient23138"
+ xlink:href="#linearGradient20324"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37623"
- id="linearGradient23239"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,0.8181822,-0.8181823,0,757.9094,309.36361)"
- x1="150.5"
- y1="647.75"
+ y2="642"
x2="150.5"
- y2="642" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37623"
- id="linearGradient23244"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8181823,0,0,0.8181822,103.36356,-98.909308)"
- x1="150.5"
y1="647.75"
- x2="150.5"
- y2="642" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20324"
- id="linearGradient23248"
+ x1="150.5"
+ gradientTransform="matrix(0.636363,0,0,0.6357342,131.72737,31.593709)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8181823,0,0,0.8181822,107.45448,-82.54566)"
- x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
+ id="linearGradient23140"
+ xlink:href="#linearGradient37623"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20324"
- id="linearGradient23251"
+ y2="642"
+ x2="150.5"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0,0.6357342,-0.636363,0,640.81777,348.82507)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-0.8181822,0.8181823,0,-288.54575,551.54554)"
- x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
+ id="linearGradient23142"
+ xlink:href="#linearGradient37623"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20324"
- id="linearGradient23254"
+ y2="642"
+ x2="150.5"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0.636363,0,0,-0.6357342,131.72737,857.41243)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-0.8181823,0,0,-0.8181822,345.54553,947.54573)"
- x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
+ id="linearGradient23144"
+ xlink:href="#linearGradient37623"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20324"
- id="linearGradient23257"
+ y2="642"
+ x2="150.5"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0,-0.6357342,0.636363,0,-185.81777,540.18107)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,0.8181822,-0.8181823,0,741.54576,313.45452)"
- x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
+ id="linearGradient23147"
+ xlink:href="#linearGradient37623"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20324"
- id="linearGradient23563"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,0.8181822,-0.8181823,0,741.54576,313.45452)"
- x1="145.5"
- y1="627.5"
+ y2="623.5"
x2="145.5"
- y2="623.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20324"
- id="linearGradient23566"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-0.8181823,0,0,-0.8181822,345.54553,947.54573)"
- x1="145.5"
y1="627.5"
- x2="145.5"
- y2="623.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20324"
- id="linearGradient23568"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-0.8181822,0.8181823,0,-288.54575,551.54554)"
x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20324"
- id="linearGradient23570"
+ gradientTransform="matrix(0,1,-1,0,850,297)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8181823,0,0,0.8181822,107.45448,-82.54566)"
- x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
+ id="linearGradient23177"
+ xlink:href="#linearGradient20324"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37623"
- id="linearGradient23572"
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="matrix(-1,0,0,-1,366,1072)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8181823,0,0,0.8181822,103.36356,-98.909308)"
- x1="150.5"
- y1="647.75"
- x2="150.5"
- y2="642" />
+ id="linearGradient23179"
+ xlink:href="#linearGradient20324"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37623"
- id="linearGradient23574"
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="matrix(0,-1,1,0,-409,588)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,0.8181822,-0.8181823,0,757.9094,309.36361)"
- x1="150.5"
- y1="647.75"
- x2="150.5"
- y2="642" />
+ id="linearGradient23181"
+ xlink:href="#linearGradient20324"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37623"
- id="linearGradient23576"
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="translate(75,-187)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8181823,0,0,-0.8181822,103.36356,963.90937)"
- x1="150.5"
- y1="647.75"
- x2="150.5"
- y2="642" />
+ id="linearGradient23183"
+ xlink:href="#linearGradient20324"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37623"
- id="linearGradient23578"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-0.8181822,0.8181823,0,-304.90941,555.63645)"
- x1="150.5"
- y1="647.75"
+ y2="642"
x2="150.5"
- y2="642" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20324"
- id="linearGradient23580"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="translate(70,-207)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,1,-1,0,850,297)"
- x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
+ id="linearGradient23185"
+ xlink:href="#linearGradient37623"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20324"
- id="linearGradient23582"
+ y2="642"
+ x2="150.5"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0,1,-1,0,870,292)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,-1,366,1072)"
- x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
+ id="linearGradient23187"
+ xlink:href="#linearGradient37623"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20324"
- id="linearGradient23587"
+ y2="642"
+ x2="150.5"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(1,0,0,-1,70,1092)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-1,1,0,-409,588)"
- x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
+ id="linearGradient23189"
+ xlink:href="#linearGradient37623"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20324"
- id="linearGradient23589"
+ y2="642"
+ x2="150.5"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0,-1,1,0,-429,593)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(75,-187)"
- x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient23191"
xlink:href="#linearGradient37623"
- id="linearGradient23591"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(70,-207)"
- x1="150.5"
- y1="647.75"
- x2="150.5"
- y2="642" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37623"
- id="linearGradient23593"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,1,-1,0,870,292)"
- x1="150.5"
- y1="647.75"
+ y2="642"
x2="150.5"
- y2="642" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37623"
- id="linearGradient23597"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,-1,70,1092)"
- x1="150.5"
y1="647.75"
- x2="150.5"
- y2="642" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37623"
- id="linearGradient23600"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-1,1,0,-429,593)"
x1="150.5"
+ gradientTransform="matrix(0,-0.8181822,0.8181823,0,-304.90941,555.63645)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient23231"
+ xlink:href="#linearGradient37623"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="642"
+ x2="150.5"
y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0.8181823,0,0,-0.8181822,103.36356,963.90937)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient23235"
+ xlink:href="#linearGradient37623"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="642"
x2="150.5"
- y2="642" />
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0,0.8181822,-0.8181823,0,757.9094,309.36361)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient23239"
+ xlink:href="#linearGradient37623"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20324"
- id="linearGradient23602"
+ y2="642"
+ x2="150.5"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0.8181823,0,0,0.8181822,103.36356,-98.909308)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.6363637,0,0,0.6315788,125.8864,29.94755)"
- x1="145.53571"
- y1="627.08325"
- x2="145.53571"
- y2="623.12494" />
+ id="linearGradient23244"
+ xlink:href="#linearGradient37623"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20324"
- id="linearGradient23606"
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="matrix(0.8181823,0,0,0.8181822,107.45448,-82.54566)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,0.6363637,-0.6315788,0,616.05253,334.8864)"
- x1="145.53571"
- y1="627.08325"
- x2="145.53571"
- y2="623.12494" />
+ id="linearGradient23248"
+ xlink:href="#linearGradient20324"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="matrix(0,-0.8181822,0.8181823,0,-288.54575,551.54554)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient23251"
xlink:href="#linearGradient20324"
- id="linearGradient23608"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="matrix(-0.8181823,0,0,-0.8181822,345.54553,947.54573)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-0.6363637,0.6315788,0,-179.05245,520.11368)"
- x1="145.53571"
- y1="627.08325"
- x2="145.53571"
- y2="623.12494" />
+ id="linearGradient23254"
+ xlink:href="#linearGradient20324"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="matrix(0,0.8181822,-0.8181823,0,741.54576,313.45452)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient23257"
xlink:href="#linearGradient20324"
- id="linearGradient23610"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="matrix(0,0.8181822,-0.8181823,0,741.54576,313.45452)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-0.6363637,0,0,-0.6315788,311.11368,825.05254)"
- x1="145.53571"
- y1="627.08325"
- x2="145.53571"
- y2="623.12494" />
+ id="linearGradient23563"
+ xlink:href="#linearGradient20324"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37623"
- id="linearGradient23612"
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="matrix(-0.8181823,0,0,-0.8181822,345.54553,947.54573)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.6363637,0,0,0.6315788,122.70458,17.31597)"
- x1="150.5"
- y1="647.75"
- x2="150.53571"
- y2="641.54156" />
+ id="linearGradient23566"
+ xlink:href="#linearGradient20324"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37623"
- id="linearGradient23616"
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="matrix(0,-0.8181822,0.8181823,0,-288.54575,551.54554)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,0.6363637,-0.6315788,0,628.68411,331.70458)"
- x1="150.5"
- y1="647.75"
- x2="150.53571"
- y2="641.54156" />
+ id="linearGradient23568"
+ xlink:href="#linearGradient20324"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37623"
- id="linearGradient23618"
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="matrix(0.8181823,0,0,0.8181822,107.45448,-82.54566)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-0.6363637,0,0,-0.6315788,314.2955,837.68414)"
- x1="150.5"
- y1="647.75"
- x2="150.53571"
- y2="641.54156" />
+ id="linearGradient23570"
+ xlink:href="#linearGradient20324"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37623"
- id="linearGradient23620"
+ y2="642"
+ x2="150.5"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0.8181823,0,0,0.8181822,103.36356,-98.909308)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-0.6363637,0.6315788,0,-191.68403,523.2955)"
+ id="linearGradient23572"
+ xlink:href="#linearGradient37623"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="642"
+ x2="150.5"
+ y1="647.75"
x1="150.5"
+ gradientTransform="matrix(0,0.8181822,-0.8181823,0,757.9094,309.36361)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient23574"
+ xlink:href="#linearGradient37623"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="642"
+ x2="150.5"
y1="647.75"
- x2="150.53571"
- y2="641.54156" />
+ x1="150.5"
+ gradientTransform="matrix(0.8181823,0,0,-0.8181822,103.36356,963.90937)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient23576"
+ xlink:href="#linearGradient37623"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20324"
- id="linearGradient23622"
+ y2="642"
+ x2="150.5"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0,-0.8181822,0.8181823,0,-304.90941,555.63645)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,0.6357342,-0.636363,0,628.0905,358.45254)"
+ id="linearGradient23578"
+ xlink:href="#linearGradient37623"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
x1="145.5"
+ gradientTransform="matrix(0,1,-1,0,850,297)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient23580"
+ xlink:href="#linearGradient20324"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="623.5"
+ x2="145.5"
y1="627.5"
+ x1="145.5"
+ gradientTransform="matrix(-1,0,0,-1,366,1072)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient23582"
+ xlink:href="#linearGradient20324"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="623.5"
x2="145.5"
- y2="623.5" />
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="matrix(0,-1,1,0,-409,588)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient23587"
+ xlink:href="#linearGradient20324"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="translate(75,-187)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient23589"
xlink:href="#linearGradient20324"
- id="linearGradient23624"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="642"
+ x2="150.5"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="translate(70,-207)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-0.636363,0,0,-0.6357342,320.09081,851.14655)"
- x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
+ id="linearGradient23591"
+ xlink:href="#linearGradient37623"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20324"
- id="linearGradient23626"
+ y2="642"
+ x2="150.5"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0,1,-1,0,870,292)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-0.6357342,0.636363,0,-173.09051,543.4512)"
- x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
+ id="linearGradient23593"
+ xlink:href="#linearGradient37623"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20324"
- id="linearGradient23628"
+ y2="642"
+ x2="150.5"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(1,0,0,-1,70,1092)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.636363,0,0,0.6357342,134.90918,50.757191)"
- x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
+ id="linearGradient23597"
+ xlink:href="#linearGradient37623"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="642"
+ x2="150.5"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0,-1,1,0,-429,593)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient23600"
xlink:href="#linearGradient37623"
- id="linearGradient23630"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="623.12494"
+ x2="145.53571"
+ y1="627.08325"
+ x1="145.53571"
+ gradientTransform="matrix(0.6363637,0,0,0.6315788,125.8864,29.94755)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.636363,0,0,0.6357342,131.72737,31.593709)"
- x1="150.5"
- y1="647.75"
- x2="150.5"
- y2="642" />
+ id="linearGradient23602"
+ xlink:href="#linearGradient20324"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37623"
- id="linearGradient23632"
+ y2="623.12494"
+ x2="145.53571"
+ y1="627.08325"
+ x1="145.53571"
+ gradientTransform="matrix(0,0.6363637,-0.6315788,0,616.05253,334.8864)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,0.6357342,-0.636363,0,640.81777,348.82507)"
- x1="150.5"
- y1="647.75"
- x2="150.5"
- y2="642" />
+ id="linearGradient23606"
+ xlink:href="#linearGradient20324"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37623"
- id="linearGradient23635"
+ y2="623.12494"
+ x2="145.53571"
+ y1="627.08325"
+ x1="145.53571"
+ gradientTransform="matrix(0,-0.6363637,0.6315788,0,-179.05245,520.11368)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.636363,0,0,-0.6357342,131.72737,857.41243)"
- x1="150.5"
- y1="647.75"
- x2="150.5"
- y2="642" />
+ id="linearGradient23608"
+ xlink:href="#linearGradient20324"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37623"
- id="linearGradient23637"
+ y2="623.12494"
+ x2="145.53571"
+ y1="627.08325"
+ x1="145.53571"
+ gradientTransform="matrix(-0.6363637,0,0,-0.6315788,311.11368,825.05254)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-0.6357342,0.636363,0,-185.81777,540.18107)"
- x1="150.5"
- y1="647.75"
- x2="150.5"
- y2="642" />
+ id="linearGradient23610"
+ xlink:href="#linearGradient20324"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24632"
- id="linearGradient23797"
+ y2="641.54156"
+ x2="150.53571"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0.6363637,0,0,0.6315788,122.70458,17.31597)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,0.8181822,-0.8181823,0,741.54576,313.45452)"
- x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
+ id="linearGradient23612"
+ xlink:href="#linearGradient37623"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24632"
- id="linearGradient23799"
+ y2="641.54156"
+ x2="150.53571"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0,0.6363637,-0.6315788,0,628.68411,331.70458)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-0.8181823,0,0,-0.8181822,345.54553,947.54573)"
- x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
+ id="linearGradient23616"
+ xlink:href="#linearGradient37623"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24632"
- id="linearGradient23801"
+ y2="641.54156"
+ x2="150.53571"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(-0.6363637,0,0,-0.6315788,314.2955,837.68414)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-0.8181822,0.8181823,0,-288.54575,551.54554)"
- x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
+ id="linearGradient23618"
+ xlink:href="#linearGradient37623"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24632"
- id="linearGradient23803"
+ y2="641.54156"
+ x2="150.53571"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0,-0.6363637,0.6315788,0,-191.68403,523.2955)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8181823,0,0,0.8181822,107.45448,-82.54566)"
- x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
+ id="linearGradient23620"
+ xlink:href="#linearGradient37623"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24642"
- id="linearGradient23805"
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="matrix(0,0.6357342,-0.636363,0,628.0905,358.45254)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8181823,0,0,0.8181822,103.36356,-98.909308)"
- x1="150.5"
- y1="647.75"
- x2="150.5"
- y2="642" />
+ id="linearGradient23622"
+ xlink:href="#linearGradient20324"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24642"
- id="linearGradient23807"
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="matrix(-0.636363,0,0,-0.6357342,320.09081,851.14655)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,0.8181822,-0.8181823,0,757.9094,309.36361)"
- x1="150.5"
- y1="647.75"
- x2="150.5"
- y2="642" />
+ id="linearGradient23624"
+ xlink:href="#linearGradient20324"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24642"
- id="linearGradient23809"
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="matrix(0,-0.6357342,0.636363,0,-173.09051,543.4512)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8181823,0,0,-0.8181822,103.36356,963.90937)"
- x1="150.5"
- y1="647.75"
- x2="150.5"
- y2="642" />
+ id="linearGradient23626"
+ xlink:href="#linearGradient20324"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24642"
- id="linearGradient23811"
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="matrix(0.636363,0,0,0.6357342,134.90918,50.757191)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-0.8181822,0.8181823,0,-304.90941,555.63645)"
- x1="150.5"
- y1="647.75"
- x2="150.5"
- y2="642" />
+ id="linearGradient23628"
+ xlink:href="#linearGradient20324"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24632"
- id="linearGradient23813"
+ y2="642"
+ x2="150.5"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0.636363,0,0,0.6357342,131.72737,31.593709)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,1,-1,0,850,297)"
- x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
+ id="linearGradient23630"
+ xlink:href="#linearGradient37623"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24632"
- id="linearGradient23815"
+ y2="642"
+ x2="150.5"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0,0.6357342,-0.636363,0,640.81777,348.82507)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,-1,366,1072)"
- x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
+ id="linearGradient23632"
+ xlink:href="#linearGradient37623"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24632"
- id="linearGradient23817"
+ y2="642"
+ x2="150.5"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0.636363,0,0,-0.6357342,131.72737,857.41243)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-1,1,0,-409,588)"
- x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
+ id="linearGradient23635"
+ xlink:href="#linearGradient37623"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24632"
- id="linearGradient23819"
+ y2="642"
+ x2="150.5"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0,-0.6357342,0.636363,0,-185.81777,540.18107)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(75,-187)"
- x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
+ id="linearGradient23637"
+ xlink:href="#linearGradient37623"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24642"
- id="linearGradient23821"
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="matrix(0,0.8181822,-0.8181823,0,741.54576,313.45452)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(70,-207)"
- x1="150.5"
- y1="647.75"
- x2="150.5"
- y2="642" />
+ id="linearGradient23797"
+ xlink:href="#linearGradient24632"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24642"
- id="linearGradient23823"
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="matrix(-0.8181823,0,0,-0.8181822,345.54553,947.54573)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,1,-1,0,870,292)"
- x1="150.5"
- y1="647.75"
- x2="150.5"
- y2="642" />
+ id="linearGradient23799"
+ xlink:href="#linearGradient24632"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24642"
- id="linearGradient23825"
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="matrix(0,-0.8181822,0.8181823,0,-288.54575,551.54554)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,-1,70,1092)"
- x1="150.5"
- y1="647.75"
- x2="150.5"
- y2="642" />
+ id="linearGradient23801"
+ xlink:href="#linearGradient24632"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24642"
- id="linearGradient23827"
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="matrix(0.8181823,0,0,0.8181822,107.45448,-82.54566)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-1,1,0,-429,593)"
- x1="150.5"
- y1="647.75"
+ id="linearGradient23803"
+ xlink:href="#linearGradient24632"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="642"
x2="150.5"
- y2="642" />
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0.8181823,0,0,0.8181822,103.36356,-98.909308)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient23805"
+ xlink:href="#linearGradient24642"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24632"
- id="linearGradient23829"
+ y2="642"
+ x2="150.5"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0,0.8181822,-0.8181823,0,757.9094,309.36361)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.6363637,0,0,0.6315788,125.8864,29.94755)"
- x1="145.53571"
- y1="627.08325"
- x2="145.53571"
- y2="623.12494" />
+ id="linearGradient23807"
+ xlink:href="#linearGradient24642"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24632"
- id="linearGradient23831"
+ y2="642"
+ x2="150.5"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0.8181823,0,0,-0.8181822,103.36356,963.90937)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,0.6363637,-0.6315788,0,616.05253,334.8864)"
- x1="145.53571"
- y1="627.08325"
- x2="145.53571"
- y2="623.12494" />
+ id="linearGradient23809"
+ xlink:href="#linearGradient24642"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24632"
- id="linearGradient23833"
+ y2="642"
+ x2="150.5"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0,-0.8181822,0.8181823,0,-304.90941,555.63645)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-0.6363637,0.6315788,0,-179.05245,520.11368)"
- x1="145.53571"
- y1="627.08325"
- x2="145.53571"
- y2="623.12494" />
+ id="linearGradient23811"
+ xlink:href="#linearGradient24642"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="matrix(0,1,-1,0,850,297)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient23813"
xlink:href="#linearGradient24632"
- id="linearGradient23835"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="matrix(-1,0,0,-1,366,1072)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-0.6363637,0,0,-0.6315788,311.11368,825.05254)"
- x1="145.53571"
- y1="627.08325"
- x2="145.53571"
- y2="623.12494" />
+ id="linearGradient23815"
+ xlink:href="#linearGradient24632"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24642"
- id="linearGradient23837"
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="matrix(0,-1,1,0,-409,588)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.6363637,0,0,0.6315788,122.70458,17.31597)"
- x1="150.5"
- y1="647.75"
- x2="150.53571"
- y2="641.54156" />
+ id="linearGradient23817"
+ xlink:href="#linearGradient24632"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24642"
- id="linearGradient23839"
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="translate(75,-187)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,0.6363637,-0.6315788,0,628.68411,331.70458)"
- x1="150.5"
- y1="647.75"
- x2="150.53571"
- y2="641.54156" />
+ id="linearGradient23819"
+ xlink:href="#linearGradient24632"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24642"
- id="linearGradient23841"
+ y2="642"
+ x2="150.5"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="translate(70,-207)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-0.6363637,0,0,-0.6315788,314.2955,837.68414)"
+ id="linearGradient23821"
+ xlink:href="#linearGradient24642"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="642"
+ x2="150.5"
+ y1="647.75"
x1="150.5"
+ gradientTransform="matrix(0,1,-1,0,870,292)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient23823"
+ xlink:href="#linearGradient24642"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="642"
+ x2="150.5"
y1="647.75"
- x2="150.53571"
- y2="641.54156" />
+ x1="150.5"
+ gradientTransform="matrix(1,0,0,-1,70,1092)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient23825"
+ xlink:href="#linearGradient24642"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="642"
+ x2="150.5"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0,-1,1,0,-429,593)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient23827"
xlink:href="#linearGradient24642"
- id="linearGradient23843"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="623.12494"
+ x2="145.53571"
+ y1="627.08325"
+ x1="145.53571"
+ gradientTransform="matrix(0.6363637,0,0,0.6315788,125.8864,29.94755)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-0.6363637,0.6315788,0,-191.68403,523.2955)"
- x1="150.5"
- y1="647.75"
- x2="150.53571"
- y2="641.54156" />
+ id="linearGradient23829"
+ xlink:href="#linearGradient24632"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="623.12494"
+ x2="145.53571"
+ y1="627.08325"
+ x1="145.53571"
+ gradientTransform="matrix(0,0.6363637,-0.6315788,0,616.05253,334.8864)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient23831"
xlink:href="#linearGradient24632"
- id="linearGradient23845"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="623.12494"
+ x2="145.53571"
+ y1="627.08325"
+ x1="145.53571"
+ gradientTransform="matrix(0,-0.6363637,0.6315788,0,-179.05245,520.11368)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,0.6357342,-0.636363,0,628.0905,358.45254)"
- x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
+ id="linearGradient23833"
+ xlink:href="#linearGradient24632"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="623.12494"
+ x2="145.53571"
+ y1="627.08325"
+ x1="145.53571"
+ gradientTransform="matrix(-0.6363637,0,0,-0.6315788,311.11368,825.05254)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient23835"
xlink:href="#linearGradient24632"
- id="linearGradient23847"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="641.54156"
+ x2="150.53571"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0.6363637,0,0,0.6315788,122.70458,17.31597)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-0.636363,0,0,-0.6357342,320.09081,851.14655)"
- x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
+ id="linearGradient23837"
+ xlink:href="#linearGradient24642"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24632"
- id="linearGradient23849"
+ y2="641.54156"
+ x2="150.53571"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0,0.6363637,-0.6315788,0,628.68411,331.70458)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-0.6357342,0.636363,0,-173.09051,543.4512)"
- x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
+ id="linearGradient23839"
+ xlink:href="#linearGradient24642"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24632"
- id="linearGradient23851"
+ y2="641.54156"
+ x2="150.53571"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(-0.6363637,0,0,-0.6315788,314.2955,837.68414)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.636363,0,0,0.6357342,134.90918,50.757191)"
- x1="145.5"
- y1="627.5"
- x2="145.5"
- y2="623.5" />
+ id="linearGradient23841"
+ xlink:href="#linearGradient24642"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="641.54156"
+ x2="150.53571"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0,-0.6363637,0.6315788,0,-191.68403,523.2955)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient23843"
xlink:href="#linearGradient24642"
- id="linearGradient23853"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="matrix(0,0.6357342,-0.636363,0,628.0905,358.45254)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.636363,0,0,0.6357342,131.72737,31.593709)"
- x1="150.5"
- y1="647.75"
- x2="150.5"
- y2="642" />
+ id="linearGradient23845"
+ xlink:href="#linearGradient24632"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24642"
- id="linearGradient23856"
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="matrix(-0.636363,0,0,-0.6357342,320.09081,851.14655)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,0.6357342,-0.636363,0,640.81777,348.82507)"
- x1="150.5"
- y1="647.75"
- x2="150.5"
- y2="642" />
+ id="linearGradient23847"
+ xlink:href="#linearGradient24632"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24642"
- id="linearGradient23858"
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="matrix(0,-0.6357342,0.636363,0,-173.09051,543.4512)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.636363,0,0,-0.6357342,131.72737,857.41243)"
- x1="150.5"
- y1="647.75"
- x2="150.5"
- y2="642" />
+ id="linearGradient23849"
+ xlink:href="#linearGradient24632"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24642"
- id="linearGradient23860"
+ y2="623.5"
+ x2="145.5"
+ y1="627.5"
+ x1="145.5"
+ gradientTransform="matrix(0.636363,0,0,0.6357342,134.90918,50.757191)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-0.6357342,0.636363,0,-185.81777,540.18107)"
- x1="150.5"
- y1="647.75"
+ id="linearGradient23851"
+ xlink:href="#linearGradient24632"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="642"
x2="150.5"
- y2="642" />
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0.636363,0,0,0.6357342,131.72737,31.593709)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient23853"
+ xlink:href="#linearGradient24642"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient42685"
+ y2="642"
+ x2="150.5"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0,0.6357342,-0.636363,0,640.81777,348.82507)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-52.983883,-129)"
- x1="258"
- y1="388"
- x2="273"
- y2="388" />
+ id="linearGradient23856"
+ xlink:href="#linearGradient24642"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient42687"
+ y2="642"
+ x2="150.5"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0.636363,0,0,-0.6357342,131.72737,857.41243)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-48.983883,-126)"
- x1="259.75"
- y1="388"
- x2="273"
- y2="388" />
+ id="linearGradient23858"
+ xlink:href="#linearGradient24642"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient42689"
+ y2="642"
+ x2="150.5"
+ y1="647.75"
+ x1="150.5"
+ gradientTransform="matrix(0,-0.6357342,0.636363,0,-185.81777,540.18107)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-54.000005,-120)"
- x1="258.52756"
- y1="388"
- x2="279"
- y2="388" />
+ id="linearGradient23860"
+ xlink:href="#linearGradient24642"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="388"
+ x2="273"
+ y1="388"
+ x1="258"
+ gradientTransform="translate(-52.983883,-129)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient42685"
xlink:href="#linearGradient319"
- id="linearGradient42691"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="388"
+ x2="273"
+ y1="388"
+ x1="259.75"
+ gradientTransform="translate(-48.983883,-126)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-46.000005,-117)"
- x1="257.75"
+ id="linearGradient42687"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="388"
+ x2="279"
y1="388"
- x2="272"
- y2="388" />
+ x1="258.52756"
+ gradientTransform="translate(-54.000005,-120)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient42689"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23705"
- id="linearGradient22892"
+ y2="388"
+ x2="272"
+ y1="388"
+ x1="257.75"
+ gradientTransform="translate(-46.000005,-117)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(220,-20.00667)"
- x1="29.4034"
- y1="100.99999"
- x2="34.095703"
- y2="101.15624" />
+ id="linearGradient42691"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5060"
- id="linearGradient22917"
+ y2="101.15624"
+ x2="34.095703"
+ y1="100.99999"
+ x1="29.4034"
+ gradientTransform="translate(220,-20.00667)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(2,0,0,0.7333333,-467,262.53823)"
- x1="250.5"
- y1="90.253998"
+ id="linearGradient22892"
+ xlink:href="#linearGradient23705"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="95.252274"
x2="250.5"
- y2="95.252274" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="radialGradient22922"
+ y1="90.253998"
+ x1="250.5"
+ gradientTransform="matrix(2,0,0,0.7333333,-467,262.53823)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(2.4564959,0.09949388,-0.06177986,1.3917691,-283.96093,-143.81911)"
- cx="135.14931"
- cy="332.10181"
- fx="135.14931"
+ id="linearGradient22917"
+ xlink:href="#linearGradient5060"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.5"
fy="332.10181"
- r="3.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient22928"
+ fx="135.14931"
+ cy="332.10181"
+ cx="135.14931"
+ gradientTransform="matrix(2.4564959,0.09949388,-0.06177986,1.3917691,-283.96093,-143.81911)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8750002,0,0,0.83767,7.3124969,247.00379)"
- x1="27.166666"
- y1="90.504448"
+ id="radialGradient22922"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="101.14744"
x2="35.166668"
- y2="101.14744" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient18821"
- id="radialGradient22950"
+ y1="90.504448"
+ x1="27.166666"
+ gradientTransform="matrix(0.8750002,0,0,0.83767,7.3124969,247.00379)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
- cx="75.53241"
- cy="500.20956"
- fx="75.53241"
- fy="500.20956"
- r="3.1650217" />
- <radialGradient
- inkscape:collect="always"
+ id="linearGradient22928"
xlink:href="#linearGradient319"
- id="radialGradient22952"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.1650217"
+ fy="500.20956"
+ fx="75.53241"
+ cy="500.20956"
+ cx="75.53241"
+ gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.6595012,0.7907318,-0.8990144,0.7498135,144.69896,-187.59854)"
- cx="262.67139"
- cy="74.072273"
- fx="262.67139"
+ id="radialGradient22950"
+ xlink:href="#linearGradient18821"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.5"
fy="74.072273"
- r="3.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24168"
- id="linearGradient22954"
+ fx="262.67139"
+ cy="74.072273"
+ cx="262.67139"
+ gradientTransform="matrix(0.6595012,0.7907318,-0.8990144,0.7498135,144.69896,-187.59854)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.75,0,0,0.7516675,227.625,0.9640803)"
- x1="20.125"
- y1="88.642494"
- x2="34.125"
- y2="104.89799" />
- <radialGradient
- inkscape:collect="always"
+ id="radialGradient22952"
xlink:href="#linearGradient319"
- id="radialGradient23727"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="104.89799"
+ x2="34.125"
+ y1="88.642494"
+ x1="20.125"
+ gradientTransform="matrix(0.75,0,0,0.7516675,227.625,0.9640803)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(2.3687636,0.09935874,-0.05957343,1.3898788,-272.60513,-143.17133)"
- cx="140.33667"
- cy="333.05716"
- fx="140.33667"
+ id="linearGradient22954"
+ xlink:href="#linearGradient24168"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.5"
fy="333.05716"
- r="3.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37925"
- id="linearGradient23890"
+ fx="140.33667"
+ cy="333.05716"
+ cx="140.33667"
+ gradientTransform="matrix(2.3687636,0.09935874,-0.05957343,1.3898788,-272.60513,-143.17133)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(220,-20.00667)"
- x1="29.4034"
- y1="100.99999"
- x2="34.095703"
- y2="101.15624" />
+ id="radialGradient23727"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient22562"
- id="linearGradient23892"
+ y2="101.15624"
+ x2="34.095703"
+ y1="100.99999"
+ x1="29.4034"
+ gradientTransform="translate(220,-20.00667)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.75,0,0,0.7516675,227.625,0.9640803)"
- x1="20.125"
- y1="88.642494"
+ id="linearGradient23890"
+ xlink:href="#linearGradient37925"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="104.89799"
x2="34.125"
- y2="104.89799" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23906"
- id="radialGradient23894"
+ y1="88.642494"
+ x1="20.125"
+ gradientTransform="matrix(0.75,0,0,0.7516675,227.625,0.9640803)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.0553103,1.0606182,-1.2516598,1.280294,67.321819,-297.60493)"
- cx="262.07156"
- cy="74.306007"
- fx="262.07156"
+ id="linearGradient23892"
+ xlink:href="#linearGradient22562"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.5"
fy="74.306007"
- r="3.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient23896"
+ fx="262.07156"
+ cy="74.306007"
+ cx="262.07156"
+ gradientTransform="matrix(1.0553103,1.0606182,-1.2516598,1.280294,67.321819,-297.60493)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8750002,0,0,0.83767,7.3124969,247.00379)"
- x1="27.166666"
- y1="90.504448"
+ id="radialGradient23894"
+ xlink:href="#linearGradient23906"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="101.14744"
x2="35.166668"
- y2="101.14744" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient14232"
- id="radialGradient23898"
+ y1="90.504448"
+ x1="27.166666"
+ gradientTransform="matrix(0.8750002,0,0,0.83767,7.3124969,247.00379)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
- cx="75.53241"
- cy="500.20956"
- fx="75.53241"
- fy="500.20956"
- r="3.1650217" />
- <radialGradient
- inkscape:collect="always"
+ id="linearGradient23896"
xlink:href="#linearGradient319"
- id="radialGradient23900"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.1650217"
+ fy="500.20956"
+ fx="75.53241"
+ cy="500.20956"
+ cx="75.53241"
+ gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(2.4564959,0.09949388,-0.06177986,1.3917691,-283.96093,-143.81911)"
- cx="135.14931"
- cy="332.10181"
- fx="135.14931"
+ id="radialGradient23898"
+ xlink:href="#linearGradient14232"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.5"
fy="332.10181"
- r="3.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5060"
- id="linearGradient23902"
+ fx="135.14931"
+ cy="332.10181"
+ cx="135.14931"
+ gradientTransform="matrix(2.4564959,0.09949388,-0.06177986,1.3917691,-283.96093,-143.81911)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(2,0,0,0.7333333,-467,262.53823)"
- x1="250.5"
- y1="90.253998"
- x2="250.5"
- y2="95.252274" />
- <radialGradient
- inkscape:collect="always"
+ id="radialGradient23900"
xlink:href="#linearGradient319"
- id="radialGradient23904"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="95.252274"
+ x2="250.5"
+ y1="90.253998"
+ x1="250.5"
+ gradientTransform="matrix(2,0,0,0.7333333,-467,262.53823)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(2.3687636,0.09935874,-0.05957343,1.3898788,-272.60513,-143.17133)"
- cx="140.33667"
- cy="333.05716"
- fx="140.33667"
+ id="linearGradient23902"
+ xlink:href="#linearGradient5060"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.5"
fy="333.05716"
- r="3.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient42459"
- id="linearGradient24090"
+ fx="140.33667"
+ cy="333.05716"
+ cx="140.33667"
+ gradientTransform="matrix(2.3687636,0.09935874,-0.05957343,1.3898788,-272.60513,-143.17133)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(220,-20.00667)"
- x1="29.4034"
- y1="100.99999"
- x2="34.095703"
- y2="101.15624" />
+ id="radialGradient23904"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient22562"
- id="linearGradient24092"
+ y2="101.15624"
+ x2="34.095703"
+ y1="100.99999"
+ x1="29.4034"
+ gradientTransform="translate(220,-20.00667)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.75,0,0,0.7516675,227.625,0.9640803)"
- x1="20.125"
- y1="88.642494"
+ id="linearGradient24090"
+ xlink:href="#linearGradient42459"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="104.89799"
x2="34.125"
- y2="104.89799" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="radialGradient24094"
+ y1="88.642494"
+ x1="20.125"
+ gradientTransform="matrix(0.75,0,0,0.7516675,227.625,0.9640803)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.6595012,0.7907318,-0.8990144,0.7498135,144.69896,-187.59854)"
- cx="263.21707"
- cy="74.441246"
- fx="263.21707"
+ id="linearGradient24092"
+ xlink:href="#linearGradient22562"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.5"
fy="74.441246"
- r="3.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient24096"
+ fx="263.21707"
+ cy="74.441246"
+ cx="263.21707"
+ gradientTransform="matrix(0.6595012,0.7907318,-0.8990144,0.7498135,144.69896,-187.59854)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8750002,0,0,0.83767,7.3124969,247.00379)"
- x1="27.166666"
- y1="90.504448"
+ id="radialGradient24094"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="101.14744"
x2="35.166668"
- y2="101.14744" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient18821"
- id="radialGradient24098"
+ y1="90.504448"
+ x1="27.166666"
+ gradientTransform="matrix(0.8750002,0,0,0.83767,7.3124969,247.00379)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
- cx="75.53241"
- cy="500.20956"
- fx="75.53241"
- fy="500.20956"
- r="3.1650217" />
- <radialGradient
- inkscape:collect="always"
+ id="linearGradient24096"
xlink:href="#linearGradient319"
- id="radialGradient24100"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.1650217"
+ fy="500.20956"
+ fx="75.53241"
+ cy="500.20956"
+ cx="75.53241"
+ gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(2.4564959,0.09949388,-0.06177986,1.3917691,-283.96093,-143.81911)"
- cx="135.14931"
- cy="332.10181"
- fx="135.14931"
+ id="radialGradient24098"
+ xlink:href="#linearGradient18821"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.5"
fy="332.10181"
- r="3.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5060"
- id="linearGradient24102"
+ fx="135.14931"
+ cy="332.10181"
+ cx="135.14931"
+ gradientTransform="matrix(2.4564959,0.09949388,-0.06177986,1.3917691,-283.96093,-143.81911)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(2,0,0,0.7333333,-467,262.53823)"
- x1="250.5"
- y1="90.253998"
- x2="250.5"
- y2="95.252274" />
- <radialGradient
- inkscape:collect="always"
+ id="radialGradient24100"
xlink:href="#linearGradient319"
- id="radialGradient24104"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="95.252274"
+ x2="250.5"
+ y1="90.253998"
+ x1="250.5"
+ gradientTransform="matrix(2,0,0,0.7333333,-467,262.53823)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(2.3687636,0.09935874,-0.05957343,1.3898788,-272.60513,-143.17133)"
- cx="140.33667"
- cy="333.05716"
- fx="140.33667"
+ id="linearGradient24102"
+ xlink:href="#linearGradient5060"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.5"
fy="333.05716"
- r="3.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient24317"
+ fx="140.33667"
+ cy="333.05716"
+ cx="140.33667"
+ gradientTransform="matrix(2.3687636,0.09935874,-0.05957343,1.3898788,-272.60513,-143.17133)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.831045,0,0,0.776773,36.146465,141.05131)"
- x1="71.762154"
- y1="239.83469"
- x2="76.956871"
- y2="252.05081" />
- <linearGradient
- inkscape:collect="always"
+ id="radialGradient24104"
xlink:href="#linearGradient319"
- id="linearGradient24319"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.831045,0,0,0.776773,36.165705,133.02478)"
- x1="72.340698"
- y1="243.03008"
- x2="73.234337"
- y2="246.81651" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient24321"
+ y2="252.05081"
+ x2="76.956871"
+ y1="239.83469"
+ x1="71.762154"
+ gradientTransform="matrix(0.831045,0,0,0.776773,36.146465,141.05131)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.831045,0,0,0.776773,36.165705,133.02478)"
- x1="66.954422"
- y1="240.03282"
- x2="68.458534"
- y2="246.96069" />
+ id="linearGradient24317"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="246.81651"
+ x2="73.234337"
+ y1="243.03008"
+ x1="72.340698"
+ gradientTransform="matrix(0.831045,0,0,0.776773,36.165705,133.02478)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient24319"
xlink:href="#linearGradient319"
- id="linearGradient24362"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="246.96069"
+ x2="68.458534"
+ y1="240.03282"
+ x1="66.954422"
+ gradientTransform="matrix(0.831045,0,0,0.776773,36.165705,133.02478)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-335,238.99245)"
- x1="426.12415"
- y1="179.12074"
- x2="425"
- y2="179.12285" />
+ id="linearGradient24321"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24143"
- id="linearGradient24367"
+ y2="179.12285"
+ x2="425"
+ y1="179.12074"
+ x1="426.12415"
+ gradientTransform="translate(-335,238.99245)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-149,133.99245)"
- x1="244.37868"
- y1="285.00754"
- x2="237.75459"
- y2="266.34406" />
+ id="linearGradient24362"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24695"
- id="linearGradient24374"
+ y2="266.34406"
+ x2="237.75459"
+ y1="285.00754"
+ x1="244.37868"
+ gradientTransform="translate(-149,133.99245)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.043478,0,0,0.956667,-30.15217,152.41412)"
- x1="120.97597"
- y1="281.26645"
- x2="116.37123"
- y2="260.21841" />
+ id="linearGradient24367"
+ xlink:href="#linearGradient24143"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030"
- id="linearGradient24436"
+ y2="260.21841"
+ x2="116.37123"
+ y1="281.26645"
+ x1="120.97597"
+ gradientTransform="matrix(1.043478,0,0,0.956667,-30.15217,152.41412)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,-1,-150.99992,596.00357)"
- x1="199.87271"
- y1="272.29477"
- x2="212.22493"
- y2="287.50357" />
+ id="linearGradient24374"
+ xlink:href="#linearGradient24695"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24727"
- id="linearGradient24809"
+ y2="287.50357"
+ x2="212.22493"
+ y1="272.29477"
+ x1="199.87271"
+ gradientTransform="matrix(1,0,0,-1,-150.99992,596.00357)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.043478,0,0,0.956667,765.84783,-274.57833)"
- x1="59.158501"
- y1="437.02835"
- x2="45.021851"
- y2="349.81818" />
+ id="linearGradient24436"
+ xlink:href="#linearGradient9030"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24735"
- id="linearGradient24811"
+ y2="349.81818"
+ x2="45.021851"
+ y1="437.02835"
+ x1="59.158501"
+ gradientTransform="matrix(1.043478,0,0,0.956667,765.84783,-274.57833)"
gradientUnits="userSpaceOnUse"
- x1="807"
- y1="101.5"
- x2="841"
- y2="101.5" />
+ id="linearGradient24809"
+ xlink:href="#linearGradient24727"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24711"
- id="linearGradient24813"
+ y2="101.5"
+ x2="841"
+ y1="101.5"
+ x1="807"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.043478,0,0,0.956667,767.34783,-275.07833)"
- x1="63.539974"
- y1="421.80756"
- x2="63.407566"
- y2="347.78201" />
+ id="linearGradient24811"
+ xlink:href="#linearGradient24735"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient24815"
+ y2="347.78201"
+ x2="63.407566"
+ y1="421.80756"
+ x1="63.539974"
+ gradientTransform="matrix(1.043478,0,0,0.956667,767.34783,-275.07833)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-127,4e-6)"
- x1="954"
- y1="102"
- x2="936"
- y2="114.99999" />
+ id="linearGradient24813"
+ xlink:href="#linearGradient24711"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24727"
- id="linearGradient24839"
+ y2="114.99999"
+ x2="936"
+ y1="102"
+ x1="954"
+ gradientTransform="translate(-127,4e-6)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.043478,0,0,0.956667,765.84783,-274.57833)"
- x1="59.158501"
- y1="437.02835"
- x2="45.021851"
- y2="349.81818" />
+ id="linearGradient24815"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24735"
- id="linearGradient24841"
+ y2="349.81818"
+ x2="45.021851"
+ y1="437.02835"
+ x1="59.158501"
+ gradientTransform="matrix(1.043478,0,0,0.956667,765.84783,-274.57833)"
gradientUnits="userSpaceOnUse"
- x1="807"
- y1="101.5"
- x2="841"
- y2="101.5" />
+ id="linearGradient24839"
+ xlink:href="#linearGradient24727"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24144"
- id="linearGradient24843"
+ y2="101.5"
+ x2="841"
+ y1="101.5"
+ x1="807"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.043478,0,0,0.956667,767.34783,-275.07833)"
- x1="64.019142"
- y1="419.06366"
- x2="63.407566"
- y2="347.78201" />
+ id="linearGradient24841"
+ xlink:href="#linearGradient24735"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient24845"
+ y2="347.78201"
+ x2="63.407566"
+ y1="419.06366"
+ x1="64.019142"
+ gradientTransform="matrix(1.043478,0,0,0.956667,767.34783,-275.07833)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-127,4e-6)"
- x1="954"
- y1="102"
- x2="936"
- y2="114.99999" />
+ id="linearGradient24843"
+ xlink:href="#linearGradient24144"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24727"
- id="linearGradient24867"
+ y2="114.99999"
+ x2="936"
+ y1="102"
+ x1="954"
+ gradientTransform="translate(-127,4e-6)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.043478,0,0,0.956667,765.84783,-274.57833)"
- x1="59.158501"
- y1="437.02835"
- x2="45.021851"
- y2="349.81818" />
+ id="linearGradient24845"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24735"
- id="linearGradient24869"
+ y2="349.81818"
+ x2="45.021851"
+ y1="437.02835"
+ x1="59.158501"
+ gradientTransform="matrix(1.043478,0,0,0.956667,765.84783,-274.57833)"
gradientUnits="userSpaceOnUse"
- x1="807"
- y1="101.5"
- x2="841"
- y2="101.5" />
+ id="linearGradient24867"
+ xlink:href="#linearGradient24727"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24711"
- id="linearGradient24871"
+ y2="101.5"
+ x2="841"
+ y1="101.5"
+ x1="807"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.043478,0,0,0.956667,767.34783,-275.07833)"
- x1="63.659767"
- y1="422.46088"
- x2="63.407566"
- y2="347.78201" />
+ id="linearGradient24869"
+ xlink:href="#linearGradient24735"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient24873"
+ y2="347.78201"
+ x2="63.407566"
+ y1="422.46088"
+ x1="63.659767"
+ gradientTransform="matrix(1.043478,0,0,0.956667,767.34783,-275.07833)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-127,4e-6)"
- x1="954"
- y1="102"
- x2="936"
- y2="114.99999" />
+ id="linearGradient24871"
+ xlink:href="#linearGradient24711"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24679"
- id="linearGradient25073"
+ y2="114.99999"
+ x2="936"
+ y1="102"
+ x1="954"
+ gradientTransform="translate(-127,4e-6)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.043478,0,0,0.956667,-30.15217,152.41412)"
- x1="121.79003"
- y1="283.00519"
- x2="114.66669"
- y2="250.69945" />
+ id="linearGradient24873"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24671"
- id="linearGradient25075"
+ y2="250.69945"
+ x2="114.66669"
+ y1="283.00519"
+ x1="121.79003"
+ gradientTransform="matrix(1.043478,0,0,0.956667,-30.15217,152.41412)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-149,133.99245)"
- x1="243.25"
- y1="283.94504"
- x2="235"
- y2="253.00755" />
+ id="linearGradient25073"
+ xlink:href="#linearGradient24679"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient25077"
+ y2="253.00755"
+ x2="235"
+ y1="283.94504"
+ x1="243.25"
+ gradientTransform="translate(-149,133.99245)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-335,238.99245)"
- x1="426.12415"
- y1="179.12074"
- x2="425"
- y2="179.12285" />
+ id="linearGradient25075"
+ xlink:href="#linearGradient24671"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24679"
- id="linearGradient42055"
+ y2="179.12285"
+ x2="425"
+ y1="179.12074"
+ x1="426.12415"
+ gradientTransform="translate(-335,238.99245)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.043478,0,0,0.956667,-30.15217,152.41412)"
- x1="120.94298"
- y1="281.27435"
- x2="114.66669"
- y2="250.69945" />
+ id="linearGradient25077"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24671"
- id="linearGradient42057"
+ y2="250.69945"
+ x2="114.66669"
+ y1="281.27435"
+ x1="120.94298"
+ gradientTransform="matrix(1.043478,0,0,0.956667,-30.15217,152.41412)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-149,133.99245)"
- x1="243.25"
- y1="283.94504"
- x2="235"
- y2="253.00755" />
+ id="linearGradient42055"
+ xlink:href="#linearGradient24679"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient42059"
+ y2="253.00755"
+ x2="235"
+ y1="283.94504"
+ x1="243.25"
+ gradientTransform="translate(-149,133.99245)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-335,238.99245)"
- x1="426.12415"
- y1="179.12074"
- x2="425"
- y2="179.12285" />
+ id="linearGradient42057"
+ xlink:href="#linearGradient24671"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24101"
- id="linearGradient24132"
+ y2="179.12285"
+ x2="425"
+ y1="179.12074"
+ x1="426.12415"
+ gradientTransform="translate(-335,238.99245)"
gradientUnits="userSpaceOnUse"
- x1="445.77841"
- y1="113.24564"
- x2="426.11459"
- y2="84.777061" />
- <radialGradient
- inkscape:collect="always"
+ id="linearGradient42059"
xlink:href="#linearGradient319"
- id="radialGradient24599"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="84.777061"
+ x2="426.11459"
+ y1="113.24564"
+ x1="445.77841"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.1489145,-0.69297,0.4772363,0.7912359,-113.08929,303.20064)"
- cx="269.71231"
- cy="237.2262"
- fx="269.71231"
- fy="237.2262"
- r="7.03125" />
+ id="linearGradient24132"
+ xlink:href="#linearGradient24101"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="radialGradient24632"
+ r="7.03125"
+ fy="237.2262"
+ fx="269.71231"
+ cy="237.2262"
+ cx="269.71231"
+ gradientTransform="matrix(1.1489145,-0.69297,0.4772363,0.7912359,-113.08929,303.20064)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.7236207,-0.7167103,1.004637,1.0143218,-131.254,253.93955)"
- cx="262.83905"
- cy="245.91792"
- fx="262.83905"
+ id="radialGradient24599"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <radialGradient
+ r="7.03125"
fy="245.91792"
- r="7.03125" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient31456"
- id="linearGradient24797"
+ fx="262.83905"
+ cy="245.91792"
+ cx="262.83905"
+ gradientTransform="matrix(0.7236207,-0.7167103,1.004637,1.0143218,-131.254,253.93955)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9897912,0,0,0.9897912,2.2765631,2.9503441)"
- x1="311.3967"
- y1="310.77368"
+ id="radialGradient24632"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="308.51169"
x2="309.02371"
- y2="308.51169" />
+ y1="310.77368"
+ x1="311.3967"
+ gradientTransform="matrix(0.9897912,0,0,0.9897912,2.2765631,2.9503441)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient24797"
+ xlink:href="#linearGradient31456"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient24820"
- x1="311.37668"
- y1="311.88205"
- x2="307.5"
+ gradientUnits="userSpaceOnUse"
y2="308.21875"
- gradientUnits="userSpaceOnUse" />
+ x2="307.5"
+ y1="311.88205"
+ x1="311.37668"
+ id="linearGradient24820"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20036"
- id="radialGradient43962"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.4011721,0.3766097,-0.7099042,0.7562044,179.21454,-58.566632)"
- cx="207.04807"
- cy="78.473343"
- fx="207.04807"
+ r="3.5"
fy="78.473343"
- r="3.5" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20036"
- id="radialGradient43964"
+ fx="207.04807"
+ cy="78.473343"
+ cx="207.04807"
+ gradientTransform="matrix(0.4011721,0.3766097,-0.7099042,0.7562044,179.21454,-58.566632)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.4543499,0.4687811,-0.6244606,0.6052369,161.562,-65.729731)"
- cx="206.39249"
- cy="78.443413"
- fx="206.39249"
+ id="radialGradient43962"
+ xlink:href="#linearGradient20036"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.5"
fy="78.443413"
- r="3.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient62436"
+ fx="206.39249"
+ cy="78.443413"
+ cx="206.39249"
+ gradientTransform="matrix(0.4543499,0.4687811,-0.6244606,0.6052369,161.562,-65.729731)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-1,0)"
- x1="248.69196"
- y1="279.72827"
- x2="269.3085"
- y2="303.10999" />
+ id="radialGradient43964"
+ xlink:href="#linearGradient20036"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient62558"
+ y2="303.10999"
+ x2="269.3085"
+ y1="279.72827"
+ x1="248.69196"
+ gradientTransform="translate(-1,0)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,1,1,0,-33.03632,32.03632)"
- x1="289.61554"
- y1="320.55179"
- x2="250.22783"
- y2="282.28745" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient62436"
xlink:href="#linearGradient319"
- id="linearGradient62560"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-1,1,0,59,638)"
- x1="354.50601"
- y1="283.61511"
- x2="327.92044"
- y2="300.96124" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient25381"
+ y2="282.28745"
+ x2="250.22783"
+ y1="320.55179"
+ x1="289.61554"
+ gradientTransform="matrix(0,1,1,0,-33.03632,32.03632)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-1,21)"
- x1="342"
- y1="288.5"
- x2="344.5"
- y2="288.5" />
+ id="linearGradient62558"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient25383"
+ y2="300.96124"
+ x2="327.92044"
+ y1="283.61511"
+ x1="354.50601"
+ gradientTransform="matrix(0,-1,1,0,59,638)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,1,-1,0,638,-40)"
- x1="342"
- y1="288.5"
- x2="344.5"
- y2="288.5" />
+ id="linearGradient62560"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient25385"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,-1,699,599)"
- x1="342"
- y1="288.5"
+ y2="288.5"
x2="344.5"
- y2="288.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient25387"
+ y1="288.5"
+ x1="342"
+ gradientTransform="translate(-1,21)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-1,1,0,60,660)"
+ id="linearGradient25381"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="288.5"
+ x2="344.5"
+ y1="288.5"
x1="342"
+ gradientTransform="matrix(0,1,-1,0,638,-40)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient25383"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="288.5"
+ x2="344.5"
y1="288.5"
+ x1="342"
+ gradientTransform="matrix(-1,0,0,-1,699,599)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient25385"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="288.5"
x2="344.5"
- y2="288.5" />
+ y1="288.5"
+ x1="342"
+ gradientTransform="matrix(0,-1,1,0,60,660)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient25387"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<mask
- maskUnits="userSpaceOnUse"
- id="mask25369">
+ id="mask25369"
+ maskUnits="userSpaceOnUse">
<g
- id="g25371"
- transform="translate(-21,-21)">
+ transform="translate(-21,-21)"
+ id="g25371">
<path
- style="fill:url(#linearGradient25381);fill-rule:evenodd;stroke:none"
- d="m 341,302 8,8 -8,8 0,-16 z"
- id="path25373"
- sodipodi:nodetypes="cccc"
+ inkscape:connector-curvature="0"
inkscape:transform-center-x="4"
- inkscape:connector-curvature="0" />
- <path
- inkscape:transform-center-y="-4"
sodipodi:nodetypes="cccc"
- id="path25375"
- d="m 357,302 -8,8 -8,-8 16,0 z"
- style="fill:url(#linearGradient25383);fill-rule:evenodd;stroke:none"
- inkscape:connector-curvature="0" />
+ id="path25373"
+ d="m 341,302 8,8 -8,8 0,-16 z"
+ style="fill:url(#linearGradient25381);fill-rule:evenodd;stroke:none" />
<path
- inkscape:transform-center-x="-4"
+ inkscape:connector-curvature="0"
+ style="fill:url(#linearGradient25383);fill-rule:evenodd;stroke:none"
+ d="m 357,302 -8,8 -8,-8 16,0 z"
+ id="path25375"
sodipodi:nodetypes="cccc"
- id="path25377"
- d="m 357,318 -8,-8 8,-8 0,16 z"
- style="fill:url(#linearGradient25385);fill-rule:evenodd;stroke:none"
- inkscape:connector-curvature="0" />
+ inkscape:transform-center-y="-4" />
<path
- inkscape:transform-center-y="4"
+ inkscape:connector-curvature="0"
+ style="fill:url(#linearGradient25385);fill-rule:evenodd;stroke:none"
+ d="m 357,318 -8,-8 8,-8 0,16 z"
+ id="path25377"
sodipodi:nodetypes="cccc"
- id="path25379"
- d="m 341,318 8,-8 8,8 -16,0 z"
+ inkscape:transform-center-x="-4" />
+ <path
+ inkscape:connector-curvature="0"
style="fill:url(#linearGradient25387);fill-rule:evenodd;stroke:none"
- inkscape:connector-curvature="0" />
+ d="m 341,318 8,-8 8,8 -16,0 z"
+ id="path25379"
+ sodipodi:nodetypes="cccc"
+ inkscape:transform-center-y="4" />
</g>
</mask>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient25573"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-1,21)"
- x1="342"
- y1="288.5"
+ y2="288.5"
x2="344.01321"
- y2="288.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient25575"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,1,-1,0,638,-40)"
- x1="342"
y1="288.5"
- x2="344.5"
- y2="288.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient25577"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,-1,699,599)"
x1="342"
- y1="288.5"
- x2="344.5"
- y2="288.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient25579"
+ gradientTransform="translate(-1,21)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-1,1,0,60,660)"
+ id="linearGradient25573"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="288.5"
+ x2="344.5"
+ y1="288.5"
x1="342"
+ gradientTransform="matrix(0,1,-1,0,638,-40)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient25575"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="288.5"
+ x2="344.5"
y1="288.5"
+ x1="342"
+ gradientTransform="matrix(-1,0,0,-1,699,599)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient25577"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="288.5"
x2="344.5"
- y2="288.5" />
+ y1="288.5"
+ x1="342"
+ gradientTransform="matrix(0,-1,1,0,60,660)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient25579"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<mask
- maskUnits="userSpaceOnUse"
- id="mask25561">
+ id="mask25561"
+ maskUnits="userSpaceOnUse">
<g
- transform="translate(-21,-21)"
- id="g25563">
+ id="g25563"
+ transform="translate(-21,-21)">
<path
- inkscape:transform-center-x="4"
- sodipodi:nodetypes="cccc"
- id="path25565"
- d="m 341,302 8,8 -8,8 0,-16 z"
+ inkscape:connector-curvature="0"
style="fill:url(#linearGradient25573);fill-rule:evenodd;stroke:none"
- inkscape:connector-curvature="0" />
- <path
- style="fill:url(#linearGradient25575);fill-rule:evenodd;stroke:none"
- d="m 357,302 -8,8 -8,-8 16,0 z"
- id="path25567"
+ d="m 341,302 8,8 -8,8 0,-16 z"
+ id="path25565"
sodipodi:nodetypes="cccc"
- inkscape:transform-center-y="-4"
- inkscape:connector-curvature="0" />
+ inkscape:transform-center-x="4" />
<path
- style="fill:url(#linearGradient25577);fill-rule:evenodd;stroke:none"
- d="m 357,318 -8,-8 8,-8 0,16 z"
- id="path25569"
+ inkscape:connector-curvature="0"
+ inkscape:transform-center-y="-4"
sodipodi:nodetypes="cccc"
- inkscape:transform-center-x="-4"
- inkscape:connector-curvature="0" />
+ id="path25567"
+ d="m 357,302 -8,8 -8,-8 16,0 z"
+ style="fill:url(#linearGradient25575);fill-rule:evenodd;stroke:none" />
<path
- style="fill:url(#linearGradient25579);fill-rule:evenodd;stroke:none"
- d="m 341,318 8,-8 8,8 -16,0 z"
- id="path25571"
+ inkscape:connector-curvature="0"
+ inkscape:transform-center-x="-4"
sodipodi:nodetypes="cccc"
+ id="path25569"
+ d="m 357,318 -8,-8 8,-8 0,16 z"
+ style="fill:url(#linearGradient25577);fill-rule:evenodd;stroke:none" />
+ <path
+ inkscape:connector-curvature="0"
inkscape:transform-center-y="4"
- inkscape:connector-curvature="0" />
+ sodipodi:nodetypes="cccc"
+ id="path25571"
+ d="m 341,318 8,-8 8,8 -16,0 z"
+ style="fill:url(#linearGradient25579);fill-rule:evenodd;stroke:none" />
</g>
</mask>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient25872"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.888889,0,0,1,513.5,328.50451)"
- x1="253.78497"
- y1="3.6831069"
+ y2="30.023426"
x2="278.25537"
- y2="30.023426" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient58334"
- id="linearGradient25874"
+ y1="3.6831069"
+ x1="253.78497"
+ gradientTransform="matrix(0.888889,0,0,1,513.5,328.50451)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(670,111)"
- x1="87"
- y1="241.125"
- x2="93.0625"
- y2="249" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient25872"
xlink:href="#linearGradient1610"
- id="linearGradient25886"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.888889,0,0,1,673.5,170.50451)"
- x1="243.92192"
- y1="-2.6686089"
- x2="275.10107"
- y2="26.600887" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient58334"
- id="linearGradient25888"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(830,-47)"
- x1="87"
- y1="241.125"
+ y2="249"
x2="93.0625"
- y2="249" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient13998"
- id="linearGradient25890"
+ y1="241.125"
+ x1="87"
+ gradientTransform="translate(670,111)"
gradientUnits="userSpaceOnUse"
- x1="13.5"
- y1="57.827747"
- x2="11.472005"
- y2="53.875874" />
+ id="linearGradient25874"
+ xlink:href="#linearGradient58334"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient13998"
- id="linearGradient25892"
+ y2="26.600887"
+ x2="275.10107"
+ y1="-2.6686089"
+ x1="243.92192"
+ gradientTransform="matrix(0.888889,0,0,1,673.5,170.50451)"
gradientUnits="userSpaceOnUse"
- x1="-18.600719"
- y1="501.96539"
- x2="-26.642899"
- y2="487.60382" />
+ id="linearGradient25886"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient25894"
+ y2="249"
+ x2="93.0625"
+ y1="241.125"
+ x1="87"
+ gradientTransform="translate(830,-47)"
gradientUnits="userSpaceOnUse"
- x1="15.027407"
- y1="60.637787"
- x2="13.5"
- y2="57.750687" />
+ id="linearGradient25888"
+ xlink:href="#linearGradient58334"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient25897"
+ y2="53.875874"
+ x2="11.472005"
+ y1="57.827747"
+ x1="13.5"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0.03018343,0.1408617)"
- x1="-32.067383"
- y1="490.70178"
- x2="-22.25"
- y2="500" />
+ id="linearGradient25890"
+ xlink:href="#linearGradient13998"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient25899"
+ y2="487.60382"
+ x2="-26.642899"
+ y1="501.96539"
+ x1="-18.600719"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,-72.000001)"
- x1="753.39417"
- y1="299.83005"
- x2="758"
- y2="305" />
+ id="linearGradient25892"
+ xlink:href="#linearGradient13998"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24679"
- id="linearGradient25927"
+ y2="57.750687"
+ x2="13.5"
+ y1="60.637787"
+ x1="15.027407"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.043478,0,0,0.956667,-30.15217,152.41412)"
- x1="121.79003"
- y1="283.00519"
- x2="114.66669"
- y2="250.69945" />
+ id="linearGradient25894"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24671"
- id="linearGradient25929"
+ y2="500"
+ x2="-22.25"
+ y1="490.70178"
+ x1="-32.067383"
+ gradientTransform="translate(0.03018343,0.1408617)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-149,133.99245)"
- x1="243.25"
- y1="283.94504"
- x2="235"
- y2="253.00755" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient25897"
xlink:href="#linearGradient319"
- id="linearGradient25931"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-335,238.99245)"
- x1="426.12415"
- y1="179.12074"
- x2="425"
- y2="179.12285" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient25957"
+ y2="305"
+ x2="758"
+ y1="299.83005"
+ x1="753.39417"
+ gradientTransform="translate(0,-72.000001)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.888889,0,0,1,673.5,170.50451)"
- x1="253.78497"
- y1="3.6831069"
- x2="278.25537"
- y2="30.023426" />
+ id="linearGradient25899"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient58334"
- id="linearGradient25959"
+ y2="250.69945"
+ x2="114.66669"
+ y1="283.00519"
+ x1="121.79003"
+ gradientTransform="matrix(1.043478,0,0,0.956667,-30.15217,152.41412)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(830,-47)"
- x1="87"
- y1="241.125"
- x2="93.0625"
- y2="249" />
+ id="linearGradient25927"
+ xlink:href="#linearGradient24679"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient25961"
+ y2="253.00755"
+ x2="235"
+ y1="283.94504"
+ x1="243.25"
+ gradientTransform="translate(-149,133.99245)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-136,-112)"
- x1="753.39417"
- y1="299.83005"
- x2="758"
- y2="305" />
+ id="linearGradient25929"
+ xlink:href="#linearGradient24671"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient25982"
+ y2="179.12285"
+ x2="425"
+ y1="179.12074"
+ x1="426.12415"
+ gradientTransform="translate(-335,238.99245)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.888889,0,0,1,673.5,170.50451)"
- x1="253.78497"
- y1="3.6831069"
- x2="278.25537"
- y2="30.023426" />
+ id="linearGradient25931"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient58334"
- id="linearGradient25984"
+ y2="30.023426"
+ x2="278.25537"
+ y1="3.6831069"
+ x1="253.78497"
+ gradientTransform="matrix(0.888889,0,0,1,673.5,170.50451)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(830,-47)"
- x1="87"
- y1="241.125"
- x2="93.0625"
- y2="249" />
+ id="linearGradient25957"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient25986"
+ y2="249"
+ x2="93.0625"
+ y1="241.125"
+ x1="87"
+ gradientTransform="translate(830,-47)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-136,-88.000005)"
- x1="753.39417"
- y1="299.83005"
- x2="758"
- y2="305" />
+ id="linearGradient25959"
+ xlink:href="#linearGradient58334"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient26011"
+ y2="305"
+ x2="758"
+ y1="299.83005"
+ x1="753.39417"
+ gradientTransform="translate(-136,-112)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.888889,0,0,1,673.5,170.50451)"
- x1="253.78497"
- y1="3.6831069"
- x2="278.25537"
- y2="30.023426" />
+ id="linearGradient25961"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient58334"
- id="linearGradient26013"
+ y2="30.023426"
+ x2="278.25537"
+ y1="3.6831069"
+ x1="253.78497"
+ gradientTransform="matrix(0.888889,0,0,1,673.5,170.50451)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(830,-47)"
- x1="87"
- y1="241.125"
- x2="93.0625"
- y2="249" />
+ id="linearGradient25982"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient26015"
+ y2="249"
+ x2="93.0625"
+ y1="241.125"
+ x1="87"
+ gradientTransform="translate(830,-47)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-112,-76.000004)"
- x1="753.39417"
- y1="299.83005"
- x2="758"
- y2="305" />
+ id="linearGradient25984"
+ xlink:href="#linearGradient58334"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient26077"
+ y2="305"
+ x2="758"
+ y1="299.83005"
+ x1="753.39417"
+ gradientTransform="translate(-136,-88.000005)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.923955,0,0,1,82.8792,399.00004)"
- x1="-7.445384"
- y1="204.24995"
- x2="33.682159"
- y2="250.99995" />
+ id="linearGradient25986"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient26079"
+ y2="30.023426"
+ x2="278.25537"
+ y1="3.6831069"
+ x1="253.78497"
+ gradientTransform="matrix(0.888889,0,0,1,673.5,170.50451)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(80.02752,483.00004)"
- x1="29.972469"
- y1="164"
- x2="36.972481"
- y2="168.00002" />
+ id="linearGradient26011"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient26081"
+ y2="249"
+ x2="93.0625"
+ y1="241.125"
+ x1="87"
+ gradientTransform="translate(830,-47)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-224,-1290)"
- x1="113"
- y1="646"
- x2="111"
- y2="644" />
+ id="linearGradient26013"
+ xlink:href="#linearGradient58334"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient26083"
+ y2="305"
+ x2="758"
+ y1="299.83005"
+ x1="753.39417"
+ gradientTransform="translate(-112,-76.000004)"
gradientUnits="userSpaceOnUse"
- x1="113"
- y1="646"
- x2="111.5"
- y2="644.5" />
+ id="linearGradient26015"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient26126"
+ y2="250.99995"
+ x2="33.682159"
+ y1="204.24995"
+ x1="-7.445384"
+ gradientTransform="matrix(0.923955,0,0,1,82.8792,399.00004)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.831045,0,0,0.776773,36.146465,141.05131)"
- x1="71.762154"
- y1="239.83469"
- x2="76.956871"
- y2="252.05081" />
+ id="linearGradient26077"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="168.00002"
+ x2="36.972481"
+ y1="164"
+ x1="29.972469"
+ gradientTransform="translate(80.02752,483.00004)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient26079"
xlink:href="#linearGradient319"
- id="linearGradient26128"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="644"
+ x2="111"
+ y1="646"
+ x1="113"
+ gradientTransform="translate(-224,-1290)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.831045,0,0,0.776773,36.165705,133.02478)"
- x1="72.340698"
- y1="243.03008"
- x2="73.234337"
- y2="246.81651" />
+ id="linearGradient26081"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="644.5"
+ x2="111.5"
+ y1="646"
+ x1="113"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient26083"
xlink:href="#linearGradient319"
- id="linearGradient26130"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="252.05081"
+ x2="76.956871"
+ y1="239.83469"
+ x1="71.762154"
+ gradientTransform="matrix(0.831045,0,0,0.776773,36.146465,141.05131)"
gradientUnits="userSpaceOnUse"
+ id="linearGradient26126"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="246.81651"
+ x2="73.234337"
+ y1="243.03008"
+ x1="72.340698"
gradientTransform="matrix(0.831045,0,0,0.776773,36.165705,133.02478)"
- x1="68.383354"
- y1="239.95235"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient26128"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="247.29691"
x2="69.285805"
- y2="247.29691" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="radialGradient27973"
+ y1="239.95235"
+ x1="68.383354"
+ gradientTransform="matrix(0.831045,0,0,0.776773,36.165705,133.02478)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.39459,-0.991726,0.917787,0.36517,234.80511,750.0215)"
- cx="450.06522"
- cy="25.190212"
- fx="450.06522"
- fy="25.190212"
- r="5.5" />
- <radialGradient
- inkscape:collect="always"
+ id="linearGradient26130"
xlink:href="#linearGradient319"
- id="radialGradient27975"
+ inkscape:collect="always" />
+ <radialGradient
+ r="5.5"
+ fy="25.190212"
+ fx="450.06522"
+ cy="25.190212"
+ cx="450.06522"
+ gradientTransform="matrix(0.39459,-0.991726,0.917787,0.36517,234.80511,750.0215)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.121304,-0.696283,0.871429,0.151818,359.51331,621.7)"
- cx="450.72842"
- cy="19.250505"
- fx="450.72842"
+ id="radialGradient27973"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
+ <radialGradient
+ r="5.5"
fy="19.250505"
- r="5.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient27977"
+ fx="450.72842"
+ cy="19.250505"
+ cx="450.72842"
+ gradientTransform="matrix(0.121304,-0.696283,0.871429,0.151818,359.51331,621.7)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,1,883.51417,295)"
- x1="456.81198"
- y1="15.545153"
- x2="441.9628"
- y2="13.21724" />
- <linearGradient
- inkscape:collect="always"
+ id="radialGradient27975"
xlink:href="#linearGradient319"
- id="linearGradient28099"
- gradientUnits="userSpaceOnUse"
- x1="62.793919"
- y1="133.73566"
- x2="64.109718"
- y2="135.18265" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient28107"
+ y2="13.21724"
+ x2="441.9628"
+ y1="15.545153"
+ x1="456.81198"
+ gradientTransform="matrix(-1,0,0,1,883.51417,295)"
gradientUnits="userSpaceOnUse"
- x1="461.66425"
- y1="16.23234"
- x2="432.875"
- y2="14.936845"
- gradientTransform="translate(-19,294.91429)" />
+ id="linearGradient27977"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient27448"
+ y2="135.18265"
+ x2="64.109718"
+ y1="133.73566"
+ x1="62.793919"
gradientUnits="userSpaceOnUse"
+ id="linearGradient28099"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
gradientTransform="translate(-19,294.91429)"
- x1="461.66425"
- y1="16.23234"
+ y2="14.936845"
x2="432.875"
- y2="14.936845" />
+ y1="16.23234"
+ x1="461.66425"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient28107"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient27450"
+ y2="14.936845"
+ x2="432.875"
+ y1="16.23234"
+ x1="461.66425"
+ gradientTransform="translate(-19,294.91429)"
gradientUnits="userSpaceOnUse"
- x1="62.793919"
- y1="133.73566"
+ id="linearGradient27448"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="135.18265"
x2="64.109718"
- y2="135.18265" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="radialGradient27452"
+ y1="133.73566"
+ x1="62.793919"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.39459,-0.991726,0.917787,0.36517,234.80511,750.0215)"
- cx="450.06522"
- cy="25.190212"
- fx="450.06522"
- fy="25.190212"
- r="5.5" />
- <radialGradient
- inkscape:collect="always"
+ id="linearGradient27450"
xlink:href="#linearGradient319"
- id="radialGradient27454"
+ inkscape:collect="always" />
+ <radialGradient
+ r="5.5"
+ fy="25.190212"
+ fx="450.06522"
+ cy="25.190212"
+ cx="450.06522"
+ gradientTransform="matrix(0.39459,-0.991726,0.917787,0.36517,234.80511,750.0215)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.121304,-0.696283,0.871429,0.151818,359.51331,621.7)"
- cx="450.72842"
- cy="19.250505"
- fx="450.72842"
+ id="radialGradient27452"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
+ <radialGradient
+ r="5.5"
fy="19.250505"
- r="5.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient27456"
+ fx="450.72842"
+ cy="19.250505"
+ cx="450.72842"
+ gradientTransform="matrix(0.121304,-0.696283,0.871429,0.151818,359.51331,621.7)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,1,883.51417,295)"
- x1="456.81198"
- y1="15.545153"
- x2="441.9628"
- y2="13.21724" />
- <linearGradient
- inkscape:collect="always"
+ id="radialGradient27454"
xlink:href="#linearGradient319"
- id="linearGradient27540"
- gradientUnits="userSpaceOnUse"
- x1="332.49747"
- y1="38.166924"
- x2="326.41843"
- y2="31.22842" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient27542"
+ y2="13.21724"
+ x2="441.9628"
+ y1="15.545153"
+ x1="456.81198"
+ gradientTransform="matrix(-1,0,0,1,883.51417,295)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(2.011921e-5,12.000013)"
- x1="326.483"
- y1="31.446384"
- x2="337.3125"
- y2="41.875" />
+ id="linearGradient27456"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="31.22842"
+ x2="326.41843"
+ y1="38.166924"
+ x1="332.49747"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient27540"
xlink:href="#linearGradient319"
- id="linearGradient27544"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="41.875"
+ x2="337.3125"
+ y1="31.446384"
+ x1="326.483"
+ gradientTransform="translate(2.011921e-5,12.000013)"
gradientUnits="userSpaceOnUse"
- x1="329.18762"
- y1="34.005215"
- x2="331.44778"
- y2="36.739578" />
+ id="linearGradient27542"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23705"
- id="linearGradient27598"
+ y2="36.739578"
+ x2="331.44778"
+ y1="34.005215"
+ x1="329.18762"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(220,-20.00667)"
- x1="29.4034"
- y1="100.99999"
- x2="34.095703"
- y2="101.15624" />
+ id="linearGradient27544"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24168"
- id="linearGradient27600"
+ y2="101.15624"
+ x2="34.095703"
+ y1="100.99999"
+ x1="29.4034"
+ gradientTransform="translate(220,-20.00667)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.75,0,0,0.7516675,227.625,0.9640803)"
- x1="20.125"
- y1="88.642494"
+ id="linearGradient27598"
+ xlink:href="#linearGradient23705"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="104.89799"
x2="34.125"
- y2="104.89799" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="radialGradient27602"
+ y1="88.642494"
+ x1="20.125"
+ gradientTransform="matrix(0.75,0,0,0.7516675,227.625,0.9640803)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.6595012,0.7907318,-0.8990144,0.7498135,144.69896,-187.59854)"
- cx="261.98364"
- cy="74.083908"
- fx="261.98364"
+ id="linearGradient27600"
+ xlink:href="#linearGradient24168"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.5"
fy="74.083908"
- r="3.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient27604"
+ fx="261.98364"
+ cy="74.083908"
+ cx="261.98364"
+ gradientTransform="matrix(0.6595012,0.7907318,-0.8990144,0.7498135,144.69896,-187.59854)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8750002,0,0,0.83767,7.3124969,247.00379)"
- x1="27.166666"
- y1="90.504448"
+ id="radialGradient27602"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="101.14744"
x2="35.166668"
- y2="101.14744" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient18821"
- id="radialGradient27606"
+ y1="90.504448"
+ x1="27.166666"
+ gradientTransform="matrix(0.8750002,0,0,0.83767,7.3124969,247.00379)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
- cx="75.53241"
- cy="500.20956"
- fx="75.53241"
- fy="500.20956"
- r="3.1650217" />
- <radialGradient
- inkscape:collect="always"
+ id="linearGradient27604"
xlink:href="#linearGradient319"
- id="radialGradient27608"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.1650217"
+ fy="500.20956"
+ fx="75.53241"
+ cy="500.20956"
+ cx="75.53241"
+ gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(2.4564959,0.09949388,-0.06177986,1.3917691,-283.96093,-143.81911)"
- cx="135.14931"
- cy="332.10181"
- fx="135.14931"
+ id="radialGradient27606"
+ xlink:href="#linearGradient18821"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.5"
fy="332.10181"
- r="3.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5060"
- id="linearGradient27610"
+ fx="135.14931"
+ cy="332.10181"
+ cx="135.14931"
+ gradientTransform="matrix(2.4564959,0.09949388,-0.06177986,1.3917691,-283.96093,-143.81911)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(2,0,0,0.7333333,-467,262.53823)"
- x1="250.5"
- y1="90.253998"
- x2="250.5"
- y2="95.252274" />
- <radialGradient
- inkscape:collect="always"
+ id="radialGradient27608"
xlink:href="#linearGradient319"
- id="radialGradient27612"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="95.252274"
+ x2="250.5"
+ y1="90.253998"
+ x1="250.5"
+ gradientTransform="matrix(2,0,0,0.7333333,-467,262.53823)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(2.3687636,0.09935874,-0.05957343,1.3898788,-272.60513,-143.17133)"
- cx="140.33667"
- cy="333.05716"
- fx="140.33667"
+ id="linearGradient27610"
+ xlink:href="#linearGradient5060"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.5"
fy="333.05716"
- r="3.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient34157"
- id="linearGradient30389"
+ fx="140.33667"
+ cy="333.05716"
+ cx="140.33667"
+ gradientTransform="matrix(2.3687636,0.09935874,-0.05957343,1.3898788,-272.60513,-143.17133)"
gradientUnits="userSpaceOnUse"
- x1="270.60007"
- y1="68.519989"
- x2="258.00165"
- y2="81.245804" />
- <linearGradient
- inkscape:collect="always"
+ id="radialGradient27612"
xlink:href="#linearGradient319"
- id="linearGradient30391"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="81.245804"
+ x2="258.00165"
+ y1="68.519989"
+ x1="270.60007"
gradientUnits="userSpaceOnUse"
- x1="256.67459"
- y1="80.395966"
+ id="linearGradient30389"
+ xlink:href="#linearGradient34157"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="74.415245"
x2="262.88068"
- y2="74.415245" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="radialGradient30393"
+ y1="80.395966"
+ x1="256.67459"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.4829018,0,0,0.4829018,133.47136,40.782399)"
- cx="257.35309"
- cy="79.598709"
- fx="257.35309"
- fy="79.598709"
- r="3.779551" />
+ id="linearGradient30391"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient29149"
- id="radialGradient30395"
+ r="3.779551"
+ fy="79.598709"
+ fx="257.35309"
+ cy="79.598709"
+ cx="257.35309"
+ gradientTransform="matrix(0.4829018,0,0,0.4829018,133.47136,40.782399)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
- cx="75.217888"
- cy="500.66806"
- fx="75.217888"
- fy="500.66806"
- r="3.1650217" />
+ id="radialGradient30393"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient18821"
- id="radialGradient30397"
- gradientUnits="userSpaceOnUse"
+ r="3.1650217"
+ fy="500.66806"
+ fx="75.217888"
+ cy="500.66806"
+ cx="75.217888"
gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
- cx="75.554794"
- cy="500.26215"
- fx="75.554794"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient30395"
+ xlink:href="#linearGradient29149"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.1650217"
fy="500.26215"
- r="3.1650217" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient29127"
+ fx="75.554794"
+ cy="500.26215"
+ cx="75.554794"
+ gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(422.99996,88.99998)"
- x1="308"
- y1="323"
- x2="343.26239"
- y2="340" />
+ id="radialGradient30397"
+ xlink:href="#linearGradient18821"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient29129"
+ y2="340"
+ x2="343.26239"
+ y1="323"
+ x1="308"
+ gradientTransform="translate(422.99996,88.99998)"
gradientUnits="userSpaceOnUse"
- x1="732.9375"
- y1="412.8125"
- x2="753.40625"
- y2="418.33594" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient29127"
xlink:href="#linearGradient319"
- id="linearGradient27767"
- gradientUnits="userSpaceOnUse"
- x1="125.99933"
- y1="111.2683"
- x2="134.91479"
- y2="122.36016" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient27769"
+ y2="418.33594"
+ x2="753.40625"
+ y1="412.8125"
+ x1="732.9375"
gradientUnits="userSpaceOnUse"
- x1="126.72586"
- y1="112.53999"
- x2="134.91479"
- y2="122.36016" />
+ id="linearGradient29129"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient13973"
- id="linearGradient27771"
+ y2="122.36016"
+ x2="134.91479"
+ y1="111.2683"
+ x1="125.99933"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(19.367382,0)"
- x1="112.18942"
- y1="114.71685"
- x2="99.628899"
- y2="99.029617" />
+ id="linearGradient27767"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="122.36016"
+ x2="134.91479"
+ y1="112.53999"
+ x1="126.72586"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient27769"
xlink:href="#linearGradient319"
- id="linearGradient27773"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="99.029617"
+ x2="99.628899"
+ y1="114.71685"
+ x1="112.18942"
+ gradientTransform="translate(19.367382,0)"
gradientUnits="userSpaceOnUse"
- x1="127.63637"
- y1="114.2303"
+ id="linearGradient27771"
+ xlink:href="#linearGradient13973"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="131.03783"
x2="143.69765"
- y2="131.03783" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="radialGradient31865"
+ y1="114.2303"
+ x1="127.63637"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.986122,0,0,0.986122,2.8033684,0.804927)"
- cx="202"
- cy="58"
- fx="202"
+ id="linearGradient27773"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <radialGradient
+ r="7"
fy="58"
- r="7" />
+ fx="202"
+ cy="58"
+ cx="202"
+ gradientTransform="matrix(0.986122,0,0,0.986122,2.8033684,0.804927)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient31865"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<mask
- maskUnits="userSpaceOnUse"
- id="mask31861">
+ id="mask31861"
+ maskUnits="userSpaceOnUse">
<path
- sodipodi:type="arc"
- style="fill:url(#radialGradient31865);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- id="path31863"
- sodipodi:cx="202"
- sodipodi:cy="58"
- sodipodi:rx="11"
+ d="m 213,58 a 11,11 0 1 1 -22,0 11,11 0 1 1 22,0 z"
sodipodi:ry="11"
- d="m 213,58 a 11,11 0 1 1 -22,0 11,11 0 1 1 22,0 z" />
+ sodipodi:rx="11"
+ sodipodi:cy="58"
+ sodipodi:cx="202"
+ id="path31863"
+ style="fill:url(#radialGradient31865);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ sodipodi:type="arc" />
</mask>
<clipPath
- clipPathUnits="userSpaceOnUse"
- id="clipPath31849">
+ id="clipPath31849"
+ clipPathUnits="userSpaceOnUse">
<path
- style="fill:#ff0000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- d="m 232.13187,93.950853 4.84276,0 4.23742,4.237465 0,4.842822 -9.08018,0 0,-9.080287 0,0 z"
- id="path31851"
+ inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccc"
- inkscape:connector-curvature="0" />
+ id="path31851"
+ d="m 232.13187,93.950853 4.84276,0 4.23742,4.237465 0,4.842822 -9.08018,0 0,-9.080287 0,0 z"
+ style="fill:#ff0000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
</clipPath>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient32298"
- gradientUnits="userSpaceOnUse"
- x1="-117.5"
- y1="431.5"
- x2="-119.5"
+ gradientTransform="translate(258,-96.99999)"
y2="429.5"
- gradientTransform="translate(258,-96.99999)" />
+ x2="-119.5"
+ y1="431.5"
+ x1="-117.5"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient32298"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<mask
- maskUnits="userSpaceOnUse"
- id="mask32294">
+ id="mask32294"
+ maskUnits="userSpaceOnUse">
<rect
- y="323"
- x="134"
- height="16"
- width="9"
+ style="fill:url(#linearGradient32298);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect32296"
- style="fill:url(#linearGradient32298);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ width="9"
+ height="16"
+ x="134"
+ y="323" />
</mask>
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="radialGradient32241"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.050372,0,0,1.050372,-3.551238,-0.730396)"
- cx="70.5"
- cy="14.5"
- fx="70.5"
+ r="1.5"
fy="14.5"
- r="1.5" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="radialGradient32243"
+ fx="70.5"
+ cy="14.5"
+ cx="70.5"
+ gradientTransform="matrix(1.050372,0,0,1.050372,-3.551238,-0.730396)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.5399935,0.3131662,-0.3907892,0.5793905,38.141764,-16.056748)"
- cx="70.470596"
- cy="14.649424"
- fx="70.470596"
- fy="14.649424"
- r="5.5192375" />
+ id="radialGradient32241"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="radialGradient53119"
+ r="5.5192375"
+ fy="14.649424"
+ fx="70.470596"
+ cy="14.649424"
+ cx="70.470596"
+ gradientTransform="matrix(0.5399935,0.3131662,-0.3907892,0.5793905,38.141764,-16.056748)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.684011,0.3442329,-1.2972142,1.1562236,739.67527,-1155.7895)"
- cx="975.50568"
- cy="690.68732"
- fx="975.50568"
+ id="radialGradient32243"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
+ <radialGradient
+ r="2.333364"
fy="690.68732"
- r="2.333364" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient53121"
+ fx="975.50568"
+ cy="690.68732"
+ cx="975.50568"
+ gradientTransform="matrix(0.684011,0.3442329,-1.2972142,1.1562236,739.67527,-1155.7895)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8008385,0,0,0.821004,429.95027,-161.55482)"
- x1="108.71671"
- y1="171.25618"
- x2="105.85706"
- y2="168.04703" />
+ id="radialGradient53119"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20756"
- id="linearGradient53123"
+ y2="168.04703"
+ x2="105.85706"
+ y1="171.25618"
+ x1="108.71671"
+ gradientTransform="matrix(0.8008385,0,0,0.821004,429.95027,-161.55482)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8008385,0,0,0.8956408,540.31118,-183.20693)"
- x1="-26.313976"
- y1="178.07901"
- x2="-28.432825"
- y2="175.87964" />
+ id="linearGradient53121"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient53125"
+ y2="175.87964"
+ x2="-28.432825"
+ y1="178.07901"
+ x1="-26.313976"
+ gradientTransform="matrix(0.8008385,0,0,0.8956408,540.31118,-183.20693)"
gradientUnits="userSpaceOnUse"
- x1="510.29913"
- y1="-20.435461"
- x2="505.9494"
- y2="-17.546936" />
+ id="linearGradient53123"
+ xlink:href="#linearGradient20756"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient53127"
+ y2="-17.546936"
+ x2="505.9494"
+ y1="-20.435461"
+ x1="510.29913"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.707107,-0.707107,0.707107,0.707107,-346.7085,428.4841)"
- x1="352.98236"
- y1="314.11398"
- x2="353.72073"
- y2="297.92099" />
+ id="linearGradient53125"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient13938"
- id="linearGradient53129"
+ y2="297.92099"
+ x2="353.72073"
+ y1="314.11398"
+ x1="352.98236"
+ gradientTransform="matrix(0.707107,-0.707107,0.707107,0.707107,-346.7085,428.4841)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-15.983875,338)"
- x1="362.79037"
- y1="-159.88834"
- x2="373.83752"
- y2="-150.41035" />
+ id="linearGradient53127"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient53131"
+ y2="-150.41035"
+ x2="373.83752"
+ y1="-159.88834"
+ x1="362.79037"
+ gradientTransform="translate(-15.983875,338)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9900316,0,0,1,2.450297,0.00704954)"
- x1="343.51892"
- y1="175.19124"
+ id="linearGradient53129"
+ xlink:href="#linearGradient13938"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="183.3365"
x2="350.97491"
- y2="183.3365" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="radialGradient53133"
+ y1="175.19124"
+ x1="343.51892"
+ gradientTransform="matrix(0.9900316,0,0,1,2.450297,0.00704954)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.684011,0.3442329,-1.2972142,1.1562236,739.67527,-1155.7895)"
- cx="975.50568"
- cy="690.68732"
- fx="975.50568"
+ id="linearGradient53131"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <radialGradient
+ r="2.333364"
fy="690.68732"
- r="2.333364" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient53135"
+ fx="975.50568"
+ cy="690.68732"
+ cx="975.50568"
+ gradientTransform="matrix(0.684011,0.3442329,-1.2972142,1.1562236,739.67527,-1155.7895)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8008385,0,0,0.821004,429.95027,-161.55482)"
- x1="108.71671"
- y1="171.25618"
- x2="105.85706"
- y2="168.04703" />
+ id="radialGradient53133"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20756"
- id="linearGradient53137"
+ y2="168.04703"
+ x2="105.85706"
+ y1="171.25618"
+ x1="108.71671"
+ gradientTransform="matrix(0.8008385,0,0,0.821004,429.95027,-161.55482)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8008385,0,0,0.8956408,540.31118,-183.20693)"
- x1="-26.313976"
- y1="178.07901"
- x2="-28.432825"
- y2="175.87964" />
+ id="linearGradient53135"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient53139"
+ y2="175.87964"
+ x2="-28.432825"
+ y1="178.07901"
+ x1="-26.313976"
+ gradientTransform="matrix(0.8008385,0,0,0.8956408,540.31118,-183.20693)"
gradientUnits="userSpaceOnUse"
- x1="510.29913"
- y1="-20.435461"
+ id="linearGradient53137"
+ xlink:href="#linearGradient20756"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="-17.546936"
x2="505.9494"
- y2="-17.546936" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="radialGradient53141"
+ y1="-20.435461"
+ x1="510.29913"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.684011,0.3442329,-1.2972142,1.1562236,739.67527,-1155.7895)"
- cx="975.50568"
- cy="690.68732"
- fx="975.50568"
+ id="linearGradient53139"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <radialGradient
+ r="2.333364"
fy="690.68732"
- r="2.333364" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient53143"
+ fx="975.50568"
+ cy="690.68732"
+ cx="975.50568"
+ gradientTransform="matrix(0.684011,0.3442329,-1.2972142,1.1562236,739.67527,-1155.7895)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8008385,0,0,0.821004,429.95027,-161.55482)"
- x1="108.71671"
- y1="171.25618"
- x2="105.85706"
- y2="168.04703" />
+ id="radialGradient53141"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20756"
- id="linearGradient53145"
+ y2="168.04703"
+ x2="105.85706"
+ y1="171.25618"
+ x1="108.71671"
+ gradientTransform="matrix(0.8008385,0,0,0.821004,429.95027,-161.55482)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8008385,0,0,0.8956408,540.31118,-183.20693)"
- x1="-26.313976"
- y1="178.07901"
- x2="-28.432825"
- y2="175.87964" />
+ id="linearGradient53143"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient53147"
+ y2="175.87964"
+ x2="-28.432825"
+ y1="178.07901"
+ x1="-26.313976"
+ gradientTransform="matrix(0.8008385,0,0,0.8956408,540.31118,-183.20693)"
gradientUnits="userSpaceOnUse"
- x1="510.29913"
- y1="-20.435461"
- x2="505.9494"
- y2="-17.546936" />
+ id="linearGradient53145"
+ xlink:href="#linearGradient20756"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient42459"
- id="linearGradient53149"
+ y2="-17.546936"
+ x2="505.9494"
+ y1="-20.435461"
+ x1="510.29913"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(220,-20.00667)"
- x1="29.4034"
- y1="100.99999"
- x2="34.095703"
- y2="101.15624" />
+ id="linearGradient53147"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient22562"
- id="linearGradient53151"
+ y2="101.15624"
+ x2="34.095703"
+ y1="100.99999"
+ x1="29.4034"
+ gradientTransform="translate(220,-20.00667)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.75,0,0,0.7516675,227.625,0.9640803)"
- x1="20.125"
- y1="88.642494"
+ id="linearGradient53149"
+ xlink:href="#linearGradient42459"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="104.89799"
x2="34.125"
- y2="104.89799" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="radialGradient53153"
+ y1="88.642494"
+ x1="20.125"
+ gradientTransform="matrix(0.75,0,0,0.7516675,227.625,0.9640803)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.6595012,0.7907318,-0.8990144,0.7498135,144.69896,-187.59854)"
- cx="261.98364"
- cy="74.083908"
- fx="261.98364"
+ id="linearGradient53151"
+ xlink:href="#linearGradient22562"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.5"
fy="74.083908"
- r="3.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient53155"
+ fx="261.98364"
+ cy="74.083908"
+ cx="261.98364"
+ gradientTransform="matrix(0.6595012,0.7907318,-0.8990144,0.7498135,144.69896,-187.59854)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.75,0,0,0.7516675,115.625,254.97076)"
- x1="27.166666"
- y1="90.504448"
+ id="radialGradient53153"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="101.14744"
x2="35.166668"
- y2="101.14744" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient18821"
- id="radialGradient53157"
+ y1="90.504448"
+ x1="27.166666"
+ gradientTransform="matrix(0.75,0,0,0.7516675,115.625,254.97076)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
- cx="75.53241"
- cy="500.20956"
- fx="75.53241"
- fy="500.20956"
- r="3.1650217" />
- <radialGradient
- inkscape:collect="always"
+ id="linearGradient53155"
xlink:href="#linearGradient319"
- id="radialGradient53159"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.1650217"
+ fy="500.20956"
+ fx="75.53241"
+ cy="500.20956"
+ cx="75.53241"
+ gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(2.1055676,0.08927896,-0.05295416,1.2488779,-134.03789,-95.726825)"
- cx="135.14931"
- cy="332.10181"
- fx="135.14931"
+ id="radialGradient53157"
+ xlink:href="#linearGradient18821"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.5"
fy="332.10181"
- r="3.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5060"
- id="linearGradient53161"
+ fx="135.14931"
+ cy="332.10181"
+ cx="135.14931"
+ gradientTransform="matrix(2.1055676,0.08927896,-0.05295416,1.2488779,-134.03789,-95.726825)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-112,237.00668)"
- x1="250.5"
- y1="90.253998"
- x2="250.5"
- y2="95.252274" />
- <radialGradient
- inkscape:collect="always"
+ id="radialGradient53159"
xlink:href="#linearGradient319"
- id="radialGradient53163"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="95.252274"
+ x2="250.5"
+ y1="90.253998"
+ x1="250.5"
+ gradientTransform="translate(-112,237.00668)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(2.1055676,0.08927896,-0.05295416,1.2488779,-134.03789,-95.726825)"
- cx="140.33667"
- cy="333.05716"
- fx="140.33667"
- fy="333.05716"
- r="3.5" />
+ id="linearGradient53161"
+ xlink:href="#linearGradient5060"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="radialGradient53165"
+ r="3.5"
+ fy="333.05716"
+ fx="140.33667"
+ cy="333.05716"
+ cx="140.33667"
+ gradientTransform="matrix(2.1055676,0.08927896,-0.05295416,1.2488779,-134.03789,-95.726825)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.684011,0.3442329,-1.2972142,1.1562236,739.67527,-1155.7895)"
- cx="975.50568"
- cy="690.68732"
- fx="975.50568"
+ id="radialGradient53163"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <radialGradient
+ r="2.333364"
fy="690.68732"
- r="2.333364" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient53167"
+ fx="975.50568"
+ cy="690.68732"
+ cx="975.50568"
+ gradientTransform="matrix(0.684011,0.3442329,-1.2972142,1.1562236,739.67527,-1155.7895)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8008385,0,0,0.821004,429.95027,-161.55482)"
- x1="108.71671"
- y1="171.25618"
- x2="105.85706"
- y2="168.04703" />
+ id="radialGradient53165"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20756"
- id="linearGradient53169"
+ y2="168.04703"
+ x2="105.85706"
+ y1="171.25618"
+ x1="108.71671"
+ gradientTransform="matrix(0.8008385,0,0,0.821004,429.95027,-161.55482)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8008385,0,0,0.8956408,540.31118,-183.20693)"
- x1="-26.313976"
- y1="178.07901"
- x2="-28.432825"
- y2="175.87964" />
+ id="linearGradient53167"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient53171"
+ y2="175.87964"
+ x2="-28.432825"
+ y1="178.07901"
+ x1="-26.313976"
+ gradientTransform="matrix(0.8008385,0,0,0.8956408,540.31118,-183.20693)"
gradientUnits="userSpaceOnUse"
- x1="510.29913"
- y1="-20.435461"
- x2="505.9494"
- y2="-17.546936" />
+ id="linearGradient53169"
+ xlink:href="#linearGradient20756"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23178"
- id="linearGradient50870"
+ y2="-17.546936"
+ x2="505.9494"
+ y1="-20.435461"
+ x1="510.29913"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(2e-6,0)"
- x1="-22.902081"
- y1="448"
- x2="-14.000002"
- y2="448" />
+ id="linearGradient53171"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="linearGradient33427"
+ y2="448"
+ x2="-14.000002"
+ y1="448"
+ x1="-22.902081"
+ gradientTransform="translate(2e-6,0)"
gradientUnits="userSpaceOnUse"
- x1="124.40742"
- y1="111.98244"
- x2="136.04924"
- y2="121.25749" />
+ id="linearGradient50870"
+ xlink:href="#linearGradient23178"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient33429"
+ y2="121.25749"
+ x2="136.04924"
+ y1="111.98244"
+ x1="124.40742"
gradientUnits="userSpaceOnUse"
- x1="132"
- y1="117.26753"
- x2="140.66667"
- y2="125.94853" />
+ id="linearGradient33427"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030"
- id="linearGradient33585"
+ y2="125.94853"
+ x2="140.66667"
+ y1="117.26753"
+ x1="132"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.7071068,-0.7071068,0.7071067,0.7071067,-140.04288,401.30258)"
- x1="458.99997"
- y1="89.363937"
- x2="452.63602"
- y2="90.071045" />
+ id="linearGradient33429"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient31356"
- id="linearGradient33831"
+ y2="90.071045"
+ x2="452.63602"
+ y1="89.363937"
+ x1="458.99997"
+ gradientTransform="matrix(0.7071068,-0.7071068,0.7071067,0.7071067,-140.04288,401.30258)"
gradientUnits="userSpaceOnUse"
- x1="134.00002"
- y1="116"
- x2="142.00002"
- y2="108" />
+ id="linearGradient33585"
+ xlink:href="#linearGradient9030"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="linearGradient33833"
+ y2="108"
+ x2="142.00002"
+ y1="116"
+ x1="134.00002"
gradientUnits="userSpaceOnUse"
- x1="124.75568"
- y1="112.24533"
- x2="132.97911"
- y2="120.16792" />
+ id="linearGradient33831"
+ xlink:href="#linearGradient31356"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient33835"
+ y2="120.16792"
+ x2="132.97911"
+ y1="112.24533"
+ x1="124.75568"
gradientUnits="userSpaceOnUse"
- x1="132"
- y1="117.26753"
- x2="140.66667"
- y2="125.94853" />
+ id="linearGradient33833"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient37472"
+ y2="125.94853"
+ x2="140.66667"
+ y1="117.26753"
+ x1="132"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.888889,0,0,1,-32.5,115.5045)"
- x1="254.19829"
- y1="2.1803131"
- x2="277.86761"
- y2="29.392145" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient33835"
xlink:href="#linearGradient319"
- id="linearGradient37475"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(124,-102.00001)"
- x1="85.1875"
- y1="239.125"
- x2="92.8125"
- y2="245.625" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient37477"
- gradientUnits="userSpaceOnUse"
+ y2="29.392145"
+ x2="277.86761"
+ y1="2.1803131"
+ x1="254.19829"
gradientTransform="matrix(0.888889,0,0,1,-32.5,115.5045)"
- x1="261.83936"
- y1="11.593864"
- x2="275.62497"
- y2="26.679274" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient37479"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(124,-102.00001)"
- x1="85.1875"
- y1="239.125"
+ id="linearGradient37472"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="245.625"
x2="92.8125"
- y2="245.625" />
+ y1="239.125"
+ x1="85.1875"
+ gradientTransform="translate(124,-102.00001)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient37475"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient34157"
- id="linearGradient37481"
+ y2="26.679274"
+ x2="275.62497"
+ y1="11.593864"
+ x1="261.83936"
+ gradientTransform="matrix(0.888889,0,0,1,-32.5,115.5045)"
gradientUnits="userSpaceOnUse"
- x1="270.60007"
- y1="68.519989"
- x2="258.00165"
- y2="81.245804" />
+ id="linearGradient37477"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="245.625"
+ x2="92.8125"
+ y1="239.125"
+ x1="85.1875"
+ gradientTransform="translate(124,-102.00001)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient37479"
xlink:href="#linearGradient319"
- id="linearGradient37483"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="81.245804"
+ x2="258.00165"
+ y1="68.519989"
+ x1="270.60007"
gradientUnits="userSpaceOnUse"
- x1="256.67459"
- y1="80.395966"
+ id="linearGradient37481"
+ xlink:href="#linearGradient34157"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="74.415245"
x2="262.88068"
- y2="74.415245" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="radialGradient37485"
+ y1="80.395966"
+ x1="256.67459"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.4829018,0,0,0.4829018,133.47136,40.782399)"
- cx="257.35309"
- cy="79.598709"
- fx="257.35309"
- fy="79.598709"
- r="3.779551" />
+ id="linearGradient37483"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient29149"
- id="radialGradient37487"
+ r="3.779551"
+ fy="79.598709"
+ fx="257.35309"
+ cy="79.598709"
+ cx="257.35309"
+ gradientTransform="matrix(0.4829018,0,0,0.4829018,133.47136,40.782399)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
- cx="75.217888"
- cy="500.66806"
- fx="75.217888"
- fy="500.66806"
- r="3.1650217" />
+ id="radialGradient37485"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient18821"
- id="radialGradient37489"
- gradientUnits="userSpaceOnUse"
+ r="3.1650217"
+ fy="500.66806"
+ fx="75.217888"
+ cy="500.66806"
+ cx="75.217888"
gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
- cx="75.554794"
- cy="500.26215"
- fx="75.554794"
- fy="500.26215"
- r="3.1650217" />
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient37487"
+ xlink:href="#linearGradient29149"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="radialGradient37491"
+ r="3.1650217"
+ fy="500.26215"
+ fx="75.554794"
+ cy="500.26215"
+ cx="75.554794"
+ gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1.5793179,0,-1.0159927e-7,-1.6412688,666.67947,207.37331)"
- cx="258.47122"
- cy="78.512764"
- fx="258.47122"
+ id="radialGradient37489"
+ xlink:href="#linearGradient18821"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.5"
fy="78.512764"
- r="3.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient34157"
- id="linearGradient37493"
+ fx="258.47122"
+ cy="78.512764"
+ cx="258.47122"
+ gradientTransform="matrix(-1.5793179,0,-1.0159927e-7,-1.6412688,666.67947,207.37331)"
gradientUnits="userSpaceOnUse"
- x1="270.66064"
- y1="68.113258"
- x2="257.38638"
- y2="81.382545" />
- <linearGradient
- inkscape:collect="always"
+ id="radialGradient37491"
xlink:href="#linearGradient319"
- id="linearGradient37495"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="81.382545"
+ x2="257.38638"
+ y1="68.113258"
+ x1="270.66064"
gradientUnits="userSpaceOnUse"
- x1="256.38586"
- y1="80.515495"
+ id="linearGradient37493"
+ xlink:href="#linearGradient34157"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="74.562462"
x2="262.43726"
- y2="74.562462" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient29149"
- id="radialGradient37497"
+ y1="80.515495"
+ x1="256.38586"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
- cx="75.217888"
- cy="500.66806"
- fx="75.217888"
- fy="500.66806"
- r="3.1650217" />
+ id="linearGradient37495"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient18821"
- id="radialGradient37499"
- gradientUnits="userSpaceOnUse"
+ r="3.1650217"
+ fy="500.66806"
+ fx="75.217888"
+ cy="500.66806"
+ cx="75.217888"
gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
- cx="75.554794"
- cy="500.26215"
- fx="75.554794"
- fy="500.26215"
- r="3.1650217" />
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient37497"
+ xlink:href="#linearGradient29149"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="radialGradient37501"
+ r="3.1650217"
+ fy="500.26215"
+ fx="75.554794"
+ cy="500.26215"
+ cx="75.554794"
+ gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-0.08933014,-0.7764284,0.7350832,-0.08334857,57.410559,233.30156)"
- cx="135.83771"
- cy="117.97826"
- fx="135.83771"
+ id="radialGradient37499"
+ xlink:href="#linearGradient18821"
+ inkscape:collect="always" />
+ <radialGradient
+ r="8"
fy="117.97826"
- r="8" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient37503"
+ fx="135.83771"
+ cy="117.97826"
+ cx="135.83771"
+ gradientTransform="matrix(-0.08933014,-0.7764284,0.7350832,-0.08334857,57.410559,233.30156)"
gradientUnits="userSpaceOnUse"
- x1="121.19734"
- y1="105.94044"
- x2="148.06364"
- y2="137.6748" />
+ id="radialGradient37501"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient34157"
- id="linearGradient37505"
+ y2="137.6748"
+ x2="148.06364"
+ y1="105.94044"
+ x1="121.19734"
gradientUnits="userSpaceOnUse"
- x1="270.66064"
- y1="68.113258"
- x2="257.38638"
- y2="81.382545" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient37503"
xlink:href="#linearGradient319"
- id="linearGradient37507"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="81.382545"
+ x2="257.38638"
+ y1="68.113258"
+ x1="270.66064"
gradientUnits="userSpaceOnUse"
- x1="256.38586"
- y1="80.515495"
+ id="linearGradient37505"
+ xlink:href="#linearGradient34157"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="74.562462"
x2="262.43726"
- y2="74.562462" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient29149"
- id="radialGradient37509"
+ y1="80.515495"
+ x1="256.38586"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
- cx="75.217888"
- cy="500.66806"
- fx="75.217888"
- fy="500.66806"
- r="3.1650217" />
+ id="linearGradient37507"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient18821"
- id="radialGradient37511"
- gradientUnits="userSpaceOnUse"
+ r="3.1650217"
+ fy="500.66806"
+ fx="75.217888"
+ cy="500.66806"
+ cx="75.217888"
gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
- cx="75.554794"
- cy="500.26215"
- fx="75.554794"
- fy="500.26215"
- r="3.1650217" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="radialGradient37513"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1.3336259,0,-8.5793649e-8,-1.3859393,603.17514,187.32668)"
- cx="258.47122"
- cy="78.512764"
- fx="258.47122"
- fy="78.512764"
- r="3.5" />
+ id="radialGradient37509"
+ xlink:href="#linearGradient29149"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="radialGradient37515"
+ r="3.1650217"
+ fy="500.26215"
+ fx="75.554794"
+ cy="500.26215"
+ cx="75.554794"
+ gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1.3648614,0,-8.7803051e-8,-1.4184,611.24862,189.87526)"
- cx="258.47122"
- cy="78.512764"
+ id="radialGradient37511"
+ xlink:href="#linearGradient18821"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.5"
+ fy="78.512764"
fx="258.47122"
+ cy="78.512764"
+ cx="258.47122"
+ gradientTransform="matrix(-1.3336259,0,-8.5793649e-8,-1.3859393,603.17514,187.32668)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient37513"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.5"
fy="78.512764"
- r="3.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient34157"
- id="linearGradient37517"
+ fx="258.47122"
+ cy="78.512764"
+ cx="258.47122"
+ gradientTransform="matrix(-1.3648614,0,-8.7803051e-8,-1.4184,611.24862,189.87526)"
gradientUnits="userSpaceOnUse"
- x1="270.66064"
- y1="68.113258"
- x2="257.38638"
- y2="81.382545" />
- <linearGradient
- inkscape:collect="always"
+ id="radialGradient37515"
xlink:href="#linearGradient319"
- id="linearGradient37519"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="81.382545"
+ x2="257.38638"
+ y1="68.113258"
+ x1="270.66064"
gradientUnits="userSpaceOnUse"
- x1="256.38586"
- y1="80.515495"
+ id="linearGradient37517"
+ xlink:href="#linearGradient34157"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="74.562462"
x2="262.43726"
- y2="74.562462" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient29149"
- id="radialGradient37521"
+ y1="80.515495"
+ x1="256.38586"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
- cx="75.217888"
- cy="500.66806"
- fx="75.217888"
- fy="500.66806"
- r="3.1650217" />
+ id="linearGradient37519"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient18821"
- id="radialGradient37523"
- gradientUnits="userSpaceOnUse"
+ r="3.1650217"
+ fy="500.66806"
+ fx="75.217888"
+ cy="500.66806"
+ cx="75.217888"
gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
- cx="75.554794"
- cy="500.26215"
- fx="75.554794"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient37521"
+ xlink:href="#linearGradient29149"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.1650217"
fy="500.26215"
- r="3.1650217" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient30124"
- id="linearGradient37525"
+ fx="75.554794"
+ cy="500.26215"
+ cx="75.554794"
+ gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
gradientUnits="userSpaceOnUse"
- x1="337.34329"
- y1="43.328976"
- x2="330.27045"
- y2="35.276588" />
+ id="radialGradient37523"
+ xlink:href="#linearGradient18821"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient37527"
+ y2="35.276588"
+ x2="330.27045"
+ y1="43.328976"
+ x1="337.34329"
gradientUnits="userSpaceOnUse"
- x1="329.9158"
- y1="35.5"
- x2="335.27429"
- y2="41.570362" />
+ id="linearGradient37525"
+ xlink:href="#linearGradient30124"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient37529"
+ y2="41.570362"
+ x2="335.27429"
+ y1="35.5"
+ x1="329.9158"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.0028571,0,0,0.9943503,-0.4404318,0.129119)"
- x1="166.89752"
- y1="9.0567484"
- x2="193.26451"
- y2="38.642647" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient37527"
xlink:href="#linearGradient319"
- id="linearGradient37531"
- gradientUnits="userSpaceOnUse"
- x1="127.93343"
- y1="122.8346"
- x2="133.77768"
- y2="116.99384" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient37533"
+ y2="38.642647"
+ x2="193.26451"
+ y1="9.0567484"
+ x1="166.89752"
+ gradientTransform="matrix(1.0028571,0,0,0.9943503,-0.4404318,0.129119)"
gradientUnits="userSpaceOnUse"
- x1="141.60255"
- y1="108.39205"
- x2="132"
- y2="118.66972" />
+ id="linearGradient37529"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient37535"
- gradientUnits="userSpaceOnUse"
- x1="122.86111"
- y1="127.14286"
+ y2="116.99384"
x2="133.77768"
- y2="116.99384" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient37537"
+ y1="122.8346"
+ x1="127.93343"
gradientUnits="userSpaceOnUse"
- x1="141.60255"
- y1="108.39205"
- x2="132"
- y2="118.66972" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient37531"
xlink:href="#linearGradient319"
- id="linearGradient37539"
- gradientUnits="userSpaceOnUse"
- x1="266"
- y1="659"
- x2="285"
- y2="659" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient35391"
- id="linearGradient37541"
+ y2="118.66972"
+ x2="132"
+ y1="108.39205"
+ x1="141.60255"
gradientUnits="userSpaceOnUse"
- x1="244.21062"
- y1="600.74884"
- x2="244.21062"
- y2="602.96759" />
+ id="linearGradient37533"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient35407"
- id="linearGradient37543"
+ y2="116.99384"
+ x2="133.77768"
+ y1="127.14286"
+ x1="122.86111"
gradientUnits="userSpaceOnUse"
- x1="235.29379"
- y1="588.43396"
- x2="245.93307"
- y2="604.52502" />
+ id="linearGradient37535"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient37545"
+ y2="118.66972"
+ x2="132"
+ y1="108.39205"
+ x1="141.60255"
gradientUnits="userSpaceOnUse"
- x1="510.25"
- y1="36"
- x2="494"
- y2="36"
- gradientTransform="matrix(-1,0,0,1,992,0)" />
+ id="linearGradient37537"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="659"
+ x2="285"
+ y1="659"
+ x1="266"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient37539"
xlink:href="#linearGradient319"
- id="linearGradient37547"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="602.96759"
+ x2="244.21062"
+ y1="600.74884"
+ x1="244.21062"
gradientUnits="userSpaceOnUse"
- x1="492"
- y1="33"
- x2="503"
- y2="43"
- gradientTransform="matrix(-1,0,0,1,992,0)" />
+ id="linearGradient37541"
+ xlink:href="#linearGradient35391"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient37549"
+ y2="604.52502"
+ x2="245.93307"
+ y1="588.43396"
+ x1="235.29379"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,1,551,105)"
- x1="497.3125"
- y1="35"
- x2="483"
- y2="35" />
+ id="linearGradient37543"
+ xlink:href="#linearGradient35407"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ gradientTransform="matrix(-1,0,0,1,992,0)"
+ y2="36"
+ x2="494"
+ y1="36"
+ x1="510.25"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient37545"
xlink:href="#linearGradient1610"
- id="linearGradient37551"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientTransform="matrix(-1,0,0,1,992,0)"
+ y2="43"
+ x2="503"
+ y1="33"
+ x1="492"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,1,551,105)"
- x1="497.3125"
- y1="35"
- x2="483"
- y2="35" />
+ id="linearGradient37547"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient37553"
+ y2="35"
+ x2="483"
+ y1="35"
+ x1="497.3125"
+ gradientTransform="matrix(-1,0,0,1,551,105)"
gradientUnits="userSpaceOnUse"
- x1="86.248604"
- y1="32"
- x2="68"
- y2="12" />
+ id="linearGradient37549"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="35"
+ x2="483"
+ y1="35"
+ x1="497.3125"
+ gradientTransform="matrix(-1,0,0,1,551,105)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient37551"
xlink:href="#linearGradient1610"
- id="linearGradient37555"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="12"
+ x2="68"
+ y1="32"
+ x1="86.248604"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,1)"
- x1="81"
- y1="27"
- x2="64.5"
- y2="9.0000019" />
+ id="linearGradient37553"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030"
- id="linearGradient37557"
+ y2="9.0000019"
+ x2="64.5"
+ y1="27"
+ x1="81"
+ gradientTransform="translate(0,1)"
gradientUnits="userSpaceOnUse"
- x1="70.78582"
- y1="15.659542"
- x2="79.465332"
- y2="24.480759" />
- <radialGradient
- inkscape:collect="always"
+ id="linearGradient37555"
xlink:href="#linearGradient1610"
- id="radialGradient37559"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="24.480759"
+ x2="79.465332"
+ y1="15.659542"
+ x1="70.78582"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.5997527,0.4726093,-0.6665451,0.8458611,35.480681,-28.765852)"
- cx="63.013588"
- cy="14.60904"
- fx="63.013588"
+ id="linearGradient37557"
+ xlink:href="#linearGradient9030"
+ inkscape:collect="always" />
+ <radialGradient
+ r="6.5"
fy="14.60904"
- r="6.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient37571"
+ fx="63.013588"
+ cy="14.60904"
+ cx="63.013588"
+ gradientTransform="matrix(0.5997527,0.4726093,-0.6665451,0.8458611,35.480681,-28.765852)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8666667,0,0,0.9166667,406.13333,-443.79167)"
- x1="108"
- y1="500"
- x2="54.8125"
- y2="500" />
+ id="radialGradient37559"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient15809"
- id="linearGradient37573"
+ y2="500"
+ x2="54.8125"
+ y1="500"
+ x1="108"
+ gradientTransform="matrix(0.8666667,0,0,0.9166667,406.13333,-443.79167)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,0.9971589,396,-484.56523)"
- x1="83.261826"
- y1="502.54196"
+ id="linearGradient37571"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="501.10059"
x2="41.311054"
- y2="501.10059" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient14262"
- id="radialGradient37575"
+ y1="502.54196"
+ x1="83.261826"
+ gradientTransform="matrix(1,0,0,0.9971589,396,-484.56523)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.3949409,0.3949425,-0.4243709,0.4254619,321.60762,256.85923)"
- cx="75.95578"
- cy="492.15359"
- fx="75.95578"
+ id="linearGradient37573"
+ xlink:href="#linearGradient15809"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.1650217"
fy="492.15359"
- r="3.1650217" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient37578"
+ fx="75.95578"
+ cy="492.15359"
+ cx="75.95578"
+ gradientTransform="matrix(0.3949409,0.3949425,-0.4243709,0.4254619,321.60762,256.85923)"
gradientUnits="userSpaceOnUse"
- x1="80.768944"
- y1="504.67188"
- x2="76.885078"
- y2="501.58331" />
+ id="radialGradient37575"
+ xlink:href="#linearGradient14262"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient37580"
+ y2="501.58331"
+ x2="76.885078"
+ y1="504.67188"
+ x1="80.768944"
gradientUnits="userSpaceOnUse"
- x1="89.526657"
- y1="511.42972"
+ id="linearGradient37578"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="501.04794"
x2="78.000008"
- y2="501.04794" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="radialGradient37582"
+ y1="511.42972"
+ x1="89.526657"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(2.2665671,0.04035316,-0.03648524,1.99062,-82.893589,-502.25433)"
- cx="79.959885"
- cy="503.81497"
- fx="79.959885"
- fy="503.81497"
- r="2.9089756" />
+ id="linearGradient37580"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient29149"
- id="radialGradient37584"
+ r="2.9089756"
+ fy="503.81497"
+ fx="79.959885"
+ cy="503.81497"
+ cx="79.959885"
+ gradientTransform="matrix(2.2665671,0.04035316,-0.03648524,1.99062,-82.893589,-502.25433)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
- cx="75.217888"
- cy="500.66806"
- fx="75.217888"
- fy="500.66806"
- r="3.1650217" />
+ id="radialGradient37582"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient18821"
- id="radialGradient37586"
- gradientUnits="userSpaceOnUse"
+ r="3.1650217"
+ fy="500.66806"
+ fx="75.217888"
+ cy="500.66806"
+ cx="75.217888"
gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
- cx="75.554794"
- cy="500.26215"
- fx="75.554794"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient37584"
+ xlink:href="#linearGradient29149"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.1650217"
fy="500.26215"
- r="3.1650217" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient37588"
+ fx="75.554794"
+ cy="500.26215"
+ cx="75.554794"
+ gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
gradientUnits="userSpaceOnUse"
- x1="264.10001"
- y1="330.10001"
- x2="264.89999"
- y2="330.89999" />
+ id="radialGradient37586"
+ xlink:href="#linearGradient18821"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient14232"
- id="linearGradient37590"
+ y2="330.89999"
+ x2="264.89999"
+ y1="330.10001"
+ x1="264.10001"
gradientUnits="userSpaceOnUse"
- x1="122.38876"
- y1="108.82882"
- x2="133.88583"
- y2="121.20407" />
+ id="linearGradient37588"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient37592"
+ y2="121.20407"
+ x2="133.88583"
+ y1="108.82882"
+ x1="122.38876"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9995363,0,0,-1.0036971,220.01067,167.35026)"
- x1="51.37524"
- y1="96.955269"
- x2="44.999863"
- y2="103.57072" />
+ id="linearGradient37590"
+ xlink:href="#linearGradient14232"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient15437"
- id="linearGradient37594"
+ y2="103.57072"
+ x2="44.999863"
+ y1="96.955269"
+ x1="51.37524"
+ gradientTransform="matrix(0.9995363,0,0,-1.0036971,220.01067,167.35026)"
gradientUnits="userSpaceOnUse"
- x1="137.88235"
- y1="124.67203"
- x2="131.3092"
- y2="117.24104" />
+ id="linearGradient37592"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient37596"
+ y2="117.24104"
+ x2="131.3092"
+ y1="124.67203"
+ x1="137.88235"
gradientUnits="userSpaceOnUse"
- x1="126.37032"
- y1="110.87843"
+ id="linearGradient37594"
+ xlink:href="#linearGradient15437"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="126.57021"
x2="139.86742"
- y2="126.57021" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="radialGradient37608"
+ y1="110.87843"
+ x1="126.37032"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.684011,0.3442329,-1.2972142,1.1562236,739.67527,-1155.7895)"
- cx="975.50568"
- cy="690.68732"
- fx="975.50568"
+ id="linearGradient37596"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <radialGradient
+ r="2.333364"
fy="690.68732"
- r="2.333364" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient37610"
+ fx="975.50568"
+ cy="690.68732"
+ cx="975.50568"
+ gradientTransform="matrix(0.684011,0.3442329,-1.2972142,1.1562236,739.67527,-1155.7895)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8008385,0,0,0.821004,429.95027,-161.55482)"
- x1="108.71671"
- y1="171.25618"
- x2="105.85706"
- y2="168.04703" />
+ id="radialGradient37608"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20756"
- id="linearGradient37612"
+ y2="168.04703"
+ x2="105.85706"
+ y1="171.25618"
+ x1="108.71671"
+ gradientTransform="matrix(0.8008385,0,0,0.821004,429.95027,-161.55482)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8008385,0,0,0.8956408,540.31118,-183.20693)"
- x1="-26.313976"
- y1="178.07901"
- x2="-28.432825"
- y2="175.87964" />
+ id="linearGradient37610"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient37614"
+ y2="175.87964"
+ x2="-28.432825"
+ y1="178.07901"
+ x1="-26.313976"
+ gradientTransform="matrix(0.8008385,0,0,0.8956408,540.31118,-183.20693)"
gradientUnits="userSpaceOnUse"
- x1="510.29913"
- y1="-20.435461"
- x2="505.9494"
- y2="-17.546936" />
+ id="linearGradient37612"
+ xlink:href="#linearGradient20756"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient37636"
+ y2="-17.546936"
+ x2="505.9494"
+ y1="-20.435461"
+ x1="510.29913"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.707107,-0.707107,0.707107,0.707107,-241.7085,428.4841)"
- x1="387.30396"
- y1="126.23978"
- x2="332.88193"
- y2="123.61623" />
+ id="linearGradient37614"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient37638"
+ y2="123.61623"
+ x2="332.88193"
+ y1="126.23978"
+ x1="387.30396"
+ gradientTransform="matrix(0.707107,-0.707107,0.707107,0.707107,-241.7085,428.4841)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.707107,-0.707107,0.707107,0.707107,-346.7085,428.4841)"
- x1="352.98236"
- y1="314.11398"
- x2="353.72073"
- y2="297.92099" />
+ id="linearGradient37636"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient37640"
+ y2="297.92099"
+ x2="353.72073"
+ y1="314.11398"
+ x1="352.98236"
+ gradientTransform="matrix(0.707107,-0.707107,0.707107,0.707107,-346.7085,428.4841)"
gradientUnits="userSpaceOnUse"
- x1="121.19734"
- y1="105.94044"
- x2="148.06364"
- y2="137.6748" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient37638"
xlink:href="#linearGradient37542"
- id="linearGradient42322"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9995967,0,0,1.0002103,-78.949724,-0.02739749)"
- x1="109.04134"
- y1="75.666725"
- x2="135.45256"
- y2="103.11092" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient42324"
+ y2="137.6748"
+ x2="148.06364"
+ y1="105.94044"
+ x1="121.19734"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.1000194,0,0,1.0998287,-4.6508478,-9.2334126)"
- x1="47.655102"
- y1="93.805557"
- x2="59.057678"
- y2="105.27895" />
+ id="linearGradient37640"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="linearGradient42326"
+ y2="103.11092"
+ x2="135.45256"
+ y1="75.666725"
+ x1="109.04134"
+ gradientTransform="matrix(0.9995967,0,0,1.0002103,-78.949724,-0.02739749)"
gradientUnits="userSpaceOnUse"
- x1="124.8772"
- y1="110.75571"
- x2="133.97179"
- y2="117.77643" />
+ id="linearGradient42322"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient42328"
+ y2="105.27895"
+ x2="59.057678"
+ y1="93.805557"
+ x1="47.655102"
+ gradientTransform="matrix(1.1000194,0,0,1.0998287,-4.6508478,-9.2334126)"
gradientUnits="userSpaceOnUse"
- x1="129.32576"
- y1="223.61363"
- x2="123.33967"
- y2="217.06438" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient42324"
xlink:href="#linearGradient319"
- id="linearGradient42330"
- gradientUnits="userSpaceOnUse"
- x1="130.39502"
- y1="116.31751"
- x2="142.64723"
- y2="129.05313" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient42332"
+ y2="117.77643"
+ x2="133.97179"
+ y1="110.75571"
+ x1="124.8772"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1.0041772,0,0,0.9688607,-81.584854,117.13687)"
- x1="-4.9152389"
- y1="252.69086"
- x2="-45.689278"
- y2="252.63284" />
+ id="linearGradient42326"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient42334"
+ y2="217.06438"
+ x2="123.33967"
+ y1="223.61363"
+ x1="129.32576"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9993234,0,0,1.0050357,-171.92846,305.72314)"
- x1="107.96875"
- y1="53.875"
- x2="117"
- y2="60.125" />
+ id="linearGradient42328"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient42336"
+ y2="129.05313"
+ x2="142.64723"
+ y1="116.31751"
+ x1="130.39502"
gradientUnits="userSpaceOnUse"
- x1="154.24324"
- y1="-11.628862"
- x2="134.08138"
- y2="-22.846634" />
+ id="linearGradient42330"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient42338"
+ y2="252.63284"
+ x2="-45.689278"
+ y1="252.69086"
+ x1="-4.9152389"
+ gradientTransform="matrix(-1.0041772,0,0,0.9688607,-81.584854,117.13687)"
gradientUnits="userSpaceOnUse"
- x1="137.5"
- y1="-18"
- x2="135.25"
- y2="-21" />
+ id="linearGradient42332"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient42340"
+ y2="60.125"
+ x2="117"
+ y1="53.875"
+ x1="107.96875"
+ gradientTransform="matrix(0.9993234,0,0,1.0050357,-171.92846,305.72314)"
gradientUnits="userSpaceOnUse"
- x1="134.12642"
- y1="-21.522242"
- x2="132.29695"
- y2="-23.945318" />
+ id="linearGradient42334"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient42342"
+ y2="-22.846634"
+ x2="134.08138"
+ y1="-11.628862"
+ x1="154.24324"
gradientUnits="userSpaceOnUse"
- x1="134.6615"
- y1="-21.3074"
- x2="131.69801"
- y2="-24.343456" />
+ id="linearGradient42336"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient42344"
+ y2="-21"
+ x2="135.25"
+ y1="-18"
+ x1="137.5"
gradientUnits="userSpaceOnUse"
- x1="-69.457596"
- y1="31.914484"
- x2="-76.564636"
- y2="28.695114" />
+ id="linearGradient42338"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient42346"
+ y2="-23.945318"
+ x2="132.29695"
+ y1="-21.522242"
+ x1="134.12642"
gradientUnits="userSpaceOnUse"
- x1="-57.780041"
- y1="48.005856"
- x2="-78.812721"
- y2="31" />
+ id="linearGradient42340"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient42348"
+ y2="-24.343456"
+ x2="131.69801"
+ y1="-21.3074"
+ x1="134.6615"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9995967,0,0,1.0002103,-78.949724,-0.02739749)"
- x1="109.04134"
- y1="75.666725"
- x2="135.45256"
- y2="103.11092" />
+ id="linearGradient42342"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient42350"
+ y2="28.695114"
+ x2="-76.564636"
+ y1="31.914484"
+ x1="-69.457596"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.3000195,0,0,0.2998291,32.548709,64.760571)"
- x1="51.497997"
- y1="97.491707"
- x2="59.057678"
- y2="105.27895" />
+ id="linearGradient42344"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient42352"
+ y2="31"
+ x2="-78.812721"
+ y1="48.005856"
+ x1="-57.780041"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.3000195,0,0,0.1998289,32.548709,79.011866)"
- x1="51.497997"
- y1="94.987144"
- x2="59.057678"
- y2="105.27895" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient42346"
xlink:href="#linearGradient319"
- id="linearGradient42354"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.3000195,0,0,0.1998289,32.548709,83.013491)"
- x1="51.497997"
- y1="94.987129"
- x2="59.057678"
- y2="105.27895" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient42356"
+ y2="103.11092"
+ x2="135.45256"
+ y1="75.666725"
+ x1="109.04134"
+ gradientTransform="matrix(0.9995967,0,0,1.0002103,-78.949724,-0.02739749)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.2,0,0,0.1998289,42.197983,83.013493)"
- x1="48.998543"
- y1="94.987114"
- x2="59.057678"
- y2="105.27895" />
+ id="linearGradient42348"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient42358"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.2,0,0,0.1998289,42.197981,79.010163)"
- x1="48.99855"
- y1="94.995667"
+ y2="105.27895"
x2="59.057678"
- y2="105.27895" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient42360"
+ y1="97.491707"
+ x1="51.497997"
+ gradientTransform="matrix(0.3000195,0,0,0.2998291,32.548709,64.760571)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.2,0,0,0.2999998,42.19798,64.743076)"
- x1="48.998554"
- y1="97.494553"
- x2="59.057678"
- y2="105.27895" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient42350"
xlink:href="#linearGradient319"
- id="linearGradient42362"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.2,0,0,0.1998289,46.196563,83.013493)"
- x1="48.998539"
- y1="94.987114"
- x2="59.057678"
- y2="105.27895" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient42364"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.2,0,0,0.1998289,46.196561,79.010163)"
- x1="48.998547"
- y1="94.995667"
+ y2="105.27895"
x2="59.057678"
- y2="105.27895" />
+ y1="94.987144"
+ x1="51.497997"
+ gradientTransform="matrix(0.3000195,0,0,0.1998289,32.548709,79.011866)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient42352"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="105.27895"
+ x2="59.057678"
+ y1="94.987129"
+ x1="51.497997"
+ gradientTransform="matrix(0.3000195,0,0,0.1998289,32.548709,83.013491)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient42354"
xlink:href="#linearGradient319"
- id="linearGradient42366"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="105.27895"
+ x2="59.057678"
+ y1="94.987114"
+ x1="48.998543"
+ gradientTransform="matrix(0.2,0,0,0.1998289,42.197983,83.013493)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.2,0,0,0.2999998,46.19656,64.743076)"
- x1="48.998554"
- y1="97.494553"
+ id="linearGradient42356"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="105.27895"
x2="59.057678"
- y2="105.27895" />
+ y1="94.995667"
+ x1="48.99855"
+ gradientTransform="matrix(0.2,0,0,0.1998289,42.197981,79.010163)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient42358"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient42368"
+ y2="105.27895"
+ x2="59.057678"
+ y1="97.494553"
+ x1="48.998554"
+ gradientTransform="matrix(0.2,0,0,0.2999998,42.19798,64.743076)"
gradientUnits="userSpaceOnUse"
- x1="-109.125"
- y1="52.625"
- x2="-121.73741"
- y2="38.387074" />
+ id="linearGradient42360"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="linearGradient42370"
+ y2="105.27895"
+ x2="59.057678"
+ y1="94.987114"
+ x1="48.998539"
+ gradientTransform="matrix(0.2,0,0,0.1998289,46.196563,83.013493)"
gradientUnits="userSpaceOnUse"
- x1="112.48699"
- y1="99.873772"
- x2="136.44698"
- y2="123.20583" />
+ id="linearGradient42362"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="105.27895"
+ x2="59.057678"
+ y1="94.995667"
+ x1="48.998547"
+ gradientTransform="matrix(0.2,0,0,0.1998289,46.196561,79.010163)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient42364"
xlink:href="#linearGradient319"
- id="linearGradient42372"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="105.27895"
+ x2="59.057678"
+ y1="97.494553"
+ x1="48.998554"
+ gradientTransform="matrix(0.2,0,0,0.2999998,46.19656,64.743076)"
gradientUnits="userSpaceOnUse"
- x1="130.39502"
- y1="116.31751"
- x2="140.66667"
- y2="125.94853" />
+ id="linearGradient42366"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="38.387074"
+ x2="-121.73741"
+ y1="52.625"
+ x1="-109.125"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient42368"
xlink:href="#linearGradient16500"
- id="linearGradient42374"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="123.20583"
+ x2="136.44698"
+ y1="99.873772"
+ x1="112.48699"
gradientUnits="userSpaceOnUse"
- x1="102.83286"
- y1="85.825607"
- x2="138.25778"
- y2="124.59384" />
+ id="linearGradient42370"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient42376"
+ y2="125.94853"
+ x2="140.66667"
+ y1="116.31751"
+ x1="130.39502"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-41,98)"
- x1="-170.25"
- y1="65.5"
- x2="-181.375"
- y2="65.5" />
+ id="linearGradient42372"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient42378"
+ y2="124.59384"
+ x2="138.25778"
+ y1="85.825607"
+ x1="102.83286"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.6962506,0,0,0.8034158,-66.833415,127.95312)"
- x1="-223.42456"
- y1="43.134327"
- x2="-202.33263"
- y2="39.110355" />
+ id="linearGradient42374"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient42380"
+ y2="65.5"
+ x2="-181.375"
+ y1="65.5"
+ x1="-170.25"
+ gradientTransform="translate(-41,98)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.6962506,0,0,0.8034158,-66.833415,127.95312)"
- x1="-219.98772"
- y1="40.355042"
- x2="-220.82353"
- y2="27.996962" />
+ id="linearGradient42376"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient42382"
+ y2="39.110355"
+ x2="-202.33263"
+ y1="43.134327"
+ x1="-223.42456"
+ gradientTransform="matrix(0.6962506,0,0,0.8034158,-66.833415,127.95312)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9098462,0,0,0.9414558,-57.134785,102.33514)"
- x1="-177.6924"
- y1="63.26775"
- x2="-170.82031"
- y2="62.441177" />
+ id="linearGradient42378"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="27.996962"
+ x2="-220.82353"
+ y1="40.355042"
+ x1="-219.98772"
+ gradientTransform="matrix(0.6962506,0,0,0.8034158,-66.833415,127.95312)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient42380"
xlink:href="#linearGradient319"
- id="linearGradient42384"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="62.441177"
+ x2="-170.82031"
+ y1="63.26775"
+ x1="-177.6924"
+ gradientTransform="matrix(0.9098462,0,0,0.9414558,-57.134785,102.33514)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.2857143,0,0,0.787037,-92.714287,177.80092)"
- x1="-101"
- y1="-16"
- x2="-93.75"
- y2="-16.264704" />
+ id="linearGradient42382"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient42386"
+ y2="-16.264704"
+ x2="-93.75"
+ y1="-16"
+ x1="-101"
+ gradientTransform="matrix(1.2857143,0,0,0.787037,-92.714287,177.80092)"
gradientUnits="userSpaceOnUse"
- x1="-211.04486"
- y1="193.68091"
+ id="linearGradient42384"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="185.8125"
x2="-219.5"
- y2="185.8125" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="radialGradient42388"
+ y1="193.68091"
+ x1="-211.04486"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(2.6261963,-1.575549,0.4790575,0.7985147,261.90894,-304.15053)"
- cx="-216.5222"
- cy="188.13423"
- fx="-216.5222"
- fy="188.13423"
- r="6.9375" />
+ id="linearGradient42386"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="radialGradient42390"
+ r="6.9375"
+ fy="188.13423"
+ fx="-216.5222"
+ cy="188.13423"
+ cx="-216.5222"
+ gradientTransform="matrix(2.6261963,-1.575549,0.4790575,0.7985147,261.90894,-304.15053)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(2.4767928,-0.2294888,0.06653313,0.7180687,315.70283,0.01290384)"
- cx="-221.88463"
- cy="182.64247"
- fx="-221.88463"
+ id="radialGradient42388"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.4576657"
fy="182.64247"
- r="3.4576657" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient42392"
+ fx="-221.88463"
+ cy="182.64247"
+ cx="-221.88463"
+ gradientTransform="matrix(2.4767928,-0.2294888,0.06653313,0.7180687,315.70283,0.01290384)"
gradientUnits="userSpaceOnUse"
- x1="-225.00002"
- y1="38.277779"
+ id="radialGradient42390"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="44.732624"
x2="-213"
- y2="44.732624" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="radialGradient42394"
+ y1="38.277779"
+ x1="-225.00002"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.1226244,0.04761823,-0.1611956,3.8002759,59.188894,-553.59611)"
- cx="-215.0979"
- cy="201.01204"
- fx="-215.0979"
- fy="201.01204"
- r="5.8999949" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient42392"
xlink:href="#linearGradient319"
- id="linearGradient42396"
+ inkscape:collect="always" />
+ <radialGradient
+ r="5.8999949"
+ fy="201.01204"
+ fx="-215.0979"
+ cy="201.01204"
+ cx="-215.0979"
+ gradientTransform="matrix(1.1226244,0.04761823,-0.1611956,3.8002759,59.188894,-553.59611)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,4)"
- x1="-224"
- y1="201"
- x2="-214.39445"
- y2="195.27762" />
+ id="radialGradient42394"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030"
- id="linearGradient42398"
+ y2="195.27762"
+ x2="-214.39445"
+ y1="201"
+ x1="-224"
+ gradientTransform="translate(0,4)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.1142111,0,0,-1,-174.01401,596.00357)"
- x1="209.05762"
- y1="290.00357"
- x2="215.34009"
- y2="277.00357" />
+ id="linearGradient42396"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030"
- id="linearGradient42400"
- gradientUnits="userSpaceOnUse"
+ y2="277.00357"
+ x2="215.34009"
+ y1="290.00357"
+ x1="209.05762"
gradientTransform="matrix(1.1142111,0,0,-1,-174.01401,596.00357)"
- x1="178.77469"
- y1="550.50702"
- x2="198.57239"
- y2="559.03442" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient42402"
gradientUnits="userSpaceOnUse"
- x1="132"
- y1="120.4313"
- x2="93.029579"
- y2="78.9655" />
+ id="linearGradient42398"
+ xlink:href="#linearGradient9030"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="linearGradient42404"
+ y2="559.03442"
+ x2="198.57239"
+ y1="550.50702"
+ x1="178.77469"
+ gradientTransform="matrix(1.1142111,0,0,-1,-174.01401,596.00357)"
gradientUnits="userSpaceOnUse"
- x1="112.48699"
- y1="99.873772"
- x2="136.44698"
- y2="123.20583" />
+ id="linearGradient42400"
+ xlink:href="#linearGradient9030"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient42406"
+ y2="78.9655"
+ x2="93.029579"
+ y1="120.4313"
+ x1="132"
gradientUnits="userSpaceOnUse"
- x1="130.39502"
- y1="116.31751"
- x2="140.66667"
- y2="125.94853" />
+ id="linearGradient42402"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient42408"
+ y2="123.20583"
+ x2="136.44698"
+ y1="99.873772"
+ x1="112.48699"
gradientUnits="userSpaceOnUse"
- x1="102.83286"
- y1="85.825607"
- x2="138.25778"
- y2="124.59384" />
+ id="linearGradient42404"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient42410"
+ y2="125.94853"
+ x2="140.66667"
+ y1="116.31751"
+ x1="130.39502"
gradientUnits="userSpaceOnUse"
- x1="132"
- y1="120.4313"
- x2="93.029579"
- y2="78.9655" />
+ id="linearGradient42406"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030"
- id="linearGradient42412"
+ y2="124.59384"
+ x2="138.25778"
+ y1="85.825607"
+ x1="102.83286"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.1142111,0,0,-1,-174.01401,596.00357)"
- x1="178.77469"
- y1="550.50702"
- x2="198.57239"
- y2="559.03442" />
+ id="linearGradient42408"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="linearGradient42414"
+ y2="78.9655"
+ x2="93.029579"
+ y1="120.4313"
+ x1="132"
gradientUnits="userSpaceOnUse"
- x1="112.48699"
- y1="99.873772"
- x2="133.62697"
- y2="120.49951" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient42410"
xlink:href="#linearGradient319"
- id="linearGradient42416"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="559.03442"
+ x2="198.57239"
+ y1="550.50702"
+ x1="178.77469"
+ gradientTransform="matrix(1.1142111,0,0,-1,-174.01401,596.00357)"
gradientUnits="userSpaceOnUse"
- x1="130.39502"
- y1="116.31751"
- x2="140.66667"
- y2="125.94853" />
+ id="linearGradient42412"
+ xlink:href="#linearGradient9030"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient42418"
+ y2="120.49951"
+ x2="133.62697"
+ y1="99.873772"
+ x1="112.48699"
gradientUnits="userSpaceOnUse"
- x1="102.83286"
- y1="85.825607"
- x2="138.25778"
- y2="124.59384" />
+ id="linearGradient42414"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient42420"
+ y2="125.94853"
+ x2="140.66667"
+ y1="116.31751"
+ x1="130.39502"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-120,79)"
- x1="-170.25"
- y1="65.5"
- x2="-181.375"
- y2="65.5" />
+ id="linearGradient42416"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient42422"
+ y2="124.59384"
+ x2="138.25778"
+ y1="85.825607"
+ x1="102.83286"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.6962506,0,0,0.8034158,-145.83341,108.95312)"
- x1="-223.42456"
- y1="43.134327"
- x2="-202.33263"
- y2="39.110355" />
+ id="linearGradient42418"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient42424"
+ y2="65.5"
+ x2="-181.375"
+ y1="65.5"
+ x1="-170.25"
+ gradientTransform="translate(-120,79)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.6962506,0,0,0.8034158,-145.83341,108.95312)"
- x1="-219.98772"
- y1="40.355042"
- x2="-220.82353"
- y2="27.996962" />
+ id="linearGradient42420"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient42426"
+ y2="39.110355"
+ x2="-202.33263"
+ y1="43.134327"
+ x1="-223.42456"
+ gradientTransform="matrix(0.6962506,0,0,0.8034158,-145.83341,108.95312)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9098462,0,0,0.9414558,-136.13478,83.33514)"
- x1="-177.6924"
- y1="63.26775"
- x2="-170.82031"
- y2="62.441177" />
+ id="linearGradient42422"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="27.996962"
+ x2="-220.82353"
+ y1="40.355042"
+ x1="-219.98772"
+ gradientTransform="matrix(0.6962506,0,0,0.8034158,-145.83341,108.95312)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient42424"
xlink:href="#linearGradient319"
- id="linearGradient42428"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="62.441177"
+ x2="-170.82031"
+ y1="63.26775"
+ x1="-177.6924"
+ gradientTransform="matrix(0.9098462,0,0,0.9414558,-136.13478,83.33514)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.2857143,0,0,0.787037,-171.71429,158.80092)"
- x1="-101"
- y1="-16"
- x2="-93.75"
- y2="-16.264704" />
+ id="linearGradient42426"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient30208"
- id="linearGradient42430"
+ y2="-16.264704"
+ x2="-93.75"
+ y1="-16"
+ x1="-101"
+ gradientTransform="matrix(1.2857143,0,0,0.787037,-171.71429,158.80092)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-1297,-948)"
- x1="1664.4413"
- y1="720.01788"
+ id="linearGradient42428"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="726.37006"
x2="1661.8125"
- y2="726.37006" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient19425"
- id="radialGradient42432"
+ y1="720.01788"
+ x1="1664.4413"
+ gradientTransform="translate(-1297,-948)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.1378252,-0.2988982,2.5269117,1.1651875,-1689.2674,-563.64056)"
- cx="1662.2664"
- cy="722.19189"
- fx="1662.2664"
+ id="linearGradient42430"
+ xlink:href="#linearGradient30208"
+ inkscape:collect="always" />
+ <radialGradient
+ r="5.5"
fy="722.19189"
- r="5.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient42434"
+ fx="1662.2664"
+ cy="722.19189"
+ cx="1662.2664"
+ gradientTransform="matrix(0.1378252,-0.2988982,2.5269117,1.1651875,-1689.2674,-563.64056)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8167109,0,0,0.8433415,-1256.7473,-918.72044)"
- x1="1984.3658"
- y1="827.77124"
- x2="1977.4047"
- y2="829.72656" />
+ id="radialGradient42432"
+ xlink:href="#linearGradient19425"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient42436"
+ y2="829.72656"
+ x2="1977.4047"
+ y1="827.77124"
+ x1="1984.3658"
+ gradientTransform="matrix(0.8167109,0,0,0.8433415,-1256.7473,-918.72044)"
gradientUnits="userSpaceOnUse"
- x1="-211.04486"
- y1="193.68091"
+ id="linearGradient42434"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="185.8125"
x2="-219.5"
- y2="185.8125" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="radialGradient42438"
+ y1="193.68091"
+ x1="-211.04486"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(2.6261963,-1.575549,0.4790575,0.7985147,261.90894,-304.15053)"
- cx="-216.5222"
- cy="188.13423"
- fx="-216.5222"
- fy="188.13423"
- r="6.9375" />
+ id="linearGradient42436"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="radialGradient42440"
+ r="6.9375"
+ fy="188.13423"
+ fx="-216.5222"
+ cy="188.13423"
+ cx="-216.5222"
+ gradientTransform="matrix(2.6261963,-1.575549,0.4790575,0.7985147,261.90894,-304.15053)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(2.4767928,-0.2294888,0.06653313,0.7180687,315.70283,0.01290384)"
- cx="-221.88463"
- cy="182.64247"
- fx="-221.88463"
+ id="radialGradient42438"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.4576657"
fy="182.64247"
- r="3.4576657" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient42442"
+ fx="-221.88463"
+ cy="182.64247"
+ cx="-221.88463"
+ gradientTransform="matrix(2.4767928,-0.2294888,0.06653313,0.7180687,315.70283,0.01290384)"
gradientUnits="userSpaceOnUse"
- x1="-225.00002"
- y1="38.277779"
- x2="-213"
- y2="44.732624" />
+ id="radialGradient42440"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="linearGradient42444"
+ y2="44.732624"
+ x2="-213"
+ y1="38.277779"
+ x1="-225.00002"
gradientUnits="userSpaceOnUse"
- x1="124.8772"
- y1="110.75571"
- x2="133.97179"
- y2="117.77643" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient42442"
xlink:href="#linearGradient319"
- id="linearGradient42446"
- gradientUnits="userSpaceOnUse"
- x1="130.39502"
- y1="116.31751"
- x2="142.64723"
- y2="129.05313" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient42448"
+ y2="117.77643"
+ x2="133.97179"
+ y1="110.75571"
+ x1="124.8772"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.1658027,0,0,1.1657997,-354.28972,51.94393)"
- x1="129.32576"
- y1="223.61363"
- x2="123.33967"
- y2="217.06438" />
+ id="linearGradient42444"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient42462"
- gradientUnits="userSpaceOnUse"
- x1="130.39502"
+ y2="129.05313"
+ x2="142.64723"
y1="116.31751"
- x2="140.66667"
- y2="125.94853" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient15425"
- id="linearGradient42464"
+ x1="130.39502"
gradientUnits="userSpaceOnUse"
- x1="123.26987"
- y1="108.56933"
- x2="138.25778"
- y2="124.59384" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient42446"
xlink:href="#linearGradient319"
- id="linearGradient42466"
- gradientUnits="userSpaceOnUse"
- x1="130.39502"
- y1="116.31751"
- x2="140.66667"
- y2="125.94853" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient42468"
+ y2="217.06438"
+ x2="123.33967"
+ y1="223.61363"
+ x1="129.32576"
+ gradientTransform="matrix(1.1658027,0,0,1.1657997,-354.28972,51.94393)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-0.8370074,0,0,0.8129865,84.784966,-149.92038)"
- x1="-4.9152389"
- y1="252.69086"
- x2="-45.689278"
- y2="252.63284" />
+ id="linearGradient42448"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient42470"
+ y2="125.94853"
+ x2="140.66667"
+ y1="116.31751"
+ x1="130.39502"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8167109,0,0,0.8433415,11.285548,8.325368)"
- x1="111.03847"
- y1="57.034107"
- x2="117.16058"
- y2="60.591385" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient42462"
xlink:href="#linearGradient319"
- id="linearGradient42472"
- gradientUnits="userSpaceOnUse"
- x1="130.39502"
- y1="116.31751"
- x2="140.66667"
- y2="125.94853" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient15425"
- id="linearGradient42474"
- gradientUnits="userSpaceOnUse"
- x1="123.26987"
- y1="108.56933"
+ y2="124.59384"
x2="138.25778"
- y2="124.59384" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient42477"
+ y1="108.56933"
+ x1="123.26987"
gradientUnits="userSpaceOnUse"
- x1="130.39502"
- y1="116.31751"
- x2="140.66667"
- y2="125.94853" />
+ id="linearGradient42464"
+ xlink:href="#linearGradient15425"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient42479"
+ y2="125.94853"
+ x2="140.66667"
+ y1="116.31751"
+ x1="130.39502"
gradientUnits="userSpaceOnUse"
- x1="-92.587807"
- y1="-18.005362"
- x2="-100.62162"
- y2="-17.998919" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient42466"
xlink:href="#linearGradient319"
- id="linearGradient42481"
- gradientUnits="userSpaceOnUse"
- x1="-101"
- y1="-16"
- x2="-93"
- y2="-17" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient42483"
+ y2="252.63284"
+ x2="-45.689278"
+ y1="252.69086"
+ x1="-4.9152389"
+ gradientTransform="matrix(-0.8370074,0,0,0.8129865,84.784966,-149.92038)"
gradientUnits="userSpaceOnUse"
- x1="-87.491188"
- y1="-22.830606"
- x2="-102.96513"
- y2="-22.166544" />
+ id="linearGradient42468"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient42485"
+ y2="60.591385"
+ x2="117.16058"
+ y1="57.034107"
+ x1="111.03847"
+ gradientTransform="matrix(0.8167109,0,0,0.8433415,11.285548,8.325368)"
gradientUnits="userSpaceOnUse"
- x1="-98.997849"
- y1="-23.173643"
- x2="-98.997849"
- y2="-25.872688" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient42470"
xlink:href="#linearGradient319"
- id="linearGradient42487"
- gradientUnits="userSpaceOnUse"
- x1="130.39502"
- y1="116.31751"
- x2="140.66667"
- y2="125.94853" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient15425"
- id="linearGradient42489"
+ y2="125.94853"
+ x2="140.66667"
+ y1="116.31751"
+ x1="130.39502"
gradientUnits="userSpaceOnUse"
- x1="123.26987"
- y1="108.56933"
- x2="138.25778"
- y2="124.59384" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient42472"
xlink:href="#linearGradient319"
- id="linearGradient42491"
- gradientUnits="userSpaceOnUse"
- x1="130.39502"
- y1="116.31751"
- x2="140.66667"
- y2="125.94853" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient42493"
+ y2="124.59384"
+ x2="138.25778"
+ y1="108.56933"
+ x1="123.26987"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.5290924,0,0,0.5294132,-17.313533,46.110999)"
- x1="109.04134"
- y1="75.666725"
- x2="135.45256"
- y2="103.11092" />
+ id="linearGradient42474"
+ xlink:href="#linearGradient15425"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient42495"
+ y2="125.94853"
+ x2="140.66667"
+ y1="116.31751"
+ x1="130.39502"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.5350034,0,0,0.5349052,24.446207,45.843517)"
- x1="47.655102"
- y1="93.805557"
- x2="59.057678"
- y2="105.27895" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient42477"
xlink:href="#linearGradient319"
- id="linearGradient42497"
- gradientUnits="userSpaceOnUse"
- x1="130.39502"
- y1="116.31751"
- x2="140.66667"
- y2="125.94853" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient15425"
- id="linearGradient42499"
+ y2="-17.998919"
+ x2="-100.62162"
+ y1="-18.005362"
+ x1="-92.587807"
gradientUnits="userSpaceOnUse"
- x1="123.26987"
- y1="108.56933"
- x2="138.25778"
- y2="124.59384" />
+ id="linearGradient42479"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="-17"
+ x2="-93"
+ y1="-16"
+ x1="-101"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient42481"
xlink:href="#linearGradient319"
- id="linearGradient42501"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="-22.166544"
+ x2="-102.96513"
+ y1="-22.830606"
+ x1="-87.491188"
gradientUnits="userSpaceOnUse"
- x1="130.39502"
- y1="116.31751"
- x2="140.66667"
- y2="125.94853" />
+ id="linearGradient42483"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="linearGradient42503"
+ y2="-25.872688"
+ x2="-98.997849"
+ y1="-23.173643"
+ x1="-98.997849"
gradientUnits="userSpaceOnUse"
- x1="124.8772"
- y1="110.75571"
- x2="133.97179"
- y2="117.77643" />
+ id="linearGradient42485"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="125.94853"
+ x2="140.66667"
+ y1="116.31751"
+ x1="130.39502"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient42487"
xlink:href="#linearGradient319"
- id="linearGradient42505"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="124.59384"
+ x2="138.25778"
+ y1="108.56933"
+ x1="123.26987"
gradientUnits="userSpaceOnUse"
- x1="130.39502"
- y1="116.31751"
- x2="142.64723"
- y2="129.05313" />
+ id="linearGradient42489"
+ xlink:href="#linearGradient15425"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="125.94853"
+ x2="140.66667"
+ y1="116.31751"
+ x1="130.39502"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient42491"
xlink:href="#linearGradient319"
- id="linearGradient42507"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="103.11092"
+ x2="135.45256"
+ y1="75.666725"
+ x1="109.04134"
+ gradientTransform="matrix(0.5290924,0,0,0.5294132,-17.313533,46.110999)"
gradientUnits="userSpaceOnUse"
- x1="130.39502"
- y1="116.31751"
- x2="140.66667"
- y2="125.94853" />
+ id="linearGradient42493"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient15425"
- id="linearGradient42509"
+ y2="105.27895"
+ x2="59.057678"
+ y1="93.805557"
+ x1="47.655102"
+ gradientTransform="matrix(0.5350034,0,0,0.5349052,24.446207,45.843517)"
gradientUnits="userSpaceOnUse"
- x1="123.26987"
- y1="108.56933"
- x2="138.25778"
- y2="124.59384" />
+ id="linearGradient42495"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="125.94853"
+ x2="140.66667"
+ y1="116.31751"
+ x1="130.39502"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient42497"
xlink:href="#linearGradient319"
- id="linearGradient42511"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="124.59384"
+ x2="138.25778"
+ y1="108.56933"
+ x1="123.26987"
gradientUnits="userSpaceOnUse"
- x1="130.39502"
- y1="116.31751"
+ id="linearGradient42499"
+ xlink:href="#linearGradient15425"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="125.94853"
x2="140.66667"
- y2="125.94853" />
+ y1="116.31751"
+ x1="130.39502"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient42501"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="117.77643"
+ x2="133.97179"
+ y1="110.75571"
+ x1="124.8772"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient42503"
xlink:href="#linearGradient10069"
- id="linearGradient42513"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="129.05313"
+ x2="142.64723"
+ y1="116.31751"
+ x1="130.39502"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.4749148,1.0023386,-1.2226848,-0.4749148,213.62384,41.735193)"
- x1="118.95689"
- y1="106.42961"
- x2="135.14919"
- y2="119.05286" />
+ id="linearGradient42505"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="125.94853"
+ x2="140.66667"
+ y1="116.31751"
+ x1="130.39502"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient42507"
xlink:href="#linearGradient319"
- id="linearGradient42515"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="124.59384"
+ x2="138.25778"
+ y1="108.56933"
+ x1="123.26987"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.5333554,1.1220467,-1.1447545,-0.5333554,196.63818,32.816067)"
- x1="130.39502"
- y1="116.31751"
- x2="147.95374"
- y2="134.687" />
+ id="linearGradient42509"
+ xlink:href="#linearGradient15425"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient18207"
- id="linearGradient42517"
+ y2="125.94853"
+ x2="140.66667"
+ y1="116.31751"
+ x1="130.39502"
gradientUnits="userSpaceOnUse"
- x1="-132.24858"
- y1="313.87549"
- x2="-171.01999"
- y2="223.69542" />
+ id="linearGradient42511"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient42519"
+ y2="119.05286"
+ x2="135.14919"
+ y1="106.42961"
+ x1="118.95689"
+ gradientTransform="matrix(0.4749148,1.0023386,-1.2226848,-0.4749148,213.62384,41.735193)"
gradientUnits="userSpaceOnUse"
- x1="114.15679"
- y1="100.93772"
- x2="137.5759"
- y2="124.47867" />
+ id="linearGradient42513"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="134.687"
+ x2="147.95374"
+ y1="116.31751"
+ x1="130.39502"
+ gradientTransform="matrix(0.5333554,1.1220467,-1.1447545,-0.5333554,196.63818,32.816067)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient42515"
xlink:href="#linearGradient319"
- id="linearGradient42521"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="223.69542"
+ x2="-171.01999"
+ y1="313.87549"
+ x1="-132.24858"
gradientUnits="userSpaceOnUse"
- x1="131.12576"
- y1="118"
- x2="140.19273"
- y2="125.82862" />
+ id="linearGradient42517"
+ xlink:href="#linearGradient18207"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030"
- id="linearGradient42523"
+ y2="124.47867"
+ x2="137.5759"
+ y1="100.93772"
+ x1="114.15679"
gradientUnits="userSpaceOnUse"
- x1="190.68166"
- y1="244.14676"
- x2="174.75458"
- y2="226.33672" />
+ id="linearGradient42519"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="125.82862"
+ x2="140.19273"
+ y1="118"
+ x1="131.12576"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient42521"
xlink:href="#linearGradient319"
- id="linearGradient42525"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="226.33672"
+ x2="174.75458"
+ y1="244.14676"
+ x1="190.68166"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9050931,-7.9558708e-4,0.00612764,0.9147058,26.488451,35.562258)"
- x1="299.70026"
- y1="408.49368"
- x2="322.08145"
- y2="429.53806" />
+ id="linearGradient42523"
+ xlink:href="#linearGradient9030"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient35406"
+ y2="429.53806"
+ x2="322.08145"
+ y1="408.49368"
+ x1="299.70026"
+ gradientTransform="matrix(0.9050931,-7.9558708e-4,0.00612764,0.9147058,26.488451,35.562258)"
gradientUnits="userSpaceOnUse"
- x1="130.39502"
- y1="116.31751"
- x2="140.66667"
- y2="125.94853" />
+ id="linearGradient42525"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient15425"
- id="linearGradient35408"
+ y2="125.94853"
+ x2="140.66667"
+ y1="116.31751"
+ x1="130.39502"
gradientUnits="userSpaceOnUse"
- x1="119.94563"
- y1="100.51657"
- x2="138.25778"
- y2="124.59384" />
+ id="linearGradient35406"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient35410"
+ y2="124.59384"
+ x2="138.25778"
+ y1="100.51657"
+ x1="119.94563"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9897912,0,0,0.9897912,2.2765631,2.9503441)"
- x1="311.90765"
- y1="311.2269"
+ id="linearGradient35408"
+ xlink:href="#linearGradient15425"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="308.51169"
x2="308.84512"
- y2="308.51169" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="radialGradient35412"
+ y1="311.2269"
+ x1="311.90765"
+ gradientTransform="matrix(0.9897912,0,0,0.9897912,2.2765631,2.9503441)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.1377775,-0.7111077,0.4395239,0.7032404,-101.13916,328.96745)"
- cx="269.71231"
- cy="237.2262"
- fx="269.71231"
- fy="237.2262"
- r="7.03125" />
+ id="linearGradient35410"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="radialGradient35414"
+ r="7.03125"
+ fy="237.2262"
+ fx="269.71231"
+ cy="237.2262"
+ cx="269.71231"
+ gradientTransform="matrix(1.1377775,-0.7111077,0.4395239,0.7032404,-101.13916,328.96745)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.706663,-1.1377794,0.5688915,0.8533318,-282.47828,404.20327)"
- cx="262.83905"
- cy="245.91792"
- fx="262.83905"
- fy="245.91792"
- r="7.03125" />
- <linearGradient
- inkscape:collect="always"
+ id="radialGradient35412"
xlink:href="#linearGradient319"
- id="linearGradient35416"
+ inkscape:collect="always" />
+ <radialGradient
+ r="7.03125"
+ fy="245.91792"
+ fx="262.83905"
+ cy="245.91792"
+ cx="262.83905"
+ gradientTransform="matrix(1.706663,-1.1377794,0.5688915,0.8533318,-282.47828,404.20327)"
gradientUnits="userSpaceOnUse"
- x1="130.39502"
- y1="116.31751"
- x2="140.66667"
- y2="125.94853" />
+ id="radialGradient35414"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient15425"
- id="linearGradient35418"
+ y2="125.94853"
+ x2="140.66667"
+ y1="116.31751"
+ x1="130.39502"
gradientUnits="userSpaceOnUse"
- x1="119.94563"
- y1="100.51657"
- x2="138.25778"
- y2="124.59384" />
+ id="linearGradient35416"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient35420"
+ y2="124.59384"
+ x2="138.25778"
+ y1="100.51657"
+ x1="119.94563"
gradientUnits="userSpaceOnUse"
- x1="220.14905"
- y1="291.80676"
- x2="226.09999"
- y2="286.2493" />
+ id="linearGradient35418"
+ xlink:href="#linearGradient15425"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient35422"
+ y2="286.2493"
+ x2="226.09999"
+ y1="291.80676"
+ x1="220.14905"
gradientUnits="userSpaceOnUse"
- x1="223.12212"
- y1="296.15784"
- x2="219.06912"
- y2="291.99768" />
+ id="linearGradient35420"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient35424"
+ y2="291.99768"
+ x2="219.06912"
+ y1="296.15784"
+ x1="223.12212"
gradientUnits="userSpaceOnUse"
- x1="217.56451"
- y1="290.56451"
+ id="linearGradient35422"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="297.01614"
x2="224.01613"
- y2="297.01614" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="radialGradient35426"
+ y1="290.56451"
+ x1="217.56451"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.3677588,0.3783715,-0.5696226,0.5536455,304.13863,47.532824)"
- cx="219.00334"
- cy="291.33972"
- fx="219.00334"
- fy="291.33972"
- r="4" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient35424"
xlink:href="#linearGradient319"
- id="linearGradient35468"
+ inkscape:collect="always" />
+ <radialGradient
+ r="4"
+ fy="291.33972"
+ fx="219.00334"
+ cy="291.33972"
+ cx="219.00334"
+ gradientTransform="matrix(0.3677588,0.3783715,-0.5696226,0.5536455,304.13863,47.532824)"
gradientUnits="userSpaceOnUse"
- x1="130.39502"
- y1="116.31751"
- x2="140.66667"
- y2="125.94853" />
+ id="radialGradient35426"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient15425"
- id="linearGradient35470"
+ y2="125.94853"
+ x2="140.66667"
+ y1="116.31751"
+ x1="130.39502"
gradientUnits="userSpaceOnUse"
- x1="119.94563"
- y1="100.51657"
- x2="138.25778"
- y2="124.59384" />
+ id="linearGradient35468"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient35472"
+ y2="124.59384"
+ x2="138.25778"
+ y1="100.51657"
+ x1="119.94563"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9897912,0,0,0.9897912,2.2765631,2.9503441)"
- x1="311.90765"
- y1="311.2269"
+ id="linearGradient35470"
+ xlink:href="#linearGradient15425"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="308.51169"
x2="308.84512"
- y2="308.51169" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="radialGradient35474"
+ y1="311.2269"
+ x1="311.90765"
+ gradientTransform="matrix(0.9897912,0,0,0.9897912,2.2765631,2.9503441)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.1377775,-0.7111077,0.4395239,0.7032404,-101.13916,328.96745)"
- cx="269.71231"
- cy="237.2262"
- fx="269.71231"
- fy="237.2262"
- r="7.03125" />
+ id="linearGradient35472"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="radialGradient35476"
+ r="7.03125"
+ fy="237.2262"
+ fx="269.71231"
+ cy="237.2262"
+ cx="269.71231"
+ gradientTransform="matrix(1.1377775,-0.7111077,0.4395239,0.7032404,-101.13916,328.96745)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.706663,-1.1377794,0.5688915,0.8533318,-282.47828,404.20327)"
- cx="262.83905"
- cy="245.91792"
- fx="262.83905"
- fy="245.91792"
- r="7.03125" />
- <linearGradient
- inkscape:collect="always"
+ id="radialGradient35474"
xlink:href="#linearGradient319"
- id="linearGradient35478"
+ inkscape:collect="always" />
+ <radialGradient
+ r="7.03125"
+ fy="245.91792"
+ fx="262.83905"
+ cy="245.91792"
+ cx="262.83905"
+ gradientTransform="matrix(1.706663,-1.1377794,0.5688915,0.8533318,-282.47828,404.20327)"
gradientUnits="userSpaceOnUse"
- x1="130.39502"
- y1="116.31751"
- x2="140.66667"
- y2="125.94853" />
+ id="radialGradient35476"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient15425"
- id="linearGradient35480"
+ y2="125.94853"
+ x2="140.66667"
+ y1="116.31751"
+ x1="130.39502"
gradientUnits="userSpaceOnUse"
- x1="119.94563"
- y1="100.51657"
- x2="138.25778"
- y2="124.59384" />
+ id="linearGradient35478"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient35482"
+ y2="124.59384"
+ x2="138.25778"
+ y1="100.51657"
+ x1="119.94563"
gradientUnits="userSpaceOnUse"
- x1="220.14905"
- y1="291.80676"
- x2="226.09999"
- y2="286.2493" />
+ id="linearGradient35480"
+ xlink:href="#linearGradient15425"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient35484"
+ y2="286.2493"
+ x2="226.09999"
+ y1="291.80676"
+ x1="220.14905"
gradientUnits="userSpaceOnUse"
- x1="223.12212"
- y1="296.15784"
- x2="219.06912"
- y2="291.99768" />
+ id="linearGradient35482"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient35486"
+ y2="291.99768"
+ x2="219.06912"
+ y1="296.15784"
+ x1="223.12212"
gradientUnits="userSpaceOnUse"
- x1="217.56451"
- y1="290.56451"
+ id="linearGradient35484"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="297.01614"
x2="224.01613"
- y2="297.01614" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="radialGradient35488"
+ y1="290.56451"
+ x1="217.56451"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.3677588,0.3783715,-0.5696226,0.5536455,304.13863,47.532824)"
- cx="219.00334"
- cy="291.33972"
- fx="219.00334"
+ id="linearGradient35486"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <radialGradient
+ r="4"
fy="291.33972"
- r="4" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="linearGradient34618"
+ fx="219.00334"
+ cy="291.33972"
+ cx="219.00334"
+ gradientTransform="matrix(0.3677588,0.3783715,-0.5696226,0.5536455,304.13863,47.532824)"
gradientUnits="userSpaceOnUse"
- x1="125.59209"
- y1="112.6446"
- x2="133.11621"
- y2="119.21729" />
- <linearGradient
- inkscape:collect="always"
+ id="radialGradient35488"
xlink:href="#linearGradient319"
- id="linearGradient34620"
- gradientUnits="userSpaceOnUse"
- x1="130.39502"
- y1="116.31751"
- x2="141.83322"
- y2="132.30261" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient35411"
- id="linearGradient35446"
+ y2="119.21729"
+ x2="133.11621"
+ y1="112.6446"
+ x1="125.59209"
gradientUnits="userSpaceOnUse"
- x1="31"
- y1="60.000004"
- x2="34"
- y2="54.000004" />
+ id="linearGradient34618"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient35411"
- id="linearGradient35448"
+ y2="132.30261"
+ x2="141.83322"
+ y1="116.31751"
+ x1="130.39502"
gradientUnits="userSpaceOnUse"
- x1="135.46967"
- y1="118"
- x2="121.4286"
- y2="101.14284" />
+ id="linearGradient34620"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient35411"
- id="linearGradient35450"
+ y2="54.000004"
+ x2="34"
+ y1="60.000004"
+ x1="31"
gradientUnits="userSpaceOnUse"
- x1="133.60002"
- y1="118"
- x2="128.8"
- y2="114.8" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient35446"
xlink:href="#linearGradient35411"
- id="linearGradient35452"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="101.14284"
+ x2="121.4286"
+ y1="118"
+ x1="135.46967"
gradientUnits="userSpaceOnUse"
- x1="132.30316"
- y1="123.05057"
- x2="128.8"
- y2="114.8" />
+ id="linearGradient35448"
+ xlink:href="#linearGradient35411"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="114.8"
+ x2="128.8"
+ y1="118"
+ x1="133.60002"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient35450"
xlink:href="#linearGradient35411"
- id="linearGradient35454"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="114.8"
+ x2="128.8"
+ y1="123.05057"
+ x1="132.30316"
gradientUnits="userSpaceOnUse"
- x1="136.35806"
- y1="124.27161"
+ id="linearGradient35452"
+ xlink:href="#linearGradient35411"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="118"
x2="130.48389"
- y2="118" />
+ y1="124.27161"
+ x1="136.35806"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient35454"
+ xlink:href="#linearGradient35411"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient35718"
- x1="28.130203"
- y1="65.791054"
- x2="32.5"
+ gradientUnits="userSpaceOnUse"
y2="55.066181"
- gradientUnits="userSpaceOnUse" />
+ x2="32.5"
+ y1="65.791054"
+ x1="28.130203"
+ id="linearGradient35718"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="radialGradient36452"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.050372,0,0,1.050372,-3.551238,-0.730396)"
- cx="70.5"
- cy="14.5"
- fx="70.5"
+ r="1.5"
fy="14.5"
- r="1.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient36273"
- id="linearGradient36454"
+ fx="70.5"
+ cy="14.5"
+ cx="70.5"
+ gradientTransform="matrix(1.050372,0,0,1.050372,-3.551238,-0.730396)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.4000084,0,0,0.4000084,137.60085,-8.4035259)"
- x1="-103.37495"
- y1="417.87503"
- x2="-101.49999"
- y2="419.75" />
+ id="radialGradient36452"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient36273"
- id="linearGradient36456"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.4000084,0,0,0.4000084,131.60084,3.5964741)"
- x1="-103.37495"
- y1="417.87503"
+ y2="419.75"
x2="-101.49999"
- y2="419.75" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient36273"
- id="linearGradient36458"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.4000084,0,0,0.4000084,143.60084,3.5964739)"
- x1="-103.37495"
y1="417.87503"
- x2="-101.49999"
- y2="419.75" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient37095"
+ x1="-103.37495"
+ gradientTransform="matrix(0.4000084,0,0,0.4000084,137.60085,-8.4035259)"
gradientUnits="userSpaceOnUse"
- x1="125.75312"
- y1="111.40558"
- x2="143.16118"
- y2="129.27902" />
+ id="linearGradient36454"
+ xlink:href="#linearGradient36273"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient37097"
+ y2="419.75"
+ x2="-101.49999"
+ y1="417.87503"
+ x1="-103.37495"
+ gradientTransform="matrix(0.4000084,0,0,0.4000084,131.60084,3.5964741)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.0028571,0,0,0.9943503,-0.4404318,0.129119)"
- x1="185.89514"
- y1="30.343155"
- x2="197.03207"
- y2="42.717522" />
+ id="linearGradient36456"
+ xlink:href="#linearGradient36273"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient36648"
+ y2="419.75"
+ x2="-101.49999"
+ y1="417.87503"
+ x1="-103.37495"
+ gradientTransform="matrix(0.4000084,0,0,0.4000084,143.60084,3.5964739)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-3,3)"
- x1="188"
- y1="40.25"
- x2="180.8125"
- y2="32.46875" />
+ id="linearGradient36458"
+ xlink:href="#linearGradient36273"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient36650"
+ y2="129.27902"
+ x2="143.16118"
+ y1="111.40558"
+ x1="125.75312"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-3,3)"
- x1="187.8125"
- y1="33.9375"
- x2="184.25"
- y2="30.15625" />
+ id="linearGradient37095"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient36652"
+ y2="42.717522"
+ x2="197.03207"
+ y1="30.343155"
+ x1="185.89514"
+ gradientTransform="matrix(1.0028571,0,0,0.9943503,-0.4404318,0.129119)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-3.0999952,2.9000005)"
- x1="177.85001"
- y1="33.537502"
- x2="186.00626"
- y2="43.381248" />
+ id="linearGradient37097"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient19900"
- id="linearGradient36654"
+ y2="32.46875"
+ x2="180.8125"
+ y1="40.25"
+ x1="188"
+ gradientTransform="translate(-3,3)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9643891,0,0,0.9772371,6.188671,1.0072576)"
- x1="182.20605"
- y1="39.645184"
- x2="172.36885"
- y2="31.368597" />
+ id="linearGradient36648"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient36656"
+ y2="30.15625"
+ x2="184.25"
+ y1="33.9375"
+ x1="187.8125"
+ gradientTransform="translate(-3,3)"
gradientUnits="userSpaceOnUse"
- x1="181.14906"
- y1="32.701904"
- x2="186.00002"
- y2="37.415516" />
+ id="linearGradient36650"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient19900"
- id="linearGradient36658"
+ y2="43.381248"
+ x2="186.00626"
+ y1="33.537502"
+ x1="177.85001"
+ gradientTransform="translate(-3.0999952,2.9000005)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9643891,0,0,0.9772371,9.438677,-2.4927424)"
- x1="181.9404"
- y1="40.924297"
- x2="175.82253"
- y2="34.272892" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient36652"
xlink:href="#linearGradient319"
- id="linearGradient36468"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9166695,0,0,0.9203753,-10.025729,345.78566)"
- x1="80.60067"
- y1="108.47212"
- x2="68.0271"
- y2="94.239906" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient13938"
- id="linearGradient36470"
+ y2="31.368597"
+ x2="172.36885"
+ y1="39.645184"
+ x1="182.20605"
+ gradientTransform="matrix(0.9643891,0,0,0.9772371,6.188671,1.0072576)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-15.983875,338)"
- x1="68.361542"
- y1="95.337166"
- x2="88.785263"
- y2="116.62141" />
+ id="linearGradient36654"
+ xlink:href="#linearGradient19900"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient36472"
+ y2="37.415516"
+ x2="186.00002"
+ y1="32.701904"
+ x1="181.14906"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9998599,0,0,0.9960071,-15.972985,338.41149)"
- x1="58.761654"
- y1="84.330009"
- x2="81.383331"
- y2="108.06429" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient36656"
xlink:href="#linearGradient319"
- id="linearGradient36713"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8167109,0,0,0.8433415,239.34332,-149.78578)"
- x1="104.90227"
- y1="53.227627"
- x2="117.12428"
- y2="61.720783" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient36715"
+ y2="34.272892"
+ x2="175.82253"
+ y1="40.924297"
+ x1="181.9404"
+ gradientTransform="matrix(0.9643891,0,0,0.9772371,9.438677,-2.4927424)"
gradientUnits="userSpaceOnUse"
- x1="-56.5"
- y1="340.32199"
- x2="-56.5"
- y2="348" />
+ id="linearGradient36658"
+ xlink:href="#linearGradient19900"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient36717"
+ y2="94.239906"
+ x2="68.0271"
+ y1="108.47212"
+ x1="80.60067"
+ gradientTransform="matrix(0.9166695,0,0,0.9203753,-10.025729,345.78566)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,13)"
- x1="-56.8125"
- y1="329.06256"
- x2="-47.214466"
- y2="329.26965" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient36468"
xlink:href="#linearGradient319"
- id="linearGradient36719"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8167109,0,0,0.8433415,239.34332,-149.78578)"
- x1="104.90227"
- y1="53.227627"
- x2="117.12428"
- y2="61.720783" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient36721"
+ y2="116.62141"
+ x2="88.785263"
+ y1="95.337166"
+ x1="68.361542"
+ gradientTransform="translate(-15.983875,338)"
gradientUnits="userSpaceOnUse"
- x1="-56.5"
- y1="340.32199"
- x2="-56.5"
- y2="348" />
+ id="linearGradient36470"
+ xlink:href="#linearGradient13938"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient36723"
+ y2="108.06429"
+ x2="81.383331"
+ y1="84.330009"
+ x1="58.761654"
+ gradientTransform="matrix(0.9998599,0,0,0.9960071,-15.972985,338.41149)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,13)"
- x1="-56.8125"
- y1="329.06256"
- x2="-47.214466"
- y2="329.26965" />
+ id="linearGradient36472"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="61.720783"
+ x2="117.12428"
+ y1="53.227627"
+ x1="104.90227"
+ gradientTransform="matrix(0.8167109,0,0,0.8433415,239.34332,-149.78578)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient36713"
xlink:href="#linearGradient319"
- id="linearGradient36725"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="348"
+ x2="-56.5"
+ y1="340.32199"
+ x1="-56.5"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8167109,0,0,0.8433415,239.34332,-149.78578)"
- x1="104.90227"
- y1="53.227627"
- x2="117.12428"
- y2="61.720783" />
+ id="linearGradient36715"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="329.26965"
+ x2="-47.214466"
+ y1="329.06256"
+ x1="-56.8125"
+ gradientTransform="translate(0,13)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient36717"
xlink:href="#linearGradient319"
- id="linearGradient36727"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="61.720783"
+ x2="117.12428"
+ y1="53.227627"
+ x1="104.90227"
+ gradientTransform="matrix(0.8167109,0,0,0.8433415,239.34332,-149.78578)"
gradientUnits="userSpaceOnUse"
- x1="-56.5"
- y1="340.32199"
- x2="-56.5"
- y2="348" />
+ id="linearGradient36719"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="348"
+ x2="-56.5"
+ y1="340.32199"
+ x1="-56.5"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient36721"
xlink:href="#linearGradient319"
- id="linearGradient36729"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="329.26965"
+ x2="-47.214466"
+ y1="329.06256"
+ x1="-56.8125"
+ gradientTransform="translate(0,13)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,0.7972867,61.99991,2.2419)"
- x1="260.67468"
- y1="108.02418"
- x2="273.9993"
- y2="126.37626" />
+ id="linearGradient36723"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient37396"
+ y2="61.720783"
+ x2="117.12428"
+ y1="53.227627"
+ x1="104.90227"
+ gradientTransform="matrix(0.8167109,0,0,0.8433415,239.34332,-149.78578)"
gradientUnits="userSpaceOnUse"
- x1="389.73953"
- y1="220.84622"
- x2="389.59052"
- y2="248.09296"
- gradientTransform="matrix(-1,0,0,1,780.92531,0)" />
+ id="linearGradient36725"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="348"
+ x2="-56.5"
+ y1="340.32199"
+ x1="-56.5"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient36727"
xlink:href="#linearGradient319"
- id="linearGradient37398"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="126.37626"
+ x2="273.9993"
+ y1="108.02418"
+ x1="260.67468"
+ gradientTransform="matrix(1,0,0,0.7972867,61.99991,2.2419)"
gradientUnits="userSpaceOnUse"
- x1="389.51059"
- y1="241.72565"
- x2="388.20074"
- y2="242.55887"
- gradientTransform="matrix(-1,0,0,1,780.92531,0)" />
+ id="linearGradient36729"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient38570"
+ gradientTransform="matrix(-1,0,0,1,780.92531,0)"
+ y2="248.09296"
+ x2="389.59052"
+ y1="220.84622"
+ x1="389.73953"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-2,0)"
- x1="-20"
- y1="283"
- x2="-20"
- y2="284.5" />
+ id="linearGradient37396"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient38572"
+ gradientTransform="matrix(-1,0,0,1,780.92531,0)"
+ y2="242.55887"
+ x2="388.20074"
+ y1="241.72565"
+ x1="389.51059"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-2,-582)"
- x1="-20"
+ id="linearGradient37398"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="284.5"
+ x2="-20"
y1="283"
+ x1="-20"
+ gradientTransform="translate(-2,0)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient38570"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="284.5"
x2="-20"
- y2="284.5" />
+ y1="283"
+ x1="-20"
+ gradientTransform="translate(-2,-582)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient38572"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<mask
- maskUnits="userSpaceOnUse"
- id="mask38561">
+ id="mask38561"
+ maskUnits="userSpaceOnUse">
<g
id="g38563">
<rect
- y="278"
- x="-23"
- height="13"
- width="16"
+ style="fill:url(#linearGradient38570);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect38565"
- style="fill:url(#linearGradient38570);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
- <rect
- transform="scale(1,-1)"
- style="fill:url(#linearGradient38572);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- id="rect38567"
width="16"
height="13"
x="-23"
- y="-304" />
+ y="278" />
+ <rect
+ y="-304"
+ x="-23"
+ height="13"
+ width="16"
+ id="rect38567"
+ style="fill:url(#linearGradient38572);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ transform="scale(1,-1)" />
</g>
</mask>
<linearGradient
- inkscape:collect="always"
- id="linearGradient16500-7">
+ id="linearGradient16500-7"
+ inkscape:collect="always">
<stop
- style="stop-color:black;stop-opacity:1;"
+ id="stop16502-1"
offset="0"
- id="stop16502-1" />
+ style="stop-color:black;stop-opacity:1;" />
<stop
- style="stop-color:black;stop-opacity:0;"
+ id="stop16504-2"
offset="1"
- id="stop16504-2" />
+ style="stop-color:black;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient1610-7-6">
<stop
- style="stop-color:black;stop-opacity:1;"
+ id="stop1611-4-1"
offset="0"
- id="stop1611-4-1" />
+ style="stop-color:black;stop-opacity:1;" />
<stop
- style="stop-color:white;stop-opacity:1;"
+ id="stop1612-0-4"
offset="1"
- id="stop1612-0-4" />
+ style="stop-color:white;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient10069-4-2">
<stop
- style="stop-color:#000000;stop-opacity:1;"
+ id="stop10071-8-3"
offset="0"
- id="stop10071-8-3" />
+ style="stop-color:#000000;stop-opacity:1;" />
<stop
- style="stop-color:#000000;stop-opacity:0;"
+ id="stop10073-8-2"
offset="1"
- id="stop10073-8-2" />
+ style="stop-color:#000000;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- id="linearGradient11871-4">
+ id="linearGradient11871-4"
+ inkscape:collect="always">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop11873-5"
offset="0"
- id="stop11873-5" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop11875-5"
offset="1"
- id="stop11875-5" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610-7-6"
- id="linearGradient39048"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,-1,-83,199)"
- x1="96"
- y1="42"
+ y2="12"
x2="68"
- y2="12" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069-4-2"
- id="linearGradient39050"
- gradientUnits="userSpaceOnUse"
+ y1="42"
+ x1="96"
gradientTransform="matrix(1,0,0,-1,-83,199)"
- x1="65"
- y1="20"
- x2="66"
- y2="12" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient11871-4"
- id="linearGradient39052"
gradientUnits="userSpaceOnUse"
+ id="linearGradient39048"
+ xlink:href="#linearGradient1610-7-6"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="12"
+ x2="66"
+ y1="20"
+ x1="65"
gradientTransform="matrix(1,0,0,-1,-83,199)"
- x1="67.25"
- y1="18"
- x2="68"
- y2="16" />
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient39050"
+ xlink:href="#linearGradient10069-4-2"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient35411-4-27"
- id="linearGradient39835-9"
+ y2="16"
+ x2="68"
+ y1="18"
+ x1="67.25"
+ gradientTransform="matrix(1,0,0,-1,-83,199)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8422958,0,0,0.8364537,82.535678,2.9394266)"
- x1="89.975014"
- y1="-32.339718"
+ id="linearGradient39052"
+ xlink:href="#linearGradient11871-4"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="-33.303608"
x2="88.492455"
- y2="-33.303608" />
+ y1="-32.339718"
+ x1="89.975014"
+ gradientTransform="matrix(0.8422958,0,0,0.8364537,82.535678,2.9394266)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient39835-9"
+ xlink:href="#linearGradient35411-4-27"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient35411-4-27">
<stop
- id="stop35414-0-9"
+ style="stop-color:#2b5385;stop-opacity:1;"
offset="0"
- style="stop-color:#2b5385;stop-opacity:1;" />
+ id="stop35414-0-9" />
<stop
- id="stop35416-9-5"
+ style="stop-color:#ffffff;stop-opacity:1;"
offset="1"
- style="stop-color:#ffffff;stop-opacity:1;" />
+ id="stop35416-9-5" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient35411-8-1-3"
- id="linearGradient39837-4"
- gradientUnits="userSpaceOnUse"
- x1="131.02808"
- y1="123.49161"
+ y2="115.97001"
x2="128.7139"
- y2="115.97001" />
+ y1="123.49161"
+ x1="131.02808"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient39837-4"
+ xlink:href="#linearGradient35411-8-1-3"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient35411-8-1-3">
<stop
- id="stop35414-2-7-1"
+ style="stop-color:#2b5385;stop-opacity:1;"
offset="0"
- style="stop-color:#2b5385;stop-opacity:1;" />
+ id="stop35414-2-7-1" />
<stop
- id="stop35416-4-1-2"
+ style="stop-color:#ffffff;stop-opacity:1;"
offset="1"
- style="stop-color:#ffffff;stop-opacity:1;" />
+ id="stop35416-4-1-2" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient35411-8-1-3"
- id="linearGradient39839-3"
- gradientUnits="userSpaceOnUse"
- x1="136.35806"
- y1="124.27161"
+ y2="118"
x2="130.48389"
- y2="118" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974-5-4"
- id="linearGradient39841-3"
+ y1="124.27161"
+ x1="136.35806"
gradientUnits="userSpaceOnUse"
- x1="115.15884"
- y1="88.476723"
+ id="linearGradient39839-3"
+ xlink:href="#linearGradient35411-8-1-3"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="82.308861"
x2="109.18613"
- y2="82.308861" />
+ y1="88.476723"
+ x1="115.15884"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient39841-3"
+ xlink:href="#linearGradient23974-5-4"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient23974-5-4">
<stop
- id="stop23976-27-1"
+ style="stop-color:#2561b7;stop-opacity:1;"
offset="0"
- style="stop-color:#2561b7;stop-opacity:1;" />
+ id="stop23976-27-1" />
<stop
- id="stop23978-6-1"
+ style="stop-color:#f9fbff;stop-opacity:1"
offset="1"
- style="stop-color:#f9fbff;stop-opacity:1" />
+ id="stop23978-6-1" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610-8"
- id="linearGradient39843-3"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(21,0)"
- x1="101"
- y1="84.25"
+ y2="81.5"
x2="97.75"
- y2="81.5" />
+ y1="84.25"
+ x1="101"
+ gradientTransform="translate(21,0)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient39843-3"
+ xlink:href="#linearGradient1610-8"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient1610-8">
<stop
- style="stop-color:black;stop-opacity:1;"
+ id="stop1611-7"
offset="0"
- id="stop1611-7" />
+ style="stop-color:black;stop-opacity:1;" />
<stop
- style="stop-color:white;stop-opacity:1;"
+ id="stop1612-4"
offset="1"
- id="stop1612-4" />
+ style="stop-color:white;stop-opacity:1;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319-77"
- id="linearGradient39845-2"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(21,0)"
- x1="87.44548"
- y1="81.439644"
+ y2="89.708977"
x2="96.592278"
- y2="89.708977" />
+ y1="81.439644"
+ x1="87.44548"
+ gradientTransform="translate(21,0)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient39845-2"
+ xlink:href="#linearGradient319-77"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient319-77">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop320-9"
offset="0"
- id="stop320-9" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop321-31"
offset="1"
- id="stop321-31" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient22882"
- id="linearGradient41540"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.0369025,0,0,1.5,-458.38567,-344)"
- x1="23.959812"
- y1="285"
+ y2="285"
x2="31.498274"
- y2="285" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient22882"
- id="linearGradient41542"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.1929722,0,0,0.5,-462.63135,-59)"
- x1="24"
y1="285"
+ x1="23.959812"
+ gradientTransform="matrix(1.0369025,0,0,1.5,-458.38567,-344)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient41540"
+ xlink:href="#linearGradient22882"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="285"
x2="31.538462"
- y2="285" />
+ y1="285"
+ x1="24"
+ gradientTransform="matrix(1.1929722,0,0,0.5,-462.63135,-59)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient41542"
+ xlink:href="#linearGradient22882"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient23974-4">
<stop
- id="stop23976-20"
+ style="stop-color:#2561b7;stop-opacity:1;"
offset="0"
- style="stop-color:#2561b7;stop-opacity:1;" />
+ id="stop23976-20" />
<stop
- id="stop23978-9"
+ style="stop-color:#f9fbff;stop-opacity:1"
offset="1"
- style="stop-color:#f9fbff;stop-opacity:1" />
+ id="stop23978-9" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319-37"
- id="linearGradient32529-7"
- gradientUnits="userSpaceOnUse"
- x1="139.2112"
- y1="111.35809"
+ y2="128"
x2="125.18381"
- y2="128" />
+ y1="111.35809"
+ x1="139.2112"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient32529-7"
+ xlink:href="#linearGradient319-37"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient319-37">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop320-2"
offset="0"
- id="stop320-2" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop321-60"
offset="1"
- id="stop321-60" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
- y2="125.77761"
- x2="139.07738"
- y1="115.76797"
- x1="129.62384"
- gradientUnits="userSpaceOnUse"
- id="linearGradient41582"
- xlink:href="#linearGradient23974-4"
- inkscape:collect="always" />
- <radialGradient
inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="radialGradient41666"
+ xlink:href="#linearGradient23974-4"
+ id="linearGradient41582"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8128508,0,0,0.8128508,80.474142,14.46897)"
- cx="430.00003"
- cy="77.3125"
- fx="430.00003"
+ x1="129.62384"
+ y1="115.76797"
+ x2="139.07738"
+ y2="125.77761" />
+ <radialGradient
+ r="8"
fy="77.3125"
- r="8" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient41668"
+ fx="430.00003"
+ cy="77.3125"
+ cx="430.00003"
+ gradientTransform="matrix(0.8128508,0,0,0.8128508,80.474142,14.46897)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.785748,0,0,0.78488,265.93616,46.1048)"
- x1="210.08989"
- y1="38.088879"
- x2="199.27217"
- y2="38.088879" />
+ id="radialGradient41666"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5060"
- id="linearGradient41670"
+ y2="38.088879"
+ x2="199.27217"
+ y1="38.088879"
+ x1="210.08989"
+ gradientTransform="matrix(0.785748,0,0,0.78488,265.93616,46.1048)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(399.01387,-202)"
- x1="28.4375"
- y1="277"
- x2="23.25"
- y2="276.92188" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient41668"
xlink:href="#linearGradient319"
- id="linearGradient41672"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0.01387,0)"
- x1="437.98615"
- y1="77"
- x2="424.75217"
- y2="75.5" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient41674"
+ y2="276.92188"
+ x2="23.25"
+ y1="277"
+ x1="28.4375"
+ gradientTransform="translate(399.01387,-202)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0.01387,0)"
- x1="438.61115"
- y1="78"
- x2="424.75217"
- y2="75.5" />
+ id="linearGradient41670"
+ xlink:href="#linearGradient5060"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient41676"
- gradientUnits="userSpaceOnUse"
+ y2="75.5"
+ x2="424.75217"
+ y1="77"
+ x1="437.98615"
gradientTransform="translate(0.01387,0)"
- x1="441.98615"
- y1="77.44017"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient41672"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="75.5"
x2="424.75217"
- y2="75.5" />
+ y1="78"
+ x1="438.61115"
+ gradientTransform="translate(0.01387,0)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient41674"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient42432"
+ y2="75.5"
+ x2="424.75217"
+ y1="77.44017"
+ x1="441.98615"
+ gradientTransform="translate(0.01387,0)"
gradientUnits="userSpaceOnUse"
- x1="258.94861"
- y1="285.63672"
- x2="237.92474"
- y2="261.44183" />
+ id="linearGradient41676"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient42435"
+ y2="261.44183"
+ x2="237.92474"
+ y1="285.63672"
+ x1="258.94861"
gradientUnits="userSpaceOnUse"
- x1="135.45557"
- y1="122.90726"
- x2="130.54761"
- y2="116.54932" />
+ id="linearGradient42432"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient42437"
+ y2="116.54932"
+ x2="130.54761"
+ y1="122.90726"
+ x1="135.45557"
gradientUnits="userSpaceOnUse"
- x1="125.81818"
- y1="111.81818"
+ id="linearGradient42435"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="129.27184"
x2="143.88347"
- y2="129.27184" />
+ y1="111.81818"
+ x1="125.81818"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient42437"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<clipPath
- clipPathUnits="userSpaceOnUse"
- id="clipPath42711">
+ id="clipPath42711"
+ clipPathUnits="userSpaceOnUse">
<rect
- style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- id="rect42713"
- width="8.7252884"
- height="17.464855"
+ y="214.76154"
x="127.4093"
- y="214.76154" />
+ height="17.464855"
+ width="8.7252884"
+ id="rect42713"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
</clipPath>
<linearGradient
id="linearGradient38796-7-9">
<stop
- style="stop-color:#fc9694;stop-opacity:1;"
+ id="stop38798-6-8"
offset="0"
- id="stop38798-6-8" />
+ style="stop-color:#fc9694;stop-opacity:1;" />
<stop
- style="stop-color:#e71609;stop-opacity:1;"
+ id="stop38800-1-8"
offset="1"
- id="stop38800-1-8" />
+ style="stop-color:#e71609;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient1610-87">
<stop
- style="stop-color:black;stop-opacity:1;"
+ id="stop1611-78"
offset="0"
- id="stop1611-78" />
+ style="stop-color:black;stop-opacity:1;" />
<stop
- style="stop-color:white;stop-opacity:1;"
+ id="stop1612-3"
offset="1"
- id="stop1612-3" />
+ style="stop-color:white;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient24679-1">
<stop
- style="stop-color:#3d361a;stop-opacity:1;"
+ id="stop24681-0"
offset="0"
- id="stop24681-0" />
+ style="stop-color:#3d361a;stop-opacity:1;" />
<stop
- id="stop24683-7"
+ style="stop-color:#d1c595;stop-opacity:1;"
offset="0.45537567"
- style="stop-color:#d1c595;stop-opacity:1;" />
+ id="stop24683-7" />
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop24685-3"
offset="1"
- id="stop24685-3" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient38719"
- gradientUnits="userSpaceOnUse"
- x1="125.99933"
- y1="111.2683"
+ y2="122.36016"
x2="134.91479"
- y2="122.36016" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient38722"
+ y1="111.2683"
+ x1="125.99933"
gradientUnits="userSpaceOnUse"
- x1="126.72586"
- y1="112.53999"
- x2="134.91479"
- y2="122.36016" />
+ id="linearGradient38719"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient13973"
- id="linearGradient38724"
+ y2="122.36016"
+ x2="134.91479"
+ y1="112.53999"
+ x1="126.72586"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(19.367382,0)"
- x1="111.46314"
- y1="113.45913"
- x2="99.628899"
- y2="99.029617" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient38722"
xlink:href="#linearGradient319"
- id="linearGradient38726"
- gradientUnits="userSpaceOnUse"
- x1="127.63637"
- y1="114.2303"
- x2="143.69765"
- y2="131.03783" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient39142"
+ y2="99.029617"
+ x2="99.628899"
+ y1="113.45913"
+ x1="111.46314"
+ gradientTransform="translate(19.367382,0)"
gradientUnits="userSpaceOnUse"
- x1="400.90442"
- y1="68.853401"
- x2="410.47467"
- y2="77.877228" />
+ id="linearGradient38724"
+ xlink:href="#linearGradient13973"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="131.03783"
+ x2="143.69765"
+ y1="114.2303"
+ x1="127.63637"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient38726"
xlink:href="#linearGradient319"
- id="linearGradient38005"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="77.877228"
+ x2="410.47467"
+ y1="68.853401"
+ x1="400.90442"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-157.00004,-233.00002)"
- x1="308"
- y1="323"
- x2="337.80573"
- y2="337.517" />
+ id="linearGradient39142"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient38007"
+ y2="337.517"
+ x2="337.80573"
+ y1="323"
+ x1="308"
+ gradientTransform="translate(-157.00004,-233.00002)"
gradientUnits="userSpaceOnUse"
- x1="285.39999"
- y1="323.80002"
+ id="linearGradient38005"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="325"
x2="286.60001"
- y2="325" />
+ y1="323.80002"
+ x1="285.39999"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient38007"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<clipPath
- clipPathUnits="userSpaceOnUse"
- id="clipPath43368-1">
+ id="clipPath43368-1"
+ clipPathUnits="userSpaceOnUse">
<rect
- style="fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.79999995;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- id="rect43370-7"
- width="16"
- height="16"
+ y="26"
x="-79"
- y="26" />
+ height="16"
+ width="16"
+ id="rect43370-7"
+ style="fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.79999995;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
</clipPath>
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient43276-0"
- id="radialGradient43410-4"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.4098275,-0.6406034,2.5104141,1.6060416,-127.46107,-65.792415)"
- cx="-67.890839"
- cy="33.548397"
- fx="-67.890839"
+ r="3.1501868"
fy="33.548397"
- r="3.1501868" />
+ fx="-67.890839"
+ cy="33.548397"
+ cx="-67.890839"
+ gradientTransform="matrix(0.4098275,-0.6406034,2.5104141,1.6060416,-127.46107,-65.792415)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient43410-4"
+ xlink:href="#linearGradient43276-0"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- id="linearGradient43276-0">
+ id="linearGradient43276-0"
+ inkscape:collect="always">
<stop
- style="stop-color:#000000;stop-opacity:1;"
+ id="stop43278-9"
offset="0"
- id="stop43278-9" />
+ style="stop-color:#000000;stop-opacity:1;" />
<stop
- style="stop-color:#000000;stop-opacity:0;"
+ id="stop43280-4"
offset="1"
- id="stop43280-4" />
+ style="stop-color:#000000;stop-opacity:0;" />
</linearGradient>
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient43276-0"
- id="radialGradient43412-8"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.4098275,-0.7183766,2.5885772,1.4767588,-130.41049,-65.518114)"
- cx="-74.960228"
- cy="34.896461"
- fx="-74.960228"
+ r="3.1501868"
fy="34.896461"
- r="3.1501868" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient38796-7-9"
- id="linearGradient40270"
+ fx="-74.960228"
+ cy="34.896461"
+ cx="-74.960228"
+ gradientTransform="matrix(0.4098275,-0.7183766,2.5885772,1.4767588,-130.41049,-65.518114)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,-21)"
- x1="59.622501"
- y1="54.1525"
- x2="60.981617"
- y2="55.566177" />
+ id="radialGradient43412-8"
+ xlink:href="#linearGradient43276-0"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610-87"
- id="linearGradient40272"
+ y2="55.566177"
+ x2="60.981617"
+ y1="54.1525"
+ x1="59.622501"
+ gradientTransform="translate(0,-21)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-0.5,-21)"
- x1="60.25"
- y1="56.5"
- x2="57.789688"
- y2="54.130001" />
+ id="linearGradient40270"
+ xlink:href="#linearGradient38796-7-9"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610-87"
- id="linearGradient40274"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-0.5,-21)"
- x1="60.25"
+ y2="54.130001"
+ x2="57.789688"
y1="56.5"
- x2="56"
- y2="52.25" />
- <linearGradient
- inkscape:collect="always"
+ x1="60.25"
+ gradientTransform="translate(-0.5,-21)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient40272"
xlink:href="#linearGradient1610-87"
- id="linearGradient40276"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="52.25"
+ x2="56"
+ y1="56.5"
+ x1="60.25"
+ gradientTransform="translate(-0.5,-21)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-1.54625,-1)"
- x1="63.666252"
- y1="37.960625"
- x2="60.676094"
- y2="34.685287" />
+ id="linearGradient40274"
+ xlink:href="#linearGradient1610-87"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24679-1"
- id="linearGradient40278"
+ y2="34.685287"
+ x2="60.676094"
+ y1="37.960625"
+ x1="63.666252"
+ gradientTransform="translate(-1.54625,-1)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,-21)"
- x1="52.17437"
- y1="65.644958"
+ id="linearGradient40276"
+ xlink:href="#linearGradient1610-87"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="62.960247"
x2="50.371208"
- y2="62.960247" />
+ y1="65.644958"
+ x1="52.17437"
+ gradientTransform="translate(0,-21)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient40278"
+ xlink:href="#linearGradient24679-1"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient24143-0">
<stop
- id="stop24145-0"
+ style="stop-color:#2c2c2c;stop-opacity:1;"
offset="0"
- style="stop-color:#2c2c2c;stop-opacity:1;" />
+ id="stop24145-0" />
<stop
- style="stop-color:#b3b3b3;stop-opacity:1;"
+ id="stop24669-1"
offset="0.5"
- id="stop24669-1" />
+ style="stop-color:#b3b3b3;stop-opacity:1;" />
<stop
- id="stop24147-4"
+ style="stop-color:#ffffff;stop-opacity:1;"
offset="1"
- style="stop-color:#ffffff;stop-opacity:1;" />
+ id="stop24147-4" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610-3-7"
- id="linearGradient39686-1"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(22,0)"
- x1="-70.605209"
- y1="-121.58411"
+ y2="-89.026711"
x2="-28.177105"
- y2="-89.026711" />
+ y1="-121.58411"
+ x1="-70.605209"
+ gradientTransform="translate(22,0)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient39686-1"
+ xlink:href="#linearGradient1610-3-7"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient1610-3-7">
<stop
- style="stop-color:black;stop-opacity:1;"
+ id="stop1611-1-4"
offset="0"
- id="stop1611-1-4" />
+ style="stop-color:black;stop-opacity:1;" />
<stop
- style="stop-color:white;stop-opacity:1;"
+ id="stop1612-6-0"
offset="1"
- id="stop1612-6-0" />
+ style="stop-color:white;stop-opacity:1;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319-5-9-4"
- id="linearGradient39688-9"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(22,0)"
- x1="-74"
- y1="-124"
+ y2="-103.2075"
x2="-55.5975"
- y2="-103.2075" />
+ y1="-124"
+ x1="-74"
+ gradientTransform="translate(22,0)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient39688-9"
+ xlink:href="#linearGradient319-5-9-4"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient319-5-9-4">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop320-761-8-8"
offset="0"
- id="stop320-761-8-8" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop321-89-24-8"
offset="1"
- id="stop321-89-24-8" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient37542-6">
<stop
- id="stop37544-18"
+ style="stop-color:#000000;stop-opacity:1;"
offset="0"
- style="stop-color:#000000;stop-opacity:1;" />
+ id="stop37544-18" />
<stop
- id="stop37546-92"
+ style="stop-color:#ffffff;stop-opacity:1;"
offset="1"
- style="stop-color:#ffffff;stop-opacity:1;" />
+ id="stop37546-92" />
</linearGradient>
<linearGradient
id="linearGradient16500-3">
<stop
- style="stop-color:black;stop-opacity:1;"
+ id="stop16502-3"
offset="0"
- id="stop16502-3" />
+ style="stop-color:black;stop-opacity:1;" />
<stop
- style="stop-color:black;stop-opacity:0;"
+ id="stop16504-41"
offset="1"
- id="stop16504-41" />
+ style="stop-color:black;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient9030-1">
<stop
- style="stop-color:white;stop-opacity:1;"
+ id="stop9032-9"
offset="0"
- id="stop9032-9" />
+ style="stop-color:white;stop-opacity:1;" />
<stop
- style="stop-color:white;stop-opacity:0;"
+ id="stop9034-8"
offset="1"
- id="stop9034-8" />
+ style="stop-color:white;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient59371">
<stop
- style="stop-color:black;stop-opacity:1;"
+ id="stop59373"
offset="0"
- id="stop59373" />
+ style="stop-color:black;stop-opacity:1;" />
<stop
- style="stop-color:black;stop-opacity:0;"
+ id="stop59375"
offset="1"
- id="stop59375" />
+ style="stop-color:black;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319-9-1"
- id="linearGradient42965-7"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(301.02752,449.99999)"
- x1="25.963812"
- y1="155.66899"
+ y2="168"
x2="29.972469"
- y2="168" />
+ y1="155.66899"
+ x1="25.963812"
+ gradientTransform="translate(301.02752,449.99999)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient42965-7"
+ xlink:href="#linearGradient319-9-1"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient319-9-1">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop320-92-1"
offset="0"
- id="stop320-92-1" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop321-55-5"
offset="1"
- id="stop321-55-5" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610-06-1"
- id="linearGradient42967-6"
- gradientUnits="userSpaceOnUse"
- x1="335.96875"
- y1="607.09375"
+ y2="628.20752"
x2="337.04251"
- y2="628.20752" />
+ y1="607.09375"
+ x1="335.96875"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient42967-6"
+ xlink:href="#linearGradient1610-06-1"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient1610-06-1">
<stop
- style="stop-color:black;stop-opacity:1;"
+ id="stop1611-8-4"
offset="0"
- id="stop1611-8-4" />
+ style="stop-color:black;stop-opacity:1;" />
<stop
- style="stop-color:white;stop-opacity:1;"
+ id="stop1612-1-2"
offset="1"
- id="stop1612-1-2" />
+ style="stop-color:white;stop-opacity:1;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient41266"
- gradientUnits="userSpaceOnUse"
- x1="98.858559"
- y1="80.045052"
+ y2="122.92735"
x2="135.00615"
- y2="122.92735" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient41268"
+ y1="80.045052"
+ x1="98.858559"
gradientUnits="userSpaceOnUse"
- x1="130.75166"
- y1="245.03757"
- x2="129.24866"
- y2="243.31177" />
+ id="linearGradient41266"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient41270"
+ y2="243.31177"
+ x2="129.24866"
+ y1="245.03757"
+ x1="130.75166"
gradientUnits="userSpaceOnUse"
- x1="126.37006"
- y1="112.31642"
- x2="144.22272"
- y2="129.82761" />
+ id="linearGradient41268"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030"
- id="linearGradient41272"
+ y2="129.82761"
+ x2="144.22272"
+ y1="112.31642"
+ x1="126.37006"
gradientUnits="userSpaceOnUse"
- x1="190.68166"
- y1="244.14676"
- x2="174.75458"
- y2="226.33672" />
+ id="linearGradient41270"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient40918"
+ y2="226.33672"
+ x2="174.75458"
+ y1="244.14676"
+ x1="190.68166"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(146.00001,-20)"
- x1="108"
- y1="500"
- x2="54.8125"
- y2="500" />
+ id="linearGradient41272"
+ xlink:href="#linearGradient9030"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient15809"
- id="linearGradient40920"
- gradientUnits="userSpaceOnUse"
+ y2="500"
+ x2="54.8125"
+ y1="500"
+ x1="108"
gradientTransform="translate(146.00001,-20)"
- x1="88.874489"
- y1="502.71924"
- x2="41.311054"
- y2="501.10059" />
- <linearGradient
- inkscape:collect="always"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient40918"
xlink:href="#linearGradient1610"
- id="linearGradient40922"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="501.10059"
+ x2="41.311054"
+ y1="502.71924"
+ x1="88.874489"
+ gradientTransform="translate(146.00001,-20)"
gradientUnits="userSpaceOnUse"
- x1="80.768944"
- y1="504.67188"
- x2="76.885078"
- y2="501.58331" />
+ id="linearGradient40920"
+ xlink:href="#linearGradient15809"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient40924"
+ y2="501.58331"
+ x2="76.885078"
+ y1="504.67188"
+ x1="80.768944"
gradientUnits="userSpaceOnUse"
- x1="89.526657"
- y1="511.42972"
+ id="linearGradient40922"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="501.04794"
x2="78.000008"
- y2="501.04794" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient14262"
- id="radialGradient40926"
+ y1="511.42972"
+ x1="89.526657"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.3949409,0.3949425,-0.4243709,0.4254619,404.60763,237.35923)"
- cx="75.95578"
- cy="492.15359"
- fx="75.95578"
- fy="492.15359"
- r="3.1650217" />
- <radialGradient
- inkscape:collect="always"
+ id="linearGradient40924"
xlink:href="#linearGradient319"
- id="radialGradient40928"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.9435203,-2.1990242,1.1704696,1.0049395,-665.14472,173.40654)"
- cx="79.959885"
- cy="503.81497"
- fx="79.959885"
- fy="503.81497"
- r="2.9089756" />
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
+ r="3.1650217"
+ fy="492.15359"
+ fx="75.95578"
+ cy="492.15359"
+ cx="75.95578"
+ gradientTransform="matrix(0.3949409,0.3949425,-0.4243709,0.4254619,404.60763,237.35923)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient40926"
xlink:href="#linearGradient14262"
- id="radialGradient40930"
+ inkscape:collect="always" />
+ <radialGradient
+ r="2.9089756"
+ fy="503.81497"
+ fx="79.959885"
+ cy="503.81497"
+ cx="79.959885"
+ gradientTransform="matrix(1.9435203,-2.1990242,1.1704696,1.0049395,-665.14472,173.40654)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8886193,0.8021825,-0.8051059,0.8972684,411.80247,-8.668512)"
- cx="74.518959"
- cy="499.99969"
- fx="74.518959"
- fy="499.99969"
- r="3.1650217" />
+ id="radialGradient40928"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient18821"
- id="radialGradient40932"
+ r="3.1650217"
+ fy="499.99969"
+ fx="74.518959"
+ cy="499.99969"
+ cx="74.518959"
+ gradientTransform="matrix(0.8886193,0.8021825,-0.8051059,0.8972684,411.80247,-8.668512)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
- cx="75.054749"
- cy="499.87418"
- fx="75.054749"
+ id="radialGradient40930"
+ xlink:href="#linearGradient14262"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.1650217"
fy="499.87418"
- r="3.1650217" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542-6"
- id="linearGradient36549"
+ fx="75.054749"
+ cy="499.87418"
+ cx="75.054749"
+ gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1.1511102,0,0,-1.1511102,152.68442,762.00423)"
- x1="-16.608393"
- y1="199.5118"
+ id="radialGradient40932"
+ xlink:href="#linearGradient18821"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="245.13458"
x2="30.713354"
- y2="245.13458" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500-3"
- id="radialGradient36551"
+ y1="199.5118"
+ x1="-16.608393"
+ gradientTransform="matrix(-1.1511102,0,0,-1.1511102,152.68442,762.00423)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.6959954,0.116912,-0.04402498,0.2620878,107.60035,414.99606)"
- cx="32.193073"
- cy="243.37001"
- fx="32.193073"
+ id="linearGradient36549"
+ xlink:href="#linearGradient37542-6"
+ inkscape:collect="always" />
+ <radialGradient
+ r="6.5"
fy="243.37001"
- r="6.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24143-0"
- id="linearGradient36553"
+ fx="32.193073"
+ cy="243.37001"
+ cx="32.193073"
+ gradientTransform="matrix(0.6959954,0.116912,-0.04402498,0.2620878,107.60035,414.99606)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-0.9999993,0,0,-0.9821923,147.99998,720.60935)"
- x1="32.204613"
- y1="233.6039"
- x2="35.615856"
- y2="251.99768" />
- <linearGradient
- inkscape:collect="always"
+ id="radialGradient36551"
xlink:href="#linearGradient16500-3"
- id="linearGradient36555"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="251.99768"
+ x2="35.615856"
+ y1="233.6039"
+ x1="32.204613"
+ gradientTransform="matrix(-0.9999993,0,0,-0.9821923,147.99998,720.60935)"
gradientUnits="userSpaceOnUse"
- x1="148.76726"
- y1="134.53409"
- x2="114.11786"
- y2="101.28939" />
+ id="linearGradient36553"
+ xlink:href="#linearGradient24143-0"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient40809"
- id="linearGradient36557"
+ y2="101.28939"
+ x2="114.11786"
+ y1="134.53409"
+ x1="148.76726"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.7500336,0,0,0.8546123,-239.89087,340.17205)"
- x1="481.60803"
- y1="163.09677"
- x2="477.10818"
- y2="163.00024" />
+ id="linearGradient36555"
+ xlink:href="#linearGradient16500-3"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient59371"
- id="linearGradient36559"
+ y2="163.00024"
+ x2="477.10818"
+ y1="163.09677"
+ x1="481.60803"
+ gradientTransform="matrix(0.7500336,0,0,0.8546123,-239.89087,340.17205)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.7500181,0,0,0.8546123,-235.38338,339.18935)"
- x1="473.79471"
- y1="164.64572"
- x2="463.90472"
- y2="160.80888" />
+ id="linearGradient36557"
+ xlink:href="#linearGradient40809"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030-1"
- id="linearGradient36561"
+ y2="160.80888"
+ x2="463.90472"
+ y1="164.64572"
+ x1="473.79471"
+ gradientTransform="matrix(0.7500181,0,0,0.8546123,-235.38338,339.18935)"
gradientUnits="userSpaceOnUse"
- x1="129.74713"
- y1="118"
- x2="144.33401"
- y2="132.61403" />
+ id="linearGradient36559"
+ xlink:href="#linearGradient59371"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500-3"
- id="linearGradient36563"
+ y2="132.61403"
+ x2="144.33401"
+ y1="118"
+ x1="129.74713"
gradientUnits="userSpaceOnUse"
- x1="138.46678"
- y1="124.90586"
+ id="linearGradient36561"
+ xlink:href="#linearGradient9030-1"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="116.14438"
x2="126.18426"
- y2="116.14438" />
+ y1="124.90586"
+ x1="138.46678"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient36563"
+ xlink:href="#linearGradient16500-3"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient9030-7-8-6">
<stop
- style="stop-color:white;stop-opacity:1;"
+ id="stop9032-4-9-2"
offset="0"
- id="stop9032-4-9-2" />
+ style="stop-color:white;stop-opacity:1;" />
<stop
- style="stop-color:white;stop-opacity:0;"
+ id="stop9034-0-2-3"
offset="1"
- id="stop9034-0-2-3" />
+ style="stop-color:white;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient40809-2-2">
<stop
- style="stop-color:#0059d7;stop-opacity:1;"
+ id="stop40811-1-6"
offset="0"
- id="stop40811-1-6" />
+ style="stop-color:#0059d7;stop-opacity:1;" />
<stop
- style="stop-color:#b7d4ff;stop-opacity:1;"
+ id="stop40813-4-2"
offset="1"
- id="stop40813-4-2" />
+ style="stop-color:#b7d4ff;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient20055-7-5-5">
<stop
- id="stop20057-1-7-7"
+ style="stop-color:#0a2a5a;stop-opacity:1;"
offset="0"
- style="stop-color:#0a2a5a;stop-opacity:1;" />
+ id="stop20057-1-7-7" />
<stop
- id="stop20059-1-6-8"
+ style="stop-color:#3771c8;stop-opacity:1;"
offset="1"
- style="stop-color:#3771c8;stop-opacity:1;" />
+ id="stop20059-1-6-8" />
</linearGradient>
<linearGradient
id="linearGradient16500-4-9-7">
<stop
- style="stop-color:black;stop-opacity:1;"
+ id="stop16502-8-5-8"
offset="0"
- id="stop16502-8-5-8" />
+ style="stop-color:black;stop-opacity:1;" />
<stop
- style="stop-color:black;stop-opacity:0;"
+ id="stop16504-8-4-0"
offset="1"
- id="stop16504-8-4-0" />
+ style="stop-color:black;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient37829">
<stop
- id="stop37831"
+ style="stop-color:#3d361a;stop-opacity:1;"
offset="0"
- style="stop-color:#3d361a;stop-opacity:1;" />
+ id="stop37831" />
<stop
- style="stop-color:#d1c595;stop-opacity:1;"
+ id="stop37833"
offset="0.5"
- id="stop37833" />
+ style="stop-color:#d1c595;stop-opacity:1;" />
<stop
- id="stop37835"
+ style="stop-color:#ffffff;stop-opacity:1;"
offset="1"
- style="stop-color:#ffffff;stop-opacity:1;" />
+ id="stop37835" />
</linearGradient>
<linearGradient
id="linearGradient40578-4-8">
<stop
- style="stop-color:black;stop-opacity:1;"
+ id="stop40580-8-9"
offset="0"
- id="stop40580-8-9" />
+ style="stop-color:black;stop-opacity:1;" />
<stop
- style="stop-color:black;stop-opacity:0;"
+ id="stop40582-6-8"
offset="1"
- id="stop40582-6-8" />
+ style="stop-color:black;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient39254"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.888889,0,0,1,513.5,184.50451)"
- x1="253.78497"
- y1="3.6831069"
+ y2="30.023426"
x2="278.25537"
- y2="30.023426" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient40578-4-8"
- id="radialGradient39256"
+ y1="3.6831069"
+ x1="253.78497"
+ gradientTransform="matrix(0.888889,0,0,1,513.5,184.50451)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.3817213,-0.4377393,0.4780868,0.4169055,368.09749,451.76937)"
- cx="756.83508"
- cy="206.40076"
- fx="756.83508"
+ id="linearGradient39254"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
+ <radialGradient
+ r="6.9000001"
fy="206.40076"
- r="6.9000001" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient58334"
- id="linearGradient39258"
+ fx="756.83508"
+ cy="206.40076"
+ cx="756.83508"
+ gradientTransform="matrix(0.3817213,-0.4377393,0.4780868,0.4169055,368.09749,451.76937)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(670,-33)"
- x1="87"
- y1="241.125"
- x2="93.0625"
- y2="249" />
+ id="radialGradient39256"
+ xlink:href="#linearGradient40578-4-8"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient39260"
+ y2="249"
+ x2="93.0625"
+ y1="241.125"
+ x1="87"
+ gradientTransform="translate(670,-33)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,-95.999998)"
- x1="754.28558"
- y1="300.83292"
+ id="linearGradient39258"
+ xlink:href="#linearGradient58334"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="305"
x2="758"
- y2="305" />
+ y1="300.83292"
+ x1="754.28558"
+ gradientTransform="translate(0,-95.999998)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient39260"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient40455-7">
<stop
- id="stop40457-6"
+ style="stop-color:#fff991;stop-opacity:1;"
offset="0"
- style="stop-color:#fff991;stop-opacity:1;" />
+ id="stop40457-6" />
<stop
- id="stop40459-1"
+ style="stop-color:#fffbb9;stop-opacity:0;"
offset="1"
- style="stop-color:#fffbb9;stop-opacity:0;" />
+ id="stop40459-1" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient36657"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.888889,0,0,1,513.5,184.50451)"
- x1="253.78497"
- y1="3.6831069"
+ y2="30.023426"
x2="278.25537"
- y2="30.023426" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient40578-4-8"
- id="radialGradient36659"
+ y1="3.6831069"
+ x1="253.78497"
+ gradientTransform="matrix(0.888889,0,0,1,513.5,184.50451)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.3817213,-0.4377393,0.4780868,0.4169055,368.09749,451.76937)"
- cx="756.83508"
- cy="206.40076"
- fx="756.83508"
+ id="linearGradient36657"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
+ <radialGradient
+ r="6.9000001"
fy="206.40076"
- r="6.9000001" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient58334"
- id="linearGradient36661"
+ fx="756.83508"
+ cy="206.40076"
+ cx="756.83508"
+ gradientTransform="matrix(0.3817213,-0.4377393,0.4780868,0.4169055,368.09749,451.76937)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(670,-33)"
- x1="87"
- y1="241.125"
- x2="93.0625"
- y2="249" />
+ id="radialGradient36659"
+ xlink:href="#linearGradient40578-4-8"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient36663"
+ y2="249"
+ x2="93.0625"
+ y1="241.125"
+ x1="87"
+ gradientTransform="translate(670,-33)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,-95.999998)"
- x1="754.28558"
- y1="300.83292"
- x2="758"
- y2="305" />
+ id="linearGradient36661"
+ xlink:href="#linearGradient58334"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37829"
- id="linearGradient37089"
+ y2="305"
+ x2="758"
+ y1="300.83292"
+ x1="754.28558"
+ gradientTransform="translate(0,-95.999998)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-0.9999993,0,0,-0.9821923,165.4,716.20935)"
- x1="261.17639"
- y1="247.85646"
- x2="253.86414"
- y2="288.70752" />
+ id="linearGradient36663"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient39080"
- id="linearGradient37091"
+ y2="288.70752"
+ x2="253.86414"
+ y1="247.85646"
+ x1="261.17639"
+ gradientTransform="matrix(-0.9999993,0,0,-0.9821923,165.4,716.20935)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-0.888884,0,0,-0.8730569,136.66557,688.20759)"
- x1="261.60016"
- y1="247.008"
- x2="263.60016"
- y2="262.27994" />
+ id="linearGradient37089"
+ xlink:href="#linearGradient37829"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030-7-8-6"
- id="linearGradient37093"
+ y2="262.27994"
+ x2="263.60016"
+ y1="247.008"
+ x1="261.60016"
+ gradientTransform="matrix(-0.888884,0,0,-0.8730569,136.66557,688.20759)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-124.99991,219.9903)"
- x1="19.923029"
- y1="232.59058"
- x2="50.485012"
- y2="265.9697" />
+ id="linearGradient37091"
+ xlink:href="#linearGradient39080"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient40809-2-2"
- id="linearGradient37096"
+ y2="265.9697"
+ x2="50.485012"
+ y1="232.59058"
+ x1="19.923029"
+ gradientTransform="translate(-124.99991,219.9903)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.7500336,0,0,0.8546123,-239.89087,340.17205)"
- x1="199.26254"
- y1="144.5041"
- x2="193.7029"
- y2="144.5041" />
+ id="linearGradient37093"
+ xlink:href="#linearGradient9030-7-8-6"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20055-7-5-5"
- id="linearGradient37098"
+ y2="144.5041"
+ x2="193.7029"
+ y1="144.5041"
+ x1="199.26254"
+ gradientTransform="matrix(0.7500336,0,0,0.8546123,-239.89087,340.17205)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-670.99999,411.99999)"
- x1="579.625"
- y1="54.299286"
- x2="576.4375"
- y2="49.84375" />
+ id="linearGradient37096"
+ xlink:href="#linearGradient40809-2-2"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500-4-9-7"
- id="linearGradient37100"
- gradientUnits="userSpaceOnUse"
+ y2="49.84375"
+ x2="576.4375"
+ y1="54.299286"
+ x1="579.625"
gradientTransform="translate(-670.99999,411.99999)"
- x1="582.79974"
- y1="56.363762"
- x2="575.70361"
- y2="49.87711" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030-7-8-6"
- id="linearGradient37102"
gradientUnits="userSpaceOnUse"
- x1="129.74713"
- y1="118"
- x2="144.33401"
- y2="132.61403" />
+ id="linearGradient37098"
+ xlink:href="#linearGradient20055-7-5-5"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="49.87711"
+ x2="575.70361"
+ y1="56.363762"
+ x1="582.79974"
+ gradientTransform="translate(-670.99999,411.99999)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient37100"
xlink:href="#linearGradient16500-4-9-7"
- id="linearGradient37104"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="132.61403"
+ x2="144.33401"
+ y1="118"
+ x1="129.74713"
gradientUnits="userSpaceOnUse"
- x1="140.78264"
- y1="123.96156"
+ id="linearGradient37102"
+ xlink:href="#linearGradient9030-7-8-6"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="116.40535"
x2="132.25548"
- y2="116.40535" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient40455-7"
- id="radialGradient37553"
+ y1="123.96156"
+ x1="140.78264"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.7881042,0.01544832,-0.01690407,0.7184169,-16.705439,29.204304)"
- cx="-73.135666"
- cy="95.970413"
- fx="-73.135666"
- fy="95.970413"
- r="4.9999957" />
+ id="linearGradient37104"
+ xlink:href="#linearGradient16500-4-9-7"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37667"
- id="radialGradient37555"
+ r="4.9999957"
+ fy="95.970413"
+ fx="-73.135666"
+ cy="95.970413"
+ cx="-73.135666"
+ gradientTransform="matrix(0.7881042,0.01544832,-0.01690407,0.7184169,-16.705439,29.204304)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.4604901,-0.4901463,0.6187826,0.5813434,279.52277,457.42224)"
- cx="756.98285"
- cy="206.8443"
- fx="756.98285"
+ id="radialGradient37553"
+ xlink:href="#linearGradient40455-7"
+ inkscape:collect="always" />
+ <radialGradient
+ r="6.9000001"
fy="206.8443"
- r="6.9000001" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient58334"
- id="linearGradient37558"
+ fx="756.98285"
+ cy="206.8443"
+ cx="756.98285"
+ gradientTransform="matrix(0.4604901,-0.4901463,0.6187826,0.5813434,279.52277,457.42224)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(670,-33)"
- x1="89.012573"
- y1="243.96121"
- x2="93.0625"
- y2="249" />
+ id="radialGradient37555"
+ xlink:href="#linearGradient37667"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient37561"
+ y2="249"
+ x2="93.0625"
+ y1="243.96121"
+ x1="89.012573"
+ gradientTransform="translate(670,-33)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(1,-94.999998)"
- x1="754.28558"
- y1="300.83292"
+ id="linearGradient37558"
+ xlink:href="#linearGradient58334"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="305.53677"
x2="758.62622"
- y2="305.53677" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient40455-7-1"
- id="radialGradient37553-2"
+ y1="300.83292"
+ x1="754.28558"
+ gradientTransform="translate(1,-94.999998)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.7881042,0.01544832,-0.01690407,0.7184169,-16.705439,29.204304)"
- cx="-73.227486"
- cy="95.949913"
- fx="-73.227486"
+ id="linearGradient37561"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
+ <radialGradient
+ r="4.9999957"
fy="95.949913"
- r="4.9999957" />
+ fx="-73.227486"
+ cy="95.949913"
+ cx="-73.227486"
+ gradientTransform="matrix(0.7881042,0.01544832,-0.01690407,0.7184169,-16.705439,29.204304)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient37553-2"
+ xlink:href="#linearGradient40455-7-1"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient40455-7-1">
<stop
- id="stop40457-6-6"
+ style="stop-color:#fff991;stop-opacity:1;"
offset="0"
- style="stop-color:#fff991;stop-opacity:1;" />
+ id="stop40457-6-6" />
<stop
- id="stop40459-1-8"
+ style="stop-color:#fffbb9;stop-opacity:0;"
offset="1"
- style="stop-color:#fffbb9;stop-opacity:0;" />
+ id="stop40459-1-8" />
</linearGradient>
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient40578-4-8-7"
- id="radialGradient37555-5"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.4769848,-0.5257394,0.6056598,0.5494938,269.68012,490.96577)"
- cx="756.83508"
- cy="206.40076"
- fx="756.83508"
+ r="6.9000001"
fy="206.40076"
- r="6.9000001" />
+ fx="756.83508"
+ cy="206.40076"
+ cx="756.83508"
+ gradientTransform="matrix(0.4769848,-0.5257394,0.6056598,0.5494938,269.68012,490.96577)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient37555-5"
+ xlink:href="#linearGradient40578-4-8-7"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient40578-4-8-7">
<stop
- style="stop-color:black;stop-opacity:1;"
+ id="stop40580-8-9-6"
offset="0"
- id="stop40580-8-9-6" />
+ style="stop-color:black;stop-opacity:1;" />
<stop
- style="stop-color:black;stop-opacity:0;"
+ id="stop40582-6-8-1"
offset="1"
- id="stop40582-6-8-1" />
+ style="stop-color:black;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient58334-9"
- id="linearGradient37558-8"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(670,-33)"
- x1="89.012573"
- y1="243.96121"
+ y2="249"
x2="93.0625"
- y2="249" />
+ y1="243.96121"
+ x1="89.012573"
+ gradientTransform="translate(670,-33)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient37558-8"
+ xlink:href="#linearGradient58334-9"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient58334-9">
<stop
- id="stop58336-27"
+ style="stop-color:#ffffff;stop-opacity:0.87628865;"
offset="0.0000000"
- style="stop-color:#ffffff;stop-opacity:0.87628865;" />
+ id="stop58336-27" />
<stop
- id="stop58338-9"
+ style="stop-color:#fffffe;stop-opacity:0.0000000;"
offset="1.0000000"
- style="stop-color:#fffffe;stop-opacity:0.0000000;" />
+ id="stop58338-9" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- id="linearGradient16500-4">
+ id="linearGradient16500-4"
+ inkscape:collect="always">
<stop
- style="stop-color:black;stop-opacity:1;"
+ id="stop16502-31"
offset="0"
- id="stop16502-31" />
+ style="stop-color:black;stop-opacity:1;" />
<stop
- style="stop-color:black;stop-opacity:0;"
+ id="stop16504-23"
offset="1"
- id="stop16504-23" />
+ style="stop-color:black;stop-opacity:0;" />
</linearGradient>
<linearGradient
- y2="305"
- x2="758"
- y1="300.83292"
- x1="754.28558"
+ inkscape:collect="always"
+ xlink:href="#linearGradient16500-4"
+ id="linearGradient37610-3"
+ gradientUnits="userSpaceOnUse"
gradientTransform="translate(1,-94.999998)"
+ x1="754.28558"
+ y1="300.83292"
+ x2="758"
+ y2="305" />
+ <linearGradient
+ y2="94.239906"
+ x2="68.0271"
+ y1="108.47212"
+ x1="80.60067"
+ gradientTransform="matrix(0.9166695,0,0,0.9203753,-10.025729,345.78566)"
gradientUnits="userSpaceOnUse"
- id="linearGradient37610-3"
- xlink:href="#linearGradient16500-4"
+ id="linearGradient71834"
+ xlink:href="#linearGradient319"
inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient71834"
+ y2="107.18619"
+ x2="79.355118"
+ y1="97.5"
+ x1="70.55275"
+ gradientTransform="translate(-15.983875,338)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9166695,0,0,0.9203753,-10.025729,345.78566)"
- x1="80.60067"
- y1="108.47212"
- x2="68.0271"
- y2="94.239906" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient71814"
id="linearGradient71836"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-15.983875,338)"
- x1="70.55275"
- y1="97.5"
- x2="79.355118"
- y2="107.18619" />
+ xlink:href="#linearGradient71814"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient71838"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9998599,0,0,0.9960071,-15.972985,338.41149)"
- x1="61.465469"
- y1="88.058716"
+ y2="112.03586"
x2="86.00116"
- y2="112.03586" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient38256"
- id="linearGradient37188"
+ y1="88.058716"
+ x1="61.465469"
+ gradientTransform="matrix(0.9998599,0,0,0.9960071,-15.972985,338.41149)"
gradientUnits="userSpaceOnUse"
- x1="-22"
- y1="36.47311"
- x2="-18.85"
- y2="22.485678"
- gradientTransform="translate(522.00015,466)" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient71838"
xlink:href="#linearGradient319"
- id="linearGradient37191"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientTransform="translate(522.00015,466)"
+ y2="22.485678"
+ x2="-18.85"
+ y1="36.47311"
+ x1="-22"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(168.00015,169.99998)"
- x1="308"
- y1="323"
- x2="343.26239"
- y2="340" />
+ id="linearGradient37188"
+ xlink:href="#linearGradient38256"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient37201"
+ y2="340"
+ x2="343.26239"
+ y1="323"
+ x1="308"
+ gradientTransform="translate(168.00015,169.99998)"
gradientUnits="userSpaceOnUse"
- x1="-26"
- y1="38"
- x2="-27"
+ id="linearGradient37191"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientTransform="translate(522.00015,466)"
y2="30.200407"
- gradientTransform="translate(522.00015,466)" />
+ x2="-27"
+ y1="38"
+ x1="-26"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient37201"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient1610-7409">
<stop
- style="stop-color:black;stop-opacity:1;"
+ id="stop1611-488"
offset="0"
- id="stop1611-488" />
+ style="stop-color:black;stop-opacity:1;" />
<stop
- style="stop-color:white;stop-opacity:1;"
+ id="stop1612-2"
offset="1"
- id="stop1612-2" />
+ style="stop-color:white;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient40578-4-8-5">
<stop
- style="stop-color:black;stop-opacity:1;"
+ id="stop40580-8-9-5"
offset="0"
- id="stop40580-8-9-5" />
+ style="stop-color:black;stop-opacity:1;" />
<stop
- style="stop-color:black;stop-opacity:0;"
+ id="stop40582-6-8-17"
offset="1"
- id="stop40582-6-8-17" />
+ style="stop-color:black;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient58334-1">
<stop
- id="stop58336-5"
+ style="stop-color:#ffffff;stop-opacity:0.87628865;"
offset="0.0000000"
- style="stop-color:#ffffff;stop-opacity:0.87628865;" />
+ id="stop58336-5" />
<stop
- id="stop58338-27"
+ style="stop-color:#fffffe;stop-opacity:0.0000000;"
offset="1.0000000"
- style="stop-color:#fffffe;stop-opacity:0.0000000;" />
+ id="stop58338-27" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- id="linearGradient16500-14">
+ id="linearGradient16500-14"
+ inkscape:collect="always">
<stop
- style="stop-color:black;stop-opacity:1;"
+ id="stop16502-23"
offset="0"
- id="stop16502-23" />
+ style="stop-color:black;stop-opacity:1;" />
<stop
- style="stop-color:black;stop-opacity:0;"
+ id="stop16504-22"
offset="1"
- id="stop16504-22" />
+ style="stop-color:black;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610-7409"
- id="linearGradient37317"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.888889,0,0,1,513.5,184.50451)"
- x1="253.78497"
- y1="3.6831069"
+ y2="26.239208"
x2="272.92456"
- y2="26.239208" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient40578-4-8-5"
- id="radialGradient37319"
+ y1="3.6831069"
+ x1="253.78497"
+ gradientTransform="matrix(0.888889,0,0,1,513.5,184.50451)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.3817213,-0.4377393,0.4780868,0.4169055,368.09749,451.76937)"
- cx="756.83508"
- cy="206.40076"
- fx="756.83508"
+ id="linearGradient37317"
+ xlink:href="#linearGradient1610-7409"
+ inkscape:collect="always" />
+ <radialGradient
+ r="6.9000001"
fy="206.40076"
- r="6.9000001" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient58334-1"
- id="linearGradient37321"
+ fx="756.83508"
+ cy="206.40076"
+ cx="756.83508"
+ gradientTransform="matrix(0.3817213,-0.4377393,0.4780868,0.4169055,368.09749,451.76937)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(670,-33)"
- x1="87"
- y1="241.125"
- x2="93.0625"
- y2="249" />
+ id="radialGradient37319"
+ xlink:href="#linearGradient40578-4-8-5"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500-14"
- id="linearGradient37323"
+ y2="249"
+ x2="93.0625"
+ y1="241.125"
+ x1="87"
+ gradientTransform="translate(670,-33)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,-95.999998)"
- x1="754.1275"
- y1="301.01553"
- x2="758.77625"
- y2="305.51749" />
+ id="linearGradient37321"
+ xlink:href="#linearGradient58334-1"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient37338"
+ y2="305.51749"
+ x2="758.77625"
+ y1="301.01553"
+ x1="754.1275"
+ gradientTransform="translate(0,-95.999998)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(461.00015,453)"
- x1="37"
- y1="53"
- x2="36.74033"
- y2="44.322407" />
+ id="linearGradient37323"
+ xlink:href="#linearGradient16500-14"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient37132"
+ y2="44.322407"
+ x2="36.74033"
+ y1="53"
+ x1="37"
+ gradientTransform="translate(461.00015,453)"
gradientUnits="userSpaceOnUse"
- x1="510.25"
- y1="36"
- x2="494"
- y2="36"
- gradientTransform="matrix(-1,0,0,1,992,0)" />
+ id="linearGradient37338"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient37134"
+ gradientTransform="matrix(-1,0,0,1,992,0)"
+ y2="36"
+ x2="494"
+ y1="36"
+ x1="510.25"
gradientUnits="userSpaceOnUse"
- x1="492"
- y1="33"
- x2="503"
- y2="43"
- gradientTransform="matrix(-1,0,0,1,992,0)" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient37132"
xlink:href="#linearGradient1610"
- id="linearGradient37136"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,1,551,105)"
- x1="497.3125"
- y1="35"
- x2="483"
- y2="35" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient37138"
+ gradientTransform="matrix(-1,0,0,1,992,0)"
+ y2="43"
+ x2="503"
+ y1="33"
+ x1="492"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,1,551,105)"
- x1="497.3125"
+ id="linearGradient37134"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="35"
+ x2="483"
y1="35"
+ x1="497.3125"
+ gradientTransform="matrix(-1,0,0,1,551,105)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient37136"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="35"
x2="483"
- y2="35" />
+ y1="35"
+ x1="497.3125"
+ gradientTransform="matrix(-1,0,0,1,551,105)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient37138"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient40455-7-1-7">
<stop
- id="stop40457-6-6-4"
+ style="stop-color:#fff991;stop-opacity:1;"
offset="0"
- style="stop-color:#fff991;stop-opacity:1;" />
+ id="stop40457-6-6-4" />
<stop
- id="stop40459-1-8-0"
+ style="stop-color:#fffbb9;stop-opacity:0;"
offset="1"
- style="stop-color:#fffbb9;stop-opacity:0;" />
+ id="stop40459-1-8-0" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient38362"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.923955,0,0,1,2.85168,-84)"
- x1="-9.3937483"
- y1="203.3882"
+ y2="249.73875"
x2="28.275171"
- y2="249.73875" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient40455-7-1-7"
- id="radialGradient38364"
+ y1="203.3882"
+ x1="-9.3937483"
+ gradientTransform="matrix(0.923955,0,0,1,2.85168,-84)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.1033468,0.01995877,-0.02366572,0.9281732,7.8124646,13.285893)"
- cx="-73.972397"
- cy="94.935921"
- fx="-73.972397"
+ id="linearGradient38362"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
+ <radialGradient
+ r="4.9999957"
fy="94.935921"
- r="4.9999957" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient38367"
+ fx="-73.972397"
+ cy="94.935921"
+ cx="-73.972397"
+ gradientTransform="matrix(1.1033468,0.01995877,-0.02366572,0.9281732,7.8124646,13.285893)"
gradientUnits="userSpaceOnUse"
- x1="19.210167"
- y1="143.17894"
- x2="38.580528"
+ id="radialGradient38364"
+ xlink:href="#linearGradient40455-7-1-7"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientTransform="matrix(1,0,0,0.8461542,0,25.615323)"
y2="167.11429"
- gradientTransform="matrix(1,0,0,0.8461542,0,25.615323)" />
+ x2="38.580528"
+ y1="143.17894"
+ x1="19.210167"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient38367"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<clipPath
- clipPathUnits="userSpaceOnUse"
- id="clipPath43368-7">
+ id="clipPath43368-7"
+ clipPathUnits="userSpaceOnUse">
<rect
- style="fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.79999995;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- id="rect43370-1"
- width="16"
- height="16"
+ y="26"
x="-79"
- y="26" />
+ height="16"
+ width="16"
+ id="rect43370-1"
+ style="fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.79999995;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
</clipPath>
<linearGradient
- inkscape:collect="always"
- id="linearGradient43276-6">
+ id="linearGradient43276-6"
+ inkscape:collect="always">
<stop
- style="stop-color:#000000;stop-opacity:1;"
+ id="stop43278-0"
offset="0"
- id="stop43278-0" />
+ style="stop-color:#000000;stop-opacity:1;" />
<stop
- style="stop-color:#000000;stop-opacity:0;"
+ id="stop43280-49"
offset="1"
- id="stop43280-49" />
+ style="stop-color:#000000;stop-opacity:0;" />
</linearGradient>
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient43276-6"
- id="radialGradient38734"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.4098275,-0.6406034,2.5104141,1.6060416,-127.46107,-65.792415)"
- cx="-67.890839"
- cy="33.548397"
- fx="-67.890839"
+ r="3.1501868"
fy="33.548397"
- r="3.1501868" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient43276-6"
- id="radialGradient38736"
+ fx="-67.890839"
+ cy="33.548397"
+ cx="-67.890839"
+ gradientTransform="matrix(0.4098275,-0.6406034,2.5104141,1.6060416,-127.46107,-65.792415)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.4098275,-0.7183766,2.5885772,1.4767588,-130.41049,-65.518114)"
- cx="-74.960228"
- cy="34.896461"
- fx="-74.960228"
+ id="radialGradient38734"
+ xlink:href="#linearGradient43276-6"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.1501868"
fy="34.896461"
- r="3.1501868" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient36718"
+ fx="-74.960228"
+ cy="34.896461"
+ cx="-74.960228"
+ gradientTransform="matrix(0.4098275,-0.7183766,2.5885772,1.4767588,-130.41049,-65.518114)"
gradientUnits="userSpaceOnUse"
- x1="400.90442"
- y1="68.853401"
- x2="410.47467"
- y2="77.877228" />
+ id="radialGradient38736"
+ xlink:href="#linearGradient43276-6"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient38049"
+ y2="77.877228"
+ x2="410.47467"
+ y1="68.853401"
+ x1="400.90442"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8167109,0,0,0.8433415,239.34332,-149.78578)"
- x1="104.90227"
- y1="53.227627"
- x2="121.22078"
- y2="56.357628" />
+ id="linearGradient36718"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient38051"
+ y2="56.357628"
+ x2="121.22078"
+ y1="53.227627"
+ x1="104.90227"
+ gradientTransform="matrix(0.8167109,0,0,0.8433415,239.34332,-149.78578)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(207,-246.99988)"
- x1="-56.5"
- y1="342.0625"
- x2="-49"
- y2="341" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient38049"
xlink:href="#linearGradient319"
- id="linearGradient37530"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8167109,0,0,0.8433415,239.34332,-149.78578)"
- x1="104.90227"
- y1="53.227627"
- x2="121.22078"
- y2="56.357628" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="341"
+ x2="-49"
+ y1="342.0625"
+ x1="-56.5"
+ gradientTransform="translate(207,-246.99988)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient38051"
xlink:href="#linearGradient319"
- id="linearGradient37534"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="56.357628"
+ x2="121.22078"
+ y1="53.227627"
+ x1="104.90227"
+ gradientTransform="matrix(0.8167109,0,0,0.8433415,239.34332,-149.78578)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(207,-246.99988)"
- x1="-56.5"
- y1="342.0625"
+ id="linearGradient37530"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="341"
x2="-49"
- y2="341" />
+ y1="342.0625"
+ x1="-56.5"
+ gradientTransform="translate(207,-246.99988)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient37534"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient1610-6">
<stop
- style="stop-color:black;stop-opacity:1;"
+ id="stop1611-18"
offset="0"
- id="stop1611-18" />
+ style="stop-color:black;stop-opacity:1;" />
<stop
- style="stop-color:white;stop-opacity:1;"
+ id="stop1612-92"
offset="1"
- id="stop1612-92" />
+ style="stop-color:white;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient10069-9">
<stop
- style="stop-color:#000000;stop-opacity:1;"
+ id="stop10071-5"
offset="0"
- id="stop10071-5" />
+ style="stop-color:#000000;stop-opacity:1;" />
<stop
- style="stop-color:#000000;stop-opacity:0;"
+ id="stop10073-43"
offset="1"
- id="stop10073-43" />
+ style="stop-color:#000000;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069-9"
- id="linearGradient38254"
- gradientUnits="userSpaceOnUse"
- x1="124.19057"
- y1="111.30384"
+ y2="120.14633"
x2="134.62978"
- y2="120.14633" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610-6"
- id="linearGradient37509"
+ y1="111.30384"
+ x1="124.19057"
gradientUnits="userSpaceOnUse"
- x1="189.76083"
- y1="248.13905"
- x2="116.05637"
- y2="183.6826" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient38254"
xlink:href="#linearGradient10069-9"
- id="linearGradient37613"
- gradientUnits="userSpaceOnUse"
- x1="123.80045"
- y1="111.03492"
- x2="132.99687"
- y2="118.98331" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="183.6826"
+ x2="116.05637"
+ y1="248.13905"
+ x1="189.76083"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient37509"
xlink:href="#linearGradient1610-6"
- id="linearGradient37615"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="118.98331"
+ x2="132.99687"
+ y1="111.03492"
+ x1="123.80045"
gradientUnits="userSpaceOnUse"
- x1="189.76083"
- y1="248.13905"
- x2="116.05637"
- y2="183.6826" />
+ id="linearGradient37613"
+ xlink:href="#linearGradient10069-9"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient15425-4-9-8"
- id="linearGradient38073-8"
+ y2="183.6826"
+ x2="116.05637"
+ y1="248.13905"
+ x1="189.76083"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,22)"
- x1="-14.752135"
- y1="101.82622"
+ id="linearGradient37615"
+ xlink:href="#linearGradient1610-6"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="68.279541"
x2="-45.074585"
- y2="68.279541" />
+ y1="101.82622"
+ x1="-14.752135"
+ gradientTransform="translate(0,22)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient38073-8"
+ xlink:href="#linearGradient15425-4-9-8"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient15425-4-9-8">
<stop
- style="stop-color:#960000;stop-opacity:1;"
+ id="stop15427-5-8-24"
offset="0"
- id="stop15427-5-8-24" />
+ style="stop-color:#960000;stop-opacity:1;" />
<stop
- style="stop-color:#c80000;stop-opacity:0;"
+ id="stop15429-8-2-5"
offset="1"
- id="stop15429-8-2-5" />
+ style="stop-color:#c80000;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5060-1"
- id="linearGradient38075-5"
- gradientUnits="userSpaceOnUse"
- x1="137.33838"
- y1="124.67571"
+ y2="118.00494"
x2="131.35606"
- y2="118.00494" />
+ y1="124.67571"
+ x1="137.33838"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient38075-5"
+ xlink:href="#linearGradient5060-1"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient5060-1">
<stop
- id="stop5062-7"
+ style="stop-color:black;stop-opacity:1;"
offset="0"
- style="stop-color:black;stop-opacity:1;" />
+ id="stop5062-7" />
<stop
- id="stop5064-1"
+ style="stop-color:#000000;stop-opacity:0;"
offset="1"
- style="stop-color:#000000;stop-opacity:0;" />
+ id="stop5064-1" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319-52"
- id="linearGradient38077-1"
- gradientUnits="userSpaceOnUse"
- x1="127.15736"
- y1="111.48302"
+ y2="136.15825"
x2="146.01884"
- y2="136.15825" />
+ y1="111.48302"
+ x1="127.15736"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient38077-1"
+ xlink:href="#linearGradient319-52"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient319-52">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop320-7614"
offset="0"
- id="stop320-7614" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop321-232"
offset="1"
- id="stop321-232" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient15425-4-9-8"
- id="linearGradient38079-2"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,22)"
- x1="-15"
- y1="101"
+ y2="94"
x2="-22"
- y2="94" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient14418-6"
- id="linearGradient14433-1"
+ y1="101"
+ x1="-15"
+ gradientTransform="translate(0,22)"
gradientUnits="userSpaceOnUse"
- x1="139.29807"
- y1="127.35454"
+ id="linearGradient38079-2"
+ xlink:href="#linearGradient15425-4-9-8"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="115.81818"
x2="130.33557"
- y2="115.81818" />
+ y1="127.35454"
+ x1="139.29807"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient14433-1"
+ xlink:href="#linearGradient14418-6"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient14418-6">
<stop
- id="stop14420-8"
+ style="stop-color:#fa2509;stop-opacity:1;"
offset="0"
- style="stop-color:#fa2509;stop-opacity:1;" />
+ id="stop14420-8" />
<stop
- id="stop14422-5"
+ style="stop-color:#fa2509;stop-opacity:0;"
offset="1"
- style="stop-color:#fa2509;stop-opacity:0;" />
+ id="stop14422-5" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319-52"
- id="linearGradient14435-7"
- gradientUnits="userSpaceOnUse"
- x1="125.36379"
- y1="110.81054"
+ y2="120.76331"
x2="135.22182"
- y2="120.76331" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319-52"
- id="linearGradient14437-6"
+ y1="110.81054"
+ x1="125.36379"
gradientUnits="userSpaceOnUse"
- x1="125.81818"
- y1="111.81818"
- x2="141.43347"
- y2="127.52184" />
+ id="linearGradient14435-7"
+ xlink:href="#linearGradient319-52"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069-2"
- id="linearGradient14439-9"
+ y2="127.52184"
+ x2="141.43347"
+ y1="111.81818"
+ x1="125.81818"
gradientUnits="userSpaceOnUse"
- x1="125.20553"
- y1="111.38132"
+ id="linearGradient14437-6"
+ xlink:href="#linearGradient319-52"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="118.69846"
x2="132.35237"
- y2="118.69846" />
+ y1="111.38132"
+ x1="125.20553"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient14439-9"
+ xlink:href="#linearGradient10069-2"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient10069-2">
<stop
- style="stop-color:#000000;stop-opacity:1;"
+ id="stop10071-79"
offset="0"
- id="stop10071-79" />
+ style="stop-color:#000000;stop-opacity:1;" />
<stop
- style="stop-color:#000000;stop-opacity:0;"
+ id="stop10073-5"
offset="1"
- id="stop10073-5" />
+ style="stop-color:#000000;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319-52"
- id="linearGradient14441-4"
- gradientUnits="userSpaceOnUse"
- x1="125.81818"
- y1="111.81818"
+ y2="129.27184"
x2="143.88347"
- y2="129.27184" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient48327-1"
- id="radialGradient38306-3"
+ y1="111.81818"
+ x1="125.81818"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(2.4461753,0.01083717,0.0036163,6.752143,-191.34795,-740.3814)"
- cx="131.99811"
- cy="126.63337"
- fx="131.99811"
+ id="linearGradient14441-4"
+ xlink:href="#linearGradient319-52"
+ inkscape:collect="always" />
+ <radialGradient
+ r="9.1978254"
fy="126.63337"
- r="9.1978254" />
+ fx="131.99811"
+ cy="126.63337"
+ cx="131.99811"
+ gradientTransform="matrix(2.4461753,0.01083717,0.0036163,6.752143,-191.34795,-740.3814)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient38306-3"
+ xlink:href="#linearGradient48327-1"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient48327-1">
<stop
- style="stop-color:black;stop-opacity:0;"
+ id="stop48329-23"
offset="0"
- id="stop48329-23" />
+ style="stop-color:black;stop-opacity:0;" />
<stop
- style="stop-color:black;stop-opacity:1;"
+ id="stop48331-3"
offset="1"
- id="stop48331-3" />
+ style="stop-color:black;stop-opacity:1;" />
</linearGradient>
<linearGradient
- y2="118.69846"
- x2="132.35237"
- y1="111.38132"
- x1="125.20553"
- gradientUnits="userSpaceOnUse"
- id="linearGradient37646-4"
+ inkscape:collect="always"
xlink:href="#linearGradient10069-74-1"
- inkscape:collect="always" />
+ id="linearGradient37646-4"
+ gradientUnits="userSpaceOnUse"
+ x1="125.20553"
+ y1="111.38132"
+ x2="132.35237"
+ y2="118.69846" />
<linearGradient
id="linearGradient10069-74-1">
<stop
- style="stop-color:#000000;stop-opacity:1;"
+ id="stop10071-0-1"
offset="0"
- id="stop10071-0-1" />
+ style="stop-color:#000000;stop-opacity:1;" />
<stop
- style="stop-color:#000000;stop-opacity:0;"
+ id="stop10073-9-3"
offset="1"
- id="stop10073-9-3" />
+ style="stop-color:#000000;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient319-7409-3-7">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop320-48-8-4"
offset="0"
- id="stop320-48-8-4" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop321-82-6-27"
offset="1"
- id="stop321-82-6-27" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319-7409-3-7"
- id="linearGradient38313-7"
- gradientUnits="userSpaceOnUse"
- x1="125.81818"
- y1="111.81818"
+ y2="129.27184"
x2="143.88347"
- y2="129.27184" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319-7409-3-7"
- id="linearGradient37677"
+ y1="111.81818"
+ x1="125.81818"
gradientUnits="userSpaceOnUse"
- x1="130.60338"
- y1="115.87343"
+ id="linearGradient38313-7"
+ xlink:href="#linearGradient319-7409-3-7"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="129.27184"
x2="143.88347"
- y2="129.27184" />
+ y1="115.87343"
+ x1="130.60338"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient37677"
+ xlink:href="#linearGradient319-7409-3-7"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient319-19">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop320-865"
offset="0"
- id="stop320-865" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop321-02"
offset="1"
- id="stop321-02" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient10069-8-3-3">
<stop
- style="stop-color:#000000;stop-opacity:1;"
+ id="stop10071-9-8-7"
offset="0"
- id="stop10071-9-8-7" />
+ style="stop-color:#000000;stop-opacity:1;" />
<stop
- style="stop-color:#000000;stop-opacity:0;"
+ id="stop10073-2-7-1"
offset="1"
- id="stop10073-2-7-1" />
+ style="stop-color:#000000;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient319-95-2-7">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop320-43-7-3"
offset="0"
- id="stop320-43-7-3" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop321-12-7-4"
offset="1"
- id="stop321-12-7-4" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient21327-6">
<stop
- style="stop-color:#1e3e70;stop-opacity:1;"
+ id="stop21329-3"
offset="0"
- id="stop21329-3" />
+ style="stop-color:#1e3e70;stop-opacity:1;" />
<stop
- style="stop-color:#1e3e70;stop-opacity:0;"
+ id="stop21331-4"
offset="1"
- id="stop21331-4" />
+ style="stop-color:#1e3e70;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient20055-8-4">
<stop
- id="stop20057-8-0"
+ style="stop-color:#0a2a5a;stop-opacity:1;"
offset="0"
- style="stop-color:#0a2a5a;stop-opacity:1;" />
+ id="stop20057-8-0" />
<stop
- id="stop20059-2-0"
+ style="stop-color:#3771c8;stop-opacity:1;"
offset="1"
- style="stop-color:#3771c8;stop-opacity:1;" />
+ id="stop20059-2-0" />
</linearGradient>
<linearGradient
id="linearGradient39088">
<stop
- id="stop39090"
+ style="stop-color:#000000;stop-opacity:1;"
offset="0"
- style="stop-color:#000000;stop-opacity:1;" />
+ id="stop39090" />
<stop
- id="stop39092"
+ style="stop-color:#ffffff;stop-opacity:1;"
offset="1"
- style="stop-color:#ffffff;stop-opacity:1;" />
+ id="stop39092" />
</linearGradient>
<linearGradient
id="linearGradient1610-83">
<stop
- style="stop-color:black;stop-opacity:1;"
+ id="stop1611-24"
offset="0"
- id="stop1611-24" />
+ style="stop-color:black;stop-opacity:1;" />
<stop
- style="stop-color:white;stop-opacity:1;"
+ id="stop1612-11"
offset="1"
- id="stop1612-11" />
+ style="stop-color:white;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient10069-95">
<stop
- style="stop-color:#000000;stop-opacity:1;"
+ id="stop10071-10"
offset="0"
- id="stop10071-10" />
+ style="stop-color:#000000;stop-opacity:1;" />
<stop
- style="stop-color:#000000;stop-opacity:0;"
+ id="stop10073-64"
offset="1"
- id="stop10073-64" />
+ style="stop-color:#000000;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- id="linearGradient11871-3">
+ id="linearGradient11871-3"
+ inkscape:collect="always">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop11873-0"
offset="0"
- id="stop11873-0" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop11875-8"
offset="1"
- id="stop11875-8" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient10069-3">
<stop
- style="stop-color:#000000;stop-opacity:1;"
+ id="stop10071-87"
offset="0"
- id="stop10071-87" />
+ style="stop-color:#000000;stop-opacity:1;" />
<stop
- style="stop-color:#000000;stop-opacity:0;"
+ id="stop10073-42"
offset="1"
- id="stop10073-42" />
+ style="stop-color:#000000;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient39630"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8167109,0,0,0.8433415,239.34332,-149.78578)"
- x1="104.90227"
- y1="53.227627"
+ y2="56.357628"
x2="121.22078"
- y2="56.357628" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient39632"
+ y1="53.227627"
+ x1="104.90227"
+ gradientTransform="matrix(0.8167109,0,0,0.8433415,239.34332,-149.78578)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(207,-246.99988)"
- x1="-56.5"
- y1="342.0625"
- x2="-49"
- y2="341" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient39630"
xlink:href="#linearGradient319"
- id="linearGradient40171"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8167109,0,0,0.8433415,239.34332,-149.78578)"
- x1="104.90227"
- y1="53.227627"
- x2="120.06789"
- y2="54.6674" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient40173"
- gradientUnits="userSpaceOnUse"
+ y2="341"
+ x2="-49"
+ y1="342.0625"
x1="-56.5"
- y1="340.32199"
- x2="-56.5"
- y2="348" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient40175"
+ gradientTransform="translate(207,-246.99988)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,13)"
- x1="-56.8125"
- y1="329.06256"
- x2="-47.214466"
- y2="329.26965" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient39632"
xlink:href="#linearGradient319"
- id="linearGradient40280"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8167109,0,0,0.8433415,239.34332,-149.78578)"
- x1="104.90227"
- y1="53.227627"
- x2="120.06789"
- y2="54.6674" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient40282"
+ y2="54.6674"
+ x2="120.06789"
+ y1="53.227627"
+ x1="104.90227"
+ gradientTransform="matrix(0.8167109,0,0,0.8433415,239.34332,-149.78578)"
gradientUnits="userSpaceOnUse"
- x1="-56.5"
- y1="340.32199"
- x2="-56.5"
- y2="348" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient40171"
xlink:href="#linearGradient319"
- id="linearGradient40284"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,13)"
- x1="-56.8125"
- y1="329.06256"
- x2="-47.214466"
- y2="329.26965" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient38689"
+ y2="348"
+ x2="-56.5"
+ y1="340.32199"
+ x1="-56.5"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-420,490.00041)"
- x1="301.5"
- y1="-105.87541"
- x2="340"
- y2="-65.250412" />
+ id="linearGradient40173"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient38693"
+ y2="329.26965"
+ x2="-47.214466"
+ y1="329.06256"
+ x1="-56.8125"
+ gradientTransform="translate(0,13)"
gradientUnits="userSpaceOnUse"
- x1="-97"
- y1="408"
- x2="-88"
- y2="413.51562" />
+ id="linearGradient40175"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient38695"
+ y2="54.6674"
+ x2="120.06789"
+ y1="53.227627"
+ x1="104.90227"
+ gradientTransform="matrix(0.8167109,0,0,0.8433415,239.34332,-149.78578)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(6,0)"
- x1="-97"
- y1="408"
- x2="-88"
- y2="413.51562" />
+ id="linearGradient40280"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient38697"
+ y2="348"
+ x2="-56.5"
+ y1="340.32199"
+ x1="-56.5"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,6)"
- x1="-97"
- y1="408"
- x2="-88"
- y2="413.51562" />
+ id="linearGradient40282"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient38701"
+ y2="329.26965"
+ x2="-47.214466"
+ y1="329.06256"
+ x1="-56.8125"
+ gradientTransform="translate(0,13)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(6,6)"
- x1="-97"
- y1="408"
- x2="-88"
- y2="413.51562" />
+ id="linearGradient40284"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500-7"
- id="linearGradient38703"
+ y2="-65.250412"
+ x2="340"
+ y1="-105.87541"
+ x1="301.5"
+ gradientTransform="translate(-420,490.00041)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(24,-6)"
- x1="-97"
- y1="408"
- x2="-88"
- y2="413.51562" />
+ id="linearGradient38689"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient38706"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,-1,-157,821.03125)"
- x1="-90.5"
- y1="413.51562"
+ y2="413.51562"
x2="-88"
- y2="413.51562" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient38720"
+ y1="408"
+ x1="-97"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.3846148,0,0,1,-211.38442,490.00041)"
- x1="301.5"
- y1="-105.87541"
- x2="340"
- y2="-65.250412" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient38693"
xlink:href="#linearGradient16500"
- id="linearGradient38723"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(8,0)"
- x1="-97"
- y1="408"
- x2="-88"
- y2="413.51562" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient38725"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(8,6)"
- x1="-97"
- y1="408"
+ y2="413.51562"
x2="-88"
- y2="413.51562" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500-7"
- id="linearGradient38727"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(24,-6)"
- x1="-97"
y1="408"
- x2="-88"
- y2="413.51562" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient38729"
+ x1="-97"
+ gradientTransform="translate(6,0)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,-1,-156,821.03125)"
- x1="-89.75"
- y1="413.98114"
- x2="-86.75"
- y2="416.32614" />
+ id="linearGradient38695"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500-7"
- id="linearGradient38731"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(24,-2.4825165)"
- x1="-97"
- y1="408"
+ y2="413.51562"
x2="-88"
- y2="413.51562" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient38736"
+ y1="408"
+ x1="-97"
+ gradientTransform="translate(0,6)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,-1,-156,824.54874)"
- x1="-89.75"
- y1="413.98114"
- x2="-86.75"
- y2="416.32614" />
+ id="linearGradient38697"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient39199"
+ y2="413.51562"
+ x2="-88"
+ y1="408"
+ x1="-97"
+ gradientTransform="translate(6,6)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-420,490.00041)"
- x1="301.5"
- y1="-105.87541"
- x2="340"
- y2="-65.250412" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient38701"
xlink:href="#linearGradient16500"
- id="linearGradient39201"
- gradientUnits="userSpaceOnUse"
- x1="-97"
- y1="408"
- x2="-88"
- y2="413.51562" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient39203"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(6,0)"
- x1="-97"
- y1="408"
+ y2="413.51562"
x2="-88"
- y2="413.51562" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient39205"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,6)"
- x1="-97"
y1="408"
+ x1="-97"
+ gradientTransform="translate(24,-6)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient38703"
+ xlink:href="#linearGradient16500-7"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="413.51562"
x2="-88"
- y2="413.51562" />
+ y1="413.51562"
+ x1="-90.5"
+ gradientTransform="matrix(-1,0,0,-1,-157,821.03125)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient38706"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient39207"
+ y2="-65.250412"
+ x2="340"
+ y1="-105.87541"
+ x1="301.5"
+ gradientTransform="matrix(0.3846148,0,0,1,-211.38442,490.00041)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(6,6)"
- x1="-97"
+ id="linearGradient38720"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="413.51562"
+ x2="-88"
y1="408"
+ x1="-97"
+ gradientTransform="translate(8,0)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient38723"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="413.51562"
x2="-88"
- y2="413.51562" />
+ y1="408"
+ x1="-97"
+ gradientTransform="translate(8,6)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient38725"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient39246"
+ y2="413.51562"
+ x2="-88"
+ y1="408"
+ x1="-97"
+ gradientTransform="translate(24,-6)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-420,490.00041)"
- x1="301.5"
- y1="-105.87541"
- x2="340"
- y2="-65.250412" />
+ id="linearGradient38727"
+ xlink:href="#linearGradient16500-7"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient39248"
+ y2="416.32614"
+ x2="-86.75"
+ y1="413.98114"
+ x1="-89.75"
+ gradientTransform="matrix(-1,0,0,-1,-156,821.03125)"
gradientUnits="userSpaceOnUse"
- x1="-97"
- y1="408"
+ id="linearGradient38729"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="413.51562"
x2="-88"
- y2="413.51562" />
+ y1="408"
+ x1="-97"
+ gradientTransform="translate(24,-2.4825165)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient38731"
+ xlink:href="#linearGradient16500-7"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient39252"
+ y2="416.32614"
+ x2="-86.75"
+ y1="413.98114"
+ x1="-89.75"
+ gradientTransform="matrix(-1,0,0,-1,-156,824.54874)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(6,0)"
- x1="-97"
- y1="408"
- x2="-88"
- y2="413.51562" />
+ id="linearGradient38736"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient39255"
+ y2="-65.250412"
+ x2="340"
+ y1="-105.87541"
+ x1="301.5"
+ gradientTransform="translate(-420,490.00041)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,6)"
+ id="linearGradient39199"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="413.51562"
+ x2="-88"
+ y1="408"
x1="-97"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient39201"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="413.51562"
+ x2="-88"
y1="408"
+ x1="-97"
+ gradientTransform="translate(6,0)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient39203"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="413.51562"
x2="-88"
- y2="413.51562" />
+ y1="408"
+ x1="-97"
+ gradientTransform="translate(0,6)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient39205"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="413.51562"
+ x2="-88"
+ y1="408"
+ x1="-97"
+ gradientTransform="translate(6,6)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient39207"
xlink:href="#linearGradient16500"
- id="linearGradient39259"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="-65.250412"
+ x2="340"
+ y1="-105.87541"
+ x1="301.5"
+ gradientTransform="translate(-420,490.00041)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(6,6)"
+ id="linearGradient39246"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="413.51562"
+ x2="-88"
+ y1="408"
x1="-97"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient39248"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="413.51562"
+ x2="-88"
y1="408"
+ x1="-97"
+ gradientTransform="translate(6,0)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient39252"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="413.51562"
x2="-88"
- y2="413.51562" />
+ y1="408"
+ x1="-97"
+ gradientTransform="translate(0,6)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient39255"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610-83"
- id="linearGradient38961"
+ y2="413.51562"
+ x2="-88"
+ y1="408"
+ x1="-97"
+ gradientTransform="translate(6,6)"
gradientUnits="userSpaceOnUse"
- x1="488.5"
- y1="568"
+ id="linearGradient39259"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="568"
x2="495"
- y2="568" />
+ y1="568"
+ x1="488.5"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient38961"
+ xlink:href="#linearGradient1610-83"
+ inkscape:collect="always" />
<mask
- maskUnits="userSpaceOnUse"
- id="mask38956">
+ id="mask38956"
+ maskUnits="userSpaceOnUse">
<rect
- style="fill:url(#linearGradient38961);stroke:none;stroke-width:2.79999995;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- id="rect38958"
- width="16"
- height="12"
- x="488"
- y="560"
+ ry="0"
rx="0"
- ry="0" />
+ y="560"
+ x="488"
+ height="12"
+ width="16"
+ id="rect38958"
+ style="fill:url(#linearGradient38961);stroke:none;stroke-width:2.79999995;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
</mask>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610-83"
- id="linearGradient39115"
- gradientUnits="userSpaceOnUse"
- x1="487.2518"
- y1="531.95105"
+ y2="580.63715"
x2="490.65796"
- y2="580.63715" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient11871-3"
- id="linearGradient39117"
+ y1="531.95105"
+ x1="487.2518"
gradientUnits="userSpaceOnUse"
- x1="496.49335"
- y1="537.78113"
- x2="498.40021"
- y2="540.13623" />
+ id="linearGradient39115"
+ xlink:href="#linearGradient1610-83"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient11871-3"
- id="linearGradient39119"
+ y2="540.13623"
+ x2="498.40021"
+ y1="537.78113"
+ x1="496.49335"
gradientUnits="userSpaceOnUse"
- x1="495.85294"
- y1="541.69116"
- x2="495.25"
- y2="539.75" />
+ id="linearGradient39117"
+ xlink:href="#linearGradient11871-3"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069-3"
- id="linearGradient39122"
+ y2="539.75"
+ x2="495.25"
+ y1="541.69116"
+ x1="495.85294"
gradientUnits="userSpaceOnUse"
- x1="494.38467"
- y1="532.42651"
- x2="496.21078"
- y2="541.02698" />
+ id="linearGradient39119"
+ xlink:href="#linearGradient11871-3"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient40703"
- id="linearGradient39261"
+ y2="541.02698"
+ x2="496.21078"
+ y1="532.42651"
+ x1="494.38467"
gradientUnits="userSpaceOnUse"
- x1="122.25188"
- y1="106.08706"
- x2="147.08464"
- y2="134.12131" />
+ id="linearGradient39122"
+ xlink:href="#linearGradient10069-3"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient39263"
+ y2="134.12131"
+ x2="147.08464"
+ y1="106.08706"
+ x1="122.25188"
gradientUnits="userSpaceOnUse"
- x1="116.75861"
- y1="97.375854"
- x2="145.729"
- y2="137.52937" />
+ id="linearGradient39261"
+ xlink:href="#linearGradient40703"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030"
- id="linearGradient39265"
+ y2="137.52937"
+ x2="145.729"
+ y1="97.375854"
+ x1="116.75861"
gradientUnits="userSpaceOnUse"
- x1="190.68166"
- y1="244.14676"
+ id="linearGradient39263"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="226.33672"
x2="174.75458"
- y2="226.33672" />
+ y1="244.14676"
+ x1="190.68166"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient39265"
+ xlink:href="#linearGradient9030"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient319-46">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop320-03"
offset="0"
- id="stop320-03" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop321-62"
offset="1"
- id="stop321-62" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319-46"
- id="linearGradient39508"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-20,0)"
- x1="39.102718"
- y1="641.73358"
+ y2="661.93829"
x2="58.680996"
- y2="661.93829" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient43807"
- id="linearGradient39518"
+ y1="641.73358"
+ x1="39.102718"
+ gradientTransform="translate(-20,0)"
gradientUnits="userSpaceOnUse"
- x1="648.09674"
- y1="355.85541"
- x2="634.09503"
- y2="341.23715" />
+ id="linearGradient39508"
+ xlink:href="#linearGradient319-46"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient39088"
- id="linearGradient39520"
+ y2="341.23715"
+ x2="634.09503"
+ y1="355.85541"
+ x1="648.09674"
gradientUnits="userSpaceOnUse"
- x1="696.63055"
- y1="403.93069"
- x2="643.71313"
- y2="349.93216" />
+ id="linearGradient39518"
+ xlink:href="#linearGradient43807"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069-95"
- id="linearGradient39523"
+ y2="349.93216"
+ x2="643.71313"
+ y1="403.93069"
+ x1="696.63055"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8461524,0,0,0.8461523,99.385524,54.308237)"
- x1="633.10468"
- y1="338.95337"
- x2="649.69073"
- y2="354.92981" />
+ id="linearGradient39520"
+ xlink:href="#linearGradient39088"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient39716"
+ y2="354.92981"
+ x2="649.69073"
+ y1="338.95337"
+ x1="633.10468"
+ gradientTransform="matrix(0.8461524,0,0,0.8461523,99.385524,54.308237)"
gradientUnits="userSpaceOnUse"
- x1="121.80637"
- y1="106.4641"
- x2="142.1468"
- y2="132.44617" />
+ id="linearGradient39523"
+ xlink:href="#linearGradient10069-95"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030"
- id="linearGradient39718"
+ y2="132.44617"
+ x2="142.1468"
+ y1="106.4641"
+ x1="121.80637"
gradientUnits="userSpaceOnUse"
- x1="190.68166"
- y1="244.14676"
- x2="174.75458"
- y2="226.33672" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient39716"
xlink:href="#linearGradient319"
- id="linearGradient40189"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9998599,0,0,0.9960071,131.027,-79.5885)"
- x1="57.347244"
- y1="82.75322"
- x2="86.00116"
- y2="112.03586" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient40202"
+ y2="226.33672"
+ x2="174.75458"
+ y1="244.14676"
+ x1="190.68166"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9166695,0,0,0.9203753,136.97426,-72.21433)"
- x1="80.60067"
- y1="108.47212"
- x2="68.0271"
- y2="94.239906" />
+ id="linearGradient39718"
+ xlink:href="#linearGradient9030"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient40295"
+ y2="112.03586"
+ x2="86.00116"
+ y1="82.75322"
+ x1="57.347244"
+ gradientTransform="matrix(0.9998599,0,0,0.9960071,131.027,-79.5885)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9166695,0,0,0.9203753,136.97426,-72.21433)"
- x1="80.60067"
- y1="108.47212"
- x2="68.0271"
- y2="94.239906" />
+ id="linearGradient40189"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="94.239906"
+ x2="68.0271"
+ y1="108.47212"
+ x1="80.60067"
+ gradientTransform="matrix(0.9166695,0,0,0.9203753,136.97426,-72.21433)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient40202"
xlink:href="#linearGradient319"
- id="linearGradient40297"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="94.239906"
+ x2="68.0271"
+ y1="108.47212"
+ x1="80.60067"
+ gradientTransform="matrix(0.9166695,0,0,0.9203753,136.97426,-72.21433)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9998599,0,0,0.9960071,131.027,-79.5885)"
- x1="57.347244"
- y1="82.75322"
+ id="linearGradient40295"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="112.03586"
x2="86.00116"
- y2="112.03586" />
+ y1="82.75322"
+ x1="57.347244"
+ gradientTransform="matrix(0.9998599,0,0,0.9960071,131.027,-79.5885)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient40297"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<mask
- maskUnits="userSpaceOnUse"
- id="mask40306">
+ id="mask40306"
+ maskUnits="userSpaceOnUse">
<path
- id="path40308"
- d="m 195,11.00001 0,14 0.5,0 13.5,-13.5 0,-0.5 -14,0 z"
- style="fill:#ffffff;fill-rule:evenodd;stroke:none"
+ inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccc"
- inkscape:connector-curvature="0" />
+ style="fill:#ffffff;fill-rule:evenodd;stroke:none"
+ d="m 195,11.00001 0,14 0.5,0 13.5,-13.5 0,-0.5 -14,0 z"
+ id="path40308" />
</mask>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient40703-5-5"
- id="linearGradient39261-4-5"
- gradientUnits="userSpaceOnUse"
- x1="128.09367"
- y1="112.43961"
+ y2="133.4879"
x2="145.20987"
- y2="133.4879" />
+ y1="112.43961"
+ x1="128.09367"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient39261-4-5"
+ xlink:href="#linearGradient40703-5-5"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient40703-5-5">
<stop
- style="stop-color:#143564;stop-opacity:1;"
+ id="stop40705-8-2"
offset="0"
- id="stop40705-8-2" />
+ style="stop-color:#143564;stop-opacity:1;" />
<stop
- style="stop-color:#c1d7f8;stop-opacity:1;"
+ id="stop40707-8-7"
offset="1"
- id="stop40707-8-7" />
+ style="stop-color:#c1d7f8;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient38252-9">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop38254-3"
offset="0"
- id="stop38254-3" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop38256-1"
offset="1"
- id="stop38256-1" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610-74-9-1"
- id="linearGradient40511-7-9-5"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.888889,0,0,1,-270.46874,9.59825)"
- x1="256.14325"
- y1="5.6181068"
+ y2="29.688427"
x2="278.79254"
- y2="29.688427" />
+ y1="5.6181068"
+ x1="256.14325"
+ gradientTransform="matrix(0.888889,0,0,1,-270.46874,9.59825)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient40511-7-9-5"
+ xlink:href="#linearGradient1610-74-9-1"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient1610-74-9-1">
<stop
- style="stop-color:black;stop-opacity:1;"
+ id="stop1611-0-8-7"
offset="0"
- id="stop1611-0-8-7" />
+ style="stop-color:black;stop-opacity:1;" />
<stop
- style="stop-color:white;stop-opacity:1;"
+ id="stop1612-9-3-1"
offset="1"
- id="stop1612-9-3-1" />
+ style="stop-color:white;stop-opacity:1;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient58334-8-6-5"
- id="linearGradient40507-4-8-1"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-114,-208)"
- x1="87"
- y1="241.125"
+ y2="249"
x2="93.0625"
- y2="249" />
+ y1="241.125"
+ x1="87"
+ gradientTransform="translate(-114,-208)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient40507-4-8-1"
+ xlink:href="#linearGradient58334-8-6-5"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient58334-8-6-5">
<stop
- id="stop58336-8-9-2"
+ style="stop-color:#ffffff;stop-opacity:0.87628865;"
offset="0.0000000"
- style="stop-color:#ffffff;stop-opacity:0.87628865;" />
+ id="stop58336-8-9-2" />
<stop
- id="stop58338-24-8-7"
+ style="stop-color:#fffffe;stop-opacity:0.0000000;"
offset="1.0000000"
- style="stop-color:#fffffe;stop-opacity:0.0000000;" />
+ id="stop58338-24-8-7" />
</linearGradient>
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500-5-6-1"
- id="radialGradient40649-2-6-6"
- cx="-27.749987"
- cy="32.615383"
- fx="-27.749987"
- fy="32.615383"
- r="5.5"
+ gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.4545454,0.3636364,-0.3862167,0.4827711,-2.5397644,26.345139)"
- gradientUnits="userSpaceOnUse" />
+ r="5.5"
+ fy="32.615383"
+ fx="-27.749987"
+ cy="32.615383"
+ cx="-27.749987"
+ id="radialGradient40649-2-6-6"
+ xlink:href="#linearGradient16500-5-6-1"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- id="linearGradient16500-5-6-1">
+ id="linearGradient16500-5-6-1"
+ inkscape:collect="always">
<stop
- style="stop-color:black;stop-opacity:1;"
+ id="stop16502-17-2-4"
offset="0"
- id="stop16502-17-2-4" />
+ style="stop-color:black;stop-opacity:1;" />
<stop
- style="stop-color:black;stop-opacity:0;"
+ id="stop16504-11-3-2"
offset="1"
- id="stop16504-11-3-2" />
+ style="stop-color:black;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500-5-6-1"
- id="linearGradient40502-7-8-3"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-784,-271)"
- x1="754"
- y1="300.5"
+ y2="305"
x2="758"
- y2="305" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319-5-6-2"
- id="linearGradient40635-7-2-2"
+ y1="300.5"
+ x1="754"
+ gradientTransform="translate(-784,-271)"
gradientUnits="userSpaceOnUse"
- x1="125.99933"
- y1="111.2683"
+ id="linearGradient40502-7-8-3"
+ xlink:href="#linearGradient16500-5-6-1"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="122.36016"
x2="134.91479"
- y2="122.36016" />
+ y1="111.2683"
+ x1="125.99933"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient40635-7-2-2"
+ xlink:href="#linearGradient319-5-6-2"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient319-5-6-2">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop320-761-2-1"
offset="0"
- id="stop320-761-2-1" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop321-89-7-6"
offset="1"
- id="stop321-89-7-6" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319-5-6-2"
- id="linearGradient40637-9-5-8"
- gradientUnits="userSpaceOnUse"
- x1="126.72586"
- y1="112.53999"
+ y2="122.36016"
x2="134.91479"
- y2="122.36016" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient13973-3-7-8"
- id="linearGradient40639-1-2-1"
+ y1="112.53999"
+ x1="126.72586"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(19.367382,0)"
- x1="111.2239"
- y1="112.62726"
+ id="linearGradient40637-9-5-8"
+ xlink:href="#linearGradient319-5-6-2"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="99.029617"
x2="99.628899"
- y2="99.029617" />
+ y1="112.62726"
+ x1="111.2239"
+ gradientTransform="translate(19.367382,0)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient40639-1-2-1"
+ xlink:href="#linearGradient13973-3-7-8"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient13973-3-7-8">
<stop
- style="stop-color:#3c4c18;stop-opacity:1;"
+ id="stop13975-1-8-9"
offset="0"
- id="stop13975-1-8-9" />
+ style="stop-color:#3c4c18;stop-opacity:1;" />
<stop
- style="stop-color:#9aff31;stop-opacity:0;"
+ id="stop13977-2-0-2"
offset="1"
- id="stop13977-2-0-2" />
+ style="stop-color:#9aff31;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319-5-6-2"
- id="linearGradient40641-9-2-7"
- gradientUnits="userSpaceOnUse"
- x1="127.63637"
- y1="114.2303"
+ y2="131.03783"
x2="143.69765"
- y2="131.03783" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610-74-9-1"
- id="linearGradient41638-8-6"
+ y1="114.2303"
+ x1="127.63637"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.888889,0,0,1,-270.46874,9.59825)"
- x1="256.14325"
- y1="5.6181068"
- x2="278.79254"
- y2="29.688427" />
+ id="linearGradient40641-9-2-7"
+ xlink:href="#linearGradient319-5-6-2"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient58334-8-6-5"
- id="linearGradient41640-2-0"
+ y2="29.688427"
+ x2="278.79254"
+ y1="5.6181068"
+ x1="256.14325"
+ gradientTransform="matrix(0.888889,0,0,1,-270.46874,9.59825)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-114,-208)"
- x1="87"
- y1="241.125"
+ id="linearGradient41638-8-6"
+ xlink:href="#linearGradient1610-74-9-1"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="249"
x2="93.0625"
- y2="249" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500-5-6-1"
- id="radialGradient41642-5-0"
+ y1="241.125"
+ x1="87"
+ gradientTransform="translate(-114,-208)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.4545454,0.3636364,-0.3862167,0.4827711,-2.5397644,26.345139)"
- cx="-27.749987"
- cy="32.615383"
- fx="-27.749987"
+ id="linearGradient41640-2-0"
+ xlink:href="#linearGradient58334-8-6-5"
+ inkscape:collect="always" />
+ <radialGradient
+ r="5.5"
fy="32.615383"
- r="5.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500-5-6-1"
- id="linearGradient41644-5-4"
+ fx="-27.749987"
+ cy="32.615383"
+ cx="-27.749987"
+ gradientTransform="matrix(0.4545454,0.3636364,-0.3862167,0.4827711,-2.5397644,26.345139)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-784,-271)"
- x1="754"
- y1="300.5"
- x2="758"
- y2="305" />
+ id="radialGradient41642-5-0"
+ xlink:href="#linearGradient16500-5-6-1"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542-3-0-7-6"
- id="linearGradient40875-3-9-8"
+ y2="305"
+ x2="758"
+ y1="300.5"
+ x1="754"
+ gradientTransform="translate(-784,-271)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.695652,0,0,0.869703,-44.93485,-114.66358)"
- x1="188.77448"
- y1="259.745"
+ id="linearGradient41644-5-4"
+ xlink:href="#linearGradient16500-5-6-1"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="242.22473"
x2="164.0939"
- y2="242.22473" />
+ y1="259.745"
+ x1="188.77448"
+ gradientTransform="matrix(0.695652,0,0,0.869703,-44.93485,-114.66358)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient40875-3-9-8"
+ xlink:href="#linearGradient37542-3-0-7-6"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient37542-3-0-7-6">
<stop
- id="stop37544-1-6-6-5"
+ style="stop-color:#000000;stop-opacity:1;"
offset="0"
- style="stop-color:#000000;stop-opacity:1;" />
+ id="stop37544-1-6-6-5" />
<stop
- id="stop37546-2-1-7-0"
+ style="stop-color:#ffffff;stop-opacity:1;"
offset="1"
- style="stop-color:#ffffff;stop-opacity:1;" />
+ id="stop37546-2-1-7-0" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319-34-8-7-0"
- id="linearGradient40877-5-5-9"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(357.00001,373)"
- x1="-287.75"
- y1="-276.75"
+ y2="-264.875"
x2="-276"
- y2="-264.875" />
+ y1="-276.75"
+ x1="-287.75"
+ gradientTransform="translate(357.00001,373)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient40877-5-5-9"
+ xlink:href="#linearGradient319-34-8-7-0"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient319-34-8-7-0">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop320-11-9-8-0"
offset="0"
- id="stop320-11-9-8-0" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop321-38-3-1-6"
offset="1"
- id="stop321-38-3-1-6" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542-3-0-7-6"
- id="linearGradient40879-9-8-1"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.608695,0,0,0.760996,-26.1305,-84.76968)"
- x1="130.70929"
- y1="210.78392"
+ y2="248.54021"
x2="171.50414"
- y2="248.54021" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319-34-8-7-0"
- id="linearGradient40881-8-0-8"
+ y1="210.78392"
+ x1="130.70929"
+ gradientTransform="matrix(0.608695,0,0,0.760996,-26.1305,-84.76968)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(361.00001,376)"
- x1="-283"
- y1="-272"
+ id="linearGradient40879-9-8-1"
+ xlink:href="#linearGradient37542-3-0-7-6"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="-267.26749"
x2="-277.01501"
- y2="-267.26749" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069-7-6-7-4"
- id="radialGradient40883-4-0-3"
+ y1="-272"
+ x1="-283"
+ gradientTransform="translate(361.00001,376)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-0.06118084,-0.8594818,2.4629674,-0.1753088,-259.40057,190.15309)"
- cx="77.721619"
- cy="104.09358"
- fx="77.721619"
+ id="linearGradient40881-8-0-8"
+ xlink:href="#linearGradient319-34-8-7-0"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.9999998"
fy="104.09358"
- r="3.9999998" />
+ fx="77.721619"
+ cy="104.09358"
+ cx="77.721619"
+ gradientTransform="matrix(-0.06118084,-0.8594818,2.4629674,-0.1753088,-259.40057,190.15309)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient40883-4-0-3"
+ xlink:href="#linearGradient10069-7-6-7-4"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient10069-7-6-7-4">
<stop
- style="stop-color:#000000;stop-opacity:1;"
+ id="stop10071-81-3-2-4"
offset="0"
- id="stop10071-81-3-2-4" />
+ style="stop-color:#000000;stop-opacity:1;" />
<stop
- style="stop-color:#000000;stop-opacity:0;"
+ id="stop10073-6-7-5-6"
offset="1"
- id="stop10073-6-7-5-6" />
+ style="stop-color:#000000;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542-3-0-7-6"
- id="linearGradient39136-2-0"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.695652,0,0,0.869703,-44.93485,-114.66358)"
- x1="188.77448"
- y1="259.745"
+ y2="242.22473"
x2="164.0939"
- y2="242.22473" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319-34-8-7-0"
- id="linearGradient39138-8-6"
+ y1="259.745"
+ x1="188.77448"
+ gradientTransform="matrix(0.695652,0,0,0.869703,-44.93485,-114.66358)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(357.00001,373)"
- x1="-287.75"
- y1="-276.75"
- x2="-276"
- y2="-264.875" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient39136-2-0"
xlink:href="#linearGradient37542-3-0-7-6"
- id="linearGradient39140-6-8"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.608695,0,0,0.760996,-26.1305,-84.76968)"
- x1="130.70929"
- y1="210.78392"
- x2="174.35753"
- y2="250.6842" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="-264.875"
+ x2="-276"
+ y1="-276.75"
+ x1="-287.75"
+ gradientTransform="translate(357.00001,373)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient39138-8-6"
xlink:href="#linearGradient319-34-8-7-0"
- id="linearGradient39143-0-6"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="250.6842"
+ x2="174.35753"
+ y1="210.78392"
+ x1="130.70929"
+ gradientTransform="matrix(0.608695,0,0,0.760996,-26.1305,-84.76968)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(361.00001,376)"
- x1="-283"
- y1="-272"
+ id="linearGradient39140-6-8"
+ xlink:href="#linearGradient37542-3-0-7-6"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="-267.26749"
x2="-277.01501"
- y2="-267.26749" />
+ y1="-272"
+ x1="-283"
+ gradientTransform="translate(361.00001,376)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient39143-0-6"
+ xlink:href="#linearGradient319-34-8-7-0"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient319-17-1-6">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop320-115-1-5"
offset="0"
- id="stop320-115-1-5" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop321-27-3-7"
offset="1"
- id="stop321-27-3-7" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319-17-1-6"
- id="linearGradient40679"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,0.7972867,-259.00009,90.24189)"
- x1="255.63673"
- y1="99.513062"
+ y2="129.36641"
x2="275.1503"
- y2="129.36641" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient25417"
- id="linearGradient40731"
+ y1="99.513062"
+ x1="255.63673"
+ gradientTransform="matrix(1,0,0,0.7972867,-259.00009,90.24189)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,0.997161,-259.00079,67.35344)"
- x1="280.0918"
- y1="129.28557"
- x2="267.20212"
- y2="116.41341" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient40679"
xlink:href="#linearGradient319-17-1-6"
- id="linearGradient40733"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,0.7972867,-259.00009,90.24189)"
- x1="255.63673"
- y1="99.513062"
- x2="275.1503"
- y2="129.36641" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319-17-1-6-7"
- id="linearGradient40733-0"
+ y2="116.41341"
+ x2="267.20212"
+ y1="129.28557"
+ x1="280.0918"
+ gradientTransform="matrix(1,0,0,0.997161,-259.00079,67.35344)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,0.7972867,-259.00009,90.24189)"
- x1="255.63673"
+ id="linearGradient40731"
+ xlink:href="#linearGradient25417"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="129.36641"
+ x2="275.1503"
y1="99.513062"
+ x1="255.63673"
+ gradientTransform="matrix(1,0,0,0.7972867,-259.00009,90.24189)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient40733"
+ xlink:href="#linearGradient319-17-1-6"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="129.36641"
x2="275.1503"
- y2="129.36641" />
+ y1="99.513062"
+ x1="255.63673"
+ gradientTransform="matrix(1,0,0,0.7972867,-259.00009,90.24189)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient40733-0"
+ xlink:href="#linearGradient319-17-1-6-7"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient319-17-1-6-7">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop320-115-1-5-1"
offset="0"
- id="stop320-115-1-5-1" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop321-27-3-7-7"
offset="1"
- id="stop321-27-3-7-7" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319-17-1-6-8"
- id="linearGradient40733-03"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,0.7972867,-259.00009,90.24189)"
- x1="255.63673"
- y1="99.513062"
+ y2="129.36641"
x2="275.1503"
- y2="129.36641" />
+ y1="99.513062"
+ x1="255.63673"
+ gradientTransform="matrix(1,0,0,0.7972867,-259.00009,90.24189)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient40733-03"
+ xlink:href="#linearGradient319-17-1-6-8"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient319-17-1-6-8">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop320-115-1-5-0"
offset="0"
- id="stop320-115-1-5-0" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop321-27-3-7-1"
offset="1"
- id="stop321-27-3-7-1" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<clipPath
- clipPathUnits="userSpaceOnUse"
- id="clipPath40897">
+ id="clipPath40897"
+ clipPathUnits="userSpaceOnUse">
<rect
- y="198"
- x="-41"
- height="16"
- width="15"
- id="rect40899"
+ transform="scale(-1,1)"
style="opacity:0.45;fill:#80b3ff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3.29999995;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- transform="scale(-1,1)" />
+ id="rect40899"
+ width="15"
+ height="16"
+ x="-41"
+ y="198" />
</clipPath>
<clipPath
- clipPathUnits="userSpaceOnUse"
- id="clipPath40902">
+ id="clipPath40902"
+ clipPathUnits="userSpaceOnUse">
<rect
- y="197"
- x="-22"
- height="17"
- width="15"
- id="rect40904"
+ transform="scale(-1,1)"
style="opacity:0.45;fill:#80b3ff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3.29999995;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- transform="scale(-1,1)" />
+ id="rect40904"
+ width="15"
+ height="17"
+ x="-22"
+ y="197" />
</clipPath>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient38478"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(254.01612,-211.00101)"
- x1="96.824379"
- y1="393.90298"
+ y2="391.21976"
x2="94.246101"
- y2="391.21976" />
+ y1="393.90298"
+ x1="96.824379"
+ gradientTransform="translate(254.01612,-211.00101)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient38478"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<mask
- maskUnits="userSpaceOnUse"
- id="mask38474">
+ id="mask38474"
+ maskUnits="userSpaceOnUse">
<rect
- style="fill:url(#linearGradient38478);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- id="rect38476"
- width="15"
- height="15"
+ y="174.99901"
x="343.01611"
- y="174.99901" />
+ height="15"
+ width="15"
+ id="rect38476"
+ style="fill:url(#linearGradient38478);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
</mask>
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="radialGradient44318"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.050372,0,0,1.050372,-3.551238,-0.730396)"
- cx="70.5"
- cy="14.5"
- fx="70.5"
+ r="1.5"
fy="14.5"
- r="1.5" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="radialGradient44320"
+ fx="70.5"
+ cy="14.5"
+ cx="70.5"
+ gradientTransform="matrix(1.050372,0,0,1.050372,-3.551238,-0.730396)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.5399935,0.3131662,-0.3907892,0.5793905,38.141764,-16.056748)"
- cx="70.470596"
- cy="14.649424"
- fx="70.470596"
+ id="radialGradient44318"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
+ <radialGradient
+ r="5.5192375"
fy="14.649424"
- r="5.5192375" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319-19"
- id="linearGradient42988"
+ fx="70.470596"
+ cy="14.649424"
+ cx="70.470596"
+ gradientTransform="matrix(0.5399935,0.3131662,-0.3907892,0.5793905,38.141764,-16.056748)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8167109,0,0,0.8433415,239.34332,-149.78578)"
- x1="104.90227"
- y1="53.227627"
- x2="121.22078"
- y2="56.357628" />
+ id="radialGradient44320"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319-19"
- id="linearGradient42990"
+ y2="56.357628"
+ x2="121.22078"
+ y1="53.227627"
+ x1="104.90227"
+ gradientTransform="matrix(0.8167109,0,0,0.8433415,239.34332,-149.78578)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(207,-246.99988)"
- x1="-56.5"
- y1="342.0625"
- x2="-49"
- y2="341" />
+ id="linearGradient42988"
+ xlink:href="#linearGradient319-19"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069-8-3-3"
- id="linearGradient42992"
+ y2="341"
+ x2="-49"
+ y1="342.0625"
+ x1="-56.5"
+ gradientTransform="translate(207,-246.99988)"
gradientUnits="userSpaceOnUse"
- x1="126.55782"
- y1="113.57294"
- x2="132.41052"
- y2="118.81034" />
+ id="linearGradient42990"
+ xlink:href="#linearGradient319-19"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319-95-2-7"
- id="linearGradient42994"
+ y2="118.81034"
+ x2="132.41052"
+ y1="113.57294"
+ x1="126.55782"
gradientUnits="userSpaceOnUse"
- x1="132"
- y1="117.26753"
- x2="142.72656"
- y2="127.72736" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient42992"
xlink:href="#linearGradient10069-8-3-3"
- id="linearGradient42996"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="127.72736"
+ x2="142.72656"
+ y1="117.26753"
+ x1="132"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(4.9999967,20)"
- x1="-114.75"
- y1="546.5"
+ id="linearGradient42994"
+ xlink:href="#linearGradient319-95-2-7"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="542.5"
x2="-110.5"
- y2="542.5" />
+ y1="546.5"
+ x1="-114.75"
+ gradientTransform="translate(4.9999967,20)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient42996"
+ xlink:href="#linearGradient10069-8-3-3"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient44627">
<stop
- style="stop-color:black;stop-opacity:1;"
+ id="stop44629"
offset="0"
- id="stop44629" />
+ style="stop-color:black;stop-opacity:1;" />
<stop
- style="stop-color:white;stop-opacity:1;"
+ id="stop44631"
offset="1"
- id="stop44631" />
+ style="stop-color:white;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient10069-9-7-4-74">
<stop
- style="stop-color:#000000;stop-opacity:1;"
+ id="stop10071-5-4-5-0"
offset="0"
- id="stop10071-5-4-5-0" />
+ style="stop-color:#000000;stop-opacity:1;" />
<stop
- style="stop-color:#000000;stop-opacity:0;"
+ id="stop10073-43-0-5-9"
offset="1"
- id="stop10073-43-0-5-9" />
+ style="stop-color:#000000;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient44939-8">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop44941-8"
offset="0"
- id="stop44941-8" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop44943-2"
offset="1"
- id="stop44943-2" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient44939-8"
- id="linearGradient44402"
- gradientUnits="userSpaceOnUse"
- x1="351.15625"
- y1="108.35222"
+ y2="108.00847"
x2="345.40625"
- y2="108.00847" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient44939-8"
- id="linearGradient44404"
+ y1="108.35222"
+ x1="351.15625"
gradientUnits="userSpaceOnUse"
- x1="351.71875"
- y1="106.93575"
+ id="linearGradient44402"
+ xlink:href="#linearGradient44939-8"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="106.7795"
x2="347.1875"
- y2="106.7795" />
+ y1="106.93575"
+ x1="351.71875"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient44404"
+ xlink:href="#linearGradient44939-8"
+ inkscape:collect="always" />
<filter
- inkscape:collect="always"
- id="filter44473"
- x="-0.12578467"
- width="1.2515693"
- y="-0.11472401"
+ color-interpolation-filters="sRGB"
height="1.229448"
- color-interpolation-filters="sRGB">
+ y="-0.11472401"
+ width="1.2515693"
+ x="-0.12578467"
+ id="filter44473"
+ inkscape:collect="always">
<feGaussianBlur
- inkscape:collect="always"
+ id="feGaussianBlur44475"
stdDeviation="0.81235925"
- id="feGaussianBlur44475" />
+ inkscape:collect="always" />
</filter>
<filter
- inkscape:collect="always"
- id="filter44477"
- x="-0.12176471"
- width="1.2435294"
- y="-0.11828571"
+ color-interpolation-filters="sRGB"
height="1.2365714"
- color-interpolation-filters="sRGB">
+ y="-0.11828571"
+ width="1.2435294"
+ x="-0.12176471"
+ id="filter44477"
+ inkscape:collect="always">
<feGaussianBlur
- inkscape:collect="always"
+ id="feGaussianBlur44479"
stdDeviation="0.8625"
- id="feGaussianBlur44479" />
+ inkscape:collect="always" />
</filter>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient44939-8"
- id="linearGradient44485"
- gradientUnits="userSpaceOnUse"
- x1="279.75"
- y1="101.5"
+ y2="106.5"
x2="284.5"
- y2="106.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient44939-8"
- id="linearGradient44942"
+ y1="101.5"
+ x1="279.75"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,-21)"
- x1="351.71875"
- y1="106.93575"
- x2="339.125"
- y2="105.092" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient44485"
xlink:href="#linearGradient44939-8"
- id="linearGradient44944"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,-1,698,183)"
- x1="351.15625"
- y1="108.35222"
- x2="336.40625"
- y2="106.19597" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient44939-8"
- id="linearGradient44950"
+ y2="105.092"
+ x2="339.125"
+ y1="106.93575"
+ x1="351.71875"
+ gradientTransform="translate(0,-21)"
gradientUnits="userSpaceOnUse"
- x1="279"
- y1="102"
- x2="281.75"
- y2="102"
- gradientTransform="matrix(-1,0,0,1,593.02125,-1.8e-6)" />
+ id="linearGradient44942"
+ xlink:href="#linearGradient44939-8"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="106.19597"
+ x2="336.40625"
+ y1="108.35222"
+ x1="351.15625"
+ gradientTransform="matrix(-1,0,0,-1,698,183)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient44944"
xlink:href="#linearGradient44939-8"
- id="linearGradient44954"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientTransform="matrix(-1,0,0,1,593.02125,-1.8e-6)"
+ y2="102"
+ x2="281.75"
+ y1="102"
+ x1="279"
gradientUnits="userSpaceOnUse"
- x1="279.75"
- y1="101.5"
- x2="283"
+ id="linearGradient44950"
+ xlink:href="#linearGradient44939-8"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientTransform="matrix(0,1,1,0,225,-182.99437)"
y2="105.5"
- gradientTransform="matrix(0,1,1,0,225,-182.99437)" />
+ x2="283"
+ y1="101.5"
+ x1="279.75"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient44954"
+ xlink:href="#linearGradient44939-8"
+ inkscape:collect="always" />
<clipPath
- clipPathUnits="userSpaceOnUse"
- id="clipPath45147">
+ id="clipPath45147"
+ clipPathUnits="userSpaceOnUse">
<path
- sodipodi:nodetypes="ccccccccccccccccccccccc"
- id="path45149"
- d="m 5,261 13,0 0,1 -1,0 0,1 1,0 0,1 -1,0 0,1 -1,0 0,2 2,0 0,-1 1,0 0,-1 1,0 0,1 1,0 0,-1 1,0 0,13 -17,0 0,-17 z"
+ inkscape:connector-curvature="0"
style="opacity:0.2;fill:#3771c8;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.0999999;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- inkscape:connector-curvature="0" />
+ d="m 5,261 13,0 0,1 -1,0 0,1 1,0 0,1 -1,0 0,1 -1,0 0,2 2,0 0,-1 1,0 0,-1 1,0 0,1 1,0 0,-1 1,0 0,13 -17,0 0,-17 z"
+ id="path45149"
+ sodipodi:nodetypes="ccccccccccccccccccccccc" />
</clipPath>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient45220"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,1,221,10)"
- x1="115.84575"
- y1="10.8125"
+ y2="19.9375"
x2="106.125"
- y2="19.9375" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient38252-9"
- id="linearGradient45283"
+ y1="10.8125"
+ x1="115.84575"
+ gradientTransform="matrix(-1,0,0,1,221,10)"
gradientUnits="userSpaceOnUse"
- x1="125.86876"
- y1="111.85698"
- x2="130.88379"
- y2="121.70699" />
+ id="linearGradient45220"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient38252-9"
- id="linearGradient45285"
+ y2="121.70699"
+ x2="130.88379"
+ y1="111.85698"
+ x1="125.86876"
gradientUnits="userSpaceOnUse"
- x1="134.78751"
- y1="122.29202"
+ id="linearGradient45283"
+ xlink:href="#linearGradient38252-9"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="117.96092"
x2="132.60205"
- y2="117.96092" />
+ y1="122.29202"
+ x1="134.78751"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient45285"
+ xlink:href="#linearGradient38252-9"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069-9-7-4-74"
- id="radialGradient45309"
- cx="336.42892"
- cy="611.10455"
- fx="336.42892"
- fy="611.10455"
- r="5.9852905"
+ gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0070601,0.03386866,-0.03770425,1.1211085,20.665977,-85.772965)"
- gradientUnits="userSpaceOnUse" />
+ r="5.9852905"
+ fy="611.10455"
+ fx="336.42892"
+ cy="611.10455"
+ cx="336.42892"
+ id="radialGradient45309"
+ xlink:href="#linearGradient10069-9-7-4-74"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient44627"
- id="linearGradient43826"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,1,1444.9824,-215)"
- x1="689.47357"
- y1="427"
+ y2="427"
x2="685.47357"
- y2="427" />
+ y1="427"
+ x1="689.47357"
+ gradientTransform="matrix(-1,0,0,1,1444.9824,-215)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient43826"
+ xlink:href="#linearGradient44627"
+ inkscape:collect="always" />
<mask
- maskUnits="userSpaceOnUse"
- id="mask43822">
+ id="mask43822"
+ maskUnits="userSpaceOnUse">
<rect
- y="208"
- x="754"
- height="9"
- width="12"
+ style="opacity:0.93999993;fill:url(#linearGradient43826);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new"
id="rect43824"
- style="opacity:0.93999993;fill:url(#linearGradient43826);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" />
+ width="12"
+ height="9"
+ x="754"
+ y="208" />
</mask>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient43856"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.888889,0,0,1,61.53822,346.48241)"
- x1="246.89435"
- y1="-4.4418921"
+ y2="30.743095"
x2="277.68143"
- y2="30.743095" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient43858"
+ y1="-4.4418921"
+ x1="246.89435"
+ gradientTransform="matrix(0.888889,0,0,1,61.53822,346.48241)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(218.01612,129)"
- x1="87.03125"
- y1="241"
- x2="92.8125"
- y2="245.625" />
+ id="linearGradient43856"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient46780"
+ y2="245.625"
+ x2="92.8125"
+ y1="241"
+ x1="87.03125"
+ gradientTransform="translate(218.01612,129)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,1,140,-415)"
- x1="172.5625"
- y1="601.5"
- x2="159.13864"
- y2="585.28772" />
+ id="linearGradient43858"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient46782"
+ y2="585.28772"
+ x2="159.13864"
+ y1="601.5"
+ x1="172.5625"
+ gradientTransform="matrix(-1,0,0,1,140,-415)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,1,237.98388,150.25)"
- x1="249.64528"
- y1="1.5973248"
- x2="271.98389"
- y2="35.75" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient46780"
xlink:href="#linearGradient16500"
- id="linearGradient46784"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,1,140,-415)"
- x1="172.5625"
- y1="601.5"
- x2="159.13864"
- y2="585.28772" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient46786"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,1,237.98388,150.25)"
- x1="249.64528"
- y1="1.5973248"
+ y2="35.75"
x2="271.98389"
- y2="35.75" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient46818"
+ y1="1.5973248"
+ x1="249.64528"
+ gradientTransform="matrix(-1,0,0,1,237.98388,150.25)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,1,140,-415)"
- x1="172.5625"
- y1="601.5"
- x2="159.13864"
- y2="585.28772" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient46782"
xlink:href="#linearGradient37542"
- id="linearGradient46820"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,1,237.98388,150.25)"
- x1="249.64528"
- y1="1.5973248"
- x2="271.98389"
- y2="35.75" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient46822"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,1,140,-415)"
- x1="172.5625"
- y1="601.5"
+ y2="585.28772"
x2="159.13864"
- y2="585.28772" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient46824"
+ y1="601.5"
+ x1="172.5625"
+ gradientTransform="matrix(-1,0,0,1,140,-415)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,1,237.98388,150.25)"
- x1="249.64528"
- y1="1.5973248"
- x2="271.98389"
- y2="35.75" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient46784"
xlink:href="#linearGradient16500"
- id="linearGradient46990"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,1,140,-415)"
- x1="172.5625"
- y1="601.5"
- x2="159.13864"
- y2="585.28772" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient46992"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,1,237.98388,150.25)"
- x1="249.64528"
- y1="1.5973248"
+ y2="35.75"
x2="271.98389"
- y2="35.75" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient46994"
+ y1="1.5973248"
+ x1="249.64528"
+ gradientTransform="matrix(-1,0,0,1,237.98388,150.25)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,1,140,-415)"
- x1="172.5625"
- y1="601.5"
+ id="linearGradient46786"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="585.28772"
x2="159.13864"
- y2="585.28772" />
+ y1="601.5"
+ x1="172.5625"
+ gradientTransform="matrix(-1,0,0,1,140,-415)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient46818"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="35.75"
+ x2="271.98389"
+ y1="1.5973248"
+ x1="249.64528"
+ gradientTransform="matrix(-1,0,0,1,237.98388,150.25)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient46820"
xlink:href="#linearGradient37542"
- id="linearGradient46996"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="585.28772"
+ x2="159.13864"
+ y1="601.5"
+ x1="172.5625"
+ gradientTransform="matrix(-1,0,0,1,140,-415)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,1,237.98388,150.25)"
- x1="249.64528"
- y1="1.5973248"
+ id="linearGradient46822"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="35.75"
x2="271.98389"
- y2="35.75" />
+ y1="1.5973248"
+ x1="249.64528"
+ gradientTransform="matrix(-1,0,0,1,237.98388,150.25)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient46824"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="585.28772"
+ x2="159.13864"
+ y1="601.5"
+ x1="172.5625"
+ gradientTransform="matrix(-1,0,0,1,140,-415)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient46990"
xlink:href="#linearGradient16500"
- id="linearGradient46998"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="35.75"
+ x2="271.98389"
+ y1="1.5973248"
+ x1="249.64528"
+ gradientTransform="matrix(-1,0,0,1,237.98388,150.25)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,1,140,-415)"
- x1="172.5625"
- y1="601.5"
+ id="linearGradient46992"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="585.28772"
x2="159.13864"
- y2="585.28772" />
+ y1="601.5"
+ x1="172.5625"
+ gradientTransform="matrix(-1,0,0,1,140,-415)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient46994"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="35.75"
+ x2="271.98389"
+ y1="1.5973248"
+ x1="249.64528"
+ gradientTransform="matrix(-1,0,0,1,237.98388,150.25)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient46996"
xlink:href="#linearGradient37542"
- id="linearGradient47000"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="585.28772"
+ x2="159.13864"
+ y1="601.5"
+ x1="172.5625"
+ gradientTransform="matrix(-1,0,0,1,140,-415)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,1,237.98388,150.25)"
- x1="249.64528"
- y1="1.5973248"
+ id="linearGradient46998"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="35.75"
x2="271.98389"
- y2="35.75" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="radialGradient25048"
+ y1="1.5973248"
+ x1="249.64528"
+ gradientTransform="matrix(-1,0,0,1,237.98388,150.25)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.5274943,0,0,0.7696585,194.81546,86.715119)"
- cx="412.10059"
- cy="375.96332"
- fx="412.10059"
+ id="linearGradient47000"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
+ <radialGradient
+ r="4.4262571"
fy="375.96332"
- r="4.4262571" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient25108"
- id="linearGradient25106"
+ fx="412.10059"
+ cy="375.96332"
+ cx="412.10059"
+ gradientTransform="matrix(0.5274943,0,0,0.7696585,194.81546,86.715119)"
gradientUnits="userSpaceOnUse"
- x1="408.91928"
- y1="373.01221"
- x2="410.55432"
- y2="375.5058" />
+ id="radialGradient25048"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient25108"
- id="linearGradient25117"
+ y2="375.5058"
+ x2="410.55432"
+ y1="373.01221"
+ x1="408.91928"
gradientUnits="userSpaceOnUse"
- x1="411.05389"
- y1="375.39175"
- x2="407.62576"
- y2="370.21317" />
+ id="linearGradient25106"
+ xlink:href="#linearGradient25108"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient25449"
+ y2="370.21317"
+ x2="407.62576"
+ y1="375.39175"
+ x1="411.05389"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.707107,-0.707107,0.707107,0.707107,-346.7085,428.4841)"
- x1="352.98236"
- y1="314.11398"
- x2="353.72073"
- y2="297.92099" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient25117"
xlink:href="#linearGradient25108"
- id="linearGradient25451"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="297.92099"
+ x2="353.72073"
+ y1="314.11398"
+ x1="352.98236"
+ gradientTransform="matrix(0.707107,-0.707107,0.707107,0.707107,-346.7085,428.4841)"
gradientUnits="userSpaceOnUse"
- x1="436.54755"
- y1="524.30481"
- x2="434.49387"
- y2="519.46057" />
+ id="linearGradient25449"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient25108"
- id="linearGradient25453"
+ y2="519.46057"
+ x2="434.49387"
+ y1="524.30481"
+ x1="436.54755"
gradientUnits="userSpaceOnUse"
- x1="432.0849"
- y1="524.97125"
+ id="linearGradient25451"
+ xlink:href="#linearGradient25108"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="526"
x2="433"
- y2="526" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="radialGradient25457"
+ y1="524.97125"
+ x1="432.0849"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.5274943,0,0,0.7696585,194.81546,86.715119)"
- cx="410.73904"
- cy="370.11554"
- fx="410.73904"
+ id="linearGradient25453"
+ xlink:href="#linearGradient25108"
+ inkscape:collect="always" />
+ <radialGradient
+ r="4.4262571"
fy="370.11554"
- r="4.4262571" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient44939-8"
- id="linearGradient23543"
+ fx="410.73904"
+ cy="370.11554"
+ cx="410.73904"
+ gradientTransform="matrix(0.5274943,0,0,0.7696585,194.81546,86.715119)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,1,1,0,225,-182.99437)"
- x1="279.75"
- y1="101.5"
- x2="283"
- y2="105.5" />
+ id="radialGradient25457"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient44939-8"
- id="linearGradient23557"
- gradientUnits="userSpaceOnUse"
+ y2="105.5"
+ x2="283"
+ y1="101.5"
+ x1="279.75"
gradientTransform="matrix(0,1,1,0,225,-182.99437)"
- x1="279"
- y1="102"
- x2="281.75"
- y2="102" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient44939-8"
- id="linearGradient23559"
gradientUnits="userSpaceOnUse"
+ id="linearGradient23543"
+ xlink:href="#linearGradient44939-8"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="102"
+ x2="281.75"
+ y1="102"
+ x1="279"
gradientTransform="matrix(0,1,1,0,225,-182.99437)"
- x1="292.25"
- y1="106.5"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient23557"
+ xlink:href="#linearGradient44939-8"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="109.5"
x2="289.5"
- y2="109.5" />
+ y1="106.5"
+ x1="292.25"
+ gradientTransform="matrix(0,1,1,0,225,-182.99437)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient23559"
+ xlink:href="#linearGradient44939-8"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24343"
- id="linearGradient24341"
- x1="413.9498"
- y1="386.45807"
- x2="406.7699"
+ gradientUnits="userSpaceOnUse"
y2="374.42419"
- gradientUnits="userSpaceOnUse" />
- <linearGradient
- inkscape:collect="always"
+ x2="406.7699"
+ y1="386.45807"
+ x1="413.9498"
+ id="linearGradient24341"
xlink:href="#linearGradient24343"
- id="linearGradient24349"
- gradientUnits="userSpaceOnUse"
- x1="403.9577"
- y1="367.62839"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="374.07153"
x2="413.98795"
- y2="374.07153" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient21327-6"
- id="radialGradient24354"
+ y1="367.62839"
+ x1="403.9577"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.6402148,-1.1088846,0.8413297,0.4857498,104.42892,800.46622)"
- cx="409.55594"
- cy="52.367992"
- fx="409.55594"
+ id="linearGradient24349"
+ xlink:href="#linearGradient24343"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.8798895"
fy="52.367992"
- r="3.8798895" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient34157"
- id="linearGradient24511"
+ fx="409.55594"
+ cy="52.367992"
+ cx="409.55594"
+ gradientTransform="matrix(0.6402148,-1.1088846,0.8413297,0.4857498,104.42892,800.46622)"
gradientUnits="userSpaceOnUse"
- x1="270.66064"
- y1="68.113258"
- x2="257.38638"
- y2="81.382545" />
+ id="radialGradient24354"
+ xlink:href="#linearGradient21327-6"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient24513"
+ y2="81.382545"
+ x2="257.38638"
+ y1="68.113258"
+ x1="270.66064"
gradientUnits="userSpaceOnUse"
- x1="256.90005"
- y1="80.100891"
+ id="linearGradient24511"
+ xlink:href="#linearGradient34157"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="74.562462"
x2="262.43726"
- y2="74.562462" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient29149"
- id="radialGradient24515"
+ y1="80.100891"
+ x1="256.90005"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
- cx="75.217888"
- cy="500.66806"
- fx="75.217888"
- fy="500.66806"
- r="3.1650217" />
+ id="linearGradient24513"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient18821"
- id="radialGradient24517"
- gradientUnits="userSpaceOnUse"
+ r="3.1650217"
+ fy="500.66806"
+ fx="75.217888"
+ cy="500.66806"
+ cx="75.217888"
gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
- cx="75.554794"
- cy="500.26215"
- fx="75.554794"
- fy="500.26215"
- r="3.1650217" />
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient24515"
+ xlink:href="#linearGradient29149"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="radialGradient24519"
+ r="3.1650217"
+ fy="500.26215"
+ fx="75.554794"
+ cy="500.26215"
+ cx="75.554794"
+ gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.6691529,0,4.3047361e-8,0.6954014,84.50351,24.951375)"
- cx="259.02887"
- cy="77.962585"
- fx="259.02887"
- fy="77.962585"
- r="3.5" />
+ id="radialGradient24517"
+ xlink:href="#linearGradient18821"
+ inkscape:collect="always" />
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="radialGradient24523"
+ r="3.5"
+ fy="77.962585"
+ fx="259.02887"
+ cy="77.962585"
+ cx="259.02887"
+ gradientTransform="matrix(0.6691529,0,4.3047361e-8,0.6954014,84.50351,24.951375)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.3879142,0,8.9286134e-8,1.4423572,-101.87942,-32.970267)"
- cx="259.55096"
- cy="77.188034"
- fx="259.55096"
+ id="radialGradient24519"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.5"
fy="77.188034"
- r="3.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient30321"
+ fx="259.55096"
+ cy="77.188034"
+ cx="259.55096"
+ gradientTransform="matrix(1.3879142,0,8.9286134e-8,1.4423572,-101.87942,-32.970267)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(2.4126967,0,0,2.7035619,-536.07088,379.29465)"
- x1="240.70209"
- y1="-9.4293213"
- x2="276.89801"
- y2="31.515814" />
+ id="radialGradient24523"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5060"
- id="linearGradient30323"
+ y2="31.515814"
+ x2="276.89801"
+ y1="-9.4293213"
+ x1="240.70209"
+ gradientTransform="matrix(2.4126967,0,0,2.7035619,-536.07088,379.29465)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-47.00001,58.00194)"
- x1="160.14388"
- y1="376.27383"
- x2="174.29811"
- y2="383.69843" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient30321"
xlink:href="#linearGradient1610"
- id="linearGradient30368"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(2.4126967,0,0,2.7035619,-536.07088,379.29465)"
- x1="236.94902"
- y1="-14.103641"
- x2="276.89801"
- y2="31.515814" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="383.69843"
+ x2="174.29811"
+ y1="376.27383"
+ x1="160.14388"
+ gradientTransform="translate(-47.00001,58.00194)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient30323"
xlink:href="#linearGradient5060"
- id="linearGradient30370"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="31.515814"
+ x2="276.89801"
+ y1="-14.103641"
+ x1="236.94902"
+ gradientTransform="matrix(2.4126967,0,0,2.7035619,-536.07088,379.29465)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-47.00001,58.00194)"
- x1="160.14388"
- y1="376.27383"
- x2="174.29811"
- y2="383.69843" />
+ id="linearGradient30368"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient30208"
- id="linearGradient25056"
+ y2="383.69843"
+ x2="174.29811"
+ y1="376.27383"
+ x1="160.14388"
+ gradientTransform="translate(-47.00001,58.00194)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-1297,-948)"
- x1="1663.8125"
- y1="722"
+ id="linearGradient30370"
+ xlink:href="#linearGradient5060"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="726.37006"
x2="1661.8125"
- y2="726.37006" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient19425"
- id="radialGradient25058"
+ y1="722"
+ x1="1663.8125"
+ gradientTransform="translate(-1297,-948)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.1378252,-0.2988982,2.5269117,1.1651875,-1689.2674,-563.64056)"
- cx="1662.2664"
- cy="722.19189"
- fx="1662.2664"
+ id="linearGradient25056"
+ xlink:href="#linearGradient30208"
+ inkscape:collect="always" />
+ <radialGradient
+ r="5.5"
fy="722.19189"
- r="5.5" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient25060"
+ fx="1662.2664"
+ cy="722.19189"
+ cx="1662.2664"
+ gradientTransform="matrix(0.1378252,-0.2988982,2.5269117,1.1651875,-1689.2674,-563.64056)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.8167109,0,0,0.8433415,-1256.7473,-918.72044)"
- x1="1984.3658"
- y1="827.77124"
- x2="1979.2772"
- y2="827.32849" />
+ id="radialGradient25058"
+ xlink:href="#linearGradient19425"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient29407"
+ y2="827.32849"
+ x2="1979.2772"
+ y1="827.77124"
+ x1="1984.3658"
+ gradientTransform="matrix(0.8167109,0,0,0.8433415,-1256.7473,-918.72044)"
gradientUnits="userSpaceOnUse"
- x1="98.858559"
- y1="80.045052"
- x2="135.00615"
- y2="122.92735" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient25060"
xlink:href="#linearGradient319"
- id="linearGradient29409"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="122.92735"
+ x2="135.00615"
+ y1="80.045052"
+ x1="98.858559"
gradientUnits="userSpaceOnUse"
- x1="130.75166"
- y1="245.03757"
- x2="129.24866"
- y2="243.31177" />
+ id="linearGradient29407"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient29411"
+ y2="243.31177"
+ x2="129.24866"
+ y1="245.03757"
+ x1="130.75166"
gradientUnits="userSpaceOnUse"
- x1="126.37006"
- y1="112.31642"
- x2="144.22272"
- y2="129.82761" />
+ id="linearGradient29409"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030"
- id="linearGradient29413"
+ y2="129.82761"
+ x2="144.22272"
+ y1="112.31642"
+ x1="126.37006"
gradientUnits="userSpaceOnUse"
- x1="190.68166"
- y1="244.14676"
+ id="linearGradient29411"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="226.33672"
x2="174.75458"
- y2="226.33672" />
+ y1="244.14676"
+ x1="190.68166"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient29413"
+ xlink:href="#linearGradient9030"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient44939-8-7-1-7">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop44941-8-4-5-4"
offset="0"
- id="stop44941-8-4-5-4" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop44943-2-0-2-0"
offset="1"
- id="stop44943-2-0-2-0" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542-7"
- id="linearGradient37396-1"
- gradientUnits="userSpaceOnUse"
- x1="389.73953"
- y1="220.84622"
- x2="389.59052"
+ gradientTransform="matrix(-1,0,0,1,780.92531,0)"
y2="248.09296"
- gradientTransform="matrix(-1,0,0,1,780.92531,0)" />
+ x2="389.59052"
+ y1="220.84622"
+ x1="389.73953"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient37396-1"
+ xlink:href="#linearGradient37542-7"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient37542-7">
<stop
- id="stop37544-40"
+ style="stop-color:#000000;stop-opacity:1;"
offset="0"
- style="stop-color:#000000;stop-opacity:1;" />
+ id="stop37544-40" />
<stop
- id="stop37546-94"
+ style="stop-color:#ffffff;stop-opacity:1;"
offset="1"
- style="stop-color:#ffffff;stop-opacity:1;" />
+ id="stop37546-94" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542-5"
- id="linearGradient15742-5"
- gradientUnits="userSpaceOnUse"
- x1="392.0101"
- y1="222.99998"
- x2="392.0101"
+ gradientTransform="matrix(0,1,-1,0,634.98585,-146.00607)"
y2="247.99998"
- gradientTransform="matrix(0,1,-1,0,634.98585,-146.00607)" />
+ x2="392.0101"
+ y1="222.99998"
+ x1="392.0101"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient15742-5"
+ xlink:href="#linearGradient37542-5"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient37542-5">
<stop
- id="stop37544-1"
+ style="stop-color:#000000;stop-opacity:1;"
offset="0"
- style="stop-color:#000000;stop-opacity:1;" />
+ id="stop37544-1" />
<stop
- id="stop37546-71"
+ style="stop-color:#ffffff;stop-opacity:1;"
offset="1"
- style="stop-color:#ffffff;stop-opacity:1;" />
+ id="stop37546-71" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient27854"
- id="linearGradient27860"
- x1="392.02036"
- y1="241.13428"
- x2="386.30408"
+ gradientUnits="userSpaceOnUse"
y2="241.31801"
- gradientUnits="userSpaceOnUse" />
+ x2="386.30408"
+ y1="241.13428"
+ x1="392.02036"
+ id="linearGradient27860"
+ xlink:href="#linearGradient27854"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient27872"
- gradientUnits="userSpaceOnUse"
- x1="392.0101"
- y1="224.99998"
- x2="392.0101"
+ gradientTransform="matrix(-1,0,0,1,782.02022,0)"
y2="249.99998"
- gradientTransform="matrix(-1,0,0,1,782.02022,0)" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient27854"
- id="linearGradient27874"
+ x2="392.0101"
+ y1="224.99998"
+ x1="392.0101"
gradientUnits="userSpaceOnUse"
- x1="390.87131"
- y1="241.13428"
- x2="386.74603"
- y2="242.46706"
- gradientTransform="matrix(-1,0,0,1,782.02022,0)" />
+ id="linearGradient27872"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542-5"
- id="linearGradient27886"
+ gradientTransform="matrix(-1,0,0,1,782.02022,0)"
+ y2="242.46706"
+ x2="386.74603"
+ y1="241.13428"
+ x1="390.87131"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,1,1,0,146.99795,-188.00607)"
- x1="392.0101"
- y1="222.99998"
+ id="linearGradient27874"
+ xlink:href="#linearGradient27854"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="247.99998"
x2="392.0101"
- y2="247.99998" />
+ y1="222.99998"
+ x1="392.0101"
+ gradientTransform="matrix(0,1,1,0,146.99795,-188.00607)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient27886"
+ xlink:href="#linearGradient37542-5"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient27896"
- id="linearGradient27902"
- x1="388.70071"
- y1="244.85669"
- x2="391.17557"
+ gradientUnits="userSpaceOnUse"
y2="249.54126"
- gradientUnits="userSpaceOnUse" />
+ x2="391.17557"
+ y1="244.85669"
+ x1="388.70071"
+ id="linearGradient27902"
+ xlink:href="#linearGradient27896"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient10069-9-71">
<stop
- style="stop-color:#000000;stop-opacity:1;"
+ id="stop10071-5-1"
offset="0"
- id="stop10071-5-1" />
+ style="stop-color:#000000;stop-opacity:1;" />
<stop
- style="stop-color:#000000;stop-opacity:0;"
+ id="stop10073-43-5"
offset="1"
- id="stop10073-43-5" />
+ style="stop-color:#000000;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient23974-2">
<stop
- id="stop23976-2"
+ style="stop-color:#2561b7;stop-opacity:1;"
offset="0"
- style="stop-color:#2561b7;stop-opacity:1;" />
+ id="stop23976-2" />
<stop
- id="stop23978-1"
+ style="stop-color:#f9fbff;stop-opacity:1"
offset="1"
- style="stop-color:#f9fbff;stop-opacity:1" />
+ id="stop23978-1" />
</linearGradient>
<clipPath
- clipPathUnits="userSpaceOnUse"
- id="clipPath28964">
+ id="clipPath28964"
+ clipPathUnits="userSpaceOnUse">
<path
- inkscape:export-ydpi="90"
- inkscape:export-xdpi="90"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\4.png"
- sodipodi:nodetypes="ccccc"
- style="fill:url(#linearGradient28968);fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline;enable-background:new"
- d="m 117.50984,228.63415 0,-15.01646 11.71735,5.49383 0,15.38271 -11.71735,-5.86008 z"
+ inkscape:connector-curvature="0"
id="path28966"
- inkscape:connector-curvature="0" />
+ d="m 117.50984,228.63415 0,-15.01646 11.71735,5.49383 0,15.38271 -11.71735,-5.86008 z"
+ style="fill:url(#linearGradient28968);fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline;enable-background:new"
+ sodipodi:nodetypes="ccccc"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\4.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
</clipPath>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974-2"
- id="linearGradient28968"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.4646688,0,0,1.4650206,168.77325,-157.03253)"
- x1="-38.103703"
- y1="266.11719"
+ y2="253.23859"
x2="-20.826464"
- y2="253.23859" />
+ y1="266.11719"
+ x1="-38.103703"
+ gradientTransform="matrix(1.4646688,0,0,1.4650206,168.77325,-157.03253)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient28968"
+ xlink:href="#linearGradient23974-2"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient319-5">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop320-761"
offset="0"
- id="stop320-761" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop321-8"
offset="1"
- id="stop321-8" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542-7"
- id="linearGradient29424"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.4646688,0,0,1.4650206,168.77325,-157.03253)"
- x1="-26.511335"
- y1="257.99881"
+ y2="259.87677"
x2="-30.075666"
- y2="259.87677" />
+ y1="257.99881"
+ x1="-26.511335"
+ gradientTransform="matrix(1.4646688,0,0,1.4650206,168.77325,-157.03253)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient29424"
+ xlink:href="#linearGradient37542-7"
+ inkscape:collect="always" />
<mask
- maskUnits="userSpaceOnUse"
- id="mask29419">
+ id="mask29419"
+ maskUnits="userSpaceOnUse">
<path
- id="path29422"
- d="m 117.50984,229.00041 0,-15.38272 11.71735,5.49383 0,15.74897 -11.71735,-5.86008 z"
- style="opacity:0.5;fill:url(#linearGradient29424);fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline;enable-background:new"
- sodipodi:nodetypes="ccccc"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\4.png"
- inkscape:export-xdpi="90"
+ inkscape:connector-curvature="0"
inkscape:export-ydpi="90"
- inkscape:connector-curvature="0" />
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\4.png"
+ sodipodi:nodetypes="ccccc"
+ style="opacity:0.5;fill:url(#linearGradient29424);fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline;enable-background:new"
+ d="m 117.50984,229.00041 0,-15.38272 11.71735,5.49383 0,15.74897 -11.71735,-5.86008 z"
+ id="path29422" />
</mask>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient23974"
- id="linearGradient29988"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,10)"
- x1="-35.153767"
- y1="271.58572"
+ y2="252.03563"
x2="-23.636715"
- y2="252.03563" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319-5"
- id="linearGradient29990"
+ y1="271.58572"
+ x1="-35.153767"
+ gradientTransform="translate(0,10)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-113.93222,176.71918)"
- x1="446.93222"
- y1="105.28082"
- x2="441.93222"
- y2="120.28082" />
+ id="linearGradient29988"
+ xlink:href="#linearGradient23974"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069-9-71"
- id="linearGradient29994"
+ y2="120.28082"
+ x2="441.93222"
+ y1="105.28082"
+ x1="446.93222"
+ gradientTransform="translate(-113.93222,176.71918)"
gradientUnits="userSpaceOnUse"
- x1="123.80045"
- y1="111.03492"
- x2="131.72171"
- y2="118.18078" />
+ id="linearGradient29990"
+ xlink:href="#linearGradient319-5"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient21327-6-8"
- id="linearGradient29773-5"
+ y2="118.18078"
+ x2="131.72171"
+ y1="111.03492"
+ x1="123.80045"
gradientUnits="userSpaceOnUse"
- x1="124.78239"
- y1="111.13178"
+ id="linearGradient29994"
+ xlink:href="#linearGradient10069-9-71"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="118.98331"
x2="132.99687"
- y2="118.98331" />
+ y1="111.13178"
+ x1="124.78239"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient29773-5"
+ xlink:href="#linearGradient21327-6-8"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient21327-6-8">
<stop
- style="stop-color:#1e3e70;stop-opacity:1;"
+ id="stop21329-3-4"
offset="0"
- id="stop21329-3-4" />
+ style="stop-color:#1e3e70;stop-opacity:1;" />
<stop
- style="stop-color:#1e3e70;stop-opacity:0;"
+ id="stop21331-4-0"
offset="1"
- id="stop21331-4-0" />
+ style="stop-color:#1e3e70;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient28526">
<stop
- id="stop28528"
+ style="stop-color:#2561b7;stop-opacity:1;"
offset="0"
- style="stop-color:#2561b7;stop-opacity:1;" />
+ id="stop28528" />
<stop
- id="stop28530"
+ style="stop-color:#f9fbff;stop-opacity:1"
offset="1"
- style="stop-color:#f9fbff;stop-opacity:1" />
+ id="stop28530" />
</linearGradient>
<linearGradient
id="linearGradient319-62">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop320-90"
offset="0"
- id="stop320-90" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop321-4"
offset="1"
- id="stop321-4" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient1610-52-2">
<stop
- style="stop-color:black;stop-opacity:1;"
+ id="stop1611-32-8"
offset="0"
- id="stop1611-32-8" />
+ style="stop-color:black;stop-opacity:1;" />
<stop
- style="stop-color:white;stop-opacity:1;"
+ id="stop1612-46-8"
offset="1"
- id="stop1612-46-8" />
+ style="stop-color:white;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient319-62-8">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop320-90-6"
offset="0"
- id="stop320-90-6" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop321-4-0"
offset="1"
- id="stop321-4-0" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient29334"
- gradientUnits="userSpaceOnUse"
- x1="121.74819"
- y1="104.14172"
+ y2="126.89457"
x2="140.18503"
- y2="126.89457" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069"
- id="linearGradient29336"
+ y1="104.14172"
+ x1="121.74819"
gradientUnits="userSpaceOnUse"
- x1="155.10138"
- y1="91.071259"
- x2="122.40444"
- y2="127.60542" />
+ id="linearGradient29334"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient24000"
- id="linearGradient29338"
+ y2="127.60542"
+ x2="122.40444"
+ y1="91.071259"
+ x1="155.10138"
gradientUnits="userSpaceOnUse"
- x1="124.66362"
- y1="126.19594"
- x2="132"
- y2="118" />
+ id="linearGradient29336"
+ xlink:href="#linearGradient10069"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient29340"
+ y2="118"
+ x2="132"
+ y1="126.19594"
+ x1="124.66362"
gradientUnits="userSpaceOnUse"
- x1="124.28249"
- y1="126.88889"
- x2="133.53401"
- y2="116.55647" />
+ id="linearGradient29338"
+ xlink:href="#linearGradient24000"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient29342"
+ y2="116.55647"
+ x2="133.53401"
+ y1="126.88889"
+ x1="124.28249"
gradientUnits="userSpaceOnUse"
- x1="147.25899"
- y1="101.45953"
- x2="130.82327"
- y2="119.554" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient29340"
xlink:href="#linearGradient319"
- id="linearGradient28574"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-1,-1,0,449.99999,1678)"
- x1="1138.1963"
- y1="287.70486"
- x2="1146.6705"
- y2="288.5" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient28577"
+ y2="119.554"
+ x2="130.82327"
+ y1="101.45953"
+ x1="147.25899"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-1,-1,0,558.99999,1286)"
- x1="757.2467"
- y1="367.52411"
- x2="740.30865"
- y2="405.3895" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient29342"
xlink:href="#linearGradient319"
- id="linearGradient28580"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="288.5"
+ x2="1146.6705"
+ y1="287.70486"
+ x1="1138.1963"
+ gradientTransform="matrix(0,-1,-1,0,449.99999,1678)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-1,-1,0,558.99999,1288)"
- x1="745.48267"
- y1="396.45972"
- x2="737.62225"
- y2="401.90442" />
+ id="linearGradient28574"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500"
- id="linearGradient28583"
+ y2="405.3895"
+ x2="740.30865"
+ y1="367.52411"
+ x1="757.2467"
+ gradientTransform="matrix(0,-1,-1,0,558.99999,1286)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-1,1,0,-239.00001,1286)"
- x1="743"
- y1="402"
- x2="752"
- y2="400" />
+ id="linearGradient28577"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient38845"
- id="linearGradient28589"
+ y2="401.90442"
+ x2="737.62225"
+ y1="396.45972"
+ x1="745.48267"
+ gradientTransform="matrix(0,-1,-1,0,558.99999,1288)"
gradientUnits="userSpaceOnUse"
- x1="162.41054"
- y1="413.87982"
- x2="161.83331"
- y2="406.47784"
- gradientTransform="matrix(0,1,-1,0,574.99991,384.00001)" />
+ id="linearGradient28580"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient38831"
- id="linearGradient28593"
+ y2="400"
+ x2="752"
+ y1="402"
+ x1="743"
+ gradientTransform="matrix(0,-1,1,0,-239.00001,1286)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-1,-1,0,558.99999,1288)"
- x1="743.87036"
- y1="396.04428"
- x2="744.1059"
- y2="423.54419" />
+ id="linearGradient28583"
+ xlink:href="#linearGradient16500"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient28600"
+ gradientTransform="matrix(0,1,-1,0,574.99991,384.00001)"
+ y2="406.47784"
+ x2="161.83331"
+ y1="413.87982"
+ x1="162.41054"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,1,-1,0,719.99999,383.00001)"
- x1="148.56801"
- y1="544.21143"
- x2="163.11441"
- y2="569.18829" />
+ id="linearGradient28589"
+ xlink:href="#linearGradient38845"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="423.54419"
+ x2="744.1059"
+ y1="396.04428"
+ x1="743.87036"
+ gradientTransform="matrix(0,-1,-1,0,558.99999,1288)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient28593"
xlink:href="#linearGradient38831"
- id="linearGradient28603"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="569.18829"
+ x2="163.11441"
+ y1="544.21143"
+ x1="148.56801"
+ gradientTransform="matrix(0,1,-1,0,719.99999,383.00001)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-1,-1,0,449.99999,1678)"
- x1="1141.2856"
- y1="288.19919"
+ id="linearGradient28600"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="291.35333"
x2="1146.2682"
- y2="291.35333" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610-52-2"
- id="radialGradient29805"
+ y1="288.19919"
+ x1="1141.2856"
+ gradientTransform="matrix(0,-1,-1,0,449.99999,1678)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.94105289,0.01178942,-0.01073736,0.8570756,238.4669,249.70522)"
- cx="-30.028414"
- cy="19.425121"
- fx="-30.028414"
+ id="linearGradient28603"
+ xlink:href="#linearGradient38831"
+ inkscape:collect="always" />
+ <radialGradient
+ r="7"
fy="19.425121"
- r="7" />
+ fx="-30.028414"
+ cy="19.425121"
+ cx="-30.028414"
+ gradientTransform="matrix(0.94105289,0.01178942,-0.01073736,0.8570756,238.4669,249.70522)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient29805"
+ xlink:href="#linearGradient1610-52-2"
+ inkscape:collect="always" />
<mask
- maskUnits="userSpaceOnUse"
- id="mask29801">
+ id="mask29801"
+ maskUnits="userSpaceOnUse">
<rect
- style="opacity:0.35;color:#000000;fill:url(#radialGradient29805);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.71217775;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new"
- id="rect29803"
- width="15"
- height="16"
+ y="257"
x="204"
- y="257" />
+ height="16"
+ width="15"
+ id="rect29803"
+ style="opacity:0.35;color:#000000;fill:url(#radialGradient29805);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.71217775;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" />
</mask>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542-7"
- id="linearGradient29884"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1,0,0,1,780.92531,0)"
- x1="389.73953"
- y1="220.84622"
+ y2="248.09296"
x2="389.59052"
- y2="248.09296" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient29886"
+ y1="220.84622"
+ x1="389.73953"
+ gradientTransform="matrix(-1,0,0,1,780.92531,0)"
gradientUnits="userSpaceOnUse"
- x1="391.62881"
- y1="243.48854"
+ id="linearGradient29884"
+ xlink:href="#linearGradient37542-7"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="244.68996"
x2="386.13718"
- y2="244.68996" />
+ y1="243.48854"
+ x1="391.62881"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient29886"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<clipPath
- clipPathUnits="userSpaceOnUse"
- id="clipPath50172-0">
+ id="clipPath50172-0"
+ clipPathUnits="userSpaceOnUse">
<path
- id="path50174-8"
- d="m -177.34375,498 a 1.001098,1.001098 0 1 0 0.0937,2 l 3.65625,0 -4.25,5.9375 a 1.0001,1.0001 0 0 0 -0.1875,0.59375 l 0,0.5 a 1.0001,1.0001 0 0 0 1,1 L -171.75,508 a 1.0001,1.0001 0 1 0 0,-2 l -3.6875,0.0312 4.25,-5.9375 A 1.0001,1.0001 0 0 0 -171,499.5 l 0,-0.5 a 1.0001,1.0001 0 0 0 -1,-1 l -5.25,0 a 1.0001,1.0001 0 0 0 -0.0937,0 z"
+ inkscape:connector-curvature="0"
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;color:#000000;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
- inkscape:connector-curvature="0" />
+ d="m -177.34375,498 a 1.001098,1.001098 0 1 0 0.0937,2 l 3.65625,0 -4.25,5.9375 a 1.0001,1.0001 0 0 0 -0.1875,0.59375 l 0,0.5 a 1.0001,1.0001 0 0 0 1,1 L -171.75,508 a 1.0001,1.0001 0 1 0 0,-2 l -3.6875,0.0312 4.25,-5.9375 A 1.0001,1.0001 0 0 0 -171,499.5 l 0,-0.5 a 1.0001,1.0001 0 0 0 -1,-1 l -5.25,0 a 1.0001,1.0001 0 0 0 -0.0937,0 z"
+ id="path50174-8" />
</clipPath>
<radialGradient
- id="radialGradient16142-7"
- cx="20.892099"
- cy="64.567902"
- r="5.257"
- fx="20.892099"
+ gradientUnits="userSpaceOnUse"
fy="64.567902"
- gradientUnits="userSpaceOnUse">
+ fx="20.892099"
+ r="5.257"
+ cy="64.567902"
+ cx="20.892099"
+ id="radialGradient16142-7">
<stop
- offset="0"
+ id="stop16144-4"
style="stop-color:#F0F0F0"
- id="stop16144-4" />
+ offset="0" />
<stop
- offset="1"
+ id="stop16146-0"
style="stop-color:#474747"
- id="stop16146-0" />
+ offset="1" />
</radialGradient>
<linearGradient
id="linearGradient37542-78">
<stop
- id="stop37544-2"
+ style="stop-color:#000000;stop-opacity:1;"
offset="0"
- style="stop-color:#000000;stop-opacity:1;" />
+ id="stop37544-2" />
<stop
- id="stop37546-78"
+ style="stop-color:#ffffff;stop-opacity:1;"
offset="1"
- style="stop-color:#ffffff;stop-opacity:1;" />
+ id="stop37546-78" />
</linearGradient>
<linearGradient
id="linearGradient9030-2">
<stop
- style="stop-color:white;stop-opacity:1;"
+ id="stop9032-0"
offset="0"
- id="stop9032-0" />
+ style="stop-color:white;stop-opacity:1;" />
<stop
- style="stop-color:white;stop-opacity:0;"
+ id="stop9034-89"
offset="1"
- id="stop9034-89" />
+ style="stop-color:white;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient37542-04-82">
<stop
- id="stop37544-9-0"
+ style="stop-color:#000000;stop-opacity:1;"
offset="0"
- style="stop-color:#000000;stop-opacity:1;" />
+ id="stop37544-9-0" />
<stop
- id="stop37546-4-5"
+ style="stop-color:#ffffff;stop-opacity:1;"
offset="1"
- style="stop-color:#ffffff;stop-opacity:1;" />
+ id="stop37546-4-5" />
</linearGradient>
<linearGradient
id="linearGradient9030-38-2">
<stop
- style="stop-color:white;stop-opacity:1;"
+ id="stop9032-6-7"
offset="0"
- id="stop9032-6-7" />
+ style="stop-color:white;stop-opacity:1;" />
<stop
- style="stop-color:white;stop-opacity:0;"
+ id="stop9034-9-6"
offset="1"
- id="stop9034-9-6" />
+ style="stop-color:white;stop-opacity:0;" />
</linearGradient>
<linearGradient
- id="linearGradient30766-8"
- inkscape:collect="always">
+ inkscape:collect="always"
+ id="linearGradient30766-8">
<stop
- id="stop30768-7"
+ style="stop-color:#be0000;stop-opacity:1"
offset="0"
- style="stop-color:#be0000;stop-opacity:1" />
+ id="stop30768-7" />
<stop
- id="stop30770-8"
+ style="stop-color:#ff5108;stop-opacity:1"
offset="1"
- style="stop-color:#ff5108;stop-opacity:1" />
+ id="stop30770-8" />
</linearGradient>
<linearGradient
id="linearGradient30752-0">
<stop
- style="stop-color:#0c1b63;stop-opacity:1;"
+ id="stop30754-9"
offset="0"
- id="stop30754-9" />
+ style="stop-color:#0c1b63;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:1"
+ id="stop30756-5"
offset="1"
- id="stop30756-5" />
+ style="stop-color:#ffffff;stop-opacity:1" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient32140"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-64,-10)"
- x1="18.773417"
- y1="6.2494373"
+ y2="17.82831"
x2="6.9718256"
- y2="17.82831" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient32142"
+ y1="6.2494373"
+ x1="18.773417"
+ gradientTransform="translate(-64,-10)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-0.701513,0.712657,0.712657,0.701513,50.5916,-449.6745)"
- x1="385.62408"
- y1="244.3396"
- x2="401.63013"
- y2="244.38875" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient32140"
xlink:href="#linearGradient319"
- id="linearGradient32144"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-65.00001,-10.749995)"
- x1="61.032951"
- y1="5.9830923"
- x2="46.491322"
- y2="20.147326" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient32146"
+ y2="244.38875"
+ x2="401.63013"
+ y1="244.3396"
+ x1="385.62408"
+ gradientTransform="matrix(-0.701513,0.712657,0.712657,0.701513,50.5916,-449.6745)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.199998,0,0,1.199999,-74.19988,-12.499988)"
- x1="59.02124"
- y1="6.0129876"
- x2="44.509518"
- y2="20.110929" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient32142"
xlink:href="#linearGradient319"
- id="linearGradient32148"
- gradientUnits="userSpaceOnUse"
- x1="47.348152"
- y1="-25.553123"
- x2="53.567928"
- y2="-31.095215" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#radialGradient16142-7"
- id="linearGradient31946"
+ y2="20.147326"
+ x2="46.491322"
+ y1="5.9830923"
+ x1="61.032951"
+ gradientTransform="translate(-65.00001,-10.749995)"
gradientUnits="userSpaceOnUse"
- x1="-176.1799"
- y1="508.33572"
- x2="-193.07495"
- y2="482.27924" />
+ id="linearGradient32144"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#radialGradient16142"
- id="linearGradient31948"
+ y2="20.110929"
+ x2="44.509518"
+ y1="6.0129876"
+ x1="59.02124"
+ gradientTransform="matrix(1.199998,0,0,1.199999,-74.19988,-12.499988)"
gradientUnits="userSpaceOnUse"
- x1="-178.00789"
- y1="505.36523"
- x2="-194.90294"
- y2="479.30875" />
+ id="linearGradient32146"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542-78"
- id="linearGradient31950"
+ y2="-31.095215"
+ x2="53.567928"
+ y1="-25.553123"
+ x1="47.348152"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.043478,0,0,0.956667,-7.152175,20.92167)"
- x1="155.37498"
- y1="230.51552"
- x2="181.25543"
- y2="269.24564" />
+ id="linearGradient32148"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030-2"
- id="linearGradient31952"
+ y2="482.27924"
+ x2="-193.07495"
+ y1="508.33572"
+ x1="-176.1799"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(81.000002,13.499998)"
- x1="87.765625"
- y1="242.39062"
- x2="96"
- y2="251.40294" />
+ id="linearGradient31946"
+ xlink:href="#radialGradient16142-7"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542-04-82"
- id="linearGradient31954"
+ y2="479.30875"
+ x2="-194.90294"
+ y1="505.36523"
+ x1="-178.00789"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.043478,0,0,0.956667,-354.13606,119.42158)"
- x1="148.47061"
- y1="217.28368"
- x2="171.77303"
- y2="250.87756" />
+ id="linearGradient31948"
+ xlink:href="#radialGradient16142"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030-38-2"
- id="linearGradient31956"
+ y2="269.24564"
+ x2="181.25543"
+ y1="230.51552"
+ x1="155.37498"
+ gradientTransform="matrix(1.043478,0,0,0.956667,-7.152175,20.92167)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(81.000002,13.499998)"
- x1="-259.99872"
- y1="340.81195"
- x2="-253.90541"
- y2="345.10736" />
+ id="linearGradient31950"
+ xlink:href="#linearGradient37542-78"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient30766-8"
- id="linearGradient31958"
+ y2="251.40294"
+ x2="96"
+ y1="242.39062"
+ x1="87.765625"
+ gradientTransform="translate(81.000002,13.499998)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.0017964,0,0,0.99629977,-0.31613165,0.94171311)"
- x1="167.51979"
- y1="252.44223"
- x2="170.78137"
- y2="261.69635" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient31952"
xlink:href="#linearGradient9030-2"
- id="linearGradient31960"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(81.000002,13.499998)"
- x1="87.473038"
- y1="238.21507"
- x2="89.889603"
- y2="243.80345" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient30752-0"
- id="linearGradient31962"
+ y2="250.87756"
+ x2="171.77303"
+ y1="217.28368"
+ x1="148.47061"
+ gradientTransform="matrix(1.043478,0,0,0.956667,-354.13606,119.42158)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,10)"
- x1="168.53265"
- y1="244.52007"
- x2="168.53265"
- y2="239.5473" />
+ id="linearGradient31954"
+ xlink:href="#linearGradient37542-04-82"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient31964"
+ y2="345.10736"
+ x2="-253.90541"
+ y1="340.81195"
+ x1="-259.99872"
+ gradientTransform="translate(81.000002,13.499998)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-237.5,45.5045)"
- x1="263.35254"
- y1="19.495501"
- x2="275.43362"
- y2="28.583914" />
+ id="linearGradient31956"
+ xlink:href="#linearGradient9030-38-2"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient31966"
+ y2="261.69635"
+ x2="170.78137"
+ y1="252.44223"
+ x1="167.51979"
+ gradientTransform="matrix(1.0017964,0,0,0.99629977,-0.31613165,0.94171311)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-238,44.0045)"
- x1="271.69839"
- y1="22.713789"
- x2="283.37738"
- y2="36.874088" />
+ id="linearGradient31958"
+ xlink:href="#linearGradient30766-8"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient31968"
+ y2="243.80345"
+ x2="89.889603"
+ y1="238.21507"
+ x1="87.473038"
+ gradientTransform="translate(81.000002,13.499998)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-243.5,51.5045)"
- x1="260.25369"
- y1="11.017987"
- x2="275.43362"
- y2="28.583914" />
+ id="linearGradient31960"
+ xlink:href="#linearGradient9030-2"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542"
- id="linearGradient31970"
+ y2="239.5473"
+ x2="168.53265"
+ y1="244.52007"
+ x1="168.53265"
+ gradientTransform="translate(0,10)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-244,50.0045)"
- x1="271.69839"
- y1="22.713789"
- x2="283.37738"
- y2="36.874088" />
+ id="linearGradient31962"
+ xlink:href="#linearGradient30752-0"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient31972"
+ y2="28.583914"
+ x2="275.43362"
+ y1="19.495501"
+ x1="263.35254"
+ gradientTransform="translate(-237.5,45.5045)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-57.00003,-165.99191)"
- x1="85.853188"
- y1="239.5473"
- x2="90.563423"
- y2="242.99191" />
+ id="linearGradient31964"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient31974"
+ y2="36.874088"
+ x2="283.37738"
+ y1="22.713789"
+ x1="271.69839"
+ gradientTransform="translate(-238,44.0045)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-51,-172)"
- x1="88"
- y1="240.90625"
- x2="92.8125"
- y2="245.625" />
+ id="linearGradient31966"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient28526"
- id="linearGradient32236"
+ y2="28.583914"
+ x2="275.43362"
+ y1="11.017987"
+ x1="260.25369"
+ gradientTransform="translate(-243.5,51.5045)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(423,225)"
- x1="-175.72238"
- y1="66.323799"
- x2="-183.03308"
- y2="66.235535" />
+ id="linearGradient31968"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient20055-8-4"
- id="linearGradient32238"
+ y2="36.874088"
+ x2="283.37738"
+ y1="22.713789"
+ x1="271.69839"
+ gradientTransform="translate(-244,50.0045)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(423,225)"
- x1="-174.51762"
- y1="66.654762"
- x2="-183.58472"
- y2="65.917358" />
+ id="linearGradient31970"
+ xlink:href="#linearGradient37542"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319-62"
- id="linearGradient32240"
+ y2="242.99191"
+ x2="90.563423"
+ y1="239.5473"
+ x1="85.853188"
+ gradientTransform="translate(-57.00003,-165.99191)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9098462,0,0,0.9414558,406.86085,228.58514)"
- x1="-180.7581"
- y1="63.445515"
- x2="-169.07387"
- y2="62.182106" />
+ id="linearGradient31972"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319-62-8"
- id="linearGradient32242"
+ y2="245.625"
+ x2="92.8125"
+ y1="240.90625"
+ x1="88"
+ gradientTransform="translate(-51,-172)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.2857143,0,0,0.787037,371.28571,304.80092)"
- x1="-101"
- y1="-16"
- x2="-96.861107"
- y2="-15.138513" />
+ id="linearGradient31974"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319-62-8"
- id="linearGradient32244"
+ y2="66.235535"
+ x2="-183.03308"
+ y1="66.323799"
+ x1="-175.72238"
+ gradientTransform="translate(423,225)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.2857143,0,0,0.787037,371.28571,304.80092)"
- x1="-101"
- y1="-16"
- x2="-96.705353"
- y2="-15.562586" />
+ id="linearGradient32236"
+ xlink:href="#linearGradient28526"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient29312"
- id="linearGradient32246"
+ y2="65.917358"
+ x2="-183.58472"
+ y1="66.654762"
+ x1="-174.51762"
+ gradientTransform="translate(423,225)"
gradientUnits="userSpaceOnUse"
- x1="242.99834"
- y1="291.5047"
- x2="244.75"
- y2="291.5" />
+ id="linearGradient32238"
+ xlink:href="#linearGradient20055-8-4"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient29304"
- id="linearGradient32248"
+ y2="62.182106"
+ x2="-169.07387"
+ y1="63.445515"
+ x1="-180.7581"
+ gradientTransform="matrix(0.9098462,0,0,0.9414558,406.86085,228.58514)"
gradientUnits="userSpaceOnUse"
- x1="245.20622"
- y1="294.49902"
- x2="243.5"
- y2="294.5" />
+ id="linearGradient32240"
+ xlink:href="#linearGradient319-62"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient32296"
+ y2="-15.138513"
+ x2="-96.861107"
+ y1="-16"
+ x1="-101"
+ gradientTransform="matrix(1.2857143,0,0,0.787037,371.28571,304.80092)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-52.983883,-129)"
- x1="258"
- y1="388"
- x2="273"
- y2="388" />
+ id="linearGradient32242"
+ xlink:href="#linearGradient319-62-8"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient32299"
+ y2="-15.562586"
+ x2="-96.705353"
+ y1="-16"
+ x1="-101"
+ gradientTransform="matrix(1.2857143,0,0,0.787037,371.28571,304.80092)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-48.983883,-126)"
- x1="259.75"
- y1="388"
- x2="273"
- y2="388" />
+ id="linearGradient32244"
+ xlink:href="#linearGradient319-62-8"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient32301"
+ y2="291.5"
+ x2="244.75"
+ y1="291.5047"
+ x1="242.99834"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-47.000005,-120)"
- x1="257.75"
- y1="388"
- x2="272"
- y2="388" />
+ id="linearGradient32246"
+ xlink:href="#linearGradient29312"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient32303"
+ y2="294.5"
+ x2="243.5"
+ y1="294.49902"
+ x1="245.20622"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9166695,0,0,0.9203753,-9.025729,344.78566)"
- x1="80.60067"
- y1="108.47212"
- x2="68.0271"
- y2="94.239906" />
+ id="linearGradient32248"
+ xlink:href="#linearGradient29304"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient13938"
- id="linearGradient32305"
+ y2="388"
+ x2="273"
+ y1="388"
+ x1="258"
+ gradientTransform="translate(-52.983883,-129)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-14.983875,337)"
- x1="68.361542"
- y1="95.337166"
- x2="88.785263"
- y2="116.62141" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient32296"
xlink:href="#linearGradient319"
- id="linearGradient32307"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9998599,0,0,0.9960071,-15.972985,338.41149)"
- x1="58.761654"
- y1="84.330009"
- x2="81.383331"
- y2="108.06429" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient32353"
+ y2="388"
+ x2="273"
+ y1="388"
+ x1="259.75"
+ gradientTransform="translate(-48.983883,-126)"
gradientUnits="userSpaceOnUse"
- x1="114.15679"
- y1="100.93772"
- x2="137.5759"
- y2="124.47867" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient32299"
xlink:href="#linearGradient319"
- id="linearGradient32355"
- gradientUnits="userSpaceOnUse"
- x1="131.12576"
- y1="118"
- x2="140.19273"
- y2="125.82862" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient32357"
+ y2="388"
+ x2="272"
+ y1="388"
+ x1="257.75"
+ gradientTransform="translate(-47.000005,-120)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.9050931,-7.9558708e-4,0.00612764,0.9147058,39.488451,313.56226)"
- x1="299.70026"
- y1="408.49368"
- x2="322.08145"
- y2="429.53806" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient32301"
xlink:href="#linearGradient319"
- id="linearGradient32359"
- gradientUnits="userSpaceOnUse"
- x1="131.12576"
- y1="118"
- x2="140.19273"
- y2="125.82862" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610"
- id="linearGradient32426"
+ y2="94.239906"
+ x2="68.0271"
+ y1="108.47212"
+ x1="80.60067"
+ gradientTransform="matrix(0.9166695,0,0,0.9203753,-9.025729,344.78566)"
gradientUnits="userSpaceOnUse"
- x1="114.15679"
- y1="100.93772"
- x2="137.5759"
- y2="124.47867" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient32303"
xlink:href="#linearGradient319"
- id="linearGradient32428"
- gradientUnits="userSpaceOnUse"
- x1="131.12576"
- y1="118"
- x2="140.19273"
- y2="125.82862" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9030"
- id="linearGradient32430"
+ y2="116.62141"
+ x2="88.785263"
+ y1="95.337166"
+ x1="68.361542"
+ gradientTransform="translate(-14.983875,337)"
gradientUnits="userSpaceOnUse"
- x1="190.68166"
- y1="244.14676"
- x2="174.75458"
- y2="226.33672" />
+ id="linearGradient32305"
+ xlink:href="#linearGradient13938"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient32432"
+ y2="108.06429"
+ x2="81.383331"
+ y1="84.330009"
+ x1="58.761654"
+ gradientTransform="matrix(0.9998599,0,0,0.9960071,-15.972985,338.41149)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.77915445,-6.9426235e-4,0.00527501,0.79821029,158.94945,341.39422)"
- x1="299.70026"
- y1="408.49368"
- x2="322.08145"
- y2="429.53806" />
+ id="linearGradient32307"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient44939-8-7-1-7"
- id="linearGradient32434"
+ y2="124.47867"
+ x2="137.5759"
+ y1="100.93772"
+ x1="114.15679"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,-1,73,792.5)"
- x1="346"
- y1="128.5"
- x2="368"
- y2="123.5" />
+ id="linearGradient32353"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient31019"
+ y2="125.82862"
+ x2="140.19273"
+ y1="118"
+ x1="131.12576"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.707107,-0.707107,0.707107,0.707107,257.1483,118.6716)"
- x1="85.548706"
- y1="100.22395"
- x2="85.347076"
- y2="113.09817" />
- <linearGradient
- inkscape:collect="always"
+ id="linearGradient32355"
xlink:href="#linearGradient319"
- id="linearGradient31025"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="429.53806"
+ x2="322.08145"
+ y1="408.49368"
+ x1="299.70026"
+ gradientTransform="matrix(0.9050931,-7.9558708e-4,0.00612764,0.9147058,39.488451,313.56226)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.72300056,-0.72300056,0.72300056,0.72300056,254.24127,118.38327)"
- x1="85.548706"
- y1="100.22395"
- x2="85.347076"
- y2="113.09817" />
+ id="linearGradient32357"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="125.82862"
+ x2="140.19273"
+ y1="118"
+ x1="131.12576"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient32359"
xlink:href="#linearGradient319"
- id="linearGradient31055"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="124.47867"
+ x2="137.5759"
+ y1="100.93772"
+ x1="114.15679"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.707107,-0.707107,0.707107,0.707107,257.1483,118.6716)"
- x1="85.548706"
- y1="100.22395"
- x2="85.347076"
- y2="113.09817" />
+ id="linearGradient32426"
+ xlink:href="#linearGradient1610"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="125.82862"
+ x2="140.19273"
+ y1="118"
+ x1="131.12576"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient32428"
xlink:href="#linearGradient319"
- id="linearGradient31057"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="226.33672"
+ x2="174.75458"
+ y1="244.14676"
+ x1="190.68166"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.72300056,-0.72300056,0.72300056,0.72300056,254.24127,118.38327)"
- x1="85.548706"
- y1="100.22395"
- x2="85.347076"
- y2="113.09817" />
+ id="linearGradient32430"
+ xlink:href="#linearGradient9030"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="429.53806"
+ x2="322.08145"
+ y1="408.49368"
+ x1="299.70026"
+ gradientTransform="matrix(0.77915445,-6.9426235e-4,0.00527501,0.79821029,158.94945,341.39422)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient32432"
xlink:href="#linearGradient319"
- id="linearGradient31151"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="123.5"
+ x2="368"
+ y1="128.5"
+ x1="346"
+ gradientTransform="matrix(1,0,0,-1,73,792.5)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.707107,-0.707107,0.707107,0.707107,257.1483,118.6716)"
- x1="85.548706"
- y1="100.22395"
- x2="85.347076"
- y2="113.09817" />
+ id="linearGradient32434"
+ xlink:href="#linearGradient44939-8-7-1-7"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319"
- id="linearGradient31153"
+ y2="113.09817"
+ x2="85.347076"
+ y1="100.22395"
+ x1="85.548706"
+ gradientTransform="matrix(0.707107,-0.707107,0.707107,0.707107,257.1483,118.6716)"
gradientUnits="userSpaceOnUse"
+ id="linearGradient31019"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="113.09817"
+ x2="85.347076"
+ y1="100.22395"
+ x1="85.548706"
gradientTransform="matrix(0.72300056,-0.72300056,0.72300056,0.72300056,254.24127,118.38327)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient31025"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="113.09817"
+ x2="85.347076"
+ y1="100.22395"
x1="85.548706"
+ gradientTransform="matrix(0.707107,-0.707107,0.707107,0.707107,257.1483,118.6716)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient31055"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="113.09817"
+ x2="85.347076"
y1="100.22395"
- x2="84.95932"
- y2="122.23821" />
+ x1="85.548706"
+ gradientTransform="matrix(0.72300056,-0.72300056,0.72300056,0.72300056,254.24127,118.38327)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient31057"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient30958"
- id="linearGradient31155"
+ y2="113.09817"
+ x2="85.347076"
+ y1="100.22395"
+ x1="85.548706"
+ gradientTransform="matrix(0.707107,-0.707107,0.707107,0.707107,257.1483,118.6716)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.707107,-0.707107,0.707107,0.707107,257.14826,118.6716)"
- x1="85.861206"
- y1="99.348953"
- x2="85.60022"
- y2="105.88815" />
+ id="linearGradient31151"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient30958"
- id="linearGradient31157"
+ y2="122.23821"
+ x2="84.95932"
+ y1="100.22395"
+ x1="85.548706"
+ gradientTransform="matrix(0.72300056,-0.72300056,0.72300056,0.72300056,254.24127,118.38327)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.74301467,-0.74301467,0.74301467,0.74301467,250.58064,118.02214)"
- x1="85.861206"
- y1="99.348953"
+ id="linearGradient31153"
+ xlink:href="#linearGradient319"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="105.88815"
x2="85.60022"
- y2="105.88815" />
+ y1="99.348953"
+ x1="85.861206"
+ gradientTransform="matrix(0.707107,-0.707107,0.707107,0.707107,257.14826,118.6716)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient31155"
+ xlink:href="#linearGradient30958"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542-7409-7-7-19-1"
- id="linearGradient32854-6-2"
+ y2="105.88815"
+ x2="85.60022"
+ y1="99.348953"
+ x1="85.861206"
+ gradientTransform="matrix(0.74301467,-0.74301467,0.74301467,0.74301467,250.58064,118.02214)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1.1666676,0,0,-1.1666676,119.15081,827.66691)"
- x1="262.04343"
- y1="233.0448"
+ id="linearGradient31157"
+ xlink:href="#linearGradient30958"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="247.32738"
x2="273.85818"
- y2="247.32738" />
+ y1="233.0448"
+ x1="262.04343"
+ gradientTransform="matrix(-1.1666676,0,0,-1.1666676,119.15081,827.66691)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient32854-6-2"
+ xlink:href="#linearGradient37542-7409-7-7-19-1"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient37542-7409-7-7-19-1">
<stop
- id="stop37544-48-6-1-8-9"
+ style="stop-color:#000000;stop-opacity:1;"
offset="0"
- style="stop-color:#000000;stop-opacity:1;" />
+ id="stop37544-48-6-1-8-9" />
<stop
- id="stop37546-82-1-0-6-8"
+ style="stop-color:#ffffff;stop-opacity:1;"
offset="1"
- style="stop-color:#ffffff;stop-opacity:1;" />
+ id="stop37546-82-1-0-6-8" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient44939-8-4-7-8-3-0-3"
- id="linearGradient32856-3-2"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.53706486,0,0,0.53706486,-249.10439,522.04547)"
- x1="97.616623"
- y1="39.47208"
+ y2="35.759052"
x2="94.157646"
- y2="35.759052" />
+ y1="39.47208"
+ x1="97.616623"
+ gradientTransform="matrix(0.53706486,0,0,0.53706486,-249.10439,522.04547)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient32856-3-2"
+ xlink:href="#linearGradient44939-8-4-7-8-3-0-3"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient44939-8-4-7-8-3-0-3">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop44941-8-5-40-2-4-2-4"
offset="0"
- id="stop44941-8-5-40-2-4-2-4" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop44943-2-5-9-4-9-8-0"
offset="1"
- id="stop44943-2-5-9-4-9-8-0" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10069-9-7-5-4-6-5-0-3"
- id="linearGradient32858-7-2"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.53706486,0,0,0.53706486,144.9138,-563.9364)"
- x1="97.616623"
- y1="39.47208"
+ y2="35.759052"
x2="94.157646"
- y2="35.759052" />
+ y1="39.47208"
+ x1="97.616623"
+ gradientTransform="matrix(0.53706486,0,0,0.53706486,144.9138,-563.9364)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient32858-7-2"
+ xlink:href="#linearGradient10069-9-7-5-4-6-5-0-3"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient10069-9-7-5-4-6-5-0-3">
<stop
- style="stop-color:#000000;stop-opacity:1;"
+ id="stop10071-5-4-58-5-9-1-2-1"
offset="0"
- id="stop10071-5-4-58-5-9-1-2-1" />
+ style="stop-color:#000000;stop-opacity:1;" />
<stop
- style="stop-color:#000000;stop-opacity:0;"
+ id="stop10073-43-0-4-0-8-0-4-9"
offset="1"
- id="stop10073-43-0-4-0-8-0-4-9" />
+ style="stop-color:#000000;stop-opacity:0;" />
</linearGradient>
<mask
- maskUnits="userSpaceOnUse"
- id="mask52637-8-8">
+ id="mask52637-8-8"
+ maskUnits="userSpaceOnUse">
<rect
- mask="none"
- style="fill:url(#radialGradient52641-2-8);fill-opacity:1;stroke:none;stroke-width:2.79999995;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- id="rect52639-8-9"
- width="7.9918551"
- height="8.9366941"
- x="-354"
- y="458"
+ ry="0"
rx="0"
- ry="0" />
+ y="458"
+ x="-354"
+ height="8.9366941"
+ width="7.9918551"
+ id="rect52639-8-9"
+ style="fill:url(#radialGradient52641-2-8);fill-opacity:1;stroke:none;stroke-width:2.79999995;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ mask="none" />
</mask>
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542-7409-7-7-0-9-9"
- id="radialGradient52641-2-8"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.39420438,-0.08239205,0.27256031,1.3040635,-361.27885,-161.73915)"
- cx="-302.79681"
- cy="462.0358"
- fx="-302.79681"
+ r="8"
fy="462.0358"
- r="8" />
+ fx="-302.79681"
+ cy="462.0358"
+ cx="-302.79681"
+ gradientTransform="matrix(0.39420438,-0.08239205,0.27256031,1.3040635,-361.27885,-161.73915)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient52641-2-8"
+ xlink:href="#linearGradient37542-7409-7-7-0-9-9"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient37542-7409-7-7-0-9-9">
<stop
- id="stop37544-48-6-1-4-1-1"
+ style="stop-color:#000000;stop-opacity:1;"
offset="0"
- style="stop-color:#000000;stop-opacity:1;" />
+ id="stop37544-48-6-1-4-1-1" />
<stop
- id="stop37546-82-1-0-9-3-3"
+ style="stop-color:#ffffff;stop-opacity:1;"
offset="1"
- style="stop-color:#ffffff;stop-opacity:1;" />
+ id="stop37546-82-1-0-9-3-3" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319-31-8-9-1"
- id="linearGradient52998-5-5"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-42,0)"
- x1="-307"
- y1="475"
+ y2="463.92236"
x2="-303.00003"
- y2="463.92236" />
+ y1="475"
+ x1="-307"
+ gradientTransform="translate(-42,0)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient52998-5-5"
+ xlink:href="#linearGradient319-31-8-9-1"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient319-31-8-9-1">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop320-23-2-8-4"
offset="0"
- id="stop320-23-2-8-4" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop321-34-4-4-2"
offset="1"
- id="stop321-34-4-4-2" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<mask
- maskUnits="userSpaceOnUse"
- id="mask52879-0-5">
+ id="mask52879-0-5"
+ maskUnits="userSpaceOnUse">
<rect
- mask="none"
- style="fill:url(#radialGradient52883-6-8);fill-opacity:1;stroke:none;stroke-width:2.79999995;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- id="rect52881-7-3"
- width="7.9918551"
- height="8.9366941"
- x="-354.95001"
- y="458"
+ ry="0"
rx="0"
- ry="0" />
+ y="458"
+ x="-354.95001"
+ height="8.9366941"
+ width="7.9918551"
+ id="rect52881-7-3"
+ style="fill:url(#radialGradient52883-6-8);fill-opacity:1;stroke:none;stroke-width:2.79999995;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ mask="none" />
</mask>
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient37542-7409-7-7-0-9-9"
- id="radialGradient52883-6-8"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.39420438,-0.08239205,0.27256031,1.3040635,-362.22886,-161.73912)"
- cx="-302.79681"
- cy="462.0358"
- fx="-302.79681"
+ r="8"
fy="462.0358"
- r="8" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient319-31-8-9-1"
- id="linearGradient53000-3-9"
+ fx="-302.79681"
+ cy="462.0358"
+ cx="-302.79681"
+ gradientTransform="matrix(0.39420438,-0.08239205,0.27256031,1.3040635,-362.22886,-161.73912)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-42,0)"
- x1="-308.7684"
- y1="476.0105"
- x2="-304.76843"
- y2="464.93286" />
+ id="radialGradient52883-6-8"
+ xlink:href="#linearGradient37542-7409-7-7-0-9-9"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient34488-1-8"
- id="linearGradient53002-6-2"
+ y2="464.93286"
+ x2="-304.76843"
+ y1="476.0105"
+ x1="-308.7684"
+ gradientTransform="translate(-42,0)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-839.95,-273.25)"
- x1="469.49295"
- y1="-101.22778"
+ id="linearGradient53000-3-9"
+ xlink:href="#linearGradient319-31-8-9-1"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="-102.52942"
x2="470.7515"
- y2="-102.52942" />
+ y1="-101.22778"
+ x1="469.49295"
+ gradientTransform="translate(-839.95,-273.25)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient53002-6-2"
+ xlink:href="#linearGradient34488-1-8"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient34488-1-8">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop34490-0-5-7"
offset="0"
- id="stop34490-0-5-7" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop34492-4-0"
offset="1"
- id="stop34492-4-0" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient32877-9-6-8"
- id="linearGradient32896-0-4"
- gradientUnits="userSpaceOnUse"
- x1="-217.1391"
- y1="626.39844"
+ y2="623.21643"
x2="-213.69197"
- y2="623.21643" />
+ y1="626.39844"
+ x1="-217.1391"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient32896-0-4"
+ xlink:href="#linearGradient32877-9-6-8"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient32877-9-6-8">
<stop
- style="stop-color:#b3b3b3;stop-opacity:1;"
+ id="stop32879-8-1-1"
offset="0"
- id="stop32879-8-1-1" />
+ style="stop-color:#b3b3b3;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop32881-4-3-9"
offset="1"
- id="stop32881-4-3-9" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient33058-4-9-5"
- id="linearGradient32899-8-3"
- gradientUnits="userSpaceOnUse"
- x1="-180.37465"
- y1="650.94128"
+ y2="653.27765"
x2="-177.70576"
- y2="653.27765" />
+ y1="650.94128"
+ x1="-180.37465"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient32899-8-3"
+ xlink:href="#linearGradient33058-4-9-5"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient33058-4-9-5">
<stop
- style="stop-color:#e5250b;stop-opacity:1;"
+ id="stop33060-3-3-9"
offset="0"
- id="stop33060-3-3-9" />
+ style="stop-color:#e5250b;stop-opacity:1;" />
<stop
- style="stop-color:#460000;stop-opacity:1;"
+ id="stop33062-9-4-7"
offset="1"
- id="stop33062-9-4-7" />
+ style="stop-color:#460000;stop-opacity:1;" />
</linearGradient>
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient44939-8-4-8-6-8"
- id="radialGradient32901-4-9"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.1748275,-1.7208853,0.51495275,0.35155123,-289.20197,69.961171)"
- cx="-197.66467"
- cy="630.61389"
- fx="-197.66467"
+ r="7.03125"
fy="630.61389"
- r="7.03125" />
+ fx="-197.66467"
+ cy="630.61389"
+ cx="-197.66467"
+ gradientTransform="matrix(1.1748275,-1.7208853,0.51495275,0.35155123,-289.20197,69.961171)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient32901-4-9"
+ xlink:href="#linearGradient44939-8-4-8-6-8"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient44939-8-4-8-6-8">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop44941-8-5-0-0-0"
offset="0"
- id="stop44941-8-5-0-0-0" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop44943-2-5-8-6-1"
offset="1"
- id="stop44943-2-5-8-6-1" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient33058-2-7-1-7"
- id="linearGradient32903-6-4"
- gradientUnits="userSpaceOnUse"
- x1="-218.31921"
- y1="624.84143"
+ y2="628.46533"
x2="-215.31401"
- y2="628.46533" />
+ y1="624.84143"
+ x1="-218.31921"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient32903-6-4"
+ xlink:href="#linearGradient33058-2-7-1-7"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient33058-2-7-1-7">
<stop
- style="stop-color:#e5250b;stop-opacity:1;"
+ id="stop33060-1-8-8-5"
offset="0"
- id="stop33060-1-8-8-5" />
+ style="stop-color:#e5250b;stop-opacity:1;" />
<stop
- style="stop-color:#460000;stop-opacity:1;"
+ id="stop33062-4-3-4-5"
offset="1"
- id="stop33062-4-3-4-5" />
+ style="stop-color:#460000;stop-opacity:1;" />
</linearGradient>
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient44939-8-4-8-6-8"
- id="radialGradient32905-9-5"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.62164476,0.39733376,-0.55111069,0.86222272,269.0477,166.72227)"
- cx="-202.18748"
- cy="627"
- fx="-202.18748"
+ r="7.03125"
fy="627"
- r="7.03125" />
- <linearGradient
- y2="-102.52942"
- x2="470.73633"
- y1="-101.3037"
- x1="469.52335"
- gradientTransform="translate(-829.95,-273.25)"
+ fx="-202.18748"
+ cy="627"
+ cx="-202.18748"
+ gradientTransform="matrix(0.62164476,0.39733376,-0.55111069,0.86222272,269.0477,166.72227)"
gradientUnits="userSpaceOnUse"
- id="linearGradient58927"
- xlink:href="#linearGradient34488-1-8"
+ id="radialGradient32905-9-5"
+ xlink:href="#linearGradient44939-8-4-8-6-8"
inkscape:collect="always" />
<linearGradient
inkscape:collect="always"
- xlink:href="#linearGradient1610-71-6-9-7"
- id="linearGradient21875-7-1-0-1"
+ xlink:href="#linearGradient34488-1-8"
+ id="linearGradient58927"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(2.4126967,0,0,2.7035619,-536.07088,379.29465)"
- x1="236.94902"
- y1="-14.103641"
+ gradientTransform="translate(-829.95,-273.25)"
+ x1="469.52335"
+ y1="-101.3037"
+ x2="470.73633"
+ y2="-102.52942" />
+ <linearGradient
+ y2="32.902874"
x2="278.34866"
- y2="32.902874" />
+ y1="-14.103641"
+ x1="236.94902"
+ gradientTransform="matrix(2.4126967,0,0,2.7035619,-536.07088,379.29465)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient21875-7-1-0-1"
+ xlink:href="#linearGradient1610-71-6-9-7"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient1610-71-6-9-7">
<stop
- style="stop-color:black;stop-opacity:1;"
+ id="stop1611-26-8-5-4"
offset="0"
- id="stop1611-26-8-5-4" />
+ style="stop-color:black;stop-opacity:1;" />
<stop
- style="stop-color:white;stop-opacity:1;"
+ id="stop1612-04-8-8-0"
offset="1"
- id="stop1612-04-8-8-0" />
+ style="stop-color:white;stop-opacity:1;" />
</linearGradient>
<clipPath
- clipPathUnits="userSpaceOnUse"
- id="clipPath13106-9-2-9-9">
+ id="clipPath13106-9-2-9-9"
+ clipPathUnits="userSpaceOnUse">
<path
- inkscape:connector-curvature="0"
- style="fill:url(#linearGradient13110);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;display:inline"
- d="m 125.5,433.5 23,0 0,41 -33,0 0,-31 10,-10 z"
- id="path34850-4-7-0-4"
- sodipodi:nodetypes="cccccc"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
- inkscape:export-ydpi="90" />
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ sodipodi:nodetypes="cccccc"
+ id="path34850-4-7-0-4"
+ d="m 125.5,433.5 23,0 0,41 -33,0 0,-31 10,-10 z"
+ style="fill:url(#linearGradient13110);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;display:inline"
+ inkscape:connector-curvature="0" />
</clipPath>
<filter
- inkscape:collect="always"
- x="-0.45600089"
- width="1.9120018"
- y="-0.50666559"
- height="2.0133312"
+ color-interpolation-filters="sRGB"
id="filter63011-6-7-0-8"
- color-interpolation-filters="sRGB">
+ height="2.0133312"
+ y="-0.50666559"
+ width="1.9120018"
+ x="-0.45600089"
+ inkscape:collect="always">
<feGaussianBlur
- inkscape:collect="always"
+ id="feGaussianBlur63013-0-1-0-8"
stdDeviation="1.899998"
- id="feGaussianBlur63013-0-1-0-8" />
+ inkscape:collect="always" />
</filter>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5060-6-6-2-4"
- id="linearGradient21877-3-2-7-2"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-47.00001,58.00194)"
- x1="160.14388"
- y1="376.27383"
+ y2="383.69843"
x2="174.29811"
- y2="383.69843" />
+ y1="376.27383"
+ x1="160.14388"
+ gradientTransform="translate(-47.00001,58.00194)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient21877-3-2-7-2"
+ xlink:href="#linearGradient5060-6-6-2-4"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient5060-6-6-2-4">
<stop
- id="stop5062-2-0-5-5"
+ style="stop-color:black;stop-opacity:1;"
offset="0"
- style="stop-color:black;stop-opacity:1;" />
+ id="stop5062-2-0-5-5" />
<stop
- id="stop5064-4-4-5-5"
+ style="stop-color:#000000;stop-opacity:0;"
offset="1"
- style="stop-color:#000000;stop-opacity:0;" />
+ id="stop5064-4-4-5-5" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient4671-6-4-1-7"
- id="linearGradient34959-9-2-1"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.562541,0,0,0.567972,-9.399749,-5.305317)"
- x1="1666.1765"
- y1="639.65356"
+ y2="629.23273"
x2="1659.0875"
- y2="629.23273" />
+ y1="639.65356"
+ x1="1666.1765"
+ gradientTransform="matrix(0.562541,0,0,0.567972,-9.399749,-5.305317)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient34959-9-2-1"
+ xlink:href="#linearGradient4671-6-4-1-7"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient4671-6-4-1-7">
<stop
- id="stop4673-7-6-4-1"
+ style="stop-color:#ffd43b;stop-opacity:1;"
offset="0"
- style="stop-color:#ffd43b;stop-opacity:1;" />
+ id="stop4673-7-6-4-1" />
<stop
- id="stop4675-8-0-8-1"
+ style="stop-color:#ffe873;stop-opacity:1"
offset="1"
- style="stop-color:#ffe873;stop-opacity:1" />
+ id="stop4675-8-0-8-1" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient4689-1-6-4-2"
- id="linearGradient34961-3-6-5"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.562541,0,0,0.567972,-9.399749,-5.305317)"
- x1="1641.4773"
- y1="607.50525"
+ y2="626.40344"
x2="1663.2872"
- y2="626.40344" />
+ y1="607.50525"
+ x1="1641.4773"
+ gradientTransform="matrix(0.562541,0,0,0.567972,-9.399749,-5.305317)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient34961-3-6-5"
+ xlink:href="#linearGradient4689-1-6-4-2"
+ inkscape:collect="always" />
<linearGradient
id="linearGradient4689-1-6-4-2">
<stop
- id="stop4691-6-2-6-7"
+ style="stop-color:#5a9fd4;stop-opacity:1;"
offset="0"
- style="stop-color:#5a9fd4;stop-opacity:1;" />
+ id="stop4691-6-2-6-7" />
<stop
- id="stop4693-0-4-8-6"
+ style="stop-color:#306998;stop-opacity:1;"
offset="1"
- style="stop-color:#306998;stop-opacity:1;" />
+ id="stop4693-0-4-8-6" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient3966-5-1-4-8-9-88-8-4"
- id="linearGradient34963-5-9-1"
- gradientUnits="userSpaceOnUse"
- x1="922.89703"
- y1="339.66599"
+ y2="344.10001"
x2="924.10608"
- y2="344.10001" />
+ y1="339.66599"
+ x1="922.89703"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient34963-5-9-1"
+ xlink:href="#linearGradient3966-5-1-4-8-9-88-8-4"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- id="linearGradient3966-5-1-4-8-9-88-8-4">
+ id="linearGradient3966-5-1-4-8-9-88-8-4"
+ inkscape:collect="always">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop3968-7-9-0-8-2-1-3-2"
offset="0"
- id="stop3968-7-9-0-8-2-1-3-2" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop3970-6-6-6-2-8-2-5-3"
offset="1"
- id="stop3970-6-6-6-2-8-2-5-3" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient3966-5-1-4-8-9-88-8-4"
- id="linearGradient34965-1-5-2"
- gradientUnits="userSpaceOnUse"
- x1="919.09998"
- y1="345.42163"
+ y2="355.75"
x2="922.104"
- y2="355.75" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient3966-5-1-4-8-9-8-9-5-5"
- id="linearGradient34967-4-1-8"
+ y1="345.42163"
+ x1="919.09998"
gradientUnits="userSpaceOnUse"
- x1="922.64624"
- y1="342.71866"
+ id="linearGradient34965-1-5-2"
+ xlink:href="#linearGradient3966-5-1-4-8-9-88-8-4"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="341.98108"
x2="921.82654"
- y2="341.98108" />
+ y1="342.71866"
+ x1="922.64624"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient34967-4-1-8"
+ xlink:href="#linearGradient3966-5-1-4-8-9-8-9-5-5"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- id="linearGradient3966-5-1-4-8-9-8-9-5-5">
+ id="linearGradient3966-5-1-4-8-9-8-9-5-5"
+ inkscape:collect="always">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop3968-7-9-0-8-2-9-8-5-7"
offset="0"
- id="stop3968-7-9-0-8-2-9-8-5-7" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop3970-6-6-6-2-8-0-2-8-6"
offset="1"
- id="stop3970-6-6-6-2-8-0-2-8-6" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient3966-5-1-4-8-9-88-8-4"
- id="linearGradient34969-4-4-1"
- gradientUnits="userSpaceOnUse"
- x1="917.75"
- y1="355.5"
+ y2="353"
x2="917.25"
- y2="353" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient3966-5-1-4-8-9-88-8-4"
- id="linearGradient34971-5-0-9"
+ y1="355.5"
+ x1="917.75"
gradientUnits="userSpaceOnUse"
- x1="923"
- y1="343.75"
- x2="923"
- y2="344.75" />
- <radialGradient
- inkscape:collect="always"
+ id="linearGradient34969-4-4-1"
xlink:href="#linearGradient3966-5-1-4-8-9-88-8-4"
- id="radialGradient34973-2-5-7"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(2.4166677,-7.678944e-6,1.853542e-6,0.58333478,-1309.0016,145.80659)"
- cx="924"
- cy="349.20001"
- fx="924"
- fy="349.20001"
- r="6" />
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
+ y2="344.75"
+ x2="923"
+ y1="343.75"
+ x1="923"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient34971-5-0-9"
xlink:href="#linearGradient3966-5-1-4-8-9-88-8-4"
- id="linearGradient34975-9-4-9"
+ inkscape:collect="always" />
+ <radialGradient
+ r="6"
+ fy="349.20001"
+ fx="924"
+ cy="349.20001"
+ cx="924"
+ gradientTransform="matrix(2.4166677,-7.678944e-6,1.853542e-6,0.58333478,-1309.0016,145.80659)"
gradientUnits="userSpaceOnUse"
- x1="921.34045"
- y1="341.34042"
- x2="922.16492"
- y2="342.16492" />
+ id="radialGradient34973-2-5-7"
+ xlink:href="#linearGradient3966-5-1-4-8-9-88-8-4"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient3944-4-6-7-7"
- id="linearGradient47921-1-7-1-1"
+ y2="342.16492"
+ x2="922.16492"
+ y1="341.34042"
+ x1="921.34045"
gradientUnits="userSpaceOnUse"
- x1="215.99414"
- y1="592.95746"
+ id="linearGradient34975-9-4-9"
+ xlink:href="#linearGradient3966-5-1-4-8-9-88-8-4"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="601.36218"
x2="218.99957"
- y2="601.36218" />
+ y1="592.95746"
+ x1="215.99414"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient47921-1-7-1-1"
+ xlink:href="#linearGradient3944-4-6-7-7"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- id="linearGradient3944-4-6-7-7">
+ id="linearGradient3944-4-6-7-7"
+ inkscape:collect="always">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop3946-2-4-4-4"
offset="0"
- id="stop3946-2-4-4-4" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop3948-3-5-0-0"
offset="1"
- id="stop3948-3-5-0-0" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient3952-2-6-4-4"
+ y2="604.375"
+ x2="216.00003"
+ y1="597.41553"
+ x1="213.00005"
+ gradientUnits="userSpaceOnUse"
id="linearGradient47923-2-8-9-9"
+ xlink:href="#linearGradient3952-2-6-4-4"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient3952-2-6-4-4"
+ inkscape:collect="always">
+ <stop
+ id="stop3954-1-1-8-8"
+ offset="0"
+ style="stop-color:#ffffff;stop-opacity:1;" />
+ <stop
+ id="stop3956-6-5-8-8"
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ y2="606.11218"
+ x2="219.5"
+ y1="601.83856"
+ x1="218.06126"
gradientUnits="userSpaceOnUse"
- x1="213.00005"
- y1="597.41553"
- x2="216.00003"
- y2="604.375" />
+ id="linearGradient47925-8-5-2-2"
+ xlink:href="#linearGradient3966-5-1-45-4"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- id="linearGradient3952-2-6-4-4">
+ id="linearGradient3966-5-1-45-4"
+ inkscape:collect="always">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop3968-7-9-5-5"
offset="0"
- id="stop3954-1-1-8-8" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop3970-6-6-1-5"
offset="1"
- id="stop3956-6-5-8-8" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3966-5-1-45-4"
- id="linearGradient47925-8-5-2-2"
+ id="linearGradient49198-1-1"
gradientUnits="userSpaceOnUse"
- x1="218.06126"
- y1="601.83856"
+ x1="219"
+ y1="604.31494"
+ x2="221"
+ y2="609.36218" />
+ <linearGradient
+ y2="29.679312"
+ x2="278.40161"
+ y1="3.6831069"
+ x1="253.78497"
+ gradientTransform="matrix(0.888889,0,0,1,513.5,184.50451)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient59244-7"
+ xlink:href="#linearGradient1610-1-1-9-4-7-1"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient1610-1-1-9-4-7-1">
+ <stop
+ id="stop1611-74-7-2-2-2-1"
+ offset="0"
+ style="stop-color:black;stop-opacity:1;" />
+ <stop
+ id="stop1612-09-4-7-5-1-5"
+ offset="1"
+ style="stop-color:white;stop-opacity:1;" />
+ </linearGradient>
+ <radialGradient
+ r="6.9000001"
+ fy="206.40076"
+ fx="756.83508"
+ cy="206.40076"
+ cx="756.83508"
+ gradientTransform="matrix(0.3817213,-0.4377393,0.4780868,0.4169055,368.09749,451.76937)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient59246-2"
+ xlink:href="#linearGradient40578-4-8-4-0-5-2-4-7"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient40578-4-8-4-0-5-2-4-7">
+ <stop
+ id="stop40580-8-9-8-9-4-6-9-6"
+ offset="0"
+ style="stop-color:black;stop-opacity:1;" />
+ <stop
+ id="stop40582-6-8-8-4-3-8-9-1"
+ offset="1"
+ style="stop-color:black;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ y2="249"
+ x2="93.0625"
+ y1="241.125"
+ x1="87"
+ gradientTransform="translate(670,-33)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient59248-4"
+ xlink:href="#linearGradient58334-24-8-2-6-0-2"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient58334-24-8-2-6-0-2">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0.87628865;"
+ offset="0.0000000"
+ id="stop58336-55-8-3-6-3-3" />
+ <stop
+ style="stop-color:#fffffe;stop-opacity:0.0000000;"
+ offset="1.0000000"
+ id="stop58338-17-2-3-3-0-2" />
+ </linearGradient>
+ <linearGradient
+ y2="305"
+ x2="758"
+ y1="300.83292"
+ x1="754.28558"
+ gradientTransform="translate(0,-95.999998)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient59250-2"
+ xlink:href="#linearGradient16500-11-1-4-3-1"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient16500-11-1-4-3-1"
+ inkscape:collect="always">
+ <stop
+ id="stop16502-5-1-5-5-6"
+ offset="0"
+ style="stop-color:black;stop-opacity:1;" />
+ <stop
+ id="stop16504-27-3-6-0-8"
+ offset="1"
+ style="stop-color:black;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ y2="601.36218"
+ x2="218.99957"
+ y1="592.95746"
+ x1="215.99414"
+ gradientTransform="translate(-251,440.9872)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient59252-5"
+ xlink:href="#linearGradient3944-1-7-5-7-7"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient3944-1-7-5-7-7"
+ inkscape:collect="always">
+ <stop
+ id="stop3946-7-4-3-6-6"
+ offset="0"
+ style="stop-color:#ffffff;stop-opacity:1;" />
+ <stop
+ id="stop3948-1-2-5-7-1"
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ y2="604.375"
+ x2="216.00003"
+ y1="597.41553"
+ x1="213.00005"
+ gradientTransform="translate(-251,440.9872)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient59254-8"
+ xlink:href="#linearGradient3952-5-7-6-8-9"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient3952-5-7-6-8-9"
+ inkscape:collect="always">
+ <stop
+ id="stop3954-2-9-1-3-2"
+ offset="0"
+ style="stop-color:#ffffff;stop-opacity:1;" />
+ <stop
+ id="stop3956-7-3-4-6-7"
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ y2="606.11218"
x2="219.5"
- y2="606.11218" />
+ y1="601.83856"
+ x1="218.06126"
+ gradientTransform="translate(-251,440.9872)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient59256-9"
+ xlink:href="#linearGradient3966-8-9-6-4-5"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- id="linearGradient3966-5-1-45-4">
+ id="linearGradient3966-8-9-6-4-5"
+ inkscape:collect="always">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop3968-2-8-2-4-4"
offset="0"
- id="stop3968-7-9-5-5" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop3970-4-6-6-1-3"
offset="1"
- id="stop3970-6-6-1-5" />
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
y2="609.36218"
x2="221"
y1="604.31494"
x1="219"
+ gradientTransform="translate(-251,440.9872)"
gradientUnits="userSpaceOnUse"
- id="linearGradient49198-1-1"
- xlink:href="#linearGradient3966-5-1-45-4"
+ id="linearGradient59258-1"
+ xlink:href="#linearGradient3966-8-9-6-4-5"
inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient1610-1-1-9-4-7-1"
- id="linearGradient59244-7"
+ y2="32.076183"
+ x2="276.89801"
+ y1="-14.103641"
+ x1="236.94902"
+ gradientTransform="matrix(2.4126967,0,0,2.7035619,-536.07088,379.29465)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.888889,0,0,1,513.5,184.50451)"
- x1="253.78497"
- y1="3.6831069"
- x2="278.40161"
- y2="29.679312" />
+ id="linearGradient22274-8"
+ xlink:href="#linearGradient1610-2"
+ inkscape:collect="always" />
<linearGradient
- id="linearGradient1610-1-1-9-4-7-1">
+ id="linearGradient1610-2">
+ <stop
+ id="stop1611-8"
+ offset="0"
+ style="stop-color:black;stop-opacity:1;" />
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0.5"
+ id="stop6596" />
+ <stop
+ id="stop1612-0"
+ offset="1"
+ style="stop-color:#c8c8c8;stop-opacity:1;" />
+ </linearGradient>
+ <clipPath
+ id="clipPath13106-5"
+ clipPathUnits="userSpaceOnUse">
+ <path
+ inkscape:connector-curvature="0"
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ sodipodi:nodetypes="cccccc"
+ id="path34850-6"
+ d="m 125.5,433.5 23,0 0,41 -33,0 0,-31 10,-10 z"
+ style="fill:url(#linearGradient13110);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;display:inline" />
+ </clipPath>
+ <filter
+ color-interpolation-filters="sRGB"
+ id="filter63011-5"
+ height="2.0133312"
+ y="-0.50666559"
+ width="1.9120018"
+ x="-0.45600089"
+ inkscape:collect="always">
+ <feGaussianBlur
+ id="feGaussianBlur63013-8"
+ stdDeviation="1.899998"
+ inkscape:collect="always" />
+ </filter>
+ <linearGradient
+ y2="383.69843"
+ x2="174.29811"
+ y1="376.27383"
+ x1="160.14388"
+ gradientTransform="translate(-47.00001,58.00194)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient22276-5"
+ xlink:href="#linearGradient5060-4"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient5060-4">
<stop
style="stop-color:black;stop-opacity:1;"
offset="0"
- id="stop1611-74-7-2-2-2-1" />
+ id="stop5062-1" />
<stop
- style="stop-color:white;stop-opacity:1;"
+ style="stop-color:#000000;stop-opacity:0;"
offset="1"
- id="stop1612-09-4-7-5-1-5" />
+ id="stop5064-6" />
</linearGradient>
+ <clipPath
+ id="clipPath5613"
+ clipPathUnits="userSpaceOnUse">
+ <path
+ inkscape:connector-curvature="0"
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ sodipodi:nodetypes="cccccc"
+ id="path5615"
+ d="m 125.5,433.5 23,0 0,41 -33,0 0,-31 10,-10 z"
+ style="fill:url(#linearGradient13110);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;display:inline" />
+ </clipPath>
<radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient40578-4-8-4-0-5-2-4-7"
- id="radialGradient59246-2"
+ r="3.1650217"
+ fy="500.26215"
+ fx="75.554794"
+ cy="500.26215"
+ cx="75.554794"
+ gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.3817213,-0.4377393,0.4780868,0.4169055,368.09749,451.76937)"
- cx="756.83508"
- cy="206.40076"
- fx="756.83508"
- fy="206.40076"
- r="6.9000001" />
+ id="radialGradient21442-6"
+ xlink:href="#linearGradient18821-1"
+ inkscape:collect="always" />
<linearGradient
- id="linearGradient40578-4-8-4-0-5-2-4-7">
+ id="linearGradient18821-1">
<stop
- style="stop-color:black;stop-opacity:1;"
+ id="stop18823-6"
offset="0"
- id="stop40580-8-9-8-9-4-6-9-6" />
+ style="stop-color:#fc6b58;stop-opacity:1;" />
<stop
- style="stop-color:black;stop-opacity:0;"
+ id="stop18825-0"
offset="1"
- id="stop40582-6-8-8-4-3-8-9-1" />
+ style="stop-color:#fc6b58;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient58334-24-8-2-6-0-2"
- id="linearGradient59248-4"
+ y2="34.375"
+ x2="29.875"
+ y1="18.875"
+ x1="31.1875"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(670,-33)"
- x1="87"
- y1="241.125"
- x2="93.0625"
- y2="249" />
+ id="linearGradient21444-0"
+ xlink:href="#linearGradient39155-0"
+ inkscape:collect="always" />
<linearGradient
- id="linearGradient58334-24-8-2-6-0-2">
+ id="linearGradient39155-0">
<stop
- id="stop58336-55-8-3-6-3-3"
- offset="0.0000000"
- style="stop-color:#ffffff;stop-opacity:0.87628865;" />
+ style="stop-color:white;stop-opacity:1;"
+ offset="0"
+ id="stop39157-6" />
<stop
- id="stop58338-17-2-3-3-0-2"
- offset="1.0000000"
- style="stop-color:#fffffe;stop-opacity:0.0000000;" />
+ style="stop-color:#dadada;stop-opacity:1;"
+ offset="1"
+ id="stop39159-6" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient16500-11-1-4-3-1"
- id="linearGradient59250-2"
+ y2="-458.05771"
+ x2="190.46461"
+ y1="193.33229"
+ x1="185.9903"
+ gradientTransform="matrix(0.06818845,0,0,0.06818845,22.51112,27.02885)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(0,-95.999998)"
- x1="754.28558"
- y1="300.83292"
- x2="758"
- y2="305" />
+ id="linearGradient21446-3"
+ xlink:href="#linearGradient3564-2"
+ inkscape:collect="always" />
<linearGradient
inkscape:collect="always"
- id="linearGradient16500-11-1-4-3-1">
+ id="linearGradient3564-2">
<stop
- style="stop-color:black;stop-opacity:1;"
+ style="stop-color:white;stop-opacity:1;"
offset="0"
- id="stop16502-5-1-5-5-6" />
+ id="stop3566-3" />
<stop
- style="stop-color:black;stop-opacity:0;"
+ style="stop-color:white;stop-opacity:0;"
offset="1"
- id="stop16504-27-3-6-0-8" />
+ id="stop3568-0" />
</linearGradient>
+ <radialGradient
+ r="20.278975"
+ fy="19.668886"
+ fx="26.109201"
+ cy="19.668886"
+ cx="26.109201"
+ gradientTransform="matrix(1.647222,0,0,1.26792,-15.47413,-5.79794)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient21448-8"
+ xlink:href="#linearGradient39171-9"
+ inkscape:collect="always" />
<linearGradient
inkscape:collect="always"
- xlink:href="#linearGradient3944-1-7-5-7-7"
- id="linearGradient59252-5"
+ id="linearGradient39171-9">
+ <stop
+ style="stop-color:white;stop-opacity:1;"
+ offset="0"
+ id="stop39173-1" />
+ <stop
+ style="stop-color:white;stop-opacity:0;"
+ offset="1"
+ id="stop39175-1" />
+ </linearGradient>
+ <radialGradient
+ r="3.1650217"
+ fy="500.26215"
+ fx="75.554794"
+ cy="500.26215"
+ cx="75.554794"
+ gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,594.18579,-173.07738)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-251,440.9872)"
- x1="215.99414"
- y1="592.95746"
- x2="218.99957"
- y2="601.36218" />
+ id="radialGradient21442-6-790"
+ xlink:href="#linearGradient18821-1-16"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- id="linearGradient3944-1-7-5-7-7">
+ id="linearGradient18821-1-16">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop20589"
offset="0"
- id="stop3946-7-4-3-6-6" />
+ style="stop-color:#e3604f;stop-opacity:1;" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ id="stop20591"
offset="1"
- id="stop3948-1-2-5-7-1" />
+ style="stop-color:#e3604f;stop-opacity:0;" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient3952-5-7-6-8-9"
- id="linearGradient59254-8"
+ y2="34.375"
+ x2="29.875"
+ y1="18.875"
+ x1="31.1875"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-251,440.9872)"
- x1="213.00005"
- y1="597.41553"
- x2="216.00003"
- y2="604.375" />
+ id="linearGradient21444-0-352"
+ xlink:href="#linearGradient39155-0-813"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- id="linearGradient3952-5-7-6-8-9">
+ id="linearGradient39155-0-813">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ style="stop-color:#e6e6e6;stop-opacity:1;"
offset="0"
- id="stop3954-2-9-1-3-2" />
+ id="stop20595" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ style="stop-color:#c4c4c4;stop-opacity:1;"
offset="1"
- id="stop3956-7-3-4-6-7" />
+ id="stop20597" />
</linearGradient>
<linearGradient
+ y2="-458.05771"
+ x2="190.46461"
+ y1="193.33229"
+ x1="185.9903"
+ gradientTransform="matrix(0.06818845,0,0,0.06818845,22.51112,27.02885)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient21446-3-145"
+ xlink:href="#linearGradient3564-2-380"
+ inkscape:collect="always" />
+ <linearGradient
inkscape:collect="always"
- xlink:href="#linearGradient3966-8-9-6-4-5"
- id="linearGradient59256-9"
+ id="linearGradient3564-2-380">
+ <stop
+ style="stop-color:#e6e6e6;stop-opacity:1;"
+ offset="0"
+ id="stop20601" />
+ <stop
+ style="stop-color:#e6e6e6;stop-opacity:0;"
+ offset="1"
+ id="stop20603" />
+ </linearGradient>
+ <radialGradient
+ r="20.278975"
+ fy="19.668886"
+ fx="26.109201"
+ cy="19.668886"
+ cx="26.109201"
+ gradientTransform="matrix(1.647222,0,0,1.26792,-15.47413,-5.79794)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-251,440.9872)"
- x1="218.06126"
- y1="601.83856"
- x2="219.5"
- y2="606.11218" />
+ id="radialGradient21448-8-143"
+ xlink:href="#linearGradient39171-9-89"
+ inkscape:collect="always" />
<linearGradient
inkscape:collect="always"
- id="linearGradient3966-8-9-6-4-5">
+ id="linearGradient39171-9-89">
<stop
- style="stop-color:#ffffff;stop-opacity:1;"
+ style="stop-color:#e6e6e6;stop-opacity:1;"
offset="0"
- id="stop3968-2-8-2-4-4" />
+ id="stop20607" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
+ style="stop-color:#e6e6e6;stop-opacity:0;"
+ offset="1"
+ id="stop20609" />
+ </linearGradient>
+ <linearGradient
+ y2="32.076183"
+ x2="276.89801"
+ y1="-14.103641"
+ x1="236.94902"
+ gradientTransform="matrix(2.4126967,0,0,2.7035619,-611.42653,418.58071)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient22274-1"
+ xlink:href="#linearGradient1610-7"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient1610-7">
+ <stop
+ id="stop1611-4"
+ offset="0"
+ style="stop-color:black;stop-opacity:1;" />
+ <stop
+ id="stop1612-09"
+ offset="1"
+ style="stop-color:white;stop-opacity:1;" />
+ </linearGradient>
+ <clipPath
+ id="clipPath13106-4"
+ clipPathUnits="userSpaceOnUse">
+ <path
+ inkscape:connector-curvature="0"
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ sodipodi:nodetypes="cccccc"
+ id="path34850-8"
+ d="m 125.5,433.5 23,0 0,41 -33,0 0,-31 10,-10 z"
+ style="fill:url(#linearGradient13110);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;display:inline" />
+ </clipPath>
+ <filter
+ color-interpolation-filters="sRGB"
+ id="filter63011-8"
+ height="2.0133312"
+ y="-0.50666559"
+ width="1.9120018"
+ x="-0.45600089"
+ inkscape:collect="always">
+ <feGaussianBlur
+ id="feGaussianBlur63013-2"
+ stdDeviation="1.899998"
+ inkscape:collect="always" />
+ </filter>
+ <linearGradient
+ y2="383.69843"
+ x2="174.29811"
+ y1="376.27383"
+ x1="160.14388"
+ gradientTransform="translate(-122.35565,97.287995)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient22276-4"
+ xlink:href="#linearGradient5060-5"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient5060-5">
+ <stop
+ style="stop-color:black;stop-opacity:1;"
+ offset="0"
+ id="stop5062-5" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop5064-17" />
+ </linearGradient>
+ <clipPath
+ id="clipPath5678"
+ clipPathUnits="userSpaceOnUse">
+ <path
+ inkscape:connector-curvature="0"
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ sodipodi:nodetypes="cccccc"
+ id="path5680"
+ d="m 125.5,433.5 23,0 0,41 -33,0 0,-31 10,-10 z"
+ style="fill:url(#linearGradient13110);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;display:inline" />
+ </clipPath>
+ <radialGradient
+ r="3.1650217"
+ fy="500.26215"
+ fx="75.554794"
+ cy="500.26215"
+ cx="75.554794"
+ gradientTransform="matrix(0.8728692,0.8400852,-1.1671853,1.2200916,484.80188,-124.14103)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient21442-1"
+ xlink:href="#linearGradient18821-15"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient18821-15">
+ <stop
+ id="stop18823-2"
+ offset="0"
+ style="stop-color:#fc6b58;stop-opacity:1;" />
+ <stop
+ id="stop18825-7"
offset="1"
- id="stop3970-4-6-6-1-3" />
+ style="stop-color:#fc6b58;stop-opacity:0;" />
</linearGradient>
<linearGradient
+ gradientTransform="translate(-173.83762,79.554258)"
+ y2="34.375"
+ x2="29.875"
+ y1="18.875"
+ x1="31.1875"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient21444-6"
+ xlink:href="#linearGradient39155-1"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient39155-1">
+ <stop
+ style="stop-color:white;stop-opacity:1;"
+ offset="0"
+ id="stop39157-4" />
+ <stop
+ style="stop-color:#dadada;stop-opacity:1;"
+ offset="1"
+ id="stop39159-2" />
+ </linearGradient>
+ <linearGradient
+ y2="-458.05771"
+ x2="190.46461"
+ y1="193.33229"
+ x1="185.9903"
+ gradientTransform="matrix(0.06818845,0,0,0.06818845,-116.87526,94.420283)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient21446-32"
+ xlink:href="#linearGradient3564-21"
+ inkscape:collect="always" />
+ <linearGradient
inkscape:collect="always"
- xlink:href="#linearGradient3966-8-9-6-4-5"
- id="linearGradient59258-1"
+ id="linearGradient3564-21">
+ <stop
+ style="stop-color:white;stop-opacity:1;"
+ offset="0"
+ id="stop3566-6" />
+ <stop
+ style="stop-color:white;stop-opacity:0;"
+ offset="1"
+ id="stop3568-8" />
+ </linearGradient>
+ <radialGradient
+ r="20.278975"
+ fy="19.668886"
+ fx="26.109201"
+ cy="19.668886"
+ cx="26.109201"
+ gradientTransform="matrix(1.647222,0,0,1.26792,-154.86051,61.593483)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-251,440.9872)"
- x1="219"
- y1="604.31494"
- x2="221"
- y2="609.36218" />
+ id="radialGradient21448-5"
+ xlink:href="#linearGradient39171-7"
+ inkscape:collect="always" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient39171-7">
+ <stop
+ style="stop-color:white;stop-opacity:1;"
+ offset="0"
+ id="stop39173-6" />
+ <stop
+ style="stop-color:white;stop-opacity:0;"
+ offset="1"
+ id="stop39175-18" />
+ </linearGradient>
</defs>
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- gridtolerance="10000"
- guidetolerance="10000"
- objecttolerance="10000"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="1"
- inkscape:cx="147.30844"
- inkscape:cy="114.24342"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="false"
- inkscape:window-width="1912"
- inkscape:window-height="1031"
- inkscape:window-x="0"
- inkscape:window-y="0"
- inkscape:snap-nodes="true"
- inkscape:snap-bbox="false"
- showguides="true"
- inkscape:guide-bbox="true"
- inkscape:object-nodes="false"
- inkscape:object-paths="false"
- inkscape:snap-intersection-line-segments="true"
- inkscape:snap-intersection-grid-guide="false"
- inkscape:window-maximized="1"
- inkscape:bbox-paths="false"
- inkscape:snap-global="true"
- inkscape:snap-bbox-midpoints="false"
- inkscape:snap-grids="true"
- inkscape:snap-to-guides="false"
- inkscape:snap-page="false"
- units="px"
- inkscape:snap-center="false"
- fit-margin-top="0"
- fit-margin-left="0"
- fit-margin-right="0"
- fit-margin-bottom="0">
- <inkscape:grid
- type="xygrid"
- id="grid17394"
- visible="true"
- enabled="true"
- spacingx="0.25px"
- spacingy="0.25px"
- empspacing="4"
- color="#808080"
- opacity="0.09803922"
- dotted="false"
- empcolor="#7f7f7f"
- empopacity="0.25098039"
- snapvisiblegridlinesonly="true"
- originx="0px"
- originy="0px" />
- </sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
@@ -17551,1123 +17979,1155 @@
</rdf:RDF>
</metadata>
<g
- inkscape:groupmode="layer"
- id="layer3"
- inkscape:label="bckgrnd"
- style="display:none"
+ transform="translate(-872,-180)"
sodipodi:insensitive="true"
- transform="translate(-872,-180)">
+ style="display:none"
+ inkscape:label="bckgrnd"
+ id="layer3"
+ inkscape:groupmode="layer">
<rect
- style="fill:#4d4d4d;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.20000005;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- id="rect20607"
- width="1083.874"
- height="650"
+ y="-4"
x="-4"
- y="-4" />
+ height="650"
+ width="1083.874"
+ id="rect20607"
+ style="fill:#4d4d4d;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.20000005;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
</g>
<path
- style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#1a1a1a;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- id="path23417"
- sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0"
d=""
- inkscape:connector-curvature="0" />
- <path
- style="fill:none;stroke:#ffffff;stroke-width:1.79999995;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
- id="path23347"
sodipodi:nodetypes="cc"
+ id="path23417"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#1a1a1a;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ <path
+ inkscape:connector-curvature="0"
d=""
- inkscape:connector-curvature="0" />
+ sodipodi:nodetypes="cc"
+ id="path23347"
+ style="fill:none;stroke:#ffffff;stroke-width:1.79999995;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<g
- inkscape:label="ICONS"
- inkscape:groupmode="layer"
- id="layer1"
+ transform="translate(-872,-180)"
style="display:inline"
- transform="translate(-872,-180)">
+ id="layer1"
+ inkscape:groupmode="layer"
+ inkscape:label="ICONS">
<g
- id="g10203"
- transform="translate(-211.20006,170)" />
+ transform="translate(-211.20006,170)"
+ id="g10203" />
<g
- id="g15785"
- transform="translate(-168.02763,373.00001)" />
+ transform="translate(-168.02763,373.00001)"
+ id="g15785" />
<g
- id="g15789"
- transform="translate(-168.02763,380.00001)" />
+ transform="translate(-168.02763,380.00001)"
+ id="g15789" />
<g
- transform="translate(-163.02763,375.00001)"
- id="g15795" />
+ id="g15795"
+ transform="translate(-163.02763,375.00001)" />
<g
- id="g15801"
- transform="translate(-163.02763,371.00001)" />
+ transform="translate(-163.02763,371.00001)"
+ id="g15801" />
<g
- transform="translate(-163.02763,382.00001)"
- id="g15807" />
+ id="g15807"
+ transform="translate(-163.02763,382.00001)" />
<g
- id="g14009"
- transform="translate(1,-0.01245054)" />
+ transform="translate(1,-0.01245054)"
+ id="g14009" />
<g
- id="g23738"
+ style="fill:none;stroke:#000000;stroke-width:0.99968439;stroke-opacity:1"
transform="matrix(0.9375966,0,0,0.937515,141.13219,-26.987026)"
- style="fill:none;stroke:#000000;stroke-width:0.99968439;stroke-opacity:1">
+ id="g23738">
<g
- transform="matrix(0.83365,0,0,0.857522,-5.083283,31.57021)"
+ style="fill:none;stroke:#000000;stroke-width:0.99968439;stroke-opacity:1"
id="g23740"
- style="fill:none;stroke:#000000;stroke-width:0.99968439;stroke-opacity:1">
+ transform="matrix(0.83365,0,0,0.857522,-5.083283,31.57021)">
<g
- transform="translate(-1.863085e-7,0.53333)"
+ style="fill:none;stroke:#000000;stroke-width:0.99968439;stroke-opacity:1"
id="g23742"
- style="fill:none;stroke:#000000;stroke-width:0.99968439;stroke-opacity:1">
+ transform="translate(-1.863085e-7,0.53333)">
<g
- transform="translate(0.533324,-1.066663)"
+ style="fill:none;stroke:#000000;stroke-width:0.99968439;stroke-opacity:1"
id="g23744"
- style="fill:none;stroke:#000000;stroke-width:0.99968439;stroke-opacity:1" />
+ transform="translate(0.533324,-1.066663)" />
</g>
</g>
</g>
<g
- id="g16279"
- transform="translate(318,7.00009)" />
+ transform="translate(318,7.00009)"
+ id="g16279" />
<g
- id="g16397"
- transform="matrix(1.045454,0,0,1.0610941,-16.32706,109.05266)"
- style="opacity:0.45"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
- inkscape:export-ydpi="90" />
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
+ style="opacity:0.45"
+ transform="matrix(1.045454,0,0,1.0610941,-16.32706,109.05266)"
+ id="g16397" />
<g
- id="g16403"
- transform="matrix(1.000037,0,0,1.0187902,152.96764,39.785579)"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ transform="matrix(1.000037,0,0,1.0187902,152.96764,39.785579)"
+ id="g16403">
<g
- inkscape:export-ydpi="90"
- inkscape:export-xdpi="90"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- transform="matrix(0.9375,0,0,0.9375,192.125,77.25821)"
+ style="display:inline"
id="g16405"
- style="display:inline">
+ transform="matrix(0.9375,0,0,0.9375,192.125,77.25821)"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90">
<g
- id="g16407"
+ transform="matrix(1,0,0,1.037041,0,-6.074721)"
style="fill:#000000;fill-opacity:1"
- transform="matrix(1,0,0,1.037041,0,-6.074721)" />
+ id="g16407" />
<g
- transform="translate(-84.26666,-72.24656)"
- id="g16409">
+ id="g16409"
+ transform="translate(-84.26666,-72.24656)">
<g
- transform="translate(1.070738,1.59725)"
- id="g16411">
+ id="g16411"
+ transform="translate(1.070738,1.59725)">
<g
- id="g16413"
- transform="matrix(0.83365,0,0,0.857522,-5.083283,31.57021)">
+ transform="matrix(0.83365,0,0,0.857522,-5.083283,31.57021)"
+ id="g16413">
<g
- id="g16415"
- transform="translate(-1.863085e-7,0.53333)">
+ transform="translate(-1.863085e-7,0.53333)"
+ id="g16415">
<g
- id="g16417"
- transform="translate(0.533324,-1.066663)" />
+ transform="translate(0.533324,-1.066663)"
+ id="g16417" />
</g>
</g>
</g>
</g>
<g
- id="g16419"
- transform="matrix(0.903797,0,0,0.872724,-4.64464,27.13735)" />
+ transform="matrix(0.903797,0,0,0.872724,-4.64464,27.13735)"
+ id="g16419" />
<g
id="g16421" />
</g>
</g>
<g
- id="g16425"
- transform="matrix(1.000872,0,0,1.0462972,140.88404,50.499099)"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
- inkscape:export-ydpi="90" />
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
+ transform="matrix(1.000872,0,0,1.0462972,140.88404,50.499099)"
+ id="g16425" />
<g
- id="g28330"
- transform="translate(315.99999,18.99998)" />
+ transform="translate(315.99999,18.99998)"
+ id="g28330" />
<g
- id="g12156"
- transform="translate(-130.97687,-108)" />
+ transform="translate(-130.97687,-108)"
+ id="g12156" />
<g
- id="g12249"
+ transform="translate(-98,462.06404)"
style="opacity:0.65;display:inline"
- transform="translate(-98,462.06404)" />
+ id="g12249" />
<g
- style="display:inline"
+ id="g12255"
transform="translate(-53.00012,422.06403)"
- id="g12255" />
+ style="display:inline" />
<g
- transform="translate(-98,483.06404)"
+ id="g12325"
style="opacity:0.65;display:inline"
- id="g12325" />
+ transform="translate(-98,483.06404)" />
<g
- id="g12327"
+ style="display:inline"
transform="translate(-53.00012,443.06403)"
- style="display:inline" />
+ id="g12327" />
<g
- id="g11534"
- transform="translate(21,-1)" />
+ transform="translate(21,-1)"
+ id="g11534" />
<g
- id="g31245"
+ style="display:inline"
transform="matrix(0.425032,0.424791,0.425032,-0.424791,-342.55466,249.47119)"
- style="display:inline" />
+ id="g31245" />
<g
- transform="translate(-157,15.000007)"
+ id="g13244"
style="opacity:0.5"
- id="g13244" />
+ transform="translate(-157,15.000007)" />
<g
- id="g13375"
+ transform="translate(-177.01509,15.000007)"
style="opacity:0.3"
- transform="translate(-177.01509,15.000007)" />
+ id="g13375" />
<g
- id="g13383"
+ transform="translate(-143,15.000007)"
style="opacity:0.5"
- transform="translate(-143,15.000007)" />
+ id="g13383" />
<g
- transform="matrix(-1.0226846,0,0,1.0218469,-86.775576,130.3547)"
- id="g17210">
+ id="g17210"
+ transform="matrix(-1.0226846,0,0,1.0218469,-86.775576,130.3547)">
<g
- id="g17212"
- transform="matrix(0.83365,0,0,0.857522,-5.083283,31.57021)">
+ transform="matrix(0.83365,0,0,0.857522,-5.083283,31.57021)"
+ id="g17212">
<g
- id="g17214"
- transform="translate(-1.863085e-7,0.53333)">
+ transform="translate(-1.863085e-7,0.53333)"
+ id="g17214">
<g
- id="g17216"
- transform="translate(0.533324,-1.066663)" />
+ transform="translate(0.533324,-1.066663)"
+ id="g17216" />
</g>
</g>
</g>
<g
- transform="translate(-174.00091,22.99815)"
- id="g15532" />
+ id="g15532"
+ transform="translate(-174.00091,22.99815)" />
<g
- transform="translate(-111.96756,-108)"
- id="g15923">
+ id="g15923"
+ transform="translate(-111.96756,-108)">
<g
id="g15925" />
</g>
<g
- transform="translate(189.19394,55.494451)"
- id="g15616" />
+ id="g15616"
+ transform="translate(189.19394,55.494451)" />
<g
id="g17117" />
<g
- id="g17121"
- transform="translate(9,0)" />
+ transform="translate(9,0)"
+ id="g17121" />
<g
- transform="translate(6,4)"
- id="g17128" />
+ id="g17128"
+ transform="translate(6,4)" />
<g
- id="g17136"
- transform="translate(1,6)" />
+ transform="translate(1,6)"
+ id="g17136" />
<g
- id="g17149"
- transform="translate(8,7)" />
+ transform="translate(8,7)"
+ id="g17149" />
<rect
- style="opacity:0;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- id="rect17123"
- width="1"
- height="0"
+ y="523"
x="90"
- y="523" />
+ height="0"
+ width="1"
+ id="rect17123"
+ style="opacity:0;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
<g
- style="fill:#d45500;fill-opacity:1;display:inline"
+ id="g51988"
transform="translate(47,-247.0151)"
- id="g51988" />
+ style="fill:#d45500;fill-opacity:1;display:inline" />
<g
- style="display:inline"
+ transform="translate(10,254)"
id="g57337"
- transform="translate(10,254)" />
+ style="display:inline" />
<g
id="g23613" />
<rect
- style="opacity:0.01000001;fill:#b3b3b3;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- id="rect23719"
- width="0"
- height="0"
+ y="255"
x="547"
- y="255" />
+ height="0"
+ width="0"
+ id="rect23719"
+ style="opacity:0.01000001;fill:#b3b3b3;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
<g
- id="g24088"
- transform="translate(341,-57.00032)" />
+ transform="translate(341,-57.00032)"
+ id="g24088" />
<g
- transform="translate(361,-56.00032)"
- id="g24276" />
+ id="g24276"
+ transform="translate(361,-56.00032)" />
<g
- id="g22051"
- transform="translate(67,200.06499)"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
- inkscape:export-xdpi="90"
+ style="display:inline"
inkscape:export-ydpi="90"
- style="display:inline" />
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
+ transform="translate(67,200.06499)"
+ id="g22051" />
<g
- id="g40816"
- transform="translate(-23,0)">
+ transform="translate(-23,0)"
+ id="g40816">
<g
id="g40830" />
</g>
<g
- id="g23451"
- transform="translate(-393.99971,438.98222)" />
+ transform="translate(-393.99971,438.98222)"
+ id="g23451" />
<g
- id="g23461"
- transform="matrix(0.8342485,0,0,0.8354168,-433.47749,469.22699)" />
+ transform="matrix(0.8342485,0,0,0.8354168,-433.47749,469.22699)"
+ id="g23461" />
<g
- style="fill:#d45500;fill-opacity:1;display:inline"
+ id="g24176"
transform="translate(-65,-169.00755)"
- id="g24176" />
+ style="fill:#d45500;fill-opacity:1;display:inline" />
<g
- style="fill:none;stroke:#ffffff;stroke-width:1.50000143;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:7.40000034;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- transform="translate(-323.1613,214)"
- inkscape:export-ydpi="90"
- inkscape:export-xdpi="90"
+ id="g28643"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
- id="g28643" />
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ transform="translate(-323.1613,214)"
+ style="fill:none;stroke:#ffffff;stroke-width:1.50000143;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:7.40000034;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
<g
id="g29500" />
<g
- transform="translate(1,24.000004)"
+ style="opacity:0.3"
id="g29613"
- style="opacity:0.3" />
+ transform="translate(1,24.000004)" />
<g
- style="opacity:0.3"
+ transform="translate(0,18)"
id="g29692"
- transform="translate(0,18)" />
+ style="opacity:0.3" />
<g
- transform="matrix(-0.767131,0,0,0.788662,369.34347,270.08667)"
- style="fill:#000000;fill-opacity:1"
- id="g33443"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
- inkscape:export-ydpi="90" />
- <g
- transform="matrix(-0.693332,0,0,0.663699,372.90657,295.34421)"
- id="g33445"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
+ id="g33443"
+ style="fill:#000000;fill-opacity:1"
+ transform="matrix(-0.767131,0,0,0.788662,369.34347,270.08667)" />
+ <g
+ inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
- inkscape:export-ydpi="90" />
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
+ id="g33445"
+ transform="matrix(-0.693332,0,0,0.663699,372.90657,295.34421)" />
<g
- id="g33447"
+ transform="matrix(-1,0,0,1,762.99997,233.00003)"
style="opacity:0.3"
- transform="matrix(-1,0,0,1,762.99997,233.00003)" />
+ id="g33447" />
<g
- id="g77742"
+ transform="translate(-870.9421,-297.02038)"
style="fill:#ffeeaa;display:inline"
- transform="translate(-870.9421,-297.02038)" />
+ id="g77742" />
<g
- style="stroke:#ffffff;display:inline"
- transform="matrix(-1,0,0,-1,104.1613,262.99999)"
- inkscape:export-ydpi="90"
- inkscape:export-xdpi="90"
+ id="g34782"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\blender-cvs-windows\.blender\.blender\icons\jendrzych's iconset.png"
- id="g34782">
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ transform="matrix(-1,0,0,-1,104.1613,262.99999)"
+ style="stroke:#ffffff;display:inline">
<path
- d=""
- sodipodi:nodetypes="cz"
- id="path34784"
+ inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:1.60000002;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:7.40000034;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- inkscape:connector-curvature="0" />
+ id="path34784"
+ sodipodi:nodetypes="cz"
+ d="" />
</g>
<path
- style="fill:none;stroke:#ffffff;stroke-width:1.60000002;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:7.40000034;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- id="path34806"
- sodipodi:nodetypes="cz"
- d=""
- inkscape:connector-curvature="0" />
- <path
+ inkscape:connector-curvature="0"
d=""
sodipodi:nodetypes="cz"
- id="path34696"
+ id="path34806"
+ style="fill:none;stroke:#ffffff;stroke-width:1.60000002;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:7.40000034;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ <path
+ inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:1.60000002;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:7.40000034;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- inkscape:connector-curvature="0" />
+ id="path34696"
+ sodipodi:nodetypes="cz"
+ d="" />
<g
- transform="matrix(-1,0,0,1,-155,-228)"
+ id="g36040"
style="opacity:0.12000002"
- id="g36040" />
+ transform="matrix(-1,0,0,1,-155,-228)" />
<g
- style="fill:#d45500;fill-opacity:1;display:inline"
+ id="g36511"
transform="translate(250,-41.00755)"
- id="g36511" />
+ style="fill:#d45500;fill-opacity:1;display:inline" />
<rect
- style="opacity:0;fill:#fffeaa;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new"
- id="rect39658"
- width="1"
- height="0"
+ y="67"
x="-25"
- y="67" />
+ height="0"
+ width="1"
+ id="rect39658"
+ style="opacity:0;fill:#fffeaa;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" />
<rect
- style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new"
- id="rect39660"
- width="0"
- height="1"
+ y="66"
x="-24"
- y="66" />
+ height="1"
+ width="0"
+ id="rect39660"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" />
<g
- transform="translate(259,168)"
+ id="g40090"
mask="url(#mask38561)"
- id="g40090" />
+ transform="translate(259,168)" />
<g
- transform="translate(-810.9,-131)"
+ style="display:inline;enable-background:new"
id="g40730"
- style="display:inline;enable-background:new">
+ transform="translate(-810.9,-131)">
<g
- id="g40736"
+ style="display:inline;enable-background:new"
transform="translate(583.99999,91.500124)"
- style="display:inline;enable-background:new" />
+ id="g40736" />
</g>
<g
- inkscape:export-ydpi="90"
- inkscape:export-xdpi="90"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- transform="matrix(0.5478212,-0.56064,0.5419177,0.5545983,197.19518,557.21673)"
+ style="stroke-width:5.41920376;stroke-miterlimit:4;stroke-dasharray:none;display:inline"
id="g38570"
- style="stroke-width:5.41920376;stroke-miterlimit:4;stroke-dasharray:none;display:inline" />
+ transform="matrix(0.5478212,-0.56064,0.5419177,0.5545983,197.19518,557.21673)"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
<g
- id="g32752"
- inkscape:export-filename="C:\Documents and Settings\Pracownia\Moje dokumenty\Moje obrazy\BLENDER ICONS redesign\RELEASES\v. 2.5.06\prvicons v.2.5.06.png"
+ inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
+ inkscape:export-filename="C:\Documents and Settings\Pracownia\Moje dokumenty\Moje obrazy\BLENDER ICONS redesign\RELEASES\v. 2.5.06\prvicons v.2.5.06.png"
+ id="g32752">
<rect
- y="180"
- x="872"
- height="192"
- width="192"
+ style="opacity:0;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:5.39191818;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect30285"
- style="opacity:0;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:5.39191818;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ width="192"
+ height="192"
+ x="872"
+ y="180" />
<g
- inkscape:export-ydpi="90"
- inkscape:export-xdpi="90"
- inkscape:export-filename="C:\Documents and Settings\Pracowniaa\Moje dokumenty\Moje obrazy\BLENDER ICONS redesign\ver 2\IMAGE BROWSER ICONS.png"
- transform="translate(856,-203)"
+ style="opacity:0.3;display:inline;enable-background:new"
id="g21955"
- style="opacity:0.3;display:inline;enable-background:new">
+ transform="translate(856,-203)"
+ inkscape:export-filename="C:\Documents and Settings\Pracowniaa\Moje dokumenty\Moje obrazy\BLENDER ICONS redesign\ver 2\IMAGE BROWSER ICONS.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90">
<rect
- style="opacity:0;fill:#cccccc;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00000012;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- id="rect21957"
- width="48"
- height="48"
- x="108"
- y="430"
+ ry="0"
rx="2.4004419"
- ry="0" />
+ y="430"
+ x="108"
+ height="48"
+ width="48"
+ id="rect21957"
+ style="opacity:0;fill:#cccccc;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00000012;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
<g
id="g21959">
<path
- inkscape:connector-curvature="0"
- inkscape:export-ydpi="90"
- inkscape:export-xdpi="90"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- sodipodi:nodetypes="cccccc"
- id="path21961"
+ style="fill:url(#linearGradient21977);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;display:inline"
d="m 125.5,433.5 23,0 0,41 -33,0 0,-31 10,-10 z"
- style="fill:url(#linearGradient21977);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;display:inline" />
- <path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="cccc"
- id="path21963"
- style="opacity:0.7;fill:none;stroke:#ffffff;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
- d="m 147.25,434.5 c -4.875,0 -21.75,0 -21.75,0 m -8.9447,8.5 -0.0553,30"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90" />
- <path
- inkscape:connector-curvature="0"
- style="opacity:0.2;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter63011)"
- d="m 115,444 12,0 -1,-11 -11,11 z"
- id="path21965"
- sodipodi:nodetypes="cccc"
+ id="path21961"
+ sodipodi:nodetypes="cccccc"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
- clip-path="url(#clipPath13106)" />
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccc"
- id="path21967"
- style="fill:none;stroke:url(#linearGradient21979);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
- d="m 117.5,443.75 9,-2.5 0,-6"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ d="m 147.25,434.5 c -4.875,0 -21.75,0 -21.75,0 m -8.9447,8.5 -0.0553,30"
+ style="opacity:0.7;fill:none;stroke:#ffffff;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ id="path21963"
+ sodipodi:nodetypes="cccc"
+ inkscape:connector-curvature="0" />
+ <path
+ clip-path="url(#clipPath13106)"
inkscape:export-ydpi="90"
- clip-path="none" />
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ sodipodi:nodetypes="cccc"
+ id="path21965"
+ d="m 115,444 12,0 -1,-11 -11,11 z"
+ style="opacity:0.2;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter63011)"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
+ clip-path="none"
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- d="m 115.5,442.75 0,31.75 33,0 0,-41 -23.75,0 -9.25,9.25 z"
- style="fill:none;stroke:#333333;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
- id="path21969"
- sodipodi:nodetypes="cccccc" />
+ d="m 117.5,443.75 9,-2.5 0,-6"
+ style="fill:none;stroke:url(#linearGradient21979);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="path21967"
+ sodipodi:nodetypes="ccc"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- style="opacity:0.16000001;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline;filter:url(#filter63011)"
- d="m 116,443 11,1 -2,-10 -9,9 z"
- id="path21971"
- sodipodi:nodetypes="cccc"
+ sodipodi:nodetypes="cccccc"
+ id="path21969"
+ style="fill:none;stroke:#333333;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ d="m 115.5,442.75 0,31.75 33,0 0,-41 -23.75,0 -9.25,9.25 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
- clip-path="url(#clipPath13106)" />
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
+ clip-path="url(#clipPath13106)"
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- sodipodi:nodetypes="cccccc"
- id="path21973"
- d="m 116,443 0.0108,0.72434 L 126,441 l 0,-7 -1,0 -9,9 z"
- style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ sodipodi:nodetypes="cccc"
+ id="path21971"
+ d="m 116,443 11,1 -2,-10 -9,9 z"
+ style="opacity:0.16000001;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline;filter:url(#filter63011)"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- inkscape:export-ydpi="90"
- inkscape:export-xdpi="90"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
+ d="m 116,443 0.0108,0.72434 L 126,441 l 0,-7 -1,0 -9,9 z"
+ id="path21973"
+ sodipodi:nodetypes="cccccc"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- d="m 147.5,435 0,38.5 -30.5,0"
- style="opacity:0.15;fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ inkscape:connector-curvature="0" />
+ <path
+ sodipodi:nodetypes="ccc"
id="path21975"
- sodipodi:nodetypes="ccc" />
+ style="opacity:0.15;fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ d="m 147.5,435 0,38.5 -30.5,0"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ inkscape:connector-curvature="0" />
</g>
</g>
<g
id="g30335">
<g
- id="g21367"
- transform="translate(760,-202)">
+ transform="translate(760,-202)"
+ id="g21367">
<path
- inkscape:connector-curvature="0"
- inkscape:export-ydpi="90"
- inkscape:export-xdpi="90"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- sodipodi:nodetypes="cccccc"
- id="path21369"
+ style="fill:url(#linearGradient30321);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;display:inline"
d="m 125.5,433.5 23,0 0,41 -33,0 0,-31 10,-10 z"
- style="fill:url(#linearGradient30321);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;display:inline" />
- <path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="cccc"
- id="path21371"
- style="opacity:0.7;fill:none;stroke:#ffffff;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
- d="m 147.25,434.5 c -4.875,0 -21.75,0 -21.75,0 m -8.9447,8.5 -0.0553,30"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90" />
- <path
- inkscape:connector-curvature="0"
- style="opacity:0.2;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter63011)"
- d="m 115,444 12,0 -1,-11 -11,11 z"
- id="path21373"
- sodipodi:nodetypes="cccc"
+ id="path21369"
+ sodipodi:nodetypes="cccccc"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
- clip-path="url(#clipPath13106)" />
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccc"
- id="path21375"
- style="fill:none;stroke:url(#linearGradient30323);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
- d="m 117.5,443.75 9,-2.5 0,-6"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ d="m 147.25,434.5 c -4.875,0 -21.75,0 -21.75,0 m -8.9447,8.5 -0.0553,30"
+ style="opacity:0.7;fill:none;stroke:#ffffff;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ id="path21371"
+ sodipodi:nodetypes="cccc"
+ inkscape:connector-curvature="0" />
+ <path
+ clip-path="url(#clipPath13106)"
inkscape:export-ydpi="90"
- clip-path="none" />
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ sodipodi:nodetypes="cccc"
+ id="path21373"
+ d="m 115,444 12,0 -1,-11 -11,11 z"
+ style="opacity:0.2;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter63011)"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
+ clip-path="none"
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- d="m 115.5,442.75 0,31.75 33,0 0,-41 -23.75,0 -9.25,9.25 z"
- style="fill:none;stroke:#333333;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
- id="path21377"
- sodipodi:nodetypes="cccccc" />
+ d="m 117.5,443.75 9,-2.5 0,-6"
+ style="fill:none;stroke:url(#linearGradient30323);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="path21375"
+ sodipodi:nodetypes="ccc"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- style="opacity:0.16000001;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline;filter:url(#filter63011)"
- d="m 116,443 11,1 -2,-10 -9,9 z"
- id="path21569"
- sodipodi:nodetypes="cccc"
+ sodipodi:nodetypes="cccccc"
+ id="path21377"
+ style="fill:none;stroke:#333333;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ d="m 115.5,442.75 0,31.75 33,0 0,-41 -23.75,0 -9.25,9.25 z"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
- clip-path="url(#clipPath13106)" />
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
+ clip-path="url(#clipPath13106)"
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- sodipodi:nodetypes="cccccc"
- id="path21379"
- d="m 116,443 0.0108,0.72434 L 126,441 l 0,-7 -1,0 -9,9 z"
- style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ sodipodi:nodetypes="cccc"
+ id="path21569"
+ d="m 116,443 11,1 -2,-10 -9,9 z"
+ style="opacity:0.16000001;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline;filter:url(#filter63011)"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- inkscape:export-ydpi="90"
- inkscape:export-xdpi="90"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
+ d="m 116,443 0.0108,0.72434 L 126,441 l 0,-7 -1,0 -9,9 z"
+ id="path21379"
+ sodipodi:nodetypes="cccccc"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- d="m 147.5,435 0,38.5 -30.5,0"
- style="opacity:0.15;fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ inkscape:connector-curvature="0" />
+ <path
+ sodipodi:nodetypes="ccc"
id="path21381"
- sodipodi:nodetypes="ccc" />
+ style="opacity:0.15;fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ d="m 147.5,435 0,38.5 -30.5,0"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ inkscape:connector-curvature="0" />
</g>
<path
- inkscape:connector-curvature="0"
- style="font-size:33.49144363px;font-style:normal;font-weight:normal;fill:#214478;fill-opacity:1;stroke:none;display:inline;font-family:Bitstream Vera Sans"
- d="m 891.07148,245 -0.0715,9 2.39012,0 C 896,254 896,253 896.5,251 l 0.5,0 0,7 -0.5,0 c -0.5,-2 -0.5,-3 -3.10988,-3 L 891,255 l 0,7 c 0,2.5 1,3.25 3.14146,3.39973 l -0.004,0.60029 L 885,266 l 0.004,-0.60029 C 887,265.25 888,264.5 888.00001,262 L 888,248 c 0,-2.5 -1,-3.25 -3,-3.5 l 0,-0.5 16,0 0,5 -0.5,0 c -0.50001,-1.99999 -1.5,-4 -4.5,-4 l -4.92852,0 z"
+ sodipodi:nodetypes="ccccccccccccccccccccccc"
id="text13209"
- sodipodi:nodetypes="ccccccccccccccccccccccc" />
+ d="m 891.07148,245 -0.0715,9 2.39012,0 C 896,254 896,253 896.5,251 l 0.5,0 0,7 -0.5,0 c -0.5,-2 -0.5,-3 -3.10988,-3 L 891,255 l 0,7 c 0,2.5 1,3.25 3.14146,3.39973 l -0.004,0.60029 L 885,266 l 0.004,-0.60029 C 887,265.25 888,264.5 888.00001,262 L 888,248 c 0,-2.5 -1,-3.25 -3,-3.5 l 0,-0.5 16,0 0,5 -0.5,0 c -0.50001,-1.99999 -1.5,-4 -4.5,-4 l -4.92852,0 z"
+ style="font-size:33.49144363px;font-style:normal;font-weight:normal;fill:#214478;fill-opacity:1;stroke:none;display:inline;font-family:Bitstream Vera Sans"
+ inkscape:connector-curvature="0" />
</g>
<g
- style="display:inline;enable-background:new"
- id="g21625"
- transform="translate(904,-154)"
- inkscape:export-filename="C:\Documents and Settings\Pracowniaa\Moje dokumenty\Moje obrazy\BLENDER ICONS redesign\ver 2\IMAGE BROWSER ICONS.png"
+ inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
+ inkscape:export-filename="C:\Documents and Settings\Pracowniaa\Moje dokumenty\Moje obrazy\BLENDER ICONS redesign\ver 2\IMAGE BROWSER ICONS.png"
+ transform="translate(904,-154)"
+ id="g21625"
+ style="display:inline;enable-background:new">
<rect
- ry="0"
- rx="2.4004419"
- y="430"
- x="108"
- height="48"
- width="48"
+ style="opacity:0;fill:#cccccc;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00000012;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect21627"
- style="opacity:0;fill:#cccccc;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00000012;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ width="48"
+ height="48"
+ x="108"
+ y="430"
+ rx="2.4004419"
+ ry="0" />
<g
id="g21629">
<path
- inkscape:connector-curvature="0"
- style="fill:url(#linearGradient21647);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;display:inline"
- d="m 125.5,433.5 23,0 0,41 -33,0 0,-31 10,-10 z"
- id="path21631"
- sodipodi:nodetypes="cccccc"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
- inkscape:export-ydpi="90" />
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ sodipodi:nodetypes="cccccc"
+ id="path21631"
+ d="m 125.5,433.5 23,0 0,41 -33,0 0,-31 10,-10 z"
+ style="fill:url(#linearGradient21647);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;display:inline"
+ inkscape:connector-curvature="0" />
<g
- style="opacity:0.5;fill:#000000;display:inline"
+ transform="matrix(1.2499985,0,0,1,-87.6203,-147.85351)"
id="g16261"
- transform="matrix(1.2499985,0,0,1,-87.6203,-147.85351)">
+ style="opacity:0.5;fill:#000000;display:inline">
<rect
- style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate"
- id="rect35099"
- width="17.600004"
- height="1"
- x="167.69646"
- y="598.85352"
+ ry="0.065390877"
rx="0.12125195"
- ry="0.065390877" />
- <rect
- style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate"
- id="rect35101"
- width="17.600004"
- height="1"
+ y="598.85352"
x="167.69646"
- y="600.85352"
- rx="0.12125195"
- ry="0.065390877" />
- <rect
- style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate"
- id="rect15690"
- width="17.600004"
height="1"
- x="167.69646"
- y="602.85352"
- rx="0.12125195"
- ry="0.065390877" />
- <rect
- style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate"
- id="rect15692"
width="17.600004"
- height="1"
- x="167.69646"
- y="604.85352"
- rx="0.12125195"
- ry="0.065390877" />
+ id="rect35099"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate" />
<rect
- style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate"
- id="rect15694"
- width="17.600004"
- height="1"
- x="167.69646"
- y="606.85352"
+ ry="0.065390877"
rx="0.12125195"
- ry="0.065390877" />
- <rect
- style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate"
- id="rect15696"
- width="17.600004"
- height="1"
+ y="600.85352"
x="167.69646"
- y="608.85352"
- rx="0.12125195"
- ry="0.065390877" />
- <rect
- style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate"
- id="rect15698"
- width="17.600004"
height="1"
- x="167.69646"
- y="610.85352"
- rx="0.12125195"
- ry="0.065390877" />
+ width="17.600004"
+ id="rect35101"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate" />
<rect
- style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate"
- id="rect15700"
+ ry="0.065390877"
+ rx="0.12125195"
+ y="602.85352"
+ x="167.69646"
+ height="1"
width="17.600004"
+ id="rect15690"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate" />
+ <rect
+ ry="0.065390877"
+ rx="0.12125195"
+ y="604.85352"
+ x="167.69646"
height="1"
+ width="17.600004"
+ id="rect15692"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate" />
+ <rect
+ ry="0.065390877"
+ rx="0.12125195"
+ y="606.85352"
x="167.69646"
- y="612.85352"
+ height="1"
+ width="17.600004"
+ id="rect15694"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate" />
+ <rect
+ ry="0.065390877"
rx="0.12125195"
- ry="0.065390877" />
+ y="608.85352"
+ x="167.69646"
+ height="1"
+ width="17.600004"
+ id="rect15696"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate" />
<rect
- style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate"
- id="rect15732"
- width="14.400002"
+ ry="0.065390877"
+ rx="0.12125195"
+ y="610.85352"
+ x="167.69646"
height="1"
+ width="17.600004"
+ id="rect15698"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate" />
+ <rect
+ ry="0.065390877"
+ rx="0.12125195"
+ y="612.85352"
x="167.69646"
- y="614.85352"
+ height="1"
+ width="17.600004"
+ id="rect15700"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate" />
+ <rect
+ ry="0.065390877"
rx="0.09920612"
- ry="0.065390877" />
+ y="614.85352"
+ x="167.69646"
+ height="1"
+ width="14.400002"
+ id="rect15732"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate" />
<g
- transform="translate(150.89645,557.85352)"
+ style="fill:#000000;display:inline"
id="g4849"
- style="fill:#000000;display:inline">
+ transform="translate(150.89645,557.85352)">
<rect
- ry="0.065390877"
- rx="0.12125195"
- y="29"
- x="16.799992"
- height="1"
- width="17.600004"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate"
id="rect15736"
- style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate" />
- <rect
- ry="0.065390877"
- rx="0.12125195"
- y="31"
- x="16.799992"
- height="1"
width="17.600004"
- id="rect15738"
- style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate" />
- <rect
- ry="0.065390877"
- rx="0.12125195"
- y="33"
- x="16.799992"
height="1"
- width="17.600004"
- id="rect15740"
- style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate" />
- <rect
- ry="0.065390877"
- rx="0.12125195"
- y="35"
x="16.799992"
- height="1"
+ y="29"
+ rx="0.12125195"
+ ry="0.065390877" />
+ <rect
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate"
+ id="rect15738"
width="17.600004"
- id="rect15742"
- style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate" />
+ height="1"
+ x="16.799992"
+ y="31"
+ rx="0.12125195"
+ ry="0.065390877" />
<rect
- ry="0.065390877"
- rx="0.055114571"
- y="37"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate"
+ id="rect15740"
+ width="17.600004"
+ height="1"
x="16.799992"
+ y="33"
+ rx="0.12125195"
+ ry="0.065390877" />
+ <rect
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate"
+ id="rect15742"
+ width="17.600004"
height="1"
- width="8.0000095"
+ x="16.799992"
+ y="35"
+ rx="0.12125195"
+ ry="0.065390877" />
+ <rect
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate"
id="rect15744"
- style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate" />
+ width="8.0000095"
+ height="1"
+ x="16.799992"
+ y="37"
+ rx="0.055114571"
+ ry="0.065390877" />
</g>
<rect
- ry="0.065390304"
- rx="0.0057410933"
- y="617.85352"
- x="184.49646"
- height="0.99999124"
- width="0.83333319"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate"
id="rect16334"
- style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block;overflow:visible;enable-background:accumulate" />
+ width="0.83333319"
+ height="0.99999124"
+ x="184.49646"
+ y="617.85352"
+ rx="0.0057410933"
+ ry="0.065390304" />
</g>
<path
- inkscape:connector-curvature="0"
- inkscape:export-ydpi="90"
- inkscape:export-xdpi="90"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- d="m 147.25,434.5 c -4.875,0 -21.75,0 -21.75,0 m -8.9447,8.5 -0.0553,30"
- style="opacity:0.7;fill:none;stroke:#ffffff;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ sodipodi:nodetypes="cccc"
id="path21633"
- sodipodi:nodetypes="cccc" />
- <path
- inkscape:connector-curvature="0"
- clip-path="url(#clipPath13106)"
- inkscape:export-ydpi="90"
- inkscape:export-xdpi="90"
+ style="opacity:0.7;fill:none;stroke:#ffffff;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ d="m 147.25,434.5 c -4.875,0 -21.75,0 -21.75,0 m -8.9447,8.5 -0.0553,30"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- sodipodi:nodetypes="cccc"
- id="path21635"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ inkscape:connector-curvature="0" />
+ <path
+ style="opacity:0.2;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter63011)"
d="m 115,444 12,0 -1,-11 -11,11 z"
- style="opacity:0.2;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter63011)" />
+ id="path21635"
+ sodipodi:nodetypes="cccc"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ clip-path="url(#clipPath13106)"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccc"
+ id="path21637"
+ style="fill:none;stroke:url(#linearGradient21649);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 117.5,443.75 9,-2.5 0,-6"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
clip-path="none"
+ inkscape:connector-curvature="0" />
+ <path
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- d="m 117.5,443.75 9,-2.5 0,-6"
- style="fill:none;stroke:url(#linearGradient21649);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
- id="path21637"
- sodipodi:nodetypes="ccc" />
- <path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="cccccc"
- id="path21639"
- style="fill:none;stroke:#333333;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
d="m 115.5,442.75 0,31.75 33,0 0,-41 -23.75,0 -9.25,9.25 z"
+ style="fill:none;stroke:#333333;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ id="path21639"
+ sodipodi:nodetypes="cccccc"
+ inkscape:connector-curvature="0" />
+ <path
+ style="opacity:0.16000001;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline;filter:url(#filter63011)"
+ d="m 116,443 11,1 -2,-10 -9,9 z"
+ id="path21641"
+ sodipodi:nodetypes="cccc"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
- inkscape:export-ydpi="90" />
- <path
- inkscape:connector-curvature="0"
+ inkscape:export-ydpi="90"
clip-path="url(#clipPath13106)"
+ inkscape:connector-curvature="0" />
+ <path
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- sodipodi:nodetypes="cccc"
- id="path21641"
- d="m 116,443 11,1 -2,-10 -9,9 z"
- style="opacity:0.16000001;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline;filter:url(#filter63011)" />
- <path
- inkscape:connector-curvature="0"
- style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
- d="m 116,443 0.0108,0.72434 L 126,441 l 0,-7 -1,0 -9,9 z"
- id="path21643"
sodipodi:nodetypes="cccccc"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90" />
+ id="path21643"
+ d="m 116,443 0.0108,0.72434 L 126,441 l 0,-7 -1,0 -9,9 z"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
+ inkscape:connector-curvature="0" />
<g
- id="g35119"
+ style="display:inline"
transform="translate(2,-160.99999)"
- style="display:inline">
+ id="g35119">
<g
- style="display:inline"
+ id="g16097"
transform="translate(105.39645,589.71201)"
- id="g16097">
+ style="display:inline">
<g
- id="g16099"
+ transform="matrix(0.229703,0,0,0.229703,4.967081,4.244972)"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-miterlimit:4"
- transform="matrix(0.229703,0,0,0.229703,4.967081,4.244972)">
+ id="g16099">
<radialGradient
- id="radialGradient16101"
- cx="20.892099"
- cy="114.5684"
- r="5.256"
- fx="20.892099"
+ gradientUnits="userSpaceOnUse"
fy="114.5684"
- gradientUnits="userSpaceOnUse">
+ fx="20.892099"
+ r="5.256"
+ cy="114.5684"
+ cx="20.892099"
+ id="radialGradient16101">
<stop
- offset="0"
+ id="stop16103"
style="stop-color:#F0F0F0"
- id="stop16103" />
+ offset="0" />
<stop
- offset="1"
+ id="stop16105"
style="stop-color:#474747"
- id="stop16105" />
+ offset="1" />
</radialGradient>
<radialGradient
- id="radialGradient16109"
- cx="20.892099"
- cy="64.567902"
- r="5.257"
- fx="20.892099"
+ gradientUnits="userSpaceOnUse"
fy="64.567902"
- gradientUnits="userSpaceOnUse">
+ fx="20.892099"
+ r="5.257"
+ cy="64.567902"
+ cx="20.892099"
+ id="radialGradient16109">
<stop
- offset="0"
+ id="stop16111"
style="stop-color:#F0F0F0"
- id="stop16111" />
+ offset="0" />
<stop
- offset="1"
+ id="stop16113"
style="stop-color:#474747"
- id="stop16113" />
+ offset="1" />
</radialGradient>
</g>
<path
- inkscape:connector-curvature="0"
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;display:inline"
+ id="path16107"
d="m 12.85355,31.53813 c 0,0.552274 -0.447803,0.99986 -1,0.99986 -0.552477,0 -1,-0.447865 -1,-0.99986 0,-0.552554 0.447803,-1.00014 1,-1.00014 0.552197,0 1,0.447866 1,1.00014 l 0,0 0,0 0,0 z"
- id="path16107" />
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;display:inline"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- style="fill:url(#radialGradient21565);fill-rule:nonzero;stroke:none"
+ id="path16117"
d="m 12.60355,31.288131 c 0,0.552274 -0.447803,0.999859 -1,0.999859 -0.552477,0 -1,-0.447865 -1,-0.999859 0,-0.552556 0.447803,-1.000141 1,-1.000141 0.552197,0 1,0.447866 1,1.000141 z"
- id="path16117" />
+ style="fill:url(#radialGradient21565);fill-rule:nonzero;stroke:none"
+ inkscape:connector-curvature="0" />
</g>
<g
- id="g16131"
+ style="display:inline"
transform="translate(105.39645,579.71201)"
- style="display:inline">
+ id="g16131">
<g
- transform="matrix(0.229703,0,0,0.229703,4.967081,4.244972)"
+ id="g16133"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-miterlimit:4"
- id="g16133">
+ transform="matrix(0.229703,0,0,0.229703,4.967081,4.244972)">
<radialGradient
- gradientUnits="userSpaceOnUse"
- fy="114.5684"
- fx="20.892099"
- r="5.256"
- cy="114.5684"
+ id="radialGradient16135"
cx="20.892099"
- id="radialGradient16135">
+ cy="114.5684"
+ r="5.256"
+ fx="20.892099"
+ fy="114.5684"
+ gradientUnits="userSpaceOnUse">
<stop
- id="stop16137"
+ offset="0"
style="stop-color:#F0F0F0"
- offset="0" />
+ id="stop16137" />
<stop
- id="stop16140"
+ offset="1"
style="stop-color:#474747"
- offset="1" />
+ id="stop16140" />
</radialGradient>
<radialGradient
- gradientUnits="userSpaceOnUse"
- fy="64.567902"
- fx="20.892099"
- r="5.257"
- cy="64.567902"
+ id="radialGradient16142"
cx="20.892099"
- id="radialGradient16142">
+ cy="64.567902"
+ r="5.257"
+ fx="20.892099"
+ fy="64.567902"
+ gradientUnits="userSpaceOnUse">
<stop
- id="stop16144"
+ offset="0"
style="stop-color:#F0F0F0"
- offset="0" />
+ id="stop16144" />
<stop
- id="stop16146"
+ offset="1"
style="stop-color:#474747"
- offset="1" />
+ id="stop16146" />
</radialGradient>
</g>
<path
- inkscape:connector-curvature="0"
- id="path35139"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;display:inline"
d="m 12.85355,31.53813 c 0,0.552274 -0.447803,0.99986 -1,0.99986 -0.552477,0 -1,-0.447865 -1,-0.99986 0,-0.552554 0.447803,-1.00014 1,-1.00014 0.552197,0 1,0.447866 1,1.00014 l 0,0 0,0 0,0 z"
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;display:inline" />
+ id="path35139"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- id="path35141"
+ style="fill:url(#radialGradient21567);fill-rule:nonzero;stroke:none"
d="m 12.60355,31.288131 c 0,0.552274 -0.447803,0.999859 -1,0.999859 -0.552477,0 -1,-0.447865 -1,-0.999859 0,-0.552556 0.447803,-1.000141 1,-1.000141 0.552197,0 1,0.447866 1,1.000141 z"
- style="fill:url(#radialGradient21567);fill-rule:nonzero;stroke:none" />
+ id="path35141"
+ inkscape:connector-curvature="0" />
</g>
</g>
<path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccc"
- id="path21645"
- style="opacity:0.15;fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
- d="m 147.5,435 0,38.5 -30.5,0"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
- inkscape:export-ydpi="90" />
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ d="m 147.5,435 0,38.5 -30.5,0"
+ style="opacity:0.15;fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ id="path21645"
+ sodipodi:nodetypes="ccc"
+ inkscape:connector-curvature="0" />
</g>
</g>
<g
- style="display:inline;enable-background:new"
- id="g21572"
- transform="translate(808,-203)"
- inkscape:export-filename="C:\Documents and Settings\Pracowniaa\Moje dokumenty\Moje obrazy\BLENDER ICONS redesign\ver 2\IMAGE BROWSER ICONS.png"
+ inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
+ inkscape:export-filename="C:\Documents and Settings\Pracowniaa\Moje dokumenty\Moje obrazy\BLENDER ICONS redesign\ver 2\IMAGE BROWSER ICONS.png"
+ transform="translate(808,-203)"
+ id="g21572"
+ style="display:inline;enable-background:new">
<rect
- ry="0"
- rx="2.4004419"
- y="430"
- x="108"
- height="48"
- width="48"
+ style="opacity:0;fill:#cccccc;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00000012;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect21574"
- style="opacity:0;fill:#cccccc;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00000012;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ width="48"
+ height="48"
+ x="108"
+ y="430"
+ rx="2.4004419"
+ ry="0" />
<g
id="g21576">
<path
- inkscape:connector-curvature="0"
- style="fill:url(#linearGradient21594);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;display:inline"
- d="m 125.5,433.5 23,0 0,41 -33,0 0,-31 10,-10 z"
- id="path21578"
- sodipodi:nodetypes="cccccc"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90" />
- <path
- inkscape:connector-curvature="0"
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- d="m 147.25,434.5 c -4.875,0 -21.75,0 -21.75,0 m -8.9447,8.5 -0.0553,30"
- style="opacity:0.7;fill:none;stroke:#ffffff;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
- id="path21580"
- sodipodi:nodetypes="cccc" />
- <path
- inkscape:connector-curvature="0"
- clip-path="url(#clipPath13106)"
- inkscape:export-ydpi="90"
- inkscape:export-xdpi="90"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- sodipodi:nodetypes="cccc"
- id="path21582"
- d="m 115,444 12,0 -1,-11 -11,11 z"
- style="opacity:0.2;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter63011)" />
- <path
- inkscape:connector-curvature="0"
- clip-path="none"
- inkscape:export-ydpi="90"
- inkscape:export-xdpi="90"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- d="m 117.5,443.75 9,-2.5 0,-6"
- style="fill:none;stroke:url(#linearGradient21596);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
- id="path21584"
- sodipodi:nodetypes="ccc" />
- <path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="cccccc"
- id="path21586"
- style="fill:none;stroke:#333333;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
- d="m 115.5,442.75 0,31.75 33,0 0,-41 -23.75,0 -9.25,9.25 z"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90" />
- <path
- inkscape:connector-curvature="0"
- clip-path="url(#clipPath13106)"
- inkscape:export-ydpi="90"
- inkscape:export-xdpi="90"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- sodipodi:nodetypes="cccc"
- id="path21588"
- d="m 116,443 11,1 -2,-10 -9,9 z"
- style="opacity:0.16000001;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline;filter:url(#filter63011)" />
- <path
- inkscape:connector-curvature="0"
- style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
- d="m 116,443 0.0108,0.72434 L 126,441 l 0,-7 -1,0 -9,9 z"
- id="path21590"
sodipodi:nodetypes="cccccc"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90" />
- <path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccc"
- id="path21592"
- style="opacity:0.15;fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
- d="m 147.5,435 0,38.5 -30.5,0"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90" />
- </g>
- </g>
- <g
- id="g30382">
- <g
- id="g23655"
- transform="translate(760,-154)">
- <path
- inkscape:connector-curvature="0"
- inkscape:export-ydpi="90"
- inkscape:export-xdpi="90"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- sodipodi:nodetypes="cccccc"
- id="path23657"
+ id="path21578"
d="m 125.5,433.5 23,0 0,41 -33,0 0,-31 10,-10 z"
- style="fill:url(#linearGradient30368);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;display:inline" />
+ style="fill:url(#linearGradient21594);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;display:inline"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc"
- id="path23659"
+ id="path21580"
style="opacity:0.7;fill:none;stroke:#ffffff;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
d="m 147.25,434.5 c -4.875,0 -21.75,0 -21.75,0 m -8.9447,8.5 -0.0553,30"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
- inkscape:export-ydpi="90" />
+ inkscape:export-ydpi="90"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
style="opacity:0.2;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter63011)"
d="m 115,444 12,0 -1,-11 -11,11 z"
- id="path23661"
+ id="path21582"
sodipodi:nodetypes="cccc"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
- clip-path="url(#clipPath13106)" />
+ clip-path="url(#clipPath13106)"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
sodipodi:nodetypes="ccc"
- id="path23663"
- style="fill:none;stroke:url(#linearGradient30370);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="path21584"
+ style="fill:none;stroke:url(#linearGradient21596);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 117.5,443.75 9,-2.5 0,-6"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
- clip-path="none" />
+ clip-path="none"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
d="m 115.5,442.75 0,31.75 33,0 0,-41 -23.75,0 -9.25,9.25 z"
style="fill:none;stroke:#333333;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
- id="path23665"
- sodipodi:nodetypes="cccccc" />
+ id="path21586"
+ sodipodi:nodetypes="cccccc"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
style="opacity:0.16000001;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline;filter:url(#filter63011)"
d="m 116,443 11,1 -2,-10 -9,9 z"
- id="path23667"
+ id="path21588"
sodipodi:nodetypes="cccc"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
- clip-path="url(#clipPath13106)" />
+ clip-path="url(#clipPath13106)"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
sodipodi:nodetypes="cccccc"
- id="path23669"
+ id="path21590"
d="m 116,443 0.0108,0.72434 L 126,441 l 0,-7 -1,0 -9,9 z"
- style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
d="m 147.5,435 0,38.5 -30.5,0"
style="opacity:0.15;fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ id="path21592"
+ sodipodi:nodetypes="ccc"
+ inkscape:connector-curvature="0" />
+ </g>
+ </g>
+ <g
+ id="g30382">
+ <g
+ transform="translate(760,-154)"
+ id="g23655">
+ <path
+ style="fill:url(#linearGradient30368);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;display:inline"
+ d="m 125.5,433.5 23,0 0,41 -33,0 0,-31 10,-10 z"
+ id="path23657"
+ sodipodi:nodetypes="cccccc"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ inkscape:connector-curvature="0" />
+ <path
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ d="m 147.25,434.5 c -4.875,0 -21.75,0 -21.75,0 m -8.9447,8.5 -0.0553,30"
+ style="opacity:0.7;fill:none;stroke:#ffffff;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ id="path23659"
+ sodipodi:nodetypes="cccc"
+ inkscape:connector-curvature="0" />
+ <path
+ clip-path="url(#clipPath13106)"
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ sodipodi:nodetypes="cccc"
+ id="path23661"
+ d="m 115,444 12,0 -1,-11 -11,11 z"
+ style="opacity:0.2;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter63011)"
+ inkscape:connector-curvature="0" />
+ <path
+ clip-path="none"
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ d="m 117.5,443.75 9,-2.5 0,-6"
+ style="fill:none;stroke:url(#linearGradient30370);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="path23663"
+ sodipodi:nodetypes="ccc"
+ inkscape:connector-curvature="0" />
+ <path
+ sodipodi:nodetypes="cccccc"
+ id="path23665"
+ style="fill:none;stroke:#333333;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ d="m 115.5,442.75 0,31.75 33,0 0,-41 -23.75,0 -9.25,9.25 z"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ inkscape:connector-curvature="0" />
+ <path
+ clip-path="url(#clipPath13106)"
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ sodipodi:nodetypes="cccc"
+ id="path23667"
+ d="m 116,443 11,1 -2,-10 -9,9 z"
+ style="opacity:0.16000001;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline;filter:url(#filter63011)"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
+ d="m 116,443 0.0108,0.72434 L 126,441 l 0,-7 -1,0 -9,9 z"
+ id="path23669"
+ sodipodi:nodetypes="cccccc"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ inkscape:connector-curvature="0" />
+ <path
+ sodipodi:nodetypes="ccc"
id="path23671"
- sodipodi:nodetypes="ccc" />
+ style="opacity:0.15;fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ d="m 147.5,435 0,38.5 -30.5,0"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ inkscape:connector-curvature="0" />
</g>
<path
- inkscape:connector-curvature="0"
- style="fill:#112b00;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- d="m 888,295 1,0 0,14 -1,0 0,-14 z"
+ sodipodi:nodetypes="ccccc"
id="path23675"
- sodipodi:nodetypes="ccccc" />
+ d="m 888,295 1,0 0,14 -1,0 0,-14 z"
+ style="fill:#112b00;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- id="path23677"
+ sodipodi:nodetypes="ccccc"
+ style="fill:#112b00;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="m 900,294 1.00002,-1 0,14 -1.00002,0 0,-13 z"
+ id="path23677"
+ inkscape:connector-curvature="0" />
+ <path
style="fill:#112b00;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- sodipodi:nodetypes="ccccc" />
+ d="m 901.00003,292 0,2.25 -13.00002,2 0,-2.25 13.00002,-2 z"
+ id="path23679"
+ sodipodi:nodetypes="ccccc"
+ inkscape:connector-curvature="0" />
+ <g
+ transform="matrix(1.1428564,0,0,1.2000001,822.71436,-355.40005)"
+ id="g23681">
+ <path
+ sodipodi:type="arc"
+ style="fill:#112b00;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path23683"
+ sodipodi:cx="53"
+ sodipodi:cy="554"
+ sodipodi:rx="4.5"
+ sodipodi:ry="2.25"
+ d="m 57.5,554 c 0,1.24264 -2.014719,2.25 -4.5,2.25 -2.485281,0 -4.5,-1.00736 -4.5,-2.25 0,-1.24264 2.014719,-2.25 4.5,-2.25 2.485281,0 4.5,1.00736 4.5,2.25 z"
+ transform="matrix(0.7630859,-0.2494396,0.2996015,0.9926766,-151.92281,17.77746)" />
+ <path
+ clip-path="url(#clipPath20586)"
+ inkscape:transform-center-y="0.3813435"
+ transform="matrix(0.3848865,-0.1700959,0.2278131,0.3626733,-93.107467,361.59408)"
+ d="m 57.5,554 c 0,1.24264 -2.014719,2.25 -4.5,2.25 -2.485281,0 -4.5,-1.00736 -4.5,-2.25 0,-1.24264 2.014719,-2.25 4.5,-2.25 2.485281,0 4.5,1.00736 4.5,2.25 z"
+ sodipodi:ry="2.25"
+ sodipodi:rx="4.5"
+ sodipodi:cy="554"
+ sodipodi:cx="53"
+ id="path23685"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter20578);enable-background:accumulate"
+ sodipodi:type="arc" />
+ </g>
<path
- inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc"
- id="path23679"
- d="m 901.00003,292 0,2.25 -13.00002,2 0,-2.25 13.00002,-2 z"
- style="fill:#112b00;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ id="path23694"
+ d="m 901.00003,292 -1e-5,1 -13.00002,2 10e-6,-1 13.00002,-2 z"
+ style="opacity:0.38999999;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ inkscape:connector-curvature="0" />
<g
- id="g23681"
- transform="matrix(1.1428564,0,0,1.2000001,822.71436,-355.40005)">
+ id="g23717"
+ transform="matrix(1.1428564,0,0,1.2000001,834.71436,-357.40005)">
<path
transform="matrix(0.7630859,-0.2494396,0.2996015,0.9926766,-151.92281,17.77746)"
d="m 57.5,554 c 0,1.24264 -2.014719,2.25 -4.5,2.25 -2.485281,0 -4.5,-1.00736 -4.5,-2.25 0,-1.24264 2.014719,-2.25 4.5,-2.25 2.485281,0 4.5,1.00736 4.5,2.25 z"
@@ -18675,13 +19135,13 @@
sodipodi:rx="4.5"
sodipodi:cy="554"
sodipodi:cx="53"
- id="path23683"
+ id="path23724"
style="fill:#112b00;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
sodipodi:type="arc" />
<path
sodipodi:type="arc"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter20578);enable-background:accumulate"
- id="path23685"
+ id="path23726"
sodipodi:cx="53"
sodipodi:cy="554"
sodipodi:rx="4.5"
@@ -18691,179 +19151,138 @@
inkscape:transform-center-y="0.3813435"
clip-path="url(#clipPath20586)" />
</g>
- <path
- inkscape:connector-curvature="0"
- style="opacity:0.38999999;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- d="m 901.00003,292 -1e-5,1 -13.00002,2 10e-6,-1 13.00002,-2 z"
- id="path23694"
- sodipodi:nodetypes="ccccc" />
- <g
- transform="matrix(1.1428564,0,0,1.2000001,834.71436,-357.40005)"
- id="g23717">
- <path
- sodipodi:type="arc"
- style="fill:#112b00;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- id="path23724"
- sodipodi:cx="53"
- sodipodi:cy="554"
- sodipodi:rx="4.5"
- sodipodi:ry="2.25"
- d="m 57.5,554 c 0,1.24264 -2.014719,2.25 -4.5,2.25 -2.485281,0 -4.5,-1.00736 -4.5,-2.25 0,-1.24264 2.014719,-2.25 4.5,-2.25 2.485281,0 4.5,1.00736 4.5,2.25 z"
- transform="matrix(0.7630859,-0.2494396,0.2996015,0.9926766,-151.92281,17.77746)" />
- <path
- clip-path="url(#clipPath20586)"
- inkscape:transform-center-y="0.3813435"
- transform="matrix(0.3848865,-0.1700959,0.2278131,0.3626733,-93.107467,361.59408)"
- d="m 57.5,554 c 0,1.24264 -2.014719,2.25 -4.5,2.25 -2.485281,0 -4.5,-1.00736 -4.5,-2.25 0,-1.24264 2.014719,-2.25 4.5,-2.25 2.485281,0 4.5,1.00736 4.5,2.25 z"
- sodipodi:ry="2.25"
- sodipodi:rx="4.5"
- sodipodi:cy="554"
- sodipodi:cx="53"
- id="path23726"
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter20578);enable-background:accumulate"
- sodipodi:type="arc" />
- </g>
</g>
<g
- id="g23922"
+ style="display:inline;enable-background:new"
transform="translate(-16,-220)"
- style="display:inline;enable-background:new">
+ id="g23922">
<g
- style="display:inline"
- id="g23924"
- transform="translate(824,66)"
- inkscape:export-filename="C:\Documents and Settings\Pracowniaa\Moje dokumenty\Moje obrazy\BLENDER ICONS redesign\ver 2\IMAGE BROWSER ICONS.png"
+ inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
+ inkscape:export-filename="C:\Documents and Settings\Pracowniaa\Moje dokumenty\Moje obrazy\BLENDER ICONS redesign\ver 2\IMAGE BROWSER ICONS.png"
+ transform="translate(824,66)"
+ id="g23924"
+ style="display:inline">
<rect
- ry="0"
- rx="2.4004419"
- y="430"
- x="108"
- height="48"
- width="48"
+ style="opacity:0;fill:#cccccc;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00000012;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect23926"
- style="opacity:0;fill:#cccccc;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00000012;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ width="48"
+ height="48"
+ x="108"
+ y="430"
+ rx="2.4004419"
+ ry="0" />
<g
id="g23928">
<path
- inkscape:connector-curvature="0"
- style="fill:url(#linearGradient23978);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;display:inline"
- d="m 125.5,433.5 23,0 0,41 -33,0 0,-31 10,-10 z"
- id="path23930"
- sodipodi:nodetypes="cccccc"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90" />
- <path
- inkscape:connector-curvature="0"
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- d="m 147.25,434.5 c -4.875,0 -21.75,0 -21.75,0 m -8.9447,8.5 -0.0553,30"
- style="opacity:0.7;fill:none;stroke:#ffffff;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
- id="path23932"
- sodipodi:nodetypes="cccc" />
+ sodipodi:nodetypes="cccccc"
+ id="path23930"
+ d="m 125.5,433.5 23,0 0,41 -33,0 0,-31 10,-10 z"
+ style="fill:url(#linearGradient23978);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;display:inline"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- clip-path="url(#clipPath13106)"
- inkscape:export-ydpi="90"
- inkscape:export-xdpi="90"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
sodipodi:nodetypes="cccc"
- id="path23934"
+ id="path23932"
+ style="opacity:0.7;fill:none;stroke:#ffffff;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ d="m 147.25,434.5 c -4.875,0 -21.75,0 -21.75,0 m -8.9447,8.5 -0.0553,30"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ inkscape:connector-curvature="0" />
+ <path
+ style="opacity:0.2;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter63011)"
d="m 115,444 12,0 -1,-11 -11,11 z"
- style="opacity:0.2;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter63011)" />
+ id="path23934"
+ sodipodi:nodetypes="cccc"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ clip-path="url(#clipPath13106)"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccc"
+ id="path23936"
+ style="fill:none;stroke:url(#linearGradient23980);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 117.5,443.75 9,-2.5 0,-6"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
clip-path="none"
+ inkscape:connector-curvature="0" />
+ <path
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- d="m 117.5,443.75 9,-2.5 0,-6"
- style="fill:none;stroke:url(#linearGradient23980);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
- id="path23936"
- sodipodi:nodetypes="ccc" />
- <path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="cccccc"
- id="path23938"
- style="fill:none;stroke:#333333;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
d="m 115.5,442.75 0,31.75 33,0 0,-41 -23.75,0 -9.25,9.25 z"
+ style="fill:none;stroke:#333333;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ id="path23938"
+ sodipodi:nodetypes="cccccc"
+ inkscape:connector-curvature="0" />
+ <path
+ style="opacity:0.16000001;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline;filter:url(#filter63011)"
+ d="m 116,443 11,1 -2,-10 -9,9 z"
+ id="path23940"
+ sodipodi:nodetypes="cccc"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
- inkscape:export-ydpi="90" />
- <path
- inkscape:connector-curvature="0"
+ inkscape:export-ydpi="90"
clip-path="url(#clipPath13106)"
+ inkscape:connector-curvature="0" />
+ <path
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- sodipodi:nodetypes="cccc"
- id="path23940"
- d="m 116,443 11,1 -2,-10 -9,9 z"
- style="opacity:0.16000001;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline;filter:url(#filter63011)" />
- <path
- inkscape:connector-curvature="0"
- style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
- d="m 116,443 0.0108,0.72434 L 126,441 l 0,-7 -1,0 -9,9 z"
- id="path23942"
sodipodi:nodetypes="cccccc"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90" />
+ id="path23942"
+ d="m 116,443 0.0108,0.72434 L 126,441 l 0,-7 -1,0 -9,9 z"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccc"
- id="path23944"
- style="opacity:0.15;fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
- d="m 147.5,435 0,38.5 -30.5,0"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
- inkscape:export-ydpi="90" />
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ d="m 147.5,435 0,38.5 -30.5,0"
+ style="opacity:0.15;fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ id="path23944"
+ sodipodi:nodetypes="ccc"
+ inkscape:connector-curvature="0" />
</g>
</g>
<path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccc"
- id="path23946"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 952,530 0,10 1,0 1,0 11,0 1,0 1,0 0,-10 -15,0 z m 1,2 1,0 0,1 -1,0 0,-1 z m 12,0 1,0 0,1 -1,0 0,-1 z m -12,3 1,0 0,1 -1,0 0,-1 z m 12,0 1,0 0,1 -1,0 0,-1 z m -12,3 1,0 0,1 -1,0 0,-1 z m 12,0 1,0 0,1 -1,0 0,-1 z"
- style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ id="path23946"
+ sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccc"
+ inkscape:connector-curvature="0" />
<rect
- transform="scale(1,-1)"
- style="fill:url(#linearGradient23982);fill-opacity:1;fill-rule:nonzero;stroke:none"
- id="rect23948"
- width="13"
- height="5.5"
+ y="-524"
x="953"
- y="-524" />
+ height="5.5"
+ width="13"
+ id="rect23948"
+ style="fill:url(#linearGradient23982);fill-opacity:1;fill-rule:nonzero;stroke:none"
+ transform="scale(1,-1)" />
<path
- inkscape:connector-curvature="0"
- id="path23952"
- transform="translate(76,0)"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 876,514 0,17 15,0 0,-17 -1,0 0,1 -1,0 0,-1 -11,0 0,1 -1,0 0,-1 -1,0 z m 1,3 1,0 0,1 -1,0 0,-1 z m 12,0 1,0 0,1 -1,0 0,-1 z m -12,3 1,0 0,1 -1,0 0,-1 z m 12,0 1,0 0,1 -1,0 0,-1 z m -12,3 1,0 0,1 -1,0 0,-1 z m 12,0 1,0 0,1 -1,0 0,-1 z m -12,3 1,0 0,1 -1,0 0,-1 z m 12,0 1,0 0,1 -1,0 0,-1 z m -12,3 1,0 0,1 -1,0 0,-1 z m 12,0 1,0 0,1 -1,0 0,-1 z"
- style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ transform="translate(76,0)"
+ id="path23952"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccc"
- style="fill:url(#linearGradient23986);fill-opacity:1;fill-rule:nonzero;stroke:none"
+ id="path23954"
d="m 952,507 3,0 0,3 9,0 0,-3 3,0 0,7 -15,0 0,-7 z m 1,0 1,0 -1,0 z m 0,1 0,1 1,0 0,-1 -1,0 z m 0,3 0,1 1,0 0,-1 -1,0 z m 12,-4 1,0 -1,0 z m 0,1 0,1 1,0 0,-1 -1,0 z m 0,3 0,1 1,0 0,-1 -1,0 z"
- id="path23954" />
+ style="fill:url(#linearGradient23986);fill-opacity:1;fill-rule:nonzero;stroke:none"
+ sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccc"
+ inkscape:connector-curvature="0" />
<rect
- transform="matrix(0,1,1,0,0,0)"
- ry="0"
- y="955"
- x="507"
- height="9"
- width="3"
+ style="fill:url(#linearGradient23988);fill-opacity:1;fill-rule:nonzero;stroke:none"
id="rect23956"
- style="fill:url(#linearGradient23988);fill-opacity:1;fill-rule:nonzero;stroke:none" />
- <rect
- style="fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none"
- id="rect23958"
- width="9"
+ width="3"
height="9"
- x="512"
+ x="507"
y="955"
ry="0"
transform="matrix(0,1,1,0,0,0)" />
@@ -18871,24 +19290,20 @@
transform="matrix(0,1,1,0,0,0)"
ry="0"
y="955"
- x="523"
+ x="512"
height="9"
width="9"
- id="rect23960"
+ id="rect23958"
style="fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none" />
- <path
- transform="matrix(0,-0.5624971,0.5624971,0,893.12531,590.74965)"
- sodipodi:type="arc"
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
- id="path23962"
- sodipodi:cx="132"
- sodipodi:cy="118"
- sodipodi:rx="8"
- sodipodi:ry="8"
- d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90" />
+ <rect
+ style="fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ id="rect23960"
+ width="9"
+ height="9"
+ x="523"
+ y="955"
+ ry="0"
+ transform="matrix(0,1,1,0,0,0)" />
<path
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
@@ -18898,844 +19313,1005 @@
sodipodi:rx="8"
sodipodi:cy="118"
sodipodi:cx="132"
- id="path23964"
+ id="path23962"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
sodipodi:type="arc"
- transform="matrix(0,-0.5624964,0.5624964,0,893.12545,601.74956)" />
+ transform="matrix(0,-0.5624971,0.5624971,0,893.12531,590.74965)" />
<path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccccccccccccc"
+ transform="matrix(0,-0.5624964,0.5624964,0,893.12545,601.74956)"
+ sodipodi:type="arc"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ id="path23964"
+ sodipodi:cx="132"
+ sodipodi:cy="118"
+ sodipodi:rx="8"
+ sodipodi:ry="8"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
+ <path
+ d="m 961.00001,519.00005 -3,0 0,-0.99992 0.99994,0 6e-5,-2.00008 -1,0 0,-1 1,0 0,-1 1.00006,0 0,4.00008 0.99994,0 0,0.99992 z"
id="path23966"
- d="m 961.00001,519.00005 -3,0 0,-0.99992 0.99994,0 6e-5,-2.00008 -1,0 0,-1 1,0 0,-1 1.00006,0 0,4.00008 0.99994,0 0,0.99992 z" />
+ sodipodi:nodetypes="ccccccccccccc"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
+ id="path23968"
d="m 958,525 0,1 2,0 0,-1 -2,0 z m 2,1 0,1 1,0 0,-1 -1,0 z m 0,1 -1,0 0,1 1,0 0,-1 z m -1,1 -1,0 0,1 0,1 3,0 0,-1 -2,0 0,-1 z"
- id="path23968" />
+ inkscape:connector-curvature="0" />
<rect
- style="fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none"
- id="rect23970"
- width="6"
- height="9"
- x="534"
- y="955"
+ transform="matrix(0,1,1,0,0,0)"
ry="0"
- transform="matrix(0,1,1,0,0,0)" />
+ y="955"
+ x="534"
+ height="9"
+ width="6"
+ id="rect23970"
+ style="fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none" />
<g
- clip-path="url(#clipPath23877)"
- id="g23972">
+ id="g23972"
+ clip-path="url(#clipPath23877)">
<path
- inkscape:export-ydpi="90"
- inkscape:export-xdpi="90"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
- d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
- sodipodi:ry="8"
- sodipodi:rx="8"
- sodipodi:cy="118"
- sodipodi:cx="132"
- id="path23974"
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ transform="matrix(0,-0.5624964,0.5624964,0,893.12545,612.74956)"
sodipodi:type="arc"
- transform="matrix(0,-0.5624964,0.5624964,0,893.12545,612.74956)" />
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ id="path23974"
+ sodipodi:cx="132"
+ sodipodi:cy="118"
+ sodipodi:rx="8"
+ sodipodi:ry="8"
+ d="m 140,118 c 0,4.41828 -3.58172,8 -8,8 -4.41828,0 -8,-3.58172 -8,-8 0,-4.41828 3.58172,-8 8,-8 4.41828,0 8,3.58172 8,8 z"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
<path
- inkscape:connector-curvature="0"
+ id="path23976"
d="m 958,536 0,1 2,0 0,-1 -2,0 z m 2,1 0,1 1,0 0,-1 -1,0 z m 0,1 -1,0 0,1 1,0 0,-1 z m 0,1 0,1 1,0 0,-1 -1,0 z m 0,1 -2,0 0,1 2,0 0,-1 z"
- id="path23976" />
+ inkscape:connector-curvature="0" />
</g>
</g>
<g
- transform="translate(208,88)"
+ style="display:inline;enable-background:new"
id="g45475"
- style="display:inline;enable-background:new">
+ transform="translate(208,88)">
<g
- style="display:inline"
- id="g22242"
- transform="translate(696,-194)"
- inkscape:export-filename="C:\Documents and Settings\Pracowniaa\Moje dokumenty\Moje obrazy\BLENDER ICONS redesign\ver 2\IMAGE BROWSER ICONS.png"
+ inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
+ inkscape:export-filename="C:\Documents and Settings\Pracowniaa\Moje dokumenty\Moje obrazy\BLENDER ICONS redesign\ver 2\IMAGE BROWSER ICONS.png"
+ transform="translate(696,-194)"
+ id="g22242"
+ style="display:inline">
<rect
- ry="0"
- rx="2.4004419"
- y="430"
- x="108"
- height="48"
- width="48"
+ style="opacity:0;fill:#cccccc;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00000012;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect22244"
- style="opacity:0;fill:#cccccc;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00000012;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ width="48"
+ height="48"
+ x="108"
+ y="430"
+ rx="2.4004419"
+ ry="0" />
<g
id="g22246">
<path
- inkscape:connector-curvature="0"
- style="fill:url(#linearGradient22274);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;display:inline"
- d="m 125.5,433.5 23,0 0,41 -33,0 0,-31 10,-10 z"
- id="path22249"
- sodipodi:nodetypes="cccccc"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90" />
- <path
- inkscape:connector-curvature="0"
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- d="m 147.25,434.5 c -4.875,0 -21.75,0 -21.75,0 m -8.9447,8.5 -0.0553,30"
- style="opacity:0.7;fill:none;stroke:#ffffff;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
- id="path22251"
- sodipodi:nodetypes="cccc" />
+ sodipodi:nodetypes="cccccc"
+ id="path22249"
+ d="m 125.5,433.5 23,0 0,41 -33,0 0,-31 10,-10 z"
+ style="fill:url(#linearGradient22274);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;display:inline"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- clip-path="url(#clipPath13106)"
- inkscape:export-ydpi="90"
- inkscape:export-xdpi="90"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
sodipodi:nodetypes="cccc"
- id="path22253"
+ id="path22251"
+ style="opacity:0.7;fill:none;stroke:#ffffff;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ d="m 147.25,434.5 c -4.875,0 -21.75,0 -21.75,0 m -8.9447,8.5 -0.0553,30"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ inkscape:connector-curvature="0" />
+ <path
+ style="opacity:0.2;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter63011)"
d="m 115,444 12,0 -1,-11 -11,11 z"
- style="opacity:0.2;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter63011)" />
+ id="path22253"
+ sodipodi:nodetypes="cccc"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ clip-path="url(#clipPath13106)"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccc"
+ id="path22264"
+ style="fill:none;stroke:url(#linearGradient22276);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 117.5,443.75 9,-2.5 0,-6"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
clip-path="none"
+ inkscape:connector-curvature="0" />
+ <path
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- d="m 117.5,443.75 9,-2.5 0,-6"
- style="fill:none;stroke:url(#linearGradient22276);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
- id="path22264"
- sodipodi:nodetypes="ccc" />
- <path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="cccccc"
- id="path22266"
- style="fill:none;stroke:#333333;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
d="m 115.5,442.75 0,31.75 33,0 0,-41 -23.75,0 -9.25,9.25 z"
+ style="fill:none;stroke:#333333;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ id="path22266"
+ sodipodi:nodetypes="cccccc"
+ inkscape:connector-curvature="0" />
+ <path
+ style="opacity:0.16000001;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline;filter:url(#filter63011)"
+ d="m 116,443 11,1 -2,-10 -9,9 z"
+ id="path22268"
+ sodipodi:nodetypes="cccc"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
- inkscape:export-ydpi="90" />
- <path
- inkscape:connector-curvature="0"
+ inkscape:export-ydpi="90"
clip-path="url(#clipPath13106)"
+ inkscape:connector-curvature="0" />
+ <path
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- sodipodi:nodetypes="cccc"
- id="path22268"
- d="m 116,443 11,1 -2,-10 -9,9 z"
- style="opacity:0.16000001;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline;filter:url(#filter63011)" />
- <path
- inkscape:connector-curvature="0"
- style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
- d="m 116,443 0.0108,0.72434 L 126,441 l 0,-7 -1,0 -9,9 z"
- id="path22270"
sodipodi:nodetypes="cccccc"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90" />
+ id="path22270"
+ d="m 116,443 0.0108,0.72434 L 126,441 l 0,-7 -1,0 -9,9 z"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccc"
- id="path22272"
- style="opacity:0.15;fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
- d="m 147.5,435 0,38.5 -30.5,0"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
- inkscape:export-ydpi="90" />
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ d="m 147.5,435 0,38.5 -30.5,0"
+ style="opacity:0.15;fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ id="path22272"
+ sodipodi:nodetypes="ccc"
+ inkscape:connector-curvature="0" />
</g>
</g>
<g
- id="g21517"
+ transform="matrix(0.5406242,0,0,0.5829534,814.13667,247.65542)"
inkscape:label="Layer 1"
- transform="matrix(0.5406242,0,0,0.5829534,814.13667,247.65542)">
+ id="g21517">
<path
- transform="matrix(1.274286,0,0,1.377124,-7.569123,-16.70193)"
- d="m 43.487067,38.98439 c 0,2.928932 -6.925242,5.303301 -15.467961,5.303301 -8.542719,0 -15.467961,-2.374369 -15.467961,-5.303301 0,-2.928932 6.925242,-5.303301 15.467961,-5.303301 8.542719,0 15.467961,2.374369 15.467961,5.303301 z"
- sodipodi:ry="5.3033009"
- sodipodi:rx="15.467961"
- sodipodi:cy="38.98439"
- sodipodi:cx="28.019106"
- id="path35486"
+ sodipodi:type="arc"
style="opacity:0.54857142;fill:url(#radialGradient21442);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- sodipodi:type="arc" />
+ id="path35486"
+ sodipodi:cx="28.019106"
+ sodipodi:cy="38.98439"
+ sodipodi:rx="15.467961"
+ sodipodi:ry="5.3033009"
+ d="m 43.487067,38.98439 c 0,2.928932 -6.925242,5.303301 -15.467961,5.303301 -8.542719,0 -15.467961,-2.374369 -15.467961,-5.303301 0,-2.928932 6.925242,-5.303301 15.467961,-5.303301 8.542719,0 15.467961,2.374369 15.467961,5.303301 z"
+ transform="matrix(1.274286,0,0,1.377124,-7.569123,-16.70193)" />
<path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="csssssssssscccsscccscccssccc"
- d="m 16.048489,28.093447 c 0.0098,0.576682 0.196474,1.697902 0.471116,2.577425 0.581566,1.854137 1.56684,3.572658 2.939126,5.086496 1.407488,1.553118 3.138519,2.803227 5.139315,3.68976 2.105357,0.931573 4.384795,1.407488 6.750134,1.403741 2.365339,-0.005 4.644601,-0.488686 6.74896,-1.427017 2.00002,-0.895288 3.731043,-2.148391 5.13754,-3.705517 1.369207,-1.519844 2.352576,-3.241114 2.934089,-5.096258 0.294262,-0.938353 0.476921,-1.889392 0.553238,-2.845308 0.07331,-0.939306 0.04204,-1.883511 -0.09183,-2.823792 -0.259981,-1.835599 -0.896294,-3.556847 -1.872652,-5.12758 -0.895541,-1.441699 -2.047808,-2.70454 -3.417268,-3.766975 0,0 0.002,-0.002 0.002,-0.002 0,0 -13.828458,-10.6197195 -13.828458,-10.6197195 -0.01176,-0.00978 -0.02252,-0.019551 -0.03529,-0.028344 -0.909003,-0.6959264 -3.879837,-0.7738945 -4.87679,-0.075035 -1.01067,0.7057021 -1.091821,1.8092613 -0.195527,2.5482146 1.899775,1.4997633 2.656207,2.2801589 4.566507,3.7797379 0,0 -14.852491,0.167033 -14.852491,0.167033 -1.994685,0 -3.1682609,0.947915 -3.4153947,2.333683 -0.2180771,1.222836 0.7479213,2.738129 2.4800217,2.738129 2.956573,0.0039 5.942111,-0.0069 8.909215,-0.01272 0,0 -16.01999,12.453223 -16.01999,12.453223 -0.020527,0.01564 -0.041053,0.02933 -0.06158,0.04497 -1.4974197,1.148389 -1.9831951,3.059322 -1.0399808,4.268393 0.9598323,1.22959 2.9977653,1.230588 4.5147288,0.006 0,0 8.677593,-7.102098 8.677593,-7.102098 0,0 -0.12511,0.959824 -0.116333,1.535532 l 1e-6,2.6e-5 0,0 0,0 z"
+ style="fill:#f57900;fill-rule:evenodd;stroke:#aa4400;stroke-width:1.7812928;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none"
id="path2482"
- style="fill:#f57900;fill-rule:evenodd;stroke:#aa4400;stroke-width:1.7812928;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none" />
+ d="m 16.048489,28.093447 c 0.0098,0.576682 0.196474,1.697902 0.471116,2.577425 0.581566,1.854137 1.56684,3.572658 2.939126,5.086496 1.407488,1.553118 3.138519,2.803227 5.139315,3.68976 2.105357,0.931573 4.384795,1.407488 6.750134,1.403741 2.365339,-0.005 4.644601,-0.488686 6.74896,-1.427017 2.00002,-0.895288 3.731043,-2.148391 5.13754,-3.705517 1.369207,-1.519844 2.352576,-3.241114 2.934089,-5.096258 0.294262,-0.938353 0.476921,-1.889392 0.553238,-2.845308 0.07331,-0.939306 0.04204,-1.883511 -0.09183,-2.823792 -0.259981,-1.835599 -0.896294,-3.556847 -1.872652,-5.12758 -0.895541,-1.441699 -2.047808,-2.70454 -3.417268,-3.766975 0,0 0.002,-0.002 0.002,-0.002 0,0 -13.828458,-10.6197195 -13.828458,-10.6197195 -0.01176,-0.00978 -0.02252,-0.019551 -0.03529,-0.028344 -0.909003,-0.6959264 -3.879837,-0.7738945 -4.87679,-0.075035 -1.01067,0.7057021 -1.091821,1.8092613 -0.195527,2.5482146 1.899775,1.4997633 2.656207,2.2801589 4.566507,3.7797379 0,0 -14.852491,0.167033 -14.852491,0.167033 -1.994685,0 -3.1682609,0.947915 -3.4153947,2.333683 -0.2180771,1.222836 0.7479213,2.738129 2.4800217,2.738129 2.956573,0.0039 5.942111,-0.0069 8.909215,-0.01272 0,0 -16.01999,12.453223 -16.01999,12.453223 -0.020527,0.01564 -0.041053,0.02933 -0.06158,0.04497 -1.4974197,1.148389 -1.9831951,3.059322 -1.0399808,4.268393 0.9598323,1.22959 2.9977653,1.230588 4.5147288,0.006 0,0 8.677593,-7.102098 8.677593,-7.102098 0,0 -0.12511,0.959824 -0.116333,1.535532 l 1e-6,2.6e-5 0,0 0,0 z"
+ sodipodi:nodetypes="csssssssssscccsscccscccssccc"
+ inkscape:connector-curvature="0" />
<path
- transform="matrix(0.8018194,0,0,0.8471126,6.257567,4.5089892)"
- d="m 42.75,25.75 c 0,5.591883 -5.176708,10.125 -11.5625,10.125 -6.385792,0 -11.5625,-4.533117 -11.5625,-10.125 0,-5.591883 5.176708,-10.125 11.5625,-10.125 6.385792,0 11.5625,4.533117 11.5625,10.125 z"
- sodipodi:ry="10.125"
- sodipodi:rx="11.5625"
- sodipodi:cy="25.75"
- sodipodi:cx="31.1875"
- id="path39153"
+ sodipodi:type="arc"
style="fill:url(#linearGradient21444);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- sodipodi:type="arc" />
+ id="path39153"
+ sodipodi:cx="31.1875"
+ sodipodi:cy="25.75"
+ sodipodi:rx="11.5625"
+ sodipodi:ry="10.125"
+ d="m 42.75,25.75 c 0,5.591883 -5.176708,10.125 -11.5625,10.125 -6.385792,0 -11.5625,-4.533117 -11.5625,-10.125 0,-5.591883 5.176708,-10.125 11.5625,-10.125 6.385792,0 11.5625,4.533117 11.5625,10.125 z"
+ transform="matrix(0.8018194,0,0,0.8471126,6.257567,4.5089892)" />
<path
- inkscape:connector-curvature="0"
- style="opacity:0.4857143;fill:none;stroke:url(#linearGradient21446);stroke-width:1.7812928;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
- d="m 25.8125,6.40625 c -0.334829,4.572e-4 -0.72202,0.089606 -0.90625,0.21875 4.5e-4,0.010412 4.5e-4,0.020838 0,0.03125 -0.212626,0.1484635 -0.188235,0.1956271 -0.1875,0.1875 0.0092,0.010621 -0.0072,-4.246e-4 0.03125,0.03125 0.01962,0.00828 0.03527,0.012546 0.0625,0.03125 0.01676,0.01151 0.01357,0.014555 0.03125,0.03125 0.193748,0.1576058 4.954976,4.005164 4.954976,4.005164 0.489837,0.39864 0.677395,1.066352 0.46875,1.65625 -0.115662,0.32703 -0.422813,0.541217 -0.6875,0.59375 -0.264687,0.05253 -0.498447,0.03054 -0.71875,0.03125 -5.639658,0.05119 -16.87989,0.03851 -16.87989,0.03851 -0.4102,2.75e-4 -0.935835,0.115997 -1.34375,0.34375 -0.407915,0.227753 -0.6637862,0.523861 -0.6875002,0.90625 -0.024417,0.393728 0.098829,0.605767 0.3437502,0.78125 0.244921,0.175483 0.614978,0.25 0.875,0.25 0,0 8.8125,0 8.8125,0 0.600305,-7.28e-4 1.223895,0.311058 1.4375,0.9375 0.04676,0.137121 0.06335,0.269976 0.0625,0.40625 -8.49e-4,0.136274 -0.02214,0.268794 -0.09375,0.375 -0.143211,0.212412 -0.319507,0.298568 -0.5,0.4375 0,0 -15.7871819,12.746851 -15.856336,12.800078 C 5.0310984,30.500117 5,30.53125 5,30.53125 5.0100745,30.519077 5.000335,30.499512 5,30.5 L 4.8125,30.3125 c 0.012336,0.02165 0.014481,0.03307 0.03125,0.0625 0.063558,0.0774 0.125,0.15625 0.125,0.15625 -0.00585,0.0056 -0.031233,0.03124 -0.03125,0.03125 0,0 -0.043442,-0.09921 -0.09375,-0.1875 0.037843,0.09884 0.06253,0.218739 0.0625,0.21875 -0.4662091,0.37119 -0.7783348,0.889746 -0.875,1.28125 -0.1043319,0.422581 -0.046,0.62455 0.125,0.84375 0.2999827,0.384295 1.3975356,0.595547 2.40625,-0.21875 0,0 8.65625,-7.09375 8.65625,-7.09375 0.473718,-0.387074 1.1446,-0.458625 1.6875,-0.15625 0.544608,0.303331 0.798054,0.927572 0.71875,1.53125 0,0 -0.0626,0.908319 -0.0625,1.25 2e-6,0.0085 -1.19e-4,0.02348 0,0.03125 0.192796,2.523718 1.400736,4.762818 3.03125,6.71875 2.801818,3.089095 6.627659,4.401619 10.75,4.5625 4.113324,-0.043 7.964529,-1.606111 10.75,-4.625 2.546631,-3.125326 3.513872,-6.363859 3.15625,-9.375 C 44.891575,22.325847 43.222923,19.516566 40.4375,17.25 35.951885,13.599946 31.206991,10.168434 26.59375,6.625 26.57515,6.610386 26.56455,6.59802 26.5625,6.59375 26.43835,6.498703 26.144223,6.4057899 25.8125,6.40625 z"
+ sodipodi:nodetypes="csssssscssscsssccssscscccsccssssccscsscccssssc"
id="path21414"
- sodipodi:nodetypes="csssssscssscsssccssscscccsccssssccscsscccssssc" />
+ d="m 25.8125,6.40625 c -0.334829,4.572e-4 -0.72202,0.089606 -0.90625,0.21875 4.5e-4,0.010412 4.5e-4,0.020838 0,0.03125 -0.212626,0.1484635 -0.188235,0.1956271 -0.1875,0.1875 0.0092,0.010621 -0.0072,-4.246e-4 0.03125,0.03125 0.01962,0.00828 0.03527,0.012546 0.0625,0.03125 0.01676,0.01151 0.01357,0.014555 0.03125,0.03125 0.193748,0.1576058 4.954976,4.005164 4.954976,4.005164 0.489837,0.39864 0.677395,1.066352 0.46875,1.65625 -0.115662,0.32703 -0.422813,0.541217 -0.6875,0.59375 -0.264687,0.05253 -0.498447,0.03054 -0.71875,0.03125 -5.639658,0.05119 -16.87989,0.03851 -16.87989,0.03851 -0.4102,2.75e-4 -0.935835,0.115997 -1.34375,0.34375 -0.407915,0.227753 -0.6637862,0.523861 -0.6875002,0.90625 -0.024417,0.393728 0.098829,0.605767 0.3437502,0.78125 0.244921,0.175483 0.614978,0.25 0.875,0.25 0,0 8.8125,0 8.8125,0 0.600305,-7.28e-4 1.223895,0.311058 1.4375,0.9375 0.04676,0.137121 0.06335,0.269976 0.0625,0.40625 -8.49e-4,0.136274 -0.02214,0.268794 -0.09375,0.375 -0.143211,0.212412 -0.319507,0.298568 -0.5,0.4375 0,0 -15.7871819,12.746851 -15.856336,12.800078 C 5.0310984,30.500117 5,30.53125 5,30.53125 5.0100745,30.519077 5.000335,30.499512 5,30.5 L 4.8125,30.3125 c 0.012336,0.02165 0.014481,0.03307 0.03125,0.0625 0.063558,0.0774 0.125,0.15625 0.125,0.15625 -0.00585,0.0056 -0.031233,0.03124 -0.03125,0.03125 0,0 -0.043442,-0.09921 -0.09375,-0.1875 0.037843,0.09884 0.06253,0.218739 0.0625,0.21875 -0.4662091,0.37119 -0.7783348,0.889746 -0.875,1.28125 -0.1043319,0.422581 -0.046,0.62455 0.125,0.84375 0.2999827,0.384295 1.3975356,0.595547 2.40625,-0.21875 0,0 8.65625,-7.09375 8.65625,-7.09375 0.473718,-0.387074 1.1446,-0.458625 1.6875,-0.15625 0.544608,0.303331 0.798054,0.927572 0.71875,1.53125 0,0 -0.0626,0.908319 -0.0625,1.25 2e-6,0.0085 -1.19e-4,0.02348 0,0.03125 0.192796,2.523718 1.400736,4.762818 3.03125,6.71875 2.801818,3.089095 6.627659,4.401619 10.75,4.5625 4.113324,-0.043 7.964529,-1.606111 10.75,-4.625 2.546631,-3.125326 3.513872,-6.363859 3.15625,-9.375 C 44.891575,22.325847 43.222923,19.516566 40.4375,17.25 35.951885,13.599946 31.206991,10.168434 26.59375,6.625 26.57515,6.610386 26.56455,6.59802 26.5625,6.59375 26.43835,6.498703 26.144223,6.4057899 25.8125,6.40625 z"
+ style="opacity:0.4857143;fill:none;stroke:url(#linearGradient21446);stroke-width:1.7812928;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- d="m 25.708956,26.064593 c 0.07649,-1.397943 0.759369,-2.631914 1.78592,-3.505519 1.010226,-0.858782 2.366788,-1.383145 3.848625,-1.383145 1.480894,0 2.837456,0.524363 3.847446,1.383145 1.027685,0.873605 1.709741,2.106651 1.787122,3.504594 0.07927,1.438713 -0.49591,2.77459 -1.504012,3.764001 -1.027686,1.007933 -2.493008,1.640678 -4.130556,1.640678 -1.63849,0 -3.103814,-0.632745 -4.131451,-1.640678 -1.00914,-0.989411 -1.58234,-2.325288 -1.503094,-3.763076 l 0,0 0,0 0,0 z"
+ style="fill:#3465a4;fill-rule:evenodd;stroke:none"
id="path2478"
- style="fill:#3465a4;fill-rule:evenodd;stroke:none" />
+ d="m 25.708956,26.064593 c 0.07649,-1.397943 0.759369,-2.631914 1.78592,-3.505519 1.010226,-0.858782 2.366788,-1.383145 3.848625,-1.383145 1.480894,0 2.837456,0.524363 3.847446,1.383145 1.027685,0.873605 1.709741,2.106651 1.787122,3.504594 0.07927,1.438713 -0.49591,2.77459 -1.504012,3.764001 -1.027686,1.007933 -2.493008,1.640678 -4.130556,1.640678 -1.63849,0 -3.103814,-0.632745 -4.131451,-1.640678 -1.00914,-0.989411 -1.58234,-2.325288 -1.503094,-3.763076 l 0,0 0,0 0,0 z"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="csssscsccsscsccssssscsscccsssc"
- id="path39166"
+ style="opacity:0.51999996;fill:url(#radialGradient21448);fill-opacity:1;fill-rule:evenodd;stroke:none"
d="m 25.8125,6.03125 c -0.404852,5.53e-4 -2.204797,-0.059029 -2.48145,0.1349032 -0.280209,0.195652 -0.335403,0.376484 -0.34375,0.46875 -0.0083,0.092266 -0.01539,0.17648 0.1875,0.34375 0.01899,0.015735 0.04457,0.014317 0.0625,0.03125 0.124258,0.101028 4.748869,4.1248618 4.748869,4.1248618 0.373658,0.304091 0.504393,0.795817 0.34375,1.25 -0.160635,0.454191 -0.580748,0.373449 -1.0625,0.375 -5.634142,0.05114 -15.087371,-0.129601 -15.087371,-0.129601 -0.952967,6.38e-4 -2.339958,0.524782 -2.4062504,1.59375 -0.063562,1.024947 0.9247974,1.4375 1.5937504,1.4375 0,-1e-6 8.8125,0 8.8125,0 0.488364,-5.92e-4 0.936141,0.225277 1.09375,0.6875 0.157609,0.462231 -0.01926,0.514621 -0.40625,0.8125 0,0 -16.086298,13.088586 -16.086298,13.088586 -0.00142,0.0014 -0.029829,-0.0014 -0.03125,0 -0.064037,0.04879 -0.054226,0.04875 -0.03125,0.03125 -0.5536758,0.424619 -0.9087886,1.004019 -1.03125,1.5 -0.1224536,0.495981 -0.04661,0.856152 0.1875,1.15625 0.4788333,0.613413 1.777612,0.754857 2.90625,-0.15625 1e-7,10e-7 8.65625,-7.09375 8.65625,-7.09375 0.361955,-0.295753 0.872897,-0.352437 1.28125,-0.125 0.408345,0.227436 0.623381,0.692814 0.5625,1.15625 0,-1e-6 -0.0997,0.953636 -0.09375,1.34375 0.09498,1.301756 0.451616,2.521825 0.989039,3.664234 C 20.799917,36.321089 27.770982,19.392853 44.1875,21.03125 43.339652,19.54368 42.151282,18.185293 40.65625,16.96875 36.159865,13.309932 31.42016,9.882897 26.8125,6.34375 26.805335,6.338858 26.788292,6.317553 26.78125,6.3125 26.570707,6.151312 26.216591,6.030689 25.8125,6.03125 z"
- style="opacity:0.51999996;fill:url(#radialGradient21448);fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ id="path39166"
+ sodipodi:nodetypes="csssscsccsscsccssssscsscccsssc"
+ inkscape:connector-curvature="0" />
</g>
</g>
<g
- style="opacity:0.5"
+ transform="translate(162,248)"
id="g24847"
- transform="translate(162,248)">
+ style="opacity:0.5">
<path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccccccssssccc"
- style="fill:url(#linearGradient24867);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ d="m 806.5,114.5 c 0,2.25 2,4 4,4 l 30,0 c 0.4163,0 1,-0.5 1,-1 l 0,-29 c 0,-0.5 -0.5,-1 -1,-1 l -21.02773,0.04419 C 818.98721,87.545209 818.5,87 818.5,86.5 l 0,-3 c 0,-0.5 -0.5,-1 -1,-1 l -10,0 c -0.5,0 -1,0.5 -1,1 l 0,31 z"
id="path24849"
- d="m 806.5,114.5 c 0,2.25 2,4 4,4 l 30,0 c 0.4163,0 1,-0.5 1,-1 l 0,-29 c 0,-0.5 -0.5,-1 -1,-1 l -21.02773,0.04419 C 818.98721,87.545209 818.5,87 818.5,86.5 l 0,-3 c 0,-0.5 -0.5,-1 -1,-1 l -10,0 c -0.5,0 -1,0.5 -1,1 l 0,31 z" />
+ style="fill:url(#linearGradient24867);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ sodipodi:nodetypes="ccccccssssccc"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- id="path24851"
- style="opacity:0.07999998;fill:url(#linearGradient24869);fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+ sodipodi:nodetypes="cccccccccccccccccccccccccccccc"
d="m 807.5,89.5 33,0 m -33,12 33,0 m -33,-4 33,0 m -33,-6 33,0 m -33,20 33,0 m -33,2 33,0 m -33,-18 33,0 m -33,-2 33,0 m -20,-6 -13,0 m 0,20 33,0 m -33,-2 33,0 m -33,-2 33,0 m -33,-4 33,0 m -33,10 33,0 m -33,6 33,0"
- sodipodi:nodetypes="cccccccccccccccccccccccccccccc" />
+ style="opacity:0.07999998;fill:url(#linearGradient24869);fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+ id="path24851"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- inkscape:export-ydpi="74.800003"
- inkscape:export-xdpi="74.800003"
- inkscape:export-filename="/home/jimmac/ximian_art/icons/nautilus/suse93/gnome-fs-directory.png"
- sodipodi:nodetypes="csccsczc"
- id="path24853"
+ style="fill:url(#linearGradient24871);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00000012;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="m 844,118.5 c 3.5,0 5.5,-2 5.5,-5.5 l 0,-18.5 c -11.75604,-1.11e-4 -23.91623,0 -35.5,0 l 0,19.5 c 0,4.5 -7,4 -7,0.25 0,2 2.00002,3.73529 3,3.75 l 34,0.5 z"
- style="fill:url(#linearGradient24871);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00000012;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ id="path24853"
+ sodipodi:nodetypes="csccsczc"
+ inkscape:export-filename="/home/jimmac/ximian_art/icons/nautilus/suse93/gnome-fs-directory.png"
+ inkscape:export-xdpi="74.800003"
+ inkscape:export-ydpi="74.800003"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- d="m 807,87 12,0 0.0385,-3.33333 C 819.04423,83.166705 818.97512,83 818.5,83 l -10.92308,0 c -0.47512,0 -0.53846,0.16667 -0.53846,0.66667 L 807,87 z"
- id="path24855"
+ sodipodi:nodetypes="ccssccc"
style="opacity:0.7;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
- sodipodi:nodetypes="ccssccc" />
+ id="path24855"
+ d="m 807,87 12,0 0.0385,-3.33333 C 819.04423,83.166705 818.97512,83 818.5,83 l -10.92308,0 c -0.47512,0 -0.53846,0.16667 -0.53846,0.66667 L 807,87 z"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="cc"
- d="m 840.5,89 0,4.5"
+ id="path24857"
style="opacity:0.1;fill:none;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
- id="path24857" />
+ d="m 840.5,89 0,4.5"
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- id="path24859"
- style="opacity:0.1;fill:none;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+ sodipodi:nodetypes="ccc"
d="m 848.5,95.5 0,18 c 0,1.25 0.25,3 -1.25,4"
- sodipodi:nodetypes="ccc" />
+ style="opacity:0.1;fill:none;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+ id="path24859"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="cccccccsc"
- d="m 818.5,83.5 -11,0 0,30 c 0,5 7,5 7,0 l 0,-18 34,0 m -29,-8 c 0,0.5 0.5286,1 1,1 l 20,0"
+ id="path24861"
style="opacity:0.75;fill:none;stroke:#ffffff;stroke-width:1.29999995;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
- id="path24861" />
+ d="m 818.5,83.5 -11,0 0,30 c 0,5 7,5 7,0 l 0,-18 34,0 m -29,-8 c 0,0.5 0.5286,1 1,1 l 20,0"
+ sodipodi:nodetypes="cccccccsc"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- d="m 806.5,113.5 c 0,2.75 2,5 5,5 l 33,0 c 3,0 5,-2 5,-5 l 0,-18 c 0,-0.471405 -0.5286,-1 -1,-1 l -7,0 0,-6 c 0,-0.5 -0.5,-1 -1,-1 l -20.02773,0.04419 C 819.98721,87.54526 819.5,87 819.5,86.5 l 0,-3 c 0,-0.5 -0.5,-1 -1,-1 l -11,0 c -0.5,0 -1,0.5 -1,1 l 0,30 z"
- id="path24863"
+ sodipodi:nodetypes="ccccsscccssssccc"
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- sodipodi:nodetypes="ccccsscccssssccc" />
+ id="path24863"
+ d="m 806.5,113.5 c 0,2.75 2,5 5,5 l 33,0 c 3,0 5,-2 5,-5 l 0,-18 c 0,-0.471405 -0.5286,-1 -1,-1 l -7,0 0,-6 c 0,-0.5 -0.5,-1 -1,-1 l -20.02773,0.04419 C 819.98721,87.54526 819.5,87 819.5,86.5 l 0,-3 c 0,-0.5 -0.5,-1 -1,-1 l -11,0 c -0.5,0 -1,0.5 -1,1 l 0,30 z"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- style="fill:none;stroke:url(#linearGradient24873);stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
- d="m 841.5,94.5 -27,0 c -0.4714,0 -1,0.528595 -1,1 l 0,18 c 0,2.25 -1.25,3 -2.5,3"
+ sodipodi:nodetypes="csscc"
id="path24865"
- sodipodi:nodetypes="csscc" />
+ d="m 841.5,94.5 -27,0 c -0.4714,0 -1,0.528595 -1,1 l 0,18 c 0,2.25 -1.25,3 -2.5,3"
+ style="fill:none;stroke:url(#linearGradient24873);stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ inkscape:connector-curvature="0" />
</g>
<g
- style="opacity:0.5"
+ id="g24784"
transform="translate(114,248)"
- id="g24784">
+ style="opacity:0.5">
<path
- inkscape:connector-curvature="0"
- d="m 806.5,114.5 c 0,2.25 2,4 4,4 l 30,0 c 0.4163,0 1,-0.5 1,-1 l 0,-29 c 0,-0.5 -0.5,-1 -1,-1 l -21.02773,0.04419 C 818.98721,87.545209 818.5,87 818.5,86.5 l 0,-3 c 0,-0.5 -0.5,-1 -1,-1 l -10,0 c -0.5,0 -1,0.5 -1,1 l 0,31 z"
- id="path24789"
+ sodipodi:nodetypes="ccccccssssccc"
style="fill:url(#linearGradient24809);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- sodipodi:nodetypes="ccccccssssccc" />
+ id="path24789"
+ d="m 806.5,114.5 c 0,2.25 2,4 4,4 l 30,0 c 0.4163,0 1,-0.5 1,-1 l 0,-29 c 0,-0.5 -0.5,-1 -1,-1 l -21.02773,0.04419 C 818.98721,87.545209 818.5,87 818.5,86.5 l 0,-3 c 0,-0.5 -0.5,-1 -1,-1 l -10,0 c -0.5,0 -1,0.5 -1,1 l 0,31 z"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="cccccccccccccccccccccccccccccc"
- d="m 807.5,89.5 33,0 m -33,12 33,0 m -33,-4 33,0 m -33,-6 33,0 m -33,20 33,0 m -33,2 33,0 m -33,-18 33,0 m -33,-2 33,0 m -20,-6 -13,0 m 0,20 33,0 m -33,-2 33,0 m -33,-2 33,0 m -33,-4 33,0 m -33,10 33,0 m -33,6 33,0"
+ id="path24791"
style="opacity:0.07999998;fill:url(#linearGradient24811);fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
- id="path24791" />
+ d="m 807.5,89.5 33,0 m -33,12 33,0 m -33,-4 33,0 m -33,-6 33,0 m -33,20 33,0 m -33,2 33,0 m -33,-18 33,0 m -33,-2 33,0 m -20,-6 -13,0 m 0,20 33,0 m -33,-2 33,0 m -33,-2 33,0 m -33,-4 33,0 m -33,10 33,0 m -33,6 33,0"
+ sodipodi:nodetypes="cccccccccccccccccccccccccccccc"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- style="fill:url(#linearGradient24813);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00000012;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- d="m 844,118.5 c 3.5,0 5.5,-2 5.5,-5.5 l 0,-18.5 c -11.75604,-1.11e-4 -23.91623,0 -35.5,0 l 0,19.5 c 0,4.5 -7,4 -7,0.25 0,2 2.00002,3.73529 3,3.75 l 34,0.5 z"
- id="path24793"
- sodipodi:nodetypes="csccsczc"
- inkscape:export-filename="/home/jimmac/ximian_art/icons/nautilus/suse93/gnome-fs-directory.png"
+ inkscape:export-ydpi="74.800003"
inkscape:export-xdpi="74.800003"
- inkscape:export-ydpi="74.800003" />
+ inkscape:export-filename="/home/jimmac/ximian_art/icons/nautilus/suse93/gnome-fs-directory.png"
+ sodipodi:nodetypes="csccsczc"
+ id="path24793"
+ d="m 844,118.5 c 3.5,0 5.5,-2 5.5,-5.5 l 0,-18.5 c -11.75604,-1.11e-4 -23.91623,0 -35.5,0 l 0,19.5 c 0,4.5 -7,4 -7,0.25 0,2 2.00002,3.73529 3,3.75 l 34,0.5 z"
+ style="fill:url(#linearGradient24813);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00000012;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccssccc"
- style="opacity:0.7;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ d="m 807,87 12,0 0.0385,-3.33333 C 819.04423,83.166705 818.97512,83 818.5,83 l -10.92308,0 c -0.47512,0 -0.53846,0.16667 -0.53846,0.66667 L 807,87 z"
id="path24796"
- d="m 807,87 12,0 0.0385,-3.33333 C 819.04423,83.166705 818.97512,83 818.5,83 l -10.92308,0 c -0.47512,0 -0.53846,0.16667 -0.53846,0.66667 L 807,87 z" />
+ style="opacity:0.7;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ sodipodi:nodetypes="ccssccc"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- id="path24799"
- style="opacity:0.1;fill:none;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+ sodipodi:nodetypes="cc"
d="m 840.5,89 0,4.5"
- sodipodi:nodetypes="cc" />
+ style="opacity:0.1;fill:none;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+ id="path24799"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccc"
- d="m 848.5,95.5 0,18 c 0,1.25 0.25,3 -1.25,4"
+ id="path24801"
style="opacity:0.1;fill:none;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
- id="path24801" />
+ d="m 848.5,95.5 0,18 c 0,1.25 0.25,3 -1.25,4"
+ sodipodi:nodetypes="ccc"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- id="path24803"
- style="opacity:0.75;fill:none;stroke:#ffffff;stroke-width:1.29999995;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+ sodipodi:nodetypes="cccccccsc"
d="m 818.5,83.5 -11,0 0,30 c 0,5 7,5 7,0 l 0,-18 34,0 m -29,-8 c 0,0.5 0.5286,1 1,1 l 20,0"
- sodipodi:nodetypes="cccccccsc" />
+ style="opacity:0.75;fill:none;stroke:#ffffff;stroke-width:1.29999995;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+ id="path24803"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccccsscccssssccc"
- style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ d="m 806.5,113.5 c 0,2.75 2,5 5,5 l 33,0 c 3,0 5,-2 5,-5 l 0,-18 c 0,-0.471405 -0.5286,-1 -1,-1 l -7,0 0,-6 c 0,-0.5 -0.5,-1 -1,-1 l -20.02773,0.04419 C 819.98721,87.54526 819.5,87 819.5,86.5 l 0,-3 c 0,-0.5 -0.5,-1 -1,-1 l -11,0 c -0.5,0 -1,0.5 -1,1 l 0,30 z"
id="path24805"
- d="m 806.5,113.5 c 0,2.75 2,5 5,5 l 33,0 c 3,0 5,-2 5,-5 l 0,-18 c 0,-0.471405 -0.5286,-1 -1,-1 l -7,0 0,-6 c 0,-0.5 -0.5,-1 -1,-1 l -20.02773,0.04419 C 819.98721,87.54526 819.5,87 819.5,86.5 l 0,-3 c 0,-0.5 -0.5,-1 -1,-1 l -11,0 c -0.5,0 -1,0.5 -1,1 l 0,30 z" />
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ sodipodi:nodetypes="ccccsscccssssccc"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="csscc"
- id="path24807"
+ style="fill:none;stroke:url(#linearGradient24815);stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
d="m 841.5,94.5 -27,0 c -0.4714,0 -1,0.528595 -1,1 l 0,18 c 0,2.25 -1.25,3 -2.5,3"
- style="fill:none;stroke:url(#linearGradient24815);stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
+ id="path24807"
+ sodipodi:nodetypes="csscc"
+ inkscape:connector-curvature="0" />
</g>
<g
- transform="translate(0,-2)"
+ id="g44424"
style="opacity:0.4;stroke:#3d361a;filter:url(#filter44473)"
- id="g44424">
+ transform="translate(0,-2)">
<path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="cccc"
- id="path44406"
+ style="fill:none;stroke:#3d361a;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline;enable-background:new"
d="m 950.25,362 -5.25,0 -1,-1 0,-10"
- style="fill:none;stroke:#3d361a;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline;enable-background:new" />
+ id="path44406"
+ sodipodi:nodetypes="cccc"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccc"
- id="path44408"
+ style="fill:none;stroke:#3d361a;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline;enable-background:new"
d="M 948.25,354.25 944,350.00563 939.75,354.25"
- style="fill:none;stroke:#3d361a;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline;enable-background:new" />
+ id="path44408"
+ sodipodi:nodetypes="ccc"
+ inkscape:connector-curvature="0" />
</g>
<g
- transform="translate(617,273)"
+ style="display:inline;enable-background:new"
id="g44334"
- style="display:inline;enable-background:new">
+ transform="translate(617,273)">
<rect
- style="opacity:0;fill:#1a1a1a;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.20000005;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- id="rect44336"
- width="16"
- height="16"
+ y="73"
x="320"
- y="73" />
+ height="16"
+ width="16"
+ id="rect44336"
+ style="opacity:0;fill:#1a1a1a;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.20000005;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
<g
- transform="translate(0,-21)"
- id="g44338">
+ id="g44338"
+ transform="translate(0,-21)">
<g
id="g44340">
<g
- transform="translate(0,21)"
- id="g44342">
+ id="g44342"
+ transform="translate(0,21)">
<path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="cccc"
- id="path44344"
+ style="fill:none;stroke:#000000;stroke-width:3.4000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 333.25,87 -5.25,0 -1,-1 0,-10"
- style="fill:none;stroke:#000000;stroke-width:3.4000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ id="path44344"
+ sodipodi:nodetypes="cccc"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccc"
- id="path44346"
+ style="fill:none;stroke:#000000;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="M 331.25,79.25 327,75.005631 322.75,79.25"
- style="fill:none;stroke:#000000;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ id="path44346"
+ sodipodi:nodetypes="ccc"
+ inkscape:connector-curvature="0" />
</g>
<g
- transform="translate(0,21)"
- id="g44348">
+ id="g44348"
+ transform="translate(0,21)">
<path
- inkscape:connector-curvature="0"
- style="fill:none;stroke:#e6e6e6;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
- d="m 333.25,87 -5.25,0 -1,-1 0,-10"
+ sodipodi:nodetypes="cccc"
id="path44350"
- sodipodi:nodetypes="cccc" />
- <path
- inkscape:connector-curvature="0"
+ d="m 333.25,87 -5.25,0 -1,-1 0,-10"
style="fill:none;stroke:#e6e6e6;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
- d="M 331.25,79.25 327,75.005631 322.75,79.25"
+ inkscape:connector-curvature="0" />
+ <path
+ sodipodi:nodetypes="ccc"
id="path44352"
- sodipodi:nodetypes="ccc" />
+ d="M 331.25,79.25 327,75.005631 322.75,79.25"
+ style="fill:none;stroke:#e6e6e6;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ inkscape:connector-curvature="0" />
</g>
</g>
<path
- inkscape:connector-curvature="0"
- style="fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- d="m 328.5,107.5 5,0 m -7,-9 0,8.5 m -4.25,-7 4.5,-4.5"
+ sodipodi:nodetypes="cccccc"
id="path44354"
- sodipodi:nodetypes="cccccc" />
+ d="m 328.5,107.5 5,0 m -7,-9 0,8.5 m -4.25,-7 4.5,-4.5"
+ style="fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ inkscape:connector-curvature="0" />
</g>
</g>
<g
- transform="translate(66,248)"
+ style="display:inline;enable-background:new"
id="g24818"
- style="display:inline;enable-background:new">
+ transform="translate(66,248)">
<path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccccccssssccc"
- style="fill:url(#linearGradient24839);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ d="m 806.5,114.5 c 0,2.25 2,4 4,4 l 30,0 c 0.4163,0 1,-0.5 1,-1 l 0,-29 c 0,-0.5 -0.5,-1 -1,-1 l -21.02773,0.04419 C 818.98721,87.545209 818.5,87 818.5,86.5 l 0,-3 c 0,-0.5 -0.5,-1 -1,-1 l -10,0 c -0.5,0 -1,0.5 -1,1 l 0,31 z"
id="path24821"
- d="m 806.5,114.5 c 0,2.25 2,4 4,4 l 30,0 c 0.4163,0 1,-0.5 1,-1 l 0,-29 c 0,-0.5 -0.5,-1 -1,-1 l -21.02773,0.04419 C 818.98721,87.545209 818.5,87 818.5,86.5 l 0,-3 c 0,-0.5 -0.5,-1 -1,-1 l -10,0 c -0.5,0 -1,0.5 -1,1 l 0,31 z" />
+ style="fill:url(#linearGradient24839);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ sodipodi:nodetypes="ccccccssssccc"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- id="path24823"
- style="opacity:0.07999998;fill:url(#linearGradient24841);fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+ sodipodi:nodetypes="cccccccccccccccccccccccccccccc"
d="m 807.5,89.5 33,0 m -33,12 33,0 m -33,-4 33,0 m -33,-6 33,0 m -33,20 33,0 m -33,2 33,0 m -33,-18 33,0 m -33,-2 33,0 m -20,-6 -13,0 m 0,20 33,0 m -33,-2 33,0 m -33,-2 33,0 m -33,-4 33,0 m -33,10 33,0 m -33,6 33,0"
- sodipodi:nodetypes="cccccccccccccccccccccccccccccc" />
+ style="opacity:0.07999998;fill:url(#linearGradient24841);fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+ id="path24823"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- inkscape:export-ydpi="74.800003"
- inkscape:export-xdpi="74.800003"
- inkscape:export-filename="/home/jimmac/ximian_art/icons/nautilus/suse93/gnome-fs-directory.png"
- sodipodi:nodetypes="csccsczc"
- id="path24825"
+ style="fill:url(#linearGradient24843);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00000012;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="m 844,118.5 c 3.5,0 5.5,-2 5.5,-5.5 l 0,-16 c -11.75604,-1.11e-4 -23.91623,0 -35.5,0 l 0,17 c 0,4.5 -7,4 -7,0.25 0,2 2.00002,3.73529 3,3.75 l 34,0.5 z"
- style="fill:url(#linearGradient24843);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00000012;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ id="path24825"
+ sodipodi:nodetypes="csccsczc"
+ inkscape:export-filename="/home/jimmac/ximian_art/icons/nautilus/suse93/gnome-fs-directory.png"
+ inkscape:export-xdpi="74.800003"
+ inkscape:export-ydpi="74.800003"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- d="m 807,87 12,0 0.0385,-3.33333 C 819.04423,83.166705 818.97512,83 818.5,83 l -10.92308,0 c -0.47512,0 -0.53846,0.16667 -0.53846,0.66667 L 807,87 z"
- id="path24827"
+ sodipodi:nodetypes="ccssccc"
style="opacity:0.7;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
- sodipodi:nodetypes="ccssccc" />
+ id="path24827"
+ d="m 807,87 12,0 0.0385,-3.33333 C 819.04423,83.166705 818.97512,83 818.5,83 l -10.92308,0 c -0.47512,0 -0.53846,0.16667 -0.53846,0.66667 L 807,87 z"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="cc"
- d="m 840.5,89 0,7.5"
+ id="path24829"
style="opacity:0.1;fill:none;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
- id="path24829" />
+ d="m 840.5,89 0,7.5"
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- id="path24831"
- style="opacity:0.1;fill:none;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+ sodipodi:nodetypes="ccc"
d="m 848.5,98.75 0,14.75 c 0,1.25 0.25,3 -1.25,4"
- sodipodi:nodetypes="ccc" />
+ style="opacity:0.1;fill:none;stroke:#000000;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+ id="path24831"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="cccccccsc"
- d="m 818.5,83.5 -11,0 0,30 c 0,5 7,5 7,0 l 0,-16 34,0 m -29,-10 c 0,0.5 0.5286,1 1,1 l 20,0"
+ id="path24833"
style="opacity:0.75;fill:none;stroke:#ffffff;stroke-width:1.29999995;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
- id="path24833" />
+ d="m 818.5,83.5 -11,0 0,30 c 0,5 7,5 7,0 l 0,-16 34,0 m -29,-10 c 0,0.5 0.5286,1 1,1 l 20,0"
+ sodipodi:nodetypes="cccccccsc"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- d="m 806.5,113.5 c 0,2.75 2,5 5,5 l 33,0 c 3,0 5,-2 5,-5 l 0,-16 c 0,-0.471405 -0.5286,-1 -1,-1 l -7,0 0,-8 c 0,-0.5 -0.5,-1 -1,-1 l -20.02773,0.04419 C 819.98721,87.54526 819.5,87 819.5,86.5 l 0,-3 c 0,-0.5 -0.5,-1 -1,-1 l -11,0 c -0.5,0 -1,0.5 -1,1 l 0,30 z"
- id="path24835"
+ sodipodi:nodetypes="ccccsscccssssccc"
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- sodipodi:nodetypes="ccccsscccssssccc" />
+ id="path24835"
+ d="m 806.5,113.5 c 0,2.75 2,5 5,5 l 33,0 c 3,0 5,-2 5,-5 l 0,-16 c 0,-0.471405 -0.5286,-1 -1,-1 l -7,0 0,-8 c 0,-0.5 -0.5,-1 -1,-1 l -20.02773,0.04419 C 819.98721,87.54526 819.5,87 819.5,86.5 l 0,-3 c 0,-0.5 -0.5,-1 -1,-1 l -11,0 c -0.5,0 -1,0.5 -1,1 l 0,30 z"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- style="fill:none;stroke:url(#linearGradient24845);stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
- d="m 841.5,96.500004 -27,0 c -0.4714,0 -1,0.528595 -1,1 l 0,15.999996 c 0,2.25 -1.25,3 -2.5,3"
+ sodipodi:nodetypes="csscc"
id="path24837"
- sodipodi:nodetypes="csscc" />
+ d="m 841.5,96.500004 -27,0 c -0.4714,0 -1,0.528595 -1,1 l 0,15.999996 c 0,2.25 -1.25,3 -2.5,3"
+ style="fill:none;stroke:url(#linearGradient24845);stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ inkscape:connector-curvature="0" />
</g>
<g
- style="opacity:0.4;filter:url(#filter44477)"
- id="g44455">
+ id="g44455"
+ style="opacity:0.4;filter:url(#filter44477)">
<path
- inkscape:connector-curvature="0"
- transform="translate(645,252.05)"
- style="fill:none;stroke:#3d361a;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- d="m 343.5,104.5 1.75,1.75 c 2.3454,2.33848 6.16153,2.34539 8.5,0 l 0.5,-0.5"
+ sodipodi:nodetypes="cs"
id="path44446"
- sodipodi:nodetypes="cs" />
- <path
- inkscape:connector-curvature="0"
- transform="translate(645,252.05)"
+ d="m 343.5,104.5 1.75,1.75 c 2.3454,2.33848 6.16153,2.34539 8.5,0 l 0.5,-0.5"
style="fill:none;stroke:#3d361a;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- d="m 343,108.25 0,-4.25 4.25,0"
+ transform="translate(645,252.05)"
+ inkscape:connector-curvature="0" />
+ <path
+ sodipodi:nodetypes="ccc"
id="path44449"
- sodipodi:nodetypes="ccc" />
+ d="m 343,108.25 0,-4.25 4.25,0"
+ style="fill:none;stroke:#3d361a;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ transform="translate(645,252.05)"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- transform="matrix(-1,0,0,-1,1343,456.05)"
- sodipodi:nodetypes="cs"
- id="path44451"
+ style="fill:none;stroke:#3d361a;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="m 343.5,104.5 1.75,1.75 c 2.3454,2.33848 6.16153,2.34539 8.5,0 l 0.5,-0.5"
- style="fill:none;stroke:#3d361a;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
- <path
- inkscape:connector-curvature="0"
+ id="path44451"
+ sodipodi:nodetypes="cs"
transform="matrix(-1,0,0,-1,1343,456.05)"
- sodipodi:nodetypes="ccc"
- id="path44453"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:none;stroke:#3d361a;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="m 343,108.25 0,-4.25 4.25,0"
- style="fill:none;stroke:#3d361a;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ id="path44453"
+ sodipodi:nodetypes="ccc"
+ transform="matrix(-1,0,0,-1,1343,456.05)"
+ inkscape:connector-curvature="0" />
</g>
<g
- transform="translate(645,273.05)"
+ style="display:inline;enable-background:new"
id="g44356"
- style="display:inline;enable-background:new">
+ transform="translate(645,273.05)">
<rect
- y="73"
- x="341"
- height="16"
- width="16"
+ style="opacity:0;fill:#1a1a1a;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.20000005;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect44358"
- style="opacity:0;fill:#1a1a1a;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.20000005;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ width="16"
+ height="16"
+ x="341"
+ y="73" />
<g
- transform="translate(0,-21)"
- id="g44360">
+ id="g44360"
+ transform="translate(0,-21)">
<g
id="g44362">
<g
id="g44364">
<path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="cs"
- id="path44366"
+ style="fill:none;stroke:#000000;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="m 343.5,104.5 1.75,1.75 c 2.3454,2.33848 6.16153,2.34539 8.5,0 l 0.5,-0.5"
- style="fill:none;stroke:#000000;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ id="path44366"
+ sodipodi:nodetypes="cs"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccc"
- id="path44368"
+ style="fill:none;stroke:#000000;stroke-width:3.4000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="m 343,108.25 0,-4.25 4.25,0"
- style="fill:none;stroke:#000000;stroke-width:3.4000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ id="path44368"
+ sodipodi:nodetypes="ccc"
+ inkscape:connector-curvature="0" />
</g>
<g
id="g44370">
<path
- inkscape:connector-curvature="0"
- style="fill:none;stroke:#e6e6e6;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- d="m 343,108.25 0,-4.25 4.25,0"
+ sodipodi:nodetypes="ccc"
id="path44372"
- sodipodi:nodetypes="ccc" />
- <path
- inkscape:connector-curvature="0"
+ d="m 343,108.25 0,-4.25 4.25,0"
style="fill:none;stroke:#e6e6e6;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- d="m 343.5,104.5 1.75,1.75 c 2.3454,2.33848 6.16153,2.34539 8.5,0 l 0.5,-0.5"
+ inkscape:connector-curvature="0" />
+ <path
+ sodipodi:nodetypes="cs"
id="path44374"
- sodipodi:nodetypes="cs" />
+ d="m 343.5,104.5 1.75,1.75 c 2.3454,2.33848 6.16153,2.34539 8.5,0 l 0.5,-0.5"
+ style="fill:none;stroke:#e6e6e6;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ inkscape:connector-curvature="0" />
</g>
<path
- inkscape:connector-curvature="0"
- id="path44376"
+ style="opacity:0.1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="m 344,105 0,1 0,1.5 1,0 0,-1.5 1.5,0 0,-1 -1.5,0 -1,0 z"
- style="opacity:0.1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ id="path44376"
+ inkscape:connector-curvature="0" />
</g>
<g
- id="g44378"
- transform="matrix(-1,0,0,-1,698,204)">
+ transform="matrix(-1,0,0,-1,698,204)"
+ id="g44378">
<g
id="g44380">
<path
- inkscape:connector-curvature="0"
- style="fill:none;stroke:#000000;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- d="m 343.5,104.5 1.75,1.75 c 2.3454,2.33848 6.16153,2.34539 8.5,0 l 0.5,-0.5"
+ sodipodi:nodetypes="cs"
id="path44382"
- sodipodi:nodetypes="cs" />
+ d="m 343.5,104.5 1.75,1.75 c 2.3454,2.33848 6.16153,2.34539 8.5,0 l 0.5,-0.5"
+ style="fill:none;stroke:#000000;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- style="fill:none;stroke:#000000;stroke-width:3.4000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- d="m 343,108.25 0,-4.25 4.25,0"
+ sodipodi:nodetypes="ccc"
id="path44384"
- sodipodi:nodetypes="ccc" />
+ d="m 343,108.25 0,-4.25 4.25,0"
+ style="fill:none;stroke:#000000;stroke-width:3.4000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ inkscape:connector-curvature="0" />
</g>
<g
id="g44386">
<path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccc"
- id="path44388"
+ style="fill:none;stroke:#e6e6e6;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="m 343,108.25 0,-4.25 4.25,0"
- style="fill:none;stroke:#e6e6e6;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ id="path44388"
+ sodipodi:nodetypes="ccc"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="cs"
- id="path44390"
+ style="fill:none;stroke:#e6e6e6;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="m 343.5,104.5 1.75,1.75 c 2.3454,2.33848 6.16153,2.34539 8.5,0 l 0.5,-0.5"
- style="fill:none;stroke:#e6e6e6;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ id="path44390"
+ sodipodi:nodetypes="cs"
+ inkscape:connector-curvature="0" />
</g>
<path
- inkscape:connector-curvature="0"
- style="opacity:0.1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path44392"
d="m 344,105 0,1 0,1.5 1,0 0,-1.5 1.5,0 0,-1 -1.5,0 -1,0 z"
- id="path44392" />
+ style="opacity:0.1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- style="fill:none;stroke:url(#linearGradient44402);stroke-width:1.10000002;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- d="m 344.90625,106.59375 c 2.52573,2.51828 6.66805,2.52691 9.1875,0 l 0.5,-0.5"
+ sodipodi:nodetypes="ccc"
id="path44394"
- sodipodi:nodetypes="ccc" />
+ d="m 344.90625,106.59375 c 2.52573,2.51828 6.66805,2.52691 9.1875,0 l 0.5,-0.5"
+ style="fill:none;stroke:url(#linearGradient44402);stroke-width:1.10000002;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ inkscape:connector-curvature="0" />
</g>
<path
- inkscape:connector-curvature="0"
- style="fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- d="m 350.5,99.5 4,0 0,-4"
+ sodipodi:nodetypes="ccc"
id="path44396"
- sodipodi:nodetypes="ccc" />
- <path
- inkscape:connector-curvature="0"
+ d="m 350.5,99.5 4,0 0,-4"
style="fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- d="m 347.5,103.5 -4.5,0 c -0.25,0 -0.5,0.25 -0.5,0.5 l 0,4.5"
+ inkscape:connector-curvature="0" />
+ <path
+ sodipodi:nodetypes="cccc"
id="path44398"
- sodipodi:nodetypes="cccc" />
+ d="m 347.5,103.5 -4.5,0 c -0.25,0 -0.5,0.25 -0.5,0.5 l 0,4.5"
+ style="fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- style="fill:none;stroke:url(#linearGradient44404);stroke-width:1.10000002;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- d="m 345.59375,105.90625 c 2.07803,2.0719 5.36384,2.10325 7.53125,0.1875 L 354,105.25"
+ sodipodi:nodetypes="ccc"
id="path44400"
- sodipodi:nodetypes="ccc" />
+ d="m 345.59375,105.90625 c 2.07803,2.0719 5.36384,2.10325 7.53125,0.1875 L 354,105.25"
+ style="fill:none;stroke:url(#linearGradient44404);stroke-width:1.10000002;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ inkscape:connector-curvature="0" />
</g>
</g>
<g
- id="g34977"
- style="display:inline;enable-background:new">
+ style="display:inline;enable-background:new"
+ id="g34977">
<g
- style="display:inline"
- id="g21853-3"
- transform="translate(856,-154)"
- inkscape:export-filename="C:\Documents and Settings\Pracowniaa\Moje dokumenty\Moje obrazy\BLENDER ICONS redesign\ver 2\IMAGE BROWSER ICONS.png"
+ inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
+ inkscape:export-filename="C:\Documents and Settings\Pracowniaa\Moje dokumenty\Moje obrazy\BLENDER ICONS redesign\ver 2\IMAGE BROWSER ICONS.png"
+ transform="translate(856,-154)"
+ id="g21853-3"
+ style="display:inline">
<rect
- ry="0"
- rx="2.4004419"
- y="430"
- x="108"
- height="48"
- width="48"
+ style="opacity:0;fill:#cccccc;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00000012;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect21855-8"
- style="opacity:0;fill:#cccccc;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00000012;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ width="48"
+ height="48"
+ x="108"
+ y="430"
+ rx="2.4004419"
+ ry="0" />
<g
id="g21857-6">
<path
- inkscape:connector-curvature="0"
- style="fill:url(#linearGradient21875-7-1-0-1);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;display:inline"
- d="m 125.5,433.5 23,0 0,41 -33,0 0,-31 10,-10 z"
- id="path21859-9"
- sodipodi:nodetypes="cccccc"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90" />
- <path
- inkscape:connector-curvature="0"
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- d="m 147.25,434.5 c -4.875,0 -21.75,0 -21.75,0 m -8.9447,8.5 -0.0553,30"
- style="opacity:0.7;fill:none;stroke:#ffffff;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
- id="path21861-8"
- sodipodi:nodetypes="cccc" />
+ sodipodi:nodetypes="cccccc"
+ id="path21859-9"
+ d="m 125.5,433.5 23,0 0,41 -33,0 0,-31 10,-10 z"
+ style="fill:url(#linearGradient21875-7-1-0-1);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;display:inline"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- clip-path="url(#clipPath13106-9-2-9-9)"
- inkscape:export-ydpi="90"
- inkscape:export-xdpi="90"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
sodipodi:nodetypes="cccc"
- id="path21863-6"
+ id="path21861-8"
+ style="opacity:0.7;fill:none;stroke:#ffffff;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ d="m 147.25,434.5 c -4.875,0 -21.75,0 -21.75,0 m -8.9447,8.5 -0.0553,30"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ inkscape:connector-curvature="0" />
+ <path
+ style="opacity:0.2;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter63011-6-7-0-8)"
d="m 115,444 12,0 -1,-11 -11,11 z"
- style="opacity:0.2;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter63011-6-7-0-8)" />
+ id="path21863-6"
+ sodipodi:nodetypes="cccc"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ clip-path="url(#clipPath13106-9-2-9-9)"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccc"
+ id="path21865-6"
+ style="fill:none;stroke:url(#linearGradient21877-3-2-7-2);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 117.5,443.75 9,-2.5 0,-6"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
clip-path="none"
+ inkscape:connector-curvature="0" />
+ <path
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- d="m 117.5,443.75 9,-2.5 0,-6"
- style="fill:none;stroke:url(#linearGradient21877-3-2-7-2);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
- id="path21865-6"
- sodipodi:nodetypes="ccc" />
- <path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="cccccc"
- id="path21867-2"
- style="fill:none;stroke:#333333;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
d="m 115.5,442.75 0,31.75 33,0 0,-41 -23.75,0 -9.25,9.25 z"
+ style="fill:none;stroke:#333333;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ id="path21867-2"
+ sodipodi:nodetypes="cccccc"
+ inkscape:connector-curvature="0" />
+ <path
+ style="opacity:0.16000001;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline;filter:url(#filter63011-6-7-0-8)"
+ d="m 116,443 11,1 -2,-10 -9,9 z"
+ id="path21869-3"
+ sodipodi:nodetypes="cccc"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
inkscape:export-xdpi="90"
- inkscape:export-ydpi="90" />
- <path
- inkscape:connector-curvature="0"
+ inkscape:export-ydpi="90"
clip-path="url(#clipPath13106-9-2-9-9)"
+ inkscape:connector-curvature="0" />
+ <path
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- sodipodi:nodetypes="cccc"
- id="path21869-3"
- d="m 116,443 11,1 -2,-10 -9,9 z"
- style="opacity:0.16000001;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline;filter:url(#filter63011-6-7-0-8)" />
- <path
- inkscape:connector-curvature="0"
- style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
- d="m 116,443 0.0108,0.72434 L 126,441 l 0,-7 -1,0 -9,9 z"
- id="path21871-8"
sodipodi:nodetypes="cccccc"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90" />
+ id="path21871-8"
+ d="m 116,443 0.0108,0.72434 L 126,441 l 0,-7 -1,0 -9,9 z"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccc"
- id="path21873-2"
- style="opacity:0.15;fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
- d="m 147.5,435 0,38.5 -30.5,0"
- inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
- inkscape:export-ydpi="90" />
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ d="m 147.5,435 0,38.5 -30.5,0"
+ style="opacity:0.15;fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ id="path21873-2"
+ sodipodi:nodetypes="ccc"
+ inkscape:connector-curvature="0" />
</g>
</g>
<g
- id="g34938"
- transform="translate(63,-47)">
- <path
- id="path61236"
- style="color:#000000;fill:url(#linearGradient34959-9-2-1);fill-opacity:1;fill-rule:nonzero;stroke:#ff0000;stroke-width:0.17893334;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- d="m 919.5,356.5067 0,-3 c 0,-1.73575 1.26424,-3 3,-3 l 5,0 c 1.73576,0 3,-1.26425 3,-3 l 0,-3.0064 2.5,0.006 c 2,0 3.5,2.5 3.5,6 0,3.5 -1.25,6 -3.5,6 -4.98134,0 -12.77318,0 -2.5,0 l 0,2.75 c 0,2.5 -2,3.24997 -5.5,3.24998 l 0,2e-5 c -3.5,0.0104 -5.5,-0.75 -5.5,-3.25 l 0,-2.7628"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="cssssccsscsccsc" />
+ transform="translate(63,-47)"
+ id="g34938">
<path
sodipodi:nodetypes="cssssccsscsccsc"
inkscape:connector-curvature="0"
- d="m 930.5,344.5 0,3 c 0,1.73575 -1.26424,3 -3,3 l -5,0 c -1.73576,0 -3,1.26425 -3,3 l 0,3.0064 -2.5,-0.006 c -2,0 -3.5,-2.5 -3.5,-6 0,-3.5 1.25,-6 3.5,-6 4.98134,0 12.77318,0 2.5,0 l 0,-2.75 c 0,-2.5 2,-3.24997 5.5,-3.24998 l 0,-2e-5 c 3.5,-0.0104 5.5,0.75 5.5,3.25 l 0,2.7628"
- style="color:#000000;fill:url(#linearGradient34961-3-6-5);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.17893334;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- id="path61233" />
+ d="m 919.5,356.5067 0,-3 c 0,-1.73575 1.26424,-3 3,-3 l 5,0 c 1.73576,0 3,-1.26425 3,-3 l 0,-3.0064 2.5,0.006 c 2,0 3.5,2.5 3.5,6 0,3.5 -1.25,6 -3.5,6 -4.98134,0 -12.77318,0 -2.5,0 l 0,2.75 c 0,2.5 -2,3.24997 -5.5,3.24998 l 0,2e-5 c -3.5,0.0104 -5.5,-0.75 -5.5,-3.25 l 0,-2.7628"
+ style="color:#000000;fill:url(#linearGradient34959-9-2-1);fill-opacity:1;fill-rule:nonzero;stroke:#ff0000;stroke-width:0.17893334;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path61236" />
<path
+ id="path61233"
+ style="color:#000000;fill:url(#linearGradient34961-3-6-5);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.17893334;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ d="m 930.5,344.5 0,3 c 0,1.73575 -1.26424,3 -3,3 l -5,0 c -1.73576,0 -3,1.26425 -3,3 l 0,3.0064 -2.5,-0.006 c -2,0 -3.5,-2.5 -3.5,-6 0,-3.5 1.25,-6 3.5,-6 4.98134,0 12.77318,0 2.5,0 l 0,-2.75 c 0,-2.5 2,-3.24997 5.5,-3.24998 l 0,-2e-5 c 3.5,-0.0104 5.5,0.75 5.5,3.25 l 0,2.7628"
inkscape:connector-curvature="0"
- sodipodi:nodetypes="cccccscccsccccsccccc"
- id="path61167"
+ sodipodi:nodetypes="cssssccsscsccsc" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:0.80000001;stroke-miterlimit:4;stroke-opacity:0.8627451;stroke-dasharray:none"
d="m 925,338.50002 c -3.5,10e-6 -5.5,0.74998 -5.5,3.24998 l 0,2.75 5.5,0 -8,0 c -2.25,0 -3.5,2.5 -3.5,6 0,3.5 1.5,6 3.5,6 l 2.5,0.0128 0,2.9872 c 0,2 2,3.01281 5.5,3.0128 3.5,-1e-5 5.5,-1.0128 5.5,-3.0128 l 0,-3 -5.5,0 8,0 c 2,0 3.5,-2.5 3.5,-6 0,-3.5 -1.5,-6 -3.5,-6 l -2.5,0.0128 0,-2.7628 c 0,-2.5 -2,-3.26045 -5.5,-3.25 z"
- style="fill:none;stroke:#000000;stroke-width:0.80000001;stroke-miterlimit:4;stroke-opacity:0.8627451;stroke-dasharray:none" />
+ id="path61167"
+ sodipodi:nodetypes="cccccscccsccccsccccc"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="cccccc"
- id="path61169"
+ style="fill:none;stroke:#000000;stroke-width:0.80000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.78431373;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="m 930.5,344.5 0,3 c 0,1.73575 -1.26424,3 -3,3 l -5,0 c -1.73576,0 -3,1.26425 -3,3 l 0,3"
- style="fill:none;stroke:#000000;stroke-width:0.80000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.78431373;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ id="path61169"
+ sodipodi:nodetypes="cccccc"
+ inkscape:connector-curvature="0" />
<path
- d="m 923,342 c 0,0.55228 -0.44772,1 -1,1 -0.55228,0 -1,-0.44772 -1,-1 0,-0.55228 0.44772,-1 1,-1 0.55228,0 1,0.44772 1,1 z"
- sodipodi:ry="1"
- sodipodi:rx="1"
- sodipodi:cy="342"
- sodipodi:cx="922"
- id="path61220"
+ sodipodi:type="arc"
style="color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- sodipodi:type="arc" />
- <path
- d="m 929,359 c 0,0.55228 -0.44772,1 -1,1 -0.55228,0 -1,-0.44772 -1,-1 0,-0.55228 0.44772,-1 1,-1 0.55228,0 1,0.44772 1,1 z"
- sodipodi:ry="1"
+ id="path61220"
+ sodipodi:cx="922"
+ sodipodi:cy="342"
sodipodi:rx="1"
- sodipodi:cy="359"
- sodipodi:cx="928"
- id="path61222"
+ sodipodi:ry="1"
+ d="m 923,342 c 0,0.55228 -0.44772,1 -1,1 -0.55228,0 -1,-0.44772 -1,-1 0,-0.55228 0.44772,-1 1,-1 0.55228,0 1,0.44772 1,1 z" />
+ <path
+ sodipodi:type="arc"
style="color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- sodipodi:type="arc" />
+ id="path61222"
+ sodipodi:cx="928"
+ sodipodi:cy="359"
+ sodipodi:rx="1"
+ sodipodi:ry="1"
+ d="m 929,359 c 0,0.55228 -0.44772,1 -1,1 -0.55228,0 -1,-0.44772 -1,-1 0,-0.55228 0.44772,-1 1,-1 0.55228,0 1,0.44772 1,1 z" />
<g
- style="opacity:0.4"
- id="g61345">
+ id="g61345"
+ style="opacity:0.4">
<path
- style="fill:none;stroke:url(#linearGradient34963-5-9-1);stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
- d="m 920.5,343.25 0,-1.5 c 0,-1.75 1.5,-2.25 4.5,-2.25 3,0 4.5,0.5 4.5,2.25 l 0,4.75"
- id="path61333"
+ sodipodi:nodetypes="cszsc"
inkscape:connector-curvature="0"
- sodipodi:nodetypes="cszsc" />
+ id="path61333"
+ d="m 920.5,343.25 0,-1.5 c 0,-1.75 1.5,-2.25 4.5,-2.25 3,0 4.5,0.5 4.5,2.25 l 0,4.75"
+ style="fill:none;stroke:url(#linearGradient34963-5-9-1);stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1" />
<path
- style="fill:none;stroke:url(#linearGradient34965-1-5-2);stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
- d="m 925.5,345 0,0.25 -0.25,0.25 -8.25,0 c -1.5,0 -2.5,2 -2.5,5 0,3 1.28917,5 2.5,5 l 1.5,0"
+ sodipodi:nodetypes="cccszsc"
+ inkscape:connector-curvature="0"
id="path61335"
+ d="m 925.5,345 0,0.25 -0.25,0.25 -8.25,0 c -1.5,0 -2.5,2 -2.5,5 0,3 1.28917,5 2.5,5 l 1.5,0"
+ style="fill:none;stroke:url(#linearGradient34965-1-5-2);stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path61337"
+ d="m 920.75,343.5 4.5,0 0.25,0.25 0,0.5"
+ style="fill:none;stroke:none" />
+ <path
+ sodipodi:nodetypes="cssssc"
inkscape:connector-curvature="0"
- sodipodi:nodetypes="cccszsc" />
+ id="path61339"
+ d="m 918.5,355.25 0,-1.75 c 0,-2.25 1.75,-4 4,-4 l 4.5,0 c 1.75,0 2.5,-0.75 2.5,-2.5 l 0,-0.5"
+ style="fill:none;stroke:none" />
+ <path
+ d="m 923,342 c 0,0.55228 -0.44772,1 -1,1 -0.55228,0 -1,-0.44772 -1,-1 0,-0.55228 0.44772,-1 1,-1 0.55228,0 1,0.44772 1,1 z"
+ sodipodi:ry="1"
+ sodipodi:rx="1"
+ sodipodi:cy="342"
+ sodipodi:cx="922"
+ id="path61355"
+ style="color:#000000;fill:none;stroke:url(#linearGradient34967-4-1-8);stroke-width:0.52766895;stroke-miterlimit:4;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ sodipodi:type="arc"
+ transform="matrix(1.5161021,0,0,1.5161021,-475.84616,-176.50693)" />
+ </g>
+ <g
+ id="g34104"
+ transform="matrix(-1,0,0,-1,1850,701)"
+ style="opacity:0.8;stroke:#ff0000">
<path
style="fill:none;stroke:none"
+ d="m 920.5,343.25 0,-1.5 c 0,-1.75 1.5,-2.25 4.5,-2.25 3,0 4.5,0.5 4.5,2.25 l 0,4.75"
+ id="path34106"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cszsc" />
+ <path
+ style="fill:none;stroke:url(#linearGradient34969-4-4-1);stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ d="m 914.5,350.5 c 0,3 1.28917,5 2.5,5 l 1.5,0"
+ id="path34108"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="csc" />
+ <path
+ style="fill:none;stroke:url(#linearGradient34971-5-0-9);stroke-linecap:round;stroke-linejoin:round"
d="m 920.75,343.5 4.5,0 0.25,0.25 0,0.5"
- id="path61337"
+ id="path34110"
inkscape:connector-curvature="0" />
<path
- style="fill:none;stroke:none"
- d="m 918.5,355.25 0,-1.75 c 0,-2.25 1.75,-4 4,-4 l 4.5,0 c 1.75,0 2.5,-0.75 2.5,-2.5 l 0,-0.5"
- id="path61339"
+ style="fill:none;stroke:url(#radialGradient34973-2-5-7);stroke-linecap:round;stroke-linejoin:round"
+ d="m 918.5,355.5 0,-2 c 0,-2.25 1.75,-4 4,-4 l 4.5,0 c 1.75,0 2.5,-0.75 2.5,-2.5 l 0,-0.5"
+ id="path34113"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cssssc" />
<path
transform="matrix(1.5161021,0,0,1.5161021,-475.84616,-176.50693)"
sodipodi:type="arc"
- style="color:#000000;fill:none;stroke:url(#linearGradient34967-4-1-8);stroke-width:0.52766895;stroke-miterlimit:4;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- id="path61355"
+ style="color:#000000;fill:none;stroke:url(#linearGradient34975-9-4-9);stroke-width:0.52766895;stroke-miterlimit:4;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path34115"
sodipodi:cx="922"
sodipodi:cy="342"
sodipodi:rx="1"
sodipodi:ry="1"
d="m 923,342 c 0,0.55228 -0.44772,1 -1,1 -0.55228,0 -1,-0.44772 -1,-1 0,-0.55228 0.44772,-1 1,-1 0.55228,0 1,0.44772 1,1 z" />
- </g>
- <g
- style="opacity:0.8;stroke:#ff0000"
- transform="matrix(-1,0,0,-1,1850,701)"
- id="g34104">
<path
- sodipodi:nodetypes="cszsc"
+ sodipodi:nodetypes="cccsc"
inkscape:connector-curvature="0"
- id="path34106"
- d="m 920.5,343.25 0,-1.5 c 0,-1.75 1.5,-2.25 4.5,-2.25 3,0 4.5,0.5 4.5,2.25 l 0,4.75"
+ id="path34901"
+ d="m 925.5,345 0,0.25 -0.25,0.25 -8.25,0 c -1.5,0 -2.5,2 -2.5,5"
style="fill:none;stroke:none" />
+ </g>
+ </g>
+ </g>
+ <g
+ style="display:inline;enable-background:new"
+ id="g45475-4"
+ transform="translate(208,-9)">
+ <g
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="C:\Documents and Settings\Pracowniaa\Moje dokumenty\Moje obrazy\BLENDER ICONS redesign\ver 2\IMAGE BROWSER ICONS.png"
+ transform="translate(696,-194)"
+ id="g22242-6"
+ style="display:inline">
+ <rect
+ style="opacity:0;fill:#cccccc;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00000012;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="rect22244-9"
+ width="48"
+ height="48"
+ x="108"
+ y="430"
+ rx="2.4004419"
+ ry="0" />
+ <g
+ id="g22246-2">
<path
- sodipodi:nodetypes="csc"
- inkscape:connector-curvature="0"
- id="path34108"
- d="m 914.5,350.5 c 0,3 1.28917,5 2.5,5 l 1.5,0"
- style="fill:none;stroke:url(#linearGradient34969-4-4-1);stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ sodipodi:nodetypes="cccccc"
+ id="path22249-8"
+ d="m 125.5,433.5 23,0 0,41 -33,0 0,-31 10,-10 z"
+ style="fill:url(#linearGradient22274-8);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;display:inline"
+ inkscape:connector-curvature="0" />
<path
- inkscape:connector-curvature="0"
- id="path34110"
- d="m 920.75,343.5 4.5,0 0.25,0.25 0,0.5"
- style="fill:none;stroke:url(#linearGradient34971-5-0-9);stroke-linecap:round;stroke-linejoin:round" />
+ sodipodi:nodetypes="cccc"
+ id="path22251-9"
+ style="opacity:0.7;fill:none;stroke:#ffffff;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ d="m 147.25,434.5 c -4.875,0 -21.75,0 -21.75,0 m -8.9447,8.5 -0.0553,30"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ inkscape:connector-curvature="0" />
<path
- sodipodi:nodetypes="cssssc"
- inkscape:connector-curvature="0"
- id="path34113"
- d="m 918.5,355.5 0,-2 c 0,-2.25 1.75,-4 4,-4 l 4.5,0 c 1.75,0 2.5,-0.75 2.5,-2.5 l 0,-0.5"
- style="fill:none;stroke:url(#radialGradient34973-2-5-7);stroke-linecap:round;stroke-linejoin:round" />
+ style="opacity:0.2;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter63011-5)"
+ d="m 115,444 12,0 -1,-11 -11,11 z"
+ id="path22253-5"
+ sodipodi:nodetypes="cccc"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ clip-path="url(#clipPath13106-5)"
+ inkscape:connector-curvature="0" />
<path
- d="m 923,342 c 0,0.55228 -0.44772,1 -1,1 -0.55228,0 -1,-0.44772 -1,-1 0,-0.55228 0.44772,-1 1,-1 0.55228,0 1,0.44772 1,1 z"
- sodipodi:ry="1"
- sodipodi:rx="1"
- sodipodi:cy="342"
- sodipodi:cx="922"
- id="path34115"
- style="color:#000000;fill:none;stroke:url(#linearGradient34975-9-4-9);stroke-width:0.52766895;stroke-miterlimit:4;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- sodipodi:type="arc"
- transform="matrix(1.5161021,0,0,1.5161021,-475.84616,-176.50693)" />
+ sodipodi:nodetypes="ccc"
+ id="path22264-3"
+ style="fill:none;stroke:url(#linearGradient22276-5);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 117.5,443.75 9,-2.5 0,-6"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ clip-path="none"
+ inkscape:connector-curvature="0" />
<path
- style="fill:none;stroke:none"
- d="m 925.5,345 0,0.25 -0.25,0.25 -8.25,0 c -1.5,0 -2.5,2 -2.5,5"
- id="path34901"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="cccsc" />
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ d="m 115.5,442.75 0,31.75 33,0 0,-41 -23.75,0 -9.25,9.25 z"
+ style="fill:none;stroke:#333333;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ id="path22266-6"
+ sodipodi:nodetypes="cccccc"
+ inkscape:connector-curvature="0" />
+ <path
+ style="opacity:0.16000001;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline;filter:url(#filter63011-5)"
+ d="m 116,443 11,1 -2,-10 -9,9 z"
+ id="path22268-0"
+ sodipodi:nodetypes="cccc"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ clip-path="url(#clipPath13106-5)"
+ inkscape:connector-curvature="0" />
+ <path
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ sodipodi:nodetypes="cccccc"
+ id="path22270-1"
+ d="m 116,443 0.0108,0.72434 L 126,441 l 0,-7 -1,0 -9,9 z"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
+ inkscape:connector-curvature="0" />
+ <path
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\BLENDER ICONSET\Kopia blender\.blender\icons\jendrzych's iconset.png"
+ d="m 147.5,435 0,38.5 -30.5,0"
+ style="opacity:0.15;fill:none;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ id="path22272-3"
+ sodipodi:nodetypes="ccc"
+ inkscape:connector-curvature="0" />
</g>
</g>
+ <g
+ transform="matrix(0.5406242,0,0,0.5829534,814.13667,247.65542)"
+ inkscape:label="Layer 1"
+ id="g21517-6">
+ <path
+ sodipodi:type="arc"
+ style="opacity:0.54857142;fill:url(#radialGradient21442-6-790);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path35486-4"
+ sodipodi:cx="28.019106"
+ sodipodi:cy="38.98439"
+ sodipodi:rx="15.467961"
+ sodipodi:ry="5.3033009"
+ d="m 43.487067,38.98439 c 0,2.928932 -6.925242,5.303301 -15.467961,5.303301 -8.542719,0 -15.467961,-2.374369 -15.467961,-5.303301 0,-2.928932 6.925242,-5.303301 15.467961,-5.303301 8.542719,0 15.467961,2.374369 15.467961,5.303301 z"
+ transform="matrix(1.274286,0,0,1.377124,-7.569123,-16.70193)" />
+ <path
+ style="fill:#dd6d00;fill-rule:evenodd;stroke:#993d00;stroke-width:1.7812928;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none"
+ id="path2482-9"
+ d="m 16.048489,28.093447 c 0.0098,0.576682 0.196474,1.697902 0.471116,2.577425 0.581566,1.854137 1.56684,3.572658 2.939126,5.086496 1.407488,1.553118 3.138519,2.803227 5.139315,3.68976 2.105357,0.931573 4.384795,1.407488 6.750134,1.403741 2.365339,-0.005 4.644601,-0.488686 6.74896,-1.427017 2.00002,-0.895288 3.731043,-2.148391 5.13754,-3.705517 1.369207,-1.519844 2.352576,-3.241114 2.934089,-5.096258 0.294262,-0.938353 0.476921,-1.889392 0.553238,-2.845308 0.07331,-0.939306 0.04204,-1.883511 -0.09183,-2.823792 -0.259981,-1.835599 -0.896294,-3.556847 -1.872652,-5.12758 -0.895541,-1.441699 -2.047808,-2.70454 -3.417268,-3.766975 0,0 0.002,-0.002 0.002,-0.002 0,0 -13.828458,-10.6197195 -13.828458,-10.6197195 -0.01176,-0.00978 -0.02252,-0.019551 -0.03529,-0.028344 -0.909003,-0.6959264 -3.879837,-0.7738945 -4.87679,-0.075035 -1.01067,0.7057021 -1.091821,1.8092613 -0.195527,2.5482146 1.899775,1.4997633 2.656207,2.2801589 4.566507,3.7797379 0,0 -14.852491,0.167033 -14.852491,0.167033 -1.994685,0 -3.1682609,0.947915 -3.4153947,2.333683 -0.2180771,1.222836 0.7479213,2.738129 2.4800217,2.738129 2.956573,0.0039 5.942111,-0.0069 8.909215,-0.01272 0,0 -16.01999,12.453223 -16.01999,12.453223 -0.020527,0.01564 -0.041053,0.02933 -0.06158,0.04497 -1.4974197,1.148389 -1.9831951,3.059322 -1.0399808,4.268393 0.9598323,1.22959 2.9977653,1.230588 4.5147288,0.006 0,0 8.677593,-7.102098 8.677593,-7.102098 0,0 -0.12511,0.959824 -0.116333,1.535532 l 1e-6,2.6e-5 0,0 0,0 z"
+ sodipodi:nodetypes="csssssssssscccsscccscccssccc"
+ inkscape:connector-curvature="0" />
+ <path
+ sodipodi:type="arc"
+ style="fill:url(#linearGradient21444-0-352);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path39153-3"
+ sodipodi:cx="31.1875"
+ sodipodi:cy="25.75"
+ sodipodi:rx="11.5625"
+ sodipodi:ry="10.125"
+ d="m 42.75,25.75 c 0,5.591883 -5.176708,10.125 -11.5625,10.125 -6.385792,0 -11.5625,-4.533117 -11.5625,-10.125 0,-5.591883 5.176708,-10.125 11.5625,-10.125 6.385792,0 11.5625,4.533117 11.5625,10.125 z"
+ transform="matrix(0.8018194,0,0,0.8471126,6.257567,4.5089892)" />
+ <path
+ sodipodi:nodetypes="csssssscssscsssccssscscccsccssssccscsscccssssc"
+ id="path21414-5"
+ d="m 25.8125,6.40625 c -0.334829,4.572e-4 -0.72202,0.089606 -0.90625,0.21875 4.5e-4,0.010412 4.5e-4,0.020838 0,0.03125 -0.212626,0.1484635 -0.188235,0.1956271 -0.1875,0.1875 0.0092,0.010621 -0.0072,-4.246e-4 0.03125,0.03125 0.01962,0.00828 0.03527,0.012546 0.0625,0.03125 0.01676,0.01151 0.01357,0.014555 0.03125,0.03125 0.193748,0.1576058 4.954976,4.005164 4.954976,4.005164 0.489837,0.39864 0.677395,1.066352 0.46875,1.65625 -0.115662,0.32703 -0.422813,0.541217 -0.6875,0.59375 -0.264687,0.05253 -0.498447,0.03054 -0.71875,0.03125 -5.639658,0.05119 -16.87989,0.03851 -16.87989,0.03851 -0.4102,2.75e-4 -0.935835,0.115997 -1.34375,0.34375 -0.407915,0.227753 -0.6637862,0.523861 -0.6875002,0.90625 -0.024417,0.393728 0.098829,0.605767 0.3437502,0.78125 0.244921,0.175483 0.614978,0.25 0.875,0.25 0,0 8.8125,0 8.8125,0 0.600305,-7.28e-4 1.223895,0.311058 1.4375,0.9375 0.04676,0.137121 0.06335,0.269976 0.0625,0.40625 -8.49e-4,0.136274 -0.02214,0.268794 -0.09375,0.375 -0.143211,0.212412 -0.319507,0.298568 -0.5,0.4375 0,0 -15.7871819,12.746851 -15.856336,12.800078 C 5.0310984,30.500117 5,30.53125 5,30.53125 5.0100745,30.519077 5.000335,30.499512 5,30.5 L 4.8125,30.3125 c 0.012336,0.02165 0.014481,0.03307 0.03125,0.0625 0.063558,0.0774 0.125,0.15625 0.125,0.15625 -0.00585,0.0056 -0.031233,0.03124 -0.03125,0.03125 0,0 -0.043442,-0.09921 -0.09375,-0.1875 0.037843,0.09884 0.06253,0.218739 0.0625,0.21875 -0.4662091,0.37119 -0.7783348,0.889746 -0.875,1.28125 -0.1043319,0.422581 -0.046,0.62455 0.125,0.84375 0.2999827,0.384295 1.3975356,0.595547 2.40625,-0.21875 0,0 8.65625,-7.09375 8.65625,-7.09375 0.473718,-0.387074 1.1446,-0.458625 1.6875,-0.15625 0.544608,0.303331 0.798054,0.927572 0.71875,1.53125 0,0 -0.0626,0.908319 -0.0625,1.25 2e-6,0.0085 -1.19e-4,0.02348 0,0.03125 0.192796,2.523718 1.400736,4.762818 3.03125,6.71875 2.801818,3.089095 6.627659,4.401619 10.75,4.5625 4.113324,-0.043 7.964529,-1.606111 10.75,-4.625 2.546631,-3.125326 3.513872,-6.363859 3.15625,-9.375 C 44.891575,22.325847 43.222923,19.516566 40.4375,17.25 35.951885,13.599946 31.206991,10.168434 26.59375,6.625 26.57515,6.610386 26.56455,6.59802 26.5625,6.59375 26.43835,6.498703 26.144223,6.4057899 25.8125,6.40625 z"
+ style="opacity:0.4857143;fill:none;stroke:url(#linearGradient21446-3-145);stroke-width:1.7812928;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#2f5b94;fill-rule:evenodd;stroke:none"
+ id="path2478-8"
+ d="m 25.708956,26.064593 c 0.07649,-1.397943 0.759369,-2.631914 1.78592,-3.505519 1.010226,-0.858782 2.366788,-1.383145 3.848625,-1.383145 1.480894,0 2.837456,0.524363 3.847446,1.383145 1.027685,0.873605 1.709741,2.106651 1.787122,3.504594 0.07927,1.438713 -0.49591,2.77459 -1.504012,3.764001 -1.027686,1.007933 -2.493008,1.640678 -4.130556,1.640678 -1.63849,0 -3.103814,-0.632745 -4.131451,-1.640678 -1.00914,-0.989411 -1.58234,-2.325288 -1.503094,-3.763076 l 0,0 0,0 0,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="opacity:0.51999996;fill:url(#radialGradient21448-8-143);fill-opacity:1;fill-rule:evenodd;stroke:none"
+ d="m 25.8125,6.03125 c -0.404852,5.53e-4 -2.204797,-0.059029 -2.48145,0.1349032 -0.280209,0.195652 -0.335403,0.376484 -0.34375,0.46875 -0.0083,0.092266 -0.01539,0.17648 0.1875,0.34375 0.01899,0.015735 0.04457,0.014317 0.0625,0.03125 0.124258,0.101028 4.748869,4.1248618 4.748869,4.1248618 0.373658,0.304091 0.504393,0.795817 0.34375,1.25 -0.160635,0.454191 -0.580748,0.373449 -1.0625,0.375 -5.634142,0.05114 -15.087371,-0.129601 -15.087371,-0.129601 -0.952967,6.38e-4 -2.339958,0.524782 -2.4062504,1.59375 -0.063562,1.024947 0.9247974,1.4375 1.5937504,1.4375 0,-1e-6 8.8125,0 8.8125,0 0.488364,-5.92e-4 0.936141,0.225277 1.09375,0.6875 0.157609,0.462231 -0.01926,0.514621 -0.40625,0.8125 0,0 -16.086298,13.088586 -16.086298,13.088586 -0.00142,0.0014 -0.029829,-0.0014 -0.03125,0 -0.064037,0.04879 -0.054226,0.04875 -0.03125,0.03125 -0.5536758,0.424619 -0.9087886,1.004019 -1.03125,1.5 -0.1224536,0.495981 -0.04661,0.856152 0.1875,1.15625 0.4788333,0.613413 1.777612,0.754857 2.90625,-0.15625 1e-7,10e-7 8.65625,-7.09375 8.65625,-7.09375 0.361955,-0.295753 0.872897,-0.352437 1.28125,-0.125 0.408345,0.227436 0.623381,0.692814 0.5625,1.15625 0,-1e-6 -0.0997,0.953636 -0.09375,1.34375 0.09498,1.301756 0.451616,2.521825 0.989039,3.664234 C 20.799917,36.321089 27.770982,19.392853 44.1875,21.03125 43.339652,19.54368 42.151282,18.185293 40.65625,16.96875 36.159865,13.309932 31.42016,9.882897 26.8125,6.34375 26.805335,6.338858 26.788292,6.317553 26.78125,6.3125 26.570707,6.151312 26.216591,6.030689 25.8125,6.03125 z"
+ id="path39166-5"
+ sodipodi:nodetypes="csssscsccsscsccssssscsscccsssc"
+ inkscape:connector-curvature="0" />
+ </g>
</g>
</g>
<g
- id="g46790"
- transform="translate(0,12)" />
+ transform="translate(0,12)"
+ id="g46790" />
<g
id="g46890" />
<path
- inkscape:connector-curvature="0"
- d=""
- style="fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ sodipodi:nodetypes="cc"
id="path34332"
- sodipodi:nodetypes="cc" />
+ style="fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ d=""
+ inkscape:connector-curvature="0" />
</g>
</svg>
diff --git a/release/datafiles/splash.png b/release/datafiles/splash.png
index d779472d9cb..ad0028ee0b4 100644
--- a/release/datafiles/splash.png
+++ b/release/datafiles/splash.png
Binary files differ
diff --git a/release/scripts/freestyle/style_modules/ChainingIterators.py b/release/scripts/freestyle/style_modules/ChainingIterators.py
index b908fad0b89..9be5a0ef03f 100644
--- a/release/scripts/freestyle/style_modules/ChainingIterators.py
+++ b/release/scripts/freestyle/style_modules/ChainingIterators.py
@@ -280,7 +280,7 @@ class pyFillOcclusionsRelativeChainingIterator(ChainingIterator):
def traverse(self, iter):
winner = None
winnerOrientation = 0
- print(self.current_edge.id.first, self.current_edge.id.second)
+ #print(self.current_edge.id.first, self.current_edge.id.second)
it = AdjacencyIterator(iter)
tvertex = self.next_vertex
if type(tvertex) is TVertex:
@@ -450,7 +450,7 @@ class pyFillOcclusionsAbsoluteAndRelativeChainingIterator(ChainingIterator):
def traverse(self, iter):
winner = None
winnerOrientation = 0
- print(self.current_edge.id.first, self.current_edge.id.second)
+ #print(self.current_edge.id.first, self.current_edge.id.second)
it = AdjacencyIterator(iter)
tvertex = self.next_vertex
if type(tvertex) is TVertex:
@@ -553,7 +553,7 @@ class pyFillQi0AbsoluteAndRelativeChainingIterator(ChainingIterator):
def traverse(self, iter):
winner = None
winnerOrientation = 0
- print(self.current_edge.id.first, self.current_edge.id.second)
+ #print(self.current_edge.id.first, self.current_edge.id.second)
it = AdjacencyIterator(iter)
tvertex = self.next_vertex
if type(tvertex) is TVertex:
diff --git a/release/scripts/freestyle/style_modules/PredicatesB1D.py b/release/scripts/freestyle/style_modules/PredicatesB1D.py
index 21bba923a2a..604692a999f 100644
--- a/release/scripts/freestyle/style_modules/PredicatesB1D.py
+++ b/release/scripts/freestyle/style_modules/PredicatesB1D.py
@@ -60,7 +60,7 @@ class pyViewMapGradientNormBP1D(BinaryPredicate1D):
BinaryPredicate1D.__init__(self)
self._GetGradient = pyViewMapGradientNormF1D(l, IntegrationType.MEAN)
def __call__(self, i1,i2):
- print("compare gradient")
+ #print("compare gradient")
return (self._GetGradient(i1) > self._GetGradient(i2))
class pyShuffleBP1D(BinaryPredicate1D):
diff --git a/release/scripts/freestyle/style_modules/PredicatesU1D.py b/release/scripts/freestyle/style_modules/PredicatesU1D.py
index 30472dc34b0..54f920d0563 100644
--- a/release/scripts/freestyle/style_modules/PredicatesU1D.py
+++ b/release/scripts/freestyle/style_modules/PredicatesU1D.py
@@ -92,7 +92,7 @@ class pyLowSteerableViewMapDensityUP1D(UnaryPredicate1D):
def __call__(self, inter):
func = GetSteerableViewMapDensityF1D(self._level, self._integration)
v = func(inter)
- print(v)
+ #print(v)
if v < self._threshold:
return 1
return 0
@@ -202,23 +202,23 @@ class pyIsOccludedByUP1D(UnaryPredicate1D):
vlast = itlast.object
tvertex = v.viewvertex
if type(tvertex) is TVertex:
- print("TVertex: [ ", tvertex.id.first, ",", tvertex.id.second," ]")
+ #print("TVertex: [ ", tvertex.id.first, ",", tvertex.id.second," ]")
eit = tvertex.edges_begin()
while not eit.is_end:
ve, incoming = eit.object
if ve.id == self._id:
return 1
- print("-------", ve.id.first, "-", ve.id.second)
+ #print("-------", ve.id.first, "-", ve.id.second)
eit.increment()
tvertex = vlast.viewvertex
if type(tvertex) is TVertex:
- print("TVertex: [ ", tvertex.id.first, ",", tvertex.id.second," ]")
+ #print("TVertex: [ ", tvertex.id.first, ",", tvertex.id.second," ]")
eit = tvertex.edges_begin()
while not eit.is_end:
ve, incoming = eit.object
if ve.id == self._id:
return 1
- print("-------", ve.id.first, "-", ve.id.second)
+ #print("-------", ve.id.first, "-", ve.id.second)
eit.increment()
return 0
@@ -335,8 +335,8 @@ class pyClosedCurveUP1D(UnaryPredicate1D):
itlast.decrement()
vlast = itlast.object
v = it.object
- print(v.id.first, v.id.second)
- print(vlast.id.first, vlast.id.second)
+ #print(v.id.first, v.id.second)
+ #print(vlast.id.first, vlast.id.second)
if v.id == vlast.id:
return 1
return 0
diff --git a/release/scripts/freestyle/style_modules/parameter_editor.py b/release/scripts/freestyle/style_modules/parameter_editor.py
index 5b773cd7a6d..83bd8dbda5e 100644
--- a/release/scripts/freestyle/style_modules/parameter_editor.py
+++ b/release/scripts/freestyle/style_modules/parameter_editor.py
@@ -32,30 +32,35 @@ from freestyle import BackboneStretcherShader, BezierCurveShader, BinaryPredicat
FalseBP1D, FalseUP1D, GuidingLinesShader, Interface0DIterator, Nature, Noise, Normal2DF0D, Operators, \
PolygonalizationShader, QuantitativeInvisibilityF1D, QuantitativeInvisibilityUP1D, SamplingShader, \
SpatialNoiseShader, StrokeAttribute, StrokeShader, TipRemoverShader, TrueBP1D, TrueUP1D, UnaryPredicate0D, \
- UnaryPredicate1D, VertexOrientation2DF0D, WithinImageBoundaryUP1D, ContextFunctions
+ UnaryPredicate1D, VertexOrientation2DF0D, WithinImageBoundaryUP1D, ContextFunctions, TVertex
from Functions0D import CurveMaterialF0D
from PredicatesU1D import pyNatureUP1D
from logical_operators import AndUP1D, NotUP1D, OrUP1D
from shaders import pyBluePrintCirclesShader, pyBluePrintEllipsesShader, pyBluePrintSquaresShader
+
class ColorRampModifier(StrokeShader):
def __init__(self, blend, influence, ramp):
StrokeShader.__init__(self)
self.__blend = blend
self.__influence = influence
self.__ramp = ramp
+
def evaluate(self, t):
col = freestyle.evaluateColorRamp(self.__ramp, t)
- col = col.xyz # omit alpha
+ col = col.xyz # omit alpha
return col
+
def blend_ramp(self, a, b):
return freestyle.blendRamp(self.__blend, a, self.__influence, b)
+
class ScalarBlendModifier(StrokeShader):
def __init__(self, blend, influence):
StrokeShader.__init__(self)
self.__blend = blend
self.__influence = influence
+
def blend(self, v1, v2):
fac = self.__influence
facm = 1.0 - fac
@@ -64,7 +69,7 @@ class ScalarBlendModifier(StrokeShader):
elif self.__blend == 'ADD':
v1 += fac * v2
elif self.__blend == 'MULTIPLY':
- v1 *= facm + fac * v2;
+ v1 *= facm + fac * v2
elif self.__blend == 'SUBTRACT':
v1 -= fac * v2
elif self.__blend == 'DIVIDE':
@@ -73,17 +78,18 @@ class ScalarBlendModifier(StrokeShader):
elif self.__blend == 'DIFFERENCE':
v1 = facm * v1 + fac * abs(v1 - v2)
elif self.__blend == 'MININUM':
- tmp = fac * v1
+ tmp = fac * v2
if v1 > tmp:
v1 = tmp
elif self.__blend == 'MAXIMUM':
- tmp = fac * v1
+ tmp = fac * v2
if v1 < tmp:
v1 = tmp
else:
raise ValueError("unknown curve blend type: " + self.__blend)
return v1
+
class CurveMappingModifier(ScalarBlendModifier):
def __init__(self, blend, influence, mapping, invert, curve):
ScalarBlendModifier.__init__(self, blend, influence)
@@ -91,19 +97,24 @@ class CurveMappingModifier(ScalarBlendModifier):
self.__mapping = getattr(self, mapping)
self.__invert = invert
self.__curve = curve
+
def LINEAR(self, t):
if self.__invert:
return 1.0 - t
return t
+
def CURVE(self, t):
return freestyle.evaluateCurveMappingF(self.__curve, 0, t)
+
def evaluate(self, t):
return self.__mapping(t)
+
class ThicknessModifierMixIn:
def __init__(self):
scene = freestyle.getCurrentScene()
self.__persp_camera = (scene.camera.data.type == 'PERSP')
+
def set_thickness(self, sv, outer, inner):
fe = sv.first_svertex.get_fedge(sv.second_svertex)
nature = fe.nature
@@ -114,47 +125,52 @@ class ThicknessModifierMixIn:
dir = point.dot(fe.normal_left)
else:
dir = fe.normal_left.z
- if dir < 0.0: # the back side is visible
+ if dir < 0.0: # the back side is visible
outer, inner = inner, outer
elif (nature & Nature.SILHOUETTE):
- if fe.is_smooth: # TODO more tests needed
+ if fe.is_smooth: # TODO more tests needed
outer, inner = inner, outer
else:
outer = inner = (outer + inner) / 2
sv.attribute.thickness = (outer, inner)
+
class ThicknessBlenderMixIn(ThicknessModifierMixIn):
def __init__(self, position, ratio):
ThicknessModifierMixIn.__init__(self)
self.__position = position
self.__ratio = ratio
+
def blend_thickness(self, outer, inner, v):
+ v = self.blend(outer + inner, v)
if self.__position == 'CENTER':
- outer = self.blend(outer, v / 2)
- inner = self.blend(inner, v / 2)
+ outer = v * 0.5
+ inner = v - outer
elif self.__position == 'INSIDE':
- outer = self.blend(outer, 0)
- inner = self.blend(inner, v)
+ outer = 0
+ inner = v
elif self.__position == 'OUTSIDE':
- outer = self.blend(outer, v)
- inner = self.blend(inner, 0)
+ outer = v
+ inner = 0
elif self.__position == 'RELATIVE':
- outer = self.blend(outer, v * self.__ratio)
- inner = self.blend(inner, v * (1 - self.__ratio))
+ outer = v * self.__ratio
+ inner = v - outer
else:
raise ValueError("unknown thickness position: " + self.__position)
return outer, inner
+
class BaseColorShader(ConstantColorShader):
pass
+
class BaseThicknessShader(StrokeShader, ThicknessModifierMixIn):
def __init__(self, thickness, position, ratio):
StrokeShader.__init__(self)
ThicknessModifierMixIn.__init__(self)
if position == 'CENTER':
- self.__outer = thickness / 2
- self.__inner = thickness / 2
+ self.__outer = thickness * 0.5
+ self.__inner = thickness - self.__outer
elif position == 'INSIDE':
self.__outer = 0
self.__inner = thickness
@@ -163,9 +179,10 @@ class BaseThicknessShader(StrokeShader, ThicknessModifierMixIn):
self.__inner = 0
elif position == 'RELATIVE':
self.__outer = thickness * ratio
- self.__inner = thickness * (1 - ratio)
+ self.__inner = thickness - self.__outer
else:
raise ValueError("unknown thickness position: " + self.position)
+
def shade(self, stroke):
it = stroke.stroke_vertices_begin()
while not it.is_end:
@@ -173,6 +190,7 @@ class BaseThicknessShader(StrokeShader, ThicknessModifierMixIn):
self.set_thickness(sv, self.__outer, self.__inner)
it.increment()
+
# Along Stroke modifiers
def iter_t2d_along_stroke(stroke):
@@ -183,11 +201,12 @@ def iter_t2d_along_stroke(stroke):
while not it.is_end:
p = it.object.point
distance += (prev - p).length
- prev = p.copy() # need a copy because the point can be altered
+ prev = p.copy() # need a copy because the point can be altered
t = min(distance / total, 1.0) if total > 0.0 else 0.0
yield it, t
it.increment()
+
class ColorAlongStrokeShader(ColorRampModifier):
def shade(self, stroke):
for it, t in iter_t2d_along_stroke(stroke):
@@ -196,6 +215,7 @@ class ColorAlongStrokeShader(ColorRampModifier):
b = self.evaluate(t)
sv.attribute.color = self.blend_ramp(a, b)
+
class AlphaAlongStrokeShader(CurveMappingModifier):
def shade(self, stroke):
for it, t in iter_t2d_along_stroke(stroke):
@@ -204,6 +224,7 @@ class AlphaAlongStrokeShader(CurveMappingModifier):
b = self.evaluate(t)
sv.attribute.alpha = self.blend(a, b)
+
class ThicknessAlongStrokeShader(ThicknessBlenderMixIn, CurveMappingModifier):
def __init__(self, thickness_position, thickness_ratio,
blend, influence, mapping, invert, curve, value_min, value_max):
@@ -211,6 +232,7 @@ class ThicknessAlongStrokeShader(ThicknessBlenderMixIn, CurveMappingModifier):
CurveMappingModifier.__init__(self, blend, influence, mapping, invert, curve)
self.__value_min = value_min
self.__value_max = value_max
+
def shade(self, stroke):
for it, t in iter_t2d_along_stroke(stroke):
sv = it.object
@@ -219,13 +241,14 @@ class ThicknessAlongStrokeShader(ThicknessBlenderMixIn, CurveMappingModifier):
c = self.blend_thickness(a[0], a[1], b)
self.set_thickness(sv, c[0], c[1])
+
# Distance from Camera modifiers
def iter_distance_from_camera(stroke, range_min, range_max):
- normfac = range_max - range_min # normalization factor
+ normfac = range_max - range_min # normalization factor
it = stroke.stroke_vertices_begin()
while not it.is_end:
- p = it.object.point_3d # in the camera coordinate
+ p = it.object.point_3d # in the camera coordinate
distance = p.length
if distance < range_min:
t = 0.0
@@ -236,11 +259,13 @@ def iter_distance_from_camera(stroke, range_min, range_max):
yield it, t
it.increment()
+
class ColorDistanceFromCameraShader(ColorRampModifier):
def __init__(self, blend, influence, ramp, range_min, range_max):
ColorRampModifier.__init__(self, blend, influence, ramp)
self.__range_min = range_min
self.__range_max = range_max
+
def shade(self, stroke):
for it, t in iter_distance_from_camera(stroke, self.__range_min, self.__range_max):
sv = it.object
@@ -248,11 +273,13 @@ class ColorDistanceFromCameraShader(ColorRampModifier):
b = self.evaluate(t)
sv.attribute.color = self.blend_ramp(a, b)
+
class AlphaDistanceFromCameraShader(CurveMappingModifier):
def __init__(self, blend, influence, mapping, invert, curve, range_min, range_max):
CurveMappingModifier.__init__(self, blend, influence, mapping, invert, curve)
self.__range_min = range_min
self.__range_max = range_max
+
def shade(self, stroke):
for it, t in iter_distance_from_camera(stroke, self.__range_min, self.__range_max):
sv = it.object
@@ -260,6 +287,7 @@ class AlphaDistanceFromCameraShader(CurveMappingModifier):
b = self.evaluate(t)
sv.attribute.alpha = self.blend(a, b)
+
class ThicknessDistanceFromCameraShader(ThicknessBlenderMixIn, CurveMappingModifier):
def __init__(self, thickness_position, thickness_ratio,
blend, influence, mapping, invert, curve, range_min, range_max, value_min, value_max):
@@ -269,6 +297,7 @@ class ThicknessDistanceFromCameraShader(ThicknessBlenderMixIn, CurveMappingModif
self.__range_max = range_max
self.__value_min = value_min
self.__value_max = value_max
+
def shade(self, stroke):
for it, t in iter_distance_from_camera(stroke, self.__range_min, self.__range_max):
sv = it.object
@@ -277,17 +306,18 @@ class ThicknessDistanceFromCameraShader(ThicknessBlenderMixIn, CurveMappingModif
c = self.blend_thickness(a[0], a[1], b)
self.set_thickness(sv, c[0], c[1])
+
# Distance from Object modifiers
def iter_distance_from_object(stroke, object, range_min, range_max):
scene = freestyle.getCurrentScene()
- mv = scene.camera.matrix_world.copy() # model-view matrix
+ mv = scene.camera.matrix_world.copy() # model-view matrix
mv.invert()
- loc = mv * object.location # loc in the camera coordinate
- normfac = range_max - range_min # normalization factor
+ loc = mv * object.location # loc in the camera coordinate
+ normfac = range_max - range_min # normalization factor
it = stroke.stroke_vertices_begin()
while not it.is_end:
- p = it.object.point_3d # in the camera coordinate
+ p = it.object.point_3d # in the camera coordinate
distance = (p - loc).length
if distance < range_min:
t = 0.0
@@ -298,12 +328,14 @@ def iter_distance_from_object(stroke, object, range_min, range_max):
yield it, t
it.increment()
+
class ColorDistanceFromObjectShader(ColorRampModifier):
def __init__(self, blend, influence, ramp, target, range_min, range_max):
ColorRampModifier.__init__(self, blend, influence, ramp)
self.__target = target
self.__range_min = range_min
self.__range_max = range_max
+
def shade(self, stroke):
if self.__target is None:
return
@@ -313,12 +345,14 @@ class ColorDistanceFromObjectShader(ColorRampModifier):
b = self.evaluate(t)
sv.attribute.color = self.blend_ramp(a, b)
+
class AlphaDistanceFromObjectShader(CurveMappingModifier):
def __init__(self, blend, influence, mapping, invert, curve, target, range_min, range_max):
CurveMappingModifier.__init__(self, blend, influence, mapping, invert, curve)
self.__target = target
self.__range_min = range_min
self.__range_max = range_max
+
def shade(self, stroke):
if self.__target is None:
return
@@ -328,6 +362,7 @@ class AlphaDistanceFromObjectShader(CurveMappingModifier):
b = self.evaluate(t)
sv.attribute.alpha = self.blend(a, b)
+
class ThicknessDistanceFromObjectShader(ThicknessBlenderMixIn, CurveMappingModifier):
def __init__(self, thickness_position, thickness_ratio,
blend, influence, mapping, invert, curve, target, range_min, range_max, value_min, value_max):
@@ -338,6 +373,7 @@ class ThicknessDistanceFromObjectShader(ThicknessBlenderMixIn, CurveMappingModif
self.__range_max = range_max
self.__value_min = value_min
self.__value_max = value_max
+
def shade(self, stroke):
if self.__target is None:
return
@@ -348,6 +384,7 @@ class ThicknessDistanceFromObjectShader(ThicknessBlenderMixIn, CurveMappingModif
c = self.blend_thickness(a[0], a[1], b)
self.set_thickness(sv, c[0], c[1])
+
# Material modifiers
def iter_material_color(stroke, material_attribute):
@@ -364,6 +401,7 @@ def iter_material_color(stroke, material_attribute):
yield it, color
it.increment()
+
def iter_material_value(stroke, material_attribute):
func = CurveMaterialF0D()
it = stroke.stroke_vertices_begin()
@@ -396,11 +434,13 @@ def iter_material_value(stroke, material_attribute):
yield it, t
it.increment()
+
class ColorMaterialShader(ColorRampModifier):
def __init__(self, blend, influence, ramp, material_attribute, use_ramp):
ColorRampModifier.__init__(self, blend, influence, ramp)
self.__material_attribute = material_attribute
self.__use_ramp = use_ramp
+
def shade(self, stroke):
if self.__material_attribute in {'DIFF', 'SPEC'} and not self.__use_ramp:
for it, b in iter_material_color(stroke, self.__material_attribute):
@@ -414,10 +454,12 @@ class ColorMaterialShader(ColorRampModifier):
b = self.evaluate(t)
sv.attribute.color = self.blend_ramp(a, b)
+
class AlphaMaterialShader(CurveMappingModifier):
def __init__(self, blend, influence, mapping, invert, curve, material_attribute):
CurveMappingModifier.__init__(self, blend, influence, mapping, invert, curve)
self.__material_attribute = material_attribute
+
def shade(self, stroke):
for it, t in iter_material_value(stroke, self.__material_attribute):
sv = it.object
@@ -425,6 +467,7 @@ class AlphaMaterialShader(CurveMappingModifier):
b = self.evaluate(t)
sv.attribute.alpha = self.blend(a, b)
+
class ThicknessMaterialShader(ThicknessBlenderMixIn, CurveMappingModifier):
def __init__(self, thickness_position, thickness_ratio,
blend, influence, mapping, invert, curve, material_attribute, value_min, value_max):
@@ -433,6 +476,7 @@ class ThicknessMaterialShader(ThicknessBlenderMixIn, CurveMappingModifier):
self.__material_attribute = material_attribute
self.__value_min = value_min
self.__value_max = value_max
+
def shade(self, stroke):
for it, t in iter_material_value(stroke, self.__material_attribute):
sv = it.object
@@ -441,6 +485,7 @@ class ThicknessMaterialShader(ThicknessBlenderMixIn, CurveMappingModifier):
c = self.blend_thickness(a[0], a[1], b)
self.set_thickness(sv, c[0], c[1])
+
# Calligraphic thickness modifier
class CalligraphicThicknessShader(ThicknessBlenderMixIn, ScalarBlendModifier):
@@ -451,6 +496,7 @@ class CalligraphicThicknessShader(ThicknessBlenderMixIn, ScalarBlendModifier):
self.__orientation = mathutils.Vector((math.cos(orientation), math.sin(orientation)))
self.__thickness_min = thickness_min
self.__thickness_max = thickness_max
+
def shade(self, stroke):
func = VertexOrientation2DF0D()
it = stroke.stroke_vertices_begin()
@@ -467,6 +513,7 @@ class CalligraphicThicknessShader(ThicknessBlenderMixIn, ScalarBlendModifier):
self.set_thickness(sv, c[0], c[1])
it.increment()
+
# Geometry modifiers
def iter_distance_along_stroke(stroke):
@@ -476,10 +523,11 @@ def iter_distance_along_stroke(stroke):
while not it.is_end:
p = it.object.point
distance += (prev - p).length
- prev = p.copy() # need a copy because the point can be altered
+ prev = p.copy() # need a copy because the point can be altered
yield it, distance
it.increment()
+
class SinusDisplacementShader(StrokeShader):
def __init__(self, wavelength, amplitude, phase):
StrokeShader.__init__(self)
@@ -487,6 +535,7 @@ class SinusDisplacementShader(StrokeShader):
self._amplitude = amplitude
self._phase = phase / wavelength * 2 * math.pi
self._getNormal = Normal2DF0D()
+
def shade(self, stroke):
for it, distance in iter_distance_along_stroke(stroke):
v = it.object
@@ -495,14 +544,16 @@ class SinusDisplacementShader(StrokeShader):
v.point = v.point + n
stroke.update_length()
+
class PerlinNoise1DShader(StrokeShader):
- def __init__(self, freq = 10, amp = 10, oct = 4, angle = math.radians(45), seed = -1):
+ def __init__(self, freq=10, amp=10, oct=4, angle=math.radians(45), seed=-1):
StrokeShader.__init__(self)
self.__noise = Noise(seed)
self.__freq = freq
self.__amp = amp
self.__oct = oct
- self.__dir = mathutils.Vector([math.cos(angle), math.sin(angle)])
+ self.__dir = mathutils.Vector((math.cos(angle), math.sin(angle)))
+
def shade(self, stroke):
length = stroke.length_2d
it = stroke.stroke_vertices_begin()
@@ -513,31 +564,35 @@ class PerlinNoise1DShader(StrokeShader):
it.increment()
stroke.update_length()
+
class PerlinNoise2DShader(StrokeShader):
- def __init__(self, freq = 10, amp = 10, oct = 4, angle = math.radians(45), seed = -1):
+ def __init__(self, freq=10, amp=10, oct=4, angle=math.radians(45), seed=-1):
StrokeShader.__init__(self)
self.__noise = Noise(seed)
self.__freq = freq
self.__amp = amp
self.__oct = oct
- self.__dir = mathutils.Vector([math.cos(angle), math.sin(angle)])
+ self.__dir = mathutils.Vector((math.cos(angle), math.sin(angle)))
+
def shade(self, stroke):
it = stroke.stroke_vertices_begin()
while not it.is_end:
v = it.object
- vec = mathutils.Vector([v.projected_x, v.projected_y])
+ vec = mathutils.Vector((v.projected_x, v.projected_y))
nres = self.__noise.turbulence2(vec, self.__freq, self.__amp, self.__oct)
v.point = v.point + nres * self.__dir
it.increment()
stroke.update_length()
+
class Offset2DShader(StrokeShader):
def __init__(self, start, end, x, y):
StrokeShader.__init__(self)
self.__start = start
self.__end = end
- self.__xy = mathutils.Vector([x, y])
+ self.__xy = mathutils.Vector((x, y))
self.__getNormal = Normal2DF0D()
+
def shade(self, stroke):
it = stroke.stroke_vertices_begin()
while not it.is_end:
@@ -550,6 +605,7 @@ class Offset2DShader(StrokeShader):
it.increment()
stroke.update_length()
+
class Transform2DShader(StrokeShader):
def __init__(self, pivot, scale_x, scale_y, angle, pivot_u, pivot_x, pivot_y):
StrokeShader.__init__(self)
@@ -560,6 +616,7 @@ class Transform2DShader(StrokeShader):
self.__pivot_u = pivot_u
self.__pivot_x = pivot_x
self.__pivot_y = pivot_y
+
def shade(self, stroke):
# determine the pivot of scaling and rotation operations
if self.__pivot == 'START':
@@ -586,18 +643,18 @@ class Transform2DShader(StrokeShader):
delta = u - self.__pivot_u
pivot = p + delta * (prev - p)
elif self.__pivot == 'CENTER':
- pivot = mathutils.Vector([0.0, 0.0])
+ pivot = mathutils.Vector((0.0, 0.0))
n = 0
it = stroke.stroke_vertices_begin()
while not it.is_end:
p = it.object.point
pivot = pivot + p
- n = n + 1
+ n += 1
it.increment()
pivot.x = pivot.x / n
pivot.y = pivot.y / n
elif self.__pivot == 'ABSOLUTE':
- pivot = mathutils.Vector([self.__pivot_x, self.__pivot_y])
+ pivot = mathutils.Vector((self.__pivot_x, self.__pivot_y))
# apply scaling and rotation operations
cos_theta = math.cos(self.__angle)
sin_theta = math.sin(self.__angle)
@@ -614,6 +671,7 @@ class Transform2DShader(StrokeShader):
it.increment()
stroke.update_length()
+
# Predicates and helper functions
class QuantitativeInvisibilityRangeUP1D(UnaryPredicate1D):
@@ -622,10 +680,12 @@ class QuantitativeInvisibilityRangeUP1D(UnaryPredicate1D):
self.__getQI = QuantitativeInvisibilityF1D()
self.__qi_start = qi_start
self.__qi_end = qi_end
+
def __call__(self, inter):
qi = self.__getQI(inter)
return self.__qi_start <= qi <= self.__qi_end
+
def join_unary_predicates(upred_list, bpred):
if not upred_list:
return None
@@ -634,17 +694,20 @@ def join_unary_predicates(upred_list, bpred):
upred = bpred(upred, p)
return upred
+
class ObjectNamesUP1D(UnaryPredicate1D):
def __init__(self, names, negative):
UnaryPredicate1D.__init__(self)
self._names = names
self._negative = negative
+
def __call__(self, viewEdge):
found = viewEdge.viewshape.name in self._names
if self._negative:
return not found
return found
+
# Stroke caps
def iter_stroke_vertices(stroke):
@@ -658,10 +721,12 @@ def iter_stroke_vertices(stroke):
prev_p = p.copy()
it.increment()
+
class RoundCapShader(StrokeShader):
def round_cap_thickness(self, x):
x = max(0.0, min(x, 1.0))
- return math.sqrt(1.0 - (x ** 2))
+ return math.sqrt(1.0 - (x ** 2.0))
+
def shade(self, stroke):
# save the location and attribute of stroke vertices
buffer = []
@@ -706,13 +771,14 @@ class RoundCapShader(StrokeShader):
R, L = attr.thickness
for i in range(nverts_end):
t = (nverts_end - i) * n
- stroke[-i-1].point = p + d * t
+ stroke[-i - 1].point = p + d * t
r = self.round_cap_thickness((nverts_end - i + 1) * n)
- stroke[-i-1].attribute = attr
- stroke[-i-1].attribute.thickness = (R * r, L * r)
+ stroke[-i - 1].attribute = attr
+ stroke[-i - 1].attribute.thickness = (R * r, L * r)
# update the curvilinear 2D length of each vertex
stroke.update_length()
+
class SquareCapShader(StrokeShader):
def shade(self, stroke):
# save the location and attribute of stroke vertices
@@ -751,35 +817,42 @@ class SquareCapShader(StrokeShader):
# update the curvilinear 2D length of each vertex
stroke.update_length()
+
# Split by dashed line pattern
class SplitPatternStartingUP0D(UnaryPredicate0D):
def __init__(self, controller):
UnaryPredicate0D.__init__(self)
self._controller = controller
+
def __call__(self, inter):
return self._controller.start()
+
class SplitPatternStoppingUP0D(UnaryPredicate0D):
def __init__(self, controller):
UnaryPredicate0D.__init__(self)
self._controller = controller
+
def __call__(self, inter):
return self._controller.stop()
+
class SplitPatternController:
def __init__(self, pattern, sampling):
self.sampling = float(sampling)
k = len(pattern) // 2
n = k * 2
- self.start_pos = [pattern[i] + pattern[i+1] for i in range(0, n, 2)]
+ self.start_pos = [pattern[i] + pattern[i + 1] for i in range(0, n, 2)]
self.stop_pos = [pattern[i] for i in range(0, n, 2)]
self.init()
+
def init(self):
self.start_len = 0.0
self.start_idx = 0
self.stop_len = self.sampling
self.stop_idx = 0
+
def start(self):
self.start_len += self.sampling
if abs(self.start_len - self.start_pos[self.start_idx]) < self.sampling / 2.0:
@@ -787,6 +860,7 @@ class SplitPatternController:
self.start_idx = (self.start_idx + 1) % len(self.start_pos)
return True
return False
+
def stop(self):
if self.start_len > 0.0:
self.init()
@@ -797,20 +871,22 @@ class SplitPatternController:
return True
return False
+
# Dashed line
class DashedLineShader(StrokeShader):
def __init__(self, pattern):
StrokeShader.__init__(self)
self._pattern = pattern
+
def shade(self, stroke):
- index = 0 # pattern index
- start = 0.0 # 2D curvilinear length
+ index = 0 # pattern index
+ start = 0.0 # 2D curvilinear length
visible = True
sampling = 1.0
it = stroke.stroke_vertices_begin(sampling)
while not it.is_end:
- pos = it.t # curvilinear abscissa
+ pos = it.t # curvilinear abscissa
# The extra 'sampling' term is added below, because the
# visibility attribute of the i-th vertex refers to the
# visibility of the stroke segment between the i-th and
@@ -824,12 +900,14 @@ class DashedLineShader(StrokeShader):
it.object.attribute.visible = visible
it.increment()
+
# predicates for chaining
class AngleLargerThanBP1D(BinaryPredicate1D):
def __init__(self, angle):
BinaryPredicate1D.__init__(self)
self._angle = angle
+
def __call__(self, i1, i2):
sv1a = i1.first_fedge.first_svertex.point_2d
sv1b = i1.last_fedge.second_svertex.point_2d
@@ -855,14 +933,17 @@ class AngleLargerThanBP1D(BinaryPredicate1D):
x = (dir1 * dir2) / denom
return math.acos(min(max(x, -1.0), 1.0)) > self._angle
+
class AndBP1D(BinaryPredicate1D):
def __init__(self, pred1, pred2):
BinaryPredicate1D.__init__(self)
self.__pred1 = pred1
self.__pred2 = pred2
+
def __call__(self, i1, i2):
return self.__pred1(i1, i2) and self.__pred2(i1, i2)
+
# predicates for selection
class LengthThresholdUP1D(UnaryPredicate1D):
@@ -870,6 +951,7 @@ class LengthThresholdUP1D(UnaryPredicate1D):
UnaryPredicate1D.__init__(self)
self._length_min = length_min
self._length_max = length_max
+
def __call__(self, inter):
length = inter.length_2d
if self._length_min is not None and length < self._length_min:
@@ -878,8 +960,9 @@ class LengthThresholdUP1D(UnaryPredicate1D):
return False
return True
+
class FaceMarkBothUP1D(UnaryPredicate1D):
- def __call__(self, inter): # ViewEdge
+ def __call__(self, inter): # ViewEdge
fe = inter.first_fedge
while fe is not None:
if fe.is_smooth:
@@ -894,8 +977,9 @@ class FaceMarkBothUP1D(UnaryPredicate1D):
fe = fe.next_fedge
return False
+
class FaceMarkOneUP1D(UnaryPredicate1D):
- def __call__(self, inter): # ViewEdge
+ def __call__(self, inter): # ViewEdge
fe = inter.first_fedge
while fe is not None:
if fe.is_smooth:
@@ -910,13 +994,14 @@ class FaceMarkOneUP1D(UnaryPredicate1D):
fe = fe.next_fedge
return False
+
# predicates for splitting
class MaterialBoundaryUP0D(UnaryPredicate0D):
def __call__(self, it):
if it.is_begin:
return False
- it_prev = Interface0DIterator(it)
+ it_prev = Interface0DIterator(it)
it_prev.decrement()
v = it.object
it.increment()
@@ -928,12 +1013,14 @@ class MaterialBoundaryUP0D(UnaryPredicate0D):
idx2 = fe.material_index if fe.is_smooth else fe.material_index_left
return idx1 != idx2
+
class Curvature2DAngleThresholdUP0D(UnaryPredicate0D):
def __init__(self, angle_min=None, angle_max=None):
UnaryPredicate0D.__init__(self)
self._angle_min = angle_min
self._angle_max = angle_max
self._func = Curvature2DAngleF0D()
+
def __call__(self, inter):
angle = math.pi - self._func(inter)
if self._angle_min is not None and angle < self._angle_min:
@@ -942,13 +1029,15 @@ class Curvature2DAngleThresholdUP0D(UnaryPredicate0D):
return True
return False
+
class Length2DThresholdUP0D(UnaryPredicate0D):
def __init__(self, length_limit):
UnaryPredicate0D.__init__(self)
self._length_limit = length_limit
self._t = 0.0
+
def __call__(self, inter):
- t = inter.t # curvilinear abscissa
+ t = inter.t # curvilinear abscissa
if t < self._t:
self._t = 0.0
return False
@@ -957,12 +1046,14 @@ class Length2DThresholdUP0D(UnaryPredicate0D):
self._t = t
return True
+
# Seed for random number generation
class Seed:
def __init__(self):
self.t_max = 2 ** 15
self.t = int(time.time()) % self.t_max
+
def get(self, seed):
if seed < 0:
self.t = (self.t + 1) % self.t_max
@@ -971,6 +1062,53 @@ class Seed:
_seed = Seed()
+
+### T.K. 07-Aug-2013 Temporary fix for unexpected line gaps
+
+def iter_three_segments(stroke):
+ n = stroke.stroke_vertices_size()
+ if n >= 4:
+ it1 = stroke.stroke_vertices_begin()
+ it2 = stroke.stroke_vertices_begin()
+ it2.increment()
+ it3 = stroke.stroke_vertices_begin()
+ it3.increment()
+ it3.increment()
+ it4 = stroke.stroke_vertices_begin()
+ it4.increment()
+ it4.increment()
+ it4.increment()
+ while not it4.is_end:
+ yield (it1.object, it2.object, it3.object, it4.object)
+ it1.increment()
+ it2.increment()
+ it3.increment()
+ it4.increment()
+
+def is_tvertex(svertex):
+ return type(svertex.viewvertex) is TVertex
+
+class StrokeCleaner(StrokeShader):
+ def shade(self, stroke):
+ for sv1, sv2, sv3, sv4 in iter_three_segments(stroke):
+ seg1 = sv2.point - sv1.point
+ seg2 = sv3.point - sv2.point
+ seg3 = sv4.point - sv3.point
+ if not ((is_tvertex(sv2.first_svertex) and is_tvertex(sv2.second_svertex)) or
+ (is_tvertex(sv3.first_svertex) and is_tvertex(sv3.second_svertex))):
+ continue
+ if seg1.dot(seg2) < 0.0 and seg2.dot(seg3) < 0.0 and seg2.length < 0.01:
+ #print(sv2.first_svertex.viewvertex)
+ #print(sv2.second_svertex.viewvertex)
+ #print(sv3.first_svertex.viewvertex)
+ #print(sv3.second_svertex.viewvertex)
+ p2 = mathutils.Vector(sv2.point)
+ p3 = mathutils.Vector(sv3.point)
+ sv2.point = p3
+ sv3.point = p2
+ stroke.update_length()
+
+
# main function for parameter processing
def process(layer_name, lineset_name):
@@ -1101,6 +1239,9 @@ def process(layer_name, lineset_name):
Operators.select(LengthThresholdUP1D(length_min, length_max))
# prepare a list of stroke shaders
shaders_list = []
+ ###
+ shaders_list.append(StrokeCleaner())
+ ###
for m in linestyle.geometry_modifiers:
if not m.use:
continue
diff --git a/release/scripts/freestyle/style_modules/shaders.py b/release/scripts/freestyle/style_modules/shaders.py
index c9b022d46dc..01bfac4d074 100644
--- a/release/scripts/freestyle/style_modules/shaders.py
+++ b/release/scripts/freestyle/style_modules/shaders.py
@@ -459,7 +459,7 @@ class pyRandomColorShader(StrokeShader):
c0 = float(random.uniform(15,75))/100.0
c1 = float(random.uniform(15,75))/100.0
c2 = float(random.uniform(15,75))/100.0
- print(c0, c1, c2)
+ #print(c0, c1, c2)
it = stroke.stroke_vertices_begin()
while not it.is_end:
it.object.attribute.color = (c0,c1,c2)
diff --git a/release/scripts/modules/addon_utils.py b/release/scripts/modules/addon_utils.py
index 3aa4eef6392..2d0c917ffa0 100644
--- a/release/scripts/modules/addon_utils.py
+++ b/release/scripts/modules/addon_utils.py
@@ -35,7 +35,6 @@ error_duplicates = False
error_encoding = False
addons_fake_modules = {}
-
def paths():
# RELEASE SCRIPTS: official scripts distributed in Blender releases
addon_paths = _bpy.utils.script_paths("addons")
@@ -51,7 +50,7 @@ def paths():
return addon_paths
-def modules(module_cache):
+def modules_refresh(module_cache=addons_fake_modules):
global error_duplicates
global error_encoding
import os
@@ -129,7 +128,7 @@ def modules(module_cache):
mod.__file__ = mod_path
mod.__time__ = os.path.getmtime(mod_path)
except:
- print("AST error in module %s" % mod_name)
+ print("AST error parsing bl_info for %s" % mod_name)
import traceback
traceback.print_exc()
raise
@@ -184,6 +183,11 @@ def modules(module_cache):
del module_cache[mod_stale]
del modules_stale
+
+def modules(module_cache=addons_fake_modules, refresh=True):
+ if refresh:
+ modules_refresh(module_cache)
+
mod_list = list(module_cache.values())
mod_list.sort(key=lambda mod: (mod.bl_info["category"],
mod.bl_info["name"],
@@ -370,6 +374,9 @@ def reset_all(reload_scripts=False):
"""
import sys
+ # initializes addons_fake_modules
+ modules_refresh()
+
# RELEASE SCRIPTS: official scripts distributed in Blender releases
paths_list = paths()
diff --git a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
index 3d00815b70e..e9ed9a8de5b 100644
--- a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
+++ b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
@@ -410,9 +410,15 @@ def dump_py_messages_from_files(msgs, reports, files, settings):
def make_rel(path):
for rp in root_paths:
if path.startswith(rp):
- return os.path.relpath(path, rp)
+ try: # can't always find the relative path (between drive letters on windows)
+ return os.path.relpath(path, rp)
+ except ValueError:
+ return path
# Use binary's dir as fallback...
- return os.path.relpath(path, os.path.dirname(bpy.app.binary_path))
+ try: # can't always find the relative path (between drive letters on windows)
+ return os.path.relpath(path, os.path.dirname(bpy.app.binary_path))
+ except ValueError:
+ return path
# Helper function
def extract_strings_ex(node, is_split=False):
@@ -768,7 +774,10 @@ def dump_src_messages(msgs, reports, settings):
if os.path.splitext(fname)[1] not in settings.PYGETTEXT_ALLOWED_EXTS:
continue
path = os.path.join(root, fname)
- rel_path = os.path.relpath(path, settings.SOURCE_DIR)
+ try: # can't always find the relative path (between drive letters on windows)
+ rel_path = os.path.relpath(path, settings.SOURCE_DIR)
+ except ValueError:
+ rel_path = path
if rel_path in forbidden:
continue
elif rel_path not in forced:
diff --git a/release/scripts/modules/bl_i18n_utils/settings.py b/release/scripts/modules/bl_i18n_utils/settings.py
index 001f044f1c4..dba5099607c 100644
--- a/release/scripts/modules/bl_i18n_utils/settings.py
+++ b/release/scripts/modules/bl_i18n_utils/settings.py
@@ -257,6 +257,16 @@ PYGETTEXT_KEYWORDS = (() +
for it in ("BLF_I18N_MSGID_MULTI_CTXT",))
)
+# Check printf mismatches between msgid and msgstr.
+CHECK_PRINTF_FORMAT = (
+ r"(?!<%)(?:%%)*%" # Begining, with handling for crazy things like '%%%%%s'
+ r"[-+#0]?" # Flags (note: do not add the ' ' (space) flag here, generates too much false positives!)
+ r"(?:\*|[0-9]+)?" # Width
+ r"(?:\.(?:\*|[0-9]+))?" # Precision
+ r"(?:[hljztL]|hh|ll)?" # Length
+ r"[tldiuoxXfFeEgGaAcspn]" # Specifiers (note we have Blender-specific %t and %l ones too)
+)
+
# Should po parser warn when finding a first letter not capitalized?
WARN_MSGID_NOT_CAPITALIZED = True
@@ -467,9 +477,12 @@ def _do_set(ref, path):
path = os.path.normpath(path)
# If given path is absolute, make it relative to current ref one (else we consider it is already the case!)
if os.path.isabs(path):
- return os.path.relpath(path, ref)
- else:
- return path
+ # can't always find the relative path (between drive letters on windows)
+ try:
+ return os.path.relpath(path, ref)
+ except ValueError:
+ pass
+ return path
def _gen_get_set_path(ref, name):
def _get(self):
diff --git a/release/scripts/modules/bl_i18n_utils/utils.py b/release/scripts/modules/bl_i18n_utils/utils.py
index 636e9a4a148..feefd14fd28 100644
--- a/release/scripts/modules/bl_i18n_utils/utils.py
+++ b/release/scripts/modules/bl_i18n_utils/utils.py
@@ -172,7 +172,7 @@ def enable_addons(addons={}, support={}, disable=False, check_only=False):
userpref = bpy.context.user_preferences
used_ext = {ext.module for ext in userpref.addons}
- ret = [mod for mod in addon_utils.modules(addon_utils.addons_fake_modules)
+ ret = [mod for mod in addon_utils.modules()
if ((addons and mod.__name__ in addons) or
(not addons and addon_utils.module_bl_info(mod)["support"] in support))]
@@ -446,10 +446,10 @@ class I18nMessages:
"""
ret = []
default_context = self.settings.DEFAULT_CONTEXT
- _format = re.compile("%[.0-9]*[tslfd]").findall
+ _format = re.compile(self.settings.CHECK_PRINTF_FORMAT).findall
done_keys = set()
- tmp = {}
rem = set()
+ tmp = {}
for key, msg in self.msgs.items():
msgctxt, msgid, msgstr = msg.msgctxt, msg.msgid, msg.msgstr
real_key = (msgctxt or default_context, msgid)
@@ -462,9 +462,10 @@ class I18nMessages:
elif fix:
tmp[real_key] = msg
done_keys.add(key)
- if '%' in msgid and msgstr and len(_format(msgid)) != len(_format(msgstr)):
+ if '%' in msgid and msgstr and _format(msgid) != _format(msgstr):
if not msg.is_fuzzy:
- ret.append("Error! msg's format entities are not matched in msgid and msgstr ({})".format(real_key))
+ ret.append("Error! msg's format entities are not matched in msgid and msgstr ({} / \"{}\")"
+ "".format(real_key, msgstr))
if fix:
msg.msgstr = ""
for k in rem:
diff --git a/release/scripts/modules/bl_i18n_utils/utils_spell_check.py b/release/scripts/modules/bl_i18n_utils/utils_spell_check.py
index f365351766a..0d8918c960c 100644
--- a/release/scripts/modules/bl_i18n_utils/utils_spell_check.py
+++ b/release/scripts/modules/bl_i18n_utils/utils_spell_check.py
@@ -71,6 +71,7 @@ class SpellChecker():
"backscattered",
"bandnoise",
"bindcode",
+ "bitflag", "bitflags",
"bitrate",
"blackbody",
"blendfile",
@@ -432,6 +433,7 @@ class SpellChecker():
"catrom",
"chebychev",
"courant",
+ "hosek",
"kutta",
"lennard",
"minkowski",
@@ -440,10 +442,12 @@ class SpellChecker():
"nayar",
"netravali",
"oren",
+ "preetham",
"prewitt",
"runge",
"sobol",
"verlet",
+ "wilkie",
"worley",
# Acronyms
diff --git a/release/scripts/modules/bpy/path.py b/release/scripts/modules/bpy/path.py
index 33039fa8494..da1a52e560d 100644
--- a/release/scripts/modules/bpy/path.py
+++ b/release/scripts/modules/bpy/path.py
@@ -121,7 +121,7 @@ def is_subdir(path, directory):
def clean_name(name, replace="_"):
"""
Returns a name with characters replaced that
- may cause problems under various circumstances,
+ may cause problems under various circumstances,
such as writing to a file.
All characters besides A-Z/a-z, 0-9 are replaced with "_"
or the replace argument if defined.
@@ -163,6 +163,7 @@ def display_name(name):
"""
# string replacements
name = name.replace("_colon_", ":")
+ name = name.replace("_plus_", "+")
name = name.replace("_", " ")
diff --git a/release/scripts/modules/bpy/utils.py b/release/scripts/modules/bpy/utils.py
index ab35d774719..608cd920865 100644
--- a/release/scripts/modules/bpy/utils.py
+++ b/release/scripts/modules/bpy/utils.py
@@ -677,7 +677,7 @@ def make_rna_paths(struct_name, prop_name, enum_name):
if prop_name:
src = src_rna = ".".join((struct_name, prop_name))
if enum_name:
- src = src_enum = "{}:'{}'".format(src_rna, enum_name)
+ src = src_enum = "%s:'%s'" % (src_rna, enum_name)
else:
src = src_rna = struct_name
return src, src_rna, src_enum
diff --git a/release/scripts/modules/bpy_extras/io_utils.py b/release/scripts/modules/bpy_extras/io_utils.py
index eeaa6408268..790233c40af 100644
--- a/release/scripts/modules/bpy_extras/io_utils.py
+++ b/release/scripts/modules/bpy_extras/io_utils.py
@@ -409,7 +409,10 @@ def path_reference(filepath,
if mode == 'ABSOLUTE':
return filepath_abs
elif mode == 'RELATIVE':
- return os.path.relpath(filepath_abs, base_dst)
+ try: # can't always find the relative path (between drive letters on windows)
+ return os.path.relpath(filepath_abs, base_dst)
+ except ValueError:
+ return filepath_abs
elif mode == 'STRIP':
return os.path.basename(filepath_abs)
diff --git a/release/scripts/modules/bpy_extras/mesh_utils.py b/release/scripts/modules/bpy_extras/mesh_utils.py
index d905964e71c..a92d2221c38 100644
--- a/release/scripts/modules/bpy_extras/mesh_utils.py
+++ b/release/scripts/modules/bpy_extras/mesh_utils.py
@@ -327,7 +327,8 @@ def ngon_tessellate(from_data, indices, fix_loops=True):
indicie lists. Designed to be used for importers that need indices for an
fgon to create from existing verts.
- from_data: either a mesh, or a list/tuple of vectors.
+ :arg from_data: either a mesh, or a list/tuple of vectors.
+ :type from_data: list or :class:`bpy.types.Mesh`
:arg indices: a list of indices to use this list
is the ordered closed polyline
to fill, and can be a subset of the data given.
diff --git a/release/scripts/modules/bpy_extras/object_utils.py b/release/scripts/modules/bpy_extras/object_utils.py
index 7d8caf449ca..7ce5aff581a 100644
--- a/release/scripts/modules/bpy_extras/object_utils.py
+++ b/release/scripts/modules/bpy_extras/object_utils.py
@@ -170,6 +170,8 @@ def object_data_add(context, obdata, operator=None, use_active_layer=True):
bpy.ops.object.join() # join into the active.
bpy.data.meshes.remove(obdata)
+ # base is freed, set to active object
+ base = scene.object_bases.active
bpy.ops.object.mode_set(mode='EDIT')
else:
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py
index d3ac5a6093c..f7af297a0e0 100644
--- a/release/scripts/modules/bpy_types.py
+++ b/release/scripts/modules/bpy_types.py
@@ -219,8 +219,9 @@ class _GenericBone:
@property
def length(self):
- """ The distance from head to tail,
- when set the head is moved to fit the length.
+ """
+ The distance from head to tail,
+ when set the head is moved to fit the length.
"""
return self.vector.length
@@ -230,8 +231,9 @@ class _GenericBone:
@property
def vector(self):
- """ The direction this bone is pointing.
- Utility function for (tail - head)
+ """
+ The direction this bone is pointing.
+ Utility function for (tail - head)
"""
return (self.tail - self.head)
@@ -304,6 +306,15 @@ class _GenericBone:
class PoseBone(StructRNA, _GenericBone, metaclass=StructMetaPropGroup):
__slots__ = ()
+ @property
+ def children(self):
+ obj = self.id_data
+ pbones = obj.pose.bones
+ self_bone = self.bone
+
+ return tuple(pbones[bone.name] for bone in obj.data.bones
+ if bone.parent == self_bone)
+
class Bone(StructRNA, _GenericBone, metaclass=StructMetaPropGroup):
__slots__ = ()
@@ -547,7 +558,7 @@ class OrderedDictMini(dict):
self.order.remove(key)
-class RNAMetaPropGroup(RNAMeta, StructMetaPropGroup):
+class RNAMetaPropGroup(StructMetaPropGroup, RNAMeta):
pass
diff --git a/release/scripts/modules/rna_info.py b/release/scripts/modules/rna_info.py
index bf15b472805..60b11884e30 100644
--- a/release/scripts/modules/rna_info.py
+++ b/release/scripts/modules/rna_info.py
@@ -83,8 +83,21 @@ def float_as_string(f):
class InfoStructRNA:
- global_lookup = {}
+ __slots__ = (
+ "bl_rna",
+ "identifier",
+ "name",
+ "description",
+ "base",
+ "nested",
+ "full_path",
+ "functions",
+ "children",
+ "references",
+ "properties",
+ )
+ global_lookup = {}
def __init__(self, rna_type):
self.bl_rna = rna_type
@@ -182,6 +195,27 @@ class InfoStructRNA:
class InfoPropertyRNA:
+ __slots__ = (
+ "bl_prop",
+ "srna",
+ "identifier",
+ "name",
+ "description",
+ "default_str",
+ "default",
+ "enum_items",
+ "min",
+ "max",
+ "array_length",
+ "collection_type",
+ "type",
+ "fixed_type",
+ "is_argument_optional",
+ "is_enum_flag",
+ "is_required",
+ "is_readonly",
+ "is_never_none",
+ )
global_lookup = {}
def __init__(self, rna_prop):
@@ -202,6 +236,7 @@ class InfoPropertyRNA:
self.is_required = rna_prop.is_required
self.is_readonly = rna_prop.is_readonly
self.is_never_none = rna_prop.is_never_none
+ self.is_argument_optional = rna_prop.is_argument_optional
self.type = rna_prop.type.lower()
fixed_type = getattr(rna_prop, "fixed_type", "")
@@ -296,6 +331,8 @@ class InfoPropertyRNA:
elif as_arg:
if not self.is_required:
type_info.append("optional")
+ if self.is_argument_optional:
+ type_info.append("optional argument")
else: # readonly is only useful for self's, not args
if self.is_readonly:
type_info.append("readonly")
@@ -316,6 +353,14 @@ class InfoPropertyRNA:
class InfoFunctionRNA:
+ __slots__ = (
+ "bl_func",
+ "identifier",
+ "description",
+ "args",
+ "return_values",
+ "is_classmethod",
+ )
global_lookup = {}
def __init__(self, rna_func):
@@ -353,6 +398,15 @@ class InfoFunctionRNA:
class InfoOperatorRNA:
+ __slots__ = (
+ "bl_op",
+ "identifier",
+ "name",
+ "module_name",
+ "func_name",
+ "description",
+ "args",
+ )
global_lookup = {}
def __init__(self, rna_op):
@@ -594,7 +648,8 @@ def BuildRNAInfo():
for prop in func.return_values:
prop.build()
- if 1:
+ # there are too many invalid defaults, unless we intend to fix, leave this off
+ if 0:
for rna_info in InfoStructRNA.global_lookup.values():
for prop in rna_info.properties:
# ERROR CHECK
diff --git a/release/scripts/modules/rna_keymap_ui.py b/release/scripts/modules/rna_keymap_ui.py
index 727e9935bcc..60590158fbd 100644
--- a/release/scripts/modules/rna_keymap_ui.py
+++ b/release/scripts/modules/rna_keymap_ui.py
@@ -74,15 +74,14 @@ def draw_km(display_keymaps, kc, km, children, layout, level):
row.prop(km, "show_expanded_children", text="", emboss=False)
row.label(text=km.name, text_ctxt=i18n_contexts.id_windowmanager)
- row.label()
- row.label()
+ subrow = row.row()
+ subrow.alignment = 'RIGHT'
- if km.is_modal:
- row.label(text="", icon='LINKED')
if km.is_user_modified:
- row.operator("wm.keymap_restore", text="Restore")
- else:
- row.label()
+ subrow.operator("wm.keymap_restore", text="Restore")
+ if km.is_modal:
+ subrow.label(text="", icon='LINKED')
+ del subrow
if km.show_expanded_children:
if children:
diff --git a/release/scripts/presets/cycles/sampling/final.py b/release/scripts/presets/cycles/sampling/final.py
index a76fa352178..2ee429188be 100644
--- a/release/scripts/presets/cycles/sampling/final.py
+++ b/release/scripts/presets/cycles/sampling/final.py
@@ -1,13 +1,13 @@
import bpy
cycles = bpy.context.scene.cycles
-cycles.squared_samples = True
+cycles.use_square_samples = True
# Progressive
-cycles.samples = 500
-cycles.preview_samples = 100
+cycles.samples = 24
+cycles.preview_samples = 12
-# Non-Progressive (squared)
+# Non-Progressive
cycles.aa_samples = 8
cycles.preview_aa_samples = 4
diff --git a/release/scripts/presets/cycles/sampling/preview.py b/release/scripts/presets/cycles/sampling/preview.py
index 3f565ccff8c..c7af6c83777 100644
--- a/release/scripts/presets/cycles/sampling/preview.py
+++ b/release/scripts/presets/cycles/sampling/preview.py
@@ -1,13 +1,13 @@
import bpy
cycles = bpy.context.scene.cycles
-cycles.squared_samples = True
+cycles.use_square_samples = True
# Progressive
-cycles.samples = 100
-cycles.preview_samples = 10
+cycles.samples = 12
+cycles.preview_samples = 6
-# Non-Progressive (squared)
+# Non-Progressive
cycles.aa_samples = 4
cycles.preview_aa_samples = 2
diff --git a/release/scripts/presets/keyconfig/3dsmax.py b/release/scripts/presets/keyconfig/3dsmax.py
index 0477f5aa4c1..42a928cf80f 100644
--- a/release/scripts/presets/keyconfig/3dsmax.py
+++ b/release/scripts/presets/keyconfig/3dsmax.py
@@ -2415,3 +2415,31 @@ kmi = km.keymap_items.new_modal('AUTOIK_CHAIN_LEN_DOWN', 'PAGE_DOWN', 'PRESS', s
kmi = km.keymap_items.new_modal('AUTOIK_CHAIN_LEN_UP', 'WHEELDOWNMOUSE', 'PRESS', shift=True)
kmi = km.keymap_items.new_modal('AUTOIK_CHAIN_LEN_DOWN', 'WHEELUPMOUSE', 'PRESS', shift=True)
+# Map View3D Gesture Circle
+km = kc.keymaps.new('View3D Gesture Circle', space_type='EMPTY', region_type='WINDOW', modal=True)
+
+kmi = km.keymap_items.new_modal('CANCEL', 'ESC', 'PRESS', any=True)
+kmi = km.keymap_items.new_modal('CANCEL', 'RIGHTMOUSE', 'ANY', any=True)
+kmi = km.keymap_items.new_modal('CONFIRM', 'RET', 'PRESS', any=True)
+kmi = km.keymap_items.new_modal('CONFIRM', 'NUMPAD_ENTER', 'PRESS')
+kmi = km.keymap_items.new_modal('SELECT', 'LEFTMOUSE', 'PRESS')
+kmi = km.keymap_items.new_modal('DESELECT', 'MIDDLEMOUSE', 'PRESS')
+kmi = km.keymap_items.new_modal('NOP', 'MIDDLEMOUSE', 'RELEASE')
+kmi = km.keymap_items.new_modal('NOP', 'LEFTMOUSE', 'RELEASE')
+kmi = km.keymap_items.new_modal('SUBTRACT', 'WHEELUPMOUSE', 'PRESS')
+kmi = km.keymap_items.new_modal('SUBTRACT', 'NUMPAD_MINUS', 'PRESS')
+kmi = km.keymap_items.new_modal('ADD', 'WHEELDOWNMOUSE', 'PRESS')
+kmi = km.keymap_items.new_modal('ADD', 'NUMPAD_PLUS', 'PRESS')
+kmi = km.keymap_items.new_modal('SIZE', 'TRACKPADPAN', 'ANY')
+
+# Map Gesture Border
+km = kc.keymaps.new('Gesture Border', space_type='EMPTY', region_type='WINDOW', modal=True)
+
+kmi = km.keymap_items.new_modal('CANCEL', 'ESC', 'PRESS', any=True)
+kmi = km.keymap_items.new_modal('CANCEL', 'RIGHTMOUSE', 'PRESS', any=True)
+kmi = km.keymap_items.new_modal('BEGIN', 'LEFTMOUSE', 'PRESS')
+kmi = km.keymap_items.new_modal('SELECT', 'LEFTMOUSE', 'RELEASE', any=True)
+kmi = km.keymap_items.new_modal('SELECT', 'RIGHTMOUSE', 'RELEASE', any=True)
+kmi = km.keymap_items.new_modal('BEGIN', 'MIDDLEMOUSE', 'PRESS')
+kmi = km.keymap_items.new_modal('DESELECT', 'MIDDLEMOUSE', 'RELEASE')
+
diff --git a/release/scripts/presets/keyconfig/maya.py b/release/scripts/presets/keyconfig/maya.py
index a61da0b09d2..21fd757c4e5 100644
--- a/release/scripts/presets/keyconfig/maya.py
+++ b/release/scripts/presets/keyconfig/maya.py
@@ -126,6 +126,7 @@ kmi = km.keymap_items.new('view2d.zoom_out', 'WHEELOUTMOUSE', 'PRESS')
kmi = km.keymap_items.new('view2d.zoom_in', 'WHEELINMOUSE', 'PRESS')
kmi = km.keymap_items.new('view2d.zoom_out', 'NUMPAD_MINUS', 'PRESS')
kmi = km.keymap_items.new('view2d.zoom_in', 'NUMPAD_PLUS', 'PRESS')
+kmi = km.keymap_items.new('view2d.smoothview', 'TIMER1', 'ANY')
kmi = km.keymap_items.new('view2d.scroll_down', 'WHEELDOWNMOUSE', 'PRESS')
kmi = km.keymap_items.new('view2d.scroll_up', 'WHEELUPMOUSE', 'PRESS')
kmi = km.keymap_items.new('view2d.scroll_right', 'WHEELDOWNMOUSE', 'PRESS')
@@ -197,7 +198,9 @@ kmi.properties.camera = True
kmi = km.keymap_items.new('marker.select', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True)
kmi.properties.extend = True
kmi.properties.camera = True
-kmi = km.keymap_items.new('marker.select_border', 'B', 'PRESS')
+kmi = km.keymap_items.new('marker.select_border', 'EVT_TWEAK_S', 'ANY')
+kmi.properties.extend = False
+kmi = km.keymap_items.new('marker.select_border', 'EVT_TWEAK_S', 'ANY', any=True)
kmi = km.keymap_items.new('marker.select_all', 'A', 'PRESS', ctrl=True)
kmi = km.keymap_items.new('marker.delete', 'BACK_SPACE', 'PRESS')
kmi = km.keymap_items.new('marker.rename', 'M', 'PRESS', ctrl=True)
@@ -228,7 +231,7 @@ kmi = km.keymap_items.new('outliner.item_activate', 'LEFTMOUSE', 'CLICK')
kmi.properties.extend = False
kmi = km.keymap_items.new('outliner.item_activate', 'LEFTMOUSE', 'CLICK', shift=True)
kmi.properties.extend = True
-kmi = km.keymap_items.new('outliner.select_border', 'EVT_TWEAK_L', 'ANY')
+kmi = km.keymap_items.new('outliner.select_border', 'EVT_TWEAK_S', 'ANY', any=True)
kmi = km.keymap_items.new('outliner.item_openclose', 'RET', 'PRESS')
kmi.properties.all = False
kmi = km.keymap_items.new('outliner.item_openclose', 'RET', 'PRESS', shift=True)
@@ -652,8 +655,10 @@ kmi = km.keymap_items.new('mesh.duplicate_move', 'D', 'PRESS', ctrl=True)
kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', shift=True)
kmi.properties.name = 'INFO_MT_mesh_add'
kmi = km.keymap_items.new('mesh.dupli_extrude_cursor', 'MIDDLEMOUSE', 'CLICK', ctrl=True)
-kmi = km.keymap_items.new('mesh.delete', 'BACK_SPACE', 'PRESS')
-kmi = km.keymap_items.new('mesh.delete', 'DEL', 'PRESS')
+kmi = km.keymap_items.new('wm.call_menu', 'BACK_SPACE', 'PRESS')
+kmi.properties.name = 'VIEW3D_MT_edit_mesh_delete'
+kmi = km.keymap_items.new('wm.call_menu', 'DEL', 'PRESS')
+kmi.properties.name = 'VIEW3D_MT_edit_mesh_delete'
kmi = km.keymap_items.new('mesh.knife_tool', 'LEFTMOUSE', 'PRESS', key_modifier='K')
kmi = km.keymap_items.new('object.vertex_parent_set', 'P', 'PRESS')
kmi = km.keymap_items.new('wm.call_menu', 'RIGHTMOUSE', 'PRESS', ctrl=True)
@@ -687,6 +692,31 @@ kmi.properties.level = 4
kmi = km.keymap_items.new('object.subdivision_set', 'FIVE', 'PRESS', ctrl=True)
kmi.properties.level = 5
+# Knife Tool
+km = kc.keymaps.new('Knife Tool Modal Map', space_type='EMPTY', region_type='WINDOW', modal=True)
+
+kmi = km.keymap_items.new_modal('CANCEL', 'ESC', 'ANY', any=True)
+kmi = km.keymap_items.new_modal('PANNING', 'LEFTMOUSE', 'ANY', alt=True)
+kmi = km.keymap_items.new_modal('ADD_CUT', 'LEFTMOUSE', 'PRESS', any=True)
+kmi = km.keymap_items.new_modal('CANCEL', 'RIGHTMOUSE', 'ANY', any=True)
+kmi = km.keymap_items.new_modal('CONFIRM', 'RET', 'PRESS', any=True)
+kmi = km.keymap_items.new_modal('CONFIRM', 'NUMPAD_ENTER', 'PRESS', any=True)
+kmi = km.keymap_items.new_modal('CONFIRM', 'SPACE', 'PRESS', any=True)
+kmi = km.keymap_items.new_modal('NEW_CUT', 'E', 'PRESS')
+
+kmi = km.keymap_items.new_modal('SNAP_MIDPOINT_ON', 'LEFT_CTRL', 'PRESS', any=True)
+kmi = km.keymap_items.new_modal('SNAP_MIDPOINT_OFF', 'LEFT_CTRL', 'RELEASE', any=True)
+kmi = km.keymap_items.new_modal('SNAP_MIDPOINT_ON', 'RIGHT_CTRL', 'PRESS', any=True)
+kmi = km.keymap_items.new_modal('SNAP_MIDPOINT_OFF', 'RIGHT_CTRL', 'RELEASE', any=True)
+
+kmi = km.keymap_items.new_modal('IGNORE_SNAP_ON', 'LEFT_SHIFT', 'PRESS', any=True)
+kmi = km.keymap_items.new_modal('IGNORE_SNAP_OFF', 'LEFT_SHIFT', 'RELEASE', any=True)
+kmi = km.keymap_items.new_modal('IGNORE_SNAP_ON', 'RIGHT_SHIFT', 'PRESS', any=True)
+kmi = km.keymap_items.new_modal('IGNORE_SNAP_OFF', 'RIGHT_SHIFT', 'RELEASE', any=True)
+
+kmi = km.keymap_items.new_modal('ANGLE_SNAP_TOGGLE', 'C', 'PRESS')
+kmi = km.keymap_items.new_modal('CUT_THROUGH_TOGGLE', 'Z', 'PRESS')
+
# Map Curve
km = kc.keymaps.new('Curve', space_type='EMPTY', region_type='WINDOW', modal=False)
@@ -861,8 +891,6 @@ kmi = km.keymap_items.new('particle.hide', 'H', 'PRESS', ctrl=True)
kmi.properties.unselected = False
kmi = km.keymap_items.new('particle.hide', 'H', 'PRESS', alt=True)
kmi.properties.unselected = True
-kmi = km.keymap_items.new('view3d.manipulator', 'LEFTMOUSE', 'PRESS', any=True)
-kmi.properties.release_confirm = True
kmi = km.keymap_items.new('particle.brush_edit', 'LEFTMOUSE', 'PRESS')
kmi = km.keymap_items.new('particle.brush_edit', 'LEFTMOUSE', 'PRESS', shift=True)
kmi = km.keymap_items.new('wm.radial_control', 'B', 'PRESS')
@@ -899,10 +927,10 @@ kmi = km.keymap_items.new('object.origin_set', 'C', 'PRESS', shift=True, ctrl=Tr
# Map 3D View
km = kc.keymaps.new('3D View', space_type='VIEW_3D', region_type='WINDOW', modal=False)
-kmi = km.keymap_items.new('view3d.manipulator', 'LEFTMOUSE', 'PRESS', any=True)
-kmi.properties.release_confirm = True
kmi = km.keymap_items.new('view3d.cursor3d', 'ACTIONMOUSE', 'PRESS')
kmi = km.keymap_items.new('view3d.rotate', 'LEFTMOUSE', 'PRESS', alt=True)
+kmi = km.keymap_items.new('view3d.manipulator', 'LEFTMOUSE', 'PRESS', any=True)
+kmi.properties.release_confirm = True
kmi = km.keymap_items.new('view3d.move', 'MIDDLEMOUSE', 'PRESS', alt=True)
kmi = km.keymap_items.new('view3d.zoom', 'RIGHTMOUSE', 'PRESS', alt=True)
kmi = km.keymap_items.new('view3d.view_selected', 'F', 'PRESS')
@@ -1025,10 +1053,12 @@ kmi.properties.deselect = False
kmi.properties.object = False
kmi = km.keymap_items.new('view3d.select_border', 'EVT_TWEAK_S', 'ANY')
kmi.properties.extend = False
+kmi = km.keymap_items.new('view3d.select_border', 'EVT_TWEAK_S', 'ANY', any=True)
kmi = km.keymap_items.new('view3d.select_lasso', 'EVT_TWEAK_M', 'ANY')
kmi.properties.extend = False
-kmi = km.keymap_items.new('view3d.select_lasso', 'EVT_TWEAK_M', 'ANY', shift=True)
+kmi = km.keymap_items.new('view3d.select_lasso', 'EVT_TWEAK_M', 'ANY', ctrl=True)
kmi.properties.deselect = True
+kmi = km.keymap_items.new('view3d.select_lasso', 'EVT_TWEAK_M', 'ANY', any=True)
kmi = km.keymap_items.new('view3d.select_circle', 'Q', 'PRESS', shift=True)
kmi = km.keymap_items.new('view3d.clip_border', 'B', 'PRESS', alt=True)
kmi = km.keymap_items.new('view3d.zoom_border', 'B', 'PRESS', shift=True)
@@ -1050,8 +1080,6 @@ kmi = km.keymap_items.new('view3d.enable_manipulator', 'E', 'PRESS')
kmi.properties.rotate = True
kmi = km.keymap_items.new('view3d.enable_manipulator', 'R', 'PRESS')
kmi.properties.scale = True
-kmi = km.keymap_items.new('view3d.select_border', 'EVT_TWEAK_S', 'ANY', shift=True)
-kmi.properties.extend = True
kmi = km.keymap_items.new('wm.context_toggle_enum', 'SIX', 'PRESS')
kmi.properties.data_path = 'space_data.viewport_shade'
kmi.properties.value_1 = 'TEXTURED'
@@ -1076,10 +1104,9 @@ kmi = km.keymap_items.new('anim.channels_rename', 'LEFTMOUSE', 'PRESS', ctrl=Tru
kmi = km.keymap_items.new('anim.channels_select_all_toggle', 'A', 'PRESS', ctrl=True)
kmi = km.keymap_items.new('anim.channels_select_all_toggle', 'I', 'PRESS', ctrl=True)
kmi.properties.invert = True
-kmi = km.keymap_items.new('anim.channels_select_border', 'EVT_TWEAK_L', 'ANY')
+kmi = km.keymap_items.new('anim.channels_select_border', 'EVT_TWEAK_S', 'ANY')
kmi.properties.extend = False
-kmi = km.keymap_items.new('anim.channels_select_border', 'EVT_TWEAK_L', 'ANY', shift=True)
-kmi.properties.extend = True
+kmi = km.keymap_items.new('anim.channels_select_border', 'EVT_TWEAK_S', 'ANY', any=True)
kmi = km.keymap_items.new('anim.channels_delete', 'BACK_SPACE', 'PRESS')
kmi = km.keymap_items.new('anim.channels_delete', 'DEL', 'PRESS')
kmi = km.keymap_items.new('anim.channels_setting_toggle', 'W', 'PRESS', shift=True)
@@ -1118,9 +1145,9 @@ kmi.properties.extend = False
kmi = km.keymap_items.new('uv.select_loop', 'LEFTMOUSE', 'PRESS', shift=True, ctrl=True, alt=True)
kmi.properties.extend = True
kmi = km.keymap_items.new('uv.select_border', 'EVT_TWEAK_S', 'ANY')
-kmi.properties.pinned = False
kmi.properties.extend = False
-kmi = km.keymap_items.new('uv.select_border', 'EVT_TWEAK_S', 'ANY', shift=True)
+kmi.properties.pinned = False
+kmi = km.keymap_items.new('uv.select_border', 'EVT_TWEAK_S', 'ANY', any=True)
kmi.properties.pinned = False
kmi = km.keymap_items.new('uv.circle_select', 'Q', 'PRESS', shift=True)
kmi = km.keymap_items.new('uv.select_linked', 'L', 'PRESS', ctrl=True)
@@ -1197,6 +1224,35 @@ kmi = km.keymap_items.new_modal('AUTOIK_CHAIN_LEN_UP', 'WHEELDOWNMOUSE', 'PRESS'
kmi = km.keymap_items.new_modal('AUTOIK_CHAIN_LEN_DOWN', 'WHEELUPMOUSE', 'PRESS', shift=True)
kmi = km.keymap_items.new_modal('CONFIRM', 'MIDDLEMOUSE', 'RELEASE')
+# Map View3D Gesture Circle
+km = kc.keymaps.new('View3D Gesture Circle', space_type='EMPTY', region_type='WINDOW', modal=True)
+
+kmi = km.keymap_items.new_modal('CANCEL', 'ESC', 'PRESS', any=True)
+kmi = km.keymap_items.new_modal('CANCEL', 'RIGHTMOUSE', 'ANY', any=True)
+kmi = km.keymap_items.new_modal('CONFIRM', 'RET', 'PRESS', any=True)
+kmi = km.keymap_items.new_modal('CONFIRM', 'NUMPAD_ENTER', 'PRESS')
+kmi = km.keymap_items.new_modal('SELECT', 'LEFTMOUSE', 'PRESS')
+kmi = km.keymap_items.new_modal('DESELECT', 'MIDDLEMOUSE', 'PRESS')
+kmi = km.keymap_items.new_modal('NOP', 'MIDDLEMOUSE', 'RELEASE')
+kmi = km.keymap_items.new_modal('NOP', 'LEFTMOUSE', 'RELEASE')
+kmi = km.keymap_items.new_modal('SUBTRACT', 'WHEELUPMOUSE', 'PRESS')
+kmi = km.keymap_items.new_modal('SUBTRACT', 'NUMPAD_MINUS', 'PRESS')
+kmi = km.keymap_items.new_modal('ADD', 'WHEELDOWNMOUSE', 'PRESS')
+kmi = km.keymap_items.new_modal('ADD', 'NUMPAD_PLUS', 'PRESS')
+kmi = km.keymap_items.new_modal('SIZE', 'TRACKPADPAN', 'ANY')
+
+# Map Gesture Border
+km = kc.keymaps.new('Gesture Border', space_type='EMPTY', region_type='WINDOW', modal=True)
+
+kmi = km.keymap_items.new_modal('CANCEL', 'ESC', 'PRESS', any=True)
+kmi = km.keymap_items.new_modal('CANCEL', 'RIGHTMOUSE', 'PRESS', any=True)
+kmi = km.keymap_items.new_modal('BEGIN', 'LEFTMOUSE', 'PRESS')
+kmi = km.keymap_items.new_modal('DESELECT', 'LEFTMOUSE', 'RELEASE', ctrl=True)
+kmi = km.keymap_items.new_modal('SELECT', 'LEFTMOUSE', 'RELEASE', any=True)
+kmi = km.keymap_items.new_modal('SELECT', 'RIGHTMOUSE', 'RELEASE', any=True)
+kmi = km.keymap_items.new_modal('BEGIN', 'MIDDLEMOUSE', 'PRESS')
+kmi = km.keymap_items.new_modal('DESELECT', 'MIDDLEMOUSE', 'RELEASE')
+
# Map UV Sculpt
km = kc.keymaps.new('UV Sculpt', space_type='EMPTY', region_type='WINDOW', modal=False)
@@ -1285,10 +1341,12 @@ kmi.properties.invert = False
kmi = km.keymap_items.new('graph.select_all_toggle', 'I', 'PRESS', ctrl=True)
kmi.properties.invert = True
kmi = km.keymap_items.new('graph.select_border', 'EVT_TWEAK_S', 'ANY')
-kmi.properties.gesture_mode = 0
kmi.properties.extend = False
kmi.properties.axis_range = False
kmi.properties.include_handles = False
+kmi = km.keymap_items.new('graph.select_border', 'EVT_TWEAK_S', 'ANY', any=True)
+kmi.properties.axis_range = False
+kmi.properties.include_handles = False
kmi = km.keymap_items.new('graph.select_more', 'PERIOD', 'PRESS', shift=True)
kmi = km.keymap_items.new('graph.select_less', 'COMMA', 'PRESS', shift=True)
kmi = km.keymap_items.new('graph.frame_jump', 'S', 'PRESS', shift=True, ctrl=True)
@@ -1313,8 +1371,6 @@ kmi = km.keymap_items.new('transform.rotate', 'E', 'PRESS')
kmi = km.keymap_items.new('transform.resize', 'S', 'PRESS')
kmi = km.keymap_items.new('marker.add', 'M', 'PRESS')
kmi = km.keymap_items.new('marker.rename', 'M', 'PRESS', ctrl=True)
-kmi = km.keymap_items.new('graph.select_border', 'EVT_TWEAK_S', 'ANY', shift=True)
-kmi.properties.extend = True
kmi = km.keymap_items.new('graph.copy', 'C', 'PRESS', oskey=True)
kmi = km.keymap_items.new('graph.paste', 'V', 'PRESS', oskey=True)
kmi = km.keymap_items.new('graph.select_all_toggle', 'SELECTMOUSE', 'DOUBLE_CLICK')
@@ -1394,6 +1450,8 @@ kmi.properties.extend = True
kmi = km.keymap_items.new('node.select_border', 'EVT_TWEAK_S', 'ANY')
kmi.properties.extend = False
kmi.properties.tweak = True
+kmi = km.keymap_items.new('node.select_border', 'EVT_TWEAK_S', 'ANY', any=True)
+kmi.properties.tweak = True
kmi = km.keymap_items.new('node.link', 'LEFTMOUSE', 'PRESS')
kmi = km.keymap_items.new('node.resize', 'LEFTMOUSE', 'PRESS')
kmi = km.keymap_items.new('node.links_cut', 'LEFTMOUSE', 'PRESS', ctrl=True)
@@ -1445,9 +1503,6 @@ kmi = km.keymap_items.new('transform.resize', 'R', 'PRESS')
kmi = km.keymap_items.new('node.move_detach_links', 'D', 'PRESS', alt=True)
kmi = km.keymap_items.new('node.move_detach_links', 'EVT_TWEAK_A', 'ANY', alt=True)
kmi = km.keymap_items.new('node.move_detach_links', 'EVT_TWEAK_S', 'ANY', alt=True)
-kmi = km.keymap_items.new('node.select_border', 'EVT_TWEAK_L', 'ANY', shift=True)
-kmi.properties.extend = True
-kmi.properties.tweak = True
# Map File Browser Main
km = kc.keymaps.new('File Browser Main', space_type='FILE_BROWSER', region_type='WINDOW', modal=False)
@@ -1463,9 +1518,9 @@ kmi.properties.extend = True
kmi.properties.fill = True
kmi = km.keymap_items.new('file.select_all_toggle', 'A', 'PRESS', ctrl=True)
kmi = km.keymap_items.new('file.refresh', 'F', 'PRESS')
-kmi = km.keymap_items.new('file.select_border', 'EVT_TWEAK_L', 'ANY')
+kmi = km.keymap_items.new('file.select_border', 'EVT_TWEAK_S', 'ANY')
kmi.properties.extend = False
-kmi = km.keymap_items.new('file.select_border', 'EVT_TWEAK_L', 'ANY')
+kmi = km.keymap_items.new('file.select_border', 'EVT_TWEAK_S', 'ANY', any=True)
kmi = km.keymap_items.new('file.rename', 'LEFTMOUSE', 'PRESS', ctrl=True)
kmi = km.keymap_items.new('file.highlight', 'MOUSEMOVE', 'ANY', any=True)
kmi = km.keymap_items.new('file.filenum', 'NUMPAD_PLUS', 'PRESS')
@@ -1506,11 +1561,10 @@ kmi = km.keymap_items.new('action.select_all_toggle', 'A', 'PRESS', ctrl=True)
kmi.properties.invert = False
kmi = km.keymap_items.new('action.select_all_toggle', 'I', 'PRESS', ctrl=True)
kmi.properties.invert = True
-kmi = km.keymap_items.new('action.select_border', 'EVT_TWEAK_L', 'ANY')
+kmi = km.keymap_items.new('action.select_border', 'EVT_TWEAK_S', 'ANY')
kmi.properties.extend = False
kmi.properties.axis_range = False
-kmi = km.keymap_items.new('action.select_border', 'EVT_TWEAK_L', 'ANY', shift=True)
-kmi.properties.extend = True
+kmi = km.keymap_items.new('action.select_border', 'EVT_TWEAK_S', 'ANY', any=True)
kmi.properties.axis_range = False
kmi = km.keymap_items.new('action.select_more', 'PERIOD', 'PRESS', shift=True)
kmi = km.keymap_items.new('action.select_less', 'COMMA', 'PRESS', shift=True)
@@ -1579,10 +1633,10 @@ kmi = km.keymap_items.new('nla.select_all_toggle', 'A', 'PRESS', ctrl=True)
kmi.properties.invert = False
kmi = km.keymap_items.new('nla.select_all_toggle', 'I', 'PRESS', ctrl=True)
kmi.properties.invert = True
-kmi = km.keymap_items.new('nla.select_border', 'EVT_TWEAK_L', 'ANY')
+kmi = km.keymap_items.new('nla.select_border', 'EVT_TWEAK_S', 'ANY')
kmi.properties.extend = False
kmi.properties.axis_range = False
-kmi = km.keymap_items.new('nla.select_border', 'EVT_TWEAK_L', 'ANY', shift=True)
+kmi = km.keymap_items.new('nla.select_border', 'EVT_TWEAK_S', 'ANY', any=True)
kmi.properties.axis_range = False
kmi = km.keymap_items.new('nla.view_all', 'A', 'PRESS')
kmi = km.keymap_items.new('nla.view_selected', 'F', 'PRESS')
@@ -1717,8 +1771,9 @@ kmi.properties.extend = False
kmi = km.keymap_items.new('sequencer.select_linked_pick', 'L', 'PRESS', shift=True)
kmi.properties.extend = True
kmi = km.keymap_items.new('sequencer.select_linked', 'L', 'PRESS', ctrl=True)
-kmi = km.keymap_items.new('sequencer.select_border', 'EVT_TWEAK_L', 'ANY')
+kmi = km.keymap_items.new('sequencer.select_border', 'EVT_TWEAK_S', 'ANY')
kmi.properties.extend = False
+kmi = km.keymap_items.new('sequencer.select_border', 'EVT_TWEAK_S', 'ANY', any=True)
kmi = km.keymap_items.new('sequencer.select_grouped', 'G', 'PRESS', shift=True)
kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', shift=True)
kmi.properties.name = 'SEQUENCER_MT_add'
@@ -1732,7 +1787,6 @@ kmi = km.keymap_items.new('transform.seq_slide', 'EVT_TWEAK_M', 'ANY')
kmi = km.keymap_items.new('transform.transform', 'E', 'PRESS')
kmi = km.keymap_items.new('marker.add', 'M', 'PRESS')
kmi = km.keymap_items.new('marker.rename', 'M', 'PRESS', ctrl=True)
-kmi = km.keymap_items.new('sequencer.select_border', 'EVT_TWEAK_L', 'ANY', shift=True)
# Map Clip Editor
km = kc.keymaps.new('Clip Editor', space_type='CLIP_EDITOR', region_type='WINDOW', modal=False)
@@ -1781,7 +1835,9 @@ kmi = km.keymap_items.new('clip.select_all', 'A', 'PRESS', ctrl=True)
kmi.properties.action = 'TOGGLE'
kmi = km.keymap_items.new('clip.select_all', 'I', 'PRESS', ctrl=True)
kmi.properties.action = 'INVERT'
-kmi = km.keymap_items.new('clip.select_border', 'B', 'PRESS')
+kmi = km.keymap_items.new('clip.select_border', 'EVT_TWEAK_S', 'ANY')
+kmi.properties.extend = False
+kmi = km.keymap_items.new('clip.select_border', 'EVT_TWEAK_S', 'ANY', any=True)
kmi = km.keymap_items.new('clip.select_circle', 'Q', 'PRESS', shift=True)
kmi = km.keymap_items.new('wm.call_menu', 'G', 'PRESS', shift=True)
kmi.properties.name = 'CLIP_MT_select_grouped'
@@ -1838,7 +1894,9 @@ kmi = km.keymap_items.new('clip.graph_select_all_markers', 'A', 'PRESS')
kmi.properties.action = 'TOGGLE'
kmi = km.keymap_items.new('clip.graph_select_all_markers', 'I', 'PRESS', ctrl=True)
kmi.properties.action = 'INVERT'
-kmi = km.keymap_items.new('clip.graph_select_border', 'B', 'PRESS')
+kmi = km.keymap_items.new('clip.graph_select_border', 'EVT_TWEAK_S', 'ANY')
+kmi.properties.extend = False
+kmi = km.keymap_items.new('clip.graph_select_border', 'EVT_TWEAK_S', 'ANY', any=True)
kmi = km.keymap_items.new('clip.graph_delete_curve', 'DEL', 'PRESS')
kmi = km.keymap_items.new('clip.graph_delete_curve', 'BACK_SPACE', 'PRESS')
kmi = km.keymap_items.new('clip.graph_delete_knot', 'DEL', 'PRESS', shift=True)
diff --git a/release/scripts/presets/operator/wm.collada_export/second_life_rigged.py b/release/scripts/presets/operator/wm.collada_export/sl_plus_open_sim_rigged.py
index 717e044ccd6..7825a4d0f32 100644
--- a/release/scripts/presets/operator/wm.collada_export/second_life_rigged.py
+++ b/release/scripts/presets/operator/wm.collada_export/sl_plus_open_sim_rigged.py
@@ -15,4 +15,4 @@ op.use_texture_copies = True
op.triangulate = True
op.use_object_instantiation = False
op.sort_by_name = True
-op.second_life = True
+op.open_sim = True
diff --git a/release/scripts/presets/operator/wm.collada_export/second_life_static.py b/release/scripts/presets/operator/wm.collada_export/sl_plus_open_sim_static.py
index 9518fe5fb35..9e2efcaa727 100644
--- a/release/scripts/presets/operator/wm.collada_export/second_life_static.py
+++ b/release/scripts/presets/operator/wm.collada_export/sl_plus_open_sim_static.py
@@ -15,4 +15,4 @@ op.use_texture_copies = True
op.triangulate = True
op.use_object_instantiation = False
op.sort_by_name = True
-op.second_life = False
+op.open_sim = False
diff --git a/release/scripts/startup/bl_operators/__init__.py b/release/scripts/startup/bl_operators/__init__.py
index 64851a3a4c1..4f6863a590c 100644
--- a/release/scripts/startup/bl_operators/__init__.py
+++ b/release/scripts/startup/bl_operators/__init__.py
@@ -28,6 +28,7 @@ _modules = [
"clip",
"console",
"image",
+ "mask",
"mesh",
"node",
"object_align",
diff --git a/release/scripts/startup/bl_operators/add_mesh_torus.py b/release/scripts/startup/bl_operators/add_mesh_torus.py
index 692787ce281..aa01e20fc97 100644
--- a/release/scripts/startup/bl_operators/add_mesh_torus.py
+++ b/release/scripts/startup/bl_operators/add_mesh_torus.py
@@ -106,9 +106,9 @@ class AddTorus(Operator, object_utils.AddObjectHelper):
)
mode = bpy.props.EnumProperty(
name="Torus Dimensions",
- items=(("MAJOR_MINOR", "Major/Minor",
+ items=(("MAJOR_MINOR", "Major/Minor",
"Use the major/minor radii for torus dimensions"),
- ("EXT_INT", "Exterior/Interior",
+ ("EXT_INT", "Exterior/Interior",
"Use the exterior/interior radii for torus dimensions")),
update=mode_update_callback,
)
@@ -150,18 +150,19 @@ class AddTorus(Operator, object_utils.AddObjectHelper):
layout = self.layout
col = layout.column(align=True)
col.prop(self, 'view_align')
- col = layout.column(align=True)
+ col = layout.column(align=True)
col.label(text="Location")
col.prop(self, 'location', text="")
- col = layout.column(align=True)
+ col = layout.column(align=True)
col.label(text="Rotation")
col.prop(self, 'rotation', text="")
col = layout.column(align=True)
col.label(text="Major Segments")
col.prop(self, 'major_segments', text="")
+
col = layout.column(align=True)
col.label(text="Minor Segments")
col.prop(self, 'minor_segments', text="")
@@ -174,6 +175,7 @@ class AddTorus(Operator, object_utils.AddObjectHelper):
col = layout.column(align=True)
col.label(text="Major Radius")
col.prop(self, 'major_radius', text="")
+
col = layout.column(align=True)
col.label(text="Minor Radius")
col.prop(self, 'minor_radius', text="")
@@ -181,6 +183,7 @@ class AddTorus(Operator, object_utils.AddObjectHelper):
col = layout.column(align=True)
col.label(text="Exterior Radius")
col.prop(self, 'abso_major_rad', text="")
+
col = layout.column(align=True)
col.label(text="Interior Radius")
col.prop(self, 'abso_minor_rad', text="")
diff --git a/release/scripts/startup/bl_operators/mask.py b/release/scripts/startup/bl_operators/mask.py
new file mode 100644
index 00000000000..60208d27338
--- /dev/null
+++ b/release/scripts/startup/bl_operators/mask.py
@@ -0,0 +1,34 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+# <pep8-80 compliant>
+
+import bpy
+from bpy.types import Menu
+
+
+class MASK_MT_add(Menu):
+ bl_idname = "MASK_MT_add"
+ bl_label = "Add"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator_context = 'INVOKE_REGION_WIN'
+ layout.operator("mask.primitive_circle_add", text="Circle", icon='MESH_CIRCLE')
+ layout.operator("mask.primitive_square_add", text="Square", icon='MESH_PLANE')
diff --git a/release/scripts/startup/bl_operators/node.py b/release/scripts/startup/bl_operators/node.py
index c70b5832bfb..77978c71ed9 100644
--- a/release/scripts/startup/bl_operators/node.py
+++ b/release/scripts/startup/bl_operators/node.py
@@ -66,12 +66,8 @@ class NodeAddOperator():
# convert mouse position to the View2D for later node placement
if context.region.type == 'WINDOW':
- # XXX, temp fix for [#35920], still fails for (U.pixelsize != 1)
- dpi_fac = context.user_preferences.system.dpi / 72.0
- space.cursor_location = v2d.region_to_view(event.mouse_region_x,
- event.mouse_region_y)
- space.cursor_location /= dpi_fac
-
+ # convert mouse position to the View2D for later node placement
+ space.cursor_location_from_region(event.mouse_region_x, event.mouse_region_y)
else:
space.cursor_location = tree.view_center
@@ -117,8 +113,11 @@ class NodeAddOperator():
# Default execute simply adds a node
def execute(self, context):
- self.create_node(context)
- return {'FINISHED'}
+ if self.properties.is_property_set("type"):
+ self.create_node(context)
+ return {'FINISHED'}
+ else:
+ return {'CANCELLED'}
# Default invoke stores the mouse position to place the node correctly
# and optionally invokes the transform operator
@@ -127,7 +126,8 @@ class NodeAddOperator():
result = self.execute(context)
if self.use_transform and ('FINISHED' in result):
- bpy.ops.transform.translate('INVOKE_DEFAULT')
+ # removes the node again if transform is cancelled
+ bpy.ops.transform.translate('INVOKE_DEFAULT', remove_on_cancel=True)
return result
diff --git a/release/scripts/startup/bl_operators/uvcalc_lightmap.py b/release/scripts/startup/bl_operators/uvcalc_lightmap.py
index b24a71365b4..6f54c051c0b 100644
--- a/release/scripts/startup/bl_operators/uvcalc_lightmap.py
+++ b/release/scripts/startup/bl_operators/uvcalc_lightmap.py
@@ -24,15 +24,16 @@ import mathutils
class prettyface(object):
- __slots__ = ("uv",
- "width",
- "height",
- "children",
- "xoff",
- "yoff",
- "has_parent",
- "rot",
- )
+ __slots__ = (
+ "uv",
+ "width",
+ "height",
+ "children",
+ "xoff",
+ "yoff",
+ "has_parent",
+ "rot",
+ )
def __init__(self, data):
self.has_parent = False
@@ -94,8 +95,43 @@ class prettyface(object):
# cos = [v.co for v in data]
cos = [data.id_data.vertices[v].co for v in data.vertices] # XXX25
- self.width = ((cos[0] - cos[1]).length + (cos[2] - cos[3]).length) / 2.0
- self.height = ((cos[1] - cos[2]).length + (cos[0] - cos[3]).length) / 2.0
+ if len(self.uv) == 4:
+ self.width = ((cos[0] - cos[1]).length + (cos[2] - cos[3]).length) / 2.0
+ self.height = ((cos[1] - cos[2]).length + (cos[0] - cos[3]).length) / 2.0
+ else:
+ # ngon, note:
+ # for ngons to calculate the width/height we need to do the
+ # whole projection, unlike other faces
+ # we store normalized UV's in the faces coords to avoid
+ # calculating the projection and rotating it twice.
+
+ no = data.normal
+ r = no.rotation_difference(mathutils.Vector((0.0, 0.0, 1.0)))
+ cos_2d = [(r * co).xy for co in cos]
+ # print(cos_2d)
+ angle = mathutils.geometry.box_fit_2d(cos_2d)
+
+ mat = mathutils.Matrix.Rotation(angle, 2)
+ cos_2d = [(mat * co) for co in cos_2d]
+ xs = [co.x for co in cos_2d]
+ ys = [co.y for co in cos_2d]
+
+ xmin = min(xs)
+ ymin = min(ys)
+ xmax = max(xs)
+ ymax = max(ys)
+
+ xspan = xmax - xmin
+ yspan = ymax - ymin
+
+ self.width = xspan
+ self.height = yspan
+
+ # ngons work different, we store projected result
+ # in UV's to avoid having to re-project later.
+ for i, co in enumerate(cos_2d):
+ self.uv[i][:] = ((co.x - xmin) / xspan,
+ (co.y - ymin) / yspan)
self.children = []
@@ -105,7 +141,7 @@ class prettyface(object):
self.width, self.height = self.height, self.width
self.xoff, self.yoff = self.yoff, self.xoff # not needed?
- self.rot = not self.rot # only for tri pairs.
+ self.rot = not self.rot # only for tri pairs and ngons.
# print("spinning")
for pf in self.children:
pf.spin()
@@ -178,10 +214,19 @@ class prettyface(object):
set_uv(f, (x2, y2), (x2, y1 + margin_h), (x1 + margin_w, y2))
else: # 1 QUAD
- uv[1][:] = x1, y1
- uv[2][:] = x1, y2
- uv[3][:] = x2, y2
- uv[0][:] = x2, y1
+ if len(uv) == 4:
+ uv[1][:] = x1, y1
+ uv[2][:] = x1, y2
+ uv[3][:] = x2, y2
+ uv[0][:] = x2, y1
+ else:
+ # NGon
+ xspan = x2 - x1
+ yspan = y2 - y1
+ for uvco in uv:
+ x, y = uvco
+ uvco[:] = ((x1 + (x * xspan)),
+ (y1 + (y * yspan)))
def __hash__(self):
# None unique hash
@@ -244,7 +289,7 @@ def lightmap_uvpack(meshes,
print("\tWarning, less then 4 faces, skipping")
continue
- pretty_faces = [prettyface(f) for f in face_sel if f.loop_total == 4]
+ pretty_faces = [prettyface(f) for f in face_sel if f.loop_total >= 4]
# Do we have any triangles?
if len(pretty_faces) != len(face_sel):
@@ -511,8 +556,6 @@ def lightmap_uvpack(meshes,
print("finished all %.2f " % (time.time() - t))
- # Window.RedrawAll()
-
def unwrap(operator, context, **kwargs):
@@ -545,7 +588,7 @@ from bpy.props import BoolProperty, FloatProperty, IntProperty
class LightMapPack(Operator):
- """Follow UVs from active quads along continuous face loops"""
+ """Pack each faces UV's into the UV bounds"""
bl_idname = "uv.lightmap_pack"
bl_label = "Lightmap Pack"
diff --git a/release/scripts/startup/bl_operators/uvcalc_smart_project.py b/release/scripts/startup/bl_operators/uvcalc_smart_project.py
index 42170ff3e36..76f965f4a22 100644
--- a/release/scripts/startup/bl_operators/uvcalc_smart_project.py
+++ b/release/scripts/startup/bl_operators/uvcalc_smart_project.py
@@ -24,7 +24,6 @@ from bpy.types import Operator
DEG_TO_RAD = 0.017453292519943295 # pi/180.0
SMALL_NUM = 0.0000001 # see bug [#31598] why we dont have smaller values
-BIG_NUM = 1e15
global USER_FILL_HOLES
global USER_FILL_HOLES_QUALITY
@@ -233,111 +232,17 @@ def islandIntersectUvIsland(source, target, SourceOffset):
return 0 # NO INTERSECTION
-
-
-# Returns the X/y Bounds of a list of vectors.
-def testNewVecLs2DRotIsBetter(vecs, mat=-1, bestAreaSoFar = -1):
-
- # UV's will never extend this far.
- minx = miny = BIG_NUM
- maxx = maxy = -BIG_NUM
-
- for i, v in enumerate(vecs):
-
- # Do this along the way
- if mat != -1:
- v = vecs[i] = mat * v
- x= v.x
- y= v.y
- if x<minx: minx= x
- if y<miny: miny= y
- if x>maxx: maxx= x
- if y>maxy: maxy= y
-
- # Specific to this algo, bail out if we get bigger then the current area
- if bestAreaSoFar != -1 and (maxx-minx) * (maxy-miny) > bestAreaSoFar:
- return (BIG_NUM, None), None
- w = maxx-minx
- h = maxy-miny
- return (w*h, w,h), vecs # Area, vecs
-
def optiRotateUvIsland(faces):
- global currentArea
-
- # Best-fit Rotation
- def best2dRotation(uvVecs, MAT1, MAT2):
- global currentArea
-
- newAreaPos, newfaceProjectionGroupListPos =\
- testNewVecLs2DRotIsBetter(uvVecs[:], MAT1, currentArea[0])
-
-
- # Why do I use newpos here? May as well give the best area to date for an early bailout
- # some slight speed increase in this.
- # If the new rotation is smaller then the existing, we can
- # avoid copying a list and overwrite the old, crappy one.
-
- if newAreaPos[0] < currentArea[0]:
- newAreaNeg, newfaceProjectionGroupListNeg =\
- testNewVecLs2DRotIsBetter(uvVecs, MAT2, newAreaPos[0]) # Reuse the old bigger list.
- else:
- newAreaNeg, newfaceProjectionGroupListNeg =\
- testNewVecLs2DRotIsBetter(uvVecs[:], MAT2, currentArea[0]) # Cant reuse, make a copy.
-
-
- # Now from the 3 options we need to discover which to use
- # we have cerrentArea/newAreaPos/newAreaNeg
- bestArea = min(currentArea[0], newAreaPos[0], newAreaNeg[0])
-
- if currentArea[0] == bestArea:
- return uvVecs
- elif newAreaPos[0] == bestArea:
- uvVecs = newfaceProjectionGroupListPos
- currentArea = newAreaPos
- elif newAreaNeg[0] == bestArea:
- uvVecs = newfaceProjectionGroupListNeg
- currentArea = newAreaNeg
-
- return uvVecs
-
-
- # Serialized UV coords to Vectors
- uvVecs = [uv for f in faces for uv in f.uv]
-
- # Theres a small enough number of these to hard code it
- # rather then a loop.
-
- # Will not modify anything
- currentArea, dummy =\
- testNewVecLs2DRotIsBetter(uvVecs)
-
-
- # Try a 45d rotation
- newAreaPos, newfaceProjectionGroupListPos = testNewVecLs2DRotIsBetter(uvVecs[:], ROTMAT_2D_POS_45D, currentArea[0])
-
- if newAreaPos[0] < currentArea[0]:
- uvVecs = newfaceProjectionGroupListPos
- currentArea = newAreaPos
- # 45d done
-
- # Testcase different rotations and find the one that best fits in a square
- for ROTMAT in RotMatStepRotation:
- uvVecs = best2dRotation(uvVecs, ROTMAT[0], ROTMAT[1])
-
- # Only if you want it, make faces verticle!
- if currentArea[1] > currentArea[2]:
- # Rotate 90d
- # Work directly on the list, no need to return a value.
- testNewVecLs2DRotIsBetter(uvVecs, ROTMAT_2D_POS_90D)
-
-
- # Now write the vectors back to the face UV's
- i = 0 # count the serialized uv/vectors
- for f in faces:
- #f.uv = [uv for uv in uvVecs[i:len(f)+i] ]
- for j, k in enumerate(range(i, len(f.v)+i)):
- f.uv[j][:] = uvVecs[k]
- i += len(f.v)
+ uv_points = [uv for f in faces for uv in f.uv]
+ angle = geometry.box_fit_2d(uv_points)
+
+ if angle != 0.0:
+ mat = Matrix.Rotation(angle, 2)
+ i = 0 # count the serialized uv/vectors
+ for f in faces:
+ for j, k in enumerate(range(i, len(f.v) + i)):
+ f.uv[j][:] = mat * uv_points[k]
+ i += len(f.v)
# Takes an island list and tries to find concave, hollow areas to pack smaller islands into.
diff --git a/release/scripts/startup/bl_operators/view3d.py b/release/scripts/startup/bl_operators/view3d.py
index e0b5526e220..27d2a2361a1 100644
--- a/release/scripts/startup/bl_operators/view3d.py
+++ b/release/scripts/startup/bl_operators/view3d.py
@@ -62,7 +62,8 @@ class VIEW3D_OT_edit_mesh_extrude_move(Operator):
bl_label = "Extrude and Move on Normals"
bl_idname = "view3d.edit_mesh_extrude_move_normal"
- def execute(self, context):
+ @staticmethod
+ def extrude_region(context, use_vert_normals):
mesh = context.object.data
totface = mesh.total_face_sel
@@ -70,10 +71,15 @@ class VIEW3D_OT_edit_mesh_extrude_move(Operator):
#~ totvert = mesh.total_vert_sel
if totface >= 1:
- bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN',
- TRANSFORM_OT_translate={
- "constraint_orientation": 'NORMAL',
- "constraint_axis": (False, False, True)})
+ if use_vert_normals:
+ bpy.ops.mesh.extrude_region_shrink_fatten('INVOKE_REGION_WIN',
+ TRANSFORM_OT_shrink_fatten={})
+ else:
+ bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN',
+ TRANSFORM_OT_translate={
+ "constraint_orientation": 'NORMAL',
+ "constraint_axis": (False, False, True)})
+
elif totedge == 1:
bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN',
TRANSFORM_OT_translate={
@@ -88,6 +94,22 @@ class VIEW3D_OT_edit_mesh_extrude_move(Operator):
# and cause this one not to be freed. [#24671]
return {'FINISHED'}
+ def execute(self, context):
+ return VIEW3D_OT_edit_mesh_extrude_move.extrude_region(context, False)
+
+ def invoke(self, context, event):
+ return self.execute(context)
+
+
+
+class VIEW3D_OT_edit_mesh_extrude_shrink_fatten(Operator):
+ "Extrude and move along individual normals"
+ bl_label = "Extrude and Move on Individual Normals"
+ bl_idname = "view3d.edit_mesh_extrude_move_shrink_fatten"
+
+ def execute(self, context):
+ return VIEW3D_OT_edit_mesh_extrude_move.extrude_region(context, True)
+
def invoke(self, context, event):
return self.execute(context)
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index 63d9aa31ddd..4b954e81ee1 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -498,7 +498,7 @@ class WM_OT_context_menu_enum(Operator):
class WM_OT_context_set_id(Operator):
- """Toggle a context value"""
+ """Set a context value to an ID data-block"""
bl_idname = "wm.context_set_id"
bl_label = "Set Library ID"
bl_options = {'UNDO', 'INTERNAL'}
@@ -903,8 +903,9 @@ class WM_OT_doc_view(Operator):
return {'FINISHED'}
+'''
class WM_OT_doc_edit(Operator):
- """Load online reference docs"""
+ """Edit online reference docs"""
bl_idname = "wm.doc_edit"
bl_label = "Edit Documentation"
@@ -972,6 +973,7 @@ class WM_OT_doc_edit(Operator):
def invoke(self, context, event):
wm = context.window_manager
return wm.invoke_props_dialog(self, width=600)
+'''
rna_path = StringProperty(
@@ -1272,6 +1274,8 @@ class WM_OT_blenderplayer_start(Operator):
import sys
import subprocess
+ gs = context.scene.game_settings
+
# these remain the same every execution
blender_bin_path = bpy.app.binary_path
blender_bin_dir = os.path.dirname(blender_bin_path)
@@ -1286,9 +1290,25 @@ class WM_OT_blenderplayer_start(Operator):
self.report({'ERROR'}, "Player path: %r not found" % player_path)
return {'CANCELLED'}
- filepath = os.path.join(bpy.app.tempdir, "game.blend")
+ filepath = bpy.data.filepath + '~' if bpy.data.is_saved else os.path.join(bpy.app.tempdir, "game.blend")
bpy.ops.wm.save_as_mainfile('EXEC_DEFAULT', filepath=filepath, copy=True)
- subprocess.call([player_path, filepath])
+
+ # start the command line call with the player path
+ args = [player_path]
+
+ # handle some UI options as command line arguments
+ args.extend([
+ "-g", "show_framerate", "=", "%d" % gs.show_framerate_profile,
+ "-g", "show_profile", "=", "%d" % gs.show_framerate_profile,
+ "-g", "show_properties", "=", "%d" % gs.show_debug_properties,
+ "-g", "ignore_deprecation_warnings", "=", "%d" % (not gs.use_deprecation_warnings),
+ ])
+
+ # finish the call with the path to the blend file
+ args.append(filepath)
+
+ subprocess.call(args)
+ os.remove(filepath)
return {'FINISHED'}
@@ -1591,11 +1611,12 @@ class WM_OT_addon_enable(Operator):
info_ver = info.get("blender", (0, 0, 0))
if info_ver > bpy.app.version:
- self.report({'WARNING'}, ("This script was written Blender "
- "version %d.%d.%d and might not "
- "function (correctly), "
- "though it is enabled") %
- info_ver)
+ self.report({'WARNING'},
+ ("This script was written Blender "
+ "version %d.%d.%d and might not "
+ "function (correctly), "
+ "though it is enabled" %
+ info_ver))
return {'FINISHED'}
else:
@@ -1693,6 +1714,19 @@ class WM_OT_theme_install(Operator):
return {'RUNNING_MODAL'}
+class WM_OT_addon_refresh(Operator):
+ "Scan addon directories for new modules"
+ bl_idname = "wm.addon_refresh"
+ bl_label = "Refresh"
+
+ def execute(self, context):
+ import addon_utils
+
+ addon_utils.modules_refresh()
+
+ return {'FINISHED'}
+
+
class WM_OT_addon_install(Operator):
"Install an addon"
bl_idname = "wm.addon_install"
@@ -1762,12 +1796,12 @@ class WM_OT_addon_install(Operator):
self.report({'ERROR'}, "Failed to get addons path")
return {'CANCELLED'}
- # create dir is if missing.
- try:
- os.makedirs(path_addons, exist_ok=True)
- except:
- import traceback
- traceback.print_exc()
+ if not os.path.isdir(path_addons):
+ try:
+ os.makedirs(path_addons, exist_ok=True)
+ except:
+ import traceback
+ traceback.print_exc()
# Check if we are installing from a target path,
# doing so causes 2+ addons of same name or when the same from/to
@@ -1782,7 +1816,7 @@ class WM_OT_addon_install(Operator):
del pyfile_dir
# done checking for exceptional case
- addons_old = {mod.__name__ for mod in addon_utils.modules(addon_utils.addons_fake_modules)}
+ addons_old = {mod.__name__ for mod in addon_utils.modules()}
#check to see if the file is in compressed format (.zip)
if zipfile.is_zipfile(pyfile):
@@ -1825,7 +1859,7 @@ class WM_OT_addon_install(Operator):
traceback.print_exc()
return {'CANCELLED'}
- addons_new = {mod.__name__ for mod in addon_utils.modules(addon_utils.addons_fake_modules)} - addons_old
+ addons_new = {mod.__name__ for mod in addon_utils.modules()} - addons_old
addons_new.discard("modules")
# disable any addons we may have enabled previously and removed.
@@ -1835,7 +1869,7 @@ class WM_OT_addon_install(Operator):
# possible the zip contains multiple addons, we could disallow this
# but for now just use the first
- for mod in addon_utils.modules(addon_utils.addons_fake_modules):
+ for mod in addon_utils.modules(refresh=False):
if mod.__name__ in addons_new:
info = addon_utils.module_bl_info(mod)
@@ -1861,7 +1895,7 @@ class WM_OT_addon_install(Operator):
class WM_OT_addon_remove(Operator):
- "Disable an addon"
+ "Delete the addon from the file system"
bl_idname = "wm.addon_remove"
bl_label = "Remove Addon"
@@ -1875,7 +1909,7 @@ class WM_OT_addon_remove(Operator):
import os
import addon_utils
- for mod in addon_utils.modules(addon_utils.addons_fake_modules):
+ for mod in addon_utils.modules():
if mod.__name__ == module:
filepath = mod.__file__
if os.path.exists(filepath):
@@ -1903,6 +1937,8 @@ class WM_OT_addon_remove(Operator):
else:
os.remove(path)
+ addon_utils.modules_refresh()
+
context.area.tag_redraw()
return {'FINISHED'}
diff --git a/release/scripts/startup/bl_ui/__init__.py b/release/scripts/startup/bl_ui/__init__.py
index b9f2e8406c6..b1b1d0a4d73 100644
--- a/release/scripts/startup/bl_ui/__init__.py
+++ b/release/scripts/startup/bl_ui/__init__.py
@@ -42,6 +42,7 @@ _modules = [
"properties_mask_common",
"properties_material",
"properties_object",
+ "properties_paint_common",
"properties_particle",
"properties_physics_cloth",
"properties_physics_common",
@@ -105,7 +106,7 @@ def register():
items_unique = set()
- for mod in addon_utils.modules(addon_utils.addons_fake_modules):
+ for mod in addon_utils.modules(refresh=False):
info = addon_utils.module_bl_info(mod)
items_unique.add(info["category"])
@@ -142,6 +143,60 @@ def unregister():
# Define a default UIList, when a list does not need any custom drawing...
# Keep in sync with its #defined name in UI_interface.h
class UI_UL_list(bpy.types.UIList):
- pass
+ # These are common filtering or ordering operations (same as the default C ones!).
+ @staticmethod
+ def filter_items_by_name(pattern, bitflag, items, propname="name", flags=None, reverse=False):
+ """
+ Set FILTER_ITEM for items which name matches filter_name one (case-insensitive).
+ pattern is the filtering pattern.
+ propname is the name of the string property to use for filtering.
+ flags must be a list of integers the same length as items, or None!
+ return a list of flags (based on given flags if not None),
+ or an empty list if no flags were given and no filtering has been done.
+ """
+ import fnmatch
+
+ if not pattern or not items: # Empty pattern or list = no filtering!
+ return flags or []
+
+ if flags is None:
+ flags = [0] * len(items)
+
+ # Implicitly add heading/trailing wildcards.
+ pattern = "*" + pattern + "*"
+
+ for i, item in enumerate(items):
+ name = getattr(item, propname, None)
+ # This is similar to a logical xor
+ if bool(name and fnmatch.fnmatchcase(name, pattern)) is not bool(reverse):
+ flags[i] |= bitflag
+ return flags
+
+ @staticmethod
+ def sort_items_helper(sort_data, key, reverse=False):
+ """
+ Common sorting utility. Returns a neworder list mapping org_idx -> new_idx.
+ sort_data must be an (unordered) list of tuples [(org_idx, ...), (org_idx, ...), ...].
+ key must be the same kind of callable you would use for sorted() builtin function.
+ reverse will reverse the sorting!
+ """
+ sort_data.sort(key=key, reverse=reverse)
+ neworder = [None] * len(sort_data)
+ for newidx, (orgidx, *_) in enumerate(sort_data):
+ neworder[orgidx] = newidx
+ return neworder
+
+ @classmethod
+ def sort_items_by_name(cls, items, propname="name"):
+ """
+ Re-order items using their names (case-insensitive).
+ propname is the name of the string property to use for sorting.
+ return a list mapping org_idx -> new_idx,
+ or an empty list if no sorting has been done.
+ """
+ neworder = [None] * len(items)
+ _sort = [(idx, getattr(it, propname, "")) for idx, it in enumerate(items)]
+ return cls.sort_items_helper(_sort, lambda e: e[1].lower())
+
bpy.utils.register_class(UI_UL_list)
diff --git a/release/scripts/startup/bl_ui/properties_constraint.py b/release/scripts/startup/bl_ui/properties_constraint.py
index 07390525132..4ad178bc064 100644
--- a/release/scripts/startup/bl_ui/properties_constraint.py
+++ b/release/scripts/startup/bl_ui/properties_constraint.py
@@ -161,14 +161,14 @@ class ConstraintButtonsPanel():
col = split.column()
row = col.row(align=True)
row.prop(con, "use_location", text="")
- sub = row.row()
+ sub = row.row(align=True)
sub.active = con.use_location
sub.prop(con, "weight", text="Position", slider=True)
col = split.column()
row = col.row(align=True)
row.prop(con, "use_rotation", text="")
- sub = row.row()
+ sub = row.row(align=True)
sub.active = con.use_rotation
sub.prop(con, "orient_weight", text="Rotation", slider=True)
@@ -247,21 +247,21 @@ class ConstraintButtonsPanel():
col = split.column(align=True)
col.prop(con, "use_limit_x")
- sub = col.column()
+ sub = col.column(align=True)
sub.active = con.use_limit_x
sub.prop(con, "min_x", text="Min")
sub.prop(con, "max_x", text="Max")
col = split.column(align=True)
col.prop(con, "use_limit_y")
- sub = col.column()
+ sub = col.column(align=True)
sub.active = con.use_limit_y
sub.prop(con, "min_y", text="Min")
sub.prop(con, "max_y", text="Max")
col = split.column(align=True)
col.prop(con, "use_limit_z")
- sub = col.column()
+ sub = col.column(align=True)
sub.active = con.use_limit_z
sub.prop(con, "min_z", text="Min")
sub.prop(con, "max_z", text="Max")
@@ -577,21 +577,21 @@ class ConstraintButtonsPanel():
col = split.column(align=True)
col.prop(con, "use_limit_x", text="X")
- sub = col.column()
+ sub = col.column(align=True)
sub.active = con.use_limit_x
sub.prop(con, "limit_min_x", text="Min")
sub.prop(con, "limit_max_x", text="Max")
col = split.column(align=True)
col.prop(con, "use_limit_y", text="Y")
- sub = col.column()
+ sub = col.column(align=True)
sub.active = con.use_limit_y
sub.prop(con, "limit_min_y", text="Min")
sub.prop(con, "limit_max_y", text="Max")
col = split.column(align=True)
col.prop(con, "use_limit_z", text="Z")
- sub = col.column()
+ sub = col.column(align=True)
sub.active = con.use_limit_z
sub.prop(con, "limit_min_z", text="Min")
sub.prop(con, "limit_max_z", text="Max")
@@ -600,21 +600,21 @@ class ConstraintButtonsPanel():
col = split.column(align=True)
col.prop(con, "use_angular_limit_x", text="Angle X")
- sub = col.column()
+ sub = col.column(align=True)
sub.active = con.use_angular_limit_x
sub.prop(con, "limit_angle_min_x", text="Min")
sub.prop(con, "limit_angle_max_x", text="Max")
col = split.column(align=True)
col.prop(con, "use_angular_limit_y", text="Angle Y")
- sub = col.column()
+ sub = col.column(align=True)
sub.active = con.use_angular_limit_y
sub.prop(con, "limit_angle_min_y", text="Min")
sub.prop(con, "limit_angle_max_y", text="Max")
col = split.column(align=True)
col.prop(con, "use_angular_limit_z", text="Angle Z")
- sub = col.column()
+ sub = col.column(align=True)
sub.active = con.use_angular_limit_z
sub.prop(con, "limit_angle_min_z", text="Min")
sub.prop(con, "limit_angle_max_z", text="Max")
@@ -726,9 +726,12 @@ class ConstraintButtonsPanel():
if con.shrinkwrap_type == 'PROJECT':
row = layout.row(align=True)
- row.prop(con, "use_x")
- row.prop(con, "use_y")
- row.prop(con, "use_z")
+ row.prop(con, "project_axis", expand=True)
+ split = layout.split(percentage=0.4)
+ split.label(text="Axis Space:")
+ rowsub = split.row()
+ rowsub.prop(con, "project_axis_space", text="")
+ layout.prop(con, "project_limit")
def DAMPED_TRACK(self, context, layout, con):
self.target_template(layout, con)
diff --git a/release/scripts/startup/bl_ui/properties_data_armature.py b/release/scripts/startup/bl_ui/properties_data_armature.py
index 74f33170384..a274453a472 100644
--- a/release/scripts/startup/bl_ui/properties_data_armature.py
+++ b/release/scripts/startup/bl_ui/properties_data_armature.py
@@ -121,9 +121,9 @@ class DATA_PT_bone_groups(ArmatureButtonsPanel, Panel):
row = layout.row()
- rows = 2
+ rows = 1
if group:
- rows = 5
+ rows = 4
row.template_list("UI_UL_list", "bone_groups", pose, "bone_groups", pose.bone_groups, "active_index", rows=rows)
col = row.column(align=True)
@@ -136,7 +136,6 @@ class DATA_PT_bone_groups(ArmatureButtonsPanel, Panel):
col.operator("pose.group_move", icon='TRIA_UP', text="").direction = 'UP'
col.operator("pose.group_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
- if group:
col = layout.column()
col.active = (ob.proxy is None)
col.prop(group, "name")
@@ -185,7 +184,7 @@ class DATA_PT_pose_library(ArmatureButtonsPanel, Panel):
# list of poses in pose library
row = layout.row()
row.template_list("UI_UL_list", "pose_markers", poselib, "pose_markers",
- poselib.pose_markers, "active_index", rows=5)
+ poselib.pose_markers, "active_index", rows=3)
# column of operators for active pose
# - goes beside list
@@ -211,7 +210,7 @@ class DATA_PT_pose_library(ArmatureButtonsPanel, Panel):
layout.prop(pose_marker_active, "name")
-# TODO: this panel will soon be deprecated deprecated too
+# TODO: this panel will soon be deprecated too
class DATA_PT_ghost(ArmatureButtonsPanel, Panel):
bl_label = "Ghost"
diff --git a/release/scripts/startup/bl_ui/properties_data_bone.py b/release/scripts/startup/bl_ui/properties_data_bone.py
index a8954a1c33e..4e36065422d 100644
--- a/release/scripts/startup/bl_ui/properties_data_bone.py
+++ b/release/scripts/startup/bl_ui/properties_data_bone.py
@@ -127,12 +127,15 @@ class BONE_PT_transform_locks(BoneButtonsPanel, Panel):
col.label(text="Y:")
col.label(text="Z:")
- col = split.row()
- sub = col.row()
- sub.active = not (bone.parent and bone.use_connect)
- sub.column().prop(pchan, "lock_location", text="Location")
- col.column().prop(pchan, "lock_rotation", text="Rotation")
- col.column().prop(pchan, "lock_scale", text="Scale")
+ col = split.column()
+ col.active = not (bone.parent and bone.use_connect)
+ col.prop(pchan, "lock_location", text="Location")
+
+ col = split.column()
+ col.prop(pchan, "lock_rotation", text="Rotation")
+
+ col = split.column()
+ col.prop(pchan, "lock_scale", text="Scale")
if pchan.rotation_mode in {'QUATERNION', 'AXIS_ANGLE'}:
row = layout.row()
diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py b/release/scripts/startup/bl_ui/properties_data_camera.py
index c74560e14ac..38f04639edd 100644
--- a/release/scripts/startup/bl_ui/properties_data_camera.py
+++ b/release/scripts/startup/bl_ui/properties_data_camera.py
@@ -142,10 +142,10 @@ class DATA_PT_camera(CameraButtonsPanel, Panel):
if cam.sensor_fit == 'AUTO':
col.prop(cam, "sensor_width", text="Size")
else:
- sub = col.column()
+ sub = col.column(align=True)
sub.active = cam.sensor_fit == 'HORIZONTAL'
sub.prop(cam, "sensor_width", text="Width")
- sub = col.column()
+ sub = col.column(align=True)
sub.active = cam.sensor_fit == 'VERTICAL'
sub.prop(cam, "sensor_height", text="Height")
diff --git a/release/scripts/startup/bl_ui/properties_data_curve.py b/release/scripts/startup/bl_ui/properties_data_curve.py
index 117a662cd07..5269d151bdc 100644
--- a/release/scripts/startup/bl_ui/properties_data_curve.py
+++ b/release/scripts/startup/bl_ui/properties_data_curve.py
@@ -306,6 +306,10 @@ class DATA_PT_font(CurveButtonsPanel, Panel):
row.template_ID(text, "font_bold_italic", open="font.open", unlink="font.unlink")
#layout.prop(text, "font")
+
+ row = layout.split(percentage=0.25)
+ row.label(text="Body Text:")
+ row.prop(text, "body", text="")
split = layout.split()
diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py
index b5461c45433..e8d0bec6524 100644
--- a/release/scripts/startup/bl_ui/properties_data_mesh.py
+++ b/release/scripts/startup/bl_ui/properties_data_mesh.py
@@ -81,7 +81,7 @@ class MESH_UL_shape_keys(UIList):
if self.layout_type in {'DEFAULT', 'COMPACT'}:
split = layout.split(0.66, False)
split.label(text=item.name, translate=False, icon_value=icon)
- row = split.row(True)
+ row = split.row(align=True)
if key_block.mute or (obj.mode == 'EDIT' and not (obj.use_shape_key_edit_mode and obj.type == 'MESH')):
row.active = False
if not item.relative_key or index > 0:
@@ -191,9 +191,9 @@ class DATA_PT_vertex_groups(MeshButtonsPanel, Panel):
ob = context.object
group = ob.vertex_groups.active
- rows = 2
+ rows = 1
if group:
- rows = 5
+ rows = 4
row = layout.row()
row.template_list("MESH_UL_vgroups", "", ob, "vertex_groups", ob.vertex_groups, "active_index", rows=rows)
@@ -207,7 +207,6 @@ class DATA_PT_vertex_groups(MeshButtonsPanel, Panel):
col.operator("object.vertex_group_move", icon='TRIA_UP', text="").direction = 'UP'
col.operator("object.vertex_group_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
- if group:
row = layout.row()
row.prop(group, "name")
@@ -251,9 +250,9 @@ class DATA_PT_shape_keys(MeshButtonsPanel, Panel):
row = layout.row()
- rows = 2
+ rows = 1
if kb:
- rows = 5
+ rows = 4
row.template_list("MESH_UL_shape_keys", "", key, "key_blocks", ob, "active_shape_key_index", rows=rows)
col = row.column()
@@ -330,17 +329,17 @@ class DATA_PT_uv_texture(MeshButtonsPanel, Panel):
layout = self.layout
me = context.mesh
+ lay = me.uv_textures.active
row = layout.row()
col = row.column()
- col.template_list("MESH_UL_uvmaps_vcols", "uvmaps", me, "uv_textures", me.uv_textures, "active_index", rows=2)
+ col.template_list("MESH_UL_uvmaps_vcols", "uvmaps", me, "uv_textures", me.uv_textures, "active_index", rows=1)
col = row.column(align=True)
col.operator("mesh.uv_texture_add", icon='ZOOMIN', text="")
col.operator("mesh.uv_texture_remove", icon='ZOOMOUT', text="")
-
- lay = me.uv_textures.active
+
if lay:
layout.prop(lay, "name")
@@ -353,17 +352,17 @@ class DATA_PT_vertex_colors(MeshButtonsPanel, Panel):
layout = self.layout
me = context.mesh
+ lay = me.vertex_colors.active
row = layout.row()
col = row.column()
- col.template_list("MESH_UL_uvmaps_vcols", "vcols", me, "vertex_colors", me.vertex_colors, "active_index", rows=2)
+ col.template_list("MESH_UL_uvmaps_vcols", "vcols", me, "vertex_colors", me.vertex_colors, "active_index", rows=1)
col = row.column(align=True)
col.operator("mesh.vertex_color_add", icon='ZOOMIN', text="")
col.operator("mesh.vertex_color_remove", icon='ZOOMOUT', text="")
-
- lay = me.vertex_colors.active
+
if lay:
layout.prop(lay, "name")
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index 861d64382ef..9bfc14f1f28 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -670,13 +670,17 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
col = split.column()
col.prop(md, "offset")
- col.prop(md, "subsurf_levels")
col = split.column()
col.label(text="Mode:")
col.prop(md, "wrap_method", text="")
if md.wrap_method == 'PROJECT':
+ split = layout.split()
+ col = split.column()
+ col.prop(md, "subsurf_levels")
+ col = split.column()
+
col.prop(md, "project_limit", text="Limit")
split = layout.split(percentage=0.25)
@@ -780,7 +784,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
sub = col.column()
row = sub.split(align=True, percentage=0.4)
row.prop(md, "material_offset", text="")
- row = row.row()
+ row = row.row(align=True)
row.active = md.use_rim
row.prop(md, "material_offset_rim", text="Rim")
diff --git a/release/scripts/startup/bl_ui/properties_freestyle.py b/release/scripts/startup/bl_ui/properties_freestyle.py
index eec753e1d04..a57567ae79e 100644
--- a/release/scripts/startup/bl_ui/properties_freestyle.py
+++ b/release/scripts/startup/bl_ui/properties_freestyle.py
@@ -178,7 +178,7 @@ class RENDERLAYER_PT_freestyle_lineset(RenderLayerFreestyleEditorButtonsPanel, P
# draw edge type buttons
row = box.row(align=True)
row.prop(lineset, select_edge_type)
- sub = row.column()
+ sub = row.column(align=True)
sub.prop(lineset, exclude_edge_type, text="")
sub.active = getattr(lineset, select_edge_type)
@@ -193,7 +193,7 @@ class RENDERLAYER_PT_freestyle_lineset(RenderLayerFreestyleEditorButtonsPanel, P
layout.active = rl.use_freestyle
row = layout.row()
- rows = 5 if lineset else 2
+ rows = 4 if lineset else 1
row.template_list("RENDERLAYER_UL_linesets", "", freestyle, "linesets", freestyle.linesets, "active_index", rows=rows)
sub = row.column(align=True)
@@ -530,6 +530,8 @@ class RENDERLAYER_PT_freestyle_linestyle(RenderLayerFreestyleEditorButtonsPanel,
linestyle = lineset.linestyle
layout.template_ID(lineset, "linestyle", new="scene.freestyle_linestyle_new")
+ if linestyle is None:
+ return
row = layout.row(align=True)
row.prop(linestyle, "panel", expand=True)
if linestyle.panel == 'STROKES':
@@ -576,7 +578,7 @@ class RENDERLAYER_PT_freestyle_linestyle(RenderLayerFreestyleEditorButtonsPanel,
# End of columns
row = layout.row(align=True)
row.prop(linestyle, "use_split_pattern", text="")
- sub = row.row()
+ sub = row.row(align=True)
sub.active = linestyle.use_split_pattern
sub.prop(linestyle, "split_dash1", text="D1")
sub.prop(linestyle, "split_gap1", text="G1")
@@ -612,7 +614,7 @@ class RENDERLAYER_PT_freestyle_linestyle(RenderLayerFreestyleEditorButtonsPanel,
layout.label(text="Dashed Line:")
row = layout.row(align=True)
row.prop(linestyle, "use_dashed_line", text="")
- sub = row.row()
+ sub = row.row(align=True)
sub.active = linestyle.use_dashed_line
sub.prop(linestyle, "dash1", text="D1")
sub.prop(linestyle, "gap1", text="G1")
diff --git a/release/scripts/startup/bl_ui/properties_game.py b/release/scripts/startup/bl_ui/properties_game.py
index 025d86204f2..3470c9577af 100644
--- a/release/scripts/startup/bl_ui/properties_game.py
+++ b/release/scripts/startup/bl_ui/properties_game.py
@@ -290,7 +290,9 @@ class RENDER_PT_game_player(RenderButtonsPanel, Panel):
COMPAT_ENGINES = {'BLENDER_GAME'}
def draw(self, context):
+ import sys
layout = self.layout
+ not_osx = sys.platform != "darwin"
gs = context.scene.game_settings
@@ -301,14 +303,17 @@ class RENDER_PT_game_player(RenderButtonsPanel, Panel):
row = layout.row()
row.label(text="Resolution:")
row = layout.row(align=True)
+ row.active = not_osx or not gs.show_fullscreen
row.prop(gs, "resolution_x", slider=False, text="X")
row.prop(gs, "resolution_y", slider=False, text="Y")
row = layout.row()
col = row.column()
col.prop(gs, "show_fullscreen")
- col = row.column()
- col.prop(gs, "use_desktop")
- col.active = gs.show_fullscreen
+
+ if not_osx:
+ col = row.column()
+ col.prop(gs, "use_desktop")
+ col.active = gs.show_fullscreen
col = layout.column()
col.label(text="Quality:")
diff --git a/release/scripts/startup/bl_ui/properties_mask_common.py b/release/scripts/startup/bl_ui/properties_mask_common.py
index 728f11f2de1..579637e6be6 100644
--- a/release/scripts/startup/bl_ui/properties_mask_common.py
+++ b/release/scripts/startup/bl_ui/properties_mask_common.py
@@ -31,10 +31,8 @@ class MASK_UL_layers(UIList):
# assert(isinstance(item, bpy.types.MaskLayer)
mask = item
if self.layout_type in {'DEFAULT', 'COMPACT'}:
- split = layout.split()
- split.label(text=mask.name, translate=False, icon_value=icon)
- row = split.row(align=True)
- row.prop(mask, "alpha", text="", emboss=False)
+ layout.label(text=mask.name, translate=False, icon_value=icon)
+ row = layout.row(align=True)
row.prop(mask, "hide", text="", emboss=False)
row.prop(mask, "hide_select", text="", emboss=False)
row.prop(mask, "hide_render", text="", emboss=False)
@@ -84,7 +82,7 @@ class MASK_PT_layers:
mask = sc.mask
active_layer = mask.layers.active
- rows = 5 if active_layer else 2
+ rows = 4 if active_layer else 1
row = layout.row()
row.template_list("MASK_UL_layers", "", mask, "layers",
@@ -98,11 +96,8 @@ class MASK_PT_layers:
if active_layer:
sub.separator()
- props = sub.operator("mask.layer_move", icon='TRIA_UP', text="")
- props.direction = 'UP'
-
- props = sub.operator("mask.layer_move", icon='TRIA_DOWN', text="")
- props.direction = 'DOWN'
+ sub.operator("mask.layer_move", icon='TRIA_UP', text="").direction = 'UP'
+ sub.operator("mask.layer_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
layout.prop(active_layer, "name")
@@ -227,6 +222,11 @@ class MASK_PT_display():
layout.prop(space_data, "mask_draw_type", text="")
layout.prop(space_data, "show_mask_smooth")
+ layout.prop(space_data, "show_mask_overlay")
+ row = layout.row()
+ row.active = space_data.show_mask_overlay
+ row.prop(space_data, "mask_overlay_mode", text="")
+
class MASK_PT_tools():
# subclasses must define...
@@ -247,8 +247,7 @@ class MASK_PT_tools():
col.operator("transform.translate")
col.operator("transform.rotate")
col.operator("transform.resize", text="Scale")
- props = col.operator("transform.transform", text="Scale Feather")
- props.mode = 'MASK_SHRINKFATTEN'
+ col.operator("transform.transform", text="Scale Feather").mode = 'MASK_SHRINKFATTEN'
col = layout.column(align=True)
col.label(text="Spline:")
@@ -303,9 +302,7 @@ class MASK_MT_visibility(Menu):
layout.operator("mask.hide_view_clear", text="Show Hidden")
layout.operator("mask.hide_view_set", text="Hide Selected")
-
- props = layout.operator("mask.hide_view_set", text="Hide Unselected")
- props.unselected = True
+ layout.operator("mask.hide_view_set", text="Hide Unselected").unselected = True
class MASK_MT_transform(Menu):
@@ -317,8 +314,7 @@ class MASK_MT_transform(Menu):
layout.operator("transform.translate")
layout.operator("transform.rotate")
layout.operator("transform.resize")
- props = layout.operator("transform.transform", text="Scale Feather")
- props.mode = 'MASK_SHRINKFATTEN'
+ layout.operator("transform.transform", text="Scale Feather").mode = 'MASK_SHRINKFATTEN'
class MASK_MT_animation(Menu):
diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py
index 9a3957fe353..344074c5893 100644
--- a/release/scripts/startup/bl_ui/properties_material.py
+++ b/release/scripts/startup/bl_ui/properties_material.py
@@ -124,7 +124,7 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel, Panel):
if ob:
row = layout.row()
- row.template_list("MATERIAL_UL_matslots", "", ob, "material_slots", ob, "active_material_index", rows=2)
+ row.template_list("MATERIAL_UL_matslots", "", ob, "material_slots", ob, "active_material_index", rows=1)
col = row.column(align=True)
col.operator("object.material_slot_add", icon='ZOOMIN', text="")
@@ -518,7 +518,7 @@ class MATERIAL_PT_sss(MaterialButtonsPanel, Panel):
layout.active = (sss.use) and (not mat.use_shadeless)
row = layout.row().split()
- sub = row.row(align=True).split(percentage=0.75)
+ sub = row.row(align=True).split(align=True, percentage=0.75)
sub.menu("MATERIAL_MT_sss_presets", text=bpy.types.MATERIAL_MT_sss_presets.bl_label)
sub.operator("material.sss_preset_add", text="", icon='ZOOMIN')
sub.operator("material.sss_preset_add", text="", icon='ZOOMOUT').remove_active = True
@@ -562,7 +562,7 @@ class MATERIAL_PT_halo(MaterialButtonsPanel, Panel):
def number_but(layout, toggle, number, name, color):
row = layout.row(align=True)
row.prop(halo, toggle, text="")
- sub = row.column()
+ sub = row.column(align=True)
sub.active = getattr(halo, toggle)
sub.prop(halo, number, text=name, translate=False)
if not color == "":
@@ -770,7 +770,7 @@ class MATERIAL_PT_options(MaterialButtonsPanel, Panel):
sub = col.column(align=True)
sub.label(text="Light Group:")
sub.prop(mat, "light_group", text="")
- row = sub.row()
+ row = sub.row(align=True)
row.active = bool(mat.light_group)
row.prop(mat, "use_light_group_exclusive", text="Exclusive")
row.prop(mat, "use_light_group_local", text="Local")
diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py
index ec2492f7365..6b317c49487 100644
--- a/release/scripts/startup/bl_ui/properties_object.py
+++ b/release/scripts/startup/bl_ui/properties_object.py
@@ -112,10 +112,9 @@ class OBJECT_PT_transform_locks(ObjectButtonsPanel, Panel):
col.label(text="Y:")
col.label(text="Z:")
- col = split.row()
- col.column().prop(ob, "lock_location", text="Location")
- col.column().prop(ob, "lock_rotation", text="Rotation")
- col.column().prop(ob, "lock_scale", text="Scale")
+ split.column().prop(ob, "lock_location", text="Location")
+ split.column().prop(ob, "lock_rotation", text="Rotation")
+ split.column().prop(ob, "lock_scale", text="Scale")
if ob.rotation_mode in {'QUATERNION', 'AXIS_ANGLE'}:
row = layout.row()
diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py
index b3335f32231..e27d80bc8c3 100644
--- a/release/scripts/startup/bl_ui/properties_paint_common.py
+++ b/release/scripts/startup/bl_ui/properties_paint_common.py
@@ -45,8 +45,9 @@ class UnifiedPaintPanel():
def unified_paint_settings(parent, context):
ups = context.tool_settings.unified_paint_settings
parent.label(text="Unified Settings:")
- parent.prop(ups, "use_unified_size", text="Size")
- parent.prop(ups, "use_unified_strength", text="Strength")
+ row = parent.row()
+ row.prop(ups, "use_unified_size", text="Size")
+ row.prop(ups, "use_unified_strength", text="Strength")
if context.weight_paint_object:
parent.prop(ups, "use_unified_weight", text="Weight")
@@ -133,13 +134,12 @@ def brush_mask_texture_settings(layout, brush):
layout.operator("brush.stencil_fit_image_aspect").mask = True
layout.operator("brush.stencil_reset_transform").mask = True
- if brush.mask_texture:
- col = layout.column()
- col.label(text="Angle:")
- col.active = brush.brush_capabilities.has_texture_angle
- col.prop(mask_tex_slot, "angle", text="")
+ col = layout.column()
+ col.label(text="Angle:")
+ col.active = brush.brush_capabilities.has_texture_angle
+ col.prop(mask_tex_slot, "angle", text="")
- # scale and offset
- split = layout.split()
- split.prop(mask_tex_slot, "offset")
- split.prop(mask_tex_slot, "scale")
+ # scale and offset
+ split = layout.split()
+ split.prop(mask_tex_slot, "offset")
+ split.prop(mask_tex_slot, "scale")
diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py
index 931b47896a6..4d5d3e6936a 100644
--- a/release/scripts/startup/bl_ui/properties_particle.py
+++ b/release/scripts/startup/bl_ui/properties_particle.py
@@ -98,7 +98,7 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel):
row = layout.row()
row.template_list("UI_UL_list", "particle_systems", ob, "particle_systems",
- ob.particle_systems, "active_index", rows=2)
+ ob.particle_systems, "active_index", rows=1)
col = row.column(align=True)
col.operator("object.particle_system_add", icon='ZOOMIN', text="")
@@ -211,12 +211,12 @@ class PARTICLE_PT_emission(ParticleButtonsPanel, Panel):
row.active = part.distribution != 'GRID'
row.prop(part, "count")
- if part.type == 'HAIR' and not part.use_advanced_hair:
+ if part.type == 'HAIR':
row.prop(part, "hair_length")
-
- row = layout.row()
- row.prop(part, "use_modifier_stack")
- return
+ if not part.use_advanced_hair:
+ row = layout.row()
+ row.prop(part, "use_modifier_stack")
+ return
if part.type != 'HAIR':
split = layout.split()
@@ -599,20 +599,18 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel):
split = layout.split()
- sub = split.column()
- col = sub.column(align=True)
+ col = split.column(align=True)
col.active = boids.use_flight
col.prop(boids, "air_speed_max")
col.prop(boids, "air_speed_min", slider=True)
col.prop(boids, "air_acc_max", slider=True)
col.prop(boids, "air_ave_max", slider=True)
col.prop(boids, "air_personal_space")
- row = col.row()
+ row = col.row(align=True)
row.active = (boids.use_land or boids.use_climb) and boids.use_flight
row.prop(boids, "land_smooth")
- sub = split.column()
- col = sub.column(align=True)
+ col = split.column(align=True)
col.active = boids.use_land or boids.use_climb
col.prop(boids, "land_speed_max")
col.prop(boids, "land_jump_speed")
@@ -621,9 +619,9 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel):
col.prop(boids, "land_personal_space")
col.prop(boids, "land_stick_force")
- row = layout.row()
+ split = layout.split()
- col = row.column(align=True)
+ col = split.column(align=True)
col.label(text="Battle:")
col.prop(boids, "health")
col.prop(boids, "strength")
@@ -631,7 +629,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel):
col.prop(boids, "accuracy")
col.prop(boids, "range")
- col = row.column()
+ col = split.column()
col.label(text="Misc:")
col.prop(boids, "bank", slider=True)
col.prop(boids, "pitch", slider=True)
@@ -644,7 +642,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel):
layout.label(text="Fluid interaction:")
row = layout.row()
- row.template_list("UI_UL_list", "particle_targets", psys, "targets", psys, "active_particle_target_index")
+ row.template_list("UI_UL_list", "particle_targets", psys, "targets", psys, "active_particle_target_index", rows=4)
col = row.column()
sub = col.row()
@@ -732,7 +730,7 @@ class PARTICLE_PT_boidbrain(ParticleButtonsPanel, Panel):
row.label(text="")
row = layout.row()
- row.template_list("UI_UL_list", "particle_boids_rules", state, "rules", state, "active_boid_rule_index")
+ row.template_list("UI_UL_list", "particle_boids_rules", state, "rules", state, "active_boid_rule_index", rows=4)
col = row.column()
sub = col.row()
@@ -1037,7 +1035,7 @@ class PARTICLE_PT_draw(ParticleButtonsPanel, Panel):
col = row.column(align=True)
col.label(text="Color:")
col.prop(part, "draw_color", text="")
- sub = col.row()
+ sub = col.row(align=True)
sub.active = (part.draw_color in {'VELOCITY', 'ACCELERATION'})
sub.prop(part, "color_maximum", text="Max")
@@ -1139,10 +1137,9 @@ class PARTICLE_PT_children(ParticleButtonsPanel, Panel):
sub.prop(part, "kink_amplitude")
sub.prop(part, "kink_amplitude_clump", text="Clump", slider=True)
col.prop(part, "kink_flat", slider=True)
- col = split.column()
- sub = col.column(align=True)
- sub.prop(part, "kink_frequency")
- sub.prop(part, "kink_shape", slider=True)
+ col = split.column(align=True)
+ col.prop(part, "kink_frequency")
+ col.prop(part, "kink_shape", slider=True)
class PARTICLE_PT_field_weights(ParticleButtonsPanel, Panel):
@@ -1217,28 +1214,34 @@ class PARTICLE_PT_vertexgroups(ParticleButtonsPanel, Panel):
ob = context.object
psys = context.particle_system
- split = layout.split(percentage=0.85)
-
- col = split.column()
- col.label(text="Vertex Group:")
- col.prop_search(psys, "vertex_group_density", ob, "vertex_groups", text="Density")
- col.prop_search(psys, "vertex_group_length", ob, "vertex_groups", text="Length")
- col.prop_search(psys, "vertex_group_clump", ob, "vertex_groups", text="Clump")
- col.prop_search(psys, "vertex_group_kink", ob, "vertex_groups", text="Kink")
- col.prop_search(psys, "vertex_group_roughness_1", ob, "vertex_groups", text="Roughness 1")
- col.prop_search(psys, "vertex_group_roughness_2", ob, "vertex_groups", text="Roughness 2")
- col.prop_search(psys, "vertex_group_roughness_end", ob, "vertex_groups", text="Roughness End")
-
- col = split.column()
- col.label(text="Negate:")
- col.alignment = 'RIGHT'
- col.prop(psys, "invert_vertex_group_density", text="")
- col.prop(psys, "invert_vertex_group_length", text="")
- col.prop(psys, "invert_vertex_group_clump", text="")
- col.prop(psys, "invert_vertex_group_kink", text="")
- col.prop(psys, "invert_vertex_group_roughness_1", text="")
- col.prop(psys, "invert_vertex_group_roughness_2", text="")
- col.prop(psys, "invert_vertex_group_roughness_end", text="")
+ col = layout.column()
+ row = col.row(align=True)
+ row.prop_search(psys, "vertex_group_density", ob, "vertex_groups", text="Density")
+ row.prop(psys, "invert_vertex_group_density", text="", toggle=True, icon='ARROW_LEFTRIGHT')
+
+ row = col.row(align=True)
+ row.prop_search(psys, "vertex_group_length", ob, "vertex_groups", text="Length")
+ row.prop(psys, "invert_vertex_group_length", text="", toggle=True, icon='ARROW_LEFTRIGHT')
+
+ row = col.row(align=True)
+ row.prop_search(psys, "vertex_group_clump", ob, "vertex_groups", text="Clump")
+ row.prop(psys, "invert_vertex_group_clump", text="", toggle=True, icon='ARROW_LEFTRIGHT')
+
+ row = col.row(align=True)
+ row.prop_search(psys, "vertex_group_kink", ob, "vertex_groups", text="Kink")
+ row.prop(psys, "invert_vertex_group_kink", text="", toggle=True, icon='ARROW_LEFTRIGHT')
+
+ row = col.row(align=True)
+ row.prop_search(psys, "vertex_group_roughness_1", ob, "vertex_groups", text="Roughness 1")
+ row.prop(psys, "invert_vertex_group_roughness_1", text="", toggle=True, icon='ARROW_LEFTRIGHT')
+
+ row = col.row(align=True)
+ row.prop_search(psys, "vertex_group_roughness_2", ob, "vertex_groups", text="Roughness 2")
+ row.prop(psys, "invert_vertex_group_roughness_2", text="", toggle=True, icon='ARROW_LEFTRIGHT')
+
+ row = col.row(align=True)
+ row.prop_search(psys, "vertex_group_roughness_end", ob, "vertex_groups", text="Roughness End")
+ row.prop(psys, "invert_vertex_group_roughness_end", text="", toggle=True, icon='ARROW_LEFTRIGHT')
# Commented out vertex groups don't work and are still waiting for better implementation
# row = layout.row()
diff --git a/release/scripts/startup/bl_ui/properties_physics_common.py b/release/scripts/startup/bl_ui/properties_physics_common.py
index 3d7fe59ff77..4b4c331d2d8 100644
--- a/release/scripts/startup/bl_ui/properties_physics_common.py
+++ b/release/scripts/startup/bl_ui/properties_physics_common.py
@@ -35,23 +35,23 @@ class PhysicButtonsPanel():
def physics_add(self, layout, md, name, type, typeicon, toggles):
- sub = layout.row(align=True)
+ row = layout.row(align=True)
if md:
- sub.context_pointer_set("modifier", md)
- sub.operator("object.modifier_remove", text=name, text_ctxt=i18n_contexts.default, icon='X')
+ row.context_pointer_set("modifier", md)
+ row.operator("object.modifier_remove", text=name, text_ctxt=i18n_contexts.default, icon='X')
if toggles:
- sub.prop(md, "show_render", text="")
- sub.prop(md, "show_viewport", text="")
+ row.prop(md, "show_render", text="")
+ row.prop(md, "show_viewport", text="")
else:
- sub.operator("object.modifier_add", text=name, text_ctxt=i18n_contexts.default, icon=typeicon).type = type
+ row.operator("object.modifier_add", text=name, text_ctxt=i18n_contexts.default, icon=typeicon).type = type
def physics_add_special(self, layout, data, name, addop, removeop, typeicon):
- sub = layout.row(align=True)
+ row = layout.row(align=True)
if data:
- sub.operator(removeop, text=name, text_ctxt=i18n_contexts.default, icon='X')
+ row.operator(removeop, text=name, text_ctxt=i18n_contexts.default, icon='X')
else:
- sub.operator(addop, text=name, text_ctxt=i18n_contexts.default, icon=typeicon)
+ row.operator(addop, text=name, text_ctxt=i18n_contexts.default, icon=typeicon)
class PHYSICS_PT_add(PhysicButtonsPanel, Panel):
@@ -107,7 +107,7 @@ def point_cache_ui(self, context, cache, enabled, cachetype):
if not cachetype == 'RIGID_BODY':
row = layout.row()
row.template_list("UI_UL_list", "point_caches", cache, "point_caches",
- cache.point_caches, "active_index", rows=2)
+ cache.point_caches, "active_index", rows=1)
col = row.column(align=True)
col.operator("ptcache.add", icon='ZOOMIN', text="")
col.operator("ptcache.remove", icon='ZOOMOUT', text="")
@@ -159,6 +159,8 @@ def point_cache_ui(self, context, cache, enabled, cachetype):
if cachetype != 'SMOKE':
layout.label(text=cache.info)
+ can_bake = True
+
if cachetype not in {'SMOKE', 'DYNAMIC_PAINT', 'RIGID_BODY'}:
split = layout.split()
split.enabled = enabled and bpy.data.is_saved
@@ -176,9 +178,18 @@ def point_cache_ui(self, context, cache, enabled, cachetype):
row.label(text="Compression:")
row.prop(cache, "compression", expand=True)
- layout.separator()
+ layout.separator()
+
+ if cache.id_data.library and not cache.use_disk_cache:
+ can_bake = False
+
+ col = layout.column(align=True)
+ col.label(text="Linked object baking requires Disk Cache to be enabled", icon='INFO')
+ else:
+ layout.separator()
split = layout.split()
+ split.active = can_bake
col = split.column()
@@ -301,14 +312,14 @@ def basic_force_field_falloff_ui(self, context, field):
col = split.column()
row = col.row(align=True)
row.prop(field, "use_min_distance", text="")
- sub = row.row()
+ sub = row.row(align=True)
sub.active = field.use_min_distance
sub.prop(field, "distance_min", text="Minimum")
col = split.column()
row = col.row(align=True)
row.prop(field, "use_max_distance", text="")
- sub = row.row()
+ sub = row.row(align=True)
sub.active = field.use_max_distance
sub.prop(field, "distance_max", text="Maximum")
diff --git a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
index 75c4caa57bd..f0c7a532414 100644
--- a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
+++ b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
@@ -80,7 +80,7 @@ class PHYSICS_PT_dynamic_paint(PhysicButtonsPanel, Panel):
row = layout.row()
row.template_list("PHYSICS_UL_dynapaint_surfaces", "", canvas, "canvas_surfaces",
- canvas.canvas_surfaces, "active_index", rows=2)
+ canvas.canvas_surfaces, "active_index", rows=1)
col = row.column(align=True)
col.operator("dpaint.surface_slot_add", icon='ZOOMIN', text="")
diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py
index 1fc61b7714e..7b96d784fed 100644
--- a/release/scripts/startup/bl_ui/properties_physics_fluid.py
+++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py
@@ -246,9 +246,9 @@ class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, Panel):
sub.operator("fluid.preset_add", text="", icon='ZOOMIN')
sub.operator("fluid.preset_add", text="", icon='ZOOMOUT').remove_active = True
- subsub = col.column(align=True)
- subsub.prop(fluid, "viscosity_base", text="Base")
- subsub.prop(fluid, "viscosity_exponent", text="Exponent", slider=True)
+ sub = col.column(align=True)
+ sub.prop(fluid, "viscosity_base", text="Base")
+ sub.prop(fluid, "viscosity_exponent", text="Exponent", slider=True)
col.label(text="Optimization:")
col.prop(fluid, "grid_levels", slider=True)
diff --git a/release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py b/release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py
index 202c1c2506e..dcf63f25079 100644
--- a/release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py
+++ b/release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py
@@ -68,11 +68,11 @@ class PHYSICS_PT_rigid_body_constraint(PHYSICS_PT_rigidbody_constraint_panel, Pa
col = layout.column(align=True)
col.label("Limits:")
- row = col.row()
- sub = row.row()
+ row = col.row(align=True)
+ sub = row.row(align=True)
sub.scale_x = 0.5
sub.prop(rbc, "use_limit_ang_z", toggle=True)
- sub = row.row()
+ sub = row.row(align=True)
sub.active = rbc.use_limit_ang_z
sub.prop(rbc, "limit_ang_z_lower", text="Lower")
sub.prop(rbc, "limit_ang_z_upper", text="Upper")
@@ -81,11 +81,11 @@ class PHYSICS_PT_rigid_body_constraint(PHYSICS_PT_rigidbody_constraint_panel, Pa
col = layout.column(align=True)
col.label("Limits:")
- row = col.row()
- sub = row.row()
+ row = col.row(align=True)
+ sub = row.row(align=True)
sub.scale_x = 0.5
sub.prop(rbc, "use_limit_lin_x", toggle=True)
- sub = row.row()
+ sub = row.row(align=True)
sub.active = rbc.use_limit_lin_x
sub.prop(rbc, "limit_lin_x_lower", text="Lower")
sub.prop(rbc, "limit_lin_x_upper", text="Upper")
@@ -94,22 +94,22 @@ class PHYSICS_PT_rigid_body_constraint(PHYSICS_PT_rigidbody_constraint_panel, Pa
col = layout.column(align=True)
col.label("Limits:")
- row = col.row()
- sub = row.row()
+ row = col.row(align=True)
+ sub = row.row(align=True)
sub.scale_x = 0.5
sub.prop(rbc, "use_limit_lin_x", toggle=True)
- sub = row.row()
+ sub = row.row(align=True)
sub.active = rbc.use_limit_lin_x
sub.prop(rbc, "limit_lin_x_lower", text="Lower")
sub.prop(rbc, "limit_lin_x_upper", text="Upper")
col = layout.column(align=True)
- row = col.row()
- sub = row.row()
+ row = col.row(align=True)
+ sub = row.row(align=True)
sub.scale_x = 0.5
sub.prop(rbc, "use_limit_ang_x", toggle=True)
- sub = row.row()
+ sub = row.row(align=True)
sub.active = rbc.use_limit_ang_x
sub.prop(rbc, "limit_ang_x_lower", text="Lower")
sub.prop(rbc, "limit_ang_x_upper", text="Upper")
@@ -118,22 +118,22 @@ class PHYSICS_PT_rigid_body_constraint(PHYSICS_PT_rigidbody_constraint_panel, Pa
col = layout.column(align=True)
col.label("Linear motor:")
- row = col.row()
- sub = row.row()
+ row = col.row(align=True)
+ sub = row.row(align=True)
sub.scale_x = 0.5
sub.prop(rbc, "use_motor_lin", toggle=True, text="Enable")
- sub = row.row()
+ sub = row.row(align=True)
sub.active = rbc.use_motor_lin
sub.prop(rbc, "motor_lin_target_velocity", text="Target Velocity")
sub.prop(rbc, "motor_lin_max_impulse", text="Max Impulse")
col.label("Angular motor:")
- row = col.row()
- sub = row.row()
+ row = col.row(align=True)
+ sub = row.row(align=True)
sub.scale_x = 0.5
sub.prop(rbc, "use_motor_ang", toggle=True, text="Enable")
- sub = row.row()
+ sub = row.row(align=True)
sub.active = rbc.use_motor_ang
sub.prop(rbc, "motor_ang_target_velocity", text="Target Velocity")
sub.prop(rbc, "motor_ang_max_impulse", text="Max Impulse")
@@ -142,58 +142,58 @@ class PHYSICS_PT_rigid_body_constraint(PHYSICS_PT_rigidbody_constraint_panel, Pa
col = layout.column(align=True)
col.label("Limits:")
- row = col.row()
- sub = row.row()
+ row = col.row(align=True)
+ sub = row.row(align=True)
sub.scale_x = 0.5
sub.prop(rbc, "use_limit_lin_x", toggle=True)
- sub = row.row()
+ sub = row.row(align=True)
sub.active = rbc.use_limit_lin_x
sub.prop(rbc, "limit_lin_x_lower", text="Lower")
sub.prop(rbc, "limit_lin_x_upper", text="Upper")
- row = col.row()
- sub = row.row()
+ row = col.row(align=True)
+ sub = row.row(align=True)
sub.scale_x = 0.5
sub.prop(rbc, "use_limit_lin_y", toggle=True)
- sub = row.row()
+ sub = row.row(align=True)
sub.active = rbc.use_limit_lin_y
sub.prop(rbc, "limit_lin_y_lower", text="Lower")
sub.prop(rbc, "limit_lin_y_upper", text="Upper")
- row = col.row()
- sub = row.row()
+ row = col.row(align=True)
+ sub = row.row(align=True)
sub.scale_x = 0.5
sub.prop(rbc, "use_limit_lin_z", toggle=True)
- sub = row.row()
+ sub = row.row(align=True)
sub.active = rbc.use_limit_lin_z
sub.prop(rbc, "limit_lin_z_lower", text="Lower")
sub.prop(rbc, "limit_lin_z_upper", text="Upper")
col = layout.column(align=True)
- row = col.row()
- sub = row.row()
+ row = col.row(align=True)
+ sub = row.row(align=True)
sub.scale_x = 0.5
sub.prop(rbc, "use_limit_ang_x", toggle=True)
- sub = row.row()
+ sub = row.row(align=True)
sub.active = rbc.use_limit_ang_x
sub.prop(rbc, "limit_ang_x_lower", text="Lower")
sub.prop(rbc, "limit_ang_x_upper", text="Upper")
- row = col.row()
- sub = row.row()
+ row = col.row(align=True)
+ sub = row.row(align=True)
sub.scale_x = 0.5
sub.prop(rbc, "use_limit_ang_y", toggle=True)
- sub = row.row()
+ sub = row.row(align=True)
sub.active = rbc.use_limit_ang_y
sub.prop(rbc, "limit_ang_y_lower", text="Lower")
sub.prop(rbc, "limit_ang_y_upper", text="Upper")
- row = col.row()
- sub = row.row()
+ row = col.row(align=True)
+ sub = row.row(align=True)
sub.scale_x = 0.5
sub.prop(rbc, "use_limit_ang_z", toggle=True)
- sub = row.row()
+ sub = row.row(align=True)
sub.active = rbc.use_limit_ang_z
sub.prop(rbc, "limit_ang_z_lower", text="Lower")
sub.prop(rbc, "limit_ang_z_upper", text="Upper")
@@ -202,29 +202,29 @@ class PHYSICS_PT_rigid_body_constraint(PHYSICS_PT_rigidbody_constraint_panel, Pa
col = layout.column(align=True)
col.label("Springs:")
- row = col.row()
- sub = row.row()
+ row = col.row(align=True)
+ sub = row.row(align=True)
sub.scale_x = 0.1
sub.prop(rbc, "use_spring_x", toggle=True, text="X")
- sub = row.row()
+ sub = row.row(align=True)
sub.active = rbc.use_spring_x
sub.prop(rbc, "spring_stiffness_x", text="Stiffness")
sub.prop(rbc, "spring_damping_x")
- row = col.row()
- sub = row.row()
+ row = col.row(align=True)
+ sub = row.row(align=True)
sub.scale_x = 0.1
sub.prop(rbc, "use_spring_y", toggle=True, text="Y")
- sub = row.row()
+ sub = row.row(align=True)
sub.active = rbc.use_spring_y
sub.prop(rbc, "spring_stiffness_y", text="Stiffness")
sub.prop(rbc, "spring_damping_y")
- row = col.row()
- sub = row.row()
+ row = col.row(align=True)
+ sub = row.row(align=True)
sub.scale_x = 0.1
sub.prop(rbc, "use_spring_z", toggle=True, text="Z")
- sub = row.row()
+ sub = row.row(align=True)
sub.active = rbc.use_spring_z
sub.prop(rbc, "spring_stiffness_z", text="Stiffness")
sub.prop(rbc, "spring_damping_z")
diff --git a/release/scripts/startup/bl_ui/properties_physics_smoke.py b/release/scripts/startup/bl_ui/properties_physics_smoke.py
index 0651228388e..5bdbbd70ee6 100644
--- a/release/scripts/startup/bl_ui/properties_physics_smoke.py
+++ b/release/scripts/startup/bl_ui/properties_physics_smoke.py
@@ -96,8 +96,8 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel):
col.prop(flow, "volume_density")
sub = col.column(align=True)
-
sub.prop(flow, "use_initial_velocity")
+
sub = sub.column()
sub.active = flow.use_initial_velocity
sub.prop(flow, "velocity_factor")
diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py
index 799c109ae0c..288f95ca4b0 100644
--- a/release/scripts/startup/bl_ui/properties_render.py
+++ b/release/scripts/startup/bl_ui/properties_render.py
@@ -257,18 +257,16 @@ class RENDER_PT_performance(RenderButtonsPanel, Panel):
split = layout.split()
- col = split.column()
+ col = split.column(align=True)
+ col.label(text="Threads:")
+ col.row(align=True).prop(rd, "threads_mode", expand=True)
sub = col.column(align=True)
- sub.label(text="Threads:")
- sub.row().prop(rd, "threads_mode", expand=True)
- subsub = sub.column()
- subsub.enabled = rd.threads_mode == 'FIXED'
- subsub.prop(rd, "threads")
+ sub.enabled = rd.threads_mode == 'FIXED'
+ sub.prop(rd, "threads")
- sub = col.column(align=True)
- sub.label(text="Tile Size:")
- sub.prop(rd, "tile_x", text="X")
- sub.prop(rd, "tile_y", text="Y")
+ col.label(text="Tile Size:")
+ col.prop(rd, "tile_x", text="X")
+ col.prop(rd, "tile_y", text="Y")
col = split.column()
col.label(text="Memory:")
@@ -503,7 +501,7 @@ class RENDER_PT_bake(RenderButtonsPanel, Panel):
layout.prop(rd, "bake_type")
multires_bake = False
- if rd.bake_type in ['NORMALS', 'DISPLACEMENT', 'AO']:
+ if rd.bake_type in ['NORMALS', 'DISPLACEMENT', 'DERIVATIVE', 'AO']:
layout.prop(rd, "use_bake_multires")
multires_bake = rd.use_bake_multires
@@ -544,11 +542,20 @@ class RENDER_PT_bake(RenderButtonsPanel, Panel):
if rd.bake_type == 'DISPLACEMENT':
col = split.column()
col.prop(rd, "use_bake_lores_mesh")
+
if rd.bake_type == 'AO':
col = split.column()
col.prop(rd, "bake_bias")
col.prop(rd, "bake_samples")
+ if rd.bake_type == 'DERIVATIVE':
+ row = layout.row()
+ row.prop(rd, "use_bake_user_scale", text="")
+
+ sub = row.column()
+ sub.active = rd.use_bake_user_scale
+ sub.prop(rd, "bake_user_scale", text="User Scale")
+
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)
diff --git a/release/scripts/startup/bl_ui/properties_render_layer.py b/release/scripts/startup/bl_ui/properties_render_layer.py
index 2514cca8c0f..66479b11a2b 100644
--- a/release/scripts/startup/bl_ui/properties_render_layer.py
+++ b/release/scripts/startup/bl_ui/properties_render_layer.py
@@ -57,7 +57,8 @@ class RENDERLAYER_PT_layers(RenderLayerButtonsPanel, Panel):
rd = scene.render
row = layout.row()
- row.template_list("RENDERLAYER_UL_renderlayers", "", rd, "layers", rd.layers, "active_index", rows=2)
+ col = row.column()
+ col.template_list("RENDERLAYER_UL_renderlayers", "", rd, "layers", rd.layers, "active_index", rows=1)
col = row.column(align=True)
col.operator("scene.render_layer_add", icon='ZOOMIN', text="")
diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py
index a04283de8bf..5e9cbbda21f 100644
--- a/release/scripts/startup/bl_ui/properties_scene.py
+++ b/release/scripts/startup/bl_ui/properties_scene.py
@@ -94,7 +94,7 @@ class SCENE_PT_keying_sets(SceneButtonsPanel, Panel):
row = layout.row()
col = row.column()
- col.template_list("UI_UL_list", "keying_sets", scene, "keying_sets", scene.keying_sets, "active_index", rows=2)
+ col.template_list("UI_UL_list", "keying_sets", scene, "keying_sets", scene.keying_sets, "active_index", rows=1)
col = row.column(align=True)
col.operator("anim.keying_set_add", icon='ZOOMIN', text="")
@@ -138,7 +138,7 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel, Panel):
row = layout.row()
col = row.column()
- col.template_list("SCENE_UL_keying_set_paths", "", ks, "paths", ks.paths, "active_index", rows=2)
+ col.template_list("SCENE_UL_keying_set_paths", "", ks, "paths", ks.paths, "active_index", rows=1)
col = row.column(align=True)
col.operator("anim.keying_set_path_add", icon='ZOOMIN', text="")
diff --git a/release/scripts/startup/bl_ui/properties_texture.py b/release/scripts/startup/bl_ui/properties_texture.py
index 8875161170a..023b3a13848 100644
--- a/release/scripts/startup/bl_ui/properties_texture.py
+++ b/release/scripts/startup/bl_ui/properties_texture.py
@@ -476,7 +476,7 @@ class TEXTURE_PT_image_sampling(TextureTypePanel, Panel):
col = split.column()
col.label(text="Alpha:")
row = col.row()
- row.active = tex.image and tex.image.use_alpha
+ row.active = bool(tex.image and tex.image.use_alpha)
row.prop(tex, "use_alpha", text="Use")
col.prop(tex, "use_calculate_alpha", text="Calculate")
col.prop(tex, "invert_alpha", text="Invert")
@@ -555,17 +555,17 @@ class TEXTURE_PT_image_mapping(TextureTypePanel, Panel):
col = split.column(align=True)
col.label(text="Mirror:")
- row = col.row()
+ row = col.row(align=True)
row.prop(tex, "use_mirror_x", text="X")
row.active = (tex.repeat_x > 1)
- row = col.row()
+ row = col.row(align=True)
row.prop(tex, "use_mirror_y", text="Y")
row.active = (tex.repeat_y > 1)
layout.separator()
elif tex.extension == 'CHECKER':
col = split.column(align=True)
- row = col.row()
+ row = col.row(align=True)
row.prop(tex, "use_checker_even", text="Even")
row.prop(tex, "use_checker_odd", text="Odd")
@@ -1007,7 +1007,7 @@ class TEXTURE_PT_influence(TextureSlotPanel, Panel):
def factor_but(layout, toggle, factor, name):
row = layout.row(align=True)
row.prop(tex, toggle, text="")
- sub = row.row()
+ sub = row.row(align=True)
sub.active = getattr(tex, toggle)
sub.prop(tex, factor, text=name, slider=True)
return sub # XXX, temp. use_map_normal needs to override.
diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py
index b399475e699..c5a5c57d815 100644
--- a/release/scripts/startup/bl_ui/space_clip.py
+++ b/release/scripts/startup/bl_ui/space_clip.py
@@ -94,7 +94,7 @@ class CLIP_HT_header(Header):
row.prop(sc, "show_filters", icon='DISCLOSURE_TRI_DOWN',
text="Filters")
- sub = row.column()
+ sub = row.row(align=True)
sub.active = clip.tracking.reconstruction.is_valid
sub.prop(sc, "show_graph_frames", icon='SEQUENCE', text="")
@@ -259,7 +259,7 @@ class CLIP_PT_tools_marker(CLIP_PT_tracking_panel, Panel):
settings = clip.tracking.settings
col = layout.column(align=True)
- props = col.operator("clip.add_marker_at_click", text="Add Marker")
+ col.operator("clip.add_marker_at_click", text="Add Marker")
col.operator("clip.detect_features")
col.operator("clip.delete_track")
@@ -269,7 +269,7 @@ class CLIP_PT_tools_marker(CLIP_PT_tracking_panel, Panel):
row.label(text="Tracking Settings")
if settings.show_default_expanded:
- _draw_default_tracker_settings(box, settings)
+ _draw_default_tracker_settings(box, settings)
class CLIP_PT_tools_default_tracking_settings(Panel):
@@ -319,18 +319,14 @@ class CLIP_PT_tools_tracking(CLIP_PT_tracking_panel, Panel):
col = layout.column()
col.label(text="Refine:")
row = col.row(align=True)
- props = row.operator("clip.refine_markers", text="Backwards")
- props.backwards = True
- props = row.operator("clip.refine_markers", text="Forwards")
- props.backwards = False
-
- col = layout.column(align=True)
- props = col.operator("clip.clear_track_path", text="Clear After")
- props.action = 'REMAINED'
+ row.operator("clip.refine_markers", text="Backwards").backwards = True
+ row.operator("clip.refine_markers", text="Forwards").backwards = False
- props = col.operator("clip.clear_track_path", text="Clear Before")
- props.action = 'UPTO'
- col.operator("clip.clear_track_path", text="Clear").action = 'ALL'
+ col = layout.column()
+ col.label(text="Clear:")
+ row = col.row(align=True)
+ row.operator("clip.clear_track_path", text="Before").action = 'UPTO'
+ row.operator("clip.clear_track_path", text="After").action = 'REMAINED'
layout.operator("clip.join_tracks", text="Join")
@@ -339,6 +335,7 @@ class CLIP_PT_tools_plane_tracking(CLIP_PT_tracking_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'TOOLS'
bl_label = "Plane Track"
+ bl_options = {'DEFAULT_CLOSED'}
def draw(self, context):
layout = self.layout
@@ -380,14 +377,6 @@ class CLIP_PT_tools_solve(CLIP_PT_tracking_panel, Panel):
col.label(text="Refine:")
col.prop(settings, "refine_intrinsics", text="")
- col = layout.column(align=True)
- col.active = not settings.use_tripod_solver
- col.prop(settings, "use_fallback_reconstruction",
- text="Allow Fallback")
- sub = col.column()
- sub.active = settings.use_fallback_reconstruction
- sub.prop(settings, "reconstruction_success_threshold")
-
class CLIP_PT_tools_cleanup(CLIP_PT_tracking_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
@@ -429,14 +418,13 @@ class CLIP_PT_tools_orientation(CLIP_PT_reconstruction_panel, Panel):
settings = sc.clip.tracking.settings
col = layout.column(align=True)
- row = col.row()
- props = row.operator("clip.set_plane", text="Floor")
- props.plane = 'FLOOR'
- props = row.operator("clip.set_plane", text="Wall")
- props.plane = 'WALL'
+ row = col.row(align=True)
+ row.operator("clip.set_plane", text="Floor").plane = 'FLOOR'
+ row.operator("clip.set_plane", text="Wall").plane = 'WALL'
+
col.operator("clip.set_origin")
- row = col.row()
+ row = col.row(align=True)
row.operator("clip.set_axis", text="Set X Axis").axis = 'X'
row.operator("clip.set_axis", text="Set Y Axis").axis = 'Y'
@@ -446,6 +434,7 @@ class CLIP_PT_tools_orientation(CLIP_PT_reconstruction_panel, Panel):
row = col.row(align=True)
row.operator("clip.set_scale")
row.operator("clip.apply_solution_scale", text="Apply Scale")
+
col.prop(settings, "distance")
@@ -517,7 +506,7 @@ class CLIP_PT_tools_grease_pencil(Panel):
row.operator("gpencil.draw", text="Poly").mode = 'DRAW_POLY'
row.operator("gpencil.draw", text="Erase").mode = 'ERASER'
- row = col.row()
+ row = col.row(align=True)
row.prop(context.tool_settings, "use_grease_pencil_sessions")
@@ -535,7 +524,7 @@ class CLIP_PT_objects(CLIP_PT_clip_view_panel, Panel):
row = layout.row()
row.template_list("CLIP_UL_tracking_objects", "", tracking, "objects",
- tracking, "active_object_index", rows=3)
+ tracking, "active_object_index", rows=1)
sub = row.column(align=True)
@@ -577,19 +566,17 @@ class CLIP_PT_track(CLIP_PT_tracking_panel, Panel):
layout.template_track(sc, "scopes")
row = layout.row(align=True)
- sub = row.row()
+ sub = row.row(align=True)
sub.prop(act_track, "use_red_channel", text="R", toggle=True)
sub.prop(act_track, "use_green_channel", text="G", toggle=True)
sub.prop(act_track, "use_blue_channel", text="B", toggle=True)
row.separator()
- sub = row.row()
- sub.prop(act_track, "use_grayscale_preview", text="B/W", toggle=True)
+ row.prop(act_track, "use_grayscale_preview", text="B/W", toggle=True)
row.separator()
- sub = row.row()
- sub.prop(act_track, "use_alpha_preview",
+ row.prop(act_track, "use_alpha_preview",
text="", toggle=True, icon='IMAGE_ALPHA')
layout.separator()
@@ -599,15 +586,16 @@ class CLIP_PT_track(CLIP_PT_tracking_panel, Panel):
row.menu('CLIP_MT_track_color_presets', text=label)
row.menu('CLIP_MT_track_color_specials', text="", icon='DOWNARROW_HLT')
row.operator("clip.track_color_preset_add", text="", icon='ZOOMIN')
- props = row.operator("clip.track_color_preset_add",
- text="", icon='ZOOMOUT')
- props.remove_active = True
+ row.operator("clip.track_color_preset_add",
+ text="", icon='ZOOMOUT').remove_active = True
row = layout.row()
row.prop(act_track, "use_custom_color")
if act_track.use_custom_color:
row.prop(act_track, "color", text="")
+ layout.prop(act_track, "weight")
+
if act_track.has_bundle:
label_text = "Average Error: %.4f" % (act_track.average_error)
layout.label(text=label_text)
@@ -617,6 +605,7 @@ class CLIP_PT_plane_track(CLIP_PT_tracking_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
bl_label = "Plane Track"
+ bl_options = {'DEFAULT_CLOSED'}
def draw(self, context):
layout = self.layout
@@ -631,6 +620,7 @@ class CLIP_PT_plane_track(CLIP_PT_tracking_panel, Panel):
return
layout.prop(active_track, "name")
+ layout.prop(active_track, "use_auto_keying")
class CLIP_PT_track_settings(CLIP_PT_tracking_panel, Panel):
@@ -688,11 +678,11 @@ class CLIP_PT_tracking_camera(Panel):
label = bpy.types.CLIP_MT_camera_presets.bl_label
row.menu('CLIP_MT_camera_presets', text=label)
row.operator("clip.camera_preset_add", text="", icon='ZOOMIN')
- props = row.operator("clip.camera_preset_add", text="", icon='ZOOMOUT')
- props.remove_active = True
+ row.operator("clip.camera_preset_add", text="",
+ icon='ZOOMOUT').remove_active = True
row = layout.row(align=True)
- sub = row.split(percentage=0.65)
+ sub = row.split(percentage=0.65, align=True)
if clip.tracking.camera.units == 'MILLIMETERS':
sub.prop(clip.tracking.camera, "focal_length")
else:
@@ -727,21 +717,21 @@ class CLIP_PT_display(CLIP_PT_clip_view_panel, Panel):
sc = context.space_data
row = layout.row(align=True)
- sub = row.row()
+ sub = row.row(align=True)
sub.prop(sc, "show_red_channel", text="R", toggle=True)
sub.prop(sc, "show_green_channel", text="G", toggle=True)
sub.prop(sc, "show_blue_channel", text="B", toggle=True)
row.separator()
- sub = row.row()
- sub.prop(sc, "use_grayscale_preview", text="B/W", toggle=True)
+ row.prop(sc, "use_grayscale_preview", text="B/W", toggle=True)
col = layout.column(align=True)
col.prop(sc, "show_disabled", "Disabled Tracks")
col.prop(sc, "show_names", text="Names and Status")
- col.prop(sc, "show_bundles", text="3D Markers")
+ if sc.mode != 'MASK':
+ col.prop(sc, "show_bundles", text="3D Markers")
col.prop(sc, "use_mute_footage", text="Mute Footage")
col.prop(sc, "lock_selection")
@@ -779,14 +769,14 @@ class CLIP_PT_marker_display(CLIP_PT_clip_view_panel, Panel):
col = layout.column(align=True)
- row = col.row()
+ row = col.row(align=True)
row.prop(sc, "show_marker_pattern", text="Pattern")
row.prop(sc, "show_marker_search", text="Search")
col.prop(sc, "show_tiny_markers", text="Thin Markers")
col.prop(sc, "show_track_path", text="Path")
- row = col.row()
+ row = col.row(align=True)
row.active = sc.show_track_path
row.prop(sc, "path_length", text="Length")
@@ -812,7 +802,7 @@ class CLIP_PT_stabilization(CLIP_PT_reconstruction_panel, Panel):
row = layout.row()
row.template_list("UI_UL_list", "stabilization_tracks", stab, "tracks",
- stab, "active_track_index", rows=3)
+ stab, "active_track_index", rows=2)
sub = row.column(align=True)
@@ -1054,15 +1044,14 @@ class CLIP_MT_track(Menu):
layout.operator("clip.solve_camera")
layout.separator()
- props = layout.operator("clip.clear_track_path", text="Clear After")
- props.action = 'REMAINED'
+ layout.operator("clip.clear_track_path",
+ text="Clear After").action = 'REMAINED'
- props = layout.operator("clip.clear_track_path", text="Clear Before")
- props.action = 'UPTO'
+ layout.operator("clip.clear_track_path",
+ text="Clear Before").action = 'UPTO'
- props = layout.operator("clip.clear_track_path",
- text="Clear Track Path")
- props.action = 'ALL'
+ layout.operator("clip.clear_track_path",
+ text="Clear Track Path").action = 'ALL'
layout.separator()
layout.operator("clip.join_tracks")
@@ -1075,16 +1064,15 @@ class CLIP_MT_track(Menu):
layout.operator("clip.paste_tracks")
layout.separator()
- props = layout.operator("clip.track_markers",
- text="Track Frame Backwards")
- props.backwards = True
+ layout.operator("clip.track_markers",
+ text="Track Frame Backwards").backwards = True
props = layout.operator("clip.track_markers", text="Track Backwards")
props.backwards = True
props.sequence = True
- props = layout.operator("clip.track_markers", text="Track Forwards")
- props.sequence = True
+ layout.operator("clip.track_markers",
+ text="Track Forwards").sequence = True
layout.operator("clip.track_markers", text="Track Frame Forwards")
layout.separator()
@@ -1106,10 +1094,8 @@ class CLIP_MT_reconstruction(Menu):
layout = self.layout
layout.operator("clip.set_origin")
- props = layout.operator("clip.set_plane", text="Set Floor")
- props.plane = 'FLOOR'
- props = layout.operator("clip.set_plane", text="Set Wall")
- props.plane = 'WALL'
+ layout.operator("clip.set_plane", text="Set Floor").plane = 'FLOOR'
+ layout.operator("clip.set_plane", text="Set Wall").plane = 'WALL'
layout.operator("clip.set_axis", text="Set X Axis").axis = "X"
layout.operator("clip.set_axis", text="Set Y Axis").axis = "Y"
@@ -1131,8 +1117,8 @@ class CLIP_MT_track_visibility(Menu):
layout.operator("clip.hide_tracks_clear", text="Show Hidden")
layout.operator("clip.hide_tracks", text="Hide Selected")
- props = layout.operator("clip.hide_tracks", text="Hide Unselected")
- props.unselected = True
+ layout.operator("clip.hide_tracks",
+ text="Hide Unselected").unselected = True
class CLIP_MT_track_transform(Menu):
@@ -1183,12 +1169,11 @@ class CLIP_MT_tracking_specials(Menu):
def draw(self, context):
layout = self.layout
- props = layout.operator("clip.disable_markers",
- text="Enable Markers")
- props.action = 'ENABLE'
+ layout.operator("clip.disable_markers",
+ text="Enable Markers").action = 'ENABLE'
- props = layout.operator("clip.disable_markers", text="Disable markers")
- props.action = 'DISABLE'
+ layout.operator("clip.disable_markers",
+ text="Disable markers").action = 'DISABLE'
layout.separator()
layout.operator("clip.set_origin")
@@ -1198,11 +1183,10 @@ class CLIP_MT_tracking_specials(Menu):
layout.operator("clip.hide_tracks_clear", text="Show Tracks")
layout.separator()
- props = layout.operator("clip.lock_tracks", text="Lock Tracks")
- props.action = 'LOCK'
+ layout.operator("clip.lock_tracks", text="Lock Tracks").action = 'LOCK'
- props = layout.operator("clip.lock_tracks", text="Unlock Tracks")
- props.action = 'UNLOCK'
+ layout.operator("clip.lock_tracks",
+ text="Unlock Tracks").action = 'UNLOCK'
class CLIP_MT_select_mode(Menu):
diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py
index 2b3be00e3c6..9d317033bb9 100644
--- a/release/scripts/startup/bl_ui/space_dopesheet.py
+++ b/release/scripts/startup/bl_ui/space_dopesheet.py
@@ -89,6 +89,8 @@ def dopesheet_filter(layout, context, genericFiltersOnly=False):
row.prop(dopesheet, "show_particles", text="")
if bpy.data.speakers:
row.prop(dopesheet, "show_speakers", text="")
+ if bpy.data.linestyles:
+ row.prop(dopesheet, "show_linestyles", text="")
#######################################
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index 22e2e6e08a2..cc2d1dc1e66 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -106,7 +106,6 @@ class IMAGE_MT_select(Menu):
layout.operator("uv.select_all").action = 'TOGGLE'
layout.operator("uv.select_all", text="Inverse").action = 'INVERT'
- layout.operator("uv.select_split")
layout.separator()
@@ -183,17 +182,10 @@ class IMAGE_MT_image_invert(Menu):
layout.separator()
- props = layout.operator("image.invert", text="Invert Red Channel")
- props.invert_r = True
-
- props = layout.operator("image.invert", text="Invert Green Channel")
- props.invert_g = True
-
- props = layout.operator("image.invert", text="Invert Blue Channel")
- props.invert_b = True
-
- props = layout.operator("image.invert", text="Invert Alpha Channel")
- props.invert_a = True
+ layout.operator("image.invert", text="Invert Red Channel").invert_r = True
+ layout.operator("image.invert", text="Invert Green Channel").invert_g = True
+ layout.operator("image.invert", text="Invert Blue Channel").invert_b = True
+ layout.operator("image.invert", text="Invert Alpha Channel").invert_a = True
class IMAGE_MT_uvs_showhide(Menu):
@@ -397,7 +389,7 @@ class IMAGE_HT_header(Header):
if show_maskedit:
sub.menu("MASK_MT_mask")
- layout.template_ID(sima, "image", new="image.new")
+ layout.template_ID(sima, "image", new="image.new", open="image.open")
if not show_render:
layout.prop(sima, "use_image_pin", text="")
@@ -714,8 +706,6 @@ class IMAGE_PT_paint(Panel, ImagePaintPanel):
self.prop_unified_strength(row, context, brush, "strength", slider=True, text="Strength")
self.prop_unified_strength(row, context, brush, "use_pressure_strength")
- row = col.row(align=True)
-
col.prop(brush, "blend", text="Blend")
if brush.image_tool == 'CLONE':
@@ -724,8 +714,8 @@ class IMAGE_PT_paint(Panel, ImagePaintPanel):
col.prop(brush, "clone_alpha", text="Alpha")
-class IMAGE_PT_tools_brush_texture(BrushButtonsPanel, Panel):
- bl_label = "Texture"
+class IMAGE_PT_tools_brush_overlay(BrushButtonsPanel, Panel):
+ bl_label = "Overlay"
bl_options = {'DEFAULT_CLOSED'}
def draw(self, context):
@@ -734,28 +724,65 @@ class IMAGE_PT_tools_brush_texture(BrushButtonsPanel, Panel):
toolsettings = context.tool_settings.image_paint
brush = toolsettings.brush
tex_slot = brush.texture_slot
+ tex_slot_mask = brush.mask_texture_slot
col = layout.column()
- col.template_ID_preview(brush, "texture", new="texture.new", rows=3, cols=8)
+
+ col.label(text="Curve:")
- brush_texture_settings(col, brush, 0)
+ row = col.row(align=True)
+ if brush.use_cursor_overlay:
+ row.prop(brush, "use_cursor_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
+ else:
+ row.prop(brush, "use_cursor_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
- # use_texture_overlay and texture_overlay_alpha
- col = layout.column(align=True)
- col.active = brush.brush_capabilities.has_overlay
- col.label(text="Overlay:")
+ sub = row.row(align=True)
+ sub.prop(brush, "cursor_overlay_alpha", text="Alpha")
+ sub.prop(brush, "use_cursor_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
- row = col.row()
+ col.active = brush.brush_capabilities.has_overlay
+ col.label(text="Texture:")
+ row = col.row(align=True)
if tex_slot.map_mode != 'STENCIL':
if brush.use_primary_overlay:
row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
else:
row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
- sub = row.row()
+ sub = row.row(align=True)
sub.prop(brush, "texture_overlay_alpha", text="Alpha")
sub.prop(brush, "use_primary_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
+ col.label(text="Mask Texture:")
+
+ row = col.row(align=True)
+ if tex_slot_mask.map_mode != 'STENCIL':
+ if brush.use_secondary_overlay:
+ row.prop(brush, "use_secondary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
+ else:
+ row.prop(brush, "use_secondary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
+
+ sub = row.row(align=True)
+ sub.prop(brush, "mask_overlay_alpha", text="Alpha")
+ sub.prop(brush, "use_secondary_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
+
+
+class IMAGE_PT_tools_brush_texture(BrushButtonsPanel, Panel):
+ bl_label = "Texture"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ def draw(self, context):
+ layout = self.layout
+
+ toolsettings = context.tool_settings.image_paint
+ brush = toolsettings.brush
+ tex_slot = brush.texture_slot
+
+ col = layout.column()
+ col.template_ID_preview(brush, "texture", new="texture.new", rows=3, cols=8)
+
+ brush_texture_settings(col, brush, 0)
+
class IMAGE_PT_tools_mask_texture(BrushButtonsPanel, Panel):
bl_label = "Texture Mask"
@@ -773,21 +800,6 @@ class IMAGE_PT_tools_mask_texture(BrushButtonsPanel, Panel):
brush_mask_texture_settings(col, brush)
- col = layout.column(align=True)
- col.active = brush.brush_capabilities.has_overlay
- col.label(text="Overlay:")
-
- row = col.row()
- if tex_slot_alpha.map_mode != 'STENCIL':
- if brush.use_secondary_overlay:
- row.prop(brush, "use_secondary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
- else:
- row.prop(brush, "use_secondary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
-
- sub = row.row()
- sub.prop(brush, "mask_overlay_alpha", text="Alpha")
- sub.prop(brush, "use_secondary_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
-
class IMAGE_PT_tools_brush_tool(BrushButtonsPanel, Panel):
bl_label = "Tool"
diff --git a/release/scripts/startup/bl_ui/space_info.py b/release/scripts/startup/bl_ui/space_info.py
index 6701e700e14..5a570d18312 100644
--- a/release/scripts/startup/bl_ui/space_info.py
+++ b/release/scripts/startup/bl_ui/space_info.py
@@ -227,7 +227,7 @@ class INFO_MT_curve_add(Menu):
def draw(self, context):
layout = self.layout
- layout.operator_context = 'EXEC_REGION_WIN'
+ layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("curve.primitive_bezier_curve_add", icon='CURVE_BEZCURVE', text="Bezier")
layout.operator("curve.primitive_bezier_circle_add", icon='CURVE_BEZCIRCLE', text="Circle")
layout.operator("curve.primitive_nurbs_curve_add", icon='CURVE_NCURVE', text="Nurbs Curve")
@@ -242,7 +242,7 @@ class INFO_MT_surface_add(Menu):
def draw(self, context):
layout = self.layout
- layout.operator_context = 'EXEC_REGION_WIN'
+ layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("surface.primitive_nurbs_surface_curve_add", icon='SURFACE_NCURVE', text="NURBS Curve")
layout.operator("surface.primitive_nurbs_surface_circle_add", icon='SURFACE_NCIRCLE', text="NURBS Circle")
layout.operator("surface.primitive_nurbs_surface_surface_add", icon='SURFACE_NSURFACE', text="NURBS Surface")
@@ -297,7 +297,9 @@ class INFO_MT_add(Menu):
layout.menu("INFO_MT_curve_add", icon='OUTLINER_OB_CURVE')
#layout.operator_menu_enum("object.surface_add", "type", text="Surface", icon='OUTLINER_OB_SURFACE')
layout.menu("INFO_MT_surface_add", icon='OUTLINER_OB_SURFACE')
+ layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator_menu_enum("object.metaball_add", "type", text="Metaball", icon='OUTLINER_OB_META')
+ layout.operator_context = 'EXEC_REGION_WIN'
layout.operator("object.text_add", text="Text", icon='OUTLINER_OB_FONT')
layout.separator()
@@ -392,7 +394,7 @@ class INFO_MT_help(Menu):
layout = self.layout
layout.operator("wm.url_open", text="Manual", icon='HELP').url = "http://wiki.blender.org/index.php/Doc:2.6/Manual"
- layout.operator("wm.url_open", text="Release Log", icon='URL').url = "http://www.blender.org/development/release-logs/blender-268"
+ layout.operator("wm.url_open", text="Release Log", icon='URL').url = "http://www.blender.org/development/release-logs/blender-269"
layout.separator()
layout.operator("wm.url_open", text="Blender Website", icon='URL').url = "http://www.blender.org"
diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py
index da41f9c6bef..1721eacd8ac 100644
--- a/release/scripts/startup/bl_ui/space_node.py
+++ b/release/scripts/startup/bl_ui/space_node.py
@@ -28,7 +28,6 @@ class NODE_HT_header(Header):
layout = self.layout
scene = context.scene
- ob = context.object
snode = context.space_data
snode_id = snode.id
id_from = snode.id_from
@@ -49,21 +48,28 @@ class NODE_HT_header(Header):
if scene.render.use_shading_nodes:
layout.prop(snode, "shader_type", text="", expand=True)
+ ob = context.object
if (not scene.render.use_shading_nodes or snode.shader_type == 'OBJECT') and ob:
+ row = layout.row()
+ # disable material slot buttons when pinned, cannot find correct slot within id_from (#36589)
+ row.enabled = not snode.pin
# Show material.new when no active ID/slot exists
if not id_from and ob.type in {'MESH', 'CURVE', 'SURFACE', 'FONT', 'METABALL'}:
- layout.template_ID(ob, "active_material", new="material.new")
+ row.template_ID(ob, "active_material", new="material.new")
# Material ID, but not for Lamps
if id_from and ob.type != 'LAMP':
- layout.template_ID(id_from, "active_material", new="material.new")
+ row.template_ID(id_from, "active_material", new="material.new")
+
# Don't show "Use Nodes" Button when Engine is BI for Lamps
if snode_id and not (scene.render.use_shading_nodes == 0 and ob.type == 'LAMP'):
layout.prop(snode_id, "use_nodes")
if snode.shader_type == 'WORLD':
- layout.template_ID(scene, "world", new="world.new")
+ row = layout.row()
+ row.enabled = not snode.pin
+ row.template_ID(scene, "world", new="world.new")
if snode_id:
- layout.prop(snode_id, "use_nodes")
+ row.prop(snode_id, "use_nodes")
elif snode.tree_type == 'TextureNodeTree':
layout.prop(snode, "texture_type", text="", expand=True)
@@ -148,6 +154,7 @@ class NODE_MT_view(Menu):
layout.operator("node.backimage_move", text="Backdrop move")
layout.operator("node.backimage_zoom", text="Backdrop zoom in").factor = 1.2
layout.operator("node.backimage_zoom", text="Backdrop zoom out").factor = 0.833
+ layout.operator("node.backimage_fit", text="Fit backdrop to available space")
layout.separator()
@@ -357,6 +364,8 @@ class NODE_PT_backdrop(Panel):
col.prop(snode, "backdrop_x", text="X")
col.prop(snode, "backdrop_y", text="Y")
col.operator("node.backimage_move", text="Move")
+
+ layout.operator("node.backimage_fit", text="Fit")
class NODE_PT_quality(bpy.types.Panel):
@@ -398,13 +407,13 @@ class NODE_UL_interface_sockets(bpy.types.UIList):
row = layout.row(align=True)
# inputs get icon on the left
- if socket.in_out == 'IN':
+ if not socket.is_output:
row.template_node_socket(color)
row.label(text=socket.name, icon_value=icon)
# outputs get icon on the right
- if socket.in_out == 'OUT':
+ if socket.is_output:
row.template_node_socket(color)
elif self.layout_type in {'GRID'}:
diff --git a/release/scripts/startup/bl_ui/space_outliner.py b/release/scripts/startup/bl_ui/space_outliner.py
index b1e6eaf3245..16f639eafc4 100644
--- a/release/scripts/startup/bl_ui/space_outliner.py
+++ b/release/scripts/startup/bl_ui/space_outliner.py
@@ -53,14 +53,14 @@ class OUTLINER_HT_header(Header):
row.operator("outliner.keyingset_remove_selected", icon='ZOOMOUT', text="")
if ks:
- row = layout.row(align=False)
+ row = layout.row()
row.prop_search(scene.keying_sets, "active", scene, "keying_sets", text="")
row = layout.row(align=True)
row.operator("anim.keyframe_insert", text="", icon='KEY_HLT')
row.operator("anim.keyframe_delete", text="", icon='KEY_DEHLT')
else:
- row = layout.row(align=False)
+ row = layout.row()
row.label(text="No Keying Set active")
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index 79191637080..ea88d35b4e9 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -104,8 +104,7 @@ class SEQUENCER_HT_header(Header):
row.prop(st, "overlay_type", text="")
row = layout.row(align=True)
- props = row.operator("render.opengl", text="", icon='RENDER_STILL')
- props.sequencer = True
+ row.operator("render.opengl", text="", icon='RENDER_STILL').sequencer = True
props = row.operator("render.opengl", text="", icon='RENDER_ANIMATION')
props.animation = True
props.sequencer = True
@@ -339,12 +338,11 @@ class SEQUENCER_MT_strip(Menu):
#}
layout.separator()
- props = layout.operator("sequencer.reload", text="Reload Strips")
- props.adjust_length = False
- props = layout.operator("sequencer.reload", text="Reload Strips and Adjust Length")
- props.adjust_length = True
+ layout.operator("sequencer.reload", text="Reload Strips").adjust_length = False
+ layout.operator("sequencer.reload", text="Reload Strips and Adjust Length").adjust_length = True
layout.operator("sequencer.reassign_inputs")
layout.operator("sequencer.swap_inputs")
+
layout.separator()
layout.operator("sequencer.lock")
layout.operator("sequencer.unlock")
@@ -407,16 +405,17 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel, Panel):
split.label(text="Type:")
split.prop(strip, "type", text="")
- split = layout.split(percentage=0.3)
- split.label(text="Blend:")
- split.prop(strip, "blend_type", text="")
+ if strip.type not in {'SOUND'}:
+ split = layout.split(percentage=0.3)
+ split.label(text="Blend:")
+ split.prop(strip, "blend_type", text="")
- row = layout.row(align=True)
- sub = row.row()
- sub.active = (not strip.mute)
- sub.prop(strip, "blend_alpha", text="Opacity", slider=True)
- row.prop(strip, "mute", toggle=True, icon='RESTRICT_VIEW_ON' if strip.mute else 'RESTRICT_VIEW_OFF', text="")
- row.prop(strip, "lock", toggle=True, icon='LOCKED' if strip.lock else 'UNLOCKED', text="")
+ row = layout.row(align=True)
+ sub = row.row(align=True)
+ sub.active = (not strip.mute)
+ sub.prop(strip, "blend_alpha", text="Opacity", slider=True)
+ row.prop(strip, "mute", toggle=True, icon='RESTRICT_VIEW_ON' if strip.mute else 'RESTRICT_VIEW_OFF', text="")
+ row.prop(strip, "lock", toggle=True, icon='LOCKED' if strip.lock else 'UNLOCKED', text="")
col = layout.column()
sub = col.column()
@@ -426,10 +425,10 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel, Panel):
sub.prop(strip, "frame_final_duration")
col = layout.column(align=True)
- row = col.row()
+ row = col.row(align=True)
row.label(text=iface_("Final Length: %s") % bpy.utils.smpte_from_frame(strip.frame_final_duration),
translate=False)
- row = col.row()
+ row = col.row(align=True)
row.active = (frame_current >= strip.frame_start and frame_current <= strip.frame_start + strip.frame_duration)
row.label(text=iface_("Playhead: %d") % (frame_current - strip.frame_start), translate=False)
@@ -548,7 +547,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel):
layout.prop(strip, "multicam_source")
row = layout.row(align=True)
- sub = row.row()
+ sub = row.row(align=True)
sub.scale_x = 2.0
sub.operator("screen.animation_play", text="", icon='PAUSE' if context.screen.is_animation_playing else 'PLAY')
@@ -686,10 +685,15 @@ class SEQUENCER_PT_sound(SequencerButtonsPanel, Panel):
layout.prop(strip, "pan")
col = layout.column(align=True)
- col.label(text="Trim Duration:")
+ col.label(text="Trim Duration (hard):")
col.prop(strip, "animation_offset_start", text="Start")
col.prop(strip, "animation_offset_end", text="End")
+ col = layout.column(align=True)
+ col.label(text="Trim Duration (soft):")
+ col.prop(strip, "frame_offset_start", text="Start")
+ col.prop(strip, "frame_offset_end", text="End")
+
class SEQUENCER_PT_scene(SequencerButtonsPanel, Panel):
bl_label = "Scene"
@@ -924,8 +928,7 @@ class SEQUENCER_PT_modifiers(SequencerButtonsPanel, Panel):
props.name = mod.name
props.direction = 'DOWN'
- props = row.operator("sequencer.strip_modifier_remove", text="", icon='X', emboss=False)
- props.name = mod.name
+ row.operator("sequencer.strip_modifier_remove", text="", icon='X', emboss=False).name = mod.name
if mod.show_expanded:
row = box.row()
diff --git a/release/scripts/startup/bl_ui/space_text.py b/release/scripts/startup/bl_ui/space_text.py
index 4264fc95cea..32cb1009492 100644
--- a/release/scripts/startup/bl_ui/space_text.py
+++ b/release/scripts/startup/bl_ui/space_text.py
@@ -45,11 +45,11 @@ class TEXT_HT_header(Header):
row.menu("TEXT_MT_templates")
if text and text.is_modified:
- sub = row.row()
+ sub = row.row(align=True)
sub.alert = True
sub.operator("text.resolve_conflict", text="", icon='HELP')
- row.template_ID(st, "text", new="text.new", unlink="text.unlink")
+ row.template_ID(st, "text", new="text.new", unlink="text.unlink", open="text.open")
row = layout.row(align=True)
row.prop(st, "show_line_numbers", text="")
@@ -127,21 +127,21 @@ class TEXT_PT_find(Panel):
# find
col = layout.column(align=True)
- row = col.row()
+ row = col.row(align=True)
row.prop(st, "find_text", text="")
row.operator("text.find_set_selected", text="", icon='TEXT')
col.operator("text.find")
# replace
col = layout.column(align=True)
- row = col.row()
+ row = col.row(align=True)
row.prop(st, "replace_text", text="")
row.operator("text.replace_set_selected", text="", icon='TEXT')
col.operator("text.replace")
# settings
layout.prop(st, "use_match_case")
- row = layout.row()
+ row = layout.row(align=True)
row.prop(st, "use_find_wrap", text="Wrap")
row.prop(st, "use_find_all", text="All")
@@ -301,7 +301,7 @@ class TEXT_MT_edit(Menu):
layout.separator()
layout.operator("text.jump")
- layout.operator("text.properties", text="Find...")
+ layout.operator("text.start_find", text="Find...")
layout.operator("text.autocomplete")
layout.separator()
diff --git a/release/scripts/startup/bl_ui/space_time.py b/release/scripts/startup/bl_ui/space_time.py
index becdc792230..700d1004718 100644
--- a/release/scripts/startup/bl_ui/space_time.py
+++ b/release/scripts/startup/bl_ui/space_time.py
@@ -40,7 +40,9 @@ class TIME_HT_header(Header):
row.menu("TIME_MT_frame")
row.menu("TIME_MT_playback")
- layout.prop(scene, "use_preview_range", text="", toggle=True)
+ row = layout.row(align=True)
+ row.prop(scene, "use_preview_range", text="", toggle=True)
+ row.prop(scene, "lock_frame_selection_to_range", text="", toggle=True)
row = layout.row(align=True)
if not scene.use_preview_range:
@@ -62,14 +64,14 @@ class TIME_HT_header(Header):
# hide the play-reversed button
# since JACK transport doesn't support reversed playback
if scene.sync_mode == 'AUDIO_SYNC' and context.user_preferences.system.audio_device == 'JACK':
- sub = row.row()
+ sub = row.row(align=True)
sub.scale_x = 2.0
sub.operator("screen.animation_play", text="", icon='PLAY')
else:
row.operator("screen.animation_play", text="", icon='PLAY_REVERSE').reverse = True
row.operator("screen.animation_play", text="", icon='PLAY')
else:
- sub = row.row()
+ sub = row.row(align=True)
sub.scale_x = 2.0
sub.operator("screen.animation_play", text="", icon='PAUSE')
row.operator("screen.keyframe_jump", text="", icon='NEXT_KEYFRAME').next = True
@@ -85,7 +87,7 @@ class TIME_HT_header(Header):
row.prop(toolsettings, "use_keyframe_insert_keyingset", text="", toggle=True)
if screen.is_animation_playing:
- subsub = row.row()
+ subsub = row.row(align=True)
subsub.prop(toolsettings, "use_record_with_nla", toggle=True)
row = layout.row(align=True)
@@ -226,6 +228,11 @@ def marker_menu_generic(layout):
layout.operator("marker.rename", text="Rename Marker")
layout.operator("marker.move", text="Grab/Move Marker")
+
+ layout.separator()
+
+ layout.operator("screen.marker_jump", text="Jump to Next Marker").next = True
+ layout.operator("screen.marker_jump", text="Jump to Previous Marker").next = False
if __name__ == "__main__": # only for live edit.
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 3e281e08983..1e9c9e7ff7e 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -62,6 +62,7 @@ class USERPREF_HT_header(Header):
layout.operator("wm.keyconfig_export")
elif userpref.active_section == 'ADDONS':
layout.operator("wm.addon_install", icon="FILESEL")
+ layout.operator("wm.addon_refresh", icon='FILE_REFRESH')
layout.menu("USERPREF_MT_addons_dev_guides")
elif userpref.active_section == 'THEMES':
layout.operator("ui.reset_default_theme")
@@ -477,7 +478,7 @@ class USERPREF_PT_system(Panel):
column.prop(system, "language")
row = column.row()
row.label(text="Translate:", text_ctxt=i18n_contexts.id_windowmanager)
- row = column.row(True)
+ row = column.row(align=True)
row.prop(system, "use_translate_interface", text="Interface", toggle=True)
row.prop(system, "use_translate_tooltips", text="Tooltips", toggle=True)
row.prop(system, "use_translate_new_dataname", text="New Data", toggle=True)
@@ -1142,7 +1143,7 @@ class USERPREF_PT_addons(Panel):
scripts_addons_folder = bpy.utils.user_resource('SCRIPTS', "addons")
# collect the categories that can be filtered on
- addons = [(mod, addon_utils.module_bl_info(mod)) for mod in addon_utils.modules(addon_utils.addons_fake_modules)]
+ addons = [(mod, addon_utils.module_bl_info(mod)) for mod in addon_utils.modules(refresh=False)]
split = layout.split(percentage=0.2)
col = split.column()
@@ -1156,7 +1157,7 @@ class USERPREF_PT_addons(Panel):
col = split.column()
- # set in addon_utils.modules(...)
+ # set in addon_utils.modules_refresh()
if addon_utils.error_duplicates:
self.draw_error(col,
"Multiple addons using the same name found!\n"
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 58eecc2641d..4a36b714c33 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -120,16 +120,14 @@ class VIEW3D_HT_header(Header):
# OpenGL render
row = layout.row(align=True)
row.operator("render.opengl", text="", icon='RENDER_STILL')
- props = row.operator("render.opengl", text="", icon='RENDER_ANIMATION')
- props.animation = True
+ row.operator("render.opengl", text="", icon='RENDER_ANIMATION').animation = True
# Pose
if obj and mode == 'POSE':
row = layout.row(align=True)
row.operator("pose.copy", text="", icon='COPYDOWN')
row.operator("pose.paste", text="", icon='PASTEDOWN')
- props = row.operator("pose.paste", text="", icon='PASTEFLIPDOWN')
- props.flipped = 1
+ row.operator("pose.paste", text="", icon='PASTEFLIPDOWN').flipped = 1
# ********** Menu **********
@@ -293,10 +291,8 @@ class VIEW3D_MT_snap(Menu):
layout = self.layout
layout.operator("view3d.snap_selected_to_grid", text="Selection to Grid")
- props = layout.operator("view3d.snap_selected_to_cursor", text="Selection to Cursor")
- props.use_offset = False
- props = layout.operator("view3d.snap_selected_to_cursor", text="Selection to Cursor (Offset)")
- props.use_offset = True
+ layout.operator("view3d.snap_selected_to_cursor", text="Selection to Cursor").use_offset = False
+ layout.operator("view3d.snap_selected_to_cursor", text="Selection to Cursor (Offset)").use_offset = True
layout.separator()
@@ -403,12 +399,18 @@ class VIEW3D_MT_view_navigation(Menu):
bl_label = "Navigation"
def draw(self, context):
+ from math import pi
layout = self.layout
layout.operator_enum("view3d.view_orbit", "type")
layout.separator()
+ layout.operator("view3d.view_roll", text="Roll Left").angle = pi / -12.0
+ layout.operator("view3d.view_roll", text="Roll Right").angle = pi / 12.0
+
+ layout.separator()
+
layout.operator_enum("view3d.view_pan", "type")
layout.separator()
@@ -714,6 +716,10 @@ class VIEW3D_MT_select_edit_metaball(Menu):
layout.operator("mball.select_random_metaelems")
+ layout.separator()
+
+ layout.operator_menu_enum("mball.select_similar", "type", text="Similar")
+
class VIEW3D_MT_select_edit_lattice(Menu):
bl_label = "Select"
@@ -1828,6 +1834,7 @@ class VIEW3D_MT_edit_mesh(Menu):
layout.operator("mesh.symmetrize")
layout.operator("mesh.symmetry_snap")
+ layout.operator("mesh.bisect")
layout.operator_menu_enum("mesh.sort_elements", "type", text="Sort Elements...")
layout.separator()
@@ -1906,10 +1913,16 @@ class VIEW3D_MT_edit_mesh_extrude(Menu):
bl_label = "Extrude"
_extrude_funcs = {
- 'VERT': lambda layout: layout.operator("mesh.extrude_vertices_move", text="Vertices Only"),
- 'EDGE': lambda layout: layout.operator("mesh.extrude_edges_move", text="Edges Only"),
- 'FACE': lambda layout: layout.operator("mesh.extrude_faces_move", text="Individual Faces"),
- 'REGION': lambda layout: layout.operator("view3d.edit_mesh_extrude_move_normal", text="Region"),
+ 'VERT': lambda layout:
+ layout.operator("mesh.extrude_vertices_move", text="Vertices Only"),
+ 'EDGE': lambda layout:
+ layout.operator("mesh.extrude_edges_move", text="Edges Only"),
+ 'FACE': lambda layout:
+ layout.operator("mesh.extrude_faces_move", text="Individual Faces"),
+ 'REGION': lambda layout:
+ layout.operator("view3d.edit_mesh_extrude_move_normal", text="Region"),
+ 'REGION_VERT_NORMAL': lambda layout:
+ layout.operator("view3d.edit_mesh_extrude_move_shrink_fatten", text="Region (Vertex Normals)"),
}
@staticmethod
@@ -1919,7 +1932,7 @@ class VIEW3D_MT_edit_mesh_extrude(Menu):
menu = []
if mesh.total_face_sel:
- menu += ['REGION', 'FACE']
+ menu += ['REGION', 'REGION_VERT_NORMAL', 'FACE']
if mesh.total_edge_sel and (select_mode[0] or select_mode[1]):
menu += ['EDGE']
if mesh.total_vert_sel and select_mode[0]:
@@ -2088,7 +2101,7 @@ class VIEW3D_MT_edit_mesh_normals(Menu):
class VIEW3D_MT_edit_mesh_clean(Menu):
- bl_label = "Clean"
+ bl_label = "Clean up"
def draw(self, context):
layout = self.layout
@@ -2141,6 +2154,7 @@ def draw_curve(self, context):
layout.operator("curve.extrude_move")
layout.operator("curve.duplicate_move")
+ layout.operator("curve.split")
layout.operator("curve.separate")
layout.operator("curve.make_segment")
layout.operator("curve.cyclic_toggle")
@@ -2489,7 +2503,7 @@ class VIEW3D_PT_view3d_properties(Panel):
col.prop(view, "clip_start", text="Start")
col.prop(view, "clip_end", text="End")
- subcol = col.column()
+ subcol = col.column(align=True)
subcol.enabled = not view.lock_camera_and_layers
subcol.label(text="Local Camera:")
subcol.prop(view, "camera", text="")
@@ -2588,19 +2602,6 @@ class VIEW3D_PT_view3d_display(Panel):
subsub.active = scene.unit_settings.system == 'NONE'
subsub.prop(view, "grid_subdivisions", text="Subdivisions")
- if not scene.render.use_shading_nodes:
- col = layout.column()
- col.label(text="Shading:")
- col.prop(gs, "material_mode", text="")
- col.prop(view, "show_textured_solid")
- if view.viewport_shade == 'SOLID':
- col.prop(view, "use_matcap")
- if view.use_matcap:
- col.template_icon_view(view, "matcap_icon")
- col.prop(view, "show_backface_culling")
- if obj and obj.mode == 'EDIT' and view.viewport_shade not in {'BOUNDBOX', 'WIREFRAME'}:
- col.prop(view, "show_occlude_wire")
-
layout.separator()
region = view.region_quadview
@@ -2618,6 +2619,43 @@ class VIEW3D_PT_view3d_display(Panel):
row.prop(region, "use_box_clip")
+class VIEW3D_PT_view3d_shading(Panel):
+ bl_space_type = 'VIEW_3D'
+ bl_region_type = 'UI'
+ bl_label = "Shading"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ @classmethod
+ def poll(cls, context):
+ view = context.space_data
+ return (view)
+
+ def draw(self, context):
+ layout = self.layout
+
+ view = context.space_data
+ scene = context.scene
+ gs = scene.game_settings
+ obj = context.object
+
+ col = layout.column()
+
+ if not scene.render.use_shading_nodes:
+ col.prop(gs, "material_mode", text="")
+ col.prop(view, "show_textured_solid")
+
+ if view.viewport_shade == 'SOLID':
+ col.prop(view, "use_matcap")
+ if view.use_matcap:
+ col.template_icon_view(view, "matcap_icon")
+ elif view.viewport_shade == 'TEXTURED':
+ col.prop(view, "show_textured_shadeless")
+
+ col.prop(view, "show_backface_culling")
+ if obj and obj.mode == 'EDIT' and view.viewport_shade not in {'BOUNDBOX', 'WIREFRAME'}:
+ col.prop(view, "show_occlude_wire")
+
+
class VIEW3D_PT_view3d_motion_tracking(Panel):
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
@@ -2777,9 +2815,9 @@ class VIEW3D_PT_view3d_curvedisplay(Panel):
curve = context.active_object.data
col = layout.column()
- col.label(text="Overlays:")
- col.prop(curve, "show_handles", text="Handles")
- col.prop(curve, "show_normal_face", text="Normals")
+ row = col.row()
+ row.prop(curve, "show_handles", text="Handles")
+ row.prop(curve, "show_normal_face", text="Normals")
col.prop(context.scene.tool_settings, "normal_size", text="Normal Size")
@@ -2942,7 +2980,7 @@ class VIEW3D_PT_etch_a_ton(Panel):
colsub = col.column(align=True)
colsub.prop(toolsettings, "use_etch_autoname")
- sub = colsub.column()
+ sub = colsub.column(align=True)
sub.enabled = not toolsettings.use_etch_autoname
sub.prop(toolsettings, "etch_number")
sub.prop(toolsettings, "etch_side")
@@ -2999,6 +3037,3 @@ def unregister():
if __name__ == "__main__":
register()
-
-if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index f253801f431..088dfc31973 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -43,7 +43,7 @@ def draw_repeat_tools(context, layout):
def draw_keyframing_tools(context, layout):
col = layout.column(align=True)
col.label(text="Keyframes:")
- row = col.row()
+ row = col.row(align=True)
row.operator("anim.keyframe_insert_menu", text="Insert")
row.operator("anim.keyframe_delete_v3d", text="Remove")
@@ -54,15 +54,15 @@ def draw_gpencil_tools(context, layout):
col.label(text="Grease Pencil:")
- row = col.row()
+ row = col.row(align=True)
row.operator("gpencil.draw", text="Draw").mode = 'DRAW'
row.operator("gpencil.draw", text="Line").mode = 'DRAW_STRAIGHT'
- row = col.row()
+ row = col.row(align=True)
row.operator("gpencil.draw", text="Poly").mode = 'DRAW_POLY'
row.operator("gpencil.draw", text="Erase").mode = 'ERASER'
- row = col.row()
+ row = col.row(align=True)
row.prop(context.tool_settings, "use_grease_pencil_sessions")
col.operator("view3d.ruler")
@@ -112,7 +112,6 @@ class VIEW3D_PT_tools_objectmode(View3DPanel, Panel):
draw_repeat_tools(context, layout)
draw_gpencil_tools(context, layout)
- col = layout.column(align=True)
class VIEW3D_PT_tools_rigidbody(View3DPanel, Panel):
@@ -125,10 +124,10 @@ class VIEW3D_PT_tools_rigidbody(View3DPanel, Panel):
col = layout.column(align=True)
col.label(text="Add/Remove:")
- row = col.row()
+ row = col.row(align=True)
row.operator("rigidbody.objects_add", text="Add Active").type = 'ACTIVE'
row.operator("rigidbody.objects_add", text="Add Passive").type = 'PASSIVE'
- row = col.row()
+ row = col.row(align=True)
row.operator("rigidbody.objects_remove", text="Remove")
col = layout.column(align=True)
@@ -136,6 +135,7 @@ class VIEW3D_PT_tools_rigidbody(View3DPanel, Panel):
col.operator("rigidbody.shape_change", text="Change Shape")
col.operator("rigidbody.mass_calculate", text="Calculate Mass")
col.operator("rigidbody.object_settings_copy", text="Copy from Active")
+ col.operator("object.visual_transform_apply", text="Apply Transformation")
col.operator("rigidbody.bake_to_keyframes", text="Bake To Keyframes")
col.label(text="Constraints:")
col.operator("rigidbody.connect", text="Connect")
@@ -175,8 +175,9 @@ class VIEW3D_PT_tools_meshedit(View3DPanel, Panel):
col.operator("mesh.subdivide")
col.operator("mesh.loopcut_slide")
col.operator("mesh.duplicate_move", text="Duplicate")
- col.operator("mesh.spin")
- col.operator("mesh.screw")
+ row = col.row(align=True)
+ row.operator("mesh.spin")
+ row.operator("mesh.screw")
row = col.row(align=True)
props = row.operator("mesh.knife_tool", text="Knife")
@@ -186,6 +187,7 @@ class VIEW3D_PT_tools_meshedit(View3DPanel, Panel):
props.use_occlude_geometry = False
props.only_selected = True
col.operator("mesh.knife_project")
+ col.operator("mesh.bisect")
col = layout.column(align=True)
col.label(text="Remove:")
@@ -234,7 +236,7 @@ class VIEW3D_PT_tools_meshedit_options(View3DPanel, Panel):
col = layout.column(align=True)
col.prop(mesh, "use_mirror_x")
- row = col.row()
+ row = col.row(align=True)
row.active = ob.data.use_mirror_x
row.prop(mesh, "use_mirror_topology")
@@ -280,10 +282,10 @@ class VIEW3D_PT_tools_curveedit(View3DPanel, Panel):
col = layout.column(align=True)
col.label(text="Handles:")
- row = col.row()
+ row = col.row(align=True)
row.operator("curve.handle_type_set", text="Auto").type = 'AUTOMATIC'
row.operator("curve.handle_type_set", text="Vector").type = 'VECTOR'
- row = col.row()
+ row = col.row(align=True)
row.operator("curve.handle_type_set", text="Align").type = 'ALIGNED'
row.operator("curve.handle_type_set", text="Free").type = 'FREE_ALIGN'
@@ -462,14 +464,14 @@ class VIEW3D_PT_tools_posemode(View3DPanel, Panel):
col = layout.column(align=True)
col.label(text="In-Between:")
- row = col.row()
+ row = col.row(align=True)
row.operator("pose.push", text="Push")
row.operator("pose.relax", text="Relax")
col.operator("pose.breakdown", text="Breakdowner")
col = layout.column(align=True)
col.label(text="Pose:")
- row = col.row()
+ row = col.row(align=True)
row.operator("pose.copy", text="Copy")
row.operator("pose.paste", text="Paste")
@@ -608,8 +610,8 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
# use_original_normal and sculpt_plane
if capabilities.has_sculpt_plane:
- row = col.row(align=True)
col.separator()
+ row = col.row(align=True)
if brush.use_original_normal:
row.prop(brush, "use_original_normal", toggle=True, text="", icon='LOCKED')
@@ -672,19 +674,6 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
col.prop(brush, "use_persistent")
col.operator("sculpt.set_persistent_base")
- col = layout.column(align=True)
- col.label(text="Overlay:")
-
- row = col.row()
- if brush.use_cursor_overlay:
- row.prop(brush, "use_cursor_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
- else:
- row.prop(brush, "use_cursor_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
-
- sub = row.row()
- sub.prop(brush, "cursor_overlay_alpha", text="Alpha")
- sub.prop(brush, "use_cursor_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
-
# Texture Paint Mode #
elif context.image_paint_object and brush:
@@ -702,27 +691,12 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
self.prop_unified_strength(row, context, brush, "strength", text="Strength")
self.prop_unified_strength(row, context, brush, "use_pressure_strength")
- row = col.row(align=True)
-
col.prop(brush, "blend", text="Blend")
col = layout.column()
col.active = (brush.blend not in {'ERASE_ALPHA', 'ADD_ALPHA'})
col.prop(brush, "use_alpha")
- col = layout.column(align=True)
- col.label(text="Overlay:")
-
- row = col.row()
- if brush.use_cursor_overlay:
- row.prop(brush, "use_cursor_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
- else:
- row.prop(brush, "use_cursor_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
-
- sub = row.row()
- sub.prop(brush, "cursor_overlay_alpha", text="Alpha")
- sub.prop(brush, "use_cursor_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
-
# Weight Paint Mode #
elif context.weight_paint_object and brush:
@@ -739,8 +713,6 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
self.prop_unified_strength(row, context, brush, "strength", text="Strength")
self.prop_unified_strength(row, context, brush, "use_pressure_strength")
- row = col.row(align=True)
-
col.prop(brush, "vertex_tool", text="Blend")
col = layout.column()
@@ -768,18 +740,71 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
col.prop(brush, "vertex_tool", text="Blend")
- col = layout.column(align=True)
- col.label(text="Overlay:")
+class VIEW3D_PT_tools_brush_overlay(Panel, View3DPaintPanel):
+ bl_label = "Overlay"
+ bl_options = {'DEFAULT_CLOSED'}
- row = col.row()
- if brush.use_cursor_overlay:
- row.prop(brush, "use_cursor_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
- else:
- row.prop(brush, "use_cursor_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
+ @classmethod
+ def poll(cls, context):
+ settings = cls.paint_settings(context)
+ return (settings and
+ settings.brush and
+ (context.sculpt_object or
+ context.vertex_paint_object or
+ context.weight_paint_object or
+ context.image_paint_object))
+
+
+ def draw(self, context):
+ layout = self.layout
- sub = row.row()
- sub.prop(brush, "cursor_overlay_alpha", text="Alpha")
- sub.prop(brush, "use_cursor_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
+ settings = self.paint_settings(context)
+ brush = settings.brush
+ tex_slot = brush.texture_slot
+ tex_slot_mask = brush.mask_texture_slot
+
+ col = layout.column()
+
+ col.label(text="Curve:")
+
+ row = col.row(align=True)
+ if brush.use_cursor_overlay:
+ row.prop(brush, "use_cursor_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
+ else:
+ row.prop(brush, "use_cursor_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
+
+ sub = row.row(align=True)
+ sub.prop(brush, "cursor_overlay_alpha", text="Alpha")
+ sub.prop(brush, "use_cursor_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
+
+ col.active = brush.brush_capabilities.has_overlay
+
+ if context.image_paint_object or context.sculpt_object or context.vertex_paint_object:
+ col.label(text="Texture:")
+ row = col.row(align=True)
+ if tex_slot.map_mode != 'STENCIL':
+ if brush.use_primary_overlay:
+ row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
+ else:
+ row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
+
+ sub = row.row(align=True)
+ sub.prop(brush, "texture_overlay_alpha", text="Alpha")
+ sub.prop(brush, "use_primary_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
+
+ if context.image_paint_object:
+ col.label(text="Mask Texture:")
+
+ row = col.row(align=True)
+ if tex_slot_mask.map_mode != 'STENCIL':
+ if brush.use_secondary_overlay:
+ row.prop(brush, "use_secondary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
+ else:
+ row.prop(brush, "use_secondary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
+
+ sub = row.row(align=True)
+ sub.prop(brush, "mask_overlay_alpha", text="Alpha")
+ sub.prop(brush, "use_secondary_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
class VIEW3D_PT_tools_brush_texture(Panel, View3DPaintPanel):
@@ -805,22 +830,6 @@ class VIEW3D_PT_tools_brush_texture(Panel, View3DPaintPanel):
brush_texture_settings(col, brush, context.sculpt_object)
- # use_texture_overlay and texture_overlay_alpha
- col = layout.column(align=True)
- col.active = brush.brush_capabilities.has_overlay
- col.label(text="Overlay:")
-
- row = col.row()
- if tex_slot.map_mode != 'STENCIL':
- if brush.use_primary_overlay:
- row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
- else:
- row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
-
- sub = row.row()
- sub.prop(brush, "texture_overlay_alpha", text="Alpha")
- sub.prop(brush, "use_primary_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
-
class VIEW3D_PT_tools_mask_texture(View3DPanel, Panel):
bl_context = "imagepaint"
@@ -844,21 +853,6 @@ class VIEW3D_PT_tools_mask_texture(View3DPanel, Panel):
brush_mask_texture_settings(col, brush)
- col = layout.column(align=True)
- col.active = brush.brush_capabilities.has_overlay
- col.label(text="Overlay:")
-
- row = col.row()
- if tex_slot_alpha.map_mode != 'STENCIL':
- if brush.use_secondary_overlay:
- row.prop(brush, "use_secondary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
- else:
- row.prop(brush, "use_secondary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
-
- sub = row.row()
- sub.prop(brush, "mask_overlay_alpha", text="Alpha")
- sub.prop(brush, "use_secondary_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
-
class VIEW3D_PT_tools_brush_stroke(Panel, View3DPaintPanel):
bl_label = "Stroke"
@@ -916,6 +910,7 @@ class VIEW3D_PT_tools_brush_stroke(Panel, View3DPaintPanel):
row.prop(brush, "use_relative_jitter", text="", icon='UNLOCKED')
row.prop(brush, "jitter_absolute")
row.prop(brush, "use_pressure_jitter", toggle=True, text="")
+
if brush.sculpt_capabilities.has_smooth_stroke:
col = layout.column()
col.separator()
@@ -948,6 +943,8 @@ class VIEW3D_PT_tools_brush_stroke(Panel, View3DPaintPanel):
sub.prop(brush, "smooth_stroke_radius", text="Radius", slider=True)
sub.prop(brush, "smooth_stroke_factor", text="Factor", slider=True)
+ layout.prop(settings, "input_samples")
+
class VIEW3D_PT_tools_brush_curve(Panel, View3DPaintPanel):
bl_label = "Curve"
@@ -1031,8 +1028,6 @@ class VIEW3D_PT_sculpt_options(Panel, View3DPaintPanel):
layout.prop(sculpt, "use_deform_only")
layout.prop(sculpt, "show_diffuse_color")
- layout.prop(sculpt, "input_samples")
-
self.unified_paint_settings(layout, context)
@@ -1051,7 +1046,7 @@ class VIEW3D_PT_sculpt_symmetry(Panel, View3DPaintPanel):
col = layout.column(align=True)
col.label(text="Mirror:")
- row = col.row()
+ row = col.row(align=True)
row.prop(sculpt, "use_symmetry_x", text="X", toggle=True)
row.prop(sculpt, "use_symmetry_y", text="Y", toggle=True)
row.prop(sculpt, "use_symmetry_z", text="Z", toggle=True)
@@ -1139,11 +1134,14 @@ class VIEW3D_PT_tools_weightpaint_options(Panel, View3DPaintPanel):
wpaint = tool_settings.weight_paint
col = layout.column()
+ row = col.row()
- col.prop(wpaint, "use_all_faces")
- col.prop(wpaint, "use_normal")
- col.prop(wpaint, "use_spray")
- col.prop(wpaint, "use_group_restrict")
+ row.prop(wpaint, "use_all_faces")
+ row.prop(wpaint, "use_normal")
+ col = layout.column()
+ row = col.row()
+ row.prop(wpaint, "use_spray")
+ row.prop(wpaint, "use_group_restrict")
obj = context.weight_paint_object
if obj.type == 'MESH':
@@ -1153,8 +1151,6 @@ class VIEW3D_PT_tools_weightpaint_options(Panel, View3DPaintPanel):
row.active = mesh.use_mirror_x
row.prop(mesh, "use_mirror_topology")
- col.prop(wpaint, "input_samples")
-
col.label("Show Zero Weights:")
sub = col.row()
sub.active = (not tool_settings.use_multipaint)
@@ -1176,13 +1172,12 @@ class VIEW3D_PT_tools_vertexpaint(Panel, View3DPaintPanel):
vpaint = toolsettings.vertex_paint
col = layout.column()
+ row = col.row()
#col.prop(vpaint, "mode", text="")
- col.prop(vpaint, "use_all_faces")
- col.prop(vpaint, "use_normal")
+ row.prop(vpaint, "use_all_faces")
+ row.prop(vpaint, "use_normal")
col.prop(vpaint, "use_spray")
- col.prop(vpaint, "input_samples")
-
self.unified_paint_settings(col, context)
# Commented out because the Apply button isn't an operator yet, making these settings useless
@@ -1212,8 +1207,6 @@ class VIEW3D_PT_tools_projectpaint(View3DPanel, Panel):
ipaint = toolsettings.image_paint
settings = toolsettings.image_paint
- layout.prop(ipaint, "input_samples")
-
col = layout.column()
col.prop(ipaint, "use_occlude")
col.prop(ipaint, "use_backface_culling")
@@ -1333,7 +1326,7 @@ class VIEW3D_PT_tools_particlemode(View3DPanel, Panel):
if pe.is_hair:
col.active = pe.is_editable
col.prop(pe, "use_emitter_deflect", text="Deflect emitter")
- sub = col.row()
+ sub = col.row(align=True)
sub.active = pe.use_emitter_deflect
sub.prop(pe, "emitter_distance", text="Distance")
@@ -1357,7 +1350,7 @@ class VIEW3D_PT_tools_particlemode(View3DPanel, Panel):
if pe.type == 'PARTICLES':
col.prop(pe, "show_particles", text="Particles")
col.prop(pe, "use_fade_time")
- sub = col.row()
+ sub = col.row(align=True)
sub.active = pe.use_fade_time
sub.prop(pe, "fade_frames", slider=True)
diff --git a/release/scripts/startup/nodeitems_builtins.py b/release/scripts/startup/nodeitems_builtins.py
index 6a5dccaed88..71ff547f6da 100644
--- a/release/scripts/startup/nodeitems_builtins.py
+++ b/release/scripts/startup/nodeitems_builtins.py
@@ -186,6 +186,7 @@ shader_node_categories = [
NodeItem("ShaderNodeBsdfToon"),
NodeItem("ShaderNodeSubsurfaceScattering"),
NodeItem("ShaderNodeEmission"),
+ NodeItem("ShaderNodeBsdfHair"),
NodeItem("ShaderNodeBackground"),
NodeItem("ShaderNodeAmbientOcclusion"),
NodeItem("ShaderNodeHoldout"),
diff --git a/release/scripts/templates_py/custom_nodes.py b/release/scripts/templates_py/custom_nodes.py
index 5f002f37161..975ae1881f2 100644
--- a/release/scripts/templates_py/custom_nodes.py
+++ b/release/scripts/templates_py/custom_nodes.py
@@ -40,7 +40,7 @@ class MyCustomSocket(NodeSocket):
# Optional function for drawing the socket input value
def draw(self, context, layout, node, text):
- if self.is_linked:
+ if self.is_output or self.is_linked:
layout.label(text)
else:
layout.prop(self, "myEnumProperty", text=text)
diff --git a/release/scripts/templates_py/operator_uv.py b/release/scripts/templates_py/operator_mesh_uv.py
index 96e624bc30d..96e624bc30d 100644
--- a/release/scripts/templates_py/operator_uv.py
+++ b/release/scripts/templates_py/operator_mesh_uv.py
diff --git a/release/scripts/templates_py/operator_modal_timer.py b/release/scripts/templates_py/operator_modal_timer.py
index 3088d59fbcf..b8211126daf 100644
--- a/release/scripts/templates_py/operator_modal_timer.py
+++ b/release/scripts/templates_py/operator_modal_timer.py
@@ -9,7 +9,7 @@ class ModalTimerOperator(bpy.types.Operator):
_timer = None
def modal(self, context, event):
- if event.type == 'ESC':
+ if event.type in {'RIGHTMOUSE', 'ESC'}:
return self.cancel(context)
if event.type == 'TIMER':
@@ -21,12 +21,14 @@ class ModalTimerOperator(bpy.types.Operator):
return {'PASS_THROUGH'}
def execute(self, context):
- self._timer = context.window_manager.event_timer_add(0.1, context.window)
- context.window_manager.modal_handler_add(self)
+ wm = context.window_manager
+ self._timer = wm.event_timer_add(0.1, context.window)
+ wm.modal_handler_add(self)
return {'RUNNING_MODAL'}
def cancel(self, context):
- context.window_manager.event_timer_remove(self._timer)
+ wm = context.window_manager
+ wm.event_timer_remove(self._timer)
return {'CANCELLED'}
diff --git a/release/scripts/templates_py/script_stub.py b/release/scripts/templates_py/script_stub.py
index 44c7b802e2c..3f56749f3b3 100644
--- a/release/scripts/templates_py/script_stub.py
+++ b/release/scripts/templates_py/script_stub.py
@@ -9,6 +9,6 @@ filename = "my_script.py"
filepath = os.path.join(os.path.dirname(bpy.data.filepath), filename)
global_namespace = {"__file__": filepath, "__name__": "__main__"}
-file = open(filepath, 'rb')
-exec(compile(file.read(), filepath, 'exec'), global_namespace)
-file.close()
+with open(filepath, 'rb') as file:
+ exec(compile(file.read(), filepath, 'exec'), global_namespace)
+
diff --git a/release/scripts/templates_py/ui_list.py b/release/scripts/templates_py/ui_list.py
index f71b342c854..92e1b29d2ae 100644
--- a/release/scripts/templates_py/ui_list.py
+++ b/release/scripts/templates_py/ui_list.py
@@ -1,79 +1,45 @@
import bpy
-class MATERIAL_UL_matslots_example(bpy.types.UIList):
- # The draw_item function is called for each item of the collection that is visible in the list.
- # data is the RNA object containing the collection,
- # item is the current drawn item of the collection,
- # icon is the "computed" icon for the item (as an integer, because some objects like materials or textures
- # have custom icons ID, which are not available as enum items).
- # active_data is the RNA object containing the active property for the collection (i.e. integer pointing to the
- # active item of the collection).
- # active_propname is the name of the active property (use 'getattr(active_data, active_propname)').
- # index is index of the current item in the collection.
- def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
- ob = data
- slot = item
- ma = slot.material
- # draw_item must handle the three layout types... Usually 'DEFAULT' and 'COMPACT' can share the same code.
+class MESH_UL_mylist(bpy.types.UIList):
+ # Constants (flags)
+ # Be careful not to shadow FILTER_ITEM (i.e. UIList().bitflag_filter_item)!
+ # E.g. VGROUP_EMPTY = 1 << 0
+
+ # Custom properties, saved with .blend file. E.g.
+ # use_filter_empty = bpy.props.BoolProperty(name="Filter Empty", default=False, options=set(),
+ # description="Whether to filter empty vertex groups")
+
+ # Called for each drawn item.
+ def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index, flt_flag):
+ # 'DEFAULT' and 'COMPACT' layout types should usually use the same draw code.
if self.layout_type in {'DEFAULT', 'COMPACT'}:
- # You should always start your row layout by a label (icon + text), this will also make the row easily
- # selectable in the list!
- # We use icon_value of label, as our given icon is an integer value, not an enum ID.
- # Note "data" names should never be translated!
- layout.label(text=ma.name if ma else "", translate=False, icon_value=icon)
- # And now we can add other UI stuff...
- # Here, we add nodes info if this material uses (old!) shading nodes.
- if ma and not context.scene.render.use_shading_nodes:
- manode = ma.active_node_material
- if manode:
- # The static method UILayout.icon returns the integer value of the icon ID "computed" for the given
- # RNA object.
- layout.label(text="Node %s" % manode.name, translate=False, icon_value=layout.icon(manode))
- elif ma.use_nodes:
- layout.label(text="Node <none>", translate=False)
- else:
- layout.label(text="")
+ pass
# 'GRID' layout type should be as compact as possible (typically a single icon!).
elif self.layout_type in {'GRID'}:
- layout.alignment = 'CENTER'
- layout.label(text="", icon_value=icon)
-
-
-# And now we can use this list everywhere in Blender. Here is a small example panel.
-class UIListPanelExample(bpy.types.Panel):
- """Creates a Panel in the Object properties window"""
- bl_label = "UIList Panel"
- bl_idname = "OBJECT_PT_ui_list_example"
- bl_space_type = 'PROPERTIES'
- bl_region_type = 'WINDOW'
- bl_context = "object"
-
- def draw(self, context):
- layout = self.layout
-
- obj = context.object
-
- # template_list now takes two new args.
- # The first one is the identifier of the registered UIList to use (if you want only the default list,
- # with no custom draw code, use "UI_UL_list").
- layout.template_list("MATERIAL_UL_matslots_example", "", obj, "material_slots", obj, "active_material_index")
-
- # The second one can usually be left as an empty string. It's an additional ID used to distinguish lists in case you
- # use the same list several times in a given area.
- layout.template_list("MATERIAL_UL_matslots_example", "compact", obj, "material_slots",
- obj, "active_material_index", type='COMPACT')
-
-
-def register():
- bpy.utils.register_class(MATERIAL_UL_matslots_example)
- bpy.utils.register_class(UIListPanelExample)
-
-
-def unregister():
- bpy.utils.unregister_class(MATERIAL_UL_matslots_example)
- bpy.utils.unregister_class(UIListPanelExample)
-
-
-if __name__ == "__main__":
- register() \ No newline at end of file
+ pass
+
+ # Called once to draw filtering/reordering options.
+ def draw_filter(self, context, layout):
+ # Nothing much to say here, it's usual UI code...
+ pass
+
+ # Called once to filter/reorder items.
+ def filter_items(self, context, data, propname):
+ # This function gets the collection property (as the usual tuple (data, propname)), and must return two lists:
+ # * The first one is for filtering, it must contain 32bit integers were self.bitflag_filter_item marks the
+ # matching item as filtered (i.e. to be shown), and 31 other bits are free for custom needs. Here we use the
+ # first one to mark VGROUP_EMPTY.
+ # * The second one is for reordering, it must return a list containing the new indices of the items (which
+ # gives us a mapping org_idx -> new_idx).
+ # Please note that the default UI_UL_list defines helper functions for common tasks (see its doc for more info).
+ # If you do not make filtering and/or ordering, return empty list(s) (this will be more efficient than
+ # returning full lists doing nothing!).
+
+ # Default return values.
+ flt_flags = []
+ flt_neworder = []
+
+ # Do filtering/reordering here...
+
+ return flt_flags, flt_neworder
diff --git a/release/scripts/templates_py/ui_list_simple.py b/release/scripts/templates_py/ui_list_simple.py
new file mode 100644
index 00000000000..815d62ad734
--- /dev/null
+++ b/release/scripts/templates_py/ui_list_simple.py
@@ -0,0 +1,82 @@
+import bpy
+
+
+class MATERIAL_UL_matslots_example(bpy.types.UIList):
+ # The draw_item function is called for each item of the collection that is visible in the list.
+ # data is the RNA object containing the collection,
+ # item is the current drawn item of the collection,
+ # icon is the "computed" icon for the item (as an integer, because some objects like materials or textures
+ # have custom icons ID, which are not available as enum items).
+ # active_data is the RNA object containing the active property for the collection (i.e. integer pointing to the
+ # active item of the collection).
+ # active_propname is the name of the active property (use 'getattr(active_data, active_propname)').
+ # index is index of the current item in the collection.
+ # flt_flag is the result of the filtering process for this item.
+ # Note: as index and flt_flag are optional arguments, you do not have to use/declare them here if you don't
+ # need them.
+ def draw_item(self, context, layout, data, item, icon, active_data, active_propname):
+ ob = data
+ slot = item
+ ma = slot.material
+ # draw_item must handle the three layout types... Usually 'DEFAULT' and 'COMPACT' can share the same code.
+ if self.layout_type in {'DEFAULT', 'COMPACT'}:
+ # You should always start your row layout by a label (icon + text), this will also make the row easily
+ # selectable in the list!
+ # We use icon_value of label, as our given icon is an integer value, not an enum ID.
+ # Note "data" names should never be translated!
+ layout.label(text=ma.name if ma else "", translate=False, icon_value=icon)
+ # And now we can add other UI stuff...
+ # Here, we add nodes info if this material uses (old!) shading nodes.
+ if ma and not context.scene.render.use_shading_nodes:
+ manode = ma.active_node_material
+ if manode:
+ # The static method UILayout.icon returns the integer value of the icon ID "computed" for the given
+ # RNA object.
+ layout.label(text="Node %s" % manode.name, translate=False, icon_value=layout.icon(manode))
+ elif ma.use_nodes:
+ layout.label(text="Node <none>", translate=False)
+ else:
+ layout.label(text="")
+ # 'GRID' layout type should be as compact as possible (typically a single icon!).
+ elif self.layout_type in {'GRID'}:
+ layout.alignment = 'CENTER'
+ layout.label(text="", icon_value=icon)
+
+
+# And now we can use this list everywhere in Blender. Here is a small example panel.
+class UIListPanelExample(bpy.types.Panel):
+ """Creates a Panel in the Object properties window"""
+ bl_label = "UIList Panel"
+ bl_idname = "OBJECT_PT_ui_list_example"
+ bl_space_type = 'PROPERTIES'
+ bl_region_type = 'WINDOW'
+ bl_context = "object"
+
+ def draw(self, context):
+ layout = self.layout
+
+ obj = context.object
+
+ # template_list now takes two new args.
+ # The first one is the identifier of the registered UIList to use (if you want only the default list,
+ # with no custom draw code, use "UI_UL_list").
+ layout.template_list("MATERIAL_UL_matslots_example", "", obj, "material_slots", obj, "active_material_index")
+
+ # The second one can usually be left as an empty string. It's an additional ID used to distinguish lists in case you
+ # use the same list several times in a given area.
+ layout.template_list("MATERIAL_UL_matslots_example", "compact", obj, "material_slots",
+ obj, "active_material_index", type='COMPACT')
+
+
+def register():
+ bpy.utils.register_class(MATERIAL_UL_matslots_example)
+ bpy.utils.register_class(UIListPanelExample)
+
+
+def unregister():
+ bpy.utils.unregister_class(MATERIAL_UL_matslots_example)
+ bpy.utils.unregister_class(UIListPanelExample)
+
+
+if __name__ == "__main__":
+ register()
diff --git a/release/text/readme.html b/release/text/readme.html
index 35057220c95..b15ea9b3847 100644
--- a/release/text/readme.html
+++ b/release/text/readme.html
@@ -12,18 +12,18 @@
</style>
</head>
<body>
-<p class="title"><b>Blender 2.68</b></p>
+<p class="title"><b>Blender 2.69</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 and FreeBSD and has a large world-wide community.</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 and Windows 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.68</b></p>
-<p class="body">The Blender Foundation and online developer community is proud to present Blender 2.68. This release is the ninth official stable release of the Blender 2.6 series, in which we will refine the 2.5 series and add exciting new features. <a href="http://www.blender.org/development/release-logs/blender-268/">More information about this release</a>.</p>
+<p class="header"><b>2.69</b></p>
+<p class="body">The Blender Foundation and online developer community is proud to present Blender 2.69. This release is the tenth official stable release of the Blender 2.6 series, in which we will refine the 2.5 series and add exciting new features. <a href="http://www.blender.org/development/release-logs/blender-269/">More information about this release</a>.</p>
<p><br></p>
<p class="header"><b>Bugs</b></p>
-<p class="body">Although Blender 2.68 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. 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.69 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. 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>
@@ -33,7 +33,7 @@
<p><br></p>
<p class="header"><b>Installation</b></p>
<p class="body"><b>Windows: </b>The download .zip contains a Blender folder. You may put this anywhere on your hard drive. To launch Blender, double-click on Blender.exe.</p>
-<p class="body"><b>Linux, FreeBSD: </b>Unpack the archive, Then run the Blender executable.</p>
+<p class="body"><b>Linux: </b>Unpack the archive, then run the Blender executable.</p>
<p class="body"><b>Mac OS X: </b>The downloaded package includes blender.app. Optionally copy this to your Applications folder, and add it to the dock by dragging it from there to the dock.</p>
<p></p>
<p class="body"><b>Installing Addons (all systems)</b> Addons can be installed from the user preferences addons section, download an addon as a .py or .zip file, then press the "Install Addon" button and select the file to install it.</p>
@@ -47,7 +47,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-268/">www.blender.org/development/release-logs/blender-268/</a><br>
+ Full release log <a href="http://www.blender.org/development/release-logs/blender-269/">www.blender.org/development/release-logs/blender-269/</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:2.6/Manual">wiki.blender.org/index.php/Doc:2.6/Manual</a><br>
User Forum <a href="http://www.blenderartists.org">www.blenderartists.org</a><br>
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
index 529aaac4923..391fdf42d28 100644
--- a/source/CMakeLists.txt
+++ b/source/CMakeLists.txt
@@ -28,9 +28,5 @@ add_subdirectory(blender)
if(WITH_GAMEENGINE)
add_subdirectory(gameengine)
endif()
-
-if(WINDOWS)
- add_subdirectory(icons)
-endif()
add_subdirectory(tests)
diff --git a/source/blender/CMakeLists.txt b/source/blender/CMakeLists.txt
index 7e327028a01..0d309523daf 100644
--- a/source/blender/CMakeLists.txt
+++ b/source/blender/CMakeLists.txt
@@ -117,6 +117,10 @@ if(WITH_IMAGE_OPENEXR)
add_subdirectory(imbuf/intern/openexr)
endif()
+if(WITH_OPENIMAGEIO)
+ add_subdirectory(imbuf/intern/oiio)
+endif()
+
if(WITH_IMAGE_DDS)
add_subdirectory(imbuf/intern/dds)
endif()
diff --git a/source/blender/SConscript b/source/blender/SConscript
index 66d54961131..de052f24c33 100644
--- a/source/blender/SConscript
+++ b/source/blender/SConscript
@@ -49,6 +49,9 @@ makesrna = SConscript('makesrna/SConscript')
if env['WITH_BF_PYTHON']:
SConscript(['python/SConscript'])
+if env['WITH_BF_OIIO']:
+ SConscript (['imbuf/intern/oiio/SConscript'])
+
if env['WITH_BF_DDS']:
SConscript (['imbuf/intern/dds/SConscript'])
diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c
index 15098d50531..d46df829295 100644
--- a/source/blender/blenfont/intern/blf_font.c
+++ b/source/blender/blenfont/intern/blf_font.c
@@ -50,6 +50,7 @@
#include "BLI_string_utf8.h"
#include "BLI_threads.h"
#include "BLI_linklist.h" /* linknode */
+#include "BLI_strict_flags.h"
#include "BIF_gl.h"
#include "BLF_api.h"
@@ -59,10 +60,6 @@
#include "blf_internal_types.h"
#include "blf_internal.h"
-#ifdef __GNUC__
-# pragma GCC diagnostic error "-Wsign-conversion"
-#endif
-
/* freetype2 handle ONLY for this file!. */
static FT_Library ft_lib;
static SpinLock ft_lib_mutex;
@@ -163,7 +160,7 @@ static void blf_font_ensure_ascii_table(FontBLF *font)
_kern_mode, \
&(_delta)) == 0) \
{ \
- _pen_x += _delta.x >> 6; \
+ _pen_x += (int)_delta.x >> 6; \
} \
} \
} (void)0
@@ -194,7 +191,7 @@ void blf_font_draw(FontBLF *font, const char *str, size_t len)
/* do not return this loop if clipped, we want every character tested */
blf_glyph_render(font, g, (float)pen_x, (float)pen_y);
- pen_x += g->advance;
+ pen_x += (int)g->advance;
g_prev = g;
}
}
@@ -221,7 +218,7 @@ void blf_font_draw_ascii(FontBLF *font, const char *str, size_t len)
/* do not return this loop if clipped, we want every character tested */
blf_glyph_render(font, g, (float)pen_x, (float)pen_y);
- pen_x += g->advance;
+ pen_x += (int)g->advance;
g_prev = g;
}
}
@@ -273,10 +270,11 @@ void blf_font_buffer(FontBLF *font, const char *str)
/* buffer specific vars */
FontBufInfoBLF *buf_info = &font->buf_info;
float b_col_float[4];
- const unsigned char b_col_char[4] = {buf_info->col[0] * 255,
- buf_info->col[1] * 255,
- buf_info->col[2] * 255,
- buf_info->col[3] * 255};
+ const unsigned char b_col_char[4] = {
+ (unsigned char)(buf_info->col[0] * 255),
+ (unsigned char)(buf_info->col[1] * 255),
+ (unsigned char)(buf_info->col[2] * 255),
+ (unsigned char)(buf_info->col[3] * 255)};
unsigned char *cbuf;
int chx, chy;
@@ -378,14 +376,27 @@ void blf_font_buffer(FontBLF *font, const char *str)
cbuf[0] = b_col_char[0];
cbuf[1] = b_col_char[1];
cbuf[2] = b_col_char[2];
- cbuf[3] = (alphatest = ((int)cbuf[3] + (int)b_col_char[3])) < 255 ? alphatest : 255;
+
+ alphatest = (int)cbuf[3] + (int)b_col_char[3];
+ if (alphatest < 255) {
+ cbuf[3] = (unsigned char)(alphatest);
+ }
+ else {
+ cbuf[3] = 255;
+ }
}
else {
- cbuf[0] = (b_col_char[0] * a) + (cbuf[0] * (1.0f - a));
- cbuf[1] = (b_col_char[1] * a) + (cbuf[1] * (1.0f - a));
- cbuf[2] = (b_col_char[2] * a) + (cbuf[2] * (1.0f - a));
- cbuf[3] = (alphatest = ((int)cbuf[3] + (int)((b_col_float[3] * a) * 255.0f))) <
- 255 ? alphatest : 255;
+ cbuf[0] = (unsigned char)((b_col_char[0] * a) + (cbuf[0] * (1.0f - a)));
+ cbuf[1] = (unsigned char)((b_col_char[1] * a) + (cbuf[1] * (1.0f - a)));
+ cbuf[2] = (unsigned char)((b_col_char[2] * a) + (cbuf[2] * (1.0f - a)));
+
+ alphatest = ((int)cbuf[3] + (int)((b_col_float[3] * a) * 255.0f));
+ if (alphatest < 255) {
+ cbuf[3] = (unsigned char)(alphatest);
+ }
+ else {
+ cbuf[3] = 255;
+ }
}
}
}
@@ -398,7 +409,7 @@ void blf_font_buffer(FontBLF *font, const char *str)
}
}
- pen_x += g->advance;
+ pen_x += (int)g->advance;
g_prev = g;
}
}
@@ -433,10 +444,10 @@ void blf_font_boundbox(FontBLF *font, const char *str, rctf *box)
if (has_kerning)
BLF_KERNING_STEP(font, kern_mode, g_prev, g, delta, pen_x);
- gbox.xmin = pen_x;
- gbox.xmax = pen_x + g->advance;
- gbox.ymin = g->box.ymin + pen_y;
- gbox.ymax = g->box.ymax + pen_y;
+ gbox.xmin = (float)pen_x;
+ gbox.xmax = (float)pen_x + g->advance;
+ gbox.ymin = g->box.ymin + (float)pen_y;
+ gbox.ymax = g->box.ymax + (float)pen_y;
if (gbox.xmin < box->xmin) box->xmin = gbox.xmin;
if (gbox.ymin < box->ymin) box->ymin = gbox.ymin;
@@ -444,7 +455,7 @@ void blf_font_boundbox(FontBLF *font, const char *str, rctf *box)
if (gbox.xmax > box->xmax) box->xmax = gbox.xmax;
if (gbox.ymax > box->ymax) box->ymax = gbox.ymax;
- pen_x += g->advance;
+ pen_x += (int)g->advance;
g_prev = g;
}
@@ -524,9 +535,7 @@ void blf_font_free(FontBLF *font)
GlyphCacheBLF *gc;
font->glyph_cache = NULL;
- while (font->cache.first) {
- gc = font->cache.first;
- BLI_remlink(&font->cache, gc);
+ while ((gc = BLI_pophead(&font->cache))) {
blf_glyph_cache_free(gc);
}
diff --git a/source/blender/blenfont/intern/blf_glyph.c b/source/blender/blenfont/intern/blf_glyph.c
index 37e874fa396..2a8e91299b4 100644
--- a/source/blender/blenfont/intern/blf_glyph.c
+++ b/source/blender/blenfont/intern/blf_glyph.c
@@ -56,9 +56,7 @@
#include "blf_internal_types.h"
#include "blf_internal.h"
-#ifdef __GNUC__
-# pragma GCC diagnostic error "-Wsign-conversion"
-#endif
+#include "BLI_strict_flags.h"
GlyphCacheBLF *blf_glyph_cache_find(FontBLF *font, unsigned int size, unsigned int dpi)
{
@@ -89,28 +87,28 @@ GlyphCacheBLF *blf_glyph_cache_new(FontBLF *font)
gc->textures = (GLuint *)MEM_mallocN(sizeof(GLuint) * 256, __func__);
gc->ntex = 256;
- gc->cur_tex = -1;
+ gc->cur_tex = BLF_CURTEX_UNSET;
gc->x_offs = 0;
gc->y_offs = 0;
gc->pad = 3;
- gc->num_glyphs = font->face->num_glyphs;
- gc->rem_glyphs = font->face->num_glyphs;
+ gc->num_glyphs = (int)font->face->num_glyphs;
+ gc->rem_glyphs = (int)font->face->num_glyphs;
gc->ascender = ((float)font->face->size->metrics.ascender) / 64.0f;
gc->descender = ((float)font->face->size->metrics.descender) / 64.0f;
if (FT_IS_SCALABLE(font->face)) {
- gc->max_glyph_width = (float)((font->face->bbox.xMax - font->face->bbox.xMin) *
- (((float)font->face->size->metrics.x_ppem) /
- ((float)font->face->units_per_EM)));
+ gc->max_glyph_width = (int)((float)(font->face->bbox.xMax - font->face->bbox.xMin) *
+ (((float)font->face->size->metrics.x_ppem) /
+ ((float)font->face->units_per_EM)));
- gc->max_glyph_height = (float)((font->face->bbox.yMax - font->face->bbox.yMin) *
- (((float)font->face->size->metrics.y_ppem) /
- ((float)font->face->units_per_EM)));
+ gc->max_glyph_height = (int)((float)(font->face->bbox.yMax - font->face->bbox.yMin) *
+ (((float)font->face->size->metrics.y_ppem) /
+ ((float)font->face->units_per_EM)));
}
else {
- gc->max_glyph_width = ((float)font->face->size->metrics.max_advance) / 64.0f;
- gc->max_glyph_height = ((float)font->face->size->metrics.height) / 64.0f;
+ gc->max_glyph_width = (int)(((float)font->face->size->metrics.max_advance) / 64.0f);
+ gc->max_glyph_height = (int)(((float)font->face->size->metrics.height) / 64.0f);
}
gc->p2_width = 0;
@@ -128,9 +126,7 @@ void blf_glyph_cache_clear(FontBLF *font)
for (gc = font->cache.first; gc; gc = gc->next) {
for (i = 0; i < 257; i++) {
- while (gc->bucket[i].first) {
- g = gc->bucket[i].first;
- BLI_remlink(&(gc->bucket[i]), g);
+ while ((g = BLI_pophead(&gc->bucket[i]))) {
blf_glyph_free(g);
}
}
@@ -145,15 +141,13 @@ void blf_glyph_cache_free(GlyphCacheBLF *gc)
int i;
for (i = 0; i < 257; i++) {
- while (gc->bucket[i].first) {
- g = gc->bucket[i].first;
- BLI_remlink(&(gc->bucket[i]), g);
+ while ((g = BLI_pophead(&gc->bucket[i]))) {
blf_glyph_free(g);
}
}
- if (gc->cur_tex > -1)
- glDeleteTextures(gc->cur_tex + 1, gc->textures);
+ if (gc->cur_tex != BLF_CURTEX_UNSET)
+ glDeleteTextures((int)gc->cur_tex + 1, gc->textures);
MEM_freeN((void *)gc->textures);
MEM_freeN(gc);
}
@@ -287,7 +281,7 @@ GlyphBLF *blf_glyph_add(FontBLF *font, unsigned int index, unsigned int c)
/* Font buffer uses only 0 or 1 values, Blender expects full 0..255 range */
int i;
for (i = 0; i < (g->width * g->height); i++) {
- bitmap.buffer[i] = 255 * bitmap.buffer[i];
+ bitmap.buffer[i] = bitmap.buffer[i] ? 255 : 0;
}
}
@@ -296,8 +290,8 @@ GlyphBLF *blf_glyph_add(FontBLF *font, unsigned int index, unsigned int c)
}
g->advance = ((float)slot->advance.x) / 64.0f;
- g->pos_x = slot->bitmap_left;
- g->pos_y = slot->bitmap_top;
+ g->pos_x = (float)slot->bitmap_left;
+ g->pos_y = (float)slot->bitmap_top;
g->pitch = slot->bitmap.pitch;
FT_Outline_Get_CBox(&(slot->outline), &bbox);
@@ -351,7 +345,7 @@ static void blf_texture5_draw(const float shadow_col[4], float uv[2][2], float x
const float *fp = soft;
float color[4];
- int dx, dy;
+ float dx, dy;
color[0] = shadow_col[0];
color[1] = shadow_col[1];
@@ -376,7 +370,7 @@ static void blf_texture3_draw(const float shadow_col[4], float uv[2][2], float x
const float *fp = soft;
float color[4];
- int dx, dy;
+ float dx, dy;
color[0] = shadow_col[0];
color[1] = shadow_col[1];
@@ -395,10 +389,10 @@ static void blf_texture3_draw(const float shadow_col[4], float uv[2][2], float x
static void blf_glyph_calc_rect(rctf *rect, GlyphBLF *g, float x, float y)
{
- rect->xmin = floor(x + g->pos_x);
- rect->xmax = rect->xmin + g->width;
+ rect->xmin = (float)floor(x + g->pos_x);
+ rect->xmax = rect->xmin + (float)g->width;
rect->ymin = y + g->pos_y;
- rect->ymax = y + g->pos_y - g->height;
+ rect->ymax = y + g->pos_y - (float)g->height;
}
void blf_glyph_render(FontBLF *font, GlyphBLF *g, float x, float y)
@@ -414,7 +408,7 @@ void blf_glyph_render(FontBLF *font, GlyphBLF *g, float x, float y)
if (font->max_tex_size == -1)
glGetIntegerv(GL_MAX_TEXTURE_SIZE, (GLint *)&font->max_tex_size);
- if (gc->cur_tex == -1) {
+ if (gc->cur_tex == BLF_CURTEX_UNSET) {
blf_glyph_cache_texture(font, gc);
gc->x_offs = gc->pad;
gc->y_offs = 0;
@@ -462,7 +456,7 @@ void blf_glyph_render(FontBLF *font, GlyphBLF *g, float x, float y)
g->uv[1][1] = ((float)(g->yoff + g->height)) / ((float)gc->p2_height);
/* update the x offset for the next glyph. */
- gc->x_offs += (int)(BLI_rctf_size_x(&g->box) + gc->pad);
+ gc->x_offs += (int)BLI_rctf_size_x(&g->box) + gc->pad;
gc->rem_glyphs--;
g->build_tex = 1;
@@ -486,7 +480,9 @@ void blf_glyph_render(FontBLF *font, GlyphBLF *g, float x, float y)
if (font->flags & BLF_SHADOW) {
rctf rect_ofs;
- blf_glyph_calc_rect(&rect_ofs, g, x + font->shadow_x, y + font->shadow_y);
+ blf_glyph_calc_rect(&rect_ofs, g,
+ x + (float)font->shadow_x,
+ y + (float)font->shadow_y);
switch (font->shadow) {
case 3:
diff --git a/source/blender/blenfont/intern/blf_internal_types.h b/source/blender/blenfont/intern/blf_internal_types.h
index 096ff50a3ca..c64b7e974e7 100644
--- a/source/blender/blenfont/intern/blf_internal_types.h
+++ b/source/blender/blenfont/intern/blf_internal_types.h
@@ -54,7 +54,7 @@ typedef struct GlyphCacheBLF {
unsigned int ntex;
/* and the last texture, aka. the current texture. */
- int cur_tex;
+ unsigned int cur_tex;
/* like bftgl, we draw every glyph in a big texture, so this is the
* current position inside the texture.
@@ -235,4 +235,6 @@ typedef struct DirBLF {
char *path;
} DirBLF;
+#define BLF_CURTEX_UNSET ((unsigned int)-1)
+
#endif /* __BLF_INTERNAL_TYPES_H__ */
diff --git a/source/blender/blenkernel/BKE_DerivedMesh.h b/source/blender/blenkernel/BKE_DerivedMesh.h
index 8396380fd06..2bba968e03b 100644
--- a/source/blender/blenkernel/BKE_DerivedMesh.h
+++ b/source/blender/blenkernel/BKE_DerivedMesh.h
@@ -28,7 +28,9 @@
#ifndef __BKE_DERIVEDMESH_H__
#define __BKE_DERIVEDMESH_H__
-/**
+/** \file BKE_DerivedMesh.h
+ * \ingroup bke
+ *
* Basic design of the DerivedMesh system:
*
* DerivedMesh is a common set of interfaces for mesh systems.
@@ -72,6 +74,8 @@
#include "DNA_customdata_types.h"
#include "DNA_meshdata_types.h"
+#include "BLI_compiler_attrs.h"
+
#include "BKE_customdata.h"
#include "BKE_bvhutils.h"
@@ -95,8 +99,6 @@ struct BMEditMesh;
struct ListBase;
struct PBVH;
-#define DM_OMP_LIMIT 10000 /* setting zero so we can catch bugs in OpenMP/BMesh */
-
/* number of sub-elements each mesh element has (for interpolation) */
#define SUB_ELEMS_VERT 0
#define SUB_ELEMS_EDGE 2
@@ -733,14 +735,12 @@ void DM_init_origspace(DerivedMesh *dm);
char *DM_debug_info(DerivedMesh *dm);
void DM_debug_print(DerivedMesh *dm);
void DM_debug_print_cdlayers(CustomData *cdata);
-#endif
-#ifdef __GNUC__
-BLI_INLINE int DM_origindex_mface_mpoly(const int *index_mf_to_mpoly, const int *index_mp_to_orig, const int i)
- __attribute__((nonnull(1)))
-;
+bool DM_is_valid(DerivedMesh *dm);
#endif
+BLI_INLINE int DM_origindex_mface_mpoly(const int *index_mf_to_mpoly, const int *index_mp_to_orig, const int i) ATTR_NONNULL(1);
+
BLI_INLINE int DM_origindex_mface_mpoly(const int *index_mf_to_mpoly, const int *index_mp_to_orig, const int i)
{
const int j = index_mf_to_mpoly[i];
diff --git a/source/blender/blenkernel/BKE_action.h b/source/blender/blenkernel/BKE_action.h
index 12c9f6b449f..5c155a46182 100644
--- a/source/blender/blenkernel/BKE_action.h
+++ b/source/blender/blenkernel/BKE_action.h
@@ -132,62 +132,25 @@ struct bActionGroup *BKE_action_group_find_name(struct bAction *act, const char
void action_groups_clear_tempflags(struct bAction *act);
/* Pose API ----------------- */
-
-/**
- * Deallocates a pose channel.
- * Does not free the pose channel itself.
- */
-void BKE_pose_channel_free(struct bPoseChannel *pchan);
-
-/**
- * Removes and deallocates all channels from a pose.
- * Does not free the pose itself.
- */
-void BKE_pose_channels_free(struct bPose *pose);
-
-/**
- * Removes the hash for quick lookup of channels, must
- * be done when adding/removing channels.
- */
-void BKE_pose_channels_hash_make(struct bPose *pose);
-void BKE_pose_channels_hash_free(struct bPose *pose);
-/**
- * Removes and deallocates all data from a pose, and also frees the pose.
- */
-void BKE_pose_free(struct bPose *pose);
+void BKE_pose_channel_free(struct bPoseChannel *pchan);
-/**
- * Allocate a new pose on the heap, and copy the src pose and it's channels
- * into the new pose. *dst is set to the newly allocated structure, and assumed to be NULL.
- */
-void BKE_pose_copy_data(struct bPose **dst, struct bPose *src, int copyconstraints);
+void BKE_pose_channels_free(struct bPose *pose);
-/**
- * Copy the internal members of each pose channel including constraints
- * and ID-Props, used when duplicating bones in editmode.
- */
-void BKE_pose_channel_copy_data(struct bPoseChannel *pchan, const struct bPoseChannel *pchan_from);
+void BKE_pose_channels_hash_make(struct bPose *pose);
+void BKE_pose_channels_hash_free(struct bPose *pose);
-/**
- * Return a pointer to the pose channel of the given name
- * from this pose.
- */
+void BKE_pose_free(struct bPose *pose);
+void BKE_pose_copy_data(struct bPose **dst, struct bPose *src, const bool copy_constraints);
+void BKE_pose_channel_copy_data(struct bPoseChannel *pchan, const struct bPoseChannel *pchan_from);
struct bPoseChannel *BKE_pose_channel_find_name(const struct bPose *pose, const char *name);
-
-/**
- * Return a pointer to the active pose channel from this Object.
- * (Note: Object, not bPose is used here, as we need layer info from Armature)
- */
struct bPoseChannel *BKE_pose_channel_active(struct Object *ob);
-
-/**
- * Looks to see if the channel with the given name
- * already exists in this pose - if not a new one is
- * allocated and initialized.
- */
struct bPoseChannel *BKE_pose_channel_verify(struct bPose *pose, const char *name);
+#ifndef NDEBUG
+bool BKE_pose_channels_is_valid(const struct bPose *pose);
+#endif
+
/* Copy the data from the action-pose (src) into the pose */
void extract_pose_from_pose(struct bPose *pose, const struct bPose *src);
@@ -203,6 +166,9 @@ void BKE_pose_ikparam_init(struct bPose *pose);
/* initialize a bItasc structure with default value */
void BKE_pose_itasc_init(struct bItasc *itasc);
+/* Checks if a bone is part of an IK chain or not */
+bool BKE_pose_channel_in_IK_chain(struct Object *ob, struct bPoseChannel *pchan);
+
/* clears BONE_UNKEYED flags for frame changing */
// XXX to be deprecated for a more general solution in animsys...
void framechange_poses_clear_unkeyed(void);
diff --git a/source/blender/blenkernel/BKE_addon.h b/source/blender/blenkernel/BKE_addon.h
index eafaec3e605..739a4e3eee6 100644
--- a/source/blender/blenkernel/BKE_addon.h
+++ b/source/blender/blenkernel/BKE_addon.h
@@ -22,6 +22,10 @@
#ifndef __BKE_ADDON_H__
#define __BKE_ADDON_H__
+/** \file BKE_addon.h
+ * \ingroup bke
+ */
+
#include "RNA_types.h"
typedef struct bAddonPrefType {
diff --git a/source/blender/blenkernel/BKE_anim.h b/source/blender/blenkernel/BKE_anim.h
index 539c5780cd5..7de7a745ed6 100644
--- a/source/blender/blenkernel/BKE_anim.h
+++ b/source/blender/blenkernel/BKE_anim.h
@@ -59,7 +59,7 @@ void animviz_calc_motionpaths(struct Scene *scene, ListBase *targets);
/* Curve Paths */
void free_path(struct Path *path);
-void calc_curvepath(struct Object *ob);
+void calc_curvepath(struct Object *ob, struct ListBase *nurbs);
int where_on_path(struct Object *ob, float ctime, float vec[4], float dir[3], float quat[4], float *radius, float *weight);
/* ---------------------------------------------------- */
diff --git a/source/blender/blenkernel/BKE_animsys.h b/source/blender/blenkernel/BKE_animsys.h
index dd150ba6a63..a0ec6c7757f 100644
--- a/source/blender/blenkernel/BKE_animsys.h
+++ b/source/blender/blenkernel/BKE_animsys.h
@@ -104,6 +104,10 @@ void BKE_keyingsets_free(struct ListBase *list);
/* ************************************* */
/* Path Fixing API */
+/* Fix all the paths for the the given ID + Action */
+void BKE_action_fix_paths_rename(struct ID *owner_id, struct bAction *act, const char *prefix, const char *oldName,
+ const char *newName, int oldSubscript, int newSubscript, int verify_paths);
+
/* Fix all the paths for the given ID+AnimData */
void BKE_animdata_fix_paths_rename(struct ID *owner_id, struct AnimData *adt, struct ID *ref_id, const char *prefix,
const char *oldName, const char *newName, int oldSubscript, int newSubscript,
@@ -112,6 +116,9 @@ void BKE_animdata_fix_paths_rename(struct ID *owner_id, struct AnimData *adt, st
/* Fix all the paths for the entire database... */
void BKE_all_animdata_fix_paths_rename(ID *ref_id, const char *prefix, const char *oldName, const char *newName);
+/* Fix the path after removing elements that are not ID (e.g., node) */
+void BKE_animdata_fix_paths_remove(struct ID *id, const char *path);
+
/* -------------------------------------- */
/* Move animation data from src to destination if it's paths are based on basepaths */
diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h
index fb9e9f4e691..60e03af5077 100644
--- a/source/blender/blenkernel/BKE_armature.h
+++ b/source/blender/blenkernel/BKE_armature.h
@@ -124,16 +124,18 @@ void BKE_pchan_to_pose_mat(struct bPoseChannel *pchan, float rotscale_mat[4][4],
void BKE_rotMode_change_values(float quat[4], float eul[3], float axis[3], float *angle, short oldMode, short newMode);
/* B-Bone support */
+#define MAX_BBONE_SUBDIV 32
+
typedef struct Mat4 {
float mat[4][4];
} Mat4;
-Mat4 *b_bone_spline_setup(struct bPoseChannel *pchan, int rest);
+void b_bone_spline_setup(struct bPoseChannel *pchan, int rest, Mat4 result_array[MAX_BBONE_SUBDIV]);
/* like EBONE_VISIBLE */
#define PBONE_VISIBLE(arm, bone) ( \
- CHECK_TYPE_INLINE(arm, bArmature), \
- CHECK_TYPE_INLINE(bone, Bone), \
+ CHECK_TYPE_INLINE(arm, bArmature *), \
+ CHECK_TYPE_INLINE(bone, Bone *), \
(((bone)->layer & (arm)->layer) && !((bone)->flag & BONE_HIDDEN_P)) \
)
diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h
index 84e24df43e5..5b32e7229d5 100644
--- a/source/blender/blenkernel/BKE_blender.h
+++ b/source/blender/blenkernel/BKE_blender.h
@@ -41,15 +41,15 @@ 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 268
-#define BLENDER_SUBVERSION 2
+#define BLENDER_VERSION 269
+#define BLENDER_SUBVERSION 1
/* 262 was the last editmesh release but it has compatibility code for bmesh data */
#define BLENDER_MINVERSION 262
#define BLENDER_MINSUBVERSION 0
/* used by packaging tools */
/* can be left blank, otherwise a,b,c... etc with no quotes */
-#define BLENDER_VERSION_CHAR a
+#define BLENDER_VERSION_CHAR
/* alpha/beta/rc/release, docs use this */
#define BLENDER_VERSION_CYCLE alpha
@@ -69,8 +69,10 @@ int BKE_read_file(struct bContext *C, const char *filepath, struct ReportList *r
#define BKE_READ_FILE_OK 1 /* OK */
#define BKE_READ_FILE_OK_USERPREFS 2 /* OK, and with new user settings */
-int BKE_read_file_from_memory(struct bContext *C, const void *filebuf, int filelength, struct ReportList *reports);
-int BKE_read_file_from_memfile(struct bContext *C, struct MemFile *memfile, struct ReportList *reports);
+int BKE_read_file_from_memory(struct bContext *C, const void *filebuf,
+ int filelength, struct ReportList *reports, int update_defaults);
+int BKE_read_file_from_memfile(struct bContext *C, struct MemFile *memfile,
+ struct ReportList *reports);
int BKE_read_file_userdef(const char *filepath, struct ReportList *reports);
int BKE_write_file_userdef(const char *filepath, struct ReportList *reports);
@@ -100,11 +102,11 @@ extern const char *BKE_undo_get_name(int nr, int *active);
extern int BKE_undo_save_file(const char *filename);
extern struct Main *BKE_undo_get_main(struct Scene **scene);
- /* copybuffer */
+/* copybuffer */
void BKE_copybuffer_begin(void);
void BKE_copybuffer_tag_ID(struct ID *id);
int BKE_copybuffer_save(const char *filename, struct ReportList *reports);
- int BKE_copybuffer_paste(struct bContext *C, const char *libname, struct ReportList *reports);
+int BKE_copybuffer_paste(struct bContext *C, const char *libname, struct ReportList *reports);
#ifdef __cplusplus
}
diff --git a/source/blender/blenkernel/BKE_brush.h b/source/blender/blenkernel/BKE_brush.h
index edf710ef7c9..b4c5f47cf25 100644
--- a/source/blender/blenkernel/BKE_brush.h
+++ b/source/blender/blenkernel/BKE_brush.h
@@ -76,10 +76,10 @@ float BKE_brush_sample_masktex(const Scene *scene, struct Brush *br, const float
const int thread, struct ImagePool *pool);
/* texture */
-unsigned int *BKE_brush_gen_texture_cache(struct Brush *br, int half_side);
+unsigned int *BKE_brush_gen_texture_cache(struct Brush *br, int half_side, bool use_secondary);
/* radial control */
-struct ImBuf *BKE_brush_gen_radial_control_imbuf(struct Brush *br);
+struct ImBuf *BKE_brush_gen_radial_control_imbuf(struct Brush *br, bool secondary);
/* unified strength and size */
diff --git a/source/blender/blenkernel/BKE_ccg.h b/source/blender/blenkernel/BKE_ccg.h
index fb6211504ae..7d5d423282d 100644
--- a/source/blender/blenkernel/BKE_ccg.h
+++ b/source/blender/blenkernel/BKE_ccg.h
@@ -28,6 +28,10 @@
#ifndef __BKE_CCG_H__
#define __BKE_CCG_H__
+/** \file BKE_ccg.h
+ * \ingroup bke
+ */
+
/* defines BLI_INLINE */
#include "BLI_utildefines.h"
diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h
index 947e680d119..1b61d0a5443 100644
--- a/source/blender/blenkernel/BKE_cloth.h
+++ b/source/blender/blenkernel/BKE_cloth.h
@@ -80,7 +80,7 @@ typedef struct Cloth {
struct MFace *mfaces;
struct Implicit_Data *implicit; /* our implicit solver connects to this pointer */
struct Implicit_Data *implicitEM; /* our implicit solver connects to this pointer */
- struct EdgeHash *edgehash; /* used for selfcollisions */
+ struct EdgeHash *edgehash; /* used for selfcollisions (currently used as a 'set', value is ignored) */
int last_frame, pad4;
} Cloth;
diff --git a/source/blender/blenkernel/BKE_curve.h b/source/blender/blenkernel/BKE_curve.h
index baa90e7a856..dee27cebf59 100644
--- a/source/blender/blenkernel/BKE_curve.h
+++ b/source/blender/blenkernel/BKE_curve.h
@@ -42,6 +42,13 @@ struct Main;
struct Nurb;
struct Object;
struct Scene;
+struct Path;
+
+typedef struct CurveCache {
+ ListBase disp;
+ ListBase bev;
+ struct Path *path;
+} CurveCache;
#define KNOTSU(nu) ( (nu)->orderu + (nu)->pntsu + (((nu)->flagu & CU_NURB_CYCLIC) ? ((nu)->orderu - 1) : 0) )
#define KNOTSV(nu) ( (nu)->orderv + (nu)->pntsv + (((nu)->flagv & CU_NURB_CYCLIC) ? ((nu)->orderv - 1) : 0) )
@@ -63,7 +70,11 @@ void BKE_curve_make_local(struct Curve *cu);
short BKE_curve_type_get(struct Curve *cu);
void BKE_curve_type_test(struct Object *ob);
void BKE_curve_curve_dimension_update(struct Curve *cu);
+
+void BKE_curve_boundbox_calc(struct Curve *cu, float r_loc[3], float r_size[3]);
+struct BoundBox *BKE_curve_boundbox_get(struct Object *ob);
void BKE_curve_texspace_calc(struct Curve *cu);
+void BKE_curve_texspace_get(struct Curve *cu, float r_loc[3], float r_rot[3], float r_size[3]);
bool BKE_curve_minmax(struct Curve *cu, float min[3], float max[3]);
bool BKE_curve_center_median(struct Curve *cu, float cent[3]);
@@ -74,11 +85,11 @@ void BKE_curve_material_index_clear(struct Curve *cu);
ListBase *BKE_curve_nurbs_get(struct Curve *cu);
-float (*BKE_curve_vertexCos_get(struct Curve *cu, struct ListBase *lb, int *numVerts_r))[3];
-void BK_curve_vertexCos_apply(struct Curve *cu, struct ListBase *lb, float (*vertexCos)[3]);
+float (*BKE_curve_nurbs_vertexCos_get(struct ListBase *lb, int *numVerts_r))[3];
+void BK_curve_nurbs_vertexCos_apply(struct ListBase *lb, float (*vertexCos)[3]);
-float (*BKE_curve_keyVertexCos_get(struct Curve *cu, struct ListBase *lb, float *key))[3];
-void BKE_curve_keyVertexTilts_apply(struct Curve *cu, struct ListBase *lb, float *key);
+float (*BKE_curve_nurbs_keyVertexCos_get(struct ListBase *lb, float *key))[3];
+void BKE_curve_nurbs_keyVertexTilts_apply(struct ListBase *lb, float *key);
void BKE_curve_editNurb_keyIndex_free(struct EditNurb *editnurb);
void BKE_curve_editNurb_free(struct Curve *cu);
@@ -87,7 +98,7 @@ struct ListBase *BKE_curve_editNurbs_get(struct Curve *cu);
float *BKE_curve_make_orco(struct Scene *scene, struct Object *ob, int *r_numVerts);
float *BKE_curve_surf_make_orco(struct Object *ob);
-void BKE_curve_bevelList_make(struct Object *ob);
+void BKE_curve_bevelList_make(struct Object *ob, struct ListBase *nurbs, bool for_render);
void BKE_curve_bevel_make(struct Scene *scene, struct Object *ob, struct ListBase *disp, int forRender, int renderResolution);
void BKE_curve_forward_diff_bezier(float q0, float q1, float q2, float q3, float *p, int it, int stride);
@@ -104,9 +115,11 @@ void BKE_nurbList_duplicate(struct ListBase *lb1, struct ListBase *lb2);
void BKE_nurbList_handles_set(struct ListBase *editnurb, short code);
void BKE_nurbList_handles_autocalc(ListBase *editnurb, int flag);
+void BKE_nurbList_flag_set(ListBase *editnurb, short flag);
void BKE_nurb_free(struct Nurb *nu);
struct Nurb *BKE_nurb_duplicate(struct Nurb *nu);
+struct Nurb *BKE_nurb_copy(struct Nurb *src, int pntsu, int pntsv);
void BKE_nurb_test2D(struct Nurb *nu);
void BKE_nurb_minmax(struct Nurb *nu, float min[3], float max[3]);
@@ -139,9 +152,11 @@ void BKE_nurb_bezt_calc_normal(struct Nurb *nu, struct BezTriple *bezt, float r_
void BKE_nurb_bezt_calc_plane(struct Nurb *nu, struct BezTriple *bezt, float r_plane[3]);
void BKE_nurb_handle_calc(struct BezTriple *bezt, struct BezTriple *prev, struct BezTriple *next, int mode);
+void BKE_nurb_handle_calc_simple(struct Nurb *nu, struct BezTriple *bezt);
void BKE_nurb_handles_calc(struct Nurb *nu);
void BKE_nurb_handles_autocalc(struct Nurb *nu, int flag);
-void BKE_nurb_handles_test(struct Nurb *nu);
+void BKE_nurb_bezt_handle_test(struct BezTriple *bezt, const bool use_handle);
+void BKE_nurb_handles_test(struct Nurb *nu, const bool use_handles);
#endif /* __BKE_CURVE_H__ */
diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h
index 72aae1b2361..5a283922707 100644
--- a/source/blender/blenkernel/BKE_customdata.h
+++ b/source/blender/blenkernel/BKE_customdata.h
@@ -56,6 +56,7 @@ extern const CustomDataMask CD_MASK_EDITMESH;
extern const CustomDataMask CD_MASK_DERIVEDMESH;
extern const CustomDataMask CD_MASK_BMESH;
extern const CustomDataMask CD_MASK_FACECORNERS;
+extern const CustomDataMask CD_MASK_EVERYTHING;
/* for ORIGINDEX layer type, indicates no original index for this element */
#define ORIGINDEX_NONE -1
@@ -191,6 +192,9 @@ void CustomData_set_only_copy(const struct CustomData *data,
void CustomData_copy_data(const struct CustomData *source,
struct CustomData *dest, int source_index,
int dest_index, int count);
+void CustomData_copy_data_named(const struct CustomData *source,
+ struct CustomData *dest, int source_index,
+ int dest_index, int count);
void CustomData_copy_elements(int type, void *source, void *dest, int count);
void CustomData_bmesh_copy_data(const struct CustomData *source,
struct CustomData *dest, void *src_block,
diff --git a/source/blender/blenkernel/BKE_deform.h b/source/blender/blenkernel/BKE_deform.h
index a43a243106d..435cad17e57 100644
--- a/source/blender/blenkernel/BKE_deform.h
+++ b/source/blender/blenkernel/BKE_deform.h
@@ -78,8 +78,12 @@ void defvert_flip_merged(struct MDeformVert *dvert, const int *flip_map, const i
void defvert_normalize(struct MDeformVert *dvert);
void defvert_normalize_subset(struct MDeformVert *dvert,
const bool *vgroup_subset, const int vgroup_tot);
-void defvert_normalize_lock_single(struct MDeformVert *dvert, const int def_nr_lock);
-void defvert_normalize_lock_map(struct MDeformVert *dvert, const bool *lock_flags, const int defbase_tot);
+void defvert_normalize_lock_single(struct MDeformVert *dvert,
+ const bool *vgroup_subset, const int vgroup_tot,
+ const int def_nr_lock);
+void defvert_normalize_lock_map(struct MDeformVert *dvert,
+ const bool *vgroup_subset, const int vgroup_tot,
+ const bool *lock_flags, const int defbase_tot);
/* utility function, note that MAX_VGROUP_NAME chars is the maximum string length since its only
* used with defgroups currently */
diff --git a/source/blender/blenkernel/BKE_displist.h b/source/blender/blenkernel/BKE_displist.h
index 1cf77c68345..2178f860825 100644
--- a/source/blender/blenkernel/BKE_displist.h
+++ b/source/blender/blenkernel/BKE_displist.h
@@ -102,4 +102,6 @@ float BKE_displist_calc_taper(struct Scene *scene, struct Object *taperobj, int
/* add Orco layer to the displist object which has got derived mesh and return orco */
float *BKE_displist_make_orco(struct Scene *scene, struct Object *ob, struct DerivedMesh *derivedFinal, int forRender, int renderResolution);
+void BKE_displist_minmax(struct ListBase *dispbase, float min[3], float max[3]);
+
#endif
diff --git a/source/blender/blenkernel/BKE_editmesh.h b/source/blender/blenkernel/BKE_editmesh.h
index edfb501b590..310807370da 100644
--- a/source/blender/blenkernel/BKE_editmesh.h
+++ b/source/blender/blenkernel/BKE_editmesh.h
@@ -23,6 +23,10 @@
#ifndef __BKE_EDITMESH_H__
#define __BKE_EDITMESH_H__
+/** \file BKE_editmesh.h
+ * \ingroup bke
+ */
+
#include "BKE_customdata.h"
#include "bmesh.h"
@@ -67,13 +71,6 @@ typedef struct BMEditMesh {
unsigned char (*derivedFaceColor)[4];
int derivedFaceColorLen;
- /* index tables, to map indices to elements via
- * EDBM_index_arrays_init and associated functions. don't
- * touch this or read it directly.*/
- struct BMVert **vert_index;
- struct BMEdge **edge_index;
- struct BMFace **face_index;
-
/*selection mode*/
short selectmode;
short mat_nr;
diff --git a/source/blender/blenkernel/BKE_editmesh_bvh.h b/source/blender/blenkernel/BKE_editmesh_bvh.h
index 6750ee1ff3e..7b4ad4284c6 100644
--- a/source/blender/blenkernel/BKE_editmesh_bvh.h
+++ b/source/blender/blenkernel/BKE_editmesh_bvh.h
@@ -44,7 +44,7 @@ typedef struct BMBVHTree BMBVHTree;
BMBVHTree *BKE_bmbvh_new(struct BMEditMesh *em, int flag, const float (*cos_cage)[3], const bool cos_cage_free);
void BKE_bmbvh_free(BMBVHTree *tree);
struct BVHTree *BKE_bmbvh_tree_get(BMBVHTree *tree);
-struct BMFace *BKE_bmbvh_ray_cast(BMBVHTree *tree, const float co[3], const float dir[3],
+struct BMFace *BKE_bmbvh_ray_cast(BMBVHTree *tree, const float co[3], const float dir[3], const float radius,
float *r_dist, float r_hitout[3], float r_cagehit[3]);
/* find a face intersecting a segment (but not apart of the segment) */
struct BMFace *BKE_bmbvh_find_face_segment(BMBVHTree *tree, const float co_a[3], const float co_b[3],
diff --git a/source/blender/blenkernel/BKE_fcurve.h b/source/blender/blenkernel/BKE_fcurve.h
index 64a6811bf51..c31dd745911 100644
--- a/source/blender/blenkernel/BKE_fcurve.h
+++ b/source/blender/blenkernel/BKE_fcurve.h
@@ -229,12 +229,13 @@ short calc_fcurve_bounds(struct FCurve *fcu, float *xmin, float *xmax, float *ym
short fcurve_are_keyframes_usable(struct FCurve *fcu);
/* Can keyframes be added to F-Curve? */
-short fcurve_is_keyframable(struct FCurve *fcu);
+bool fcurve_is_keyframable(struct FCurve *fcu);
+bool BKE_fcurve_is_protected(struct FCurve *fcu);
/* -------- Curve Sanity -------- */
void calchandles_fcurve(struct FCurve *fcu);
-void testhandles_fcurve(struct FCurve *fcu, const short use_handle);
+void testhandles_fcurve(struct FCurve *fcu, const bool use_handle);
void sort_time_fcurve(struct FCurve *fcu);
short test_time_fcurve(struct FCurve *fcu);
diff --git a/source/blender/blenkernel/BKE_idprop.h b/source/blender/blenkernel/BKE_idprop.h
index 133a0690dc6..bd90960eced 100644
--- a/source/blender/blenkernel/BKE_idprop.h
+++ b/source/blender/blenkernel/BKE_idprop.h
@@ -30,6 +30,8 @@
#include "DNA_ID.h"
+#include "BLI_compiler_attrs.h"
+
struct IDProperty;
struct ID;
@@ -55,32 +57,14 @@ typedef union IDPropertyTemplate {
/* ----------- Property Array Type ---------- */
-IDProperty *IDP_NewIDPArray(const char *name)
-#ifdef __GNUC__
-__attribute__((warn_unused_result))
-__attribute__((nonnull))
-#endif
-;
-IDProperty *IDP_CopyIDPArray(IDProperty *array)
-#ifdef __GNUC__
-__attribute__((warn_unused_result))
-__attribute__((nonnull))
-#endif
-;
+IDProperty *IDP_NewIDPArray(const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+IDProperty *IDP_CopyIDPArray(IDProperty *array) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
void IDP_FreeIDPArray(IDProperty *prop);
/* shallow copies item */
-void IDP_SetIndexArray(struct IDProperty *prop, int index, struct IDProperty *item);
-#ifdef __GNUC__
-__attribute__((nonnull))
-#endif
-struct IDProperty *IDP_GetIndexArray(struct IDProperty *prop, int index)
-#ifdef __GNUC__
-__attribute__((warn_unused_result))
-__attribute__((nonnull))
-#endif
-;
+void IDP_SetIndexArray(struct IDProperty *prop, int index, struct IDProperty *item) ATTR_NONNULL();
+struct IDProperty *IDP_GetIndexArray(struct IDProperty *prop, int index) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
void IDP_AppendArray(struct IDProperty *prop, struct IDProperty *item);
void IDP_ResizeIDPArray(struct IDProperty *prop, int len);
@@ -90,33 +74,11 @@ void IDP_ResizeArray(struct IDProperty *prop, int newlen);
void IDP_FreeArray(struct IDProperty *prop);
/* ---------- String Type ------------ */
-IDProperty *IDP_NewString(const char *st, const char *name, int maxlen) /* maxlen excludes '\0' */
-#ifdef __GNUC__
-__attribute__((warn_unused_result))
-__attribute__((nonnull (2))) /* 'name' arg */
-#endif
-;
-
-void IDP_AssignString(struct IDProperty *prop, const char *st, int maxlen) /* maxlen excludes '\0' */
-#ifdef __GNUC__
-__attribute__((nonnull))
-#endif
-;
-void IDP_ConcatStringC(struct IDProperty *prop, const char *st)
-#ifdef __GNUC__
-__attribute__((nonnull))
-#endif
-;
-void IDP_ConcatString(struct IDProperty *str1, struct IDProperty *append)
-#ifdef __GNUC__
-__attribute__((nonnull))
-#endif
-;
-void IDP_FreeString(struct IDProperty *prop)
-#ifdef __GNUC__
-__attribute__((nonnull))
-#endif
-;
+IDProperty *IDP_NewString(const char *st, const char *name, int maxlen) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(2 /* 'name 'arg */); /* maxlen excludes '\0' */
+void IDP_AssignString(struct IDProperty *prop, const char *st, int maxlen) ATTR_NONNULL(); /* maxlen excludes '\0' */
+void IDP_ConcatStringC(struct IDProperty *prop, const char *st) ATTR_NONNULL();
+void IDP_ConcatString(struct IDProperty *str1, struct IDProperty *append) ATTR_NONNULL();
+void IDP_FreeString(struct IDProperty *prop) ATTR_NONNULL();
/*-------- ID Type -------*/
void IDP_LinkID(struct IDProperty *prop, ID *id);
@@ -125,107 +87,31 @@ void IDP_UnlinkID(struct IDProperty *prop);
/*-------- Group Functions -------*/
/** Sync values from one group to another, only where they match */
-void IDP_SyncGroupValues(struct IDProperty *dest, struct IDProperty *src)
-#ifdef __GNUC__
-__attribute__((nonnull))
-#endif
-;
-
-void IDP_ReplaceGroupInGroup(struct IDProperty *dest, struct IDProperty *src)
-#ifdef __GNUC__
-__attribute__((nonnull))
-#endif
-;
-void IDP_ReplaceInGroup(struct IDProperty *group, struct IDProperty *prop)
-#ifdef __GNUC__
-__attribute__((nonnull))
-#endif
-;
-
-void IDP_MergeGroup(IDProperty *dest, IDProperty *src, const int do_overwrite)
-#ifdef __GNUC__
-__attribute__((nonnull))
-#endif
-;
-
-int IDP_AddToGroup(struct IDProperty *group, struct IDProperty *prop)
-#ifdef __GNUC__
-__attribute__((nonnull))
-#endif
-;
+void IDP_SyncGroupValues(struct IDProperty *dest, struct IDProperty *src) ATTR_NONNULL();
+void IDP_ReplaceGroupInGroup(struct IDProperty *dest, struct IDProperty *src) ATTR_NONNULL();
+void IDP_ReplaceInGroup(struct IDProperty *group, struct IDProperty *prop) ATTR_NONNULL();
+void IDP_MergeGroup(IDProperty *dest, IDProperty *src, const int do_overwrite) ATTR_NONNULL();
+int IDP_AddToGroup(struct IDProperty *group, struct IDProperty *prop) ATTR_NONNULL();
int IDP_InsertToGroup(struct IDProperty *group, struct IDProperty *previous,
- struct IDProperty *pnew)
-#ifdef __GNUC__
-__attribute__((nonnull (1, 3))) /* 'group', 'pnew' */
-#endif
-;
-void IDP_RemFromGroup(struct IDProperty *group, struct IDProperty *prop)
-#ifdef __GNUC__
-__attribute__((nonnull))
-#endif
-;
+ struct IDProperty *pnew) ATTR_NONNULL(1 /* group */, 3 /* pnew */);
+void IDP_RemoveFromGroup(struct IDProperty *group, struct IDProperty *prop) ATTR_NONNULL();
+void IDP_FreeFromGroup(struct IDProperty *group, struct IDProperty *prop) ATTR_NONNULL();
-IDProperty *IDP_GetPropertyFromGroup(struct IDProperty *prop, const char *name)
-#ifdef __GNUC__
-__attribute__((warn_unused_result))
-__attribute__((nonnull))
-#endif
-;
-IDProperty *IDP_GetPropertyTypeFromGroup(struct IDProperty *prop, const char *name, const char type)
-#ifdef __GNUC__
-__attribute__((warn_unused_result))
-__attribute__((nonnull))
-#endif
-;
-void *IDP_GetGroupIterator(struct IDProperty *prop)
-#ifdef __GNUC__
-__attribute__((warn_unused_result))
-#endif
-;
-IDProperty *IDP_GroupIterNext(void *vself)
-#ifdef __GNUC__
-__attribute__((warn_unused_result))
-__attribute__((nonnull))
-#endif
-;
-void IDP_FreeIterBeforeEnd(void *vself)
-#ifdef __GNUC__
-__attribute__((nonnull))
-#endif
-;
+IDProperty *IDP_GetPropertyFromGroup(struct IDProperty *prop, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+IDProperty *IDP_GetPropertyTypeFromGroup(struct IDProperty *prop, const char *name, const char type) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+void *IDP_GetGroupIterator(struct IDProperty *prop) ATTR_WARN_UNUSED_RESULT;
+IDProperty *IDP_GroupIterNext(void *vself) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+void IDP_FreeIterBeforeEnd(void *vself) ATTR_NONNULL();
/*-------- Main Functions --------*/
-struct IDProperty *IDP_GetProperties(struct ID *id, int create_if_needed)
-#ifdef __GNUC__
-__attribute__((warn_unused_result))
-__attribute__((nonnull))
-#endif
-;
-struct IDProperty *IDP_CopyProperty(struct IDProperty *prop)
-#ifdef __GNUC__
-__attribute__((warn_unused_result))
-__attribute__((nonnull))
-#endif
-;
+struct IDProperty *IDP_GetProperties(struct ID *id, int create_if_needed) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+struct IDProperty *IDP_CopyProperty(struct IDProperty *prop) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
-int IDP_EqualsProperties_ex(IDProperty *prop1, IDProperty *prop2, const int is_strict)
-#ifdef __GNUC__
-__attribute__((warn_unused_result))
-#endif
-;
+int IDP_EqualsProperties_ex(IDProperty *prop1, IDProperty *prop2, const int is_strict) ATTR_WARN_UNUSED_RESULT;
-int IDP_EqualsProperties(struct IDProperty *prop1, struct IDProperty *prop2)
-#ifdef __GNUC__
-__attribute__((warn_unused_result))
-#endif
-;
+int IDP_EqualsProperties(struct IDProperty *prop1, struct IDProperty *prop2) ATTR_WARN_UNUSED_RESULT;
-struct IDProperty *IDP_New(const int type, const IDPropertyTemplate *val, const char *name)
-#ifdef __GNUC__
-__attribute__((warn_unused_result))
-__attribute__((nonnull))
-#endif
-;
+struct IDProperty *IDP_New(const int type, const IDPropertyTemplate *val, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
void IDP_FreeProperty(struct IDProperty *prop);
diff --git a/source/blender/blenkernel/BKE_key.h b/source/blender/blenkernel/BKE_key.h
index de60d316426..19264feaf48 100644
--- a/source/blender/blenkernel/BKE_key.h
+++ b/source/blender/blenkernel/BKE_key.h
@@ -41,6 +41,7 @@ struct Object;
struct Scene;
struct Lattice;
struct Mesh;
+struct WeightsArrayCache;
/* Kernel prototypes */
#ifdef __cplusplus
@@ -73,8 +74,17 @@ struct KeyBlock *BKE_keyblock_from_key(struct Key *key, int index);
struct KeyBlock *BKE_keyblock_find_name(struct Key *key, const char name[]);
void BKE_keyblock_copy_settings(struct KeyBlock *kb_dst, const struct KeyBlock *kb_src);
char *BKE_keyblock_curval_rnapath_get(struct Key *key, struct KeyBlock *kb);
+
// needed for the GE
-void BKE_key_evaluate_relative(const int start, int end, const int tot, char *basispoin, struct Key *key, struct KeyBlock *actkb, const int mode);
+typedef struct WeightsArrayCache {
+ int num_defgroup_weights;
+ float **defgroup_weights;
+} WeightsArrayCache;
+
+float **BKE_keyblock_get_per_block_weights(struct Object *ob, struct Key *key, struct WeightsArrayCache *cache);
+void BKE_keyblock_free_per_block_weights(struct Key *key, float **per_keyblock_weights, struct WeightsArrayCache *cache);
+void BKE_key_evaluate_relative(const int start, int end, const int tot, char *basispoin, struct Key *key, struct KeyBlock *actkb,
+ float **per_keyblock_weights, const int mode);
/* conversion functions */
void BKE_key_convert_to_mesh(struct KeyBlock *kb, struct Mesh *me);
diff --git a/source/blender/blenkernel/BKE_lamp.h b/source/blender/blenkernel/BKE_lamp.h
index 205c7c7d1e6..fb2c4da91ea 100644
--- a/source/blender/blenkernel/BKE_lamp.h
+++ b/source/blender/blenkernel/BKE_lamp.h
@@ -36,13 +36,15 @@
extern "C" {
#endif
+#include "BLI_compiler_attrs.h"
+
struct Lamp;
struct Main;
struct Scene;
-struct Lamp *BKE_lamp_add(struct Main *bmain, const char *name) WARN_UNUSED;
-struct Lamp *BKE_lamp_copy(struct Lamp *la) WARN_UNUSED;
-struct Lamp *localize_lamp(struct Lamp *la) WARN_UNUSED;
+struct Lamp *BKE_lamp_add(struct Main *bmain, const char *name) ATTR_WARN_UNUSED_RESULT;
+struct Lamp *BKE_lamp_copy(struct Lamp *la) ATTR_WARN_UNUSED_RESULT;
+struct Lamp *localize_lamp(struct Lamp *la) ATTR_WARN_UNUSED_RESULT;
void BKE_lamp_make_local(struct Lamp *la);
void BKE_lamp_free(struct Lamp *la);
diff --git a/source/blender/blenkernel/BKE_lattice.h b/source/blender/blenkernel/BKE_lattice.h
index 9b29412675b..ba33da7729c 100644
--- a/source/blender/blenkernel/BKE_lattice.h
+++ b/source/blender/blenkernel/BKE_lattice.h
@@ -49,9 +49,14 @@ void BKE_lattice_free(struct Lattice *lt);
void BKE_lattice_make_local(struct Lattice *lt);
void calc_lat_fudu(int flag, int res, float *r_fu, float *r_du);
-void init_latt_deform(struct Object *oblatt, struct Object *ob);
-void calc_latt_deform(struct Object *, float co[3], float weight);
-void end_latt_deform(struct Object *);
+struct LatticeDeformData;
+struct LatticeDeformData *init_latt_deform(struct Object *oblatt, struct Object *ob)
+#ifdef __GNUC__
+__attribute__((warn_unused_result))
+#endif
+;
+void calc_latt_deform(struct LatticeDeformData *lattice_deform_data, float co[3], float weight);
+void end_latt_deform(struct LatticeDeformData *lattice_deform_data);
int object_deform_mball(struct Object *ob, struct ListBase *dispbase);
void outside_lattice(struct Lattice *lt);
diff --git a/source/blender/blenkernel/BKE_library.h b/source/blender/blenkernel/BKE_library.h
index 3c5406c4a77..b8da5002d84 100644
--- a/source/blender/blenkernel/BKE_library.h
+++ b/source/blender/blenkernel/BKE_library.h
@@ -36,6 +36,8 @@
extern "C" {
#endif
+#include "BLI_compiler_attrs.h"
+
struct ListBase;
struct ID;
struct Main;
@@ -45,24 +47,9 @@ struct bContext;
struct PointerRNA;
struct PropertyRNA;
-void *BKE_libblock_alloc(struct ListBase *lb, short type, const char *name)
-#ifdef __GNUC__
-__attribute__((warn_unused_result))
-__attribute__((nonnull))
-#endif
-;
-void *BKE_libblock_copy_ex(struct Main *bmain, struct ID *id)
-#ifdef __GNUC__
-__attribute__((warn_unused_result))
-__attribute__((nonnull))
-#endif
-;
-void *BKE_libblock_copy(struct ID *id)
-#ifdef __GNUC__
-__attribute__((warn_unused_result))
-__attribute__((nonnull))
-#endif
-;
+void *BKE_libblock_alloc(struct ListBase *lb, short type, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+void *BKE_libblock_copy_ex(struct Main *bmain, struct ID *id) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+void *BKE_libblock_copy(struct ID *id) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
void BKE_libblock_copy_data(struct ID *id, const struct ID *id_from, const bool do_action);
void BKE_id_lib_local_paths(struct Main *bmain, struct Library *lib, struct ID *id);
@@ -99,12 +86,7 @@ void rename_id(struct ID *id, const char *name);
void name_uiprefix_id(char *name, const struct ID *id);
void test_idbutton(char *name);
void BKE_library_make_local(struct Main *bmain, struct Library *lib, bool untagged_only);
-struct ID *BKE_libblock_find_name(const short type, const char *name)
-#ifdef __GNUC__
-__attribute__((warn_unused_result))
-__attribute__((nonnull))
-#endif
-;
+struct ID *BKE_libblock_find_name(const short type, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
void clear_id_newpoins(void);
#if 0
diff --git a/source/blender/blenkernel/BKE_mask.h b/source/blender/blenkernel/BKE_mask.h
index 14ceba42aff..9e73e0662ce 100644
--- a/source/blender/blenkernel/BKE_mask.h
+++ b/source/blender/blenkernel/BKE_mask.h
@@ -28,6 +28,10 @@
#ifndef __BKE_MASK_H__
#define __BKE_MASK_H__
+/** \file BKE_mask.h
+ * \ingroup bke
+ */
+
struct ImageUser;
struct Image;
struct ListBase;
@@ -136,6 +140,7 @@ void BKE_mask_layer_calc_handles_deform(struct MaskLayer *masklay);
void BKE_mask_calc_handles(struct Mask *mask);
void BKE_mask_update_deform(struct Mask *mask);
void BKE_mask_spline_ensure_deform(struct MaskSpline *spline);
+void BKE_mask_point_parent_matrix_get(struct MaskSplinePoint *point, float ctime, float parent_matrix[3][3]);
/* animation */
int BKE_mask_layer_shape_totvert(struct MaskLayer *masklay);
diff --git a/source/blender/blenkernel/BKE_mball.h b/source/blender/blenkernel/BKE_mball.h
index 44459300c56..7665e1b54dc 100644
--- a/source/blender/blenkernel/BKE_mball.h
+++ b/source/blender/blenkernel/BKE_mball.h
@@ -47,7 +47,7 @@ void BKE_mball_make_local(struct MetaBall *mb);
void BKE_mball_cubeTable_free(void);
-void BKE_mball_polygonize(struct Scene *scene, struct Object *ob, struct ListBase *dispbase);
+void BKE_mball_polygonize(struct Scene *scene, struct Object *ob, struct ListBase *dispbase, bool for_render);
bool BKE_mball_is_basis_for(struct Object *ob1, struct Object *ob2);
bool BKE_mball_is_basis(struct Object *ob);
struct Object *BKE_mball_basis_find(struct Scene *scene, struct Object *ob);
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h
index e582af77d61..a3d1eb74211 100644
--- a/source/blender/blenkernel/BKE_mesh.h
+++ b/source/blender/blenkernel/BKE_mesh.h
@@ -31,8 +31,6 @@
* \ingroup bke
*/
-/***/
-
struct ID;
struct BoundBox;
struct DispList;
@@ -60,108 +58,31 @@ struct UvVertMap;
struct UvMapVert;
struct UvElementMap;
struct UvElement;
+
#ifdef __cplusplus
extern "C" {
#endif
-struct BMesh *BKE_mesh_to_bmesh(struct Mesh *me, struct Object *ob);
-
-/*
- * this function recreates a tessellation.
- * returns number of tessellation faces.
- *
- * use_poly_origindex sets whether or not the tessellation faces' origindex
- * layer should point to original poly indices or real poly indices.
- *
- * use_face_origindex sets the tessellation faces' origindex layer
- * to point to the tessellation faces themselves, not the polys.
- *
- * if both of the above are 0, it'll use the indices of the mpolys of the MPoly
- * data in pdata, and ignore the origindex layer altogether.
- */
-int BKE_mesh_recalc_tessellation(struct CustomData *fdata, struct CustomData *ldata, struct CustomData *pdata,
- struct MVert *mvert,
- int totface, int totloop, int totpoly,
- const bool do_face_normals);
-
-/* for forwards compat only quad->tri polys to mface, skip ngons.
- */
-int BKE_mesh_mpoly_to_mface(struct CustomData *fdata, struct CustomData *ldata,
- struct CustomData *pdata, int totface, int totloop, int totpoly);
-
-/*calculates a face normal.*/
-void BKE_mesh_calc_poly_normal(struct MPoly *mpoly, struct MLoop *loopstart,
- struct MVert *mvarray, float no[3]);
-
-void BKE_mesh_calc_poly_normal_coords(struct MPoly *mpoly, struct MLoop *loopstart,
- const float (*vertex_coords)[3], float no[3]);
-
-void BKE_mesh_calc_poly_center(struct MPoly *mpoly, struct MLoop *loopstart,
- struct MVert *mvarray, float cent[3]);
-
-float BKE_mesh_calc_poly_area(struct MPoly *mpoly, struct MLoop *loopstart,
- struct MVert *mvarray, const float polynormal[3]);
-
-void BKE_mesh_calc_poly_angles(struct MPoly *mpoly, struct MLoop *loopstart,
- struct MVert *mvarray, float angles[]);
-
-int *BKE_mesh_calc_smoothgroups(const struct MEdge *medge, const int totedge,
- const struct MPoly *mpoly, const int totpoly,
- const struct MLoop *mloop, const int totloop,
- int *r_totgroup);
+/* setting zero so we can catch bugs in OpenMP/BMesh */
+#ifdef DEBUG
+# define BKE_MESH_OMP_LIMIT 0
+#else
+# define BKE_MESH_OMP_LIMIT 10000
+#endif
-void BKE_mesh_calc_relative_deform(
- const struct MPoly *mpoly, const int totpoly,
- const struct MLoop *mloop, const int totvert,
+/* *** mesh.c *** */
- const float (*vert_cos_src)[3],
- const float (*vert_cos_dst)[3],
-
- const float (*vert_cos_org)[3],
- float (*vert_cos_new)[3]);
+struct BMesh *BKE_mesh_to_bmesh(struct Mesh *me, struct Object *ob);
-/* Find the index of the loop in 'poly' which references vertex,
- * returns -1 if not found */
int poly_find_loop_from_vert(const struct MPoly *poly,
const struct MLoop *loopstart,
unsigned vert);
-/* Fill 'adj_r' with the loop indices in 'poly' adjacent to the
- * vertex. Returns the index of the loop matching vertex, or -1 if the
- * vertex is not in 'poly' */
int poly_get_adj_loops_from_vert(unsigned adj_r[3], const struct MPoly *poly,
const struct MLoop *mloop, unsigned vert);
-/* Return the index of the edge vert that is not equal to 'v'. If
- * neither edge vertex is equal to 'v', returns -1. */
int BKE_mesh_edge_other_vert(const struct MEdge *e, int v);
-/* update the hide flag for edges and polys from the corresponding
- * flag in verts */
-void BKE_mesh_flush_hidden_from_verts_ex(const struct MVert *mvert,
- const struct MLoop *mloop,
- struct MEdge *medge, const int totedge,
- struct MPoly *mpoly, const int totpoly);
-void BKE_mesh_flush_hidden_from_verts(struct Mesh *me);
-
-void BKE_mesh_flush_hidden_from_polys_ex(struct MVert *mvert,
- const struct MLoop *mloop,
- struct MEdge *medge, const int totedge,
- const struct MPoly *mpoly, const int totpoly);
-void BKE_mesh_flush_hidden_from_polys(struct Mesh *me);
-
-
-void BKE_mesh_flush_select_from_polys_ex(struct MVert *mvert, const int totvert,
- const struct MLoop *mloop,
- struct MEdge *medge, const int totedge,
- const struct MPoly *mpoly, const int totpoly);
-void BKE_mesh_flush_select_from_polys(struct Mesh *me);
-void BKE_mesh_flush_select_from_verts_ex(const struct MVert *mvert, const int totvert,
- const struct MLoop *mloop,
- struct MEdge *medge, const int totedge,
- struct MPoly *mpoly, const int totpoly);
-void BKE_mesh_flush_select_from_verts(struct Mesh *me);
-
void BKE_mesh_unlink(struct Mesh *me);
void BKE_mesh_free(struct Mesh *me, int unlink);
struct Mesh *BKE_mesh_add(struct Main *bmain, const char *name);
@@ -191,64 +112,99 @@ void BKE_mesh_to_curve(struct Scene *scene, struct Object *ob);
void BKE_mesh_material_index_remove(struct Mesh *me, short index);
void BKE_mesh_material_index_clear(struct Mesh *me);
void BKE_mesh_smooth_flag_set(struct Object *meshOb, int enableSmooth);
-void BKE_mesh_convert_mfaces_to_mpolys(struct Mesh *mesh);
-void BKE_mesh_do_versions_convert_mfaces_to_mpolys(struct Mesh *mesh);
-void BKE_mesh_convert_mfaces_to_mpolys_ex(struct ID *id,
- struct CustomData *fdata, struct CustomData *ldata, struct CustomData *pdata,
- int totedge_i, int totface_i, int totloop_i, int totpoly_i,
- struct MEdge *medge, struct MFace *mface,
- int *totloop_r, int *totpoly_r,
- struct MLoop **mloop_r, struct MPoly **mpoly_r);
-
-void BKE_mesh_calc_normals_tessface(struct MVert *mverts, int numVerts, struct MFace *mfaces, int numFaces, float (*faceNors_r)[3]);
-
-/* used for unit testing; compares two meshes, checking only
- * differences we care about. should be usable with leaf's
- * testing framework I get RNA work done, will use hackish
- * testing code for now.*/
+
const char *BKE_mesh_cmp(struct Mesh *me1, struct Mesh *me2, float thresh);
struct BoundBox *BKE_mesh_boundbox_get(struct Object *ob);
void BKE_mesh_texspace_get(struct Mesh *me, float r_loc[3], float r_rot[3], float r_size[3]);
void BKE_mesh_texspace_copy_from_object(struct Mesh *me, struct Object *ob);
-/* if old, it converts mface->edcode to edge drawflags */
-void BKE_mesh_make_edges(struct Mesh *me, const bool use_old);
+bool BKE_mesh_uv_cdlayer_rename_index(struct Mesh *me, const int poly_index, const int loop_index, const int face_index,
+ const char *new_name, const bool do_tessface);
+bool BKE_mesh_uv_cdlayer_rename(struct Mesh *me, const char *old_name, const char *new_name, bool do_tessface);
-void BKE_mesh_strip_loose_faces(struct Mesh *me); /* Needed for compatibility (some old read code). */
-void BKE_mesh_strip_loose_polysloops(struct Mesh *me);
-void BKE_mesh_strip_loose_edges(struct Mesh *me);
+float (*BKE_mesh_vertexCos_get(struct Mesh *me, int *r_numVerts))[3];
+
+/* vertex level transformations & checks (no derived mesh) */
+
+bool BKE_mesh_minmax(struct Mesh *me, float r_min[3], float r_max[3]);
+void BKE_mesh_translate(struct Mesh *me, const float offset[3], const bool do_keys);
+
+void BKE_mesh_ensure_navmesh(struct Mesh *me);
+
+void BKE_mesh_tessface_calc(struct Mesh *mesh);
+void BKE_mesh_tessface_ensure(struct Mesh *mesh);
+void BKE_mesh_tessface_clear(struct Mesh *mesh);
+
+void BKE_mesh_do_versions_cd_flag_init(struct Mesh *mesh);
+
+
+void BKE_mesh_mselect_clear(struct Mesh *me);
+void BKE_mesh_mselect_validate(struct Mesh *me);
+int BKE_mesh_mselect_find(struct Mesh *me, int index, int type);
+int BKE_mesh_mselect_active_get(struct Mesh *me, int type);
+void BKE_mesh_mselect_active_set(struct Mesh *me, int index, int type);
+
+
+
+/* *** mesh_evaluate.c *** */
-/* Calculate vertex and face normals, face normals are returned in *faceNors_r if non-NULL
- * and vertex normals are stored in actual mverts.
- */
void BKE_mesh_calc_normals_mapping(
struct MVert *mverts, int numVerts,
struct MLoop *mloop, struct MPoly *mpolys, int numLoops, int numPolys, float (*polyNors_r)[3],
struct MFace *mfaces, int numFaces, int *origIndexFace, float (*faceNors_r)[3]);
-/* extended version of 'BKE_mesh_calc_normals_poly' with option not to calc vertex normals */
void BKE_mesh_calc_normals_mapping_ex(
struct MVert *mverts, int numVerts,
struct MLoop *mloop, struct MPoly *mpolys, int numLoops, int numPolys, float (*polyNors_r)[3],
struct MFace *mfaces, int numFaces, int *origIndexFace, float (*faceNors_r)[3],
const bool only_face_normals);
-
void BKE_mesh_calc_normals_poly(
struct MVert *mverts, int numVerts,
struct MLoop *mloop, struct MPoly *mpolys,
int numLoops, int numPolys, float (*polyNors_r)[3],
const bool only_face_normals);
-
void BKE_mesh_calc_normals(struct Mesh *me);
+void BKE_mesh_calc_normals_tessface(
+ struct MVert *mverts, int numVerts,
+ struct MFace *mfaces, int numFaces,
+ float (*faceNors_r)[3]);
+void BKE_mesh_normals_loop_split(
+ struct MVert *mverts, const int numVerts, struct MEdge *medges, const int numEdges,
+ struct MLoop *mloops, float (*r_loopnors)[3], const int numLoops,
+ struct MPoly *mpolys, float (*polynors)[3], const int numPolys, float split_angle);
+
+void BKE_mesh_calc_poly_normal(
+ struct MPoly *mpoly, struct MLoop *loopstart,
+ struct MVert *mvarray, float no[3]);
+void BKE_mesh_calc_poly_normal_coords(
+ struct MPoly *mpoly, struct MLoop *loopstart,
+ const float (*vertex_coords)[3], float no[3]);
+void BKE_mesh_calc_poly_center(
+ struct MPoly *mpoly, struct MLoop *loopstart,
+ struct MVert *mvarray, float cent[3]);
+float BKE_mesh_calc_poly_area(
+ struct MPoly *mpoly, struct MLoop *loopstart,
+ struct MVert *mvarray, const float polynormal[3]);
+void BKE_mesh_calc_poly_angles(
+ struct MPoly *mpoly, struct MLoop *loopstart,
+ struct MVert *mvarray, float angles[]);
+
+void BKE_mesh_poly_edgehash_insert(
+ struct EdgeHash *ehash,
+ const struct MPoly *mp, const struct MLoop *mloop);
+void BKE_mesh_poly_edgebitmap_insert(
+ unsigned int *edge_bitmap,
+ const struct MPoly *mp, const struct MLoop *mloop);
+
+
+bool BKE_mesh_center_median(struct Mesh *me, float cent[3]);
+bool BKE_mesh_center_bounds(struct Mesh *me, float cent[3]);
+bool BKE_mesh_center_centroid(struct Mesh *me, float cent[3]);
-/* Return a newly MEM_malloc'd array of all the mesh vertex locations
- * (_numVerts_r_ may be NULL) */
-float (*BKE_mesh_vertexCos_get(struct Mesh *me, int *r_numVerts))[3];
/* map from uv vertex to face (for select linked, stitch, uv suburf) */
/* UvVertMap */
-
#define STD_UV_CONNECT_LIMIT 0.0001f
typedef struct UvVertMap {
@@ -302,46 +258,109 @@ typedef struct UvElementMap {
* to make that many islands, he can bite me :p */
#define INVALID_ISLAND 0xFFFF
-UvVertMap *BKE_mesh_uv_vert_map_create(struct MPoly *mpoly, struct MLoop *mloop, struct MLoopUV *mloopuv,
- unsigned int totpoly, unsigned int totvert, int selected, float *limit);
-UvMapVert *BKE_mesh_uv_vert_map_get_vert(UvVertMap *vmap, unsigned int v);
-void BKE_mesh_uv_vert_map_free(UvVertMap *vmap);
-
/* Connectivity data */
typedef struct MeshElemMap {
int *indices;
int count;
} MeshElemMap;
-
-typedef struct IndexNode {
- struct IndexNode *next, *prev;
- int index;
-} IndexNode;
-void BKE_mesh_vert_poly_map_create(MeshElemMap **r_map, int **r_mem,
- const struct MPoly *mface, const struct MLoop *mloop,
- int totvert, int totface, int totloop);
+/* mapping */
+UvVertMap *BKE_mesh_uv_vert_map_create(
+ struct MPoly *mpoly, struct MLoop *mloop, struct MLoopUV *mloopuv,
+ unsigned int totpoly, unsigned int totvert, int selected, float *limit);
+UvMapVert *BKE_mesh_uv_vert_map_get_vert(UvVertMap *vmap, unsigned int v);
+void BKE_mesh_uv_vert_map_free(UvVertMap *vmap);
-void BKE_mesh_vert_edge_map_create(MeshElemMap **r_map, int **r_mem,
- const struct MEdge *medge, int totvert, int totedge);
+void BKE_mesh_vert_poly_map_create(
+ MeshElemMap **r_map, int **r_mem,
+ const struct MPoly *mface, const struct MLoop *mloop,
+ int totvert, int totface, int totloop);
+void BKE_mesh_vert_edge_map_create(
+ MeshElemMap **r_map, int **r_mem,
+ const struct MEdge *medge, int totvert, int totedge);
+void BKE_mesh_edge_poly_map_create(
+ MeshElemMap **r_map, int **r_mem,
+ const struct MEdge *medge, const int totedge,
+ const struct MPoly *mpoly, const int totpoly,
+ const struct MLoop *mloop, const int totloop);
+
+/* tessface */
+void BKE_mesh_loops_to_mface_corners(
+ struct CustomData *fdata, struct CustomData *ldata,
+ struct CustomData *pdata, int lindex[4], int findex,
+ const int polyindex, const int mf_len,
+ const int numTex, const int numCol,
+ const bool hasPCol, const bool hasOrigSpace);
+int BKE_mesh_recalc_tessellation(
+ struct CustomData *fdata, struct CustomData *ldata, struct CustomData *pdata,
+ struct MVert *mvert,
+ int totface, int totloop, int totpoly,
+ const bool do_face_normals);
+int BKE_mesh_mpoly_to_mface(
+ struct CustomData *fdata, struct CustomData *ldata,
+ struct CustomData *pdata, int totface, int totloop, int totpoly);
+void BKE_mesh_convert_mfaces_to_mpolys(struct Mesh *mesh);
+void BKE_mesh_do_versions_convert_mfaces_to_mpolys(struct Mesh *mesh);
+void BKE_mesh_convert_mfaces_to_mpolys_ex(
+ struct ID *id,
+ struct CustomData *fdata, struct CustomData *ldata, struct CustomData *pdata,
+ int totedge_i, int totface_i, int totloop_i, int totpoly_i,
+ struct MEdge *medge, struct MFace *mface,
+ int *totloop_r, int *totpoly_r,
+ struct MLoop **mloop_r, struct MPoly **mpoly_r);
+
+/* flush flags */
+void BKE_mesh_flush_hidden_from_verts_ex(
+ const struct MVert *mvert,
+ const struct MLoop *mloop,
+ struct MEdge *medge, const int totedge,
+ struct MPoly *mpoly, const int totpoly);
+void BKE_mesh_flush_hidden_from_verts(struct Mesh *me);
+void BKE_mesh_flush_hidden_from_polys_ex(
+ struct MVert *mvert,
+ const struct MLoop *mloop,
+ struct MEdge *medge, const int totedge,
+ const struct MPoly *mpoly, const int totpoly);
+void BKE_mesh_flush_hidden_from_polys(struct Mesh *me);
+void BKE_mesh_flush_select_from_polys_ex(
+ struct MVert *mvert, const int totvert,
+ const struct MLoop *mloop,
+ struct MEdge *medge, const int totedge,
+ const struct MPoly *mpoly, const int totpoly);
+void BKE_mesh_flush_select_from_polys(struct Mesh *me);
+void BKE_mesh_flush_select_from_verts_ex(
+ const struct MVert *mvert, const int totvert,
+ const struct MLoop *mloop,
+ struct MEdge *medge, const int totedge,
+ struct MPoly *mpoly, const int totpoly);
+void BKE_mesh_flush_select_from_verts(struct Mesh *me);
-void BKE_mesh_edge_poly_map_create(MeshElemMap **r_map, int **r_mem,
- const struct MEdge *medge, const int totedge,
- const struct MPoly *mpoly, const int totpoly,
- const struct MLoop *mloop, const int totloop);
+/* smoothgroups */
+int *BKE_mesh_calc_smoothgroups(
+ const struct MEdge *medge, const int totedge,
+ const struct MPoly *mpoly, const int totpoly,
+ const struct MLoop *mloop, const int totloop,
+ int *r_totgroup, const bool use_bitflags);
-/* vertex level transformations & checks (no derived mesh) */
+/* spatial evaluation */
+void BKE_mesh_calc_relative_deform(
+ const struct MPoly *mpoly, const int totpoly,
+ const struct MLoop *mloop, const int totvert,
-int BKE_mesh_minmax(struct Mesh *me, float r_min[3], float r_max[3]);
-int BKE_mesh_center_median(struct Mesh *me, float cent[3]);
-int BKE_mesh_center_bounds(struct Mesh *me, float cent[3]);
-int BKE_mesh_center_centroid(struct Mesh *me, float cent[3]);
-void BKE_mesh_translate(struct Mesh *me, const float offset[3], const bool do_keys);
+ const float (*vert_cos_src)[3],
+ const float (*vert_cos_dst)[3],
+
+ const float (*vert_cos_org)[3],
+ float (*vert_cos_new)[3]);
-/* mesh_validate.c */
-/* XXX Loop v/e are unsigned, so using max uint_32 value as invalid marker... */
-#define INVALID_LOOP_EDGE_MARKER 4294967295u
-int BKE_mesh_validate_arrays(
+
+
+/* *** mesh_validate.c *** */
+
+int BKE_mesh_validate(struct Mesh *me, const int do_verbose);
+void BKE_mesh_cd_validate(struct Mesh *me);
+
+bool BKE_mesh_validate_arrays(
struct Mesh *me,
struct MVert *mverts, unsigned int totvert,
struct MEdge *medges, unsigned int totedge,
@@ -349,35 +368,22 @@ int BKE_mesh_validate_arrays(
struct MLoop *mloops, unsigned int totloop,
struct MPoly *mpolys, unsigned int totpoly,
struct MDeformVert *dverts, /* assume totvert length */
- const bool do_verbose, const bool do_fixes);
-int BKE_mesh_validate(struct Mesh *me, const int do_verbose);
-int BKE_mesh_validate_dm(struct DerivedMesh *dm);
+ const bool do_verbose, const bool do_fixes,
+ bool *r_change);
-void BKE_mesh_calc_edges(struct Mesh *mesh, bool update, const bool select);
-
-void BKE_mesh_ensure_navmesh(struct Mesh *me);
-
-void BKE_mesh_tessface_calc(struct Mesh *mesh);
-void BKE_mesh_tessface_ensure(struct Mesh *mesh);
-void BKE_mesh_tessface_clear(struct Mesh *mesh);
-
-/* Convert a triangle or quadrangle of loop/poly data to tessface data */
-void BKE_mesh_loops_to_mface_corners(struct CustomData *fdata, struct CustomData *ldata,
- struct CustomData *pdata, int lindex[4], int findex,
- const int polyindex, const int mf_len,
- const int numTex, const int numCol, const int hasPCol, const int hasOrigSpace);
-
-void BKE_mesh_poly_edgehash_insert(struct EdgeHash *ehash, const struct MPoly *mp, const struct MLoop *mloop);
-void BKE_mesh_poly_edgebitmap_insert(unsigned int *edge_bitmap, const struct MPoly *mp, const struct MLoop *mloop);
-
-void BKE_mesh_do_versions_cd_flag_init(struct Mesh *mesh);
+bool BKE_mesh_validate_all_customdata(
+ struct CustomData *vdata, struct CustomData *edata,
+ struct CustomData *ldata, struct CustomData *pdata,
+ const bool check_meshmask,
+ const bool do_verbose, const bool do_fixes,
+ bool *r_change);
+void BKE_mesh_strip_loose_faces(struct Mesh *me);
+void BKE_mesh_strip_loose_polysloops(struct Mesh *me);
+void BKE_mesh_strip_loose_edges(struct Mesh *me);
-void BKE_mesh_mselect_clear(struct Mesh *me);
-void BKE_mesh_mselect_validate(struct Mesh *me);
-int BKE_mesh_mselect_find(struct Mesh *me, int index, int type);
-int BKE_mesh_mselect_active_get(struct Mesh *me, int type);
-void BKE_mesh_mselect_active_set(struct Mesh *me, int index, int type);
+void BKE_mesh_calc_edges_legacy(struct Mesh *me, const bool use_old);
+void BKE_mesh_calc_edges(struct Mesh *mesh, bool update, const bool select);
#ifdef __cplusplus
}
diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h
index 0727e11f397..6bf42a3e885 100644
--- a/source/blender/blenkernel/BKE_modifier.h
+++ b/source/blender/blenkernel/BKE_modifier.h
@@ -29,6 +29,7 @@
*/
#include "DNA_modifier_types.h" /* needed for all enum typdefs */
+#include "BLI_compiler_attrs.h"
#include "BKE_customdata.h"
struct ID;
@@ -304,6 +305,9 @@ typedef struct ModifierTypeInfo {
TexWalkFunc walk, void *userData);
} ModifierTypeInfo;
+/* Initialize modifier's global data (type info and some common global storages). */
+void BKE_modifier_init(void);
+
ModifierTypeInfo *modifierType_getInfo(ModifierType type);
/* Modifier utility calls, do call through type pointer and return
@@ -322,11 +326,7 @@ bool modifier_isCorrectableDeformed(struct ModifierData *md);
bool modifier_isSameTopology(ModifierData *md);
bool modifier_isNonGeometrical(ModifierData *md);
bool modifier_isEnabled(struct Scene *scene, struct ModifierData *md, int required_mode);
-void modifier_setError(struct ModifierData *md, const char *format, ...)
-#ifdef __GNUC__
-__attribute__ ((format(printf, 2, 3)))
-#endif
-;
+void modifier_setError(struct ModifierData *md, const char *format, ...) ATTR_PRINTF_FORMAT(2, 3);
bool modifier_isPreview(struct ModifierData *md);
void modifiers_foreachObjectLink(struct Object *ob,
@@ -354,7 +354,7 @@ struct Object *modifiers_isDeformedByArmature(struct Object *ob);
struct Object *modifiers_isDeformedByLattice(struct Object *ob);
struct Object *modifiers_isDeformedByCurve(struct Object *ob);
bool modifiers_usesArmature(struct Object *ob, struct bArmature *arm);
-bool modifiers_isCorrectableDeformed(struct Object *ob);
+bool modifiers_isCorrectableDeformed(struct Scene *scene, struct Object *ob);
void modifier_freeTemporaryData(struct ModifierData *md);
bool modifiers_isPreview(struct Object *ob);
@@ -377,7 +377,15 @@ struct CDMaskLink *modifiers_calcDataMasks(struct Scene *scene,
struct ModifierData *modifiers_getLastPreview(struct Scene *scene,
struct ModifierData *md,
int required_mode);
-struct ModifierData *modifiers_getVirtualModifierList(struct Object *ob);
+
+typedef struct VirtualModifierData {
+ ArmatureModifierData amd;
+ CurveModifierData cmd;
+ LatticeModifierData lmd;
+ ShapeKeyModifierData smd;
+} VirtualModifierData;
+
+struct ModifierData *modifiers_getVirtualModifierList(struct Object *ob, struct VirtualModifierData *data);
/* ensure modifier correctness when changing ob->data */
void test_object_modifiers(struct Object *ob);
diff --git a/source/blender/blenkernel/BKE_navmesh_conversion.h b/source/blender/blenkernel/BKE_navmesh_conversion.h
index cc9c18c764d..3be363f4d7b 100644
--- a/source/blender/blenkernel/BKE_navmesh_conversion.h
+++ b/source/blender/blenkernel/BKE_navmesh_conversion.h
@@ -28,6 +28,10 @@
#ifndef __BKE_NAVMESH_CONVERSION_H__
#define __BKE_NAVMESH_CONVERSION_H__
+/** \file BKE_navmesh_conversion.h
+ * \ingroup bke
+ */
+
struct DerivedMesh;
/* navmesh_conversion.c */
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index 27192437c89..7cc8c7290f7 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -32,8 +32,8 @@
* \ingroup bke
*/
-#include "BLI_ghash.h"
#include "BLI_utildefines.h"
+#include "BLI_ghash.h"
#include "DNA_listBase.h"
@@ -131,8 +131,6 @@ typedef struct bNodeSocketType {
int type, subtype;
} bNodeSocketType;
-typedef void (*NodeSocketDrawFunction)(struct bContext *C, struct uiLayout *layout, struct PointerRNA *ptr, struct PointerRNA *node_ptr);
-
typedef void *(*NodeInitExecFunction)(struct bNodeExecContext *context, struct bNode *node, bNodeInstanceKey key);
typedef void (*NodeFreeExecFunction)(struct bNode *node, void *nodedata);
typedef void (*NodeExecFunction)(void *data, int thread, struct bNode *, struct bNodeExecData *execdata, struct bNodeStack **in, struct bNodeStack **out);
@@ -162,24 +160,19 @@ typedef struct bNodeType {
char storagename[64]; /* struct name for DNA */
- /// Main draw function for the node.
- void (*drawfunc)(const struct bContext *C, struct ARegion *ar, struct SpaceNode *snode,
+ /* Main draw function for the node */
+ void (*draw_nodetype)(const struct bContext *C, struct ARegion *ar, struct SpaceNode *snode,
struct bNodeTree *ntree, struct bNode *node, bNodeInstanceKey key);
- /// Updates the node geometry attributes according to internal state before actual drawing.
- void (*drawupdatefunc)(const struct bContext *C, struct bNodeTree *ntree, struct bNode *node);
- /// Draw the option buttons on the node.
- void (*uifunc)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr);
- /// Additional parameters in the side panel.
- void (*uifuncbut)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr);
- /// Additional drawing on backdrop.
- void (*uibackdropfunc)(struct SpaceNode *snode, struct ImBuf *backdrop, struct bNode *node, int x, int y);
-
- /// Draw a node socket. Default draws the input value button.
- /* XXX deprecated, only used for the OutputFile node,
- * should be removed at some point.
- */
- NodeSocketDrawFunction drawinputfunc;
- NodeSocketDrawFunction drawoutputfunc;
+ /* Updates the node geometry attributes according to internal state before actual drawing */
+ void (*draw_nodetype_prepare)(const struct bContext *C, struct bNodeTree *ntree, struct bNode *node);
+
+ /* Draw the option buttons on the node */
+ void (*draw_buttons)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr);
+ /* Additional parameters in the side panel */
+ void (*draw_buttons_ex)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr);
+
+ /* Additional drawing on backdrop */
+ void (*draw_backdrop)(struct SpaceNode *snode, struct ImBuf *backdrop, struct bNode *node, int x, int y);
/// Optional custom label function for the node header.
const char *(*labelfunc)(struct bNode *);
@@ -337,7 +330,7 @@ struct GHashIterator *ntreeTypeGetIterator(void);
#define NODE_TREE_TYPES_END \
} \
BLI_ghashIterator_free(__node_tree_type_iter__); \
-}
+} (void)0
void ntreeSetTypes(const struct bContext *C, struct bNodeTree *ntree);
@@ -746,6 +739,7 @@ struct ShadeResult;
#define SH_NODE_VECT_TRANSFORM 182
#define SH_NODE_SEPHSV 183
#define SH_NODE_COMBHSV 184
+#define SH_NODE_BSDF_HAIR 185
/* custom defines options for Material node */
#define SH_NODE_MAT_DIFF 1
diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h
index 992792dcb99..434175624b7 100644
--- a/source/blender/blenkernel/BKE_object.h
+++ b/source/blender/blenkernel/BKE_object.h
@@ -48,6 +48,7 @@ struct rctf;
struct MovieClip;
struct Main;
struct RigidBodyWorld;
+struct HookModifierData;
void BKE_object_workob_clear(struct Object *workob);
void BKE_object_workob_calc_parent(struct Scene *scene, struct Object *ob, struct Object *workob);
@@ -60,11 +61,14 @@ void BKE_object_copy_softbody(struct Object *obn, struct Object *ob);
void BKE_object_free_particlesystems(struct Object *ob);
void BKE_object_free_softbody(struct Object *ob);
void BKE_object_free_bulletsoftbody(struct Object *ob);
+void BKE_object_free_curve_cache(struct Object *ob);
void BKE_object_update_base_layer(struct Scene *scene, struct Object *ob);
void BKE_object_free(struct Object *ob);
void BKE_object_free_derived_caches(struct Object *ob);
+void BKE_object_modifier_hook_reset(struct Object *ob, struct HookModifierData *hmd);
+
bool BKE_object_support_modifier_type_check(struct Object *ob, int modifier_type);
void BKE_object_link_modifiers(struct Object *ob, struct Object *from);
@@ -169,7 +173,7 @@ int BKE_object_is_deform_modified(struct Scene *scene, struct Object *ob);
void BKE_object_relink(struct Object *ob);
-struct MovieClip *BKE_object_movieclip_get(struct Scene *scene, struct Object *ob, int use_default);
+struct MovieClip *BKE_object_movieclip_get(struct Scene *scene, struct Object *ob, bool use_default);
/* this function returns a superset of the scenes selection based on relationships */
@@ -193,6 +197,8 @@ struct LinkNode *BKE_object_relational_superset(struct Scene *scene, eObjectSet
struct LinkNode *BKE_object_groups(struct Object *ob);
void BKE_object_groups_clear(struct Scene *scene, struct Base *base, struct Object *object);
+struct KDTree *BKE_object_as_kdtree(struct Object *ob, int *r_tot);
+
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/blenkernel/BKE_ocean.h b/source/blender/blenkernel/BKE_ocean.h
index b733204e078..b750d8b283a 100644
--- a/source/blender/blenkernel/BKE_ocean.h
+++ b/source/blender/blenkernel/BKE_ocean.h
@@ -23,6 +23,10 @@
#ifndef __BKE_OCEAN_H__
#define __BKE_OCEAN_H__
+/** \file BKE_ocean.h
+ * \ingroup bli
+ */
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h
index 2baa8b78e47..1d81dfefe65 100644
--- a/source/blender/blenkernel/BKE_paint.h
+++ b/source/blender/blenkernel/BKE_paint.h
@@ -173,5 +173,4 @@ void free_sculptsession(struct Object *ob);
void free_sculptsession_deformMats(struct SculptSession *ss);
void sculptsession_bm_to_me(struct Object *ob, int reorder);
void sculptsession_bm_to_me_for_render(struct Object *object);
-
#endif
diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h
index 56b550a6f5d..d4965cf55fe 100644
--- a/source/blender/blenkernel/BKE_particle.h
+++ b/source/blender/blenkernel/BKE_particle.h
@@ -54,6 +54,7 @@ struct MCol;
struct MFace;
struct MVert;
struct IpoCurve;
+struct LatticeDeformData;
struct LinkNode;
struct KDTree;
struct RNG;
@@ -258,7 +259,7 @@ void psys_set_current_num(Object *ob, int index);
/* UNUSED */
// struct Object *psys_find_object(struct Scene *scene, struct ParticleSystem *psys);
-struct Object *psys_get_lattice(struct ParticleSimulationData *sim);
+struct LatticeDeformData *psys_create_lattice_deform_data(struct ParticleSimulationData *sim);
int psys_in_edit_mode(struct Scene *scene, struct ParticleSystem *psys);
int psys_check_enabled(struct Object *ob, struct ParticleSystem *psys);
diff --git a/source/blender/blenkernel/BKE_pbvh.h b/source/blender/blenkernel/BKE_pbvh.h
index 7d3d8d7dcbd..9e21831dba0 100644
--- a/source/blender/blenkernel/BKE_pbvh.h
+++ b/source/blender/blenkernel/BKE_pbvh.h
@@ -172,8 +172,8 @@ int BKE_pbvh_node_planes_contain_AABB(PBVHNode *node, void *data);
/* test if AABB is at least partially outside the planes' volume */
int BKE_pbvh_node_planes_exclude_AABB(PBVHNode *node, void *data);
-struct GHash *BKE_pbvh_bmesh_node_unique_verts(PBVHNode *node);
-struct GHash *BKE_pbvh_bmesh_node_other_verts(PBVHNode *node);
+struct GSet *BKE_pbvh_bmesh_node_unique_verts(PBVHNode *node);
+struct GSet *BKE_pbvh_bmesh_node_other_verts(PBVHNode *node);
void BKE_pbvh_bmesh_node_save_orig(PBVHNode *node);
void BKE_pbvh_bmesh_after_stroke(PBVH *bvh);
@@ -235,9 +235,10 @@ typedef struct PBVHVertexIter {
float *vmask;
/* bmesh */
- struct GHashIterator bm_unique_verts;
- struct GHashIterator bm_other_verts;
+ struct GSetIterator bm_unique_verts;
+ struct GSetIterator bm_other_verts;
struct CustomData *bm_vdata;
+ int cd_vert_mask_offset;
/* result: these are all computed in the macro, but we assume
* that compiler optimization's will skip the ones we don't use */
@@ -294,22 +295,20 @@ void pbvh_vertex_iter_init(PBVH *bvh, PBVHNode *node,
vi.mask = &vi.vmask[vi.vert_indices[vi.gx]]; \
} \
else { \
- if (!BLI_ghashIterator_done(&vi.bm_unique_verts)) {\
- vi.bm_vert = BLI_ghashIterator_getKey(&vi.bm_unique_verts); \
- BLI_ghashIterator_step(&vi.bm_unique_verts); \
+ if (!BLI_gsetIterator_done(&vi.bm_unique_verts)) {\
+ vi.bm_vert = BLI_gsetIterator_getKey(&vi.bm_unique_verts); \
+ BLI_gsetIterator_step(&vi.bm_unique_verts); \
} \
else { \
- vi.bm_vert = BLI_ghashIterator_getKey(&vi.bm_other_verts); \
- BLI_ghashIterator_step(&vi.bm_other_verts); \
+ vi.bm_vert = BLI_gsetIterator_getKey(&vi.bm_other_verts); \
+ BLI_gsetIterator_step(&vi.bm_other_verts); \
} \
if (mode == PBVH_ITER_UNIQUE && \
BM_elem_flag_test(vi.bm_vert, BM_ELEM_HIDDEN)) \
continue; \
vi.co = vi.bm_vert->co; \
vi.fno = vi.bm_vert->no; \
- vi.mask = CustomData_bmesh_get(vi.bm_vdata, \
- vi.bm_vert->head.data, \
- CD_PAINT_MASK); \
+ vi.mask = BM_ELEM_CD_GET_VOID_P(vi.bm_vert, vi.cd_vert_mask_offset); \
}
#define BKE_pbvh_vertex_iter_end \
diff --git a/source/blender/blenkernel/BKE_pointcache.h b/source/blender/blenkernel/BKE_pointcache.h
index 1cb50425c40..d5131fcd19e 100644
--- a/source/blender/blenkernel/BKE_pointcache.h
+++ b/source/blender/blenkernel/BKE_pointcache.h
@@ -156,6 +156,8 @@ typedef struct PTCacheID {
/* total number of simulated points (the cfra parameter is just for using same function pointer with totwrite) */
int (*totpoint)(void *calldata, int cfra);
+ /* report error if number of points does not match */
+ void (*error)(void *calldata, const char *message);
/* number of points written for current cache frame */
int (*totwrite)(void *calldata, int cfra);
diff --git a/source/blender/blenkernel/BKE_report.h b/source/blender/blenkernel/BKE_report.h
index ae457cf4f47..101fc463375 100644
--- a/source/blender/blenkernel/BKE_report.h
+++ b/source/blender/blenkernel/BKE_report.h
@@ -34,6 +34,7 @@ extern "C" {
#include <stdio.h>
#include "DNA_windowmanager_types.h"
+#include "BLI_compiler_attrs.h"
#include "BLI_utildefines.h"
/* Reporting Information and Errors
@@ -47,18 +48,10 @@ void BKE_reports_init(ReportList *reports, int flag);
void BKE_reports_clear(ReportList *reports);
void BKE_report(ReportList *reports, ReportType type, const char *message);
-void BKE_reportf(ReportList *reports, ReportType type, const char *format, ...)
-#ifdef __GNUC__
-__attribute__ ((format(printf, 3, 4)))
-#endif
-;
+void BKE_reportf(ReportList *reports, ReportType type, const char *format, ...) ATTR_PRINTF_FORMAT(3, 4);
void BKE_reports_prepend(ReportList *reports, const char *prepend);
-void BKE_reports_prependf(ReportList *reports, const char *prepend, ...)
-#ifdef __GNUC__
-__attribute__ ((format(printf, 2, 3)))
-#endif
-;
+void BKE_reports_prependf(ReportList *reports, const char *prepend, ...) ATTR_PRINTF_FORMAT(2, 3);
ReportType BKE_report_print_level(ReportList *reports);
void BKE_report_print_level_set(ReportList *reports, ReportType level);
diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h
index c883bdf74e0..3c0928d38a0 100644
--- a/source/blender/blenkernel/BKE_screen.h
+++ b/source/blender/blenkernel/BKE_screen.h
@@ -189,9 +189,15 @@ typedef struct PanelType {
/* uilist types */
-/* draw an item in the uiList */
+/* Draw an item in the uiList */
typedef void (*uiListDrawItemFunc)(struct uiList *, struct bContext *, struct uiLayout *, struct PointerRNA *,
- struct PointerRNA *, int, struct PointerRNA *, const char *, int);
+ struct PointerRNA *, int, struct PointerRNA *, const char *, int, int);
+
+/* Draw the filtering part of an uiList */
+typedef void (*uiListDrawFilterFunc)(struct uiList *, struct bContext *, struct uiLayout *);
+
+/* Filter items of an uiList */
+typedef void (*uiListFilterItemsFunc)(struct uiList *, struct bContext *, struct PointerRNA *, const char *);
typedef struct uiListType {
struct uiListType *next, *prev;
@@ -199,6 +205,8 @@ typedef struct uiListType {
char idname[BKE_ST_MAXNAME]; /* unique name */
uiListDrawItemFunc draw_item;
+ uiListDrawFilterFunc draw_filter;
+ uiListFilterItemsFunc filter_items;
/* RNA integration */
ExtensionRNA ext;
diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h
index 78018f04458..12b6d18ab7c 100644
--- a/source/blender/blenkernel/BKE_sequencer.h
+++ b/source/blender/blenkernel/BKE_sequencer.h
@@ -194,6 +194,7 @@ void BKE_sequencer_editing_free(struct Scene *scene);
void BKE_sequencer_sort(struct Scene *scene);
+struct Sequence *BKE_sequencer_from_elem(ListBase *seqbase, struct StripElem *se);
struct Sequence *BKE_sequencer_active_get(struct Scene *scene);
int BKE_sequencer_active_get_pair(struct Scene *scene, struct Sequence **seq_act, struct Sequence **seq_other);
void BKE_sequencer_active_set(struct Scene *scene, struct Sequence *seq);
@@ -318,6 +319,8 @@ void BKE_sequencer_update_sound_bounds(struct Scene *scene, struct Sequence *seq
void BKE_sequencer_update_muting(struct Editing *ed);
void BKE_sequencer_update_sound(struct Scene *scene, struct bSound *sound);
+void BKE_sequencer_refresh_sound_length(struct Scene *scene);
+
void BKE_sequence_base_unique_name_recursive(ListBase *seqbasep, struct Sequence *seq);
void BKE_sequence_base_dupli_recursive(struct Scene *scene, struct Scene *scene_to, ListBase *nseqbase, ListBase *seqbase, int dupe_flag);
bool BKE_sequence_is_valid_check(struct Sequence *seq);
diff --git a/source/blender/blenkernel/BKE_shrinkwrap.h b/source/blender/blenkernel/BKE_shrinkwrap.h
index 61d82e6c604..323a926863c 100644
--- a/source/blender/blenkernel/BKE_shrinkwrap.h
+++ b/source/blender/blenkernel/BKE_shrinkwrap.h
@@ -134,9 +134,9 @@ void shrinkwrapModifier_deform(struct ShrinkwrapModifierData *smd, struct Object
* Thus it provides an easy way to cast the same ray across several trees
* (where each tree was built on its own coords space)
*/
-int normal_projection_project_vertex(char options, const float vert[3], const float dir[3],
- const SpaceTransform *transf, BVHTree *tree, BVHTreeRayHit *hit,
- BVHTree_RayCastCallback callback, void *userdata);
+int BKE_shrinkwrap_project_normal(char options, const float vert[3], const float dir[3],
+ const SpaceTransform *transf, BVHTree *tree, BVHTreeRayHit *hit,
+ BVHTree_RayCastCallback callback, void *userdata);
/*
* NULL initializers to local data
diff --git a/source/blender/blenkernel/BKE_subsurf.h b/source/blender/blenkernel/BKE_subsurf.h
index 653f2a42675..ab8b8b29915 100644
--- a/source/blender/blenkernel/BKE_subsurf.h
+++ b/source/blender/blenkernel/BKE_subsurf.h
@@ -72,11 +72,11 @@ struct DerivedMesh *subsurf_make_derived_from_derived(
void subsurf_calculate_limit_positions(struct Mesh *me, float (*positions_r)[3]);
/* get gridsize from 'level', level must be greater than zero */
-int ccg_gridsize(int level);
+int BKE_ccg_gridsize(int level);
/* x/y grid coordinates at 'low_level' can be multiplied by the result
* of this function to convert to grid coordinates at 'high_level' */
-int ccg_factor(int low_level, int high_level);
+int BKE_ccg_factor(int low_level, int high_level);
void subsurf_copy_grid_hidden(struct DerivedMesh *dm,
const struct MPoly *mpoly,
diff --git a/source/blender/blenkernel/BKE_text.h b/source/blender/blenkernel/BKE_text.h
index 24fd763d078..bba209334d4 100644
--- a/source/blender/blenkernel/BKE_text.h
+++ b/source/blender/blenkernel/BKE_text.h
@@ -58,7 +58,7 @@ void BKE_text_write (struct Text *text, const char *str);
char *txt_to_buf (struct Text *text);
void txt_clean_text (struct Text *text);
-void txt_order_cursors (struct Text *text);
+void txt_order_cursors (struct Text *text, const bool reverse);
int txt_find_string (struct Text *text, const char *findstr, int wrap, int match_case);
int txt_has_sel (struct Text *text);
int txt_get_span (struct TextLine *from, struct TextLine *to);
diff --git a/source/blender/blenkernel/BKE_texture.h b/source/blender/blenkernel/BKE_texture.h
index ac0d507003e..e9e351f8f37 100644
--- a/source/blender/blenkernel/BKE_texture.h
+++ b/source/blender/blenkernel/BKE_texture.h
@@ -52,6 +52,7 @@ struct ParticleSettings;
struct PointDensity;
struct Tex;
struct TexMapping;
+struct TexResult;
struct VoxelData;
struct World;
@@ -101,8 +102,8 @@ void set_current_particle_texture(struct ParticleSettings *part, struct Tex *tex
int has_current_material_texture(struct Material *ma);
-struct TexMapping *add_tex_mapping(void);
-void default_tex_mapping(struct TexMapping *texmap);
+struct TexMapping *add_tex_mapping(int type);
+void default_tex_mapping(struct TexMapping *texmap, int type);
void init_tex_mapping(struct TexMapping *texmap);
struct ColorMapping *add_color_mapping(void);
@@ -129,6 +130,8 @@ struct OceanTex *BKE_copy_oceantex(struct OceanTex *ot);
bool BKE_texture_dependsOnTime(const struct Tex *texture);
+void BKE_texture_get_value(struct Scene *scene, struct Tex *texture, float *tex_co, struct TexResult *texres, bool use_color_management);
+
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/blenkernel/BKE_tracking.h b/source/blender/blenkernel/BKE_tracking.h
index 8b68d5d9b78..cdd21a58d92 100644
--- a/source/blender/blenkernel/BKE_tracking.h
+++ b/source/blender/blenkernel/BKE_tracking.h
@@ -73,7 +73,7 @@ void BKE_tracking_get_projection_matrix(struct MovieTracking *tracking, struct M
/* **** Clipboard **** */
void BKE_tracking_clipboard_free(void);
void BKE_tracking_clipboard_copy_tracks(struct MovieTracking *tracking, struct MovieTrackingObject *object);
-int BKE_tracking_clipboard_has_tracks(void);
+bool BKE_tracking_clipboard_has_tracks(void);
void BKE_tracking_clipboard_paste_tracks(struct MovieTracking *tracking, struct MovieTrackingObject *object);
/* **** Track **** */
@@ -85,8 +85,8 @@ void BKE_tracking_track_free(struct MovieTrackingTrack *track);
void BKE_tracking_track_flag_set(struct MovieTrackingTrack *track, int area, int flag);
void BKE_tracking_track_flag_clear(struct MovieTrackingTrack *track, int area, int flag);
-int BKE_tracking_track_has_marker_at_frame(struct MovieTrackingTrack *track, int framenr);
-int BKE_tracking_track_has_enabled_marker_at_frame(struct MovieTrackingTrack *track, int framenr);
+bool BKE_tracking_track_has_marker_at_frame(struct MovieTrackingTrack *track, int framenr);
+bool BKE_tracking_track_has_enabled_marker_at_frame(struct MovieTrackingTrack *track, int framenr);
void BKE_tracking_track_path_clear(struct MovieTrackingTrack *track, int ref_frame, int action);
void BKE_tracking_tracks_join(struct MovieTracking *tracking, struct MovieTrackingTrack *dst_track, struct MovieTrackingTrack *src_track);
@@ -103,7 +103,7 @@ float *BKE_tracking_track_get_mask(int frame_width, int frame_height, struct Mov
struct MovieTrackingMarker *marker);
/* selection */
-void BKE_tracking_track_select(struct ListBase *tracksbase, struct MovieTrackingTrack *track, int area, int extend);
+void BKE_tracking_track_select(struct ListBase *tracksbase, struct MovieTrackingTrack *track, int area, bool extend);
void BKE_tracking_track_deselect(struct MovieTrackingTrack *track, int area);
void BKE_tracking_tracks_deselect_all(struct ListBase *tracksbase);
@@ -150,7 +150,7 @@ struct MovieTrackingPlaneMarker *BKE_tracking_plane_marker_ensure(struct MovieTr
/* **** Object **** */
struct MovieTrackingObject *BKE_tracking_object_add(struct MovieTracking *tracking, const char *name);
-int BKE_tracking_object_delete(struct MovieTracking *tracking, struct MovieTrackingObject *object);
+bool BKE_tracking_object_delete(struct MovieTracking *tracking, struct MovieTrackingObject *object);
void BKE_tracking_object_unique_name(struct MovieTracking *tracking, struct MovieTrackingObject *object);
@@ -183,7 +183,7 @@ void BKE_tracking_distortion_update(struct MovieDistortion *distortion, struct M
void BKE_tracking_distortion_set_threads(struct MovieDistortion *distortion, int threads);
struct MovieDistortion *BKE_tracking_distortion_copy(struct MovieDistortion *distortion);
struct ImBuf *BKE_tracking_distortion_exec(struct MovieDistortion *distortion, struct MovieTracking *tracking,
- struct ImBuf *ibuf, int width, int height, float overscan, int undistort);
+ struct ImBuf *ibuf, int width, int height, float overscan, bool undistort);
void BKE_tracking_distortion_free(struct MovieDistortion *distortion);
void BKE_tracking_distort_v2(struct MovieTracking *tracking, const float co[2], float r_co[2]);
@@ -199,15 +199,15 @@ void BKE_tracking_max_undistortion_delta_across_bound(struct MovieTracking *trac
/* **** Image sampling **** */
struct ImBuf *BKE_tracking_sample_pattern(int frame_width, int frame_height,
struct ImBuf *struct_ibuf, struct MovieTrackingTrack *track,
- struct MovieTrackingMarker *marker, int from_anchor, int use_mask,
+ struct MovieTrackingMarker *marker, bool from_anchor, bool use_mask,
int num_samples_x, int num_samples_y, float pos[2]);
struct ImBuf *BKE_tracking_get_pattern_imbuf(struct ImBuf *ibuf, struct MovieTrackingTrack *track,
- struct MovieTrackingMarker *marker, int anchored, int disable_channels);
+ struct MovieTrackingMarker *marker, bool anchored, bool disable_channels);
struct ImBuf *BKE_tracking_get_search_imbuf(struct ImBuf *ibuf, struct MovieTrackingTrack *track,
- struct MovieTrackingMarker *marker, int anchored, int disable_channels);
+ struct MovieTrackingMarker *marker, bool anchored, bool disable_channels);
-void BKE_tracking_disable_channels(struct ImBuf *ibuf, int disable_red, int disable_green,
- int disable_blue, int grayscale);
+void BKE_tracking_disable_channels(struct ImBuf *ibuf, bool disable_red, bool disable_green,
+ bool disable_blue, bool grayscale);
/* **** 2D tracking **** */
struct MovieTrackingContext *BKE_tracking_context_new(struct MovieClip *clip, struct MovieClipUser *user,
@@ -215,8 +215,8 @@ struct MovieTrackingContext *BKE_tracking_context_new(struct MovieClip *clip, st
void BKE_tracking_context_free(struct MovieTrackingContext *context);
void BKE_tracking_context_sync(struct MovieTrackingContext *context);
void BKE_tracking_context_sync_user(const struct MovieTrackingContext *context, struct MovieClipUser *user);
-int BKE_tracking_context_step(struct MovieTrackingContext *context);
-void BKE_tracking_refine_marker(struct MovieClip *clip, struct MovieTrackingTrack *track, struct MovieTrackingMarker *marker, int backwards);
+bool BKE_tracking_context_step(struct MovieTrackingContext *context);
+void BKE_tracking_context_finish(struct MovieTrackingContext *context);
bool BKE_tracking_track_region(const struct MovieTrackingTrack *track,
const struct MovieTrackingMarker *old_marker,
@@ -234,30 +234,33 @@ void BKE_tracking_apply_inverse_homography(const struct MovieTrackingMarker *mar
float *warped_position_x,
float *warped_position_y);
+void BKE_tracking_refine_marker(struct MovieClip *clip, struct MovieTrackingTrack *track, struct MovieTrackingMarker *marker, bool backwards);
+
/* **** Plane tracking **** */
void BKE_tracking_track_plane_from_existing_motion(struct MovieTrackingPlaneTrack *plane_track, int start_frame);
+void BKE_tracking_retrack_plane_from_existing_motion_at_segment(struct MovieTrackingPlaneTrack *plane_track, int start_frame);
void BKE_tracking_homography_between_two_quads(/*const*/ float reference_corners[4][2], /*const*/ float corners[4][2], float H[3][3]);
/* **** Camera solving **** */
-int BKE_tracking_reconstruction_check(struct MovieTracking *tracking, struct MovieTrackingObject *object,
- char *error_msg, int error_size);
+bool BKE_tracking_reconstruction_check(struct MovieTracking *tracking, struct MovieTrackingObject *object,
+ char *error_msg, int error_size);
-struct MovieReconstructContext *BKE_tracking_reconstruction_context_new(struct MovieTracking *tracking,
+struct MovieReconstructContext *BKE_tracking_reconstruction_context_new(struct MovieClip *clip,
struct MovieTrackingObject *object,
int keyframe1, int keyframe2,
int width, int height);
void BKE_tracking_reconstruction_context_free(struct MovieReconstructContext *context);
void BKE_tracking_reconstruction_solve(struct MovieReconstructContext *context, short *stop, short *do_update,
float *progress, char *stats_message, int message_size);
-int BKE_tracking_reconstruction_finish(struct MovieReconstructContext *context, struct MovieTracking *tracking);
+bool BKE_tracking_reconstruction_finish(struct MovieReconstructContext *context, struct MovieTracking *tracking);
void BKE_tracking_reconstruction_scale(struct MovieTracking *tracking, float scale[3]);
/* **** Feature detection **** */
void BKE_tracking_detect_fast(struct MovieTracking *tracking, struct ListBase *tracksbase, struct ImBuf *imbuf,
int framenr, int margin, int min_trackness, int min_distance, struct bGPDlayer *layer,
- int place_outside_layer);
+ bool place_outside_layer);
/* **** 2D stabilization **** */
void BKE_tracking_stabilization_data_get(struct MovieTracking *tracking, int framenr, int width, int height,
diff --git a/source/blender/blenkernel/BKE_treehash.h b/source/blender/blenkernel/BKE_treehash.h
new file mode 100644
index 00000000000..54deef1ce2f
--- /dev/null
+++ b/source/blender/blenkernel/BKE_treehash.h
@@ -0,0 +1,52 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor(s): Blender Foundation 2013
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+#ifndef __BKE_TREEHASH_H__
+#define __BKE_TREEHASH_H__
+
+/** \file BKE_treehash.h
+ * \ingroup bke
+ */
+
+struct ID;
+struct GHash;
+struct BLI_mempool;
+struct TreeStoreElem;
+
+/* create and fill hashtable with treestore elements */
+void *BKE_treehash_create_from_treestore(struct BLI_mempool *treestore);
+
+/* full rebuild for already allocated hashtable */
+void *BKE_treehash_rebuild_from_treestore(void *treehash, struct BLI_mempool *treestore);
+
+/* full rebuild for already allocated hashtable */
+void BKE_treehash_add_element(void *treehash, struct TreeStoreElem *elem);
+
+/* find first unused element with specific type, nr and id */
+struct TreeStoreElem *BKE_treehash_lookup_unused(void *treehash, short type, short nr, struct ID *id);
+
+/* find user or unused element with specific type, nr and id */
+struct TreeStoreElem *BKE_treehash_lookup_any(void *treehash, short type, short nr, struct ID *id);
+
+/* free treehash structure */
+void BKE_treehash_free(void *treehash);
+
+#endif
diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt
index 655e0d65133..0ac3737b6a2 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -45,6 +45,7 @@ set(INC
../../../intern/raskter
../../../intern/smoke/extern
../../../extern/libmv
+ ../../../intern/atomic
# XXX - BAD LEVEL CALL WM_api.h
../windowmanager
@@ -114,6 +115,7 @@ set(SRC
intern/material.c
intern/mball.c
intern/mesh.c
+ intern/mesh_evaluate.c
intern/mesh_validate.c
intern/modifier.c
intern/modifiers_bmesh.c
@@ -152,6 +154,7 @@ set(SRC
intern/text.c
intern/texture.c
intern/tracking.c
+ intern/treehash.c
intern/unit.c
intern/world.c
intern/writeavi.c
@@ -243,6 +246,7 @@ set(SRC
BKE_text.h
BKE_texture.h
BKE_tracking.h
+ BKE_treehash.h
BKE_unit.h
BKE_utildefines.h
BKE_world.h
diff --git a/source/blender/blenkernel/SConscript b/source/blender/blenkernel/SConscript
index 6d080fea031..07dbc1d6065 100644
--- a/source/blender/blenkernel/SConscript
+++ b/source/blender/blenkernel/SConscript
@@ -52,6 +52,7 @@ incs = [
'#/intern/iksolver/extern',
'#/intern/opennl/extern',
'#/intern/smoke/extern',
+ '#/intern/atomic',
'../avi',
'../blenfont',
'../blenlib',
@@ -100,6 +101,9 @@ if env['WITH_BF_SDL']:
incs += ' ' + env['BF_SDL_INC']
defs.append('WITH_SDL')
+if env['WITH_BF_OIIO']:
+ defs.append('WITH_OPENIMAGEIO')
+
if env['WITH_BF_OPENEXR']:
defs.append('WITH_OPENEXR')
diff --git a/source/blender/blenkernel/intern/CCGSubSurf.c b/source/blender/blenkernel/intern/CCGSubSurf.c
index d4454a95a2d..ffb92788d4d 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf.c
+++ b/source/blender/blenkernel/intern/CCGSubSurf.c
@@ -248,7 +248,7 @@ static CCGAllocatorIFC *_getStandardAllocatorIFC(void)
/***/
-int ccg_gridsize(int level)
+BLI_INLINE int ccg_gridsize(int level)
{
BLI_assert(level > 0);
BLI_assert(level <= CCGSUBSURF_LEVEL_MAX + 1);
@@ -256,7 +256,12 @@ int ccg_gridsize(int level)
return (1 << (level - 1)) + 1;
}
-int ccg_factor(int low_level, int high_level)
+int BKE_ccg_gridsize(int level)
+{
+ return ccg_gridsize(level);
+}
+
+int BKE_ccg_factor(int low_level, int high_level)
{
BLI_assert(low_level > 0 && high_level > 0);
BLI_assert(low_level <= high_level);
@@ -264,7 +269,7 @@ int ccg_factor(int low_level, int high_level)
return 1 << (high_level - low_level);
}
-static int ccg_edgesize(int level)
+BLI_INLINE int ccg_edgesize(int level)
{
BLI_assert(level > 0);
BLI_assert(level <= CCGSUBSURF_LEVEL_MAX + 1);
@@ -272,7 +277,7 @@ static int ccg_edgesize(int level)
return 1 + (1 << level);
}
-static int ccg_spacing(int high_level, int low_level)
+BLI_INLINE int ccg_spacing(int high_level, int low_level)
{
BLI_assert(high_level > 0 && low_level > 0);
BLI_assert(high_level >= low_level);
@@ -281,7 +286,7 @@ static int ccg_spacing(int high_level, int low_level)
return 1 << (high_level - low_level);
}
-static int ccg_edgebase(int level)
+BLI_INLINE int ccg_edgebase(int level)
{
BLI_assert(level > 0);
BLI_assert(level <= CCGSUBSURF_LEVEL_MAX + 1);
@@ -742,7 +747,7 @@ BLI_INLINE float *_face_getIFNo(CCGFace *f, int lvl, int S, int x, int y, int le
byte *gridBase = FACE_getCenterData(f) + dataSize * (1 + S * (maxGridSize + maxGridSize * maxGridSize));
return (float *) &gridBase[dataSize * (maxGridSize + (y * maxGridSize + x) * spacing) + normalDataOffset];
}
-static int _face_getVertIndex(CCGFace *f, CCGVert *v)
+BLI_INLINE int _face_getVertIndex(CCGFace *f, CCGVert *v)
{
int i;
for (i = 0; i < f->numVerts; i++)
@@ -750,7 +755,7 @@ static int _face_getVertIndex(CCGFace *f, CCGVert *v)
return i;
return -1;
}
-static int _face_getEdgeIndex(CCGFace *f, CCGEdge *e)
+BLI_INLINE int _face_getEdgeIndex(CCGFace *f, CCGEdge *e)
{
int i;
for (i = 0; i < f->numVerts; i++)
diff --git a/source/blender/blenkernel/intern/CCGSubSurf.h b/source/blender/blenkernel/intern/CCGSubSurf.h
index d350d1f4280..fdf6d2df99f 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf.h
+++ b/source/blender/blenkernel/intern/CCGSubSurf.h
@@ -18,6 +18,9 @@
* ***** END GPL LICENSE BLOCK *****
*/
+#ifndef __CCGSUBSURF_H__
+#define __CCGSUBSURF_H__
+
/** \file blender/blenkernel/intern/CCGSubSurf.h
* \ingroup bke
*/
@@ -182,3 +185,5 @@ CCGFace* ccgFaceIterator_getCurrent (CCGFaceIterator *fi);
int ccgFaceIterator_isStopped (CCGFaceIterator *fi);
void ccgFaceIterator_next (CCGFaceIterator *fi);
void ccgFaceIterator_free (CCGFaceIterator *fi);
+
+#endif /* __CCGSUBSURF_H__ */
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index 2ece90183bd..884e7a813a8 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -82,11 +82,20 @@ static DerivedMesh *navmesh_dm_createNavMeshForVisualization(DerivedMesh *dm);
#include "GPU_extensions.h"
#include "GPU_material.h"
+/* very slow! enable for testing only! */
+// #define USE_MODIFIER_VALIDATE
+
+#ifdef USE_MODIFIER_VALIDATE
+# define ASSERT_IS_VALID_DM(dm) (BLI_assert((dm == NULL) || (DM_is_valid(dm) == true)))
+#else
+# define ASSERT_IS_VALID_DM(dm)
+#endif
+
static void add_shapekey_layers(DerivedMesh *dm, Mesh *me, Object *ob);
static void shapekey_layers_to_keyblocks(DerivedMesh *dm, Mesh *me, int actshape_uid);
-///////////////////////////////////
-///////////////////////////////////
+
+/* -------------------------------------------------------------------- */
static MVert *dm_getVertArray(DerivedMesh *dm)
{
@@ -429,9 +438,9 @@ void DM_update_tessface_data(DerivedMesh *dm)
int *polyindex = CustomData_get_layer(fdata, CD_ORIGINDEX);
- int mf_idx,
- totface = dm->getNumTessFaces(dm),
- ml_idx[4];
+ const int totface = dm->getNumTessFaces(dm);
+ int mf_idx;
+ int ml_idx[4];
/* Should never occure, but better abort than segfault! */
if (!polyindex)
@@ -879,6 +888,7 @@ DerivedMesh *mesh_create_derived_for_modifier(Scene *scene, Object *ob,
add_shapekey_layers(tdm, me, ob);
dm = modwrap_applyModifier(md, ob, tdm, 0);
+ ASSERT_IS_VALID_DM(dm);
if (tdm != dm) tdm->release(tdm);
}
@@ -1440,6 +1450,8 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
/* XXX Same as above... For now, only weights preview in WPaint mode. */
const int do_mod_wmcol = do_init_wmcol;
+ VirtualModifierData virtualModifierData;
+
ModifierApplyFlag app_flags = useRenderParams ? MOD_APPLY_RENDER : 0;
ModifierApplyFlag deform_app_flags = app_flags;
if (useCache)
@@ -1451,7 +1463,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
has_multires = 0;
if (!skipVirtualArmature) {
- firstmd = modifiers_getVirtualModifierList(ob);
+ firstmd = modifiers_getVirtualModifierList(ob, &virtualModifierData);
}
else {
/* game engine exception */
@@ -1648,6 +1660,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
}
else {
dm = CDDM_from_mesh(me, ob);
+ ASSERT_IS_VALID_DM(dm);
if (build_shapekey_layers)
add_shapekey_layers(dm, me, ob);
@@ -1672,7 +1685,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
DM_add_edge_layer(dm, CD_ORIGINDEX, CD_CALLOC, NULL);
DM_add_poly_layer(dm, CD_ORIGINDEX, CD_CALLOC, NULL);
-#pragma omp parallel sections if (dm->numVertData + dm->numEdgeData + dm->numPolyData >= DM_OMP_LIMIT)
+#pragma omp parallel sections if (dm->numVertData + dm->numEdgeData + dm->numPolyData >= BKE_MESH_OMP_LIMIT)
{
#pragma omp section
{ range_vn_i(DM_get_vert_data_layer(dm, CD_ORIGINDEX), dm->numVertData, 0); }
@@ -1705,6 +1718,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
}
ndm = modwrap_applyModifier(md, ob, dm, app_flags);
+ ASSERT_IS_VALID_DM(ndm);
if (ndm) {
/* if the modifier returned a new dm, release the old one */
@@ -1731,6 +1745,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
mti->requiredDataMask(ob, md) : 0));
ndm = modwrap_applyModifier(md, ob, orcodm, (app_flags & ~MOD_APPLY_USECACHE) | MOD_APPLY_ORCO);
+ ASSERT_IS_VALID_DM(ndm);
if (ndm) {
/* if the modifier returned a new dm, release the old one */
@@ -1748,6 +1763,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
DM_set_only_copy(clothorcodm, nextmask | CD_MASK_ORIGINDEX);
ndm = modwrap_applyModifier(md, ob, clothorcodm, (app_flags & ~MOD_APPLY_USECACHE) | MOD_APPLY_ORCO);
+ ASSERT_IS_VALID_DM(ndm);
if (ndm) {
/* if the modifier returned a new dm, release the old one */
@@ -1961,6 +1977,7 @@ static void editbmesh_calc_modifiers(Scene *scene, Object *ob, BMEditMesh *em, D
int do_init_wmcol = ((((Mesh *)ob->data)->drawflag & ME_DRAWEIGHT) && !do_final_wmcol);
int do_init_statvis = ((((Mesh *)ob->data)->drawflag & ME_DRAW_STATVIS) && !do_init_wmcol);
const int do_mod_wmcol = do_init_wmcol;
+ VirtualModifierData virtualModifierData;
modifiers_clearErrors(ob);
@@ -1969,7 +1986,7 @@ static void editbmesh_calc_modifiers(Scene *scene, Object *ob, BMEditMesh *em, D
}
dm = NULL;
- md = modifiers_getVirtualModifierList(ob);
+ md = modifiers_getVirtualModifierList(ob, &virtualModifierData);
/* copied from mesh_calc_modifiers */
if (do_mod_wmcol) {
@@ -2049,6 +2066,7 @@ static void editbmesh_calc_modifiers(Scene *scene, Object *ob, BMEditMesh *em, D
}
else {
dm = CDDM_from_editbmesh(em, FALSE, FALSE);
+ ASSERT_IS_VALID_DM(dm);
if (deformedVerts) {
CDDM_apply_vert_coords(dm, deformedVerts);
@@ -2068,10 +2086,13 @@ static void editbmesh_calc_modifiers(Scene *scene, Object *ob, BMEditMesh *em, D
mask &= ~CD_MASK_ORCO;
DM_set_only_copy(orcodm, mask | CD_MASK_ORIGINDEX);
- if (mti->applyModifierEM)
+ if (mti->applyModifierEM) {
ndm = modwrap_applyModifierEM(md, ob, em, orcodm, MOD_APPLY_ORCO);
- else
+ }
+ else {
ndm = modwrap_applyModifier(md, ob, orcodm, MOD_APPLY_ORCO);
+ }
+ ASSERT_IS_VALID_DM(ndm);
if (ndm) {
/* if the modifier returned a new dm, release the old one */
@@ -2097,6 +2118,7 @@ static void editbmesh_calc_modifiers(Scene *scene, Object *ob, BMEditMesh *em, D
ndm = modwrap_applyModifierEM(md, ob, em, dm, MOD_APPLY_USECACHE);
else
ndm = modwrap_applyModifier(md, ob, dm, MOD_APPLY_USECACHE);
+ ASSERT_IS_VALID_DM(ndm);
if (ndm) {
if (dm && dm != ndm)
@@ -2738,11 +2760,9 @@ void DM_calc_auto_bump_scale(DerivedMesh *dm)
int offs = 0; /* initial triangulation is 0,1,2 and 0, 2, 3 */
if (nr_verts == 4) {
float pos_len_diag0, pos_len_diag1;
- float vtmp[3];
- sub_v3_v3v3(vtmp, verts[2], verts[0]);
- pos_len_diag0 = dot_v3v3(vtmp, vtmp);
- sub_v3_v3v3(vtmp, verts[3], verts[1]);
- pos_len_diag1 = dot_v3v3(vtmp, vtmp);
+
+ pos_len_diag0 = len_squared_v3v3(verts[2], verts[0]);
+ pos_len_diag1 = len_squared_v3v3(verts[3], verts[1]);
if (pos_len_diag1 < pos_len_diag0) {
offs = 1; // alter split
@@ -2750,10 +2770,8 @@ void DM_calc_auto_bump_scale(DerivedMesh *dm)
else if (pos_len_diag0 == pos_len_diag1) { /* do UV check instead */
float tex_len_diag0, tex_len_diag1;
- sub_v2_v2v2(vtmp, tex_coords[2], tex_coords[0]);
- tex_len_diag0 = dot_v2v2(vtmp, vtmp);
- sub_v2_v2v2(vtmp, tex_coords[3], tex_coords[1]);
- tex_len_diag1 = dot_v2v2(vtmp, vtmp);
+ tex_len_diag0 = len_squared_v2v2(tex_coords[2], tex_coords[0]);
+ tex_len_diag1 = len_squared_v2v2(tex_coords[3], tex_coords[1]);
if (tex_len_diag1 < tex_len_diag0) {
offs = 1; /* alter split */
@@ -2762,7 +2780,7 @@ void DM_calc_auto_bump_scale(DerivedMesh *dm)
}
nr_tris_to_pile = nr_verts - 2;
if (nr_tris_to_pile == 1 || nr_tris_to_pile == 2) {
- const int indices[] = {offs + 0, offs + 1, offs + 2, offs + 0, offs + 2, (offs + 3) & 0x3 };
+ const int indices[6] = {offs + 0, offs + 1, offs + 2, offs + 0, offs + 2, (offs + 3) & 0x3 };
int t;
for (t = 0; t < nr_tris_to_pile; t++) {
float f2x_area_uv;
@@ -2782,7 +2800,7 @@ void DM_calc_auto_bump_scale(DerivedMesh *dm)
cross_v3_v3v3(norm, v0, v1);
f2x_surf_area = len_v3(norm);
- fsurf_ratio = f2x_surf_area / f2x_area_uv; // tri area divided by texture area
+ fsurf_ratio = f2x_surf_area / f2x_area_uv; /* tri area divided by texture area */
nr_accumulated++;
dsum += (double)(fsurf_ratio);
@@ -2841,14 +2859,19 @@ void DM_vertex_attributes_from_gpu(DerivedMesh *dm, GPUVertexAttribs *gattribs,
else
layer = CustomData_get_active_layer_index(ldata, CD_MLOOPUV);
- if (layer != -1) {
- a = attribs->tottface++;
+ a = attribs->tottface++;
+ if (layer != -1) {
attribs->tface[a].array = tfdata->layers[layer].data;
attribs->tface[a].em_offset = ldata->layers[layer].offset;
- attribs->tface[a].gl_index = gattribs->layer[b].glindex;
- attribs->tface[a].gl_texco = gattribs->layer[b].gltexco;
}
+ else {
+ attribs->tface[a].array = NULL;
+ attribs->tface[a].em_offset = -1;
+ }
+
+ attribs->tface[a].gl_index = gattribs->layer[b].glindex;
+ attribs->tface[a].gl_texco = gattribs->layer[b].gltexco;
}
else {
if (gattribs->layer[b].name[0])
@@ -2857,14 +2880,19 @@ void DM_vertex_attributes_from_gpu(DerivedMesh *dm, GPUVertexAttribs *gattribs,
else
layer = CustomData_get_active_layer_index(tfdata, CD_MTFACE);
- if (layer != -1) {
- a = attribs->tottface++;
+ a = attribs->tottface++;
+ if (layer != -1) {
attribs->tface[a].array = tfdata->layers[layer].data;
attribs->tface[a].em_offset = tfdata->layers[layer].offset;
- attribs->tface[a].gl_index = gattribs->layer[b].glindex;
- attribs->tface[a].gl_texco = gattribs->layer[b].gltexco;
}
+ else {
+ attribs->tface[a].array = NULL;
+ attribs->tface[a].em_offset = -1;
+ }
+
+ attribs->tface[a].gl_index = gattribs->layer[b].glindex;
+ attribs->tface[a].gl_texco = gattribs->layer[b].gltexco;
}
}
else if (gattribs->layer[b].type == CD_MCOL) {
@@ -2878,14 +2906,19 @@ void DM_vertex_attributes_from_gpu(DerivedMesh *dm, GPUVertexAttribs *gattribs,
else
layer = CustomData_get_active_layer_index(ldata, CD_MLOOPCOL);
- if (layer != -1) {
- a = attribs->totmcol++;
+ a = attribs->totmcol++;
+ if (layer != -1) {
attribs->mcol[a].array = tfdata->layers[layer].data;
/* odd, store the offset for a different layer type here, but editmode draw code expects it */
attribs->mcol[a].em_offset = ldata->layers[layer].offset;
- attribs->mcol[a].gl_index = gattribs->layer[b].glindex;
}
+ else {
+ attribs->mcol[a].array = NULL;
+ attribs->mcol[a].em_offset = -1;
+ }
+
+ attribs->mcol[a].gl_index = gattribs->layer[b].glindex;
}
else {
/* vertex colors */
@@ -2895,40 +2928,54 @@ void DM_vertex_attributes_from_gpu(DerivedMesh *dm, GPUVertexAttribs *gattribs,
else
layer = CustomData_get_active_layer_index(tfdata, CD_MCOL);
- if (layer != -1) {
- a = attribs->totmcol++;
+ a = attribs->totmcol++;
+ if (layer != -1) {
attribs->mcol[a].array = tfdata->layers[layer].data;
/* odd, store the offset for a different layer type here, but editmode draw code expects it */
attribs->mcol[a].em_offset = tfdata->layers[layer].offset;
- attribs->mcol[a].gl_index = gattribs->layer[b].glindex;
}
+ else {
+ attribs->mcol[a].array = NULL;
+ attribs->mcol[a].em_offset = -1;
+ }
+
+ attribs->mcol[a].gl_index = gattribs->layer[b].glindex;
}
}
else if (gattribs->layer[b].type == CD_TANGENT) {
/* tangents */
layer = CustomData_get_layer_index(fdata, CD_TANGENT);
- if (layer != -1) {
- attribs->tottang = 1;
+ attribs->tottang = 1;
+ if (layer != -1) {
attribs->tang.array = fdata->layers[layer].data;
attribs->tang.em_offset = fdata->layers[layer].offset;
- attribs->tang.gl_index = gattribs->layer[b].glindex;
}
+ else {
+ attribs->tang.array = NULL;
+ attribs->tang.em_offset = -1;
+ }
+
+ attribs->tang.gl_index = gattribs->layer[b].glindex;
}
else if (gattribs->layer[b].type == CD_ORCO) {
/* original coordinates */
layer = CustomData_get_layer_index(vdata, CD_ORCO);
+ attribs->totorco = 1;
if (layer != -1) {
- attribs->totorco = 1;
-
attribs->orco.array = vdata->layers[layer].data;
attribs->orco.em_offset = vdata->layers[layer].offset;
- attribs->orco.gl_index = gattribs->layer[b].glindex;
- attribs->orco.gl_texco = gattribs->layer[b].gltexco;
}
+ else {
+ attribs->orco.array = NULL;
+ attribs->orco.em_offset = -1;
+ }
+
+ attribs->orco.gl_index = gattribs->layer[b].glindex;
+ attribs->orco.gl_texco = gattribs->layer[b].gltexco;
}
}
}
@@ -3262,4 +3309,35 @@ void DM_debug_print_cdlayers(CustomData *data)
printf("}\n");
}
+bool DM_is_valid(DerivedMesh *dm)
+{
+ const bool do_verbose = true;
+ const bool do_fixes = false;
+
+ bool is_valid = true;
+ bool is_change = true;
+
+ is_valid &= BKE_mesh_validate_all_customdata(
+ dm->getVertDataLayout(dm),
+ dm->getEdgeDataLayout(dm),
+ dm->getLoopDataLayout(dm),
+ dm->getPolyDataLayout(dm),
+ 0, /* setting mask here isn't useful, gives false positives */
+ do_verbose, do_fixes, &is_change);
+
+ is_valid &= BKE_mesh_validate_arrays(
+ NULL,
+ dm->getVertArray(dm), dm->getNumVerts(dm),
+ dm->getEdgeArray(dm), dm->getNumEdges(dm),
+ dm->getTessFaceArray(dm), dm->getNumTessFaces(dm),
+ dm->getLoopArray(dm), dm->getNumLoops(dm),
+ dm->getPolyArray(dm), dm->getNumPolys(dm),
+ dm->getVertDataArray(dm, CD_MDEFORMVERT),
+ do_verbose, do_fixes, &is_change);
+
+ BLI_assert(is_change == false);
+
+ return is_valid;
+}
+
#endif /* NDEBUG */
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index bfef3542c45..94da2a330c1 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -440,6 +440,10 @@ void action_groups_clear_tempflags(bAction *act)
/* *************** Pose channels *************** */
+/**
+ * Return a pointer to the pose channel of the given name
+ * from this pose.
+ */
bPoseChannel *BKE_pose_channel_find_name(const bPose *pose, const char *name)
{
if (ELEM(NULL, pose, name) || (name[0] == '\0'))
@@ -451,8 +455,14 @@ bPoseChannel *BKE_pose_channel_find_name(const bPose *pose, const char *name)
return BLI_findstring(&((bPose *)pose)->chanbase, name, offsetof(bPoseChannel, name));
}
-/* Use with care, not on Armature poses but for temporal ones */
-/* (currently used for action constraints and in rebuild_pose) */
+/**
+ * Looks to see if the channel with the given name
+ * already exists in this pose - if not a new one is
+ * allocated and initialized.
+ *
+ * \note Use with care, not on Armature poses but for temporal ones.
+ * \note (currently used for action constraints and in rebuild_pose).
+ */
bPoseChannel *BKE_pose_channel_verify(bPose *pose, const char *name)
{
bPoseChannel *chan;
@@ -489,7 +499,28 @@ bPoseChannel *BKE_pose_channel_verify(bPose *pose, const char *name)
return chan;
}
-/* Find the active posechannel for an object (we can't just use pose, as layer info is in armature) */
+#ifndef NDEBUG
+bool BKE_pose_channels_is_valid(const bPose *pose)
+{
+ if (pose->chanhash) {
+ bPoseChannel *pchan;
+ for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) {
+ if (BLI_ghash_lookup(pose->chanhash, pchan->name) != pchan) {
+ return false;
+ }
+ }
+ }
+
+ return true;
+}
+
+#endif
+
+/**
+ * Find the active posechannel for an object (we can't just use pose, as layer info is in armature)
+ *
+ * \note: Object, not bPose is used here, as we need layer info from Armature)
+ */
bPoseChannel *BKE_pose_channel_active(Object *ob)
{
bArmature *arm = (ob) ? ob->data : NULL;
@@ -520,8 +551,14 @@ const char *BKE_pose_ikparam_get_name(bPose *pose)
}
return NULL;
}
-/* dst should be freed already, makes entire duplicate */
-void BKE_pose_copy_data(bPose **dst, bPose *src, int copycon)
+
+/**
+ * Allocate a new pose on the heap, and copy the src pose and it's channels
+ * into the new pose. *dst is set to the newly allocated structure, and assumed to be NULL.
+ *
+ * \param dst Should be freed already, makes entire duplicate.
+ */
+void BKE_pose_copy_data(bPose **dst, bPose *src, const bool copy_constraints)
{
bPose *outPose;
bPoseChannel *pchan;
@@ -542,8 +579,7 @@ void BKE_pose_copy_data(bPose **dst, bPose *src, int copycon)
outPose->avs = src->avs;
for (pchan = outPose->chanbase.first; pchan; pchan = pchan->next) {
- /* TODO: rename this argument... */
- if (copycon) {
+ if (copy_constraints) {
BKE_copy_constraints(&listb, &pchan->constraints, TRUE); // BKE_copy_constraints NULLs listb
pchan->constraints = listb;
pchan->mpath = NULL; /* motion paths should not get copied yet... */
@@ -555,8 +591,9 @@ void BKE_pose_copy_data(bPose **dst, bPose *src, int copycon)
}
/* for now, duplicate Bone Groups too when doing this */
- if (copycon)
+ if (copy_constraints) {
BLI_duplicatelist(&outPose->agroups, &src->agroups);
+ }
*dst = outPose;
}
@@ -594,11 +631,46 @@ void BKE_pose_ikparam_init(bPose *pose)
}
}
+
+/* only for real IK, not for auto-IK */
+static bool pose_channel_in_IK_chain(Object *ob, bPoseChannel *pchan, int level)
+{
+ bConstraint *con;
+ Bone *bone;
+
+ /* No need to check if constraint is active (has influence),
+ * since all constraints with CONSTRAINT_IK_AUTO are active */
+ for (con = pchan->constraints.first; con; con = con->next) {
+ if (con->type == CONSTRAINT_TYPE_KINEMATIC) {
+ bKinematicConstraint *data = con->data;
+ if ((data->rootbone == 0) || (data->rootbone > level)) {
+ if ((data->flag & CONSTRAINT_IK_AUTO) == 0)
+ return true;
+ }
+ }
+ }
+ for (bone = pchan->bone->childbase.first; bone; bone = bone->next) {
+ pchan = BKE_pose_channel_find_name(ob->pose, bone->name);
+ if (pchan && pose_channel_in_IK_chain(ob, pchan, level + 1))
+ return true;
+ }
+ return false;
+}
+
+bool BKE_pose_channel_in_IK_chain(Object *ob, bPoseChannel *pchan)
+{
+ return pose_channel_in_IK_chain(ob, pchan, 0);
+}
+
+/**
+ * Removes the hash for quick lookup of channels, must
+ * be done when adding/removing channels.
+ */
void BKE_pose_channels_hash_make(bPose *pose)
{
if (!pose->chanhash) {
bPoseChannel *pchan;
-
+
pose->chanhash = BLI_ghash_str_new("make_pose_chan gh");
for (pchan = pose->chanbase.first; pchan; pchan = pchan->next)
BLI_ghash_insert(pose->chanhash, pchan->name, pchan);
@@ -613,6 +685,10 @@ void BKE_pose_channels_hash_free(bPose *pose)
}
}
+/**
+ * Deallocates a pose channel.
+ * Does not free the pose channel itself.
+ */
void BKE_pose_channel_free(bPoseChannel *pchan)
{
if (pchan->custom) {
@@ -633,6 +709,10 @@ void BKE_pose_channel_free(bPoseChannel *pchan)
}
}
+/**
+ * Removes and deallocates all channels from a pose.
+ * Does not free the pose itself.
+ */
void BKE_pose_channels_free(bPose *pose)
{
bPoseChannel *pchan;
@@ -647,6 +727,9 @@ void BKE_pose_channels_free(bPose *pose)
BKE_pose_channels_hash_free(pose);
}
+/**
+ * Removes and deallocates all data from a pose, and also frees the pose.
+ */
void BKE_pose_free(bPose *pose)
{
if (pose) {
@@ -691,9 +774,13 @@ static void copy_pose_channel_data(bPoseChannel *pchan, const bPoseChannel *chan
}
}
-/* makes copies of internal data, unlike copy_pose_channel_data which only
- * copies the pose state.
- * hint: use when copying bones in editmode (on returned value from BKE_pose_channel_verify) */
+/**
+ * Copy the internal members of each pose channel including constraints
+ * and ID-Props, used when duplicating bones in editmode.
+ * (unlike copy_pose_channel_data which only).
+ *
+ * \note use when copying bones in editmode (on returned value from #BKE_pose_channel_verify)
+ */
void BKE_pose_channel_copy_data(bPoseChannel *pchan, const bPoseChannel *pchan_from)
{
/* copy transform locks */
diff --git a/source/blender/blenkernel/intern/addon.c b/source/blender/blenkernel/intern/addon.c
index ae6ec7cd7e1..129bc4657b4 100644
--- a/source/blender/blenkernel/intern/addon.c
+++ b/source/blender/blenkernel/intern/addon.c
@@ -20,6 +20,10 @@
* ***** END GPL LICENSE BLOCK *****
*/
+/** \file blender/blenkernel/intern/addon.c
+ * \ingroup bke
+ */
+
#include <stddef.h>
#include <stdlib.h>
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c
index ba680147201..225be335c6d 100644
--- a/source/blender/blenkernel/intern/anim.c
+++ b/source/blender/blenkernel/intern/anim.c
@@ -488,18 +488,16 @@ void free_path(Path *path)
/* calculate a curve-deform path for a curve
* - only called from displist.c -> do_makeDispListCurveTypes
*/
-void calc_curvepath(Object *ob)
+void calc_curvepath(Object *ob, ListBase *nurbs)
{
BevList *bl;
BevPoint *bevp, *bevpn, *bevpfirst, *bevplast;
PathPoint *pp;
- Curve *cu;
Nurb *nu;
Path *path;
float *fp, *dist, *maxdist, xyz[3];
float fac, d = 0, fac1, fac2;
int a, tot, cycl = 0;
- ListBase *nurbs;
/* in a path vertices are with equal differences: path->len = number of verts */
/* NOW WITH BEVELCURVE!!! */
@@ -507,21 +505,19 @@ void calc_curvepath(Object *ob)
if (ob == NULL || ob->type != OB_CURVE) {
return;
}
- cu = ob->data;
- if (cu->path) free_path(cu->path);
- cu->path = NULL;
+ if (ob->curve_cache->path) free_path(ob->curve_cache->path);
+ ob->curve_cache->path = NULL;
/* weak! can only use first curve */
- bl = cu->bev.first;
+ bl = ob->curve_cache->bev.first;
if (bl == NULL || !bl->nr) {
return;
}
- nurbs = BKE_curve_nurbs_get(cu);
nu = nurbs->first;
- cu->path = path = MEM_callocN(sizeof(Path), "calc_curvepath");
+ ob->curve_cache->path = path = MEM_callocN(sizeof(Path), "calc_curvepath");
/* if POLY: last vertice != first vertice */
cycl = (bl->poly != -1);
@@ -534,7 +530,7 @@ void calc_curvepath(Object *ob)
path->len = nu->resolu * SEGMENTSU(nu);
}
- dist = (float *)MEM_mallocN((tot + 1) * 4, "calcpathdist");
+ dist = (float *)MEM_mallocN(sizeof(float) * (tot + 1), "calcpathdist");
/* all lengths in *dist */
bevp = bevpfirst = (BevPoint *)(bl + 1);
@@ -598,8 +594,7 @@ void calc_curvepath(Object *ob)
static int interval_test(const int min, const int max, int p1, const int cycl)
{
if (cycl) {
- if (p1 < min) p1 = ((p1 - min) % (max - min + 1)) + max + 1;
- else if (p1 > max) p1 = ((p1 - min) % (max - min + 1)) + min;
+ p1 = mod_i(p1 - min, (max - min + 1)) + min;
}
else {
if (p1 < min) p1 = min;
@@ -630,15 +625,15 @@ int where_on_path(Object *ob, float ctime, float vec[4], float dir[3], float qua
if (ob == NULL || ob->type != OB_CURVE) return 0;
cu = ob->data;
- if (cu->path == NULL || cu->path->data == NULL) {
+ if (ob->curve_cache == NULL || ob->curve_cache->path == NULL || ob->curve_cache->path->data == NULL) {
printf("no path!\n");
return 0;
}
- path = cu->path;
+ path = ob->curve_cache->path;
pp = path->data;
/* test for cyclic */
- bl = cu->bev.first;
+ bl = ob->curve_cache->bev.first;
if (!bl) return 0;
if (!bl->nr) return 0;
if (bl->poly > -1) cycl = 1;
@@ -756,14 +751,24 @@ static void group_duplilist(ListBase *lb, Scene *scene, Object *ob, int persiste
DupliObject *dob;
Group *group;
GroupObject *go;
- float mat[4][4], tmat[4][4], id;
-
+ float mat[4][4], ob_obmat_ofs[4][4], id;
+
if (ob->dup_group == NULL) return;
group = ob->dup_group;
/* simple preventing of too deep nested groups */
if (level > MAX_DUPLI_RECUR) return;
+ /* don't access 'ob->obmat' from now on. */
+ copy_m4_m4(ob_obmat_ofs, ob->obmat);
+
+ if (!is_zero_v3(group->dupli_ofs)) {
+ float tvec[3];
+ copy_v3_v3(tvec, group->dupli_ofs);
+ mul_mat3_m4_v3(ob_obmat_ofs, tvec);
+ sub_v3_v3(ob_obmat_ofs[3], tvec);
+ }
+
/* handles animated groups, and */
/* we need to check update for objects that are not in scene... */
@@ -781,14 +786,7 @@ static void group_duplilist(ListBase *lb, Scene *scene, Object *ob, int persiste
if (go->ob != ob) {
/* group dupli offset, should apply after everything else */
- if (!is_zero_v3(group->dupli_ofs)) {
- copy_m4_m4(tmat, go->ob->obmat);
- sub_v3_v3v3(tmat[3], tmat[3], group->dupli_ofs);
- mul_m4_m4m4(mat, ob->obmat, tmat);
- }
- else {
- mul_m4_m4m4(mat, ob->obmat, go->ob->obmat);
- }
+ mul_m4_m4m4(mat, ob_obmat_ofs, go->ob->obmat);
dob = new_dupli_object(lb, go->ob, mat, ob->lay, persistent_id, level, id, OB_DUPLIGROUP, flag);
@@ -802,7 +800,7 @@ static void group_duplilist(ListBase *lb, Scene *scene, Object *ob, int persiste
if (go->ob->transflag & OB_DUPLI) {
copy_m4_m4(dob->ob->obmat, dob->mat);
- object_duplilist_recursive(&group->id, scene, go->ob, lb, ob->obmat, persistent_id, level + 1, id, flag);
+ object_duplilist_recursive(&group->id, scene, go->ob, lb, ob_obmat_ofs, persistent_id, level + 1, id, flag);
copy_m4_m4(dob->ob->obmat, dob->omat);
}
}
@@ -1332,7 +1330,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
psys_check_group_weights(part);
- psys->lattice = psys_get_lattice(&sim);
+ psys->lattice_deform_data = psys_create_lattice_deform_data(&sim);
/* gather list of objects or single object */
if (part->ren_as == PART_DRAW_GR) {
@@ -1569,9 +1567,9 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
if (obcopylist)
MEM_freeN(obcopylist);
- if (psys->lattice) {
- end_latt_deform(psys->lattice);
- psys->lattice = NULL;
+ if (psys->lattice_deform_data) {
+ end_latt_deform(psys->lattice_deform_data);
+ psys->lattice_deform_data = NULL;
}
}
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index 4b05b0800a5..d2189468f53 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -42,6 +42,7 @@
#include "BLI_blenlib.h"
#include "BLI_alloca.h"
#include "BLI_dynstr.h"
+#include "BLI_listbase.h"
#include "BLF_translation.h"
@@ -710,6 +711,49 @@ static void nlastrips_path_rename_fix(ID *owner_id, const char *prefix, const ch
}
}
+/* Fix all RNA_Paths in the given Action, relative to the given ID block
+ *
+ * This is just an external wrapper for the F-Curve fixing function,
+ * with input validity checks on top of the basic method.
+ *
+ * NOTE: it is assumed that the structure we're replacing is <prefix><["><name><"]>
+ * i.e. pose.bones["Bone"]
+ */
+void BKE_action_fix_paths_rename(ID *owner_id, bAction *act, const char *prefix, const char *oldName,
+ const char *newName, int oldSubscript, int newSubscript, int verify_paths)
+{
+ char *oldN, *newN;
+
+ /* if no action, no need to proceed */
+ if (ELEM(NULL, owner_id, act))
+ return;
+
+ /* Name sanitation logic - copied from BKE_animdata_fix_paths_rename() */
+ if ((oldName != NULL) && (newName != NULL)) {
+ /* pad the names with [" "] so that only exact matches are made */
+ const size_t name_old_len = strlen(oldName);
+ const size_t name_new_len = strlen(newName);
+ char *name_old_esc = BLI_array_alloca(name_old_esc, (name_old_len * 2) + 1);
+ char *name_new_esc = BLI_array_alloca(name_new_esc, (name_new_len * 2) + 1);
+
+ BLI_strescape(name_old_esc, oldName, (name_old_len * 2) + 1);
+ BLI_strescape(name_new_esc, newName, (name_new_len * 2) + 1);
+ oldN = BLI_sprintfN("[\"%s\"]", name_old_esc);
+ newN = BLI_sprintfN("[\"%s\"]", name_new_esc);
+ }
+ else {
+ oldN = BLI_sprintfN("[%d]", oldSubscript);
+ newN = BLI_sprintfN("[%d]", newSubscript);
+ }
+
+ /* fix paths in action */
+ fcurves_path_rename_fix(owner_id, prefix, oldName, newName, oldN, newN, &act->curves, verify_paths);
+
+ /* free the temp names */
+ MEM_freeN(oldN);
+ MEM_freeN(newN);
+}
+
/* Fix all RNA-Paths in the AnimData block used by the given ID block
* NOTE: it is assumed that the structure we're replacing is <prefix><["><name><"]>
* i.e. pose.bones["Bone"]
@@ -724,6 +768,7 @@ void BKE_animdata_fix_paths_rename(ID *owner_id, AnimData *adt, ID *ref_id, cons
if (ELEM(NULL, owner_id, adt))
return;
+ /* Name sanitation logic - shared with BKE_action_fix_paths_rename() */
if ((oldName != NULL) && (newName != NULL)) {
/* pad the names with [" "] so that only exact matches are made */
const size_t name_old_len = strlen(oldName);
@@ -759,6 +804,76 @@ void BKE_animdata_fix_paths_rename(ID *owner_id, AnimData *adt, ID *ref_id, cons
MEM_freeN(newN);
}
+/* *************************** */
+/* remove of individual paths */
+
+/* Check RNA-Paths for a list of F-Curves */
+static void fcurves_path_remove_fix(const char *prefix, ListBase *curves)
+{
+ FCurve *fcu, *fcn;
+ if (!prefix) return;
+
+ /* we need to check every curve... */
+ for (fcu = curves->first; fcu; fcu = fcn) {
+ fcn = fcu->next;
+
+ if (fcu->rna_path) {
+ if (STRPREFIX(fcu->rna_path, prefix)) {
+ BLI_remlink(curves, fcu);
+ free_fcurve(fcu);
+ }
+ }
+ }
+}
+
+/* Check RNA-Paths for a list of F-Curves */
+static void nlastrips_path_remove_fix(const char *prefix, ListBase *strips)
+{
+ NlaStrip *strip;
+
+ /* recursively check strips, fixing only actions... */
+ for (strip = strips->first; strip; strip = strip->next) {
+
+ /* fix strip's action */
+ if (strip->act)
+ fcurves_path_remove_fix(prefix, &strip->act->curves);
+
+ /* check sub-strips (if metas) */
+ nlastrips_path_remove_fix(prefix, &strip->strips);
+ }
+}
+
+void BKE_animdata_fix_paths_remove(ID *id, const char *prefix)
+{
+ /* Only some ID-blocks have this info for now, so we cast the
+ * types that do to be of type IdAdtTemplate
+ */
+ NlaTrack *nlt;
+
+ if (id_type_can_have_animdata(id)) {
+ IdAdtTemplate *iat = (IdAdtTemplate *)id;
+ AnimData *adt = iat->adt;
+
+ /* check if there's any AnimData to start with */
+ if (adt) {
+
+ /* free fcurves */
+ if (adt->action)
+ fcurves_path_remove_fix(prefix, &adt->action->curves);
+
+ if (adt->tmpact)
+ fcurves_path_remove_fix(prefix, &adt->tmpact->curves);
+
+ /* free drivers - stored as a list of F-Curves */
+ fcurves_path_remove_fix(prefix, &adt->drivers);
+
+ /* NLA Data - Animation Data for Strips */
+ for (nlt = adt->nla_tracks.first; nlt; nlt = nlt->next)
+ nlastrips_path_remove_fix(prefix, &nlt->strips);
+ }
+ }
+}
+
/* Whole Database Ops -------------------------------------------- */
/* apply the given callback function on all data in main database */
@@ -1652,19 +1767,19 @@ static void nlaevalchan_value_init(NlaEvalChannel *nec)
*/
switch (RNA_property_type(prop)) {
case PROP_BOOLEAN:
- if (RNA_property_array_length(ptr, prop))
+ if (RNA_property_array_check(prop))
nec->value = (float)RNA_property_boolean_get_default_index(ptr, prop, index);
else
nec->value = (float)RNA_property_boolean_get_default(ptr, prop);
break;
case PROP_INT:
- if (RNA_property_array_length(ptr, prop))
+ if (RNA_property_array_check(prop))
nec->value = (float)RNA_property_int_get_default_index(ptr, prop, index);
else
nec->value = (float)RNA_property_int_get_default(ptr, prop);
break;
case PROP_FLOAT:
- if (RNA_property_array_length(ptr, prop))
+ if (RNA_property_array_check(prop))
nec->value = RNA_property_float_get_default_index(ptr, prop, index);
else
nec->value = RNA_property_float_get_default(ptr, prop);
@@ -2071,19 +2186,19 @@ void nladata_flush_channels(ListBase *channels)
/* write values - see animsys_write_rna_setting() to sync the code */
switch (RNA_property_type(prop)) {
case PROP_BOOLEAN:
- if (RNA_property_array_length(ptr, prop))
+ if (RNA_property_array_check(prop))
RNA_property_boolean_set_index(ptr, prop, array_index, ANIMSYS_FLOAT_AS_BOOL(value));
else
RNA_property_boolean_set(ptr, prop, ANIMSYS_FLOAT_AS_BOOL(value));
break;
case PROP_INT:
- if (RNA_property_array_length(ptr, prop))
+ if (RNA_property_array_check(prop))
RNA_property_int_set_index(ptr, prop, array_index, (int)value);
else
RNA_property_int_set(ptr, prop, (int)value);
break;
case PROP_FLOAT:
- if (RNA_property_array_length(ptr, prop))
+ if (RNA_property_array_check(prop))
RNA_property_float_set_index(ptr, prop, array_index, value);
else
RNA_property_float_set(ptr, prop, value);
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index f006710dc21..83161801069 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -381,8 +381,6 @@ int bone_autoside_name(char name[MAXBONENAME], int UNUSED(strip_number), short a
/* ************* B-Bone support ******************* */
-#define MAX_BBONE_SUBDIV 32
-
/* data has MAX_BBONE_SUBDIV+1 interpolated points, will become desired amount with equal distances */
static void equalize_bezier(float *data, int desired)
{
@@ -407,7 +405,7 @@ static void equalize_bezier(float *data, int desired)
dist = ((float)a) * ddist;
/* we're looking for location (distance) 'dist' in the array */
- while ((dist >= pdist[nr]) && nr < MAX_BBONE_SUBDIV)
+ while ((nr < MAX_BBONE_SUBDIV) && (dist >= pdist[nr]))
nr++;
fac1 = pdist[nr] - pdist[nr - 1];
@@ -426,11 +424,8 @@ static void equalize_bezier(float *data, int desired)
/* returns pointer to static array, filled with desired amount of bone->segments elements */
/* this calculation is done within unit bone space */
-Mat4 *b_bone_spline_setup(bPoseChannel *pchan, int rest)
+void b_bone_spline_setup(bPoseChannel *pchan, int rest, Mat4 result_array[MAX_BBONE_SUBDIV])
{
- static Mat4 bbone_array[MAX_BBONE_SUBDIV];
- static Mat4 bbone_rest_array[MAX_BBONE_SUBDIV];
- Mat4 *result_array = (rest) ? bbone_rest_array : bbone_array;
bPoseChannel *next, *prev;
Bone *bone = pchan->bone;
float h1[3], h2[3], scale[3], length, hlength1, hlength2, roll1 = 0.0f, roll2;
@@ -587,8 +582,6 @@ Mat4 *b_bone_spline_setup(bPoseChannel *pchan, int rest)
mul_serie_m4(result_array[a].mat, iscalemat, result_array[a].mat, scalemat, NULL, NULL, NULL, NULL, NULL);
}
}
-
- return result_array;
}
/* ************ Armature Deform ******************* */
@@ -602,13 +595,15 @@ typedef struct bPoseChanDeform {
static void pchan_b_bone_defmats(bPoseChannel *pchan, bPoseChanDeform *pdef_info, int use_quaternion)
{
Bone *bone = pchan->bone;
- Mat4 *b_bone = b_bone_spline_setup(pchan, 0);
- Mat4 *b_bone_rest = b_bone_spline_setup(pchan, 1);
+ Mat4 b_bone[MAX_BBONE_SUBDIV], b_bone_rest[MAX_BBONE_SUBDIV];
Mat4 *b_bone_mats;
DualQuat *b_bone_dual_quats = NULL;
float tmat[4][4] = MAT4_UNITY;
int a;
+ b_bone_spline_setup(pchan, 0, b_bone);
+ b_bone_spline_setup(pchan, 1, b_bone_rest);
+
/* allocate b_bone matrices and dual quats */
b_bone_mats = MEM_mallocN((1 + bone->segments) * sizeof(Mat4), "BBone defmats");
pdef_info->b_bone_mats = b_bone_mats;
@@ -1826,18 +1821,16 @@ static void splineik_init_tree_from_pchan(Scene *scene, Object *UNUSED(ob), bPos
* - this is a workaround for a depsgraph bug...
*/
if (ikData->tar) {
- Curve *cu = ikData->tar->data;
-
/* note: when creating constraints that follow path, the curve gets the CU_PATH set now,
* currently for paths to work it needs to go through the bevlist/displist system (ton)
*/
/* only happens on reload file, but violates depsgraph still... fix! */
- if (ELEM(NULL, cu->path, cu->path->data)) {
+ if (ELEM3(NULL, ikData->tar->curve_cache, ikData->tar->curve_cache->path, ikData->tar->curve_cache->path->data)) {
BKE_displist_make_curveTypes(scene, ikData->tar, 0);
/* path building may fail in EditMode after removing verts [#33268]*/
- if (ELEM(NULL, cu->path, cu->path->data)) {
+ if (ELEM(NULL, ikData->tar->curve_cache->path, ikData->tar->curve_cache->path->data)) {
/* BLI_assert(cu->path != NULL); */
return;
}
@@ -1901,7 +1894,6 @@ static void splineik_init_tree_from_pchan(Scene *scene, Object *UNUSED(ob), bPos
* since it's easier to determine the positions of all the joints beforehand this way
*/
if ((ikData->flag & CONSTRAINT_SPLINEIK_SCALE_LIMITED) && (totLength != 0.0f)) {
- Curve *cu = (Curve *)ikData->tar->data;
float splineLen, maxScale;
int i;
@@ -1914,7 +1906,7 @@ static void splineik_init_tree_from_pchan(Scene *scene, Object *UNUSED(ob), bPos
/* get the current length of the curve */
/* NOTE: this is assumed to be correct even after the curve was resized */
- splineLen = cu->path->totdist;
+ splineLen = ikData->tar->curve_cache->path->totdist;
/* calculate the scale factor to multiply all the path values by so that the
* bone chain retains its current length, such that
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index 26f481e5341..5ef39e8d48e 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -462,13 +462,16 @@ int BKE_read_file(bContext *C, const char *filepath, ReportList *reports)
return (bfd ? retval : BKE_READ_FILE_FAIL);
}
-int BKE_read_file_from_memory(bContext *C, const void *filebuf, int filelength, ReportList *reports)
+int BKE_read_file_from_memory(bContext *C, const void *filebuf, int filelength, ReportList *reports, int update_defaults)
{
BlendFileData *bfd;
bfd = BLO_read_from_memory(filebuf, filelength, reports);
- if (bfd)
+ if (bfd) {
+ if (update_defaults)
+ BLO_update_defaults_startup_blend(bfd->main);
setup_app_data(C, bfd, "<memory2>");
+ }
else
BKE_reports_prepend(reports, "Loading failed: ");
@@ -924,9 +927,7 @@ int BKE_copybuffer_save(const char *filename, ReportList *reports)
ID *id;
ListBase *lb1 = lbarray[a], *lb2 = fromarray[a];
- while (lb2->first) {
- id = lb2->first;
- BLI_remlink(lb2, id);
+ while ((id = BLI_pophead(lb2))) {
BLI_addtail(lb1, id);
id_sort_by_name(lb1, id);
}
diff --git a/source/blender/blenkernel/intern/boids.c b/source/blender/blenkernel/intern/boids.c
index cf761bf3dab..a8d64ea9fb6 100644
--- a/source/blender/blenkernel/intern/boids.c
+++ b/source/blender/blenkernel/intern/boids.c
@@ -206,6 +206,8 @@ static int rule_avoid_collision(BoidRule *rule, BoidBrainData *bbd, BoidValues *
BVHTreeRayHit hit;
float radius = val->personal_space * pa->size, ray_dir[3];
+ memset(&col, 0, sizeof(ParticleCollision));
+
copy_v3_v3(col.co1, pa->prev_state.co);
add_v3_v3v3(col.co2, pa->prev_state.co, pa->prev_state.vel);
sub_v3_v3v3(ray_dir, col.co2, col.co1);
@@ -253,7 +255,8 @@ static int rule_avoid_collision(BoidRule *rule, BoidBrainData *bbd, BoidValues *
//check boids in own system
if (acbr->options & BRULE_ACOLL_WITH_BOIDS) {
- neighbors = BLI_kdtree_range_search(bbd->sim->psys->tree, acbr->look_ahead * len_v3(pa->prev_state.vel), pa->prev_state.co, pa->prev_state.ave, &ptn);
+ neighbors = BLI_kdtree_range_search(bbd->sim->psys->tree, pa->prev_state.co, pa->prev_state.ave,
+ &ptn, acbr->look_ahead * len_v3(pa->prev_state.vel));
if (neighbors > 1) for (n=1; n<neighbors; n++) {
copy_v3_v3(co1, pa->prev_state.co);
copy_v3_v3(vel1, pa->prev_state.vel);
@@ -299,7 +302,8 @@ static int rule_avoid_collision(BoidRule *rule, BoidBrainData *bbd, BoidValues *
ParticleSystem *epsys = psys_get_target_system(bbd->sim->ob, pt);
if (epsys) {
- neighbors = BLI_kdtree_range_search(epsys->tree, acbr->look_ahead * len_v3(pa->prev_state.vel), pa->prev_state.co, pa->prev_state.ave, &ptn);
+ neighbors = BLI_kdtree_range_search(epsys->tree, pa->prev_state.co, pa->prev_state.ave,
+ &ptn, acbr->look_ahead * len_v3(pa->prev_state.vel));
if (neighbors > 0) for (n=0; n<neighbors; n++) {
copy_v3_v3(co1, pa->prev_state.co);
copy_v3_v3(vel1, pa->prev_state.vel);
@@ -354,7 +358,8 @@ static int rule_separate(BoidRule *UNUSED(rule), BoidBrainData *bbd, BoidValues
ParticleTarget *pt;
float len = 2.0f * val->personal_space * pa->size + 1.0f;
float vec[3] = {0.0f, 0.0f, 0.0f};
- int neighbors = BLI_kdtree_range_search(bbd->sim->psys->tree, 2.0f * val->personal_space * pa->size, pa->prev_state.co, NULL, &ptn);
+ int neighbors = BLI_kdtree_range_search(bbd->sim->psys->tree, pa->prev_state.co, NULL,
+ &ptn, 2.0f * val->personal_space * pa->size);
int ret = 0;
if (neighbors > 1 && ptn[1].dist!=0.0f) {
@@ -372,7 +377,8 @@ static int rule_separate(BoidRule *UNUSED(rule), BoidBrainData *bbd, BoidValues
ParticleSystem *epsys = psys_get_target_system(bbd->sim->ob, pt);
if (epsys) {
- neighbors = BLI_kdtree_range_search(epsys->tree, 2.0f * val->personal_space * pa->size, pa->prev_state.co, NULL, &ptn);
+ neighbors = BLI_kdtree_range_search(epsys->tree, pa->prev_state.co, NULL,
+ &ptn, 2.0f * val->personal_space * pa->size);
if (neighbors > 0 && ptn[0].dist < len) {
sub_v3_v3v3(vec, pa->prev_state.co, ptn[0].co);
@@ -392,7 +398,7 @@ static int rule_flock(BoidRule *UNUSED(rule), BoidBrainData *bbd, BoidValues *UN
{
KDTreeNearest ptn[11];
float vec[3] = {0.0f, 0.0f, 0.0f}, loc[3] = {0.0f, 0.0f, 0.0f};
- int neighbors = BLI_kdtree_find_n_nearest(bbd->sim->psys->tree, 11, pa->state.co, pa->prev_state.ave, ptn);
+ int neighbors = BLI_kdtree_find_nearest_n(bbd->sim->psys->tree, pa->state.co, pa->prev_state.ave, ptn, 11);
int n;
int ret = 0;
@@ -619,7 +625,8 @@ static int rule_fight(BoidRule *rule, BoidBrainData *bbd, BoidValues *val, Parti
int n, ret = 0;
/* calculate own group strength */
- int neighbors = BLI_kdtree_range_search(bbd->sim->psys->tree, fbr->distance, pa->prev_state.co, NULL, &ptn);
+ int neighbors = BLI_kdtree_range_search(bbd->sim->psys->tree, pa->prev_state.co, NULL,
+ &ptn, fbr->distance);
for (n=0; n<neighbors; n++) {
bpa = bbd->sim->psys->particles[ptn[n].index].boid;
health += bpa->data.health;
@@ -635,7 +642,8 @@ static int rule_fight(BoidRule *rule, BoidBrainData *bbd, BoidValues *val, Parti
if (epsys) {
epars = epsys->particles;
- neighbors = BLI_kdtree_range_search(epsys->tree, fbr->distance, pa->prev_state.co, NULL, &ptn);
+ neighbors = BLI_kdtree_range_search(epsys->tree, pa->prev_state.co, NULL,
+ &ptn, fbr->distance);
health = 0.0f;
@@ -771,6 +779,8 @@ static Object *boid_find_ground(BoidBrainData *bbd, ParticleData *pa, float grou
if (!bbd->sim->colliders)
return NULL;
+ memset(&col, 0, sizeof(ParticleCollision));
+
/* first try to find below boid */
copy_v3_v3(col.co1, pa->state.co);
sub_v3_v3v3(col.co2, pa->state.co, zvec);
diff --git a/source/blender/blenkernel/intern/bpath.c b/source/blender/blenkernel/intern/bpath.c
index cab4c5753a4..3e83a871c0d 100644
--- a/source/blender/blenkernel/intern/bpath.c
+++ b/source/blender/blenkernel/intern/bpath.c
@@ -76,7 +76,7 @@
#include "BKE_node.h"
#include "BKE_report.h"
#include "BKE_sequencer.h"
-#include "BKE_image.h" /* so we can check the image's type */
+#include "BKE_image.h"
#include "BKE_bpath.h" /* own include */
@@ -297,7 +297,14 @@ static bool findMissingFiles_visit_cb(void *userdata, char *path_dst, const char
return false;
}
else {
+ bool was_relative = BLI_path_is_rel(path_dst);
+
BLI_strncpy(path_dst, filename_new, FILE_MAX);
+
+ /* keep path relative if the previous one was relative */
+ if (was_relative)
+ BLI_path_rel(path_dst, data->basedir);
+
return true;
}
}
@@ -307,6 +314,7 @@ void BKE_bpath_missing_files_find(Main *bmain, const char *searchpath, ReportLis
{
struct BPathFind_Data data = {NULL};
+ data.basedir = bmain->name;
data.reports = reports;
data.searchdir = searchpath;
data.find_all = find_all;
@@ -330,6 +338,9 @@ static bool rewrite_path_fixed(char *path, BPathVisitor visit_cb, const char *ab
path_src = path;
}
+ /* so functions can check old value */
+ BLI_strncpy(path_dst, path, FILE_MAX);
+
if (visit_cb(userdata, path_dst, path_src)) {
BLI_strncpy(path, path_dst, FILE_MAX);
return true;
@@ -388,6 +399,13 @@ static bool rewrite_path_alloc(char **path, BPathVisitor visit_cb, const char *a
}
}
+/* fix the image user "ok" tag after updating paths, so ImBufs get loaded */
+static void bpath_traverse_image_user_cb(Image *ima, ImageUser *iuser, void *customdata)
+{
+ if (ima == customdata)
+ iuser->ok = 1;
+}
+
/* Run visitor function 'visit' on all paths contained in 'id'. */
void BKE_bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int flag, void *bpath_user_data)
{
@@ -404,7 +422,12 @@ void BKE_bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int
ima = (Image *)id;
if (ima->packedfile == NULL || (flag & BKE_BPATH_TRAVERSE_SKIP_PACKED) == 0) {
if (ELEM3(ima->source, IMA_SRC_FILE, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) {
- rewrite_path_fixed(ima->name, visit_cb, absbase, bpath_user_data);
+ if (rewrite_path_fixed(ima->name, visit_cb, absbase, bpath_user_data)) {
+ if (!ima->packedfile) {
+ BKE_image_signal(ima, NULL, IMA_SIGNAL_RELOAD);
+ BKE_image_walk_all_users(bmain, ima, bpath_traverse_image_user_cb);
+ }
+ }
}
}
break;
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index 70b5d90120d..790c1f09ff0 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -951,7 +951,6 @@ float BKE_brush_curve_strength_clamp(Brush *br, float p, const float len)
if (p >= len) return 0;
else p = p / len;
- curvemapping_initialize(br->curve);
strength = curvemapping_evaluateF(br->curve, 0, p);
CLAMP(strength, 0.0f, 1.0f);
@@ -967,15 +966,14 @@ float BKE_brush_curve_strength(Brush *br, float p, const float len)
else
p = p / len;
- curvemapping_initialize(br->curve);
return curvemapping_evaluateF(br->curve, 0, p);
}
/* TODO: should probably be unified with BrushPainter stuff? */
-unsigned int *BKE_brush_gen_texture_cache(Brush *br, int half_side)
+unsigned int *BKE_brush_gen_texture_cache(Brush *br, int half_side, bool use_secondary)
{
unsigned int *texcache = NULL;
- MTex *mtex = &br->mtex;
+ MTex *mtex = (use_secondary) ? &br->mask_mtex : &br->mtex;
TexResult texres = {0};
int hasrgb, ix, iy;
int side = half_side * 2;
@@ -1016,7 +1014,7 @@ unsigned int *BKE_brush_gen_texture_cache(Brush *br, int half_side)
/**** Radial Control ****/
-struct ImBuf *BKE_brush_gen_radial_control_imbuf(Brush *br)
+struct ImBuf *BKE_brush_gen_radial_control_imbuf(Brush *br, bool secondary)
{
ImBuf *im = MEM_callocN(sizeof(ImBuf), "radial control texture");
unsigned int *texcache;
@@ -1024,7 +1022,8 @@ struct ImBuf *BKE_brush_gen_radial_control_imbuf(Brush *br)
int half = side / 2;
int i, j;
- texcache = BKE_brush_gen_texture_cache(br, half);
+ curvemapping_initialize(br->curve);
+ texcache = BKE_brush_gen_texture_cache(br, half, secondary);
im->rect_float = MEM_callocN(sizeof(float) * side * side, "radial control rect");
im->x = im->y = side;
diff --git a/source/blender/blenkernel/intern/bvhutils.c b/source/blender/blenkernel/intern/bvhutils.c
index 5b66b8b4cd4..370dbc62ef8 100644
--- a/source/blender/blenkernel/intern/bvhutils.c
+++ b/source/blender/blenkernel/intern/bvhutils.c
@@ -355,7 +355,7 @@ float nearest_point_in_tri_surface(const float v0[3], const float v1[3], const f
/*
- * BVH from meshs callbacks
+ * BVH from meshes callbacks
*/
/* Callback to bvh tree nearest point. The tree must bust have been built using bvhtree_from_mesh_faces.
diff --git a/source/blender/blenkernel/intern/camera.c b/source/blender/blenkernel/intern/camera.c
index f9444ca2cf9..536ec95e3d1 100644
--- a/source/blender/blenkernel/intern/camera.c
+++ b/source/blender/blenkernel/intern/camera.c
@@ -456,9 +456,10 @@ void BKE_camera_view_frame(Scene *scene, Camera *camera, float r_vec[4][3])
typedef struct CameraViewFrameData {
+ float plane_tx[4][4]; /* 4 planes (not 4x4 matrix)*/
float frame_tx[4][3];
float normal_tx[4][3];
- float dist_vals[4];
+ float dist_vals_sq[4]; /* distance squared (signed) */
unsigned int tot;
} CameraViewFrameData;
@@ -468,9 +469,9 @@ static void camera_to_frame_view_cb(const float co[3], void *user_data)
unsigned int i;
for (i = 0; i < 4; i++) {
- float nd = dist_to_plane_v3(co, data->frame_tx[i], data->normal_tx[i]);
- if (nd < data->dist_vals[i]) {
- data->dist_vals[i] = nd;
+ float nd = dist_squared_to_plane_v3(co, data->plane_tx[i]);
+ if (nd < data->dist_vals_sq[i]) {
+ data->dist_vals_sq[i] = nd;
}
}
@@ -514,15 +515,12 @@ int BKE_camera_view_frame_fit_to_scene(Scene *scene, struct View3D *v3d, Object
}
for (i = 0; i < 4; i++) {
- normal_tri_v3(data_cb.normal_tx[i],
- zero, data_cb.frame_tx[i], data_cb.frame_tx[(i + 1) % 4]);
+ normal_tri_v3(data_cb.normal_tx[i], zero, data_cb.frame_tx[i], data_cb.frame_tx[(i + 1) % 4]);
+ plane_from_point_normal_v3(data_cb.plane_tx[i], data_cb.frame_tx[i], data_cb.normal_tx[i]);
}
/* initialize callback data */
- data_cb.dist_vals[0] =
- data_cb.dist_vals[1] =
- data_cb.dist_vals[2] =
- data_cb.dist_vals[3] = FLT_MAX;
+ copy_v4_fl(data_cb.dist_vals_sq, FLT_MAX);
data_cb.tot = 0;
/* run callback on all visible points */
BKE_scene_foreach_display_point(scene, v3d, BA_SELECT,
@@ -537,11 +535,16 @@ int BKE_camera_view_frame_fit_to_scene(Scene *scene, struct View3D *v3d, Object
float plane_isect_pt_1[3], plane_isect_pt_2[3];
+ /* could make a generic macro */
+#define SQRT_SIGNED(f) copysign(sqrtf(fabsf(f)), f)
+
/* apply the dist-from-plane's to the transformed plane points */
for (i = 0; i < 4; i++) {
- mul_v3_v3fl(plane_tx[i], data_cb.normal_tx[i], data_cb.dist_vals[i]);
+ mul_v3_v3fl(plane_tx[i], data_cb.normal_tx[i], SQRT_SIGNED(data_cb.dist_vals_sq[i]));
}
+#undef SQRT_SIGNED
+
isect_plane_plane_v3(plane_isect_1, plane_isect_1_no,
plane_tx[0], data_cb.normal_tx[0],
plane_tx[2], data_cb.normal_tx[2]);
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index 6205c8016b6..4846199b9d9 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -1063,37 +1063,57 @@ static void cdDM_drawMappedFacesTex(DerivedMesh *dm,
static void cddm_draw_attrib_vertex(DMVertexAttribs *attribs, MVert *mvert, int a, int index, int vert, int smoothnormal)
{
+ const float zero[4] = {0.0f, 0.0f, 0.0f, 0.0f};
int b;
/* orco texture coordinates */
if (attribs->totorco) {
+ /*const*/ float (*array)[3] = attribs->orco.array;
+ const float *orco = (array) ? array[index] : zero;
+
if (attribs->orco.gl_texco)
- glTexCoord3fv(attribs->orco.array[index]);
+ glTexCoord3fv(orco);
else
- glVertexAttrib3fvARB(attribs->orco.gl_index, attribs->orco.array[index]);
+ glVertexAttrib3fvARB(attribs->orco.gl_index, orco);
}
/* uv texture coordinates */
for (b = 0; b < attribs->tottface; b++) {
- MTFace *tf = &attribs->tface[b].array[a];
+ const float *uv;
+
+ if (attribs->tface[b].array) {
+ MTFace *tf = &attribs->tface[b].array[a];
+ uv = tf->uv[vert];
+ }
+ else {
+ uv = zero;
+ }
if (attribs->tface[b].gl_texco)
- glTexCoord2fv(tf->uv[vert]);
+ glTexCoord2fv(uv);
else
- glVertexAttrib2fvARB(attribs->tface[b].gl_index, tf->uv[vert]);
+ glVertexAttrib2fvARB(attribs->tface[b].gl_index, uv);
}
/* vertex colors */
for (b = 0; b < attribs->totmcol; b++) {
- MCol *cp = &attribs->mcol[b].array[a * 4 + vert];
GLubyte col[4];
- col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a;
+
+ if (attribs->mcol[b].array) {
+ MCol *cp = &attribs->mcol[b].array[a * 4 + vert];
+ col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a;
+ }
+ else {
+ col[0] = 0; col[1] = 0; col[2] = 0; col[3] = 0;
+ }
+
glVertexAttrib4ubvARB(attribs->mcol[b].gl_index, col);
}
/* tangent for normal mapping */
if (attribs->tottang) {
- float *tang = attribs->tang.array[a * 4 + vert];
+ /*const*/ float (*array)[4] = attribs->tang.array;
+ const float *tang = (array) ? array[a * 4 + vert] : zero;
glVertexAttrib4fvARB(attribs->tang.gl_index, tang);
}
@@ -1264,25 +1284,29 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm,
if (do_draw) {
DM_vertex_attributes_from_gpu(dm, &gattribs, &attribs);
- if (attribs.totorco) {
+ if (attribs.totorco && attribs.orco.array) {
datatypes[numdata].index = attribs.orco.gl_index;
datatypes[numdata].size = 3;
datatypes[numdata].type = GL_FLOAT;
numdata++;
}
for (b = 0; b < attribs.tottface; b++) {
- datatypes[numdata].index = attribs.tface[b].gl_index;
- datatypes[numdata].size = 2;
- datatypes[numdata].type = GL_FLOAT;
- numdata++;
+ if (attribs.tface[b].array) {
+ datatypes[numdata].index = attribs.tface[b].gl_index;
+ datatypes[numdata].size = 2;
+ datatypes[numdata].type = GL_FLOAT;
+ numdata++;
+ }
}
for (b = 0; b < attribs.totmcol; b++) {
- datatypes[numdata].index = attribs.mcol[b].gl_index;
- datatypes[numdata].size = 4;
- datatypes[numdata].type = GL_UNSIGNED_BYTE;
- numdata++;
+ if (attribs.mcol[b].array) {
+ datatypes[numdata].index = attribs.mcol[b].gl_index;
+ datatypes[numdata].size = 4;
+ datatypes[numdata].type = GL_UNSIGNED_BYTE;
+ numdata++;
+ }
}
- if (attribs.tottang) {
+ if (attribs.tottang && attribs.tang.array) {
datatypes[numdata].index = attribs.tang.gl_index;
datatypes[numdata].size = 4;
datatypes[numdata].type = GL_FLOAT;
@@ -1315,34 +1339,38 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm,
if (do_draw && numdata != 0) {
offset = 0;
- if (attribs.totorco) {
+ if (attribs.totorco && attribs.orco.array) {
copy_v3_v3((float *)&varray[elementsize * curface * 3], (float *)attribs.orco.array[mface->v1]);
copy_v3_v3((float *)&varray[elementsize * curface * 3 + elementsize], (float *)attribs.orco.array[mface->v2]);
copy_v3_v3((float *)&varray[elementsize * curface * 3 + elementsize * 2], (float *)attribs.orco.array[mface->v3]);
offset += sizeof(float) * 3;
}
for (b = 0; b < attribs.tottface; b++) {
- MTFace *tf = &attribs.tface[b].array[a];
- copy_v2_v2((float *)&varray[elementsize * curface * 3 + offset], tf->uv[0]);
- copy_v2_v2((float *)&varray[elementsize * curface * 3 + offset + elementsize], tf->uv[1]);
+ if (attribs.tface[b].array) {
+ MTFace *tf = &attribs.tface[b].array[a];
+ copy_v2_v2((float *)&varray[elementsize * curface * 3 + offset], tf->uv[0]);
+ copy_v2_v2((float *)&varray[elementsize * curface * 3 + offset + elementsize], tf->uv[1]);
- copy_v2_v2((float *)&varray[elementsize * curface * 3 + offset + elementsize * 2], tf->uv[2]);
- offset += sizeof(float) * 2;
+ copy_v2_v2((float *)&varray[elementsize * curface * 3 + offset + elementsize * 2], tf->uv[2]);
+ offset += sizeof(float) * 2;
+ }
}
for (b = 0; b < attribs.totmcol; b++) {
- MCol *cp = &attribs.mcol[b].array[a * 4 + 0];
- GLubyte col[4];
- col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a;
- copy_v4_v4_char((char *)&varray[elementsize * curface * 3 + offset], (char *)col);
- cp = &attribs.mcol[b].array[a * 4 + 1];
- col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a;
- copy_v4_v4_char((char *)&varray[elementsize * curface * 3 + offset + elementsize], (char *)col);
- cp = &attribs.mcol[b].array[a * 4 + 2];
- col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a;
- copy_v4_v4_char((char *)&varray[elementsize * curface * 3 + offset + elementsize * 2], (char *)col);
- offset += sizeof(unsigned char) * 4;
+ if (attribs.mcol[b].array) {
+ MCol *cp = &attribs.mcol[b].array[a * 4 + 0];
+ GLubyte col[4];
+ col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a;
+ copy_v4_v4_char((char *)&varray[elementsize * curface * 3 + offset], (char *)col);
+ cp = &attribs.mcol[b].array[a * 4 + 1];
+ col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a;
+ copy_v4_v4_char((char *)&varray[elementsize * curface * 3 + offset + elementsize], (char *)col);
+ cp = &attribs.mcol[b].array[a * 4 + 2];
+ col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a;
+ copy_v4_v4_char((char *)&varray[elementsize * curface * 3 + offset + elementsize * 2], (char *)col);
+ offset += sizeof(unsigned char) * 4;
+ }
}
- if (attribs.tottang) {
+ if (attribs.tottang && attribs.tang.array) {
float *tang = attribs.tang.array[a * 4 + 0];
copy_v4_v4((float *)&varray[elementsize * curface * 3 + offset], tang);
tang = attribs.tang.array[a * 4 + 1];
@@ -1357,33 +1385,37 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm,
if (mface->v4) {
if (do_draw && numdata != 0) {
offset = 0;
- if (attribs.totorco) {
+ if (attribs.totorco && attribs.orco.array) {
copy_v3_v3((float *)&varray[elementsize * curface * 3], (float *)attribs.orco.array[mface->v3]);
copy_v3_v3((float *)&varray[elementsize * curface * 3 + elementsize], (float *)attribs.orco.array[mface->v4]);
copy_v3_v3((float *)&varray[elementsize * curface * 3 + elementsize * 2], (float *)attribs.orco.array[mface->v1]);
offset += sizeof(float) * 3;
}
for (b = 0; b < attribs.tottface; b++) {
- MTFace *tf = &attribs.tface[b].array[a];
- copy_v2_v2((float *)&varray[elementsize * curface * 3 + offset], tf->uv[2]);
- copy_v2_v2((float *)&varray[elementsize * curface * 3 + offset + elementsize], tf->uv[3]);
- copy_v2_v2((float *)&varray[elementsize * curface * 3 + offset + elementsize * 2], tf->uv[0]);
- offset += sizeof(float) * 2;
+ if (attribs.tface[b].array) {
+ MTFace *tf = &attribs.tface[b].array[a];
+ copy_v2_v2((float *)&varray[elementsize * curface * 3 + offset], tf->uv[2]);
+ copy_v2_v2((float *)&varray[elementsize * curface * 3 + offset + elementsize], tf->uv[3]);
+ copy_v2_v2((float *)&varray[elementsize * curface * 3 + offset + elementsize * 2], tf->uv[0]);
+ offset += sizeof(float) * 2;
+ }
}
for (b = 0; b < attribs.totmcol; b++) {
- MCol *cp = &attribs.mcol[b].array[a * 4 + 2];
- GLubyte col[4];
- col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a;
- copy_v4_v4_char((char *)&varray[elementsize * curface * 3 + offset], (char *)col);
- cp = &attribs.mcol[b].array[a * 4 + 3];
- col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a;
- copy_v4_v4_char((char *)&varray[elementsize * curface * 3 + offset + elementsize], (char *)col);
- cp = &attribs.mcol[b].array[a * 4 + 0];
- col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a;
- copy_v4_v4_char((char *)&varray[elementsize * curface * 3 + offset + elementsize * 2], (char *)col);
- offset += sizeof(unsigned char) * 4;
+ if (attribs.mcol[b].array) {
+ MCol *cp = &attribs.mcol[b].array[a * 4 + 2];
+ GLubyte col[4];
+ col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a;
+ copy_v4_v4_char((char *)&varray[elementsize * curface * 3 + offset], (char *)col);
+ cp = &attribs.mcol[b].array[a * 4 + 3];
+ col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a;
+ copy_v4_v4_char((char *)&varray[elementsize * curface * 3 + offset + elementsize], (char *)col);
+ cp = &attribs.mcol[b].array[a * 4 + 0];
+ col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a;
+ copy_v4_v4_char((char *)&varray[elementsize * curface * 3 + offset + elementsize * 2], (char *)col);
+ offset += sizeof(unsigned char) * 4;
+ }
}
- if (attribs.tottang) {
+ if (attribs.tottang && attribs.tang.array) {
float *tang = attribs.tang.array[a * 4 + 2];
copy_v4_v4((float *)&varray[elementsize * curface * 3 + offset], tang);
tang = attribs.tang.array[a * 4 + 3];
@@ -1814,7 +1846,13 @@ DerivedMesh *CDDM_from_mesh(Mesh *mesh, Object *UNUSED(ob))
DerivedMesh *CDDM_from_curve(Object *ob)
{
- return CDDM_from_curve_displist(ob, &ob->disp);
+ ListBase disp = {NULL, NULL};
+
+ if (ob->curve_cache) {
+ disp = ob->curve_cache->disp;
+ }
+
+ return CDDM_from_curve_displist(ob, &disp);
}
DerivedMesh *CDDM_from_curve_displist(Object *ob, ListBase *dispbase)
@@ -2399,7 +2437,7 @@ DerivedMesh *CDDM_merge_verts(DerivedMesh *dm, const int *vtargetmap, const int
STACK_DECLARE(mpoly);
STACK_DECLARE(oldp);
- EdgeHash *ehash = BLI_edgehash_new();
+ EdgeHash *ehash = BLI_edgehash_new_ex(__func__, totedge);
int i, j, c;
@@ -2601,10 +2639,12 @@ void CDDM_calc_edges_tessface(DerivedMesh *dm)
EdgeHashIterator *ehi;
MFace *mf = cddm->mface;
MEdge *med;
- EdgeHash *eh = BLI_edgehash_new();
- int i, *index, numEdges, maxFaces = dm->numTessFaceData;
+ EdgeHash *eh;
+ int i, *index, numEdges, numFaces = dm->numTessFaceData;
+
+ eh = BLI_edgehash_new_ex(__func__, BLI_EDGEHASH_SIZE_GUESS_FROM_POLYS(numFaces));
- for (i = 0; i < maxFaces; i++, mf++) {
+ for (i = 0; i < numFaces; i++, mf++) {
if (!BLI_edgehash_haskey(eh, mf->v1, mf->v2))
BLI_edgehash_insert(eh, mf->v1, mf->v2, NULL);
if (!BLI_edgehash_haskey(eh, mf->v2, mf->v3))
@@ -2634,7 +2674,7 @@ void CDDM_calc_edges_tessface(DerivedMesh *dm)
for (ehi = BLI_edgehashIterator_new(eh), i = 0;
BLI_edgehashIterator_isDone(ehi) == FALSE;
- BLI_edgehashIterator_step(ehi), ++i, ++med, ++index)
+ BLI_edgehashIterator_step(ehi), i++, med++, index++)
{
BLI_edgehashIterator_getKey(ehi, &med->v1, &med->v2);
@@ -2662,21 +2702,27 @@ void CDDM_calc_edges(DerivedMesh *dm)
MPoly *mp = cddm->mpoly;
MLoop *ml;
MEdge *med, *origmed;
- EdgeHash *eh = BLI_edgehash_new();
+ EdgeHash *eh;
+ unsigned int eh_reserve;
int v1, v2;
int *eindex;
- int i, j, *index, numEdges = cddm->dm.numEdgeData, maxFaces = dm->numPolyData;
+ int i, j, *index;
+ const int numFaces = dm->numPolyData;
+ const int numLoops = dm->numLoopData;
+ int numEdges = dm->numEdgeData;
eindex = DM_get_edge_data_layer(dm, CD_ORIGINDEX);
-
med = cddm->medge;
+
+ eh_reserve = max_ii(med ? numEdges : 0, BLI_EDGEHASH_SIZE_GUESS_FROM_LOOPS(numLoops));
+ eh = BLI_edgehash_new_ex(__func__, eh_reserve);
if (med) {
for (i = 0; i < numEdges; i++, med++) {
BLI_edgehash_insert(eh, med->v1, med->v2, SET_INT_IN_POINTER(i + 1));
}
}
- for (i = 0; i < maxFaces; i++, mp++) {
+ for (i = 0; i < numFaces; i++, mp++) {
ml = cddm->mloop + mp->loopstart;
for (j = 0; j < mp->totloop; j++, ml++) {
v1 = ml->v;
@@ -2726,7 +2772,7 @@ void CDDM_calc_edges(DerivedMesh *dm)
cddm->medge = CustomData_get_layer(&dm->edgeData, CD_MEDGE);
mp = cddm->mpoly;
- for (i = 0; i < maxFaces; i++, mp++) {
+ for (i = 0; i < numFaces; i++, mp++) {
ml = cddm->mloop + mp->loopstart;
for (j = 0; j < mp->totloop; j++, ml++) {
v1 = ml->v;
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c
index 05ffd4a6265..e4c6f7790d7 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -332,11 +332,13 @@ static int do_init_cloth(Object *ob, ClothModifierData *clmd, DerivedMesh *resul
if (clmd->clothObject == NULL) {
if (!cloth_from_object(ob, clmd, result, framenr, 1)) {
BKE_ptcache_invalidate(cache);
+ modifier_setError(&(clmd->modifier), "Can't initialize cloth");
return 0;
}
if (clmd->clothObject == NULL) {
BKE_ptcache_invalidate(cache);
+ modifier_setError(&(clmd->modifier), "Null cloth object");
return 0;
}
@@ -973,6 +975,18 @@ static void cloth_from_mesh ( ClothModifierData *clmd, DerivedMesh *dm )
* SPRING NETWORK BUILDING IMPLEMENTATION BEGIN
***************************************************************************************/
+BLI_INLINE void spring_verts_ordered_set(ClothSpring *spring, int v0, int v1)
+{
+ if (v0 < v1) {
+ spring->ij = v0;
+ spring->kl = v1;
+ }
+ else {
+ spring->ij = v1;
+ spring->kl = v0;
+ }
+}
+
// be careful: implicit solver has to be resettet when using this one!
// --> only for implicit handling of this spring!
int cloth_add_spring(ClothModifierData *clmd, unsigned int indexA, unsigned int indexB, float restlength, int spring_type)
@@ -1004,10 +1018,20 @@ int cloth_add_spring(ClothModifierData *clmd, unsigned int indexA, unsigned int
return 0;
}
-static void cloth_free_errorsprings(Cloth *cloth, EdgeHash *UNUSED(edgehash), LinkNode **edgelist)
+static void cloth_free_edgelist(LinkNode **edgelist, unsigned int numverts)
+{
+ if (edgelist) {
+ unsigned int i;
+ for (i = 0; i < numverts; i++) {
+ BLI_linklist_free(edgelist[i], NULL);
+ }
+
+ MEM_freeN(edgelist);
+ }
+}
+
+static void cloth_free_errorsprings(Cloth *cloth, LinkNode **edgelist)
{
- unsigned int i = 0;
-
if ( cloth->springs != NULL ) {
LinkNode *search = cloth->springs;
while (search) {
@@ -1020,17 +1044,13 @@ static void cloth_free_errorsprings(Cloth *cloth, EdgeHash *UNUSED(edgehash), Li
cloth->springs = NULL;
}
-
- if (edgelist) {
- for ( i = 0; i < cloth->numverts; i++ ) {
- BLI_linklist_free ( edgelist[i], NULL );
- }
- MEM_freeN ( edgelist );
- }
+ cloth_free_edgelist(edgelist, cloth->numverts);
- if (cloth->edgehash)
- BLI_edgehash_free ( cloth->edgehash, NULL );
+ if (cloth->edgehash) {
+ BLI_edgehash_free(cloth->edgehash, NULL);
+ cloth->edgehash = NULL;
+ }
}
/* update stiffness if vertex group values are changing from frame to frame */
@@ -1094,30 +1114,25 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
if ( numedges==0 )
return 0;
+ /* NOTE: handling ownership of sptings and edgehash is quite sloppy
+ * currenlty they are never initialized but assert just to be sure */
+ BLI_assert(cloth->springs == NULL);
+ BLI_assert(cloth->edgehash == NULL);
+
cloth->springs = NULL;
+ cloth->edgehash = NULL;
edgelist = MEM_callocN ( sizeof (LinkNode *) * numverts, "cloth_edgelist_alloc" );
if (!edgelist)
return 0;
-
- for ( i = 0; i < numverts; i++ ) {
- edgelist[i] = NULL;
- }
-
- if ( cloth->springs )
- MEM_freeN ( cloth->springs );
-
- // create spring network hash
- edgehash = BLI_edgehash_new();
// structural springs
for ( i = 0; i < numedges; i++ ) {
spring = (ClothSpring *)MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" );
if ( spring ) {
- spring->ij = MIN2(medge[i].v1, medge[i].v2);
- spring->kl = MAX2(medge[i].v2, medge[i].v1);
+ spring_verts_ordered_set(spring, medge[i].v1, medge[i].v2);
spring->restlen = len_v3v3(cloth->verts[spring->kl].xrest, cloth->verts[spring->ij].xrest);
clmd->sim_parms->avg_spring_len += spring->restlen;
cloth->verts[spring->ij].avg_spring_len += spring->restlen;
@@ -1132,11 +1147,11 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
BLI_linklist_prepend ( &cloth->springs, spring );
}
else {
- cloth_free_errorsprings(cloth, edgehash, edgelist);
+ cloth_free_errorsprings(cloth, edgelist);
return 0;
}
}
-
+
if (struct_springs > 0)
clmd->sim_parms->avg_spring_len /= struct_springs;
@@ -1153,12 +1168,11 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
spring = (ClothSpring *)MEM_callocN(sizeof(ClothSpring), "cloth spring");
if (!spring) {
- cloth_free_errorsprings(cloth, edgehash, edgelist);
+ cloth_free_errorsprings(cloth, edgelist);
return 0;
}
- spring->ij = MIN2(mface[i].v1, mface[i].v3);
- spring->kl = MAX2(mface[i].v3, mface[i].v1);
+ spring_verts_ordered_set(spring, mface[i].v1, mface[i].v3);
spring->restlen = len_v3v3(cloth->verts[spring->kl].xrest, cloth->verts[spring->ij].xrest);
spring->type = CLOTH_SPRING_TYPE_SHEAR;
spring->stiffness = (cloth->verts[spring->kl].shear_stiff + cloth->verts[spring->ij].shear_stiff) / 2.0f;
@@ -1174,12 +1188,11 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
spring = (ClothSpring *)MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" );
if (!spring) {
- cloth_free_errorsprings(cloth, edgehash, edgelist);
+ cloth_free_errorsprings(cloth, edgelist);
return 0;
}
- spring->ij = MIN2(mface[i].v2, mface[i].v4);
- spring->kl = MAX2(mface[i].v4, mface[i].v2);
+ spring_verts_ordered_set(spring, mface[i].v2, mface[i].v4);
spring->restlen = len_v3v3(cloth->verts[spring->kl].xrest, cloth->verts[spring->ij].xrest);
spring->type = CLOTH_SPRING_TYPE_SHEAR;
spring->stiffness = (cloth->verts[spring->kl].shear_stiff + cloth->verts[spring->ij].shear_stiff) / 2.0f;
@@ -1191,6 +1204,9 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
BLI_linklist_prepend ( &cloth->springs, spring );
}
+ edgehash = BLI_edgehash_new_ex(__func__, numedges);
+ cloth->edgehash = edgehash;
+
if (numfaces) {
// bending springs
search2 = cloth->springs;
@@ -1206,18 +1222,17 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
// check for existing spring
// check also if startpoint is equal to endpoint
- if (!BLI_edgehash_haskey(edgehash, MIN2(tspring2->ij, index2), MAX2(tspring2->ij, index2)) &&
- (index2 != tspring2->ij))
+ if ((index2 != tspring2->ij) &&
+ !BLI_edgehash_haskey(edgehash, tspring2->ij, index2))
{
spring = (ClothSpring *)MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" );
if (!spring) {
- cloth_free_errorsprings(cloth, edgehash, edgelist);
+ cloth_free_errorsprings(cloth, edgelist);
return 0;
}
- spring->ij = MIN2(tspring2->ij, index2);
- spring->kl = MAX2(tspring2->ij, index2);
+ spring_verts_ordered_set(spring, tspring2->ij, index2);
spring->restlen = len_v3v3(cloth->verts[spring->kl].xrest, cloth->verts[spring->ij].xrest);
spring->type = CLOTH_SPRING_TYPE_BENDING;
spring->stiffness = (cloth->verts[spring->kl].bend_stiff + cloth->verts[spring->ij].bend_stiff) / 2.0f;
@@ -1249,7 +1264,7 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
spring = (ClothSpring *)MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" );
if (!spring) {
- cloth_free_errorsprings(cloth, edgehash, edgelist);
+ cloth_free_errorsprings(cloth, edgelist);
return 0;
}
@@ -1268,34 +1283,30 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
}
}
+ /* note: the edges may already exist so run reinsert */
+
/* insert other near springs in edgehash AFTER bending springs are calculated (for selfcolls) */
for (i = 0; i < numedges; i++) { /* struct springs */
- BLI_edgehash_insert(edgehash, MIN2(medge[i].v1, medge[i].v2), MAX2(medge[i].v2, medge[i].v1), NULL);
+ BLI_edgehash_reinsert(edgehash, medge[i].v1, medge[i].v2, NULL);
}
for (i = 0; i < numfaces; i++) { /* edge springs */
if (mface[i].v4) {
- BLI_edgehash_insert(edgehash, MIN2(mface[i].v1, mface[i].v3), MAX2(mface[i].v3, mface[i].v1), NULL);
+ BLI_edgehash_reinsert(edgehash, mface[i].v1, mface[i].v3, NULL);
- BLI_edgehash_insert(edgehash, MIN2(mface[i].v2, mface[i].v4), MAX2(mface[i].v2, mface[i].v4), NULL);
+ BLI_edgehash_reinsert(edgehash, mface[i].v2, mface[i].v4, NULL);
}
}
cloth->numsprings = struct_springs + shear_springs + bend_springs;
- if ( edgelist ) {
- for ( i = 0; i < numverts; i++ ) {
- BLI_linklist_free ( edgelist[i], NULL );
- }
-
- MEM_freeN ( edgelist );
- }
-
- cloth->edgehash = edgehash;
-
+ cloth_free_edgelist(edgelist, numverts);
+
+#if 0
if (G.debug_value > 0)
printf("avg_len: %f\n", clmd->sim_parms->avg_spring_len);
+#endif
return 1;
diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c
index 91a09bb8554..e3081b9e670 100644
--- a/source/blender/blenkernel/intern/collision.c
+++ b/source/blender/blenkernel/intern/collision.c
@@ -281,7 +281,7 @@ static int cloth_collision_response_static ( ClothModifierData *clmd, CollisionM
/* Decrease in magnitude of relative tangential velocity due to coulomb friction
* in original formula "magrelVel" should be the "change of relative velocity in normal direction" */
- magtangent = min_ff(clmd->coll_parms->friction * 0.01f * magrelVel, sqrtf(dot_v3v3(vrel_t_pre, vrel_t_pre)));
+ magtangent = min_ff(clmd->coll_parms->friction * 0.01f * magrelVel, len_v3(vrel_t_pre));
/* Apply friction impulse. */
if ( magtangent > ALMOST_ZERO ) {
@@ -865,8 +865,7 @@ int cloth_bvh_objcollision(Object *ob, ClothModifierData *clmd, float step, floa
if ( ( ABS ( temp[0] ) > mindistance ) || ( ABS ( temp[1] ) > mindistance ) || ( ABS ( temp[2] ) > mindistance ) ) continue;
- // check for adjacent points (i must be smaller j)
- if ( BLI_edgehash_haskey ( cloth->edgehash, MIN2(i, j), MAX2(i, j) ) ) {
+ if (BLI_edgehash_haskey(cloth->edgehash, i, j)) {
continue;
}
diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c
index 7e878e86c1e..578fa5d348d 100644
--- a/source/blender/blenkernel/intern/colortools.c
+++ b/source/blender/blenkernel/intern/colortools.c
@@ -972,9 +972,6 @@ void BKE_histogram_update_sample_line(Histogram *hist, ImBuf *ibuf, const ColorM
if (ibuf->rect_float)
cm_processor = IMB_colormanagement_display_processor_new(view_settings, display_settings);
- /* persistent draw */
- hist->flag |= HISTO_FLAG_SAMPLELINE; /* keep drawing the flag after */
-
for (i = 0; i < 256; i++) {
x = (int)(0.5f + x1 + (float)i * (x2 - x1) / 255.0f);
y = (int)(0.5f + y1 + (float)i * (y2 - y1) / 255.0f);
@@ -1260,6 +1257,7 @@ void BKE_color_managed_view_settings_init(ColorManagedViewSettings *settings)
* for now use NONE to be compatible with all current files
*/
BLI_strncpy(settings->view_transform, "Default", sizeof(settings->view_transform));
+ BLI_strncpy(settings->look, "None", sizeof(settings->look));
settings->gamma = 1.0f;
settings->exposure = 0.0f;
@@ -1268,6 +1266,7 @@ void BKE_color_managed_view_settings_init(ColorManagedViewSettings *settings)
void BKE_color_managed_view_settings_copy(ColorManagedViewSettings *new_settings,
const ColorManagedViewSettings *settings)
{
+ BLI_strncpy(new_settings->look, settings->look, sizeof(new_settings->look));
BLI_strncpy(new_settings->view_transform, settings->view_transform, sizeof(new_settings->view_transform));
new_settings->flag = settings->flag;
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index eda770ddf30..1f892432d80 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -69,6 +69,7 @@
#include "BKE_bvhutils.h"
#include "BKE_camera.h"
#include "BKE_constraint.h"
+#include "BKE_curve.h"
#include "BKE_displist.h"
#include "BKE_deform.h"
#include "BKE_DerivedMesh.h" /* for geometry targets */
@@ -448,7 +449,7 @@ static void contarget_get_lattice_mat(Object *ob, const char *substring, float m
{
Lattice *lt = (Lattice *)ob->data;
- DispList *dl = BKE_displist_find(&ob->disp, DL_VERTS);
+ DispList *dl = ob->curve_cache ? BKE_displist_find(&ob->curve_cache->disp, DL_VERTS) : NULL;
float *co = dl ? dl->verts : NULL;
BPoint *bp = lt->def;
@@ -1163,10 +1164,10 @@ static void followpath_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstra
*/
/* only happens on reload file, but violates depsgraph still... fix! */
- if (cu->path == NULL || cu->path->data == NULL)
+ if (ct->tar->curve_cache == NULL || ct->tar->curve_cache->path == NULL || ct->tar->curve_cache->path->data == NULL)
BKE_displist_make_curveTypes(cob->scene, ct->tar, 0);
- if (cu->path && cu->path->data) {
+ if (ct->tar->curve_cache->path && ct->tar->curve_cache->path->data) {
float quat[4];
if ((data->followflag & FOLLOWPATH_STATIC) == 0) {
/* animated position along curve depending on time */
@@ -1933,10 +1934,8 @@ static void pycon_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstraintTa
if (VALID_CONS_TARGET(ct)) {
/* special exception for curves - depsgraph issues */
if (ct->tar->type == OB_CURVE) {
- Curve *cu = ct->tar->data;
-
/* this check is to make sure curve objects get updated on file load correctly.*/
- if (cu->path == NULL || cu->path->data == NULL) /* only happens on reload file, but violates depsgraph still... fix! */
+ if (ct->tar->curve_cache == NULL || ct->tar->curve_cache->path == NULL || ct->tar->curve_cache->path->data == NULL) /* only happens on reload file, but violates depsgraph still... fix! */
BKE_displist_make_curveTypes(cob->scene, ct->tar, 0);
}
@@ -3009,14 +3008,12 @@ static void clampto_flush_tars(bConstraint *con, ListBase *list, short nocopy)
static void clampto_get_tarmat(bConstraint *UNUSED(con), bConstraintOb *cob, bConstraintTarget *ct, float UNUSED(ctime))
{
if (VALID_CONS_TARGET(ct)) {
- Curve *cu = ct->tar->data;
-
/* note: when creating constraints that follow path, the curve gets the CU_PATH set now,
* currently for paths to work it needs to go through the bevlist/displist system (ton)
*/
/* only happens on reload file, but violates depsgraph still... fix! */
- if (cu->path == NULL || cu->path->data == NULL)
+ if (ct->tar->curve_cache == NULL || ct->tar->curve_cache->path == NULL || ct->tar->curve_cache->path->data == NULL)
BKE_displist_make_curveTypes(cob->scene, ct->tar, 0);
}
@@ -3034,7 +3031,6 @@ static void clampto_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *tar
/* only evaluate if there is a target and it is a curve */
if (VALID_CONS_TARGET(ct) && (ct->tar->type == OB_CURVE)) {
- Curve *cu = data->tar->data;
float obmat[4][4], ownLoc[3];
float curveMin[3], curveMax[3];
float targetMatrix[4][4] = MAT4_UNITY;
@@ -3047,7 +3043,7 @@ static void clampto_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *tar
BKE_object_minmax(ct->tar, curveMin, curveMax, TRUE);
/* get targetmatrix */
- if (cu->path && cu->path->data) {
+ if (data->tar->curve_cache && data->tar->curve_cache->path && data->tar->curve_cache->path->data) {
float vec[4], dir[3], totmat[4][4];
float curvetime;
short clamp_axis;
@@ -3312,6 +3308,14 @@ static void shrinkwrap_id_looper(bConstraint *con, ConstraintIDFunc func, void *
func(con, (ID **)&data->target, FALSE, userdata);
}
+static void shrinkwrap_new_data(void *cdata)
+{
+ bShrinkwrapConstraint *data = (bShrinkwrapConstraint *)cdata;
+
+ data->projAxis = OB_POSZ;
+ data->projAxisSpace = CONSTRAINT_SPACE_LOCAL;
+}
+
static int shrinkwrap_get_tars(bConstraint *con, ListBase *list)
{
if (con && list) {
@@ -3343,24 +3347,14 @@ static void shrinkwrap_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstra
bShrinkwrapConstraint *scon = (bShrinkwrapConstraint *) con->data;
if (VALID_CONS_TARGET(ct) && (ct->tar->type == OB_MESH) ) {
- int fail = FALSE;
+ bool fail = false;
float co[3] = {0.0f, 0.0f, 0.0f};
- float no[3] = {0.0f, 0.0f, 0.0f};
- float dist;
SpaceTransform transform;
DerivedMesh *target = object_get_derived_final(ct->tar);
- BVHTreeRayHit hit;
- BVHTreeNearest nearest;
BVHTreeFromMesh treeData = {NULL};
- nearest.index = -1;
- nearest.dist = FLT_MAX;
-
- hit.index = -1;
- hit.dist = 100000.0f; //TODO should use FLT_MAX.. but normal projection doenst yet supports it
-
unit_m4(ct->matrix);
if (target != NULL) {
@@ -3369,7 +3363,13 @@ static void shrinkwrap_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstra
switch (scon->shrinkType) {
case MOD_SHRINKWRAP_NEAREST_SURFACE:
case MOD_SHRINKWRAP_NEAREST_VERTEX:
-
+ {
+ BVHTreeNearest nearest;
+ float dist;
+
+ nearest.index = -1;
+ nearest.dist = FLT_MAX;
+
if (scon->shrinkType == MOD_SHRINKWRAP_NEAREST_VERTEX)
bvhtree_from_mesh_verts(&treeData, target, 0.0, 2, 6);
else
@@ -3390,32 +3390,54 @@ static void shrinkwrap_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstra
}
space_transform_invert(&transform, co);
break;
-
+ }
case MOD_SHRINKWRAP_PROJECT:
- if (scon->projAxis & MOD_SHRINKWRAP_PROJECT_OVER_X_AXIS) no[0] = 1.0f;
- if (scon->projAxis & MOD_SHRINKWRAP_PROJECT_OVER_Y_AXIS) no[1] = 1.0f;
- if (scon->projAxis & MOD_SHRINKWRAP_PROJECT_OVER_Z_AXIS) no[2] = 1.0f;
+ {
+ BVHTreeRayHit hit;
+
+ float mat[4][4];
+ float no[3] = {0.0f, 0.0f, 0.0f};
+
+ /* TODO should use FLT_MAX.. but normal projection doenst yet supports it */
+ hit.index = -1;
+ hit.dist = (scon->projLimit == 0.0f) ? 100000.0f : scon->projLimit;
+
+ switch (scon->projAxis) {
+ case OB_POSX: case OB_POSY: case OB_POSZ:
+ no[scon->projAxis - OB_POSX] = 1.0f;
+ break;
+ case OB_NEGX: case OB_NEGY: case OB_NEGZ:
+ no[scon->projAxis - OB_NEGX] = -1.0f;
+ break;
+ }
- if (dot_v3v3(no, no) < FLT_EPSILON) {
+ /* transform normal into requested space */
+ unit_m4(mat);
+ BKE_constraint_mat_convertspace(cob->ob, cob->pchan, mat, CONSTRAINT_SPACE_LOCAL, scon->projAxisSpace);
+ invert_m4(mat);
+ mul_mat3_m4_v3(mat, no);
+
+ if (normalize_v3(no) < FLT_EPSILON) {
fail = TRUE;
break;
}
-
- normalize_v3(no);
-
-
+
bvhtree_from_mesh_faces(&treeData, target, scon->dist, 4, 6);
if (treeData.tree == NULL) {
fail = TRUE;
break;
}
+
- if (normal_projection_project_vertex(0, co, no, &transform, treeData.tree, &hit, treeData.raycast_callback, &treeData) == FALSE) {
+ if (BKE_shrinkwrap_project_normal(0, co, no, &transform, treeData.tree, &hit,
+ treeData.raycast_callback, &treeData) == false)
+ {
fail = TRUE;
break;
}
copy_v3_v3(co, hit.co);
break;
+ }
}
free_bvhtree_from_mesh(&treeData);
@@ -3452,7 +3474,7 @@ static bConstraintTypeInfo CTI_SHRINKWRAP = {
NULL, /* free data */
shrinkwrap_id_looper, /* id looper */
NULL, /* copy data */
- NULL, /* new data */
+ shrinkwrap_new_data, /* new data */
shrinkwrap_get_tars, /* get constraint targets */
shrinkwrap_flush_tars, /* flush constraint targets */
shrinkwrap_get_tarmat, /* get a target matrix */
@@ -3650,14 +3672,12 @@ static void splineik_flush_tars(bConstraint *con, ListBase *list, short nocopy)
static void splineik_get_tarmat(bConstraint *UNUSED(con), bConstraintOb *cob, bConstraintTarget *ct, float UNUSED(ctime))
{
if (VALID_CONS_TARGET(ct)) {
- Curve *cu = ct->tar->data;
-
/* note: when creating constraints that follow path, the curve gets the CU_PATH set now,
* currently for paths to work it needs to go through the bevlist/displist system (ton)
*/
/* only happens on reload file, but violates depsgraph still... fix! */
- if (cu->path == NULL || cu->path->data == NULL)
+ if (ct->tar->curve_cache == NULL || ct->tar->curve_cache->path == NULL || ct->tar->curve_cache->path->data == NULL)
BKE_displist_make_curveTypes(cob->scene, ct->tar, 0);
}
diff --git a/source/blender/blenkernel/intern/context.c b/source/blender/blenkernel/intern/context.c
index 622b4f6df5a..2eb763831e4 100644
--- a/source/blender/blenkernel/intern/context.c
+++ b/source/blender/blenkernel/intern/context.c
@@ -198,8 +198,7 @@ void CTX_store_free_list(ListBase *contexts)
{
bContextStore *ctx;
- while ((ctx = contexts->first)) {
- BLI_remlink(contexts, ctx);
+ while ((ctx = BLI_pophead(contexts))) {
CTX_store_free(ctx);
}
}
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index 801ed4f00a5..ca9f97b754c 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -145,7 +145,6 @@ void BKE_curve_editNurb_free(Curve *cu)
void BKE_curve_free(Curve *cu)
{
BKE_nurbList_free(&cu->nurb);
- BLI_freelistN(&cu->bev);
BKE_displist_free(&cu->disp);
BKE_curve_editfont_free(cu);
@@ -161,8 +160,6 @@ void BKE_curve_free(Curve *cu)
MEM_freeN(cu->strinfo);
if (cu->bb)
MEM_freeN(cu->bb);
- if (cu->path)
- free_path(cu->path);
if (cu->tb)
MEM_freeN(cu->tb);
}
@@ -229,8 +226,6 @@ Curve *BKE_curve_copy(Curve *cu)
if (cun->key) cun->key->from = (ID *)cun;
cun->disp.first = cun->disp.last = NULL;
- cun->bev.first = cun->bev.last = NULL;
- cun->path = NULL;
cun->editnurb = NULL;
cun->editfont = NULL;
@@ -372,60 +367,74 @@ void BKE_curve_type_test(Object *ob)
BKE_curve_curve_dimension_update((Curve *)ob->data);
}
-void BKE_curve_texspace_calc(Curve *cu)
+void BKE_curve_boundbox_calc(Curve *cu, float r_loc[3], float r_size[3])
{
- DispList *dl;
BoundBox *bb;
- float *fp, min[3], max[3];
- int tot, do_it = FALSE;
+ float min[3], max[3];
+ float mloc[3], msize[3];
- if (cu->bb == NULL)
- cu->bb = MEM_callocN(sizeof(BoundBox), "boundbox");
+ if (cu->bb == NULL) cu->bb = MEM_callocN(sizeof(BoundBox), "boundbox");
bb = cu->bb;
+ if (!r_loc) r_loc = mloc;
+ if (!r_size) r_size = msize;
+
INIT_MINMAX(min, max);
+ BKE_displist_minmax(&cu->disp, min, max);
+ mid_v3_v3v3(r_loc, min, max);
- dl = cu->disp.first;
- while (dl) {
- tot = ELEM(dl->type, DL_INDEX3, DL_INDEX4) ? dl->nr : dl->nr * dl->parts;
+ r_size[0] = (max[0] - min[0]) / 2.0f;
+ r_size[1] = (max[1] - min[1]) / 2.0f;
+ r_size[2] = (max[2] - min[2]) / 2.0f;
- if (tot) do_it = TRUE;
- fp = dl->verts;
- while (tot--) {
- minmax_v3v3_v3(min, max, fp);
- fp += 3;
- }
- dl = dl->next;
- }
+ BKE_boundbox_init_from_minmax(bb, min, max);
- if (do_it == FALSE) {
- min[0] = min[1] = min[2] = -1.0f;
- max[0] = max[1] = max[2] = 1.0f;
- }
+ bb->flag &= ~BOUNDBOX_DIRTY;
+}
- BKE_boundbox_init_from_minmax(bb, min, max);
+BoundBox *BKE_curve_boundbox_get(Object *ob)
+{
+ Curve *cu = ob->data;
- if (cu->texflag & CU_AUTOSPACE) {
- mid_v3_v3v3(cu->loc, min, max);
- cu->size[0] = (max[0] - min[0]) / 2.0f;
- cu->size[1] = (max[1] - min[1]) / 2.0f;
- cu->size[2] = (max[2] - min[2]) / 2.0f;
+ if (ob->bb)
+ return ob->bb;
- zero_v3(cu->rot);
+ if (cu->bb == NULL || (cu->bb->flag & BOUNDBOX_DIRTY)) {
+ BKE_curve_texspace_calc(cu);
+ }
- if (cu->size[0] == 0.0f) cu->size[0] = 1.0f;
- else if (cu->size[0] > 0.0f && cu->size[0] < 0.00001f) cu->size[0] = 0.00001f;
- else if (cu->size[0] < 0.0f && cu->size[0] > -0.00001f) cu->size[0] = -0.00001f;
+ return cu->bb;
+}
- if (cu->size[1] == 0.0f) cu->size[1] = 1.0f;
- else if (cu->size[1] > 0.0f && cu->size[1] < 0.00001f) cu->size[1] = 0.00001f;
- else if (cu->size[1] < 0.0f && cu->size[1] > -0.00001f) cu->size[1] = -0.00001f;
+void BKE_curve_texspace_calc(Curve *cu)
+{
+ float loc[3], size[3];
+ int a;
- if (cu->size[2] == 0.0f) cu->size[2] = 1.0f;
- else if (cu->size[2] > 0.0f && cu->size[2] < 0.00001f) cu->size[2] = 0.00001f;
- else if (cu->size[2] < 0.0f && cu->size[2] > -0.00001f) cu->size[2] = -0.00001f;
+ BKE_curve_boundbox_calc(cu, loc, size);
+
+ if (cu->texflag & CU_AUTOSPACE) {
+ for (a = 0; a < 3; a++) {
+ if (size[a] == 0.0f) size[a] = 1.0f;
+ else if (size[a] > 0.0f && size[a] < 0.00001f) size[a] = 0.00001f;
+ else if (size[a] < 0.0f && size[a] > -0.00001f) size[a] = -0.00001f;
+ }
+
+ copy_v3_v3(cu->loc, loc);
+ copy_v3_v3(cu->size, size);
+ zero_v3(cu->rot);
+ }
+}
+void BKE_curve_texspace_get(Curve *cu, float r_loc[3], float r_rot[3], float r_size[3])
+{
+ if (cu->bb == NULL || (cu->bb->flag & BOUNDBOX_DIRTY)) {
+ BKE_curve_texspace_calc(cu);
}
+
+ if (r_loc) copy_v3_v3(r_loc, cu->loc);
+ if (r_rot) copy_v3_v3(r_rot, cu->rot);
+ if (r_size) copy_v3_v3(r_size, cu->size);
}
int BKE_nurbList_index_get_co(ListBase *nurb, const int index, float r_co[3])
@@ -570,6 +579,26 @@ Nurb *BKE_nurb_duplicate(Nurb *nu)
return newnu;
}
+/* copy the nurb but allow for different number of points (to be copied after this) */
+Nurb *BKE_nurb_copy(Nurb *src, int pntsu, int pntsv)
+{
+ Nurb *newnu = (Nurb *)MEM_mallocN(sizeof(Nurb), "copyNurb");
+ memcpy(newnu, src, sizeof(Nurb));
+
+ if (pntsu == 1) SWAP(int, pntsu, pntsv);
+ newnu->pntsu = pntsu;
+ newnu->pntsv = pntsv;
+
+ if (src->bezt) {
+ newnu->bezt = (BezTriple *)MEM_mallocN(pntsu * pntsv * sizeof(BezTriple), "copyNurb2");
+ }
+ else {
+ newnu->bp = (BPoint *)MEM_mallocN(pntsu * pntsv * sizeof(BPoint), "copyNurb3");
+ }
+
+ return newnu;
+}
+
void BKE_nurbList_duplicate(ListBase *lb1, ListBase *lb2)
{
Nurb *nu, *nun;
@@ -1586,10 +1615,10 @@ void BKE_curve_bevel_make(Scene *scene, Object *ob, ListBase *disp, int forRende
dl = bevdisp.first;
}
else {
- dl = cu->bevobj->disp.first;
+ dl = cu->bevobj->curve_cache ? cu->bevobj->curve_cache->disp.first : NULL;
if (dl == NULL) {
BKE_displist_make_curveTypes(scene, cu->bevobj, 0);
- dl = cu->bevobj->disp.first;
+ dl = cu->bevobj->curve_cache->disp.first;
}
}
@@ -1845,15 +1874,15 @@ static bool bevelinside(BevList *bl1, BevList *bl2)
}
-struct bevelsort {
- float left;
+struct BevelSort {
BevList *bl;
+ float left;
int dir;
};
static int vergxcobev(const void *a1, const void *a2)
{
- const struct bevelsort *x1 = a1, *x2 = a2;
+ const struct BevelSort *x1 = a1, *x2 = a2;
if (x1->left > x2->left)
return 1;
@@ -2447,7 +2476,7 @@ static void bevlist_firstlast_direction_calc_from_bpoint(Nurb *nu, BevList *bl)
}
}
-void BKE_curve_bevelList_make(Object *ob)
+void BKE_curve_bevelList_make(Object *ob, ListBase *nurbs, bool for_render)
{
/*
* - convert all curves to polys, with indication of resol and flags for double-vertices
@@ -2462,28 +2491,27 @@ void BKE_curve_bevelList_make(Object *ob)
BevList *bl, *blnew, *blnext;
BevPoint *bevp, *bevp2, *bevp1 = NULL, *bevp0;
float min, inp;
- struct bevelsort *sortdata, *sd, *sd1;
+ struct BevelSort *sortdata, *sd, *sd1;
int a, b, nr, poly, resolu = 0, len = 0;
int do_tilt, do_radius, do_weight;
int is_editmode = 0;
+ ListBase *bev;
/* this function needs an object, because of tflag and upflag */
cu = ob->data;
+ bev = &ob->curve_cache->bev;
+
/* do we need to calculate the radius for each point? */
/* do_radius = (cu->bevobj || cu->taperobj || (cu->flag & CU_FRONT) || (cu->flag & CU_BACK)) ? 0 : 1; */
/* STEP 1: MAKE POLYS */
- BLI_freelistN(&(cu->bev));
+ BLI_freelistN(&(ob->curve_cache->bev));
+ nu = nurbs->first;
if (cu->editnurb && ob->type != OB_FONT) {
- ListBase *nurbs = BKE_curve_editNurbs_get(cu);
- nu = nurbs->first;
is_editmode = 1;
}
- else {
- nu = cu->nurb.first;
- }
for (; nu; nu = nu->next) {
@@ -2499,12 +2527,12 @@ void BKE_curve_bevelList_make(Object *ob)
* enforced in the UI but can go wrong possibly */
if (!BKE_nurb_check_valid_u(nu)) {
bl = MEM_callocN(sizeof(BevList) + 1 * sizeof(BevPoint), "makeBevelList1");
- BLI_addtail(&(cu->bev), bl);
+ BLI_addtail(bev, bl);
bl->nr = 0;
bl->charidx = nu->charidx;
}
else {
- if (G.is_rendering && cu->resolu_ren != 0)
+ if (for_render && cu->resolu_ren != 0)
resolu = cu->resolu_ren;
else
resolu = nu->resolu;
@@ -2512,7 +2540,7 @@ void BKE_curve_bevelList_make(Object *ob)
if (nu->type == CU_POLY) {
len = nu->pntsu;
bl = MEM_callocN(sizeof(BevList) + len * sizeof(BevPoint), "makeBevelList2");
- BLI_addtail(&(cu->bev), bl);
+ BLI_addtail(bev, bl);
bl->poly = (nu->flagu & CU_NURB_CYCLIC) ? 0 : -1;
bl->nr = len;
@@ -2539,7 +2567,7 @@ void BKE_curve_bevelList_make(Object *ob)
/* in case last point is not cyclic */
len = resolu * (nu->pntsu + (nu->flagu & CU_NURB_CYCLIC) - 1) + 1;
bl = MEM_callocN(sizeof(BevList) + len * sizeof(BevPoint), "makeBevelBPoints");
- BLI_addtail(&(cu->bev), bl);
+ BLI_addtail(bev, bl);
bl->poly = (nu->flagu & CU_NURB_CYCLIC) ? 0 : -1;
bl->charidx = nu->charidx;
@@ -2632,7 +2660,7 @@ void BKE_curve_bevelList_make(Object *ob)
len = (resolu * SEGMENTSU(nu));
bl = MEM_callocN(sizeof(BevList) + len * sizeof(BevPoint), "makeBevelList3");
- BLI_addtail(&(cu->bev), bl);
+ BLI_addtail(bev, bl);
bl->nr = len;
bl->dupe_nr = 0;
bl->poly = (nu->flagu & CU_NURB_CYCLIC) ? 0 : -1;
@@ -2654,12 +2682,19 @@ void BKE_curve_bevelList_make(Object *ob)
}
/* STEP 2: DOUBLE POINTS AND AUTOMATIC RESOLUTION, REDUCE DATABLOCKS */
- bl = cu->bev.first;
+ bl = bev->first;
while (bl) {
if (bl->nr) { /* null bevel items come from single points */
+ bool is_cyclic = bl->poly != -1;
nr = bl->nr;
- bevp1 = (BevPoint *)(bl + 1);
- bevp0 = bevp1 + (nr - 1);
+ if (is_cyclic) {
+ bevp1 = (BevPoint *)(bl + 1);
+ bevp0 = bevp1 + (nr - 1);
+ }
+ else {
+ bevp0 = (BevPoint *)(bl + 1);
+ bevp1 = bevp0 + 1;
+ }
nr--;
while (nr--) {
if (fabsf(bevp0->vec[0] - bevp1->vec[0]) < 0.00001f) {
@@ -2676,7 +2711,7 @@ void BKE_curve_bevelList_make(Object *ob)
}
bl = bl->next;
}
- bl = cu->bev.first;
+ bl = bev->first;
while (bl) {
blnext = bl->next;
if (bl->nr && bl->dupe_nr) {
@@ -2684,8 +2719,8 @@ void BKE_curve_bevelList_make(Object *ob)
blnew = MEM_mallocN(sizeof(BevList) + nr * sizeof(BevPoint), "makeBevelList4");
memcpy(blnew, bl, sizeof(BevList));
blnew->nr = 0;
- BLI_remlink(&(cu->bev), bl);
- BLI_insertlinkbefore(&(cu->bev), blnext, blnew); /* to make sure bevlijst is tuned with nurblist */
+ BLI_remlink(bev, bl);
+ BLI_insertlinkbefore(bev, blnext, blnew); /* to make sure bevlijst is tuned with nurblist */
bevp0 = (BevPoint *)(bl + 1);
bevp1 = (BevPoint *)(blnew + 1);
nr = bl->nr;
@@ -2704,7 +2739,7 @@ void BKE_curve_bevelList_make(Object *ob)
}
/* STEP 3: POLYS COUNT AND AUTOHOLE */
- bl = cu->bev.first;
+ bl = bev->first;
poly = 0;
while (bl) {
if (bl->nr && bl->poly >= 0) {
@@ -2717,8 +2752,8 @@ void BKE_curve_bevelList_make(Object *ob)
/* find extreme left points, also test (turning) direction */
if (poly > 0) {
- sd = sortdata = MEM_mallocN(sizeof(struct bevelsort) * poly, "makeBevelList5");
- bl = cu->bev.first;
+ sd = sortdata = MEM_mallocN(sizeof(struct BevelSort) * poly, "makeBevelList5");
+ bl = bev->first;
while (bl) {
if (bl->poly > 0) {
@@ -2759,7 +2794,7 @@ void BKE_curve_bevelList_make(Object *ob)
bl = bl->next;
}
- qsort(sortdata, poly, sizeof(struct bevelsort), vergxcobev);
+ qsort(sortdata, poly, sizeof(struct BevelSort), vergxcobev);
sd = sortdata + 1;
for (a = 1; a < poly; a++, sd++) {
@@ -2798,7 +2833,7 @@ void BKE_curve_bevelList_make(Object *ob)
/* STEP 4: 2D-COSINES or 3D ORIENTATION */
if ((cu->flag & CU_3D) == 0) {
/* 2D Curves */
- for (bl = cu->bev.first; bl; bl = bl->next) {
+ for (bl = bev->first; bl; bl = bl->next) {
if (bl->nr < 2) {
/* do nothing */
}
@@ -2812,7 +2847,7 @@ void BKE_curve_bevelList_make(Object *ob)
}
else {
/* 3D Curves */
- for (bl = cu->bev.first; bl; bl = bl->next) {
+ for (bl = bev->first; bl; bl = bl->next) {
if (bl->nr < 2) {
/* do nothing */
}
@@ -3076,47 +3111,78 @@ void BKE_nurb_handles_calc(Nurb *nu) /* first, if needed, set handle flags */
calchandlesNurb_intern(nu, FALSE);
}
+/* similar to BKE_nurb_handle_calc but for curves and
+ * figures out the previous and next for us */
+void BKE_nurb_handle_calc_simple(Nurb *nu, BezTriple *bezt)
+{
+ if (nu->pntsu > 1) {
+ BezTriple *prev = BKE_nurb_bezt_get_prev(nu, bezt);
+ BezTriple *next = BKE_nurb_bezt_get_next(nu, bezt);
+ BKE_nurb_handle_calc(bezt, prev, next, 0);
+ }
+}
-void BKE_nurb_handles_test(Nurb *nu)
+/**
+ * Use when something has changed handle positions.
+ *
+ * The caller needs to recalculate handles.
+ */
+void BKE_nurb_bezt_handle_test(BezTriple *bezt, const bool use_handle)
{
- /* use when something has changed with handles.
- * it treats all BezTriples with the following rules:
- * PHASE 1: do types have to be altered?
- * Auto handles: become aligned when selection status is NOT(000 || 111)
- * Vector handles: become 'nothing' when (one half selected AND other not)
- * PHASE 2: recalculate handles
- */
- BezTriple *bezt;
- short flag, a;
+ short flag = 0;
- if (nu->type != CU_BEZIER) return;
+#define SEL_F1 (1 << 0)
+#define SEL_F2 (1 << 1)
+#define SEL_F3 (1 << 2)
- bezt = nu->bezt;
- a = nu->pntsu;
- while (a--) {
- flag = 0;
- if (bezt->f1 & SELECT)
- flag++;
- if (bezt->f2 & SELECT)
- flag += 2;
- if (bezt->f3 & SELECT)
- flag += 4;
+ if (use_handle) {
+ if (bezt->f1 & SELECT) flag |= SEL_F1;
+ if (bezt->f2 & SELECT) flag |= SEL_F2;
+ if (bezt->f3 & SELECT) flag |= SEL_F3;
+ }
+ else {
+ flag = (bezt->f2 & SELECT) ? (SEL_F1 | SEL_F2 | SEL_F3) : 0;
+ }
- if (!(flag == 0 || flag == 7) ) {
- if (ELEM(bezt->h1, HD_AUTO, HD_AUTO_ANIM)) { /* auto */
- bezt->h1 = HD_ALIGN;
- }
- if (ELEM(bezt->h2, HD_AUTO, HD_AUTO_ANIM)) { /* auto */
- bezt->h2 = HD_ALIGN;
- }
+ /* check for partial selection */
+ if (!ELEM(flag, 0, SEL_F1 | SEL_F2 | SEL_F3)) {
+ if (ELEM(bezt->h1, HD_AUTO, HD_AUTO_ANIM)) {
+ bezt->h1 = HD_ALIGN;
+ }
+ if (ELEM(bezt->h2, HD_AUTO, HD_AUTO_ANIM)) {
+ bezt->h2 = HD_ALIGN;
+ }
- if (bezt->h1 == HD_VECT) { /* vector */
- if (flag < 4) bezt->h1 = 0;
+ if (bezt->h1 == HD_VECT) {
+ if ((!(flag & SEL_F1)) != (!(flag & SEL_F2))) {
+ bezt->h1 = HD_FREE;
}
- if (bezt->h2 == HD_VECT) { /* vector */
- if (flag > 3) bezt->h2 = 0;
+ }
+ if (bezt->h2 == HD_VECT) {
+ if ((!(flag & SEL_F3)) != (!(flag & SEL_F2))) {
+ bezt->h2 = HD_FREE;
}
}
+ }
+
+#undef SEL_F1
+#undef SEL_F2
+#undef SEL_F3
+
+}
+
+void BKE_nurb_handles_test(Nurb *nu, const bool use_handle)
+{
+ BezTriple *bezt;
+ short a;
+
+ if (nu->type != CU_BEZIER)
+ return;
+
+ bezt = nu->bezt;
+ a = nu->pntsu;
+ while (a--) {
+ BKE_nurb_bezt_handle_test(bezt, use_handle);
bezt++;
}
@@ -3126,9 +3192,11 @@ void BKE_nurb_handles_test(Nurb *nu)
void BKE_nurb_handles_autocalc(Nurb *nu, int flag)
{
/* checks handle coordinates and calculates type */
+ const float eps = 0.0001f;
+ const float eps_sq = eps * eps;
BezTriple *bezt2, *bezt1, *bezt0;
- int i, align, leftsmall, rightsmall;
+ int i;
if (nu == NULL || nu->bezt == NULL)
return;
@@ -3139,54 +3207,54 @@ void BKE_nurb_handles_autocalc(Nurb *nu, int flag)
i = nu->pntsu;
while (i--) {
- align = leftsmall = rightsmall = 0;
+ bool align = false, leftsmall = false, rightsmall = false;
/* left handle: */
if (flag == 0 || (bezt1->f1 & flag) ) {
- bezt1->h1 = 0;
+ bezt1->h1 = HD_FREE;
/* distance too short: vectorhandle */
- if (len_v3v3(bezt1->vec[1], bezt0->vec[1]) < 0.0001f) {
+ if (len_squared_v3v3(bezt1->vec[1], bezt0->vec[1]) < eps_sq) {
bezt1->h1 = HD_VECT;
- leftsmall = 1;
+ leftsmall = true;
}
else {
/* aligned handle? */
- if (dist_to_line_v2(bezt1->vec[1], bezt1->vec[0], bezt1->vec[2]) < 0.0001f) {
- align = 1;
+ if (dist_to_line_v2(bezt1->vec[1], bezt1->vec[0], bezt1->vec[2]) < eps) {
+ align = true;
bezt1->h1 = HD_ALIGN;
}
/* or vector handle? */
- if (dist_to_line_v2(bezt1->vec[0], bezt1->vec[1], bezt0->vec[1]) < 0.0001f)
+ if (dist_to_line_v2(bezt1->vec[0], bezt1->vec[1], bezt0->vec[1]) < eps)
bezt1->h1 = HD_VECT;
}
}
/* right handle: */
if (flag == 0 || (bezt1->f3 & flag) ) {
- bezt1->h2 = 0;
+ bezt1->h2 = HD_FREE;
/* distance too short: vectorhandle */
- if (len_v3v3(bezt1->vec[1], bezt2->vec[1]) < 0.0001f) {
+ if (len_squared_v3v3(bezt1->vec[1], bezt2->vec[1]) < eps_sq) {
bezt1->h2 = HD_VECT;
- rightsmall = 1;
+ rightsmall = true;
}
else {
/* aligned handle? */
if (align) bezt1->h2 = HD_ALIGN;
/* or vector handle? */
- if (dist_to_line_v2(bezt1->vec[2], bezt1->vec[1], bezt2->vec[1]) < 0.0001f)
+ if (dist_to_line_v2(bezt1->vec[2], bezt1->vec[1], bezt2->vec[1]) < eps)
bezt1->h2 = HD_VECT;
}
}
if (leftsmall && bezt1->h2 == HD_ALIGN)
- bezt1->h2 = 0;
+ bezt1->h2 = HD_FREE;
if (rightsmall && bezt1->h1 == HD_ALIGN)
- bezt1->h1 = 0;
+ bezt1->h1 = HD_FREE;
/* undesired combination: */
if (bezt1->h1 == HD_ALIGN && bezt1->h2 == HD_VECT)
- bezt1->h1 = 0;
+ bezt1->h1 = HD_FREE;
if (bezt1->h2 == HD_ALIGN && bezt1->h1 == HD_VECT)
- bezt1->h2 = 0;
+ bezt1->h2 = HD_FREE;
bezt0 = bezt1;
bezt1 = bezt2;
@@ -3290,6 +3358,33 @@ void BKE_nurbList_handles_set(ListBase *editnurb, short code)
}
}
+void BKE_nurbList_flag_set(ListBase *editnurb, short flag)
+{
+ Nurb *nu;
+ BezTriple *bezt;
+ BPoint *bp;
+ int a;
+
+ for (nu = editnurb->first; nu; nu = nu->next) {
+ if (nu->type == CU_BEZIER) {
+ a = nu->pntsu;
+ bezt = nu->bezt;
+ while (a--) {
+ bezt->f1 = bezt->f2 = bezt->f3 = flag;
+ bezt++;
+ }
+ }
+ else {
+ a = nu->pntsu * nu->pntsv;
+ bp = nu->bp;
+ while (a--) {
+ bp->f1 = flag;
+ bp++;
+ }
+ }
+ }
+}
+
void BKE_nurb_direction_switch(Nurb *nu)
{
BezTriple *bezt1, *bezt2;
@@ -3401,7 +3496,7 @@ void BKE_nurb_direction_switch(Nurb *nu)
}
-float (*BKE_curve_vertexCos_get(Curve *UNUSED(cu), ListBase *lb, int *numVerts_r))[3]
+float (*BKE_curve_nurbs_vertexCos_get(ListBase *lb, int *numVerts_r))[3]
{
int i, numVerts = *numVerts_r = BKE_nurbList_verts_count(lb);
float *co, (*cos)[3] = MEM_mallocN(sizeof(*cos) * numVerts, "cu_vcos");
@@ -3430,7 +3525,7 @@ float (*BKE_curve_vertexCos_get(Curve *UNUSED(cu), ListBase *lb, int *numVerts_r
return cos;
}
-void BK_curve_vertexCos_apply(Curve *UNUSED(cu), ListBase *lb, float (*vertexCos)[3])
+void BK_curve_nurbs_vertexCos_apply(ListBase *lb, float (*vertexCos)[3])
{
float *co = vertexCos[0];
Nurb *nu;
@@ -3458,7 +3553,7 @@ void BK_curve_vertexCos_apply(Curve *UNUSED(cu), ListBase *lb, float (*vertexCos
}
}
-float (*BKE_curve_keyVertexCos_get(Curve *UNUSED(cu), ListBase *lb, float *key))[3]
+float (*BKE_curve_nurbs_keyVertexCos_get(ListBase *lb, float *key))[3]
{
int i, numVerts = BKE_nurbList_verts_count(lb);
float *co, (*cos)[3] = MEM_mallocN(sizeof(*cos) * numVerts, "cu_vcos");
@@ -3489,7 +3584,7 @@ float (*BKE_curve_keyVertexCos_get(Curve *UNUSED(cu), ListBase *lb, float *key))
return cos;
}
-void BKE_curve_keyVertexTilts_apply(Curve *UNUSED(cu), ListBase *lb, float *key)
+void BKE_curve_nurbs_keyVertexTilts_apply(ListBase *lb, float *key)
{
Nurb *nu;
int i;
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index d69ec6a9597..8a74f4719d5 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -45,11 +45,12 @@
#include "DNA_ID.h"
#include "BLI_utildefines.h"
-#include "BLI_blenlib.h"
-#include "BLI_linklist.h"
+#include "BLI_string.h"
+#include "BLI_path_util.h"
#include "BLI_math.h"
#include "BLI_mempool.h"
#include "BLI_utildefines.h"
+#include "BLI_alloca.h"
#include "BLF_translation.h"
@@ -256,7 +257,7 @@ static void layerInterp_mdeformvert(void **sources, const float *weights,
/* if this def_nr is not in the list, add it */
if (!node) {
- struct MDeformWeight_Link *tmp_dwlink = MEM_mallocN(sizeof(*tmp_dwlink), __func__);
+ struct MDeformWeight_Link *tmp_dwlink = alloca(sizeof(*tmp_dwlink));
tmp_dwlink->dw.def_nr = dw->def_nr;
tmp_dwlink->dw.weight = weight;
@@ -286,12 +287,9 @@ static void layerInterp_mdeformvert(void **sources, const float *weights,
}
if (totweight) {
- struct MDeformWeight_Link *node_next;
dvert->totweight = totweight;
- for (i = 0, node = dest_dwlink; node; node = node_next, i++) {
- node_next = node->next;
+ for (i = 0, node = dest_dwlink; node; node = node->next, i++) {
dvert->dw[i] = node->dw;
- MEM_freeN(node);
}
}
else {
@@ -973,6 +971,11 @@ static void layerDefault_mcol(void *data, int count)
}
}
+static void layerDefault_origindex(void *data, int count)
+{
+ fill_vn_i((int *)data, count, ORIGINDEX_NONE);
+}
+
static void layerInterp_bweight(void **sources, const float *weights,
const float *UNUSED(sub_weights), int count, void *dest)
{
@@ -1079,7 +1082,7 @@ static const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = {
{sizeof(MCol) * 4, "MCol", 4, N_("Col"), NULL, NULL, layerInterp_mcol,
layerSwap_mcol, layerDefault_mcol},
/* 7: CD_ORIGINDEX */
- {sizeof(int), "", 0, NULL, NULL, NULL, NULL, NULL, NULL},
+ {sizeof(int), "", 0, NULL, NULL, NULL, NULL, NULL, layerDefault_origindex},
/* 8: CD_NORMAL */
/* 3 floats per normal vector */
{sizeof(float) * 3, "vec3f", 1, NULL, NULL, NULL, NULL, NULL, NULL},
@@ -1217,6 +1220,16 @@ const CustomDataMask CD_MASK_BMESH =
const CustomDataMask CD_MASK_FACECORNERS =
CD_MASK_MTFACE | CD_MASK_MCOL | CD_MASK_MTEXPOLY | CD_MASK_MLOOPUV |
CD_MASK_MLOOPCOL;
+const CustomDataMask CD_MASK_EVERYTHING =
+ CD_MASK_MVERT | CD_MASK_MSTICKY /* DEPRECATED */ | CD_MASK_MDEFORMVERT | CD_MASK_MEDGE | CD_MASK_MFACE |
+ CD_MASK_MTFACE | CD_MASK_MCOL | CD_MASK_ORIGINDEX | CD_MASK_NORMAL /* | CD_MASK_POLYINDEX */ | CD_MASK_PROP_FLT |
+ CD_MASK_PROP_INT | CD_MASK_PROP_STR | CD_MASK_ORIGSPACE | CD_MASK_ORCO | CD_MASK_MTEXPOLY | CD_MASK_MLOOPUV |
+ CD_MASK_MLOOPCOL | CD_MASK_TANGENT | CD_MASK_MDISPS | CD_MASK_PREVIEW_MCOL | CD_MASK_CLOTH_ORCO | CD_MASK_RECAST |
+ /* BMESH ONLY START */
+ CD_MASK_MPOLY | CD_MASK_MLOOP | CD_MASK_SHAPE_KEYINDEX | CD_MASK_SHAPEKEY | CD_MASK_BWEIGHT | CD_MASK_CREASE |
+ CD_MASK_ORIGSPACE_MLOOP | CD_MASK_PREVIEW_MLOOPCOL | CD_MASK_BM_ELEM_PYPTR |
+ /* BMESH ONLY END */
+ CD_MASK_PAINT_MASK | CD_MASK_GRID_PAINT_MASK | CD_MASK_MVERT_SKIN | CD_MASK_FREESTYLE_EDGE | CD_MASK_FREESTYLE_FACE;
static const LayerTypeInfo *layerType_getInfo(int type)
{
@@ -1305,7 +1318,7 @@ bool CustomData_merge(const struct CustomData *source, struct CustomData *dest,
if (lastflag & CD_FLAG_NOCOPY) continue;
else if (!(mask & CD_TYPE_AS_MASK(type))) continue;
- else if (number < CustomData_number_of_layers(dest, type)) continue;
+ else if (CustomData_get_layer_named(dest, type, layer->name)) continue;
switch (alloctype) {
case CD_ASSIGN:
@@ -1449,8 +1462,9 @@ int CustomData_get_named_layer_index(const CustomData *data, int type, const cha
int i;
for (i = 0; i < data->totlayer; ++i)
- if (data->layers[i].type == type && strcmp(data->layers[i].name, name) == 0)
- return i;
+ if (data->layers[i].type == type)
+ if (strcmp(data->layers[i].name, name) == 0)
+ return i;
return -1;
}
@@ -1939,13 +1953,61 @@ void CustomData_copy_elements(int type, void *source, void *dest, int count)
memcpy(dest, source, typeInfo->size * count);
}
+static void CustomData_copy_data_layer(const CustomData *source, CustomData *dest,
+ int src_i, int dest_i,
+ int source_index, int dest_index, int count) {
+ const LayerTypeInfo *typeInfo;
+ int src_offset;
+ int dest_offset;
+
+ char *src_data = source->layers[src_i].data;
+ char *dest_data = dest->layers[dest_i].data;
+
+ typeInfo = layerType_getInfo(source->layers[src_i].type);
+
+ src_offset = source_index * typeInfo->size;
+ dest_offset = dest_index * typeInfo->size;
+
+ if (!src_data || !dest_data) {
+ if (!(src_data == NULL && dest_data == NULL)) {
+ printf("%s: warning null data for %s type (%p --> %p), skipping\n",
+ __func__, layerType_getName(source->layers[src_i].type),
+ (void *)src_data, (void *)dest_data);
+ }
+ return;
+ }
+
+ if (typeInfo->copy)
+ typeInfo->copy(src_data + src_offset,
+ dest_data + dest_offset,
+ count);
+ else
+ memcpy(dest_data + dest_offset,
+ src_data + src_offset,
+ count * typeInfo->size);
+}
+
+void CustomData_copy_data_named(const CustomData *source, CustomData *dest,
+ int source_index, int dest_index, int count)
+{
+ int src_i, dest_i;
+
+ /* copies a layer at a time */
+ for (src_i = 0; src_i < source->totlayer; ++src_i) {
+
+ dest_i = CustomData_get_named_layer_index(dest, source->layers[src_i].type, source->layers[src_i].name);
+
+ /* if we found a matching layer, copy the data */
+ if (dest_i > -1) {
+ CustomData_copy_data_layer(source, dest, src_i, dest_i, source_index, dest_index, count);
+ }
+ }
+}
+
void CustomData_copy_data(const CustomData *source, CustomData *dest,
int source_index, int dest_index, int count)
{
- const LayerTypeInfo *typeInfo;
int src_i, dest_i;
- int src_offset;
- int dest_offset;
/* copies a layer at a time */
dest_i = 0;
@@ -1963,32 +2025,8 @@ void CustomData_copy_data(const CustomData *source, CustomData *dest,
/* if we found a matching layer, copy the data */
if (dest->layers[dest_i].type == source->layers[src_i].type) {
- char *src_data = source->layers[src_i].data;
- char *dest_data = dest->layers[dest_i].data;
-
- typeInfo = layerType_getInfo(source->layers[src_i].type);
-
- src_offset = source_index * typeInfo->size;
- dest_offset = dest_index * typeInfo->size;
-
- if (!src_data || !dest_data) {
- if (src_data != NULL && dest_data != NULL) {
- printf("%s: warning null data for %s type (%p --> %p), skipping\n",
- __func__, layerType_getName(source->layers[src_i].type),
- (void *)src_data, (void *)dest_data);
- }
- continue;
- }
+ CustomData_copy_data_layer(source, dest, src_i, dest_i, source_index, dest_index, count);
- if (typeInfo->copy)
- typeInfo->copy(src_data + src_offset,
- dest_data + dest_offset,
- count);
- else
- memcpy(dest_data + dest_offset,
- src_data + src_offset,
- count * typeInfo->size);
-
/* if there are multiple source & dest layers of the same type,
* we don't want to copy all source layers to the same dest, so
* increment dest_i
diff --git a/source/blender/blenkernel/intern/deform.c b/source/blender/blenkernel/intern/deform.c
index 882085aa5db..a183872552d 100644
--- a/source/blender/blenkernel/intern/deform.c
+++ b/source/blender/blenkernel/intern/deform.c
@@ -217,24 +217,35 @@ void defvert_remap(MDeformVert *dvert, int *map, const int map_len)
void defvert_normalize_subset(MDeformVert *dvert,
const bool *vgroup_subset, const int vgroup_tot)
{
- MDeformWeight *dw;
- unsigned int i;
- float tot_weight = 0.0f;
-
- for (i = dvert->totweight, dw = dvert->dw; i != 0; i--, dw++) {
+ if (dvert->totweight == 0) {
+ /* nothing */
+ }
+ else if (dvert->totweight == 1) {
+ MDeformWeight *dw = dvert->dw;
if ((dw->def_nr < vgroup_tot) && vgroup_subset[dw->def_nr]) {
- tot_weight += dw->weight;
+ dw->weight = 1.0f;
}
}
+ else {
+ MDeformWeight *dw;
+ unsigned int i;
+ float tot_weight = 0.0f;
- if (tot_weight > 0.0f) {
- float scalar = 1.0f / tot_weight;
for (i = dvert->totweight, dw = dvert->dw; i != 0; i--, dw++) {
if ((dw->def_nr < vgroup_tot) && vgroup_subset[dw->def_nr]) {
- dw->weight *= scalar;
-
- /* in case of division errors with very low weights */
- CLAMP(dw->weight, 0.0f, 1.0f);
+ tot_weight += dw->weight;
+ }
+ }
+
+ if (tot_weight > 0.0f) {
+ float scalar = 1.0f / tot_weight;
+ for (i = dvert->totweight, dw = dvert->dw; i != 0; i--, dw++) {
+ if ((dw->def_nr < vgroup_tot) && vgroup_subset[dw->def_nr]) {
+ dw->weight *= scalar;
+
+ /* in case of division errors with very low weights */
+ CLAMP(dw->weight, 0.0f, 1.0f);
+ }
}
}
}
@@ -242,7 +253,7 @@ void defvert_normalize_subset(MDeformVert *dvert,
void defvert_normalize(MDeformVert *dvert)
{
- if (dvert->totweight <= 0) {
+ if (dvert->totweight == 0) {
/* nothing */
}
else if (dvert->totweight == 1) {
@@ -269,14 +280,20 @@ void defvert_normalize(MDeformVert *dvert)
}
}
-void defvert_normalize_lock_single(MDeformVert *dvert, const int def_nr_lock)
+/* Same as defvert_normalize() if the locked vgroup is not a member of the subset */
+void defvert_normalize_lock_single(MDeformVert *dvert,
+ const bool *vgroup_subset, const int vgroup_tot,
+ const int def_nr_lock)
{
- if (dvert->totweight <= 0) {
+ if (dvert->totweight == 0) {
/* nothing */
}
else if (dvert->totweight == 1) {
- if (def_nr_lock != 0) {
- dvert->dw[0].weight = 1.0f;
+ MDeformWeight *dw = dvert->dw;
+ if ((dw->def_nr < vgroup_tot) && vgroup_subset[dw->def_nr]) {
+ if (def_nr_lock != 0) {
+ dw->weight = 1.0f;
+ }
}
}
else {
@@ -287,13 +304,15 @@ void defvert_normalize_lock_single(MDeformVert *dvert, const int def_nr_lock)
float lock_iweight = 1.0f;
for (i = dvert->totweight, dw = dvert->dw; i != 0; i--, dw++) {
- if (dw->def_nr != def_nr_lock) {
- tot_weight += dw->weight;
- }
- else {
- dw_lock = dw;
- lock_iweight = (1.0f - dw_lock->weight);
- CLAMP(lock_iweight, 0.0f, 1.0f);
+ if ((dw->def_nr < vgroup_tot) && vgroup_subset[dw->def_nr]) {
+ if (dw->def_nr != def_nr_lock) {
+ tot_weight += dw->weight;
+ }
+ else {
+ dw_lock = dw;
+ lock_iweight = (1.0f - dw_lock->weight);
+ CLAMP(lock_iweight, 0.0f, 1.0f);
+ }
}
}
@@ -302,25 +321,33 @@ void defvert_normalize_lock_single(MDeformVert *dvert, const int def_nr_lock)
float scalar = (1.0f / tot_weight) * lock_iweight;
for (i = dvert->totweight, dw = dvert->dw; i != 0; i--, dw++) {
- if (dw != dw_lock) {
- dw->weight *= scalar;
+ if ((dw->def_nr < vgroup_tot) && vgroup_subset[dw->def_nr]) {
+ if (dw != dw_lock) {
+ dw->weight *= scalar;
- /* in case of division errors with very low weights */
- CLAMP(dw->weight, 0.0f, 1.0f);
+ /* in case of division errors with very low weights */
+ CLAMP(dw->weight, 0.0f, 1.0f);
+ }
}
}
}
}
}
-void defvert_normalize_lock_map(MDeformVert *dvert, const bool *lock_flags, const int defbase_tot)
+/* Same as defvert_normalize() if no locked vgroup is a member of the subset */
+void defvert_normalize_lock_map(MDeformVert *dvert,
+ const bool *vgroup_subset, const int vgroup_tot,
+ const bool *lock_flags, const int defbase_tot)
{
- if (dvert->totweight <= 0) {
+ if (dvert->totweight == 0) {
/* nothing */
}
else if (dvert->totweight == 1) {
- if (LIKELY(defbase_tot >= 1) && lock_flags[0]) {
- dvert->dw[0].weight = 1.0f;
+ MDeformWeight *dw = dvert->dw;
+ if ((dw->def_nr < vgroup_tot) && vgroup_subset[dw->def_nr]) {
+ if (LIKELY(defbase_tot >= 1) && lock_flags[0]) {
+ dw->weight = 1.0f;
+ }
}
}
else {
@@ -330,12 +357,14 @@ void defvert_normalize_lock_map(MDeformVert *dvert, const bool *lock_flags, cons
float lock_iweight = 0.0f;
for (i = dvert->totweight, dw = dvert->dw; i != 0; i--, dw++) {
- if ((dw->def_nr < defbase_tot) && (lock_flags[dw->def_nr] == FALSE)) {
- tot_weight += dw->weight;
- }
- else {
- /* invert after */
- lock_iweight += dw->weight;
+ if ((dw->def_nr < vgroup_tot) && vgroup_subset[dw->def_nr]) {
+ if ((dw->def_nr < defbase_tot) && (lock_flags[dw->def_nr] == FALSE)) {
+ tot_weight += dw->weight;
+ }
+ else {
+ /* invert after */
+ lock_iweight += dw->weight;
+ }
}
}
@@ -346,11 +375,13 @@ void defvert_normalize_lock_map(MDeformVert *dvert, const bool *lock_flags, cons
float scalar = (1.0f / tot_weight) * lock_iweight;
for (i = dvert->totweight, dw = dvert->dw; i != 0; i--, dw++) {
- if ((dw->def_nr < defbase_tot) && (lock_flags[dw->def_nr] == FALSE)) {
- dw->weight *= scalar;
+ if ((dw->def_nr < vgroup_tot) && vgroup_subset[dw->def_nr]) {
+ if ((dw->def_nr < defbase_tot) && (lock_flags[dw->def_nr] == FALSE)) {
+ dw->weight *= scalar;
- /* in case of division errors with very low weights */
- CLAMP(dw->weight, 0.0f, 1.0f);
+ /* in case of division errors with very low weights */
+ CLAMP(dw->weight, 0.0f, 1.0f);
+ }
}
}
}
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index 4ce06623bae..cb7b4a32feb 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -29,6 +29,7 @@
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <math.h>
@@ -819,12 +820,26 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
dag_add_relation(dag, scenenode, node, DAG_RL_SCENE, "Scene Relation");
}
+static void build_dag_group(DagForest *dag, DagNode *scenenode, Scene *scene, Group *group, short mask)
+{
+ GroupObject *go;
+
+ if (group->id.flag & LIB_DOIT)
+ return;
+
+ group->id.flag |= LIB_DOIT;
+
+ for (go = group->gobject.first; go; go = go->next) {
+ build_dag_object(dag, scenenode, scene, go->ob, mask);
+ if (go->ob->dup_group)
+ build_dag_group(dag, scenenode, scene, go->ob->dup_group, mask);
+ }
+}
+
DagForest *build_dag(Main *bmain, Scene *sce, short mask)
{
Base *base;
Object *ob;
- Group *group;
- GroupObject *go;
DagNode *node;
DagNode *scenenode;
DagForest *dag;
@@ -841,6 +856,7 @@ DagForest *build_dag(Main *bmain, Scene *sce, short mask)
/* clear "LIB_DOIT" flag from all materials, to prevent infinite recursion problems later [#32017] */
tag_main_idcode(bmain, ID_MA, FALSE);
tag_main_idcode(bmain, ID_LA, FALSE);
+ tag_main_idcode(bmain, ID_GR, FALSE);
/* add base node for scene. scene is always the first node in DAG */
scenenode = dag_add_node(dag, sce);
@@ -852,21 +868,11 @@ DagForest *build_dag(Main *bmain, Scene *sce, short mask)
build_dag_object(dag, scenenode, sce, ob, mask);
if (ob->proxy)
build_dag_object(dag, scenenode, sce, ob->proxy, mask);
-
- /* handled in next loop */
if (ob->dup_group)
- ob->dup_group->id.flag |= LIB_DOIT;
+ build_dag_group(dag, scenenode, sce, ob->dup_group, mask);
}
- /* add groups used in current scene objects */
- for (group = bmain->group.first; group; group = group->id.next) {
- if (group->id.flag & LIB_DOIT) {
- for (go = group->gobject.first; go; go = go->next) {
- build_dag_object(dag, scenenode, sce, go->ob, mask);
- }
- group->id.flag &= ~LIB_DOIT;
- }
- }
+ tag_main_idcode(bmain, ID_GR, FALSE);
/* Now all relations were built, but we need to solve 1 exceptional case;
* When objects have multiple "parents" (for example parent + constraint working on same object)
@@ -1927,6 +1933,25 @@ static void dag_object_time_update_flags(Main *bmain, Scene *scene, Object *ob)
lib_id_recalc_data_tag(bmain, &ob->id);
}
+
+/* recursively update objects in groups, each group is done at most once */
+static void dag_group_update_flags(Main *bmain, Scene *scene, Group *group, const short do_time)
+{
+ GroupObject *go;
+
+ if (group->id.flag & LIB_DOIT)
+ return;
+
+ group->id.flag |= LIB_DOIT;
+
+ for (go = group->gobject.first; go; go = go->next) {
+ if (do_time)
+ dag_object_time_update_flags(bmain, scene, go->ob);
+ if (go->ob->dup_group)
+ dag_group_update_flags(bmain, scene, go->ob->dup_group, do_time);
+ }
+}
+
/* flag all objects that need recalc, for changes in time for example */
/* do_time: make this optional because undo resets objects to their animated locations without this */
void DAG_scene_update_flags(Main *bmain, Scene *scene, unsigned int lay, const short do_time)
@@ -1937,6 +1962,8 @@ void DAG_scene_update_flags(Main *bmain, Scene *scene, unsigned int lay, const s
GroupObject *go;
Scene *sce_iter;
+ tag_main_idcode(bmain, ID_GR, FALSE);
+
/* set ob flags where animated systems are */
for (SETLOOPER(scene, sce_iter, base)) {
ob = base->object;
@@ -1951,20 +1978,9 @@ void DAG_scene_update_flags(Main *bmain, Scene *scene, unsigned int lay, const s
dag_object_time_update_flags(bmain, sce_iter, ob);
}
- /* handled in next loop */
+ /* recursively tag groups with LIB_DOIT, and update flags for objects */
if (ob->dup_group)
- ob->dup_group->id.flag |= LIB_DOIT;
- }
-
- if (do_time) {
- /* we do groups each once */
- for (group = bmain->group.first; group; group = group->id.next) {
- if (group->id.flag & LIB_DOIT) {
- for (go = group->gobject.first; go; go = go->next) {
- dag_object_time_update_flags(bmain, scene, go->ob);
- }
- }
- }
+ dag_group_update_flags(bmain, scene, ob->dup_group, do_time);
}
for (sce_iter = scene; sce_iter; sce_iter = sce_iter->set)
@@ -2048,6 +2064,26 @@ static void dag_current_scene_layers(Main *bmain, ListBase *lb)
}
}
+static void dag_group_on_visible_update(Group *group)
+{
+ GroupObject *go;
+
+ if (group->id.flag & LIB_DOIT)
+ return;
+
+ group->id.flag |= LIB_DOIT;
+
+ for (go = group->gobject.first; go; go = go->next) {
+ if (ELEM6(go->ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_MBALL, OB_LATTICE))
+ go->ob->recalc |= OB_RECALC_DATA;
+ if (go->ob->proxy_from)
+ go->ob->recalc |= OB_RECALC_OB;
+
+ if (go->ob->dup_group)
+ dag_group_on_visible_update(go->ob->dup_group);
+ }
+}
+
void DAG_on_visible_update(Main *bmain, const short do_time)
{
ListBase listbase;
@@ -2061,8 +2097,6 @@ void DAG_on_visible_update(Main *bmain, const short do_time)
Scene *sce_iter;
Base *base;
Object *ob;
- Group *group;
- GroupObject *go;
DagNode *node;
unsigned int lay = dsl->layer, oblay;
@@ -2071,6 +2105,7 @@ void DAG_on_visible_update(Main *bmain, const short do_time)
* note armature poses or object matrices are preserved and do not
* require updates, so we skip those */
dag_scene_flush_layers(scene, lay);
+ tag_main_idcode(bmain, ID_GR, FALSE);
for (SETLOOPER(scene, sce_iter, base)) {
ob = base->object;
@@ -2080,23 +2115,14 @@ void DAG_on_visible_update(Main *bmain, const short do_time)
if ((oblay & lay) & ~scene->lay_updated) {
if (ELEM6(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_MBALL, OB_LATTICE))
ob->recalc |= OB_RECALC_DATA;
+ if (ob->proxy && (ob->proxy_group == NULL))
+ ob->proxy->recalc |= OB_RECALC_DATA;
if (ob->dup_group)
- ob->dup_group->id.flag |= LIB_DOIT;
+ dag_group_on_visible_update(ob->dup_group);
}
}
- for (group = bmain->group.first; group; group = group->id.next) {
- if (group->id.flag & LIB_DOIT) {
- for (go = group->gobject.first; go; go = go->next) {
- if (ELEM6(go->ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_MBALL, OB_LATTICE))
- go->ob->recalc |= OB_RECALC_DATA;
- if (go->ob->proxy_from)
- go->ob->recalc |= OB_RECALC_OB;
- }
-
- group->id.flag &= ~LIB_DOIT;
- }
- }
+ tag_main_idcode(bmain, ID_GR, FALSE);
/* now tag update flags, to ensure deformers get calculated on redraw */
DAG_scene_update_flags(bmain, scene, lay, do_time);
@@ -2274,7 +2300,7 @@ static void dag_id_flush_update(Main *bmain, Scene *sce, ID *id)
* so it should happen tracking-related constraints recalculation
* when camera is changing (sergey) */
if (sce->camera && &sce->camera->id == id) {
- MovieClip *clip = BKE_object_movieclip_get(sce, sce->camera, 1);
+ MovieClip *clip = BKE_object_movieclip_get(sce, sce->camera, true);
if (clip)
dag_id_flush_update(bmain, sce, &clip->id);
diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c
index 38a0b848339..6a89ca2cb84 100644
--- a/source/blender/blenkernel/intern/displist.c
+++ b/source/blender/blenkernel/intern/displist.c
@@ -43,6 +43,7 @@
#include "DNA_material_types.h"
#include "BLI_blenlib.h"
+#include "BLI_memarena.h"
#include "BLI_math.h"
#include "BLI_scanfill.h"
#include "BLI_utildefines.h"
@@ -62,8 +63,7 @@
#include "BLI_sys_types.h" // for intptr_t support
-static void boundbox_displist(Object *ob);
-static void boundbox_dispbase(BoundBox *bb, ListBase *dispbase);
+static void boundbox_displist_object(Object *ob);
void BKE_displist_elem_free(DispList *dl)
{
@@ -82,11 +82,8 @@ void BKE_displist_free(ListBase *lb)
{
DispList *dl;
- dl = lb->first;
- while (dl) {
- BLI_remlink(lb, dl);
+ while ((dl = BLI_pophead(lb))) {
BKE_displist_elem_free(dl);
- dl = lb->first;
}
}
@@ -454,6 +451,7 @@ void BKE_displist_fill(ListBase *dispbase, ListBase *to, const float normal_proj
ScanFillContext sf_ctx;
ScanFillVert *sf_vert, *sf_vert_new, *sf_vert_last;
ScanFillFace *sf_tri;
+ MemArena *sf_arena;
DispList *dlnew = NULL, *dl;
float *f1;
int colnr = 0, charidx = 0, cont = 1, tot, a, *index, nextcol = 0;
@@ -464,12 +462,14 @@ void BKE_displist_fill(ListBase *dispbase, ListBase *to, const float normal_proj
if (dispbase->first == NULL)
return;
+ sf_arena = BLI_memarena_new(BLI_SCANFILL_ARENA_SIZE, __func__);
+
while (cont) {
cont = 0;
totvert = 0;
nextcol = 0;
- BLI_scanfill_begin(&sf_ctx);
+ BLI_scanfill_begin_arena(&sf_ctx, sf_arena);
dl = dispbase->first;
while (dl) {
@@ -557,7 +557,7 @@ void BKE_displist_fill(ListBase *dispbase, ListBase *to, const float normal_proj
BLI_addhead(to, dlnew);
}
- BLI_scanfill_end(&sf_ctx);
+ BLI_scanfill_end_arena(&sf_ctx, sf_arena);
if (nextcol) {
/* stay at current char but fill polys with next material */
@@ -570,6 +570,8 @@ void BKE_displist_fill(ListBase *dispbase, ListBase *to, const float normal_proj
}
}
+ BLI_memarena_free(sf_arena);
+
/* do not free polys, needed for wireframe display */
}
@@ -667,10 +669,10 @@ static float displist_calc_taper(Scene *scene, Object *taperobj, float fac)
if (taperobj == NULL || taperobj->type != OB_CURVE)
return 1.0;
- dl = taperobj->disp.first;
+ dl = taperobj->curve_cache ? taperobj->curve_cache->disp.first : NULL;
if (dl == NULL) {
BKE_displist_make_curveTypes(scene, taperobj, 0);
- dl = taperobj->disp.first;
+ dl = taperobj->curve_cache->disp.first;
}
if (dl) {
float minx, dx, *fp;
@@ -712,29 +714,28 @@ void BKE_displist_make_mball(Scene *scene, Object *ob)
if (!ob || ob->type != OB_MBALL)
return;
- /* XXX: mball stuff uses plenty of global variables
- * while this is unchanged updating during render is unsafe
- */
- if (G.is_rendering)
- return;
-
- BKE_displist_free(&(ob->disp));
+ if (ob->curve_cache) {
+ BKE_displist_free(&(ob->curve_cache->disp));
+ }
+ else {
+ ob->curve_cache = MEM_callocN(sizeof(CurveCache), "CurveCache for MBall");
+ }
if (ob->type == OB_MBALL) {
if (ob == BKE_mball_basis_find(scene, ob)) {
- BKE_mball_polygonize(scene, ob, &ob->disp);
+ BKE_mball_polygonize(scene, ob, &ob->curve_cache->disp, false);
BKE_mball_texspace_calc(ob);
- object_deform_mball(ob, &ob->disp);
+ object_deform_mball(ob, &ob->curve_cache->disp);
}
- }
- boundbox_displist(ob);
+ boundbox_displist_object(ob);
+ }
}
void BKE_displist_make_mball_forRender(Scene *scene, Object *ob, ListBase *dispbase)
{
- BKE_mball_polygonize(scene, ob, dispbase);
+ BKE_mball_polygonize(scene, ob, dispbase, true);
BKE_mball_texspace_calc(ob);
object_deform_mball(ob, dispbase);
@@ -742,7 +743,8 @@ void BKE_displist_make_mball_forRender(Scene *scene, Object *ob, ListBase *dispb
static ModifierData *curve_get_tessellate_point(Scene *scene, Object *ob, int renderResolution, int editmode)
{
- ModifierData *md = modifiers_getVirtualModifierList(ob);
+ VirtualModifierData virtualModifierData;
+ ModifierData *md = modifiers_getVirtualModifierList(ob, &virtualModifierData);
ModifierData *pretessellatePoint;
int required_mode;
@@ -780,18 +782,16 @@ static ModifierData *curve_get_tessellate_point(Scene *scene, Object *ob, int re
return pretessellatePoint;
}
-static void curve_calc_modifiers_pre(Scene *scene, Object *ob, int forRender, int renderResolution,
- float (**originalVerts_r)[3],
- float (**deformedVerts_r)[3], int *numVerts_r)
+static void curve_calc_modifiers_pre(Scene *scene, Object *ob, ListBase *nurb,
+ int forRender, int renderResolution)
{
- ModifierData *md = modifiers_getVirtualModifierList(ob);
+ VirtualModifierData virtualModifierData;
+ ModifierData *md = modifiers_getVirtualModifierList(ob, &virtualModifierData);
ModifierData *pretessellatePoint;
Curve *cu = ob->data;
- ListBase *nurb = BKE_curve_nurbs_get(cu);
int numVerts = 0;
const int editmode = (!forRender && (cu->editnurb || cu->editfont));
ModifierApplyFlag app_flag = 0;
- float (*originalVerts)[3] = NULL;
float (*deformedVerts)[3] = NULL;
float *keyVerts = NULL;
int required_mode;
@@ -818,8 +818,7 @@ static void curve_calc_modifiers_pre(Scene *scene, Object *ob, int forRender, in
* tilts, which is passed through in the modifier stack.
* this is also the reason curves do not use a virtual
* shape key modifier yet. */
- deformedVerts = BKE_curve_keyVertexCos_get(cu, nurb, keyVerts);
- originalVerts = MEM_dupallocN(deformedVerts);
+ deformedVerts = BKE_curve_nurbs_keyVertexCos_get(nurb, keyVerts);
BLI_assert(BKE_nurbList_verts_count(nurb) == numVerts);
}
}
@@ -836,8 +835,7 @@ static void curve_calc_modifiers_pre(Scene *scene, Object *ob, int forRender, in
continue;
if (!deformedVerts) {
- deformedVerts = BKE_curve_vertexCos_get(cu, nurb, &numVerts);
- originalVerts = MEM_dupallocN(deformedVerts);
+ deformedVerts = BKE_curve_nurbs_vertexCos_get(nurb, &numVerts);
}
mti->deformVerts(md, ob, NULL, deformedVerts, numVerts, app_flag);
@@ -847,17 +845,15 @@ static void curve_calc_modifiers_pre(Scene *scene, Object *ob, int forRender, in
}
}
- if (deformedVerts)
- BK_curve_vertexCos_apply(cu, nurb, deformedVerts);
+ if (deformedVerts) {
+ BK_curve_nurbs_vertexCos_apply(nurb, deformedVerts);
+ MEM_freeN(deformedVerts);
+ }
if (keyVerts) /* these are not passed through modifier stack */
- BKE_curve_keyVertexTilts_apply(cu, nurb, keyVerts);
+ BKE_curve_nurbs_keyVertexTilts_apply(nurb, keyVerts);
if (keyVerts)
MEM_freeN(keyVerts);
-
- *originalVerts_r = originalVerts;
- *deformedVerts_r = deformedVerts;
- *numVerts_r = numVerts;
}
static float (*displist_get_allverts(ListBase *dispbase, int *totvert))[3]
@@ -894,14 +890,14 @@ static void displist_apply_allverts(ListBase *dispbase, float (*allverts)[3])
}
}
-static void curve_calc_modifiers_post(Scene *scene, Object *ob, ListBase *dispbase, DerivedMesh **derivedFinal,
- int forRender, int renderResolution,
- float (*originalVerts)[3], float (*deformedVerts)[3])
+static void curve_calc_modifiers_post(Scene *scene, Object *ob, ListBase *nurb,
+ ListBase *dispbase, DerivedMesh **derivedFinal,
+ int forRender, int renderResolution)
{
- ModifierData *md = modifiers_getVirtualModifierList(ob);
+ VirtualModifierData virtualModifierData;
+ ModifierData *md = modifiers_getVirtualModifierList(ob, &virtualModifierData);
ModifierData *pretessellatePoint;
Curve *cu = ob->data;
- ListBase *nurb = BKE_curve_nurbs_get(cu);
int required_mode = 0, totvert = 0;
int editmode = (!forRender && (cu->editnurb || cu->editfont));
DerivedMesh *dm = NULL, *ndm;
@@ -1046,12 +1042,6 @@ static void curve_calc_modifiers_post(Scene *scene, Object *ob, ListBase *dispba
}
(*derivedFinal) = dm;
}
-
- if (deformedVerts) {
- BK_curve_vertexCos_apply(ob->data, nurb, originalVerts);
- MEM_freeN(originalVerts);
- MEM_freeN(deformedVerts);
- }
}
static void displist_surf_indices(DispList *dl)
@@ -1142,8 +1132,8 @@ static void curve_calc_orcodm(Scene *scene, Object *ob, DerivedMesh *derivedFina
/* this function represents logic of mesh's orcodm calculation
* for displist-based objects
*/
-
- ModifierData *md = modifiers_getVirtualModifierList(ob);
+ VirtualModifierData virtualModifierData;
+ ModifierData *md = modifiers_getVirtualModifierList(ob, &virtualModifierData);
ModifierData *pretessellatePoint;
Curve *cu = ob->data;
int required_mode;
@@ -1201,25 +1191,24 @@ static void curve_calc_orcodm(Scene *scene, Object *ob, DerivedMesh *derivedFina
void BKE_displist_make_surf(Scene *scene, Object *ob, ListBase *dispbase,
DerivedMesh **derivedFinal, int forRender, int forOrco, int renderResolution)
{
- ListBase *nubase;
+ ListBase nubase = {NULL, NULL};
Nurb *nu;
Curve *cu = ob->data;
DispList *dl;
float *data;
int len;
- int numVerts;
- float (*originalVerts)[3];
- float (*deformedVerts)[3];
- if (!forRender && cu->editnurb)
- nubase = BKE_curve_editNurbs_get(cu);
- else
- nubase = &cu->nurb;
+ if (!forRender && cu->editnurb) {
+ BKE_nurbList_duplicate(&nubase, BKE_curve_editNurbs_get(cu));
+ }
+ else {
+ BKE_nurbList_duplicate(&nubase, &cu->nurb);
+ }
if (!forOrco)
- curve_calc_modifiers_pre(scene, ob, forRender, renderResolution, &originalVerts, &deformedVerts, &numVerts);
+ curve_calc_modifiers_pre(scene, ob, &nubase, forRender, renderResolution);
- for (nu = nubase->first; nu; nu = nu->next) {
+ for (nu = nubase.first; nu; nu = nu->next) {
if (forRender || nu->hide == 0) {
int resolu = nu->resolu, resolv = nu->resolv;
@@ -1287,15 +1276,12 @@ void BKE_displist_make_surf(Scene *scene, Object *ob, ListBase *dispbase,
* already applied, thats how it worked for years, so keep for compatibility (sergey) */
BKE_displist_copy(&cu->disp, dispbase);
- if (!forRender) {
- BKE_curve_texspace_calc(cu);
- }
-
if (!forOrco) {
- curve_calc_modifiers_post(scene, ob, dispbase, derivedFinal,
- forRender, renderResolution,
- originalVerts, deformedVerts);
+ curve_calc_modifiers_post(scene, ob, &nubase, dispbase, derivedFinal,
+ forRender, renderResolution);
}
+
+ BKE_nurbList_free(&nubase);
}
static void rotateBevelPiece(Curve *cu, BevPoint *bevp, BevPoint *nbevp, DispList *dlb, float bev_blend, float widfac, float fac, float **data_r)
@@ -1389,37 +1375,34 @@ static void do_makeDispListCurveTypes(Scene *scene, Object *ob, ListBase *dispba
}
else if (ELEM(ob->type, OB_CURVE, OB_FONT)) {
ListBase dlbev;
- ListBase *nubase;
- float (*originalVerts)[3];
- float (*deformedVerts)[3];
- int numVerts;
+ ListBase nubase = {NULL, NULL};
- nubase = BKE_curve_nurbs_get(cu);
+ BLI_freelistN(&(ob->curve_cache->bev));
- BLI_freelistN(&(cu->bev));
-
- if (cu->path) free_path(cu->path);
- cu->path = NULL;
+ if (ob->curve_cache->path) free_path(ob->curve_cache->path);
+ ob->curve_cache->path = NULL;
if (ob->type == OB_FONT)
BKE_vfont_to_curve(G.main, scene, ob, 0);
+ BKE_nurbList_duplicate(&nubase, BKE_curve_nurbs_get(cu));
+
if (!forOrco)
- curve_calc_modifiers_pre(scene, ob, forRender, renderResolution, &originalVerts, &deformedVerts, &numVerts);
+ curve_calc_modifiers_pre(scene, ob, &nubase, forRender, renderResolution);
- BKE_curve_bevelList_make(ob);
+ BKE_curve_bevelList_make(ob, &nubase, forRender != FALSE);
/* If curve has no bevel will return nothing */
BKE_curve_bevel_make(scene, ob, &dlbev, forRender, renderResolution);
/* no bevel or extrude, and no width correction? */
if (!dlbev.first && cu->width == 1.0f) {
- curve_to_displist(cu, nubase, dispbase, forRender, renderResolution);
+ curve_to_displist(cu, &nubase, dispbase, forRender, renderResolution);
}
else {
float widfac = cu->width - 1.0f;
- BevList *bl = cu->bev.first;
- Nurb *nu = nubase->first;
+ BevList *bl = ob->curve_cache->bev.first;
+ Nurb *nu = nubase.first;
for (; bl && nu; bl = bl->next, nu = nu->next) {
DispList *dl;
@@ -1586,27 +1569,25 @@ static void do_makeDispListCurveTypes(Scene *scene, Object *ob, ListBase *dispba
}
if (!(cu->flag & CU_DEFORM_FILL)) {
- curve_to_filledpoly(cu, nubase, dispbase);
+ curve_to_filledpoly(cu, &nubase, dispbase);
}
if ((cu->flag & CU_PATH) && !forOrco)
- calc_curvepath(ob);
+ calc_curvepath(ob, &nubase);
/* make copy of 'undeformed" displist for texture space calculation
* actually, it's not totally undeformed -- pre-tessellation modifiers are
* already applied, thats how it worked for years, so keep for compatibility (sergey) */
BKE_displist_copy(&cu->disp, dispbase);
- if (!forRender) {
- BKE_curve_texspace_calc(cu);
- }
-
if (!forOrco)
- curve_calc_modifiers_post(scene, ob, dispbase, derivedFinal, forRender, renderResolution, originalVerts, deformedVerts);
+ curve_calc_modifiers_post(scene, ob, &nubase, dispbase, derivedFinal, forRender, renderResolution);
if (cu->flag & CU_DEFORM_FILL && !ob->derivedFinal) {
- curve_to_filledpoly(cu, nubase, dispbase);
+ curve_to_filledpoly(cu, &nubase, dispbase);
}
+
+ BKE_nurbList_free(&nubase);
}
}
@@ -1621,37 +1602,36 @@ void BKE_displist_make_curveTypes(Scene *scene, Object *ob, int forOrco)
if (!ELEM3(ob->type, OB_SURF, OB_CURVE, OB_FONT))
return;
- BKE_displist_free(&(ob->disp));
- dispbase = &(ob->disp);
- BKE_displist_free(dispbase);
-
- /* free displist used for textspace */
BKE_displist_free(&cu->disp);
+ BKE_object_free_derived_caches(ob);
- do_makeDispListCurveTypes(scene, ob, dispbase, &ob->derivedFinal, 0, forOrco, 0);
+ if (!ob->curve_cache) {
+ ob->curve_cache = MEM_callocN(sizeof(CurveCache), "CurveCache for curve types");
+ }
- if (ob->derivedFinal) {
- DM_set_object_boundbox(ob, ob->derivedFinal);
+ dispbase = &(ob->curve_cache->disp);
- /* always keep curve's BB in sync with non-deformed displist */
- if (cu->bb == NULL)
- cu->bb = MEM_callocN(sizeof(BoundBox), "boundbox");
+ do_makeDispListCurveTypes(scene, ob, dispbase, &ob->derivedFinal, 0, forOrco, 0);
- boundbox_dispbase(cu->bb, &cu->disp);
- }
- else {
- boundbox_displist(ob);
- }
+ boundbox_displist_object(ob);
}
void BKE_displist_make_curveTypes_forRender(Scene *scene, Object *ob, ListBase *dispbase,
DerivedMesh **derivedFinal, int forOrco, int renderResolution)
{
+ if (ob->curve_cache == NULL) {
+ ob->curve_cache = MEM_callocN(sizeof(CurveCache), "CurveCache for MBall");
+ }
+
do_makeDispListCurveTypes(scene, ob, dispbase, derivedFinal, 1, forOrco, renderResolution);
}
void BKE_displist_make_curveTypes_forOrco(struct Scene *scene, struct Object *ob, struct ListBase *dispbase)
{
+ if (ob->curve_cache == NULL) {
+ ob->curve_cache = MEM_callocN(sizeof(CurveCache), "CurveCache for MBall");
+ }
+
do_makeDispListCurveTypes(scene, ob, dispbase, NULL, 1, 1, 1);
}
@@ -1676,16 +1656,13 @@ float *BKE_displist_make_orco(Scene *scene, Object *ob, DerivedMesh *derivedFina
return orco;
}
-static void boundbox_dispbase(BoundBox *bb, ListBase *dispbase)
+void BKE_displist_minmax(ListBase *dispbase, float min[3], float max[3])
{
- float min[3], max[3];
DispList *dl;
float *vert;
int a, tot = 0;
int doit = 0;
- INIT_MINMAX(min, max);
-
for (dl = dispbase->first; dl; dl = dl->next) {
tot = (dl->type == DL_INDEX3) ? dl->nr : dl->nr * dl->parts;
vert = dl->verts;
@@ -1700,26 +1677,29 @@ static void boundbox_dispbase(BoundBox *bb, ListBase *dispbase)
zero_v3(min);
zero_v3(max);
}
-
- BKE_boundbox_init_from_minmax(bb, min, max);
}
/* this is confusing, there's also min_max_object, appplying the obmat... */
-static void boundbox_displist(Object *ob)
+static void boundbox_displist_object(Object *ob)
{
if (ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT)) {
- Curve *cu = ob->data;
-
- /* calculate curve's BB based on non-deformed displist */
- if (cu->bb == NULL)
- cu->bb = MEM_callocN(sizeof(BoundBox), "boundbox");
-
- boundbox_dispbase(cu->bb, &cu->disp);
+ /* Curver's BB is already calculated as a part of modifier stack,
+ * here we only calculate object BB based on final display list.
+ */
/* object's BB is calculated from final displist */
if (ob->bb == NULL)
ob->bb = MEM_callocN(sizeof(BoundBox), "boundbox");
- boundbox_dispbase(ob->bb, &ob->disp);
+ if (ob->derivedFinal) {
+ DM_set_object_boundbox(ob, ob->derivedFinal);
+ }
+ else {
+ float min[3], max[3];
+
+ INIT_MINMAX(min, max);
+ BKE_displist_minmax(&ob->curve_cache->disp, min, max);
+ BKE_boundbox_init_from_minmax(ob->bb, min, max);
+ }
}
}
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index a62ca530bf9..fe9a96d60cf 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -20,6 +20,9 @@
* ***** END GPL LICENSE BLOCK *****
*/
+/** \file blender/blenkernel/intern/dynamicpaint.c
+ * \ingroup bke
+ */
#include "MEM_guardedalloc.h"
@@ -95,12 +98,13 @@
#endif
/* precalculated gaussian factors for 5x super sampling */
-static float gaussianFactors[5] = {0.996849f,
- 0.596145f,
- 0.596145f,
- 0.596145f,
- 0.524141f};
-static float gaussianTotal = 3.309425f;
+static const float gaussianFactors[5] = {
+ 0.996849f,
+ 0.596145f,
+ 0.596145f,
+ 0.596145f,
+ 0.524141f};
+static const float gaussianTotal = 3.309425f;
/* UV Image neighboring pixel table x and y list */
static int neighX[8] = {1, 1, 0, -1, -1, -1, 0, 1};
@@ -3802,14 +3806,15 @@ static int dynamicPaint_paintParticles(DynamicPaintSurface *surface,
*/
KDTreeNearest *nearest;
- int n, particles = 0;
+ int n, particles;
float smooth_range = smooth * (1.0f - strength), dist;
/* calculate max range that can have particles with higher influence than the nearest one */
float max_range = smooth - strength * smooth + solidradius;
/* Make gcc happy! */
dist = max_range;
- particles = BLI_kdtree_range_search(tree, max_range, bData->realCoord[bData->s_pos[index]].v, NULL, &nearest);
+ particles = BLI_kdtree_range_search(tree, bData->realCoord[bData->s_pos[index]].v, NULL,
+ &nearest, max_range);
/* Find particle that produces highest influence */
for (n = 0; n < particles; n++) {
diff --git a/source/blender/blenkernel/intern/editderivedmesh.c b/source/blender/blenkernel/intern/editderivedmesh.c
index e8e56c6f17b..453d96a11af 100644
--- a/source/blender/blenkernel/intern/editderivedmesh.c
+++ b/source/blender/blenkernel/intern/editderivedmesh.c
@@ -888,23 +888,47 @@ static void emdm_pass_attrib_vertex_glsl(DMVertexAttribs *attribs, BMLoop *loop,
{
BMVert *eve = loop->v;
int i;
+ const float zero[4] = {0.0f, 0.0f, 0.0f, 0.0f};
if (attribs->totorco) {
- const float *orco = attribs->orco.array[BM_elem_index_get(eve)];
- glVertexAttrib3fvARB(attribs->orco.gl_index, orco);
+ int index = BM_elem_index_get(eve);
+ const float *orco = (attribs->orco.array) ? attribs->orco.array[index] : zero;
+
+ if (attribs->orco.gl_texco)
+ glTexCoord3fv(orco);
+ else
+ glVertexAttrib3fvARB(attribs->orco.gl_index, orco);
}
for (i = 0; i < attribs->tottface; i++) {
- const MLoopUV *luv = BM_ELEM_CD_GET_VOID_P(loop, attribs->tface[i].em_offset);
- glVertexAttrib2fvARB(attribs->tface[i].gl_index, luv->uv);
+ const float *uv;
+
+ if (attribs->tface[i].em_offset != -1) {
+ const MLoopUV *luv = BM_ELEM_CD_GET_VOID_P(loop, attribs->tface[i].em_offset);
+ uv = luv->uv;
+ }
+ else {
+ uv = zero;
+ }
+
+ if (attribs->tface[i].gl_texco)
+ glTexCoord2fv(uv);
+ else
+ glVertexAttrib2fvARB(attribs->tface[i].gl_index, uv);
}
for (i = 0; i < attribs->totmcol; i++) {
- const MLoopCol *cp = BM_ELEM_CD_GET_VOID_P(loop, attribs->mcol[i].em_offset);
GLubyte col[4];
- col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a;
+ if (attribs->mcol[i].em_offset != -1) {
+ const MLoopCol *cp = BM_ELEM_CD_GET_VOID_P(loop, attribs->mcol[i].em_offset);
+ col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a;
+ }
+ else {
+ col[0] = 0; col[1] = 0; col[2] = 0; col[3] = 0;
+ }
glVertexAttrib4ubvARB(attribs->mcol[i].gl_index, col);
}
if (attribs->tottang) {
- const float *tang = attribs->tang.array[i * 4 + index_in_face];
+ int index = i * 4 + index_in_face;
+ const float *tang = (attribs->tang.array) ? attribs->tang.array[index] : zero;
glVertexAttrib4fvARB(attribs->tang.gl_index, tang);
}
}
@@ -1020,38 +1044,6 @@ static void emDM_drawFacesGLSL(DerivedMesh *dm,
dm->drawMappedFacesGLSL(dm, setMaterial, NULL, NULL);
}
-/* emdm_pass_attrib_vertex_glsl's note about em_offset use applies here */
-static void emdm_pass_attrib_vertex_mat(DMVertexAttribs *attribs, BMLoop *loop, int index_in_face)
-{
- BMVert *eve = loop->v;
- int i;
-
- if (attribs->totorco) {
- float *orco = attribs->orco.array[BM_elem_index_get(eve)];
- if (attribs->orco.gl_texco)
- glTexCoord3fv(orco);
- else
- glVertexAttrib3fvARB(attribs->orco.gl_index, orco);
- }
- for (i = 0; i < attribs->tottface; i++) {
- const MLoopUV *luv = BM_ELEM_CD_GET_VOID_P(loop, attribs->tface[i].em_offset);
- if (attribs->tface[i].gl_texco)
- glTexCoord2fv(luv->uv);
- else
- glVertexAttrib2fvARB(attribs->tface[i].gl_index, luv->uv);
- }
- for (i = 0; i < attribs->totmcol; i++) {
- const MLoopCol *cp = BM_ELEM_CD_GET_VOID_P(loop, attribs->mcol[i].em_offset);
- GLubyte col[4];
- col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a;
- glVertexAttrib4ubvARB(attribs->mcol[i].gl_index, col);
- }
- if (attribs->tottang) {
- float *tang = attribs->tang.array[i * 4 + index_in_face];
- glVertexAttrib4fvARB(attribs->tang.gl_index, tang);
- }
-}
-
static void emDM_drawMappedFacesMat(DerivedMesh *dm,
void (*setMaterial)(void *userData, int, void *attribs),
bool (*setFace)(void *userData, int index), void *userData)
@@ -1105,21 +1097,21 @@ static void emDM_drawMappedFacesMat(DerivedMesh *dm,
if (vertexCos) glNormal3fv(polyNos[BM_elem_index_get(efa)]);
else glNormal3fv(efa->no);
- emdm_pass_attrib_vertex_mat(&attribs, ltri[0], 0);
+ emdm_pass_attrib_vertex_glsl(&attribs, ltri[0], 0);
if (vertexCos) glVertex3fv(vertexCos[BM_elem_index_get(ltri[0]->v)]);
else glVertex3fv(ltri[0]->v->co);
- emdm_pass_attrib_vertex_mat(&attribs, ltri[1], 1);
+ emdm_pass_attrib_vertex_glsl(&attribs, ltri[1], 1);
if (vertexCos) glVertex3fv(vertexCos[BM_elem_index_get(ltri[1]->v)]);
else glVertex3fv(ltri[1]->v->co);
- emdm_pass_attrib_vertex_mat(&attribs, ltri[2], 2);
+ emdm_pass_attrib_vertex_glsl(&attribs, ltri[2], 2);
if (vertexCos) glVertex3fv(vertexCos[BM_elem_index_get(ltri[2]->v)]);
else glVertex3fv(ltri[2]->v->co);
}
else {
- emdm_pass_attrib_vertex_mat(&attribs, ltri[0], 0);
+ emdm_pass_attrib_vertex_glsl(&attribs, ltri[0], 0);
if (vertexCos) {
glNormal3fv(vertexNos[BM_elem_index_get(ltri[0]->v)]);
glVertex3fv(vertexCos[BM_elem_index_get(ltri[0]->v)]);
@@ -1129,7 +1121,7 @@ static void emDM_drawMappedFacesMat(DerivedMesh *dm,
glVertex3fv(ltri[0]->v->co);
}
- emdm_pass_attrib_vertex_mat(&attribs, ltri[1], 1);
+ emdm_pass_attrib_vertex_glsl(&attribs, ltri[1], 1);
if (vertexCos) {
glNormal3fv(vertexNos[BM_elem_index_get(ltri[1]->v)]);
glVertex3fv(vertexCos[BM_elem_index_get(ltri[1]->v)]);
@@ -1139,7 +1131,7 @@ static void emDM_drawMappedFacesMat(DerivedMesh *dm,
glVertex3fv(ltri[1]->v->co);
}
- emdm_pass_attrib_vertex_mat(&attribs, ltri[2], 2);
+ emdm_pass_attrib_vertex_glsl(&attribs, ltri[2], 2);
if (vertexCos) {
glNormal3fv(vertexNos[BM_elem_index_get(ltri[2]->v)]);
glVertex3fv(vertexCos[BM_elem_index_get(ltri[2]->v)]);
@@ -1241,7 +1233,8 @@ static void emDM_getVert(DerivedMesh *dm, int index, MVert *r_vert)
return;
}
- ev = bmdm->em->vert_index[index]; /* should be EDBM_vert_at_index() */
+ BLI_assert((bm->elem_table_dirty & BM_VERT) == 0);
+ ev = bm->vtable[index]; /* should be BM_vert_at_index() */
// ev = BM_vert_at_index(bm, index); /* warning, does list loop, _not_ ideal */
bmvert_to_mvert(bm, ev, r_vert);
@@ -1263,7 +1256,10 @@ static void emDM_getVertCo(DerivedMesh *dm, int index, float r_co[3])
copy_v3_v3(r_co, bmdm->vertexCos[index]);
}
else {
- BMVert *ev = bmdm->em->vert_index[index]; /* should be EDBM_vert_at_index() */
+ BMVert *ev;
+
+ BLI_assert((bm->elem_table_dirty & BM_VERT) == 0);
+ ev = bm->vtable[index]; /* should be BM_vert_at_index() */
// ev = BM_vert_at_index(bm, index); /* warning, does list loop, _not_ ideal */
copy_v3_v3(r_co, ev->co);
}
@@ -1285,7 +1281,10 @@ static void emDM_getVertNo(DerivedMesh *dm, int index, float r_no[3])
copy_v3_v3(r_no, bmdm->vertexNos[index]);
}
else {
- BMVert *ev = bmdm->em->vert_index[index]; /* should be EDBM_vert_at_index() */
+ BMVert *ev;
+
+ BLI_assert((bm->elem_table_dirty & BM_VERT) == 0);
+ ev = bm->vtable[index]; /* should be BM_vert_at_index() */
// ev = BM_vert_at_index(bm, index); /* warning, does list loop, _not_ ideal */
copy_v3_v3(r_no, ev->no);
}
@@ -1306,7 +1305,10 @@ static void emDM_getPolyNo(DerivedMesh *dm, int index, float r_no[3])
copy_v3_v3(r_no, bmdm->polyNos[index]);
}
else {
- BMFace *efa = bmdm->em->face_index[index]; /* should be EDBM_vert_at_index() */
+ BMFace *efa;
+
+ BLI_assert((bm->elem_table_dirty & BM_FACE) == 0);
+ efa = bm->ftable[index]; /* should be BM_vert_at_index() */
// efa = BM_face_at_index(bm, index); /* warning, does list loop, _not_ ideal */
copy_v3_v3(r_no, efa->no);
}
@@ -1324,7 +1326,8 @@ static void emDM_getEdge(DerivedMesh *dm, int index, MEdge *r_edge)
return;
}
- e = bmdm->em->edge_index[index]; /* should be EDBM_edge_at_index() */
+ BLI_assert((bm->elem_table_dirty & BM_EDGE) == 0);
+ e = bm->etable[index]; /* should be BM_edge_at_index() */
// e = BM_edge_at_index(bm, index); /* warning, does list loop, _not_ ideal */
r_edge->flag = BM_edge_flag_to_mflag(e);
@@ -1872,7 +1875,7 @@ static void statvis_calc_thickness(
normal_tri_v3(ray_no, cos[2], cos[1], cos[0]);
#define FACE_RAY_TEST_ANGLE \
- f_hit = BKE_bmbvh_ray_cast(bmtree, ray_co, ray_no, \
+ f_hit = BKE_bmbvh_ray_cast(bmtree, ray_co, ray_no, 0.0f, \
&dist, NULL, NULL); \
if (f_hit && dist < face_dists[index]) { \
float angle_fac = fabsf(dot_v3v3(ltri[0]->f->no, f_hit->no)); \
diff --git a/source/blender/blenkernel/intern/editmesh.c b/source/blender/blenkernel/intern/editmesh.c
index 74cd8834d5d..1fc7d024428 100644
--- a/source/blender/blenkernel/intern/editmesh.c
+++ b/source/blender/blenkernel/intern/editmesh.c
@@ -36,6 +36,7 @@
#include "DNA_mesh_types.h"
#include "BLI_math.h"
+#include "BLI_memarena.h"
#include "BLI_scanfill.h"
#include "BKE_editmesh.h"
@@ -77,10 +78,6 @@ BMEditMesh *BKE_editmesh_copy(BMEditMesh *em)
* used.*/
em_copy->looptris = NULL;
- em_copy->vert_index = NULL;
- em_copy->edge_index = NULL;
- em_copy->face_index = NULL;
-
return em_copy;
}
@@ -123,6 +120,7 @@ static void editmesh_tessface_calc_intern(BMEditMesh *em)
int i = 0;
ScanFillContext sf_ctx;
+ MemArena *sf_arena = NULL;
#if 0
/* note, we could be clever and re-use this array but would need to ensure
@@ -217,7 +215,11 @@ static void editmesh_tessface_calc_intern(BMEditMesh *em)
ScanFillFace *sf_tri;
int totfilltri;
- BLI_scanfill_begin(&sf_ctx);
+ if (UNLIKELY(sf_arena == NULL)) {
+ sf_arena = BLI_memarena_new(BLI_SCANFILL_ARENA_SIZE, __func__);
+ }
+
+ BLI_scanfill_begin_arena(&sf_ctx, sf_arena);
/* scanfill time */
j = 0;
@@ -262,10 +264,15 @@ static void editmesh_tessface_calc_intern(BMEditMesh *em)
l_ptr[2] = l3;
}
- BLI_scanfill_end(&sf_ctx);
+ BLI_scanfill_end_arena(&sf_ctx, sf_arena);
}
}
+ if (sf_arena) {
+ BLI_memarena_free(sf_arena);
+ sf_arena = NULL;
+ }
+
em->tottri = i;
em->looptris = looptris;
@@ -334,10 +341,6 @@ void BKE_editmesh_free(BMEditMesh *em)
if (em->looptris) MEM_freeN(em->looptris);
- if (em->vert_index) MEM_freeN(em->vert_index);
- if (em->edge_index) MEM_freeN(em->edge_index);
- if (em->face_index) MEM_freeN(em->face_index);
-
if (em->bm)
BM_mesh_free(em->bm);
}
diff --git a/source/blender/blenkernel/intern/editmesh_bvh.c b/source/blender/blenkernel/intern/editmesh_bvh.c
index fced3472566..cb65fd80fc4 100644
--- a/source/blender/blenkernel/intern/editmesh_bvh.c
+++ b/source/blender/blenkernel/intern/editmesh_bvh.c
@@ -193,12 +193,17 @@ static void bmbvh_ray_cast_cb(void *userdata, int index, const BVHTreeRay *ray,
const BMLoop **ltri = bmcb_data->looptris[index];
float dist, uv[2];
const float *tri_cos[3];
+ bool isect;
bmbvh_tri_from_face(tri_cos, ltri, bmcb_data->cos_cage);
- if (isect_ray_tri_v3(ray->origin, ray->direction, tri_cos[0], tri_cos[1], tri_cos[2], &dist, uv) &&
- (dist < hit->dist))
- {
+ isect = (ray->radius > 0.0f ?
+ isect_ray_tri_epsilon_v3(ray->origin, ray->direction,
+ tri_cos[0], tri_cos[1], tri_cos[2], &dist, uv, ray->radius) :
+ isect_ray_tri_v3(ray->origin, ray->direction,
+ tri_cos[0], tri_cos[1], tri_cos[2], &dist, uv));
+
+ if (isect && dist < hit->dist) {
hit->dist = dist;
hit->index = index;
@@ -213,14 +218,14 @@ static void bmbvh_ray_cast_cb(void *userdata, int index, const BVHTreeRay *ray,
}
}
-BMFace *BKE_bmbvh_ray_cast(BMBVHTree *bmtree, const float co[3], const float dir[3],
+BMFace *BKE_bmbvh_ray_cast(BMBVHTree *bmtree, const float co[3], const float dir[3], const float radius,
float *r_dist, float r_hitout[3], float r_cagehit[3])
{
BVHTreeRayHit hit;
struct RayCastUserData bmcb_data;
const float dist = r_dist ? *r_dist : FLT_MAX;
- if (bmtree->cos_cage) BLI_assert(!(bmtree->em->bm->elem_index_dirty & BM_VERT));
+ if (bmtree->cos_cage) BLI_assert(!(bmtree->bm->elem_index_dirty & BM_VERT));
hit.dist = dist;
hit.index = -1;
@@ -229,7 +234,7 @@ BMFace *BKE_bmbvh_ray_cast(BMBVHTree *bmtree, const float co[3], const float dir
bmcb_data.looptris = (const BMLoop *(*)[3])bmtree->em->looptris;
bmcb_data.cos_cage = (const float (*)[3])bmtree->cos_cage;
- BLI_bvhtree_ray_cast(bmtree->tree, co, dir, 0.0f, &hit, bmbvh_ray_cast_cb, &bmcb_data);
+ BLI_bvhtree_ray_cast(bmtree->tree, co, dir, radius, &hit, bmbvh_ray_cast_cb, &bmcb_data);
if (hit.index != -1 && hit.dist != dist) {
if (r_hitout) {
if (bmtree->flag & BMBVH_RETURN_ORIG) {
@@ -314,7 +319,7 @@ BMFace *BKE_bmbvh_find_face_segment(BMBVHTree *bmtree, const float co_a[3], cons
const float dist = len_v3v3(co_a, co_b);
float dir[3];
- if (bmtree->cos_cage) BLI_assert(!(bmtree->em->bm->elem_index_dirty & BM_VERT));
+ if (bmtree->cos_cage) BLI_assert(!(bmtree->bm->elem_index_dirty & BM_VERT));
sub_v3_v3v3(dir, co_b, co_a);
@@ -400,7 +405,7 @@ BMVert *BKE_bmbvh_find_vert_closest(BMBVHTree *bmtree, const float co[3], const
struct VertSearchUserData bmcb_data;
const float maxdist_sq = maxdist * maxdist;
- if (bmtree->cos_cage) BLI_assert(!(bmtree->em->bm->elem_index_dirty & BM_VERT));
+ if (bmtree->cos_cage) BLI_assert(!(bmtree->bm->elem_index_dirty & BM_VERT));
hit.dist = maxdist_sq;
hit.index = -1;
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index 0df8684044a..81b0de9fd32 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -67,6 +67,7 @@
#include "BKE_blender.h"
#include "BKE_collision.h"
#include "BKE_constraint.h"
+#include "BKE_curve.h"
#include "BKE_deform.h"
#include "BKE_depsgraph.h"
#include "BKE_displist.h"
@@ -176,10 +177,10 @@ static void precalculate_effector(EffectorCache *eff)
if (eff->pd->forcefield == PFIELD_GUIDE && eff->ob->type==OB_CURVE) {
Curve *cu= eff->ob->data;
if (cu->flag & CU_PATH) {
- if (cu->path==NULL || cu->path->data==NULL)
+ if (eff->ob->curve_cache == NULL || eff->ob->curve_cache->path==NULL || eff->ob->curve_cache->path->data==NULL)
BKE_displist_make_curveTypes(eff->scene, eff->ob, 0);
- if (cu->path && cu->path->data) {
+ if (eff->ob->curve_cache->path && eff->ob->curve_cache->path->data) {
where_on_path(eff->ob, 0.0, eff->guide_loc, eff->guide_dir, NULL, &eff->guide_radius, NULL);
mul_m4_v3(eff->ob->obmat, eff->guide_loc);
mul_mat3_m4_v3(eff->ob->obmat, eff->guide_dir);
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index 791c47cc551..dbdf30ea63d 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -688,21 +688,27 @@ short fcurve_are_keyframes_usable(FCurve *fcu)
return 1;
}
+bool BKE_fcurve_is_protected(FCurve *fcu)
+{
+ return ((fcu->flag & FCURVE_PROTECTED) ||
+ ((fcu->grp) && (fcu->grp->flag & AGRP_PROTECTED)));
+}
+
/* Can keyframes be added to F-Curve?
* Keyframes can only be added if they are already visible
*/
-short fcurve_is_keyframable(FCurve *fcu)
+bool fcurve_is_keyframable(FCurve *fcu)
{
/* F-Curve's keyframes must be "usable" (i.e. visible + have an effect on final result) */
if (fcurve_are_keyframes_usable(fcu) == 0)
- return 0;
+ return false;
/* F-Curve must currently be editable too */
- if ( (fcu->flag & FCURVE_PROTECTED) || ((fcu->grp) && (fcu->grp->flag & AGRP_PROTECTED)) )
- return 0;
+ if (BKE_fcurve_is_protected(fcu))
+ return false;
/* F-Curve is keyframable */
- return 1;
+ return true;
}
/* ***************************** Keyframe Column Tools ********************************* */
@@ -841,14 +847,7 @@ void calchandles_fcurve(FCurve *fcu)
}
}
-/* Use when F-Curve with handles has changed
- * It treats all BezTriples with the following rules:
- * - PHASE 1: do types have to be altered?
- * -> Auto handles: become aligned when selection status is NOT(000 || 111)
- * -> Vector handles: become 'nothing' when (one half selected AND other not)
- * - PHASE 2: recalculate handles
- */
-void testhandles_fcurve(FCurve *fcu, const short use_handle)
+void testhandles_fcurve(FCurve *fcu, const bool use_handle)
{
BezTriple *bezt;
unsigned int a;
@@ -856,45 +855,10 @@ void testhandles_fcurve(FCurve *fcu, const short use_handle)
/* only beztriples have handles (bpoints don't though) */
if (ELEM(NULL, fcu, fcu->bezt))
return;
-
+
/* loop over beztriples */
for (a = 0, bezt = fcu->bezt; a < fcu->totvert; a++, bezt++) {
- short flag = 0;
-
- /* flag is initialized as selection status
- * of beztriple control-points (labelled 0, 1, 2)
- */
- if (bezt->f2 & SELECT) flag |= (1 << 1); // == 2
- if (use_handle == FALSE) {
- if (flag & 2) {
- flag |= (1 << 0) | (1 << 2);
- }
- }
- else {
- if (bezt->f1 & SELECT) flag |= (1 << 0); // == 1
- if (bezt->f3 & SELECT) flag |= (1 << 2); // == 4
- }
-
- /* one or two handles selected only */
- if (ELEM(flag, 0, 7) == 0) {
- /* auto handles become aligned */
- if (ELEM(bezt->h1, HD_AUTO, HD_AUTO_ANIM))
- bezt->h1 = HD_ALIGN;
- if (ELEM(bezt->h2, HD_AUTO, HD_AUTO_ANIM))
- bezt->h2 = HD_ALIGN;
-
- /* vector handles become 'free' when only one half selected */
- if (bezt->h1 == HD_VECT) {
- /* only left half (1 or 2 or 1+2) */
- if (flag < 4)
- bezt->h1 = 0;
- }
- if (bezt->h2 == HD_VECT) {
- /* only right half (4 or 2+4) */
- if (flag > 3)
- bezt->h2 = 0;
- }
- }
+ BKE_nurb_bezt_handle_test(bezt, use_handle);
}
/* recalculate handles */
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c
index 7c23438f93d..f489adc7445 100644
--- a/source/blender/blenkernel/intern/font.c
+++ b/source/blender/blenkernel/intern/font.c
@@ -41,6 +41,7 @@
#include "BLI_math.h"
#include "BLI_blenlib.h"
+#include "BLI_threads.h"
#include "BLI_vfontdata.h"
#include "BLI_utildefines.h"
@@ -59,6 +60,7 @@
#include "BKE_curve.h"
#include "BKE_displist.h"
+static ThreadMutex vfont_mutex = BLI_MUTEX_INITIALIZER;
/* The vfont code */
void BKE_vfont_free_data(struct VFont *vfont)
@@ -138,6 +140,18 @@ static VFontData *vfont_get_data(Main *bmain, VFont *vfont)
if (!vfont->data) {
PackedFile *pf;
+ BLI_mutex_lock(&vfont_mutex);
+
+ if (vfont->data) {
+ /* Check data again, since it might have been already
+ * initialized from other thread (previous check is
+ * not accurate or threading, just prevents unneeded
+ * lock if all the data is here for sure).
+ */
+ BLI_mutex_unlock(&vfont_mutex);
+ return vfont->data;
+ }
+
if (BKE_vfont_is_builtin(vfont)) {
pf = get_builtin_packedfile();
}
@@ -175,8 +189,10 @@ static VFontData *vfont_get_data(Main *bmain, VFont *vfont)
freePackedFile(pf);
}
}
+
+ BLI_mutex_unlock(&vfont_mutex);
}
-
+
return vfont->data;
}
@@ -299,25 +315,13 @@ static void build_underline(Curve *cu, float x1, float y1, float x2, float y2, i
MEM_freeN(nu2);
return;
}
- nu2->bp = bp;
- nu2->bp[0].vec[0] = x1;
- nu2->bp[0].vec[1] = y1;
- nu2->bp[0].vec[2] = 0;
- nu2->bp[0].vec[3] = 1.0f;
- nu2->bp[1].vec[0] = x2;
- nu2->bp[1].vec[1] = y1;
- nu2->bp[1].vec[2] = 0;
- nu2->bp[1].vec[3] = 1.0f;
- nu2->bp[2].vec[0] = x2;
- nu2->bp[2].vec[1] = y2;
- nu2->bp[2].vec[2] = 0;
- nu2->bp[2].vec[3] = 1.0f;
- nu2->bp[3].vec[0] = x1;
- nu2->bp[3].vec[1] = y2;
- nu2->bp[3].vec[2] = 0;
- nu2->bp[3].vec[3] = 1.0f;
-
+ copy_v4_fl4(bp[0].vec, x1, y1, 0.0f, 1.0f);
+ copy_v4_fl4(bp[1].vec, x2, y1, 0.0f, 1.0f);
+ copy_v4_fl4(bp[2].vec, x2, y2, 0.0f, 1.0f);
+ copy_v4_fl4(bp[3].vec, x1, y2, 0.0f, 1.0f);
+
+ nu2->bp = bp;
BLI_addtail(&(cu->nurb), nu2);
}
@@ -819,8 +823,10 @@ makebreak:
cucu->flag |= (CU_PATH + CU_FOLLOW);
- if (cucu->path == NULL) BKE_displist_make_curveTypes(scene, cu->textoncurve, 0);
- if (cucu->path) {
+ if (cu->textoncurve->curve_cache == NULL || cu->textoncurve->curve_cache->path == NULL) {
+ BKE_displist_make_curveTypes(scene, cu->textoncurve, 0);
+ }
+ if (cu->textoncurve->curve_cache->path) {
float distfac, imat[4][4], imat3[3][3], cmat[3][3];
float minx, maxx, miny, maxy;
float timeofs, sizefac;
@@ -845,7 +851,7 @@ makebreak:
/* we put the x-coordinaat exact at the curve, the y is rotated */
/* length correction */
- distfac = sizefac * cucu->path->totdist / (maxx - minx);
+ distfac = sizefac * cu->textoncurve->curve_cache->path->totdist / (maxx - minx);
timeofs = 0.0f;
if (distfac > 1.0f) {
diff --git a/source/blender/blenkernel/intern/freestyle.c b/source/blender/blenkernel/intern/freestyle.c
index 32fe4ac4ba6..d87c93310c8 100644
--- a/source/blender/blenkernel/intern/freestyle.c
+++ b/source/blender/blenkernel/intern/freestyle.c
@@ -52,7 +52,7 @@ void BKE_freestyle_config_init(FreestyleConfig *config)
config->modules.first = config->modules.last = NULL;
config->flags = 0;
- config->sphere_radius = 1.0f;
+ config->sphere_radius = 0.1f;
config->dkr_epsilon = 0.0f;
config->crease_angle = DEG2RADF(134.43f);
@@ -107,7 +107,8 @@ void BKE_freestyle_config_copy(FreestyleConfig *new_config, FreestyleConfig *con
static void copy_lineset(FreestyleLineSet *new_lineset, FreestyleLineSet *lineset)
{
new_lineset->linestyle = lineset->linestyle;
- new_lineset->linestyle->id.us++;
+ if (new_lineset->linestyle)
+ new_lineset->linestyle->id.us++;
new_lineset->flags = lineset->flags;
new_lineset->selection = lineset->selection;
new_lineset->qi = lineset->qi;
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index 31dd79e7623..4d17bd286b4 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -42,6 +42,7 @@
#include "BLF_translation.h"
#include "DNA_gpencil_types.h"
+#include "DNA_userdef_types.h"
#include "BKE_global.h"
#include "BKE_gpencil.h"
@@ -125,8 +126,8 @@ bGPDframe *gpencil_frame_addnew(bGPDlayer *gpl, int cframe)
bGPDframe *gpf, *gf;
short state = 0;
- /* error checking */
- if ((gpl == NULL) || (cframe <= 0))
+ /* error checking (neg frame only if they are not allowed in Blender!) */
+ if ((gpl == NULL) || ((U.flag & USER_NONEGFRAMES) && (cframe <= 0)))
return NULL;
/* allocate memory for this frame */
@@ -349,7 +350,8 @@ bGPDframe *gpencil_layer_getframe(bGPDlayer *gpl, int cframe, short addnew)
/* error checking */
if (gpl == NULL) return NULL;
- if (cframe <= 0) cframe = 1;
+ /* No reason to forbid negative frames when they are allowed in Blender! */
+ if ((U.flag & USER_NONEGFRAMES) && cframe <= 0) cframe = 1;
/* check if there is already an active frame */
if (gpl->actframe) {
diff --git a/source/blender/blenkernel/intern/group.c b/source/blender/blenkernel/intern/group.c
index ad0aed4691a..a5cbf064bc2 100644
--- a/source/blender/blenkernel/intern/group.c
+++ b/source/blender/blenkernel/intern/group.c
@@ -65,9 +65,7 @@ void BKE_group_free(Group *group)
/* don't free group itself */
GroupObject *go;
- while (group->gobject.first) {
- go = group->gobject.first;
- BLI_remlink(&group->gobject, go);
+ while ((go = BLI_pophead(&group->gobject))) {
free_group_object(go);
}
}
diff --git a/source/blender/blenkernel/intern/idprop.c b/source/blender/blenkernel/intern/idprop.c
index f20506af967..594c918b4c2 100644
--- a/source/blender/blenkernel/intern/idprop.c
+++ b/source/blender/blenkernel/intern/idprop.c
@@ -56,7 +56,13 @@ static char idp_size_table[] = {
sizeof(double)
};
-/* ------------Property Array Type ----------- */
+
+/* -------------------------------------------------------------------- */
+/* Array Functions */
+
+/** \name IDP Array API
+ * \{ */
+
#define GETPROP(prop, i) (((IDProperty *)(prop)->data.pointer) + (i))
/* --------- property array type -------------*/
@@ -78,9 +84,12 @@ IDProperty *IDP_NewIDPArray(const char *name)
IDProperty *IDP_CopyIDPArray(IDProperty *array)
{
/* don't use MEM_dupallocN because this may be part of an array */
- IDProperty *narray = MEM_mallocN(sizeof(IDProperty), "IDP_CopyIDPArray"), *tmp;
+ IDProperty *narray, *tmp;
int i;
+ BLI_assert(array->type == IDP_IDPARRAY);
+
+ narray = MEM_mallocN(sizeof(IDProperty), __func__);
*narray = *array;
narray->data.pointer = MEM_dupallocN(array->data.pointer);
@@ -103,6 +112,8 @@ void IDP_FreeIDPArray(IDProperty *prop)
{
int i;
+ BLI_assert(prop->type == IDP_IDPARRAY);
+
for (i = 0; i < prop->len; i++)
IDP_FreeProperty(GETPROP(prop, i));
@@ -113,7 +124,11 @@ void IDP_FreeIDPArray(IDProperty *prop)
/*shallow copies item*/
void IDP_SetIndexArray(IDProperty *prop, int index, IDProperty *item)
{
- IDProperty *old = GETPROP(prop, index);
+ IDProperty *old;
+
+ BLI_assert(prop->type == IDP_IDPARRAY);
+
+ old = GETPROP(prop, index);
if (index >= prop->len || index < 0) return;
if (item != old) IDP_FreeProperty(old);
@@ -122,22 +137,27 @@ void IDP_SetIndexArray(IDProperty *prop, int index, IDProperty *item)
IDProperty *IDP_GetIndexArray(IDProperty *prop, int index)
{
+ BLI_assert(prop->type == IDP_IDPARRAY);
+
return GETPROP(prop, index);
}
void IDP_AppendArray(IDProperty *prop, IDProperty *item)
{
+ BLI_assert(prop->type == IDP_IDPARRAY);
+
IDP_ResizeIDPArray(prop, prop->len + 1);
IDP_SetIndexArray(prop, prop->len - 1, item);
}
void IDP_ResizeIDPArray(IDProperty *prop, int newlen)
{
- void *newarr;
- int newsize = newlen;
+ int newsize;
- /*first check if the array buffer size has room*/
- /*if newlen is 200 chars less then totallen, reallocate anyway*/
+ BLI_assert(prop->type == IDP_IDPARRAY);
+
+ /* first check if the array buffer size has room */
+ /* if newlen is 200 items less then totallen, reallocate anyway */
if (newlen <= prop->totallen) {
if (newlen < prop->len && prop->totallen - newlen < 200) {
int i;
@@ -154,6 +174,15 @@ void IDP_ResizeIDPArray(IDProperty *prop, int newlen)
}
}
+ /* free trailing items */
+ if (newlen < prop->len) {
+ /* newlen is smaller */
+ int i;
+ for (i = newlen; i < prop->len; i++) {
+ IDP_FreeProperty(GETPROP(prop, i));
+ }
+ }
+
/* - Note: This code comes from python, here's the corresponding comment. - */
/* This over-allocates proportional to the list size, making room
* for additional growth. The over-allocation is mild, but is
@@ -162,25 +191,9 @@ void IDP_ResizeIDPArray(IDProperty *prop, int newlen)
* system realloc().
* The growth pattern is: 0, 4, 8, 16, 25, 35, 46, 58, 72, 88, ...
*/
+ newsize = newlen;
newsize = (newsize >> 3) + (newsize < 9 ? 3 : 6) + newsize;
-
- newarr = MEM_callocN(sizeof(IDProperty) * newsize, "idproperty array resized");
- if (newlen >= prop->len) {
- /* newlen is bigger */
- memcpy(newarr, prop->data.pointer, prop->len * sizeof(IDProperty));
- }
- else {
- int i;
- /* newlen is smaller */
- for (i = newlen; i < prop->len; i++) {
- IDP_FreeProperty(GETPROP(prop, i));
- }
- memcpy(newarr, prop->data.pointer, newlen * sizeof(IDProperty));
- }
-
- if (prop->data.pointer)
- MEM_freeN(prop->data.pointer);
- prop->data.pointer = newarr;
+ prop->data.pointer = MEM_recallocN(prop->data.pointer, sizeof(IDProperty) * newsize);
prop->len = newlen;
prop->totallen = newsize;
}
@@ -217,11 +230,11 @@ static void idp_resize_group_array(IDProperty *prop, int newlen, void *newarr)
/*this function works for strings too!*/
void IDP_ResizeArray(IDProperty *prop, int newlen)
{
- void *newarr;
- int newsize = newlen;
+ int newsize;
+ const bool is_grow = newlen >= prop->len;
- /*first check if the array buffer size has room*/
- /*if newlen is 200 chars less then totallen, reallocate anyway*/
+ /* first check if the array buffer size has room */
+ /* if newlen is 200 chars less then totallen, reallocate anyway */
if (newlen <= prop->totallen && prop->totallen - newlen < 200) {
idp_resize_group_array(prop, newlen, prop->data.pointer);
prop->len = newlen;
@@ -236,22 +249,17 @@ void IDP_ResizeArray(IDProperty *prop, int newlen)
* system realloc().
* The growth pattern is: 0, 4, 8, 16, 25, 35, 46, 58, 72, 88, ...
*/
- newsize = (newsize >> 3) + (newsize < 9 ? 3 : 6) + newsize;
+ newsize = newlen;
+ newsize = (newsize >> 3) + (newsize < 9 ? 3 : 6) + newsize;\
- newarr = MEM_callocN(idp_size_table[(int)prop->subtype] * newsize, "idproperty array resized");
- if (newlen >= prop->len) {
- /* newlen is bigger */
- memcpy(newarr, prop->data.pointer, prop->len * idp_size_table[(int)prop->subtype]);
- idp_resize_group_array(prop, newlen, newarr);
- }
- else {
- /* newlen is smaller */
- idp_resize_group_array(prop, newlen, newarr);
- memcpy(newarr, prop->data.pointer, newlen * idp_size_table[(int)prop->subtype]);
- }
+ if (is_grow == false)
+ idp_resize_group_array(prop, newlen, prop->data.pointer);
+
+ prop->data.pointer = MEM_recallocN(prop->data.pointer, idp_size_table[(int)prop->subtype] * newsize);
+
+ if (is_grow == true)
+ idp_resize_group_array(prop, newlen, prop->data.pointer);
- MEM_freeN(prop->data.pointer);
- prop->data.pointer = newarr;
prop->len = newlen;
prop->totallen = newsize;
}
@@ -299,16 +307,31 @@ static IDProperty *IDP_CopyArray(IDProperty *prop)
return newp;
}
+/** \} */
+
+
+/* -------------------------------------------------------------------- */
+/* String Functions */
-/* ---------- String Type ------------ */
+/** \name IDProperty String API
+ * \{ */
+
+/**
+ *
+ * \param st The string to assign.
+ * \param name The property name.
+ * \param maxlen The size of the new string (including the \0 terminator)
+ * \return
+ */
IDProperty *IDP_NewString(const char *st, const char *name, int maxlen)
{
IDProperty *prop = MEM_callocN(sizeof(IDProperty), "IDProperty string");
if (st == NULL) {
- prop->data.pointer = MEM_callocN(DEFAULT_ALLOC_FOR_NULL_STRINGS, "id property string 1");
+ prop->data.pointer = MEM_mallocN(DEFAULT_ALLOC_FOR_NULL_STRINGS, "id property string 1");
+ *IDP_String(prop) = '\0';
prop->totallen = DEFAULT_ALLOC_FOR_NULL_STRINGS;
- prop->len = 1; /*NULL string, has len of 1 to account for null byte.*/
+ prop->len = 1; /* NULL string, has len of 1 to account for null byte. */
}
else {
int stlen = strlen(st);
@@ -318,7 +341,7 @@ IDProperty *IDP_NewString(const char *st, const char *name, int maxlen)
stlen++; /* null terminator '\0' */
- prop->data.pointer = MEM_callocN(stlen, "id property string 2");
+ prop->data.pointer = MEM_mallocN(stlen, "id property string 2");
prop->len = prop->totallen = stlen;
BLI_strncpy(prop->data.pointer, st, stlen);
}
@@ -331,9 +354,13 @@ IDProperty *IDP_NewString(const char *st, const char *name, int maxlen)
static IDProperty *IDP_CopyString(IDProperty *prop)
{
- IDProperty *newp = idp_generic_copy(prop);
+ IDProperty *newp;
+
+ BLI_assert(prop->type == IDP_STRING);
+ newp = idp_generic_copy(prop);
- if (prop->data.pointer) newp->data.pointer = MEM_dupallocN(prop->data.pointer);
+ if (prop->data.pointer)
+ newp->data.pointer = MEM_dupallocN(prop->data.pointer);
newp->len = prop->len;
newp->subtype = prop->subtype;
newp->totallen = prop->totallen;
@@ -344,8 +371,10 @@ static IDProperty *IDP_CopyString(IDProperty *prop)
void IDP_AssignString(IDProperty *prop, const char *st, int maxlen)
{
- int stlen = strlen(st);
+ int stlen;
+ BLI_assert(prop->type == IDP_STRING);
+ stlen = strlen(st);
if (maxlen > 0 && maxlen < stlen)
stlen = maxlen;
@@ -354,7 +383,7 @@ void IDP_AssignString(IDProperty *prop, const char *st, int maxlen)
memcpy(prop->data.pointer, st, stlen);
}
else {
- stlen++; /* make room for null byte */
+ stlen++;
IDP_ResizeArray(prop, stlen);
BLI_strncpy(prop->data.pointer, st, stlen);
}
@@ -364,6 +393,8 @@ void IDP_ConcatStringC(IDProperty *prop, const char *st)
{
int newlen;
+ BLI_assert(prop->type == IDP_STRING);
+
newlen = prop->len + strlen(st);
/* we have to remember that prop->len includes the null byte for strings.
* so there's no need to add +1 to the resize function.*/
@@ -375,6 +406,8 @@ void IDP_ConcatString(IDProperty *str1, IDProperty *append)
{
int newlen;
+ BLI_assert(append->type == IDP_STRING);
+
/* since ->len for strings includes the NULL byte, we have to subtract one or
* we'll get an extra null byte after each concatenation operation.*/
newlen = str1->len + append->len - 1;
@@ -384,13 +417,19 @@ void IDP_ConcatString(IDProperty *str1, IDProperty *append)
void IDP_FreeString(IDProperty *prop)
{
+ BLI_assert(prop->type == IDP_STRING);
+
if (prop->data.pointer)
MEM_freeN(prop->data.pointer);
}
+/** \} */
-/*-------- ID Type, not in use yet -------*/
+/* -------------------------------------------------------------------- */
+/* ID Type (not in use yet) */
+/** \name IDProperty ID API (unused)
+ * \{ */
void IDP_LinkID(IDProperty *prop, ID *id)
{
if (prop->data.pointer) ((ID *)prop->data.pointer)->us--;
@@ -402,15 +441,26 @@ void IDP_UnlinkID(IDProperty *prop)
{
((ID *)prop->data.pointer)->us--;
}
+/** \} */
-/*-------- Group Functions -------*/
-/*checks if a property with the same name as prop exists, and if so replaces it.*/
+/* -------------------------------------------------------------------- */
+/* Group Functions */
+
+/** \name IDProperty Group API
+ * \{ */
+
+/**
+ * Checks if a property with the same name as prop exists, and if so replaces it.
+ */
static IDProperty *IDP_CopyGroup(IDProperty *prop)
{
- IDProperty *newp = idp_generic_copy(prop), *link;
- newp->len = prop->len;
+ IDProperty *newp, *link;
+ BLI_assert(prop->type == IDP_GROUP);
+ newp = idp_generic_copy(prop);
+ newp->len = prop->len;
+
for (link = prop->data.group.first; link; link = link->next) {
BLI_addtail(&newp->data.group, IDP_CopyProperty(link));
}
@@ -423,6 +473,10 @@ static IDProperty *IDP_CopyGroup(IDProperty *prop)
void IDP_SyncGroupValues(IDProperty *dest, IDProperty *src)
{
IDProperty *other, *prop;
+
+ BLI_assert(dest->type == IDP_GROUP);
+ BLI_assert(src->type == IDP_GROUP);
+
for (prop = src->data.group.first; prop; prop = prop->next) {
other = BLI_findstring(&dest->data.group, prop->name, offsetof(IDProperty, name));
if (other && prop->type == other->type) {
@@ -458,6 +512,10 @@ void IDP_SyncGroupValues(IDProperty *dest, IDProperty *src)
void IDP_ReplaceGroupInGroup(IDProperty *dest, IDProperty *src)
{
IDProperty *loop, *prop;
+
+ BLI_assert(dest->type == IDP_GROUP);
+ BLI_assert(src->type == IDP_GROUP);
+
for (prop = src->data.group.first; prop; prop = prop->next) {
for (loop = dest->data.group.first; loop; loop = loop->next) {
if (STREQ(loop->name, prop->name)) {
@@ -488,6 +546,9 @@ void IDP_ReplaceGroupInGroup(IDProperty *dest, IDProperty *src)
void IDP_ReplaceInGroup(IDProperty *group, IDProperty *prop)
{
IDProperty *loop;
+
+ BLI_assert(group->type == IDP_GROUP);
+
if ((loop = IDP_GetPropertyFromGroup(group, prop->name))) {
BLI_insertlinkafter(&group->data.group, loop, prop);
@@ -501,13 +562,16 @@ void IDP_ReplaceInGroup(IDProperty *group, IDProperty *prop)
}
}
-/*
+/**
* If a property is missing in \a dest, add it.
*/
void IDP_MergeGroup(IDProperty *dest, IDProperty *src, const int do_overwrite)
{
IDProperty *prop;
+ BLI_assert(dest->type == IDP_GROUP);
+ BLI_assert(src->type == IDP_GROUP);
+
if (do_overwrite) {
for (prop = src->data.group.first; prop; prop = prop->next) {
IDProperty *copy = IDP_CopyProperty(prop);
@@ -542,6 +606,8 @@ void IDP_MergeGroup(IDProperty *dest, IDProperty *src, const int do_overwrite)
*/
int IDP_AddToGroup(IDProperty *group, IDProperty *prop)
{
+ BLI_assert(group->type == IDP_GROUP);
+
if (IDP_GetPropertyFromGroup(group, prop->name) == NULL) {
group->len++;
BLI_addtail(&group->data.group, prop);
@@ -557,6 +623,8 @@ int IDP_AddToGroup(IDProperty *group, IDProperty *prop)
*/
int IDP_InsertToGroup(IDProperty *group, IDProperty *previous, IDProperty *pnew)
{
+ BLI_assert(group->type == IDP_GROUP);
+
if (IDP_GetPropertyFromGroup(group, pnew->name) == NULL) {
group->len++;
BLI_insertlinkafter(&group->data.group, previous, pnew);
@@ -573,14 +641,28 @@ int IDP_InsertToGroup(IDProperty *group, IDProperty *previous, IDProperty *pnew)
* IDP_FreeProperty(prop); //free all subdata
* MEM_freeN(prop); //free property struct itself
*/
-void IDP_RemFromGroup(IDProperty *group, IDProperty *prop)
+void IDP_RemoveFromGroup(IDProperty *group, IDProperty *prop)
{
+ BLI_assert(group->type == IDP_GROUP);
+
group->len--;
BLI_remlink(&group->data.group, prop);
}
+/**
+ * Removes the property from the group and frees it.
+ */
+void IDP_FreeFromGroup(IDProperty *group, IDProperty *prop)
+{
+ IDP_RemoveFromGroup(group, prop);
+ IDP_FreeProperty(prop);
+ MEM_freeN(prop);
+}
+
IDProperty *IDP_GetPropertyFromGroup(IDProperty *prop, const char *name)
{
+ BLI_assert(prop->type == IDP_GROUP);
+
return (IDProperty *)BLI_findstring(&prop->data.group, name, offsetof(IDProperty, name));
}
/** same as above but ensure type match */
@@ -603,7 +685,10 @@ typedef struct IDPIter {
*/
void *IDP_GetGroupIterator(IDProperty *prop)
{
- IDPIter *iter = MEM_callocN(sizeof(IDPIter), "IDPIter");
+ IDPIter *iter;
+
+ BLI_assert(prop->type == IDP_GROUP);
+ iter = MEM_mallocN(sizeof(IDPIter), "IDPIter");
iter->next = prop->data.group.first;
iter->parent = prop;
return (void *) iter;
@@ -644,14 +729,21 @@ void IDP_FreeIterBeforeEnd(void *vself)
static void IDP_FreeGroup(IDProperty *prop)
{
IDProperty *loop;
+
+ BLI_assert(prop->type == IDP_GROUP);
for (loop = prop->data.group.first; loop; loop = loop->next) {
IDP_FreeProperty(loop);
}
BLI_freelistN(&prop->data.group);
}
+/** \} */
-/*-------- Main Functions --------*/
+/* -------------------------------------------------------------------- */
+/* Main Functions */
+
+/** \name IDProperty Main API
+ * \{ */
IDProperty *IDP_CopyProperty(IDProperty *prop)
{
switch (prop->type) {
@@ -822,7 +914,8 @@ IDProperty *IDP_New(const int type, const IDPropertyTemplate *val, const char *n
if (val->string.subtype == IDP_STRING_SUB_BYTE) {
/* note, intentionally not null terminated */
if (st == NULL) {
- prop->data.pointer = MEM_callocN(DEFAULT_ALLOC_FOR_NULL_STRINGS, "id property string 1");
+ prop->data.pointer = MEM_mallocN(DEFAULT_ALLOC_FOR_NULL_STRINGS, "id property string 1");
+ *IDP_String(prop) = '\0';
prop->totallen = DEFAULT_ALLOC_FOR_NULL_STRINGS;
prop->len = 0;
}
@@ -835,7 +928,8 @@ IDProperty *IDP_New(const int type, const IDPropertyTemplate *val, const char *n
}
else {
if (st == NULL) {
- prop->data.pointer = MEM_callocN(DEFAULT_ALLOC_FOR_NULL_STRINGS, "id property string 1");
+ prop->data.pointer = MEM_mallocN(DEFAULT_ALLOC_FOR_NULL_STRINGS, "id property string 1");
+ *IDP_String(prop) = '\0';
prop->totallen = DEFAULT_ALLOC_FOR_NULL_STRINGS;
prop->len = 1; /*NULL string, has len of 1 to account for null byte.*/
}
@@ -911,3 +1005,5 @@ void IDP_UnlinkProperty(IDProperty *prop)
break;
}
}
+
+/** \} */
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 86382c64ed3..01b41eb22cd 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -195,9 +195,7 @@ static void image_free_buffers(Image *ima)
{
ImBuf *ibuf;
- while ((ibuf = ima->ibufs.first)) {
- BLI_remlink(&ima->ibufs, ibuf);
-
+ while ((ibuf = BLI_pophead(&ima->ibufs))) {
if (ibuf->userdata) {
MEM_freeN(ibuf->userdata);
ibuf->userdata = NULL;
@@ -524,8 +522,7 @@ void BKE_image_merge(Image *dest, Image *source)
/* sanity check */
if (dest && source && dest != source) {
- while ((ibuf = source->ibufs.first)) {
- BLI_remlink(&source->ibufs, ibuf);
+ while ((ibuf = BLI_pophead(&source->ibufs))) {
image_assign_ibuf(dest, ibuf, IMA_INDEX_PASS(ibuf->index), IMA_INDEX_FRAME(ibuf->index));
}
@@ -1253,6 +1250,12 @@ static int do_add_image_extension(char *string, const char imtype, const ImageFo
}
}
#endif
+#ifdef WITH_OPENIMAGEIO
+ else if (imtype == R_IMF_IMTYPE_PSD) {
+ if (!BLI_testextensie(string, ".psd"))
+ extension = ".psd";
+ }
+#endif
#ifdef WITH_OPENEXR
else if (ELEM(imtype, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_MULTILAYER)) {
if (!BLI_testextensie(string, ".exr"))
@@ -1329,7 +1332,7 @@ int BKE_add_image_extension_from_type(char *string, const char imtype)
void BKE_imformat_defaults(ImageFormatData *im_format)
{
memset(im_format, 0, sizeof(*im_format));
- im_format->planes = R_IMF_PLANES_RGB;
+ im_format->planes = R_IMF_PLANES_RGBA;
im_format->imtype = R_IMF_IMTYPE_PNG;
im_format->depth = R_IMF_CHAN_DEPTH_8;
im_format->quality = 90;
@@ -2152,9 +2155,7 @@ void BKE_image_walk_all_users(const Main *mainp, void *customdata,
/* texture users */
for (tex = mainp->tex.first; tex; tex = tex->id.next) {
if (tex->type == TEX_IMAGE && tex->ima) {
- if (ELEM(tex->ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) {
- callback(tex->ima, &tex->iuser, customdata);
- }
+ callback(tex->ima, &tex->iuser, customdata);
}
}
@@ -2196,7 +2197,7 @@ static void image_tag_frame_recalc(Image *ima, ImageUser *iuser, void *customdat
{
Image *changed_image = customdata;
- if (ima == changed_image) {
+ if (ima == changed_image && ELEM(ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) {
iuser->flag |= IMA_NEED_FRAME_RECALC;
}
}
diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c
index d2d2cb1c2d0..7b73dee73fc 100644
--- a/source/blender/blenkernel/intern/key.c
+++ b/source/blender/blenkernel/intern/key.c
@@ -85,29 +85,23 @@ void BKE_key_free(Key *key)
KeyBlock *kb;
BKE_free_animdata((ID *)key);
-
- while ( (kb = key->block.first) ) {
-
- if (kb->data) MEM_freeN(kb->data);
-
- BLI_remlink(&key->block, kb);
+
+ while ((kb = BLI_pophead(&key->block))) {
+ if (kb->data)
+ MEM_freeN(kb->data);
MEM_freeN(kb);
}
-
}
void BKE_key_free_nolib(Key *key)
{
KeyBlock *kb;
-
- while ( (kb = key->block.first) ) {
-
- if (kb->data) MEM_freeN(kb->data);
-
- BLI_remlink(&key->block, kb);
+
+ while ((kb = BLI_pophead(&key->block))) {
+ if (kb->data)
+ MEM_freeN(kb->data);
MEM_freeN(kb);
}
-
}
Key *BKE_key_add(ID *id) /* common function */
@@ -734,12 +728,13 @@ static void cp_cu_key(Curve *cu, Key *key, KeyBlock *actkb, KeyBlock *kb, const
}
}
-void BKE_key_evaluate_relative(const int start, int end, const int tot, char *basispoin, Key *key, KeyBlock *actkb, const int mode)
+void BKE_key_evaluate_relative(const int start, int end, const int tot, char *basispoin, Key *key, KeyBlock *actkb,
+ float **per_keyblock_weights, const int mode)
{
KeyBlock *kb;
int *ofsp, ofs[3], elemsize, b;
char *cp, *poin, *reffrom, *from, elemstr[8];
- int poinsize;
+ int poinsize, keyblock_index;
/* currently always 0, in future key_pointer_size may assign */
ofs[1] = 0;
@@ -763,14 +758,14 @@ void BKE_key_evaluate_relative(const int start, int end, const int tot, char *ba
/* step 2: do it */
- for (kb = key->block.first; kb; kb = kb->next) {
+ for (kb = key->block.first, keyblock_index = 0; kb; kb = kb->next, keyblock_index++) {
if (kb != key->refkey) {
float icuval = kb->curval;
/* only with value, and no difference allowed */
if (!(kb->flag & KEYBLOCK_MUTE) && icuval != 0.0f && kb->totelem == tot) {
KeyBlock *refb;
- float weight, *weights = kb->weights;
+ float weight, *weights = per_keyblock_weights ? per_keyblock_weights[keyblock_index] : NULL;
char *freefrom = NULL, *freereffrom = NULL;
/* reference now can be any block */
@@ -1058,7 +1053,7 @@ static void do_key(const int start, int end, const int tot, char *poin, Key *key
if (freek4) MEM_freeN(freek4);
}
-static float *get_weights_array(Object *ob, char *vgroup)
+static float *get_weights_array(Object *ob, char *vgroup, WeightsArrayCache *cache)
{
MDeformVert *dvert = NULL;
BMEditMesh *em = NULL;
@@ -1091,7 +1086,21 @@ static float *get_weights_array(Object *ob, char *vgroup)
if (defgrp_index != -1) {
float *weights;
int i;
-
+
+ if (cache) {
+ if (cache->defgroup_weights == NULL) {
+ int num_defgroup = BLI_countlist(&ob->defbase);
+ cache->defgroup_weights =
+ MEM_callocN(sizeof(*cache->defgroup_weights) * num_defgroup,
+ "cached defgroup weights");
+ cache->num_defgroup_weights = num_defgroup;
+ }
+
+ if (cache->defgroup_weights[defgrp_index]) {
+ return cache->defgroup_weights[defgrp_index];
+ }
+ }
+
weights = MEM_mallocN(totvert * sizeof(float), "weights");
if (em) {
@@ -1107,11 +1116,61 @@ static float *get_weights_array(Object *ob, char *vgroup)
}
}
+ if (cache) {
+ cache->defgroup_weights[defgrp_index] = weights;
+ }
+
return weights;
}
return NULL;
}
+float **BKE_keyblock_get_per_block_weights(Object *ob, Key *key, WeightsArrayCache *cache)
+{
+ KeyBlock *keyblock;
+ float **per_keyblock_weights;
+ int keyblock_index;
+
+ per_keyblock_weights =
+ MEM_mallocN(sizeof(*per_keyblock_weights) * key->totkey,
+ "per keyblock weights");
+
+ for (keyblock = key->block.first, keyblock_index = 0;
+ keyblock;
+ keyblock = keyblock->next, keyblock_index++)
+ {
+ per_keyblock_weights[keyblock_index] = get_weights_array(ob, keyblock->vgroup, cache);
+ }
+
+ return per_keyblock_weights;
+}
+
+void BKE_keyblock_free_per_block_weights(Key *key, float **per_keyblock_weights, WeightsArrayCache *cache)
+{
+ int a;
+
+ if (cache) {
+ if (cache->num_defgroup_weights) {
+ for (a = 0; a < cache->num_defgroup_weights; a++) {
+ if (cache->defgroup_weights[a]) {
+ MEM_freeN(cache->defgroup_weights[a]);
+ }
+ }
+ MEM_freeN(cache->defgroup_weights);
+ }
+ cache->defgroup_weights = NULL;
+ }
+ else {
+ for (a = 0; a < key->totkey; a++) {
+ if (per_keyblock_weights[a]) {
+ MEM_freeN(per_keyblock_weights[a]);
+ }
+ }
+ }
+
+ MEM_freeN(per_keyblock_weights);
+}
+
static void do_mesh_key(Scene *scene, Object *ob, Key *key, char *out, const int tot)
{
KeyBlock *k[4], *actkb = BKE_keyblock_from_object(ob);
@@ -1144,17 +1203,11 @@ static void do_mesh_key(Scene *scene, Object *ob, Key *key, char *out, const int
}
else {
if (key->type == KEY_RELATIVE) {
- KeyBlock *kb;
- for (kb = key->block.first; kb; kb = kb->next) {
- kb->weights = get_weights_array(ob, kb->vgroup);
- }
-
- BKE_key_evaluate_relative(0, tot, tot, (char *)out, key, actkb, KEY_MODE_DUMMY);
-
- for (kb = key->block.first; kb; kb = kb->next) {
- if (kb->weights) MEM_freeN(kb->weights);
- kb->weights = NULL;
- }
+ WeightsArrayCache cache = {0, NULL};
+ float **per_keyblock_weights;
+ per_keyblock_weights = BKE_keyblock_get_per_block_weights(ob, key, &cache);
+ BKE_key_evaluate_relative(0, tot, tot, (char *)out, key, actkb, per_keyblock_weights, KEY_MODE_DUMMY);
+ BKE_keyblock_free_per_block_weights(key, per_keyblock_weights, &cache);
}
else {
const float ctime_scaled = key->ctime / 100.0f;
@@ -1197,11 +1250,11 @@ static void do_rel_cu_key(Curve *cu, Key *key, KeyBlock *actkb, char *out, const
for (a = 0, nu = cu->nurb.first; nu; nu = nu->next, a += step) {
if (nu->bp) {
step = nu->pntsu * nu->pntsv;
- BKE_key_evaluate_relative(a, a + step, tot, out, key, actkb, KEY_MODE_BPOINT);
+ BKE_key_evaluate_relative(a, a + step, tot, out, key, actkb, NULL, KEY_MODE_BPOINT);
}
else if (nu->bezt) {
step = 3 * nu->pntsu;
- BKE_key_evaluate_relative(a, a + step, tot, out, key, actkb, KEY_MODE_BEZTRIPLE);
+ BKE_key_evaluate_relative(a, a + step, tot, out, key, actkb, NULL, KEY_MODE_BEZTRIPLE);
}
else {
step = 0;
@@ -1315,17 +1368,10 @@ static void do_latt_key(Scene *scene, Object *ob, Key *key, char *out, const int
}
else {
if (key->type == KEY_RELATIVE) {
- KeyBlock *kb;
-
- for (kb = key->block.first; kb; kb = kb->next)
- kb->weights = get_weights_array(ob, kb->vgroup);
-
- BKE_key_evaluate_relative(0, tot, tot, out, key, actkb, KEY_MODE_DUMMY);
-
- for (kb = key->block.first; kb; kb = kb->next) {
- if (kb->weights) MEM_freeN(kb->weights);
- kb->weights = NULL;
- }
+ float **per_keyblock_weights;
+ per_keyblock_weights = BKE_keyblock_get_per_block_weights(ob, key, NULL);
+ BKE_key_evaluate_relative(0, tot, tot, (char *)out, key, actkb, per_keyblock_weights, KEY_MODE_DUMMY);
+ BKE_keyblock_free_per_block_weights(key, per_keyblock_weights, NULL);
}
else {
const float ctime_scaled = key->ctime / 100.0f;
@@ -1415,7 +1461,7 @@ float *BKE_key_evaluate_object_ex(Scene *scene, Object *ob, int *r_totelem,
}
if (OB_TYPE_SUPPORT_VGROUP(ob->type)) {
- float *weights = get_weights_array(ob, kb->vgroup);
+ float *weights = get_weights_array(ob, kb->vgroup, NULL);
cp_key(0, tot, tot, out, key, actkb, kb, weights, 0);
diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c
index a4892253c63..60b4db6aa9b 100644
--- a/source/blender/blenkernel/intern/lattice.c
+++ b/source/blender/blenkernel/intern/lattice.c
@@ -51,6 +51,7 @@
#include "BKE_animsys.h"
#include "BKE_anim.h"
#include "BKE_cdderivedmesh.h"
+#include "BKE_curve.h"
#include "BKE_displist.h"
#include "BKE_global.h"
#include "BKE_key.h"
@@ -164,7 +165,7 @@ void BKE_lattice_resize(Lattice *lt, int uNew, int vNew, int wNew, Object *ltOb)
lt->typeu = lt->typev = lt->typew = KEY_LINEAR;
/* prevent using deformed locations */
- BKE_displist_free(&ltOb->disp);
+ BKE_displist_free(&ltOb->curve_cache->disp);
copy_m4_m4(mat, ltOb->obmat);
unit_m4(ltOb->obmat);
@@ -306,37 +307,46 @@ void BKE_lattice_make_local(Lattice *lt)
}
}
-void init_latt_deform(Object *oblatt, Object *ob)
+typedef struct LatticeDeformData {
+ Object *object;
+ float *latticedata;
+ float latmat[4][4];
+} LatticeDeformData;
+
+LatticeDeformData *init_latt_deform(Object *oblatt, Object *ob)
{
/* we make an array with all differences */
Lattice *lt = oblatt->data;
BPoint *bp;
- DispList *dl = BKE_displist_find(&oblatt->disp, DL_VERTS);
+ DispList *dl = oblatt->curve_cache ? BKE_displist_find(&oblatt->curve_cache->disp, DL_VERTS) : NULL;
float *co = dl ? dl->verts : NULL;
float *fp, imat[4][4];
float fu, fv, fw;
int u, v, w;
+ float *latticedata;
+ float latmat[4][4];
+ LatticeDeformData *lattice_deform_data;
if (lt->editlatt) lt = lt->editlatt->latt;
bp = lt->def;
- fp = lt->latticedata = MEM_mallocN(sizeof(float) * 3 * lt->pntsu * lt->pntsv * lt->pntsw, "latticedata");
+ fp = latticedata = MEM_mallocN(sizeof(float) * 3 * lt->pntsu * lt->pntsv * lt->pntsw, "latticedata");
/* for example with a particle system: (ob == NULL) */
if (ob == NULL) {
/* in deformspace, calc matrix */
- invert_m4_m4(lt->latmat, oblatt->obmat);
+ invert_m4_m4(latmat, oblatt->obmat);
/* back: put in deform array */
- invert_m4_m4(imat, lt->latmat);
+ invert_m4_m4(imat, latmat);
}
else {
/* in deformspace, calc matrix */
invert_m4_m4(imat, oblatt->obmat);
- mul_m4_m4m4(lt->latmat, imat, ob->obmat);
+ mul_m4_m4m4(latmat, imat, ob->obmat);
/* back: put in deform array */
- invert_m4_m4(imat, lt->latmat);
+ invert_m4_m4(imat, latmat);
}
for (w = 0, fw = lt->fw; w < lt->pntsw; w++, fw += lt->dw) {
@@ -357,10 +367,18 @@ void init_latt_deform(Object *oblatt, Object *ob)
}
}
}
+
+ lattice_deform_data = MEM_mallocN(sizeof(LatticeDeformData), "Lattice Deform Data");
+ lattice_deform_data->latticedata = latticedata;
+ lattice_deform_data->object = oblatt;
+ copy_m4_m4(lattice_deform_data->latmat, latmat);
+
+ return lattice_deform_data;
}
-void calc_latt_deform(Object *ob, float co[3], float weight)
+void calc_latt_deform(LatticeDeformData *lattice_deform_data, float co[3], float weight)
{
+ Object *ob = lattice_deform_data->object;
Lattice *lt = ob->data;
float u, v, w, tu[4], tv[4], tw[4];
float vec[3];
@@ -374,7 +392,7 @@ void calc_latt_deform(Object *ob, float co[3], float weight)
if (lt->editlatt) lt = lt->editlatt->latt;
- if (lt->latticedata == NULL) return;
+ if (lattice_deform_data->latticedata == NULL) return;
if (lt->vgroup[0] && dvert) {
defgrp_index = defgroup_name_index(ob, lt->vgroup);
@@ -382,7 +400,7 @@ void calc_latt_deform(Object *ob, float co[3], float weight)
}
/* co is in local coords, treat with latmat */
- mul_v3_m4v3(vec, lt->latmat, co);
+ mul_v3_m4v3(vec, lattice_deform_data->latmat, co);
/* u v w coords */
@@ -455,7 +473,7 @@ void calc_latt_deform(Object *ob, float co[3], float weight)
idx_u = idx_v;
}
- madd_v3_v3fl(co, &lt->latticedata[idx_u * 3], u);
+ madd_v3_v3fl(co, &lattice_deform_data->latticedata[idx_u * 3], u);
if (defgrp_index != -1)
weight_blend += (u * defvert_find_weight(dvert + idx_u, defgrp_index));
@@ -471,15 +489,12 @@ void calc_latt_deform(Object *ob, float co[3], float weight)
}
-void end_latt_deform(Object *ob)
+void end_latt_deform(LatticeDeformData *lattice_deform_data)
{
- Lattice *lt = ob->data;
-
- if (lt->editlatt) lt = lt->editlatt->latt;
-
- if (lt->latticedata)
- MEM_freeN(lt->latticedata);
- lt->latticedata = NULL;
+ if (lattice_deform_data->latticedata)
+ MEM_freeN(lattice_deform_data->latticedata);
+
+ MEM_freeN(lattice_deform_data);
}
/* calculations is in local space of deformed object
@@ -506,13 +521,12 @@ static void init_curve_deform(Object *par, Object *ob, CurveDeform *cd)
*/
static int where_on_path_deform(Object *ob, float ctime, float vec[4], float dir[3], float quat[4], float *radius)
{
- Curve *cu = ob->data;
BevList *bl;
float ctime1;
int cycl = 0;
/* test for cyclic */
- bl = cu->bev.first;
+ bl = ob->curve_cache->bev.first;
if (!bl->nr) return 0;
if (bl->poly > -1) cycl = 1;
@@ -527,7 +541,7 @@ static int where_on_path_deform(Object *ob, float ctime, float vec[4], float dir
if (where_on_path(ob, ctime1, vec, dir, quat, radius, NULL)) {
if (cycl == 0) {
- Path *path = cu->path;
+ Path *path = ob->curve_cache->path;
float dvec[3];
if (ctime < 0.0f) {
@@ -565,9 +579,9 @@ static int calc_curve_deform(Scene *scene, Object *par, float co[3],
const int is_neg_axis = (axis > 2);
/* to be sure, mostly after file load */
- if (cu->path == NULL) {
+ if (ELEM(NULL, par->curve_cache, par->curve_cache->path)) {
BKE_displist_make_curveTypes(scene, par, 0);
- if (cu->path == NULL) return 0; // happens on append...
+ if (par->curve_cache->path == NULL) return 0; // happens on append...
}
/* options */
@@ -576,14 +590,14 @@ static int calc_curve_deform(Scene *scene, Object *par, float co[3],
if (cu->flag & CU_STRETCH)
fac = (-co[index] - cd->dmax[index]) / (cd->dmax[index] - cd->dmin[index]);
else
- fac = -(co[index] - cd->dmax[index]) / (cu->path->totdist);
+ fac = -(co[index] - cd->dmax[index]) / (par->curve_cache->path->totdist);
}
else {
index = axis;
if (cu->flag & CU_STRETCH)
fac = (co[index] - cd->dmin[index]) / (cd->dmax[index] - cd->dmin[index]);
else
- fac = +(co[index] - cd->dmin[index]) / (cu->path->totdist);
+ fac = +(co[index] - cd->dmin[index]) / (par->curve_cache->path->totdist);
}
if (where_on_path_deform(par, fac, loc, dir, new_quat, &radius)) { /* returns OK */
@@ -815,13 +829,14 @@ void curve_deform_vector(Scene *scene, Object *cuOb, Object *target,
void lattice_deform_verts(Object *laOb, Object *target, DerivedMesh *dm,
float (*vertexCos)[3], int numVerts, const char *vgroup, float fac)
{
+ LatticeDeformData *lattice_deform_data;
int a;
int use_vgroups;
if (laOb->type != OB_LATTICE)
return;
- init_latt_deform(laOb, target);
+ lattice_deform_data = init_latt_deform(laOb, target);
/* check whether to use vertex groups (only possible if target is a Mesh)
* we want either a Mesh with no derived data, or derived data with
@@ -855,16 +870,16 @@ void lattice_deform_verts(Object *laOb, Object *target, DerivedMesh *dm,
weight = defvert_find_weight(dvert, defgrp_index);
if (weight > 0.0f)
- calc_latt_deform(laOb, vertexCos[a], weight * fac);
+ calc_latt_deform(lattice_deform_data, vertexCos[a], weight * fac);
}
}
}
else {
for (a = 0; a < numVerts; a++) {
- calc_latt_deform(laOb, vertexCos[a], fac);
+ calc_latt_deform(lattice_deform_data, vertexCos[a], fac);
}
}
- end_latt_deform(laOb);
+ end_latt_deform(lattice_deform_data);
}
int object_deform_mball(Object *ob, ListBase *dispbase)
@@ -991,11 +1006,17 @@ void BKE_lattice_vertexcos_apply(struct Object *ob, float (*vertexCos)[3])
void BKE_lattice_modifiers_calc(Scene *scene, Object *ob)
{
Lattice *lt = ob->data;
- ModifierData *md = modifiers_getVirtualModifierList(ob);
+ VirtualModifierData virtualModifierData;
+ ModifierData *md = modifiers_getVirtualModifierList(ob, &virtualModifierData);
float (*vertexCos)[3] = NULL;
int numVerts, editmode = (lt->editlatt != NULL);
- BKE_displist_free(&ob->disp);
+ if (ob->curve_cache) {
+ BKE_displist_free(&ob->curve_cache->disp);
+ }
+ else {
+ ob->curve_cache = MEM_callocN(sizeof(CurveCache), "CurveCache for lattice");
+ }
for (; md; md = md->next) {
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
@@ -1021,7 +1042,7 @@ void BKE_lattice_modifiers_calc(Scene *scene, Object *ob)
dl->nr = numVerts;
dl->verts = (float *) vertexCos;
- BLI_addtail(&ob->disp, dl);
+ BLI_addtail(&ob->curve_cache->disp, dl);
}
}
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index c23fa097d3e..9b8d34e651d 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -269,7 +269,8 @@ bool id_make_local(ID *id, bool test)
if (!test) BKE_action_make_local((bAction *)id);
return true;
case ID_NT:
- return false; /* not implemented */
+ if (!test) ntreeMakeLocal((bNodeTree *)id);
+ return true;
case ID_BR:
if (!test) BKE_brush_make_local((Brush *)id);
return true;
@@ -1410,7 +1411,7 @@ bool new_id(ListBase *lb, ID *id, const char *tname)
/* This was in 2.43 and previous releases
* however all data in blender should be sorted, not just duplicate names
- * sorting should not hurt, but noting just incause it alters the way other
+ * sorting should not hurt, but noting just incase it alters the way other
* functions work, so sort every time */
#if 0
if (result)
diff --git a/source/blender/blenkernel/intern/linestyle.c b/source/blender/blenkernel/intern/linestyle.c
index 497554be113..d3c9250694c 100644
--- a/source/blender/blenkernel/intern/linestyle.c
+++ b/source/blender/blenkernel/intern/linestyle.c
@@ -81,6 +81,7 @@ static void default_linestyle_settings(FreestyleLineStyle *linestyle)
linestyle->thickness = 3.0f;
linestyle->thickness_position = LS_THICKNESS_CENTER;
linestyle->thickness_ratio = 0.5f;
+ linestyle->flag = LS_SAME_OBJECT;
linestyle->chaining = LS_CHAINING_PLAIN;
linestyle->rounds = 3;
linestyle->min_angle = DEG2RADF(0.0f);
diff --git a/source/blender/blenkernel/intern/mask.c b/source/blender/blenkernel/intern/mask.c
index a7bfb15c99d..c856d8cfea4 100644
--- a/source/blender/blenkernel/intern/mask.c
+++ b/source/blender/blenkernel/intern/mask.c
@@ -1095,10 +1095,15 @@ void BKE_mask_coord_to_image(Image *image, ImageUser *iuser, float r_co[2], cons
BKE_mask_coord_to_frame(r_co, co, frame_size);
}
-static int mask_evaluate_parent(MaskParent *parent, float ctime, float orig_co[2], float r_co[2])
+void BKE_mask_point_parent_matrix_get(MaskSplinePoint *point, float ctime, float parent_matrix[3][3])
{
- if (!parent)
- return FALSE;
+ MaskParent *parent = &point->parent;
+
+ unit_m3(parent_matrix);
+
+ if (!parent) {
+ return;
+ }
if (parent->id_type == ID_MC) {
if (parent->id) {
@@ -1115,11 +1120,10 @@ static int mask_evaluate_parent(MaskParent *parent, float ctime, float orig_co[2
MovieTrackingTrack *track = BKE_tracking_track_get_named(tracking, ob, parent->sub_parent);
if (track) {
- float marker_pos_ofs[2];
- BKE_tracking_marker_get_subframe_position(track, clip_framenr, marker_pos_ofs);
- BKE_mask_coord_from_movieclip(clip, &user, r_co, marker_pos_ofs);
-
- return TRUE;
+ float marker_position[2], parent_co[2];
+ BKE_tracking_marker_get_subframe_position(track, clip_framenr, marker_position);
+ BKE_mask_coord_from_movieclip(clip, &user, parent_co, marker_position);
+ sub_v2_v2v2(parent_matrix[2], parent_co, parent->parent_orig);
}
}
else /* if (parent->type == MASK_PARENT_PLANE_TRACK) */ {
@@ -1127,47 +1131,47 @@ static int mask_evaluate_parent(MaskParent *parent, float ctime, float orig_co[2
if (plane_track) {
MovieTrackingPlaneMarker *plane_marker = BKE_tracking_plane_marker_get(plane_track, clip_framenr);
- float H[3][3], vec[3], warped[3];
+ float aspx, aspy;
+ float frame_size[2], H[3][3], mask_from_clip_matrix[3][3], mask_to_clip_matrix[3][3];
BKE_tracking_homography_between_two_quads(parent->parent_corners_orig, plane_marker->corners, H);
- BKE_mask_coord_to_movieclip(clip, &user, vec, orig_co);
- vec[2] = 1.0f;
- mul_v3_m3v3(warped, H, vec);
- warped[0] /= warped[2];
- warped[1] /= warped[2];
+ unit_m3(mask_from_clip_matrix);
+
+ BKE_movieclip_get_size_fl(clip, &user, frame_size);
+ BKE_movieclip_get_aspect(clip, &aspx, &aspy);
+
+ frame_size[1] *= (aspy / aspx);
+ if (frame_size[0] == frame_size[1]) {
+ /* pass */
+ }
+ else if (frame_size[0] < frame_size[1]) {
+ mask_from_clip_matrix[0][0] = frame_size[1] / frame_size[0];
+ mask_from_clip_matrix[2][0] = -0.5f * (frame_size[1] / frame_size[0]) + 0.5f;
+ }
+ else { /* (frame_size[0] > frame_size[1]) */
+ mask_from_clip_matrix[1][1] = frame_size[1] / frame_size[0];
+ mask_from_clip_matrix[2][1] = -0.5f * (frame_size[1] / frame_size[0]) + 0.5f;
+ }
- BKE_mask_coord_from_movieclip(clip, &user, r_co, warped);
+ invert_m3_m3(mask_to_clip_matrix, mask_from_clip_matrix);
+ mul_serie_m3(parent_matrix, mask_to_clip_matrix, H, mask_from_clip_matrix, NULL, NULL, NULL, NULL, NULL);
}
}
}
}
}
-
- return FALSE;
}
static void mask_evaluate_apply_point_parent(MaskSplinePoint *point, float ctime)
{
- MaskParent *parent = &point->parent;
+ float parent_matrix[3][3];
- if (parent->type == MASK_PARENT_POINT_TRACK) {
- float parent_co[2];
+ BKE_mask_point_parent_matrix_get(point, ctime, parent_matrix);
- if (mask_evaluate_parent(parent, ctime, NULL, parent_co)) {
- float delta[2];
- sub_v2_v2v2(delta, parent_co, parent->parent_orig);
-
- add_v2_v2(point->bezt.vec[0], delta);
- add_v2_v2(point->bezt.vec[1], delta);
- add_v2_v2(point->bezt.vec[2], delta);
- }
- }
- else /* if (parent->type == MASK_PARENT_PLANE_TRACK) */ {
- mask_evaluate_parent(parent, ctime, point->bezt.vec[0], point->bezt.vec[0]);
- mask_evaluate_parent(parent, ctime, point->bezt.vec[1], point->bezt.vec[1]);
- mask_evaluate_parent(parent, ctime, point->bezt.vec[2], point->bezt.vec[2]);
- }
+ mul_m3_v2(parent_matrix, point->bezt.vec[0]);
+ mul_m3_v2(parent_matrix, point->bezt.vec[1]);
+ mul_m3_v2(parent_matrix, point->bezt.vec[2]);
}
static void mask_calc_point_handle(MaskSplinePoint *point, MaskSplinePoint *point_prev, MaskSplinePoint *point_next)
@@ -1402,7 +1406,7 @@ void BKE_mask_update_deform(Mask *mask)
int j;
for (j = 0; j <= 2; j += 2) { /* (0, 2) */
- printf("--- %d %d, %d, %d\n", i, j, i_prev, i_next);
+ // printf("--- %d %d, %d, %d\n", i, j, i_prev, i_next);
barycentric_weights_v2(bezt_prev->vec[1], bezt->vec[1], bezt_next->vec[1],
bezt->vec[j], w_src);
interp_v3_v3v3v3(bezt_def->vec[j],
diff --git a/source/blender/blenkernel/intern/mask_rasterize.c b/source/blender/blenkernel/intern/mask_rasterize.c
index ac48eaa3185..a43bf41058c 100644
--- a/source/blender/blenkernel/intern/mask_rasterize.c
+++ b/source/blender/blenkernel/intern/mask_rasterize.c
@@ -82,17 +82,10 @@
#include "BLI_rect.h"
#include "BLI_listbase.h"
#include "BLI_linklist.h"
+#include "BLI_strict_flags.h"
#include "BKE_mask.h"
-#ifdef __GNUC__
-# pragma GCC diagnostic error "-Wsign-conversion"
-# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 /* gcc4.6+ only */
-# pragma GCC diagnostic error "-Wsign-compare"
-# pragma GCC diagnostic error "-Wconversion"
-# endif
-#endif
-
/* this is rather and annoying hack, use define to isolate it.
* problem is caused by scanfill removing edges on us. */
#define USE_SCANFILL_EDGE_WORKAROUND
@@ -416,7 +409,7 @@ static void layer_bucket_init_dummy(MaskRasterLayer *layer)
static void layer_bucket_init(MaskRasterLayer *layer, const float pixel_size)
{
- MemArena *arena = BLI_memarena_new(1 << 16, __func__);
+ MemArena *arena = BLI_memarena_new(MEM_SIZE_OPTIMAL(1 << 16), __func__);
const float bucket_dim_x = BLI_rctf_size_x(&layer->bounds);
const float bucket_dim_y = BLI_rctf_size_y(&layer->bounds);
@@ -575,11 +568,14 @@ void BKE_maskrasterize_handle_init(MaskRasterHandle *mr_handle, struct Mask *mas
const float zvec[3] = {0.0f, 0.0f, 1.0f};
MaskLayer *masklay;
unsigned int masklay_index;
+ MemArena *sf_arena;
mr_handle->layers_tot = (unsigned int)BLI_countlist(&mask->masklayers);
mr_handle->layers = MEM_mallocN(sizeof(MaskRasterLayer) * mr_handle->layers_tot, "MaskRasterLayer");
BLI_rctf_init_minmax(&mr_handle->bounds);
+ sf_arena = BLI_memarena_new(BLI_SCANFILL_ARENA_SIZE, __func__);
+
for (masklay = mask->masklayers.first, masklay_index = 0; masklay; masklay = masklay->next, masklay_index++) {
/* we need to store vertex ranges for open splines for filling */
@@ -613,7 +609,7 @@ void BKE_maskrasterize_handle_init(MaskRasterHandle *mr_handle, struct Mask *mas
tot_splines = (unsigned int)BLI_countlist(&masklay->splines);
open_spline_ranges = MEM_callocN(sizeof(*open_spline_ranges) * tot_splines, __func__);
- BLI_scanfill_begin(&sf_ctx);
+ BLI_scanfill_begin_arena(&sf_ctx, sf_arena);
for (spline = masklay->splines.first; spline; spline = spline->next) {
const unsigned int is_cyclic = (spline->flag & MASK_SPLINE_CYCLIC) != 0;
@@ -1148,8 +1144,10 @@ void BKE_maskrasterize_handle_init(MaskRasterHandle *mr_handle, struct Mask *mas
}
/* add trianges */
- BLI_scanfill_end(&sf_ctx);
+ BLI_scanfill_end_arena(&sf_ctx, sf_arena);
}
+
+ BLI_memarena_free(sf_arena);
}
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index c23b4ac4408..f3dc64a7279 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -1291,7 +1291,9 @@ int object_remove_material_slot(Object *ob)
/* check indices from mesh */
if (ELEM4(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT)) {
material_data_index_remove_id((ID *)ob->data, actcol - 1);
- BKE_displist_free(&ob->disp);
+ if (ob->curve_cache) {
+ BKE_displist_free(&ob->curve_cache->disp);
+ }
}
return TRUE;
diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c
index 173b193b752..83c257dbd56 100644
--- a/source/blender/blenkernel/intern/mball.c
+++ b/source/blender/blenkernel/intern/mball.c
@@ -56,6 +56,7 @@
/* #include "BKE_object.h" */
#include "BKE_animsys.h"
+#include "BKE_curve.h"
#include "BKE_scene.h"
#include "BKE_library.h"
#include "BKE_displist.h"
@@ -199,7 +200,6 @@ void BKE_mball_free(MetaBall *mb)
mb->adt = NULL;
}
if (mb->mat) MEM_freeN(mb->mat);
- if (mb->bb) MEM_freeN(mb->bb);
BLI_freelistN(&mb->elems);
if (mb->disp.first) BKE_displist_free(&mb->disp);
}
@@ -233,7 +233,6 @@ MetaBall *BKE_mball_copy(MetaBall *mb)
for (a = 0; a < mbn->totcol; a++) {
id_us_plus((ID *)mbn->mat[a]);
}
- mbn->bb = MEM_dupallocN(mb->bb);
mbn->editelems = NULL;
mbn->lastelem = NULL;
@@ -366,7 +365,7 @@ void BKE_mball_texspace_calc(Object *ob)
(min)[0] = (min)[1] = (min)[2] = 1.0e30f;
(max)[0] = (max)[1] = (max)[2] = -1.0e30f;
- dl = ob->disp.first;
+ dl = ob->curve_cache->disp.first;
while (dl) {
tot = dl->nr;
if (tot) do_it = TRUE;
@@ -1638,22 +1637,6 @@ static void polygonize(PROCESS *process, MetaBall *mb)
}
}
-/* could move to math api */
-BLI_INLINE void copy_v3_fl3(float v[3], float x, float y, float z)
-{
- v[0] = x;
- v[1] = y;
- v[2] = z;
-}
-
-/* TODO(sergey): Perhaps it could be general utility function in mathutils. */
-static bool has_zero_axis_m4(float matrix[4][4])
-{
- return len_squared_v3(matrix[0]) < FLT_EPSILON ||
- len_squared_v3(matrix[1]) < FLT_EPSILON ||
- len_squared_v3(matrix[2]) < FLT_EPSILON;
-}
-
static float init_meta(PROCESS *process, Scene *scene, Object *ob) /* return totsize */
{
Scene *sce_iter = scene;
@@ -2281,7 +2264,7 @@ static void mball_count(PROCESS *process, Scene *scene, Object *basis)
}
}
-void BKE_mball_polygonize(Scene *scene, Object *ob, ListBase *dispbase)
+void BKE_mball_polygonize(Scene *scene, Object *ob, ListBase *dispbase, bool for_render)
{
MetaBall *mb;
DispList *dl;
@@ -2294,7 +2277,7 @@ void BKE_mball_polygonize(Scene *scene, Object *ob, ListBase *dispbase)
mball_count(&process, scene, ob);
if (process.totelem == 0) return;
- if ((G.is_rendering == FALSE) && (mb->flag == MB_UPDATE_NEVER)) return;
+ if ((for_render == false) && (mb->flag == MB_UPDATE_NEVER)) return;
if ((G.moving & (G_TRANSFORM_OBJ | G_TRANSFORM_EDIT)) && mb->flag == MB_UPDATE_FAST) return;
process.thresh = mb->thresh;
@@ -2332,7 +2315,7 @@ void BKE_mball_polygonize(Scene *scene, Object *ob, ListBase *dispbase)
}
/* width is size per polygonize cube */
- if (G.is_rendering) {
+ if (for_render) {
width = mb->rendersize;
}
else {
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c
index 0db1f92f70f..a77f768835a 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -27,12 +27,6 @@
* \ingroup bke
*/
-
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <math.h>
-
#include "MEM_guardedalloc.h"
#include "DNA_scene_types.h"
@@ -40,22 +34,17 @@
#include "DNA_object_types.h"
#include "DNA_key_types.h"
#include "DNA_mesh_types.h"
-#include "DNA_meshdata_types.h"
#include "DNA_ipo_types.h"
-#include "DNA_customdata_types.h"
#include "BLI_utildefines.h"
-#include "BLI_blenlib.h"
#include "BLI_math.h"
+#include "BLI_listbase.h"
#include "BLI_edgehash.h"
-#include "BLI_bitmap.h"
-#include "BLI_scanfill.h"
-#include "BLI_array.h"
-#include "BLI_alloca.h"
+#include "BLI_string_utf8.h"
+#include "BLI_string.h"
#include "BKE_animsys.h"
#include "BKE_main.h"
-#include "BKE_customdata.h"
#include "BKE_DerivedMesh.h"
#include "BKE_global.h"
#include "BKE_mesh.h"
@@ -70,9 +59,7 @@
/* -- */
#include "BKE_object.h"
#include "BKE_editmesh.h"
-#include "BLI_edgehash.h"
-#include "bmesh.h"
enum {
MESHCMP_DVERT_WEIGHTMISMATCH = 1,
@@ -177,8 +164,8 @@ static int customdata_compare(CustomData *c1, CustomData *c2, Mesh *m1, Mesh *m2
if (l1->type == CD_MEDGE) {
MEdge *e1 = l1->data;
MEdge *e2 = l2->data;
- EdgeHash *eh = BLI_edgehash_new();
int etot = m1->totedge;
+ EdgeHash *eh = BLI_edgehash_new_ex(__func__, etot);
for (j = 0; j < etot; j++, e1++) {
BLI_edgehash_insert(eh, e1->v1, e1->v2, e1);
@@ -274,7 +261,12 @@ static int customdata_compare(CustomData *c1, CustomData *c2, Mesh *m1, Mesh *m2
return 0;
}
-/*used for testing. returns an error string the two meshes don't match*/
+/**
+ * Used for unit testing; compares two meshes, checking only
+ * differences we care about. should be usable with leaf's
+ * testing framework I get RNA work done, will use hackish
+ * testing code for now.
+ */
const char *BKE_mesh_cmp(Mesh *me1, Mesh *me2, float thresh)
{
int c;
@@ -538,8 +530,9 @@ Mesh *BKE_mesh_copy(Mesh *me)
BMesh *BKE_mesh_to_bmesh(Mesh *me, Object *ob)
{
BMesh *bm;
+ const BMAllocTemplate allocsize = BMALLOC_TEMPLATE_FROM_ME(me);
- bm = BM_mesh_create(&bm_mesh_allocsize_default);
+ bm = BM_mesh_create(&allocsize);
BM_mesh_bm_from_me(bm, me, false, true, ob->shapenr);
@@ -632,6 +625,113 @@ void BKE_mesh_make_local(Mesh *me)
}
}
+bool BKE_mesh_uv_cdlayer_rename_index(Mesh *me, const int poly_index, const int loop_index, const int face_index,
+ const char *new_name, const bool do_tessface)
+{
+ CustomData *pdata, *ldata, *fdata;
+ CustomDataLayer *cdlp, *cdlu, *cdlf;
+ const int step = do_tessface ? 3 : 2;
+ int i;
+
+ if (me->edit_btmesh) {
+ pdata = &me->edit_btmesh->bm->pdata;
+ ldata = &me->edit_btmesh->bm->ldata;
+ fdata = NULL; /* No tessellated data in BMesh! */
+ }
+ else {
+ pdata = &me->pdata;
+ ldata = &me->ldata;
+ fdata = &me->fdata;
+ }
+ cdlp = &pdata->layers[poly_index];
+ cdlu = &ldata->layers[loop_index];
+ cdlf = fdata && do_tessface ? &fdata->layers[face_index] : NULL;
+
+ BLI_strncpy(cdlp->name, new_name, sizeof(cdlp->name));
+ CustomData_set_layer_unique_name(pdata, cdlp - pdata->layers);
+
+ /* Loop until we do have exactly the same name for all layers! */
+ for (i = 1; (strcmp(cdlp->name, cdlu->name) != 0 || (cdlf && strcmp(cdlp->name, cdlf->name) != 0)); i++) {
+ switch (i % step) {
+ case 0:
+ BLI_strncpy(cdlp->name, cdlu->name, sizeof(cdlp->name));
+ CustomData_set_layer_unique_name(pdata, cdlp - pdata->layers);
+ break;
+ case 1:
+ BLI_strncpy(cdlu->name, cdlp->name, sizeof(cdlu->name));
+ CustomData_set_layer_unique_name(ldata, cdlu - ldata->layers);
+ break;
+ case 2:
+ if (cdlf) {
+ BLI_strncpy(cdlf->name, cdlp->name, sizeof(cdlf->name));
+ CustomData_set_layer_unique_name(fdata, cdlf - fdata->layers);
+ }
+ break;
+ }
+ }
+
+ return true;
+}
+
+bool BKE_mesh_uv_cdlayer_rename(Mesh *me, const char *old_name, const char *new_name, bool do_tessface)
+{
+ CustomData *pdata, *ldata, *fdata;
+ if (me->edit_btmesh) {
+ pdata = &me->edit_btmesh->bm->pdata;
+ ldata = &me->edit_btmesh->bm->ldata;
+ /* No tessellated data in BMesh! */
+ fdata = NULL;
+ do_tessface = false;
+ }
+ else {
+ pdata = &me->pdata;
+ ldata = &me->ldata;
+ fdata = &me->fdata;
+ do_tessface = (do_tessface && fdata->totlayer);
+ }
+
+ {
+ const int pidx_start = CustomData_get_layer_index(pdata, CD_MTEXPOLY);
+ const int lidx_start = CustomData_get_layer_index(ldata, CD_MLOOPUV);
+ const int fidx_start = do_tessface ? CustomData_get_layer_index(fdata, CD_MTFACE) : -1;
+ int pidx = CustomData_get_named_layer(pdata, CD_MTEXPOLY, old_name);
+ int lidx = CustomData_get_named_layer(ldata, CD_MLOOPUV, old_name);
+ int fidx = do_tessface ? CustomData_get_named_layer(fdata, CD_MTFACE, old_name) : -1;
+
+ /* None of those cases should happen, in theory!
+ * Note this assume we have the same number of mtexpoly, mloopuv and mtface layers!
+ */
+ if (pidx == -1) {
+ if (lidx == -1) {
+ if (fidx == -1) {
+ /* No layer found with this name! */
+ return false;
+ }
+ else {
+ lidx = lidx_start + (fidx - fidx_start);
+ }
+ }
+ pidx = pidx_start + (lidx - lidx_start);
+ }
+ else {
+ if (lidx == -1) {
+ lidx = lidx_start + (pidx - pidx_start);
+ }
+ if (fidx == -1 && do_tessface) {
+ fidx = fidx_start + (pidx - pidx_start);
+ }
+ }
+#if 0
+ /* For now, we do not consider mismatch in indices (i.e. same name leading to (relative) different indices). */
+ else if ((pidx - pidx_start) != (lidx - lidx_start)) {
+ lidx = lidx_start + (pidx - pidx_start);
+ }
+#endif
+
+ return BKE_mesh_uv_cdlayer_rename_index(me, pidx, lidx, fidx, new_name, do_tessface);
+ }
+}
+
void BKE_mesh_boundbox_calc(Mesh *me, float r_loc[3], float r_size[3])
{
BoundBox *bb;
@@ -657,6 +757,8 @@ void BKE_mesh_boundbox_calc(Mesh *me, float r_loc[3], float r_size[3])
r_size[2] = (max[2] - min[2]) / 2.0f;
BKE_boundbox_init_from_minmax(bb, min, max);
+
+ bb->flag &= ~BOUNDBOX_DIRTY;
}
void BKE_mesh_texspace_calc(Mesh *me)
@@ -686,15 +788,16 @@ BoundBox *BKE_mesh_boundbox_get(Object *ob)
if (ob->bb)
return ob->bb;
- if (!me->bb)
+ if (me->bb == NULL || (me->bb->flag & BOUNDBOX_DIRTY)) {
BKE_mesh_texspace_calc(me);
+ }
return me->bb;
}
void BKE_mesh_texspace_get(Mesh *me, float r_loc[3], float r_rot[3], float r_size[3])
{
- if (!me->bb) {
+ if (me->bb == NULL || (me->bb->flag & BOUNDBOX_DIRTY)) {
BKE_mesh_texspace_calc(me);
}
@@ -862,308 +965,6 @@ void BKE_mesh_assign_object(Object *ob, Mesh *me)
test_object_modifiers(ob);
}
-/* ************** make edges in a Mesh, for outside of editmode */
-
-struct EdgeSort {
- unsigned int v1, v2;
- char is_loose, is_draw;
-};
-
-/* edges have to be added with lowest index first for sorting */
-static void to_edgesort(struct EdgeSort *ed,
- unsigned int v1, unsigned int v2,
- char is_loose, short is_draw)
-{
- if (v1 < v2) {
- ed->v1 = v1; ed->v2 = v2;
- }
- else {
- ed->v1 = v2; ed->v2 = v1;
- }
- ed->is_loose = is_loose;
- ed->is_draw = is_draw;
-}
-
-static int vergedgesort(const void *v1, const void *v2)
-{
- const struct EdgeSort *x1 = v1, *x2 = v2;
-
- if (x1->v1 > x2->v1) return 1;
- else if (x1->v1 < x2->v1) return -1;
- else if (x1->v2 > x2->v2) return 1;
- else if (x1->v2 < x2->v2) return -1;
-
- return 0;
-}
-
-
-/* Create edges based on known verts and faces,
- * this function is only used when loading very old blend files */
-
-static void make_edges_mdata(MVert *UNUSED(allvert), MFace *allface, MLoop *allloop,
- MPoly *allpoly, int UNUSED(totvert), int totface, int UNUSED(totloop), int totpoly,
- const bool use_old,
- MEdge **r_medge, int *r_totedge)
-{
- MPoly *mpoly;
- MFace *mface;
- MEdge *medge, *med;
- EdgeHash *hash = BLI_edgehash_new();
- struct EdgeSort *edsort, *ed;
- int a, totedge = 0;
- unsigned int totedge_final = 0;
- unsigned int edge_index;
-
- /* we put all edges in array, sort them, and detect doubles that way */
-
- for (a = totface, mface = allface; a > 0; a--, mface++) {
- if (mface->v4) totedge += 4;
- else if (mface->v3) totedge += 3;
- else totedge += 1;
- }
-
- if (totedge == 0) {
- /* flag that mesh has edges */
- (*r_medge) = MEM_callocN(0, __func__);
- (*r_totedge) = 0;
- return;
- }
-
- ed = edsort = MEM_mallocN(totedge * sizeof(struct EdgeSort), "EdgeSort");
-
- for (a = totface, mface = allface; a > 0; a--, mface++) {
- to_edgesort(ed++, mface->v1, mface->v2, !mface->v3, mface->edcode & ME_V1V2);
- if (mface->v4) {
- to_edgesort(ed++, mface->v2, mface->v3, 0, mface->edcode & ME_V2V3);
- to_edgesort(ed++, mface->v3, mface->v4, 0, mface->edcode & ME_V3V4);
- to_edgesort(ed++, mface->v4, mface->v1, 0, mface->edcode & ME_V4V1);
- }
- else if (mface->v3) {
- to_edgesort(ed++, mface->v2, mface->v3, 0, mface->edcode & ME_V2V3);
- to_edgesort(ed++, mface->v3, mface->v1, 0, mface->edcode & ME_V3V1);
- }
- }
-
- qsort(edsort, totedge, sizeof(struct EdgeSort), vergedgesort);
-
- /* count final amount */
- for (a = totedge, ed = edsort; a > 1; a--, ed++) {
- /* edge is unique when it differs from next edge, or is last */
- if (ed->v1 != (ed + 1)->v1 || ed->v2 != (ed + 1)->v2) totedge_final++;
- }
- totedge_final++;
-
- medge = MEM_callocN(sizeof(MEdge) * totedge_final, __func__);
-
- for (a = totedge, med = medge, ed = edsort; a > 1; a--, ed++) {
- /* edge is unique when it differs from next edge, or is last */
- if (ed->v1 != (ed + 1)->v1 || ed->v2 != (ed + 1)->v2) {
- med->v1 = ed->v1;
- med->v2 = ed->v2;
- if (use_old == false || ed->is_draw) med->flag = ME_EDGEDRAW | ME_EDGERENDER;
- if (ed->is_loose) med->flag |= ME_LOOSEEDGE;
-
- /* order is swapped so extruding this edge as a surface wont flip face normals
- * with cyclic curves */
- if (ed->v1 + 1 != ed->v2) {
- SWAP(unsigned int, med->v1, med->v2);
- }
- med++;
- }
- else {
- /* equal edge, we merge the drawflag */
- (ed + 1)->is_draw |= ed->is_draw;
- }
- }
- /* last edge */
- med->v1 = ed->v1;
- med->v2 = ed->v2;
- med->flag = ME_EDGEDRAW;
- if (ed->is_loose) med->flag |= ME_LOOSEEDGE;
- med->flag |= ME_EDGERENDER;
-
- MEM_freeN(edsort);
-
- /* set edge members of mloops */
- for (edge_index = 0, med = medge; edge_index < totedge_final; edge_index++, med++) {
- BLI_edgehash_insert(hash, med->v1, med->v2, SET_UINT_IN_POINTER(edge_index));
- }
-
- mpoly = allpoly;
- for (a = 0; a < totpoly; a++, mpoly++) {
- MLoop *ml, *ml_next;
- int i = mpoly->totloop;
-
- ml_next = allloop + mpoly->loopstart; /* first loop */
- ml = &ml_next[i - 1]; /* last loop */
-
- while (i-- != 0) {
- ml->e = GET_UINT_FROM_POINTER(BLI_edgehash_lookup(hash, ml->v, ml_next->v));
- ml = ml_next;
- ml_next++;
- }
- }
-
- BLI_edgehash_free(hash, NULL);
-
- *r_medge = medge;
- *r_totedge = totedge_final;
-}
-
-void BKE_mesh_make_edges(Mesh *me, const bool use_old)
-{
- MEdge *medge;
- int totedge = 0;
-
- make_edges_mdata(me->mvert, me->mface, me->mloop, me->mpoly,
- me->totvert, me->totface, me->totloop, me->totpoly,
- use_old, &medge, &totedge);
-
- if (totedge == 0) {
- /* flag that mesh has edges */
- me->medge = medge;
- me->totedge = 0;
- return;
- }
-
- medge = CustomData_add_layer(&me->edata, CD_MEDGE, CD_ASSIGN, medge, totedge);
- me->medge = medge;
- me->totedge = totedge;
-
- BKE_mesh_strip_loose_faces(me);
-}
-
-/* We need to keep this for edge creation (for now?), and some old readfile code... */
-void BKE_mesh_strip_loose_faces(Mesh *me)
-{
- MFace *f;
- int a, b;
-
- for (a = b = 0, f = me->mface; a < me->totface; a++, f++) {
- if (f->v3) {
- if (a != b) {
- memcpy(&me->mface[b], f, sizeof(me->mface[b]));
- CustomData_copy_data(&me->fdata, &me->fdata, a, b, 1);
- }
- b++;
- }
- }
- if (a != b) {
- CustomData_free_elem(&me->fdata, b, a - b);
- me->totface = b;
- }
-}
-
-/* Works on both loops and polys! */
-/* Note: It won't try to guess which loops of an invalid poly to remove!
- * this is the work of the caller, to mark those loops...
- * See e.g. BKE_mesh_validate_arrays(). */
-void BKE_mesh_strip_loose_polysloops(Mesh *me)
-{
- MPoly *p;
- MLoop *l;
- int a, b;
- /* New loops idx! */
- int *new_idx = MEM_mallocN(sizeof(int) * me->totloop, __func__);
-
- for (a = b = 0, p = me->mpoly; a < me->totpoly; a++, p++) {
- int invalid = FALSE;
- int i = p->loopstart;
- int stop = i + p->totloop;
-
- if (stop > me->totloop || stop < i) {
- invalid = TRUE;
- }
- else {
- l = &me->mloop[i];
- i = stop - i;
- /* If one of the poly's loops is invalid, the whole poly is invalid! */
- for (; i--; l++) {
- if (l->e == INVALID_LOOP_EDGE_MARKER) {
- invalid = TRUE;
- break;
- }
- }
- }
-
- if (p->totloop >= 3 && !invalid) {
- if (a != b) {
- memcpy(&me->mpoly[b], p, sizeof(me->mpoly[b]));
- CustomData_copy_data(&me->pdata, &me->pdata, a, b, 1);
- }
- b++;
- }
- }
- if (a != b) {
- CustomData_free_elem(&me->pdata, b, a - b);
- me->totpoly = b;
- }
-
- /* And now, get rid of invalid loops. */
- for (a = b = 0, l = me->mloop; a < me->totloop; a++, l++) {
- if (l->e != INVALID_LOOP_EDGE_MARKER) {
- if (a != b) {
- memcpy(&me->mloop[b], l, sizeof(me->mloop[b]));
- CustomData_copy_data(&me->ldata, &me->ldata, a, b, 1);
- }
- new_idx[a] = b;
- b++;
- }
- else {
- /* XXX Theoretically, we should be able to not do this, as no remaining poly
- * should use any stripped loop. But for security's sake... */
- new_idx[a] = -a;
- }
- }
- if (a != b) {
- CustomData_free_elem(&me->ldata, b, a - b);
- me->totloop = b;
- }
-
- /* And now, update polys' start loop index. */
- /* Note: At this point, there should never be any poly using a striped loop! */
- for (a = 0, p = me->mpoly; a < me->totpoly; a++, p++) {
- p->loopstart = new_idx[p->loopstart];
- }
-
- MEM_freeN(new_idx);
-}
-
-void BKE_mesh_strip_loose_edges(Mesh *me)
-{
- MEdge *e;
- MLoop *l;
- int a, b;
- unsigned int *new_idx = MEM_mallocN(sizeof(int) * me->totedge, __func__);
-
- for (a = b = 0, e = me->medge; a < me->totedge; a++, e++) {
- if (e->v1 != e->v2) {
- if (a != b) {
- memcpy(&me->medge[b], e, sizeof(me->medge[b]));
- CustomData_copy_data(&me->edata, &me->edata, a, b, 1);
- }
- new_idx[a] = b;
- b++;
- }
- else {
- new_idx[a] = INVALID_LOOP_EDGE_MARKER;
- }
- }
- if (a != b) {
- CustomData_free_elem(&me->edata, b, a - b);
- me->totedge = b;
- }
-
- /* And now, update loops' edge indices. */
- /* XXX We hope no loop was pointing to a striped edge!
- * Else, its e will be set to INVALID_LOOP_EDGE_MARKER :/ */
- for (a = 0, l = me->mloop; a < me->totloop; a++, l++) {
- l->e = new_idx[l->e];
- }
-
- MEM_freeN(new_idx);
-}
-
void BKE_mesh_from_metaball(ListBase *lb, Mesh *me)
{
DispList *dl;
@@ -1237,10 +1038,12 @@ static void make_edges_mdata_extend(MEdge **r_alledge, int *r_totedge,
int totedge = *r_totedge;
int totedge_new;
EdgeHash *eh;
+ unsigned int eh_reserve;
const MPoly *mp;
int i;
- eh = BLI_edgehash_new();
+ eh_reserve = max_ii(totedge, BLI_EDGEHASH_SIZE_GUESS_FROM_POLYS(totpoly));
+ eh = BLI_edgehash_new_ex(__func__, eh_reserve);
for (i = 0, mp = mpoly; i < totpoly; i++, mp++) {
BKE_mesh_poly_edgehash_insert(eh, mp, mloop + mp->loopstart);
@@ -1307,7 +1110,13 @@ int BKE_mesh_nurbs_to_mdata(Object *ob, MVert **allvert, int *totvert,
MEdge **alledge, int *totedge, MLoop **allloop, MPoly **allpoly,
int *totloop, int *totpoly)
{
- return BKE_mesh_nurbs_displist_to_mdata(ob, &ob->disp,
+ ListBase disp = {NULL, NULL};
+
+ if (ob->curve_cache) {
+ disp = ob->curve_cache->disp;
+ }
+
+ return BKE_mesh_nurbs_displist_to_mdata(ob, &disp,
allvert, totvert,
alledge, totedge,
allloop, allpoly, NULL,
@@ -1653,8 +1462,13 @@ void BKE_mesh_from_nurbs(Object *ob)
{
Curve *cu = (Curve *) ob->data;
bool use_orco_uv = (cu->flag & CU_UV_ORCO) != 0;
+ ListBase disp = {NULL, NULL};
+
+ if (ob->curve_cache) {
+ disp = ob->curve_cache->disp;
+ }
- BKE_mesh_from_nurbs_displist(ob, &ob->disp, use_orco_uv);
+ BKE_mesh_from_nurbs_displist(ob, &disp, use_orco_uv);
}
typedef struct EdgeLink {
@@ -1914,445 +1728,10 @@ void BKE_mesh_smooth_flag_set(Object *meshOb, int enableSmooth)
}
}
-void BKE_mesh_calc_normals_mapping(MVert *mverts, int numVerts,
- MLoop *mloop, MPoly *mpolys, int numLoops, int numPolys, float (*polyNors_r)[3],
- MFace *mfaces, int numFaces, int *origIndexFace, float (*faceNors_r)[3])
-{
- BKE_mesh_calc_normals_mapping_ex(mverts, numVerts, mloop, mpolys,
- numLoops, numPolys, polyNors_r, mfaces, numFaces,
- origIndexFace, faceNors_r, FALSE);
-}
-
-void BKE_mesh_calc_normals_mapping_ex(MVert *mverts, int numVerts,
- MLoop *mloop, MPoly *mpolys,
- int numLoops, int numPolys, float (*polyNors_r)[3],
- MFace *mfaces, int numFaces, int *origIndexFace, float (*faceNors_r)[3],
- const bool only_face_normals)
-{
- float (*pnors)[3] = polyNors_r, (*fnors)[3] = faceNors_r;
- int i;
- MFace *mf;
- MPoly *mp;
-
- if (numPolys == 0) {
- return;
- }
-
- /* if we are not calculating verts and no verts were passes then we have nothing to do */
- if ((only_face_normals == TRUE) && (polyNors_r == NULL) && (faceNors_r == NULL)) {
- printf("%s: called with nothing to do\n", __func__);
- return;
- }
-
- if (!pnors) pnors = MEM_callocN(sizeof(float) * 3 * numPolys, "poly_nors mesh.c");
- /* if (!fnors) fnors = MEM_callocN(sizeof(float) * 3 * numFaces, "face nors mesh.c"); */ /* NO NEED TO ALLOC YET */
-
-
- if (only_face_normals == FALSE) {
- /* vertex normals are optional, they require some extra calculations,
- * so make them optional */
- BKE_mesh_calc_normals_poly(mverts, numVerts, mloop, mpolys, numLoops, numPolys, pnors, false);
- }
- else {
- /* only calc poly normals */
- mp = mpolys;
- for (i = 0; i < numPolys; i++, mp++) {
- BKE_mesh_calc_poly_normal(mp, mloop + mp->loopstart, mverts, pnors[i]);
- }
- }
-
- if (origIndexFace &&
- /* fnors == faceNors_r */ /* NO NEED TO ALLOC YET */
- fnors != NULL &&
- numFaces)
- {
- mf = mfaces;
- for (i = 0; i < numFaces; i++, mf++, origIndexFace++) {
- if (*origIndexFace < numPolys) {
- copy_v3_v3(fnors[i], pnors[*origIndexFace]);
- }
- else {
- /* eek, we're not corresponding to polys */
- printf("error in %s: tessellation face indices are incorrect. normals may look bad.\n", __func__);
- }
- }
- }
-
- if (pnors != polyNors_r) MEM_freeN(pnors);
- /* if (fnors != faceNors_r) MEM_freeN(fnors); */ /* NO NEED TO ALLOC YET */
-
- fnors = pnors = NULL;
-
-}
-
-static void mesh_calc_normals_poly_accum(MPoly *mp, MLoop *ml,
- MVert *mvert, float polyno[3], float (*tnorms)[3])
-{
- const int nverts = mp->totloop;
- float (*edgevecbuf)[3] = BLI_array_alloca(edgevecbuf, nverts);
- int i;
-
- /* Polygon Normal and edge-vector */
- /* inline version of #BKE_mesh_calc_poly_normal, also does edge-vectors */
- {
- int i_prev = nverts - 1;
- float const *v_prev = mvert[ml[i_prev].v].co;
- float const *v_curr;
-
- zero_v3(polyno);
- /* Newell's Method */
- for (i = 0; i < nverts; i++) {
- v_curr = mvert[ml[i].v].co;
- add_newell_cross_v3_v3v3(polyno, v_prev, v_curr);
-
- /* Unrelated to normalize, calcualte edge-vector */
- sub_v3_v3v3(edgevecbuf[i_prev], v_prev, v_curr);
- normalize_v3(edgevecbuf[i_prev]);
- i_prev = i;
-
- v_prev = v_curr;
- }
- if (UNLIKELY(normalize_v3(polyno) == 0.0f)) {
- polyno[2] = 1.0f; /* other axis set to 0.0 */
- }
- }
-
- /* accumulate angle weighted face normal */
- /* inline version of #accumulate_vertex_normals_poly */
- {
- const float *prev_edge = edgevecbuf[nverts - 1];
-
- for (i = 0; i < nverts; i++) {
- const float *cur_edge = edgevecbuf[i];
-
- /* calculate angle between the two poly edges incident on
- * this vertex */
- const float fac = saacos(-dot_v3v3(cur_edge, prev_edge));
-
- /* accumulate */
- madd_v3_v3fl(tnorms[ml[i].v], polyno, fac);
- prev_edge = cur_edge;
- }
- }
-
-}
-
-void BKE_mesh_calc_normals_poly(MVert *mverts, int numVerts, MLoop *mloop, MPoly *mpolys,
- int UNUSED(numLoops), int numPolys, float (*r_polynors)[3],
- const bool only_face_normals)
-{
- float (*pnors)[3] = r_polynors;
- float (*tnorms)[3];
- int i;
- MPoly *mp;
-
- if (only_face_normals) {
- BLI_assert(pnors != NULL);
-
-#pragma omp parallel for if (numPolys > BM_OMP_LIMIT)
- for (i = 0; i < numPolys; i++) {
- BKE_mesh_calc_poly_normal(&mpolys[i], mloop + mpolys[i].loopstart, mverts, pnors[i]);
- }
- return;
- }
-
- /* first go through and calculate normals for all the polys */
- tnorms = MEM_callocN(sizeof(*tnorms) * numVerts, __func__);
-
- if (pnors) {
- mp = mpolys;
- for (i = 0; i < numPolys; i++, mp++) {
- mesh_calc_normals_poly_accum(mp, mloop + mp->loopstart, mverts, pnors[i], tnorms);
- }
- }
- else {
- float tpnor[3]; /* temp poly normal */
- mp = mpolys;
- for (i = 0; i < numPolys; i++, mp++) {
- mesh_calc_normals_poly_accum(mp, mloop + mp->loopstart, mverts, tpnor, tnorms);
- }
- }
-
- /* following Mesh convention; we use vertex coordinate itself for normal in this case */
- for (i = 0; i < numVerts; i++) {
- MVert *mv = &mverts[i];
- float *no = tnorms[i];
-
- if (UNLIKELY(normalize_v3(no) == 0.0f)) {
- normalize_v3_v3(no, mv->co);
- }
-
- normal_float_to_short_v3(mv->no, no);
- }
-
- MEM_freeN(tnorms);
-}
-
-void BKE_mesh_calc_normals(Mesh *mesh)
-{
- BKE_mesh_calc_normals_poly(mesh->mvert, mesh->totvert,
- mesh->mloop, mesh->mpoly, mesh->totloop, mesh->totpoly,
- NULL, false);
-}
-
-void BKE_mesh_calc_normals_tessface(MVert *mverts, int numVerts, MFace *mfaces, int numFaces, float (*faceNors_r)[3])
-{
- float (*tnorms)[3] = MEM_callocN(numVerts * sizeof(*tnorms), "tnorms");
- float (*fnors)[3] = (faceNors_r) ? faceNors_r : MEM_callocN(sizeof(*fnors) * numFaces, "meshnormals");
- int i;
-
- for (i = 0; i < numFaces; i++) {
- MFace *mf = &mfaces[i];
- float *f_no = fnors[i];
- float *n4 = (mf->v4) ? tnorms[mf->v4] : NULL;
- float *c4 = (mf->v4) ? mverts[mf->v4].co : NULL;
-
- if (mf->v4)
- normal_quad_v3(f_no, mverts[mf->v1].co, mverts[mf->v2].co, mverts[mf->v3].co, mverts[mf->v4].co);
- else
- normal_tri_v3(f_no, mverts[mf->v1].co, mverts[mf->v2].co, mverts[mf->v3].co);
-
- accumulate_vertex_normals(tnorms[mf->v1], tnorms[mf->v2], tnorms[mf->v3], n4,
- f_no, mverts[mf->v1].co, mverts[mf->v2].co, mverts[mf->v3].co, c4);
- }
-
- /* following Mesh convention; we use vertex coordinate itself for normal in this case */
- for (i = 0; i < numVerts; i++) {
- MVert *mv = &mverts[i];
- float *no = tnorms[i];
-
- if (UNLIKELY(normalize_v3(no) == 0.0f)) {
- normalize_v3_v3(no, mv->co);
- }
-
- normal_float_to_short_v3(mv->no, no);
- }
-
- MEM_freeN(tnorms);
-
- if (fnors != faceNors_r)
- MEM_freeN(fnors);
-}
-
-static void bm_corners_to_loops_ex(ID *id, CustomData *fdata, CustomData *ldata, CustomData *pdata,
- MFace *mface, int totloop, int findex, int loopstart, int numTex, int numCol)
-{
- MTFace *texface;
- MTexPoly *texpoly;
- MCol *mcol;
- MLoopCol *mloopcol;
- MLoopUV *mloopuv;
- MFace *mf;
- int i;
-
- mf = mface + findex;
-
- for (i = 0; i < numTex; i++) {
- texface = CustomData_get_n(fdata, CD_MTFACE, findex, i);
- texpoly = CustomData_get_n(pdata, CD_MTEXPOLY, findex, i);
-
- ME_MTEXFACE_CPY(texpoly, texface);
-
- mloopuv = CustomData_get_n(ldata, CD_MLOOPUV, loopstart, i);
- copy_v2_v2(mloopuv->uv, texface->uv[0]); mloopuv++;
- copy_v2_v2(mloopuv->uv, texface->uv[1]); mloopuv++;
- copy_v2_v2(mloopuv->uv, texface->uv[2]); mloopuv++;
-
- if (mf->v4) {
- copy_v2_v2(mloopuv->uv, texface->uv[3]); mloopuv++;
- }
- }
-
- for (i = 0; i < numCol; i++) {
- mloopcol = CustomData_get_n(ldata, CD_MLOOPCOL, loopstart, i);
- mcol = CustomData_get_n(fdata, CD_MCOL, findex, i);
-
- MESH_MLOOPCOL_FROM_MCOL(mloopcol, &mcol[0]); mloopcol++;
- MESH_MLOOPCOL_FROM_MCOL(mloopcol, &mcol[1]); mloopcol++;
- MESH_MLOOPCOL_FROM_MCOL(mloopcol, &mcol[2]); mloopcol++;
- if (mf->v4) {
- MESH_MLOOPCOL_FROM_MCOL(mloopcol, &mcol[3]); mloopcol++;
- }
- }
-
- if (CustomData_has_layer(fdata, CD_MDISPS)) {
- MDisps *ld = CustomData_get(ldata, loopstart, CD_MDISPS);
- MDisps *fd = CustomData_get(fdata, findex, CD_MDISPS);
- float (*disps)[3] = fd->disps;
- int tot = mf->v4 ? 4 : 3;
- int side, corners;
-
- if (CustomData_external_test(fdata, CD_MDISPS)) {
- if (id && fdata->external) {
- CustomData_external_add(ldata, id, CD_MDISPS,
- totloop, fdata->external->filename);
- }
- }
-
- corners = multires_mdisp_corners(fd);
-
- if (corners == 0) {
- /* Empty MDisp layers appear in at least one of the sintel.blend files.
- * Not sure why this happens, but it seems fine to just ignore them here.
- * If (corners == 0) for a non-empty layer though, something went wrong. */
- BLI_assert(fd->totdisp == 0);
- }
- else {
- side = sqrt(fd->totdisp / corners);
-
- for (i = 0; i < tot; i++, disps += side * side, ld++) {
- ld->totdisp = side * side;
- ld->level = (int)(logf(side - 1.0f) / (float)M_LN2) + 1;
-
- if (ld->disps)
- MEM_freeN(ld->disps);
-
- ld->disps = MEM_mallocN(sizeof(float) * 3 * side * side, "converted loop mdisps");
- if (fd->disps) {
- memcpy(ld->disps, disps, sizeof(float) * 3 * side * side);
- }
- else {
- memset(ld->disps, 0, sizeof(float) * 3 * side * side);
- }
- }
- }
- }
-}
-
-void BKE_mesh_convert_mfaces_to_mpolys(Mesh *mesh)
-{
- BKE_mesh_convert_mfaces_to_mpolys_ex(&mesh->id, &mesh->fdata, &mesh->ldata, &mesh->pdata,
- mesh->totedge, mesh->totface, mesh->totloop, mesh->totpoly,
- mesh->medge, mesh->mface,
- &mesh->totloop, &mesh->totpoly, &mesh->mloop, &mesh->mpoly);
-
- BKE_mesh_update_customdata_pointers(mesh, true);
-}
-
-/* the same as BKE_mesh_convert_mfaces_to_mpolys but oriented to be used in do_versions from readfile.c
- * the difference is how active/render/clone/stencil indices are handled here
- *
- * normally thay're being set from pdata which totally makes sense for meshes which are already
- * converted to bmesh structures, but when loading older files indices shall be updated in other
- * way around, so newly added pdata and ldata would have this indices set based on fdata layer
- *
- * this is normally only needed when reading older files, in all other cases BKE_mesh_convert_mfaces_to_mpolys
- * shall be always used
+/**
+ * Return a newly MEM_malloc'd array of all the mesh vertex locations
+ * \note \a numVerts_r may be NULL
*/
-void BKE_mesh_do_versions_convert_mfaces_to_mpolys(Mesh *mesh)
-{
- BKE_mesh_convert_mfaces_to_mpolys_ex(&mesh->id, &mesh->fdata, &mesh->ldata, &mesh->pdata,
- mesh->totedge, mesh->totface, mesh->totloop, mesh->totpoly,
- mesh->medge, mesh->mface,
- &mesh->totloop, &mesh->totpoly, &mesh->mloop, &mesh->mpoly);
-
- CustomData_bmesh_do_versions_update_active_layers(&mesh->fdata, &mesh->pdata, &mesh->ldata);
-
- BKE_mesh_update_customdata_pointers(mesh, true);
-}
-
-void BKE_mesh_convert_mfaces_to_mpolys_ex(ID *id, CustomData *fdata, CustomData *ldata, CustomData *pdata,
- int totedge_i, int totface_i, int totloop_i, int totpoly_i,
- MEdge *medge, MFace *mface,
- int *totloop_r, int *totpoly_r,
- MLoop **mloop_r, MPoly **mpoly_r)
-{
- MFace *mf;
- MLoop *ml, *mloop;
- MPoly *mp, *mpoly;
- MEdge *me;
- EdgeHash *eh;
- int numTex, numCol;
- int i, j, totloop, totpoly, *polyindex;
-
- /* just in case some of these layers are filled in (can happen with python created meshes) */
- CustomData_free(ldata, totloop_i);
- CustomData_free(pdata, totpoly_i);
-
- totpoly = totface_i;
- mpoly = MEM_callocN(sizeof(MPoly) * totpoly, "mpoly converted");
- CustomData_add_layer(pdata, CD_MPOLY, CD_ASSIGN, mpoly, totpoly);
-
- numTex = CustomData_number_of_layers(fdata, CD_MTFACE);
- numCol = CustomData_number_of_layers(fdata, CD_MCOL);
-
- totloop = 0;
- mf = mface;
- for (i = 0; i < totface_i; i++, mf++) {
- totloop += mf->v4 ? 4 : 3;
- }
-
- mloop = MEM_callocN(sizeof(MLoop) * totloop, "mloop converted");
-
- CustomData_add_layer(ldata, CD_MLOOP, CD_ASSIGN, mloop, totloop);
-
- CustomData_to_bmeshpoly(fdata, pdata, ldata, totloop, totpoly);
-
- if (id) {
- /* ensure external data is transferred */
- CustomData_external_read(fdata, id, CD_MASK_MDISPS, totface_i);
- }
-
- eh = BLI_edgehash_new();
-
- /* build edge hash */
- me = medge;
- for (i = 0; i < totedge_i; i++, me++) {
- BLI_edgehash_insert(eh, me->v1, me->v2, SET_INT_IN_POINTER(i));
-
- /* unrelated but avoid having the FGON flag enabled, so we can reuse it later for something else */
- me->flag &= ~ME_FGON;
- }
-
- polyindex = CustomData_get_layer(fdata, CD_ORIGINDEX);
-
- j = 0; /* current loop index */
- ml = mloop;
- mf = mface;
- mp = mpoly;
- for (i = 0; i < totface_i; i++, mf++, mp++) {
- mp->loopstart = j;
-
- mp->totloop = mf->v4 ? 4 : 3;
-
- mp->mat_nr = mf->mat_nr;
- mp->flag = mf->flag;
-
-# define ML(v1, v2) { \
- ml->v = mf->v1; ml->e = GET_INT_FROM_POINTER(BLI_edgehash_lookup(eh, mf->v1, mf->v2)); ml++; j++; \
- } (void)0
-
- ML(v1, v2);
- ML(v2, v3);
- if (mf->v4) {
- ML(v3, v4);
- ML(v4, v1);
- }
- else {
- ML(v3, v1);
- }
-
-# undef ML
-
- bm_corners_to_loops_ex(id, fdata, ldata, pdata, mface, totloop, i, mp->loopstart, numTex, numCol);
-
- if (polyindex) {
- *polyindex = i;
- polyindex++;
- }
- }
-
- /* note, we don't convert NGons at all, these are not even real ngons,
- * they have their own UV's, colors etc - its more an editing feature. */
-
- BLI_edgehash_free(eh, NULL);
-
- *totpoly_r = totpoly;
- *totloop_r = totloop;
- *mpoly_r = mpoly;
- *mloop_r = mloop;
-}
-
float (*BKE_mesh_vertexCos_get(Mesh *me, int *r_numVerts))[3]
{
int i, numVerts = me->totvert;
@@ -2365,1069 +1744,10 @@ float (*BKE_mesh_vertexCos_get(Mesh *me, int *r_numVerts))[3]
return cos;
}
-
-/* ngon version wip, based on EDBM_uv_vert_map_create */
-/* this replaces the non bmesh function (in trunk) which takes MTFace's, if we ever need it back we could
- * but for now this replaces it because its unused. */
-
-UvVertMap *BKE_mesh_uv_vert_map_create(struct MPoly *mpoly, struct MLoop *mloop, struct MLoopUV *mloopuv,
- unsigned int totpoly, unsigned int totvert, int selected, float *limit)
-{
- UvVertMap *vmap;
- UvMapVert *buf;
- MPoly *mp;
- unsigned int a;
- int i, totuv, nverts;
-
- totuv = 0;
-
- /* generate UvMapVert array */
- mp = mpoly;
- for (a = 0; a < totpoly; a++, mp++)
- if (!selected || (!(mp->flag & ME_HIDE) && (mp->flag & ME_FACE_SEL)))
- totuv += mp->totloop;
-
- if (totuv == 0)
- return NULL;
-
- vmap = (UvVertMap *)MEM_callocN(sizeof(*vmap), "UvVertMap");
- if (!vmap)
- return NULL;
-
- vmap->vert = (UvMapVert **)MEM_callocN(sizeof(*vmap->vert) * totvert, "UvMapVert*");
- buf = vmap->buf = (UvMapVert *)MEM_callocN(sizeof(*vmap->buf) * totuv, "UvMapVert");
-
- if (!vmap->vert || !vmap->buf) {
- BKE_mesh_uv_vert_map_free(vmap);
- return NULL;
- }
-
- mp = mpoly;
- for (a = 0; a < totpoly; a++, mp++) {
- if (!selected || (!(mp->flag & ME_HIDE) && (mp->flag & ME_FACE_SEL))) {
- nverts = mp->totloop;
-
- for (i = 0; i < nverts; i++) {
- buf->tfindex = i;
- buf->f = a;
- buf->separate = 0;
- buf->next = vmap->vert[mloop[mp->loopstart + i].v];
- vmap->vert[mloop[mp->loopstart + i].v] = buf;
- buf++;
- }
- }
- }
-
- /* sort individual uvs for each vert */
- for (a = 0; a < totvert; a++) {
- UvMapVert *newvlist = NULL, *vlist = vmap->vert[a];
- UvMapVert *iterv, *v, *lastv, *next;
- float *uv, *uv2, uvdiff[2];
-
- while (vlist) {
- v = vlist;
- vlist = vlist->next;
- v->next = newvlist;
- newvlist = v;
-
- uv = mloopuv[mpoly[v->f].loopstart + v->tfindex].uv;
- lastv = NULL;
- iterv = vlist;
-
- while (iterv) {
- next = iterv->next;
-
- uv2 = mloopuv[mpoly[iterv->f].loopstart + iterv->tfindex].uv;
- sub_v2_v2v2(uvdiff, uv2, uv);
-
-
- if (fabsf(uv[0] - uv2[0]) < limit[0] && fabsf(uv[1] - uv2[1]) < limit[1]) {
- if (lastv) lastv->next = next;
- else vlist = next;
- iterv->next = newvlist;
- newvlist = iterv;
- }
- else
- lastv = iterv;
-
- iterv = next;
- }
-
- newvlist->separate = 1;
- }
-
- vmap->vert[a] = newvlist;
- }
-
- return vmap;
-}
-
-UvMapVert *BKE_mesh_uv_vert_map_get_vert(UvVertMap *vmap, unsigned int v)
-{
- return vmap->vert[v];
-}
-
-void BKE_mesh_uv_vert_map_free(UvVertMap *vmap)
-{
- if (vmap) {
- if (vmap->vert) MEM_freeN(vmap->vert);
- if (vmap->buf) MEM_freeN(vmap->buf);
- MEM_freeN(vmap);
- }
-}
-
-/* Generates a map where the key is the vertex and the value is a list
- * of polys that use that vertex as a corner. The lists are allocated
- * from one memory pool. */
-void BKE_mesh_vert_poly_map_create(MeshElemMap **r_map, int **r_mem,
- const MPoly *mpoly, const MLoop *mloop,
- int totvert, int totpoly, int totloop)
-{
- MeshElemMap *map = MEM_callocN(sizeof(MeshElemMap) * totvert, "vert poly map");
- int *indices, *index_iter;
- int i, j;
-
- indices = index_iter = MEM_mallocN(sizeof(int) * totloop, "vert poly map mem");
-
- /* Count number of polys for each vertex */
- for (i = 0; i < totpoly; i++) {
- const MPoly *p = &mpoly[i];
-
- for (j = 0; j < p->totloop; j++)
- map[mloop[p->loopstart + j].v].count++;
- }
-
- /* Assign indices mem */
- for (i = 0; i < totvert; i++) {
- map[i].indices = index_iter;
- index_iter += map[i].count;
-
- /* Reset 'count' for use as index in last loop */
- map[i].count = 0;
- }
-
- /* Find the users */
- for (i = 0; i < totpoly; i++) {
- const MPoly *p = &mpoly[i];
-
- for (j = 0; j < p->totloop; j++) {
- int v = mloop[p->loopstart + j].v;
-
- map[v].indices[map[v].count] = i;
- map[v].count++;
- }
- }
-
- *r_map = map;
- *r_mem = indices;
-}
-
-/* Generates a map where the key is the vertex and the value is a list
- * of edges that use that vertex as an endpoint. The lists are allocated
- * from one memory pool. */
-void BKE_mesh_vert_edge_map_create(MeshElemMap **r_map, int **r_mem,
- const MEdge *medge, int totvert, int totedge)
-{
- MeshElemMap *map = MEM_callocN(sizeof(MeshElemMap) * totvert, "vert-edge map");
- int *indices = MEM_mallocN(sizeof(int) * totedge * 2, "vert-edge map mem");
- int *i_pt = indices;
-
- int i;
-
- /* Count number of edges for each vertex */
- for (i = 0; i < totedge; i++) {
- map[medge[i].v1].count++;
- map[medge[i].v2].count++;
- }
-
- /* Assign indices mem */
- for (i = 0; i < totvert; i++) {
- map[i].indices = i_pt;
- i_pt += map[i].count;
-
- /* Reset 'count' for use as index in last loop */
- map[i].count = 0;
- }
-
- /* Find the users */
- for (i = 0; i < totedge; i++) {
- const int v[2] = {medge[i].v1, medge[i].v2};
-
- map[v[0]].indices[map[v[0]].count] = i;
- map[v[1]].indices[map[v[1]].count] = i;
-
- map[v[0]].count++;
- map[v[1]].count++;
- }
-
- *r_map = map;
- *r_mem = indices;
-}
-
-void BKE_mesh_edge_poly_map_create(MeshElemMap **r_map, int **r_mem,
- const MEdge *UNUSED(medge), const int totedge,
- const MPoly *mpoly, const int totpoly,
- const MLoop *mloop, const int totloop)
-{
- MeshElemMap *map = MEM_callocN(sizeof(MeshElemMap) * totedge, "edge-poly map");
- int *indices = MEM_mallocN(sizeof(int) * totloop, "edge-poly map mem");
- int *index_step;
- const MPoly *mp;
- int i;
-
- /* count face users */
- for (i = 0, mp = mpoly; i < totpoly; mp++, i++) {
- const MLoop *ml;
- int j = mp->totloop;
- for (ml = &mloop[mp->loopstart]; j--; ml++) {
- map[ml->e].count++;
- }
- }
-
- /* create offsets */
- index_step = indices;
- for (i = 0; i < totedge; i++) {
- map[i].indices = index_step;
- index_step += map[i].count;
-
- /* re-count, using this as an index below */
- map[i].count = 0;
-
- }
-
- /* assign poly-edge users */
- for (i = 0, mp = mpoly; i < totpoly; mp++, i++) {
- const MLoop *ml;
- int j = mp->totloop;
- for (ml = &mloop[mp->loopstart]; j--; ml++) {
- MeshElemMap *map_ele = &map[ml->e];
- map_ele->indices[map_ele->count++] = i;
- }
- }
-
- *r_map = map;
- *r_mem = indices;
-}
-
-void BKE_mesh_loops_to_mface_corners(CustomData *fdata, CustomData *ldata,
- CustomData *pdata, int lindex[4], int findex,
- const int polyindex,
- const int mf_len, /* 3 or 4 */
-
- /* cache values to avoid lookups every time */
- const int numTex, /* CustomData_number_of_layers(pdata, CD_MTEXPOLY) */
- const int numCol, /* CustomData_number_of_layers(ldata, CD_MLOOPCOL) */
- const int hasPCol, /* CustomData_has_layer(ldata, CD_PREVIEW_MLOOPCOL) */
- const int hasOrigSpace /* CustomData_has_layer(ldata, CD_ORIGSPACE_MLOOP) */
- )
-{
- MTFace *texface;
- MTexPoly *texpoly;
- MCol *mcol;
- MLoopCol *mloopcol;
- MLoopUV *mloopuv;
- int i, j;
-
- for (i = 0; i < numTex; i++) {
- texface = CustomData_get_n(fdata, CD_MTFACE, findex, i);
- texpoly = CustomData_get_n(pdata, CD_MTEXPOLY, polyindex, i);
-
- ME_MTEXFACE_CPY(texface, texpoly);
-
- for (j = 0; j < mf_len; j++) {
- mloopuv = CustomData_get_n(ldata, CD_MLOOPUV, lindex[j], i);
- copy_v2_v2(texface->uv[j], mloopuv->uv);
- }
- }
-
- for (i = 0; i < numCol; i++) {
- mcol = CustomData_get_n(fdata, CD_MCOL, findex, i);
-
- for (j = 0; j < mf_len; j++) {
- mloopcol = CustomData_get_n(ldata, CD_MLOOPCOL, lindex[j], i);
- MESH_MLOOPCOL_TO_MCOL(mloopcol, &mcol[j]);
- }
- }
-
- if (hasPCol) {
- mcol = CustomData_get(fdata, findex, CD_PREVIEW_MCOL);
-
- for (j = 0; j < mf_len; j++) {
- mloopcol = CustomData_get(ldata, lindex[j], CD_PREVIEW_MLOOPCOL);
- MESH_MLOOPCOL_TO_MCOL(mloopcol, &mcol[j]);
- }
- }
-
- if (hasOrigSpace) {
- OrigSpaceFace *of = CustomData_get(fdata, findex, CD_ORIGSPACE);
- OrigSpaceLoop *lof;
-
- for (j = 0; j < mf_len; j++) {
- lof = CustomData_get(ldata, lindex[j], CD_ORIGSPACE_MLOOP);
- copy_v2_v2(of->uv[j], lof->uv);
- }
- }
-}
-
-/*
- * this function recreates a tessellation.
- * returns number of tessellation faces.
- */
-int BKE_mesh_recalc_tessellation(CustomData *fdata,
- CustomData *ldata, CustomData *pdata,
- MVert *mvert, int totface, int totloop,
- int totpoly,
- /* when tessellating to recalculate normals after
- * we can skip copying here */
- const bool do_face_nor_cpy)
-{
- /* use this to avoid locking pthread for _every_ polygon
- * and calling the fill function */
-
-#define USE_TESSFACE_SPEEDUP
-#define USE_TESSFACE_QUADS // NEEDS FURTHER TESTING
-
-#define TESSFACE_SCANFILL (1 << 0)
-#define TESSFACE_IS_QUAD (1 << 1)
-
- const int looptris_tot = poly_to_tri_count(totpoly, totloop);
-
- MPoly *mp, *mpoly;
- MLoop *ml, *mloop;
- MFace *mface, *mf;
- ScanFillContext sf_ctx;
- ScanFillVert *sf_vert, *sf_vert_last, *sf_vert_first;
- ScanFillFace *sf_tri;
- int *mface_to_poly_map;
- int lindex[4]; /* only ever use 3 in this case */
- int poly_index, j, mface_index;
-
- const int numTex = CustomData_number_of_layers(pdata, CD_MTEXPOLY);
- const int numCol = CustomData_number_of_layers(ldata, CD_MLOOPCOL);
- const int hasPCol = CustomData_has_layer(ldata, CD_PREVIEW_MLOOPCOL);
- const int hasOrigSpace = CustomData_has_layer(ldata, CD_ORIGSPACE_MLOOP);
-
- mpoly = CustomData_get_layer(pdata, CD_MPOLY);
- mloop = CustomData_get_layer(ldata, CD_MLOOP);
-
- /* allocate the length of totfaces, avoid many small reallocs,
- * if all faces are tri's it will be correct, quads == 2x allocs */
- /* take care. we are _not_ calloc'ing so be sure to initialize each field */
- mface_to_poly_map = MEM_mallocN(sizeof(*mface_to_poly_map) * looptris_tot, __func__);
- mface = MEM_mallocN(sizeof(*mface) * looptris_tot, __func__);
-
- mface_index = 0;
- mp = mpoly;
- for (poly_index = 0; poly_index < totpoly; poly_index++, mp++) {
- if (mp->totloop < 3) {
- /* do nothing */
- }
-
-#ifdef USE_TESSFACE_SPEEDUP
-
-#define ML_TO_MF(i1, i2, i3) \
- mface_to_poly_map[mface_index] = poly_index; \
- mf = &mface[mface_index]; \
- /* set loop indices, transformed to vert indices later */ \
- mf->v1 = mp->loopstart + i1; \
- mf->v2 = mp->loopstart + i2; \
- mf->v3 = mp->loopstart + i3; \
- mf->v4 = 0; \
- mf->mat_nr = mp->mat_nr; \
- mf->flag = mp->flag; \
- mf->edcode = 0; \
- (void)0
-
-/* ALMOST IDENTICAL TO DEFINE ABOVE (see EXCEPTION) */
-#define ML_TO_MF_QUAD() \
- mface_to_poly_map[mface_index] = poly_index; \
- mf = &mface[mface_index]; \
- /* set loop indices, transformed to vert indices later */ \
- mf->v1 = mp->loopstart + 0; /* EXCEPTION */ \
- mf->v2 = mp->loopstart + 1; /* EXCEPTION */ \
- mf->v3 = mp->loopstart + 2; /* EXCEPTION */ \
- mf->v4 = mp->loopstart + 3; /* EXCEPTION */ \
- mf->mat_nr = mp->mat_nr; \
- mf->flag = mp->flag; \
- mf->edcode = TESSFACE_IS_QUAD; /* EXCEPTION */ \
- (void)0
-
-
- else if (mp->totloop == 3) {
- ML_TO_MF(0, 1, 2);
- mface_index++;
- }
- else if (mp->totloop == 4) {
-#ifdef USE_TESSFACE_QUADS
- ML_TO_MF_QUAD();
- mface_index++;
-#else
- ML_TO_MF(0, 1, 2);
- mface_index++;
- ML_TO_MF(0, 2, 3);
- mface_index++;
-#endif
- }
-#endif /* USE_TESSFACE_SPEEDUP */
- else {
-#define USE_TESSFACE_CALCNORMAL
-
- int totfilltri;
-
-#ifdef USE_TESSFACE_CALCNORMAL
- float normal[3];
- zero_v3(normal);
-#endif
- ml = mloop + mp->loopstart;
-
- BLI_scanfill_begin(&sf_ctx);
- sf_vert_first = NULL;
- sf_vert_last = NULL;
- for (j = 0; j < mp->totloop; j++, ml++) {
- sf_vert = BLI_scanfill_vert_add(&sf_ctx, mvert[ml->v].co);
-
- sf_vert->keyindex = mp->loopstart + j;
-
- if (sf_vert_last) {
- BLI_scanfill_edge_add(&sf_ctx, sf_vert_last, sf_vert);
-#ifdef USE_TESSFACE_CALCNORMAL
- add_newell_cross_v3_v3v3(normal, sf_vert_last->co, sf_vert->co);
-#endif
- }
-
- if (!sf_vert_first)
- sf_vert_first = sf_vert;
- sf_vert_last = sf_vert;
- }
- BLI_scanfill_edge_add(&sf_ctx, sf_vert_last, sf_vert_first);
-#ifdef USE_TESSFACE_CALCNORMAL
- add_newell_cross_v3_v3v3(normal, sf_vert_last->co, sf_vert_first->co);
- if (UNLIKELY(normalize_v3(normal) == 0.0f)) {
- normal[2] = 1.0f;
- }
- totfilltri = BLI_scanfill_calc_ex(&sf_ctx, 0, normal);
-#else
- totfilltri = BLI_scanfill_calc(&sf_ctx, 0);
-#endif
- BLI_assert(totfilltri <= mp->totloop - 2);
- (void)totfilltri;
-
- for (sf_tri = sf_ctx.fillfacebase.first; sf_tri; sf_tri = sf_tri->next, mf++) {
- mface_to_poly_map[mface_index] = poly_index;
- mf = &mface[mface_index];
-
- /* set loop indices, transformed to vert indices later */
- mf->v1 = sf_tri->v1->keyindex;
- mf->v2 = sf_tri->v2->keyindex;
- mf->v3 = sf_tri->v3->keyindex;
- mf->v4 = 0;
-
- mf->mat_nr = mp->mat_nr;
- mf->flag = mp->flag;
-
-#ifdef USE_TESSFACE_SPEEDUP
- mf->edcode = TESSFACE_SCANFILL; /* tag for sorting loop indices */
-#endif
-
- mface_index++;
- }
-
- BLI_scanfill_end(&sf_ctx);
-
-#undef USE_TESSFACE_CALCNORMAL
- }
- }
-
- CustomData_free(fdata, totface);
- totface = mface_index;
-
- BLI_assert(totface <= looptris_tot);
-
- /* not essential but without this we store over-alloc'd memory in the CustomData layers */
- if (LIKELY(looptris_tot != totface)) {
- mface = MEM_reallocN(mface, sizeof(*mface) * totface);
- mface_to_poly_map = MEM_reallocN(mface_to_poly_map, sizeof(*mface_to_poly_map) * totface);
- }
-
- CustomData_add_layer(fdata, CD_MFACE, CD_ASSIGN, mface, totface);
-
- /* CD_ORIGINDEX will contain an array of indices from tessfaces to the polygons
- * they are directly tessellated from */
- CustomData_add_layer(fdata, CD_ORIGINDEX, CD_ASSIGN, mface_to_poly_map, totface);
- CustomData_from_bmeshpoly(fdata, pdata, ldata, totface);
-
- if (do_face_nor_cpy) {
- /* If polys have a normals layer, copying that to faces can help
- * avoid the need to recalculate normals later */
- if (CustomData_has_layer(pdata, CD_NORMAL)) {
- float (*pnors)[3] = CustomData_get_layer(pdata, CD_NORMAL);
- float (*fnors)[3] = CustomData_add_layer(fdata, CD_NORMAL, CD_CALLOC, NULL, totface);
- for (mface_index = 0; mface_index < totface; mface_index++) {
- copy_v3_v3(fnors[mface_index], pnors[mface_to_poly_map[mface_index]]);
- }
- }
- }
-
- mf = mface;
- for (mface_index = 0; mface_index < totface; mface_index++, mf++) {
-
-#ifdef USE_TESSFACE_QUADS
- const int mf_len = mf->edcode & TESSFACE_IS_QUAD ? 4 : 3;
-#endif
-
-#ifdef USE_TESSFACE_SPEEDUP
- /* skip sorting when not using ngons */
- if (UNLIKELY(mf->edcode & TESSFACE_SCANFILL))
-#endif
- {
- /* sort loop indices to ensure winding is correct */
- if (mf->v1 > mf->v2) SWAP(unsigned int, mf->v1, mf->v2);
- if (mf->v2 > mf->v3) SWAP(unsigned int, mf->v2, mf->v3);
- if (mf->v1 > mf->v2) SWAP(unsigned int, mf->v1, mf->v2);
-
- if (mf->v1 > mf->v2) SWAP(unsigned int, mf->v1, mf->v2);
- if (mf->v2 > mf->v3) SWAP(unsigned int, mf->v2, mf->v3);
- if (mf->v1 > mf->v2) SWAP(unsigned int, mf->v1, mf->v2);
- }
-
- /* end abusing the edcode */
-#if defined(USE_TESSFACE_QUADS) || defined(USE_TESSFACE_SPEEDUP)
- mf->edcode = 0;
-#endif
-
-
- lindex[0] = mf->v1;
- lindex[1] = mf->v2;
- lindex[2] = mf->v3;
-#ifdef USE_TESSFACE_QUADS
- if (mf_len == 4) lindex[3] = mf->v4;
-#endif
-
- /*transform loop indices to vert indices*/
- mf->v1 = mloop[mf->v1].v;
- mf->v2 = mloop[mf->v2].v;
- mf->v3 = mloop[mf->v3].v;
-#ifdef USE_TESSFACE_QUADS
- if (mf_len == 4) mf->v4 = mloop[mf->v4].v;
-#endif
-
- BKE_mesh_loops_to_mface_corners(fdata, ldata, pdata,
- lindex, mface_index, mface_to_poly_map[mface_index],
-#ifdef USE_TESSFACE_QUADS
- mf_len,
-#else
- 3,
-#endif
- numTex, numCol, hasPCol, hasOrigSpace);
-
-
-#ifdef USE_TESSFACE_QUADS
- test_index_face(mf, fdata, mface_index, mf_len);
-#endif
-
- }
-
- return totface;
-
-#undef USE_TESSFACE_SPEEDUP
-
-}
-
-
-#ifdef USE_BMESH_SAVE_AS_COMPAT
-
-/*
- * this function recreates a tessellation.
- * returns number of tessellation faces.
- */
-int BKE_mesh_mpoly_to_mface(struct CustomData *fdata, struct CustomData *ldata,
- struct CustomData *pdata, int totface, int UNUSED(totloop), int totpoly)
-{
- MLoop *mloop;
-
- int lindex[4];
- int i;
- int k;
-
- MPoly *mp, *mpoly;
- MFace *mface = NULL, *mf;
- BLI_array_declare(mface);
-
- const int numTex = CustomData_number_of_layers(pdata, CD_MTEXPOLY);
- const int numCol = CustomData_number_of_layers(ldata, CD_MLOOPCOL);
- const int hasPCol = CustomData_has_layer(ldata, CD_PREVIEW_MLOOPCOL);
- const int hasOrigSpace = CustomData_has_layer(ldata, CD_ORIGSPACE_MLOOP);
-
- mpoly = CustomData_get_layer(pdata, CD_MPOLY);
- mloop = CustomData_get_layer(ldata, CD_MLOOP);
-
- mp = mpoly;
- k = 0;
- for (i = 0; i < totpoly; i++, mp++) {
- if (ELEM(mp->totloop, 3, 4)) {
- BLI_array_grow_one(mface);
- mf = &mface[k];
-
- mf->mat_nr = mp->mat_nr;
- mf->flag = mp->flag;
-
- mf->v1 = mp->loopstart + 0;
- mf->v2 = mp->loopstart + 1;
- mf->v3 = mp->loopstart + 2;
- mf->v4 = (mp->totloop == 4) ? (mp->loopstart + 3) : 0;
-
- /* abuse edcode for temp storage and clear next loop */
- mf->edcode = (char)mp->totloop; /* only ever 3 or 4 */
-
- k++;
- }
- }
-
- CustomData_free(fdata, totface);
-
- totface = k;
-
- CustomData_add_layer(fdata, CD_MFACE, CD_ASSIGN, mface, totface);
-
- CustomData_from_bmeshpoly(fdata, pdata, ldata, totface);
-
- mp = mpoly;
- k = 0;
- for (i = 0; i < totpoly; i++, mp++) {
- if (ELEM(mp->totloop, 3, 4)) {
- mf = &mface[k];
-
- if (mf->edcode == 3) {
- /* sort loop indices to ensure winding is correct */
- /* NO SORT - looks like we can skip this */
-
- lindex[0] = mf->v1;
- lindex[1] = mf->v2;
- lindex[2] = mf->v3;
- lindex[3] = 0; /* unused */
-
- /* transform loop indices to vert indices */
- mf->v1 = mloop[mf->v1].v;
- mf->v2 = mloop[mf->v2].v;
- mf->v3 = mloop[mf->v3].v;
-
- BKE_mesh_loops_to_mface_corners(fdata, ldata, pdata,
- lindex, k, i, 3,
- numTex, numCol, hasPCol, hasOrigSpace);
- test_index_face(mf, fdata, k, 3);
- }
- else {
- /* sort loop indices to ensure winding is correct */
- /* NO SORT - looks like we can skip this */
-
- lindex[0] = mf->v1;
- lindex[1] = mf->v2;
- lindex[2] = mf->v3;
- lindex[3] = mf->v4;
-
- /* transform loop indices to vert indices */
- mf->v1 = mloop[mf->v1].v;
- mf->v2 = mloop[mf->v2].v;
- mf->v3 = mloop[mf->v3].v;
- mf->v4 = mloop[mf->v4].v;
-
- BKE_mesh_loops_to_mface_corners(fdata, ldata, pdata,
- lindex, k, i, 4,
- numTex, numCol, hasPCol, hasOrigSpace);
- test_index_face(mf, fdata, k, 4);
- }
-
- mf->edcode = 0;
-
- k++;
- }
- }
-
- return k;
-}
-#endif /* USE_BMESH_SAVE_AS_COMPAT */
-
-/*
- * COMPUTE POLY NORMAL
- *
- * Computes the normal of a planar
- * polygon See Graphics Gems for
- * computing newell normal.
- *
- */
-static void mesh_calc_ngon_normal(MPoly *mpoly, MLoop *loopstart,
- MVert *mvert, float normal[3])
-{
- const int nverts = mpoly->totloop;
- float const *v_prev = mvert[loopstart[nverts - 1].v].co;
- float const *v_curr;
- int i;
-
- zero_v3(normal);
-
- /* Newell's Method */
- for (i = 0; i < nverts; i++) {
- v_curr = mvert[loopstart[i].v].co;
- add_newell_cross_v3_v3v3(normal, v_prev, v_curr);
- v_prev = v_curr;
- }
-
- if (UNLIKELY(normalize_v3(normal) == 0.0f)) {
- normal[2] = 1.0f; /* other axis set to 0.0 */
- }
-}
-
-void BKE_mesh_calc_poly_normal(MPoly *mpoly, MLoop *loopstart,
- MVert *mvarray, float no[3])
-{
- if (mpoly->totloop > 4) {
- mesh_calc_ngon_normal(mpoly, loopstart, mvarray, no);
- }
- else if (mpoly->totloop == 3) {
- normal_tri_v3(no,
- mvarray[loopstart[0].v].co,
- mvarray[loopstart[1].v].co,
- mvarray[loopstart[2].v].co
- );
- }
- else if (mpoly->totloop == 4) {
- normal_quad_v3(no,
- mvarray[loopstart[0].v].co,
- mvarray[loopstart[1].v].co,
- mvarray[loopstart[2].v].co,
- mvarray[loopstart[3].v].co
- );
- }
- else { /* horrible, two sided face! */
- no[0] = 0.0;
- no[1] = 0.0;
- no[2] = 1.0;
- }
-}
-/* duplicate of function above _but_ takes coords rather then mverts */
-static void mesh_calc_ngon_normal_coords(MPoly *mpoly, MLoop *loopstart,
- const float (*vertex_coords)[3], float normal[3])
-{
- const int nverts = mpoly->totloop;
- float const *v_prev = vertex_coords[loopstart[nverts - 1].v];
- float const *v_curr;
- int i;
-
- zero_v3(normal);
-
- /* Newell's Method */
- for (i = 0; i < nverts; i++) {
- v_curr = vertex_coords[loopstart[i].v];
- add_newell_cross_v3_v3v3(normal, v_prev, v_curr);
- v_prev = v_curr;
- }
-
- if (UNLIKELY(normalize_v3(normal) == 0.0f)) {
- normal[2] = 1.0f; /* other axis set to 0.0 */
- }
-}
-
-void BKE_mesh_calc_poly_normal_coords(MPoly *mpoly, MLoop *loopstart,
- const float (*vertex_coords)[3], float no[3])
-{
- if (mpoly->totloop > 4) {
- mesh_calc_ngon_normal_coords(mpoly, loopstart, vertex_coords, no);
- }
- else if (mpoly->totloop == 3) {
- normal_tri_v3(no,
- vertex_coords[loopstart[0].v],
- vertex_coords[loopstart[1].v],
- vertex_coords[loopstart[2].v]
- );
- }
- else if (mpoly->totloop == 4) {
- normal_quad_v3(no,
- vertex_coords[loopstart[0].v],
- vertex_coords[loopstart[1].v],
- vertex_coords[loopstart[2].v],
- vertex_coords[loopstart[3].v]
- );
- }
- else { /* horrible, two sided face! */
- no[0] = 0.0;
- no[1] = 0.0;
- no[2] = 1.0;
- }
-}
-
-static void mesh_calc_ngon_center(MPoly *mpoly, MLoop *loopstart,
- MVert *mvert, float cent[3])
-{
- const float w = 1.0f / (float)mpoly->totloop;
- int i;
-
- zero_v3(cent);
-
- for (i = 0; i < mpoly->totloop; i++) {
- madd_v3_v3fl(cent, mvert[(loopstart++)->v].co, w);
- }
-}
-
-void BKE_mesh_calc_poly_center(MPoly *mpoly, MLoop *loopstart,
- MVert *mvarray, float cent[3])
-{
- if (mpoly->totloop == 3) {
- cent_tri_v3(cent,
- mvarray[loopstart[0].v].co,
- mvarray[loopstart[1].v].co,
- mvarray[loopstart[2].v].co
- );
- }
- else if (mpoly->totloop == 4) {
- cent_quad_v3(cent,
- mvarray[loopstart[0].v].co,
- mvarray[loopstart[1].v].co,
- mvarray[loopstart[2].v].co,
- mvarray[loopstart[3].v].co
- );
- }
- else {
- mesh_calc_ngon_center(mpoly, loopstart, mvarray, cent);
- }
-}
-
-/* note, passing polynormal is only a speedup so we can skip calculating it */
-float BKE_mesh_calc_poly_area(MPoly *mpoly, MLoop *loopstart,
- MVert *mvarray, const float polynormal[3])
-{
- if (mpoly->totloop == 3) {
- return area_tri_v3(mvarray[loopstart[0].v].co,
- mvarray[loopstart[1].v].co,
- mvarray[loopstart[2].v].co
- );
- }
- else if (mpoly->totloop == 4) {
- return area_quad_v3(mvarray[loopstart[0].v].co,
- mvarray[loopstart[1].v].co,
- mvarray[loopstart[2].v].co,
- mvarray[loopstart[3].v].co
- );
- }
- else {
- int i;
- MLoop *l_iter = loopstart;
- float area, polynorm_local[3];
- float (*vertexcos)[3] = BLI_array_alloca(vertexcos, mpoly->totloop);
- const float *no = polynormal ? polynormal : polynorm_local;
-
- /* pack vertex cos into an array for area_poly_v3 */
- for (i = 0; i < mpoly->totloop; i++, l_iter++) {
- copy_v3_v3(vertexcos[i], mvarray[l_iter->v].co);
- }
-
- /* need normal for area_poly_v3 as well */
- if (polynormal == NULL) {
- BKE_mesh_calc_poly_normal(mpoly, loopstart, mvarray, polynorm_local);
- }
-
- /* finally calculate the area */
- area = area_poly_v3(mpoly->totloop, vertexcos, no);
-
- return area;
- }
-}
-
-/* note, results won't be correct if polygon is non-planar */
-static float mesh_calc_poly_planar_area_centroid(MPoly *mpoly, MLoop *loopstart, MVert *mvarray, float cent[3])
-{
- int i;
- float tri_area;
- float total_area = 0.0f;
- float v1[3], v2[3], v3[3], normal[3], tri_cent[3];
-
- BKE_mesh_calc_poly_normal(mpoly, loopstart, mvarray, normal);
- copy_v3_v3(v1, mvarray[loopstart[0].v].co);
- copy_v3_v3(v2, mvarray[loopstart[1].v].co);
- zero_v3(cent);
-
- for (i = 2; i < mpoly->totloop; i++) {
- copy_v3_v3(v3, mvarray[loopstart[i].v].co);
-
- tri_area = area_tri_signed_v3(v1, v2, v3, normal);
- total_area += tri_area;
-
- cent_tri_v3(tri_cent, v1, v2, v3);
- madd_v3_v3fl(cent, tri_cent, tri_area);
-
- copy_v3_v3(v2, v3);
- }
-
- mul_v3_fl(cent, 1.0f / total_area);
-
- return total_area;
-}
-
/**
- * Calculate smooth groups from sharp edges.
- *
- * \param r_totgroup The total number of groups, 1 or more.
- * \return Polygon aligned array of group index values (starting at 1)
+ * Find the index of the loop in 'poly' which references vertex,
+ * returns -1 if not found
*/
-int *BKE_mesh_calc_smoothgroups(const MEdge *medge, const int totedge,
- const MPoly *mpoly, const int totpoly,
- const MLoop *mloop, const int totloop,
- int *r_totgroup)
-{
- int *poly_groups;
- int *poly_stack;
- STACK_DECLARE(poly_stack);
-
- int poly_prev = 0;
- int poly_group_id = 0;
-
- /* map vars */
- MeshElemMap *edge_poly_map;
- int *edge_poly_mem;
-
- if (totpoly == 0) {
- *r_totgroup = 0;
- return NULL;
- }
-
- BKE_mesh_edge_poly_map_create(&edge_poly_map, &edge_poly_mem,
- medge, totedge,
- mpoly, totpoly,
- mloop, totloop);
-
- poly_groups = MEM_callocN(sizeof(int) * totpoly, __func__);
- poly_stack = MEM_mallocN(sizeof(int) * totpoly, __func__);
-
- STACK_INIT(poly_stack);
-
- while (true) {
- int poly;
-
- for (poly = poly_prev; poly < totpoly; poly++) {
- if (poly_groups[poly] == 0) {
- break;
- }
- }
-
- if (poly == totpoly) {
- /* all done */
- break;
- }
-
- /* start searching from here next time */
- poly_prev = poly + 1;
-
- /* group starts at 1 */
- poly_group_id++;
-
- poly_groups[poly] = poly_group_id;
- STACK_PUSH(poly_stack, poly);
-
- while ((poly = STACK_POP_ELSE(poly_stack, -1)) != -1) {
-
- const MPoly *mp = &mpoly[poly];
- const MLoop *ml;
- int j = mp->totloop;
-
- BLI_assert(poly_groups[poly] == poly_group_id);
-
- for (ml = &mloop[mp->loopstart]; j--; ml++) {
- if (!(medge[ml->e].flag & ME_SHARP)) {
- /* loop over poly users */
- const MeshElemMap *map_ele = &edge_poly_map[ml->e];
- int *p = map_ele->indices;
- int i = map_ele->count;
-
- for (; i--; p++) {
- /* if we meet other non initialized its a bug */
- BLI_assert(ELEM(poly_groups[*p], 0, poly_group_id));
-
- if (poly_groups[*p] == 0) {
- poly_groups[*p] = poly_group_id;
- STACK_PUSH(poly_stack, *p);
- }
- }
- }
- }
- }
- }
-
- MEM_freeN(edge_poly_map);
- MEM_freeN(edge_poly_mem);
- MEM_freeN(poly_stack);
-
- STACK_FREE(poly_stack);
-
- *r_totgroup = poly_group_id;
-
- return poly_groups;
-}
-
-
-
-/**
- * This function takes the difference between 2 vertex-coord-arrays
- * (\a vert_cos_src, \a vert_cos_dst),
- * and applies the difference to \a vert_cos_new relative to \a vert_cos_org.
- *
- * \param vert_cos_src reference deform source.
- * \param vert_cos_dst reference deform destination.
- *
- * \param vert_cos_org reference for the output location.
- * \param vert_cos_new resulting coords.
- */
-void BKE_mesh_calc_relative_deform(
- const MPoly *mpoly, const int totpoly,
- const MLoop *mloop, const int totvert,
-
- const float (*vert_cos_src)[3],
- const float (*vert_cos_dst)[3],
-
- const float (*vert_cos_org)[3],
- float (*vert_cos_new)[3])
-{
- const MPoly *mp;
- int i;
-
- int *vert_accum = MEM_callocN(sizeof(*vert_accum) * totvert, __func__);
-
- memset(vert_cos_new, '\0', sizeof(*vert_cos_new) * totvert);
-
- for (i = 0, mp = mpoly; i < totpoly; i++, mp++) {
- const MLoop *loopstart = mloop + mp->loopstart;
- int j;
-
- for (j = 0; j < mp->totloop; j++) {
- int v_prev = (loopstart + ((mp->totloop + (j - 1)) % mp->totloop))->v;
- int v_curr = (loopstart + j)->v;
- int v_next = (loopstart + ((j + 1) % mp->totloop))->v;
-
- float tvec[3];
-
- barycentric_transform(
- tvec, vert_cos_dst[v_curr],
- vert_cos_org[v_prev], vert_cos_org[v_curr], vert_cos_org[v_next],
- vert_cos_src[v_prev], vert_cos_src[v_curr], vert_cos_src[v_next]
- );
-
- add_v3_v3(vert_cos_new[v_curr], tvec);
- vert_accum[v_curr] += 1;
- }
- }
-
- for (i = 0; i < totvert; i++) {
- if (vert_accum[i]) {
- mul_v3_fl(vert_cos_new[i], 1.0f / (float)vert_accum[i]);
- }
- else {
- copy_v3_v3(vert_cos_new[i], vert_cos_org[i]);
- }
- }
-
- MEM_freeN(vert_accum);
-}
-
-/* Find the index of the loop in 'poly' which references vertex,
- * returns -1 if not found */
int poly_find_loop_from_vert(const MPoly *poly, const MLoop *loopstart,
unsigned vert)
{
@@ -3440,9 +1760,11 @@ int poly_find_loop_from_vert(const MPoly *poly, const MLoop *loopstart,
return -1;
}
-/* Fill 'adj_r' with the loop indices in 'poly' adjacent to the
+/**
+ * Fill \a adj_r with the loop indices in \a poly adjacent to the
* vertex. Returns the index of the loop matching vertex, or -1 if the
- * vertex is not in 'poly' */
+ * vertex is not in \a poly
+ */
int poly_get_adj_loops_from_vert(unsigned adj_r[3], const MPoly *poly,
const MLoop *mloop, unsigned vert)
{
@@ -3462,8 +1784,10 @@ int poly_get_adj_loops_from_vert(unsigned adj_r[3], const MPoly *poly,
return corner;
}
-/* Return the index of the edge vert that is not equal to 'v'. If
- * neither edge vertex is equal to 'v', returns -1. */
+/**
+ * Return the index of the edge vert that is not equal to \a v. If
+ * neither edge vertex is equal to \a v, returns -1.
+ */
int BKE_mesh_edge_other_vert(const MEdge *e, int v)
{
if (e->v1 == v)
@@ -3474,186 +1798,8 @@ int BKE_mesh_edge_other_vert(const MEdge *e, int v)
return -1;
}
-/* update the hide flag for edges and faces from the corresponding
- * flag in verts */
-void BKE_mesh_flush_hidden_from_verts_ex(const MVert *mvert,
- const MLoop *mloop,
- MEdge *medge, const int totedge,
- MPoly *mpoly, const int totpoly)
-{
- int i, j;
-
- for (i = 0; i < totedge; i++) {
- MEdge *e = &medge[i];
- if (mvert[e->v1].flag & ME_HIDE ||
- mvert[e->v2].flag & ME_HIDE)
- {
- e->flag |= ME_HIDE;
- }
- else {
- e->flag &= ~ME_HIDE;
- }
- }
- for (i = 0; i < totpoly; i++) {
- MPoly *p = &mpoly[i];
- p->flag &= ~ME_HIDE;
- for (j = 0; j < p->totloop; j++) {
- if (mvert[mloop[p->loopstart + j].v].flag & ME_HIDE)
- p->flag |= ME_HIDE;
- }
- }
-}
-void BKE_mesh_flush_hidden_from_verts(Mesh *me)
-{
- BKE_mesh_flush_hidden_from_verts_ex(me->mvert, me->mloop,
- me->medge, me->totedge,
- me->mpoly, me->totpoly);
-}
-
-void BKE_mesh_flush_hidden_from_polys_ex(MVert *mvert,
- const MLoop *mloop,
- MEdge *medge, const int UNUSED(totedge),
- const MPoly *mpoly, const int totpoly)
-{
- const MPoly *mp;
- int i;
-
- i = totpoly;
- for (mp = mpoly; i--; mp++) {
- if (mp->flag & ME_HIDE) {
- const MLoop *ml;
- int j;
- j = mp->totloop;
- for (ml = &mloop[mp->loopstart]; j--; ml++) {
- mvert[ml->v].flag |= ME_HIDE;
- medge[ml->e].flag |= ME_HIDE;
- }
- }
- }
-
- i = totpoly;
- for (mp = mpoly; i--; mp++) {
- if ((mp->flag & ME_HIDE) == 0) {
- const MLoop *ml;
- int j;
- j = mp->totloop;
- for (ml = &mloop[mp->loopstart]; j--; ml++) {
- mvert[ml->v].flag &= ~ME_HIDE;
- medge[ml->e].flag &= ~ME_HIDE;
- }
- }
- }
-}
-void BKE_mesh_flush_hidden_from_polys(Mesh *me)
-{
- BKE_mesh_flush_hidden_from_polys_ex(me->mvert, me->mloop,
- me->medge, me->totedge,
- me->mpoly, me->totpoly);
-}
-
-/**
- * simple poly -> vert/edge selection.
- */
-void BKE_mesh_flush_select_from_polys_ex(MVert *mvert, const int totvert,
- const MLoop *mloop,
- MEdge *medge, const int totedge,
- const MPoly *mpoly, const int totpoly)
-{
- MVert *mv;
- MEdge *med;
- const MPoly *mp;
- int i;
-
- i = totvert;
- for (mv = mvert; i--; mv++) {
- mv->flag &= ~SELECT;
- }
-
- i = totedge;
- for (med = medge; i--; med++) {
- med->flag &= ~SELECT;
- }
-
- i = totpoly;
- for (mp = mpoly; i--; mp++) {
- /* assume if its selected its not hidden and none of its verts/edges are hidden
- * (a common assumption)*/
- if (mp->flag & ME_FACE_SEL) {
- const MLoop *ml;
- int j;
- j = mp->totloop;
- for (ml = &mloop[mp->loopstart]; j--; ml++) {
- mvert[ml->v].flag |= SELECT;
- medge[ml->e].flag |= SELECT;
- }
- }
- }
-}
-void BKE_mesh_flush_select_from_polys(Mesh *me)
-{
- BKE_mesh_flush_select_from_polys_ex(me->mvert, me->totvert,
- me->mloop,
- me->medge, me->totedge,
- me->mpoly, me->totpoly);
-}
-
-void BKE_mesh_flush_select_from_verts_ex(const MVert *mvert, const int UNUSED(totvert),
- const MLoop *mloop,
- MEdge *medge, const int totedge,
- MPoly *mpoly, const int totpoly)
-{
- MEdge *med;
- MPoly *mp;
- int i;
-
- /* edges */
- i = totedge;
- for (med = medge; i--; med++) {
- if ((med->flag & ME_HIDE) == 0) {
- if ((mvert[med->v1].flag & SELECT) && (mvert[med->v2].flag & SELECT)) {
- med->flag |= SELECT;
- }
- else {
- med->flag &= ~SELECT;
- }
- }
- }
-
- /* polys */
- i = totpoly;
- for (mp = mpoly; i--; mp++) {
- if ((mp->flag & ME_HIDE) == 0) {
- int ok = TRUE;
- const MLoop *ml;
- int j;
- j = mp->totloop;
- for (ml = &mloop[mp->loopstart]; j--; ml++) {
- if ((mvert[ml->v].flag & SELECT) == 0) {
- ok = FALSE;
- break;
- }
- }
-
- if (ok) {
- mp->flag |= ME_FACE_SEL;
- }
- else {
- mp->flag &= ~ME_FACE_SEL;
- }
- }
- }
-}
-void BKE_mesh_flush_select_from_verts(Mesh *me)
-{
- BKE_mesh_flush_select_from_verts_ex(me->mvert, me->totvert,
- me->mloop,
- me->medge, me->totedge,
- me->mpoly, me->totpoly);
-}
-
-
/* basic vertex data functions */
-int BKE_mesh_minmax(Mesh *me, float r_min[3], float r_max[3])
+bool BKE_mesh_minmax(Mesh *me, float r_min[3], float r_max[3])
{
int i = me->totvert;
MVert *mvert;
@@ -3664,59 +1810,6 @@ int BKE_mesh_minmax(Mesh *me, float r_min[3], float r_max[3])
return (me->totvert != 0);
}
-int BKE_mesh_center_median(Mesh *me, float cent[3])
-{
- int i = me->totvert;
- MVert *mvert;
- zero_v3(cent);
- for (mvert = me->mvert; i--; mvert++) {
- add_v3_v3(cent, mvert->co);
- }
- /* otherwise we get NAN for 0 verts */
- if (me->totvert) {
- mul_v3_fl(cent, 1.0f / (float)me->totvert);
- }
-
- return (me->totvert != 0);
-}
-
-int BKE_mesh_center_bounds(Mesh *me, float cent[3])
-{
- float min[3], max[3];
- INIT_MINMAX(min, max);
- if (BKE_mesh_minmax(me, min, max)) {
- mid_v3_v3v3(cent, min, max);
- return 1;
- }
-
- return 0;
-}
-
-int BKE_mesh_center_centroid(Mesh *me, float cent[3])
-{
- int i = me->totpoly;
- MPoly *mpoly;
- float poly_area;
- float total_area = 0.0f;
- float poly_cent[3];
-
- zero_v3(cent);
-
- /* calculate a weighted average of polygon centroids */
- for (mpoly = me->mpoly; i--; mpoly++) {
- poly_area = mesh_calc_poly_planar_area_centroid(mpoly, me->mloop + mpoly->loopstart, me->mvert, poly_cent);
-
- madd_v3_v3fl(cent, poly_cent, poly_area);
- total_area += poly_area;
- }
- /* otherwise we get NAN for 0 polys */
- if (me->totpoly) {
- mul_v3_fl(cent, 1.0f / total_area);
- }
-
- return (me->totpoly != 0);
-}
-
void BKE_mesh_translate(Mesh *me, const float offset[3], const bool do_keys)
{
int i = me->totvert;
@@ -3773,85 +1866,6 @@ void BKE_mesh_tessface_clear(Mesh *mesh)
mesh_tessface_clear_intern(mesh, TRUE);
}
-#if 0 /* slow version of the function below */
-void BKE_mesh_calc_poly_angles(MPoly *mpoly, MLoop *loopstart,
- MVert *mvarray, float angles[])
-{
- MLoop *ml;
- MLoop *mloop = &loopstart[-mpoly->loopstart];
-
- int j;
- for (j = 0, ml = loopstart; j < mpoly->totloop; j++, ml++) {
- MLoop *ml_prev = ME_POLY_LOOP_PREV(mloop, mpoly, j);
- MLoop *ml_next = ME_POLY_LOOP_NEXT(mloop, mpoly, j);
-
- float e1[3], e2[3];
-
- sub_v3_v3v3(e1, mvarray[ml_next->v].co, mvarray[ml->v].co);
- sub_v3_v3v3(e2, mvarray[ml_prev->v].co, mvarray[ml->v].co);
-
- angles[j] = (float)M_PI - angle_v3v3(e1, e2);
- }
-}
-
-#else /* equivalent the function above but avoid multiple subtractions + normalize */
-
-void BKE_mesh_calc_poly_angles(MPoly *mpoly, MLoop *loopstart,
- MVert *mvarray, float angles[])
-{
- float nor_prev[3];
- float nor_next[3];
-
- int i_this = mpoly->totloop - 1;
- int i_next = 0;
-
- sub_v3_v3v3(nor_prev, mvarray[loopstart[i_this - 1].v].co, mvarray[loopstart[i_this].v].co);
- normalize_v3(nor_prev);
-
- while (i_next < mpoly->totloop) {
- sub_v3_v3v3(nor_next, mvarray[loopstart[i_this].v].co, mvarray[loopstart[i_next].v].co);
- normalize_v3(nor_next);
- angles[i_this] = angle_normalized_v3v3(nor_prev, nor_next);
-
- /* step */
- copy_v3_v3(nor_prev, nor_next);
- i_this = i_next;
- i_next++;
- }
-}
-#endif
-
-void BKE_mesh_poly_edgehash_insert(EdgeHash *ehash, const MPoly *mp, const MLoop *mloop)
-{
- const MLoop *ml, *ml_next;
- int i = mp->totloop;
-
- ml_next = mloop; /* first loop */
- ml = &ml_next[i - 1]; /* last loop */
-
- while (i-- != 0) {
- if (!BLI_edgehash_haskey(ehash, ml->v, ml_next->v)) {
- BLI_edgehash_insert(ehash, ml->v, ml_next->v, NULL);
- }
-
- ml = ml_next;
- ml_next++;
- }
-}
-
-void BKE_mesh_poly_edgebitmap_insert(unsigned int *edge_bitmap, const MPoly *mp, const MLoop *mloop)
-{
- const MLoop *ml;
- int i = mp->totloop;
-
- ml = mloop;
-
- while (i-- != 0) {
- BLI_BITMAP_SET(edge_bitmap, ml->e);
- ml++;
- }
-}
-
void BKE_mesh_do_versions_cd_flag_init(Mesh *mesh)
{
if (UNLIKELY(mesh->cd_flag)) {
diff --git a/source/blender/blenkernel/intern/mesh_evaluate.c b/source/blender/blenkernel/intern/mesh_evaluate.c
new file mode 100644
index 00000000000..1e74ce23c2c
--- /dev/null
+++ b/source/blender/blenkernel/intern/mesh_evaluate.c
@@ -0,0 +1,2301 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * Contributor(s): Blender Foundation
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/blenkernel/intern/mesh_evaluate.c
+ * \ingroup bke
+ *
+ * Functions to evaluate mesh data.
+ */
+
+#include <limits.h>
+
+#include "MEM_guardedalloc.h"
+
+#include "DNA_object_types.h"
+#include "DNA_mesh_types.h"
+#include "DNA_meshdata_types.h"
+
+#include "BLI_utildefines.h"
+#include "BLI_memarena.h"
+#include "BLI_math.h"
+#include "BLI_edgehash.h"
+#include "BLI_bitmap.h"
+#include "BLI_scanfill.h"
+#include "BLI_linklist.h"
+#include "BLI_linklist_stack.h"
+#include "BLI_alloca.h"
+
+#include "BKE_customdata.h"
+#include "BKE_mesh.h"
+#include "BKE_multires.h"
+
+#include "BLI_strict_flags.h"
+
+
+// #define DEBUG_TIME
+
+#ifdef DEBUG_TIME
+# include "PIL_time.h"
+# include "PIL_time_utildefines.h"
+#endif
+
+/* -------------------------------------------------------------------- */
+
+/** \name Mesh Normal Calculation
+ * \{ */
+
+/**
+ * Call when there are no polygons.
+ */
+static void mesh_calc_normals_vert_fallback(MVert *mverts, int numVerts)
+{
+ int i;
+ for (i = 0; i < numVerts; i++) {
+ MVert *mv = &mverts[i];
+ float no[3];
+
+ normalize_v3_v3(no, mv->co);
+ normal_float_to_short_v3(mv->no, no);
+ }
+}
+
+/* Calculate vertex and face normals, face normals are returned in *faceNors_r if non-NULL
+ * and vertex normals are stored in actual mverts.
+ */
+void BKE_mesh_calc_normals_mapping(MVert *mverts, int numVerts,
+ MLoop *mloop, MPoly *mpolys, int numLoops, int numPolys, float (*polyNors_r)[3],
+ MFace *mfaces, int numFaces, int *origIndexFace, float (*faceNors_r)[3])
+{
+ BKE_mesh_calc_normals_mapping_ex(mverts, numVerts, mloop, mpolys,
+ numLoops, numPolys, polyNors_r, mfaces, numFaces,
+ origIndexFace, faceNors_r, FALSE);
+}
+/* extended version of 'BKE_mesh_calc_normals_poly' with option not to calc vertex normals */
+void BKE_mesh_calc_normals_mapping_ex(
+ MVert *mverts, int numVerts,
+ MLoop *mloop, MPoly *mpolys,
+ int numLoops, int numPolys, float (*polyNors_r)[3],
+ MFace *mfaces, int numFaces, int *origIndexFace, float (*faceNors_r)[3],
+ const bool only_face_normals)
+{
+ float (*pnors)[3] = polyNors_r, (*fnors)[3] = faceNors_r;
+ int i;
+ MFace *mf;
+ MPoly *mp;
+
+ if (numPolys == 0) {
+ if (only_face_normals == FALSE) {
+ mesh_calc_normals_vert_fallback(mverts, numVerts);
+ }
+ return;
+ }
+
+ /* if we are not calculating verts and no verts were passes then we have nothing to do */
+ if ((only_face_normals == TRUE) && (polyNors_r == NULL) && (faceNors_r == NULL)) {
+ printf("%s: called with nothing to do\n", __func__);
+ return;
+ }
+
+ if (!pnors) pnors = MEM_callocN(sizeof(float[3]) * (size_t)numPolys, __func__);
+ /* if (!fnors) fnors = MEM_callocN(sizeof(float[3]) * numFaces, "face nors mesh.c"); */ /* NO NEED TO ALLOC YET */
+
+
+ if (only_face_normals == FALSE) {
+ /* vertex normals are optional, they require some extra calculations,
+ * so make them optional */
+ BKE_mesh_calc_normals_poly(mverts, numVerts, mloop, mpolys, numLoops, numPolys, pnors, false);
+ }
+ else {
+ /* only calc poly normals */
+ mp = mpolys;
+ for (i = 0; i < numPolys; i++, mp++) {
+ BKE_mesh_calc_poly_normal(mp, mloop + mp->loopstart, mverts, pnors[i]);
+ }
+ }
+
+ if (origIndexFace &&
+ /* fnors == faceNors_r */ /* NO NEED TO ALLOC YET */
+ fnors != NULL &&
+ numFaces)
+ {
+ mf = mfaces;
+ for (i = 0; i < numFaces; i++, mf++, origIndexFace++) {
+ if (*origIndexFace < numPolys) {
+ copy_v3_v3(fnors[i], pnors[*origIndexFace]);
+ }
+ else {
+ /* eek, we're not corresponding to polys */
+ printf("error in %s: tessellation face indices are incorrect. normals may look bad.\n", __func__);
+ }
+ }
+ }
+
+ if (pnors != polyNors_r) MEM_freeN(pnors);
+ /* if (fnors != faceNors_r) MEM_freeN(fnors); */ /* NO NEED TO ALLOC YET */
+
+ fnors = pnors = NULL;
+
+}
+
+static void mesh_calc_normals_poly_accum(MPoly *mp, MLoop *ml,
+ MVert *mvert, float polyno[3], float (*tnorms)[3])
+{
+ const int nverts = mp->totloop;
+ float (*edgevecbuf)[3] = BLI_array_alloca(edgevecbuf, (size_t)nverts);
+ int i;
+
+ /* Polygon Normal and edge-vector */
+ /* inline version of #BKE_mesh_calc_poly_normal, also does edge-vectors */
+ {
+ int i_prev = nverts - 1;
+ float const *v_prev = mvert[ml[i_prev].v].co;
+ float const *v_curr;
+
+ zero_v3(polyno);
+ /* Newell's Method */
+ for (i = 0; i < nverts; i++) {
+ v_curr = mvert[ml[i].v].co;
+ add_newell_cross_v3_v3v3(polyno, v_prev, v_curr);
+
+ /* Unrelated to normalize, calculate edge-vector */
+ sub_v3_v3v3(edgevecbuf[i_prev], v_prev, v_curr);
+ normalize_v3(edgevecbuf[i_prev]);
+ i_prev = i;
+
+ v_prev = v_curr;
+ }
+ if (UNLIKELY(normalize_v3(polyno) == 0.0f)) {
+ polyno[2] = 1.0f; /* other axis set to 0.0 */
+ }
+ }
+
+ /* accumulate angle weighted face normal */
+ /* inline version of #accumulate_vertex_normals_poly */
+ {
+ const float *prev_edge = edgevecbuf[nverts - 1];
+
+ for (i = 0; i < nverts; i++) {
+ const float *cur_edge = edgevecbuf[i];
+
+ /* calculate angle between the two poly edges incident on
+ * this vertex */
+ const float fac = saacos(-dot_v3v3(cur_edge, prev_edge));
+
+ /* accumulate */
+ madd_v3_v3fl(tnorms[ml[i].v], polyno, fac);
+ prev_edge = cur_edge;
+ }
+ }
+
+}
+
+void BKE_mesh_calc_normals_poly(MVert *mverts, int numVerts, MLoop *mloop, MPoly *mpolys,
+ int UNUSED(numLoops), int numPolys, float (*r_polynors)[3],
+ const bool only_face_normals)
+{
+ float (*pnors)[3] = r_polynors;
+ float (*tnorms)[3];
+ int i;
+ MPoly *mp;
+
+ if (only_face_normals) {
+ BLI_assert(pnors != NULL);
+
+#pragma omp parallel for if (numPolys > BKE_MESH_OMP_LIMIT)
+ for (i = 0; i < numPolys; i++) {
+ BKE_mesh_calc_poly_normal(&mpolys[i], mloop + mpolys[i].loopstart, mverts, pnors[i]);
+ }
+ return;
+ }
+
+ /* first go through and calculate normals for all the polys */
+ tnorms = MEM_callocN(sizeof(*tnorms) * (size_t)numVerts, __func__);
+
+ if (pnors) {
+ mp = mpolys;
+ for (i = 0; i < numPolys; i++, mp++) {
+ mesh_calc_normals_poly_accum(mp, mloop + mp->loopstart, mverts, pnors[i], tnorms);
+ }
+ }
+ else {
+ float tpnor[3]; /* temp poly normal */
+ mp = mpolys;
+ for (i = 0; i < numPolys; i++, mp++) {
+ mesh_calc_normals_poly_accum(mp, mloop + mp->loopstart, mverts, tpnor, tnorms);
+ }
+ }
+
+ /* following Mesh convention; we use vertex coordinate itself for normal in this case */
+ for (i = 0; i < numVerts; i++) {
+ MVert *mv = &mverts[i];
+ float *no = tnorms[i];
+
+ if (UNLIKELY(normalize_v3(no) == 0.0f)) {
+ normalize_v3_v3(no, mv->co);
+ }
+
+ normal_float_to_short_v3(mv->no, no);
+ }
+
+ MEM_freeN(tnorms);
+}
+
+void BKE_mesh_calc_normals(Mesh *mesh)
+{
+#ifdef DEBUG_TIME
+ TIMEIT_START(BKE_mesh_calc_normals);
+#endif
+ BKE_mesh_calc_normals_poly(mesh->mvert, mesh->totvert,
+ mesh->mloop, mesh->mpoly, mesh->totloop, mesh->totpoly,
+ NULL, false);
+#ifdef DEBUG_TIME
+ TIMEIT_END(BKE_mesh_calc_normals);
+#endif
+}
+
+void BKE_mesh_calc_normals_tessface(MVert *mverts, int numVerts, MFace *mfaces, int numFaces, float (*faceNors_r)[3])
+{
+ float (*tnorms)[3] = MEM_callocN(sizeof(*tnorms) * (size_t)numVerts, "tnorms");
+ float (*fnors)[3] = (faceNors_r) ? faceNors_r : MEM_callocN(sizeof(*fnors) * (size_t)numFaces, "meshnormals");
+ int i;
+
+ for (i = 0; i < numFaces; i++) {
+ MFace *mf = &mfaces[i];
+ float *f_no = fnors[i];
+ float *n4 = (mf->v4) ? tnorms[mf->v4] : NULL;
+ float *c4 = (mf->v4) ? mverts[mf->v4].co : NULL;
+
+ if (mf->v4)
+ normal_quad_v3(f_no, mverts[mf->v1].co, mverts[mf->v2].co, mverts[mf->v3].co, mverts[mf->v4].co);
+ else
+ normal_tri_v3(f_no, mverts[mf->v1].co, mverts[mf->v2].co, mverts[mf->v3].co);
+
+ accumulate_vertex_normals(tnorms[mf->v1], tnorms[mf->v2], tnorms[mf->v3], n4,
+ f_no, mverts[mf->v1].co, mverts[mf->v2].co, mverts[mf->v3].co, c4);
+ }
+
+ /* following Mesh convention; we use vertex coordinate itself for normal in this case */
+ for (i = 0; i < numVerts; i++) {
+ MVert *mv = &mverts[i];
+ float *no = tnorms[i];
+
+ if (UNLIKELY(normalize_v3(no) == 0.0f)) {
+ normalize_v3_v3(no, mv->co);
+ }
+
+ normal_float_to_short_v3(mv->no, no);
+ }
+
+ MEM_freeN(tnorms);
+
+ if (fnors != faceNors_r)
+ MEM_freeN(fnors);
+}
+
+/**
+ * Compute split normals, i.e. vertex normals associated with each poly (hence 'loop normals').
+ * Useful to materialize sharp edges (or non-smooth faces) without actually modifying the geometry (splitting edges).
+ */
+void BKE_mesh_normals_loop_split(MVert *mverts, const int UNUSED(numVerts), MEdge *medges, const int numEdges,
+ MLoop *mloops, float (*r_loopnors)[3], const int numLoops,
+ MPoly *mpolys, float (*polynors)[3], const int numPolys, float split_angle)
+{
+#define INDEX_UNSET INT_MIN
+#define INDEX_INVALID -1
+/* See comment about edge_to_loops below. */
+#define IS_EDGE_SHARP(_e2l) (ELEM((_e2l)[1], INDEX_UNSET, INDEX_INVALID))
+
+ /* Mapping edge -> loops.
+ * If that edge is used by more than two loops (polys), it is always sharp (and tagged as such, see below).
+ * We also use the second loop index as a kind of flag: smooth edge: > 0,
+ * sharp edge: < 0 (INDEX_INVALID || INDEX_UNSET),
+ * unset: INDEX_UNSET
+ * Note that currently we only have two values for second loop of sharp edges. However, if needed, we can
+ * store the negated value of loop index instead of INDEX_INVALID to retrieve the real value later in code).
+ * Note also that lose edges always have both values set to 0!
+ */
+ int (*edge_to_loops)[2] = MEM_callocN(sizeof(int[2]) * (size_t)numEdges, __func__);
+
+ /* Simple mapping from a loop to its polygon index. */
+ int *loop_to_poly = MEM_mallocN(sizeof(int) * (size_t)numLoops, __func__);
+
+ MPoly *mp;
+ int mp_index;
+ const bool check_angle = (split_angle < (float)M_PI);
+
+ /* Temp normal stack. */
+ BLI_SMALLSTACK_DECLARE(normal, float *);
+
+#ifdef DEBUG_TIME
+ TIMEIT_START(BKE_mesh_normals_loop_split);
+#endif
+
+ if (check_angle) {
+ split_angle = cosf(split_angle);
+ }
+
+ /* This first loop check which edges are actually smooth, and compute edge vectors. */
+ for (mp = mpolys, mp_index = 0; mp_index < numPolys; mp++, mp_index++) {
+ MLoop *ml_curr;
+ int *e2l;
+ int ml_curr_index = mp->loopstart;
+ const int ml_last_index = (ml_curr_index + mp->totloop) - 1;
+
+ ml_curr = &mloops[ml_curr_index];
+
+ for (; ml_curr_index <= ml_last_index; ml_curr++, ml_curr_index++) {
+ e2l = edge_to_loops[ml_curr->e];
+
+ loop_to_poly[ml_curr_index] = mp_index;
+
+ /* Pre-populate all loop normals as if their verts were all-smooth, this way we don't have to compute
+ * those later!
+ */
+ normal_short_to_float_v3(r_loopnors[ml_curr_index], mverts[ml_curr->v].no);
+
+ /* Check whether current edge might be smooth or sharp */
+ if ((e2l[0] | e2l[1]) == 0) {
+ /* 'Empty' edge until now, set e2l[0] (and e2l[1] to INDEX_UNSET to tag it as unset). */
+ e2l[0] = ml_curr_index;
+ /* We have to check this here too, else we might miss some flat faces!!! */
+ e2l[1] = (mp->flag & ME_SMOOTH) ? INDEX_UNSET : INDEX_INVALID;
+ }
+ else if (e2l[1] == INDEX_UNSET) {
+ /* Second loop using this edge, time to test its sharpness.
+ * An edge is sharp if it is tagged as such, or its face is not smooth, or angle between
+ * both its polys' normals is above split_angle value...
+ */
+ if (!(mp->flag & ME_SMOOTH) || (medges[ml_curr->e].flag & ME_SHARP) ||
+ (check_angle && dot_v3v3(polynors[loop_to_poly[e2l[0]]], polynors[mp_index]) < split_angle))
+ {
+ /* Note: we are sure that loop != 0 here ;) */
+ e2l[1] = INDEX_INVALID;
+ }
+ else {
+ e2l[1] = ml_curr_index;
+ }
+ }
+ else if (!IS_EDGE_SHARP(e2l)) {
+ /* More than two loops using this edge, tag as sharp if not yet done. */
+ e2l[1] = INDEX_INVALID;
+ }
+ /* Else, edge is already 'disqualified' (i.e. sharp)! */
+ }
+ }
+
+ /* We now know edges that can be smoothed (with their vector, and their two loops), and edges that will be hard!
+ * Now, time to generate the normals.
+ */
+ for (mp = mpolys, mp_index = 0; mp_index < numPolys; mp++, mp_index++) {
+ MLoop *ml_curr, *ml_prev;
+ float (*lnors)[3];
+ const int ml_last_index = (mp->loopstart + mp->totloop) - 1;
+ int ml_curr_index = mp->loopstart;
+ int ml_prev_index = ml_last_index;
+
+ ml_curr = &mloops[ml_curr_index];
+ ml_prev = &mloops[ml_prev_index];
+ lnors = &r_loopnors[ml_curr_index];
+
+ for (; ml_curr_index <= ml_last_index; ml_curr++, ml_curr_index++, lnors++) {
+ const int *e2l_curr = edge_to_loops[ml_curr->e];
+ const int *e2l_prev = edge_to_loops[ml_prev->e];
+
+ if (!IS_EDGE_SHARP(e2l_curr)) {
+ /* A smooth edge.
+ * We skip it because it is either:
+ * - in the middle of a 'smooth fan' already computed (or that will be as soon as we hit
+ * one of its ends, i.e. one of its two sharp edges), or...
+ * - the related vertex is a "full smooth" one, in which case pre-populated normals from vertex
+ * are just fine!
+ */
+ }
+ else if (IS_EDGE_SHARP(e2l_prev)) {
+ /* Simple case (both edges around that vertex are sharp in current polygon),
+ * this vertex just takes its poly normal.
+ */
+ copy_v3_v3(*lnors, polynors[mp_index]);
+ /* No need to mark loop as done here, we won't run into it again anyway! */
+ }
+ /* This loop may have been already computed, in which case its 'to_poly' map is set to -1... */
+ else if (loop_to_poly[ml_curr_index] != -1) {
+ /* Gah... We have to fan around current vertex, until we find the other non-smooth edge,
+ * and accumulate face normals into the vertex!
+ * Note in case this vertex has only one sharp edges, this is a waste because the normal is the same as
+ * the vertex normal, but I do not see any easy way to detect that (would need to count number
+ * of sharp edges per vertex, I doubt the additional memory usage would be worth it, especially as
+ * it should not be a common case in real-life meshes anyway).
+ */
+ const unsigned int mv_pivot_index = ml_curr->v; /* The vertex we are "fanning" around! */
+ const MVert *mv_pivot = &mverts[mv_pivot_index];
+ const int *e2lfan_curr;
+ float vec_curr[3], vec_prev[3];
+ MLoop *mlfan_curr, *mlfan_next;
+ MPoly *mpfan_next;
+ float lnor[3] = {0.0f, 0.0f, 0.0f};
+ /* mlfan_vert_index: the loop of our current edge might not be the loop of our current vertex! */
+ int mlfan_curr_index, mlfan_vert_index, mpfan_curr_index;
+
+ e2lfan_curr = e2l_prev;
+ mlfan_curr = ml_prev;
+ mlfan_curr_index = ml_prev_index;
+ mlfan_vert_index = ml_curr_index;
+ mpfan_curr_index = mp_index;
+
+ /* Only need to compute previous edge's vector once, then we can just reuse old current one! */
+ {
+ const MEdge *me_prev = &medges[ml_curr->e]; /* ml_curr would be mlfan_prev if we needed that one */
+ const MVert *mv_2 = (me_prev->v1 == mv_pivot_index) ? &mverts[me_prev->v2] : &mverts[me_prev->v1];
+
+ sub_v3_v3v3(vec_prev, mv_2->co, mv_pivot->co);
+ normalize_v3(vec_prev);
+ }
+
+ while (true) {
+ /* Compute edge vectors.
+ * NOTE: We could pre-compute those into an array, in the first iteration, instead of computing them
+ * twice (or more) here. However, time gained is not worth memory and time lost,
+ * given the fact that this code should not be called that much in real-life meshes...
+ */
+ {
+ const MEdge *me_curr = &medges[mlfan_curr->e];
+ const MVert *mv_2 = (me_curr->v1 == mv_pivot_index) ? &mverts[me_curr->v2] :
+ &mverts[me_curr->v1];
+
+ sub_v3_v3v3(vec_curr, mv_2->co, mv_pivot->co);
+ normalize_v3(vec_curr);
+ }
+
+ {
+ /* Code similar to accumulate_vertex_normals_poly. */
+ /* Calculate angle between the two poly edges incident on this vertex. */
+ const float fac = saacos(dot_v3v3(vec_curr, vec_prev));
+ /* Accumulate */
+ madd_v3_v3fl(lnor, polynors[mpfan_curr_index], fac);
+ }
+
+ /* We store here a pointer to all loop-normals processed. */
+ BLI_SMALLSTACK_PUSH(normal, &(r_loopnors[mlfan_vert_index][0]));
+
+ /* And we are done with this loop, mark it as such! */
+ loop_to_poly[mlfan_vert_index] = -1;
+
+ if (IS_EDGE_SHARP(e2lfan_curr)) {
+ /* Current edge is sharp, we have finished with this fan of faces around this vert! */
+ break;
+ }
+
+ copy_v3_v3(vec_prev, vec_curr);
+
+ /* Warning! This is rather complex!
+ * We have to find our next edge around the vertex (fan mode).
+ * First we find the next loop, which is either previous or next to mlfan_curr_index, depending
+ * whether both loops using current edge are in the same direction or not, and whether
+ * mlfan_curr_index actually uses the vertex we are fanning around!
+ * mlfan_curr_index is the index of mlfan_next here, and mlfan_next is not the real next one
+ * (i.e. not the future mlfan_curr)...
+ */
+ mlfan_curr_index = (e2lfan_curr[0] == mlfan_curr_index) ? e2lfan_curr[1] : e2lfan_curr[0];
+ mpfan_curr_index = loop_to_poly[mlfan_curr_index];
+ mlfan_next = &mloops[mlfan_curr_index];
+ mpfan_next = &mpolys[mpfan_curr_index];
+ if ((mlfan_curr->v == mlfan_next->v && mlfan_curr->v == mv_pivot_index) ||
+ (mlfan_curr->v != mlfan_next->v && mlfan_curr->v != mv_pivot_index))
+ {
+ /* We need the previous loop, but current one is our vertex's loop. */
+ mlfan_vert_index = mlfan_curr_index;
+ if (--mlfan_curr_index < mpfan_next->loopstart) {
+ mlfan_curr_index = mpfan_next->loopstart + mpfan_next->totloop - 1;
+ }
+ }
+ else {
+ /* We need the next loop, which is also our vertex's loop. */
+ if (++mlfan_curr_index >= mpfan_next->loopstart + mpfan_next->totloop) {
+ mlfan_curr_index = mpfan_next->loopstart;
+ }
+ mlfan_vert_index = mlfan_curr_index;
+ }
+ mlfan_curr = &mloops[mlfan_curr_index];
+ /* And now we are back in sync, mlfan_curr_index is the index of mlfan_curr! Pff! */
+
+ e2lfan_curr = edge_to_loops[mlfan_curr->e];
+ }
+
+ /* In case we get a zero normal here, just use vertex normal already set! */
+ if (LIKELY(normalize_v3(lnor) != 0.0f)) {
+ /* Copy back the final computed normal into all related loop-normals. */
+ float *nor;
+ while ((nor = BLI_SMALLSTACK_POP(normal))) {
+ copy_v3_v3(nor, lnor);
+ }
+ }
+ }
+
+ ml_prev = ml_curr;
+ ml_prev_index = ml_curr_index;
+ }
+ }
+
+ BLI_SMALLSTACK_FREE(normal);
+
+ MEM_freeN(edge_to_loops);
+ MEM_freeN(loop_to_poly);
+
+#ifdef DEBUG_TIME
+ TIMEIT_END(BKE_mesh_normals_loop_split);
+#endif
+
+#undef INDEX_UNSET
+#undef INDEX_INVALID
+#undef IS_EDGE_SHARP
+}
+
+/** \} */
+
+
+/* -------------------------------------------------------------------- */
+
+/** \name Polygon Calculations
+ * \{ */
+
+/*
+ * COMPUTE POLY NORMAL
+ *
+ * Computes the normal of a planar
+ * polygon See Graphics Gems for
+ * computing newell normal.
+ *
+ */
+static void mesh_calc_ngon_normal(MPoly *mpoly, MLoop *loopstart,
+ MVert *mvert, float normal[3])
+{
+ const int nverts = mpoly->totloop;
+ float const *v_prev = mvert[loopstart[nverts - 1].v].co;
+ float const *v_curr;
+ int i;
+
+ zero_v3(normal);
+
+ /* Newell's Method */
+ for (i = 0; i < nverts; i++) {
+ v_curr = mvert[loopstart[i].v].co;
+ add_newell_cross_v3_v3v3(normal, v_prev, v_curr);
+ v_prev = v_curr;
+ }
+
+ if (UNLIKELY(normalize_v3(normal) == 0.0f)) {
+ normal[2] = 1.0f; /* other axis set to 0.0 */
+ }
+}
+
+void BKE_mesh_calc_poly_normal(MPoly *mpoly, MLoop *loopstart,
+ MVert *mvarray, float no[3])
+{
+ if (mpoly->totloop > 4) {
+ mesh_calc_ngon_normal(mpoly, loopstart, mvarray, no);
+ }
+ else if (mpoly->totloop == 3) {
+ normal_tri_v3(no,
+ mvarray[loopstart[0].v].co,
+ mvarray[loopstart[1].v].co,
+ mvarray[loopstart[2].v].co
+ );
+ }
+ else if (mpoly->totloop == 4) {
+ normal_quad_v3(no,
+ mvarray[loopstart[0].v].co,
+ mvarray[loopstart[1].v].co,
+ mvarray[loopstart[2].v].co,
+ mvarray[loopstart[3].v].co
+ );
+ }
+ else { /* horrible, two sided face! */
+ no[0] = 0.0;
+ no[1] = 0.0;
+ no[2] = 1.0;
+ }
+}
+/* duplicate of function above _but_ takes coords rather then mverts */
+static void mesh_calc_ngon_normal_coords(MPoly *mpoly, MLoop *loopstart,
+ const float (*vertex_coords)[3], float normal[3])
+{
+ const int nverts = mpoly->totloop;
+ float const *v_prev = vertex_coords[loopstart[nverts - 1].v];
+ float const *v_curr;
+ int i;
+
+ zero_v3(normal);
+
+ /* Newell's Method */
+ for (i = 0; i < nverts; i++) {
+ v_curr = vertex_coords[loopstart[i].v];
+ add_newell_cross_v3_v3v3(normal, v_prev, v_curr);
+ v_prev = v_curr;
+ }
+
+ if (UNLIKELY(normalize_v3(normal) == 0.0f)) {
+ normal[2] = 1.0f; /* other axis set to 0.0 */
+ }
+}
+
+void BKE_mesh_calc_poly_normal_coords(MPoly *mpoly, MLoop *loopstart,
+ const float (*vertex_coords)[3], float no[3])
+{
+ if (mpoly->totloop > 4) {
+ mesh_calc_ngon_normal_coords(mpoly, loopstart, vertex_coords, no);
+ }
+ else if (mpoly->totloop == 3) {
+ normal_tri_v3(no,
+ vertex_coords[loopstart[0].v],
+ vertex_coords[loopstart[1].v],
+ vertex_coords[loopstart[2].v]
+ );
+ }
+ else if (mpoly->totloop == 4) {
+ normal_quad_v3(no,
+ vertex_coords[loopstart[0].v],
+ vertex_coords[loopstart[1].v],
+ vertex_coords[loopstart[2].v],
+ vertex_coords[loopstart[3].v]
+ );
+ }
+ else { /* horrible, two sided face! */
+ no[0] = 0.0;
+ no[1] = 0.0;
+ no[2] = 1.0;
+ }
+}
+
+static void mesh_calc_ngon_center(MPoly *mpoly, MLoop *loopstart,
+ MVert *mvert, float cent[3])
+{
+ const float w = 1.0f / (float)mpoly->totloop;
+ int i;
+
+ zero_v3(cent);
+
+ for (i = 0; i < mpoly->totloop; i++) {
+ madd_v3_v3fl(cent, mvert[(loopstart++)->v].co, w);
+ }
+}
+
+void BKE_mesh_calc_poly_center(MPoly *mpoly, MLoop *loopstart,
+ MVert *mvarray, float cent[3])
+{
+ if (mpoly->totloop == 3) {
+ cent_tri_v3(cent,
+ mvarray[loopstart[0].v].co,
+ mvarray[loopstart[1].v].co,
+ mvarray[loopstart[2].v].co
+ );
+ }
+ else if (mpoly->totloop == 4) {
+ cent_quad_v3(cent,
+ mvarray[loopstart[0].v].co,
+ mvarray[loopstart[1].v].co,
+ mvarray[loopstart[2].v].co,
+ mvarray[loopstart[3].v].co
+ );
+ }
+ else {
+ mesh_calc_ngon_center(mpoly, loopstart, mvarray, cent);
+ }
+}
+
+/* note, passing polynormal is only a speedup so we can skip calculating it */
+float BKE_mesh_calc_poly_area(MPoly *mpoly, MLoop *loopstart,
+ MVert *mvarray, const float polynormal[3])
+{
+ if (mpoly->totloop == 3) {
+ return area_tri_v3(mvarray[loopstart[0].v].co,
+ mvarray[loopstart[1].v].co,
+ mvarray[loopstart[2].v].co
+ );
+ }
+ else if (mpoly->totloop == 4) {
+ return area_quad_v3(mvarray[loopstart[0].v].co,
+ mvarray[loopstart[1].v].co,
+ mvarray[loopstart[2].v].co,
+ mvarray[loopstart[3].v].co
+ );
+ }
+ else {
+ int i;
+ MLoop *l_iter = loopstart;
+ float area, polynorm_local[3];
+ float (*vertexcos)[3] = BLI_array_alloca(vertexcos, (size_t)mpoly->totloop);
+ const float *no = polynormal ? polynormal : polynorm_local;
+
+ /* pack vertex cos into an array for area_poly_v3 */
+ for (i = 0; i < mpoly->totloop; i++, l_iter++) {
+ copy_v3_v3(vertexcos[i], mvarray[l_iter->v].co);
+ }
+
+ /* need normal for area_poly_v3 as well */
+ if (polynormal == NULL) {
+ BKE_mesh_calc_poly_normal(mpoly, loopstart, mvarray, polynorm_local);
+ }
+
+ /* finally calculate the area */
+ area = area_poly_v3(mpoly->totloop, vertexcos, no);
+
+ return area;
+ }
+}
+
+/* note, results won't be correct if polygon is non-planar */
+static float mesh_calc_poly_planar_area_centroid(MPoly *mpoly, MLoop *loopstart, MVert *mvarray, float cent[3])
+{
+ int i;
+ float tri_area;
+ float total_area = 0.0f;
+ float v1[3], v2[3], v3[3], normal[3], tri_cent[3];
+
+ BKE_mesh_calc_poly_normal(mpoly, loopstart, mvarray, normal);
+ copy_v3_v3(v1, mvarray[loopstart[0].v].co);
+ copy_v3_v3(v2, mvarray[loopstart[1].v].co);
+ zero_v3(cent);
+
+ for (i = 2; i < mpoly->totloop; i++) {
+ copy_v3_v3(v3, mvarray[loopstart[i].v].co);
+
+ tri_area = area_tri_signed_v3(v1, v2, v3, normal);
+ total_area += tri_area;
+
+ cent_tri_v3(tri_cent, v1, v2, v3);
+ madd_v3_v3fl(cent, tri_cent, tri_area);
+
+ copy_v3_v3(v2, v3);
+ }
+
+ mul_v3_fl(cent, 1.0f / total_area);
+
+ return total_area;
+}
+
+#if 0 /* slow version of the function below */
+void BKE_mesh_calc_poly_angles(MPoly *mpoly, MLoop *loopstart,
+ MVert *mvarray, float angles[])
+{
+ MLoop *ml;
+ MLoop *mloop = &loopstart[-mpoly->loopstart];
+
+ int j;
+ for (j = 0, ml = loopstart; j < mpoly->totloop; j++, ml++) {
+ MLoop *ml_prev = ME_POLY_LOOP_PREV(mloop, mpoly, j);
+ MLoop *ml_next = ME_POLY_LOOP_NEXT(mloop, mpoly, j);
+
+ float e1[3], e2[3];
+
+ sub_v3_v3v3(e1, mvarray[ml_next->v].co, mvarray[ml->v].co);
+ sub_v3_v3v3(e2, mvarray[ml_prev->v].co, mvarray[ml->v].co);
+
+ angles[j] = (float)M_PI - angle_v3v3(e1, e2);
+ }
+}
+
+#else /* equivalent the function above but avoid multiple subtractions + normalize */
+
+void BKE_mesh_calc_poly_angles(MPoly *mpoly, MLoop *loopstart,
+ MVert *mvarray, float angles[])
+{
+ float nor_prev[3];
+ float nor_next[3];
+
+ int i_this = mpoly->totloop - 1;
+ int i_next = 0;
+
+ sub_v3_v3v3(nor_prev, mvarray[loopstart[i_this - 1].v].co, mvarray[loopstart[i_this].v].co);
+ normalize_v3(nor_prev);
+
+ while (i_next < mpoly->totloop) {
+ sub_v3_v3v3(nor_next, mvarray[loopstart[i_this].v].co, mvarray[loopstart[i_next].v].co);
+ normalize_v3(nor_next);
+ angles[i_this] = angle_normalized_v3v3(nor_prev, nor_next);
+
+ /* step */
+ copy_v3_v3(nor_prev, nor_next);
+ i_this = i_next;
+ i_next++;
+ }
+}
+#endif
+
+void BKE_mesh_poly_edgehash_insert(EdgeHash *ehash, const MPoly *mp, const MLoop *mloop)
+{
+ const MLoop *ml, *ml_next;
+ int i = mp->totloop;
+
+ ml_next = mloop; /* first loop */
+ ml = &ml_next[i - 1]; /* last loop */
+
+ while (i-- != 0) {
+ BLI_edgehash_reinsert(ehash, ml->v, ml_next->v, NULL);
+
+ ml = ml_next;
+ ml_next++;
+ }
+}
+
+void BKE_mesh_poly_edgebitmap_insert(unsigned int *edge_bitmap, const MPoly *mp, const MLoop *mloop)
+{
+ const MLoop *ml;
+ int i = mp->totloop;
+
+ ml = mloop;
+
+ while (i-- != 0) {
+ BLI_BITMAP_SET(edge_bitmap, ml->e);
+ ml++;
+ }
+}
+
+/** \} */
+
+
+/* -------------------------------------------------------------------- */
+
+/** \name Mesh Center Calculation
+ * \{ */
+
+bool BKE_mesh_center_median(Mesh *me, float cent[3])
+{
+ int i = me->totvert;
+ MVert *mvert;
+ zero_v3(cent);
+ for (mvert = me->mvert; i--; mvert++) {
+ add_v3_v3(cent, mvert->co);
+ }
+ /* otherwise we get NAN for 0 verts */
+ if (me->totvert) {
+ mul_v3_fl(cent, 1.0f / (float)me->totvert);
+ }
+
+ return (me->totvert != 0);
+}
+
+bool BKE_mesh_center_bounds(Mesh *me, float cent[3])
+{
+ float min[3], max[3];
+ INIT_MINMAX(min, max);
+ if (BKE_mesh_minmax(me, min, max)) {
+ mid_v3_v3v3(cent, min, max);
+ return true;
+ }
+
+ return false;
+}
+
+bool BKE_mesh_center_centroid(Mesh *me, float cent[3])
+{
+ int i = me->totpoly;
+ MPoly *mpoly;
+ float poly_area;
+ float total_area = 0.0f;
+ float poly_cent[3];
+
+ zero_v3(cent);
+
+ /* calculate a weighted average of polygon centroids */
+ for (mpoly = me->mpoly; i--; mpoly++) {
+ poly_area = mesh_calc_poly_planar_area_centroid(mpoly, me->mloop + mpoly->loopstart, me->mvert, poly_cent);
+
+ madd_v3_v3fl(cent, poly_cent, poly_area);
+ total_area += poly_area;
+ }
+ /* otherwise we get NAN for 0 polys */
+ if (me->totpoly) {
+ mul_v3_fl(cent, 1.0f / total_area);
+ }
+
+ /* zero area faces cause this, fallback to median */
+ if (UNLIKELY(!is_finite_v3(cent))) {
+ return BKE_mesh_center_median(me, cent);
+ }
+
+ return (me->totpoly != 0);
+}
+/** \} */
+
+
+/* -------------------------------------------------------------------- */
+
+/** \name Mesh Connectivity Mapping
+ * \{ */
+
+
+/* ngon version wip, based on BM_uv_vert_map_create */
+/* this replaces the non bmesh function (in trunk) which takes MTFace's, if we ever need it back we could
+ * but for now this replaces it because its unused. */
+
+UvVertMap *BKE_mesh_uv_vert_map_create(struct MPoly *mpoly, struct MLoop *mloop, struct MLoopUV *mloopuv,
+ unsigned int totpoly, unsigned int totvert, int selected, float *limit)
+{
+ UvVertMap *vmap;
+ UvMapVert *buf;
+ MPoly *mp;
+ unsigned int a;
+ int i, totuv, nverts;
+
+ totuv = 0;
+
+ /* generate UvMapVert array */
+ mp = mpoly;
+ for (a = 0; a < totpoly; a++, mp++)
+ if (!selected || (!(mp->flag & ME_HIDE) && (mp->flag & ME_FACE_SEL)))
+ totuv += mp->totloop;
+
+ if (totuv == 0)
+ return NULL;
+
+ vmap = (UvVertMap *)MEM_callocN(sizeof(*vmap), "UvVertMap");
+ if (!vmap)
+ return NULL;
+
+ vmap->vert = (UvMapVert **)MEM_callocN(sizeof(*vmap->vert) * totvert, "UvMapVert*");
+ buf = vmap->buf = (UvMapVert *)MEM_callocN(sizeof(*vmap->buf) * (size_t)totuv, "UvMapVert");
+
+ if (!vmap->vert || !vmap->buf) {
+ BKE_mesh_uv_vert_map_free(vmap);
+ return NULL;
+ }
+
+ mp = mpoly;
+ for (a = 0; a < totpoly; a++, mp++) {
+ if (!selected || (!(mp->flag & ME_HIDE) && (mp->flag & ME_FACE_SEL))) {
+ nverts = mp->totloop;
+
+ for (i = 0; i < nverts; i++) {
+ buf->tfindex = (unsigned char)i;
+ buf->f = a;
+ buf->separate = 0;
+ buf->next = vmap->vert[mloop[mp->loopstart + i].v];
+ vmap->vert[mloop[mp->loopstart + i].v] = buf;
+ buf++;
+ }
+ }
+ }
+
+ /* sort individual uvs for each vert */
+ for (a = 0; a < totvert; a++) {
+ UvMapVert *newvlist = NULL, *vlist = vmap->vert[a];
+ UvMapVert *iterv, *v, *lastv, *next;
+ float *uv, *uv2, uvdiff[2];
+
+ while (vlist) {
+ v = vlist;
+ vlist = vlist->next;
+ v->next = newvlist;
+ newvlist = v;
+
+ uv = mloopuv[mpoly[v->f].loopstart + v->tfindex].uv;
+ lastv = NULL;
+ iterv = vlist;
+
+ while (iterv) {
+ next = iterv->next;
+
+ uv2 = mloopuv[mpoly[iterv->f].loopstart + iterv->tfindex].uv;
+ sub_v2_v2v2(uvdiff, uv2, uv);
+
+
+ if (fabsf(uv[0] - uv2[0]) < limit[0] && fabsf(uv[1] - uv2[1]) < limit[1]) {
+ if (lastv) lastv->next = next;
+ else vlist = next;
+ iterv->next = newvlist;
+ newvlist = iterv;
+ }
+ else
+ lastv = iterv;
+
+ iterv = next;
+ }
+
+ newvlist->separate = 1;
+ }
+
+ vmap->vert[a] = newvlist;
+ }
+
+ return vmap;
+}
+
+UvMapVert *BKE_mesh_uv_vert_map_get_vert(UvVertMap *vmap, unsigned int v)
+{
+ return vmap->vert[v];
+}
+
+void BKE_mesh_uv_vert_map_free(UvVertMap *vmap)
+{
+ if (vmap) {
+ if (vmap->vert) MEM_freeN(vmap->vert);
+ if (vmap->buf) MEM_freeN(vmap->buf);
+ MEM_freeN(vmap);
+ }
+}
+
+/* Generates a map where the key is the vertex and the value is a list
+ * of polys that use that vertex as a corner. The lists are allocated
+ * from one memory pool. */
+void BKE_mesh_vert_poly_map_create(MeshElemMap **r_map, int **r_mem,
+ const MPoly *mpoly, const MLoop *mloop,
+ int totvert, int totpoly, int totloop)
+{
+ MeshElemMap *map = MEM_callocN(sizeof(MeshElemMap) * (size_t)totvert, "vert poly map");
+ int *indices, *index_iter;
+ int i, j;
+
+ indices = index_iter = MEM_mallocN(sizeof(int) * (size_t)totloop, "vert poly map mem");
+
+ /* Count number of polys for each vertex */
+ for (i = 0; i < totpoly; i++) {
+ const MPoly *p = &mpoly[i];
+
+ for (j = 0; j < p->totloop; j++)
+ map[mloop[p->loopstart + j].v].count++;
+ }
+
+ /* Assign indices mem */
+ for (i = 0; i < totvert; i++) {
+ map[i].indices = index_iter;
+ index_iter += map[i].count;
+
+ /* Reset 'count' for use as index in last loop */
+ map[i].count = 0;
+ }
+
+ /* Find the users */
+ for (i = 0; i < totpoly; i++) {
+ const MPoly *p = &mpoly[i];
+
+ for (j = 0; j < p->totloop; j++) {
+ unsigned int v = mloop[p->loopstart + j].v;
+
+ map[v].indices[map[v].count] = i;
+ map[v].count++;
+ }
+ }
+
+ *r_map = map;
+ *r_mem = indices;
+}
+
+/* Generates a map where the key is the vertex and the value is a list
+ * of edges that use that vertex as an endpoint. The lists are allocated
+ * from one memory pool. */
+void BKE_mesh_vert_edge_map_create(MeshElemMap **r_map, int **r_mem,
+ const MEdge *medge, int totvert, int totedge)
+{
+ MeshElemMap *map = MEM_callocN(sizeof(MeshElemMap) * (size_t)totvert, "vert-edge map");
+ int *indices = MEM_mallocN(sizeof(int[2]) * (size_t)totedge, "vert-edge map mem");
+ int *i_pt = indices;
+
+ int i;
+
+ /* Count number of edges for each vertex */
+ for (i = 0; i < totedge; i++) {
+ map[medge[i].v1].count++;
+ map[medge[i].v2].count++;
+ }
+
+ /* Assign indices mem */
+ for (i = 0; i < totvert; i++) {
+ map[i].indices = i_pt;
+ i_pt += map[i].count;
+
+ /* Reset 'count' for use as index in last loop */
+ map[i].count = 0;
+ }
+
+ /* Find the users */
+ for (i = 0; i < totedge; i++) {
+ const unsigned int v[2] = {medge[i].v1, medge[i].v2};
+
+ map[v[0]].indices[map[v[0]].count] = i;
+ map[v[1]].indices[map[v[1]].count] = i;
+
+ map[v[0]].count++;
+ map[v[1]].count++;
+ }
+
+ *r_map = map;
+ *r_mem = indices;
+}
+
+void BKE_mesh_edge_poly_map_create(MeshElemMap **r_map, int **r_mem,
+ const MEdge *UNUSED(medge), const int totedge,
+ const MPoly *mpoly, const int totpoly,
+ const MLoop *mloop, const int totloop)
+{
+ MeshElemMap *map = MEM_callocN(sizeof(MeshElemMap) * (size_t)totedge, "edge-poly map");
+ int *indices = MEM_mallocN(sizeof(int) * (size_t)totloop, "edge-poly map mem");
+ int *index_step;
+ const MPoly *mp;
+ int i;
+
+ /* count face users */
+ for (i = 0, mp = mpoly; i < totpoly; mp++, i++) {
+ const MLoop *ml;
+ int j = mp->totloop;
+ for (ml = &mloop[mp->loopstart]; j--; ml++) {
+ map[ml->e].count++;
+ }
+ }
+
+ /* create offsets */
+ index_step = indices;
+ for (i = 0; i < totedge; i++) {
+ map[i].indices = index_step;
+ index_step += map[i].count;
+
+ /* re-count, using this as an index below */
+ map[i].count = 0;
+
+ }
+
+ /* assign poly-edge users */
+ for (i = 0, mp = mpoly; i < totpoly; mp++, i++) {
+ const MLoop *ml;
+ int j = mp->totloop;
+ for (ml = &mloop[mp->loopstart]; j--; ml++) {
+ MeshElemMap *map_ele = &map[ml->e];
+ map_ele->indices[map_ele->count++] = i;
+ }
+ }
+
+ *r_map = map;
+ *r_mem = indices;
+}
+
+
+/** \} */
+
+
+/* -------------------------------------------------------------------- */
+
+/** \name NGon Tessellation (NGon/Tessface Conversion)
+ * \{ */
+
+/**
+ * Convert a triangle or quadrangle of loop/poly data to tessface data
+ */
+void BKE_mesh_loops_to_mface_corners(
+ CustomData *fdata, CustomData *ldata,
+ CustomData *pdata, int lindex[4], int findex,
+ const int polyindex,
+ const int mf_len, /* 3 or 4 */
+
+ /* cache values to avoid lookups every time */
+ const int numTex, /* CustomData_number_of_layers(pdata, CD_MTEXPOLY) */
+ const int numCol, /* CustomData_number_of_layers(ldata, CD_MLOOPCOL) */
+ const bool hasPCol, /* CustomData_has_layer(ldata, CD_PREVIEW_MLOOPCOL) */
+ const bool hasOrigSpace /* CustomData_has_layer(ldata, CD_ORIGSPACE_MLOOP) */
+)
+{
+ MTFace *texface;
+ MTexPoly *texpoly;
+ MCol *mcol;
+ MLoopCol *mloopcol;
+ MLoopUV *mloopuv;
+ int i, j;
+
+ for (i = 0; i < numTex; i++) {
+ texface = CustomData_get_n(fdata, CD_MTFACE, findex, i);
+ texpoly = CustomData_get_n(pdata, CD_MTEXPOLY, polyindex, i);
+
+ ME_MTEXFACE_CPY(texface, texpoly);
+
+ for (j = 0; j < mf_len; j++) {
+ mloopuv = CustomData_get_n(ldata, CD_MLOOPUV, lindex[j], i);
+ copy_v2_v2(texface->uv[j], mloopuv->uv);
+ }
+ }
+
+ for (i = 0; i < numCol; i++) {
+ mcol = CustomData_get_n(fdata, CD_MCOL, findex, i);
+
+ for (j = 0; j < mf_len; j++) {
+ mloopcol = CustomData_get_n(ldata, CD_MLOOPCOL, lindex[j], i);
+ MESH_MLOOPCOL_TO_MCOL(mloopcol, &mcol[j]);
+ }
+ }
+
+ if (hasPCol) {
+ mcol = CustomData_get(fdata, findex, CD_PREVIEW_MCOL);
+
+ for (j = 0; j < mf_len; j++) {
+ mloopcol = CustomData_get(ldata, lindex[j], CD_PREVIEW_MLOOPCOL);
+ MESH_MLOOPCOL_TO_MCOL(mloopcol, &mcol[j]);
+ }
+ }
+
+ if (hasOrigSpace) {
+ OrigSpaceFace *of = CustomData_get(fdata, findex, CD_ORIGSPACE);
+ OrigSpaceLoop *lof;
+
+ for (j = 0; j < mf_len; j++) {
+ lof = CustomData_get(ldata, lindex[j], CD_ORIGSPACE_MLOOP);
+ copy_v2_v2(of->uv[j], lof->uv);
+ }
+ }
+}
+
+/**
+ * Recreate tessellation.
+ *
+ * use_poly_origindex sets whether or not the tessellation faces' origindex
+ * layer should point to original poly indices or real poly indices.
+ *
+ * use_face_origindex sets the tessellation faces' origindex layer
+ * to point to the tessellation faces themselves, not the polys.
+ *
+ * if both of the above are 0, it'll use the indices of the mpolys of the MPoly
+ * data in pdata, and ignore the origindex layer altogether.
+ *
+ * \return number of tessellation faces.
+ */
+int BKE_mesh_recalc_tessellation(CustomData *fdata,
+ CustomData *ldata, CustomData *pdata,
+ MVert *mvert, int totface, int totloop,
+ int totpoly,
+ /* when tessellating to recalculate normals after
+ * we can skip copying here */
+ const bool do_face_nor_cpy)
+{
+ /* use this to avoid locking pthread for _every_ polygon
+ * and calling the fill function */
+
+#define USE_TESSFACE_SPEEDUP
+#define USE_TESSFACE_QUADS // NEEDS FURTHER TESTING
+
+#define TESSFACE_SCANFILL (1 << 0)
+#define TESSFACE_IS_QUAD (1 << 1)
+
+ const int looptris_tot = poly_to_tri_count(totpoly, totloop);
+
+ MPoly *mp, *mpoly;
+ MLoop *ml, *mloop;
+ MFace *mface, *mf;
+ ScanFillContext sf_ctx;
+ ScanFillVert *sf_vert, *sf_vert_last, *sf_vert_first;
+ ScanFillFace *sf_tri;
+ MemArena *sf_arena = NULL;
+ int *mface_to_poly_map;
+ int lindex[4]; /* only ever use 3 in this case */
+ int poly_index, j, mface_index;
+
+ const int numTex = CustomData_number_of_layers(pdata, CD_MTEXPOLY);
+ const int numCol = CustomData_number_of_layers(ldata, CD_MLOOPCOL);
+ const bool hasPCol = CustomData_has_layer(ldata, CD_PREVIEW_MLOOPCOL);
+ const bool hasOrigSpace = CustomData_has_layer(ldata, CD_ORIGSPACE_MLOOP);
+
+ mpoly = CustomData_get_layer(pdata, CD_MPOLY);
+ mloop = CustomData_get_layer(ldata, CD_MLOOP);
+
+ /* allocate the length of totfaces, avoid many small reallocs,
+ * if all faces are tri's it will be correct, quads == 2x allocs */
+ /* take care. we are _not_ calloc'ing so be sure to initialize each field */
+ mface_to_poly_map = MEM_mallocN(sizeof(*mface_to_poly_map) * (size_t)looptris_tot, __func__);
+ mface = MEM_mallocN(sizeof(*mface) * (size_t)looptris_tot, __func__);
+
+ mface_index = 0;
+ mp = mpoly;
+ for (poly_index = 0; poly_index < totpoly; poly_index++, mp++) {
+ const unsigned int mp_loopstart = (unsigned int)mp->loopstart;
+ if (mp->totloop < 3) {
+ /* do nothing */
+ }
+
+#ifdef USE_TESSFACE_SPEEDUP
+
+#define ML_TO_MF(i1, i2, i3) \
+ mface_to_poly_map[mface_index] = poly_index; \
+ mf = &mface[mface_index]; \
+ /* set loop indices, transformed to vert indices later */ \
+ mf->v1 = mp_loopstart + i1; \
+ mf->v2 = mp_loopstart + i2; \
+ mf->v3 = mp_loopstart + i3; \
+ mf->v4 = 0; \
+ mf->mat_nr = mp->mat_nr; \
+ mf->flag = mp->flag; \
+ mf->edcode = 0; \
+ (void)0
+
+/* ALMOST IDENTICAL TO DEFINE ABOVE (see EXCEPTION) */
+#define ML_TO_MF_QUAD() \
+ mface_to_poly_map[mface_index] = poly_index; \
+ mf = &mface[mface_index]; \
+ /* set loop indices, transformed to vert indices later */ \
+ mf->v1 = mp_loopstart + 0; /* EXCEPTION */ \
+ mf->v2 = mp_loopstart + 1; /* EXCEPTION */ \
+ mf->v3 = mp_loopstart + 2; /* EXCEPTION */ \
+ mf->v4 = mp_loopstart + 3; /* EXCEPTION */ \
+ mf->mat_nr = mp->mat_nr; \
+ mf->flag = mp->flag; \
+ mf->edcode = TESSFACE_IS_QUAD; /* EXCEPTION */ \
+ (void)0
+
+
+ else if (mp->totloop == 3) {
+ ML_TO_MF(0, 1, 2);
+ mface_index++;
+ }
+ else if (mp->totloop == 4) {
+#ifdef USE_TESSFACE_QUADS
+ ML_TO_MF_QUAD();
+ mface_index++;
+#else
+ ML_TO_MF(0, 1, 2);
+ mface_index++;
+ ML_TO_MF(0, 2, 3);
+ mface_index++;
+#endif
+ }
+#endif /* USE_TESSFACE_SPEEDUP */
+ else {
+#define USE_TESSFACE_CALCNORMAL
+
+ unsigned int totfilltri;
+
+#ifdef USE_TESSFACE_CALCNORMAL
+ float normal[3];
+ zero_v3(normal);
+#endif
+ ml = mloop + mp->loopstart;
+
+ if (UNLIKELY(sf_arena == NULL)) {
+ sf_arena = BLI_memarena_new(BLI_SCANFILL_ARENA_SIZE, __func__);
+ }
+
+ BLI_scanfill_begin_arena(&sf_ctx, sf_arena);
+ sf_vert_first = NULL;
+ sf_vert_last = NULL;
+ for (j = 0; j < mp->totloop; j++, ml++) {
+ sf_vert = BLI_scanfill_vert_add(&sf_ctx, mvert[ml->v].co);
+
+ sf_vert->keyindex = (unsigned int)(mp->loopstart + j);
+
+ if (sf_vert_last) {
+ BLI_scanfill_edge_add(&sf_ctx, sf_vert_last, sf_vert);
+#ifdef USE_TESSFACE_CALCNORMAL
+ add_newell_cross_v3_v3v3(normal, sf_vert_last->co, sf_vert->co);
+#endif
+ }
+
+ if (!sf_vert_first)
+ sf_vert_first = sf_vert;
+ sf_vert_last = sf_vert;
+ }
+ BLI_scanfill_edge_add(&sf_ctx, sf_vert_last, sf_vert_first);
+#ifdef USE_TESSFACE_CALCNORMAL
+ add_newell_cross_v3_v3v3(normal, sf_vert_last->co, sf_vert_first->co);
+ if (UNLIKELY(normalize_v3(normal) == 0.0f)) {
+ normal[2] = 1.0f;
+ }
+ totfilltri = BLI_scanfill_calc_ex(&sf_ctx, 0, normal);
+#else
+ totfilltri = BLI_scanfill_calc(&sf_ctx, 0);
+#endif
+ BLI_assert(totfilltri <= (unsigned int)(mp->totloop - 2));
+ (void)totfilltri;
+
+ for (sf_tri = sf_ctx.fillfacebase.first; sf_tri; sf_tri = sf_tri->next, mf++) {
+ mface_to_poly_map[mface_index] = poly_index;
+ mf = &mface[mface_index];
+
+ /* set loop indices, transformed to vert indices later */
+ mf->v1 = sf_tri->v1->keyindex;
+ mf->v2 = sf_tri->v2->keyindex;
+ mf->v3 = sf_tri->v3->keyindex;
+ mf->v4 = 0;
+
+ mf->mat_nr = mp->mat_nr;
+ mf->flag = mp->flag;
+
+#ifdef USE_TESSFACE_SPEEDUP
+ mf->edcode = TESSFACE_SCANFILL; /* tag for sorting loop indices */
+#endif
+
+ mface_index++;
+ }
+
+ BLI_scanfill_end_arena(&sf_ctx, sf_arena);
+
+#undef USE_TESSFACE_CALCNORMAL
+ }
+ }
+
+ if (sf_arena) {
+ BLI_memarena_free(sf_arena);
+ sf_arena = NULL;
+ }
+
+ CustomData_free(fdata, totface);
+ totface = mface_index;
+
+ BLI_assert(totface <= looptris_tot);
+
+ /* not essential but without this we store over-alloc'd memory in the CustomData layers */
+ if (LIKELY(looptris_tot != totface)) {
+ mface = MEM_reallocN(mface, sizeof(*mface) * (size_t)totface);
+ mface_to_poly_map = MEM_reallocN(mface_to_poly_map, sizeof(*mface_to_poly_map) * (size_t)totface);
+ }
+
+ CustomData_add_layer(fdata, CD_MFACE, CD_ASSIGN, mface, totface);
+
+ /* CD_ORIGINDEX will contain an array of indices from tessfaces to the polygons
+ * they are directly tessellated from */
+ CustomData_add_layer(fdata, CD_ORIGINDEX, CD_ASSIGN, mface_to_poly_map, totface);
+ CustomData_from_bmeshpoly(fdata, pdata, ldata, totface);
+
+ if (do_face_nor_cpy) {
+ /* If polys have a normals layer, copying that to faces can help
+ * avoid the need to recalculate normals later */
+ if (CustomData_has_layer(pdata, CD_NORMAL)) {
+ float (*pnors)[3] = CustomData_get_layer(pdata, CD_NORMAL);
+ float (*fnors)[3] = CustomData_add_layer(fdata, CD_NORMAL, CD_CALLOC, NULL, totface);
+ for (mface_index = 0; mface_index < totface; mface_index++) {
+ copy_v3_v3(fnors[mface_index], pnors[mface_to_poly_map[mface_index]]);
+ }
+ }
+ }
+
+ mf = mface;
+ for (mface_index = 0; mface_index < totface; mface_index++, mf++) {
+
+#ifdef USE_TESSFACE_QUADS
+ const int mf_len = mf->edcode & TESSFACE_IS_QUAD ? 4 : 3;
+#endif
+
+#ifdef USE_TESSFACE_SPEEDUP
+ /* skip sorting when not using ngons */
+ if (UNLIKELY(mf->edcode & TESSFACE_SCANFILL))
+#endif
+ {
+ /* sort loop indices to ensure winding is correct */
+ if (mf->v1 > mf->v2) SWAP(unsigned int, mf->v1, mf->v2);
+ if (mf->v2 > mf->v3) SWAP(unsigned int, mf->v2, mf->v3);
+ if (mf->v1 > mf->v2) SWAP(unsigned int, mf->v1, mf->v2);
+
+ if (mf->v1 > mf->v2) SWAP(unsigned int, mf->v1, mf->v2);
+ if (mf->v2 > mf->v3) SWAP(unsigned int, mf->v2, mf->v3);
+ if (mf->v1 > mf->v2) SWAP(unsigned int, mf->v1, mf->v2);
+ }
+
+ /* end abusing the edcode */
+#if defined(USE_TESSFACE_QUADS) || defined(USE_TESSFACE_SPEEDUP)
+ mf->edcode = 0;
+#endif
+
+
+ lindex[0] = (int)mf->v1;
+ lindex[1] = (int)mf->v2;
+ lindex[2] = (int)mf->v3;
+#ifdef USE_TESSFACE_QUADS
+ if (mf_len == 4) lindex[3] = (int)mf->v4;
+#endif
+
+ /*transform loop indices to vert indices*/
+ mf->v1 = mloop[mf->v1].v;
+ mf->v2 = mloop[mf->v2].v;
+ mf->v3 = mloop[mf->v3].v;
+#ifdef USE_TESSFACE_QUADS
+ if (mf_len == 4) mf->v4 = mloop[mf->v4].v;
+#endif
+
+ BKE_mesh_loops_to_mface_corners(fdata, ldata, pdata,
+ lindex, mface_index, mface_to_poly_map[mface_index],
+#ifdef USE_TESSFACE_QUADS
+ mf_len,
+#else
+ 3,
+#endif
+ numTex, numCol, hasPCol, hasOrigSpace);
+
+
+#ifdef USE_TESSFACE_QUADS
+ test_index_face(mf, fdata, mface_index, mf_len);
+#endif
+
+ }
+
+ return totface;
+
+#undef USE_TESSFACE_SPEEDUP
+
+}
+
+
+#ifdef USE_BMESH_SAVE_AS_COMPAT
+
+/**
+ * This function recreates a tessellation.
+ * returns number of tessellation faces.
+ *
+ * for forwards compat only quad->tri polys to mface, skip ngons.
+ */
+int BKE_mesh_mpoly_to_mface(struct CustomData *fdata, struct CustomData *ldata,
+ struct CustomData *pdata, int totface, int UNUSED(totloop), int totpoly)
+{
+ MLoop *mloop;
+
+ int lindex[4];
+ int i;
+ int k;
+
+ MPoly *mp, *mpoly;
+ MFace *mface, *mf;
+
+ const int numTex = CustomData_number_of_layers(pdata, CD_MTEXPOLY);
+ const int numCol = CustomData_number_of_layers(ldata, CD_MLOOPCOL);
+ const bool hasPCol = CustomData_has_layer(ldata, CD_PREVIEW_MLOOPCOL);
+ const bool hasOrigSpace = CustomData_has_layer(ldata, CD_ORIGSPACE_MLOOP);
+
+ /* over-alloc, ngons will be skipped */
+ mface = MEM_mallocN(sizeof(*mface) * (size_t)totpoly, __func__);
+
+ mpoly = CustomData_get_layer(pdata, CD_MPOLY);
+ mloop = CustomData_get_layer(ldata, CD_MLOOP);
+
+ mp = mpoly;
+ k = 0;
+ for (i = 0; i < totpoly; i++, mp++) {
+ if (ELEM(mp->totloop, 3, 4)) {
+ const unsigned int mp_loopstart = (unsigned int)mp->loopstart;
+ mf = &mface[k];
+
+ mf->mat_nr = mp->mat_nr;
+ mf->flag = mp->flag;
+
+ mf->v1 = mp_loopstart + 0;
+ mf->v2 = mp_loopstart + 1;
+ mf->v3 = mp_loopstart + 2;
+ mf->v4 = (mp->totloop == 4) ? (mp_loopstart + 3) : 0;
+
+ /* abuse edcode for temp storage and clear next loop */
+ mf->edcode = (char)mp->totloop; /* only ever 3 or 4 */
+
+ k++;
+ }
+ }
+
+ CustomData_free(fdata, totface);
+
+ totface = k;
+
+ CustomData_add_layer(fdata, CD_MFACE, CD_ASSIGN, mface, totface);
+
+ CustomData_from_bmeshpoly(fdata, pdata, ldata, totface);
+
+ mp = mpoly;
+ k = 0;
+ for (i = 0; i < totpoly; i++, mp++) {
+ if (ELEM(mp->totloop, 3, 4)) {
+ mf = &mface[k];
+
+ if (mf->edcode == 3) {
+ /* sort loop indices to ensure winding is correct */
+ /* NO SORT - looks like we can skip this */
+
+ lindex[0] = (int)mf->v1;
+ lindex[1] = (int)mf->v2;
+ lindex[2] = (int)mf->v3;
+ lindex[3] = 0; /* unused */
+
+ /* transform loop indices to vert indices */
+ mf->v1 = mloop[mf->v1].v;
+ mf->v2 = mloop[mf->v2].v;
+ mf->v3 = mloop[mf->v3].v;
+
+ BKE_mesh_loops_to_mface_corners(fdata, ldata, pdata,
+ lindex, k, i, 3,
+ numTex, numCol, hasPCol, hasOrigSpace);
+ test_index_face(mf, fdata, k, 3);
+ }
+ else {
+ /* sort loop indices to ensure winding is correct */
+ /* NO SORT - looks like we can skip this */
+
+ lindex[0] = (int)mf->v1;
+ lindex[1] = (int)mf->v2;
+ lindex[2] = (int)mf->v3;
+ lindex[3] = (int)mf->v4;
+
+ /* transform loop indices to vert indices */
+ mf->v1 = mloop[mf->v1].v;
+ mf->v2 = mloop[mf->v2].v;
+ mf->v3 = mloop[mf->v3].v;
+ mf->v4 = mloop[mf->v4].v;
+
+ BKE_mesh_loops_to_mface_corners(fdata, ldata, pdata,
+ lindex, k, i, 4,
+ numTex, numCol, hasPCol, hasOrigSpace);
+ test_index_face(mf, fdata, k, 4);
+ }
+
+ mf->edcode = 0;
+
+ k++;
+ }
+ }
+
+ return k;
+}
+#endif /* USE_BMESH_SAVE_AS_COMPAT */
+
+
+static void bm_corners_to_loops_ex(ID *id, CustomData *fdata, CustomData *ldata, CustomData *pdata,
+ MFace *mface, int totloop, int findex, int loopstart, int numTex, int numCol)
+{
+ MTFace *texface;
+ MTexPoly *texpoly;
+ MCol *mcol;
+ MLoopCol *mloopcol;
+ MLoopUV *mloopuv;
+ MFace *mf;
+ int i;
+
+ mf = mface + findex;
+
+ for (i = 0; i < numTex; i++) {
+ texface = CustomData_get_n(fdata, CD_MTFACE, findex, i);
+ texpoly = CustomData_get_n(pdata, CD_MTEXPOLY, findex, i);
+
+ ME_MTEXFACE_CPY(texpoly, texface);
+
+ mloopuv = CustomData_get_n(ldata, CD_MLOOPUV, loopstart, i);
+ copy_v2_v2(mloopuv->uv, texface->uv[0]); mloopuv++;
+ copy_v2_v2(mloopuv->uv, texface->uv[1]); mloopuv++;
+ copy_v2_v2(mloopuv->uv, texface->uv[2]); mloopuv++;
+
+ if (mf->v4) {
+ copy_v2_v2(mloopuv->uv, texface->uv[3]); mloopuv++;
+ }
+ }
+
+ for (i = 0; i < numCol; i++) {
+ mloopcol = CustomData_get_n(ldata, CD_MLOOPCOL, loopstart, i);
+ mcol = CustomData_get_n(fdata, CD_MCOL, findex, i);
+
+ MESH_MLOOPCOL_FROM_MCOL(mloopcol, &mcol[0]); mloopcol++;
+ MESH_MLOOPCOL_FROM_MCOL(mloopcol, &mcol[1]); mloopcol++;
+ MESH_MLOOPCOL_FROM_MCOL(mloopcol, &mcol[2]); mloopcol++;
+ if (mf->v4) {
+ MESH_MLOOPCOL_FROM_MCOL(mloopcol, &mcol[3]); mloopcol++;
+ }
+ }
+
+ if (CustomData_has_layer(fdata, CD_MDISPS)) {
+ MDisps *ld = CustomData_get(ldata, loopstart, CD_MDISPS);
+ MDisps *fd = CustomData_get(fdata, findex, CD_MDISPS);
+ float (*disps)[3] = fd->disps;
+ int tot = mf->v4 ? 4 : 3;
+ int corners;
+
+ if (CustomData_external_test(fdata, CD_MDISPS)) {
+ if (id && fdata->external) {
+ CustomData_external_add(ldata, id, CD_MDISPS,
+ totloop, fdata->external->filename);
+ }
+ }
+
+ corners = multires_mdisp_corners(fd);
+
+ if (corners == 0) {
+ /* Empty MDisp layers appear in at least one of the sintel.blend files.
+ * Not sure why this happens, but it seems fine to just ignore them here.
+ * If (corners == 0) for a non-empty layer though, something went wrong. */
+ BLI_assert(fd->totdisp == 0);
+ }
+ else {
+ const int side = (int)sqrtf((float)(fd->totdisp / corners));
+ const int side_sq = side * side;
+ const size_t disps_size = sizeof(float[3]) * (size_t)side_sq;
+
+ for (i = 0; i < tot; i++, disps += side_sq, ld++) {
+ ld->totdisp = side_sq;
+ ld->level = (int)(logf((float)side - 1.0f) / (float)M_LN2) + 1;
+
+ if (ld->disps)
+ MEM_freeN(ld->disps);
+
+ ld->disps = MEM_mallocN(disps_size, "converted loop mdisps");
+ if (fd->disps) {
+ memcpy(ld->disps, disps, disps_size);
+ }
+ else {
+ memset(ld->disps, 0, disps_size);
+ }
+ }
+ }
+ }
+}
+
+
+void BKE_mesh_convert_mfaces_to_mpolys(Mesh *mesh)
+{
+ BKE_mesh_convert_mfaces_to_mpolys_ex(&mesh->id, &mesh->fdata, &mesh->ldata, &mesh->pdata,
+ mesh->totedge, mesh->totface, mesh->totloop, mesh->totpoly,
+ mesh->medge, mesh->mface,
+ &mesh->totloop, &mesh->totpoly, &mesh->mloop, &mesh->mpoly);
+
+ BKE_mesh_update_customdata_pointers(mesh, true);
+}
+
+/* the same as BKE_mesh_convert_mfaces_to_mpolys but oriented to be used in do_versions from readfile.c
+ * the difference is how active/render/clone/stencil indices are handled here
+ *
+ * normally thay're being set from pdata which totally makes sense for meshes which are already
+ * converted to bmesh structures, but when loading older files indices shall be updated in other
+ * way around, so newly added pdata and ldata would have this indices set based on fdata layer
+ *
+ * this is normally only needed when reading older files, in all other cases BKE_mesh_convert_mfaces_to_mpolys
+ * shall be always used
+ */
+void BKE_mesh_do_versions_convert_mfaces_to_mpolys(Mesh *mesh)
+{
+ BKE_mesh_convert_mfaces_to_mpolys_ex(&mesh->id, &mesh->fdata, &mesh->ldata, &mesh->pdata,
+ mesh->totedge, mesh->totface, mesh->totloop, mesh->totpoly,
+ mesh->medge, mesh->mface,
+ &mesh->totloop, &mesh->totpoly, &mesh->mloop, &mesh->mpoly);
+
+ CustomData_bmesh_do_versions_update_active_layers(&mesh->fdata, &mesh->pdata, &mesh->ldata);
+
+ BKE_mesh_update_customdata_pointers(mesh, true);
+}
+
+void BKE_mesh_convert_mfaces_to_mpolys_ex(ID *id, CustomData *fdata, CustomData *ldata, CustomData *pdata,
+ int totedge_i, int totface_i, int totloop_i, int totpoly_i,
+ MEdge *medge, MFace *mface,
+ int *totloop_r, int *totpoly_r,
+ MLoop **mloop_r, MPoly **mpoly_r)
+{
+ MFace *mf;
+ MLoop *ml, *mloop;
+ MPoly *mp, *mpoly;
+ MEdge *me;
+ EdgeHash *eh;
+ int numTex, numCol;
+ int i, j, totloop, totpoly, *polyindex;
+
+ /* just in case some of these layers are filled in (can happen with python created meshes) */
+ CustomData_free(ldata, totloop_i);
+ CustomData_free(pdata, totpoly_i);
+
+ totpoly = totface_i;
+ mpoly = MEM_callocN(sizeof(MPoly) * (size_t)totpoly, "mpoly converted");
+ CustomData_add_layer(pdata, CD_MPOLY, CD_ASSIGN, mpoly, totpoly);
+
+ numTex = CustomData_number_of_layers(fdata, CD_MTFACE);
+ numCol = CustomData_number_of_layers(fdata, CD_MCOL);
+
+ totloop = 0;
+ mf = mface;
+ for (i = 0; i < totface_i; i++, mf++) {
+ totloop += mf->v4 ? 4 : 3;
+ }
+
+ mloop = MEM_callocN(sizeof(MLoop) * (size_t)totloop, "mloop converted");
+
+ CustomData_add_layer(ldata, CD_MLOOP, CD_ASSIGN, mloop, totloop);
+
+ CustomData_to_bmeshpoly(fdata, pdata, ldata, totloop, totpoly);
+
+ if (id) {
+ /* ensure external data is transferred */
+ CustomData_external_read(fdata, id, CD_MASK_MDISPS, totface_i);
+ }
+
+ eh = BLI_edgehash_new_ex(__func__, (unsigned int)totedge_i);
+
+ /* build edge hash */
+ me = medge;
+ for (i = 0; i < totedge_i; i++, me++) {
+ BLI_edgehash_insert(eh, me->v1, me->v2, SET_UINT_IN_POINTER(i));
+
+ /* unrelated but avoid having the FGON flag enabled, so we can reuse it later for something else */
+ me->flag &= ~ME_FGON;
+ }
+
+ polyindex = CustomData_get_layer(fdata, CD_ORIGINDEX);
+
+ j = 0; /* current loop index */
+ ml = mloop;
+ mf = mface;
+ mp = mpoly;
+ for (i = 0; i < totface_i; i++, mf++, mp++) {
+ mp->loopstart = j;
+
+ mp->totloop = mf->v4 ? 4 : 3;
+
+ mp->mat_nr = mf->mat_nr;
+ mp->flag = mf->flag;
+
+# define ML(v1, v2) { \
+ ml->v = mf->v1; \
+ ml->e = GET_UINT_FROM_POINTER(BLI_edgehash_lookup(eh, mf->v1, mf->v2)); \
+ ml++; j++; \
+ } (void)0
+
+ ML(v1, v2);
+ ML(v2, v3);
+ if (mf->v4) {
+ ML(v3, v4);
+ ML(v4, v1);
+ }
+ else {
+ ML(v3, v1);
+ }
+
+# undef ML
+
+ bm_corners_to_loops_ex(id, fdata, ldata, pdata, mface, totloop, i, mp->loopstart, numTex, numCol);
+
+ if (polyindex) {
+ *polyindex = i;
+ polyindex++;
+ }
+ }
+
+ /* note, we don't convert NGons at all, these are not even real ngons,
+ * they have their own UV's, colors etc - its more an editing feature. */
+
+ BLI_edgehash_free(eh, NULL);
+
+ *totpoly_r = totpoly;
+ *totloop_r = totloop;
+ *mpoly_r = mpoly;
+ *mloop_r = mloop;
+}
+/** \} */
+
+
+/* -------------------------------------------------------------------- */
+
+/** \name Mesh Flag Flushing
+ * \{ */
+
+/* update the hide flag for edges and faces from the corresponding
+ * flag in verts */
+void BKE_mesh_flush_hidden_from_verts_ex(const MVert *mvert,
+ const MLoop *mloop,
+ MEdge *medge, const int totedge,
+ MPoly *mpoly, const int totpoly)
+{
+ int i, j;
+
+ for (i = 0; i < totedge; i++) {
+ MEdge *e = &medge[i];
+ if (mvert[e->v1].flag & ME_HIDE ||
+ mvert[e->v2].flag & ME_HIDE)
+ {
+ e->flag |= ME_HIDE;
+ }
+ else {
+ e->flag &= ~ME_HIDE;
+ }
+ }
+ for (i = 0; i < totpoly; i++) {
+ MPoly *p = &mpoly[i];
+ p->flag &= (char)~ME_HIDE;
+ for (j = 0; j < p->totloop; j++) {
+ if (mvert[mloop[p->loopstart + j].v].flag & ME_HIDE)
+ p->flag |= ME_HIDE;
+ }
+ }
+}
+void BKE_mesh_flush_hidden_from_verts(Mesh *me)
+{
+ BKE_mesh_flush_hidden_from_verts_ex(me->mvert, me->mloop,
+ me->medge, me->totedge,
+ me->mpoly, me->totpoly);
+}
+
+void BKE_mesh_flush_hidden_from_polys_ex(MVert *mvert,
+ const MLoop *mloop,
+ MEdge *medge, const int UNUSED(totedge),
+ const MPoly *mpoly, const int totpoly)
+{
+ const MPoly *mp;
+ int i;
+
+ i = totpoly;
+ for (mp = mpoly; i--; mp++) {
+ if (mp->flag & ME_HIDE) {
+ const MLoop *ml;
+ int j;
+ j = mp->totloop;
+ for (ml = &mloop[mp->loopstart]; j--; ml++) {
+ mvert[ml->v].flag |= ME_HIDE;
+ medge[ml->e].flag |= ME_HIDE;
+ }
+ }
+ }
+
+ i = totpoly;
+ for (mp = mpoly; i--; mp++) {
+ if ((mp->flag & ME_HIDE) == 0) {
+ const MLoop *ml;
+ int j;
+ j = mp->totloop;
+ for (ml = &mloop[mp->loopstart]; j--; ml++) {
+ mvert[ml->v].flag &= (char)~ME_HIDE;
+ medge[ml->e].flag &= (char)~ME_HIDE;
+ }
+ }
+ }
+}
+void BKE_mesh_flush_hidden_from_polys(Mesh *me)
+{
+ BKE_mesh_flush_hidden_from_polys_ex(me->mvert, me->mloop,
+ me->medge, me->totedge,
+ me->mpoly, me->totpoly);
+}
+
+/**
+ * simple poly -> vert/edge selection.
+ */
+void BKE_mesh_flush_select_from_polys_ex(MVert *mvert, const int totvert,
+ const MLoop *mloop,
+ MEdge *medge, const int totedge,
+ const MPoly *mpoly, const int totpoly)
+{
+ MVert *mv;
+ MEdge *med;
+ const MPoly *mp;
+ int i;
+
+ i = totvert;
+ for (mv = mvert; i--; mv++) {
+ mv->flag &= (char)~SELECT;
+ }
+
+ i = totedge;
+ for (med = medge; i--; med++) {
+ med->flag &= ~SELECT;
+ }
+
+ i = totpoly;
+ for (mp = mpoly; i--; mp++) {
+ /* assume if its selected its not hidden and none of its verts/edges are hidden
+ * (a common assumption)*/
+ if (mp->flag & ME_FACE_SEL) {
+ const MLoop *ml;
+ int j;
+ j = mp->totloop;
+ for (ml = &mloop[mp->loopstart]; j--; ml++) {
+ mvert[ml->v].flag |= SELECT;
+ medge[ml->e].flag |= SELECT;
+ }
+ }
+ }
+}
+void BKE_mesh_flush_select_from_polys(Mesh *me)
+{
+ BKE_mesh_flush_select_from_polys_ex(me->mvert, me->totvert,
+ me->mloop,
+ me->medge, me->totedge,
+ me->mpoly, me->totpoly);
+}
+
+void BKE_mesh_flush_select_from_verts_ex(const MVert *mvert, const int UNUSED(totvert),
+ const MLoop *mloop,
+ MEdge *medge, const int totedge,
+ MPoly *mpoly, const int totpoly)
+{
+ MEdge *med;
+ MPoly *mp;
+ int i;
+
+ /* edges */
+ i = totedge;
+ for (med = medge; i--; med++) {
+ if ((med->flag & ME_HIDE) == 0) {
+ if ((mvert[med->v1].flag & SELECT) && (mvert[med->v2].flag & SELECT)) {
+ med->flag |= SELECT;
+ }
+ else {
+ med->flag &= ~SELECT;
+ }
+ }
+ }
+
+ /* polys */
+ i = totpoly;
+ for (mp = mpoly; i--; mp++) {
+ if ((mp->flag & ME_HIDE) == 0) {
+ int ok = TRUE;
+ const MLoop *ml;
+ int j;
+ j = mp->totloop;
+ for (ml = &mloop[mp->loopstart]; j--; ml++) {
+ if ((mvert[ml->v].flag & SELECT) == 0) {
+ ok = FALSE;
+ break;
+ }
+ }
+
+ if (ok) {
+ mp->flag |= ME_FACE_SEL;
+ }
+ else {
+ mp->flag &= (char)~ME_FACE_SEL;
+ }
+ }
+ }
+}
+void BKE_mesh_flush_select_from_verts(Mesh *me)
+{
+ BKE_mesh_flush_select_from_verts_ex(me->mvert, me->totvert,
+ me->mloop,
+ me->medge, me->totedge,
+ me->mpoly, me->totpoly);
+}
+/** \} */
+
+
+/* -------------------------------------------------------------------- */
+
+/** \name Mesh Smooth Groups
+ * \{ */
+
+/**
+ * Calculate smooth groups from sharp edges.
+ *
+ * \param r_totgroup The total number of groups, 1 or more.
+ * \return Polygon aligned array of group index values (bitflags if use_bitflags is true), starting at 1.
+ */
+int *BKE_mesh_calc_smoothgroups(const MEdge *medge, const int totedge,
+ const MPoly *mpoly, const int totpoly,
+ const MLoop *mloop, const int totloop,
+ int *r_totgroup, const bool use_bitflags)
+{
+ int *poly_groups;
+ int *poly_stack;
+
+ int poly_prev = 0;
+ const int temp_poly_group_id = 3; /* Placeholder value. */
+ const int poly_group_id_overflowed = 5; /* Group we could not find any available bit, will be reset to 0 at end */
+ int tot_group = 0;
+ bool group_id_overflow = false;
+
+ /* map vars */
+ MeshElemMap *edge_poly_map;
+ int *edge_poly_mem;
+
+ if (totpoly == 0) {
+ *r_totgroup = 0;
+ return NULL;
+ }
+
+ BKE_mesh_edge_poly_map_create(&edge_poly_map, &edge_poly_mem,
+ medge, totedge,
+ mpoly, totpoly,
+ mloop, totloop);
+
+ poly_groups = MEM_callocN(sizeof(int) * (size_t)totpoly, __func__);
+ poly_stack = MEM_mallocN(sizeof(int) * (size_t)totpoly, __func__);
+
+ while (true) {
+ int poly;
+ int bit_poly_group_mask = 0;
+ int poly_group_id;
+ int ps_curr_idx = 0, ps_end_idx = 0; /* stack indices */
+
+ for (poly = poly_prev; poly < totpoly; poly++) {
+ if (poly_groups[poly] == 0) {
+ break;
+ }
+ }
+
+ if (poly == totpoly) {
+ /* all done */
+ break;
+ }
+
+ poly_group_id = use_bitflags ? temp_poly_group_id : ++tot_group;
+
+ /* start searching from here next time */
+ poly_prev = poly + 1;
+
+ poly_groups[poly] = poly_group_id;
+ poly_stack[ps_end_idx++] = poly;
+
+ while (ps_curr_idx != ps_end_idx) {
+ const MPoly *mp;
+ const MLoop *ml;
+ int j;
+
+ poly = poly_stack[ps_curr_idx++];
+ BLI_assert(poly_groups[poly] == poly_group_id);
+
+ mp = &mpoly[poly];
+ for (ml = &mloop[mp->loopstart], j = mp->totloop; j--; ml++) {
+ /* loop over poly users */
+ const MeshElemMap *map_ele = &edge_poly_map[ml->e];
+ int *p = map_ele->indices;
+ int i = map_ele->count;
+ if (!(medge[ml->e].flag & ME_SHARP)) {
+ for (; i--; p++) {
+ /* if we meet other non initialized its a bug */
+ BLI_assert(ELEM(poly_groups[*p], 0, poly_group_id));
+
+ if (poly_groups[*p] == 0) {
+ poly_groups[*p] = poly_group_id;
+ poly_stack[ps_end_idx++] = *p;
+ }
+ }
+ }
+ else if (use_bitflags) {
+ /* Find contiguous smooth groups already assigned, these are the values we can't reuse! */
+ for (; i--; p++) {
+ int bit = poly_groups[*p];
+ if (!ELEM3(bit, 0, poly_group_id, poly_group_id_overflowed) &&
+ !(bit_poly_group_mask & bit))
+ {
+ bit_poly_group_mask |= bit;
+ }
+ }
+ }
+ }
+ }
+ /* And now, we have all our poly from current group in poly_stack (from 0 to (ps_end_idx - 1)), as well as
+ * all smoothgroups bits we can't use in bit_poly_group_mask.
+ */
+ if (use_bitflags) {
+ int i, *p, gid_bit = 0;
+ poly_group_id = 1;
+
+ /* Find first bit available! */
+ for (; (poly_group_id & bit_poly_group_mask) && (gid_bit < 32); gid_bit++) {
+ poly_group_id <<= 1; /* will 'overflow' on last possible iteration. */
+ }
+ if (UNLIKELY(gid_bit > 31)) {
+ /* All bits used in contiguous smooth groups, we can't do much!
+ * Note: this is *very* unlikely - theoretically, four groups are enough, I don't think we can reach
+ * this goal with such a simple algo, but I don't think either we'll never need all 32 groups!
+ */
+ printf("Warning, could not find an available id for current smooth group, faces will me marked "
+ "as out of any smooth group...\n");
+ poly_group_id = poly_group_id_overflowed; /* Can't use 0, will have to set them to this value later. */
+ group_id_overflow = true;
+ }
+ if (gid_bit > tot_group) {
+ tot_group = gid_bit;
+ }
+ /* And assign the final smooth group id to that poly group! */
+ for (i = ps_end_idx, p = poly_stack; i--; p++) {
+ poly_groups[*p] = poly_group_id;
+ }
+ }
+ }
+
+ if (UNLIKELY(group_id_overflow)) {
+ int i = totpoly, *gid = poly_groups;
+ for (; i--; gid++) {
+ if (*gid == poly_group_id_overflowed) {
+ *gid = 0;
+ }
+ }
+ }
+
+ MEM_freeN(edge_poly_map);
+ MEM_freeN(edge_poly_mem);
+ MEM_freeN(poly_stack);
+
+ *r_totgroup = tot_group + 1;
+
+ return poly_groups;
+}
+/** \} */
+
+
+/* -------------------------------------------------------------------- */
+
+/** \name Mesh Spatial Calculation
+ * \{ */
+
+/**
+ * This function takes the difference between 2 vertex-coord-arrays
+ * (\a vert_cos_src, \a vert_cos_dst),
+ * and applies the difference to \a vert_cos_new relative to \a vert_cos_org.
+ *
+ * \param vert_cos_src reference deform source.
+ * \param vert_cos_dst reference deform destination.
+ *
+ * \param vert_cos_org reference for the output location.
+ * \param vert_cos_new resulting coords.
+ */
+void BKE_mesh_calc_relative_deform(
+ const MPoly *mpoly, const int totpoly,
+ const MLoop *mloop, const int totvert,
+
+ const float (*vert_cos_src)[3],
+ const float (*vert_cos_dst)[3],
+
+ const float (*vert_cos_org)[3],
+ float (*vert_cos_new)[3])
+{
+ const MPoly *mp;
+ int i;
+
+ int *vert_accum = MEM_callocN(sizeof(*vert_accum) * (size_t)totvert, __func__);
+
+ memset(vert_cos_new, '\0', sizeof(*vert_cos_new) * (size_t)totvert);
+
+ for (i = 0, mp = mpoly; i < totpoly; i++, mp++) {
+ const MLoop *loopstart = mloop + mp->loopstart;
+ int j;
+
+ for (j = 0; j < mp->totloop; j++) {
+ unsigned int v_prev = loopstart[(mp->totloop + (j - 1)) % mp->totloop].v;
+ unsigned int v_curr = loopstart[j].v;
+ unsigned int v_next = loopstart[(j + 1) % mp->totloop].v;
+
+ float tvec[3];
+
+ barycentric_transform(
+ tvec, vert_cos_dst[v_curr],
+ vert_cos_org[v_prev], vert_cos_org[v_curr], vert_cos_org[v_next],
+ vert_cos_src[v_prev], vert_cos_src[v_curr], vert_cos_src[v_next]
+ );
+
+ add_v3_v3(vert_cos_new[v_curr], tvec);
+ vert_accum[v_curr] += 1;
+ }
+ }
+
+ for (i = 0; i < totvert; i++) {
+ if (vert_accum[i]) {
+ mul_v3_fl(vert_cos_new[i], 1.0f / (float)vert_accum[i]);
+ }
+ else {
+ copy_v3_v3(vert_cos_new[i], vert_cos_org[i]);
+ }
+ }
+
+ MEM_freeN(vert_accum);
+}
+/** \} */
diff --git a/source/blender/blenkernel/intern/mesh_validate.c b/source/blender/blenkernel/intern/mesh_validate.c
index 2eced15a147..1c9576d74d0 100644
--- a/source/blender/blenkernel/intern/mesh_validate.c
+++ b/source/blender/blenkernel/intern/mesh_validate.c
@@ -49,7 +49,12 @@
#include "MEM_guardedalloc.h"
-#define SELECT 1
+/* loop v/e are unsigned, so using max uint_32 value as invalid marker... */
+#define INVALID_LOOP_EDGE_MARKER 4294967295u
+
+
+/** \name Internal functions
+ * \{ */
typedef union {
uint32_t verts[2];
@@ -181,17 +186,37 @@ static int search_polyloop_cmp(const void *v1, const void *v2)
/* Else, sort on loopstart. */
return sp1->loopstart > sp2->loopstart ? 1 : sp1->loopstart < sp2->loopstart ? -1 : 0;
}
+/** \} */
+
+
+
+/* -------------------------------------------------------------------- */
-#define PRINT if (do_verbose) printf
+/** \name Mesh Validation
+ * \{ */
-int BKE_mesh_validate_arrays(Mesh *mesh,
- MVert *mverts, unsigned int totvert,
- MEdge *medges, unsigned int totedge,
- MFace *mfaces, unsigned int totface,
- MLoop *mloops, unsigned int totloop,
- MPoly *mpolys, unsigned int totpoly,
- MDeformVert *dverts, /* assume totvert length */
- const bool do_verbose, const bool do_fixes)
+#define PRINT_MSG(...) (void) \
+ ( \
+ ((do_verbose) ? printf(__VA_ARGS__) : 0))
+
+#define PRINT_ERR(...) (void) \
+ (is_valid = false, \
+ ((do_verbose) ? printf(__VA_ARGS__) : 0))
+
+/**
+ * Validate the mesh, \a do_fixes requires \a mesh to be non-null.
+ *
+ * \return false if no changes needed to be made.
+ */
+bool BKE_mesh_validate_arrays(Mesh *mesh,
+ MVert *mverts, unsigned int totvert,
+ MEdge *medges, unsigned int totedge,
+ MFace *mfaces, unsigned int totface,
+ MLoop *mloops, unsigned int totloop,
+ MPoly *mpolys, unsigned int totpoly,
+ MDeformVert *dverts, /* assume totvert length */
+ const bool do_verbose, const bool do_fixes,
+ bool *r_change)
{
# define REMOVE_EDGE_TAG(_me) { _me->v2 = _me->v1; do_edge_free = true; } (void)0
# define IS_REMOVED_EDGE(_me) (_me->v2 == _me->v1)
@@ -206,6 +231,8 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
unsigned int i, j;
int *v;
+ bool is_valid = true;
+
bool do_edge_free = false;
bool do_face_free = false;
bool do_polyloop_free = false; /* This regroups loops and polys! */
@@ -216,15 +243,15 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
bool do_edge_recalc = false;
- EdgeHash *edge_hash = BLI_edgehash_new();
+ EdgeHash *edge_hash = BLI_edgehash_new_ex(__func__, totedge);
BLI_assert(!(do_fixes && mesh == NULL));
- PRINT("%s: verts(%u), edges(%u), loops(%u), polygons(%u)\n",
- __func__, totvert, totedge, totloop, totpoly);
+ PRINT_MSG("%s: verts(%u), edges(%u), loops(%u), polygons(%u)\n",
+ __func__, totvert, totedge, totloop, totpoly);
if (totedge == 0 && totpoly != 0) {
- PRINT("\tLogical error, %u polygons and 0 edges\n", totpoly);
+ PRINT_ERR("\tLogical error, %u polygons and 0 edges\n", totpoly);
do_edge_recalc = do_fixes;
}
@@ -233,7 +260,7 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
for (j = 0; j < 3; j++) {
if (!finite(mv->co[j])) {
- PRINT("\tVertex %u: has invalid coordinate\n", i);
+ PRINT_ERR("\tVertex %u: has invalid coordinate\n", i);
if (do_fixes) {
zero_v3(mv->co);
@@ -247,7 +274,7 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
}
if (fix_normal) {
- PRINT("\tVertex %u: has zero normal, assuming Z-up normal\n", i);
+ PRINT_ERR("\tVertex %u: has zero normal, assuming Z-up normal\n", i);
if (do_fixes) {
mv->no[2] = SHRT_MAX;
verts_fixed = TRUE;
@@ -258,21 +285,21 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
for (i = 0, me = medges; i < totedge; i++, me++) {
int remove = FALSE;
if (me->v1 == me->v2) {
- PRINT("\tEdge %u: has matching verts, both %u\n", i, me->v1);
+ PRINT_ERR("\tEdge %u: has matching verts, both %u\n", i, me->v1);
remove = do_fixes;
}
if (me->v1 >= totvert) {
- PRINT("\tEdge %u: v1 index out of range, %u\n", i, me->v1);
+ PRINT_ERR("\tEdge %u: v1 index out of range, %u\n", i, me->v1);
remove = do_fixes;
}
if (me->v2 >= totvert) {
- PRINT("\tEdge %u: v2 index out of range, %u\n", i, me->v2);
+ PRINT_ERR("\tEdge %u: v2 index out of range, %u\n", i, me->v2);
remove = do_fixes;
}
if (BLI_edgehash_haskey(edge_hash, me->v1, me->v2)) {
- PRINT("\tEdge %u: is a duplicate of %d\n", i,
- GET_INT_FROM_POINTER(BLI_edgehash_lookup(edge_hash, me->v1, me->v2)));
+ PRINT_ERR("\tEdge %u: is a duplicate of %d\n", i,
+ GET_INT_FROM_POINTER(BLI_edgehash_lookup(edge_hash, me->v1, me->v2)));
remove = do_fixes;
}
@@ -288,13 +315,13 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
# define REMOVE_FACE_TAG(_mf) { _mf->v3 = 0; do_face_free = TRUE; } (void)0
# define CHECK_FACE_VERT_INDEX(a, b) \
if (mf->a == mf->b) { \
- PRINT(" face %u: verts invalid, " STRINGIFY(a) "/" STRINGIFY(b) " both %u\n", i, mf->a); \
+ PRINT_ERR(" face %u: verts invalid, " STRINGIFY(a) "/" STRINGIFY(b) " both %u\n", i, mf->a); \
remove = do_fixes; \
} (void)0
# define CHECK_FACE_EDGE(a, b) \
if (!BLI_edgehash_haskey(edge_hash, mf->a, mf->b)) { \
- PRINT(" face %u: edge " STRINGIFY(a) "/" STRINGIFY(b) \
- " (%u,%u) is missing edge data\n", i, mf->a, mf->b); \
+ PRINT_ERR(" face %u: edge " STRINGIFY(a) "/" STRINGIFY(b) \
+ " (%u,%u) is missing edge data\n", i, mf->a, mf->b); \
do_edge_recalc = TRUE; \
} (void)0
@@ -306,7 +333,7 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
SortFace *sf_prev;
unsigned int totsortface = 0;
- PRINT("No Polys, only tesselated Faces\n");
+ PRINT_ERR("No Polys, only tesselated Faces\n");
for (i = 0, mf = mfaces, sf = sort_faces; i < totface; i++, mf++) {
int remove = FALSE;
@@ -317,7 +344,7 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
do {
fv[fidx] = *(&(mf->v1) + fidx);
if (fv[fidx] >= totvert) {
- PRINT("\tFace %u: 'v%d' index out of range, %u\n", i, fidx + 1, fv[fidx]);
+ PRINT_ERR("\tFace %u: 'v%d' index out of range, %u\n", i, fidx + 1, fv[fidx]);
remove = do_fixes;
}
} while (fidx--);
@@ -394,14 +421,14 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
mf_prev = mfaces + sf_prev->index;
if (mf->v4) {
- PRINT("\tFace %u & %u: are duplicates (%u,%u,%u,%u) (%u,%u,%u,%u)\n",
- sf->index, sf_prev->index, mf->v1, mf->v2, mf->v3, mf->v4,
- mf_prev->v1, mf_prev->v2, mf_prev->v3, mf_prev->v4);
+ PRINT_ERR("\tFace %u & %u: are duplicates (%u,%u,%u,%u) (%u,%u,%u,%u)\n",
+ sf->index, sf_prev->index, mf->v1, mf->v2, mf->v3, mf->v4,
+ mf_prev->v1, mf_prev->v2, mf_prev->v3, mf_prev->v4);
}
else {
- PRINT("\tFace %u & %u: are duplicates (%u,%u,%u) (%u,%u,%u)\n",
- sf->index, sf_prev->index, mf->v1, mf->v2, mf->v3,
- mf_prev->v1, mf_prev->v2, mf_prev->v3);
+ PRINT_ERR("\tFace %u & %u: are duplicates (%u,%u,%u) (%u,%u,%u)\n",
+ sf->index, sf_prev->index, mf->v1, mf->v2, mf->v3,
+ mf_prev->v1, mf_prev->v2, mf_prev->v3);
}
}
@@ -446,13 +473,14 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
if (mp->loopstart < 0 || mp->totloop < 3) {
/* Invalid loop data. */
- PRINT("\tPoly %u is invalid (loopstart: %u, totloop: %u)\n", sp->index, mp->loopstart, mp->totloop);
+ PRINT_ERR("\tPoly %u is invalid (loopstart: %u, totloop: %u)\n",
+ sp->index, mp->loopstart, mp->totloop);
sp->invalid = TRUE;
}
else if (mp->loopstart + mp->totloop > totloop) {
/* Invalid loop data. */
- PRINT("\tPoly %u uses loops out of range (loopstart: %u, loopend: %u, max nbr of loops: %u)\n",
- sp->index, mp->loopstart, mp->loopstart + mp->totloop - 1, totloop - 1);
+ PRINT_ERR("\tPoly %u uses loops out of range (loopstart: %u, loopend: %u, max nbr of loops: %u)\n",
+ sp->index, mp->loopstart, mp->loopstart + mp->totloop - 1, totloop - 1);
sp->invalid = TRUE;
}
else {
@@ -467,7 +495,7 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
for (j = 0, ml = &mloops[sp->loopstart]; j < mp->totloop; j++, ml++, v++) {
if (ml->v >= totvert) {
/* Invalid vert idx. */
- PRINT("\tLoop %u has invalid vert reference (%u)\n", sp->loopstart + j, ml->v);
+ PRINT_ERR("\tLoop %u has invalid vert reference (%u)\n", sp->loopstart + j, ml->v);
sp->invalid = TRUE;
}
@@ -480,7 +508,7 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
v = sp->verts;
for (j = 0; j < mp->totloop; j++, v++) {
if ((mverts[*v].flag & ME_VERT_TMP_TAG) == 0) {
- PRINT("\tPoly %u has duplicate vert reference at corner (%u)\n", i, j);
+ PRINT_ERR("\tPoly %u has duplicate vert reference at corner (%u)\n", i, j);
sp->invalid = TRUE;
}
mverts[*v].flag &= ~ME_VERT_TMP_TAG;
@@ -496,7 +524,7 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
v2 = mloops[sp->loopstart + (j + 1) % mp->totloop].v;
if (!BLI_edgehash_haskey(edge_hash, v1, v2)) {
/* Edge not existing. */
- PRINT("\tPoly %u needs missing edge (%u, %u)\n", sp->index, v1, v2);
+ PRINT_ERR("\tPoly %u needs missing edge (%u, %u)\n", sp->index, v1, v2);
if (do_fixes)
do_edge_recalc = TRUE;
else
@@ -508,11 +536,11 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
if (do_fixes) {
int prev_e = ml->e;
ml->e = GET_INT_FROM_POINTER(BLI_edgehash_lookup(edge_hash, v1, v2));
- PRINT("\tLoop %u has invalid edge reference (%u), fixed using edge %u\n",
- sp->loopstart + j, prev_e, ml->e);
+ PRINT_ERR("\tLoop %u has invalid edge reference (%u), fixed using edge %u\n",
+ sp->loopstart + j, prev_e, ml->e);
}
else {
- PRINT("\tLoop %u has invalid edge reference (%u)\n", sp->loopstart + j, ml->e);
+ PRINT_ERR("\tLoop %u has invalid edge reference (%u)\n", sp->loopstart + j, ml->e);
sp->invalid = TRUE;
}
}
@@ -524,11 +552,11 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
if (do_fixes) {
int prev_e = ml->e;
ml->e = GET_INT_FROM_POINTER(BLI_edgehash_lookup(edge_hash, v1, v2));
- PRINT("\tPoly %u has invalid edge reference (%u), fixed using edge %u\n",
- sp->index, prev_e, ml->e);
+ PRINT_ERR("\tPoly %u has invalid edge reference (%u), fixed using edge %u\n",
+ sp->index, prev_e, ml->e);
}
else {
- PRINT("\tPoly %u has invalid edge reference (%u)\n", sp->index, ml->e);
+ PRINT_ERR("\tPoly %u has invalid edge reference (%u)\n", sp->index, ml->e);
sp->invalid = TRUE;
}
}
@@ -546,16 +574,16 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
if (*v != *prev_v) {
int dlt = v - prev_v;
if (dlt > 1) {
- PRINT("\tPoly %u is invalid, it multi-uses vertex %u (%u times)\n",
- sp->index, *prev_v, dlt);
+ PRINT_ERR("\tPoly %u is invalid, it multi-uses vertex %u (%u times)\n",
+ sp->index, *prev_v, dlt);
sp->invalid = TRUE;
}
prev_v = v;
}
}
if (v - prev_v > 1) { /* Don't forget final verts! */
- PRINT("\tPoly %u is invalid, it multi-uses vertex %u (%u times)\n",
- sp->index, *prev_v, (int)(v - prev_v));
+ PRINT_ERR("\tPoly %u is invalid, it multi-uses vertex %u (%u times)\n",
+ sp->index, *prev_v, (int)(v - prev_v));
sp->invalid = TRUE;
}
}
@@ -633,11 +661,14 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
}
if ((p1_nv == p2_nv) && (memcmp(p1_v, p2_v, p1_nv * sizeof(*p1_v)) == 0)) {
if (do_verbose) {
- PRINT("\tPolys %u and %u use same vertices (%u",
- prev_sp->index, sp->index, *p1_v);
+ PRINT_ERR("\tPolys %u and %u use same vertices (%u",
+ prev_sp->index, sp->index, *p1_v);
for (j = 1; j < p1_nv; j++)
- PRINT(", %u", p1_v[j]);
- PRINT("), considering poly %u as invalid.\n", sp->index);
+ PRINT_ERR(", %u", p1_v[j]);
+ PRINT_ERR("), considering poly %u as invalid.\n", sp->index);
+ }
+ else {
+ is_valid = false;
}
sp->invalid = TRUE;
}
@@ -673,7 +704,7 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
/* Unused loops. */
if (prev_end < sp->loopstart) {
for (j = prev_end, ml = &mloops[prev_end]; j < sp->loopstart; j++, ml++) {
- PRINT("\tLoop %u is unused.\n", j);
+ PRINT_ERR("\tLoop %u is unused.\n", j);
if (do_fixes)
REMOVE_LOOP_TAG(ml);
}
@@ -682,8 +713,8 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
}
/* Multi-used loops. */
else if (prev_end > sp->loopstart) {
- PRINT("\tPolys %u and %u share loops from %u to %u, considering poly %u as invalid.\n",
- prev_sp->index, sp->index, sp->loopstart, prev_end, sp->index);
+ PRINT_ERR("\tPolys %u and %u share loops from %u to %u, considering poly %u as invalid.\n",
+ prev_sp->index, sp->index, sp->loopstart, prev_end, sp->index);
if (do_fixes) {
REMOVE_POLY_TAG((&mpolys[sp->index]));
/* DO NOT REMOVE ITS LOOPS!!!
@@ -701,7 +732,7 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
/* We may have some remaining unused loops to get rid of! */
if (prev_end < totloop) {
for (j = prev_end, ml = &mloops[prev_end]; j < totloop; j++, ml++) {
- PRINT("\tLoop %u is unused.\n", j);
+ PRINT_ERR("\tLoop %u is unused.\n", j);
if (do_fixes)
REMOVE_LOOP_TAG(ml);
}
@@ -721,14 +752,14 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
for (j = 0, dw = dv->dw; j < dv->totweight; j++, dw++) {
/* note, greater then max defgroups is accounted for in our code, but not < 0 */
if (!finite(dw->weight)) {
- PRINT("\tVertex deform %u, group %d has weight: %f\n", i, dw->def_nr, dw->weight);
+ PRINT_ERR("\tVertex deform %u, group %d has weight: %f\n", i, dw->def_nr, dw->weight);
if (do_fixes) {
dw->weight = 0.0f;
vert_weights_fixed = TRUE;
}
}
else if (dw->weight < 0.0f || dw->weight > 1.0f) {
- PRINT("\tVertex deform %u, group %d has weight: %f\n", i, dw->def_nr, dw->weight);
+ PRINT_ERR("\tVertex deform %u, group %d has weight: %f\n", i, dw->def_nr, dw->weight);
if (do_fixes) {
CLAMP(dw->weight, 0.0f, 1.0f);
vert_weights_fixed = TRUE;
@@ -736,7 +767,7 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
}
if (dw->def_nr < 0) {
- PRINT("\tVertex deform %u, has invalid group %d\n", i, dw->def_nr);
+ PRINT_ERR("\tVertex deform %u, has invalid group %d\n", i, dw->def_nr);
if (do_fixes) {
defvert_remove_group(dv, dw);
if (dv->dw) {
@@ -787,8 +818,8 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
int tot_elem = 0;
if (msel->index < 0) {
- PRINT("\tMesh select element %d type %d index is negative, "
- "resetting selection stack.\n", i, msel->type);
+ PRINT_ERR("\tMesh select element %d type %d index is negative, "
+ "resetting selection stack.\n", i, msel->type);
free_msel = TRUE;
break;
}
@@ -806,8 +837,8 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
}
if (msel->index > tot_elem) {
- PRINT("\tMesh select element %d type %d index %d is larger than data array size %d, "
- "resetting selection stack.\n", i, msel->type, msel->index, tot_elem);
+ PRINT_ERR("\tMesh select element %d type %d index %d is larger than data array size %d, "
+ "resetting selection stack.\n", i, msel->type, msel->index, tot_elem);
free_msel = TRUE;
break;
@@ -821,29 +852,49 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
}
}
- PRINT("%s: finished\n\n", __func__);
+ PRINT_MSG("%s: finished\n\n", __func__);
+
+ *r_change = (verts_fixed || vert_weights_fixed || do_polyloop_free || do_edge_free || do_edge_recalc || msel_fixed);
- return (verts_fixed || vert_weights_fixed || do_polyloop_free || do_edge_free || do_edge_recalc || msel_fixed);
+ return is_valid;
}
-static int mesh_validate_customdata(CustomData *data, const bool do_verbose, const bool do_fixes)
+static bool mesh_validate_customdata(CustomData *data, CustomDataMask mask,
+ const bool do_verbose, const bool do_fixes,
+ bool *r_change)
{
- int i = 0, has_fixes = 0;
+ bool is_valid = true;
+ bool has_fixes = false;
+ int i = 0;
- PRINT("%s: Checking %d CD layers...\n", __func__, data->totlayer);
+ PRINT_MSG("%s: Checking %d CD layers...\n", __func__, data->totlayer);
while (i < data->totlayer) {
CustomDataLayer *layer = &data->layers[i];
- CustomDataMask mask = CD_TYPE_AS_MASK(layer->type);
- int ok = 1;
+ bool ok = true;
+
+ if (CustomData_layertype_is_singleton(layer->type)) {
+ const int layer_tot = CustomData_number_of_layers(data, layer->type);
+ if (layer_tot > 1) {
+ PRINT_ERR("\tCustomDataLayer type %d is a singleton, found %d in Mesh structure\n",
+ layer->type, layer_tot);
+ ok = false;
+ }
+ }
- if ((mask & CD_MASK_MESH) == 0) {
- PRINT("\tCustomDataLayer type %d which isn't in CD_MASK_MESH is stored in Mesh structure\n", layer->type);
+ if (mask != 0) {
+ CustomDataMask layer_typemask = CD_TYPE_AS_MASK(layer->type);
+ if ((layer_typemask & mask) == 0) {
+ PRINT_ERR("\tCustomDataLayer type %d which isn't in the mask\n",
+ layer->type);
+ ok = false;
+ }
+ }
+ if (ok == false) {
if (do_fixes) {
CustomData_free_layer(data, layer->type, 0, i);
- ok = 0;
- has_fixes = 1;
+ has_fixes = true;
}
}
@@ -851,65 +902,455 @@ static int mesh_validate_customdata(CustomData *data, const bool do_verbose, con
i++;
}
- PRINT("%s: Finished\n\n", __func__);
+ PRINT_MSG("%s: Finished (is_valid=%d)\n\n", __func__, (int)!has_fixes);
- return has_fixes;
+ *r_change = has_fixes;
+
+ return is_valid;
}
#undef PRINT
-static int BKE_mesh_validate_all_customdata(CustomData *vdata, CustomData *edata,
- CustomData *ldata, CustomData *pdata,
- const bool do_verbose, const short do_fixes)
+/**
+ * \returns is_valid.
+ */
+bool BKE_mesh_validate_all_customdata(CustomData *vdata, CustomData *edata,
+ CustomData *ldata, CustomData *pdata,
+ const bool check_meshmask,
+ const bool do_verbose, const bool do_fixes,
+ bool *r_change)
{
- int vfixed = 0, efixed = 0, lfixed = 0, pfixed = 0;
+ bool is_valid = true;
+ bool is_change_v, is_change_e, is_change_l, is_change_p;
+ int tot_texpoly, tot_uvloop;
+ CustomDataMask mask = check_meshmask ? CD_MASK_MESH : 0;
+
+ is_valid &= mesh_validate_customdata(vdata, mask, do_verbose, do_fixes, &is_change_v);
+ is_valid &= mesh_validate_customdata(edata, mask, do_verbose, do_fixes, &is_change_e);
+ is_valid &= mesh_validate_customdata(ldata, mask, do_verbose, do_fixes, &is_change_l);
+ is_valid &= mesh_validate_customdata(pdata, mask, do_verbose, do_fixes, &is_change_p);
+
+ tot_texpoly = CustomData_number_of_layers(pdata, CD_MTEXPOLY);
+ tot_uvloop = CustomData_number_of_layers(ldata, CD_MLOOPUV);
+ if (tot_texpoly != tot_uvloop) {
+ PRINT_ERR("\tCustomDataLayer mismatch, tot_texpoly(%d), tot_uvloop(%d)\n",
+ tot_texpoly, tot_uvloop);
+ }
- vfixed = mesh_validate_customdata(vdata, do_verbose, do_fixes);
- efixed = mesh_validate_customdata(edata, do_verbose, do_fixes);
- lfixed = mesh_validate_customdata(ldata, do_verbose, do_fixes);
- pfixed = mesh_validate_customdata(pdata, do_verbose, do_fixes);
+ *r_change = (is_change_v || is_change_e || is_change_l || is_change_p);
- return vfixed || efixed || lfixed || pfixed;
+ return is_valid;
}
+/**
+ * \see #DM_is_valid to call on derived meshes
+ *
+ * \returns true if a change is made.
+ */
int BKE_mesh_validate(Mesh *me, const int do_verbose)
{
- int layers_fixed = 0, arrays_fixed = 0;
+ bool is_valid = true;
+ bool is_change;
if (do_verbose) {
printf("MESH: %s\n", me->id.name + 2);
}
- layers_fixed = BKE_mesh_validate_all_customdata(&me->vdata, &me->edata, &me->ldata, &me->pdata, do_verbose, TRUE);
- arrays_fixed = BKE_mesh_validate_arrays(me,
- me->mvert, me->totvert,
- me->medge, me->totedge,
- me->mface, me->totface,
- me->mloop, me->totloop,
- me->mpoly, me->totpoly,
- me->dvert,
- do_verbose, true);
-
- if (layers_fixed || arrays_fixed) {
+ is_valid &= BKE_mesh_validate_all_customdata(
+ &me->vdata, &me->edata, &me->ldata, &me->pdata,
+ true,
+ do_verbose, true,
+ &is_change);
+
+ is_valid &= BKE_mesh_validate_arrays(
+ me,
+ me->mvert, me->totvert,
+ me->medge, me->totedge,
+ me->mface, me->totface,
+ me->mloop, me->totloop,
+ me->mpoly, me->totpoly,
+ me->dvert,
+ do_verbose, true,
+ &is_change);
+
+ if (is_change) {
DAG_id_tag_update(&me->id, OB_RECALC_DATA);
return true;
}
- return false;
+ else {
+ return false;
+ }
+}
+
+/**
+ * Duplicate of BM_mesh_cd_validate() for Mesh data.
+ */
+void BKE_mesh_cd_validate(Mesh *me)
+{
+ int totlayer_mtex = CustomData_number_of_layers(&me->pdata, CD_MTEXPOLY);
+ int totlayer_uv = CustomData_number_of_layers(&me->ldata, CD_MLOOPUV);
+ int mtex_index = CustomData_get_layer_index(&me->pdata, CD_MTEXPOLY);
+ int uv_index = CustomData_get_layer_index(&me->ldata, CD_MLOOPUV);
+ int i;
+
+ if (LIKELY(totlayer_mtex == totlayer_uv)) {
+ /* pass */
+ }
+ else if (totlayer_mtex < totlayer_uv) {
+ do {
+ const char *from_name = me->ldata.layers[uv_index + totlayer_mtex].name;
+ CustomData_add_layer_named(&me->pdata, CD_MTEXPOLY, CD_DEFAULT, NULL, me->totpoly, from_name);
+ CustomData_set_layer_unique_name(&me->pdata, totlayer_mtex);
+ } while (totlayer_uv != ++totlayer_mtex);
+ mtex_index = CustomData_get_layer_index(&me->pdata, CD_MTEXPOLY);
+ }
+ else if (totlayer_uv < totlayer_mtex) {
+ do {
+ const char *from_name = me->pdata.layers[mtex_index + totlayer_uv].name;
+ CustomData_add_layer_named(&me->ldata, CD_MLOOPUV, CD_DEFAULT, NULL, me->totloop, from_name);
+ CustomData_set_layer_unique_name(&me->ldata, totlayer_uv);
+ } while (totlayer_mtex != ++totlayer_uv);
+ uv_index = CustomData_get_layer_index(&me->ldata, CD_MLOOPUV);
+ }
+
+ BLI_assert(totlayer_mtex == totlayer_uv);
+
+ /* Check uv/tex names match as well!!! */
+ for (i = 0; i < totlayer_mtex; i++, mtex_index++, uv_index++) {
+ const char *name_src = me->pdata.layers[mtex_index].name;
+ const char *name_dst = me->ldata.layers[uv_index].name;
+ if (!STREQ(name_src, name_dst)) {
+ BKE_mesh_uv_cdlayer_rename_index(me, mtex_index, uv_index, -1, name_src, false);
+ }
+ }
+}
+/** \} */
+
+
+
+/* -------------------------------------------------------------------- */
+
+/** \name Mesh Stripping (removing invalid data)
+ * \{ */
+
+/* We need to keep this for edge creation (for now?), and some old readfile code... */
+void BKE_mesh_strip_loose_faces(Mesh *me)
+{
+ MFace *f;
+ int a, b;
+
+ for (a = b = 0, f = me->mface; a < me->totface; a++, f++) {
+ if (f->v3) {
+ if (a != b) {
+ memcpy(&me->mface[b], f, sizeof(me->mface[b]));
+ CustomData_copy_data(&me->fdata, &me->fdata, a, b, 1);
+ }
+ b++;
+ }
+ }
+ if (a != b) {
+ CustomData_free_elem(&me->fdata, b, a - b);
+ me->totface = b;
+ }
+}
+
+/* Works on both loops and polys! */
+/* Note: It won't try to guess which loops of an invalid poly to remove!
+ * this is the work of the caller, to mark those loops...
+ * See e.g. BKE_mesh_validate_arrays(). */
+void BKE_mesh_strip_loose_polysloops(Mesh *me)
+{
+ MPoly *p;
+ MLoop *l;
+ int a, b;
+ /* New loops idx! */
+ int *new_idx = MEM_mallocN(sizeof(int) * me->totloop, __func__);
+
+ for (a = b = 0, p = me->mpoly; a < me->totpoly; a++, p++) {
+ int invalid = FALSE;
+ int i = p->loopstart;
+ int stop = i + p->totloop;
+
+ if (stop > me->totloop || stop < i) {
+ invalid = TRUE;
+ }
+ else {
+ l = &me->mloop[i];
+ i = stop - i;
+ /* If one of the poly's loops is invalid, the whole poly is invalid! */
+ for (; i--; l++) {
+ if (l->e == INVALID_LOOP_EDGE_MARKER) {
+ invalid = TRUE;
+ break;
+ }
+ }
+ }
+
+ if (p->totloop >= 3 && !invalid) {
+ if (a != b) {
+ memcpy(&me->mpoly[b], p, sizeof(me->mpoly[b]));
+ CustomData_copy_data(&me->pdata, &me->pdata, a, b, 1);
+ }
+ b++;
+ }
+ }
+ if (a != b) {
+ CustomData_free_elem(&me->pdata, b, a - b);
+ me->totpoly = b;
+ }
+
+ /* And now, get rid of invalid loops. */
+ for (a = b = 0, l = me->mloop; a < me->totloop; a++, l++) {
+ if (l->e != INVALID_LOOP_EDGE_MARKER) {
+ if (a != b) {
+ memcpy(&me->mloop[b], l, sizeof(me->mloop[b]));
+ CustomData_copy_data(&me->ldata, &me->ldata, a, b, 1);
+ }
+ new_idx[a] = b;
+ b++;
+ }
+ else {
+ /* XXX Theoretically, we should be able to not do this, as no remaining poly
+ * should use any stripped loop. But for security's sake... */
+ new_idx[a] = -a;
+ }
+ }
+ if (a != b) {
+ CustomData_free_elem(&me->ldata, b, a - b);
+ me->totloop = b;
+ }
+
+ /* And now, update polys' start loop index. */
+ /* Note: At this point, there should never be any poly using a striped loop! */
+ for (a = 0, p = me->mpoly; a < me->totpoly; a++, p++) {
+ p->loopstart = new_idx[p->loopstart];
+ }
+
+ MEM_freeN(new_idx);
+}
+
+void BKE_mesh_strip_loose_edges(Mesh *me)
+{
+ MEdge *e;
+ MLoop *l;
+ int a, b;
+ unsigned int *new_idx = MEM_mallocN(sizeof(int) * me->totedge, __func__);
+
+ for (a = b = 0, e = me->medge; a < me->totedge; a++, e++) {
+ if (e->v1 != e->v2) {
+ if (a != b) {
+ memcpy(&me->medge[b], e, sizeof(me->medge[b]));
+ CustomData_copy_data(&me->edata, &me->edata, a, b, 1);
+ }
+ new_idx[a] = b;
+ b++;
+ }
+ else {
+ new_idx[a] = INVALID_LOOP_EDGE_MARKER;
+ }
+ }
+ if (a != b) {
+ CustomData_free_elem(&me->edata, b, a - b);
+ me->totedge = b;
+ }
+
+ /* And now, update loops' edge indices. */
+ /* XXX We hope no loop was pointing to a striped edge!
+ * Else, its e will be set to INVALID_LOOP_EDGE_MARKER :/ */
+ for (a = 0, l = me->mloop; a < me->totloop; a++, l++) {
+ l->e = new_idx[l->e];
+ }
+
+ MEM_freeN(new_idx);
+}
+/** \} */
+
+
+
+/* -------------------------------------------------------------------- */
+
+/** \name Mesh Edge Calculation
+ * \{ */
+
+/* make edges in a Mesh, for outside of editmode */
+
+struct EdgeSort {
+ unsigned int v1, v2;
+ char is_loose, is_draw;
+};
+
+/* edges have to be added with lowest index first for sorting */
+static void to_edgesort(struct EdgeSort *ed,
+ unsigned int v1, unsigned int v2,
+ char is_loose, short is_draw)
+{
+ if (v1 < v2) {
+ ed->v1 = v1; ed->v2 = v2;
+ }
+ else {
+ ed->v1 = v2; ed->v2 = v1;
+ }
+ ed->is_loose = is_loose;
+ ed->is_draw = is_draw;
}
-int BKE_mesh_validate_dm(DerivedMesh *dm)
+static int vergedgesort(const void *v1, const void *v2)
{
- return BKE_mesh_validate_arrays(NULL,
- dm->getVertArray(dm), dm->getNumVerts(dm),
- dm->getEdgeArray(dm), dm->getNumEdges(dm),
- dm->getTessFaceArray(dm), dm->getNumTessFaces(dm),
- dm->getLoopArray(dm), dm->getNumLoops(dm),
- dm->getPolyArray(dm), dm->getNumPolys(dm),
- dm->getVertDataArray(dm, CD_MDEFORMVERT),
- TRUE, FALSE);
+ const struct EdgeSort *x1 = v1, *x2 = v2;
+
+ if (x1->v1 > x2->v1) return 1;
+ else if (x1->v1 < x2->v1) return -1;
+ else if (x1->v2 > x2->v2) return 1;
+ else if (x1->v2 < x2->v2) return -1;
+
+ return 0;
+}
+
+
+/* Create edges based on known verts and faces,
+ * this function is only used when loading very old blend files */
+
+static void mesh_calc_edges_mdata(
+ MVert *UNUSED(allvert), MFace *allface, MLoop *allloop,
+ MPoly *allpoly, int UNUSED(totvert), int totface, int UNUSED(totloop), int totpoly,
+ const bool use_old,
+ MEdge **r_medge, int *r_totedge)
+{
+ MPoly *mpoly;
+ MFace *mface;
+ MEdge *medge, *med;
+ EdgeHash *hash;
+ struct EdgeSort *edsort, *ed;
+ int a, totedge = 0;
+ unsigned int totedge_final = 0;
+ unsigned int edge_index;
+
+ /* we put all edges in array, sort them, and detect doubles that way */
+
+ for (a = totface, mface = allface; a > 0; a--, mface++) {
+ if (mface->v4) totedge += 4;
+ else if (mface->v3) totedge += 3;
+ else totedge += 1;
+ }
+
+ if (totedge == 0) {
+ /* flag that mesh has edges */
+ (*r_medge) = MEM_callocN(0, __func__);
+ (*r_totedge) = 0;
+ return;
+ }
+
+ ed = edsort = MEM_mallocN(totedge * sizeof(struct EdgeSort), "EdgeSort");
+
+ for (a = totface, mface = allface; a > 0; a--, mface++) {
+ to_edgesort(ed++, mface->v1, mface->v2, !mface->v3, mface->edcode & ME_V1V2);
+ if (mface->v4) {
+ to_edgesort(ed++, mface->v2, mface->v3, 0, mface->edcode & ME_V2V3);
+ to_edgesort(ed++, mface->v3, mface->v4, 0, mface->edcode & ME_V3V4);
+ to_edgesort(ed++, mface->v4, mface->v1, 0, mface->edcode & ME_V4V1);
+ }
+ else if (mface->v3) {
+ to_edgesort(ed++, mface->v2, mface->v3, 0, mface->edcode & ME_V2V3);
+ to_edgesort(ed++, mface->v3, mface->v1, 0, mface->edcode & ME_V3V1);
+ }
+ }
+
+ qsort(edsort, totedge, sizeof(struct EdgeSort), vergedgesort);
+
+ /* count final amount */
+ for (a = totedge, ed = edsort; a > 1; a--, ed++) {
+ /* edge is unique when it differs from next edge, or is last */
+ if (ed->v1 != (ed + 1)->v1 || ed->v2 != (ed + 1)->v2) totedge_final++;
+ }
+ totedge_final++;
+
+ medge = MEM_callocN(sizeof(MEdge) * totedge_final, __func__);
+
+ for (a = totedge, med = medge, ed = edsort; a > 1; a--, ed++) {
+ /* edge is unique when it differs from next edge, or is last */
+ if (ed->v1 != (ed + 1)->v1 || ed->v2 != (ed + 1)->v2) {
+ med->v1 = ed->v1;
+ med->v2 = ed->v2;
+ if (use_old == false || ed->is_draw) med->flag = ME_EDGEDRAW | ME_EDGERENDER;
+ if (ed->is_loose) med->flag |= ME_LOOSEEDGE;
+
+ /* order is swapped so extruding this edge as a surface wont flip face normals
+ * with cyclic curves */
+ if (ed->v1 + 1 != ed->v2) {
+ SWAP(unsigned int, med->v1, med->v2);
+ }
+ med++;
+ }
+ else {
+ /* equal edge, we merge the drawflag */
+ (ed + 1)->is_draw |= ed->is_draw;
+ }
+ }
+ /* last edge */
+ med->v1 = ed->v1;
+ med->v2 = ed->v2;
+ med->flag = ME_EDGEDRAW;
+ if (ed->is_loose) med->flag |= ME_LOOSEEDGE;
+ med->flag |= ME_EDGERENDER;
+
+ MEM_freeN(edsort);
+
+ /* set edge members of mloops */
+ hash = BLI_edgehash_new_ex(__func__, totedge_final);
+ for (edge_index = 0, med = medge; edge_index < totedge_final; edge_index++, med++) {
+ BLI_edgehash_insert(hash, med->v1, med->v2, SET_UINT_IN_POINTER(edge_index));
+ }
+
+ mpoly = allpoly;
+ for (a = 0; a < totpoly; a++, mpoly++) {
+ MLoop *ml, *ml_next;
+ int i = mpoly->totloop;
+
+ ml_next = allloop + mpoly->loopstart; /* first loop */
+ ml = &ml_next[i - 1]; /* last loop */
+
+ while (i-- != 0) {
+ ml->e = GET_UINT_FROM_POINTER(BLI_edgehash_lookup(hash, ml->v, ml_next->v));
+ ml = ml_next;
+ ml_next++;
+ }
+ }
+
+ BLI_edgehash_free(hash, NULL);
+
+ *r_medge = medge;
+ *r_totedge = totedge_final;
}
/**
+ * If the mesh is from a very old blender version,
+ * convert mface->edcode to edge drawflags
+ */
+void BKE_mesh_calc_edges_legacy(Mesh *me, const bool use_old)
+{
+ MEdge *medge;
+ int totedge = 0;
+
+ mesh_calc_edges_mdata(me->mvert, me->mface, me->mloop, me->mpoly,
+ me->totvert, me->totface, me->totloop, me->totpoly,
+ use_old, &medge, &totedge);
+
+ if (totedge == 0) {
+ /* flag that mesh has edges */
+ me->medge = medge;
+ me->totedge = 0;
+ return;
+ }
+
+ medge = CustomData_add_layer(&me->edata, CD_MEDGE, CD_ASSIGN, medge, totedge);
+ me->medge = medge;
+ me->totedge = totedge;
+
+ BKE_mesh_strip_loose_faces(me);
+}
+
+
+/**
* Calculate edges from polygons
*
* \param mesh The mesh to add edges into
@@ -921,7 +1362,8 @@ void BKE_mesh_calc_edges(Mesh *mesh, bool update, const bool select)
EdgeHashIterator *ehi;
MPoly *mp;
MEdge *med, *med_orig;
- EdgeHash *eh = BLI_edgehash_new();
+ EdgeHash *eh;
+ unsigned int eh_reserve;
int i, totedge, totpoly = mesh->totpoly;
int med_index;
/* select for newly created meshes which are selected [#25595] */
@@ -930,6 +1372,9 @@ void BKE_mesh_calc_edges(Mesh *mesh, bool update, const bool select)
if (mesh->totedge == 0)
update = false;
+ eh_reserve = max_ii(update ? mesh->totedge : 0, BLI_EDGEHASH_SIZE_GUESS_FROM_POLYS(totpoly));
+ eh = BLI_edgehash_new_ex(__func__, eh_reserve);
+
if (update) {
/* assume existing edges are valid
* useful when adding more faces and generating edges from them */
@@ -999,3 +1444,4 @@ void BKE_mesh_calc_edges(Mesh *mesh, bool update, const bool select)
BLI_edgehash_free(eh, NULL);
}
+/** \} */
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c
index 41e0acf9f7a..4871b9bf3bf 100644
--- a/source/blender/blenkernel/intern/modifier.c
+++ b/source/blender/blenkernel/intern/modifier.c
@@ -69,19 +69,44 @@
#include "MOD_modifiertypes.h"
-ModifierTypeInfo *modifierType_getInfo(ModifierType type)
+static ModifierTypeInfo *modifier_types[NUM_MODIFIER_TYPES] = {NULL};
+static VirtualModifierData virtualModifierCommonData;
+
+void BKE_modifier_init(void)
{
- static ModifierTypeInfo *types[NUM_MODIFIER_TYPES] = {NULL};
- static int types_init = 1;
+ ModifierData *md;
- if (types_init) {
- modifier_type_init(types); /* MOD_utils.c */
- types_init = 0;
- }
+ /* Initialize modifier types */
+ modifier_type_init(modifier_types); /* MOD_utils.c */
+
+ /* Initialize global cmmon storage used for virtual modifier list */
+ md = modifier_new(eModifierType_Armature);
+ virtualModifierCommonData.amd = *((ArmatureModifierData *) md);
+ modifier_free(md);
+
+ md = modifier_new(eModifierType_Curve);
+ virtualModifierCommonData.cmd = *((CurveModifierData *) md);
+ modifier_free(md);
+
+ md = modifier_new(eModifierType_Lattice);
+ virtualModifierCommonData.lmd = *((LatticeModifierData *) md);
+ modifier_free(md);
+ md = modifier_new(eModifierType_ShapeKey);
+ virtualModifierCommonData.smd = *((ShapeKeyModifierData *) md);
+ modifier_free(md);
+
+ virtualModifierCommonData.amd.modifier.mode |= eModifierMode_Virtual;
+ virtualModifierCommonData.cmd.modifier.mode |= eModifierMode_Virtual;
+ virtualModifierCommonData.lmd.modifier.mode |= eModifierMode_Virtual;
+ virtualModifierCommonData.smd.modifier.mode |= eModifierMode_Virtual;
+}
+
+ModifierTypeInfo *modifierType_getInfo(ModifierType type)
+{
/* type unsigned, no need to check < 0 */
- if (type < NUM_MODIFIER_TYPES && types[type]->name[0] != '\0') {
- return types[type];
+ if (type < NUM_MODIFIER_TYPES && modifier_types[type]->name[0] != '\0') {
+ return modifier_types[type];
}
else {
return NULL;
@@ -289,7 +314,8 @@ void modifier_setError(ModifierData *md, const char *_format, ...)
*/
int modifiers_getCageIndex(struct Scene *scene, Object *ob, int *lastPossibleCageIndex_r, int virtual_)
{
- ModifierData *md = (virtual_) ? modifiers_getVirtualModifierList(ob) : ob->modifiers.first;
+ VirtualModifierData virtualModifierData;
+ ModifierData *md = (virtual_) ? modifiers_getVirtualModifierList(ob, &virtualModifierData) : ob->modifiers.first;
int i, cageIndex = -1;
if (lastPossibleCageIndex_r) {
@@ -435,74 +461,43 @@ ModifierData *modifiers_getLastPreview(struct Scene *scene, ModifierData *md, in
/* NOTE: This is to support old files from before Blender supported modifiers,
* in some cases versioning code updates these so for new files this will
* return an empty list. */
-ModifierData *modifiers_getVirtualModifierList(Object *ob)
+ModifierData *modifiers_getVirtualModifierList(Object *ob, VirtualModifierData *virtualModifierData)
{
- /* Kinda hacky, but should be fine since we are never
- * re-entrant and avoid free hassles.
- */
- static ArmatureModifierData amd;
- static CurveModifierData cmd;
- static LatticeModifierData lmd;
- static ShapeKeyModifierData smd;
- static int init = 1;
ModifierData *md;
- if (init) {
- md = modifier_new(eModifierType_Armature);
- amd = *((ArmatureModifierData *) md);
- modifier_free(md);
-
- md = modifier_new(eModifierType_Curve);
- cmd = *((CurveModifierData *) md);
- modifier_free(md);
-
- md = modifier_new(eModifierType_Lattice);
- lmd = *((LatticeModifierData *) md);
- modifier_free(md);
-
- md = modifier_new(eModifierType_ShapeKey);
- smd = *((ShapeKeyModifierData *) md);
- modifier_free(md);
-
- amd.modifier.mode |= eModifierMode_Virtual;
- cmd.modifier.mode |= eModifierMode_Virtual;
- lmd.modifier.mode |= eModifierMode_Virtual;
- smd.modifier.mode |= eModifierMode_Virtual;
-
- init = 0;
- }
-
md = ob->modifiers.first;
+ *virtualModifierData = virtualModifierCommonData;
+
if (ob->parent) {
if (ob->parent->type == OB_ARMATURE && ob->partype == PARSKEL) {
- amd.object = ob->parent;
- amd.modifier.next = md;
- amd.deformflag = ((bArmature *)(ob->parent->data))->deformflag;
- md = &amd.modifier;
+ virtualModifierData->amd.object = ob->parent;
+ virtualModifierData->amd.modifier.next = md;
+ virtualModifierData->amd.deformflag = ((bArmature *)(ob->parent->data))->deformflag;
+ md = &virtualModifierData->amd.modifier;
}
else if (ob->parent->type == OB_CURVE && ob->partype == PARSKEL) {
- cmd.object = ob->parent;
- cmd.defaxis = ob->trackflag + 1;
- cmd.modifier.next = md;
- md = &cmd.modifier;
+ virtualModifierData->cmd.object = ob->parent;
+ virtualModifierData->cmd.defaxis = ob->trackflag + 1;
+ virtualModifierData->cmd.modifier.next = md;
+ md = &virtualModifierData->cmd.modifier;
}
else if (ob->parent->type == OB_LATTICE && ob->partype == PARSKEL) {
- lmd.object = ob->parent;
- lmd.modifier.next = md;
- md = &lmd.modifier;
+ virtualModifierData->lmd.object = ob->parent;
+ virtualModifierData->lmd.modifier.next = md;
+ md = &virtualModifierData->lmd.modifier;
}
}
/* shape key modifier, not yet for curves */
if (ELEM(ob->type, OB_MESH, OB_LATTICE) && BKE_key_from_object(ob)) {
if (ob->type == OB_MESH && (ob->shapeflag & OB_SHAPE_EDIT_MODE))
- smd.modifier.mode |= eModifierMode_Editmode | eModifierMode_OnCage;
+ virtualModifierData->smd.modifier.mode |= eModifierMode_Editmode | eModifierMode_OnCage;
else
- smd.modifier.mode &= ~eModifierMode_Editmode | eModifierMode_OnCage;
+ virtualModifierData->smd.modifier.mode &= ~eModifierMode_Editmode | eModifierMode_OnCage;
- smd.modifier.next = md;
- md = &smd.modifier;
+ virtualModifierData->smd.modifier.next = md;
+ md = &virtualModifierData->smd.modifier;
}
return md;
@@ -513,7 +508,8 @@ ModifierData *modifiers_getVirtualModifierList(Object *ob)
*/
Object *modifiers_isDeformedByArmature(Object *ob)
{
- ModifierData *md = modifiers_getVirtualModifierList(ob);
+ VirtualModifierData virtualModifierData;
+ ModifierData *md = modifiers_getVirtualModifierList(ob, &virtualModifierData);
ArmatureModifierData *amd = NULL;
/* return the first selected armature, this lets us use multiple armatures */
@@ -536,7 +532,8 @@ Object *modifiers_isDeformedByArmature(Object *ob)
*/
Object *modifiers_isDeformedByLattice(Object *ob)
{
- ModifierData *md = modifiers_getVirtualModifierList(ob);
+ VirtualModifierData virtualModifierData;
+ ModifierData *md = modifiers_getVirtualModifierList(ob, &virtualModifierData);
LatticeModifierData *lmd = NULL;
/* return the first selected lattice, this lets us use multiple lattices */
@@ -559,7 +556,8 @@ Object *modifiers_isDeformedByLattice(Object *ob)
*/
Object *modifiers_isDeformedByCurve(Object *ob)
{
- ModifierData *md = modifiers_getVirtualModifierList(ob);
+ VirtualModifierData virtualModifierData;
+ ModifierData *md = modifiers_getVirtualModifierList(ob, &virtualModifierData);
CurveModifierData *cmd = NULL;
/* return the first selected curve, this lets us use multiple curves */
@@ -579,7 +577,8 @@ Object *modifiers_isDeformedByCurve(Object *ob)
bool modifiers_usesArmature(Object *ob, bArmature *arm)
{
- ModifierData *md = modifiers_getVirtualModifierList(ob);
+ VirtualModifierData virtualModifierData;
+ ModifierData *md = modifiers_getVirtualModifierList(ob, &virtualModifierData);
for (; md; md = md->next) {
if (md->type == eModifierType_Armature) {
@@ -594,20 +593,21 @@ bool modifiers_usesArmature(Object *ob, bArmature *arm)
bool modifier_isCorrectableDeformed(ModifierData *md)
{
- if (md->type == eModifierType_Armature)
- return true;
- if (md->type == eModifierType_ShapeKey)
- return true;
-
- return false;
+ ModifierTypeInfo *mti = modifierType_getInfo(md->type);
+ return (mti->deformMatricesEM != NULL);
}
-bool modifiers_isCorrectableDeformed(Object *ob)
+bool modifiers_isCorrectableDeformed(struct Scene *scene, Object *ob)
{
- ModifierData *md = modifiers_getVirtualModifierList(ob);
+ VirtualModifierData virtualModifierData;
+ ModifierData *md = modifiers_getVirtualModifierList(ob, &virtualModifierData);
+ int required_mode = eModifierMode_Realtime;
+
+ if (ob->mode == OB_MODE_EDIT)
+ required_mode |= eModifierMode_Editmode;
for (; md; md = md->next) {
- if (ob->mode == OB_MODE_EDIT && (md->mode & eModifierMode_Editmode) == 0) {
+ if (!modifier_isEnabled(scene, md, required_mode)) {
/* pass */
}
else if (modifier_isCorrectableDeformed(md)) {
diff --git a/source/blender/blenkernel/intern/modifiers_bmesh.c b/source/blender/blenkernel/intern/modifiers_bmesh.c
index 290b0684e40..a9ff569e70a 100644
--- a/source/blender/blenkernel/intern/modifiers_bmesh.c
+++ b/source/blender/blenkernel/intern/modifiers_bmesh.c
@@ -52,7 +52,7 @@ static BMFace *bm_face_create_from_mpoly(MPoly *mp, MLoop *ml,
edges[j] = etable[ml->e];
}
- return BM_face_create(bm, verts, edges, mp->totloop, BM_CREATE_SKIP_CD);
+ return BM_face_create(bm, verts, edges, mp->totloop, NULL, BM_CREATE_SKIP_CD);
}
/**
@@ -232,8 +232,9 @@ BMEditMesh *DM_to_editbmesh(DerivedMesh *dm, BMEditMesh *existing, const bool do
BMesh *DM_to_bmesh(DerivedMesh *dm, const bool calc_face_normal)
{
BMesh *bm;
+ const BMAllocTemplate allocsize = BMALLOC_TEMPLATE_FROM_DM(dm);
- bm = BM_mesh_create(&bm_mesh_allocsize_default);
+ bm = BM_mesh_create(&allocsize);
DM_to_bmesh_ex(dm, bm, calc_face_normal);
diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c
index bf4a63c52a8..d9630a7343d 100644
--- a/source/blender/blenkernel/intern/movieclip.c
+++ b/source/blender/blenkernel/intern/movieclip.c
@@ -62,7 +62,6 @@
#include "BLI_blenlib.h"
#include "BLI_ghash.h"
#include "BLI_math.h"
-#include "BLI_mempool.h"
#include "BLI_threads.h"
#include "BKE_animsys.h"
diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c
index 32ca3ea6d5a..0cdcf4e7298 100644
--- a/source/blender/blenkernel/intern/multires.c
+++ b/source/blender/blenkernel/intern/multires.c
@@ -114,8 +114,8 @@ static BLI_bitmap *multires_mdisps_upsample_hidden(BLI_bitmap *lo_hidden,
BLI_bitmap *prev_hidden)
{
BLI_bitmap *subd;
- int hi_gridsize = ccg_gridsize(hi_level);
- int lo_gridsize = ccg_gridsize(lo_level);
+ int hi_gridsize = BKE_ccg_gridsize(hi_level);
+ int lo_gridsize = BKE_ccg_gridsize(lo_level);
int yh, xh, xl, yl, xo, yo, hi_ndx;
int offset, factor;
@@ -127,7 +127,7 @@ static BLI_bitmap *multires_mdisps_upsample_hidden(BLI_bitmap *lo_hidden,
subd = BLI_BITMAP_NEW(hi_gridsize * hi_gridsize, "MDisps.hidden upsample");
- factor = ccg_factor(lo_level, hi_level);
+ factor = BKE_ccg_factor(lo_level, hi_level);
offset = 1 << (hi_level - lo_level - 1);
/* low-res blocks */
@@ -173,12 +173,12 @@ static BLI_bitmap *multires_mdisps_downsample_hidden(BLI_bitmap *old_hidden,
int new_level)
{
BLI_bitmap *new_hidden;
- int new_gridsize = ccg_gridsize(new_level);
- int old_gridsize = ccg_gridsize(old_level);
+ int new_gridsize = BKE_ccg_gridsize(new_level);
+ int old_gridsize = BKE_ccg_gridsize(old_level);
int x, y, factor, old_value;
BLI_assert(new_level <= old_level);
- factor = ccg_factor(new_level, old_level);
+ factor = BKE_ccg_factor(new_level, old_level);
new_hidden = BLI_BITMAP_NEW(new_gridsize * new_gridsize,
"downsample hidden");
@@ -246,7 +246,7 @@ static MDisps *multires_mdisps_initialize_hidden(Mesh *me, int level)
{
MDisps *mdisps = CustomData_add_layer(&me->ldata, CD_MDISPS,
CD_CALLOC, NULL, me->totloop);
- int gridsize = ccg_gridsize(level);
+ int gridsize = BKE_ccg_gridsize(level);
int gridarea = gridsize * gridsize;
int i, j, k;
@@ -594,7 +594,7 @@ static void multires_copy_dm_grid(CCGElem *gridA, CCGElem *gridB, CCGKey *keyA,
static void multires_grid_paint_mask_downsample(GridPaintMask *gpm, int level)
{
if (level < gpm->level) {
- int gridsize = ccg_gridsize(level);
+ int gridsize = BKE_ccg_gridsize(level);
float *data = MEM_callocN(sizeof(float) * gridsize * gridsize,
"multires_grid_paint_mask_downsample");
int x, y;
@@ -1645,6 +1645,11 @@ void multires_free(Multires *mr)
}
}
+typedef struct IndexNode {
+ struct IndexNode *next, *prev;
+ int index;
+} IndexNode;
+
static void create_old_vert_face_map(ListBase **map, IndexNode **mem, const MultiresFace *mface,
const int totvert, const int totface)
{
diff --git a/source/blender/blenkernel/intern/navmesh_conversion.c b/source/blender/blenkernel/intern/navmesh_conversion.c
index 1d662ae3116..3c499908bf7 100644
--- a/source/blender/blenkernel/intern/navmesh_conversion.c
+++ b/source/blender/blenkernel/intern/navmesh_conversion.c
@@ -38,6 +38,7 @@
#include "BLI_utildefines.h"
#include "BLI_math.h"
+#include "BLI_sort.h"
#include "BKE_navmesh_conversion.h"
#include "BKE_cdderivedmesh.h"
@@ -340,7 +341,7 @@ int buildNavMeshData(const int nverts, const float *verts,
trisMapping[i] = i;
context.recastData = recastData;
context.trisToFacesMap = trisToFacesMap;
- recast_qsort(trisMapping, ntris, sizeof(int), &context, compareByData);
+ BLI_qsort_r(trisMapping, ntris, sizeof(int), &context, compareByData);
/* search first valid triangle - triangle of convex polygon */
validTriStart = -1;
@@ -366,7 +367,7 @@ int buildNavMeshData(const int nverts, const float *verts,
/* create detailed mesh triangles - copy only valid triangles
* and reserve memory for adjacency info */
dtris = MEM_callocN(sizeof(unsigned short) * 3 * 2 * ndtris, "buildNavMeshData dtris");
- memset(dtris, 0xffff, sizeof(unsigned short) * 3 * 2 * ndtris);
+ memset(dtris, 0xff, sizeof(unsigned short) * 3 * 2 * ndtris);
for (i = 0; i < ndtris; i++) {
memcpy(dtris + 3 * 2 * i, tris + 3 * dtrisToTrisMap[i], sizeof(unsigned short) * 3);
}
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index 1349c4dc8d4..cc4263f4392 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -959,9 +959,6 @@ void nodeInternalRelink(bNodeTree *ntree, bNode *node)
{
bNodeLink *link, *link_next;
- if (node->internal_links.first == NULL)
- return;
-
/* store link pointers in output sockets, for efficient lookup */
for (link = node->internal_links.first; link; link = link->next)
link->tosock->link = link;
@@ -1107,7 +1104,7 @@ bNodeTree *ntreeAddTree(Main *bmain, const char *name, const char *idname)
* copying for internal use (threads for eg), where you wont want it to modify the
* scene data.
*/
-static bNodeTree *ntreeCopyTree_internal(bNodeTree *ntree, const short do_id_user, const short do_make_extern, const short copy_previews)
+static bNodeTree *ntreeCopyTree_internal(bNodeTree *ntree, Main *bmain, bool do_id_user, bool do_make_extern, bool copy_previews)
{
bNodeTree *newtree;
bNode *node /*, *nnode */ /* UNUSED */, *last;
@@ -1116,13 +1113,17 @@ static bNodeTree *ntreeCopyTree_internal(bNodeTree *ntree, const short do_id_use
if (ntree == NULL) return NULL;
- /* is ntree part of library? */
- for (newtree = G.main->nodetree.first; newtree; newtree = newtree->id.next)
- if (newtree == ntree) break;
- if (newtree) {
- newtree = BKE_libblock_copy(&ntree->id);
+ if (bmain) {
+ /* is ntree part of library? */
+ if (BLI_findindex(&bmain->nodetree, ntree) != -1)
+ newtree = BKE_libblock_copy(&ntree->id);
+ else
+ newtree = NULL;
}
- else {
+ else
+ newtree = NULL;
+
+ if (newtree == NULL) {
newtree = MEM_dupallocN(ntree);
newtree->id.lib = NULL; /* same as owning datablock id.lib */
BKE_libblock_copy_data(&newtree->id, &ntree->id, true); /* copy animdata and ID props */
@@ -1208,7 +1209,7 @@ static bNodeTree *ntreeCopyTree_internal(bNodeTree *ntree, const short do_id_use
bNodeTree *ntreeCopyTree_ex(bNodeTree *ntree, const short do_id_user)
{
- return ntreeCopyTree_internal(ntree, do_id_user, TRUE, TRUE);
+ return ntreeCopyTree_internal(ntree, G.main, do_id_user, TRUE, TRUE);
}
bNodeTree *ntreeCopyTree(bNodeTree *ntree)
{
@@ -1590,6 +1591,8 @@ static void node_unlink_attached(bNodeTree *ntree, bNode *parent)
void nodeFreeNode(bNodeTree *ntree, bNode *node)
{
bNodeSocket *sock, *nextsock;
+ char propname_esc[MAX_IDPROP_NAME * 2];
+ char prefix[MAX_IDPROP_NAME * 2];
/* extra free callback */
if (node->typeinfo && node->typeinfo->freefunc_api) {
@@ -1609,6 +1612,11 @@ void nodeFreeNode(bNodeTree *ntree, bNode *node)
BLI_remlink(&ntree->nodes, node);
+ BLI_strescape(propname_esc, node->name, sizeof(propname_esc));
+ BLI_snprintf(prefix, sizeof(prefix), "nodes[\"%s\"]", propname_esc);
+
+ BKE_animdata_fix_paths_remove((ID *)ntree, prefix);
+
if (ntree->typeinfo && ntree->typeinfo->free_node_cache)
ntree->typeinfo->free_node_cache(ntree, node);
@@ -1657,6 +1665,22 @@ static void node_socket_interface_free(bNodeTree *UNUSED(ntree), bNodeSocket *so
MEM_freeN(sock->default_value);
}
+static void free_localized_node_groups(bNodeTree *ntree)
+{
+ bNode *node;
+
+ for (node = ntree->nodes.first; node; node = node->next) {
+ if (node->type == NODE_GROUP && node->id) {
+ bNodeTree *ngroup = (bNodeTree *)node->id;
+ if (ngroup->flag & NTREE_IS_LOCALIZED) {
+ /* ntree is a localized copy: free it */
+ ntreeFreeTree_ex(ngroup, false);
+ MEM_freeN(ngroup);
+ }
+ }
+ }
+}
+
/* do not free ntree itself here, BKE_libblock_free calls this function too */
void ntreeFreeTree_ex(bNodeTree *ntree, const short do_id_user)
{
@@ -1683,6 +1707,9 @@ void ntreeFreeTree_ex(bNodeTree *ntree, const short do_id_user)
}
}
+ /* XXX not nice, but needed to free localized node groups properly */
+ free_localized_node_groups(ntree);
+
/* unregister associated RNA types */
ntreeInterfaceTypeFree(ntree);
@@ -1932,8 +1959,15 @@ bNodeTree *ntreeLocalize(bNodeTree *ntree)
/* Make full copy.
* Note: previews are not copied here.
*/
- ltree = ntreeCopyTree_internal(ntree, FALSE, FALSE, FALSE);
-
+ ltree = ntreeCopyTree_internal(ntree, NULL, FALSE, FALSE, FALSE);
+ ltree->flag |= NTREE_IS_LOCALIZED;
+
+ for (node = ltree->nodes.first; node; node = node->next) {
+ if (node->type == NODE_GROUP && node->id) {
+ node->id = (ID *)ntreeLocalize((bNodeTree *)node->id);
+ }
+ }
+
if (adt) {
AnimData *ladt = BKE_animdata_from_id(&ltree->id);
@@ -1978,7 +2012,7 @@ void ntreeLocalSync(bNodeTree *localtree, bNodeTree *ntree)
/* we have to assume the editor already changed completely */
void ntreeLocalMerge(bNodeTree *localtree, bNodeTree *ntree)
{
- if (localtree && ntree) {
+ if (ntree && localtree) {
if (ntree->typeinfo->local_merge)
ntree->typeinfo->local_merge(localtree, ntree);
@@ -2285,7 +2319,7 @@ bNode *nodeGetActive(bNodeTree *ntree)
static bNode *node_get_active_id_recursive(bNodeInstanceKey active_key, bNodeInstanceKey parent_key, bNodeTree *ntree, short idtype)
{
- if (parent_key.value == active_key.value) {
+ if (parent_key.value == active_key.value || active_key.value == 0) {
bNode *node;
for (node = ntree->nodes.first; node; node = node->next)
if (node->id && GS(node->id->name) == idtype)
@@ -2666,7 +2700,7 @@ void BKE_node_instance_hash_clear(bNodeInstanceHash *hash, bNodeInstanceValueFP
void *BKE_node_instance_hash_pop(bNodeInstanceHash *hash, bNodeInstanceKey key)
{
- return BLI_ghash_pop(hash->ghash, &key, NULL);
+ return BLI_ghash_popkey(hash->ghash, &key, NULL);
}
int BKE_node_instance_hash_haskey(bNodeInstanceHash *hash, bNodeInstanceKey key)
@@ -3449,6 +3483,7 @@ static void registerShaderNodes(void)
register_node_type_sh_bsdf_transparent();
register_node_type_sh_bsdf_velvet();
register_node_type_sh_bsdf_toon();
+ register_node_type_sh_bsdf_hair();
register_node_type_sh_emission();
register_node_type_sh_holdout();
//register_node_type_sh_volume_transparent();
@@ -3574,11 +3609,13 @@ void free_nodesystem(void)
}
if (nodetreetypes_hash) {
- NODE_TREE_TYPES_BEGIN(nt)
+ NODE_TREE_TYPES_BEGIN (nt)
+ {
if (nt->ext.free) {
nt->ext.free(nt->ext.data);
}
- NODE_TREE_TYPES_END
+ }
+ NODE_TREE_TYPES_END;
BLI_ghash_free(nodetreetypes_hash, NULL, ntree_free_type);
nodetreetypes_hash = NULL;
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 962209bef87..bef0263b2f5 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -64,6 +64,7 @@
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BLI_linklist.h"
+#include "BLI_kdtree.h"
#include "BLF_translation.h"
@@ -142,11 +143,9 @@ void BKE_object_update_base_layer(struct Scene *scene, Object *ob)
void BKE_object_free_particlesystems(Object *ob)
{
- while (ob->particlesystem.first) {
- ParticleSystem *psys = ob->particlesystem.first;
-
- BLI_remlink(&ob->particlesystem, psys);
-
+ ParticleSystem *psys;
+
+ while ((psys = BLI_pophead(&ob->particlesystem))) {
psys_free(ob, psys);
}
}
@@ -167,13 +166,24 @@ void BKE_object_free_bulletsoftbody(Object *ob)
}
}
+void BKE_object_free_curve_cache(Object *ob)
+{
+ if (ob->curve_cache) {
+ BKE_displist_free(&ob->curve_cache->disp);
+ BLI_freelistN(&ob->curve_cache->bev);
+ if (ob->curve_cache->path) {
+ free_path(ob->curve_cache->path);
+ }
+ MEM_freeN(ob->curve_cache);
+ ob->curve_cache = NULL;
+ }
+}
+
void BKE_object_free_modifiers(Object *ob)
{
- while (ob->modifiers.first) {
- ModifierData *md = ob->modifiers.first;
-
- BLI_remlink(&ob->modifiers, md);
-
+ ModifierData *md;
+
+ while ((md = BLI_pophead(&ob->modifiers))) {
modifier_free(md);
}
@@ -184,6 +194,28 @@ void BKE_object_free_modifiers(Object *ob)
BKE_object_free_softbody(ob);
}
+void BKE_object_modifier_hook_reset(Object *ob, HookModifierData *hmd)
+{
+ /* reset functionality */
+ if (hmd->object) {
+ bPoseChannel *pchan = BKE_pose_channel_find_name(hmd->object->pose, hmd->subtarget);
+
+ if (hmd->subtarget[0] && pchan) {
+ float imat[4][4], mat[4][4];
+
+ /* calculate the world-space matrix for the pose-channel target first, then carry on as usual */
+ mul_m4_m4m4(mat, hmd->object->obmat, pchan->pose_mat);
+
+ invert_m4_m4(imat, mat);
+ mul_m4_m4m4(hmd->parentinv, imat, ob->obmat);
+ }
+ else {
+ invert_m4_m4(hmd->object->imat, hmd->object->obmat);
+ mul_m4_m4m4(hmd->parentinv, hmd->object->imat, ob->obmat);
+ }
+ }
+}
+
bool BKE_object_support_modifier_type_check(Object *ob, int modifier_type)
{
ModifierTypeInfo *mti;
@@ -246,8 +278,14 @@ void BKE_object_free_derived_caches(Object *ob)
Mesh *me = ob->data;
if (me->bb) {
- MEM_freeN(me->bb);
- me->bb = NULL;
+ me->bb->flag |= BOUNDBOX_DIRTY;
+ }
+ }
+ else if (ELEM3(ob->type, OB_SURF, OB_CURVE, OB_FONT)) {
+ Curve *cu = ob->data;
+
+ if (cu->bb) {
+ cu->bb->flag |= BOUNDBOX_DIRTY;
}
}
@@ -267,7 +305,9 @@ void BKE_object_free_derived_caches(Object *ob)
ob->derivedDeform = NULL;
}
- BKE_displist_free(&ob->disp);
+ if (ob->curve_cache) {
+ BKE_displist_free(&ob->curve_cache->disp);
+ }
}
/* do not free object itself */
@@ -337,6 +377,14 @@ void BKE_object_free(Object *ob)
free_sculptsession(ob);
if (ob->pc_ids.first) BLI_freelistN(&ob->pc_ids);
+
+ /* Free runtime curves data. */
+ if (ob->curve_cache) {
+ BLI_freelistN(&ob->curve_cache->bev);
+ if (ob->curve_cache->path)
+ free_path(ob->curve_cache->path);
+ MEM_freeN(ob->curve_cache);
+ }
}
static void unlink_object__unlinkModifierLinks(void *userData, Object *ob, Object **obpoin)
@@ -542,6 +590,9 @@ void BKE_object_unlink(Object *ob)
}
}
}
+
+ if (tpsys->parent == ob)
+ tpsys->parent = NULL;
}
if (ob->pd)
DAG_id_tag_update(&obt->id, OB_RECALC_DATA);
@@ -617,7 +668,9 @@ void BKE_object_unlink(Object *ob)
for (lineset = (FreestyleLineSet *)srl->freestyleConfig.linesets.first;
lineset; lineset = lineset->next)
{
- BKE_unlink_linestyle_target_object(lineset->linestyle, ob);
+ if (lineset->linestyle) {
+ BKE_unlink_linestyle_target_object(lineset->linestyle, ob);
+ }
}
}
}
@@ -1249,6 +1302,11 @@ Object *BKE_object_copy_ex(Main *bmain, Object *ob, int copy_caches)
obn->mode = 0;
obn->sculpt = NULL;
+ /* Proxies are not to be copied. */
+ obn->proxy_from = NULL;
+ obn->proxy_group = NULL;
+ obn->proxy = NULL;
+
/* increase user numbers */
id_us_plus((ID *)obn->data);
id_us_plus((ID *)obn->gpd);
@@ -1256,8 +1314,6 @@ Object *BKE_object_copy_ex(Main *bmain, Object *ob, int copy_caches)
for (a = 0; a < obn->totcol; a++) id_us_plus((ID *)obn->mat[a]);
- obn->disp.first = obn->disp.last = NULL;
-
if (ob->pd) {
obn->pd = MEM_dupallocN(ob->pd);
if (obn->pd->tex)
@@ -1279,7 +1335,10 @@ Object *BKE_object_copy_ex(Main *bmain, Object *ob, int copy_caches)
obn->pc_ids.first = obn->pc_ids.last = NULL;
obn->mpath = NULL;
-
+
+ /* Copy runtime surve data. */
+ obn->curve_cache = NULL;
+
return obn;
}
@@ -1772,9 +1831,9 @@ static void ob_parcurve(Scene *scene, Object *ob, Object *par, float mat[4][4])
unit_m4(mat);
cu = par->data;
- if (cu->path == NULL || cu->path->data == NULL) /* only happens on reload file, but violates depsgraph still... fix! */
+ if (ELEM3(NULL, par->curve_cache, par->curve_cache->path, par->curve_cache->path->data)) /* only happens on reload file, but violates depsgraph still... fix! */
BKE_displist_make_curveTypes(scene, par, 0);
- if (cu->path == NULL) return;
+ if (par->curve_cache->path == NULL) return;
/* catch exceptions: feature for nla stride editing */
if (ob->ipoflag & OB_DISABLE_PATH) {
@@ -1805,7 +1864,7 @@ static void ob_parcurve(Scene *scene, Object *ob, Object *par, float mat[4][4])
/* time calculus is correct, now apply distance offset */
if (cu->flag & CU_OFFS_PATHDIST) {
- ctime += timeoffs / cu->path->totdist;
+ ctime += timeoffs / par->curve_cache->path->totdist;
/* restore */
SWAP(float, sf_orig, ob->sf);
@@ -1962,7 +2021,7 @@ static void give_parvert(Object *par, int nr, float vec[3])
}
else if (par->type == OB_LATTICE) {
Lattice *latt = par->data;
- DispList *dl = BKE_displist_find(&par->disp, DL_VERTS);
+ DispList *dl = par->curve_cache ? BKE_displist_find(&par->curve_cache->disp, DL_VERTS) : NULL;
float (*co)[3] = dl ? (float (*)[3])dl->verts : NULL;
int tot;
@@ -1986,29 +2045,23 @@ static void give_parvert(Object *par, int nr, float vec[3])
static void ob_parvert3(Object *ob, Object *par, float mat[4][4])
{
- float cmat[3][3], v1[3], v2[3], v3[3], q[4];
/* in local ob space */
- unit_m4(mat);
-
- if (ELEM4(par->type, OB_MESH, OB_SURF, OB_CURVE, OB_LATTICE)) {
-
+ if (OB_TYPE_SUPPORT_PARVERT(par->type)) {
+ float cmat[3][3], v1[3], v2[3], v3[3], q[4];
+
give_parvert(par, ob->par1, v1);
give_parvert(par, ob->par2, v2);
give_parvert(par, ob->par3, v3);
-
+
tri_to_quat(q, v1, v2, v3);
quat_to_mat3(cmat, q);
copy_m4_m3(mat, cmat);
-
- if (ob->type == OB_CURVE) {
- copy_v3_v3(mat[3], v1);
- }
- else {
- add_v3_v3v3(mat[3], v1, v2);
- add_v3_v3(mat[3], v3);
- mul_v3_fl(mat[3], 1.0f / 3.0f);
- }
+
+ mid_v3_v3v3v3(mat[3], v1, v2, v3);
+ }
+ else {
+ unit_m4(mat);
}
}
@@ -2291,7 +2344,7 @@ BoundBox *BKE_object_boundbox_get(Object *ob)
bb = BKE_mesh_boundbox_get(ob);
}
else if (ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT)) {
- bb = ob->bb ? ob->bb : ((Curve *)ob->data)->bb;
+ bb = BKE_curve_boundbox_get(ob);
}
else if (ob->type == OB_MBALL) {
bb = ob->bb;
@@ -2360,18 +2413,7 @@ void BKE_object_minmax(Object *ob, float min_r[3], float max_r[3], const bool us
case OB_FONT:
case OB_SURF:
{
- Curve *cu = ob->data;
-
- /* Use the object bounding box so that modifier output
- * gets taken into account */
- if (ob->bb) {
- bb = *(ob->bb);
- }
- else {
- if (cu->bb == NULL)
- BKE_curve_texspace_calc(cu);
- bb = *(cu->bb);
- }
+ bb = *BKE_curve_boundbox_get(ob);
for (a = 0; a < 8; a++) {
mul_m4_v3(ob->obmat, bb.vec[a]);
@@ -2519,10 +2561,10 @@ void BKE_object_foreach_display_point(
func_cb(co, user_data);
}
}
- else if (ob->disp.first) {
+ else if (ob->curve_cache && ob->curve_cache->disp.first) {
DispList *dl;
- for (dl = ob->disp.first; dl; dl = dl->next) {
+ for (dl = ob->curve_cache->disp.first; dl; dl = dl->next) {
float *v3 = dl->verts;
int totvert = dl->nr;
int i;
@@ -2825,21 +2867,20 @@ void BKE_object_handle_update_ex(Scene *scene, Object *ob,
/* quick cache removed */
}
- /* the no-group proxy case, we call update */
- if (ob->proxy && ob->proxy_group == NULL) {
- /* set pointer in library proxy target, for copying, but restore it */
- ob->proxy->proxy_from = ob;
- // printf("call update, lib ob %s proxy %s\n", ob->proxy->id.name, ob->id.name);
- BKE_object_handle_update(scene, ob->proxy);
- }
-
ob->recalc &= ~OB_RECALC_ALL;
}
/* the case when this is a group proxy, object_update is called in group.c */
if (ob->proxy) {
+ /* set pointer in library proxy target, for copying, but restore it */
ob->proxy->proxy_from = ob;
// printf("set proxy pointer for later group stuff %s\n", ob->id.name);
+
+ /* the no-group proxy case, we call update */
+ if (ob->proxy_group == NULL) {
+ // printf("call update, lib ob %s proxy %s\n", ob->proxy->id.name, ob->id.name);
+ BKE_object_handle_update(scene, ob->proxy);
+ }
}
}
/* WARNING: "scene" here may not be the scene object actually resides in.
@@ -3158,8 +3199,9 @@ int BKE_object_is_modified(Scene *scene, Object *ob)
}
else {
ModifierData *md;
+ VirtualModifierData virtualModifierData;
/* cloth */
- for (md = modifiers_getVirtualModifierList(ob);
+ for (md = modifiers_getVirtualModifierList(ob, &virtualModifierData);
md && (flag != (eModifierMode_Render | eModifierMode_Realtime));
md = md->next)
{
@@ -3180,10 +3222,11 @@ int BKE_object_is_modified(Scene *scene, Object *ob)
int BKE_object_is_deform_modified(Scene *scene, Object *ob)
{
ModifierData *md;
+ VirtualModifierData virtualModifierData;
int flag = 0;
/* cloth */
- for (md = modifiers_getVirtualModifierList(ob);
+ for (md = modifiers_getVirtualModifierList(ob, &virtualModifierData);
md && (flag != (eModifierMode_Render | eModifierMode_Realtime));
md = md->next)
{
@@ -3205,8 +3248,9 @@ int BKE_object_is_deform_modified(Scene *scene, Object *ob)
bool BKE_object_is_animated(Scene *scene, Object *ob)
{
ModifierData *md;
+ VirtualModifierData virtualModifierData;
- for (md = modifiers_getVirtualModifierList(ob); md; md = md->next)
+ for (md = modifiers_getVirtualModifierList(ob, &virtualModifierData); md; md = md->next)
if (modifier_dependsOnTime(md) &&
(modifier_isEnabled(scene, md, eModifierMode_Realtime) ||
modifier_isEnabled(scene, md, eModifierMode_Render)))
@@ -3248,7 +3292,7 @@ void BKE_object_relink(Object *ob)
ID_NEW(ob->proxy_group);
}
-MovieClip *BKE_object_movieclip_get(Scene *scene, Object *ob, int use_default)
+MovieClip *BKE_object_movieclip_get(Scene *scene, Object *ob, bool use_default)
{
MovieClip *clip = use_default ? scene->clip : NULL;
bConstraint *con = ob->constraints.first, *scon = NULL;
@@ -3422,3 +3466,131 @@ void BKE_object_groups_clear(Scene *scene, Base *base, Object *object)
BKE_group_object_unlink(group, object, scene, base);
}
}
+
+/**
+ * Return a KDTree from the deformed object (in worldspace)
+ *
+ * \note Only mesh objects currently support deforming, others are TODO.
+ *
+ * \param ob
+ * \param r_tot
+ * \return The kdtree or NULL if it can't be created.
+ */
+KDTree *BKE_object_as_kdtree(Object *ob, int *r_tot)
+{
+ KDTree *tree = NULL;
+ unsigned int tot = 0;
+
+ switch (ob->type) {
+ case OB_MESH:
+ {
+ Mesh *me = ob->data;
+ unsigned int i;
+
+ DerivedMesh *dm = ob->derivedDeform ? ob->derivedDeform : ob->derivedFinal;
+ int *index;
+
+ if (dm && (index = CustomData_get_layer(&dm->vertData, CD_ORIGINDEX))) {
+ MVert *mvert = dm->getVertArray(dm);
+ unsigned int totvert = dm->getNumVerts(dm);
+
+ /* tree over-allocs in case where some verts have ORIGINDEX_NONE */
+ tot = 0;
+ tree = BLI_kdtree_new(totvert);
+
+ /* we don't how how many verts from the DM we can use */
+ for (i = 0; i < totvert; i++) {
+ if (index[i] != ORIGINDEX_NONE) {
+ float co[3];
+ mul_v3_m4v3(co, ob->obmat, mvert[i].co);
+ BLI_kdtree_insert(tree, index[i], co, NULL);
+ tot++;
+ }
+ }
+ }
+ else {
+ MVert *mvert = me->mvert;
+
+ tot = me->totvert;
+ tree = BLI_kdtree_new(tot);
+
+ for (i = 0; i < tot; i++) {
+ float co[3];
+ mul_v3_m4v3(co, ob->obmat, mvert[i].co);
+ BLI_kdtree_insert(tree, i, co, NULL);
+ }
+ }
+
+ BLI_kdtree_balance(tree);
+ break;
+ }
+ case OB_CURVE:
+ case OB_SURF:
+ {
+ /* TODO: take deformation into account */
+ Curve *cu = ob->data;
+ unsigned int i, a;
+
+ Nurb *nu;
+
+ tot = BKE_nurbList_verts_count_without_handles(&cu->nurb);
+ tree = BLI_kdtree_new(tot);
+ i = 0;
+
+ nu = cu->nurb.first;
+ while (nu) {
+ if (nu->bezt) {
+ BezTriple *bezt;
+
+ bezt = nu->bezt;
+ a = nu->pntsu;
+ while (a--) {
+ float co[3];
+ mul_v3_m4v3(co, ob->obmat, bezt->vec[1]);
+ BLI_kdtree_insert(tree, i++, co, NULL);
+ bezt++;
+ }
+ }
+ else {
+ BPoint *bp;
+
+ bp = nu->bp;
+ a = nu->pntsu * nu->pntsv;
+ while (a--) {
+ float co[3];
+ mul_v3_m4v3(co, ob->obmat, bp->vec);
+ BLI_kdtree_insert(tree, i++, co, NULL);
+ bp++;
+ }
+ }
+ nu = nu->next;
+ }
+
+ BLI_kdtree_balance(tree);
+ break;
+ }
+ case OB_LATTICE:
+ {
+ /* TODO: take deformation into account */
+ Lattice *lt = ob->data;
+ BPoint *bp;
+ unsigned int i;
+
+ tot = lt->pntsu * lt->pntsv * lt->pntsw;
+ tree = BLI_kdtree_new(tot);
+ i = 0;
+
+ for (bp = lt->def; i < tot; bp++) {
+ float co[3];
+ mul_v3_m4v3(co, ob->obmat, bp->vec);
+ BLI_kdtree_insert(tree, i++, co, NULL);
+ }
+
+ BLI_kdtree_balance(tree);
+ break;
+ }
+ }
+
+ *r_tot = tot;
+ return tree;
+}
diff --git a/source/blender/blenkernel/intern/object_deform.c b/source/blender/blenkernel/intern/object_deform.c
index bfec38419f1..77c5e57f382 100644
--- a/source/blender/blenkernel/intern/object_deform.c
+++ b/source/blender/blenkernel/intern/object_deform.c
@@ -73,12 +73,13 @@ bool *BKE_objdef_validmap_get(Object *ob, const int defbase_tot)
GHash *gh;
int i, step1 = 1;
//int defbase_tot = BLI_countlist(&ob->defbase);
+ VirtualModifierData virtualModifierData;
if (ob->defbase.first == NULL) {
return NULL;
}
- gh = BLI_ghash_str_new("BKE_objdef_validmap_get gh");
+ gh = BLI_ghash_str_new_ex("BKE_objdef_validmap_get gh", defbase_tot);
/* add all names to a hash table */
for (dg = ob->defbase.first; dg; dg = dg->next) {
@@ -88,7 +89,7 @@ bool *BKE_objdef_validmap_get(Object *ob, const int defbase_tot)
BLI_assert(BLI_ghash_size(gh) == defbase_tot);
/* now loop through the armature modifiers and identify deform bones */
- for (md = ob->modifiers.first; md; md = !md->next && step1 ? (step1 = 0), modifiers_getVirtualModifierList(ob) : md->next) {
+ for (md = ob->modifiers.first; md; md = !md->next && step1 ? (step1 = 0), modifiers_getVirtualModifierList(ob, &virtualModifierData) : md->next) {
if (!(md->mode & (eModifierMode_Realtime | eModifierMode_Virtual)))
continue;
@@ -100,11 +101,13 @@ bool *BKE_objdef_validmap_get(Object *ob, const int defbase_tot)
bPoseChannel *chan;
for (chan = pose->chanbase.first; chan; chan = chan->next) {
+ void **val_p;
if (chan->bone->flag & BONE_NO_DEFORM)
continue;
- if (BLI_ghash_remove(gh, chan->name, NULL, NULL)) {
- BLI_ghash_insert(gh, chan->name, SET_INT_IN_POINTER(1));
+ val_p = BLI_ghash_lookup_p(gh, chan->name);
+ if (val_p) {
+ *val_p = SET_INT_IN_POINTER(1);
}
}
}
diff --git a/source/blender/blenkernel/intern/ocean.c b/source/blender/blenkernel/intern/ocean.c
index 21a69910b4d..c1e43365a84 100644
--- a/source/blender/blenkernel/intern/ocean.c
+++ b/source/blender/blenkernel/intern/ocean.c
@@ -25,6 +25,9 @@
* ***** END GPL LICENSE BLOCK *****
*/
+/** \file blender/blenkernel/intern/ocean.c
+ * \ingroup bke
+ */
#include <math.h>
#include <stdlib.h>
diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c
index 62ea16b9fb4..5c2789a2c1c 100644
--- a/source/blender/blenkernel/intern/packedFile.c
+++ b/source/blender/blenkernel/intern/packedFile.c
@@ -219,6 +219,9 @@ PackedFile *newPackedFile(ReportList *reports, const char *filename, const char
if (read(file, data, filelen) == filelen) {
pf = newPackedFileMemory(data, filelen);
}
+ else {
+ MEM_freeN(data);
+ }
close(file);
}
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c
index b47a493581e..6bdfb22dc1a 100644
--- a/source/blender/blenkernel/intern/paint.c
+++ b/source/blender/blenkernel/intern/paint.c
@@ -359,8 +359,8 @@ int paint_is_bmesh_face_hidden(BMFace *f)
float paint_grid_paint_mask(const GridPaintMask *gpm, unsigned level,
unsigned x, unsigned y)
{
- int factor = ccg_factor(level, gpm->level);
- int gridsize = ccg_gridsize(gpm->level);
+ int factor = BKE_ccg_factor(level, gpm->level);
+ int gridsize = BKE_ccg_gridsize(gpm->level);
return gpm->data[(y * factor) * gridsize + (x * factor)];
}
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index 6b754743c11..24cf98d957d 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -221,12 +221,12 @@ Object *psys_find_object(Scene *scene, ParticleSystem *psys)
}
#endif
-Object *psys_get_lattice(ParticleSimulationData *sim)
+struct LatticeDeformData *psys_create_lattice_deform_data(ParticleSimulationData *sim)
{
- Object *lattice = NULL;
-
- if (psys_in_edit_mode(sim->scene, sim->psys) == 0) {
+ struct LatticeDeformData *lattice_deform_data = NULL;
+ if (psys_in_edit_mode(sim->scene, sim->psys) == 0) {
+ Object *lattice = NULL;
ModifierData *md = (ModifierData *)psys_get_modifier(sim->ob, sim->psys);
for (; md; md = md->next) {
@@ -237,10 +237,10 @@ Object *psys_get_lattice(ParticleSimulationData *sim)
}
}
if (lattice)
- init_latt_deform(lattice, NULL);
+ lattice_deform_data = init_latt_deform(lattice, NULL);
}
- return lattice;
+ return lattice_deform_data;
}
void psys_disable_all(Object *ob)
{
@@ -1729,7 +1729,7 @@ static int psys_map_index_on_dm(DerivedMesh *dm, int from, int index, int index_
return 0;
if (dm->deformedOnly || index_dmcache == DMCACHE_ISCHILD) {
- /* for meshes that are either only defined or for child particles, the
+ /* for meshes that are either only deformed or for child particles, the
* index and fw do not require any mapping, so we can directly use it */
if (from == PART_FROM_VERT) {
if (index >= dm->getNumVerts(dm))
@@ -1817,8 +1817,8 @@ void psys_particle_on_dm(DerivedMesh *dm, int from, int index, int index_dmcache
copy_v3_v3(orco, orcodata[mapindex]);
if (ornor) {
- dm->getVertNo(dm, mapindex, nor);
- normalize_v3(nor);
+ dm->getVertNo(dm, mapindex, ornor);
+ normalize_v3(ornor);
}
if (utan && vtan) {
@@ -1843,7 +1843,7 @@ void psys_particle_on_dm(DerivedMesh *dm, int from, int index, int index_dmcache
if (nor)
copy_v3_v3(nor, tmpnor);
- normalize_v3(tmpnor);
+ normalize_v3(tmpnor); /* XXX Why not normalize tmpnor before copying it into nor??? -- mont29 */
mul_v3_fl(tmpnor, -foffset);
add_v3_v3(vec, tmpnor);
}
@@ -2513,7 +2513,7 @@ static int psys_threads_init_path(ParticleThread *threads, Scene *scene, float c
ctx->cfra = cfra;
ctx->editupdate = editupdate;
- psys->lattice = psys_get_lattice(&ctx->sim);
+ psys->lattice_deform_data = psys_create_lattice_deform_data(&ctx->sim);
/* cache all relevant vertex groups if they exist */
ctx->vg_length = psys_cache_vgroup(ctx->dm, psys, PSYS_VG_LENGTH);
@@ -2974,7 +2974,7 @@ void psys_cache_paths(ParticleSimulationData *sim, float cfra)
psys_free_path_cache(psys, psys->edit);
cache = psys->pathcache = psys_alloc_path_cache_buffers(&psys->pathcachebufs, totpart, steps + 1);
- psys->lattice = psys_get_lattice(sim);
+ psys->lattice_deform_data = psys_create_lattice_deform_data(sim);
ma = give_current_material(sim->ob, psys->part->omat);
if (ma && (psys->part->draw_col == PART_DRAW_COL_MAT))
copy_v3_v3(col, &ma->r);
@@ -3079,9 +3079,9 @@ void psys_cache_paths(ParticleSimulationData *sim, float cfra)
}
/* lattices have to be calculated separately to avoid mixups between effector calculations */
- if (psys->lattice) {
+ if (psys->lattice_deform_data) {
for (k = 0, ca = cache[p]; k <= steps; k++, ca++)
- calc_latt_deform(psys->lattice, ca->co, 1.0f);
+ calc_latt_deform(psys->lattice_deform_data, ca->co, 1.0f);
}
}
@@ -3112,9 +3112,9 @@ void psys_cache_paths(ParticleSimulationData *sim, float cfra)
psys->totcached = totpart;
- if (psys->lattice) {
- end_latt_deform(psys->lattice);
- psys->lattice = NULL;
+ if (psys->lattice_deform_data) {
+ end_latt_deform(psys->lattice_deform_data);
+ psys->lattice_deform_data = NULL;
}
if (vg_effector)
@@ -4166,8 +4166,8 @@ void psys_get_particle_on_path(ParticleSimulationData *sim, int p, ParticleKey *
/* TODO: proper velocity handling */
}
- if (psys->lattice && edit == 0)
- calc_latt_deform(psys->lattice, state->co, 1.0f);
+ if (psys->lattice_deform_data && edit == 0)
+ calc_latt_deform(psys->lattice_deform_data, state->co, 1.0f);
}
}
}
@@ -4402,8 +4402,8 @@ int psys_get_particle_state(ParticleSimulationData *sim, int p, ParticleKey *sta
unit_m4(mat);
do_child_modifiers(sim, NULL, key1, key1->rot, cpa, cpa->fuv, mat, state, t);
- if (psys->lattice)
- calc_latt_deform(sim->psys->lattice, state->co, 1.0f);
+ if (psys->lattice_deform_data)
+ calc_latt_deform(psys->lattice_deform_data, state->co, 1.0f);
}
else {
if (pa->state.time == cfra || ELEM(part->phystype, PART_PHYS_NO, PART_PHYS_KEYED))
@@ -4461,8 +4461,8 @@ int psys_get_particle_state(ParticleSimulationData *sim, int p, ParticleKey *sta
}
}
- if (sim->psys->lattice)
- calc_latt_deform(sim->psys->lattice, state->co, 1.0f);
+ if (sim->psys->lattice_deform_data)
+ calc_latt_deform(sim->psys->lattice_deform_data, state->co, 1.0f);
}
return 1;
@@ -4678,9 +4678,9 @@ void psys_apply_hair_lattice(Scene *scene, Object *ob, ParticleSystem *psys)
sim.psys = psys;
sim.psmd = psys_get_modifier(ob, psys);
- psys->lattice = psys_get_lattice(&sim);
+ psys->lattice_deform_data = psys_create_lattice_deform_data(&sim);
- if (psys->lattice) {
+ if (psys->lattice_deform_data) {
ParticleData *pa = psys->particles;
HairKey *hkey;
int p, h;
@@ -4693,13 +4693,13 @@ void psys_apply_hair_lattice(Scene *scene, Object *ob, ParticleSystem *psys)
hkey = pa->hair;
for (h = 0; h < pa->totkey; h++, hkey++) {
mul_m4_v3(hairmat, hkey->co);
- calc_latt_deform(psys->lattice, hkey->co, 1.0f);
+ calc_latt_deform(psys->lattice_deform_data, hkey->co, 1.0f);
mul_m4_v3(imat, hkey->co);
}
}
- end_latt_deform(psys->lattice);
- psys->lattice = NULL;
+ end_latt_deform(psys->lattice_deform_data);
+ psys->lattice_deform_data = NULL;
/* protect the applied shape */
psys->flag |= PSYS_EDITED;
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 16ea71204cc..526d54a97fa 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -70,6 +70,7 @@
#include "BLI_blenlib.h"
#include "BLI_kdtree.h"
#include "BLI_kdopbvh.h"
+#include "BLI_sort.h"
#include "BLI_threads.h"
#include "BLI_linklist.h"
@@ -814,7 +815,7 @@ static void distribute_threads_exec(ParticleThread *thread, ParticleData *pa, Ch
psys_particle_on_dm(ctx->dm,from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,co1,0,0,0,orco1,0);
BKE_mesh_orco_verts_transform((Mesh*)ob->data, &orco1, 1, 1);
- maxw = BLI_kdtree_find_n_nearest(ctx->tree,3,orco1,NULL,ptn);
+ maxw = BLI_kdtree_find_nearest_n(ctx->tree,orco1,NULL,ptn,3);
for (w=0; w<maxw; w++) {
pa->verts[w]=ptn->num;
@@ -939,7 +940,7 @@ static void distribute_threads_exec(ParticleThread *thread, ParticleData *pa, Ch
psys_particle_on_dm(dm,cfrom,cpa->num,DMCACHE_ISCHILD,cpa->fuv,cpa->foffset,co1,nor1,NULL,NULL,orco1,NULL);
BKE_mesh_orco_verts_transform((Mesh*)ob->data, &orco1, 1, 1);
- maxw = BLI_kdtree_find_n_nearest(ctx->tree,4,orco1,NULL,ptn);
+ maxw = BLI_kdtree_find_nearest_n(ctx->tree,orco1,NULL,ptn,3);
maxd=ptn[maxw-1].dist;
/* mind=ptn[0].dist; */ /* UNUSED */
@@ -1010,12 +1011,11 @@ static void *distribute_threads_exec_cb(void *data)
return 0;
}
-/* not thread safe, but qsort doesn't take userdata argument */
-static int *COMPARE_ORIG_INDEX = NULL;
-static int distribute_compare_orig_index(const void *p1, const void *p2)
+static int distribute_compare_orig_index(void *user_data, const void *p1, const void *p2)
{
- int index1 = COMPARE_ORIG_INDEX[*(const int *)p1];
- int index2 = COMPARE_ORIG_INDEX[*(const int *)p2];
+ int *orig_index = (int *) user_data;
+ int index1 = orig_index[*(const int *)p1];
+ int index2 = orig_index[*(const int *)p2];
if (index1 < index2)
return -1;
@@ -1332,20 +1332,19 @@ static int distribute_threads_init_data(ParticleThread *threads, Scene *scene, D
/* For hair, sort by origindex (allows optimization's in rendering), */
/* however with virtual parents the children need to be in random order. */
if (part->type == PART_HAIR && !(part->childtype==PART_CHILD_FACES && part->parents!=0.0f)) {
- COMPARE_ORIG_INDEX = NULL;
+ int *orig_index = NULL;
if (from == PART_FROM_VERT) {
if (dm->numVertData)
- COMPARE_ORIG_INDEX= dm->getVertDataArray(dm, CD_ORIGINDEX);
+ orig_index = dm->getVertDataArray(dm, CD_ORIGINDEX);
}
else {
if (dm->numTessFaceData)
- COMPARE_ORIG_INDEX= dm->getTessFaceDataArray(dm, CD_ORIGINDEX);
+ orig_index = dm->getTessFaceDataArray(dm, CD_ORIGINDEX);
}
- if (COMPARE_ORIG_INDEX) {
- qsort(particle_element, totpart, sizeof(int), distribute_compare_orig_index);
- COMPARE_ORIG_INDEX = NULL;
+ if (orig_index) {
+ BLI_qsort_r(particle_element, totpart, sizeof(int), orig_index, distribute_compare_orig_index);
}
}
@@ -1514,9 +1513,9 @@ void psys_threads_free(ParticleThread *threads)
if (ctx->vg_roughe)
MEM_freeN(ctx->vg_roughe);
- if (ctx->sim.psys->lattice) {
- end_latt_deform(ctx->sim.psys->lattice);
- ctx->sim.psys->lattice= NULL;
+ if (ctx->sim.psys->lattice_deform_data) {
+ end_latt_deform(ctx->sim.psys->lattice_deform_data);
+ ctx->sim.psys->lattice_deform_data = NULL;
}
/* distribution */
@@ -2485,7 +2484,7 @@ static EdgeHash *sph_springhash_build(ParticleSystem *psys)
ParticleSpring *spring;
int i = 0;
- springhash = BLI_edgehash_new();
+ springhash = BLI_edgehash_new_ex(__func__, psys->tot_fluidsprings);
for (i=0, spring=psys->fluid_springs; i<psys->tot_fluidsprings; i++, spring++)
BLI_edgehash_insert(springhash, spring->particle_index[0], spring->particle_index[1], SET_INT_IN_POINTER(i+1));
@@ -3314,9 +3313,14 @@ static float collision_newton_rhapson(ParticleCollision *col, float radius, Part
pce->inv_nor = -1;
- /* Initial step size should be small, but not too small or floating point
- * precision errors will appear. - z0r */
- dt_init = COLLISION_INIT_STEP * col->inv_total_time;
+ if (col->inv_total_time > 0.0f) {
+ /* Initial step size should be small, but not too small or floating point
+ * precision errors will appear. - z0r */
+ dt_init = COLLISION_INIT_STEP * col->inv_total_time;
+ }
+ else {
+ dt_init = 0.001f;
+ }
/* start from the beginning */
t0 = 0.f;
@@ -4108,7 +4112,7 @@ static void save_hair(ParticleSimulationData *sim, float UNUSED(cfra))
invert_m4_m4(ob->imat, ob->obmat);
- psys->lattice= psys_get_lattice(sim);
+ psys->lattice_deform_data= psys_create_lattice_deform_data(sim);
if (psys->totpart==0) return;
@@ -4479,7 +4483,7 @@ static void cached_step(ParticleSimulationData *sim, float cfra)
if (part->randsize > 0.0f)
pa->size *= 1.0f - part->randsize * PSYS_FRAND(p + 1);
- psys->lattice= psys_get_lattice(sim);
+ psys->lattice_deform_data = psys_create_lattice_deform_data(sim);
dietime = pa->dietime;
@@ -4494,9 +4498,9 @@ static void cached_step(ParticleSimulationData *sim, float cfra)
else
pa->alive = PARS_ALIVE;
- if (psys->lattice) {
- end_latt_deform(psys->lattice);
- psys->lattice= NULL;
+ if (psys->lattice_deform_data) {
+ end_latt_deform(psys->lattice_deform_data);
+ psys->lattice_deform_data = NULL;
}
if (PSYS_FRAND(p) > disp)
@@ -4777,9 +4781,9 @@ static void system_step(ParticleSimulationData *sim, float cfra)
update_children(sim);
/* cleanup */
- if (psys->lattice) {
- end_latt_deform(psys->lattice);
- psys->lattice= NULL;
+ if (psys->lattice_deform_data) {
+ end_latt_deform(psys->lattice_deform_data);
+ psys->lattice_deform_data = NULL;
}
}
diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c
index 205159c94a1..45a29f6cc90 100644
--- a/source/blender/blenkernel/intern/pbvh.c
+++ b/source/blender/blenkernel/intern/pbvh.c
@@ -229,9 +229,10 @@ void pbvh_grow_nodes(PBVH *bvh, int totnode)
bvh->node_mem_count *= 1.33;
if (bvh->node_mem_count < totnode)
bvh->node_mem_count = totnode;
- bvh->nodes = MEM_callocN(sizeof(PBVHNode) * bvh->node_mem_count,
+ bvh->nodes = MEM_mallocN(sizeof(PBVHNode) * bvh->node_mem_count,
"bvh nodes");
memcpy(bvh->nodes, prev, bvh->totnode * sizeof(PBVHNode));
+ memset(bvh->nodes + bvh->totnode, 0, (bvh->node_mem_count - bvh->totnode) * sizeof(PBVHNode));
MEM_freeN(prev);
}
@@ -244,9 +245,13 @@ static int map_insert_vert(PBVH *bvh, GHash *map,
unsigned int *face_verts,
unsigned int *uniq_verts, int vertex)
{
- void *value, *key = SET_INT_IN_POINTER(vertex);
+ void *key, **value_p;
- if (!BLI_ghash_haskey(map, key)) {
+ key = SET_INT_IN_POINTER(vertex);
+ value_p = BLI_ghash_lookup_p(map, key);
+
+ if (value_p == NULL) {
+ void *value;
if (BLI_BITMAP_GET(bvh->vert_bitmap, vertex)) {
value = SET_INT_IN_POINTER(~(*face_verts));
++(*face_verts);
@@ -260,8 +265,9 @@ static int map_insert_vert(PBVH *bvh, GHash *map,
BLI_ghash_insert(map, key, value);
return GET_INT_FROM_POINTER(value);
}
- else
- return GET_INT_FROM_POINTER(BLI_ghash_lookup(map, key));
+ else {
+ return GET_INT_FROM_POINTER(*value_p);
+ }
}
/* Find vertices used by the faces in this node and update the draw buffers */
@@ -271,11 +277,12 @@ static void build_mesh_leaf_node(PBVH *bvh, PBVHNode *node)
GHash *map;
int i, j, totface;
- map = BLI_ghash_int_new("build_mesh_leaf_node gh");
-
node->uniq_verts = node->face_verts = 0;
totface = node->totprim;
+ /* reserve size is rough guess */
+ map = BLI_ghash_int_new_ex("build_mesh_leaf_node gh", 2 * totface);
+
node->face_vert_indices = MEM_callocN(sizeof(int) * 4 * totface,
"bvh node face vert indices");
@@ -607,9 +614,9 @@ void BKE_pbvh_free(PBVH *bvh)
if (node->bm_faces)
BLI_ghash_free(node->bm_faces, NULL, NULL);
if (node->bm_unique_verts)
- BLI_ghash_free(node->bm_unique_verts, NULL, NULL);
+ BLI_gset_free(node->bm_unique_verts, NULL);
if (node->bm_other_verts)
- BLI_ghash_free(node->bm_other_verts, NULL, NULL);
+ BLI_gset_free(node->bm_other_verts, NULL);
}
}
@@ -1307,8 +1314,8 @@ void BKE_pbvh_node_num_verts(PBVH *bvh, PBVHNode *node, int *uniquevert, int *to
if (uniquevert) *uniquevert = node->uniq_verts;
break;
case PBVH_BMESH:
- tot = BLI_ghash_size(node->bm_unique_verts);
- if (totvert) *totvert = tot + BLI_ghash_size(node->bm_other_verts);
+ tot = BLI_gset_size(node->bm_unique_verts);
+ if (totvert) *totvert = tot + BLI_gset_size(node->bm_other_verts);
if (uniquevert) *uniquevert = tot;
break;
}
@@ -1859,9 +1866,10 @@ void pbvh_vertex_iter_init(PBVH *bvh, PBVHNode *node,
vi->mverts = verts;
if (bvh->type == PBVH_BMESH) {
- BLI_ghashIterator_init(&vi->bm_unique_verts, node->bm_unique_verts);
- BLI_ghashIterator_init(&vi->bm_other_verts, node->bm_other_verts);
+ BLI_gsetIterator_init(&vi->bm_unique_verts, node->bm_unique_verts);
+ BLI_gsetIterator_init(&vi->bm_other_verts, node->bm_other_verts);
vi->bm_vdata = &bvh->bm->vdata;
+ vi->cd_vert_mask_offset = CustomData_get_offset(vi->bm_vdata, CD_PAINT_MASK);
}
vi->gh = NULL;
diff --git a/source/blender/blenkernel/intern/pbvh_bmesh.c b/source/blender/blenkernel/intern/pbvh_bmesh.c
index cd21f8ad968..0a7c6d901af 100644
--- a/source/blender/blenkernel/intern/pbvh_bmesh.c
+++ b/source/blender/blenkernel/intern/pbvh_bmesh.c
@@ -18,6 +18,10 @@
* ***** END GPL LICENSE BLOCK *****
*/
+/** \file blender/blenkernel/intern/pbvh_bmesh.c
+ * \ingroup bli
+ */
+
#include "MEM_guardedalloc.h"
#include "BLI_utildefines.h"
@@ -48,8 +52,8 @@ static void pbvh_bmesh_node_finalize(PBVH *bvh, int node_index)
PBVHNode *n = &bvh->nodes[node_index];
/* Create vert hash sets */
- n->bm_unique_verts = BLI_ghash_ptr_new("bm_unique_verts");
- n->bm_other_verts = BLI_ghash_ptr_new("bm_other_verts");
+ n->bm_unique_verts = BLI_gset_ptr_new("bm_unique_verts");
+ n->bm_other_verts = BLI_gset_ptr_new("bm_other_verts");
BB_reset(&n->vb);
@@ -67,13 +71,12 @@ static void pbvh_bmesh_node_finalize(PBVH *bvh, int node_index)
l_iter = l_first = BM_FACE_FIRST_LOOP(f);
do {
v = l_iter->v;
- if (!BLI_ghash_haskey(n->bm_unique_verts, v)) {
+ if (!BLI_gset_haskey(n->bm_unique_verts, v)) {
if (BLI_ghash_haskey(bvh->bm_vert_to_node, v)) {
- if (!BLI_ghash_haskey(n->bm_other_verts, v))
- BLI_ghash_insert(n->bm_other_verts, v, NULL);
+ BLI_gset_reinsert(n->bm_other_verts, v, NULL);
}
else {
- BLI_ghash_insert(n->bm_unique_verts, v, NULL);
+ BLI_gset_insert(n->bm_unique_verts, v);
BLI_ghash_insert(bvh->bm_vert_to_node, v, node_val);
}
}
@@ -92,7 +95,7 @@ static void pbvh_bmesh_node_finalize(PBVH *bvh, int node_index)
if (!G.background) {
int smooth = bvh->flags & PBVH_DYNTOPO_SMOOTH_SHADING;
n->draw_buffers = GPU_build_bmesh_buffers(smooth);
- n->flag |= PBVH_UpdateDrawBuffers;
+ n->flag |= PBVH_UpdateDrawBuffers | PBVH_UpdateNormals;
}
}
@@ -101,6 +104,7 @@ static void pbvh_bmesh_node_split(PBVH *bvh, GHash *prim_bbc, int node_index)
{
GHash *empty, *other;
GHashIterator gh_iter;
+ GSetIterator gs_iter;
PBVHNode *n, *c1, *c2;
BB cb;
float mid;
@@ -140,8 +144,8 @@ static void pbvh_bmesh_node_split(PBVH *bvh, GHash *prim_bbc, int node_index)
c2 = &bvh->nodes[children + 1];
c1->flag |= PBVH_Leaf;
c2->flag |= PBVH_Leaf;
- c1->bm_faces = BLI_ghash_ptr_new("bm_faces");
- c2->bm_faces = BLI_ghash_ptr_new("bm_faces");
+ c1->bm_faces = BLI_ghash_ptr_new_ex("bm_faces", BLI_ghash_size(n->bm_faces) / 2);
+ c2->bm_faces = BLI_ghash_ptr_new_ex("bm_faces", BLI_ghash_size(n->bm_faces) / 2);
/* Partition the parent node's faces between the two children */
GHASH_ITER (gh_iter, n->bm_faces) {
@@ -177,11 +181,11 @@ static void pbvh_bmesh_node_split(PBVH *bvh, GHash *prim_bbc, int node_index)
/* Mark this node's unique verts as unclaimed */
if (n->bm_unique_verts) {
- GHASH_ITER (gh_iter, n->bm_unique_verts) {
- BMVert *v = BLI_ghashIterator_getKey(&gh_iter);
+ GSET_ITER (gs_iter, n->bm_unique_verts) {
+ BMVert *v = BLI_gsetIterator_getKey(&gs_iter);
BLI_ghash_remove(bvh->bm_vert_to_node, v, NULL, NULL);
}
- BLI_ghash_free(n->bm_unique_verts, NULL, NULL);
+ BLI_gset_free(n->bm_unique_verts, NULL);
}
/* Unclaim faces */
@@ -192,7 +196,7 @@ static void pbvh_bmesh_node_split(PBVH *bvh, GHash *prim_bbc, int node_index)
BLI_ghash_free(n->bm_faces, NULL, NULL);
if (n->bm_other_verts)
- BLI_ghash_free(n->bm_other_verts, NULL, NULL);
+ BLI_gset_free(n->bm_other_verts, NULL);
if (n->layer_disp)
MEM_freeN(n->layer_disp);
@@ -227,19 +231,26 @@ static void pbvh_bmesh_node_split(PBVH *bvh, GHash *prim_bbc, int node_index)
static int pbvh_bmesh_node_limit_ensure(PBVH *bvh, int node_index)
{
GHash *prim_bbc;
+ GHash *bm_faces;
+ int bm_faces_size;
GHashIterator gh_iter;
+ BBC *bbc_array;
+ unsigned int i;
- if (BLI_ghash_size(bvh->nodes[node_index].bm_faces) <= bvh->leaf_limit) {
+ bm_faces = bvh->nodes[node_index].bm_faces;
+ bm_faces_size = BLI_ghash_size(bm_faces);
+ if (bm_faces_size <= bvh->leaf_limit) {
/* Node limit not exceeded */
return FALSE;
}
/* For each BMFace, store the AABB and AABB centroid */
- prim_bbc = BLI_ghash_ptr_new("prim_bbc");
+ prim_bbc = BLI_ghash_ptr_new_ex("prim_bbc", bm_faces_size);
+ bbc_array = MEM_callocN(sizeof(BBC) * bm_faces_size, "BBC");
- GHASH_ITER (gh_iter, bvh->nodes[node_index].bm_faces) {
+ GHASH_ITER_INDEX (gh_iter, bm_faces, i) {
BMFace *f = BLI_ghashIterator_getKey(&gh_iter);
- BBC *bbc = MEM_callocN(sizeof(BBC), "BBC");
+ BBC *bbc = &bbc_array[i];
BMLoop *l_iter;
BMLoop *l_first;
@@ -255,7 +266,8 @@ static int pbvh_bmesh_node_limit_ensure(PBVH *bvh, int node_index)
pbvh_bmesh_node_split(bvh, prim_bbc, node_index);
- BLI_ghash_free(prim_bbc, NULL, MEM_freeN);
+ BLI_ghash_free(prim_bbc, NULL, NULL);
+ MEM_freeN(bbc_array);
return TRUE;
}
@@ -278,12 +290,12 @@ static BMVert *pbvh_bmesh_vert_create(PBVH *bvh, int node_index,
const float co[3],
const BMVert *example)
{
- BMVert *v = BM_vert_create(bvh->bm, co, example, 0);
+ BMVert *v = BM_vert_create(bvh->bm, co, example, BM_CREATE_NOP);
void *val = SET_INT_IN_POINTER(node_index);
BLI_assert((bvh->totnode == 1 || node_index) && node_index <= bvh->totnode);
- BLI_ghash_insert(bvh->nodes[node_index].bm_unique_verts, v, NULL);
+ BLI_gset_insert(bvh->nodes[node_index].bm_unique_verts, v);
BLI_ghash_insert(bvh->bm_vert_to_node, v, val);
/* Log the new vertex */
@@ -302,9 +314,7 @@ static BMFace *pbvh_bmesh_face_create(PBVH *bvh, int node_index,
/* ensure we never add existing face */
BLI_assert(BM_face_exists(v_tri, 3, NULL) == false);
- f = BM_face_create(bvh->bm, v_tri, e_tri, 3, 0);
- // BM_elem_attrs_copy(bvh->bm, bvh->bm, f_example, f);
- f->mat_nr = f_example->mat_nr;
+ f = BM_face_create(bvh->bm, v_tri, e_tri, 3, f_example, BM_CREATE_NOP);
if (!BLI_ghash_haskey(bvh->bm_face_to_node, f)) {
@@ -367,15 +377,14 @@ static void pbvh_bmesh_vert_ownership_transfer(PBVH *bvh, PBVHNode *new_owner,
BLI_assert(current_owner != new_owner);
/* Remove current ownership */
- BLI_ghash_remove(bvh->bm_vert_to_node, v, NULL, NULL);
- BLI_ghash_remove(current_owner->bm_unique_verts, v, NULL, NULL);
+ BLI_gset_remove(current_owner->bm_unique_verts, v, NULL);
/* Set new ownership */
- BLI_ghash_insert(bvh->bm_vert_to_node, v,
- SET_INT_IN_POINTER(new_owner - bvh->nodes));
- BLI_ghash_insert(new_owner->bm_unique_verts, v, NULL);
- BLI_ghash_remove(new_owner->bm_other_verts, v, NULL, NULL);
- BLI_assert(!BLI_ghash_haskey(new_owner->bm_other_verts, v));
+ BLI_ghash_reinsert(bvh->bm_vert_to_node, v,
+ SET_INT_IN_POINTER(new_owner - bvh->nodes), NULL, NULL);
+ BLI_gset_insert(new_owner->bm_unique_verts, v);
+ BLI_gset_remove(new_owner->bm_other_verts, v, NULL);
+ BLI_assert(!BLI_gset_haskey(new_owner->bm_other_verts, v));
}
static void pbvh_bmesh_vert_remove(PBVH *bvh, BMVert *v)
@@ -386,18 +395,20 @@ static void pbvh_bmesh_vert_remove(PBVH *bvh, BMVert *v)
BLI_assert(BLI_ghash_haskey(bvh->bm_vert_to_node, v));
v_node = pbvh_bmesh_node_lookup(bvh, bvh->bm_vert_to_node, v);
- BLI_ghash_remove(v_node->bm_unique_verts, v, NULL, NULL);
+ BLI_gset_remove(v_node->bm_unique_verts, v, NULL);
BLI_ghash_remove(bvh->bm_vert_to_node, v, NULL, NULL);
/* Have to check each neighboring face's node */
BM_ITER_ELEM (f, &bm_iter, v, BM_FACES_OF_VERT) {
PBVHNode *f_node = pbvh_bmesh_node_lookup(bvh, bvh->bm_face_to_node, f);
- BLI_ghash_remove(f_node->bm_unique_verts, v, NULL, NULL);
- BLI_ghash_remove(f_node->bm_other_verts, v, NULL, NULL);
+ /* Remove current ownership */
+ /* Should be handled above by vert_to_node removal, leaving just in case - psy-fi */
+ //BLI_ghash_remove(f_node->bm_unique_verts, v, NULL, NULL);
+ BLI_gset_remove(f_node->bm_other_verts, v, NULL);
- BLI_assert(!BLI_ghash_haskey(f_node->bm_unique_verts, v));
- BLI_assert(!BLI_ghash_haskey(f_node->bm_other_verts, v));
+ BLI_assert(!BLI_gset_haskey(f_node->bm_unique_verts, v));
+ BLI_assert(!BLI_gset_haskey(f_node->bm_other_verts, v));
}
}
@@ -417,7 +428,7 @@ static void pbvh_bmesh_face_remove(PBVH *bvh, BMFace *f)
do {
v = l_iter->v;
if (pbvh_bmesh_node_vert_use_count(bvh, f_node, v) == 1) {
- if (BLI_ghash_haskey(f_node->bm_unique_verts, v)) {
+ if (BLI_gset_haskey(f_node->bm_unique_verts, v)) {
/* Find a different node that uses 'v' */
PBVHNode *new_node;
@@ -430,7 +441,7 @@ static void pbvh_bmesh_face_remove(PBVH *bvh, BMFace *f)
}
else {
/* Remove from other verts */
- BLI_ghash_remove(f_node->bm_other_verts, v, NULL, NULL);
+ BLI_gset_remove(f_node->bm_other_verts, v, NULL);
}
}
} while ((l_iter = l_iter->next) != l_first);
@@ -479,6 +490,13 @@ typedef struct {
float limit_len_squared;
} EdgeQueue;
+typedef struct {
+ EdgeQueue *q;
+ BLI_mempool *pool;
+ BMesh *bm;
+ int cd_vert_mask_offset;
+} EdgeQueueContext;
+
static int edge_queue_tri_in_sphere(const EdgeQueue *q, BMFace *f)
{
BMVert *v_tri[3];
@@ -494,74 +512,73 @@ static int edge_queue_tri_in_sphere(const EdgeQueue *q, BMFace *f)
return ((len_squared_v3v3(q->center, c) <= q->radius_squared));
}
-/* Return true if the vertex mask is less than 0.5, false otherwise */
-static int check_mask_half(BMesh *bm, BMVert *v)
+/* Return true if the vertex mask is less than 1.0, false otherwise */
+static bool check_mask(EdgeQueueContext *eq_ctx, BMVert *v)
{
- const float *mask;
-
- mask = CustomData_bmesh_get(&bm->vdata, v->head.data, CD_PAINT_MASK);
- return ((*mask) < 0.5f);
+ return (BM_ELEM_CD_GET_FLOAT(v, eq_ctx->cd_vert_mask_offset) < 1.0f);
}
-static void edge_queue_insert(EdgeQueue *q, BLI_mempool *pool, BMEdge *e,
- float priority, BMesh *bm)
+static void edge_queue_insert(EdgeQueueContext *eq_ctx, BMEdge *e,
+ float priority)
{
BMVert **pair;
- /* Don't let topology update affect masked vertices. Unlike with
- * displacements, can't do 50% topology update, so instead set
- * (arbitrary) cutoff: if both vertices' masks are less than 50%,
- * topology update can happen. */
- if (check_mask_half(bm, e->v1) && check_mask_half(bm, e->v2)) {
- pair = BLI_mempool_alloc(pool);
+ /* Don't let topology update affect fully masked vertices. This used to
+ * have a 50% mask cutoff, with the reasoning that you can't do a 50%
+ * topology update. But this gives an ugly border in the mesh. The mask
+ * should already make the brush move the vertices only 50%, which means
+ * that topology updates will also happen less frequent, that should be
+ * enough. */
+ if (check_mask(eq_ctx, e->v1) || check_mask(eq_ctx, e->v2)) {
+ pair = BLI_mempool_alloc(eq_ctx->pool);
pair[0] = e->v1;
pair[1] = e->v2;
- BLI_heap_insert(q->heap, priority, pair);
+ BLI_heap_insert(eq_ctx->q->heap, priority, pair);
}
}
-static void long_edge_queue_edge_add(EdgeQueue *q, BLI_mempool *pool,
- BMEdge *e, BMesh *bm)
+static void long_edge_queue_edge_add(EdgeQueueContext *eq_ctx,
+ BMEdge *e)
{
const float len_sq = BM_edge_calc_length_squared(e);
- if (len_sq > q->limit_len_squared)
- edge_queue_insert(q, pool, e, 1.0f / len_sq, bm);
+ if (len_sq > eq_ctx->q->limit_len_squared)
+ edge_queue_insert(eq_ctx, e, 1.0f / len_sq);
}
-static void short_edge_queue_edge_add(EdgeQueue *q, BLI_mempool *pool,
- BMEdge *e, BMesh *bm)
+static void short_edge_queue_edge_add(EdgeQueueContext *eq_ctx,
+ BMEdge *e)
{
const float len_sq = BM_edge_calc_length_squared(e);
- if (len_sq < q->limit_len_squared)
- edge_queue_insert(q, pool, e, len_sq, bm);
+ if (len_sq < eq_ctx->q->limit_len_squared)
+ edge_queue_insert(eq_ctx, e, len_sq);
}
-static void long_edge_queue_face_add(EdgeQueue *q, BLI_mempool *pool,
- BMFace *f, BMesh *bm)
+static void long_edge_queue_face_add(EdgeQueueContext *eq_ctx,
+ BMFace *f)
{
- if (edge_queue_tri_in_sphere(q, f)) {
+ if (edge_queue_tri_in_sphere(eq_ctx->q, f)) {
BMLoop *l_iter;
BMLoop *l_first;
/* Check each edge of the face */
l_iter = l_first = BM_FACE_FIRST_LOOP(f);
do {
- long_edge_queue_edge_add(q, pool, l_iter->e, bm);
+ long_edge_queue_edge_add(eq_ctx, l_iter->e);
} while ((l_iter = l_iter->next) != l_first);
}
}
-static void short_edge_queue_face_add(EdgeQueue *q, BLI_mempool *pool,
- BMFace *f, BMesh *bm)
+static void short_edge_queue_face_add(EdgeQueueContext *eq_ctx,
+ BMFace *f)
{
- if (edge_queue_tri_in_sphere(q, f)) {
+ if (edge_queue_tri_in_sphere(eq_ctx->q, f)) {
BMLoop *l_iter;
BMLoop *l_first;
/* Check each edge of the face */
l_iter = l_first = BM_FACE_FIRST_LOOP(f);
do {
- short_edge_queue_edge_add(q, pool, l_iter->e, bm);
+ short_edge_queue_edge_add(eq_ctx, l_iter->e);
} while ((l_iter = l_iter->next) != l_first);
}
}
@@ -575,16 +592,16 @@ static void short_edge_queue_face_add(EdgeQueue *q, BLI_mempool *pool,
*
* The highest priority (lowest number) is given to the longest edge.
*/
-static void long_edge_queue_create(EdgeQueue *q, BLI_mempool *pool,
+static void long_edge_queue_create(EdgeQueueContext *eq_ctx,
PBVH *bvh, const float center[3],
float radius)
{
int n;
- q->heap = BLI_heap_new();
- q->center = center;
- q->radius_squared = radius * radius;
- q->limit_len_squared = bvh->bm_max_edge_len * bvh->bm_max_edge_len;
+ eq_ctx->q->heap = BLI_heap_new();
+ eq_ctx->q->center = center;
+ eq_ctx->q->radius_squared = radius * radius;
+ eq_ctx->q->limit_len_squared = bvh->bm_max_edge_len * bvh->bm_max_edge_len;
for (n = 0; n < bvh->totnode; n++) {
PBVHNode *node = &bvh->nodes[n];
@@ -599,7 +616,7 @@ static void long_edge_queue_create(EdgeQueue *q, BLI_mempool *pool,
GHASH_ITER (gh_iter, node->bm_faces) {
BMFace *f = BLI_ghashIterator_getKey(&gh_iter);
- long_edge_queue_face_add(q, pool, f, bvh->bm);
+ long_edge_queue_face_add(eq_ctx, f);
}
}
}
@@ -614,16 +631,16 @@ static void long_edge_queue_create(EdgeQueue *q, BLI_mempool *pool,
*
* The highest priority (lowest number) is given to the shortest edge.
*/
-static void short_edge_queue_create(EdgeQueue *q, BLI_mempool *pool,
+static void short_edge_queue_create(EdgeQueueContext *eq_ctx,
PBVH *bvh, const float center[3],
float radius)
{
int n;
- q->heap = BLI_heap_new();
- q->center = center;
- q->radius_squared = radius * radius;
- q->limit_len_squared = bvh->bm_min_edge_len * bvh->bm_min_edge_len;
+ eq_ctx->q->heap = BLI_heap_new();
+ eq_ctx->q->center = center;
+ eq_ctx->q->radius_squared = radius * radius;
+ eq_ctx->q->limit_len_squared = bvh->bm_min_edge_len * bvh->bm_min_edge_len;
for (n = 0; n < bvh->totnode; n++) {
PBVHNode *node = &bvh->nodes[n];
@@ -638,7 +655,7 @@ static void short_edge_queue_create(EdgeQueue *q, BLI_mempool *pool,
GHASH_ITER (gh_iter, node->bm_faces) {
BMFace *f = BLI_ghashIterator_getKey(&gh_iter);
- short_edge_queue_face_add(q, pool, f, bvh->bm);
+ short_edge_queue_face_add(eq_ctx, f);
}
}
}
@@ -653,12 +670,13 @@ static void bm_edges_from_tri(BMesh *bm, BMVert *v_tri[3], BMEdge *e_tri[3])
e_tri[2] = BM_edge_create(bm, v_tri[2], v_tri[0], NULL, BM_CREATE_NO_DOUBLE);
}
-static void pbvh_bmesh_split_edge(PBVH *bvh, EdgeQueue *q, BLI_mempool *pool,
+static void pbvh_bmesh_split_edge(EdgeQueueContext *eq_ctx, PBVH *bvh,
BMEdge *e, BLI_Buffer *edge_loops)
{
BMVert *v_new;
float mid[3];
int i, node_index;
+ const int cd_vert_mask_offset = CustomData_get_offset(&bvh->bm->vdata, CD_PAINT_MASK);
/* Get all faces adjacent to the edge */
pbvh_bmesh_edge_loops(edge_loops, e);
@@ -670,6 +688,15 @@ static void pbvh_bmesh_split_edge(PBVH *bvh, EdgeQueue *q, BLI_mempool *pool,
e->v1));
v_new = pbvh_bmesh_vert_create(bvh, node_index, mid, e->v1);
+ /* update paint mask */
+ if (cd_vert_mask_offset != -1) {
+ float mask_v1 = BM_ELEM_CD_GET_FLOAT(e->v1, cd_vert_mask_offset);
+ float mask_v2 = BM_ELEM_CD_GET_FLOAT(e->v2, cd_vert_mask_offset);
+ float mask_v_new = 0.5f * (mask_v1 + mask_v2);
+
+ BM_ELEM_CD_SET_FLOAT(v_new, cd_vert_mask_offset, mask_v_new);
+ }
+
/* For each face, add two new triangles and delete the original */
for (i = 0; i < edge_loops->count; i++) {
BMLoop *l_adj = BLI_buffer_at(edge_loops, BMLoop *, i);
@@ -686,7 +713,7 @@ static void pbvh_bmesh_split_edge(PBVH *bvh, EdgeQueue *q, BLI_mempool *pool,
ni = GET_INT_FROM_POINTER(nip);
/* Ensure node gets redrawn */
- bvh->nodes[ni].flag |= PBVH_UpdateDrawBuffers;
+ bvh->nodes[ni].flag |= PBVH_UpdateDrawBuffers | PBVH_UpdateNormals;
/* Find the vertex not in the edge */
v_opp = l_adj->prev->v;
@@ -706,7 +733,7 @@ static void pbvh_bmesh_split_edge(PBVH *bvh, EdgeQueue *q, BLI_mempool *pool,
v_tri[2] = v_opp;
bm_edges_from_tri(bvh->bm, v_tri, e_tri);
f_new = pbvh_bmesh_face_create(bvh, ni, v_tri, e_tri, f_adj);
- long_edge_queue_face_add(q, pool, f_new, bvh->bm);
+ long_edge_queue_face_add(eq_ctx, f_new);
v_tri[0] = v_new;
v_tri[1] = v2;
@@ -715,17 +742,17 @@ static void pbvh_bmesh_split_edge(PBVH *bvh, EdgeQueue *q, BLI_mempool *pool,
e_tri[2] = e_tri[1]; /* switched */
e_tri[1] = BM_edge_create(bvh->bm, v_tri[1], v_tri[2], NULL, BM_CREATE_NO_DOUBLE);
f_new = pbvh_bmesh_face_create(bvh, ni, v_tri, e_tri, f_adj);
- long_edge_queue_face_add(q, pool, f_new, bvh->bm);
+ long_edge_queue_face_add(eq_ctx, f_new);
/* Delete original */
pbvh_bmesh_face_remove(bvh, f_adj);
BM_face_kill(bvh->bm, f_adj);
/* Ensure new vertex is in the node */
- if (!BLI_ghash_haskey(bvh->nodes[ni].bm_unique_verts, v_new) &&
- !BLI_ghash_haskey(bvh->nodes[ni].bm_other_verts, v_new))
+ if (!BLI_gset_haskey(bvh->nodes[ni].bm_unique_verts, v_new) &&
+ !BLI_gset_haskey(bvh->nodes[ni].bm_other_verts, v_new))
{
- BLI_ghash_insert(bvh->nodes[ni].bm_other_verts, v_new, NULL);
+ BLI_gset_insert(bvh->nodes[ni].bm_other_verts, v_new);
}
if (BM_vert_edge_count(v_opp) >= 9) {
@@ -733,7 +760,7 @@ static void pbvh_bmesh_split_edge(PBVH *bvh, EdgeQueue *q, BLI_mempool *pool,
BMEdge *e2;
BM_ITER_ELEM (e2, &bm_iter, v_opp, BM_EDGES_OF_VERT) {
- long_edge_queue_edge_add(q, pool, e2, bvh->bm);
+ long_edge_queue_edge_add(eq_ctx, e2);
}
}
}
@@ -741,23 +768,22 @@ static void pbvh_bmesh_split_edge(PBVH *bvh, EdgeQueue *q, BLI_mempool *pool,
BM_edge_kill(bvh->bm, e);
}
-static int pbvh_bmesh_subdivide_long_edges(PBVH *bvh, EdgeQueue *q,
- BLI_mempool *pool,
+static int pbvh_bmesh_subdivide_long_edges(EdgeQueueContext *eq_ctx, PBVH *bvh,
BLI_Buffer *edge_loops)
{
int any_subdivided = FALSE;
- while (!BLI_heap_is_empty(q->heap)) {
- BMVert **pair = BLI_heap_popmin(q->heap);
+ while (!BLI_heap_is_empty(eq_ctx->q->heap)) {
+ BMVert **pair = BLI_heap_popmin(eq_ctx->q->heap);
BMEdge *e;
/* Check that the edge still exists */
if (!(e = BM_edge_exists(pair[0], pair[1]))) {
- BLI_mempool_free(pool, pair);
+ BLI_mempool_free(eq_ctx->pool, pair);
continue;
}
- BLI_mempool_free(pool, pair);
+ BLI_mempool_free(eq_ctx->pool, pair);
pair = NULL;
/* Check that the edge's vertices are still in the PBVH. It's
@@ -770,12 +796,12 @@ static int pbvh_bmesh_subdivide_long_edges(PBVH *bvh, EdgeQueue *q,
continue;
}
- if (BM_edge_calc_length_squared(e) <= q->limit_len_squared)
+ if (BM_edge_calc_length_squared(e) <= eq_ctx->q->limit_len_squared)
continue;
any_subdivided = TRUE;
- pbvh_bmesh_split_edge(bvh, q, pool, e, edge_loops);
+ pbvh_bmesh_split_edge(eq_ctx, bvh, e, edge_loops);
}
return any_subdivided;
@@ -846,10 +872,10 @@ static void pbvh_bmesh_collapse_edge(PBVH *bvh, BMEdge *e, BMVert *v1,
pbvh_bmesh_face_create(bvh, ni, v_tri, e_tri, f);
/* Ensure that v1 is in the new face's node */
- if (!BLI_ghash_haskey(n->bm_unique_verts, v1) &&
- !BLI_ghash_haskey(n->bm_other_verts, v1))
+ if (!BLI_gset_haskey(n->bm_unique_verts, v1) &&
+ !BLI_gset_haskey(n->bm_other_verts, v1))
{
- BLI_ghash_insert(n->bm_other_verts, v1, NULL);
+ BLI_gset_insert(n->bm_other_verts, v1);
}
}
@@ -917,8 +943,8 @@ static void pbvh_bmesh_collapse_edge(PBVH *bvh, BMEdge *e, BMVert *v1,
BM_vert_kill(bvh->bm, v2);
}
-static int pbvh_bmesh_collapse_short_edges(PBVH *bvh, EdgeQueue *q,
- BLI_mempool *pool,
+static int pbvh_bmesh_collapse_short_edges(EdgeQueueContext *eq_ctx,
+ PBVH *bvh,
BLI_Buffer *edge_loops,
BLI_Buffer *deleted_faces)
{
@@ -928,14 +954,14 @@ static int pbvh_bmesh_collapse_short_edges(PBVH *bvh, EdgeQueue *q,
deleted_verts = BLI_ghash_ptr_new("deleted_verts");
- while (!BLI_heap_is_empty(q->heap)) {
- BMVert **pair = BLI_heap_popmin(q->heap);
+ while (!BLI_heap_is_empty(eq_ctx->q->heap)) {
+ BMVert **pair = BLI_heap_popmin(eq_ctx->q->heap);
BMEdge *e;
BMVert *v1, *v2;
v1 = pair[0];
v2 = pair[1];
- BLI_mempool_free(pool, pair);
+ BLI_mempool_free(eq_ctx->pool, pair);
pair = NULL;
/* Check that the vertices/edge still exist */
@@ -1012,19 +1038,29 @@ int pbvh_bmesh_node_raycast(PBVHNode *node, const float ray_start[3],
return hit;
}
+
void pbvh_bmesh_normals_update(PBVHNode **nodes, int totnode)
{
int n;
for (n = 0; n < totnode; n++) {
PBVHNode *node = nodes[n];
- GHashIterator gh_iter;
- GHASH_ITER (gh_iter, node->bm_faces) {
- BM_face_normal_update(BLI_ghashIterator_getKey(&gh_iter));
- }
- GHASH_ITER (gh_iter, node->bm_unique_verts) {
- BM_vert_normal_update(BLI_ghashIterator_getKey(&gh_iter));
+ if (node->flag & PBVH_UpdateNormals) {
+ GHashIterator gh_iter;
+ GSetIterator gs_iter;
+
+ GHASH_ITER (gh_iter, node->bm_faces) {
+ BM_face_normal_update(BLI_ghashIterator_getKey(&gh_iter));
+ }
+ GSET_ITER (gs_iter, node->bm_unique_verts) {
+ BM_vert_normal_update(BLI_gsetIterator_getKey(&gs_iter));
+ }
+ /* This should be unneeded normally */
+ GSET_ITER (gs_iter, node->bm_other_verts) {
+ BM_vert_normal_update(BLI_gsetIterator_getKey(&gs_iter));
+ }
+ node->flag &= ~PBVH_UpdateNormals;
}
}
}
@@ -1059,7 +1095,7 @@ void BKE_pbvh_build_bmesh(PBVH *bvh, BMesh *bm, int smooth_shading,
n = bvh->nodes = MEM_callocN(sizeof(PBVHNode), "PBVHNode");
bvh->totnode = 1;
n->flag = PBVH_Leaf;
- n->bm_faces = BLI_ghash_ptr_new("bm_faces");
+ n->bm_faces = BLI_ghash_ptr_new_ex("bm_faces", bvh->bm->totface);
BM_ITER_MESH (f, &iter, bvh->bm, BM_FACES_OF_MESH) {
BLI_ghash_insert(n->bm_faces, f, NULL);
}
@@ -1077,16 +1113,19 @@ int BKE_pbvh_bmesh_update_topology(PBVH *bvh, PBVHTopologyUpdateMode mode,
/* 2 is enough for edge faces - manifold edge */
BLI_buffer_declare_static(BMFace *, edge_loops, BLI_BUFFER_NOP, 2);
BLI_buffer_declare_static(BMFace *, deleted_faces, BLI_BUFFER_NOP, 32);
+ const int cd_vert_mask_offset = CustomData_get_offset(&bvh->bm->vdata, CD_PAINT_MASK);
int modified = FALSE;
int n;
if (mode & PBVH_Collapse) {
EdgeQueue q;
- BLI_mempool *queue_pool = BLI_mempool_create(sizeof(BMVert) * 2,
+ BLI_mempool *queue_pool = BLI_mempool_create(sizeof(BMVert *[2]),
128, 128, 0);
- short_edge_queue_create(&q, queue_pool, bvh, center, radius);
- pbvh_bmesh_collapse_short_edges(bvh, &q, queue_pool, &edge_loops,
+ EdgeQueueContext eq_ctx = {&q, queue_pool, bvh->bm, cd_vert_mask_offset};
+
+ short_edge_queue_create(&eq_ctx, bvh, center, radius);
+ pbvh_bmesh_collapse_short_edges(&eq_ctx, bvh, &edge_loops,
&deleted_faces);
BLI_heap_free(q.heap, NULL);
BLI_mempool_destroy(queue_pool);
@@ -1094,10 +1133,12 @@ int BKE_pbvh_bmesh_update_topology(PBVH *bvh, PBVHTopologyUpdateMode mode,
if (mode & PBVH_Subdivide) {
EdgeQueue q;
- BLI_mempool *queue_pool = BLI_mempool_create(sizeof(BMVert) * 2,
+ BLI_mempool *queue_pool = BLI_mempool_create(sizeof(BMVert *[2]),
128, 128, 0);
- long_edge_queue_create(&q, queue_pool, bvh, center, radius);
- pbvh_bmesh_subdivide_long_edges(bvh, &q, queue_pool, &edge_loops);
+ EdgeQueueContext eq_ctx = {&q, queue_pool, bvh->bm, cd_vert_mask_offset};
+
+ long_edge_queue_create(&eq_ctx, bvh, center, radius);
+ pbvh_bmesh_subdivide_long_edges(&eq_ctx, bvh, &edge_loops);
BLI_heap_free(q.heap, NULL);
BLI_mempool_destroy(queue_pool);
}
@@ -1136,14 +1177,15 @@ BLI_INLINE void bm_face_as_array_index_tri(BMFace *f, int r_index[3])
void BKE_pbvh_bmesh_node_save_orig(PBVHNode *node)
{
GHashIterator gh_iter;
+ GSetIterator gs_iter;
int i, totvert, tottri;
/* Skip if original coords/triangles are already saved */
if (node->bm_orco)
return;
- totvert = (BLI_ghash_size(node->bm_unique_verts) +
- BLI_ghash_size(node->bm_other_verts));
+ totvert = (BLI_gset_size(node->bm_unique_verts) +
+ BLI_gset_size(node->bm_other_verts));
tottri = BLI_ghash_size(node->bm_faces);
@@ -1152,14 +1194,14 @@ void BKE_pbvh_bmesh_node_save_orig(PBVHNode *node)
/* Copy out the vertices and assign a temporary index */
i = 0;
- GHASH_ITER (gh_iter, node->bm_unique_verts) {
- BMVert *v = BLI_ghashIterator_getKey(&gh_iter);
+ GSET_ITER (gs_iter, node->bm_unique_verts) {
+ BMVert *v = BLI_gsetIterator_getKey(&gs_iter);
copy_v3_v3(node->bm_orco[i], v->co);
BM_elem_index_set(v, i); /* set_dirty! */
i++;
}
- GHASH_ITER (gh_iter, node->bm_other_verts) {
- BMVert *v = BLI_ghashIterator_getKey(&gh_iter);
+ GSET_ITER (gs_iter, node->bm_other_verts) {
+ BMVert *v = BLI_gsetIterator_getKey(&gs_iter);
copy_v3_v3(node->bm_orco[i], v->co);
BM_elem_index_set(v, i); /* set_dirty! */
i++;
@@ -1216,12 +1258,12 @@ void BKE_pbvh_node_mark_topology_update(PBVHNode *node)
node->flag |= PBVH_UpdateTopology;
}
-GHash *BKE_pbvh_bmesh_node_unique_verts(PBVHNode *node)
+GSet *BKE_pbvh_bmesh_node_unique_verts(PBVHNode *node)
{
return node->bm_unique_verts;
}
-GHash *BKE_pbvh_bmesh_node_other_verts(PBVHNode *node)
+GSet *BKE_pbvh_bmesh_node_other_verts(PBVHNode *node)
{
return node->bm_other_verts;
}
@@ -1250,6 +1292,27 @@ void bli_ghash_duplicate_key_check(GHash *gh)
}
}
+void bli_gset_duplicate_key_check(GSet *gs)
+{
+ GSetIterator gs_iter1, gs_iter2;
+
+ GSET_ITER (gs_iter1, gs) {
+ void *key1 = BLI_gsetIterator_getKey(&gs_iter1);
+ int dup = -1;
+
+ GSET_ITER (gs_iter2, gs) {
+ void *key2 = BLI_gsetIterator_getKey(&gs_iter2);
+
+ if (key1 == key2) {
+ dup++;
+ if (dup > 0) {
+ BLI_assert(!"duplicate in hash");
+ }
+ }
+ }
+ }
+}
+
void bmesh_print(BMesh *bm)
{
BMIter iter, siter;
@@ -1264,14 +1327,14 @@ void bmesh_print(BMesh *bm)
bm->totloop, bm->totface);
fprintf(stderr, "vertices:\n");
- BM_ITER_MESH(v, &iter, bm, BM_VERTS_OF_MESH) {
+ BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) {
fprintf(stderr, " %d co=(%.3f %.3f %.3f) oflag=%x\n",
BM_elem_index_get(v), v->co[0], v->co[1], v->co[2],
v->oflags[bm->stackdepth - 1].f);
}
fprintf(stderr, "edges:\n");
- BM_ITER_MESH(e, &iter, bm, BM_EDGES_OF_MESH) {
+ BM_ITER_MESH (e, &iter, bm, BM_EDGES_OF_MESH) {
fprintf(stderr, " %d v1=%d, v2=%d, oflag=%x\n",
BM_elem_index_get(e),
BM_elem_index_get(e->v1),
@@ -1280,7 +1343,7 @@ void bmesh_print(BMesh *bm)
}
fprintf(stderr, "faces:\n");
- BM_ITER_MESH(f, &iter, bm, BM_FACES_OF_MESH) {
+ BM_ITER_MESH (f, &iter, bm, BM_FACES_OF_MESH) {
fprintf(stderr, " %d len=%d, oflag=%x\n",
BM_elem_index_get(f), f->len,
f->oflags[bm->stackdepth - 1].f);
@@ -1311,6 +1374,7 @@ void bmesh_print(BMesh *bm)
void pbvh_bmesh_print(PBVH *bvh)
{
GHashIterator gh_iter;
+ GSetIterator gs_iter;
int n;
fprintf(stderr, "\npbvh=%p\n", bvh);
@@ -1338,13 +1402,13 @@ void pbvh_bmesh_print(PBVH *bvh)
fprintf(stderr, " %d\n",
BM_elem_index_get((BMFace *)BLI_ghashIterator_getKey(&gh_iter)));
fprintf(stderr, " unique verts:\n");
- GHASH_ITER (gh_iter, node->bm_unique_verts)
+ GSET_ITER (gs_iter, node->bm_unique_verts)
fprintf(stderr, " %d\n",
- BM_elem_index_get((BMVert *)BLI_ghashIterator_getKey(&gh_iter)));
+ BM_elem_index_get((BMVert *)BLI_gsetIterator_getKey(&gs_iter)));
fprintf(stderr, " other verts:\n");
- GHASH_ITER (gh_iter, node->bm_other_verts)
+ GSET_ITER (gs_iter, node->bm_other_verts)
fprintf(stderr, " %d\n",
- BM_elem_index_get((BMVert *)BLI_ghashIterator_getKey(&gh_iter)));
+ BM_elem_index_get((BMVert *)BLI_gsetIterator_getKey(&gs_iter)));
}
}
@@ -1362,7 +1426,10 @@ void print_flag_factors(int flag)
void pbvh_bmesh_verify(PBVH *bvh)
{
GHashIterator gh_iter;
- int i;
+ GSetIterator gs_iter;
+ int i, vert_count = 0;
+ BMIter iter;
+ BMVert *vi;
/* Check faces */
BLI_assert(bvh->bm->totface == BLI_ghash_size(bvh->bm_face_to_node));
@@ -1385,17 +1452,17 @@ void pbvh_bmesh_verify(PBVH *bvh)
PBVHNode *nv;
/* Check that the vertex is in the node */
- BLI_assert(BLI_ghash_haskey(n->bm_unique_verts, v) ^
- BLI_ghash_haskey(n->bm_other_verts, v));
+ BLI_assert(BLI_gset_haskey(n->bm_unique_verts, v) ^
+ BLI_gset_haskey(n->bm_other_verts, v));
/* Check that the vertex has a node owner */
nv = pbvh_bmesh_node_lookup(bvh, bvh->bm_vert_to_node, v);
/* Check that the vertex's node knows it owns the vert */
- BLI_assert(BLI_ghash_haskey(nv->bm_unique_verts, v));
+ BLI_assert(BLI_gset_haskey(nv->bm_unique_verts, v));
/* Check that the vertex isn't duplicated as an 'other' vert */
- BLI_assert(!BLI_ghash_haskey(nv->bm_other_verts, v));
+ BLI_assert(!BLI_gset_haskey(nv->bm_other_verts, v));
}
}
@@ -1414,10 +1481,10 @@ void pbvh_bmesh_verify(PBVH *bvh)
BLI_assert(n->flag & PBVH_Leaf);
/* Check that the vert's node knows it owns the vert */
- BLI_assert(BLI_ghash_haskey(n->bm_unique_verts, v));
+ BLI_assert(BLI_gset_haskey(n->bm_unique_verts, v));
/* Check that the vertex isn't duplicated as an 'other' vert */
- BLI_assert(!BLI_ghash_haskey(n->bm_other_verts, v));
+ BLI_assert(!BLI_gset_haskey(n->bm_other_verts, v));
/* Check that the vert's node also contains one of the vert's
* adjacent faces */
@@ -1428,8 +1495,37 @@ void pbvh_bmesh_verify(PBVH *bvh)
}
}
BLI_assert(found);
+
+ #if 1
+ /* total freak stuff, check if node exists somewhere else */
+ /* Slow */
+ for (i = 0; i < bvh->totnode; i++) {
+ PBVHNode *n = &bvh->nodes[i];
+ if (i != ni && n->bm_unique_verts)
+ BLI_assert(!BLI_gset_haskey(n->bm_unique_verts, v));
+ }
+
+ #endif
}
+ #if 0
+ /* check that every vert belongs somewhere */
+ /* Slow */
+ BM_ITER_MESH (vi, &iter, bvh->bm, BM_VERTS_OF_MESH) {
+ bool has_unique = false;
+ for (i = 0; i < bvh->totnode; i++) {
+ PBVHNode *n = &bvh->nodes[i];
+ if ((n->bm_unique_verts != NULL) && BLI_gset_haskey(n->bm_unique_verts, vi))
+ has_unique = true;
+ }
+ BLI_assert(has_unique);
+ vert_count++;
+ }
+
+ /* if totvert differs from number of verts inside the hash. hash-totvert is checked above */
+ BLI_assert(vert_count == bvh->bm->totvert);
+ #endif
+
/* Check that node elements are recorded in the top level */
for (i = 0; i < bvh->totnode; i++) {
PBVHNode *n = &bvh->nodes[i];
@@ -1438,8 +1534,8 @@ void pbvh_bmesh_verify(PBVH *bvh)
/* Slow */
#if 0
bli_ghash_duplicate_key_check(n->bm_faces);
- bli_ghash_duplicate_key_check(n->bm_unique_verts);
- bli_ghash_duplicate_key_check(n->bm_other_verts);
+ bli_gset_duplicate_key_check(n->bm_unique_verts);
+ bli_gset_duplicate_key_check(n->bm_other_verts);
#endif
GHASH_ITER (gh_iter, n->bm_faces) {
@@ -1449,16 +1545,16 @@ void pbvh_bmesh_verify(PBVH *bvh)
BLI_assert(GET_INT_FROM_POINTER(nip) == (n - bvh->nodes));
}
- GHASH_ITER (gh_iter, n->bm_unique_verts) {
- BMVert *v = BLI_ghashIterator_getKey(&gh_iter);
+ GSET_ITER (gs_iter, n->bm_unique_verts) {
+ BMVert *v = BLI_gsetIterator_getKey(&gs_iter);
void *nip = BLI_ghash_lookup(bvh->bm_vert_to_node, v);
BLI_assert(BLI_ghash_haskey(bvh->bm_vert_to_node, v));
- BLI_assert(!BLI_ghash_haskey(n->bm_other_verts, v));
+ BLI_assert(!BLI_gset_haskey(n->bm_other_verts, v));
BLI_assert(GET_INT_FROM_POINTER(nip) == (n - bvh->nodes));
}
- GHASH_ITER (gh_iter, n->bm_other_verts) {
- BMVert *v = BLI_ghashIterator_getKey(&gh_iter);
+ GSET_ITER (gs_iter, n->bm_other_verts) {
+ BMVert *v = BLI_gsetIterator_getKey(&gs_iter);
BLI_assert(BLI_ghash_haskey(bvh->bm_vert_to_node, v));
BLI_assert(BM_vert_face_count(v) > 0);
}
diff --git a/source/blender/blenkernel/intern/pbvh_intern.h b/source/blender/blenkernel/intern/pbvh_intern.h
index 4154b8e4799..89bfbc252a8 100644
--- a/source/blender/blenkernel/intern/pbvh_intern.h
+++ b/source/blender/blenkernel/intern/pbvh_intern.h
@@ -21,6 +21,10 @@
#ifndef __PBVH_INTERN_H__
#define __PBVH_INTERN_H__
+/** \file blender/blenkernel/intern/pbvh_intern.h
+ * \ingroup bli
+ */
+
/* Axis-aligned bounding box */
typedef struct {
float bmin[3], bmax[3];
@@ -101,8 +105,8 @@ struct PBVHNode {
/* Dyntopo */
GHash *bm_faces;
- GHash *bm_unique_verts;
- GHash *bm_other_verts;
+ GSet *bm_unique_verts;
+ GSet *bm_other_verts;
float (*bm_orco)[3];
int (*bm_ortri)[3];
int bm_tot_ortri;
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index 93f6965e97b..9891a8cde28 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -66,6 +66,7 @@
#include "BKE_global.h"
#include "BKE_library.h"
#include "BKE_main.h"
+#include "BKE_modifier.h"
#include "BKE_object.h"
#include "BKE_particle.h"
#include "BKE_pointcache.h"
@@ -227,6 +228,11 @@ static int ptcache_softbody_totpoint(void *soft_v, int UNUSED(cfra))
SoftBody *soft= soft_v;
return soft->totpoint;
}
+static void ptcache_softbody_error(void *UNUSED(soft_v), const char *UNUSED(message))
+{
+ /* ignored for now */
+}
+
/* Particle functions */
void BKE_ptcache_make_particle_key(ParticleKey *key, int index, void **data, float time)
{
@@ -405,6 +411,12 @@ static int ptcache_particle_totpoint(void *psys_v, int UNUSED(cfra))
ParticleSystem *psys = psys_v;
return psys->totpart;
}
+
+static void ptcache_particle_error(void *UNUSED(psys_v), const char *UNUSED(message))
+{
+ /* ignored for now */
+}
+
static int ptcache_particle_totwrite(void *psys_v, int cfra)
{
ParticleSystem *psys = psys_v;
@@ -534,6 +546,12 @@ static int ptcache_cloth_totpoint(void *cloth_v, int UNUSED(cfra))
return clmd->clothObject ? clmd->clothObject->numverts : 0;
}
+static void ptcache_cloth_error(void *cloth_v, const char *message)
+{
+ ClothModifierData *clmd= cloth_v;
+ modifier_setError(&clmd->modifier, "%s", message);
+}
+
#ifdef WITH_SMOKE
/* Smoke functions */
static int ptcache_smoke_totpoint(void *smoke_v, int UNUSED(cfra))
@@ -548,6 +566,12 @@ static int ptcache_smoke_totpoint(void *smoke_v, int UNUSED(cfra))
return 0;
}
+static void ptcache_smoke_error(void *smoke_v, const char *message)
+{
+ SmokeModifierData *smd= (SmokeModifierData *)smoke_v;
+ modifier_setError(&smd->modifier, "%s", message);
+}
+
#define SMOKE_CACHE_VERSION "1.04"
static int ptcache_smoke_write(PTCacheFile *pf, void *smoke_v)
@@ -865,8 +889,10 @@ static int ptcache_smoke_read(PTCacheFile *pf, void *smoke_v)
return 1;
}
+
#else // WITH_SMOKE
static int ptcache_smoke_totpoint(void *UNUSED(smoke_v), int UNUSED(cfra)) { return 0; }
+static void ptcache_smoke_error(void *UNUSED(smoke_v), const char *UNUSED(message)) { }
static int ptcache_smoke_read(PTCacheFile *UNUSED(pf), void *UNUSED(smoke_v)) { return 0; }
static int ptcache_smoke_write(PTCacheFile *UNUSED(pf), void *UNUSED(smoke_v)) { return 0; }
#endif // WITH_SMOKE
@@ -879,6 +905,11 @@ static int ptcache_dynamicpaint_totpoint(void *sd, int UNUSED(cfra))
else return surface->data->total_points;
}
+static void ptcache_dynamicpaint_error(void *UNUSED(sd), const char *UNUSED(message))
+{
+ /* ignored for now */
+}
+
#define DPAINT_CACHE_VERSION "1.01"
static int ptcache_dynamicpaint_write(PTCacheFile *pf, void *dp_v)
@@ -1055,6 +1086,11 @@ static int ptcache_rigidbody_totpoint(void *rb_v, int UNUSED(cfra))
return rbw->numbodies;
}
+static void ptcache_rigidbody_error(void *UNUSED(rb_v), const char *UNUSED(message))
+{
+ /* ignored for now */
+}
+
/* Creating ID's */
void BKE_ptcache_id_from_softbody(PTCacheID *pid, Object *ob, SoftBody *sb)
{
@@ -1067,6 +1103,7 @@ void BKE_ptcache_id_from_softbody(PTCacheID *pid, Object *ob, SoftBody *sb)
pid->cache_ptr= &sb->pointcache;
pid->ptcaches= &sb->ptcaches;
pid->totpoint= pid->totwrite= ptcache_softbody_totpoint;
+ pid->error = ptcache_softbody_error;
pid->write_point = ptcache_softbody_write;
pid->read_point = ptcache_softbody_read;
@@ -1107,6 +1144,7 @@ void BKE_ptcache_id_from_particles(PTCacheID *pid, Object *ob, ParticleSystem *p
pid->totpoint = ptcache_particle_totpoint;
pid->totwrite = ptcache_particle_totwrite;
+ pid->error = ptcache_particle_error;
pid->write_point = ptcache_particle_write;
pid->read_point = ptcache_particle_read;
@@ -1159,6 +1197,7 @@ void BKE_ptcache_id_from_cloth(PTCacheID *pid, Object *ob, ClothModifierData *cl
pid->cache_ptr= &clmd->point_cache;
pid->ptcaches= &clmd->ptcaches;
pid->totpoint= pid->totwrite= ptcache_cloth_totpoint;
+ pid->error = ptcache_cloth_error;
pid->write_point = ptcache_cloth_write;
pid->read_point = ptcache_cloth_read;
@@ -1197,6 +1236,7 @@ void BKE_ptcache_id_from_smoke(PTCacheID *pid, struct Object *ob, struct SmokeMo
pid->ptcaches= &(sds->ptcaches[0]);
pid->totpoint= pid->totwrite= ptcache_smoke_totpoint;
+ pid->error = ptcache_smoke_error;
pid->write_point = NULL;
pid->read_point = NULL;
@@ -1236,6 +1276,7 @@ void BKE_ptcache_id_from_dynamicpaint(PTCacheID *pid, Object *ob, DynamicPaintSu
pid->cache_ptr= &surface->pointcache;
pid->ptcaches= &surface->ptcaches;
pid->totpoint= pid->totwrite= ptcache_dynamicpaint_totpoint;
+ pid->error = ptcache_dynamicpaint_error;
pid->write_point = NULL;
pid->read_point = NULL;
@@ -1272,6 +1313,7 @@ void BKE_ptcache_id_from_rigidbody(PTCacheID *pid, Object *ob, RigidBodyWorld *r
pid->cache_ptr= &rbw->pointcache;
pid->ptcaches= &rbw->ptcaches;
pid->totpoint= pid->totwrite= ptcache_rigidbody_totpoint;
+ pid->error = ptcache_rigidbody_error;
pid->write_point = ptcache_rigidbody_write;
pid->read_point = ptcache_rigidbody_read;
@@ -2083,21 +2125,31 @@ static int ptcache_read_stream(PTCacheID *pid, int cfra)
return 0;
}
- if (!ptcache_file_header_begin_read(pf))
+ if (!ptcache_file_header_begin_read(pf)) {
+ pid->error(pid->calldata, "Failed to read point cache file");
error = 1;
-
- if (!error && (pf->type != pid->type || !pid->read_header(pf)))
+ }
+ else if (pf->type != pid->type) {
+ pid->error(pid->calldata, "Point cache file has wrong type");
error = 1;
-
- if (!error && pf->totpoint != pid->totpoint(pid->calldata, cfra))
+ }
+ else if (!pid->read_header(pf)) {
+ pid->error(pid->calldata, "Failed to read point cache file header");
+ error = 1;
+ }
+ else if (pf->totpoint != pid->totpoint(pid->calldata, cfra)) {
+ pid->error(pid->calldata, "Number of points in cache does not match mesh");
error = 1;
+ }
if (!error) {
ptcache_file_pointers_init(pf);
// we have stream reading here
- if (!pid->read_stream(pf, pid->calldata))
+ if (!pid->read_stream(pf, pid->calldata)) {
+ pid->error(pid->calldata, "Failed to read point cache file data");
error = 1;
+ }
}
ptcache_file_close(pf);
@@ -2125,8 +2177,14 @@ static int ptcache_read(PTCacheID *pid, int cfra)
if (pm) {
int totpoint = pm->totpoint;
- if ((pid->data_types & (1<<BPHYS_DATA_INDEX)) == 0)
- totpoint = MIN2(totpoint, pid->totpoint(pid->calldata, cfra));
+ if ((pid->data_types & (1<<BPHYS_DATA_INDEX)) == 0) {
+ int pid_totpoint = pid->totpoint(pid->calldata, cfra);
+
+ if (totpoint != pid_totpoint) {
+ pid->error(pid->calldata, "Number of points in cache does not match mesh");
+ totpoint = MIN2(totpoint, pid_totpoint);
+ }
+ }
BKE_ptcache_mem_pointers_init(pm);
@@ -2173,8 +2231,14 @@ static int ptcache_interpolate(PTCacheID *pid, float cfra, int cfra1, int cfra2)
if (pm) {
int totpoint = pm->totpoint;
- if ((pid->data_types & (1<<BPHYS_DATA_INDEX)) == 0)
- totpoint = MIN2(totpoint, pid->totpoint(pid->calldata, (int)cfra));
+ if ((pid->data_types & (1<<BPHYS_DATA_INDEX)) == 0) {
+ int pid_totpoint = pid->totpoint(pid->calldata, (int)cfra);
+
+ if (totpoint != pid_totpoint) {
+ pid->error(pid->calldata, "Number of points in cache does not match mesh");
+ totpoint = MIN2(totpoint, pid_totpoint);
+ }
+ }
BKE_ptcache_mem_pointers_init(pm);
@@ -2969,12 +3033,10 @@ void BKE_ptcache_free(PointCache *cache)
}
void BKE_ptcache_free_list(ListBase *ptcaches)
{
- PointCache *cache = ptcaches->first;
+ PointCache *cache;
- while (cache) {
- BLI_remlink(ptcaches, cache);
+ while ((cache = BLI_pophead(ptcaches))) {
BKE_ptcache_free(cache);
- cache = ptcaches->first;
}
}
diff --git a/source/blender/blenkernel/intern/property.c b/source/blender/blenkernel/intern/property.c
index 73f2a864e32..bb04d548a44 100644
--- a/source/blender/blenkernel/intern/property.c
+++ b/source/blender/blenkernel/intern/property.c
@@ -59,9 +59,8 @@ void BKE_bproperty_free(bProperty *prop)
void BKE_bproperty_free_list(ListBase *lb)
{
bProperty *prop;
-
- while ( (prop = lb->first) ) {
- BLI_remlink(lb, prop);
+
+ while ((prop = BLI_pophead(lb))) {
BKE_bproperty_free(prop);
}
}
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c
index f3276992381..42147be33e4 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -1166,7 +1166,7 @@ static void rigidbody_update_simulation_post_step(RigidBodyWorld *rbw)
if (ob) {
RigidBodyOb *rbo = ob->rigidbody_object;
/* reset kinematic state for transformed objects */
- if (ob->flag & SELECT && G.moving & G_TRANSFORM_OBJ) {
+ if (rbo && (ob->flag & SELECT) && (G.moving & G_TRANSFORM_OBJ)) {
RB_body_set_kinematic_state(rbo->physics_object, rbo->flag & RBO_FLAG_KINEMATIC || rbo->flag & RBO_FLAG_DISABLED);
RB_body_set_mass(rbo->physics_object, RBO_GET_MASS(rbo));
/* deactivate passive objects so they don't interfere with deactivation of active objects */
diff --git a/source/blender/blenkernel/intern/sca.c b/source/blender/blenkernel/intern/sca.c
index 92f57a54a01..7c374fd5d78 100644
--- a/source/blender/blenkernel/intern/sca.c
+++ b/source/blender/blenkernel/intern/sca.c
@@ -63,8 +63,7 @@ void free_sensors(ListBase *lb)
{
bSensor *sens;
- while ((sens= lb->first)) {
- BLI_remlink(lb, sens);
+ while ((sens = BLI_pophead(lb))) {
free_sensor(sens);
}
}
@@ -113,9 +112,6 @@ void init_sensor(bSensor *sens)
case SENS_ALWAYS:
sens->pulse = 0;
break;
- case SENS_TOUCH:
- sens->data= MEM_callocN(sizeof(bTouchSensor), "touchsens");
- break;
case SENS_NEAR:
ns=sens->data= MEM_callocN(sizeof(bNearSensor), "nearsens");
ns->dist= 1.0;
@@ -227,9 +223,9 @@ void free_controllers(ListBase *lb)
{
bController *cont;
- while ((cont= lb->first)) {
- BLI_remlink(lb, cont);
- if (cont->slinks) MEM_freeN(cont->slinks);
+ while ((cont = BLI_pophead(lb))) {
+ if (cont->slinks)
+ MEM_freeN(cont->slinks);
free_controller(cont);
}
}
@@ -346,8 +342,7 @@ void free_actuators(ListBase *lb)
{
bActuator *act;
- while ((act= lb->first)) {
- BLI_remlink(lb, act);
+ while ((act = BLI_pophead(lb))) {
free_actuator(act);
}
}
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 1874523dac9..d4618e28191 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -44,6 +44,7 @@
#include "DNA_anim_types.h"
#include "DNA_group_types.h"
+#include "DNA_linestyle_types.h"
#include "DNA_node_types.h"
#include "DNA_object_types.h"
#include "DNA_rigidbody_types.h"
@@ -156,6 +157,7 @@ Scene *BKE_scene_copy(Scene *sce, int type)
lb = scen->r.layers;
scen->r = sce->r;
scen->r.layers = lb;
+ scen->r.actlay = 0;
scen->unit = sce->unit;
scen->physics_settings = sce->physics_settings;
scen->gm = sce->gm;
@@ -429,7 +431,7 @@ Scene *BKE_scene_add(Main *bmain, const char *name)
sce->r.filtertype = R_FILTER_MITCH;
sce->r.size = 50;
- sce->r.im_format.planes = R_IMF_PLANES_RGB;
+ sce->r.im_format.planes = R_IMF_PLANES_RGBA;
sce->r.im_format.imtype = R_IMF_IMTYPE_PNG;
sce->r.im_format.depth = R_IMF_CHAN_DEPTH_8;
sce->r.im_format.quality = 90;
@@ -492,23 +494,10 @@ Scene *BKE_scene_add(Main *bmain, const char *name)
sce->r.border.ymax = 1.0f;
sce->toolsettings = MEM_callocN(sizeof(struct ToolSettings), "Tool Settings Struct");
- sce->toolsettings->cornertype = 1;
- sce->toolsettings->degr = 90;
- sce->toolsettings->step = 9;
- sce->toolsettings->turn = 1;
- sce->toolsettings->extr_offs = 1;
sce->toolsettings->doublimit = 0.001;
- sce->toolsettings->segments = 32;
- sce->toolsettings->rings = 32;
- sce->toolsettings->vertices = 32;
- sce->toolsettings->uvcalc_radius = 1.0f;
- sce->toolsettings->uvcalc_cubesize = 1.0f;
- sce->toolsettings->uvcalc_mapdir = 1;
- sce->toolsettings->uvcalc_mapalign = 1;
sce->toolsettings->uvcalc_margin = 0.001f;
sce->toolsettings->unwrapper = 1;
sce->toolsettings->select_thresh = 0.01f;
- sce->toolsettings->jointrilimit = 0.8f;
sce->toolsettings->selectmode = SCE_SELECT_VERTEX;
sce->toolsettings->uv_selectmode = UV_SELECT_VERTEX;
@@ -886,18 +875,35 @@ Object *BKE_scene_camera_switch_find(Scene *scene)
TimeMarker *m;
int cfra = scene->r.cfra;
int frame = -(MAXFRAME + 1);
+ int min_frame = MAXFRAME + 1;
Object *camera = NULL;
+ Object *first_camera = NULL;
for (m = scene->markers.first; m; m = m->next) {
- if (m->camera && (m->camera->restrictflag & OB_RESTRICT_RENDER) == 0 && (m->frame <= cfra) && (m->frame > frame)) {
- camera = m->camera;
- frame = m->frame;
+ if (m->camera && (m->camera->restrictflag & OB_RESTRICT_RENDER) == 0) {
+ if ((m->frame <= cfra) && (m->frame > frame)) {
+ camera = m->camera;
+ frame = m->frame;
- if (frame == cfra)
- break;
+ if (frame == cfra)
+ break;
+ }
+ if (m->frame < min_frame) {
+ first_camera = m->camera;
+ min_frame = m->frame;
+ }
}
}
+
+ if (camera == NULL) {
+ /* If there's no marker to the left of current frame,
+ * use camera from left-most marker to solve all sort
+ * of Schrodinger uncertainties.
+ */
+ return first_camera;
+ }
+
return camera;
}
#endif
@@ -1064,6 +1070,7 @@ void BKE_scene_frame_set(struct Scene *scene, double cfra)
*/
static void scene_update_drivers(Main *UNUSED(bmain), Scene *scene)
{
+ SceneRenderLayer *srl;
float ctime = BKE_scene_frame_get(scene);
/* scene itself */
@@ -1098,6 +1105,22 @@ static void scene_update_drivers(Main *UNUSED(bmain), Scene *scene)
if (adt && adt->drivers.first)
BKE_animsys_evaluate_animdata(scene, nid, adt, ctime, ADT_RECALC_DRIVERS);
}
+
+ /* freestyle */
+ for (srl = scene->r.layers.first; srl; srl = srl->next) {
+ FreestyleConfig *config = &srl->freestyleConfig;
+ FreestyleLineSet *lineset;
+
+ for (lineset = config->linesets.first; lineset; lineset = lineset->next) {
+ if (lineset->linestyle) {
+ ID *lid = &lineset->linestyle->id;
+ AnimData *adt = BKE_animdata_from_id(lid);
+
+ if (adt && adt->drivers.first)
+ BKE_animsys_evaluate_animdata(scene, lid, adt, ctime, ADT_RECALC_DRIVERS);
+ }
+ }
+ }
}
/* deps hack - do extra recalcs at end */
@@ -1479,16 +1502,6 @@ void BKE_scene_disable_color_management(Scene *scene)
int BKE_scene_check_color_management_enabled(const Scene *scene)
{
- /* TODO(sergey): shouldn't be needed. but we're currently far to close to the release,
- * so better be extra-safe than sorry.
- *
- * Will remove the check after the release.
- */
- if (!scene) {
- BLI_assert(!"Shouldn't happen!");
- return TRUE;
- }
-
return strcmp(scene->display_settings.display_device, "None") != 0;
}
diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c
index fe2f52d79fd..c41c66ef561 100644
--- a/source/blender/blenkernel/intern/screen.c
+++ b/source/blender/blenkernel/intern/screen.c
@@ -47,6 +47,7 @@
#include "BLI_listbase.h"
#include "BLI_utildefines.h"
+#include "BKE_idprop.h"
#include "BKE_screen.h"
/* ************ Spacetype/regiontype handling ************** */
@@ -111,7 +112,7 @@ ARegionType *BKE_regiontype_from_id(SpaceType *st, int regionid)
if (art->regionid == regionid)
return art;
- printf("Error, region type missing in - name:\"%s\", id:%d\n", st->name, st->spaceid);
+ printf("Error, region type %d missing in - name:\"%s\", id:%d\n", regionid, st->name, st->spaceid);
return st->regiontypes.first;
}
@@ -267,6 +268,8 @@ void BKE_spacedata_draw_locks(int set)
/* not region itself */
void BKE_area_region_free(SpaceType *st, ARegion *ar)
{
+ uiList *uilst;
+
if (st) {
ARegionType *art = BKE_regiontype_from_id(st, ar->regiontype);
@@ -285,6 +288,23 @@ void BKE_area_region_free(SpaceType *st, ARegion *ar)
}
BLI_freelistN(&ar->panels);
+
+ for (uilst = ar->ui_lists.first; uilst; uilst = uilst->next) {
+ if (uilst->dyn_data) {
+ uiListDyn *dyn_data = uilst->dyn_data;
+ if (dyn_data->items_filter_flags) {
+ MEM_freeN(dyn_data->items_filter_flags);
+ }
+ if (dyn_data->items_filter_neworder) {
+ MEM_freeN(dyn_data->items_filter_neworder);
+ }
+ MEM_freeN(dyn_data);
+ }
+ if (uilst->properties) {
+ IDP_FreeProperty(uilst->properties);
+ MEM_freeN(uilst->properties);
+ }
+ }
BLI_freelistN(&ar->ui_lists);
}
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index 34b19e3f357..925355d9383 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -417,33 +417,41 @@ void BKE_sequencer_editing_free(Scene *scene)
static void sequencer_imbuf_assign_spaces(Scene *scene, ImBuf *ibuf)
{
- IMB_colormanagement_assign_float_colorspace(ibuf, scene->sequencer_colorspace_settings.name);
+ if (ibuf->rect_float) {
+ IMB_colormanagement_assign_float_colorspace(ibuf, scene->sequencer_colorspace_settings.name);
+ }
}
void BKE_sequencer_imbuf_to_sequencer_space(Scene *scene, ImBuf *ibuf, int make_float)
{
const char *from_colorspace = IMB_colormanagement_role_colorspace_name_get(COLOR_ROLE_SCENE_LINEAR);
const char *to_colorspace = scene->sequencer_colorspace_settings.name;
+ const char *float_colorspace = IMB_colormanagement_get_float_colorspace(ibuf);
if (!ibuf->rect_float) {
- if (make_float && ibuf->rect) {
- /* when converting byte buffer to float in sequencer we need to make float
- * buffer be in sequencer's working space, which is currently only doable
- * from linear space.
- *
- */
-
- /*
- * OCIO_TODO: would be nice to support direct single transform from byte to sequencer's
- */
-
- IMB_float_from_rect(ibuf);
+ if (ibuf->rect) {
+ const char *byte_colorspace = IMB_colormanagement_get_rect_colorspace(ibuf);
+ if (make_float || !STREQ(to_colorspace, byte_colorspace)) {
+ /* If byte space is not in sequencer's working space, we deliver float color space,
+ * this is to to prevent data loss.
+ */
+
+ /* when converting byte buffer to float in sequencer we need to make float
+ * buffer be in sequencer's working space, which is currently only doable
+ * from linear space.
+ */
+
+ /*
+ * OCIO_TODO: would be nice to support direct single transform from byte to sequencer's
+ */
+
+ IMB_float_from_rect(ibuf);
+ }
+ else {
+ return;
+ }
}
else {
- /* if there's only byte buffer in image it's already in compositor's working space,
- * nothing to do here
- */
-
return;
}
}
@@ -452,8 +460,10 @@ void BKE_sequencer_imbuf_to_sequencer_space(Scene *scene, ImBuf *ibuf, int make_
if (ibuf->rect)
imb_freerectImBuf(ibuf);
- IMB_colormanagement_transform_threaded(ibuf->rect_float, ibuf->x, ibuf->y, ibuf->channels,
- from_colorspace, to_colorspace, TRUE);
+ if (!STREQ(float_colorspace, to_colorspace)) {
+ IMB_colormanagement_transform_threaded(ibuf->rect_float, ibuf->x, ibuf->y, ibuf->channels,
+ from_colorspace, to_colorspace, true);
+ }
}
}
@@ -467,7 +477,7 @@ void BKE_sequencer_imbuf_from_sequencer_space(Scene *scene, ImBuf *ibuf)
if (to_colorspace && to_colorspace[0] != '\0') {
IMB_colormanagement_transform_threaded(ibuf->rect_float, ibuf->x, ibuf->y, ibuf->channels,
- from_colorspace, to_colorspace, TRUE);
+ from_colorspace, to_colorspace, true);
}
}
@@ -622,7 +632,7 @@ static void seq_update_sound_bounds_recursive_rec(Scene *scene, Sequence *metase
endofs = seq->start + seq->len - end;
sound_move_scene_sound(scene, seq->scene_sound, seq->start + startofs,
- seq->start + seq->len - endofs, startofs);
+ seq->start + seq->len - endofs, startofs + seq->anim_startofs);
}
}
}
@@ -654,8 +664,9 @@ void BKE_sequence_calc_disp(Scene *scene, Sequence *seq)
if (ELEM(seq->type, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SCENE)) {
BKE_sequencer_update_sound_bounds(scene, seq);
}
- else if (seq->type == SEQ_TYPE_META)
+ else if (seq->type == SEQ_TYPE_META) {
seq_update_sound_bounds_recursive(scene, seq);
+ }
}
void BKE_sequence_calc(Scene *scene, Sequence *seq)
@@ -865,8 +876,7 @@ void BKE_sequencer_sort(Scene *scene)
seqbase.first = seqbase.last = NULL;
effbase.first = effbase.last = NULL;
- while ( (seq = ed->seqbasep->first) ) {
- BLI_remlink(ed->seqbasep, seq);
+ while ((seq = BLI_pophead(ed->seqbasep))) {
if (seq->type & SEQ_TYPE_EFFECT) {
seqt = effbase.first;
@@ -1844,7 +1854,6 @@ void BKE_sequencer_color_balance_apply(StripColorBalance *cb, ImBuf *ibuf, float
init_data.cb = cb;
init_data.ibuf = ibuf;
init_data.mul = mul;
- init_data.mask = NULL;
init_data.make_float = make_float;
init_data.mask = mask_input;
@@ -2669,10 +2678,14 @@ static ImBuf *do_render_strip_uncached(SeqRenderData context, Sequence *seq, flo
seq->strip->proxy ? seq->strip->proxy->tc : IMB_TC_RECORD_RUN,
seq_rendersize_to_proxysize(context.preview_render_size));
- /* we don't need both (speed reasons)! */
- if (ibuf && ibuf->rect_float && ibuf->rect)
- imb_freerectImBuf(ibuf);
if (ibuf) {
+ BKE_sequencer_imbuf_to_sequencer_space(context.scene, ibuf, FALSE);
+
+ /* we don't need both (speed reasons)! */
+ if (ibuf->rect_float && ibuf->rect) {
+ imb_freerectImBuf(ibuf);
+ }
+
seq->strip->stripdata->orig_width = ibuf->x;
seq->strip->stripdata->orig_height = ibuf->y;
}
@@ -3677,6 +3690,51 @@ bool BKE_sequence_base_shuffle_time(ListBase *seqbasep, Scene *evil_scene)
return offset ? false : true;
}
+/* Unlike _update_sound_ funcs, these ones take info from audaspace to update sequence length! */
+#ifdef WITH_AUDASPACE
+static bool sequencer_refresh_sound_length_recursive(Scene *scene, ListBase *seqbase)
+{
+ Sequence *seq;
+ bool changed = false;
+
+ for (seq = seqbase->first; seq; seq = seq->next) {
+ if (seq->type == SEQ_TYPE_META) {
+ if (sequencer_refresh_sound_length_recursive(scene, &seq->seqbase)) {
+ BKE_sequence_calc(scene, seq);
+ changed = true;
+ }
+ }
+ else if (seq->type == SEQ_TYPE_SOUND_RAM) {
+ AUD_SoundInfo info = AUD_getInfo(seq->sound->playback_handle);
+ int old = seq->len;
+ float fac;
+
+ seq->len = (int)ceil((double)info.length * FPS);
+ fac = (float)seq->len / (float)old;
+ old = seq->startofs;
+ seq->startofs *= fac;
+ seq->endofs *= fac;
+ seq->start += (old - seq->startofs); /* So that visual/"real" start frame does not change! */
+
+ BKE_sequence_calc(scene, seq);
+ changed = true;
+ }
+ }
+ return changed;
+}
+#endif
+
+void BKE_sequencer_refresh_sound_length(Scene *scene)
+{
+#ifdef WITH_AUDASPACE
+ if (scene->ed) {
+ sequencer_refresh_sound_length_recursive(scene, &scene->ed->seqbase);
+ }
+#else
+ (void)scene;
+#endif
+}
+
void BKE_sequencer_update_sound_bounds_all(Scene *scene)
{
Editing *ed = scene->ed;
@@ -3954,6 +4012,29 @@ Sequence *BKE_sequence_get_by_name(ListBase *seqbase, const char *name, int recu
return NULL;
}
+/**
+ * Only use as last resort when the StripElem is available but no the Sequence.
+ * (needed for RNA)
+ */
+Sequence *BKE_sequencer_from_elem(ListBase *seqbase, StripElem *se)
+{
+ Sequence *iseq;
+
+ for (iseq = seqbase->first; iseq; iseq = iseq->next) {
+ Sequence *seq_found;
+ if ((iseq->strip && iseq->strip->stripdata) &&
+ (ARRAY_HAS_ITEM(se, iseq->strip->stripdata, iseq->len)))
+ {
+ break;
+ }
+ else if ((seq_found = BKE_sequencer_from_elem(&iseq->seqbase, se))) {
+ iseq = seq_found;
+ break;
+ }
+ }
+
+ return iseq;
+}
Sequence *BKE_sequencer_active_get(Scene *scene)
{
diff --git a/source/blender/blenkernel/intern/shrinkwrap.c b/source/blender/blenkernel/intern/shrinkwrap.c
index b9843ad0619..3a6912157fd 100644
--- a/source/blender/blenkernel/intern/shrinkwrap.c
+++ b/source/blender/blenkernel/intern/shrinkwrap.c
@@ -136,7 +136,7 @@ static void shrinkwrap_calc_nearest_vertex(ShrinkwrapCalcData *calc)
nearest.index = -1;
nearest.dist = FLT_MAX;
#ifndef __APPLE__
-#pragma omp parallel for default(none) private(i) firstprivate(nearest) shared(treeData,calc) schedule(static)
+#pragma omp parallel for default(none) private(i) firstprivate(nearest) shared(treeData, calc) schedule(static)
#endif
for (i = 0; i < calc->numVerts; ++i) {
float *co = calc->vertexCos[i];
@@ -198,10 +198,10 @@ static void shrinkwrap_calc_nearest_vertex(ShrinkwrapCalcData *calc)
* MOD_SHRINKWRAP_CULL_TARGET_FRONTFACE (front faces hits are ignored)
* MOD_SHRINKWRAP_CULL_TARGET_BACKFACE (back faces hits are ignored)
*/
-int normal_projection_project_vertex(char options, const float vert[3], const float dir[3],
- const SpaceTransform *transf,
- BVHTree *tree, BVHTreeRayHit *hit,
- BVHTree_RayCastCallback callback, void *userdata)
+int BKE_shrinkwrap_project_normal(char options, const float vert[3],
+ const float dir[3], const SpaceTransform *transf,
+ BVHTree *tree, BVHTreeRayHit *hit,
+ BVHTree_RayCastCallback callback, void *userdata)
{
/* don't use this because this dist value could be incompatible
* this value used by the callback for comparing prev/new dist values.
@@ -331,7 +331,7 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc)
{
#ifndef __APPLE__
-#pragma omp parallel for private(i,hit) schedule(static)
+#pragma omp parallel for private(i, hit) schedule(static)
#endif
for (i = 0; i < calc->numVerts; ++i) {
float *co = calc->vertexCos[i];
@@ -368,14 +368,14 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc)
if (use_normal & MOD_SHRINKWRAP_PROJECT_ALLOW_POS_DIR) {
if (auxData.tree) {
- normal_projection_project_vertex(0, tmp_co, tmp_no,
- &local2aux, auxData.tree, &hit,
- auxData.raycast_callback, &auxData);
+ BKE_shrinkwrap_project_normal(0, tmp_co, tmp_no,
+ &local2aux, auxData.tree, &hit,
+ auxData.raycast_callback, &auxData);
}
- normal_projection_project_vertex(calc->smd->shrinkOpts, tmp_co, tmp_no,
- &calc->local2target, treeData.tree, &hit,
- treeData.raycast_callback, &treeData);
+ BKE_shrinkwrap_project_normal(calc->smd->shrinkOpts, tmp_co, tmp_no,
+ &calc->local2target, treeData.tree, &hit,
+ treeData.raycast_callback, &treeData);
}
/* Project over negative direction of axis */
@@ -384,14 +384,14 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc)
negate_v3_v3(inv_no, tmp_no);
if (auxData.tree) {
- normal_projection_project_vertex(0, tmp_co, inv_no,
- &local2aux, auxData.tree, &hit,
- auxData.raycast_callback, &auxData);
+ BKE_shrinkwrap_project_normal(0, tmp_co, inv_no,
+ &local2aux, auxData.tree, &hit,
+ auxData.raycast_callback, &auxData);
}
- normal_projection_project_vertex(calc->smd->shrinkOpts, tmp_co, inv_no,
- &calc->local2target, treeData.tree, &hit,
- treeData.raycast_callback, &treeData);
+ BKE_shrinkwrap_project_normal(calc->smd->shrinkOpts, tmp_co, inv_no,
+ &calc->local2target, treeData.tree, &hit,
+ treeData.raycast_callback, &treeData);
}
/* don't set the initial dist (which is more efficient),
@@ -441,7 +441,7 @@ static void shrinkwrap_calc_nearest_surface_point(ShrinkwrapCalcData *calc)
/* Find the nearest vertex */
#ifndef __APPLE__
-#pragma omp parallel for default(none) private(i) firstprivate(nearest) shared(calc,treeData) schedule(static)
+#pragma omp parallel for default(none) private(i) firstprivate(nearest) shared(calc, treeData) schedule(static)
#endif
for (i = 0; i < calc->numVerts; ++i) {
float *co = calc->vertexCos[i];
@@ -506,7 +506,7 @@ void shrinkwrapModifier_deform(ShrinkwrapModifierData *smd, Object *ob, DerivedM
DerivedMesh *ss_mesh = NULL;
ShrinkwrapCalcData calc = NULL_ShrinkwrapCalcData;
- /* remove loop dependencies on derived meshs (TODO should this be done elsewhere?) */
+ /* remove loop dependencies on derived meshes (TODO should this be done elsewhere?) */
if (smd->target == ob) smd->target = NULL;
if (smd->auxTarget == ob) smd->auxTarget = NULL;
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index bb65955e3b5..b7251a5e795 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -84,6 +84,7 @@
#include "BKE_pointcache.h"
#include "BKE_scene.h"
#include "BKE_smoke.h"
+#include "BKE_texture.h"
#include "RE_shader_ext.h"
@@ -1108,7 +1109,7 @@ static void em_freeData(EmissionMap *em)
static void em_combineMaps(EmissionMap *output, EmissionMap *em2, int hires_multiplier, int additive, float sample_size)
{
- int i, x,y,z;
+ int i, x, y, z;
/* copyfill input 1 struct and clear output for new allocation */
EmissionMap em1;
@@ -1142,8 +1143,8 @@ static void em_combineMaps(EmissionMap *output, EmissionMap *em2, int hires_mult
/* values */
output->influence[index_out] = em1.influence[index_in];
- if (output->velocity) {
- output->velocity[index_out] = em1.velocity[index_in];
+ if (output->velocity && em1.velocity) {
+ copy_v3_v3(&output->velocity[index_out * 3], &em1.velocity[index_in * 3]);
}
}
@@ -1160,9 +1161,11 @@ static void em_combineMaps(EmissionMap *output, EmissionMap *em2, int hires_mult
else {
output->influence[index_out] = MAX2(em2->influence[index_in], output->influence[index_out]);
}
- if (output->velocity) {
+ if (output->velocity && em2->velocity) {
/* last sample replaces the velocity */
- output->velocity[index_out] = ADD_IF_LOWER(output->velocity[index_out], em2->velocity[index_in]);
+ output->velocity[index_out * 3] = ADD_IF_LOWER(output->velocity[index_out * 3], em2->velocity[index_in * 3]);
+ output->velocity[index_out * 3 + 1] = ADD_IF_LOWER(output->velocity[index_out * 3 + 1], em2->velocity[index_in * 3 + 1]);
+ output->velocity[index_out * 3 + 2] = ADD_IF_LOWER(output->velocity[index_out * 3 + 2], em2->velocity[index_in * 3 + 2]);
}
}
} // low res loop
@@ -1224,7 +1227,7 @@ static void emit_from_particles(Object *flow_ob, SmokeDomainSettings *sds, Smoke
float solid = sfs->particle_size * 0.5f;
float smooth = 0.5f; /* add 0.5 cells of linear falloff to reduce aliasing */
int hires_multiplier = 1;
- int i,z;
+ int i, z;
KDTree *tree;
sim.scene = scene;
@@ -1416,27 +1419,6 @@ static void emit_from_particles(Object *flow_ob, SmokeDomainSettings *sds, Smoke
}
}
-/* TODO(sergey): de-duplicate with get_texture_value from modifier utils */
-/* NOTE: Skips color management, because result is only used for value now, not for color. */
-static void get_texture_value(Tex *texture, float tex_co[3], TexResult *texres)
-{
- int result_type;
-
- /* no node textures for now */
- result_type = multitex_ext_safe(texture, tex_co, texres, NULL, false);
-
- /* if the texture gave an RGB value, we assume it didn't give a valid
- * intensity, since this is in the context of modifiers don't use perceptual color conversion.
- * if the texture didn't give an RGB value, copy the intensity across
- */
- if (result_type & TEX_RGB) {
- texres->tin = (1.0f / 3.0f) * (texres->tr + texres->tg + texres->tb);
- }
- else {
- copy_v3_fl(&texres->tr, texres->tin);
- }
-}
-
static void sample_derivedmesh(SmokeFlowSettings *sfs, MVert *mvert, MTFace *tface, MFace *mface, float *influence_map, float *velocity_map, int index, int base_res[3], float flow_center[3], BVHTreeFromMesh *treeData, float ray_start[3],
float *vert_vel, int has_velocity, int defgrp_index, MDeformVert *dvert, float x, float y, float z)
{
@@ -1548,7 +1530,7 @@ static void sample_derivedmesh(SmokeFlowSettings *sfs, MVert *mvert, MTFace *tfa
tex_co[2] = sfs->texture_offset;
}
texres.nor = NULL;
- get_texture_value(sfs->noise_texture, tex_co, &texres);
+ BKE_texture_get_value(NULL, sfs->noise_texture, tex_co, &texres, false);
sample_str *= texres.tin;
}
}
@@ -2384,6 +2366,7 @@ static void update_effectors(Scene *scene, Object *ob, SmokeDomainSettings *sds,
if (effectors)
{
float *density = smoke_get_density(sds->fluid);
+ float *fuel = smoke_get_fuel(sds->fluid);
float *force_x = smoke_get_force_x(sds->fluid);
float *force_y = smoke_get_force_y(sds->fluid);
float *force_z = smoke_get_force_z(sds->fluid);
@@ -2406,7 +2389,7 @@ static void update_effectors(Scene *scene, Object *ob, SmokeDomainSettings *sds,
float voxelCenter[3] = {0, 0, 0}, vel[3] = {0, 0, 0}, retvel[3] = {0, 0, 0};
unsigned int index = smoke_get_index(x, sds->res[0], y, sds->res[1], z);
- if ((density[index] < FLT_EPSILON) || obstacle[index])
+ if (((fuel ? MAX2(density[index], fuel[index]) : density[index]) < FLT_EPSILON) || obstacle[index])
continue;
vel[0] = velocity_x[index];
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c
index 2f8eb7d9931..3910ef5cb69 100644
--- a/source/blender/blenkernel/intern/sound.c
+++ b/source/blender/blenkernel/intern/sound.c
@@ -427,6 +427,8 @@ void sound_update_fps(struct Scene *scene)
{
if (scene->sound_scene)
AUD_setSequencerFPS(scene->sound_scene, FPS);
+
+ BKE_sequencer_refresh_sound_length(scene);
}
void sound_update_scene_listener(struct Scene *scene)
diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c
index 35482d9553d..900d92d1637 100644
--- a/source/blender/blenkernel/intern/subsurf_ccg.c
+++ b/source/blender/blenkernel/intern/subsurf_ccg.c
@@ -170,7 +170,7 @@ static CCGSubSurf *_getSubSurf(CCGSubSurf *prevSS, int subdivLevels,
if (useArena) {
CCGAllocatorIFC allocatorIFC;
- CCGAllocatorHDL allocator = BLI_memarena_new((1 << 16), "subsurf arena");
+ CCGAllocatorHDL allocator = BLI_memarena_new(MEM_SIZE_OPTIMAL(1 << 16), "subsurf arena");
allocatorIFC.alloc = arena_alloc;
allocatorIFC.realloc = arena_realloc;
@@ -298,7 +298,7 @@ static int ss_sync_from_uv(CCGSubSurf *ss, CCGSubSurf *origss, DerivedMesh *dm,
CCGVertHDL *fverts = NULL;
BLI_array_declare(fverts);
#endif
- EdgeHash *ehash;
+ EdgeSet *eset;
float creaseFactor = (float)ccgSubSurf_getSubdivisionLevels(ss);
float uv[3] = {0.0f, 0.0f, 0.0f}; /* only first 2 values are written into */
@@ -334,7 +334,7 @@ static int ss_sync_from_uv(CCGSubSurf *ss, CCGSubSurf *origss, DerivedMesh *dm,
}
/* create edges */
- ehash = BLI_edgehash_new();
+ eset = BLI_edgeset_new_ex(__func__, BLI_EDGEHASH_SIZE_GUESS_FROM_POLYS(totface));
for (i = 0; i < totface; i++) {
MPoly *mp = &((MPoly *) mpoly)[i];
@@ -359,7 +359,7 @@ static int ss_sync_from_uv(CCGSubSurf *ss, CCGSubSurf *origss, DerivedMesh *dm,
MVert *mv0 = mvert + (ml[j_next].v);
MVert *mv1 = mvert + (ml[j].v);
- if (!BLI_edgehash_haskey(ehash, v0, v1)) {
+ if (BLI_edgeset_reinsert(eset, v0, v1)) {
CCGEdge *e, *orige = ccgSubSurf_getFaceEdge(origf, j_next);
CCGEdgeHDL ehdl = SET_INT_IN_POINTER(mp->loopstart + j_next);
float crease;
@@ -370,12 +370,11 @@ static int ss_sync_from_uv(CCGSubSurf *ss, CCGSubSurf *origss, DerivedMesh *dm,
crease = ccgSubSurf_getEdgeCrease(orige);
ccgSubSurf_syncEdge(ss, ehdl, fverts[j_next], fverts[j], crease, &e);
- BLI_edgehash_insert(ehash, v0, v1, NULL);
}
}
}
- BLI_edgehash_free(ehash, NULL);
+ BLI_edgeset_free(eset);
/* create faces */
for (i = 0; i < totface; i++) {
@@ -1065,8 +1064,8 @@ void subsurf_copy_grid_hidden(DerivedMesh *dm, const MPoly *mpoly,
for (j = 0; j < mpoly[i].totloop; j++) {
const MDisps *md = &mdisps[mpoly[i].loopstart + j];
- int hidden_gridsize = ccg_gridsize(md->level);
- int factor = ccg_factor(level, md->level);
+ int hidden_gridsize = BKE_ccg_gridsize(md->level);
+ int factor = BKE_ccg_factor(level, md->level);
if (!md->hidden)
continue;
@@ -1108,8 +1107,8 @@ void subsurf_copy_grid_paint_mask(DerivedMesh *dm, const MPoly *mpoly,
if (!gpm->data)
continue;
- factor = ccg_factor(level, gpm->level);
- gpm_gridsize = ccg_gridsize(gpm->level);
+ factor = BKE_ccg_factor(level, gpm->level);
+ gpm_gridsize = BKE_ccg_gridsize(gpm->level);
for (y = 0; y < gridSize; y++) {
for (x = 0; x < gridSize; x++) {
@@ -1332,7 +1331,7 @@ static void ccgDM_copyFinalLoopArray(DerivedMesh *dm, MLoop *mloop)
if (!ccgdm->ehash) {
MEdge *medge;
- ccgdm->ehash = BLI_edgehash_new();
+ ccgdm->ehash = BLI_edgehash_new_ex(__func__, ccgdm->dm.numEdgeData);
medge = ccgdm->dm.getEdgeArray((DerivedMesh *)ccgdm);
for (i = 0; i < ccgdm->dm.numEdgeData; i++) {
@@ -1818,6 +1817,64 @@ static void ccgDM_drawFacesSolid(DerivedMesh *dm, float (*partial_redraw_planes)
}
}
+static void ccgdm_draw_attrib_vertex(DMVertexAttribs *attribs, int a, int index, int vert)
+{
+ const float zero[4] = {0.0f, 0.0f, 0.0f, 0.0f};
+ int b;
+
+ /* orco texture coordinates */
+ if (attribs->totorco) {
+ /*const*/ float (*array)[3] = attribs->orco.array;
+ const float *orco = (array) ? array[index] : zero;
+
+ if (attribs->orco.gl_texco)
+ glTexCoord3fv(orco);
+ else
+ glVertexAttrib3fvARB(attribs->orco.gl_index, orco);
+ }
+
+ /* uv texture coordinates */
+ for (b = 0; b < attribs->tottface; b++) {
+ const float *uv;
+
+ if (attribs->tface[b].array) {
+ MTFace *tf = &attribs->tface[b].array[a];
+ uv = tf->uv[vert];
+ }
+ else {
+ uv = zero;
+ }
+
+ if (attribs->tface[b].gl_texco)
+ glTexCoord2fv(uv);
+ else
+ glVertexAttrib2fvARB(attribs->tface[b].gl_index, uv);
+ }
+
+ /* vertex colors */
+ for (b = 0; b < attribs->totmcol; b++) {
+ GLubyte col[4];
+
+ if (attribs->mcol[b].array) {
+ MCol *cp = &attribs->mcol[b].array[a * 4 + vert];
+ col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a;
+ }
+ else {
+ col[0] = 0; col[1] = 0; col[2] = 0; col[3] = 0;
+ }
+
+ glVertexAttrib4ubvARB(attribs->mcol[b].gl_index, col);
+ }
+
+ /* tangent for normal mapping */
+ if (attribs->tottang) {
+ /*const*/ float (*array)[4] = attribs->tang.array;
+ const float *tang = (array) ? array[a * 4 + vert] : zero;
+
+ glVertexAttrib4fvARB(attribs->tang.gl_index, tang);
+ }
+}
+
/* Only used by non-editmesh types */
static void ccgDM_drawMappedFacesGLSL(DerivedMesh *dm,
DMSetMaterial setMaterial,
@@ -1834,7 +1891,7 @@ static void ccgDM_drawMappedFacesGLSL(DerivedMesh *dm,
int gridFaces = gridSize - 1;
int edgeSize = ccgSubSurf_getEdgeSize(ss);
DMFlagMat *faceFlags = ccgdm->faceFlags;
- int a, b, i, do_draw, numVerts, matnr, new_matnr, totface;
+ int a, i, do_draw, numVerts, matnr, new_matnr, totface;
CCG_key_top_level(&key, ss);
ccgdm_pbvh_update(ccgdm);
@@ -1843,25 +1900,11 @@ static void ccgDM_drawMappedFacesGLSL(DerivedMesh *dm,
matnr = -1;
#define PASSATTRIB(dx, dy, vert) { \
- if (attribs.totorco) { \
+ if (attribs.totorco) \
index = getFaceIndex(ss, f, S, x + dx, y + dy, edgeSize, gridSize); \
- glVertexAttrib3fvARB(attribs.orco.gl_index, \
- attribs.orco.array[index]); \
- } \
- for (b = 0; b < attribs.tottface; b++) { \
- MTFace *tf = &attribs.tface[b].array[a]; \
- glVertexAttrib2fvARB(attribs.tface[b].gl_index, tf->uv[vert]); \
- } \
- for (b = 0; b < attribs.totmcol; b++) { \
- MCol *cp = &attribs.mcol[b].array[a * 4 + vert]; \
- GLubyte col[4]; \
- col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a; \
- glVertexAttrib4ubvARB(attribs.mcol[b].gl_index, col); \
- } \
- if (attribs.tottang) { \
- float *tang = attribs.tang.array[a * 4 + vert]; \
- glVertexAttrib4fvARB(attribs.tang.gl_index, tang); \
- } \
+ else \
+ index = 0; \
+ ccgdm_draw_attrib_vertex(&attribs, a, index, vert); \
} (void)0
totface = ccgSubSurf_getNumFaces(ss);
@@ -1985,7 +2028,7 @@ static void ccgDM_drawMappedFacesMat(DerivedMesh *dm,
int gridFaces = gridSize - 1;
int edgeSize = ccgSubSurf_getEdgeSize(ss);
DMFlagMat *faceFlags = ccgdm->faceFlags;
- int a, b, i, numVerts, matnr, new_matnr, totface;
+ int a, i, numVerts, matnr, new_matnr, totface;
CCG_key_top_level(&key, ss);
ccgdm_pbvh_update(ccgdm);
@@ -1993,31 +2036,11 @@ static void ccgDM_drawMappedFacesMat(DerivedMesh *dm,
matnr = -1;
#define PASSATTRIB(dx, dy, vert) { \
- if (attribs.totorco) { \
+ if (attribs.totorco) \
index = getFaceIndex(ss, f, S, x + dx, y + dy, edgeSize, gridSize); \
- if (attribs.orco.gl_texco) \
- glTexCoord3fv(attribs.orco.array[index]); \
- else \
- glVertexAttrib3fvARB(attribs.orco.gl_index, \
- attribs.orco.array[index]); \
- } \
- for (b = 0; b < attribs.tottface; b++) { \
- MTFace *tf = &attribs.tface[b].array[a]; \
- if (attribs.tface[b].gl_texco) \
- glTexCoord2fv(tf->uv[vert]); \
- else \
- glVertexAttrib2fvARB(attribs.tface[b].gl_index, tf->uv[vert]); \
- } \
- for (b = 0; b < attribs.totmcol; b++) { \
- MCol *cp = &attribs.mcol[b].array[a * 4 + vert]; \
- GLubyte col[4]; \
- col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a; \
- glVertexAttrib4ubvARB(attribs.mcol[b].gl_index, col); \
- } \
- if (attribs.tottang) { \
- float *tang = attribs.tang.array[a * 4 + vert]; \
- glVertexAttrib4fvARB(attribs.tang.gl_index, tang); \
- } \
+ else \
+ index = 0; \
+ ccgdm_draw_attrib_vertex(&attribs, a, index, vert); \
} (void)0
totface = ccgSubSurf_getNumFaces(ss);
@@ -3184,14 +3207,13 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss,
/* reuse of ccgDM_getNumTessFaces is intentional here: subsurf polys are just created from tessfaces */
ccgdm->dm.getNumPolys = ccgDM_getNumTessFaces;
- ccgdm->dm.getNumGrids = ccgDM_getNumGrids;
- ccgdm->dm.getPBVH = ccgDM_getPBVH;
-
ccgdm->dm.getVert = ccgDM_getFinalVert;
ccgdm->dm.getEdge = ccgDM_getFinalEdge;
ccgdm->dm.getTessFace = ccgDM_getFinalFace;
+
ccgdm->dm.getVertCo = ccgDM_getFinalVertCo;
ccgdm->dm.getVertNo = ccgDM_getFinalVertNo;
+
ccgdm->dm.copyVertArray = ccgDM_copyFinalVertArray;
ccgdm->dm.copyEdgeArray = ccgDM_copyFinalEdgeArray;
ccgdm->dm.copyTessFaceArray = ccgDM_copyFinalFaceArray;
@@ -3217,11 +3239,6 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss,
ccgdm->dm.getPolyMap = ccgDM_getPolyMap;
ccgdm->dm.getPBVH = ccgDM_getPBVH;
- ccgdm->dm.getTessFace = ccgDM_getFinalFace;
- ccgdm->dm.copyVertArray = ccgDM_copyFinalVertArray;
- ccgdm->dm.copyEdgeArray = ccgDM_copyFinalEdgeArray;
- ccgdm->dm.copyTessFaceArray = ccgDM_copyFinalFaceArray;
-
ccgdm->dm.calcNormals = ccgDM_calcNormals;
ccgdm->dm.recalcTessellation = ccgDM_recalcTessellation;
@@ -3577,6 +3594,8 @@ struct DerivedMesh *subsurf_make_derived_from_derived(
int drawInteriorEdges = !(smd->flags & eSubsurfModifierFlag_ControlEdges);
CCGDerivedMesh *result;
+ /* note: editmode calculation can only run once per
+ * modifier stack evaluation (uses freed cache) [#36299] */
if (flags & SUBSURF_FOR_EDIT_MODE) {
int levels = (smd->modifier.scene) ? get_render_subsurf_level(&smd->modifier.scene->r, smd->levels) : smd->levels;
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index f0c01e25598..be43aae1ed3 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -1151,17 +1151,26 @@ void txt_pop_sel(Text *text)
text->selc = text->curc;
}
-void txt_order_cursors(Text *text)
+void txt_order_cursors(Text *text, const bool reverse)
{
if (!text) return;
if (!text->curl) return;
if (!text->sell) return;
- /* Flip so text->curl is before text->sell */
- if ((txt_get_span(text->curl, text->sell) < 0) ||
- (text->curl == text->sell && text->curc > text->selc))
- {
- txt_curs_swap(text);
+ /* Flip so text->curl is before/after text->sell */
+ if (reverse == false) {
+ if ((txt_get_span(text->curl, text->sell) < 0) ||
+ (text->curl == text->sell && text->curc > text->selc))
+ {
+ txt_curs_swap(text);
+ }
+ }
+ else {
+ if ((txt_get_span(text->curl, text->sell) > 0) ||
+ (text->curl == text->sell && text->curc < text->selc))
+ {
+ txt_curs_swap(text);
+ }
}
}
@@ -1181,7 +1190,7 @@ static void txt_delete_sel(Text *text)
if (!txt_has_sel(text)) return;
- txt_order_cursors(text);
+ txt_order_cursors(text, false);
if (!undoing) {
buf = txt_sel_to_buf(text);
@@ -1305,7 +1314,7 @@ int txt_find_string(Text *text, const char *findstr, int wrap, int match_case)
if (!text || !text->curl || !text->sell) return 0;
- txt_order_cursors(text);
+ txt_order_cursors(text, false);
tl = startl = text->sell;
@@ -1938,6 +1947,7 @@ static unsigned int txt_redo_read_unicode(const char *undo_buf, int *undo_pos, s
void txt_do_undo(Text *text)
{
int op = text->undo_buf[text->undo_pos];
+ int prev_flags;
unsigned int linep, i;
unsigned int uchar;
unsigned int curln, selln;
@@ -2061,8 +2071,14 @@ void txt_do_undo(Text *text)
txt_move_to(text, selln, selc, 1);
if ((curln == selln) && (curc == selc)) {
+ /* disable tabs to spaces since moving right may involve skipping multiple spaces */
+ prev_flags = text->flags;
+ text->flags &= ~TXT_TABSTOSPACES;
+
for (i = 0; i < linep; i++)
txt_move_right(text, 1);
+
+ text->flags = prev_flags;
}
txt_delete_selected(text);
@@ -2833,7 +2849,7 @@ void txt_move_lines(struct Text *text, const int direction)
if (!text || !text->curl || !text->sell) return;
- txt_order_cursors(text);
+ txt_order_cursors(text, false);
line_other = (direction == TXT_MOVE_LINE_DOWN) ? text->sell->next : text->curl->prev;
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c
index e2b7358525a..ccbccac85cf 100644
--- a/source/blender/blenkernel/intern/texture.c
+++ b/source/blender/blenkernel/intern/texture.c
@@ -68,19 +68,22 @@
#include "BKE_node.h"
#include "BKE_animsys.h"
#include "BKE_colortools.h"
+#include "BKE_scene.h"
+
+#include "RE_shader_ext.h"
/* ****************** Mapping ******************* */
-TexMapping *add_tex_mapping(void)
+TexMapping *add_tex_mapping(int type)
{
TexMapping *texmap = MEM_callocN(sizeof(TexMapping), "TexMapping");
- default_tex_mapping(texmap);
+ default_tex_mapping(texmap, type);
return texmap;
}
-void default_tex_mapping(TexMapping *texmap)
+void default_tex_mapping(TexMapping *texmap, int type)
{
memset(texmap, 0, sizeof(TexMapping));
@@ -92,11 +95,12 @@ void default_tex_mapping(TexMapping *texmap)
texmap->projy = PROJ_Y;
texmap->projz = PROJ_Z;
texmap->mapping = MTEX_FLAT;
+ texmap->type = type;
}
void init_tex_mapping(TexMapping *texmap)
{
- float smat[3][3], rmat[3][3], mat[3][3], proj[3][3];
+ float smat[4][4], rmat[4][4], tmat[4][4], proj[4][4], size[3];
if (texmap->projx == PROJ_X && texmap->projy == PROJ_Y && texmap->projz == PROJ_Z &&
is_zero_v3(texmap->loc) && is_zero_v3(texmap->rot) && is_one_v3(texmap->size))
@@ -107,7 +111,8 @@ void init_tex_mapping(TexMapping *texmap)
}
else {
/* axis projection */
- zero_m3(proj);
+ zero_m4(proj);
+ proj[3][3] = 1.0f;
if (texmap->projx != PROJ_N)
proj[texmap->projx - 1][0] = 1.0f;
@@ -117,19 +122,50 @@ void init_tex_mapping(TexMapping *texmap)
proj[texmap->projz - 1][2] = 1.0f;
/* scale */
- size_to_mat3(smat, texmap->size);
+ copy_v3_v3(size, texmap->size);
+
+ if (ELEM(texmap->type, TEXMAP_TYPE_TEXTURE, TEXMAP_TYPE_NORMAL)) {
+ /* keep matrix invertible */
+ if (fabsf(size[0]) < 1e-5f)
+ size[0] = signf(size[0]) * 1e-5f;
+ if (fabsf(size[1]) < 1e-5f)
+ size[1] = signf(size[1]) * 1e-5f;
+ if (fabsf(size[2]) < 1e-5f)
+ size[2] = signf(size[2]) * 1e-5f;
+ }
+ size_to_mat4(smat, texmap->size);
+
/* rotation */
- /* TexMapping rotation are now in radians. */
- eul_to_mat3(rmat, texmap->rot);
-
- /* compose it all */
- mul_m3_m3m3(mat, rmat, smat);
- mul_m3_m3m3(mat, proj, mat);
-
+ eul_to_mat4(rmat, texmap->rot);
+
/* translation */
- copy_m4_m3(texmap->mat, mat);
- copy_v3_v3(texmap->mat[3], texmap->loc);
+ unit_m4(tmat);
+ copy_v3_v3(tmat[3], texmap->loc);
+
+ if (texmap->type == TEXMAP_TYPE_TEXTURE) {
+ /* to transform a texture, the inverse transform needs
+ * to be applied to the texture coordinate */
+ mul_serie_m4(texmap->mat, tmat, rmat, smat, 0, 0, 0, 0, 0);
+ invert_m4(texmap->mat);
+ }
+ else if (texmap->type == TEXMAP_TYPE_POINT) {
+ /* forward transform */
+ mul_serie_m4(texmap->mat, tmat, rmat, smat, 0, 0, 0, 0, 0);
+ }
+ else if (texmap->type == TEXMAP_TYPE_VECTOR) {
+ /* no translation for vectors */
+ mul_m4_m4m4(texmap->mat, rmat, smat);
+ }
+ else if (texmap->type == TEXMAP_TYPE_NORMAL) {
+ /* no translation for normals, and inverse transpose */
+ mul_m4_m4m4(texmap->mat, rmat, smat);
+ invert_m4(texmap->mat);
+ transpose_m4(texmap->mat);
+ }
+
+ /* projection last */
+ mul_m4_m4m4(texmap->mat, texmap->mat, proj);
texmap->flag &= ~TEXMAP_UNIT_MATRIX;
}
@@ -1403,3 +1439,27 @@ bool BKE_texture_dependsOnTime(const struct Tex *texture)
}
/* ------------------------------------------------------------------------- */
+
+void BKE_texture_get_value(Scene *scene, Tex *texture, float *tex_co, TexResult *texres, bool use_color_management)
+{
+ int result_type;
+ bool do_color_manage = false;
+
+ if (scene && use_color_management) {
+ do_color_manage = BKE_scene_check_color_management_enabled(scene);
+ }
+
+ /* no node textures for now */
+ result_type = multitex_ext_safe(texture, tex_co, texres, NULL, do_color_manage);
+
+ /* if the texture gave an RGB value, we assume it didn't give a valid
+ * intensity, since this is in the context of modifiers don't use perceptual color conversion.
+ * if the texture didn't give an RGB value, copy the intensity across
+ */
+ if (result_type & TEX_RGB) {
+ texres->tin = (1.0f / 3.0f) * (texres->tr + texres->tg + texres->tb);
+ }
+ else {
+ copy_v3_fl(&texres->tr, texres->tin);
+ }
+}
diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c
index 3d9720d744b..75e49deaa28 100644
--- a/source/blender/blenkernel/intern/tracking.c
+++ b/source/blender/blenkernel/intern/tracking.c
@@ -36,6 +36,7 @@
#include "MEM_guardedalloc.h"
+#include "DNA_anim_types.h"
#include "DNA_gpencil_types.h"
#include "DNA_camera_types.h"
#include "DNA_movieclip_types.h"
@@ -53,6 +54,7 @@
#include "BLF_translation.h"
+#include "BKE_fcurve.h"
#include "BKE_global.h"
#include "BKE_tracking.h"
#include "BKE_movieclip.h"
@@ -62,6 +64,8 @@
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
+#include "RNA_access.h"
+
#include "raskter.h"
#include "libmv-capi.h"
@@ -212,7 +216,6 @@ void BKE_tracking_settings_init(MovieTracking *tracking)
tracking->settings.default_algorithm_flag |= TRACK_ALGORITHM_FLAG_USE_BRUTE;
tracking->settings.dist = 1;
tracking->settings.object_distance = 1;
- tracking->settings.reconstruction_success_threshold = 1e-3;
tracking->stabilization.scaleinf = 1.0f;
tracking->stabilization.locinf = 1.0f;
@@ -519,7 +522,7 @@ void BKE_tracking_clipboard_copy_tracks(MovieTracking *tracking, MovieTrackingOb
}
/* Check whether there're any tracks in the clipboard. */
-int BKE_tracking_clipboard_has_tracks(void)
+bool BKE_tracking_clipboard_has_tracks(void)
{
return tracking_clipboard.tracks.first != NULL;
}
@@ -609,6 +612,7 @@ MovieTrackingTrack *BKE_tracking_track_add(MovieTracking *tracking, ListBase *tr
track->frames_limit = settings->default_frames_limit;
track->flag = settings->default_flag;
track->algorithm_flag = settings->default_algorithm_flag;
+ track->weight = 1.0f;
memset(&marker, 0, sizeof(marker));
marker.pos[0] = x;
@@ -696,7 +700,7 @@ void BKE_tracking_track_flag_clear(MovieTrackingTrack *track, int area, int flag
*
* NOTE: frame number should be in clip space, not scene space.
*/
-int BKE_tracking_track_has_marker_at_frame(MovieTrackingTrack *track, int framenr)
+bool BKE_tracking_track_has_marker_at_frame(MovieTrackingTrack *track, int framenr)
{
return BKE_tracking_marker_get_exact(track, framenr) != NULL;
}
@@ -705,7 +709,7 @@ int BKE_tracking_track_has_marker_at_frame(MovieTrackingTrack *track, int framen
*
* NOTE: frame number should be in clip space, not scene space.
*/
-int BKE_tracking_track_has_enabled_marker_at_frame(MovieTrackingTrack *track, int framenr)
+bool BKE_tracking_track_has_enabled_marker_at_frame(MovieTrackingTrack *track, int framenr)
{
MovieTrackingMarker *marker = BKE_tracking_marker_get_exact(track, framenr);
@@ -1040,7 +1044,7 @@ float *BKE_tracking_track_get_mask(int frame_width, int frame_height,
}
/* area - which part of marker should be selected. see TRACK_AREA_* constants */
-void BKE_tracking_track_select(ListBase *tracksbase, MovieTrackingTrack *track, int area, int extend)
+void BKE_tracking_track_select(ListBase *tracksbase, MovieTrackingTrack *track, int area, bool extend)
{
if (extend) {
BKE_tracking_track_flag_set(track, area, SELECT);
@@ -1640,17 +1644,17 @@ MovieTrackingObject *BKE_tracking_object_add(MovieTracking *tracking, const char
return object;
}
-int BKE_tracking_object_delete(MovieTracking *tracking, MovieTrackingObject *object)
+bool BKE_tracking_object_delete(MovieTracking *tracking, MovieTrackingObject *object)
{
MovieTrackingTrack *track;
int index = BLI_findindex(&tracking->objects, object);
if (index == -1)
- return FALSE;
+ return false;
if (object->flag & TRACKING_OBJECT_CAMERA) {
/* object used for camera solving can't be deleted */
- return FALSE;
+ return false;
}
track = object->tracks.first;
@@ -1673,7 +1677,7 @@ int BKE_tracking_object_delete(MovieTracking *tracking, MovieTrackingObject *obj
BKE_tracking_dopesheet_tag_update(tracking);
- return TRUE;
+ return true;
}
void BKE_tracking_object_unique_name(MovieTracking *tracking, MovieTrackingObject *object)
@@ -1904,7 +1908,7 @@ static void cameraIntrinscisOptionsFromTracking(libmv_CameraIntrinsicsOptions *c
camera_intrinsics_options->k3 = camera->k3;
camera_intrinsics_options->image_width = calibration_width;
- camera_intrinsics_options->image_height = (double) (calibration_height * aspy);
+ camera_intrinsics_options->image_height = (int) (calibration_height * aspy);
}
MovieDistortion *BKE_tracking_distortion_new(void)
@@ -1946,7 +1950,7 @@ MovieDistortion *BKE_tracking_distortion_copy(MovieDistortion *distortion)
}
ImBuf *BKE_tracking_distortion_exec(MovieDistortion *distortion, MovieTracking *tracking, ImBuf *ibuf,
- int calibration_width, int calibration_height, float overscan, int undistort)
+ int calibration_width, int calibration_height, float overscan, bool undistort)
{
ImBuf *resibuf;
@@ -2038,7 +2042,7 @@ ImBuf *BKE_tracking_undistort_frame(MovieTracking *tracking, ImBuf *ibuf, int ca
camera->intrinsics = BKE_tracking_distortion_new();
return BKE_tracking_distortion_exec(camera->intrinsics, tracking, ibuf, calibration_width,
- calibration_height, overscan, TRUE);
+ calibration_height, overscan, true);
}
ImBuf *BKE_tracking_distort_frame(MovieTracking *tracking, ImBuf *ibuf, int calibration_width,
@@ -2050,7 +2054,7 @@ ImBuf *BKE_tracking_distort_frame(MovieTracking *tracking, ImBuf *ibuf, int cali
camera->intrinsics = BKE_tracking_distortion_new();
return BKE_tracking_distortion_exec(camera->intrinsics, tracking, ibuf, calibration_width,
- calibration_height, overscan, FALSE);
+ calibration_height, overscan, false);
}
void BKE_tracking_max_undistortion_delta_across_bound(MovieTracking *tracking, rcti *rect, float delta[2])
@@ -2071,8 +2075,8 @@ void BKE_tracking_max_undistortion_delta_across_bound(MovieTracking *tracking, r
BKE_tracking_undistort_v2(tracking, pos, warped_pos);
- delta[0] = max_ff(delta[0], fabs(pos[0] - warped_pos[0]));
- delta[1] = max_ff(delta[1], fabs(pos[1] - warped_pos[1]));
+ delta[0] = max_ff(delta[0], fabsf(pos[0] - warped_pos[0]));
+ delta[1] = max_ff(delta[1], fabsf(pos[1] - warped_pos[1]));
/* top edge */
pos[0] = a;
@@ -2080,8 +2084,8 @@ void BKE_tracking_max_undistortion_delta_across_bound(MovieTracking *tracking, r
BKE_tracking_undistort_v2(tracking, pos, warped_pos);
- delta[0] = max_ff(delta[0], fabs(pos[0] - warped_pos[0]));
- delta[1] = max_ff(delta[1], fabs(pos[1] - warped_pos[1]));
+ delta[0] = max_ff(delta[0], fabsf(pos[0] - warped_pos[0]));
+ delta[1] = max_ff(delta[1], fabsf(pos[1] - warped_pos[1]));
if (a >= rect->xmax)
break;
@@ -2097,8 +2101,8 @@ void BKE_tracking_max_undistortion_delta_across_bound(MovieTracking *tracking, r
BKE_tracking_undistort_v2(tracking, pos, warped_pos);
- delta[0] = max_ff(delta[0], fabs(pos[0] - warped_pos[0]));
- delta[1] = max_ff(delta[1], fabs(pos[1] - warped_pos[1]));
+ delta[0] = max_ff(delta[0], fabsf(pos[0] - warped_pos[0]));
+ delta[1] = max_ff(delta[1], fabsf(pos[1] - warped_pos[1]));
/* right edge */
pos[0] = rect->xmax;
@@ -2106,8 +2110,8 @@ void BKE_tracking_max_undistortion_delta_across_bound(MovieTracking *tracking, r
BKE_tracking_undistort_v2(tracking, pos, warped_pos);
- delta[0] = max_ff(delta[0], fabs(pos[0] - warped_pos[0]));
- delta[1] = max_ff(delta[1], fabs(pos[1] - warped_pos[1]));
+ delta[0] = max_ff(delta[0], fabsf(pos[0] - warped_pos[0]));
+ delta[1] = max_ff(delta[1], fabsf(pos[1] - warped_pos[1]));
if (a >= rect->ymax)
break;
@@ -2116,7 +2120,7 @@ void BKE_tracking_max_undistortion_delta_across_bound(MovieTracking *tracking, r
/*********************** Image sampling *************************/
-static void disable_imbuf_channels(ImBuf *ibuf, MovieTrackingTrack *track, int grayscale)
+static void disable_imbuf_channels(ImBuf *ibuf, MovieTrackingTrack *track, bool grayscale)
{
BKE_tracking_disable_channels(ibuf, track->flag & TRACK_DISABLE_RED,
track->flag & TRACK_DISABLE_GREEN,
@@ -2125,7 +2129,7 @@ static void disable_imbuf_channels(ImBuf *ibuf, MovieTrackingTrack *track, int g
ImBuf *BKE_tracking_sample_pattern(int frame_width, int frame_height, ImBuf *search_ibuf,
MovieTrackingTrack *track, MovieTrackingMarker *marker,
- int from_anchor, int use_mask, int num_samples_x, int num_samples_y,
+ bool from_anchor, bool use_mask, int num_samples_x, int num_samples_y,
float pos[2])
{
ImBuf *pattern_ibuf;
@@ -2188,7 +2192,7 @@ ImBuf *BKE_tracking_sample_pattern(int frame_width, int frame_height, ImBuf *sea
}
ImBuf *BKE_tracking_get_pattern_imbuf(ImBuf *ibuf, MovieTrackingTrack *track, MovieTrackingMarker *marker,
- int anchored, int disable_channels)
+ bool anchored, bool disable_channels)
{
ImBuf *pattern_ibuf, *search_ibuf;
float pat_min[2], pat_max[2];
@@ -2203,7 +2207,7 @@ ImBuf *BKE_tracking_get_pattern_imbuf(ImBuf *ibuf, MovieTrackingTrack *track, Mo
if (search_ibuf) {
pattern_ibuf = BKE_tracking_sample_pattern(ibuf->x, ibuf->y, search_ibuf, track, marker,
- anchored, FALSE, num_samples_x, num_samples_y, NULL);
+ anchored, false, num_samples_x, num_samples_y, NULL);
IMB_freeImBuf(search_ibuf);
}
@@ -2215,7 +2219,7 @@ ImBuf *BKE_tracking_get_pattern_imbuf(ImBuf *ibuf, MovieTrackingTrack *track, Mo
}
ImBuf *BKE_tracking_get_search_imbuf(ImBuf *ibuf, MovieTrackingTrack *track, MovieTrackingMarker *marker,
- int anchored, int disable_channels)
+ bool anchored, bool disable_channels)
{
ImBuf *searchibuf;
int x, y, w, h;
@@ -2247,7 +2251,7 @@ ImBuf *BKE_tracking_get_search_imbuf(ImBuf *ibuf, MovieTrackingTrack *track, Mov
(track->flag & TRACK_DISABLE_GREEN) ||
(track->flag & TRACK_DISABLE_BLUE))
{
- disable_imbuf_channels(searchibuf, track, TRUE);
+ disable_imbuf_channels(searchibuf, track, true);
}
}
@@ -2258,8 +2262,8 @@ ImBuf *BKE_tracking_get_search_imbuf(ImBuf *ibuf, MovieTrackingTrack *track, Mov
* better tracks sometimes. however, instead of simply zeroing the channels
* out, do a partial grayscale conversion so the display is better.
*/
-void BKE_tracking_disable_channels(ImBuf *ibuf, int disable_red, int disable_green, int disable_blue,
- int grayscale)
+void BKE_tracking_disable_channels(ImBuf *ibuf, bool disable_red, bool disable_green, bool disable_blue,
+ bool grayscale)
{
int x, y;
float scale;
@@ -2323,7 +2327,7 @@ void BKE_tracking_disable_channels(ImBuf *ibuf, int disable_red, int disable_gre
typedef struct TracksMap {
char object_name[MAX_NAME];
- int is_camera;
+ bool is_camera;
int num_tracks;
int customdata_size;
@@ -2336,7 +2340,7 @@ typedef struct TracksMap {
int ptr;
} TracksMap;
-static TracksMap *tracks_map_new(const char *object_name, int is_camera, int num_tracks, int customdata_size)
+static TracksMap *tracks_map_new(const char *object_name, bool is_camera, int num_tracks, int customdata_size)
{
TracksMap *map = MEM_callocN(sizeof(TracksMap), "TrackingsMap");
@@ -2388,8 +2392,6 @@ static void tracks_map_insert(TracksMap *map, MovieTrackingTrack *track, void *c
static void tracks_map_merge(TracksMap *map, MovieTracking *tracking)
{
MovieTrackingTrack *track;
- MovieTrackingTrack *act_track = BKE_tracking_track_get_active(tracking);
- MovieTrackingTrack *rot_track = tracking->stabilization.rot_track;
ListBase tracks = {NULL, NULL}, new_tracks = {NULL, NULL};
ListBase *old_tracks;
int a;
@@ -2413,61 +2415,49 @@ static void tracks_map_merge(TracksMap *map, MovieTracking *tracking)
* of currently operating tracks (if needed)
*/
for (a = 0; a < map->num_tracks; a++) {
- int replace_sel = 0, replace_rot = 0;
- MovieTrackingTrack *new_track, *old;
+ MovieTrackingTrack *old_track;
+ bool mapped_to_old = false;
track = &map->tracks[a];
/* find original of operating track in list of previously displayed tracks */
- old = BLI_ghash_lookup(map->hash, track);
- if (old) {
- MovieTrackingTrack *cur = old_tracks->first;
-
- while (cur) {
- if (cur == old)
- break;
+ old_track = BLI_ghash_lookup(map->hash, track);
+ if (old_track) {
+ if (BLI_findindex(old_tracks, old_track) != -1) {
+ BLI_remlink(old_tracks, old_track);
- cur = cur->next;
- }
+ /* Copy flags like selection back to the track map. */
+ track->flag = old_track->flag;
+ track->pat_flag = old_track->pat_flag;
+ track->search_flag = old_track->search_flag;
- /* original track was found, re-use flags and remove this track */
- if (cur) {
- if (cur == act_track)
- replace_sel = 1;
- if (cur == rot_track)
- replace_rot = 1;
+ /* Copy all the rest settings back from the map to the actual tracks. */
+ MEM_freeN(old_track->markers);
+ *old_track = *track;
+ old_track->markers = MEM_dupallocN(old_track->markers);
- track->flag = cur->flag;
- track->pat_flag = cur->pat_flag;
- track->search_flag = cur->search_flag;
+ BLI_addtail(&tracks, old_track);
- BKE_tracking_track_free(cur);
- BLI_freelinkN(old_tracks, cur);
+ mapped_to_old = true;
}
}
- new_track = tracking_track_duplicate(track);
-
- BLI_ghash_remove(map->hash, track, NULL, NULL); /* XXX: are we actually need this */
- BLI_ghash_insert(map->hash, track, new_track);
-
- if (replace_sel) /* update current selection in clip */
- tracking->act_track = new_track;
+ if (mapped_to_old == false) {
+ MovieTrackingTrack *new_track = tracking_track_duplicate(track);
- if (replace_rot) /* update track used for rotation stabilization */
- tracking->stabilization.rot_track = new_track;
+ /* Update old-new track mapping */
+ BLI_ghash_remove(map->hash, track, NULL, NULL);
+ BLI_ghash_insert(map->hash, track, new_track);
- BLI_addtail(&tracks, new_track);
+ BLI_addtail(&tracks, new_track);
+ }
}
/* move all tracks, which aren't operating */
track = old_tracks->first;
while (track) {
MovieTrackingTrack *next = track->next;
-
- track->next = track->prev = NULL;
BLI_addtail(&new_tracks, track);
-
track = next;
}
@@ -2530,13 +2520,13 @@ typedef struct MovieTrackingContext {
MovieClip *clip;
int clip_flag;
- int frames;
+ int frames, first_frame;
bool first_time;
MovieTrackingSettings settings;
TracksMap *tracks_map;
- short backwards, sequence;
+ bool backwards, sequence;
int sync_frame;
} MovieTrackingContext;
@@ -2570,6 +2560,7 @@ MovieTrackingContext *BKE_tracking_context_new(MovieClip *clip, MovieClipUser *u
context->backwards = backwards;
context->sync_frame = user->framenr;
context->first_time = true;
+ context->first_frame = user->framenr;
context->sequence = sequence;
/* count */
@@ -2727,7 +2718,7 @@ static float *track_get_search_floatbuf(ImBuf *ibuf, MovieTrackingTrack *track,
float *gray_pixels;
int width, height;
- searchibuf = BKE_tracking_get_search_imbuf(ibuf, track, marker, FALSE, TRUE);
+ searchibuf = BKE_tracking_get_search_imbuf(ibuf, track, marker, false, true);
if (!searchibuf) {
*width_r = 0;
@@ -2913,19 +2904,24 @@ static void tracking_configure_tracker(const MovieTrackingTrack *track, float *m
static bool tracking_check_marker_margin(MovieTrackingTrack *track, MovieTrackingMarker *marker,
int frame_width, int frame_height)
{
- float pat_min[2], pat_max[2], dim[2], margin[2];
+ float pat_min[2], pat_max[2];
+ float margin_left, margin_top, margin_right, margin_bottom;
+ float normalized_track_margin[2];
/* margin from frame boundaries */
BKE_tracking_marker_pattern_minmax(marker, pat_min, pat_max);
- sub_v2_v2v2(dim, pat_max, pat_min);
- margin[0] = margin[1] = max_ff(dim[0], dim[1]) / 2.0f;
- margin[0] = max_ff(margin[0], (float)track->margin / frame_width);
- margin[1] = max_ff(margin[1], (float)track->margin / frame_height);
+ normalized_track_margin[0] = (float)track->margin / frame_width;
+ normalized_track_margin[1] = (float)track->margin / frame_height;
+
+ margin_left = max_ff(-pat_min[0], normalized_track_margin[0]);
+ margin_top = max_ff( pat_max[1], normalized_track_margin[1]);
+ margin_right = max_ff( pat_max[0], normalized_track_margin[0]);
+ margin_bottom = max_ff(-pat_min[1], normalized_track_margin[1]);
/* do not track markers which are too close to boundary */
- if (marker->pos[0] < margin[0] || marker->pos[0] > 1.0f - margin[0] ||
- marker->pos[1] < margin[1] || marker->pos[1] > 1.0f - margin[1])
+ if (marker->pos[0] < margin_left || marker->pos[0] > 1.0f - margin_right ||
+ marker->pos[1] < margin_bottom || marker->pos[1] > 1.0f - margin_top)
{
return false;
}
@@ -3065,7 +3061,7 @@ static bool configure_and_run_tracker(ImBuf *destination_ibuf, MovieTrackingTrac
/* Track all the tracks from context one more frame,
* returns FALSe if nothing was tracked.
*/
-int BKE_tracking_context_step(MovieTrackingContext *context)
+bool BKE_tracking_context_step(MovieTrackingContext *context)
{
ImBuf *destination_ibuf;
int frame_delta = context->backwards ? -1 : 1;
@@ -3079,7 +3075,7 @@ int BKE_tracking_context_step(MovieTrackingContext *context)
/* Nothing to track, avoid unneeded frames reading to save time and memory. */
if (!map_size)
- return FALSE;
+ return false;
/* Get an image buffer for frame we're tracking to. */
context->user.framenr += frame_delta;
@@ -3087,7 +3083,7 @@ int BKE_tracking_context_step(MovieTrackingContext *context)
destination_ibuf = BKE_movieclip_get_ibuf_flag(context->clip, &context->user,
context->clip_flag, MOVIECLIP_CACHE_SKIP);
if (!destination_ibuf)
- return FALSE;
+ return false;
frame_width = destination_ibuf->x;
frame_height = destination_ibuf->y;
@@ -3149,12 +3145,50 @@ int BKE_tracking_context_step(MovieTrackingContext *context)
return ok;
}
+void BKE_tracking_context_finish(MovieTrackingContext *context)
+{
+ MovieClip *clip = context->clip;
+ ListBase *plane_tracks_base = BKE_tracking_get_active_plane_tracks(&clip->tracking);
+ MovieTrackingPlaneTrack *plane_track;
+ int map_size = tracks_map_get_size(context->tracks_map);
+
+ for (plane_track = plane_tracks_base->first;
+ plane_track;
+ plane_track = plane_track->next)
+ {
+ if ((plane_track->flag & PLANE_TRACK_AUTOKEY) == 0) {
+ int i;
+ for (i = 0; i < map_size; i++) {
+ TrackContext *track_context = NULL;
+ MovieTrackingTrack *track, *old_track;
+ bool do_update = false;
+ int j;
+
+ tracks_map_get_indexed_element(context->tracks_map, i, &track, (void **)&track_context);
+
+ old_track = BLI_ghash_lookup(context->tracks_map->hash, track);
+ for (j = 0; j < plane_track->point_tracksnr; j++) {
+ if (plane_track->point_tracks[j] == old_track) {
+ do_update = true;
+ break;
+ }
+ }
+
+ if (do_update) {
+ BKE_tracking_track_plane_from_existing_motion(plane_track, context->first_frame);
+ break;
+ }
+ }
+ }
+ }
+}
+
/* Refine marker's position using previously known keyframe.
* Direction of searching for a keyframe depends on backwards flag,
* which means if backwards is false, previous keyframe will be as
* reference.
*/
-void BKE_tracking_refine_marker(MovieClip *clip, MovieTrackingTrack *track, MovieTrackingMarker *marker, int backwards)
+void BKE_tracking_refine_marker(MovieClip *clip, MovieTrackingTrack *track, MovieTrackingMarker *marker, bool backwards)
{
MovieTrackingMarker *reference_marker = NULL;
ImBuf *reference_ibuf, *destination_ibuf;
@@ -3172,7 +3206,7 @@ void BKE_tracking_refine_marker(MovieClip *clip, MovieTrackingTrack *track, Movi
BKE_movieclip_get_size(clip, &user, &frame_width, &frame_height);
- /* Get an image buffer for reference frame, also gets referecnce marker.
+ /* Get an image buffer for reference frame, also gets reference marker.
*
* Usually tracking_context_get_reference_ibuf will return current frame
* if marker is keyframed, which is correct for normal tracking. But here
@@ -3340,30 +3374,35 @@ static int point_markers_correspondences_on_both_image(MovieTrackingPlaneTrack *
return correspondence_index;
}
-/* TODO(sergey): Make it generic function available for everyone. */
-BLI_INLINE void mat3f_from_mat3d(float mat_float[3][3], double mat_double[3][3])
-{
- /* Keep it stupid simple for better data flow in CPU. */
- mat_float[0][0] = mat_double[0][0];
- mat_float[0][1] = mat_double[0][1];
- mat_float[0][2] = mat_double[0][2];
-
- mat_float[1][0] = mat_double[1][0];
- mat_float[1][1] = mat_double[1][1];
- mat_float[1][2] = mat_double[1][2];
-
- mat_float[2][0] = mat_double[2][0];
- mat_float[2][1] = mat_double[2][1];
- mat_float[2][2] = mat_double[2][2];
-}
-
/* NOTE: frame number should be in clip space, not scene space */
-static void track_plane_from_existing_motion(MovieTrackingPlaneTrack *plane_track, int start_frame, int direction)
+static void track_plane_from_existing_motion(MovieTrackingPlaneTrack *plane_track, int start_frame,
+ int direction, bool retrack)
{
MovieTrackingPlaneMarker *start_plane_marker = BKE_tracking_plane_marker_get(plane_track, start_frame);
+ MovieTrackingPlaneMarker *keyframe_plane_marker = NULL;
MovieTrackingPlaneMarker new_plane_marker;
int current_frame, frame_delta = direction > 0 ? 1 : -1;
+ if (plane_track->flag & PLANE_TRACK_AUTOKEY) {
+ /* Find a keyframe in given direction. */
+ for (current_frame = start_frame; ; current_frame += frame_delta) {
+ MovieTrackingPlaneMarker *next_plane_marker =
+ BKE_tracking_plane_marker_get_exact(plane_track, current_frame + frame_delta);
+
+ if (next_plane_marker == NULL) {
+ break;
+ }
+
+ if ((next_plane_marker->flag & PLANE_MARKER_TRACKED) == 0) {
+ keyframe_plane_marker = next_plane_marker;
+ break;
+ }
+ }
+ }
+ else {
+ start_plane_marker->flag |= PLANE_MARKER_TRACKED;
+ }
+
new_plane_marker = *start_plane_marker;
new_plane_marker.flag |= PLANE_MARKER_TRACKED;
@@ -3377,7 +3416,10 @@ static void track_plane_from_existing_motion(MovieTrackingPlaneTrack *plane_trac
/* As soon as we meet keyframed plane, we stop updating the sequence. */
if (next_plane_marker && (next_plane_marker->flag & PLANE_MARKER_TRACKED) == 0) {
- break;
+ /* Don't override keyframes if track is in auto-keyframe mode */
+ if (plane_track->flag & PLANE_TRACK_AUTOKEY) {
+ break;
+ }
}
num_correspondences =
@@ -3391,9 +3433,9 @@ static void track_plane_from_existing_motion(MovieTrackingPlaneTrack *plane_trac
break;
}
- libmv_homography2DFromCorrespondencesLinear(x1, x2, num_correspondences, H_double, 1e-8);
+ libmv_homography2DFromCorrespondencesEuc(x1, x2, num_correspondences, H_double);
- mat3f_from_mat3d(H, H_double);
+ copy_m3_m3d(H, H_double);
for (i = 0; i < 4; i++) {
float vec[3] = {0.0f, 0.0f, 1.0f}, vec2[3];
@@ -3411,6 +3453,21 @@ static void track_plane_from_existing_motion(MovieTrackingPlaneTrack *plane_trac
new_plane_marker.framenr = current_frame + frame_delta;
+ if (!retrack && keyframe_plane_marker &&
+ next_plane_marker &&
+ (plane_track->flag & PLANE_TRACK_AUTOKEY))
+ {
+ float fac = ((float) next_plane_marker->framenr - start_plane_marker->framenr) /
+ ((float) keyframe_plane_marker->framenr - start_plane_marker->framenr);
+
+ fac = 3 * fac * fac - 2 * fac * fac * fac;
+
+ for (i = 0; i < 4; i++) {
+ interp_v2_v2v2(new_plane_marker.corners[i], new_plane_marker.corners[i],
+ next_plane_marker->corners[i], fac);
+ }
+ }
+
BKE_tracking_plane_marker_insert(plane_track, &new_plane_marker);
MEM_freeN(x1);
@@ -3421,8 +3478,47 @@ static void track_plane_from_existing_motion(MovieTrackingPlaneTrack *plane_trac
/* NOTE: frame number should be in clip space, not scene space */
void BKE_tracking_track_plane_from_existing_motion(MovieTrackingPlaneTrack *plane_track, int start_frame)
{
- track_plane_from_existing_motion(plane_track, start_frame, 1);
- track_plane_from_existing_motion(plane_track, start_frame, -1);
+ track_plane_from_existing_motion(plane_track, start_frame, 1, false);
+ track_plane_from_existing_motion(plane_track, start_frame, -1, false);
+}
+
+static MovieTrackingPlaneMarker *find_plane_keyframe(MovieTrackingPlaneTrack *plane_track,
+ int start_frame, int direction)
+{
+ MovieTrackingPlaneMarker *plane_marker = BKE_tracking_plane_marker_get(plane_track, start_frame);
+ int index = plane_marker - plane_track->markers;
+ int frame_delta = direction > 0 ? 1 : -1;
+
+ while (index >= 0 && index < plane_track->markersnr) {
+ if ((plane_marker->flag & PLANE_MARKER_TRACKED) == 0) {
+ return plane_marker;
+ }
+ plane_marker += frame_delta;
+ }
+
+ return NULL;
+}
+
+void BKE_tracking_retrack_plane_from_existing_motion_at_segment(MovieTrackingPlaneTrack *plane_track, int start_frame)
+{
+ MovieTrackingPlaneMarker *prev_plane_keyframe, *next_plane_keyframe;
+
+ prev_plane_keyframe = find_plane_keyframe(plane_track, start_frame, -1);
+ next_plane_keyframe = find_plane_keyframe(plane_track, start_frame, 1);
+
+ if (prev_plane_keyframe != NULL && next_plane_keyframe != NULL) {
+ /* First we track from left keyframe to the right one without any blending. */
+ track_plane_from_existing_motion(plane_track, prev_plane_keyframe->framenr, 1, true);
+
+ /* And then we track from the right keyframe to the left one, so shape blends in nicely */
+ track_plane_from_existing_motion(plane_track, next_plane_keyframe->framenr, -1, false);
+ }
+ else if (prev_plane_keyframe != NULL) {
+ track_plane_from_existing_motion(plane_track, prev_plane_keyframe->framenr, 1, true);
+ }
+ else if (next_plane_keyframe != NULL) {
+ track_plane_from_existing_motion(plane_track, next_plane_keyframe->framenr, -1, true);
+ }
}
BLI_INLINE void float_corners_to_double(/*const*/ float corners[4][2], double double_corners[4][2])
@@ -3441,9 +3537,9 @@ void BKE_tracking_homography_between_two_quads(/*const*/ float reference_corners
float_corners_to_double(reference_corners, x1);
float_corners_to_double(corners, x2);
- libmv_homography2DFromCorrespondencesLinear(x1, x2, 4, H_double, 1e-8);
+ libmv_homography2DFromCorrespondencesEuc(x1, x2, 4, H_double);
- mat3f_from_mat3d(H, H_double);
+ copy_m3_m3d(H, H_double);
}
/*********************** Camera solving *************************/
@@ -3452,12 +3548,12 @@ typedef struct MovieReconstructContext {
struct libmv_Tracks *tracks;
bool select_keyframes;
int keyframe1, keyframe2;
- short refine_flags;
+ int refine_flags;
struct libmv_Reconstruction *reconstruction;
char object_name[MAX_NAME];
- int is_camera;
+ bool is_camera;
short motion_flag;
float focal_length;
@@ -3470,9 +3566,6 @@ typedef struct MovieReconstructContext {
TracksMap *tracks_map;
- float success_threshold;
- int use_fallback_reconstruction;
-
int sfra, efra;
} MovieReconstructContext;
@@ -3485,7 +3578,7 @@ typedef struct ReconstructProgressData {
} ReconstructProgressData;
/* Create new libmv Tracks structure from blender's tracks list. */
-static struct libmv_Tracks *libmv_tracks_new(ListBase *tracksbase, int width, int height)
+static struct libmv_Tracks *libmv_tracks_new(MovieClip *clip, ListBase *tracksbase, int width, int height)
{
int tracknr = 0;
MovieTrackingTrack *track;
@@ -3493,15 +3586,28 @@ static struct libmv_Tracks *libmv_tracks_new(ListBase *tracksbase, int width, in
track = tracksbase->first;
while (track) {
+ FCurve *weight_fcurve;
int a = 0;
+ weight_fcurve = id_data_find_fcurve(&clip->id, track, &RNA_MovieTrackingTrack,
+ "weight", 0, NULL);
+
for (a = 0; a < track->markersnr; a++) {
MovieTrackingMarker *marker = &track->markers[a];
if ((marker->flag & MARKER_DISABLED) == 0) {
+ float weight = track->weight;
+
+ if (weight_fcurve) {
+ int scene_framenr =
+ BKE_movieclip_remap_clip_to_scene_frame(clip, marker->framenr);
+ weight = evaluate_fcurve(weight_fcurve, scene_framenr);
+ }
+
libmv_tracksInsert(tracks, marker->framenr, tracknr,
(marker->pos[0] + track->offset[0]) * width,
- (marker->pos[1] + track->offset[1]) * height);
+ (marker->pos[1] + track->offset[1]) * height,
+ weight);
}
}
@@ -3540,7 +3646,7 @@ static void reconstruct_retrieve_libmv_intrinsics(MovieReconstructContext *conte
* Actually, this also copies reconstructed cameras
* from libmv to movie clip datablock.
*/
-static int reconstruct_retrieve_libmv_tracks(MovieReconstructContext *context, MovieTracking *tracking)
+static bool reconstruct_retrieve_libmv_tracks(MovieReconstructContext *context, MovieTracking *tracking)
{
struct libmv_Reconstruction *libmv_reconstruction = context->reconstruction;
MovieTrackingReconstruction *reconstruction = NULL;
@@ -3582,7 +3688,7 @@ static int reconstruct_retrieve_libmv_tracks(MovieReconstructContext *context, M
track->flag &= ~TRACK_HAS_BUNDLE;
ok = false;
- printf("No bundle for track #%d '%s'\n", tracknr, track->name);
+ printf("Unable to reconstruct position for track #%d '%s'\n", tracknr, track->name);
}
track = track->next;
@@ -3717,12 +3823,12 @@ static int reconstruct_count_tracks_on_both_keyframes(MovieTracking *tracking, M
}
/* Perform early check on whether everything is fine to start reconstruction. */
-int BKE_tracking_reconstruction_check(MovieTracking *tracking, MovieTrackingObject *object,
- char *error_msg, int error_size)
+bool BKE_tracking_reconstruction_check(MovieTracking *tracking, MovieTrackingObject *object,
+ char *error_msg, int error_size)
{
if (tracking->settings.motion_flag & TRACKING_MOTION_MODAL) {
/* TODO: check for number of tracks? */
- return TRUE;
+ return true;
}
else if ((tracking->settings.reconstruction_flag & TRACKING_USE_KEYFRAME_SELECTION) == 0) {
/* automatic keyframe selection does not require any pre-process checks */
@@ -3731,16 +3837,16 @@ int BKE_tracking_reconstruction_check(MovieTracking *tracking, MovieTrackingObje
N_("At least 8 common tracks on both of keyframes are needed for reconstruction"),
error_size);
- return FALSE;
+ return false;
}
}
#ifndef WITH_LIBMV
BLI_strncpy(error_msg, N_("Blender is compiled without motion tracking library"), error_size);
- return FALSE;
+ return false;
#endif
- return TRUE;
+ return true;
}
/* Create context for camera/object motion reconstruction.
@@ -3748,9 +3854,10 @@ int BKE_tracking_reconstruction_check(MovieTracking *tracking, MovieTrackingObje
* clip datablock, so editing this clip is safe during
* reconstruction job is in progress.
*/
-MovieReconstructContext *BKE_tracking_reconstruction_context_new(MovieTracking *tracking, MovieTrackingObject *object,
+MovieReconstructContext *BKE_tracking_reconstruction_context_new(MovieClip *clip, MovieTrackingObject *object,
int keyframe1, int keyframe2, int width, int height)
{
+ MovieTracking *tracking = &clip->tracking;
MovieReconstructContext *context = MEM_callocN(sizeof(MovieReconstructContext), "MovieReconstructContext data");
MovieTrackingCamera *camera = &tracking->camera;
ListBase *tracksbase = BKE_tracking_object_get_tracks(tracking, object);
@@ -3777,9 +3884,6 @@ MovieReconstructContext *BKE_tracking_reconstruction_context_new(MovieTracking *
context->k2 = camera->k2;
context->k3 = camera->k3;
- context->success_threshold = tracking->settings.reconstruction_success_threshold;
- context->use_fallback_reconstruction = tracking->settings.reconstruction_flag & TRACKING_USE_FALLBACK_RECONSTRUCTION;
-
context->tracks_map = tracks_map_new(context->object_name, context->is_camera, num_tracks, 0);
track = tracksbase->first;
@@ -3814,7 +3918,7 @@ MovieReconstructContext *BKE_tracking_reconstruction_context_new(MovieTracking *
context->sfra = sfra;
context->efra = efra;
- context->tracks = libmv_tracks_new(tracksbase, width, height * aspy);
+ context->tracks = libmv_tracks_new(clip, tracksbase, width, height * aspy);
context->keyframe1 = keyframe1;
context->keyframe2 = keyframe2;
context->refine_flags = reconstruct_refine_intrinsics_get_flags(tracking, object);
@@ -3874,9 +3978,6 @@ static void reconstructionOptionsFromContext(libmv_ReconstructionOptions *recons
reconstruction_options->keyframe2 = context->keyframe2;
reconstruction_options->refine_intrinsics = context->refine_flags;
-
- reconstruction_options->success_threshold = context->success_threshold;
- reconstruction_options->use_fallback_reconstruction = context->use_fallback_reconstruction;
}
/* Solve camera/object motion and reconstruct 3D markers position
@@ -3934,7 +4035,7 @@ void BKE_tracking_reconstruction_solve(MovieReconstructContext *context, short *
/* Finish reconstruction process by copying reconstructed data
* to an actual movie clip datablock.
*/
-int BKE_tracking_reconstruction_finish(MovieReconstructContext *context, MovieTracking *tracking)
+bool BKE_tracking_reconstruction_finish(MovieReconstructContext *context, MovieTracking *tracking)
{
MovieTrackingReconstruction *reconstruction;
MovieTrackingObject *object;
@@ -3959,9 +4060,9 @@ int BKE_tracking_reconstruction_finish(MovieReconstructContext *context, MovieTr
reconstruction->flag |= TRACKING_RECONSTRUCTED;
if (!reconstruct_retrieve_libmv(context, tracking))
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
static void tracking_scale_reconstruction(ListBase *tracksbase, MovieTrackingReconstruction *reconstruction,
@@ -4126,7 +4227,7 @@ static unsigned char *detect_get_frame_ucharbuf(ImBuf *ibuf)
/* Detect features using FAST detector */
void BKE_tracking_detect_fast(MovieTracking *tracking, ListBase *tracksbase, ImBuf *ibuf,
int framenr, int margin, int min_trackness, int min_distance, bGPDlayer *layer,
- int place_outside_layer)
+ bool place_outside_layer)
{
struct libmv_Features *features;
unsigned char *pixels = detect_get_frame_ucharbuf(ibuf);
@@ -4138,14 +4239,14 @@ void BKE_tracking_detect_fast(MovieTracking *tracking, ListBase *tracksbase, ImB
detect_retrieve_libmv_features(tracking, tracksbase, features,
framenr, ibuf->x, ibuf->y, layer,
- place_outside_layer ? true : false);
+ place_outside_layer);
libmv_featuresDestroy(features);
}
/*********************** 2D stabilization *************************/
-/* Claculate median point of markers of tracks marked as used for
+/* Calculate median point of markers of tracks marked as used for
* 2D stabilization.
*
* NOTE: frame number should be in clip space, not scene space
@@ -4183,7 +4284,7 @@ static bool stabilization_median_point_get(MovieTracking *tracking, int framenr,
*
* NOTE: frame number should be in clip space, not scene space
*/
-static void stabilization_calculate_data(MovieTracking *tracking, int framenr, float width, float height,
+static void stabilization_calculate_data(MovieTracking *tracking, int framenr, int width, int height,
float firstmedian[2], float median[2],
float translation[2], float *scale, float *angle)
{
@@ -4213,7 +4314,7 @@ static void stabilization_calculate_data(MovieTracking *tracking, int framenr, f
b[0] *= width;
b[1] *= height;
- *angle = -atan2(a[0] * b[1] - a[1] * b[0], a[0] * b[0] + a[1] * b[1]);
+ *angle = -atan2f(a[0] * b[1] - a[1] * b[0], a[0] * b[0] + a[1] * b[1]);
*angle *= stab->rotinf;
/* convert to rotation around image center */
@@ -4273,8 +4374,8 @@ static float stabilization_calculate_autoscale_factor(MovieTracking *tracking, i
BKE_tracking_stabilization_data_to_mat4(width, height, aspect, translation, 1.0f, angle, mat);
- si = sin(angle);
- co = cos(angle);
+ si = sinf(angle);
+ co = cosf(angle);
for (i = 0; i < 4; i++) {
int j;
@@ -4413,7 +4514,7 @@ ImBuf *BKE_tracking_stabilize_frame(MovieTracking *tracking, int framenr, ImBuf
float tloc[2], tscale, tangle;
MovieTrackingStabilization *stab = &tracking->stabilization;
ImBuf *tmpibuf;
- float width = ibuf->x, height = ibuf->y;
+ int width = ibuf->x, height = ibuf->y;
float aspect = tracking->camera.pixel_aspect;
float mat[4][4];
int j, filter = tracking->stabilization.filter;
@@ -4475,7 +4576,7 @@ ImBuf *BKE_tracking_stabilize_frame(MovieTracking *tracking, int framenr, ImBuf
for (j = 0; j < tmpibuf->y; j++) {
int i;
for (i = 0; i < tmpibuf->x; i++) {
- float vec[3] = {i, j, 0};
+ float vec[3] = {i, j, 0.0f};
mul_v3_m4v3(vec, mat, vec);
@@ -4502,7 +4603,7 @@ ImBuf *BKE_tracking_stabilize_frame(MovieTracking *tracking, int framenr, ImBuf
* stabilization data and used for easy coordinate
* transformation.
*
- * NOTE: The reaosn it is 4x4 matrix is because it's
+ * NOTE: The reason it is 4x4 matrix is because it's
* used for OpenGL drawing directly.
*/
void BKE_tracking_stabilization_data_to_mat4(int width, int height, float aspect,
@@ -4752,7 +4853,7 @@ static void tracking_dopesheet_channels_calc(MovieTracking *tracking)
/* Sot dopesheet channels using given method (name, average error, total coverage,
* longest tracked segment) and could also inverse the list if it's enabled.
*/
-static void tracking_dopesheet_channels_sort(MovieTracking *tracking, int sort_method, int inverse)
+static void tracking_dopesheet_channels_sort(MovieTracking *tracking, int sort_method, bool inverse)
{
MovieTrackingDopesheet *dopesheet = &tracking->dopesheet;
@@ -4889,7 +4990,7 @@ void BKE_tracking_dopesheet_update(MovieTracking *tracking)
MovieTrackingDopesheet *dopesheet = &tracking->dopesheet;
short sort_method = dopesheet->sort_method;
- short inverse = dopesheet->flag & TRACKING_DOPE_SORT_INVERSE;
+ bool inverse = (dopesheet->flag & TRACKING_DOPE_SORT_INVERSE) != 0;
if (dopesheet->ok)
return;
diff --git a/source/blender/blenkernel/intern/treehash.c b/source/blender/blenkernel/intern/treehash.c
new file mode 100644
index 00000000000..d1e9da72208
--- /dev/null
+++ b/source/blender/blenkernel/intern/treehash.c
@@ -0,0 +1,164 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor(s): Blender Foundation 2013
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file treehash.c
+ * \ingroup bke
+ *
+ * Tree hash for the outliner space.
+ */
+
+#include <stdlib.h>
+
+#include "BKE_treehash.h"
+
+#include "BLI_utildefines.h"
+#include "BLI_ghash.h"
+#include "BLI_mempool.h"
+
+#include "DNA_outliner_types.h"
+
+#include "MEM_guardedalloc.h"
+
+typedef struct TseGroup
+{
+ TreeStoreElem **elems;
+ int size;
+ int allocated;
+} TseGroup;
+
+/* Allocate structure for TreeStoreElements;
+ * Most of elements in treestore have no duplicates,
+ * so there is no need to preallocate memory for more than one pointer */
+static TseGroup *tse_group_create(void)
+{
+ TseGroup *tse_group = MEM_mallocN(sizeof(TseGroup), "TseGroup");
+ tse_group->elems = MEM_mallocN(sizeof(TreeStoreElem *), "TseGroupElems");
+ tse_group->size = 0;
+ tse_group->allocated = 1;
+ return tse_group;
+}
+
+static void tse_group_add(TseGroup *tse_group, TreeStoreElem *elem)
+{
+ if (tse_group->size == tse_group->allocated) {
+ tse_group->allocated *= 2;
+ tse_group->elems = MEM_reallocN(tse_group->elems, sizeof(TreeStoreElem *) * tse_group->allocated);
+ }
+ tse_group->elems[tse_group->size] = elem;
+ tse_group->size++;
+}
+
+static void tse_group_free(TseGroup *tse_group)
+{
+ MEM_freeN(tse_group->elems);
+ MEM_freeN(tse_group);
+}
+
+static unsigned int tse_hash(const void *ptr)
+{
+ const TreeStoreElem *tse = ptr;
+ unsigned int hash;
+ BLI_assert(tse->type || !tse->nr);
+ hash = BLI_ghashutil_inthash(SET_INT_IN_POINTER((tse->nr << 16) + tse->type));
+ hash ^= BLI_ghashutil_inthash(tse->id);
+ return hash;
+}
+
+static int tse_cmp(const void *a, const void *b)
+{
+ const TreeStoreElem *tse_a = a;
+ const TreeStoreElem *tse_b = b;
+ return tse_a->type != tse_b->type || tse_a->nr != tse_b->nr || tse_a->id != tse_b->id;
+}
+
+static void fill_treehash(void *treehash, BLI_mempool *treestore)
+{
+ TreeStoreElem *tselem;
+ BLI_mempool_iter iter;
+ BLI_mempool_iternew(treestore, &iter);
+ while ((tselem = BLI_mempool_iterstep(&iter))) {
+ BKE_treehash_add_element(treehash, tselem);
+ }
+}
+
+void *BKE_treehash_create_from_treestore(BLI_mempool *treestore)
+{
+ GHash *treehash = BLI_ghash_new_ex(tse_hash, tse_cmp, "treehash", BLI_mempool_count(treestore));
+ fill_treehash(treehash, treestore);
+ return treehash;
+}
+
+static void free_treehash_group(void *key)
+{
+ tse_group_free(key);
+}
+
+void *BKE_treehash_rebuild_from_treestore(void *treehash, BLI_mempool *treestore)
+{
+ BLI_ghash_clear_ex(treehash, NULL, free_treehash_group, BLI_mempool_count(treestore));
+ fill_treehash(treehash, treestore);
+ return treehash;
+}
+
+void BKE_treehash_add_element(void *treehash, TreeStoreElem *elem)
+{
+ TseGroup *group = BLI_ghash_lookup(treehash, elem);
+ if (!group) {
+ group = tse_group_create();
+ BLI_ghash_insert(treehash, elem, group);
+ }
+ tse_group_add(group, elem);
+}
+
+static TseGroup *BKE_treehash_lookup_group(GHash *th, short type, short nr, struct ID *id)
+{
+ TreeStoreElem tse_template;
+ tse_template.type = type;
+ tse_template.nr = type ? nr : 0; // we're picky! :)
+ tse_template.id = id;
+ return BLI_ghash_lookup(th, &tse_template);
+}
+
+TreeStoreElem *BKE_treehash_lookup_unused(void *treehash, short type, short nr, struct ID *id)
+{
+ TseGroup *group = BKE_treehash_lookup_group(treehash, type, nr, id);
+ if (group) {
+ int i;
+ for (i = 0; i < group->size; i++) {
+ if (!group->elems[i]->used) {
+ return group->elems[i];
+ }
+ }
+ }
+ return NULL;
+}
+
+TreeStoreElem *BKE_treehash_lookup_any(void *treehash, short type, short nr, struct ID *id)
+{
+ TseGroup *group = BKE_treehash_lookup_group(treehash, type, nr, id);
+ return group ? group->elems[0] : NULL;
+}
+
+void BKE_treehash_free(void *treehash)
+{
+ BLI_ghash_free(treehash, NULL, free_treehash_group);
+}
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index 538c98cc899..ebd6bc01bea 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -1254,9 +1254,7 @@ void BKE_ffmpeg_property_del(RenderData *rd, void *type, void *prop_)
group = IDP_GetPropertyFromGroup(rd->ffcodecdata.properties, type);
if (group && prop) {
- IDP_RemFromGroup(group, prop);
- IDP_FreeProperty(prop);
- MEM_freeN(prop);
+ IDP_FreeFromGroup(group, prop);
}
}
diff --git a/source/blender/blenlib/BLI_alloca.h b/source/blender/blenlib/BLI_alloca.h
index b93f5b7123e..06c3e8d8996 100644
--- a/source/blender/blenlib/BLI_alloca.h
+++ b/source/blender/blenlib/BLI_alloca.h
@@ -19,6 +19,7 @@
*/
#ifndef __BLI_ALLOCA_H__
+#define __BLI_ALLOCA_H__
/** \file BLI_alloca.h
* \ingroup bli
diff --git a/source/blender/blenlib/BLI_array.h b/source/blender/blenlib/BLI_array.h
index 566fc95eb4f..4110c85c2a5 100644
--- a/source/blender/blenlib/BLI_array.h
+++ b/source/blender/blenlib/BLI_array.h
@@ -13,7 +13,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2008 Blender Foundation.
* All rights reserved.
diff --git a/source/blender/blenlib/BLI_bitmap.h b/source/blender/blenlib/BLI_bitmap.h
index ca98d28cc40..cf10fe53a5d 100644
--- a/source/blender/blenlib/BLI_bitmap.h
+++ b/source/blender/blenlib/BLI_bitmap.h
@@ -26,6 +26,10 @@
#ifndef __BLI_BITMAP_H__
#define __BLI_BITMAP_H__
+/** \file BLI_bitmap.h
+ * \ingroup bli
+ */
+
typedef unsigned int BLI_bitmap;
/* warning: the bitmap does not keep track of its own size or check
@@ -54,17 +58,20 @@ typedef unsigned int BLI_bitmap;
/* get the value of a single bit at '_index' */
#define BLI_BITMAP_GET(_bitmap, _index) \
((_bitmap)[(_index) >> BLI_BITMAP_POWER] & \
- (1 << ((_index) & BLI_BITMAP_MASK)))
+ (1u << ((_index) & BLI_BITMAP_MASK)))
+
+#define BLI_BITMAP_GET_BOOL(_bitmap, _index) \
+ (BLI_BITMAP_GET(_bitmap, _index) != 0)
/* set the value of a single bit at '_index' */
#define BLI_BITMAP_SET(_bitmap, _index) \
((_bitmap)[(_index) >> BLI_BITMAP_POWER] |= \
- (1 << ((_index) & BLI_BITMAP_MASK)))
+ (1u << ((_index) & BLI_BITMAP_MASK)))
/* clear the value of a single bit at '_index' */
#define BLI_BITMAP_CLEAR(_bitmap, _index) \
((_bitmap)[(_index) >> BLI_BITMAP_POWER] &= \
- ~(1 << ((_index) & BLI_BITMAP_MASK)))
+ ~(1u << ((_index) & BLI_BITMAP_MASK)))
/* set or clear the value of a single bit at '_index' */
#define BLI_BITMAP_MODIFY(_bitmap, _index, _set) \
diff --git a/source/blender/blenlib/BLI_boxpack2d.h b/source/blender/blenlib/BLI_boxpack2d.h
index 3bc486054f5..b02e3423f88 100644
--- a/source/blender/blenlib/BLI_boxpack2d.h
+++ b/source/blender/blenlib/BLI_boxpack2d.h
@@ -39,14 +39,15 @@ typedef struct BoxPack {
float y;
float w;
float h;
- int index;
/* Verts this box uses
* (BL,TR,TL,BR) / 0,1,2,3 */
struct BoxVert *v[4];
+
+ int index;
} BoxPack;
-void BLI_box_pack_2D(BoxPack *boxarray, const int len, float *tot_width, float *tot_height);
+void BLI_box_pack_2d(BoxPack *boxarray, const unsigned int len, float *tot_width, float *tot_height);
#endif
diff --git a/source/blender/blenlib/BLI_buffer.h b/source/blender/blenlib/BLI_buffer.h
index 461b56e157f..9c4b4b00b24 100644
--- a/source/blender/blenlib/BLI_buffer.h
+++ b/source/blender/blenlib/BLI_buffer.h
@@ -21,21 +21,23 @@
#ifndef __BLI_BUFFER_H__
#define __BLI_BUFFER_H__
-/* Note: this more or less fills same purpose as BLI_array, but makes
+/** \file BLI_buffer.h
+ * \ingroup bli
+ *
+ * \note this more or less fills same purpose as BLI_array, but makes
* it much easier to resize the array outside of the function it was
- * declared in since */
-
-/* Usage examples:
+ * declared in since.
*
- * {
- * BLI_buffer_declare_static(int, my_int_array, BLI_BUFFER_NOP, 32);
+ * Usage examples:
+ * \code
+ * BLI_buffer_declare_static(int, my_int_array, BLI_BUFFER_NOP, 32);
*
- * BLI_buffer_append(my_int_array, int, 42);
- * assert(my_int_array.count == 1);
- * assert(BLI_buffer_at(my_int_array, int, 0) == 42);
+ * BLI_buffer_append(my_int_array, int, 42);
+ * assert(my_int_array.count == 1);
+ * assert(BLI_buffer_at(my_int_array, int, 0) == 42);
*
- * BLI_buffer_free(&my_int_array);
- * }
+ * BLI_buffer_free(&my_int_array);
+ * \endcode
*/
typedef struct {
diff --git a/source/blender/blenlib/BLI_callbacks.h b/source/blender/blenlib/BLI_callbacks.h
index 8a0442c8bc8..8d5ea91c422 100644
--- a/source/blender/blenlib/BLI_callbacks.h
+++ b/source/blender/blenlib/BLI_callbacks.h
@@ -18,7 +18,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/blenlib/BLI_callbacks.h
+/** \file BLI_callbacks.h
* \ingroup bli
*/
@@ -43,6 +43,8 @@ typedef enum {
BLI_CB_EVT_SAVE_POST,
BLI_CB_EVT_SCENE_UPDATE_PRE,
BLI_CB_EVT_SCENE_UPDATE_POST,
+ BLI_CB_EVT_GAME_PRE,
+ BLI_CB_EVT_GAME_POST,
BLI_CB_EVT_TOT
} eCbEvent;
@@ -61,8 +63,4 @@ void BLI_callback_add(bCallbackFuncStore *funcstore, eCbEvent evt);
void BLI_callback_global_init(void);
void BLI_callback_global_finalize(void);
-
-/* This is blenlib internal only, unrelated to above */
-void callLocalErrorCallBack(const char *msg);
-
#endif /* __BLI_CALLBACKS_H__ */
diff --git a/source/blender/blenlib/BLI_compiler_attrs.h b/source/blender/blenlib/BLI_compiler_attrs.h
new file mode 100644
index 00000000000..fc16e7dbba6
--- /dev/null
+++ b/source/blender/blenlib/BLI_compiler_attrs.h
@@ -0,0 +1,88 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2013 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Campbell Barton
+ * Sergey Sharybin
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef __BLI_COMPILER_ATTRS_H__
+#define __BLI_COMPILER_ATTRS_H__
+
+/** \file BLI_compiler_attrs.h
+ * \ingroup bli
+ */
+
+/* hint to make sure function result is actually used */
+#ifdef __GNUC__
+# define ATTR_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
+#else
+# define ATTR_WARN_UNUSED_RESULT
+#endif
+
+/* hint to mark function arguments expected to be non-null
+ * if no arguments are given to the macro, all of pointer
+ * arguments owuld be expected to be non-null
+ */
+#ifdef __GNUC__
+# define ATTR_NONNULL(args ...) __attribute__((nonnull(args)))
+#else
+# define ATTR_NONNULL(...)
+#endif
+
+/* hint to mark function as it wouldn't return */
+#if defined(__GNUC__) || defined(__clang__)
+# define ATTR_NORETURN __attribute__((noreturn))
+#else
+# define ATTR_NORETURN
+#endif
+
+/* hint to treat any non-null function return value cannot alias any other pointer */
+#if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 403))
+# define ATTR_MALLOC __attribute__((malloc))
+#else
+# define ATTR_MALLOC
+#endif
+
+/* the function return value points to memory (2 args for 'size * tot') */
+#if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 403))
+# define ATTR_ALLOC_SIZE(args ...) __attribute__((alloc_size(args)))
+#else
+# define ATTR_ALLOC_SIZE(...)
+#endif
+
+/* ensures a NULL terminating argument as the n'th last argument of a variadic function */
+#ifdef __GNUC__
+# define ATTR_SENTINEL(arg_pos) __attribute__((sentinel(arg_pos)))
+#else
+# define ATTR_SENTINEL(arg_pos)
+#endif
+
+/* hint to compiler that function uses printf-style format string */
+#ifdef __GNUC__
+# define ATTR_PRINTF_FORMAT(format_param, dots_param) __attribute__((format(printf, format_param, dots_param)))
+#else
+# define ATTR_PRINTF_FORMAT(format_param, dots_param)
+#endif
+
+#endif /* __BLI_COMPILER_ATTRS_H__ */
diff --git a/source/blender/compositor/operations/COM_MixBlendOperation.h b/source/blender/blenlib/BLI_convexhull2d.h
index ce3f187a5e2..4b82071ede8 100644
--- a/source/blender/compositor/operations/COM_MixBlendOperation.h
+++ b/source/blender/blenlib/BLI_convexhull2d.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2011, Blender Foundation.
+ * ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -15,31 +15,20 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * ***** END GPL LICENSE BLOCK *****
*/
-#ifndef _COM_MixBlendOperation_h
-#define _COM_MixBlendOperation_h
-#include "COM_MixBaseOperation.h"
+#ifndef __BLI_CONVEXHULL2D_H__
+#define __BLI_CONVEXHULL2D_H__
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
+/** \file BLI_convexhull2d.h
+ * \ingroup bli
*/
-class MixBlendOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixBlendOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-};
-#endif
+int BLI_convexhull_2d_sorted(const float (*points)[2], const int n, int r_points[]);
+int BLI_convexhull_2d(const float (*points)[2], const int n, int r_points[]);
+
+float BLI_convexhull_aabb_fit_hull_2d(const float (*points_hull)[2], unsigned int n);
+float BLI_convexhull_aabb_fit_points_2d(const float (*points)[2], unsigned int n);
+
+#endif /* __BLI_CONVEXHULL2D_H__ */
diff --git a/source/blender/blenlib/BLI_dynstr.h b/source/blender/blenlib/BLI_dynstr.h
index 833c416c1c1..61bdf23cec1 100644
--- a/source/blender/blenlib/BLI_dynstr.h
+++ b/source/blender/blenlib/BLI_dynstr.h
@@ -40,6 +40,8 @@
#include <stdarg.h>
+#include "BLI_compiler_attrs.h"
+
struct DynStr;
/** The abstract DynStr type */
@@ -75,16 +77,8 @@ void BLI_dynstr_nappend(DynStr *ds, const char *cstr, int len);
* \param ds The DynStr to append to.
* \param format The printf format string to use.
*/
-void BLI_dynstr_appendf(DynStr *ds, const char *format, ...)
-#ifdef __GNUC__
-__attribute__ ((format(printf, 2, 3)))
-#endif
-;
-void BLI_dynstr_vappendf(DynStr *ds, const char *format, va_list args)
-#ifdef __GNUC__
-__attribute__ ((format(printf, 2, 0)))
-#endif
-;
+void BLI_dynstr_appendf(DynStr *ds, const char *format, ...) ATTR_PRINTF_FORMAT(2, 3);
+void BLI_dynstr_vappendf(DynStr *ds, const char *format, va_list args) ATTR_PRINTF_FORMAT(2, 0);
/**
* Find the length of a DynStr.
diff --git a/source/blender/blenlib/BLI_edgehash.h b/source/blender/blenlib/BLI_edgehash.h
index 9ece3afde37..2ca011871d8 100644
--- a/source/blender/blenlib/BLI_edgehash.h
+++ b/source/blender/blenlib/BLI_edgehash.h
@@ -29,6 +29,8 @@
* \brief A general unordered 2-int pair hash table ADT.
*/
+#include "BLI_compiler_attrs.h"
+
struct EdgeHash;
struct EdgeHashIterator;
typedef struct EdgeHash EdgeHash;
@@ -36,60 +38,60 @@ typedef struct EdgeHashIterator EdgeHashIterator;
typedef void (*EdgeHashFreeFP)(void *key);
-EdgeHash *BLI_edgehash_new(void);
-void BLI_edgehash_free(EdgeHash *eh, EdgeHashFreeFP valfreefp);
+enum {
+ EDGEHASH_FLAG_ALLOW_DUPES = (1 << 0), /* only checked for in debug mode */
+};
-/* Insert edge (v0,v1) into hash with given value, does
- * not check for duplicates.
- */
+EdgeHash *BLI_edgehash_new_ex(const char *info,
+ const unsigned int nentries_reserve);
+EdgeHash *BLI_edgehash_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
+void BLI_edgehash_free(EdgeHash *eh, EdgeHashFreeFP valfreefp);
void BLI_edgehash_insert(EdgeHash *eh, unsigned int v0, unsigned int v1, void *val);
-
-/* Return value for given edge (v0,v1), or NULL if
- * if key does not exist in hash. (If need exists
- * to differentiate between key-value being NULL and
- * lack of key then see BLI_edgehash_lookup_p().
- */
-void *BLI_edgehash_lookup(EdgeHash *eh, unsigned int v0, unsigned int v1);
-
-/* Return pointer to value for given edge (v0,v1),
- * or NULL if key does not exist in hash.
- */
-void **BLI_edgehash_lookup_p(EdgeHash *eh, unsigned int v0, unsigned int v1);
-
-/* Return boolean true/false if edge (v0,v1) in hash. */
-bool BLI_edgehash_haskey(EdgeHash *eh, unsigned int v0, unsigned int v1);
-
-/* Return number of keys in hash. */
-int BLI_edgehash_size(EdgeHash *eh);
-
-/* Remove all edges from hash. */
+bool BLI_edgehash_reinsert(EdgeHash *eh, unsigned int v0, unsigned int v1, void *val);
+void *BLI_edgehash_lookup(EdgeHash *eh, unsigned int v0, unsigned int v1) ATTR_WARN_UNUSED_RESULT;
+void **BLI_edgehash_lookup_p(EdgeHash *eh, unsigned int v0, unsigned int v1) ATTR_WARN_UNUSED_RESULT;
+bool BLI_edgehash_haskey(EdgeHash *eh, unsigned int v0, unsigned int v1) ATTR_WARN_UNUSED_RESULT;
+int BLI_edgehash_size(EdgeHash *eh) ATTR_WARN_UNUSED_RESULT;
+void BLI_edgehash_clear_ex(EdgeHash *eh, EdgeHashFreeFP valfreefp,
+ const unsigned int nentries_reserve);
void BLI_edgehash_clear(EdgeHash *eh, EdgeHashFreeFP valfreefp);
+void BLI_edgehash_flag_set(EdgeHash *eh, unsigned int flag);
+void BLI_edgehash_flag_clear(EdgeHash *eh, unsigned int flag);
-/***/
-
-/**
- * Create a new EdgeHashIterator. The hash table must not be mutated
- * while the iterator is in use, and the iterator will step exactly
- * BLI_edgehash_size(gh) times before becoming done.
- */
-EdgeHashIterator *BLI_edgehashIterator_new(EdgeHash *eh);
-
-/* Free an EdgeHashIterator. */
+EdgeHashIterator *BLI_edgehashIterator_new(EdgeHash *eh) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
void BLI_edgehashIterator_free(EdgeHashIterator *ehi);
-
-/* Retrieve the key from an iterator. */
void BLI_edgehashIterator_getKey(EdgeHashIterator *ehi, unsigned int *v0_r, unsigned int *v1_r);
+void *BLI_edgehashIterator_getValue(EdgeHashIterator *ehi) ATTR_WARN_UNUSED_RESULT;
+void **BLI_edgehashIterator_getValue_p(EdgeHashIterator *ehi) ATTR_WARN_UNUSED_RESULT;
+void BLI_edgehashIterator_setValue(EdgeHashIterator *ehi, void *val);
+void BLI_edgehashIterator_step(EdgeHashIterator *ehi);
+bool BLI_edgehashIterator_isDone(EdgeHashIterator *ehi) ATTR_WARN_UNUSED_RESULT;
-/* Retrieve the value from an iterator. */
-void *BLI_edgehashIterator_getValue(EdgeHashIterator *ehi);
+#define BLI_EDGEHASH_SIZE_GUESS_FROM_LOOPS(totloop) ((totloop) / 2)
+#define BLI_EDGEHASH_SIZE_GUESS_FROM_POLYS(totpoly) ((totpoly) * 2)
-/* Set the value for an iterator. */
-void BLI_edgehashIterator_setValue(EdgeHashIterator *ehi, void *val);
+/* *** EdgeSet *** */
-/* Steps the iterator to the next index. */
-void BLI_edgehashIterator_step(EdgeHashIterator *ehi);
+struct EdgeSet;
+struct EdgeSetIterator;
+typedef struct EdgeSet EdgeSet;
+typedef struct EdgeSetIterator EdgeSetIterator;
+
+EdgeSet *BLI_edgeset_new_ex(const char *info,
+ const unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
+EdgeSet *BLI_edgeset_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
+int BLI_edgeset_size(EdgeSet *es) ATTR_WARN_UNUSED_RESULT;
+bool BLI_edgeset_reinsert(EdgeSet *es, unsigned int v0, unsigned int v1);
+void BLI_edgeset_insert(EdgeSet *es, unsigned int v0, unsigned int v1);
+bool BLI_edgeset_haskey(EdgeSet *eh, unsigned int v0, unsigned int v1) ATTR_WARN_UNUSED_RESULT;
+void BLI_edgeset_free(EdgeSet *es);
+
+/* rely on inline api for now */
+BLI_INLINE EdgeSetIterator *BLI_edgesetIterator_new(EdgeSet *gs) { return (EdgeSetIterator *)BLI_edgehashIterator_new((EdgeHash *)gs); }
+BLI_INLINE void BLI_edgesetIterator_free(EdgeSetIterator *esi) { BLI_edgehashIterator_free((EdgeHashIterator *)esi); }
+BLI_INLINE void BLI_edgesetIterator_getKey(EdgeSetIterator *esi, unsigned int *v0_r, unsigned int *v1_r) { BLI_edgehashIterator_getKey((EdgeHashIterator *)esi, v0_r, v1_r); }
+BLI_INLINE void BLI_edgesetIterator_step(EdgeSetIterator *esi) { BLI_edgehashIterator_step((EdgeHashIterator *)esi); }
+BLI_INLINE bool BLI_edgesetIterator_isDone(EdgeSetIterator *esi) { return BLI_edgehashIterator_isDone((EdgeHashIterator *)esi); }
-/* Determine if an iterator is done. */
-bool BLI_edgehashIterator_isDone(EdgeHashIterator *ehi);
-#endif
+#endif /* __BLI_EDGEHASH_H__ */
diff --git a/source/blender/blenlib/BLI_endian_switch.h b/source/blender/blenlib/BLI_endian_switch.h
index f48b1b072c3..35242fecf4a 100644
--- a/source/blender/blenlib/BLI_endian_switch.h
+++ b/source/blender/blenlib/BLI_endian_switch.h
@@ -27,35 +27,28 @@
* \ingroup bli
*/
-#ifdef __GNUC__
-# define ATTR_ENDIAN_SWITCH \
- __attribute__((nonnull(1)))
-#else
-# define ATTR_ENDIAN_SWITCH
-#endif
+#include "BLI_compiler_attrs.h"
/* BLI_endian_switch_inline.h */
-BLI_INLINE void BLI_endian_switch_int16(short *val) ATTR_ENDIAN_SWITCH;
-BLI_INLINE void BLI_endian_switch_uint16(unsigned short *val) ATTR_ENDIAN_SWITCH;
-BLI_INLINE void BLI_endian_switch_int32(int *val) ATTR_ENDIAN_SWITCH;
-BLI_INLINE void BLI_endian_switch_uint32(unsigned int *val) ATTR_ENDIAN_SWITCH;
-BLI_INLINE void BLI_endian_switch_float(float *val) ATTR_ENDIAN_SWITCH;
-BLI_INLINE void BLI_endian_switch_int64(int64_t *val) ATTR_ENDIAN_SWITCH;
-BLI_INLINE void BLI_endian_switch_uint64(uint64_t *val) ATTR_ENDIAN_SWITCH;
-BLI_INLINE void BLI_endian_switch_double(double *val) ATTR_ENDIAN_SWITCH;
+BLI_INLINE void BLI_endian_switch_int16(short *val) ATTR_NONNULL(1);
+BLI_INLINE void BLI_endian_switch_uint16(unsigned short *val) ATTR_NONNULL(1);
+BLI_INLINE void BLI_endian_switch_int32(int *val) ATTR_NONNULL(1);
+BLI_INLINE void BLI_endian_switch_uint32(unsigned int *val) ATTR_NONNULL(1);
+BLI_INLINE void BLI_endian_switch_float(float *val) ATTR_NONNULL(1);
+BLI_INLINE void BLI_endian_switch_int64(int64_t *val) ATTR_NONNULL(1);
+BLI_INLINE void BLI_endian_switch_uint64(uint64_t *val) ATTR_NONNULL(1);
+BLI_INLINE void BLI_endian_switch_double(double *val) ATTR_NONNULL(1);
/* endian_switch.c */
-void BLI_endian_switch_int16_array(short *val, const int size) ATTR_ENDIAN_SWITCH;
-void BLI_endian_switch_uint16_array(unsigned short *val, const int size) ATTR_ENDIAN_SWITCH;
-void BLI_endian_switch_int32_array(int *val, const int size) ATTR_ENDIAN_SWITCH;
-void BLI_endian_switch_uint32_array(unsigned int *val, const int size) ATTR_ENDIAN_SWITCH;
-void BLI_endian_switch_float_array(float *val, const int size) ATTR_ENDIAN_SWITCH;
-void BLI_endian_switch_int64_array(int64_t *val, const int size) ATTR_ENDIAN_SWITCH;
-void BLI_endian_switch_uint64_array(uint64_t *val, const int size) ATTR_ENDIAN_SWITCH;
-void BLI_endian_switch_double_array(double *val, const int size) ATTR_ENDIAN_SWITCH;
+void BLI_endian_switch_int16_array(short *val, const int size) ATTR_NONNULL(1);
+void BLI_endian_switch_uint16_array(unsigned short *val, const int size) ATTR_NONNULL(1);
+void BLI_endian_switch_int32_array(int *val, const int size) ATTR_NONNULL(1);
+void BLI_endian_switch_uint32_array(unsigned int *val, const int size) ATTR_NONNULL(1);
+void BLI_endian_switch_float_array(float *val, const int size) ATTR_NONNULL(1);
+void BLI_endian_switch_int64_array(int64_t *val, const int size) ATTR_NONNULL(1);
+void BLI_endian_switch_uint64_array(uint64_t *val, const int size) ATTR_NONNULL(1);
+void BLI_endian_switch_double_array(double *val, const int size) ATTR_NONNULL(1);
#include "BLI_endian_switch_inline.h"
-#undef ATTR_ENDIAN_SWITCH
-
#endif /* __BLI_ENDIAN_SWITCH_H__ */
diff --git a/source/blender/blenlib/BLI_fileops.h b/source/blender/blenlib/BLI_fileops.h
index 0a6d95df40a..ca82086b529 100644
--- a/source/blender/blenlib/BLI_fileops.h
+++ b/source/blender/blenlib/BLI_fileops.h
@@ -43,6 +43,12 @@ extern "C" {
/* for size_t (needed on windows) */
#include <stddef.h>
+#include <limits.h> /* for PATH_MAX */
+
+#ifndef PATH_MAX
+# define PATH_MAX 4096
+#endif
+
struct gzFile;
/* Common */
diff --git a/source/blender/blenlib/BLI_fnmatch.h b/source/blender/blenlib/BLI_fnmatch.h
index 6c466759010..f69f5b39869 100644
--- a/source/blender/blenlib/BLI_fnmatch.h
+++ b/source/blender/blenlib/BLI_fnmatch.h
@@ -28,6 +28,8 @@
extern "C" {
#endif
+#if defined WIN32 && !defined _LIBC || defined __sun
+
#if defined(__cplusplus) || (defined(__STDC__) && __STDC__)
#undef __P
#define __P(protos) protos
@@ -65,6 +67,13 @@ extern "C" {
extern int fnmatch __P((const char *__pattern, const char *__string,
int __flags));
+#else
+# ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+# endif
+# include <fnmatch.h>
+#endif /* defined WIN32 && !defined _LIBC || defined __sun */
+
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/blenlib/BLI_ghash.h b/source/blender/blenlib/BLI_ghash.h
index 3ad0e18c8d7..e5a93691ad0 100644
--- a/source/blender/blenlib/BLI_ghash.h
+++ b/source/blender/blenlib/BLI_ghash.h
@@ -33,6 +33,9 @@
* \brief A general (pointer -> pointer) hash table ADT
*/
+#include "BLI_sys_types.h" /* for bool */
+#include "BLI_compiler_attrs.h"
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -42,97 +45,51 @@ typedef int (*GHashCmpFP) (const void *a, const void *b);
typedef void (*GHashKeyFreeFP) (void *key);
typedef void (*GHashValFreeFP) (void *val);
-typedef struct Entry {
- struct Entry *next;
-
- void *key, *val;
-} Entry;
-
-typedef struct GHash {
- GHashHashFP hashfp;
- GHashCmpFP cmpfp;
-
- Entry **buckets;
- struct BLI_mempool *entrypool;
- unsigned int nbuckets;
- unsigned int nentries, cursize;
-} GHash;
+typedef struct GHash GHash;
typedef struct GHashIterator {
GHash *gh;
- unsigned int curBucket;
struct Entry *curEntry;
+ unsigned int curBucket;
} GHashIterator;
+enum {
+ GHASH_FLAG_ALLOW_DUPES = (1 << 0), /* only checked for in debug mode */
+};
+
/* *** */
-GHash *BLI_ghash_new(GHashHashFP hashfp, GHashCmpFP cmpfp, const char *info);
+GHash *BLI_ghash_new_ex(GHashHashFP hashfp, GHashCmpFP cmpfp, const char *info,
+ const unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
+GHash *BLI_ghash_new(GHashHashFP hashfp, GHashCmpFP cmpfp, const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp);
void BLI_ghash_insert(GHash *gh, void *key, void *val);
-void *BLI_ghash_lookup(GHash *gh, const void *key);
+bool BLI_ghash_reinsert(GHash *gh, void *key, void *val, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp);
+void *BLI_ghash_lookup(GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT;
+void **BLI_ghash_lookup_p(GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT;
bool BLI_ghash_remove(GHash *gh, void *key, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp);
void BLI_ghash_clear(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp);
-void *BLI_ghash_pop(GHash *gh, void *key, GHashKeyFreeFP keyfreefp);
-bool BLI_ghash_haskey(GHash *gh, const void *key);
-int BLI_ghash_size(GHash *gh);
+void BLI_ghash_clear_ex(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp,
+ const unsigned int nentries_reserve);
+void *BLI_ghash_popkey(GHash *gh, void *key, GHashKeyFreeFP keyfreefp) ATTR_WARN_UNUSED_RESULT;
+bool BLI_ghash_haskey(GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT;
+int BLI_ghash_size(GHash *gh) ATTR_WARN_UNUSED_RESULT;
+void BLI_ghash_flag_set(GHash *gh, unsigned int flag);
+void BLI_ghash_flag_clear(GHash *gh, unsigned int flag);
/* *** */
-/**
- * Create a new GHashIterator. The hash table must not be mutated
- * while the iterator is in use, and the iterator will step exactly
- * BLI_ghash_size(gh) times before becoming done.
- *
- * \param gh The GHash to iterate over.
- * \return Pointer to a new DynStr.
- */
-GHashIterator *BLI_ghashIterator_new(GHash *gh);
-/**
- * Init an already allocated GHashIterator. The hash table must not
- * be mutated while the iterator is in use, and the iterator will
- * step exactly BLI_ghash_size(gh) times before becoming done.
- *
- * \param ghi The GHashIterator to initialize.
- * \param gh The GHash to iterate over.
- */
-void BLI_ghashIterator_init(GHashIterator *ghi, GHash *gh);
-/**
- * Free a GHashIterator.
- *
- * \param ghi The iterator to free.
- */
-void BLI_ghashIterator_free(GHashIterator *ghi);
+GHashIterator *BLI_ghashIterator_new(GHash *gh) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
-/**
- * Retrieve the key from an iterator.
- *
- * \param ghi The iterator.
- * \return The key at the current index, or NULL if the
- * iterator is done.
- */
-void *BLI_ghashIterator_getKey(GHashIterator *ghi);
-/**
- * Retrieve the value from an iterator.
- *
- * \param ghi The iterator.
- * \return The value at the current index, or NULL if the
- * iterator is done.
- */
-void *BLI_ghashIterator_getValue(GHashIterator *ghi);
-/**
- * Steps the iterator to the next index.
- *
- * \param ghi The iterator.
- */
-void BLI_ghashIterator_step(GHashIterator *ghi);
-/**
- * Determine if an iterator is done (has reached the end of
- * the hash table).
- *
- * \param ghi The iterator.
- * \return True if done, False otherwise.
- */
-bool BLI_ghashIterator_done(GHashIterator *ghi);
+void BLI_ghashIterator_init(GHashIterator *ghi, GHash *gh);
+void BLI_ghashIterator_free(GHashIterator *ghi);
+
+void *BLI_ghashIterator_getKey(GHashIterator *ghi) ATTR_WARN_UNUSED_RESULT;
+void *BLI_ghashIterator_getValue(GHashIterator *ghi) ATTR_WARN_UNUSED_RESULT;
+void **BLI_ghashIterator_getValue_p(GHashIterator *ghi) ATTR_WARN_UNUSED_RESULT;
+
+void BLI_ghashIterator_step(GHashIterator *ghi);
+bool BLI_ghashIterator_done(GHashIterator *ghi) ATTR_WARN_UNUSED_RESULT;
#define GHASH_ITER(gh_iter_, ghash_) \
for (BLI_ghashIterator_init(&gh_iter_, ghash_); \
@@ -155,10 +112,18 @@ int BLI_ghashutil_strcmp(const void *a, const void *b);
unsigned int BLI_ghashutil_inthash(const void *ptr);
int BLI_ghashutil_intcmp(const void *a, const void *b);
-GHash *BLI_ghash_ptr_new(const char *info);
-GHash *BLI_ghash_str_new(const char *info);
-GHash *BLI_ghash_int_new(const char *info);
-GHash *BLI_ghash_pair_new(const char *info);
+GHash *BLI_ghash_ptr_new_ex(const char *info,
+ const unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
+GHash *BLI_ghash_ptr_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
+GHash *BLI_ghash_str_new_ex(const char *info,
+ const unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
+GHash *BLI_ghash_str_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
+GHash *BLI_ghash_int_new_ex(const char *info,
+ const unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
+GHash *BLI_ghash_int_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
+GHash *BLI_ghash_pair_new_ex(const char *info,
+ const unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
+GHash *BLI_ghash_pair_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
typedef struct GHashPair {
const void *first;
@@ -170,6 +135,62 @@ unsigned int BLI_ghashutil_pairhash(const void *ptr);
int BLI_ghashutil_paircmp(const void *a, const void *b);
void BLI_ghashutil_pairfree(void *ptr);
+
+/* *** */
+
+typedef struct GSet GSet;
+
+typedef GHashHashFP GSetHashFP;
+typedef GHashCmpFP GSetCmpFP;
+typedef GHashKeyFreeFP GSetKeyFreeFP;
+
+/* so we can cast but compiler sees as different */
+typedef struct GSetIterator {
+ GHashIterator _ghi
+#ifdef __GNUC__
+ __attribute__ ((deprecated))
+#endif
+ ;
+} GSetIterator;
+
+GSet *BLI_gset_new_ex(GSetHashFP hashfp, GSetCmpFP cmpfp, const char *info,
+ const unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
+GSet *BLI_gset_new(GSetHashFP hashfp, GSetCmpFP cmpfp, const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
+int BLI_gset_size(GSet *gs) ATTR_WARN_UNUSED_RESULT;
+void BLI_gset_free(GSet *gs, GSetKeyFreeFP keyfreefp);
+void BLI_gset_insert(GSet *gh, void *key);
+bool BLI_gset_reinsert(GSet *gh, void *key, GSetKeyFreeFP keyfreefp);
+bool BLI_gset_haskey(GSet *gs, const void *key) ATTR_WARN_UNUSED_RESULT;
+bool BLI_gset_remove(GSet *gs, void *key, GSetKeyFreeFP keyfreefp);
+void BLI_gset_clear_ex(GSet *gs, GSetKeyFreeFP keyfreefp,
+ const unsigned int nentries_reserve);
+void BLI_gset_clear(GSet *gs, GSetKeyFreeFP keyfreefp);
+
+GSet *BLI_gset_ptr_new_ex(const char *info,
+ const unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
+GSet *BLI_gset_ptr_new(const char *info);
+GSet *BLI_gset_pair_new_ex(const char *info,
+ const unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
+GSet *BLI_gset_pair_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
+
+/* rely on inline api for now */
+BLI_INLINE GSetIterator *BLI_gsetIterator_new(GSet *gs) { return (GSetIterator *)BLI_ghashIterator_new((GHash *)gs); }
+BLI_INLINE void BLI_gsetIterator_init(GSetIterator *gsi, GSet *gs) { BLI_ghashIterator_init((GHashIterator *)gsi, (GHash *)gs); }
+BLI_INLINE void BLI_gsetIterator_free(GSetIterator *gsi) { BLI_ghashIterator_free((GHashIterator *)gsi); }
+BLI_INLINE void *BLI_gsetIterator_getKey(GSetIterator *gsi) { return BLI_ghashIterator_getKey((GHashIterator *)gsi); }
+BLI_INLINE void BLI_gsetIterator_step(GSetIterator *gsi) { BLI_ghashIterator_step((GHashIterator *)gsi); }
+BLI_INLINE bool BLI_gsetIterator_done(GSetIterator *gsi) { return BLI_ghashIterator_done((GHashIterator *)gsi); }
+
+#define GSET_ITER(gs_iter_, gset_) \
+ for (BLI_gsetIterator_init(&gs_iter_, gset_); \
+ BLI_gsetIterator_done(&gs_iter_) == false; \
+ BLI_gsetIterator_step(&gs_iter_))
+
+#define GSET_ITER_INDEX(gs_iter_, gset_, i_) \
+ for (BLI_gsetIterator_init(&gs_iter_, gset_), i_ = 0; \
+ BLI_gsetIterator_done(&gs_iter_) == false; \
+ BLI_gsetIterator_step(&gs_iter_), i_++)
+
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/blenlib/BLI_jitter.h b/source/blender/blenlib/BLI_jitter.h
index 432bf73ad90..936a5260a68 100644
--- a/source/blender/blenlib/BLI_jitter.h
+++ b/source/blender/blenlib/BLI_jitter.h
@@ -33,8 +33,8 @@
*/
void BLI_jitter_init(float *jitarr, int num);
-void BLI_jitterate1(float *jit1, float *jit2, int num, float rad1);
-void BLI_jitterate2(float *jit1, float *jit2, int num, float rad2);
+void BLI_jitterate1(float *jit1, float *jit2, int num, float radius1);
+void BLI_jitterate2(float *jit1, float *jit2, int num, float radius2);
#endif
diff --git a/source/blender/blenlib/BLI_kdopbvh.h b/source/blender/blenlib/BLI_kdopbvh.h
index 8441413fba9..b55ab432a12 100644
--- a/source/blender/blenlib/BLI_kdopbvh.h
+++ b/source/blender/blenlib/BLI_kdopbvh.h
@@ -87,7 +87,7 @@ BVHTree *BLI_bvhtree_new(int maxsize, float epsilon, char tree_type, char axis);
void BLI_bvhtree_free(BVHTree *tree);
/* construct: first insert points, then call balance */
-int BLI_bvhtree_insert(BVHTree *tree, int index, const float co[3], int numpoints);
+void BLI_bvhtree_insert(BVHTree *tree, int index, const float co[3], int numpoints);
void BLI_bvhtree_balance(BVHTree *tree);
/* update: first update points/nodes, then call update_tree to refit the bounding volumes */
diff --git a/source/blender/blenlib/BLI_kdtree.h b/source/blender/blenlib/BLI_kdtree.h
index b687d98e6ad..e3c81021351 100644
--- a/source/blender/blenlib/BLI_kdtree.h
+++ b/source/blender/blenlib/BLI_kdtree.h
@@ -31,6 +31,8 @@
* \author Brecht van Lommel
*/
+#include "BLI_compiler_attrs.h"
+
struct KDTree;
typedef struct KDTree KDTree;
@@ -40,22 +42,19 @@ typedef struct KDTreeNearest {
float co[3];
} KDTreeNearest;
-/* Creates or free a kdtree */
-KDTree *BLI_kdtree_new(int maxsize);
+KDTree *BLI_kdtree_new(unsigned int maxsize);
void BLI_kdtree_free(KDTree *tree);
-/* Construction: first insert points, then call balance. Normal is optional. */
-void BLI_kdtree_insert(KDTree *tree, int index, const float co[3], const float nor[3]);
-void BLI_kdtree_balance(KDTree *tree);
-
-/* Find nearest returns index, and -1 if no node is found.
- * Find n nearest returns number of points found, with results in nearest.
- * Normal is optional, but if given will limit results to points in normal direction from co. */
-int BLI_kdtree_find_nearest(KDTree *tree, const float co[3], const float nor[3], KDTreeNearest *nearest);
-int BLI_kdtree_find_n_nearest(KDTree *tree, int n, const float co[3], const float nor[3], KDTreeNearest *nearest);
-
-/* Range search returns number of points found, with results in nearest */
-/* Normal is optional, but if given will limit results to points in normal direction from co. */
-/* Remember to free nearest after use! */
-int BLI_kdtree_range_search(KDTree *tree, float range, const float co[3], const float nor[3], KDTreeNearest **nearest);
-#endif
+void BLI_kdtree_insert(KDTree *tree, int index, const float co[3], const float nor[3]) ATTR_NONNULL(1, 3);
+void BLI_kdtree_balance(KDTree *tree) ATTR_NONNULL(1);
+
+int BLI_kdtree_find_nearest(KDTree *tree, const float co[3], const float nor[3],
+ KDTreeNearest *r_nearest) ATTR_NONNULL(1, 2);
+int BLI_kdtree_find_nearest_n(KDTree *tree, const float co[3], const float nor[3],
+ KDTreeNearest *r_nearest,
+ unsigned int n) ATTR_NONNULL(1, 2, 4);
+int BLI_kdtree_range_search(KDTree *tree, const float co[3], const float nor[3],
+ KDTreeNearest **r_nearest,
+ float range) ATTR_NONNULL(1, 2, 4) ATTR_WARN_UNUSED_RESULT;
+
+#endif /* __BLI_KDTREE_H__ */
diff --git a/source/blender/blenlib/BLI_lasso.h b/source/blender/blenlib/BLI_lasso.h
index 0addd463a70..28f21e5bd85 100644
--- a/source/blender/blenlib/BLI_lasso.h
+++ b/source/blender/blenlib/BLI_lasso.h
@@ -34,8 +34,8 @@
struct rcti;
-void BLI_lasso_boundbox(struct rcti *rect, const int mcords[][2], const short moves);
-bool BLI_lasso_is_point_inside(const int mcords[][2], const short moves, const int sx, const int sy, const int error_value);
-bool BLI_lasso_is_edge_inside(const int mcords[][2], const short moves, int x0, int y0, int x1, int y1, const int error_value);
+void BLI_lasso_boundbox(struct rcti *rect, const int mcords[][2], const unsigned int moves);
+bool BLI_lasso_is_point_inside(const int mcords[][2], const unsigned int moves, const int sx, const int sy, const int error_value);
+bool BLI_lasso_is_edge_inside(const int mcords[][2], const unsigned int moves, int x0, int y0, int x1, int y1, const int error_value);
#endif
diff --git a/source/blender/blenlib/BLI_linklist.h b/source/blender/blenlib/BLI_linklist.h
index 9c1e1f88bab..2ca363ee780 100644
--- a/source/blender/blenlib/BLI_linklist.h
+++ b/source/blender/blenlib/BLI_linklist.h
@@ -54,10 +54,16 @@ struct LinkNode *BLI_linklist_find(struct LinkNode *list, int index);
void BLI_linklist_reverse(struct LinkNode **listp);
+void BLI_linklist_prepend_nlink(struct LinkNode **listp, void *ptr, struct LinkNode *nlink);
void BLI_linklist_prepend(struct LinkNode **listp, void *ptr);
-void BLI_linklist_append(struct LinkNode **listp, void *ptr);
void BLI_linklist_prepend_arena(struct LinkNode **listp, void *ptr, struct MemArena *ma);
void BLI_linklist_prepend_pool(struct LinkNode **listp, void *ptr, struct BLI_mempool *mempool);
+
+void BLI_linklist_append_nlink(LinkNode **listp, void *ptr, LinkNode *nlink);
+void BLI_linklist_append(struct LinkNode **listp, void *ptr);
+void BLI_linklist_append_arena(LinkNode **listp, void *ptr, struct MemArena *ma);
+void BLI_linklist_append_pool(LinkNode **listp, void *ptr, struct BLI_mempool *mempool);
+
void *BLI_linklist_pop(struct LinkNode **listp);
void *BLI_linklist_pop_pool(struct LinkNode **listp, struct BLI_mempool *mempool);
void BLI_linklist_insert_after(struct LinkNode **listp, void *ptr);
@@ -67,4 +73,7 @@ void BLI_linklist_freeN(struct LinkNode *list);
void BLI_linklist_free_pool(LinkNode *list, LinkNodeFreeFP freefunc, struct BLI_mempool *mempool);
void BLI_linklist_apply(struct LinkNode *list, LinkNodeApplyFP applyfunc, void *userdata);
-#endif
+#define BLI_linklist_prepend_alloca(listp, ptr) \
+ BLI_linklist_prepend_nlink(listp, ptr, alloca(sizeof(LinkNode)))
+
+#endif /* __BLI_LINKLIST_H__ */
diff --git a/source/blender/blenlib/BLI_linklist_stack.h b/source/blender/blenlib/BLI_linklist_stack.h
new file mode 100644
index 00000000000..c9fb00ecdf5
--- /dev/null
+++ b/source/blender/blenlib/BLI_linklist_stack.h
@@ -0,0 +1,157 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef __BLI_LINKLIST_STACK_H__
+#define __BLI_LINKLIST_STACK_H__
+
+/** \file BLI_linklist_stack.h
+ * \ingroup bli
+ * \brief BLI_LINKSTACK_*** wrapper macros for using a \a LinkNode
+ * to store a stack of pointers, using a single linked list
+ * allocated from a mempool.
+ *
+ * \note These macros follow STACK_* macros defined in 'BLI_utildefines.h'
+ * and should be kept (mostly) interchangeable.
+ *
+ * \note _##var##_type is a dummy var only used for typechecks.
+ */
+
+/* -------------------------------------------------------------------- */
+/* Linked Stack using BLI_mempool
+ *
+ * Uses mempool for storage.
+ */
+
+/** \name Linked Stack (mempool)
+ * \{ */
+
+#define BLI_LINKSTACK_DECLARE(var, type) \
+ LinkNode *var; \
+ BLI_mempool *_##var##_pool; \
+ type _##var##_type
+
+#define BLI_LINKSTACK_INIT(var) { \
+ var = NULL; \
+ _##var##_pool = BLI_mempool_create(sizeof(LinkNode), 1, 64, 0); \
+} (void)0
+
+#define BLI_LINKSTACK_SIZE(var) \
+ BLI_mempool_count(_##var##_pool)
+
+/* check for typeof() */
+#ifdef __GNUC__
+#define BLI_LINKSTACK_PUSH(var, ptr) ( \
+ CHECK_TYPE_INLINE(ptr, typeof(_##var##_type)), \
+ BLI_linklist_prepend_pool(&(var), ptr, _##var##_pool))
+#define BLI_LINKSTACK_POP(var) \
+ (var ? (typeof(_##var##_type))BLI_linklist_pop_pool(&(var), _##var##_pool) : NULL)
+#define BLI_LINKSTACK_POP_ELSE(var, r) \
+ (var ? (typeof(_##var##_type))BLI_linklist_pop_pool(&(var), _##var##_pool) : r)
+#else /* non gcc */
+#define BLI_LINKSTACK_PUSH(var, ptr) ( \
+ BLI_linklist_prepend_pool(&(var), ptr, _##var##_pool))
+#define BLI_LINKSTACK_POP(var) \
+ (var ? BLI_linklist_pop_pool(&(var), _##var##_pool) : NULL)
+#define BLI_LINKSTACK_POP_ELSE(var, r) \
+ (var ? BLI_linklist_pop_pool(&(var), _##var##_pool) : r)
+#endif /* gcc check */
+
+#define BLI_LINKSTACK_SWAP(var_a, var_b) { \
+ CHECK_TYPE_PAIR(_##var_a##_type, _##var_b##_type); \
+ SWAP(LinkNode *, var_a, var_b); \
+ SWAP(BLI_mempool *, _##var_a##_pool, _##var_b##_pool); \
+} (void)0
+
+#define BLI_LINKSTACK_FREE(var) { \
+ BLI_mempool_destroy(_##var##_pool); \
+ _##var##_pool = NULL; (void)_##var##_pool; \
+ var = NULL; (void)var; \
+ (void)&(_##var##_type); \
+} (void)0
+
+#include "BLI_linklist.h"
+#include "BLI_mempool.h"
+
+/** \} */
+
+
+/* -------------------------------------------------------------------- */
+/* Linked Stack, using stack memory (alloca)
+ *
+ * alloca never frees, pop'd items are stored in a free-list for reuse.
+ * only use for lists small enough to fit on the stack.
+ */
+
+
+/** \name Linked Stack (alloca)
+ * \{ */
+
+#ifdef __GNUC__
+# define _BLI_SMALLSTACK_CAST(var) (typeof(_##var##_type))
+#else
+# define _BLI_SMALLSTACK_CAST(var)
+#endif
+
+#define BLI_SMALLSTACK_DECLARE(var, type) \
+ LinkNode *_##var##_stack = NULL, *_##var##_free = NULL, *_##var##_temp = NULL; \
+ type _##var##_type
+
+#define BLI_SMALLSTACK_PUSH(var, data) \
+{ \
+ CHECK_TYPE_PAIR(data, _##var##_type); \
+ if (_##var##_free) { \
+ _##var##_temp = _##var##_free; \
+ _##var##_free = _##var##_free->next; \
+ } \
+ else { \
+ _##var##_temp = alloca(sizeof(LinkNode)); \
+ } \
+ _##var##_temp->next = _##var##_stack; \
+ _##var##_temp->link = data; \
+ _##var##_stack = _##var##_temp; \
+} (void)0
+
+/* internal use, no null check */
+#define _BLI_SMALLSTACK_DEL(var) \
+ (void)((_##var##_temp = _##var##_stack->next), \
+ (_##var##_stack->next = _##var##_free), \
+ (_##var##_free = _##var##_stack), \
+ (_##var##_stack = _##var##_temp)) \
+
+/* check for typeof() */
+#define BLI_SMALLSTACK_POP(var) \
+ (_BLI_SMALLSTACK_CAST(var) ((_##var##_stack) ? \
+ (_BLI_SMALLSTACK_DEL(var), (_##var##_free->link)) : NULL))
+
+#define BLI_SMALLSTACK_FREE(var) { \
+ (void)&(_##var##_type); \
+} (void)0
+
+/** \} */
+
+#endif /* __BLI_LINKLIST_STACK_H__ */
+
diff --git a/source/blender/blenlib/BLI_listbase.h b/source/blender/blenlib/BLI_listbase.h
index 4c7ddf7ba66..0927620a2c6 100644
--- a/source/blender/blenlib/BLI_listbase.h
+++ b/source/blender/blenlib/BLI_listbase.h
@@ -60,6 +60,8 @@ void BLI_freelistN(struct ListBase *listbase);
void BLI_addtail(struct ListBase *listbase, void *vlink);
void BLI_remlink(struct ListBase *listbase, void *vlink);
bool BLI_remlink_safe(struct ListBase *listbase, void *vlink);
+void *BLI_pophead(ListBase *listbase);
+void *BLI_poptail(ListBase *listbase);
void BLI_addhead(struct ListBase *listbase, void *vlink);
void BLI_insertlinkbefore(struct ListBase *listbase, void *vnextlink, void *vnewlink);
@@ -72,7 +74,8 @@ void BLI_freelinkN(struct ListBase *listbase, void *vlink);
void BLI_movelisttolist(struct ListBase *dst, struct ListBase *src);
void BLI_duplicatelist(struct ListBase *dst, const struct ListBase *src);
void BLI_reverselist(struct ListBase *lb);
-void BLI_rotatelist(struct ListBase *lb, void *vlink);
+void BLI_rotatelist_first(struct ListBase *lb, void *vlink);
+void BLI_rotatelist_last(struct ListBase *lb, void *vlink);
/* create a generic list node containing link to provided data */
struct LinkData *BLI_genericNodeN(void *data);
diff --git a/source/blender/blenlib/BLI_math_base.h b/source/blender/blenlib/BLI_math_base.h
index 69dbd3253f0..1cb28d25b6c 100644
--- a/source/blender/blenlib/BLI_math_base.h
+++ b/source/blender/blenlib/BLI_math_base.h
@@ -222,6 +222,7 @@ MINLINE int power_of_2_max_i(int n);
MINLINE int power_of_2_min_i(int n);
MINLINE int divide_round_i(int a, int b);
+MINLINE int mod_i(int i, int n);
MINLINE float shell_angle_to_dist(const float angle);
diff --git a/source/blender/blenlib/BLI_math_geom.h b/source/blender/blenlib/BLI_math_geom.h
index 6cb7103be9b..f815716148b 100644
--- a/source/blender/blenlib/BLI_math_geom.h
+++ b/source/blender/blenlib/BLI_math_geom.h
@@ -34,6 +34,7 @@
extern "C" {
#endif
+#include "BLI_compiler_attrs.h"
#include "BLI_math_inline.h"
#if BLI_MATH_DO_INLINE
@@ -61,6 +62,14 @@ float area_quad_v3(const float a[3], const float b[3], const float c[3], const f
float area_poly_v3(int nr, float verts[][3], const float normal[3]);
float area_poly_v2(int nr, float verts[][2]);
+/********************************* Planes **********************************/
+
+void plane_from_point_normal_v3(float r_plane[4], const float plane_co[3], const float plane_no[3]);
+void plane_to_point_normal_v3(const float plane[4], float r_plane_co[3], float r_plane_no[3]);
+MINLINE float plane_point_side_v3(const float plane[4], const float co[3]);
+
+/********************************* Volume **********************************/
+
float volume_tetrahedron_v3(const float v1[3], const float v2[3], const float v3[3], const float v4[3]);
int is_quad_convex_v3(const float v1[3], const float v2[3], const float v3[3], const float v4[3]);
@@ -73,15 +82,15 @@ float dist_squared_to_line_segment_v2(const float p[2], const float l1[2], const
float dist_to_line_segment_v2(const float p[2], const float l1[2], const float l2[2]);
void closest_to_line_segment_v2(float closest[2], const float p[2], const float l1[2], const float l2[2]);
-float dist_to_plane_normalized_v3(const float p[3], const float plane_co[3], const float plane_no_unit[3]);
-float dist_to_plane_v3(const float p[3], const float plane_co[3], const float plane_no[3]);
+float dist_squared_to_plane_v3(const float p[3], const float plane[4]);
+float dist_to_plane_v3(const float p[3], const float plane[4]);
float dist_squared_to_line_segment_v3(const float p[3], const float l1[3], const float l2[3]);
float dist_to_line_segment_v3(const float p[3], const float l1[3], const float l2[3]);
float dist_to_line_v3(const float p[3], const float l1[3], const float l2[3]);
float closest_to_line_v3(float r[3], const float p[3], const float l1[3], const float l2[3]);
float closest_to_line_v2(float r[2], const float p[2], const float l1[2], const float l2[2]);
void closest_to_line_segment_v3(float r[3], const float p[3], const float l1[3], const float l2[3]);
-void closest_to_plane_v3(float r[3], const float plane_co[3], const float plane_no_unit[3], const float pt[3]);
+void closest_to_plane_v3(float close_r[3], const float plane[4], const float pt[3]);
/* Set 'r' to the point in triangle (t1, t2, t3) closest to point 'p' */
void closest_on_tri_to_point_v3(float r[3], const float p[3], const float t1[3], const float t2[3], const float t3[3]);
@@ -89,6 +98,10 @@ void closest_on_tri_to_point_v3(float r[3], const float p[3], const float t1[3],
float line_point_factor_v3(const float p[3], const float l1[3], const float l2[3]);
float line_point_factor_v2(const float p[2], const float l1[2], const float l2[2]);
+
+float line_plane_factor_v3(const float plane_co[3], const float plane_no[3],
+ const float l1[3], const float l2[3]);
+
void limit_dist_v3(float v1[3], float v2[3], const float dist);
/******************************* Intersection ********************************/
@@ -120,8 +133,9 @@ bool isect_ray_plane_v3(const float p1[3], const float d[3],
const float v0[3], const float v1[3], const float v2[3],
float *r_lambda, const int clip);
+bool isect_point_planes_v3(float (*planes)[4], int totplane, const float p[3]);
bool isect_line_plane_v3(float out[3], const float l1[3], const float l2[3],
- const float plane_co[3], const float plane_no[3], const bool no_flip);
+ const float plane_co[3], const float plane_no[3]);
void isect_plane_plane_v3(float r_isect_co[3], float r_isect_no[3],
const float plane_a_co[3], const float plane_a_no[3],
@@ -130,6 +144,9 @@ void isect_plane_plane_v3(float r_isect_co[3], float r_isect_no[3],
/* line/ray triangle */
bool isect_line_tri_v3(const float p1[3], const float p2[3],
const float v0[3], const float v1[3], const float v2[3], float *r_lambda, float r_uv[2]);
+bool isect_line_tri_epsilon_v3(const float p1[3], const float p2[3],
+ const float v0[3], const float v1[3], const float v2[3],
+ float *r_lambda, float r_uv[2], const float epsilon);
bool isect_ray_tri_v3(const float p1[3], const float d[3],
const float v0[3], const float v1[3], const float v2[3], float *r_lambda, float r_uv[2]);
bool isect_ray_tri_threshold_v3(const float p1[3], const float d[3],
@@ -138,8 +155,8 @@ bool isect_ray_tri_epsilon_v3(const float p1[3], const float d[3],
const float v0[3], const float v1[3], const float v2[3], float *r_lambda, float r_uv[2], const float epsilon);
/* point in polygon */
-bool isect_point_poly_v2(const float pt[2], const float verts[][2], const int nr);
-bool isect_point_poly_v2_int(const int pt[2], const int verts[][2], const int nr);
+bool isect_point_poly_v2(const float pt[2], const float verts[][2], const unsigned int nr, const bool use_holes);
+bool isect_point_poly_v2_int(const int pt[2], const int verts[][2], const unsigned int nr, const bool use_holes);
int isect_point_quad_v2(const float p[2], const float a[2], const float b[2], const float c[2], const float d[2]);
@@ -171,7 +188,10 @@ bool clip_segment_v3_plane(float p1[3], float p2[3], const float plane[4]);
bool clip_segment_v3_plane_n(float p1[3], float p2[3], float plane_array[][4], const int plane_tot);
void plot_line_v2v2i(const int p1[2], const int p2[2], bool (*callback)(int, int, void *), void *userData);
-
+void fill_poly_v2i_n(
+ const int xmin, const int ymin, const int xmax, const int ymax,
+ const int polyXY[][2], const int polyCorners,
+ void (*callback)(int, int, void *), void *userData);
/****************************** Interpolation ********************************/
/* tri or quad, d can be NULL */
@@ -277,11 +297,7 @@ float form_factor_hemi_poly(float p[3], float n[3],
bool axis_dominant_v3_to_m3(float r_mat[3][3], const float normal[3]);
void axis_dominant_v3(int *r_axis_a, int *r_axis_b, const float axis[3]);
-float axis_dominant_v3_max(int *r_axis_a, int *r_axis_b, const float axis[3])
-#ifdef __GNUC__
-__attribute__((warn_unused_result))
-#endif
-;
+float axis_dominant_v3_max(int *r_axis_a, int *r_axis_b, const float axis[3]) ATTR_WARN_UNUSED_RESULT;
MINLINE int max_axis_v3(const float vec[3]);
MINLINE int min_axis_v3(const float vec[3]);
diff --git a/source/blender/blenlib/BLI_math_interp.h b/source/blender/blenlib/BLI_math_interp.h
index 21975763779..43ef64214ad 100644
--- a/source/blender/blenlib/BLI_math_interp.h
+++ b/source/blender/blenlib/BLI_math_interp.h
@@ -26,8 +26,12 @@
*
*/
-#ifndef BLI_MATH_INTERP
-#define BLI_MATH_INTERP
+#ifndef __BLI_MATH_INTERP_H__
+#define __BLI_MATH_INTERP_H__
+
+/** \file BLI_math_interp.h
+ * \ingroup bli
+ */
void BLI_bicubic_interpolation_fl(const float *buffer, float *output, int width, int height,
int components, float u, float v);
@@ -41,4 +45,4 @@ void BLI_bilinear_interpolation_fl(const float *buffer, float *output, int width
void BLI_bilinear_interpolation_char(const unsigned char *buffer, unsigned char *output, int width, int height,
int components, float u, float v);
-#endif
+#endif /* __BLI_MATH_INTERP_H__ */
diff --git a/source/blender/blenlib/BLI_math_matrix.h b/source/blender/blenlib/BLI_math_matrix.h
index c305cc9a030..c83494790a8 100644
--- a/source/blender/blenlib/BLI_math_matrix.h
+++ b/source/blender/blenlib/BLI_math_matrix.h
@@ -60,6 +60,9 @@ void copy_m4_m4(float R[4][4], float A[4][4]);
void copy_m3_m4(float R[3][3], float A[4][4]);
void copy_m4_m3(float R[4][4], float A[3][3]);
+/* double->float */
+void copy_m3_m3d(float R[3][3], double A[3][3]);
+
void swap_m3m3(float A[3][3], float B[3][3]);
void swap_m4m4(float A[4][4], float B[4][4]);
@@ -94,6 +97,8 @@ void mul_v4_m4v4(float r[4], float M[4][4], const float v[4]);
void mul_project_m4_v3(float M[4][4], float vec[3]);
void mul_v2_project_m4_v3(float r[2], float M[4][4], const float vec[3]);
+void mul_m3_v2(float m[3][3], float r[2]);
+void mul_v2_m3v2(float r[2], float m[3][3], float v[2]);
void mul_m3_v3(float M[3][3], float r[3]);
void mul_v3_m3v3(float r[3], float M[3][3], const float a[3]);
void mul_v2_m3v3(float r[2], float M[3][3], const float a[3]);
@@ -158,6 +163,8 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A[4][4]);
void pseudoinverse_m4_m4(float Ainv[4][4], float A[4][4], float epsilon);
void pseudoinverse_m3_m3(float Ainv[3][3], float A[3][3], float epsilon);
+bool has_zero_axis_m4(float matrix[4][4]);
+
/****************************** Transformations ******************************/
void scale_m3_fl(float R[3][3], float scale);
diff --git a/source/blender/blenlib/BLI_math_rotation.h b/source/blender/blenlib/BLI_math_rotation.h
index b3702d10d87..42161279bfd 100644
--- a/source/blender/blenlib/BLI_math_rotation.h
+++ b/source/blender/blenlib/BLI_math_rotation.h
@@ -66,7 +66,7 @@ float normalize_qt(float q[4]);
float normalize_qt_qt(float q1[4], const float q2[4]);
/* comparison */
-int is_zero_qt(float q[4]);
+bool is_zero_qt(const float q[4]);
/* interpolation */
void interp_qt_qtqt(float q[4], const float a[4], const float b[4], const float t);
@@ -104,7 +104,8 @@ void quat_to_axis_angle(float axis[3], float *angle, const float q[4]);
void mat3_to_axis_angle(float axis[3], float *angle, float M[3][3]);
void mat4_to_axis_angle(float axis[3], float *angle, float M[4][4]);
-void single_axis_angle_to_mat3(float R[3][3], const char axis, const float angle);
+void axis_angle_to_mat3_single(float R[3][3], const char axis, const float angle);
+void angle_to_mat2(float R[2][2], const float angle);
/******************************** XYZ Eulers *********************************/
@@ -163,13 +164,13 @@ typedef struct DualQuat {
float scale_weight;
} DualQuat;
-void copy_dq_dq(DualQuat *r, DualQuat *dq);
+void copy_dq_dq(DualQuat *r, const DualQuat *dq);
void normalize_dq(DualQuat *dq, float totw);
-void add_weighted_dq_dq(DualQuat *r, DualQuat *dq, float weight);
+void add_weighted_dq_dq(DualQuat *r, const DualQuat *dq, float weight);
void mul_v3m3_dq(float r[3], float R[3][3], DualQuat *dq);
void mat4_to_dquat(DualQuat *r, float base[4][4], float M[4][4]);
-void dquat_to_mat4(float R[4][4], DualQuat *dq);
+void dquat_to_mat4(float R[4][4], const DualQuat *dq);
void quat_apply_track(float quat[4], short axis, short upflag);
void vec_apply_track(float vec[3], short axis);
diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h
index e163c06440c..5a23e879b1a 100644
--- a/source/blender/blenlib/BLI_math_vector.h
+++ b/source/blender/blenlib/BLI_math_vector.h
@@ -34,6 +34,7 @@
extern "C" {
#endif
+#include "BLI_compiler_attrs.h"
#include "BLI_math_inline.h"
/************************************* Init ***********************************/
@@ -43,11 +44,6 @@ extern "C" {
# pragma GCC diagnostic ignored "-Wredundant-decls"
#endif
-#ifdef __GNUC__
-# define UNUSED_RESULT_ATTR __attribute__((warn_unused_result))
-#else
-# define UNUSED_RESULT_ATTR
-#endif
MINLINE void zero_v2(float r[2]);
MINLINE void zero_v3(float r[3]);
@@ -86,6 +82,9 @@ MINLINE void copy_v4fl_v4db(float r[4], const double a[4]);
MINLINE void copy_v2db_v2fl(double r[2], const float a[2]);
MINLINE void copy_v3db_v3fl(double r[3], const float a[3]);
MINLINE void copy_v4db_v4fl(double r[4], const float a[4]);
+/* float args -> vec */
+MINLINE void copy_v3_fl3(float v[3], float x, float y, float z);
+MINLINE void copy_v4_fl4(float v[4], float x, float y, float z, float w);
/********************************* Arithmetic ********************************/
@@ -117,10 +116,10 @@ MINLINE void mul_v3_v3(float r[3], const float a[3]);
MINLINE void mul_v3_v3v3(float r[3], const float a[3], const float b[3]);
MINLINE void mul_v4_fl(float r[4], float f);
MINLINE void mul_v4_v4fl(float r[3], const float a[3], float f);
-MINLINE float mul_project_m4_v3_zfac(float mat[4][4], const float co[3]) UNUSED_RESULT_ATTR;
-MINLINE float dot_m3_v3_row_x(float M[3][3], const float a[3]) UNUSED_RESULT_ATTR;
-MINLINE float dot_m3_v3_row_y(float M[3][3], const float a[3]) UNUSED_RESULT_ATTR;
-MINLINE float dot_m3_v3_row_z(float M[3][3], const float a[3]) UNUSED_RESULT_ATTR;
+MINLINE float mul_project_m4_v3_zfac(float mat[4][4], const float co[3]) ATTR_WARN_UNUSED_RESULT;
+MINLINE float dot_m3_v3_row_x(float M[3][3], const float a[3]) ATTR_WARN_UNUSED_RESULT;
+MINLINE float dot_m3_v3_row_y(float M[3][3], const float a[3]) ATTR_WARN_UNUSED_RESULT;
+MINLINE float dot_m3_v3_row_z(float M[3][3], const float a[3]) ATTR_WARN_UNUSED_RESULT;
MINLINE void madd_v3_v3fl(float r[3], const float a[3], float f);
MINLINE void madd_v3_v3v3(float r[3], const float a[3], const float b[3]);
@@ -139,10 +138,10 @@ MINLINE void negate_v4_v4(float r[4], const float a[3]);
MINLINE void negate_v3_short(short r[3]);
-MINLINE float dot_v2v2(const float a[2], const float b[2]) UNUSED_RESULT_ATTR;
-MINLINE float dot_v3v3(const float a[3], const float b[3]) UNUSED_RESULT_ATTR;
+MINLINE float dot_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT;
+MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT;
-MINLINE float cross_v2v2(const float a[2], const float b[2]) UNUSED_RESULT_ATTR;
+MINLINE float cross_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT;
MINLINE void cross_v3_v3v3(float r[3], const float a[3], const float b[3]);
MINLINE void add_newell_cross_v3_v3v3(float n[3], const float v_prev[3], const float v_curr[3]);
@@ -151,20 +150,20 @@ MINLINE void star_m3_v3(float rmat[3][3], float a[3]);
/*********************************** Length **********************************/
-MINLINE float len_squared_v2(const float v[2]) UNUSED_RESULT_ATTR;
-MINLINE float len_squared_v3(const float v[3]) UNUSED_RESULT_ATTR;
-MINLINE float len_manhattan_v2(const float v[2]) UNUSED_RESULT_ATTR;
-MINLINE int len_manhattan_v2_int(const int v[2]) UNUSED_RESULT_ATTR;
-MINLINE float len_manhattan_v3(const float v[3]) UNUSED_RESULT_ATTR;
-MINLINE float len_v2(const float a[2]) UNUSED_RESULT_ATTR;
-MINLINE float len_v2v2(const float a[2], const float b[2]) UNUSED_RESULT_ATTR;
-MINLINE float len_squared_v2v2(const float a[2], const float b[2]) UNUSED_RESULT_ATTR;
-MINLINE float len_squared_v3v3(const float a[3], const float b[3]) UNUSED_RESULT_ATTR;
-MINLINE float len_manhattan_v2v2(const float a[2], const float b[2]) UNUSED_RESULT_ATTR;
-MINLINE int len_manhattan_v2v2_int(const int a[2], const int b[2]) UNUSED_RESULT_ATTR;
-MINLINE float len_manhattan_v3v3(const float a[3], const float b[3]) UNUSED_RESULT_ATTR;
-MINLINE float len_v3(const float a[3]) UNUSED_RESULT_ATTR;
-MINLINE float len_v3v3(const float a[3], const float b[3]) UNUSED_RESULT_ATTR;
+MINLINE float len_squared_v2(const float v[2]) ATTR_WARN_UNUSED_RESULT;
+MINLINE float len_squared_v3(const float v[3]) ATTR_WARN_UNUSED_RESULT;
+MINLINE float len_manhattan_v2(const float v[2]) ATTR_WARN_UNUSED_RESULT;
+MINLINE int len_manhattan_v2_int(const int v[2]) ATTR_WARN_UNUSED_RESULT;
+MINLINE float len_manhattan_v3(const float v[3]) ATTR_WARN_UNUSED_RESULT;
+MINLINE float len_v2(const float a[2]) ATTR_WARN_UNUSED_RESULT;
+MINLINE float len_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT;
+MINLINE float len_squared_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT;
+MINLINE float len_squared_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT;
+MINLINE float len_manhattan_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT;
+MINLINE int len_manhattan_v2v2_int(const int a[2], const int b[2]) ATTR_WARN_UNUSED_RESULT;
+MINLINE float len_manhattan_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT;
+MINLINE float len_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT;
+MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT;
MINLINE float normalize_v2(float r[2]);
MINLINE float normalize_v2_v2(float r[2], const float a[2]);
@@ -196,35 +195,41 @@ void flip_v2_v2v2(float v[2], const float v1[2], const float v2[2]);
/********************************* Comparison ********************************/
-MINLINE int is_zero_v3(const float a[3]) UNUSED_RESULT_ATTR;
-MINLINE int is_zero_v4(const float a[4]) UNUSED_RESULT_ATTR;
-MINLINE int is_one_v3(const float a[3]) UNUSED_RESULT_ATTR;
+MINLINE bool is_zero_v2(const float a[3]) ATTR_WARN_UNUSED_RESULT;
+MINLINE bool is_zero_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT;
+MINLINE bool is_zero_v4(const float a[4]) ATTR_WARN_UNUSED_RESULT;
+
+MINLINE bool is_finite_v2(const float a[3]) ATTR_WARN_UNUSED_RESULT;
+MINLINE bool is_finite_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT;
+MINLINE bool is_finite_v4(const float a[4]) ATTR_WARN_UNUSED_RESULT;
+
+MINLINE bool is_one_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT;
-MINLINE int equals_v2v2(const float v1[2], const float v2[2]) UNUSED_RESULT_ATTR;
-MINLINE int equals_v3v3(const float a[3], const float b[3]) UNUSED_RESULT_ATTR;
-MINLINE int compare_v2v2(const float a[2], const float b[2], const float limit) UNUSED_RESULT_ATTR;
-MINLINE int compare_v3v3(const float a[3], const float b[3], const float limit) UNUSED_RESULT_ATTR;
-MINLINE int compare_len_v3v3(const float a[3], const float b[3], const float limit) UNUSED_RESULT_ATTR;
+MINLINE bool equals_v2v2(const float v1[2], const float v2[2]) ATTR_WARN_UNUSED_RESULT;
+MINLINE bool equals_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT;
+MINLINE bool compare_v2v2(const float a[2], const float b[2], const float limit) ATTR_WARN_UNUSED_RESULT;
+MINLINE bool compare_v3v3(const float a[3], const float b[3], const float limit) ATTR_WARN_UNUSED_RESULT;
+MINLINE bool compare_len_v3v3(const float a[3], const float b[3], const float limit) ATTR_WARN_UNUSED_RESULT;
-MINLINE int compare_v4v4(const float a[4], const float b[4], const float limit) UNUSED_RESULT_ATTR;
-MINLINE int equals_v4v4(const float a[4], const float b[4]) UNUSED_RESULT_ATTR;
+MINLINE bool compare_v4v4(const float a[4], const float b[4], const float limit) ATTR_WARN_UNUSED_RESULT;
+MINLINE bool equals_v4v4(const float a[4], const float b[4]) ATTR_WARN_UNUSED_RESULT;
-MINLINE float line_point_side_v2(const float l1[2], const float l2[2], const float pt[2]) UNUSED_RESULT_ATTR;
+MINLINE float line_point_side_v2(const float l1[2], const float l2[2], const float pt[2]) ATTR_WARN_UNUSED_RESULT;
/********************************** Angles ***********************************/
/* - angle with 2 arguments is angle between vector */
/* - angle with 3 arguments is angle between 3 points at the middle point */
/* - angle_normalized_* is faster equivalent if vectors are normalized */
-float angle_v2v2(const float a[2], const float b[2]) UNUSED_RESULT_ATTR;
-float angle_signed_v2v2(const float v1[2], const float v2[2]) UNUSED_RESULT_ATTR;
-float angle_v2v2v2(const float a[2], const float b[2], const float c[2]) UNUSED_RESULT_ATTR;
-float angle_normalized_v2v2(const float a[2], const float b[2]) UNUSED_RESULT_ATTR;
-float angle_v3v3(const float a[3], const float b[3]) UNUSED_RESULT_ATTR;
-float angle_v3v3v3(const float a[3], const float b[3], const float c[3]) UNUSED_RESULT_ATTR;
-float cos_v3v3v3(const float p1[3], const float p2[3], const float p3[3]) UNUSED_RESULT_ATTR;
-float angle_normalized_v3v3(const float v1[3], const float v2[3]) UNUSED_RESULT_ATTR;
-float angle_on_axis_v3v3v3_v3(const float v1[3], const float v2[3], const float v3[3], const float axis[3]) UNUSED_RESULT_ATTR;
+float angle_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT;
+float angle_signed_v2v2(const float v1[2], const float v2[2]) ATTR_WARN_UNUSED_RESULT;
+float angle_v2v2v2(const float a[2], const float b[2], const float c[2]) ATTR_WARN_UNUSED_RESULT;
+float angle_normalized_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT;
+float angle_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT;
+float angle_v3v3v3(const float a[3], const float b[3], const float c[3]) ATTR_WARN_UNUSED_RESULT;
+float cos_v3v3v3(const float p1[3], const float p2[3], const float p3[3]) ATTR_WARN_UNUSED_RESULT;
+float angle_normalized_v3v3(const float v1[3], const float v2[3]) ATTR_WARN_UNUSED_RESULT;
+float angle_on_axis_v3v3v3_v3(const float v1[3], const float v2[3], const float v3[3], const float axis[3]) ATTR_WARN_UNUSED_RESULT;
void angle_tri_v3(float angles[3], const float v1[3], const float v2[3], const float v3[3]);
void angle_quad_v3(float angles[4], const float v1[3], const float v2[3], const float v3[3], const float v4[3]);
void angle_poly_v3(float *angles, const float *verts[3], int len);
@@ -260,7 +265,7 @@ void axis_sort_v3(const float axis_values[3], int r_axis_order[3]);
/***************************** Array Functions *******************************/
/* attempted to follow fixed length vertex functions. names could be improved*/
-double dot_vn_vn(const float *array_src_a, const float *array_src_b, const int size) UNUSED_RESULT_ATTR;
+double dot_vn_vn(const float *array_src_a, const float *array_src_b, const int size) ATTR_WARN_UNUSED_RESULT;
float normalize_vn_vn(float *array_tar, const float *array_src, const int size);
float normalize_vn(float *array_tar, const int size);
void range_vn_i(int *array_tar, const int size, const int start);
@@ -291,7 +296,6 @@ void fill_vn_fl(float *array_tar, const int size, const float val);
#ifdef BLI_MATH_GCC_WARN_PRAGMA
# pragma GCC diagnostic pop
#endif
-#undef UNUSED_RESULT_ATTR
#ifdef __cplusplus
}
diff --git a/source/blender/blenlib/BLI_memarena.h b/source/blender/blenlib/BLI_memarena.h
index d54dab42e05..737324ebc16 100644
--- a/source/blender/blenlib/BLI_memarena.h
+++ b/source/blender/blenlib/BLI_memarena.h
@@ -41,62 +41,28 @@
extern "C" {
#endif
+#include "BLI_compiler_attrs.h"
+
/* A reasonable standard buffer size, big
* enough to not cause much internal fragmentation,
* small enough not to waste resources
*/
-#define BLI_MEMARENA_STD_BUFSIZE (1 << 14)
-
-/* some GNU attributes are only available from GCC 4.3 */
-#define MEM_GNU_ATTRIBUTES (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 403))
+#define BLI_MEMARENA_STD_BUFSIZE MEM_SIZE_OPTIMAL(1 << 14)
struct MemArena;
typedef struct MemArena MemArena;
-struct MemArena *BLI_memarena_new(const int bufsize, const char *name)
-#if MEM_GNU_ATTRIBUTES
-__attribute__((malloc))
-__attribute__((warn_unused_result))
-__attribute__((nonnull(2)))
-#endif
-;
-
-void BLI_memarena_free(struct MemArena *ma)
-#if MEM_GNU_ATTRIBUTES
-__attribute__((nonnull(1)))
-#endif
-;
-
-void BLI_memarena_use_malloc(struct MemArena *ma)
-#if MEM_GNU_ATTRIBUTES
-__attribute__((nonnull(1)))
-#endif
-;
-void BLI_memarena_use_calloc(struct MemArena *ma)
-#if MEM_GNU_ATTRIBUTES
-__attribute__((nonnull(1)))
-#endif
-;
-
-void BLI_memarena_use_align(struct MemArena *ma, const int align)
-#if MEM_GNU_ATTRIBUTES
-__attribute__((nonnull(1)))
-#endif
-;
+struct MemArena *BLI_memarena_new(const int bufsize, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(2) ATTR_MALLOC;
+void BLI_memarena_free(struct MemArena *ma) ATTR_NONNULL(1);
+void BLI_memarena_use_malloc(struct MemArena *ma) ATTR_NONNULL(1);
+void BLI_memarena_use_calloc(struct MemArena *ma) ATTR_NONNULL(1);
+void BLI_memarena_use_align(struct MemArena *ma, const int align) ATTR_NONNULL(1);
+void *BLI_memarena_alloc(struct MemArena *ma, int size) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_ALLOC_SIZE(2);
-void *BLI_memarena_alloc(struct MemArena *ma, int size)
-#if MEM_GNU_ATTRIBUTES
-__attribute__((malloc))
-__attribute__((warn_unused_result))
-__attribute__((nonnull(1)))
-__attribute__((alloc_size(2)))
-#endif
-;
+void BLI_memarena_clear(MemArena *ma) ATTR_NONNULL(1);
#ifdef __cplusplus
}
#endif
-
-#endif
-
+#endif /* __BLI_MEMARENA_H__ */
diff --git a/source/blender/blenlib/BLI_mempool.h b/source/blender/blenlib/BLI_mempool.h
index 1c470d59062..3fab77f2cb2 100644
--- a/source/blender/blenlib/BLI_mempool.h
+++ b/source/blender/blenlib/BLI_mempool.h
@@ -39,6 +39,8 @@ extern "C"
{
#endif
+#include "BLI_compiler_attrs.h"
+
struct BLI_mempool;
struct BLI_mempool_chunk;
@@ -48,81 +50,33 @@ typedef struct BLI_mempool BLI_mempool;
* first four bytes of the elements never contain the character string
* 'free'. use with care.*/
-BLI_mempool *BLI_mempool_create(int esize, int totelem, int pchunk, int flag)
-#ifdef __GNUC__
-__attribute__((malloc))
-__attribute__((warn_unused_result))
-#endif
-;
-void *BLI_mempool_alloc(BLI_mempool *pool)
-#ifdef __GNUC__
-__attribute__((malloc))
-__attribute__((warn_unused_result))
-__attribute__((nonnull(1)))
-#endif
-;
-void *BLI_mempool_calloc(BLI_mempool *pool)
-#ifdef __GNUC__
-__attribute__((malloc))
-__attribute__((warn_unused_result))
-__attribute__((nonnull(1)))
-#endif
-;
-void BLI_mempool_free(BLI_mempool *pool, void *addr)
-#ifdef __GNUC__
-__attribute__((nonnull(1, 2)))
-#endif
-;
-void BLI_mempool_destroy(BLI_mempool *pool)
-#ifdef __GNUC__
-__attribute__((nonnull(1)))
-#endif
-;
-int BLI_mempool_count(BLI_mempool *pool)
-#ifdef __GNUC__
-__attribute__((nonnull(1)))
-#endif
-;
-void *BLI_mempool_findelem(BLI_mempool *pool, int index)
-#ifdef __GNUC__
-__attribute__((warn_unused_result))
-__attribute__((nonnull(1)))
-#endif
-;
-void BLI_mempool_as_table(BLI_mempool *pool, void **data)
-#ifdef __GNUC__
-__attribute__((nonnull(1, 2)))
-#endif
-;
-
-void **BLI_mempool_as_tableN(BLI_mempool *pool, const char *allocstr)
-#ifdef __GNUC__
-__attribute__((malloc))
-__attribute__((warn_unused_result))
-__attribute__((nonnull(1, 2)))
-#endif
-;
+BLI_mempool *BLI_mempool_create(unsigned int esize, unsigned int totelem,
+ unsigned int pchunk, unsigned int flag) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
+void *BLI_mempool_alloc(BLI_mempool *pool) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1);
+void *BLI_mempool_calloc(BLI_mempool *pool) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1);
+void BLI_mempool_free(BLI_mempool *pool, void *addr) ATTR_NONNULL(1, 2);
+void BLI_mempool_clear_ex(BLI_mempool *pool,
+ const int totelem_reserve) ATTR_NONNULL(1);
+void BLI_mempool_clear(BLI_mempool *pool) ATTR_NONNULL(1);
+void BLI_mempool_destroy(BLI_mempool *pool) ATTR_NONNULL(1);
+int BLI_mempool_count(BLI_mempool *pool) ATTR_NONNULL(1);
+void *BLI_mempool_findelem(BLI_mempool *pool, unsigned int index) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1);
-void BLI_mempool_as_array(BLI_mempool *pool, void *data)
-#ifdef __GNUC__
-__attribute__((nonnull(1, 2)))
-#endif
-;
+void BLI_mempool_as_table(BLI_mempool *pool, void **data) ATTR_NONNULL(1, 2);
+void **BLI_mempool_as_tableN(BLI_mempool *pool, const char *allocstr) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2);
+void BLI_mempool_as_array(BLI_mempool *pool, void *data) ATTR_NONNULL(1, 2);
+void *BLI_mempool_as_arrayN(BLI_mempool *pool, const char *allocstr) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2);
-void *BLI_mempool_as_arrayN(BLI_mempool *pool, const char *allocstr)
-#ifdef __GNUC__
-__attribute__((malloc))
-__attribute__((warn_unused_result))
-__attribute__((nonnull(1, 2)))
+#ifdef DEBUG
+void BLI_mempool_set_memory_debug(void);
#endif
-;
/** iteration stuff. note: this may easy to produce bugs with **/
/* private structure */
typedef struct BLI_mempool_iter {
BLI_mempool *pool;
struct BLI_mempool_chunk *curchunk;
- int curindex;
+ unsigned int curindex;
} BLI_mempool_iter;
/* flag */
@@ -131,17 +85,8 @@ enum {
BLI_MEMPOOL_ALLOW_ITER = (1 << 1)
};
-void BLI_mempool_iternew(BLI_mempool *pool, BLI_mempool_iter *iter)
-#ifdef __GNUC__
-__attribute__((nonnull(1, 2)))
-#endif
-;
-void *BLI_mempool_iterstep(BLI_mempool_iter *iter)
-#ifdef __GNUC__
-__attribute__((warn_unused_result))
-__attribute__((nonnull(1)))
-#endif
-;
+void BLI_mempool_iternew(BLI_mempool *pool, BLI_mempool_iter *iter) ATTR_NONNULL();
+void *BLI_mempool_iterstep(BLI_mempool_iter *iter) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
#ifdef __cplusplus
}
diff --git a/source/blender/blenlib/BLI_path_util.h b/source/blender/blenlib/BLI_path_util.h
index cb812fe8595..d4c5d5fed9f 100644
--- a/source/blender/blenlib/BLI_path_util.h
+++ b/source/blender/blenlib/BLI_path_util.h
@@ -35,6 +35,8 @@
extern "C" {
#endif
+#include "BLI_compiler_attrs.h"
+
struct ListBase;
struct direntry;
@@ -90,17 +92,9 @@ void BLI_split_dirfile(const char *string, char *dir, char *file, const size_t d
void BLI_split_dir_part(const char *string, char *dir, const size_t dirlen);
void BLI_split_file_part(const char *string, char *file, const size_t filelen);
void BLI_path_append(char *__restrict dst, const size_t maxlen,
- const char *__restrict file)
-#ifdef __GNUC__
-__attribute__((nonnull))
-#endif
-;
+ const char *__restrict file) ATTR_NONNULL();
void BLI_join_dirfile(char *__restrict string, const size_t maxlen,
- const char *__restrict dir, const char *__restrict file)
-#ifdef __GNUC__
-__attribute__((nonnull))
-#endif
-;
+ const char *__restrict dir, const char *__restrict file) ATTR_NONNULL();
const char *BLI_path_basename(const char *path);
typedef enum bli_rebase_state {
@@ -122,6 +116,7 @@ bool BLI_testextensie_array(const char *str, const char **ext_array);
bool BLI_testextensie_glob(const char *str, const char *ext_fnmatch);
bool BLI_replace_extension(char *path, size_t maxlen, const char *ext);
bool BLI_ensure_extension(char *path, size_t maxlen, const char *ext);
+bool BLI_ensure_filename(char *filepath, size_t maxlen, const char *filename);
void BLI_uniquename(struct ListBase *list, void *vlink, const char *defname, char delim, short name_offs, short len);
bool BLI_uniquename_cb(bool (*unique_check)(void *arg, const char *name),
void *arg, const char * defname, char delim, char *name, short name_len);
@@ -131,11 +126,7 @@ void BLI_stringenc(char *string, const char *head, const char *tail, unsigned sh
int BLI_split_name_num(char *left, int *nr, const char *name, const char delim);
/* make sure path separators conform to system one */
-void BLI_clean(char *path)
-#ifdef __GNUC__
-__attribute__((nonnull(1)))
-#endif
-;
+void BLI_clean(char *path) ATTR_NONNULL();
/**
* dir can be any input, like from buttons, and this function
@@ -181,11 +172,7 @@ bool BLI_path_is_rel(const char *path);
# define BLI_path_ncmp strncmp
#endif
-void BLI_char_switch(char *string, char from, char to)
-#ifdef __GNUC__
-__attribute__((nonnull(1)))
-#endif
-;
+void BLI_char_switch(char *string, char from, char to) ATTR_NONNULL();
/* Initialize path to program executable */
void BLI_init_program_path(const char *argv0);
diff --git a/source/blender/blenlib/BLI_scanfill.h b/source/blender/blenlib/BLI_scanfill.h
index 21197670640..52f5decb4f4 100644
--- a/source/blender/blenlib/BLI_scanfill.h
+++ b/source/blender/blenlib/BLI_scanfill.h
@@ -46,20 +46,13 @@ typedef struct ScanFillContext {
ListBase filledgebase;
ListBase fillfacebase;
- /* simple optimization for allocating thousands of small memory blocks
- * only to be used within loops, and not by one function at a time
- * free in the end, with argument '-1'
- */
-#define MEM_ELEM_BLOCKSIZE 16384
- struct mem_elements *melem__cur;
- int melem__offs; /* the current free address */
- ListBase melem__lb;
-
/* private */
struct ScanFillVertLink *_scdata;
+ struct MemArena *arena;
} ScanFillContext;
-/* note; changing this also might affect the undo copy in editmesh.c */
+#define BLI_SCANFILL_ARENA_SIZE MEM_SIZE_OPTIMAL(1 << 14)
+
typedef struct ScanFillVert {
struct ScanFillVert *next, *prev;
union {
@@ -68,10 +61,10 @@ typedef struct ScanFillVert {
intptr_t l;
unsigned int u;
} tmp;
- float co[3]; /* vertex location */
- float xy[2]; /* 2D copy of vertex location (using dominant axis) */
- unsigned int keyindex; /* original index #, for restoring key information */
- short poly_nr;
+ float co[3]; /* vertex location */
+ float xy[2]; /* 2D projection of vertex location */
+ unsigned int keyindex; /* index, caller can use how it likes to match the scanfill result with own data */
+ unsigned short poly_nr;
unsigned char edge_tot; /* number of edges using this vertex */
unsigned char f;
} ScanFillVert;
@@ -79,7 +72,7 @@ typedef struct ScanFillVert {
typedef struct ScanFillEdge {
struct ScanFillEdge *next, *prev;
struct ScanFillVert *v1, *v2;
- short poly_nr;
+ unsigned short poly_nr;
unsigned char f;
union {
unsigned char c;
@@ -91,7 +84,7 @@ typedef struct ScanFillFace {
struct ScanFillVert *v1, *v2, *v3;
} ScanFillFace;
-/* scanfill.c: used in displist only... */
+/* scanfill.c */
struct ScanFillVert *BLI_scanfill_vert_add(ScanFillContext *sf_ctx, const float vec[3]);
struct ScanFillEdge *BLI_scanfill_edge_add(ScanFillContext *sf_ctx, struct ScanFillVert *v1, struct ScanFillVert *v2);
@@ -108,11 +101,14 @@ enum {
BLI_SCANFILL_CALC_HOLES = (1 << 2)
};
void BLI_scanfill_begin(ScanFillContext *sf_ctx);
-int BLI_scanfill_calc(ScanFillContext *sf_ctx, const int flag);
-int BLI_scanfill_calc_ex(ScanFillContext *sf_ctx, const int flag,
+unsigned int BLI_scanfill_calc(ScanFillContext *sf_ctx, const int flag);
+unsigned int BLI_scanfill_calc_ex(ScanFillContext *sf_ctx, const int flag,
const float nor_proj[3]);
void BLI_scanfill_end(ScanFillContext *sf_ctx);
+void BLI_scanfill_begin_arena(ScanFillContext *sf_ctx, struct MemArena *arena);
+void BLI_scanfill_end_arena(ScanFillContext *sf_ctx, struct MemArena *arena);
+
/* These callbacks are needed to make the lib finction properly */
void BLI_setErrorCallBack(void (*f)(const char *));
diff --git a/source/blender/blenlib/BLI_smallhash.h b/source/blender/blenlib/BLI_smallhash.h
index 275599a612c..4f5446043da 100644
--- a/source/blender/blenlib/BLI_smallhash.h
+++ b/source/blender/blenlib/BLI_smallhash.h
@@ -37,6 +37,8 @@
/* based on a doubling non-chaining approach */
+#include "BLI_compiler_attrs.h"
+
typedef struct {
uintptr_t key;
void *val;
@@ -59,27 +61,15 @@ typedef struct {
unsigned int i;
} SmallHashIter;
-#ifdef __GNUC__
-# define ATTR_NONULL_FIRST __attribute__((nonnull(1)))
-# define ATTR_UNUSED_RESULT __attribute__((warn_unused_result))
-#else
-# define ATTR_NONULL_FIRST
-# define ATTR_UNUSED_RESULT
-#endif
-
-
-void BLI_smallhash_init(SmallHash *hash) ATTR_NONULL_FIRST;
-void BLI_smallhash_release(SmallHash *hash) ATTR_NONULL_FIRST;
-void BLI_smallhash_insert(SmallHash *hash, uintptr_t key, void *item) ATTR_NONULL_FIRST;
-void BLI_smallhash_remove(SmallHash *hash, uintptr_t key) ATTR_NONULL_FIRST;
-void *BLI_smallhash_lookup(SmallHash *hash, uintptr_t key) ATTR_NONULL_FIRST ATTR_UNUSED_RESULT;
-int BLI_smallhash_haskey(SmallHash *hash, uintptr_t key) ATTR_NONULL_FIRST;
-int BLI_smallhash_count(SmallHash *hash) ATTR_NONULL_FIRST;
-void *BLI_smallhash_iternext(SmallHashIter *iter, uintptr_t *key) ATTR_NONULL_FIRST ATTR_UNUSED_RESULT;
-void *BLI_smallhash_iternew(SmallHash *hash, SmallHashIter *iter, uintptr_t *key) ATTR_NONULL_FIRST ATTR_UNUSED_RESULT;
+void BLI_smallhash_init(SmallHash *hash) ATTR_NONNULL(1);
+void BLI_smallhash_release(SmallHash *hash) ATTR_NONNULL(1);
+void BLI_smallhash_insert(SmallHash *hash, uintptr_t key, void *item) ATTR_NONNULL(1);
+void BLI_smallhash_remove(SmallHash *hash, uintptr_t key) ATTR_NONNULL(1);
+void *BLI_smallhash_lookup(SmallHash *hash, uintptr_t key) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT;
+int BLI_smallhash_haskey(SmallHash *hash, uintptr_t key) ATTR_NONNULL(1);
+int BLI_smallhash_count(SmallHash *hash) ATTR_NONNULL(1);
+void *BLI_smallhash_iternext(SmallHashIter *iter, uintptr_t *key) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT;
+void *BLI_smallhash_iternew(SmallHash *hash, SmallHashIter *iter, uintptr_t *key) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT;
/* void BLI_smallhash_print(SmallHash *hash); */ /* UNUSED */
-#undef ATTR_NONULL_FIRST
-#undef ATTR_UNUSED_RESULT
-
#endif /* __BLI_SMALLHASH_H__ */
diff --git a/source/blender/compositor/operations/COM_MixBurnOperation.h b/source/blender/blenlib/BLI_sort.h
index 131ccfa2130..4df17d98a4b 100644
--- a/source/blender/compositor/operations/COM_MixBurnOperation.h
+++ b/source/blender/blenlib/BLI_sort.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2011, Blender Foundation.
+ * ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -15,31 +15,31 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * The Original Code is Copyright (C) 2013 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Benoit Bolsee,
+ * Sergey Sharybin.
+ *
+ * ***** END GPL LICENSE BLOCK *****
*/
-#ifndef _COM_MixBurnOperation_h
-#define _COM_MixBurnOperation_h
-#include "COM_MixBaseOperation.h"
+#ifndef __BLI_SORT_H__
+#define __BLI_SORT_H__
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
+/** \file BLI_sort.h
+ * \ingroup bli
*/
-class MixBurnOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixBurnOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-};
+/* Quick sort reentrant */
+typedef int (*BLI_sort_cmp_t)(void *ctx, const void *a, const void *b);
+
+void BLI_qsort_r(void *a, size_t n, size_t es, void *thunk, BLI_sort_cmp_t cmp)
+#ifdef __GNUC__
+__attribute__((nonnull(1, 5)))
#endif
+;
+
+#endif /* __BLI_SORT_H__ */
diff --git a/source/blender/blenlib/BLI_sort_utils.h b/source/blender/blenlib/BLI_sort_utils.h
new file mode 100644
index 00000000000..e08f4e5ac83
--- /dev/null
+++ b/source/blender/blenlib/BLI_sort_utils.h
@@ -0,0 +1,61 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2013 Blender Foundation.
+ * All rights reserved.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef __BLI_SORT_UTILS_H__
+#define __BLI_SORT_UTILS_H__
+
+/** \file BLI_sort_utils.h
+ * \ingroup bli
+ */
+
+/**
+ * \note keep \a sort_value first,
+ * so cmp functions can be reused.
+ */
+struct SortPointerByFloat {
+ float sort_value;
+ void *data;
+};
+
+struct SortIntByFloat {
+ float sort_value;
+ int data;
+};
+
+struct SortPointerByInt {
+ int sort_value;
+ void *data;
+};
+
+struct SortIntByInt {
+ int sort_value;
+ int data;
+};
+
+int BLI_sortutil_cmp_float(const void *a_, const void *b_);
+int BLI_sortutil_cmp_float_reverse(const void *a_, const void *b_);
+
+int BLI_sortutil_cmp_int(const void *a_, const void *b_);
+int BLI_sortutil_cmp_int_reverse(const void *a_, const void *b_);
+
+#endif /* __BLI_SORT_UTILS_H__ */
diff --git a/source/blender/compositor/operations/COM_MixAddOperation.h b/source/blender/blenlib/BLI_strict_flags.h
index 5a52846e847..5c5a6f45f0c 100644
--- a/source/blender/compositor/operations/COM_MixAddOperation.h
+++ b/source/blender/blenlib/BLI_strict_flags.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2011, Blender Foundation.
+ * ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -15,31 +15,27 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * ***** END GPL LICENSE BLOCK *****
*/
-#ifndef _COM_MixAddOperation_h
-#define _COM_MixAddOperation_h
-#include "COM_MixBaseOperation.h"
+#ifndef __BLI_STRICT_FLAGS_H__
+#define __BLI_STRICT_FLAGS_H__
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
+/** \file BLI_strict_flags.h
+ * \ingroup bli
+ * \brief Strict compiler flags for areas of code we want
+ * to ensure don't do conversions without us knowing about it.
*/
-class MixAddOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixAddOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-};
+#ifdef __GNUC__
+# pragma GCC diagnostic error "-Wsign-conversion"
+# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 /* gcc4.6+ only */
+# pragma GCC diagnostic error "-Wsign-compare"
+# pragma GCC diagnostic error "-Wconversion"
+# endif
+# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 /* gcc4.8+ only (behavior changed to ignore globals)*/
+# pragma GCC diagnostic error "-Wshadow"
+# endif
#endif
+
+#endif /* __BLI_STRICT_FLAGS_H__ */
diff --git a/source/blender/blenlib/BLI_string.h b/source/blender/blenlib/BLI_string.h
index 6c66d2f4e18..b995f2565e1 100644
--- a/source/blender/blenlib/BLI_string.h
+++ b/source/blender/blenlib/BLI_string.h
@@ -38,152 +38,43 @@
extern "C" {
#endif
-char *BLI_strdupn(const char *str, const size_t len)
-#ifdef __GNUC__
-__attribute__((malloc))
-__attribute__((warn_unused_result))
-__attribute__((nonnull))
-#endif
-;
+#include "BLI_compiler_attrs.h"
-char *BLI_strdup(const char *str)
-#ifdef __GNUC__
-__attribute__((malloc))
-__attribute__((warn_unused_result))
-__attribute__((nonnull))
-#endif
-;
+char *BLI_strdupn(const char *str, const size_t len) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
-char *BLI_strdupcat(const char *__restrict str1, const char *__restrict str2)
-#ifdef __GNUC__
-__attribute__((malloc))
-__attribute__((warn_unused_result))
-__attribute__((nonnull))
-#endif
-;
+char *BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC;
-char *BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy)
-#ifdef __GNUC__
-__attribute__((nonnull))
-#endif
-;
+char *BLI_strdupcat(const char *__restrict str1, const char *__restrict str2) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC;
-size_t BLI_strncpy_rlen(char *__restrict dst, const char *__restrict src, const size_t maxncpy)
-#ifdef __GNUC__
-__attribute__((warn_unused_result))
-__attribute__((nonnull))
-#endif
-;
+char *BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL();
-size_t BLI_strcpy_rlen(char *__restrict dst, const char *__restrict src)
-#ifdef __GNUC__
-__attribute__((warn_unused_result))
-__attribute__((nonnull))
-#endif
-;
+size_t BLI_strncpy_rlen(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
-char *BLI_str_quoted_substrN(const char *__restrict str, const char *__restrict prefix)
-#ifdef __GNUC__
-__attribute__((malloc))
-__attribute__((warn_unused_result))
-__attribute__((nonnull))
-#endif
-;
+size_t BLI_strcpy_rlen(char *__restrict dst, const char *__restrict src) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
-char *BLI_replacestrN(const char *__restrict str, const char *__restrict substr_old, const char *__restrict substr_new)
-#ifdef __GNUC__
-__attribute__((malloc))
-__attribute__((warn_unused_result))
-__attribute__((nonnull))
-#endif
-;
+char *BLI_str_quoted_substrN(const char *__restrict str, const char *__restrict prefix) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC;
-size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format, ...)
-#ifdef __GNUC__
-__attribute__ ((format(printf, 3, 4)))
-__attribute__((nonnull))
-#endif
-;
+char *BLI_replacestrN(const char *__restrict str, const char *__restrict substr_old, const char *__restrict substr_new) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC;
-size_t BLI_vsnprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format, va_list arg)
-#ifdef __GNUC__
-__attribute__ ((format(printf, 3, 0)))
-#endif
-;
-
-char *BLI_sprintfN(const char *__restrict format, ...)
-#ifdef __GNUC__
-__attribute__((malloc))
-__attribute__ ((format(printf, 1, 2)))
-__attribute__((warn_unused_result))
-__attribute__((nonnull))
-#endif
-;
+size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format, ...) ATTR_NONNULL() ATTR_PRINTF_FORMAT(3, 4);
-size_t BLI_strescape(char *__restrict dst, const char *__restrict src, const size_t maxncpy)
-#ifdef __GNUC__
-__attribute__((nonnull))
-#endif
-;
+size_t BLI_vsnprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format, va_list arg) ATTR_PRINTF_FORMAT(3, 0);
-int BLI_strcaseeq(const char *a, const char *b)
-#ifdef __GNUC__
-__attribute__((warn_unused_result))
-__attribute__((nonnull))
-#endif
-;
+char *BLI_sprintfN(const char *__restrict format, ...) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC ATTR_PRINTF_FORMAT(1, 2);
-char *BLI_strcasestr(const char *s, const char *find)
-#ifdef __GNUC__
-__attribute__((warn_unused_result))
-__attribute__((nonnull))
-#endif
-;
-int BLI_strcasecmp(const char *s1, const char *s2)
-#ifdef __GNUC__
-__attribute__((warn_unused_result))
-__attribute__((nonnull))
-#endif
-;
-int BLI_strncasecmp(const char *s1, const char *s2, size_t len)
-#ifdef __GNUC__
-__attribute__((warn_unused_result))
-__attribute__((nonnull))
-#endif
-;
-int BLI_natstrcmp(const char *s1, const char *s2)
-#ifdef __GNUC__
-__attribute__((warn_unused_result))
-__attribute__((nonnull))
-#endif
-;
-size_t BLI_strnlen(const char *str, const size_t maxlen)
-#ifdef __GNUC__
-__attribute__((warn_unused_result))
-__attribute__((nonnull))
-#endif
-;
-void BLI_timestr(double _time, char *str, size_t maxlen)
-#ifdef __GNUC__
-__attribute__((nonnull))
-#endif
-;
+size_t BLI_strescape(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL();
-void BLI_ascii_strtolower(char *str, const size_t len)
-#ifdef __GNUC__
-__attribute__((nonnull))
-#endif
-;
-void BLI_ascii_strtoupper(char *str, const size_t len)
-#ifdef __GNUC__
-__attribute__((nonnull))
-#endif
-;
-int BLI_str_rstrip_float_zero(char *str, const char pad)
-#ifdef __GNUC__
-__attribute__((nonnull))
-#endif
-;
+int BLI_strcaseeq(const char *a, const char *b) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+char *BLI_strcasestr(const char *s, const char *find) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+int BLI_strcasecmp(const char *s1, const char *s2) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+int BLI_strncasecmp(const char *s1, const char *s2, size_t len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+int BLI_natstrcmp(const char *s1, const char *s2) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+size_t BLI_strnlen(const char *str, const size_t maxlen) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+void BLI_timestr(double _time, char *str, size_t maxlen) ATTR_NONNULL();
+
+void BLI_ascii_strtolower(char *str, const size_t len) ATTR_NONNULL();
+void BLI_ascii_strtoupper(char *str, const size_t len) ATTR_NONNULL();
+int BLI_str_rstrip_float_zero(char *str, const char pad) ATTR_NONNULL();
#ifdef __cplusplus
}
diff --git a/source/blender/blenlib/BLI_string_utf8.h b/source/blender/blenlib/BLI_string_utf8.h
index db32190494a..4aef2318683 100644
--- a/source/blender/blenlib/BLI_string_utf8.h
+++ b/source/blender/blenlib/BLI_string_utf8.h
@@ -31,57 +31,45 @@
extern "C" {
#endif
-#ifdef __GNUC__
-# define ATTR_NONULL __attribute__((nonnull))
-# define ATTR_NONULL_FIRST __attribute__((nonnull(1)))
-# define ATTR_UNUSED_RESULT __attribute__((warn_unused_result))
-#else
-# define ATTR_NONULL
-# define ATTR_NONULL_FIRST
-# define ATTR_UNUSED_RESULT
-#endif
+#include "BLI_compiler_attrs.h"
-char *BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONULL;
-char *BLI_strncat_utf8(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONULL;
-int BLI_utf8_invalid_byte(const char *str, int length) ATTR_NONULL;
-int BLI_utf8_invalid_strip(char *str, int length) ATTR_NONULL;
+char *BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL();
+char *BLI_strncat_utf8(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL();
+int BLI_utf8_invalid_byte(const char *str, int length) ATTR_NONNULL();
+int BLI_utf8_invalid_strip(char *str, int length) ATTR_NONNULL();
-int BLI_str_utf8_size(const char *p) ATTR_NONULL; /* warning, can return -1 on bad chars */
-int BLI_str_utf8_size_safe(const char *p) ATTR_NONULL;
+int BLI_str_utf8_size(const char *p) ATTR_NONNULL(); /* warning, can return -1 on bad chars */
+int BLI_str_utf8_size_safe(const char *p) ATTR_NONNULL();
/* copied from glib */
-unsigned int BLI_str_utf8_as_unicode(const char *p) ATTR_NONULL;
-unsigned int BLI_str_utf8_as_unicode_and_size(const char *__restrict p, size_t *__restrict index) ATTR_NONULL;
-unsigned int BLI_str_utf8_as_unicode_and_size_safe(const char *__restrict p, size_t *__restrict index) ATTR_NONULL;
-unsigned int BLI_str_utf8_as_unicode_step(const char *__restrict p, size_t *__restrict index) ATTR_NONULL;
+unsigned int BLI_str_utf8_as_unicode(const char *p) ATTR_NONNULL();
+unsigned int BLI_str_utf8_as_unicode_and_size(const char *__restrict p, size_t *__restrict index) ATTR_NONNULL();
+unsigned int BLI_str_utf8_as_unicode_and_size_safe(const char *__restrict p, size_t *__restrict index) ATTR_NONNULL();
+unsigned int BLI_str_utf8_as_unicode_step(const char *__restrict p, size_t *__restrict index) ATTR_NONNULL();
size_t BLI_str_utf8_from_unicode(unsigned int c, char *outbuf);
-char *BLI_str_find_prev_char_utf8(const char *str, const char *p) ATTR_NONULL;
-char *BLI_str_find_next_char_utf8(const char *p, const char *end) ATTR_NONULL_FIRST;
-char *BLI_str_prev_char_utf8(const char *p) ATTR_NONULL;
+char *BLI_str_find_prev_char_utf8(const char *str, const char *p) ATTR_NONNULL();
+char *BLI_str_find_next_char_utf8(const char *p, const char *end) ATTR_NONNULL(1);
+char *BLI_str_prev_char_utf8(const char *p) ATTR_NONNULL();
/* wchar_t functions, copied from blenders own font.c originally */
-size_t BLI_wstrlen_utf8(const wchar_t *src) ATTR_NONULL;
-size_t BLI_strlen_utf8_ex(const char *strc, size_t *r_len_bytes) ATTR_NONULL;
-size_t BLI_strlen_utf8(const char *strc) ATTR_NONULL;
-size_t BLI_strnlen_utf8_ex(const char *strc, const size_t maxlen, size_t *r_len_bytes) ATTR_NONULL;
-size_t BLI_strnlen_utf8(const char *strc, const size_t maxlen) ATTR_NONULL;
-size_t BLI_strncpy_wchar_as_utf8(char *__restrict dst, const wchar_t *__restrict src, const size_t maxcpy) ATTR_NONULL;
-size_t BLI_strncpy_wchar_from_utf8(wchar_t *__restrict dst, const char *__restrict src, const size_t maxcpy) ATTR_NONULL;
+size_t BLI_wstrlen_utf8(const wchar_t *src) ATTR_NONNULL();
+size_t BLI_strlen_utf8_ex(const char *strc, size_t *r_len_bytes) ATTR_NONNULL();
+size_t BLI_strlen_utf8(const char *strc) ATTR_NONNULL();
+size_t BLI_strnlen_utf8_ex(const char *strc, const size_t maxlen, size_t *r_len_bytes) ATTR_NONNULL();
+size_t BLI_strnlen_utf8(const char *strc, const size_t maxlen) ATTR_NONNULL();
+size_t BLI_strncpy_wchar_as_utf8(char *__restrict dst, const wchar_t *__restrict src, const size_t maxcpy) ATTR_NONNULL();
+size_t BLI_strncpy_wchar_from_utf8(wchar_t *__restrict dst, const char *__restrict src, const size_t maxcpy) ATTR_NONNULL();
/* count columns that character/string occupies, based on wcwidth.c */
int BLI_wcwidth(wchar_t ucs);
-int BLI_wcswidth(const wchar_t *pwcs, size_t n) ATTR_NONULL;
-int BLI_str_utf8_char_width(const char *p) ATTR_NONULL; /* warning, can return -1 on bad chars */
-int BLI_str_utf8_char_width_safe(const char *p) ATTR_NONULL;
+int BLI_wcswidth(const wchar_t *pwcs, size_t n) ATTR_NONNULL();
+int BLI_str_utf8_char_width(const char *p) ATTR_NONNULL(); /* warning, can return -1 on bad chars */
+int BLI_str_utf8_char_width_safe(const char *p) ATTR_NONNULL();
#define BLI_UTF8_MAX 6 /* mem */
#define BLI_UTF8_WIDTH_MAX 2 /* columns */
#define BLI_UTF8_ERR ((unsigned int)-1)
-#undef ATTR_NONULL
-#undef ATTR_NONULL_FIRST
-#undef ATTR_UNUSED_RESULT
-
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/blenlib/BLI_sys_types.h b/source/blender/blenlib/BLI_sys_types.h
index e544006fd69..0b7f07e3d36 100644
--- a/source/blender/blenlib/BLI_sys_types.h
+++ b/source/blender/blenlib/BLI_sys_types.h
@@ -116,7 +116,7 @@ typedef uint64_t u_int64_t;
* use (bool, true / false) instead */
#ifdef HAVE_STDBOOL_H
# include <stdbool.h>
-#else
+#elif !defined(__bool_true_false_are_defined) && !defined(__BOOL_DEFINED)
# ifndef HAVE__BOOL
# ifdef __cplusplus
typedef bool _BLI_Bool;
diff --git a/source/blender/blenlib/BLI_task.h b/source/blender/blenlib/BLI_task.h
new file mode 100644
index 00000000000..c9cbaf997fb
--- /dev/null
+++ b/source/blender/blenlib/BLI_task.h
@@ -0,0 +1,108 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef __BLI_TASK_H__
+#define __BLI_TASK_H__
+
+/** \file BLI_task.h
+ * \ingroup bli
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "BLI_threads.h"
+#include "BLI_utildefines.h"
+
+/* Task Scheduler
+ *
+ * Central scheduler that holds running threads ready to execute tasks. A single
+ * queue holds the task from all pools.
+ *
+ * Init/exit must be called before/after any task pools are created/freed, and
+ * must be called from the main threads. All other scheduler and pool functions
+ * are thread-safe. */
+
+typedef struct TaskScheduler TaskScheduler;
+
+enum {
+ TASK_SCHEDULER_AUTO_THREADS = 0,
+ TASK_SCHEDULER_SINGLE_THREAD = 1
+};
+
+TaskScheduler *BLI_task_scheduler_create(int num_threads);
+void BLI_task_scheduler_free(TaskScheduler *scheduler);
+
+int BLI_task_scheduler_num_threads(TaskScheduler *scheduler);
+
+/* Task Pool
+ *
+ * Pool of tasks that will be executed by the central TaskScheduler. For each
+ * pool, we can wait for all tasks to be done, or cancel them before they are
+ * done.
+ *
+ * Running tasks may spawn new tasks.
+ *
+ * Pools may be nested, i.e. a thread running a task can create another task
+ * pool with smaller tasks. When other threads are busy they will continue
+ * working on their own tasks, if not they will join in, no new threads will
+ * be launched.
+ */
+
+typedef enum TaskPriority {
+ TASK_PRIORITY_LOW,
+ TASK_PRIORITY_HIGH
+} TaskPriority;
+
+typedef struct TaskPool TaskPool;
+typedef void (*TaskRunFunction)(TaskPool *pool, void *taskdata, int threadid);
+
+TaskPool *BLI_task_pool_create(TaskScheduler *scheduler, void *userdata);
+void BLI_task_pool_free(TaskPool *pool);
+
+void BLI_task_pool_push(TaskPool *pool, TaskRunFunction run,
+ void *taskdata, bool free_taskdata, TaskPriority priority);
+
+/* work and wait until all tasks are done */
+void BLI_task_pool_work_and_wait(TaskPool *pool);
+/* cancel all tasks, keep worker threads running */
+void BLI_task_pool_cancel(TaskPool *pool);
+/* stop all worker threads */
+void BLI_task_pool_stop(TaskPool *pool);
+
+/* for worker threads, test if canceled */
+bool BLI_task_pool_canceled(TaskPool *pool);
+
+/* optional userdata pointer to pass along to run function */
+void *BLI_task_pool_userdata(TaskPool *pool);
+
+/* optional mutex to use from run function */
+ThreadMutex *BLI_task_pool_user_mutex(TaskPool *pool);
+
+/* number of tasks done, for stats, don't use this to make decisions */
+size_t BLI_task_pool_tasks_done(TaskPool *pool);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/source/blender/blenlib/BLI_threads.h b/source/blender/blenlib/BLI_threads.h
index 154986936a2..7a3ee1dd0f4 100644
--- a/source/blender/blenlib/BLI_threads.h
+++ b/source/blender/blenlib/BLI_threads.h
@@ -45,11 +45,15 @@ extern "C" {
#define BLENDER_MAX_THREADS 64
struct ListBase;
+struct TaskScheduler;
/* Threading API */
/*this is run once at startup*/
void BLI_threadapi_init(void);
+void BLI_threadapi_exit(void);
+
+struct TaskScheduler *BLI_task_scheduler_get(void);
void BLI_init_threads(struct ListBase *threadbase, void *(*do_thread)(void *), int tot);
int BLI_available_threads(struct ListBase *threadbase);
@@ -100,6 +104,7 @@ ThreadMutex *BLI_mutex_alloc(void);
void BLI_mutex_free(ThreadMutex *mutex);
void BLI_mutex_lock(ThreadMutex *mutex);
+bool BLI_mutex_trylock(ThreadMutex *mutex);
void BLI_mutex_unlock(ThreadMutex *mutex);
/* Spin Lock */
@@ -143,27 +148,15 @@ void BLI_ticket_mutex_free(TicketMutex *ticket);
void BLI_ticket_mutex_lock(TicketMutex *ticket);
void BLI_ticket_mutex_unlock(TicketMutex *ticket);
-/* ThreadedWorker
- *
- * A simple tool for dispatching work to a limited number of threads
- * in a transparent fashion from the caller's perspective. */
-
-struct ThreadedWorker;
-
-/* Create a new worker supporting tot parallel threads.
- * When new work in inserted and all threads are busy, sleep(sleep_time) before checking again
- */
-struct ThreadedWorker *BLI_create_worker(void *(*do_thread)(void *), int tot, int sleep_time);
-
-/* join all working threads */
-void BLI_end_worker(struct ThreadedWorker *worker);
-
-/* also ends all working threads */
-void BLI_destroy_worker(struct ThreadedWorker *worker);
+/* Condition */
+
+typedef pthread_cond_t ThreadCondition;
-/* Spawns a new work thread if possible, sleeps until one is available otherwise
- * NOTE: inserting work is NOT thread safe, so make sure it is only done from one thread */
-void BLI_insert_work(struct ThreadedWorker *worker, void *param);
+void BLI_condition_init(ThreadCondition *cond);
+void BLI_condition_wait(ThreadCondition *cond, ThreadMutex *mutex);
+void BLI_condition_notify_one(ThreadCondition *cond);
+void BLI_condition_notify_all(ThreadCondition *cond);
+void BLI_condition_end(ThreadCondition *cond);
/* ThreadWorkQueue
*
diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h
index 63235ad9c82..c3a3c035ed3 100644
--- a/source/blender/blenlib/BLI_utildefines.h
+++ b/source/blender/blenlib/BLI_utildefines.h
@@ -113,7 +113,7 @@
/* can be used in simple macros */
#define CHECK_TYPE_INLINE(val, type) \
- ((void)(((type *)0) != (val)))
+ ((void)(((type)0) != (val)))
#define SWAP(type, a, b) { \
type sw_ap; \
@@ -337,12 +337,6 @@
# define UNUSED_FUNCTION(x) UNUSED_ ## x
#endif
-#ifdef __GNUC__
-# define WARN_UNUSED __attribute__((warn_unused_result))
-#else
-# define WARN_UNUSED
-#endif
-
/*little macro so inline keyword works*/
#if defined(_MSC_VER)
# define BLI_INLINE static __forceinline
diff --git a/source/blender/blenlib/BLI_winstuff.h b/source/blender/blenlib/BLI_winstuff.h
index 20a4c3c274e..e75ec7eef2c 100644
--- a/source/blender/blenlib/BLI_winstuff.h
+++ b/source/blender/blenlib/BLI_winstuff.h
@@ -100,7 +100,6 @@ extern "C" {
// not accepted by access() on windows
//# define X_OK 1
# define F_OK 0
-# define PATH_MAX 4096
#endif
#ifndef FREE_WINDOWS
diff --git a/source/blender/blenlib/CMakeLists.txt b/source/blender/blenlib/CMakeLists.txt
index b6b69116e67..d855d45760a 100644
--- a/source/blender/blenlib/CMakeLists.txt
+++ b/source/blender/blenlib/CMakeLists.txt
@@ -25,7 +25,7 @@
# XXX allowing blenkernel and RNA includes in blenlib is a hack,
# but needed in a few places atm (bpath.c for instance)
-set(INC
+set(INC
.
# ../blenkernel # dont add this back!
../makesdna
@@ -54,6 +54,7 @@ set(SRC
intern/boxpack2d.c
intern/buffer.c
intern/callbacks.c
+ intern/convexhull2d.c
intern/cpu.c
intern/dynlib.c
intern/edgehash.c
@@ -86,11 +87,14 @@ set(SRC
intern/rct.c
intern/scanfill.c
intern/smallhash.c
+ intern/sort.c
+ intern/sort_utils.c
intern/stack.c
intern/storage.c
intern/string.c
intern/string_cursor_utf8.c
intern/string_utf8.c
+ intern/task.c
intern/threads.c
intern/time.c
intern/uvproject.c
@@ -98,14 +102,16 @@ set(SRC
intern/voxel.c
intern/winstuff.c
- BLI_args.h
BLI_alloca.h
+ BLI_args.h
BLI_array.h
BLI_bitmap.h
BLI_blenlib.h
- BLI_buffer.h
BLI_boxpack2d.h
+ BLI_buffer.h
BLI_callbacks.h
+ BLI_compiler_attrs.h
+ BLI_convexhull2d.h
BLI_cpu.h
BLI_dlrbTree.h
BLI_dynlib.h
@@ -125,6 +131,7 @@ set(SRC
BLI_kdtree.h
BLI_lasso.h
BLI_linklist.h
+ BLI_linklist_stack.h
BLI_listbase.h
BLI_math.h
BLI_math_base.h
@@ -146,11 +153,15 @@ set(SRC
BLI_rect.h
BLI_scanfill.h
BLI_smallhash.h
+ BLI_sort.h
+ BLI_sort_utils.h
BLI_stack.h
+ BLI_strict_flags.h
BLI_string.h
BLI_string_cursor_utf8.h
BLI_string_utf8.h
BLI_sys_types.h
+ BLI_task.h
BLI_threads.h
BLI_utildefines.h
BLI_uvproject.h
@@ -159,6 +170,7 @@ set(SRC
BLI_voxel.h
BLI_winstuff.h
PIL_time.h
+ PIL_time_utildefines.h
)
if(WITH_BINRELOC)
@@ -168,6 +180,10 @@ if(WITH_BINRELOC)
add_definitions(-DWITH_BINRELOC)
endif()
+if(WITH_MEM_VALGRIND)
+ add_definitions(-DWITH_MEM_VALGRIND)
+endif()
+
if(WIN32)
list(APPEND INC
../../../intern/utfconv
diff --git a/source/blender/blenlib/PIL_time.h b/source/blender/blenlib/PIL_time.h
index c3e7e8486d9..158559fa3d9 100644
--- a/source/blender/blenlib/PIL_time.h
+++ b/source/blender/blenlib/PIL_time.h
@@ -51,44 +51,8 @@ double PIL_check_seconds_timer(void);
*/
void PIL_sleep_ms(int ms);
-/** Utility defines for timing.
- * requires BLI_utildefines.h for 'AT'
- * TIMEIT_VALUE returns the time since TIMEIT_START was called.
- */
-#define TIMEIT_START(var) \
- { \
- double _timeit_##var = PIL_check_seconds_timer(); \
- printf("time start (" #var "): " AT "\n"); \
- fflush(stdout); \
- { (void)0
-
-#define TIMEIT_VALUE(var) (float)(PIL_check_seconds_timer() - _timeit_##var)
-
-#define TIMEIT_VALUE_PRINT(var) \
- { \
- printf("time update(" #var "): %.6f" " " AT "\n", TIMEIT_VALUE(var));\
- fflush(stdout); \
- } (void)0
-
-#define TIMEIT_END(var) \
- } \
- printf("time end (" #var "): %.6f" " " AT "\n", TIMEIT_VALUE(var)); \
- fflush(stdout); \
-} (void)0
-
-/**
- * Given some function/expression:
- * TIMEIT_BENCH(some_function(), some_unique_description);
- */
-#define TIMEIT_BENCH(expr, id) \
- { \
- TIMEIT_START(id); \
- (expr); \
- TIMEIT_END(id); \
- } (void)0
-
#ifdef __cplusplus
}
#endif
-#endif /* !__PIL_TIME_H__ */
+#endif /* __PIL_TIME_H__ */
diff --git a/source/blender/blenlib/PIL_time_utildefines.h b/source/blender/blenlib/PIL_time_utildefines.h
new file mode 100644
index 00000000000..135817f6a17
--- /dev/null
+++ b/source/blender/blenlib/PIL_time_utildefines.h
@@ -0,0 +1,96 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2013 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Campbell Barton
+ * Sergey Sharybin
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/blenlib/PIL_time_utildefines.h
+ * \ingroup bli
+ * \brief Utility defines for timing/benchmarks.
+ */
+
+#ifndef __PIL_TIME_UTILDEFINES_H__
+#define __PIL_TIME_UTILDEFINES_H__
+
+#include "PIL_time.h" /* for PIL_check_seconds_timer */
+#include "BLI_utildefines.h" /* for AT */
+
+#define TIMEIT_START(var) \
+ { \
+ double _timeit_##var = PIL_check_seconds_timer(); \
+ printf("time start (" #var "): " AT "\n"); \
+ fflush(stdout); \
+ { (void)0
+
+/**
+ * \return the time since TIMEIT_START was called.
+ */
+#define TIMEIT_VALUE(var) (float)(PIL_check_seconds_timer() - _timeit_##var)
+
+#define TIMEIT_VALUE_PRINT(var) \
+ { \
+ printf("time update(" #var "): %.6f" " " AT "\n", TIMEIT_VALUE(var));\
+ fflush(stdout); \
+ } (void)0
+
+#define TIMEIT_END(var) \
+ } \
+ printf("time end (" #var "): %.6f" " " AT "\n", TIMEIT_VALUE(var)); \
+ fflush(stdout); \
+} (void)0
+
+/**
+ * Given some function/expression:
+ * TIMEIT_BENCH(some_function(), some_unique_description);
+ */
+#define TIMEIT_BENCH(expr, id) \
+ { \
+ TIMEIT_START(id); \
+ (expr); \
+ TIMEIT_END(id); \
+ } (void)0
+
+#define TIMEIT_BLOCK_INIT(id) \
+ double _timeit_var_##id = 0; \
+ (void) 0
+
+#define TIMEIT_BLOCK_START(id) \
+ { \
+ double _timeit_block_start_##id = PIL_check_seconds_timer(); \
+ { (void)0
+
+#define TIMEIT_BLOCK_END(id) \
+ } \
+ _timeit_var_##id += (PIL_check_seconds_timer() - \
+ _timeit_block_start_##id); \
+ } (void)0
+
+#define TIMEIT_BLOCK_STATS(id) \
+ { \
+ printf("%s time (in seconds): %f\n", #id, _timeit_var_##id); \
+ fflush(stdout); \
+ } (void)0
+
+#endif /* __PIL_TIME_UTILDEFINES_H__ */
diff --git a/source/blender/blenlib/intern/BLI_array.c b/source/blender/blenlib/intern/BLI_array.c
index 510bf072513..21d7a5a6d10 100644
--- a/source/blender/blenlib/intern/BLI_array.c
+++ b/source/blender/blenlib/intern/BLI_array.c
@@ -13,7 +13,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2008 Blender Foundation.
* All rights reserved.
diff --git a/source/blender/blenlib/intern/BLI_ghash.c b/source/blender/blenlib/intern/BLI_ghash.c
index 14dfbcffebe..fcca6cd59ba 100644
--- a/source/blender/blenlib/intern/BLI_ghash.c
+++ b/source/blender/blenlib/intern/BLI_ghash.c
@@ -23,12 +23,13 @@
* Contributor(s): none yet.
*
* ***** END GPL LICENSE BLOCK *****
- * A general (pointer -> pointer) hash table ADT
*/
/** \file blender/blenlib/intern/BLI_ghash.c
* \ingroup bli
*
+ * A general (pointer -> pointer) hash table ADT
+ *
* \note edgehash.c is based on this, make sure they stay in sync.
*/
@@ -42,16 +43,8 @@
#include "BLI_utildefines.h"
#include "BLI_mempool.h"
#include "BLI_ghash.h"
+#include "BLI_strict_flags.h"
-/***/
-
-#ifdef __GNUC__
-# pragma GCC diagnostic error "-Wsign-conversion"
-# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 /* gcc4.6+ only */
-# pragma GCC diagnostic error "-Wsign-compare"
-# pragma GCC diagnostic error "-Wconversion"
-# endif
-#endif
const unsigned int hashsizes[] = {
5, 11, 17, 37, 67, 131, 257, 521, 1031, 2053, 4099, 8209,
@@ -60,206 +53,507 @@ const unsigned int hashsizes[] = {
268435459
};
+/* internal flag to ensure sets values aren't used */
+#ifndef NDEBUG
+# define GHASH_FLAG_IS_SET (1 << 8)
+# define IS_GHASH_ASSERT(gh) BLI_assert((gh->flag & GHASH_FLAG_IS_SET) == 0)
+// # define IS_GSET_ASSERT(gs) BLI_assert((gs->flag & GHASH_FLAG_IS_SET) != 0)
+#else
+# define IS_GHASH_ASSERT(gh)
+// # define IS_GSET_ASSERT(eh)
+#endif
+
/***/
-GHash *BLI_ghash_new(GHashHashFP hashfp, GHashCmpFP cmpfp, const char *info)
+typedef struct Entry {
+ struct Entry *next;
+
+ void *key, *val;
+} Entry;
+
+struct GHash {
+ GHashHashFP hashfp;
+ GHashCmpFP cmpfp;
+
+ Entry **buckets;
+ struct BLI_mempool *entrypool;
+ unsigned int nbuckets;
+ unsigned int nentries;
+ unsigned int cursize, flag;
+};
+
+
+/* -------------------------------------------------------------------- */
+/* GHash API */
+
+/** \name Internal Utility API
+ * \{ */
+
+/**
+ * Get the hash for a key.
+ */
+BLI_INLINE unsigned int ghash_keyhash(GHash *gh, const void *key)
+{
+ return gh->hashfp(key) % gh->nbuckets;
+}
+
+/**
+ * Check if the number of items in the GHash is large enough to require more buckets.
+ */
+BLI_INLINE bool ghash_test_expand_buckets(const unsigned int nentries, const unsigned int nbuckets)
+{
+ return (nentries > nbuckets * 3);
+}
+
+/**
+ * Expand buckets to the next size up.
+ */
+BLI_INLINE void ghash_resize_buckets(GHash *gh, const unsigned int nbuckets)
+{
+ Entry **buckets_old = gh->buckets;
+ Entry **buckets_new;
+ const unsigned int nbuckets_old = gh->nbuckets;
+ unsigned int i;
+ Entry *e;
+
+ BLI_assert(gh->nbuckets != nbuckets);
+
+ gh->nbuckets = nbuckets;
+ buckets_new = (Entry **)MEM_callocN(gh->nbuckets * sizeof(*gh->buckets), "buckets");
+
+ for (i = 0; i < nbuckets_old; i++) {
+ Entry *e_next;
+ for (e = buckets_old[i]; e; e = e_next) {
+ const unsigned hash = ghash_keyhash(gh, e->key);
+ e_next = e->next;
+ e->next = buckets_new[hash];
+ buckets_new[hash] = e;
+ }
+ }
+
+ gh->buckets = buckets_new;
+ MEM_freeN(buckets_old);
+}
+
+/**
+ * Increase initial bucket size to match a reserved ammount.
+ */
+BLI_INLINE void ghash_buckets_reserve(GHash *gh, const unsigned int nentries_reserve)
+{
+ while (ghash_test_expand_buckets(nentries_reserve, gh->nbuckets)) {
+ gh->nbuckets = hashsizes[++gh->cursize];
+ }
+}
+
+/**
+ * Internal lookup function.
+ * Takes a hash argument to avoid calling #ghash_keyhash multiple times.
+ */
+BLI_INLINE Entry *ghash_lookup_entry_ex(GHash *gh, const void *key,
+ const unsigned int hash)
+{
+ Entry *e;
+
+ for (e = gh->buckets[hash]; e; e = e->next) {
+ if (UNLIKELY(gh->cmpfp(key, e->key) == 0)) {
+ return e;
+ }
+ }
+ return NULL;
+}
+
+/**
+ * Internal lookup function. Only wraps #ghash_lookup_entry_ex
+ */
+BLI_INLINE Entry *ghash_lookup_entry(GHash *gh, const void *key)
+{
+ const unsigned int hash = ghash_keyhash(gh, key);
+ return ghash_lookup_entry_ex(gh, key, hash);
+}
+
+static GHash *ghash_new(GHashHashFP hashfp, GHashCmpFP cmpfp, const char *info,
+ const unsigned int nentries_reserve,
+ const unsigned int entry_size)
{
GHash *gh = MEM_mallocN(sizeof(*gh), info);
+
gh->hashfp = hashfp;
gh->cmpfp = cmpfp;
- gh->entrypool = BLI_mempool_create(sizeof(Entry), 64, 64, 0);
- gh->cursize = 0;
+ gh->nbuckets = hashsizes[0]; /* gh->cursize */
gh->nentries = 0;
- gh->nbuckets = hashsizes[gh->cursize];
+ gh->cursize = 0;
+ gh->flag = 0;
+
+ /* if we have reserved the number of elements that this hash will contain */
+ if (nentries_reserve) {
+ ghash_buckets_reserve(gh, nentries_reserve);
+ }
gh->buckets = MEM_callocN(gh->nbuckets * sizeof(*gh->buckets), "buckets");
+ gh->entrypool = BLI_mempool_create(entry_size, 64, 64, 0);
return gh;
}
-int BLI_ghash_size(GHash *gh)
-{
- return (int)gh->nentries;
-}
-
-void BLI_ghash_insert(GHash *gh, void *key, void *val)
+/**
+ * Internal insert function.
+ * Takes a hash argument to avoid calling #ghash_keyhash multiple times.
+ */
+BLI_INLINE void ghash_insert_ex(GHash *gh, void *key, void *val,
+ unsigned int hash)
{
- unsigned int hash = gh->hashfp(key) % gh->nbuckets;
Entry *e = (Entry *)BLI_mempool_alloc(gh->entrypool);
+ BLI_assert((gh->flag & GHASH_FLAG_ALLOW_DUPES) || (BLI_ghash_haskey(gh, key) == 0));
+ IS_GHASH_ASSERT(gh);
e->next = gh->buckets[hash];
e->key = key;
e->val = val;
gh->buckets[hash] = e;
- if (UNLIKELY(++gh->nentries > gh->nbuckets / 2)) {
- Entry **old = gh->buckets;
- const unsigned nold = gh->nbuckets;
- unsigned int i;
-
- gh->nbuckets = hashsizes[++gh->cursize];
- gh->buckets = (Entry **)MEM_callocN(gh->nbuckets * sizeof(*gh->buckets), "buckets");
-
- for (i = 0; i < nold; i++) {
- Entry *e_next;
- for (e = old[i]; e; e = e_next) {
- e_next = e->next;
- hash = gh->hashfp(e->key) % gh->nbuckets;
- e->next = gh->buckets[hash];
- gh->buckets[hash] = e;
- }
- }
-
- MEM_freeN(old);
+ if (UNLIKELY(ghash_test_expand_buckets(++gh->nentries, gh->nbuckets))) {
+ ghash_resize_buckets(gh, hashsizes[++gh->cursize]);
}
}
-void *BLI_ghash_lookup(GHash *gh, const void *key)
+/**
+ * Insert function that doesn't set the value (use for GSet)
+ */
+BLI_INLINE void ghash_insert_ex_keyonly(GHash *gh, void *key,
+ unsigned int hash)
{
- const unsigned int hash = gh->hashfp(key) % gh->nbuckets;
- Entry *e;
+ Entry *e = (Entry *)BLI_mempool_alloc(gh->entrypool);
+ BLI_assert((gh->flag & GHASH_FLAG_ALLOW_DUPES) || (BLI_ghash_haskey(gh, key) == 0));
+ e->next = gh->buckets[hash];
+ e->key = key;
+ /* intentionally leave value unset */
+ gh->buckets[hash] = e;
- for (e = gh->buckets[hash]; e; e = e->next) {
- if (gh->cmpfp(key, e->key) == 0) {
- return e->val;
- }
+ if (UNLIKELY(ghash_test_expand_buckets(++gh->nentries, gh->nbuckets))) {
+ ghash_resize_buckets(gh, hashsizes[++gh->cursize]);
}
- return NULL;
}
-bool BLI_ghash_remove(GHash *gh, void *key, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
+BLI_INLINE void ghash_insert(GHash *gh, void *key, void *val)
+{
+ const unsigned int hash = ghash_keyhash(gh, key);
+ ghash_insert_ex(gh, key, val, hash);
+}
+
+/**
+ * Remove the entry and return it, caller must free from gh->entrypool.
+ */
+static Entry *ghash_remove_ex(GHash *gh, void *key, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp,
+ unsigned int hash)
{
- unsigned int hash = gh->hashfp(key) % gh->nbuckets;
Entry *e;
- Entry *p = NULL;
+ Entry *e_prev = NULL;
for (e = gh->buckets[hash]; e; e = e->next) {
- if (gh->cmpfp(key, e->key) == 0) {
- Entry *n = e->next;
+ if (UNLIKELY(gh->cmpfp(key, e->key) == 0)) {
+ Entry *e_next = e->next;
if (keyfreefp) keyfreefp(e->key);
if (valfreefp) valfreefp(e->val);
- BLI_mempool_free(gh->entrypool, e);
- /* correct but 'e' isn't used before return */
- /* e = n; *//*UNUSED*/
- if (p) p->next = n;
- else gh->buckets[hash] = n;
+ if (e_prev) e_prev->next = e_next;
+ else gh->buckets[hash] = e_next;
gh->nentries--;
- return true;
+ return e;
}
- p = e;
+ e_prev = e;
}
- return false;
+ return NULL;
}
-void BLI_ghash_clear(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
+/**
+ * Run free callbacks for freeing entries.
+ */
+static void ghash_free_cb(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
{
unsigned int i;
- if (keyfreefp || valfreefp) {
- for (i = 0; i < gh->nbuckets; i++) {
- Entry *e;
+ BLI_assert(keyfreefp || valfreefp);
- for (e = gh->buckets[i]; e; ) {
- Entry *n = e->next;
+ for (i = 0; i < gh->nbuckets; i++) {
+ Entry *e;
- if (keyfreefp) keyfreefp(e->key);
- if (valfreefp) valfreefp(e->val);
+ for (e = gh->buckets[i]; e; ) {
+ Entry *e_next = e->next;
- e = n;
- }
+ if (keyfreefp) keyfreefp(e->key);
+ if (valfreefp) valfreefp(e->val);
+
+ e = e_next;
}
}
+}
+/** \} */
- gh->cursize = 0;
- gh->nentries = 0;
- gh->nbuckets = hashsizes[gh->cursize];
- MEM_freeN(gh->buckets);
- gh->buckets = MEM_callocN(gh->nbuckets * sizeof(*gh->buckets), "buckets");
-}
+/** \name Public API
+ * \{ */
-/* same as above but return the value,
- * no free value argument since it will be returned */
-void *BLI_ghash_pop(GHash *gh, void *key, GHashKeyFreeFP keyfreefp)
+/**
+ * Creates a new, empty GHash.
+ *
+ * \param hashfp Hash callback.
+ * \param cmpfp Comparison callback.
+ * \param info Identifier string for the GHash.
+ * \param nentries_reserve Optionally reserve the number of members that the hash will hold.
+ * Use this to avoid resizing buckets if the size is known or can be closely approximated.
+ * \return An empty GHash.
+ */
+GHash *BLI_ghash_new_ex(GHashHashFP hashfp, GHashCmpFP cmpfp, const char *info,
+ const unsigned int nentries_reserve)
{
- unsigned int hash = gh->hashfp(key) % gh->nbuckets;
- Entry *e;
- Entry *p = NULL;
+ return ghash_new(hashfp, cmpfp, info,
+ nentries_reserve,
+ (unsigned int)sizeof(Entry));
+}
- for (e = gh->buckets[hash]; e; e = e->next) {
- if (gh->cmpfp(key, e->key) == 0) {
- Entry *n = e->next;
- void *value = e->val;
+/**
+ * Wraps #BLI_ghash_new_ex with zero entries reserved.
+ */
+GHash *BLI_ghash_new(GHashHashFP hashfp, GHashCmpFP cmpfp, const char *info)
+{
+ return BLI_ghash_new_ex(hashfp, cmpfp, info, 0);
+}
- if (keyfreefp) keyfreefp(e->key);
- BLI_mempool_free(gh->entrypool, e);
+/**
+ * \return size of the GHash.
+ */
+int BLI_ghash_size(GHash *gh)
+{
+ return (int)gh->nentries;
+}
- /* correct but 'e' isn't used before return */
- /* e = n; *//*UNUSED*/
- if (p) p->next = n;
- else gh->buckets[hash] = n;
+/**
+ * Insert a key/value pair into the \a gh.
+ *
+ * \note Duplicates are not checked,
+ * the caller is expected to ensure elements are unique unless
+ * GHASH_FLAG_ALLOW_DUPES flag is set.
+ */
+void BLI_ghash_insert(GHash *gh, void *key, void *val)
+{
+ ghash_insert(gh, key, val);
+}
- gh->nentries--;
- return value;
- }
- p = e;
+/**
+ * Inserts a new value to a key that may already be in ghash.
+ *
+ * Avoids #BLI_ghash_remove, #BLI_ghash_insert calls (double lookups)
+ *
+ * \returns true if a new key has been added.
+ */
+bool BLI_ghash_reinsert(GHash *gh, void *key, void *val, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
+{
+ const unsigned int hash = ghash_keyhash(gh, key);
+ Entry *e = ghash_lookup_entry_ex(gh, key, hash);
+ if (e) {
+ if (keyfreefp) keyfreefp(e->key);
+ if (valfreefp) valfreefp(e->val);
+ e->key = key;
+ e->val = val;
+ return false;
+ }
+ else {
+ ghash_insert_ex(gh, key, val, hash);
+ return true;
}
-
- return NULL;
}
-bool BLI_ghash_haskey(GHash *gh, const void *key)
+/**
+ * Lookup the value of \a key in \a gh.
+ *
+ * \param key The key to lookup.
+ * \returns the value for \a key or NULL.
+ *
+ * \note When NULL is a valid value, use #BLI_ghash_lookup_p to differentiate a missing key
+ * from a key with a NULL value. (Avoids calling #BLI_ghash_haskey before #BLI_ghash_lookup)
+ */
+void *BLI_ghash_lookup(GHash *gh, const void *key)
{
- unsigned int hash = gh->hashfp(key) % gh->nbuckets;
- Entry *e;
+ Entry *e = ghash_lookup_entry(gh, key);
+ IS_GHASH_ASSERT(gh);
+ return e ? e->val : NULL;
+}
- for (e = gh->buckets[hash]; e; e = e->next)
- if (gh->cmpfp(key, e->key) == 0)
- return true;
+/**
+ * Lookup a pointer to the value of \a key in \a gh.
+ *
+ * \param key The key to lookup.
+ * \returns the pointer to value for \a key or NULL.
+ *
+ * \note This has 2 main benifits over #BLI_ghash_lookup.
+ * - A NULL return always means that \a key isn't in \a gh.
+ * - The value can be modified in-place without further function calls (faster).
+ */
+void **BLI_ghash_lookup_p(GHash *gh, const void *key)
+{
+ Entry *e = ghash_lookup_entry(gh, key);
+ IS_GHASH_ASSERT(gh);
+ return e ? &e->val : NULL;
+}
- return false;
+/**
+ * Remove \a key from \a gh, or return false if the key wasn't found.
+ *
+ * \param key The key to remove.
+ * \param keyfreefp Optional callback to free the key.
+ * \param valfreefp Optional callback to free the value.
+ * \return true if \a key was removed from \a gh.
+ */
+bool BLI_ghash_remove(GHash *gh, void *key, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
+{
+ const unsigned int hash = ghash_keyhash(gh, key);
+ Entry *e = ghash_remove_ex(gh, key, keyfreefp, valfreefp, hash);
+ if (e) {
+ BLI_mempool_free(gh->entrypool, e);
+ return true;
+ }
+ else {
+ return false;
+ }
}
-void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
+/* same as above but return the value,
+ * no free value argument since it will be returned */
+/**
+ * Remove \a key from \a gh, returning the value or NULL if the key wasn't found.
+ *
+ * \param key The key to remove.
+ * \param keyfreefp Optional callback to free the key.
+ * \return the value of \a key int \a gh or NULL.
+ */
+void *BLI_ghash_popkey(GHash *gh, void *key, GHashKeyFreeFP keyfreefp)
{
- unsigned int i;
+ const unsigned int hash = ghash_keyhash(gh, key);
+ Entry *e = ghash_remove_ex(gh, key, keyfreefp, NULL, hash);
+ IS_GHASH_ASSERT(gh);
+ if (e) {
+ void *val = e->val;
+ BLI_mempool_free(gh->entrypool, e);
+ return val;
+ }
+ else {
+ return NULL;
+ }
+}
- if (keyfreefp || valfreefp) {
- for (i = 0; i < gh->nbuckets; i++) {
- Entry *e;
+/**
+ * \return true if the \a key is in \a gh.
+ */
+bool BLI_ghash_haskey(GHash *gh, const void *key)
+{
+ return (ghash_lookup_entry(gh, key) != NULL);
+}
- for (e = gh->buckets[i]; e; ) {
- Entry *n = e->next;
+/**
+ * Reset \a gh clearing all entries.
+ *
+ * \param keyfreefp Optional callback to free the key.
+ * \param valfreefp Optional callback to free the value.
+ * \param nentries_reserve Optionally reserve the number of members that the hash will hold.
+ */
+void BLI_ghash_clear_ex(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp,
+ const unsigned int nentries_reserve)
+{
+ if (keyfreefp || valfreefp)
+ ghash_free_cb(gh, keyfreefp, valfreefp);
- if (keyfreefp) keyfreefp(e->key);
- if (valfreefp) valfreefp(e->val);
+ gh->nbuckets = hashsizes[0]; /* gh->cursize */
+ gh->nentries = 0;
+ gh->cursize = 0;
- e = n;
- }
- }
+ if (nentries_reserve) {
+ ghash_buckets_reserve(gh, nentries_reserve);
}
MEM_freeN(gh->buckets);
+ gh->buckets = MEM_callocN(gh->nbuckets * sizeof(*gh->buckets), "buckets");
+
+ BLI_mempool_clear_ex(gh->entrypool, nentries_reserve ? (int)nentries_reserve : -1);
+}
+
+/**
+ * Wraps #BLI_ghash_clear_ex with zero entries reserved.
+ */
+void BLI_ghash_clear(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
+{
+ BLI_ghash_clear_ex(gh, keyfreefp, valfreefp, 0);
+}
+
+/**
+ * Frees the GHash and its members.
+ *
+ * \param gh The GHash to free.
+ * \param keyfreefp Optional callback to free the key.
+ * \param valfreefp Optional callback to free the value.
+ */
+void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
+{
+ BLI_assert((int)gh->nentries == BLI_mempool_count(gh->entrypool));
+ if (keyfreefp || valfreefp)
+ ghash_free_cb(gh, keyfreefp, valfreefp);
+
+ MEM_freeN(gh->buckets);
BLI_mempool_destroy(gh->entrypool);
- gh->buckets = NULL;
- gh->nentries = 0;
- gh->nbuckets = 0;
MEM_freeN(gh);
}
-/***/
+/**
+ * Sets a GHash flag.
+ */
+void BLI_ghash_flag_set(GHash *gh, unsigned int flag)
+{
+ gh->flag |= flag;
+}
+/**
+ * Clear a GHash flag.
+ */
+void BLI_ghash_flag_clear(GHash *gh, unsigned int flag)
+{
+ gh->flag &= ~flag;
+}
+
+/** \} */
+
+
+/* -------------------------------------------------------------------- */
+/* GHash Iterator API */
+
+/** \name Iterator API
+ * \{ */
+
+/**
+ * Create a new GHashIterator. The hash table must not be mutated
+ * while the iterator is in use, and the iterator will step exactly
+ * BLI_ghash_size(gh) times before becoming done.
+ *
+ * \param gh The GHash to iterate over.
+ * \return Pointer to a new DynStr.
+ */
GHashIterator *BLI_ghashIterator_new(GHash *gh)
{
GHashIterator *ghi = MEM_mallocN(sizeof(*ghi), "ghash iterator");
BLI_ghashIterator_init(ghi, gh);
return ghi;
}
+
+/**
+ * Init an already allocated GHashIterator. The hash table must not
+ * be mutated while the iterator is in use, and the iterator will
+ * step exactly BLI_ghash_size(gh) times before becoming done.
+ *
+ * \param ghi The GHashIterator to initialize.
+ * \param gh The GHash to iterate over.
+ */
void BLI_ghashIterator_init(GHashIterator *ghi, GHash *gh)
{
ghi->gh = gh;
@@ -272,20 +566,58 @@ void BLI_ghashIterator_init(GHashIterator *ghi, GHash *gh)
ghi->curEntry = ghi->gh->buckets[ghi->curBucket];
}
}
+
+/**
+ * Free a GHashIterator.
+ *
+ * \param ghi The iterator to free.
+ */
void BLI_ghashIterator_free(GHashIterator *ghi)
{
MEM_freeN(ghi);
}
+/**
+ * Retrieve the key from an iterator.
+ *
+ * \param ghi The iterator.
+ * \return The key at the current index, or NULL if the
+ * iterator is done.
+ */
void *BLI_ghashIterator_getKey(GHashIterator *ghi)
{
return ghi->curEntry ? ghi->curEntry->key : NULL;
}
+
+/**
+ * Retrieve the value from an iterator.
+ *
+ * \param ghi The iterator.
+ * \return The value at the current index, or NULL if the
+ * iterator is done.
+ */
void *BLI_ghashIterator_getValue(GHashIterator *ghi)
{
return ghi->curEntry ? ghi->curEntry->val : NULL;
}
+/**
+ * Retrieve the value from an iterator.
+ *
+ * \param ghi The iterator.
+ * \return The value at the current index, or NULL if the
+ * iterator is done.
+ */
+void **BLI_ghashIterator_getValue_p(GHashIterator *ghi)
+{
+ return ghi->curEntry ? &ghi->curEntry->val : NULL;
+}
+
+/**
+ * Steps the iterator to the next index.
+ *
+ * \param ghi The iterator.
+ */
void BLI_ghashIterator_step(GHashIterator *ghi)
{
if (ghi->curEntry) {
@@ -298,17 +630,44 @@ void BLI_ghashIterator_step(GHashIterator *ghi)
}
}
}
+
+/**
+ * Determine if an iterator is done (has reached the end of
+ * the hash table).
+ *
+ * \param ghi The iterator.
+ * \return True if done, False otherwise.
+ */
bool BLI_ghashIterator_done(GHashIterator *ghi)
{
return ghi->curEntry == NULL;
}
+/** \} */
+
+
+/** \name Generic Key Hash & Comparison Functions
+ * \{ */
+
/***/
+#if 0
+/* works but slower */
unsigned int BLI_ghashutil_ptrhash(const void *key)
{
return (unsigned int)(intptr_t)key;
}
+#else
+/* based python3.3's pointer hashing function */
+unsigned int BLI_ghashutil_ptrhash(const void *key)
+{
+ size_t y = (size_t)key;
+ /* bottom 3 or 4 bits are likely to be 0; rotate y by 4 to avoid
+ * excessive hash collisions for dicts and sets */
+ y = (y >> 4) | (y << (8 * sizeof(void *) - 4));
+ return (unsigned int)y;
+}
+#endif
int BLI_ghashutil_ptrcmp(const void *a, const void *b)
{
if (a == b)
@@ -364,23 +723,6 @@ int BLI_ghashutil_strcmp(const void *a, const void *b)
return strcmp(a, b);
}
-GHash *BLI_ghash_ptr_new(const char *info)
-{
- return BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, info);
-}
-GHash *BLI_ghash_str_new(const char *info)
-{
- return BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, info);
-}
-GHash *BLI_ghash_int_new(const char *info)
-{
- return BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp, info);
-}
-GHash *BLI_ghash_pair_new(const char *info)
-{
- return BLI_ghash_new(BLI_ghashutil_pairhash, BLI_ghashutil_paircmp, info);
-}
-
GHashPair *BLI_ghashutil_pairalloc(const void *first, const void *second)
{
GHashPair *pair = MEM_mallocN(sizeof(GHashPair), "GHashPair");
@@ -411,3 +753,176 @@ void BLI_ghashutil_pairfree(void *ptr)
{
MEM_freeN(ptr);
}
+
+/** \} */
+
+
+/** \name Convenience GHash Creation Functions
+ * \{ */
+
+GHash *BLI_ghash_ptr_new_ex(const char *info,
+ const unsigned int nentries_reserve)
+{
+ return BLI_ghash_new_ex(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, info,
+ nentries_reserve);
+}
+GHash *BLI_ghash_ptr_new(const char *info)
+{
+ return BLI_ghash_ptr_new_ex(info, 0);
+}
+
+GHash *BLI_ghash_str_new_ex(const char *info,
+ const unsigned int nentries_reserve)
+{
+ return BLI_ghash_new_ex(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, info,
+ nentries_reserve);
+}
+GHash *BLI_ghash_str_new(const char *info)
+{
+ return BLI_ghash_str_new_ex(info, 0);
+}
+
+GHash *BLI_ghash_int_new_ex(const char *info,
+ const unsigned int nentries_reserve)
+{
+ return BLI_ghash_new_ex(BLI_ghashutil_inthash, BLI_ghashutil_intcmp, info,
+ nentries_reserve);
+}
+GHash *BLI_ghash_int_new(const char *info)
+{
+ return BLI_ghash_int_new_ex(info, 0);
+}
+
+GHash *BLI_ghash_pair_new_ex(const char *info,
+ const unsigned int nentries_reserve)
+{
+ return BLI_ghash_new_ex(BLI_ghashutil_pairhash, BLI_ghashutil_paircmp, info,
+ nentries_reserve);
+}
+GHash *BLI_ghash_pair_new(const char *info)
+{
+ return BLI_ghash_pair_new_ex(info, 0);
+}
+
+/** \} */
+
+
+/* -------------------------------------------------------------------- */
+/* GSet API */
+
+/* Use ghash API to give 'set' functionality */
+
+/* TODO: typical set functions
+ * isdisjoint/issubset/issuperset/union/intersection/difference etc */
+
+/** \name GSet Functions
+ * \{ */
+GSet *BLI_gset_new_ex(GSetHashFP hashfp, GSetCmpFP cmpfp, const char *info,
+ const unsigned int nentries_reserve)
+{
+ GSet *gs = (GSet *)ghash_new(hashfp, cmpfp, info,
+ nentries_reserve,
+ sizeof(Entry) - sizeof(void *));
+#ifndef NDEBUG
+ ((GHash *)gs)->flag |= GHASH_FLAG_IS_SET;
+#endif
+ return gs;
+}
+
+GSet *BLI_gset_new(GSetHashFP hashfp, GSetCmpFP cmpfp, const char *info)
+{
+ return BLI_gset_new_ex(hashfp, cmpfp, info, 0);
+}
+
+int BLI_gset_size(GSet *gs)
+{
+ return (int)((GHash *)gs)->nentries;
+}
+
+/**
+ * Adds the key to the set (no checks for unique keys!).
+ * Matching #BLI_ghash_insert
+ */
+void BLI_gset_insert(GSet *gs, void *key)
+{
+ const unsigned int hash = ghash_keyhash((GHash *)gs, key);
+ ghash_insert_ex_keyonly((GHash *)gs, key, hash);
+}
+
+/**
+ * Adds the key to the set (duplicates are managed).
+ * Matching #BLI_ghash_reinsert
+ *
+ * \returns true if a new key has been added.
+ */
+bool BLI_gset_reinsert(GSet *gs, void *key, GSetKeyFreeFP keyfreefp)
+{
+ const unsigned int hash = ghash_keyhash((GHash *)gs, key);
+ Entry *e = ghash_lookup_entry_ex((GHash *)gs, key, hash);
+ if (e) {
+ if (keyfreefp) keyfreefp(e->key);
+ e->key = key;
+ return false;
+ }
+ else {
+ ghash_insert_ex_keyonly((GHash *)gs, key, hash);
+ return true;
+ }
+}
+
+bool BLI_gset_remove(GSet *gs, void *key, GSetKeyFreeFP keyfreefp)
+{
+ return BLI_ghash_remove((GHash *)gs, key, keyfreefp, NULL);
+}
+
+
+bool BLI_gset_haskey(GSet *gs, const void *key)
+{
+ return (ghash_lookup_entry((GHash *)gs, key) != NULL);
+}
+
+void BLI_gset_clear_ex(GSet *gs, GSetKeyFreeFP keyfreefp,
+ const unsigned int nentries_reserve)
+{
+ BLI_ghash_clear_ex((GHash *)gs, keyfreefp, NULL,
+ nentries_reserve);
+}
+
+void BLI_gset_clear(GSet *gs, GSetKeyFreeFP keyfreefp)
+{
+ BLI_ghash_clear((GHash *)gs, keyfreefp, NULL);
+}
+
+void BLI_gset_free(GSet *gs, GSetKeyFreeFP keyfreefp)
+{
+ BLI_ghash_free((GHash *)gs, keyfreefp, NULL);
+}
+/** \} */
+
+
+/** \name Convenience GSet Creation Functions
+ * \{ */
+
+GSet *BLI_gset_ptr_new_ex(const char *info,
+ const unsigned int nentries_reserve)
+{
+ return BLI_gset_new_ex(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, info,
+ nentries_reserve);
+}
+GSet *BLI_gset_ptr_new(const char *info)
+{
+ return BLI_gset_ptr_new_ex(info, 0);
+}
+
+GSet *BLI_gset_pair_new_ex(const char *info,
+ const unsigned int nentries_reserve)
+{
+ return BLI_gset_new_ex(BLI_ghashutil_pairhash, BLI_ghashutil_paircmp, info,
+ nentries_reserve);
+}
+GSet *BLI_gset_pair_new(const char *info)
+{
+ return BLI_gset_pair_new_ex(info, 0);
+}
+
+/** \} */
diff --git a/source/blender/blenlib/intern/BLI_heap.c b/source/blender/blenlib/intern/BLI_heap.c
index 0aaa3e13b3f..206a8041c4a 100644
--- a/source/blender/blenlib/intern/BLI_heap.c
+++ b/source/blender/blenlib/intern/BLI_heap.c
@@ -34,14 +34,7 @@
#include "BLI_utildefines.h"
#include "BLI_memarena.h"
#include "BLI_heap.h"
-
-#ifdef __GNUC__
-# pragma GCC diagnostic error "-Wsign-conversion"
-# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 /* gcc4.6+ only */
-# pragma GCC diagnostic error "-Wsign-compare"
-# pragma GCC diagnostic error "-Wconversion"
-# endif
-#endif
+#include "BLI_strict_flags.h"
/***/
@@ -134,7 +127,7 @@ Heap *BLI_heap_new_ex(unsigned int tot_reserve)
/* ensure we have at least one so we can keep doubling it */
heap->bufsize = MAX2(1, tot_reserve);
heap->tree = (HeapNode **)MEM_mallocN(heap->bufsize * sizeof(HeapNode *), "BLIHeapTree");
- heap->arena = BLI_memarena_new(1 << 16, "heap arena");
+ heap->arena = BLI_memarena_new(MEM_SIZE_OPTIMAL(1 << 16), "heap arena");
return heap;
}
diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c
index a4c72aa26b0..7c1cdd593c3 100644
--- a/source/blender/blenlib/intern/BLI_kdopbvh.c
+++ b/source/blender/blenlib/intern/BLI_kdopbvh.c
@@ -36,6 +36,7 @@
#include "BLI_utildefines.h"
#include "BLI_kdopbvh.h"
#include "BLI_math.h"
+#include "BLI_strict_flags.h"
#ifdef _OPENMP
#include <omp.h>
@@ -65,8 +66,8 @@ struct BVHTree {
int totleaf; /* leafs */
int totbranch;
axis_t start_axis, stop_axis; /* KDOP_AXES array indices according to axis */
- axis_t axis; /* kdop type (6 => OBB, 7 => AABB, ...) */
- char tree_type; /* type of tree (4 => quadtree) */
+ axis_t axis; /* kdop type (6 => OBB, 7 => AABB, ...) */
+ char tree_type; /* type of tree (4 => quadtree) */
};
/* optimization, ensure we stay small */
@@ -77,7 +78,8 @@ BLI_STATIC_ASSERT((sizeof(void *) == 8 && sizeof(BVHTree) <= 48) ||
typedef struct BVHOverlapData {
BVHTree *tree1, *tree2;
BVHTreeOverlap *overlap;
- int i, max_overlap; /* i is number of overlaps */
+ unsigned int i;
+ unsigned int max_overlap; /* i is number of overlaps */
axis_t start_axis, stop_axis;
} BVHOverlapData;
@@ -115,7 +117,7 @@ typedef struct BVHRayCastData {
* Notes: You can choose the tree type --> binary, quad, octree, choose below
*/
-static float KDOP_AXES[13][3] = {
+static const float KDOP_AXES[13][3] = {
{1.0, 0, 0}, {0, 1.0, 0}, {0, 0, 1.0}, {1.0, 1.0, 1.0}, {1.0, -1.0, 1.0}, {1.0, 1.0, -1.0},
{1.0, -1.0, -1.0}, {1.0, 1.0, 0}, {1.0, 0, 1.0}, {0, 1.0, 1.0}, {1.0, -1.0, 0}, {1.0, 0, -1.0},
{0, 1.0, -1.0}
@@ -437,7 +439,7 @@ static void refit_kdop_hull(BVHTree *tree, BVHNode *node, int start, int end)
/* only supports x,y,z axis in the moment
* but we should use a plain and simple function here for speed sake */
-static char get_largest_axis(float *bv)
+static char get_largest_axis(const float *bv)
{
float middle_point[3];
@@ -497,9 +499,13 @@ static void bvhtree_print_tree(BVHTree *tree, BVHNode *node, int depth)
axis_t axis_iter;
for (i = 0; i < depth; i++) printf(" ");
- printf(" - %d (%ld): ", node->index, node - tree->nodearray);
- for (axis_iter = 2 * tree->start_axis; axis_iter < 2 * tree->stop_axis; axis_iter++)
+ printf(" - %d (%ld): ", node->index, (long int)(node - tree->nodearray));
+ for (axis_iter = (axis_t)(2 * tree->start_axis);
+ axis_iter < (axis_t)(2 * tree->stop_axis);
+ axis_iter++)
+ {
printf("%.3f ", node->bv[axis_iter]);
+ }
printf("\n");
for (i = 0; i < tree->tree_type; i++)
@@ -513,7 +519,7 @@ static void bvhtree_info(BVHTree *tree)
printf("tree_type = %d, axis = %d, epsilon = %f\n", tree->tree_type, tree->axis, tree->epsilon);
printf("nodes = %d, branches = %d, leafs = %d\n", tree->totbranch + tree->totleaf, tree->totbranch, tree->totleaf);
printf("Memory per node = %ldbytes\n", sizeof(BVHNode) + sizeof(BVHNode *) * tree->tree_type + sizeof(float) * tree->axis);
- printf("BV memory = %dbytes\n", MEM_allocN_len(tree->nodebv));
+ printf("BV memory = %dbytes\n", (int)MEM_allocN_len(tree->nodebv));
printf("Total memory = %ldbytes\n", sizeof(BVHTree) +
MEM_allocN_len(tree->nodes) +
@@ -792,7 +798,7 @@ static void non_recursive_bvh_div_nodes(BVHTree *tree, BVHNode *branches_array,
break;
}
- parent->totnode = k + 1;
+ parent->totnode = (char)(k + 1);
}
}
}
@@ -811,10 +817,9 @@ BVHTree *BLI_bvhtree_new(int maxsize, float epsilon, char tree_type, char axis)
if (tree_type < 2)
return NULL;
- if (tree_type > MAX_TREETYPE)
- return NULL;
+ BLI_assert(tree_type <= MAX_TREETYPE);
- tree = (BVHTree *)MEM_callocN(sizeof(BVHTree), "BVHTree");
+ tree = MEM_callocN(sizeof(BVHTree), "BVHTree");
/* tree epsilon must be >= FLT_EPSILON
* so that tangent rays can still hit a bounding volume..
@@ -855,27 +860,27 @@ BVHTree *BLI_bvhtree_new(int maxsize, float epsilon, char tree_type, char axis)
/* Allocate arrays */
numnodes = maxsize + implicit_needed_branches(tree_type, maxsize) + tree_type;
- tree->nodes = (BVHNode **)MEM_callocN(sizeof(BVHNode *) * numnodes, "BVHNodes");
+ tree->nodes = MEM_callocN(sizeof(BVHNode *) * (size_t)numnodes, "BVHNodes");
if (!tree->nodes) {
MEM_freeN(tree);
return NULL;
}
-
- tree->nodebv = (float *)MEM_callocN(sizeof(float) * axis * numnodes, "BVHNodeBV");
+
+ tree->nodebv = MEM_callocN(sizeof(float) * (size_t)(axis * numnodes), "BVHNodeBV");
if (!tree->nodebv) {
MEM_freeN(tree->nodes);
MEM_freeN(tree);
}
- tree->nodechild = (BVHNode **)MEM_callocN(sizeof(BVHNode *) * tree_type * numnodes, "BVHNodeBV");
+ tree->nodechild = MEM_callocN(sizeof(BVHNode *) * (size_t)(tree_type * numnodes), "BVHNodeBV");
if (!tree->nodechild) {
MEM_freeN(tree->nodebv);
MEM_freeN(tree->nodes);
MEM_freeN(tree);
}
- tree->nodearray = (BVHNode *)MEM_callocN(sizeof(BVHNode) * numnodes, "BVHNodeArray");
+ tree->nodearray = MEM_callocN(sizeof(BVHNode) * (size_t)numnodes, "BVHNodeArray");
if (!tree->nodearray) {
MEM_freeN(tree->nodechild);
@@ -915,7 +920,7 @@ void BLI_bvhtree_balance(BVHTree *tree)
BVHNode **leafs_array = tree->nodes;
/* This function should only be called once (some big bug goes here if its being called more than once per tree) */
- assert(tree->totbranch == 0);
+ BLI_assert(tree->totbranch == 0);
/* Build the implicit tree */
non_recursive_bvh_div_nodes(tree, branches_array, leafs_array, tree->totleaf);
@@ -930,19 +935,14 @@ void BLI_bvhtree_balance(BVHTree *tree)
/* bvhtree_info(tree); */
}
-int BLI_bvhtree_insert(BVHTree *tree, int index, const float co[3], int numpoints)
+void BLI_bvhtree_insert(BVHTree *tree, int index, const float co[3], int numpoints)
{
axis_t axis_iter;
BVHNode *node = NULL;
/* insert should only possible as long as tree->totbranch is 0 */
- if (tree->totbranch > 0)
- return 0;
-
- if (tree->totleaf + 1 >= MEM_allocN_len(tree->nodes) / sizeof(*(tree->nodes)))
- return 0;
-
- /* TODO check if have enough nodes in array */
+ BLI_assert(tree->totbranch <= 0);
+ BLI_assert((size_t)tree->totleaf < MEM_allocN_len(tree->nodes) / sizeof(*(tree->nodes)));
node = tree->nodes[tree->totleaf] = &(tree->nodearray[tree->totleaf]);
tree->totleaf++;
@@ -955,8 +955,6 @@ int BLI_bvhtree_insert(BVHTree *tree, int index, const float co[3], int numpoint
node->bv[(2 * axis_iter)] -= tree->epsilon; /* minimum */
node->bv[(2 * axis_iter) + 1] += tree->epsilon; /* maximum */
}
-
- return 1;
}
@@ -1012,10 +1010,10 @@ float BLI_bvhtree_getepsilon(const BVHTree *tree)
* overlap - is it possible for 2 bv's to collide ? */
static int tree_overlap(BVHNode *node1, BVHNode *node2, axis_t start_axis, axis_t stop_axis)
{
- float *bv1 = node1->bv;
- float *bv2 = node2->bv;
+ const float *bv1 = node1->bv;
+ const float *bv2 = node2->bv;
- float *bv1_end = bv1 + (stop_axis << 1);
+ const float *bv1_end = bv1 + (stop_axis << 1);
bv1 += start_axis << 1;
bv2 += start_axis << 1;
@@ -1045,7 +1043,7 @@ static void traverse(BVHOverlapData *data, BVHNode *node1, BVHNode *node2)
if (data->i >= data->max_overlap) {
/* try to make alloc'ed memory bigger */
- data->overlap = realloc(data->overlap, sizeof(BVHTreeOverlap) * data->max_overlap * 2);
+ data->overlap = realloc(data->overlap, sizeof(BVHTreeOverlap) * (size_t)data->max_overlap * 2);
if (!data->overlap) {
printf("Out of Memory in traverse\n");
@@ -1099,13 +1097,13 @@ BVHTreeOverlap *BLI_bvhtree_overlap(BVHTree *tree1, BVHTree *tree2, unsigned int
data = MEM_callocN(sizeof(BVHOverlapData *) * tree1->tree_type, "BVHOverlapData_star");
for (j = 0; j < tree1->tree_type; j++) {
- data[j] = (BVHOverlapData *)MEM_callocN(sizeof(BVHOverlapData), "BVHOverlapData");
+ data[j] = MEM_callocN(sizeof(BVHOverlapData), "BVHOverlapData");
/* init BVHOverlapData */
- data[j]->overlap = (BVHTreeOverlap *)malloc(sizeof(BVHTreeOverlap) * max_ii(tree1->totleaf, tree2->totleaf));
+ data[j]->overlap = malloc(sizeof(BVHTreeOverlap) * (size_t)max_ii(tree1->totleaf, tree2->totleaf));
data[j]->tree1 = tree1;
data[j]->tree2 = tree2;
- data[j]->max_overlap = max_ii(tree1->totleaf, tree2->totleaf);
+ data[j]->max_overlap = (unsigned int)max_ii(tree1->totleaf, tree2->totleaf);
data[j]->i = 0;
data[j]->start_axis = min_axis(tree1->start_axis, tree2->start_axis);
data[j]->stop_axis = min_axis(tree1->stop_axis, tree2->stop_axis);
@@ -1119,7 +1117,7 @@ BVHTreeOverlap *BLI_bvhtree_overlap(BVHTree *tree1, BVHTree *tree2, unsigned int
for (j = 0; j < tree1->tree_type; j++)
total += data[j]->i;
- to = overlap = (BVHTreeOverlap *)MEM_callocN(sizeof(BVHTreeOverlap) * total, "BVHTreeOverlap");
+ to = overlap = MEM_callocN(sizeof(BVHTreeOverlap) * total, "BVHTreeOverlap");
for (j = 0; j < tree1->tree_type; j++) {
memcpy(to, data[j]->overlap, data[j]->i * sizeof(BVHTreeOverlap));
diff --git a/source/blender/blenlib/intern/BLI_kdtree.c b/source/blender/blenlib/intern/BLI_kdtree.c
index dd54fe681b0..57227dc5d5f 100644
--- a/source/blender/blenlib/intern/BLI_kdtree.c
+++ b/source/blender/blenlib/intern/BLI_kdtree.c
@@ -30,28 +30,37 @@
#include "BLI_math.h"
#include "BLI_kdtree.h"
#include "BLI_utildefines.h"
+#include "BLI_strict_flags.h"
typedef struct KDTreeNode {
struct KDTreeNode *left, *right;
float co[3], nor[3];
int index;
- short d;
+ unsigned int d; /* range is only (0-2) */
} KDTreeNode;
struct KDTree {
KDTreeNode *nodes;
- int totnode;
+ unsigned int totnode;
KDTreeNode *root;
};
-KDTree *BLI_kdtree_new(int maxsize)
+#define KD_STACK_INIT 100 /* initial size for array (on the stack) */
+#define KD_NEAR_ALLOC_INC 100 /* alloc increment for collecting nearest */
+#define KD_FOUND_ALLOC_INC 50 /* alloc increment for collecting nearest */
+
+/**
+ * Creates or free a kdtree
+ */
+KDTree *BLI_kdtree_new(unsigned int maxsize)
{
KDTree *tree;
- tree = MEM_callocN(sizeof(KDTree), "KDTree");
- tree->nodes = MEM_callocN(sizeof(KDTreeNode) * maxsize, "KDTreeNode");
+ tree = MEM_mallocN(sizeof(KDTree), "KDTree");
+ tree->nodes = MEM_mallocN(sizeof(KDTreeNode) * maxsize, "KDTreeNode");
tree->totnode = 0;
+ tree->root = NULL;
return tree;
}
@@ -64,20 +73,32 @@ void BLI_kdtree_free(KDTree *tree)
}
}
+/**
+ * Construction: first insert points, then call balance. Normal is optional.
+ */
void BLI_kdtree_insert(KDTree *tree, int index, const float co[3], const float nor[3])
{
KDTreeNode *node = &tree->nodes[tree->totnode++];
- node->index = index;
+ /* note, array isn't calloc'd,
+ * need to initialize all struct members */
+
+ node->left = node->right = NULL;
copy_v3_v3(node->co, co);
- if (nor) copy_v3_v3(node->nor, nor);
+ if (nor)
+ copy_v3_v3(node->nor, nor);
+ else
+ zero_v3(node->nor);
+
+ node->index = index;
+ node->d = 0;
}
-static KDTreeNode *kdtree_balance(KDTreeNode *nodes, int totnode, int axis)
+static KDTreeNode *kdtree_balance(KDTreeNode *nodes, unsigned int totnode, unsigned int axis)
{
KDTreeNode *node;
float co;
- int left, right, median, i, j;
+ unsigned int left, right, median, i, j;
if (totnode <= 0)
return NULL;
@@ -98,7 +119,9 @@ static KDTreeNode *kdtree_balance(KDTreeNode *nodes, int totnode, int axis)
while (nodes[++i].co[axis] < co) ;
while (nodes[--j].co[axis] > co && j > left) ;
- if (i >= j) break;
+ if (i >= j)
+ break;
+
SWAP(KDTreeNode, nodes[i], nodes[j]);
}
@@ -143,18 +166,33 @@ static float squared_distance(const float v2[3], const float v1[3], const float
return dist;
}
-int BLI_kdtree_find_nearest(KDTree *tree, const float co[3], const float nor[3], KDTreeNearest *nearest)
+static KDTreeNode **realloc_nodes(KDTreeNode **stack, unsigned int *totstack, const bool is_alloc)
+{
+ KDTreeNode **stack_new = MEM_mallocN((*totstack + KD_NEAR_ALLOC_INC) * sizeof(KDTreeNode *), "KDTree.treestack");
+ memcpy(stack_new, stack, *totstack * sizeof(KDTreeNode *));
+ // memset(stack_new + *totstack, 0, sizeof(KDTreeNode *) * KD_NEAR_ALLOC_INC);
+ if (is_alloc)
+ MEM_freeN(stack);
+ *totstack += KD_NEAR_ALLOC_INC;
+ return stack_new;
+}
+
+/**
+ * Find nearest returns index, and -1 if no node is found.
+ */
+int BLI_kdtree_find_nearest(KDTree *tree, const float co[3], const float nor[3],
+ KDTreeNearest *r_nearest)
{
KDTreeNode *root, *node, *min_node;
- KDTreeNode **stack, *defaultstack[100];
+ KDTreeNode **stack, *defaultstack[KD_STACK_INIT];
float min_dist, cur_dist;
- int totstack, cur = 0;
+ unsigned int totstack, cur = 0;
if (!tree->root)
return -1;
stack = defaultstack;
- totstack = 100;
+ totstack = KD_STACK_INIT;
root = tree->root;
min_node = root;
@@ -208,20 +246,15 @@ int BLI_kdtree_find_nearest(KDTree *tree, const float co[3], const float nor[3],
if (node->left)
stack[cur++] = node->left;
}
- if (cur + 3 > totstack) {
- KDTreeNode **temp = MEM_callocN((totstack + 100) * sizeof(KDTreeNode *), "psys_treestack");
- memcpy(temp, stack, totstack * sizeof(KDTreeNode *));
- if (stack != defaultstack)
- MEM_freeN(stack);
- stack = temp;
- totstack += 100;
+ if (UNLIKELY(cur + 3 > totstack)) {
+ stack = realloc_nodes(stack, &totstack, defaultstack != stack);
}
}
- if (nearest) {
- nearest->index = min_node->index;
- nearest->dist = sqrt(min_dist);
- copy_v3_v3(nearest->co, min_node->co);
+ if (r_nearest) {
+ r_nearest->index = min_node->index;
+ r_nearest->dist = sqrtf(min_dist);
+ copy_v3_v3(r_nearest->co, min_node->co);
}
if (stack != defaultstack)
@@ -230,9 +263,10 @@ int BLI_kdtree_find_nearest(KDTree *tree, const float co[3], const float nor[3],
return min_node->index;
}
-static void add_nearest(KDTreeNearest *ptn, int *found, int n, int index, float dist, float *co)
+static void add_nearest(KDTreeNearest *ptn, unsigned int *found, unsigned int n, int index,
+ float dist, const float *co)
{
- int i;
+ unsigned int i;
if (*found < n) (*found)++;
@@ -248,24 +282,32 @@ static void add_nearest(KDTreeNearest *ptn, int *found, int n, int index, float
copy_v3_v3(ptn[i].co, co);
}
-/* finds the nearest n entries in tree to specified coordinates */
-int BLI_kdtree_find_n_nearest(KDTree *tree, int n, const float co[3], const float nor[3], KDTreeNearest *nearest)
+/**
+ * Find n nearest returns number of points found, with results in nearest.
+ * Normal is optional, but if given will limit results to points in normal direction from co.
+ *
+ * \param r_nearest An array of nearest, sized at least \a n.
+ */
+int BLI_kdtree_find_nearest_n(KDTree *tree, const float co[3], const float nor[3],
+ KDTreeNearest r_nearest[],
+ unsigned int n)
{
KDTreeNode *root, *node = NULL;
- KDTreeNode **stack, *defaultstack[100];
+ KDTreeNode **stack, *defaultstack[KD_STACK_INIT];
float cur_dist;
- int i, totstack, cur = 0, found = 0;
+ unsigned int totstack, cur = 0;
+ unsigned int i, found = 0;
- if (!tree->root)
+ if (!tree->root || n == 0)
return 0;
stack = defaultstack;
- totstack = 100;
+ totstack = KD_STACK_INIT;
root = tree->root;
cur_dist = squared_distance(root->co, co, root->nor, nor);
- add_nearest(nearest, &found, n, root->index, cur_dist, root->co);
+ add_nearest(r_nearest, &found, n, root->index, cur_dist, root->co);
if (co[root->d] < root->co[root->d]) {
if (root->right)
@@ -288,11 +330,11 @@ int BLI_kdtree_find_n_nearest(KDTree *tree, int n, const float co[3], const floa
if (cur_dist < 0.0f) {
cur_dist = -cur_dist * cur_dist;
- if (found < n || -cur_dist < nearest[found - 1].dist) {
+ if (found < n || -cur_dist < r_nearest[found - 1].dist) {
cur_dist = squared_distance(node->co, co, node->nor, nor);
- if (found < n || cur_dist < nearest[found - 1].dist)
- add_nearest(nearest, &found, n, node->index, cur_dist, node->co);
+ if (found < n || cur_dist < r_nearest[found - 1].dist)
+ add_nearest(r_nearest, &found, n, node->index, cur_dist, node->co);
if (node->left)
stack[cur++] = node->left;
@@ -303,10 +345,10 @@ int BLI_kdtree_find_n_nearest(KDTree *tree, int n, const float co[3], const floa
else {
cur_dist = cur_dist * cur_dist;
- if (found < n || cur_dist < nearest[found - 1].dist) {
+ if (found < n || cur_dist < r_nearest[found - 1].dist) {
cur_dist = squared_distance(node->co, co, node->nor, nor);
- if (found < n || cur_dist < nearest[found - 1].dist)
- add_nearest(nearest, &found, n, node->index, cur_dist, node->co);
+ if (found < n || cur_dist < r_nearest[found - 1].dist)
+ add_nearest(r_nearest, &found, n, node->index, cur_dist, node->co);
if (node->right)
stack[cur++] = node->right;
@@ -314,23 +356,18 @@ int BLI_kdtree_find_n_nearest(KDTree *tree, int n, const float co[3], const floa
if (node->left)
stack[cur++] = node->left;
}
- if (cur + 3 > totstack) {
- KDTreeNode **temp = MEM_callocN((totstack + 100) * sizeof(KDTreeNode *), "psys_treestack");
- memcpy(temp, stack, totstack * sizeof(KDTreeNode *));
- if (stack != defaultstack)
- MEM_freeN(stack);
- stack = temp;
- totstack += 100;
+ if (UNLIKELY(cur + 3 > totstack)) {
+ stack = realloc_nodes(stack, &totstack, defaultstack != stack);
}
}
for (i = 0; i < found; i++)
- nearest[i].dist = sqrt(nearest[i].dist);
+ r_nearest[i].dist = sqrtf(r_nearest[i].dist);
if (stack != defaultstack)
MEM_freeN(stack);
- return found;
+ return (int)found;
}
static int range_compare(const void *a, const void *b)
@@ -345,38 +382,45 @@ static int range_compare(const void *a, const void *b)
else
return 0;
}
-static void add_in_range(KDTreeNearest **ptn, int found, int *totfoundstack, int index, float dist, float *co)
+static void add_in_range(KDTreeNearest **ptn, unsigned int found, unsigned int *totfoundstack, int index, float dist, float *co)
{
KDTreeNearest *to;
if (found >= *totfoundstack) {
- KDTreeNearest *temp = MEM_callocN((*totfoundstack + 50) * sizeof(KDTreeNode), "psys_treefoundstack");
+ KDTreeNearest *temp = MEM_mallocN((*totfoundstack + KD_FOUND_ALLOC_INC) * sizeof(KDTreeNode), "KDTree.treefoundstack");
memcpy(temp, *ptn, *totfoundstack * sizeof(KDTreeNearest));
if (*ptn)
MEM_freeN(*ptn);
*ptn = temp;
- *totfoundstack += 50;
+ *totfoundstack += KD_FOUND_ALLOC_INC;
}
to = (*ptn) + found;
to->index = index;
- to->dist = sqrt(dist);
+ to->dist = sqrtf(dist);
copy_v3_v3(to->co, co);
}
-int BLI_kdtree_range_search(KDTree *tree, float range, const float co[3], const float nor[3], KDTreeNearest **nearest)
+
+/**
+ * Range search returns number of points found, with results in nearest
+ * Normal is optional, but if given will limit results to points in normal direction from co.
+ * Remember to free nearest after use!
+ */
+int BLI_kdtree_range_search(KDTree *tree, const float co[3], const float nor[3],
+ KDTreeNearest **r_nearest, float range)
{
KDTreeNode *root, *node = NULL;
- KDTreeNode **stack, *defaultstack[100];
+ KDTreeNode **stack, *defaultstack[KD_STACK_INIT];
KDTreeNearest *foundstack = NULL;
float range2 = range * range, dist2;
- int totstack, cur = 0, found = 0, totfoundstack = 0;
+ unsigned int totstack, cur = 0, found = 0, totfoundstack = 0;
if (!tree || !tree->root)
return 0;
stack = defaultstack;
- totstack = 100;
+ totstack = KD_STACK_INIT;
root = tree->root;
@@ -421,13 +465,8 @@ int BLI_kdtree_range_search(KDTree *tree, float range, const float co[3], const
stack[cur++] = node->right;
}
- if (cur + 3 > totstack) {
- KDTreeNode **temp = MEM_callocN((totstack + 100) * sizeof(KDTreeNode *), "psys_treestack");
- memcpy(temp, stack, totstack * sizeof(KDTreeNode *));
- if (stack != defaultstack)
- MEM_freeN(stack);
- stack = temp;
- totstack += 100;
+ if (UNLIKELY(cur + 3 > totstack)) {
+ stack = realloc_nodes(stack, &totstack, defaultstack != stack);
}
}
@@ -437,7 +476,7 @@ int BLI_kdtree_range_search(KDTree *tree, float range, const float co[3], const
if (found)
qsort(foundstack, found, sizeof(KDTreeNearest), range_compare);
- *nearest = foundstack;
+ *r_nearest = foundstack;
- return found;
+ return (int)found;
}
diff --git a/source/blender/blenlib/intern/BLI_linklist.c b/source/blender/blenlib/intern/BLI_linklist.c
index 99fc5f27726..66fcfd21fbb 100644
--- a/source/blender/blenlib/intern/BLI_linklist.c
+++ b/source/blender/blenlib/intern/BLI_linklist.c
@@ -89,18 +89,39 @@ void BLI_linklist_reverse(LinkNode **listp)
*listp = rhead;
}
-void BLI_linklist_prepend(LinkNode **listp, void *ptr)
+/**
+ * A version of prepend that takes the allocated link.
+ */
+void BLI_linklist_prepend_nlink(LinkNode **listp, void *ptr, LinkNode *nlink)
{
- LinkNode *nlink = MEM_mallocN(sizeof(*nlink), "nlink");
nlink->link = ptr;
-
nlink->next = *listp;
*listp = nlink;
}
-void BLI_linklist_append(LinkNode **listp, void *ptr)
+void BLI_linklist_prepend(LinkNode **listp, void *ptr)
{
LinkNode *nlink = MEM_mallocN(sizeof(*nlink), "nlink");
+ BLI_linklist_prepend_nlink(listp, ptr, nlink);
+}
+
+void BLI_linklist_prepend_arena(LinkNode **listp, void *ptr, MemArena *ma)
+{
+ LinkNode *nlink = BLI_memarena_alloc(ma, sizeof(*nlink));
+ BLI_linklist_prepend_nlink(listp, ptr, nlink);
+}
+
+void BLI_linklist_prepend_pool(LinkNode **listp, void *ptr, BLI_mempool *mempool)
+{
+ LinkNode *nlink = BLI_mempool_alloc(mempool);
+ BLI_linklist_prepend_nlink(listp, ptr, nlink);
+}
+
+/**
+ * A version of append that takes the allocated link.
+ */
+void BLI_linklist_append_nlink(LinkNode **listp, void *ptr, LinkNode *nlink)
+{
LinkNode *node = *listp;
nlink->link = ptr;
@@ -117,22 +138,22 @@ void BLI_linklist_append(LinkNode **listp, void *ptr)
}
}
-void BLI_linklist_prepend_arena(LinkNode **listp, void *ptr, MemArena *ma)
+void BLI_linklist_append(LinkNode **listp, void *ptr)
+{
+ LinkNode *nlink = MEM_mallocN(sizeof(*nlink), "nlink");
+ BLI_linklist_append_nlink(listp, ptr, nlink);
+}
+
+void BLI_linklist_append_arena(LinkNode **listp, void *ptr, MemArena *ma)
{
LinkNode *nlink = BLI_memarena_alloc(ma, sizeof(*nlink));
- nlink->link = ptr;
-
- nlink->next = *listp;
- *listp = nlink;
+ BLI_linklist_append_nlink(listp, ptr, nlink);
}
-void BLI_linklist_prepend_pool(LinkNode **listp, void *ptr, BLI_mempool *mempool)
+void BLI_linklist_append_pool(LinkNode **listp, void *ptr, BLI_mempool *mempool)
{
LinkNode *nlink = BLI_mempool_alloc(mempool);
- nlink->link = ptr;
-
- nlink->next = *listp;
- *listp = nlink;
+ BLI_linklist_append_nlink(listp, ptr, nlink);
}
void *BLI_linklist_pop(struct LinkNode **listp)
diff --git a/source/blender/blenlib/intern/BLI_memarena.c b/source/blender/blenlib/intern/BLI_memarena.c
index ef10cb805ad..4a6712201a9 100644
--- a/source/blender/blenlib/intern/BLI_memarena.c
+++ b/source/blender/blenlib/intern/BLI_memarena.c
@@ -30,17 +30,16 @@
* \ingroup bli
*/
+#include <string.h>
+
#include "MEM_guardedalloc.h"
#include "BLI_memarena.h"
#include "BLI_linklist.h"
+#include "BLI_strict_flags.h"
-#ifdef __GNUC__
-# pragma GCC diagnostic error "-Wsign-conversion"
-# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 /* gcc4.6+ only */
-# pragma GCC diagnostic error "-Wsign-compare"
-# pragma GCC diagnostic error "-Wconversion"
-# endif
+#ifdef WITH_MEM_VALGRIND
+# include "valgrind/memcheck.h"
#endif
struct MemArena {
@@ -61,6 +60,10 @@ MemArena *BLI_memarena_new(const int bufsize, const char *name)
ma->align = 8;
ma->name = name;
+#ifdef WITH_MEM_VALGRIND
+ VALGRIND_CREATE_MEMPOOL(ma, 0, false);
+#endif
+
return ma;
}
@@ -83,12 +86,27 @@ void BLI_memarena_use_align(struct MemArena *ma, const int align)
void BLI_memarena_free(MemArena *ma)
{
BLI_linklist_freeN(ma->bufs);
+
+#ifdef WITH_MEM_VALGRIND
+ VALGRIND_DESTROY_MEMPOOL(ma);
+#endif
+
MEM_freeN(ma);
}
/* amt must be power of two */
#define PADUP(num, amt) (((num) + ((amt) - 1)) & ~((amt) - 1))
+/* align alloc'ed memory (needed if align > 8) */
+static void memarena_curbuf_align(MemArena *ma)
+{
+ unsigned char *tmp;
+
+ tmp = (unsigned char *)PADUP( (intptr_t) ma->curbuf, ma->align);
+ ma->cursize -= (int)(tmp - ma->curbuf);
+ ma->curbuf = tmp;
+}
+
void *BLI_memarena_alloc(MemArena *ma, int size)
{
void *ptr;
@@ -98,8 +116,6 @@ void *BLI_memarena_alloc(MemArena *ma, int size)
size = PADUP(size, ma->align);
if (size > ma->cursize) {
- unsigned char *tmp;
-
if (size > ma->bufsize - (ma->align - 1)) {
ma->cursize = PADUP(size + 1, ma->align);
}
@@ -112,16 +128,51 @@ void *BLI_memarena_alloc(MemArena *ma, int size)
ma->curbuf = MEM_mallocN((size_t)ma->cursize, ma->name);
BLI_linklist_prepend(&ma->bufs, ma->curbuf);
-
- /* align alloc'ed memory (needed if align > 8) */
- tmp = (unsigned char *)PADUP( (intptr_t) ma->curbuf, ma->align);
- ma->cursize -= (int)(tmp - ma->curbuf);
- ma->curbuf = tmp;
+ memarena_curbuf_align(ma);
}
ptr = ma->curbuf;
ma->curbuf += size;
ma->cursize -= size;
+#ifdef WITH_MEM_VALGRIND
+ VALGRIND_MEMPOOL_ALLOC(ma, ptr, size);
+#endif
+
return ptr;
}
+
+/**
+ * Clear for reuse, avoids re-allocation when an arena may
+ * otherwise be free'd and recreated.
+ */
+void BLI_memarena_clear(MemArena *ma)
+{
+ if (ma->bufs) {
+ unsigned char *curbuf_prev;
+ int curbuf_used;
+
+ if (ma->bufs->next) {
+ BLI_linklist_freeN(ma->bufs->next);
+ ma->bufs->next = NULL;
+ }
+
+ curbuf_prev = ma->curbuf;
+ ma->curbuf = ma->bufs->link;
+ memarena_curbuf_align(ma);
+
+ /* restore to original size */
+ curbuf_used = (int)(curbuf_prev - ma->curbuf);
+ ma->cursize += curbuf_used;
+
+ if (ma->use_calloc) {
+ memset(ma->curbuf, 0, (size_t)curbuf_used);
+ }
+ }
+
+#ifdef WITH_MEM_VALGRIND
+ VALGRIND_DESTROY_MEMPOOL(ma);
+ VALGRIND_CREATE_MEMPOOL(ma, 0, false);
+#endif
+
+}
diff --git a/source/blender/blenlib/intern/BLI_mempool.c b/source/blender/blenlib/intern/BLI_mempool.c
index bb326a23d59..28539d9ca34 100644
--- a/source/blender/blenlib/intern/BLI_mempool.c
+++ b/source/blender/blenlib/intern/BLI_mempool.c
@@ -31,6 +31,9 @@
* Simple, fast memory allocator for allocating many elements of the same size.
*/
+#include <string.h>
+#include <stdlib.h>
+
#include "BLI_utildefines.h"
#include "BLI_listbase.h"
@@ -40,15 +43,10 @@
#include "MEM_guardedalloc.h"
-#include <string.h>
-#include <stdlib.h>
+#include "BLI_strict_flags.h" /* keep last */
-#ifdef __GNUC__
-# pragma GCC diagnostic error "-Wsign-conversion"
-# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 /* gcc4.6+ only */
-# pragma GCC diagnostic error "-Wsign-compare"
-# pragma GCC diagnostic error "-Wconversion"
-# endif
+#ifdef WITH_MEM_VALGRIND
+# include "valgrind/memcheck.h"
#endif
/* note: copied from BLO_blend_defs.h, don't use here because we're in BLI */
@@ -65,37 +63,185 @@
/* currently totalloc isnt used */
// #define USE_TOTALLOC
+/* when undefined, merge the allocs for BLI_mempool_chunk and its data */
+// #define USE_DATA_PTR
+
+#ifndef NDEBUG
+static bool mempool_debug_memset = false;
+#endif
+
+/**
+ * A free element from #BLI_mempool_chunk. Data is cast to this type and stored in
+ * #BLI_mempool.free as a single linked list, each item #BLI_mempool.esize large.
+ *
+ * Each element represents a block which BLI_mempool_alloc may return.
+ */
typedef struct BLI_freenode {
struct BLI_freenode *next;
int freeword; /* used to identify this as a freed node */
} BLI_freenode;
+/**
+ * A chunk of memory in the mempool stored in
+ * #BLI_mempool.chunks as a double linked list.
+ */
typedef struct BLI_mempool_chunk {
struct BLI_mempool_chunk *next, *prev;
- void *data;
+#ifdef USE_DATA_PTR
+ void *_data;
+#endif
} BLI_mempool_chunk;
+/**
+ * The mempool, stores and tracks memory \a chunks and elements within those chunks \a free.
+ */
struct BLI_mempool {
struct ListBase chunks;
- int esize; /* element size in bytes */
- int csize; /* chunk size in bytes */
- int pchunk; /* number of elements per chunk */
- int flag;
+ unsigned int esize; /* element size in bytes */
+ unsigned int csize; /* chunk size in bytes */
+ unsigned int pchunk; /* number of elements per chunk */
+ unsigned int flag;
/* keeps aligned to 16 bits */
- BLI_freenode *free; /* free element list. Interleaved into chunk datas. */
- int totalloc, totused; /* total number of elements allocated in total,
- * and currently in use */
+ BLI_freenode *free; /* free element list. Interleaved into chunk datas. */
+ unsigned int maxchunks; /* use to know how many chunks to keep for BLI_mempool_clear */
+ unsigned int totused; /* number of elements currently in use */
+#ifdef USE_TOTALLOC
+ unsigned int totalloc; /* number of elements allocated in total */
+#endif
};
#define MEMPOOL_ELEM_SIZE_MIN (sizeof(void *) * 2)
-BLI_mempool *BLI_mempool_create(int esize, int totelem, int pchunk, int flag)
+#ifdef USE_DATA_PTR
+# define CHUNK_DATA(chunk) (chunk)->_data
+#else
+# define CHUNK_DATA(chunk) (CHECK_TYPE_INLINE(chunk, BLI_mempool_chunk *), (void *)((chunk) + 1))
+#endif
+
+/**
+ * \return the number of chunks to allocate based on how many elements are needed.
+ */
+BLI_INLINE unsigned int mempool_maxchunks(const unsigned int totelem, const unsigned int pchunk)
{
- BLI_mempool *pool = NULL;
- BLI_freenode *lasttail = NULL, *curnode = NULL;
- int i, j, maxchunks;
+ return totelem / pchunk + 1;
+}
+
+static BLI_mempool_chunk *mempool_chunk_alloc(BLI_mempool *pool)
+{
+ BLI_mempool_chunk *mpchunk;
+#ifdef USE_DATA_PTR
+ if (pool->flag & BLI_MEMPOOL_SYSMALLOC) {
+ mpchunk = malloc(sizeof(BLI_mempool_chunk));
+ CHUNK_DATA(mpchunk) = malloc((size_t)pool->csize);
+ }
+ else {
+ mpchunk = MEM_mallocN(sizeof(BLI_mempool_chunk), "BLI_Mempool Chunk");
+ CHUNK_DATA(mpchunk) = MEM_mallocN((size_t)pool->csize, "BLI Mempool Chunk Data");
+ }
+#else
+ if (pool->flag & BLI_MEMPOOL_SYSMALLOC) {
+ mpchunk = malloc(sizeof(BLI_mempool_chunk) + (size_t)pool->csize);
+ }
+ else {
+ mpchunk = MEM_mallocN(sizeof(BLI_mempool_chunk) + (size_t)pool->csize, "BLI_Mempool Chunk");
+ }
+#endif
+
+ return mpchunk;
+}
+
+/**
+ * Initialize a chunk and add into \a pool->chunks
+ *
+ * \param pool The pool to add the chunk into.
+ * \param mpchunk The new uninitialized chunk (can be malloc'd)
+ * \param lasttail The last element of the previous chunk
+ * (used when building free chunks initially)
+ * \return The last chunk,
+ */
+static BLI_freenode *mempool_chunk_add(BLI_mempool *pool, BLI_mempool_chunk *mpchunk,
+ BLI_freenode *lasttail)
+{
+ BLI_freenode *curnode = NULL;
+ const unsigned int pchunk_last = pool->pchunk - 1;
char *addr;
+ unsigned int j;
+
+ mpchunk->next = mpchunk->prev = NULL;
+ BLI_addtail(&(pool->chunks), mpchunk);
+
+ if (pool->free == NULL) {
+ pool->free = CHUNK_DATA(mpchunk); /* start of the list */
+ if (pool->flag & BLI_MEMPOOL_ALLOW_ITER) {
+ pool->free->freeword = FREEWORD;
+ }
+ }
+
+ /* loop through the allocated data, building the pointer structures */
+ for (addr = CHUNK_DATA(mpchunk), j = 0; j != pchunk_last; j++) {
+ curnode = ((BLI_freenode *)addr);
+ addr += pool->esize;
+ curnode->next = (BLI_freenode *)addr;
+ if (pool->flag & BLI_MEMPOOL_ALLOW_ITER) {
+ if (j != pchunk_last)
+ curnode->next->freeword = FREEWORD;
+ curnode->freeword = FREEWORD;
+ }
+ }
+
+ /* terminate the list,
+ * will be overwritten if 'curnode' gets passed in again as 'lasttail' */
+ curnode->next = NULL;
+
+#ifdef USE_TOTALLOC
+ pool->totalloc += pool->pchunk;
+#endif
+
+ /* final pointer in the previously allocated chunk is wrong */
+ if (lasttail) {
+ lasttail->next = CHUNK_DATA(mpchunk);
+ if (pool->flag & BLI_MEMPOOL_ALLOW_ITER) {
+ lasttail->freeword = FREEWORD;
+ }
+ }
+
+ return curnode;
+}
+
+static void mempool_chunk_free(BLI_mempool_chunk *mpchunk, const unsigned int flag)
+{
+ if (flag & BLI_MEMPOOL_SYSMALLOC) {
+#ifdef USE_DATA_PTR
+ free(CHUNK_DATA(mpchunk));
+#endif
+ free(mpchunk);
+ }
+ else {
+#ifdef USE_DATA_PTR
+ MEM_freeN(CHUNK_DATA(mpchunk));
+#endif
+ MEM_freeN(mpchunk);
+ }
+}
+
+static void mempool_chunk_free_all(ListBase *chunks, const unsigned int flag)
+{
+ BLI_mempool_chunk *mpchunk, *mpchunk_next;
+
+ for (mpchunk = chunks->first; mpchunk; mpchunk = mpchunk_next) {
+ mpchunk_next = mpchunk->next;
+ mempool_chunk_free(mpchunk, flag);
+ }
+ chunks->first = chunks->last = NULL;
+}
+
+BLI_mempool *BLI_mempool_create(unsigned int esize, unsigned int totelem,
+ unsigned int pchunk, unsigned int flag)
+{
+ BLI_mempool *pool = NULL;
+ BLI_freenode *lasttail = NULL;
+ unsigned int i, maxchunks;
/* allocate the pool structure */
if (flag & BLI_MEMPOOL_SYSMALLOC) {
@@ -117,68 +263,29 @@ BLI_mempool *BLI_mempool_create(int esize, int totelem, int pchunk, int flag)
pool->esize = esize;
}
+ maxchunks = mempool_maxchunks(totelem, pchunk);
+
pool->flag = flag;
pool->pchunk = pchunk;
pool->csize = esize * pchunk;
pool->chunks.first = pool->chunks.last = NULL;
+ pool->free = NULL; /* mempool_chunk_add assigns */
+ pool->maxchunks = maxchunks;
+#ifdef USE_TOTALLOC
pool->totalloc = 0;
+#endif
pool->totused = 0;
- maxchunks = totelem / pchunk + 1;
- if (maxchunks == 0) {
- maxchunks = 1;
- }
-
/* allocate the actual chunks */
for (i = 0; i < maxchunks; i++) {
- BLI_mempool_chunk *mpchunk;
-
- if (flag & BLI_MEMPOOL_SYSMALLOC) {
- mpchunk = malloc(sizeof(BLI_mempool_chunk));
- mpchunk->data = malloc((size_t)pool->csize);
- }
- else {
- mpchunk = MEM_mallocN(sizeof(BLI_mempool_chunk), "BLI_Mempool Chunk");
- mpchunk->data = MEM_mallocN((size_t)pool->csize, "BLI Mempool Chunk Data");
- }
-
- mpchunk->next = mpchunk->prev = NULL;
- BLI_addtail(&(pool->chunks), mpchunk);
-
- if (i == 0) {
- pool->free = mpchunk->data; /* start of the list */
- if (pool->flag & BLI_MEMPOOL_ALLOW_ITER) {
- pool->free->freeword = FREEWORD;
- }
- }
-
- /* loop through the allocated data, building the pointer structures */
- for (addr = mpchunk->data, j = 0; j < pool->pchunk; j++) {
- curnode = ((BLI_freenode *)addr);
- addr += pool->esize;
- curnode->next = (BLI_freenode *)addr;
- if (pool->flag & BLI_MEMPOOL_ALLOW_ITER) {
- if (j != pool->pchunk - 1)
- curnode->next->freeword = FREEWORD;
- curnode->freeword = FREEWORD;
- }
- }
- /* final pointer in the previously allocated chunk is wrong */
- if (lasttail) {
- lasttail->next = mpchunk->data;
- if (pool->flag & BLI_MEMPOOL_ALLOW_ITER) {
- lasttail->freeword = FREEWORD;
- }
- }
+ BLI_mempool_chunk *mpchunk = mempool_chunk_alloc(pool);
+ lasttail = mempool_chunk_add(pool, mpchunk, lasttail);
+ }
- /* set the end of this chunks memory to the new tail for next iteration */
- lasttail = curnode;
-#ifdef USE_TOTALLOC
- pool->totalloc += pool->pchunk;
+#ifdef WITH_MEM_VALGRIND
+ VALGRIND_CREATE_MEMPOOL(pool, 0, false);
#endif
- }
- /* terminate the list */
- curnode->next = NULL;
+
return pool;
}
@@ -189,46 +296,9 @@ void *BLI_mempool_alloc(BLI_mempool *pool)
pool->totused++;
if (!(pool->free)) {
- BLI_freenode *curnode = NULL;
- char *addr;
- int j;
-
/* need to allocate a new chunk */
- BLI_mempool_chunk *mpchunk;
-
- if (pool->flag & BLI_MEMPOOL_SYSMALLOC) {
- mpchunk = malloc(sizeof(BLI_mempool_chunk));
- mpchunk->data = malloc((size_t)pool->csize);
- }
- else {
- mpchunk = MEM_mallocN(sizeof(BLI_mempool_chunk), "BLI_Mempool Chunk");
- mpchunk->data = MEM_mallocN((size_t)pool->csize, "BLI_Mempool Chunk Data");
- }
-
- mpchunk->next = mpchunk->prev = NULL;
- BLI_addtail(&(pool->chunks), mpchunk);
-
- pool->free = mpchunk->data; /* start of the list */
-
- if (pool->flag & BLI_MEMPOOL_ALLOW_ITER) {
- pool->free->freeword = FREEWORD;
- }
-
- for (addr = mpchunk->data, j = 0; j < pool->pchunk; j++) {
- curnode = ((BLI_freenode *)addr);
- addr += pool->esize;
- curnode->next = (BLI_freenode *)addr;
-
- if (pool->flag & BLI_MEMPOOL_ALLOW_ITER) {
- curnode->freeword = FREEWORD;
- if (j != pool->pchunk - 1)
- curnode->next->freeword = FREEWORD;
- }
- }
- curnode->next = NULL; /* terminate the list */
-#ifdef USE_TOTALLOC
- pool->totalloc += pool->pchunk;
-#endif
+ BLI_mempool_chunk *mpchunk = mempool_chunk_alloc(pool);
+ mempool_chunk_add(pool, mpchunk, NULL);
}
retval = pool->free;
@@ -238,7 +308,11 @@ void *BLI_mempool_alloc(BLI_mempool *pool)
}
pool->free = pool->free->next;
- //memset(retval, 0, pool->esize);
+
+#ifdef WITH_MEM_VALGRIND
+ VALGRIND_MEMPOOL_ALLOC(pool, retval, pool->esize);
+#endif
+
return retval;
}
@@ -258,6 +332,27 @@ void BLI_mempool_free(BLI_mempool *pool, void *addr)
{
BLI_freenode *newhead = addr;
+#ifndef NDEBUG
+ {
+ BLI_mempool_chunk *chunk;
+ bool found = false;
+ for (chunk = pool->chunks.first; chunk; chunk = chunk->next) {
+ if (ARRAY_HAS_ITEM((char *)addr, (char *)CHUNK_DATA(chunk), pool->csize)) {
+ found = true;
+ break;
+ }
+ }
+ if (!found) {
+ BLI_assert(!"Attempt to free data which is not in pool.\n");
+ }
+ }
+
+ /* enable for debugging */
+ if (UNLIKELY(mempool_debug_memset)) {
+ memset(addr, 255, pool->esize);
+ }
+#endif
+
if (pool->flag & BLI_MEMPOOL_ALLOW_ITER) {
#ifndef NDEBUG
/* this will detect double free's */
@@ -271,55 +366,52 @@ void BLI_mempool_free(BLI_mempool *pool, void *addr)
pool->totused--;
+#ifdef WITH_MEM_VALGRIND
+ VALGRIND_MEMPOOL_FREE(pool, addr);
+#endif
+
/* nothing is in use; free all the chunks except the first */
- if (pool->totused == 0) {
+ if (UNLIKELY(pool->totused == 0)) {
BLI_freenode *curnode = NULL;
char *tmpaddr = NULL;
- int i;
-
- BLI_mempool_chunk *mpchunk = NULL;
- BLI_mempool_chunk *first = pool->chunks.first;
-
- BLI_remlink(&pool->chunks, first);
-
- if (pool->flag & BLI_MEMPOOL_SYSMALLOC) {
- for (mpchunk = pool->chunks.first; mpchunk; mpchunk = mpchunk->next) {
- free(mpchunk->data);
- }
- BLI_freelist(&(pool->chunks));
- }
- else {
- for (mpchunk = pool->chunks.first; mpchunk; mpchunk = mpchunk->next) {
- MEM_freeN(mpchunk->data);
- }
- BLI_freelistN(&(pool->chunks));
- }
+ unsigned int i;
+ BLI_mempool_chunk *first;
+ first = BLI_pophead(&pool->chunks);
+ mempool_chunk_free_all(&pool->chunks, pool->flag);
BLI_addtail(&pool->chunks, first);
#ifdef USE_TOTALLOC
pool->totalloc = pool->pchunk;
#endif
- pool->free = first->data; /* start of the list */
- for (tmpaddr = first->data, i = 0; i < pool->pchunk; i++) {
+ /* temp alloc so valgrind doesn't complain when setting free'd blocks 'next' */
+#ifdef WITH_MEM_VALGRIND
+ VALGRIND_MEMPOOL_ALLOC(pool, CHUNK_DATA(first), pool->csize);
+#endif
+ pool->free = CHUNK_DATA(first); /* start of the list */
+ for (tmpaddr = CHUNK_DATA(first), i = 0; i < pool->pchunk; i++) {
curnode = ((BLI_freenode *)tmpaddr);
tmpaddr += pool->esize;
curnode->next = (BLI_freenode *)tmpaddr;
}
curnode->next = NULL; /* terminate the list */
+
+#ifdef WITH_MEM_VALGRIND
+ VALGRIND_MEMPOOL_FREE(pool, CHUNK_DATA(first));
+#endif
}
}
int BLI_mempool_count(BLI_mempool *pool)
{
- return pool->totused;
+ return (int)pool->totused;
}
-void *BLI_mempool_findelem(BLI_mempool *pool, int index)
+void *BLI_mempool_findelem(BLI_mempool *pool, unsigned int index)
{
BLI_assert(pool->flag & BLI_MEMPOOL_ALLOW_ITER);
- if ((index >= 0) && (index < pool->totused)) {
+ if (index < pool->totused) {
/* we could have some faster mem chunk stepping code inline */
BLI_mempool_iter iter;
void *elem;
@@ -337,6 +429,7 @@ void *BLI_mempool_findelem(BLI_mempool *pool, int index)
* Fill in \a data with pointers to each element of the mempool,
* to create lookup table.
*
+ * \param pool Pool to create a table from.
* \param data array of pointers at least the size of 'pool->totused'
*/
void BLI_mempool_as_table(BLI_mempool *pool, void **data)
@@ -349,7 +442,7 @@ void BLI_mempool_as_table(BLI_mempool *pool, void **data)
while ((elem = BLI_mempool_iterstep(&iter))) {
*p++ = elem;
}
- BLI_assert((p - data) == pool->totused);
+ BLI_assert((unsigned int)(p - data) == pool->totused);
}
/**
@@ -375,7 +468,7 @@ void BLI_mempool_as_array(BLI_mempool *pool, void *data)
memcpy(p, elem, (size_t)pool->esize);
p += pool->esize;
}
- BLI_assert((p - (char *)data) == pool->totused * pool->esize);
+ BLI_assert((unsigned int)(p - (char *)data) == pool->totused * pool->esize);
}
/**
@@ -388,6 +481,9 @@ void *BLI_mempool_as_arrayN(BLI_mempool *pool, const char *allocstr)
return data;
}
+/**
+ * Create a new mempool iterator, \a BLI_MEMPOOL_ALLOW_ITER flag must be set.
+ */
void BLI_mempool_iternew(BLI_mempool *pool, BLI_mempool_iter *iter)
{
BLI_assert(pool->flag & BLI_MEMPOOL_ALLOW_ITER);
@@ -406,11 +502,11 @@ static void *bli_mempool_iternext(BLI_mempool_iter *iter)
if (!iter->curchunk || !iter->pool->totused) return NULL;
- ret = ((char *)iter->curchunk->data) + iter->pool->esize * iter->curindex;
+ ret = ((char *)CHUNK_DATA(iter->curchunk)) + (iter->pool->esize * iter->curindex);
iter->curindex++;
- if (iter->curindex >= iter->pool->pchunk) {
+ if (iter->curindex == iter->pool->pchunk) {
iter->curchunk = iter->curchunk->next;
iter->curindex = 0;
}
@@ -433,23 +529,22 @@ void *BLI_mempool_iterstep(BLI_mempool_iter *iter)
/* optimized version of code above */
+/**
+ * Step over the iterator, returning the mempool item or NULL.
+ */
void *BLI_mempool_iterstep(BLI_mempool_iter *iter)
{
BLI_freenode *ret;
- if (UNLIKELY(iter->pool->totused == 0)) {
- return NULL;
- }
-
do {
if (LIKELY(iter->curchunk)) {
- ret = (BLI_freenode *)(((char *)iter->curchunk->data) + iter->pool->esize * iter->curindex);
+ ret = (BLI_freenode *)(((char *)CHUNK_DATA(iter->curchunk)) + (iter->pool->esize * iter->curindex));
}
else {
return NULL;
}
- if (UNLIKELY(++iter->curindex >= iter->pool->pchunk)) {
+ if (UNLIKELY(++iter->curindex == iter->pool->pchunk)) {
iter->curindex = 0;
iter->curchunk = iter->curchunk->next;
}
@@ -461,27 +556,85 @@ void *BLI_mempool_iterstep(BLI_mempool_iter *iter)
#endif
/**
+ * Empty the pool, as if it were just created.
+ *
+ * \param pool The pool to clear.
+ * \param totelem_reserve Optionally reserve how many items should be kept from clearing.
+ */
+void BLI_mempool_clear_ex(BLI_mempool *pool, const int totelem_reserve)
+{
+ BLI_mempool_chunk *mpchunk;
+ BLI_mempool_chunk *mpchunk_next;
+ unsigned int maxchunks;
+
+ ListBase chunks_temp;
+ BLI_freenode *lasttail = NULL;
+
+#ifdef WITH_MEM_VALGRIND
+ VALGRIND_DESTROY_MEMPOOL(pool);
+ VALGRIND_CREATE_MEMPOOL(pool, 0, false);
+#endif
+
+ if (totelem_reserve == -1) {
+ maxchunks = pool->maxchunks;
+ }
+ else {
+ maxchunks = mempool_maxchunks((unsigned int)totelem_reserve, pool->pchunk);
+ }
+
+ /* free all after pool->maxchunks */
+
+ for (mpchunk = BLI_findlink(&pool->chunks, (int)maxchunks); mpchunk; mpchunk = mpchunk_next) {
+ mpchunk_next = mpchunk->next;
+ BLI_remlink(&pool->chunks, mpchunk);
+ mempool_chunk_free(mpchunk, pool->flag);
+ }
+
+ /* re-initialize */
+ pool->free = NULL;
+ pool->totused = 0;
+#ifdef USE_TOTALLOC
+ pool->totalloc = 0;
+#endif
+
+ chunks_temp = pool->chunks;
+ pool->chunks.first = pool->chunks.last = NULL;
+
+ while ((mpchunk = BLI_pophead(&chunks_temp))) {
+ lasttail = mempool_chunk_add(pool, mpchunk, lasttail);
+ }
+}
+
+/**
+ * Wrap #BLI_mempool_clear_ex with no reserve set.
+ */
+void BLI_mempool_clear(BLI_mempool *pool)
+{
+ BLI_mempool_clear_ex(pool, -1);
+}
+
+/**
* Free the mempool its self (and all elements).
*/
void BLI_mempool_destroy(BLI_mempool *pool)
{
- BLI_mempool_chunk *mpchunk = NULL;
- BLI_mempool_chunk *mpchunk_next;
+ mempool_chunk_free_all(&pool->chunks, pool->flag);
+
+#ifdef WITH_MEM_VALGRIND
+ VALGRIND_DESTROY_MEMPOOL(pool);
+#endif
if (pool->flag & BLI_MEMPOOL_SYSMALLOC) {
- for (mpchunk = pool->chunks.first; mpchunk; mpchunk = mpchunk_next) {
- mpchunk_next = mpchunk->next;
- free(mpchunk->data);
- free(mpchunk);
- }
free(pool);
}
else {
- for (mpchunk = pool->chunks.first; mpchunk; mpchunk = mpchunk_next) {
- mpchunk_next = mpchunk->next;
- MEM_freeN(mpchunk->data);
- MEM_freeN(mpchunk);
- }
MEM_freeN(pool);
}
}
+
+#ifndef NDEBUG
+void BLI_mempool_set_memory_debug(void)
+{
+ mempool_debug_memset = true;
+}
+#endif
diff --git a/source/blender/blenlib/intern/boxpack2d.c b/source/blender/blenlib/intern/boxpack2d.c
index 8a97fdcab67..4b51aefbd87 100644
--- a/source/blender/blenlib/intern/boxpack2d.c
+++ b/source/blender/blenlib/intern/boxpack2d.c
@@ -27,16 +27,23 @@
#include <stdlib.h> /* for qsort */
#include "MEM_guardedalloc.h"
-#include "BLI_boxpack2d.h"
+#include "BLI_strict_flags.h"
+
+#include "BLI_boxpack2d.h" /* own include */
+
+#ifdef __GNUC__
+# pragma GCC diagnostic error "-Wpadded"
+#endif
/* BoxPacker for backing 2D rectangles into a square
*
* The defined Below are for internal use only */
-
typedef struct BoxVert {
float x;
float y;
- short free;
+
+ int free; /* could be a char */
+ unsigned int index;
struct BoxPack *trb; /* top right box */
struct BoxPack *blb; /* bottom left box */
@@ -46,8 +53,6 @@ typedef struct BoxVert {
/* Store last intersecting boxes here
* speedup intersection testing */
struct BoxPack *isect_cache[4];
-
- int index;
} BoxVert;
/* free vert flags */
@@ -154,13 +159,15 @@ static int vertex_sort(const void *p1, const void *p2)
* len - the number of boxes in the array.
* tot_width and tot_height are set so you can normalize the data.
* */
-void BLI_box_pack_2D(BoxPack *boxarray, const int len, float *tot_width, float *tot_height)
+void BLI_box_pack_2d(BoxPack *boxarray, const unsigned int len, float *tot_width, float *tot_height)
{
- BoxVert *vert; /* the current vert */
- int box_index, verts_pack_len, i, j, k, isect;
- int quad_flags[4] = {BLF, TRF, TLF, BRF}; /* use for looping */
+ const int quad_flags[4] = {BLF, TRF, TLF, BRF}; /* use for looping */
+ unsigned int box_index, verts_pack_len, i, j, k;
+ unsigned int *vertex_pack_indices; /* an array of indices used for sorting verts */
+ bool isect;
+
BoxPack *box, *box_test; /*current box and another for intersection tests*/
- int *vertex_pack_indices; /*an array of indices used for sorting verts*/
+ BoxVert *vert; /* the current vert */
if (!len) {
*tot_width = 0.0f;
@@ -169,11 +176,11 @@ void BLI_box_pack_2D(BoxPack *boxarray, const int len, float *tot_width, float *
}
/* Sort boxes, biggest first */
- qsort(boxarray, len, sizeof(BoxPack), box_areasort);
+ qsort(boxarray, (size_t)len, sizeof(BoxPack), box_areasort);
/* add verts to the boxes, these are only used internally */
- vert = vertarray = MEM_mallocN(len * 4 * sizeof(BoxVert), "BoxPack Verts");
- vertex_pack_indices = MEM_mallocN(len * 3 * sizeof(int), "BoxPack Indices");
+ vert = vertarray = MEM_mallocN((size_t)len * 4 * sizeof(BoxVert), "BoxPack Verts");
+ vertex_pack_indices = MEM_mallocN((size_t)len * 3 * sizeof(int), "BoxPack Indices");
for (box = boxarray, box_index = 0, i = 0; box_index < len; box_index++, box++) {
@@ -182,7 +189,7 @@ void BLI_box_pack_2D(BoxPack *boxarray, const int len, float *tot_width, float *
vert->isect_cache[2] = vert->isect_cache[3] = NULL;
vert->free = CORNERFLAGS & ~TRF;
vert->trb = box;
- vert->index = i; i++;
+ vert->index = i++;
box->v[BL] = vert; vert++;
vert->trb = vert->brb = vert->tlb =
@@ -190,7 +197,7 @@ void BLI_box_pack_2D(BoxPack *boxarray, const int len, float *tot_width, float *
vert->isect_cache[2] = vert->isect_cache[3] = NULL;
vert->free = CORNERFLAGS & ~BLF;
vert->blb = box;
- vert->index = i; i++;
+ vert->index = i++;
box->v[TR] = vert; vert++;
vert->trb = vert->blb = vert->tlb =
@@ -198,7 +205,7 @@ void BLI_box_pack_2D(BoxPack *boxarray, const int len, float *tot_width, float *
vert->isect_cache[2] = vert->isect_cache[3] = NULL;
vert->free = CORNERFLAGS & ~BRF;
vert->brb = box;
- vert->index = i; i++;
+ vert->index = i++;
box->v[TL] = vert; vert++;
vert->trb = vert->blb = vert->brb =
@@ -206,7 +213,7 @@ void BLI_box_pack_2D(BoxPack *boxarray, const int len, float *tot_width, float *
vert->isect_cache[2] = vert->isect_cache[3] = NULL;
vert->free = CORNERFLAGS & ~TLF;
vert->tlb = box;
- vert->index = i; i++;
+ vert->index = i++;
box->v[BR] = vert; vert++;
}
vert = NULL;
@@ -241,11 +248,11 @@ void BLI_box_pack_2D(BoxPack *boxarray, const int len, float *tot_width, float *
box_width = box->w;
box_height = box->h;
- qsort(vertex_pack_indices, verts_pack_len, sizeof(int), vertex_sort);
+ qsort(vertex_pack_indices, (size_t)verts_pack_len, sizeof(int), vertex_sort);
/* Pack the box in with the others */
/* sort the verts */
- isect = 1;
+ isect = true;
for (i = 0; i < verts_pack_len && isect; i++) {
vert = vertarray + vertex_pack_indices[i];
@@ -281,7 +288,7 @@ void BLI_box_pack_2D(BoxPack *boxarray, const int len, float *tot_width, float *
/* Now we need to check that the box intersects
* with any other boxes
* Assume no intersection... */
- isect = 0;
+ isect = false;
if ( /* Constrain boxes to positive X/Y values */
BOXLEFT(box) < 0.0f || BOXBOTTOM(box) < 0.0f ||
@@ -294,7 +301,7 @@ void BLI_box_pack_2D(BoxPack *boxarray, const int len, float *tot_width, float *
* isect_cache that can store a pointer to a
* box for each quadrant
* big speedup */
- isect = 1;
+ isect = true;
}
else {
/* do a full search for colliding box
@@ -305,7 +312,7 @@ void BLI_box_pack_2D(BoxPack *boxarray, const int len, float *tot_width, float *
/* Store the last intersecting here as cache
* for faster checking next time around */
vert->isect_cache[j] = box_test;
- isect = 1;
+ isect = true;
break;
}
}
diff --git a/source/blender/blenlib/intern/buffer.c b/source/blender/blenlib/intern/buffer.c
index 36fb04a7bb7..4e570823319 100644
--- a/source/blender/blenlib/intern/buffer.c
+++ b/source/blender/blenlib/intern/buffer.c
@@ -18,6 +18,10 @@
* ***** END GPL LICENSE BLOCK *****
*/
+/** \file blender/blenlib/intern/buffer.c
+ * \ingroup bli
+ */
+
#include "MEM_guardedalloc.h"
#include "BLI_buffer.h"
diff --git a/source/blender/blenlib/intern/callbacks.c b/source/blender/blenlib/intern/callbacks.c
index 614a9a63d90..719809e6bcd 100644
--- a/source/blender/blenlib/intern/callbacks.c
+++ b/source/blender/blenlib/intern/callbacks.c
@@ -20,6 +20,10 @@
* ***** END GPL LICENSE BLOCK *****
*/
+/** \file blender/blenlib/intern/callbacks.c
+ * \ingroup bli
+ */
+
#include "BLI_utildefines.h"
#include "BLI_listbase.h"
#include "BLI_callbacks.h"
diff --git a/source/blender/blenlib/intern/convexhull2d.c b/source/blender/blenlib/intern/convexhull2d.c
new file mode 100644
index 00000000000..5669a302bd8
--- /dev/null
+++ b/source/blender/blenlib/intern/convexhull2d.c
@@ -0,0 +1,338 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/blenlib/intern/convexhull2d.c
+ * \ingroup bli
+ */
+
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_convexhull2d.h"
+#include "BLI_math.h"
+#include "BLI_strict_flags.h"
+#include "BLI_utildefines.h"
+
+/* Copyright 2001, softSurfer (www.softsurfer.com)
+ * This code may be freely used and modified for any purpose
+ * providing that this copyright notice is included with it.
+ * SoftSurfer makes no warranty for this code, and cannot be held
+ * liable for any real or imagined damage resulting from its use.
+ * Users of this code must verify correctness for their application.
+ * http://softsurfer.com/Archive/algorithm_0203/algorithm_0203.htm
+ */
+
+/** \name Main Convex-Hull Calculation
+ * \{ */
+
+/**
+ * tests if a point is Left|On|Right of an infinite line.
+ * Input: three points P0, P1, and P2
+ * \returns > 0.0 for P2 left of the line through P0 and P1.
+ * = 0.0 for P2 on the line.
+ * < 0.0 for P2 right of the line.
+ */
+static float is_left(const float p0[2], const float p1[2], const float p2[2])
+{
+ return (p1[0] - p0[0]) * (p2[1] - p0[1]) - (p2[0] - p0[0]) * (p1[1] - p0[1]);
+}
+
+/**
+ * A.M. Andrew's monotone chain 2D convex hull algorithm
+ *
+ * \param points An array of 2D points presorted by increasing x and y-coords.
+ * \param n The number of points in points.
+ * \param r_points An array of the convex hull vertex indices (max is n).
+ * \returns the number of points in r_points.
+ */
+int BLI_convexhull_2d_sorted(const float (*points)[2], const int n, int r_points[])
+{
+ /* the output array r_points[] will be used as the stack */
+ int bot = 0;
+ int top = -1; /* indices for bottom and top of the stack */
+ int i; /* array scan index */
+ int minmin, minmax;
+ int maxmin, maxmax;
+ float xmax;
+
+ /* Get the indices of points with min x-coord and min|max y-coord */
+ float xmin = points[0][0];
+ for (i = 1; i < n; i++) {
+ if (points[i][0] != xmin) {
+ break;
+ }
+ }
+
+ minmin = 0;
+ minmax = i - 1;
+ if (minmax == n - 1) { /* degenerate case: all x-coords == xmin */
+ r_points[++top] = minmin;
+ if (points[minmax][1] != points[minmin][1]) /* a nontrivial segment */
+ r_points[++top] = minmax;
+ r_points[++top] = minmin; /* add polygon endpoint */
+ return top + 1;
+ }
+
+ /* Get the indices of points with max x-coord and min|max y-coord */
+
+ maxmax = n - 1;
+ xmax = points[n - 1][0];
+ for (i = n - 2; i >= 0; i--) {
+ if (points[i][0] != xmax) {
+ break;
+ }
+ }
+ maxmin = i + 1;
+
+ /* Compute the lower hull on the stack r_points */
+ r_points[++top] = minmin; /* push minmin point onto stack */
+ i = minmax;
+ while (++i <= maxmin) {
+ /* the lower line joins points[minmin] with points[maxmin] */
+ if (is_left(points[minmin], points[maxmin], points[i]) >= 0 && i < maxmin) {
+ continue; /* ignore points[i] above or on the lower line */
+ }
+
+ while (top > 0) { /* there are at least 2 points on the stack */
+ /* test if points[i] is left of the line at the stack top */
+ if (is_left(points[r_points[top - 1]], points[r_points[top]], points[i]) > 0.0f) {
+ break; /* points[i] is a new hull vertex */
+ }
+ else {
+ top--; /* pop top point off stack */
+ }
+ }
+
+ r_points[++top] = i; /* push points[i] onto stack */
+ }
+
+ /* Next, compute the upper hull on the stack r_points above the bottom hull */
+ if (maxmax != maxmin) { /* if distinct xmax points */
+ r_points[++top] = maxmax; /* push maxmax point onto stack */
+ }
+
+ bot = top; /* the bottom point of the upper hull stack */
+ i = maxmin;
+ while (--i >= minmax) {
+ /* the upper line joins points[maxmax] with points[minmax] */
+ if (is_left(points[maxmax], points[minmax], points[i]) >= 0 && i > minmax) {
+ continue; /* ignore points[i] below or on the upper line */
+ }
+
+ while (top > bot) { /* at least 2 points on the upper stack */
+ /* test if points[i] is left of the line at the stack top */
+ if (is_left(points[r_points[top - 1]], points[r_points[top]], points[i]) > 0.0f) {
+ break; /* points[i] is a new hull vertex */
+ }
+ else {
+ top--; /* pop top point off stack */
+ }
+ }
+
+ if (points[i][0] == points[r_points[0]][0] && points[i][1] == points[r_points[0]][1]) {
+ return top + 1; /* special case (mgomes) */
+ }
+
+ r_points[++top] = i; /* push points[i] onto stack */
+ }
+
+ if (minmax != minmin) {
+ r_points[++top] = minmin; /* push joining endpoint onto stack */
+ }
+
+ return top + 1;
+}
+
+struct PointRef {
+ const float *pt; /* 2d vector */
+};
+
+static int pointref_cmp_x(const void *a_, const void *b_)
+{
+ const struct PointRef *a = a_;
+ const struct PointRef *b = b_;
+ if (a->pt[0] > b->pt[0]) return 1;
+ else if (a->pt[0] < b->pt[0]) return -1;
+ else return 0;
+}
+
+static int pointref_cmp_y(const void *a_, const void *b_)
+{
+ const struct PointRef *a = a_;
+ const struct PointRef *b = b_;
+ if (a->pt[1] > b->pt[1]) return 1;
+ else if (a->pt[1] < b->pt[1]) return -1;
+ else return 0;
+}
+
+/**
+ * A.M. Andrew's monotone chain 2D convex hull algorithm
+ *
+ * \param points An array of 2D points.
+ * \param n The number of points in points.
+ * \param r_points An array of the convex hull vertex indices (max is n).
+ * \returns the number of points in r_points.
+ */
+int BLI_convexhull_2d(const float (*points)[2], const int n, int r_points[])
+{
+ struct PointRef *points_ref = MEM_mallocN(sizeof(*points_ref) * (size_t)n, __func__);
+ float (*points_sort)[2] = MEM_mallocN(sizeof(*points_sort) * (size_t)n, __func__);
+ int *points_map;
+ int tot, i;
+
+ for (i = 0; i < n; i++) {
+ points_ref[i].pt = points[i];
+ }
+
+ /* Sort the points by X, then by Y (required by the algorithm) */
+ qsort(points_ref, (size_t)n, sizeof(struct PointRef), pointref_cmp_x);
+ qsort(points_ref, (size_t)n, sizeof(struct PointRef), pointref_cmp_y);
+
+ for (i = 0; i < n; i++) {
+ memcpy(points_sort[i], points_ref[i].pt, sizeof(float[2]));
+ }
+
+ tot = BLI_convexhull_2d_sorted((const float (*)[2])points_sort, n, r_points);
+
+ /* map back to the original index values */
+ points_map = (int *)points_sort; /* abuse float array for temp storage */
+ for (i = 0; i < tot; i++) {
+ points_map[i] = (int)((const float(*)[2])points_ref[r_points[i]].pt - points);
+ }
+
+ memcpy(r_points, points_map, (size_t)tot * sizeof(*points_map));
+
+ MEM_freeN(points_ref);
+ MEM_freeN(points_sort);
+
+ return tot;
+}
+
+/** \} */
+
+
+/* -------------------------------------------------------------------- */
+/* Helper functions */
+
+/** \name Utility Convex-Hull Functions
+ * \{ */
+
+/**
+ * \return The best angle for fitting the convex hull to an axis aligned bounding box.
+ *
+ * Intended to be used with #BLI_convexhull_2d
+ *
+ * \param points Orded hull points
+ * (result of #BLI_convexhull_2d mapped to a contiguous array).
+ *
+ * \note we could return the index of the best edge too if its needed.
+ */
+float BLI_convexhull_aabb_fit_hull_2d(const float (*points_hull)[2], unsigned int n)
+{
+ unsigned int i, i_prev;
+ float area_best = FLT_MAX;
+ float angle_best = 0.0f;
+
+ i_prev = n - 1;
+ for (i = 0; i < n; i++) {
+ const float *ev_a = points_hull[i];
+ const float *ev_b = points_hull[i_prev];
+ float dvec[2];
+
+ sub_v2_v2v2(dvec, ev_a, ev_b);
+ if (normalize_v2(dvec) != 0.0f) {
+ float mat[2][2];
+ float min[2] = {FLT_MAX, FLT_MAX}, max[2] = {-FLT_MAX, -FLT_MAX};
+
+ unsigned int j;
+ const float angle = atan2f(dvec[0], dvec[1]);
+ float area;
+
+ angle_to_mat2(mat, angle);
+
+ for (j = 0; j < n; j++) {
+ float tvec[2];
+ mul_v2_m2v2(tvec, mat, points_hull[j]);
+
+ min[0] = min_ff(min[0], tvec[0]);
+ min[1] = min_ff(min[1], tvec[1]);
+
+ max[0] = max_ff(max[0], tvec[0]);
+ max[1] = max_ff(max[1], tvec[1]);
+
+ area = (max[0] - min[0]) * (max[1] - min[1]);
+ if (area > area_best) {
+ break;
+ }
+ }
+
+ if (area < area_best) {
+ area_best = area;
+ angle_best = angle;
+ }
+ }
+
+ i_prev = i;
+ }
+
+ return angle_best;
+}
+
+/**
+ * Wrap #BLI_convexhull_aabb_fit_hull_2d and do the convex hull calculation.
+ *
+ * \param points arbitrary 2d points.
+ */
+float BLI_convexhull_aabb_fit_points_2d(const float (*points)[2], unsigned int n)
+{
+ int *index_map;
+ int tot;
+
+ float angle;
+
+ index_map = MEM_mallocN(sizeof(*index_map) * n, __func__);
+
+ tot = BLI_convexhull_2d((const float (*)[2])points, (int)n, index_map);
+
+ if (tot) {
+ float (*points_hull)[2];
+ int j;
+
+ points_hull = MEM_mallocN(sizeof(*points_hull) * (size_t)tot, __func__);
+ for (j = 0; j < tot; j++) {
+ copy_v2_v2(points_hull[j], points[index_map[j]]);
+ }
+
+ angle = BLI_convexhull_aabb_fit_hull_2d((const float (*)[2])points_hull, (unsigned int)tot);
+ MEM_freeN(points_hull);
+ }
+ else {
+ angle = 0.0f;
+ }
+
+ MEM_freeN(index_map);
+
+ return angle;
+}
+
+/** \} */
diff --git a/source/blender/blenlib/intern/edgehash.c b/source/blender/blenlib/intern/edgehash.c
index a3360921ee4..b26e007b3e6 100644
--- a/source/blender/blenlib/intern/edgehash.c
+++ b/source/blender/blenlib/intern/edgehash.c
@@ -18,12 +18,13 @@
* Contributor(s): Daniel Dunbar, Joseph Eagar
*
* ***** END GPL LICENSE BLOCK *****
- * A general (pointer -> pointer) hash table ADT
*/
/** \file blender/blenlib/intern/edgehash.c
* \ingroup bli
*
+ * A general (pointer -> pointer) hash table ADT
+ *
* \note Based on 'BLI_ghash.c', make sure these stay in sync.
*/
@@ -37,14 +38,7 @@
#include "BLI_utildefines.h"
#include "BLI_edgehash.h"
#include "BLI_mempool.h"
-
-#ifdef __GNUC__
-# pragma GCC diagnostic error "-Wsign-conversion"
-# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 /* gcc4.6+ only */
-# pragma GCC diagnostic error "-Wsign-compare"
-# pragma GCC diagnostic error "-Wconversion"
-# endif
-#endif
+#include "BLI_strict_flags.h"
/**************inlined code************/
static const unsigned int _ehash_hashsizes[] = {
@@ -54,7 +48,15 @@ static const unsigned int _ehash_hashsizes[] = {
268435459
};
-#define EDGE_HASH(v0, v1) ((v0 * 39) ^ (v1 * 31))
+/* internal flag to ensure sets values aren't used */
+#ifndef NDEBUG
+# define EDGEHASH_FLAG_IS_SET (1 << 8)
+# define IS_EDGEHASH_ASSERT(eh) BLI_assert((eh->flag & EDGEHASH_FLAG_IS_SET) == 0)
+// # define IS_EDGESET_ASSERT(es) BLI_assert((es->flag & EDGEHASH_FLAG_IS_SET) != 0)
+#else
+# define IS_EDGEHASH_ASSERT(eh)
+// # define IS_EDGESET_ASSERT(es)
+#endif
/* ensure v0 is smaller */
#define EDGE_ORD(v0, v1) \
@@ -66,131 +68,340 @@ static const unsigned int _ehash_hashsizes[] = {
/***/
-typedef struct EdgeEntry EdgeEntry;
-struct EdgeEntry {
- EdgeEntry *next;
+typedef struct EdgeEntry {
+ struct EdgeEntry *next;
unsigned int v0, v1;
void *val;
-};
+} EdgeEntry;
struct EdgeHash {
EdgeEntry **buckets;
BLI_mempool *epool;
- unsigned int nbuckets, nentries, cursize;
+ unsigned int nbuckets, nentries;
+ unsigned int cursize, flag;
};
-/***/
-EdgeHash *BLI_edgehash_new(void)
+/* -------------------------------------------------------------------- */
+/* EdgeHash API */
+
+/** \name Internal Utility API
+ * \{ */
+
+/**
+ * Get the hash for a key.
+ */
+BLI_INLINE unsigned int edgehash_keyhash(EdgeHash *eh, unsigned int v0, unsigned int v1)
{
- EdgeHash *eh = MEM_callocN(sizeof(*eh), "EdgeHash");
- eh->cursize = 0;
- eh->nentries = 0;
- eh->nbuckets = _ehash_hashsizes[eh->cursize];
-
- eh->buckets = MEM_callocN(eh->nbuckets * sizeof(*eh->buckets), "eh buckets 2");
- eh->epool = BLI_mempool_create(sizeof(EdgeEntry), 512, 512, BLI_MEMPOOL_SYSMALLOC);
+ BLI_assert(v0 < v1);
- return eh;
+ return ((v0 * 39) ^ (v1 * 31)) % eh->nbuckets;
}
+/**
+ * Check if the number of items in the GHash is large enough to require more buckets.
+ */
+BLI_INLINE bool edgehash_test_expand_buckets(const unsigned int nentries, const unsigned int nbuckets)
+{
+ return (nentries > nbuckets * 3);
+}
-void BLI_edgehash_insert(EdgeHash *eh, unsigned int v0, unsigned int v1, void *val)
+/**
+ * Expand buckets to the next size up.
+ */
+BLI_INLINE void edgehash_resize_buckets(EdgeHash *eh, const unsigned int nbuckets)
+{
+ EdgeEntry **buckets_old = eh->buckets;
+ EdgeEntry **buckets_new;
+ const unsigned int nbuckets_old = eh->nbuckets;
+ unsigned int i;
+ EdgeEntry *e;
+
+ BLI_assert(eh->nbuckets != nbuckets);
+
+ eh->nbuckets = nbuckets;
+ buckets_new = MEM_callocN(eh->nbuckets * sizeof(*eh->buckets), "eh buckets");
+
+ for (i = 0; i < nbuckets_old; i++) {
+ EdgeEntry *e_next;
+ for (e = buckets_old[i]; e; e = e_next) {
+ const unsigned hash = edgehash_keyhash(eh, e->v0, e->v1);
+ e_next = e->next;
+ e->next = buckets_new[hash];
+ buckets_new[hash] = e;
+ }
+ }
+
+ eh->buckets = buckets_new;
+ MEM_freeN(buckets_old);
+}
+
+/**
+ * Increase initial bucket size to match a reserved ammount.
+ */
+BLI_INLINE void edgehash_buckets_reserve(EdgeHash *eh, const unsigned int nentries_reserve)
+{
+ while (edgehash_test_expand_buckets(nentries_reserve, eh->nbuckets)) {
+ eh->nbuckets = _ehash_hashsizes[++eh->cursize];
+ }
+}
+
+/**
+ * Internal lookup function.
+ * Takes a hash argument to avoid calling #ghash_keyhash multiple times.
+ */
+BLI_INLINE EdgeEntry *edgehash_lookup_entry_ex(EdgeHash *eh, unsigned int v0, unsigned int v1,
+ const unsigned int hash)
+{
+ EdgeEntry *e;
+ BLI_assert(v0 < v1);
+ for (e = eh->buckets[hash]; e; e = e->next) {
+ if (UNLIKELY(v0 == e->v0 && v1 == e->v1)) {
+ return e;
+ }
+ }
+ return NULL;
+}
+
+/**
+ * Internal lookup function. Only wraps #edgehash_lookup_entry_ex
+ */
+BLI_INLINE EdgeEntry *edgehash_lookup_entry(EdgeHash *eh, unsigned int v0, unsigned int v1)
{
unsigned int hash;
+ EDGE_ORD(v0, v1); /* ensure v0 is smaller */
+ hash = edgehash_keyhash(eh, v0, v1);
+ return edgehash_lookup_entry_ex(eh, v0, v1, hash);
+}
+
+
+static EdgeHash *edgehash_new(const char *info,
+ const unsigned int nentries_reserve,
+ const unsigned int entry_size)
+{
+ EdgeHash *eh = MEM_mallocN(sizeof(*eh), info);
+
+ eh->nbuckets = _ehash_hashsizes[0]; /* eh->cursize */
+ eh->nentries = 0;
+ eh->cursize = 0;
+ eh->flag = 0;
+
+ /* if we have reserved the number of elements that this hash will contain */
+ if (nentries_reserve) {
+ edgehash_buckets_reserve(eh, nentries_reserve);
+ }
+
+ eh->buckets = MEM_callocN(eh->nbuckets * sizeof(*eh->buckets), "eh buckets");
+ eh->epool = BLI_mempool_create(entry_size, 512, 512, BLI_MEMPOOL_SYSMALLOC);
+
+ return eh;
+}
+
+/**
+ * Internal insert function.
+ * Takes a hash argument to avoid calling #edgehash_keyhash multiple times.
+ */
+BLI_INLINE void edgehash_insert_ex(EdgeHash *eh, unsigned int v0, unsigned int v1, void *val,
+ unsigned int hash)
+{
EdgeEntry *e = BLI_mempool_alloc(eh->epool);
+ BLI_assert((eh->flag & EDGEHASH_FLAG_ALLOW_DUPES) || (BLI_edgehash_haskey(eh, v0, v1) == 0));
+ IS_EDGEHASH_ASSERT(eh);
+
/* this helps to track down errors with bad edge data */
+ BLI_assert(v0 < v1);
BLI_assert(v0 != v1);
- EDGE_ORD(v0, v1); /* ensure v0 is smaller */
+ e->next = eh->buckets[hash];
+ e->v0 = v0;
+ e->v1 = v1;
+ e->val = val;
+ eh->buckets[hash] = e;
- hash = EDGE_HASH(v0, v1) % eh->nbuckets;
+ if (UNLIKELY(edgehash_test_expand_buckets(++eh->nentries, eh->nbuckets))) {
+ edgehash_resize_buckets(eh, _ehash_hashsizes[++eh->cursize]);
+ }
+}
+
+/**
+ * Insert function that doesn't set the value (use for EdgeSet)
+ */
+BLI_INLINE void edgehash_insert_ex_keyonly(EdgeHash *eh, unsigned int v0, unsigned int v1,
+ unsigned int hash)
+{
+ EdgeEntry *e = BLI_mempool_alloc(eh->epool);
+
+ BLI_assert((eh->flag & EDGEHASH_FLAG_ALLOW_DUPES) || (BLI_edgehash_haskey(eh, v0, v1) == 0));
+
+ /* this helps to track down errors with bad edge data */
+ BLI_assert(v0 < v1);
+ BLI_assert(v0 != v1);
e->next = eh->buckets[hash];
e->v0 = v0;
e->v1 = v1;
- e->val = val;
+ /* intentionally leave value unset */
eh->buckets[hash] = e;
- if (UNLIKELY(++eh->nentries > eh->nbuckets / 2)) {
- EdgeEntry **old = eh->buckets;
- const unsigned int nold = eh->nbuckets;
- unsigned int i;
+ if (UNLIKELY(edgehash_test_expand_buckets(++eh->nentries, eh->nbuckets))) {
+ edgehash_resize_buckets(eh, _ehash_hashsizes[++eh->cursize]);
+ }
+}
- eh->nbuckets = _ehash_hashsizes[++eh->cursize];
- eh->buckets = MEM_callocN(eh->nbuckets * sizeof(*eh->buckets), "eh buckets");
-
- for (i = 0; i < nold; i++) {
- EdgeEntry *e_next;
- for (e = old[i]; e; e = e_next) {
- e_next = e->next;
- hash = EDGE_HASH(e->v0, e->v1) % eh->nbuckets;
- e->next = eh->buckets[hash];
- eh->buckets[hash] = e;
- }
- }
+BLI_INLINE void edgehash_insert(EdgeHash *eh, unsigned int v0, unsigned int v1, void *val)
+{
+ unsigned int hash;
+ EDGE_ORD(v0, v1); /* ensure v0 is smaller */
+ hash = edgehash_keyhash(eh, v0, v1);
+ edgehash_insert_ex(eh, v0, v1, val, hash);
+}
+
+/**
+ * Run free callbacks for freeing entries.
+ */
+static void edgehash_free_cb(EdgeHash *eh, EdgeHashFreeFP valfreefp)
+{
+ unsigned int i;
+
+ BLI_assert(valfreefp);
+
+ for (i = 0; i < eh->nbuckets; i++) {
+ EdgeEntry *e;
+
+ for (e = eh->buckets[i]; e; ) {
+ EdgeEntry *e_next = e->next;
- MEM_freeN(old);
+ if (valfreefp) valfreefp(e->val);
+
+ e = e_next;
+ }
}
}
-void **BLI_edgehash_lookup_p(EdgeHash *eh, unsigned int v0, unsigned int v1)
+/** \} */
+
+
+/** \name Public API
+ * \{ */
+
+/* Public API */
+
+EdgeHash *BLI_edgehash_new_ex(const char *info,
+ const unsigned int nentries_reserve)
+{
+ return edgehash_new(info,
+ nentries_reserve,
+ sizeof(EdgeEntry));
+}
+
+EdgeHash *BLI_edgehash_new(const char *info)
+{
+ return BLI_edgehash_new_ex(info, 0);
+}
+
+/**
+ * Insert edge (\a v0, \a v1) into hash with given value, does
+ * not check for duplicates.
+ */
+void BLI_edgehash_insert(EdgeHash *eh, unsigned int v0, unsigned int v1, void *val)
+{
+ edgehash_insert(eh, v0, v1, val);
+}
+
+/**
+ * Assign a new value to a key that may already be in edgehash.
+ */
+bool BLI_edgehash_reinsert(EdgeHash *eh, unsigned int v0, unsigned int v1, void *val)
{
unsigned int hash;
EdgeEntry *e;
+ IS_EDGEHASH_ASSERT(eh);
+
EDGE_ORD(v0, v1); /* ensure v0 is smaller */
+ hash = edgehash_keyhash(eh, v0, v1);
- hash = EDGE_HASH(v0, v1) % eh->nbuckets;
- for (e = eh->buckets[hash]; e; e = e->next)
- if (v0 == e->v0 && v1 == e->v1)
- return &e->val;
+ e = edgehash_lookup_entry_ex(eh, v0, v1, hash);
+ if (e) {
+ e->val = val;
+ return false;
+ }
+ else {
+ edgehash_insert_ex(eh, v0, v1, val, hash);
+ return true;
+ }
+}
- return NULL;
+/**
+ * Return pointer to value for given edge (\a v0, \a v1),
+ * or NULL if key does not exist in hash.
+ */
+void **BLI_edgehash_lookup_p(EdgeHash *eh, unsigned int v0, unsigned int v1)
+{
+ EdgeEntry *e = edgehash_lookup_entry(eh, v0, v1);
+ IS_EDGEHASH_ASSERT(eh);
+ return e ? &e->val : NULL;
}
+/**
+ * Return value for given edge (\a v0, \a v1), or NULL if
+ * if key does not exist in hash. (If need exists
+ * to differentiate between key-value being NULL and
+ * lack of key then see BLI_edgehash_lookup_p().
+ */
void *BLI_edgehash_lookup(EdgeHash *eh, unsigned int v0, unsigned int v1)
{
- void **value_p = BLI_edgehash_lookup_p(eh, v0, v1);
-
- return value_p ? *value_p : NULL;
+ EdgeEntry *e = edgehash_lookup_entry(eh, v0, v1);
+ IS_EDGEHASH_ASSERT(eh);
+ return e ? e->val : NULL;
}
+/**
+ * Return boolean true/false if edge (v0,v1) in hash.
+ */
bool BLI_edgehash_haskey(EdgeHash *eh, unsigned int v0, unsigned int v1)
{
- return BLI_edgehash_lookup_p(eh, v0, v1) != NULL;
+ return (edgehash_lookup_entry(eh, v0, v1) != NULL);
}
+/**
+ * Return number of keys in hash.
+ */
int BLI_edgehash_size(EdgeHash *eh)
{
return (int)eh->nentries;
}
-void BLI_edgehash_clear(EdgeHash *eh, EdgeHashFreeFP valfreefp)
+/**
+ * Remove all edges from hash.
+ */
+void BLI_edgehash_clear_ex(EdgeHash *eh, EdgeHashFreeFP valfreefp,
+ const unsigned int nentries_reserve)
{
- unsigned int i;
-
- for (i = 0; i < eh->nbuckets; i++) {
- EdgeEntry *e;
-
- for (e = eh->buckets[i]; e; ) {
- EdgeEntry *n = e->next;
-
- if (valfreefp) valfreefp(e->val);
- BLI_mempool_free(eh->epool, e);
-
- e = n;
- }
- eh->buckets[i] = NULL;
- }
+ if (valfreefp)
+ edgehash_free_cb(eh, valfreefp);
+ eh->nbuckets = _ehash_hashsizes[0]; /* eh->cursize */
eh->nentries = 0;
+ eh->cursize = 0;
+
+ if (nentries_reserve) {
+ edgehash_buckets_reserve(eh, nentries_reserve);
+ }
+
+ MEM_freeN(eh->buckets);
+ eh->buckets = MEM_callocN(eh->nbuckets * sizeof(*eh->buckets), "eh buckets");
+
+ BLI_mempool_clear_ex(eh->epool, nentries_reserve ? (int)nentries_reserve : -1);
}
void BLI_edgehash_free(EdgeHash *eh, EdgeHashFreeFP valfreefp)
{
- BLI_edgehash_clear(eh, valfreefp);
+ BLI_assert((int)eh->nentries == BLI_mempool_count(eh->epool));
+
+ if (valfreefp)
+ edgehash_free_cb(eh, valfreefp);
BLI_mempool_destroy(eh->epool);
@@ -199,7 +410,24 @@ void BLI_edgehash_free(EdgeHash *eh, EdgeHashFreeFP valfreefp)
}
-/***/
+void BLI_edgehash_flag_set(EdgeHash *eh, unsigned int flag)
+{
+ eh->flag |= flag;
+}
+
+void BLI_edgehash_flag_clear(EdgeHash *eh, unsigned int flag)
+{
+ eh->flag &= ~flag;
+}
+
+/** \} */
+
+
+/* -------------------------------------------------------------------- */
+/* EdgeHash Iterator API */
+
+/** \name Iterator API
+ * \{ */
struct EdgeHashIterator {
EdgeHash *eh;
@@ -207,6 +435,12 @@ struct EdgeHashIterator {
EdgeEntry *curEntry;
};
+
+/**
+ * Create a new EdgeHashIterator. The hash table must not be mutated
+ * while the iterator is in use, and the iterator will step exactly
+ * BLI_edgehash_size(gh) times before becoming done.
+ */
EdgeHashIterator *BLI_edgehashIterator_new(EdgeHash *eh)
{
EdgeHashIterator *ehi = MEM_mallocN(sizeof(*ehi), "eh iter");
@@ -221,11 +455,18 @@ EdgeHashIterator *BLI_edgehashIterator_new(EdgeHash *eh)
}
return ehi;
}
+
+/**
+ * Free an EdgeHashIterator.
+ */
void BLI_edgehashIterator_free(EdgeHashIterator *ehi)
{
MEM_freeN(ehi);
}
+/**
+ * Retrieve the key from an iterator.
+ */
void BLI_edgehashIterator_getKey(EdgeHashIterator *ehi, unsigned int *v0_r, unsigned int *v1_r)
{
if (ehi->curEntry) {
@@ -233,11 +474,26 @@ void BLI_edgehashIterator_getKey(EdgeHashIterator *ehi, unsigned int *v0_r, unsi
*v1_r = ehi->curEntry->v1;
}
}
+
+/**
+ * Retrieve the value from an iterator.
+ */
void *BLI_edgehashIterator_getValue(EdgeHashIterator *ehi)
{
return ehi->curEntry ? ehi->curEntry->val : NULL;
}
+/**
+ * Retrieve the pointer to the value from an iterator.
+ */
+void **BLI_edgehashIterator_getValue_p(EdgeHashIterator *ehi)
+{
+ return ehi->curEntry ? &ehi->curEntry->val : NULL;
+}
+
+/**
+ * Set the value for an iterator.
+ */
void BLI_edgehashIterator_setValue(EdgeHashIterator *ehi, void *val)
{
if (ehi->curEntry) {
@@ -245,6 +501,9 @@ void BLI_edgehashIterator_setValue(EdgeHashIterator *ehi, void *val)
}
}
+/**
+ * Steps the iterator to the next index.
+ */
void BLI_edgehashIterator_step(EdgeHashIterator *ehi)
{
if (ehi->curEntry) {
@@ -259,7 +518,88 @@ void BLI_edgehashIterator_step(EdgeHashIterator *ehi)
}
}
}
+
+/**
+ * Determine if an iterator is done.
+ */
bool BLI_edgehashIterator_isDone(EdgeHashIterator *ehi)
{
return (ehi->curEntry == NULL);
}
+
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/* EdgeSet API */
+
+/* Use edgehash API to give 'set' functionality */
+
+/** \name EdgeSet Functions
+ * \{ */
+EdgeSet *BLI_edgeset_new_ex(const char *info,
+ const unsigned int nentries_reserve)
+{
+ EdgeSet *es = (EdgeSet *)edgehash_new(info,
+ nentries_reserve,
+ sizeof(EdgeEntry) - sizeof(void *));
+#ifndef NDEBUG
+ ((EdgeHash *)es)->flag |= EDGEHASH_FLAG_IS_SET;
+#endif
+ return es;
+}
+
+EdgeSet *BLI_edgeset_new(const char *info)
+{
+ return BLI_edgeset_new_ex(info, 0);
+}
+
+int BLI_edgeset_size(EdgeSet *es)
+{
+ return (int)((EdgeHash *)es)->nentries;
+}
+
+/**
+ * Adds the key to the set (no checks for unique keys!).
+ * Matching #BLI_edgehash_insert
+ */
+void BLI_edgeset_insert(EdgeSet *es, unsigned int v0, unsigned int v1)
+{
+ unsigned int hash;
+ EDGE_ORD(v0, v1); /* ensure v0 is smaller */
+ hash = edgehash_keyhash((EdgeHash *)es, v0, v1);
+ edgehash_insert_ex_keyonly((EdgeHash *)es, v0, v1, hash);
+}
+
+/**
+ * Assign a new value to a key that may already be in edgehash.
+ */
+bool BLI_edgeset_reinsert(EdgeSet *es, unsigned int v0, unsigned int v1)
+{
+ unsigned int hash;
+ EdgeEntry *e;
+
+ EDGE_ORD(v0, v1); /* ensure v0 is smaller */
+ hash = edgehash_keyhash((EdgeHash *)es, v0, v1);
+
+ e = edgehash_lookup_entry_ex((EdgeHash *)es, v0, v1, hash);
+ if (e) {
+ return false;
+ }
+ else {
+ edgehash_insert_ex_keyonly((EdgeHash *)es, v0, v1, hash);
+ return true;
+ }
+}
+
+bool BLI_edgeset_haskey(EdgeSet *es, unsigned int v0, unsigned int v1)
+{
+ return (edgehash_lookup_entry((EdgeHash *)es, v0, v1) != NULL);
+}
+
+
+void BLI_edgeset_free(EdgeSet *es)
+{
+ BLI_edgehash_free((EdgeHash *)es, NULL);
+}
+
+/** \} */
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
index 4809ba59aaf..55726565f59 100644
--- a/source/blender/blenlib/intern/fileops.c
+++ b/source/blender/blenlib/intern/fileops.c
@@ -215,6 +215,11 @@ bool BLI_file_touch(const char *file)
#ifdef WIN32
+static void callLocalErrorCallBack(const char *err)
+{
+ printf("%s\n", err);
+}
+
static char str[MAXPATHLEN + 12];
FILE *BLI_fopen(const char *filename, const char *mode)
diff --git a/source/blender/blenlib/intern/gsqueue.c b/source/blender/blenlib/intern/gsqueue.c
index 7f158bc3efb..6967742f89b 100644
--- a/source/blender/blenlib/intern/gsqueue.c
+++ b/source/blender/blenlib/intern/gsqueue.c
@@ -35,6 +35,7 @@
#include "BLI_utildefines.h"
#include "BLI_gsqueue.h"
+#include "BLI_strict_flags.h"
typedef struct _GSQueueElem GSQueueElem;
struct _GSQueueElem {
@@ -93,7 +94,7 @@ int BLI_gsqueue_size(GSQueue *gq)
*/
void BLI_gsqueue_peek(GSQueue *gq, void *item_r)
{
- memcpy(item_r, &gq->head[1], gq->elem_size);
+ memcpy(item_r, &gq->head[1], (size_t)gq->elem_size);
}
/**
@@ -114,7 +115,7 @@ void BLI_gsqueue_pop(GSQueue *gq, void *item_r)
gq->head = gq->head->next;
}
- if (item_r) memcpy(item_r, &elem[1], gq->elem_size);
+ if (item_r) memcpy(item_r, &elem[1], (size_t)gq->elem_size);
MEM_freeN(elem);
}
@@ -130,11 +131,11 @@ void BLI_gsqueue_push(GSQueue *gq, void *item)
/* compare: prevent events added double in row */
if (!BLI_gsqueue_is_empty(gq)) {
- if (0 == memcmp(item, &gq->head[1], gq->elem_size))
+ if (0 == memcmp(item, &gq->head[1], (size_t)gq->elem_size))
return;
}
- elem = MEM_mallocN(sizeof(*elem) + gq->elem_size, "gqueue_push");
- memcpy(&elem[1], item, gq->elem_size);
+ elem = MEM_mallocN(sizeof(*elem) + (size_t)gq->elem_size, "gqueue_push");
+ memcpy(&elem[1], item, (size_t)gq->elem_size);
elem->next = NULL;
if (BLI_gsqueue_is_empty(gq)) {
@@ -154,8 +155,8 @@ void BLI_gsqueue_push(GSQueue *gq, void *item)
*/
void BLI_gsqueue_pushback(GSQueue *gq, void *item)
{
- GSQueueElem *elem = MEM_mallocN(sizeof(*elem) + gq->elem_size, "gqueue_push");
- memcpy(&elem[1], item, gq->elem_size);
+ GSQueueElem *elem = MEM_mallocN(sizeof(*elem) + (size_t)gq->elem_size, "gqueue_push");
+ memcpy(&elem[1], item, (size_t)gq->elem_size);
elem->next = gq->head;
if (BLI_gsqueue_is_empty(gq)) {
@@ -176,5 +177,3 @@ void BLI_gsqueue_free(GSQueue *gq)
}
MEM_freeN(gq);
}
-
-
diff --git a/source/blender/blenlib/intern/lasso.c b/source/blender/blenlib/intern/lasso.c
index aa08a780394..e89f7fd795b 100644
--- a/source/blender/blenlib/intern/lasso.c
+++ b/source/blender/blenlib/intern/lasso.c
@@ -34,12 +34,13 @@
#include "BLI_math.h"
#include "BLI_rect.h"
+#include "BLI_strict_flags.h"
#include "BLI_lasso.h" /* own include */
-void BLI_lasso_boundbox(rcti *rect, const int mcords[][2], const short moves)
+void BLI_lasso_boundbox(rcti *rect, const int mcords[][2], const unsigned int moves)
{
- short a;
+ unsigned int a;
rect->xmin = rect->xmax = mcords[0][0];
rect->ymin = rect->ymax = mcords[0][1];
@@ -53,28 +54,28 @@ void BLI_lasso_boundbox(rcti *rect, const int mcords[][2], const short moves)
}
-bool BLI_lasso_is_point_inside(const int mcords[][2], const short moves,
+bool BLI_lasso_is_point_inside(const int mcords[][2], const unsigned int moves,
const int sx, const int sy,
const int error_value)
{
- if (sx == error_value) {
+ if (sx == error_value || moves == 0) {
return false;
}
else {
int pt[2] = {sx, sy};
- return isect_point_poly_v2_int(pt, mcords, moves);
+ return isect_point_poly_v2_int(pt, mcords, moves, true);
}
}
/* edge version for lasso select. we assume boundbox check was done */
-bool BLI_lasso_is_edge_inside(const int mcords[][2], const short moves,
+bool BLI_lasso_is_edge_inside(const int mcords[][2], const unsigned int moves,
int x0, int y0, int x1, int y1,
const int error_value)
{
int v1[2], v2[2];
- int a;
+ unsigned int a;
- if (x0 == error_value || x1 == error_value) {
+ if (x0 == error_value || x1 == error_value || moves == 0) {
return false;
}
diff --git a/source/blender/blenlib/intern/listbase.c b/source/blender/blenlib/intern/listbase.c
index ded4f31ae05..2c59b940f8c 100644
--- a/source/blender/blenlib/intern/listbase.c
+++ b/source/blender/blenlib/intern/listbase.c
@@ -129,6 +129,30 @@ bool BLI_remlink_safe(ListBase *listbase, void *vlink)
}
}
+/**
+ * Removes the head from \a listbase and returns it.
+ */
+void *BLI_pophead(ListBase *listbase)
+{
+ Link *link;
+ if ((link = listbase->first)) {
+ BLI_remlink(listbase, link);
+ }
+ return link;
+}
+
+
+/**
+ * Removes the tail from \a listbase and returns it.
+ */
+void *BLI_poptail(ListBase *listbase)
+{
+ Link *link;
+ if ((link = listbase->last)) {
+ BLI_remlink(listbase, link);
+ }
+ return link;
+}
/**
* Removes \a vlink from listbase and disposes of it. Assumes it is linked into there!
@@ -557,19 +581,34 @@ void BLI_reverselist(ListBase *lb)
/**
* \param vlink Link to make first.
*/
-void BLI_rotatelist(ListBase *lb, void *vlink)
+void BLI_rotatelist_first(ListBase *lb, void *vlink)
{
/* make circular */
- ((LinkData *)lb->first)->prev = lb->last;
- ((LinkData *)lb->last)->next = lb->first;
+ ((Link *)lb->first)->prev = lb->last;
+ ((Link *)lb->last)->next = lb->first;
lb->first = vlink;
- lb->last = ((LinkData *)vlink)->prev;
+ lb->last = ((Link *)vlink)->prev;
- ((LinkData *)lb->first)->prev = NULL;
- ((LinkData *)lb->last)->next = NULL;
+ ((Link *)lb->first)->prev = NULL;
+ ((Link *)lb->last)->next = NULL;
}
+/**
+ * \param vlink Link to make last.
+ */
+void BLI_rotatelist_last(ListBase *lb, void *vlink)
+{
+ /* make circular */
+ ((Link *)lb->first)->prev = lb->last;
+ ((Link *)lb->last)->next = lb->first;
+
+ lb->first = ((Link *)vlink)->next;
+ lb->last = vlink;
+
+ ((Link *)lb->first)->prev = NULL;
+ ((Link *)lb->last)->next = NULL;
+}
/* create a generic list node containing link to provided data */
LinkData *BLI_genericNodeN(void *data)
diff --git a/source/blender/blenlib/intern/math_base_inline.c b/source/blender/blenlib/intern/math_base_inline.c
index 3ffd96f62c7..e6509db1c5e 100644
--- a/source/blender/blenlib/intern/math_base_inline.c
+++ b/source/blender/blenlib/intern/math_base_inline.c
@@ -131,8 +131,9 @@ MINLINE int power_of_2_max_i(int n)
if (is_power_of_2_i(n))
return n;
- while (!is_power_of_2_i(n))
+ do {
n = n & (n - 1);
+ } while (!is_power_of_2_i(n));
return n * 2;
}
@@ -152,6 +153,14 @@ MINLINE int divide_round_i(int a, int b)
return (2 * a + b) / (2 * b);
}
+/**
+ * modulo that handles negative numbers, works the same as Python's.
+ */
+MINLINE int mod_i(int i, int n)
+{
+ return (i % n + n) % n;
+}
+
MINLINE unsigned int highest_order_bit_i(unsigned int n)
{
n |= (n >> 1);
diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c
index 9b8fd0ad85b..0d15eede9ea 100644
--- a/source/blender/blenlib/intern/math_geom.c
+++ b/source/blender/blenlib/intern/math_geom.c
@@ -183,6 +183,28 @@ float area_poly_v2(int nr, float verts[][2])
return fabsf(0.5f * area);
}
+/********************************* Planes **********************************/
+
+/**
+ * Calculate a plane from a point and a direction,
+ * \note \a point_no isn't required to be normalized.
+ */
+void plane_from_point_normal_v3(float r_plane[4], const float plane_co[3], const float plane_no[3])
+{
+ copy_v3_v3(r_plane, plane_no);
+ r_plane[3] = -dot_v3v3(r_plane, plane_co);
+}
+
+/**
+ * Get a point and a normal from a plane.
+ */
+void plane_to_point_normal_v3(const float plane[4], float r_plane_co[3], float r_plane_no[3])
+{
+ const float length = normalize_v3_v3(r_plane_no, plane);
+ madd_v3_v3v3fl(r_plane_co, r_plane_no, r_plane_no, (-plane[3] / length) - 1.0f);
+}
+
+
/********************************* Volume **********************************/
/**
@@ -283,45 +305,39 @@ void closest_to_line_segment_v3(float close_r[3], const float v1[3], const float
copy_v3_v3(close_r, cp);
}
-/* find the closest point on a plane to another point and store it in close_r
- * close_r: return coordinate
- * plane_co: a point on the plane
- * plane_no_unit: the plane's normal, and d is the last number in the plane equation 0 = ax + by + cz + d
- * pt: the point that you want the nearest of
+/**
+ * Find the closest point on a plane.
+ *
+ * \param close_r Return coordinate
+ * \param plane The plane to test against.
+ * \param pt The point to find the nearest of
+ *
+ * \note non-unit-length planes are supported.
*/
-
-void closest_to_plane_v3(float close_r[3], const float plane_co[3], const float plane_no_unit[3], const float pt[3])
+void closest_to_plane_v3(float close_r[3], const float plane[4], const float pt[3])
{
- float temp[3];
- float dotprod;
-
- sub_v3_v3v3(temp, pt, plane_co);
- dotprod = dot_v3v3(temp, plane_no_unit);
-
- close_r[0] = pt[0] - (plane_no_unit[0] * dotprod);
- close_r[1] = pt[1] - (plane_no_unit[1] * dotprod);
- close_r[2] = pt[2] - (plane_no_unit[2] * dotprod);
+ const float length = len_squared_v3(plane);
+ const float side = plane_point_side_v3(plane, pt);
+ madd_v3_v3v3fl(close_r, pt, plane, -side / length);
}
-/* signed distance from the point to the plane in 3D */
-float dist_to_plane_normalized_v3(const float p[3], const float plane_co[3], const float plane_no_unit[3])
+float dist_squared_to_plane_v3(const float pt[3], const float plane[4])
{
- float plane_co_other[3];
-
- add_v3_v3v3(plane_co_other, plane_co, plane_no_unit);
-
- return line_point_factor_v3(p, plane_co, plane_co_other);
+ const float length = len_squared_v3(plane);
+ const float side = plane_point_side_v3(plane, pt);
+ const float fac = side / length;
+ return copysign(length * (fac * fac), side);
}
-float dist_to_plane_v3(const float p[3], const float plane_co[3], const float plane_no[3])
+/**
+ * Return the signed distance from the point to the plane.
+ */
+float dist_to_plane_v3(const float pt[3], const float plane[4])
{
- float plane_no_unit[3];
- float plane_co_other[3];
-
- normalize_v3_v3(plane_no_unit, plane_no);
- add_v3_v3v3(plane_co_other, plane_co, plane_no_unit);
-
- return line_point_factor_v3(p, plane_co, plane_co_other);
+ const float length = len_squared_v3(plane);
+ const float side = plane_point_side_v3(plane, pt);
+ const float fac = side / length;
+ return sqrtf(length) * fac;
}
/* distance v1 to line-piece l1-l2 in 3D */
@@ -696,16 +712,16 @@ int isect_line_sphere_v2(const float l1[2], const float l2[2],
}
/* point in polygon (keep float and int versions in sync) */
-bool isect_point_poly_v2(const float pt[2], const float verts[][2], const int nr)
+bool isect_point_poly_v2(const float pt[2], const float verts[][2], const unsigned int nr,
+ const bool use_holes)
{
/* we do the angle rule, define that all added angles should be about zero or (2 * PI) */
float angletot = 0.0;
float fp1[2], fp2[2];
- int i;
+ unsigned int i;
const float *p1, *p2;
p1 = verts[nr - 1];
- p2 = verts[0];
/* first vector */
fp1[0] = (float)(p1[0] - pt[0]);
@@ -714,6 +730,8 @@ bool isect_point_poly_v2(const float pt[2], const float verts[][2], const int nr
for (i = 0; i < nr; i++) {
float dot, ang, cross;
+ p2 = verts[i];
+
/* second vector */
fp2[0] = (float)(p2[0] - pt[0]);
fp2[1] = (float)(p2[1] - pt[1]);
@@ -730,21 +748,28 @@ bool isect_point_poly_v2(const float pt[2], const float verts[][2], const int nr
/* circulate */
copy_v2_v2(fp1, fp2);
p1 = p2;
- p2 = verts[i + 1];
}
- return (fabsf(angletot) > 4.0f);
+ angletot = fabsf(angletot);
+ if (use_holes) {
+ const int nested = floorf((angletot / (float)(M_PI * 2.0)) + 0.00001f);
+ angletot -= nested * (float)(M_PI * 2.0);
+ return (angletot > 4.0f) != (nested % 2);
+ }
+ else {
+ return (angletot > 4.0f);
+ }
}
-bool isect_point_poly_v2_int(const int pt[2], const int verts[][2], const int nr)
+bool isect_point_poly_v2_int(const int pt[2], const int verts[][2], const unsigned int nr,
+ const bool use_holes)
{
/* we do the angle rule, define that all added angles should be about zero or (2 * PI) */
float angletot = 0.0;
float fp1[2], fp2[2];
- int i;
+ unsigned int i;
const int *p1, *p2;
p1 = verts[nr - 1];
- p2 = verts[0];
/* first vector */
fp1[0] = (float)(p1[0] - pt[0]);
@@ -753,6 +778,8 @@ bool isect_point_poly_v2_int(const int pt[2], const int verts[][2], const int nr
for (i = 0; i < nr; i++) {
float dot, ang, cross;
+ p2 = verts[i];
+
/* second vector */
fp2[0] = (float)(p2[0] - pt[0]);
fp2[1] = (float)(p2[1] - pt[1]);
@@ -769,10 +796,17 @@ bool isect_point_poly_v2_int(const int pt[2], const int verts[][2], const int nr
/* circulate */
copy_v2_v2(fp1, fp2);
p1 = p2;
- p2 = verts[i + 1];
}
- return (fabsf(angletot) > 4.0f);
+ angletot = fabsf(angletot);
+ if (use_holes) {
+ const int nested = floorf((angletot / (float)(M_PI * 2.0)) + 0.00001f);
+ angletot -= nested * (float)(M_PI * 2.0);
+ return (angletot > 4.0f) != (nested % 2);
+ }
+ else {
+ return (angletot > 4.0f);
+ }
}
/* point in tri */
@@ -878,6 +912,45 @@ bool isect_line_tri_v3(const float p1[3], const float p2[3],
return 1;
}
+/* like isect_line_tri_v3, but allows epsilon tolerance around triangle */
+bool isect_line_tri_epsilon_v3(const float p1[3], const float p2[3],
+ const float v0[3], const float v1[3], const float v2[3],
+ float *r_lambda, float r_uv[2], const float epsilon)
+{
+
+ float p[3], s[3], d[3], e1[3], e2[3], q[3];
+ float a, f, u, v;
+
+ sub_v3_v3v3(e1, v1, v0);
+ sub_v3_v3v3(e2, v2, v0);
+ sub_v3_v3v3(d, p2, p1);
+
+ cross_v3_v3v3(p, d, e2);
+ a = dot_v3v3(e1, p);
+ if ((a > -0.000001f) && (a < 0.000001f)) return 0;
+ f = 1.0f / a;
+
+ sub_v3_v3v3(s, p1, v0);
+
+ u = f * dot_v3v3(s, p);
+ if ((u < -epsilon) || (u > 1.0f + epsilon)) return 0;
+
+ cross_v3_v3v3(q, s, e1);
+
+ v = f * dot_v3v3(d, q);
+ if ((v < -epsilon) || ((u + v) > 1.0f + epsilon)) return 0;
+
+ *r_lambda = f * dot_v3v3(e2, q);
+ if ((*r_lambda < 0.0f) || (*r_lambda > 1.0f)) return 0;
+
+ if (r_uv) {
+ r_uv[0] = u;
+ r_uv[1] = v;
+ }
+
+ return 1;
+}
+
/* moved from effect.c
* test if the ray starting at p1 going in d direction intersects the triangle v0..v2
* return non zero if it does
@@ -1043,57 +1116,51 @@ bool isect_ray_tri_threshold_v3(const float p1[3], const float d[3],
}
/**
- * Intersect line/plane, optionally treat line as directional (like a ray) with the no_flip argument.
+ * Check if a point is behind all planes.
+ */
+bool isect_point_planes_v3(float (*planes)[4], int totplane, const float p[3])
+{
+ int i;
+
+ for (i = 0; i < totplane; i++) {
+ if (plane_point_side_v3(planes[i], p) > 0.0f) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+/**
+ * Intersect line/plane.
*
* \param out The intersection point.
* \param l1 The first point of the line.
* \param l2 The second point of the line.
* \param plane_co A point on the plane to intersect with.
* \param plane_no The direction of the plane (does not need to be normalized).
- * \param no_flip When true, the intersection point will always be from l1 to l2, even if this is not on the plane.
+ *
+ * \note #line_plane_factor_v3() shares logic.
*/
bool isect_line_plane_v3(float out[3],
const float l1[3], const float l2[3],
- const float plane_co[3], const float plane_no[3], const bool no_flip)
+ const float plane_co[3], const float plane_no[3])
{
- float l_vec[3]; /* l1 -> l2 normalized vector */
- float p_no[3]; /* 'plane_no' normalized */
+ float u[3], h[3];
float dot;
- sub_v3_v3v3(l_vec, l2, l1);
-
- normalize_v3(l_vec);
- normalize_v3_v3(p_no, plane_no);
+ sub_v3_v3v3(u, l2, l1);
+ sub_v3_v3v3(h, l1, plane_co);
+ dot = dot_v3v3(plane_no, u);
- dot = dot_v3v3(l_vec, p_no);
- if (dot == 0.0f) {
- return 0;
+ if (fabsf(dot) > FLT_EPSILON) {
+ float lambda = -dot_v3v3(plane_no, h) / dot;
+ madd_v3_v3v3fl(out, l1, u, lambda);
+ return true;
}
else {
- float l1_plane[3]; /* line point aligned with the plane */
- float dist; /* 'plane_no' aligned distance to the 'plane_co' */
-
- /* for predictable flipping since the plane is only used to
- * define a direction, ignore its flipping and aligned with 'l_vec' */
- if (dot < 0.0f) {
- dot = -dot;
- negate_v3(p_no);
- }
-
- add_v3_v3v3(l1_plane, l1, p_no);
-
- dist = line_point_factor_v3(plane_co, l1, l1_plane);
-
- /* treat line like a ray, when 'no_flip' is set */
- if (no_flip && dist < 0.0f) {
- dist = -dist;
- }
-
- mul_v3_fl(l_vec, dist / dot);
-
- add_v3_v3v3(out, l1, l_vec);
-
- return 1;
+ /* The segment is parallel to plane */
+ return false;
}
}
@@ -1119,7 +1186,7 @@ void isect_plane_plane_v3(float r_isect_co[3], float r_isect_no[3],
cross_v3_v3v3(r_isect_no, plane_a_no, plane_b_no); /* direction is simply the cross product */
cross_v3_v3v3(plane_a_co_other, plane_a_no, r_isect_no);
add_v3_v3(plane_a_co_other, plane_a_co);
- isect_line_plane_v3(r_isect_co, plane_a_co, plane_a_co_other, plane_b_co, plane_b_no, FALSE);
+ isect_line_plane_v3(r_isect_co, plane_a_co, plane_a_co_other, plane_b_co, plane_b_no);
}
@@ -1561,7 +1628,7 @@ bool isect_ray_aabb(const IsectRayAABBData *data, const float bb_min[3],
tymax = (bbox[1 - data->sign[1]][1] - data->ray_start[1]) * data->ray_inv_dir[1];
if ((tmin > tymax) || (tymin > tmax))
- return FALSE;
+ return false;
if (tymin > tmin)
tmin = tymin;
@@ -1573,7 +1640,7 @@ bool isect_ray_aabb(const IsectRayAABBData *data, const float bb_min[3],
tzmax = (bbox[1 - data->sign[2]][2] - data->ray_start[2]) * data->ray_inv_dir[2];
if ((tmin > tzmax) || (tzmin > tmax))
- return FALSE;
+ return false;
if (tzmin > tmin)
tmin = tzmin;
@@ -1585,7 +1652,7 @@ bool isect_ray_aabb(const IsectRayAABBData *data, const float bb_min[3],
if (tmin_out)
(*tmin_out) = tmin;
- return TRUE;
+ return true;
}
/* find closest point to p on line through (l1, l2) and return lambda,
@@ -1645,6 +1712,20 @@ float line_point_factor_v2(const float p[2], const float l1[2], const float l2[2
#endif
}
+/**
+ * \note #isect_line_plane_v3() shares logic
+ */
+float line_plane_factor_v3(const float plane_co[3], const float plane_no[3],
+ const float l1[3], const float l2[3])
+{
+ float u[3], h[3];
+ float dot;
+ sub_v3_v3v3(u, l2, l1);
+ sub_v3_v3v3(h, l1, plane_co);
+ dot = dot_v3v3(plane_no, u);
+ return (dot != 0.0f) ? -dot_v3v3(plane_no, h) / dot : 0.0f;
+}
+
/* ensure the distance between these points is no greater then 'dist'
* if it is, scale then both into the center */
void limit_dist_v3(float v1[3], float v2[3], const float dist)
@@ -1757,7 +1838,7 @@ bool clip_segment_v3_plane(float p1[3], float p2[3], const float plane[4])
if (div == 0.0f) /* parallel */
return 1;
- t = -(dot_v3v3(p1, plane) + plane[3]) / div;
+ t = -plane_point_side_v3(plane, p1) / div;
if (div > 0.0f) {
/* behind plane, completely clipped */
@@ -1811,7 +1892,7 @@ bool clip_segment_v3_plane_n(float r_p1[3], float r_p2[3], float plane_array[][4
const float div = dot_v3v3(dp, plane);
if (div != 0.0f) {
- const float t = -(dot_v3v3(p1, plane) + plane[3]) / div;
+ const float t = -plane_point_side_v3(plane, p1) / div;
if (div > 0.0f) {
/* clip a */
if (t >= 1.0f) {
@@ -1916,6 +1997,59 @@ void plot_line_v2v2i(const int p1[2], const int p2[2], bool (*callback)(int, int
}
}
+void fill_poly_v2i_n(
+ const int xmin, const int ymin, const int xmax, const int ymax,
+ const int verts[][2], const int nr,
+ void (*callback)(int, int, void *), void *userData)
+{
+ /* originally by Darel Rex Finley, 2007 */
+
+ int nodes, pixel_y, i, j, swap;
+ int *node_x = MEM_mallocN(sizeof(*node_x) * (nr + 1), __func__);
+
+ /* Loop through the rows of the image. */
+ for (pixel_y = ymin; pixel_y < ymax; pixel_y++) {
+
+ /* Build a list of nodes. */
+ nodes = 0; j = nr - 1;
+ for (i = 0; i < nr; i++) {
+ if ((verts[i][1] < pixel_y && verts[j][1] >= pixel_y) ||
+ (verts[j][1] < pixel_y && verts[i][1] >= pixel_y))
+ {
+ node_x[nodes++] = (int)(verts[i][0] +
+ ((double)(pixel_y - verts[i][1]) / (verts[j][1] - verts[i][1])) *
+ (verts[j][0] - verts[i][0]));
+ }
+ j = i;
+ }
+
+ /* Sort the nodes, via a simple "Bubble" sort. */
+ i = 0;
+ while (i < nodes - 1) {
+ if (node_x[i] > node_x[i + 1]) {
+ SWAP_TVAL(swap, node_x[i], node_x[i + 1]);
+ if (i) i--;
+ }
+ else {
+ i++;
+ }
+ }
+
+ /* Fill the pixels between node pairs. */
+ for (i = 0; i < nodes; i += 2) {
+ if (node_x[i] >= xmax) break;
+ if (node_x[i + 1] > xmin) {
+ if (node_x[i ] < xmin) node_x[i ] = xmin;
+ if (node_x[i + 1] > xmax) node_x[i + 1] = xmax;
+ for (j = node_x[i]; j < node_x[i + 1]; j++) {
+ callback(j - xmin, pixel_y - ymin, userData);
+ }
+ }
+ }
+ }
+ MEM_freeN(node_x);
+}
+
/****************************** Axis Utils ********************************/
/**
@@ -2137,8 +2271,6 @@ void barycentric_weights_v2_quad(const float v1[2], const float v2[2], const flo
((_area = cross_v2v2(dirs[i1], dirs[i2])) != 0.0f ? \
fabsf(((lens[i1] * lens[i2]) - dot_v2v2(dirs[i1], dirs[i2])) / _area) : 0.0f)
- float wtot, area;
-
const float dirs[4][2] = {
{v1[0] - co[0], v1[1] - co[1]},
{v2[0] - co[0], v2[1] - co[1]},
@@ -2153,20 +2285,29 @@ void barycentric_weights_v2_quad(const float v1[2], const float v2[2], const flo
len_v2(dirs[3]),
};
- /* variable 'area' is just for storage,
- * the order its initialized doesn't matter */
+ /* avoid divide by zero */
+ if (UNLIKELY(lens[0] < FLT_EPSILON)) { w[0] = 1.0f; w[1] = w[2] = w[3] = 0.0f; }
+ else if (UNLIKELY(lens[1] < FLT_EPSILON)) { w[1] = 1.0f; w[0] = w[2] = w[3] = 0.0f; }
+ else if (UNLIKELY(lens[2] < FLT_EPSILON)) { w[2] = 1.0f; w[0] = w[1] = w[3] = 0.0f; }
+ else if (UNLIKELY(lens[3] < FLT_EPSILON)) { w[3] = 1.0f; w[0] = w[1] = w[2] = 0.0f;
+ }
+ else {
+ float wtot, area;
+
+ /* variable 'area' is just for storage,
+ * the order its initialized doesn't matter */
#ifdef __clang__
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wunsequenced"
#endif
- /* inline mean_value_half_tan four times here */
- float t[4] = {
- MEAN_VALUE_HALF_TAN_V2(area, 0, 1),
- MEAN_VALUE_HALF_TAN_V2(area, 1, 2),
- MEAN_VALUE_HALF_TAN_V2(area, 2, 3),
- MEAN_VALUE_HALF_TAN_V2(area, 3, 0),
- };
+ /* inline mean_value_half_tan four times here */
+ float t[4] = {
+ MEAN_VALUE_HALF_TAN_V2(area, 0, 1),
+ MEAN_VALUE_HALF_TAN_V2(area, 1, 2),
+ MEAN_VALUE_HALF_TAN_V2(area, 2, 3),
+ MEAN_VALUE_HALF_TAN_V2(area, 3, 0),
+ };
#ifdef __clang__
# pragma clang diagnostic pop
@@ -2174,18 +2315,19 @@ void barycentric_weights_v2_quad(const float v1[2], const float v2[2], const flo
#undef MEAN_VALUE_HALF_TAN_V2
- w[0] = (t[3] + t[0]) / lens[0];
- w[1] = (t[0] + t[1]) / lens[1];
- w[2] = (t[1] + t[2]) / lens[2];
- w[3] = (t[2] + t[3]) / lens[3];
+ w[0] = (t[3] + t[0]) / lens[0];
+ w[1] = (t[0] + t[1]) / lens[1];
+ w[2] = (t[1] + t[2]) / lens[2];
+ w[3] = (t[2] + t[3]) / lens[3];
- wtot = w[0] + w[1] + w[2] + w[3];
+ wtot = w[0] + w[1] + w[2] + w[3];
- if (wtot != 0.0f) {
- mul_v4_fl(w, 1.0f / wtot);
- }
- else { /* dummy values for zero area face */
- copy_v4_fl(w, 1.0f / 4.0f);
+ if (wtot != 0.0f) {
+ mul_v4_fl(w, 1.0f / wtot);
+ }
+ else { /* dummy values for zero area face */
+ copy_v4_fl(w, 1.0f / 4.0f);
+ }
}
}
@@ -2323,17 +2465,16 @@ int interp_sparse_array(float *array, int const list_size, const float skipval)
* more than 3 vertices */
static float mean_value_half_tan_v3(const float v1[3], const float v2[3], const float v3[3])
{
- float d2[3], d3[3], cross[3], area, dot, len;
+ float d2[3], d3[3], cross[3], area;
sub_v3_v3v3(d2, v2, v1);
sub_v3_v3v3(d3, v3, v1);
cross_v3_v3v3(cross, d2, d3);
area = len_v3(cross);
- dot = dot_v3v3(d2, d3);
- len = len_v3(d2) * len_v3(d3);
-
if (LIKELY(area != 0.0f)) {
+ const float dot = dot_v3v3(d2, d3);
+ const float len = len_v3(d2) * len_v3(d3);
return (len - dot) / area;
}
else {
@@ -2342,18 +2483,16 @@ static float mean_value_half_tan_v3(const float v1[3], const float v2[3], const
}
static float mean_value_half_tan_v2(const float v1[2], const float v2[2], const float v3[2])
{
- float d2[2], d3[2], area, dot, len;
+ float d2[2], d3[2], area;
sub_v2_v2v2(d2, v2, v1);
sub_v2_v2v2(d3, v3, v1);
/* different from the 3d version but still correct */
area = cross_v2v2(d2, d3);
-
- dot = dot_v2v2(d2, d3);
- len = len_v2(d2) * len_v2(d3);
-
if (LIKELY(area != 0.0f)) {
+ const float dot = dot_v2v2(d2, d3);
+ const float len = len_v2(d2) * len_v2(d3);
return (len - dot) / area;
}
else {
@@ -3616,4 +3755,3 @@ int is_quad_convex_v2(const float v1[2], const float v2[2], const float v3[2], c
/* linetests, the 2 diagonals have to instersect to be convex */
return (isect_line_line_v2(v1, v3, v2, v4) > 0);
}
-
diff --git a/source/blender/blenlib/intern/math_geom_inline.c b/source/blender/blenlib/intern/math_geom_inline.c
index f32b477787b..ac5c0033067 100644
--- a/source/blender/blenlib/intern/math_geom_inline.c
+++ b/source/blender/blenlib/intern/math_geom_inline.c
@@ -185,4 +185,9 @@ MINLINE int poly_to_tri_count(const int poly_count, const int corner_count)
}
}
+MINLINE float plane_point_side_v3(const float plane[4], const float co[3])
+{
+ return dot_v3v3(co, plane) + plane[3];
+}
+
#endif /* __MATH_GEOM_INLINE_C__ */
diff --git a/source/blender/blenlib/intern/math_interp.c b/source/blender/blenlib/intern/math_interp.c
index 81d931cfba6..d1acd45e40e 100644
--- a/source/blender/blenlib/intern/math_interp.c
+++ b/source/blender/blenlib/intern/math_interp.c
@@ -26,6 +26,10 @@
*
*/
+/** \file blender/blenlib/intern/math_interp.c
+ * \ingroup bli
+ */
+
#include <math.h>
#include "BLI_math.h"
diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c
index 611b3298c38..1f52caac8e9 100644
--- a/source/blender/blenlib/intern/math_matrix.c
+++ b/source/blender/blenlib/intern/math_matrix.c
@@ -112,6 +112,22 @@ void copy_m4_m3(float m1[4][4], float m2[3][3]) /* no clear */
}
+void copy_m3_m3d(float R[3][3], double A[3][3])
+{
+ /* Keep it stupid simple for better data flow in CPU. */
+ R[0][0] = A[0][0];
+ R[0][1] = A[0][1];
+ R[0][2] = A[0][2];
+
+ R[1][0] = A[1][0];
+ R[1][1] = A[1][1];
+ R[1][2] = A[1][2];
+
+ R[2][0] = A[2][0];
+ R[2][1] = A[2][1];
+ R[2][2] = A[2][2];
+}
+
void swap_m3m3(float m1[3][3], float m2[3][3])
{
float t;
@@ -322,6 +338,24 @@ void mul_serie_m4(float answ[4][4], float m1[4][4],
}
}
+void mul_v2_m3v2(float r[2], float m[3][3], float v[2])
+{
+ float temp[3], warped[3];
+
+ copy_v2_v2(temp, v);
+ temp[2] = 1.0f;
+
+ mul_v3_m3v3(warped, m, temp);
+
+ r[0] = warped[0] / warped[2];
+ r[1] = warped[1] / warped[2];
+}
+
+void mul_m3_v2(float m[3][3], float r[2])
+{
+ mul_v2_m3v2(r, m, r);
+}
+
void mul_m4_v3(float mat[4][4], float vec[3])
{
float x, y;
@@ -2052,3 +2086,9 @@ void pseudoinverse_m3_m3(float Ainv[3][3], float A[3][3], float epsilon)
}
}
+bool has_zero_axis_m4(float matrix[4][4])
+{
+ return len_squared_v3(matrix[0]) < FLT_EPSILON ||
+ len_squared_v3(matrix[1]) < FLT_EPSILON ||
+ len_squared_v3(matrix[2]) < FLT_EPSILON;
+}
diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c
index 9fd8c479d6e..41535cf32b6 100644
--- a/source/blender/blenlib/intern/math_rotation.c
+++ b/source/blender/blenlib/intern/math_rotation.c
@@ -62,7 +62,7 @@ void copy_qt_qt(float q1[4], const float q2[4])
q1[3] = q2[3];
}
-int is_zero_qt(float *q)
+bool is_zero_qt(const float q[4])
{
return (q[0] == 0 && q[1] == 0 && q[2] == 0 && q[3] == 0);
}
@@ -286,7 +286,7 @@ void mat3_to_quat(float q[4], float wmat[3][3])
tr = 0.25 * (double)(1.0f + mat[0][0] + mat[1][1] + mat[2][2]);
- if (tr > (double)FLT_EPSILON) {
+ if (tr > (double)1e-4f) {
s = sqrt(tr);
q[0] = (float)s;
s = 1.0 / (4.0 * s);
@@ -300,7 +300,7 @@ void mat3_to_quat(float q[4], float wmat[3][3])
q[1] = (float)(0.25 * s);
s = 1.0 / s;
- q[0] = (float)((double)(mat[2][1] - mat[1][2]) * s);
+ q[0] = (float)((double)(mat[1][2] - mat[2][1]) * s);
q[2] = (float)((double)(mat[1][0] + mat[0][1]) * s);
q[3] = (float)((double)(mat[2][0] + mat[0][2]) * s);
}
@@ -318,7 +318,7 @@ void mat3_to_quat(float q[4], float wmat[3][3])
q[3] = (float)(0.25 * s);
s = 1.0 / s;
- q[0] = (float)((double)(mat[1][0] - mat[0][1]) * s);
+ q[0] = (float)((double)(mat[0][1] - mat[1][0]) * s);
q[1] = (float)((double)(mat[2][0] + mat[0][2]) * s);
q[2] = (float)((double)(mat[2][1] + mat[1][2]) * s);
}
@@ -817,7 +817,8 @@ void mat4_to_axis_angle(float axis[3], float *angle, float mat[4][4])
quat_to_axis_angle(axis, angle, q);
}
-void single_axis_angle_to_mat3(float mat[3][3], const char axis, const float angle)
+/* rotation matrix from a single axis */
+void axis_angle_to_mat3_single(float mat[3][3], const char axis, const float angle)
{
const float angle_cos = cosf(angle);
const float angle_sin = sinf(angle);
@@ -862,6 +863,18 @@ void single_axis_angle_to_mat3(float mat[3][3], const char axis, const float ang
}
}
+void angle_to_mat2(float mat[2][2], const float angle)
+{
+ const float angle_cos = cosf(angle);
+ const float angle_sin = sinf(angle);
+
+ /* 2D rotation matrix */
+ mat[0][0] = angle_cos;
+ mat[0][1] = angle_sin;
+ mat[1][0] = -angle_sin;
+ mat[1][1] = angle_cos;
+}
+
/******************************** XYZ Eulers *********************************/
/* XYZ order */
@@ -993,7 +1006,7 @@ void quat_to_eul(float *eul, const float quat[4])
}
/* XYZ order */
-void eul_to_quat(float *quat, const float eul[3])
+void eul_to_quat(float quat[4], const float eul[3])
{
float ti, tj, th, ci, cj, ch, si, sj, sh, cc, cs, sc, ss;
@@ -1018,7 +1031,7 @@ void eul_to_quat(float *quat, const float eul[3])
}
/* XYZ order */
-void rotate_eul(float *beul, const char axis, const float ang)
+void rotate_eul(float beul[3], const char axis, const float ang)
{
float eul[3], mat1[3][3], mat2[3][3], totmat[3][3];
@@ -1229,7 +1242,7 @@ void eulO_to_mat3(float M[3][3], const float e[3], const short order)
}
/* returns two euler calculation methods, so we can pick the best */
-static void mat3_to_eulo2(float M[3][3], float *e1, float *e2, const short order)
+static void mat3_to_eulo2(float M[3][3], float e1[3], float e2[3], const short order)
{
const RotOrderInfo *R = GET_ROTATIONORDER_INFO(order);
short i = R->axis[0], j = R->axis[1], k = R->axis[2];
@@ -1478,9 +1491,10 @@ void mat4_to_dquat(DualQuat *dq, float basemat[4][4], float mat[4][4])
dq->trans[3] = 0.5f * ( t[0] * q[2] - t[1] * q[1] + t[2] * q[0]);
}
-void dquat_to_mat4(float mat[4][4], DualQuat *dq)
+void dquat_to_mat4(float mat[4][4], const DualQuat *dq)
{
- float len, *t, q0[4];
+ float len, q0[4];
+ const float *t;
/* regular quaternion */
copy_qt_qt(q0, dq->quat);
@@ -1502,7 +1516,7 @@ void dquat_to_mat4(float mat[4][4], DualQuat *dq)
/* note: this does not handle scaling */
}
-void add_weighted_dq_dq(DualQuat *dqsum, DualQuat *dq, float weight)
+void add_weighted_dq_dq(DualQuat *dqsum, const DualQuat *dq, float weight)
{
int flipped = 0;
@@ -1530,7 +1544,7 @@ void add_weighted_dq_dq(DualQuat *dqsum, DualQuat *dq, float weight)
if (flipped) /* we don't want negative weights for scaling */
weight = -weight;
- copy_m4_m4(wmat, dq->scale);
+ copy_m4_m4(wmat, (float(*)[4])dq->scale);
mul_m4_fl(wmat, weight);
add_m4_m4m4(dqsum->scale, dqsum->scale, wmat);
dqsum->scale_weight += weight;
@@ -1609,7 +1623,7 @@ void mul_v3m3_dq(float co[3], float mat[3][3], DualQuat *dq)
}
}
-void copy_dq_dq(DualQuat *dq1, DualQuat *dq2)
+void copy_dq_dq(DualQuat *dq1, const DualQuat *dq2)
{
memcpy(dq1, dq2, sizeof(DualQuat));
}
@@ -1698,7 +1712,7 @@ float fov_to_focallength(float hfov, float sensor)
return (sensor / 2.0f) / tanf(hfov * 0.5f);
}
-/* 'mod_inline(-3,4)= 1', 'fmod(-3,4)= -3' */
+/* 'mod_inline(-3, 4)= 1', 'fmod(-3, 4)= -3' */
static float mod_inline(float a, float b)
{
return a - (b * floorf(a / b));
diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c
index 8e5040d983b..0ce5855b16a 100644
--- a/source/blender/blenlib/intern/math_vector_inline.c
+++ b/source/blender/blenlib/intern/math_vector_inline.c
@@ -235,6 +235,22 @@ MINLINE void swap_v4_v4(float a[4], float b[4])
SWAP(float, a[3], b[3]);
}
+/* float args -> vec */
+MINLINE void copy_v3_fl3(float v[3], float x, float y, float z)
+{
+ v[0] = x;
+ v[1] = y;
+ v[2] = z;
+}
+
+MINLINE void copy_v4_fl4(float v[4], float x, float y, float z, float w)
+{
+ v[0] = x;
+ v[1] = y;
+ v[2] = z;
+ v[3] = w;
+}
+
/********************************* Arithmetic ********************************/
MINLINE void add_v2_fl(float r[2], float f)
@@ -771,61 +787,76 @@ MINLINE void normal_float_to_short_v3(short out[3], const float in[3])
/********************************* Comparison ********************************/
-MINLINE int is_zero_v2(const float v[2])
+MINLINE bool is_zero_v2(const float v[2])
{
return (v[0] == 0 && v[1] == 0);
}
-MINLINE int is_zero_v3(const float v[3])
+MINLINE bool is_zero_v3(const float v[3])
{
return (v[0] == 0 && v[1] == 0 && v[2] == 0);
}
-MINLINE int is_zero_v4(const float v[4])
+MINLINE bool is_zero_v4(const float v[4])
{
return (v[0] == 0 && v[1] == 0 && v[2] == 0 && v[3] == 0);
}
-MINLINE int is_one_v3(const float v[3])
+MINLINE bool is_finite_v2(const float v[2])
+{
+ return (finite(v[0]) && finite(v[1]));
+}
+
+MINLINE bool is_finite_v3(const float v[3])
+{
+ return (finite(v[0]) && finite(v[1]) && finite(v[2]));
+}
+
+MINLINE bool is_finite_v4(const float v[4])
+{
+ return (finite(v[0]) && finite(v[1]) && finite(v[2]) && finite(v[3]));
+}
+
+MINLINE bool is_one_v3(const float v[3])
{
return (v[0] == 1 && v[1] == 1 && v[2] == 1);
}
-MINLINE int equals_v2v2(const float v1[2], const float v2[2])
+MINLINE bool equals_v2v2(const float v1[2], const float v2[2])
{
return ((v1[0] == v2[0]) && (v1[1] == v2[1]));
}
-MINLINE int equals_v3v3(const float v1[3], const float v2[3])
+MINLINE bool equals_v3v3(const float v1[3], const float v2[3])
{
return ((v1[0] == v2[0]) && (v1[1] == v2[1]) && (v1[2] == v2[2]));
}
-MINLINE int equals_v4v4(const float v1[4], const float v2[4])
+MINLINE bool equals_v4v4(const float v1[4], const float v2[4])
{
return ((v1[0] == v2[0]) && (v1[1] == v2[1]) && (v1[2] == v2[2]) && (v1[3] == v2[3]));
}
-MINLINE int compare_v2v2(const float v1[2], const float v2[2], const float limit)
+MINLINE bool compare_v2v2(const float v1[2], const float v2[2], const float limit)
{
if (fabsf(v1[0] - v2[0]) < limit)
if (fabsf(v1[1] - v2[1]) < limit)
- return 1;
+ return true;
- return 0;
+ return false;
}
-MINLINE int compare_v3v3(const float v1[3], const float v2[3], const float limit)
+MINLINE bool compare_v3v3(const float v1[3], const float v2[3], const float limit)
{
if (fabsf(v1[0] - v2[0]) < limit)
if (fabsf(v1[1] - v2[1]) < limit)
if (fabsf(v1[2] - v2[2]) < limit)
- return 1;
+ return true;
- return 0;
+ return false;
}
-MINLINE int compare_len_v3v3(const float v1[3], const float v2[3], const float limit)
+MINLINE bool compare_len_v3v3(const float v1[3], const float v2[3], const float limit)
{
float x, y, z;
@@ -836,15 +867,15 @@ MINLINE int compare_len_v3v3(const float v1[3], const float v2[3], const float l
return ((x * x + y * y + z * z) < (limit * limit));
}
-MINLINE int compare_v4v4(const float v1[4], const float v2[4], const float limit)
+MINLINE bool compare_v4v4(const float v1[4], const float v2[4], const float limit)
{
if (fabsf(v1[0] - v2[0]) < limit)
if (fabsf(v1[1] - v2[1]) < limit)
if (fabsf(v1[2] - v2[2]) < limit)
if (fabsf(v1[3] - v2[3]) < limit)
- return 1;
+ return true;
- return 0;
+ return false;
}
MINLINE float line_point_side_v2(const float l1[2], const float l2[2], const float pt[2])
diff --git a/source/blender/blenlib/intern/noise.c b/source/blender/blenlib/intern/noise.c
index 2f94e833e9d..5b9fefe77bb 100644
--- a/source/blender/blenlib/intern/noise.c
+++ b/source/blender/blenlib/intern/noise.c
@@ -42,7 +42,7 @@
/* local */
static float noise3_perlin(float vec[3]);
-//static float turbulence_perlin(float *point, float lofreq, float hifreq);
+//static float turbulence_perlin(const float point[3], float lofreq, float hifreq);
//static float turbulencep(float noisesize, float x, float y, float z, int nr);
/* UNUSED */
@@ -50,7 +50,7 @@ static float noise3_perlin(float vec[3]);
/* needed for voronoi */
#define HASHPNT(x, y, z) hashpntf + 3 * hash[(hash[(hash[(z) & 255] + (y)) & 255] + (x)) & 255]
-static float hashpntf[768] = {
+static const float hashpntf[768] = {
0.536902, 0.020915, 0.501445, 0.216316, 0.517036, 0.822466, 0.965315,
0.377313, 0.678764, 0.744545, 0.097731, 0.396357, 0.247202, 0.520897,
0.613396, 0.542124, 0.146813, 0.255489, 0.810868, 0.638641, 0.980742,
@@ -163,7 +163,7 @@ static float hashpntf[768] = {
0.114246, 0.905043, 0.713870, 0.555261, 0.951333
};
-unsigned char hash[512] = {
+const unsigned char hash[512] = {
0xA2, 0xA0, 0x19, 0x3B, 0xF8, 0xEB, 0xAA, 0xEE, 0xF3, 0x1C, 0x67, 0x28, 0x1D, 0xED, 0x0, 0xDE, 0x95, 0x2E, 0xDC,
0x3F, 0x3A, 0x82, 0x35, 0x4D, 0x6C, 0xBA, 0x36, 0xD0, 0xF6, 0xC, 0x79, 0x32, 0xD1, 0x59, 0xF4, 0x8, 0x8B, 0x63,
0x89, 0x2F, 0xB8, 0xB4, 0x97, 0x83, 0xF2, 0x8F, 0x18, 0xC7, 0x51, 0x14, 0x65, 0x87, 0x48, 0x20, 0x42, 0xA8, 0x80,
@@ -194,7 +194,7 @@ unsigned char hash[512] = {
};
-float hashvectf[768] = {
+const float hashvectf[768] = {
0.33783, 0.715698, -0.611206, -0.944031, -0.326599, -0.045624, -0.101074, -0.416443, -0.903503, 0.799286, 0.49411,
-0.341949, -0.854645, 0.518036, 0.033936, 0.42514, -0.437866, -0.792114, -0.358948, 0.597046, 0.717377, -0.985413,
0.144714, 0.089294, -0.601776, -0.33728, -0.723907, -0.449921, 0.594513, 0.666382, 0.208313, -0.10791, 0.972076,
@@ -327,7 +327,8 @@ static float newPerlinU(float x, float y, float z)
/* Was BLI_hnoise(), removed noisesize, so other functions can call it without scaling. */
static float orgBlenderNoise(float x, float y, float z)
{
- register float cn1, cn2, cn3, cn4, cn5, cn6, i, *h;
+ register float cn1, cn2, cn3, cn4, cn5, cn6, i;
+ register const float *h;
float fx, fy, fz, ox, oy, oz, jx, jy, jz;
float n = 0.5;
int ix, iy, iz, b00, b01, b10, b11, b20, b21;
@@ -504,7 +505,7 @@ static const char p[512 + 2] = {
};
-static float g[512 + 2][3] = {
+static const float g[512 + 2][3] = {
{0.33783, 0.715698, -0.611206},
{-0.944031, -0.326599, -0.045624},
{-0.101074, -0.416443, -0.903503},
@@ -1034,7 +1035,8 @@ static float g[512 + 2][3] = {
static float noise3_perlin(float vec[3])
{
int bx0, bx1, by0, by1, bz0, bz1, b00, b10, b01, b11;
- float rx0, rx1, ry0, ry1, rz0, rz1, *q, sx, sy, sz, a, b, c, d, t, u, v;
+ float rx0, rx1, ry0, ry1, rz0, rz1, sx, sy, sz, a, b, c, d, t, u, v;
+ const float *q;
register int i, j;
@@ -1095,7 +1097,7 @@ static float noise3_perlin(float vec[3])
}
#if 0
-static float turbulence_perlin(float *point, float lofreq, float hifreq)
+static float turbulence_perlin(const float point[3], float lofreq, float hifreq)
{
float freq, t, p[3];
@@ -1227,7 +1229,7 @@ static float dist_Minkovsky(float x, float y, float z, float e)
void voronoi(float x, float y, float z, float *da, float *pa, float me, int dtype)
{
int xx, yy, zz, xi, yi, zi;
- float xd, yd, zd, d, *p;
+ float xd, yd, zd, d;
float (*distfunc)(float, float, float, float);
switch (dtype) {
@@ -1262,7 +1264,7 @@ void voronoi(float x, float y, float z, float *da, float *pa, float me, int dtyp
for (xx = xi - 1; xx <= xi + 1; xx++) {
for (yy = yi - 1; yy <= yi + 1; yy++) {
for (zz = zi - 1; zz <= zi + 1; zz++) {
- p = HASHPNT(xx, yy, zz);
+ const float *p = HASHPNT(xx, yy, zz);
xd = x - (p[0] + xx);
yd = y - (p[1] + yy);
zd = z - (p[2] + zz);
@@ -1416,7 +1418,7 @@ void cellNoiseV(float x, float y, float z, float *ca)
int xi = (int)(floor(x));
int yi = (int)(floor(y));
int zi = (int)(floor(z));
- float *p = HASHPNT(xi, yi, zi);
+ const float *p = HASHPNT(xi, yi, zi);
ca[0] = p[0];
ca[1] = p[1];
ca[2] = p[2];
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index 2c06a812c8a..d323098827b 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -46,20 +46,12 @@
#include "BLI_path_util.h"
#include "BLI_string.h"
#include "BLI_string_utf8.h"
+#include "BLI_fnmatch.h"
#include "../blenkernel/BKE_blender.h" /* BLENDER_VERSION, bad level include (no function call) */
#include "GHOST_Path-api.h"
-#if defined WIN32 && !defined _LIBC || defined __sun
-# include "BLI_fnmatch.h" /* use fnmatch included in blenlib */
-#else
-# ifndef _GNU_SOURCE
-# define _GNU_SOURCE
-# endif
-# include <fnmatch.h>
-#endif
-
#ifdef WIN32
# include "utf_winfunc.h"
# include "utfconv.h"
@@ -1332,15 +1324,20 @@ const char *BLI_get_folder_version(const int id, const int ver, const bool do_ch
#endif
/**
- * Sets the specified environment variable to the specified value.
+ * Sets the specified environment variable to the specified value,
+ * and clears it if val == NULL.
*/
void BLI_setenv(const char *env, const char *val)
{
/* free windows */
#if (defined(WIN32) || defined(WIN64)) && defined(FREE_WINDOWS)
- char *envstr = MEM_mallocN(sizeof(char) * (strlen(env) + strlen(val) + 2), "envstr"); /* one for = another for \0 */
+ char *envstr;
+
+ if (val)
+ envstr = BLI_sprintfN("%s=%s", env, val);
+ else
+ envstr = BLI_sprintfN("%s=", env);
- sprintf(envstr, "%s=%s", env, val);
putenv(envstr);
MEM_freeN(envstr);
@@ -1351,7 +1348,10 @@ void BLI_setenv(const char *env, const char *val)
#else
/* linux/osx/bsd */
- setenv(env, val, 1);
+ if (val)
+ setenv(env, val, 1);
+ else
+ unsetenv(env);
#endif
}
@@ -1649,6 +1649,16 @@ bool BLI_ensure_extension(char *path, size_t maxlen, const char *ext)
return true;
}
+bool BLI_ensure_filename(char *filepath, size_t maxlen, const char *filename)
+{
+ char *c = (char *)BLI_last_slash(filepath);
+ if (!c || ((c - filepath) < maxlen - (strlen(filename) + 1))) {
+ strcpy(c ? &c[1] : filepath, filename);
+ return true;
+ }
+ return false;
+}
+
/* Converts "/foo/bar.txt" to "/foo/" and "bar.txt"
* - wont change 'string'
* - wont create any directories
@@ -1693,7 +1703,7 @@ void BLI_split_file_part(const char *string, char *file, const size_t filelen)
/**
* Append a filename to a dir, ensuring slash separates.
*/
-void BLI_path_append(char *dst, const size_t maxlen, const char *file)
+void BLI_path_append(char *__restrict dst, const size_t maxlen, const char *__restrict file)
{
size_t dirlen = BLI_strnlen(dst, maxlen);
@@ -1714,7 +1724,7 @@ void BLI_path_append(char *dst, const size_t maxlen, const char *file)
* Simple appending of filename to dir, does not check for valid path!
* Puts result into *dst, which may be same area as *dir.
*/
-void BLI_join_dirfile(char *dst, const size_t maxlen, const char *dir, const char *file)
+void BLI_join_dirfile(char *__restrict dst, const size_t maxlen, const char *__restrict dir, const char *__restrict file)
{
size_t dirlen = BLI_strnlen(dir, maxlen);
diff --git a/source/blender/blenlib/intern/quadric.c b/source/blender/blenlib/intern/quadric.c
index b06534d282a..8c831bdada0 100644
--- a/source/blender/blenlib/intern/quadric.c
+++ b/source/blender/blenlib/intern/quadric.c
@@ -35,6 +35,8 @@
//#include <string.h>
#include "BLI_math.h"
+#include "BLI_strict_flags.h"
+
#include "BLI_quadric.h" /* own include */
diff --git a/source/blender/blenlib/intern/rand.c b/source/blender/blenlib/intern/rand.c
index 743d910e418..c5b58e5a61b 100644
--- a/source/blender/blenlib/intern/rand.c
+++ b/source/blender/blenlib/intern/rand.c
@@ -175,20 +175,10 @@ float BLI_frand(void)
float BLI_hash_frand(unsigned int seed)
{
- r_uint64 X;
-
- seed = seed + hash[seed & 255];
- X = (((r_uint64) seed) << 16) | LOWSEED;
- seed = (int)(((MULTIPLIER * X + ADDEND) & MASK) >> 17);
-
- seed = seed + hash[seed & 255];
- X = (((r_uint64) seed) << 16) | LOWSEED;
- X = (int)(((MULTIPLIER * X + ADDEND) & MASK) >> 17);
-
- seed = seed + hash[seed & 255];
- X = (((r_uint64) seed) << 16) | LOWSEED;
+ RNG rng;
- return (int)(((MULTIPLIER * X + ADDEND) & MASK) >> 17);
+ BLI_rng_srandom(&rng, seed);
+ return BLI_rng_get_float(&rng);
}
void BLI_array_randomize(void *data, int elemSize, int numElems, unsigned int seed)
diff --git a/source/blender/blenlib/intern/scanfill.c b/source/blender/blenlib/intern/scanfill.c
index c7163874dca..a292c2275c9 100644
--- a/source/blender/blenlib/intern/scanfill.c
+++ b/source/blender/blenlib/intern/scanfill.c
@@ -40,49 +40,17 @@
#include "BLI_callbacks.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
-#include "BLI_scanfill.h"
+#include "BLI_memarena.h"
#include "BLI_utildefines.h"
+#include "BLI_strict_flags.h"
-/* callbacks for errors and interrupts and some goo */
-static void (*BLI_localErrorCallBack)(const char *) = NULL;
-
-/**
- * Set a function taking a (char *) as argument to flag errors. If the
- * callback is not set, the error is discarded.
- * \param f The function to use as callback
- * \attention used in creator.c
- */
-void BLI_setErrorCallBack(void (*f)(const char *))
-{
- BLI_localErrorCallBack = f;
-}
-
-/* just flush the error to /dev/null if the error handler is missing */
-void callLocalErrorCallBack(const char *msg)
-{
- if (BLI_localErrorCallBack) {
- BLI_localErrorCallBack(msg);
- }
-}
-
-#if 0
-/* ignore if the interrupt wasn't set */
-static int callLocalInterruptCallBack(void)
-{
- if (BLI_localInterruptCallBack) {
- return BLI_localInterruptCallBack();
- }
- else {
- return 0;
- }
-}
-#endif
+#include "BLI_scanfill.h" /* own include */
/* local types */
typedef struct PolyFill {
- int edges, verts;
+ unsigned int edges, verts;
float min_xy[2], max_xy[2];
- short f, nr;
+ unsigned short f, nr;
} PolyFill;
typedef struct ScanFillVertLink {
@@ -132,99 +100,45 @@ static int vergpoly(const void *a1, const void *a2)
return 0;
}
-/* ************* MEMORY MANAGEMENT ************* */
-
-/* memory management */
-struct mem_elements {
- struct mem_elements *next, *prev;
- char *data;
-};
+/* **** FILL ROUTINES *************************** */
-static void *mem_element_new(ScanFillContext *sf_ctx, int size)
+ScanFillVert *BLI_scanfill_vert_add(ScanFillContext *sf_ctx, const float vec[3])
{
- BLI_assert(!(size > 10000 || size == 0)); /* this is invalid use! */
-
- size = (size + 3) & ~3; /* allocate in units of 4 */
+ ScanFillVert *sf_v;
- if (sf_ctx->melem__cur && (size + sf_ctx->melem__offs < MEM_ELEM_BLOCKSIZE)) {
- void *adr = (void *) (sf_ctx->melem__cur->data + sf_ctx->melem__offs);
- sf_ctx->melem__offs += size;
- return adr;
- }
- else {
- sf_ctx->melem__cur = MEM_callocN(sizeof(struct mem_elements), "newmem");
- sf_ctx->melem__cur->data = MEM_callocN(MEM_ELEM_BLOCKSIZE, "newmem");
- BLI_addtail(&sf_ctx->melem__lb, sf_ctx->melem__cur);
-
- sf_ctx->melem__offs = size;
- return sf_ctx->melem__cur->data;
- }
-}
-static void mem_element_reset(ScanFillContext *sf_ctx, int keep_first)
-{
- struct mem_elements *first;
-
- if ((first = sf_ctx->melem__lb.first)) { /* can be false if first fill fails */
- if (keep_first) {
- BLI_remlink(&sf_ctx->melem__lb, first);
- }
-
- sf_ctx->melem__cur = sf_ctx->melem__lb.first;
- while (sf_ctx->melem__cur) {
- MEM_freeN(sf_ctx->melem__cur->data);
- sf_ctx->melem__cur = sf_ctx->melem__cur->next;
- }
- BLI_freelistN(&sf_ctx->melem__lb);
+ sf_v = BLI_memarena_alloc(sf_ctx->arena, sizeof(ScanFillVert));
- /*reset the block we're keeping*/
- if (keep_first) {
- BLI_addtail(&sf_ctx->melem__lb, first);
- memset(first->data, 0, MEM_ELEM_BLOCKSIZE);
- }
- else {
- first = NULL;
-
- }
- }
-
- sf_ctx->melem__cur = first;
- sf_ctx->melem__offs = 0;
-}
-
-void BLI_scanfill_end(ScanFillContext *sf_ctx)
-{
- mem_element_reset(sf_ctx, FALSE);
-
- sf_ctx->fillvertbase.first = sf_ctx->fillvertbase.last = NULL;
- sf_ctx->filledgebase.first = sf_ctx->filledgebase.last = NULL;
- sf_ctx->fillfacebase.first = sf_ctx->fillfacebase.last = NULL;
-}
+ BLI_addtail(&sf_ctx->fillvertbase, sf_v);
-/* **** FILL ROUTINES *************************** */
+ sf_v->tmp.p = NULL;
+ copy_v3_v3(sf_v->co, vec);
-ScanFillVert *BLI_scanfill_vert_add(ScanFillContext *sf_ctx, const float vec[3])
-{
- ScanFillVert *eve;
-
- eve = mem_element_new(sf_ctx, sizeof(ScanFillVert));
- BLI_addtail(&sf_ctx->fillvertbase, eve);
-
- copy_v3_v3(eve->co, vec);
+ /* just zero out the rest */
+ zero_v2(sf_v->xy);
+ sf_v->keyindex = 0;
+ sf_v->poly_nr = 0;
+ sf_v->edge_tot = 0;
+ sf_v->f = 0;
- return eve;
+ return sf_v;
}
ScanFillEdge *BLI_scanfill_edge_add(ScanFillContext *sf_ctx, ScanFillVert *v1, ScanFillVert *v2)
{
- ScanFillEdge *newed;
+ ScanFillEdge *sf_ed;
- newed = mem_element_new(sf_ctx, sizeof(ScanFillEdge));
- BLI_addtail(&sf_ctx->filledgebase, newed);
+ sf_ed = BLI_memarena_alloc(sf_ctx->arena, sizeof(ScanFillEdge));
+ BLI_addtail(&sf_ctx->filledgebase, sf_ed);
- newed->v1 = v1;
- newed->v2 = v2;
+ sf_ed->v1 = v1;
+ sf_ed->v2 = v2;
- return newed;
+ /* just zero out the rest */
+ sf_ed->poly_nr = 0;
+ sf_ed->f = 0;
+ sf_ed->tmp.c = 0;
+
+ return sf_ed;
}
static void addfillface(ScanFillContext *sf_ctx, ScanFillVert *v1, ScanFillVert *v2, ScanFillVert *v3)
@@ -232,7 +146,7 @@ static void addfillface(ScanFillContext *sf_ctx, ScanFillVert *v1, ScanFillVert
/* does not make edges */
ScanFillFace *sf_tri;
- sf_tri = mem_element_new(sf_ctx, sizeof(ScanFillFace));
+ sf_tri = BLI_memarena_alloc(sf_ctx->arena, sizeof(ScanFillFace));
BLI_addtail(&sf_ctx->fillfacebase, sf_tri);
sf_tri->v1 = v1;
@@ -240,7 +154,7 @@ static void addfillface(ScanFillContext *sf_ctx, ScanFillVert *v1, ScanFillVert
sf_tri->v3 = v3;
}
-static int boundisect(PolyFill *pf2, PolyFill *pf1)
+static bool boundisect(PolyFill *pf2, PolyFill *pf1)
{
/* has pf2 been touched (intersected) by pf1 ? with bounding box */
/* test first if polys exist */
@@ -287,7 +201,7 @@ static void mergepolysSimp(ScanFillContext *sf_ctx, PolyFill *pf1, PolyFill *pf2
pf1->f = (pf1->f | pf2->f);
}
-static short testedgeside(const float v1[2], const float v2[2], const float v3[2])
+static bool testedgeside(const float v1[2], const float v2[2], const float v3[2])
/* is v3 to the right of v1-v2 ? With exception: v3 == v1 || v3 == v2 */
{
float inp;
@@ -298,14 +212,14 @@ static short testedgeside(const float v1[2], const float v2[2], const float v3[2
if (inp < 0.0f) {
return 0;
}
- else if (inp == 0) {
+ else if (inp == 0.0f) {
if (v1[0] == v3[0] && v1[1] == v3[1]) return 0;
if (v2[0] == v3[0] && v2[1] == v3[1]) return 0;
}
return 1;
}
-static short addedgetoscanvert(ScanFillVertLink *sc, ScanFillEdge *eed)
+static bool addedgetoscanvert(ScanFillVertLink *sc, ScanFillEdge *eed)
{
/* find first edge to the right of eed, and insert eed before that */
ScanFillEdge *ed;
@@ -354,7 +268,7 @@ static short addedgetoscanvert(ScanFillVertLink *sc, ScanFillEdge *eed)
}
-static ScanFillVertLink *addedgetoscanlist(ScanFillContext *sf_ctx, ScanFillEdge *eed, int len)
+static ScanFillVertLink *addedgetoscanlist(ScanFillContext *sf_ctx, ScanFillEdge *eed, unsigned int len)
{
/* inserts edge at correct location in ScanFillVertLink list */
/* returns sc when edge already exists */
@@ -379,13 +293,17 @@ static ScanFillVertLink *addedgetoscanlist(ScanFillContext *sf_ctx, ScanFillEdge
sc = (ScanFillVertLink *)bsearch(&scsearch, sf_ctx->_scdata, len,
sizeof(ScanFillVertLink), vergscdata);
- if (sc == NULL) printf("Error in search edge: %p\n", (void *)eed);
- else if (addedgetoscanvert(sc, eed) == 0) return sc;
+ if (UNLIKELY(sc == NULL)) {
+ printf("Error in search edge: %p\n", (void *)eed);
+ }
+ else if (addedgetoscanvert(sc, eed) == false) {
+ return sc;
+ }
return NULL;
}
-static short boundinsideEV(ScanFillEdge *eed, ScanFillVert *eve)
+static bool boundinsideEV(ScanFillEdge *eed, ScanFillVert *eve)
/* is eve inside boundbox eed */
{
float minx, maxx, miny, maxy;
@@ -476,7 +394,7 @@ static void testvertexnearedge(ScanFillContext *sf_ctx)
}
}
-static void splitlist(ScanFillContext *sf_ctx, ListBase *tempve, ListBase *temped, short nr)
+static void splitlist(ScanFillContext *sf_ctx, ListBase *tempve, ListBase *temped, unsigned short nr)
{
/* everything is in templist, write only poly nr to fillist */
ScanFillVert *eve, *nextve;
@@ -505,15 +423,14 @@ static void splitlist(ScanFillContext *sf_ctx, ListBase *tempve, ListBase *tempe
}
}
-static int scanfill(ScanFillContext *sf_ctx, PolyFill *pf, const int flag)
+static unsigned int scanfill(ScanFillContext *sf_ctx, PolyFill *pf, const int flag)
{
ScanFillVertLink *sc = NULL, *sc1;
ScanFillVert *eve, *v1, *v2, *v3;
ScanFillEdge *eed, *nexted, *ed1, *ed2, *ed3;
- int a, b, verts, maxface, totface;
- short nr, twoconnected = 0;
-
- nr = pf->nr;
+ unsigned int a, b, verts, maxface, totface;
+ const unsigned short nr = pf->nr;
+ bool twoconnected = false;
/* PRINTS */
#if 0
@@ -629,7 +546,8 @@ static int scanfill(ScanFillContext *sf_ctx, PolyFill *pf, const int flag)
/* STEP 2: FILL LOOP */
- if (pf->f == 0) twoconnected = 1;
+ if (pf->f == 0)
+ twoconnected = true;
/* (temporal) security: never much more faces than vertices */
totface = 0;
@@ -826,14 +744,36 @@ static int scanfill(ScanFillContext *sf_ctx, PolyFill *pf, const int flag)
void BLI_scanfill_begin(ScanFillContext *sf_ctx)
{
memset(sf_ctx, 0, sizeof(*sf_ctx));
+ sf_ctx->arena = BLI_memarena_new(BLI_SCANFILL_ARENA_SIZE, __func__);
}
-int BLI_scanfill_calc(ScanFillContext *sf_ctx, const int flag)
+void BLI_scanfill_begin_arena(ScanFillContext *sf_ctx, MemArena *arena)
{
- return BLI_scanfill_calc_ex(sf_ctx, flag, NULL);
+ memset(sf_ctx, 0, sizeof(*sf_ctx));
+ sf_ctx->arena = arena;
}
-int BLI_scanfill_calc_ex(ScanFillContext *sf_ctx, const int flag, const float nor_proj[3])
+void BLI_scanfill_end(ScanFillContext *sf_ctx)
+{
+ BLI_memarena_free(sf_ctx->arena);
+ sf_ctx->arena = NULL;
+
+ sf_ctx->fillvertbase.first = sf_ctx->fillvertbase.last = NULL;
+ sf_ctx->filledgebase.first = sf_ctx->filledgebase.last = NULL;
+ sf_ctx->fillfacebase.first = sf_ctx->fillfacebase.last = NULL;
+}
+
+void BLI_scanfill_end_arena(ScanFillContext *sf_ctx, MemArena *arena)
+{
+ BLI_memarena_clear(arena);
+ BLI_assert(sf_ctx->arena == arena);
+
+ sf_ctx->fillvertbase.first = sf_ctx->fillvertbase.last = NULL;
+ sf_ctx->filledgebase.first = sf_ctx->filledgebase.last = NULL;
+ sf_ctx->fillfacebase.first = sf_ctx->fillfacebase.last = NULL;
+}
+
+unsigned int BLI_scanfill_calc_ex(ScanFillContext *sf_ctx, const int flag, const float nor_proj[3])
{
/*
* - fill works with its own lists, so create that first (no faces!)
@@ -845,34 +785,36 @@ int BLI_scanfill_calc_ex(ScanFillContext *sf_ctx, const int flag, const float no
*/
ListBase tempve, temped;
ScanFillVert *eve;
- ScanFillEdge *eed, *nexted;
+ ScanFillEdge *eed, *eed_next;
PolyFill *pflist, *pf;
float *min_xy_p, *max_xy_p;
- short a, c, poly = 0, ok = 0, toggle = 0;
- int totfaces = 0; /* total faces added */
+ unsigned int totverts = 0, toggle = 0;
+ unsigned int totfaces = 0; /* total faces added */
+ unsigned short a, c, poly = 0;
+ bool ok;
float mat_2d[3][3];
BLI_assert(!nor_proj || len_squared_v3(nor_proj) > FLT_EPSILON);
- /* reset variables */
eve = sf_ctx->fillvertbase.first;
- a = 0;
while (eve) {
- eve->f = 0;
- eve->poly_nr = 0;
- eve->edge_tot = 0;
+ /* these values used to be set,
+ * however they should always be zero'd so check instead */
+ BLI_assert(eve->f == 0);
+ BLI_assert(eve->poly_nr == 0);
+ BLI_assert(eve->edge_tot == 0);
+ totverts++;
eve = eve->next;
- a += 1;
}
if (flag & BLI_SCANFILL_CALC_QUADTRI_FASTPATH) {
- if (a == 3) {
+ if (totverts == 3) {
eve = sf_ctx->fillvertbase.first;
addfillface(sf_ctx, eve, eve->next, eve->next->next);
return 1;
}
- else if (a == 4) {
+ else if (totverts == 4) {
float vec1[3], vec2[3];
eve = sf_ctx->fillvertbase.first;
@@ -897,23 +839,24 @@ int BLI_scanfill_calc_ex(ScanFillContext *sf_ctx, const int flag, const float no
/* including resetting of flags */
eed = sf_ctx->filledgebase.first;
while (eed) {
- eed->poly_nr = 0;
+ BLI_assert(eed->poly_nr == 0);
eed->v1->f = SF_VERT_AVAILABLE;
eed->v2->f = SF_VERT_AVAILABLE;
eed = eed->next;
}
+ ok = false;
eve = sf_ctx->fillvertbase.first;
while (eve) {
if (eve->f & SF_VERT_AVAILABLE) {
- ok = 1;
+ ok = true;
break;
}
eve = eve->next;
}
- if (ok == 0) {
+ if (UNLIKELY(ok == false)) {
return 0;
}
else {
@@ -959,35 +902,33 @@ int BLI_scanfill_calc_ex(ScanFillContext *sf_ctx, const int flag, const float no
if (eve->poly_nr == 0) {
poly++;
/* now a sort of select connected */
- ok = 1;
+ ok = true;
eve->poly_nr = poly;
while (ok) {
- ok = 0;
- toggle++;
- if (toggle & 1) eed = sf_ctx->filledgebase.first;
- else eed = sf_ctx->filledgebase.last;
+ ok = false;
+ toggle++;
+ eed = (toggle & 1) ? sf_ctx->filledgebase.first : sf_ctx->filledgebase.last;
while (eed) {
if (eed->v1->poly_nr == 0 && eed->v2->poly_nr == poly) {
eed->v1->poly_nr = poly;
eed->poly_nr = poly;
- ok = 1;
+ ok = true;
}
else if (eed->v2->poly_nr == 0 && eed->v1->poly_nr == poly) {
eed->v2->poly_nr = poly;
eed->poly_nr = poly;
- ok = 1;
+ ok = true;
}
else if (eed->poly_nr == 0) {
if (eed->v1->poly_nr == poly && eed->v2->poly_nr == poly) {
eed->poly_nr = poly;
- ok = 1;
+ ok = true;
}
}
- if (toggle & 1) eed = eed->next;
- else eed = eed->prev;
+ eed = (toggle & 1) ? eed->next : eed->prev;
}
}
}
@@ -1020,35 +961,36 @@ int BLI_scanfill_calc_ex(ScanFillContext *sf_ctx, const int flag, const float no
}
if (eed) {
/* otherwise it's impossible to be sure you can clear vertices */
- callLocalErrorCallBack("No vertices with 250 edges allowed!");
+#ifdef DEBUG
+ printf("No vertices with 250 edges allowed!\n");
+#endif
return 0;
}
/* does it only for vertices with (->h == 1) */
testvertexnearedge(sf_ctx);
- ok = 1;
+ ok = true;
while (ok) {
- ok = 0;
+ ok = false;
+
toggle++;
- if (toggle & 1) eed = sf_ctx->filledgebase.first;
- else eed = sf_ctx->filledgebase.last;
+ eed = (toggle & 1) ? sf_ctx->filledgebase.first : sf_ctx->filledgebase.last;
while (eed) {
- if (toggle & 1) nexted = eed->next;
- else nexted = eed->prev;
+ eed_next = (toggle & 1) ? eed->next : eed->prev;
if (eed->v1->edge_tot == 1) {
eed->v2->edge_tot--;
BLI_remlink(&sf_ctx->fillvertbase, eed->v1);
BLI_remlink(&sf_ctx->filledgebase, eed);
- ok = 1;
+ ok = true;
}
else if (eed->v2->edge_tot == 1) {
eed->v1->edge_tot--;
BLI_remlink(&sf_ctx->fillvertbase, eed->v2);
BLI_remlink(&sf_ctx->filledgebase, eed);
- ok = 1;
+ ok = true;
}
- eed = nexted;
+ eed = eed_next;
}
}
if (sf_ctx->filledgebase.first == NULL) {
@@ -1069,12 +1011,12 @@ int BLI_scanfill_calc_ex(ScanFillContext *sf_ctx, const int flag, const float no
/* STEP 3: MAKE POLYFILL STRUCT */
- pflist = (PolyFill *)MEM_callocN(poly * sizeof(PolyFill), "edgefill");
+ pflist = (PolyFill *)MEM_callocN((size_t)poly * sizeof(PolyFill), "edgefill");
pf = pflist;
for (a = 1; a <= poly; a++) {
pf->nr = a;
- pf->min_xy[0] = pf->min_xy[1] = 1.0e20;
- pf->max_xy[0] = pf->max_xy[1] = -1.0e20;
+ pf->min_xy[0] = pf->min_xy[1] = 1.0e20f;
+ pf->max_xy[0] = pf->max_xy[1] = -1.0e20f;
pf++;
}
eed = sf_ctx->filledgebase.first;
@@ -1104,10 +1046,10 @@ int BLI_scanfill_calc_ex(ScanFillContext *sf_ctx, const int flag, const float no
* WATCH IT: ONLY WORKS WITH SORTED POLYS!!! */
if (poly > 1) {
- short *polycache, *pc;
+ unsigned short *polycache, *pc;
/* so, sort first */
- qsort(pflist, poly, sizeof(PolyFill), vergpoly);
+ qsort(pflist, (size_t)poly, sizeof(PolyFill), vergpoly);
#if 0
pf = pflist;
@@ -1118,10 +1060,10 @@ int BLI_scanfill_calc_ex(ScanFillContext *sf_ctx, const int flag, const float no
}
#endif
- polycache = pc = MEM_callocN(sizeof(short) * poly, "polycache");
+ polycache = pc = MEM_callocN(sizeof(short) * (size_t)poly, "polycache");
pf = pflist;
for (a = 0; a < poly; a++, pf++) {
- for (c = a + 1; c < poly; c++) {
+ for (c = (unsigned short)(a + 1); c < poly; c++) {
/* if 'a' inside 'c': join (bbox too)
* Careful: 'a' can also be inside another poly.
@@ -1177,3 +1119,8 @@ int BLI_scanfill_calc_ex(ScanFillContext *sf_ctx, const int flag, const float no
return totfaces;
}
+
+unsigned int BLI_scanfill_calc(ScanFillContext *sf_ctx, const int flag)
+{
+ return BLI_scanfill_calc_ex(sf_ctx, flag, NULL);
+}
diff --git a/source/blender/blenlib/intern/smallhash.c b/source/blender/blenlib/intern/smallhash.c
index d255b4a9af6..9790ce1f0b4 100644
--- a/source/blender/blenlib/intern/smallhash.c
+++ b/source/blender/blenlib/intern/smallhash.c
@@ -25,12 +25,17 @@
* ***** END GPL LICENSE BLOCK *****
*/
+/** \file blender/blenlib/intern/smallhash.c
+ * \ingroup bli
+ */
+
#include <string.h>
#include "MEM_guardedalloc.h"
#include "BLI_utildefines.h"
#include "BLI_smallhash.h"
+#include "BLI_strict_flags.h"
/* SMHASH_CELL_UNUSED means this cell is inside a key series,
* while SMHASH_CELL_FREE means this cell terminates a key series.
@@ -43,22 +48,14 @@
#define SMHASH_CELL_UNUSED ((void *)0x7FFFFFFF)
#define SMHASH_CELL_FREE ((void *)0x7FFFFFFD)
-#ifdef __GNUC__
-# pragma GCC diagnostic error "-Wsign-conversion"
-# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 /* gcc4.6+ only */
-# pragma GCC diagnostic error "-Wsign-compare"
-# pragma GCC diagnostic error "-Wconversion"
-# endif
-#endif
-
/* typically this re-assigns 'h' */
#define SMHASH_NEXT(h, hoff) ( \
- CHECK_TYPE_INLINE(&(h), unsigned int), \
- CHECK_TYPE_INLINE(&(hoff), unsigned int), \
+ CHECK_TYPE_INLINE(&(h), unsigned int *), \
+ CHECK_TYPE_INLINE(&(hoff), unsigned int *), \
((h) + (((hoff) = ((hoff) * 2) + 1), (hoff))) \
)
-extern unsigned int hashsizes[];
+extern const unsigned int hashsizes[];
void BLI_smallhash_init(SmallHash *hash)
{
diff --git a/source/blender/blenlib/intern/sort.c b/source/blender/blenlib/intern/sort.c
new file mode 100644
index 00000000000..44110564948
--- /dev/null
+++ b/source/blender/blenlib/intern/sort.c
@@ -0,0 +1,173 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2013 Blender Foundation
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Benoit Bolsee,
+ * Sergey Sharybin.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/blenlib/intern/sort.c
+ * \ingroup bli
+ */
+
+#include <stdlib.h>
+
+#include "BLI_utildefines.h"
+
+#include "BLI_sort.h"
+
+/* **** qsort based on FreeBSD source (libkern\qsort.c) **** */
+BLI_INLINE char *med3(char *, char *, char *, BLI_sort_cmp_t, void *);
+BLI_INLINE void swapfunc(char *, char *, int, int);
+
+#define min(a, b) (a) < (b) ? a : b
+#define swapcode(TYPE, parmi, parmj, n) \
+{ \
+ long i = (n) / sizeof(TYPE); \
+ TYPE *pi = (TYPE *) (parmi); \
+ TYPE *pj = (TYPE *) (parmj); \
+ do { \
+ TYPE t = *pi; \
+ *pi++ = *pj; \
+ *pj++ = t; \
+ } while (--i > 0); \
+}
+#define SWAPINIT(a, es) swaptype = ((char *)a - (char *)0) % sizeof(long) || \
+ es % sizeof(long) ? 2 : es == sizeof(long)? 0 : 1;
+
+BLI_INLINE void swapfunc(char *a, char *b, int n, int swaptype)
+{
+ if (swaptype <= 1)
+ swapcode(long, a, b, n)
+ else
+ swapcode(char, a, b, n)
+}
+
+#define swap(a, b) \
+ if (swaptype == 0) { \
+ long t = *(long *)(a); \
+ *(long *)(a) = *(long *)(b);\
+ *(long *)(b) = t; \
+ } else \
+ swapfunc(a, b, es, swaptype)
+
+#define vecswap(a, b, n) if ((n) > 0) swapfunc(a, b, n, swaptype)
+#define CMP(t, x, y) (cmp((t), (x), (y)))
+
+BLI_INLINE char *med3(char *a, char *b, char *c, BLI_sort_cmp_t cmp, void *thunk)
+{
+ return CMP(thunk, a, b) < 0 ?
+ (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a ))
+ :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c ));
+}
+
+/**
+ * Quick sort reentrant.
+ *
+ * \note Follows BSD arg order (incompatible with glibc).
+ */
+void BLI_qsort_r(void *a, size_t n, size_t es, void *thunk, BLI_sort_cmp_t cmp)
+{
+ char *pa, *pb, *pc, *pd, *pl, *pm, *pn;
+ int d, r, swaptype, swap_cnt;
+
+loop:
+ SWAPINIT(a, es);
+ swap_cnt = 0;
+ if (n < 7) {
+ for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) {
+ for (pl = pm;
+ pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
+ pl -= es)
+ {
+ swap(pl, pl - es);
+ }
+ }
+ return;
+ }
+ pm = (char *)a + (n / 2) * es;
+ if (n > 7) {
+ pl = (char *)a;
+ pn = (char *)a + (n - 1) * es;
+ if (n > 40) {
+ d = (n / 8) * es;
+ pl = med3(pl, pl + d, pl + 2 * d, cmp, thunk);
+ pm = med3(pm - d, pm, pm + d, cmp, thunk);
+ pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk);
+ }
+ pm = med3(pl, pm, pn, cmp, thunk);
+ }
+ swap((char *)a, pm);
+ pa = pb = (char *)a + es;
+
+ pc = pd = (char *)a + (n - 1) * es;
+ for (;;) {
+ while (pb <= pc && (r = CMP(thunk, pb, a)) <= 0) {
+ if (r == 0) {
+ swap_cnt = 1;
+ swap(pa, pb);
+ pa += es;
+ }
+ pb += es;
+ }
+ while (pb <= pc && (r = CMP(thunk, pc, a)) >= 0) {
+ if (r == 0) {
+ swap_cnt = 1;
+ swap(pc, pd);
+ pd -= es;
+ }
+ pc -= es;
+ }
+ if (pb > pc)
+ break;
+ swap(pb, pc);
+ swap_cnt = 1;
+ pb += es;
+ pc -= es;
+ }
+ if (swap_cnt == 0) { /* Switch to insertion sort */
+ for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) {
+ for (pl = pm;
+ pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
+ pl -= es)
+ {
+ swap(pl, pl - es);
+ }
+ }
+ return;
+ }
+
+ pn = (char *)a + n * es;
+ r = min(pa - (char *)a, pb - pa);
+ vecswap((char *)a, pb - r, r);
+ r = min(pd - pc, pn - pd - es);
+ vecswap(pb, pn - r, r);
+ if ((r = pb - pa) > es)
+ BLI_qsort_r(a, r / es, es, thunk, cmp);
+ if ((r = pd - pc) > es) {
+ /* Iterate rather than recurse to save stack space */
+ a = pn - r;
+ n = r / es;
+ goto loop;
+ }
+}
diff --git a/source/blender/blenlib/intern/sort_utils.c b/source/blender/blenlib/intern/sort_utils.c
new file mode 100644
index 00000000000..c75e8e7455f
--- /dev/null
+++ b/source/blender/blenlib/intern/sort_utils.c
@@ -0,0 +1,74 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2013 Blender Foundation.
+ * All rights reserved.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/blenlib/intern/sort_utils.c
+ * \ingroup bli
+ *
+ * Utility functions for sorting common types.
+ */
+
+#include "BLI_sort_utils.h" /* own include */
+
+struct SortAnyByFloat {
+ float sort_value;
+};
+
+struct SortAnyByInt {
+ int sort_value;
+};
+
+int BLI_sortutil_cmp_float(const void *a_, const void *b_)
+{
+ const struct SortAnyByFloat *a = a_;
+ const struct SortAnyByFloat *b = b_;
+ if (a->sort_value > b->sort_value) return 1;
+ else if (a->sort_value < b->sort_value) return -1;
+ else return 0;
+}
+
+int BLI_sortutil_cmp_float_reverse(const void *a_, const void *b_)
+{
+ const struct SortAnyByFloat *a = a_;
+ const struct SortAnyByFloat *b = b_;
+ if (a->sort_value < b->sort_value) return 1;
+ else if (a->sort_value > b->sort_value) return -1;
+ else return 0;
+}
+
+int BLI_sortutil_cmp_int(const void *a_, const void *b_)
+{
+ const struct SortAnyByInt *a = a_;
+ const struct SortAnyByInt *b = b_;
+ if (a->sort_value > b->sort_value) return 1;
+ else if (a->sort_value < b->sort_value) return -1;
+ else return 0;
+}
+
+int BLI_sortutil_cmp_int_reverse(const void *a_, const void *b_)
+{
+ const struct SortAnyByInt *a = a_;
+ const struct SortAnyByInt *b = b_;
+ if (a->sort_value < b->sort_value) return 1;
+ else if (a->sort_value > b->sort_value) return -1;
+ else return 0;
+}
diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c
index 34c6e632131..e40527b1bb6 100644
--- a/source/blender/blenlib/intern/storage.c
+++ b/source/blender/blenlib/intern/storage.c
@@ -70,7 +70,6 @@
#ifdef WIN32
# include <io.h>
# include <direct.h>
-# include <limits.h> /* PATH_MAX */
# include "BLI_winstuff.h"
# include "utfconv.h"
#else
diff --git a/source/blender/blenlib/intern/task.c b/source/blender/blenlib/intern/task.c
new file mode 100644
index 00000000000..4ae60abb2c8
--- /dev/null
+++ b/source/blender/blenlib/intern/task.c
@@ -0,0 +1,424 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include <stdlib.h>
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_listbase.h"
+#include "BLI_task.h"
+#include "BLI_threads.h"
+
+/* Types */
+
+typedef struct Task {
+ struct Task *next, *prev;
+
+ TaskRunFunction run;
+ void *taskdata;
+ bool free_taskdata;
+ TaskPool *pool;
+} Task;
+
+struct TaskPool {
+ TaskScheduler *scheduler;
+
+ volatile size_t num;
+ volatile size_t done;
+ ThreadMutex num_mutex;
+ ThreadCondition num_cond;
+
+ void *userdata;
+ ThreadMutex user_mutex;
+
+ volatile bool do_cancel;
+};
+
+struct TaskScheduler {
+ pthread_t *threads;
+ struct TaskThread *task_threads;
+ int num_threads;
+
+ ListBase queue;
+ ThreadMutex queue_mutex;
+ ThreadCondition queue_cond;
+
+ volatile bool do_exit;
+};
+
+typedef struct TaskThread {
+ TaskScheduler *scheduler;
+ int id;
+} TaskThread;
+
+/* Task Scheduler */
+
+static void task_pool_num_decrease(TaskPool *pool, size_t done)
+{
+ BLI_mutex_lock(&pool->num_mutex);
+
+ BLI_assert(pool->num >= done);
+
+ pool->num -= done;
+ pool->done += done;
+
+ if (pool->num == 0)
+ BLI_condition_notify_all(&pool->num_cond);
+
+ BLI_mutex_unlock(&pool->num_mutex);
+}
+
+static void task_pool_num_increase(TaskPool *pool)
+{
+ BLI_mutex_lock(&pool->num_mutex);
+
+ pool->num++;
+ BLI_condition_notify_all(&pool->num_cond);
+
+ BLI_mutex_unlock(&pool->num_mutex);
+}
+
+static bool task_scheduler_thread_wait_pop(TaskScheduler *scheduler, Task **task)
+{
+ BLI_mutex_lock(&scheduler->queue_mutex);
+
+ while (!scheduler->queue.first && !scheduler->do_exit)
+ BLI_condition_wait(&scheduler->queue_cond, &scheduler->queue_mutex);
+
+ if (!scheduler->queue.first) {
+ BLI_mutex_unlock(&scheduler->queue_mutex);
+ BLI_assert(scheduler->do_exit);
+ return false;
+ }
+
+ *task = scheduler->queue.first;
+ BLI_remlink(&scheduler->queue, *task);
+
+ BLI_mutex_unlock(&scheduler->queue_mutex);
+
+ return true;
+}
+
+static void *task_scheduler_thread_run(void *thread_p)
+{
+ TaskThread *thread = (TaskThread *) thread_p;
+ TaskScheduler *scheduler = thread->scheduler;
+ int thread_id = thread->id;
+ Task *task;
+
+ /* keep popping off tasks */
+ while (task_scheduler_thread_wait_pop(scheduler, &task)) {
+ TaskPool *pool = task->pool;
+
+ /* run task */
+ task->run(pool, task->taskdata, thread_id);
+
+ /* delete task */
+ if (task->free_taskdata)
+ MEM_freeN(task->taskdata);
+ MEM_freeN(task);
+
+ /* notify pool task was done */
+ task_pool_num_decrease(pool, 1);
+ }
+
+ return NULL;
+}
+
+TaskScheduler *BLI_task_scheduler_create(int num_threads)
+{
+ TaskScheduler *scheduler = MEM_callocN(sizeof(TaskScheduler), "TaskScheduler");
+
+ /* multiple places can use this task scheduler, sharing the same
+ * threads, so we keep track of the number of users. */
+ scheduler->do_exit = false;
+
+ scheduler->queue.first = scheduler->queue.last = NULL;
+ BLI_mutex_init(&scheduler->queue_mutex);
+ BLI_condition_init(&scheduler->queue_cond);
+
+ if (num_threads == 0) {
+ /* automatic number of threads will be main thread + num cores */
+ num_threads = BLI_system_thread_count();
+ }
+
+ /* main thread will also work, so we count it too */
+ num_threads -= 1;
+
+ /* launch threads that will be waiting for work */
+ if (num_threads > 0) {
+ int i;
+
+ scheduler->num_threads = num_threads;
+ scheduler->threads = MEM_callocN(sizeof(pthread_t) * num_threads, "TaskScheduler threads");
+ scheduler->task_threads = MEM_callocN(sizeof(TaskThread) * num_threads, "TaskScheduler task threads");
+
+ for (i = 0; i < num_threads; i++) {
+ TaskThread *thread = &scheduler->task_threads[i];
+ thread->scheduler = scheduler;
+ thread->id = i + 1;
+
+ if (pthread_create(&scheduler->threads[i], NULL, task_scheduler_thread_run, thread) != 0) {
+ fprintf(stderr, "TaskScheduler failed to launch thread %d/%d\n", i, num_threads);
+ MEM_freeN(thread);
+ }
+ }
+ }
+
+ return scheduler;
+}
+
+void BLI_task_scheduler_free(TaskScheduler *scheduler)
+{
+ Task *task;
+
+ /* stop all waiting threads */
+ BLI_mutex_lock(&scheduler->queue_mutex);
+ scheduler->do_exit = true;
+ BLI_condition_notify_all(&scheduler->queue_cond);
+ BLI_mutex_unlock(&scheduler->queue_mutex);
+
+ /* delete threads */
+ if (scheduler->threads) {
+ int i;
+
+ for (i = 0; i < scheduler->num_threads; i++) {
+ if (pthread_join(scheduler->threads[i], NULL) != 0)
+ fprintf(stderr, "TaskScheduler failed to join thread %d/%d\n", i, scheduler->num_threads);
+ }
+
+ MEM_freeN(scheduler->threads);
+ }
+
+ /* Delete task thread data */
+ if (scheduler->task_threads) {
+ MEM_freeN(scheduler->task_threads);
+ }
+
+ /* delete leftover tasks */
+ for (task = scheduler->queue.first; task; task = task->next) {
+ if (task->free_taskdata)
+ MEM_freeN(task->taskdata);
+ }
+ BLI_freelistN(&scheduler->queue);
+
+ /* delete mutex/condition */
+ BLI_mutex_end(&scheduler->queue_mutex);
+ BLI_condition_end(&scheduler->queue_cond);
+
+ MEM_freeN(scheduler);
+}
+
+int BLI_task_scheduler_num_threads(TaskScheduler *scheduler)
+{
+ return scheduler->num_threads + 1;
+}
+
+static void task_scheduler_push(TaskScheduler *scheduler, Task *task, TaskPriority priority)
+{
+ task_pool_num_increase(task->pool);
+
+ /* add task to queue */
+ BLI_mutex_lock(&scheduler->queue_mutex);
+
+ if (priority == TASK_PRIORITY_HIGH)
+ BLI_addhead(&scheduler->queue, task);
+ else
+ BLI_addtail(&scheduler->queue, task);
+
+ BLI_condition_notify_one(&scheduler->queue_cond);
+ BLI_mutex_unlock(&scheduler->queue_mutex);
+}
+
+static void task_scheduler_clear(TaskScheduler *scheduler, TaskPool *pool)
+{
+ Task *task, *nexttask;
+ size_t done = 0;
+
+ BLI_mutex_lock(&scheduler->queue_mutex);
+
+ /* free all tasks from this pool from the queue */
+ for (task = scheduler->queue.first; task; task = nexttask) {
+ nexttask = task->next;
+
+ if (task->pool == pool) {
+ if (task->free_taskdata)
+ MEM_freeN(task->taskdata);
+ BLI_freelinkN(&scheduler->queue, task);
+
+ done++;
+ }
+ }
+
+ BLI_mutex_unlock(&scheduler->queue_mutex);
+
+ /* notify done */
+ task_pool_num_decrease(pool, done);
+}
+
+/* Task Pool */
+
+TaskPool *BLI_task_pool_create(TaskScheduler *scheduler, void *userdata)
+{
+ TaskPool *pool = MEM_callocN(sizeof(TaskPool), "TaskPool");
+
+ pool->scheduler = scheduler;
+ pool->num = 0;
+ pool->do_cancel = false;
+
+ BLI_mutex_init(&pool->num_mutex);
+ BLI_condition_init(&pool->num_cond);
+
+ pool->userdata = userdata;
+ BLI_mutex_init(&pool->user_mutex);
+
+ /* Ensure malloc will go fine from threads,
+ *
+ * This is needed because we could be in main thread here
+ * and malloc could be non-threda safe at this point because
+ * no other jobs are running.
+ */
+ BLI_begin_threaded_malloc();
+
+ return pool;
+}
+
+void BLI_task_pool_free(TaskPool *pool)
+{
+ BLI_task_pool_stop(pool);
+
+ BLI_mutex_end(&pool->num_mutex);
+ BLI_condition_end(&pool->num_cond);
+
+ BLI_mutex_end(&pool->user_mutex);
+
+ MEM_freeN(pool);
+
+ BLI_end_threaded_malloc();
+}
+
+void BLI_task_pool_push(TaskPool *pool, TaskRunFunction run,
+ void *taskdata, bool free_taskdata, TaskPriority priority)
+{
+ Task *task = MEM_callocN(sizeof(Task), "Task");
+
+ task->run = run;
+ task->taskdata = taskdata;
+ task->free_taskdata = free_taskdata;
+ task->pool = pool;
+
+ task_scheduler_push(pool->scheduler, task, priority);
+}
+
+void BLI_task_pool_work_and_wait(TaskPool *pool)
+{
+ TaskScheduler *scheduler = pool->scheduler;
+
+ BLI_mutex_lock(&pool->num_mutex);
+
+ while (pool->num != 0) {
+ Task *task, *work_task = NULL;
+ bool found_task = false;
+
+ BLI_mutex_unlock(&pool->num_mutex);
+
+ BLI_mutex_lock(&scheduler->queue_mutex);
+
+ /* find task from this pool. if we get a task from another pool,
+ * we can get into deadlock */
+
+ for (task = scheduler->queue.first; task; task = task->next) {
+ if (task->pool == pool) {
+ work_task = task;
+ found_task = true;
+ BLI_remlink(&scheduler->queue, task);
+ break;
+ }
+ }
+
+ BLI_mutex_unlock(&scheduler->queue_mutex);
+
+ /* if found task, do it, otherwise wait until other tasks are done */
+ if (found_task) {
+ /* run task */
+ work_task->run(pool, work_task->taskdata, 0);
+
+ /* delete task */
+ if (work_task->free_taskdata)
+ MEM_freeN(work_task->taskdata);
+ MEM_freeN(work_task);
+
+ /* notify pool task was done */
+ task_pool_num_decrease(pool, 1);
+ }
+
+ BLI_mutex_lock(&pool->num_mutex);
+ if (pool->num == 0)
+ break;
+
+ if (!found_task)
+ BLI_condition_wait(&pool->num_cond, &pool->num_mutex);
+ }
+
+ BLI_mutex_unlock(&pool->num_mutex);
+}
+
+void BLI_task_pool_cancel(TaskPool *pool)
+{
+ pool->do_cancel = true;
+
+ task_scheduler_clear(pool->scheduler, pool);
+
+ /* wait until all entries are cleared */
+ BLI_mutex_lock(&pool->num_mutex);
+ while (pool->num)
+ BLI_condition_wait(&pool->num_cond, &pool->num_mutex);
+ BLI_mutex_unlock(&pool->num_mutex);
+
+ pool->do_cancel = false;
+}
+
+void BLI_task_pool_stop(TaskPool *pool)
+{
+ task_scheduler_clear(pool->scheduler, pool);
+
+ BLI_assert(pool->num == 0);
+}
+
+bool BLI_task_pool_canceled(TaskPool *pool)
+{
+ return pool->do_cancel;
+}
+
+void *BLI_task_pool_userdata(TaskPool *pool)
+{
+ return pool->userdata;
+}
+
+ThreadMutex *BLI_task_pool_user_mutex(TaskPool *pool)
+{
+ return &pool->user_mutex;
+}
+
+size_t BLI_task_pool_tasks_done(TaskPool *pool)
+{
+ return pool->done;
+}
+
diff --git a/source/blender/blenlib/intern/threads.c b/source/blender/blenlib/intern/threads.c
index 2b6fb52c49c..4361583dafc 100644
--- a/source/blender/blenlib/intern/threads.c
+++ b/source/blender/blenlib/intern/threads.c
@@ -37,6 +37,7 @@
#include "BLI_listbase.h"
#include "BLI_gsqueue.h"
+#include "BLI_task.h"
#include "BLI_threads.h"
#include "PIL_time.h"
@@ -63,6 +64,9 @@ extern pthread_key_t gomp_tls_key;
static void *thread_tls_data;
#endif
+/* We're using one global task scheduler for all kind of tasks. */
+static TaskScheduler *task_scheduler = NULL;
+
/* ********** basic thread control API ************
*
* Many thread cases have an X amount of jobs, and only an Y amount of
@@ -107,7 +111,7 @@ static void *thread_tls_data;
* BLI_end_threads(&lb);
*
************************************************ */
-static pthread_mutex_t _malloc_lock = PTHREAD_MUTEX_INITIALIZER;
+static SpinLock _malloc_lock;
static pthread_mutex_t _image_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t _image_draw_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t _viewer_lock = PTHREAD_MUTEX_INITIALIZER;
@@ -134,17 +138,41 @@ typedef struct ThreadSlot {
static void BLI_lock_malloc_thread(void)
{
- pthread_mutex_lock(&_malloc_lock);
+ BLI_spin_lock(&_malloc_lock);
}
static void BLI_unlock_malloc_thread(void)
{
- pthread_mutex_unlock(&_malloc_lock);
+ BLI_spin_unlock(&_malloc_lock);
}
void BLI_threadapi_init(void)
{
mainid = pthread_self();
+
+ BLI_spin_init(&_malloc_lock);
+}
+
+void BLI_threadapi_exit(void)
+{
+ if (task_scheduler) {
+ BLI_task_scheduler_free(task_scheduler);
+ }
+ BLI_spin_end(&_malloc_lock);
+}
+
+TaskScheduler *BLI_task_scheduler_get(void)
+{
+ if (task_scheduler == NULL) {
+ int tot_thread = BLI_system_thread_count();
+
+ /* Do a lazy initialization, so it happes after
+ * command line arguments parsing
+ */
+ task_scheduler = BLI_task_scheduler_create(tot_thread);
+ }
+
+ return task_scheduler;
}
/* tot = 0 only initializes malloc mutex in a safe way (see sequence.c)
@@ -412,6 +440,11 @@ void BLI_mutex_unlock(ThreadMutex *mutex)
pthread_mutex_unlock(mutex);
}
+bool BLI_mutex_trylock(ThreadMutex *mutex)
+{
+ return (pthread_mutex_trylock(mutex) == 0);
+}
+
void BLI_mutex_end(ThreadMutex *mutex)
{
pthread_mutex_destroy(mutex);
@@ -556,97 +589,31 @@ void BLI_ticket_mutex_unlock(TicketMutex *ticket)
/* ************************************************ */
-typedef struct ThreadedWorker {
- ListBase threadbase;
- void *(*work_fnct)(void *);
- char busy[RE_MAX_THREAD];
- int total;
- int sleep_time;
-} ThreadedWorker;
-
-typedef struct WorkParam {
- ThreadedWorker *worker;
- void *param;
- int index;
-} WorkParam;
+/* Condition */
-static void *exec_work_fnct(void *v_param)
+void BLI_condition_init(ThreadCondition *cond)
{
- WorkParam *p = (WorkParam *)v_param;
- void *value;
-
- value = p->worker->work_fnct(p->param);
-
- p->worker->busy[p->index] = 0;
- MEM_freeN(p);
-
- return value;
+ pthread_cond_init(cond, NULL);
}
-ThreadedWorker *BLI_create_worker(void *(*do_thread)(void *), int tot, int sleep_time)
+void BLI_condition_wait(ThreadCondition *cond, ThreadMutex *mutex)
{
- ThreadedWorker *worker;
-
- (void)sleep_time; /* unused */
-
- worker = MEM_callocN(sizeof(ThreadedWorker), "threadedworker");
-
- if (tot > RE_MAX_THREAD) {
- tot = RE_MAX_THREAD;
- }
- else if (tot < 1) {
- tot = 1;
- }
-
- worker->total = tot;
- worker->work_fnct = do_thread;
-
- BLI_init_threads(&worker->threadbase, exec_work_fnct, tot);
-
- return worker;
+ pthread_cond_wait(cond, mutex);
}
-void BLI_end_worker(ThreadedWorker *worker)
+void BLI_condition_notify_one(ThreadCondition *cond)
{
- BLI_remove_threads(&worker->threadbase);
+ pthread_cond_signal(cond);
}
-void BLI_destroy_worker(ThreadedWorker *worker)
+void BLI_condition_notify_all(ThreadCondition *cond)
{
- BLI_end_worker(worker);
- BLI_freelistN(&worker->threadbase);
- MEM_freeN(worker);
+ pthread_cond_broadcast(cond);
}
-void BLI_insert_work(ThreadedWorker *worker, void *param)
+void BLI_condition_end(ThreadCondition *cond)
{
- WorkParam *p = MEM_callocN(sizeof(WorkParam), "workparam");
- int index;
-
- if (BLI_available_threads(&worker->threadbase) == 0) {
- index = worker->total;
- while (index == worker->total) {
- PIL_sleep_ms(worker->sleep_time);
-
- for (index = 0; index < worker->total; index++) {
- if (worker->busy[index] == 0) {
- BLI_remove_thread_index(&worker->threadbase, index);
- break;
- }
- }
- }
- }
- else {
- index = BLI_available_thread_index(&worker->threadbase);
- }
-
- worker->busy[index] = 1;
-
- p->param = param;
- p->index = index;
- p->worker = worker;
-
- BLI_insert_thread(&worker->threadbase, p);
+ pthread_cond_destroy(cond);
}
/* ************************************************ */
@@ -657,7 +624,7 @@ struct ThreadQueue {
pthread_cond_t push_cond;
pthread_cond_t finish_cond;
volatile int nowait;
- volatile int cancelled;
+ volatile int canceled;
};
ThreadQueue *BLI_thread_queue_init(void)
diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h
index 00ff5863e59..58d0cf6d264 100644
--- a/source/blender/blenloader/BLO_readfile.h
+++ b/source/blender/blenloader/BLO_readfile.h
@@ -265,7 +265,10 @@ void BLO_main_expander(void (*expand_doit_func)(void *, struct Main *, void *));
* \param mainvar the Main database to expand
*/
void BLO_expand_main(void *fdhandle, struct Main *mainvar);
-
+
+/* Update defaults in startup.blend, without having to save and embed it */
+void BLO_update_defaults_startup_blend(struct Main *mainvar);
+
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/blenloader/CMakeLists.txt b/source/blender/blenloader/CMakeLists.txt
index 104c58b1c9e..f865962bac9 100644
--- a/source/blender/blenloader/CMakeLists.txt
+++ b/source/blender/blenloader/CMakeLists.txt
@@ -46,6 +46,7 @@ set(SRC
intern/runtime.c
intern/undofile.c
intern/versioning_250.c
+ intern/versioning_defaults.c
intern/versioning_legacy.c
intern/writefile.c
diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c
index aec91dedf8f..9ae2858f526 100644
--- a/source/blender/blenloader/intern/readblenentry.c
+++ b/source/blender/blenloader/intern/readblenentry.c
@@ -222,7 +222,7 @@ LinkNode *BLO_blendhandle_get_previews(BlendHandle *bh, int ofblocktype, int *to
LinkNode *BLO_blendhandle_get_linkable_groups(BlendHandle *bh)
{
FileData *fd = (FileData *) bh;
- GHash *gathered = BLI_ghash_ptr_new("linkable_groups gh");
+ GSet *gathered = BLI_gset_ptr_new("linkable_groups gh");
LinkNode *names = NULL;
BHead *bhead;
@@ -234,15 +234,15 @@ LinkNode *BLO_blendhandle_get_linkable_groups(BlendHandle *bh)
if (BKE_idcode_is_linkable(bhead->code)) {
const char *str = BKE_idcode_to_name(bhead->code);
- if (!BLI_ghash_haskey(gathered, (void *)str)) {
+ if (!BLI_gset_haskey(gathered, (void *)str)) {
BLI_linklist_prepend(&names, strdup(str));
- BLI_ghash_insert(gathered, (void *)str, NULL);
+ BLI_gset_insert(gathered, (void *)str);
}
}
}
}
- BLI_ghash_free(gathered, NULL, NULL);
+ BLI_gset_free(gathered, NULL);
return names;
}
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 37cebc3063d..51158fc5321 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -151,6 +151,7 @@
#include "BKE_text.h" // for txt_extended_ascii_as_utf8
#include "BKE_texture.h"
#include "BKE_tracking.h"
+#include "BKE_treehash.h"
#include "BKE_sound.h"
#include "IMB_imbuf.h" // for proxy / timecode versioning stuff
@@ -249,11 +250,7 @@ static void convert_tface_mt(FileData *fd, Main *main);
* we could alternatively have a versions of a report function which forces printing - campbell
*/
-static void BKE_reportf_wrap(ReportList *reports, ReportType type, const char *format, ...)
-#ifdef __GNUC__
-__attribute__ ((format(printf, 3, 4)))
-#endif
-;
+static void BKE_reportf_wrap(ReportList *reports, ReportType type, const char *format, ...) ATTR_PRINTF_FORMAT(3, 4);
static void BKE_reportf_wrap(ReportList *reports, ReportType type, const char *format, ...)
{
char fixed_buf[1024]; /* should be long enough */
@@ -1779,6 +1776,27 @@ static void IDP_DirectLinkProperty(IDProperty *prop, int switch_endian, FileData
}
}
+#define IDP_DirectLinkGroup_OrFree(prop, switch_endian, fd) \
+ _IDP_DirectLinkGroup_OrFree(prop, switch_endian, fd, __func__)
+
+static void _IDP_DirectLinkGroup_OrFree(IDProperty **prop, int switch_endian, FileData *fd,
+ const char *caller_func_id)
+{
+ if (*prop) {
+ if ((*prop)->type == IDP_GROUP) {
+ IDP_DirectLinkGroup(*prop, switch_endian, fd);
+ }
+ else {
+ /* corrupt file! */
+ printf("%s: found non group data, freeing type %d!\n",
+ caller_func_id, (*prop)->type);
+ /* don't risk id, data's likely corrupt. */
+ // IDP_FreeProperty(*prop);
+ *prop = NULL;
+ }
+ }
+}
+
/* stub function */
static void IDP_LibLinkProperty(IDProperty *UNUSED(prop), int UNUSED(switch_endian), FileData *UNUSED(fd))
{
@@ -1791,9 +1809,8 @@ static void direct_link_id(FileData *fd, ID *id)
/*link direct data of ID properties*/
if (id->properties) {
id->properties = newdataadr(fd, id->properties);
- if (id->properties) { /* this case means the data was written incorrectly, it should not happen */
- IDP_DirectLinkProperty(id->properties, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
- }
+ /* this case means the data was written incorrectly, it should not happen */
+ IDP_DirectLinkGroup_OrFree(&id->properties, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
}
}
@@ -2044,7 +2061,7 @@ static void direct_link_fmodifiers(FileData *fd, ListBase *list)
FMod_Python *data = (FMod_Python *)fcm->data;
data->prop = newdataadr(fd, data->prop);
- IDP_DirectLinkProperty(data->prop, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
+ IDP_DirectLinkGroup_OrFree(&data->prop, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
}
break;
}
@@ -2599,8 +2616,7 @@ static void lib_verify_nodetree(Main *main, int UNUSED(open))
static void direct_link_node_socket(FileData *fd, bNodeSocket *sock)
{
sock->prop = newdataadr(fd, sock->prop);
- if (sock->prop)
- IDP_DirectLinkProperty(sock->prop, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
+ IDP_DirectLinkGroup_OrFree(&sock->prop, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
sock->link = newdataadr(fd, sock->link);
sock->typeinfo = NULL;
@@ -2638,8 +2654,7 @@ static void direct_link_nodetree(FileData *fd, bNodeTree *ntree)
link_list(fd, &node->outputs);
node->prop = newdataadr(fd, node->prop);
- if (node->prop)
- IDP_DirectLinkProperty(node->prop, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
+ IDP_DirectLinkGroup_OrFree(&node->prop, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
link_list(fd, &node->internal_links);
for (link = node->internal_links.first; link; link = link->next) {
@@ -2797,8 +2812,7 @@ static void direct_link_constraints(FileData *fd, ListBase *lb)
link_list(fd, &data->targets);
data->prop = newdataadr(fd, data->prop);
- if (data->prop)
- IDP_DirectLinkProperty(data->prop, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
+ IDP_DirectLinkGroup_OrFree(&data->prop, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
break;
}
case CONSTRAINT_TYPE_SPLINEIK:
@@ -2897,8 +2911,7 @@ static void direct_link_bones(FileData *fd, Bone *bone)
bone->parent = newdataadr(fd, bone->parent);
bone->prop = newdataadr(fd, bone->prop);
- if (bone->prop)
- IDP_DirectLinkProperty(bone->prop, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
+ IDP_DirectLinkGroup_OrFree(&bone->prop, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
bone->flag &= ~BONE_DRAW_ACTIVE;
@@ -3123,7 +3136,6 @@ static void direct_link_mball(FileData *fd, MetaBall *mb)
mb->disp.first = mb->disp.last = NULL;
mb->editelems = NULL;
- mb->bb = NULL;
/* mb->edit_elems.first= mb->edit_elems.last= NULL;*/
mb->lastelem = NULL;
}
@@ -3399,11 +3411,9 @@ static void direct_link_curve(FileData *fd, Curve *cu)
if (cu->wordspace == 0.0f) cu->wordspace = 1.0f;
}
- cu->bev.first = cu->bev.last = NULL;
cu->disp.first = cu->disp.last = NULL;
cu->editnurb = NULL;
cu->lastsel = NULL;
- cu->path = NULL;
cu->editfont = NULL;
for (nu = cu->nurb.first; nu; nu = nu->next) {
@@ -3690,7 +3700,7 @@ static void lib_link_particlesettings(FileData *fd, Main *main)
/* if we have indexes, let's use them */
for (dw = part->dupliweights.first; dw; dw = dw->next) {
GroupObject *go = (GroupObject *)BLI_findlink(&part->dup_group->gobject, dw->index);
- dw->ob = go ? newlibadr(fd, part->id.lib, dw->ob) : NULL;
+ dw->ob = go ? go->ob : NULL;
}
}
else {
@@ -3796,7 +3806,7 @@ static void lib_link_particlesystems(FileData *fd, Object *ob, ID *id, ListBase
for (; pt; pt=pt->next)
pt->ob=newlibadr(fd, id->lib, pt->ob);
- psys->parent = newlibadr_us(fd, id->lib, psys->parent);
+ psys->parent = newlibadr(fd, id->lib, psys->parent);
psys->target_ob = newlibadr(fd, id->lib, psys->target_ob);
if (psys->clmd) {
@@ -4106,6 +4116,8 @@ static void direct_link_customdata(FileData *fd, CustomData *data, int count)
if (layer->flag & CD_FLAG_EXTERNAL)
layer->flag &= ~CD_FLAG_IN_MEMORY;
+
+ layer->flag &= ~CD_FLAG_NOFREE;
if (CustomData_verify_versions(data, i)) {
layer->data = newdataadr(fd, layer->data);
@@ -4152,7 +4164,7 @@ static void direct_link_mesh(FileData *fd, Mesh *mesh)
direct_link_customdata(fd, &mesh->fdata, mesh->totface);
direct_link_customdata(fd, &mesh->ldata, mesh->totloop);
direct_link_customdata(fd, &mesh->pdata, mesh->totpoly);
-
+
mesh->bb = NULL;
mesh->edit_btmesh = NULL;
@@ -4161,6 +4173,12 @@ static void direct_link_mesh(FileData *fd, Mesh *mesh)
mesh->totselect = 0;
}
+ if (mesh->mloopuv || mesh->mtpoly) {
+ /* for now we have to ensure texpoly and mloopuv layers are aligned
+ * in the future we may allow non-aligned layers */
+ BKE_mesh_cd_validate(mesh);
+ }
+
/* Multires data */
mesh->mr= newdataadr(fd, mesh->mr);
if (mesh->mr) {
@@ -4373,12 +4391,8 @@ static void lib_link_object(FileData *fd, Main *main)
for (sens = ob->sensors.first; sens; sens = sens->next) {
for (a = 0; a < sens->totlinks; a++)
sens->links[a] = newglobadr(fd, sens->links[a]);
-
- if (sens->type == SENS_TOUCH) {
- bTouchSensor *ts = sens->data;
- ts->ma = newlibadr(fd, ob->id.lib, ts->ma);
- }
- else if (sens->type == SENS_MESSAGE) {
+
+ if (sens->type == SENS_MESSAGE) {
bMessageSensor *ms = sens->data;
ms->fromObject =
newlibadr(fd, ob->id.lib, ms->fromObject);
@@ -4536,8 +4550,7 @@ static void direct_link_pose(FileData *fd, bPose *pose)
direct_link_constraints(fd, &pchan->constraints);
pchan->prop = newdataadr(fd, pchan->prop);
- if (pchan->prop)
- IDP_DirectLinkProperty(pchan->prop, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
+ IDP_DirectLinkGroup_OrFree(&pchan->prop, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
pchan->mpath = newdataadr(fd, pchan->mpath);
if (pchan->mpath)
@@ -4829,8 +4842,6 @@ static void direct_link_object(FileData *fd, Object *ob)
ob->mode &= ~(OB_MODE_EDIT | OB_MODE_PARTICLE_EDIT);
}
- ob->disp.first = ob->disp.last = NULL;
-
ob->adt = newdataadr(fd, ob->adt);
direct_link_animdata(fd, ob->adt);
@@ -5025,6 +5036,9 @@ static void direct_link_object(FileData *fd, Object *ob)
ob->gpulamp.first= ob->gpulamp.last = NULL;
link_list(fd, &ob->pc_ids);
+ /* Runtime curve data */
+ ob->curve_cache = NULL;
+
/* in case this value changes in future, clamp else we get undefined behavior */
CLAMP(ob->rotmode, ROT_MODE_MIN, ROT_MODE_MAX);
@@ -5433,20 +5447,17 @@ static void direct_link_scene(FileData *fd, Scene *sce)
}
if (sce->r.ffcodecdata.properties) {
sce->r.ffcodecdata.properties = newdataadr(fd, sce->r.ffcodecdata.properties);
- if (sce->r.ffcodecdata.properties) {
- IDP_DirectLinkProperty(sce->r.ffcodecdata.properties,
- (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
- }
+ IDP_DirectLinkGroup_OrFree(&sce->r.ffcodecdata.properties, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
}
link_list(fd, &(sce->markers));
link_list(fd, &(sce->transform_spaces));
link_list(fd, &(sce->r.layers));
- for(srl = sce->r.layers.first; srl; srl = srl->next) {
+ for (srl = sce->r.layers.first; srl; srl = srl->next) {
link_list(fd, &(srl->freestyleConfig.modules));
}
- for(srl = sce->r.layers.first; srl; srl = srl->next) {
+ for (srl = sce->r.layers.first; srl; srl = srl->next) {
link_list(fd, &(srl->freestyleConfig.linesets));
}
@@ -5703,12 +5714,8 @@ static void lib_link_screen(FileData *fd, Main *main)
tselem->id = newlibadr(fd, NULL, tselem->id);
}
if (so->treehash) {
- /* update hash table, because it depends on ids too */
- BLI_ghash_clear(so->treehash, NULL, NULL);
- BLI_mempool_iternew(so->treestore, &iter);
- while ((tselem = BLI_mempool_iterstep(&iter))) {
- BLI_ghash_insert(so->treehash, tselem, tselem);
- }
+ /* rebuild hash table, because it depends on ids too */
+ BKE_treehash_rebuild_from_treestore(so->treehash, so->treestore);
}
}
}
@@ -6044,12 +6051,8 @@ void blo_lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *cursc
tselem->id = restore_pointer_by_name(newmain, tselem->id, 0);
}
if (so->treehash) {
- /* update hash table, because it depends on ids too */
- BLI_ghash_clear(so->treehash, NULL, NULL);
- BLI_mempool_iternew(so->treestore, &iter);
- while ((tselem = BLI_mempool_iterstep(&iter))) {
- BLI_ghash_insert(so->treehash, tselem, tselem);
- }
+ /* rebuild hash table, because it depends on ids too */
+ BKE_treehash_rebuild_from_treestore(so->treehash, so->treestore);
}
}
}
@@ -6136,6 +6139,9 @@ static void direct_link_region(FileData *fd, ARegion *ar, int spacetype)
for (ui_list = ar->ui_lists.first; ui_list; ui_list = ui_list->next) {
ui_list->type = NULL;
+ ui_list->dyn_data = NULL;
+ ui_list->properties = newdataadr(fd, ui_list->properties);
+ IDP_DirectLinkGroup_OrFree(&ui_list->properties, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
}
if (spacetype == SPACE_EMPTY) {
@@ -6324,7 +6330,7 @@ static bool direct_link_screen(FileData *fd, bScreen *sc)
else if (sl->spacetype == SPACE_OUTLINER) {
SpaceOops *soops = (SpaceOops *) sl;
- /* use newdataadr_no_us and do not free old memory avoidign double
+ /* use newdataadr_no_us and do not free old memory avoiding double
* frees and use of freed memory. this could happen because of a
* bug fixed in revision 58959 where the treestore memory address
* was not unique */
@@ -7033,16 +7039,16 @@ static void direct_link_linestyle(FileData *fd, FreestyleLineStyle *linestyle)
linestyle->adt= newdataadr(fd, linestyle->adt);
direct_link_animdata(fd, linestyle->adt);
link_list(fd, &linestyle->color_modifiers);
- for(modifier = linestyle->color_modifiers.first; modifier; modifier = modifier->next)
+ for (modifier = linestyle->color_modifiers.first; modifier; modifier = modifier->next)
direct_link_linestyle_color_modifier(fd, modifier);
link_list(fd, &linestyle->alpha_modifiers);
- for(modifier = linestyle->alpha_modifiers.first; modifier; modifier = modifier->next)
+ for (modifier = linestyle->alpha_modifiers.first; modifier; modifier = modifier->next)
direct_link_linestyle_alpha_modifier(fd, modifier);
link_list(fd, &linestyle->thickness_modifiers);
- for(modifier = linestyle->thickness_modifiers.first; modifier; modifier = modifier->next)
+ for (modifier = linestyle->thickness_modifiers.first; modifier; modifier = modifier->next)
direct_link_linestyle_thickness_modifier(fd, modifier);
link_list(fd, &linestyle->geometry_modifiers);
- for(modifier = linestyle->geometry_modifiers.first; modifier; modifier = modifier->next)
+ for (modifier = linestyle->geometry_modifiers.first; modifier; modifier = modifier->next)
direct_link_linestyle_geometry_modifier(fd, modifier);
}
@@ -7079,7 +7085,9 @@ static const char *dataname(short id_code)
case ID_BR: return "Data from BR";
case ID_PA: return "Data from PA";
case ID_GD: return "Data from GD";
+ case ID_WM: return "Data from WM";
case ID_MC: return "Data from MC";
+ case ID_MSK: return "Data from MSK";
case ID_LS: return "Data from LS";
}
return "Data from Lib Block";
@@ -7148,7 +7156,7 @@ static BHead *read_libblock(FileData *fd, Main *main, BHead *bhead, int flag, ID
if (id->flag & LIB_FAKEUSER) id->us= 1;
else id->us = 0;
id->icon_id = 0;
- id->flag &= ~(LIB_ID_RECALC|LIB_ID_RECALC_DATA);
+ id->flag &= ~(LIB_ID_RECALC|LIB_ID_RECALC_DATA|LIB_DOIT);
/* this case cannot be direct_linked: it's just the ID part */
if (bhead->code == ID_ID) {
@@ -9081,17 +9089,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
}
-
- /* fallbck resection method settings */
- {
- MovieClip *clip;
-
- for (clip = main->movieclip.first; clip; clip = clip->id.next) {
- if (clip->tracking.settings.reconstruction_success_threshold == 0.0f) {
- clip->tracking.settings.reconstruction_success_threshold = 1e-3f;
- }
- }
- }
}
if (main->versionfile < 264 || (main->versionfile == 264 && main->subversionfile < 7)) {
@@ -9455,12 +9452,12 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
SceneRenderLayer *srl;
FreestyleLineStyle *linestyle;
- for(sce = main->scene.first; sce; sce = sce->id.next) {
+ for (sce = main->scene.first; sce; sce = sce->id.next) {
if (sce->r.line_thickness_mode == 0) {
sce->r.line_thickness_mode = R_LINE_THICKNESS_ABSOLUTE;
sce->r.unit_line_thickness = 1.0f;
}
- for(srl = sce->r.layers.first; srl; srl = srl->next) {
+ for (srl = sce->r.layers.first; srl; srl = srl->next) {
if (srl->freestyleConfig.mode == 0)
srl->freestyleConfig.mode = FREESTYLE_CONTROL_EDITOR_MODE;
if (srl->freestyleConfig.raycasting_algorithm == FREESTYLE_ALGO_CULLED_ADAPTIVE_CUMULATIVE ||
@@ -9490,7 +9487,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
- for(linestyle = main->linestyle.first; linestyle; linestyle = linestyle->id.next) {
+ for (linestyle = main->linestyle.first; linestyle; linestyle = linestyle->id.next) {
#if 1
/* disable the Misc panel for now */
if (linestyle->panel == LS_PANEL_MISC) {
@@ -9543,8 +9540,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
- if (MAIN_VERSION_OLDER(main, 267, 1))
- {
+ if (MAIN_VERSION_OLDER(main, 267, 1)) {
Object *ob;
for (ob = main->object.first; ob; ob = ob->id.next) {
@@ -9578,21 +9574,35 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
for (brush = main->brush.first; brush; brush = brush->id.next) {
brush->flag &= ~BRUSH_FIXED;
- if(brush->cursor_overlay_alpha < 2)
+ if (brush->cursor_overlay_alpha < 2)
brush->cursor_overlay_alpha = 33;
- if(brush->texture_overlay_alpha < 2)
+ if (brush->texture_overlay_alpha < 2)
brush->texture_overlay_alpha = 33;
- if(brush->mask_overlay_alpha <2)
+ if (brush->mask_overlay_alpha <2)
brush->mask_overlay_alpha = 33;
}
#undef BRUSH_FIXED
}
- {
+
+ if (!MAIN_VERSION_ATLEAST(main, 268, 4)) {
bScreen *sc;
Object *ob;
for (ob = main->object.first; ob; ob = ob->id.next) {
+ bConstraint *con;
+ for (con = ob->constraints.first; con; con = con->next) {
+ if (con->type == CONSTRAINT_TYPE_SHRINKWRAP) {
+ bShrinkwrapConstraint *data = (bShrinkwrapConstraint *)con->data;
+ if (data->projAxis & MOD_SHRINKWRAP_PROJECT_OVER_X_AXIS) data->projAxis = OB_POSX;
+ else if (data->projAxis & MOD_SHRINKWRAP_PROJECT_OVER_Y_AXIS) data->projAxis = OB_POSY;
+ else data->projAxis = OB_POSZ;
+ data->projAxisSpace = CONSTRAINT_SPACE_LOCAL;
+ }
+ }
+ }
+
+ for (ob = main->object.first; ob; ob = ob->id.next) {
ModifierData *md;
for (md = ob->modifiers.first; md; md = md->next) {
if (md->type == eModifierType_Smoke) {
@@ -9625,12 +9635,133 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
}
+
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ bSensor *sens;
+ bTouchSensor *ts;
+ bCollisionSensor *cs;
+ Material *ma;
+
+ for (sens = ob->sensors.first; sens; sens = sens->next) {
+ if (sens->type == SENS_TOUCH) {
+ ts = sens->data;
+ cs = MEM_callocN(sizeof(bCollisionSensor), "touch -> collision sensor do_version");
+
+ if (ts->ma) {
+ ma = blo_do_versions_newlibadr(fd, ob->id.lib, ts->ma);
+ BLI_strncpy(cs->materialName, ma->id.name+2, sizeof(cs->materialName));
+ }
+
+ cs->mode = SENS_COLLISION_MATERIAL;
+
+ MEM_freeN(ts);
+
+ sens->data = cs;
+ sens->type = sens->otype = SENS_COLLISION;
+ }
+ }
+ }
+ }
+
+ if (!MAIN_VERSION_ATLEAST(main, 268, 5)) {
+ bScreen *sc;
+ ScrArea *sa;
+
+ /* add missing (+) expander in node editor */
+ for (sc = main->screen.first; sc; sc = sc->id.next) {
+ for (sa = sc->areabase.first; sa; sa = sa->next) {
+ ARegion *ar, *arnew;
+
+ if (sa->spacetype == SPACE_NODE) {
+ ar = BKE_area_find_region_type(sa, RGN_TYPE_TOOLS);
+
+ if (ar)
+ continue;
+
+ /* add subdiv level; after header */
+ ar = BKE_area_find_region_type(sa, RGN_TYPE_HEADER);
+
+ /* is error! */
+ if (ar == NULL)
+ continue;
+
+ arnew = MEM_callocN(sizeof(ARegion), "node tools");
+
+ BLI_insertlinkafter(&sa->regionbase, ar, arnew);
+ arnew->regiontype = RGN_TYPE_TOOLS;
+ arnew->alignment = RGN_ALIGN_LEFT;
+
+ arnew->flag = RGN_FLAG_HIDDEN;
+ }
+ }
+ }
+ }
+
+ if (!MAIN_VERSION_ATLEAST(main, 269, 1)) {
+ /* Removal of Cycles SSS Compatible falloff */
+ FOREACH_NODETREE(main, ntree, id) {
+ if (ntree->type == NTREE_SHADER) {
+ bNode *node;
+ for (node = ntree->nodes.first; node; node = node->next) {
+ if (node->type == SH_NODE_SUBSURFACE_SCATTERING) {
+ if (node->custom1 == SHD_SUBSURFACE_COMPATIBLE) {
+ node->custom1 = SHD_SUBSURFACE_CUBIC;
+ }
+ }
+ }
+ }
+ } FOREACH_NODETREE_END
+ }
+
+ {
+ bScreen *sc;
+ ScrArea *sa;
+ SpaceLink *sl;
+
+ /* Update files using invalid (outdated) outlinevis Outliner values. */
+ for (sc = main->screen.first; sc; sc = sc->id.next) {
+ for (sa = sc->areabase.first; sa; sa = sa->next) {
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_OUTLINER) {
+ SpaceOops *so = (SpaceOops *)sl;
+
+ if (!ELEM11(so->outlinevis, SO_ALL_SCENES, SO_CUR_SCENE, SO_VISIBLE, SO_SELECTED, SO_ACTIVE,
+ SO_SAME_TYPE, SO_GROUPS, SO_LIBRARIES, SO_SEQUENCE, SO_DATABLOCKS,
+ SO_USERDEF))
+ {
+ so->outlinevis = SO_ALL_SCENES;
+ }
+ }
+ }
+ }
+ }
+
+ if (!DNA_struct_elem_find(fd->filesdna, "MovieTrackingTrack", "float", "weight")) {
+ MovieClip *clip;
+ for (clip = main->movieclip.first; clip; clip = clip->id.next) {
+ MovieTracking *tracking = &clip->tracking;
+ MovieTrackingObject *tracking_object;
+ for (tracking_object = tracking->objects.first;
+ tracking_object;
+ tracking_object = tracking_object->next)
+ {
+ ListBase *tracksbase = BKE_tracking_object_get_tracks(tracking, tracking_object);
+ MovieTrackingTrack *track;
+ for (track = tracksbase->first;
+ track;
+ track = track->next)
+ {
+ track->weight = 1.0f;
+ }
+ }
+ }
+ }
}
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
/* WATCH IT 2!: Userdef struct init see do_versions_userdef() above! */
- /* don't forget to set version number in blender.c! */
+ /* don't forget to set version number in BKE_blender.h! */
}
#if 0 // XXX: disabled for now... we still don't have this in the right place in the loading code for it to work
@@ -9686,8 +9817,7 @@ static void lib_link_all(FileData *fd, Main *main)
static void direct_link_keymapitem(FileData *fd, wmKeyMapItem *kmi)
{
kmi->properties = newdataadr(fd, kmi->properties);
- if (kmi->properties)
- IDP_DirectLinkProperty(kmi->properties, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
+ IDP_DirectLinkGroup_OrFree(&kmi->properties, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
kmi->ptr = NULL;
kmi->flag &= ~KMI_UPDATE;
}
@@ -9744,9 +9874,7 @@ static BHead *read_userdef(BlendFileData *bfd, FileData *fd, BHead *bhead)
for (addon = user->addons.first; addon; addon = addon->next) {
addon->prop = newdataadr(fd, addon->prop);
- if (addon->prop) {
- IDP_DirectLinkProperty(addon->prop, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
- }
+ IDP_DirectLinkGroup_OrFree(&addon->prop, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
}
// XXX
@@ -10526,11 +10654,7 @@ static void expand_object(FileData *fd, Main *mainvar, Object *ob)
expand_doit(fd, mainvar, psys->part);
for (sens = ob->sensors.first; sens; sens = sens->next) {
- if (sens->type == SENS_TOUCH) {
- bTouchSensor *ts = sens->data;
- expand_doit(fd, mainvar, ts->ma);
- }
- else if (sens->type == SENS_MESSAGE) {
+ if (sens->type == SENS_MESSAGE) {
bMessageSensor *ms = sens->data;
expand_doit(fd, mainvar, ms->fromObject);
}
@@ -10954,13 +11078,17 @@ static void give_base_to_groups(Main *mainvar, Scene *scene)
{
Group *group;
- /* give all objects which are LIB_INDIRECT a base, or for a group when *lib has been set */
+ /* give all objects which are tagged a base */
for (group = mainvar->group.first; group; group = group->id.next) {
- if (((group->id.flag & LIB_INDIRECT)==0 && (group->id.flag & LIB_PRE_EXISTING)==0)) {
+ if (group->id.flag & LIB_DOIT) {
Base *base;
+ Object *ob;
+
+ /* any indirect group should not have been tagged */
+ BLI_assert((group->id.flag & LIB_INDIRECT)==0);
/* BKE_object_add(...) messes with the selection */
- Object *ob = BKE_object_add_only_object(mainvar, OB_EMPTY, group->id.name + 2);
+ ob = BKE_object_add_only_object(mainvar, OB_EMPTY, group->id.name + 2);
ob->type = OB_EMPTY;
ob->lay = scene->lay;
@@ -11085,6 +11213,11 @@ static ID *append_named_part_ex(const bContext *C, Main *mainl, FileData *fd, co
}
}
}
+ else if (id && (GS(id->name) == ID_GR)) {
+ /* tag as needing to be instanced */
+ if (flag & FILE_GROUP_INSTANCE)
+ id->flag |= LIB_DOIT;
+ }
return id;
}
@@ -11130,6 +11263,9 @@ static Main *library_append_begin(Main *mainvar, FileData **fd, const char *file
(*fd)->mainlist = MEM_callocN(sizeof(ListBase), "FileData.mainlist");
+ /* clear for group instancing tag */
+ tag_main_lb(&(mainvar->group), 0);
+
/* make mains */
blo_split_main((*fd)->mainlist, mainvar);
@@ -11206,6 +11342,10 @@ static void library_append_end(const bContext *C, Main *mainl, FileData **fd, in
printf("library_append_end, scene is NULL (objects wont get bases)\n");
}
}
+
+ /* clear group instancing tag */
+ tag_main_lb(&(mainvar->group), 0);
+
/* has been removed... erm, why? s..ton) */
/* 20040907: looks like they are give base already in append_named_part(); -Nathan L */
/* 20041208: put back. It only linked direct, not indirect objects (ton) */
diff --git a/source/blender/blenloader/intern/undofile.c b/source/blender/blenloader/intern/undofile.c
index 2b63d13a9dd..12f4a295a34 100644
--- a/source/blender/blenloader/intern/undofile.c
+++ b/source/blender/blenloader/intern/undofile.c
@@ -51,9 +51,9 @@ void BLO_free_memfile(MemFile *memfile)
{
MemFileChunk *chunk;
- while ( (chunk = (memfile->chunks.first) ) ) {
- if (chunk->ident == 0) MEM_freeN(chunk->buf);
- BLI_remlink(&memfile->chunks, chunk);
+ while ((chunk = BLI_pophead(&memfile->chunks))) {
+ if (chunk->ident == 0)
+ MEM_freeN(chunk->buf);
MEM_freeN(chunk);
}
memfile->size = 0;
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
new file mode 100644
index 00000000000..6a0f1747d2f
--- /dev/null
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -0,0 +1,57 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor(s): Blender Foundation
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ *
+ */
+
+/** \file blender/blenloader/intern/versioning_defaults.c
+ * \ingroup blenloader
+ */
+
+#include "BLI_utildefines.h"
+
+#include "DNA_freestyle_types.h"
+#include "DNA_linestyle_types.h"
+#include "DNA_scene_types.h"
+#include "DNA_userdef_types.h"
+
+#include "BKE_main.h"
+
+#include "BLO_readfile.h"
+
+/* Update defaults in startup.blend, without having to save and embed the file.
+ * This function can be emptied each time the startup.blend is updated. */
+void BLO_update_defaults_startup_blend(Main *main)
+{
+ Scene *scene;
+ SceneRenderLayer *srl;
+ FreestyleLineStyle *linestyle;
+
+ for (scene = main->scene.first; scene; scene = scene->id.next) {
+ scene->r.im_format.planes = R_IMF_PLANES_RGBA;
+
+ for (srl = scene->r.layers.first; srl; srl = srl->next)
+ srl->freestyleConfig.sphere_radius = 0.1f;
+ }
+
+ for (linestyle = main->linestyle.first; linestyle; linestyle = linestyle->id.next)
+ linestyle->flag = LS_SAME_OBJECT;
+}
+
diff --git a/source/blender/blenloader/intern/versioning_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c
index 82040020ce4..067a8629906 100644
--- a/source/blender/blenloader/intern/versioning_legacy.c
+++ b/source/blender/blenloader/intern/versioning_legacy.c
@@ -518,11 +518,8 @@ static void do_version_free_effects_245(ListBase *lb)
{
Effect *eff;
- eff = lb->first;
- while (eff) {
- BLI_remlink(lb, eff);
+ while ((eff = BLI_pophead(lb))) {
do_version_free_effect_245(eff);
- eff = lb->first;
}
}
@@ -1997,15 +1994,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main)
while (sce) {
if (sce->toolsettings == NULL) {
sce->toolsettings = MEM_callocN(sizeof(struct ToolSettings), "Tool Settings Struct");
- sce->toolsettings->cornertype =0;
- sce->toolsettings->degr = 90;
- sce->toolsettings->step = 9;
- sce->toolsettings->turn = 1;
- sce->toolsettings->extr_offs = 1;
sce->toolsettings->doublimit = 0.001f;
- sce->toolsettings->segments = 32;
- sce->toolsettings->rings = 32;
- sce->toolsettings->vertices = 32;
}
sce = sce->id.next;
}
@@ -2092,7 +2081,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main)
for (me = main->mesh.first; me; me = me->id.next) {
if (!me->medge) {
- BKE_mesh_make_edges(me, 1); /* 1 = use mface->edcode */
+ BKE_mesh_calc_edges_legacy(me, true); /* true = use mface->edcode */
}
else {
BKE_mesh_strip_loose_faces(me);
@@ -2152,9 +2141,6 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main)
}
for (; sce; sce = sce->id.next) {
- /* make 'innervert' the default subdivide type, for backwards compat */
- sce->toolsettings->cornertype = 1;
-
if (sce->r.scemode & R_PASSEPARTOUT) {
set_passepartout = 1;
sce->r.scemode &= ~R_PASSEPARTOUT;
@@ -2241,11 +2227,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main)
ntree_version_241(sce->nodetree);
/* uv calculation options moved to toolsettings */
- if (sce->toolsettings->uvcalc_radius == 0.0f) {
- sce->toolsettings->uvcalc_radius = 1.0f;
- sce->toolsettings->uvcalc_cubesize = 1.0f;
- sce->toolsettings->uvcalc_mapdir = 1;
- sce->toolsettings->uvcalc_mapalign = 1;
+ if (sce->toolsettings->unwrapper == 0) {
sce->toolsettings->uvcalc_flag = UVCALC_FILLHOLES;
sce->toolsettings->unwrapper = 1;
}
@@ -2346,8 +2328,6 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main)
for (sce = main->scene.first; sce; sce = sce->id.next) {
if (sce->toolsettings->select_thresh == 0.0f)
sce->toolsettings->select_thresh = 0.01f;
- if (sce->toolsettings->clean_thresh == 0.0f)
- sce->toolsettings->clean_thresh = 0.1f;
if (sce->r.threads == 0) {
if (sce->r.mode & R_THREADS)
@@ -2557,14 +2537,6 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main)
sce->r.bake_flag = R_BAKE_CLEAR;
}
}
-
- if (main->subversionfile < 5) {
- for (sce = main->scene.first; sce; sce = sce->id.next) {
- /* improved triangle to quad conversion settings */
- if (sce->toolsettings->jointrilimit == 0.0f)
- sce->toolsettings->jointrilimit = 0.8f;
- }
- }
}
if (main->versionfile <= 243) {
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index f3d58c42bc8..83122e24b34 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -1108,9 +1108,6 @@ static void write_sensors(WriteData *wd, ListBase *lb)
case SENS_MOUSE:
writestruct(wd, DATA, "bMouseSensor", 1, sens->data);
break;
- case SENS_TOUCH:
- writestruct(wd, DATA, "bTouchSensor", 1, sens->data);
- break;
case SENS_KEYBOARD:
writestruct(wd, DATA, "bKeyboardSensor", 1, sens->data);
break;
@@ -1739,7 +1736,7 @@ static void write_grid_paint_mask(WriteData *wd, int count, GridPaintMask *grid_
for (i = 0; i < count; ++i) {
GridPaintMask *gpm = &grid_paint_mask[i];
if (gpm->data) {
- const int gridsize = ccg_gridsize(gpm->level);
+ const int gridsize = BKE_ccg_gridsize(gpm->level);
writedata(wd, DATA,
sizeof(*gpm->data) * gridsize * gridsize,
gpm->data);
@@ -1750,16 +1747,26 @@ static void write_grid_paint_mask(WriteData *wd, int count, GridPaintMask *grid_
static void write_customdata(WriteData *wd, ID *id, int count, CustomData *data, int partial_type, int partial_count)
{
+ CustomData data_tmp;
int i;
+ /* This copy will automatically ignore/remove layers set as NO_COPY (and TEMPORARY). */
+ CustomData_copy(data, &data_tmp, CD_MASK_EVERYTHING, CD_REFERENCE, count);
+
/* write external customdata (not for undo) */
- if (data->external && !wd->current)
- CustomData_external_write(data, id, CD_MASK_MESH, count, 0);
+ if (data_tmp.external && !wd->current)
+ CustomData_external_write(&data_tmp, id, CD_MASK_MESH, count, 0);
- writestruct(wd, DATA, "CustomDataLayer", data->maxlayer, data->layers);
+ for (i = 0; i < data_tmp.totlayer; i++)
+ data_tmp.layers[i].flag &= ~CD_FLAG_NOFREE;
+
+ writestruct_at_address(wd, DATA, "CustomDataLayer", data_tmp.maxlayer, data->layers, data_tmp.layers);
+
+ for (i = 0; i < data_tmp.totlayer; i++)
+ data_tmp.layers[i].flag |= CD_FLAG_NOFREE;
- for (i=0; i<data->totlayer; i++) {
- CustomDataLayer *layer= &data->layers[i];
+ for (i = 0; i < data_tmp.totlayer; i++) {
+ CustomDataLayer *layer= &data_tmp.layers[i];
const char *structname;
int structnum, datasize;
@@ -1795,11 +1802,13 @@ static void write_customdata(WriteData *wd, ID *id, int count, CustomData *data,
}
}
- if (data->external)
- writestruct(wd, DATA, "CustomDataExternal", 1, data->external);
+ if (data_tmp.external)
+ writestruct_at_address(wd, DATA, "CustomDataExternal", 1, data->external, data_tmp.external);
+
+ CustomData_free(&data_tmp, count);
}
-static void write_meshs(WriteData *wd, ListBase *idbase)
+static void write_meshes(WriteData *wd, ListBase *idbase)
{
Mesh *mesh;
int save_for_old_blender= 0;
@@ -2394,6 +2403,15 @@ static void write_region(WriteData *wd, ARegion *ar, int spacetype)
}
}
+static void write_uilist(WriteData *wd, uiList *ui_list)
+{
+ writestruct(wd, DATA, "uiList", 1, ui_list);
+
+ if (ui_list->properties) {
+ IDP_WriteProperty(ui_list->properties, wd);
+ }
+}
+
static void write_soops(WriteData *wd, SpaceOops *so, LinkNode **tmp_mem_list)
{
BLI_mempool *ts = so->treestore;
@@ -2421,8 +2439,8 @@ static void write_soops(WriteData *wd, SpaceOops *so, LinkNode **tmp_mem_list)
* outliners in a screen we might get the same address on the next
* malloc, which makes the address no longer unique and so invalid for
* lookups on file read, causing crashes or double frees */
- BLI_linklist_append(tmp_mem_list, ts_flat);
- BLI_linklist_append(tmp_mem_list, data);
+ BLI_linklist_prepend(tmp_mem_list, ts_flat);
+ BLI_linklist_prepend(tmp_mem_list, data);
}
else {
so->treestore = NULL;
@@ -2431,7 +2449,8 @@ static void write_soops(WriteData *wd, SpaceOops *so, LinkNode **tmp_mem_list)
/* restore old treestore */
so->treestore = ts;
- } else {
+ }
+ else {
writestruct(wd, DATA, "SpaceOops", 1, so);
}
}
@@ -2475,7 +2494,7 @@ static void write_screens(WriteData *wd, ListBase *scrbase)
writestruct(wd, DATA, "Panel", 1, pa);
for (ui_list = ar->ui_lists.first; ui_list; ui_list = ui_list->next)
- writestruct(wd, DATA, "uiList", 1, ui_list);
+ write_uilist(wd, ui_list);
}
sl= sa->spacedata.first;
@@ -2884,9 +2903,6 @@ static void write_brushes(WriteData *wd, ListBase *idbase)
writestruct(wd, ID_BR, "Brush", 1, brush);
if (brush->id.properties) IDP_WriteProperty(brush->id.properties, wd);
- writestruct(wd, DATA, "MTex", 1, &brush->mtex);
- writestruct(wd, DATA, "MTex", 1, &brush->mask_mtex);
-
if (brush->curve)
write_curvemapping(wd, brush->curve);
}
@@ -3347,7 +3363,7 @@ static int write_file_handle(Main *mainvar, int handle, MemFile *compare, MemFil
write_objects (wd, &mainvar->object);
write_materials(wd, &mainvar->mat);
write_textures (wd, &mainvar->tex);
- write_meshs (wd, &mainvar->mesh);
+ write_meshes (wd, &mainvar->mesh);
write_particlesettings(wd, &mainvar->particle);
write_nodetrees(wd, &mainvar->nodetree);
write_brushes (wd, &mainvar->brush);
diff --git a/source/blender/bmesh/CMakeLists.txt b/source/blender/bmesh/CMakeLists.txt
index 228ebcb96c4..b80a10b43fe 100644
--- a/source/blender/bmesh/CMakeLists.txt
+++ b/source/blender/bmesh/CMakeLists.txt
@@ -41,6 +41,7 @@ set(INC_SYS
set(SRC
operators/bmo_beautify.c
operators/bmo_bevel.c
+ operators/bmo_bisect_plane.c
operators/bmo_bridge.c
operators/bmo_connect.c
operators/bmo_connect_nonplanar.c
@@ -50,6 +51,7 @@ set(SRC
operators/bmo_dupe.c
operators/bmo_edgenet.c
operators/bmo_extrude.c
+ operators/bmo_fill_attribute.c
operators/bmo_fill_edgeloop.c
operators/bmo_fill_grid.c
operators/bmo_fill_holes.c
@@ -117,12 +119,18 @@ set(SRC
intern/bmesh_operator_api.h
intern/bmesh_error.h
+ tools/bmesh_beautify.c
+ tools/bmesh_beautify.h
tools/bmesh_bevel.c
tools/bmesh_bevel.h
+ tools/bmesh_bisect_plane.c
+ tools/bmesh_bisect_plane.h
tools/bmesh_decimate_collapse.c
tools/bmesh_decimate_dissolve.c
tools/bmesh_decimate_unsubdivide.c
tools/bmesh_decimate.h
+ tools/bmesh_edgenet.c
+ tools/bmesh_edgenet.h
tools/bmesh_edgesplit.c
tools/bmesh_edgesplit.h
tools/bmesh_path.c
@@ -130,8 +138,11 @@ set(SRC
tools/bmesh_triangulate.c
tools/bmesh_triangulate.h
- bmesh.h
bmesh_class.h
+
+ # public includes
+ bmesh.h
+ bmesh_tools.h
)
if(MSVC)
diff --git a/source/blender/bmesh/bmesh.h b/source/blender/bmesh/bmesh.h
index d1d93bbfd1d..52aeff77fca 100644
--- a/source/blender/bmesh/bmesh.h
+++ b/source/blender/bmesh/bmesh.h
@@ -45,9 +45,9 @@
* \subsection bm_header_flags Header Flags
* Each element (vertex/edge/face/loop) in a mesh has an associated bit-field called "header flags".
*
- * BMHeader flags should <b>never</b> be read or written to by bmesh operators (see Operators below).
+ * BMHeader flags should **never** be read or written to by bmesh operators (see Operators below).
*
- * Access to header flags is done with BM_elem_flag_*() functions.
+ * Access to header flags is done with ``BM_elem_flag_*()`` functions.
*
*
* \subsection bm_faces Faces
@@ -64,7 +64,8 @@
* Loops store several handy pointers:
*
* - BMLoop#v - pointer to the vertex associated with this loop.
- * - BMLoop#e - pointer to the edge associated with this loop.
+ * - BMLoop#e - pointer to the edge associated with this loop,
+ * between verts ``(loop->v, loop->next->v)``
* - BMLoop#f - pointer to the face associated with this loop.
*
*
@@ -124,14 +125,14 @@
* \subsection bm_ops Operators
*
* Operators are an integral part of BMesh. Unlike regular blender operators,
- * BMesh operators <b>bmo's</b> are designed to be nested (e.g. call other operators).
+ * BMesh operators **bmo's** are designed to be nested (e.g. call other operators).
*
* Each operator has a number of input/output "slots" which are used to pass settings & data into/out of the operator
* (and allows for chaining operators together).
*
* These slots are identified by name, using strings.
*
- * Access to slots is done with BMO_slot_*() functions.
+ * Access to slots is done with ``BMO_slot_***()`` functions.
*
*
* \subsection bm_tool_flags Tool Flags
@@ -145,9 +146,9 @@
* These flags should not be confused with header flags, which are used to store persistent flags
* (e.g. selection, hide status, etc).
*
- * Access to tool flags is done with BMO_elem_flag_*() functions.
+ * Access to tool flags is done with ``BMO_elem_flag_***()`` functions.
*
- * \warning Operators are never allowed to read or write to header flags.
+ * \warning Operators are **never** allowed to read or write to header flags.
* They act entirely on the data inside their input slots.
* For example an operator should not check the selected state of an element,
* there are some exceptions to this - some operators check of a face is smooth.
@@ -161,8 +162,10 @@
* - boolean - #BMO_OP_SLOT_BOOL
* - float - #BMO_OP_SLOT_FLT
* - pointer - #BMO_OP_SLOT_PNT
- * - element buffer - #BMO_OP_SLOT_ELEMENT_BUF - a list of verts/edges/faces
- * - map - BMO_OP_SLOT_MAPPING - simple hash map
+ * - matrix - #BMO_OP_SLOT_MAT
+ * - vector - #BMO_OP_SLOT_VEC
+ * - buffer - #BMO_OP_SLOT_ELEMENT_BUF - a list of verts/edges/faces.
+ * - map - BMO_OP_SLOT_MAPPING - simple hash map.
*
*
* \subsection bm_slot_iter Slot Iterators
@@ -185,33 +188,25 @@
*
* These conventions should be used throughout the bmesh module.
*
- * - BM_xxx() - High level BMesh API function for use anywhere.
- * - bmesh_xxx() - Low level API function.
- * - bm_xxx() - 'static' functions, not apart of the API at all, but use prefix since they operate on BMesh data.
- * - BMO_xxx() - High level operator API function for use anywhere.
- * - bmo_xxx() - Low level / internal operator API functions.
- * - _bm_xxx() - Functions which are called via macros only.
+ * - ``BM_***()`` - High level BMesh API function for use anywhere.
+ * - ``bmesh_***()`` - Low level API function.
+ * - ``bm_***()`` - 'static' functions, not apart of the API at all, but use prefix since they operate on BMesh data.
+ * - ``BMO_***()`` - High level operator API function for use anywhere.
+ * - ``bmo_***()`` - Low level / internal operator API functions.
+ * - ``_bm_***()`` - Functions which are called via macros only.
*
* \section bm_todo BMesh TODO's
*
* There may be a better place for this section, but adding here for now.
*
- * \subsection bm_todo_api API
- *
- * - make crease and bevel weight optional, they come for free in meshes but are allocated layers
- * in the bmesh data structure.
- *
- *
* \subsection bm_todo_tools Tools
*
* Probably most of these will be bmesh operators.
*
* - make ngons flat.
- * - make ngons into tris/quads (ngon poke?), many methods could be used here (triangulate/fan/quad-fan).
* - solidify (precise mode), keeps even wall thickness, re-creates outlines of offset faces with plane-plane
* intersections.
- * - split vert (we already have in our API, just no tool)
- * - bridge (add option to bridge between different edge loop counts, option to remove selected face regions)
+ * - split vert (we already have in our API, just no tool).
* - flip selected region (invert all faces about the plane defined by the selected region outline)
* - interactive dissolve (like the knife tool but draw over edges to dissolve)
*
@@ -222,16 +217,12 @@
* - skip BMO flag allocation, its not needed in many cases, this is fairly redundant to calc by default.
* - ability to call BMO's with option not to create return data (will save some time)
* - binary diff UNDO, currently this uses huge amount of ram when all shapes are stored for each undo step for eg.
- * - use two differnt iterator types for BMO map/buffer types.
- * - avoid string lookups for BMO slot lookups _especially_ when used in loops, this is very crappy.
+ * - use two different iterator types for BMO map/buffer types.
*
*
* \subsection bm_todo_tools_enhance Tool Enhancements
*
- * - face inset interpolate loop data from face (currently copies - but this stretches UV's in an ugly way)
* - vert slide UV correction (like we have for edge slide)
- * - fill-face edge net - produce consistent normals, currently it won't, fix should be to fill in edge-net node
- * connected with previous one - since they already check for normals of adjacent edge-faces before creating.
*/
#ifdef __cplusplus
@@ -251,8 +242,8 @@ extern "C" {
#include "intern/bmesh_operator_api.h"
#include "intern/bmesh_error.h"
-#include "intern/bmesh_construct.h"
#include "intern/bmesh_core.h"
+#include "intern/bmesh_construct.h"
#include "intern/bmesh_edgeloop.h"
#include "intern/bmesh_interp.h"
#include "intern/bmesh_iterators.h"
@@ -269,12 +260,6 @@ extern "C" {
#include "intern/bmesh_inline.h"
-#include "tools/bmesh_bevel.h"
-#include "tools/bmesh_decimate.h"
-#include "tools/bmesh_edgesplit.h"
-#include "tools/bmesh_path.h"
-#include "tools/bmesh_triangulate.h"
-
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/bmesh/bmesh_class.h b/source/blender/bmesh/bmesh_class.h
index 0e4c014a06a..9c43e5a2ee4 100644
--- a/source/blender/bmesh/bmesh_class.h
+++ b/source/blender/bmesh/bmesh_class.h
@@ -65,7 +65,7 @@ typedef struct BMHeader {
void *data; /* customdata layers */
int index; /* notes:
* - Use BM_elem_index_get/set macros for index
- * - Unitialized to -1 so we can easily tell its not set.
+ * - Uninitialized to -1 so we can easily tell its not set.
* - Used for edge/vert/face, check BMesh.elem_index_dirty for valid index values,
* this is abused by various tools which set it dirty.
* - For loops this is used for sorting during tessellation. */
@@ -183,9 +183,28 @@ typedef struct BMesh {
* BM_LOOP isn't handled so far. */
char elem_index_dirty;
+ /* flag array table as being dirty so we know when its safe to use it,
+ * or when it needs to be re-created */
+ char elem_table_dirty;
+
+
/* element pools */
struct BLI_mempool *vpool, *epool, *lpool, *fpool;
+ /* mempool lookup tables (optional)
+ * index tables, to map indices to elements via
+ * BM_mesh_elem_table_ensure and associated functions. don't
+ * touch this or read it directly.\
+ * Use BM_mesh_elem_table_ensure(), BM_vert/edge/face_at_index() */
+ BMVert **vtable;
+ BMEdge **etable;
+ BMFace **ftable;
+
+ /* size of allocated tables */
+ int vtable_tot;
+ int etable_tot;
+ int ftable_tot;
+
/* operator api stuff (must be all NULL or all alloc'd) */
struct BLI_mempool *vtoolflagpool, *etoolflagpool, *ftoolflagpool;
@@ -254,6 +273,8 @@ enum {
struct BPy_BMGeneric;
extern void bpy_bm_generic_invalidate(struct BPy_BMGeneric *self);
+typedef bool (*BMElemFilterFunc)(BMElem *, void *user_data);
+
/* defines */
#define BM_ELEM_CD_GET_VOID_P(ele, offset) \
(assert(offset != -1), (void *)((char *)(ele)->head.data + (offset)))
@@ -290,6 +311,12 @@ extern void bpy_bm_generic_invalidate(struct BPy_BMGeneric *self);
* but should not error on valid cases */
#define BM_LOOP_RADIAL_MAX 10000
#define BM_NGON_MAX 100000
-#define BM_OMP_LIMIT 10000 /* 10000 */ /* setting zero so we can catch bugs in OpenMP/BMesh */
+
+/* setting zero so we can catch bugs in OpenMP/BMesh */
+#ifdef DEBUG
+# define BM_OMP_LIMIT 0
+#else
+# define BM_OMP_LIMIT 10000
+#endif
#endif /* __BMESH_CLASS_H__ */
diff --git a/source/blender/compositor/operations/COM_ConvertStraightToPremulOperation.h b/source/blender/bmesh/bmesh_tools.h
index d0191f292d2..baffeb774b6 100644
--- a/source/blender/compositor/operations/COM_ConvertStraightToPremulOperation.h
+++ b/source/blender/bmesh/bmesh_tools.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2012, Blender Foundation.
+ * ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -15,35 +15,36 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * Contributor:
- * Dalai Felinto
+ * Contributor(s):
+ *
+ * ***** END GPL LICENSE BLOCK *****
*/
-#ifndef _COM_ConvertStraightToPremulOperation_h
-#define _COM_ConvertStraightToPremulOperation_h
-#include "COM_NodeOperation.h"
-
+#ifndef __BMESH_TOOLS_H__
+#define __BMESH_TOOLS_H__
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
+/** \file blender/bmesh/bmesh_tools.h
+ * \ingroup bmesh
+ *
+ * Utility functions that operate directly on the BMesh,
+ * These can be used by both Modifiers and BMesh-Operators.
*/
-class ConvertStraightToPremulOperation : public NodeOperation {
-private:
- SocketReader *m_inputColor;
-public:
- /**
- * Default constructor
- */
- ConvertStraightToPremulOperation();
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
+#ifdef __cplusplus
+extern "C" {
+#endif
- void initExecution();
- void deinitExecution();
+#include "tools/bmesh_beautify.h"
+#include "tools/bmesh_bevel.h"
+#include "tools/bmesh_bisect_plane.h"
+#include "tools/bmesh_decimate.h"
+#include "tools/bmesh_edgenet.h"
+#include "tools/bmesh_edgesplit.h"
+#include "tools/bmesh_path.h"
+#include "tools/bmesh_triangulate.h"
-};
+#ifdef __cplusplus
+}
#endif
+
+#endif /* __BMESH_TOOLS_H__ */
diff --git a/source/blender/bmesh/intern/bmesh_construct.c b/source/blender/bmesh/intern/bmesh_construct.c
index f5856ee94b3..1a7464ce340 100644
--- a/source/blender/bmesh/intern/bmesh_construct.c
+++ b/source/blender/bmesh/intern/bmesh_construct.c
@@ -35,6 +35,7 @@
#include "BLI_alloca.h"
#include "BLI_math.h"
+#include "BLI_sort_utils.h"
#include "BKE_customdata.h"
@@ -65,95 +66,69 @@ static void bm_loop_attrs_copy(BMesh *source_mesh, BMesh *target_mesh,
BMFace *BM_face_create_quad_tri(BMesh *bm,
BMVert *v1, BMVert *v2, BMVert *v3, BMVert *v4,
- const BMFace *example, const bool no_double)
+ const BMFace *f_example, const eBMCreateFlag create_flag)
{
BMVert *vtar[4] = {v1, v2, v3, v4};
- return BM_face_create_quad_tri_v(bm, vtar, v4 ? 4 : 3, example, no_double);
-}
-
-BMFace *BM_face_create_quad_tri_v(BMesh *bm, BMVert **verts, int len, const BMFace *example, const bool no_double)
-{
- BMFace *f = NULL;
- bool is_overlap = false;
-
- /* sanity check - debug mode only */
- if (len == 3) {
- BLI_assert(verts[0] != verts[1]);
- BLI_assert(verts[0] != verts[2]);
- BLI_assert(verts[1] != verts[2]);
- }
- else if (len == 4) {
- BLI_assert(verts[0] != verts[1]);
- BLI_assert(verts[0] != verts[2]);
- BLI_assert(verts[0] != verts[3]);
-
- BLI_assert(verts[1] != verts[2]);
- BLI_assert(verts[1] != verts[3]);
-
- BLI_assert(verts[2] != verts[3]);
- }
- else {
- BLI_assert(0);
- }
-
-
- if (no_double) {
- /* check if face exists or overlaps */
- is_overlap = BM_face_exists(verts, len, &f);
- }
-
- /* make new face */
- if ((f == NULL) && (!is_overlap)) {
- BMEdge *edar[4] = {NULL};
- edar[0] = BM_edge_create(bm, verts[0], verts[1], NULL, BM_CREATE_NO_DOUBLE);
- edar[1] = BM_edge_create(bm, verts[1], verts[2], NULL, BM_CREATE_NO_DOUBLE);
- if (len == 4) {
- edar[2] = BM_edge_create(bm, verts[2], verts[3], NULL, BM_CREATE_NO_DOUBLE);
- edar[3] = BM_edge_create(bm, verts[3], verts[0], NULL, BM_CREATE_NO_DOUBLE);
- }
- else {
- edar[2] = BM_edge_create(bm, verts[2], verts[0], NULL, BM_CREATE_NO_DOUBLE);
- }
-
- f = BM_face_create(bm, verts, edar, len, 0);
-
- if (example && f) {
- BM_elem_attrs_copy(bm, bm, example, f);
- }
- }
-
- return f;
+ return BM_face_create_verts(bm, vtar, v4 ? 4 : 3, f_example, create_flag, true);
}
/**
* \brief copies face loop data from shared adjacent faces.
+ *
+ * \param filter_fn A function that filters the source loops before copying (don't always want to copy all)
+ *
* \note when a matching edge is found, both loops of that edge are copied
* this is done since the face may not be completely surrounded by faces,
- * this way: a quad with 2 connected quads on either side will still get all 4 loops updated */
-void BM_face_copy_shared(BMesh *bm, BMFace *f)
+ * this way: a quad with 2 connected quads on either side will still get all 4 loops updated
+ */
+void BM_face_copy_shared(BMesh *bm, BMFace *f,
+ BMElemFilterFunc filter_fn, void *user_data)
{
BMLoop *l_first;
BMLoop *l_iter;
+#ifdef DEBUG
+ l_iter = l_first = BM_FACE_FIRST_LOOP(f);
+ do {
+ BLI_assert(BM_ELEM_API_FLAG_TEST(l_iter, _FLAG_OVERLAP) == 0);
+ } while ((l_iter = l_iter->next) != l_first);
+#endif
+
l_iter = l_first = BM_FACE_FIRST_LOOP(f);
do {
BMLoop *l_other = l_iter->radial_next;
if (l_other && l_other != l_iter) {
+ BMLoop *l_src[2];
+ BMLoop *l_dst[2] = {l_iter, l_iter->next};
+ unsigned int j;
+
if (l_other->v == l_iter->v) {
- bm_loop_attrs_copy(bm, bm, l_other, l_iter);
- bm_loop_attrs_copy(bm, bm, l_other->next, l_iter->next);
+ l_src[0] = l_other;
+ l_src[1] = l_other->next;
}
else {
- bm_loop_attrs_copy(bm, bm, l_other->next, l_iter);
- bm_loop_attrs_copy(bm, bm, l_other, l_iter->next);
+ l_src[0] = l_other->next;
+ l_src[1] = l_other;
}
- /* since we copy both loops of the shared edge, step over the next loop here */
- if ((l_iter = l_iter->next) == l_first) {
- break;
+
+ for (j = 0; j < 2; j++) {
+ BLI_assert(l_dst[j]->v == l_src[j]->v);
+ if (BM_ELEM_API_FLAG_TEST(l_dst[j], _FLAG_OVERLAP) == 0) {
+ if ((filter_fn == NULL) || filter_fn((BMElem *)l_src[j], user_data)) {
+ bm_loop_attrs_copy(bm, bm, l_src[j], l_dst[j]);
+ BM_ELEM_API_FLAG_ENABLE(l_dst[j], _FLAG_OVERLAP);
+ }
+ }
}
}
} while ((l_iter = l_iter->next) != l_first);
+
+
+ l_iter = l_first = BM_FACE_FIRST_LOOP(f);
+ do {
+ BM_ELEM_API_FLAG_DISABLE(l_iter, _FLAG_OVERLAP);
+ } while ((l_iter = l_iter->next) != l_first);
}
/**
@@ -171,7 +146,8 @@ void BM_face_copy_shared(BMesh *bm, BMFace *f)
* #BM_face_create should be considered over this function as it
* avoids some unnecessary work.
*/
-BMFace *BM_face_create_ngon(BMesh *bm, BMVert *v1, BMVert *v2, BMEdge **edges, const int len, const int create_flag)
+BMFace *BM_face_create_ngon(BMesh *bm, BMVert *v1, BMVert *v2, BMEdge **edges, const int len,
+ const BMFace *f_example, const eBMCreateFlag create_flag)
{
BMEdge **edges_sort = BLI_array_alloca(edges_sort, len);
BMVert **verts_sort = BLI_array_alloca(verts_sort, len + 1);
@@ -290,7 +266,7 @@ BMFace *BM_face_create_ngon(BMesh *bm, BMVert *v1, BMVert *v2, BMEdge **edges, c
BM_ELEM_API_FLAG_DISABLE(verts_sort[i], _FLAG_MV);
}
- f = BM_face_create(bm, verts_sort, edges_sort, len, create_flag);
+ f = BM_face_create(bm, verts_sort, edges_sort, len, f_example, create_flag);
/* clean up flags */
for (i = 0; i < len; i++) {
@@ -318,7 +294,8 @@ err:
* - Optionally create edges between vertices.
* - Uses verts so no need to find edges (handy when you only have verts)
*/
-BMFace *BM_face_create_ngon_verts(BMesh *bm, BMVert **vert_arr, const int len, const int create_flag,
+BMFace *BM_face_create_ngon_verts(BMesh *bm, BMVert **vert_arr, const int len,
+ const BMFace *f_example, const eBMCreateFlag create_flag,
const bool calc_winding, const bool create_edges)
{
BMEdge **edge_arr = BLI_array_alloca(edge_arr, len);
@@ -378,21 +355,8 @@ BMFace *BM_face_create_ngon_verts(BMesh *bm, BMVert **vert_arr, const int len, c
bm,
v_winding[winding[0]],
v_winding[winding[1]],
- edge_arr, len, create_flag);
-}
-
-
-typedef struct AngleIndexPair {
- float angle;
- int index;
-} AngleIndexPair;
-
-static int angle_index_pair_cmp(const void *e1, const void *e2)
-{
- const AngleIndexPair *p1 = e1, *p2 = e2;
- if (p1->angle > p2->angle) return 1;
- else if (p1->angle < p2->angle) return -1;
- else return 0;
+ edge_arr, len,
+ f_example, create_flag);
}
/**
@@ -411,8 +375,12 @@ static int angle_index_pair_cmp(const void *e1, const void *e2)
*
* \note Since this is a vcloud there is no direction.
*/
-BMFace *BM_face_create_ngon_vcloud(BMesh *bm, BMVert **vert_arr, int len, const int create_flag)
+BMFace *BM_face_create_ngon_vcloud(BMesh *bm, BMVert **vert_arr, int len,
+ const BMFace *f_example, const eBMCreateFlag create_flag)
{
+ struct SortIntByFloat *vang = BLI_array_alloca(vang, len);
+ BMVert **vert_arr_map = BLI_array_alloca(vert_arr_map, len);
+
BMFace *f;
float totv_inv = 1.0f / (float)len;
@@ -429,10 +397,6 @@ BMFace *BM_face_create_ngon_vcloud(BMesh *bm, BMVert **vert_arr, int len, const
float far_dist, far_best;
float far_cross_dist, far_cross_best = 0.0f;
- AngleIndexPair *vang;
-
- BMVert **vert_arr_map;
-
/* get the center point and collect vector array since we loop over these a lot */
zero_v3(cent);
for (i = 0; i < len; i++) {
@@ -492,8 +456,6 @@ BMFace *BM_face_create_ngon_vcloud(BMesh *bm, BMVert **vert_arr, int len, const
/* --- */
/* now calculate every points angle around the normal (signed) */
- vang = MEM_mallocN(sizeof(AngleIndexPair) * len, __func__);
-
for (i = 0; i < len; i++) {
float co[3];
float proj_vec[3];
@@ -513,26 +475,21 @@ BMFace *BM_face_create_ngon_vcloud(BMesh *bm, BMVert **vert_arr, int len, const
angle = -angle;
}
- vang[i].angle = angle;
- vang[i].index = i;
+ vang[i].sort_value = angle;
+ vang[i].data = i;
}
/* sort by angle and magic! - we have our ngon */
- qsort(vang, len, sizeof(AngleIndexPair), angle_index_pair_cmp);
+ qsort(vang, len, sizeof(*vang), BLI_sortutil_cmp_float);
/* --- */
/* create edges and find the winding (if faces are attached to any existing edges) */
- vert_arr_map = MEM_mallocN(sizeof(BMVert *) * len, __func__);
-
for (i = 0; i < len; i++) {
- vert_arr_map[i] = vert_arr[vang[i].index];
+ vert_arr_map[i] = vert_arr[vang[i].data];
}
- MEM_freeN(vang);
-
- f = BM_face_create_ngon_verts(bm, vert_arr_map, len, create_flag, true, true);
- MEM_freeN(vert_arr_map);
+ f = BM_face_create_ngon_verts(bm, vert_arr_map, len, f_example, create_flag, true, true);
return f;
}
@@ -543,10 +500,10 @@ BMFace *BM_face_create_ngon_vcloud(BMesh *bm, BMVert **vert_arr, int len, const
*/
void BMO_remove_tagged_faces(BMesh *bm, const short oflag)
{
- BMFace *f;
+ BMFace *f, *f_next;
BMIter iter;
- BM_ITER_MESH (f, &iter, bm, BM_FACES_OF_MESH) {
+ BM_ITER_MESH_MUTABLE (f, f_next, &iter, bm, BM_FACES_OF_MESH) {
if (BMO_elem_flag_test(bm, f, oflag)) {
BM_face_kill(bm, f);
}
@@ -555,10 +512,10 @@ void BMO_remove_tagged_faces(BMesh *bm, const short oflag)
void BMO_remove_tagged_edges(BMesh *bm, const short oflag)
{
- BMEdge *e;
+ BMEdge *e, *e_next;
BMIter iter;
- BM_ITER_MESH (e, &iter, bm, BM_EDGES_OF_MESH) {
+ BM_ITER_MESH_MUTABLE (e, e_next, &iter, bm, BM_EDGES_OF_MESH) {
if (BMO_elem_flag_test(bm, e, oflag)) {
BM_edge_kill(bm, e);
}
@@ -567,10 +524,10 @@ void BMO_remove_tagged_edges(BMesh *bm, const short oflag)
void BMO_remove_tagged_verts(BMesh *bm, const short oflag)
{
- BMVert *v;
+ BMVert *v, *v_next;
BMIter iter;
- BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) {
+ BM_ITER_MESH_MUTABLE (v, v_next, &iter, bm, BM_VERTS_OF_MESH) {
if (BMO_elem_flag_test(bm, v, oflag)) {
BM_vert_kill(bm, v);
}
@@ -824,6 +781,7 @@ void BM_elem_attrs_copy_ex(BMesh *bm_src, BMesh *bm_dst, const void *ele_src_v,
BMHeader *ele_dst = ele_dst_v;
BLI_assert(ele_src->htype == ele_dst->htype);
+ BLI_assert(ele_src != ele_dst);
if ((hflag_mask & BM_ELEM_SELECT) == 0) {
/* First we copy select */
@@ -903,7 +861,7 @@ static BMFace *bm_mesh_copy_new_face(BMesh *bm_new, BMesh *bm_old,
j++;
} while ((l_iter = l_iter->next) != l_first);
- f_new = BM_face_create(bm_new, verts, edges, f->len, BM_CREATE_SKIP_CD);
+ f_new = BM_face_create(bm_new, verts, edges, f->len, NULL, BM_CREATE_SKIP_CD);
if (UNLIKELY(f_new == NULL)) {
return NULL;
@@ -953,10 +911,7 @@ BMesh *BM_mesh_copy(BMesh *bm_old)
BMEditSelection *ese;
BMIter iter;
int i;
- const BMAllocTemplate allocsize = {bm_old->totvert,
- bm_old->totedge,
- bm_old->totloop,
- bm_old->totface};
+ const BMAllocTemplate allocsize = BMALLOC_TEMPLATE_FROM_BM(bm_old);
/* allocate a bmesh */
bm_new = BM_mesh_create(&allocsize);
diff --git a/source/blender/bmesh/intern/bmesh_construct.h b/source/blender/bmesh/intern/bmesh_construct.h
index f0bd7b316e9..e85c97dffd9 100644
--- a/source/blender/bmesh/intern/bmesh_construct.h
+++ b/source/blender/bmesh/intern/bmesh_construct.h
@@ -29,20 +29,20 @@
struct BMAllocTemplate;
-BMFace *BM_face_create_quad_tri_v(BMesh *bm,
- BMVert **verts, int len,
- const BMFace *example, const bool no_double);
-
BMFace *BM_face_create_quad_tri(BMesh *bm, BMVert *v1, BMVert *v2, BMVert *v3, BMVert *v4,
- const BMFace *example, const bool no_double);
+ const BMFace *f_example, const eBMCreateFlag create_flag);
-void BM_face_copy_shared(BMesh *bm, BMFace *f);
+void BM_face_copy_shared(BMesh *bm, BMFace *f,
+ BMElemFilterFunc filter_fn, void *user_data);
-BMFace *BM_face_create_ngon(BMesh *bm, BMVert *v1, BMVert *v2, BMEdge **edges, const int len, const int create_flag);
-BMFace *BM_face_create_ngon_verts(BMesh *bm, BMVert **vert_arr, const int len, const int create_flag,
+BMFace *BM_face_create_ngon(BMesh *bm, BMVert *v1, BMVert *v2, BMEdge **edges, const int len,
+ const BMFace *f_example, const eBMCreateFlag create_flag);
+BMFace *BM_face_create_ngon_verts(BMesh *bm, BMVert **vert_arr, const int len,
+ const BMFace *f_example, const eBMCreateFlag create_flag,
const bool calc_winding, const bool create_edges);
-BMFace *BM_face_create_ngon_vcloud(BMesh *bm, BMVert **vert_arr, int len, const int create_flag);
+BMFace *BM_face_create_ngon_vcloud(BMesh *bm, BMVert **vert_arr, int len,
+ const BMFace *f_example, const eBMCreateFlag create_flag);
void BMO_remove_tagged_faces(BMesh *bm, const short oflag);
void BMO_remove_tagged_edges(BMesh *bm, const short oflag);
diff --git a/source/blender/bmesh/intern/bmesh_core.c b/source/blender/bmesh/intern/bmesh_core.c
index b296c367575..0726af4b641 100644
--- a/source/blender/bmesh/intern/bmesh_core.c
+++ b/source/blender/bmesh/intern/bmesh_core.c
@@ -56,7 +56,8 @@
/**
* \brief Main function for creating a new vertex.
*/
-BMVert *BM_vert_create(BMesh *bm, const float co[3], const BMVert *example, const eBMCreateFlag create_flag)
+BMVert *BM_vert_create(BMesh *bm, const float co[3],
+ const BMVert *v_example, const eBMCreateFlag create_flag)
{
BMVert *v = BLI_mempool_calloc(bm->vpool);
@@ -69,7 +70,9 @@ BMVert *BM_vert_create(BMesh *bm, const float co[3], const BMVert *example, cons
/* disallow this flag for verts - its meaningless */
BLI_assert((create_flag & BM_CREATE_NO_DOUBLE) == 0);
- bm->elem_index_dirty |= BM_VERT; /* may add to middle of the pool */
+ /* may add to middle of the pool */
+ bm->elem_index_dirty |= BM_VERT;
+ bm->elem_table_dirty |= BM_VERT;
bm->totvert++;
@@ -86,10 +89,10 @@ BMVert *BM_vert_create(BMesh *bm, const float co[3], const BMVert *example, cons
}
if (!(create_flag & BM_CREATE_SKIP_CD)) {
- if (example) {
+ if (v_example) {
int *keyi;
- BM_elem_attrs_copy(bm, bm, example, v);
+ BM_elem_attrs_copy(bm, bm, v_example, v);
/* exception: don't copy the original shapekey index */
keyi = CustomData_bmesh_get(&bm->vdata, v->head.data, CD_SHAPE_KEYINDEX);
@@ -113,7 +116,8 @@ BMVert *BM_vert_create(BMesh *bm, const float co[3], const BMVert *example, cons
* \note Duplicate edges are supported by the API however users should _never_ see them.
* so unless you need a unique edge or know the edge won't exist, you should call with \a no_double = true
*/
-BMEdge *BM_edge_create(BMesh *bm, BMVert *v1, BMVert *v2, const BMEdge *example, const eBMCreateFlag create_flag)
+BMEdge *BM_edge_create(BMesh *bm, BMVert *v1, BMVert *v2,
+ const BMEdge *e_example, const eBMCreateFlag create_flag)
{
BMEdge *e;
@@ -128,7 +132,9 @@ BMEdge *BM_edge_create(BMesh *bm, BMVert *v1, BMVert *v2, const BMEdge *example,
BM_elem_index_set(e, -1); /* set_ok_invalid */
#endif
- bm->elem_index_dirty |= BM_EDGE; /* may add to middle of the pool */
+ /* may add to middle of the pool */
+ bm->elem_index_dirty |= BM_EDGE;
+ bm->elem_table_dirty |= BM_EDGE;
bm->totedge++;
@@ -148,8 +154,8 @@ BMEdge *BM_edge_create(BMesh *bm, BMVert *v1, BMVert *v2, const BMEdge *example,
bmesh_disk_edge_append(e, e->v2);
if (!(create_flag & BM_CREATE_SKIP_CD)) {
- if (example) {
- BM_elem_attrs_copy(bm, bm, example, e);
+ if (e_example) {
+ BM_elem_attrs_copy(bm, bm, e_example, e);
}
else {
CustomData_bmesh_set_default(&bm->edata, &e->head.data);
@@ -190,7 +196,8 @@ static BMLoop *bm_loop_create(BMesh *bm, BMVert *v, BMEdge *e, BMFace *f,
return l;
}
-static BMLoop *bm_face_boundary_add(BMesh *bm, BMFace *f, BMVert *startv, BMEdge *starte, const int create_flag)
+static BMLoop *bm_face_boundary_add(BMesh *bm, BMFace *f, BMVert *startv, BMEdge *starte,
+ const eBMCreateFlag create_flag)
{
#ifdef USE_BMESH_HOLES
BMLoopList *lst = BLI_mempool_calloc(bm->looplistpool);
@@ -228,7 +235,7 @@ BMFace *BM_face_copy(BMesh *bm_dst, BMesh *bm_src, BMFace *f,
i = 0;
do {
if (copy_verts) {
- verts[i] = BM_vert_create(bm_dst, l_iter->v->co, l_iter->v, 0);
+ verts[i] = BM_vert_create(bm_dst, l_iter->v->co, l_iter->v, BM_CREATE_NOP);
}
else {
verts[i] = l_iter->v;
@@ -251,7 +258,7 @@ BMFace *BM_face_copy(BMesh *bm_dst, BMesh *bm_src, BMFace *f,
v1 = verts[(i + 1) % f->len];
}
- edges[i] = BM_edge_create(bm_dst, v1, v2, l_iter->e, 0);
+ edges[i] = BM_edge_create(bm_dst, v1, v2, l_iter->e, BM_CREATE_NOP);
}
else {
edges[i] = l_iter->e;
@@ -259,7 +266,7 @@ BMFace *BM_face_copy(BMesh *bm_dst, BMesh *bm_src, BMFace *f,
i++;
} while ((l_iter = l_iter->next) != l_first);
- f_copy = BM_face_create(bm_dst, verts, edges, f->len, BM_CREATE_SKIP_CD);
+ f_copy = BM_face_create(bm_dst, verts, edges, f->len, NULL, BM_CREATE_SKIP_CD);
BM_elem_attrs_copy(bm_src, bm_dst, f, f_copy);
@@ -289,7 +296,9 @@ BLI_INLINE BMFace *bm_face_create__internal(BMesh *bm, const eBMCreateFlag creat
BM_elem_index_set(f, -1); /* set_ok_invalid */
#endif
- bm->elem_index_dirty |= BM_FACE; /* may add to middle of the pool */
+ /* may add to middle of the pool */
+ bm->elem_index_dirty |= BM_FACE;
+ bm->elem_table_dirty |= BM_FACE;
bm->totface++;
@@ -320,11 +329,12 @@ BLI_INLINE BMFace *bm_face_create__internal(BMesh *bm, const eBMCreateFlag creat
* \param len Length of the face
* \param create_flag Options for creating the face
*/
-BMFace *BM_face_create(BMesh *bm, BMVert **verts, BMEdge **edges, const int len, const eBMCreateFlag create_flag)
+BMFace *BM_face_create(BMesh *bm, BMVert **verts, BMEdge **edges, const int len,
+ const BMFace *f_example, const eBMCreateFlag create_flag)
{
BMFace *f = NULL;
BMLoop *l, *startl, *lastl;
- int i, overlap;
+ int i;
if (len == 0) {
/* just return NULL for now */
@@ -333,8 +343,8 @@ BMFace *BM_face_create(BMesh *bm, BMVert **verts, BMEdge **edges, const int len,
if (create_flag & BM_CREATE_NO_DOUBLE) {
/* Check if face already exists */
- overlap = BM_face_exists(verts, len, &f);
- if (overlap) {
+ const bool is_overlap = BM_face_exists(verts, len, &f);
+ if (is_overlap) {
return f;
}
else {
@@ -364,11 +374,48 @@ BMFace *BM_face_create(BMesh *bm, BMVert **verts, BMEdge **edges, const int len,
f->len = len;
+ if (!(create_flag & BM_CREATE_SKIP_CD)) {
+ if (f_example) {
+ BM_elem_attrs_copy(bm, bm, f_example, f);
+ }
+ else {
+ CustomData_bmesh_set_default(&bm->pdata, &f->head.data);
+ }
+ }
+
BM_CHECK_ELEMENT(f);
return f;
}
+/**
+ * Wrapper for #BM_face_create when you don't have an edge array
+ */
+BMFace *BM_face_create_verts(BMesh *bm, BMVert **vert_arr, const int len,
+ const BMFace *f_example, const eBMCreateFlag create_flag, const bool create_edges)
+{
+ BMEdge **edge_arr = BLI_array_alloca(edge_arr, len);
+ int i, i_prev = len - 1;
+
+ if (create_edges) {
+ for (i = 0; i < len; i++) {
+ edge_arr[i_prev] = BM_edge_create(bm, vert_arr[i_prev], vert_arr[i], NULL, BM_CREATE_NO_DOUBLE);
+ i_prev = i;
+ }
+ }
+ else {
+ for (i = 0; i < len; i++) {
+ edge_arr[i_prev] = BM_edge_exists(vert_arr[i_prev], vert_arr[i]);
+ if (edge_arr[i_prev] == NULL) {
+ return NULL;
+ }
+ i_prev = i;
+ }
+ }
+
+ return BM_face_create(bm, vert_arr, edge_arr, len, f_example, create_flag);
+}
+
#ifndef NDEBUG
/**
@@ -521,6 +568,7 @@ static void bm_kill_only_vert(BMesh *bm, BMVert *v)
{
bm->totvert--;
bm->elem_index_dirty |= BM_VERT;
+ bm->elem_table_dirty |= BM_VERT;
BM_select_history_remove(bm, v);
@@ -541,6 +589,7 @@ static void bm_kill_only_edge(BMesh *bm, BMEdge *e)
{
bm->totedge--;
bm->elem_index_dirty |= BM_EDGE;
+ bm->elem_table_dirty |= BM_EDGE;
BM_select_history_remove(bm, (BMElem *)e);
@@ -564,6 +613,7 @@ static void bm_kill_only_face(BMesh *bm, BMFace *f)
bm->totface--;
bm->elem_index_dirty |= BM_FACE;
+ bm->elem_table_dirty |= BM_FACE;
BM_select_history_remove(bm, (BMElem *)f);
@@ -1053,7 +1103,7 @@ BMFace *BM_faces_join(BMesh *bm, BMFace **faces, int totface, const bool do_del)
}
/* create region face */
- f_new = tote ? BM_face_create_ngon(bm, v1, v2, edges, tote, 0) : NULL;
+ f_new = tote ? BM_face_create_ngon(bm, v1, v2, edges, tote, faces[0], BM_CREATE_NOP) : NULL;
if (UNLIKELY(!f_new || BMO_error_occurred(bm))) {
if (!BMO_error_occurred(bm))
err = N_("Invalid boundary region to join faces");
@@ -1080,8 +1130,6 @@ BMFace *BM_faces_join(BMesh *bm, BMFace **faces, int totface, const bool do_del)
BM_elem_attrs_copy(bm, bm, l2, l_iter);
}
} while ((l_iter = l_iter->next) != l_first);
-
- BM_elem_attrs_copy(bm, bm, faces[0], f_new);
#ifdef USE_BMESH_HOLES
/* add holes */
@@ -1239,11 +1287,12 @@ BMFace *bmesh_sfme(BMesh *bm, BMFace *f, BMVert *v1, BMVert *v2,
}
if (!l_v1 || !l_v2) {
+ BLI_assert(0);
return NULL;
}
/* allocate new edge between v1 and v2 */
- e = BM_edge_create(bm, v1, v2, example, no_double ? BM_CREATE_NO_DOUBLE : 0);
+ e = BM_edge_create(bm, v1, v2, example, no_double ? BM_CREATE_NO_DOUBLE : BM_CREATE_NOP);
f2 = bm_face_create__sfme(bm, f);
l_f1 = bm_loop_create(bm, v2, e, f, l_v2, 0);
@@ -1384,8 +1433,8 @@ BMVert *bmesh_semv(BMesh *bm, BMVert *tv, BMEdge *e, BMEdge **r_e)
valence2 = bmesh_disk_count(tv);
#endif
- v_new = BM_vert_create(bm, tv->co, tv, 0);
- e_new = BM_edge_create(bm, v_new, tv, e, 0);
+ v_new = BM_vert_create(bm, tv->co, tv, BM_CREATE_NOP);
+ e_new = BM_edge_create(bm, v_new, tv, e, BM_CREATE_NOP);
bmesh_disk_edge_remove(e_new, tv);
bmesh_disk_edge_remove(e_new, v_new);
@@ -1970,7 +2019,7 @@ void bmesh_vert_separate(BMesh *bm, BMVert *v, BMVert ***r_vout, int *r_vout_len
verts[0] = v;
for (i = 1; i < maxindex; i++) {
- verts[i] = BM_vert_create(bm, v->co, v, 0);
+ verts[i] = BM_vert_create(bm, v->co, v, BM_CREATE_NOP);
if (copy_select) {
BM_elem_select_copy(bm, bm, verts[i], v);
}
@@ -2136,7 +2185,7 @@ void bmesh_edge_separate(BMesh *bm, BMEdge *e, BMLoop *l_sep,
e->l = l_sep->radial_next;
}
- e_new = BM_edge_create(bm, e->v1, e->v2, e, 0);
+ e_new = BM_edge_create(bm, e->v1, e->v2, e, BM_CREATE_NOP);
bmesh_radial_loop_remove(l_sep, e);
bmesh_radial_append(e_new, l_sep);
l_sep->e = e_new;
@@ -2239,3 +2288,28 @@ BMVert *bmesh_urmv(BMesh *bm, BMFace *f_sep, BMVert *v_sep)
BMLoop *l = BM_face_vert_share_loop(f_sep, v_sep);
return bmesh_urmv_loop(bm, l);
}
+
+/**
+ * Avoid calling this where possible,
+ * low level function so both face pointers remain intact but point to swapped data.
+ * \note must be from the same bmesh.
+ */
+void bmesh_face_swap_data(BMesh *bm, BMFace *f_a, BMFace *f_b)
+{
+ BMLoop *l_iter, *l_first;
+
+ BLI_assert(f_a != f_b);
+
+ l_iter = l_first = BM_FACE_FIRST_LOOP(f_a);
+ do {
+ l_iter->f = f_b;
+ } while ((l_iter = l_iter->next) != l_first);
+
+ l_iter = l_first = BM_FACE_FIRST_LOOP(f_b);
+ do {
+ l_iter->f = f_a;
+ } while ((l_iter = l_iter->next) != l_first);
+
+ SWAP(BMFace, (*f_a), (*f_b));
+ bm->elem_index_dirty |= BM_FACE;
+}
diff --git a/source/blender/bmesh/intern/bmesh_core.h b/source/blender/bmesh/intern/bmesh_core.h
index c9e806335dd..9e33509c2c8 100644
--- a/source/blender/bmesh/intern/bmesh_core.h
+++ b/source/blender/bmesh/intern/bmesh_core.h
@@ -31,6 +31,7 @@ BMFace *BM_face_copy(BMesh *bm_dst, BMesh *bm_src, BMFace *f,
const bool copy_verts, const bool copy_edges);
typedef enum eBMCreateFlag {
+ BM_CREATE_NOP = 0,
/* faces and edges only */
BM_CREATE_NO_DOUBLE = (1 << 1),
/* Skip CustomData - for all element types data,
@@ -39,9 +40,15 @@ typedef enum eBMCreateFlag {
BM_CREATE_SKIP_CD = (1 << 2),
} eBMCreateFlag;
-BMVert *BM_vert_create(BMesh *bm, const float co[3], const BMVert *example, const eBMCreateFlag create_flag);
-BMEdge *BM_edge_create(BMesh *bm, BMVert *v1, BMVert *v2, const BMEdge *example, const eBMCreateFlag create_flag);
-BMFace *BM_face_create(BMesh *bm, BMVert **verts, BMEdge **edges, const int len, const eBMCreateFlag create_flag);
+BMVert *BM_vert_create(BMesh *bm, const float co[3],
+ const BMVert *v_example, const eBMCreateFlag create_flag);
+BMEdge *BM_edge_create(BMesh *bm, BMVert *v1, BMVert *v2,
+ const BMEdge *e_example, const eBMCreateFlag create_flag);
+BMFace *BM_face_create(BMesh *bm, BMVert **verts, BMEdge **edges, const int len,
+ const BMFace *f_example, const eBMCreateFlag create_flag);
+BMFace *BM_face_create_verts(BMesh *bm, BMVert **verts, const int len,
+ const BMFace *f_example, const eBMCreateFlag create_flag,
+ const bool create_edges);
void BM_face_edges_kill(BMesh *bm, BMFace *f);
void BM_face_verts_kill(BMesh *bm, BMFace *f);
@@ -80,4 +87,6 @@ BMFace *bmesh_jfke(BMesh *bm, BMFace *f1, BMFace *f2, BMEdge *e);
BMVert *bmesh_urmv(BMesh *bm, BMFace *f_sep, BMVert *v_sep);
BMVert *bmesh_urmv_loop(BMesh *bm, BMLoop *l_sep);
+void bmesh_face_swap_data(BMesh *bm, BMFace *f_a, BMFace *f_b);
+
#endif /* __BMESH_CORE_H__ */
diff --git a/source/blender/bmesh/intern/bmesh_edgeloop.c b/source/blender/bmesh/intern/bmesh_edgeloop.c
index 1f052bd206a..fe3f6551b70 100644
--- a/source/blender/bmesh/intern/bmesh_edgeloop.c
+++ b/source/blender/bmesh/intern/bmesh_edgeloop.c
@@ -230,7 +230,7 @@ static bool bm_loop_path_build_step(BLI_mempool *vs_pool, ListBase *lb, const in
/* on the same side - do nothing */
}
else {
- /* we have met out match! (vertices from differnt sides meet) */
+ /* we have met out match! (vertices from different sides meet) */
if (dir == 1) {
v_match[0] = vs->v;
v_match[1] = v_next;
@@ -361,8 +361,7 @@ bool BM_mesh_edgeloops_find_path(BMesh *bm, ListBase *r_eloops,
void BM_mesh_edgeloops_free(ListBase *eloops)
{
BMEdgeLoopStore *el_store;
- while ((el_store = eloops->first)) {
- BLI_remlink(eloops, el_store);
+ while ((el_store = BLI_pophead(eloops))) {
BM_edgeloop_free(el_store);
}
}
diff --git a/source/blender/bmesh/intern/bmesh_edgeloop.h b/source/blender/bmesh/intern/bmesh_edgeloop.h
index b46509d4030..527dba120e1 100644
--- a/source/blender/bmesh/intern/bmesh_edgeloop.h
+++ b/source/blender/bmesh/intern/bmesh_edgeloop.h
@@ -70,7 +70,7 @@ bool BM_edgeloop_overlap_check(struct BMEdgeLoopStore *el_store_a
(elink)->next ? elink->next : (BM_edgeloop_is_closed(el_store) ? BM_edgeloop_verts_get(el_store)->first : NULL)
#define BM_EDGELOOP_NEXT(el_store) \
- (CHECK_TYPE_INLINE(el_store, struct BMEdgeLoopStore), \
+ (CHECK_TYPE_INLINE(el_store, struct BMEdgeLoopStore *), \
(struct BMEdgeLoopStore *)((LinkData *)el_store)->next)
#endif /* __BMESH_EDGELOOP_H__ */
diff --git a/source/blender/bmesh/intern/bmesh_inline.h b/source/blender/bmesh/intern/bmesh_inline.h
index 102e9d47ffd..5ac6d7da61b 100644
--- a/source/blender/bmesh/intern/bmesh_inline.h
+++ b/source/blender/bmesh/intern/bmesh_inline.h
@@ -56,7 +56,7 @@ BLI_INLINE void _bm_elem_flag_enable(BMHeader *head, const char hflag)
BLI_INLINE void _bm_elem_flag_disable(BMHeader *head, const char hflag)
{
- head->hflag &= ~hflag;
+ head->hflag &= (char)~hflag;
}
BLI_INLINE void _bm_elem_flag_set(BMHeader *head, const char hflag, const int val)
diff --git a/source/blender/bmesh/intern/bmesh_iterators.c b/source/blender/bmesh/intern/bmesh_iterators.c
index 4555de7b13d..91b9774634d 100644
--- a/source/blender/bmesh/intern/bmesh_iterators.c
+++ b/source/blender/bmesh/intern/bmesh_iterators.c
@@ -54,6 +54,32 @@ const char bm_iter_itype_htype_map[BM_ITYPE_MAX] = {
};
/**
+ * Utility function.
+ */
+int BM_iter_mesh_count(BMesh *bm, const char itype)
+{
+ int count;
+
+ switch (itype) {
+ case BM_VERTS_OF_MESH:
+ count = bm->totvert;
+ break;
+ case BM_EDGES_OF_MESH:
+ count = bm->totedge;
+ break;
+ case BM_FACES_OF_MESH:
+ count = bm->totface;
+ break;
+ default:
+ count = 0;
+ BLI_assert(0);
+ break;
+ }
+
+ return count;
+}
+
+/**
* \note Use #BM_vert_at_index / #BM_edge_at_index / #BM_face_at_index for mesh arrays.
*/
void *BM_iter_at_index(BMesh *bm, const char itype, void *data, int index)
@@ -304,36 +330,66 @@ int BM_iter_mesh_count_flag(const char itype, BMesh *bm, const char hflag, const
* VERT OF MESH CALLBACKS
*/
+/* see bug [#36923] for why we need this,
+ * allow adding but not removing, this isnt _totally_ safe since
+ * you could add/remove within the same loop, but catches common cases
+ */
+#ifdef DEBUG
+# define USE_IMMUTABLE_ASSERT
+#endif
+
void bmiter__vert_of_mesh_begin(struct BMIter__vert_of_mesh *iter)
{
+#ifdef USE_IMMUTABLE_ASSERT
+ ((BMIter *)iter)->count = iter->bm->totvert;
+#endif
BLI_mempool_iternew(iter->bm->vpool, &iter->pooliter);
}
void *bmiter__vert_of_mesh_step(struct BMIter__vert_of_mesh *iter)
{
+#ifdef USE_IMMUTABLE_ASSERT
+ BLI_assert(((BMIter *)iter)->count <= iter->bm->totvert);
+#endif
return BLI_mempool_iterstep(&iter->pooliter);
}
void bmiter__edge_of_mesh_begin(struct BMIter__edge_of_mesh *iter)
{
+#ifdef USE_IMMUTABLE_ASSERT
+ ((BMIter *)iter)->count = iter->bm->totedge;
+#endif
BLI_mempool_iternew(iter->bm->epool, &iter->pooliter);
}
void *bmiter__edge_of_mesh_step(struct BMIter__edge_of_mesh *iter)
{
+#ifdef USE_IMMUTABLE_ASSERT
+ BLI_assert(((BMIter *)iter)->count <= iter->bm->totedge);
+#endif
return BLI_mempool_iterstep(&iter->pooliter);
}
void bmiter__face_of_mesh_begin(struct BMIter__face_of_mesh *iter)
{
+#ifdef USE_IMMUTABLE_ASSERT
+ ((BMIter *)iter)->count = iter->bm->totface;
+#endif
BLI_mempool_iternew(iter->bm->fpool, &iter->pooliter);
}
void *bmiter__face_of_mesh_step(struct BMIter__face_of_mesh *iter)
{
+#ifdef USE_IMMUTABLE_ASSERT
+ BLI_assert(((BMIter *)iter)->count <= iter->bm->totface);
+#endif
return BLI_mempool_iterstep(&iter->pooliter);
}
+#ifdef USE_IMMUTABLE_ASSERT
+# undef USE_IMMUTABLE_ASSERT
+#endif
+
/*
* EDGE OF VERT CALLBACKS
*/
diff --git a/source/blender/bmesh/intern/bmesh_iterators.h b/source/blender/bmesh/intern/bmesh_iterators.h
index b5535b59321..fdf0f27f05f 100644
--- a/source/blender/bmesh/intern/bmesh_iterators.h
+++ b/source/blender/bmesh/intern/bmesh_iterators.h
@@ -39,6 +39,7 @@
*
*/
+#include "BLI_compiler_attrs.h"
#include "BLI_mempool.h"
/* Defines for passing to BM_iter_new.
@@ -88,6 +89,20 @@ extern const char bm_iter_itype_htype_map[BM_ITYPE_MAX];
#define BM_ITER_MESH_INDEX(ele, iter, bm, itype, indexvar) \
for (ele = BM_iter_new(iter, bm, itype, NULL), indexvar = 0; ele; ele = BM_iter_step(iter), (indexvar)++)
+/* a version of BM_ITER_MESH which keeps the next item in storage
+ * so we can delete the current item, see bug [#36923] */
+#ifdef DEBUG
+# define BM_ITER_MESH_MUTABLE(ele, ele_next, iter, bm, itype) \
+ for (ele = BM_iter_new(iter, bm, itype, NULL); \
+ ele ? ((void)((iter)->count = BM_iter_mesh_count(bm, itype)), \
+ (void)(ele_next = BM_iter_step(iter)), 1) : 0; \
+ ele = ele_next)
+#else
+# define BM_ITER_MESH_MUTABLE(ele, ele_next, iter, bm, itype) \
+ for (ele = BM_iter_new(iter, bm, itype, NULL); ele ? ((ele_next = BM_iter_step(iter)), 1) : 0; ele = ele_next)
+#endif
+
+
#define BM_ITER_ELEM(ele, iter, data, itype) \
for (ele = BM_iter_new(iter, NULL, itype, data); ele; ele = BM_iter_step(iter))
@@ -181,18 +196,11 @@ typedef struct BMIter {
char itype;
} BMIter;
-void *BM_iter_at_index(BMesh *bm, const char itype, void *data, int index)
-#ifdef __GNUC__
-__attribute__((warn_unused_result))
-#endif
-;
+int BM_iter_mesh_count(BMesh *bm, const char itype);
+void *BM_iter_at_index(BMesh *bm, const char itype, void *data, int index) ATTR_WARN_UNUSED_RESULT;
int BM_iter_as_array(BMesh *bm, const char itype, void *data, void **array, const int len);
void *BM_iter_as_arrayN(BMesh *bm, const char itype, void *data, int *r_len,
- void **stack_array, int stack_array_size)
-#ifdef __GNUC__
-__attribute__((warn_unused_result))
-#endif
-;
+ void **stack_array, int stack_array_size) ATTR_WARN_UNUSED_RESULT;
int BMO_iter_as_array(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const char restrictmask,
void **array, const int len);
void *BMO_iter_as_arrayN(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const char restrictmask,
diff --git a/source/blender/bmesh/intern/bmesh_log.c b/source/blender/bmesh/intern/bmesh_log.c
index c7be4424a21..b302ca7b8b2 100644
--- a/source/blender/bmesh/intern/bmesh_log.c
+++ b/source/blender/bmesh/intern/bmesh_log.c
@@ -18,6 +18,21 @@
* ***** END GPL LICENSE BLOCK *****
*/
+/** \file blender/bmesh/intern/bmesh_log.c
+ * \ingroup bmesh
+ *
+ * The BMLog is an interface for storing undo/redo steps as a BMesh is
+ * modified. It only stores changes to the BMesh, not full copies.
+ *
+ * Currently it supports the following types of changes:
+ *
+ * - Adding and removing vertices
+ * - Adding and removing faces
+ * - Moving vertices
+ * - Setting vertex paint-mask values
+ * - Setting vertex hflags
+ */
+
#include "MEM_guardedalloc.h"
#include "BLI_utildefines.h"
@@ -95,6 +110,7 @@ struct BMLog {
typedef struct {
float co[3];
+ short no[3];
float mask;
char hflag;
} BMLogVert;
@@ -117,10 +133,8 @@ static void bm_log_vert_id_set(BMLog *log, BMVert *v, unsigned int id)
{
void *vid = SET_INT_IN_POINTER(id);
- BLI_ghash_remove(log->id_to_elem, vid, NULL, NULL);
- BLI_ghash_insert(log->id_to_elem, vid, v);
- BLI_ghash_remove(log->elem_to_id, v, NULL, NULL);
- BLI_ghash_insert(log->elem_to_id, v, vid);
+ BLI_ghash_reinsert(log->id_to_elem, vid, v, NULL, NULL);
+ BLI_ghash_reinsert(log->elem_to_id, v, vid, NULL, NULL);
}
/* Get a vertex from its unique ID */
@@ -142,11 +156,9 @@ static unsigned int bm_log_face_id_get(BMLog *log, BMFace *f)
static void bm_log_face_id_set(BMLog *log, BMFace *f, unsigned int id)
{
void *fid = SET_INT_IN_POINTER(id);
-
- BLI_ghash_remove(log->id_to_elem, fid, NULL, NULL);
- BLI_ghash_insert(log->id_to_elem, fid, f);
- BLI_ghash_remove(log->elem_to_id, f, NULL, NULL);
- BLI_ghash_insert(log->elem_to_id, f, fid);
+
+ BLI_ghash_reinsert(log->id_to_elem, fid, f, NULL, NULL);
+ BLI_ghash_reinsert(log->elem_to_id, f, fid, NULL, NULL);
}
/* Get a face from its unique ID */
@@ -191,6 +203,7 @@ static void vert_mask_set(BMesh *bm, BMVert *v, float new_mask)
static void bm_log_vert_bmvert_copy(BMesh *bm, BMLogVert *lv, BMVert *v)
{
copy_v3_v3(lv->co, v->co);
+ normal_float_to_short_v3(lv->no, v->no);
lv->mask = vert_mask_get(bm, v);
lv->hflag = v->head.hflag;
}
@@ -277,9 +290,10 @@ static void bm_log_verts_restore(BMesh *bm, BMLog *log, GHash *verts)
GHASH_ITER (gh_iter, verts) {
void *key = BLI_ghashIterator_getKey(&gh_iter);
BMLogVert *lv = BLI_ghashIterator_getValue(&gh_iter);
- BMVert *v = BM_vert_create(bm, lv->co, NULL, 0);
+ BMVert *v = BM_vert_create(bm, lv->co, NULL, BM_CREATE_NOP);
v->head.hflag = lv->hflag;
vert_mask_set(bm, v, lv->mask);
+ normal_short_to_float_v3(v->no, lv->no);
bm_log_vert_id_set(log, v, GET_INT_FROM_POINTER(key));
}
}
@@ -295,7 +309,7 @@ static void bm_log_faces_restore(BMesh *bm, BMLog *log, GHash *faces)
bm_log_vert_from_id(log, lf->v_ids[2])};
BMFace *f;
- f = BM_face_create_quad_tri_v(bm, v, 3, NULL, false);
+ f = BM_face_create_verts(bm, v, 3, NULL, BM_CREATE_NOP, true);
bm_log_face_id_set(log, f, GET_INT_FROM_POINTER(key));
}
}
@@ -309,8 +323,12 @@ static void bm_log_vert_values_swap(BMesh *bm, BMLog *log, GHash *verts)
unsigned int id = GET_INT_FROM_POINTER(key);
BMVert *v = bm_log_vert_from_id(log, id);
float mask;
+ short normal[3];
swap_v3_v3(v->co, lv->co);
+ copy_v3_v3_short(normal, lv->no);
+ normal_float_to_short_v3(lv->no, v->no);
+ normal_short_to_float_v3(v->no, normal);
SWAP(char, v->head.hflag, lv->hflag);
mask = lv->mask;
lv->mask = vert_mask_get(bm, v);
@@ -404,7 +422,7 @@ static int uint_compare(const void *a_v, const void *b_v)
*/
static GHash *bm_log_compress_ids_to_indices(unsigned int *ids, int totid)
{
- GHash *map = BLI_ghash_int_new(AT);
+ GHash *map = BLI_ghash_int_new_ex(AT, totid);
int i;
qsort(ids, totid, sizeof(*ids), uint_compare);
@@ -438,8 +456,8 @@ BMLog *BM_log_create(BMesh *bm)
BMLog *log = MEM_callocN(sizeof(*log), AT);
log->unused_ids = range_tree_uint_alloc(0, (unsigned)-1);
- log->id_to_elem = BLI_ghash_ptr_new(AT);
- log->elem_to_id = BLI_ghash_ptr_new(AT);
+ log->id_to_elem = BLI_ghash_ptr_new_ex(AT, bm->totvert + bm->totface);
+ log->elem_to_id = BLI_ghash_ptr_new_ex(AT, bm->totvert + bm->totface);
/* Assign IDs to all existing vertices and faces */
bm_log_assign_ids(bm, log);
@@ -931,6 +949,24 @@ const float *BM_log_original_vert_co(BMLog *log, BMVert *v)
return lv->co;
}
+/* Get the logged normal of a vertex
+ *
+ * Does not modify the log or the vertex */
+const short *BM_log_original_vert_no(BMLog *log, BMVert *v)
+{
+ BMLogEntry *entry = log->current_entry;
+ const BMLogVert *lv;
+ unsigned v_id = bm_log_vert_id_get(log, v);
+ void *key = SET_INT_IN_POINTER(v_id);
+
+ BLI_assert(entry);
+
+ BLI_assert(BLI_ghash_haskey(entry->modified_verts, key));
+
+ lv = BLI_ghash_lookup(entry->modified_verts, key);
+ return lv->no;
+}
+
/* Get the logged mask of a vertex
*
* Does not modify the log or the vertex */
diff --git a/source/blender/bmesh/intern/bmesh_log.h b/source/blender/bmesh/intern/bmesh_log.h
index 958ff340b43..3cd2fd70081 100644
--- a/source/blender/bmesh/intern/bmesh_log.h
+++ b/source/blender/bmesh/intern/bmesh_log.h
@@ -21,16 +21,8 @@
#ifndef __BMESH_LOG_H__
#define __BMESH_LOG_H__
-/* The BMLog is an interface for storing undo/redo steps as a BMesh is
- * modified. It only stores changes to the BMesh, not full copies.
- *
- * Currently it supports the following types of changes:
- *
- * - Adding and removing vertices
- * - Adding and removing faces
- * - Moving vertices
- * - Setting vertex paint-mask values
- * - Setting vertex hflags
+/** \file blender/bmesh/intern/bmesh_log.h
+ * \ingroup bmesh
*/
struct BMFace;
@@ -92,6 +84,9 @@ void BM_log_before_all_removed(BMesh *bm, BMLog *log);
/* Get the logged coordinates of a vertex */
const float *BM_log_original_vert_co(BMLog *log, BMVert *v);
+/* Get the logged normal of a vertex */
+const short *BM_log_original_vert_no(BMLog *log, BMVert *v);
+
/* Get the logged mask of a vertex */
float BM_log_original_mask(BMLog *log, BMVert *v);
diff --git a/source/blender/bmesh/intern/bmesh_mesh.c b/source/blender/bmesh/intern/bmesh_mesh.c
index 64368390444..033a31daae7 100644
--- a/source/blender/bmesh/intern/bmesh_mesh.c
+++ b/source/blender/bmesh/intern/bmesh_mesh.c
@@ -213,6 +213,10 @@ void BM_mesh_data_free(BMesh *bm)
BLI_mempool_destroy(bm->lpool);
BLI_mempool_destroy(bm->fpool);
+ if (bm->vtable) MEM_freeN(bm->vtable);
+ if (bm->etable) MEM_freeN(bm->etable);
+ if (bm->ftable) MEM_freeN(bm->ftable);
+
/* destroy flag pool */
BM_mesh_elem_toolflags_clear(bm);
@@ -623,6 +627,179 @@ void BM_mesh_elem_index_validate(BMesh *bm, const char *location, const char *fu
}
+/* debug check only - no need to optimize */
+#ifndef NDEBUG
+bool BM_mesh_elem_table_check(BMesh *bm)
+{
+ BMIter iter;
+ BMElem *ele;
+ int i;
+
+ if (bm->vtable && ((bm->elem_table_dirty & BM_VERT) == 0)) {
+ BM_ITER_MESH_INDEX (ele, &iter, bm, BM_VERTS_OF_MESH, i) {
+ if (ele != (BMElem *)bm->vtable[i]) {
+ return false;
+ }
+ }
+ }
+
+ if (bm->etable && ((bm->elem_table_dirty & BM_EDGE) == 0)) {
+ BM_ITER_MESH_INDEX (ele, &iter, bm, BM_EDGES_OF_MESH, i) {
+ if (ele != (BMElem *)bm->etable[i]) {
+ return false;
+ }
+ }
+ }
+
+ if (bm->ftable && ((bm->elem_table_dirty & BM_FACE) == 0)) {
+ BM_ITER_MESH_INDEX (ele, &iter, bm, BM_FACES_OF_MESH, i) {
+ if (ele != (BMElem *)bm->ftable[i]) {
+ return false;
+ }
+ }
+ }
+
+ return true;
+}
+#endif
+
+
+
+void BM_mesh_elem_table_ensure(BMesh *bm, const char htype)
+{
+ /* assume if the array is non-null then its valid and no need to recalc */
+ const char htype_needed = (((bm->vtable && ((bm->elem_table_dirty & BM_VERT) == 0)) ? 0 : BM_VERT) |
+ ((bm->etable && ((bm->elem_table_dirty & BM_EDGE) == 0)) ? 0 : BM_EDGE) |
+ ((bm->ftable && ((bm->elem_table_dirty & BM_FACE) == 0)) ? 0 : BM_FACE)) & htype;
+
+ BLI_assert((htype & ~BM_ALL_NOLOOP) == 0);
+
+ /* in debug mode double check we didn't need to recalculate */
+ BLI_assert(BM_mesh_elem_table_check(bm) == true);
+
+ if (htype_needed & BM_VERT) {
+ if (bm->vtable && bm->totvert <= bm->vtable_tot && bm->totvert * 2 >= bm->vtable_tot) {
+ /* pass (re-use the array) */
+ }
+ else {
+ if (bm->vtable)
+ MEM_freeN(bm->vtable);
+ bm->vtable = MEM_mallocN(sizeof(void **) * bm->totvert, "bm->vtable");
+ bm->vtable_tot = bm->totvert;
+ }
+ bm->elem_table_dirty &= ~BM_VERT;
+ }
+ if (htype_needed & BM_EDGE) {
+ if (bm->etable && bm->totedge <= bm->etable_tot && bm->totedge * 2 >= bm->etable_tot) {
+ /* pass (re-use the array) */
+ }
+ else {
+ if (bm->etable)
+ MEM_freeN(bm->etable);
+ bm->etable = MEM_mallocN(sizeof(void **) * bm->totedge, "bm->etable");
+ bm->etable_tot = bm->totedge;
+ }
+ bm->elem_table_dirty &= ~BM_EDGE;
+ }
+ if (htype_needed & BM_FACE) {
+ if (bm->ftable && bm->totface <= bm->ftable_tot && bm->totface * 2 >= bm->ftable_tot) {
+ /* pass (re-use the array) */
+ }
+ else {
+ if (bm->ftable)
+ MEM_freeN(bm->ftable);
+ bm->ftable = MEM_mallocN(sizeof(void **) * bm->totface, "bm->ftable");
+ bm->ftable_tot = bm->totface;
+ }
+ bm->elem_table_dirty &= ~BM_FACE;
+ }
+
+#pragma omp parallel sections if (bm->totvert + bm->totedge + bm->totface >= BM_OMP_LIMIT)
+ {
+#pragma omp section
+ {
+ if (htype_needed & BM_VERT) {
+ BM_iter_as_array(bm, BM_VERTS_OF_MESH, NULL, (void **)bm->vtable, bm->totvert);
+ }
+ }
+#pragma omp section
+ {
+ if (htype_needed & BM_EDGE) {
+ BM_iter_as_array(bm, BM_EDGES_OF_MESH, NULL, (void **)bm->etable, bm->totedge);
+ }
+ }
+#pragma omp section
+ {
+ if (htype_needed & BM_FACE) {
+ BM_iter_as_array(bm, BM_FACES_OF_MESH, NULL, (void **)bm->ftable, bm->totface);
+ }
+ }
+ }
+}
+
+/* use BM_mesh_elem_table_ensure where possible to avoid full rebuild */
+void BM_mesh_elem_table_init(BMesh *bm, const char htype)
+{
+ BLI_assert((htype & ~BM_ALL_NOLOOP) == 0);
+
+ /* force recalc */
+ BM_mesh_elem_table_free(bm, BM_ALL_NOLOOP);
+ BM_mesh_elem_table_ensure(bm, htype);
+}
+
+void BM_mesh_elem_table_free(BMesh *bm, const char htype)
+{
+ if (htype & BM_VERT) {
+ MEM_SAFE_FREE(bm->vtable);
+ }
+
+ if (htype & BM_EDGE) {
+ MEM_SAFE_FREE(bm->etable);
+ }
+
+ if (htype & BM_FACE) {
+ MEM_SAFE_FREE(bm->ftable);
+ }
+}
+
+BMVert *BM_vert_at_index(BMesh *bm, int index)
+{
+ BLI_assert((index >= 0) && (index < bm->totvert));
+ BLI_assert((bm->elem_table_dirty & BM_VERT) == 0);
+ return bm->vtable[index];
+}
+
+BMEdge *BM_edge_at_index(BMesh *bm, int index)
+{
+ BLI_assert((index >= 0) && (index < bm->totedge));
+ BLI_assert((bm->elem_table_dirty & BM_EDGE) == 0);
+ return bm->etable[index];
+}
+
+BMFace *BM_face_at_index(BMesh *bm, int index)
+{
+ BLI_assert((index >= 0) && (index < bm->totface));
+ BLI_assert((bm->elem_table_dirty & BM_FACE) == 0);
+ return bm->ftable[index];
+}
+
+
+BMVert *BM_vert_at_index_find(BMesh *bm, const int index)
+{
+ return BLI_mempool_findelem(bm->vpool, index);
+}
+
+BMEdge *BM_edge_at_index_find(BMesh *bm, const int index)
+{
+ return BLI_mempool_findelem(bm->epool, index);
+}
+
+BMFace *BM_face_at_index_find(BMesh *bm, const int index)
+{
+ return BLI_mempool_findelem(bm->fpool, index);
+}
+
+
/**
* Return the amount of element of type 'type' in a given bmesh.
*/
@@ -667,14 +844,14 @@ void BM_mesh_remap(BMesh *bm, int *vert_idx, int *edge_idx, int *face_idx)
if (!(vert_idx || edge_idx || face_idx))
return;
- /* Remap vertices */
+ /* Remap Verts */
if (vert_idx) {
BMVert **verts_pool, *verts_copy, **vep;
int i, totvert = bm->totvert;
int *new_idx = NULL;
/* Init the old-to-new vert pointers mapping */
- vptr_map = BLI_ghash_ptr_new("BM_mesh_remap vert pointers mapping");
+ vptr_map = BLI_ghash_ptr_new_ex("BM_mesh_remap vert pointers mapping", bm->totvert);
/* Make a copy of all vertices. */
verts_pool = MEM_callocN(sizeof(BMVert *) * totvert, "BM_mesh_remap verts pool");
@@ -701,14 +878,14 @@ void BM_mesh_remap(BMesh *bm, int *vert_idx, int *edge_idx, int *face_idx)
MEM_freeN(verts_copy);
}
- /* XXX Code not tested yet (though I don't why it would fail)! */
+ /* Remap Edges */
if (edge_idx) {
BMEdge **edges_pool, *edges_copy, **edp;
int i, totedge = bm->totedge;
int *new_idx = NULL;
/* Init the old-to-new vert pointers mapping */
- eptr_map = BLI_ghash_ptr_new("BM_mesh_remap edge pointers mapping");
+ eptr_map = BLI_ghash_ptr_new_ex("BM_mesh_remap edge pointers mapping", bm->totedge);
/* Make a copy of all vertices. */
edges_pool = MEM_callocN(sizeof(BMEdge *) * totedge, "BM_mesh_remap edges pool");
@@ -734,14 +911,14 @@ void BM_mesh_remap(BMesh *bm, int *vert_idx, int *edge_idx, int *face_idx)
MEM_freeN(edges_copy);
}
- /* XXX Code not tested yet (though I don't why it would fail)! */
+ /* Remap Faces */
if (face_idx) {
BMFace **faces_pool, *faces_copy, **fap;
int i, totface = bm->totface;
int *new_idx = NULL;
/* Init the old-to-new vert pointers mapping */
- fptr_map = BLI_ghash_ptr_new("BM_mesh_remap face pointers mapping");
+ fptr_map = BLI_ghash_ptr_new_ex("BM_mesh_remap face pointers mapping", bm->totface);
/* Make a copy of all vertices. */
faces_pool = MEM_callocN(sizeof(BMFace *) * totface, "BM_mesh_remap faces pool");
@@ -828,18 +1005,3 @@ void BM_mesh_remap(BMesh *bm, int *vert_idx, int *edge_idx, int *face_idx)
if (fptr_map)
BLI_ghash_free(fptr_map, NULL, NULL);
}
-
-BMVert *BM_vert_at_index(BMesh *bm, const int index)
-{
- return BLI_mempool_findelem(bm->vpool, index);
-}
-
-BMEdge *BM_edge_at_index(BMesh *bm, const int index)
-{
- return BLI_mempool_findelem(bm->epool, index);
-}
-
-BMFace *BM_face_at_index(BMesh *bm, const int index)
-{
- return BLI_mempool_findelem(bm->fpool, index);
-}
diff --git a/source/blender/bmesh/intern/bmesh_mesh.h b/source/blender/bmesh/intern/bmesh_mesh.h
index efcd80b374b..33431714660 100644
--- a/source/blender/bmesh/intern/bmesh_mesh.h
+++ b/source/blender/bmesh/intern/bmesh_mesh.h
@@ -45,14 +45,29 @@ void bmesh_edit_end(BMesh *bm, const BMOpTypeFlag type_flag);
void BM_mesh_elem_index_ensure(BMesh *bm, const char hflag);
void BM_mesh_elem_index_validate(BMesh *bm, const char *location, const char *func,
const char *msg_a, const char *msg_b);
-int BM_mesh_elem_count(BMesh *bm, const char htype);
-void BM_mesh_remap(BMesh *bm, int *vert_idx, int *edge_idx, int *face_idx);
+#ifndef NDEBUG
+bool BM_mesh_elem_table_check(BMesh *em);
+#endif
+
+void BM_mesh_elem_table_ensure(BMesh *bm, const char htype);
+void BM_mesh_elem_table_init(BMesh *bm, const char htype);
+void BM_mesh_elem_table_free(BMesh *bm, const char htype);
BMVert *BM_vert_at_index(BMesh *bm, const int index);
BMEdge *BM_edge_at_index(BMesh *bm, const int index);
BMFace *BM_face_at_index(BMesh *bm, const int index);
+BMVert *BM_vert_at_index_find(BMesh *bm, const int index);
+BMEdge *BM_edge_at_index_find(BMesh *bm, const int index);
+BMFace *BM_face_at_index_find(BMesh *bm, const int index);
+
+// XXX
+
+int BM_mesh_elem_count(BMesh *bm, const char htype);
+
+void BM_mesh_remap(BMesh *bm, int *vert_idx, int *edge_idx, int *face_idx);
+
typedef struct BMAllocTemplate {
int totvert, totedge, totloop, totface;
} BMAllocTemplate;
@@ -60,6 +75,13 @@ typedef struct BMAllocTemplate {
extern const BMAllocTemplate bm_mesh_allocsize_default;
extern const BMAllocTemplate bm_mesh_chunksize_default;
+#define BMALLOC_TEMPLATE_FROM_BM(bm) { (CHECK_TYPE_INLINE(bm, BMesh *), \
+ (bm)->totvert), (bm)->totedge, (bm)->totloop, (bm)->totface}
+#define BMALLOC_TEMPLATE_FROM_ME(me) { (CHECK_TYPE_INLINE(me, Mesh *), \
+ (me)->totvert), (me)->totedge, (me)->totloop, (me)->totpoly}
+#define BMALLOC_TEMPLATE_FROM_DM(dm) { (CHECK_TYPE_INLINE(dm, DerivedMesh *), \
+ (dm)->getNumVerts(dm)), (dm)->getNumEdges(dm), (dm)->getNumLoops(dm), (dm)->getNumPolys(dm)}
+
enum {
BM_MESH_CREATE_USE_TOOLFLAGS = (1 << 0)
};
diff --git a/source/blender/bmesh/intern/bmesh_mesh_conv.c b/source/blender/bmesh/intern/bmesh_mesh_conv.c
index 81d4aad0fdf..d92fe45afcd 100644
--- a/source/blender/bmesh/intern/bmesh_mesh_conv.c
+++ b/source/blender/bmesh/intern/bmesh_mesh_conv.c
@@ -212,7 +212,7 @@ static BMFace *bm_face_create_from_mpoly(MPoly *mp, MLoop *ml,
edges[j] = etable[ml->e];
}
- return BM_face_create(bm, verts, edges, mp->totloop, BM_CREATE_SKIP_CD);
+ return BM_face_create(bm, verts, edges, mp->totloop, NULL, BM_CREATE_SKIP_CD);
}
diff --git a/source/blender/bmesh/intern/bmesh_mods.c b/source/blender/bmesh/intern/bmesh_mods.c
index 418fc16ea55..4dc155e68c2 100644
--- a/source/blender/bmesh/intern/bmesh_mods.c
+++ b/source/blender/bmesh/intern/bmesh_mods.c
@@ -231,49 +231,24 @@ bool BM_disk_dissolve(BMesh *bm, BMVert *v)
* to be reconsidered.
*
* If the windings do not match the winding of the new face will follow
- * \a f1's winding (i.e. \a f2 will be reversed before the join).
+ * \a f_a's winding (i.e. \a f_b will be reversed before the join).
*
* \return pointer to the combined face
*/
-BMFace *BM_faces_join_pair(BMesh *bm, BMFace *f1, BMFace *f2, BMEdge *e, const bool do_del)
+BMFace *BM_faces_join_pair(BMesh *bm, BMFace *f_a, BMFace *f_b, BMEdge *e, const bool do_del)
{
- BMLoop *l1, *l2;
- BMEdge *jed = NULL;
- BMFace *faces[2] = {f1, f2};
-
- jed = e;
- if (!jed) {
- BMLoop *l_first;
- /* search for an edge that has both these faces in its radial cycle */
- l1 = l_first = BM_FACE_FIRST_LOOP(f1);
- do {
- if (l1->radial_next->f == f2) {
- jed = l1->e;
- break;
- }
- } while ((l1 = l1->next) != l_first);
- }
+ BMFace *faces[2] = {f_a, f_b};
- if (UNLIKELY(!jed)) {
- BMESH_ASSERT(0);
- return NULL;
- }
-
- l1 = jed->l;
-
- if (UNLIKELY(!l1)) {
- BMESH_ASSERT(0);
- return NULL;
- }
-
- l2 = l1->radial_next;
- if (l1->v == l2->v) {
- bmesh_loop_reverse(bm, f2);
- }
+ BMLoop *l_a = BM_face_edge_share_loop(f_a, e);
+ BMLoop *l_b = BM_face_edge_share_loop(f_b, e);
- f1 = BM_faces_join(bm, faces, 2, do_del);
+ BLI_assert(l_a && l_b);
+
+ if (l_a->v == l_b->v) {
+ bmesh_loop_reverse(bm, f_b);
+ }
- return f1;
+ return BM_faces_join(bm, faces, 2, do_del);
}
/**
@@ -356,10 +331,9 @@ BMFace *BM_face_split(BMesh *bm, BMFace *f, BMVert *v1, BMVert *v2, BMLoop **r_l
if (f_new) {
BM_elem_attrs_copy(bm, bm, f, f_new);
- copy_v3_v3(f_new->no, f->no);
/* handle multires update */
- if (has_mdisp && (f_new != f)) {
+ if (has_mdisp) {
BMLoop *l_iter;
BMLoop *l_first;
@@ -373,8 +347,6 @@ BMFace *BM_face_split(BMesh *bm, BMFace *f, BMVert *v1, BMVert *v2, BMLoop **r_l
BM_loop_interp_multires(bm, l_iter, f_tmp);
} while ((l_iter = l_iter->next) != l_first);
- BM_face_kill(bm, f_tmp);
-
#if 0
/* BM_face_multires_bounds_smooth doesn't flip displacement correct */
BM_face_multires_bounds_smooth(bm, f);
@@ -383,6 +355,10 @@ BMFace *BM_face_split(BMesh *bm, BMFace *f, BMVert *v1, BMVert *v2, BMLoop **r_l
}
}
+ if (has_mdisp) {
+ BM_face_kill(bm, f_tmp);
+ }
+
return f_new;
}
@@ -848,7 +824,7 @@ void BM_edge_calc_rotate(BMEdge *e, const bool ccw,
/* we could swap the verts _or_ the faces, swapping faces
* gives more predictable results since that way the next vert
* just stitches from face fa / fb */
- if (ccw) {
+ if (!ccw) {
SWAP(BMFace *, fa, fb);
}
@@ -1067,13 +1043,13 @@ BMEdge *BM_edge_rotate(BMesh *bm, BMEdge *e, const bool ccw, const short check_f
/* first create the new edge, this is so we can copy the customdata from the old one
* if splice if disabled, always add in a new edge even if theres one there. */
- e_new = BM_edge_create(bm, v1, v2, e, (check_flag & BM_EDGEROT_CHECK_SPLICE) != 0);
+ e_new = BM_edge_create(bm, v1, v2, e, (check_flag & BM_EDGEROT_CHECK_SPLICE) ? BM_CREATE_NO_DOUBLE : BM_CREATE_NOP);
f_hflag_prev_1 = l1->f->head.hflag;
f_hflag_prev_2 = l2->f->head.hflag;
/* don't delete the edge, manually remove the edge after so we can copy its attributes */
- f = BM_faces_join_pair(bm, l1->f, l2->f, NULL, true);
+ f = BM_faces_join_pair(bm, l1->f, l2->f, e, true);
if (f == NULL) {
return NULL;
diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c
index 4f8a851c780..775cb24b8c9 100644
--- a/source/blender/bmesh/intern/bmesh_opdefines.c
+++ b/source/blender/bmesh/intern/bmesh_opdefines.c
@@ -542,6 +542,7 @@ static BMOpDefine bmo_grid_fill_def = {
/* restricts edges to groups. maps edges to integer */
{"mat_nr", BMO_OP_SLOT_INT}, /* material to use */
{"use_smooth", BMO_OP_SLOT_BOOL}, /* smooth state to use */
+ {"use_interp_simple", BMO_OP_SLOT_BOOL}, /* use simple interpolation */
{{'\0'}},
},
/* slots_out */
@@ -577,6 +578,28 @@ static BMOpDefine bmo_holes_fill_def = {
/*
+ * Face Attribute Fill.
+ *
+ * Fill in faces with data from adjacent faces.
+ */
+static BMOpDefine bmo_face_attribute_fill_def = {
+ "face_attribute_fill",
+ /* slots_in */
+ {{"faces", BMO_OP_SLOT_ELEMENT_BUF, {BM_FACE}}, /* input faces */
+ {"use_normals", BMO_OP_SLOT_BOOL}, /* copy face winding */
+ {"use_data", BMO_OP_SLOT_BOOL}, /* copy face data */
+ {{'\0'}},
+ },
+ /* slots_out */
+ /* maps new faces to the group numbers they came from */
+ {{"faces_fail.out", BMO_OP_SLOT_ELEMENT_BUF, {BM_FACE}}, /* faces that could not be handled */
+ {{'\0'}},
+ },
+ bmo_face_attribute_fill_exec,
+ BMO_OPTYPE_FLAG_NORMALS_CALC | BMO_OPTYPE_FLAG_SELECT_FLUSH,
+};
+
+/*
* Edge Loop Fill.
*
* Create faces defined by one or more non overlapping edge loops.
@@ -609,19 +632,14 @@ static BMOpDefine bmo_edgenet_fill_def = {
"edgenet_fill",
/* slots_in */
{{"edges", BMO_OP_SLOT_ELEMENT_BUF, {BM_EDGE}}, /* input edges */
- /* restricts edges to groups. maps edges to integer */
- {"restrict", BMO_OP_SLOT_MAPPING, {BMO_OP_SLOT_SUBTYPE_MAP_BOOL}},
- {"use_restrict", BMO_OP_SLOT_BOOL},
- {"use_fill_check", BMO_OP_SLOT_BOOL},
- {"exclude_faces", BMO_OP_SLOT_ELEMENT_BUF, {BM_FACE}}, /* list of faces to ignore for manifold check */
- {"mat_nr", BMO_OP_SLOT_INT}, /* material to use */
- {"use_smooth", BMO_OP_SLOT_BOOL}, /* smooth state to use */
+ {"mat_nr", BMO_OP_SLOT_INT}, /* material to use */
+ {"use_smooth", BMO_OP_SLOT_BOOL}, /* smooth state to use */
+ {"sides", BMO_OP_SLOT_INT}, /* number of sides */
{{'\0'}},
},
/* slots_out */
/* maps new faces to the group numbers they came from */
- {{"face_groupmap.out", BMO_OP_SLOT_MAPPING, {BMO_OP_SLOT_SUBTYPE_MAP_ELEM}},
- {"faces.out", BMO_OP_SLOT_ELEMENT_BUF, {BM_FACE}}, /* new faces */
+ {{"faces.out", BMO_OP_SLOT_ELEMENT_BUF, {BM_FACE}}, /* new faces */
{{'\0'}},
},
bmo_edgenet_fill_exec,
@@ -1101,6 +1119,30 @@ static BMOpDefine bmo_subdivide_edgering_def = {
};
/*
+ * Bisect Plane.
+ *
+ * Bisects the mesh by a plane (cut the mesh in half).
+ */
+static BMOpDefine bmo_bisect_plane_def = {
+ "bisect_plane",
+ /* slots_in */
+ {{"geom", BMO_OP_SLOT_ELEMENT_BUF, {BM_VERT | BM_EDGE | BM_FACE}},
+ {"dist", BMO_OP_SLOT_FLT}, /* minimum distance when testing if a vert is exactly on the plane */
+ {"plane_co", BMO_OP_SLOT_VEC}, /* point on the plane */
+ {"plane_no", BMO_OP_SLOT_VEC}, /* direction of the plane */
+ {"use_snap_center", BMO_OP_SLOT_BOOL}, /* snap axis aligned verts to the center */
+ {"clear_outer", BMO_OP_SLOT_BOOL}, /* when enabled. remove all geometry on the positive side of the plane */
+ {"clear_inner", BMO_OP_SLOT_BOOL}, /* when enabled. remove all geometry on the negative side of the plane */
+ {{'\0'}},
+ },
+ {{"geom_cut.out", BMO_OP_SLOT_ELEMENT_BUF, {BM_VERT | BM_EDGE}}, /* output new geometry from the cut */
+ {"geom.out", BMO_OP_SLOT_ELEMENT_BUF, {BM_VERT | BM_EDGE | BM_FACE}}, /* input and output geometry (result of cut) */
+ {{'\0'}}},
+ bmo_bisect_plane_exec,
+ BMO_OPTYPE_FLAG_UNTAN_MULTIRES | BMO_OPTYPE_FLAG_NORMALS_CALC | BMO_OPTYPE_FLAG_SELECT_FLUSH,
+};
+
+/*
* Delete Geometry.
*
* Utility operator to delete geometry.
@@ -1136,6 +1178,8 @@ static BMOpDefine bmo_duplicate_def = {
{"geom.out", BMO_OP_SLOT_ELEMENT_BUF, {BM_VERT | BM_EDGE | BM_FACE}},
/* facemap maps from source faces to dupe
* faces, and from dupe faces to source faces */
+ {"vert_map.out", BMO_OP_SLOT_MAPPING, {BMO_OP_SLOT_SUBTYPE_MAP_ELEM}},
+ {"edge_map.out", BMO_OP_SLOT_MAPPING, {BMO_OP_SLOT_SUBTYPE_MAP_ELEM}},
{"face_map.out", BMO_OP_SLOT_MAPPING, {BMO_OP_SLOT_SUBTYPE_MAP_ELEM}},
{"boundary_map.out", BMO_OP_SLOT_MAPPING, {BMO_OP_SLOT_SUBTYPE_MAP_ELEM}},
{"isovert_map.out", BMO_OP_SLOT_MAPPING, {BMO_OP_SLOT_SUBTYPE_MAP_ELEM}},
@@ -1536,6 +1580,7 @@ static BMOpDefine bmo_beautify_fill_def = {
{{"faces", BMO_OP_SLOT_ELEMENT_BUF, {BM_FACE}}, /* input faces */
{"edges", BMO_OP_SLOT_ELEMENT_BUF, {BM_EDGE}}, /* edges that can be flipped */
{"use_restrict_tag", BMO_OP_SLOT_BOOL}, /* restrict edge rotation to mixed tagged vertices */
+ {"method", BMO_OP_SLOT_INT}, /* method to define what is beautiful */
{{'\0'}},
},
/* slots_out */
@@ -1555,7 +1600,9 @@ static BMOpDefine bmo_triangle_fill_def = {
"triangle_fill",
/* slots_in */
{{"use_beauty", BMO_OP_SLOT_BOOL},
+ {"use_dissolve", BMO_OP_SLOT_BOOL}, /* dissolve resulting faces */
{"edges", BMO_OP_SLOT_ELEMENT_BUF, {BM_EDGE}}, /* input edges */
+ {"normal", BMO_OP_SLOT_VEC}, /* optionally pass the fill normal to use */
{{'\0'}},
},
/* slots_out */
@@ -1607,7 +1654,7 @@ static BMOpDefine bmo_inset_individual_def = {
{{'\0'}},
},
bmo_inset_individual_exec,
- BMO_OPTYPE_FLAG_NORMALS_CALC | BMO_OPTYPE_FLAG_SELECT_FLUSH,
+ BMO_OPTYPE_FLAG_NORMALS_CALC, /* caller needs to handle BMO_OPTYPE_FLAG_SELECT_FLUSH */
};
/*
@@ -1734,6 +1781,7 @@ static BMOpDefine bmo_symmetrize_def = {
/* slots_in */
{{"input", BMO_OP_SLOT_ELEMENT_BUF, {BM_VERT | BM_EDGE | BM_FACE}},
{"direction", BMO_OP_SLOT_INT},
+ {"dist", BMO_OP_SLOT_FLT}, /* minimum distance */
{{'\0'}},
},
/* slots_out */
@@ -1776,6 +1824,7 @@ const BMOpDefine *bmo_opdefines[] = {
&bmo_dissolve_verts_def,
&bmo_duplicate_def,
&bmo_holes_fill_def,
+ &bmo_face_attribute_fill_def,
&bmo_edgeloop_fill_def,
&bmo_edgenet_fill_def,
&bmo_edgenet_prepare_def,
@@ -1816,6 +1865,7 @@ const BMOpDefine *bmo_opdefines[] = {
&bmo_split_edges_def,
&bmo_subdivide_edges_def,
&bmo_subdivide_edgering_def,
+ &bmo_bisect_plane_def,
&bmo_symmetrize_def,
&bmo_transform_def,
&bmo_translate_def,
diff --git a/source/blender/bmesh/intern/bmesh_operator_api.h b/source/blender/bmesh/intern/bmesh_operator_api.h
index 24bfcd70d75..7de158f3c29 100644
--- a/source/blender/bmesh/intern/bmesh_operator_api.h
+++ b/source/blender/bmesh/intern/bmesh_operator_api.h
@@ -335,6 +335,11 @@ void BMO_slot_mat3_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_na
void BMO_mesh_flag_disable_all(BMesh *bm, BMOperator *op, const char htype, const short oflag);
+void BMO_mesh_selected_remap(BMesh *bm,
+ BMOpSlot *slot_vert_map,
+ BMOpSlot *slot_edge_map,
+ BMOpSlot *slot_face_map);
+
/* copies the values from another slot to the end of the output slot */
#define BMO_slot_buffer_append(op_src, slots_src, slot_name_src, \
op_dst, slots_dst, slot_name_dst) \
@@ -398,7 +403,7 @@ int BMO_slot_buffer_count(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot
int BMO_slot_map_count(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name);
void BMO_slot_map_insert(BMOperator *op, BMOpSlot *slot,
- const void *element, const void *data, const int len);
+ const void *element, const void *data);
/* flags all elements in a mapping. note that the mapping must only have
* bmesh elements in it.*/
@@ -452,7 +457,7 @@ typedef struct BMOIter {
BMOpSlot *slot;
int cur; //for arrays
GHashIterator giter;
- void *val;
+ void **val;
char restrictmask; /* bitwise '&' with BMHeader.htype */
} BMOIter;
@@ -463,15 +468,12 @@ void *BMO_iter_new(BMOIter *iter,
const char restrictmask);
void *BMO_iter_step(BMOIter *iter);
-/* returns a pointer to the key value when iterating over mappings.
- * remember for pointer maps this will be a pointer to a pointer.*/
-void *BMO_iter_map_value(BMOIter *iter);
-
-/* use this for pointer mappings */
-void *BMO_iter_map_value_p(BMOIter *iter);
+void **BMO_iter_map_value_p(BMOIter *iter);
+void *BMO_iter_map_value_ptr(BMOIter *iter);
-/* use this for float mappings */
-float BMO_iter_map_value_f(BMOIter *iter);
+float BMO_iter_map_value_float(BMOIter *iter);
+int BMO_iter_map_value_int(BMOIter *iter);
+bool BMO_iter_map_value_bool(BMOIter *iter);
#define BMO_ITER(ele, iter, slot_args, slot_name, restrict_flag) \
for (ele = BMO_iter_new(iter, slot_args, slot_name, restrict_flag); ele; ele = BMO_iter_step(iter))
@@ -479,16 +481,6 @@ float BMO_iter_map_value_f(BMOIter *iter);
/******************* Inlined Functions********************/
typedef void (*opexec)(BMesh *bm, BMOperator *op);
-/* mappings map elements to data, which
- * follows the mapping struct in memory. */
-typedef struct BMOElemMapping {
- BMHeader *element;
- int len;
-} BMOElemMapping;
-
-/* pointer after BMOElemMapping */
-#define BMO_OP_SLOT_MAPPING_DATA(var) (void *)(((BMOElemMapping *)var) + 1)
-
extern const int BMO_OPSLOT_TYPEINFO[BMO_OP_SLOT_TOTAL_TYPES];
int BMO_opcode_from_opname(const char *opname);
diff --git a/source/blender/bmesh/intern/bmesh_operator_api_inline.h b/source/blender/bmesh/intern/bmesh_operator_api_inline.h
index 724ddcf3b04..77310d958e6 100644
--- a/source/blender/bmesh/intern/bmesh_operator_api_inline.h
+++ b/source/blender/bmesh/intern/bmesh_operator_api_inline.h
@@ -55,13 +55,13 @@ BLI_INLINE void _bmo_elem_flag_enable(BMesh *bm, BMFlagLayer *oflags, const shor
BLI_INLINE void _bmo_elem_flag_disable(BMesh *bm, BMFlagLayer *oflags, const short oflag)
{
- oflags[bm->stackdepth - 1].f &= ~oflag;
+ oflags[bm->stackdepth - 1].f &= (short)~oflag;
}
BLI_INLINE void _bmo_elem_flag_set(BMesh *bm, BMFlagLayer *oflags, const short oflag, int val)
{
if (val) oflags[bm->stackdepth - 1].f |= oflag;
- else oflags[bm->stackdepth - 1].f &= ~oflag;
+ else oflags[bm->stackdepth - 1].f &= (short)~oflag;
}
BLI_INLINE void _bmo_elem_flag_toggle(BMesh *bm, BMFlagLayer *oflags, const short oflag)
@@ -72,23 +72,26 @@ BLI_INLINE void _bmo_elem_flag_toggle(BMesh *bm, BMFlagLayer *oflags, const shor
BLI_INLINE void BMO_slot_map_int_insert(BMOperator *op, BMOpSlot *slot,
void *element, const int val)
{
+ union { void *ptr; int val; } t = {NULL};
BLI_assert(slot->slot_subtype.map == BMO_OP_SLOT_SUBTYPE_MAP_INT);
- BMO_slot_map_insert(op, slot, element, &val, sizeof(int));
+ BMO_slot_map_insert(op, slot, element, ((t.val = val), t.ptr));
}
BLI_INLINE void BMO_slot_map_bool_insert(BMOperator *op, BMOpSlot *slot,
void *element, const int val)
{
+ union { void *ptr; int val; } t = {NULL};
BLI_assert(slot->slot_subtype.map == BMO_OP_SLOT_SUBTYPE_MAP_BOOL);
BLI_assert(val == false || val == true);
- BMO_slot_map_insert(op, slot, element, &val, sizeof(int));
+ BMO_slot_map_insert(op, slot, element, ((t.val = val), t.ptr));
}
BLI_INLINE void BMO_slot_map_float_insert(BMOperator *op, BMOpSlot *slot,
void *element, const float val)
{
+ union { void *ptr; float val; } t = {NULL};
BLI_assert(slot->slot_subtype.map == BMO_OP_SLOT_SUBTYPE_MAP_FLT);
- BMO_slot_map_insert(op, slot, element, &val, sizeof(float));
+ BMO_slot_map_insert(op, slot, element, ((t.val = val), t.ptr));
}
@@ -101,14 +104,14 @@ BLI_INLINE void BMO_slot_map_ptr_insert(BMOperator *op, BMOpSlot *slot,
const void *element, void *val)
{
BLI_assert(slot->slot_subtype.map == BMO_OP_SLOT_SUBTYPE_MAP_INTERNAL);
- BMO_slot_map_insert(op, slot, element, &val, sizeof(void *));
+ BMO_slot_map_insert(op, slot, element, val);
}
BLI_INLINE void BMO_slot_map_elem_insert(BMOperator *op, BMOpSlot *slot,
const void *element, void *val)
{
BLI_assert(slot->slot_subtype.map == BMO_OP_SLOT_SUBTYPE_MAP_ELEM);
- BMO_slot_map_insert(op, slot, element, &val, sizeof(void *));
+ BMO_slot_map_insert(op, slot, element, val);
}
@@ -117,77 +120,66 @@ BLI_INLINE void BMO_slot_map_empty_insert(BMOperator *op, BMOpSlot *slot,
const void *element)
{
BLI_assert(slot->slot_subtype.map == BMO_OP_SLOT_SUBTYPE_MAP_EMPTY);
- BMO_slot_map_insert(op, slot, element, NULL, 0);
+ BMO_slot_map_insert(op, slot, element, NULL);
}
BLI_INLINE bool BMO_slot_map_contains(BMOpSlot *slot, const void *element)
{
BLI_assert(slot->slot_type == BMO_OP_SLOT_MAPPING);
-
- /* sanity check */
- if (UNLIKELY(slot->data.ghash == NULL)) {
- return false;
- }
-
return BLI_ghash_haskey(slot->data.ghash, element);
}
-BLI_INLINE void *BMO_slot_map_data_get(BMOpSlot *slot, const void *element)
+BLI_INLINE void **BMO_slot_map_data_get(BMOpSlot *slot, const void *element)
{
- BMOElemMapping *mapping;
- BLI_assert(slot->slot_type == BMO_OP_SLOT_MAPPING);
-
- /* sanity check */
- if (UNLIKELY(slot->data.ghash == NULL)) {
- return NULL;
- }
-
- mapping = (BMOElemMapping *)BLI_ghash_lookup(slot->data.ghash, element);
-
- if (!mapping) {
- return NULL;
- }
- return mapping + 1;
+ return BLI_ghash_lookup_p(slot->data.ghash, element);
}
BLI_INLINE float BMO_slot_map_float_get(BMOpSlot *slot, const void *element)
{
- float *val;
+ void **data;
BLI_assert(slot->slot_subtype.map == BMO_OP_SLOT_SUBTYPE_MAP_FLT);
- val = (float *) BMO_slot_map_data_get(slot, element);
- if (val) return *val;
-
- return 0.0f;
+ data = BMO_slot_map_data_get(slot, element);
+ if (data) {
+ return **(float **)data;
+ }
+ else {
+ return 0.0f;
+ }
}
BLI_INLINE int BMO_slot_map_int_get(BMOpSlot *slot, const void *element)
{
- int *val;
+ void **data;
BLI_assert(slot->slot_subtype.map == BMO_OP_SLOT_SUBTYPE_MAP_INT);
- val = (int *) BMO_slot_map_data_get(slot, element);
- if (val) return *val;
-
- return 0;
+ data = BMO_slot_map_data_get(slot, element);
+ if (data) {
+ return **(int **)data;
+ }
+ else {
+ return 0;
+ }
}
BLI_INLINE bool BMO_slot_map_bool_get(BMOpSlot *slot, const void *element)
{
- int *val;
+ void **data;
BLI_assert(slot->slot_subtype.map == BMO_OP_SLOT_SUBTYPE_MAP_BOOL);
- val = (int *) BMO_slot_map_data_get(slot, element);
- BLI_assert(val == NULL || *val == false || *val == true);
- if (val) return (bool)*val;
-
- return false;
+ data = BMO_slot_map_data_get(slot, element);
+ if (data) {
+ return **(int **)data;
+ }
+ else {
+ return false;
+ }
}
BLI_INLINE void *BMO_slot_map_ptr_get(BMOpSlot *slot, const void *element)
{
- void **val = (void **) BMO_slot_map_data_get(slot, element);
+ void **val = BMO_slot_map_data_get(slot, element);
BLI_assert(slot->slot_subtype.map == BMO_OP_SLOT_SUBTYPE_MAP_INTERNAL);
if (val) return *val;
diff --git a/source/blender/bmesh/intern/bmesh_operators.c b/source/blender/bmesh/intern/bmesh_operators.c
index b71d5a7e7d4..611ee4d03b8 100644
--- a/source/blender/bmesh/intern/bmesh_operators.c
+++ b/source/blender/bmesh/intern/bmesh_operators.c
@@ -74,7 +74,7 @@ const int BMO_OPSLOT_TYPEINFO[BMO_OP_SLOT_TOTAL_TYPES] = {
0, /* 7: unused */
sizeof(float) * 3, /* 8: BMO_OP_SLOT_VEC */
sizeof(void *), /* 9: BMO_OP_SLOT_ELEMENT_BUF */
- sizeof(BMOElemMapping) /* 10: BMO_OP_SLOT_MAPPING */
+ sizeof(void *) /* 10: BMO_OP_SLOT_MAPPING */
};
/* Dummy slot so there is something to return when slot name lookup fails */
@@ -127,12 +127,38 @@ void BMO_pop(BMesh *bm)
/* use for both slot_types_in and slot_types_out */
static void bmo_op_slots_init(const BMOSlotType *slot_types, BMOpSlot *slot_args)
{
+ BMOpSlot *slot;
+ unsigned int i;
+ for (i = 0; slot_types[i].type; i++) {
+ slot = &slot_args[i];
+ slot->slot_name = slot_types[i].name;
+ slot->slot_type = slot_types[i].type;
+ slot->slot_subtype = slot_types[i].subtype;
+ // slot->index = i; // UNUSED
+
+ switch (slot->slot_type) {
+ case BMO_OP_SLOT_MAPPING:
+ slot->data.ghash = BLI_ghash_ptr_new("bmesh slot map hash");
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+static void bmo_op_slots_free(const BMOSlotType *slot_types, BMOpSlot *slot_args)
+{
+ BMOpSlot *slot;
unsigned int i;
for (i = 0; slot_types[i].type; i++) {
- slot_args[i].slot_name = slot_types[i].name;
- slot_args[i].slot_type = slot_types[i].type;
- slot_args[i].slot_subtype = slot_types[i].subtype;
- // slot_args[i].index = i; // UNUSED
+ slot = &slot_args[i];
+ switch (slot->slot_type) {
+ case BMO_OP_SLOT_MAPPING:
+ BLI_ghash_free(slot->data.ghash, NULL, NULL);
+ break;
+ default:
+ break;
+ }
}
}
@@ -198,20 +224,6 @@ void BMO_op_exec(BMesh *bm, BMOperator *op)
BMO_pop(bm);
}
-static void bmo_op_slots_free(const BMOSlotType *slot_types, BMOpSlot *slot_args)
-{
- BMOpSlot *slot;
- unsigned int i;
- for (i = 0; slot_types[i].type; i++) {
- slot = &slot_args[i];
- if (slot->slot_type == BMO_OP_SLOT_MAPPING) {
- if (slot->data.ghash) {
- BLI_ghash_free(slot->data.ghash, NULL, NULL);
- }
- }
- }
-}
-
/**
* \brief BMESH OPSTACK FINISH OP
*
@@ -333,28 +345,13 @@ void _bmo_slot_copy(BMOpSlot slot_args_src[BMO_OP_MAX_SLOTS], const char *slot_n
}
else if (slot_dst->slot_type == BMO_OP_SLOT_MAPPING) {
GHashIterator it;
- BMOElemMapping *srcmap, *dstmap;
-
- /* sanity check */
- if (!slot_src->data.ghash) {
- return;
- }
-
- if (!slot_dst->data.ghash) {
- slot_dst->data.ghash = BLI_ghash_ptr_new("bmesh operator 2");
- }
-
for (BLI_ghashIterator_init(&it, slot_src->data.ghash);
- (srcmap = BLI_ghashIterator_getValue(&it));
+ BLI_ghashIterator_done(&it) == false;
BLI_ghashIterator_step(&it))
{
- dstmap = BLI_memarena_alloc(arena_dst, sizeof(*dstmap) + srcmap->len);
-
- dstmap->element = srcmap->element;
- dstmap->len = srcmap->len;
- memcpy(BMO_OP_SLOT_MAPPING_DATA(dstmap), BMO_OP_SLOT_MAPPING_DATA(srcmap), srcmap->len);
-
- BLI_ghash_insert(slot_dst->data.ghash, dstmap->element, dstmap);
+ void *key = BLI_ghashIterator_getKey(&it);
+ void *val = BLI_ghashIterator_getValue(&it);
+ BLI_ghash_insert(slot_dst->data.ghash, key, val);
}
}
else {
@@ -605,6 +602,44 @@ void BMO_mesh_flag_disable_all(BMesh *bm, BMOperator *UNUSED(op), const char hty
}
}
+void BMO_mesh_selected_remap(BMesh *bm,
+ BMOpSlot *slot_vert_map,
+ BMOpSlot *slot_edge_map,
+ BMOpSlot *slot_face_map)
+{
+ if (bm->selected.first) {
+ BMEditSelection *ese, *ese_next;
+ BMOpSlot *slot_elem_map;
+
+ for (ese = bm->selected.first; ese; ese = ese_next) {
+ ese_next = ese->next;
+
+ switch (ese->htype) {
+ case BM_VERT: slot_elem_map = slot_vert_map; break;
+ case BM_EDGE: slot_elem_map = slot_edge_map; break;
+ default: slot_elem_map = slot_face_map; break;
+ }
+
+ ese->ele = BMO_slot_map_elem_get(slot_elem_map, ese->ele);
+
+ if (UNLIKELY((ese->ele == NULL) ||
+ (BM_elem_flag_test(ese->ele, BM_ELEM_SELECT) == false)))
+ {
+ BLI_remlink(&bm->selected, ese);
+ MEM_freeN(ese);
+ }
+ }
+ }
+
+ if (bm->act_face) {
+ BMFace *f = BMO_slot_map_elem_get(slot_face_map, bm->act_face);
+ if (f) {
+ bm->act_face = f;
+ }
+ }
+}
+
+
int BMO_slot_buffer_count(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name)
{
BMOpSlot *slot = BMO_slot_get(slot_args, slot_name);
@@ -621,38 +656,21 @@ int BMO_slot_map_count(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_na
{
BMOpSlot *slot = BMO_slot_get(slot_args, slot_name);
BLI_assert(slot->slot_type == BMO_OP_SLOT_MAPPING);
-
- /* check if its actually a buffer */
- if (!(slot->slot_type == BMO_OP_SLOT_MAPPING))
- return 0;
-
- return slot->data.ghash ? BLI_ghash_size(slot->data.ghash) : 0;
+ return BLI_ghash_size(slot->data.ghash);
}
/* inserts a key/value mapping into a mapping slot. note that it copies the
* value, it doesn't store a reference to it. */
void BMO_slot_map_insert(BMOperator *op, BMOpSlot *slot,
- const void *element, const void *data, const int len)
+ const void *element, const void *data)
{
- BMOElemMapping *mapping;
+ (void) op; /* Ignored in release builds. */
+
BLI_assert(slot->slot_type == BMO_OP_SLOT_MAPPING);
BMO_ASSERT_SLOT_IN_OP(slot, op);
- mapping = (BMOElemMapping *) BLI_memarena_alloc(op->arena, sizeof(*mapping) + len);
-
- mapping->element = (BMHeader *) element;
- mapping->len = len;
- memcpy(BMO_OP_SLOT_MAPPING_DATA(mapping), data, len);
-
- if (!slot->data.ghash) {
- slot->data.ghash = BLI_ghash_ptr_new("bmesh slot map hash");
- }
- else {
- BLI_assert(slot->data.ghash);
- }
-
- BLI_ghash_insert(slot->data.ghash, (void *)element, mapping);
+ BLI_ghash_insert(slot->data.ghash, (void *)element, (void *)data);
}
#if 0
@@ -707,11 +725,11 @@ void BMO_slot_map_to_flag(BMesh *bm, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const
BLI_assert(slot->slot_type == BMO_OP_SLOT_MAPPING);
- /* sanity check */
- if (!slot->data.ghash) return;
- BLI_ghashIterator_init(&it, slot->data.ghash);
- for ( ; (ele_f = BLI_ghashIterator_getKey(&it)); BLI_ghashIterator_step(&it)) {
+ for (BLI_ghashIterator_init(&it, slot->data.ghash);
+ (ele_f = BLI_ghashIterator_getKey(&it));
+ BLI_ghashIterator_step(&it))
+ {
if (ele_f->head.htype & htype) {
BMO_elem_flag_enable(bm, ele_f, oflag);
}
@@ -1360,12 +1378,7 @@ void *BMO_iter_new(BMOIter *iter,
iter->restrictmask = restrictmask;
if (iter->slot->slot_type == BMO_OP_SLOT_MAPPING) {
- if (iter->slot->data.ghash) {
- BLI_ghashIterator_init(&iter->giter, slot->data.ghash);
- }
- else {
- return NULL;
- }
+ BLI_ghashIterator_init(&iter->giter, slot->data.ghash);
}
else if (iter->slot->slot_type == BMO_OP_SLOT_ELEMENT_BUF) {
BLI_assert(restrictmask & slot->slot_subtype.elem);
@@ -1402,11 +1415,8 @@ void *BMO_iter_step(BMOIter *iter)
return ele;
}
else if (slot->slot_type == BMO_OP_SLOT_MAPPING) {
- BMOElemMapping *map;
void *ret = BLI_ghashIterator_getKey(&iter->giter);
- map = BLI_ghashIterator_getValue(&iter->giter);
-
- iter->val = BMO_OP_SLOT_MAPPING_DATA(map);
+ iter->val = BLI_ghashIterator_getValue_p(&iter->giter);
BLI_ghashIterator_step(&iter->giter);
@@ -1420,19 +1430,40 @@ void *BMO_iter_step(BMOIter *iter)
}
/* used for iterating over mappings */
-void *BMO_iter_map_value(BMOIter *iter)
+
+/**
+ * Returns a pointer to the key-value when iterating over mappings.
+ * remember for pointer maps this will be a pointer to a pointer.
+ */
+void **BMO_iter_map_value_p(BMOIter *iter)
{
return iter->val;
}
-void *BMO_iter_map_value_p(BMOIter *iter)
+void *BMO_iter_map_value_ptr(BMOIter *iter)
+{
+ BLI_assert(ELEM(iter->slot->slot_subtype.map,
+ BMO_OP_SLOT_SUBTYPE_MAP_ELEM, BMO_OP_SLOT_SUBTYPE_MAP_INTERNAL));
+ return iter->val ? *iter->val : NULL;
+}
+
+
+float BMO_iter_map_value_float(BMOIter *iter)
{
- return *((void **)iter->val);
+ BLI_assert(iter->slot->slot_subtype.map == BMO_OP_SLOT_SUBTYPE_MAP_FLT);
+ return **((float **)iter->val);
}
-float BMO_iter_map_value_f(BMOIter *iter)
+int BMO_iter_map_value_int(BMOIter *iter)
{
- return *((float *)iter->val);
+ BLI_assert(iter->slot->slot_subtype.map == BMO_OP_SLOT_SUBTYPE_MAP_INT);
+ return **((int **)iter->val);
+}
+
+bool BMO_iter_map_value_bool(BMOIter *iter)
+{
+ BLI_assert(iter->slot->slot_subtype.map == BMO_OP_SLOT_SUBTYPE_MAP_BOOL);
+ return **((int **)iter->val);
}
/* error system */
@@ -1608,9 +1639,9 @@ bool BMO_op_vinitf(BMesh *bm, BMOperator *op, const int flag, const char *_fmt,
// BMOpDefine *def;
char *opname, *ofmt, *fmt;
char slot_name[64] = {0};
- int i /*, n = strlen(fmt) */, stop /*, slot_code = -1 */, type, state;
+ int i, type;
+ bool noslot, state;
char htype;
- int noslot = 0;
/* basic useful info to help find where bmop formatting strings fail */
@@ -1631,7 +1662,7 @@ bool BMO_op_vinitf(BMesh *bm, BMOperator *op, const int flag, const char *_fmt,
i = strcspn(fmt, " ");
opname = fmt;
- if (!opname[i]) noslot = 1;
+ noslot = (opname[i] == '\0');
opname[i] = '\0';
fmt += i + (noslot ? 0 : 1);
@@ -1648,7 +1679,7 @@ bool BMO_op_vinitf(BMesh *bm, BMOperator *op, const int flag, const char *_fmt,
// def = bmo_opdefines[i];
i = 0;
- state = 1; /* 0: not inside slot_code name, 1: inside slot_code name */
+ state = true; /* false: not inside slot_code name, true: inside slot_code name */
while (*fmt) {
if (state) {
@@ -1674,7 +1705,7 @@ bool BMO_op_vinitf(BMesh *bm, BMOperator *op, const int flag, const char *_fmt,
BLI_strncpy(slot_name, fmt, sizeof(slot_name));
- state = 0;
+ state = false;
fmt += i;
}
else {
@@ -1695,13 +1726,13 @@ bool BMO_op_vinitf(BMesh *bm, BMOperator *op, const int flag, const char *_fmt,
else GOTO_ERROR("matrix size was not 3 or 4");
BMO_slot_mat_set(op, op->slots_in, slot_name, va_arg(vlist, void *), size);
- state = 1;
+ state = true;
break;
}
case 'v':
{
BMO_slot_vec_set(op->slots_in, slot_name, va_arg(vlist, float *));
- state = 1;
+ state = true;
break;
}
case 'e': /* single vert/edge/face */
@@ -1711,7 +1742,7 @@ bool BMO_op_vinitf(BMesh *bm, BMOperator *op, const int flag, const char *_fmt,
BMO_slot_buffer_from_single(op, slot, ele);
- state = 1;
+ state = true;
break;
}
case 's':
@@ -1730,20 +1761,20 @@ bool BMO_op_vinitf(BMesh *bm, BMOperator *op, const int flag, const char *_fmt,
BMO_slot_copy(op_other, slots_out, slot_name_other,
op, slots_in, slot_name);
}
- state = 1;
+ state = true;
break;
}
case 'i':
BMO_slot_int_set(op->slots_in, slot_name, va_arg(vlist, int));
- state = 1;
+ state = true;
break;
case 'b':
BMO_slot_bool_set(op->slots_in, slot_name, va_arg(vlist, int));
- state = 1;
+ state = true;
break;
case 'p':
BMO_slot_ptr_set(op->slots_in, slot_name, va_arg(vlist, void *));
- state = 1;
+ state = true;
break;
case 'f':
case 'F':
@@ -1756,15 +1787,16 @@ bool BMO_op_vinitf(BMesh *bm, BMOperator *op, const int flag, const char *_fmt,
BMO_slot_float_set(op->slots_in, slot_name, va_arg(vlist, double));
}
else {
+ bool stop = false;
+
htype = 0;
- stop = 0;
while (1) {
switch (NEXT_CHAR(fmt)) {
case 'f': htype |= BM_FACE; break;
case 'e': htype |= BM_EDGE; break;
case 'v': htype |= BM_VERT; break;
default:
- stop = 1;
+ stop = true;
break;
}
if (stop) {
@@ -1791,11 +1823,11 @@ bool BMO_op_vinitf(BMesh *bm, BMOperator *op, const int flag, const char *_fmt,
}
}
- state = 1;
+ state = true;
break;
default:
fprintf(stderr,
- "%s: unrecognized bmop format char: %c, %d in '%s'\n",
+ "%s: unrecognized bmop format char: '%c', %d in '%s'\n",
__func__, *fmt, (int)(fmt - ofmt), ofmt);
break;
}
diff --git a/source/blender/bmesh/intern/bmesh_operators_private.h b/source/blender/bmesh/intern/bmesh_operators_private.h
index 33c10411c0f..07d0ceb3aa3 100644
--- a/source/blender/bmesh/intern/bmesh_operators_private.h
+++ b/source/blender/bmesh/intern/bmesh_operators_private.h
@@ -35,6 +35,7 @@ void bmo_average_vert_facedata_exec(BMesh *bm, BMOperator *op);
void bmo_beautify_fill_exec(BMesh *bm, BMOperator *op);
void bmo_bevel_exec(BMesh *bm, BMOperator *op);
void bmo_bisect_edges_exec(BMesh *bm, BMOperator *op);
+void bmo_bisect_plane_exec(BMesh *bm, BMOperator *op);
void bmo_bmesh_to_mesh_exec(BMesh *bm, BMOperator *op);
void bmo_bridge_loops_exec(BMesh *bm, BMOperator *op);
void bmo_collapse_exec(BMesh *bm, BMOperator *op);
@@ -59,6 +60,7 @@ void bmo_dissolve_limit_exec(BMesh *bm, BMOperator *op);
void bmo_dissolve_verts_exec(BMesh *bm, BMOperator *op);
void bmo_duplicate_exec(BMesh *bm, BMOperator *op);
void bmo_edgeloop_fill_exec(BMesh *bm, BMOperator *op);
+void bmo_face_attribute_fill_exec(BMesh *bm, BMOperator *op);
void bmo_holes_fill_exec(BMesh *bm, BMOperator *op);
void bmo_edgenet_fill_exec(BMesh *bm, BMOperator *op);
void bmo_edgenet_prepare_exec(BMesh *bm, BMOperator *op);
diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c
index 43b261c118d..12ec3da9b69 100644
--- a/source/blender/bmesh/intern/bmesh_polygon.c
+++ b/source/blender/bmesh/intern/bmesh_polygon.c
@@ -30,14 +30,14 @@
#include "DNA_listBase.h"
-#include "MEM_guardedalloc.h"
-
#include "BLI_alloca.h"
#include "BLI_math.h"
+#include "BLI_memarena.h"
#include "BLI_scanfill.h"
#include "BLI_listbase.h"
#include "bmesh.h"
+#include "bmesh_tools.h"
#include "intern/bmesh_private.h"
@@ -801,254 +801,223 @@ bool BM_face_point_inside_test(BMFace *f, const float co[3])
return crosses % 2 != 0;
}
-static bool bm_face_goodline(float const (*projectverts)[2], BMFace *f, int v1i, int v2i, int v3i)
-{
- BMLoop *l_iter;
- BMLoop *l_first;
-
- float pv1[2];
- const float *v1 = projectverts[v1i];
- const float *v2 = projectverts[v2i];
- const float *v3 = projectverts[v3i];
- int i;
-
- /* v3 must be on the left side of [v1, v2] line, else we know [v1, v3] is outside of f! */
- if (testedgesidef(v1, v2, v3)) {
- return false;
- }
-
- l_iter = l_first = BM_FACE_FIRST_LOOP(f);
- do {
- i = BM_elem_index_get(l_iter->v);
- copy_v2_v2(pv1, projectverts[i]);
-
- if (ELEM3(i, v1i, v2i, v3i)) {
-#if 0
- printf("%d in (%d, %d, %d) tri (from indices!), continuing\n", i, v1i, v2i, v3i);
-#endif
- continue;
- }
-
- if (isect_point_tri_v2(pv1, v1, v2, v3) || isect_point_tri_v2(pv1, v3, v2, v1)) {
-#if 0
- if (isect_point_tri_v2(pv1, v1, v2, v3))
- printf("%d in (%d, %d, %d)\n", v3i, i, v1i, v2i);
- else
- printf("%d in (%d, %d, %d)\n", v1i, i, v3i, v2i);
-#endif
- return false;
- }
- } while ((l_iter = l_iter->next) != l_first);
- return true;
-}
-
/**
- * \brief Find Ear
+ * \brief BMESH TRIANGULATE FACE
*
- * Used by tessellator to find the next triangle to 'clip off' of a polygon while tessellating.
+ * Breaks all quads and ngons down to triangles.
+ * It uses scanfill for the ngons splitting, and
+ * the beautify operator when use_beauty is true.
+ *
+ * \param r_faces_new if non-null, must be an array of BMFace pointers,
+ * with a length equal to (f->len - 3). It will be filled with the new
+ * triangles (not including the original triangle).
*
- * \param f The face to search.
- * \param projectverts an array of face vert coords.
- * \param use_beauty Currently only applies to quads, can be extended later on.
- * \param abscoss Must be allocated by caller, and at least f->len length
- * (allow to avoid allocating a new one for each tri!).
+ * \note use_tag tags new flags and edges.
*/
-static BMLoop *poly_find_ear(BMFace *f, float (*projectverts)[2], const bool use_beauty, float *abscoss)
+void BM_face_triangulate(BMesh *bm, BMFace *f,
+ BMFace **r_faces_new,
+ MemArena *sf_arena,
+ const bool use_beauty, const bool use_tag)
{
- BMLoop *bestear = NULL;
+ BMLoop *l_iter, *l_first, *l_new;
+ BMFace *f_new;
+ int orig_f_len = f->len;
+ int nf_i = 0;
+ BMEdge **edge_array;
+ int edge_array_len;
- BMLoop *l_iter;
- BMLoop *l_first;
+#define SF_EDGE_IS_BOUNDARY 0xff
- const float cos_threshold = 0.9f;
- const float bias = 1.0f + 1e-6f;
+ BLI_assert(BM_face_is_normal_valid(f));
- BLI_assert(len_squared_v3(f->no) > FLT_EPSILON);
if (f->len == 4) {
- BMLoop *larr[4];
- int i = 0, i4;
- float cos1, cos2;
- l_iter = l_first = BM_FACE_FIRST_LOOP(f);
- do {
- larr[i] = l_iter;
- i++;
- } while ((l_iter = l_iter->next) != l_first);
+ l_first = BM_FACE_FIRST_LOOP(f);
- /* pick 0/1 based on best lenth */
- /* XXX Can't only rely on such test, also must check we do not get (too much) degenerated triangles!!! */
- i = (((len_squared_v3v3(larr[0]->v->co, larr[2]->v->co) >
- len_squared_v3v3(larr[1]->v->co, larr[3]->v->co) * bias)) != use_beauty);
- i4 = (i + 3) % 4;
- /* Check produced tris aren't too flat/narrow...
- * Probably not the best test, but is quite efficient and should at least avoid null-area faces! */
- cos1 = fabsf(cos_v3v3v3(larr[i4]->v->co, larr[i]->v->co, larr[i + 1]->v->co));
- cos2 = fabsf(cos_v3v3v3(larr[i4]->v->co, larr[i + 2]->v->co, larr[i + 1]->v->co));
-#if 0
- printf("%d, (%f, %f), (%f, %f)\n", i, cos1, cos2,
- fabsf(cos_v3v3v3(larr[i]->v->co, larr[i4]->v->co, larr[i + 2]->v->co)),
- fabsf(cos_v3v3v3(larr[i]->v->co, larr[i + 1]->v->co, larr[i + 2]->v->co)));
-#endif
- if (cos1 < cos2)
- cos1 = cos2;
- if (cos1 > cos_threshold) {
- if (cos1 > fabsf(cos_v3v3v3(larr[i]->v->co, larr[i4]->v->co, larr[i + 2]->v->co)) &&
- cos1 > fabsf(cos_v3v3v3(larr[i]->v->co, larr[i + 1]->v->co, larr[i + 2]->v->co)))
- {
- i = !i;
- }
- }
- /* Last check we do not get overlapping triangles
- * (as much as possible, there are some cases with no good solution!) */
- i4 = (i + 3) % 4;
- if (!bm_face_goodline((float const (*)[2])projectverts, f, BM_elem_index_get(larr[i4]->v),
- BM_elem_index_get(larr[i]->v), BM_elem_index_get(larr[i + 1]->v)))
- {
- i = !i;
+ f_new = BM_face_split(bm, f, l_first->v, l_first->next->next->v, &l_new, NULL, false);
+ copy_v3_v3(f_new->no, f->no);
+
+ if (use_tag) {
+ BM_elem_flag_enable(l_new->e, BM_ELEM_TAG);
+ BM_elem_flag_enable(f_new, BM_ELEM_TAG);
}
-/* printf("%d\n", i);*/
- bestear = larr[i];
+ if (r_faces_new) {
+ r_faces_new[nf_i++] = f_new;
+ }
}
- else {
- /* float angle, bestangle = 180.0f; */
- float cos, bestcos = 1.0f;
- int i, j, len;
+ else if (f->len > 4) {
+ /* scanfill */
+ ScanFillContext sf_ctx;
+ ScanFillVert *sf_vert, *sf_vert_prev = NULL;
+ ScanFillEdge *sf_edge;
+ ScanFillFace *sf_tri;
+ int totfilltri;
- /* Compute cos of all corners! */
- i = 0;
+ /* populate scanfill */
+ BLI_scanfill_begin_arena(&sf_ctx, sf_arena);
l_iter = l_first = BM_FACE_FIRST_LOOP(f);
- len = l_iter->f->len;
+
+ /* step once before entering the loop */
+ sf_vert = BLI_scanfill_vert_add(&sf_ctx, l_iter->v->co);
+ sf_vert->tmp.p = l_iter;
+ sf_vert_prev = sf_vert;
+ l_iter = l_iter->next;
+
do {
- const BMVert *v1 = l_iter->prev->v;
- const BMVert *v2 = l_iter->v;
- const BMVert *v3 = l_iter->next->v;
+ sf_vert = BLI_scanfill_vert_add(&sf_ctx, l_iter->v->co);
+ sf_edge = BLI_scanfill_edge_add(&sf_ctx, sf_vert_prev, sf_vert);
+ sf_edge->tmp.c = SF_EDGE_IS_BOUNDARY;
- abscoss[i] = fabsf(cos_v3v3v3(v1->co, v2->co, v3->co));
-/* printf("tcoss: %f\n", *tcoss);*/
- i++;
+ sf_vert->tmp.p = l_iter;
+ sf_vert_prev = sf_vert;
} while ((l_iter = l_iter->next) != l_first);
- i = 0;
- l_iter = l_first;
- do {
- const BMVert *v1 = l_iter->prev->v;
- const BMVert *v2 = l_iter->v;
- const BMVert *v3 = l_iter->next->v;
-
- if (bm_face_goodline((float const (*)[2])projectverts, f,
- BM_elem_index_get(v1), BM_elem_index_get(v2), BM_elem_index_get(v3)))
- {
- /* Compute highest cos (i.e. narrowest angle) of this tri. */
- cos = max_fff(abscoss[i],
- fabsf(cos_v3v3v3(v2->co, v3->co, v1->co)),
- fabsf(cos_v3v3v3(v3->co, v1->co, v2->co)));
-
- /* Compare to prev best (i.e. lowest) cos. */
- if (cos < bestcos) {
- /* We must check this tri would not leave a (too much) degenerated remaining face! */
- /* For now just assume if the average of cos of all
- * "remaining face"'s corners is below a given threshold, it's OK. */
- float avgcos = fabsf(cos_v3v3v3(v1->co, v3->co, l_iter->next->next->v->co));
- const int i_limit = (i - 1 + len) % len;
- avgcos += fabsf(cos_v3v3v3(l_iter->prev->prev->v->co, v1->co, v3->co));
- j = (i + 2) % len;
- do {
- avgcos += abscoss[j];
- } while ((j = (j + 1) % len) != i_limit);
- avgcos /= len - 1;
-
- /* We need a best ear in any case... */
- if (avgcos < cos_threshold || (!bestear && avgcos < 1.0f)) {
- /* OKI, keep this ear (corner...) as a potential best one! */
- bestear = l_iter;
- bestcos = cos;
+ sf_edge = BLI_scanfill_edge_add(&sf_ctx, sf_vert_prev, sf_ctx.fillvertbase.first);
+ sf_edge->tmp.c = SF_EDGE_IS_BOUNDARY;
+
+ /* calculate filled triangles */
+ totfilltri = BLI_scanfill_calc_ex(&sf_ctx, 0, f->no);
+ BLI_assert(totfilltri <= f->len - 2);
+
+
+ /* loop over calculated triangles and create new geometry */
+ for (sf_tri = sf_ctx.fillfacebase.first; sf_tri; sf_tri = sf_tri->next) {
+ /* the order is reverse, otherwise the normal is flipped */
+ BMLoop *l_tri[3] = {
+ sf_tri->v3->tmp.p,
+ sf_tri->v2->tmp.p,
+ sf_tri->v1->tmp.p};
+
+ BMVert *v_tri[3] = {
+ l_tri[0]->v,
+ l_tri[1]->v,
+ l_tri[2]->v};
+
+ f_new = BM_face_create_verts(bm, v_tri, 3, f, false, true);
+ l_new = BM_FACE_FIRST_LOOP(f_new);
+
+ BLI_assert(v_tri[0] == l_new->v);
+
+ /* copy CD data */
+ BM_elem_attrs_copy(bm, bm, l_tri[0], l_new);
+ BM_elem_attrs_copy(bm, bm, l_tri[1], l_new->next);
+ BM_elem_attrs_copy(bm, bm, l_tri[2], l_new->prev);
+
+ /* add all but the last face which is swapped and removed (below) */
+ if (sf_tri->next) {
+ if (use_tag) {
+ BM_elem_flag_enable(f_new, BM_ELEM_TAG);
+ }
+ if (r_faces_new) {
+ r_faces_new[nf_i++] = f_new;
+ }
+ }
+ }
+
+ if (use_beauty || use_tag) {
+ ScanFillEdge *sf_edge;
+ edge_array = BLI_array_alloca(edge_array, orig_f_len - 3);
+ edge_array_len = 0;
+
+ for (sf_edge = sf_ctx.filledgebase.first; sf_edge; sf_edge = sf_edge->next) {
+ BMLoop *l1 = sf_edge->v1->tmp.p;
+ BMLoop *l2 = sf_edge->v2->tmp.p;
+
+ BMEdge *e = BM_edge_exists(l1->v, l2->v);
+ if (sf_edge->tmp.c != SF_EDGE_IS_BOUNDARY) {
+
+ if (use_beauty) {
+ BM_elem_index_set(e, edge_array_len); /* set_dirty */
+ edge_array[edge_array_len] = e;
+ edge_array_len++;
+ }
+
+ if (use_tag) {
+ BM_elem_flag_enable(e, BM_ELEM_TAG);
}
-#if 0
- else
- printf("Had a nice tri (higest cos of %f, current bestcos is %f), "
- "but average cos of all \"remaining face\"'s corners is too high (%f)!\n",
- cos, bestcos, avgcos);
-#endif
+ }
+ else if (use_tag) {
+ BM_elem_flag_disable(e, BM_ELEM_TAG);
}
}
- i++;
- } while ((l_iter = l_iter->next) != l_first);
- }
- return bestear;
-}
+ }
-/**
- * \brief BMESH TRIANGULATE FACE
- *
- * Currently repeatedly find the best triangle (i.e. the most "open" one), provided it does not
- * produces a "remaining" face with too much wide/narrow angles
- * (using cos (i.e. dot product of normalized vectors) of angles).
- *
- * \param r_faces_new if non-null, must be an array of BMFace pointers,
- * with a length equal to (f->len - 2). It will be filled with the new
- * triangles.
- *
- * \note use_tag tags new flags and edges.
- */
-void BM_face_triangulate(BMesh *bm, BMFace *f,
- BMFace **r_faces_new,
- const bool use_beauty, const bool use_tag)
-{
- const float f_len_orig = f->len;
- int i, nf_i = 0;
- BMLoop *l_new;
- BMLoop *l_iter;
- BMLoop *l_first;
- /* BM_face_triangulate: temp absolute cosines of face corners */
- float (*projectverts)[2] = BLI_array_alloca(projectverts, f_len_orig);
- float *abscoss = BLI_array_alloca(abscoss, f_len_orig);
- float mat[3][3];
+ if ((!use_beauty) || (!r_faces_new)) {
+ /* we can't delete the real face, because some of the callers expect it to remain valid.
+ * so swap data and delete the last created tri */
+ bmesh_face_swap_data(bm, f, f_new);
+ BM_face_kill(bm, f_new);
+ }
- BLI_assert(BM_face_is_normal_valid(f));
+ if (use_beauty) {
+ bm->elem_index_dirty |= BM_EDGE;
+ BM_mesh_beautify_fill(bm, edge_array, edge_array_len, 0, 0, 0, 0);
- axis_dominant_v3_to_m3(mat, f->no);
+ if (r_faces_new) {
+ /* beautify deletes and creates new faces
+ * we need to re-populate the r_faces_new array
+ * with the new faces
+ */
+ int i;
- /* copy vertex coordinates to vertspace area */
- i = 0;
- l_iter = l_first = BM_FACE_FIRST_LOOP(f);
- do {
- mul_v2_m3v3(projectverts[i], mat, l_iter->v->co);
- BM_elem_index_set(l_iter->v, i++); /* set dirty! */
- } while ((l_iter = l_iter->next) != l_first);
- bm->elem_index_dirty |= BM_VERT; /* see above */
+#define FACE_USED_TEST(f) (BM_elem_index_get(f) == -2)
+#define FACE_USED_SET(f) BM_elem_index_set(f, -2)
- while (f->len > 3) {
- l_iter = poly_find_ear(f, projectverts, use_beauty, abscoss);
+ nf_i = 0;
+ for (i = 0; i < edge_array_len; i++) {
+ BMFace *f_a, *f_b;
+ BMEdge *e = edge_array[i];
+ const bool ok = BM_edge_face_pair(e, &f_a, &f_b);
- /* force triangulation - if we can't find an ear the face is degenerate */
- if (l_iter == NULL) {
- l_iter = BM_FACE_FIRST_LOOP(f);
- }
+ BLI_assert(ok);
-/* printf("Subdividing face...\n");*/
- f = BM_face_split(bm, l_iter->f, l_iter->prev->v, l_iter->next->v, &l_new, NULL, true);
+ if (FACE_USED_TEST(f_a) == false) {
+ FACE_USED_SET(f_a);
- if (UNLIKELY(!f)) {
- fprintf(stderr, "%s: triangulator failed to split face! (bmesh internal error)\n", __func__);
- break;
- }
+ if (nf_i < edge_array_len) {
+ r_faces_new[nf_i++] = f_a;
+ }
+ else {
+ f_new = f_a;
+ break;
+ }
+ }
- copy_v3_v3(f->no, l_iter->f->no);
+ if (FACE_USED_TEST(f_b) == false) {
+ FACE_USED_SET(f_b);
- if (use_tag) {
- BM_elem_flag_enable(l_new->e, BM_ELEM_TAG);
- BM_elem_flag_enable(f, BM_ELEM_TAG);
- }
+ if (nf_i < edge_array_len) {
+ r_faces_new[nf_i++] = f_b;
+ }
+ else {
+ f_new = f_b;
+ break;
+ }
+ }
+ }
- if (r_faces_new) {
- r_faces_new[nf_i++] = f;
+#undef FACE_USED_TEST
+#undef FACE_USED_SET
+
+ /* nf_i doesn't include the last face */
+ BLI_assert(nf_i == orig_f_len - 3);
+
+ /* we can't delete the real face, because some of the callers expect it to remain valid.
+ * so swap data and delete the last created tri */
+ bmesh_face_swap_data(bm, f, f_new);
+ BM_face_kill(bm, f_new);
+ }
}
+
+ /* garbage collection */
+ BLI_scanfill_end_arena(&sf_ctx, sf_arena);
}
- BLI_assert(f->len == 3);
+#undef SF_EDGE_IS_BOUNDARY
+
}
/**
@@ -1203,3 +1172,37 @@ void BM_face_as_array_vert_quad(BMFace *f, BMVert *r_verts[4])
r_verts[2] = l->v; l = l->next;
r_verts[3] = l->v;
}
+
+
+/**
+ * Small utility functions for fast access
+ *
+ * faster alternative to:
+ * BM_iter_as_array(bm, BM_LOOPS_OF_FACE, f, (void **)l, 3);
+ */
+void BM_face_as_array_loop_tri(BMFace *f, BMLoop *r_loops[3])
+{
+ BMLoop *l = BM_FACE_FIRST_LOOP(f);
+
+ BLI_assert(f->len == 3);
+
+ r_loops[0] = l; l = l->next;
+ r_loops[1] = l; l = l->next;
+ r_loops[2] = l;
+}
+
+/**
+ * faster alternative to:
+ * BM_iter_as_array(bm, BM_LOOPS_OF_FACE, f, (void **)l, 4);
+ */
+void BM_face_as_array_loop_quad(BMFace *f, BMLoop *r_loops[4])
+{
+ BMLoop *l = BM_FACE_FIRST_LOOP(f);
+
+ BLI_assert(f->len == 4);
+
+ r_loops[0] = l; l = l->next;
+ r_loops[1] = l; l = l->next;
+ r_loops[2] = l; l = l->next;
+ r_loops[3] = l;
+}
diff --git a/source/blender/bmesh/intern/bmesh_polygon.h b/source/blender/bmesh/intern/bmesh_polygon.h
index e5dc5c081c3..b7117621273 100644
--- a/source/blender/bmesh/intern/bmesh_polygon.h
+++ b/source/blender/bmesh/intern/bmesh_polygon.h
@@ -27,40 +27,41 @@
* \ingroup bmesh
*/
-int BM_face_calc_tessellation(const BMFace *f, BMLoop **r_loops, int (*r_index)[3])
-#ifdef __GNUC__
- __attribute__((warn_unused_result))
- __attribute__((nonnull))
-#endif
-;
-void BM_face_calc_normal(const BMFace *f, float r_no[3]);
+#include "BLI_compiler_attrs.h"
+
+int BM_face_calc_tessellation(const BMFace *f, BMLoop **r_loops, int (*r_index)[3]) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+void BM_face_calc_normal(const BMFace *f, float r_no[3]) ATTR_NONNULL();
void BM_face_calc_normal_vcos(BMesh *bm, BMFace *f, float r_no[3],
- float const (*vertexCos)[3]);
-float BM_face_calc_area(BMFace *f);
-float BM_face_calc_perimeter(BMFace *f);
-void BM_face_calc_plane(BMFace *f, float r_plane[3]);
-void BM_face_calc_center_bounds(BMFace *f, float center[3]);
-void BM_face_calc_center_mean(BMFace *f, float center[3]);
+ float const (*vertexCos)[3]) ATTR_NONNULL();
+float BM_face_calc_area(BMFace *f) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+float BM_face_calc_perimeter(BMFace *f) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+void BM_face_calc_plane(BMFace *f, float r_plane[3]) ATTR_NONNULL();
+void BM_face_calc_center_bounds(BMFace *f, float center[3]) ATTR_NONNULL();
+void BM_face_calc_center_mean(BMFace *f, float center[3]) ATTR_NONNULL();
void BM_face_calc_center_mean_vcos(BMesh *bm, BMFace *f, float r_cent[3],
- float const (*vertexCos)[3]);
-void BM_face_calc_center_mean_weighted(BMFace *f, float center[3]);
+ float const (*vertexCos)[3]) ATTR_NONNULL();
+void BM_face_calc_center_mean_weighted(BMFace *f, float center[3]) ATTR_NONNULL();
-void BM_face_normal_update(BMFace *f);
+void BM_face_normal_update(BMFace *f) ATTR_NONNULL();
-void BM_edge_normals_update(BMEdge *e);
+void BM_edge_normals_update(BMEdge *e) ATTR_NONNULL();
-void BM_vert_normal_update(BMVert *v);
-void BM_vert_normal_update_all(BMVert *v);
+void BM_vert_normal_update(BMVert *v) ATTR_NONNULL();
+void BM_vert_normal_update_all(BMVert *v) ATTR_NONNULL();
-void BM_face_normal_flip(BMesh *bm, BMFace *f);
-bool BM_face_point_inside_test(BMFace *f, const float co[3]);
+void BM_face_normal_flip(BMesh *bm, BMFace *f) ATTR_NONNULL();
+bool BM_face_point_inside_test(BMFace *f, const float co[3]) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
void BM_face_triangulate(BMesh *bm, BMFace *f, BMFace **newfaces,
- const bool use_beauty, const bool use_tag);
+ struct MemArena *sf_arena,
+ const bool use_beauty, const bool use_tag) ATTR_NONNULL(1, 2);
+
+void BM_face_legal_splits(BMFace *f, BMLoop *(*loops)[2], int len) ATTR_NONNULL();
-void BM_face_legal_splits(BMFace *f, BMLoop *(*loops)[2], int len);
+void BM_face_as_array_vert_tri(BMFace *f, BMVert *r_verts[3]) ATTR_NONNULL();
+void BM_face_as_array_vert_quad(BMFace *f, BMVert *r_verts[4]) ATTR_NONNULL();
-void BM_face_as_array_vert_tri(BMFace *f, BMVert *r_verts[3]);
-void BM_face_as_array_vert_quad(BMFace *f, BMVert *r_verts[4]);
+void BM_face_as_array_loop_tri(BMFace *f, BMLoop *r_loops[3]) ATTR_NONNULL();
+void BM_face_as_array_loop_quad(BMFace *f, BMLoop *r_loops[4]) ATTR_NONNULL();
#endif /* __BMESH_POLYGON_H__ */
diff --git a/source/blender/bmesh/intern/bmesh_queries.c b/source/blender/bmesh/intern/bmesh_queries.c
index 6eab3c625fa..9b4f34d18f2 100644
--- a/source/blender/bmesh/intern/bmesh_queries.c
+++ b/source/blender/bmesh/intern/bmesh_queries.c
@@ -35,6 +35,7 @@
#include "BLI_math.h"
#include "BLI_alloca.h"
+#include "BLI_linklist.h"
#include "bmesh.h"
#include "intern/bmesh_private.h"
@@ -991,6 +992,25 @@ BMVert *BM_edge_share_vert(BMEdge *e1, BMEdge *e2)
}
/**
+ * \brief Return the Loop Shared by Edge and Vert
+ *
+ * Finds the loop used which uses \a in face loop \a l
+ *
+ * \note this function takes a loop rather then an edge
+ * so we can select the face that the loop should be from.
+ */
+BMLoop *BM_edge_vert_share_loop(BMLoop *l, BMVert *v)
+{
+ BLI_assert(BM_vert_in_edge(l->e, v));
+ if (l->v == v) {
+ return l;
+ }
+ else {
+ return l->next;
+ }
+}
+
+/**
* \brief Return the Loop Shared by Face and Vertex
*
* Finds the loop used which uses \a v in face loop \a l
@@ -1453,8 +1473,7 @@ BMEdge *BM_edge_find_double(BMEdge *e)
* there is a face with exactly those vertices
* (and only those vertices).
*
- * \note there used to be a BM_face_exists_overlap function that checked for partial overlap,
- * however this is no longer used, simple to add back.
+ * \note there used to be a BM_face_exists_overlap function that checks for partial overlap.
*/
bool BM_face_exists(BMVert **varr, int len, BMFace **r_existface)
{
@@ -1684,6 +1703,140 @@ bool BM_face_exists_multi_edge(BMEdge **earr, int len)
return ok;
}
+
+/**
+ * Given a set of vertices (varr), find out if
+ * all those vertices overlap an existing face.
+ *
+ * \note The face may contain other verts \b not in \a varr.
+ *
+ * \note Its possible there are more then one overlapping faces,
+ * in this case the first one found will be assigned to \a r_f_overlap.
+ *
+ * \param varr Array of unordered verts.
+ * \param len \a varr array length.
+ * \param r_f_overlap The overlapping face to return.
+ * \return Success
+ */
+
+bool BM_face_exists_overlap(BMVert **varr, const int len, BMFace **r_f_overlap)
+{
+ BMIter viter;
+ BMFace *f;
+ int i;
+ bool is_overlap = false;
+ LinkNode *f_lnk = NULL;
+
+ if (r_f_overlap) {
+ *r_f_overlap = NULL;
+ }
+
+#ifdef DEBUG
+ /* check flag isn't already set */
+ for (i = 0; i < len; i++) {
+ BM_ITER_ELEM (f, &viter, varr[i], BM_FACES_OF_VERT) {
+ BLI_assert(BM_ELEM_API_FLAG_TEST(f, _FLAG_OVERLAP) == 0);
+ }
+ }
+#endif
+
+ for (i = 0; i < len; i++) {
+ BM_ITER_ELEM (f, &viter, varr[i], BM_FACES_OF_VERT) {
+ if (BM_ELEM_API_FLAG_TEST(f, _FLAG_OVERLAP) == 0) {
+ if (len <= BM_verts_in_face_count(f, varr, len)) {
+ if (r_f_overlap)
+ *r_f_overlap = f;
+
+ is_overlap = true;
+ break;
+ }
+
+ BM_ELEM_API_FLAG_ENABLE(f, _FLAG_OVERLAP);
+ BLI_linklist_prepend_alloca(&f_lnk, f);
+ }
+ }
+ }
+
+ for (; f_lnk; f_lnk = f_lnk->next) {
+ BM_ELEM_API_FLAG_DISABLE((BMFace *)f_lnk->link, _FLAG_OVERLAP);
+ }
+
+ return is_overlap;
+}
+
+/**
+ * Given a set of vertices (varr), find out if
+ * there is a face that uses vertices only from this list
+ * (that the face is a subset or made from the vertices given).
+ *
+ * \param varr Array of unordered verts.
+ * \param len varr array length.
+ */
+bool BM_face_exists_overlap_subset(BMVert **varr, const int len)
+{
+ BMIter viter;
+ BMFace *f;
+ int i;
+ bool is_init = false;
+ bool is_overlap = false;
+ LinkNode *f_lnk = NULL;
+
+#ifdef DEBUG
+ /* check flag isn't already set */
+ for (i = 0; i < len; i++) {
+ BLI_assert(BM_ELEM_API_FLAG_TEST(varr[i], _FLAG_OVERLAP) == 0);
+ BM_ITER_ELEM (f, &viter, varr[i], BM_FACES_OF_VERT) {
+ BLI_assert(BM_ELEM_API_FLAG_TEST(f, _FLAG_OVERLAP) == 0);
+ }
+ }
+#endif
+
+ for (i = 0; i < len; i++) {
+ BM_ITER_ELEM (f, &viter, varr[i], BM_FACES_OF_VERT) {
+ if ((f->len <= len) && (BM_ELEM_API_FLAG_TEST(f, _FLAG_OVERLAP) == 0)) {
+ /* check if all vers in this face are flagged*/
+ BMLoop *l_iter, *l_first;
+
+ if (is_init == false) {
+ is_init = true;
+ for (i = 0; i < len; i++) {
+ BM_ELEM_API_FLAG_ENABLE(varr[i], _FLAG_OVERLAP);
+ }
+ }
+
+ l_iter = l_first = BM_FACE_FIRST_LOOP(f);
+ is_overlap = true;
+ do {
+ if (BM_ELEM_API_FLAG_TEST(l_iter->v, _FLAG_OVERLAP) == 0) {
+ is_overlap = false;
+ break;
+ }
+ } while ((l_iter = l_iter->next) != l_first);
+
+ if (is_overlap) {
+ break;
+ }
+
+ BM_ELEM_API_FLAG_ENABLE(f, _FLAG_OVERLAP);
+ BLI_linklist_prepend_alloca(&f_lnk, f);
+ }
+ }
+ }
+
+ if (is_init == true) {
+ for (i = 0; i < len; i++) {
+ BM_ELEM_API_FLAG_DISABLE(varr[i], _FLAG_OVERLAP);
+ }
+ }
+
+ for (; f_lnk; f_lnk = f_lnk->next) {
+ BM_ELEM_API_FLAG_DISABLE((BMFace *)f_lnk->link, _FLAG_OVERLAP);
+ }
+
+ return is_overlap;
+}
+
+
/* convenience functions for checking flags */
bool BM_edge_is_any_vert_flag_test(const BMEdge *e, const char hflag)
{
diff --git a/source/blender/bmesh/intern/bmesh_queries.h b/source/blender/bmesh/intern/bmesh_queries.h
index 2c931de995e..a057d120be1 100644
--- a/source/blender/bmesh/intern/bmesh_queries.h
+++ b/source/blender/bmesh/intern/bmesh_queries.h
@@ -27,8 +27,6 @@
* \ingroup bmesh
*/
-typedef bool (*BMElemFilterFunc)(BMElem *, void *user_data);
-
bool BM_vert_in_face(BMFace *f, BMVert *v);
int BM_verts_in_face_count(BMFace *f, BMVert **varr, int len);
bool BM_verts_in_face(BMFace *f, BMVert **varr, int len);
@@ -95,6 +93,9 @@ bool BM_face_exists(BMVert **varr, int len, BMFace **r_existface);
bool BM_face_exists_multi(BMVert **varr, BMEdge **earr, int len);
bool BM_face_exists_multi_edge(BMEdge **earr, int len);
+bool BM_face_exists_overlap(BMVert **varr, const int len, BMFace **r_f_overlap);
+bool BM_face_exists_overlap_subset(BMVert **varr, const int len);
+
int BM_face_share_face_count(BMFace *f_a, BMFace *f_b);
int BM_face_share_edge_count(BMFace *f1, BMFace *f2);
@@ -105,6 +106,7 @@ bool BM_edge_share_quad_check(BMEdge *e1, BMEdge *e2);
bool BM_edge_share_vert_check(BMEdge *e1, BMEdge *e2);
BMVert *BM_edge_share_vert(BMEdge *e1, BMEdge *e2);
+BMLoop *BM_edge_vert_share_loop(BMLoop *l, BMVert *v);
BMLoop *BM_face_vert_share_loop(BMFace *f, BMVert *v);
BMLoop *BM_face_edge_share_loop(BMFace *f, BMEdge *e);
diff --git a/source/blender/bmesh/intern/bmesh_walkers.c b/source/blender/bmesh/intern/bmesh_walkers.c
index 80b85ab6edd..af901b3359c 100644
--- a/source/blender/bmesh/intern/bmesh_walkers.c
+++ b/source/blender/bmesh/intern/bmesh_walkers.c
@@ -87,8 +87,8 @@ void BMW_init(BMWalker *walker, BMesh *bm, int type,
walker->mask_edge = mask_edge;
walker->mask_face = mask_face;
- walker->visithash = BLI_ghash_ptr_new("bmesh walkers 1");
- walker->secvisithash = BLI_ghash_ptr_new("bmesh walkers sec 1");
+ walker->visit_set = BLI_gset_ptr_new("bmesh walkers");
+ walker->visit_set_alt = BLI_gset_ptr_new("bmesh walkers sec");
if (UNLIKELY(type >= BMW_MAXWALKERS || type < 0)) {
fprintf(stderr,
@@ -127,8 +127,8 @@ void BMW_init(BMWalker *walker, BMesh *bm, int type,
void BMW_end(BMWalker *walker)
{
BLI_mempool_destroy(walker->worklist);
- BLI_ghash_free(walker->visithash, NULL, NULL);
- BLI_ghash_free(walker->secvisithash, NULL, NULL);
+ BLI_gset_free(walker->visit_set, NULL);
+ BLI_gset_free(walker->visit_set_alt, NULL);
}
@@ -253,8 +253,6 @@ void BMW_reset(BMWalker *walker)
BMW_state_remove(walker);
}
walker->depth = 0;
- BLI_ghash_free(walker->visithash, NULL, NULL);
- BLI_ghash_free(walker->secvisithash, NULL, NULL);
- walker->visithash = BLI_ghash_ptr_new("bmesh walkers 1");
- walker->secvisithash = BLI_ghash_ptr_new("bmesh walkers sec 1");
+ BLI_gset_clear(walker->visit_set, NULL);
+ BLI_gset_clear(walker->visit_set_alt, NULL);
}
diff --git a/source/blender/bmesh/intern/bmesh_walkers.h b/source/blender/bmesh/intern/bmesh_walkers.h
index 8be362b5afa..ea1dbc61cc6 100644
--- a/source/blender/bmesh/intern/bmesh_walkers.h
+++ b/source/blender/bmesh/intern/bmesh_walkers.h
@@ -67,8 +67,8 @@ typedef struct BMWalker {
BMWFlag flag;
- GHash *visithash;
- GHash *secvisithash;
+ GSet *visit_set;
+ GSet *visit_set_alt;
int depth;
} BMWalker;
diff --git a/source/blender/bmesh/intern/bmesh_walkers_impl.c b/source/blender/bmesh/intern/bmesh_walkers_impl.c
index 6a8ce32991e..aca2f96dc18 100644
--- a/source/blender/bmesh/intern/bmesh_walkers_impl.c
+++ b/source/blender/bmesh/intern/bmesh_walkers_impl.c
@@ -26,6 +26,8 @@
* BMesh Walker Code.
*/
+#include <string.h>
+
#include "BLI_utildefines.h"
#include "BKE_customdata.h"
@@ -34,6 +36,12 @@
#include "intern/bmesh_private.h"
#include "intern/bmesh_walkers_private.h"
+/* pop into stack memory (common operation) */
+#define BMW_state_remove_r(walker, owalk) { \
+ memcpy(owalk, BMW_current_state(walker), sizeof(*(owalk))); \
+ BMW_state_remove(walker); \
+} (void)0
+
static bool bmw_mask_check_vert(BMWalker *walker, BMVert *v)
{
if ((walker->flag & BMW_FLAG_TEST_HIDDEN) && BM_elem_flag_test(v, BM_ELEM_HIDDEN)) {
@@ -85,7 +93,7 @@ static void bmw_ShellWalker_visitEdge(BMWalker *walker, BMEdge *e)
{
BMwShellWalker *shellWalk = NULL;
- if (BLI_ghash_haskey(walker->visithash, e)) {
+ if (BLI_gset_haskey(walker->visit_set, e)) {
return;
}
@@ -95,7 +103,7 @@ static void bmw_ShellWalker_visitEdge(BMWalker *walker, BMEdge *e)
shellWalk = BMW_state_add(walker);
shellWalk->curedge = e;
- BLI_ghash_insert(walker->visithash, e, NULL);
+ BLI_gset_insert(walker->visit_set, e);
}
static void bmw_ShellWalker_begin(BMWalker *walker, void *data)
@@ -140,14 +148,16 @@ static void *bmw_ShellWalker_yield(BMWalker *walker)
static void *bmw_ShellWalker_step(BMWalker *walker)
{
- BMwShellWalker *swalk = BMW_current_state(walker);
+ BMwShellWalker *swalk, owalk;
BMEdge *e, *e2;
BMVert *v;
BMIter iter;
int i;
+ BMW_state_remove_r(walker, &owalk);
+ swalk = &owalk;
+
e = swalk->curedge;
- BMW_state_remove(walker);
for (i = 0; i < 2; i++) {
v = i ? e->v2 : e->v1;
@@ -167,8 +177,8 @@ static void *bmw_ShellWalker_step(BMWalker *walker)
bool restrictpass = true;
BMwShellWalker shellWalk = *((BMwShellWalker *)BMW_current_state(walker));
- if (!BLI_ghash_haskey(walker->visithash, shellWalk.base)) {
- BLI_ghash_insert(walker->visithash, shellWalk.base, NULL);
+ if (!BLI_gset_haskey(walker->visit_set, shellWalk.base)) {
+ BLI_gset_insert(walker->visit_set, shellWalk.base);
}
BMW_state_remove(walker);
@@ -177,7 +187,7 @@ static void *bmw_ShellWalker_step(BMWalker *walker)
/* find the next edge whose other vertex has not been visite */
curedge = shellWalk.curedge;
do {
- if (!BLI_ghash_haskey(walker->visithash, curedge)) {
+ if (!BLI_gset_haskey(walker->visit_set, curedge)) {
if (!walker->restrictflag ||
(walker->restrictflag && BMO_elem_flag_test(walker->bm, curedge, walker->restrictflag)))
{
@@ -187,7 +197,7 @@ static void *bmw_ShellWalker_step(BMWalker *walker)
/* push a new state onto the stac */
newState = BMW_state_add(walker);
- BLI_ghash_insert(walker->visithash, curedge, NULL);
+ BLI_gset_insert(walker->visit_set, curedge);
/* populate the new stat */
@@ -211,7 +221,7 @@ static void bmw_ConnectedVertexWalker_visitVertex(BMWalker *walker, BMVert *v)
{
BMwConnectedVertexWalker *vwalk;
- if (BLI_ghash_haskey(walker->visithash, v)) {
+ if (BLI_gset_haskey(walker->visit_set, v)) {
/* already visited */
return;
}
@@ -223,7 +233,7 @@ static void bmw_ConnectedVertexWalker_visitVertex(BMWalker *walker, BMVert *v)
vwalk = BMW_state_add(walker);
vwalk->curvert = v;
- BLI_ghash_insert(walker->visithash, v, NULL);
+ BLI_gset_insert(walker->visit_set, v);
}
static void bmw_ConnectedVertexWalker_begin(BMWalker *walker, void *data)
@@ -240,18 +250,19 @@ static void *bmw_ConnectedVertexWalker_yield(BMWalker *walker)
static void *bmw_ConnectedVertexWalker_step(BMWalker *walker)
{
- BMwConnectedVertexWalker *vwalk = BMW_current_state(walker);
+ BMwConnectedVertexWalker *vwalk, owalk;
BMVert *v, *v2;
BMEdge *e;
BMIter iter;
- v = vwalk->curvert;
+ BMW_state_remove_r(walker, &owalk);
+ vwalk = &owalk;
- BMW_state_remove(walker);
+ v = vwalk->curvert;
BM_ITER_ELEM (e, &iter, v, BM_EDGES_OF_VERT) {
v2 = BM_edge_other_vert(e, v);
- if (!BLI_ghash_haskey(walker->visithash, v2)) {
+ if (!BLI_gset_haskey(walker->visit_set, v2)) {
bmw_ConnectedVertexWalker_visitVertex(walker, v2);
}
}
@@ -276,7 +287,7 @@ static void bmw_IslandboundWalker_begin(BMWalker *walker, void *data)
iwalk->base = iwalk->curloop = l;
iwalk->lastv = l->v;
- BLI_ghash_insert(walker->visithash, data, NULL);
+ BLI_gset_insert(walker->visit_set, data);
}
@@ -289,14 +300,19 @@ static void *bmw_IslandboundWalker_yield(BMWalker *walker)
static void *bmw_IslandboundWalker_step(BMWalker *walker)
{
- BMwIslandboundWalker *iwalk = BMW_current_state(walker), owalk;
+ BMwIslandboundWalker *iwalk, owalk;
BMVert *v;
- BMEdge *e = iwalk->curloop->e;
+ BMEdge *e;
BMFace *f;
- BMLoop *l = iwalk->curloop;
+ BMLoop *l;
/* int found = 0; */
- owalk = *iwalk;
+ memcpy(&owalk, BMW_current_state(walker), sizeof(owalk));
+ /* normally we'd remove here, but delay until after error checking */
+ iwalk = &owalk;
+
+ l = iwalk->curloop;
+ e = l->e;
v = BM_edge_other_vert(e, iwalk->lastv);
@@ -307,7 +323,7 @@ static void *bmw_IslandboundWalker_step(BMWalker *walker)
return NULL;
}
- /* pop off current stat */
+ /* pop off current state */
BMW_state_remove(walker);
f = l->f;
@@ -334,11 +350,11 @@ static void *bmw_IslandboundWalker_step(BMWalker *walker)
if (l == owalk.curloop) {
return NULL;
}
- else if (BLI_ghash_haskey(walker->visithash, l)) {
+ else if (BLI_gset_haskey(walker->visit_set, l)) {
return owalk.curloop;
}
- BLI_ghash_insert(walker->visithash, l, NULL);
+ BLI_gset_insert(walker->visit_set, l);
iwalk = BMW_state_add(walker);
iwalk->base = owalk.base;
@@ -367,7 +383,7 @@ static void bmw_IslandWalker_begin(BMWalker *walker, void *data)
}
iwalk = BMW_state_add(walker);
- BLI_ghash_insert(walker->visithash, data, NULL);
+ BLI_gset_insert(walker->visit_set, data);
iwalk->cur = data;
}
@@ -381,13 +397,13 @@ static void *bmw_IslandWalker_yield(BMWalker *walker)
static void *bmw_IslandWalker_step(BMWalker *walker)
{
- BMwIslandWalker *iwalk = BMW_current_state(walker);
- /* BMwIslandWalker *owalk = iwalk; */ /* UNUSED */
+ BMwIslandWalker *iwalk, owalk;
BMIter iter, liter;
- BMFace *f, *curf = iwalk->cur;
+ BMFace *f;
BMLoop *l;
- BMW_state_remove(walker);
+ BMW_state_remove_r(walker, &owalk);
+ iwalk = &owalk;
l = BM_iter_new(&liter, walker->bm, BM_LOOPS_OF_FACE, iwalk->cur);
for ( ; l; l = BM_iter_step(&liter)) {
@@ -403,23 +419,23 @@ static void *bmw_IslandWalker_step(BMWalker *walker)
continue;
}
- /* saves checking BLI_ghash_haskey below (manifold edges theres a 50% chance) */
+ /* saves checking BLI_gset_haskey below (manifold edges theres a 50% chance) */
if (f == iwalk->cur) {
continue;
}
- if (BLI_ghash_haskey(walker->visithash, f)) {
+ if (BLI_gset_haskey(walker->visit_set, f)) {
continue;
}
iwalk = BMW_state_add(walker);
iwalk->cur = f;
- BLI_ghash_insert(walker->visithash, f, NULL);
+ BLI_gset_insert(walker->visit_set, f);
break;
}
}
- return curf;
+ return owalk.cur;
}
@@ -448,7 +464,7 @@ static void bmw_LoopWalker_begin(BMWalker *walker, void *data)
v = e->v1;
lwalk = BMW_state_add(walker);
- BLI_ghash_insert(walker->visithash, e, NULL);
+ BLI_gset_insert(walker->visit_set, e);
lwalk->cur = lwalk->start = e;
lwalk->lastv = lwalk->startv = v;
@@ -494,9 +510,8 @@ static void bmw_LoopWalker_begin(BMWalker *walker, void *data)
lwalk->lastv = lwalk->startv = BM_edge_other_vert(owalk.cur, lwalk->lastv);
- BLI_ghash_free(walker->visithash, NULL, NULL);
- walker->visithash = BLI_ghash_ptr_new("bmesh walkers 2");
- BLI_ghash_insert(walker->visithash, owalk.cur, NULL);
+ BLI_gset_clear(walker->visit_set, NULL);
+ BLI_gset_insert(walker->visit_set, owalk.cur);
}
static void *bmw_LoopWalker_yield(BMWalker *walker)
@@ -508,15 +523,16 @@ static void *bmw_LoopWalker_yield(BMWalker *walker)
static void *bmw_LoopWalker_step(BMWalker *walker)
{
- BMwLoopWalker *lwalk = BMW_current_state(walker), owalk;
- BMEdge *e = lwalk->cur, *nexte = NULL;
+ BMwLoopWalker *lwalk, owalk;
+ BMEdge *e, *nexte = NULL;
BMLoop *l;
BMVert *v;
int i = 0;
- owalk = *lwalk;
- BMW_state_remove(walker);
+ BMW_state_remove_r(walker, &owalk);
+ lwalk = &owalk;
+ e = lwalk->cur;
l = e->l;
if (owalk.f_hub) { /* NGON EDGE */
@@ -531,7 +547,7 @@ static void *bmw_LoopWalker_step(BMWalker *walker)
nexte = BM_edge_exists(v, l->v);
if (bmw_mask_check_edge(walker, nexte) &&
- !BLI_ghash_haskey(walker->visithash, nexte) &&
+ !BLI_gset_haskey(walker->visit_set, nexte) &&
/* never step onto a boundary edge, this gives odd-results */
(BM_edge_is_boundary(nexte) == false))
{
@@ -543,7 +559,7 @@ static void *bmw_LoopWalker_step(BMWalker *walker)
lwalk->is_single = owalk.is_single;
lwalk->f_hub = owalk.f_hub;
- BLI_ghash_insert(walker->visithash, nexte, NULL);
+ BLI_gset_insert(walker->visit_set, nexte);
}
}
}
@@ -557,7 +573,7 @@ static void *bmw_LoopWalker_step(BMWalker *walker)
BM_ITER_ELEM (nexte, &eiter, v, BM_EDGES_OF_VERT) {
if ((nexte->l == NULL) &&
bmw_mask_check_edge(walker, nexte) &&
- !BLI_ghash_haskey(walker->visithash, nexte))
+ !BLI_gset_haskey(walker->visit_set, nexte))
{
lwalk = BMW_state_add(walker);
lwalk->cur = nexte;
@@ -567,7 +583,7 @@ static void *bmw_LoopWalker_step(BMWalker *walker)
lwalk->is_single = owalk.is_single;
lwalk->f_hub = owalk.f_hub;
- BLI_ghash_insert(walker->visithash, nexte, NULL);
+ BLI_gset_insert(walker->visit_set, nexte);
}
}
}
@@ -602,7 +618,7 @@ static void *bmw_LoopWalker_step(BMWalker *walker)
if (l != NULL) {
if (l != e->l &&
bmw_mask_check_edge(walker, l->e) &&
- !BLI_ghash_haskey(walker->visithash, l->e))
+ !BLI_gset_haskey(walker->visit_set, l->e))
{
lwalk = BMW_state_add(walker);
lwalk->cur = l->e;
@@ -612,7 +628,7 @@ static void *bmw_LoopWalker_step(BMWalker *walker)
lwalk->is_single = owalk.is_single;
lwalk->f_hub = owalk.f_hub;
- BLI_ghash_insert(walker->visithash, l->e, NULL);
+ BLI_gset_insert(walker->visit_set, l->e);
}
}
}
@@ -655,7 +671,7 @@ static void *bmw_LoopWalker_step(BMWalker *walker)
if (l != NULL) {
if (l != e->l &&
bmw_mask_check_edge(walker, l->e) &&
- !BLI_ghash_haskey(walker->visithash, l->e))
+ !BLI_gset_haskey(walker->visit_set, l->e))
{
lwalk = BMW_state_add(walker);
lwalk->cur = l->e;
@@ -665,7 +681,7 @@ static void *bmw_LoopWalker_step(BMWalker *walker)
lwalk->is_single = owalk.is_single;
lwalk->f_hub = owalk.f_hub;
- BLI_ghash_insert(walker->visithash, l->e, NULL);
+ BLI_gset_insert(walker->visit_set, l->e);
}
}
}
@@ -694,8 +710,8 @@ static bool bmw_FaceLoopWalker_include_face(BMWalker *walker, BMLoop *l)
return false;
}
- /* the face must not have been already visite */
- if (BLI_ghash_haskey(walker->visithash, l->f) && BLI_ghash_haskey(walker->secvisithash, l->e)) {
+ /* the face must not have been already visited */
+ if (BLI_gset_haskey(walker->visit_set, l->f) && BLI_gset_haskey(walker->visit_set_alt, l->e)) {
return false;
}
@@ -739,9 +755,9 @@ static void bmw_FaceLoopWalker_begin(BMWalker *walker, void *data)
lwalk = BMW_state_add(walker);
lwalk->l = e->l;
lwalk->no_calc = false;
- BLI_ghash_insert(walker->visithash, lwalk->l->f, NULL);
+ BLI_gset_insert(walker->visit_set, lwalk->l->f);
- /* rewin */
+ /* rewind */
while ((owalk_pt = BMW_current_state(walker))) {
owalk = *((BMwFaceLoopWalker *)owalk_pt);
BMW_walk(walker);
@@ -751,13 +767,11 @@ static void bmw_FaceLoopWalker_begin(BMWalker *walker, void *data)
*lwalk = owalk;
lwalk->no_calc = false;
- BLI_ghash_free(walker->secvisithash, NULL, NULL);
- walker->secvisithash = BLI_ghash_ptr_new("bmesh walkers 3");
- BLI_ghash_insert(walker->visithash, lwalk->l->e, NULL);
+ BLI_gset_clear(walker->visit_set_alt, NULL);
+ BLI_gset_insert(walker->visit_set_alt, lwalk->l->e);
- BLI_ghash_free(walker->visithash, NULL, NULL);
- walker->visithash = BLI_ghash_ptr_new("bmesh walkers 3");
- BLI_ghash_insert(walker->visithash, lwalk->l->f, NULL);
+ BLI_gset_clear(walker->visit_set, NULL);
+ BLI_gset_insert(walker->visit_set, lwalk->l->f);
}
static void *bmw_FaceLoopWalker_yield(BMWalker *walker)
@@ -773,13 +787,15 @@ static void *bmw_FaceLoopWalker_yield(BMWalker *walker)
static void *bmw_FaceLoopWalker_step(BMWalker *walker)
{
- BMwFaceLoopWalker *lwalk = BMW_current_state(walker);
- BMFace *f = lwalk->l->f;
- BMLoop *l = lwalk->l, *origl = lwalk->l;
+ BMwFaceLoopWalker *lwalk, owalk;
+ BMFace *f;
+ BMLoop *l;
- BMW_state_remove(walker);
+ BMW_state_remove_r(walker, &owalk);
+ lwalk = &owalk;
- l = l->radial_next;
+ f = lwalk->l->f;
+ l = lwalk->l->radial_next;
if (lwalk->no_calc) {
return f;
@@ -800,14 +816,15 @@ static void *bmw_FaceLoopWalker_step(BMWalker *walker)
if (l->f->len != 4) {
lwalk->no_calc = true;
- lwalk->l = origl;
+ lwalk->l = owalk.l;
}
else {
lwalk->no_calc = false;
}
- BLI_ghash_insert(walker->secvisithash, l->e, NULL);
- BLI_ghash_insert(walker->visithash, l->f, NULL);
+ /* both may already exist */
+ BLI_gset_reinsert(walker->visit_set_alt, l->e, NULL);
+ BLI_gset_reinsert(walker->visit_set, l->f, NULL);
}
return f;
@@ -838,7 +855,7 @@ static void bmw_EdgeringWalker_begin(BMWalker *walker, void *data)
lwalk->wireedge = NULL;
}
- BLI_ghash_insert(walker->visithash, lwalk->l->e, NULL);
+ BLI_gset_insert(walker->visit_set, lwalk->l->e);
/* rewind */
while ((owalk_pt = BMW_current_state(walker))) {
@@ -858,9 +875,8 @@ static void bmw_EdgeringWalker_begin(BMWalker *walker, void *data)
lwalk->l = lwalk->l->radial_next;
}
- BLI_ghash_free(walker->visithash, NULL, NULL);
- walker->visithash = BLI_ghash_ptr_new("bmesh walkers 4");
- BLI_ghash_insert(walker->visithash, lwalk->l->e, NULL);
+ BLI_gset_clear(walker->visit_set, NULL);
+ BLI_gset_insert(walker->visit_set, lwalk->l->e);
}
static void *bmw_EdgeringWalker_yield(BMWalker *walker)
@@ -881,19 +897,21 @@ static void *bmw_EdgeringWalker_yield(BMWalker *walker)
static void *bmw_EdgeringWalker_step(BMWalker *walker)
{
- BMwEdgeringWalker *lwalk = BMW_current_state(walker);
- BMEdge *e, *wireedge = lwalk->wireedge;
- BMLoop *l = lwalk->l, *origl = lwalk->l;
+ BMwEdgeringWalker *lwalk, owalk;
+ BMEdge *e;
+ BMLoop *l;
#ifdef BMW_EDGERING_NGON
int i, len;
#endif
#define EDGE_CHECK(e) (bmw_mask_check_edge(walker, e) && (BM_edge_is_boundary(e) || BM_edge_is_manifold(e)))
- BMW_state_remove(walker);
+ BMW_state_remove_r(walker, &owalk);
+ lwalk = &owalk;
+ l = lwalk->l;
if (!l)
- return wireedge;
+ return lwalk->wireedge;
e = l->e;
if (!EDGE_CHECK(e)) {
@@ -916,7 +934,7 @@ static void *bmw_EdgeringWalker_step(BMWalker *walker)
if ((len <= 0) || (len % 2 != 0) || !EDGE_CHECK(l->e) ||
!bmw_mask_check_face(walker, l->f))
{
- l = origl;
+ l = owalk.l;
i = len;
while (i > 0) {
l = l->next;
@@ -925,7 +943,7 @@ static void *bmw_EdgeringWalker_step(BMWalker *walker)
}
/* only walk to manifold edge */
if ((l->f->len % 2 == 0) && EDGE_CHECK(l->e) &&
- !BLI_ghash_haskey(walker->visithash, l->e))
+ !BLI_gset_haskey(walker->visit_set, l->e))
#else
@@ -933,18 +951,18 @@ static void *bmw_EdgeringWalker_step(BMWalker *walker)
l = l->next->next;
if ((l->f->len != 4) || !EDGE_CHECK(l->e) || !bmw_mask_check_face(walker, l->f)) {
- l = origl->next->next;
+ l = owalk.l->next->next;
}
/* only walk to manifold edge */
if ((l->f->len == 4) && EDGE_CHECK(l->e) &&
- !BLI_ghash_haskey(walker->visithash, l->e))
+ !BLI_gset_haskey(walker->visit_set, l->e))
#endif
{
lwalk = BMW_state_add(walker);
lwalk->l = l;
lwalk->wireedge = NULL;
- BLI_ghash_insert(walker->visithash, l->e, NULL);
+ BLI_gset_insert(walker->visit_set, l->e);
}
return e;
@@ -957,12 +975,12 @@ static void bmw_UVEdgeWalker_begin(BMWalker *walker, void *data)
BMwUVEdgeWalker *lwalk;
BMLoop *l = data;
- if (BLI_ghash_haskey(walker->visithash, l))
+ if (BLI_gset_haskey(walker->visit_set, l))
return;
lwalk = BMW_state_add(walker);
lwalk->l = l;
- BLI_ghash_insert(walker->visithash, l, NULL);
+ BLI_gset_insert(walker->visit_set, l);
}
static void *bmw_UVEdgeWalker_yield(BMWalker *walker)
@@ -978,17 +996,18 @@ static void *bmw_UVEdgeWalker_yield(BMWalker *walker)
static void *bmw_UVEdgeWalker_step(BMWalker *walker)
{
- BMwUVEdgeWalker *lwalk = BMW_current_state(walker);
+ const int type = walker->bm->ldata.layers[walker->layer].type;
+ BMwUVEdgeWalker *lwalk, owalk;
BMLoop *l, *l2, *l3, *nl, *cl;
BMIter liter;
void *d1, *d2;
- int i, j, rlen, type;
+ int i, j, rlen;
+
+ BMW_state_remove_r(walker, &owalk);
+ lwalk = &owalk;
l = lwalk->l;
nl = l->next;
- type = walker->bm->ldata.layers[walker->layer].type;
-
- BMW_state_remove(walker);
if (!bmw_mask_check_edge(walker, l->e)) {
return l;
@@ -1004,7 +1023,7 @@ static void *bmw_UVEdgeWalker_step(BMWalker *walker)
rlen = BM_edge_face_count(l2->e);
for (j = 0; j < rlen; j++) {
- if (BLI_ghash_haskey(walker->visithash, l2)) {
+ if (BLI_gset_haskey(walker->visit_set, l2)) {
continue;
}
@@ -1022,7 +1041,7 @@ static void *bmw_UVEdgeWalker_step(BMWalker *walker)
continue;
lwalk = BMW_state_add(walker);
- BLI_ghash_insert(walker->visithash, l2, NULL);
+ BLI_gset_insert(walker->visit_set, l2);
lwalk->l = l2;
diff --git a/source/blender/bmesh/operators/bmo_beautify.c b/source/blender/bmesh/operators/bmo_beautify.c
index 22b686db64e..d9ab30bfcfa 100644
--- a/source/blender/bmesh/operators/bmo_beautify.c
+++ b/source/blender/bmesh/operators/bmo_beautify.c
@@ -25,367 +25,19 @@
*
* Beautify the mesh by rotating edges between triangles
* to more attractive positions until no more rotations can be made.
- *
- * In principle this is very simple however there is the possibility of
- * going into an eternal loop where edges keep rotating.
- * To avoid this - each edge stores a hash of it previous
- * states so as not to rotate back.
- *
- * TODO
- * - Take face normals into account.
*/
#include "BLI_math.h"
-#include "BLI_heap.h"
#include "MEM_guardedalloc.h"
#include "bmesh.h"
+#include "bmesh_tools.h"
#include "intern/bmesh_operators_private.h"
-// #define DEBUG_TIME
-
-#ifdef DEBUG_TIME
-# include "PIL_time.h"
-#endif
-
-enum {
- VERT_RESTRICT_TAG = (1 << 0),
-};
-
-/* -------------------------------------------------------------------- */
-/* GHash for edge rotation */
-
-typedef struct EdRotState {
- int v1, v2; /* edge vert, small -> large */
- int f1, f2; /* face vert, small -> large */
-} EdRotState;
-
-static unsigned int erot_ghashutil_hash(const void *ptr)
-{
- const EdRotState *e_state = (const EdRotState *)ptr;
- unsigned int
- hash = BLI_ghashutil_inthash(SET_INT_IN_POINTER(e_state->v1));
- hash ^= BLI_ghashutil_inthash(SET_INT_IN_POINTER(e_state->v2));
- hash ^= BLI_ghashutil_inthash(SET_INT_IN_POINTER(e_state->f1));
- hash ^= BLI_ghashutil_inthash(SET_INT_IN_POINTER(e_state->f2));
- return hash;
-}
-static int erot_ghashutil_cmp(const void *a, const void *b)
-{
- const EdRotState *e_state_a = (const EdRotState *)a;
- const EdRotState *e_state_b = (const EdRotState *)b;
- if (e_state_a->v1 < e_state_b->v1) return -1;
- else if (e_state_a->v1 > e_state_b->v1) return 1;
- else if (e_state_a->v2 < e_state_b->v2) return -1;
- else if (e_state_a->v2 > e_state_b->v2) return 1;
- else if (e_state_a->f1 < e_state_b->f1) return -1;
- else if (e_state_a->f1 > e_state_b->f1) return 1;
- else if (e_state_a->f2 < e_state_b->f2) return -1;
- else if (e_state_a->f2 > e_state_b->f2) return 1;
- else return 0;
-}
-
-static GHash *erot_ghash_new(void)
-{
- return BLI_ghash_new(erot_ghashutil_hash, erot_ghashutil_cmp, __func__);
-}
-
-/* ensure v0 is smaller */
-#define EDGE_ORD(v0, v1) \
- if (v0 > v1) { \
- v0 ^= v1; \
- v1 ^= v0; \
- v0 ^= v1; \
- } (void)0
-
-static void erot_state_ex(const BMEdge *e, int v_index[2], int f_index[2])
-{
- BLI_assert(BM_edge_is_manifold((BMEdge *)e));
- BLI_assert(BM_vert_in_edge(e, e->l->prev->v) == false);
- BLI_assert(BM_vert_in_edge(e, e->l->radial_next->prev->v) == false);
-
- /* verts of the edge */
- v_index[0] = BM_elem_index_get(e->v1);
- v_index[1] = BM_elem_index_get(e->v2);
- EDGE_ORD(v_index[0], v_index[1]);
-
- /* verts of each of the 2 faces attached to this edge
- * (that are not apart of this edge) */
- f_index[0] = BM_elem_index_get(e->l->prev->v);
- f_index[1] = BM_elem_index_get(e->l->radial_next->prev->v);
- EDGE_ORD(f_index[0], f_index[1]);
-}
-
-static void erot_state_current(const BMEdge *e, EdRotState *e_state)
-{
- erot_state_ex(e, &e_state->v1, &e_state->f1);
-}
-
-static void erot_state_alternate(const BMEdge *e, EdRotState *e_state)
-{
- erot_state_ex(e, &e_state->f1, &e_state->v1);
-}
-
-/* -------------------------------------------------------------------- */
-/* Calculate the improvement of rotating the edge */
-
-/**
- * \return a negative value means the edge can be rotated.
- */
-static float bm_edge_calc_rotate_beauty(const BMEdge *e, const int flag)
-{
- /* not a loop (only to be able to break out) */
- do {
- float v1_xy[2], v2_xy[2], v3_xy[2], v4_xy[2];
-
- /* first get the 2d values */
- {
- const float *v1, *v2, *v3, *v4;
- bool is_zero_a, is_zero_b;
- float no[3];
- float axis_mat[3][3];
-
- v1 = e->l->prev->v->co; /* first face co */
- v2 = e->l->v->co; /* e->v1 or e->v2*/
- v3 = e->l->radial_next->prev->v->co; /* second face co */
- v4 = e->l->next->v->co; /* e->v1 or e->v2*/
-
- if (flag & VERT_RESTRICT_TAG) {
- BMVert *v_a = e->l->prev->v, *v_b = e->l->radial_next->prev->v;
- if (BM_elem_flag_test(v_a, BM_ELEM_TAG) == BM_elem_flag_test(v_b, BM_ELEM_TAG)) {
- break;
- }
- }
-
- if (UNLIKELY(v1 == v3)) {
- // printf("This should never happen, but does sometimes!\n");
- break;
- }
-
- // printf("%p %p %p %p - %p %p\n", v1, v2, v3, v4, e->l->f, e->l->radial_next->f);
- BLI_assert((ELEM3(v1, v2, v3, v4) == false) &&
- (ELEM3(v2, v1, v3, v4) == false) &&
- (ELEM3(v3, v1, v2, v4) == false) &&
- (ELEM3(v4, v1, v2, v3) == false));
-
- is_zero_a = area_tri_v3(v2, v3, v4) <= FLT_EPSILON;
- is_zero_b = area_tri_v3(v2, v4, v1) <= FLT_EPSILON;
-
- if (LIKELY(is_zero_a == false && is_zero_b == false)) {
- float no_a[3], no_b[3];
- normal_tri_v3(no_a, v2, v3, v4); /* a */
- normal_tri_v3(no_b, v2, v4, v1); /* b */
- add_v3_v3v3(no, no_a, no_b);
- if (UNLIKELY(normalize_v3(no) <= FLT_EPSILON)) {
- break;
- }
- }
- else if (is_zero_a == false) {
- normal_tri_v3(no, v2, v3, v4); /* a */
- }
- else if (is_zero_b == false) {
- normal_tri_v3(no, v2, v4, v1); /* b */
- }
- else {
- /* both zero area, no useful normal can be calculated */
- break;
- }
-
- // { float a = angle_normalized_v3v3(no_a, no_b); printf("~ %.7f\n", a); fflush(stdout);}
-
- axis_dominant_v3_to_m3(axis_mat, no);
- mul_v2_m3v3(v1_xy, axis_mat, v1);
- mul_v2_m3v3(v2_xy, axis_mat, v2);
- mul_v2_m3v3(v3_xy, axis_mat, v3);
- mul_v2_m3v3(v4_xy, axis_mat, v4);
- }
-
- // printf("%p %p %p %p - %p %p\n", v1, v2, v3, v4, e->l->f, e->l->radial_next->f);
-
- if (is_quad_convex_v2(v1_xy, v2_xy, v3_xy, v4_xy)) {
- float len1, len2, len3, len4, len5, len6, opp1, opp2, fac1, fac2;
- /* testing rule:
- * the area divided by the total edge lengths
- */
- len1 = len_v2v2(v1_xy, v2_xy);
- len2 = len_v2v2(v2_xy, v3_xy);
- len3 = len_v2v2(v3_xy, v4_xy);
- len4 = len_v2v2(v4_xy, v1_xy);
- len5 = len_v2v2(v1_xy, v3_xy);
- len6 = len_v2v2(v2_xy, v4_xy);
-
- opp1 = area_tri_v2(v1_xy, v2_xy, v3_xy);
- opp2 = area_tri_v2(v1_xy, v3_xy, v4_xy);
-
- fac1 = opp1 / (len1 + len2 + len5) + opp2 / (len3 + len4 + len5);
-
- opp1 = area_tri_v2(v2_xy, v3_xy, v4_xy);
- opp2 = area_tri_v2(v2_xy, v4_xy, v1_xy);
-
- fac2 = opp1 / (len2 + len3 + len6) + opp2 / (len4 + len1 + len6);
- /* negative number if we're OK */
- return fac2 - fac1;
- }
- } while (false);
-
- return FLT_MAX;
-}
-
-/* -------------------------------------------------------------------- */
-/* Update the edge cost of rotation in the heap */
-
-/* recalc an edge in the heap (surrounding geometry has changed) */
-static void bm_edge_update_beauty_cost_single(BMEdge *e, Heap *eheap, HeapNode **eheap_table, GHash **edge_state_arr,
- const int flag)
-{
- if (BM_elem_flag_test(e, BM_ELEM_TAG)) {
- const int i = BM_elem_index_get(e);
- GHash *e_state_hash = edge_state_arr[i];
-
- if (eheap_table[i]) {
- BLI_heap_remove(eheap, eheap_table[i]);
- eheap_table[i] = NULL;
- }
-
- /* check if we can add it back */
- BLI_assert(BM_edge_is_manifold(e) == true);
- //BLI_assert(BMO_elem_flag_test(bm, e->l->f, FACE_MARK) &&
- // BMO_elem_flag_test(bm, e->l->radial_next->f, FACE_MARK));
-
- /* check we're not moving back into a state we have been in before */
- if (e_state_hash != NULL) {
- EdRotState e_state_alt;
- erot_state_alternate(e, &e_state_alt);
- if (BLI_ghash_haskey(e_state_hash, (void *)&e_state_alt)) {
- // printf(" skipping, we already have this state\n");
- return;
- }
- }
-
- {
- /* recalculate edge */
- const float cost = bm_edge_calc_rotate_beauty(e, flag);
- if (cost < 0.0f) {
- eheap_table[i] = BLI_heap_insert(eheap, cost, e);
- }
- else {
- eheap_table[i] = NULL;
- }
- }
- }
-}
-
-/* we have rotated an edge, tag other edges and clear this one */
-static void bm_edge_update_beauty_cost(BMEdge *e, Heap *eheap, HeapNode **eheap_table, GHash **edge_state_arr,
- const int flag)
-{
- BMLoop *l;
- BLI_assert(e->l->f->len == 3 &&
- e->l->radial_next->f->len == 3);
-
- l = e->l;
- bm_edge_update_beauty_cost_single(l->next->e, eheap, eheap_table, edge_state_arr, flag);
- bm_edge_update_beauty_cost_single(l->prev->e, eheap, eheap_table, edge_state_arr, flag);
- l = l->radial_next;
- bm_edge_update_beauty_cost_single(l->next->e, eheap, eheap_table, edge_state_arr, flag);
- bm_edge_update_beauty_cost_single(l->prev->e, eheap, eheap_table, edge_state_arr, flag);
-}
-
-/* -------------------------------------------------------------------- */
-/* Beautify Fill */
-
#define ELE_NEW 1
#define FACE_MARK 2
-/**
- * \note All edges in \a edge_array must be tagged and
- * have their index values set according to their position in the array.
- */
-static void bm_mesh_beautify_fill(BMesh *bm, BMEdge **edge_array, const int edge_array_len,
- const int flag)
-{
- Heap *eheap; /* edge heap */
- HeapNode **eheap_table; /* edge index aligned table pointing to the eheap */
-
- GHash **edge_state_arr = MEM_callocN(edge_array_len * sizeof(GHash *), __func__);
- BLI_mempool *edge_state_pool = BLI_mempool_create(sizeof(EdRotState), 512, 512, BLI_MEMPOOL_SYSMALLOC);
- int i;
-
-#ifdef DEBUG_TIME
- TIMEIT_START(beautify_fill);
-#endif
-
- eheap = BLI_heap_new_ex(edge_array_len);
- eheap_table = MEM_mallocN(sizeof(HeapNode *) * edge_array_len, __func__);
-
- /* build heap */
- for (i = 0; i < edge_array_len; i++) {
- BMEdge *e = edge_array[i];
- const float cost = bm_edge_calc_rotate_beauty(e, flag);
- if (cost < 0.0f) {
- eheap_table[i] = BLI_heap_insert(eheap, cost, e);
- }
- else {
- eheap_table[i] = NULL;
- }
- }
-
- while (BLI_heap_is_empty(eheap) == false) {
- BMEdge *e = BLI_heap_popmin(eheap);
- i = BM_elem_index_get(e);
- eheap_table[i] = NULL;
-
- e = BM_edge_rotate(bm, e, false, BM_EDGEROT_CHECK_EXISTS);
- if (LIKELY(e)) {
- GHash *e_state_hash = edge_state_arr[i];
-
- /* add the new state into the hash so we don't move into this state again
- * note: we could add the previous state too but this isn't essential)
- * for avoiding eternal loops */
- EdRotState *e_state = BLI_mempool_alloc(edge_state_pool);
- erot_state_current(e, e_state);
- if (UNLIKELY(e_state_hash == NULL)) {
- edge_state_arr[i] = e_state_hash = erot_ghash_new(); /* store previous state */
- }
- BLI_assert(BLI_ghash_haskey(e_state_hash, (void *)e_state) == false);
- BLI_ghash_insert(e_state_hash, e_state, NULL);
-
-
- // printf(" %d -> %d, %d\n", i, BM_elem_index_get(e->v1), BM_elem_index_get(e->v2));
-
- /* maintain the index array */
- edge_array[i] = e;
- BM_elem_index_set(e, i);
-
- /* recalculate faces connected on the heap */
- bm_edge_update_beauty_cost(e, eheap, eheap_table, edge_state_arr, flag);
-
- /* update flags */
- BMO_elem_flag_enable(bm, e, ELE_NEW);
- BMO_elem_flag_enable(bm, e->l->f, FACE_MARK | ELE_NEW);
- BMO_elem_flag_enable(bm, e->l->radial_next->f, FACE_MARK | ELE_NEW);
- }
- }
-
- BLI_heap_free(eheap, NULL);
- MEM_freeN(eheap_table);
-
- for (i = 0; i < edge_array_len; i++) {
- if (edge_state_arr[i]) {
- BLI_ghash_free(edge_state_arr[i], NULL, NULL);
- }
- }
-
- MEM_freeN(edge_state_arr);
- BLI_mempool_destroy(edge_state_pool);
-
-#ifdef DEBUG_TIME
- TIMEIT_END(beautify_fill);
-#endif
-}
-
-
void bmo_beautify_fill_exec(BMesh *bm, BMOperator *op)
{
BMIter iter;
@@ -393,11 +45,11 @@ void bmo_beautify_fill_exec(BMesh *bm, BMOperator *op)
BMFace *f;
BMEdge *e;
const bool use_restrict_tag = BMO_slot_bool_get(op->slots_in, "use_restrict_tag");
- const int flag = (use_restrict_tag ? VERT_RESTRICT_TAG : 0);
+ const short flag = (use_restrict_tag ? VERT_RESTRICT_TAG : 0);
+ const short method = (short)BMO_slot_int_get(op->slots_in, "method");
BMEdge **edge_array;
int edge_array_len = 0;
-
BMO_ITER (f, &siter, op->slots_in, "faces", BM_FACE) {
if (f->len == 3) {
BMO_elem_flag_enable(bm, f, FACE_MARK);
@@ -409,7 +61,7 @@ void bmo_beautify_fill_exec(BMesh *bm, BMOperator *op)
}
/* will over alloc if some edges can't be rotated */
- edge_array = MEM_mallocN(sizeof(*edge_array) * BMO_slot_buffer_count(op->slots_in, "edges"), __func__);
+ edge_array = MEM_mallocN(sizeof(*edge_array) * (size_t)BMO_slot_buffer_count(op->slots_in, "edges"), __func__);
BMO_ITER (e, &siter, op->slots_in, "edges", BM_EDGE) {
@@ -427,9 +79,10 @@ void bmo_beautify_fill_exec(BMesh *bm, BMOperator *op)
}
bm->elem_index_dirty |= BM_EDGE;
- bm_mesh_beautify_fill(bm, edge_array, edge_array_len, flag);
+ BM_mesh_beautify_fill(bm, edge_array, edge_array_len, flag, method, ELE_NEW, FACE_MARK | ELE_NEW);
MEM_freeN(edge_array);
BMO_slot_buffer_from_enabled_flag(bm, op, op->slots_out, "geom.out", BM_EDGE | BM_FACE, ELE_NEW);
}
+
diff --git a/source/blender/bmesh/operators/bmo_bevel.c b/source/blender/bmesh/operators/bmo_bevel.c
index dc06b0b4f13..eef470e0d85 100644
--- a/source/blender/bmesh/operators/bmo_bevel.c
+++ b/source/blender/bmesh/operators/bmo_bevel.c
@@ -29,6 +29,7 @@
#include "BLI_utildefines.h"
#include "bmesh.h"
+#include "bmesh_tools.h"
#include "intern/bmesh_operators_private.h" /* own include */
diff --git a/source/blender/bmesh/operators/bmo_bisect_plane.c b/source/blender/bmesh/operators/bmo_bisect_plane.c
new file mode 100644
index 00000000000..74cb9d67e88
--- /dev/null
+++ b/source/blender/bmesh/operators/bmo_bisect_plane.c
@@ -0,0 +1,112 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor(s):
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/bmesh/operators/bmo_bisect_plane.c
+ * \ingroup bmesh
+ *
+ * Wrapper around #BM_mesh_bisect_plane
+ */
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_utildefines.h"
+#include "BLI_math.h"
+
+#include "bmesh.h"
+#include "bmesh_tools.h"
+
+#include "intern/bmesh_operators_private.h" /* own include */
+
+#define ELE_NEW 1
+#define ELE_INPUT 2
+
+void bmo_bisect_plane_exec(BMesh *bm, BMOperator *op)
+{
+ const float dist = BMO_slot_float_get(op->slots_in, "dist");
+ const bool use_snap_center = BMO_slot_bool_get(op->slots_in, "use_snap_center");
+ const bool clear_outer = BMO_slot_bool_get(op->slots_in, "clear_outer");
+ const bool clear_inner = BMO_slot_bool_get(op->slots_in, "clear_inner");
+
+ float plane_co[3];
+ float plane_no[3];
+ float plane[4];
+
+ BMO_slot_vec_get(op->slots_in, "plane_co", plane_co);
+ BMO_slot_vec_get(op->slots_in, "plane_no", plane_no);
+
+ if (is_zero_v3(plane_no)) {
+ BMO_error_raise(bm, op, BMERR_MESH_ERROR, "Zero normal given");
+ return;
+ }
+
+ plane_from_point_normal_v3(plane, plane_co, plane_no);
+
+ /* tag geometry to bisect */
+ BM_mesh_elem_hflag_disable_all(bm, BM_EDGE | BM_FACE, BM_ELEM_TAG, false);
+ BMO_slot_buffer_hflag_enable(bm, op->slots_in, "geom", BM_EDGE | BM_FACE, BM_ELEM_TAG, false);
+
+ BMO_slot_buffer_flag_enable(bm, op->slots_in, "geom", BM_ALL_NOLOOP, ELE_INPUT);
+
+
+ BM_mesh_bisect_plane(bm, plane, use_snap_center, true,
+ ELE_NEW, dist);
+
+
+ if (clear_outer || clear_inner) {
+ /* Use an array of vertices because 'geom' contains both vers and edges that may use them.
+ * Removing a vert may remove and edge which is later checked by BMO_ITER.
+ * over-alloc the total possible vert count */
+ const int vert_arr_max = min_ii(bm->totvert, BMO_slot_buffer_count(op->slots_in, "geom"));
+ BMVert **vert_arr = MEM_mallocN(sizeof(*vert_arr) * (size_t)vert_arr_max, __func__);
+ BMOIter siter;
+ BMVert *v;
+ float plane_inner[4];
+ float plane_outer[4];
+
+ STACK_DECLARE(vert_arr);
+
+ copy_v3_v3(plane_outer, plane);
+ copy_v3_v3(plane_inner, plane);
+ plane_outer[3] = plane[3] - dist;
+ plane_inner[3] = plane[3] + dist;
+
+ STACK_INIT(vert_arr);
+
+ BMO_ITER (v, &siter, op->slots_in, "geom", BM_VERT) {
+ if ((clear_outer && plane_point_side_v3(plane_outer, v->co) > 0.0f) ||
+ (clear_inner && plane_point_side_v3(plane_inner, v->co) < 0.0f))
+ {
+ STACK_PUSH(vert_arr, v);
+ }
+ }
+
+ while ((v = STACK_POP(vert_arr))) {
+ BM_vert_kill(bm, v);
+ }
+
+ STACK_FREE(vert_arr);
+ MEM_freeN(vert_arr);
+ }
+
+ BMO_slot_buffer_from_enabled_flag(bm, op, op->slots_out, "geom.out", BM_ALL_NOLOOP, ELE_NEW | ELE_INPUT);
+ BMO_slot_buffer_from_enabled_flag(bm, op, op->slots_out, "geom_cut.out", BM_VERT | BM_EDGE, ELE_NEW);
+}
diff --git a/source/blender/bmesh/operators/bmo_bridge.c b/source/blender/bmesh/operators/bmo_bridge.c
index f63e742d8ba..10d15d93995 100644
--- a/source/blender/bmesh/operators/bmo_bridge.c
+++ b/source/blender/bmesh/operators/bmo_bridge.c
@@ -26,8 +26,6 @@
* Connect verts across faces (splits faces) and bridge tool.
*/
-#include "MEM_guardedalloc.h"
-
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BLI_listbase.h"
@@ -121,7 +119,7 @@ static void bm_bridge_best_rotation(struct BMEdgeLoopStore *el_store_a, struct B
}
if (el_b_best) {
- BLI_rotatelist(lb_b, el_b_best);
+ BLI_rotatelist_first(lb_b, el_b_best);
}
}
@@ -273,9 +271,8 @@ static void bridge_loop_pair(BMesh *bm,
if (twist_offset != 0) {
const int len_b = BM_edgeloop_length_get(el_store_b);
ListBase *lb_b = BM_edgeloop_verts_get(el_store_b);
- const int offset = twist_offset % len_b;
- LinkData *el_b = BLI_rfindlink(lb_b, (offset < 0) ? (offset + len_b) : offset);
- BLI_rotatelist(lb_b, el_b);
+ LinkData *el_b = BLI_rfindlink(lb_b, mod_i(twist_offset, len_b));
+ BLI_rotatelist_first(lb_b, el_b);
}
}
@@ -343,7 +340,7 @@ static void bridge_loop_pair(BMesh *bm,
BMVert *v_arr[4] = {v_a, v_b, v_b_next, v_a_next};
if (BM_face_exists(v_arr, 4, &f) == false) {
/* copy if loop data if its is missing on one ring */
- f = BM_face_create_ngon_verts(bm, v_arr, 4, 0, false, true);
+ f = BM_face_create_verts(bm, v_arr, 4, NULL, BM_CREATE_NOP, true);
l_iter = BM_FACE_FIRST_LOOP(f);
if (l_b) BM_elem_attrs_copy(bm, bm, l_b, l_iter); l_iter = l_iter->next;
@@ -356,7 +353,7 @@ static void bridge_loop_pair(BMesh *bm,
BMVert *v_arr[3] = {v_a, v_b, v_a_next};
if (BM_face_exists(v_arr, 3, &f) == false) {
/* fan-fill a triangle */
- f = BM_face_create_ngon_verts(bm, v_arr, 3, 0, false, true);
+ f = BM_face_create_verts(bm, v_arr, 3, NULL, BM_CREATE_NOP, true);
l_iter = BM_FACE_FIRST_LOOP(f);
if (l_b) BM_elem_attrs_copy(bm, bm, l_b, l_iter); l_iter = l_iter->next;
@@ -422,8 +419,8 @@ static void bridge_loop_pair(BMesh *bm,
BMO_op_initf(bm, &op_sub, 0,
- "beautify_fill faces=%hf edges=ae use_restrict_tag=%b",
- BM_ELEM_TAG, true);
+ "beautify_fill faces=%hf edges=ae use_restrict_tag=%b method=%i",
+ BM_ELEM_TAG, true, 1);
if (use_edgeout) {
BMOIter siter;
diff --git a/source/blender/bmesh/operators/bmo_connect.c b/source/blender/bmesh/operators/bmo_connect.c
index c718cac4bd6..d0f64eb2892 100644
--- a/source/blender/bmesh/operators/bmo_connect.c
+++ b/source/blender/bmesh/operators/bmo_connect.c
@@ -26,11 +26,10 @@
* Connect verts across faces (splits faces).
*/
-#include "MEM_guardedalloc.h"
-
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BLI_alloca.h"
+#include "BLI_linklist_stack.h"
#include "bmesh.h"
@@ -117,10 +116,9 @@ void bmo_connect_verts_exec(BMesh *bm, BMOperator *op)
BMIter iter;
BMVert *v;
BMFace *f;
- BMFace **faces = MEM_mallocN(sizeof(BMFace *) * bm->totface, __func__);
- STACK_DECLARE(faces);
+ BLI_LINKSTACK_DECLARE(faces, BMFace *);
- STACK_INIT(faces);
+ BLI_LINKSTACK_INIT(faces);
/* add all faces connected to verts */
BMO_ITER (v, &siter, op->slots_in, "verts", BM_VERT) {
@@ -129,20 +127,20 @@ void bmo_connect_verts_exec(BMesh *bm, BMOperator *op)
if (!BMO_elem_flag_test(bm, f, FACE_TAG)) {
BMO_elem_flag_enable(bm, f, FACE_TAG);
if (f->len > 3) {
- STACK_PUSH(faces, f);
+ BLI_LINKSTACK_PUSH(faces, f);
}
}
}
}
/* connect faces */
- while ((f = STACK_POP(faces))) {
+ while ((f = BLI_LINKSTACK_POP(faces))) {
if (bm_face_connect_verts(bm, f) == -1) {
BMO_error_raise(bm, op, BMERR_CONNECTVERT_FAILED, NULL);
}
}
- MEM_freeN(faces);
+ BLI_LINKSTACK_FREE(faces);
BMO_slot_buffer_from_enabled_flag(bm, op, op->slots_out, "edges.out", BM_EDGE, EDGE_OUT);
}
diff --git a/source/blender/bmesh/operators/bmo_connect_nonplanar.c b/source/blender/bmesh/operators/bmo_connect_nonplanar.c
index 6d30b327a6c..bd7a625406c 100644
--- a/source/blender/bmesh/operators/bmo_connect_nonplanar.c
+++ b/source/blender/bmesh/operators/bmo_connect_nonplanar.c
@@ -26,11 +26,10 @@
* Connect verts non-planer faces iteratively (splits faces).
*/
-#include "MEM_guardedalloc.h"
-
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BLI_alloca.h"
+#include "BLI_linklist_stack.h"
#include "bmesh.h"
@@ -179,9 +178,7 @@ void bmo_connect_verts_nonplanar_exec(BMesh *bm, BMOperator *op)
BMOIter siter;
BMFace *f;
int totface = 0, totloop = 0;
- int tottris;
- BMFace **fstack;
- STACK_DECLARE(fstack);
+ BLI_LINKSTACK_DECLARE(fstack, BMFace *);
const float angle_limit = BMO_slot_float_get(op->slots_in, "angle_limit");
@@ -197,32 +194,28 @@ void bmo_connect_verts_nonplanar_exec(BMesh *bm, BMOperator *op)
return;
}
- /* over alloc, if we split every face */
- tottris = poly_to_tri_count(totface, totloop);
- fstack = MEM_mallocN(sizeof(BMFace *) * tottris, __func__);
-
- STACK_INIT(fstack);
+ BLI_LINKSTACK_INIT(fstack);
BMO_ITER (f, &siter, op->slots_in, "faces", BM_FACE) {
if (f->len > 3) {
- STACK_PUSH(fstack, f);
+ BLI_LINKSTACK_PUSH(fstack, f);
}
}
- while ((f = STACK_POP(fstack))) {
+ while ((f = BLI_LINKSTACK_POP(fstack))) {
BMFace *f_pair[2];
if (bm_face_split_by_angle(bm, f, f_pair, angle_limit)) {
int j;
for (j = 0; j < 2; j++) {
BM_face_normal_update(f_pair[j]);
if (f_pair[j]->len > 3) {
- STACK_PUSH(fstack, f_pair[j]);
+ BLI_LINKSTACK_PUSH(fstack, f_pair[j]);
}
}
}
}
- MEM_freeN(fstack);
+ BLI_LINKSTACK_FREE(fstack);
BMO_slot_buffer_from_enabled_flag(bm, op, op->slots_out, "edges.out", BM_EDGE, EDGE_OUT);
BMO_slot_buffer_from_enabled_flag(bm, op, op->slots_out, "faces.out", BM_FACE, FACE_OUT);
diff --git a/source/blender/bmesh/operators/bmo_create.c b/source/blender/bmesh/operators/bmo_create.c
index 64d0ec6ac27..dd814fa8bfb 100644
--- a/source/blender/bmesh/operators/bmo_create.c
+++ b/source/blender/bmesh/operators/bmo_create.c
@@ -145,6 +145,7 @@ void bmo_contextual_create_exec(BMesh *bm, BMOperator *op)
/* EdgeNet Create */
if (tote != 0) {
/* call edgenet prepare op so additional face creation cases work */
+
BMOperator op_sub;
BMO_op_initf(bm, &op_sub, op->flag, "edgenet_prepare edges=%fe", ELE_NEW);
BMO_op_exec(bm, &op_sub);
@@ -152,8 +153,8 @@ void bmo_contextual_create_exec(BMesh *bm, BMOperator *op)
BMO_op_finish(bm, &op_sub);
BMO_op_initf(bm, &op_sub, op->flag,
- "edgenet_fill edges=%fe use_fill_check=%b mat_nr=%i use_smooth=%b",
- ELE_NEW, true, mat_nr, use_smooth);
+ "edgenet_fill edges=%fe mat_nr=%i use_smooth=%b sides=%i",
+ ELE_NEW, mat_nr, use_smooth, 10000);
BMO_op_exec(bm, &op_sub);
@@ -181,7 +182,7 @@ void bmo_contextual_create_exec(BMesh *bm, BMOperator *op)
/* if we dissolved anything, then return */
if (BMO_slot_buffer_count(op_sub.slots_out, "region.out")) {
BMO_slot_copy(&op_sub, slots_out, "region.out",
- op, slots_out, "faces.out");
+ op, slots_out, "faces.out");
BMO_op_finish(bm, &op_sub);
return;
}
@@ -282,7 +283,7 @@ void bmo_contextual_create_exec(BMesh *bm, BMOperator *op)
BMFace *f;
BMO_iter_as_array(op->slots_in, "geom", BM_VERT, (void **)vert_arr, totv);
- f = BM_face_create_ngon_vcloud(bm, vert_arr, totv, BM_CREATE_NO_DOUBLE);
+ f = BM_face_create_ngon_vcloud(bm, vert_arr, totv, NULL, BM_CREATE_NO_DOUBLE);
if (f) {
BMO_elem_flag_enable(bm, f, ELE_OUT);
diff --git a/source/blender/bmesh/operators/bmo_dissolve.c b/source/blender/bmesh/operators/bmo_dissolve.c
index d633182de42..cf36e88ea98 100644
--- a/source/blender/bmesh/operators/bmo_dissolve.c
+++ b/source/blender/bmesh/operators/bmo_dissolve.c
@@ -32,17 +32,26 @@
#include "BLI_math.h"
#include "bmesh.h"
+#include "bmesh_tools.h"
+
#include "intern/bmesh_operators_private.h"
+/* ***_ISGC: mark for garbage-collection */
+
#define FACE_MARK 1
#define FACE_ORIG 2
#define FACE_NEW 4
+
#define EDGE_MARK 1
#define EDGE_TAG 2
+#define EDGE_ISGC 8
#define VERT_MARK 1
#define VERT_TAG 2
+#define VERT_ISGC 8
+
+
static bool UNUSED_FUNCTION(check_hole_in_region) (BMesh *bm, BMFace *f)
{
@@ -230,14 +239,12 @@ cleanup:
void bmo_dissolve_edges_exec(BMesh *bm, BMOperator *op)
{
- /* might want to make this an option or mode - campbell */
-
/* BMOperator fop; */
BMFace *act_face = bm->act_face;
BMOIter eiter;
- BMEdge *e;
- BMIter viter;
- BMVert *v;
+ BMIter iter;
+ BMEdge *e, *e_next;
+ BMVert *v, *v_next;
const bool use_verts = BMO_slot_bool_get(op->slots_in, "use_verts");
const bool use_face_split = BMO_slot_bool_get(op->slots_in, "use_face_split");
@@ -245,10 +252,10 @@ void bmo_dissolve_edges_exec(BMesh *bm, BMOperator *op)
if (use_face_split) {
BMO_slot_buffer_flag_enable(bm, op->slots_in, "edges", BM_EDGE, EDGE_TAG);
- BM_ITER_MESH (v, &viter, bm, BM_VERTS_OF_MESH) {
- BMIter iter;
+ BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) {
+ BMIter itersub;
int untag_count = 0;
- BM_ITER_ELEM(e, &iter, v, BM_EDGES_OF_VERT) {
+ BM_ITER_ELEM (e, &itersub, v, BM_EDGES_OF_VERT) {
if (!BMO_elem_flag_test(bm, e, EDGE_TAG)) {
untag_count++;
}
@@ -264,22 +271,34 @@ void bmo_dissolve_edges_exec(BMesh *bm, BMOperator *op)
}
if (use_verts) {
- BM_ITER_MESH (v, &viter, bm, BM_VERTS_OF_MESH) {
+ BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) {
BMO_elem_flag_set(bm, v, VERT_MARK, (BM_vert_edge_count(v) != 2));
}
}
+ /* tag all verts/edges connected to faces */
BMO_ITER (e, &eiter, op->slots_in, "edges", BM_EDGE) {
- BMFace *fa, *fb;
+ BMFace *f_pair[2];
+ if (BM_edge_face_pair(e, &f_pair[0], &f_pair[1])) {
+ unsigned int j;
+ for (j = 0; j < 2; j++) {
+ BMLoop *l_first, *l_iter;
+ l_iter = l_first = BM_FACE_FIRST_LOOP(f_pair[j]);
+ do {
+ BMO_elem_flag_enable(bm, l_iter->v, VERT_ISGC);
+ BMO_elem_flag_enable(bm, l_iter->e, EDGE_ISGC);
+ } while ((l_iter = l_iter->next) != l_first);
+ }
+ }
+ }
+ BMO_ITER (e, &eiter, op->slots_in, "edges", BM_EDGE) {
+ BMFace *fa, *fb;
if (BM_edge_face_pair(e, &fa, &fb)) {
BMFace *f_new;
/* join faces */
-
- /* BMESH_TODO - check on delaying edge removal since we may end up removing more than
- * one edge, and later reference a removed edge */
- f_new = BM_faces_join_pair(bm, fa, fb, e, true);
+ f_new = BM_faces_join_pair(bm, fa, fb, e, false);
if (f_new) {
/* maintain active face */
@@ -290,8 +309,23 @@ void bmo_dissolve_edges_exec(BMesh *bm, BMOperator *op)
}
}
+ /* Cleanup geometry (#BM_faces_join_pair, but it removes geometry we're looping on)
+ * so do this in a separate pass instead. */
+ BM_ITER_MESH_MUTABLE (e, e_next, &iter, bm, BM_EDGES_OF_MESH) {
+ if ((e->l == NULL) && BMO_elem_flag_test(bm, e, EDGE_ISGC)) {
+ BM_edge_kill(bm, e);
+ }
+ }
+ BM_ITER_MESH_MUTABLE (v, v_next, &iter, bm, BM_VERTS_OF_MESH) {
+ if ((v->e == NULL) && BMO_elem_flag_test(bm, v, VERT_ISGC)) {
+ BM_vert_kill(bm, v);
+ }
+ }
+ /* done with cleanup */
+
+
if (use_verts) {
- BM_ITER_MESH (v, &viter, bm, BM_VERTS_OF_MESH) {
+ BM_ITER_MESH_MUTABLE (v, v_next, &iter, bm, BM_VERTS_OF_MESH) {
if (BMO_elem_flag_test(bm, v, VERT_MARK)) {
if (BM_vert_edge_count(v) == 2) {
BM_vert_collapse_edge(bm, v->e, v, true);
@@ -310,21 +344,21 @@ static bool test_extra_verts(BMesh *bm, BMVert *v)
/* test faces around verts for verts that would be wrongly killed
* by dissolve faces. */
- BM_ITER_ELEM(f, &fiter, v, BM_FACES_OF_VERT) {
- BM_ITER_ELEM(l, &liter, f, BM_LOOPS_OF_FACE) {
+ BM_ITER_ELEM (f, &fiter, v, BM_FACES_OF_VERT) {
+ BM_ITER_ELEM (l, &liter, f, BM_LOOPS_OF_FACE) {
if (!BMO_elem_flag_test(bm, l->v, VERT_MARK)) {
/* if an edge around a vert is a boundary edge,
* then dissolve faces won't destroy it.
* also if it forms a boundary with one
* of the face region */
bool found = false;
- BM_ITER_ELEM(e, &eiter, l->v, BM_EDGES_OF_VERT) {
+ BM_ITER_ELEM (e, &eiter, l->v, BM_EDGES_OF_VERT) {
BMFace *f_iter;
if (BM_edge_is_boundary(e)) {
found = true;
}
else {
- BM_ITER_ELEM(f_iter, &fiter_sub, e, BM_FACES_OF_EDGE) {
+ BM_ITER_ELEM (f_iter, &fiter_sub, e, BM_FACES_OF_EDGE) {
if (!BMO_elem_flag_test(bm, f_iter, FACE_MARK)) {
found = true;
break;
@@ -347,7 +381,7 @@ static bool test_extra_verts(BMesh *bm, BMVert *v)
void bmo_dissolve_verts_exec(BMesh *bm, BMOperator *op)
{
BMIter iter, fiter;
- BMVert *v;
+ BMVert *v, *v_next;
BMFace *f;
const bool use_face_split = BMO_slot_bool_get(op->slots_in, "use_face_split");
@@ -359,7 +393,7 @@ void bmo_dissolve_verts_exec(BMesh *bm, BMOperator *op)
bm_face_split(bm, VERT_MARK);
}
- BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) {
+ BM_ITER_MESH_MUTABLE (v, v_next, &iter, bm, BM_VERTS_OF_MESH) {
if (BMO_elem_flag_test(bm, v, VERT_MARK)) {
/* check if it's a two-valence ver */
if (BM_vert_edge_count(v) == 2) {
@@ -407,7 +441,7 @@ void bmo_dissolve_verts_exec(BMesh *bm, BMOperator *op)
}
/* clean up any remainin */
- BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) {
+ BM_ITER_MESH_MUTABLE (v, v_next, &iter, bm, BM_VERTS_OF_MESH) {
if (BMO_elem_flag_test(bm, v, VERT_MARK)) {
if (!BM_vert_dissolve(bm, v)) {
BMO_error_raise(bm, op, BMERR_DISSOLVEVERTS_FAILED, NULL);
diff --git a/source/blender/bmesh/operators/bmo_dupe.c b/source/blender/bmesh/operators/bmo_dupe.c
index 1dc7b0a414d..a5c34f7623b 100644
--- a/source/blender/bmesh/operators/bmo_dupe.c
+++ b/source/blender/bmesh/operators/bmo_dupe.c
@@ -26,8 +26,6 @@
* Duplicate, Split, Split operators.
*/
-#include "MEM_guardedalloc.h"
-
#include "BLI_math.h"
#include "BLI_alloca.h"
@@ -46,23 +44,27 @@
*
* Copy an existing vertex from one bmesh to another.
*/
-static BMVert *copy_vertex(BMesh *source_mesh, BMVert *source_vertex, BMesh *target_mesh, GHash *vhash)
+static BMVert *bmo_vert_copy(BMOperator *op,
+ BMOpSlot *slot_vertmap_out,
+ BMesh *bm_dst, BMesh *bm_src, BMVert *v_src, GHash *vhash)
{
- BMVert *target_vertex = NULL;
+ BMVert *v_dst;
/* Create a new vertex */
- target_vertex = BM_vert_create(target_mesh, source_vertex->co, NULL, BM_CREATE_SKIP_CD);
-
+ v_dst = BM_vert_create(bm_dst, v_src->co, NULL, BM_CREATE_SKIP_CD);
+ BMO_slot_map_elem_insert(op, slot_vertmap_out, v_src, v_dst);
+ BMO_slot_map_elem_insert(op, slot_vertmap_out, v_dst, v_src);
+
/* Insert new vertex into the vert hash */
- BLI_ghash_insert(vhash, source_vertex, target_vertex);
-
+ BLI_ghash_insert(vhash, v_src, v_dst);
+
/* Copy attributes */
- BM_elem_attrs_copy(source_mesh, target_mesh, source_vertex, target_vertex);
-
- /* Set internal op flags */
- BMO_elem_flag_enable(target_mesh, target_vertex, DUPE_NEW);
+ BM_elem_attrs_copy(bm_src, bm_dst, v_src, v_dst);
+
+ /* Mark the vert for output */
+ BMO_elem_flag_enable(bm_dst, v_dst, DUPE_NEW);
- return target_vertex;
+ return v_dst;
}
/**
@@ -70,55 +72,58 @@ static BMVert *copy_vertex(BMesh *source_mesh, BMVert *source_vertex, BMesh *tar
*
* Copy an existing edge from one bmesh to another.
*/
-static BMEdge *copy_edge(BMOperator *op,
- BMOpSlot *slot_boundarymap_out,
- BMesh *source_mesh,
- BMEdge *source_edge, BMesh *target_mesh,
- GHash *vhash, GHash *ehash)
+static BMEdge *bmo_edge_copy(BMOperator *op,
+ BMOpSlot *slot_edgemap_out,
+ BMOpSlot *slot_boundarymap_out,
+ BMesh *bm_dst, BMesh *bm_src,
+ BMEdge *e_src,
+ GHash *vhash, GHash *ehash)
{
- BMEdge *target_edge = NULL;
- BMVert *target_vert1, *target_vert2;
- BMFace *face;
- BMIter fiter;
- int rlen;
+ BMEdge *e_dst;
+ BMVert *e_dst_v1, *e_dst_v2;
+ unsigned int rlen;
/* see if any of the neighboring faces are
* not being duplicated. in that case,
* add it to the new/old map. */
+ /* lookup edge */
rlen = 0;
- for (face = BM_iter_new(&fiter, source_mesh, BM_FACES_OF_EDGE, source_edge);
- face;
- face = BM_iter_step(&fiter))
- {
- if (BMO_elem_flag_test(source_mesh, face, DUPE_INPUT)) {
- rlen++;
- }
+ if (e_src->l) {
+ BMLoop *l_iter_src, *l_first_src;
+ l_iter_src = l_first_src = e_src->l;
+ do {
+ if (BMO_elem_flag_test(bm_src, l_iter_src->f, DUPE_INPUT)) {
+ rlen++;
+ }
+ } while ((l_iter_src = l_iter_src->radial_next) != l_first_src);
}
/* Lookup v1 and v2 */
- target_vert1 = BLI_ghash_lookup(vhash, source_edge->v1);
- target_vert2 = BLI_ghash_lookup(vhash, source_edge->v2);
+ e_dst_v1 = BLI_ghash_lookup(vhash, e_src->v1);
+ e_dst_v2 = BLI_ghash_lookup(vhash, e_src->v2);
/* Create a new edge */
- target_edge = BM_edge_create(target_mesh, target_vert1, target_vert2, NULL, BM_CREATE_SKIP_CD);
-
+ e_dst = BM_edge_create(bm_dst, e_dst_v1, e_dst_v2, NULL, BM_CREATE_SKIP_CD);
+ BMO_slot_map_elem_insert(op, slot_edgemap_out, e_src, e_dst);
+ BMO_slot_map_elem_insert(op, slot_edgemap_out, e_dst, e_src);
+
/* add to new/old edge map if necassary */
if (rlen < 2) {
/* not sure what non-manifold cases of greater then three
* radial should do. */
- BMO_slot_map_elem_insert(op, slot_boundarymap_out, source_edge, target_edge);
+ BMO_slot_map_elem_insert(op, slot_boundarymap_out, e_src, e_dst);
}
/* Insert new edge into the edge hash */
- BLI_ghash_insert(ehash, source_edge, target_edge);
-
+ BLI_ghash_insert(ehash, e_src, e_dst);
+
/* Copy attributes */
- BM_elem_attrs_copy(source_mesh, target_mesh, source_edge, target_edge);
-
- /* Set internal op flags */
- BMO_elem_flag_enable(target_mesh, target_edge, DUPE_NEW);
+ BM_elem_attrs_copy(bm_src, bm_dst, e_src, e_dst);
+
+ /* Mark the edge for output */
+ BMO_elem_flag_enable(bm_dst, e_dst, DUPE_NEW);
- return target_edge;
+ return e_dst;
}
/**
@@ -126,56 +131,49 @@ static BMEdge *copy_edge(BMOperator *op,
*
* Copy an existing face from one bmesh to another.
*/
-static BMFace *copy_face(BMOperator *op,
- BMOpSlot *slot_facemap_out,
- BMesh *source_mesh,
- BMFace *source_face, BMesh *target_mesh,
- GHash *vhash, GHash *ehash)
+static BMFace *bmo_face_copy(BMOperator *op,
+ BMOpSlot *slot_facemap_out,
+ BMesh *bm_dst, BMesh *bm_src,
+ BMFace *f_src,
+ GHash *vhash, GHash *ehash)
{
- /* BMVert *target_vert1, *target_vert2; */ /* UNUSED */
- BMVert **vtar = BLI_array_alloca(vtar, source_face->len);
- BMEdge **edar = BLI_array_alloca(edar, source_face->len);
- BMLoop *source_loop, *target_loop;
- BMFace *target_face = NULL;
- BMIter iter, iter2;
+ BMFace *f_dst;
+ BMVert **vtar = BLI_array_alloca(vtar, f_src->len);
+ BMEdge **edar = BLI_array_alloca(edar, f_src->len);
+ BMLoop *l_iter_src, *l_iter_dst, *l_first_src;
int i;
-
- /* lookup the first and second vert */
-#if 0 /* UNUSED */
- target_vert1 = BLI_ghash_lookup(vhash, BM_iter_new(&iter, source_mesh, BM_VERTS_OF_FACE, source_face));
- target_vert2 = BLI_ghash_lookup(vhash, BM_iter_step(&iter));
-#else
- BM_iter_new(&iter, source_mesh, BM_VERTS_OF_FACE, source_face);
- BM_iter_step(&iter);
-#endif
+
+ l_first_src = BM_FACE_FIRST_LOOP(f_src);
/* lookup edge */
- BM_ITER_ELEM_INDEX (source_loop, &iter, source_face, BM_LOOPS_OF_FACE, i) {
- vtar[i] = BLI_ghash_lookup(vhash, source_loop->v);
- edar[i] = BLI_ghash_lookup(ehash, source_loop->e);
- }
+ l_iter_src = l_first_src;
+ i = 0;
+ do {
+ vtar[i] = BLI_ghash_lookup(vhash, l_iter_src->v);
+ edar[i] = BLI_ghash_lookup(ehash, l_iter_src->e);
+ i++;
+ } while ((l_iter_src = l_iter_src->next) != l_first_src);
/* create new face */
- target_face = BM_face_create(target_mesh, vtar, edar, source_face->len, BM_CREATE_SKIP_CD);
- BMO_slot_map_elem_insert(op, slot_facemap_out, source_face, target_face);
- BMO_slot_map_elem_insert(op, slot_facemap_out, target_face, source_face);
+ f_dst = BM_face_create(bm_dst, vtar, edar, f_src->len, NULL, BM_CREATE_SKIP_CD);
+ BMO_slot_map_elem_insert(op, slot_facemap_out, f_src, f_dst);
+ BMO_slot_map_elem_insert(op, slot_facemap_out, f_dst, f_src);
- BM_elem_attrs_copy(source_mesh, target_mesh, source_face, target_face);
-
- /* mark the face for output */
- BMO_elem_flag_enable(target_mesh, target_face, DUPE_NEW);
+ /* Copy attributes */
+ BM_elem_attrs_copy(bm_src, bm_dst, f_src, f_dst);
/* copy per-loop custom data */
- BM_ITER_ELEM (source_loop, &iter, source_face, BM_LOOPS_OF_FACE) {
- BM_ITER_ELEM (target_loop, &iter2, target_face, BM_LOOPS_OF_FACE) {
- if (BLI_ghash_lookup(vhash, source_loop->v) == target_loop->v) {
- BM_elem_attrs_copy(source_mesh, target_mesh, source_loop, target_loop);
- break;
- }
- }
- }
+ l_iter_src = l_first_src;
+ l_iter_dst = BM_FACE_FIRST_LOOP(f_dst);
+ do {
+ BM_elem_attrs_copy(bm_src, bm_dst, l_iter_src, l_iter_dst);
+ } while ((l_iter_dst = l_iter_dst->next),
+ (l_iter_src = l_iter_src->next) != l_first_src);
+
+ /* Mark the face for output */
+ BMO_elem_flag_enable(bm_dst, f_dst, DUPE_NEW);
- return target_face;
+ return f_dst;
}
/**
@@ -183,7 +181,7 @@ static BMFace *copy_face(BMOperator *op,
*
* Internal Copy function.
*/
-static void bmo_mesh_copy(BMOperator *op, BMesh *bm_src, BMesh *bm_dst)
+static void bmo_mesh_copy(BMOperator *op, BMesh *bm_dst, BMesh *bm_src)
{
BMVert *v = NULL, *v2;
@@ -194,9 +192,12 @@ static void bmo_mesh_copy(BMOperator *op, BMesh *bm_src, BMesh *bm_dst)
GHash *vhash, *ehash;
BMOpSlot *slot_boundary_map_out = BMO_slot_get(op->slots_out, "boundary_map.out");
- BMOpSlot *slot_face_map_out = BMO_slot_get(op->slots_out, "face_map.out");
BMOpSlot *slot_isovert_map_out = BMO_slot_get(op->slots_out, "isovert_map.out");
+ BMOpSlot *slot_vert_map_out = BMO_slot_get(op->slots_out, "vert_map.out");
+ BMOpSlot *slot_edge_map_out = BMO_slot_get(op->slots_out, "edge_map.out");
+ BMOpSlot *slot_face_map_out = BMO_slot_get(op->slots_out, "face_map.out");
+
/* initialize pointer hashes */
vhash = BLI_ghash_ptr_new("bmesh dupeops v");
ehash = BLI_ghash_ptr_new("bmesh dupeops e");
@@ -209,7 +210,7 @@ static void bmo_mesh_copy(BMOperator *op, BMesh *bm_src, BMesh *bm_dst)
BMIter iter;
bool isolated = true;
- v2 = copy_vertex(bm_src, v, bm_dst, vhash);
+ v2 = bmo_vert_copy(op, slot_vert_map_out, bm_dst, bm_src, v, vhash);
BM_ITER_ELEM (f, &iter, v, BM_FACES_OF_VERT) {
if (BMO_elem_flag_test(bm_src, f, DUPE_INPUT)) {
@@ -242,15 +243,16 @@ static void bmo_mesh_copy(BMOperator *op, BMesh *bm_src, BMesh *bm_dst)
{
/* make sure that verts are copied */
if (!BMO_elem_flag_test(bm_src, e->v1, DUPE_DONE)) {
- copy_vertex(bm_src, e->v1, bm_dst, vhash);
+ bmo_vert_copy(op, slot_vert_map_out, bm_dst, bm_src, e->v1, vhash);
BMO_elem_flag_enable(bm_src, e->v1, DUPE_DONE);
}
if (!BMO_elem_flag_test(bm_src, e->v2, DUPE_DONE)) {
- copy_vertex(bm_src, e->v2, bm_dst, vhash);
+ bmo_vert_copy(op, slot_vert_map_out, bm_dst, bm_src, e->v2, vhash);
BMO_elem_flag_enable(bm_src, e->v2, DUPE_DONE);
}
/* now copy the actual edge */
- copy_edge(op, slot_boundary_map_out, bm_src, e, bm_dst, vhash, ehash);
+ bmo_edge_copy(op, slot_edge_map_out, slot_boundary_map_out,
+ bm_dst, bm_src, e, vhash, ehash);
BMO_elem_flag_enable(bm_src, e, DUPE_DONE);
}
}
@@ -261,7 +263,7 @@ static void bmo_mesh_copy(BMOperator *op, BMesh *bm_src, BMesh *bm_dst)
/* vertex pass */
BM_ITER_ELEM (v, &viter, f, BM_VERTS_OF_FACE) {
if (!BMO_elem_flag_test(bm_src, v, DUPE_DONE)) {
- copy_vertex(bm_src, v, bm_dst, vhash);
+ bmo_vert_copy(op, slot_vert_map_out, bm_dst, bm_src, v, vhash);
BMO_elem_flag_enable(bm_src, v, DUPE_DONE);
}
}
@@ -269,12 +271,13 @@ static void bmo_mesh_copy(BMOperator *op, BMesh *bm_src, BMesh *bm_dst)
/* edge pass */
BM_ITER_ELEM (e, &eiter, f, BM_EDGES_OF_FACE) {
if (!BMO_elem_flag_test(bm_src, e, DUPE_DONE)) {
- copy_edge(op, slot_boundary_map_out, bm_src, e, bm_dst, vhash, ehash);
+ bmo_edge_copy(op, slot_edge_map_out, slot_boundary_map_out,
+ bm_dst, bm_src, e, vhash, ehash);
BMO_elem_flag_enable(bm_src, e, DUPE_DONE);
}
}
- copy_face(op, slot_face_map_out, bm_src, f, bm_dst, vhash, ehash);
+ bmo_face_copy(op, slot_face_map_out, bm_dst, bm_src, f, vhash, ehash);
BMO_elem_flag_enable(bm_src, f, DUPE_DONE);
}
}
@@ -307,16 +310,16 @@ static void bmo_mesh_copy(BMOperator *op, BMesh *bm_src, BMesh *bm_dst)
void bmo_duplicate_exec(BMesh *bm, BMOperator *op)
{
BMOperator *dupeop = op;
- BMesh *bm2 = BMO_slot_ptr_get(op->slots_in, "dest");
+ BMesh *bm_dst = BMO_slot_ptr_get(op->slots_in, "dest");
- if (!bm2)
- bm2 = bm;
+ if (!bm_dst)
+ bm_dst = bm;
/* flag input */
BMO_slot_buffer_flag_enable(bm, dupeop->slots_in, "geom", BM_ALL_NOLOOP, DUPE_INPUT);
/* use the internal copy function */
- bmo_mesh_copy(dupeop, bm, bm2);
+ bmo_mesh_copy(dupeop, bm_dst, bm);
/* Output */
/* First copy the input buffers to output buffers - original data */
@@ -466,13 +469,14 @@ void bmo_spin_exec(BMesh *bm, BMOperator *op)
float axis[3];
float rmat[3][3];
float phi;
- int steps, do_dupli, a, usedvec;
+ int steps, do_dupli, a;
+ bool use_dvec;
BMO_slot_vec_get(op->slots_in, "cent", cent);
BMO_slot_vec_get(op->slots_in, "axis", axis);
normalize_v3(axis);
BMO_slot_vec_get(op->slots_in, "dvec", dvec);
- usedvec = !is_zero_v3(dvec);
+ use_dvec = !is_zero_v3(dvec);
steps = BMO_slot_int_get(op->slots_in, "steps");
phi = BMO_slot_float_get(op->slots_in, "angle") / steps;
do_dupli = BMO_slot_bool_get(op->slots_in, "use_duplicate");
@@ -504,7 +508,7 @@ void bmo_spin_exec(BMesh *bm, BMOperator *op)
BMO_op_finish(bm, &extop);
}
- if (usedvec) {
+ if (use_dvec) {
mul_m3_v3(rmat, dvec);
BMO_op_callf(bm, op->flag,
"translate vec=%v space=%s verts=%S",
diff --git a/source/blender/bmesh/operators/bmo_edgenet.c b/source/blender/bmesh/operators/bmo_edgenet.c
index 923b877b822..de41bc7937d 100644
--- a/source/blender/bmesh/operators/bmo_edgenet.c
+++ b/source/blender/bmesh/operators/bmo_edgenet.c
@@ -28,1037 +28,62 @@
#include "MEM_guardedalloc.h"
-#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLI_array.h"
-#include "BLI_alloca.h"
-#include "BLI_smallhash.h"
-#include "BLI_rand.h"
-#include "BLI_heap.h"
#include "bmesh.h"
+#include "bmesh_tools.h"
#include "intern/bmesh_operators_private.h" /* own include */
#define EDGE_MARK 1
#define EDGE_VIS 2
-#define FACE_NEW 1
-
#define ELE_NEW 1
-#define ELE_ORIG 4
-
-#define FACE_IGNORE 16
-
-typedef struct EPathNode {
- struct EPathNode *next, *prev;
- BMVert *v;
- BMEdge *e;
- BMEdge *cure;
-} EPathNode;
-
-typedef struct EPath {
- ListBase nodes;
- float weight;
- int group;
-} EPath;
-
-typedef struct PathBase {
- BLI_mempool *nodepool, *pathpool;
-} PathBase;
-
-typedef struct EdgeData {
- int tag;
- int ftag;
- BMDiskLink v1_disk_link, v2_disk_link;
-} EdgeData;
-
-typedef struct VertData {
- BMEdge *e;
- float no[3], offco[3], sco[3]; /* offco is vertex coordinate slightly offset randomly */
- int tag;
-} VertData;
-
-static int count_edge_faces(BMesh *bm, BMEdge *e);
-
-/**** rotation system code * */
-
-BLI_INLINE BMDiskLink *rs_edge_link_get(BMEdge *e, BMVert *v, EdgeData *e_data)
-{
- return v == ((BMEdge *)e)->v1 ? &(((EdgeData *)e_data)->v1_disk_link) :
- &(((EdgeData *)e_data)->v2_disk_link);
-}
-
-static bool rotsys_append_edge(BMEdge *e, BMVert *v,
- EdgeData *edata, VertData *vdata)
-{
- EdgeData *ed = &edata[BM_elem_index_get(e)];
- VertData *vd = &vdata[BM_elem_index_get(v)];
-
- if (!vd->e) {
- Link *e1 = (Link *)rs_edge_link_get(e, v, ed);
-
- vd->e = e;
- e1->next = e1->prev = (Link *)e;
- }
- else {
- BMDiskLink *dl1, *dl2, *dl3;
- EdgeData *ved = &edata[BM_elem_index_get(vd->e)];
-
- dl1 = rs_edge_link_get(e, v, ed);
- dl2 = rs_edge_link_get(vd->e, v, ved);
- dl3 = dl2->prev ? rs_edge_link_get(dl2->prev, v, &edata[BM_elem_index_get(dl2->prev)]) : NULL;
-
- dl1->next = vd->e;
- dl1->prev = dl2->prev;
-
- dl2->prev = e;
- if (dl3) {
- dl3->next = e;
- }
- }
-
- return true;
-}
-
-static void UNUSED_FUNCTION(rotsys_remove_edge)(BMEdge *e, BMVert *v,
- EdgeData *edata, VertData *vdata)
-{
- EdgeData *ed = edata + BM_elem_index_get(e);
- VertData *vd = vdata + BM_elem_index_get(v);
- BMDiskLink *e1, *e2;
-
- e1 = rs_edge_link_get(e, v, ed);
- if (e1->prev) {
- e2 = rs_edge_link_get(e1->prev, v, ed);
- e2->next = e1->next;
- }
-
- if (e1->next) {
- e2 = rs_edge_link_get(e1->next, v, ed);
- e2->prev = e1->prev;
- }
-
- if (vd->e == e)
- vd->e = (e != e1->next) ? e1->next : NULL;
-
- e1->next = e1->prev = NULL;
-}
-
-static BMEdge *rotsys_nextedge(BMEdge *e, BMVert *v,
- EdgeData *edata, VertData *UNUSED(vdata))
-{
- if (v == e->v1)
- return edata[BM_elem_index_get(e)].v1_disk_link.next;
- if (v == e->v2)
- return edata[BM_elem_index_get(e)].v2_disk_link.next;
- return NULL;
-}
-
-static BMEdge *rotsys_prevedge(BMEdge *e, BMVert *v,
- EdgeData *edata, VertData *UNUSED(vdata))
-{
- if (v == e->v1)
- return edata[BM_elem_index_get(e)].v1_disk_link.prev;
- if (v == e->v2)
- return edata[BM_elem_index_get(e)].v2_disk_link.prev;
- return NULL;
-}
-
-static void rotsys_reverse(BMEdge *UNUSED(e), BMVert *v, EdgeData *edata, VertData *vdata)
-{
- BMEdge **edges = NULL;
- BMEdge *e_first;
- BMEdge *e;
- BLI_array_staticdeclare(edges, BM_DEFAULT_NGON_STACK_SIZE);
- int i, totedge;
-
- e = e_first = vdata[BM_elem_index_get(v)].e;
- do {
- BLI_array_append(edges, e);
- e = rotsys_nextedge(e, v, edata, vdata);
- } while (e != e_first);
-
- totedge = BLI_array_count(edges);
- for (i = 0; i < totedge / 2; i++) {
- SWAP(BMEdge *, edges[i], edges[totedge - 1 - i]);
- }
-
- vdata[BM_elem_index_get(v)].e = NULL;
- for (i = 0; i < totedge; i++) {
- rotsys_append_edge(edges[i], v, edata, vdata);
- }
-
- BLI_array_free(edges);
-}
-
-static int UNUSED_FUNCTION(rotsys_count)(BMVert *v, EdgeData *edata, VertData *vdata)
-{
- BMEdge *e = vdata[BM_elem_index_get(v)].e;
- int i = 0;
-
- if (!e)
- return 0;
-
- do {
- if (!e)
- return 0;
- e = rotsys_nextedge(e, v, edata, vdata);
-
- if (i >= (1 << 20)) {
- printf("bmesh error: infinite loop in disk cycle!\n");
- return 0;
- }
-
- i += 1;
- } while (e != vdata[BM_elem_index_get(v)].e);
-
- return i;
-}
-
-static int UNUSED_FUNCTION(rotsys_fill_faces)(BMesh *bm, EdgeData *edata, VertData *vdata)
-{
- BMIter iter;
- BMEdge *e, **edges = NULL;
- BLI_array_declare(edges);
- BMVert *v, **verts = NULL;
- BMFace *f;
- BLI_array_declare(verts);
- SmallHash visithash, *hash = &visithash;
- int i;
-
- BM_ITER_MESH (e, &iter, bm, BM_EDGES_OF_MESH) {
- BMEdge *e2, *starte;
- BMVert *startv;
- int rad, ok;
-
- rad = count_edge_faces(bm, e);
-
- if (rad < 2) {
- starte = e;
- }
- else {
- continue;
- }
-
- /* do two passes, going forward then backward */
- for (i = 0; i < 2; i++) {
- BLI_smallhash_init(hash);
-
- BLI_array_empty(verts);
- BLI_array_empty(edges);
-
- startv = v = starte->v1;
- e2 = starte;
- ok = 1;
- if (!v || !e2)
- continue;
-
- do {
- if (BLI_smallhash_haskey(hash, (uintptr_t)e2) ||
- BLI_smallhash_haskey(hash, (uintptr_t)v))
- {
- ok = 0;
- break;
- }
-
- BLI_array_append(verts, v);
- BLI_array_append(edges, e2);
-
- BLI_smallhash_insert(hash, (uintptr_t)e2, NULL);
-
- v = BM_edge_other_vert(e2, v);
- e2 = i ? rotsys_prevedge(e2, v, edata, vdata) : rotsys_nextedge(e2, v, edata, vdata);
- } while (e2 != starte && v != startv);
-
- BLI_smallhash_release(hash);
-
- if (!ok || BLI_array_count(edges) < 3)
- continue;
-
- f = BM_face_create_ngon(bm, verts[0], verts[1], edges, BLI_array_count(edges), BM_CREATE_NO_DOUBLE);
- if (UNLIKELY(f == NULL)) {
- continue;
- }
- }
- }
-
- return 0;
-}
-
-static void rotsys_make_consistent(BMesh *bm, EdgeData *edata, VertData *vdata)
-{
- BMIter iter;
- BMEdge *e;
- BMVert *v, **stack = NULL;
- BLI_array_declare(stack);
- int i;
-
- for (i = 0; i < bm->totvert; i++) {
- vdata[i].tag = 0;
- }
-
- while (1) {
- VertData *vd;
- BMVert *startv = NULL;
- float dis;
-
- BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) {
- vd = vdata + BM_elem_index_get(v);
-
- if (vd->tag)
- continue;
-
- if (!startv || dot_v3v3(vd->offco, vd->offco) > dis) {
- dis = dot_v3v3(vd->offco, vd->offco);
- startv = v;
- }
- }
-
- if (!startv)
- break;
-
- vd = vdata + BM_elem_index_get(startv);
-
- BLI_array_empty(stack);
- BLI_array_append(stack, startv);
-
- vd->tag = 1;
-
- while (BLI_array_count(stack)) {
- v = BLI_array_pop(stack);
- vd = vdata + BM_elem_index_get(v);
-
- if (!vd->e)
- continue;
-
- e = vd->e;
- do {
- BMVert *v2 = BM_edge_other_vert(e, v);
- VertData *vd2 = vdata + BM_elem_index_get(v2);
-
- if (dot_v3v3(vd->no, vd2->no) < 0.0f + FLT_EPSILON * 2) {
- rotsys_reverse(e, v2, edata, vdata);
- mul_v3_fl(vd2->no, -1.0f);
- }
-
- if (!vd2->tag) {
- BLI_array_append(stack, v2);
- vd2->tag = 1;
- }
-
- e = rotsys_nextedge(e, v, edata, vdata);
- } while (e != vd->e);
- }
- }
-
- BLI_array_free(stack);
-}
-
-static void init_rotsys(BMesh *bm, EdgeData *edata, VertData *vdata)
-{
- BMIter iter;
- BMEdge *e;
- BMEdge **edges = NULL;
- BLI_array_staticdeclare(edges, BM_DEFAULT_NGON_STACK_SIZE);
- BMVert *v;
- RNG *rng;
- /* BMVert **verts = NULL; */
- /* BLI_array_staticdeclare(verts, BM_DEFAULT_NGON_STACK_SIZE); */ /* UNUSE */
- int i;
-
- BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) {
- BMIter eiter;
- float no[3], cent[3];
- int j, k = 0, totedge = 0;
-
- if (BM_elem_index_get(v) == -1)
- continue;
-
- BLI_array_empty(edges);
-
- BM_ITER_ELEM (e, &eiter, v, BM_EDGES_OF_VERT) {
- if (BMO_elem_flag_test(bm, e, EDGE_MARK)) {
- BLI_array_append(edges, e);
- totedge++;
- }
- }
-
- copy_v3_v3(cent, v->co);
-
- zero_v3(no);
- for (i = 0; i < totedge; i++) {
- BMEdge *e1, *e2;
- float cno[3], vec1[3], vec2[3];
-
- e1 = edges[i];
- e2 = edges[(i + 1) % totedge];
-
- sub_v3_v3v3(vec1, (BM_edge_other_vert(e1, v))->co, v->co);
- sub_v3_v3v3(vec2, (BM_edge_other_vert(e2, v))->co, v->co);
-
- cross_v3_v3v3(cno, vec1, vec2);
- normalize_v3(cno);
-
- if (i && dot_v3v3(cno, no) < 0.0f + FLT_EPSILON * 10)
- mul_v3_fl(cno, -1.0f);
-
- add_v3_v3(no, cno);
- normalize_v3(no);
- }
-
- /* generate plane-flattened coordinates */
- for (i = 0; i < totedge; i++) {
- BMEdge *e1;
- BMVert *v2;
- float cvec[3], vec1[3];
-
- e1 = edges[i];
- v2 = BM_edge_other_vert(e1, v);
-
- sub_v3_v3v3(vec1, v2->co, v->co);
-
- cross_v3_v3v3(cvec, vec1, no);
- cross_v3_v3v3(vec1, cvec, no);
- normalize_v3(vec1);
-
- mul_v3_fl(vec1, len_v3v3(v2->co, v->co));
- add_v3_v3(vec1, v->co);
-
- copy_v3_v3(vdata[BM_elem_index_get(v2)].sco, vec1);
- }
-
- rng = BLI_rng_new_srandom(0);
-
- /* first, ensure no 0 or 180 angles between adjacent
- * (and that adjacent's adjacent) edges */
- for (i = 0, k = 0; i < totedge; i++) {
- BMEdge *e1, *e2, *e3 = NULL;
- BMVert *v1, *v2, *v3;
- VertData *vd1, *vd2, *vd3;
- float vec1[3], vec2[3], vec3[3], size;
- int s1, s2, s3;
-
- if (totedge < 3)
- continue;
-
- e1 = edges[(i + totedge - 1) % totedge];
- e2 = edges[i];
- e3 = edges[(i + 1) % totedge];
-
- v1 = BM_edge_other_vert(e1, v);
- v2 = BM_edge_other_vert(e2, v);
- v3 = BM_edge_other_vert(e3, v);
-
- vd1 = vdata + BM_elem_index_get(v1);
- vd2 = vdata + BM_elem_index_get(v2);
- vd3 = vdata + BM_elem_index_get(v3);
-
- sub_v3_v3v3(vec1, vd1->sco, cent);
- sub_v3_v3v3(vec2, vd2->sco, cent);
- sub_v3_v3v3(vec3, vd3->sco, cent);
-
- size = (len_v3(vec1) + len_v3(vec3)) * 0.01f;
- normalize_v3(vec1); normalize_v3(vec2); normalize_v3(vec3);
-
-#ifdef STRAIGHT
-#undef STRAIGHT
-#endif
-#define STRAIGHT(vec11, vec22) (fabsf(dot_v3v3((vec11), (vec22))) > 1.0f - ((float)FLT_EPSILON * 1000.0f))
-
- s1 = STRAIGHT(vec1, vec2); s2 = STRAIGHT(vec2, vec3); s3 = STRAIGHT(vec1, vec3);
-
- if (s1 || s2 || s3) {
- copy_v3_v3(cent, v->co);
-
- for (j = 0; j < 3; j++) {
- float fac = (BLI_rng_get_float(rng) - 0.5f) * size;
- cent[j] += fac;
- }
-
- if (k < 2000) {
- i = 0;
- k++;
- continue;
- }
- else {
- k++;
- continue;
- }
-
- }
- }
-
- BLI_rng_free(rng);
-
- copy_v3_v3(vdata[BM_elem_index_get(v)].offco, cent);
- //copy_v3_v3(v->co, cent);
-
- /* now, sort edges so the triangle fan of all edges
- * has a consistent normal. this is the same as
- * sorting by polar coordinates along a group normal */
- for (j = 0; j < totedge; j++) {
- for (i = 0; i < totedge; i++) {
- BMEdge *e1, *e2, *e3 = NULL;
- BMVert *v1, *v2, *v3;
- VertData *vd1, *vd2, *vd3;
- float vec1[3], vec2[3], vec3[3], n1[3], n2[3], n3[3];
-
- e1 = edges[(i + totedge - 1) % totedge];
- e2 = edges[i];
- e3 = edges[(i + 1) % totedge];
-
- v1 = BM_edge_other_vert(e1, v);
- v2 = BM_edge_other_vert(e2, v);
- v3 = BM_edge_other_vert(e3, v);
-
- vd1 = vdata + BM_elem_index_get(v1);
- vd2 = vdata + BM_elem_index_get(v2);
- vd3 = vdata + BM_elem_index_get(v3);
-
- sub_v3_v3v3(vec1, vd1->sco, cent);
- sub_v3_v3v3(vec2, vd2->sco, cent);
- sub_v3_v3v3(vec3, vd3->sco, cent);
-
- cross_v3_v3v3(n1, vec1, vec2);
- cross_v3_v3v3(n2, vec2, vec3);
- cross_v3_v3v3(n3, vec1, vec3);
-
- /* this case happens often enough and probably not worth bothering users with,
- * maybe enable for debugging code but not for everyday use - campbell */
-#if 0
- /* Other way to determine if two vectors approach are (nearly) parallel: the
- * cross product of the two vectors will approach zero */
- {
- int s1, s2, s3;
- s1 = (dot_v3v3(n1, n1) < (0.0f + FLT_EPSILON * 10));
- s2 = (dot_v3v3(n2, n2) < (0.0f + FLT_EPSILON * 10));
- s3 = (totedge < 3) ? 0 : (dot_v3v3(n3, n3) < (0.0f + FLT_EPSILON * 10));
-
- if (s1 || s2 || s3) {
- fprintf(stderr, "%s: s1: %d, s2: %d, s3: %dx (bmesh internal error)\n", __func__, s1, s2, s3);
- }
- }
-#endif
-
- normalize_v3(n1); normalize_v3(n2); normalize_v3(n3);
-
-
- if (dot_v3v3(n1, n2) < 0.0f) {
- if (dot_v3v3(n1, n3) >= 0.0f + FLT_EPSILON * 10) {
- SWAP(BMEdge *, edges[i], edges[(i + 1) % totedge]);
- }
- else {
- SWAP(BMEdge *, edges[(i + totedge - 1) % totedge], edges[(i + 1) % totedge]);
- SWAP(BMEdge *, edges[i], edges[(i + 1) % totedge]);
- }
- }
- }
- }
-
-#undef STRAIGHT
-
- zero_v3(no);
-
- /* yay, edges are sorted */
- for (i = 0; i < totedge; i++) {
- BMEdge *e1 = edges[i], *e2 = edges[(i + 1) % totedge];
- float eno[3];
-
- normal_tri_v3(eno, BM_edge_other_vert(e1, v)->co, v->co, BM_edge_other_vert(e2, v)->co);
- add_v3_v3(no, eno);
-
- rotsys_append_edge(edges[i], v, edata, vdata);
- }
-
- normalize_v3(no);
- copy_v3_v3(vdata[BM_elem_index_get(v)].no, no);
- }
-
- /* now, make sure rotation system is topologically consistent
- * (e.g. vert normals consistently point either inside or outside) */
- rotsys_make_consistent(bm, edata, vdata);
-
- //rotsys_fill_faces(bm, edata, vdata);
-
-#if 0
- /* create visualizing geometry */
- BMVert *lastv;
- BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) {
- BMVert *v2;
- BMFace *f;
- int totedge = BM_vert_edge_count(v);
-
- if (BM_elem_index_get(v) == -1)
- continue;
-
- //cv = BM_vert_create(bm, cent, v);
- //BM_elem_index_set(cv, -1); /* set_dirty! */
- i = 0;
- e = vdata[BM_elem_index_get(v)].e;
- lastv = NULL;
- do {
- BMEdge *e2;
- BMVert *v2;
- float f = ((float)i / (float)totedge) * 0.35 + 0.05;
- float co[3];
-
- if (!e)
- break;
-
- if (!BM_edge_other_vert(e, v))
- continue;
-
- sub_v3_v3v3(co, (BM_edge_other_vert(e, v))->co, vdata[BM_elem_index_get(v)].offco);
- mul_v3_fl(co, f);
- add_v3_v3(co, vdata[BM_elem_index_get(v)].offco);
-
- v2 = BM_vert_create(bm, co, NULL);
- BM_elem_index_set(v2, -1); /* set_dirty! */
- //BM_edge_create(bm, cv, v2, NULL, 0);
-
- BM_vert_select_set(bm, v2, true);
- if (lastv) {
- e2 = BM_edge_create(bm, lastv, v2, NULL, 0);
- BM_edge_select_set(bm, e2, true);
- }
-
- lastv = v2;
-
- e = rotsys_nextedge(e, v, edata, vdata);
- i++;
- } while (e != vdata[BM_elem_index_get(v)].e);
- }
-#endif
-
- BLI_array_free(edges);
-}
-
-static PathBase *edge_pathbase_new(void)
-{
- PathBase *pb = MEM_callocN(sizeof(PathBase), "PathBase");
-
- pb->nodepool = BLI_mempool_create(sizeof(EPathNode), 1, 512, BLI_MEMPOOL_SYSMALLOC);
- pb->pathpool = BLI_mempool_create(sizeof(EPath), 1, 512, BLI_MEMPOOL_SYSMALLOC);
-
- return pb;
-}
-
-static void edge_pathbase_free(PathBase *pathbase)
-{
- BLI_mempool_destroy(pathbase->nodepool);
- BLI_mempool_destroy(pathbase->pathpool);
- MEM_freeN(pathbase);
-}
-
-static EPath *edge_copy_add_path(PathBase *pb, EPath *path, BMVert *appendv, BMEdge *e)
-{
- EPath *path2;
- EPathNode *node, *node2;
-
- path2 = BLI_mempool_alloc(pb->pathpool);
- path2->nodes.first = path2->nodes.last = NULL;
- path2->weight = 0.0f;
- path2->group = path->group;
-
- for (node = path->nodes.first; node; node = node->next) {
- node2 = BLI_mempool_alloc(pb->nodepool);
- *node2 = *node;
- BLI_addtail(&path2->nodes, node2);
- }
-
- node2 = BLI_mempool_alloc(pb->nodepool);
- node2->v = appendv;
- node2->e = e;
- node2->cure = NULL;
-
- BLI_addtail(&path2->nodes, node2);
-
- return path2;
-}
-
-static EPath *edge_path_new(PathBase *pb, BMVert *start, BMEdge *starte)
-{
- EPath *path;
- EPathNode *node;
-
- path = BLI_mempool_alloc(pb->pathpool);
- node = BLI_mempool_alloc(pb->nodepool);
-
- path->nodes.first = path->nodes.last = NULL;
-
- node->v = start;
- node->e = starte;
- node->cure = NULL;
-
- BLI_addtail(&path->nodes, node);
- path->weight = 0.0f;
-
- return path;
-}
-
-static float edge_weight_path(EPath *path, EdgeData *edata, VertData *UNUSED(vdata))
-{
- EPathNode *node, *first = path->nodes.first;
- float w = 0.0;
-
- for (node = path->nodes.first; node; node = node->next) {
- if (node->e && node != path->nodes.first) {
- w += edata[BM_elem_index_get(node->e)].ftag;
- if (node->prev) {
- /* BMESH_TOD */
- (void)first;
- //w += len_v3v3(node->v->co, first->e->v1->co) * 0.0001f;
- //w += len_v3v3(node->v->co, first->e->v2->co) * 0.0001f;
- }
- }
-
- w += 1.0f;
- }
-
- return w;
-}
-
-
-static void edge_free_path(PathBase *pathbase, EPath *path)
-{
- EPathNode *node, *next;
-
- for (node = path->nodes.first; node; node = next) {
- next = node->next;
- BLI_mempool_free(pathbase->nodepool, node);
- }
-
- BLI_mempool_free(pathbase->pathpool, path);
-}
-
-static EPath *edge_find_shortest_path(BMesh *bm, BMOperator *op, BMEdge *edge, EdgeData *edata,
- VertData *vdata, PathBase *pathbase, int group)
-{
- BMEdge *e;
- GHash *gh = BLI_ghash_ptr_new("createops find shortest path");
- BMVert *v1, *v2;
- BMVert **verts = NULL;
- BLI_array_staticdeclare(verts, 1024);
- Heap *heap = BLI_heap_new();
- EPath *path = NULL, *path2;
- BMVert *startv;
- BMVert *endv;
- EPathNode *node;
- int i;
- const bool use_restrict = BMO_slot_bool_get(op->slots_in, "use_restrict");
- BMOpSlot *slot_restrict = BMO_slot_get(op->slots_in, "restrict");
-
-
- startv = edata[BM_elem_index_get(edge)].ftag ? edge->v2 : edge->v1;
- endv = edata[BM_elem_index_get(edge)].ftag ? edge->v1 : edge->v2;
-
- path = edge_path_new(pathbase, startv, edge);
- BLI_ghash_insert(gh, startv, NULL);
- BLI_heap_insert(heap, path->weight, path);
- path->group = group;
-
- while (BLI_heap_size(heap)) {
- VertData *vd;
- EPathNode *last;
- BMFace *f = NULL;
-
- path = BLI_heap_popmin(heap);
- last = path->nodes.last;
- v1 = last->v;
-
- if (v1 == endv) {
- /* make sure this path loop doesn't already exists */
- i = 0;
- BLI_array_empty(verts);
- for (i = 0, node = path->nodes.first; node; node = node->next, i++) {
- BLI_array_grow_one(verts);
- verts[i] = node->v;
- }
-
- if (BM_face_exists(verts, i, &f)) {
- if (!BMO_elem_flag_test(bm, f, FACE_IGNORE)) {
- BLI_ghash_remove(gh, endv, NULL, NULL);
- continue;
- }
- }
- break;
- }
-
- vd = vdata + BM_elem_index_get(v1);
- if (!vd->e)
- continue;
-
- v2 = NULL;
- while (1) {
- if (!last->cure) {
- last->cure = e = vdata[BM_elem_index_get(last->v)].e;
- }
- else {
- last->cure = e = rotsys_nextedge(last->cure, last->v, edata, vdata);
- if (last->cure == vdata[BM_elem_index_get(last->v)].e) {
- v2 = NULL;
- break;
- }
- }
-
- if (e == edge || !BMO_elem_flag_test(bm, e, EDGE_MARK)) {
- continue;
- }
-
- v2 = BM_edge_other_vert(e, last->v);
-
- if (BLI_ghash_haskey(gh, v2)) {
- v2 = NULL;
- continue;
- }
-
- if (use_restrict) {
- int *group_flag = (int *)BMO_slot_map_data_get(slot_restrict, e);
- if (group_flag) {
- if (!(*group_flag & path->group)) {
- v2 = NULL;
- continue;
- }
- }
- }
-
- break;
- }
-
- if (!v2) {
- edge_free_path(pathbase, path);
- path = NULL;
- continue;
- }
-
- /* add path back into heap */
- BLI_heap_insert(heap, path->weight, path);
-
- /* put v2 in gh ma */
- BLI_ghash_insert(gh, v2, NULL);
-
- path2 = edge_copy_add_path(pathbase, path, v2, e);
- path2->weight = edge_weight_path(path2, edata, vdata);
-
- BLI_heap_insert(heap, path2->weight, path2);
- }
-
- if (path && ((EPathNode *)path->nodes.last)->v != endv) {
- edge_free_path(pathbase, path);
- path = NULL;
- }
-
- BLI_array_free(verts);
- BLI_heap_free(heap, NULL);
- BLI_ghash_free(gh, NULL, NULL);
-
- return path;
-}
-
-static int count_edge_faces(BMesh *bm, BMEdge *e)
-{
- int i = 0;
- BMLoop *l = e->l;
-
- if (!l) {
- return 0;
- }
-
- do {
- if (!BMO_elem_flag_test(bm, l->f, FACE_IGNORE)) {
- i++;
- }
-
- l = l->radial_next;
- } while (l != e->l);
-
- return i;
-}
-
-BLI_INLINE void vote_on_winding(BMEdge *edge, EPathNode *node, unsigned int winding[2])
-{
- BMVert *test_v1, *test_v2;
- /* we want to use the reverse winding to the existing order */
- BM_edge_ordered_verts(edge, &test_v2, &test_v1);
-
- /* edges vote on which winding wins out */
- winding[(test_v1 == node->v)]++;
-}
-
-static BMFace *bm_face_from_path(BMesh *bm, EPath *path,
- EdgeData *edata,
- const bool use_fill_check)
-{
- /* accumulte winding directions for each edge which has a face */
- const unsigned int path_len = BLI_countlist(&path->nodes);
- unsigned int winding[2] = {0, 0};
- unsigned int i;
-
- EPathNode *node;
-
- BMVert **verts = BLI_array_alloca(verts, path_len);
- BMEdge **edges = BLI_array_alloca(edges, path_len);
- BMEdge *e;
- BMVert *v;
-
- for (node = path->nodes.first, i = 0; node; node = node->next, i++) {
-
- v = node->v;
- e = BM_edge_exists(v, node->next ?
- node->next->v :
- ((EPathNode *)path->nodes.first)->v);
-
- /* check on the winding */
- if (e->l) {
- if (UNLIKELY(count_edge_faces(bm, e) >= 2)) {
- return NULL;
- }
-
- vote_on_winding(e, node, winding);
- }
-
- verts[i] = v;
- edges[i] = e;
- }
-
- /* do after incase we bail early, above */
- for (i = 0; i < path_len; i++) {
- edata[BM_elem_index_get(edges[i])].ftag++;
- }
-
-
- /* if these are even it doesn't really matter what to do,
- * with consistent geometry one will be zero, the choice is clear */
- if (winding[0] > winding[1]) {
- BLI_array_wrap(verts, path_len, -1);
- BLI_array_reverse(verts, path_len);
- BLI_array_reverse(edges, path_len);
- }
-
- if ((use_fill_check == false) ||
- /* fairly expensive check - see if there are already faces filling this area */
- (BM_face_exists_multi(verts, edges, path_len) == false))
- {
- return BM_face_create(bm, verts, edges, path_len, BM_CREATE_NO_DOUBLE);
- }
- else {
- return NULL;
- }
-}
void bmo_edgenet_fill_exec(BMesh *bm, BMOperator *op)
{
- BMIter iter;
+ BMOperator op_attr;
BMOIter siter;
BMFace *f;
- BMEdge *e;
- EPath *path;
- EdgeData *edata;
- VertData *vdata;
- PathBase *pathbase;
- const bool use_restrict = BMO_slot_bool_get(op->slots_in, "use_restrict");
- const bool use_fill_check = BMO_slot_bool_get(op->slots_in, "use_fill_check");
const short mat_nr = BMO_slot_int_get(op->slots_in, "mat_nr");
const bool use_smooth = BMO_slot_bool_get(op->slots_in, "use_smooth");
- int i;
- BMOpSlot *slot_restrict = BMO_slot_get(op->slots_in, "restrict");
- BMOpSlot *slot_face_groupmap_out = BMO_slot_get(op->slots_out, "face_groupmap.out");
+// const int sides = BMO_slot_int_get(op->slots_in, "sides");
if (!bm->totvert || !bm->totedge)
return;
- pathbase = edge_pathbase_new();
-
- edata = MEM_callocN(sizeof(EdgeData) * bm->totedge, "EdgeData");
- vdata = MEM_callocN(sizeof(VertData) * bm->totvert, "VertData");
+ BM_mesh_elem_hflag_disable_all(bm, BM_EDGE, BM_ELEM_TAG, false);
+ BMO_slot_buffer_hflag_enable(bm, op->slots_in, "edges", BM_EDGE, BM_ELEM_TAG, false);
- BMO_slot_buffer_flag_enable(bm, op->slots_in, "edges", BM_EDGE, EDGE_MARK);
- BMO_slot_buffer_flag_enable(bm, op->slots_in, "exclude_faces", BM_FACE, FACE_IGNORE);
-
- BM_mesh_elem_index_ensure(bm, BM_VERT);
-
- BM_ITER_MESH (f, &iter, bm, BM_FACES_OF_MESH) {
- BMO_elem_flag_enable(bm, f, ELE_ORIG);
- }
+ BM_mesh_elem_hflag_disable_all(bm, BM_FACE, BM_ELEM_TAG, false);
+ BM_mesh_edgenet(bm, true, true); // TODO, sides
- BM_ITER_MESH_INDEX (e, &iter, bm, BM_EDGES_OF_MESH, i) {
- BM_elem_index_set(e, i); /* set_inline */
+ BMO_slot_buffer_from_enabled_hflag(bm, op, op->slots_out, "faces.out", BM_FACE, BM_ELEM_TAG);
- if (!BMO_elem_flag_test(bm, e, EDGE_MARK)) {
- edata[i].tag = 2;
+ BMO_ITER (f, &siter, op->slots_out, "faces.out", BM_FACE) {
+ f->mat_nr = mat_nr;
+ if (use_smooth) {
+ BM_elem_flag_enable(f, BM_ELEM_SMOOTH);
}
+ /* normals are zero'd */
+ BM_face_normal_update(f);
}
- bm->elem_index_dirty &= ~BM_EDGE;
- init_rotsys(bm, edata, vdata);
+ /* --- Attribute Fill --- */
+ /* may as well since we have the faces already in a buffer */
+ BMO_op_initf(bm, &op_attr, op->flag,
+ "face_attribute_fill faces=%S use_normals=%b",
+ op, "faces.out", true);
- while (1) {
- BMEdge *edge = NULL;
- int group = 0;
+ BMO_op_exec(bm, &op_attr);
- BMO_ITER (e, &siter, op->slots_in, "edges", BM_EDGE) {
- /* if restrict is on, only start on faces in the restrict map */
- if (use_restrict && !BMO_slot_map_contains(slot_restrict, e))
- continue;
-
- if (edata[BM_elem_index_get(e)].tag < 2) {
- edge = e;
-
- if (use_restrict) {
- int gi_iter = 0, gi_count = 0, gi = 0;
-
- group = BMO_slot_map_int_get(slot_restrict, e);
-
- for (gi_iter = 0; gi_iter < 30; gi_iter++) {
- if (group & (1 << gi_iter)) {
- gi_count++;
- gi = gi_iter;
-
- if (gi_count - 1 == edata[BM_elem_index_get(e)].tag) {
- break;
- }
- }
- }
-
- group = (1 << gi);
- }
-
- break;
- }
- }
-
- if (!edge)
- break;
-
- edata[BM_elem_index_get(edge)].tag += 1;
-
- path = edge_find_shortest_path(bm, op, edge, edata, vdata, pathbase, group);
- if (path && path->nodes.first) {
- BMFace *f = bm_face_from_path(bm, path, edata,
- use_fill_check);
-
- if (f && !BMO_elem_flag_test(bm, f, ELE_ORIG)) {
- BMO_elem_flag_enable(bm, f, FACE_NEW);
- f->mat_nr = mat_nr;
- if (use_smooth) {
- BM_elem_flag_enable(f, BM_ELEM_SMOOTH);
- }
- }
-
- if (use_restrict) {
- BMO_slot_map_int_insert(op, slot_face_groupmap_out, f, path->group);
- }
-
- edge_free_path(pathbase, path);
- }
+ /* check if some faces couldn't be touched */
+ if (BMO_slot_buffer_count(op_attr.slots_out, "faces_fail.out")) {
+ BMO_op_callf(bm, op->flag, "recalc_face_normals faces=%S", &op_attr, "faces_fail.out");
}
+ BMO_op_finish(bm, &op_attr);
- BMO_slot_buffer_from_enabled_flag(bm, op, op->slots_out, "faces.out", BM_FACE, FACE_NEW);
-
- edge_pathbase_free(pathbase);
- MEM_freeN(edata);
- MEM_freeN(vdata);
}
static BMEdge *edge_next(BMesh *bm, BMEdge *e)
diff --git a/source/blender/bmesh/operators/bmo_extrude.c b/source/blender/bmesh/operators/bmo_extrude.c
index 070cc187045..90c514bfd02 100644
--- a/source/blender/bmesh/operators/bmo_extrude.c
+++ b/source/blender/bmesh/operators/bmo_extrude.c
@@ -77,7 +77,7 @@ void bmo_extrude_discrete_faces_exec(BMesh *bm, BMOperator *op)
f_side = BM_face_create_quad_tri(bm,
l_org->next->v, l_new->next->v, l_new->v, l_org->v,
- f_org, false);
+ f_org, BM_CREATE_NOP);
l_side_iter = BM_FACE_FIRST_LOOP(f_side);
@@ -163,14 +163,14 @@ void bmo_extrude_edge_only_exec(BMesh *bm, BMOperator *op)
/* disable root flag on all new skin nodes */
if (CustomData_has_layer(&bm->vdata, CD_MVERT_SKIN)) {
BMVert *v;
- BMO_ITER(v, &siter, dupeop.slots_out, "geom.out", BM_VERT) {
+ BMO_ITER (v, &siter, dupeop.slots_out, "geom.out", BM_VERT) {
bm_extrude_disable_skin_root(bm, v);
}
}
for (e = BMO_iter_new(&siter, dupeop.slots_out, "boundary_map.out", 0); e; e = BMO_iter_step(&siter)) {
BMVert *f_verts[4];
- e_new = *(BMEdge **)BMO_iter_map_value(&siter);
+ e_new = BMO_iter_map_value_ptr(&siter);
if (e->l && e->v1 != e->l->v) {
f_verts[0] = e->v1;
@@ -185,7 +185,7 @@ void bmo_extrude_edge_only_exec(BMesh *bm, BMOperator *op)
f_verts[3] = e_new->v2;
}
/* not sure what to do about example face, pass NULL for now */
- f = BM_face_create_quad_tri_v(bm, f_verts, 4, NULL, false);
+ f = BM_face_create_verts(bm, f_verts, 4, NULL, BM_CREATE_NOP, true);
bm_extrude_copy_face_loop_attributes(bm, f);
if (BMO_elem_flag_test(bm, e, EXT_INPUT))
@@ -211,11 +211,11 @@ void bmo_extrude_vert_indiv_exec(BMesh *bm, BMOperator *op)
const bool has_vskin = CustomData_has_layer(&bm->vdata, CD_MVERT_SKIN);
for (v = BMO_iter_new(&siter, op->slots_in, "verts", BM_VERT); v; v = BMO_iter_step(&siter)) {
- dupev = BM_vert_create(bm, v->co, v, 0);
+ dupev = BM_vert_create(bm, v->co, v, BM_CREATE_NOP);
if (has_vskin)
bm_extrude_disable_skin_root(bm, v);
- e = BM_edge_create(bm, v, dupev, NULL, 0);
+ e = BM_edge_create(bm, v, dupev, NULL, BM_CREATE_NOP);
BMO_elem_flag_enable(bm, e, EXT_KEEP);
BMO_elem_flag_enable(bm, dupev, EXT_KEEP);
@@ -319,7 +319,7 @@ void bmo_extrude_face_region_exec(BMesh *bm, BMOperator *op)
/* disable root flag on all new skin nodes */
if (CustomData_has_layer(&bm->vdata, CD_MVERT_SKIN)) {
- BMO_ITER(v, &siter, dupeop.slots_out, "geom.out", BM_VERT) {
+ BMO_ITER (v, &siter, dupeop.slots_out, "geom.out", BM_VERT) {
bm_extrude_disable_skin_root(bm, v);
}
}
@@ -372,7 +372,7 @@ void bmo_extrude_face_region_exec(BMesh *bm, BMOperator *op)
continue;
}
- e_new = *(BMEdge **)BMO_iter_map_value(&siter);
+ e_new = BMO_iter_map_value_ptr(&siter);
if (!e_new) {
continue;
@@ -401,13 +401,13 @@ void bmo_extrude_face_region_exec(BMesh *bm, BMOperator *op)
}
/* not sure what to do about example face, pass NULL for now */
- f = BM_face_create_quad_tri_v(bm, f_verts, 4, NULL, false);
+ f = BM_face_create_verts(bm, f_verts, 4, NULL, BM_CREATE_NOP, true);
bm_extrude_copy_face_loop_attributes(bm, f);
}
/* link isolated vert */
for (v = BMO_iter_new(&siter, dupeop.slots_out, "isovert_map.out", 0); v; v = BMO_iter_step(&siter)) {
- BMVert *v2 = *((void **)BMO_iter_map_value(&siter));
+ BMVert *v2 = BMO_iter_map_value_ptr(&siter);
BM_edge_create(bm, v, v2, v->e, BM_CREATE_NO_DOUBLE);
}
diff --git a/source/blender/bmesh/operators/bmo_fill_attribute.c b/source/blender/bmesh/operators/bmo_fill_attribute.c
new file mode 100644
index 00000000000..fa77e6b509c
--- /dev/null
+++ b/source/blender/bmesh/operators/bmo_fill_attribute.c
@@ -0,0 +1,174 @@
+
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor(s): Campbell Barton.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/bmesh/operators/bmo_fill_attribute.c
+ * \ingroup bmesh
+ *
+ * Fill in geometry with the attributes of their adjacent data.
+ */
+
+#include "BLI_utildefines.h"
+#include "BLI_linklist_stack.h"
+
+#include "bmesh.h"
+
+#include "intern/bmesh_operators_private.h" /* own include */
+
+/**
+ * Check if all other loops are tagged.
+ */
+static bool bm_loop_is_all_radial_tag(BMLoop *l)
+{
+ BMLoop *l_iter;
+ l_iter = l->radial_next;
+ do {
+ if (BM_elem_flag_test(l_iter->f, BM_ELEM_TAG) == 0) {
+ return false;
+ }
+ } while ((l_iter = l_iter->radial_next) != l);
+
+ return true;
+}
+
+/**
+ * Callback to run on source-loops for #BM_face_copy_shared
+ */
+static bool bm_loop_is_face_untag(BMElem *ele, void *UNUSED(user_data))
+{
+ return (BM_elem_flag_test(((BMLoop *)ele)->f, BM_ELEM_TAG) == 0);
+}
+
+/**
+ * Copy all attributes from adjacent untagged faces.
+ */
+static void bm_face_copy_shared_all(BMesh *bm, BMLoop *l,
+ const bool use_normals, const bool use_data)
+{
+ BMLoop *l_other = l->radial_next;
+ BMFace *f = l->f, *f_other;
+ while (BM_elem_flag_test(l_other->f, BM_ELEM_TAG)) {
+ l_other = l_other->radial_next;
+ }
+ f_other = l_other->f;
+
+ if (use_data) {
+ /* copy face-attrs */
+ BM_elem_attrs_copy(bm, bm, f_other, f);
+
+ /* copy loop-attrs */
+ BM_face_copy_shared(bm, f, bm_loop_is_face_untag, NULL);
+ }
+
+ if (use_normals) {
+ /* copy winding (flipping) */
+ if (l->v == l_other->v) {
+ BM_face_normal_flip(bm, f);
+ }
+ }
+}
+
+/**
+ * Flood fill attributes.
+ */
+static unsigned int bmesh_face_attribute_fill(BMesh *bm,
+ const bool use_normals, const bool use_data)
+{
+ BLI_LINKSTACK_DECLARE(loop_queue_prev, BMLoop *);
+ BLI_LINKSTACK_DECLARE(loop_queue_next, BMLoop *);
+
+ BMFace *f;
+ BMIter iter;
+ BMLoop *l;
+
+ unsigned int face_tot = 0;
+
+
+ BLI_LINKSTACK_INIT(loop_queue_prev);
+ BLI_LINKSTACK_INIT(loop_queue_next);
+
+ BM_ITER_MESH (f, &iter, bm, BM_FACES_OF_MESH) {
+ if (BM_elem_flag_test(f, BM_ELEM_TAG)) {
+ BMLoop *l_iter, *l_first;
+ l_iter = l_first = BM_FACE_FIRST_LOOP(f);
+ do {
+ if (bm_loop_is_all_radial_tag(l_iter) == false) {
+ BLI_LINKSTACK_PUSH(loop_queue_prev, l_iter);
+ }
+ } while ((l_iter = l_iter->next) != l_first);
+ }
+ }
+
+ while (BLI_LINKSTACK_SIZE(loop_queue_prev)) {
+ while ((l = BLI_LINKSTACK_POP(loop_queue_prev))) {
+ /* check we're still un-assigned */
+ if (BM_elem_flag_test(l->f, BM_ELEM_TAG)) {
+ BMLoop *l_iter;
+
+ BM_elem_flag_disable(l->f, BM_ELEM_TAG);
+
+ l_iter = l->next;
+ do {
+ BMLoop *l_radial_iter = l_iter->radial_next;
+ if (l_radial_iter != l_iter) {
+ do {
+ if (BM_elem_flag_test(l_radial_iter->f, BM_ELEM_TAG)) {
+ BLI_LINKSTACK_PUSH(loop_queue_next, l_radial_iter);
+ }
+ } while ((l_radial_iter = l_radial_iter->radial_next) != l_iter);
+ }
+ } while ((l_iter = l_iter->next) != l);
+
+ /* do last because of face flipping */
+ bm_face_copy_shared_all(bm, l,
+ use_normals, use_data);
+ face_tot += 1;
+ }
+ }
+
+ BLI_LINKSTACK_SWAP(loop_queue_prev, loop_queue_next);
+ }
+
+ BLI_LINKSTACK_FREE(loop_queue_prev);
+ BLI_LINKSTACK_FREE(loop_queue_next);
+
+ return face_tot;
+}
+
+void bmo_face_attribute_fill_exec(BMesh *bm, BMOperator *op)
+{
+ const bool use_normals = BMO_slot_bool_get(op->slots_in, "use_normals");
+ const bool use_data = BMO_slot_bool_get(op->slots_in, "use_data");
+
+ int face_tot;
+
+ BM_mesh_elem_hflag_disable_all(bm, BM_FACE, BM_ELEM_TAG, false);
+ BMO_slot_buffer_hflag_enable(bm, op->slots_in, "faces", BM_FACE, BM_ELEM_TAG, false); /* do inline */
+
+ /* now we can copy adjacent data */
+ face_tot = bmesh_face_attribute_fill(bm, use_normals, use_data);
+
+ if (face_tot != BMO_slot_buffer_count(op->slots_in, "faces")) {
+ /* any remaining tags will be skipped */
+ BMO_slot_buffer_from_enabled_hflag(bm, op, op->slots_out, "faces_fail.out", BM_FACE, BM_ELEM_TAG);
+ }
+}
diff --git a/source/blender/bmesh/operators/bmo_fill_edgeloop.c b/source/blender/bmesh/operators/bmo_fill_edgeloop.c
index bd0466ff499..0fbaf5ff11a 100644
--- a/source/blender/bmesh/operators/bmo_fill_edgeloop.c
+++ b/source/blender/bmesh/operators/bmo_fill_edgeloop.c
@@ -140,7 +140,7 @@ void bmo_edgeloop_fill_exec(BMesh *bm, BMOperator *op)
BMFace *f;
/* don't use calc_edges option because we already have the edges */
- f = BM_face_create_ngon_verts(bm, f_verts, i, 0, true, false);
+ f = BM_face_create_ngon_verts(bm, f_verts, i, NULL, BM_CREATE_NOP, true, false);
BMO_elem_flag_enable(bm, f, ELE_OUT);
f->mat_nr = mat_nr;
if (use_smooth) {
diff --git a/source/blender/bmesh/operators/bmo_fill_grid.c b/source/blender/bmesh/operators/bmo_fill_grid.c
index 7d4b780baf5..4e302a8ff63 100644
--- a/source/blender/bmesh/operators/bmo_fill_grid.c
+++ b/source/blender/bmesh/operators/bmo_fill_grid.c
@@ -37,6 +37,8 @@
#include "intern/bmesh_operators_private.h" /* own include */
+#include "BLI_strict_flags.h"
+
#define EDGE_MARK 4
#define FACE_OUT 16
@@ -103,17 +105,130 @@ static void quad_verts_to_barycentric_tri(
#endif
+/* -------------------------------------------------------------------- */
+/* Handle Loop Pairs */
+
+/** \name Loop Pairs
+ * \{ */
+
+/**
+ * Assign a loop pair from 2 verts (which _must_ share an edge)
+ */
+static void bm_loop_pair_from_verts(BMVert *v_a, BMVert *v_b,
+ BMLoop *l_pair[2])
+{
+ BMEdge *e = BM_edge_exists(v_a, v_b);
+ if (e->l) {
+ if (e->l->v == v_a) {
+ l_pair[0] = e->l;
+ l_pair[1] = e->l->next;
+ }
+ else {
+ l_pair[0] = e->l->next;
+ l_pair[1] = e->l;
+ }
+ }
+ else {
+ l_pair[0] = NULL;
+ l_pair[1] = NULL;
+ }
+}
+
+/**
+ * Copy loop pair from one side to the other if either is missing,
+ * this simplifies interpolation code so we only need to check if x/y are missing,
+ * rather then checking each loop.
+ */
+static void bm_loop_pair_test_copy(BMLoop *l_pair_a[2], BMLoop *l_pair_b[2])
+{
+ /* if the first one is set, we know the second is too */
+ if (l_pair_a[0] && l_pair_b[0] == NULL) {
+ l_pair_b[0] = l_pair_a[1];
+ l_pair_b[1] = l_pair_a[0];
+ }
+ else if (l_pair_b[0] && l_pair_a[0] == NULL) {
+ l_pair_a[0] = l_pair_b[1];
+ l_pair_a[1] = l_pair_b[0];
+ }
+}
+
+/**
+ * Interpolate from boundary loops.
+ *
+ * \note These weights will be calculated multiple times per vertex.
+ */
+static void bm_loop_interp_from_grid_boundary_4(BMesh *bm, BMLoop *l, BMLoop *l_bound[4], const float w[4])
+{
+ void *l_cdata[4] = {
+ l_bound[0]->head.data,
+ l_bound[1]->head.data,
+ l_bound[2]->head.data,
+ l_bound[3]->head.data};
+
+ CustomData_bmesh_interp(&bm->ldata, l_cdata, w, NULL, 4, l->head.data);
+}
+
+static void bm_loop_interp_from_grid_boundary_2(BMesh *bm, BMLoop *l, BMLoop *l_bound[2], const float t)
+{
+
+ void *l_cdata[2] = {
+ l_bound[0]->head.data,
+ l_bound[1]->head.data};
+
+ const float w[2] = {1.0f - t, t};
+
+ CustomData_bmesh_interp(&bm->ldata, l_cdata, w, NULL, 2, l->head.data);
+}
+
+/** \} */
+
+
+/**
+ * Avoids calling #barycentric_weights_v2_quad often by caching weights into an array.
+ */
+static void barycentric_weights_v2_grid_cache(const unsigned int xtot, const unsigned int ytot,
+ float (*weight_table)[4])
+{
+ float x_step = 1.0f / (float)(xtot - 1);
+ float y_step = 1.0f / (float)(ytot - 1);
+ unsigned int i = 0;
+ float xy_fl[2];
+
+ unsigned int x, y;
+ for (y = 0; y < ytot; y++) {
+ xy_fl[1] = y_step * (float)y;
+ for (x = 0; x < xtot; x++) {
+ xy_fl[0] = x_step * (float)x;
+ {
+ const float cos[4][2] = {
+ {xy_fl[0], 0.0f},
+ {0.0f, xy_fl[1]},
+ {xy_fl[0], 1.0f},
+ {1.0f, xy_fl[1]}};
+ barycentric_weights_v2_quad(UNPACK4(cos), xy_fl, weight_table[i++]);
+ }
+ }
+ }
+}
+
+
/**
* This may be useful outside the bmesh operator.
*
* \param v_grid 2d array of verts, all boundary verts must be set, we fill in the middle.
*/
-static void bm_grid_fill_array(BMesh *bm, BMVert **v_grid, const int xtot, const int ytot,
+static void bm_grid_fill_array(BMesh *bm, BMVert **v_grid, const unsigned int xtot, unsigned const int ytot,
const short mat_nr, const bool use_smooth,
- const bool use_flip)
+ const bool use_flip, const bool use_interp_simple)
{
const bool use_vert_interp = CustomData_has_interp(&bm->vdata);
- int x, y;
+ const bool use_loop_interp = CustomData_has_interp(&bm->ldata);
+ unsigned int x, y;
+
+ /* for use_loop_interp */
+ BMLoop *((*larr_x_a)[2]), *((*larr_x_b)[2]), *((*larr_y_a)[2]), *((*larr_y_b)[2]);
+
+ float (*weight_table)[4];
#define XY(_x, _y) ((_x) + ((_y) * (xtot)))
@@ -141,6 +256,39 @@ static void bm_grid_fill_array(BMesh *bm, BMVert **v_grid, const int xtot, const
true);
#endif
+ if (use_interp_simple || use_vert_interp || use_loop_interp) {
+ weight_table = MEM_mallocN(sizeof(*weight_table) * (size_t)(xtot * ytot), __func__);
+ barycentric_weights_v2_grid_cache(xtot, ytot, weight_table);
+ }
+ else {
+ weight_table = NULL;
+ }
+
+
+ /* Store loops */
+ if (use_loop_interp) {
+ /* x2 because each edge connects 2 loops */
+ larr_x_a = MEM_mallocN(sizeof(*larr_x_a) * (xtot - 1), __func__);
+ larr_x_b = MEM_mallocN(sizeof(*larr_x_b) * (xtot - 1), __func__);
+
+ larr_y_a = MEM_mallocN(sizeof(*larr_y_a) * (ytot - 1), __func__);
+ larr_y_b = MEM_mallocN(sizeof(*larr_y_b) * (ytot - 1), __func__);
+
+ /* fill in the loops */
+ for (x = 0; x < xtot - 1; x++) {
+ bm_loop_pair_from_verts(v_grid[XY(x, 0)], v_grid[XY(x + 1, 0)], larr_x_a[x]);
+ bm_loop_pair_from_verts(v_grid[XY(x, ytot - 1)], v_grid[XY(x + 1, ytot - 1)], larr_x_b[x]);
+ bm_loop_pair_test_copy(larr_x_a[x], larr_x_b[x]);
+ }
+
+ for (y = 0; y < ytot - 1; y++) {
+ bm_loop_pair_from_verts(v_grid[XY(0, y)], v_grid[XY(0, y + 1)], larr_y_a[y]);
+ bm_loop_pair_from_verts(v_grid[XY(xtot - 1, y)], v_grid[XY(xtot - 1, y + 1)], larr_y_b[y]);
+ bm_loop_pair_test_copy(larr_y_a[y], larr_y_b[y]);
+ }
+ }
+
+
/* Build Verts */
for (y = 1; y < ytot - 1; y++) {
#ifdef BARYCENTRIC_INTERP
@@ -162,7 +310,7 @@ static void bm_grid_fill_array(BMesh *bm, BMVert **v_grid, const int xtot, const
/* place the vertex */
#ifdef BARYCENTRIC_INTERP
- {
+ if (use_interp_simple == false) {
float co_a[3], co_b[3];
barycentric_transform(
@@ -178,28 +326,34 @@ static void bm_grid_fill_array(BMesh *bm, BMVert **v_grid, const int xtot, const
interp_v3_v3v3(co, co_a, co_b, (float)y / ((float)ytot - 1));
}
-
-#else
- interp_v3_v3v3(
- co,
- v_grid[x]->co,
- v_grid[(xtot * ytot) + (x - xtot)]->co,
- (float)y / ((float)ytot - 1));
+ else
#endif
+ {
+ const float *w = weight_table[XY(x, y)];
+
+ zero_v3(co);
+ madd_v3_v3fl(co, v_grid[XY(x, 0)]->co, w[0]);
+ madd_v3_v3fl(co, v_grid[XY(0, y)]->co, w[1]);
+ madd_v3_v3fl(co, v_grid[XY(x, ytot - 1)]->co, w[2]);
+ madd_v3_v3fl(co, v_grid[XY(xtot - 1, y)]->co, w[3]);
+ }
- v = BM_vert_create(bm, co, NULL, 0);
+ v = BM_vert_create(bm, co, NULL, BM_CREATE_NOP);
v_grid[(y * xtot) + x] = v;
/* interpolate only along one axis, this could be changed
* but from user pov gives predictable results since these are selected loop */
if (use_vert_interp) {
- void *v_cdata[2] = {
- v_grid[XY(x, 0)]->head.data,
- v_grid[XY(x, (ytot - 1))]->head.data,
+ const float *w = weight_table[XY(x, y)];
+
+ void *v_cdata[4] = {
+ v_grid[XY(x, 0)]->head.data,
+ v_grid[XY(0, y)]->head.data,
+ v_grid[XY(x, ytot - 1)]->head.data,
+ v_grid[XY(xtot - 1, y)]->head.data,
};
- const float t = (float)y / ((float)ytot - 1);
- const float w[2] = {1.0f - t, t};
- CustomData_bmesh_interp(&bm->vdata, v_cdata, w, NULL, 2, v->head.data);
+
+ CustomData_bmesh_interp(&bm->vdata, v_cdata, w, NULL, 4, v->head.data);
}
}
@@ -218,7 +372,7 @@ static void bm_grid_fill_array(BMesh *bm, BMVert **v_grid, const int xtot, const
v_grid[XY(x + 1, y + 1)], /* TR */
v_grid[XY(x + 1, y + 0)], /* BR */
NULL,
- false);
+ BM_CREATE_NOP);
}
else {
f = BM_face_create_quad_tri(
@@ -228,8 +382,88 @@ static void bm_grid_fill_array(BMesh *bm, BMVert **v_grid, const int xtot, const
v_grid[XY(x, y + 1)], /* TL */
v_grid[XY(x, y + 0)], /* BL */
NULL,
- false);
+ BM_CREATE_NOP);
+ }
+
+
+ if (use_loop_interp && (larr_x_a[x][0] || larr_y_a[y][0])) {
+ /* bottom/left/top/right */
+ BMLoop *l_quad[4];
+ BMLoop *l_bound[4];
+ BMLoop *l_tmp;
+ unsigned int x_side, y_side, i;
+ char interp_from;
+
+
+ if (larr_x_a[x][0] && larr_y_a[y][0]) {
+ interp_from = 'B'; /* B == both */
+ l_tmp = larr_x_a[x][0];
+ }
+ else if (larr_x_a[x][0]) {
+ interp_from = 'X';
+ l_tmp = larr_x_a[x][0];
+ }
+ else {
+ interp_from = 'Y';
+ l_tmp = larr_y_a[y][0];
+ }
+
+ BM_elem_attrs_copy(bm, bm, l_tmp->f, f);
+
+
+ BM_face_as_array_loop_quad(f, l_quad);
+
+ l_tmp = BM_FACE_FIRST_LOOP(f);
+
+ if (use_flip) {
+ l_quad[0] = l_tmp; l_tmp = l_tmp->next;
+ l_quad[1] = l_tmp; l_tmp = l_tmp->next;
+ l_quad[3] = l_tmp; l_tmp = l_tmp->next;
+ l_quad[2] = l_tmp;
+ }
+ else {
+ l_quad[2] = l_tmp; l_tmp = l_tmp->next;
+ l_quad[3] = l_tmp; l_tmp = l_tmp->next;
+ l_quad[1] = l_tmp; l_tmp = l_tmp->next;
+ l_quad[0] = l_tmp;
+ }
+
+ i = 0;
+
+ for (x_side = 0; x_side < 2; x_side++) {
+ for (y_side = 0; y_side < 2; y_side++) {
+ if (interp_from == 'B') {
+ const float *w = weight_table[XY(x + x_side, y + y_side)];
+ l_bound[0] = larr_x_a[x][x_side]; /* B */
+ l_bound[1] = larr_y_a[y][y_side]; /* L */
+ l_bound[2] = larr_x_b[x][x_side]; /* T */
+ l_bound[3] = larr_y_b[y][y_side]; /* R */
+
+ bm_loop_interp_from_grid_boundary_4(bm, l_quad[i++], l_bound, w);
+ }
+ else if (interp_from == 'X') {
+ const float t = (float)(y + y_side) / (float)(ytot - 1);
+ l_bound[0] = larr_x_a[x][x_side]; /* B */
+ l_bound[1] = larr_x_b[x][x_side]; /* T */
+
+ bm_loop_interp_from_grid_boundary_2(bm, l_quad[i++], l_bound, t);
+ }
+ else if (interp_from == 'Y') {
+ const float t = (float)(x + x_side) / (float)(xtot - 1);
+ l_bound[0] = larr_y_a[y][y_side]; /* L */
+ l_bound[1] = larr_y_b[y][y_side]; /* R */
+
+ bm_loop_interp_from_grid_boundary_2(bm, l_quad[i++], l_bound, t);
+ }
+ else {
+ BLI_assert(0);
+ }
+ }
+ }
}
+ /* end interp */
+
+
BMO_elem_flag_enable(bm, f, FACE_OUT);
f->mat_nr = mat_nr;
if (use_smooth) {
@@ -237,22 +471,34 @@ static void bm_grid_fill_array(BMesh *bm, BMVert **v_grid, const int xtot, const
}
}
}
+
+ if (use_loop_interp) {
+ MEM_freeN(larr_x_a);
+ MEM_freeN(larr_y_a);
+ MEM_freeN(larr_x_b);
+ MEM_freeN(larr_y_b);
+ }
+
+ if (weight_table) {
+ MEM_freeN(weight_table);
+ }
+
#undef XY
}
static void bm_grid_fill(BMesh *bm,
struct BMEdgeLoopStore *estore_a, struct BMEdgeLoopStore *estore_b,
struct BMEdgeLoopStore *estore_rail_a, struct BMEdgeLoopStore *estore_rail_b,
- const short mat_nr, const bool use_smooth)
+ const short mat_nr, const bool use_smooth, const bool use_interp_simple)
{
#define USE_FLIP_DETECT
- const int xtot = BM_edgeloop_length_get(estore_a);
- const int ytot = BM_edgeloop_length_get(estore_rail_a);
+ const unsigned int xtot = (unsigned int)BM_edgeloop_length_get(estore_a);
+ const unsigned int ytot = (unsigned int)BM_edgeloop_length_get(estore_rail_a);
//BMVert *v;
- int i;
+ unsigned int i;
#ifdef DEBUG
- int x, y;
+ unsigned int x, y;
#endif
LinkData *el;
bool use_flip = false;
@@ -263,7 +509,7 @@ static void bm_grid_fill(BMesh *bm,
ListBase *lb_rail_a = BM_edgeloop_verts_get(estore_rail_a);
ListBase *lb_rail_b = BM_edgeloop_verts_get(estore_rail_b);
- BMVert **v_grid = MEM_callocN(sizeof(BMVert *) * xtot * ytot, __func__);
+ BMVert **v_grid = MEM_callocN(sizeof(BMVert *) * (size_t)(xtot * ytot), __func__);
/**
* <pre>
* estore_b
@@ -314,7 +560,7 @@ static void bm_grid_fill(BMesh *bm,
#endif
- bm_grid_fill_array(bm, v_grid, xtot, ytot, mat_nr, use_smooth, use_flip);
+ bm_grid_fill_array(bm, v_grid, xtot, ytot, mat_nr, use_smooth, use_flip, use_interp_simple);
MEM_freeN(v_grid);
#undef USE_FLIP_DETECT
@@ -322,7 +568,7 @@ static void bm_grid_fill(BMesh *bm,
static bool bm_edge_test_cb(BMEdge *e, void *bm_v)
{
- return BMO_elem_flag_test((BMesh *)bm_v, e, EDGE_MARK);
+ return BMO_elem_flag_test_bool((BMesh *)bm_v, e, EDGE_MARK);
}
static bool bm_edge_test_rail_cb(BMEdge *e, void *UNUSED(bm_v))
@@ -343,8 +589,9 @@ void bmo_grid_fill_exec(BMesh *bm, BMOperator *op)
struct BMEdgeLoopStore *estore_rail_a, *estore_rail_b;
BMVert *v_a_first, *v_a_last;
BMVert *v_b_first, *v_b_last;
- const short mat_nr = BMO_slot_int_get(op->slots_in, "mat_nr");
- const bool use_smooth = BMO_slot_bool_get(op->slots_in, "use_smooth");
+ const short mat_nr = (short)BMO_slot_int_get(op->slots_in, "mat_nr");
+ const bool use_smooth = BMO_slot_bool_get(op->slots_in, "use_smooth");
+ const bool use_interp_simple = BMO_slot_bool_get(op->slots_in, "use_interp_simple");
int count;
bool change = false;
@@ -436,9 +683,11 @@ void bmo_grid_fill_exec(BMesh *bm, BMOperator *op)
/* finally we have all edge loops needed */
bm_grid_fill(bm, estore_a, estore_b, estore_rail_a, estore_rail_b,
- mat_nr, use_smooth);
+ mat_nr, use_smooth, use_interp_simple);
change = true;
+
+
cleanup:
BM_mesh_edgeloops_free(&eloops);
BM_mesh_edgeloops_free(&eloops_rail);
diff --git a/source/blender/bmesh/operators/bmo_fill_holes.c b/source/blender/bmesh/operators/bmo_fill_holes.c
index 40a682e790d..eadfbdb1aa8 100644
--- a/source/blender/bmesh/operators/bmo_fill_holes.c
+++ b/source/blender/bmesh/operators/bmo_fill_holes.c
@@ -26,112 +26,58 @@
* Fill boundary edge loop(s) with faces.
*/
-#include "MEM_guardedalloc.h"
-
-#include "BLI_listbase.h"
-#include "BLI_alloca.h"
-#include "BLI_math.h"
+#include "BLI_utildefines.h"
#include "bmesh.h"
+#include "bmesh_tools.h"
#include "intern/bmesh_operators_private.h" /* own include */
-#define EDGE_MARK 2
-#define ELE_OUT 4
-
-/**
- * Clone of BM_face_find_longest_loop that ensures the loop has an adjacent face
- */
-static BMLoop *bm_face_find_longest_loop_manifold(BMFace *f)
-{
- BMLoop *longest_loop = NULL;
- float longest_len = 0.0f;
- BMLoop *l_iter, *l_first;
-
- l_iter = l_first = BM_FACE_FIRST_LOOP(f);
-
- do {
- if (BM_edge_is_wire(l_iter->e) == false) {
- const float len = len_squared_v3v3(l_iter->v->co, l_iter->next->v->co);
- if (len >= longest_len) {
- longest_loop = l_iter;
- longest_len = len;
- }
- }
- } while ((l_iter = l_iter->next) != l_first);
-
- return longest_loop;
-}
-
-static BMFace *bm_face_from_eloop(BMesh *bm, struct BMEdgeLoopStore *el_store)
-{
- LinkData *node = BM_edgeloop_verts_get(el_store)->first;
- const int len = BM_edgeloop_length_get(el_store);
- BMVert **f_verts = BLI_array_alloca(f_verts, len);
- BMFace *f;
- BMLoop *l;
- unsigned int i = 0;
-
- do {
- f_verts[i++] = node->data;
- } while ((node = node->next));
-
- f = BM_face_create_ngon_verts(bm, f_verts, len, 0, true, false);
- BM_face_copy_shared(bm, f);
-
- l = bm_face_find_longest_loop_manifold(f);
- if (l) {
- BMFace *f_other = l->radial_next->f;
- BLI_assert(l->radial_next != l);
- BM_elem_attrs_copy(bm, bm, f_other, f);
- }
-
- return f;
-}
-
-static bool bm_edge_test_cb(BMEdge *e, void *bm_v)
-{
- return BMO_elem_flag_test((BMesh *)bm_v, e, EDGE_MARK);
-}
-
void bmo_holes_fill_exec(BMesh *bm, BMOperator *op)
{
- ListBase eloops = {NULL, NULL};
- LinkData *el_store;
+ BMOperator op_attr;
+ const unsigned int sides = BMO_slot_int_get(op->slots_in, "sides");
- BMEdge *e;
- int count;
- BMOIter siter;
+ BM_mesh_elem_hflag_disable_all(bm, BM_EDGE | BM_FACE, BM_ELEM_TAG, false);
+ BMO_slot_buffer_hflag_enable(bm, op->slots_in, "edges", BM_EDGE, BM_ELEM_TAG, false);
- const int sides = BMO_slot_int_get(op->slots_in, "sides");
+ BM_mesh_edgenet(bm, true, true); // TODO, sides
- /* clear tags */
- BM_mesh_elem_hflag_disable_all(bm, BM_FACE, BM_ELEM_TAG, false);
+ /* bad - remove faces after as a workaround */
+ if (sides != 0) {
+ BMOIter siter;
+ BMFace *f;
- /* tag edges that may be apart of loops */
- BMO_ITER (e, &siter, op->slots_in, "edges", BM_EDGE) {
- BMO_elem_flag_set(bm, e, EDGE_MARK, BM_edge_is_boundary(e));
+ BMO_slot_buffer_from_enabled_hflag(bm, op, op->slots_out, "faces.out", BM_FACE, BM_ELEM_TAG);
+ BMO_ITER (f, &siter, op->slots_out, "faces.out", BM_FACE) {
+ if (f->len > sides) {
+ BM_face_kill(bm, f);
+ }
+ }
}
- count = BM_mesh_edgeloops_find(bm, &eloops, bm_edge_test_cb, (void *)bm);
+ BMO_slot_buffer_from_enabled_hflag(bm, op, op->slots_out, "faces.out", BM_FACE, BM_ELEM_TAG);
- for (el_store = eloops.first; el_store; el_store = el_store->next) {
- if (BM_edgeloop_is_closed((struct BMEdgeLoopStore *)el_store)) {
- const int len = BM_edgeloop_length_get((struct BMEdgeLoopStore *)el_store);
- if ((sides == 0) || (len <= sides)) {
- BMFace *f;
+ /* --- Attribute Fill --- */
+ /* may as well since we have the faces already in a buffer */
+ BMO_op_initf(bm, &op_attr, op->flag,
+ "face_attribute_fill faces=%S use_normals=%b use_data=%b",
+ op, "faces.out", true, true);
- f = bm_face_from_eloop(bm, (struct BMEdgeLoopStore *)el_store);
- BMO_elem_flag_enable(bm, f, ELE_OUT);
- }
- }
- }
+ BMO_op_exec(bm, &op_attr);
- (void)count;
+ /* check if some faces couldn't be touched */
+ if (BMO_slot_buffer_count(op_attr.slots_out, "faces_fail.out")) {
+ BMOIter siter;
+ BMFace *f;
- BM_mesh_edgeloops_free(&eloops);
+ BMO_ITER (f, &siter, op_attr.slots_out, "faces_fail.out", BM_FACE) {
+ BM_face_normal_update(f); /* normals are zero'd */
+ }
- BMO_slot_buffer_from_enabled_flag(bm, op, op->slots_out, "faces.out", BM_FACE, ELE_OUT);
+ BMO_op_callf(bm, op->flag, "recalc_face_normals faces=%S", &op_attr, "faces_fail.out");
+ }
+ BMO_op_finish(bm, &op_attr);
}
diff --git a/source/blender/bmesh/operators/bmo_hull.c b/source/blender/bmesh/operators/bmo_hull.c
index 500e984f4c9..1737e27c84a 100644
--- a/source/blender/bmesh/operators/bmo_hull.c
+++ b/source/blender/bmesh/operators/bmo_hull.c
@@ -67,7 +67,7 @@ typedef struct HullTriangle {
/*************************** Hull Triangles ***************************/
-static void hull_add_triangle(BMesh *bm, GHash *hull_triangles, BLI_mempool *pool,
+static void hull_add_triangle(BMesh *bm, GSet *hull_triangles, BLI_mempool *pool,
BMVert *v1, BMVert *v2, BMVert *v3)
{
HullTriangle *t;
@@ -82,7 +82,7 @@ static void hull_add_triangle(BMesh *bm, GHash *hull_triangles, BLI_mempool *poo
for (i = 0; i < 3; i++)
BMO_elem_flag_disable(bm, t->v[i], HULL_FLAG_INTERIOR_ELE);
- BLI_ghash_insert(hull_triangles, t, NULL);
+ BLI_gset_insert(hull_triangles, t);
normal_tri_v3(t->no, v1->co, v2->co, v3->co);
}
@@ -102,12 +102,12 @@ static BMFace *hull_find_example_face(BMesh *bm, BMEdge *e)
return NULL;
}
-static void hull_output_triangles(BMesh *bm, GHash *hull_triangles)
+static void hull_output_triangles(BMesh *bm, GSet *hull_triangles)
{
- GHashIterator iter;
+ GSetIterator iter;
- GHASH_ITER (iter, hull_triangles) {
- HullTriangle *t = BLI_ghashIterator_getKey(&iter);
+ GSET_ITER (iter, hull_triangles) {
+ HullTriangle *t = BLI_gsetIterator_getKey(&iter);
int i;
if (!t->skip) {
@@ -135,8 +135,8 @@ static void hull_output_triangles(BMesh *bm, GHash *hull_triangles)
}
/* Create new hull face */
- f = BM_face_create_quad_tri_v(bm, t->v, 3, example, true);
- BM_face_copy_shared(bm, f);
+ f = BM_face_create_verts(bm, t->v, 3, example, BM_CREATE_NO_DOUBLE, true);
+ BM_face_copy_shared(bm, f, NULL, NULL);
}
/* Mark face for 'geom.out' slot and select */
BMO_elem_flag_enable(bm, f, HULL_FLAG_OUTPUT_GEOM);
@@ -206,22 +206,22 @@ static int hull_final_edges_lookup(HullFinalEdges *final_edges,
}
/* Used for checking whether a pre-existing edge lies on the hull */
-static HullFinalEdges *hull_final_edges(GHash *hull_triangles)
+static HullFinalEdges *hull_final_edges(GSet *hull_triangles)
{
HullFinalEdges *final_edges;
- GHashIterator iter;
+ GSetIterator iter;
final_edges = MEM_callocN(sizeof(HullFinalEdges), "HullFinalEdges");
final_edges->edges = BLI_ghash_ptr_new("final edges ghash");
final_edges->base_pool = BLI_mempool_create(sizeof(ListBase), 128, 128, 0);
final_edges->link_pool = BLI_mempool_create(sizeof(LinkData), 128, 128, 0);
- GHASH_ITER (iter, hull_triangles) {
+ GSET_ITER (iter, hull_triangles) {
LinkData *link;
int i;
for (i = 0; i < 3; i++) {
- HullTriangle *t = BLI_ghashIterator_getKey(&iter);
+ HullTriangle *t = BLI_gsetIterator_getKey(&iter);
BMVert *v1 = t->v[i];
BMVert *v2 = t->v[(i + 1) % 3];
ListBase *adj;
@@ -259,13 +259,13 @@ static void hull_final_edges_free(HullFinalEdges *final_edges)
/**************************** Final Output ****************************/
-static void hull_remove_overlapping(BMesh *bm, GHash *hull_triangles,
+static void hull_remove_overlapping(BMesh *bm, GSet *hull_triangles,
HullFinalEdges *final_edges)
{
- GHashIterator hull_iter;
+ GSetIterator hull_iter;
- GHASH_ITER (hull_iter, hull_triangles) {
- HullTriangle *t = BLI_ghashIterator_getKey(&hull_iter);
+ GSET_ITER (hull_iter, hull_triangles) {
+ HullTriangle *t = BLI_gsetIterator_getKey(&hull_iter);
BMIter bm_iter1, bm_iter2;
BMFace *f;
bool f_on_hull;
@@ -444,7 +444,7 @@ static BMVert **hull_input_verts_copy(BMOperator *op,
static float (*hull_verts_for_bullet(BMVert **input_verts,
const int num_input_verts))[3]
{
- float (*coords)[3] = MEM_callocN(sizeof(*coords) * num_input_verts, AT);
+ float (*coords)[3] = MEM_callocN(sizeof(*coords) * num_input_verts, __func__);
int i;
for (i = 0; i < num_input_verts; i++) {
@@ -479,7 +479,7 @@ static BMVert **hull_verts_from_bullet(plConvexHull hull,
}
static void hull_from_bullet(BMesh *bm, BMOperator *op,
- GHash *hull_triangles,
+ GSet *hull_triangles,
BLI_mempool *pool)
{
int *fvi = NULL;
@@ -556,7 +556,7 @@ void bmo_convex_hull_exec(BMesh *bm, BMOperator *op)
BLI_mempool *hull_pool;
BMElemF *ele;
BMOIter oiter;
- GHash *hull_triangles;
+ GSet *hull_triangles;
/* Verify that at least three verts in the input */
if (!hull_num_input_verts_is_ok(op)) {
@@ -575,7 +575,7 @@ void bmo_convex_hull_exec(BMesh *bm, BMOperator *op)
}
hull_pool = BLI_mempool_create(sizeof(HullTriangle), 128, 128, 0);
- hull_triangles = BLI_ghash_ptr_new("hull_triangles");
+ hull_triangles = BLI_gset_ptr_new("hull_triangles");
hull_from_bullet(bm, op, hull_triangles, hull_pool);
@@ -597,7 +597,7 @@ void bmo_convex_hull_exec(BMesh *bm, BMOperator *op)
hull_output_triangles(bm, hull_triangles);
BLI_mempool_destroy(hull_pool);
- BLI_ghash_free(hull_triangles, NULL, NULL);
+ BLI_gset_free(hull_triangles, NULL);
hull_tag_unused(bm, op);
diff --git a/source/blender/bmesh/operators/bmo_inset.c b/source/blender/bmesh/operators/bmo_inset.c
index a7b98cda2b3..e20556a830d 100644
--- a/source/blender/bmesh/operators/bmo_inset.c
+++ b/source/blender/bmesh/operators/bmo_inset.c
@@ -31,7 +31,7 @@
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
-#include "BLI_array.h"
+#include "BLI_alloca.h"
#include "BLI_memarena.h"
#include "BKE_customdata.h"
@@ -42,199 +42,263 @@
#define ELE_NEW 1
-
/* -------------------------------------------------------------------- */
-/* Inset Individual */
-
-
-/* Holds Per-Face Inset Edge Data */
-typedef struct EdgeInsetInfo {
- float no[3];
- BMEdge *e_old;
- BMEdge *e_new;
-} EdgeInsetInfo;
+/* Generic Interp Face (use for both types of inset) */
/**
- * Individual Face Inset.
- * Find all tagged faces (f), duplicate edges around faces, inset verts of
- * created edges, create new faces between old and new edges, fill face
- * between connected new edges, kill old face (f).
- */
-void bmo_inset_individual_exec(BMesh *bm, BMOperator *op)
-{
- BMEdge **f_edges = NULL;
- BMVert **f_verts = NULL;
+ * Interpolation, this is more complex for regions since we're not creating new faces
+ * and throwing away old ones, so instead, store face data needed for interpolation.
+ *
+ * \note This uses CustomData functions in quite a low-level way which should be
+ * avoided, but in this case its hard to do without storing a duplicate mesh. */
+
+/* just enough of a face to store interpolation data we can use once the inset is done */
+typedef struct InterpFace {
BMFace *f;
+ void **blocks_l;
+ void **blocks_v;
+ float (*cos_2d)[2];
+ float axis_mat[3][3];
+} InterpFace;
- BMOIter oiter;
- EdgeInsetInfo *eiinfo_arr = NULL;
+/* basically a clone of #BM_vert_interp_from_face */
+static void bm_interp_face_store(InterpFace *iface, BMesh *bm, BMFace *f, MemArena *interp_arena)
+{
+ BMLoop *l_iter, *l_first;
+ void **blocks_l = iface->blocks_l = BLI_memarena_alloc(interp_arena, sizeof(*iface->blocks_l) * f->len);
+ void **blocks_v = iface->blocks_v = BLI_memarena_alloc(interp_arena, sizeof(*iface->blocks_v) * f->len);
+ float (*cos_2d)[2] = iface->cos_2d = BLI_memarena_alloc(interp_arena, sizeof(*iface->cos_2d) * f->len);
+ void *axis_mat = iface->axis_mat;
+ int i;
- BLI_array_declare(eiinfo_arr);
- BLI_array_declare(f_edges);
- BLI_array_declare(f_verts);
+ BLI_assert(BM_face_is_normal_valid(f));
- const float thickness = BMO_slot_float_get(op->slots_in, "thickness");
- const float depth = BMO_slot_float_get(op->slots_in, "depth");
- const bool use_even_offset = BMO_slot_bool_get(op->slots_in, "use_even_offset");
- const bool use_relative_offset = BMO_slot_bool_get(op->slots_in, "use_relative_offset");
- const bool use_interpolate = BMO_slot_bool_get(op->slots_in, "use_interpolate");
+ axis_dominant_v3_to_m3(axis_mat, f->no);
- /* Only tag faces in slot */
- BM_mesh_elem_hflag_disable_all(bm, BM_FACE, BM_ELEM_TAG, false);
+ iface->f = f;
- BMO_slot_buffer_hflag_enable(bm, op->slots_in, "faces", BM_FACE, BM_ELEM_TAG, false);
+ i = 0;
+ l_iter = l_first = BM_FACE_FIRST_LOOP(f);
+ do {
+ mul_v2_m3v3(cos_2d[i], axis_mat, l_iter->v->co);
+ blocks_l[i] = NULL;
+ CustomData_bmesh_copy_data(&bm->ldata, &bm->ldata, l_iter->head.data, &blocks_l[i]);
+ /* if we were not modifying the loops later we would do... */
+ // blocks[i] = l_iter->head.data;
- BMO_ITER(f, &oiter, op->slots_in, "faces", BM_FACE) {
- BMFace *f_new_inner;
- BMLoop *l_iter, *l_first;
- BMLoop *l_iter_inner = NULL;
- int i;
-
- BLI_array_empty(f_verts);
- BLI_array_empty(f_edges);
- BLI_array_empty(eiinfo_arr);
- BLI_array_grow_items(f_verts, f->len);
- BLI_array_grow_items(f_edges, f->len);
- BLI_array_grow_items(eiinfo_arr, f->len);
-
- /* create verts */
- i = 0;
- l_iter = l_first = BM_FACE_FIRST_LOOP(f);
- do {
- f_verts[i] = BM_vert_create(bm, l_iter->v->co, l_iter->v, 0);
- i++;
- } while ((l_iter = l_iter->next) != l_first);
+ blocks_v[i] = NULL;
+ CustomData_bmesh_copy_data(&bm->vdata, &bm->vdata, l_iter->v->head.data, &blocks_v[i]);
- /* make edges */
- i = 0;
- l_iter = l_first;
- do {
- f_edges[i] = BM_edge_create(bm, f_verts[i], f_verts[(i + 1) % f->len], l_iter->e, 0);
+ /* use later for index lookups */
+ BM_elem_index_set(l_iter, i); /* set_ok */
+ } while (i++, (l_iter = l_iter->next) != l_first);
+}
+static void bm_interp_face_free(InterpFace *iface, BMesh *bm)
+{
+ void **blocks_l = iface->blocks_l;
+ void **blocks_v = iface->blocks_v;
+ int i;
- eiinfo_arr[i].e_new = f_edges[i];
- eiinfo_arr[i].e_old = l_iter->e;
- BM_edge_calc_face_tangent(l_iter->e, l_iter, eiinfo_arr[i].no);
+ for (i = 0; i < iface->f->len; i++) {
+ CustomData_bmesh_free_block(&bm->ldata, &blocks_l[i]);
+ CustomData_bmesh_free_block(&bm->vdata, &blocks_v[i]);
+ }
+}
- /* Tagging (old elements) required when iterating over edges
- * connected to verts for translation vector calculation */
- BM_elem_flag_enable(l_iter->e, BM_ELEM_TAG);
- BM_elem_index_set(l_iter->e, i); /* set_dirty! */
- i++;
- } while ((l_iter = l_iter->next) != l_first);
- /* done with edges */
- bm->elem_index_dirty |= BM_EDGE;
+/* -------------------------------------------------------------------- */
+/* Inset Individual */
- /* Calculate translation vector for new */
- l_iter = l_first;
- do {
- EdgeInsetInfo *ei_prev = &eiinfo_arr[BM_elem_index_get(l_iter->prev->e)];
- EdgeInsetInfo *ei_next = &eiinfo_arr[BM_elem_index_get(l_iter->e)];
- float tvec[3];
- float v_new_co[3];
- int index = 0;
+static void bmo_face_inset_individual(
+ BMesh *bm, BMFace *f, MemArena *interp_arena,
+ const float thickness, const float depth,
+ const bool use_even_offset, const bool use_relative_offset, const bool use_interpolate)
+{
+ InterpFace *iface = NULL;
- add_v3_v3v3(tvec, ei_prev->no, ei_next->no);
- normalize_v3(tvec);
+ /* stores verts split away from the face (aligned with face verts) */
+ BMVert **verts = BLI_array_alloca(verts, f->len);
+ /* store edge normals (aligned with face-loop-edges) */
+ float (*edge_nors)[3] = BLI_array_alloca(edge_nors, f->len);
+ float (*coords)[3] = BLI_array_alloca(coords, f->len);
- /* l->e is traversed in order */
- index = BM_elem_index_get(l_iter->e);
+ BMLoop *l_iter, *l_first;
+ BMLoop *l_other;
+ unsigned int i;
+ float e_length_prev;
- copy_v3_v3(v_new_co, eiinfo_arr[index].e_new->v1->co);
+ l_first = BM_FACE_FIRST_LOOP(f);
- if (use_even_offset) {
- mul_v3_fl(tvec, shell_angle_to_dist(angle_normalized_v3v3(ei_prev->no, ei_next->no) / 2.0f));
- }
+ /* split off all loops */
+ l_iter = l_first;
+ i = 0;
+ do {
+ BMVert *v_other = l_iter->v;
+ BMVert *v_sep = BM_face_loop_separate(bm, l_iter);
+ if (v_sep == v_other) {
+ v_other = BM_vert_create(bm, l_iter->v->co, l_iter->v, BM_CREATE_NOP);
+ }
+ verts[i] = v_other;
- /* Modify vertices and their normals */
- if (use_relative_offset) {
- mul_v3_fl(tvec, (BM_edge_calc_length(l_iter->e) + BM_edge_calc_length(l_iter->prev->e)) / 2.0f);
- }
+ /* unrelated to splitting, but calc here */
+ BM_edge_calc_face_tangent(l_iter->e, l_iter, edge_nors[i]);
+ } while (i++, ((l_iter = l_iter->next) != l_first));
- madd_v3_v3fl(v_new_co, tvec, thickness);
- /* Set normal, add depth and write new vertex position*/
- copy_v3_v3(eiinfo_arr[index].e_new->v1->no, f->no);
+ /* build rim faces */
+ l_iter = l_first;
+ i = 0;
+ do {
+ BMFace *f_new_outer;
+ BMVert *v_other = verts[i];
+ BMVert *v_other_next = verts[(i + 1) % f->len];
+
+ BMEdge *e_other = BM_edge_create(bm, v_other, v_other_next, l_iter->e, BM_CREATE_NO_DOUBLE);
+ (void)e_other;
+
+ f_new_outer = BM_face_create_quad_tri(bm,
+ v_other,
+ v_other_next,
+ l_iter->next->v,
+ l_iter->v,
+ f, BM_CREATE_NOP);
+ BMO_elem_flag_enable(bm, f_new_outer, ELE_NEW);
+
+ /* copy loop data */
+ l_other = l_iter->radial_next;
+ BM_elem_attrs_copy(bm, bm, l_iter->next, l_other->prev);
+ BM_elem_attrs_copy(bm, bm, l_iter, l_other->next->next);
+
+ if (use_interpolate == false) {
+ BM_elem_attrs_copy(bm, bm, l_iter->next, l_other);
+ BM_elem_attrs_copy(bm, bm, l_iter, l_other->next);
+ }
+ } while (i++, ((l_iter = l_iter->next) != l_first));
- madd_v3_v3fl(v_new_co, f->no, depth);
+ /* hold interpolation values */
+ if (use_interpolate) {
+ iface = BLI_memarena_alloc(interp_arena, sizeof(*iface));
+ bm_interp_face_store(iface, bm, f, interp_arena);
+ }
- copy_v3_v3(eiinfo_arr[index].e_new->v1->co, v_new_co);
- } while ((l_iter = l_iter->next) != l_first);
+ /* Calculate translation vector for new */
+ l_iter = l_first;
+ i = 0;
+ if (depth != 0.0f) {
+ e_length_prev = BM_edge_calc_length(l_iter->prev->e);
+ }
- /* Create New Inset Faces */
- f_new_inner = BM_face_create(bm, f_verts, f_edges, f->len, 0);
- BLI_assert(f_new_inner != NULL); /* no reason it should fail */
+ do {
+ const float *eno_prev = edge_nors[(i ? i : f->len) - 1];
+ const float *eno_next = edge_nors[i];
+ float tvec[3];
+ float v_new_co[3];
+ add_v3_v3v3(tvec, eno_prev, eno_next);
+ normalize_v3(tvec);
- // Don't tag, gives more useful inner/outer select option
- // BMO_elem_flag_enable(bm, f_new_inner, ELE_NEW);
+ copy_v3_v3(v_new_co, l_iter->v->co);
+ if (use_even_offset) {
+ mul_v3_fl(tvec, shell_angle_to_dist(angle_normalized_v3v3(eno_prev, eno_next) / 2.0f));
+ }
- /* Copy Face Data */
- /* interpolate loop data or just stretch */
- if (use_interpolate) {
- BM_face_interp_from_face(bm, f_new_inner, f, true);
+ /* Modify vertices and their normals */
+ if (use_relative_offset) {
+ mul_v3_fl(tvec, (BM_edge_calc_length(l_iter->e) + BM_edge_calc_length(l_iter->prev->e)) / 2.0f);
}
- else {
- BM_elem_attrs_copy(bm, bm, f, f_new_inner);
+
+ madd_v3_v3fl(v_new_co, tvec, thickness);
+
+ /* Set normal, add depth and write new vertex position*/
+ copy_v3_v3(l_iter->v->no, f->no);
+
+ if (depth != 0.0f) {
+ const float e_length = BM_edge_calc_length(l_iter->e);
+ const float fac = depth * (use_relative_offset ? ((e_length_prev + e_length) * 0.5f) : 1.0f);
+ e_length_prev = e_length;
+
+ madd_v3_v3fl(v_new_co, f->no, fac);
}
- l_iter_inner = BM_FACE_FIRST_LOOP(f_new_inner);
+
+
+ copy_v3_v3(coords[i], v_new_co);
+ } while (i++, ((l_iter = l_iter->next) != l_first));
+
+ /* update the coords */
+ l_iter = l_first;
+ i = 0;
+ do {
+ copy_v3_v3(l_iter->v->co, coords[i]);
+ } while (i++, ((l_iter = l_iter->next) != l_first));
+
+
+ if (use_interpolate) {
+ BM_face_interp_from_face_ex(bm, iface->f, iface->f, true,
+ iface->blocks_l, iface->blocks_v, iface->cos_2d, iface->axis_mat);
+
+ /* build rim faces */
l_iter = l_first;
do {
- BMFace *f_new_outer;
+ /* copy loop data */
+ l_other = l_iter->radial_next;
- BMLoop *l_a;
- BMLoop *l_b;
-
- if (use_interpolate == false) {
- BM_elem_attrs_copy(bm, bm, l_iter, l_iter_inner);
- }
+ BM_elem_attrs_copy(bm, bm, l_iter->next, l_other);
+ BM_elem_attrs_copy(bm, bm, l_iter, l_other->next);
+ } while ((l_iter = l_iter->next) != l_first);
- f_new_outer = BM_face_create_quad_tri(bm,
- l_iter->v,
- l_iter->next->v,
- l_iter_inner->next->v,
- l_iter_inner->v,
- f, false);
+ bm_interp_face_free(iface, bm);
+ }
+}
- BLI_assert(f_new_outer != NULL); /* no reason it should fail */
- BM_elem_attrs_copy(bm, bm, f, f_new_outer);
- BMO_elem_flag_enable(bm, f_new_outer, ELE_NEW);
- BM_elem_flag_enable(f_new_outer, BM_ELEM_TAG);
+/**
+ * Individual Face Inset.
+ * Find all tagged faces (f), duplicate edges around faces, inset verts of
+ * created edges, create new faces between old and new edges, fill face
+ * between connected new edges, kill old face (f).
+ */
+void bmo_inset_individual_exec(BMesh *bm, BMOperator *op)
+{
+ BMFace *f;
- /* Copy Loop Data */
- l_a = BM_FACE_FIRST_LOOP(f_new_outer);
- l_b = l_a->next;
+ BMOIter oiter;
+ MemArena *interp_arena = NULL;
- /* first pair */
- BM_elem_attrs_copy(bm, bm, l_iter, l_a);
- BM_elem_attrs_copy(bm, bm, l_iter->next, l_b);
+ const float thickness = BMO_slot_float_get(op->slots_in, "thickness");
+ const float depth = BMO_slot_float_get(op->slots_in, "depth");
+ const bool use_even_offset = BMO_slot_bool_get(op->slots_in, "use_even_offset");
+ const bool use_relative_offset = BMO_slot_bool_get(op->slots_in, "use_relative_offset");
+ const bool use_interpolate = BMO_slot_bool_get(op->slots_in, "use_interpolate");
+ /* Only tag faces in slot */
+ BM_mesh_elem_hflag_disable_all(bm, BM_FACE, BM_ELEM_TAG, false);
- /* Move to the last two loops in new face */
- l_a = l_b->next;
- l_b = l_a->next;
+ BMO_slot_buffer_hflag_enable(bm, op->slots_in, "faces", BM_FACE, BM_ELEM_TAG, false);
- /* This loop should always have >1 radials
- * (associated edge connects new and old face) */
- BM_elem_attrs_copy(bm, bm, l_iter_inner, l_b);
- BM_elem_attrs_copy(bm, bm, use_interpolate ? l_iter_inner->next : l_iter->next, l_a);
+ if (use_interpolate) {
+ interp_arena = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, __func__);
+ }
- } while ((l_iter_inner = l_iter_inner->next),
- (l_iter = l_iter->next) != l_first);
+ BMO_ITER (f, &oiter, op->slots_in, "faces", BM_FACE) {
+ bmo_face_inset_individual(
+ bm, f, interp_arena,
+ thickness, depth,
+ use_even_offset, use_relative_offset, use_interpolate);
- BM_face_kill(bm, f);
+ if (use_interpolate) {
+ BLI_memarena_clear(interp_arena);
+ }
}
/* we could flag new edges/verts too, is it useful? */
BMO_slot_buffer_from_enabled_flag(bm, op, op->slots_out, "faces.out", BM_FACE, ELE_NEW);
- BLI_array_free(f_verts);
- BLI_array_free(f_edges);
- BLI_array_free(eiinfo_arr);
+ if (use_interpolate) {
+ BLI_memarena_free(interp_arena);
+ }
}
@@ -250,68 +314,6 @@ typedef struct SplitEdgeInfo {
BMLoop *l;
} SplitEdgeInfo;
-
-/**
- * Interpolation, this is more complex for regions since we're not creating new faces
- * and throwing away old ones, so instead, store face data needed for interpolation.
- *
- * \note This uses CustomData functions in quite a low-level way which should be
- * avoided, but in this case its hard to do without storing a duplicate mesh. */
-
-/* just enough of a face to store interpolation data we can use once the inset is done */
-typedef struct InterpFace {
- BMFace *f;
- void **blocks_l;
- void **blocks_v;
- float (*cos_2d)[2];
- float axis_mat[3][3];
-} InterpFace;
-
-/* basically a clone of #BM_vert_interp_from_face */
-static void bm_interp_face_store(InterpFace *iface, BMesh *bm, BMFace *f, MemArena *interp_arena)
-{
- BMLoop *l_iter, *l_first;
- void **blocks_l = iface->blocks_l = BLI_memarena_alloc(interp_arena, sizeof(*iface->blocks_l) * f->len);
- void **blocks_v = iface->blocks_v = BLI_memarena_alloc(interp_arena, sizeof(*iface->blocks_v) * f->len);
- float (*cos_2d)[2] = iface->cos_2d = BLI_memarena_alloc(interp_arena, sizeof(*iface->cos_2d) * f->len);
- void *axis_mat = iface->axis_mat;
- int i;
-
- BLI_assert(BM_face_is_normal_valid(f));
-
- axis_dominant_v3_to_m3(axis_mat, f->no);
-
- iface->f = f;
-
- i = 0;
- l_iter = l_first = BM_FACE_FIRST_LOOP(f);
- do {
- mul_v2_m3v3(cos_2d[i], axis_mat, l_iter->v->co);
- blocks_l[i] = NULL;
- CustomData_bmesh_copy_data(&bm->ldata, &bm->ldata, l_iter->head.data, &blocks_l[i]);
- /* if we were not modifying the loops later we would do... */
- // blocks[i] = l_iter->head.data;
-
- blocks_v[i] = NULL;
- CustomData_bmesh_copy_data(&bm->vdata, &bm->vdata, l_iter->v->head.data, &blocks_v[i]);
-
- /* use later for index lookups */
- BM_elem_index_set(l_iter, i); /* set_ok */
- } while (i++, (l_iter = l_iter->next) != l_first);
-}
-static void bm_interp_face_free(InterpFace *iface, BMesh *bm)
-{
- void **blocks_l = iface->blocks_l;
- void **blocks_v = iface->blocks_v;
- int i;
-
- for (i = 0; i < iface->f->len; i++) {
- CustomData_bmesh_free_block(&bm->ldata, &blocks_l[i]);
- CustomData_bmesh_free_block(&bm->vdata, &blocks_v[i]);
- }
-}
-
-
/**
* return the tag loop where there is...
* - only 1 tagged face attached to this edge.
@@ -350,6 +352,27 @@ static BMLoop *bm_edge_is_mixed_face_tag(BMLoop *l)
}
}
+static float bm_edge_info_average_length(BMVert *v, SplitEdgeInfo *edge_info)
+{
+ BMIter iter;
+ BMEdge *e;
+
+ float len = 0.0f;
+ int tot = 0;
+
+
+ BM_ITER_ELEM (e, &iter, v, BM_EDGES_OF_VERT) {
+ const int i = BM_elem_index_get(e);
+ if (i != -1) {
+ len += edge_info[i].length;
+ tot++;
+ }
+ }
+
+ BLI_assert(tot != 0);
+ return len / (float)tot;
+}
+
/**
* implementation is as follows...
*
@@ -465,7 +488,7 @@ void bmo_inset_region_exec(BMesh *bm, BMOperator *op)
if (es->e_new == es->e_old) { /* happens on boundary edges */
/* take care here, we're creating this double edge which _must_ have its verts replaced later on */
- es->e_old = BM_edge_create(bm, es->e_new->v1, es->e_new->v2, es->e_new, 0);
+ es->e_old = BM_edge_create(bm, es->e_new->v1, es->e_new->v2, es->e_new, BM_CREATE_NOP);
}
/* store index back to original in 'edge_info' */
@@ -508,8 +531,8 @@ void bmo_inset_region_exec(BMesh *bm, BMOperator *op)
mid_v3_v3v3(tvec, es->e_new->v1->co, es->e_new->v2->co);
- v1 = BM_vert_create(bm, tvec, NULL);
- v2 = BM_vert_create(bm, tvec, NULL);
+ v1 = BM_vert_create(bm, tvec, NULL, BM_CREATE_NOP);
+ v2 = BM_vert_create(bm, tvec, NULL, BM_CREATE_NOP);
madd_v3_v3fl(v2->co, es->no, 0.1f);
BM_edge_create(bm, v1, v2, NULL, 0);
}
@@ -787,7 +810,7 @@ void bmo_inset_region_exec(BMesh *bm, BMOperator *op)
#endif
/* no need to check doubles, we KNOW there won't be any */
/* yes - reverse face is correct in this case */
- f = BM_face_create_quad_tri_v(bm, varr, j, es->l->f, false);
+ f = BM_face_create_verts(bm, varr, j, es->l->f, BM_CREATE_NOP, true);
BMO_elem_flag_enable(bm, f, ELE_NEW);
/* copy for loop data, otherwise UV's and vcols are no good.
@@ -796,7 +819,7 @@ void bmo_inset_region_exec(BMesh *bm, BMOperator *op)
#if 0
/* don't use this because face boundaries have no adjacent loops and won't be filled in.
* instead copy from the opposite side with the code below */
- BM_face_copy_shared(bm, f);
+ BM_face_copy_shared(bm, f, NULL, NULL);
#else
{
/* 2 inner loops on the edge between the new face and the original */
@@ -894,7 +917,7 @@ void bmo_inset_region_exec(BMesh *bm, BMOperator *op)
BM_ITER_MESH_INDEX (v, &iter, bm, BM_VERTS_OF_MESH, i) {
if (BM_elem_flag_test(v, BM_ELEM_TAG)) {
const float fac = (depth *
- (use_relative_offset ? BM_vert_calc_mean_tagged_edge_length(v) : 1.0f) *
+ (use_relative_offset ? bm_edge_info_average_length(v, edge_info) : 1.0f) *
(use_even_boundry ? BM_vert_calc_shell_factor(v) : 1.0f));
madd_v3_v3v3fl(varr_co[i], v->co, v->no, fac);
}
diff --git a/source/blender/bmesh/operators/bmo_join_triangles.c b/source/blender/bmesh/operators/bmo_join_triangles.c
index 12065743136..6562f26062f 100644
--- a/source/blender/bmesh/operators/bmo_join_triangles.c
+++ b/source/blender/bmesh/operators/bmo_join_triangles.c
@@ -34,6 +34,7 @@
#include "DNA_meshdata_types.h"
#include "BLI_math.h"
+#include "BLI_sort_utils.h"
#include "BKE_customdata.h"
@@ -181,10 +182,6 @@ static bool bm_edge_faces_cmp(BMesh *bm, BMEdge *e, const bool do_uv, const bool
return true;
}
-typedef struct JoinEdge {
- float weight;
- BMEdge *e;
-} JoinEdge;
#define EDGE_MARK 1
#define EDGE_CHOSEN 2
@@ -192,14 +189,7 @@ typedef struct JoinEdge {
#define FACE_MARK 1
#define FACE_INPUT 2
-static int fplcmp(const void *v1, const void *v2)
-{
- const JoinEdge *e1 = (JoinEdge *)v1, *e2 = (JoinEdge *)v2;
- if (e1->weight > e2->weight) return 1;
- else if (e1->weight < e2->weight) return -1;
- else return 0;
-}
void bmo_join_triangles_exec(BMesh *bm, BMOperator *op)
{
@@ -213,8 +203,9 @@ void bmo_join_triangles_exec(BMesh *bm, BMOperator *op)
BMIter iter;
BMOIter siter;
BMFace *f;
- BMEdge *e;
- JoinEdge *jedges = NULL;
+ BMEdge *e, *e_next;
+ /* data: edge-to-join, sort_value: error weight */
+ struct SortPointerByFloat *jedges;
unsigned i, totedge;
unsigned int totedge_tag = 0;
@@ -271,19 +262,19 @@ void bmo_join_triangles_exec(BMesh *bm, BMOperator *op)
measure = measure_facepair(v1->co, v2->co, v3->co, v4->co, limit);
if (measure < limit) {
- jedges[i].e = e;
- jedges[i].weight = measure;
+ jedges[i].data = e;
+ jedges[i].sort_value = measure;
i++;
}
}
totedge = i;
- qsort(jedges, totedge, sizeof(JoinEdge), fplcmp);
+ qsort(jedges, totedge, sizeof(*jedges), BLI_sortutil_cmp_float);
for (i = 0; i < totedge; i++) {
BMFace *f_a, *f_b;
- e = jedges[i].e;
+ e = jedges[i].data;
f_a = e->l->f;
f_b = e->l->radial_next->f;
@@ -300,7 +291,7 @@ void bmo_join_triangles_exec(BMesh *bm, BMOperator *op)
MEM_freeN(jedges);
/* join best weighted */
- BM_ITER_MESH (e, &iter, bm, BM_EDGES_OF_MESH) {
+ BM_ITER_MESH_MUTABLE (e, e_next, &iter, bm, BM_EDGES_OF_MESH) {
BMFace *f_new;
BMFace *f_a, *f_b;
@@ -317,7 +308,7 @@ void bmo_join_triangles_exec(BMesh *bm, BMOperator *op)
}
/* join 2-tri islands */
- BM_ITER_MESH (e, &iter, bm, BM_EDGES_OF_MESH) {
+ BM_ITER_MESH_MUTABLE (e, e_next, &iter, bm, BM_EDGES_OF_MESH) {
if (BMO_elem_flag_test(bm, e, EDGE_MARK)) {
BMLoop *l_a, *l_b;
BMFace *f_a, *f_b;
@@ -335,7 +326,11 @@ void bmo_join_triangles_exec(BMesh *bm, BMOperator *op)
(BMO_elem_flag_test(bm, l_a->next->e, EDGE_MARK) == false) &&
(BMO_elem_flag_test(bm, l_a->prev->e, EDGE_MARK) == false) &&
(BMO_elem_flag_test(bm, l_b->next->e, EDGE_MARK) == false) &&
- (BMO_elem_flag_test(bm, l_b->prev->e, EDGE_MARK) == false))
+ (BMO_elem_flag_test(bm, l_b->prev->e, EDGE_MARK) == false) &&
+ /* check for faces that use same verts, this is supported but raises an error
+ * and cancels the operation when performed from editmode, since this is only
+ * two triangles we only need to compare a single vertex */
+ (LIKELY(l_a->prev->v != l_b->prev->v)))
{
BMFace *f_new;
f_new = BM_faces_join_pair(bm, f_a, f_b, e, true);
diff --git a/source/blender/bmesh/operators/bmo_normals.c b/source/blender/bmesh/operators/bmo_normals.c
index 025b8557331..1eaa0695ad2 100644
--- a/source/blender/bmesh/operators/bmo_normals.c
+++ b/source/blender/bmesh/operators/bmo_normals.c
@@ -29,6 +29,7 @@
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
+#include "BLI_linklist_stack.h"
#include "bmesh.h"
@@ -46,7 +47,7 @@ static bool bmo_recalc_normal_edge_filter_cb(BMElem *ele, void *UNUSED(user_data
}
/**
- * Given an array of faces, recalcualte their normals.
+ * Given an array of faces, recalculate their normals.
* this functions assumes all faces in the array are connected by edges.
*
* \param bm
@@ -65,8 +66,7 @@ static void bmo_recalc_face_normals_array(BMesh *bm, BMFace **faces, const int f
float f_len_best;
BMFace *f;
- BMFace **fstack = MEM_mallocN(sizeof(*fstack) * faces_len, __func__);
- STACK_DECLARE(fstack);
+ BLI_LINKSTACK_DECLARE(fstack, BMFace *);
zero_v3(cent);
@@ -77,6 +77,7 @@ static void bmo_recalc_face_normals_array(BMesh *bm, BMFace **faces, const int f
madd_v3_v3fl(cent, f_cent, cent_fac);
BLI_assert(BMO_elem_flag_test(bm, faces[i], FACE_TEMP) == 0);
+ BLI_assert(BM_face_is_normal_valid(faces[i]));
}
f_len_best = -FLT_MAX;
@@ -102,12 +103,12 @@ static void bmo_recalc_face_normals_array(BMesh *bm, BMFace **faces, const int f
* have the same winding. this is done recursively, using a manual
* stack (if we use simple function recursion, we'd end up overloading
* the stack on large meshes). */
- STACK_INIT(fstack);
+ BLI_LINKSTACK_INIT(fstack);
- STACK_PUSH(fstack, faces[f_start_index]);
+ BLI_LINKSTACK_PUSH(fstack, faces[f_start_index]);
BMO_elem_flag_enable(bm, faces[f_start_index], FACE_TEMP);
- while ((f = STACK_POP(fstack))) {
+ while ((f = BLI_LINKSTACK_POP(fstack))) {
const bool flip_state = BMO_elem_flag_test_bool(bm, f, FACE_FLIP);
BMLoop *l_iter, *l_first;
@@ -119,13 +120,13 @@ static void bmo_recalc_face_normals_array(BMesh *bm, BMFace **faces, const int f
if (!BMO_elem_flag_test(bm, l_other->f, FACE_TEMP)) {
BMO_elem_flag_enable(bm, l_other->f, FACE_TEMP);
BMO_elem_flag_set(bm, l_other->f, FACE_FLIP, (l_other->v == l_iter->v) != flip_state);
- STACK_PUSH(fstack, l_other->f);
+ BLI_LINKSTACK_PUSH(fstack, l_other->f);
}
}
} while ((l_iter = l_iter->next) != l_first);
}
- MEM_freeN(fstack);
+ BLI_LINKSTACK_FREE(fstack);
/* apply flipping to oflag'd faces */
for (i = 0; i < faces_len; i++) {
diff --git a/source/blender/bmesh/operators/bmo_poke.c b/source/blender/bmesh/operators/bmo_poke.c
index 03084ebb1b6..26f20656478 100644
--- a/source/blender/bmesh/operators/bmo_poke.c
+++ b/source/blender/bmesh/operators/bmo_poke.c
@@ -65,10 +65,10 @@ void bmo_poke_exec(BMesh *bm, BMOperator *op)
break;
default:
BLI_assert(0);
- break;
+ return;
}
- BMO_ITER(f, &oiter, op->slots_in, "faces", BM_FACE) {
+ BMO_ITER (f, &oiter, op->slots_in, "faces", BM_FACE) {
BMFace *f_new;
float f_center[3];
BMVert *v_center = NULL;
@@ -83,7 +83,7 @@ void bmo_poke_exec(BMesh *bm, BMOperator *op)
int i;
bm_face_calc_center_fn(f, f_center);
- v_center = BM_vert_create(bm, f_center, NULL, 0);
+ v_center = BM_vert_create(bm, f_center, NULL, BM_CREATE_NOP);
BMO_elem_flag_enable(bm, v_center, ELE_NEW);
/* handled by BM_loop_interp_from_face */
diff --git a/source/blender/bmesh/operators/bmo_primitive.c b/source/blender/bmesh/operators/bmo_primitive.c
index 9f17c1dd8e3..6a540928d43 100644
--- a/source/blender/bmesh/operators/bmo_primitive.c
+++ b/source/blender/bmesh/operators/bmo_primitive.c
@@ -36,7 +36,7 @@
/* ************************ primitives ******************* */
-static float icovert[12][3] = {
+static const float icovert[12][3] = {
{0.0f, 0.0f, -200.0f},
{144.72f, -105.144f, -89.443f},
{-55.277f, -170.128, -89.443f},
@@ -51,7 +51,7 @@ static float icovert[12][3] = {
{0.0f, 0.0f, 200.0f}
};
-static short icoface[20][3] = {
+static const short icoface[20][3] = {
{0, 1, 2},
{1, 0, 5},
{0, 2, 3},
@@ -78,10 +78,10 @@ static short icoface[20][3] = {
* this hack is only used so that scons & mingw + split-sources hack works
* ------------------------------- start copied code */
/* these are not the monkeys you are looking for */
-static int monkeyo = 4;
-static int monkeynv = 271;
-static int monkeynf = 250;
-static signed char monkeyv[271][3] = {
+static const int monkeyo = 4;
+static const int monkeynv = 271;
+static const int monkeynf = 250;
+static const signed char monkeyv[271][3] = {
{-71, 21, 98}, {-63, 12, 88}, {-57, 7, 74}, {-82, -3, 79}, {-82, 4, 92},
{-82, 17, 100}, {-92, 21, 102}, {-101, 12, 95}, {-107, 7, 83},
{-117, 31, 84}, {-109, 31, 95}, {-96, 31, 102}, {-92, 42, 102},
@@ -249,7 +249,7 @@ void bmo_create_grid_exec(BMesh *bm, BMOperator *op)
vec[2] = 0.0f;
mul_m4_v3(mat, vec);
- eve = BM_vert_create(bm, vec, NULL, 0);
+ eve = BM_vert_create(bm, vec, NULL, BM_CREATE_NOP);
BMO_elem_flag_enable(bm, eve, VERT_MARK);
if (a != 0) {
@@ -318,11 +318,11 @@ void bmo_create_uvsphere_exec(BMesh *bm, BMOperator *op)
vec[0] = -dia * sinf(phi);
vec[1] = 0.0;
vec[2] = dia * cosf(phi);
- eve = BM_vert_create(bm, vec, NULL, 0);
+ eve = BM_vert_create(bm, vec, NULL, BM_CREATE_NOP);
BMO_elem_flag_enable(bm, eve, VERT_MARK);
if (a != 0) {
- e = BM_edge_create(bm, preveve, eve, NULL, 0);
+ e = BM_edge_create(bm, preveve, eve, NULL, BM_CREATE_NOP);
BMO_elem_flag_enable(bm, e, EDGE_ORIG);
}
@@ -408,7 +408,7 @@ void bmo_create_icosphere_exec(BMesh *bm, BMOperator *op)
vec[0] = dia_div * icovert[a][0];
vec[1] = dia_div * icovert[a][1];
vec[2] = dia_div * icovert[a][2];
- eva[a] = BM_vert_create(bm, vec, NULL, 0);
+ eva[a] = BM_vert_create(bm, vec, NULL, BM_CREATE_NOP);
BMO_elem_flag_enable(bm, eva[a], VERT_MARK);
}
@@ -471,12 +471,12 @@ void bmo_create_monkey_exec(BMesh *bm, BMOperator *op)
v[0] = (monkeyv[i][0] + 127) / 128.0, v[1] = monkeyv[i][1] / 128.0, v[2] = monkeyv[i][2] / 128.0;
- tv[i] = BM_vert_create(bm, v, NULL, 0);
+ tv[i] = BM_vert_create(bm, v, NULL, BM_CREATE_NOP);
BMO_elem_flag_enable(bm, tv[i], VERT_MARK);
tv[monkeynv + i] = (fabsf(v[0] = -v[0]) < 0.001f) ?
tv[i] :
- (eve = BM_vert_create(bm, v, NULL, 0), mul_m4_v3(mat, eve->co), eve);
+ (eve = BM_vert_create(bm, v, NULL, BM_CREATE_NOP), mul_m4_v3(mat, eve->co), eve);
BMO_elem_flag_enable(bm, tv[monkeynv + i], VERT_MARK);
@@ -528,7 +528,7 @@ void bmo_create_circle_exec(BMesh *bm, BMOperator *op)
zero_v3(vec);
mul_m4_v3(mat, vec);
- cent1 = BM_vert_create(bm, vec, NULL, 0);
+ cent1 = BM_vert_create(bm, vec, NULL, BM_CREATE_NOP);
BMO_elem_flag_enable(bm, cent1, VERT_MARK);
}
@@ -538,12 +538,12 @@ void bmo_create_circle_exec(BMesh *bm, BMOperator *op)
vec[1] = dia * cosf(phi);
vec[2] = 0.0f;
mul_m4_v3(mat, vec);
- v1 = BM_vert_create(bm, vec, NULL, 0);
+ v1 = BM_vert_create(bm, vec, NULL, BM_CREATE_NOP);
BMO_elem_flag_enable(bm, v1, VERT_MARK);
if (lastv1)
- BM_edge_create(bm, v1, lastv1, NULL, 0);
+ BM_edge_create(bm, v1, lastv1, NULL, BM_CREATE_NOP);
if (a && cap_ends) {
BMFace *f;
@@ -603,13 +603,13 @@ void bmo_create_cone_exec(BMesh *bm, BMOperator *op)
vec[2] = -depth;
mul_m4_v3(mat, vec);
- cent1 = BM_vert_create(bm, vec, NULL, 0);
+ cent1 = BM_vert_create(bm, vec, NULL, BM_CREATE_NOP);
vec[0] = vec[1] = 0.0f;
vec[2] = depth;
mul_m4_v3(mat, vec);
- cent2 = BM_vert_create(bm, vec, NULL, 0);
+ cent2 = BM_vert_create(bm, vec, NULL, BM_CREATE_NOP);
BMO_elem_flag_enable(bm, cent1, VERT_MARK);
BMO_elem_flag_enable(bm, cent2, VERT_MARK);
@@ -620,13 +620,13 @@ void bmo_create_cone_exec(BMesh *bm, BMOperator *op)
vec[1] = dia1 * cosf(phi);
vec[2] = -depth;
mul_m4_v3(mat, vec);
- v1 = BM_vert_create(bm, vec, NULL, 0);
+ v1 = BM_vert_create(bm, vec, NULL, BM_CREATE_NOP);
vec[0] = dia2 * sinf(phi);
vec[1] = dia2 * cosf(phi);
vec[2] = depth;
mul_m4_v3(mat, vec);
- v2 = BM_vert_create(bm, vec, NULL, 0);
+ v2 = BM_vert_create(bm, vec, NULL, BM_CREATE_NOP);
BMO_elem_flag_enable(bm, v1, VERT_MARK);
BMO_elem_flag_enable(bm, v2, VERT_MARK);
@@ -686,56 +686,56 @@ void bmo_create_cube_exec(BMesh *bm, BMOperator *op)
vec[1] = -off;
vec[2] = -off;
mul_m4_v3(mat, vec);
- v1 = BM_vert_create(bm, vec, NULL, 0);
+ v1 = BM_vert_create(bm, vec, NULL, BM_CREATE_NOP);
BMO_elem_flag_enable(bm, v1, VERT_MARK);
vec[0] = -off;
vec[1] = off;
vec[2] = -off;
mul_m4_v3(mat, vec);
- v2 = BM_vert_create(bm, vec, NULL, 0);
+ v2 = BM_vert_create(bm, vec, NULL, BM_CREATE_NOP);
BMO_elem_flag_enable(bm, v2, VERT_MARK);
vec[0] = off;
vec[1] = off;
vec[2] = -off;
mul_m4_v3(mat, vec);
- v3 = BM_vert_create(bm, vec, NULL, 0);
+ v3 = BM_vert_create(bm, vec, NULL, BM_CREATE_NOP);
BMO_elem_flag_enable(bm, v3, VERT_MARK);
vec[0] = off;
vec[1] = -off;
vec[2] = -off;
mul_m4_v3(mat, vec);
- v4 = BM_vert_create(bm, vec, NULL, 0);
+ v4 = BM_vert_create(bm, vec, NULL, BM_CREATE_NOP);
BMO_elem_flag_enable(bm, v4, VERT_MARK);
vec[0] = -off;
vec[1] = -off;
vec[2] = off;
mul_m4_v3(mat, vec);
- v5 = BM_vert_create(bm, vec, NULL, 0);
+ v5 = BM_vert_create(bm, vec, NULL, BM_CREATE_NOP);
BMO_elem_flag_enable(bm, v5, VERT_MARK);
vec[0] = -off;
vec[1] = off;
vec[2] = off;
mul_m4_v3(mat, vec);
- v6 = BM_vert_create(bm, vec, NULL, 0);
+ v6 = BM_vert_create(bm, vec, NULL, BM_CREATE_NOP);
BMO_elem_flag_enable(bm, v6, VERT_MARK);
vec[0] = off;
vec[1] = off;
vec[2] = off;
mul_m4_v3(mat, vec);
- v7 = BM_vert_create(bm, vec, NULL, 0);
+ v7 = BM_vert_create(bm, vec, NULL, BM_CREATE_NOP);
BMO_elem_flag_enable(bm, v7, VERT_MARK);
vec[0] = off;
vec[1] = -off;
vec[2] = off;
mul_m4_v3(mat, vec);
- v8 = BM_vert_create(bm, vec, NULL, 0);
+ v8 = BM_vert_create(bm, vec, NULL, BM_CREATE_NOP);
BMO_elem_flag_enable(bm, v8, VERT_MARK);
/* the four sides */
diff --git a/source/blender/bmesh/operators/bmo_removedoubles.c b/source/blender/bmesh/operators/bmo_removedoubles.c
index da70e201976..cc5a635092a 100644
--- a/source/blender/bmesh/operators/bmo_removedoubles.c
+++ b/source/blender/bmesh/operators/bmo_removedoubles.c
@@ -71,32 +71,11 @@ static void remdoubles_splitface(BMFace *f, BMesh *bm, BMOperator *op, BMOpSlot
#define EDGE_COL 2
#define FACE_MARK 2
-#if 0
-int remdoubles_face_overlaps(BMesh *bm, BMVert **varr,
- int len, BMFace *exclude,
- BMFace **overlapface)
-{
- BMIter vertfaces;
- BMFace *f;
- int i, amount;
-
- if (overlapface) *overlapface = NULL;
-
- for (i = 0; i < len; i++) {
- f = BM_iter_new(&vertfaces, bm, BM_FACES_OF_VERT, varr[i]);
- while (f) {
- amount = BM_verts_in_face(bm, f, varr, len);
- if (amount >= len) {
- if (overlapface) *overlapface = f;
- return true;
- }
- f = BM_iter_step(&vertfaces);
- }
- }
- return false;
-}
-#endif
-
+/**
+ * \note with 'targetmap', multiple 'keys' are currently supported, though no callers should be using.
+ * (because slot maps currently use GHash without the GHASH_FLAG_ALLOW_DUPES flag set)
+ *
+ */
void bmo_weld_verts_exec(BMesh *bm, BMOperator *op)
{
BMIter iter, liter;
@@ -215,10 +194,8 @@ void bmo_weld_verts_exec(BMesh *bm, BMOperator *op)
v2 = BMO_slot_map_elem_get(slot_targetmap, v2);
}
- f_new = BM_face_create_ngon(bm, v, v2, edges, a, BM_CREATE_NO_DOUBLE);
+ f_new = BM_face_create_ngon(bm, v, v2, edges, a, f, BM_CREATE_NO_DOUBLE);
if (f_new && (f_new != f)) {
- BM_elem_attrs_copy(bm, bm, f, f_new);
-
a = 0;
BM_ITER_ELEM (l, &liter, f_new, BM_LOOPS_OF_FACE) {
l_new = loops[a];
@@ -377,7 +354,7 @@ void bmo_collapse_exec(BMesh *bm, BMOperator *op)
BMEdge *e, **edges = NULL;
BLI_array_declare(edges);
float min[3], max[3], center[3];
- int i, tot;
+ unsigned int i, tot;
BMOpSlot *slot_targetmap;
BMO_op_callf(bm, op->flag, "collapse_uvs edges=%s", op, "edges");
@@ -392,6 +369,8 @@ void bmo_collapse_exec(BMesh *bm, BMOperator *op)
BMW_NIL_LAY);
BM_ITER_MESH (e, &iter, bm, BM_EDGES_OF_MESH) {
+ BMVert *v_tar;
+
if (!BMO_elem_flag_test(bm, e, EDGE_MARK))
continue;
@@ -404,19 +383,29 @@ void bmo_collapse_exec(BMesh *bm, BMOperator *op)
minmax_v3v3_v3(min, max, e->v1->co);
minmax_v3v3_v3(min, max, e->v2->co);
+
+ /* prevent adding to slot_targetmap multiple times */
+ BM_elem_flag_disable(e->v1, BM_ELEM_TAG);
+ BM_elem_flag_disable(e->v2, BM_ELEM_TAG);
}
mid_v3_v3v3(center, min, max);
/* snap edges to a point. for initial testing purposes anyway */
+ v_tar = edges[0]->v1;
+
for (i = 0; i < tot; i++) {
- copy_v3_v3(edges[i]->v1->co, center);
- copy_v3_v3(edges[i]->v2->co, center);
-
- if (edges[i]->v1 != edges[0]->v1)
- BMO_slot_map_elem_insert(&weldop, slot_targetmap, edges[i]->v1, edges[0]->v1);
- if (edges[i]->v2 != edges[0]->v1)
- BMO_slot_map_elem_insert(&weldop, slot_targetmap, edges[i]->v2, edges[0]->v1);
+ unsigned int j;
+
+ for (j = 0; j < 2; j++) {
+ BMVert *v_src = *((&edges[i]->v1) + j);
+
+ copy_v3_v3(v_src->co, center);
+ if ((v_src != v_tar) && !BM_elem_flag_test(v_src, BM_ELEM_TAG)) {
+ BM_elem_flag_enable(v_src, BM_ELEM_TAG);
+ BMO_slot_map_elem_insert(&weldop, slot_targetmap, v_src, v_tar);
+ }
+ }
}
}
@@ -521,13 +510,18 @@ static void bmesh_find_doubles_common(BMesh *bm, BMOperator *op,
for (i = 0; i < verts_len; i++) {
BMVert *v_check = verts[i];
- if (BMO_elem_flag_test(bm, v_check, VERT_DOUBLE)) {
+ if (BMO_elem_flag_test(bm, v_check, VERT_DOUBLE | VERT_TARGET)) {
continue;
}
for (j = i + 1; j < verts_len; j++) {
BMVert *v_other = verts[j];
+ /* a match has already been found, (we could check which is best, for now don't) */
+ if (BMO_elem_flag_test(bm, v_other, VERT_DOUBLE | VERT_TARGET)) {
+ continue;
+ }
+
/* Compare sort values of the verts using 3x tolerance (allowing for the tolerance
* on each of the three axes). This avoids the more expensive length comparison
* for most vertex pairs. */
diff --git a/source/blender/bmesh/operators/bmo_split_edges.c b/source/blender/bmesh/operators/bmo_split_edges.c
index 7eea4c4878d..eb7946caff0 100644
--- a/source/blender/bmesh/operators/bmo_split_edges.c
+++ b/source/blender/bmesh/operators/bmo_split_edges.c
@@ -29,6 +29,7 @@
#include "BLI_utildefines.h"
#include "bmesh.h"
+#include "bmesh_tools.h"
#include "intern/bmesh_operators_private.h" /* own include */
diff --git a/source/blender/bmesh/operators/bmo_subdivide.c b/source/blender/bmesh/operators/bmo_subdivide.c
index e669585a857..b3b9cecf389 100644
--- a/source/blender/bmesh/operators/bmo_subdivide.c
+++ b/source/blender/bmesh/operators/bmo_subdivide.c
@@ -921,7 +921,7 @@ void bmo_subdivide_edges_exec(BMesh *bm, BMOperator *op)
}
if (BMO_elem_flag_test(bm, face, FACE_CUSTOMFILL)) {
- pat = BMO_slot_map_data_get(params.slot_custom_patterns, face);
+ pat = *BMO_slot_map_data_get(params.slot_custom_patterns, face);
for (i = 0; i < pat->len; i++) {
matched = 1;
for (j = 0; j < pat->len; j++) {
diff --git a/source/blender/bmesh/operators/bmo_subdivide_edgering.c b/source/blender/bmesh/operators/bmo_subdivide_edgering.c
index fa39ae68cdf..13a7aa09335 100644
--- a/source/blender/bmesh/operators/bmo_subdivide_edgering.c
+++ b/source/blender/bmesh/operators/bmo_subdivide_edgering.c
@@ -203,7 +203,7 @@ finally:
/* -------------------------------------------------------------------- */
/* Edge Loop Pairs */
/* key (ordered loop pointers) */
-static GHash *bm_edgering_pair_calc(BMesh *bm, ListBase *eloops_rim)
+static GSet *bm_edgering_pair_calc(BMesh *bm, ListBase *eloops_rim)
{
/**
* Method for for finding pairs:
@@ -219,7 +219,7 @@ static GHash *bm_edgering_pair_calc(BMesh *bm, ListBase *eloops_rim)
* could sort and optimize this but not really so important.
*/
- GHash *eloop_pair_gh = BLI_ghash_pair_new(__func__);
+ GSet *eloop_pair_gs = BLI_gset_pair_new(__func__);
GHash *vert_eloop_gh = BLI_ghash_ptr_new(__func__);
struct BMEdgeLoopStore *el_store;
@@ -256,9 +256,9 @@ static GHash *bm_edgering_pair_calc(BMesh *bm, ListBase *eloops_rim)
if (pair_test.first > pair_test.second)
SWAP(const void *, pair_test.first, pair_test.second);
- if (!BLI_ghash_haskey(eloop_pair_gh, &pair_test)) {
+ if (!BLI_gset_haskey(eloop_pair_gs, &pair_test)) {
GHashPair *pair = BLI_ghashutil_pairalloc(pair_test.first, pair_test.second);
- BLI_ghash_insert(eloop_pair_gh, pair, NULL);
+ BLI_gset_insert(eloop_pair_gs, pair);
}
}
@@ -268,12 +268,12 @@ static GHash *bm_edgering_pair_calc(BMesh *bm, ListBase *eloops_rim)
BLI_ghash_free(vert_eloop_gh, NULL, NULL);
- if (BLI_ghash_size(eloop_pair_gh) == 0) {
- BLI_ghash_free(eloop_pair_gh, NULL, NULL);
- eloop_pair_gh = NULL;
+ if (BLI_gset_size(eloop_pair_gs) == 0) {
+ BLI_gset_free(eloop_pair_gs, NULL);
+ eloop_pair_gs = NULL;
}
- return eloop_pair_gh;
+ return eloop_pair_gs;
}
@@ -919,13 +919,13 @@ static void bm_edgering_pair_order(BMesh *bm,
}
BLI_assert(node != NULL);
- BLI_rotatelist(lb_b, node);
+ BLI_rotatelist_first(lb_b, node);
/* now check we are winding the same way */
if (bm_edgering_pair_order_is_flipped(bm, el_store_a, el_store_b)) {
BM_edgeloop_flip(bm, el_store_b);
/* re-ensure the first node */
- BLI_rotatelist(lb_b, node);
+ BLI_rotatelist_first(lb_b, node);
}
/* sanity checks that we are aligned & winding now */
@@ -1175,23 +1175,23 @@ void bmo_subdivide_edgering_exec(BMesh *bm, BMOperator *op)
}
}
else {
- GHashIterator gh_iter;
+ GSetIterator gs_iter;
int i;
- GHash *eloop_pairs_gh = bm_edgering_pair_calc(bm, &eloops_rim);
+ GSet *eloop_pairs_gs = bm_edgering_pair_calc(bm, &eloops_rim);
LoopPairStore **lpair_arr;
- if (eloop_pairs_gh == NULL) {
+ if (eloop_pairs_gs == NULL) {
BMO_error_raise(bm, op, BMERR_INVALID_SELECTION,
"Edge-rings are not connected");
goto cleanup;
}
- lpair_arr = BLI_array_alloca(lpair_arr, BLI_ghash_size(eloop_pairs_gh));
+ lpair_arr = BLI_array_alloca(lpair_arr, BLI_gset_size(eloop_pairs_gs));
/* first cache pairs */
- GHASH_ITER_INDEX (gh_iter, eloop_pairs_gh, i) {
- GHashPair *eloop_pair = BLI_ghashIterator_getKey(&gh_iter);
+ GSET_ITER_INDEX (gs_iter, eloop_pairs_gs, i) {
+ GHashPair *eloop_pair = BLI_gsetIterator_getKey(&gs_iter);
struct BMEdgeLoopStore *el_store_a = (void *)eloop_pair->first;
struct BMEdgeLoopStore *el_store_b = (void *)eloop_pair->second;
LoopPairStore *lpair;
@@ -1207,8 +1207,8 @@ void bmo_subdivide_edgering_exec(BMesh *bm, BMOperator *op)
BLI_assert(bm_verts_tag_count(bm) == 0);
}
- GHASH_ITER_INDEX (gh_iter, eloop_pairs_gh, i) {
- GHashPair *eloop_pair = BLI_ghashIterator_getKey(&gh_iter);
+ GSET_ITER_INDEX (gs_iter, eloop_pairs_gs, i) {
+ GHashPair *eloop_pair = BLI_gsetIterator_getKey(&gs_iter);
struct BMEdgeLoopStore *el_store_a = (void *)eloop_pair->first;
struct BMEdgeLoopStore *el_store_b = (void *)eloop_pair->second;
LoopPairStore *lpair = lpair_arr[i];
@@ -1222,7 +1222,7 @@ void bmo_subdivide_edgering_exec(BMesh *bm, BMOperator *op)
BLI_assert(bm_verts_tag_count(bm) == 0);
}
- BLI_ghash_free(eloop_pairs_gh, MEM_freeN, NULL);
+ BLI_gset_free(eloop_pairs_gs, MEM_freeN);
}
cleanup:
diff --git a/source/blender/bmesh/operators/bmo_symmetrize.c b/source/blender/bmesh/operators/bmo_symmetrize.c
index b684240dc76..5c1b4287c2f 100644
--- a/source/blender/bmesh/operators/bmo_symmetrize.c
+++ b/source/blender/bmesh/operators/bmo_symmetrize.c
@@ -15,7 +15,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * Contributor(s): Nicholas Bishop
+ * Contributor(s): Campbell Barton
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -26,659 +26,81 @@
* Makes the mesh symmetrical by splitting along an axis and duplicating the geometry.
*/
-
-#include "MEM_guardedalloc.h"
-
-#include "BLI_array.h"
-#include "BLI_math.h"
#include "BLI_utildefines.h"
+#include "BLI_math.h"
#include "bmesh.h"
#include "intern/bmesh_operators_private.h"
-enum {
- SYMM_OUTPUT_GEOM = (1 << 0)
-};
-
-/* Note: don't think there's much need to make these user-adjustable? */
-#define SYMM_AXIS_THRESHOLD 0.00002f
-#define SYMM_VERT_THRESHOLD 0.00002f
-
-typedef enum {
- /* Coordinate lies on the side being copied from */
- SYMM_SIDE_KEEP,
- /* Coordinate lies on the side being copied from and within the
- * axis threshold */
- SYMM_SIDE_AXIS,
- /* Coordinate lies on the side being copied to */
- SYMM_SIDE_KILL
-} SymmSide;
-
-typedef struct {
- BMesh *bm;
- BMOperator *op;
-
- int axis;
- BMO_SymmDirection direction;
-
- /* Maps from input vertices to their mirrors. If the vertex
- * doesn't have a mirror, it's not in this map. If the vertex is
- * within the axis threshold, it's mapped to itself. */
- GHash *vert_symm_map;
-
- /* Edges that cross the symmetry plane and are asymmetric get
- * split. This map goes from input edges to output vertices. If an
- * edge is not split, it's not in this map. */
- GHash *edge_split_map;
-} Symm;
-
-/* Return which side the coordinate lies on */
-static SymmSide symm_co_side(const Symm *symm,
- const float *co)
-{
- float comp = co[symm->axis];
- if (ELEM3(symm->direction,
- BMO_SYMMETRIZE_NEGATIVE_X,
- BMO_SYMMETRIZE_NEGATIVE_Y,
- BMO_SYMMETRIZE_NEGATIVE_Z))
- {
- comp = -comp;
- }
-
- if (comp >= 0) {
- if (comp < SYMM_AXIS_THRESHOLD)
- return SYMM_SIDE_AXIS;
- else
- return SYMM_SIDE_KEEP;
- }
- else
- return SYMM_SIDE_KILL;
-}
-
-/* Output vertices and the vert_map array */
-static void symm_verts_mirror(Symm *symm)
-{
- BMOIter oiter;
- BMVert *src_v, *dst_v;
-
- symm->vert_symm_map = BLI_ghash_ptr_new(AT);
-
- BMO_ITER (src_v, &oiter, symm->op->slots_in, "input", BM_VERT) {
- SymmSide side = symm_co_side(symm, src_v->co);
- float co[3];
-
- switch (side) {
- case SYMM_SIDE_KEEP:
- /* The vertex is outside the axis area; output its mirror */
- copy_v3_v3(co, src_v->co);
- co[symm->axis] = -co[symm->axis];
-
- dst_v = BM_vert_create(symm->bm, co, src_v, 0);
- BMO_elem_flag_enable(symm->bm, dst_v, SYMM_OUTPUT_GEOM);
- BLI_ghash_insert(symm->vert_symm_map, src_v, dst_v);
- break;
-
- case SYMM_SIDE_AXIS:
- /* The vertex is within the axis area, snap to center */
- src_v->co[symm->axis] = 0;
- /* Vertex isn't copied, map to itself */
- BLI_ghash_insert(symm->vert_symm_map, src_v, src_v);
- break;
-
- case SYMM_SIDE_KILL:
- /* The vertex does not lie in the half-space being
- * copied from, nothing to do */
- break;
- }
- }
-}
-
-static int symm_edge_crosses_axis(const Symm *symm, const BMEdge *e)
-{
- const int sides[2] = {symm_co_side(symm, e->v1->co),
- symm_co_side(symm, e->v2->co)};
-
- return ((sides[0] != SYMM_SIDE_AXIS) &&
- (sides[1] != SYMM_SIDE_AXIS) &&
- (sides[0] != sides[1]));
-}
-
-/* Output edge split vertices for asymmetric edges and the edge_splits
- * mapping array */
-static void symm_split_asymmetric_edges(Symm *symm)
-{
- BMOIter oiter;
- BMEdge *e;
-
- symm->edge_split_map = BLI_ghash_ptr_new(AT);
-
- BMO_ITER (e, &oiter, symm->op->slots_in, "input", BM_EDGE) {
- float flipped[3];
-
- copy_v3_v3(flipped, e->v1->co);
- flipped[symm->axis] = -flipped[symm->axis];
-
- if (symm_edge_crosses_axis(symm, e) &&
- (!compare_v3v3(e->v2->co, flipped, SYMM_VERT_THRESHOLD)))
- {
- /* Endpoints lie on opposite sides and are asymmetric */
-
- BMVert *v;
- float lambda = 0, edge_dir[3], co[3];
- float plane_co[3][3][3] = {
- /* axis == 0 */
- {{0, 0, 0}, {0, 1, 0}, {0, 0, 1}},
- /* axis == 1 */
- {{0, 0, 0}, {1, 0, 0}, {0, 0, 1}},
- /* axis == 2 */
- {{0, 0, 0}, {1, 0, 0}, {0, 1, 0}},
- };
- int r;
-
- /* Find intersection of edge with symmetry plane */
- sub_v3_v3v3(edge_dir, e->v2->co, e->v1->co);
- normalize_v3(edge_dir);
- r = isect_ray_plane_v3(e->v1->co,
- edge_dir,
- plane_co[symm->axis][0],
- plane_co[symm->axis][1],
- plane_co[symm->axis][2],
- &lambda, true);
- BLI_assert(r);
-
- madd_v3_v3v3fl(co, e->v1->co, edge_dir, lambda);
- co[symm->axis] = 0;
-
- /* Edge is asymmetric, split it with a new vertex */
- v = BM_vert_create(symm->bm, co, e->v1, 0);
- BMO_elem_flag_enable(symm->bm, v, SYMM_OUTPUT_GEOM);
- BLI_ghash_insert(symm->edge_split_map, e, v);
- }
- }
-}
-
-static void symm_mirror_edges(Symm *symm)
-{
- BMOIter oiter;
- BMEdge *e;
-
- BMO_ITER (e, &oiter, symm->op->slots_in, "input", BM_EDGE) {
- BMVert *v1 = NULL, *v2 = NULL;
- BMEdge *e_new;
-
- v1 = BLI_ghash_lookup(symm->vert_symm_map, e->v1);
- v2 = BLI_ghash_lookup(symm->vert_symm_map, e->v2);
-
- if (v1 && v2) {
- e_new = BM_edge_create(symm->bm, v1, v2, e, BM_CREATE_NO_DOUBLE);
- BMO_elem_flag_enable(symm->bm, e_new, SYMM_OUTPUT_GEOM);
- }
- else if (v1 || v2) {
- if (BLI_ghash_haskey(symm->edge_split_map, e)) {
- BMVert *v_split = BLI_ghash_lookup(symm->edge_split_map, e);
-
- /* Output the keep side of the split edge */
- if (!v1) {
- e_new = BM_edge_create(symm->bm, v_split, e->v2, e, BM_CREATE_NO_DOUBLE);
- BMO_elem_flag_enable(symm->bm, e_new, SYMM_OUTPUT_GEOM);
- v1 = v_split;
- }
- else {
- e_new = BM_edge_create(symm->bm, e->v1, v_split, e, BM_CREATE_NO_DOUBLE);
- BMO_elem_flag_enable(symm->bm, e_new, SYMM_OUTPUT_GEOM);
- v2 = v_split;
- }
-
- /* Output the kill side of the split edge */
- e_new = BM_edge_create(symm->bm, v1, v2, e, BM_CREATE_NO_DOUBLE);
- BMO_elem_flag_enable(symm->bm, e_new, SYMM_OUTPUT_GEOM);
- }
- }
- }
-}
-
-/****************************** SymmPoly ******************************/
-
-typedef struct {
- /* Indices into the source mvert array (or -1 if not in that array) */
- BMVert **src_verts;
- /* Indices into the destination mvert array, these are vertices
- * created by an edge split (-1 for vertices not created by edge
- * split) */
- BMVert **edge_verts;
-
- /* Number of vertices in the polygon */
- int len;
-
- /* True only if none of the polygon's edges were split */
- bool already_symmetric;
-
- BMFace *src_face;
-} SymmPoly;
-
-static void symm_poly_with_splits(const Symm *symm,
- BMFace *f,
- SymmPoly *out)
-{
- BMIter iter;
- BMLoop *l;
- int i;
-
- out->src_face = f;
-
- /* Count vertices and check for edge splits */
- out->len = f->len;
- out->already_symmetric = true;
- BM_ITER_ELEM (l, &iter, f, BM_LOOPS_OF_FACE) {
- if (BLI_ghash_haskey(symm->edge_split_map, l->e)) {
- out->len++;
- out->already_symmetric = false;
- }
- }
-
- i = 0;
- BM_ITER_ELEM (l, &iter, f, BM_LOOPS_OF_FACE) {
- BMVert *split = BLI_ghash_lookup(symm->edge_split_map, l->e);
-
- out->src_verts[i] = l->v;
- out->edge_verts[i] = NULL;
- i++;
-
- if (split) {
- out->src_verts[i] = NULL;
- out->edge_verts[i] = split;
- i++;
- }
- }
-}
-
-static const float *symm_poly_co(const SymmPoly *sp, int v)
-{
- if (sp->src_verts[v])
- return sp->src_verts[v]->co;
- else if (sp->edge_verts[v])
- return sp->edge_verts[v]->co;
- else
- return NULL;
-}
-
-static SymmSide symm_poly_co_side(const Symm *symm,
- const SymmPoly *sp,
- int v)
-{
- return symm_co_side(symm, symm_poly_co(sp, v));
-}
-
-/* Return the index of the vertex in the destination array at corner
- * 'v' of the polygon, or -1 if not in that array */
-static BMVert *symm_poly_dst(const SymmPoly *sp, int v)
-{
- if (sp->edge_verts[v])
- return sp->edge_verts[v];
- else if (sp->src_verts[v])
- return sp->src_verts[v];
- else
- return NULL;
-}
-
-/* Same as above, but returns the index of the mirror if available, or
- * the same index if on the axis, or -1 otherwise */
-static BMVert *symm_poly_mirror_dst(const Symm *symm,
- const SymmPoly *sp,
- int v)
-{
- if (sp->edge_verts[v])
- return sp->edge_verts[v];
- else if (sp->src_verts[v]) {
- if (BLI_ghash_haskey(symm->vert_symm_map, sp->src_verts[v]))
- return BLI_ghash_lookup(symm->vert_symm_map, sp->src_verts[v]);
- else
- return sp->src_verts[v];
- }
- else
- return NULL;
-}
-
-static bool symm_poly_next_crossing(const Symm *symm,
- const SymmPoly *sp,
- int start,
- int *l1,
- int *l2)
-{
- int i;
-
- for (i = 0; i < sp->len; i++) {
- (*l1) = (start + i) % sp->len;
- (*l2) = ((*l1) + 1) % sp->len;
-
- if ((symm_poly_co_side(symm, sp, *l1) == SYMM_SIDE_KILL) ^
- (symm_poly_co_side(symm, sp, *l2) == SYMM_SIDE_KILL))
- {
- return true;
- }
- }
-
- BLI_assert(!"symm_poly_next_crossing failed");
- return false;
-}
-
-static BMFace *symm_face_create_v(BMesh *bm, BMFace *example,
- BMVert **fv, BMEdge **fe, int len)
-{
- BMFace *f_new;
- int i;
-
- /* TODO: calling symmetrize in dynamic-topology sculpt mode
- * frequently tries to create faces of length less than two,
- * should investigate further */
- if (len < 3)
- return NULL;
-
- for (i = 0; i < len; i++) {
- int j = (i + 1) % len;
- fe[i] = BM_edge_exists(fv[i], fv[j]);
- if (!fe[i]) {
- fe[i] = BM_edge_create(bm, fv[i], fv[j], NULL, 0);
- BMO_elem_flag_enable(bm, fe[i], SYMM_OUTPUT_GEOM);
- }
- }
- f_new = BM_face_create(bm, fv, fe, len, BM_CREATE_NO_DOUBLE);
- if (example)
- BM_elem_attrs_copy(bm, bm, example, f_new);
- BM_face_select_set(bm, f_new, true);
- BMO_elem_flag_enable(bm, f_new, SYMM_OUTPUT_GEOM);
-
- return f_new;
-}
-
-static void symm_mesh_output_poly_zero_splits(Symm *symm,
- SymmPoly *sp,
- BMVert **fv,
- BMEdge **fe,
- int segment_len,
- int start)
-{
- int i, j;
-
- j = 0;
-
- /* Output the keep side of the input polygon */
- for (i = 0; i < segment_len; i++) {
- const int offset = (start + i) % sp->len;
- BLI_assert(sp->src_verts[offset]);
- fv[j++] = sp->src_verts[offset];
- }
-
- /* Output the kill side of the polygon */
- for (i = segment_len - 1; i >= 0; i--) {
- const int offset = (start + i) % sp->len;
-
- if (symm_poly_co_side(symm, sp, offset) == SYMM_SIDE_KEEP) {
- BLI_assert(sp->src_verts[offset]);
- fv[j++] = BLI_ghash_lookup(symm->vert_symm_map,
- sp->src_verts[offset]);
- }
- }
-
- symm_face_create_v(symm->bm, sp->src_face, fv, fe, j);
-}
-
-static void symm_mesh_output_poly_with_splits(Symm *symm,
- SymmPoly *sp,
- BMVert **fv,
- BMEdge **fe,
- int segment_len,
- int start)
-{
- int i;
-
- /* Output the keep side of the input polygon */
-
- for (i = 0; i < segment_len; i++) {
- const int offset = (start + i) % sp->len;
- BMVert *v = symm_poly_dst(sp, offset);
-
- BLI_assert(v);
+#define ELE_OUT 1
- fv[i] = v;
- }
-
- symm_face_create_v(symm->bm, sp->src_face, fv, fe, segment_len);
-
- /* Output the kill side of the input polygon */
-
- for (i = 0; i < segment_len; i++) {
- const int offset = (start + i) % sp->len;
- BMVert *v = symm_poly_mirror_dst(symm, sp, offset);
-
- fv[segment_len - i - 1] = v;
-
- }
-
- symm_face_create_v(symm->bm, sp->src_face, fv, fe, segment_len);
-}
-
-static void symm_mirror_polygons(Symm *symm)
+void bmo_symmetrize_exec(BMesh *bm, BMOperator *op)
{
- BMOIter oiter;
- BMFace *f;
- BMVert **pv = NULL;
- BMVert **fv = NULL;
- BMEdge **fe = NULL;
- BLI_array_declare(pv);
- BLI_array_declare(fv);
- BLI_array_declare(fe);
-
- BMO_ITER (f, &oiter, symm->op->slots_in, "input", BM_FACE) {
- BMIter iter;
- BMLoop *l;
- bool mirror_all = true, ignore_all = true;
-
- /* Check if entire polygon can be mirrored or ignored */
- BM_ITER_ELEM (l, &iter, f, BM_LOOPS_OF_FACE) {
- const SymmSide side = symm_co_side(symm, l->v->co);
- if (side == SYMM_SIDE_KILL)
- mirror_all = false;
- else if (side == SYMM_SIDE_KEEP)
- ignore_all = false;
- }
-
- if (mirror_all) {
- int i;
-
- /* Make a mirrored copy of the polygon */
-
- BLI_array_empty(fv);
- BLI_array_empty(fe);
- BLI_array_grow_items(fv, f->len);
- BLI_array_grow_items(fe, f->len);
-
- i = f->len;
- BM_ITER_ELEM (l, &iter, f, BM_LOOPS_OF_FACE) {
- i--;
-
- if (symm_co_side(symm, l->v->co) == SYMM_SIDE_KEEP)
- fv[i] = BLI_ghash_lookup(symm->vert_symm_map, l->v);
- else
- fv[i] = l->v;
- }
+ const float dist = BMO_slot_float_get(op->slots_in, "dist");
+ const int direction = BMO_slot_int_get(op->slots_in, "direction");
+ const int axis = direction % 3;
- symm_face_create_v(symm->bm, f, fv, fe, f->len);
- }
- else if (ignore_all) {
- BM_face_kill(symm->bm, f);
- }
- else {
- SymmPoly sp;
- int l1, l2, l3, l4;
- int double_l2, double_l3;
- int segment_len;
+ BMOperator op_bisect;
+ BMOperator op_dupe;
+ BMOperator op_weld;
- BLI_array_empty(pv);
- BLI_array_grow_items(pv, f->len * 4);
- sp.src_verts = pv;
- sp.edge_verts = pv + f->len * 2;
- symm_poly_with_splits(symm, f, &sp);
+ BMOpSlot *slot_vertmap;
+ BMOpSlot *slot_targetmap;
- /* Find first loop edge crossing the axis */
- symm_poly_next_crossing(symm, &sp, 0, &l1, &l2);
+ float plane_no[3];
+ float scale[3];
- /* If crossing isn't kill to keep, find the next one */
- if (symm_poly_co_side(symm, &sp, l1) != SYMM_SIDE_KILL) {
- symm_poly_next_crossing(symm, &sp, l2, &l1, &l2);
- }
-
- /* Find next crossing (keep to kill) */
- symm_poly_next_crossing(symm, &sp, l2, &l3, &l4);
-
- if (l2 == l3)
- segment_len = 0;
- else if (l2 < l3)
- segment_len = l3 - l2 + 1;
- else
- segment_len = (sp.len - l2 + 1) + l3;
-
- double_l2 = symm_poly_co_side(symm, &sp, l2) == SYMM_SIDE_KEEP;
- double_l3 = symm_poly_co_side(symm, &sp, l3) == SYMM_SIDE_KEEP;
-
- /* Calculate number of new polygons/loops */
- if (segment_len == 0) {
- }
- else if (sp.already_symmetric) {
- int new_loops;
-
- if (double_l2 && double_l3)
- new_loops = segment_len * 2;
- else if (!double_l2 && !double_l3)
- new_loops = segment_len * 2 - 2;
- else
- new_loops = segment_len * 2 - 1;
-
- BLI_array_empty(fv);
- BLI_array_empty(fe);
- BLI_array_grow_items(fv, new_loops);
- BLI_array_grow_items(fe, new_loops);
-
- symm_mesh_output_poly_zero_splits(symm, &sp,
- fv, fe,
- segment_len, l2);
- BM_face_kill(symm->bm, f);
- }
- else if (!double_l2 && !double_l3) {
- BLI_array_empty(fv);
- BLI_array_empty(fe);
- BLI_array_grow_items(fv, segment_len);
- BLI_array_grow_items(fe, segment_len);
-
- symm_mesh_output_poly_with_splits(symm, &sp,
- fv, fe,
- segment_len,
- l2);
+ BMOIter siter;
+ BMVert *v;
- BM_face_kill(symm->bm, f);
- }
- else {
- BLI_array_empty(fv);
- BLI_array_empty(fe);
- BLI_array_grow_items(fv, segment_len);
- BLI_array_grow_items(fe, segment_len);
+ copy_v3_fl(plane_no, 0.0f);
+ copy_v3_fl(scale, 1.0f);
- symm_mesh_output_poly_with_splits(symm, &sp,
- fv, fe,
- segment_len,
- l2);
+ plane_no[axis] = direction > 2 ? -1.0f : 1.0f;
+ scale[axis] *= -1.0f;
- BM_face_kill(symm->bm, f);
+ /* Cut in half */
+ BMO_op_initf(bm, &op_bisect, op->flag,
+ "bisect_plane geom=%s plane_no=%v dist=%f clear_outer=%b use_snap_center=%b",
+ op, "input", plane_no, dist, true, true);
- /* Output bridge triangle */
+ BMO_op_exec(bm, &op_bisect);
- BLI_array_empty(fv);
- BLI_array_empty(fe);
- BLI_array_grow_items(fv, 3);
- BLI_array_grow_items(fe, 3);
+ /* Duplicate */
+ BMO_op_initf(bm, &op_dupe, op->flag,
+ "duplicate geom=%S",
+ &op_bisect, "geom.out");
- if (double_l2) {
- fv[0] = symm_poly_dst(&sp, l2);
- fv[1] = symm_poly_mirror_dst(symm, &sp, l2);
- fv[2] = symm_poly_dst(&sp, l3);
- }
- else if (double_l3) {
- fv[0] = symm_poly_dst(&sp, l3);
- fv[1] = symm_poly_mirror_dst(symm, &sp, l3);
- fv[2] = symm_poly_dst(&sp, l2);
- }
+ BMO_op_exec(bm, &op_dupe);
- BLI_assert(fv[0] && fv[1] && fv[2]);
+ /* Flag for output (some will be merged) */
+ BMO_slot_buffer_flag_enable(bm, op_bisect.slots_out, "geom.out", BM_ALL_NOLOOP, ELE_OUT);
+ BMO_slot_buffer_flag_enable(bm, op_dupe.slots_out, "geom.out", BM_ALL_NOLOOP, ELE_OUT);
- symm_face_create_v(symm->bm, NULL, fv, fe, 3);
- }
- }
- }
- BLI_array_free(pv);
- BLI_array_free(fv);
- BLI_array_free(fe);
-}
+ BMO_op_callf(bm, op->flag, "scale verts=%S vec=%v", &op_dupe, "geom.out", scale);
+ BMO_op_callf(bm, op->flag, "reverse_faces faces=%S", &op_dupe, "geom.out");
-/* Remove unused edges and vertices from the side being copied to */
-static void symm_kill_unused(Symm *symm)
-{
- BMOIter oiter;
- BMEdge *e;
- BMVert *v;
- /* Kill unused edges */
- BMO_ITER (e, &oiter, symm->op->slots_in, "input", BM_EDGE) {
- const int crosses = symm_edge_crosses_axis(symm, e);
- const int symmetric = (crosses &&
- (!BLI_ghash_haskey(symm->edge_split_map, e)));
+ /* Weld verts */
+ BMO_op_init(bm, &op_weld, op->flag, "weld_verts");
- if (((symm_co_side(symm, e->v1->co) == SYMM_SIDE_KILL) ||
- (symm_co_side(symm, e->v2->co) == SYMM_SIDE_KILL)) &&
- !symmetric)
- {
- /* The edge might be used by a face outside the input set */
- if (BM_edge_is_wire(e))
- BM_edge_kill(symm->bm, e);
- }
- }
+ slot_vertmap = BMO_slot_get(op_dupe.slots_out, "vert_map.out");
+ slot_targetmap = BMO_slot_get(op_weld.slots_in, "targetmap");
- /* Kill unused vertices */
- BMO_ITER (v, &oiter, symm->op->slots_in, "input", BM_VERT) {
- if (symm_co_side(symm, v->co) == SYMM_SIDE_KILL) {
- if (BM_vert_edge_count(v) == 0)
- BM_vert_kill(symm->bm, v);
- }
+ BMO_ITER (v, &siter, op_bisect.slots_out, "geom_cut.out", BM_VERT) {
+ BMVert *v_dupe = BMO_slot_map_elem_get(slot_vertmap, v);
+ BMO_slot_map_elem_insert(&op_weld, slot_targetmap, v_dupe, v);
}
-}
-
-void bmo_symmetrize_exec(BMesh *bm, BMOperator *op)
-{
- Symm symm;
- BMO_SymmDirection direction = BMO_slot_int_get(op->slots_in, "direction");
- symm.bm = bm;
- symm.op = op;
- symm.axis = (ELEM(direction,
- BMO_SYMMETRIZE_NEGATIVE_X,
- BMO_SYMMETRIZE_POSITIVE_X) ? 0 :
- ELEM(direction,
- BMO_SYMMETRIZE_NEGATIVE_Y,
- BMO_SYMMETRIZE_POSITIVE_Y) ? 1 :
- ELEM(direction,
- BMO_SYMMETRIZE_NEGATIVE_Z,
- BMO_SYMMETRIZE_POSITIVE_Z) ? 2 : 0);
- symm.direction = direction;
+ BMO_op_exec(bm, &op_weld);
- symm_verts_mirror(&symm);
- symm_split_asymmetric_edges(&symm);
- symm_mirror_edges(&symm);
- symm_mirror_polygons(&symm);
- symm_kill_unused(&symm);
+ /* Cleanup */
+ BMO_op_finish(bm, &op_weld);
- BLI_ghash_free(symm.vert_symm_map, NULL, NULL);
- BLI_ghash_free(symm.edge_split_map, NULL, NULL);
+ BMO_op_finish(bm, &op_dupe);
+ BMO_op_finish(bm, &op_bisect);
- BMO_slot_buffer_from_enabled_flag(bm, op, op->slots_out, "geom.out",
- BM_ALL_NOLOOP, SYMM_OUTPUT_GEOM);
+ /* Create output */
+ BMO_slot_buffer_from_enabled_flag(bm, op, op->slots_out, "geom.out", BM_ALL_NOLOOP, ELE_OUT);
}
diff --git a/source/blender/bmesh/operators/bmo_triangulate.c b/source/blender/bmesh/operators/bmo_triangulate.c
index 754709b18c0..ca45289520b 100644
--- a/source/blender/bmesh/operators/bmo_triangulate.c
+++ b/source/blender/bmesh/operators/bmo_triangulate.c
@@ -26,7 +26,6 @@
* Triangulate faces, also defines triangle fill.
*/
-#include "MEM_guardedalloc.h"
#include "DNA_listBase.h"
#include "BLI_math.h"
@@ -34,6 +33,7 @@
#include "BLI_scanfill.h"
#include "bmesh.h"
+#include "bmesh_tools.h"
#include "intern/bmesh_operators_private.h"
@@ -58,6 +58,7 @@ void bmo_triangulate_exec(BMesh *bm, BMOperator *op)
void bmo_triangle_fill_exec(BMesh *bm, BMOperator *op)
{
const bool use_beauty = BMO_slot_bool_get(op->slots_in, "use_beauty");
+ const bool use_dissolve = BMO_slot_bool_get(op->slots_in, "use_dissolve");
BMOIter siter;
BMEdge *e;
ScanFillContext sf_ctx;
@@ -65,8 +66,11 @@ void bmo_triangle_fill_exec(BMesh *bm, BMOperator *op)
ScanFillVert *sf_vert, *sf_vert_1, *sf_vert_2;
ScanFillFace *sf_tri;
SmallHash hash;
+ float normal[3], *normal_pt;
BLI_smallhash_init(&hash);
+
+ BMO_slot_vec_get(op->slots_in, "normal", normal);
BLI_scanfill_begin(&sf_ctx);
@@ -91,7 +95,15 @@ void bmo_triangle_fill_exec(BMesh *bm, BMOperator *op)
/* sf_edge->tmp.p = e; */ /* UNUSED */
}
- BLI_scanfill_calc(&sf_ctx, BLI_SCANFILL_CALC_HOLES);
+ if (is_zero_v3(normal)) {
+ normal_pt = NULL;
+ }
+ else {
+ normalize_v3(normal);
+ normal_pt = normal;
+ }
+
+ BLI_scanfill_calc_ex(&sf_ctx, BLI_SCANFILL_CALC_HOLES, normal_pt);
for (sf_tri = sf_ctx.fillfacebase.first; sf_tri; sf_tri = sf_tri->next) {
BMFace *f = BM_face_create_quad_tri(bm,
@@ -121,4 +133,27 @@ void bmo_triangle_fill_exec(BMesh *bm, BMOperator *op)
}
BMO_slot_buffer_from_enabled_flag(bm, op, op->slots_out, "geom.out", BM_EDGE | BM_FACE, ELE_NEW);
+
+ if (use_dissolve) {
+ BMO_ITER (e, &siter, op->slots_out, "geom.out", BM_EDGE) {
+ if (LIKELY(e->l)) { /* in rare cases the edges face will have already been removed from the edge */
+ BMFace *f_new;
+ f_new = BM_faces_join_pair(bm, e->l->f,
+ e->l->radial_next->f, e,
+ false); /* join faces */
+ if (f_new) {
+ BMO_elem_flag_enable(bm, f_new, ELE_NEW);
+ BM_edge_kill(bm, e);
+ }
+ else {
+ BMO_error_clear(bm);
+ }
+ }
+ else {
+ BM_edge_kill(bm, e);
+ }
+ }
+
+ BMO_slot_buffer_from_enabled_flag(bm, op, op->slots_out, "geom.out", BM_EDGE | BM_FACE, ELE_NEW);
+ }
}
diff --git a/source/blender/bmesh/operators/bmo_unsubdivide.c b/source/blender/bmesh/operators/bmo_unsubdivide.c
index c1cfb1866f4..ec222b48751 100644
--- a/source/blender/bmesh/operators/bmo_unsubdivide.c
+++ b/source/blender/bmesh/operators/bmo_unsubdivide.c
@@ -31,6 +31,7 @@
#include "BLI_utildefines.h"
#include "bmesh.h"
+#include "bmesh_tools.h"
#include "intern/bmesh_operators_private.h" /* own include */
diff --git a/source/blender/bmesh/operators/bmo_utils.c b/source/blender/bmesh/operators/bmo_utils.c
index 8b8cab9d881..600386893dd 100644
--- a/source/blender/bmesh/operators/bmo_utils.c
+++ b/source/blender/bmesh/operators/bmo_utils.c
@@ -32,7 +32,6 @@
#include "DNA_meshdata_types.h"
#include "BLI_math.h"
-#include "BLI_heap.h"
#include "BLI_alloca.h"
#include "BKE_customdata.h"
@@ -41,14 +40,16 @@
#include "intern/bmesh_operators_private.h" /* own include */
+#define ELE_NEW 1
+
void bmo_create_vert_exec(BMesh *bm, BMOperator *op)
{
float vec[3];
BMO_slot_vec_get(op->slots_in, "co", vec);
- BMO_elem_flag_enable(bm, BM_vert_create(bm, vec, NULL, 0), 1);
- BMO_slot_buffer_from_enabled_flag(bm, op, op->slots_out, "vert.out", BM_VERT, 1);
+ BMO_elem_flag_enable(bm, BM_vert_create(bm, vec, NULL, BM_CREATE_NOP), ELE_NEW);
+ BMO_slot_buffer_from_enabled_flag(bm, op, op->slots_out, "vert.out", BM_VERT, ELE_NEW);
}
void bmo_transform_exec(BMesh *UNUSED(bm), BMOperator *op)
@@ -144,19 +145,23 @@ void bmo_rotate_edges_exec(BMesh *bm, BMOperator *op)
BMO_elem_flag_test(bm, fb, FACE_TAINT) == false)
{
+ /* don't touch again (faces will be freed so run before rotating the edge) */
+ BMO_elem_flag_enable(bm, fa, FACE_TAINT);
+ BMO_elem_flag_enable(bm, fb, FACE_TAINT);
+
if (!(e2 = BM_edge_rotate(bm, e, use_ccw, check_flag))) {
+
+ BMO_elem_flag_disable(bm, fa, FACE_TAINT);
+ BMO_elem_flag_disable(bm, fb, FACE_TAINT);
#if 0
BMO_error_raise(bm, op, BMERR_INVALID_SELECTION, "Could not rotate edge");
return;
#endif
+
continue;
}
BMO_elem_flag_enable(bm, e2, EDGE_OUT);
-
- /* don't touch again */
- BMO_elem_flag_enable(bm, fa, FACE_TAINT);
- BMO_elem_flag_enable(bm, fb, FACE_TAINT);
}
}
}
diff --git a/source/blender/bmesh/operators/bmo_wireframe.c b/source/blender/bmesh/operators/bmo_wireframe.c
index c07e2c3bbf2..2e5db5210c4 100644
--- a/source/blender/bmesh/operators/bmo_wireframe.c
+++ b/source/blender/bmesh/operators/bmo_wireframe.c
@@ -159,10 +159,11 @@ void bmo_wireframe_exec(BMesh *bm, BMOperator *op)
const bool use_boundary = BMO_slot_bool_get(op->slots_in, "use_boundary");
const bool use_even_offset = BMO_slot_bool_get(op->slots_in, "use_even_offset");
const bool use_relative_offset = BMO_slot_bool_get(op->slots_in, "use_relative_offset");
- const bool use_crease = (BMO_slot_bool_get(op->slots_in, "use_crease") &&
- CustomData_has_layer(&bm->edata, CD_CREASE));
+ const bool use_crease = BMO_slot_bool_get(op->slots_in, "use_crease");
const float depth = BMO_slot_float_get(op->slots_in, "thickness");
const float inset = depth;
+ int cd_edge_crease_offset = use_crease ? CustomData_get_offset(&bm->edata, CD_CREASE) : -1;
+ const float crease_weight = 1.0f;
const int totvert_orig = bm->totvert;
@@ -196,6 +197,11 @@ void bmo_wireframe_exec(BMesh *bm, BMOperator *op)
int i;
+ if (use_crease && cd_edge_crease_offset == -1) {
+ BM_data_layer_add(bm, &bm->edata, CD_CREASE);
+ cd_edge_crease_offset = CustomData_get_offset(&bm->edata, CD_CREASE);
+ }
+
BM_mesh_elem_index_ensure(bm, BM_VERT);
BM_ITER_MESH_INDEX (v_src, &iter, bm, BM_VERTS_OF_MESH, i) {
@@ -229,9 +235,9 @@ void bmo_wireframe_exec(BMesh *bm, BMOperator *op)
}
madd_v3_v3v3fl(tvec, v_src->co, v_src->no, -fac);
- verts_neg[i] = BM_vert_create(bm, tvec, v_src, 0);
+ verts_neg[i] = BM_vert_create(bm, tvec, v_src, BM_CREATE_NOP);
madd_v3_v3v3fl(tvec, v_src->co, v_src->no, fac);
- verts_pos[i] = BM_vert_create(bm, tvec, v_src, 0);
+ verts_pos[i] = BM_vert_create(bm, tvec, v_src, BM_CREATE_NOP);
}
else {
/* could skip this */
@@ -269,7 +275,7 @@ void bmo_wireframe_exec(BMesh *bm, BMOperator *op)
}
madd_v3_v3v3fl(tvec, l->v->co, tvec, fac);
- verts_loop[verts_loop_tot] = BM_vert_create(bm, tvec, l->v, 0);
+ verts_loop[verts_loop_tot] = BM_vert_create(bm, tvec, l->v, BM_CREATE_NOP);
if (use_boundary) {
@@ -303,7 +309,7 @@ void bmo_wireframe_exec(BMesh *bm, BMOperator *op)
fac *= verts_relfac[BM_elem_index_get(l_pair[i]->v)];
}
madd_v3_v3v3fl(tvec, l_pair[i]->v->co, tvec, fac);
- verts_boundary[BM_elem_index_get(l_pair[i]->v)] = BM_vert_create(bm, tvec, l_pair[i]->v, 0);
+ verts_boundary[BM_elem_index_get(l_pair[i]->v)] = BM_vert_create(bm, tvec, l_pair[i]->v, BM_CREATE_NOP);
}
}
}
@@ -380,16 +386,16 @@ void bmo_wireframe_exec(BMesh *bm, BMOperator *op)
if (use_crease) {
BMEdge *e_new;
e_new = BM_edge_exists(v_pos1, v_b1);
- BM_elem_float_data_set(&bm->edata, e_new, CD_CREASE, 1.0f);
+ BM_ELEM_CD_SET_FLOAT(e_new, cd_edge_crease_offset, crease_weight);
e_new = BM_edge_exists(v_pos2, v_b2);
- BM_elem_float_data_set(&bm->edata, e_new, CD_CREASE, 1.0f);
+ BM_ELEM_CD_SET_FLOAT(e_new, cd_edge_crease_offset, crease_weight);
e_new = BM_edge_exists(v_neg1, v_b1);
- BM_elem_float_data_set(&bm->edata, e_new, CD_CREASE, 1.0f);
+ BM_ELEM_CD_SET_FLOAT(e_new, cd_edge_crease_offset, crease_weight);
e_new = BM_edge_exists(v_neg2, v_b2);
- BM_elem_float_data_set(&bm->edata, e_new, CD_CREASE, 1.0f);
+ BM_ELEM_CD_SET_FLOAT(e_new, cd_edge_crease_offset, crease_weight);
}
}
}
@@ -397,16 +403,16 @@ void bmo_wireframe_exec(BMesh *bm, BMOperator *op)
if (use_crease) {
BMEdge *e_new;
e_new = BM_edge_exists(v_pos1, v_l1);
- BM_elem_float_data_set(&bm->edata, e_new, CD_CREASE, 1.0f);
+ BM_ELEM_CD_SET_FLOAT(e_new, cd_edge_crease_offset, crease_weight);
e_new = BM_edge_exists(v_pos2, v_l2);
- BM_elem_float_data_set(&bm->edata, e_new, CD_CREASE, 1.0f);
+ BM_ELEM_CD_SET_FLOAT(e_new, cd_edge_crease_offset, crease_weight);
e_new = BM_edge_exists(v_neg1, v_l1);
- BM_elem_float_data_set(&bm->edata, e_new, CD_CREASE, 1.0f);
+ BM_ELEM_CD_SET_FLOAT(e_new, cd_edge_crease_offset, crease_weight);
e_new = BM_edge_exists(v_neg2, v_l2);
- BM_elem_float_data_set(&bm->edata, e_new, CD_CREASE, 1.0f);
+ BM_ELEM_CD_SET_FLOAT(e_new, cd_edge_crease_offset, crease_weight);
}
}
diff --git a/source/blender/bmesh/tools/bmesh_beautify.c b/source/blender/bmesh/tools/bmesh_beautify.c
new file mode 100644
index 00000000000..af9345b903c
--- /dev/null
+++ b/source/blender/bmesh/tools/bmesh_beautify.c
@@ -0,0 +1,445 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor(s): Joseph Eagar.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/bmesh/tools/bmesh_beautify.c
+ * \ingroup bmesh
+ *
+ * Beautify the mesh by rotating edges between triangles
+ * to more attractive positions until no more rotations can be made.
+ *
+ * In principle this is very simple however there is the possibility of
+ * going into an eternal loop where edges keep rotating.
+ * To avoid this - each edge stores a set of it previous
+ * states so as not to rotate back.
+ *
+ * TODO
+ * - Take face normals into account.
+ */
+
+#include "BLI_math.h"
+#include "BLI_heap.h"
+
+#include "MEM_guardedalloc.h"
+
+#include "bmesh.h"
+#include "bmesh_beautify.h" /* own include */
+
+
+// #define DEBUG_TIME
+
+#ifdef DEBUG_TIME
+# include "PIL_time.h"
+# include "PIL_time_utildefines.h"
+#endif
+
+/* -------------------------------------------------------------------- */
+/* GSet for edge rotation */
+
+typedef struct EdRotState {
+ int v1, v2; /* edge vert, small -> large */
+ int f1, f2; /* face vert, small -> large */
+} EdRotState;
+
+static unsigned int erot_gsetutil_hash(const void *ptr)
+{
+ const EdRotState *e_state = (const EdRotState *)ptr;
+ unsigned int
+ hash = BLI_ghashutil_inthash(SET_INT_IN_POINTER(e_state->v1));
+ hash ^= BLI_ghashutil_inthash(SET_INT_IN_POINTER(e_state->v2));
+ hash ^= BLI_ghashutil_inthash(SET_INT_IN_POINTER(e_state->f1));
+ hash ^= BLI_ghashutil_inthash(SET_INT_IN_POINTER(e_state->f2));
+ return hash;
+}
+static int erot_gsetutil_cmp(const void *a, const void *b)
+{
+ const EdRotState *e_state_a = (const EdRotState *)a;
+ const EdRotState *e_state_b = (const EdRotState *)b;
+ if (e_state_a->v1 < e_state_b->v1) return -1;
+ else if (e_state_a->v1 > e_state_b->v1) return 1;
+ else if (e_state_a->v2 < e_state_b->v2) return -1;
+ else if (e_state_a->v2 > e_state_b->v2) return 1;
+ else if (e_state_a->f1 < e_state_b->f1) return -1;
+ else if (e_state_a->f1 > e_state_b->f1) return 1;
+ else if (e_state_a->f2 < e_state_b->f2) return -1;
+ else if (e_state_a->f2 > e_state_b->f2) return 1;
+ else return 0;
+}
+
+static GSet *erot_gset_new(void)
+{
+ return BLI_gset_new(erot_gsetutil_hash, erot_gsetutil_cmp, __func__);
+}
+
+/* ensure v0 is smaller */
+#define EDGE_ORD(v0, v1) \
+ if (v0 > v1) { \
+ v0 ^= v1; \
+ v1 ^= v0; \
+ v0 ^= v1; \
+ } (void)0
+
+static void erot_state_ex(const BMEdge *e, int v_index[2], int f_index[2])
+{
+ BLI_assert(BM_edge_is_manifold((BMEdge *)e));
+ BLI_assert(BM_vert_in_edge(e, e->l->prev->v) == false);
+ BLI_assert(BM_vert_in_edge(e, e->l->radial_next->prev->v) == false);
+
+ /* verts of the edge */
+ v_index[0] = BM_elem_index_get(e->v1);
+ v_index[1] = BM_elem_index_get(e->v2);
+ EDGE_ORD(v_index[0], v_index[1]);
+
+ /* verts of each of the 2 faces attached to this edge
+ * (that are not apart of this edge) */
+ f_index[0] = BM_elem_index_get(e->l->prev->v);
+ f_index[1] = BM_elem_index_get(e->l->radial_next->prev->v);
+ EDGE_ORD(f_index[0], f_index[1]);
+}
+
+static void erot_state_current(const BMEdge *e, EdRotState *e_state)
+{
+ erot_state_ex(e, &e_state->v1, &e_state->f1);
+}
+
+static void erot_state_alternate(const BMEdge *e, EdRotState *e_state)
+{
+ erot_state_ex(e, &e_state->f1, &e_state->v1);
+}
+
+/* -------------------------------------------------------------------- */
+/* Calculate the improvement of rotating the edge */
+
+/**
+ * \return a negative value means the edge can be rotated.
+ */
+static float bm_edge_calc_rotate_beauty__area(
+ const float v1[3], const float v2[3], const float v3[3], const float v4[3])
+{
+ /* not a loop (only to be able to break out) */
+ do {
+ float v1_xy[2], v2_xy[2], v3_xy[2], v4_xy[2];
+
+ /* first get the 2d values */
+ {
+ bool is_zero_a, is_zero_b;
+ float no[3];
+ float axis_mat[3][3];
+
+ // printf("%p %p %p %p - %p %p\n", v1, v2, v3, v4, e->l->f, e->l->radial_next->f);
+ BLI_assert((ELEM3(v1, v2, v3, v4) == false) &&
+ (ELEM3(v2, v1, v3, v4) == false) &&
+ (ELEM3(v3, v1, v2, v4) == false) &&
+ (ELEM3(v4, v1, v2, v3) == false));
+
+ is_zero_a = area_tri_v3(v2, v3, v4) <= FLT_EPSILON;
+ is_zero_b = area_tri_v3(v2, v4, v1) <= FLT_EPSILON;
+
+ if (LIKELY(is_zero_a == false && is_zero_b == false)) {
+ float no_a[3], no_b[3];
+ normal_tri_v3(no_a, v2, v3, v4); /* a */
+ normal_tri_v3(no_b, v2, v4, v1); /* b */
+ add_v3_v3v3(no, no_a, no_b);
+ if (UNLIKELY(normalize_v3(no) <= FLT_EPSILON)) {
+ break;
+ }
+ }
+ else if (is_zero_a == false) {
+ normal_tri_v3(no, v2, v3, v4); /* a */
+ }
+ else if (is_zero_b == false) {
+ normal_tri_v3(no, v2, v4, v1); /* b */
+ }
+ else {
+ /* both zero area, no useful normal can be calculated */
+ break;
+ }
+
+ // { float a = angle_normalized_v3v3(no_a, no_b); printf("~ %.7f\n", a); fflush(stdout);}
+
+ axis_dominant_v3_to_m3(axis_mat, no);
+ mul_v2_m3v3(v1_xy, axis_mat, v1);
+ mul_v2_m3v3(v2_xy, axis_mat, v2);
+ mul_v2_m3v3(v3_xy, axis_mat, v3);
+ mul_v2_m3v3(v4_xy, axis_mat, v4);
+ }
+
+ // printf("%p %p %p %p - %p %p\n", v1, v2, v3, v4, e->l->f, e->l->radial_next->f);
+
+ if (is_quad_convex_v2(v1_xy, v2_xy, v3_xy, v4_xy)) {
+ /* testing rule: the area divided by the perimeter,
+ * check if (1-3) beats the existing (2-4) edge rotation */
+ float area_a, area_b;
+ float prim_a, prim_b;
+ float fac_24, fac_13;
+
+ float len_12, len_23, len_34, len_41, len_24, len_13;
+
+ /* edges around the quad */
+ len_12 = len_v2v2(v1_xy, v2_xy);
+ len_23 = len_v2v2(v2_xy, v3_xy);
+ len_34 = len_v2v2(v3_xy, v4_xy);
+ len_41 = len_v2v2(v4_xy, v1_xy);
+ /* edges crossing the quad interior */
+ len_13 = len_v2v2(v1_xy, v3_xy);
+ len_24 = len_v2v2(v2_xy, v4_xy);
+
+ /* edge (2-4), current state */
+ area_a = area_tri_v2(v2_xy, v3_xy, v4_xy);
+ area_b = area_tri_v2(v2_xy, v4_xy, v1_xy);
+ prim_a = len_23 + len_34 + len_24;
+ prim_b = len_24 + len_41 + len_12;
+ fac_24 = (area_a / prim_a) + (area_b / prim_b);
+
+ /* edge (1-3), new state */
+ area_a = area_tri_v2(v1_xy, v2_xy, v3_xy);
+ area_b = area_tri_v2(v1_xy, v3_xy, v4_xy);
+ prim_a = len_12 + len_23 + len_13;
+ prim_b = len_34 + len_41 + len_13;
+ fac_13 = (area_a / prim_a) + (area_b / prim_b);
+
+ /* negative number if (1-3) is an improved state */
+ return fac_24 - fac_13;
+ }
+ } while (false);
+
+ return FLT_MAX;
+}
+
+static float bm_edge_calc_rotate_beauty__angle(
+ const float v1[3], const float v2[3], const float v3[3], const float v4[3])
+{
+ /* not a loop (only to be able to break out) */
+ do {
+ float no_a[3], no_b[3];
+ float angle_24, angle_13;
+
+ /* edge (2-4), current state */
+ normal_tri_v3(no_a, v2, v3, v4);
+ normal_tri_v3(no_b, v2, v4, v1);
+ angle_24 = angle_normalized_v3v3(no_a, no_b);
+
+ /* edge (1-3), new state */
+ /* only check new state for degenerate outcome */
+ if ((normal_tri_v3(no_a, v1, v2, v3) == 0.0f) ||
+ (normal_tri_v3(no_b, v1, v3, v4) == 0.0f))
+ {
+ break;
+ }
+ angle_13 = angle_normalized_v3v3(no_a, no_b);
+
+ return angle_13 - angle_24;
+ } while (false);
+
+ return FLT_MAX;
+}
+
+static float bm_edge_calc_rotate_beauty(const BMEdge *e, const short flag, const short method)
+{
+ /* not a loop (only to be able to break out) */
+ do {
+ const float *v1, *v2, *v3, *v4;
+
+ v1 = e->l->prev->v->co; /* first face co */
+ v2 = e->l->v->co; /* e->v1 or e->v2*/
+ v3 = e->l->radial_next->prev->v->co; /* second face co */
+ v4 = e->l->next->v->co; /* e->v1 or e->v2*/
+
+ if (flag & VERT_RESTRICT_TAG) {
+ BMVert *v_a = e->l->prev->v, *v_b = e->l->radial_next->prev->v;
+ if (BM_elem_flag_test(v_a, BM_ELEM_TAG) == BM_elem_flag_test(v_b, BM_ELEM_TAG)) {
+ break;
+ }
+ }
+
+ if (UNLIKELY(v1 == v3)) {
+ // printf("This should never happen, but does sometimes!\n");
+ break;
+ }
+
+ switch (method) {
+ case 0:
+ return bm_edge_calc_rotate_beauty__area(v1, v2, v3, v4);
+ default:
+ return bm_edge_calc_rotate_beauty__angle(v1, v2, v3, v4);
+ }
+ } while (false);
+
+ return FLT_MAX;
+}
+
+/* -------------------------------------------------------------------- */
+/* Update the edge cost of rotation in the heap */
+
+/* recalc an edge in the heap (surrounding geometry has changed) */
+static void bm_edge_update_beauty_cost_single(BMEdge *e, Heap *eheap, HeapNode **eheap_table, GSet **edge_state_arr,
+ const short flag, const short method)
+{
+ if (BM_elem_flag_test(e, BM_ELEM_TAG)) {
+ const int i = BM_elem_index_get(e);
+ GSet *e_state_set = edge_state_arr[i];
+
+ if (eheap_table[i]) {
+ BLI_heap_remove(eheap, eheap_table[i]);
+ eheap_table[i] = NULL;
+ }
+
+ /* check if we can add it back */
+ BLI_assert(BM_edge_is_manifold(e) == true);
+ //BLI_assert(BMO_elem_flag_test(bm, e->l->f, FACE_MARK) &&
+ // BMO_elem_flag_test(bm, e->l->radial_next->f, FACE_MARK));
+
+ /* check we're not moving back into a state we have been in before */
+ if (e_state_set != NULL) {
+ EdRotState e_state_alt;
+ erot_state_alternate(e, &e_state_alt);
+ if (BLI_gset_haskey(e_state_set, (void *)&e_state_alt)) {
+ // printf(" skipping, we already have this state\n");
+ return;
+ }
+ }
+
+ {
+ /* recalculate edge */
+ const float cost = bm_edge_calc_rotate_beauty(e, flag, method);
+ if (cost < 0.0f) {
+ eheap_table[i] = BLI_heap_insert(eheap, cost, e);
+ }
+ else {
+ eheap_table[i] = NULL;
+ }
+ }
+ }
+}
+
+/* we have rotated an edge, tag other edges and clear this one */
+static void bm_edge_update_beauty_cost(BMEdge *e, Heap *eheap, HeapNode **eheap_table, GSet **edge_state_arr,
+ const short flag, const short method)
+{
+ BMLoop *l;
+ BLI_assert(e->l->f->len == 3 &&
+ e->l->radial_next->f->len == 3);
+
+ l = e->l;
+ bm_edge_update_beauty_cost_single(l->next->e, eheap, eheap_table, edge_state_arr, flag, method);
+ bm_edge_update_beauty_cost_single(l->prev->e, eheap, eheap_table, edge_state_arr, flag, method);
+ l = l->radial_next;
+ bm_edge_update_beauty_cost_single(l->next->e, eheap, eheap_table, edge_state_arr, flag, method);
+ bm_edge_update_beauty_cost_single(l->prev->e, eheap, eheap_table, edge_state_arr, flag, method);
+}
+
+/* -------------------------------------------------------------------- */
+/* Beautify Fill */
+
+#define ELE_NEW 1
+#define FACE_MARK 2
+
+/**
+ * \note All edges in \a edge_array must be tagged and
+ * have their index values set according to their position in the array.
+ */
+void BM_mesh_beautify_fill(BMesh *bm, BMEdge **edge_array, const int edge_array_len,
+ const short flag, const short method,
+ const short oflag_edge, const short oflag_face)
+{
+ Heap *eheap; /* edge heap */
+ HeapNode **eheap_table; /* edge index aligned table pointing to the eheap */
+
+ GSet **edge_state_arr = MEM_callocN((size_t)edge_array_len * sizeof(GSet *), __func__);
+ BLI_mempool *edge_state_pool = BLI_mempool_create(sizeof(EdRotState), 512, 512, BLI_MEMPOOL_SYSMALLOC);
+ int i;
+
+#ifdef DEBUG_TIME
+ TIMEIT_START(beautify_fill);
+#endif
+
+ eheap = BLI_heap_new_ex((unsigned int)edge_array_len);
+ eheap_table = MEM_mallocN(sizeof(HeapNode *) * (size_t)edge_array_len, __func__);
+
+ /* build heap */
+ for (i = 0; i < edge_array_len; i++) {
+ BMEdge *e = edge_array[i];
+ const float cost = bm_edge_calc_rotate_beauty(e, flag, method);
+ if (cost < 0.0f) {
+ eheap_table[i] = BLI_heap_insert(eheap, cost, e);
+ }
+ else {
+ eheap_table[i] = NULL;
+ }
+ }
+
+ while (BLI_heap_is_empty(eheap) == false) {
+ BMEdge *e = BLI_heap_popmin(eheap);
+ i = BM_elem_index_get(e);
+ eheap_table[i] = NULL;
+
+ e = BM_edge_rotate(bm, e, false, BM_EDGEROT_CHECK_EXISTS);
+ if (LIKELY(e)) {
+ GSet *e_state_set = edge_state_arr[i];
+
+ /* add the new state into the set so we don't move into this state again
+ * note: we could add the previous state too but this isn't essential)
+ * for avoiding eternal loops */
+ EdRotState *e_state = BLI_mempool_alloc(edge_state_pool);
+ erot_state_current(e, e_state);
+ if (UNLIKELY(e_state_set == NULL)) {
+ edge_state_arr[i] = e_state_set = erot_gset_new(); /* store previous state */
+ }
+ BLI_assert(BLI_gset_haskey(e_state_set, (void *)e_state) == false);
+ BLI_gset_insert(e_state_set, e_state);
+
+
+ // printf(" %d -> %d, %d\n", i, BM_elem_index_get(e->v1), BM_elem_index_get(e->v2));
+
+ /* maintain the index array */
+ edge_array[i] = e;
+ BM_elem_index_set(e, i);
+
+ /* recalculate faces connected on the heap */
+ bm_edge_update_beauty_cost(e, eheap, eheap_table, edge_state_arr, flag, method);
+
+ /* update flags */
+ if (oflag_edge)
+ BMO_elem_flag_enable(bm, e, oflag_edge);
+ if (oflag_face) {
+ BMO_elem_flag_enable(bm, e->l->f, oflag_face);
+ BMO_elem_flag_enable(bm, e->l->radial_next->f, oflag_face);
+ }
+ }
+ }
+
+ BLI_heap_free(eheap, NULL);
+ MEM_freeN(eheap_table);
+
+ for (i = 0; i < edge_array_len; i++) {
+ if (edge_state_arr[i]) {
+ BLI_gset_free(edge_state_arr[i], NULL);
+ }
+ }
+
+ MEM_freeN(edge_state_arr);
+ BLI_mempool_destroy(edge_state_pool);
+
+#ifdef DEBUG_TIME
+ TIMEIT_END(beautify_fill);
+#endif
+}
+
diff --git a/source/blender/compositor/operations/COM_RenderLayersColorOperation.h b/source/blender/bmesh/tools/bmesh_beautify.h
index 4f4dfbfb6f3..210e265d706 100644
--- a/source/blender/compositor/operations/COM_RenderLayersColorOperation.h
+++ b/source/blender/bmesh/tools/bmesh_beautify.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2011, Blender Foundation.
+ * ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -15,19 +15,24 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Contributor(s): Campbell Barton
+ *
+ * ***** END GPL LICENSE BLOCK *****
*/
-#ifndef _COM_RenderLayersColorOperation_h
-#define _COM_RenderLayersColorOperation_h
+#ifndef __BMESH_BEAUTIFY_H__
+#define __BMESH_BEAUTIFY_H__
-#include "COM_RenderLayersBaseProg.h"
+/** \file blender/bmesh/tools/bmesh_beautify.h
+ * \ingroup bmesh
+ */
-class RenderLayersColorOperation : public RenderLayersBaseProg {
-public:
- RenderLayersColorOperation();
+enum {
+ VERT_RESTRICT_TAG = (1 << 0),
};
-#endif
+void BM_mesh_beautify_fill(BMesh *bm, BMEdge **edge_array, const int edge_array_len,
+ const short flag, const short method,
+ const short oflag_edge, const short oflag_face);
+
+#endif /* __BMESH_BEAUTIFY_H__ */
diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c
index 02f0251bff2..bb3fe129e0b 100644
--- a/source/blender/bmesh/tools/bmesh_bevel.c
+++ b/source/blender/bmesh/tools/bmesh_bevel.c
@@ -42,6 +42,8 @@
#include "BKE_deform.h"
#include "bmesh.h"
+#include "bmesh_bevel.h" /* own include */
+
#include "./intern/bmesh_private.h"
#define BEVEL_EPSILON_D 1e-6
@@ -177,7 +179,7 @@ static NewVert *mesh_vert(VMesh *vm, int i, int j, int k)
static void create_mesh_bmvert(BMesh *bm, VMesh *vm, int i, int j, int k, BMVert *eg)
{
NewVert *nv = mesh_vert(vm, i, j, k);
- nv->v = BM_vert_create(bm, nv->co, eg, 0);
+ nv->v = BM_vert_create(bm, nv->co, eg, BM_CREATE_NOP);
BM_elem_flag_disable(nv->v, BM_ELEM_TAG);
}
@@ -255,20 +257,8 @@ static BMFace *bev_create_ngon(BMesh *bm, BMVert **vert_arr, const int totv,
BMFace *f, *interp_f;
int i;
- if (totv == 3) {
- f = BM_face_create_quad_tri_v(bm, vert_arr, 3, facerep, FALSE);
- }
- else if (totv == 4) {
- f = BM_face_create_quad_tri_v(bm, vert_arr, 4, facerep, FALSE);
- }
- else {
- BMEdge **ee = BLI_array_alloca(ee, totv);
+ f = BM_face_create_verts(bm, vert_arr, totv, facerep, BM_CREATE_NOP, true);
- for (i = 0; i < totv; i++) {
- ee[i] = BM_edge_create(bm, vert_arr[i], vert_arr[(i + 1) % totv], NULL, BM_CREATE_NO_DOUBLE);
- }
- f = BM_face_create(bm, vert_arr, ee, totv, 0);
- }
if ((facerep || (face_arr && face_arr[0])) && f) {
BM_elem_attrs_copy(bm, bm, facerep ? facerep : face_arr[0], f);
if (do_interp) {
@@ -428,14 +418,14 @@ static void bev_merge_uvs(BMesh *bm, BMVert *v)
n = 0;
zero_v2(uv);
- BM_ITER_ELEM(l, &iter, v, BM_LOOPS_OF_VERT) {
+ BM_ITER_ELEM (l, &iter, v, BM_LOOPS_OF_VERT) {
luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset);
add_v2_v2(uv, luv->uv);
n++;
}
if (n > 1) {
mul_v2_fl(uv, 1.0f / (float)n);
- BM_ITER_ELEM(l, &iter, v, BM_LOOPS_OF_VERT) {
+ BM_ITER_ELEM (l, &iter, v, BM_LOOPS_OF_VERT) {
luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset);
copy_v2_v2(luv->uv, uv);
}
@@ -744,14 +734,14 @@ static void snap_to_edge_profile(EdgeHalf *e, const float va[3], const float vb[
float co[3])
{
float m[4][4], minv[4][4];
- float edir[3], va0[3], vb0[3], vmid0[3], p[3], snap[3];
+ float edir[3], va0[3], vb0[3], vmid0[3], p[3], snap[3], plane[4];
sub_v3_v3v3(edir, e->e->v1->co, e->e->v2->co);
- normalize_v3(edir);
/* project va and vb onto plane P, with normal edir and containing co */
- closest_to_plane_v3(va0, co, edir, va);
- closest_to_plane_v3(vb0, co, edir, vb);
+ plane_from_point_normal_v3(plane, co, edir);
+ closest_to_plane_v3(va0, plane, va);
+ closest_to_plane_v3(vb0, plane, vb);
project_to_edge(e->e, va0, vb0, vmid0);
if (make_unit_square_map(va0, vmid0, vb0, m)) {
/* Transform co and project it onto the unit circle.
@@ -910,7 +900,12 @@ static void build_boundary(BevelParams *bp, BevVert *bv)
BLI_assert(vm->count >= 2);
if (bp->vertex_only) {
- vm->mesh_kind = bp->seg > 1 ? M_ADJ_SUBDIV : M_POLY;
+ if (vm->count == 2)
+ vm->mesh_kind = M_NONE;
+ else if (bp->seg > 1)
+ vm->mesh_kind = M_ADJ_SUBDIV;
+ else
+ vm->mesh_kind = M_POLY;
}
else if (vm->count == 2 && bv->edgecount == 3) {
vm->mesh_kind = M_NONE;
@@ -1143,7 +1138,7 @@ static void bevel_build_rings(BMesh *bm, BevVert *bv)
mul_v3_fl(midco, 1.0f / nn);
if (epipe)
snap_to_edge_profile(epipe, va_pipe, vb_pipe, midco);
- bmv = BM_vert_create(bm, midco, NULL, 0);
+ bmv = BM_vert_create(bm, midco, NULL, BM_CREATE_NOP);
v = vm->boundstart;
do {
i = v->index;
@@ -1212,8 +1207,12 @@ static void bevel_build_rings(BMesh *bm, BevVert *bv)
f = boundvert_rep_face(v);
f2 = boundvert_rep_face(v->next);
if (!v->any_seam) {
- for (ring = 1; ring < ns2; ring++)
- bev_merge_uvs(bm, mesh_vert(vm, i, ring, ns2)->v);
+ for (ring = 1; ring < ns2; ring++) {
+ BMVert *v_uv = mesh_vert(vm, i, ring, ns2)->v;
+ if (v_uv) {
+ bev_merge_uvs(bm, v_uv);
+ }
+ }
}
} while ((v = v->next) != vm->boundstart);
if (!bv->any_seam)
@@ -1972,7 +1971,7 @@ static void bevel_vert_construct(BMesh *bm, BevelParams *bp, BMVert *v)
if (!first_bme)
first_bme = v->e;
- if ((nsel == 0 && !bp->vertex_only) || (ntot < 3 && bp->vertex_only)) {
+ if ((nsel == 0 && !bp->vertex_only) || (ntot < 2 && bp->vertex_only)) {
/* signal this vert isn't being beveled */
BM_elem_flag_disable(v, BM_ELEM_TAG);
return;
@@ -2333,14 +2332,14 @@ static float bevel_limit_offset(BMesh *bm, BevelParams *bp)
bool vbeveled;
limited_offset = bp->offset;
- BM_ITER_MESH(v, &v_iter, bm, BM_VERTS_OF_MESH) {
+ BM_ITER_MESH (v, &v_iter, bm, BM_VERTS_OF_MESH) {
if (BM_elem_flag_test(v, BM_ELEM_TAG)) {
if (bp->vertex_only) {
vbeveled = true;
}
else {
vbeveled = false;
- BM_ITER_ELEM(e, &e_iter, v, BM_EDGES_OF_VERT) {
+ BM_ITER_ELEM (e, &e_iter, v, BM_EDGES_OF_VERT) {
if (BM_elem_flag_test(BM_edge_other_vert(e, v), BM_ELEM_TAG)) {
vbeveled = true;
break;
@@ -2348,7 +2347,7 @@ static float bevel_limit_offset(BMesh *bm, BevelParams *bp)
}
}
if (vbeveled) {
- BM_ITER_ELEM(e, &e_iter, v, BM_EDGES_OF_VERT) {
+ BM_ITER_ELEM (e, &e_iter, v, BM_EDGES_OF_VERT) {
half_elen = 0.5f * BM_edge_calc_length(e);
if (half_elen < limited_offset)
limited_offset = half_elen;
@@ -2376,7 +2375,7 @@ void BM_mesh_bevel(BMesh *bm, const float offset, const float segments,
const struct MDeformVert *dvert, const int vertex_group)
{
BMIter iter;
- BMVert *v;
+ BMVert *v, *v_next;
BMEdge *e;
BevelParams bp = {NULL};
@@ -2390,7 +2389,7 @@ void BM_mesh_bevel(BMesh *bm, const float offset, const float segments,
if (bp.offset > 0) {
/* primary alloc */
bp.vert_hash = BLI_ghash_ptr_new(__func__);
- bp.mem_arena = BLI_memarena_new((1 << 16), __func__);
+ bp.mem_arena = BLI_memarena_new(MEM_SIZE_OPTIMAL(1 << 16), __func__);
BLI_memarena_use_calloc(bp.mem_arena);
if (limit_offset)
@@ -2419,7 +2418,7 @@ void BM_mesh_bevel(BMesh *bm, const float offset, const float segments,
}
}
- BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) {
+ BM_ITER_MESH_MUTABLE (v, v_next, &iter, bm, BM_VERTS_OF_MESH) {
if (BM_elem_flag_test(v, BM_ELEM_TAG)) {
BLI_assert(find_bevvert(&bp, v) != NULL);
BM_vert_kill(bm, v);
diff --git a/source/blender/bmesh/tools/bmesh_bisect_plane.c b/source/blender/bmesh/tools/bmesh_bisect_plane.c
new file mode 100644
index 00000000000..c3c2924ea8e
--- /dev/null
+++ b/source/blender/bmesh/tools/bmesh_bisect_plane.c
@@ -0,0 +1,415 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor(s): Campbell Barton
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/bmesh/tools/bmesh_bisect_plane.c
+ * \ingroup bmesh
+ *
+ * Cut the geometry in half using a plane.
+ *
+ * \par Implementation
+ * This simply works by splitting tagged edges whos verts span either side of
+ * the plane, then splitting faces along their dividing verts.
+ * The only complex case is when a ngon spans the axis multiple times,
+ * in this case we need to do some extra checks to correctly bisect the ngon.
+ * see: #bm_face_bisect_verts
+ */
+
+#include <limits.h>
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_utildefines.h"
+#include "BLI_alloca.h"
+#include "BLI_linklist.h"
+#include "BLI_linklist_stack.h"
+#include "BLI_math.h"
+
+#include "bmesh.h"
+#include "bmesh_bisect_plane.h" /* own include */
+
+#include "BLI_strict_flags.h" /* keep last */
+
+
+/* -------------------------------------------------------------------- */
+/* Math utils */
+
+static int plane_point_test_v3(const float plane[4], const float co[3], const float eps, float *r_depth)
+{
+ const float f = plane_point_side_v3(plane, co);
+ *r_depth = f;
+
+ if (f <= -eps) return -1;
+ else if (f >= eps) return 1;
+ else return 0;
+}
+
+
+/* -------------------------------------------------------------------- */
+/* Wrappers to hide internal data-structure abuse,
+ * later we may want to move this into some hash lookup
+ * to a separate struct, but for now we can store in BMesh data */
+
+#define BM_VERT_DIR(v) ((v)->head.index) /* Direction -1/0/1 */
+#define BM_VERT_DIST(v) ((v)->no[0]) /* Distance from the plane. */
+#define BM_VERT_SORTVAL(v) ((v)->no[1]) /* Temp value for sorting. */
+#define BM_VERT_LOOPINDEX(v) /* The verts index within a face (temp var) */ \
+ (*((unsigned int *)(&(v)->no[2])))
+
+/**
+ * Hide flag access
+ * (for more readable code since same flag is used differently for vert/edgeface)...
+ */
+
+/* enable when vertex is in the center and its faces have been added to the stack */
+BLI_INLINE void vert_is_center_enable(BMVert *v) { BM_elem_flag_enable(v, BM_ELEM_TAG); }
+BLI_INLINE void vert_is_center_disable(BMVert *v) { BM_elem_flag_disable(v, BM_ELEM_TAG); }
+BLI_INLINE bool vert_is_center_test(BMVert *v) { return (BM_elem_flag_test(v, BM_ELEM_TAG) != 0); }
+
+/* enable when the edge can be cut */
+BLI_INLINE void edge_is_cut_enable(BMEdge *e) { BM_elem_flag_enable(e, BM_ELEM_TAG); }
+BLI_INLINE void edge_is_cut_disable(BMEdge *e) { BM_elem_flag_disable(e, BM_ELEM_TAG); }
+BLI_INLINE bool edge_is_cut_test(BMEdge *e) { return (BM_elem_flag_test(e, BM_ELEM_TAG) != 0); }
+
+/* enable when the faces are added to the stack */
+BLI_INLINE void face_in_stack_enable(BMFace *f) { BM_elem_flag_disable(f, BM_ELEM_TAG); }
+BLI_INLINE void face_in_stack_disable(BMFace *f) { BM_elem_flag_enable(f, BM_ELEM_TAG); }
+BLI_INLINE bool face_in_stack_test(BMFace *f) { return (BM_elem_flag_test(f, BM_ELEM_TAG) == 0); }
+
+/* -------------------------------------------------------------------- */
+/* BMesh utils */
+
+static int bm_vert_sortval_cb(const void *v_a_v, const void *v_b_v)
+{
+ const float val_a = BM_VERT_SORTVAL(*((BMVert **)v_a_v));
+ const float val_b = BM_VERT_SORTVAL(*((BMVert **)v_b_v));
+
+ if (val_a > val_b) return 1;
+ else if (val_a < val_b) return -1;
+ return 0;
+}
+
+
+static void bm_face_bisect_verts(BMesh *bm, BMFace *f, const float plane[4], const short oflag_center)
+{
+ /* unlikely more then 2 verts are needed */
+ const unsigned int f_len_orig = (unsigned int)f->len;
+ BMVert **vert_split_arr = BLI_array_alloca(vert_split_arr, f_len_orig);
+ STACK_DECLARE(vert_split_arr);
+ BMLoop *l_iter, *l_first;
+ bool use_dirs[3] = {false, false, false};
+
+ STACK_INIT(vert_split_arr);
+
+ l_first = BM_FACE_FIRST_LOOP(f);
+
+ /* add plane-aligned verts to the stack
+ * and check we have verts from both sides in this face,
+ * ... that the face doesn't only have boundry verts on the plane for eg. */
+ l_iter = l_first;
+ do {
+ if (vert_is_center_test(l_iter->v)) {
+ BLI_assert(BM_VERT_DIR(l_iter->v) == 0);
+ STACK_PUSH(vert_split_arr, l_iter->v);
+ }
+ use_dirs[BM_VERT_DIR(l_iter->v) + 1] = true;
+ } while ((l_iter = l_iter->next) != l_first);
+
+ if ((STACK_SIZE(vert_split_arr) > 1) &&
+ (use_dirs[0] && use_dirs[2]))
+ {
+ BMLoop *l_new;
+
+ if (LIKELY(STACK_SIZE(vert_split_arr) == 2)) {
+ /* common case, just cut the face once */
+ l_new = NULL;
+ BM_face_split(bm, f, vert_split_arr[0], vert_split_arr[1], &l_new, NULL, true);
+ if (l_new) {
+ if (oflag_center) {
+ BMO_elem_flag_enable(bm, l_new->e, oflag_center);
+ BMO_elem_flag_enable(bm, l_new->f, oflag_center);
+ BMO_elem_flag_enable(bm, f, oflag_center);
+ }
+ }
+ }
+ else {
+ /* less common case, _complicated_ we need to calculate how to do multiple cuts */
+ float (*face_verts_proj_2d)[2] = BLI_array_alloca(face_verts_proj_2d, f_len_orig);
+ float axis_mat[3][3];
+
+ BMFace **face_split_arr = BLI_array_alloca(face_split_arr, STACK_SIZE(vert_split_arr));
+ STACK_DECLARE(face_split_arr);
+
+ float sort_dir[3];
+ unsigned int i;
+
+
+ /* ---- */
+ /* Calculate the direction to sort verts in the face intersecting the plane */
+
+ /* exact dir isn't so important,
+ * just need a dir for sorting verts across face,
+ * 'sort_dir' could be flipped either way, it not important, we only need to order the array
+ */
+ cross_v3_v3v3(sort_dir, f->no, plane);
+ if (UNLIKELY(normalize_v3(sort_dir) == 0.0f)) {
+ /* find any 2 verts and get their direction */
+ for (i = 0; i < STACK_SIZE(vert_split_arr); i++) {
+ if (!equals_v3v3(vert_split_arr[0]->co, vert_split_arr[i]->co)) {
+ sub_v3_v3v3(sort_dir, vert_split_arr[0]->co, vert_split_arr[i]->co);
+ normalize_v3(sort_dir);
+ }
+ }
+ if (UNLIKELY(i == STACK_SIZE(vert_split_arr))) {
+ /* ok, we can't do anything useful here,
+ * face has no area or so, bail out, this is highly unlikely but not impossible */
+ goto finally;
+ }
+ }
+
+
+ /* ---- */
+ /* Calculate 2d coords to use for intersection checks */
+
+ /* get the faces 2d coords */
+ BLI_assert(BM_face_is_normal_valid(f));
+ axis_dominant_v3_to_m3(axis_mat, f->no);
+
+ l_iter = l_first;
+ i = 0;
+ do {
+ BM_VERT_LOOPINDEX(l_iter->v) = i;
+ mul_v2_m3v3(face_verts_proj_2d[i], axis_mat, l_iter->v->co);
+ i++;
+ } while ((l_iter = l_iter->next) != l_first);
+
+
+ /* ---- */
+ /* Sort the verts across the face from one side to another */
+ for (i = 0; i < STACK_SIZE(vert_split_arr); i++) {
+ BMVert *v = vert_split_arr[i];
+ BM_VERT_SORTVAL(v) = dot_v3v3(sort_dir, v->co);
+ }
+
+ qsort(vert_split_arr, STACK_SIZE(vert_split_arr), sizeof(*vert_split_arr), bm_vert_sortval_cb);
+
+
+ /* ---- */
+ /* Split the face across sorted splits */
+
+ /* note: we don't know which face gets which splits,
+ * so at the moment we have to search all faces for the vert pair,
+ * while not all that nice, typically there are < 5 resulting faces,
+ * so its not _that_ bad. */
+
+ STACK_INIT(face_split_arr);
+ STACK_PUSH(face_split_arr, f);
+
+ for (i = 0; i < STACK_SIZE(vert_split_arr) - 1; i++) {
+ BMVert *v_a = vert_split_arr[i];
+ BMVert *v_b = vert_split_arr[i + 1];
+ float co_mid[2];
+
+ /* geometric test before doing face lookups,
+ * find if the split spans a filled region of the polygon. */
+ mid_v2_v2v2(co_mid,
+ face_verts_proj_2d[BM_VERT_LOOPINDEX(v_a)],
+ face_verts_proj_2d[BM_VERT_LOOPINDEX(v_b)]);
+
+ if (isect_point_poly_v2(co_mid, (const float (*)[2])face_verts_proj_2d, f_len_orig, false)) {
+ BMLoop *l_a, *l_b;
+ bool found = false;
+ unsigned int j;
+
+ for (j = 0; j < STACK_SIZE(face_split_arr); j++) {
+ /* would be nice to avoid loop lookup here,
+ * but we need to know which face the verts are in */
+ if ((l_a = BM_face_vert_share_loop(face_split_arr[j], v_a)) &&
+ (l_b = BM_face_vert_share_loop(face_split_arr[j], v_b)))
+ {
+ found = true;
+ break;
+ }
+ }
+
+ BLI_assert(found == true);
+
+ /* in fact this simple test is good enough,
+ * test if the loops are adjacent */
+ if (found && (l_a->next != l_b && l_a->prev != l_b)) {
+ BMFace *f_tmp;
+ f_tmp = BM_face_split(bm, face_split_arr[j], l_a->v, l_b->v, NULL, NULL, true);
+ if (f_tmp) {
+ if (f_tmp != face_split_arr[j]) {
+ STACK_PUSH(face_split_arr, f_tmp);
+ BLI_assert(STACK_SIZE(face_split_arr) <= STACK_SIZE(vert_split_arr));
+ }
+ }
+ }
+ }
+ else {
+ // printf("no intersect\n");
+ }
+ }
+ }
+ }
+
+finally:
+ STACK_FREE(vert_split_arr);
+
+}
+
+/* -------------------------------------------------------------------- */
+/* Main logic */
+
+/**
+ * \param use_tag Only bisect tagged edges and faces.
+ * \param use_snap Snap verts onto the plane.
+ * \param oflag_center Operator flag, enabled for geometry on the axis (existing and created)
+ */
+void BM_mesh_bisect_plane(BMesh *bm, float plane[4],
+ const bool use_snap_center, const bool use_tag,
+ const short oflag_center, const float eps)
+{
+ unsigned int einput_len;
+ unsigned int i;
+ BMEdge **edges_arr = MEM_mallocN(sizeof(*edges_arr) * (size_t)bm->totedge, __func__);
+
+ BLI_LINKSTACK_DECLARE(face_stack, BMFace *);
+
+ BMVert *v;
+ BMFace *f;
+
+ BMIter iter;
+
+ BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) {
+ vert_is_center_disable(v);
+
+ BM_VERT_DIR(v) = plane_point_test_v3(plane, v->co, eps, &(BM_VERT_DIST(v)));
+ if (BM_VERT_DIR(v) == 0) {
+ if (oflag_center) {
+ BMO_elem_flag_enable(bm, v, oflag_center);
+ }
+ if (use_snap_center) {
+ closest_to_plane_v3(v->co, plane, v->co);
+ }
+ }
+ }
+
+ if (use_tag) {
+ /* build tagged edge array */
+ BMEdge *e;
+ einput_len = 0;
+ /* keep face tags as is */
+ BM_ITER_MESH_INDEX (e, &iter, bm, BM_EDGES_OF_MESH, i) {
+ if (edge_is_cut_test(e)) {
+ edges_arr[einput_len++] = e;
+ }
+ }
+
+ }
+ else {
+ BMEdge *e;
+ einput_len = (unsigned int)bm->totedge;
+ BM_ITER_MESH_INDEX (e, &iter, bm, BM_EDGES_OF_MESH, i) {
+ edge_is_cut_enable(e);
+ edges_arr[i] = e;
+ }
+
+ BM_ITER_MESH (f, &iter, bm, BM_FACES_OF_MESH) {
+ face_in_stack_disable(f);
+ }
+ }
+
+ /* store a stack of faces to be evaluated for splitting */
+ BLI_LINKSTACK_INIT(face_stack);
+
+ for (i = 0; i < einput_len; i++) {
+ /* we could check edge_is_cut_test(e) but there is no point */
+ BMEdge *e = edges_arr[i];
+ const int side[2] = {BM_VERT_DIR(e->v1), BM_VERT_DIR(e->v2)};
+ const float dist[2] = {BM_VERT_DIST(e->v1), BM_VERT_DIST(e->v2)};
+
+ if (side[0] && side[1] && (side[0] != side[1])) {
+ const float e_fac = fabsf(dist[0]) / fabsf(dist[0] - dist[1]);
+ BMVert *v_new;
+
+ if (e->l) {
+ BMLoop *l_iter, *l_first;
+ l_iter = l_first = e->l;
+ do {
+ if (!face_in_stack_test(l_iter->f)) {
+ face_in_stack_enable(l_iter->f);
+ BLI_LINKSTACK_PUSH(face_stack, l_iter->f);
+ }
+ } while ((l_iter = l_iter->radial_next) != l_first);
+ }
+
+ v_new = BM_edge_split(bm, e, e->v1, NULL, e_fac);
+ vert_is_center_enable(v_new);
+ if (oflag_center) {
+ BMO_elem_flag_enable(bm, v_new, oflag_center);
+ }
+
+ BM_VERT_DIR(v_new) = 0;
+ BM_VERT_DIST(v_new) = 0.0f;
+ }
+ else if (side[0] == 0 || side[1] == 0) {
+ /* check if either edge verts are aligned,
+ * if so - tag and push all faces that use it into the stack */
+ unsigned int j;
+ BM_ITER_ELEM_INDEX (v, &iter, e, BM_VERTS_OF_EDGE, j) {
+ if (side[j] == 0) {
+ if (vert_is_center_test(v) == 0) {
+ BMIter itersub;
+ BMLoop *l_iter;
+
+ vert_is_center_enable(v);
+
+ BM_ITER_ELEM (l_iter, &itersub, v, BM_LOOPS_OF_VERT) {
+ if (!face_in_stack_test(l_iter->f)) {
+ face_in_stack_enable(l_iter->f);
+ BLI_LINKSTACK_PUSH(face_stack, l_iter->f);
+ }
+ }
+
+ }
+ }
+ }
+
+ /* if both verts are on the center - tag it */
+ if (oflag_center) {
+ if (side[0] == 0 && side[1] == 0) {
+ BMO_elem_flag_enable(bm, e, oflag_center);
+ }
+ }
+ }
+ }
+
+ MEM_freeN(edges_arr);
+
+ while ((f = BLI_LINKSTACK_POP(face_stack))) {
+ bm_face_bisect_verts(bm, f, plane, oflag_center);
+ }
+
+ /* now we have all faces to split in the stack */
+ BLI_LINKSTACK_FREE(face_stack);
+}
diff --git a/source/blender/compositor/operations/COM_RenderLayersCyclesOperation.h b/source/blender/bmesh/tools/bmesh_bisect_plane.h
index baa53c7388b..15f902642c8 100644
--- a/source/blender/compositor/operations/COM_RenderLayersCyclesOperation.h
+++ b/source/blender/bmesh/tools/bmesh_bisect_plane.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2011, Blender Foundation.
+ * ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -15,19 +15,20 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Contributor(s): Campbell Barton
+ *
+ * ***** END GPL LICENSE BLOCK *****
*/
-#ifndef _COM_RenderLayersCyclesOperation_h
-#define _COM_RenderLayersCyclesOperation_h
+#ifndef __BMESH_BISECT_PLANE_H__
+#define __BMESH_BISECT_PLANE_H__
-#include "COM_RenderLayersBaseProg.h"
+/** \file blender/bmesh/tools/bmesh_bisect_plane.h
+ * \ingroup bmesh
+ */
-class RenderLayersCyclesOperation : public RenderLayersBaseProg {
-public:
- RenderLayersCyclesOperation(int pass);
-};
+void BM_mesh_bisect_plane(BMesh *bm, float plane[4],
+ const bool use_snap_center, const bool use_tag,
+ const short oflag_center, const float eps);
-#endif
+#endif /* __BMESH_BISECT_PLANE_H__ */
diff --git a/source/blender/bmesh/tools/bmesh_decimate_collapse.c b/source/blender/bmesh/tools/bmesh_decimate_collapse.c
index 4b6835a81fe..99d46559ca5 100644
--- a/source/blender/bmesh/tools/bmesh_decimate_collapse.c
+++ b/source/blender/bmesh/tools/bmesh_decimate_collapse.c
@@ -390,10 +390,10 @@ static void bm_decim_triangulate_end(BMesh *bm)
{
/* decimation finished, now re-join */
BMIter iter;
- BMEdge *e;
+ BMEdge *e, *e_next;
/* boundary edges */
- BM_ITER_MESH (e, &iter, bm, BM_EDGES_OF_MESH) {
+ BM_ITER_MESH_MUTABLE (e, e_next, &iter, bm, BM_EDGES_OF_MESH) {
BMLoop *l_a, *l_b;
if (BM_edge_loop_pair(e, &l_a, &l_b)) {
const int l_a_index = BM_elem_index_get(l_a);
diff --git a/source/blender/bmesh/tools/bmesh_decimate_dissolve.c b/source/blender/bmesh/tools/bmesh_decimate_dissolve.c
index 310357453a3..96af37f4400 100644
--- a/source/blender/bmesh/tools/bmesh_decimate_dissolve.c
+++ b/source/blender/bmesh/tools/bmesh_decimate_dissolve.c
@@ -293,7 +293,7 @@ void BM_mesh_decimate_dissolve_ex(BMesh *bm, const float angle_limit, const bool
}
/* re-calculate costs */
- BM_ITER_ELEM(v_iter, &iter, e_new, BM_VERTS_OF_EDGE) {
+ BM_ITER_ELEM (v_iter, &iter, e_new, BM_VERTS_OF_EDGE) {
const int j = BM_elem_index_get(v_iter);
if (j != -1 && vheap_table[j]) {
const float cost = bm_vert_edge_face_angle(v_iter);
diff --git a/source/blender/bmesh/tools/bmesh_decimate_unsubdivide.c b/source/blender/bmesh/tools/bmesh_decimate_unsubdivide.c
index 0667d560615..868caa49ec7 100644
--- a/source/blender/bmesh/tools/bmesh_decimate_unsubdivide.c
+++ b/source/blender/bmesh/tools/bmesh_decimate_unsubdivide.c
@@ -32,8 +32,7 @@
#include "BLI_math.h"
#include "bmesh.h"
-
-#include "intern/bmesh_operators_private.h" /* own include */
+#include "bmesh_decimate.h" /* own include */
static bool bm_vert_dissolve_fan_test(BMVert *v)
@@ -198,7 +197,7 @@ void BM_mesh_decimate_unsubdivide_ex(BMesh *bm, const int iterations, const bool
}
for (iter_step = 0; iter_step < iterations; iter_step++) {
- BMVert *v;
+ BMVert *v, *v_next;
bool iter_done;
BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) {
@@ -319,7 +318,7 @@ void BM_mesh_decimate_unsubdivide_ex(BMesh *bm, const int iterations, const bool
/* now we tagged all verts -1 for removal, lets loop over and rebuild faces */
iter_done = false;
- BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) {
+ BM_ITER_MESH_MUTABLE (v, v_next, &iter, bm, BM_VERTS_OF_MESH) {
if (BM_elem_index_get(v) == VERT_INDEX_DO_COLLAPSE) {
if (bm_vert_dissolve_fan(bm, v)) {
iter_done = true;
diff --git a/source/blender/bmesh/tools/bmesh_edgenet.c b/source/blender/bmesh/tools/bmesh_edgenet.c
new file mode 100644
index 00000000000..14d474fed61
--- /dev/null
+++ b/source/blender/bmesh/tools/bmesh_edgenet.c
@@ -0,0 +1,508 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor(s): Campbell Barton
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/bmesh/tools/bmesh_edgenet.c
+ * \ingroup bmesh
+ *
+ * Edgenet Fill.
+ *
+ */
+
+#include <limits.h>
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_utildefines.h"
+#include "BLI_alloca.h"
+#include "BLI_mempool.h"
+#include "BLI_linklist.h"
+
+#include "bmesh.h"
+#include "bmesh_edgenet.h" /* own include */
+
+#include "BLI_strict_flags.h" /* keep last */
+
+
+/* Data for one end of an edge involved in a bevel */
+typedef struct VertNetInfo {
+ BMVert *prev; /* previous vertex */
+ int pass; /* path scanning pass value, for internal calculation */
+ int face; /* face index connected to the edge between this and the previous vert */
+ int flag; /* flag */
+} VertNetInfo;
+
+enum {
+ VNINFO_FLAG_IS_MIXFACE = (1 << 0),
+};
+
+/**
+ * Check if this edge can be used in a path.
+ */
+static bool bm_edge_step_ok(BMEdge *e)
+{
+ return BM_elem_flag_test(e, BM_ELEM_TAG) && ((e->l == NULL) || (e->l->radial_next == e->l));
+}
+
+static int bm_edge_face(BMEdge *e)
+{
+ return e->l ? BM_elem_index_get(e->l->f) : -1;
+}
+
+/**
+ * Get the next available edge we can use to attempt tp calculate a path from.
+ */
+static BMEdge *bm_edgenet_edge_get_next(
+ BMesh *bm,
+ LinkNode **edge_queue, BLI_mempool *edge_queue_pool)
+{
+ BMEdge *e;
+ BMIter iter;
+
+ while (*edge_queue) {
+ e = BLI_linklist_pop_pool(edge_queue, edge_queue_pool);
+ if (bm_edge_step_ok(e)) {
+ return e;
+ }
+ }
+
+ BM_ITER_MESH (e, &iter, bm, BM_EDGES_OF_MESH) {
+ if (bm_edge_step_ok(e)) {
+ return e;
+ }
+ }
+
+ return NULL;
+}
+
+
+/**
+ * Edge loops are built up using links to the 'prev' member.
+ * with each side of the loop having its own pass (negated from the other).
+ *
+ * This function returns half a loop, the caller needs to run twice to get both sides.
+ */
+static unsigned int bm_edgenet_path_from_pass(
+ BMVert *v, LinkNode **v_ls,
+ VertNetInfo *vnet_info, BLI_mempool *path_pool)
+{
+ VertNetInfo *vn = &vnet_info[BM_elem_index_get(v)];
+ const int pass = vn->pass;
+ unsigned int v_ls_tot = 0;
+
+ do {
+ BLI_linklist_prepend_pool(v_ls, v, path_pool);
+ v_ls_tot += 1;
+ v = vn->prev;
+ vn = &vnet_info[BM_elem_index_get(v)];
+ } while (vn->pass == pass);
+
+ return v_ls_tot;
+}
+
+/**
+ * Specialized wrapper for #BM_face_exists_overlap_subset
+ * that gets the verts from a path before we allocate it in the correct order.
+ */
+static bool bm_edgenet_path_check_overlap(
+ BMVert *v1, BMVert *v2,
+ VertNetInfo *vnet_info)
+{
+ /* vert order doesn't matter */
+ unsigned int v_ls_tot = 0;
+ LinkNode *v_ls = NULL;
+ BMVert *v_pair[2] = {v1, v2};
+ unsigned int i;
+
+ for (i = 0; i < 2; i++) {
+ BMVert *v = v_pair[i];
+ VertNetInfo *vn = &vnet_info[BM_elem_index_get(v)];
+ const int pass = vn->pass;
+ do {
+ BLI_linklist_prepend_alloca(&v_ls, v);
+ v_ls_tot += 1;
+ v = vn->prev;
+ vn = &vnet_info[BM_elem_index_get(v)];
+ } while (vn->pass == pass);
+ }
+
+ if (v_ls_tot) {
+ BMVert **vert_arr = BLI_array_alloca(vert_arr, v_ls_tot);
+ LinkNode *v_lnk;
+ for (i = 0, v_lnk = v_ls; i < v_ls_tot; v_lnk = v_lnk->next, i++) {
+ vert_arr[i] = v_lnk->link;
+ }
+
+ return BM_face_exists_overlap_subset(vert_arr, (int)v_ls_tot);
+ }
+ else {
+ return false;
+ }
+}
+
+/**
+ * Create a face from the path.
+ */
+static BMFace *bm_edgenet_face_from_path(
+ BMesh *bm, LinkNode *path, const unsigned int path_len)
+{
+ BMFace *f;
+ LinkNode *v_lnk;
+ unsigned int i;
+ unsigned int i_prev;
+
+ BMVert **vert_arr = BLI_array_alloca(vert_arr, path_len);
+ BMEdge **edge_arr = BLI_array_alloca(edge_arr, path_len);
+
+ for (v_lnk = path, i = 0; v_lnk; v_lnk = v_lnk->next, i++) {
+ vert_arr[i] = v_lnk->link;
+ }
+
+ i_prev = path_len - 1;
+ for (i = 0; i < path_len; i++) {
+ edge_arr[i_prev] = BM_edge_exists(vert_arr[i], vert_arr[i_prev]);
+ i_prev = i;
+ }
+
+ /* no need for this, we do overlap checks before allowing the path to be used */
+#if 0
+ if (BM_face_exists_multi(vert_arr, edge_arr, path_len)) {
+ return NULL;
+ }
+#endif
+
+ f = BM_face_create(bm, vert_arr, edge_arr, (int)path_len, NULL, BM_CREATE_NOP);
+
+ return f;
+}
+
+/**
+ * Step along the path from \a v_curr to any vert not already in the path.
+ *
+ * \return The connecting edge if the path is found, otherwise NULL.
+ */
+static BMEdge *bm_edgenet_path_step(
+ BMVert *v_curr, LinkNode **v_ls,
+ VertNetInfo *vnet_info, BLI_mempool *path_pool)
+{
+ const VertNetInfo *vn_curr = &vnet_info[BM_elem_index_get(v_curr)];
+
+ BMEdge *e;
+ BMIter iter;
+ unsigned int tot = 0;
+ unsigned int v_ls_tot = 0;
+
+ BM_ITER_ELEM (e, &iter, v_curr, BM_EDGES_OF_VERT) {
+ BMVert *v_next = BM_edge_other_vert(e, v_curr);
+ if (v_next != vn_curr->prev) {
+ if (bm_edge_step_ok(e)) {
+ VertNetInfo *vn_next = &vnet_info[BM_elem_index_get(v_next)];
+
+ /* check we're not looping back on ourselves */
+ if (vn_curr->pass != vn_next->pass) {
+
+ if (vn_curr->pass == -vn_next->pass) {
+ if ((vn_curr->flag & VNINFO_FLAG_IS_MIXFACE) ||
+ (vn_next->flag & VNINFO_FLAG_IS_MIXFACE))
+ {
+ /* found connecting edge */
+ if (bm_edgenet_path_check_overlap(v_curr, v_next, vnet_info) == false) {
+ return e;
+ }
+ }
+ }
+ else {
+ vn_next->face = bm_edge_face(e);
+ vn_next->pass = vn_curr->pass;
+ vn_next->prev = v_curr;
+
+ /* flush flag down the path */
+ vn_next->flag &= ~VNINFO_FLAG_IS_MIXFACE;
+ if ((vn_curr->flag & VNINFO_FLAG_IS_MIXFACE) ||
+ (vn_next->face == -1) ||
+ (vn_next->face != vn_curr->face))
+ {
+ vn_next->flag |= VNINFO_FLAG_IS_MIXFACE;
+ }
+
+ /* add to the list! */
+ BLI_linklist_prepend_pool(v_ls, v_next, path_pool);
+ v_ls_tot += 1;
+ }
+ }
+ }
+ tot += 1;
+ }
+ }
+
+ /* trick to walk along wire-edge paths */
+ if (v_ls_tot == 1 && tot == 1) {
+ v_curr = BLI_linklist_pop_pool(v_ls, path_pool);
+ bm_edgenet_path_step(v_curr, v_ls, vnet_info, path_pool);
+ }
+
+ return NULL;
+}
+
+/**
+ * Given an edge, find the first path that can form a face.
+ *
+ * \return A linked list of verts.
+ */
+static LinkNode *bm_edgenet_path_calc(
+ BMEdge *e, const int pass_nr, const unsigned int path_cost_max,
+ unsigned int *r_path_len, unsigned int *r_path_cost,
+ VertNetInfo *vnet_info, BLI_mempool *path_pool)
+{
+ VertNetInfo *vn_1, *vn_2;
+ const int f_index = bm_edge_face(e);
+ bool found;
+
+ LinkNode *v_ls_prev = NULL;
+ LinkNode *v_ls_next = NULL;
+
+ unsigned int path_cost_accum = 0;
+
+ BLI_assert(bm_edge_step_ok(e));
+
+ *r_path_len = 0;
+ *r_path_cost = 0;
+
+ vn_1 = &vnet_info[BM_elem_index_get(e->v1)];
+ vn_2 = &vnet_info[BM_elem_index_get(e->v2)];
+
+ vn_1->pass = pass_nr;
+ vn_2->pass = -pass_nr;
+
+ vn_1->prev = e->v2;
+ vn_2->prev = e->v1;
+
+ vn_1->face =
+ vn_2->face = f_index;
+
+ vn_1->flag =
+ vn_2->flag = (f_index == -1) ? VNINFO_FLAG_IS_MIXFACE : 0;
+
+ /* prime the searchlist */
+ BLI_linklist_prepend_pool(&v_ls_prev, e->v1, path_pool);
+ BLI_linklist_prepend_pool(&v_ls_prev, e->v2, path_pool);
+
+ do {
+ found = false;
+
+ /* no point to continue, we're over budget */
+ if (path_cost_accum >= path_cost_max) {
+ BLI_linklist_free_pool(v_ls_next, NULL, path_pool);
+ BLI_linklist_free_pool(v_ls_prev, NULL, path_pool);
+ return NULL;
+ }
+
+ while (v_ls_prev) {
+ const LinkNode *v_ls_next_old = v_ls_next;
+ BMVert *v = BLI_linklist_pop_pool(&v_ls_prev, path_pool);
+ BMEdge *e_found = bm_edgenet_path_step(v, &v_ls_next, vnet_info, path_pool);
+
+ if (e_found) {
+ LinkNode *path = NULL;
+ unsigned int path_len;
+ BLI_linklist_free_pool(v_ls_next, NULL, path_pool);
+ BLI_linklist_free_pool(v_ls_prev, NULL, path_pool);
+
+ // BLI_assert(BLI_mempool_count(path_pool) == 0);
+
+ path_len = bm_edgenet_path_from_pass(e_found->v1, &path, vnet_info, path_pool);
+ BLI_linklist_reverse(&path);
+ path_len += bm_edgenet_path_from_pass(e_found->v2, &path, vnet_info, path_pool);
+ *r_path_len = path_len;
+ *r_path_cost = path_cost_accum;
+ return path;
+ }
+ else {
+ /* check if a change was made */
+ if (v_ls_next_old != v_ls_next) {
+ found = true;
+ }
+ }
+
+ }
+ BLI_assert(v_ls_prev == NULL);
+
+ path_cost_accum++;
+
+ /* swap */
+ v_ls_prev = v_ls_next;
+ v_ls_next = NULL;
+
+ } while (found);
+
+ BLI_assert(v_ls_prev == NULL);
+ BLI_assert(v_ls_next == NULL);
+
+ /* tag not to search again */
+ BM_elem_flag_disable(e, BM_ELEM_TAG);
+
+ return NULL;
+}
+
+/**
+ * Wrapper for #bm_edgenet_path_calc which ensures all included edges
+ * _don't_ have a better option.
+ */
+static LinkNode *bm_edgenet_path_calc_best(
+ BMEdge *e, int *pass_nr, unsigned int path_cost_max,
+ unsigned int *r_path_len, unsigned int *r_path_cost,
+ VertNetInfo *vnet_info, BLI_mempool *path_pool)
+{
+ LinkNode *path;
+ unsigned int path_cost;
+
+ path = bm_edgenet_path_calc(e, *pass_nr, path_cost_max,
+ r_path_len, &path_cost,
+ vnet_info, path_pool);
+ (*pass_nr)++;
+
+ if (path == NULL) {
+ return NULL;
+ }
+ else if (path_cost <= 1) {
+ /* any face that takes 1-2 iterations to find we consider valid */
+ return path;
+ }
+ else {
+ /* Check every edge to see if any can give a better path.
+ * This avoids very strange/long paths from being created. */
+
+ const unsigned int path_len = *r_path_len;
+ unsigned int i, i_prev;
+ BMVert **vert_arr = BLI_array_alloca(vert_arr, path_len);
+ LinkNode *v_lnk;
+
+ for (v_lnk = path, i = 0; v_lnk; v_lnk = v_lnk->next, i++) {
+ vert_arr[i] = v_lnk->link;
+ }
+
+ i_prev = path_len - 1;
+ for (i = 0; i < path_len; i++) {
+ BMEdge *e_other = BM_edge_exists(vert_arr[i], vert_arr[i_prev]);
+ if (e_other != e) {
+ LinkNode *path_test;
+ unsigned int path_len_test;
+ unsigned int path_cost_test;
+
+ path_test = bm_edgenet_path_calc(e_other, *pass_nr, path_cost,
+ &path_len_test, &path_cost_test,
+ vnet_info, path_pool);
+ (*pass_nr)++;
+
+ if (path_test) {
+ BLI_assert(path_cost_test < path_cost);
+
+ BLI_linklist_free_pool(path, NULL, path_pool);
+ path = path_test;
+ *r_path_len = path_len_test;
+ *r_path_cost = path_cost_test;
+ path_cost = path_cost_test;
+ }
+ }
+
+ i_prev = i;
+ }
+ }
+ return path;
+}
+
+/**
+ * Fill in faces from an edgenet made up of boundary and wire edges.
+ *
+ * \note New faces currently don't have their normals calculated and are flipped randomly.
+ * The caller needs to flip faces correctly.
+ *
+ * \param bm The mesh to operate on.
+ * \param use_edge_tag Only fill tagged edges.
+ * \param face_oflag if nonzero, apply all new faces with this bmo flag.
+ */
+void BM_mesh_edgenet(BMesh *bm,
+ const bool use_edge_tag, const bool use_new_face_tag)
+{
+ VertNetInfo *vnet_info = MEM_callocN(sizeof(*vnet_info) * (size_t)bm->totvert, __func__);
+ BLI_mempool *edge_queue_pool = BLI_mempool_create(sizeof(LinkNode), 1, 512, 0);
+ BLI_mempool *path_pool = BLI_mempool_create(sizeof(LinkNode), 1, 512, 0);
+ LinkNode *edge_queue = NULL;
+
+ BMEdge *e;
+ BMIter iter;
+
+ int pass_nr = 1;
+
+ if (use_edge_tag == false) {
+ BM_ITER_MESH (e, &iter, bm, BM_EDGES_OF_MESH) {
+ BM_elem_flag_enable(e, BM_ELEM_TAG);
+ BM_elem_flag_set(e, BM_ELEM_TAG, bm_edge_step_ok(e));
+ }
+ }
+
+ BM_mesh_elem_index_ensure(bm, BM_VERT | BM_FACE);
+
+ while (true) {
+ LinkNode *path = NULL;
+ unsigned int path_len;
+ unsigned int path_cost;
+
+ e = bm_edgenet_edge_get_next(bm, &edge_queue, edge_queue_pool);
+ if (e == NULL) {
+ break;
+ }
+
+ BLI_assert(bm_edge_step_ok(e) == true);
+
+ path = bm_edgenet_path_calc_best(e, &pass_nr, UINT_MAX,
+ &path_len, &path_cost,
+ vnet_info, path_pool);
+
+ if (path) {
+ BMFace *f = bm_edgenet_face_from_path(bm, path, path_len);
+ /* queue edges to operate on */
+ BMLoop *l_first, *l_iter;
+ l_iter = l_first = BM_FACE_FIRST_LOOP(f);
+ do {
+ if (bm_edge_step_ok(l_iter->e)) {
+ BLI_linklist_prepend_pool(&edge_queue, l_iter->e, edge_queue_pool);
+ }
+ } while ((l_iter = l_iter->next) != l_first);
+
+ if (use_new_face_tag) {
+ BM_elem_flag_enable(f, BM_ELEM_TAG);
+ }
+
+ /* the face index only needs to be unique, not kept valid */
+ BM_elem_index_set(f, bm->totface - 1); /* set_dirty */
+ }
+
+ BLI_linklist_free_pool(path, NULL, path_pool);
+ BLI_assert(BLI_mempool_count(path_pool) == 0);
+ }
+
+ bm->elem_index_dirty |= BM_FACE;
+
+ BLI_mempool_destroy(edge_queue_pool);
+ BLI_mempool_destroy(path_pool);
+ MEM_freeN(vnet_info);
+}
diff --git a/source/blender/compositor/operations/COM_RenderLayersDepthProg.h b/source/blender/bmesh/tools/bmesh_edgenet.h
index fdbe25c818e..327a7f5aa23 100644
--- a/source/blender/compositor/operations/COM_RenderLayersDepthProg.h
+++ b/source/blender/bmesh/tools/bmesh_edgenet.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2011, Blender Foundation.
+ * ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -15,20 +15,19 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Contributor(s): Campbell Barton
+ *
+ * ***** END GPL LICENSE BLOCK *****
*/
-#ifndef _COM_RenderLayersDepthProg_h
-#define _COM_RenderLayersDepthProg_h
-
-#include "COM_RenderLayersBaseProg.h"
+#ifndef __BMESH_EDGENET_H__
+#define __BMESH_EDGENET_H__
-class RenderLayersDepthProg : public RenderLayersBaseProg {
-public:
- RenderLayersDepthProg();
+/** \file blender/bmesh/tools/bmesh_edgenet.h
+ * \ingroup bmesh
+ */
-};
+void BM_mesh_edgenet(BMesh *bm,
+ const bool use_edge_tag, const bool use_new_face_tag);
-#endif
+#endif /* __BMESH_EDGENET_H__ */
diff --git a/source/blender/bmesh/tools/bmesh_edgesplit.c b/source/blender/bmesh/tools/bmesh_edgesplit.c
index aad600d13fa..412253aafe9 100644
--- a/source/blender/bmesh/tools/bmesh_edgesplit.c
+++ b/source/blender/bmesh/tools/bmesh_edgesplit.c
@@ -193,11 +193,13 @@ void BM_mesh_edgesplit(BMesh *bm, const bool use_verts, const bool tag_only, con
bmesh_vert_separate(bm, v, &vtar, &vtar_len, copy_select);
- if (vtar_len) {
+ /* first value is always in 'v' */
+ if (vtar_len > 1) {
BMEditSelection *ese = BLI_ghash_lookup(ese_gh, v);
+ BLI_assert(v == vtar[0]);
if (UNLIKELY(ese)) {
int j;
- for (j = 0; j < vtar_len; j++) {
+ for (j = 1; j < vtar_len; j++) {
BLI_assert(v != vtar[j]);
BM_select_history_store_after_notest(bm, ese, vtar[j]);
}
diff --git a/source/blender/bmesh/tools/bmesh_triangulate.c b/source/blender/bmesh/tools/bmesh_triangulate.c
index 2eacf62d68a..34ff493a026 100644
--- a/source/blender/bmesh/tools/bmesh_triangulate.c
+++ b/source/blender/bmesh/tools/bmesh_triangulate.c
@@ -31,6 +31,9 @@
#include "BLI_utildefines.h"
#include "BLI_alloca.h"
+#include "BLI_memarena.h"
+#include "BLI_listbase.h"
+#include "BLI_scanfill.h"
#include "bmesh.h"
@@ -39,14 +42,14 @@
/**
* a version of #BM_face_triangulate that maps to #BMOpSlot
*/
-static void bm_face_triangulate_mapping(BMesh *bm, BMFace *face, const bool use_beauty, const bool use_tag,
+static void bm_face_triangulate_mapping(BMesh *bm, BMFace *face, MemArena *sf_arena, const bool use_beauty, const bool use_tag,
BMOperator *op, BMOpSlot *slot_facemap_out)
{
const int faces_array_tot = face->len - 3;
BMFace **faces_array = BLI_array_alloca(faces_array, faces_array_tot);
BLI_assert(face->len > 3);
- BM_face_triangulate(bm, face, faces_array, use_beauty, use_tag);
+ BM_face_triangulate(bm, face, faces_array, sf_arena, use_beauty, use_tag);
if (faces_array) {
int i;
@@ -63,13 +66,16 @@ void BM_mesh_triangulate(BMesh *bm, const bool use_beauty, const bool tag_only,
{
BMIter iter;
BMFace *face;
+ MemArena *sf_arena;
+
+ sf_arena = BLI_memarena_new(BLI_SCANFILL_ARENA_SIZE, __func__);
if (slot_facemap_out) {
/* same as below but call: bm_face_triangulate_mapping() */
BM_ITER_MESH (face, &iter, bm, BM_FACES_OF_MESH) {
if (face->len > 3) {
if (tag_only == false || BM_elem_flag_test(face, BM_ELEM_TAG)) {
- bm_face_triangulate_mapping(bm, face, use_beauty, tag_only,
+ bm_face_triangulate_mapping(bm, face, sf_arena, use_beauty, tag_only,
op, slot_facemap_out);
}
}
@@ -79,9 +85,11 @@ void BM_mesh_triangulate(BMesh *bm, const bool use_beauty, const bool tag_only,
BM_ITER_MESH (face, &iter, bm, BM_FACES_OF_MESH) {
if (face->len > 3) {
if (tag_only == false || BM_elem_flag_test(face, BM_ELEM_TAG)) {
- BM_face_triangulate(bm, face, NULL, use_beauty, tag_only);
+ BM_face_triangulate(bm, face, NULL, sf_arena, use_beauty, tag_only);
}
}
}
}
+
+ BLI_memarena_free(sf_arena);
}
diff --git a/source/blender/bmesh/tools/bmesh_triangulate.h b/source/blender/bmesh/tools/bmesh_triangulate.h
index 936a90d3a16..141aa2f82b4 100644
--- a/source/blender/bmesh/tools/bmesh_triangulate.h
+++ b/source/blender/bmesh/tools/bmesh_triangulate.h
@@ -27,10 +27,10 @@
*
*/
-#ifndef __BMESH_TRIAMGULATE_H__
-#define __BMESH_TRIAMGULATE_H__
+#ifndef __BMESH_TRIANGULATE_H__
+#define __BMESH_TRIANGULATE_H__
void BM_mesh_triangulate(BMesh *bm, const bool use_beauty, const bool tag_only,
BMOperator *op, BMOpSlot *slot_facemap_out);
-#endif /* __BMESH_TRIAMGULATE_H__ */
+#endif /* __BMESH_TRIANGULATE_H__ */
diff --git a/source/blender/collada/AnimationExporter.cpp b/source/blender/collada/AnimationExporter.cpp
index bcbcdd42752..c1b6dc83139 100644
--- a/source/blender/collada/AnimationExporter.cpp
+++ b/source/blender/collada/AnimationExporter.cpp
@@ -963,10 +963,10 @@ std::string AnimationExporter::create_4x4_source(std::vector<float> &frames, Obj
else
copy_m4_m4(mat, pchan->pose_mat);
- // SECOND_LIFE_COMPATIBILITY
+ // OPEN_SIM_COMPATIBILITY
// AFAIK animation to second life is via BVH, but no
// reason to not have the collada-animation be correct
- if (export_settings->second_life) {
+ if (export_settings->open_sim) {
float temp[4][4];
copy_m4_m4(temp, bone->arm_mat);
temp[3][0] = temp[3][1] = temp[3][2] = 0.0f;
diff --git a/source/blender/collada/ArmatureExporter.cpp b/source/blender/collada/ArmatureExporter.cpp
index 438421ccd14..174331c4644 100644
--- a/source/blender/collada/ArmatureExporter.cpp
+++ b/source/blender/collada/ArmatureExporter.cpp
@@ -193,11 +193,11 @@ void ArmatureExporter::add_bone_node(Bone *bone, Object *ob_arm, Scene *sce,
// and not it's head, seems arbitrary.
(*i)->parentinv[3][1] += bone->length;
- // SECOND_LIFE_COMPATIBILITY
+ // OPEN_SIM_COMPATIBILITY
// TODO: when such objects are animated as
// single matrix the tweak must be applied
// to the result.
- if (export_settings->second_life) {
+ if (export_settings->open_sim) {
// tweak objects parentinverse to match compatibility
float temp[4][4];
@@ -272,8 +272,8 @@ void ArmatureExporter::add_bone_transform(Object *ob_arm, Bone *bone, COLLADASW:
copy_m4_m4(mat, bone->arm_mat);
}
- // SECOND_LIFE_COMPATIBILITY
- if (export_settings->second_life) {
+ // OPEN_SIM_COMPATIBILITY
+ if (export_settings->open_sim) {
// Remove rotations vs armature from transform
// parent_rest_rot * mat * irest_rot
float temp[4][4];
diff --git a/source/blender/collada/CameraExporter.cpp b/source/blender/collada/CameraExporter.cpp
index fc56ff8c63c..649288c2db4 100644
--- a/source/blender/collada/CameraExporter.cpp
+++ b/source/blender/collada/CameraExporter.cpp
@@ -63,7 +63,6 @@ void CamerasExporter::exportCameras(Scene *sce)
}
void CamerasExporter::operator()(Object *ob, Scene *sce)
{
- // TODO: shiftx, shifty, YF_dofdist
Camera *cam = (Camera *)ob->data;
std::string cam_id(get_camera_id(ob));
std::string cam_name(id_name(cam));
@@ -78,7 +77,9 @@ void CamerasExporter::operator()(Object *ob, Scene *sce)
persp.setZFar(cam->clipend, false, "zfar");
persp.setZNear(cam->clipsta, false, "znear");
COLLADASW::Camera ccam(mSW, &persp, cam_id, cam_name);
+ exportBlenderProfile(ccam, cam);
addCamera(ccam);
+
break;
}
case CAM_ORTHO:
@@ -90,8 +91,17 @@ void CamerasExporter::operator()(Object *ob, Scene *sce)
ortho.setZFar(cam->clipend, false, "zfar");
ortho.setZNear(cam->clipsta, false, "znear");
COLLADASW::Camera ccam(mSW, &ortho, cam_id, cam_name);
+ exportBlenderProfile(ccam, cam);
addCamera(ccam);
break;
}
}
}
+bool CamerasExporter::exportBlenderProfile(COLLADASW::Camera &cm,Camera *cam)
+{
+ cm.addExtraTechniqueParameter("blender","shiftx",cam->shiftx);
+ cm.addExtraTechniqueParameter("blender","shifty",cam->shifty);
+ cm.addExtraTechniqueParameter("blender","YF_dofdist",cam->YF_dofdist);
+ return true;
+
+}
diff --git a/source/blender/collada/CameraExporter.h b/source/blender/collada/CameraExporter.h
index 5405df8ab9e..a0c2d5790c8 100644
--- a/source/blender/collada/CameraExporter.h
+++ b/source/blender/collada/CameraExporter.h
@@ -37,6 +37,7 @@ extern "C" {
}
#include "ExportSettings.h"
+#include "DNA_camera_types.h"
class CamerasExporter: COLLADASW::LibraryCameras
{
@@ -45,6 +46,7 @@ public:
void exportCameras(Scene *sce);
void operator()(Object *ob, Scene *sce);
private:
+ bool exportBlenderProfile(COLLADASW::Camera &cla,Camera *cam);
const ExportSettings *export_settings;
};
diff --git a/source/blender/collada/ControllerExporter.cpp b/source/blender/collada/ControllerExporter.cpp
index d04ed8d6fa1..948a3dc5ae1 100644
--- a/source/blender/collada/ControllerExporter.cpp
+++ b/source/blender/collada/ControllerExporter.cpp
@@ -507,8 +507,8 @@ std::string ControllerExporter::add_inv_bind_mats_source(Object *ob_arm, ListBas
float world[4][4];
float inv_bind_mat[4][4];
- // SECOND_LIFE_COMPATIBILITY
- if (export_settings->second_life) {
+ // OPEN_SIM_COMPATIBILITY
+ if (export_settings->open_sim) {
// Only translations, no rotation vs armature
float temp[4][4];
unit_m4(temp);
diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp
index c6337e27218..79c725166f6 100644
--- a/source/blender/collada/DocumentImporter.cpp
+++ b/source/blender/collada/DocumentImporter.cpp
@@ -933,6 +933,7 @@ bool DocumentImporter::writeCamera(const COLLADAFW::Camera *camera)
Camera *cam = NULL;
std::string cam_id, cam_name;
+ ExtraTags *et=getExtraTags(camera->getUniqueId());
cam_id = camera->getOriginalId();
cam_name = camera->getName();
if (cam_name.size()) cam = (Camera *)BKE_camera_add(G.main, (char *)cam_name.c_str());
@@ -942,6 +943,12 @@ bool DocumentImporter::writeCamera(const COLLADAFW::Camera *camera)
fprintf(stderr, "Cannot create camera.\n");
return true;
}
+
+ if (et && et->isProfile("blender")) {
+ et->setData("shiftx",&(cam->shiftx));
+ et->setData("shifty",&(cam->shifty));
+ et->setData("YF_dofdist",&(cam->YF_dofdist));
+ }
cam->clipsta = camera->getNearClippingPlane().getValue();
cam->clipend = camera->getFarClippingPlane().getValue();
diff --git a/source/blender/collada/ExportSettings.h b/source/blender/collada/ExportSettings.h
index f9eb4cbc26f..3dc7e74379e 100644
--- a/source/blender/collada/ExportSettings.h
+++ b/source/blender/collada/ExportSettings.h
@@ -50,7 +50,7 @@ public:
bool use_object_instantiation;
bool sort_by_name;
BC_export_transformation_type export_transformation_type;
- bool second_life;
+ bool open_sim;
char *filepath;
LinkNode *export_set;
diff --git a/source/blender/collada/MeshImporter.cpp b/source/blender/collada/MeshImporter.cpp
index 8aa68ed9d04..c7652bd7ae7 100644
--- a/source/blender/collada/MeshImporter.cpp
+++ b/source/blender/collada/MeshImporter.cpp
@@ -665,7 +665,12 @@ void MeshImporter::get_vector(float v[3], COLLADAFW::MeshVertexData& arr, int i,
v[0] = (*values)[i++];
v[1] = (*values)[i++];
- v[2] = (*values)[i];
+ if (stride>=3) {
+ v[2] = (*values)[i];
+ }
+ else {
+ v[2] = 0.0f;
+ }
}
break;
@@ -676,13 +681,19 @@ void MeshImporter::get_vector(float v[3], COLLADAFW::MeshVertexData& arr, int i,
v[0] = (float)(*values)[i++];
v[1] = (float)(*values)[i++];
- v[2] = (float)(*values)[i];
+ if (stride >= 3) {
+ v[2] = (float)(*values)[i];
+ }
+ else {
+ v[2] = 0.0f;
+ }
}
break;
default:
break;
}
}
+
bool MeshImporter::is_flat_face(unsigned int *nind, COLLADAFW::MeshVertexData& nor, int count)
{
float a[3], b[3];
@@ -857,7 +868,7 @@ std::vector<Object *> MeshImporter::get_all_users_of(Mesh *reference_mesh)
*
* During import all materials have been assigned to Object.
* Now we iterate over the imported objects and optimize
- * the assignements as follows:
+ * the assignments as follows:
*
* for each imported geometry:
* if number of users is 1:
diff --git a/source/blender/collada/collada.cpp b/source/blender/collada/collada.cpp
index 1eb5ac6ca4d..223ab3eca2a 100644
--- a/source/blender/collada/collada.cpp
+++ b/source/blender/collada/collada.cpp
@@ -79,20 +79,10 @@ int collada_export(Scene *sce,
int use_object_instantiation,
int sort_by_name,
BC_export_transformation_type export_transformation_type,
- int second_life)
+ int open_sim)
{
ExportSettings export_settings;
- /* annoying, collada crashes if file cant be created! [#27162] */
- if (!BLI_exists(filepath)) {
- BLI_make_existing_file(filepath); /* makes the dir if its not there */
- if (!BLI_file_touch(filepath)) {
- fprintf(stdout, "Collada export: Can not create: %s\n", filepath);
- return 0;
- }
- }
- /* end! */
-
export_settings.filepath = (char *)filepath;
export_settings.apply_modifiers = apply_modifiers != 0;
@@ -112,7 +102,7 @@ int collada_export(Scene *sce,
export_settings.use_object_instantiation = use_object_instantiation != 0;
export_settings.sort_by_name = sort_by_name != 0;
export_settings.export_transformation_type = export_transformation_type;
- export_settings.second_life = second_life != 0;
+ export_settings.open_sim = open_sim != 0;
int includeFilter = OB_REL_NONE;
diff --git a/source/blender/collada/collada.h b/source/blender/collada/collada.h
index b3a8156b6fe..e96bc2ea8a4 100644
--- a/source/blender/collada/collada.h
+++ b/source/blender/collada/collada.h
@@ -77,7 +77,7 @@ int collada_export(Scene *sce,
int use_object_instantiation,
int sort_by_name,
BC_export_transformation_type export_transformation_type,
- int second_life);
+ int open_sim);
diff --git a/source/blender/collada/collada_utils.cpp b/source/blender/collada/collada_utils.cpp
index 3e17472e9c2..146aff5ca5b 100644
--- a/source/blender/collada/collada_utils.cpp
+++ b/source/blender/collada/collada_utils.cpp
@@ -56,7 +56,9 @@ extern "C" {
#include "WM_api.h" // XXX hrm, see if we can do without this
#include "WM_types.h"
+
#include "bmesh.h"
+#include "bmesh_tools.h"
}
float bc_get_float_value(const COLLADAFW::FloatOrDoubleArray& array, unsigned int index)
diff --git a/source/blender/collada/version.conf b/source/blender/collada/version.conf
new file mode 100644
index 00000000000..d39af7a53df
--- /dev/null
+++ b/source/blender/collada/version.conf
@@ -0,0 +1 @@
+463ba8a2ef5a021ce21df614dde29e0ee800e10b
diff --git a/source/blender/compositor/CMakeLists.txt b/source/blender/compositor/CMakeLists.txt
index a119a89c842..11add975db5 100644
--- a/source/blender/compositor/CMakeLists.txt
+++ b/source/blender/compositor/CMakeLists.txt
@@ -30,7 +30,6 @@ set(INC
operations
../blenkernel
../blenlib
- ../blenlib
../imbuf
../makesdna
../makesrna
@@ -101,6 +100,8 @@ set(SRC
intern/COM_ChannelInfo.h
intern/COM_SingleThreadedNodeOperation.cpp
intern/COM_SingleThreadedNodeOperation.h
+ intern/COM_Debug.cpp
+ intern/COM_Debug.h
operations/COM_QualityStepHelper.h
operations/COM_QualityStepHelper.cpp
@@ -228,8 +229,6 @@ set(SRC
nodes/COM_SetAlphaNode.h
nodes/COM_ConvertAlphaNode.cpp
nodes/COM_ConvertAlphaNode.h
- nodes/COM_AlphaOverNode.cpp
- nodes/COM_AlphaOverNode.h
nodes/COM_HueSaturationValueNode.cpp
nodes/COM_HueSaturationValueNode.h
nodes/COM_HueSaturationValueCorrectNode.cpp
@@ -368,48 +367,8 @@ set(SRC
operations/COM_ColorSpillOperation.cpp
operations/COM_ColorSpillOperation.h
- operations/COM_RenderLayersBaseProg.cpp
- operations/COM_RenderLayersBaseProg.h
- operations/COM_RenderLayersImageProg.cpp
- operations/COM_RenderLayersImageProg.h
- operations/COM_RenderLayersAlphaProg.cpp
- operations/COM_RenderLayersAlphaProg.h
- operations/COM_RenderLayersDepthProg.cpp
- operations/COM_RenderLayersDepthProg.h
- operations/COM_RenderLayersNormalOperation.cpp
- operations/COM_RenderLayersNormalOperation.h
- operations/COM_RenderLayersSpeedOperation.cpp
- operations/COM_RenderLayersSpeedOperation.h
- operations/COM_RenderLayersColorOperation.cpp
- operations/COM_RenderLayersColorOperation.h
- operations/COM_RenderLayersUVOperation.cpp
- operations/COM_RenderLayersUVOperation.h
- operations/COM_RenderLayersMistOperation.cpp
- operations/COM_RenderLayersMistOperation.h
- operations/COM_RenderLayersObjectIndexOperation.cpp
- operations/COM_RenderLayersObjectIndexOperation.h
- operations/COM_RenderLayersMaterialIndexOperation.cpp
- operations/COM_RenderLayersMaterialIndexOperation.h
- operations/COM_RenderLayersDiffuseOperation.cpp
- operations/COM_RenderLayersDiffuseOperation.h
- operations/COM_RenderLayersSpecularOperation.cpp
- operations/COM_RenderLayersSpecularOperation.h
- operations/COM_RenderLayersShadowOperation.cpp
- operations/COM_RenderLayersShadowOperation.h
- operations/COM_RenderLayersAOOperation.cpp
- operations/COM_RenderLayersAOOperation.h
- operations/COM_RenderLayersEmitOperation.cpp
- operations/COM_RenderLayersEmitOperation.h
- operations/COM_RenderLayersReflectionOperation.cpp
- operations/COM_RenderLayersReflectionOperation.h
- operations/COM_RenderLayersRefractionOperation.cpp
- operations/COM_RenderLayersRefractionOperation.h
- operations/COM_RenderLayersEnvironmentOperation.cpp
- operations/COM_RenderLayersEnvironmentOperation.h
- operations/COM_RenderLayersIndirectOperation.cpp
- operations/COM_RenderLayersIndirectOperation.h
- operations/COM_RenderLayersCyclesOperation.cpp
- operations/COM_RenderLayersCyclesOperation.h
+ operations/COM_RenderLayersProg.cpp
+ operations/COM_RenderLayersProg.h
operations/COM_ImageOperation.cpp
operations/COM_ImageOperation.h
@@ -434,37 +393,11 @@ set(SRC
operations/COM_PreviewOperation.cpp
operations/COM_SplitOperation.h
operations/COM_SplitOperation.cpp
- operations/COM_ConvertValueToColorProg.h
- operations/COM_ConvertValueToColorProg.cpp
- operations/COM_ConvertColorToValueProg.h
- operations/COM_ConvertColorToValueProg.cpp
- operations/COM_ConvertColorToBWOperation.h
- operations/COM_ConvertColorToBWOperation.cpp
- operations/COM_ConvertColorToVectorOperation.h
- operations/COM_ConvertColorToVectorOperation.cpp
- operations/COM_ConvertValueToVectorOperation.h
- operations/COM_ConvertValueToVectorOperation.cpp
- operations/COM_ConvertVectorToColorOperation.h
- operations/COM_ConvertVectorToColorOperation.cpp
- operations/COM_ConvertVectorToValueOperation.h
- operations/COM_ConvertVectorToValueOperation.cpp
operations/COM_ConvertDepthToRadiusOperation.h
operations/COM_ConvertDepthToRadiusOperation.cpp
operations/COM_ZCombineOperation.cpp
operations/COM_ZCombineOperation.h
- operations/COM_ConvertRGBToYCCOperation.h
- operations/COM_ConvertRGBToYCCOperation.cpp
- operations/COM_ConvertYCCToRGBOperation.h
- operations/COM_ConvertYCCToRGBOperation.cpp
- operations/COM_ConvertRGBToYUVOperation.h
- operations/COM_ConvertRGBToYUVOperation.cpp
- operations/COM_ConvertYUVToRGBOperation.h
- operations/COM_ConvertYUVToRGBOperation.cpp
- operations/COM_ConvertRGBToHSVOperation.h
- operations/COM_ConvertRGBToHSVOperation.cpp
- operations/COM_ConvertHSVToRGBOperation.h
- operations/COM_ConvertHSVToRGBOperation.cpp
operations/COM_ChangeHSVOperation.h
operations/COM_ChangeHSVOperation.cpp
operations/COM_ColorCurveOperation.h
@@ -491,25 +424,13 @@ set(SRC
operations/COM_ColorMatteOperation.h
operations/COM_ChannelMatteOperation.cpp
operations/COM_ChannelMatteOperation.h
- operations/COM_ConvertPremulToStraightOperation.cpp
- operations/COM_ConvertPremulToStraightOperation.h
- operations/COM_ConvertStraightToPremulOperation.cpp
- operations/COM_ConvertStraightToPremulOperation.h
operations/COM_ReadBufferOperation.cpp
operations/COM_ReadBufferOperation.h
operations/COM_WriteBufferOperation.cpp
operations/COM_WriteBufferOperation.h
- operations/COM_MixBaseOperation.h
- operations/COM_MixBaseOperation.cpp
- operations/COM_MixBlendOperation.cpp
- operations/COM_MixBlendOperation.h
- operations/COM_MixGlareOperation.cpp
- operations/COM_MixGlareOperation.h
- operations/COM_MixAddOperation.h
- operations/COM_MixAddOperation.cpp
- operations/COM_MixMultiplyOperation.h
- operations/COM_MixMultiplyOperation.cpp
+ operations/COM_MixOperation.h
+ operations/COM_MixOperation.cpp
operations/COM_BrightnessOperation.cpp
operations/COM_BrightnessOperation.h
operations/COM_GammaOperation.cpp
@@ -523,37 +444,6 @@ set(SRC
operations/COM_SetVectorOperation.h
operations/COM_SetVectorOperation.cpp
- operations/COM_MixBurnOperation.h
- operations/COM_MixBurnOperation.cpp
- operations/COM_MixColorOperation.h
- operations/COM_MixColorOperation.cpp
- operations/COM_MixDarkenOperation.h
- operations/COM_MixDarkenOperation.cpp
- operations/COM_MixDodgeOperation.h
- operations/COM_MixDodgeOperation.cpp
- operations/COM_MixDifferenceOperation.h
- operations/COM_MixDifferenceOperation.cpp
- operations/COM_MixDivideOperation.h
- operations/COM_MixDivideOperation.cpp
- operations/COM_MixHueOperation.h
- operations/COM_MixHueOperation.cpp
- operations/COM_MixLightenOperation.h
- operations/COM_MixLightenOperation.cpp
- operations/COM_MixLinearLightOperation.h
- operations/COM_MixLinearLightOperation.cpp
- operations/COM_MixOverlayOperation.h
- operations/COM_MixOverlayOperation.cpp
- operations/COM_MixSaturationOperation.h
- operations/COM_MixSaturationOperation.cpp
- operations/COM_MixScreenOperation.h
- operations/COM_MixScreenOperation.cpp
- operations/COM_MixSoftLightOperation.h
- operations/COM_MixSoftLightOperation.cpp
- operations/COM_MixValueOperation.h
- operations/COM_MixValueOperation.cpp
- operations/COM_MixSubtractOperation.h
- operations/COM_MixSubtractOperation.cpp
-
operations/COM_MathBaseOperation.h
operations/COM_MathBaseOperation.cpp
@@ -635,11 +525,8 @@ set(SRC
#Convert operations
operations/COM_IDMaskOperation.cpp
operations/COM_IDMaskOperation.h
-
- operations/COM_SeparateChannelOperation.cpp
- operations/COM_SeparateChannelOperation.h
- operations/COM_CombineChannelsOperation.cpp
- operations/COM_CombineChannelsOperation.h
+ operations/COM_ConvertOperation.cpp
+ operations/COM_ConvertOperation.h
operations/COM_DotproductOperation.cpp
operations/COM_DotproductOperation.h
diff --git a/source/blender/compositor/COM_compositor.h b/source/blender/compositor/COM_compositor.h
index 204c3237e65..1936909b004 100644
--- a/source/blender/compositor/COM_compositor.h
+++ b/source/blender/compositor/COM_compositor.h
@@ -20,6 +20,9 @@
* Monique Dewanchand
*/
+#ifndef __COM_COMPOSITOR_H__
+#define __COM_COMPOSITOR_H__
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -343,3 +346,5 @@ int COM_isHighlightedbNode(bNode *bnode);
#ifdef __cplusplus
}
#endif
+
+#endif /* __COM_COMPOSITOR_H__ */
diff --git a/source/blender/compositor/COM_defines.h b/source/blender/compositor/COM_defines.h
index 3cc161a5877..3b0e9f239bb 100644
--- a/source/blender/compositor/COM_defines.h
+++ b/source/blender/compositor/COM_defines.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_defines_h_
-#define _COM_defines_h_
+#ifndef __COM_DEFINES_H__
+#define __COM_DEFINES_H__
/**
* @brief possible data types for SocketConnection
@@ -109,4 +109,4 @@ typedef enum OrderOfChunks {
#define COM_BLUR_BOKEH_PIXELS 512
-#endif
+#endif /* __COM_DEFINES_H__ */
diff --git a/source/blender/compositor/intern/COM_Converter.cpp b/source/blender/compositor/intern/COM_Converter.cpp
index db0cdd1692e..384cfbe47fa 100644
--- a/source/blender/compositor/intern/COM_Converter.cpp
+++ b/source/blender/compositor/intern/COM_Converter.cpp
@@ -47,12 +47,7 @@
#include "COM_CombineYUVANode.h"
#include "COM_CompositorNode.h"
#include "COM_ConvertAlphaNode.h"
-#include "COM_ConvertColorToVectorOperation.h"
-#include "COM_ConvertColorToValueProg.h"
-#include "COM_ConvertValueToColorProg.h"
-#include "COM_ConvertValueToVectorOperation.h"
-#include "COM_ConvertVectorToColorOperation.h"
-#include "COM_ConvertVectorToValueOperation.h"
+#include "COM_ConvertOperation.h"
#include "COM_Converter.h"
#include "COM_CropNode.h"
#include "COM_DefocusNode.h"
@@ -420,13 +415,13 @@ void Converter::convertDataType(SocketConnection *connection, ExecutionSystem *s
DataType toDatatype = inputSocket->getDataType();
NodeOperation *converter = NULL;
if (fromDatatype == COM_DT_VALUE && toDatatype == COM_DT_COLOR) {
- converter = new ConvertValueToColorProg();
+ converter = new ConvertValueToColorOperation();
}
else if (fromDatatype == COM_DT_VALUE && toDatatype == COM_DT_VECTOR) {
converter = new ConvertValueToVectorOperation();
}
else if (fromDatatype == COM_DT_COLOR && toDatatype == COM_DT_VALUE) {
- converter = new ConvertColorToValueProg();
+ converter = new ConvertColorToValueOperation();
}
else if (fromDatatype == COM_DT_COLOR && toDatatype == COM_DT_VECTOR) {
converter = new ConvertColorToVectorOperation();
diff --git a/source/blender/compositor/intern/COM_Debug.cpp b/source/blender/compositor/intern/COM_Debug.cpp
new file mode 100644
index 00000000000..b57de38522a
--- /dev/null
+++ b/source/blender/compositor/intern/COM_Debug.cpp
@@ -0,0 +1,413 @@
+/*
+ * Copyright 2013, Blender Foundation.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor:
+ * Lukas Toenne
+ */
+
+#include "COM_Debug.h"
+
+#ifdef COM_DEBUG
+
+#include <typeinfo>
+#include <map>
+#include <vector>
+
+extern "C" {
+#include "BLI_fileops.h"
+#include "BLI_path_util.h"
+#include "BLI_string.h"
+#include "DNA_node_types.h"
+#include "BKE_node.h"
+}
+
+#include "COM_Node.h"
+#include "COM_ExecutionSystem.h"
+#include "COM_ExecutionGroup.h"
+
+#include "COM_ReadBufferOperation.h"
+#include "COM_ViewerOperation.h"
+#include "COM_WriteBufferOperation.h"
+
+
+int DebugInfo::m_file_index = 0;
+DebugInfo::NodeNameMap DebugInfo::m_node_names;
+std::string DebugInfo::m_current_node_name;
+DebugInfo::GroupStateMap DebugInfo::m_group_states;
+
+std::string DebugInfo::node_name(NodeBase *node)
+{
+ NodeNameMap::const_iterator it = m_node_names.find(node);
+ if (it != m_node_names.end())
+ return it->second;
+ else
+ return "";
+}
+
+void DebugInfo::convert_started()
+{
+ m_node_names.clear();
+}
+
+void DebugInfo::execute_started(ExecutionSystem *system)
+{
+ m_file_index = 1;
+ m_group_states.clear();
+ for (int i = 0; i < system->getExecutionGroups().size(); ++i)
+ m_group_states[system->getExecutionGroups()[i]] = EG_WAIT;
+}
+
+void DebugInfo::node_added(Node *node)
+{
+ m_node_names[node] = std::string(node->getbNode() ? node->getbNode()->name : "");
+}
+
+void DebugInfo::node_to_operations(Node *node)
+{
+ m_current_node_name = m_node_names[node];
+}
+
+void DebugInfo::operation_added(NodeOperation *operation)
+{
+ m_node_names[operation] = m_current_node_name;
+}
+
+void DebugInfo::operation_read_write_buffer(NodeOperation *operation)
+{
+ m_current_node_name = m_node_names[operation];
+}
+
+void DebugInfo::execution_group_started(ExecutionGroup *group)
+{
+ m_group_states[group] = EG_RUNNING;
+}
+
+void DebugInfo::execution_group_finished(ExecutionGroup *group)
+{
+ m_group_states[group] = EG_FINISHED;
+}
+
+int DebugInfo::graphviz_operation(ExecutionSystem *system, NodeOperation *operation, ExecutionGroup *group, char *str, int maxlen)
+{
+ int len = 0;
+
+ std::string fillcolor = "gainsboro";
+ if (operation->isViewerOperation()) {
+ ViewerOperation *viewer = (ViewerOperation *)operation;
+ if (viewer->isActiveViewerOutput()) {
+ fillcolor = "lightskyblue1";
+ }
+ else {
+ fillcolor = "lightskyblue3";
+ }
+ }
+ else if (operation->isOutputOperation(system->getContext().isRendering())) {
+ fillcolor = "dodgerblue1";
+ }
+ else if (operation->isSetOperation()) {
+ fillcolor = "khaki1";
+ }
+ else if (operation->isReadBufferOperation()) {
+ fillcolor = "darkolivegreen3";
+ }
+ else if (operation->isWriteBufferOperation()) {
+ fillcolor = "darkorange";
+ }
+
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "// OPERATION: %p\r\n", operation);
+ if (group)
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "\"O_%p_%p\"", operation, group);
+ else
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "\"O_%p\"", operation);
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, " [fillcolor=%s,style=filled,shape=record,label=\"{", fillcolor.c_str());
+
+ int totinputs = operation->getNumberOfInputSockets();
+ if (totinputs != 0) {
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "{");
+ for (int k = 0; k < totinputs; k++) {
+ InputSocket *socket = operation->getInputSocket(k);
+ if (k != 0) {
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "|");
+ }
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "<IN_%p>", socket);
+ switch (socket->getDataType()) {
+ case COM_DT_VALUE:
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "Value");
+ break;
+ case COM_DT_VECTOR:
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "Vector");
+ break;
+ case COM_DT_COLOR:
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "Color");
+ break;
+ }
+ }
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "}");
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "|");
+ }
+
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "%s\\n(%s)", m_node_names[operation].c_str(), typeid(*operation).name());
+
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, " (%d,%d)", operation->getWidth(), operation->getHeight());
+
+ int totoutputs = operation->getNumberOfOutputSockets();
+ if (totoutputs != 0) {
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "|");
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "{");
+ for (int k = 0; k < totoutputs; k++) {
+ OutputSocket *socket = operation->getOutputSocket(k);
+ if (k != 0) {
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "|");
+ }
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "<OUT_%p>", socket);
+ switch (socket->getDataType()) {
+ case COM_DT_VALUE:
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "Value");
+ break;
+ case COM_DT_VECTOR:
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "Vector");
+ break;
+ case COM_DT_COLOR:
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "Color");
+ break;
+ }
+ }
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "}");
+ }
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "}\"]");
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "\r\n");
+
+ return len;
+}
+
+int DebugInfo::graphviz_legend_color(const char *name, const char *color, char *str, int maxlen)
+{
+ int len = 0;
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "<TR><TD>%s</TD><TD BGCOLOR=\"%s\"></TD></TR>\r\n", name, color);
+ return len;
+}
+
+int DebugInfo::graphviz_legend_line(const char *name, const char *color, const char *style, char *str, int maxlen)
+{
+ /* XXX TODO */
+ int len = 0;
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "\r\n");
+ return len;
+}
+
+int DebugInfo::graphviz_legend_group(const char *name, const char *color, const char *style, char *str, int maxlen)
+{
+ int len = 0;
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "<TR><TD>%s</TD><TD CELLPADDING=\"4\"><TABLE BORDER=\"1\" CELLBORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\"><TR><TD BGCOLOR=\"%s\"></TD></TR></TABLE></TD></TR>\r\n", name, color);
+ return len;
+}
+
+int DebugInfo::graphviz_legend(char *str, int maxlen)
+{
+ int len = 0;
+
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "{\r\n");
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "rank = sink;\r\n");
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "Legend [shape=none, margin=0, label=<\r\n");
+
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, " <TABLE BORDER=\"0\" CELLBORDER=\"1\" CELLSPACING=\"0\" CELLPADDING=\"4\">\r\n");
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "<TR><TD COLSPAN=\"2\"><B>Legend</B></TD></TR>\r\n");
+
+ len += graphviz_legend_color("Operation", "gainsboro", str + len, maxlen > len ? maxlen - len : 0);
+ len += graphviz_legend_color("Output", "dodgerblue1", str + len, maxlen > len ? maxlen - len : 0);
+ len += graphviz_legend_color("Viewer", "lightskyblue3", str + len, maxlen > len ? maxlen - len : 0);
+ len += graphviz_legend_color("Active Viewer", "lightskyblue1", str + len, maxlen > len ? maxlen - len : 0);
+ len += graphviz_legend_color("Write Buffer", "darkorange", str + len, maxlen > len ? maxlen - len : 0);
+ len += graphviz_legend_color("Read Buffer", "darkolivegreen3", str + len, maxlen > len ? maxlen - len : 0);
+ len += graphviz_legend_color("Input Value", "khaki1", str + len, maxlen > len ? maxlen - len : 0);
+
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "<TR><TD></TD></TR>\r\n");
+
+ len += graphviz_legend_group("Group Waiting", "white", "dashed", str + len, maxlen > len ? maxlen - len : 0);
+ len += graphviz_legend_group("Group Running", "firebrick1", "solid", str + len, maxlen > len ? maxlen - len : 0);
+ len += graphviz_legend_group("Group Finished", "chartreuse4", "solid", str + len, maxlen > len ? maxlen - len : 0);
+
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "</TABLE>\r\n");
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, ">];\r\n");
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "}\r\n");
+
+ return len;
+}
+
+bool DebugInfo::graphviz_system(ExecutionSystem *system, char *str, int maxlen)
+{
+ char strbuf[64];
+ int len = 0;
+
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "digraph compositorexecution {\r\n");
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "ranksep=1.5\r\n");
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "splines=false\r\n");
+
+ int totnodes = system->getNodes().size();
+ for (int i = 0; i < totnodes; i++) {
+ Node *node = system->getNodes()[i];
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "// NODE: %s\r\n", node->getbNode()->typeinfo->ui_name);
+ }
+
+ int totgroups = system->getExecutionGroups().size();
+ int totops = system->getOperations().size();
+ std::map<NodeOperation *, std::vector<std::string> > op_groups;
+ for (int i = 0; i < totgroups; ++i) {
+ ExecutionGroup *group = system->getExecutionGroups()[i];
+
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "// GROUP: %d\r\n", i);
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "subgraph cluster_%d{\r\n", i);
+ /* used as a check for executing group */
+ if (m_group_states[group] == EG_WAIT) {
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "style=dashed\r\n");
+ }
+ else if (m_group_states[group] == EG_RUNNING) {
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "style=filled\r\n");
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "color=black\r\n");
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "fillcolor=firebrick1\r\n");
+ }
+ else if (m_group_states[group] == EG_FINISHED) {
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "style=filled\r\n");
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "color=black\r\n");
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "fillcolor=chartreuse4\r\n");
+ }
+
+ for (int j = 0; j < totops; ++j) {
+ NodeOperation *operation = system->getOperations()[j];
+ if (!group->containsOperation(operation))
+ continue;
+
+ sprintf(strbuf, "_%p", group);
+ op_groups[operation].push_back(std::string(strbuf));
+
+ len += graphviz_operation(system, operation, group, str + len, maxlen > len ? maxlen - len : 0);
+ }
+
+// len += snprintf(str+len, maxlen>len ? maxlen-len : 0, "// OUTPUTOPERATION: %p\r\n", group->getOutputNodeOperation());
+// len += snprintf(str+len, maxlen>len ? maxlen-len : 0, " O_%p\r\n", group->getOutputNodeOperation());
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "}\r\n");
+ }
+
+ /* operations not included in any group */
+ for (int j = 0; j < totops; ++j) {
+ NodeOperation *operation = system->getOperations()[j];
+ if (op_groups.find(operation) != op_groups.end())
+ continue;
+
+ op_groups[operation].push_back(std::string(""));
+
+ len += graphviz_operation(system, operation, 0, str + len, maxlen > len ? maxlen - len : 0);
+ }
+
+ for (int i = 0; i < totops; i++) {
+ NodeOperation *operation = system->getOperations()[i];
+
+ if (operation->isReadBufferOperation()) {
+ ReadBufferOperation *read = (ReadBufferOperation *)operation;
+ WriteBufferOperation *write = read->getMemoryProxy()->getWriteBufferOperation();
+ std::vector<std::string> &read_groups = op_groups[read];
+ std::vector<std::string> &write_groups = op_groups[write];
+
+ for (int k = 0; k < write_groups.size(); ++k) {
+ for (int l = 0; l < read_groups.size(); ++l) {
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "\"O_%p%s\" -> \"O_%p%s\" [style=dotted]\r\n", write, write_groups[k].c_str(), read, read_groups[l].c_str());
+ }
+ }
+ }
+ }
+
+ int totcon = system->getConnections().size();
+ for (int i = 0; i < totcon; i++) {
+ SocketConnection *connection = system->getConnections()[i];
+
+ std::string color;
+ if (!connection->isValid()) {
+ color = "red";
+ }
+ else {
+ switch (connection->getFromSocket()->getDataType()) {
+ case COM_DT_VALUE:
+ color = "grey";
+ break;
+ case COM_DT_VECTOR:
+ color = "blue";
+ break;
+ case COM_DT_COLOR:
+ color = "orange";
+ break;
+ }
+ }
+
+ NodeBase *from_node = connection->getFromNode();
+ NodeBase *to_node = connection->getToNode();
+ OutputSocket *from_sock = connection->getFromSocket();
+ InputSocket *to_sock = connection->getToSocket();
+ if (from_node->isOperation() && to_node->isOperation()) {
+ NodeOperation *from_op = (NodeOperation *)from_node;
+ NodeOperation *to_op = (NodeOperation *)to_node;
+ std::vector<std::string> &from_groups = op_groups[from_op];
+ std::vector<std::string> &to_groups = op_groups[to_op];
+
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "// CONNECTION: %p.%p -> %p.%p\r\n", from_op, from_sock, to_op, to_sock);
+ for (int k = 0; k < from_groups.size(); ++k) {
+ for (int l = 0; l < to_groups.size(); ++l) {
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "\"O_%p%s\":\"OUT_%p\":s -> \"O_%p%s\":\"IN_%p\":n", from_op, from_groups[k].c_str(), from_sock, to_op, to_groups[l].c_str(), to_sock);
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, " [color=%s]", color.c_str());
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "\r\n");
+ }
+ }
+ }
+ }
+
+ len += graphviz_legend(str + len, maxlen > len ? maxlen - len : 0);
+
+ len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "}\r\n");
+
+ return (len < maxlen);
+}
+
+void DebugInfo::graphviz(ExecutionSystem *system)
+{
+ char str[1000000];
+ if (graphviz_system(system, str, sizeof(str) - 1)) {
+ char basename[FILE_MAX];
+ char filename[FILE_MAX];
+
+ BLI_snprintf(basename, sizeof(basename), "compositor_%d.dot", m_file_index);
+ BLI_join_dirfile(filename, sizeof(filename), BLI_temporary_dir(), basename);
+ ++m_file_index;
+
+ FILE *fp = BLI_fopen(filename, "wb");
+ fputs(str, fp);
+ fclose(fp);
+ }
+}
+
+#else
+
+std::string DebugInfo::node_name(NodeBase */*node*/) { return ""; }
+void DebugInfo::convert_started() {}
+void DebugInfo::execute_started(ExecutionSystem */*system*/) {}
+void DebugInfo::node_added(Node */*node*/) {}
+void DebugInfo::node_to_operations(Node */*node*/) {}
+void DebugInfo::operation_added(NodeOperation */*operation*/) {}
+void DebugInfo::operation_read_write_buffer(NodeOperation */*operation*/) {}
+void DebugInfo::execution_group_started(ExecutionGroup */*group*/) {}
+void DebugInfo::execution_group_finished(ExecutionGroup */*group*/) {}
+void DebugInfo::graphviz(ExecutionSystem */*system*/) {}
+
+#endif
diff --git a/source/blender/compositor/intern/COM_Debug.h b/source/blender/compositor/intern/COM_Debug.h
new file mode 100644
index 00000000000..cc108157769
--- /dev/null
+++ b/source/blender/compositor/intern/COM_Debug.h
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2013, Blender Foundation.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor:
+ * Lukas Toenne
+ */
+
+#ifndef _COM_Debug_h
+#define _COM_Debug_h
+
+#include <map>
+#include <string>
+
+#include "COM_defines.h"
+
+class NodeBase;
+class Node;
+class NodeOperation;
+class ExecutionSystem;
+class ExecutionGroup;
+
+class DebugInfo {
+public:
+ typedef enum {
+ EG_WAIT,
+ EG_RUNNING,
+ EG_FINISHED
+ } GroupState;
+
+ typedef std::map<NodeBase *, std::string> NodeNameMap;
+ typedef std::map<ExecutionGroup *, GroupState> GroupStateMap;
+
+ static std::string node_name(NodeBase *node);
+
+ static void convert_started();
+ static void execute_started(ExecutionSystem *system);
+
+ static void node_added(Node *node);
+ static void node_to_operations(Node *node);
+ static void operation_added(NodeOperation *operation);
+ static void operation_read_write_buffer(NodeOperation *operation);
+
+ static void execution_group_started(ExecutionGroup *group);
+ static void execution_group_finished(ExecutionGroup *group);
+
+ static void graphviz(ExecutionSystem *system);
+
+#ifdef COM_DEBUG
+protected:
+ static int graphviz_operation(ExecutionSystem *system, NodeOperation *operation, ExecutionGroup *group, char *str, int maxlen);
+ static int graphviz_legend_color(const char *name, const char *color, char *str, int maxlen);
+ static int graphviz_legend_line(const char *name, const char *color, const char *style, char *str, int maxlen);
+ static int graphviz_legend_group(const char *name, const char *color, const char *style, char *str, int maxlen);
+ static int graphviz_legend(char *str, int maxlen);
+ static bool graphviz_system(ExecutionSystem *system, char *str, int maxlen);
+
+private:
+ static int m_file_index;
+ static NodeNameMap m_node_names; /**< map nodes to usable names for debug output */
+ static std::string m_current_node_name; /**< base name for all operations added by a node */
+ static GroupStateMap m_group_states; /**< for visualizing group states */
+#endif
+};
+
+#endif
diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.cpp b/source/blender/compositor/intern/COM_ExecutionGroup.cpp
index 827b93c350e..a4ff1ce7a19 100644
--- a/source/blender/compositor/intern/COM_ExecutionGroup.cpp
+++ b/source/blender/compositor/intern/COM_ExecutionGroup.cpp
@@ -37,6 +37,7 @@
#include "COM_ViewerOperation.h"
#include "COM_ChunkOrder.h"
#include "COM_ExecutionSystemHelper.h"
+#include "COM_Debug.h"
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
@@ -343,6 +344,9 @@ void ExecutionGroup::execute(ExecutionSystem *graph)
break;
}
+ DebugInfo::execution_group_started(this);
+ DebugInfo::graphviz(graph);
+
bool breaked = false;
bool finished = false;
unsigned int startIndex = 0;
@@ -383,6 +387,8 @@ void ExecutionGroup::execute(ExecutionSystem *graph)
breaked = true;
}
}
+ DebugInfo::execution_group_finished(this);
+ DebugInfo::graphviz(graph);
MEM_freeN(chunkOrder);
}
@@ -518,17 +524,19 @@ bool ExecutionGroup::scheduleAreaWhenPossible(ExecutionSystem *graph, rcti *area
// find all chunks inside the rect
// determine minxchunk, minychunk, maxxchunk, maxychunk where x and y are chunknumbers
- float chunkSizef = this->m_chunkSize;
-
int indexx, indexy;
- int minxchunk = floor((area->xmin - this->m_viewerBorder.xmin) / chunkSizef);
- int maxxchunk = ceil((area->xmax - 1) / chunkSizef);
- int minychunk = floor((area->ymin - this->m_viewerBorder.ymin) / chunkSizef);
- int maxychunk = ceil((area->ymax - 1) / chunkSizef);
- minxchunk = max(minxchunk, 0);
- minychunk = max(minychunk, 0);
- maxxchunk = min(maxxchunk, (int)this->m_numberOfXChunks);
- maxychunk = min(maxychunk, (int)this->m_numberOfYChunks);
+ int minx = max_ii(area->xmin - m_viewerBorder.xmin, 0);
+ int maxx = min_ii(area->xmax - m_viewerBorder.xmin, m_viewerBorder.xmax - m_viewerBorder.xmin);
+ int miny = max_ii(area->ymin - m_viewerBorder.ymin, 0);
+ int maxy = min_ii(area->ymax - m_viewerBorder.ymin, m_viewerBorder.ymax - m_viewerBorder.ymin);
+ int minxchunk = minx / (int)m_chunkSize;
+ int maxxchunk = (maxx + (int)m_chunkSize - 1) / (int)m_chunkSize;
+ int minychunk = miny / (int)m_chunkSize;
+ int maxychunk = (maxy + (int)m_chunkSize - 1) / (int)m_chunkSize;
+ minxchunk = max_ii(minxchunk, 0);
+ minychunk = max_ii(minychunk, 0);
+ maxxchunk = min_ii(maxxchunk, (int)m_numberOfXChunks);
+ maxychunk = min_ii(maxychunk, (int)m_numberOfYChunks);
bool result = true;
for (indexx = minxchunk; indexx < maxxchunk; indexx++) {
diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.h b/source/blender/compositor/intern/COM_ExecutionGroup.h
index 537dcb5974a..47f8447015d 100644
--- a/source/blender/compositor/intern/COM_ExecutionGroup.h
+++ b/source/blender/compositor/intern/COM_ExecutionGroup.h
@@ -422,6 +422,9 @@ public:
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("COM:ExecutionGroup")
#endif
+
+ /* allow the DebugInfo class to peek inside without having to add getters for everything */
+ friend class DebugInfo;
};
#endif
diff --git a/source/blender/compositor/intern/COM_ExecutionSystem.cpp b/source/blender/compositor/intern/COM_ExecutionSystem.cpp
index ad29405d2e9..716e99a0fa3 100644
--- a/source/blender/compositor/intern/COM_ExecutionSystem.cpp
+++ b/source/blender/compositor/intern/COM_ExecutionSystem.cpp
@@ -22,8 +22,6 @@
#include "COM_ExecutionSystem.h"
-#include <sstream>
-
#include "PIL_time.h"
#include "BLI_utildefines.h"
extern "C" {
@@ -40,6 +38,7 @@ extern "C" {
#include "COM_WriteBufferOperation.h"
#include "COM_ReadBufferOperation.h"
#include "COM_ExecutionSystemHelper.h"
+#include "COM_Debug.h"
#include "BKE_global.h"
@@ -101,9 +100,7 @@ ExecutionSystem::ExecutionSystem(RenderData *rd, bNodeTree *editingtree, bool re
}
}
-#ifdef COM_DEBUG
- ExecutionSystemHelper::debugDump(this);
-#endif
+// DebugInfo::graphviz(this);
}
ExecutionSystem::~ExecutionSystem()
@@ -133,6 +130,8 @@ ExecutionSystem::~ExecutionSystem()
void ExecutionSystem::execute()
{
+ DebugInfo::execute_started(this);
+
unsigned int order = 0;
for (vector<NodeOperation *>::iterator iter = this->m_operations.begin(); iter != this->m_operations.end(); ++iter) {
NodeBase *node = *iter;
@@ -199,11 +198,13 @@ void ExecutionSystem::executeGroups(CompositorPriority priority)
void ExecutionSystem::addOperation(NodeOperation *operation)
{
ExecutionSystemHelper::addOperation(this->m_operations, operation);
-// operation->setBTree
+ DebugInfo::operation_added(operation);
}
void ExecutionSystem::addReadWriteBufferOperations(NodeOperation *operation)
{
+ DebugInfo::operation_read_write_buffer(operation);
+
// for every input add write and read operation if input is not a read operation
// only add read operation to other links when they are attached to buffered operations.
unsigned int index;
@@ -283,8 +284,10 @@ static void debug_check_node_connections(Node *node)
void ExecutionSystem::convertToOperations()
{
unsigned int index;
+
for (index = 0; index < this->m_nodes.size(); index++) {
Node *node = (Node *)this->m_nodes[index];
+ DebugInfo::node_to_operations(node);
node->convertToOperations(this, &this->m_context);
debug_check_node_connections(node);
diff --git a/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp b/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp
index 9024cd33745..7def96d426e 100644
--- a/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp
+++ b/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp
@@ -22,9 +22,6 @@
#include "COM_ExecutionSystemHelper.h"
-#include <sstream>
-#include <stdio.h>
-
#include "PIL_time.h"
#include "COM_Converter.h"
@@ -37,6 +34,7 @@
#include "COM_WriteBufferOperation.h"
#include "COM_ReadBufferOperation.h"
#include "COM_ViewerOperation.h"
+#include "COM_Debug.h"
extern "C" {
#include "BKE_node.h"
@@ -47,7 +45,10 @@ void ExecutionSystemHelper::addbNodeTree(ExecutionSystem &system, int nodes_star
vector<Node *>& nodes = system.getNodes();
vector<SocketConnection *>& links = system.getConnections();
- bool is_active_group = (parent_key.value == system.getContext().getbNodeTree()->active_viewer_key.value);
+ const bNodeTree *basetree = system.getContext().getbNodeTree();
+ /* update viewers in the active edittree as well the base tree (for backdrop) */
+ bool is_active_group = ((parent_key.value == basetree->active_viewer_key.value) ||
+ (tree == basetree));
/* add all nodes of the tree to the node list */
bNode *node = (bNode *)tree->nodes.first;
@@ -93,6 +94,8 @@ Node *ExecutionSystemHelper::addNode(vector<Node *>& nodes, bNode *b_node, bool
if (node) {
node->setIsInActiveGroup(inActiveGroup);
addNode(nodes, node);
+
+ DebugInfo::node_added(node);
}
return node;
}
@@ -166,144 +169,3 @@ SocketConnection *ExecutionSystemHelper::addLink(vector<SocketConnection *>& lin
links.push_back(newconnection);
return newconnection;
}
-
-void ExecutionSystemHelper::debugDump(ExecutionSystem *system)
-{
- Node *node;
- NodeOperation *operation;
- ExecutionGroup *group;
- SocketConnection *connection;
- int tot, tot2;
- printf("-- BEGIN COMPOSITOR DUMP --\r\n");
- printf("digraph compositorexecution {\r\n");
- tot = system->getNodes().size();
- for (int i = 0; i < tot; i++) {
- node = system->getNodes()[i];
- printf("// NODE: %s\r\n", node->getbNode()->typeinfo->ui_name);
- }
- tot = system->getOperations().size();
- for (int i = 0; i < tot; i++) {
- operation = system->getOperations()[i];
- printf("// OPERATION: %p\r\n", operation);
- printf("\t\"O_%p\"", operation);
- printf(" [shape=record,label=\"{");
- tot2 = operation->getNumberOfInputSockets();
- if (tot2 != 0) {
- printf("{");
- for (int j = 0; j < tot2; j++) {
- InputSocket *socket = operation->getInputSocket(j);
- if (j != 0) {
- printf("|");
- }
- printf("<IN_%p>", socket);
- switch (socket->getDataType()) {
- case COM_DT_VALUE:
- printf("Value");
- break;
- case COM_DT_VECTOR:
- printf("Vector");
- break;
- case COM_DT_COLOR:
- printf("Color");
- break;
- }
- }
- printf("}");
- printf("|");
- }
- if (operation->isViewerOperation()) {
- ViewerOperation *viewer = (ViewerOperation *)operation;
- if (viewer->isActiveViewerOutput()) {
- printf("Active viewer");
- }
- else {
- printf("Viewer");
- }
- }
- else if (operation->isOutputOperation(system->getContext().isRendering())) {
- printf("Output");
- }
- else if (operation->isSetOperation()) {
- printf("Set");
- }
- else if (operation->isReadBufferOperation()) {
- printf("ReadBuffer");
- }
- else if (operation->isWriteBufferOperation()) {
- printf("WriteBuffer");
- }
- else {
- printf("O_%p", operation);
- }
- printf(" (%d,%d)", operation->getWidth(), operation->getHeight());
- tot2 = operation->getNumberOfOutputSockets();
- if (tot2 != 0) {
- printf("|");
- printf("{");
- for (int j = 0; j < tot2; j++) {
- OutputSocket *socket = operation->getOutputSocket(j);
- if (j != 0) {
- printf("|");
- }
- printf("<OUT_%p>", socket);
- switch (socket->getDataType()) {
- case COM_DT_VALUE:
- printf("Value");
- break;
- case COM_DT_VECTOR:
- printf("Vector");
- break;
- case COM_DT_COLOR:
- printf("Color");
- break;
- }
- }
- printf("}");
- }
- printf("}\"]");
- printf("\r\n");
- }
- tot = system->getExecutionGroups().size();
- for (int i = 0; i < tot; i++) {
- group = system->getExecutionGroups()[i];
- printf("// GROUP: %d\r\n", i);
- printf("subgraph {\r\n");
- printf("// OUTPUTOPERATION: %p\r\n", group->getOutputNodeOperation());
- printf(" O_%p\r\n", group->getOutputNodeOperation());
- printf("}\r\n");
- }
- tot = system->getOperations().size();
- for (int i = 0; i < tot; i++) {
- operation = system->getOperations()[i];
- if (operation->isReadBufferOperation()) {
- ReadBufferOperation *read = (ReadBufferOperation *)operation;
- WriteBufferOperation *write = read->getMemoryProxy()->getWriteBufferOperation();
- printf("\t\"O_%p\" -> \"O_%p\" [style=dotted]\r\n", write, read);
- }
- }
- tot = system->getConnections().size();
- for (int i = 0; i < tot; i++) {
- connection = system->getConnections()[i];
- printf("// CONNECTION: %p.%p -> %p.%p\r\n", connection->getFromNode(), connection->getFromSocket(), connection->getToNode(), connection->getToSocket());
- printf("\t\"O_%p\":\"OUT_%p\" -> \"O_%p\":\"IN_%p\"", connection->getFromNode(), connection->getFromSocket(), connection->getToNode(), connection->getToSocket());
- if (!connection->isValid()) {
- printf(" [color=red]");
- }
- else {
- switch (connection->getFromSocket()->getDataType()) {
- case COM_DT_VALUE:
- printf(" [color=grey]");
- break;
- case COM_DT_VECTOR:
- printf(" [color=blue]");
- break;
- case COM_DT_COLOR:
- printf(" [color=orange]");
- break;
- }
- }
- printf("\r\n");
- }
- printf("}\r\n");
- printf("-- END COMPOSITOR DUMP --\r\n");
-}
diff --git a/source/blender/compositor/intern/COM_ExecutionSystemHelper.h b/source/blender/compositor/intern/COM_ExecutionSystemHelper.h
index e05796b9127..002423c195c 100644
--- a/source/blender/compositor/intern/COM_ExecutionSystemHelper.h
+++ b/source/blender/compositor/intern/COM_ExecutionSystemHelper.h
@@ -118,12 +118,6 @@ public:
*/
static SocketConnection *addLink(vector<SocketConnection *>& links, OutputSocket *fromSocket, InputSocket *toSocket);
- /**
- * @brief dumps the content of the execution system to standard out
- * @param system the execution system to dump
- */
- static void debugDump(ExecutionSystem *system);
-
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("COM:ExecutionSystemHelper")
#endif
diff --git a/source/blender/compositor/intern/COM_MemoryBuffer.cpp b/source/blender/compositor/intern/COM_MemoryBuffer.cpp
index 357a4c1d4c0..f10e6696c6a 100644
--- a/source/blender/compositor/intern/COM_MemoryBuffer.cpp
+++ b/source/blender/compositor/intern/COM_MemoryBuffer.cpp
@@ -179,7 +179,7 @@ void MemoryBuffer::addPixel(int x, int y, const float color[4])
// table of (exp(ar) - exp(a)) / (1 - exp(a)) for r in range [0, 1] and a = -2
// used instead of actual gaussian, otherwise at high texture magnifications circular artifacts are visible
#define EWA_MAXIDX 255
-static float EWA_WTS[EWA_MAXIDX + 1] = {
+static const float EWA_WTS[EWA_MAXIDX + 1] = {
1.f, 0.990965f, 0.982f, 0.973105f, 0.96428f, 0.955524f, 0.946836f, 0.938216f, 0.929664f,
0.921178f, 0.912759f, 0.904405f, 0.896117f, 0.887893f, 0.879734f, 0.871638f, 0.863605f,
0.855636f, 0.847728f, 0.839883f, 0.832098f, 0.824375f, 0.816712f, 0.809108f, 0.801564f,
@@ -335,8 +335,7 @@ void MemoryBuffer::readEWA(float result[4], float fx, float fy, float dx, float
float tc[4];
const float wt = EWA_WTS[(Q < 0.f) ? 0 : (unsigned int)Q];
read(tc, clipuv(u, width), clipuv(v, height));
- madd_v3_v3fl(result, tc, wt);
- result[3] += result[3] ? tc[3] * wt : 0.f;
+ madd_v4_v4fl(result, tc, wt);
d += wt;
}
Q += DQ;
@@ -346,9 +345,5 @@ void MemoryBuffer::readEWA(float result[4], float fx, float fy, float dx, float
// d should hopefully never be zero anymore
d = 1.f / d;
- result[0] *= d;
- result[1] *= d;
- result[2] *= d;
- // clipping can be ignored if alpha used, texr->ta already includes filtered edge
- result[3] = result[3] ? result[3] * d : 1.f;
+ mul_v4_fl(result, d);
}
diff --git a/source/blender/compositor/intern/COM_MemoryBuffer.h b/source/blender/compositor/intern/COM_MemoryBuffer.h
index d176298578f..548744f6660 100644
--- a/source/blender/compositor/intern/COM_MemoryBuffer.h
+++ b/source/blender/compositor/intern/COM_MemoryBuffer.h
@@ -46,6 +46,12 @@ typedef enum MemoryBufferState {
COM_MB_TEMPORARILY = 6
} MemoryBufferState;
+typedef enum MemoryBufferExtend {
+ COM_MB_CLIP,
+ COM_MB_EXTEND,
+ COM_MB_REPEAT
+} MemoryBufferExtend;
+
class MemoryProxy;
/**
@@ -125,31 +131,66 @@ public:
this->m_state = COM_MB_AVAILABLE;
}
- inline void read(float result[4], int x, int y)
+ inline void wrap_pixel(int &x, int &y, MemoryBufferExtend extend_x, MemoryBufferExtend extend_y)
{
- if (x >= this->m_rect.xmin && x < this->m_rect.xmax &&
- y >= this->m_rect.ymin && y < this->m_rect.ymax)
- {
- const int dx = x - this->m_rect.xmin;
- const int dy = y - this->m_rect.ymin;
- const int offset = (this->m_chunkWidth * dy + dx) * COM_NUMBER_OF_CHANNELS;
- copy_v4_v4(result, &this->m_buffer[offset]);
+ int w = m_rect.xmax - m_rect.xmin;
+ int h = m_rect.ymax - m_rect.ymin;
+ x = x - m_rect.xmin;
+ y = y - m_rect.ymin;
+
+ switch (extend_x) {
+ case COM_MB_CLIP:
+ break;
+ case COM_MB_EXTEND:
+ if (x < 0) x = 0;
+ if (x >= w) x = w;
+ break;
+ case COM_MB_REPEAT:
+ x = (x >= 0.0f ? (x % w) : (x % w) + w);
+ break;
}
- else {
+
+ switch (extend_y) {
+ case COM_MB_CLIP:
+ break;
+ case COM_MB_EXTEND:
+ if (y < 0) y = 0;
+ if (y >= h) y = h;
+ break;
+ case COM_MB_REPEAT:
+ y = (y >= 0.0f ? (y % h) : (y % h) + h);
+ break;
+ }
+ }
+
+ inline void read(float result[4], int x, int y,
+ MemoryBufferExtend extend_x = COM_MB_CLIP,
+ MemoryBufferExtend extend_y = COM_MB_CLIP)
+ {
+ bool clip_x = (extend_x == COM_MB_CLIP && (x < m_rect.xmin || x >= m_rect.xmax));
+ bool clip_y = (extend_y == COM_MB_CLIP && (y < m_rect.ymin || y >= m_rect.ymax));
+ if (clip_x || clip_y) {
+ /* clip result outside rect is zero */
zero_v4(result);
}
+ else {
+ wrap_pixel(x, y, extend_x, extend_y);
+ const int offset = (this->m_chunkWidth * y + x) * COM_NUMBER_OF_CHANNELS;
+ copy_v4_v4(result, &this->m_buffer[offset]);
+ }
}
- inline void readNoCheck(float result[4], int x, int y)
+ inline void readNoCheck(float result[4], int x, int y,
+ MemoryBufferExtend extend_x = COM_MB_CLIP,
+ MemoryBufferExtend extend_y = COM_MB_CLIP)
{
- const int dx = x - this->m_rect.xmin;
- const int dy = y - this->m_rect.ymin;
- const int offset = (this->m_chunkWidth * dy + dx) * COM_NUMBER_OF_CHANNELS;
+ wrap_pixel(x, y, extend_x, extend_y);
+ const int offset = (this->m_chunkWidth * y + x) * COM_NUMBER_OF_CHANNELS;
BLI_assert(offset >= 0);
BLI_assert(offset < this->determineBufferSize() * COM_NUMBER_OF_CHANNELS);
- BLI_assert(x >= this->m_rect.xmin && x < this->m_rect.xmax &&
- y >= this->m_rect.ymin && y < this->m_rect.ymax);
+ BLI_assert(!(extend_x == COM_MB_CLIP && (x < m_rect.xmin || x >= m_rect.xmax)) &&
+ !(extend_y == COM_MB_CLIP && (y < m_rect.ymin || y >= m_rect.ymax)));
#if 0
/* always true */
@@ -162,12 +203,16 @@ public:
void writePixel(int x, int y, const float color[4]);
void addPixel(int x, int y, const float color[4]);
- inline void readCubic(float result[4], float x, float y)
+ inline void readBilinear(float result[4], float x, float y,
+ MemoryBufferExtend extend_x = COM_MB_CLIP,
+ MemoryBufferExtend extend_y = COM_MB_CLIP)
{
int x1 = floor(x);
- int x2 = x1 + 1;
int y1 = floor(y);
+ int x2 = x1 + 1;
int y2 = y1 + 1;
+ wrap_pixel(x1, y1, extend_x, extend_y);
+ wrap_pixel(x2, y2, extend_x, extend_y);
float valuex = x - x1;
float valuey = y - y1;
@@ -199,8 +244,6 @@ public:
result[2] = color1[2] * mvaluex + color3[2] * valuex;
result[3] = color1[3] * mvaluex + color3[3] * valuex;
}
-
-
void readEWA(float result[4], float fx, float fy, float dx, float dy, PixelSampler sampler);
diff --git a/source/blender/compositor/intern/COM_NodeBase.h b/source/blender/compositor/intern/COM_NodeBase.h
index 41b6ab70bf9..e2072575509 100644
--- a/source/blender/compositor/intern/COM_NodeBase.h
+++ b/source/blender/compositor/intern/COM_NodeBase.h
@@ -153,9 +153,9 @@ public:
*/
InputSocket *getInputSocket(const unsigned int index);
-
virtual bool isStatic() const { return false; }
void getStaticValues(float *result) const { }
+
protected:
NodeBase();
diff --git a/source/blender/compositor/intern/COM_NodeOperation.h b/source/blender/compositor/intern/COM_NodeOperation.h
index 114a00b9e8d..160e493073e 100644
--- a/source/blender/compositor/intern/COM_NodeOperation.h
+++ b/source/blender/compositor/intern/COM_NodeOperation.h
@@ -199,7 +199,8 @@ public:
* Mostly Filter types (Blurs, Convolution, Defocus etc) need this to be set to true.
*/
const bool isComplex() const { return this->m_complex; }
- virtual const bool isSetOperation() const { return false; }
+
+ virtual bool isSetOperation() const { return false; }
/**
* @brief is this operation of type ReadBufferOperation
diff --git a/source/blender/compositor/intern/COM_WorkScheduler.cpp b/source/blender/compositor/intern/COM_WorkScheduler.cpp
index 1bac06fc4ab..330e61e7fea 100644
--- a/source/blender/compositor/intern/COM_WorkScheduler.cpp
+++ b/source/blender/compositor/intern/COM_WorkScheduler.cpp
@@ -313,7 +313,8 @@ void WorkScheduler::initialize(bool use_opencl)
cl_uint numberOfPlatforms = 0;
cl_int error;
error = clGetPlatformIDs(0, 0, &numberOfPlatforms);
- if (error != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error)); }
+ if (error == -1001) { } /* GPU not supported */
+ else if (error != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error)); }
if (G.f & G_DEBUG) printf("%d number of platforms\n", numberOfPlatforms);
cl_platform_id *platforms = (cl_platform_id *)MEM_mallocN(sizeof(cl_platform_id) * numberOfPlatforms, __func__);
error = clGetPlatformIDs(numberOfPlatforms, platforms, 0);
diff --git a/source/blender/compositor/nodes/COM_AlphaOverNode.cpp b/source/blender/compositor/nodes/COM_AlphaOverNode.cpp
index 4f3ed36aadb..bf081cae097 100644
--- a/source/blender/compositor/nodes/COM_AlphaOverNode.cpp
+++ b/source/blender/compositor/nodes/COM_AlphaOverNode.cpp
@@ -22,7 +22,7 @@
#include "COM_AlphaOverNode.h"
-#include "COM_MixBaseOperation.h"
+#include "COM_MixOperation.h"
#include "COM_AlphaOverKeyOperation.h"
#include "COM_AlphaOverMixedOperation.h"
#include "COM_AlphaOverPremultiplyOperation.h"
diff --git a/source/blender/compositor/nodes/COM_BlurNode.cpp b/source/blender/compositor/nodes/COM_BlurNode.cpp
index b59a92710bc..a8de2aed526 100644
--- a/source/blender/compositor/nodes/COM_BlurNode.cpp
+++ b/source/blender/compositor/nodes/COM_BlurNode.cpp
@@ -53,6 +53,7 @@ void BlurNode::convertToOperations(ExecutionSystem *graph, CompositorContext *co
if (data->filtertype == R_FILTER_FAST_GAUSS) {
FastGaussianBlurOperation *operationfgb = new FastGaussianBlurOperation();
operationfgb->setData(data);
+ operationfgb->setChunksize(context->getChunksize());
operationfgb->setbNode(editorNode);
this->getInputSocket(1)->relinkConnections(operationfgb->getInputSocket(1), 1, graph);
graph->addOperation(operationfgb);
diff --git a/source/blender/compositor/nodes/COM_ChannelMatteNode.cpp b/source/blender/compositor/nodes/COM_ChannelMatteNode.cpp
index c1511ee611b..4c136583936 100644
--- a/source/blender/compositor/nodes/COM_ChannelMatteNode.cpp
+++ b/source/blender/compositor/nodes/COM_ChannelMatteNode.cpp
@@ -22,9 +22,7 @@
#include "COM_ChannelMatteNode.h"
#include "BKE_node.h"
#include "COM_ChannelMatteOperation.h"
-#include "COM_ConvertRGBToHSVOperation.h"
-#include "COM_ConvertRGBToYCCOperation.h"
-#include "COM_ConvertRGBToYUVOperation.h"
+#include "COM_ConvertOperation.h"
#include "COM_SetAlphaOperation.h"
ChannelMatteNode::ChannelMatteNode(bNode *editorNode) : Node(editorNode)
diff --git a/source/blender/compositor/nodes/COM_ChromaMatteNode.cpp b/source/blender/compositor/nodes/COM_ChromaMatteNode.cpp
index d2598e661a9..c23f242ca5c 100644
--- a/source/blender/compositor/nodes/COM_ChromaMatteNode.cpp
+++ b/source/blender/compositor/nodes/COM_ChromaMatteNode.cpp
@@ -22,7 +22,7 @@
#include "COM_ChromaMatteNode.h"
#include "BKE_node.h"
#include "COM_ChromaMatteOperation.h"
-#include "COM_ConvertRGBToYCCOperation.h"
+#include "COM_ConvertOperation.h"
#include "COM_SetAlphaOperation.h"
ChromaMatteNode::ChromaMatteNode(bNode *editorNode) : Node(editorNode)
diff --git a/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp b/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp
index aeed859b350..5578fdae54e 100644
--- a/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp
+++ b/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp
@@ -25,7 +25,7 @@
#include "COM_ColorBalanceASCCDLOperation.h"
#include "COM_ExecutionSystem.h"
#include "BKE_node.h"
-#include "COM_MixBlendOperation.h"
+#include "COM_MixOperation.h"
ColorBalanceNode::ColorBalanceNode(bNode *editorNode) : Node(editorNode)
{
diff --git a/source/blender/compositor/nodes/COM_ColorMatteNode.cpp b/source/blender/compositor/nodes/COM_ColorMatteNode.cpp
index 54e6762961b..8ab93a58a1d 100644
--- a/source/blender/compositor/nodes/COM_ColorMatteNode.cpp
+++ b/source/blender/compositor/nodes/COM_ColorMatteNode.cpp
@@ -22,7 +22,7 @@
#include "COM_ColorMatteNode.h"
#include "BKE_node.h"
#include "COM_ColorMatteOperation.h"
-#include "COM_ConvertRGBToHSVOperation.h"
+#include "COM_ConvertOperation.h"
#include "COM_SetAlphaOperation.h"
ColorMatteNode::ColorMatteNode(bNode *editorNode) : Node(editorNode)
diff --git a/source/blender/compositor/nodes/COM_ColorRampNode.cpp b/source/blender/compositor/nodes/COM_ColorRampNode.cpp
index a79c7885ae4..6f715a8f278 100644
--- a/source/blender/compositor/nodes/COM_ColorRampNode.cpp
+++ b/source/blender/compositor/nodes/COM_ColorRampNode.cpp
@@ -24,7 +24,7 @@
#include "COM_ExecutionSystem.h"
#include "BKE_node.h"
#include "COM_ColorRampOperation.h"
-#include "COM_SeparateChannelOperation.h"
+#include "COM_ConvertOperation.h"
#include "DNA_texture_types.h"
ColorRampNode::ColorRampNode(bNode *editorNode) : Node(editorNode)
diff --git a/source/blender/compositor/nodes/COM_ColorToBWNode.cpp b/source/blender/compositor/nodes/COM_ColorToBWNode.cpp
index 511fdf09f41..07be93dab86 100644
--- a/source/blender/compositor/nodes/COM_ColorToBWNode.cpp
+++ b/source/blender/compositor/nodes/COM_ColorToBWNode.cpp
@@ -22,7 +22,7 @@
#include "COM_ColorToBWNode.h"
-#include "COM_ConvertColorToBWOperation.h"
+#include "COM_ConvertOperation.h"
#include "COM_ExecutionSystem.h"
ColorToBWNode::ColorToBWNode(bNode *editorNode) : Node(editorNode)
diff --git a/source/blender/compositor/nodes/COM_CombineHSVANode.cpp b/source/blender/compositor/nodes/COM_CombineHSVANode.cpp
index beba41fade9..9f6614ed8c3 100644
--- a/source/blender/compositor/nodes/COM_CombineHSVANode.cpp
+++ b/source/blender/compositor/nodes/COM_CombineHSVANode.cpp
@@ -22,11 +22,11 @@
#include "COM_CombineHSVANode.h"
-#include "COM_CombineChannelsOperation.h"
+#include "COM_ConvertOperation.h"
#include "COM_ExecutionSystem.h"
#include "COM_SetValueOperation.h"
-#include "COM_ConvertHSVToRGBOperation.h"
+#include "COM_ConvertOperation.h"
CombineHSVANode::CombineHSVANode(bNode *editorNode) : CombineRGBANode(editorNode)
{
diff --git a/source/blender/compositor/nodes/COM_CombineRGBANode.cpp b/source/blender/compositor/nodes/COM_CombineRGBANode.cpp
index a8cdd8c2950..8dfded049e5 100644
--- a/source/blender/compositor/nodes/COM_CombineRGBANode.cpp
+++ b/source/blender/compositor/nodes/COM_CombineRGBANode.cpp
@@ -22,7 +22,7 @@
#include "COM_CombineRGBANode.h"
-#include "COM_CombineChannelsOperation.h"
+#include "COM_ConvertOperation.h"
#include "COM_ExecutionSystem.h"
#include "COM_SetValueOperation.h"
diff --git a/source/blender/compositor/nodes/COM_CombineYCCANode.cpp b/source/blender/compositor/nodes/COM_CombineYCCANode.cpp
index 5319eb84184..ee787a4f9c1 100644
--- a/source/blender/compositor/nodes/COM_CombineYCCANode.cpp
+++ b/source/blender/compositor/nodes/COM_CombineYCCANode.cpp
@@ -20,7 +20,7 @@
*/
#include "COM_CombineYCCANode.h"
-#include "COM_ConvertYCCToRGBOperation.h"
+#include "COM_ConvertOperation.h"
CombineYCCANode::CombineYCCANode(bNode *editorNode) : CombineRGBANode(editorNode)
{
diff --git a/source/blender/compositor/nodes/COM_CombineYUVANode.cpp b/source/blender/compositor/nodes/COM_CombineYUVANode.cpp
index 48c2c6ca649..feee443cf05 100644
--- a/source/blender/compositor/nodes/COM_CombineYUVANode.cpp
+++ b/source/blender/compositor/nodes/COM_CombineYUVANode.cpp
@@ -20,7 +20,7 @@
*/
#include "COM_CombineYUVANode.h"
-#include "COM_ConvertYUVToRGBOperation.h"
+#include "COM_ConvertOperation.h"
CombineYUVANode::CombineYUVANode(bNode *editorNode) : CombineRGBANode(editorNode)
{
diff --git a/source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp b/source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp
index a7149cc63b2..72f3ed07fd5 100644
--- a/source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp
+++ b/source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp
@@ -20,8 +20,7 @@
*/
#include "COM_ConvertAlphaNode.h"
-#include "COM_ConvertPremulToStraightOperation.h"
-#include "COM_ConvertStraightToPremulOperation.h"
+#include "COM_ConvertOperation.h"
#include "COM_ExecutionSystem.h"
void ConvertAlphaNode::convertToOperations(ExecutionSystem *graph, CompositorContext *context)
diff --git a/source/blender/compositor/nodes/COM_DistanceMatteNode.cpp b/source/blender/compositor/nodes/COM_DistanceMatteNode.cpp
index 782c897f6fb..3c532fe0b1d 100644
--- a/source/blender/compositor/nodes/COM_DistanceMatteNode.cpp
+++ b/source/blender/compositor/nodes/COM_DistanceMatteNode.cpp
@@ -24,7 +24,7 @@
#include "COM_DistanceRGBMatteOperation.h"
#include "COM_DistanceYCCMatteOperation.h"
#include "COM_SetAlphaOperation.h"
-#include "COM_ConvertRGBToYCCOperation.h"
+#include "COM_ConvertOperation.h"
DistanceMatteNode::DistanceMatteNode(bNode *editorNode) : Node(editorNode)
{
diff --git a/source/blender/compositor/nodes/COM_FilterNode.cpp b/source/blender/compositor/nodes/COM_FilterNode.cpp
index 990cdb480ca..3b75e3e0a1a 100644
--- a/source/blender/compositor/nodes/COM_FilterNode.cpp
+++ b/source/blender/compositor/nodes/COM_FilterNode.cpp
@@ -25,7 +25,7 @@
#include "COM_ConvolutionEdgeFilterOperation.h"
#include "COM_ExecutionSystem.h"
#include "BKE_node.h"
-#include "COM_MixBlendOperation.h"
+#include "COM_MixOperation.h"
FilterNode::FilterNode(bNode *editorNode) : Node(editorNode)
{
diff --git a/source/blender/compositor/nodes/COM_GlareNode.cpp b/source/blender/compositor/nodes/COM_GlareNode.cpp
index 8782e6bb6d9..a6a83846623 100644
--- a/source/blender/compositor/nodes/COM_GlareNode.cpp
+++ b/source/blender/compositor/nodes/COM_GlareNode.cpp
@@ -26,7 +26,7 @@
#include "COM_GlareSimpleStarOperation.h"
#include "COM_GlareStreaksOperation.h"
#include "COM_SetValueOperation.h"
-#include "COM_MixGlareOperation.h"
+#include "COM_MixOperation.h"
#include "COM_FastGaussianBlurOperation.h"
#include "COM_GlareGhostOperation.h"
#include "COM_GlareFogGlowOperation.h"
diff --git a/source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.cpp b/source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.cpp
index fd961030ebf..66b98b29d5e 100644
--- a/source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.cpp
+++ b/source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.cpp
@@ -22,11 +22,9 @@
#include "COM_HueSaturationValueCorrectNode.h"
-#include "COM_ConvertColorToValueProg.h"
+#include "COM_ConvertOperation.h"
#include "COM_ExecutionSystem.h"
-#include "COM_ConvertRGBToHSVOperation.h"
-#include "COM_ConvertHSVToRGBOperation.h"
-#include "COM_MixBlendOperation.h"
+#include "COM_MixOperation.h"
#include "COM_SetColorOperation.h"
#include "COM_SetValueOperation.h"
#include "COM_ChangeHSVOperation.h"
diff --git a/source/blender/compositor/nodes/COM_HueSaturationValueNode.cpp b/source/blender/compositor/nodes/COM_HueSaturationValueNode.cpp
index 29e10db0758..5001433513c 100644
--- a/source/blender/compositor/nodes/COM_HueSaturationValueNode.cpp
+++ b/source/blender/compositor/nodes/COM_HueSaturationValueNode.cpp
@@ -22,11 +22,9 @@
#include "COM_HueSaturationValueNode.h"
-#include "COM_ConvertColorToValueProg.h"
+#include "COM_ConvertOperation.h"
#include "COM_ExecutionSystem.h"
-#include "COM_ConvertRGBToHSVOperation.h"
-#include "COM_ConvertHSVToRGBOperation.h"
-#include "COM_MixBlendOperation.h"
+#include "COM_MixOperation.h"
#include "COM_SetColorOperation.h"
#include "COM_SetValueOperation.h"
#include "COM_ChangeHSVOperation.h"
diff --git a/source/blender/compositor/nodes/COM_ImageNode.cpp b/source/blender/compositor/nodes/COM_ImageNode.cpp
index b8d9841c92a..6e4bff460d1 100644
--- a/source/blender/compositor/nodes/COM_ImageNode.cpp
+++ b/source/blender/compositor/nodes/COM_ImageNode.cpp
@@ -25,7 +25,7 @@
#include "COM_ExecutionSystem.h"
#include "COM_ImageOperation.h"
#include "COM_MultilayerImageOperation.h"
-#include "COM_ConvertPremulToStraightOperation.h"
+#include "COM_ConvertOperation.h"
#include "BKE_node.h"
#include "BLI_utildefines.h"
@@ -38,19 +38,19 @@ ImageNode::ImageNode(bNode *editorNode) : Node(editorNode)
/* pass */
}
-NodeOperation *ImageNode::doMultilayerCheck(ExecutionSystem *system, RenderLayer *rl, Image *image, ImageUser *user, int framenumber, int outputsocketIndex, int pass, DataType datatype)
+NodeOperation *ImageNode::doMultilayerCheck(ExecutionSystem *system, RenderLayer *rl, Image *image, ImageUser *user, int framenumber, int outputsocketIndex, int passindex, DataType datatype)
{
OutputSocket *outputSocket = this->getOutputSocket(outputsocketIndex);
MultilayerBaseOperation *operation = NULL;
switch (datatype) {
case COM_DT_VALUE:
- operation = new MultilayerValueOperation(pass);
+ operation = new MultilayerValueOperation(passindex);
break;
case COM_DT_VECTOR:
- operation = new MultilayerVectorOperation(pass);
+ operation = new MultilayerVectorOperation(passindex);
break;
case COM_DT_COLOR:
- operation = new MultilayerColorOperation(pass);
+ operation = new MultilayerColorOperation(passindex);
break;
default:
break;
@@ -93,10 +93,19 @@ void ImageNode::convertToOperations(ExecutionSystem *graph, CompositorContext *c
socket = this->getOutputSocket(index);
if (socket->isConnected() || index == 0) {
bNodeSocket *bnodeSocket = socket->getbNodeSocket();
- NodeImageLayer *storage = (NodeImageLayer *)bnodeSocket->storage;
- int passindex = storage->pass_index;
-
+ /* Passes in the file can differ from passes stored in sockets (#36755).
+ * Look up the correct file pass using the socket identifier instead.
+ */
+ #if 0
+ NodeImageLayer *storage = (NodeImageLayer *)bnodeSocket->storage;*/
+ int passindex = storage->pass_index;*/
RenderPass *rpass = (RenderPass *)BLI_findlink(&rl->passes, passindex);
+ #endif
+ int passindex;
+ RenderPass *rpass;
+ for (rpass = (RenderPass *)rl->passes.first, passindex = 0; rpass; rpass = rpass->next, ++passindex)
+ if (STREQ(rpass->name, bnodeSocket->identifier))
+ break;
if (rpass) {
imageuser->pass = passindex;
switch (rpass->channels) {
diff --git a/source/blender/compositor/nodes/COM_ImageNode.h b/source/blender/compositor/nodes/COM_ImageNode.h
index 49006efbed5..12b4da6c8b3 100644
--- a/source/blender/compositor/nodes/COM_ImageNode.h
+++ b/source/blender/compositor/nodes/COM_ImageNode.h
@@ -35,7 +35,7 @@ extern "C" {
*/
class ImageNode : public Node {
private:
- NodeOperation *doMultilayerCheck(ExecutionSystem *system, RenderLayer *rl, Image *image, ImageUser *user, int framenumber, int outputsocketIndex, int pass, DataType datatype);
+ NodeOperation *doMultilayerCheck(ExecutionSystem *system, RenderLayer *rl, Image *image, ImageUser *user, int framenumber, int outputsocketIndex, int passindex, DataType datatype);
public:
ImageNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
diff --git a/source/blender/compositor/nodes/COM_KeyingNode.cpp b/source/blender/compositor/nodes/COM_KeyingNode.cpp
index 51ea2913e65..786530bd3c4 100644
--- a/source/blender/compositor/nodes/COM_KeyingNode.cpp
+++ b/source/blender/compositor/nodes/COM_KeyingNode.cpp
@@ -32,10 +32,7 @@
#include "COM_MathBaseOperation.h"
-#include "COM_SeparateChannelOperation.h"
-#include "COM_CombineChannelsOperation.h"
-#include "COM_ConvertRGBToYCCOperation.h"
-#include "COM_ConvertYCCToRGBOperation.h"
+#include "COM_ConvertOperation.h"
#include "COM_SetValueOperation.h"
#include "COM_DilateErodeOperation.h"
diff --git a/source/blender/compositor/nodes/COM_LuminanceMatteNode.cpp b/source/blender/compositor/nodes/COM_LuminanceMatteNode.cpp
index 4656e00b006..b1e6967ba42 100644
--- a/source/blender/compositor/nodes/COM_LuminanceMatteNode.cpp
+++ b/source/blender/compositor/nodes/COM_LuminanceMatteNode.cpp
@@ -22,7 +22,7 @@
#include "COM_LuminanceMatteNode.h"
#include "BKE_node.h"
#include "COM_LuminanceMatteOperation.h"
-#include "COM_ConvertRGBToYUVOperation.h"
+#include "COM_ConvertOperation.h"
#include "COM_SetAlphaOperation.h"
LuminanceMatteNode::LuminanceMatteNode(bNode *editorNode) : Node(editorNode)
diff --git a/source/blender/compositor/nodes/COM_MixNode.cpp b/source/blender/compositor/nodes/COM_MixNode.cpp
index ab4e464327d..42217243fdf 100644
--- a/source/blender/compositor/nodes/COM_MixNode.cpp
+++ b/source/blender/compositor/nodes/COM_MixNode.cpp
@@ -22,24 +22,7 @@
#include "COM_MixNode.h"
-#include "COM_MixBlendOperation.h"
-#include "COM_MixAddOperation.h"
-#include "COM_MixMultiplyOperation.h"
-#include "COM_MixBurnOperation.h"
-#include "COM_MixColorOperation.h"
-#include "COM_MixDarkenOperation.h"
-#include "COM_MixDifferenceOperation.h"
-#include "COM_MixDivideOperation.h"
-#include "COM_MixHueOperation.h"
-#include "COM_MixLightenOperation.h"
-#include "COM_MixLinearLightOperation.h"
-#include "COM_MixOverlayOperation.h"
-#include "COM_MixSaturationOperation.h"
-#include "COM_MixScreenOperation.h"
-#include "COM_MixSoftLightOperation.h"
-#include "COM_MixSubtractOperation.h"
-#include "COM_MixValueOperation.h"
-#include "COM_MixDodgeOperation.h"
+#include "COM_MixOperation.h"
#include "COM_ExecutionSystem.h"
#include "COM_SetValueOperation.h"
diff --git a/source/blender/compositor/nodes/COM_OutputFileNode.cpp b/source/blender/compositor/nodes/COM_OutputFileNode.cpp
index 3b1871b307b..94e5efe77e0 100644
--- a/source/blender/compositor/nodes/COM_OutputFileNode.cpp
+++ b/source/blender/compositor/nodes/COM_OutputFileNode.cpp
@@ -59,12 +59,12 @@ void OutputFileNode::convertToOperations(ExecutionSystem *graph, CompositorConte
bool hasConnections = false;
for (int i = 0; i < num_inputs; ++i) {
InputSocket *input = getInputSocket(i);
+ NodeImageMultiFileSocket *sockdata = (NodeImageMultiFileSocket *)input->getbNodeSocket()->storage;
+
+ outputOperation->add_layer(sockdata->layer, input->getDataType());
+
if (input->isConnected()) {
hasConnections = true;
- NodeImageMultiFileSocket *sockdata = (NodeImageMultiFileSocket *)input->getbNodeSocket()->storage;
-
- outputOperation->add_layer(sockdata->layer, input->getDataType());
-
input->relinkConnections(outputOperation->getInputSocket(i));
}
}
diff --git a/source/blender/compositor/nodes/COM_RenderLayersNode.cpp b/source/blender/compositor/nodes/COM_RenderLayersNode.cpp
index 74e557c77ce..512f8eec90f 100644
--- a/source/blender/compositor/nodes/COM_RenderLayersNode.cpp
+++ b/source/blender/compositor/nodes/COM_RenderLayersNode.cpp
@@ -22,26 +22,7 @@
#include "COM_RenderLayersNode.h"
#include "COM_ExecutionSystem.h"
-#include "COM_RenderLayersImageProg.h"
-#include "COM_RenderLayersAlphaProg.h"
-#include "COM_RenderLayersDepthProg.h"
-#include "COM_RenderLayersNormalOperation.h"
-#include "COM_RenderLayersSpeedOperation.h"
-#include "COM_RenderLayersColorOperation.h"
-#include "COM_RenderLayersUVOperation.h"
-#include "COM_RenderLayersMistOperation.h"
-#include "COM_RenderLayersObjectIndexOperation.h"
-#include "COM_RenderLayersDiffuseOperation.h"
-#include "COM_RenderLayersSpecularOperation.h"
-#include "COM_RenderLayersShadowOperation.h"
-#include "COM_RenderLayersAOOperation.h"
-#include "COM_RenderLayersEmitOperation.h"
-#include "COM_RenderLayersReflectionOperation.h"
-#include "COM_RenderLayersRefractionOperation.h"
-#include "COM_RenderLayersEnvironmentOperation.h"
-#include "COM_RenderLayersIndirectOperation.h"
-#include "COM_RenderLayersMaterialIndexOperation.h"
-#include "COM_RenderLayersCyclesOperation.h"
+#include "COM_RenderLayersProg.h"
#include "COM_TranslateOperation.h"
#include "COM_RotateOperation.h"
#include "COM_ScaleOperation.h"
diff --git a/source/blender/compositor/nodes/COM_RenderLayersNode.h b/source/blender/compositor/nodes/COM_RenderLayersNode.h
index 9bd74624b0c..0c769d32aea 100644
--- a/source/blender/compositor/nodes/COM_RenderLayersNode.h
+++ b/source/blender/compositor/nodes/COM_RenderLayersNode.h
@@ -22,7 +22,7 @@
#include "COM_Node.h"
#include "DNA_node_types.h"
-#include "COM_RenderLayersBaseProg.h"
+#include "COM_RenderLayersProg.h"
/**
* @brief RenderLayersNode
diff --git a/source/blender/compositor/nodes/COM_SeparateHSVANode.cpp b/source/blender/compositor/nodes/COM_SeparateHSVANode.cpp
index 4f93b226fa1..4cd77d4bae6 100644
--- a/source/blender/compositor/nodes/COM_SeparateHSVANode.cpp
+++ b/source/blender/compositor/nodes/COM_SeparateHSVANode.cpp
@@ -22,10 +22,9 @@
#include "COM_SeparateHSVANode.h"
-#include "COM_SeparateChannelOperation.h"
#include "COM_ExecutionSystem.h"
#include "COM_SetValueOperation.h"
-#include "COM_ConvertRGBToHSVOperation.h"
+#include "COM_ConvertOperation.h"
SeparateHSVANode::SeparateHSVANode(bNode *editorNode) : SeparateRGBANode(editorNode)
{
diff --git a/source/blender/compositor/nodes/COM_SeparateRGBANode.cpp b/source/blender/compositor/nodes/COM_SeparateRGBANode.cpp
index 7fcdebadb46..7d9bff30a93 100644
--- a/source/blender/compositor/nodes/COM_SeparateRGBANode.cpp
+++ b/source/blender/compositor/nodes/COM_SeparateRGBANode.cpp
@@ -22,7 +22,7 @@
#include "COM_SeparateRGBANode.h"
-#include "COM_SeparateChannelOperation.h"
+#include "COM_ConvertOperation.h"
#include "COM_ExecutionSystem.h"
#include "COM_SetValueOperation.h"
#include "DNA_material_types.h" // the ramp types
diff --git a/source/blender/compositor/nodes/COM_SeparateYCCANode.cpp b/source/blender/compositor/nodes/COM_SeparateYCCANode.cpp
index 154e2bcd550..797cd49316a 100644
--- a/source/blender/compositor/nodes/COM_SeparateYCCANode.cpp
+++ b/source/blender/compositor/nodes/COM_SeparateYCCANode.cpp
@@ -20,10 +20,9 @@
*/
#include "COM_SeparateYCCANode.h"
-#include "COM_SeparateChannelOperation.h"
#include "COM_ExecutionSystem.h"
#include "COM_SetValueOperation.h"
-#include "COM_ConvertRGBToYCCOperation.h"
+#include "COM_ConvertOperation.h"
SeparateYCCANode::SeparateYCCANode(bNode *editorNode) : SeparateRGBANode(editorNode)
{
diff --git a/source/blender/compositor/nodes/COM_SeparateYUVANode.cpp b/source/blender/compositor/nodes/COM_SeparateYUVANode.cpp
index 8a647b7f849..9a6ec20fa80 100644
--- a/source/blender/compositor/nodes/COM_SeparateYUVANode.cpp
+++ b/source/blender/compositor/nodes/COM_SeparateYUVANode.cpp
@@ -20,10 +20,9 @@
*/
#include "COM_SeparateYUVANode.h"
-#include "COM_SeparateChannelOperation.h"
#include "COM_ExecutionSystem.h"
#include "COM_SetValueOperation.h"
-#include "COM_ConvertRGBToYUVOperation.h"
+#include "COM_ConvertOperation.h"
SeparateYUVANode::SeparateYUVANode(bNode *editorNode) : SeparateRGBANode(editorNode)
{
diff --git a/source/blender/compositor/nodes/COM_SplitViewerNode.cpp b/source/blender/compositor/nodes/COM_SplitViewerNode.cpp
index 81c0744564f..6fb8467674b 100644
--- a/source/blender/compositor/nodes/COM_SplitViewerNode.cpp
+++ b/source/blender/compositor/nodes/COM_SplitViewerNode.cpp
@@ -35,9 +35,8 @@ SplitViewerNode::SplitViewerNode(bNode *editorNode) : Node(editorNode)
void SplitViewerNode::convertToOperations(ExecutionSystem *graph, CompositorContext *context)
{
bNode *editorNode = this->getbNode();
- bool is_active = ((editorNode->flag & NODE_DO_OUTPUT_RECALC) &&
- (editorNode->flag & NODE_DO_OUTPUT) && this->isInActiveGroup()) ||
- context->isRendering();
+ bool is_active = ((editorNode->flag & NODE_DO_OUTPUT_RECALC || context->isRendering()) &&
+ (editorNode->flag & NODE_DO_OUTPUT) && this->isInActiveGroup());
InputSocket *image1Socket = this->getInputSocket(0);
InputSocket *image2Socket = this->getInputSocket(1);
diff --git a/source/blender/compositor/nodes/COM_TranslateNode.cpp b/source/blender/compositor/nodes/COM_TranslateNode.cpp
index 44d796c2911..d2cd009449c 100644
--- a/source/blender/compositor/nodes/COM_TranslateNode.cpp
+++ b/source/blender/compositor/nodes/COM_TranslateNode.cpp
@@ -24,6 +24,7 @@
#include "COM_TranslateOperation.h"
#include "COM_WrapOperation.h"
+#include "COM_WriteBufferOperation.h"
#include "COM_ExecutionSystem.h"
TranslateNode::TranslateNode(bNode *editorNode) : Node(editorNode)
@@ -43,10 +44,15 @@ void TranslateNode::convertToOperations(ExecutionSystem *graph, CompositorContex
NodeTranslateData *data = (NodeTranslateData *)bnode->storage;
if (data->wrap_axis) {
+ WriteBufferOperation *writeOperation = new WriteBufferOperation();
WrapOperation *wrapOperation = new WrapOperation();
+ wrapOperation->setMemoryProxy(writeOperation->getMemoryProxy());
wrapOperation->setWrapping(data->wrap_axis);
- inputSocket->relinkConnections(wrapOperation->getInputSocket(0), 0, graph);
+
+ inputSocket->relinkConnections(writeOperation->getInputSocket(0), 0, graph);
addLink(graph, wrapOperation->getOutputSocket(), operation->getInputSocket(0));
+
+ graph->addOperation(writeOperation);
graph->addOperation(wrapOperation);
}
else {
diff --git a/source/blender/compositor/nodes/COM_ZCombineNode.cpp b/source/blender/compositor/nodes/COM_ZCombineNode.cpp
index b48d974e893..b5fe4882f57 100644
--- a/source/blender/compositor/nodes/COM_ZCombineNode.cpp
+++ b/source/blender/compositor/nodes/COM_ZCombineNode.cpp
@@ -28,7 +28,7 @@
#include "COM_SetValueOperation.h"
#include "COM_MathBaseOperation.h"
#include "COM_AntiAliasOperation.h"
-#include "COM_MixBlendOperation.h"
+#include "COM_MixOperation.h"
#include "DNA_material_types.h" // the ramp types
diff --git a/source/blender/compositor/operations/COM_AlphaOverKeyOperation.h b/source/blender/compositor/operations/COM_AlphaOverKeyOperation.h
index fa884bacf49..31b0422918a 100644
--- a/source/blender/compositor/operations/COM_AlphaOverKeyOperation.h
+++ b/source/blender/compositor/operations/COM_AlphaOverKeyOperation.h
@@ -22,7 +22,7 @@
#ifndef _COM_AlphaOverKeyOperation_h
#define _COM_AlphaOverKeyOperation_h
-#include "COM_MixBaseOperation.h"
+#include "COM_MixOperation.h"
/**
diff --git a/source/blender/compositor/operations/COM_AlphaOverMixedOperation.h b/source/blender/compositor/operations/COM_AlphaOverMixedOperation.h
index 91128454783..14e7325ec1d 100644
--- a/source/blender/compositor/operations/COM_AlphaOverMixedOperation.h
+++ b/source/blender/compositor/operations/COM_AlphaOverMixedOperation.h
@@ -22,7 +22,7 @@
#ifndef _COM_AlphaOverMixedOperation_h_
#define _COM_AlphaOverMixedOperation_h_
-#include "COM_MixBaseOperation.h"
+#include "COM_MixOperation.h"
/**
diff --git a/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.h b/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.h
index d6e9e31c35f..16bd2aeaeed 100644
--- a/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.h
+++ b/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.h
@@ -22,7 +22,7 @@
#ifndef _COM_AlphaOverPremultiplyOperation_h
#define _COM_AlphaOverPremultiplyOperation_h
-#include "COM_MixBaseOperation.h"
+#include "COM_MixOperation.h"
/**
diff --git a/source/blender/compositor/operations/COM_ChangeHSVOperation.h b/source/blender/compositor/operations/COM_ChangeHSVOperation.h
index 57e5dc991e9..01852084e41 100644
--- a/source/blender/compositor/operations/COM_ChangeHSVOperation.h
+++ b/source/blender/compositor/operations/COM_ChangeHSVOperation.h
@@ -22,7 +22,7 @@
#ifndef _COM_ChangeHSVOperation_h
#define _COM_ChangeHSVOperation_h
-#include "COM_MixBaseOperation.h"
+#include "COM_MixOperation.h"
/**
diff --git a/source/blender/compositor/operations/COM_ChannelMatteOperation.h b/source/blender/compositor/operations/COM_ChannelMatteOperation.h
index 17f84965f63..efb4f7427ca 100644
--- a/source/blender/compositor/operations/COM_ChannelMatteOperation.h
+++ b/source/blender/compositor/operations/COM_ChannelMatteOperation.h
@@ -21,7 +21,7 @@
#ifndef _COM_ChannelMatteOperation_h
#define _COM_ChannelMatteOperation_h
-#include "COM_MixBaseOperation.h"
+#include "COM_MixOperation.h"
/**
diff --git a/source/blender/compositor/operations/COM_ChromaMatteOperation.h b/source/blender/compositor/operations/COM_ChromaMatteOperation.h
index adebb7a30c2..9557faec855 100644
--- a/source/blender/compositor/operations/COM_ChromaMatteOperation.h
+++ b/source/blender/compositor/operations/COM_ChromaMatteOperation.h
@@ -21,7 +21,7 @@
#ifndef _COM_ChromaMatteOperation_h
#define _COM_ChromaMatteOperation_h
-#include "COM_MixBaseOperation.h"
+#include "COM_MixOperation.h"
/**
diff --git a/source/blender/compositor/operations/COM_ColorMatteOperation.h b/source/blender/compositor/operations/COM_ColorMatteOperation.h
index 582a94e1873..f065a5f7e89 100644
--- a/source/blender/compositor/operations/COM_ColorMatteOperation.h
+++ b/source/blender/compositor/operations/COM_ColorMatteOperation.h
@@ -21,7 +21,7 @@
#ifndef _COM_ColorMatteOperation_h
#define _COM_ColorMatteOperation_h
-#include "COM_MixBaseOperation.h"
+#include "COM_MixOperation.h"
/**
diff --git a/source/blender/compositor/operations/COM_CombineChannelsOperation.cpp b/source/blender/compositor/operations/COM_CombineChannelsOperation.cpp
deleted file mode 100644
index 3ced0548bb8..00000000000
--- a/source/blender/compositor/operations/COM_CombineChannelsOperation.cpp
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_CombineChannelsOperation.h"
-#include "BLI_utildefines.h"
-
-CombineChannelsOperation::CombineChannelsOperation() : NodeOperation()
-{
- this->addInputSocket(COM_DT_VALUE);
- this->addInputSocket(COM_DT_VALUE);
- this->addInputSocket(COM_DT_VALUE);
- this->addInputSocket(COM_DT_VALUE);
- this->addOutputSocket(COM_DT_COLOR);
- this->setResolutionInputSocketIndex(0);
- this->m_inputChannel1Operation = NULL;
- this->m_inputChannel2Operation = NULL;
- this->m_inputChannel3Operation = NULL;
- this->m_inputChannel4Operation = NULL;
-}
-
-void CombineChannelsOperation::initExecution()
-{
- this->m_inputChannel1Operation = this->getInputSocketReader(0);
- this->m_inputChannel2Operation = this->getInputSocketReader(1);
- this->m_inputChannel3Operation = this->getInputSocketReader(2);
- this->m_inputChannel4Operation = this->getInputSocketReader(3);
-}
-
-void CombineChannelsOperation::deinitExecution()
-{
- this->m_inputChannel1Operation = NULL;
- this->m_inputChannel2Operation = NULL;
- this->m_inputChannel3Operation = NULL;
- this->m_inputChannel4Operation = NULL;
-}
-
-
-void CombineChannelsOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float input[4];
- if (this->m_inputChannel1Operation) {
- this->m_inputChannel1Operation->read(input, x, y, sampler);
- output[0] = input[0];
- }
- if (this->m_inputChannel2Operation) {
- this->m_inputChannel2Operation->read(input, x, y, sampler);
- output[1] = input[0];
- }
- if (this->m_inputChannel3Operation) {
- this->m_inputChannel3Operation->read(input, x, y, sampler);
- output[2] = input[0];
- }
- if (this->m_inputChannel4Operation) {
- this->m_inputChannel4Operation->read(input, x, y, sampler);
- output[3] = input[0];
- }
-}
diff --git a/source/blender/compositor/operations/COM_CombineChannelsOperation.h b/source/blender/compositor/operations/COM_CombineChannelsOperation.h
deleted file mode 100644
index 7c8742b1557..00000000000
--- a/source/blender/compositor/operations/COM_CombineChannelsOperation.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_CombineChannelsOperation_h_
-#define _COM_CombineChannelsOperation_h_
-
-#include "COM_NodeOperation.h"
-
-class CombineChannelsOperation : public NodeOperation {
-private:
- SocketReader *m_inputChannel1Operation;
- SocketReader *m_inputChannel2Operation;
- SocketReader *m_inputChannel3Operation;
- SocketReader *m_inputChannel4Operation;
-public:
- CombineChannelsOperation();
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
- void initExecution();
- void deinitExecution();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_ConvertColorToBWOperation.cpp b/source/blender/compositor/operations/COM_ConvertColorToBWOperation.cpp
deleted file mode 100644
index 3b5aa8cd755..00000000000
--- a/source/blender/compositor/operations/COM_ConvertColorToBWOperation.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_ConvertColorToBWOperation.h"
-
-ConvertColorToBWOperation::ConvertColorToBWOperation() : NodeOperation()
-{
- this->addInputSocket(COM_DT_COLOR);
- this->addOutputSocket(COM_DT_VALUE);
- this->m_inputOperation = NULL;
-}
-
-void ConvertColorToBWOperation::initExecution()
-{
- this->m_inputOperation = this->getInputSocketReader(0);
-}
-
-void ConvertColorToBWOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor[4];
- this->m_inputOperation->read(inputColor, x, y, sampler);
- output[0] = rgb_to_bw(inputColor);
-}
-
-void ConvertColorToBWOperation::deinitExecution()
-{
- this->m_inputOperation = NULL;
-}
diff --git a/source/blender/compositor/operations/COM_ConvertColorToBWOperation.h b/source/blender/compositor/operations/COM_ConvertColorToBWOperation.h
deleted file mode 100644
index 963bd32a2f6..00000000000
--- a/source/blender/compositor/operations/COM_ConvertColorToBWOperation.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_ConvertColorToBWOperation_h
-#define _COM_ConvertColorToBWOperation_h
-#include "COM_NodeOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class ConvertColorToBWOperation : public NodeOperation {
-private:
- /**
- * Cached reference to the inputProgram
- */
- SocketReader *m_inputOperation;
-public:
- /**
- * Default constructor
- */
- ConvertColorToBWOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
- /**
- * Initialize the execution
- */
- void initExecution();
-
- /**
- * Deinitialize the execution
- */
- void deinitExecution();
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_ConvertColorToValueProg.cpp b/source/blender/compositor/operations/COM_ConvertColorToValueProg.cpp
deleted file mode 100644
index 44e751d1cae..00000000000
--- a/source/blender/compositor/operations/COM_ConvertColorToValueProg.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_ConvertColorToValueProg.h"
-
-ConvertColorToValueProg::ConvertColorToValueProg() : NodeOperation()
-{
- this->addInputSocket(COM_DT_COLOR);
- this->addOutputSocket(COM_DT_VALUE);
- this->m_inputOperation = NULL;
-}
-
-void ConvertColorToValueProg::initExecution()
-{
- this->m_inputOperation = this->getInputSocketReader(0);
-}
-
-void ConvertColorToValueProg::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor[4];
- this->m_inputOperation->read(inputColor, x, y, sampler);
- output[0] = (inputColor[0] + inputColor[1] + inputColor[2]) / 3.0f;
-}
-
-void ConvertColorToValueProg::deinitExecution()
-{
- this->m_inputOperation = NULL;
-}
diff --git a/source/blender/compositor/operations/COM_ConvertColorToValueProg.h b/source/blender/compositor/operations/COM_ConvertColorToValueProg.h
deleted file mode 100644
index 5c25d5d0540..00000000000
--- a/source/blender/compositor/operations/COM_ConvertColorToValueProg.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_ConvertColorToValueProg_h
-#define _COM_ConvertColorToValueProg_h
-#include "COM_NodeOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class ConvertColorToValueProg : public NodeOperation {
-private:
- /**
- * Cached reference to the inputProgram
- */
- SocketReader *m_inputOperation;
-public:
- /**
- * Default constructor
- */
- ConvertColorToValueProg();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
- /**
- * Initialize the execution
- */
- void initExecution();
-
- /**
- * Deinitialize the execution
- */
- void deinitExecution();
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_ConvertColorToVectorOperation.cpp b/source/blender/compositor/operations/COM_ConvertColorToVectorOperation.cpp
deleted file mode 100644
index a9b8cbb4272..00000000000
--- a/source/blender/compositor/operations/COM_ConvertColorToVectorOperation.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_ConvertColorToVectorOperation.h"
-
-ConvertColorToVectorOperation::ConvertColorToVectorOperation() : NodeOperation()
-{
- this->addInputSocket(COM_DT_COLOR);
- this->addOutputSocket(COM_DT_VECTOR);
- this->m_inputOperation = NULL;
-}
-
-void ConvertColorToVectorOperation::initExecution()
-{
- this->m_inputOperation = this->getInputSocketReader(0);
-}
-
-void ConvertColorToVectorOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- this->m_inputOperation->read(output, x, y, sampler);
-}
-
-void ConvertColorToVectorOperation::deinitExecution()
-{
- this->m_inputOperation = NULL;
-}
diff --git a/source/blender/compositor/operations/COM_ConvertColorToVectorOperation.h b/source/blender/compositor/operations/COM_ConvertColorToVectorOperation.h
deleted file mode 100644
index 93644cb5d1c..00000000000
--- a/source/blender/compositor/operations/COM_ConvertColorToVectorOperation.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_ConvertColorToVectorOperation_h
-#define _COM_ConvertColorToVectorOperation_h
-#include "COM_NodeOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class ConvertColorToVectorOperation : public NodeOperation {
-private:
- /**
- * Cached reference to the inputProgram
- */
- SocketReader *m_inputOperation;
-public:
- /**
- * Default constructor
- */
- ConvertColorToVectorOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
- /**
- * Initialize the execution
- */
- void initExecution();
-
- /**
- * Deinitialize the execution
- */
- void deinitExecution();
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.cpp b/source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.cpp
deleted file mode 100644
index 65907a8e537..00000000000
--- a/source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_ConvertHSVToRGBOperation.h"
-#include "BLI_math_color.h"
-
-ConvertHSVToRGBOperation::ConvertHSVToRGBOperation() : NodeOperation()
-{
- this->addInputSocket(COM_DT_COLOR);
- this->addOutputSocket(COM_DT_COLOR);
- this->m_inputOperation = NULL;
-}
-
-void ConvertHSVToRGBOperation::initExecution()
-{
- this->m_inputOperation = this->getInputSocketReader(0);
-}
-
-void ConvertHSVToRGBOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor[4];
- this->m_inputOperation->read(inputColor, x, y, sampler);
- hsv_to_rgb_v(inputColor, output);
- output[3] = inputColor[3];
-}
-
-void ConvertHSVToRGBOperation::deinitExecution()
-{
- this->m_inputOperation = NULL;
-}
-
diff --git a/source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.h b/source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.h
deleted file mode 100644
index 17419ca2a05..00000000000
--- a/source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_ConvertHSVToRGBOperation_h
-#define _COM_ConvertHSVToRGBOperation_h
-#include "COM_NodeOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class ConvertHSVToRGBOperation : public NodeOperation {
-private:
- /**
- * Cached reference to the inputProgram
- */
- SocketReader *m_inputOperation;
-public:
- /**
- * Default constructor
- */
- ConvertHSVToRGBOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
- /**
- * Initialize the execution
- */
- void initExecution();
-
- /**
- * Deinitialize the execution
- */
- void deinitExecution();
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_ConvertOperation.cpp b/source/blender/compositor/operations/COM_ConvertOperation.cpp
new file mode 100644
index 00000000000..d72aabb078e
--- /dev/null
+++ b/source/blender/compositor/operations/COM_ConvertOperation.cpp
@@ -0,0 +1,429 @@
+/*
+ * Copyright 2011, Blender Foundation.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor:
+ * Jeroen Bakker
+ * Monique Dewanchand
+ */
+
+#include "COM_ConvertOperation.h"
+
+
+ConvertBaseOperation::ConvertBaseOperation()
+{
+ this->m_inputOperation = NULL;
+}
+
+void ConvertBaseOperation::initExecution()
+{
+ this->m_inputOperation = this->getInputSocketReader(0);
+}
+
+void ConvertBaseOperation::deinitExecution()
+{
+ this->m_inputOperation = NULL;
+}
+
+
+/* ******** Value to Color ******** */
+
+ConvertValueToColorOperation::ConvertValueToColorOperation() : ConvertBaseOperation()
+{
+ this->addInputSocket(COM_DT_VALUE);
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+void ConvertValueToColorOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputValue[4];
+ this->m_inputOperation->read(inputValue, x, y, sampler);
+ output[0] = output[1] = output[2] = inputValue[0];
+ output[3] = 1.0f;
+}
+
+
+/* ******** Color to Value ******** */
+
+ConvertColorToValueOperation::ConvertColorToValueOperation() : ConvertBaseOperation()
+{
+ this->addInputSocket(COM_DT_COLOR);
+ this->addOutputSocket(COM_DT_VALUE);
+}
+
+void ConvertColorToValueOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor[4];
+ this->m_inputOperation->read(inputColor, x, y, sampler);
+ output[0] = (inputColor[0] + inputColor[1] + inputColor[2]) / 3.0f;
+}
+
+
+/* ******** Color to BW ******** */
+
+ConvertColorToBWOperation::ConvertColorToBWOperation() : ConvertBaseOperation()
+{
+ this->addInputSocket(COM_DT_COLOR);
+ this->addOutputSocket(COM_DT_VALUE);
+}
+
+void ConvertColorToBWOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor[4];
+ this->m_inputOperation->read(inputColor, x, y, sampler);
+ output[0] = rgb_to_bw(inputColor);
+}
+
+
+/* ******** Color to Vector ******** */
+
+ConvertColorToVectorOperation::ConvertColorToVectorOperation() : ConvertBaseOperation()
+{
+ this->addInputSocket(COM_DT_COLOR);
+ this->addOutputSocket(COM_DT_VECTOR);
+}
+
+void ConvertColorToVectorOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ this->m_inputOperation->read(output, x, y, sampler);
+}
+
+
+/* ******** Value to Vector ******** */
+
+ConvertValueToVectorOperation::ConvertValueToVectorOperation() : ConvertBaseOperation()
+{
+ this->addInputSocket(COM_DT_VALUE);
+ this->addOutputSocket(COM_DT_VECTOR);
+}
+
+void ConvertValueToVectorOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float input[4];
+ this->m_inputOperation->read(input, x, y, sampler);
+ output[0] = input[0];
+ output[1] = input[0];
+ output[2] = input[0];
+ output[3] = 0.0f;
+}
+
+
+/* ******** Vector to Color ******** */
+
+ConvertVectorToColorOperation::ConvertVectorToColorOperation() : ConvertBaseOperation()
+{
+ this->addInputSocket(COM_DT_VECTOR);
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+void ConvertVectorToColorOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ this->m_inputOperation->read(output, x, y, sampler);
+ output[3] = 1.0f;
+}
+
+
+/* ******** Vector to Value ******** */
+
+ConvertVectorToValueOperation::ConvertVectorToValueOperation() : ConvertBaseOperation()
+{
+ this->addInputSocket(COM_DT_VECTOR);
+ this->addOutputSocket(COM_DT_VALUE);
+}
+
+void ConvertVectorToValueOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float input[4];
+ this->m_inputOperation->read(input, x, y, sampler);
+ output[0] = (input[0] + input[1] + input[2]) / 3.0f;
+}
+
+
+/* ******** RGB to YCC ******** */
+
+ConvertRGBToYCCOperation::ConvertRGBToYCCOperation() : ConvertBaseOperation()
+{
+ this->addInputSocket(COM_DT_COLOR);
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+void ConvertRGBToYCCOperation::setMode(int mode)
+{
+ switch (mode) {
+ case 1:
+ this->m_mode = BLI_YCC_ITU_BT709;
+ break;
+ case 2:
+ this->m_mode = BLI_YCC_JFIF_0_255;
+ break;
+ case 0:
+ default:
+ this->m_mode = BLI_YCC_ITU_BT601;
+ break;
+ }
+}
+
+void ConvertRGBToYCCOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor[4];
+ float color[3];
+
+ this->m_inputOperation->read(inputColor, x, y, sampler);
+ rgb_to_ycc(inputColor[0], inputColor[1], inputColor[2], &color[0], &color[1], &color[2], this->m_mode);
+
+ /* divided by 255 to normalize for viewing in */
+ /* R,G,B --> Y,Cb,Cr */
+ mul_v3_v3fl(output, color, 1.0f / 255.0f);
+ output[3] = inputColor[3];
+}
+
+/* ******** YCC to RGB ******** */
+
+ConvertYCCToRGBOperation::ConvertYCCToRGBOperation() : ConvertBaseOperation()
+{
+ this->addInputSocket(COM_DT_COLOR);
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+void ConvertYCCToRGBOperation::setMode(int mode)
+{
+ switch (mode) {
+ case 1:
+ this->m_mode = BLI_YCC_ITU_BT709;
+ break;
+ case 2:
+ this->m_mode = BLI_YCC_JFIF_0_255;
+ break;
+ case 0:
+ default:
+ this->m_mode = BLI_YCC_ITU_BT601;
+ break;
+ }
+}
+
+void ConvertYCCToRGBOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor[4];
+ this->m_inputOperation->read(inputColor, x, y, sampler);
+
+ /* need to un-normalize the data */
+ /* R,G,B --> Y,Cb,Cr */
+ mul_v3_fl(inputColor, 255.0f);
+
+ ycc_to_rgb(inputColor[0], inputColor[1], inputColor[2], &output[0], &output[1], &output[2], this->m_mode);
+ output[3] = inputColor[3];
+}
+
+
+/* ******** RGB to YUV ******** */
+
+ConvertRGBToYUVOperation::ConvertRGBToYUVOperation() : ConvertBaseOperation()
+{
+ this->addInputSocket(COM_DT_COLOR);
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+void ConvertRGBToYUVOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor[4];
+ this->m_inputOperation->read(inputColor, x, y, sampler);
+ rgb_to_yuv(inputColor[0], inputColor[1], inputColor[2], &output[0], &output[1], &output[2]);
+ output[3] = inputColor[3];
+}
+
+
+/* ******** YUV to RGB ******** */
+
+ConvertYUVToRGBOperation::ConvertYUVToRGBOperation() : ConvertBaseOperation()
+{
+ this->addInputSocket(COM_DT_COLOR);
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+void ConvertYUVToRGBOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor[4];
+ this->m_inputOperation->read(inputColor, x, y, sampler);
+ yuv_to_rgb(inputColor[0], inputColor[1], inputColor[2], &output[0], &output[1], &output[2]);
+ output[3] = inputColor[3];
+}
+
+
+/* ******** RGB to HSV ******** */
+
+ConvertRGBToHSVOperation::ConvertRGBToHSVOperation() : ConvertBaseOperation()
+{
+ this->addInputSocket(COM_DT_COLOR);
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+void ConvertRGBToHSVOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor[4];
+ this->m_inputOperation->read(inputColor, x, y, sampler);
+ rgb_to_hsv_v(inputColor, output);
+ output[3] = inputColor[3];
+}
+
+
+/* ******** HSV to RGB ******** */
+
+ConvertHSVToRGBOperation::ConvertHSVToRGBOperation() : ConvertBaseOperation()
+{
+ this->addInputSocket(COM_DT_COLOR);
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+void ConvertHSVToRGBOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor[4];
+ this->m_inputOperation->read(inputColor, x, y, sampler);
+ hsv_to_rgb_v(inputColor, output);
+ output[3] = inputColor[3];
+}
+
+
+/* ******** Premul to Straight ******** */
+
+ConvertPremulToStraightOperation::ConvertPremulToStraightOperation() : ConvertBaseOperation()
+{
+ this->addInputSocket(COM_DT_COLOR);
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+void ConvertPremulToStraightOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputValue[4];
+ float alpha;
+
+ this->m_inputOperation->read(inputValue, x, y, sampler);
+ alpha = inputValue[3];
+
+ if (fabsf(alpha) < 1e-5f) {
+ zero_v3(output);
+ }
+ else {
+ mul_v3_v3fl(output, inputValue, 1.0f / alpha);
+ }
+
+ /* never touches the alpha */
+ output[3] = alpha;
+}
+
+
+/* ******** Straight to Premul ******** */
+
+ConvertStraightToPremulOperation::ConvertStraightToPremulOperation() : ConvertBaseOperation()
+{
+ this->addInputSocket(COM_DT_COLOR);
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+void ConvertStraightToPremulOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputValue[4];
+ float alpha;
+
+ this->m_inputOperation->read(inputValue, x, y, sampler);
+ alpha = inputValue[3];
+
+ mul_v3_v3fl(output, inputValue, alpha);
+
+ /* never touches the alpha */
+ output[3] = alpha;
+}
+
+
+/* ******** Separate Channels ******** */
+
+SeparateChannelOperation::SeparateChannelOperation() : NodeOperation()
+{
+ this->addInputSocket(COM_DT_COLOR);
+ this->addOutputSocket(COM_DT_VALUE);
+ this->m_inputOperation = NULL;
+}
+void SeparateChannelOperation::initExecution()
+{
+ this->m_inputOperation = this->getInputSocketReader(0);
+}
+
+void SeparateChannelOperation::deinitExecution()
+{
+ this->m_inputOperation = NULL;
+}
+
+
+void SeparateChannelOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float input[4];
+ this->m_inputOperation->read(input, x, y, sampler);
+ output[0] = input[this->m_channel];
+}
+
+
+/* ******** Combine Channels ******** */
+
+CombineChannelsOperation::CombineChannelsOperation() : NodeOperation()
+{
+ this->addInputSocket(COM_DT_VALUE);
+ this->addInputSocket(COM_DT_VALUE);
+ this->addInputSocket(COM_DT_VALUE);
+ this->addInputSocket(COM_DT_VALUE);
+ this->addOutputSocket(COM_DT_COLOR);
+ this->setResolutionInputSocketIndex(0);
+ this->m_inputChannel1Operation = NULL;
+ this->m_inputChannel2Operation = NULL;
+ this->m_inputChannel3Operation = NULL;
+ this->m_inputChannel4Operation = NULL;
+}
+
+void CombineChannelsOperation::initExecution()
+{
+ this->m_inputChannel1Operation = this->getInputSocketReader(0);
+ this->m_inputChannel2Operation = this->getInputSocketReader(1);
+ this->m_inputChannel3Operation = this->getInputSocketReader(2);
+ this->m_inputChannel4Operation = this->getInputSocketReader(3);
+}
+
+void CombineChannelsOperation::deinitExecution()
+{
+ this->m_inputChannel1Operation = NULL;
+ this->m_inputChannel2Operation = NULL;
+ this->m_inputChannel3Operation = NULL;
+ this->m_inputChannel4Operation = NULL;
+}
+
+
+void CombineChannelsOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float input[4];
+ if (this->m_inputChannel1Operation) {
+ this->m_inputChannel1Operation->read(input, x, y, sampler);
+ output[0] = input[0];
+ }
+ if (this->m_inputChannel2Operation) {
+ this->m_inputChannel2Operation->read(input, x, y, sampler);
+ output[1] = input[0];
+ }
+ if (this->m_inputChannel3Operation) {
+ this->m_inputChannel3Operation->read(input, x, y, sampler);
+ output[2] = input[0];
+ }
+ if (this->m_inputChannel4Operation) {
+ this->m_inputChannel4Operation->read(input, x, y, sampler);
+ output[3] = input[0];
+ }
+}
diff --git a/source/blender/compositor/operations/COM_ConvertOperation.h b/source/blender/compositor/operations/COM_ConvertOperation.h
new file mode 100644
index 00000000000..06aeb2e52d7
--- /dev/null
+++ b/source/blender/compositor/operations/COM_ConvertOperation.h
@@ -0,0 +1,202 @@
+/*
+ * Copyright 2011, Blender Foundation.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor:
+ * Jeroen Bakker
+ * Monique Dewanchand
+ */
+
+#ifndef _COM_ConvertOperation_h
+#define _COM_ConvertOperation_h
+
+#include "COM_NodeOperation.h"
+
+
+class ConvertBaseOperation : public NodeOperation {
+protected:
+ SocketReader *m_inputOperation;
+
+public:
+ ConvertBaseOperation();
+
+ void initExecution();
+ void deinitExecution();
+};
+
+
+class ConvertValueToColorOperation : public ConvertBaseOperation {
+public:
+ ConvertValueToColorOperation();
+
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+
+class ConvertColorToValueOperation : public ConvertBaseOperation {
+public:
+ ConvertColorToValueOperation();
+
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+
+class ConvertColorToBWOperation : public ConvertBaseOperation {
+public:
+ ConvertColorToBWOperation();
+
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+
+class ConvertColorToVectorOperation : public ConvertBaseOperation {
+public:
+ ConvertColorToVectorOperation();
+
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+
+class ConvertValueToVectorOperation : public ConvertBaseOperation {
+public:
+ ConvertValueToVectorOperation();
+
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+
+class ConvertVectorToColorOperation : public ConvertBaseOperation {
+public:
+ ConvertVectorToColorOperation();
+
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+
+class ConvertVectorToValueOperation : public ConvertBaseOperation {
+public:
+ ConvertVectorToValueOperation();
+
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+
+class ConvertRGBToYCCOperation : public ConvertBaseOperation {
+private:
+ /** YCbCr mode (Jpeg, ITU601, ITU709) */
+ int m_mode;
+public:
+ ConvertRGBToYCCOperation();
+
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+
+ /** Set the YCC mode */
+ void setMode(int mode);
+};
+
+
+class ConvertYCCToRGBOperation : public ConvertBaseOperation {
+private:
+ /** YCbCr mode (Jpeg, ITU601, ITU709) */
+ int m_mode;
+public:
+ ConvertYCCToRGBOperation();
+
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+
+ /** Set the YCC mode */
+ void setMode(int mode);
+};
+
+
+class ConvertRGBToYUVOperation : public ConvertBaseOperation {
+public:
+ ConvertRGBToYUVOperation();
+
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+
+class ConvertYUVToRGBOperation : public ConvertBaseOperation {
+public:
+ ConvertYUVToRGBOperation();
+
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+
+class ConvertRGBToHSVOperation : public ConvertBaseOperation {
+public:
+ ConvertRGBToHSVOperation();
+
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+
+class ConvertHSVToRGBOperation : public ConvertBaseOperation {
+public:
+ ConvertHSVToRGBOperation();
+
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+
+class ConvertPremulToStraightOperation : public ConvertBaseOperation {
+public:
+ ConvertPremulToStraightOperation();
+
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+
+class ConvertStraightToPremulOperation : public ConvertBaseOperation {
+public:
+ ConvertStraightToPremulOperation();
+
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+
+class SeparateChannelOperation : public NodeOperation {
+private:
+ SocketReader *m_inputOperation;
+ int m_channel;
+public:
+ SeparateChannelOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+
+ void initExecution();
+ void deinitExecution();
+
+ void setChannel(int channel) { this->m_channel = channel; }
+};
+
+
+class CombineChannelsOperation : public NodeOperation {
+private:
+ SocketReader *m_inputChannel1Operation;
+ SocketReader *m_inputChannel2Operation;
+ SocketReader *m_inputChannel3Operation;
+ SocketReader *m_inputChannel4Operation;
+public:
+ CombineChannelsOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+
+ void initExecution();
+ void deinitExecution();
+};
+
+#endif
diff --git a/source/blender/compositor/operations/COM_ConvertPremulToStraightOperation.cpp b/source/blender/compositor/operations/COM_ConvertPremulToStraightOperation.cpp
deleted file mode 100644
index 2af4b55de1a..00000000000
--- a/source/blender/compositor/operations/COM_ConvertPremulToStraightOperation.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2012, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Dalai Felinto
- */
-
-#include "COM_ConvertPremulToStraightOperation.h"
-#include "BLI_math.h"
-
-ConvertPremulToStraightOperation::ConvertPremulToStraightOperation() : NodeOperation()
-{
- this->addInputSocket(COM_DT_COLOR);
- this->addOutputSocket(COM_DT_COLOR);
-
- this->m_inputColor = NULL;
-}
-
-void ConvertPremulToStraightOperation::initExecution()
-{
- this->m_inputColor = getInputSocketReader(0);
-}
-
-void ConvertPremulToStraightOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputValue[4];
- float alpha;
-
- this->m_inputColor->read(inputValue, x, y, sampler);
- alpha = inputValue[3];
-
- if (fabsf(alpha) < 1e-5f) {
- zero_v3(output);
- }
- else {
- mul_v3_v3fl(output, inputValue, 1.0f / alpha);
- }
-
- /* never touches the alpha */
- output[3] = alpha;
-}
-
-void ConvertPremulToStraightOperation::deinitExecution()
-{
- this->m_inputColor = NULL;
-}
diff --git a/source/blender/compositor/operations/COM_ConvertRGBToHSVOperation.cpp b/source/blender/compositor/operations/COM_ConvertRGBToHSVOperation.cpp
deleted file mode 100644
index 3c7a9d5fd50..00000000000
--- a/source/blender/compositor/operations/COM_ConvertRGBToHSVOperation.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_ConvertRGBToHSVOperation.h"
-#include "BLI_math_color.h"
-
-ConvertRGBToHSVOperation::ConvertRGBToHSVOperation() : NodeOperation()
-{
- this->addInputSocket(COM_DT_COLOR);
- this->addOutputSocket(COM_DT_COLOR);
- this->m_inputOperation = NULL;
-}
-
-void ConvertRGBToHSVOperation::initExecution()
-{
- this->m_inputOperation = this->getInputSocketReader(0);
-}
-
-void ConvertRGBToHSVOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor[4];
- this->m_inputOperation->read(inputColor, x, y, sampler);
- rgb_to_hsv_v(inputColor, output);
- output[3] = inputColor[3];
-}
-
-void ConvertRGBToHSVOperation::deinitExecution()
-{
- this->m_inputOperation = NULL;
-}
diff --git a/source/blender/compositor/operations/COM_ConvertRGBToHSVOperation.h b/source/blender/compositor/operations/COM_ConvertRGBToHSVOperation.h
deleted file mode 100644
index fdc8dfed31b..00000000000
--- a/source/blender/compositor/operations/COM_ConvertRGBToHSVOperation.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_ConvertRGBToHSVOperation_h
-#define _COM_ConvertRGBToHSVOperation_h
-#include "COM_NodeOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class ConvertRGBToHSVOperation : public NodeOperation {
-private:
- /**
- * Cached reference to the inputProgram
- */
- SocketReader *m_inputOperation;
-public:
- /**
- * Default constructor
- */
- ConvertRGBToHSVOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
- /**
- * Initialize the execution
- */
- void initExecution();
-
- /**
- * Deinitialize the execution
- */
- void deinitExecution();
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.cpp b/source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.cpp
deleted file mode 100644
index 6f6dffdc72b..00000000000
--- a/source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Dalai Felinto
- */
-
-#include "COM_ConvertRGBToYCCOperation.h"
-#include "BLI_math_color.h"
-
-ConvertRGBToYCCOperation::ConvertRGBToYCCOperation() : NodeOperation()
-{
- this->addInputSocket(COM_DT_COLOR);
- this->addOutputSocket(COM_DT_COLOR);
- this->m_inputOperation = NULL;
-}
-
-void ConvertRGBToYCCOperation::initExecution()
-{
- this->m_inputOperation = this->getInputSocketReader(0);
-}
-
-void ConvertRGBToYCCOperation::setMode(int mode)
-{
- switch (mode) {
- case 1:
- this->m_mode = BLI_YCC_ITU_BT709;
- break;
- case 2:
- this->m_mode = BLI_YCC_JFIF_0_255;
- break;
- case 0:
- default:
- this->m_mode = BLI_YCC_ITU_BT601;
- break;
- }
-}
-
-void ConvertRGBToYCCOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor[4];
- float color[3];
-
- this->m_inputOperation->read(inputColor, x, y, sampler);
- rgb_to_ycc(inputColor[0], inputColor[1], inputColor[2], &color[0], &color[1], &color[2], this->m_mode);
-
- /* divided by 255 to normalize for viewing in */
- /* R,G,B --> Y,Cb,Cr */
- mul_v3_v3fl(output, color, 1.0f / 255.0f);
- output[3] = inputColor[3];
-}
-
-void ConvertRGBToYCCOperation::deinitExecution()
-{
- this->m_inputOperation = NULL;
-}
diff --git a/source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.h b/source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.h
deleted file mode 100644
index 3f85555f3bb..00000000000
--- a/source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Dalai Felinto
- */
-
-#ifndef _COM_ConvertRGBToYCCOperation_h
-#define _COM_ConvertRGBToYCCOperation_h
-#include "COM_NodeOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class ConvertRGBToYCCOperation : public NodeOperation {
-private:
- /**
- * Cached reference to the inputProgram
- */
- SocketReader *m_inputOperation;
-
- /**
- * YCbCr mode (Jpeg, ITU601, ITU709)
- */
- int m_mode;
-public:
- /**
- * Default constructor
- */
- ConvertRGBToYCCOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
- /**
- * Initialize the execution
- */
- void initExecution();
-
- /**
- * Deinitialize the execution
- */
- void deinitExecution();
-
- /**
- * Set the YCC mode
- */
- void setMode(int mode);
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.cpp b/source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.cpp
deleted file mode 100644
index 8ce9e150080..00000000000
--- a/source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Dalai Felinto
- */
-
-#include "COM_ConvertRGBToYUVOperation.h"
-#include "BLI_math_color.h"
-
-ConvertRGBToYUVOperation::ConvertRGBToYUVOperation() : NodeOperation()
-{
- this->addInputSocket(COM_DT_COLOR);
- this->addOutputSocket(COM_DT_COLOR);
- this->m_inputOperation = NULL;
-}
-
-void ConvertRGBToYUVOperation::initExecution()
-{
- this->m_inputOperation = this->getInputSocketReader(0);
-}
-
-void ConvertRGBToYUVOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor[4];
- this->m_inputOperation->read(inputColor, x, y, sampler);
- rgb_to_yuv(inputColor[0], inputColor[1], inputColor[2], &output[0], &output[1], &output[2]);
- output[3] = inputColor[3];
-}
-
-void ConvertRGBToYUVOperation::deinitExecution()
-{
- this->m_inputOperation = NULL;
-}
diff --git a/source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.h b/source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.h
deleted file mode 100644
index 97d57f657ec..00000000000
--- a/source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Dalai Felinto
- */
-
-#ifndef _COM_ConvertRGBToYUVOperation_h
-#define _COM_ConvertRGBToYUVOperation_h
-#include "COM_NodeOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class ConvertRGBToYUVOperation : public NodeOperation {
-private:
- /**
- * Cached reference to the inputProgram
- */
- SocketReader *m_inputOperation;
-public:
- /**
- * Default constructor
- */
- ConvertRGBToYUVOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
- /**
- * Initialize the execution
- */
- void initExecution();
-
- /**
- * Deinitialize the execution
- */
- void deinitExecution();
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_ConvertStraightToPremulOperation.cpp b/source/blender/compositor/operations/COM_ConvertStraightToPremulOperation.cpp
deleted file mode 100644
index ae55d949ff2..00000000000
--- a/source/blender/compositor/operations/COM_ConvertStraightToPremulOperation.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright 2012, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Dalai Felinto
- */
-
-#include "COM_ConvertStraightToPremulOperation.h"
-#include "BLI_math.h"
-
-ConvertStraightToPremulOperation::ConvertStraightToPremulOperation() : NodeOperation()
-{
- this->addInputSocket(COM_DT_COLOR);
- this->addOutputSocket(COM_DT_COLOR);
-
- this->m_inputColor = NULL;
-}
-
-void ConvertStraightToPremulOperation::initExecution()
-{
- this->m_inputColor = getInputSocketReader(0);
-}
-
-void ConvertStraightToPremulOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputValue[4];
- float alpha;
-
- this->m_inputColor->read(inputValue, x, y, sampler);
- alpha = inputValue[3];
-
- mul_v3_v3fl(output, inputValue, alpha);
-
- /* never touches the alpha */
- output[3] = alpha;
-}
-
-void ConvertStraightToPremulOperation::deinitExecution()
-{
- this->m_inputColor = NULL;
-}
diff --git a/source/blender/compositor/operations/COM_ConvertValueToColorProg.cpp b/source/blender/compositor/operations/COM_ConvertValueToColorProg.cpp
deleted file mode 100644
index 98e7650aa56..00000000000
--- a/source/blender/compositor/operations/COM_ConvertValueToColorProg.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_ConvertValueToColorProg.h"
-
-ConvertValueToColorProg::ConvertValueToColorProg() : NodeOperation()
-{
- this->addInputSocket(COM_DT_VALUE);
- this->addOutputSocket(COM_DT_COLOR);
- this->m_inputProgram = NULL;
-}
-void ConvertValueToColorProg::initExecution()
-{
- this->m_inputProgram = this->getInputSocketReader(0);
-}
-
-void ConvertValueToColorProg::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputValue[4];
- this->m_inputProgram->read(inputValue, x, y, sampler);
- output[0] = output[1] = output[2] = inputValue[0];
- output[3] = 1.0f;
-}
-
-void ConvertValueToColorProg::deinitExecution()
-{
- this->m_inputProgram = NULL;
-}
diff --git a/source/blender/compositor/operations/COM_ConvertValueToColorProg.h b/source/blender/compositor/operations/COM_ConvertValueToColorProg.h
deleted file mode 100644
index f0f6cfb8fd2..00000000000
--- a/source/blender/compositor/operations/COM_ConvertValueToColorProg.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_ConvertValueToColorProg_h
-#define _COM_ConvertValueToColorProg_h
-#include "COM_NodeOperation.h"
-
-
-class ConvertValueToColorProg : public NodeOperation {
-private:
- /**
- * Cached reference to the inputProgram
- */
- SocketReader *m_inputProgram;
-public:
- ConvertValueToColorProg();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
- /**
- * Initialize the execution
- */
- void initExecution();
-
- /**
- * Deinitialize the execution
- */
- void deinitExecution();
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_ConvertValueToVectorOperation.cpp b/source/blender/compositor/operations/COM_ConvertValueToVectorOperation.cpp
deleted file mode 100644
index 411409d263c..00000000000
--- a/source/blender/compositor/operations/COM_ConvertValueToVectorOperation.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_ConvertValueToVectorOperation.h"
-
-ConvertValueToVectorOperation::ConvertValueToVectorOperation() : NodeOperation()
-{
- this->addInputSocket(COM_DT_VALUE);
- this->addOutputSocket(COM_DT_VECTOR);
- this->m_inputOperation = NULL;
-}
-
-void ConvertValueToVectorOperation::initExecution()
-{
- this->m_inputOperation = this->getInputSocketReader(0);
-}
-
-void ConvertValueToVectorOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float input[4];
- this->m_inputOperation->read(input, x, y, sampler);
- output[0] = input[0];
- output[1] = input[0];
- output[2] = input[0];
- output[3] = 0.0f;
-}
-
-void ConvertValueToVectorOperation::deinitExecution()
-{
- this->m_inputOperation = NULL;
-}
diff --git a/source/blender/compositor/operations/COM_ConvertValueToVectorOperation.h b/source/blender/compositor/operations/COM_ConvertValueToVectorOperation.h
deleted file mode 100644
index da45848ca34..00000000000
--- a/source/blender/compositor/operations/COM_ConvertValueToVectorOperation.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_ConvertValueToVectorOperation_h
-#define _COM_ConvertValueToVectorOperation_h
-#include "COM_NodeOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class ConvertValueToVectorOperation : public NodeOperation {
-private:
- /**
- * Cached reference to the inputProgram
- */
- SocketReader *m_inputOperation;
-public:
- /**
- * Default constructor
- */
- ConvertValueToVectorOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
- /**
- * Initialize the execution
- */
- void initExecution();
-
- /**
- * Deinitialize the execution
- */
- void deinitExecution();
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_ConvertVectorToColorOperation.cpp b/source/blender/compositor/operations/COM_ConvertVectorToColorOperation.cpp
deleted file mode 100644
index 78cb706c32d..00000000000
--- a/source/blender/compositor/operations/COM_ConvertVectorToColorOperation.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_ConvertVectorToColorOperation.h"
-
-ConvertVectorToColorOperation::ConvertVectorToColorOperation() : NodeOperation()
-{
- this->addInputSocket(COM_DT_VECTOR);
- this->addOutputSocket(COM_DT_COLOR);
- this->m_inputOperation = NULL;
-}
-
-void ConvertVectorToColorOperation::initExecution()
-{
- this->m_inputOperation = this->getInputSocketReader(0);
-}
-
-void ConvertVectorToColorOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- this->m_inputOperation->read(output, x, y, sampler);
- output[3] = 1.0f;
-}
-
-void ConvertVectorToColorOperation::deinitExecution()
-{
- this->m_inputOperation = NULL;
-}
diff --git a/source/blender/compositor/operations/COM_ConvertVectorToColorOperation.h b/source/blender/compositor/operations/COM_ConvertVectorToColorOperation.h
deleted file mode 100644
index 9ef5f8fece3..00000000000
--- a/source/blender/compositor/operations/COM_ConvertVectorToColorOperation.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_ConvertVectorToColorOperation_h
-#define _COM_ConvertVectorToColorOperation_h
-#include "COM_NodeOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class ConvertVectorToColorOperation : public NodeOperation {
-private:
- /**
- * Cached reference to the inputProgram
- */
- SocketReader *m_inputOperation;
-public:
- /**
- * Default constructor
- */
- ConvertVectorToColorOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
- /**
- * Initialize the execution
- */
- void initExecution();
-
- /**
- * Deinitialize the execution
- */
- void deinitExecution();
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_ConvertVectorToValueOperation.cpp b/source/blender/compositor/operations/COM_ConvertVectorToValueOperation.cpp
deleted file mode 100644
index a3612414029..00000000000
--- a/source/blender/compositor/operations/COM_ConvertVectorToValueOperation.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_ConvertVectorToValueOperation.h"
-
-ConvertVectorToValueOperation::ConvertVectorToValueOperation() : NodeOperation()
-{
- this->addInputSocket(COM_DT_VECTOR);
- this->addOutputSocket(COM_DT_VALUE);
- this->m_inputOperation = NULL;
-}
-
-void ConvertVectorToValueOperation::initExecution()
-{
- this->m_inputOperation = this->getInputSocketReader(0);
-}
-
-void ConvertVectorToValueOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float input[4];
- this->m_inputOperation->read(input, x, y, sampler);
- output[0] = (input[0] + input[1] + input[2]) / 3.0f;
-}
-
-void ConvertVectorToValueOperation::deinitExecution()
-{
- this->m_inputOperation = NULL;
-}
diff --git a/source/blender/compositor/operations/COM_ConvertVectorToValueOperation.h b/source/blender/compositor/operations/COM_ConvertVectorToValueOperation.h
deleted file mode 100644
index e42f235a12b..00000000000
--- a/source/blender/compositor/operations/COM_ConvertVectorToValueOperation.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_ConvertVectorToValueOperation_h
-#define _COM_ConvertVectorToValueOperation_h
-#include "COM_NodeOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class ConvertVectorToValueOperation : public NodeOperation {
-private:
- /**
- * Cached reference to the inputProgram
- */
- SocketReader *m_inputOperation;
-public:
- /**
- * Default constructor
- */
- ConvertVectorToValueOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
- /**
- * Initialize the execution
- */
- void initExecution();
-
- /**
- * Deinitialize the execution
- */
- void deinitExecution();
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.cpp b/source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.cpp
deleted file mode 100644
index 8f9eaf49ea4..00000000000
--- a/source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Dalai Felinto
- */
-
-#include "COM_ConvertYCCToRGBOperation.h"
-#include "BLI_math_color.h"
-
-ConvertYCCToRGBOperation::ConvertYCCToRGBOperation() : NodeOperation()
-{
- this->addInputSocket(COM_DT_COLOR);
- this->addOutputSocket(COM_DT_COLOR);
- this->m_inputOperation = NULL;
-}
-
-void ConvertYCCToRGBOperation::initExecution()
-{
- this->m_inputOperation = this->getInputSocketReader(0);
-}
-
-void ConvertYCCToRGBOperation::setMode(int mode)
-{
- switch (mode) {
- case 1:
- this->m_mode = BLI_YCC_ITU_BT709;
- break;
- case 2:
- this->m_mode = BLI_YCC_JFIF_0_255;
- break;
- case 0:
- default:
- this->m_mode = BLI_YCC_ITU_BT601;
- break;
- }
-}
-
-void ConvertYCCToRGBOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor[4];
- this->m_inputOperation->read(inputColor, x, y, sampler);
-
- /* need to un-normalize the data */
- /* R,G,B --> Y,Cb,Cr */
- mul_v3_fl(inputColor, 255.0f);
-
- ycc_to_rgb(inputColor[0], inputColor[1], inputColor[2], &output[0], &output[1], &output[2], this->m_mode);
- output[3] = inputColor[3];
-}
-
-void ConvertYCCToRGBOperation::deinitExecution()
-{
- this->m_inputOperation = NULL;
-}
-
diff --git a/source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.h b/source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.h
deleted file mode 100644
index 0a8b67e0bee..00000000000
--- a/source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Dalai Felinto
- */
-
-#ifndef _COM_ConvertYCCToRGBOperation_h
-#define _COM_ConvertYCCToRGBOperation_h
-#include "COM_NodeOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class ConvertYCCToRGBOperation : public NodeOperation {
-private:
- /**
- * Cached reference to the inputProgram
- */
- SocketReader *m_inputOperation;
-
- /**
- * YCbCr mode (Jpeg, ITU601, ITU709)
- */
- int m_mode;
-public:
- /**
- * Default constructor
- */
- ConvertYCCToRGBOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
- /**
- * Initialize the execution
- */
- void initExecution();
-
- /**
- * Deinitialize the execution
- */
- void deinitExecution();
-
- /**
- * Set the YCC mode
- */
- void setMode(int mode);
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.cpp b/source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.cpp
deleted file mode 100644
index 197c7f9f043..00000000000
--- a/source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Dalai Felinto
- */
-
-#include "COM_ConvertYUVToRGBOperation.h"
-#include "BLI_math_color.h"
-
-ConvertYUVToRGBOperation::ConvertYUVToRGBOperation() : NodeOperation()
-{
- this->addInputSocket(COM_DT_COLOR);
- this->addOutputSocket(COM_DT_COLOR);
- this->m_inputOperation = NULL;
-}
-
-void ConvertYUVToRGBOperation::initExecution()
-{
- this->m_inputOperation = this->getInputSocketReader(0);
-}
-
-void ConvertYUVToRGBOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor[4];
- this->m_inputOperation->read(inputColor, x, y, sampler);
- yuv_to_rgb(inputColor[0], inputColor[1], inputColor[2], &output[0], &output[1], &output[2]);
- output[3] = inputColor[3];
-}
-
-void ConvertYUVToRGBOperation::deinitExecution()
-{
- this->m_inputOperation = NULL;
-}
-
diff --git a/source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.h b/source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.h
deleted file mode 100644
index ee11ef8df60..00000000000
--- a/source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Dalai Felinto
- */
-
-#ifndef _COM_ConvertYUVToRGBOperation_h
-#define _COM_ConvertYUVToRGBOperation_h
-#include "COM_NodeOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class ConvertYUVToRGBOperation : public NodeOperation {
-private:
- /**
- * Cached reference to the inputProgram
- */
- SocketReader *m_inputOperation;
-public:
- /**
- * Default constructor
- */
- ConvertYUVToRGBOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
- /**
- * Initialize the execution
- */
- void initExecution();
-
- /**
- * Deinitialize the execution
- */
- void deinitExecution();
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_DifferenceMatteOperation.h b/source/blender/compositor/operations/COM_DifferenceMatteOperation.h
index e7d881cbbd5..e0a38f703ed 100644
--- a/source/blender/compositor/operations/COM_DifferenceMatteOperation.h
+++ b/source/blender/compositor/operations/COM_DifferenceMatteOperation.h
@@ -22,7 +22,7 @@
#ifndef _COM_DifferenceMatteOperation_h
#define _COM_DifferenceMatteOperation_h
-#include "COM_MixBaseOperation.h"
+#include "COM_MixOperation.h"
/**
diff --git a/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.h b/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.h
index 5a34135b1a4..43299486f60 100644
--- a/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.h
+++ b/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.h
@@ -21,7 +21,7 @@
#ifndef _COM_DistanceRGBMatteOperation_h
#define _COM_DistanceRGBMatteOperation_h
-#include "COM_MixBaseOperation.h"
+#include "COM_MixOperation.h"
/**
diff --git a/source/blender/compositor/operations/COM_DistanceYCCMatteOperation.h b/source/blender/compositor/operations/COM_DistanceYCCMatteOperation.h
index f4866a327f1..27025188d49 100644
--- a/source/blender/compositor/operations/COM_DistanceYCCMatteOperation.h
+++ b/source/blender/compositor/operations/COM_DistanceYCCMatteOperation.h
@@ -21,7 +21,7 @@
#ifndef _COM_DistanceYCCMatteOperation_h
#define _COM_DistanceYCCMatteOperation_h
-#include "COM_MixBaseOperation.h"
+#include "COM_MixOperation.h"
#include "COM_DistanceRGBMatteOperation.h"
diff --git a/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp b/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
index 9231261986d..a6be9254f6f 100644
--- a/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
@@ -29,6 +29,7 @@
FastGaussianBlurOperation::FastGaussianBlurOperation() : BlurBaseOperation(COM_DT_COLOR)
{
this->m_iirgaus = NULL;
+ this->m_chunksize = 256;
}
void FastGaussianBlurOperation::executePixel(float output[4], int x, int y, void *data)
@@ -37,22 +38,56 @@ void FastGaussianBlurOperation::executePixel(float output[4], int x, int y, void
newData->read(output, x, y);
}
+// Calculate the depending area of interest. This depends on the
+// size of the blur operation; if the blur is large it is faster
+// to just calculate the whole image at once.
+// Returns true if the area is just a tile and false if it is
+// the whole image.
+bool FastGaussianBlurOperation::getDAI(rcti *rect, rcti *output)
+{
+ // m_data->sizex * m_size should be enough? For some reason there
+ // seem to be errors in the boundary between tiles.
+ int sx = this->m_data->sizex * this->m_size * 2;
+ if (sx < 1)
+ sx = 1;
+ int sy = this->m_data->sizey * this->m_size * 2;
+ if (sy < 1)
+ sy = 1;
+
+ if (sx >= this->m_chunksize || sy >= this->m_chunksize) {
+ output->xmin = 0;
+ output->xmax = this->getWidth();
+ output->ymin = 0;
+ output->ymax = this->getHeight();
+ return false;
+ }
+ else {
+ output->xmin = rect->xmin - sx - 1;
+ output->xmax = rect->xmax + sx + 1;
+ output->ymin = rect->ymin - sy - 1;
+ output->ymax = rect->ymax + sy + 1;
+ return true;
+ }
+}
+
bool FastGaussianBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
{
rcti newInput;
- rcti sizeInput;
- sizeInput.xmin = 0;
- sizeInput.ymin = 0;
- sizeInput.xmax = 5;
- sizeInput.ymax = 5;
- NodeOperation *operation = this->getInputOperation(1);
- if (operation->determineDependingAreaOfInterest(&sizeInput, readOperation, output)) {
- return true;
+ if (!this->m_sizeavailable) {
+ rcti sizeInput;
+ sizeInput.xmin = 0;
+ sizeInput.ymin = 0;
+ sizeInput.xmax = 5;
+ sizeInput.ymax = 5;
+ NodeOperation *operation = this->getInputOperation(1);
+ if (operation->determineDependingAreaOfInterest(&sizeInput, readOperation, output)) {
+ return true;
+ }
}
- else {
- if (this->m_iirgaus) {
- return false;
+ {
+ if (this->m_sizeavailable) {
+ getDAI(input, &newInput);
}
else {
newInput.xmin = 0;
@@ -81,6 +116,7 @@ void FastGaussianBlurOperation::deinitExecution()
void *FastGaussianBlurOperation::initializeTileData(rcti *rect)
{
+#if 0
lockMutex();
if (!this->m_iirgaus) {
MemoryBuffer *newBuf = (MemoryBuffer *)this->m_inputProgram->initializeTileData(rect);
@@ -109,8 +145,68 @@ void *FastGaussianBlurOperation::initializeTileData(rcti *rect)
}
unlockMutex();
return this->m_iirgaus;
+#else
+
+ lockMutex();
+ if (this->m_iirgaus) {
+ // if this->m_iirgaus is set, we don't do tile rendering, so
+ // we can return the already calculated cache
+ unlockMutex();
+ return this->m_iirgaus;
+ }
+ updateSize();
+ rcti dai;
+ bool use_tiles = getDAI(rect, &dai);
+ if (use_tiles) {
+ unlockMutex();
+ }
+
+ MemoryBuffer *buffer = (MemoryBuffer *)this->m_inputProgram->initializeTileData(NULL);
+ rcti *buf_rect = buffer->getRect();
+
+ dai.xmin = max(dai.xmin, buf_rect->xmin);
+ dai.xmax = min(dai.xmax, buf_rect->xmax);
+ dai.ymin = max(dai.ymin, buf_rect->ymin);
+ dai.ymax = min(dai.ymax, buf_rect->ymax);
+
+ MemoryBuffer *tile = new MemoryBuffer(NULL, &dai);
+ tile->copyContentFrom(buffer);
+
+ int c;
+ float sx = this->m_data->sizex * this->m_size / 2.0f;
+ float sy = this->m_data->sizey * this->m_size / 2.0f;
+
+ if ((sx == sy) && (sx > 0.f)) {
+ for (c = 0; c < COM_NUMBER_OF_CHANNELS; ++c)
+ IIR_gauss(tile, sx, c, 3);
+ }
+ else {
+ if (sx > 0.0f) {
+ for (c = 0; c < COM_NUMBER_OF_CHANNELS; ++c)
+ IIR_gauss(tile, sx, c, 1);
+ }
+ if (sy > 0.0f) {
+ for (c = 0; c < COM_NUMBER_OF_CHANNELS; ++c)
+ IIR_gauss(tile, sy, c, 2);
+ }
+ }
+ if (!use_tiles) {
+ this->m_iirgaus = tile;
+ unlockMutex();
+ }
+ return tile;
+#endif
}
+void FastGaussianBlurOperation::deinitializeTileData(rcti *rect, void *data)
+{
+ if (!this->m_iirgaus && data) {
+ MemoryBuffer *tile = (MemoryBuffer *)data;
+ delete tile;
+ }
+}
+
+
void FastGaussianBlurOperation::IIR_gauss(MemoryBuffer *src, float sigma, unsigned int chan, unsigned int xy)
{
double q, q2, sc, cf[4], tsM[9], tsu[3], tsv[3];
@@ -195,22 +291,38 @@ void FastGaussianBlurOperation::IIR_gauss(MemoryBuffer *src, float sigma, unsign
Y = (double *)MEM_callocN(sz * sizeof(double), "IIR_gauss Y buf");
W = (double *)MEM_callocN(sz * sizeof(double), "IIR_gauss W buf");
if (xy & 1) { // H
+ int offset;
for (y = 0; y < src_height; ++y) {
const int yx = y * src_width;
- for (x = 0; x < src_width; ++x)
- X[x] = buffer[(x + yx) * COM_NUMBER_OF_CHANNELS + chan];
+ offset = yx * COM_NUMBER_OF_CHANNELS + chan;
+ for (x = 0; x < src_width; ++x) {
+ X[x] = buffer[offset];
+ offset += COM_NUMBER_OF_CHANNELS;
+ }
YVV(src_width);
- for (x = 0; x < src_width; ++x)
- buffer[(x + yx) * COM_NUMBER_OF_CHANNELS + chan] = Y[x];
+ offset = yx * COM_NUMBER_OF_CHANNELS + chan;
+ for (x = 0; x < src_width; ++x) {
+ buffer[offset] = Y[x];
+ offset += COM_NUMBER_OF_CHANNELS;
+ }
}
}
if (xy & 2) { // V
+ int offset;
+ const int add = src_width * COM_NUMBER_OF_CHANNELS;
+
for (x = 0; x < src_width; ++x) {
- for (y = 0; y < src_height; ++y)
- X[y] = buffer[(x + y * src_width) * COM_NUMBER_OF_CHANNELS + chan];
+ offset = x * COM_NUMBER_OF_CHANNELS + chan;
+ for (y = 0; y < src_height; ++y) {
+ X[y] = buffer[offset];
+ offset += add;
+ }
YVV(src_height);
- for (y = 0; y < src_height; ++y)
- buffer[(x + y * src_width) * COM_NUMBER_OF_CHANNELS + chan] = Y[y];
+ offset = x * COM_NUMBER_OF_CHANNELS + chan;
+ for (y = 0; y < src_height; ++y) {
+ buffer[offset] = Y[y];
+ offset += add;
+ }
}
}
diff --git a/source/blender/compositor/operations/COM_FastGaussianBlurOperation.h b/source/blender/compositor/operations/COM_FastGaussianBlurOperation.h
index 58bf1d4f596..e12d437b43e 100644
--- a/source/blender/compositor/operations/COM_FastGaussianBlurOperation.h
+++ b/source/blender/compositor/operations/COM_FastGaussianBlurOperation.h
@@ -28,16 +28,19 @@
class FastGaussianBlurOperation : public BlurBaseOperation {
private:
- float m_sx;
- float m_sy;
MemoryBuffer *m_iirgaus;
+ int m_chunksize;
+
public:
FastGaussianBlurOperation();
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
void executePixel(float output[4], int x, int y, void *data);
+ void setChunksize(int size) { this->m_chunksize = size; }
static void IIR_gauss(MemoryBuffer *src, float sigma, unsigned int channel, unsigned int xy);
+ bool getDAI(rcti *rect, rcti *output);
void *initializeTileData(rcti *rect);
+ void deinitializeTileData(rcti *rect, void *data);
void deinitExecution();
void initExecution();
};
diff --git a/source/blender/compositor/operations/COM_GlareGhostOperation.cpp b/source/blender/compositor/operations/COM_GlareGhostOperation.cpp
index c4f8b3a0ddb..8854be52ded 100644
--- a/source/blender/compositor/operations/COM_GlareGhostOperation.cpp
+++ b/source/blender/compositor/operations/COM_GlareGhostOperation.cpp
@@ -83,11 +83,11 @@ void GlareGhostOperation::generateGlare(float *data, MemoryBuffer *inputTile, No
for (x = 0; x < gbuf->getWidth(); x++) {
u = ((float)x + 0.5f) / (float)gbuf->getWidth();
s = (u - 0.5f) * sc + 0.5f, t = (v - 0.5f) * sc + 0.5f;
- tbuf1->readCubic(c, s * gbuf->getWidth(), t * gbuf->getHeight());
+ tbuf1->readBilinear(c, s * gbuf->getWidth(), t * gbuf->getHeight());
sm = smoothMask(s, t);
mul_v3_fl(c, sm);
s = (u - 0.5f) * isc + 0.5f, t = (v - 0.5f) * isc + 0.5f;
- tbuf2->readCubic(tc, s * gbuf->getWidth() - 0.5f, t * gbuf->getHeight() - 0.5f);
+ tbuf2->readBilinear(tc, s * gbuf->getWidth() - 0.5f, t * gbuf->getHeight() - 0.5f);
sm = smoothMask(s, t);
madd_v3_v3fl(c, tc, sm);
@@ -108,7 +108,7 @@ void GlareGhostOperation::generateGlare(float *data, MemoryBuffer *inputTile, No
np = (n << 2) + p;
s = (u - 0.5f) * scalef[np] + 0.5f;
t = (v - 0.5f) * scalef[np] + 0.5f;
- gbuf->readCubic(c, s * gbuf->getWidth() - 0.5f, t * gbuf->getHeight() - 0.5f);
+ gbuf->readBilinear(c, s * gbuf->getWidth() - 0.5f, t * gbuf->getHeight() - 0.5f);
mul_v3_v3(c, cm[np]);
sm = smoothMask(s, t) * 0.25f;
madd_v3_v3fl(tc, c, sm);
diff --git a/source/blender/compositor/operations/COM_GlareStreaksOperation.cpp b/source/blender/compositor/operations/COM_GlareStreaksOperation.cpp
index 60d37fb8145..5644ff30ef3 100644
--- a/source/blender/compositor/operations/COM_GlareStreaksOperation.cpp
+++ b/source/blender/compositor/operations/COM_GlareStreaksOperation.cpp
@@ -54,9 +54,9 @@ void GlareStreaksOperation::generateGlare(float *data, MemoryBuffer *inputTile,
// first pass no offset, always same for every pass, exact copy,
// otherwise results in uneven brightness, only need once
if (n == 0) tsrc->read(c1, x, y); else c1[0] = c1[1] = c1[2] = 0;
- tsrc->readCubic(c2, x + vxp, y + vyp);
- tsrc->readCubic(c3, x + vxp * 2.f, y + vyp * 2.f);
- tsrc->readCubic(c4, x + vxp * 3.f, y + vyp * 3.f);
+ tsrc->readBilinear(c2, x + vxp, y + vyp);
+ tsrc->readBilinear(c3, x + vxp * 2.f, y + vyp * 2.f);
+ tsrc->readBilinear(c4, x + vxp * 3.f, y + vyp * 3.f);
// modulate color to look vaguely similar to a color spectrum
c2[1] *= cmo;
c2[2] *= cmo;
diff --git a/source/blender/compositor/operations/COM_ImageOperation.cpp b/source/blender/compositor/operations/COM_ImageOperation.cpp
index 89a56af6b15..cface29fdca 100644
--- a/source/blender/compositor/operations/COM_ImageOperation.cpp
+++ b/source/blender/compositor/operations/COM_ImageOperation.cpp
@@ -141,7 +141,7 @@ static void sampleImageAtLocation(ImBuf *ibuf, float x, float y, PixelSampler sa
}
rgba_uchar_to_float(color, byte_color);
if (make_linear_rgb) {
- IMB_colormanagement_colorspace_to_scene_linear_v4(color, FALSE, ibuf->rect_colorspace);
+ IMB_colormanagement_colorspace_to_scene_linear_v4(color, false, ibuf->rect_colorspace);
}
}
}
diff --git a/source/blender/compositor/operations/COM_InpaintOperation.cpp b/source/blender/compositor/operations/COM_InpaintOperation.cpp
index edcd1563e03..b64c98be0c7 100644
--- a/source/blender/compositor/operations/COM_InpaintOperation.cpp
+++ b/source/blender/compositor/operations/COM_InpaintOperation.cpp
@@ -48,7 +48,6 @@ void InpaintSimpleOperation::initExecution()
{
this->m_inputImageProgram = this->getInputSocketReader(0);
- this->m_cached_buffer = NULL;
this->m_pixelorder = NULL;
this->m_manhatten_distance = NULL;
this->m_cached_buffer = NULL;
diff --git a/source/blender/compositor/operations/COM_LuminanceMatteOperation.h b/source/blender/compositor/operations/COM_LuminanceMatteOperation.h
index 009a1e8825e..cb8cc01efea 100644
--- a/source/blender/compositor/operations/COM_LuminanceMatteOperation.h
+++ b/source/blender/compositor/operations/COM_LuminanceMatteOperation.h
@@ -21,7 +21,7 @@
#ifndef _COM_LuminanceMatteOperation_h
#define _COM_LuminanceMatteOperation_h
-#include "COM_MixBaseOperation.h"
+#include "COM_MixOperation.h"
/**
diff --git a/source/blender/compositor/operations/COM_MapUVOperation.cpp b/source/blender/compositor/operations/COM_MapUVOperation.cpp
index 1fa484ea2b6..a9b6ad3edc1 100644
--- a/source/blender/compositor/operations/COM_MapUVOperation.cpp
+++ b/source/blender/compositor/operations/COM_MapUVOperation.cpp
@@ -71,38 +71,12 @@ void MapUVOperation::executePixel(float output[4], float x, float y, PixelSample
dy = 0.5f * (uv_u + uv_d);
- /* more adaptive sampling, red and green (UV) channels */
- this->m_inputUVProgram->read(uv_a, x - 1, y - 1, COM_PS_NEAREST);
- this->m_inputUVProgram->read(uv_b, x - 1, y + 1, COM_PS_NEAREST);
- uv_l = uv_a[2] != 0.f ? fabsf(inputUV[0] - uv_a[0]) : 0.f;
- uv_r = uv_b[2] != 0.f ? fabsf(inputUV[0] - uv_b[0]) : 0.f;
- uv_u = uv_a[2] != 0.f ? fabsf(inputUV[1] - uv_a[1]) : 0.f;
- uv_d = uv_b[2] != 0.f ? fabsf(inputUV[1] - uv_b[1]) : 0.f;
-
- dx += 0.25f * (uv_l + uv_r);
- dy += 0.25f * (uv_u + uv_d);
-
- this->m_inputUVProgram->read(uv_a, x + 1, y - 1, COM_PS_NEAREST);
- this->m_inputUVProgram->read(uv_b, x + 1, y + 1, COM_PS_NEAREST);
- uv_l = uv_a[2] != 0.f ? fabsf(inputUV[0] - uv_a[0]) : 0.f;
- uv_r = uv_b[2] != 0.f ? fabsf(inputUV[0] - uv_b[0]) : 0.f;
- uv_u = uv_a[2] != 0.f ? fabsf(inputUV[1] - uv_a[1]) : 0.f;
- uv_d = uv_b[2] != 0.f ? fabsf(inputUV[1] - uv_b[1]) : 0.f;
-
- dx += 0.25f * (uv_l + uv_r);
- dy += 0.25f * (uv_u + uv_d);
-
/* UV to alpha threshold */
const float threshold = this->m_alpha * 0.05f;
float alpha = 1.0f - threshold * (dx + dy);
if (alpha < 0.f) alpha = 0.f;
else alpha *= inputUV[2];
- /* should use mipmap */
- dx = min(dx, 0.2f);
- dy = min(dy, 0.2f);
-
-
/* EWA filtering */
u = inputUV[0] * this->m_inputColorProgram->getWidth();
v = inputUV[1] * this->m_inputColorProgram->getHeight();
diff --git a/source/blender/compositor/operations/COM_MixAddOperation.cpp b/source/blender/compositor/operations/COM_MixAddOperation.cpp
deleted file mode 100644
index 4e0876439c0..00000000000
--- a/source/blender/compositor/operations/COM_MixAddOperation.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixAddOperation.h"
-
-MixAddOperation::MixAddOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixAddOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- output[0] = inputColor1[0] + value * inputColor2[0];
- output[1] = inputColor1[1] + value * inputColor2[1];
- output[2] = inputColor1[2] + value * inputColor2[2];
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
-
diff --git a/source/blender/compositor/operations/COM_MixBaseOperation.cpp b/source/blender/compositor/operations/COM_MixBaseOperation.cpp
deleted file mode 100644
index 5b455338bb0..00000000000
--- a/source/blender/compositor/operations/COM_MixBaseOperation.cpp
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixBaseOperation.h"
-
-MixBaseOperation::MixBaseOperation() : NodeOperation()
-{
- this->addInputSocket(COM_DT_VALUE);
- this->addInputSocket(COM_DT_COLOR);
- this->addInputSocket(COM_DT_COLOR);
- this->addOutputSocket(COM_DT_COLOR);
- this->m_inputValueOperation = NULL;
- this->m_inputColor1Operation = NULL;
- this->m_inputColor2Operation = NULL;
- this->setUseValueAlphaMultiply(false);
- this->setUseClamp(false);
-}
-
-void MixBaseOperation::initExecution()
-{
- this->m_inputValueOperation = this->getInputSocketReader(0);
- this->m_inputColor1Operation = this->getInputSocketReader(1);
- this->m_inputColor2Operation = this->getInputSocketReader(2);
-}
-
-void MixBaseOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- float valuem = 1.0f - value;
- output[0] = valuem * (inputColor1[0]) + value * (inputColor2[0]);
- output[1] = valuem * (inputColor1[1]) + value * (inputColor2[1]);
- output[2] = valuem * (inputColor1[2]) + value * (inputColor2[2]);
- output[3] = inputColor1[3];
-}
-
-void MixBaseOperation::determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2])
-{
- InputSocket *socket;
- unsigned int tempPreferredResolution[2] = {0, 0};
- unsigned int tempResolution[2];
-
- socket = this->getInputSocket(1);
- socket->determineResolution(tempResolution, tempPreferredResolution);
- if ((tempResolution[0] != 0) && (tempResolution[1] != 0)) {
- this->setResolutionInputSocketIndex(1);
- }
- else {
- socket = this->getInputSocket(2);
- socket->determineResolution(tempResolution, tempPreferredResolution);
- if ((tempResolution[0] != 0) && (tempResolution[1] != 0)) {
- this->setResolutionInputSocketIndex(2);
- }
- else {
- this->setResolutionInputSocketIndex(0);
- }
- }
- NodeOperation::determineResolution(resolution, preferredResolution);
-}
-
-void MixBaseOperation::deinitExecution()
-{
- this->m_inputValueOperation = NULL;
- this->m_inputColor1Operation = NULL;
- this->m_inputColor2Operation = NULL;
-}
diff --git a/source/blender/compositor/operations/COM_MixBaseOperation.h b/source/blender/compositor/operations/COM_MixBaseOperation.h
deleted file mode 100644
index 3c0c0778190..00000000000
--- a/source/blender/compositor/operations/COM_MixBaseOperation.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixBaseOperation_h
-#define _COM_MixBaseOperation_h
-#include "COM_NodeOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixBaseOperation : public NodeOperation {
-protected:
- /**
- * Prefetched reference to the inputProgram
- */
- SocketReader *m_inputValueOperation;
- SocketReader *m_inputColor1Operation;
- SocketReader *m_inputColor2Operation;
- bool m_valueAlphaMultiply;
- bool m_useClamp;
-
- inline void clampIfNeeded(float color[4])
- {
- if (m_useClamp) {
- CLAMP(color[0], 0.0f, 1.0f);
- CLAMP(color[1], 0.0f, 1.0f);
- CLAMP(color[2], 0.0f, 1.0f);
- CLAMP(color[3], 0.0f, 1.0f);
- }
- }
-
-public:
- /**
- * Default constructor
- */
- MixBaseOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
- /**
- * Initialize the execution
- */
- void initExecution();
-
- /**
- * Deinitialize the execution
- */
- void deinitExecution();
-
- void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]);
-
-
- void setUseValueAlphaMultiply(const bool value) { this->m_valueAlphaMultiply = value; }
- bool useValueAlphaMultiply() { return this->m_valueAlphaMultiply; }
- void setUseClamp(bool value) { this->m_useClamp = value; }
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixBlendOperation.cpp b/source/blender/compositor/operations/COM_MixBlendOperation.cpp
deleted file mode 100644
index 0ca7d460064..00000000000
--- a/source/blender/compositor/operations/COM_MixBlendOperation.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixBlendOperation.h"
-
-MixBlendOperation::MixBlendOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixBlendOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
- float value;
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
- value = inputValue[0];
-
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- float valuem = 1.0f - value;
- output[0] = valuem * (inputColor1[0]) + value * (inputColor2[0]);
- output[1] = valuem * (inputColor1[1]) + value * (inputColor2[1]);
- output[2] = valuem * (inputColor1[2]) + value * (inputColor2[2]);
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
diff --git a/source/blender/compositor/operations/COM_MixBurnOperation.cpp b/source/blender/compositor/operations/COM_MixBurnOperation.cpp
deleted file mode 100644
index d4422c6cc6a..00000000000
--- a/source/blender/compositor/operations/COM_MixBurnOperation.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixBurnOperation.h"
-
-MixBurnOperation::MixBurnOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixBurnOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
- float tmp;
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- float valuem = 1.0f - value;
-
- tmp = valuem + value * inputColor2[0];
- if (tmp <= 0.0f)
- output[0] = 0.0f;
- else {
- tmp = 1.0f - (1.0f - inputColor1[0]) / tmp;
- if (tmp < 0.0f)
- output[0] = 0.0f;
- else if (tmp > 1.0f)
- output[0] = 1.0f;
- else
- output[0] = tmp;
- }
-
- tmp = valuem + value * inputColor2[1];
- if (tmp <= 0.0f)
- output[1] = 0.0f;
- else {
- tmp = 1.0f - (1.0f - inputColor1[1]) / tmp;
- if (tmp < 0.0f)
- output[1] = 0.0f;
- else if (tmp > 1.0f)
- output[1] = 1.0f;
- else
- output[1] = tmp;
- }
-
- tmp = valuem + value * inputColor2[2];
- if (tmp <= 0.0f)
- output[2] = 0.0f;
- else {
- tmp = 1.0f - (1.0f - inputColor1[2]) / tmp;
- if (tmp < 0.0f)
- output[2] = 0.0f;
- else if (tmp > 1.0f)
- output[2] = 1.0f;
- else
- output[2] = tmp;
- }
-
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
-
diff --git a/source/blender/compositor/operations/COM_MixColorOperation.cpp b/source/blender/compositor/operations/COM_MixColorOperation.cpp
deleted file mode 100644
index 6919a636aeb..00000000000
--- a/source/blender/compositor/operations/COM_MixColorOperation.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixColorOperation.h"
-
-extern "C" {
- #include "BLI_math.h"
-}
-
-MixColorOperation::MixColorOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixColorOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- float valuem = 1.0f - value;
-
- float colH, colS, colV;
- rgb_to_hsv(inputColor2[0], inputColor2[1], inputColor2[2], &colH, &colS, &colV);
- if (colS != 0.0f) {
- float rH, rS, rV;
- float tmpr, tmpg, tmpb;
- rgb_to_hsv(inputColor1[0], inputColor1[1], inputColor1[2], &rH, &rS, &rV);
- hsv_to_rgb(colH, colS, rV, &tmpr, &tmpg, &tmpb);
- output[0] = (valuem * inputColor1[0]) + (value * tmpr);
- output[1] = (valuem * inputColor1[1]) + (value * tmpg);
- output[2] = (valuem * inputColor1[2]) + (value * tmpb);
- }
- else {
- copy_v3_v3(output, inputColor1);
- }
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
-
diff --git a/source/blender/compositor/operations/COM_MixColorOperation.h b/source/blender/compositor/operations/COM_MixColorOperation.h
deleted file mode 100644
index 1409d726f03..00000000000
--- a/source/blender/compositor/operations/COM_MixColorOperation.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixColorOperation_h
-#define _COM_MixColorOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixColorOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixColorOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixDarkenOperation.cpp b/source/blender/compositor/operations/COM_MixDarkenOperation.cpp
deleted file mode 100644
index d56d9fdf122..00000000000
--- a/source/blender/compositor/operations/COM_MixDarkenOperation.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixDarkenOperation.h"
-
-MixDarkenOperation::MixDarkenOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixDarkenOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- float valuem = 1.0f - value;
- float tmp;
- tmp = inputColor2[0] + ((1.0f - inputColor2[0]) * valuem);
- if (tmp < inputColor1[0]) output[0] = tmp;
- else output[0] = inputColor1[0];
- tmp = inputColor2[1] + ((1.0f - inputColor2[1]) * valuem);
- if (tmp < inputColor1[1]) output[1] = tmp;
- else output[1] = inputColor1[1];
- tmp = inputColor2[2] + ((1.0f - inputColor2[2]) * valuem);
- if (tmp < inputColor1[2]) output[2] = tmp;
- else output[2] = inputColor1[2];
-
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
-
diff --git a/source/blender/compositor/operations/COM_MixDarkenOperation.h b/source/blender/compositor/operations/COM_MixDarkenOperation.h
deleted file mode 100644
index f9c35fa364b..00000000000
--- a/source/blender/compositor/operations/COM_MixDarkenOperation.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixDarkenOperation_h
-#define _COM_MixDarkenOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixDarkenOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixDarkenOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixDifferenceOperation.cpp b/source/blender/compositor/operations/COM_MixDifferenceOperation.cpp
deleted file mode 100644
index 13494401c60..00000000000
--- a/source/blender/compositor/operations/COM_MixDifferenceOperation.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixDifferenceOperation.h"
-#include "BLI_math.h"
-
-MixDifferenceOperation::MixDifferenceOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixDifferenceOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- float valuem = 1.0f - value;
- output[0] = valuem * inputColor1[0] + value *fabsf(inputColor1[0] - inputColor2[0]);
- output[1] = valuem * inputColor1[1] + value *fabsf(inputColor1[1] - inputColor2[1]);
- output[2] = valuem * inputColor1[2] + value *fabsf(inputColor1[2] - inputColor2[2]);
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
-
diff --git a/source/blender/compositor/operations/COM_MixDifferenceOperation.h b/source/blender/compositor/operations/COM_MixDifferenceOperation.h
deleted file mode 100644
index 7e4bf3c675c..00000000000
--- a/source/blender/compositor/operations/COM_MixDifferenceOperation.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixDifferenceOperation_h
-#define _COM_MixDifferenceOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixDifferenceOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixDifferenceOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixDivideOperation.cpp b/source/blender/compositor/operations/COM_MixDivideOperation.cpp
deleted file mode 100644
index 3e0eb66565c..00000000000
--- a/source/blender/compositor/operations/COM_MixDivideOperation.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixDivideOperation.h"
-
-MixDivideOperation::MixDivideOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixDivideOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- float valuem = 1.0f - value;
-
- if (inputColor2[0] != 0.0f)
- output[0] = valuem * (inputColor1[0]) + value * (inputColor1[0]) / inputColor2[0];
- else
- output[0] = 0.0f;
- if (inputColor2[1] != 0.0f)
- output[1] = valuem * (inputColor1[1]) + value * (inputColor1[1]) / inputColor2[1];
- else
- output[1] = 0.0f;
- if (inputColor2[2] != 0.0f)
- output[2] = valuem * (inputColor1[2]) + value * (inputColor1[2]) / inputColor2[2];
- else
- output[2] = 0.0f;
-
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
-
diff --git a/source/blender/compositor/operations/COM_MixDivideOperation.h b/source/blender/compositor/operations/COM_MixDivideOperation.h
deleted file mode 100644
index f543265075b..00000000000
--- a/source/blender/compositor/operations/COM_MixDivideOperation.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixDivideOperation_h
-#define _COM_MixDivideOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixDivideOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixDivideOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixDodgeOperation.cpp b/source/blender/compositor/operations/COM_MixDodgeOperation.cpp
deleted file mode 100644
index acb39f665ff..00000000000
--- a/source/blender/compositor/operations/COM_MixDodgeOperation.cpp
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixDodgeOperation.h"
-
-MixDodgeOperation::MixDodgeOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixDodgeOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
- float tmp;
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
-
- if (inputColor1[0] != 0.0f) {
- tmp = 1.0f - value * inputColor2[0];
- if (tmp <= 0.0f)
- output[0] = 1.0f;
- else {
- tmp = inputColor1[0] / tmp;
- if (tmp > 1.0f)
- output[0] = 1.0f;
- else
- output[0] = tmp;
- }
- }
- else
- output[0] = 0.0f;
-
- if (inputColor1[1] != 0.0f) {
- tmp = 1.0f - value * inputColor2[1];
- if (tmp <= 0.0f)
- output[1] = 1.0f;
- else {
- tmp = inputColor1[1] / tmp;
- if (tmp > 1.0f)
- output[1] = 1.0f;
- else
- output[1] = tmp;
- }
- }
- else
- output[1] = 0.0f;
-
- if (inputColor1[2] != 0.0f) {
- tmp = 1.0f - value * inputColor2[2];
- if (tmp <= 0.0f)
- output[2] = 1.0f;
- else {
- tmp = inputColor1[2] / tmp;
- if (tmp > 1.0f)
- output[2] = 1.0f;
- else
- output[2] = tmp;
- }
- }
- else
- output[2] = 0.0f;
-
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
-
diff --git a/source/blender/compositor/operations/COM_MixDodgeOperation.h b/source/blender/compositor/operations/COM_MixDodgeOperation.h
deleted file mode 100644
index 9a285c675c5..00000000000
--- a/source/blender/compositor/operations/COM_MixDodgeOperation.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixDodgeOperation_h
-#define _COM_MixDodgeOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixDodgeOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixDodgeOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixGlareOperation.cpp b/source/blender/compositor/operations/COM_MixGlareOperation.cpp
deleted file mode 100644
index 1c6555206da..00000000000
--- a/source/blender/compositor/operations/COM_MixGlareOperation.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2011, Glareer Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixGlareOperation.h"
-
-MixGlareOperation::MixGlareOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixGlareOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
- float value;
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
- value = inputValue[0];
- float mf = 2.f - 2.f * fabsf(value - 0.5f);
-
- if (inputColor1[0] < 0.0f) inputColor1[0] = 0.0f;
- if (inputColor1[1] < 0.0f) inputColor1[1] = 0.0f;
- if (inputColor1[2] < 0.0f) inputColor1[2] = 0.0f;
-
- output[0] = mf * max(inputColor1[0] + value * (inputColor2[0] - inputColor1[0]), 0.0f);
- output[1] = mf * max(inputColor1[1] + value * (inputColor2[1] - inputColor1[1]), 0.0f);
- output[2] = mf * max(inputColor1[2] + value * (inputColor2[2] - inputColor1[2]), 0.0f);
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
diff --git a/source/blender/compositor/operations/COM_MixGlareOperation.h b/source/blender/compositor/operations/COM_MixGlareOperation.h
deleted file mode 100644
index 99d478e347d..00000000000
--- a/source/blender/compositor/operations/COM_MixGlareOperation.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2011, Glareer Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixGlareOperation_h
-#define _COM_MixGlareOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixGlareOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixGlareOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixHueOperation.cpp b/source/blender/compositor/operations/COM_MixHueOperation.cpp
deleted file mode 100644
index 64c88592b93..00000000000
--- a/source/blender/compositor/operations/COM_MixHueOperation.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixHueOperation.h"
-
-extern "C" {
- #include "BLI_math.h"
-}
-
-MixHueOperation::MixHueOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixHueOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- float valuem = 1.0f - value;
-
- float colH, colS, colV;
- rgb_to_hsv(inputColor2[0], inputColor2[1], inputColor2[2], &colH, &colS, &colV);
- if (colS != 0.0f) {
- float rH, rS, rV;
- float tmpr, tmpg, tmpb;
- rgb_to_hsv(inputColor1[0], inputColor1[1], inputColor1[2], &rH, &rS, &rV);
- hsv_to_rgb(colH, rS, rV, &tmpr, &tmpg, &tmpb);
- output[0] = valuem * (inputColor1[0]) + value * tmpr;
- output[1] = valuem * (inputColor1[1]) + value * tmpg;
- output[2] = valuem * (inputColor1[2]) + value * tmpb;
- }
- else {
- copy_v3_v3(output, inputColor1);
- }
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
diff --git a/source/blender/compositor/operations/COM_MixHueOperation.h b/source/blender/compositor/operations/COM_MixHueOperation.h
deleted file mode 100644
index d9864bbe3dc..00000000000
--- a/source/blender/compositor/operations/COM_MixHueOperation.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixHueOperation_h
-#define _COM_MixHueOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixHueOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixHueOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixLightenOperation.cpp b/source/blender/compositor/operations/COM_MixLightenOperation.cpp
deleted file mode 100644
index a468fb39442..00000000000
--- a/source/blender/compositor/operations/COM_MixLightenOperation.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixLightenOperation.h"
-
-MixLightenOperation::MixLightenOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixLightenOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- float tmp;
- tmp = value * inputColor2[0];
- if (tmp > inputColor1[0]) output[0] = tmp;
- else output[0] = inputColor1[0];
- tmp = value * inputColor2[1];
- if (tmp > inputColor1[1]) output[1] = tmp;
- else output[1] = inputColor1[1];
- tmp = value * inputColor2[2];
- if (tmp > inputColor1[2]) output[2] = tmp;
- else output[2] = inputColor1[2];
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
-
diff --git a/source/blender/compositor/operations/COM_MixLightenOperation.h b/source/blender/compositor/operations/COM_MixLightenOperation.h
deleted file mode 100644
index 5f08a067e11..00000000000
--- a/source/blender/compositor/operations/COM_MixLightenOperation.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixLightenOperation_h
-#define _COM_MixLightenOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixLightenOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixLightenOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixLinearLightOperation.cpp b/source/blender/compositor/operations/COM_MixLinearLightOperation.cpp
deleted file mode 100644
index e1b5e040f0f..00000000000
--- a/source/blender/compositor/operations/COM_MixLinearLightOperation.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixLinearLightOperation.h"
-
-MixLinearLightOperation::MixLinearLightOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixLinearLightOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- if (inputColor2[0] > 0.5f)
- output[0] = inputColor1[0] + value * (2.0f * (inputColor2[0] - 0.5f));
- else
- output[0] = inputColor1[0] + value * (2.0f * (inputColor2[0]) - 1.0f);
- if (inputColor2[1] > 0.5f)
- output[1] = inputColor1[1] + value * (2.0f * (inputColor2[1] - 0.5f));
- else
- output[1] = inputColor1[1] + value * (2.0f * (inputColor2[1]) - 1.0f);
- if (inputColor2[2] > 0.5f)
- output[2] = inputColor1[2] + value * (2.0f * (inputColor2[2] - 0.5f));
- else
- output[2] = inputColor1[2] + value * (2.0f * (inputColor2[2]) - 1.0f);
-
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
diff --git a/source/blender/compositor/operations/COM_MixLinearLightOperation.h b/source/blender/compositor/operations/COM_MixLinearLightOperation.h
deleted file mode 100644
index 35451a9f3db..00000000000
--- a/source/blender/compositor/operations/COM_MixLinearLightOperation.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixLinearLightOperation_h
-#define _COM_MixLinearLightOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixLinearLightOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixLinearLightOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixMultiplyOperation.cpp b/source/blender/compositor/operations/COM_MixMultiplyOperation.cpp
deleted file mode 100644
index e53addb7041..00000000000
--- a/source/blender/compositor/operations/COM_MixMultiplyOperation.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixMultiplyOperation.h"
-
-MixMultiplyOperation::MixMultiplyOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixMultiplyOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- float valuem = 1.0f - value;
- output[0] = inputColor1[0] * (valuem + value * inputColor2[0]);
- output[1] = inputColor1[1] * (valuem + value * inputColor2[1]);
- output[2] = inputColor1[2] * (valuem + value * inputColor2[2]);
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
-
diff --git a/source/blender/compositor/operations/COM_MixMultiplyOperation.h b/source/blender/compositor/operations/COM_MixMultiplyOperation.h
deleted file mode 100644
index cdd56bd2f39..00000000000
--- a/source/blender/compositor/operations/COM_MixMultiplyOperation.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixMultiplyOperation_h
-#define _COM_MixMultiplyOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixMultiplyOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixMultiplyOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixOperation.cpp b/source/blender/compositor/operations/COM_MixOperation.cpp
new file mode 100644
index 00000000000..f094e93f147
--- /dev/null
+++ b/source/blender/compositor/operations/COM_MixOperation.cpp
@@ -0,0 +1,848 @@
+/*
+ * Copyright 2011, Blender Foundation.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor:
+ * Jeroen Bakker
+ * Monique Dewanchand
+ */
+
+#include "COM_MixOperation.h"
+
+extern "C" {
+ #include "BLI_math.h"
+}
+
+/* ******** Mix Base Operation ******** */
+
+MixBaseOperation::MixBaseOperation() : NodeOperation()
+{
+ this->addInputSocket(COM_DT_VALUE);
+ this->addInputSocket(COM_DT_COLOR);
+ this->addInputSocket(COM_DT_COLOR);
+ this->addOutputSocket(COM_DT_COLOR);
+ this->m_inputValueOperation = NULL;
+ this->m_inputColor1Operation = NULL;
+ this->m_inputColor2Operation = NULL;
+ this->setUseValueAlphaMultiply(false);
+ this->setUseClamp(false);
+}
+
+void MixBaseOperation::initExecution()
+{
+ this->m_inputValueOperation = this->getInputSocketReader(0);
+ this->m_inputColor1Operation = this->getInputSocketReader(1);
+ this->m_inputColor2Operation = this->getInputSocketReader(2);
+}
+
+void MixBaseOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ float valuem = 1.0f - value;
+ output[0] = valuem * (inputColor1[0]) + value * (inputColor2[0]);
+ output[1] = valuem * (inputColor1[1]) + value * (inputColor2[1]);
+ output[2] = valuem * (inputColor1[2]) + value * (inputColor2[2]);
+ output[3] = inputColor1[3];
+}
+
+void MixBaseOperation::determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2])
+{
+ InputSocket *socket;
+ unsigned int tempPreferredResolution[2] = {0, 0};
+ unsigned int tempResolution[2];
+
+ socket = this->getInputSocket(1);
+ socket->determineResolution(tempResolution, tempPreferredResolution);
+ if ((tempResolution[0] != 0) && (tempResolution[1] != 0)) {
+ this->setResolutionInputSocketIndex(1);
+ }
+ else {
+ socket = this->getInputSocket(2);
+ socket->determineResolution(tempResolution, tempPreferredResolution);
+ if ((tempResolution[0] != 0) && (tempResolution[1] != 0)) {
+ this->setResolutionInputSocketIndex(2);
+ }
+ else {
+ this->setResolutionInputSocketIndex(0);
+ }
+ }
+ NodeOperation::determineResolution(resolution, preferredResolution);
+}
+
+void MixBaseOperation::deinitExecution()
+{
+ this->m_inputValueOperation = NULL;
+ this->m_inputColor1Operation = NULL;
+ this->m_inputColor2Operation = NULL;
+}
+
+/* ******** Mix Add Operation ******** */
+
+MixAddOperation::MixAddOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixAddOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ output[0] = inputColor1[0] + value * inputColor2[0];
+ output[1] = inputColor1[1] + value * inputColor2[1];
+ output[2] = inputColor1[2] + value * inputColor2[2];
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Blend Operation ******** */
+
+MixBlendOperation::MixBlendOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixBlendOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+ float value;
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+ value = inputValue[0];
+
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ float valuem = 1.0f - value;
+ output[0] = valuem * (inputColor1[0]) + value * (inputColor2[0]);
+ output[1] = valuem * (inputColor1[1]) + value * (inputColor2[1]);
+ output[2] = valuem * (inputColor1[2]) + value * (inputColor2[2]);
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Burn Operation ******** */
+
+MixBurnOperation::MixBurnOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixBurnOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+ float tmp;
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ float valuem = 1.0f - value;
+
+ tmp = valuem + value * inputColor2[0];
+ if (tmp <= 0.0f)
+ output[0] = 0.0f;
+ else {
+ tmp = 1.0f - (1.0f - inputColor1[0]) / tmp;
+ if (tmp < 0.0f)
+ output[0] = 0.0f;
+ else if (tmp > 1.0f)
+ output[0] = 1.0f;
+ else
+ output[0] = tmp;
+ }
+
+ tmp = valuem + value * inputColor2[1];
+ if (tmp <= 0.0f)
+ output[1] = 0.0f;
+ else {
+ tmp = 1.0f - (1.0f - inputColor1[1]) / tmp;
+ if (tmp < 0.0f)
+ output[1] = 0.0f;
+ else if (tmp > 1.0f)
+ output[1] = 1.0f;
+ else
+ output[1] = tmp;
+ }
+
+ tmp = valuem + value * inputColor2[2];
+ if (tmp <= 0.0f)
+ output[2] = 0.0f;
+ else {
+ tmp = 1.0f - (1.0f - inputColor1[2]) / tmp;
+ if (tmp < 0.0f)
+ output[2] = 0.0f;
+ else if (tmp > 1.0f)
+ output[2] = 1.0f;
+ else
+ output[2] = tmp;
+ }
+
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Color Operation ******** */
+
+MixColorOperation::MixColorOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixColorOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ float valuem = 1.0f - value;
+
+ float colH, colS, colV;
+ rgb_to_hsv(inputColor2[0], inputColor2[1], inputColor2[2], &colH, &colS, &colV);
+ if (colS != 0.0f) {
+ float rH, rS, rV;
+ float tmpr, tmpg, tmpb;
+ rgb_to_hsv(inputColor1[0], inputColor1[1], inputColor1[2], &rH, &rS, &rV);
+ hsv_to_rgb(colH, colS, rV, &tmpr, &tmpg, &tmpb);
+ output[0] = (valuem * inputColor1[0]) + (value * tmpr);
+ output[1] = (valuem * inputColor1[1]) + (value * tmpg);
+ output[2] = (valuem * inputColor1[2]) + (value * tmpb);
+ }
+ else {
+ copy_v3_v3(output, inputColor1);
+ }
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Darken Operation ******** */
+
+MixDarkenOperation::MixDarkenOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixDarkenOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ float valuem = 1.0f - value;
+ float tmp;
+ tmp = inputColor2[0] + ((1.0f - inputColor2[0]) * valuem);
+ if (tmp < inputColor1[0]) output[0] = tmp;
+ else output[0] = inputColor1[0];
+ tmp = inputColor2[1] + ((1.0f - inputColor2[1]) * valuem);
+ if (tmp < inputColor1[1]) output[1] = tmp;
+ else output[1] = inputColor1[1];
+ tmp = inputColor2[2] + ((1.0f - inputColor2[2]) * valuem);
+ if (tmp < inputColor1[2]) output[2] = tmp;
+ else output[2] = inputColor1[2];
+
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Difference Operation ******** */
+
+MixDifferenceOperation::MixDifferenceOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixDifferenceOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ float valuem = 1.0f - value;
+ output[0] = valuem * inputColor1[0] + value *fabsf(inputColor1[0] - inputColor2[0]);
+ output[1] = valuem * inputColor1[1] + value *fabsf(inputColor1[1] - inputColor2[1]);
+ output[2] = valuem * inputColor1[2] + value *fabsf(inputColor1[2] - inputColor2[2]);
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Difference Operation ******** */
+
+MixDivideOperation::MixDivideOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixDivideOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ float valuem = 1.0f - value;
+
+ if (inputColor2[0] != 0.0f)
+ output[0] = valuem * (inputColor1[0]) + value * (inputColor1[0]) / inputColor2[0];
+ else
+ output[0] = 0.0f;
+ if (inputColor2[1] != 0.0f)
+ output[1] = valuem * (inputColor1[1]) + value * (inputColor1[1]) / inputColor2[1];
+ else
+ output[1] = 0.0f;
+ if (inputColor2[2] != 0.0f)
+ output[2] = valuem * (inputColor1[2]) + value * (inputColor1[2]) / inputColor2[2];
+ else
+ output[2] = 0.0f;
+
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Dodge Operation ******** */
+
+MixDodgeOperation::MixDodgeOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixDodgeOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+ float tmp;
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+
+ if (inputColor1[0] != 0.0f) {
+ tmp = 1.0f - value * inputColor2[0];
+ if (tmp <= 0.0f)
+ output[0] = 1.0f;
+ else {
+ tmp = inputColor1[0] / tmp;
+ if (tmp > 1.0f)
+ output[0] = 1.0f;
+ else
+ output[0] = tmp;
+ }
+ }
+ else
+ output[0] = 0.0f;
+
+ if (inputColor1[1] != 0.0f) {
+ tmp = 1.0f - value * inputColor2[1];
+ if (tmp <= 0.0f)
+ output[1] = 1.0f;
+ else {
+ tmp = inputColor1[1] / tmp;
+ if (tmp > 1.0f)
+ output[1] = 1.0f;
+ else
+ output[1] = tmp;
+ }
+ }
+ else
+ output[1] = 0.0f;
+
+ if (inputColor1[2] != 0.0f) {
+ tmp = 1.0f - value * inputColor2[2];
+ if (tmp <= 0.0f)
+ output[2] = 1.0f;
+ else {
+ tmp = inputColor1[2] / tmp;
+ if (tmp > 1.0f)
+ output[2] = 1.0f;
+ else
+ output[2] = tmp;
+ }
+ }
+ else
+ output[2] = 0.0f;
+
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Glare Operation ******** */
+
+MixGlareOperation::MixGlareOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixGlareOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+ float value;
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+ value = inputValue[0];
+ float mf = 2.f - 2.f * fabsf(value - 0.5f);
+
+ if (inputColor1[0] < 0.0f) inputColor1[0] = 0.0f;
+ if (inputColor1[1] < 0.0f) inputColor1[1] = 0.0f;
+ if (inputColor1[2] < 0.0f) inputColor1[2] = 0.0f;
+
+ output[0] = mf * max(inputColor1[0] + value * (inputColor2[0] - inputColor1[0]), 0.0f);
+ output[1] = mf * max(inputColor1[1] + value * (inputColor2[1] - inputColor1[1]), 0.0f);
+ output[2] = mf * max(inputColor1[2] + value * (inputColor2[2] - inputColor1[2]), 0.0f);
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Hue Operation ******** */
+
+MixHueOperation::MixHueOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixHueOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ float valuem = 1.0f - value;
+
+ float colH, colS, colV;
+ rgb_to_hsv(inputColor2[0], inputColor2[1], inputColor2[2], &colH, &colS, &colV);
+ if (colS != 0.0f) {
+ float rH, rS, rV;
+ float tmpr, tmpg, tmpb;
+ rgb_to_hsv(inputColor1[0], inputColor1[1], inputColor1[2], &rH, &rS, &rV);
+ hsv_to_rgb(colH, rS, rV, &tmpr, &tmpg, &tmpb);
+ output[0] = valuem * (inputColor1[0]) + value * tmpr;
+ output[1] = valuem * (inputColor1[1]) + value * tmpg;
+ output[2] = valuem * (inputColor1[2]) + value * tmpb;
+ }
+ else {
+ copy_v3_v3(output, inputColor1);
+ }
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Lighten Operation ******** */
+
+MixLightenOperation::MixLightenOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixLightenOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ float tmp;
+ tmp = value * inputColor2[0];
+ if (tmp > inputColor1[0]) output[0] = tmp;
+ else output[0] = inputColor1[0];
+ tmp = value * inputColor2[1];
+ if (tmp > inputColor1[1]) output[1] = tmp;
+ else output[1] = inputColor1[1];
+ tmp = value * inputColor2[2];
+ if (tmp > inputColor1[2]) output[2] = tmp;
+ else output[2] = inputColor1[2];
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Linear Light Operation ******** */
+
+MixLinearLightOperation::MixLinearLightOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixLinearLightOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ if (inputColor2[0] > 0.5f)
+ output[0] = inputColor1[0] + value * (2.0f * (inputColor2[0] - 0.5f));
+ else
+ output[0] = inputColor1[0] + value * (2.0f * (inputColor2[0]) - 1.0f);
+ if (inputColor2[1] > 0.5f)
+ output[1] = inputColor1[1] + value * (2.0f * (inputColor2[1] - 0.5f));
+ else
+ output[1] = inputColor1[1] + value * (2.0f * (inputColor2[1]) - 1.0f);
+ if (inputColor2[2] > 0.5f)
+ output[2] = inputColor1[2] + value * (2.0f * (inputColor2[2] - 0.5f));
+ else
+ output[2] = inputColor1[2] + value * (2.0f * (inputColor2[2]) - 1.0f);
+
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Multiply Operation ******** */
+
+MixMultiplyOperation::MixMultiplyOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixMultiplyOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ float valuem = 1.0f - value;
+ output[0] = inputColor1[0] * (valuem + value * inputColor2[0]);
+ output[1] = inputColor1[1] * (valuem + value * inputColor2[1]);
+ output[2] = inputColor1[2] * (valuem + value * inputColor2[2]);
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Ovelray Operation ******** */
+
+MixOverlayOperation::MixOverlayOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixOverlayOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+
+ float valuem = 1.0f - value;
+
+ if (inputColor1[0] < 0.5f) {
+ output[0] = inputColor1[0] * (valuem + 2.0f * value * inputColor2[0]);
+ }
+ else {
+ output[0] = 1.0f - (valuem + 2.0f * value * (1.0f - inputColor2[0])) * (1.0f - inputColor1[0]);
+ }
+ if (inputColor1[1] < 0.5f) {
+ output[1] = inputColor1[1] * (valuem + 2.0f * value * inputColor2[1]);
+ }
+ else {
+ output[1] = 1.0f - (valuem + 2.0f * value * (1.0f - inputColor2[1])) * (1.0f - inputColor1[1]);
+ }
+ if (inputColor1[2] < 0.5f) {
+ output[2] = inputColor1[2] * (valuem + 2.0f * value * inputColor2[2]);
+ }
+ else {
+ output[2] = 1.0f - (valuem + 2.0f * value * (1.0f - inputColor2[2])) * (1.0f - inputColor1[2]);
+ }
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Saturation Operation ******** */
+
+MixSaturationOperation::MixSaturationOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixSaturationOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ float valuem = 1.0f - value;
+
+ float rH, rS, rV;
+ rgb_to_hsv(inputColor1[0], inputColor1[1], inputColor1[2], &rH, &rS, &rV);
+ if (rS != 0.0f) {
+ float colH, colS, colV;
+ rgb_to_hsv(inputColor2[0], inputColor2[1], inputColor2[2], &colH, &colS, &colV);
+ hsv_to_rgb(rH, (valuem * rS + value * colS), rV, &output[0], &output[1], &output[2]);
+ }
+ else {
+ copy_v3_v3(output, inputColor1);
+ }
+
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Screen Operation ******** */
+
+MixScreenOperation::MixScreenOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixScreenOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ float valuem = 1.0f - value;
+
+ output[0] = 1.0f - (valuem + value * (1.0f - inputColor2[0])) * (1.0f - inputColor1[0]);
+ output[1] = 1.0f - (valuem + value * (1.0f - inputColor2[1])) * (1.0f - inputColor1[1]);
+ output[2] = 1.0f - (valuem + value * (1.0f - inputColor2[2])) * (1.0f - inputColor1[2]);
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Soft Light Operation ******** */
+
+MixSoftLightOperation::MixSoftLightOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixSoftLightOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) \
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ float valuem = 1.0f - value;
+ float scr, scg, scb;
+
+ /* first calculate non-fac based Screen mix */
+ scr = 1.0f - (1.0f - inputColor2[0]) * (1.0f - inputColor1[0]);
+ scg = 1.0f - (1.0f - inputColor2[1]) * (1.0f - inputColor1[1]);
+ scb = 1.0f - (1.0f - inputColor2[2]) * (1.0f - inputColor1[2]);
+
+ output[0] = valuem * (inputColor1[0]) + value * (((1.0f - inputColor1[0]) * inputColor2[0] * (inputColor1[0])) + (inputColor1[0] * scr));
+ output[1] = valuem * (inputColor1[1]) + value * (((1.0f - inputColor1[1]) * inputColor2[1] * (inputColor1[1])) + (inputColor1[1] * scg));
+ output[2] = valuem * (inputColor1[2]) + value * (((1.0f - inputColor1[2]) * inputColor2[2] * (inputColor1[2])) + (inputColor1[2] * scb));
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Subtract Operation ******** */
+
+MixSubtractOperation::MixSubtractOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixSubtractOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ output[0] = inputColor1[0] - value * (inputColor2[0]);
+ output[1] = inputColor1[1] - value * (inputColor2[1]);
+ output[2] = inputColor1[2] - value * (inputColor2[2]);
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Value Operation ******** */
+
+MixValueOperation::MixValueOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixValueOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ float valuem = 1.0f - value;
+
+ float rH, rS, rV;
+ float colH, colS, colV;
+ rgb_to_hsv(inputColor1[0], inputColor1[1], inputColor1[2], &rH, &rS, &rV);
+ rgb_to_hsv(inputColor2[0], inputColor2[1], inputColor2[2], &colH, &colS, &colV);
+ hsv_to_rgb(rH, rS, (valuem * rV + value * colV), &output[0], &output[1], &output[2]);
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
diff --git a/source/blender/compositor/operations/COM_MixOperation.h b/source/blender/compositor/operations/COM_MixOperation.h
new file mode 100644
index 00000000000..93dbe6f36a6
--- /dev/null
+++ b/source/blender/compositor/operations/COM_MixOperation.h
@@ -0,0 +1,197 @@
+/*
+ * Copyright 2011, Blender Foundation.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor:
+ * Jeroen Bakker
+ * Monique Dewanchand
+ */
+
+#ifndef _COM_MixBaseOperation_h
+#define _COM_MixBaseOperation_h
+#include "COM_NodeOperation.h"
+
+
+/**
+ * All this programs converts an input color to an output value.
+ * it assumes we are in sRGB color space.
+ */
+
+class MixBaseOperation : public NodeOperation {
+protected:
+ /**
+ * Prefetched reference to the inputProgram
+ */
+ SocketReader *m_inputValueOperation;
+ SocketReader *m_inputColor1Operation;
+ SocketReader *m_inputColor2Operation;
+ bool m_valueAlphaMultiply;
+ bool m_useClamp;
+
+ inline void clampIfNeeded(float color[4])
+ {
+ if (m_useClamp) {
+ CLAMP(color[0], 0.0f, 1.0f);
+ CLAMP(color[1], 0.0f, 1.0f);
+ CLAMP(color[2], 0.0f, 1.0f);
+ CLAMP(color[3], 0.0f, 1.0f);
+ }
+ }
+
+public:
+ /**
+ * Default constructor
+ */
+ MixBaseOperation();
+
+ /**
+ * the inner loop of this program
+ */
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+
+ /**
+ * Initialize the execution
+ */
+ void initExecution();
+
+ /**
+ * Deinitialize the execution
+ */
+ void deinitExecution();
+
+ void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]);
+
+
+ void setUseValueAlphaMultiply(const bool value) { this->m_valueAlphaMultiply = value; }
+ bool useValueAlphaMultiply() { return this->m_valueAlphaMultiply; }
+ void setUseClamp(bool value) { this->m_useClamp = value; }
+};
+
+class MixAddOperation : public MixBaseOperation {
+public:
+ MixAddOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixBlendOperation : public MixBaseOperation {
+public:
+ MixBlendOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixBurnOperation : public MixBaseOperation {
+public:
+ MixBurnOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixColorOperation : public MixBaseOperation {
+public:
+ MixColorOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixDarkenOperation : public MixBaseOperation {
+public:
+ MixDarkenOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixDifferenceOperation : public MixBaseOperation {
+public:
+ MixDifferenceOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixDivideOperation : public MixBaseOperation {
+public:
+ MixDivideOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixDodgeOperation : public MixBaseOperation {
+public:
+ MixDodgeOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixGlareOperation : public MixBaseOperation {
+public:
+ MixGlareOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixHueOperation : public MixBaseOperation {
+public:
+ MixHueOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixLightenOperation : public MixBaseOperation {
+public:
+ MixLightenOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixLinearLightOperation : public MixBaseOperation {
+public:
+ MixLinearLightOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixMultiplyOperation : public MixBaseOperation {
+public:
+ MixMultiplyOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixOverlayOperation : public MixBaseOperation {
+public:
+ MixOverlayOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixSaturationOperation : public MixBaseOperation {
+public:
+ MixSaturationOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixScreenOperation : public MixBaseOperation {
+public:
+ MixScreenOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixSoftLightOperation : public MixBaseOperation {
+public:
+ MixSoftLightOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixSubtractOperation : public MixBaseOperation {
+public:
+ MixSubtractOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixValueOperation : public MixBaseOperation {
+public:
+ MixValueOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+#endif
diff --git a/source/blender/compositor/operations/COM_MixOverlayOperation.cpp b/source/blender/compositor/operations/COM_MixOverlayOperation.cpp
deleted file mode 100644
index d5e1c6d1167..00000000000
--- a/source/blender/compositor/operations/COM_MixOverlayOperation.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixOverlayOperation.h"
-
-MixOverlayOperation::MixOverlayOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixOverlayOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
-
- float valuem = 1.0f - value;
-
- if (inputColor1[0] < 0.5f) {
- output[0] = inputColor1[0] * (valuem + 2.0f * value * inputColor2[0]);
- }
- else {
- output[0] = 1.0f - (valuem + 2.0f * value * (1.0f - inputColor2[0])) * (1.0f - inputColor1[0]);
- }
- if (inputColor1[1] < 0.5f) {
- output[1] = inputColor1[1] * (valuem + 2.0f * value * inputColor2[1]);
- }
- else {
- output[1] = 1.0f - (valuem + 2.0f * value * (1.0f - inputColor2[1])) * (1.0f - inputColor1[1]);
- }
- if (inputColor1[2] < 0.5f) {
- output[2] = inputColor1[2] * (valuem + 2.0f * value * inputColor2[2]);
- }
- else {
- output[2] = 1.0f - (valuem + 2.0f * value * (1.0f - inputColor2[2])) * (1.0f - inputColor1[2]);
- }
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
-
diff --git a/source/blender/compositor/operations/COM_MixOverlayOperation.h b/source/blender/compositor/operations/COM_MixOverlayOperation.h
deleted file mode 100644
index 4f2c08ce95f..00000000000
--- a/source/blender/compositor/operations/COM_MixOverlayOperation.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixOverlayOperation_h
-#define _COM_MixOverlayOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixOverlayOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixOverlayOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixSaturationOperation.cpp b/source/blender/compositor/operations/COM_MixSaturationOperation.cpp
deleted file mode 100644
index ca45a1c703a..00000000000
--- a/source/blender/compositor/operations/COM_MixSaturationOperation.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixSaturationOperation.h"
-
-extern "C" {
- #include "BLI_math.h"
-}
-
-MixSaturationOperation::MixSaturationOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixSaturationOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- float valuem = 1.0f - value;
-
- float rH, rS, rV;
- rgb_to_hsv(inputColor1[0], inputColor1[1], inputColor1[2], &rH, &rS, &rV);
- if (rS != 0.0f) {
- float colH, colS, colV;
- rgb_to_hsv(inputColor2[0], inputColor2[1], inputColor2[2], &colH, &colS, &colV);
- hsv_to_rgb(rH, (valuem * rS + value * colS), rV, &output[0], &output[1], &output[2]);
- }
- else {
- copy_v3_v3(output, inputColor1);
- }
-
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
diff --git a/source/blender/compositor/operations/COM_MixSaturationOperation.h b/source/blender/compositor/operations/COM_MixSaturationOperation.h
deleted file mode 100644
index c690db38daf..00000000000
--- a/source/blender/compositor/operations/COM_MixSaturationOperation.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixSaturationOperation_h
-#define _COM_MixSaturationOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixSaturationOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixSaturationOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixScreenOperation.cpp b/source/blender/compositor/operations/COM_MixScreenOperation.cpp
deleted file mode 100644
index 511768a49ad..00000000000
--- a/source/blender/compositor/operations/COM_MixScreenOperation.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixScreenOperation.h"
-
-MixScreenOperation::MixScreenOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixScreenOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- float valuem = 1.0f - value;
-
- output[0] = 1.0f - (valuem + value * (1.0f - inputColor2[0])) * (1.0f - inputColor1[0]);
- output[1] = 1.0f - (valuem + value * (1.0f - inputColor2[1])) * (1.0f - inputColor1[1]);
- output[2] = 1.0f - (valuem + value * (1.0f - inputColor2[2])) * (1.0f - inputColor1[2]);
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
-
diff --git a/source/blender/compositor/operations/COM_MixScreenOperation.h b/source/blender/compositor/operations/COM_MixScreenOperation.h
deleted file mode 100644
index 5ba3cf769bb..00000000000
--- a/source/blender/compositor/operations/COM_MixScreenOperation.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixScreenOperation_h
-#define _COM_MixScreenOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixScreenOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixScreenOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixSoftLightOperation.cpp b/source/blender/compositor/operations/COM_MixSoftLightOperation.cpp
deleted file mode 100644
index 71d83ce54ea..00000000000
--- a/source/blender/compositor/operations/COM_MixSoftLightOperation.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixSoftLightOperation.h"
-
-MixSoftLightOperation::MixSoftLightOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixSoftLightOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) \
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- float valuem = 1.0f - value;
- float scr, scg, scb;
-
- /* first calculate non-fac based Screen mix */
- scr = 1.0f - (1.0f - inputColor2[0]) * (1.0f - inputColor1[0]);
- scg = 1.0f - (1.0f - inputColor2[1]) * (1.0f - inputColor1[1]);
- scb = 1.0f - (1.0f - inputColor2[2]) * (1.0f - inputColor1[2]);
-
- output[0] = valuem * (inputColor1[0]) + value * (((1.0f - inputColor1[0]) * inputColor2[0] * (inputColor1[0])) + (inputColor1[0] * scr));
- output[1] = valuem * (inputColor1[1]) + value * (((1.0f - inputColor1[1]) * inputColor2[1] * (inputColor1[1])) + (inputColor1[1] * scg));
- output[2] = valuem * (inputColor1[2]) + value * (((1.0f - inputColor1[2]) * inputColor2[2] * (inputColor1[2])) + (inputColor1[2] * scb));
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
-
diff --git a/source/blender/compositor/operations/COM_MixSoftLightOperation.h b/source/blender/compositor/operations/COM_MixSoftLightOperation.h
deleted file mode 100644
index 55f6a70791a..00000000000
--- a/source/blender/compositor/operations/COM_MixSoftLightOperation.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixSoftLightOperation_h
-#define _COM_MixSoftLightOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixSoftLightOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixSoftLightOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixSubtractOperation.cpp b/source/blender/compositor/operations/COM_MixSubtractOperation.cpp
deleted file mode 100644
index e6efe0f62f3..00000000000
--- a/source/blender/compositor/operations/COM_MixSubtractOperation.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixSubtractOperation.h"
-
-MixSubtractOperation::MixSubtractOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixSubtractOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- output[0] = inputColor1[0] - value * (inputColor2[0]);
- output[1] = inputColor1[1] - value * (inputColor2[1]);
- output[2] = inputColor1[2] - value * (inputColor2[2]);
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
-
diff --git a/source/blender/compositor/operations/COM_MixSubtractOperation.h b/source/blender/compositor/operations/COM_MixSubtractOperation.h
deleted file mode 100644
index 046d8d4949b..00000000000
--- a/source/blender/compositor/operations/COM_MixSubtractOperation.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixSubtractOperation_h
-#define _COM_MixSubtractOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixSubtractOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixSubtractOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixValueOperation.cpp b/source/blender/compositor/operations/COM_MixValueOperation.cpp
deleted file mode 100644
index 553041e39bf..00000000000
--- a/source/blender/compositor/operations/COM_MixValueOperation.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixValueOperation.h"
-
-extern "C" {
- #include "BLI_math.h"
-}
-
-MixValueOperation::MixValueOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixValueOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- float valuem = 1.0f - value;
-
- float rH, rS, rV;
- float colH, colS, colV;
- rgb_to_hsv(inputColor1[0], inputColor1[1], inputColor1[2], &rH, &rS, &rV);
- rgb_to_hsv(inputColor2[0], inputColor2[1], inputColor2[2], &colH, &colS, &colV);
- hsv_to_rgb(rH, rS, (valuem * rV + value * colV), &output[0], &output[1], &output[2]);
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
diff --git a/source/blender/compositor/operations/COM_MixValueOperation.h b/source/blender/compositor/operations/COM_MixValueOperation.h
deleted file mode 100644
index 6c3f3ce8072..00000000000
--- a/source/blender/compositor/operations/COM_MixValueOperation.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixValueOperation_h
-#define _COM_MixValueOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixValueOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixValueOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp b/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp
index 1a2a1e77833..e2a95b2e33b 100644
--- a/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp
+++ b/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp
@@ -27,16 +27,15 @@ extern "C" {
#include "IMB_imbuf_types.h"
}
-MultilayerBaseOperation::MultilayerBaseOperation(int pass) : BaseImageOperation()
+MultilayerBaseOperation::MultilayerBaseOperation(int passindex) : BaseImageOperation()
{
- this->m_passId = pass;
+ this->m_passId = passindex;
}
ImBuf *MultilayerBaseOperation::getImBuf()
{
- RenderPass *rpass;
- rpass = (RenderPass *)BLI_findlink(&this->m_renderlayer->passes, this->m_passId);
+ RenderPass *rpass = (RenderPass *)BLI_findlink(&this->m_renderlayer->passes, this->m_passId);
if (rpass) {
- this->m_imageUser->pass = this->m_passId;
+ this->m_imageUser->pass = m_passId;
BKE_image_multilayer_index(this->m_image->rr, this->m_imageUser);
return BaseImageOperation::getImBuf();
}
diff --git a/source/blender/compositor/operations/COM_MultilayerImageOperation.h b/source/blender/compositor/operations/COM_MultilayerImageOperation.h
index 3c498e962b5..065bcc7da1e 100644
--- a/source/blender/compositor/operations/COM_MultilayerImageOperation.h
+++ b/source/blender/compositor/operations/COM_MultilayerImageOperation.h
@@ -37,13 +37,13 @@ public:
/**
* Constructor
*/
- MultilayerBaseOperation(int pass);
+ MultilayerBaseOperation(int passindex);
void setRenderLayer(RenderLayer *renderlayer) { this->m_renderlayer = renderlayer; }
};
class MultilayerColorOperation : public MultilayerBaseOperation {
public:
- MultilayerColorOperation(int pass) : MultilayerBaseOperation(pass) {
+ MultilayerColorOperation(int passindex) : MultilayerBaseOperation(passindex) {
this->addOutputSocket(COM_DT_COLOR);
}
void executePixel(float output[4], float x, float y, PixelSampler sampler);
@@ -51,7 +51,7 @@ public:
class MultilayerValueOperation : public MultilayerBaseOperation {
public:
- MultilayerValueOperation(int pass) : MultilayerBaseOperation(pass) {
+ MultilayerValueOperation(int passindex) : MultilayerBaseOperation(passindex) {
this->addOutputSocket(COM_DT_VALUE);
}
void executePixel(float output[4], float x, float y, PixelSampler sampler);
@@ -59,7 +59,7 @@ public:
class MultilayerVectorOperation : public MultilayerBaseOperation {
public:
- MultilayerVectorOperation(int pass) : MultilayerBaseOperation(pass) {
+ MultilayerVectorOperation(int passindex) : MultilayerBaseOperation(passindex) {
this->addOutputSocket(COM_DT_VECTOR);
}
void executePixel(float output[4], float x, float y, PixelSampler sampler);
diff --git a/source/blender/compositor/operations/COM_OutputFileOperation.cpp b/source/blender/compositor/operations/COM_OutputFileOperation.cpp
index 15e5ab947d4..a5be993f241 100644
--- a/source/blender/compositor/operations/COM_OutputFileOperation.cpp
+++ b/source/blender/compositor/operations/COM_OutputFileOperation.cpp
@@ -138,7 +138,7 @@ void OutputSingleLayerOperation::deinitExecution()
ibuf->mall |= IB_rectfloat;
ibuf->dither = this->m_rd->dither_intensity;
- IMB_colormanagement_imbuf_for_write(ibuf, TRUE, FALSE, m_viewSettings, m_displaySettings,
+ IMB_colormanagement_imbuf_for_write(ibuf, true, false, m_viewSettings, m_displaySettings,
this->m_format);
BKE_makepicstring(filename, this->m_path, bmain->name, this->m_rd->cfra, this->m_format,
@@ -184,15 +184,21 @@ void OutputOpenExrMultiLayerOperation::add_layer(const char *name, DataType data
void OutputOpenExrMultiLayerOperation::initExecution()
{
for (unsigned int i = 0; i < this->m_layers.size(); ++i) {
- this->m_layers[i].imageInput = getInputSocketReader(i);
- this->m_layers[i].outputBuffer = init_buffer(this->getWidth(), this->getHeight(), this->m_layers[i].datatype);
+ SocketReader *reader = getInputSocketReader(i);
+ this->m_layers[i].imageInput = reader;
+ if (reader)
+ this->m_layers[i].outputBuffer = init_buffer(this->getWidth(), this->getHeight(), this->m_layers[i].datatype);
+ else
+ this->m_layers[i].outputBuffer = NULL;
}
}
void OutputOpenExrMultiLayerOperation::executeRegion(rcti *rect, unsigned int tileNumber)
{
for (unsigned int i = 0; i < this->m_layers.size(); ++i) {
- write_buffer_rect(rect, this->m_tree, this->m_layers[i].imageInput, this->m_layers[i].outputBuffer, this->getWidth(), this->m_layers[i].datatype);
+ OutputOpenExrLayer &layer = this->m_layers[i];
+ if (layer.imageInput)
+ write_buffer_rect(rect, this->m_tree, layer.imageInput, layer.outputBuffer, this->getWidth(), layer.datatype);
}
}
@@ -210,6 +216,10 @@ void OutputOpenExrMultiLayerOperation::deinitExecution()
BLI_make_existing_file(filename);
for (unsigned int i = 0; i < this->m_layers.size(); ++i) {
+ OutputOpenExrLayer &layer = this->m_layers[i];
+ if (!layer.imageInput)
+ continue; /* skip unconnected sockets */
+
char channelname[EXR_TOT_MAXNAME];
BLI_strncpy(channelname, this->m_layers[i].name, sizeof(channelname) - 2);
char *channelname_ext = channelname + strlen(channelname);
diff --git a/source/blender/compositor/operations/COM_PlaneTrackMaskOperation.cpp b/source/blender/compositor/operations/COM_PlaneTrackMaskOperation.cpp
index fe794cb769f..8aa1324d8e2 100644
--- a/source/blender/compositor/operations/COM_PlaneTrackMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_PlaneTrackMaskOperation.cpp
@@ -38,15 +38,16 @@ extern "C" {
PlaneTrackMaskOperation::PlaneTrackMaskOperation() : PlaneTrackCommonOperation()
{
this->addOutputSocket(COM_DT_VALUE);
+
+ /* Currently hardcoded to 8 samples. */
+ this->m_osa = 8;
}
void PlaneTrackMaskOperation::initExecution()
{
PlaneTrackCommonOperation::initExecution();
- const int osa = 8;
- this->m_osa = osa;
- BLI_jitter_init(this->m_jitter[0], osa);
+ BLI_jitter_init(this->m_jitter[0], this->m_osa);
}
void PlaneTrackMaskOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
diff --git a/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.cpp b/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.cpp
index 9bbf45682f2..df487a766f3 100644
--- a/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.cpp
+++ b/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.cpp
@@ -93,30 +93,8 @@ BLI_INLINE void resolveUVAndDxDy(const float x, const float y, const float corne
dy = 0.5f * (uv_u + uv_d);
- /* more adaptive sampling, red and green (UV) channels */
- ok1 = resolveUV(x - 1, y - 1, corners, uv_a);
- ok2 = resolveUV(x - 1, y + 1, corners, uv_b);
- uv_l = ok1 ? fabsf(inputUV[0] - uv_a[0]) : 0.f;
- uv_r = ok2 ? fabsf(inputUV[0] - uv_b[0]) : 0.f;
- uv_u = ok1 ? fabsf(inputUV[1] - uv_a[1]) : 0.f;
- uv_d = ok2 ? fabsf(inputUV[1] - uv_b[1]) : 0.f;
-
- dx += 0.25f * (uv_l + uv_r);
- dy += 0.25f * (uv_u + uv_d);
-
- ok1 = resolveUV(x + 1, y - 1, corners, uv_a);
- ok2 = resolveUV(x + 1, y + 1, corners, uv_b);
- uv_l = ok1 ? fabsf(inputUV[0] - uv_a[0]) : 0.f;
- uv_r = ok2 ? fabsf(inputUV[0] - uv_b[0]) : 0.f;
- uv_u = ok1 ? fabsf(inputUV[1] - uv_a[1]) : 0.f;
- uv_d = ok2 ? fabsf(inputUV[1] - uv_b[1]) : 0.f;
-
- dx += 0.25f * (uv_l + uv_r);
- dy += 0.25f * (uv_u + uv_d);
-
- /* should use mipmap */
- *dx_r = min(dx, 0.2f);
- *dy_r = min(dy, 0.2f);
+ *dx_r = dx;
+ *dy_r = dy;
*u_r = inputUV[0];
*v_r = inputUV[1];
@@ -128,6 +106,9 @@ PlaneTrackWarpImageOperation::PlaneTrackWarpImageOperation() : PlaneTrackCommonO
this->addOutputSocket(COM_DT_COLOR);
this->m_pixelReader = NULL;
this->setComplex(true);
+
+ /* Currently hardcoded to 8 samples. */
+ this->m_osa = 8;
}
void PlaneTrackWarpImageOperation::initExecution()
@@ -136,9 +117,7 @@ void PlaneTrackWarpImageOperation::initExecution()
this->m_pixelReader = this->getInputSocketReader(0);
- const int osa = 8;
- this->m_osa = osa;
- BLI_jitter_init(this->m_jitter[0], osa);
+ BLI_jitter_init(this->m_jitter[0], this->m_osa);
}
void PlaneTrackWarpImageOperation::deinitExecution()
@@ -163,14 +142,12 @@ void PlaneTrackWarpImageOperation::executePixel(float output[4], float x, float
u *= this->m_pixelReader->getWidth();
v *= this->m_pixelReader->getHeight();
- this->m_pixelReader->read(current_color, u, v, dx, dy, COM_PS_BICUBIC);
- premul_to_straight_v4(current_color);
+ this->m_pixelReader->read(current_color, u, v, dx, dy, COM_PS_NEAREST);
add_v4_v4(color_accum, current_color);
}
}
mul_v4_v4fl(output, color_accum, 1.0f / this->m_osa);
- straight_to_premul_v4(output);
}
bool PlaneTrackWarpImageOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
diff --git a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
index 5cc02a1ed65..e8b900b9a85 100644
--- a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
+++ b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
@@ -55,11 +55,11 @@ void ProjectorLensDistortionOperation::executePixel(float output[4], int x, int
const float v = (y + 0.5f) / height;
const float u = (x + 0.5f) / width;
MemoryBuffer *inputBuffer = (MemoryBuffer *)data;
- inputBuffer->readCubic(inputValue, (u * width + this->m_kr2) - 0.5f, v * height - 0.5f);
+ inputBuffer->readBilinear(inputValue, (u * width + this->m_kr2) - 0.5f, v * height - 0.5f);
output[0] = inputValue[0];
inputBuffer->read(inputValue, x, y);
output[1] = inputValue[1];
- inputBuffer->readCubic(inputValue, (u * width - this->m_kr2) - 0.5f, v * height - 0.5f);
+ inputBuffer->readBilinear(inputValue, (u * width - this->m_kr2) - 0.5f, v * height - 0.5f);
output[2] = inputValue[2];
output[3] = 1.0f;
}
diff --git a/source/blender/compositor/operations/COM_ReadBufferOperation.cpp b/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
index 03d41edda64..3aeef6bf409 100644
--- a/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
+++ b/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
@@ -27,6 +27,7 @@
ReadBufferOperation::ReadBufferOperation() : NodeOperation()
{
this->addOutputSocket(COM_DT_COLOR);
+ this->m_single_value = false;
this->m_offset = 0;
this->m_buffer = NULL;
}
@@ -47,21 +48,48 @@ void ReadBufferOperation::determineResolution(unsigned int resolution[2], unsign
if (this->m_memoryProxy->getExecutor()) {
this->m_memoryProxy->getExecutor()->setResolution(resolution);
}
+
+ m_single_value = operation->isSingleValue();
}
}
void ReadBufferOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
- if (sampler == COM_PS_NEAREST) {
+ if (m_single_value) {
+ /* write buffer has a single value stored at (0,0) */
+ m_buffer->read(output, 0, 0);
+ }
+ else if (sampler == COM_PS_NEAREST) {
m_buffer->read(output, x, y);
}
else {
- m_buffer->readCubic(output, x, y);
+ m_buffer->readBilinear(output, x, y);
+ }
+}
+
+void ReadBufferOperation::executePixelExtend(float output[4], float x, float y, PixelSampler sampler,
+ MemoryBufferExtend extend_x, MemoryBufferExtend extend_y)
+{
+ if (m_single_value) {
+ /* write buffer has a single value stored at (0,0) */
+ m_buffer->read(output, 0, 0);
+ }
+ else if (sampler == COM_PS_NEAREST) {
+ m_buffer->read(output, x, y, extend_x, extend_y);
+ }
+ else {
+ m_buffer->readBilinear(output, x, y, extend_x, extend_y);
}
}
void ReadBufferOperation::executePixel(float output[4], float x, float y, float dx, float dy, PixelSampler sampler)
{
- m_buffer->readEWA(output, x, y, dx, dy, sampler);
+ if (m_single_value) {
+ /* write buffer has a single value stored at (0,0) */
+ m_buffer->read(output, 0, 0);
+ }
+ else {
+ m_buffer->readEWA(output, x, y, dx, dy, sampler);
+ }
}
bool ReadBufferOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
diff --git a/source/blender/compositor/operations/COM_ReadBufferOperation.h b/source/blender/compositor/operations/COM_ReadBufferOperation.h
index 7e3ac147ee3..7a67056eda6 100644
--- a/source/blender/compositor/operations/COM_ReadBufferOperation.h
+++ b/source/blender/compositor/operations/COM_ReadBufferOperation.h
@@ -29,6 +29,7 @@
class ReadBufferOperation : public NodeOperation {
private:
MemoryProxy *m_memoryProxy;
+ bool m_single_value; /* single value stored in buffer, copied from associated write operation */
unsigned int m_offset;
MemoryBuffer *m_buffer;
public:
@@ -40,10 +41,12 @@ public:
void *initializeTileData(rcti *rect);
void executePixel(float output[4], float x, float y, PixelSampler sampler);
+ void executePixelExtend(float output[4], float x, float y, PixelSampler sampler,
+ MemoryBufferExtend extend_x, MemoryBufferExtend extend_y);
void executePixel(float output[4], float x, float y, float dx, float dy, PixelSampler sampler);
const bool isReadBufferOperation() const { return true; }
void setOffset(unsigned int offset) { this->m_offset = offset; }
- unsigned int getOffset() { return this->m_offset; }
+ unsigned int getOffset() const { return this->m_offset; }
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
MemoryBuffer *getInputMemoryBuffer(MemoryBuffer **memoryBuffers) { return memoryBuffers[this->m_offset]; }
void readResolutionFromWriteBuffer();
diff --git a/source/blender/compositor/operations/COM_RenderLayersAOOperation.h b/source/blender/compositor/operations/COM_RenderLayersAOOperation.h
deleted file mode 100644
index 71b0b885e81..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersAOOperation.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersAOOperation_h
-#define _COM_RenderLayersAOOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersAOOperation : public RenderLayersBaseProg {
-public:
- RenderLayersAOOperation();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersAlphaProg.cpp b/source/blender/compositor/operations/COM_RenderLayersAlphaProg.cpp
deleted file mode 100644
index 74cb506d264..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersAlphaProg.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersAlphaProg.h"
-
-RenderLayersAlphaProg::RenderLayersAlphaProg() : RenderLayersBaseProg(SCE_PASS_COMBINED, 4)
-{
- this->addOutputSocket(COM_DT_VALUE);
-}
-
-void RenderLayersAlphaProg::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- int ix = x;
- int iy = y;
- float *inputBuffer = this->getInputBuffer();
-
- if (inputBuffer == NULL || ix < 0 || iy < 0 || ix >= (int)this->getWidth() || iy >= (int)this->getHeight() ) {
- output[0] = 0.0f;
- output[1] = 0.0f;
- output[2] = 0.0f;
- output[3] = 0.0f;
- }
- else {
- unsigned int offset = (iy * this->getWidth() + ix) * 4;
- output[0] = inputBuffer[offset + 3];
- output[1] = 0.0f;
- output[2] = 0.0f;
- output[3] = 0.0f;
- }
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersAlphaProg.h b/source/blender/compositor/operations/COM_RenderLayersAlphaProg.h
deleted file mode 100644
index 36668bc9338..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersAlphaProg.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersAlphaProg_h
-#define _COM_RenderLayersAlphaProg_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersAlphaProg : public RenderLayersBaseProg {
-public:
- RenderLayersAlphaProg();
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersBaseProg.cpp b/source/blender/compositor/operations/COM_RenderLayersBaseProg.cpp
deleted file mode 100644
index b50dca33f3b..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersBaseProg.cpp
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersBaseProg.h"
-
-#include "BLI_listbase.h"
-#include "DNA_scene_types.h"
-
-extern "C" {
- #include "RE_pipeline.h"
- #include "RE_shader_ext.h"
- #include "RE_render_ext.h"
-}
-
-RenderLayersBaseProg::RenderLayersBaseProg(int renderpass, int elementsize) : NodeOperation()
-{
- this->m_renderpass = renderpass;
- this->setScene(NULL);
- this->m_inputBuffer = NULL;
- this->m_elementsize = elementsize;
- this->m_rd = NULL;
-}
-
-
-void RenderLayersBaseProg::initExecution()
-{
- Scene *scene = this->getScene();
- Render *re = (scene) ? RE_GetRender(scene->id.name) : NULL;
- RenderResult *rr = NULL;
-
- if (re)
- rr = RE_AcquireResultRead(re);
-
- if (rr) {
- SceneRenderLayer *srl = (SceneRenderLayer *)BLI_findlink(&scene->r.layers, getLayerId());
- if (srl) {
-
- RenderLayer *rl = RE_GetRenderLayer(rr, srl->name);
- if (rl && rl->rectf) {
- this->m_inputBuffer = RE_RenderLayerGetPass(rl, this->m_renderpass);
-
- if (this->m_inputBuffer == NULL || this->m_renderpass == SCE_PASS_COMBINED) {
- this->m_inputBuffer = rl->rectf;
- }
- }
- }
- }
- if (re) {
- RE_ReleaseResult(re);
- re = NULL;
- }
-}
-
-void RenderLayersBaseProg::doInterpolation(float output[4], float x, float y, PixelSampler sampler)
-{
- unsigned int offset;
- int ix, iy;
- int width = this->getWidth(), height = this->getHeight();
-
- switch (sampler) {
- case COM_PS_NEAREST:
- ix = x;
- iy = y;
- offset = (iy * width + ix) * this->m_elementsize;
-
- if (this->m_elementsize == 1)
- output[0] = this->m_inputBuffer[offset];
- else if (this->m_elementsize == 3)
- copy_v3_v3(output, &this->m_inputBuffer[offset]);
- else
- copy_v4_v4(output, &this->m_inputBuffer[offset]);
-
- break;
-
- case COM_PS_BILINEAR:
- BLI_bilinear_interpolation_fl(this->m_inputBuffer, output, width, height, this->m_elementsize, x, y);
- break;
-
- case COM_PS_BICUBIC:
- BLI_bicubic_interpolation_fl(this->m_inputBuffer, output, width, height, this->m_elementsize, x, y);
- break;
- }
-
- if (this->m_elementsize == 1) {
- output[1] = 0.0f;
- output[2] = 0.0f;
- output[3] = 0.0f;
- }
- else if (this->m_elementsize == 3) {
- output[3] = 1.0f;
- }
-}
-
-void RenderLayersBaseProg::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
-#if 0
- const RenderData *rd = this->m_rd;
-
- int dx = 0, dy = 0;
-
- if (rd->mode & R_BORDER && rd->mode & R_CROP) {
- /* see comment in executeRegion describing coordinate mapping,
- * here it simply goes other way around
- */
- int full_width = rd->xsch * rd->size / 100;
- int full_height = rd->ysch * rd->size / 100;
-
- dx = rd->border.xmin * full_width - (full_width - this->getWidth()) / 2.0f;
- dy = rd->border.ymin * full_height - (full_height - this->getHeight()) / 2.0f;
- }
-
- int ix = x - dx;
- int iy = y - dy;
-#else
- int ix = x;
- int iy = y;
-#endif
-
- if (this->m_inputBuffer == NULL || ix < 0 || iy < 0 || ix >= (int)this->getWidth() || iy >= (int)this->getHeight() ) {
- zero_v4(output);
- }
- else {
- doInterpolation(output, ix, iy, sampler);
- }
-}
-
-void RenderLayersBaseProg::deinitExecution()
-{
- this->m_inputBuffer = NULL;
-}
-
-void RenderLayersBaseProg::determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2])
-{
- Scene *sce = this->getScene();
- Render *re = (sce) ? RE_GetRender(sce->id.name) : NULL;
- RenderResult *rr = NULL;
-
- resolution[0] = 0;
- resolution[1] = 0;
-
- if (re)
- rr = RE_AcquireResultRead(re);
-
- if (rr) {
- SceneRenderLayer *srl = (SceneRenderLayer *)BLI_findlink(&sce->r.layers, getLayerId());
- if (srl) {
- RenderLayer *rl = RE_GetRenderLayer(rr, srl->name);
- if (rl && rl->rectf) {
- resolution[0] = rl->rectx;
- resolution[1] = rl->recty;
- }
- }
- }
-
- if (re)
- RE_ReleaseResult(re);
-
-}
-
diff --git a/source/blender/compositor/operations/COM_RenderLayersColorOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersColorOperation.cpp
deleted file mode 100644
index 3083c37c2bb..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersColorOperation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersColorOperation.h"
-
-RenderLayersColorOperation::RenderLayersColorOperation() : RenderLayersBaseProg(SCE_PASS_RGBA, 4)
-{
- this->addOutputSocket(COM_DT_COLOR);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersCyclesOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersCyclesOperation.cpp
deleted file mode 100644
index b056896994e..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersCyclesOperation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersCyclesOperation.h"
-
-RenderLayersCyclesOperation::RenderLayersCyclesOperation(int pass) : RenderLayersBaseProg(pass, 3)
-{
- this->addOutputSocket(COM_DT_COLOR);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersDepthProg.cpp b/source/blender/compositor/operations/COM_RenderLayersDepthProg.cpp
deleted file mode 100644
index ae5fc3b2254..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersDepthProg.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersDepthProg.h"
-
-RenderLayersDepthProg::RenderLayersDepthProg() : RenderLayersBaseProg(SCE_PASS_Z, 1)
-{
- this->addOutputSocket(COM_DT_VALUE);
-}
-
diff --git a/source/blender/compositor/operations/COM_RenderLayersDiffuseOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersDiffuseOperation.cpp
deleted file mode 100644
index 6baa25e5600..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersDiffuseOperation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersDiffuseOperation.h"
-
-RenderLayersDiffuseOperation::RenderLayersDiffuseOperation() : RenderLayersBaseProg(SCE_PASS_DIFFUSE, 3)
-{
- this->addOutputSocket(COM_DT_COLOR);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersDiffuseOperation.h b/source/blender/compositor/operations/COM_RenderLayersDiffuseOperation.h
deleted file mode 100644
index 8c20d6f497d..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersDiffuseOperation.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersDiffuseOperation_h
-#define _COM_RenderLayersDiffuseOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersDiffuseOperation : public RenderLayersBaseProg {
-public:
- RenderLayersDiffuseOperation();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersEmitOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersEmitOperation.cpp
deleted file mode 100644
index 1b03a4e169f..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersEmitOperation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersEmitOperation.h"
-
-RenderLayersEmitOperation::RenderLayersEmitOperation() : RenderLayersBaseProg(SCE_PASS_EMIT, 3)
-{
- this->addOutputSocket(COM_DT_COLOR);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersEmitOperation.h b/source/blender/compositor/operations/COM_RenderLayersEmitOperation.h
deleted file mode 100644
index c003cb2f87b..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersEmitOperation.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersEmitOperation_h
-#define _COM_RenderLayersEmitOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersEmitOperation : public RenderLayersBaseProg {
-public:
- RenderLayersEmitOperation();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersEnvironmentOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersEnvironmentOperation.cpp
deleted file mode 100644
index f4d6dc7353b..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersEnvironmentOperation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersEnvironmentOperation.h"
-
-RenderLayersEnvironmentOperation::RenderLayersEnvironmentOperation() : RenderLayersBaseProg(SCE_PASS_ENVIRONMENT, 3)
-{
- this->addOutputSocket(COM_DT_COLOR);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersEnvironmentOperation.h b/source/blender/compositor/operations/COM_RenderLayersEnvironmentOperation.h
deleted file mode 100644
index b9310a1778b..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersEnvironmentOperation.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersEnvironmentOperation_h
-#define _COM_RenderLayersEnvironmentOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersEnvironmentOperation : public RenderLayersBaseProg {
-public:
- RenderLayersEnvironmentOperation();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersImageProg.cpp b/source/blender/compositor/operations/COM_RenderLayersImageProg.cpp
deleted file mode 100644
index f21585844ff..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersImageProg.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersImageProg.h"
-
-RenderLayersColorProg::RenderLayersColorProg() : RenderLayersBaseProg(SCE_PASS_COMBINED, 4)
-{
- this->addOutputSocket(COM_DT_COLOR);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersImageProg.h b/source/blender/compositor/operations/COM_RenderLayersImageProg.h
deleted file mode 100644
index 5fa74c8b21f..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersImageProg.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersColorProg_h
-#define _COM_RenderLayersColorProg_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-/// @todo rename to image operation
-class RenderLayersColorProg : public RenderLayersBaseProg {
-public:
- RenderLayersColorProg();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersIndirectOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersIndirectOperation.cpp
deleted file mode 100644
index 4258cb94a26..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersIndirectOperation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersIndirectOperation.h"
-
-RenderLayersIndirectOperation::RenderLayersIndirectOperation() : RenderLayersBaseProg(SCE_PASS_INDIRECT, 3)
-{
- this->addOutputSocket(COM_DT_COLOR);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersIndirectOperation.h b/source/blender/compositor/operations/COM_RenderLayersIndirectOperation.h
deleted file mode 100644
index d64207a4355..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersIndirectOperation.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersIndirectOperation_h
-#define _COM_RenderLayersIndirectOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersIndirectOperation : public RenderLayersBaseProg {
-public:
- RenderLayersIndirectOperation();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersMaterialIndexOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersMaterialIndexOperation.cpp
deleted file mode 100644
index aab7e0089e4..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersMaterialIndexOperation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersMaterialIndexOperation.h"
-
-RenderLayersMaterialIndexOperation::RenderLayersMaterialIndexOperation() : RenderLayersBaseProg(SCE_PASS_INDEXMA, 1)
-{
- this->addOutputSocket(COM_DT_VALUE);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersMaterialIndexOperation.h b/source/blender/compositor/operations/COM_RenderLayersMaterialIndexOperation.h
deleted file mode 100644
index d06568f5a10..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersMaterialIndexOperation.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersMaterialIndexOperation_h
-#define _COM_RenderLayersMaterialIndexOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersMaterialIndexOperation : public RenderLayersBaseProg {
-public:
- RenderLayersMaterialIndexOperation();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersMistOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersMistOperation.cpp
deleted file mode 100644
index c64ddc6e9d8..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersMistOperation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersMistOperation.h"
-
-RenderLayersMistOperation::RenderLayersMistOperation() : RenderLayersBaseProg(SCE_PASS_MIST, 1)
-{
- this->addOutputSocket(COM_DT_VALUE);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersMistOperation.h b/source/blender/compositor/operations/COM_RenderLayersMistOperation.h
deleted file mode 100644
index ad838c9e340..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersMistOperation.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersMistOperation_h
-#define _COM_RenderLayersMistOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersMistOperation : public RenderLayersBaseProg {
-public:
- RenderLayersMistOperation();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersNormalOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersNormalOperation.cpp
deleted file mode 100644
index 9d8e7d6272c..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersNormalOperation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersNormalOperation.h"
-
-RenderLayersNormalOperation::RenderLayersNormalOperation() : RenderLayersBaseProg(SCE_PASS_NORMAL, 3)
-{
- this->addOutputSocket(COM_DT_VECTOR);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersNormalOperation.h b/source/blender/compositor/operations/COM_RenderLayersNormalOperation.h
deleted file mode 100644
index 39b2040863a..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersNormalOperation.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersNormalOperation_h
-#define _COM_RenderLayersNormalOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersNormalOperation : public RenderLayersBaseProg {
-public:
- RenderLayersNormalOperation();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersObjectIndexOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersObjectIndexOperation.cpp
deleted file mode 100644
index 430ea698263..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersObjectIndexOperation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersObjectIndexOperation.h"
-
-RenderLayersObjectIndexOperation::RenderLayersObjectIndexOperation() : RenderLayersBaseProg(SCE_PASS_INDEXOB, 1)
-{
- this->addOutputSocket(COM_DT_VALUE);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersObjectIndexOperation.h b/source/blender/compositor/operations/COM_RenderLayersObjectIndexOperation.h
deleted file mode 100644
index e8a1602cbfc..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersObjectIndexOperation.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersObjectIndexOperation_h
-#define _COM_RenderLayersObjectIndexOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersObjectIndexOperation : public RenderLayersBaseProg {
-public:
- RenderLayersObjectIndexOperation();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersProg.cpp b/source/blender/compositor/operations/COM_RenderLayersProg.cpp
new file mode 100644
index 00000000000..a8382dd1746
--- /dev/null
+++ b/source/blender/compositor/operations/COM_RenderLayersProg.cpp
@@ -0,0 +1,361 @@
+/*
+ * Copyright 2011, Blender Foundation.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor:
+ * Jeroen Bakker
+ * Monique Dewanchand
+ */
+
+#include "COM_RenderLayersProg.h"
+
+#include "BLI_listbase.h"
+#include "DNA_scene_types.h"
+
+extern "C" {
+ #include "RE_pipeline.h"
+ #include "RE_shader_ext.h"
+ #include "RE_render_ext.h"
+}
+
+/* ******** Render Layers Base Prog ******** */
+
+RenderLayersBaseProg::RenderLayersBaseProg(int renderpass, int elementsize) : NodeOperation()
+{
+ this->m_renderpass = renderpass;
+ this->setScene(NULL);
+ this->m_inputBuffer = NULL;
+ this->m_elementsize = elementsize;
+ this->m_rd = NULL;
+}
+
+
+void RenderLayersBaseProg::initExecution()
+{
+ Scene *scene = this->getScene();
+ Render *re = (scene) ? RE_GetRender(scene->id.name) : NULL;
+ RenderResult *rr = NULL;
+
+ if (re)
+ rr = RE_AcquireResultRead(re);
+
+ if (rr) {
+ SceneRenderLayer *srl = (SceneRenderLayer *)BLI_findlink(&scene->r.layers, getLayerId());
+ if (srl) {
+
+ RenderLayer *rl = RE_GetRenderLayer(rr, srl->name);
+ if (rl && rl->rectf) {
+ this->m_inputBuffer = RE_RenderLayerGetPass(rl, this->m_renderpass);
+
+ if (this->m_inputBuffer == NULL && this->m_renderpass == SCE_PASS_COMBINED) {
+ this->m_inputBuffer = rl->rectf;
+ }
+ }
+ }
+ }
+ if (re) {
+ RE_ReleaseResult(re);
+ re = NULL;
+ }
+}
+
+void RenderLayersBaseProg::doInterpolation(float output[4], float x, float y, PixelSampler sampler)
+{
+ unsigned int offset;
+ int ix, iy;
+ int width = this->getWidth(), height = this->getHeight();
+
+ switch (sampler) {
+ case COM_PS_NEAREST:
+ ix = x;
+ iy = y;
+ offset = (iy * width + ix) * this->m_elementsize;
+
+ if (this->m_elementsize == 1)
+ output[0] = this->m_inputBuffer[offset];
+ else if (this->m_elementsize == 3)
+ copy_v3_v3(output, &this->m_inputBuffer[offset]);
+ else
+ copy_v4_v4(output, &this->m_inputBuffer[offset]);
+
+ break;
+
+ case COM_PS_BILINEAR:
+ BLI_bilinear_interpolation_fl(this->m_inputBuffer, output, width, height, this->m_elementsize, x, y);
+ break;
+
+ case COM_PS_BICUBIC:
+ BLI_bicubic_interpolation_fl(this->m_inputBuffer, output, width, height, this->m_elementsize, x, y);
+ break;
+ }
+
+ if (this->m_elementsize == 1) {
+ output[1] = 0.0f;
+ output[2] = 0.0f;
+ output[3] = 0.0f;
+ }
+ else if (this->m_elementsize == 3) {
+ output[3] = 1.0f;
+ }
+}
+
+void RenderLayersBaseProg::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+#if 0
+ const RenderData *rd = this->m_rd;
+
+ int dx = 0, dy = 0;
+
+ if (rd->mode & R_BORDER && rd->mode & R_CROP) {
+ /* see comment in executeRegion describing coordinate mapping,
+ * here it simply goes other way around
+ */
+ int full_width = rd->xsch * rd->size / 100;
+ int full_height = rd->ysch * rd->size / 100;
+
+ dx = rd->border.xmin * full_width - (full_width - this->getWidth()) / 2.0f;
+ dy = rd->border.ymin * full_height - (full_height - this->getHeight()) / 2.0f;
+ }
+
+ int ix = x - dx;
+ int iy = y - dy;
+#else
+ int ix = x;
+ int iy = y;
+#endif
+
+ if (this->m_inputBuffer == NULL || ix < 0 || iy < 0 || ix >= (int)this->getWidth() || iy >= (int)this->getHeight() ) {
+ zero_v4(output);
+ }
+ else {
+ doInterpolation(output, ix, iy, sampler);
+ }
+}
+
+void RenderLayersBaseProg::deinitExecution()
+{
+ this->m_inputBuffer = NULL;
+}
+
+void RenderLayersBaseProg::determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2])
+{
+ Scene *sce = this->getScene();
+ Render *re = (sce) ? RE_GetRender(sce->id.name) : NULL;
+ RenderResult *rr = NULL;
+
+ resolution[0] = 0;
+ resolution[1] = 0;
+
+ if (re)
+ rr = RE_AcquireResultRead(re);
+
+ if (rr) {
+ SceneRenderLayer *srl = (SceneRenderLayer *)BLI_findlink(&sce->r.layers, getLayerId());
+ if (srl) {
+ RenderLayer *rl = RE_GetRenderLayer(rr, srl->name);
+ if (rl && rl->rectf) {
+ resolution[0] = rl->rectx;
+ resolution[1] = rl->recty;
+ }
+ }
+ }
+
+ if (re)
+ RE_ReleaseResult(re);
+
+}
+
+/* ******** Render Layers AO Operation ******** */
+
+RenderLayersAOOperation::RenderLayersAOOperation() : RenderLayersBaseProg(SCE_PASS_AO, 3)
+{
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+/* ******** Render Layers Alpha Operation ******** */
+
+RenderLayersAlphaProg::RenderLayersAlphaProg() : RenderLayersBaseProg(SCE_PASS_COMBINED, 4)
+{
+ this->addOutputSocket(COM_DT_VALUE);
+}
+
+void RenderLayersAlphaProg::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ int ix = x;
+ int iy = y;
+ float *inputBuffer = this->getInputBuffer();
+
+ if (inputBuffer == NULL || ix < 0 || iy < 0 || ix >= (int)this->getWidth() || iy >= (int)this->getHeight() ) {
+ output[0] = 0.0f;
+ output[1] = 0.0f;
+ output[2] = 0.0f;
+ output[3] = 0.0f;
+ }
+ else {
+ unsigned int offset = (iy * this->getWidth() + ix) * 4;
+ output[0] = inputBuffer[offset + 3];
+ output[1] = 0.0f;
+ output[2] = 0.0f;
+ output[3] = 0.0f;
+ }
+}
+
+/* ******** Render Layers Color Operation ******** */
+
+RenderLayersColorOperation::RenderLayersColorOperation() : RenderLayersBaseProg(SCE_PASS_RGBA, 4)
+{
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+/* ******** Render Layers Cycles Operation ******** */
+
+RenderLayersCyclesOperation::RenderLayersCyclesOperation(int pass) : RenderLayersBaseProg(pass, 3)
+{
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+/* ******** Render Layers Depth Operation ******** */
+
+RenderLayersDepthProg::RenderLayersDepthProg() : RenderLayersBaseProg(SCE_PASS_Z, 1)
+{
+ this->addOutputSocket(COM_DT_VALUE);
+}
+
+void RenderLayersDepthProg::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ int ix = x;
+ int iy = y;
+ float *inputBuffer = this->getInputBuffer();
+
+ if (inputBuffer == NULL || ix < 0 || iy < 0 || ix >= (int)this->getWidth() || iy >= (int)this->getHeight() ) {
+ output[0] = 0.0f;
+ output[1] = 0.0f;
+ output[2] = 0.0f;
+ output[3] = 0.0f;
+ }
+ else {
+ unsigned int offset = (iy * this->getWidth() + ix);
+ output[0] = inputBuffer[offset];
+ output[1] = 0.0f;
+ output[2] = 0.0f;
+ output[3] = 0.0f;
+ }
+}
+
+/* ******** Render Layers Diffuse Operation ******** */
+
+RenderLayersDiffuseOperation::RenderLayersDiffuseOperation() : RenderLayersBaseProg(SCE_PASS_DIFFUSE, 3)
+{
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+/* ******** Render Layers Emit Operation ******** */
+
+RenderLayersEmitOperation::RenderLayersEmitOperation() : RenderLayersBaseProg(SCE_PASS_EMIT, 3)
+{
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+/* ******** Render Layers Environment Operation ******** */
+
+RenderLayersEnvironmentOperation::RenderLayersEnvironmentOperation() : RenderLayersBaseProg(SCE_PASS_ENVIRONMENT, 3)
+{
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+/* ******** Render Layers Image Operation ******** */
+
+RenderLayersColorProg::RenderLayersColorProg() : RenderLayersBaseProg(SCE_PASS_COMBINED, 4)
+{
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+/* ******** Render Layers Indirect Operation ******** */
+
+RenderLayersIndirectOperation::RenderLayersIndirectOperation() : RenderLayersBaseProg(SCE_PASS_INDIRECT, 3)
+{
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+/* ******** Render Layers Material Index Operation ******** */
+
+RenderLayersMaterialIndexOperation::RenderLayersMaterialIndexOperation() : RenderLayersBaseProg(SCE_PASS_INDEXMA, 1)
+{
+ this->addOutputSocket(COM_DT_VALUE);
+}
+
+/* ******** Render Layers Mist Operation ******** */
+
+RenderLayersMistOperation::RenderLayersMistOperation() : RenderLayersBaseProg(SCE_PASS_MIST, 1)
+{
+ this->addOutputSocket(COM_DT_VALUE);
+}
+
+/* ******** Render Layers Normal Operation ******** */
+
+RenderLayersNormalOperation::RenderLayersNormalOperation() : RenderLayersBaseProg(SCE_PASS_NORMAL, 3)
+{
+ this->addOutputSocket(COM_DT_VECTOR);
+}
+
+/* ******** Render Layers Object Index Operation ******** */
+
+RenderLayersObjectIndexOperation::RenderLayersObjectIndexOperation() : RenderLayersBaseProg(SCE_PASS_INDEXOB, 1)
+{
+ this->addOutputSocket(COM_DT_VALUE);
+}
+
+/* ******** Render Layers Reflection Operation ******** */
+
+RenderLayersReflectionOperation::RenderLayersReflectionOperation() : RenderLayersBaseProg(SCE_PASS_REFLECT, 3)
+{
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+/* ******** Render Layers Refraction Operation ******** */
+
+RenderLayersRefractionOperation::RenderLayersRefractionOperation() : RenderLayersBaseProg(SCE_PASS_REFRACT, 3)
+{
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+/* ******** Render Layers Shadow Operation ******** */
+
+RenderLayersShadowOperation::RenderLayersShadowOperation() : RenderLayersBaseProg(SCE_PASS_SHADOW, 3)
+{
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+/* ******** Render Layers Specular Operation ******** */
+
+RenderLayersSpecularOperation::RenderLayersSpecularOperation() : RenderLayersBaseProg(SCE_PASS_SPEC, 3)
+{
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+/* ******** Render Layers Speed Operation ******** */
+
+RenderLayersSpeedOperation::RenderLayersSpeedOperation() : RenderLayersBaseProg(SCE_PASS_VECTOR, 4)
+{
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+/* ******** Render Layers UV Operation ******** */
+
+RenderLayersUVOperation::RenderLayersUVOperation() : RenderLayersBaseProg(SCE_PASS_UV, 3)
+{
+ this->addOutputSocket(COM_DT_VECTOR);
+}
diff --git a/source/blender/compositor/operations/COM_RenderLayersBaseProg.h b/source/blender/compositor/operations/COM_RenderLayersProg.h
index 84d6c1ee188..04861174387 100644
--- a/source/blender/compositor/operations/COM_RenderLayersBaseProg.h
+++ b/source/blender/compositor/operations/COM_RenderLayersProg.h
@@ -102,4 +102,107 @@ public:
void executePixel(float output[4], float x, float y, PixelSampler sampler);
};
+class RenderLayersAOOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersAOOperation();
+};
+
+class RenderLayersAlphaProg : public RenderLayersBaseProg {
+public:
+ RenderLayersAlphaProg();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class RenderLayersColorOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersColorOperation();
+};
+
+class RenderLayersCyclesOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersCyclesOperation(int pass);
+};
+
+class RenderLayersDepthProg : public RenderLayersBaseProg {
+public:
+ RenderLayersDepthProg();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class RenderLayersDiffuseOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersDiffuseOperation();
+};
+
+class RenderLayersEmitOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersEmitOperation();
+};
+
+class RenderLayersEnvironmentOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersEnvironmentOperation();
+};
+
+/// @todo rename to image operation
+class RenderLayersColorProg : public RenderLayersBaseProg {
+public:
+ RenderLayersColorProg();
+};
+
+class RenderLayersIndirectOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersIndirectOperation();
+};
+
+class RenderLayersMaterialIndexOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersMaterialIndexOperation();
+};
+
+class RenderLayersMistOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersMistOperation();
+};
+
+class RenderLayersNormalOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersNormalOperation();
+};
+
+class RenderLayersObjectIndexOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersObjectIndexOperation();
+};
+
+class RenderLayersReflectionOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersReflectionOperation();
+};
+
+class RenderLayersRefractionOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersRefractionOperation();
+};
+
+class RenderLayersShadowOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersShadowOperation();
+};
+
+class RenderLayersSpecularOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersSpecularOperation();
+};
+
+class RenderLayersSpeedOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersSpeedOperation();
+};
+
+class RenderLayersUVOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersUVOperation();
+};
+
#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersReflectionOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersReflectionOperation.cpp
deleted file mode 100644
index 1fbd599235b..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersReflectionOperation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersReflectionOperation.h"
-
-RenderLayersReflectionOperation::RenderLayersReflectionOperation() : RenderLayersBaseProg(SCE_PASS_REFLECT, 3)
-{
- this->addOutputSocket(COM_DT_COLOR);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersReflectionOperation.h b/source/blender/compositor/operations/COM_RenderLayersReflectionOperation.h
deleted file mode 100644
index 3dc7148930b..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersReflectionOperation.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersReflectionOperation_h
-#define _COM_RenderLayersReflectionOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersReflectionOperation : public RenderLayersBaseProg {
-public:
- RenderLayersReflectionOperation();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersRefractionOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersRefractionOperation.cpp
deleted file mode 100644
index 2ec9be46059..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersRefractionOperation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersRefractionOperation.h"
-
-RenderLayersRefractionOperation::RenderLayersRefractionOperation() : RenderLayersBaseProg(SCE_PASS_REFRACT, 3)
-{
- this->addOutputSocket(COM_DT_COLOR);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersRefractionOperation.h b/source/blender/compositor/operations/COM_RenderLayersRefractionOperation.h
deleted file mode 100644
index 02ac7aa14f4..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersRefractionOperation.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersRefractionOperation_h
-#define _COM_RenderLayersRefractionOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersRefractionOperation : public RenderLayersBaseProg {
-public:
- RenderLayersRefractionOperation();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersShadowOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersShadowOperation.cpp
deleted file mode 100644
index 7582e010e2c..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersShadowOperation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersShadowOperation.h"
-
-RenderLayersShadowOperation::RenderLayersShadowOperation() : RenderLayersBaseProg(SCE_PASS_SHADOW, 3)
-{
- this->addOutputSocket(COM_DT_COLOR);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersShadowOperation.h b/source/blender/compositor/operations/COM_RenderLayersShadowOperation.h
deleted file mode 100644
index af35915c2ee..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersShadowOperation.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersShadowOperation_h
-#define _COM_RenderLayersShadowOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersShadowOperation : public RenderLayersBaseProg {
-public:
- RenderLayersShadowOperation();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersSpecularOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersSpecularOperation.cpp
deleted file mode 100644
index 60c1636dcda..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersSpecularOperation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersSpecularOperation.h"
-
-RenderLayersSpecularOperation::RenderLayersSpecularOperation() : RenderLayersBaseProg(SCE_PASS_SPEC, 3)
-{
- this->addOutputSocket(COM_DT_COLOR);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersSpecularOperation.h b/source/blender/compositor/operations/COM_RenderLayersSpecularOperation.h
deleted file mode 100644
index fc7d77976a3..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersSpecularOperation.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersSpecularOperation_h
-#define _COM_RenderLayersSpecularOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersSpecularOperation : public RenderLayersBaseProg {
-public:
- RenderLayersSpecularOperation();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersSpeedOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersSpeedOperation.cpp
deleted file mode 100644
index 5a0662d13eb..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersSpeedOperation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersSpeedOperation.h"
-
-RenderLayersSpeedOperation::RenderLayersSpeedOperation() : RenderLayersBaseProg(SCE_PASS_VECTOR, 4)
-{
- this->addOutputSocket(COM_DT_COLOR);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersSpeedOperation.h b/source/blender/compositor/operations/COM_RenderLayersSpeedOperation.h
deleted file mode 100644
index d341aa43950..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersSpeedOperation.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersSpeedOperation_h
-#define _COM_RenderLayersSpeedOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersSpeedOperation : public RenderLayersBaseProg {
-public:
- RenderLayersSpeedOperation();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersUVOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersUVOperation.cpp
deleted file mode 100644
index b966f98632c..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersUVOperation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersUVOperation.h"
-
-RenderLayersUVOperation::RenderLayersUVOperation() : RenderLayersBaseProg(SCE_PASS_UV, 3)
-{
- this->addOutputSocket(COM_DT_VECTOR);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersUVOperation.h b/source/blender/compositor/operations/COM_RenderLayersUVOperation.h
deleted file mode 100644
index 3068372a66c..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersUVOperation.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersUVOperation_h
-#define _COM_RenderLayersUVOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersUVOperation : public RenderLayersBaseProg {
-public:
- RenderLayersUVOperation();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
index fb996f2abaf..d1060224444 100644
--- a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
+++ b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
@@ -103,7 +103,7 @@ void ScreenLensDistortionOperation::executePixel(float output[4], int x, int y,
d = 1.0f / (1.0f + sqrtf(t));
const float nx = (u * d + 0.5f) * width - 0.5f;
const float ny = (v * d + 0.5f) * height - 0.5f;
- buffer->readCubic(color, nx, ny);
+ buffer->readBilinear(color, nx, ny);
tc[0] += (1.0f - tz) * color[0], tc[1] += tz * color[1];
dr++, dg++;
}
@@ -121,7 +121,7 @@ void ScreenLensDistortionOperation::executePixel(float output[4], int x, int y,
d = 1.0f / (1.0f + sqrtf(t));
const float nx = (u * d + 0.5f) * width - 0.5f;
const float ny = (v * d + 0.5f) * height - 0.5f;
- buffer->readCubic(color, nx, ny);
+ buffer->readBilinear(color, nx, ny);
tc[1] += (1.0f - tz) * color[1], tc[2] += tz * color[2];
dg++, db++;
}
diff --git a/source/blender/compositor/operations/COM_SeparateChannelOperation.cpp b/source/blender/compositor/operations/COM_SeparateChannelOperation.cpp
deleted file mode 100644
index 9fc266cce86..00000000000
--- a/source/blender/compositor/operations/COM_SeparateChannelOperation.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_SeparateChannelOperation.h"
-
-SeparateChannelOperation::SeparateChannelOperation() : NodeOperation()
-{
- this->addInputSocket(COM_DT_COLOR);
- this->addOutputSocket(COM_DT_VALUE);
- this->m_inputOperation = NULL;
-}
-void SeparateChannelOperation::initExecution()
-{
- this->m_inputOperation = this->getInputSocketReader(0);
-}
-
-void SeparateChannelOperation::deinitExecution()
-{
- this->m_inputOperation = NULL;
-}
-
-
-void SeparateChannelOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float input[4];
- this->m_inputOperation->read(input, x, y, sampler);
- output[0] = input[this->m_channel];
-}
diff --git a/source/blender/compositor/operations/COM_SeparateChannelOperation.h b/source/blender/compositor/operations/COM_SeparateChannelOperation.h
deleted file mode 100644
index f964df5df02..00000000000
--- a/source/blender/compositor/operations/COM_SeparateChannelOperation.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_SeparateChannelOperation_h_
-#define _COM_SeparateChannelOperation_h_
-
-#include "COM_NodeOperation.h"
-
-class SeparateChannelOperation : public NodeOperation {
-private:
- SocketReader *m_inputOperation;
- int m_channel;
-public:
- SeparateChannelOperation();
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
- void initExecution();
- void deinitExecution();
-
- void setChannel(int channel) { this->m_channel = channel; }
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_SetColorOperation.h b/source/blender/compositor/operations/COM_SetColorOperation.h
index 7895c34620b..8377decdd7b 100644
--- a/source/blender/compositor/operations/COM_SetColorOperation.h
+++ b/source/blender/compositor/operations/COM_SetColorOperation.h
@@ -58,7 +58,7 @@ public:
void executePixel(float output[4], float x, float y, PixelSampler sampler);
void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]);
- const bool isSetOperation() const { return true; }
+ bool isSetOperation() const { return true; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_SetValueOperation.h b/source/blender/compositor/operations/COM_SetValueOperation.h
index 3ddc667bc7e..b88b85d66f2 100644
--- a/source/blender/compositor/operations/COM_SetValueOperation.h
+++ b/source/blender/compositor/operations/COM_SetValueOperation.h
@@ -49,6 +49,6 @@ public:
void executePixel(float output[4], float x, float y, PixelSampler sampler);
void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]);
- const bool isSetOperation() const { return true; }
+ bool isSetOperation() const { return true; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_SetVectorOperation.h b/source/blender/compositor/operations/COM_SetVectorOperation.h
index e9d6a163e9f..d15da58e58e 100644
--- a/source/blender/compositor/operations/COM_SetVectorOperation.h
+++ b/source/blender/compositor/operations/COM_SetVectorOperation.h
@@ -57,7 +57,7 @@ public:
void executePixel(float output[4], float x, float y, PixelSampler sampler);
void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]);
- const bool isSetOperation() const { return true; }
+ bool isSetOperation() const { return true; }
void setVector(float vector[3]) {
setX(vector[0]);
diff --git a/source/blender/compositor/operations/COM_TrackPositionOperation.h b/source/blender/compositor/operations/COM_TrackPositionOperation.h
index b5499ab76b7..7a4ce9f9213 100644
--- a/source/blender/compositor/operations/COM_TrackPositionOperation.h
+++ b/source/blender/compositor/operations/COM_TrackPositionOperation.h
@@ -72,7 +72,7 @@ public:
void executePixel(float output[4], float x, float y, PixelSampler sampler);
- const bool isSetOperation() const { return true; }
+ bool isSetOperation() const { return true; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_ViewerOperation.cpp b/source/blender/compositor/operations/COM_ViewerOperation.cpp
index e9f083178e4..468aec64a56 100644
--- a/source/blender/compositor/operations/COM_ViewerOperation.cpp
+++ b/source/blender/compositor/operations/COM_ViewerOperation.cpp
@@ -173,7 +173,7 @@ void ViewerOperation::updateImage(rcti *rect)
{
IMB_partial_display_buffer_update(this->m_ibuf, this->m_outputBuffer, NULL, getWidth(), 0, 0,
this->m_viewSettings, this->m_displaySettings,
- rect->xmin, rect->ymin, rect->xmax, rect->ymax, FALSE);
+ rect->xmin, rect->ymin, rect->xmax, rect->ymax, false);
this->updateDraw();
}
diff --git a/source/blender/compositor/operations/COM_WrapOperation.cpp b/source/blender/compositor/operations/COM_WrapOperation.cpp
index 68c3e74a237..ea19952f60c 100644
--- a/source/blender/compositor/operations/COM_WrapOperation.cpp
+++ b/source/blender/compositor/operations/COM_WrapOperation.cpp
@@ -23,21 +23,9 @@
#include "COM_WrapOperation.h"
-WrapOperation::WrapOperation() : NodeOperation()
+WrapOperation::WrapOperation() : ReadBufferOperation()
{
- this->addInputSocket(COM_DT_COLOR);
- this->addOutputSocket(COM_DT_COLOR);
- this->setResolutionInputSocketIndex(0);
- this->m_inputOperation = NULL;
-}
-void WrapOperation::initExecution()
-{
- this->m_inputOperation = this->getInputSocketReader(0);
-}
-
-void WrapOperation::deinitExecution()
-{
- this->m_inputOperation = NULL;
+ this->m_wrappingType = CMP_NODE_WRAP_NONE;
}
inline float WrapOperation::getWrappedOriginalXPos(float x)
@@ -59,6 +47,7 @@ void WrapOperation::executePixel(float output[4], float x, float y, PixelSampler
float nx, ny;
nx = x;
ny = y;
+ MemoryBufferExtend extend_x = COM_MB_CLIP, extend_y = COM_MB_CLIP;
switch (m_wrappingType) {
case CMP_NODE_WRAP_NONE:
//Intentionally empty, originalXPos and originalYPos have been set before
@@ -66,20 +55,23 @@ void WrapOperation::executePixel(float output[4], float x, float y, PixelSampler
case CMP_NODE_WRAP_X:
// wrap only on the x-axis
nx = this->getWrappedOriginalXPos(x);
+ extend_x = COM_MB_REPEAT;
break;
case CMP_NODE_WRAP_Y:
// wrap only on the y-axis
ny = this->getWrappedOriginalYPos(y);
+ extend_y = COM_MB_REPEAT;
break;
case CMP_NODE_WRAP_XY:
// wrap on both
nx = this->getWrappedOriginalXPos(x);
ny = this->getWrappedOriginalYPos(y);
+ extend_x = COM_MB_REPEAT;
+ extend_y = COM_MB_REPEAT;
break;
}
- this->m_inputOperation->read(output, nx, ny, sampler);
-
+ executePixelExtend(output, nx, ny, sampler, extend_x, extend_y);
}
bool WrapOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
@@ -110,7 +102,7 @@ bool WrapOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOper
}
}
- return NodeOperation::determineDependingAreaOfInterest(&newInput, readOperation, output);
+ return ReadBufferOperation::determineDependingAreaOfInterest(&newInput, readOperation, output);
}
void WrapOperation::setWrapping(int wrapping_type)
diff --git a/source/blender/compositor/operations/COM_WrapOperation.h b/source/blender/compositor/operations/COM_WrapOperation.h
index b84d85e7b5d..ddd5fa8032d 100644
--- a/source/blender/compositor/operations/COM_WrapOperation.h
+++ b/source/blender/compositor/operations/COM_WrapOperation.h
@@ -23,20 +23,16 @@
#ifndef _COM_WrapOperation_h_
#define _COM_WrapOperation_h_
-#include "COM_NodeOperation.h"
+#include "COM_ReadBufferOperation.h"
-class WrapOperation : public NodeOperation {
+class WrapOperation : public ReadBufferOperation {
private:
- SocketReader *m_inputOperation;
int m_wrappingType;
public:
WrapOperation();
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
void executePixel(float output[4], float x, float y, PixelSampler sampler);
- void initExecution();
- void deinitExecution();
-
void setWrapping(int wrapping_type);
float getWrappedOriginalXPos(float x);
float getWrappedOriginalYPos(float y);
diff --git a/source/blender/compositor/operations/COM_WriteBufferOperation.cpp b/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
index 17c8f4d9fd1..c73cb3ae325 100644
--- a/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
+++ b/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
@@ -75,7 +75,6 @@ void WriteBufferOperation::executeRegion(rcti *rect, unsigned int tileNumber)
for (x = x1; x < x2; x++) {
this->m_input->read(&(buffer[offset4]), x, y, data);
offset4 += COM_NUMBER_OF_CHANNELS;
-
}
if (isBreaked()) {
breaked = true;
@@ -158,14 +157,14 @@ void WriteBufferOperation::executeOpenCLRegion(OpenCLDevice *device, rcti *rect,
this->getMemoryProxy()->getBuffer()->copyContentFrom(outputBuffer);
// STEP 4
- while (clMemToCleanUp->size() > 0) {
+ while (!clMemToCleanUp->empty()) {
cl_mem mem = clMemToCleanUp->front();
error = clReleaseMemObject(mem);
if (error != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error)); }
clMemToCleanUp->pop_front();
}
- while (clKernelsToCleanUp->size() > 0) {
+ while (!clKernelsToCleanUp->empty()) {
cl_kernel kernel = clKernelsToCleanUp->front();
error = clReleaseKernel(kernel);
if (error != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error)); }
@@ -174,6 +173,21 @@ void WriteBufferOperation::executeOpenCLRegion(OpenCLDevice *device, rcti *rect,
delete clKernelsToCleanUp;
}
+void WriteBufferOperation::determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2])
+{
+ NodeOperation::determineResolution(resolution, preferredResolution);
+ /* make sure there is at least one pixel stored in case the input is a single value */
+ m_single_value = false;
+ if (resolution[0] == 0) {
+ resolution[0] = 1;
+ m_single_value = true;
+ }
+ if (resolution[1] == 0) {
+ resolution[1] = 1;
+ m_single_value = true;
+ }
+}
+
void WriteBufferOperation::readResolutionFromInputSocket()
{
NodeOperation *inputOperation = this->getInputOperation(0);
diff --git a/source/blender/compositor/operations/COM_WriteBufferOperation.h b/source/blender/compositor/operations/COM_WriteBufferOperation.h
index d89444045d4..157543fcb72 100644
--- a/source/blender/compositor/operations/COM_WriteBufferOperation.h
+++ b/source/blender/compositor/operations/COM_WriteBufferOperation.h
@@ -32,6 +32,7 @@
*/
class WriteBufferOperation : public NodeOperation {
MemoryProxy *m_memoryProxy;
+ bool m_single_value; /* single value stored in buffer */
NodeOperation *m_input;
public:
WriteBufferOperation();
@@ -40,11 +41,13 @@ public:
MemoryProxy *getMemoryProxy() { return this->m_memoryProxy; }
void executePixel(float output[4], float x, float y, PixelSampler sampler);
const bool isWriteBufferOperation() const { return true; }
+ bool isSingleValue() const { return m_single_value; }
void executeRegion(rcti *rect, unsigned int tileNumber);
void initExecution();
void deinitExecution();
void executeOpenCLRegion(OpenCLDevice *device, rcti *rect, unsigned int chunkNumber, MemoryBuffer **memoryBuffers, MemoryBuffer *outputBuffer);
+ void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]);
void readResolutionFromInputSocket();
inline NodeOperation *getInput() {
return m_input;
diff --git a/source/blender/compositor/operations/COM_ZCombineOperation.h b/source/blender/compositor/operations/COM_ZCombineOperation.h
index 4545775f26f..eeeb29d330f 100644
--- a/source/blender/compositor/operations/COM_ZCombineOperation.h
+++ b/source/blender/compositor/operations/COM_ZCombineOperation.h
@@ -22,7 +22,7 @@
#ifndef _COM_ZCombineOperation_h
#define _COM_ZCombineOperation_h
-#include "COM_MixBaseOperation.h"
+#include "COM_MixOperation.h"
/**
diff --git a/source/blender/datatoc/datatoc.c b/source/blender/datatoc/datatoc.c
index 236d9af8ef1..4e49a9a7694 100644
--- a/source/blender/datatoc/datatoc.c
+++ b/source/blender/datatoc/datatoc.c
@@ -25,6 +25,10 @@
* ***** END GPL LICENSE BLOCK *****
*/
+/** \file blender/datatoc/datatoc.c
+ * \ingroup datatoc
+ */
+
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index 845ad72d7aa..142342997be 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -1828,7 +1828,7 @@ static void *acf_dsmball_setting_ptr(bAnimListElem *ale, int setting, short *typ
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
- return GET_ACF_FLAG_PTR(mb->flag, type);
+ return GET_ACF_FLAG_PTR(mb->flag2, type);
case ACHANNEL_SETTING_SELECT: /* selected */
case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
@@ -2781,6 +2781,9 @@ static void ANIM_init_channel_typeinfo_data(void)
if (ACF_INIT) {
ACF_INIT = 0;
+ /* NOTE: need to keep the order of these synchronized with the definition of
+ * channel types (eAnim_ChannelType) in ED_anim_api.h
+ */
animchannelTypeInfo[type++] = NULL; /* None */
animchannelTypeInfo[type++] = NULL; /* AnimData */
animchannelTypeInfo[type++] = NULL; /* Special */
@@ -2808,8 +2811,8 @@ static void ANIM_init_channel_typeinfo_data(void)
animchannelTypeInfo[type++] = &ACF_DSMESH; /* Mesh Channel */
animchannelTypeInfo[type++] = &ACF_DSTEX; /* Texture Channel */
animchannelTypeInfo[type++] = &ACF_DSLAT; /* Lattice Channel */
- animchannelTypeInfo[type++] = &ACF_DSSPK; /* Speaker Channel */
animchannelTypeInfo[type++] = &ACF_DSLINESTYLE; /* LineStyle Channel */
+ animchannelTypeInfo[type++] = &ACF_DSSPK; /* Speaker Channel */
animchannelTypeInfo[type++] = &ACF_SHAPEKEY; /* ShapeKey */
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index e04c51b33d8..33ca10420ec 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -58,6 +58,7 @@
#include "UI_view2d.h"
#include "ED_anim_api.h"
+#include "ED_armature.h"
#include "ED_keyframes_edit.h" // XXX move the select modes out of there!
#include "ED_screen.h"
@@ -1106,7 +1107,6 @@ static int animchannels_rearrange_exec(bContext *C, wmOperator *op)
break;
case ANIMCONT_SHAPEKEY: // DOUBLE CHECK ME...
-
default: /* some collection of actions */
if (adt->action)
rearrange_action_channels(&ac, adt->action, mode);
@@ -2441,6 +2441,35 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in
{
bActionGroup *agrp = (bActionGroup *)ale->data;
+ Object *ob = NULL;
+ bPoseChannel *pchan = NULL;
+
+
+ /* Armatures-Specific Feature:
+ * Since groups are used to collect F-Curves of the same Bone by default
+ * (via Keying Sets) so that they can be managed better, we try to make
+ * things here easier for animators by mapping group selection to bone
+ * selection.
+ *
+ * Only do this if "Only Selected" dopesheet filter is not active, or else it
+ * becomes too unpredictable/tricky to manage
+ */
+ if ((ac->ads->filterflag & ADS_FILTER_ONLYSEL) == 0) {
+ if ((ale->id) && (GS(ale->id->name) == ID_OB)) {
+ ob = (Object *)ale->id;
+
+ if (ob->type == OB_ARMATURE) {
+ /* Assume for now that any group with corresponding name is what we want
+ * (i.e. for an armature whose location is animated, things would break
+ * if the user were to add a bone named "Location").
+ *
+ * TODO: check the first F-Curve or so to be sure...
+ */
+ pchan = BKE_pose_channel_find_name(ob->pose, agrp->name);
+ }
+ }
+ }
+
/* select/deselect group */
if (selectmode == SELECT_INVERT) {
/* inverse selection status of this group only */
@@ -2452,6 +2481,7 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in
/* deselect all other channels */
ANIM_deselect_anim_channels(ac, ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR);
+ if (pchan) ED_pose_deselectall(ob, 0);
/* only select channels in group and group itself */
for (fcu = agrp->channels.first; fcu && fcu->grp == agrp; fcu = fcu->next)
@@ -2461,14 +2491,20 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in
else {
/* select group by itself */
ANIM_deselect_anim_channels(ac, ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR);
+ if (pchan) ED_pose_deselectall(ob, 0);
+
agrp->flag |= AGRP_SELECTED;
}
/* if group is selected now, make group the 'active' one in the visible list */
- if (agrp->flag & AGRP_SELECTED)
+ if (agrp->flag & AGRP_SELECTED) {
ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, agrp, ANIMTYPE_GROUP);
- else
+ if (pchan) ED_pose_bone_select(ob, pchan, true);
+ }
+ else {
ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, NULL, ANIMTYPE_GROUP);
+ if (pchan) ED_pose_bone_select(ob, pchan, false);
+ }
notifierFlags |= (ND_ANIMCHAN | NA_SELECTED);
break;
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index 91003674524..b7a1614146a 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -1503,8 +1503,7 @@ static size_t animdata_filter_mask(ListBase *anim_data, void *UNUSED(data), int
}
/* NOTE: owner_id is scene, material, or texture block, which is the direct owner of the node tree in question */
-// TODO: how to handle group nodes is still unclear...
-static size_t animdata_filter_ds_nodetree(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, ID *owner_id, bNodeTree *ntree, int filter_mode)
+static size_t animdata_filter_ds_nodetree_group(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, ID *owner_id, bNodeTree *ntree, int filter_mode)
{
ListBase tmp_data = {NULL, NULL};
size_t tmp_items = 0;
@@ -1538,13 +1537,47 @@ static size_t animdata_filter_ds_nodetree(bAnimContext *ac, ListBase *anim_data,
return items;
}
+static size_t animdata_filter_ds_nodetree(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, ID *owner_id, bNodeTree *ntree, int filter_mode)
+{
+ bNode *node;
+ size_t items = 0;
+ int group_filter_mode = filter_mode & ~ADS_FILTER_ONLYSEL;
+
+ items += animdata_filter_ds_nodetree_group(ac, anim_data, ads, owner_id, ntree, filter_mode);
+
+ for (node = ntree->nodes.first; node; node = node->next) {
+ if (node->type == NODE_GROUP) {
+ if (node->id) {
+ int filterflag = ads->filterflag;
+ if ((filter_mode & ADS_FILTER_ONLYSEL) && (node->flag & NODE_SELECT) == 0) {
+ continue;
+ }
+ /* TODO(sergey): A bit creepy, but this flag is not used from threads anyway. */
+ ads->filterflag &= ~ADS_FILTER_ONLYSEL;
+ items += animdata_filter_ds_nodetree_group(ac, anim_data, ads, owner_id, (bNodeTree *) node->id, group_filter_mode);
+ ads->filterflag = filterflag;
+ }
+ }
+ }
+
+ return items;
+}
+
static size_t animdata_filter_ds_linestyle(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Scene *sce, int filter_mode)
{
SceneRenderLayer *srl;
+ FreestyleLineSet *lineset;
size_t items = 0;
for (srl = sce->r.layers.first; srl; srl = srl->next) {
- FreestyleLineSet *lineset;
+ for (lineset = srl->freestyleConfig.linesets.first; lineset; lineset = lineset->next) {
+ if (lineset->linestyle) {
+ lineset->linestyle->id.flag |= LIB_DOIT;
+ }
+ }
+ }
+
+ for (srl = sce->r.layers.first; srl; srl = srl->next) {
/* skip render layers without Freestyle enabled */
if (!(srl->layflag & SCE_LAY_FRS))
@@ -1555,6 +1588,13 @@ static size_t animdata_filter_ds_linestyle(bAnimContext *ac, ListBase *anim_data
FreestyleLineStyle *linestyle = lineset->linestyle;
ListBase tmp_data = {NULL, NULL};
size_t tmp_items = 0;
+
+ if ((linestyle == NULL) ||
+ !(linestyle->id.flag & LIB_DOIT))
+ {
+ continue;
+ }
+ linestyle->id.flag &= ~LIB_DOIT;
/* add scene-level animation channels */
BEGIN_ANIMFILTER_SUBCHANNELS(FILTER_LS_SCED(linestyle))
@@ -2533,13 +2573,13 @@ static size_t animdata_filter_remove_invalid(ListBase *anim_data)
static size_t animdata_filter_remove_duplis(ListBase *anim_data)
{
bAnimListElem *ale, *next;
- GHash *gh;
+ GSet *gs;
size_t items = 0;
/* build new hashtable to efficiently store and retrieve which entries have been
* encountered already while searching
*/
- gh = BLI_ghash_ptr_new("animdata_filter_duplis_remove gh");
+ gs = BLI_gset_ptr_new(__func__);
/* loop through items, removing them from the list if a similar item occurs already */
for (ale = anim_data->first; ale; ale = next) {
@@ -2549,9 +2589,8 @@ static size_t animdata_filter_remove_duplis(ListBase *anim_data)
* - just use ale->data for now, though it would be nicer to involve
* ale->type in combination too to capture corner cases (where same data performs differently)
*/
- if (BLI_ghash_haskey(gh, ale->data) == 0) {
+ if (BLI_gset_reinsert(gs, ale->data, NULL)) {
/* this entry is 'unique' and can be kept */
- BLI_ghash_insert(gh, ale->data, NULL);
items++;
}
else {
@@ -2561,7 +2600,7 @@ static size_t animdata_filter_remove_duplis(ListBase *anim_data)
}
/* free the hash... */
- BLI_ghash_free(gh, NULL, NULL);
+ BLI_gset_free(gs, NULL);
/* return the number of items still in the list */
return items;
diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c
index 21941c7ed62..d3e6d8f474f 100644
--- a/source/blender/editors/animation/anim_ipo_utils.c
+++ b/source/blender/editors/animation/anim_ipo_utils.c
@@ -132,7 +132,7 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
propname = RNA_property_ui_name(prop);
/* Array Index - only if applicable */
- if (RNA_property_array_length(&ptr, prop)) {
+ if (RNA_property_array_check(prop)) {
char c = RNA_property_array_item_char(prop, fcu->array_index);
/* we need to write the index to a temp buffer (in py syntax) */
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index 3c8576be312..1e8f2bfc038 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -197,58 +197,23 @@ void ED_markers_get_minmax(ListBase *markers, short sel, float *first, float *la
{
TimeMarker *marker;
float min, max;
- int selcount = 0;
/* sanity check */
//printf("markers = %p - %p, %p\n", markers, markers->first, markers->last);
- if (markers == NULL) {
- *first = 0.0f;
- *last = 0.0f;
- return;
- }
-
- if (markers->first && markers->last) {
- TimeMarker *fm = markers->first;
- TimeMarker *lm = markers->last;
-
- min = (float)fm->frame;
- max = (float)lm->frame;
- }
- else {
+ if (ELEM3(NULL, markers, markers->first, markers->last)) {
*first = 0.0f;
*last = 0.0f;
return;
}
-
- /* count how many markers are usable - see later */
- if (sel) {
- for (marker = markers->first; marker; marker = marker->next) {
- if (marker->flag & SELECT)
- selcount++;
- }
- }
- else
- selcount = BLI_countlist(markers);
-
- /* if only selected are to be considered, only consider the selected ones
- * (optimization for not searching list)
- */
- if (selcount > 1) {
- for (marker = markers->first; marker; marker = marker->next) {
- if (sel) {
- if (marker->flag & SELECT) {
- if (marker->frame < min)
- min = (float)marker->frame;
- if (marker->frame > max)
- max = (float)marker->frame;
- }
- }
- else {
- if (marker->frame < min)
- min = (float)marker->frame;
- if (marker->frame > max)
- max = (float)marker->frame;
- }
+
+ min = FLT_MAX;
+ max = -FLT_MAX;
+ for (marker = markers->first; marker; marker = marker->next) {
+ if (!sel || (marker->flag & SELECT)) {
+ if (marker->frame < min)
+ min = (float)marker->frame;
+ if (marker->frame > max)
+ max = (float)marker->frame;
}
}
@@ -1380,7 +1345,7 @@ static int ed_marker_rename_invoke_wrapper(bContext *C, wmOperator *op, const wm
RNA_string_set(op->ptr, "name", marker->name);
/* now see if the operator is usable */
- return ed_markers_opwrap_invoke_custom(C, op, event, WM_operator_props_popup);
+ return ed_markers_opwrap_invoke_custom(C, op, event, WM_operator_props_popup_confirm);
}
static void MARKER_OT_rename(wmOperatorType *ot)
diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c
index 15a75c57758..af9b58736ef 100644
--- a/source/blender/editors/animation/anim_ops.c
+++ b/source/blender/editors/animation/anim_ops.c
@@ -118,13 +118,21 @@ static int change_frame_exec(bContext *C, wmOperator *op)
static int frame_from_event(bContext *C, const wmEvent *event)
{
ARegion *region = CTX_wm_region(C);
+ Scene *scene = CTX_data_scene(C);
float viewx;
+ int frame;
/* convert from region coordinates to View2D 'tot' space */
UI_view2d_region_to_view(&region->v2d, event->mval[0], event->mval[1], &viewx, NULL);
/* round result to nearest int (frames are ints!) */
- return (int)floor(viewx + 0.5f);
+ frame = (int)floor(viewx + 0.5f);
+
+ if (scene->r.flag & SCER_LOCK_FRAME_SELECTION) {
+ CLAMP(frame, PSFRA, PEFRA);
+ }
+
+ return frame;
}
/* Modal Operator init */
diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c
index df93da8b7c1..826e204d981 100644
--- a/source/blender/editors/animation/drivers.c
+++ b/source/blender/editors/animation/drivers.c
@@ -75,7 +75,8 @@ void free_anim_drivers_copybuf(void);
* for the given Animation Data block. This assumes that all the destinations are valid.
*
* - add: 0 - don't add anything if not found,
- * 1 - add new Driver FCurve,
+ * 1 - add new Driver FCurve (with keyframes for visual tweaking),
+ * 2 - add new Driver FCurve (with generator, for script backwards compatability)
* -1 - add new Driver FCurve without driver stuff (for pasting)
*/
FCurve *verify_driver_fcurve(ID *id, const char rna_path[], const int array_index, short add)
@@ -114,11 +115,38 @@ FCurve *verify_driver_fcurve(ID *id, const char rna_path[], const int array_inde
/* if add is negative, don't init this data yet, since it will be filled in by the pasted driver */
if (add > 0) {
+ BezTriple *bezt;
+ size_t i;
+
/* add some new driver data */
fcu->driver = MEM_callocN(sizeof(ChannelDriver), "ChannelDriver");
+ fcu->driver->flag |= DRIVER_FLAG_SHOWDEBUG;
- /* add simple generator modifier for driver so that there is some visible representation */
- add_fmodifier(&fcu->modifiers, FMODIFIER_TYPE_GENERATOR);
+ /* F-Modifier or Keyframes? */
+ // FIXME: replace these magic numbers with defines
+ if (add == 2) {
+ /* Python API Backwards compatability hack:
+ * Create FModifier so that old scripts won't break
+ * for now before 2.7 series -- (September 4, 2013)
+ */
+ add_fmodifier(&fcu->modifiers, FMODIFIER_TYPE_GENERATOR);
+ }
+ else {
+ /* add 2 keyframes so that user has something to work with
+ * - These are configured to 0,0 and 1,1 to give a 1-1 mapping
+ * which can be easily tweaked from there.
+ */
+ insert_vert_fcurve(fcu, 0.0f, 0.0f, INSERTKEY_FAST);
+ insert_vert_fcurve(fcu, 1.0f, 1.0f, INSERTKEY_FAST);
+
+ /* configure this curve to extrapolate */
+ for (i = 0, bezt = fcu->bezt; (i < fcu->totvert) && bezt; i++, bezt++) {
+ bezt->h1 = bezt->h2 = HD_VECT;
+ }
+
+ fcu->extend = FCURVE_EXTRAPOLATE_LINEAR;
+ calchandles_fcurve(fcu);
+ }
}
/* just add F-Curve to end of driver list */
@@ -166,8 +194,10 @@ short ANIM_add_driver(ReportList *reports, ID *id, const char rna_path[], int ar
/* will only loop once unless the array index was -1 */
for (; array_index < array_index_max; array_index++) {
+ short add_mode = (flag & CREATEDRIVER_WITH_FMODIFIER) ? 2 : 1;
+
/* create F-Curve with Driver */
- fcu = verify_driver_fcurve(id, rna_path, array_index, 1);
+ fcu = verify_driver_fcurve(id, rna_path, array_index, add_mode);
if (fcu && fcu->driver) {
ChannelDriver *driver = fcu->driver;
diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c
index decbc351cad..71717284d8e 100644
--- a/source/blender/editors/animation/keyframes_edit.c
+++ b/source/blender/editors/animation/keyframes_edit.c
@@ -396,7 +396,7 @@ void ANIM_editkeyframes_refresh(bAnimContext *ac)
int filter;
/* when not in graph view, don't use handles */
SpaceIpo *sipo = (ac->spacetype == SPACE_IPO) ? (SpaceIpo *)ac->sl : NULL;
- const short use_handle = sipo ? !(sipo->flag & SIPO_NOHANDLES) : FALSE;
+ const bool use_handle = sipo ? !(sipo->flag & SIPO_NOHANDLES) : false;
/* filter animation data */
filter = ANIMFILTER_DATA_VISIBLE;
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index 63acc5a943c..1028fb30ba4 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -61,6 +61,7 @@
#include "BKE_depsgraph.h"
#include "BKE_fcurve.h"
#include "BKE_main.h"
+#include "BKE_idcode.h"
#include "BKE_nla.h"
#include "BKE_global.h"
#include "BKE_context.h"
@@ -141,9 +142,18 @@ bAction *verify_adt_action(ID *id, short add)
/* init action if none available yet */
/* TODO: need some wizardry to handle NLA stuff correct */
if ((adt->action == NULL) && (add)) {
+ /* init action name from name of ID block */
char actname[sizeof(id->name) - 2];
BLI_snprintf(actname, sizeof(actname), "%sAction", id->name + 2);
+
+ /* create action */
adt->action = add_empty_action(G.main, actname);
+
+ /* set ID-type from ID-block that this is going to be assigned to
+ * so that users can't accidentally break actions by assigning them
+ * to the wrong places
+ */
+ adt->action->idroot = GS(id->name);
}
/* return the action */
@@ -256,7 +266,7 @@ int insert_bezt_fcurve(FCurve *fcu, BezTriple *bezt, short flag)
dst->f1 = bezt->f1;
dst->f2 = bezt->f2;
dst->f3 = bezt->f3;
-
+
/* TODO: perform some other operations? */
}
}
@@ -508,19 +518,19 @@ static float setting_get_rna_value(PointerRNA *ptr, PropertyRNA *prop, int index
switch (RNA_property_type(prop)) {
case PROP_BOOLEAN:
- if (RNA_property_array_length(ptr, prop))
+ if (RNA_property_array_check(prop))
value = (float)RNA_property_boolean_get_index(ptr, prop, index);
else
value = (float)RNA_property_boolean_get(ptr, prop);
break;
case PROP_INT:
- if (RNA_property_array_length(ptr, prop))
+ if (RNA_property_array_check(prop))
value = (float)RNA_property_int_get_index(ptr, prop, index);
else
value = (float)RNA_property_int_get(ptr, prop);
break;
case PROP_FLOAT:
- if (RNA_property_array_length(ptr, prop))
+ if (RNA_property_array_check(prop))
value = RNA_property_float_get_index(ptr, prop, index);
else
value = RNA_property_float_get(ptr, prop);
@@ -996,6 +1006,34 @@ short insert_keyframe(ReportList *reports, ID *id, bAction *act, const char grou
* The flag argument is used for special settings that alter the behavior of
* the keyframe deletion. These include the quick refresh options.
*/
+
+
+
+/**
+ * \note caller needs to run #BKE_nla_tweakedit_remap to get NLA relative frame.
+ * caller should also check #BKE_fcurve_is_protected before keying.
+ */
+static bool delete_keyframe_fcurve(AnimData *adt, FCurve *fcu, float cfra)
+{
+ bool found;
+ int i;
+
+ /* try to find index of beztriple to get rid of */
+ i = binarysearch_bezt_index(fcu->bezt, cfra, fcu->totvert, &found);
+ if (found) {
+ /* delete the key at the index (will sanity check + do recalc afterwards) */
+ delete_fcurve_key(fcu, i, 1);
+
+ /* Only delete curve too if it won't be doing anything anymore */
+ if ((fcu->totvert == 0) && (list_has_suitable_fmodifier(&fcu->modifiers, 0, FMI_TYPE_GENERATE_CURVE) == 0))
+ ANIM_fcurve_delete_from_animdata(NULL, adt, fcu);
+
+ /* return success */
+ return true;
+ }
+ return false;
+}
+
short delete_keyframe(ReportList *reports, ID *id, bAction *act, const char group[], const char rna_path[], int array_index, float cfra, short UNUSED(flag))
{
AnimData *adt = BKE_animdata_from_id(id);
@@ -1055,32 +1093,20 @@ short delete_keyframe(ReportList *reports, ID *id, bAction *act, const char grou
/* will only loop once unless the array index was -1 */
for (; array_index < array_index_max; array_index++) {
FCurve *fcu = verify_fcurve(act, group, &ptr, rna_path, array_index, 0);
- bool found;
- int i;
-
+
/* check if F-Curve exists and/or whether it can be edited */
if (fcu == NULL)
continue;
-
- if ( (fcu->flag & FCURVE_PROTECTED) || ((fcu->grp) && (fcu->grp->flag & AGRP_PROTECTED)) ) {
- if (G.debug & G_DEBUG)
- printf("WARNING: not deleting keyframe for locked F-Curve\n");
+
+ if (BKE_fcurve_is_protected(fcu)) {
+ BKE_reportf(reports, RPT_WARNING,
+ "Not deleting keyframe for locked F-Curve '%s' for %s '%s'",
+ fcu->rna_path, BKE_idcode_to_name(GS(id->name)), id->name + 2);
continue;
}
-
- /* try to find index of beztriple to get rid of */
- i = binarysearch_bezt_index(fcu->bezt, cfra, fcu->totvert, &found);
- if (found) {
- /* delete the key at the index (will sanity check + do recalc afterwards) */
- delete_fcurve_key(fcu, i, 1);
-
- /* Only delete curve too if it won't be doing anything anymore */
- if ((fcu->totvert == 0) && (list_has_suitable_fmodifier(&fcu->modifiers, 0, FMI_TYPE_GENERATE_CURVE) == 0))
- ANIM_fcurve_delete_from_animdata(NULL, adt, fcu);
-
- /* return success */
- ret++;
- }
+
+ ret += delete_keyframe_fcurve(adt, fcu, cfra);
+
}
/* return success/failure */
@@ -1158,7 +1184,7 @@ static short clear_keyframe(ReportList *reports, ID *id, bAction *act, const cha
if (fcu == NULL)
continue;
- if ( (fcu->flag & FCURVE_PROTECTED) || ((fcu->grp) && (fcu->grp->flag & AGRP_PROTECTED)) ) {
+ if (BKE_fcurve_is_protected(fcu)) {
if (G.debug & G_DEBUG)
printf("WARNING: not deleting keyframe for locked F-Curve\n");
continue;
@@ -1199,7 +1225,7 @@ static int modify_key_op_poll(bContext *C)
/* if Outliner, don't allow in some views */
if (so) {
- if (ELEM5(so->outlinevis, SO_GROUPS, SO_LIBRARIES, SO_SEQUENCE, SO_USERDEF, SO_KEYMAP)) {
+ if (ELEM4(so->outlinevis, SO_GROUPS, SO_LIBRARIES, SO_SEQUENCE, SO_USERDEF)) {
return 0;
}
}
@@ -1537,14 +1563,22 @@ static int delete_key_v3d_exec(bContext *C, wmOperator *op)
AnimData *adt = ob->adt;
bAction *act = adt->action;
FCurve *fcu, *fcn;
+ const float cfra_unmap = BKE_nla_tweakedit_remap(adt, cfra, NLATIME_CONVERT_UNMAP);
for (fcu = act->curves.first; fcu; fcu = fcn) {
fcn = fcu->next;
-
+
+ if (BKE_fcurve_is_protected(fcu)) {
+ BKE_reportf(op->reports, RPT_WARNING,
+ "Not deleting keyframe for locked F-Curve '%s', object '%s'",
+ fcu->rna_path, id->name + 2);
+ continue;
+ }
+
/* delete keyframes on current frame
* WARNING: this can delete the next F-Curve, hence the "fcn" copying
*/
- success += delete_keyframe(op->reports, id, NULL, NULL, fcu->rna_path, fcu->array_index, cfra, 0);
+ success += delete_keyframe_fcurve(adt, fcu, cfra_unmap);
}
}
diff --git a/source/blender/editors/armature/BIF_retarget.h b/source/blender/editors/armature/BIF_retarget.h
index 2ea0e0ab0d7..21e85b6fe89 100644
--- a/source/blender/editors/armature/BIF_retarget.h
+++ b/source/blender/editors/armature/BIF_retarget.h
@@ -29,6 +29,7 @@
#include "BLI_graph.h"
#include "BLI_ghash.h"
+#include "BLI_task.h"
#include "BLI_threads.h"
#include "reeb.h"
@@ -68,7 +69,8 @@ typedef struct RigGraph {
ReebGraph *link_mesh;
- struct ThreadedWorker *worker;
+ TaskScheduler *task_scheduler;
+ TaskPool *task_pool;
GHash *bones_map; /* map of editbones by name */
GHash *controls_map; /* map of rigcontrols by bone pointer */
diff --git a/source/blender/editors/armature/armature_add.c b/source/blender/editors/armature/armature_add.c
index d480d41f5d6..351fd2844c9 100644
--- a/source/blender/editors/armature/armature_add.c
+++ b/source/blender/editors/armature/armature_add.c
@@ -176,7 +176,7 @@ static int armature_click_extrude_exec(bContext *C, wmOperator *UNUSED(op))
newbone->flag |= BONE_CONNECTED;
}
- curs = give_cursor(scene, v3d);
+ curs = ED_view3d_cursor3d_get(scene, v3d);
copy_v3_v3(newbone->tail, curs);
sub_v3_v3v3(newbone->tail, newbone->tail, obedit->obmat[3]);
@@ -216,7 +216,7 @@ static int armature_click_extrude_invoke(bContext *C, wmOperator *op, const wmEv
ar = CTX_wm_region(C);
v3d = CTX_wm_view3d(C);
- fp = give_cursor(scene, v3d);
+ fp = ED_view3d_cursor3d_get(scene, v3d);
copy_v3_v3(oldcurs, fp);
@@ -691,7 +691,7 @@ static int armature_bone_primitive_add_exec(bContext *C, wmOperator *op)
RNA_string_get(op->ptr, "name", name);
- copy_v3_v3(curs, give_cursor(CTX_data_scene(C), CTX_wm_view3d(C)));
+ copy_v3_v3(curs, ED_view3d_cursor3d_get(CTX_data_scene(C), CTX_wm_view3d(C)));
/* Get inverse point for head and orientation for tail */
invert_m4_m4(obedit->imat, obedit->obmat);
diff --git a/source/blender/editors/armature/armature_edit.c b/source/blender/editors/armature/armature_edit.c
index 90c1a439a19..1c6ba1d3562 100644
--- a/source/blender/editors/armature/armature_edit.c
+++ b/source/blender/editors/armature/armature_edit.c
@@ -252,7 +252,7 @@ static int armature_calc_roll_exec(bContext *C, wmOperator *op)
Scene *scene = CTX_data_scene(C);
View3D *v3d = CTX_wm_view3d(C); /* can be NULL */
float cursor_local[3];
- const float *cursor = give_cursor(scene, v3d);
+ const float *cursor = ED_view3d_cursor3d_get(scene, v3d);
copy_v3_v3(cursor_local, cursor);
@@ -502,7 +502,7 @@ static int armature_fill_bones_exec(bContext *C, wmOperator *op)
/* Get points - cursor (tail) */
invert_m4_m4(obedit->imat, obedit->obmat);
- mul_v3_m4v3(curs, obedit->imat, give_cursor(scene, v3d));
+ mul_v3_m4v3(curs, obedit->imat, ED_view3d_cursor3d_get(scene, v3d));
/* Create a bone */
/* newbone = */ add_points_bone(obedit, ebp->vec, curs);
@@ -536,7 +536,7 @@ static int armature_fill_bones_exec(bContext *C, wmOperator *op)
/* get cursor location */
invert_m4_m4(obedit->imat, obedit->obmat);
- mul_v3_m4v3(curs, obedit->imat, give_cursor(scene, v3d));
+ mul_v3_m4v3(curs, obedit->imat, ED_view3d_cursor3d_get(scene, v3d));
/* get distances */
sub_v3_v3v3(vecA, ebp->vec, curs);
diff --git a/source/blender/editors/armature/armature_naming.c b/source/blender/editors/armature/armature_naming.c
index 1ee2dc80a97..2228cb8386e 100644
--- a/source/blender/editors/armature/armature_naming.c
+++ b/source/blender/editors/armature/armature_naming.c
@@ -113,6 +113,7 @@ static void constraint_bone_name_fix(Object *ob, ListBase *conlist, const char *
bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(curcon);
ListBase targets = {NULL, NULL};
+ /* constraint targets */
if (cti && cti->get_constraint_targets) {
cti->get_constraint_targets(curcon, &targets);
@@ -126,6 +127,12 @@ static void constraint_bone_name_fix(Object *ob, ListBase *conlist, const char *
if (cti->flush_constraint_targets)
cti->flush_constraint_targets(curcon, &targets, 0);
}
+
+ /* action constraints */
+ if (curcon->type == CONSTRAINT_TYPE_ACTION) {
+ bActionConstraint *actcon = (bActionConstraint *)curcon->data;
+ BKE_action_fix_paths_rename(&ob->id, actcon->act, "pose.bones", oldname, newname, 0, 0, 1);
+ }
}
}
@@ -182,16 +189,22 @@ void ED_armature_bone_rename(bArmature *arm, const char *oldnamep, const char *n
if (ob->pose) {
bPoseChannel *pchan = BKE_pose_channel_find_name(ob->pose, oldname);
if (pchan) {
+ GHash *gh = ob->pose->chanhash;
+
+ /* remove the old hash entry, and replace with the new name */
+ if (gh) {
+ BLI_assert(BLI_ghash_haskey(gh, pchan->name));
+ BLI_ghash_remove(gh, pchan->name, NULL, NULL);
+ }
+
BLI_strncpy(pchan->name, newname, MAXBONENAME);
-
- if (ob->pose->chanhash) {
- GHash *gh = ob->pose->chanhash;
-
- /* remove the old hash entry, and replace with the new name */
- BLI_ghash_remove(gh, oldname, NULL, NULL);
+
+ if (gh) {
BLI_ghash_insert(gh, pchan->name, pchan);
}
}
+
+ BLI_assert(BKE_pose_channels_is_valid(ob->pose) == true);
}
/* Update any object constraints to use the new bone name */
@@ -294,9 +307,13 @@ static int armature_flip_names_exec(bContext *C, wmOperator *UNUSED(op))
/* since we renamed stuff... */
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- /* note, notifier might evolve */
- WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
-
+ /* copied from #rna_Bone_update_renamed */
+ /* redraw view */
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data);
+
+ /* update animation channels */
+ WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN, ob->data);
+
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/armature/armature_ops.c b/source/blender/editors/armature/armature_ops.c
index 0090522d1e1..3c41765034d 100644
--- a/source/blender/editors/armature/armature_ops.c
+++ b/source/blender/editors/armature/armature_ops.c
@@ -165,37 +165,31 @@ void ED_operatormacros_armature(void)
{
wmOperatorType *ot;
wmOperatorTypeMacro *otmacro;
-
+
ot = WM_operatortype_append_macro("ARMATURE_OT_duplicate_move", "Duplicate",
"Make copies of the selected bones within the same armature and move them",
OPTYPE_UNDO | OPTYPE_REGISTER);
- if (ot) {
- WM_operatortype_macro_define(ot, "ARMATURE_OT_duplicate");
- otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
- RNA_enum_set(otmacro->ptr, "proportional", 0);
- }
+ WM_operatortype_macro_define(ot, "ARMATURE_OT_duplicate");
+ otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+ RNA_enum_set(otmacro->ptr, "proportional", 0);
ot = WM_operatortype_append_macro("ARMATURE_OT_extrude_move", "Extrude",
"Create new bones from the selected joints and move them",
OPTYPE_UNDO | OPTYPE_REGISTER);
- if (ot) {
- otmacro = WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude");
- RNA_boolean_set(otmacro->ptr, "forked", FALSE);
- otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
- RNA_enum_set(otmacro->ptr, "proportional", 0);
- }
-
+ otmacro = WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude");
+ RNA_boolean_set(otmacro->ptr, "forked", FALSE);
+ otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+ RNA_enum_set(otmacro->ptr, "proportional", 0);
+
/* XXX would it be nicer to just be able to have standard extrude_move, but set the forked property separate?
* that would require fixing a properties bug 19733 */
ot = WM_operatortype_append_macro("ARMATURE_OT_extrude_forked", "Extrude Forked",
"Create new bones from the selected joints and move them",
OPTYPE_UNDO | OPTYPE_REGISTER);
- if (ot) {
- otmacro = WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude");
- RNA_boolean_set(otmacro->ptr, "forked", TRUE);
- otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
- RNA_enum_set(otmacro->ptr, "proportional", 0);
- }
+ otmacro = WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude");
+ RNA_boolean_set(otmacro->ptr, "forked", TRUE);
+ otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+ RNA_enum_set(otmacro->ptr, "proportional", 0);
}
void ED_keymap_armature(wmKeyConfig *keyconf)
diff --git a/source/blender/editors/armature/armature_skinning.c b/source/blender/editors/armature/armature_skinning.c
index 22bd22c8561..0301db4b4cf 100644
--- a/source/blender/editors/armature/armature_skinning.c
+++ b/source/blender/editors/armature/armature_skinning.c
@@ -255,7 +255,7 @@ static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob,
bDeformGroup *dgroup;
bPoseChannel *pchan;
Mesh *mesh;
- Mat4 *bbone = NULL;
+ Mat4 bbone_array[MAX_BBONE_SUBDIV], *bbone = NULL;
float (*root)[3], (*tip)[3], (*verts)[3];
int *selected;
int numbones, vertsfilled = 0, i, j, segments = 0;
@@ -309,7 +309,8 @@ static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob,
if ((par->pose) && (pchan = BKE_pose_channel_find_name(par->pose, bone->name))) {
if (bone->segments > 1) {
segments = bone->segments;
- bbone = b_bone_spline_setup(pchan, 1);
+ b_bone_spline_setup(pchan, 1, bbone_array);
+ bbone = bbone_array;
}
}
}
diff --git a/source/blender/editors/armature/armature_utils.c b/source/blender/editors/armature/armature_utils.c
index 4991ef63cf5..76cd12f12f8 100644
--- a/source/blender/editors/armature/armature_utils.c
+++ b/source/blender/editors/armature/armature_utils.c
@@ -488,7 +488,6 @@ void ED_armature_from_edit(Object *obedit)
/* don't change active selection, this messes up separate which uses
* editmode toggle and can separate active bone which is de-selected originally */
/* newBone->flag |= BONE_SELECTED; */ /* important, editbones can be active with only 1 point selected */
- arm->act_edbone = NULL;
arm->act_bone = newBone;
}
newBone->roll = 0.0f;
@@ -575,6 +574,7 @@ void ED_armature_edit_free(struct Object *ob)
}
MEM_freeN(arm->edbo);
arm->edbo = NULL;
+ arm->act_edbone = NULL;
}
}
diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c
index 687455495a1..c03e7861307 100644
--- a/source/blender/editors/armature/editarmature_retarget.c
+++ b/source/blender/editors/armature/editarmature_retarget.c
@@ -83,7 +83,7 @@ static RigGraph *GLOBAL_RIGG = NULL;
/*******************************************************************************************************/
-void *exec_retargetArctoArc(void *param);
+void exec_retargetArctoArc(TaskPool *pool, void *taskdata, int threadid);
static void RIG_calculateEdgeAngles(RigEdge *edge_first, RigEdge *edge_second);
float rollBoneByQuat(EditBone *bone, float old_up_axis[3], float qrot[4]);
@@ -235,9 +235,8 @@ void RIG_freeRigGraph(BGraph *rg)
BNode *node;
BArc *arc;
-#ifdef USE_THREADS
- BLI_destroy_worker(rigg->worker);
-#endif
+ BLI_task_pool_free(rigg->task_pool);
+ BLI_task_scheduler_free(rigg->task_scheduler);
if (rigg->link_mesh) {
REEB_freeGraph(rigg->link_mesh);
@@ -284,12 +283,14 @@ static RigGraph *newRigGraph(void)
rg->free_node = NULL;
#ifdef USE_THREADS
- //totthread = BKE_scene_num_threads(G.scene);
- totthread = BLI_system_thread_count();
-
- rg->worker = BLI_create_worker(exec_retargetArctoArc, totthread, 20); /* fix number of threads */
+ totthread = TASK_SCHEDULER_AUTO_THREADS;
+#else
+ totthread = TASK_SCHEDULER_SINGLE_THREAD;
#endif
-
+
+ rg->task_scheduler = BLI_task_scheduler_create(totthread);
+ rg->task_pool = BLI_task_pool_create(rg->task_scheduler, NULL);
+
return rg;
}
@@ -2133,7 +2134,6 @@ static void retargetArctoArcLength(bContext *C, RigGraph *rigg, RigArc *iarc, Ri
static void retargetArctoArc(bContext *C, RigGraph *rigg, RigArc *iarc, RigNode *inode_start)
{
-#ifdef USE_THREADS
RetargetParam *p = MEM_callocN(sizeof(RetargetParam), "RetargetParam");
p->rigg = rigg;
@@ -2141,22 +2141,12 @@ static void retargetArctoArc(bContext *C, RigGraph *rigg, RigArc *iarc, RigNode
p->inode_start = inode_start;
p->context = C;
- BLI_insert_work(rigg->worker, p);
-#else
- RetargetParam p;
-
- p.rigg = rigg;
- p.iarc = iarc;
- p.inode_start = inode_start;
- p.context = C;
-
- exec_retargetArctoArc(&p);
-#endif
+ BLI_task_pool_push(rigg->task_pool, exec_retargetArctoArc, p, true, TASK_PRIORITY_HIGH);
}
-void *exec_retargetArctoArc(void *param)
+void exec_retargetArctoArc(TaskPool *UNUSED(pool), void *taskdata, int UNUSED(threadid))
{
- RetargetParam *p = (RetargetParam *)param;
+ RetargetParam *p = (RetargetParam *)taskdata;
RigGraph *rigg = p->rigg;
RigArc *iarc = p->iarc;
bContext *C = p->context;
@@ -2183,12 +2173,6 @@ void *exec_retargetArctoArc(void *param)
retargetArctoArcLength(C, rigg, iarc, inode_start);
}
}
-
-#ifdef USE_THREADS
- MEM_freeN(p);
-#endif
-
- return NULL;
}
static void matchMultiResolutionNode(RigGraph *rigg, RigNode *inode, ReebNode *top_node)
@@ -2414,9 +2398,7 @@ static void retargetSubgraph(bContext *C, RigGraph *rigg, RigArc *start_arc, Rig
static void finishRetarget(RigGraph *rigg)
{
-#ifdef USE_THREADS
- BLI_end_worker(rigg->worker);
-#endif
+ BLI_task_pool_work_and_wait(rigg->task_pool);
}
static void adjustGraphs(bContext *C, RigGraph *rigg)
diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c
index 76068c122bf..16d7f9c9420 100644
--- a/source/blender/editors/armature/meshlaplacian.c
+++ b/source/blender/editors/armature/meshlaplacian.c
@@ -281,7 +281,7 @@ static void laplacian_system_construct_end(LaplacianSystem *sys)
sys->varea = MEM_callocN(sizeof(float) * totvert, "LaplacianSystemVarea");
- sys->edgehash = BLI_edgehash_new();
+ sys->edgehash = BLI_edgehash_new_ex(__func__, BLI_EDGEHASH_SIZE_GUESS_FROM_POLYS(sys->totface));
for (a = 0, face = sys->faces; a < sys->totface; a++, face++) {
laplacian_increase_edge_count(sys->edgehash, (*face)[0], (*face)[1]);
laplacian_increase_edge_count(sys->edgehash, (*face)[1], (*face)[2]);
diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c
index e84008c3d15..31ff1e161e8 100644
--- a/source/blender/editors/armature/pose_edit.c
+++ b/source/blender/editors/armature/pose_edit.c
@@ -148,36 +148,6 @@ static short pose_has_protected_selected(Object *ob, short warn)
}
#endif
-/* only for real IK, not for auto-IK */
-static int pose_channel_in_IK_chain(Object *ob, bPoseChannel *pchan, int level)
-{
- bConstraint *con;
- Bone *bone;
-
- /* No need to check if constraint is active (has influence),
- * since all constraints with CONSTRAINT_IK_AUTO are active */
- for (con = pchan->constraints.first; con; con = con->next) {
- if (con->type == CONSTRAINT_TYPE_KINEMATIC) {
- bKinematicConstraint *data = con->data;
- if (data->rootbone == 0 || data->rootbone > level) {
- if ((data->flag & CONSTRAINT_IK_AUTO) == 0)
- return 1;
- }
- }
- }
- for (bone = pchan->bone->childbase.first; bone; bone = bone->next) {
- pchan = BKE_pose_channel_find_name(ob->pose, bone->name);
- if (pchan && pose_channel_in_IK_chain(ob, pchan, level + 1))
- return 1;
- }
- return 0;
-}
-
-int ED_pose_channel_in_IK_chain(Object *ob, bPoseChannel *pchan)
-{
- return pose_channel_in_IK_chain(ob, pchan, 0);
-}
-
/* ********************************************** */
/* Motion Paths */
diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c
index cb7a699b522..182f94b3693 100644
--- a/source/blender/editors/armature/pose_lib.c
+++ b/source/blender/editors/armature/pose_lib.c
@@ -638,7 +638,7 @@ static int poselib_rename_invoke(bContext *C, wmOperator *op, const wmEvent *eve
}
/* part to sync with other similar operators... */
- return WM_operator_props_popup(C, op, event);
+ return WM_operator_props_popup_confirm(C, op, event);
}
static int poselib_rename_exec(bContext *C, wmOperator *op)
diff --git a/source/blender/editors/armature/pose_select.c b/source/blender/editors/armature/pose_select.c
index 9449b5a49bf..a53d8050c5d 100644
--- a/source/blender/editors/armature/pose_select.c
+++ b/source/blender/editors/armature/pose_select.c
@@ -64,6 +64,44 @@
/* ***************** Pose Select Utilities ********************* */
+/* Utility method for changing the selection status of a bone */
+void ED_pose_bone_select(Object *ob, bPoseChannel *pchan, bool select)
+{
+ bArmature *arm;
+
+ /* sanity checks */
+ // XXX: actually, we can probably still get away with no object - at most we have no updates
+ if (ELEM4(NULL, ob, ob->pose, pchan, pchan->bone))
+ return;
+
+ arm = ob->data;
+
+ /* can only change selection state if bone can be modified */
+ if (PBONE_SELECTABLE(arm, pchan->bone)) {
+ /* change selection state - activate too if selected */
+ if (select) {
+ pchan->bone->flag |= BONE_SELECTED;
+ arm->act_bone = pchan->bone;
+ }
+ else {
+ pchan->bone->flag &= ~BONE_SELECTED;
+ arm->act_bone = NULL;
+ }
+
+ // TODO: select and activate corresponding vgroup?
+
+ /* tag necessary depsgraph updates
+ * (see rna_Bone_select_update() in rna_armature.c for details)
+ */
+ if (arm->flag & ARM_HAS_VIZ_DEPS) {
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ }
+
+ /* send necessary notifiers */
+ WM_main_add_notifier(NC_GEOM | ND_DATA, ob);
+ }
+}
+
/* called from editview.c, for mode-less pose selection */
/* assumes scene obact and basact is still on old situation */
int ED_do_pose_selectbuffer(Scene *scene, Base *base, unsigned int *buffer, short hits,
diff --git a/source/blender/editors/armature/pose_slide.c b/source/blender/editors/armature/pose_slide.c
index ec1662c7fa6..d0e1b15064a 100644
--- a/source/blender/editors/armature/pose_slide.c
+++ b/source/blender/editors/armature/pose_slide.c
@@ -602,7 +602,7 @@ static int pose_slide_invoke_common(bContext *C, wmOperator *op, tPoseSlideOp *p
pose_slide_refresh(C, pso);
/* set cursor to indicate modal */
- WM_cursor_modal(win, BC_EW_SCROLLCURSOR);
+ WM_cursor_modal_set(win, BC_EW_SCROLLCURSOR);
/* header print */
pose_slide_draw_status(pso);
@@ -624,7 +624,7 @@ static int pose_slide_modal(bContext *C, wmOperator *op, const wmEvent *event)
{
/* return to normal cursor and header status */
ED_area_headerprint(pso->sa, NULL);
- WM_cursor_restore(win);
+ WM_cursor_modal_restore(win);
/* insert keyframes as required... */
pose_slide_autoKeyframe(C, pso);
@@ -639,7 +639,7 @@ static int pose_slide_modal(bContext *C, wmOperator *op, const wmEvent *event)
{
/* return to normal cursor and header status */
ED_area_headerprint(pso->sa, NULL);
- WM_cursor_restore(win);
+ WM_cursor_modal_restore(win);
/* reset transforms back to original state */
pose_slide_reset(pso);
diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c
index f66fb38a2a6..3a09f531d44 100644
--- a/source/blender/editors/armature/reeb.c
+++ b/source/blender/editors/armature/reeb.c
@@ -198,7 +198,7 @@ ReebGraph *newReebGraph(void)
rg = MEM_callocN(sizeof(ReebGraph), "reeb graph");
rg->totnodes = 0;
- rg->emap = BLI_edgehash_new();
+ rg->emap = BLI_edgehash_new(__func__);
rg->free_arc = REEB_freeArc;
diff --git a/source/blender/editors/curve/CMakeLists.txt b/source/blender/editors/curve/CMakeLists.txt
index 4f34bd19b5b..0b449c4334d 100644
--- a/source/blender/editors/curve/CMakeLists.txt
+++ b/source/blender/editors/curve/CMakeLists.txt
@@ -36,6 +36,7 @@ set(INC_SYS
set(SRC
curve_ops.c
editcurve.c
+ editcurve_add.c
editfont.c
lorem.c
diff --git a/source/blender/editors/curve/curve_intern.h b/source/blender/editors/curve/curve_intern.h
index d197697e60b..da8f86580f6 100644
--- a/source/blender/editors/curve/curve_intern.h
+++ b/source/blender/editors/curve/curve_intern.h
@@ -33,6 +33,9 @@
#define __CURVE_INTERN_H__
/* internal exports only */
+struct ListBase;
+struct EditNurb;
+struct Object;
struct wmOperatorType;
/* lorem.c */
@@ -71,11 +74,13 @@ void FONT_OT_unlink(struct wmOperatorType *ot);
void FONT_OT_textbox_add(struct wmOperatorType *ot);
void FONT_OT_textbox_remove(struct wmOperatorType *ot);
+
/* editcurve.c */
void CURVE_OT_hide(struct wmOperatorType *ot);
void CURVE_OT_reveal(struct wmOperatorType *ot);
void CURVE_OT_separate(struct wmOperatorType *ot);
+void CURVE_OT_split(struct wmOperatorType *ot);
void CURVE_OT_duplicate(struct wmOperatorType *ot);
void CURVE_OT_delete(struct wmOperatorType *ot);
@@ -92,19 +97,6 @@ void CURVE_OT_smooth_weight(struct wmOperatorType *ot);
void CURVE_OT_smooth_radius(struct wmOperatorType *ot);
void CURVE_OT_smooth_tilt(struct wmOperatorType *ot);
-void CURVE_OT_primitive_bezier_curve_add(struct wmOperatorType *ot);
-void CURVE_OT_primitive_bezier_circle_add(struct wmOperatorType *ot);
-void CURVE_OT_primitive_nurbs_curve_add(struct wmOperatorType *ot);
-void CURVE_OT_primitive_nurbs_circle_add(struct wmOperatorType *ot);
-void CURVE_OT_primitive_nurbs_path_add(struct wmOperatorType *ot);
-
-void SURFACE_OT_primitive_nurbs_surface_curve_add(struct wmOperatorType *ot);
-void SURFACE_OT_primitive_nurbs_surface_circle_add(struct wmOperatorType *ot);
-void SURFACE_OT_primitive_nurbs_surface_surface_add(struct wmOperatorType *ot);
-void SURFACE_OT_primitive_nurbs_surface_cylinder_add(struct wmOperatorType *ot);
-void SURFACE_OT_primitive_nurbs_surface_sphere_add(struct wmOperatorType *ot);
-void SURFACE_OT_primitive_nurbs_surface_torus_add(struct wmOperatorType *ot);
-
void CURVE_OT_de_select_first(struct wmOperatorType *ot);
void CURVE_OT_de_select_last(struct wmOperatorType *ot);
void CURVE_OT_select_all(struct wmOperatorType *ot);
@@ -126,5 +118,24 @@ void CURVE_OT_vertex_add(struct wmOperatorType *ot);
void CURVE_OT_extrude(struct wmOperatorType *ot);
void CURVE_OT_cyclic_toggle(struct wmOperatorType *ot);
-#endif /* ED_UTIL_INTERN_H */
+/* helper functions */
+void ed_editnurb_translate_flag(struct ListBase *editnurb, short flag, const float vec[3]);
+bool ed_editnurb_extrude_flag(struct EditNurb *editnurb, short flag);
+bool ed_editnurb_spin(float viewmat[4][4], struct Object *obedit, const float axis[3], const float cent[3]);
+
+
+/* editcurve_add.c */
+void CURVE_OT_primitive_bezier_curve_add(struct wmOperatorType *ot);
+void CURVE_OT_primitive_bezier_circle_add(struct wmOperatorType *ot);
+void CURVE_OT_primitive_nurbs_curve_add(struct wmOperatorType *ot);
+void CURVE_OT_primitive_nurbs_circle_add(struct wmOperatorType *ot);
+void CURVE_OT_primitive_nurbs_path_add(struct wmOperatorType *ot);
+
+void SURFACE_OT_primitive_nurbs_surface_curve_add(struct wmOperatorType *ot);
+void SURFACE_OT_primitive_nurbs_surface_circle_add(struct wmOperatorType *ot);
+void SURFACE_OT_primitive_nurbs_surface_surface_add(struct wmOperatorType *ot);
+void SURFACE_OT_primitive_nurbs_surface_cylinder_add(struct wmOperatorType *ot);
+void SURFACE_OT_primitive_nurbs_surface_sphere_add(struct wmOperatorType *ot);
+void SURFACE_OT_primitive_nurbs_surface_torus_add(struct wmOperatorType *ot);
+#endif /* __CURVE_INTERN_H__ */
diff --git a/source/blender/editors/curve/curve_ops.c b/source/blender/editors/curve/curve_ops.c
index 2452a5d1a4b..1cf194e02c4 100644
--- a/source/blender/editors/curve/curve_ops.c
+++ b/source/blender/editors/curve/curve_ops.c
@@ -87,6 +87,7 @@ void ED_operatortypes_curve(void)
WM_operatortype_append(CURVE_OT_reveal);
WM_operatortype_append(CURVE_OT_separate);
+ WM_operatortype_append(CURVE_OT_split);
WM_operatortype_append(CURVE_OT_duplicate);
WM_operatortype_append(CURVE_OT_delete);
@@ -244,6 +245,7 @@ void ED_keymap_curve(wmKeyConfig *keyconf)
RNA_boolean_set(kmi->ptr, "deselect", TRUE);
WM_keymap_add_item(keymap, "CURVE_OT_separate", PKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "CURVE_OT_split", YKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "CURVE_OT_extrude_move", EKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "CURVE_OT_duplicate_move", DKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "CURVE_OT_make_segment", FKEY, KM_PRESS, 0, 0);
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 660f8098a38..bd91740521d 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -29,16 +29,6 @@
* \ingroup edcurve
*/
-#include <math.h>
-#include <string.h>
-
-#ifndef WIN32
-#include <unistd.h>
-#else
-#include <io.h>
-#endif
-#include <stdlib.h>
-
#include "DNA_key_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
@@ -49,9 +39,7 @@
#include "BLI_blenlib.h"
#include "BLI_bitmap.h"
#include "BLI_math.h"
-#include "BLI_dynstr.h"
#include "BLI_rand.h"
-#include "BLI_utildefines.h"
#include "BLI_ghash.h"
#include "BLF_translation.h"
@@ -62,7 +50,6 @@
#include "BKE_fcurve.h"
#include "BKE_global.h"
#include "BKE_key.h"
-#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_report.h"
#include "BKE_animsys.h"
@@ -106,16 +93,25 @@ typedef struct {
Nurb *orig_nu;
} CVKeyIndex;
-void selectend_nurb(Object *obedit, short selfirst, short doswap, short selstatus);
-static void select_adjacent_cp(ListBase *editnurb, short next, short cont, short selstatus);
+typedef enum eVisible_Types {
+ HIDDEN = true,
+ VISIBLE = false,
+} eVisible_Types;
-/* still need to eradicate a few :( */
-#define CALLOC_STRUCT_N(x, y, name) (x *)MEM_callocN((y) * sizeof(x), name)
+typedef enum eEndPoint_Types {
+ FIRST = true,
+ LAST = false,
+} eEndPoint_Types;
-static float nurbcircle[8][2] = {
- {0.0, -1.0}, {-1.0, -1.0}, {-1.0, 0.0}, {-1.0, 1.0},
- {0.0, 1.0}, { 1.0, 1.0}, { 1.0, 0.0}, { 1.0, -1.0}
-};
+typedef enum eCurveElem_Types {
+ CURVE_VERTEX = 0,
+ CURVE_SEGMENT,
+} eCurveElem_Types;
+
+void selectend_nurb(Object *obedit, enum eEndPoint_Types selfirst, bool doswap, bool selstatus);
+static void select_adjacent_cp(ListBase *editnurb, short next, const bool cont, const bool selstatus);
+static void adduplicateflagNurb(Object *obedit, ListBase *newnurb, const short flag, const bool split);
+static int curve_delete_segments(Object *obedit, const bool split);
ListBase *object_editcurve_get(Object *ob)
{
@@ -149,69 +145,59 @@ static Nurb *get_actNurb(Object *obedit)
/* ******************* SELECTION FUNCTIONS ********************* */
-#define HIDDEN 1
-#define VISIBLE 0
-
-#define FIRST 1
-#define LAST 0
-
/* returns 1 in case (de)selection was successful */
-static short select_beztriple(BezTriple *bezt, short selstatus, short flag, short hidden)
+static bool select_beztriple(BezTriple *bezt, bool selstatus, short flag, eVisible_Types hidden)
{
- if (bezt) {
- if ((bezt->hide == 0) || (hidden == 1)) {
- if (selstatus == 1) { /* selects */
- bezt->f1 |= flag;
- bezt->f2 |= flag;
- bezt->f3 |= flag;
- return 1;
- }
- else { /* deselects */
- bezt->f1 &= ~flag;
- bezt->f2 &= ~flag;
- bezt->f3 &= ~flag;
- return 1;
- }
+ if ((bezt->hide == 0) || (hidden == HIDDEN)) {
+ if (selstatus == SELECT) { /* selects */
+ bezt->f1 |= flag;
+ bezt->f2 |= flag;
+ bezt->f3 |= flag;
+ return true;
+ }
+ else { /* deselects */
+ bezt->f1 &= ~flag;
+ bezt->f2 &= ~flag;
+ bezt->f3 &= ~flag;
+ return true;
}
}
- return 0;
+ return false;
}
/* returns 1 in case (de)selection was successful */
-static short select_bpoint(BPoint *bp, short selstatus, short flag, short hidden)
+static bool select_bpoint(BPoint *bp, bool selstatus, short flag, bool hidden)
{
- if (bp) {
- if ((bp->hide == 0) || (hidden == 1)) {
- if (selstatus == 1) {
- bp->f1 |= flag;
- return 1;
- }
- else {
- bp->f1 &= ~flag;
- return 1;
- }
+ if ((bp->hide == 0) || (hidden == 1)) {
+ if (selstatus == SELECT) {
+ bp->f1 |= flag;
+ return true;
+ }
+ else {
+ bp->f1 &= ~flag;
+ return true;
}
}
- return 0;
+ return false;
}
-static short swap_selection_beztriple(BezTriple *bezt)
+static bool swap_selection_beztriple(BezTriple *bezt)
{
if (bezt->f2 & SELECT)
- return select_beztriple(bezt, DESELECT, 1, VISIBLE);
+ return select_beztriple(bezt, DESELECT, SELECT, VISIBLE);
else
- return select_beztriple(bezt, SELECT, 1, VISIBLE);
+ return select_beztriple(bezt, SELECT, SELECT, VISIBLE);
}
-static short swap_selection_bpoint(BPoint *bp)
+static bool swap_selection_bpoint(BPoint *bp)
{
if (bp->f1 & SELECT)
- return select_bpoint(bp, DESELECT, 1, VISIBLE);
+ return select_bpoint(bp, DESELECT, SELECT, VISIBLE);
else
- return select_bpoint(bp, SELECT, 1, VISIBLE);
+ return select_bpoint(bp, SELECT, SELECT, VISIBLE);
}
int isNurbsel(Nurb *nu)
@@ -361,7 +347,7 @@ static CVKeyIndex *getCVKeyIndex(EditNurb *editnurb, void *cv)
static CVKeyIndex *popCVKeyIndex(EditNurb *editnurb, void *cv)
{
- return BLI_ghash_pop(editnurb->keyindex, cv, NULL);
+ return BLI_ghash_popkey(editnurb->keyindex, cv, NULL);
}
static BezTriple *getKeyIndexOrig_bezt(EditNurb *editnurb, BezTriple *bezt)
@@ -674,7 +660,7 @@ static GHash *dupli_keyIndexHash(GHash *keyindex)
GHash *gh;
GHashIterator *hashIter;
- gh = BLI_ghash_ptr_new("dupli_keyIndex gh");
+ gh = BLI_ghash_ptr_new_ex("dupli_keyIndex gh", BLI_ghash_size(keyindex));
for (hashIter = BLI_ghashIterator_new(keyindex);
BLI_ghashIterator_done(hashIter) == false;
@@ -1387,16 +1373,15 @@ static int separate_exec(bContext *C, wmOperator *op)
{
Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
- Nurb *nu, *nu1;
Object *oldob, *newob;
Base *oldbase, *newbase;
Curve *oldcu, *newcu;
- EditNurb *oldedit, *newedit;
+ EditNurb *newedit;
+ ListBase newnurb = {NULL, NULL};
oldbase = CTX_data_active_base(C);
oldob = oldbase->object;
oldcu = oldob->data;
- oldedit = oldcu->editnurb;
if (oldcu->key) {
BKE_report(op->reports, RPT_ERROR, "Cannot separate a curve with vertex keys");
@@ -1404,44 +1389,43 @@ static int separate_exec(bContext *C, wmOperator *op)
}
WM_cursor_wait(1);
-
- /* 1. duplicate the object and data */
+
+ /* 1. duplicate geometry and check for valid selection for separate */
+ adduplicateflagNurb(oldob, &newnurb, SELECT, true);
+
+ if (newnurb.first == NULL) {
+ WM_cursor_wait(0);
+ BKE_report(op->reports, RPT_ERROR, "Cannot separate current selection");
+ return OPERATOR_CANCELLED;
+ }
+
+ /* 2. duplicate the object and data */
newbase = ED_object_add_duplicate(bmain, scene, oldbase, 0); /* 0 = fully linked */
DAG_relations_tag_update(bmain);
- ED_base_object_select(newbase, BA_DESELECT);
newob = newbase->object;
-
newcu = newob->data = BKE_curve_copy(oldcu);
newcu->editnurb = NULL;
oldcu->id.us--; /* because new curve is a copy: reduce user count */
- /* 2. put new object in editmode and clear it */
+ /* 3. put new object in editmode, clear it and set separated nurbs */
make_editNurb(newob);
newedit = newcu->editnurb;
BKE_nurbList_free(&newedit->nurbs);
BKE_curve_editNurb_keyIndex_free(newedit);
newedit->keyindex = NULL;
+ BLI_movelisttolist(&newedit->nurbs, &newnurb);
- /* 3. move over parts from old object */
- for (nu = oldedit->nurbs.first; nu; nu = nu1) {
- nu1 = nu->next;
-
- if (isNurbsel(nu)) {
- keyIndex_delNurb(oldedit, nu);
- BLI_remlink(&oldedit->nurbs, nu);
- BLI_addtail(&newedit->nurbs, nu);
- }
- }
-
- /* 4. put old object out of editmode */
+ /* 4. put old object out of editmode and delete separated geometry */
load_editNurb(newob);
free_editNurb(newob);
+ curve_delete_segments(oldob, true);
DAG_id_tag_update(&oldob->id, OB_RECALC_DATA); /* this is the original one */
DAG_id_tag_update(&newob->id, OB_RECALC_DATA); /* this is the separated one */
WM_event_add_notifier(C, NC_GEOM | ND_DATA, oldob->data);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, newob);
WM_cursor_wait(0);
@@ -1453,7 +1437,7 @@ void CURVE_OT_separate(wmOperatorType *ot)
/* identifiers */
ot->name = "Separate";
ot->idname = "CURVE_OT_separate";
- ot->description = "Separate (partly) selected curves or surfaces into a new object";
+ ot->description = "Separate selected points from connected unselected points into a new object";
/* api callbacks */
ot->exec = separate_exec;
@@ -1463,6 +1447,49 @@ void CURVE_OT_separate(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
+/******************** split operator ***********************/
+
+static int curve_split_exec(bContext *C, wmOperator *op)
+{
+ Object *obedit = CTX_data_edit_object(C);
+ ListBase *editnurb = object_editcurve_get(obedit);
+ ListBase newnurb = {NULL, NULL};
+
+ adduplicateflagNurb(obedit, &newnurb, SELECT, true);
+
+ if (newnurb.first != NULL) {
+ curve_delete_segments(obedit, true);
+ BLI_movelisttolist(editnurb, &newnurb);
+
+ if (ED_curve_updateAnimPaths(obedit->data))
+ WM_event_add_notifier(C, NC_OBJECT | ND_KEYS, obedit);
+
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
+ DAG_id_tag_update(obedit->data, 0);
+ }
+ else {
+ BKE_report(op->reports, RPT_ERROR, "Cannot split current selection");
+ return OPERATOR_CANCELLED;
+ }
+
+ return OPERATOR_FINISHED;
+}
+
+void CURVE_OT_split(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Split";
+ ot->idname = "CURVE_OT_split";
+ ot->description = "Split off selected points from connected unselected points";
+
+ /* api callbacks */
+ ot->exec = curve_split_exec;
+ ot->poll = ED_operator_editsurfcurve;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+}
+
/* ******************* FLAGS ********************* */
static short isNurbselUV(Nurb *nu, int *u, int *v, int flag)
@@ -1510,34 +1537,58 @@ static short isNurbselUV(Nurb *nu, int *u, int *v, int flag)
return 0;
}
-static void setflagsNurb(ListBase *editnurb, short flag)
+/* return true if U direction is selected and number of selected columns v */
+static bool isNurbselU(Nurb *nu, int *v, int flag)
{
- Nurb *nu;
- BezTriple *bezt;
BPoint *bp;
- int a;
+ int a, b, sel;
- for (nu = editnurb->first; nu; nu = nu->next) {
- if (nu->type == CU_BEZIER) {
- a = nu->pntsu;
- bezt = nu->bezt;
- while (a--) {
- bezt->f1 = bezt->f2 = bezt->f3 = flag;
- bezt++;
- }
+ *v = 0;
+
+ for (b = 0, bp = nu->bp; b < nu->pntsv; b++) {
+ sel = 0;
+ for (a = 0; a < nu->pntsu; a++, bp++) {
+ if (bp->f1 & flag) sel++;
}
- else {
- a = nu->pntsu * nu->pntsv;
- bp = nu->bp;
- while (a--) {
- bp->f1 = flag;
- bp++;
- }
+ if (sel == nu->pntsu) {
+ (*v)++;
+ }
+ else if (sel >= 1) {
+ *v = 0;
+ return 0;
+ }
+ }
+
+ return 1;
+}
+
+/* return true if V direction is selected and number of selected rows u */
+static bool isNurbselV(Nurb *nu, int *u, int flag)
+{
+ BPoint *bp;
+ int a, b, sel;
+
+ *u = 0;
+
+ for (a = 0; a < nu->pntsu; a++) {
+ bp = &nu->bp[a];
+ sel = 0;
+ for (b = 0; b < nu->pntsv; b++, bp += nu->pntsu) {
+ if (bp->f1 & flag) sel++;
+ }
+ if (sel == nu->pntsv) {
+ (*u)++;
+ }
+ else if (sel >= 1) {
+ *u = 0;
+ return 0;
}
}
+
+ return 1;
}
-static void rotateflagNurb(ListBase *editnurb, short flag, float *cent, float rotmat[3][3])
+static void rotateflagNurb(ListBase *editnurb, short flag, const float cent[3], float rotmat[3][3])
{
/* all verts with (flag & 'flag') rotate */
Nurb *nu;
@@ -1561,7 +1612,7 @@ static void rotateflagNurb(ListBase *editnurb, short flag, float *cent, float ro
}
}
-static void translateflagNurb(ListBase *editnurb, short flag, const float vec[3])
+void ed_editnurb_translate_flag(ListBase *editnurb, short flag, const float vec[3])
{
/* all verts with ('flag' & flag) translate */
Nurb *nu;
@@ -1614,14 +1665,13 @@ static void weightflagNurb(ListBase *editnurb, short flag, float w)
}
}
-static int deleteflagNurb(bContext *C, wmOperator *UNUSED(op), int flag)
+static int deleteflagNurb(Object *obedit, short flag)
{
- Object *obedit = CTX_data_edit_object(C);
Curve *cu = obedit->data;
ListBase *editnurb = object_editcurve_get(obedit);
Nurb *nu, *next;
BPoint *bp, *bpn, *newbp;
- int a, b, newu, newv, sel;
+ int a, b, newu, newv;
if (obedit->type != OB_SURF) {
return OPERATOR_CANCELLED;
@@ -1652,62 +1702,36 @@ static int deleteflagNurb(bContext *C, wmOperator *UNUSED(op), int flag)
BKE_nurb_free(nu); nu = NULL;
}
else {
- /* is nurb in U direction selected */
- newv = nu->pntsv;
- bp = nu->bp;
- for (b = 0; b < nu->pntsv; b++) {
- sel = 0;
- for (a = 0; a < nu->pntsu; a++, bp++) {
- if (bp->f1 & flag) sel++;
- }
- if (sel == nu->pntsu) {
- newv--;
- }
- else if (sel >= 1) {
- /* don't delete */
- break;
- }
- }
- if (newv != nu->pntsv && b == nu->pntsv) {
- /* delete */
- bp = nu->bp;
- bpn = newbp = (BPoint *)MEM_mallocN(newv * nu->pntsu * sizeof(BPoint), "deleteNurb");
- for (b = 0; b < nu->pntsv; b++) {
- if ((bp->f1 & flag) == 0) {
- memcpy(bpn, bp, nu->pntsu * sizeof(BPoint));
- keyIndex_updateBP(cu->editnurb, bp, bpn, nu->pntsu);
- bpn += nu->pntsu;
- }
- else {
- keyIndex_delBP(cu->editnurb, bp);
+ if (isNurbselU(nu, &newv, flag)) {
+ /* U direction selected */
+ newv = nu->pntsv - newv;
+ if (newv != nu->pntsv) {
+ /* delete */
+ bp = nu->bp;
+ bpn = newbp = (BPoint *)MEM_mallocN(newv * nu->pntsu * sizeof(BPoint), "deleteNurb");
+ for (b = 0; b < nu->pntsv; b++) {
+ if ((bp->f1 & flag) == 0) {
+ memcpy(bpn, bp, nu->pntsu * sizeof(BPoint));
+ keyIndex_updateBP(cu->editnurb, bp, bpn, nu->pntsu);
+ bpn += nu->pntsu;
+ }
+ else {
+ keyIndex_delBP(cu->editnurb, bp);
+ }
+ bp += nu->pntsu;
}
- bp += nu->pntsu;
- }
- nu->pntsv = newv;
- MEM_freeN(nu->bp);
- nu->bp = newbp;
- BKE_nurb_order_clamp_v(nu);
+ nu->pntsv = newv;
+ MEM_freeN(nu->bp);
+ nu->bp = newbp;
+ BKE_nurb_order_clamp_v(nu);
- BKE_nurb_knot_calc_v(nu);
- }
- else {
- /* is the nurb in V direction selected */
- newu = nu->pntsu;
- for (a = 0; a < nu->pntsu; a++) {
- bp = &nu->bp[a];
- sel = 0;
- for (b = 0; b < nu->pntsv; b++, bp += nu->pntsu) {
- if (bp->f1 & flag) sel++;
- }
- if (sel == nu->pntsv) {
- newu--;
- }
- else if (sel >= 1) {
- /* don't delete */
- break;
- }
+ BKE_nurb_knot_calc_v(nu);
}
- if (newu != nu->pntsu && a == nu->pntsu) {
+ }
+ else if (isNurbselV(nu, &newu, flag)) {
+ /* V direction selected */
+ newu = nu->pntsu - newu;
+ if (newu != nu->pntsu) {
/* delete */
bp = nu->bp;
bpn = newbp = (BPoint *)MEM_mallocN(newu * nu->pntsv * sizeof(BPoint), "deleteNurb");
@@ -1744,18 +1768,16 @@ static int deleteflagNurb(bContext *C, wmOperator *UNUSED(op), int flag)
nu = next;
}
- if (ED_curve_updateAnimPaths(obedit->data))
- WM_event_add_notifier(C, NC_OBJECT | ND_KEYS, obedit);
-
return OPERATOR_FINISHED;
}
/* only for OB_SURF */
-static short extrudeflagNurb(EditNurb *editnurb, int flag)
+bool ed_editnurb_extrude_flag(EditNurb *editnurb, short flag)
{
Nurb *nu;
BPoint *bp, *bpn, *newbp;
- int ok = 0, a, u, v, len;
+ int a, u, v, len;
+ bool ok = false;
nu = editnurb->nurbs.first;
while (nu) {
@@ -1774,7 +1796,7 @@ static short extrudeflagNurb(EditNurb *editnurb, int flag)
a--;
}
if (a == 0) {
- ok = 1;
+ ok = true;
newbp = (BPoint *)MEM_mallocN(2 * nu->pntsu * sizeof(BPoint), "extrudeNurb1");
ED_curve_bpcpy(editnurb, newbp, nu->bp, nu->pntsu);
bp = newbp + nu->pntsu;
@@ -1808,7 +1830,7 @@ static short extrudeflagNurb(EditNurb *editnurb, int flag)
}
if (u == 0 || u == nu->pntsv - 1) { /* row in u-direction selected */
- ok = 1;
+ ok = true;
newbp = (BPoint *)MEM_mallocN(nu->pntsu * (nu->pntsv + 1) *
sizeof(BPoint), "extrudeNurb1");
if (u == 0) {
@@ -1836,7 +1858,7 @@ static short extrudeflagNurb(EditNurb *editnurb, int flag)
BKE_nurb_knot_calc_v(nu);
}
else if (v == 0 || v == nu->pntsu - 1) { /* column in v-direction selected */
- ok = 1;
+ ok = true;
bpn = newbp = (BPoint *)MEM_mallocN((nu->pntsu + 1) * nu->pntsv * sizeof(BPoint), "extrudeNurb1");
bp = nu->bp;
@@ -1869,102 +1891,124 @@ static short extrudeflagNurb(EditNurb *editnurb, int flag)
return ok;
}
-static void adduplicateflagNurb(Object *obedit, short flag)
+static void adduplicateflagNurb(Object *obedit, ListBase *newnurb,
+ const short flag, const bool split)
{
ListBase *editnurb = object_editcurve_get(obedit);
- Nurb *nu, *newnu;
+ Nurb *nu = editnurb->last, *newnu;
BezTriple *bezt, *bezt1;
- BPoint *bp, *bp1;
+ BPoint *bp, *bp1, *bp2, *bp3;
Curve *cu = (Curve *)obedit->data;
- int a, b, starta, enda, newu, newv;
+ int a, b, c, starta, enda, diffa, cyclicu, cyclicv, newu, newv;
char *usel;
cu->lastsel = NULL;
-
- nu = editnurb->last;
while (nu) {
+ cyclicu = cyclicv = 0;
if (nu->type == CU_BEZIER) {
- bezt = nu->bezt;
- for (a = 0; a < nu->pntsu; a++) {
+ for (a = 0, bezt = nu->bezt; a < nu->pntsu; a++, bezt++) {
enda = -1;
starta = a;
while ((bezt->f1 & flag) || (bezt->f2 & flag) || (bezt->f3 & flag)) {
- select_beztriple(bezt, DESELECT, flag, HIDDEN);
+ if (!split) select_beztriple(bezt, DESELECT, flag, HIDDEN);
enda = a;
if (a >= nu->pntsu - 1) break;
a++;
bezt++;
}
if (enda >= starta) {
- newnu = (Nurb *)MEM_mallocN(sizeof(Nurb), "adduplicateN");
- memcpy(newnu, nu, sizeof(Nurb));
- BLI_addtail(editnurb, newnu);
- set_actNurb(obedit, newnu);
- newnu->pntsu = enda - starta + 1;
- newnu->bezt = (BezTriple *)MEM_mallocN((enda - starta + 1) * sizeof(BezTriple), "adduplicateN");
- memcpy(newnu->bezt, &nu->bezt[starta], newnu->pntsu * sizeof(BezTriple));
-
- b = newnu->pntsu;
- bezt1 = newnu->bezt;
- while (b--) {
- select_beztriple(bezt1, SELECT, flag, HIDDEN);
- bezt1++;
+ newu = diffa = enda - starta + 1; /* set newu and diffa, may use both */
+
+ if (starta == 0 && newu != nu->pntsu && (nu->flagu & CU_NURB_CYCLIC)) {
+ cyclicu = newu;
}
+ else {
+ if (enda == nu->pntsu - 1) newu += cyclicu;
+
+ newnu = BKE_nurb_copy(nu, newu, 1);
+ BLI_addtail(newnurb, newnu);
+ set_actNurb(obedit, newnu);
+ memcpy(newnu->bezt, &nu->bezt[starta], diffa * sizeof(BezTriple));
+ if (newu != diffa) {
+ memcpy(&newnu->bezt[diffa], nu->bezt, cyclicu * sizeof(BezTriple));
+ cyclicu = 0;
+ }
- if (nu->flagu & CU_NURB_CYCLIC) {
- if (starta != 0 || enda != nu->pntsu - 1) {
- newnu->flagu &= ~CU_NURB_CYCLIC;
+ if (newu != nu->pntsu) newnu->flagu &= ~CU_NURB_CYCLIC;
+
+ for (b = 0, bezt1 = newnu->bezt; b < newnu->pntsu; b++, bezt1++) {
+ select_beztriple(bezt1, SELECT, flag, HIDDEN);
}
}
}
- bezt++;
+ }
+
+ if (cyclicu != 0) {
+ newnu = BKE_nurb_copy(nu, cyclicu, 1);
+ BLI_addtail(newnurb, newnu);
+ memcpy(newnu->bezt, nu->bezt, cyclicu * sizeof(BezTriple));
+ newnu->flagu &= ~CU_NURB_CYCLIC;
+
+ for (b = 0, bezt1 = newnu->bezt; b < newnu->pntsu; b++, bezt1++) {
+ select_beztriple(bezt1, SELECT, flag, HIDDEN);
+ }
}
}
else if (nu->pntsv == 1) { /* because UV Nurb has a different method for dupli */
- bp = nu->bp;
- for (a = 0; a < nu->pntsu; a++) {
+ for (a = 0, bp = nu->bp; a < nu->pntsu; a++, bp++) {
enda = -1;
starta = a;
while (bp->f1 & flag) {
- select_bpoint(bp, DESELECT, flag, HIDDEN);
+ if (!split) select_bpoint(bp, DESELECT, flag, HIDDEN);
enda = a;
if (a >= nu->pntsu - 1) break;
a++;
bp++;
}
if (enda >= starta) {
- newnu = (Nurb *)MEM_mallocN(sizeof(Nurb), "adduplicateN3");
- memcpy(newnu, nu, sizeof(Nurb));
- set_actNurb(obedit, newnu);
- BLI_addtail(editnurb, newnu);
- newnu->pntsu = enda - starta + 1;
- newnu->bp = (BPoint *)MEM_mallocN((enda - starta + 1) * sizeof(BPoint), "adduplicateN4");
- memcpy(newnu->bp, &nu->bp[starta], newnu->pntsu * sizeof(BPoint));
-
- b = newnu->pntsu;
- bp1 = newnu->bp;
- while (b--) {
- select_bpoint(bp1, SELECT, flag, HIDDEN);
- bp1++;
+ newu = diffa = enda - starta + 1; /* set newu and diffa, may use both */
+
+ if (starta == 0 && newu != nu->pntsu && (nu->flagu & CU_NURB_CYCLIC)) {
+ cyclicu = newu;
}
+ else {
+ if (enda == nu->pntsu - 1) newu += cyclicu;
+
+ newnu = BKE_nurb_copy(nu, newu, 1);
+ BLI_addtail(newnurb, newnu);
+ set_actNurb(obedit, newnu);
+ memcpy(newnu->bp, &nu->bp[starta], diffa * sizeof(BPoint));
+ if (newu != diffa) {
+ memcpy(&newnu->bp[diffa], nu->bp, cyclicu * sizeof(BPoint));
+ cyclicu = 0;
+ }
- if (nu->flagu & CU_NURB_CYCLIC) {
- if (starta != 0 || enda != nu->pntsu - 1) {
- newnu->flagu &= ~CU_NURB_CYCLIC;
+ if (newu != nu->pntsu) newnu->flagu &= ~CU_NURB_CYCLIC;
+
+ for (b = 0, bp1 = newnu->bp; b < newnu->pntsu; b++, bp1++) {
+ select_bpoint(bp1, SELECT, flag, HIDDEN);
}
}
+ }
+ }
- /* knots */
- newnu->knotsu = NULL;
- BKE_nurb_knot_calc_u(newnu);
+ if (cyclicu != 0) {
+ newnu = BKE_nurb_copy(nu, cyclicu, 1);
+ BLI_addtail(newnurb, newnu);
+ set_actNurb(obedit, newnu);
+
+ memcpy(newnu->bp, nu->bp, cyclicu * sizeof(BPoint));
+ newnu->flagu &= ~CU_NURB_CYCLIC;
+
+ for (b = 0, bp1 = newnu->bp; b < newnu->pntsu; b++, bp1++) {
+ select_bpoint(bp1, SELECT, flag, HIDDEN);
}
- bp++;
}
}
else {
- /* a rectangular area in nurb has to be selected */
if (isNurbsel(nu)) {
- usel = MEM_callocN(nu->pntsu, "adduplicateN4");
+ /* a rectangular area in nurb has to be selected and if splitting must be in U or V direction */
+ usel = MEM_callocN(nu->pntsu, "adduplicateN3");
bp = nu->bp;
for (a = 0; a < nu->pntsv; a++) {
for (b = 0; b < nu->pntsu; b++, bp++) {
@@ -1985,61 +2029,129 @@ static void adduplicateflagNurb(Object *obedit, short flag)
}
}
}
- if (newu == 0 || newv == 0) {
+ MEM_freeN(usel);
+
+ if ((newu == 0 || newv == 0) ||
+ (split && !isNurbselU(nu, &newv, SELECT) && !isNurbselV(nu, &newu, SELECT)))
+ {
if (G.debug & G_DEBUG)
printf("Can't duplicate Nurb\n");
}
else {
+ for (a = 0, bp1 = nu->bp; a < nu->pntsu * nu->pntsv; a++, bp1++) {
+ newv = newu = 0;
+
+ if ((bp1->f1 & flag) && !(bp1->f1 & SURF_SEEN)) {
+ /* point selected, now loop over points in U and V directions */
+ for (b = a % nu->pntsu, bp2 = bp1; b < nu->pntsu; b++, bp2++) {
+ if (bp2->f1 & flag) {
+ newu++;
+ for (c = a / nu->pntsu, bp3 = bp2; c < nu->pntsv; c++, bp3 += nu->pntsu) {
+ if (bp3->f1 & flag) {
+ bp3->f1 |= SURF_SEEN; /* flag as seen so skipped on future iterations */
+ if (newu == 1) newv++;
+ }
+ else {
+ break;
+ }
+ }
+ }
+ else {
+ break;
+ }
+ }
+ }
- if (newu == 1) SWAP(int, newu, newv);
+ if ((newu + newv) > 2) {
+ /* ignore single points */
+ if (a == 0) {
+ /* check if need to save cyclic selection and continue if so */
+ if (newu == nu->pntsu && (nu->flagv & CU_NURB_CYCLIC)) cyclicv = newv;
+ if (newv == nu->pntsv && (nu->flagu & CU_NURB_CYCLIC)) cyclicu = newu;
+ if (cyclicu != 0 || cyclicv != 0) continue;
+ }
- newnu = (Nurb *)MEM_mallocN(sizeof(Nurb), "adduplicateN5");
- memcpy(newnu, nu, sizeof(Nurb));
- BLI_addtail(editnurb, newnu);
- set_actNurb(obedit, newnu);
- newnu->pntsu = newu;
- newnu->pntsv = newv;
- newnu->bp = (BPoint *)MEM_mallocN(newu * newv * sizeof(BPoint), "adduplicateN6");
- BKE_nurb_order_clamp_u(newnu);
- BKE_nurb_order_clamp_v(newnu);
-
- newnu->knotsu = newnu->knotsv = NULL;
-
- bp = newnu->bp;
- bp1 = nu->bp;
- for (a = 0; a < nu->pntsv; a++) {
- for (b = 0; b < nu->pntsu; b++, bp1++) {
- if (bp1->f1 & flag) {
- memcpy(bp, bp1, sizeof(BPoint));
- select_bpoint(bp1, DESELECT, flag, HIDDEN);
- bp++;
+ if (a + newu == nu->pntsu && cyclicu != 0) {
+ /* cyclic in U direction */
+ newnu = BKE_nurb_copy(nu, newu + cyclicu, newv);
+ for (b = 0; b < newv; b++) {
+ memcpy(&newnu->bp[b * newnu->pntsu], &nu->bp[b * nu->pntsu + a], newu * sizeof(BPoint));
+ memcpy(&newnu->bp[b * newnu->pntsu + newu], &nu->bp[b * nu->pntsu], cyclicu * sizeof(BPoint));
+ }
+ cyclicu = cyclicv = 0;
+ }
+ else if ((a / nu->pntsu) + newv == nu->pntsv && cyclicv != 0) {
+ /* cyclic in V direction */
+ newnu = BKE_nurb_copy(nu, newu, newv + cyclicv);
+ memcpy(newnu->bp, &nu->bp[a], newu * newv * sizeof(BPoint));
+ memcpy(&newnu->bp[newu * newv], nu->bp, newu * cyclicv * sizeof(BPoint));
+ cyclicu = cyclicv = 0;
}
+ else {
+ newnu = BKE_nurb_copy(nu, newu, newv);
+ for (b = 0; b < newv; b++) {
+ memcpy(&newnu->bp[b * newu], &nu->bp[b * nu->pntsu + a], newu * sizeof(BPoint));
+ }
+ }
+ set_actNurb(obedit, newnu);
+ BLI_addtail(newnurb, newnu);
+
+ if (newu != nu->pntsu) newnu->flagu &= ~CU_NURB_CYCLIC;
+ if (newv != nu->pntsv) newnu->flagv &= ~CU_NURB_CYCLIC;
}
}
- if (BKE_nurb_check_valid_u(newnu)) {
- if (nu->pntsu == newnu->pntsu && nu->knotsu) {
- newnu->knotsu = MEM_dupallocN(nu->knotsu);
- }
- else {
- BKE_nurb_knot_calc_u(newnu);
+
+ if (cyclicu != 0 || cyclicv != 0) {
+ /* copy start of a cyclic surface, or copying all selected points */
+ newu = cyclicu == 0 ? nu->pntsu : cyclicu;
+ newv = cyclicv == 0 ? nu->pntsv : cyclicv;
+
+ newnu = BKE_nurb_copy(nu, newu, newv);
+ for (b = 0; b < newv; b++) {
+ memcpy(&newnu->bp[b * newu], &nu->bp[b * nu->pntsu], newu * sizeof(BPoint));
}
+ set_actNurb(obedit, newnu);
+ BLI_addtail(newnurb, newnu);
+
+ if (newu != nu->pntsu) newnu->flagu &= ~CU_NURB_CYCLIC;
+ if (newv != nu->pntsv) newnu->flagv &= ~CU_NURB_CYCLIC;
}
- if (BKE_nurb_check_valid_v(newnu)) {
- if (nu->pntsv == newnu->pntsv && nu->knotsv) {
- newnu->knotsv = MEM_dupallocN(nu->knotsv);
- }
- else {
- BKE_nurb_knot_calc_v(newnu);
- }
+
+ for (b = 0, bp1 = nu->bp; b < nu->pntsu * nu->pntsv; b++, bp1++) {
+ bp1->f1 &= ~SURF_SEEN;
+ if (!split) select_bpoint(bp1, DESELECT, flag, HIDDEN);
}
}
- MEM_freeN(usel);
}
}
-
nu = nu->prev;
}
-
+
+ for (nu = newnurb->first; nu; nu = nu->next) {
+ if (nu->type == CU_BEZIER) {
+ if (split) {
+ /* recalc first and last */
+ BKE_nurb_handle_calc_simple(nu, &nu->bezt[0]);
+ BKE_nurb_handle_calc_simple(nu, &nu->bezt[nu->pntsu - 1]);
+ }
+ }
+ else {
+ /* knots done after duplicate as pntsu may change */
+ nu->knotsu = nu->knotsv = NULL;
+ BKE_nurb_order_clamp_u(nu);
+ BKE_nurb_knot_calc_u(nu);
+
+ if (obedit->type == OB_SURF) {
+ for (a = 0, bp = nu->bp; a < nu->pntsu * nu->pntsv; a++, bp++) {
+ bp->f1 &= ~SURF_SEEN;
+ }
+
+ BKE_nurb_order_clamp_v(nu);
+ BKE_nurb_knot_calc_v(nu);
+ }
+ }
+ }
+
/* actnu changed */
}
@@ -2513,7 +2625,8 @@ void CURVE_OT_smooth_tilt(wmOperatorType *ot)
/* next == -1 -> select previous */
/* cont == 1 -> select continuously */
/* selstatus, inverts behavior */
-static void select_adjacent_cp(ListBase *editnurb, short next, short cont, short selstatus)
+static void select_adjacent_cp(ListBase *editnurb, short next,
+ const bool cont, const bool selstatus)
{
Nurb *nu;
BezTriple *bezt;
@@ -2531,10 +2644,10 @@ static void select_adjacent_cp(ListBase *editnurb, short next, short cont, short
if (next < 0) bezt = &nu->bezt[a - 1];
while (a--) {
if (a - abs(next) < 0) break;
- if ((lastsel == 0) && (bezt->hide == 0) && ((bezt->f2 & SELECT) || (selstatus == 0))) {
+ if ((lastsel == 0) && (bezt->hide == 0) && ((bezt->f2 & SELECT) || (selstatus == DESELECT))) {
bezt += next;
- if (!(bezt->f2 & SELECT) || (selstatus == 0)) {
- short sel = select_beztriple(bezt, selstatus, 1, VISIBLE);
+ if (!(bezt->f2 & SELECT) || (selstatus == DESELECT)) {
+ short sel = select_beztriple(bezt, selstatus, SELECT, VISIBLE);
if ((sel == 1) && (cont == 0)) lastsel = true;
}
}
@@ -2552,10 +2665,10 @@ static void select_adjacent_cp(ListBase *editnurb, short next, short cont, short
if (next < 0) bp = &nu->bp[a - 1];
while (a--) {
if (a - abs(next) < 0) break;
- if ((lastsel == 0) && (bp->hide == 0) && ((bp->f1 & SELECT) || (selstatus == 0))) {
+ if ((lastsel == 0) && (bp->hide == 0) && ((bp->f1 & SELECT) || (selstatus == DESELECT))) {
bp += next;
- if (!(bp->f1 & SELECT) || (selstatus == 0)) {
- short sel = select_bpoint(bp, selstatus, 1, VISIBLE);
+ if (!(bp->f1 & SELECT) || (selstatus == DESELECT)) {
+ short sel = select_bpoint(bp, selstatus, SELECT, VISIBLE);
if ((sel == 1) && (cont == 0)) lastsel = true;
}
}
@@ -2577,7 +2690,7 @@ static void select_adjacent_cp(ListBase *editnurb, short next, short cont, short
* doswap: defines if selection state of each first/last control point is swapped
* selstatus: selection status in case doswap is false
*/
-void selectend_nurb(Object *obedit, short selfirst, short doswap, short selstatus)
+void selectend_nurb(Object *obedit, eEndPoint_Types selfirst, bool doswap, bool selstatus)
{
ListBase *editnurb = object_editcurve_get(obedit);
Nurb *nu;
@@ -2596,7 +2709,7 @@ void selectend_nurb(Object *obedit, short selfirst, short doswap, short selstatu
a = nu->pntsu;
/* which point? */
- if (selfirst == 0) { /* select last */
+ if (selfirst == LAST) { /* select last */
bezt = &nu->bezt[a - 1];
}
else { /* select first */
@@ -2604,18 +2717,18 @@ void selectend_nurb(Object *obedit, short selfirst, short doswap, short selstatu
}
while (a--) {
- short sel;
+ bool sel;
if (doswap) sel = swap_selection_beztriple(bezt);
- else sel = select_beztriple(bezt, selstatus, 1, VISIBLE);
+ else sel = select_beztriple(bezt, selstatus, SELECT, VISIBLE);
- if (sel == 1) break;
+ if (sel == true) break;
}
}
else {
a = nu->pntsu * nu->pntsv;
/* which point? */
- if (selfirst == 0) { /* select last */
+ if (selfirst == LAST) { /* select last */
bp = &nu->bp[a - 1];
}
else { /* select first */
@@ -2624,11 +2737,11 @@ void selectend_nurb(Object *obedit, short selfirst, short doswap, short selstatu
while (a--) {
if (bp->hide == 0) {
- short sel;
+ bool sel;
if (doswap) sel = swap_selection_bpoint(bp);
- else sel = select_bpoint(bp, selstatus, 1, VISIBLE);
+ else sel = select_bpoint(bp, selstatus, SELECT, VISIBLE);
- if (sel == 1) break;
+ if (sel == true) break;
}
}
}
@@ -2639,7 +2752,7 @@ static int de_select_first_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *obedit = CTX_data_edit_object(C);
- selectend_nurb(obedit, FIRST, 1, DESELECT);
+ selectend_nurb(obedit, FIRST, true, DESELECT);
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
@@ -2664,7 +2777,7 @@ static int de_select_last_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *obedit = CTX_data_edit_object(C);
- selectend_nurb(obedit, LAST, 1, DESELECT);
+ selectend_nurb(obedit, LAST, true, DESELECT);
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
@@ -2789,11 +2902,11 @@ static int hide_exec(bContext *C, wmOperator *op)
sel = 0;
while (a--) {
if (invert == 0 && BEZSELECTED_HIDDENHANDLES(cu, bezt)) {
- select_beztriple(bezt, DESELECT, 1, HIDDEN);
+ select_beztriple(bezt, DESELECT, SELECT, HIDDEN);
bezt->hide = 1;
}
else if (invert && !BEZSELECTED_HIDDENHANDLES(cu, bezt)) {
- select_beztriple(bezt, DESELECT, 1, HIDDEN);
+ select_beztriple(bezt, DESELECT, SELECT, HIDDEN);
bezt->hide = 1;
}
if (bezt->hide) sel++;
@@ -2807,11 +2920,11 @@ static int hide_exec(bContext *C, wmOperator *op)
sel = 0;
while (a--) {
if (invert == 0 && (bp->f1 & SELECT)) {
- select_bpoint(bp, DESELECT, 1, HIDDEN);
+ select_bpoint(bp, DESELECT, SELECT, HIDDEN);
bp->hide = 1;
}
else if (invert && (bp->f1 & SELECT) == 0) {
- select_bpoint(bp, DESELECT, 1, HIDDEN);
+ select_bpoint(bp, DESELECT, SELECT, HIDDEN);
bp->hide = 1;
}
if (bp->hide) sel++;
@@ -2863,7 +2976,7 @@ static int reveal_exec(bContext *C, wmOperator *UNUSED(op))
a = nu->pntsu;
while (a--) {
if (bezt->hide) {
- select_beztriple(bezt, SELECT, 1, HIDDEN);
+ select_beztriple(bezt, SELECT, SELECT, HIDDEN);
bezt->hide = 0;
}
bezt++;
@@ -2874,7 +2987,7 @@ static int reveal_exec(bContext *C, wmOperator *UNUSED(op))
a = nu->pntsu * nu->pntsv;
while (a--) {
if (bp->hide) {
- select_bpoint(bp, SELECT, 1, HIDDEN);
+ select_bpoint(bp, SELECT, SELECT, HIDDEN);
bp->hide = 0;
}
bp++;
@@ -3840,7 +3953,7 @@ static void merge_2_nurb(wmOperator *op, ListBase *editnurb, Nurb *nu1, Nurb *nu
for (u = 0; u < nu1->pntsu; u++, bp++) {
if (u < origu) {
*bp = *bp1; bp1++;
- select_bpoint(bp, SELECT, 1, HIDDEN);
+ select_bpoint(bp, SELECT, SELECT, HIDDEN);
}
else {
*bp = *bp2; bp2++;
@@ -4148,7 +4261,7 @@ bool mouse_nurb(bContext *C, const int mval[2], bool extend, bool deselect, bool
if (extend) {
if (bezt) {
if (hand == 1) {
- select_beztriple(bezt, SELECT, 1, HIDDEN);
+ select_beztriple(bezt, SELECT, SELECT, HIDDEN);
cu->lastsel = bezt;
}
else {
@@ -4160,13 +4273,13 @@ bool mouse_nurb(bContext *C, const int mval[2], bool extend, bool deselect, bool
}
else {
cu->lastsel = bp;
- select_bpoint(bp, SELECT, 1, HIDDEN);
+ select_bpoint(bp, SELECT, SELECT, HIDDEN);
}
}
else if (deselect) {
if (bezt) {
if (hand == 1) {
- select_beztriple(bezt, DESELECT, 1, HIDDEN);
+ select_beztriple(bezt, DESELECT, SELECT, HIDDEN);
if (bezt == cu->lastsel) cu->lastsel = NULL;
}
else if (hand == 0) {
@@ -4177,7 +4290,7 @@ bool mouse_nurb(bContext *C, const int mval[2], bool extend, bool deselect, bool
}
}
else {
- select_bpoint(bp, DESELECT, 1, HIDDEN);
+ select_bpoint(bp, DESELECT, SELECT, HIDDEN);
if (cu->lastsel == bp) cu->lastsel = NULL;
}
}
@@ -4185,11 +4298,11 @@ bool mouse_nurb(bContext *C, const int mval[2], bool extend, bool deselect, bool
if (bezt) {
if (hand == 1) {
if (bezt->f2 & SELECT) {
- select_beztriple(bezt, DESELECT, 1, HIDDEN);
+ select_beztriple(bezt, DESELECT, SELECT, HIDDEN);
if (bezt == cu->lastsel) cu->lastsel = NULL;
}
else {
- select_beztriple(bezt, SELECT, 1, HIDDEN);
+ select_beztriple(bezt, SELECT, SELECT, HIDDEN);
cu->lastsel = bezt;
}
}
@@ -4202,22 +4315,22 @@ bool mouse_nurb(bContext *C, const int mval[2], bool extend, bool deselect, bool
}
else {
if (bp->f1 & SELECT) {
- select_bpoint(bp, DESELECT, 1, HIDDEN);
+ select_bpoint(bp, DESELECT, SELECT, HIDDEN);
if (cu->lastsel == bp) cu->lastsel = NULL;
}
else {
- select_bpoint(bp, SELECT, 1, HIDDEN);
+ select_bpoint(bp, SELECT, SELECT, HIDDEN);
cu->lastsel = bp;
}
}
}
else {
- setflagsNurb(editnurb, 0);
+ BKE_nurbList_flag_set(editnurb, 0);
if (bezt) {
if (hand == 1) {
- select_beztriple(bezt, SELECT, 1, HIDDEN);
+ select_beztriple(bezt, SELECT, SELECT, HIDDEN);
cu->lastsel = bezt;
}
else {
@@ -4229,7 +4342,7 @@ bool mouse_nurb(bContext *C, const int mval[2], bool extend, bool deselect, bool
}
else {
cu->lastsel = bp;
- select_bpoint(bp, SELECT, 1, HIDDEN);
+ select_bpoint(bp, SELECT, SELECT, HIDDEN);
}
}
@@ -4248,7 +4361,7 @@ bool mouse_nurb(bContext *C, const int mval[2], bool extend, bool deselect, bool
/* 'cent' is in object space and 'dvec' in worldspace.
*/
-static int spin_nurb(float viewmat[4][4], Object *obedit, float *axis, float *cent)
+bool ed_editnurb_spin(float viewmat[4][4], Object *obedit, const float axis[3], const float cent[3])
{
Curve *cu = (Curve *)obedit->data;
ListBase *editnurb = object_editcurve_get(obedit);
@@ -4256,7 +4369,8 @@ static int spin_nurb(float viewmat[4][4], Object *obedit, float *axis, float *ce
float si, phi, n[3], q[4], cmat[3][3], tmat[3][3], imat[3][3];
float bmat[3][3], rotmat[3][3], scalemat1[3][3], scalemat2[3][3];
float persmat[3][3], persinv[3][3];
- short a, ok, changed = 0;
+ bool ok, changed = false;
+ int a;
copy_m3_m4(persmat, viewmat);
invert_m3_m3(persinv, persmat);
@@ -4295,19 +4409,19 @@ static int spin_nurb(float viewmat[4][4], Object *obedit, float *axis, float *ce
mul_m3_m3m3(tmat, persinv, cmat);
mul_m3_m3m3(scalemat2, imat, tmat);
- ok = 1;
+ ok = true;
for (a = 0; a < 7; a++) {
- ok = extrudeflagNurb(cu->editnurb, 1);
+ ok = ed_editnurb_extrude_flag(cu->editnurb, 1);
- if (ok == 0)
+ if (ok == false)
return changed;
- changed = 1;
+ changed = true;
rotateflagNurb(editnurb, SELECT, cent, rotmat);
- if ((a & SELECT) == 0) {
+ if ((a & 1) == 0) {
rotateflagNurb(editnurb, SELECT, cent, scalemat1);
weightflagNurb(editnurb, SELECT, 0.25 * M_SQRT2);
}
@@ -4347,7 +4461,7 @@ static int spin_exec(bContext *C, wmOperator *op)
else
unit_m4(viewmat);
- if (!spin_nurb(viewmat, obedit, axis, cent)) {
+ if (!ed_editnurb_spin(viewmat, obedit, axis, cent)) {
BKE_report(op->reports, RPT_ERROR, "Cannot spin");
return OPERATOR_CANCELLED;
}
@@ -4371,7 +4485,7 @@ static int spin_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)
if (rv3d)
copy_v3_v3(axis, rv3d->viewinv[2]);
- RNA_float_set_array(op->ptr, "center", give_cursor(scene, v3d));
+ RNA_float_set_array(op->ptr, "center", ED_view3d_cursor3d_get(scene, v3d));
RNA_float_set_array(op->ptr, "axis", axis);
return spin_exec(C, op);
@@ -4707,7 +4821,7 @@ static int add_vertex_invoke(bContext *C, wmOperator *op, const wmEvent *event)
mul_v3_m4v3(location, vc.obedit->obmat, bp->vec);
}
else {
- copy_v3_v3(location, give_cursor(vc.scene, vc.v3d));
+ copy_v3_v3(location, ED_view3d_cursor3d_get(vc.scene, vc.v3d));
}
ED_view3d_win_to_3d_int(vc.ar, location, event->mval, location);
@@ -4762,7 +4876,7 @@ static int extrude_exec(bContext *C, wmOperator *UNUSED(op))
addvert_Nurb(C, 'e', NULL);
}
else {
- if (extrudeflagNurb(editnurb, 1)) { /* '1'= flag */
+ if (ed_editnurb_extrude_flag(editnurb, 1)) { /* '1'= flag */
if (ED_curve_updateAnimPaths(obedit->data))
WM_event_add_notifier(C, NC_OBJECT | ND_KEYS, obedit);
@@ -4944,7 +5058,7 @@ static int select_linked_exec(bContext *C, wmOperator *UNUSED(op))
a = nu->pntsu;
bezt = nu->bezt;
while (a--) {
- select_beztriple(bezt, SELECT, 1, VISIBLE);
+ select_beztriple(bezt, SELECT, SELECT, VISIBLE);
bezt++;
}
break;
@@ -4960,7 +5074,7 @@ static int select_linked_exec(bContext *C, wmOperator *UNUSED(op))
a = nu->pntsu * nu->pntsv;
bp = nu->bp;
while (a--) {
- select_bpoint(bp, SELECT, 1, VISIBLE);
+ select_bpoint(bp, SELECT, SELECT, VISIBLE);
bp++;
}
break;
@@ -5021,8 +5135,8 @@ static int select_linked_pick_invoke(bContext *C, wmOperator *op, const wmEvent
a = nu->pntsu;
bezt = nu->bezt;
while (a--) {
- if (deselect) select_beztriple(bezt, DESELECT, 1, VISIBLE);
- else select_beztriple(bezt, SELECT, 1, VISIBLE);
+ if (deselect) select_beztriple(bezt, DESELECT, SELECT, VISIBLE);
+ else select_beztriple(bezt, SELECT, SELECT, VISIBLE);
bezt++;
}
}
@@ -5030,8 +5144,8 @@ static int select_linked_pick_invoke(bContext *C, wmOperator *op, const wmEvent
a = nu->pntsu * nu->pntsv;
bp = nu->bp;
while (a--) {
- if (deselect) select_bpoint(bp, DESELECT, 1, VISIBLE);
- else select_bpoint(bp, SELECT, 1, VISIBLE);
+ if (deselect) select_bpoint(bp, DESELECT, SELECT, VISIBLE);
+ else select_bpoint(bp, SELECT, SELECT, VISIBLE);
bp++;
}
}
@@ -5095,7 +5209,7 @@ static int select_row_exec(bContext *C, wmOperator *UNUSED(op))
if (ok) {
if (last == cu->lastsel) {
direction = 1 - direction;
- setflagsNurb(editnurb, 0);
+ BKE_nurbList_flag_set(editnurb, 0);
}
last = cu->lastsel;
@@ -5103,10 +5217,10 @@ static int select_row_exec(bContext *C, wmOperator *UNUSED(op))
for (a = 0; a < nu->pntsv; a++) {
for (b = 0; b < nu->pntsu; b++, bp++) {
if (direction) {
- if (a == v) select_bpoint(bp, SELECT, 1, VISIBLE);
+ if (a == v) select_bpoint(bp, SELECT, SELECT, VISIBLE);
}
else {
- if (b == u) select_bpoint(bp, SELECT, 1, VISIBLE);
+ if (b == u) select_bpoint(bp, SELECT, SELECT, VISIBLE);
}
}
}
@@ -5217,14 +5331,14 @@ static int select_more_exec(bContext *C, wmOperator *UNUSED(op))
/* upper control point */
if (a % nu->pntsu != 0) {
tempbp = bp - 1;
- if (!(tempbp->f1 & SELECT)) select_bpoint(tempbp, SELECT, 1, VISIBLE);
+ if (!(tempbp->f1 & SELECT)) select_bpoint(tempbp, SELECT, SELECT, VISIBLE);
}
/* left control point. select only if it is not selected already */
if (a - nu->pntsu > 0) {
sel = 0;
tempbp = bp + nu->pntsu;
- if (!(tempbp->f1 & SELECT)) sel = select_bpoint(tempbp, SELECT, 1, VISIBLE);
+ if (!(tempbp->f1 & SELECT)) sel = select_bpoint(tempbp, SELECT, SELECT, VISIBLE);
/* make sure selected bpoint is discarded */
if (sel == 1) BLI_BITMAP_SET(selbpoints, a - nu->pntsu);
}
@@ -5232,14 +5346,14 @@ static int select_more_exec(bContext *C, wmOperator *UNUSED(op))
/* right control point */
if (a + nu->pntsu < nu->pntsu * nu->pntsv) {
tempbp = bp - nu->pntsu;
- if (!(tempbp->f1 & SELECT)) select_bpoint(tempbp, SELECT, 1, VISIBLE);
+ if (!(tempbp->f1 & SELECT)) select_bpoint(tempbp, SELECT, SELECT, VISIBLE);
}
/* lower control point. skip next bp in case selection was made */
if (a % nu->pntsu != 1) {
sel = 0;
tempbp = bp + 1;
- if (!(tempbp->f1 & SELECT)) sel = select_bpoint(tempbp, SELECT, 1, VISIBLE);
+ if (!(tempbp->f1 & SELECT)) sel = select_bpoint(tempbp, SELECT, SELECT, VISIBLE);
if (sel) {
bp++;
a--;
@@ -5341,7 +5455,7 @@ static int select_less_exec(bContext *C, wmOperator *UNUSED(op))
}
if (sel != 4) {
- select_bpoint(bp, DESELECT, 1, VISIBLE);
+ select_bpoint(bp, DESELECT, SELECT, VISIBLE);
BLI_BITMAP_SET(selbpoints, a);
}
}
@@ -5387,7 +5501,7 @@ static int select_less_exec(bContext *C, wmOperator *UNUSED(op))
}
if (sel != 2) {
- select_beztriple(bezt, DESELECT, 1, VISIBLE);
+ select_beztriple(bezt, DESELECT, SELECT, VISIBLE);
lastsel = true;
}
else {
@@ -5429,7 +5543,7 @@ static int select_less_exec(bContext *C, wmOperator *UNUSED(op))
}
if (sel != 2) {
- select_bpoint(bp, DESELECT, 1, VISIBLE);
+ select_bpoint(bp, DESELECT, SELECT, VISIBLE);
lastsel = true;
}
else {
@@ -5481,7 +5595,7 @@ static void selectrandom_curve(ListBase *editnurb, float randfac)
a = nu->pntsu;
while (a--) {
if (BLI_frand() < randfac)
- select_beztriple(bezt, SELECT, 1, VISIBLE);
+ select_beztriple(bezt, SELECT, SELECT, VISIBLE);
bezt++;
}
}
@@ -5491,7 +5605,7 @@ static void selectrandom_curve(ListBase *editnurb, float randfac)
while (a--) {
if (BLI_frand() < randfac)
- select_bpoint(bp, SELECT, 1, VISIBLE);
+ select_bpoint(bp, SELECT, SELECT, VISIBLE);
bp++;
}
}
@@ -5534,15 +5648,13 @@ void CURVE_OT_select_random(wmOperatorType *ot)
/********************* every nth number of point *******************/
-static int point_on_nurb(Nurb *nu, void *point)
+static bool point_in_nurb(Nurb *nu, void *point)
{
if (nu->bezt) {
- BezTriple *bezt = (BezTriple *)point;
- return bezt >= nu->bezt && bezt < &nu->bezt[nu->pntsu];
+ return ARRAY_HAS_ITEM((BezTriple *)point, nu->bezt, nu->pntsu);
}
else {
- BPoint *bp = (BPoint *)point;
- return bp >= nu->bp && bp < &nu->bp[nu->pntsu * nu->pntsv];
+ return ARRAY_HAS_ITEM((BPoint *)point, nu->bp, nu->pntsu);
}
}
@@ -5555,7 +5667,7 @@ static Nurb *get_lastsel_nurb(Curve *cu)
return NULL;
while (nu) {
- if (point_on_nurb(nu, cu->lastsel))
+ if (point_in_nurb(nu, cu->lastsel))
return nu;
nu = nu->next;
@@ -5574,7 +5686,7 @@ static void select_nth_bezt(Nurb *nu, BezTriple *bezt, int nth)
while (a--) {
if (abs(start - a) % nth) {
- select_beztriple(bezt, DESELECT, 1, HIDDEN);
+ select_beztriple(bezt, DESELECT, SELECT, HIDDEN);
}
bezt--;
@@ -5597,7 +5709,7 @@ static void select_nth_bp(Nurb *nu, BPoint *bp, int nth)
while (a--) {
dist = abs(pnt - startpnt) + abs(row - startrow);
if (dist % nth) {
- select_bpoint(bp, DESELECT, 1, HIDDEN);
+ select_bpoint(bp, DESELECT, SELECT, HIDDEN);
}
pnt--;
@@ -5669,12 +5781,21 @@ void CURVE_OT_select_nth(wmOperatorType *ot)
/********************** add duplicate operator *********************/
-static int duplicate_exec(bContext *C, wmOperator *UNUSED(op))
+static int duplicate_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
+ ListBase newnurb = {NULL, NULL};
- adduplicateflagNurb(obedit, 1);
- WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
+ adduplicateflagNurb(obedit, &newnurb, SELECT, false);
+
+ if (newnurb.first != NULL) {
+ BLI_movelisttolist(object_editcurve_get(obedit), &newnurb);
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
+ }
+ else {
+ BKE_report(op->reports, RPT_ERROR, "Cannot duplicate current selection");
+ return OPERATOR_CANCELLED;
+ }
return OPERATOR_FINISHED;
}
@@ -5683,7 +5804,7 @@ void CURVE_OT_duplicate(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Duplicate Curve";
- ot->description = "Duplicate selected control points and segments between them";
+ ot->description = "Duplicate selected control points";
ot->idname = "CURVE_OT_duplicate";
/* api callbacks */
@@ -5696,369 +5817,601 @@ void CURVE_OT_duplicate(wmOperatorType *ot)
/********************** delete operator *********************/
-static int delete_exec(bContext *C, wmOperator *op)
+static int curve_delete_vertices(Object *obedit)
{
- Object *obedit = CTX_data_edit_object(C);
Curve *cu = obedit->data;
EditNurb *editnurb = cu->editnurb;
ListBase *nubase = &editnurb->nurbs;
- Nurb *nu, *nu1;
- BezTriple *bezt, *bezt1, *bezt2;
- BPoint *bp, *bp1, *bp2;
- int a, cut = 0, type = RNA_enum_get(op->ptr, "type");
- int nuindex = 0;
+ Nurb *nu, *next;
+ BezTriple *bezt, *bezt1;
+ BPoint *bp, *bp1;
+ int a, type, nuindex = 0;
if (obedit->type == OB_SURF) {
- if (type == 0) {
- deleteflagNurb(C, op, 1);
+ return deleteflagNurb(obedit, SELECT);
+ }
+
+ /* first loop, can we remove entire pieces? */
+ nu = nubase->first;
+ while (nu) {
+ next = nu->next;
+ if (nu->type == CU_BEZIER) {
+ bezt = nu->bezt;
+ a = nu->pntsu;
+ if (a) {
+ while (a) {
+ if (BEZSELECTED_HIDDENHANDLES(cu, bezt)) {
+ /* pass */
+ }
+ else {
+ break;
+ }
+ a--;
+ bezt++;
+ }
+ if (a == 0) {
+ if (cu->actnu == nuindex)
+ cu->actnu = -1;
+
+ BLI_remlink(nubase, nu);
+ keyIndex_delNurb(editnurb, nu);
+ BKE_nurb_free(nu); nu = NULL;
+ }
+ }
}
else {
- keyIndex_delNurbList(editnurb, nubase);
- BKE_nurbList_free(nubase);
+ bp = nu->bp;
+ a = nu->pntsu * nu->pntsv;
+ if (a) {
+ while (a) {
+ if (bp->f1 & SELECT) {
+ /* pass */
+ }
+ else {
+ break;
+ }
+ a--;
+ bp++;
+ }
+ if (a == 0) {
+ if (cu->actnu == nuindex)
+ cu->actnu = -1;
- if (ED_curve_updateAnimPaths(obedit->data))
- WM_event_add_notifier(C, NC_OBJECT | ND_KEYS, obedit);
+ BLI_remlink(nubase, nu);
+ keyIndex_delNurb(editnurb, nu);
+ BKE_nurb_free(nu); nu = NULL;
+ }
+ }
}
- WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
- DAG_id_tag_update(obedit->data, 0);
-
- return OPERATOR_FINISHED;
+ /* Never allow the order to exceed the number of points
+ * - note, this is ok but changes unselected nurbs, disable for now */
+#if 0
+ if ((nu != NULL) && (nu->type == CU_NURBS)) {
+ clamp_nurb_order_u(nu);
+ }
+#endif
+ nu = next;
+ nuindex++;
}
+ /* 2nd loop, delete small pieces: just for curves */
+ nu = nubase->first;
+ while (nu) {
+ next = nu->next;
+ type = 0;
+ if (nu->type == CU_BEZIER) {
+ int delta = 0;
+ bezt = nu->bezt;
+ for (a = 0; a < nu->pntsu; a++) {
+ if (BEZSELECTED_HIDDENHANDLES(cu, bezt)) {
+ memmove(bezt, bezt + 1, (nu->pntsu - a - 1) * sizeof(BezTriple));
+ keyIndex_delBezt(editnurb, bezt + delta);
+ keyIndex_updateBezt(editnurb, bezt + 1, bezt, nu->pntsu - a - 1);
+ nu->pntsu--;
+ a--;
+ type = 1;
+ delta++;
+ }
+ else {
+ bezt++;
+ }
+ }
+ if (type) {
+ bezt1 = (BezTriple *)MEM_mallocN((nu->pntsu) * sizeof(BezTriple), "delNurb");
+ memcpy(bezt1, nu->bezt, (nu->pntsu) * sizeof(BezTriple));
+ keyIndex_updateBezt(editnurb, nu->bezt, bezt1, nu->pntsu);
+ MEM_freeN(nu->bezt);
+ nu->bezt = bezt1;
+ BKE_nurb_handles_calc(nu);
+ }
+ }
+ else if (nu->pntsv == 1) {
+ int delta = 0;
+ bp = nu->bp;
- if (type == 0) {
- /* first loop, can we remove entire pieces? */
- Nurb *next;
- nu = nubase->first;
- while (nu) {
- next = nu->next;
- if (nu->type == CU_BEZIER) {
- bezt = nu->bezt;
- a = nu->pntsu;
- if (a) {
- while (a) {
- if (BEZSELECTED_HIDDENHANDLES(cu, bezt)) {
- /* pass */
+ for (a = 0; a < nu->pntsu; a++) {
+ if (bp->f1 & SELECT) {
+ memmove(bp, bp + 1, (nu->pntsu - a - 1) * sizeof(BPoint));
+ keyIndex_delBP(editnurb, bp + delta);
+ keyIndex_updateBP(editnurb, bp + 1, bp, nu->pntsu - a - 1);
+ nu->pntsu--;
+ a--;
+ type = 1;
+ delta++;
+ }
+ else {
+ bp++;
+ }
+ }
+ if (type) {
+ bp1 = (BPoint *)MEM_mallocN(nu->pntsu * sizeof(BPoint), "delNurb2");
+ memcpy(bp1, nu->bp, (nu->pntsu) * sizeof(BPoint));
+ keyIndex_updateBP(editnurb, nu->bp, bp1, nu->pntsu);
+ MEM_freeN(nu->bp);
+ nu->bp = bp1;
+
+ /* Never allow the order to exceed the number of points
+ * - note, this is ok but changes unselected nurbs, disable for now */
+#if 0
+ if (nu->type == CU_NURBS) {
+ clamp_nurb_order_u(nu);
+ }
+#endif
+ }
+ BKE_nurb_order_clamp_u(nu);
+ BKE_nurb_knot_calc_u(nu);
+ }
+ nu = next;
+ }
+
+ return OPERATOR_FINISHED;
+}
+
+static int curve_delete_segments(Object *obedit, const bool split)
+{
+ Curve *cu = obedit->data;
+ EditNurb *editnurb = cu->editnurb;
+ ListBase *nubase = &editnurb->nurbs, newnurb = {NULL, NULL};
+ Nurb *nu, *nu1;
+ BezTriple *bezt, *bezt1, *bezt2;
+ BPoint *bp, *bp1, *bp2;
+ int a, b, starta, enda, cut, cyclicut;
+
+ for (nu = nubase->first; nu; nu = nu->next) {
+ nu1 = NULL;
+ starta = enda = cut = -1;
+ cyclicut = 0;
+
+ if (nu->type == CU_BEZIER) {
+ for (a = 0, bezt = nu->bezt; a < nu->pntsu; a++, bezt++) {
+ if (!BEZSELECTED_HIDDENHANDLES(cu, bezt)) {
+ enda = a;
+ if (starta == -1) starta = a;
+ if (a < nu->pntsu - 1) continue;
+ }
+ else if (a < nu->pntsu - 1 && !BEZSELECTED_HIDDENHANDLES(cu, bezt + 1)) {
+ /* if just single selected point then continue */
+ continue;
+ }
+
+ if (starta >= 0) {
+ /* got selected segment, now check where and copy */
+ if (starta <= 1 && a == nu->pntsu - 1) {
+ /* copying all points in spline */
+ if (starta == 1 && enda != a) nu->flagu &= ~CU_NURB_CYCLIC;
+
+ starta = 0;
+ enda = a;
+ cut = enda - starta + 1;
+ nu1 = BKE_nurb_copy(nu, cut, 1);
+ }
+ else if (starta == 0) {
+ /* if start of curve copy next end point */
+ enda++;
+ cut = enda - starta + 1;
+ bezt1 = &nu->bezt[nu->pntsu - 1];
+ bezt2 = &nu->bezt[nu->pntsu - 2];
+
+ if ((nu->flagu & CU_NURB_CYCLIC) &&
+ BEZSELECTED_HIDDENHANDLES(cu, bezt1) &&
+ BEZSELECTED_HIDDENHANDLES(cu, bezt2))
+ {
+ /* check if need to join start of spline to end */
+ nu1 = BKE_nurb_copy(nu, cut + 1, 1);
+ ED_curve_beztcpy(editnurb, &nu1->bezt[1], nu->bezt, cut);
+ starta = nu->pntsu - 1;
+ cut = 1;
}
else {
- break;
+ if (nu->flagu & CU_NURB_CYCLIC) cyclicut = cut;
+ else nu1 = BKE_nurb_copy(nu, cut, 1);
}
- a--;
- bezt++;
- }
- if (a == 0) {
- if (cu->actnu == nuindex)
- cu->actnu = -1;
-
- BLI_remlink(nubase, nu);
- keyIndex_delNurb(editnurb, nu);
- BKE_nurb_free(nu); nu = NULL;
}
- }
- }
- else {
- bp = nu->bp;
- a = nu->pntsu * nu->pntsv;
- if (a) {
- while (a) {
- if (bp->f1 & SELECT) {
- /* pass */
+ else if (enda == nu->pntsu - 1) {
+ /* if end of curve copy previous start point */
+ starta--;
+ cut = enda - starta + 1;
+ bezt1 = nu->bezt;
+ bezt2 = &nu->bezt[1];
+
+ if ((nu->flagu & CU_NURB_CYCLIC) &&
+ BEZSELECTED_HIDDENHANDLES(cu, bezt1) &&
+ BEZSELECTED_HIDDENHANDLES(cu, bezt2))
+ {
+ /* check if need to join start of spline to end */
+ nu1 = BKE_nurb_copy(nu, cut + 1, 1);
+ ED_curve_beztcpy(editnurb, &nu1->bezt[cut], nu->bezt, 1);
+ }
+ else if (cyclicut != 0) {
+ /* if cyclicut exists it is a cyclic spline, start and end should be connected */
+ nu1 = BKE_nurb_copy(nu, cut + cyclicut, 1);
+ ED_curve_beztcpy(editnurb, &nu1->bezt[cut], nu->bezt, cyclicut);
+ cyclicut = 0;
}
else {
- break;
+ nu1 = BKE_nurb_copy(nu, cut, 1);
}
- a--;
- bp++;
}
- if (a == 0) {
- if (cu->actnu == nuindex)
- cu->actnu = -1;
+ else {
+ /* mid spline selection, copy adjacent start and end */
+ starta--;
+ enda++;
+ cut = enda - starta + 1;
+ nu1 = BKE_nurb_copy(nu, cut, 1);
+ }
+
+ if (nu1 != NULL) {
+ ED_curve_beztcpy(editnurb, nu1->bezt, &nu->bezt[starta], cut);
+ BLI_addtail(&newnurb, nu1);
- BLI_remlink(nubase, nu);
- keyIndex_delNurb(editnurb, nu);
- BKE_nurb_free(nu); nu = NULL;
+ if (starta != 0 || enda != nu->pntsu - 1) nu1->flagu &= ~CU_NURB_CYCLIC;
+ nu1 = NULL;
}
+ starta = enda = -1;
}
}
-
- /* Never allow the order to exceed the number of points
- * - note, this is ok but changes unselected nurbs, disable for now */
-#if 0
- if ((nu != NULL) && (nu->type == CU_NURBS)) {
- clamp_nurb_order_u(nu);
- }
-#endif
- nu = next;
- nuindex++;
- }
- /* 2nd loop, delete small pieces: just for curves */
- nu = nubase->first;
- while (nu) {
- next = nu->next;
- type = 0;
- if (nu->type == CU_BEZIER) {
- int delta = 0;
- bezt = nu->bezt;
- for (a = 0; a < nu->pntsu; a++) {
- if (BEZSELECTED_HIDDENHANDLES(cu, bezt)) {
- memmove(bezt, bezt + 1, (nu->pntsu - a - 1) * sizeof(BezTriple));
- keyIndex_delBezt(editnurb, bezt + delta);
- keyIndex_updateBezt(editnurb, bezt + 1, bezt, nu->pntsu - a - 1);
- nu->pntsu--;
- a--;
- type = 1;
- delta++;
- }
- else {
- bezt++;
- }
+
+ if (!split && cut != -1 && nu->pntsu > 2 && !(nu->flagu & CU_NURB_CYCLIC)) {
+ /* start and points copied if connecting segment was deleted and not cylic spline */
+ bezt1 = nu->bezt;
+ bezt2 = &nu->bezt[1];
+
+ if (BEZSELECTED_HIDDENHANDLES(cu, bezt1) &&
+ BEZSELECTED_HIDDENHANDLES(cu, bezt2))
+ {
+ nu1 = BKE_nurb_copy(nu, 1, 1);
+ ED_curve_beztcpy(editnurb, nu1->bezt, bezt1, 1);
+ BLI_addtail(&newnurb, nu1);
}
- if (type) {
- bezt1 = (BezTriple *)MEM_mallocN((nu->pntsu) * sizeof(BezTriple), "delNurb");
- memcpy(bezt1, nu->bezt, (nu->pntsu) * sizeof(BezTriple));
- keyIndex_updateBezt(editnurb, nu->bezt, bezt1, nu->pntsu);
- MEM_freeN(nu->bezt);
- nu->bezt = bezt1;
- BKE_nurb_handles_calc(nu);
+
+ bezt1 = &nu->bezt[nu->pntsu - 1];
+ bezt2 = &nu->bezt[nu->pntsu - 2];
+
+ if (BEZSELECTED_HIDDENHANDLES(cu, bezt1) &&
+ BEZSELECTED_HIDDENHANDLES(cu, bezt2))
+ {
+ nu1 = BKE_nurb_copy(nu, 1, 1);
+ ED_curve_beztcpy(editnurb, nu1->bezt, bezt1, 1);
+ BLI_addtail(&newnurb, nu1);
}
}
- else if (nu->pntsv == 1) {
- int delta = 0;
- bp = nu->bp;
+ }
+ else if (nu->pntsv >= 1) {
+ int u, v;
- for (a = 0; a < nu->pntsu; a++) {
- if (bp->f1 & SELECT) {
- memmove(bp, bp + 1, (nu->pntsu - a - 1) * sizeof(BPoint));
- keyIndex_delBP(editnurb, bp + delta);
- keyIndex_updateBP(editnurb, bp + 1, bp, nu->pntsu - a - 1);
- nu->pntsu--;
- a--;
- type = 1;
- delta++;
+ if (isNurbselV(nu, &u, SELECT)) {
+ for (a = 0, bp = nu->bp; a < nu->pntsu; a++, bp++) {
+ if (!(bp->f1 & SELECT)) {
+ enda = a;
+ if (starta == -1) starta = a;
+ if (a < nu->pntsu - 1) continue;
}
- else {
- bp++;
- }
- }
- if (type) {
- bp1 = (BPoint *)MEM_mallocN(nu->pntsu * sizeof(BPoint), "delNurb2");
- memcpy(bp1, nu->bp, (nu->pntsu) * sizeof(BPoint));
- keyIndex_updateBP(editnurb, nu->bp, bp1, nu->pntsu);
- MEM_freeN(nu->bp);
- nu->bp = bp1;
-
- /* Never allow the order to exceed the number of points
- * - note, this is ok but changes unselected nurbs, disable for now */
-#if 0
- if (nu->type == CU_NURBS) {
- clamp_nurb_order_u(nu);
+ else if (a < nu->pntsu - 1 && !((bp + 1)->f1 & SELECT)) {
+ /* if just single selected point then continue */
+ continue;
}
-#endif
- }
- BKE_nurb_order_clamp_u(nu);
- BKE_nurb_knot_calc_u(nu);
- }
- nu = next;
- }
- }
- else if (type == 1) { /* erase segment */
- /* find the 2 selected points */
- bezt1 = bezt2 = NULL;
- bp1 = bp2 = NULL;
- nu1 = NULL;
- nuindex = 0;
- for (nu = nubase->first; nu; nu = nu->next) {
- if (nu->type == CU_BEZIER) {
- bezt = nu->bezt;
- for (a = 0; a < nu->pntsu - 1; a++) {
- if (BEZSELECTED_HIDDENHANDLES(cu, bezt)) {
- bezt1 = bezt;
- bezt2 = bezt + 1;
- if ((bezt2->f1 & SELECT) || (bezt2->f2 & SELECT) || (bezt2->f3 & SELECT)) {
- /* pass */
+
+ if (starta >= 0) {
+ /* got selected segment, now check where and copy */
+ if (starta <= 1 && a == nu->pntsu - 1) {
+ /* copying all points in spline */
+ if (starta == 1 && enda != a) nu->flagu &= ~CU_NURB_CYCLIC;
+
+ starta = 0;
+ enda = a;
+ cut = enda - starta + 1;
+ nu1 = BKE_nurb_copy(nu, cut, nu->pntsv);
}
- else { /* maybe do not make cyclic */
- if (a == 0 && (nu->flagu & CU_NURB_CYCLIC)) {
- bezt2 = bezt + (nu->pntsu - 1);
- if ((bezt2->f1 & SELECT) || (bezt2->f2 & SELECT) || (bezt2->f3 & SELECT)) {
- nu->flagu &= ~CU_NURB_CYCLIC;
- BKE_nurb_handles_calc(nu);
- WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
- DAG_id_tag_update(obedit->data, 0);
+ else if (starta == 0) {
+ /* if start of curve copy next end point */
+ enda++;
+ cut = enda - starta + 1;
+ bp1 = &nu->bp[nu->pntsu - 1];
+ bp2 = &nu->bp[nu->pntsu - 2];
+
+ if ((nu->flagu & CU_NURB_CYCLIC) && (bp1->f1 & SELECT) && (bp2->f1 & SELECT)) {
+ /* check if need to join start of spline to end */
+ nu1 = BKE_nurb_copy(nu, cut + 1, nu->pntsv);
+ for (b = 0; b < nu->pntsv; b++) {
+ ED_curve_bpcpy(editnurb, &nu1->bp[b * nu1->pntsu + 1], &nu->bp[b * nu->pntsu], cut);
}
+ starta = nu->pntsu - 1;
+ cut = 1;
+ }
+ else {
+ if (nu->flagu & CU_NURB_CYCLIC) cyclicut = cut;
+ else nu1 = BKE_nurb_copy(nu, cut, nu->pntsv);
+ }
+ }
+ else if (enda == nu->pntsu - 1) {
+ /* if end of curve copy previous start point */
+ starta--;
+ cut = enda - starta + 1;
+ bp1 = nu->bp;
+ bp2 = &nu->bp[1];
+
+ if ((nu->flagu & CU_NURB_CYCLIC) && (bp1->f1 & SELECT) && (bp2->f1 & SELECT)) {
+ /* check if need to join start of spline to end */
+ nu1 = BKE_nurb_copy(nu, cut + 1, nu->pntsv);
+ for (b = 0; b < nu->pntsv; b++) {
+ ED_curve_bpcpy(editnurb, &nu1->bp[b * nu1->pntsu + cut], &nu->bp[b * nu->pntsu], 1);
+ }
+ }
+ else if (cyclicut != 0) {
+ /* if cyclicut exists it is a cyclic spline, start and end should be connected */
+ nu1 = BKE_nurb_copy(nu, cut + cyclicut, nu->pntsv);
+ for (b = 0; b < nu->pntsv; b++) {
+ ED_curve_bpcpy(editnurb, &nu1->bp[b * nu1->pntsu + cut], &nu->bp[b * nu->pntsu], cyclicut);
+ }
+ }
+ else {
+ nu1 = BKE_nurb_copy(nu, cut, nu->pntsv);
+ }
+ }
+ else {
+ /* mid spline selection, copy adjacent start and end */
+ starta--;
+ enda++;
+ cut = enda - starta + 1;
+ nu1 = BKE_nurb_copy(nu, cut, nu->pntsv);
+ }
+
+ if (nu1 != NULL) {
+ for (b = 0; b < nu->pntsv; b++) {
+ ED_curve_bpcpy(editnurb, &nu1->bp[b * nu1->pntsu], &nu->bp[b * nu->pntsu + starta], cut);
}
+ BLI_addtail(&newnurb, nu1);
- return OPERATOR_FINISHED;
+ if (starta != 0 || enda != nu->pntsu - 1) nu1->flagu &= ~CU_NURB_CYCLIC;
+ nu1 = NULL;
}
- cut = a;
- nu1 = nu;
- break;
+ starta = enda = -1;
+ }
+ }
+
+ if (!split && cut != -1 && nu->pntsu > 2 && !(nu->flagu & CU_NURB_CYCLIC)) {
+ /* start and points copied if connecting segment was deleted and not cylic spline */
+ bp1 = nu->bp;
+ bp2 = &nu->bp[1];
+
+ if ((bp1->f1 & SELECT) && (bp2->f1 & SELECT)) {
+ nu1 = BKE_nurb_copy(nu, 1, nu->pntsv);
+ for (b = 0; b < nu->pntsv; b++) {
+ ED_curve_bpcpy(editnurb, &nu1->bp[b], &nu->bp[b * nu->pntsu], 1);
+ }
+ BLI_addtail(&newnurb, nu1);
+ }
+
+ bp1 = &nu->bp[nu->pntsu - 1];
+ bp2 = &nu->bp[nu->pntsu - 2];
+
+ if ((bp1->f1 & SELECT) && (bp2->f1 & SELECT)) {
+ nu1 = BKE_nurb_copy(nu, 1, nu->pntsv);
+ for (b = 0; b < nu->pntsv; b++) {
+ ED_curve_bpcpy(editnurb, &nu1->bp[b], &nu->bp[b * nu->pntsu + nu->pntsu - 1], 1);
+ }
+ BLI_addtail(&newnurb, nu1);
}
- bezt++;
}
}
- else if (nu->pntsv == 1) {
- bp = nu->bp;
- for (a = 0; a < nu->pntsu - 1; a++) {
- if (bp->f1 & SELECT) {
- bp1 = bp;
- bp2 = bp + 1;
- if (bp2->f1 & SELECT) {
- /* pass */
+ else if (isNurbselU(nu, &v, SELECT)) {
+ for (a = 0, bp = nu->bp; a < nu->pntsv; a++, bp += nu->pntsu) {
+ if (!(bp->f1 & SELECT)) {
+ enda = a;
+ if (starta == -1) starta = a;
+ if (a < nu->pntsv - 1) continue;
+ }
+ else if (a < nu->pntsv - 1 && !((bp + nu->pntsu)->f1 & SELECT)) {
+ /* if just single selected point then continue */
+ continue;
+ }
+
+ if (starta >= 0) {
+ /* got selected segment, now check where and copy */
+ if (starta <= 1 && a == nu->pntsv - 1) {
+ /* copying all points in spline */
+ if (starta == 1 && enda != a) nu->flagv &= ~CU_NURB_CYCLIC;
+
+ starta = 0;
+ enda = a;
+ cut = enda - starta + 1;
+ nu1 = BKE_nurb_copy(nu, nu->pntsu, cut);
}
- else { /* maybe do not make cyclic */
- if (a == 0 && (nu->flagu & CU_NURB_CYCLIC)) {
- bp2 = bp + (nu->pntsu - 1);
- if (bp2->f1 & SELECT) {
- nu->flagu &= ~CU_NURB_CYCLIC;
- WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
- DAG_id_tag_update(obedit->data, 0);
- }
+ else if (starta == 0) {
+ /* if start of curve copy next end point */
+ enda++;
+ cut = enda - starta + 1;
+ bp1 = &nu->bp[nu->pntsv * nu->pntsu - nu->pntsu];
+ bp2 = &nu->bp[nu->pntsv * nu->pntsu - (nu->pntsu * 2)];
+
+ if ((nu->flagv & CU_NURB_CYCLIC) && (bp1->f1 & SELECT) && (bp2->f1 & SELECT)) {
+ /* check if need to join start of spline to end */
+ nu1 = BKE_nurb_copy(nu, nu->pntsu, cut + 1);
+ ED_curve_bpcpy(editnurb, &nu1->bp[nu->pntsu], nu->bp, cut * nu->pntsu);
+ starta = nu->pntsv - 1;
+ cut = 1;
+ }
+ else {
+ if (nu->flagv & CU_NURB_CYCLIC) cyclicut = cut;
+ else nu1 = BKE_nurb_copy(nu, nu->pntsu, cut);
+ }
+ }
+ else if (enda == nu->pntsv - 1) {
+ /* if end of curve copy previous start point */
+ starta--;
+ cut = enda - starta + 1;
+ bp1 = nu->bp;
+ bp2 = &nu->bp[nu->pntsu];
+
+ if ((nu->flagv & CU_NURB_CYCLIC) && (bp1->f1 & SELECT) && (bp2->f1 & SELECT)) {
+ /* check if need to join start of spline to end */
+ nu1 = BKE_nurb_copy(nu, nu->pntsu, cut + 1);
+ ED_curve_bpcpy(editnurb, &nu1->bp[cut * nu->pntsu], nu->bp, nu->pntsu);
+ }
+ else if (cyclicut != 0) {
+ /* if cyclicut exists it is a cyclic spline, start and end should be connected */
+ nu1 = BKE_nurb_copy(nu, nu->pntsu, cut + cyclicut);
+ ED_curve_bpcpy(editnurb, &nu1->bp[cut * nu->pntsu], nu->bp, nu->pntsu * cyclicut);
+ cyclicut = 0;
+ }
+ else {
+ nu1 = BKE_nurb_copy(nu, nu->pntsu, cut);
}
+ }
+ else {
+ /* mid spline selection, copy adjacent start and end */
+ starta--;
+ enda++;
+ cut = enda - starta + 1;
+ nu1 = BKE_nurb_copy(nu, nu->pntsu, cut);
+ }
- return OPERATOR_FINISHED;
+ if (nu1 != NULL) {
+ ED_curve_bpcpy(editnurb, nu1->bp, &nu->bp[starta * nu->pntsu], cut * nu->pntsu);
+ BLI_addtail(&newnurb, nu1);
+
+ if (starta != 0 || enda != nu->pntsv - 1) nu1->flagv &= ~CU_NURB_CYCLIC;
+ nu1 = NULL;
}
- cut = a;
- nu1 = nu;
- break;
+ starta = enda = -1;
}
- bp++;
}
+
+ if (!split && cut != -1 && nu->pntsv > 2 && !(nu->flagv & CU_NURB_CYCLIC)) {
+ /* start and points copied if connecting segment was deleted and not cylic spline */
+ bp1 = nu->bp;
+ bp2 = &nu->bp[nu->pntsu];
+
+ if ((bp1->f1 & SELECT) && (bp2->f1 & SELECT)) {
+ nu1 = BKE_nurb_copy(nu, nu->pntsu, 1);
+ ED_curve_bpcpy(editnurb, nu1->bp, nu->bp, nu->pntsu);
+ BLI_addtail(&newnurb, nu1);
+ }
+
+ bp1 = &nu->bp[nu->pntsu * nu->pntsv - nu->pntsu];
+ bp2 = &nu->bp[nu->pntsu * nu->pntsv - (nu->pntsu * 2)];
+
+ if ((bp1->f1 & SELECT) && (bp2->f1 & SELECT)) {
+ nu1 = BKE_nurb_copy(nu, nu->pntsu, 1);
+ ED_curve_bpcpy(editnurb, nu1->bp, &nu->bp[nu->pntsu * nu->pntsv - nu->pntsu], nu->pntsu);
+ BLI_addtail(&newnurb, nu1);
+ }
+ }
+ }
+ else {
+ /* selection not valid, just copy nurb to new list */
+ nu1 = BKE_nurb_copy(nu, nu->pntsu, nu->pntsv);
+ ED_curve_bpcpy(editnurb, nu1->bp, nu->bp, nu->pntsu * nu->pntsv);
+ BLI_addtail(&newnurb, nu1);
}
- if (nu1) break;
- nuindex++;
}
- if (nu1) {
- if (bezt1) {
- if (nu1->pntsu == 2) { /* remove completely */
- if (cu->actnu == nuindex)
- cu->actnu = -1;
+ }
- BLI_remlink(nubase, nu);
- BKE_nurb_free(nu); nu = NULL;
- }
- else if (nu1->flagu & CU_NURB_CYCLIC) { /* cyclic */
- bezt = (BezTriple *)MEM_mallocN((cut + 1) * sizeof(BezTriple), "delNurb1");
- ED_curve_beztcpy(editnurb, bezt, nu1->bezt, cut + 1);
- a = nu1->pntsu - cut - 1;
- ED_curve_beztcpy(editnurb, nu1->bezt, bezt2, a);
- ED_curve_beztcpy(editnurb, &nu1->bezt[a], bezt, cut + 1);
-
- nu1->flagu &= ~CU_NURB_CYCLIC;
- MEM_freeN(bezt);
- BKE_nurb_handles_calc(nu);
- }
- else { /* add new curve */
-
-/* seems to be an error here... but where? (a can become zero) */
-
- nu = (Nurb *)MEM_mallocN(sizeof(Nurb), "delNurb2");
- memcpy(nu, nu1, sizeof(Nurb));
- BLI_addtail(nubase, nu);
- nu->bezt = (BezTriple *)MEM_mallocN((cut + 1) * sizeof(BezTriple), "delNurb3");
- ED_curve_beztcpy(editnurb, nu->bezt, nu1->bezt, cut + 1);
- a = nu1->pntsu - cut - 1;
-
- bezt = (BezTriple *)MEM_mallocN(a * sizeof(BezTriple), "delNurb4");
- ED_curve_beztcpy(editnurb, bezt, &nu1->bezt[cut + 1], a);
- MEM_freeN(nu1->bezt);
- nu1->bezt = bezt;
- nu1->pntsu = a;
- nu->pntsu = cut + 1;
-
-
- BKE_nurb_handles_calc(nu);
- BKE_nurb_handles_calc(nu1);
+ for (nu = newnurb.first; nu; nu = nu->next) {
+ if (nu->type == CU_BEZIER) {
+ if (split) {
+ /* deselect for split operator */
+ for (b = 0, bezt1 = nu->bezt; b < nu->pntsu; b++, bezt1++) {
+ select_beztriple(bezt1, DESELECT, SELECT, true);
}
}
- else if (bp1) {
- if (nu1->pntsu == 2) { /* remove completely */
- if (cu->actnu == nuindex)
- cu->actnu = -1;
- BLI_remlink(nubase, nu);
- BKE_nurb_free(nu); nu = NULL;
+ BKE_nurb_handles_calc(nu);
+ }
+ else {
+ if (split) {
+ /* deselect for split operator */
+ for (b = 0, bp1 = nu->bp; b < nu->pntsu * nu->pntsv; b++, bp1++) {
+ select_bpoint(bp1, DESELECT, SELECT, HIDDEN);
}
- else if (nu1->flagu & CU_NURB_CYCLIC) { /* cyclic */
- bp = (BPoint *)MEM_mallocN((cut + 1) * sizeof(BPoint), "delNurb5");
- ED_curve_bpcpy(editnurb, bp, nu1->bp, cut + 1);
- a = nu1->pntsu - cut - 1;
- ED_curve_bpcpy(editnurb, nu1->bp, bp2, a);
- ED_curve_bpcpy(editnurb, &nu1->bp[a], bp, cut + 1);
-
- nu1->flagu &= ~CU_NURB_CYCLIC;
- MEM_freeN(bp);
- }
- else { /* add new curve */
- nu = (Nurb *)MEM_mallocN(sizeof(Nurb), "delNurb6");
- memcpy(nu, nu1, sizeof(Nurb));
- BLI_addtail(nubase, nu);
- nu->bp = (BPoint *)MEM_mallocN((cut + 1) * sizeof(BPoint), "delNurb7");
- ED_curve_bpcpy(editnurb, nu->bp, nu1->bp, cut + 1);
- a = nu1->pntsu - cut - 1;
- bp = (BPoint *)MEM_mallocN(a * sizeof(BPoint), "delNurb8");
- ED_curve_bpcpy(editnurb, bp, &nu1->bp[cut + 1], a);
- MEM_freeN(nu1->bp);
- nu1->bp = bp;
- nu1->pntsu = a;
- nu1->knotsu = NULL;
- nu->pntsu = cut + 1;
-
- BKE_nurb_order_clamp_u(nu);
- BKE_nurb_knot_calc_u(nu);
+ }
- BKE_nurb_order_clamp_u(nu1);
- BKE_nurb_knot_calc_u(nu1);
- }
+ nu->knotsu = nu->knotsv = NULL;
+ BKE_nurb_order_clamp_u(nu);
+ BKE_nurb_knot_calc_u(nu);
+
+ if (nu->pntsv > 1) {
+ BKE_nurb_order_clamp_v(nu);
+ BKE_nurb_knot_calc_v(nu);
}
}
}
- else if (type == 2) {
- cu->actnu = -1;
- keyIndex_delNurbList(editnurb, nubase);
- BKE_nurbList_free(nubase);
- }
- if (ED_curve_updateAnimPaths(obedit->data))
- WM_event_add_notifier(C, NC_OBJECT | ND_KEYS, obedit);
+ keyIndex_delNurbList(editnurb, nubase);
+ BKE_nurbList_free(nubase);
+ BLI_movelisttolist(nubase, &newnurb);
- WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
- DAG_id_tag_update(obedit->data, 0);
-
return OPERATOR_FINISHED;
}
-static int delete_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
+static int curve_delete_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
- uiPopupMenu *pup;
- uiLayout *layout;
+ eCurveElem_Types type = RNA_enum_get(op->ptr, "type");
+ int retval;
- if (obedit->type == OB_SURF) {
- pup = uiPupMenuBegin(C, IFACE_("Delete"), ICON_NONE);
- layout = uiPupMenuLayout(pup);
- uiItemEnumO_ptr(layout, op->type, NULL, 0, "type", 0);
- uiItemEnumO_ptr(layout, op->type, NULL, 0, "type", 2);
- uiPupMenuEnd(C, pup);
- }
- else {
- pup = uiPupMenuBegin(C, IFACE_("Delete"), ICON_NONE);
- layout = uiPupMenuLayout(pup);
- uiItemsEnumO(layout, op->type->idname, "type");
- uiPupMenuEnd(C, pup);
+ if (type == CURVE_VERTEX) retval = curve_delete_vertices(obedit);
+ else if (type == CURVE_SEGMENT) retval = curve_delete_segments(obedit, false);
+ else BLI_assert(0);
+
+ if (retval == OPERATOR_FINISHED) {
+ if (ED_curve_updateAnimPaths(obedit->data)) WM_event_add_notifier(C, NC_OBJECT | ND_KEYS, obedit);
+
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
+ DAG_id_tag_update(obedit->data, 0);
+
+ return retval;
}
- return OPERATOR_CANCELLED;
+ return retval;
+}
+
+static EnumPropertyItem curve_delete_type_items[] = {
+ {CURVE_VERTEX, "VERT", 0, "Vertices", ""},
+ {CURVE_SEGMENT, "SEGMENT", 0, "Segments", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
+static EnumPropertyItem *rna_curve_delete_type_itemf(bContext *C, PointerRNA *UNUSED(ptr),
+ PropertyRNA *UNUSED(prop), int *free)
+{
+ EnumPropertyItem *item = NULL;
+ int totitem = 0;
+
+ if (!C) /* needed for docs and i18n tools */
+ return curve_delete_type_items;
+
+ RNA_enum_items_add_value(&item, &totitem, curve_delete_type_items, CURVE_VERTEX);
+ RNA_enum_items_add_value(&item, &totitem, curve_delete_type_items, CURVE_SEGMENT);
+ RNA_enum_item_end(&item, &totitem);
+ *free = true;
+
+ return item;
}
void CURVE_OT_delete(wmOperatorType *ot)
{
- static EnumPropertyItem type_items[] = {
- {0, "SELECTED", 0, "Select", ""},
- {1, "SEGMENT", 0, "Segment", ""},
- {2, "ALL", 0, "All", ""},
- {0, NULL, 0, NULL, NULL}
- };
+ PropertyRNA *prop;
/* identifiers */
ot->name = "Delete";
@@ -6066,15 +6419,18 @@ void CURVE_OT_delete(wmOperatorType *ot)
ot->idname = "CURVE_OT_delete";
/* api callbacks */
- ot->exec = delete_exec;
- ot->invoke = delete_invoke;
+ ot->exec = curve_delete_exec;
+ ot->invoke = WM_menu_invoke;
ot->poll = ED_operator_editsurfcurve;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
- RNA_def_enum(ot->srna, "type", type_items, 0, "Type", "Which elements to delete");
+ prop = RNA_def_enum(ot->srna, "type", curve_delete_type_items, 0, "Type", "Which elements to delete");
+ RNA_def_enum_funcs(prop, rna_curve_delete_type_itemf);
+
+ ot->prop = prop;
}
/********************** shade smooth/flat operator *********************/
@@ -6230,729 +6586,6 @@ int join_curve_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-/************ add primitive, used by object/ module ****************/
-
-static const char *get_curve_defname(int type)
-{
- int stype = type & CU_PRIMITIVE;
-
- if ((type & CU_TYPE) == CU_BEZIER) {
- switch (stype) {
- case CU_PRIM_CURVE: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "BezierCurve");
- case CU_PRIM_CIRCLE: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "BezierCircle");
- case CU_PRIM_PATH: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "CurvePath");
- default:
- return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "Curve");
- }
- }
- else {
- switch (stype) {
- case CU_PRIM_CURVE: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "NurbsCurve");
- case CU_PRIM_CIRCLE: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "NurbsCircle");
- case CU_PRIM_PATH: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "NurbsPath");
- default:
- return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "Curve");
- }
- }
-}
-
-static const char *get_surf_defname(int type)
-{
- int stype = type & CU_PRIMITIVE;
-
- switch (stype) {
- case CU_PRIM_CURVE: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "SurfCurve");
- case CU_PRIM_CIRCLE: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "SurfCircle");
- case CU_PRIM_PATCH: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "SurfPatch");
- case CU_PRIM_SPHERE: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "SurfSphere");
- case CU_PRIM_DONUT: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "SurfTorus");
- default:
- return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "Surface");
- }
-}
-
-
-Nurb *add_nurbs_primitive(bContext *C, Object *obedit, float mat[4][4], int type, int newob)
-{
- static int xzproj = 0; /* this function calls itself... */
- ListBase *editnurb = object_editcurve_get(obedit);
- View3D *v3d = CTX_wm_view3d(C);
- RegionView3D *rv3d = ED_view3d_context_rv3d(C);
- Nurb *nu = NULL;
- BezTriple *bezt;
- BPoint *bp;
- Curve *cu = (Curve *)obedit->data;
- float vec[3], zvec[3] = {0.0f, 0.0f, 1.0f};
- float umat[4][4] = MAT4_UNITY, viewmat[4][4] = MAT4_UNITY;
- float fac;
- int a, b;
- const float grid = v3d ? v3d->grid : 1.0f;
- const int cutype = (type & CU_TYPE); // poly, bezier, nurbs, etc
- const int stype = (type & CU_PRIMITIVE);
- const int force_3d = ((Curve *)obedit->data)->flag & CU_3D; /* could be adding to an existing 3D curve */
-
- if (rv3d) {
- copy_m4_m4(viewmat, rv3d->viewmat);
- copy_v3_v3(zvec, rv3d->viewinv[2]);
- }
-
- setflagsNurb(editnurb, 0);
-
- /* these types call this function to return a Nurb */
- if (stype != CU_PRIM_TUBE && stype != CU_PRIM_DONUT) {
- nu = (Nurb *)MEM_callocN(sizeof(Nurb), "addNurbprim");
- nu->type = cutype;
- nu->resolu = cu->resolu;
- nu->resolv = cu->resolv;
- }
-
- switch (stype) {
- case CU_PRIM_CURVE: /* curve */
- nu->resolu = cu->resolu;
- if (cutype == CU_BEZIER) {
- if (!force_3d) nu->flag |= CU_2D;
- nu->pntsu = 2;
- nu->bezt = (BezTriple *)MEM_callocN(2 * sizeof(BezTriple), "addNurbprim1");
- bezt = nu->bezt;
- bezt->h1 = bezt->h2 = HD_ALIGN;
- bezt->f1 = bezt->f2 = bezt->f3 = SELECT;
- bezt->radius = 1.0;
-
- bezt->vec[1][0] += -grid;
- bezt->vec[0][0] += -1.5f * grid;
- bezt->vec[0][1] += -0.5f * grid;
- bezt->vec[2][0] += -0.5f * grid;
- bezt->vec[2][1] += 0.5f * grid;
- for (a = 0; a < 3; a++) mul_m4_v3(mat, bezt->vec[a]);
-
- bezt++;
- bezt->h1 = bezt->h2 = HD_ALIGN;
- bezt->f1 = bezt->f2 = bezt->f3 = SELECT;
- bezt->radius = bezt->weight = 1.0;
-
- bezt->vec[0][0] = 0;
- bezt->vec[0][1] = 0;
- bezt->vec[1][0] = grid;
- bezt->vec[1][1] = 0;
- bezt->vec[2][0] = grid * 2;
- bezt->vec[2][1] = 0;
- for (a = 0; a < 3; a++) mul_m4_v3(mat, bezt->vec[a]);
-
- BKE_nurb_handles_calc(nu);
- }
- else {
-
- nu->pntsu = 4;
- nu->pntsv = 1;
- nu->orderu = 4;
- nu->bp = CALLOC_STRUCT_N(BPoint, 4, "addNurbprim3");
-
- bp = nu->bp;
- for (a = 0; a < 4; a++, bp++) {
- bp->vec[3] = 1.0;
- bp->f1 = SELECT;
- bp->radius = bp->weight = 1.0;
- }
-
- bp = nu->bp;
- bp->vec[0] += -1.5f * grid;
- bp++;
- bp->vec[0] += -grid;
- bp->vec[1] += grid;
- bp++;
- bp->vec[0] += grid;
- bp->vec[1] += grid;
- bp++;
- bp->vec[0] += 1.5f * grid;
-
- bp = nu->bp;
- for (a = 0; a < 4; a++, bp++) mul_m4_v3(mat, bp->vec);
-
- if (cutype == CU_NURBS) {
- nu->knotsu = NULL; /* nurbs_knot_calc_u allocates */
- BKE_nurb_knot_calc_u(nu);
- }
-
- }
- break;
- case CU_PRIM_PATH: /* 5 point path */
- nu->pntsu = 5;
- nu->pntsv = 1;
- nu->orderu = 5;
- nu->flagu = CU_NURB_ENDPOINT; /* endpoint */
- nu->resolu = cu->resolu;
- nu->bp = CALLOC_STRUCT_N(BPoint, 5, "addNurbprim3");
-
- bp = nu->bp;
- for (a = 0; a < 5; a++, bp++) {
- bp->vec[3] = 1.0;
- bp->f1 = SELECT;
- bp->radius = bp->weight = 1.0;
- }
-
- bp = nu->bp;
- bp->vec[0] += -2.0f * grid;
- bp++;
- bp->vec[0] += -grid;
- bp++; bp++;
- bp->vec[0] += grid;
- bp++;
- bp->vec[0] += 2.0f * grid;
-
- bp = nu->bp;
- for (a = 0; a < 5; a++, bp++) mul_m4_v3(mat, bp->vec);
-
- if (cutype == CU_NURBS) {
- nu->knotsu = NULL; /* nurbs_knot_calc_u allocates */
- BKE_nurb_knot_calc_u(nu);
- }
-
- break;
- case CU_PRIM_CIRCLE: /* circle */
- nu->resolu = cu->resolu;
-
- if (cutype == CU_BEZIER) {
- if (!force_3d) nu->flag |= CU_2D;
- nu->pntsu = 4;
- nu->bezt = CALLOC_STRUCT_N(BezTriple, 4, "addNurbprim1");
- nu->flagu = CU_NURB_CYCLIC;
- bezt = nu->bezt;
-
- bezt->h1 = bezt->h2 = HD_AUTO;
- bezt->f1 = bezt->f2 = bezt->f3 = SELECT;
- bezt->vec[1][0] += -grid;
- for (a = 0; a < 3; a++) mul_m4_v3(mat, bezt->vec[a]);
- bezt->radius = bezt->weight = 1.0;
-
- bezt++;
- bezt->h1 = bezt->h2 = HD_AUTO;
- bezt->f1 = bezt->f2 = bezt->f3 = SELECT;
- bezt->vec[1][1] += grid;
- for (a = 0; a < 3; a++) mul_m4_v3(mat, bezt->vec[a]);
- bezt->radius = bezt->weight = 1.0;
-
- bezt++;
- bezt->h1 = bezt->h2 = HD_AUTO;
- bezt->f1 = bezt->f2 = bezt->f3 = SELECT;
- bezt->vec[1][0] += grid;
- for (a = 0; a < 3; a++) mul_m4_v3(mat, bezt->vec[a]);
- bezt->radius = bezt->weight = 1.0;
-
- bezt++;
- bezt->h1 = bezt->h2 = HD_AUTO;
- bezt->f1 = bezt->f2 = bezt->f3 = SELECT;
- bezt->vec[1][1] += -grid;
- for (a = 0; a < 3; a++) mul_m4_v3(mat, bezt->vec[a]);
- bezt->radius = bezt->weight = 1.0;
-
- BKE_nurb_handles_calc(nu);
- }
- else if (cutype == CU_NURBS) { /* nurb */
- nu->pntsu = 8;
- nu->pntsv = 1;
- nu->orderu = 4;
- nu->bp = CALLOC_STRUCT_N(BPoint, 8, "addNurbprim6");
- nu->flagu = CU_NURB_CYCLIC;
- bp = nu->bp;
-
- for (a = 0; a < 8; a++) {
- bp->f1 = SELECT;
- if (xzproj == 0) {
- bp->vec[0] += nurbcircle[a][0] * grid;
- bp->vec[1] += nurbcircle[a][1] * grid;
- }
- else {
- bp->vec[0] += 0.25f * nurbcircle[a][0] * grid - 0.75f * grid;
- bp->vec[2] += 0.25f * nurbcircle[a][1] * grid;
- }
- if (a & 1) bp->vec[3] = 0.25 * M_SQRT2;
- else bp->vec[3] = 1.0;
- mul_m4_v3(mat, bp->vec);
- bp->radius = bp->weight = 1.0;
-
- bp++;
- }
-
- BKE_nurb_knot_calc_u(nu);
- }
- break;
- case CU_PRIM_PATCH: /* 4x4 patch */
- if (cutype == CU_NURBS) { /* nurb */
-
- nu->pntsu = 4;
- nu->pntsv = 4;
- nu->orderu = 4;
- nu->orderv = 4;
- nu->flag = CU_SMOOTH;
- nu->bp = CALLOC_STRUCT_N(BPoint, 4 * 4, "addNurbprim6");
- nu->flagu = 0;
- nu->flagv = 0;
- bp = nu->bp;
-
- for (a = 0; a < 4; a++) {
- for (b = 0; b < 4; b++) {
- bp->f1 = SELECT;
- fac = (float)a - 1.5f;
- bp->vec[0] += fac * grid;
- fac = (float)b - 1.5f;
- bp->vec[1] += fac * grid;
- if ((a == 1 || a == 2) && (b == 1 || b == 2)) {
- bp->vec[2] += grid;
- }
- mul_m4_v3(mat, bp->vec);
- bp->vec[3] = 1.0;
- bp++;
- }
- }
-
- BKE_nurb_knot_calc_u(nu);
- BKE_nurb_knot_calc_v(nu);
- }
- break;
- case CU_PRIM_TUBE: /* Cylinder */
- if (cutype == CU_NURBS) {
- nu = add_nurbs_primitive(C, obedit, mat, CU_NURBS | CU_PRIM_CIRCLE, 0); /* circle */
- nu->resolu = cu->resolu;
- nu->flag = CU_SMOOTH;
- BLI_addtail(editnurb, nu); /* temporal for extrude and translate */
- vec[0] = vec[1] = 0.0;
- vec[2] = -grid;
-
- mul_mat3_m4_v3(mat, vec);
-
- translateflagNurb(editnurb, 1, vec);
- extrudeflagNurb(cu->editnurb, 1);
- mul_v3_fl(vec, -2.0f);
- translateflagNurb(editnurb, 1, vec);
-
- BLI_remlink(editnurb, nu);
-
- a = nu->pntsu * nu->pntsv;
- bp = nu->bp;
- while (a-- > 0) {
- bp->f1 |= SELECT;
- bp++;
- }
- }
- break;
- case CU_PRIM_SPHERE: /* sphere */
- if (cutype == CU_NURBS) {
- float tmp_cent[3] = {0.f, 0.f, 0.f};
- float tmp_vec[3] = {0.f, 0.f, 1.f};
-
- nu->pntsu = 5;
- nu->pntsv = 1;
- nu->orderu = 3;
- nu->resolu = cu->resolu;
- nu->resolv = cu->resolv;
- nu->flag = CU_SMOOTH;
- nu->bp = CALLOC_STRUCT_N(BPoint, 5, "addNurbprim6");
- nu->flagu = 0;
- bp = nu->bp;
-
- for (a = 0; a < 5; a++) {
- bp->f1 = SELECT;
- bp->vec[0] += nurbcircle[a][0] * grid;
- bp->vec[2] += nurbcircle[a][1] * grid;
- if (a & 1) bp->vec[3] = 0.5 * M_SQRT2;
- else bp->vec[3] = 1.0;
- mul_m4_v3(mat, bp->vec);
- bp++;
- }
- nu->flagu = CU_NURB_BEZIER;
- BKE_nurb_knot_calc_u(nu);
-
- BLI_addtail(editnurb, nu); /* temporal for spin */
-
- if (newob && (U.flag & USER_ADD_VIEWALIGNED) == 0) spin_nurb(umat, obedit, tmp_vec, tmp_cent);
- else if ((U.flag & USER_ADD_VIEWALIGNED)) spin_nurb(viewmat, obedit, zvec, mat[3]);
- else spin_nurb(umat, obedit, tmp_vec, mat[3]);
-
- BKE_nurb_knot_calc_v(nu);
-
- a = nu->pntsu * nu->pntsv;
- bp = nu->bp;
- while (a-- > 0) {
- bp->f1 |= SELECT;
- bp++;
- }
- BLI_remlink(editnurb, nu);
- }
- break;
- case CU_PRIM_DONUT: /* torus */
- if (cutype == CU_NURBS) {
- float tmp_cent[3] = {0.f, 0.f, 0.f};
- float tmp_vec[3] = {0.f, 0.f, 1.f};
-
- xzproj = 1;
- nu = add_nurbs_primitive(C, obedit, mat, CU_NURBS | CU_PRIM_CIRCLE, 0); /* circle */
- xzproj = 0;
- nu->resolu = cu->resolu;
- nu->resolv = cu->resolv;
- nu->flag = CU_SMOOTH;
- BLI_addtail(editnurb, nu); /* temporal for spin */
-
- /* same as above */
- if (newob && (U.flag & USER_ADD_VIEWALIGNED) == 0) spin_nurb(umat, obedit, tmp_vec, tmp_cent);
- else if ((U.flag & USER_ADD_VIEWALIGNED)) spin_nurb(viewmat, obedit, zvec, mat[3]);
- else spin_nurb(umat, obedit, tmp_vec, mat[3]);
-
-
- BLI_remlink(editnurb, nu);
-
- a = nu->pntsu * nu->pntsv;
- bp = nu->bp;
- while (a-- > 0) {
- bp->f1 |= SELECT;
- bp++;
- }
-
- }
- break;
-
- default: /* should never happen */
- BLI_assert(!"invalid nurbs type");
- return NULL;
- }
-
- BLI_assert(nu != NULL);
-
- if (nu) { /* should always be set */
- nu->flag |= CU_SMOOTH;
-
- BKE_nurb_test2D(nu);
- }
-
- return nu;
-}
-
-static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf)
-{
- Object *obedit = CTX_data_edit_object(C);
- ListBase *editnurb;
- Nurb *nu;
- bool newob = false;
- bool enter_editmode, is_view_aligned;
- unsigned int layer;
- float loc[3], rot[3];
- float mat[4][4];
-
- if (!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, &is_view_aligned))
- return OPERATOR_CANCELLED;
-
- if (!isSurf) { /* adding curve */
- if (obedit == NULL || obedit->type != OB_CURVE) {
- Curve *cu;
-
- obedit = ED_object_add_type(C, OB_CURVE, loc, rot, TRUE, layer);
- newob = true;
-
- cu = (Curve *)obedit->data;
- cu->flag |= CU_DEFORM_FILL;
-
- if (type & CU_PRIM_PATH)
- cu->flag |= CU_PATH | CU_3D;
- }
- else {
- DAG_id_tag_update(&obedit->id, OB_RECALC_DATA);
- }
- }
- else { /* adding surface */
- if (obedit == NULL || obedit->type != OB_SURF) {
- obedit = ED_object_add_type(C, OB_SURF, loc, rot, TRUE, layer);
- newob = true;
- }
- else {
- DAG_id_tag_update(&obedit->id, OB_RECALC_DATA);
- }
- }
-
- /* rename here, the undo stack checks name for valid undo pushes */
- if (newob) {
- if (obedit->type == OB_CURVE) {
- rename_id((ID *)obedit, get_curve_defname(type));
- rename_id((ID *)obedit->data, get_curve_defname(type));
- }
- else {
- rename_id((ID *)obedit, get_surf_defname(type));
- rename_id((ID *)obedit->data, get_surf_defname(type));
- }
- }
-
- /* ED_object_add_type doesnt do an undo, is needed for redo operator on primitive */
- if (newob && enter_editmode)
- ED_undo_push(C, "Enter Editmode");
-
- ED_object_new_primitive_matrix(C, obedit, loc, rot, mat, TRUE);
-
- nu = add_nurbs_primitive(C, obedit, mat, type, newob);
- editnurb = object_editcurve_get(obedit);
- BLI_addtail(editnurb, nu);
-
- /* userdef */
- if (newob && !enter_editmode) {
- ED_object_editmode_exit(C, EM_FREEDATA);
- }
-
- WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, obedit);
-
- return OPERATOR_FINISHED;
-}
-
-static int curve_prim_add(bContext *C, wmOperator *op, int type)
-{
- return curvesurf_prim_add(C, op, type, 0);
-}
-
-static int surf_prim_add(bContext *C, wmOperator *op, int type)
-{
- return curvesurf_prim_add(C, op, type, 1);
-}
-
-/* ******************** Curves ******************* */
-
-static int add_primitive_bezier_exec(bContext *C, wmOperator *op)
-{
- return curve_prim_add(C, op, CU_BEZIER | CU_PRIM_CURVE);
-}
-
-void CURVE_OT_primitive_bezier_curve_add(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name = "Add Bezier";
- ot->description = "Construct a Bezier Curve";
- ot->idname = "CURVE_OT_primitive_bezier_curve_add";
-
- /* api callbacks */
- ot->exec = add_primitive_bezier_exec;
- ot->poll = ED_operator_scene_editable;
-
- /* flags */
- ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
-
- ED_object_add_generic_props(ot, TRUE);
-}
-
-static int add_primitive_bezier_circle_exec(bContext *C, wmOperator *op)
-{
- return curve_prim_add(C, op, CU_BEZIER | CU_PRIM_CIRCLE);
-}
-
-void CURVE_OT_primitive_bezier_circle_add(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name = "Add Bezier Circle";
- ot->description = "Construct a Bezier Circle";
- ot->idname = "CURVE_OT_primitive_bezier_circle_add";
-
- /* api callbacks */
- ot->exec = add_primitive_bezier_circle_exec;
- ot->poll = ED_operator_scene_editable;
-
- /* flags */
- ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
-
- ED_object_add_generic_props(ot, TRUE);
-}
-
-static int add_primitive_nurbs_curve_exec(bContext *C, wmOperator *op)
-{
- return curve_prim_add(C, op, CU_NURBS | CU_PRIM_CURVE);
-}
-
-void CURVE_OT_primitive_nurbs_curve_add(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name = "Add Nurbs Curve";
- ot->description = "Construct a Nurbs Curve";
- ot->idname = "CURVE_OT_primitive_nurbs_curve_add";
-
- /* api callbacks */
- ot->exec = add_primitive_nurbs_curve_exec;
- ot->poll = ED_operator_scene_editable;
-
- /* flags */
- ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
-
- ED_object_add_generic_props(ot, TRUE);
-}
-
-static int add_primitive_nurbs_circle_exec(bContext *C, wmOperator *op)
-{
- return curve_prim_add(C, op, CU_NURBS | CU_PRIM_CIRCLE);
-}
-
-void CURVE_OT_primitive_nurbs_circle_add(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name = "Add Nurbs Circle";
- ot->description = "Construct a Nurbs Circle";
- ot->idname = "CURVE_OT_primitive_nurbs_circle_add";
-
- /* api callbacks */
- ot->exec = add_primitive_nurbs_circle_exec;
- ot->poll = ED_operator_scene_editable;
-
- /* flags */
- ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
-
- ED_object_add_generic_props(ot, TRUE);
-}
-
-static int add_primitive_curve_path_exec(bContext *C, wmOperator *op)
-{
- return curve_prim_add(C, op, CU_NURBS | CU_PRIM_PATH);
-}
-
-void CURVE_OT_primitive_nurbs_path_add(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name = "Add Path";
- ot->description = "Construct a Path";
- ot->idname = "CURVE_OT_primitive_nurbs_path_add";
-
- /* api callbacks */
- ot->exec = add_primitive_curve_path_exec;
- ot->poll = ED_operator_scene_editable;
-
- /* flags */
- ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
-
- ED_object_add_generic_props(ot, TRUE);
-}
-
-/* **************** NURBS surfaces ********************** */
-static int add_primitive_nurbs_surface_curve_exec(bContext *C, wmOperator *op)
-{
- return surf_prim_add(C, op, CU_PRIM_CURVE | CU_NURBS);
-}
-
-void SURFACE_OT_primitive_nurbs_surface_curve_add(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name = "Add Surface Curve";
- ot->description = "Construct a Nurbs surface Curve";
- ot->idname = "SURFACE_OT_primitive_nurbs_surface_curve_add";
-
- /* api callbacks */
- ot->exec = add_primitive_nurbs_surface_curve_exec;
- ot->poll = ED_operator_scene_editable;
-
- /* flags */
- ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
-
- ED_object_add_generic_props(ot, TRUE);
-}
-
-static int add_primitive_nurbs_surface_circle_exec(bContext *C, wmOperator *op)
-{
- return surf_prim_add(C, op, CU_PRIM_CIRCLE | CU_NURBS);
-}
-
-void SURFACE_OT_primitive_nurbs_surface_circle_add(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name = "Add Surface Circle";
- ot->description = "Construct a Nurbs surface Circle";
- ot->idname = "SURFACE_OT_primitive_nurbs_surface_circle_add";
-
- /* api callbacks */
- ot->exec = add_primitive_nurbs_surface_circle_exec;
- ot->poll = ED_operator_scene_editable;
-
- /* flags */
- ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
-
- ED_object_add_generic_props(ot, TRUE);
-}
-
-static int add_primitive_nurbs_surface_surface_exec(bContext *C, wmOperator *op)
-{
- return surf_prim_add(C, op, CU_PRIM_PATCH | CU_NURBS);
-}
-
-void SURFACE_OT_primitive_nurbs_surface_surface_add(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name = "Add Surface Patch";
- ot->description = "Construct a Nurbs surface Patch";
- ot->idname = "SURFACE_OT_primitive_nurbs_surface_surface_add";
-
- /* api callbacks */
- ot->exec = add_primitive_nurbs_surface_surface_exec;
- ot->poll = ED_operator_scene_editable;
-
- /* flags */
- ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
-
- ED_object_add_generic_props(ot, TRUE);
-}
-
-static int add_primitive_nurbs_surface_cylinder_exec(bContext *C, wmOperator *op)
-{
- return surf_prim_add(C, op, CU_PRIM_TUBE | CU_NURBS);
-}
-
-void SURFACE_OT_primitive_nurbs_surface_cylinder_add(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name = "Add Surface Cylinder";
- ot->description = "Construct a Nurbs surface Cylinder";
- ot->idname = "SURFACE_OT_primitive_nurbs_surface_cylinder_add";
-
- /* api callbacks */
- ot->exec = add_primitive_nurbs_surface_cylinder_exec;
- ot->poll = ED_operator_scene_editable;
-
- /* flags */
- ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
-
- ED_object_add_generic_props(ot, TRUE);
-}
-
-static int add_primitive_nurbs_surface_sphere_exec(bContext *C, wmOperator *op)
-{
- return surf_prim_add(C, op, CU_PRIM_SPHERE | CU_NURBS);
-}
-
-void SURFACE_OT_primitive_nurbs_surface_sphere_add(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name = "Add Surface Sphere";
- ot->description = "Construct a Nurbs surface Sphere";
- ot->idname = "SURFACE_OT_primitive_nurbs_surface_sphere_add";
-
- /* api callbacks */
- ot->exec = add_primitive_nurbs_surface_sphere_exec;
- ot->poll = ED_operator_scene_editable;
-
- /* flags */
- ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
-
- ED_object_add_generic_props(ot, TRUE);
-}
-
-static int add_primitive_nurbs_surface_torus_exec(bContext *C, wmOperator *op)
-{
- return surf_prim_add(C, op, CU_PRIM_DONUT | CU_NURBS);
-}
-
-void SURFACE_OT_primitive_nurbs_surface_torus_add(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name = "Add Surface Torus";
- ot->description = "Construct a Nurbs surface Torus";
- ot->idname = "SURFACE_OT_primitive_nurbs_surface_torus_add";
-
- /* api callbacks */
- ot->exec = add_primitive_nurbs_surface_torus_exec;
- ot->poll = ED_operator_scene_editable;
-
- /* flags */
- ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
-
- ED_object_add_generic_props(ot, TRUE);
-}
/***************** clear tilt operator ********************/
diff --git a/source/blender/editors/curve/editcurve_add.c b/source/blender/editors/curve/editcurve_add.c
new file mode 100644
index 00000000000..9b858a2c4e9
--- /dev/null
+++ b/source/blender/editors/curve/editcurve_add.c
@@ -0,0 +1,812 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/editors/curve/editcurve_add.c
+ * \ingroup edcurve
+ */
+
+#include "DNA_object_types.h"
+#include "DNA_scene_types.h"
+#include "DNA_anim_types.h"
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_blenlib.h"
+#include "BLI_math.h"
+
+#include "BLF_translation.h"
+
+#include "BKE_context.h"
+#include "BKE_curve.h"
+#include "BKE_depsgraph.h"
+#include "BKE_library.h"
+
+#include "RNA_access.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
+#include "ED_object.h"
+#include "ED_screen.h"
+#include "ED_util.h"
+#include "ED_view3d.h"
+#include "ED_curve.h"
+
+#include "curve_intern.h"
+
+static const float nurbcircle[8][2] = {
+ {0.0, -1.0}, {-1.0, -1.0}, {-1.0, 0.0}, {-1.0, 1.0},
+ {0.0, 1.0}, { 1.0, 1.0}, { 1.0, 0.0}, { 1.0, -1.0}
+};
+
+/************ add primitive, used by object/ module ****************/
+
+static const char *get_curve_defname(int type)
+{
+ int stype = type & CU_PRIMITIVE;
+
+ if ((type & CU_TYPE) == CU_BEZIER) {
+ switch (stype) {
+ case CU_PRIM_CURVE: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "BezierCurve");
+ case CU_PRIM_CIRCLE: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "BezierCircle");
+ case CU_PRIM_PATH: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "CurvePath");
+ default:
+ return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "Curve");
+ }
+ }
+ else {
+ switch (stype) {
+ case CU_PRIM_CURVE: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "NurbsCurve");
+ case CU_PRIM_CIRCLE: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "NurbsCircle");
+ case CU_PRIM_PATH: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "NurbsPath");
+ default:
+ return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "Curve");
+ }
+ }
+}
+
+static const char *get_surf_defname(int type)
+{
+ int stype = type & CU_PRIMITIVE;
+
+ switch (stype) {
+ case CU_PRIM_CURVE: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "SurfCurve");
+ case CU_PRIM_CIRCLE: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "SurfCircle");
+ case CU_PRIM_PATCH: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "SurfPatch");
+ case CU_PRIM_SPHERE: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "SurfSphere");
+ case CU_PRIM_DONUT: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "SurfTorus");
+ default:
+ return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "Surface");
+ }
+}
+
+
+Nurb *add_nurbs_primitive(bContext *C, Object *obedit, float mat[4][4], int type, int newob)
+{
+ static int xzproj = 0; /* this function calls itself... */
+ ListBase *editnurb = object_editcurve_get(obedit);
+ View3D *v3d = CTX_wm_view3d(C);
+ RegionView3D *rv3d = ED_view3d_context_rv3d(C);
+ Nurb *nu = NULL;
+ BezTriple *bezt;
+ BPoint *bp;
+ Curve *cu = (Curve *)obedit->data;
+ float vec[3], zvec[3] = {0.0f, 0.0f, 1.0f};
+ float umat[4][4] = MAT4_UNITY, viewmat[4][4] = MAT4_UNITY;
+ float fac;
+ int a, b;
+ const float grid = v3d ? v3d->grid : 1.0f;
+ const int cutype = (type & CU_TYPE); // poly, bezier, nurbs, etc
+ const int stype = (type & CU_PRIMITIVE);
+ const int force_3d = ((Curve *)obedit->data)->flag & CU_3D; /* could be adding to an existing 3D curve */
+
+ if (rv3d) {
+ copy_m4_m4(viewmat, rv3d->viewmat);
+ copy_v3_v3(zvec, rv3d->viewinv[2]);
+ }
+
+ BKE_nurbList_flag_set(editnurb, 0);
+
+ /* these types call this function to return a Nurb */
+ if (stype != CU_PRIM_TUBE && stype != CU_PRIM_DONUT) {
+ nu = (Nurb *)MEM_callocN(sizeof(Nurb), "addNurbprim");
+ nu->type = cutype;
+ nu->resolu = cu->resolu;
+ nu->resolv = cu->resolv;
+ }
+
+ switch (stype) {
+ case CU_PRIM_CURVE: /* curve */
+ nu->resolu = cu->resolu;
+ if (cutype == CU_BEZIER) {
+ if (!force_3d) nu->flag |= CU_2D;
+ nu->pntsu = 2;
+ nu->bezt = (BezTriple *)MEM_callocN(2 * sizeof(BezTriple), "addNurbprim1");
+ bezt = nu->bezt;
+ bezt->h1 = bezt->h2 = HD_ALIGN;
+ bezt->f1 = bezt->f2 = bezt->f3 = SELECT;
+ bezt->radius = 1.0;
+
+ bezt->vec[1][0] += -grid;
+ bezt->vec[0][0] += -1.5f * grid;
+ bezt->vec[0][1] += -0.5f * grid;
+ bezt->vec[2][0] += -0.5f * grid;
+ bezt->vec[2][1] += 0.5f * grid;
+ for (a = 0; a < 3; a++) mul_m4_v3(mat, bezt->vec[a]);
+
+ bezt++;
+ bezt->h1 = bezt->h2 = HD_ALIGN;
+ bezt->f1 = bezt->f2 = bezt->f3 = SELECT;
+ bezt->radius = bezt->weight = 1.0;
+
+ bezt->vec[0][0] = 0;
+ bezt->vec[0][1] = 0;
+ bezt->vec[1][0] = grid;
+ bezt->vec[1][1] = 0;
+ bezt->vec[2][0] = grid * 2;
+ bezt->vec[2][1] = 0;
+ for (a = 0; a < 3; a++) mul_m4_v3(mat, bezt->vec[a]);
+
+ BKE_nurb_handles_calc(nu);
+ }
+ else {
+
+ nu->pntsu = 4;
+ nu->pntsv = 1;
+ nu->orderu = 4;
+ nu->bp = (BPoint *)MEM_callocN(sizeof(BPoint) * 4, "addNurbprim3");
+
+ bp = nu->bp;
+ for (a = 0; a < 4; a++, bp++) {
+ bp->vec[3] = 1.0;
+ bp->f1 = SELECT;
+ bp->radius = bp->weight = 1.0;
+ }
+
+ bp = nu->bp;
+ bp->vec[0] += -1.5f * grid;
+ bp++;
+ bp->vec[0] += -grid;
+ bp->vec[1] += grid;
+ bp++;
+ bp->vec[0] += grid;
+ bp->vec[1] += grid;
+ bp++;
+ bp->vec[0] += 1.5f * grid;
+
+ bp = nu->bp;
+ for (a = 0; a < 4; a++, bp++) mul_m4_v3(mat, bp->vec);
+
+ if (cutype == CU_NURBS) {
+ nu->knotsu = NULL; /* nurbs_knot_calc_u allocates */
+ BKE_nurb_knot_calc_u(nu);
+ }
+
+ }
+ break;
+ case CU_PRIM_PATH: /* 5 point path */
+ nu->pntsu = 5;
+ nu->pntsv = 1;
+ nu->orderu = 5;
+ nu->flagu = CU_NURB_ENDPOINT; /* endpoint */
+ nu->resolu = cu->resolu;
+ nu->bp = (BPoint *)MEM_callocN(sizeof(BPoint) * 5, "addNurbprim3");
+
+ bp = nu->bp;
+ for (a = 0; a < 5; a++, bp++) {
+ bp->vec[3] = 1.0;
+ bp->f1 = SELECT;
+ bp->radius = bp->weight = 1.0;
+ }
+
+ bp = nu->bp;
+ bp->vec[0] += -2.0f * grid;
+ bp++;
+ bp->vec[0] += -grid;
+ bp++; bp++;
+ bp->vec[0] += grid;
+ bp++;
+ bp->vec[0] += 2.0f * grid;
+
+ bp = nu->bp;
+ for (a = 0; a < 5; a++, bp++) mul_m4_v3(mat, bp->vec);
+
+ if (cutype == CU_NURBS) {
+ nu->knotsu = NULL; /* nurbs_knot_calc_u allocates */
+ BKE_nurb_knot_calc_u(nu);
+ }
+
+ break;
+ case CU_PRIM_CIRCLE: /* circle */
+ nu->resolu = cu->resolu;
+
+ if (cutype == CU_BEZIER) {
+ if (!force_3d) nu->flag |= CU_2D;
+ nu->pntsu = 4;
+ nu->bezt = (BezTriple *)MEM_callocN(sizeof(BezTriple) * 4, "addNurbprim1");
+ nu->flagu = CU_NURB_CYCLIC;
+ bezt = nu->bezt;
+
+ bezt->h1 = bezt->h2 = HD_AUTO;
+ bezt->f1 = bezt->f2 = bezt->f3 = SELECT;
+ bezt->vec[1][0] += -grid;
+ for (a = 0; a < 3; a++) mul_m4_v3(mat, bezt->vec[a]);
+ bezt->radius = bezt->weight = 1.0;
+
+ bezt++;
+ bezt->h1 = bezt->h2 = HD_AUTO;
+ bezt->f1 = bezt->f2 = bezt->f3 = SELECT;
+ bezt->vec[1][1] += grid;
+ for (a = 0; a < 3; a++) mul_m4_v3(mat, bezt->vec[a]);
+ bezt->radius = bezt->weight = 1.0;
+
+ bezt++;
+ bezt->h1 = bezt->h2 = HD_AUTO;
+ bezt->f1 = bezt->f2 = bezt->f3 = SELECT;
+ bezt->vec[1][0] += grid;
+ for (a = 0; a < 3; a++) mul_m4_v3(mat, bezt->vec[a]);
+ bezt->radius = bezt->weight = 1.0;
+
+ bezt++;
+ bezt->h1 = bezt->h2 = HD_AUTO;
+ bezt->f1 = bezt->f2 = bezt->f3 = SELECT;
+ bezt->vec[1][1] += -grid;
+ for (a = 0; a < 3; a++) mul_m4_v3(mat, bezt->vec[a]);
+ bezt->radius = bezt->weight = 1.0;
+
+ BKE_nurb_handles_calc(nu);
+ }
+ else if (cutype == CU_NURBS) { /* nurb */
+ nu->pntsu = 8;
+ nu->pntsv = 1;
+ nu->orderu = 4;
+ nu->bp = (BPoint *)MEM_callocN(sizeof(BPoint) * 8, "addNurbprim6");
+ nu->flagu = CU_NURB_CYCLIC;
+ bp = nu->bp;
+
+ for (a = 0; a < 8; a++) {
+ bp->f1 = SELECT;
+ if (xzproj == 0) {
+ bp->vec[0] += nurbcircle[a][0] * grid;
+ bp->vec[1] += nurbcircle[a][1] * grid;
+ }
+ else {
+ bp->vec[0] += 0.25f * nurbcircle[a][0] * grid - 0.75f * grid;
+ bp->vec[2] += 0.25f * nurbcircle[a][1] * grid;
+ }
+ if (a & 1) bp->vec[3] = 0.25 * M_SQRT2;
+ else bp->vec[3] = 1.0;
+ mul_m4_v3(mat, bp->vec);
+ bp->radius = bp->weight = 1.0;
+
+ bp++;
+ }
+
+ BKE_nurb_knot_calc_u(nu);
+ }
+ break;
+ case CU_PRIM_PATCH: /* 4x4 patch */
+ if (cutype == CU_NURBS) { /* nurb */
+
+ nu->pntsu = 4;
+ nu->pntsv = 4;
+ nu->orderu = 4;
+ nu->orderv = 4;
+ nu->flag = CU_SMOOTH;
+ nu->bp = (BPoint *)MEM_callocN(sizeof(BPoint) * (4 * 4), "addNurbprim6");
+ nu->flagu = 0;
+ nu->flagv = 0;
+ bp = nu->bp;
+
+ for (a = 0; a < 4; a++) {
+ for (b = 0; b < 4; b++) {
+ bp->f1 = SELECT;
+ fac = (float)a - 1.5f;
+ bp->vec[0] += fac * grid;
+ fac = (float)b - 1.5f;
+ bp->vec[1] += fac * grid;
+ if ((a == 1 || a == 2) && (b == 1 || b == 2)) {
+ bp->vec[2] += grid;
+ }
+ mul_m4_v3(mat, bp->vec);
+ bp->vec[3] = 1.0;
+ bp++;
+ }
+ }
+
+ BKE_nurb_knot_calc_u(nu);
+ BKE_nurb_knot_calc_v(nu);
+ }
+ break;
+ case CU_PRIM_TUBE: /* Cylinder */
+ if (cutype == CU_NURBS) {
+ nu = add_nurbs_primitive(C, obedit, mat, CU_NURBS | CU_PRIM_CIRCLE, 0); /* circle */
+ nu->resolu = cu->resolu;
+ nu->flag = CU_SMOOTH;
+ BLI_addtail(editnurb, nu); /* temporal for extrude and translate */
+ vec[0] = vec[1] = 0.0;
+ vec[2] = -grid;
+
+ mul_mat3_m4_v3(mat, vec);
+
+ ed_editnurb_translate_flag(editnurb, 1, vec);
+ ed_editnurb_extrude_flag(cu->editnurb, 1);
+ mul_v3_fl(vec, -2.0f);
+ ed_editnurb_translate_flag(editnurb, 1, vec);
+
+ BLI_remlink(editnurb, nu);
+
+ a = nu->pntsu * nu->pntsv;
+ bp = nu->bp;
+ while (a-- > 0) {
+ bp->f1 |= SELECT;
+ bp++;
+ }
+ }
+ break;
+ case CU_PRIM_SPHERE: /* sphere */
+ if (cutype == CU_NURBS) {
+ float tmp_cent[3] = {0.f, 0.f, 0.f};
+ float tmp_vec[3] = {0.f, 0.f, 1.f};
+
+ nu->pntsu = 5;
+ nu->pntsv = 1;
+ nu->orderu = 3;
+ nu->resolu = cu->resolu;
+ nu->resolv = cu->resolv;
+ nu->flag = CU_SMOOTH;
+ nu->bp = (BPoint *)MEM_callocN(sizeof(BPoint) * 5, "addNurbprim6");
+ nu->flagu = 0;
+ bp = nu->bp;
+
+ for (a = 0; a < 5; a++) {
+ bp->f1 = SELECT;
+ bp->vec[0] += nurbcircle[a][0] * grid;
+ bp->vec[2] += nurbcircle[a][1] * grid;
+ if (a & 1) bp->vec[3] = 0.5 * M_SQRT2;
+ else bp->vec[3] = 1.0;
+ mul_m4_v3(mat, bp->vec);
+ bp++;
+ }
+ nu->flagu = CU_NURB_BEZIER;
+ BKE_nurb_knot_calc_u(nu);
+
+ BLI_addtail(editnurb, nu); /* temporal for spin */
+
+ if (newob && (U.flag & USER_ADD_VIEWALIGNED) == 0)
+ ed_editnurb_spin(umat, obedit, tmp_vec, tmp_cent);
+ else if ((U.flag & USER_ADD_VIEWALIGNED))
+ ed_editnurb_spin(viewmat, obedit, zvec, mat[3]);
+ else
+ ed_editnurb_spin(umat, obedit, tmp_vec, mat[3]);
+
+ BKE_nurb_knot_calc_v(nu);
+
+ a = nu->pntsu * nu->pntsv;
+ bp = nu->bp;
+ while (a-- > 0) {
+ bp->f1 |= SELECT;
+ bp++;
+ }
+ BLI_remlink(editnurb, nu);
+ }
+ break;
+ case CU_PRIM_DONUT: /* torus */
+ if (cutype == CU_NURBS) {
+ float tmp_cent[3] = {0.f, 0.f, 0.f};
+ float tmp_vec[3] = {0.f, 0.f, 1.f};
+
+ xzproj = 1;
+ nu = add_nurbs_primitive(C, obedit, mat, CU_NURBS | CU_PRIM_CIRCLE, 0); /* circle */
+ xzproj = 0;
+ nu->resolu = cu->resolu;
+ nu->resolv = cu->resolv;
+ nu->flag = CU_SMOOTH;
+ BLI_addtail(editnurb, nu); /* temporal for spin */
+
+ /* same as above */
+ if (newob && (U.flag & USER_ADD_VIEWALIGNED) == 0)
+ ed_editnurb_spin(umat, obedit, tmp_vec, tmp_cent);
+ else if ((U.flag & USER_ADD_VIEWALIGNED))
+ ed_editnurb_spin(viewmat, obedit, zvec, mat[3]);
+ else
+ ed_editnurb_spin(umat, obedit, tmp_vec, mat[3]);
+
+
+ BLI_remlink(editnurb, nu);
+
+ a = nu->pntsu * nu->pntsv;
+ bp = nu->bp;
+ while (a-- > 0) {
+ bp->f1 |= SELECT;
+ bp++;
+ }
+
+ }
+ break;
+
+ default: /* should never happen */
+ BLI_assert(!"invalid nurbs type");
+ return NULL;
+ }
+
+ BLI_assert(nu != NULL);
+
+ if (nu) { /* should always be set */
+ nu->flag |= CU_SMOOTH;
+
+ BKE_nurb_test2D(nu);
+ }
+
+ return nu;
+}
+
+static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf)
+{
+ Object *obedit = CTX_data_edit_object(C);
+ ListBase *editnurb;
+ Nurb *nu;
+ bool newob = false;
+ bool enter_editmode, is_view_aligned;
+ unsigned int layer;
+ float dia;
+ float loc[3], rot[3];
+ float mat[4][4];
+
+ WM_operator_view3d_unit_defaults(C, op);
+
+ if (!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, &is_view_aligned))
+ return OPERATOR_CANCELLED;
+
+ if (!isSurf) { /* adding curve */
+ if (obedit == NULL || obedit->type != OB_CURVE) {
+ Curve *cu;
+
+ obedit = ED_object_add_type(C, OB_CURVE, loc, rot, true, layer);
+ newob = true;
+
+ cu = (Curve *)obedit->data;
+ cu->flag |= CU_DEFORM_FILL;
+
+ if (type & CU_PRIM_PATH)
+ cu->flag |= CU_PATH | CU_3D;
+ }
+ else {
+ DAG_id_tag_update(&obedit->id, OB_RECALC_DATA);
+ }
+ }
+ else { /* adding surface */
+ if (obedit == NULL || obedit->type != OB_SURF) {
+ obedit = ED_object_add_type(C, OB_SURF, loc, rot, true, layer);
+ newob = true;
+ }
+ else {
+ DAG_id_tag_update(&obedit->id, OB_RECALC_DATA);
+ }
+ }
+
+ /* rename here, the undo stack checks name for valid undo pushes */
+ if (newob) {
+ if (obedit->type == OB_CURVE) {
+ rename_id((ID *)obedit, get_curve_defname(type));
+ rename_id((ID *)obedit->data, get_curve_defname(type));
+ }
+ else {
+ rename_id((ID *)obedit, get_surf_defname(type));
+ rename_id((ID *)obedit->data, get_surf_defname(type));
+ }
+ }
+
+ /* ED_object_add_type doesnt do an undo, is needed for redo operator on primitive */
+ if (newob && enter_editmode)
+ ED_undo_push(C, "Enter Editmode");
+
+ ED_object_new_primitive_matrix(C, obedit, loc, rot, mat, false);
+ dia = RNA_float_get(op->ptr, "radius");
+ mat[0][0] *= dia;
+ mat[1][1] *= dia;
+ mat[2][2] *= dia;
+
+ nu = add_nurbs_primitive(C, obedit, mat, type, newob);
+ editnurb = object_editcurve_get(obedit);
+ BLI_addtail(editnurb, nu);
+
+ /* userdef */
+ if (newob && !enter_editmode) {
+ ED_object_editmode_exit(C, EM_FREEDATA);
+ }
+
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, obedit);
+
+ return OPERATOR_FINISHED;
+}
+
+static int curve_prim_add(bContext *C, wmOperator *op, int type)
+{
+ return curvesurf_prim_add(C, op, type, 0);
+}
+
+static int surf_prim_add(bContext *C, wmOperator *op, int type)
+{
+ return curvesurf_prim_add(C, op, type, 1);
+}
+
+/* ******************** Curves ******************* */
+
+static int add_primitive_bezier_exec(bContext *C, wmOperator *op)
+{
+ return curve_prim_add(C, op, CU_BEZIER | CU_PRIM_CURVE);
+}
+
+void CURVE_OT_primitive_bezier_curve_add(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Add Bezier";
+ ot->description = "Construct a Bezier Curve";
+ ot->idname = "CURVE_OT_primitive_bezier_curve_add";
+
+ /* api callbacks */
+ ot->exec = add_primitive_bezier_exec;
+ ot->poll = ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+
+ ED_object_add_unit_props(ot);
+ ED_object_add_generic_props(ot, true);
+}
+
+static int add_primitive_bezier_circle_exec(bContext *C, wmOperator *op)
+{
+ return curve_prim_add(C, op, CU_BEZIER | CU_PRIM_CIRCLE);
+}
+
+void CURVE_OT_primitive_bezier_circle_add(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Add Bezier Circle";
+ ot->description = "Construct a Bezier Circle";
+ ot->idname = "CURVE_OT_primitive_bezier_circle_add";
+
+ /* api callbacks */
+ ot->exec = add_primitive_bezier_circle_exec;
+ ot->poll = ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+
+ ED_object_add_unit_props(ot);
+ ED_object_add_generic_props(ot, true);
+}
+
+static int add_primitive_nurbs_curve_exec(bContext *C, wmOperator *op)
+{
+ return curve_prim_add(C, op, CU_NURBS | CU_PRIM_CURVE);
+}
+
+void CURVE_OT_primitive_nurbs_curve_add(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Add Nurbs Curve";
+ ot->description = "Construct a Nurbs Curve";
+ ot->idname = "CURVE_OT_primitive_nurbs_curve_add";
+
+ /* api callbacks */
+ ot->exec = add_primitive_nurbs_curve_exec;
+ ot->poll = ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+
+ ED_object_add_unit_props(ot);
+ ED_object_add_generic_props(ot, true);
+}
+
+static int add_primitive_nurbs_circle_exec(bContext *C, wmOperator *op)
+{
+ return curve_prim_add(C, op, CU_NURBS | CU_PRIM_CIRCLE);
+}
+
+void CURVE_OT_primitive_nurbs_circle_add(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Add Nurbs Circle";
+ ot->description = "Construct a Nurbs Circle";
+ ot->idname = "CURVE_OT_primitive_nurbs_circle_add";
+
+ /* api callbacks */
+ ot->exec = add_primitive_nurbs_circle_exec;
+ ot->poll = ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+
+ ED_object_add_unit_props(ot);
+ ED_object_add_generic_props(ot, true);
+}
+
+static int add_primitive_curve_path_exec(bContext *C, wmOperator *op)
+{
+ return curve_prim_add(C, op, CU_NURBS | CU_PRIM_PATH);
+}
+
+void CURVE_OT_primitive_nurbs_path_add(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Add Path";
+ ot->description = "Construct a Path";
+ ot->idname = "CURVE_OT_primitive_nurbs_path_add";
+
+ /* api callbacks */
+ ot->exec = add_primitive_curve_path_exec;
+ ot->poll = ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+
+ ED_object_add_unit_props(ot);
+ ED_object_add_generic_props(ot, true);
+}
+
+/* **************** NURBS surfaces ********************** */
+static int add_primitive_nurbs_surface_curve_exec(bContext *C, wmOperator *op)
+{
+ return surf_prim_add(C, op, CU_PRIM_CURVE | CU_NURBS);
+}
+
+void SURFACE_OT_primitive_nurbs_surface_curve_add(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Add Surface Curve";
+ ot->description = "Construct a Nurbs surface Curve";
+ ot->idname = "SURFACE_OT_primitive_nurbs_surface_curve_add";
+
+ /* api callbacks */
+ ot->exec = add_primitive_nurbs_surface_curve_exec;
+ ot->poll = ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+
+ ED_object_add_unit_props(ot);
+ ED_object_add_generic_props(ot, true);
+}
+
+static int add_primitive_nurbs_surface_circle_exec(bContext *C, wmOperator *op)
+{
+ return surf_prim_add(C, op, CU_PRIM_CIRCLE | CU_NURBS);
+}
+
+void SURFACE_OT_primitive_nurbs_surface_circle_add(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Add Surface Circle";
+ ot->description = "Construct a Nurbs surface Circle";
+ ot->idname = "SURFACE_OT_primitive_nurbs_surface_circle_add";
+
+ /* api callbacks */
+ ot->exec = add_primitive_nurbs_surface_circle_exec;
+ ot->poll = ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+
+ ED_object_add_unit_props(ot);
+ ED_object_add_generic_props(ot, true);
+}
+
+static int add_primitive_nurbs_surface_surface_exec(bContext *C, wmOperator *op)
+{
+ return surf_prim_add(C, op, CU_PRIM_PATCH | CU_NURBS);
+}
+
+void SURFACE_OT_primitive_nurbs_surface_surface_add(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Add Surface Patch";
+ ot->description = "Construct a Nurbs surface Patch";
+ ot->idname = "SURFACE_OT_primitive_nurbs_surface_surface_add";
+
+ /* api callbacks */
+ ot->exec = add_primitive_nurbs_surface_surface_exec;
+ ot->poll = ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+
+ ED_object_add_unit_props(ot);
+ ED_object_add_generic_props(ot, true);
+}
+
+static int add_primitive_nurbs_surface_cylinder_exec(bContext *C, wmOperator *op)
+{
+ return surf_prim_add(C, op, CU_PRIM_TUBE | CU_NURBS);
+}
+
+void SURFACE_OT_primitive_nurbs_surface_cylinder_add(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Add Surface Cylinder";
+ ot->description = "Construct a Nurbs surface Cylinder";
+ ot->idname = "SURFACE_OT_primitive_nurbs_surface_cylinder_add";
+
+ /* api callbacks */
+ ot->exec = add_primitive_nurbs_surface_cylinder_exec;
+ ot->poll = ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+
+ ED_object_add_unit_props(ot);
+ ED_object_add_generic_props(ot, true);
+}
+
+static int add_primitive_nurbs_surface_sphere_exec(bContext *C, wmOperator *op)
+{
+ return surf_prim_add(C, op, CU_PRIM_SPHERE | CU_NURBS);
+}
+
+void SURFACE_OT_primitive_nurbs_surface_sphere_add(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Add Surface Sphere";
+ ot->description = "Construct a Nurbs surface Sphere";
+ ot->idname = "SURFACE_OT_primitive_nurbs_surface_sphere_add";
+
+ /* api callbacks */
+ ot->exec = add_primitive_nurbs_surface_sphere_exec;
+ ot->poll = ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+
+ ED_object_add_unit_props(ot);
+ ED_object_add_generic_props(ot, true);
+}
+
+static int add_primitive_nurbs_surface_torus_exec(bContext *C, wmOperator *op)
+{
+ return surf_prim_add(C, op, CU_PRIM_DONUT | CU_NURBS);
+}
+
+void SURFACE_OT_primitive_nurbs_surface_torus_add(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Add Surface Torus";
+ ot->description = "Construct a Nurbs surface Torus";
+ ot->idname = "SURFACE_OT_primitive_nurbs_surface_torus_add";
+
+ /* api callbacks */
+ ot->exec = add_primitive_nurbs_surface_torus_exec;
+ ot->poll = ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+
+ ED_object_add_unit_props(ot);
+ ED_object_add_generic_props(ot, true);
+}
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c
index b9759e16f20..ac9c338e431 100644
--- a/source/blender/editors/curve/editfont.c
+++ b/source/blender/editors/curve/editfont.c
@@ -981,7 +981,7 @@ void FONT_OT_move_select(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Move Select";
- ot->description = "Make selection from current cursor position to new cursor position type";
+ ot->description = "Move the cursor while selecting";
ot->idname = "FONT_OT_move_select";
/* api callbacks */
diff --git a/source/blender/editors/curve/lorem.c b/source/blender/editors/curve/lorem.c
index 52f5101f58a..59bf3f50dbc 100644
--- a/source/blender/editors/curve/lorem.c
+++ b/source/blender/editors/curve/lorem.c
@@ -23,6 +23,7 @@
*/
+#include "BLI_sys_types.h"
#include "curve_intern.h"
const char ED_lorem[] = {
diff --git a/source/blender/editors/datafiles/CMakeLists.txt b/source/blender/editors/datafiles/CMakeLists.txt
index 8d108644470..6adc500baa4 100644
--- a/source/blender/editors/datafiles/CMakeLists.txt
+++ b/source/blender/editors/datafiles/CMakeLists.txt
@@ -47,8 +47,18 @@ if(WITH_BLENDER)
# images
data_to_c_simple(../../../../release/datafiles/splash.png SRC)
+ # XXX These are handy, but give nasty "false changes" in svn :/
+ #svg_to_png(../../../../release/datafiles/blender_icons.svg
+ #../../../../release/datafiles/blender_icons16.png
+ #90 SRC)
data_to_c_simple(../../../../release/datafiles/blender_icons16.png SRC)
+ #svg_to_png(../../../../release/datafiles/blender_icons.svg
+ #../../../../release/datafiles/blender_icons32.png
+ #180 SRC)
data_to_c_simple(../../../../release/datafiles/blender_icons32.png SRC)
+ #svg_to_png(../../../../release/datafiles/prvicons.svg
+ #../../../../release/datafiles/prvicons.png
+ #90 SRC)
data_to_c_simple(../../../../release/datafiles/prvicons.png SRC)
# brushes
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index 99157b074fd..0298699fac5 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -106,8 +106,8 @@ bGPdata **gpencil_data_get_pointers(const bContext *C, PointerRNA *ptr)
/* TODO: we can include other data-types such as bones later if need be... */
- /* just in case no active object */
- if (ob) {
+ /* just in case no active/selected object */
+ if (ob && (ob->flag & SELECT)) {
/* for now, as long as there's an object, default to using that in 3D-View */
if (ptr) RNA_id_pointer_create(&ob->id, ptr);
return &ob->gpd;
@@ -192,7 +192,14 @@ bGPdata *gpencil_data_get_active(const bContext *C)
/* needed for offscreen rendering */
bGPdata *gpencil_data_get_active_v3d(Scene *scene)
{
- bGPdata *gpd = scene->basact ? scene->basact->object->gpd : NULL;
+ Base *base = scene->basact;
+ bGPdata *gpd = NULL;
+ /* We have to make sure active object is actually visible and selected, else we must use default scene gpd,
+ * to be consistent with gpencil_data_get_active's behavior.
+ */
+ if (base && (scene->lay & base->lay) && (base->object->flag & SELECT)) {
+ gpd = base->object->gpd;
+ }
return gpd ? gpd : scene->gpd;
}
@@ -447,7 +454,7 @@ static void gp_strokepoint_convertcoords(bContext *C, bGPDstroke *gps, bGPDspoin
copy_v3_v3(p3d, &pt->x);
}
else {
- const float *fp = give_cursor(scene, v3d);
+ const float *fp = ED_view3d_cursor3d_get(scene, v3d);
float mvalf[2];
/* get screen coordinate */
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 4c5727f16ed..98fff3d65ce 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -211,7 +211,7 @@ static int gpencil_project_check(tGPsdata *p)
static void gp_get_3d_reference(tGPsdata *p, float vec[3])
{
View3D *v3d = p->sa->spacedata.first;
- const float *fp = give_cursor(p->scene, v3d);
+ const float *fp = ED_view3d_cursor3d_get(p->scene, v3d);
/* the reference point used depends on the owner... */
#if 0 /* XXX: disabled for now, since we can't draw relative to the owner yet */
@@ -1431,7 +1431,7 @@ static void gpencil_draw_exit(bContext *C, wmOperator *op)
gpencil_undo_finish();
/* restore cursor to indicate end of drawing */
- WM_cursor_restore(CTX_wm_window(C));
+ WM_cursor_modal_restore(CTX_wm_window(C));
/* don't assume that operator data exists at all */
if (p) {
@@ -1679,7 +1679,7 @@ static int gpencil_draw_exec(bContext *C, wmOperator *op)
/* loop over the stroke RNA elements recorded (i.e. progress of mouse movement),
* setting the relevant values in context at each step, then applying
*/
- RNA_BEGIN(op->ptr, itemptr, "stroke")
+ RNA_BEGIN (op->ptr, itemptr, "stroke")
{
float mousef[2];
@@ -1764,9 +1764,9 @@ static int gpencil_draw_invoke(bContext *C, wmOperator *op, const wmEvent *event
/* set cursor */
if (p->paintmode == GP_PAINTMODE_ERASER)
- WM_cursor_modal(win, BC_CROSSCURSOR); /* XXX need a better cursor */
+ WM_cursor_modal_set(win, BC_CROSSCURSOR); /* XXX need a better cursor */
else
- WM_cursor_modal(win, BC_PAINTBRUSHCURSOR);
+ WM_cursor_modal_set(win, BC_PAINTBRUSHCURSOR);
/* special hack: if there was an initial event, then we were invoked via a hotkey, and
* painting should start immediately. Otherwise, this was called from a toolbar, in which
diff --git a/source/blender/editors/include/BIF_glutil.h b/source/blender/editors/include/BIF_glutil.h
index 352a74cf172..dd1995a5428 100644
--- a/source/blender/editors/include/BIF_glutil.h
+++ b/source/blender/editors/include/BIF_glutil.h
@@ -221,8 +221,5 @@ void glaDrawImBuf_glsl(struct ImBuf *ibuf, float x, float y, int zoomfilter,
/* Draw imbuf on a screen, preferably using GLSL display transform */
void glaDrawImBuf_glsl_ctx(const struct bContext *C, struct ImBuf *ibuf, float x, float y, int zoomfilter);
-/* Transform buffer from role to scene linear space using GLSL OCIO conversion */
-int glaBufferTransformFromRole_glsl(float *buffer, int width, int height, int role);
-
#endif /* __BIF_GLUTIL_H__ */
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h
index 1de1731b515..61f9cec15d9 100644
--- a/source/blender/editors/include/ED_anim_api.h
+++ b/source/blender/editors/include/ED_anim_api.h
@@ -233,29 +233,29 @@ typedef enum eAnimFilter_Flags {
/* Dopesheet only */
/* 'Scene' channels */
-#define SEL_SCEC(sce) (CHECK_TYPE_INLINE(sce, Scene), ((sce->flag & SCE_DS_SELECTED)))
-#define EXPANDED_SCEC(sce) (CHECK_TYPE_INLINE(sce, Scene), ((sce->flag & SCE_DS_COLLAPSED) == 0))
+#define SEL_SCEC(sce) (CHECK_TYPE_INLINE(sce, Scene *), ((sce->flag & SCE_DS_SELECTED)))
+#define EXPANDED_SCEC(sce) (CHECK_TYPE_INLINE(sce, Scene *), ((sce->flag & SCE_DS_COLLAPSED) == 0))
/* 'Sub-Scene' channels (flags stored in Data block) */
-#define FILTER_WOR_SCED(wo) (CHECK_TYPE_INLINE(wo, World), (wo->flag & WO_DS_EXPAND))
+#define FILTER_WOR_SCED(wo) (CHECK_TYPE_INLINE(wo, World *), (wo->flag & WO_DS_EXPAND))
#define FILTER_LS_SCED(linestyle) ((linestyle->flag & LS_DS_EXPAND))
/* 'Object' channels */
-#define SEL_OBJC(base) (CHECK_TYPE_INLINE(base, Base), ((base->flag & SELECT)))
-#define EXPANDED_OBJC(ob) (CHECK_TYPE_INLINE(ob, Object), ((ob->nlaflag & OB_ADS_COLLAPSED) == 0))
+#define SEL_OBJC(base) (CHECK_TYPE_INLINE(base, Base *), ((base->flag & SELECT)))
+#define EXPANDED_OBJC(ob) (CHECK_TYPE_INLINE(ob, Object *), ((ob->nlaflag & OB_ADS_COLLAPSED) == 0))
/* 'Sub-object' channels (flags stored in Data block) */
-#define FILTER_SKE_OBJD(key) (CHECK_TYPE_INLINE(key, Key), ((key->flag & KEY_DS_EXPAND)))
-#define FILTER_MAT_OBJD(ma) (CHECK_TYPE_INLINE(ma, Material), ((ma->flag & MA_DS_EXPAND)))
-#define FILTER_LAM_OBJD(la) (CHECK_TYPE_INLINE(la, Lamp), ((la->flag & LA_DS_EXPAND)))
-#define FILTER_CAM_OBJD(ca) (CHECK_TYPE_INLINE(ca, Camera), ((ca->flag & CAM_DS_EXPAND)))
-#define FILTER_CUR_OBJD(cu) (CHECK_TYPE_INLINE(cu, Curve), ((cu->flag & CU_DS_EXPAND)))
-#define FILTER_PART_OBJD(part) (CHECK_TYPE_INLINE(part, ParticleSettings), ((part->flag & PART_DS_EXPAND)))
-#define FILTER_MBALL_OBJD(mb) (CHECK_TYPE_INLINE(mb, MetaBall), ((mb->flag2 & MB_DS_EXPAND)))
-#define FILTER_ARM_OBJD(arm) (CHECK_TYPE_INLINE(arm, bArmature), ((arm->flag & ARM_DS_EXPAND)))
-#define FILTER_MESH_OBJD(me) (CHECK_TYPE_INLINE(me, Mesh), ((me->flag & ME_DS_EXPAND)))
-#define FILTER_LATTICE_OBJD(lt) (CHECK_TYPE_INLINE(lt, Lattice), ((lt->flag & LT_DS_EXPAND)))
-#define FILTER_SPK_OBJD(spk) (CHECK_TYPE_INLINE(spk, Speaker), ((spk->flag & SPK_DS_EXPAND)))
+#define FILTER_SKE_OBJD(key) (CHECK_TYPE_INLINE(key, Key *), ((key->flag & KEY_DS_EXPAND)))
+#define FILTER_MAT_OBJD(ma) (CHECK_TYPE_INLINE(ma, Material *), ((ma->flag & MA_DS_EXPAND)))
+#define FILTER_LAM_OBJD(la) (CHECK_TYPE_INLINE(la, Lamp *), ((la->flag & LA_DS_EXPAND)))
+#define FILTER_CAM_OBJD(ca) (CHECK_TYPE_INLINE(ca, Camera *), ((ca->flag & CAM_DS_EXPAND)))
+#define FILTER_CUR_OBJD(cu) (CHECK_TYPE_INLINE(cu, Curve *), ((cu->flag & CU_DS_EXPAND)))
+#define FILTER_PART_OBJD(part) (CHECK_TYPE_INLINE(part, ParticleSettings *), ((part->flag & PART_DS_EXPAND)))
+#define FILTER_MBALL_OBJD(mb) (CHECK_TYPE_INLINE(mb, MetaBall *), ((mb->flag2 & MB_DS_EXPAND)))
+#define FILTER_ARM_OBJD(arm) (CHECK_TYPE_INLINE(arm, bArmature *), ((arm->flag & ARM_DS_EXPAND)))
+#define FILTER_MESH_OBJD(me) (CHECK_TYPE_INLINE(me, Mesh *), ((me->flag & ME_DS_EXPAND)))
+#define FILTER_LATTICE_OBJD(lt) (CHECK_TYPE_INLINE(lt, Lattice *), ((lt->flag & LT_DS_EXPAND)))
+#define FILTER_SPK_OBJD(spk) (CHECK_TYPE_INLINE(spk, Speaker *), ((spk->flag & SPK_DS_EXPAND)))
/* Variable use expanders */
-#define FILTER_NTREE_DATA(ntree) (CHECK_TYPE_INLINE(ntree, bNodeTree), ((ntree->flag & NTREE_DS_EXPAND)))
-#define FILTER_TEX_DATA(tex) (CHECK_TYPE_INLINE(tex, Tex), ((tex->flag & TEX_DS_EXPAND)))
+#define FILTER_NTREE_DATA(ntree) (CHECK_TYPE_INLINE(ntree, bNodeTree *), ((ntree->flag & NTREE_DS_EXPAND)))
+#define FILTER_TEX_DATA(tex) (CHECK_TYPE_INLINE(tex, Tex *), ((tex->flag & TEX_DS_EXPAND)))
/* 'Sub-object/Action' channels (flags stored in Action) */
#define SEL_ACTC(actc) ((actc->flag & ACT_SELECTED))
diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h
index fab179da7bc..e7489e1bc72 100644
--- a/source/blender/editors/include/ED_armature.h
+++ b/source/blender/editors/include/ED_armature.h
@@ -94,15 +94,15 @@ typedef struct EditBone {
/* useful macros */
#define EBONE_VISIBLE(arm, ebone) ( \
- CHECK_TYPE_INLINE(arm, bArmature), \
- CHECK_TYPE_INLINE(ebone, EditBone), \
+ CHECK_TYPE_INLINE(arm, bArmature *), \
+ CHECK_TYPE_INLINE(ebone, EditBone *), \
(((arm)->layer & (ebone)->layer) && !((ebone)->flag & BONE_HIDDEN_A)) \
)
#define EBONE_SELECTABLE(arm, ebone) (EBONE_VISIBLE(arm, ebone) && !(ebone->flag & BONE_UNSELECTABLE))
#define EBONE_EDITABLE(ebone) ( \
- CHECK_TYPE_INLINE(ebone, EditBone), \
+ CHECK_TYPE_INLINE(ebone, EditBone *), \
(((ebone)->flag & BONE_SELECTED) && !((ebone)->flag & BONE_EDITMODE_LOCKED)) \
)
@@ -167,8 +167,8 @@ void ED_armature_ebone_selectflag_disable(EditBone *ebone, int flag);
/* poseobject.c */
void ED_armature_exit_posemode(struct bContext *C, struct Base *base);
void ED_armature_enter_posemode(struct bContext *C, struct Base *base);
-int ED_pose_channel_in_IK_chain(struct Object *ob, struct bPoseChannel *pchan);
void ED_pose_deselectall(struct Object *ob, int test);
+void ED_pose_bone_select(struct Object *ob, struct bPoseChannel *pchan, bool select);
void ED_pose_recalculate_paths(struct Scene *scene, struct Object *ob);
struct Object *ED_pose_object_from_context(struct bContext *C);
diff --git a/source/blender/editors/include/ED_clip.h b/source/blender/editors/include/ED_clip.h
index 541956136bd..27e62928f1b 100644
--- a/source/blender/editors/include/ED_clip.h
+++ b/source/blender/editors/include/ED_clip.h
@@ -63,18 +63,18 @@ int ED_space_clip_get_clip_frame_number(struct SpaceClip *sc);
struct ImBuf *ED_space_clip_get_buffer(struct SpaceClip *sc);
struct ImBuf *ED_space_clip_get_stable_buffer(struct SpaceClip *sc, float loc[2], float *scale, float *angle);
-int ED_space_clip_color_sample(struct SpaceClip *sc, struct ARegion *ar, int mval[2], float r_col[3]);
+bool ED_space_clip_color_sample(struct SpaceClip *sc, struct ARegion *ar, int mval[2], float r_col[3]);
void ED_clip_update_frame(const struct Main *mainp, int cfra);
-int ED_clip_view_selection(const struct bContext *C, struct ARegion *ar, int fit);
+bool ED_clip_view_selection(const struct bContext *C, struct ARegion *ar, bool fit);
void ED_clip_point_undistorted_pos(struct SpaceClip *sc, const float co[2], float r_co[2]);
void ED_clip_point_stable_pos(struct SpaceClip *sc, struct ARegion *ar, float x, float y, float *xr, float *yr);
void ED_clip_point_stable_pos__reverse(struct SpaceClip *sc, struct ARegion *ar, const float co[2], float r_co[2]);
void ED_clip_mouse_pos(struct SpaceClip *sc, struct ARegion *ar, const int mval[2], float co[2]);
-int ED_space_clip_check_show_trackedit(struct SpaceClip *sc);
-int ED_space_clip_check_show_maskedit(struct SpaceClip *sc);
+bool ED_space_clip_check_show_trackedit(struct SpaceClip *sc);
+bool ED_space_clip_check_show_maskedit(struct SpaceClip *sc);
struct MovieClip *ED_space_clip_get_clip(struct SpaceClip *sc);
void ED_space_clip_set_clip(struct bContext *C, struct bScreen *screen, struct SpaceClip *sc, struct MovieClip *clip);
diff --git a/source/blender/editors/include/ED_curve.h b/source/blender/editors/include/ED_curve.h
index 1d26204095c..571788f4f8f 100644
--- a/source/blender/editors/include/ED_curve.h
+++ b/source/blender/editors/include/ED_curve.h
@@ -83,6 +83,7 @@ int CU_select_nth(struct Object *obedit, int nth);
void ED_curve_beztcpy(struct EditNurb *editnurb, struct BezTriple *dst, struct BezTriple *src, int count);
void ED_curve_bpcpy(struct EditNurb *editnurb, struct BPoint *dst, struct BPoint *src, int count);
+struct Nurb *ED_curve_nurbcpy(struct Nurb *src, int count);
int ED_curve_updateAnimPaths(struct Curve *cu);
diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h
index 95fad17274e..dc40efc748b 100644
--- a/source/blender/editors/include/ED_keyframing.h
+++ b/source/blender/editors/include/ED_keyframing.h
@@ -222,6 +222,7 @@ short ANIM_keyingset_context_ok_poll(struct bContext *C, struct KeyingSet *ks);
/* Flags for use by driver creation calls */
typedef enum eCreateDriverFlags {
CREATEDRIVER_WITH_DEFAULT_DVAR = (1 << 0), /* create drivers with a default variable for nicer UI */
+ CREATEDRIVER_WITH_FMODIFIER = (1 << 1), /* create drivers with Generator FModifier (for backwards compat) */
} eCreateDriverFlags;
/* -------- */
diff --git a/source/blender/editors/include/ED_lattice.h b/source/blender/editors/include/ED_lattice.h
index 15e5c3dba8f..6fe1524cb6d 100644
--- a/source/blender/editors/include/ED_lattice.h
+++ b/source/blender/editors/include/ED_lattice.h
@@ -28,8 +28,13 @@
* \ingroup editors
*/
+#ifndef __ED_LATTICE_H__
+#define __ED_LATTICE_H__
+
struct Object;
void free_editLatt(struct Object *ob);
void make_editLatt(struct Object *obedit);
void load_editLatt(struct Object *obedit);
+
+#endif /* __ED_LATTICE_H__ */
diff --git a/source/blender/editors/include/ED_mask.h b/source/blender/editors/include/ED_mask.h
index 420ab24e5e9..8da36f015dc 100644
--- a/source/blender/editors/include/ED_mask.h
+++ b/source/blender/editors/include/ED_mask.h
@@ -48,6 +48,8 @@ void ED_mask_point_pos(struct ScrArea *sa, struct ARegion *ar, float x, float y,
void ED_mask_point_pos__reverse(struct ScrArea *sa, struct ARegion *ar,
float x, float y, float *xr, float *yr);
+void ED_mask_cursor_location_get(struct ScrArea *sa, float cursor[2]);
+
void ED_operatortypes_mask(void);
void ED_keymap_mask(struct wmKeyConfig *keyconf);
void ED_operatormacros_mask(void);
@@ -55,7 +57,7 @@ void ED_operatormacros_mask(void);
/* mask_draw.c */
void ED_mask_draw(const struct bContext *C, const char draw_flag, const char draw_type);
void ED_mask_draw_region(struct Mask *mask, struct ARegion *ar,
- const char draw_flag, const char draw_type,
+ const char draw_flag, const char draw_type, const char overlay_mode,
const int width_i, const int height_i,
const float aspx, const float aspy,
const short do_scale_applied, const short do_draw_cb,
diff --git a/source/blender/editors/include/ED_mball.h b/source/blender/editors/include/ED_mball.h
index da96aba011e..22aec69838b 100644
--- a/source/blender/editors/include/ED_mball.h
+++ b/source/blender/editors/include/ED_mball.h
@@ -37,9 +37,10 @@ struct Object;
struct wmKeyConfig;
void ED_operatortypes_metaball(void);
+void ED_operatormacros_metaball(void);
void ED_keymap_metaball(struct wmKeyConfig *keyconf);
-struct MetaElem *add_metaball_primitive(struct bContext *C, struct Object *obedit, float mat[4][4], float dia, int type, int newname);
+struct MetaElem *add_metaball_primitive(struct bContext *C, struct Object *obedit, float mat[4][4], float dia, int type);
bool mouse_mball(struct bContext *C, const int mval[2], bool extend, bool deselect, bool toggle);
diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h
index f24f9098fcd..9d3404aa29b 100644
--- a/source/blender/editors/include/ED_mesh.h
+++ b/source/blender/editors/include/ED_mesh.h
@@ -97,16 +97,6 @@ void EDBM_mesh_free(struct BMEditMesh *em);
void EDBM_mesh_load(struct Object *ob);
struct DerivedMesh *EDBM_mesh_deform_dm_get(struct BMEditMesh *em);
-void EDBM_index_arrays_ensure(struct BMEditMesh *em, const char htype);
-void EDBM_index_arrays_init(struct BMEditMesh *em, const char htype);
-void EDBM_index_arrays_free(struct BMEditMesh *em);
-#ifndef NDEBUG
-bool EDBM_index_arrays_check(struct BMEditMesh *em);
-#endif
-struct BMVert *EDBM_vert_at_index(struct BMEditMesh *em, int index);
-struct BMEdge *EDBM_edge_at_index(struct BMEditMesh *em, int index);
-struct BMFace *EDBM_face_at_index(struct BMEditMesh *em, int index);
-
/* flushes based on the current select mode. if in vertex select mode,
* verts select/deselect edges and faces, if in edge select mode,
* edges select/deselect faces and vertices, and in face select mode faces select/deselect
@@ -129,16 +119,16 @@ void EDBM_mesh_reveal(struct BMEditMesh *em);
void EDBM_update_generic(struct BMEditMesh *em, const bool do_tessface, const bool is_destructive);
-struct UvElementMap *EDBM_uv_element_map_create(struct BMEditMesh *em, const bool selected, const bool do_islands);
-void EDBM_uv_element_map_free(struct UvElementMap *vmap);
-struct UvElement *ED_uv_element_get(struct UvElementMap *map, struct BMFace *efa, struct BMLoop *l);
+struct UvElementMap *BM_uv_element_map_create(struct BMesh *em, const bool selected, const bool do_islands);
+void BM_uv_element_map_free(struct UvElementMap *vmap);
+struct UvElement *BM_uv_element_get(struct UvElementMap *map, struct BMFace *efa, struct BMLoop *l);
bool EDBM_mtexpoly_check(struct BMEditMesh *em);
struct MTexPoly *EDBM_mtexpoly_active_get(struct BMEditMesh *em, struct BMFace **r_act_efa, const bool sloppy, const bool selected);
-void EDBM_uv_vert_map_free(struct UvVertMap *vmap);
-struct UvMapVert *EDBM_uv_vert_map_at_index(struct UvVertMap *vmap, unsigned int v);
-struct UvVertMap *EDBM_uv_vert_map_create(struct BMEditMesh *em, bool use_select, const float limit[2]);
+void BM_uv_vert_map_free(struct UvVertMap *vmap);
+struct UvMapVert *BM_uv_vert_map_at_index(struct UvVertMap *vmap, unsigned int v);
+struct UvVertMap *BM_uv_vert_map_create(struct BMesh *bm, bool use_select, const float limit[2]);
void EDBM_flag_enable_all(struct BMEditMesh *em, const char hflag);
void EDBM_flag_disable_all(struct BMEditMesh *em, const char hflag);
@@ -152,7 +142,7 @@ void EDBM_select_mirrored(struct BMEditMesh *em, bool extend,
void EDBM_automerge(struct Scene *scene, struct Object *ob, bool update, const char hflag);
bool EDBM_backbuf_border_init(struct ViewContext *vc, short xmin, short ymin, short xmax, short ymax);
-int EDBM_backbuf_check(unsigned int index);
+bool EDBM_backbuf_check(unsigned int index);
void EDBM_backbuf_free(void);
bool EDBM_backbuf_border_mask_init(struct ViewContext *vc, const int mcords[][2], short tot,
@@ -242,8 +232,18 @@ void ED_vgroup_clear(struct Object *ob);
void ED_vgroup_select_by_name(struct Object *ob, const char *name);
bool ED_vgroup_data_create(struct ID *id);
void ED_vgroup_data_clamp_range(struct ID *id, const int total);
-bool ED_vgroup_give_array(struct ID *id, struct MDeformVert **dvert_arr, int *dvert_tot);
-bool ED_vgroup_copy_array(struct Object *ob, struct Object *ob_from);
+bool ED_vgroup_array_get(struct ID *id, struct MDeformVert **dvert_arr, int *dvert_tot);
+bool ED_vgroup_array_copy(struct Object *ob, struct Object *ob_from);
+bool ED_vgroup_parray_alloc(struct ID *id, struct MDeformVert ***dvert_arr, int *dvert_tot,
+ const bool use_vert_sel);
+void ED_vgroup_parray_mirror_sync(struct Object *ob,
+ struct MDeformVert **dvert_array, const int dvert_tot,
+ const bool *vgroup_validmap, const int vgroup_tot);
+void ED_vgroup_parray_mirror_assign(struct Object *ob,
+ struct MDeformVert **dvert_array, const int dvert_tot);
+void ED_vgroup_parray_remove_zero(struct MDeformVert **dvert_array, const int dvert_tot,
+ const bool *vgroup_validmap, const int vgroup_tot,
+ const float epsilon, const bool keep_single);
void ED_vgroup_mirror(struct Object *ob,
const bool mirror_weights, const bool flip_vgroups,
const bool all_vgroups, const bool use_topology,
@@ -317,6 +317,8 @@ struct BMVert *editbmesh_get_x_mirror_vert(struct Object *ob, struct BMEditMesh
int index, const bool use_topology);
int *mesh_get_x_mirror_faces(struct Object *ob, struct BMEditMesh *em);
+int ED_mesh_mirror_get_vert(struct Object *ob, int index);
+
bool ED_mesh_pick_vert(struct bContext *C, struct Object *ob, const int mval[2], unsigned int *index, int size, bool use_zbuf);
bool ED_mesh_pick_face(struct bContext *C, struct Object *ob, const int mval[2], unsigned int *index, int size);
bool ED_mesh_pick_face_vert(struct bContext *C, struct Object *ob, const int mval[2], unsigned int *index, int size);
diff --git a/source/blender/editors/include/ED_numinput.h b/source/blender/editors/include/ED_numinput.h
index e7d80d96f89..f46332c9a82 100644
--- a/source/blender/editors/include/ED_numinput.h
+++ b/source/blender/editors/include/ED_numinput.h
@@ -27,7 +27,6 @@
#ifndef __ED_NUMINPUT_H__
#define __ED_NUMINPUT_H__
-
/*
* The ctrl value has different meaning:
* 0 : No value has been typed
@@ -59,11 +58,11 @@ typedef struct NumInput {
void initNumInput(NumInput *n);
#define NUM_STR_REP_LEN 20 /* str must be NUM_STR_LEN * (idx_max + 1) length. */
void outputNumInput(NumInput *n, char *str);
-short hasNumInput(NumInput *n);
+bool hasNumInput(const NumInput *n);
void applyNumInput(NumInput *n, float *vec);
-char handleNumInput(NumInput *n, const struct wmEvent *event);
+bool handleNumInput(NumInput *n, const struct wmEvent *event);
#define NUM_MODAL_INCREMENT_UP 18
#define NUM_MODAL_INCREMENT_DOWN 19
-#endif
+#endif /* __ED_NUMINPUT_H__ */
diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h
index 90b131e5acc..0d11108d81f 100644
--- a/source/blender/editors/include/ED_object.h
+++ b/source/blender/editors/include/ED_object.h
@@ -51,6 +51,7 @@ struct Main;
struct Mesh;
struct MetaElem;
struct ModifierData;
+struct HookModifierData;
struct Nurb;
struct Object;
struct ReportList;
@@ -92,7 +93,7 @@ typedef enum eParentType {
PAR_PATH_CONST,
PAR_LATTICE,
PAR_VERTEX,
- PAR_TRIA
+ PAR_VERTEX_TRI
} eParentType;
#ifdef __RNA_TYPES_H__
@@ -101,7 +102,7 @@ extern struct EnumPropertyItem prop_make_parent_types[];
#endif
int ED_object_parent_set(struct ReportList *reports, struct Main *bmain, struct Scene *scene, struct Object *ob,
- struct Object *par, int partype, int xmirror, int keep_transform);
+ struct Object *par, int partype, bool xmirror, bool keep_transform, const int vert_par[3]);
void ED_object_parent_clear(struct Object *ob, int type);
struct Base *ED_object_scene_link(struct Scene *scene, struct Object *ob);
@@ -123,6 +124,7 @@ struct Base *ED_object_add_duplicate(struct Main *bmain, struct Scene *scene, st
void ED_object_parent(struct Object *ob, struct Object *parent, int type, const char *substr);
+bool ED_object_mode_compat_set(struct bContext *C, struct Object *ob, int mode, struct ReportList *reports);
void ED_object_toggle_modes(struct bContext *C, int mode);
/* bitflags for enter/exit editmode */
@@ -140,14 +142,15 @@ void ED_object_rotation_from_view(struct bContext *C, float rot[3]);
void ED_object_base_init_transform(struct bContext *C, struct Base *base, const float loc[3], const float rot[3]);
float ED_object_new_primitive_matrix(struct bContext *C, struct Object *editob,
const float loc[3], const float rot[3], float primmat[4][4],
- int apply_diameter);
+ bool apply_diameter);
-void ED_object_add_generic_props(struct wmOperatorType *ot, int do_editmode);
-int ED_object_add_generic_get_opts(struct bContext *C, struct wmOperator *op, float loc[3], float rot[3],
- bool *enter_editmode, unsigned int *layer, bool *is_view_aligned);
+void ED_object_add_unit_props(struct wmOperatorType *ot);
+void ED_object_add_generic_props(struct wmOperatorType *ot, bool do_editmode);
+bool ED_object_add_generic_get_opts(struct bContext *C, struct wmOperator *op, float loc[3], float rot[3],
+ bool *enter_editmode, unsigned int *layer, bool *is_view_aligned);
struct Object *ED_object_add_type(struct bContext *C, int type, const float loc[3], const float rot[3],
- int enter_editmode, unsigned int layer);
+ bool enter_editmode, unsigned int layer);
void ED_object_single_users(struct Main *bmain, struct Scene *scene, bool full, bool copy_groups);
void ED_object_single_user(struct Main *bmain, struct Scene *scene, struct Object *ob);
@@ -206,6 +209,8 @@ void ED_object_select_linked_by_id(struct bContext *C, struct ID *id);
bool *ED_vgroup_subset_from_select_type(struct Object *ob, enum eVGroupSelect subset_type,
int *r_vgroup_tot, int *r_subset_count);
+void ED_vgroup_subset_to_index_array(const bool *vgroup_validmap, const int vgroup_tot,
+ int *r_vgroup_subset_map);
struct EnumPropertyItem *ED_object_vgroup_selection_itemf_helper(
const struct bContext *C,
diff --git a/source/blender/editors/include/ED_render.h b/source/blender/editors/include/ED_render.h
index bdfbbbb9c74..518bee665ae 100644
--- a/source/blender/editors/include/ED_render.h
+++ b/source/blender/editors/include/ED_render.h
@@ -40,6 +40,7 @@ struct Scene;
struct ScrArea;
struct RegionView3D;
struct RenderEngine;
+struct View3D;
/* render_ops.c */
@@ -51,6 +52,7 @@ void ED_render_id_flush_update(struct Main *bmain, struct ID *id);
void ED_render_engine_changed(struct Main *bmain);
void ED_render_engine_area_exit(struct ScrArea *sa);
void ED_render_scene_update(struct Main *bmain, struct Scene *scene, int updated);
+void ED_render_view3d_shade_update(struct Main *bmain, struct View3D *v3d, struct ScrArea *sa);
void ED_viewport_render_kill_jobs(const struct bContext *C, bool free_database);
diff --git a/source/blender/editors/include/ED_screen_types.h b/source/blender/editors/include/ED_screen_types.h
index 9f42fd042c3..2b02606c6d9 100644
--- a/source/blender/editors/include/ED_screen_types.h
+++ b/source/blender/editors/include/ED_screen_types.h
@@ -79,7 +79,7 @@ typedef enum {
AE_RIGHT_TO_TOPLEFT, /* Region located on the left, _right_ edge is action zone. Region minimized to the top left */
AE_LEFT_TO_TOPRIGHT, /* Region located on the right, _left_ edge is action zone. Region minimized to the top right */
AE_TOP_TO_BOTTOMRIGHT, /* Region located at the bottom, _top_ edge is action zone. Region minimized to the bottom right */
- AE_BOTTOM_TO_TOPLEFT /* Region located at the top, _bottom_edge is action zone. Region minimized to the top left */
+ AE_BOTTOM_TO_TOPLEFT /* Region located at the top, _bottom_ edge is action zone. Region minimized to the top left */
} AZEdge;
/* for editing areas/regions */
@@ -87,10 +87,8 @@ typedef struct AZone {
struct AZone *next, *prev;
ARegion *ar;
int type;
- /* region-azone, which of the edges */
+ /* region-azone, which of the edges (only for AZONE_REGION) */
AZEdge edge;
- /* internal */
- short do_draw;
/* for draw */
short x1, y1, x2, y2;
/* for clip */
diff --git a/source/blender/editors/include/ED_sculpt.h b/source/blender/editors/include/ED_sculpt.h
index a50a8a50eaa..e85f11e5b78 100644
--- a/source/blender/editors/include/ED_sculpt.h
+++ b/source/blender/editors/include/ED_sculpt.h
@@ -37,6 +37,8 @@ struct Object;
struct RegionView3D;
struct wmKeyConfig;
struct wmWindowManager;
+struct ViewContext;
+struct rcti;
/* sculpt.c */
void ED_operatortypes_sculpt(void);
@@ -48,6 +50,8 @@ void ED_sculpt_get_average_stroke(struct Object *ob, float stroke[3]);
int ED_sculpt_minmax(struct bContext *C, float min[3], float max[3]);
int ED_sculpt_mask_layers_ensure(struct Object *ob,
struct MultiresModifierData *mmd);
+int do_sculpt_mask_box_select(struct ViewContext *vc, struct rcti *rect, bool select, bool extend);
+
enum {
ED_SCULPT_MASK_LAYER_CALC_VERT = (1 << 0),
ED_SCULPT_MASK_LAYER_CALC_LOOP = (1 << 1)
diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h
index 81308dd84f2..8ad78630dc7 100644
--- a/source/blender/editors/include/ED_transform.h
+++ b/source/blender/editors/include/ED_transform.h
@@ -103,7 +103,7 @@ enum TfmMode {
* returns 1 if successful, 0 otherwise (usually means there's no selection)
* (if 0 is returns, *vec is unmodified)
* */
-int calculateTransformCenter(struct bContext *C, int centerMode, float cent3d[3], int cent2d[2]);
+int calculateTransformCenter(struct bContext *C, int centerMode, float cent3d[3], float cent2d[2]);
struct TransInfo;
struct ScrArea;
@@ -130,8 +130,6 @@ void ED_getTransformOrientationMatrix(const struct bContext *C, float orientatio
int BIF_countTransformOrientation(const struct bContext *C);
-void BIF_TransformSetUndo(const char *str);
-
/* to be able to add operator properties to other operators */
#define P_MIRROR (1 << 0)
diff --git a/source/blender/editors/include/ED_util.h b/source/blender/editors/include/ED_util.h
index 67f790f0b46..7f642db9fbd 100644
--- a/source/blender/editors/include/ED_util.h
+++ b/source/blender/editors/include/ED_util.h
@@ -78,9 +78,9 @@ void undo_editmode_push(struct bContext *C, const char *name,
void undo_editmode_clear(void);
/* crazyspace.c */
-float *crazyspace_get_mapped_editverts(struct Scene *scene, struct Object *obedit);
-void crazyspace_set_quats_editmesh(struct BMEditMesh *em, float *origcos, float *mappedcos, float *quats);
-void crazyspace_set_quats_mesh(struct Mesh *me, float *origcos, float *mappedcos, float *quats);
+float (*crazyspace_get_mapped_editverts(struct Scene *scene, struct Object *obedit))[3];
+void crazyspace_set_quats_editmesh(struct BMEditMesh *em, float (*origcos)[3], float (*mappedcos)[3], float (*quats)[4]);
+void crazyspace_set_quats_mesh(struct Mesh *me, float (*origcos)[3], float (*mappedcos)[3], float (*quats)[4]);
int sculpt_get_first_deform_matrices(struct Scene *scene, struct Object *ob, float (**deformmats)[3][3], float (**deformcos)[3]);
void crazyspace_build_sculpt(struct Scene *scene, struct Object *ob, float (**deformmats)[3][3], float (**deformcos)[3]);
diff --git a/source/blender/editors/include/ED_uvedit.h b/source/blender/editors/include/ED_uvedit.h
index ffc9e6651bc..735227ae9b5 100644
--- a/source/blender/editors/include/ED_uvedit.h
+++ b/source/blender/editors/include/ED_uvedit.h
@@ -102,7 +102,7 @@ void ED_uvedit_live_unwrap(struct Scene *scene, struct Object *obedit);
void ED_unwrap_lscm(struct Scene *scene, struct Object *obedit, const short sel);
/* uvedit_draw.c */
-void draw_image_cursor(struct SpaceImage *sima, struct ARegion *ar);
+void draw_image_cursor(struct ARegion *ar, const float cursor[2]);
void draw_uvedit_main(struct SpaceImage *sima, struct ARegion *ar, struct Scene *scene, struct Object *obedit, struct Object *obact);
/* uvedit_buttons.c */
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h
index ef50a21c900..0f3106794f5 100644
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@ -82,8 +82,8 @@ typedef struct ViewDepths {
bool damaged;
} ViewDepths;
-float *give_cursor(struct Scene *scene, struct View3D *v3d);
-void ED_view3d_cursor3d_position(struct bContext *C, float fp[3], const int mval[2]);
+float *ED_view3d_cursor3d_get(struct Scene *scene, struct View3D *v3d);
+void ED_view3d_cursor3d_position(struct bContext *C, float fp[3], const int mval[2]);
void ED_view3d_to_m4(float mat[4][4], const float ofs[3], const float quat[4], const float dist);
void ED_view3d_from_m4(float mat[4][4], float ofs[3], float quat[4], float *dist);
@@ -248,7 +248,9 @@ unsigned int view3d_sample_backbuf_rect(struct ViewContext *vc, const int mval[2
unsigned int view3d_sample_backbuf(struct ViewContext *vc, int x, int y);
/* draws and does a 4x4 sample */
-bool ED_view3d_autodist(struct Scene *scene, struct ARegion *ar, struct View3D *v3d, const int mval[2], float mouse_worldloc[3], bool alphaoverride);
+bool ED_view3d_autodist(struct Scene *scene, struct ARegion *ar, struct View3D *v3d,
+ const int mval[2], float mouse_worldloc[3],
+ bool alphaoverride, const float fallback_depth_pt[3]);
/* only draw so ED_view3d_autodist_simple can be called many times after */
void ED_view3d_autodist_init(struct Scene *scene, struct ARegion *ar, struct View3D *v3d, int mode);
@@ -326,6 +328,8 @@ float ED_view3d_offset_distance(float mat[4][4], const float ofs[3], const float
float ED_scene_grid_scale(struct Scene *scene, const char **grid_unit);
float ED_view3d_grid_scale(struct Scene *scene, struct View3D *v3d, const char **grid_unit);
+void ED_scene_draw_fps(struct Scene *scene, struct rcti *rect);
+
/* view matrix properties utilities */
/* unused */
#if 0
@@ -334,4 +338,7 @@ void ED_view3d_operator_properties_viewmat_set(struct bContext *C, struct wmOper
void ED_view3d_operator_properties_viewmat_get(struct wmOperator *op, int *winx, int *winy, float persmat[4][4]);
#endif
+/* render */
+void ED_view3d_shade_update(struct Main *bmain, struct View3D *v3d, struct ScrArea *sa);
+
#endif /* __ED_VIEW3D_H__ */
diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h
index 3929cf9788c..f8e1bbb2413 100644
--- a/source/blender/editors/include/UI_icons.h
+++ b/source/blender/editors/include/UI_icons.h
@@ -49,9 +49,7 @@ DEF_ICON(RADIOBUT_OFF)
DEF_ICON(RADIOBUT_ON)
DEF_ICON(MENU_PANEL)
DEF_ICON(BLENDER)
-#ifndef DEF_ICON_BLANK_SKIP
- DEF_ICON(BLANK003)
-#endif
+DEF_ICON(GRIP)
DEF_ICON(DOT)
#ifndef DEF_ICON_BLANK_SKIP
DEF_ICON(BLANK004)
@@ -75,9 +73,9 @@ DEF_ICON(VIEWZOOM)
DEF_ICON(ZOOMIN)
DEF_ICON(ZOOMOUT)
DEF_ICON(PANEL_CLOSE)
-DEF_ICON(COPY_ID) //ICON_BLANK009
+DEF_ICON(COPY_ID)
DEF_ICON(EYEDROPPER)
-DEF_ICON(LINK_AREA) //ICON_BLANK010
+DEF_ICON(LINK_AREA)
DEF_ICON(AUTO)
DEF_ICON(CHECKBOX_DEHLT)
DEF_ICON(CHECKBOX_HLT)
@@ -138,7 +136,7 @@ DEF_ICON(SCRIPT)
DEF_ICON(PARTICLES)
DEF_ICON(PHYSICS)
DEF_ICON(SPEAKER)
-DEF_ICON(TEXTURE_SHADED) //ICON_BLANK041
+DEF_ICON(TEXTURE_SHADED)
#ifndef DEF_ICON_BLANK_SKIP
DEF_ICON(BLANK042)
DEF_ICON(BLANK043)
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index 9a9cab9b46c..38aad640ee1 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -32,6 +32,7 @@
#ifndef __UI_INTERFACE_H__
#define __UI_INTERFACE_H__
+#include "BLI_compiler_attrs.h"
#include "BLI_sys_types.h" /* size_t */
#include "RNA_types.h"
#include "DNA_userdef_types.h"
@@ -81,6 +82,10 @@ typedef struct uiLayout uiLayout;
/* Defines */
+/* char for splitting strings, aligning shortcuts in menus, users never see */
+#define UI_SEP_CHAR '|'
+#define UI_SEP_CHAR_S "|"
+
/* names */
#define UI_MAX_DRAW_STR 400
#define UI_MAX_NAME_STR 128
@@ -327,30 +332,14 @@ typedef void (*uiMenuHandleFunc)(struct bContext *C, void *arg, int event);
typedef struct uiPopupMenu uiPopupMenu;
-struct uiPopupMenu *uiPupMenuBegin(struct bContext *C, const char *title, int icon)
-#ifdef __GNUC__
-__attribute__((nonnull))
-#endif
-;
+struct uiPopupMenu *uiPupMenuBegin(struct bContext *C, const char *title, int icon) ATTR_NONNULL();
void uiPupMenuEnd(struct bContext *C, struct uiPopupMenu *head);
struct uiLayout *uiPupMenuLayout(uiPopupMenu *head);
-void uiPupMenuOkee(struct bContext *C, const char *opname, const char *str, ...)
-#ifdef __GNUC__
-__attribute__ ((format(printf, 3, 4)))
-#endif
-;
+void uiPupMenuOkee(struct bContext *C, const char *opname, const char *str, ...) ATTR_PRINTF_FORMAT(3, 4);
void uiPupMenuSaveOver(struct bContext *C, struct wmOperator *op, const char *filename);
-void uiPupMenuNotice(struct bContext *C, const char *str, ...)
-#ifdef __GNUC__
-__attribute__ ((format(printf, 2, 3)))
-#endif
-;
-void uiPupMenuError(struct bContext *C, const char *str, ...)
-#ifdef __GNUC__
-__attribute__ ((format(printf, 2, 3)))
-#endif
-;
+void uiPupMenuNotice(struct bContext *C, const char *str, ...) ATTR_PRINTF_FORMAT(2, 3);
+void uiPupMenuError(struct bContext *C, const char *str, ...) ATTR_PRINTF_FORMAT(2, 3);
void uiPupMenuReports(struct bContext *C, struct ReportList *reports);
void uiPupMenuInvoke(struct bContext *C, const char *idname); /* popup registered menu */
@@ -550,11 +539,7 @@ typedef struct uiStringInfo {
/* Note: Expects pointers to uiStringInfo structs as parameters.
* Will fill them with translated strings, when possible.
* Strings in uiStringInfo must be MEM_freeN'ed by caller. */
-void uiButGetStrInfo(struct bContext *C, uiBut *but, ...)
-#ifdef __GNUC__
-__attribute__((sentinel))
-#endif
-;
+void uiButGetStrInfo(struct bContext *C, uiBut *but, ...) ATTR_SENTINEL(0);
/* Edit i18n stuff. */
/* Name of the main py op from i18n addon. */
@@ -845,7 +830,7 @@ void uiTemplateNodeSocket(uiLayout *layout, struct bContext *C, float *color);
#define UI_UL_DEFAULT_CLASS_NAME "UI_UL_list"
void uiTemplateList(uiLayout *layout, struct bContext *C, const char *listtype_name, const char *list_id,
struct PointerRNA *dataptr, const char *propname, struct PointerRNA *active_dataptr,
- const char *active_propname, int rows, int maxrows, int layout_type);
+ const char *active_propname, int rows, int maxrows, int layout_type, int columns);
void uiTemplateNodeLink(uiLayout *layout, struct bNodeTree *ntree, struct bNode *node, struct bNodeSocket *input);
void uiTemplateNodeView(uiLayout *layout, struct bContext *C, struct bNodeTree *ntree, struct bNode *node, struct bNodeSocket *input);
void uiTemplateTextureUser(uiLayout *layout, struct bContext *C);
diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h
index 42e9d892871..0c8a39a6714 100644
--- a/source/blender/editors/include/UI_resources.h
+++ b/source/blender/editors/include/UI_resources.h
@@ -210,6 +210,9 @@ enum {
TH_STITCH_PREVIEW_UNSTITCHABLE,
TH_STITCH_PREVIEW_ACTIVE,
+ TH_UV_SHADOW,
+ TH_UV_OTHERS,
+
TH_FREESTYLE_EDGE_MARK,
TH_FREESTYLE_FACE_MARK,
diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h
index e46334b06e7..c9a19ab4d8e 100644
--- a/source/blender/editors/include/UI_view2d.h
+++ b/source/blender/editors/include/UI_view2d.h
@@ -192,6 +192,7 @@ void UI_view2d_listview_visible_cells(struct View2D *v2d, float columnwidth, flo
void UI_view2d_region_to_view(struct View2D *v2d, float x, float y, float *viewx, float *viewy);
void UI_view2d_view_to_region(struct View2D *v2d, float x, float y, int *regionx, int *regiony);
void UI_view2d_to_region_no_clip(struct View2D *v2d, float x, float y, int *regionx, int *region_y);
+void UI_view2d_to_region_float(struct View2D *v2d, float x, float y, float *regionx, float *regiony);
/* utilities */
struct View2D *UI_view2d_fromcontext(const struct bContext *C);
@@ -215,7 +216,7 @@ void UI_view2d_operatortypes(void);
void UI_view2d_keymap(struct wmKeyConfig *keyconf);
void UI_view2d_smooth_view(struct bContext *C, struct ARegion *ar,
- const struct rctf *cur);
+ const struct rctf *cur, const int smooth_viewtx);
#endif /* __UI_VIEW2D_H__ */
diff --git a/source/blender/editors/interface/CMakeLists.txt b/source/blender/editors/interface/CMakeLists.txt
index a8b8765a5c6..e13517adbb3 100644
--- a/source/blender/editors/interface/CMakeLists.txt
+++ b/source/blender/editors/interface/CMakeLists.txt
@@ -40,6 +40,7 @@ set(SRC
interface.c
interface_anim.c
interface_draw.c
+ interface_eyedropper.c
interface_handlers.c
interface_icons.c
interface_layout.c
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 21a63183c1a..16e92f2bc18 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -611,6 +611,9 @@ static void ui_but_update_linklines(uiBlock *block, uiBut *oldbut, uiBut *newbut
static int ui_but_update_from_old_block(const bContext *C, uiBlock *block, uiBut **butpp)
{
+ /* flags from the buttons we want to refresh, may want to add more here... */
+ const int flag_copy = UI_BUT_REDALERT;
+
uiBlock *oldblock;
uiBut *oldbut, *but = *butpp;
int found = 0;
@@ -659,6 +662,7 @@ static int ui_but_update_from_old_block(const bContext *C, uiBlock *block, uiBut
/* drawing */
oldbut->icon = but->icon;
oldbut->iconadd = but->iconadd;
+ oldbut->alignnr = but->alignnr;
/* typically the same pointers, but not on undo/redo */
/* XXX some menu buttons store button itself in but->poin. Ugly */
@@ -667,6 +671,8 @@ static int ui_but_update_from_old_block(const bContext *C, uiBlock *block, uiBut
SWAP(void *, oldbut->func_argN, but->func_argN);
}
+ oldbut->flag = (oldbut->flag & ~flag_copy) | (but->flag & flag_copy);
+
/* copy hardmin for list rows to prevent 'sticking' highlight to mouse position
* when scrolling without moving mouse (see [#28432]) */
if (ELEM(oldbut->type, ROW, LISTROW))
@@ -837,7 +843,7 @@ void ui_but_add_shortcut(uiBut *but, const char *shortcut_str, const bool do_str
{
if (do_strip) {
- char *cpoin = strchr(but->str, '|');
+ char *cpoin = strchr(but->str, UI_SEP_CHAR);
if (cpoin) {
*cpoin = '\0';
}
@@ -855,7 +861,7 @@ void ui_but_add_shortcut(uiBut *but, const char *shortcut_str, const bool do_str
}
BLI_snprintf(but->strdata,
sizeof(but->strdata),
- "%s|%s",
+ "%s" UI_SEP_CHAR_S "%s",
butstr_orig, shortcut_str);
MEM_freeN(butstr_orig);
but->str = but->strdata;
@@ -962,10 +968,12 @@ static bool ui_but_event_property_operator_string(const bContext *C, uiBut *but,
data_path = BLI_sprintfN("scene.%s", path);
MEM_freeN(path);
}
- /*else {
- printf("ERROR in %s(): Couldn't get path for scene property - %s\n",
+#if 0
+ else {
+ printf("ERROR in %s(): Couldn't get path for scene property - %s\n",
__func__, RNA_property_identifier(but->rnaprop));
- }*/
+ }
+#endif
}
}
else {
@@ -985,7 +993,7 @@ static bool ui_but_event_property_operator_string(const bContext *C, uiBut *but,
IDPropertyTemplate val = {0};
prop_path = IDP_New(IDP_GROUP, &val, __func__);
- prop_path_value = IDP_NewString(data_path, "data_path", strlen(data_path) + 1); /* len + 1, or else will be truncated */
+ prop_path_value = IDP_NewString(data_path, "data_path", strlen(data_path) + 1);
IDP_AddToGroup(prop_path, prop_path_value);
/* check each until one works... */
@@ -1644,19 +1652,19 @@ void ui_set_but_val(uiBut *but, double value)
if (RNA_property_editable(&but->rnapoin, prop)) {
switch (RNA_property_type(prop)) {
case PROP_BOOLEAN:
- if (RNA_property_array_length(&but->rnapoin, prop))
+ if (RNA_property_array_check(prop))
RNA_property_boolean_set_index(&but->rnapoin, prop, but->rnaindex, value);
else
RNA_property_boolean_set(&but->rnapoin, prop, value);
break;
case PROP_INT:
- if (RNA_property_array_length(&but->rnapoin, prop))
+ if (RNA_property_array_check(prop))
RNA_property_int_set_index(&but->rnapoin, prop, but->rnaindex, (int)value);
else
RNA_property_int_set(&but->rnapoin, prop, (int)value);
break;
case PROP_FLOAT:
- if (RNA_property_array_length(&but->rnapoin, prop))
+ if (RNA_property_array_check(prop))
RNA_property_float_set_index(&but->rnapoin, prop, but->rnaindex, value);
else
RNA_property_float_set(&but->rnapoin, prop, value);
@@ -1807,12 +1815,14 @@ static void ui_get_but_string_unit(uiBut *but, char *str, int len_max, double va
static float ui_get_but_step_unit(uiBut *but, float step_default)
{
int unit_type = RNA_SUBTYPE_UNIT_VALUE(uiButGetUnitType(but));
- float step;
+ double step;
step = bUnit_ClosestScalar(ui_get_but_scale_unit(but, step_default), but->block->unit->system, unit_type);
- if (step > 0.0f) { /* -1 is an error value */
- return (float)((double)step / ui_get_but_scale_unit(but, 1.0)) * 100.0f;
+ /* -1 is an error value */
+ if (step != -1.0) {
+ BLI_assert(step > 0.0);
+ return (float)(step / ui_get_but_scale_unit(but, 1.0)) * 100.0f;
}
else {
return step_default;
@@ -2047,13 +2057,14 @@ bool ui_set_but_string(bContext *C, uiBut *but, const char *str)
return false;
}
-void ui_set_but_default(bContext *C, short all)
+void ui_set_but_default(bContext *C, const bool all)
{
+ const char *opstring = "UI_OT_reset_default_button";
PointerRNA ptr;
- WM_operator_properties_create(&ptr, "UI_OT_reset_default_button");
+ WM_operator_properties_create(&ptr, opstring);
RNA_boolean_set(&ptr, "all", all);
- WM_operator_name_call(C, "UI_OT_reset_default_button", WM_OP_EXEC_DEFAULT, &ptr);
+ WM_operator_name_call(C, opstring, WM_OP_EXEC_DEFAULT, &ptr);
WM_operator_properties_free(&ptr);
}
@@ -2230,8 +2241,7 @@ void uiFreeBlock(const bContext *C, uiBlock *block)
{
uiBut *but;
- while ( (but = block->buttons.first) ) {
- BLI_remlink(&block->buttons, but);
+ while ((but = BLI_pophead(&block->buttons))) {
ui_free_but(C, but);
}
@@ -2255,8 +2265,7 @@ void uiFreeBlocks(const bContext *C, ListBase *lb)
{
uiBlock *block;
- while ( (block = lb->first) ) {
- BLI_remlink(lb, block);
+ while ((block = BLI_pophead(lb))) {
uiFreeBlock(C, block);
}
}
@@ -2866,7 +2875,7 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, const char *str,
}
/* keep track of UI_interface.h */
- if (ELEM8(but->type, BLOCK, BUT, LABEL, PULLDOWN, ROUNDBOX, BUTM, SCROLL, SEPR)) {}
+ if (ELEM9(but->type, BLOCK, BUT, LABEL, PULLDOWN, ROUNDBOX, LISTBOX, BUTM, SCROLL, SEPR)) {}
else if (but->type >= SEARCH_MENU) {}
else but->flag |= UI_BUT_UNDO;
@@ -3024,7 +3033,7 @@ static uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, const char *s
but->rnapoin = *ptr;
but->rnaprop = prop;
- if (RNA_property_array_length(&but->rnapoin, but->rnaprop))
+ if (RNA_property_array_check(but->rnaprop))
but->rnaindex = index;
else
but->rnaindex = 0;
@@ -3149,9 +3158,14 @@ uiBut *uiDefBut(uiBlock *block, int type, int retval, const char *str, int x, in
return but;
}
-/* if _x_ is a power of two (only one bit) return the power,
+/**
+ * if \a _x_ is a power of two (only one bit) return the power,
* otherwise return -1.
- * (1<<findBitIndex(x))==x for powers of two.
+ *
+ * for powers of two:
+ * \code{.c}
+ * ((1 << findBitIndex(x)) == x);
+ * \endcode
*/
static int findBitIndex(unsigned int x)
{
@@ -4177,5 +4191,6 @@ void UI_reinit_font(void)
void UI_exit(void)
{
ui_resources_free();
+ ui_button_clipboard_free();
}
diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c
index 3feb563d3ee..5b6b889a6c6 100644
--- a/source/blender/editors/interface/interface_anim.c
+++ b/source/blender/editors/interface/interface_anim.c
@@ -144,7 +144,7 @@ int ui_but_anim_expression_create(uiBut *but, const char *str)
return 0;
}
- if (RNA_property_array_length(&but->rnapoin, but->rnaprop) != 0) {
+ if (RNA_property_array_check(but->rnaprop) != 0) {
if (but->rnaindex == -1) {
if (G.debug & G_DEBUG)
printf("ERROR: create expression failed - can't create expression for entire array\n");
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index cd845da10c6..11062ea2bd2 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -1389,7 +1389,7 @@ void ui_draw_but_TRACKPREVIEW(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wc
if (scopes->track_disabled) {
glColor4f(0.7f, 0.3f, 0.3f, 0.3f);
- uiSetRoundBox(15);
+ uiSetRoundBox(UI_CNR_ALL);
uiDrawBox(GL_POLYGON, rect.xmin - 1, rect.ymin, rect.xmax + 1, rect.ymax + 1, 3.0f);
ok = 1;
@@ -1437,7 +1437,7 @@ void ui_draw_but_TRACKPREVIEW(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wc
if (scopes->use_track_mask) {
glColor4f(0.0f, 0.0f, 0.0f, 0.3f);
- uiSetRoundBox(15);
+ uiSetRoundBox(UI_CNR_ALL);
uiDrawBox(GL_POLYGON, rect.xmin - 1, rect.ymin, rect.xmax + 1, rect.ymax + 1, 3.0f);
}
@@ -1478,7 +1478,7 @@ void ui_draw_but_TRACKPREVIEW(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wc
if (!ok) {
glColor4f(0.f, 0.f, 0.f, 0.3f);
- uiSetRoundBox(15);
+ uiSetRoundBox(UI_CNR_ALL);
uiDrawBox(GL_POLYGON, rect.xmin - 1, rect.ymin, rect.xmax + 1, rect.ymax + 1, 3.0f);
}
diff --git a/source/blender/editors/interface/interface_eyedropper.c b/source/blender/editors/interface/interface_eyedropper.c
new file mode 100644
index 00000000000..783a777a2fe
--- /dev/null
+++ b/source/blender/editors/interface/interface_eyedropper.c
@@ -0,0 +1,642 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2009 Blender Foundation.
+ * All rights reserved.
+ *
+ * Contributor(s): Blender Foundation, Joshua Leung
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/editors/interface/interface_eyedropper.c
+ * \ingroup edinterface
+ */
+
+#include "MEM_guardedalloc.h"
+
+#include "DNA_space_types.h"
+#include "DNA_screen_types.h"
+#include "DNA_object_types.h"
+
+#include "BLI_blenlib.h"
+#include "BLI_math_vector.h"
+
+#include "BKE_context.h"
+#include "BKE_screen.h"
+#include "BKE_report.h"
+#include "BKE_idcode.h"
+
+#include "RNA_access.h"
+
+#include "BIF_gl.h"
+
+#include "UI_interface.h"
+
+#include "IMB_colormanagement.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
+#include "interface_intern.h"
+
+/* for HDR color sampling */
+#include "ED_image.h"
+#include "ED_node.h"
+#include "ED_clip.h"
+
+/* for ID data eyedropper */
+#include "ED_space_api.h"
+#include "ED_screen.h"
+#include "ED_view3d.h"
+
+
+/* -------------------------------------------------------------------- */
+/* Eyedropper
+ */
+
+/** \name Eyedropper (RGB Color)
+ * \{ */
+
+typedef struct Eyedropper {
+ struct ColorManagedDisplay *display;
+
+ PointerRNA ptr;
+ PropertyRNA *prop;
+ int index;
+
+ int accum_start; /* has mouse been presed */
+ float accum_col[3];
+ int accum_tot;
+} Eyedropper;
+
+static int eyedropper_init(bContext *C, wmOperator *op)
+{
+ Scene *scene = CTX_data_scene(C);
+ Eyedropper *eye;
+
+ op->customdata = eye = MEM_callocN(sizeof(Eyedropper), "Eyedropper");
+
+ uiContextActiveProperty(C, &eye->ptr, &eye->prop, &eye->index);
+
+ if ((eye->ptr.data == NULL) ||
+ (eye->prop == NULL) ||
+ (RNA_property_editable(&eye->ptr, eye->prop) == FALSE) ||
+ (RNA_property_array_length(&eye->ptr, eye->prop) < 3) ||
+ (RNA_property_type(eye->prop) != PROP_FLOAT))
+ {
+ return FALSE;
+ }
+
+ if (RNA_property_subtype(eye->prop) == PROP_COLOR) {
+ const char *display_device;
+
+ display_device = scene->display_settings.display_device;
+ eye->display = IMB_colormanagement_display_get_named(display_device);
+ }
+
+ return TRUE;
+}
+
+static void eyedropper_exit(bContext *C, wmOperator *op)
+{
+ WM_cursor_modal_restore(CTX_wm_window(C));
+
+ if (op->customdata) {
+ MEM_freeN(op->customdata);
+ op->customdata = NULL;
+ }
+}
+
+static int eyedropper_cancel(bContext *C, wmOperator *op)
+{
+ eyedropper_exit(C, op);
+ return OPERATOR_CANCELLED;
+}
+
+/* *** eyedropper_color_ helper functions *** */
+
+/**
+ * \brief get the color from the screen.
+ *
+ * Special check for image or nodes where we MAY have HDR pixels which don't display.
+ */
+static void eyedropper_color_sample_fl(bContext *C, Eyedropper *UNUSED(eye), int mx, int my, float r_col[3])
+{
+
+ /* we could use some clever */
+ wmWindow *win = CTX_wm_window(C);
+ ScrArea *sa;
+ for (sa = win->screen->areabase.first; sa; sa = sa->next) {
+ if (BLI_rcti_isect_pt(&sa->totrct, mx, my)) {
+ if (sa->spacetype == SPACE_IMAGE) {
+ ARegion *ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
+ if (ar && BLI_rcti_isect_pt(&ar->winrct, mx, my)) {
+ SpaceImage *sima = sa->spacedata.first;
+ int mval[2] = {mx - ar->winrct.xmin,
+ my - ar->winrct.ymin};
+
+ if (ED_space_image_color_sample(sima, ar, mval, r_col)) {
+ return;
+ }
+ }
+ }
+ else if (sa->spacetype == SPACE_NODE) {
+ ARegion *ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
+ if (ar && BLI_rcti_isect_pt(&ar->winrct, mx, my)) {
+ SpaceNode *snode = sa->spacedata.first;
+ int mval[2] = {mx - ar->winrct.xmin,
+ my - ar->winrct.ymin};
+
+ if (ED_space_node_color_sample(snode, ar, mval, r_col)) {
+ return;
+ }
+ }
+ }
+ else if (sa->spacetype == SPACE_CLIP) {
+ ARegion *ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
+ if (ar && BLI_rcti_isect_pt(&ar->winrct, mx, my)) {
+ SpaceClip *sc = sa->spacedata.first;
+ int mval[2] = {mx - ar->winrct.xmin,
+ my - ar->winrct.ymin};
+
+ if (ED_space_clip_color_sample(sc, ar, mval, r_col)) {
+ return;
+ }
+ }
+ }
+ }
+ }
+
+ /* fallback to simple opengl picker */
+ glReadBuffer(GL_FRONT);
+ glReadPixels(mx, my, 1, 1, GL_RGB, GL_FLOAT, r_col);
+ glReadBuffer(GL_BACK);
+}
+
+/* sets the sample color RGB, maintaining A */
+static void eyedropper_color_set(bContext *C, Eyedropper *eye, const float col[3])
+{
+ float col_conv[4];
+
+ /* to maintain alpha */
+ RNA_property_float_get_array(&eye->ptr, eye->prop, col_conv);
+
+ /* convert from display space to linear rgb space */
+ if (eye->display) {
+ copy_v3_v3(col_conv, col);
+ IMB_colormanagement_display_to_scene_linear_v3(col_conv, eye->display);
+ }
+ else {
+ copy_v3_v3(col_conv, col);
+ }
+
+ RNA_property_float_set_array(&eye->ptr, eye->prop, col_conv);
+
+ RNA_property_update(C, &eye->ptr, eye->prop);
+}
+
+/* set sample from accumulated values */
+static void eyedropper_color_set_accum(bContext *C, Eyedropper *eye)
+{
+ float col[3];
+ mul_v3_v3fl(col, eye->accum_col, 1.0f / (float)eye->accum_tot);
+ eyedropper_color_set(C, eye, col);
+}
+
+/* single point sample & set */
+static void eyedropper_color_sample(bContext *C, Eyedropper *eye, int mx, int my)
+{
+ float col[3];
+ eyedropper_color_sample_fl(C, eye, mx, my, col);
+ eyedropper_color_set(C, eye, col);
+}
+
+static void eyedropper_color_sample_accum(bContext *C, Eyedropper *eye, int mx, int my)
+{
+ float col[3];
+ eyedropper_color_sample_fl(C, eye, mx, my, col);
+ /* delay linear conversion */
+ add_v3_v3(eye->accum_col, col);
+ eye->accum_tot++;
+}
+
+/* main modal status check */
+static int eyedropper_modal(bContext *C, wmOperator *op, const wmEvent *event)
+{
+ Eyedropper *eye = (Eyedropper *)op->customdata;
+
+ switch (event->type) {
+ case ESCKEY:
+ case RIGHTMOUSE:
+ return eyedropper_cancel(C, op);
+ case LEFTMOUSE:
+ if (event->val == KM_RELEASE) {
+ if (eye->accum_tot == 0) {
+ eyedropper_color_sample(C, eye, event->x, event->y);
+ }
+ else {
+ eyedropper_color_set_accum(C, eye);
+ }
+ eyedropper_exit(C, op);
+ return OPERATOR_FINISHED;
+ }
+ else if (event->val == KM_PRESS) {
+ /* enable accum and make first sample */
+ eye->accum_start = TRUE;
+ eyedropper_color_sample_accum(C, eye, event->x, event->y);
+ }
+ break;
+ case MOUSEMOVE:
+ if (eye->accum_start) {
+ /* button is pressed so keep sampling */
+ eyedropper_color_sample_accum(C, eye, event->x, event->y);
+ eyedropper_color_set_accum(C, eye);
+ }
+ break;
+ case SPACEKEY:
+ if (event->val == KM_RELEASE) {
+ eye->accum_tot = 0;
+ zero_v3(eye->accum_col);
+ eyedropper_color_sample_accum(C, eye, event->x, event->y);
+ eyedropper_color_set_accum(C, eye);
+ }
+ break;
+ }
+
+ return OPERATOR_RUNNING_MODAL;
+}
+
+/* Modal Operator init */
+static int eyedropper_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
+{
+ /* init */
+ if (eyedropper_init(C, op)) {
+ WM_cursor_modal_set(CTX_wm_window(C), BC_EYEDROPPER_CURSOR);
+
+ /* add temp handler */
+ WM_event_add_modal_handler(C, op);
+
+ return OPERATOR_RUNNING_MODAL;
+ }
+ else {
+ eyedropper_exit(C, op);
+ return OPERATOR_CANCELLED;
+ }
+}
+
+/* Repeat operator */
+static int eyedropper_exec(bContext *C, wmOperator *op)
+{
+ /* init */
+ if (eyedropper_init(C, op)) {
+
+ /* do something */
+
+ /* cleanup */
+ eyedropper_exit(C, op);
+
+ return OPERATOR_FINISHED;
+ }
+ else {
+ return OPERATOR_CANCELLED;
+ }
+}
+
+static int eyedropper_poll(bContext *C)
+{
+ if (!CTX_wm_window(C)) return 0;
+ else return 1;
+}
+
+void UI_OT_eyedropper_color(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Eyedropper";
+ ot->idname = "UI_OT_eyedropper_color";
+ ot->description = "Sample a color from the Blender Window to store in a property";
+
+ /* api callbacks */
+ ot->invoke = eyedropper_invoke;
+ ot->modal = eyedropper_modal;
+ ot->cancel = eyedropper_cancel;
+ ot->exec = eyedropper_exec;
+ ot->poll = eyedropper_poll;
+
+ /* flags */
+ ot->flag = OPTYPE_BLOCKING;
+
+ /* properties */
+}
+/** \} */
+
+
+/* -------------------------------------------------------------------- */
+/* Data Dropper
+ *
+ * note: datadropper is only internal name to avoid confusion in this file
+ */
+
+/** \name Eyedropper (ID data-blocks)
+ * \{ */
+
+typedef struct DataDropper {
+ PointerRNA ptr;
+ PropertyRNA *prop;
+ short idcode;
+ const char *idcode_name;
+
+ ARegionType *art;
+ void *draw_handle_pixel;
+ char name[200];
+} DataDropper;
+
+
+static void datadropper_draw_cb(const struct bContext *C, ARegion *ar, void *arg)
+{
+ DataDropper *ddr = arg;
+ int width;
+ const char *name = ddr->name;
+ wmWindow *win = CTX_wm_window(C);
+ int x = win->eventstate->x;
+ int y = win->eventstate->y;
+
+ if ((name[0] == '\0') ||
+ (BLI_rcti_isect_pt(&ar->winrct, x, y) == false))
+ {
+ return;
+ }
+
+ width = UI_GetStringWidth(name);
+ x = x - ar->winrct.xmin;
+ y = y - ar->winrct.ymin;
+
+ y += 20;
+
+ glColor4ub(0, 0, 0, 50);
+
+ uiSetRoundBox(UI_CNR_ALL | UI_RB_ALPHA);
+ uiRoundBox(x, y, x + width + 8, y + 15, 4);
+
+ glColor4ub(255, 255, 255, 255);
+ UI_DrawString(x + 4, y + 4, name);
+}
+
+
+static int datadropper_init(bContext *C, wmOperator *op)
+{
+ DataDropper *ddr;
+ int index_dummy;
+ StructRNA *type;
+
+ SpaceType *st;
+ ARegionType *art;
+
+ st = BKE_spacetype_from_id(SPACE_VIEW3D);
+ art = BKE_regiontype_from_id(st, RGN_TYPE_WINDOW);
+
+ op->customdata = ddr = MEM_callocN(sizeof(DataDropper), "DataDropper");
+
+ uiContextActiveProperty(C, &ddr->ptr, &ddr->prop, &index_dummy);
+
+ if ((ddr->ptr.data == NULL) ||
+ (ddr->prop == NULL) ||
+ (RNA_property_editable(&ddr->ptr, ddr->prop) == false) ||
+ (RNA_property_type(ddr->prop) != PROP_POINTER))
+ {
+ return false;
+ }
+
+ ddr->art = art;
+ ddr->draw_handle_pixel = ED_region_draw_cb_activate(art, datadropper_draw_cb, ddr, REGION_DRAW_POST_PIXEL);
+
+ type = RNA_property_pointer_type(&ddr->ptr, ddr->prop);
+ ddr->idcode = RNA_type_to_ID_code(type);
+ BLI_assert(ddr->idcode != 0);
+ ddr->idcode_name = BKE_idcode_to_name(ddr->idcode);
+
+ return true;
+}
+
+static void datadropper_exit(bContext *C, wmOperator *op)
+{
+ WM_cursor_modal_restore(CTX_wm_window(C));
+
+ if (op->customdata) {
+ DataDropper *ddr = (DataDropper *)op->customdata;
+
+ ED_region_draw_cb_exit(ddr->art, ddr->draw_handle_pixel);
+
+ MEM_freeN(op->customdata);
+
+ op->customdata = NULL;
+ }
+}
+
+static int datadropper_cancel(bContext *C, wmOperator *op)
+{
+ datadropper_exit(C, op);
+ return OPERATOR_CANCELLED;
+}
+
+/* *** datadropper id helper functions *** */
+/**
+ * \brief get the ID from the screen.
+ *
+ */
+static void datadropper_id_sample_pt(bContext *C, DataDropper *ddr, int mx, int my, ID **r_id)
+{
+
+ /* we could use some clever */
+ wmWindow *win = CTX_wm_window(C);
+ ScrArea *sa;
+
+ ScrArea *area_prev = CTX_wm_area(C);
+ ARegion *ar_prev = CTX_wm_region(C);
+
+ ddr->name[0] = '\0';
+
+ for (sa = win->screen->areabase.first; sa; sa = sa->next) {
+ if (BLI_rcti_isect_pt(&sa->totrct, mx, my)) {
+ if (sa->spacetype == SPACE_VIEW3D) {
+ ARegion *ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
+ if (ar && BLI_rcti_isect_pt(&ar->winrct, mx, my)) {
+ int mval[2] = {mx - ar->winrct.xmin,
+ my - ar->winrct.ymin};
+ Base *base;
+
+ CTX_wm_area_set(C, sa);
+ CTX_wm_region_set(C, ar);
+
+ /* grr, always draw else we leave stale text */
+ ED_region_tag_redraw(ar);
+
+ base = ED_view3d_give_base_under_cursor(C, mval);
+ if (base) {
+ Object *ob = base->object;
+ ID *id = NULL;
+ if (ddr->idcode == ID_OB) {
+ id = (ID *)ob;
+ }
+ else if (ob->data) {
+ if (GS(((ID *)ob->data)->name) == ddr->idcode) {
+ id = (ID *)ob->data;
+ }
+ else {
+ BLI_snprintf(ddr->name, sizeof(ddr->name), "Incompatible, expected a %s",
+ ddr->idcode_name);
+ }
+ }
+
+ if (id) {
+ BLI_snprintf(ddr->name, sizeof(ddr->name), "%s: %s",
+ ddr->idcode_name, id->name + 2);
+ *r_id = id;
+ }
+
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ CTX_wm_area_set(C, area_prev);
+ CTX_wm_region_set(C, ar_prev);
+}
+
+/* sets the ID, returns success */
+static bool datadropper_id_set(bContext *C, DataDropper *ddr, ID *id)
+{
+ PointerRNA ptr_value;
+
+ RNA_id_pointer_create(id, &ptr_value);
+
+ RNA_property_pointer_set(&ddr->ptr, ddr->prop, ptr_value);
+
+ RNA_property_update(C, &ddr->ptr, ddr->prop);
+
+ ptr_value = RNA_property_pointer_get(&ddr->ptr, ddr->prop);
+
+ return (ptr_value.id.data == id);
+}
+
+/* single point sample & set */
+static bool datadropper_id_sample(bContext *C, DataDropper *ddr, int mx, int my)
+{
+ ID *id = NULL;
+
+ datadropper_id_sample_pt(C, ddr, mx, my, &id);
+ return datadropper_id_set(C, ddr, id);
+}
+
+/* main modal status check */
+static int datadropper_modal(bContext *C, wmOperator *op, const wmEvent *event)
+{
+ DataDropper *ddr = (DataDropper *)op->customdata;
+
+ switch (event->type) {
+ case ESCKEY:
+ case RIGHTMOUSE:
+ return datadropper_cancel(C, op);
+ case LEFTMOUSE:
+ if (event->val == KM_RELEASE) {
+ bool success;
+
+ success = datadropper_id_sample(C, ddr, event->x, event->y);
+ datadropper_exit(C, op);
+
+ if (success) {
+ return OPERATOR_FINISHED;
+ }
+ else {
+ BKE_report(op->reports, RPT_WARNING, "Failed to set value");
+ return OPERATOR_CANCELLED;
+ }
+ }
+ break;
+ case MOUSEMOVE:
+ {
+ ID *id = NULL;
+ datadropper_id_sample_pt(C, ddr, event->x, event->y, &id);
+ break;
+ }
+ }
+
+ return OPERATOR_RUNNING_MODAL;
+}
+
+/* Modal Operator init */
+static int datadropper_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
+{
+ /* init */
+ if (datadropper_init(C, op)) {
+ WM_cursor_modal_set(CTX_wm_window(C), BC_EYEDROPPER_CURSOR);
+
+ /* add temp handler */
+ WM_event_add_modal_handler(C, op);
+
+ return OPERATOR_RUNNING_MODAL;
+ }
+ else {
+ datadropper_exit(C, op);
+ return OPERATOR_CANCELLED;
+ }
+}
+
+/* Repeat operator */
+static int datadropper_exec(bContext *C, wmOperator *op)
+{
+ /* init */
+ if (datadropper_init(C, op)) {
+ /* cleanup */
+ datadropper_exit(C, op);
+
+ return OPERATOR_FINISHED;
+ }
+ else {
+ return OPERATOR_CANCELLED;
+ }
+}
+
+static int datadropper_poll(bContext *C)
+{
+ if (!CTX_wm_window(C)) return 0;
+ else return 1;
+}
+
+void UI_OT_eyedropper_id(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Eyedropper Datablock";
+ ot->idname = "UI_OT_eyedropper_id";
+ ot->description = "Sample a color from the Blender Window to store in a property";
+
+ /* api callbacks */
+ ot->invoke = datadropper_invoke;
+ ot->modal = datadropper_modal;
+ ot->cancel = datadropper_cancel;
+ ot->exec = datadropper_exec;
+ ot->poll = datadropper_poll;
+
+ /* flags */
+ ot->flag = OPTYPE_BLOCKING;
+
+ /* properties */
+}
+
+/** \} */
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index f9ee2b67e6b..7e9c90d51a1 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -152,7 +152,9 @@ typedef struct uiHandleButtonData {
char *str, *origstr;
double value, origvalue, startvalue;
float vec[3], origvec[3];
+#if 0 /* UNUSED */
int togdual, togonly;
+#endif
ColorBand *coba;
/* tooltip */
@@ -170,6 +172,7 @@ typedef struct uiHandleButtonData {
/* coords are Window/uiBlock relative (depends on the button) */
int draglastx, draglasty;
int dragstartx, dragstarty;
+ int draglastvalue;
bool dragchange, draglock;
int dragsel;
float dragf, dragfstart;
@@ -239,7 +242,29 @@ static int ui_handler_region_menu(bContext *C, const wmEvent *event, void *userd
static void ui_handle_button_activate(bContext *C, ARegion *ar, uiBut *but, uiButtonActivateType type);
static void button_timers_tooltip_remove(bContext *C, uiBut *but);
+/* buttons clipboard */
+static ColorBand but_copypaste_coba = {0};
+static CurveMapping but_copypaste_curve = {0};
+static bool but_copypaste_curve_alive = false;
+
/* ******************** menu navigation helpers ************** */
+enum eSnapType {
+ SNAP_OFF = 0,
+ SNAP_ON,
+ SNAP_ON_SMALL,
+};
+
+static enum eSnapType ui_event_to_snap(const wmEvent *event)
+{
+ return (event->ctrl) ? (event->shift) ? SNAP_ON_SMALL : SNAP_ON : SNAP_OFF;
+}
+
+static void ui_color_snap_hue(const enum eSnapType snap, float *r_hue)
+{
+ const float snap_increment = (snap == SNAP_ON_SMALL) ? 24 : 12;
+ BLI_assert(snap != SNAP_OFF);
+ *r_hue = floorf(0.5f + ((*r_hue) * snap_increment)) / snap_increment;
+}
/* assumes event type is MOUSEPAN */
void ui_pan_to_scroll(const wmEvent *event, int *type, int *val)
@@ -332,7 +357,7 @@ static bool ui_is_a_warp_but(uiBut *but)
return false;
}
-static float ui_mouse_scale_warp_factor(const short shift)
+static float ui_mouse_scale_warp_factor(const bool shift)
{
return shift ? 0.05f : 1.0f;
}
@@ -340,7 +365,7 @@ static float ui_mouse_scale_warp_factor(const short shift)
static void ui_mouse_scale_warp(uiHandleButtonData *data,
const float mx, const float my,
float *r_mx, float *r_my,
- const short shift)
+ const bool shift)
{
const float fac = ui_mouse_scale_warp_factor(shift);
@@ -1321,7 +1346,6 @@ static void ui_but_drop(bContext *C, const wmEvent *event, uiBut *but, uiHandleB
/* c = copy, v = paste */
static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data, char mode)
{
- static ColorBand but_copypaste_coba = {0};
char buf[UI_MAX_DRAW_STR + 1] = {0};
if (mode == 'v' && but->lock == TRUE) {
@@ -1369,6 +1393,32 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data,
}
}
+ /* NORMAL button */
+ else if (but->type == BUT_NORMAL) {
+ float xyz[3];
+
+ if (but->poin == NULL && but->rnapoin.data == NULL) {
+ /* pass */
+ }
+ else if (mode == 'c') {
+ ui_get_but_vectorf(but, xyz);
+ BLI_snprintf(buf, sizeof(buf), "[%f, %f, %f]", xyz[0], xyz[1], xyz[2]);
+ WM_clipboard_text_set(buf, 0);
+ }
+ else {
+ if (sscanf(buf, "[%f, %f, %f]", &xyz[0], &xyz[1], &xyz[2]) == 3) {
+ if (normalize_v3(xyz) == 0.0f) {
+ /* better set Z up then have a zero vector */
+ xyz[2] = 1.0;
+ }
+ button_activate_state(C, but, BUTTON_STATE_NUM_EDITING);
+ ui_set_but_vectorf(but, xyz);
+ button_activate_state(C, but, BUTTON_STATE_EXIT);
+ }
+ }
+ }
+
+
/* RGB triple */
else if (but->type == COLOR) {
float rgba[4];
@@ -1455,6 +1505,28 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data,
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
}
+ else if (but->type == BUT_CURVE) {
+ if (mode == 'c') {
+ if (but->poin == NULL)
+ return;
+
+ but_copypaste_curve_alive = true;
+ curvemapping_free_data(&but_copypaste_curve);
+ curvemapping_copy_data(&but_copypaste_curve, (CurveMapping *) but->poin);
+ }
+ else {
+ if (!but_copypaste_curve_alive)
+ return;
+
+ if (!but->poin)
+ but->poin = MEM_callocN(sizeof(CurveMapping), "curvemapping");
+
+ button_activate_state(C, but, BUTTON_STATE_NUM_EDITING);
+ curvemapping_free_data((CurveMapping *) but->poin);
+ curvemapping_copy_data((CurveMapping *) but->poin, &but_copypaste_curve);
+ button_activate_state(C, but, BUTTON_STATE_EXIT);
+ }
+ }
/* operator button (any type) */
else if (but->optype) {
if (mode == 'c') {
@@ -1713,7 +1785,7 @@ static bool ui_textedit_type_ascii(uiBut *but, uiHandleButtonData *data, char as
}
static void ui_textedit_move(uiBut *but, uiHandleButtonData *data, strCursorJumpDirection direction,
- int select, strCursorJumpType jump)
+ const bool select, strCursorJumpType jump)
{
const char *str = data->str;
const int len = strlen(str);
@@ -1978,7 +2050,7 @@ static void ui_textedit_begin(bContext *C, uiBut *but, uiHandleButtonData *data)
ui_check_but(but);
- WM_cursor_modal(CTX_wm_window(C), BC_TEXTEDITCURSOR);
+ WM_cursor_modal_set(CTX_wm_window(C), BC_TEXTEDITCURSOR);
}
static void ui_textedit_end(bContext *C, uiBut *but, uiHandleButtonData *data)
@@ -2010,7 +2082,7 @@ static void ui_textedit_end(bContext *C, uiBut *but, uiHandleButtonData *data)
but->pos = -1;
}
- WM_cursor_restore(CTX_wm_window(C));
+ WM_cursor_modal_restore(CTX_wm_window(C));
}
static void ui_textedit_next_but(uiBlock *block, uiBut *actbut, uiHandleButtonData *data)
@@ -2094,10 +2166,12 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
break;
case RIGHTMOUSE:
case ESCKEY:
- data->cancel = true;
- data->escapecancel = true;
- button_activate_state(C, but, BUTTON_STATE_EXIT);
- retval = WM_UI_HANDLER_BREAK;
+ if (event->val == KM_PRESS) {
+ data->cancel = true;
+ data->escapecancel = true;
+ button_activate_state(C, but, BUTTON_STATE_EXIT);
+ retval = WM_UI_HANDLER_BREAK;
+ }
break;
case LEFTMOUSE:
{
@@ -2132,7 +2206,7 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
/* only select a word in button if there was no selection before */
if (event->val == KM_DBL_CLICK && had_selection == false) {
- ui_textedit_move(but, data, STRCUR_DIR_PREV, 0, STRCUR_JUMP_DELIM);
+ ui_textedit_move(but, data, STRCUR_DIR_PREV, false, STRCUR_JUMP_DELIM);
ui_textedit_move(but, data, STRCUR_DIR_NEXT, true, STRCUR_JUMP_DELIM);
retval = WM_UI_HANDLER_BREAK;
changed = true;
@@ -2166,12 +2240,12 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
break;
case RIGHTARROWKEY:
ui_textedit_move(but, data, STRCUR_DIR_NEXT,
- event->shift, event->ctrl ? STRCUR_JUMP_DELIM : STRCUR_JUMP_NONE);
+ event->shift != 0, event->ctrl ? STRCUR_JUMP_DELIM : STRCUR_JUMP_NONE);
retval = WM_UI_HANDLER_BREAK;
break;
case LEFTARROWKEY:
ui_textedit_move(but, data, STRCUR_DIR_PREV,
- event->shift, event->ctrl ? STRCUR_JUMP_DELIM : STRCUR_JUMP_NONE);
+ event->shift != 0, event->ctrl ? STRCUR_JUMP_DELIM : STRCUR_JUMP_NONE);
retval = WM_UI_HANDLER_BREAK;
break;
case WHEELDOWNMOUSE:
@@ -2186,7 +2260,7 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
/* fall-through */
case ENDKEY:
ui_textedit_move(but, data, STRCUR_DIR_NEXT,
- event->shift, STRCUR_JUMP_ALL);
+ event->shift != 0, STRCUR_JUMP_ALL);
retval = WM_UI_HANDLER_BREAK;
break;
case WHEELUPMOUSE:
@@ -2201,7 +2275,7 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
/* fall-through */
case HOMEKEY:
ui_textedit_move(but, data, STRCUR_DIR_PREV,
- event->shift, STRCUR_JUMP_ALL);
+ event->shift != 0, STRCUR_JUMP_ALL);
retval = WM_UI_HANDLER_BREAK;
break;
case PADENTER:
@@ -2217,13 +2291,21 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
case BACKSPACEKEY:
changed = ui_textedit_delete(but, data, 0,
- event->shift ? STRCUR_JUMP_ALL : (event->ctrl ? STRCUR_JUMP_DELIM : STRCUR_JUMP_NONE));
+ event->ctrl ? STRCUR_JUMP_DELIM : STRCUR_JUMP_NONE);
retval = WM_UI_HANDLER_BREAK;
break;
case AKEY:
+
/* Ctrl + A: Select all */
- if (event->ctrl && !(event->alt || event->shift || event->oskey)) {
+#if defined(__APPLE__)
+ /* OSX uses cmd-a systemwide, so add it */
+ if ((event->oskey && !(event->alt || event->shift || event->ctrl)) ||
+ (event->ctrl && !(event->alt || event->shift || event->oskey)))
+#else
+ if (event->ctrl && !(event->alt || event->shift || event->oskey))
+#endif
+ {
ui_textedit_move(but, data, STRCUR_DIR_PREV,
false, STRCUR_JUMP_ALL);
ui_textedit_move(but, data, STRCUR_DIR_NEXT,
@@ -2566,9 +2648,11 @@ static int ui_do_but_HOTKEYEVT(bContext *C, uiBut *but, uiHandleButtonData *data
return WM_UI_HANDLER_BREAK;
}
else if (event->type == ESCKEY) {
- data->cancel = true;
- data->escapecancel = true;
- button_activate_state(C, but, BUTTON_STATE_EXIT);
+ if (event->val == KM_PRESS) {
+ data->cancel = true;
+ data->escapecancel = true;
+ button_activate_state(C, but, BUTTON_STATE_EXIT);
+ }
}
}
@@ -2606,7 +2690,10 @@ static int ui_do_but_TEX(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
{
if (data->state == BUTTON_STATE_HIGHLIGHT) {
if (ELEM4(event->type, LEFTMOUSE, EVT_BUT_OPEN, PADENTER, RETKEY) && event->val == KM_PRESS) {
- if (but->dt == UI_EMBOSSN && !event->ctrl) {
+ if (ELEM(event->type, PADENTER, RETKEY) && (!ui_is_but_utf8(but))) {
+ /* pass - allow filesel, enter to execute */
+ }
+ else if (but->dt == UI_EMBOSSN && !event->ctrl) {
/* pass */
}
else {
@@ -2630,7 +2717,9 @@ static int ui_do_but_TEX(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
static int ui_do_but_SEARCH_UNLINK(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
{
/* unlink icon is on right */
- if (ELEM4(event->type, LEFTMOUSE, EVT_BUT_OPEN, PADENTER, RETKEY) && event->val == KM_PRESS) {
+ if (ELEM4(event->type, LEFTMOUSE, EVT_BUT_OPEN, PADENTER, RETKEY) && event->val == KM_PRESS &&
+ ui_is_but_search_unlink_visible(but))
+ {
ARegion *ar = data->region;
rcti rect;
int x = event->x, y = event->y;
@@ -2640,13 +2729,8 @@ static int ui_do_but_SEARCH_UNLINK(bContext *C, uiBlock *block, uiBut *but, uiHa
BLI_rcti_rctf_copy(&rect, &but->rect);
rect.xmin = rect.xmax - (BLI_rcti_size_y(&rect));
- if ( BLI_rcti_isect_pt(&rect, x, y) ) {
- /* most likely NULL, but let's check, and give it temp zero string */
- if (data->str == NULL)
- data->str = MEM_callocN(16, "temp str");
- data->str[0] = 0;
-
- ui_apply_but_TEX(C, but, data);
+ if (BLI_rcti_isect_pt(&rect, x, y)) {
+ ui_set_but_string(C, but, "");
button_activate_state(C, but, BUTTON_STATE_EXIT);
return WM_UI_HANDLER_BREAK;
@@ -2660,8 +2744,10 @@ static int ui_do_but_TOG(bContext *C, uiBut *but, uiHandleButtonData *data, cons
#ifdef USE_DRAG_TOGGLE
if (data->state == BUTTON_STATE_HIGHLIGHT) {
if (event->type == LEFTMOUSE && event->val == KM_PRESS && ui_is_but_bool(but)) {
+#if 0 /* UNUSED */
data->togdual = event->ctrl;
data->togonly = !event->shift;
+#endif
ui_apply_button(C, but->block, but, data, true);
button_activate_state(C, but, BUTTON_STATE_WAIT_DRAG);
data->dragstartx = event->x;
@@ -2677,8 +2763,10 @@ static int ui_do_but_TOG(bContext *C, uiBut *but, uiHandleButtonData *data, cons
#endif
if (data->state == BUTTON_STATE_HIGHLIGHT) {
if (ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->val == KM_PRESS) {
+#if 0 /* UNUSED */
data->togdual = event->ctrl;
data->togonly = !event->shift;
+#endif
button_activate_state(C, but, BUTTON_STATE_EXIT);
return WM_UI_HANDLER_BREAK;
}
@@ -2746,9 +2834,10 @@ static int ui_do_but_EXIT(bContext *C, uiBut *but, uiHandleButtonData *data, con
}
/* var names match ui_numedit_but_NUM */
-static float ui_numedit_apply_snapf(uiBut *but, float tempf, float softmin, float softmax, float softrange, int snap)
+static float ui_numedit_apply_snapf(uiBut *but, float tempf, float softmin, float softmax, float softrange,
+ const enum eSnapType snap)
{
- if (tempf == softmin || tempf == softmax || snap == 0) {
+ if (tempf == softmin || tempf == softmax || snap == SNAP_OFF) {
/* pass */
}
else {
@@ -2774,16 +2863,19 @@ static float ui_numedit_apply_snapf(uiBut *but, float tempf, float softmin, floa
softrange /= fac;
}
- if (snap == 1) {
+ if (snap == SNAP_ON) {
if (softrange < 2.10f) tempf = 0.1f * floorf(10.0f * tempf);
else if (softrange < 21.0f) tempf = floorf(tempf);
else tempf = 10.0f * floorf(tempf / 10.0f);
}
- else if (snap == 2) {
+ else if (snap == SNAP_ON_SMALL) {
if (softrange < 2.10f) tempf = 0.01f * floorf(100.0f * tempf);
else if (softrange < 21.0f) tempf = 0.1f * floorf(10.0f * tempf);
else tempf = floor(tempf);
}
+ else {
+ BLI_assert(0);
+ }
if (fac != 1.0f)
tempf *= fac;
@@ -2792,18 +2884,19 @@ static float ui_numedit_apply_snapf(uiBut *but, float tempf, float softmin, floa
return tempf;
}
-static float ui_numedit_apply_snap(int temp, float softmin, float softmax, int snap)
+static float ui_numedit_apply_snap(int temp, float softmin, float softmax,
+ const enum eSnapType snap)
{
if (temp == softmin || temp == softmax)
return temp;
switch (snap) {
- case 0:
+ case SNAP_OFF:
break;
- case 1:
+ case SNAP_ON:
temp = 10 * (temp / 10);
break;
- case 2:
+ case SNAP_ON_SMALL:
temp = 100 * (temp / 100);
break;
}
@@ -2811,7 +2904,9 @@ static float ui_numedit_apply_snap(int temp, float softmin, float softmax, int s
return temp;
}
-static bool ui_numedit_but_NUM(uiBut *but, uiHandleButtonData *data, float fac, int snap, int mx)
+static bool ui_numedit_but_NUM(uiBut *but, uiHandleButtonData *data,
+ int mx,
+ const enum eSnapType snap, float fac)
{
float deler, tempf, softmin, softmax, softrange;
int lvalue, temp;
@@ -3007,9 +3102,11 @@ static int ui_do_but_NUM(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
}
else if (data->state == BUTTON_STATE_NUM_EDITING) {
if (event->type == ESCKEY || event->type == RIGHTMOUSE) {
- data->cancel = true;
- data->escapecancel = true;
- button_activate_state(C, but, BUTTON_STATE_EXIT);
+ if (event->val == KM_PRESS) {
+ data->cancel = true;
+ data->escapecancel = true;
+ button_activate_state(C, but, BUTTON_STATE_EXIT);
+ }
}
else if (event->type == LEFTMOUSE && event->val != KM_PRESS) {
if (data->dragchange)
@@ -3018,16 +3115,14 @@ static int ui_do_but_NUM(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
click = 1;
}
else if (event->type == MOUSEMOVE) {
+ const enum eSnapType snap = ui_event_to_snap(event);
float fac;
- int snap;
fac = 1.0f;
if (event->shift) fac /= 10.0f;
if (event->alt) fac /= 20.0f;
-
- snap = (event->ctrl) ? (event->shift) ? 2 : 1 : 0;
- if (ui_numedit_but_NUM(but, data, fac, snap, (ui_is_a_warp_but(but) ? screen_mx : mx)))
+ if (ui_numedit_but_NUM(but, data, (ui_is_a_warp_but(but) ? screen_mx : mx), snap, fac))
ui_numedit_apply(C, block, but, data);
}
retval = WM_UI_HANDLER_BREAK;
@@ -3108,7 +3203,8 @@ static int ui_do_but_NUM(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
}
static bool ui_numedit_but_SLI(uiBut *but, uiHandleButtonData *data,
- const bool is_horizontal, const bool shift, const bool ctrl, int mx)
+ int mx, const bool is_horizontal,
+ const bool snap, const bool shift)
{
float deler, f, tempf, softmin, softmax, softrange;
int temp, lvalue;
@@ -3163,7 +3259,7 @@ static bool ui_numedit_but_SLI(uiBut *but, uiHandleButtonData *data,
tempf = softmin + f * softrange;
temp = floorf(tempf + 0.5f);
- if (ctrl) {
+ if (snap) {
if (tempf == softmin || tempf == softmax) {
/* pass */
}
@@ -3271,9 +3367,11 @@ static int ui_do_but_SLI(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
}
else if (data->state == BUTTON_STATE_NUM_EDITING) {
if (event->type == ESCKEY || event->type == RIGHTMOUSE) {
- data->cancel = TRUE;
- data->escapecancel = TRUE;
- button_activate_state(C, but, BUTTON_STATE_EXIT);
+ if (event->val == KM_PRESS) {
+ data->cancel = TRUE;
+ data->escapecancel = TRUE;
+ button_activate_state(C, but, BUTTON_STATE_EXIT);
+ }
}
else if (event->type == LEFTMOUSE && event->val != KM_PRESS) {
if (data->dragchange)
@@ -3282,7 +3380,7 @@ static int ui_do_but_SLI(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
click = 1;
}
else if (event->type == MOUSEMOVE) {
- if (ui_numedit_but_SLI(but, data, true, event->shift, event->ctrl, mx))
+ if (ui_numedit_but_SLI(but, data, mx, true, event->ctrl != 0, event->shift != 0))
ui_numedit_apply(C, block, but, data);
}
retval = WM_UI_HANDLER_BREAK;
@@ -3388,15 +3486,17 @@ static int ui_do_but_SCROLL(bContext *C, uiBlock *block, uiBut *but, uiHandleBut
}
else if (data->state == BUTTON_STATE_NUM_EDITING) {
if (event->type == ESCKEY) {
- data->cancel = true;
- data->escapecancel = true;
- button_activate_state(C, but, BUTTON_STATE_EXIT);
+ if (event->val == KM_PRESS) {
+ data->cancel = true;
+ data->escapecancel = true;
+ button_activate_state(C, but, BUTTON_STATE_EXIT);
+ }
}
else if (event->type == LEFTMOUSE && event->val != KM_PRESS) {
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
else if (event->type == MOUSEMOVE) {
- if (ui_numedit_but_SLI(but, data, horizontal, false, false, (horizontal) ? mx : my))
+ if (ui_numedit_but_SLI(but, data, (horizontal) ? mx : my, horizontal, false, false))
ui_numedit_apply(C, block, but, data);
}
@@ -3406,6 +3506,102 @@ static int ui_do_but_SCROLL(bContext *C, uiBlock *block, uiBut *but, uiHandleBut
return retval;
}
+static int ui_do_but_LISTBOX(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
+{
+ uiList *ui_list = but->custom_data;
+ int *size = (int *)but->poin;
+ int mx, my, raw_dir_sign;
+ int retval = WM_UI_HANDLER_CONTINUE;
+
+ mx = event->x;
+ my = event->y;
+
+ /* We find the direction of the mouse since last time, before converting coordinates into block's space.
+ * We'll use it to avoid flickering in case some rows are higher than UI_UNIT_Y.
+ */
+ raw_dir_sign = (data->draglasty - my < 0) ? -1 : 1;
+ data->draglasty = my;
+
+ ui_window_to_block(data->region, block, &mx, &my);
+
+ if (data->state == BUTTON_STATE_NUM_EDITING) {
+ if (event->type == ESCKEY) {
+ if (event->val == KM_PRESS) {
+ data->cancel = true;
+ data->escapecancel = true;
+ *size = (int)data->origvalue;
+ button_activate_state(C, but, BUTTON_STATE_EXIT);
+ ui_list->flag &= ~UILST_RESIZING;
+ ED_region_tag_redraw(data->region);
+ }
+ }
+ else if (event->type == LEFTMOUSE && event->val != KM_PRESS) {
+ button_activate_state(C, but, BUTTON_STATE_EXIT);
+ ui_list->flag &= ~UILST_RESIZING;
+ ED_region_tag_redraw(data->region);
+ }
+ else if (event->type == MOUSEMOVE) {
+ /* If we switched from dragged to auto size, suspend shrinking dragging and set dragstarty to a temp
+ * refpoint.
+ */
+ if (data->draglastvalue > 0 && *size == 0) {
+ data->draglastvalue = *size;
+ data->dragstartx = data->dragstarty; /* draglasty already used... */
+ data->dragstarty = my;
+ }
+ else {
+ int delta = data->dragstarty - my;
+ /* We only actually do something if the real mousemouve direction matches the "virtual"
+ * mousemove direction in current block's space. This avoids flickering when drag-resizing lists with
+ * items drawing higher that UI_UNIT_Y.
+ */
+ if (delta * raw_dir_sign > 0) {
+ /* Number of rows to show/hide, UI_UNIT_Y should work nice in most cases. */
+ delta = (int)floorf(((float)delta / (float)UI_UNIT_Y) + 0.5f);
+
+ /* If we are not in autosize mode, default behavior... */
+ if (*size > 0 && delta != 0) {
+ /* This prevents some instability in case some items draw more/less than UI_UNIT_Y height. */
+ delta = (delta < -5) ? -5 : (delta > 5) ? 5 : delta;
+ /* We can't use ui_numedit_apply()... */
+ /* list template will clamp, but we do not want to reach 0 aka autosize mode! */
+ *size = max_ii(*size + delta, 1);
+
+ /* Used to detect switch to/from autosize mode. */
+ data->draglastvalue = *size;
+
+ data->dragchange = true;
+ data->applied = data->applied_interactive = true;
+
+ ui_list->flag |= UILST_SCROLL_TO_ACTIVE_ITEM;
+ ED_region_tag_redraw(data->region);
+ }
+ /* If we are leaving autosize mode (growing dragging), restore to minimal size. */
+ else if (delta > 0) {
+ /* We can't use ui_numedit_apply()... */
+ *size = ui_list->dyn_data->visual_height_min;
+
+ /* Restore real dragstarty value! */
+ data->dragstarty = data->dragstartx;
+
+ /* Used to detect switch to/from autosize mode. */
+ data->draglastvalue = *size;
+
+ data->dragchange = true;
+ data->applied = data->applied_interactive = true;
+
+ ui_list->flag |= UILST_SCROLL_TO_ACTIVE_ITEM;
+ ED_region_tag_redraw(data->region);
+ }
+ }
+ }
+ }
+
+ retval = WM_UI_HANDLER_BREAK;
+ }
+
+ return retval;
+}
static int ui_do_but_BLOCK(bContext *C, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
{
@@ -3466,31 +3662,6 @@ static int ui_do_but_BLOCK(bContext *C, uiBut *but, uiHandleButtonData *data, co
return WM_UI_HANDLER_BREAK;
}
}
- else if (but->type == COLOR) {
- if (ELEM3(event->type, MOUSEPAN, WHEELDOWNMOUSE, WHEELUPMOUSE) && event->alt) {
- float *hsv = ui_block_hsv_get(but->block);
- float col[3];
-
- ui_get_but_vectorf(but, col);
- rgb_to_hsv_compat_v(col, hsv);
-
- if (event->type == WHEELDOWNMOUSE)
- hsv[2] = CLAMPIS(hsv[2] - 0.05f, 0.0f, 1.0f);
- else if (event->type == WHEELUPMOUSE)
- hsv[2] = CLAMPIS(hsv[2] + 0.05f, 0.0f, 1.0f);
- else {
- float fac = 0.005 * (event->y - event->prevy);
- hsv[2] = CLAMPIS(hsv[2] + fac, 0.0f, 1.0f);
- }
-
- hsv_to_rgb_v(hsv, data->vec);
- ui_set_but_vectorf(but, data->vec);
-
- button_activate_state(C, but, BUTTON_STATE_EXIT);
- ui_apply_button(C, but->block, but, data, true);
- return WM_UI_HANDLER_BREAK;
- }
- }
}
else if (data->state == BUTTON_STATE_WAIT_DRAG) {
@@ -3516,7 +3687,9 @@ static int ui_do_but_BLOCK(bContext *C, uiBut *but, uiHandleButtonData *data, co
return WM_UI_HANDLER_CONTINUE;
}
-static bool ui_numedit_but_NORMAL(uiBut *but, uiHandleButtonData *data, int mx, int my)
+static bool ui_numedit_but_NORMAL(uiBut *but, uiHandleButtonData *data,
+ int mx, int my,
+ const enum eSnapType snap)
{
float dx, dy, rad, radsq, mrad, *fp;
int mdx, mdy;
@@ -3572,12 +3745,64 @@ static bool ui_numedit_but_NORMAL(uiBut *but, uiHandleButtonData *data, int mx,
}
normalize_v3(fp);
+ if (snap != SNAP_OFF) {
+ const int snap_steps = (snap == SNAP_ON) ? 4 : 12; /* 45 or 15 degree increments */
+ const float snap_steps_angle = M_PI / snap_steps;
+ float angle, angle_snap;
+ int i;
+
+ /* round each axis of 'fp' to the next increment
+ * do this in "angle" space - this gives increments of same size */
+ for (i = 0; i < 3; i++) {
+ angle = asinf(fp[i]);
+ angle_snap = floorf(0.5f + (angle / snap_steps_angle)) * snap_steps_angle;
+ fp[i] = sinf(angle_snap);
+ }
+ normalize_v3(fp);
+ changed = !compare_v3v3(fp, data->origvec, FLT_EPSILON);
+ }
+
data->draglastx = mx;
data->draglasty = my;
return changed;
}
+static int ui_do_but_COLOR(bContext *C, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
+{
+ if (data->state == BUTTON_STATE_HIGHLIGHT) {
+ if (ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->val == KM_PRESS) {
+ button_activate_state(C, but, BUTTON_STATE_MENU_OPEN);
+ return WM_UI_HANDLER_BREAK;
+ }
+ else if (ELEM3(event->type, MOUSEPAN, WHEELDOWNMOUSE, WHEELUPMOUSE) && event->alt) {
+ float *hsv = ui_block_hsv_get(but->block);
+ float col[3];
+
+ ui_get_but_vectorf(but, col);
+ rgb_to_hsv_compat_v(col, hsv);
+
+ if (event->type == WHEELDOWNMOUSE)
+ hsv[2] = CLAMPIS(hsv[2] - 0.05f, 0.0f, 1.0f);
+ else if (event->type == WHEELUPMOUSE)
+ hsv[2] = CLAMPIS(hsv[2] + 0.05f, 0.0f, 1.0f);
+ else {
+ float fac = 0.005 * (event->y - event->prevy);
+ hsv[2] = CLAMPIS(hsv[2] + fac, 0.0f, 1.0f);
+ }
+
+ hsv_to_rgb_v(hsv, data->vec);
+ ui_set_but_vectorf(but, data->vec);
+
+ button_activate_state(C, but, BUTTON_STATE_EXIT);
+ ui_apply_button(C, but->block, but, data, true);
+ return WM_UI_HANDLER_BREAK;
+ }
+ }
+
+ return WM_UI_HANDLER_CONTINUE;
+}
+
static int ui_do_but_NORMAL(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
{
int mx, my;
@@ -3588,6 +3813,7 @@ static int ui_do_but_NORMAL(bContext *C, uiBlock *block, uiBut *but, uiHandleBut
if (data->state == BUTTON_STATE_HIGHLIGHT) {
if (event->type == LEFTMOUSE && event->val == KM_PRESS) {
+ const enum eSnapType snap = ui_event_to_snap(event);
data->dragstartx = mx;
data->dragstarty = my;
data->draglastx = mx;
@@ -3595,7 +3821,7 @@ static int ui_do_but_NORMAL(bContext *C, uiBlock *block, uiBut *but, uiHandleBut
button_activate_state(C, but, BUTTON_STATE_NUM_EDITING);
/* also do drag the first time */
- if (ui_numedit_but_NORMAL(but, data, mx, my))
+ if (ui_numedit_but_NORMAL(but, data, mx, my, snap))
ui_numedit_apply(C, block, but, data);
return WM_UI_HANDLER_BREAK;
@@ -3604,7 +3830,8 @@ static int ui_do_but_NORMAL(bContext *C, uiBlock *block, uiBut *but, uiHandleBut
else if (data->state == BUTTON_STATE_NUM_EDITING) {
if (event->type == MOUSEMOVE) {
if (mx != data->draglastx || my != data->draglasty) {
- if (ui_numedit_but_NORMAL(but, data, mx, my))
+ const enum eSnapType snap = ui_event_to_snap(event);
+ if (ui_numedit_but_NORMAL(but, data, mx, my, snap))
ui_numedit_apply(C, block, but, data);
}
}
@@ -3631,7 +3858,9 @@ static void clamp_axis_max_v3(float v[3], const float max)
}
}
-static bool ui_numedit_but_HSVCUBE(uiBut *but, uiHandleButtonData *data, int mx, int my, const short shift)
+static bool ui_numedit_but_HSVCUBE(uiBut *but, uiHandleButtonData *data,
+ int mx, int my,
+ const enum eSnapType snap, const bool shift)
{
float rgb[3];
float *hsv = ui_block_hsv_get(but->block);
@@ -3725,6 +3954,12 @@ static bool ui_numedit_but_HSVCUBE(uiBut *but, uiHandleButtonData *data, int mx,
break;
}
+ if (snap != SNAP_OFF) {
+ if (ELEM3((int)but->a1, UI_GRAD_HV, UI_GRAD_HS, UI_GRAD_H)) {
+ ui_color_snap_hue(snap, &hsv[0]);
+ }
+ }
+
hsv_to_rgb_v(hsv, rgb);
if (color_profile && ((int)but->a1 != UI_GRAD_SV))
@@ -3743,7 +3978,9 @@ static bool ui_numedit_but_HSVCUBE(uiBut *but, uiHandleButtonData *data, int mx,
return changed;
}
-static void ui_ndofedit_but_HSVCUBE(uiBut *but, uiHandleButtonData *data, wmNDOFMotionData *ndof, const short shift)
+static void ui_ndofedit_but_HSVCUBE(uiBut *but, uiHandleButtonData *data,
+ wmNDOFMotionData *ndof,
+ const enum eSnapType snap, const bool shift)
{
float *hsv = ui_block_hsv_get(but->block);
float rgb[3];
@@ -3798,6 +4035,12 @@ static void ui_ndofedit_but_HSVCUBE(uiBut *but, uiHandleButtonData *data, wmNDOF
break;
}
+ if (snap != SNAP_OFF) {
+ if (ELEM3((int)but->a1, UI_GRAD_HV, UI_GRAD_HS, UI_GRAD_H)) {
+ ui_color_snap_hue(snap, &hsv[0]);
+ }
+ }
+
hsv_to_rgb_v(hsv, rgb);
if (color_profile && (int)but->a1 != UI_GRAD_SV)
@@ -3817,6 +4060,8 @@ static int ui_do_but_HSVCUBE(bContext *C, uiBlock *block, uiBut *but, uiHandleBu
if (data->state == BUTTON_STATE_HIGHLIGHT) {
if (event->type == LEFTMOUSE && event->val == KM_PRESS) {
+ const enum eSnapType snap = ui_event_to_snap(event);
+
data->dragstartx = mx;
data->dragstarty = my;
data->draglastx = mx;
@@ -3824,15 +4069,16 @@ static int ui_do_but_HSVCUBE(bContext *C, uiBlock *block, uiBut *but, uiHandleBu
button_activate_state(C, but, BUTTON_STATE_NUM_EDITING);
/* also do drag the first time */
- if (ui_numedit_but_HSVCUBE(but, data, mx, my, event->shift))
+ if (ui_numedit_but_HSVCUBE(but, data, mx, my, snap, event->shift != 0))
ui_numedit_apply(C, block, but, data);
return WM_UI_HANDLER_BREAK;
}
else if (event->type == NDOF_MOTION) {
wmNDOFMotionData *ndof = (wmNDOFMotionData *) event->customdata;
+ const enum eSnapType snap = ui_event_to_snap(event);
- ui_ndofedit_but_HSVCUBE(but, data, ndof, event->shift);
+ ui_ndofedit_but_HSVCUBE(but, data, ndof, snap, event->shift != 0);
button_activate_state(C, but, BUTTON_STATE_EXIT);
ui_apply_button(C, but->block, but, data, true);
@@ -3875,13 +4121,17 @@ static int ui_do_but_HSVCUBE(bContext *C, uiBlock *block, uiBut *but, uiHandleBu
}
else if (data->state == BUTTON_STATE_NUM_EDITING) {
if (event->type == ESCKEY || event->type == RIGHTMOUSE) {
- data->cancel = true;
- data->escapecancel = true;
- button_activate_state(C, but, BUTTON_STATE_EXIT);
+ if (event->val == KM_PRESS) {
+ data->cancel = true;
+ data->escapecancel = true;
+ button_activate_state(C, but, BUTTON_STATE_EXIT);
+ }
}
else if (event->type == MOUSEMOVE) {
if (mx != data->draglastx || my != data->draglasty) {
- if (ui_numedit_but_HSVCUBE(but, data, mx, my, event->shift))
+ const enum eSnapType snap = ui_event_to_snap(event);
+
+ if (ui_numedit_but_HSVCUBE(but, data, mx, my, snap, event->shift != 0))
ui_numedit_apply(C, block, but, data);
}
}
@@ -3895,7 +4145,9 @@ static int ui_do_but_HSVCUBE(bContext *C, uiBlock *block, uiBut *but, uiHandleBu
return WM_UI_HANDLER_CONTINUE;
}
-static bool ui_numedit_but_HSVCIRCLE(uiBut *but, uiHandleButtonData *data, float mx, float my, int shift)
+static bool ui_numedit_but_HSVCIRCLE(uiBut *but, uiHandleButtonData *data,
+ float mx, float my,
+ const enum eSnapType snap, const bool shift)
{
rcti rect;
bool changed = true;
@@ -3953,6 +4205,10 @@ static bool ui_numedit_but_HSVCIRCLE(uiBut *but, uiHandleButtonData *data, float
if (but->flag & UI_BUT_COLOR_CUBIC)
hsv[1] = 1.0f - sqrt3f(1.0f - hsv[1]);
+ if (snap != SNAP_OFF) {
+ ui_color_snap_hue(snap, &hsv[0]);
+ }
+
hsv_to_rgb_v(hsv, rgb);
if ((but->flag & UI_BUT_VEC_SIZE_LOCK) && (rgb[0] || rgb[1] || rgb[2])) {
@@ -3968,7 +4224,9 @@ static bool ui_numedit_but_HSVCIRCLE(uiBut *but, uiHandleButtonData *data, float
return changed;
}
-static void ui_ndofedit_but_HSVCIRCLE(uiBut *but, uiHandleButtonData *data, wmNDOFMotionData *ndof, const short shift)
+static void ui_ndofedit_but_HSVCIRCLE(uiBut *but, uiHandleButtonData *data,
+ wmNDOFMotionData *ndof,
+ const enum eSnapType snap, const bool shift)
{
float *hsv = ui_block_hsv_get(but->block);
float rgb[3];
@@ -4009,7 +4267,11 @@ static void ui_ndofedit_but_HSVCIRCLE(uiBut *but, uiHandleButtonData *data, wmND
if (but->flag & UI_BUT_COLOR_LOCK) { // lock
if (hsv[2] == 0.0f) hsv[2] = 0.0001f;
}
-
+
+ if (snap != SNAP_OFF) {
+ ui_color_snap_hue(snap, &hsv[0]);
+ }
+
hsv_to_rgb_v(hsv, data->vec);
if ((but->flag & UI_BUT_VEC_SIZE_LOCK) && (data->vec[0] || data->vec[1] || data->vec[2])) {
@@ -4030,6 +4292,7 @@ static int ui_do_but_HSVCIRCLE(bContext *C, uiBlock *block, uiBut *but, uiHandle
if (data->state == BUTTON_STATE_HIGHLIGHT) {
if (event->type == LEFTMOUSE && event->val == KM_PRESS) {
+ const enum eSnapType snap = ui_event_to_snap(event);
data->dragstartx = mx;
data->dragstarty = my;
data->draglastx = mx;
@@ -4037,15 +4300,16 @@ static int ui_do_but_HSVCIRCLE(bContext *C, uiBlock *block, uiBut *but, uiHandle
button_activate_state(C, but, BUTTON_STATE_NUM_EDITING);
/* also do drag the first time */
- if (ui_numedit_but_HSVCIRCLE(but, data, mx, my, event->shift))
+ if (ui_numedit_but_HSVCIRCLE(but, data, mx, my, snap, event->shift != 0))
ui_numedit_apply(C, block, but, data);
return WM_UI_HANDLER_BREAK;
}
else if (event->type == NDOF_MOTION) {
+ const enum eSnapType snap = ui_event_to_snap(event);
wmNDOFMotionData *ndof = (wmNDOFMotionData *) event->customdata;
- ui_ndofedit_but_HSVCIRCLE(but, data, ndof, event->shift);
+ ui_ndofedit_but_HSVCIRCLE(but, data, ndof, snap, event->shift != 0);
button_activate_state(C, but, BUTTON_STATE_EXIT);
ui_apply_button(C, but->block, but, data, true);
@@ -4086,9 +4350,11 @@ static int ui_do_but_HSVCIRCLE(bContext *C, uiBlock *block, uiBut *but, uiHandle
}
else if (data->state == BUTTON_STATE_NUM_EDITING) {
if (event->type == ESCKEY || event->type == RIGHTMOUSE) {
- data->cancel = true;
- data->escapecancel = true;
- button_activate_state(C, but, BUTTON_STATE_EXIT);
+ if (event->val == KM_PRESS) {
+ data->cancel = true;
+ data->escapecancel = true;
+ button_activate_state(C, but, BUTTON_STATE_EXIT);
+ }
}
/* XXX hardcoded keymap check.... */
else if (event->type == WHEELDOWNMOUSE) {
@@ -4105,8 +4371,11 @@ static int ui_do_but_HSVCIRCLE(bContext *C, uiBlock *block, uiBut *but, uiHandle
}
else if (event->type == MOUSEMOVE) {
if (mx != data->draglastx || my != data->draglasty) {
- if (ui_numedit_but_HSVCIRCLE(but, data, mx, my, event->shift))
+ const enum eSnapType snap = ui_event_to_snap(event);
+
+ if (ui_numedit_but_HSVCIRCLE(but, data, mx, my, snap, event->shift != 0)) {
ui_numedit_apply(C, block, but, data);
+ }
}
}
else if (event->type == LEFTMOUSE && event->val != KM_PRESS) {
@@ -4201,8 +4470,9 @@ static int ui_do_but_COLORBAND(bContext *C, uiBlock *block, uiBut *but, uiHandle
return WM_UI_HANDLER_CONTINUE;
}
-static bool ui_numedit_but_CURVE(uiBlock *block, uiBut *but, uiHandleButtonData *data, int snap,
- int evtx, int evty, const short shift)
+static bool ui_numedit_but_CURVE(uiBlock *block, uiBut *but, uiHandleButtonData *data,
+ int evtx, int evty,
+ bool snap, const bool shift)
{
CurveMapping *cumap = (CurveMapping *)but->poin;
CurveMap *cuma = cumap->cm + cumap->cur;
@@ -4230,7 +4500,7 @@ static bool ui_numedit_but_CURVE(uiBlock *block, uiBut *but, uiHandleButtonData
d[1] = my - data->dragstarty;
if (len_v2(d) < 3.0f)
- snap = 0;
+ snap = false;
}
if (data->dragsel != -1) {
@@ -4425,7 +4695,7 @@ static int ui_do_but_CURVE(bContext *C, uiBlock *block, uiBut *but, uiHandleButt
if (event->type == MOUSEMOVE) {
if (event->x != data->draglastx || event->y != data->draglasty) {
- if (ui_numedit_but_CURVE(block, but, data, event->ctrl, event->x, event->y, event->shift))
+ if (ui_numedit_but_CURVE(block, but, data, event->x, event->y, event->ctrl != 0, event->shift != 0))
ui_numedit_apply(C, block, but, data);
}
}
@@ -4531,9 +4801,11 @@ static int ui_do_but_HISTOGRAM(bContext *C, uiBlock *block, uiBut *but, uiHandle
}
else if (data->state == BUTTON_STATE_NUM_EDITING) {
if (event->type == ESCKEY) {
- data->cancel = true;
- data->escapecancel = true;
- button_activate_state(C, but, BUTTON_STATE_EXIT);
+ if (event->val == KM_PRESS) {
+ data->cancel = true;
+ data->escapecancel = true;
+ button_activate_state(C, but, BUTTON_STATE_EXIT);
+ }
}
else if (event->type == MOUSEMOVE) {
if (mx != data->draglastx || my != data->draglasty) {
@@ -4614,9 +4886,11 @@ static int ui_do_but_WAVEFORM(bContext *C, uiBlock *block, uiBut *but, uiHandleB
}
else if (data->state == BUTTON_STATE_NUM_EDITING) {
if (event->type == ESCKEY) {
- data->cancel = true;
- data->escapecancel = true;
- button_activate_state(C, but, BUTTON_STATE_EXIT);
+ if (event->val == KM_PRESS) {
+ data->cancel = true;
+ data->escapecancel = true;
+ button_activate_state(C, but, BUTTON_STATE_EXIT);
+ }
}
else if (event->type == MOUSEMOVE) {
if (mx != data->draglastx || my != data->draglasty) {
@@ -4681,9 +4955,11 @@ static int ui_do_but_VECTORSCOPE(bContext *C, uiBlock *block, uiBut *but, uiHand
}
else if (data->state == BUTTON_STATE_NUM_EDITING) {
if (event->type == ESCKEY) {
- data->cancel = true;
- data->escapecancel = true;
- button_activate_state(C, but, BUTTON_STATE_EXIT);
+ if (event->val == KM_PRESS) {
+ data->cancel = true;
+ data->escapecancel = true;
+ button_activate_state(C, but, BUTTON_STATE_EXIT);
+ }
}
else if (event->type == MOUSEMOVE) {
if (mx != data->draglastx || my != data->draglasty) {
@@ -4728,7 +5004,8 @@ static int ui_do_but_LINK(bContext *C, uiBut *but, uiHandleButtonData *data, con
}
static bool ui_numedit_but_TRACKPREVIEW(bContext *C, uiBut *but, uiHandleButtonData *data,
- int mx, int my, const short shift)
+ int mx, int my,
+ const bool shift)
{
MovieClipScopes *scopes = (MovieClipScopes *)but->poin;
bool changed = true;
@@ -4784,7 +5061,7 @@ static int ui_do_but_TRACKPREVIEW(bContext *C, uiBlock *block, uiBut *but, uiHan
button_activate_state(C, but, BUTTON_STATE_NUM_EDITING);
/* also do drag the first time */
- if (ui_numedit_but_TRACKPREVIEW(C, but, data, mx, my, event->shift))
+ if (ui_numedit_but_TRACKPREVIEW(C, but, data, mx, my, event->shift != 0))
ui_numedit_apply(C, block, but, data);
return WM_UI_HANDLER_BREAK;
@@ -4792,13 +5069,15 @@ static int ui_do_but_TRACKPREVIEW(bContext *C, uiBlock *block, uiBut *but, uiHan
}
else if (data->state == BUTTON_STATE_NUM_EDITING) {
if (event->type == ESCKEY) {
- data->cancel = true;
- data->escapecancel = true;
- button_activate_state(C, but, BUTTON_STATE_EXIT);
+ if (event->val == KM_PRESS) {
+ data->cancel = true;
+ data->escapecancel = true;
+ button_activate_state(C, but, BUTTON_STATE_EXIT);
+ }
}
else if (event->type == MOUSEMOVE) {
if (mx != data->draglastx || my != data->draglasty) {
- if (ui_numedit_but_TRACKPREVIEW(C, but, data, mx, my, event->shift))
+ if (ui_numedit_but_TRACKPREVIEW(C, but, data, mx, my, event->shift != 0))
ui_numedit_apply(C, block, but, data);
}
}
@@ -4967,7 +5246,12 @@ static bool ui_but_menu(bContext *C, uiBut *but)
uiLayoutSetOperatorContext(layout, WM_OP_INVOKE_DEFAULT);
if (but->rnapoin.data && but->rnaprop) {
- bool is_anim = RNA_property_animateable(&but->rnapoin, but->rnaprop);
+ PointerRNA *ptr = &but->rnapoin;
+ PropertyRNA *prop = but->rnaprop;
+ bool is_anim = RNA_property_animateable(ptr, prop);
+ bool is_editable = RNA_property_editable(ptr, prop);
+ /*bool is_idprop = RNA_property_is_idprop(prop);*/ /* XXX does not work as expected, not strictly needed */
+ bool is_set = RNA_property_is_set(ptr, prop);
/* second slower test, saved people finding keyframe items in menus when its not possible */
if (is_anim)
@@ -5114,6 +5398,10 @@ static bool ui_but_menu(bContext *C, uiBut *but)
uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Reset to Default Value"),
ICON_NONE, "UI_OT_reset_default_button", "all", 1);
}
+ if (is_editable /*&& is_idprop*/ && is_set) {
+ uiItemO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Unset"),
+ ICON_NONE, "UI_OT_unset_property_button");
+ }
uiItemO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Copy Data Path"),
ICON_NONE, "UI_OT_copy_data_path_button");
@@ -5161,13 +5449,12 @@ static bool ui_but_menu(bContext *C, uiBut *but)
}
/* Show header tools for header buttons. */
- if (CTX_wm_region(C)) {
+ {
ARegion *ar = CTX_wm_region(C);
- if (ar->regiontype == RGN_TYPE_HEADER) {
-
- uiItemMenuF(layout, IFACE_("Header"), ICON_NONE, ED_screens_header_tools_menu_create, NULL);
- uiItemS(layout);
- }
+ if (ar && (ar->regiontype == RGN_TYPE_HEADER)) {
+ uiItemMenuF(layout, IFACE_("Header"), ICON_NONE, ED_screens_header_tools_menu_create, NULL);
+ uiItemS(layout);
+ }
}
{ /* Docs */
@@ -5256,6 +5543,28 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, const wmEvent *
else if (event->type == EVT_DROP) {
ui_but_drop(C, event, but, data);
}
+ /* handle eyedropper */
+ else if ((event->type == EKEY) && (event->val == KM_PRESS)) {
+ if (event->alt || event->shift || event->ctrl || event->oskey) {
+ /* pass */
+ }
+ else {
+ if (but->type == COLOR) {
+ WM_operator_name_call(C, "UI_OT_eyedropper_color", WM_OP_INVOKE_DEFAULT, NULL);
+ return WM_UI_HANDLER_BREAK;
+ }
+ else if (but->type == SEARCH_MENU_UNLINK) {
+ if (but->rnaprop && RNA_property_type(but->rnaprop) == PROP_POINTER) {
+ StructRNA *type = RNA_property_pointer_type(&but->rnapoin, but->rnaprop);
+ const short idcode = RNA_type_to_ID_code(type);
+ if ((idcode == ID_OB) || OB_DATA_SUPPORT_ID(idcode)) {
+ WM_operator_name_call(C, "UI_OT_eyedropper_id", WM_OP_INVOKE_DEFAULT, NULL);
+ return WM_UI_HANDLER_BREAK;
+ }
+ }
+ }
+ }
+ }
/* handle keyframing */
else if ((event->type == IKEY) &&
!ELEM(KM_MOD_FIRST, event->ctrl, event->oskey) &&
@@ -5273,7 +5582,7 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, const wmEvent *
ui_but_anim_insert_keyframe(C);
}
- ED_region_tag_redraw(CTX_wm_region(C));
+ ED_region_tag_redraw(data->region);
return WM_UI_HANDLER_BREAK;
}
@@ -5287,7 +5596,7 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, const wmEvent *
else
ui_but_anim_add_driver(C);
- ED_region_tag_redraw(CTX_wm_region(C));
+ ED_region_tag_redraw(data->region);
return WM_UI_HANDLER_BREAK;
}
@@ -5301,17 +5610,10 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, const wmEvent *
else
ui_but_anim_add_keyingset(C);
- ED_region_tag_redraw(CTX_wm_region(C));
+ ED_region_tag_redraw(data->region);
return WM_UI_HANDLER_BREAK;
}
- /* reset to default */
- /* XXX hardcoded keymap check.... */
- else if (event->type == BACKSPACEKEY && event->val == KM_PRESS) {
- /* ctrl+backspace = reset active button; backspace = reset a whole array*/
- if (!(ELEM3(but->type, HSVCIRCLE, HSVCUBE, HISTOGRAM)))
- ui_set_but_default(C, !event->ctrl);
- }
/* handle menu */
else if (event->type == RIGHTMOUSE && event->val == KM_PRESS) {
/* RMB has two options now */
@@ -5367,8 +5669,10 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, const wmEvent *
case NUMSLI:
retval = ui_do_but_SLI(C, block, but, data, event);
break;
- case ROUNDBOX:
case LISTBOX:
+ retval = ui_do_but_LISTBOX(C, block, but, data, event);
+ break;
+ case ROUNDBOX:
case LABEL:
case LISTLABEL:
case ROW:
@@ -5406,7 +5710,7 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, const wmEvent *
if (but->a1 == UI_GRAD_V_ALT) /* signal to prevent calling up color picker */
retval = ui_do_but_EXIT(C, but, data, event);
else
- retval = ui_do_but_BLOCK(C, but, data, event);
+ retval = ui_do_but_COLOR(C, but, data, event);
break;
case BUT_NORMAL:
retval = ui_do_but_NORMAL(C, block, but, data, event);
@@ -5436,7 +5740,22 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, const wmEvent *
case BUT_EXTRA:
break;
}
-
+
+
+ /* reset to default (generic function, only use if not handled by switch above) */
+ /* XXX hardcoded keymap check.... */
+ if (data->state == BUTTON_STATE_HIGHLIGHT) {
+ if ((retval == WM_UI_HANDLER_CONTINUE) &&
+ (event->type == BACKSPACEKEY && event->val == KM_PRESS))
+ {
+ /* ctrl+backspace = reset active button; backspace = reset a whole array*/
+ ui_set_but_default(C, !event->ctrl);
+ ED_region_tag_redraw(data->region);
+ retval = WM_UI_HANDLER_BREAK;
+ }
+ }
+
+
return retval;
}
@@ -5580,6 +5899,13 @@ bool ui_is_but_interactive(uiBut *but)
return true;
}
+bool ui_is_but_search_unlink_visible(uiBut *but)
+{
+ BLI_assert(but->type == SEARCH_MENU_UNLINK);
+ return ((but->editstr == NULL) &&
+ (but->drawstr[0] != '\0'));
+}
+
uiBut *ui_but_find_mouse_over(ARegion *ar, int x, int y)
{
uiBlock *block;
@@ -5622,8 +5948,6 @@ static uiBut *ui_list_find_mouse_over(ARegion *ar, int x, int y)
uiBut *but;
int mx, my;
-// if (!win->active)
-// return NULL;
if (!ui_mouse_inside_region(ar, x, y))
return NULL;
@@ -5768,7 +6092,7 @@ static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState s
WM_cursor_grab_disable(data->window, NULL);
}
#else
- WM_cursor_grab_disable(data->window, );
+ WM_cursor_grab_disable(data->window, NULL);
#endif
}
}
@@ -6423,90 +6747,166 @@ static int ui_handle_button_event(bContext *C, const wmEvent *event, uiBut *but)
static int ui_handle_list_event(bContext *C, const wmEvent *event, ARegion *ar)
{
- uiBut *but = ui_list_find_mouse_over(ar, event->x, event->y);
+ uiBut *but, *dragbut;
+ uiList *ui_list;
+ uiListDyn *dyn_data;
int retval = WM_UI_HANDLER_CONTINUE;
int type = event->type, val = event->val;
+ int mx, my;
+ bool is_over_dragbut = false;
- if (but) {
- uiList *ui_list = but->custom_data;
+ but = ui_list_find_mouse_over(ar, event->x, event->y);
+ if (!but) {
+ return retval;
+ }
- if (ui_list) {
-
- /* convert pan to scrollwheel */
- if (type == MOUSEPAN) {
- ui_pan_to_scroll(event, &type, &val);
-
- /* if type still is mousepan, we call it handled, since delta-y accumulate */
- /* also see wm_event_system.c do_wheel_ui hack */
- if (type == MOUSEPAN)
- retval = WM_UI_HANDLER_BREAK;
- }
-
- if (val == KM_PRESS) {
-
- if (ELEM(type, UPARROWKEY, DOWNARROWKEY) ||
- ((ELEM(type, WHEELUPMOUSE, WHEELDOWNMOUSE) && event->alt)))
- {
- const int value_orig = RNA_property_int_get(&but->rnapoin, but->rnaprop);
- int value, min, max;
+ ui_list = but->custom_data;
+ if (!ui_list || !ui_list->dyn_data) {
+ return retval;
+ }
+ dyn_data = ui_list->dyn_data;
- /* activate up/down the list */
- value = value_orig;
+ mx = event->x;
+ my = event->y;
+ ui_window_to_block(ar, but->block, &mx, &my);
- if (ELEM(type, UPARROWKEY, WHEELUPMOUSE))
- value--;
- else
- value++;
+ /* Find our "dragging" button. */
+ for (dragbut = but->block->buttons.first; dragbut; dragbut = dragbut->next) {
+ if (dragbut->poin == (void *)ui_list) {
+ break;
+ }
+ }
+ if (dragbut && dragbut == ui_but_find_mouse_over(ar, event->x, event->y)) {
+ is_over_dragbut = true;
+ }
+
+ if (is_over_dragbut && type == LEFTMOUSE && val == KM_PRESS) {
+ uiHandleButtonData *data;
+ int *size = (int *)but->poin;
- CLAMP(value, 0, ui_list->list_last_len - 1);
+ ui_handle_button_activate(C, ar, but, BUTTON_ACTIVATE);
+ button_activate_state(C, but, BUTTON_STATE_INIT);
- if (value < ui_list->list_scroll)
- ui_list->list_scroll = value;
- else if (value >= ui_list->list_scroll + ui_list->list_size)
- ui_list->list_scroll = value - ui_list->list_size + 1;
+ data = but->active;
+ data->dragstarty = my;
+
+ button_activate_state(C, but, BUTTON_STATE_NUM_EDITING);
+
+ /* Again, have to override values set by ui_numedit_begin, because our listbox button also has a rnapoin... */
+ *size = data->origvalue = (double)dyn_data->visual_height;
+ ui_list->flag |= UILST_RESIZING;
- RNA_property_int_range(&but->rnapoin, but->rnaprop, &min, &max);
- value = CLAMPIS(value, min, max);
+ retval = WM_UI_HANDLER_BREAK;
+ }
+ else {
+ /* convert pan to scrollwheel */
+ if (type == MOUSEPAN) {
+ ui_pan_to_scroll(event, &type, &val);
- if (value != value_orig) {
- RNA_property_int_set(&but->rnapoin, but->rnaprop, value);
- RNA_property_update(C, &but->rnapoin, but->rnaprop);
+ /* if type still is mousepan, we call it handled, since delta-y accumulate */
+ /* also see wm_event_system.c do_wheel_ui hack */
+ if (type == MOUSEPAN)
+ retval = WM_UI_HANDLER_BREAK;
+ }
- ui_apply_undo(but);
- ED_region_tag_redraw(ar);
+ if (val == KM_PRESS) {
+ if (ELEM(type, UPARROWKEY, DOWNARROWKEY) ||
+ ((ELEM(type, WHEELUPMOUSE, WHEELDOWNMOUSE) && event->alt)))
+ {
+ const int value_orig = RNA_property_int_get(&but->rnapoin, but->rnaprop);
+ int value, min, max, inc;
+
+ /* activate up/down the list */
+ value = value_orig;
+ if ((ui_list->filter_sort_flag & UILST_FLT_SORT_REVERSE) != 0) {
+ inc = ELEM(type, UPARROWKEY, WHEELUPMOUSE) ? 1 : -1;
+ }
+ else {
+ inc = ELEM(type, UPARROWKEY, WHEELUPMOUSE) ? -1 : 1;
+ }
+
+ if (dyn_data->items_filter_neworder || dyn_data->items_filter_flags) {
+ /* If we have a display order different from collection order, we have some work! */
+ int *org_order = MEM_mallocN(dyn_data->items_shown * sizeof(int), AT);
+ int *new_order = dyn_data->items_filter_neworder;
+ int i, org_idx = -1, len = dyn_data->items_len;
+ int current_idx = -1;
+ int filter_exclude = ui_list->filter_flag & UILST_FLT_EXCLUDE;
+
+ for (i = 0; i < len; i++) {
+ if (!dyn_data->items_filter_flags ||
+ ((dyn_data->items_filter_flags[i] & UILST_FLT_ITEM) ^ filter_exclude))
+ {
+ org_order[new_order ? new_order[++org_idx] : ++org_idx] = i;
+ if (i == value) {
+ current_idx = new_order ? new_order[org_idx] : org_idx;
+ }
+ }
+ else if (i == value && org_idx >= 0) {
+ current_idx = -(new_order ? new_order[org_idx] : org_idx) - 1;
+ }
+ }
+ /* Now, org_order maps displayed indices to real indices,
+ * and current_idx either contains the displayed index of active value (positive),
+ * or its more-nearest one (negated).
+ */
+ if (current_idx < 0) {
+ current_idx = (current_idx * -1) + (inc < 0 ? inc : inc - 1);
}
+ else {
+ current_idx += inc;
+ }
+ CLAMP(current_idx, 0, dyn_data->items_shown - 1);
+ value = org_order[current_idx];
+ MEM_freeN(org_order);
+ }
+ else {
+ value += inc;
+ }
- retval = WM_UI_HANDLER_BREAK;
+ CLAMP(value, 0, dyn_data->items_len - 1);
+
+ RNA_property_int_range(&but->rnapoin, but->rnaprop, &min, &max);
+ CLAMP(value, min, max);
+
+ if (value != value_orig) {
+ RNA_property_int_set(&but->rnapoin, but->rnaprop, value);
+ RNA_property_update(C, &but->rnapoin, but->rnaprop);
+
+ ui_apply_undo(but);
+
+ ui_list->flag |= UILST_SCROLL_TO_ACTIVE_ITEM;
+ ED_region_tag_redraw(ar);
}
- else if (ELEM(type, WHEELUPMOUSE, WHEELDOWNMOUSE) && event->shift) {
- /* silly replacement for proper grip */
- if (ui_list->list_grip_size == 0)
- ui_list->list_grip_size = ui_list->list_size;
+ retval = WM_UI_HANDLER_BREAK;
+ }
+ else if (ELEM(type, WHEELUPMOUSE, WHEELDOWNMOUSE) && event->shift) {
+ /* We now have proper grip, but keep this anyway! */
+ if (ui_list->list_grip == 0)
+ ui_list->list_grip = dyn_data->visual_height;
+ /* list template will clamp */
+ if (type == WHEELUPMOUSE)
+ ui_list->list_grip--;
+ else
+ ui_list->list_grip++;
+ ui_list->flag |= UILST_SCROLL_TO_ACTIVE_ITEM;
+ ED_region_tag_redraw(ar);
+
+ retval = WM_UI_HANDLER_BREAK;
+ }
+ else if (ELEM(type, WHEELUPMOUSE, WHEELDOWNMOUSE)) {
+ if (dyn_data->height > dyn_data->visual_height) {
+ /* list template will clamp */
if (type == WHEELUPMOUSE)
- ui_list->list_grip_size--;
+ ui_list->list_scroll--;
else
- ui_list->list_grip_size++;
-
- ui_list->list_grip_size = MAX2(ui_list->list_grip_size, 1);
+ ui_list->list_scroll++;
ED_region_tag_redraw(ar);
retval = WM_UI_HANDLER_BREAK;
}
- else if (ELEM(type, WHEELUPMOUSE, WHEELDOWNMOUSE)) {
- if (ui_list->list_last_len > ui_list->list_size) {
- /* list template will clamp */
- if (type == WHEELUPMOUSE)
- ui_list->list_scroll--;
- else
- ui_list->list_scroll++;
-
- ED_region_tag_redraw(ar);
-
- retval = WM_UI_HANDLER_BREAK;
- }
- }
}
}
}
@@ -7511,6 +7911,8 @@ static int ui_handler_popup(bContext *C, const wmEvent *event, void *userdata)
}
else if (temp.cancel_func)
temp.cancel_func(C, temp.popup_arg);
+
+ WM_event_add_mousemove(C);
}
else {
/* re-enable tooltips */
@@ -7585,3 +7987,7 @@ bool UI_textbutton_activate_event(const bContext *C, ARegion *ar,
}
}
+void ui_button_clipboard_free(void)
+{
+ curvemapping_free_data(&but_copypaste_curve);
+}
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h
index d2a8c47b347..be0a2810d2e 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -393,7 +393,7 @@ extern bool ui_set_but_string(struct bContext *C, uiBut *but, const char *str);
extern bool ui_set_but_string_eval_num(struct bContext *C, uiBut *but, const char *str, double *value);
extern int ui_get_but_string_max_length(uiBut *but);
-extern void ui_set_but_default(struct bContext *C, short all);
+extern void ui_set_but_default(struct bContext *C, const bool all);
extern void ui_check_but(uiBut *but);
extern bool ui_is_but_float(uiBut *but);
@@ -402,6 +402,7 @@ extern bool ui_is_but_unit(uiBut *but);
extern bool ui_is_but_rna_valid(uiBut *but);
extern bool ui_is_but_utf8(uiBut *but);
extern bool ui_is_but_interactive(uiBut *but);
+extern bool ui_is_but_search_unlink_visible(uiBut *but);
extern int ui_is_but_push_ex(uiBut *but, double *value);
extern int ui_is_but_push(uiBut *but);
@@ -522,6 +523,7 @@ extern void ui_button_active_free(const struct bContext *C, uiBut *but);
extern bool ui_button_is_active(struct ARegion *ar);
extern int ui_button_open_menu_direction(uiBut *but);
extern void ui_button_text_password_hide(char password_str[UI_MAX_DRAW_STR], uiBut *but, int restore);
+void ui_button_clipboard_free(void);
/* interface_widgets.c */
void ui_draw_anti_tria(float x1, float y1, float x2, float y2, float x3, float y3);
@@ -538,7 +540,7 @@ extern void ui_draw_but(const struct bContext *C, ARegion *ar, struct uiStyle *s
struct ThemeUI;
void ui_widget_color_init(struct ThemeUI *tui);
-void ui_draw_menu_item(struct uiFontStyle *fstyle, rcti *rect, const char *name, int iconid, int state);
+void ui_draw_menu_item(struct uiFontStyle *fstyle, rcti *rect, const char *name, int iconid, int state, bool use_sep);
void ui_draw_preview_item(struct uiFontStyle *fstyle, rcti *rect, const char *name, int iconid, int state);
extern const unsigned char checker_stipple_sml[32 * 32 / 8];
@@ -584,4 +586,8 @@ int ui_but_anim_expression_set(uiBut *but, const char *str);
int ui_but_anim_expression_create(uiBut *but, const char *str);
void ui_but_anim_autokey(struct bContext *C, uiBut *but, struct Scene *scene, float cfra);
-#endif
+/* interface_eyedropper.c */
+void UI_OT_eyedropper_color(struct wmOperatorType *ot);
+void UI_OT_eyedropper_id(struct wmOperatorType *ot);
+
+#endif /* __INTERFACE_INTERN_H__ */
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 079ba97aa9d..b453a3b8363 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -471,6 +471,8 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, in
but->type = NUMSLI;
if (toggle && but->type == OPTION)
but->type = TOG;
+ if ((a == 0) && (subtype == PROP_AXISANGLE))
+ uiButSetUnitType(but, PROP_UNIT_ROTATION);
}
if (boolarr) {
@@ -503,6 +505,14 @@ static void ui_item_enum_expand_handle(bContext *C, void *arg1, void *arg2)
static void ui_item_enum_expand(uiLayout *layout, uiBlock *block, PointerRNA *ptr, PropertyRNA *prop,
const char *uiname, int h, int icon_only)
{
+ /* XXX The way this function currently handles uiname parameter is insane and inconsistent with general UI API:
+ * * uiname is the *enum property* label.
+ * * when it is NULL or empty, we do not draw *enum items* labels, this doubles the icon_only parameter.
+ * * we *never* draw (i.e. really use) the enum label uiname, it is just used as a mere flag!
+ * Unfortunately, fixing this implies an API "soft break", so better to defer it for later... :/
+ * --mont29
+ */
+
uiBut *but;
EnumPropertyItem *item, *item_array;
const char *name;
@@ -568,7 +578,7 @@ static uiBut *ui_item_with_label(uiLayout *layout, uiBlock *block, const char *n
PropertySubType subtype;
int labelw;
- sub = uiLayoutRow(layout, FALSE);
+ sub = uiLayoutRow(layout, layout->align);
uiBlockSetCurLayout(block, sub);
if (name[0]) {
@@ -1465,6 +1475,7 @@ void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propna
uiBlock *block;
StructRNA *icontype;
int w, h;
+ char namestr[UI_MAX_NAME_STR];
/* validate arguments */
prop = RNA_struct_find_property(ptr, propname);
@@ -1507,6 +1518,8 @@ void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propna
if (!name)
name = RNA_property_ui_name(prop);
+ name = ui_item_name_add_colon(name, namestr);
+
/* create button */
block = uiLayoutGetBlock(layout);
@@ -2429,6 +2442,15 @@ uiLayout *uiLayoutListBox(uiLayout *layout, uiList *ui_list, PointerRNA *ptr, Pr
but->rnapoin = *actptr;
but->rnaprop = actprop;
+ /* Resizing data. */
+ /* Note: we can't use usual "num button" value handling, as it only tries rnapoin when it is non-NULL... :/
+ * So just setting but->poin, not but->pointype.
+ */
+ but->poin = (void *)&ui_list->list_grip;
+ but->hardmin = but->softmin = 0.0f;
+ but->hardmax = but->softmax = 1000.0f; /* Should be more than enough! */
+ but->a1 = 0.0f;
+
/* only for the undo string */
if (but->flag & UI_BUT_UNDO) {
but->tip = RNA_property_description(actprop);
@@ -2678,8 +2700,9 @@ static void ui_item_align(uiLayout *litem, short nr)
BLI_remlink(&litem->root->block->buttons, box->roundbox);
BLI_addhead(&litem->root->block->buttons, box->roundbox);
}
- else
+ else if (((uiLayout *)item)->align) {
ui_item_align((uiLayout *)item, nr);
+ }
}
}
@@ -3076,20 +3099,25 @@ void uiLayoutOperatorButs(const bContext *C, uiLayout *layout, wmOperator *op,
/* set various special settings for buttons */
{
+ uiBlock *block = uiLayoutGetBlock(layout);
+ const bool is_popup = (block->flag & UI_BLOCK_KEEP_OPEN) != 0;
uiBut *but;
+
- for (but = uiLayoutGetBlock(layout)->buttons.first; but; but = but->next) {
+ for (but = block->buttons.first; but; but = but->next) {
/* no undo for buttons for operator redo panels */
uiButClearFlag(but, UI_BUT_UNDO);
-#if 0 /* broken, causes freedback loop, see [#36109] */
+ /* only for popups, see [#36109] */
+
/* if button is operator's default property, and a text-field, enable focus for it
* - this is used for allowing operators with popups to rename stuff with fewer clicks
*/
- if ((but->rnaprop == op->type->prop) && (but->type == TEX)) {
- uiButSetFocusOnEnter(CTX_wm_window(C), but);
+ if (is_popup) {
+ if ((but->rnaprop == op->type->prop) && (but->type == TEX)) {
+ uiButSetFocusOnEnter(CTX_wm_window(C), but);
+ }
}
-#endif
}
}
}
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c
index cfe6e313c58..36e965e13d2 100644
--- a/source/blender/editors/interface/interface_ops.c
+++ b/source/blender/editors/interface/interface_ops.c
@@ -27,20 +27,14 @@
* \ingroup edinterface
*/
-#include <stdio.h>
-#include <math.h>
#include <string.h>
#include "MEM_guardedalloc.h"
-#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_text_types.h" /* for UI_OT_reports_to_text */
#include "BLI_blenlib.h"
-#include "BLI_math_color.h"
-#include "BLI_math_vector.h"
-#include "BLI_utildefines.h"
#include "BLF_api.h"
#include "BLF_translation.h"
@@ -54,12 +48,8 @@
#include "RNA_access.h"
#include "RNA_define.h"
-#include "BIF_gl.h"
-
#include "UI_interface.h"
-#include "IMB_colormanagement.h"
-
#include "interface_intern.h"
#include "WM_api.h"
@@ -70,282 +60,6 @@
#include "BKE_main.h"
#include "BLI_ghash.h"
-#include "ED_image.h" /* for HDR color sampling */
-#include "ED_node.h" /* for HDR color sampling */
-#include "ED_clip.h" /* for HDR color sampling */
-
-/* ********************************************************** */
-
-typedef struct Eyedropper {
- struct ColorManagedDisplay *display;
-
- PointerRNA ptr;
- PropertyRNA *prop;
- int index;
-
- int accum_start; /* has mouse been presed */
- float accum_col[3];
- int accum_tot;
-} Eyedropper;
-
-static int eyedropper_init(bContext *C, wmOperator *op)
-{
- Scene *scene = CTX_data_scene(C);
- Eyedropper *eye;
-
- op->customdata = eye = MEM_callocN(sizeof(Eyedropper), "Eyedropper");
-
- uiContextActiveProperty(C, &eye->ptr, &eye->prop, &eye->index);
-
- if ((eye->ptr.data == NULL) ||
- (eye->prop == NULL) ||
- (RNA_property_editable(&eye->ptr, eye->prop) == FALSE) ||
- (RNA_property_array_length(&eye->ptr, eye->prop) < 3) ||
- (RNA_property_type(eye->prop) != PROP_FLOAT))
- {
- return FALSE;
- }
-
- if (RNA_property_subtype(eye->prop) == PROP_COLOR) {
- const char *display_device;
-
- display_device = scene->display_settings.display_device;
- eye->display = IMB_colormanagement_display_get_named(display_device);
- }
-
- return TRUE;
-}
-
-static void eyedropper_exit(bContext *C, wmOperator *op)
-{
- WM_cursor_restore(CTX_wm_window(C));
-
- if (op->customdata)
- MEM_freeN(op->customdata);
- op->customdata = NULL;
-}
-
-static int eyedropper_cancel(bContext *C, wmOperator *op)
-{
- eyedropper_exit(C, op);
- return OPERATOR_CANCELLED;
-}
-
-/* *** eyedropper_color_ helper functions *** */
-
-/**
- * \brief get the color from the screen.
- *
- * Special check for image or nodes where we MAY have HDR pixels which don't display.
- */
-static void eyedropper_color_sample_fl(bContext *C, Eyedropper *UNUSED(eye), int mx, int my, float r_col[3])
-{
-
- /* we could use some clever */
- wmWindow *win = CTX_wm_window(C);
- ScrArea *sa;
- for (sa = win->screen->areabase.first; sa; sa = sa->next) {
- if (BLI_rcti_isect_pt(&sa->totrct, mx, my)) {
- if (sa->spacetype == SPACE_IMAGE) {
- ARegion *ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
- if (ar && BLI_rcti_isect_pt(&ar->winrct, mx, my)) {
- SpaceImage *sima = sa->spacedata.first;
- int mval[2] = {mx - ar->winrct.xmin,
- my - ar->winrct.ymin};
-
- if (ED_space_image_color_sample(sima, ar, mval, r_col)) {
- return;
- }
- }
- }
- else if (sa->spacetype == SPACE_NODE) {
- ARegion *ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
- if (ar && BLI_rcti_isect_pt(&ar->winrct, mx, my)) {
- SpaceNode *snode = sa->spacedata.first;
- int mval[2] = {mx - ar->winrct.xmin,
- my - ar->winrct.ymin};
-
- if (ED_space_node_color_sample(snode, ar, mval, r_col)) {
- return;
- }
- }
- }
- else if (sa->spacetype == SPACE_CLIP) {
- ARegion *ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
- if (ar && BLI_rcti_isect_pt(&ar->winrct, mx, my)) {
- SpaceClip *sc = sa->spacedata.first;
- int mval[2] = {mx - ar->winrct.xmin,
- my - ar->winrct.ymin};
-
- if (ED_space_clip_color_sample(sc, ar, mval, r_col)) {
- return;
- }
- }
- }
- }
- }
-
- /* fallback to simple opengl picker */
- glReadBuffer(GL_FRONT);
- glReadPixels(mx, my, 1, 1, GL_RGB, GL_FLOAT, r_col);
- glReadBuffer(GL_BACK);
-}
-
-/* sets the sample color RGB, maintaining A */
-static void eyedropper_color_set(bContext *C, Eyedropper *eye, const float col[3])
-{
- float col_conv[4];
-
- /* to maintain alpha */
- RNA_property_float_get_array(&eye->ptr, eye->prop, col_conv);
-
- /* convert from display space to linear rgb space */
- if (eye->display) {
- copy_v3_v3(col_conv, col);
- IMB_colormanagement_display_to_scene_linear_v3(col_conv, eye->display);
- }
- else {
- copy_v3_v3(col_conv, col);
- }
-
- RNA_property_float_set_array(&eye->ptr, eye->prop, col_conv);
-
- RNA_property_update(C, &eye->ptr, eye->prop);
-}
-
-/* set sample from accumulated values */
-static void eyedropper_color_set_accum(bContext *C, Eyedropper *eye)
-{
- float col[3];
- mul_v3_v3fl(col, eye->accum_col, 1.0f / (float)eye->accum_tot);
- eyedropper_color_set(C, eye, col);
-}
-
-/* single point sample & set */
-static void eyedropper_color_sample(bContext *C, Eyedropper *eye, int mx, int my)
-{
- float col[3];
- eyedropper_color_sample_fl(C, eye, mx, my, col);
- eyedropper_color_set(C, eye, col);
-}
-
-static void eyedropper_color_sample_accum(bContext *C, Eyedropper *eye, int mx, int my)
-{
- float col[3];
- eyedropper_color_sample_fl(C, eye, mx, my, col);
- /* delay linear conversion */
- add_v3_v3(eye->accum_col, col);
- eye->accum_tot++;
-}
-
-/* main modal status check */
-static int eyedropper_modal(bContext *C, wmOperator *op, const wmEvent *event)
-{
- Eyedropper *eye = (Eyedropper *)op->customdata;
-
- switch (event->type) {
- case ESCKEY:
- case RIGHTMOUSE:
- return eyedropper_cancel(C, op);
- case LEFTMOUSE:
- if (event->val == KM_RELEASE) {
- if (eye->accum_tot == 0) {
- eyedropper_color_sample(C, eye, event->x, event->y);
- }
- else {
- eyedropper_color_set_accum(C, eye);
- }
- eyedropper_exit(C, op);
- return OPERATOR_FINISHED;
- }
- else if (event->val == KM_PRESS) {
- /* enable accum and make first sample */
- eye->accum_start = TRUE;
- eyedropper_color_sample_accum(C, eye, event->x, event->y);
- }
- break;
- case MOUSEMOVE:
- if (eye->accum_start) {
- /* button is pressed so keep sampling */
- eyedropper_color_sample_accum(C, eye, event->x, event->y);
- eyedropper_color_set_accum(C, eye);
- }
- break;
- case SPACEKEY:
- if (event->val == KM_RELEASE) {
- eye->accum_tot = 0;
- zero_v3(eye->accum_col);
- eyedropper_color_sample_accum(C, eye, event->x, event->y);
- eyedropper_color_set_accum(C, eye);
- }
- break;
- }
-
- return OPERATOR_RUNNING_MODAL;
-}
-
-/* Modal Operator init */
-static int eyedropper_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
-{
- /* init */
- if (eyedropper_init(C, op)) {
- WM_cursor_modal(CTX_wm_window(C), BC_EYEDROPPER_CURSOR);
-
- /* add temp handler */
- WM_event_add_modal_handler(C, op);
-
- return OPERATOR_RUNNING_MODAL;
- }
- else {
- eyedropper_exit(C, op);
- return OPERATOR_CANCELLED;
- }
-}
-
-/* Repeat operator */
-static int eyedropper_exec(bContext *C, wmOperator *op)
-{
- /* init */
- if (eyedropper_init(C, op)) {
-
- /* do something */
-
- /* cleanup */
- eyedropper_exit(C, op);
-
- return OPERATOR_FINISHED;
- }
- else {
- return OPERATOR_CANCELLED;
- }
-}
-
-static int eyedropper_poll(bContext *C)
-{
- if (!CTX_wm_window(C)) return 0;
- else return 1;
-}
-
-static void UI_OT_eyedropper(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name = "Eyedropper";
- ot->idname = "UI_OT_eyedropper";
- ot->description = "Sample a color from the Blender Window to store in a property";
-
- /* api callbacks */
- ot->invoke = eyedropper_invoke;
- ot->modal = eyedropper_modal;
- ot->cancel = eyedropper_cancel;
- ot->exec = eyedropper_exec;
- ot->poll = eyedropper_poll;
-
- /* flags */
- ot->flag = OPTYPE_BLOCKING;
-
- /* properties */
-}
-
/* Reset Default Theme ------------------------ */
static int reset_default_theme_exec(bContext *C, wmOperator *UNUSED(op))
@@ -434,6 +148,28 @@ static void UI_OT_copy_data_path_button(wmOperatorType *ot)
/* Reset to Default Values Button Operator ------------------------ */
+static int operator_button_property_finish(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
+{
+ ID *id = ptr->id.data;
+
+ /* perform updates required for this property */
+ RNA_property_update(C, ptr, prop);
+
+ /* as if we pressed the button */
+ uiContextActivePropertyHandle(C);
+
+ /* Since we don't want to undo _all_ edits to settings, eg window
+ * edits on the screen or on operator settings.
+ * it might be better to move undo's inline - campbell */
+ if (id && ID_CHECK_UNDO(id)) {
+ /* do nothing, go ahead with undo */
+ return OPERATOR_FINISHED;
+ }
+ else {
+ return OPERATOR_CANCELLED;
+ }
+}
+
static int reset_default_button_poll(bContext *C)
{
PointerRNA ptr;
@@ -449,7 +185,6 @@ static int reset_default_button_exec(bContext *C, wmOperator *op)
{
PointerRNA ptr;
PropertyRNA *prop;
- int success = 0;
int index, all = RNA_boolean_get(op->ptr, "all");
/* try to reset the nominated setting to its default value */
@@ -457,32 +192,11 @@ static int reset_default_button_exec(bContext *C, wmOperator *op)
/* if there is a valid property that is editable... */
if (ptr.data && prop && RNA_property_editable(&ptr, prop)) {
- if (RNA_property_reset(&ptr, prop, (all) ? -1 : index)) {
- /* perform updates required for this property */
- RNA_property_update(C, &ptr, prop);
-
- /* as if we pressed the button */
- uiContextActivePropertyHandle(C);
-
- success = 1;
- }
+ if (RNA_property_reset(&ptr, prop, (all) ? -1 : index))
+ return operator_button_property_finish(C, &ptr, prop);
}
- /* Since we don't want to undo _all_ edits to settings, eg window
- * edits on the screen or on operator settings.
- * it might be better to move undo's inline - campbell */
- if (success) {
- ID *id = ptr.id.data;
- if (id && ID_CHECK_UNDO(id)) {
- /* do nothing, go ahead with undo */
- }
- else {
- return OPERATOR_CANCELLED;
- }
- }
- /* end hack */
-
- return (success) ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
+ return OPERATOR_CANCELLED;
}
static void UI_OT_reset_default_button(wmOperatorType *ot)
@@ -503,6 +217,43 @@ static void UI_OT_reset_default_button(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "all", 1, "All", "Reset to default values all elements of the array");
}
+/* Unset Property Button Operator ------------------------ */
+
+static int unset_property_button_exec(bContext *C, wmOperator *UNUSED(op))
+{
+ PointerRNA ptr;
+ PropertyRNA *prop;
+ int index;
+
+ /* try to unset the nominated property */
+ uiContextActiveProperty(C, &ptr, &prop, &index);
+
+ /* if there is a valid property that is editable... */
+ if (ptr.data && prop && RNA_property_editable(&ptr, prop)
+ /*&& RNA_property_is_idprop(prop)*/ && RNA_property_is_set(&ptr, prop))
+ {
+ RNA_property_unset(&ptr, prop);
+ return operator_button_property_finish(C, &ptr, prop);
+ }
+
+ return OPERATOR_CANCELLED;
+}
+
+static void UI_OT_unset_property_button(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Unset property";
+ ot->idname = "UI_OT_unset_property_button";
+ ot->description = "Clear the property and use default or generated value in operators";
+
+ /* callbacks */
+ ot->poll = ED_operator_regionactive;
+ ot->exec = unset_property_button_exec;
+
+ /* flags */
+ ot->flag = OPTYPE_UNDO;
+}
+
/* Copy To Selected Operator ------------------------ */
static int copy_to_selected_list(bContext *C, PointerRNA *ptr, ListBase *lb, int *use_path)
@@ -1077,10 +828,10 @@ static void UI_OT_reloadtranslation(wmOperatorType *ot)
void UI_buttons_operatortypes(void)
{
- WM_operatortype_append(UI_OT_eyedropper);
WM_operatortype_append(UI_OT_reset_default_theme);
WM_operatortype_append(UI_OT_copy_data_path_button);
WM_operatortype_append(UI_OT_reset_default_button);
+ WM_operatortype_append(UI_OT_unset_property_button);
WM_operatortype_append(UI_OT_copy_to_selected_button);
WM_operatortype_append(UI_OT_reports_to_textblock); /* XXX: temp? */
@@ -1089,4 +840,8 @@ void UI_buttons_operatortypes(void)
WM_operatortype_append(UI_OT_edittranslation_init);
#endif
WM_operatortype_append(UI_OT_reloadtranslation);
+
+ /* external */
+ WM_operatortype_append(UI_OT_eyedropper_color);
+ WM_operatortype_append(UI_OT_eyedropper_id);
}
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index 95f47be0b70..15fbd51c6fc 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -196,7 +196,7 @@ static MenuData *decompose_menu_string(const char *str)
s++;
}
}
- else if (c == '|' || c == '\n' || c == '\0') {
+ else if (c == UI_SEP_CHAR || c == '\n' || c == '\0') {
if (nitem) {
*s = '\0';
@@ -770,6 +770,7 @@ typedef struct uiSearchboxData {
int active; /* index in items array */
bool noback; /* when menu opened with enough space for this */
bool preview; /* draw thumbnail previews, rather than list */
+ bool use_sep; /* use the UI_SEP_CHAR char for splitting shortcuts (good for operators, bad for data) */
int prv_rows, prv_cols;
} uiSearchboxData;
@@ -928,7 +929,7 @@ bool ui_searchbox_apply(uiBut *but, ARegion *ar)
if (data->active != -1) {
const char *name = data->items.names[data->active];
- const char *name_sep = strchr(name, '|');
+ const char *name_sep = data->use_sep ? strchr(name, UI_SEP_CHAR) : NULL;
BLI_strncpy(but->editstr, name, name_sep ? (name_sep - name) : data->items.maxstrlen);
@@ -1034,7 +1035,7 @@ void ui_searchbox_update(bContext *C, ARegion *ar, uiBut *but, const bool reset)
for (a = 0; a < data->items.totitem; a++) {
const char *name = data->items.names[a];
- const char *name_sep = strchr(name, '|');
+ const char *name_sep = data->use_sep ? strchr(name, UI_SEP_CHAR) : NULL;
if (STREQLEN(but->editstr, name, name_sep ? (name_sep - name) : data->items.maxstrlen)) {
data->active = a;
break;
@@ -1087,10 +1088,14 @@ static void ui_searchbox_region_draw_cb(const bContext *UNUSED(C), ARegion *ar)
ui_searchbox_butrect(&rect, data, a);
/* widget itself */
- if (data->preview)
- ui_draw_preview_item(&data->fstyle, &rect, data->items.names[a], data->items.icons[a], (a == data->active) ? UI_ACTIVE : 0);
- else
- ui_draw_menu_item(&data->fstyle, &rect, data->items.names[a], data->items.icons[a], (a == data->active) ? UI_ACTIVE : 0);
+ if (data->preview) {
+ ui_draw_preview_item(&data->fstyle, &rect, data->items.names[a], data->items.icons[a],
+ (a == data->active) ? UI_ACTIVE : 0);
+ }
+ else {
+ ui_draw_menu_item(&data->fstyle, &rect, data->items.names[a], data->items.icons[a],
+ (a == data->active) ? UI_ACTIVE : 0, data->use_sep);
+ }
}
/* indicate more */
@@ -1114,7 +1119,8 @@ static void ui_searchbox_region_draw_cb(const bContext *UNUSED(C), ARegion *ar)
ui_searchbox_butrect(&rect, data, a);
/* widget itself */
- ui_draw_menu_item(&data->fstyle, &rect, data->items.names[a], data->items.icons[a], (a == data->active) ? UI_ACTIVE : 0);
+ ui_draw_menu_item(&data->fstyle, &rect, data->items.names[a], data->items.icons[a],
+ (a == data->active) ? UI_ACTIVE : 0, data->use_sep);
}
/* indicate more */
@@ -1194,6 +1200,11 @@ ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but)
data->prv_rows = but->a1;
data->prv_cols = but->a2;
}
+
+ /* only show key shortcuts when needed (not rna buttons) [#36699] */
+ if (but->rnaprop == NULL) {
+ data->use_sep = true;
+ }
/* compute position */
if (but->block->flag & UI_BLOCK_SEARCH_MENU) {
@@ -2174,7 +2185,7 @@ static void uiBlockPicker(uiBlock *block, float rgba[4], PointerRNA *ptr, Proper
yco = -3.0f * UI_UNIT_Y;
if (show_picker) {
- bt = uiDefIconButO(block, BUT, "UI_OT_eyedropper", WM_OP_INVOKE_DEFAULT, ICON_EYEDROPPER, butwidth + 10, yco, UI_UNIT_X, UI_UNIT_Y, NULL);
+ bt = uiDefIconButO(block, BUT, "UI_OT_eyedropper_color", WM_OP_INVOKE_DEFAULT, ICON_EYEDROPPER, butwidth + 10, yco, UI_UNIT_X, UI_UNIT_Y, NULL);
uiButSetFunc(bt, close_popup_cb, bt, NULL);
}
@@ -2301,11 +2312,11 @@ static int ui_popup_string_hash(const char *str)
{
/* sometimes button contains hotkey, sometimes not, strip for proper compare */
int hash;
- char *delimit = strchr(str, '|');
+ char *delimit = strchr(str, UI_SEP_CHAR);
- if (delimit) *delimit = 0;
+ if (delimit) *delimit = '\0';
hash = BLI_ghashutil_strhash(str);
- if (delimit) *delimit = '|';
+ if (delimit) *delimit = UI_SEP_CHAR;
return hash;
}
@@ -2605,12 +2616,10 @@ static void confirm_cancel_operator(bContext *UNUSED(C), void *opv)
WM_operator_free(opv);
}
-static void vconfirm_opname(bContext *C, const char *opname, const char *title, const char *itemfmt, va_list ap)
-#ifdef __GNUC__
-__attribute__ ((format(printf, 4, 0)))
-#endif
-;
-static void vconfirm_opname(bContext *C, const char *opname, const char *title, const char *itemfmt, va_list ap)
+static void vconfirm_opname(bContext *C, const char *opname, const char *title,
+ const char *itemfmt, va_list ap) ATTR_PRINTF_FORMAT(4, 0);
+static void vconfirm_opname(bContext *C, const char *opname, const char *title,
+ const char *itemfmt, va_list ap)
{
uiPopupBlockHandle *handle;
char *s, buf[512];
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 61cc021800e..c343115be30 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -1,4 +1,5 @@
/*
+
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -43,6 +44,7 @@
#include "BLI_rect.h"
#include "BLI_math.h"
#include "BLI_listbase.h"
+#include "BLI_fnmatch.h"
#include "BLF_api.h"
#include "BLF_translation.h"
@@ -1017,6 +1019,7 @@ uiLayout *uiTemplateModifier(uiLayout *layout, bContext *C, PointerRNA *ptr)
Scene *scene = CTX_data_scene(C);
Object *ob;
ModifierData *md, *vmd;
+ VirtualModifierData virtualModifierData;
int i, lastCageIndex, cageIndex;
/* verify we have valid data */
@@ -1039,7 +1042,7 @@ uiLayout *uiTemplateModifier(uiLayout *layout, bContext *C, PointerRNA *ptr)
cageIndex = modifiers_getCageIndex(scene, ob, &lastCageIndex, 0);
/* XXX virtual modifiers are not accesible for python */
- vmd = modifiers_getVirtualModifierList(ob);
+ vmd = modifiers_getVirtualModifierList(ob, &virtualModifierData);
for (i = 0; vmd; i++, vmd = vmd->next) {
if (md == vmd)
@@ -1145,9 +1148,10 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con)
uiBlockSetEmboss(block, UI_EMBOSSN);
uiItemR(row, &ptr, "show_expanded", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
uiBlockSetEmboss(block, UI_EMBOSS);
-
+
/* name */
- uiDefBut(block, LABEL, B_CONSTRAINT_TEST, typestr, xco + 0.5f*UI_UNIT_X, yco, 5 * UI_UNIT_X, 0.9f*UI_UNIT_Y, NULL, 0.0, 0.0, 0.0, 0.0, "");
+ uiDefBut(block, LABEL, B_CONSTRAINT_TEST, typestr,
+ xco + 0.5f * UI_UNIT_X, yco, 5 * UI_UNIT_X, 0.9f * UI_UNIT_Y, NULL, 0.0, 0.0, 0.0, 0.0, "");
if (con->flag & CONSTRAINT_DISABLE)
uiLayoutSetRedAlert(row, TRUE);
@@ -1917,7 +1921,7 @@ static void curvemap_tools_dofunc(bContext *C, void *cumap_v, int event)
case UICURVE_FUNC_RESET_NEG:
case UICURVE_FUNC_RESET_POS: /* reset */
curvemap_reset(cuma, &cumap->clipr, cumap->preset,
- (event == -1) ? CURVEMAP_SLOPE_NEGATIVE : CURVEMAP_SLOPE_POSITIVE);
+ (event == UICURVE_FUNC_RESET_NEG) ? CURVEMAP_SLOPE_NEGATIVE : CURVEMAP_SLOPE_POSITIVE);
curvemapping_changed(cumap, FALSE);
break;
case UICURVE_FUNC_RESET_VIEW:
@@ -2468,7 +2472,7 @@ void uiTemplateGameStates(uiLayout *layout, PointerRNA *ptr, const char *propnam
static void uilist_draw_item_default(struct uiList *ui_list, struct bContext *UNUSED(C), struct uiLayout *layout,
struct PointerRNA *UNUSED(dataptr), struct PointerRNA *itemptr, int icon,
struct PointerRNA *UNUSED(active_dataptr), const char *UNUSED(active_propname),
- int UNUSED(index))
+ int UNUSED(index), int UNUSED(flt_flag))
{
char *namebuf;
const char *name;
@@ -2494,30 +2498,245 @@ static void uilist_draw_item_default(struct uiList *ui_list, struct bContext *UN
}
}
+static void uilist_draw_filter_default(struct uiList *ui_list, struct bContext *UNUSED(C), struct uiLayout *layout)
+{
+ PointerRNA listptr;
+ uiLayout *row, *subrow;
+
+ RNA_pointer_create(NULL, &RNA_UIList, ui_list, &listptr);
+
+ row = uiLayoutRow(layout, FALSE);
+
+ subrow = uiLayoutRow(row, TRUE);
+ uiItemR(subrow, &listptr, "filter_name", 0, "", ICON_NONE);
+ uiItemR(subrow, &listptr, "use_filter_invert", UI_ITEM_R_TOGGLE | UI_ITEM_R_ICON_ONLY, "",
+ (ui_list->filter_flag & UILST_FLT_EXCLUDE) ? ICON_ZOOM_OUT : ICON_ZOOM_IN);
+
+ subrow = uiLayoutRow(row, TRUE);
+ uiItemR(subrow, &listptr, "use_filter_sort_alpha", UI_ITEM_R_TOGGLE | UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
+ uiItemR(subrow, &listptr, "use_filter_sort_reverse", UI_ITEM_R_TOGGLE | UI_ITEM_R_ICON_ONLY, "",
+ (ui_list->filter_sort_flag & UILST_FLT_SORT_REVERSE) ? ICON_TRIA_UP : ICON_TRIA_DOWN);
+}
+
+typedef struct {
+ char name[MAX_IDPROP_NAME];
+ int org_idx;
+} StringCmp;
+
+static int cmpstringp(const void *p1, const void *p2)
+{
+ /* Case-insensitive comparison. */
+ return BLI_strcasecmp(((StringCmp *) p1)->name, ((StringCmp *) p2)->name);
+}
+
+static void uilist_filter_items_default(struct uiList *ui_list, struct bContext *UNUSED(C), struct PointerRNA *dataptr,
+ const char *propname)
+{
+ uiListDyn *dyn_data = ui_list->dyn_data;
+ PropertyRNA *prop = RNA_struct_find_property(dataptr, propname);
+
+ const char *filter_raw = ui_list->filter_byname;
+ char *filter = (char *)filter_raw, filter_buff[32], *filter_dyn = NULL;
+ bool filter_exclude = (ui_list->filter_flag & UILST_FLT_EXCLUDE) != 0;
+ bool order_by_name = (ui_list->filter_sort_flag & UILST_FLT_SORT_ALPHA) != 0;
+ int len = RNA_property_collection_length(dataptr, prop);
+
+ dyn_data->items_shown = dyn_data->items_len = len;
+
+ if (len && (order_by_name || filter_raw[0])) {
+ StringCmp *names = NULL;
+ int order_idx = 0, i = 0;
+
+ if (order_by_name) {
+ names = MEM_callocN(sizeof(StringCmp) * len, AT);
+ }
+ if (filter_raw[0]) {
+ size_t idx = 0, slen = strlen(filter_raw);
+
+ dyn_data->items_filter_flags = MEM_callocN(sizeof(int) * len, AT);
+ dyn_data->items_shown = 0;
+
+ /* Implicitly add heading/trailing wildcards if needed. */
+ if (len + 3 <= 32) {
+ filter = filter_buff;
+ }
+ else {
+ filter = filter_dyn = MEM_mallocN((slen + 3) * sizeof(char), AT);
+ }
+ if (filter_raw[idx] != '*') {
+ filter[idx++] = '*';
+ }
+ memcpy(filter + idx, filter_raw, slen);
+ idx += slen;
+ if (filter[idx - 1] != '*') {
+ filter[idx++] = '*';
+ }
+ filter[idx] = '\0';
+ }
+
+ RNA_PROP_BEGIN (dataptr, itemptr, prop)
+ {
+ char *namebuf;
+ const char *name;
+ bool do_order = false;
+
+ namebuf = RNA_struct_name_get_alloc(&itemptr, NULL, 0, NULL);
+ name = namebuf ? namebuf : "";
+
+ if (filter[0]) {
+ /* Case-insensitive! */
+ if (fnmatch(filter, name, FNM_CASEFOLD) == 0) {
+ dyn_data->items_filter_flags[i] = UILST_FLT_ITEM;
+ if (!filter_exclude) {
+ dyn_data->items_shown++;
+ do_order = order_by_name;
+ }
+ //printf("%s: '%s' matches '%s'\n", __func__, name, filter);
+ }
+ else if (filter_exclude) {
+ dyn_data->items_shown++;
+ do_order = order_by_name;
+ }
+ }
+ else {
+ do_order = order_by_name;
+ }
+
+ if (do_order) {
+ names[order_idx].org_idx = order_idx;
+ BLI_strncpy(names[order_idx++].name, name, MAX_IDPROP_NAME);
+ }
+
+ /* free name */
+ if (namebuf) {
+ MEM_freeN(namebuf);
+ }
+ i++;
+ }
+ RNA_PROP_END;
+
+ if (order_by_name) {
+ int new_idx;
+ /* note: order_idx equals either to ui_list->items_len if no filtering done,
+ * or to ui_list->items_shown if filter is enabled,
+ * or to (ui_list->items_len - ui_list->items_shown) if filtered items are excluded.
+ * This way, we only sort items we actually intend to draw!
+ */
+ qsort(names, order_idx, sizeof(StringCmp), cmpstringp);
+
+ dyn_data->items_filter_neworder = MEM_mallocN(sizeof(int) * order_idx, AT);
+ for (new_idx = 0; new_idx < order_idx; new_idx++) {
+ dyn_data->items_filter_neworder[names[new_idx].org_idx] = new_idx;
+ }
+ }
+
+ if (filter_dyn) {
+ MEM_freeN(filter_dyn);
+ }
+ if (names) {
+ MEM_freeN(names);
+ }
+ }
+}
+
+typedef struct {
+ PointerRNA item;
+ int org_idx;
+ int flt_flag;
+} _uilist_item;
+
+typedef struct {
+ int visual_items; /* Visual number of items (i.e. number of items we have room to display). */
+ int start_idx; /* Index of first item to display. */
+ int end_idx; /* Index of last item to display + 1. */
+} uiListLayoutdata;
+
+static void prepare_list(uiList *ui_list, int len, int activei, int rows, int maxrows, int columns,
+ uiListLayoutdata *layoutdata)
+{
+ uiListDyn *dyn_data = ui_list->dyn_data;
+ int activei_row, max_scroll;
+
+ /* default rows */
+ if (rows == 0)
+ rows = 5;
+ dyn_data->visual_height_min = rows;
+ if (maxrows == 0)
+ maxrows = 5;
+ if (columns == 0)
+ columns = 9;
+
+ if (ui_list->list_grip >= rows) {
+ maxrows = rows = ui_list->list_grip;
+ }
+ else {
+ ui_list->list_grip = 0; /* Reset to auto-size mode. */
+ /* Prevent auto-size mode to take effect while grab-resizing! */
+ if (ui_list->flag & UILST_RESIZING) {
+ maxrows = rows;
+ }
+ }
+
+ if (columns > 1) {
+ dyn_data->height = (int)ceil((double)len / (double)columns);
+ activei_row = (int)floor((double)activei / (double)columns);
+ }
+ else {
+ dyn_data->height = len;
+ activei_row = activei;
+ }
+
+ /* Expand size if needed and possible. */
+ if ((ui_list->list_grip == 0) && (rows != maxrows) && (dyn_data->height > rows)) {
+ rows = min_ii(dyn_data->height, maxrows);
+ }
+
+ /* If list length changes or list is tagged to check this, and active is out of view, scroll to it .*/
+ if (ui_list->list_last_len != len || ui_list->flag & UILST_SCROLL_TO_ACTIVE_ITEM) {
+ if (activei_row < ui_list->list_scroll) {
+ ui_list->list_scroll = activei_row;
+ }
+ else if (activei_row >= ui_list->list_scroll + rows) {
+ ui_list->list_scroll = activei_row - rows + 1;
+ }
+ ui_list->flag &= ~UILST_SCROLL_TO_ACTIVE_ITEM;
+ }
+
+ max_scroll = max_ii(0, dyn_data->height - rows);
+ CLAMP(ui_list->list_scroll, 0, max_scroll);
+ ui_list->list_last_len = len;
+ dyn_data->visual_height = rows;
+ layoutdata->visual_items = rows * columns;
+ layoutdata->start_idx = ui_list->list_scroll * columns;
+ layoutdata->end_idx = min_ii(layoutdata->start_idx + rows * columns, len);
+}
+
void uiTemplateList(uiLayout *layout, bContext *C, const char *listtype_name, const char *list_id,
PointerRNA *dataptr, const char *propname, PointerRNA *active_dataptr,
- const char *active_propname, int rows, int maxrows, int layout_type)
+ const char *active_propname, int rows, int maxrows, int layout_type, int columns)
{
uiListType *ui_list_type;
uiList *ui_list = NULL;
+ uiListDyn *dyn_data;
ARegion *ar;
uiListDrawItemFunc draw_item;
+ uiListDrawFilterFunc draw_filter;
+ uiListFilterItemsFunc filter_items;
PropertyRNA *prop = NULL, *activeprop;
PropertyType type, activetype;
+ _uilist_item *items_ptr = NULL;
StructRNA *ptype;
- uiLayout *box, *row, *col, *sub, *overlap;
+ uiLayout *glob = NULL, *box, *row, *col, *subrow, *sub, *overlap;
uiBlock *block, *subblock;
uiBut *but;
+ uiListLayoutdata layoutdata;
char ui_list_id[UI_MAX_NAME_STR];
char numstr[32];
int rnaicon = ICON_NONE, icon = ICON_NONE;
int i = 0, activei = 0;
int len = 0;
- int items;
- int found;
- int min, max;
/* validate arguments */
/* Forbid default UI_UL_DEFAULT_CLASS_NAME list class without a custom list_id! */
@@ -2580,6 +2799,8 @@ void uiTemplateList(uiLayout *layout, bContext *C, const char *listtype_name, co
}
draw_item = ui_list_type->draw_item ? ui_list_type->draw_item : uilist_draw_item_default;
+ draw_filter = ui_list_type->draw_filter ? ui_list_type->draw_filter : uilist_draw_filter_default;
+ filter_items = ui_list_type->filter_items ? ui_list_type->filter_items : uilist_filter_items_default;
/* Find or add the uiList to the current Region. */
/* We tag the list id with the list type... */
@@ -2589,146 +2810,211 @@ void uiTemplateList(uiLayout *layout, bContext *C, const char *listtype_name, co
ui_list = BLI_findstring(&ar->ui_lists, ui_list_id, offsetof(uiList, list_id));
if (!ui_list) {
- ui_list = MEM_callocN(sizeof(uiList), __func__);
+ ui_list = MEM_callocN(sizeof(uiList), AT);
BLI_strncpy(ui_list->list_id, ui_list_id, sizeof(ui_list->list_id));
BLI_addtail(&ar->ui_lists, ui_list);
}
+ if (!ui_list->dyn_data) {
+ ui_list->dyn_data = MEM_callocN(sizeof(uiListDyn), AT);
+ }
+ dyn_data = ui_list->dyn_data;
+
/* Because we can't actually pass type across save&load... */
ui_list->type = ui_list_type;
ui_list->layout_type = layout_type;
+ /* Reset filtering data. */
+ if (dyn_data->items_filter_flags) {
+ MEM_freeN(dyn_data->items_filter_flags);
+ dyn_data->items_filter_flags = NULL;
+ }
+ if (dyn_data->items_filter_neworder) {
+ MEM_freeN(dyn_data->items_filter_neworder);
+ dyn_data->items_filter_neworder = NULL;
+ }
+ dyn_data->items_len = dyn_data->items_shown = -1;
+
+ /* Filter list items! (not for compact layout, though) */
+ if (dataptr->data && prop) {
+ int filter_exclude = ui_list->filter_flag & UILST_FLT_EXCLUDE;
+ bool order_reverse = (ui_list->filter_sort_flag & UILST_FLT_SORT_REVERSE) != 0;
+ int items_shown, idx = 0;
+#if 0
+ int prev_ii = -1, prev_i;
+#endif
+
+ if (layout_type == UILST_LAYOUT_COMPACT) {
+ dyn_data->items_len = dyn_data->items_shown = RNA_property_collection_length(dataptr, prop);
+ }
+ else {
+ //printf("%s: filtering...\n", __func__);
+ filter_items(ui_list, C, dataptr, propname);
+ //printf("%s: filtering done.\n", __func__);
+ }
+
+ items_shown = dyn_data->items_shown;
+ if (items_shown >= 0) {
+ items_ptr = MEM_mallocN(sizeof(_uilist_item) * items_shown, AT);
+ //printf("%s: items shown: %d.\n", __func__, items_shown);
+ RNA_PROP_BEGIN (dataptr, itemptr, prop)
+ {
+ if (!dyn_data->items_filter_flags ||
+ ((dyn_data->items_filter_flags[i] & UILST_FLT_ITEM) ^ filter_exclude))
+ {
+ int ii;
+ if (dyn_data->items_filter_neworder) {
+ ii = dyn_data->items_filter_neworder[idx++];
+ ii = order_reverse ? items_shown - ii - 1 : ii;
+ }
+ else {
+ ii = order_reverse ? items_shown - ++idx : idx++;
+ }
+ //printf("%s: ii: %d\n", __func__, ii);
+ items_ptr[ii].item = itemptr;
+ items_ptr[ii].org_idx = i;
+ items_ptr[ii].flt_flag = dyn_data->items_filter_flags ? dyn_data->items_filter_flags[i] : 0;
+
+ if (activei == i) {
+ activei = ii;
+ }
+# if 0 /* For now, do not alter active element, even if it will be hidden... */
+ else if (activei < i) {
+ /* We do not want an active but invisible item!
+ * Only exception is when all items are filtered out...
+ */
+ if (prev_ii >= 0) {
+ activei = prev_ii;
+ RNA_property_int_set(active_dataptr, activeprop, prev_i);
+ }
+ else {
+ activei = ii;
+ RNA_property_int_set(active_dataptr, activeprop, i);
+ }
+ }
+ prev_i = i;
+ prev_ii = ii;
+#endif
+ }
+ i++;
+ }
+ RNA_PROP_END;
+ }
+ if (dyn_data->items_shown >= 0) {
+ len = dyn_data->items_shown;
+ }
+ else {
+ len = dyn_data->items_len;
+ }
+ }
+
switch (layout_type) {
case UILST_LAYOUT_DEFAULT:
- /* default rows */
- if (rows == 0)
- rows = 5;
- if (maxrows == 0)
- maxrows = 5;
- if (ui_list->list_grip_size != 0)
- rows = ui_list->list_grip_size;
-
/* layout */
box = uiLayoutListBox(layout, ui_list, dataptr, prop, active_dataptr, activeprop);
- row = uiLayoutRow(box, FALSE);
+ glob = uiLayoutColumn(box, TRUE);
+ row = uiLayoutRow(glob, FALSE);
col = uiLayoutColumn(row, TRUE);
/* init numbers */
- RNA_property_int_range(active_dataptr, activeprop, &min, &max);
-
- if (prop)
- len = RNA_property_collection_length(dataptr, prop);
- items = CLAMPIS(len, rows, MAX2(rows, maxrows));
-
- /* if list length changes and active is out of view, scroll to it */
- if ((ui_list->list_last_len != len) &&
- (activei < ui_list->list_scroll || activei >= ui_list->list_scroll + items))
- {
- ui_list->list_scroll = activei;
- }
-
- ui_list->list_scroll = min_ii(ui_list->list_scroll, len - items);
- ui_list->list_scroll = max_ii(ui_list->list_scroll, 0);
- ui_list->list_size = items;
- ui_list->list_last_len = len;
+ prepare_list(ui_list, len, activei, rows, maxrows, 1, &layoutdata);
if (dataptr->data && prop) {
/* create list items */
- RNA_PROP_BEGIN (dataptr, itemptr, prop)
- {
- if (i >= ui_list->list_scroll && i < ui_list->list_scroll + items) {
- subblock = uiLayoutGetBlock(col);
- overlap = uiLayoutOverlap(col);
+ for (i = layoutdata.start_idx; i < layoutdata.end_idx; i++) {
+ PointerRNA *itemptr = &items_ptr[i].item;
+ int org_i = items_ptr[i].org_idx;
+ int flt_flag = items_ptr[i].flt_flag;
+ subblock = uiLayoutGetBlock(col);
- uiBlockSetFlag(subblock, UI_BLOCK_LIST_ITEM);
+ overlap = uiLayoutOverlap(col);
+
+ uiBlockSetFlag(subblock, UI_BLOCK_LIST_ITEM);
- /* list item behind label & other buttons */
- sub = uiLayoutRow(overlap, FALSE);
+ /* list item behind label & other buttons */
+ sub = uiLayoutRow(overlap, FALSE);
- but = uiDefButR_prop(subblock, LISTROW, 0, "", 0, 0, UI_UNIT_X * 10, UI_UNIT_Y,
- active_dataptr, activeprop, 0, 0, i, 0, 0, NULL);
- uiButSetFlag(but, UI_BUT_NO_TOOLTIP);
+ but = uiDefButR_prop(subblock, LISTROW, 0, "", 0, 0, UI_UNIT_X * 10, UI_UNIT_Y,
+ active_dataptr, activeprop, 0, 0, org_i, 0, 0, NULL);
+ uiButSetFlag(but, UI_BUT_NO_TOOLTIP);
- sub = uiLayoutRow(overlap, FALSE);
+ sub = uiLayoutRow(overlap, FALSE);
- icon = UI_rnaptr_icon_get(C, &itemptr, rnaicon, false);
- if (icon == ICON_DOT)
- icon = ICON_NONE;
- draw_item(ui_list, C, sub, dataptr, &itemptr, icon, active_dataptr, active_propname, i);
+ icon = UI_rnaptr_icon_get(C, itemptr, rnaicon, false);
+ if (icon == ICON_DOT)
+ icon = ICON_NONE;
+ draw_item(ui_list, C, sub, dataptr, itemptr, icon, active_dataptr, active_propname,
+ org_i, flt_flag);
- /* If we are "drawing" active item, set all labels as active. */
- if (i == activei) {
- ui_layout_list_set_labels_active(sub);
- }
- uiBlockClearFlag(subblock, UI_BLOCK_LIST_ITEM);
+ /* If we are "drawing" active item, set all labels as active. */
+ if (i == activei) {
+ ui_layout_list_set_labels_active(sub);
}
- i++;
+
+ uiBlockClearFlag(subblock, UI_BLOCK_LIST_ITEM);
}
- RNA_PROP_END;
}
/* add dummy buttons to fill space */
- while (i < ui_list->list_scroll + items) {
- if (i >= ui_list->list_scroll)
- uiItemL(col, "", ICON_NONE);
- i++;
+ for (; i < layoutdata.start_idx + layoutdata.visual_items; i++) {
+ uiItemL(col, "", ICON_NONE);
}
/* add scrollbar */
- if (len > items) {
+ if (len > layoutdata.visual_items) {
col = uiLayoutColumn(row, FALSE);
- uiDefButI(block, SCROLL, 0, "", 0, 0, UI_UNIT_X * 0.75, UI_UNIT_Y * items, &ui_list->list_scroll,
- 0, len - items, items, 0, "");
+ uiDefButI(block, SCROLL, 0, "", 0, 0, UI_UNIT_X * 0.75, UI_UNIT_Y * dyn_data->visual_height,
+ &ui_list->list_scroll, 0, dyn_data->height - dyn_data->visual_height,
+ dyn_data->visual_height, 0, "");
}
break;
case UILST_LAYOUT_COMPACT:
row = uiLayoutRow(layout, TRUE);
- if (dataptr->data && prop) {
- /* create list items */
- RNA_PROP_BEGIN (dataptr, itemptr, prop)
- {
- found = (activei == i);
-
- if (found) {
- icon = UI_rnaptr_icon_get(C, &itemptr, rnaicon, false);
- if (icon == ICON_DOT)
- icon = ICON_NONE;
- draw_item(ui_list, C, row, dataptr, &itemptr, icon, active_dataptr, active_propname, i);
- }
+ if (dataptr->data && prop && dyn_data->items_shown > 0) {
+ PointerRNA *itemptr = &items_ptr[activei].item;
+ int org_i = items_ptr[activei].org_idx;
- i++;
- }
- RNA_PROP_END;
+ icon = UI_rnaptr_icon_get(C, itemptr, rnaicon, false);
+ if (icon == ICON_DOT)
+ icon = ICON_NONE;
+ draw_item(ui_list, C, row, dataptr, itemptr, icon, active_dataptr, active_propname, org_i, 0);
}
-
/* if list is empty, add in dummy button */
- if (i == 0)
+ else {
uiItemL(row, "", ICON_NONE);
+ }
/* next/prev button */
- BLI_snprintf(numstr, sizeof(numstr), "%d :", i);
+ BLI_snprintf(numstr, sizeof(numstr), "%d :", dyn_data->items_shown);
but = uiDefIconTextButR_prop(block, NUM, 0, 0, numstr, 0, 0, UI_UNIT_X * 5, UI_UNIT_Y,
active_dataptr, activeprop, 0, 0, 0, 0, 0, "");
- if (i == 0)
+ if (dyn_data->items_shown == 0)
uiButSetFlag(but, UI_BUT_DISABLED);
break;
case UILST_LAYOUT_GRID:
box = uiLayoutListBox(layout, ui_list, dataptr, prop, active_dataptr, activeprop);
- col = uiLayoutColumn(box, TRUE);
- row = uiLayoutRow(col, FALSE);
+ glob = uiLayoutColumn(box, TRUE);
+ row = uiLayoutRow(glob, FALSE);
+ col = uiLayoutColumn(row, TRUE);
+ subrow = NULL; /* Quite gcc warning! */
+
+ prepare_list(ui_list, len, activei, rows, maxrows, columns, &layoutdata);
if (dataptr->data && prop) {
/* create list items */
- RNA_PROP_BEGIN (dataptr, itemptr, prop)
- {
+ for (i = layoutdata.start_idx; i < layoutdata.end_idx; i++) {
+ PointerRNA *itemptr = &items_ptr[i].item;
+ int org_i = items_ptr[i].org_idx;
+ int flt_flag = items_ptr[i].flt_flag;
+
/* create button */
- if (!(i % 9))
- row = uiLayoutRow(col, FALSE);
+ if (!(i % columns))
+ subrow = uiLayoutRow(col, FALSE);
- subblock = uiLayoutGetBlock(row);
- overlap = uiLayoutOverlap(row);
+ subblock = uiLayoutGetBlock(subrow);
+ overlap = uiLayoutOverlap(subrow);
uiBlockSetFlag(subblock, UI_BLOCK_LIST_ITEM);
@@ -2736,13 +3022,14 @@ void uiTemplateList(uiLayout *layout, bContext *C, const char *listtype_name, co
sub = uiLayoutRow(overlap, FALSE);
but = uiDefButR_prop(subblock, LISTROW, 0, "", 0, 0, UI_UNIT_X * 10, UI_UNIT_Y,
- active_dataptr, activeprop, 0, 0, i, 0, 0, NULL);
+ active_dataptr, activeprop, 0, 0, org_i, 0, 0, NULL);
uiButSetFlag(but, UI_BUT_NO_TOOLTIP);
sub = uiLayoutRow(overlap, FALSE);
- icon = UI_rnaptr_icon_get(C, &itemptr, rnaicon, false);
- draw_item(ui_list, C, sub, dataptr, &itemptr, icon, active_dataptr, active_propname, i);
+ icon = UI_rnaptr_icon_get(C, itemptr, rnaicon, false);
+ draw_item(ui_list, C, sub, dataptr, itemptr, icon, active_dataptr, active_propname,
+ org_i, flt_flag);
/* If we are "drawing" active item, set all labels as active. */
if (i == activei) {
@@ -2750,13 +3037,67 @@ void uiTemplateList(uiLayout *layout, bContext *C, const char *listtype_name, co
}
uiBlockClearFlag(subblock, UI_BLOCK_LIST_ITEM);
+ }
+ }
- i++;
+ /* add dummy buttons to fill space */
+ for (; i < layoutdata.start_idx + layoutdata.visual_items; i++) {
+ if (!(i % columns)) {
+ subrow = uiLayoutRow(col, FALSE);
}
- RNA_PROP_END;
+ uiItemL(subrow, "", ICON_NONE);
+ }
+
+ /* add scrollbar */
+ if (len > layoutdata.visual_items) {
+ col = uiLayoutColumn(row, FALSE);
+ uiDefButI(block, SCROLL, 0, "", 0, 0, UI_UNIT_X * 0.75, UI_UNIT_Y * dyn_data->visual_height,
+ &ui_list->list_scroll, 0, dyn_data->height - dyn_data->visual_height,
+ dyn_data->visual_height, 0, "");
}
break;
}
+
+ if (glob) {
+ row = uiLayoutRow(glob, TRUE);
+ subblock = uiLayoutGetBlock(row);
+ uiBlockSetEmboss(subblock, UI_EMBOSSN);
+
+ if (ui_list->filter_flag & UILST_FLT_SHOW) {
+ but = uiDefIconButBitI(subblock, TOG, UILST_FLT_SHOW, 0, ICON_DISCLOSURE_TRI_DOWN, 0, 0,
+ UI_UNIT_X, UI_UNIT_Y * 0.8f, &(ui_list->filter_flag), 0, 0, 0, 0,
+ TIP_("Hide filtering options"));
+ uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */
+
+ but = uiDefIconBut(subblock, BUT, 0, ICON_GRIP, 0, 0, UI_UNIT_X * 10.0f, UI_UNIT_Y * 0.8f, ui_list,
+ 0.0, 0.0, 0, -1, "");
+ uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */
+
+ uiBlockSetEmboss(subblock, UI_EMBOSS);
+
+ col = uiLayoutColumn(glob, FALSE);
+ subblock = uiLayoutGetBlock(col);
+ uiDefBut(subblock, SEPR, 0, "", 0, 0, UI_UNIT_X, UI_UNIT_Y * 0.05f, NULL, 0.0, 0.0, 0, 0, "");
+
+ draw_filter(ui_list, C, col);
+ }
+ else {
+ but = uiDefIconButBitI(subblock, TOG, UILST_FLT_SHOW, 0, ICON_DISCLOSURE_TRI_RIGHT, 0, 0,
+ UI_UNIT_X, UI_UNIT_Y * 0.8f, &(ui_list->filter_flag), 0, 0, 0, 0,
+ TIP_("Show filtering options"));
+ uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */
+
+ but = uiDefIconBut(subblock, BUT, 0, ICON_GRIP, 0, 0, UI_UNIT_X * 10.0f, UI_UNIT_Y * 0.8f, ui_list,
+ 0.0, 0.0, 0, -1, "");
+ uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */
+
+ uiBlockSetEmboss(subblock, UI_EMBOSS);
+ }
+ }
+
+ if (items_ptr) {
+ MEM_freeN(items_ptr);
+ }
}
/************************* Operator Search Template **************************/
@@ -2792,7 +3133,7 @@ static void operator_search_cb(const bContext *C, void *UNUSED(arg), const char
if (WM_key_event_operator_string(C, ot->idname, WM_OP_EXEC_DEFAULT, NULL, true,
&name[len + 1], sizeof(name) - len - 1))
{
- name[len] = '|';
+ name[len] = UI_SEP_CHAR;
}
}
@@ -3003,7 +3344,7 @@ static void keymap_item_modified(bContext *UNUSED(C), void *kmi_p, void *UNUSED(
static void template_keymap_item_properties(uiLayout *layout, const char *title, PointerRNA *ptr)
{
- uiLayout *flow;
+ uiLayout *flow, *box, *row;
uiItemS(layout);
@@ -3015,6 +3356,8 @@ static void template_keymap_item_properties(uiLayout *layout, const char *title,
RNA_STRUCT_BEGIN (ptr, prop)
{
int flag = RNA_property_flag(prop);
+ bool is_set = RNA_property_is_set(ptr, prop);
+ uiBut *but;
if (flag & PROP_HIDDEN)
continue;
@@ -3030,8 +3373,22 @@ static void template_keymap_item_properties(uiLayout *layout, const char *title,
}
}
- /* add property */
- uiItemFullR(flow, ptr, prop, -1, 0, 0, NULL, ICON_NONE);
+ box = uiLayoutBox(flow);
+ uiLayoutSetActive(box, is_set);
+ row = uiLayoutRow(box, false);
+
+ /* property value */
+ uiItemFullR(row, ptr, prop, -1, 0, 0, NULL, ICON_NONE);
+
+ if (is_set) {
+ /* unset operator */
+ uiBlock *block = uiLayoutGetBlock(row);
+ uiBlockSetEmboss(block, UI_EMBOSSN);
+ but = uiDefIconButO(block, BUT, "UI_OT_unset_property_button", WM_OP_EXEC_DEFAULT, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL);
+ but->rnapoin = *ptr;
+ but->rnaprop = prop;
+ uiBlockSetEmboss(block, UI_EMBOSS);
+ }
}
RNA_STRUCT_END;
}
@@ -3047,8 +3404,12 @@ void uiTemplateKeymapItemProperties(uiLayout *layout, PointerRNA *ptr)
/* attach callbacks to compensate for missing properties update,
* we don't know which keymap (item) is being modified there */
- for (; but; but = but->next)
- uiButSetFunc(but, keymap_item_modified, ptr->data, NULL);
+ for (; but; but = but->next) {
+ /* operator buttons may store props for use (file selector, [#36492]) */
+ if (but->rnaprop) {
+ uiButSetFunc(but, keymap_item_modified, ptr->data, NULL);
+ }
+ }
}
}
@@ -3100,6 +3461,8 @@ void uiTemplateColormanagedViewSettings(uiLayout *layout, bContext *UNUSED(C), P
uiItemR(col, &view_transform_ptr, "exposure", 0, NULL, ICON_NONE);
uiItemR(col, &view_transform_ptr, "gamma", 0, NULL, ICON_NONE);
+ uiItemR(col, &view_transform_ptr, "look", 0, IFACE_("Look"), ICON_NONE);
+
col = uiLayoutColumn(layout, FALSE);
uiItemR(col, &view_transform_ptr, "use_curve_mapping", 0, NULL, ICON_NONE);
if (view_settings->flag & COLORMANAGE_VIEW_USE_CURVES)
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 594d3e40dcd..c26998a7541 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -961,7 +961,7 @@ static void ui_text_clip_left(uiFontStyle *fstyle, uiBut *but, const rcti *rect)
if (but->flag & UI_HAS_ICON)
okwidth -= UI_DPI_ICON_SIZE;
- if (but->type == SEARCH_MENU_UNLINK && !but->editstr)
+ if ((but->type == SEARCH_MENU_UNLINK) && ui_is_but_search_unlink_visible(but))
okwidth -= BLI_rcti_size_y(rect);
okwidth = max_ii(okwidth, 0);
@@ -1215,7 +1215,7 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b
/* cut string in 2 parts - only for menu entries */
if ((but->block->flag & UI_BLOCK_LOOP)) {
if (ELEM3(but->type, NUM, TEX, NUMSLI) == 0) {
- cpoin = strchr(but->drawstr, '|');
+ cpoin = strchr(but->drawstr, UI_SEP_CHAR);
if (cpoin) *cpoin = 0;
}
}
@@ -1261,7 +1261,7 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b
fstyle->align = UI_STYLE_TEXT_RIGHT;
rect->xmax -= ui_but_draw_menu_icon(but) ? UI_DPI_ICON_SIZE : 0.25f * U.widget_unit;
uiStyleFontDraw(fstyle, rect, cpoin + 1);
- *cpoin = '|';
+ *cpoin = UI_SEP_CHAR;
}
}
@@ -1325,7 +1325,7 @@ static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, uiB
}
/* unlink icon for this button type */
- if (but->type == SEARCH_MENU_UNLINK && !but->editstr && but->drawstr[0]) {
+ if ((but->type == SEARCH_MENU_UNLINK) && ui_is_but_search_unlink_visible(but)) {
rcti temp = *rect;
temp.xmin = temp.xmax - (BLI_rcti_size_y(rect) * 1.08f);
@@ -2004,10 +2004,11 @@ static void ui_draw_but_HSVCIRCLE(uiBut *but, uiWidgetColors *wcol, const rcti *
/* ************ custom buttons, old stuff ************** */
-/* draws in resolution of 20x4 colors */
+/* draws in resolution of 48x4 colors */
void ui_draw_gradient(const rcti *rect, const float hsv[3], const int type, const float alpha)
{
- const float color_step = (type == UI_GRAD_H) ? 0.02f : 0.05f;
+ /* allows for 4 steps (red->yellow) */
+ const float color_step = (1.0 / 48.0);
int a;
float h = hsv[0], s = hsv[1], v = hsv[2];
float dx, dy, sx1, sx2, sy;
@@ -2066,6 +2067,8 @@ void ui_draw_gradient(const rcti *rect, const float hsv[3], const int type, cons
/* old below */
for (dx = 0.0f; dx < 0.999f; dx += color_step) { /* 0.999 = prevent float inaccuracy for steps */
+ const float dx_next = dx + color_step;
+
/* previous color */
copy_v3_v3(col0[0], col1[0]);
copy_v3_v3(col0[1], col1[1]);
@@ -2081,22 +2084,22 @@ void ui_draw_gradient(const rcti *rect, const float hsv[3], const int type, cons
hsv_to_rgb(h, 1.0, dx, &col1[3][0], &col1[3][1], &col1[3][2]);
break;
case UI_GRAD_HV:
- hsv_to_rgb(dx, s, 0.0, &col1[0][0], &col1[0][1], &col1[0][2]);
- hsv_to_rgb(dx, s, 0.333, &col1[1][0], &col1[1][1], &col1[1][2]);
- hsv_to_rgb(dx, s, 0.666, &col1[2][0], &col1[2][1], &col1[2][2]);
- hsv_to_rgb(dx, s, 1.0, &col1[3][0], &col1[3][1], &col1[3][2]);
+ hsv_to_rgb(dx_next, s, 0.0, &col1[0][0], &col1[0][1], &col1[0][2]);
+ hsv_to_rgb(dx_next, s, 0.333, &col1[1][0], &col1[1][1], &col1[1][2]);
+ hsv_to_rgb(dx_next, s, 0.666, &col1[2][0], &col1[2][1], &col1[2][2]);
+ hsv_to_rgb(dx_next, s, 1.0, &col1[3][0], &col1[3][1], &col1[3][2]);
break;
case UI_GRAD_HS:
- hsv_to_rgb(dx, 0.0, v, &col1[0][0], &col1[0][1], &col1[0][2]);
- hsv_to_rgb(dx, 0.333, v, &col1[1][0], &col1[1][1], &col1[1][2]);
- hsv_to_rgb(dx, 0.666, v, &col1[2][0], &col1[2][1], &col1[2][2]);
- hsv_to_rgb(dx, 1.0, v, &col1[3][0], &col1[3][1], &col1[3][2]);
+ hsv_to_rgb(dx_next, 0.0, v, &col1[0][0], &col1[0][1], &col1[0][2]);
+ hsv_to_rgb(dx_next, 0.333, v, &col1[1][0], &col1[1][1], &col1[1][2]);
+ hsv_to_rgb(dx_next, 0.666, v, &col1[2][0], &col1[2][1], &col1[2][2]);
+ hsv_to_rgb(dx_next, 1.0, v, &col1[3][0], &col1[3][1], &col1[3][2]);
break;
case UI_GRAD_H:
{
/* annoying but without this the color shifts - could be solved some other way
* - campbell */
- hsv_to_rgb(dx + color_step, 1.0, 1.0, &col1[0][0], &col1[0][1], &col1[0][2]);
+ hsv_to_rgb(dx_next, 1.0, 1.0, &col1[0][0], &col1[0][1], &col1[0][2]);
copy_v3_v3(col1[1], col1[0]);
copy_v3_v3(col1[2], col1[0]);
copy_v3_v3(col1[3], col1[0]);
@@ -2117,8 +2120,8 @@ void ui_draw_gradient(const rcti *rect, const float hsv[3], const int type, cons
}
/* rect */
- sx1 = rect->xmin + dx * BLI_rcti_size_x(rect);
- sx2 = rect->xmin + (dx + color_step) * BLI_rcti_size_x(rect);
+ sx1 = rect->xmin + dx * BLI_rcti_size_x(rect);
+ sx2 = rect->xmin + dx_next * BLI_rcti_size_x(rect);
sy = rect->ymin;
dy = (float)BLI_rcti_size_y(rect) / 3.0f;
@@ -2850,6 +2853,16 @@ static void widget_optionbut(uiWidgetColors *wcol, rcti *rect, int state, int UN
rect->xmin += BLI_rcti_size_y(rect) * 0.7 + delta;
}
+/* labels use Editor theme colors for text */
+static void widget_state_label(uiWidgetType *wt, int state)
+{
+ /* call this for option button */
+ widget_state(wt, state);
+ if (state & UI_SELECT)
+ UI_GetThemeColor3ubv(TH_TEXT_HI, (unsigned char *)wt->wcol.text);
+ else
+ UI_GetThemeColor3ubv(TH_TEXT, (unsigned char *)wt->wcol.text);
+}
static void widget_radiobut(uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int roundboxalign)
{
@@ -2970,9 +2983,12 @@ static uiWidgetType *widget_type(uiWidgetTypeEnum type)
case UI_WTYPE_LISTLABEL:
wt.wcol_theme = &btheme->tui.wcol_list_item;
- /* fall-through */ /* we use usual label code too. */
+ wt.draw = NULL;
+ /* Can't use usual label code. */
+ break;
case UI_WTYPE_LABEL:
wt.draw = NULL;
+ wt.state = widget_state_label;
break;
case UI_WTYPE_TOGGLE:
@@ -3482,7 +3498,7 @@ void ui_draw_search_back(uiStyle *UNUSED(style), uiBlock *block, rcti *rect)
/* helper call to draw a menu item without button */
/* state: UI_ACTIVE or 0 */
-void ui_draw_menu_item(uiFontStyle *fstyle, rcti *rect, const char *name, int iconid, int state)
+void ui_draw_menu_item(uiFontStyle *fstyle, rcti *rect, const char *name, int iconid, int state, bool use_sep)
{
uiWidgetType *wt = widget_type(UI_WTYPE_MENU_ITEM);
rcti _rect = *rect;
@@ -3499,21 +3515,25 @@ void ui_draw_menu_item(uiFontStyle *fstyle, rcti *rect, const char *name, int ic
if (iconid) rect->xmin += UI_DPI_ICON_SIZE;
/* cut string in 2 parts? */
- cpoin = strchr(name, '|');
- if (cpoin) {
- *cpoin = 0;
- rect->xmax -= BLF_width(fstyle->uifont_id, cpoin + 1) + 10;
+ if (use_sep) {
+ cpoin = strchr(name, UI_SEP_CHAR);
+ if (cpoin) {
+ *cpoin = 0;
+ rect->xmax -= BLF_width(fstyle->uifont_id, cpoin + 1) + 10;
+ }
}
glColor4ubv((unsigned char *)wt->wcol.text);
uiStyleFontDraw(fstyle, rect, name);
/* part text right aligned */
- if (cpoin) {
- fstyle->align = UI_STYLE_TEXT_RIGHT;
- rect->xmax = _rect.xmax - 5;
- uiStyleFontDraw(fstyle, rect, cpoin + 1);
- *cpoin = '|';
+ if (use_sep) {
+ if (cpoin) {
+ fstyle->align = UI_STYLE_TEXT_RIGHT;
+ rect->xmax = _rect.xmax - 5;
+ uiStyleFontDraw(fstyle, rect, cpoin + 1);
+ *cpoin = UI_SEP_CHAR;
+ }
}
/* restore rect, was messed with */
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index 1ef4d43c9f3..ace35f0276e 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -484,6 +484,14 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo
case TH_STITCH_PREVIEW_ACTIVE:
cp = ts->preview_stitch_active;
break;
+
+ case TH_UV_OTHERS:
+ cp = ts->uv_others;
+ break;
+ case TH_UV_SHADOW:
+ cp = ts->uv_shadow;
+ break;
+
case TH_MARKER_OUTLINE:
cp = ts->marker_outline; break;
case TH_MARKER:
@@ -918,6 +926,9 @@ void ui_theme_init_default(void)
rgba_char_args_set_fl(btheme->tima.preview_stitch_unstitchable, 1.0, 0.0, 0.0, 1.0);
rgba_char_args_set_fl(btheme->tima.preview_stitch_active, 0.886, 0.824, 0.765, 0.140);
+ rgba_char_args_test_set(btheme->tima.uv_others, 96, 96, 96, 255);
+ rgba_char_args_test_set(btheme->tima.uv_shadow, 112, 112, 112, 255);
+
/* space text */
btheme->text = btheme->tv3d;
rgba_char_args_set(btheme->text.back, 153, 153, 153, 255);
@@ -2205,7 +2216,15 @@ void init_userdef_do_versions(void)
}
/* NOTE!! from now on use U.versionfile and U.subversionfile */
-
+
+ if (U.versionfile < 269 || (U.versionfile == 268 && U.subversionfile < 3)) {
+ bTheme *btheme;
+ for (btheme = U.themes.first; btheme; btheme = btheme->next) {
+ rgba_char_args_test_set(btheme->tima.uv_others, 96, 96, 96, 255);
+ rgba_char_args_test_set(btheme->tima.uv_shadow, 112, 112, 112, 255);
+ }
+ }
+
if (U.pixelsize == 0.0f)
U.pixelsize = 1.0f;
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index f656d22fc64..037fa7c6a94 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -2029,6 +2029,17 @@ void UI_view2d_to_region_no_clip(View2D *v2d, float x, float y, int *regionx, in
}
}
+void UI_view2d_to_region_float(View2D *v2d, float x, float y, float *regionx, float *regiony)
+{
+ /* express given coordinates as proportional values */
+ x = -v2d->cur.xmin / BLI_rctf_size_x(&v2d->cur);
+ y = -v2d->cur.ymin / BLI_rctf_size_y(&v2d->cur);
+
+ /* convert proportional distances to screen coordinates */
+ *regionx = v2d->mask.xmin + x * BLI_rcti_size_x(&v2d->mask);
+ *regiony = v2d->mask.ymin + y * BLI_rcti_size_y(&v2d->mask);
+}
+
/* *********************************************************************** */
/* Utilities */
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
index 929b7ae2a5d..00113666872 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -128,7 +128,7 @@ static int view_pan_init(bContext *C, wmOperator *op)
}
/* apply transform to view (i.e. adjust 'cur' rect) */
-static void view_pan_apply(wmOperator *op)
+static void view_pan_apply(bContext *C, wmOperator *op)
{
v2dViewPanData *vpd = op->customdata;
View2D *v2d = vpd->v2d;
@@ -153,6 +153,7 @@ static void view_pan_apply(wmOperator *op)
/* request updates to be done... */
ED_region_tag_redraw(vpd->ar);
+ WM_event_add_mousemove(C);
UI_view2d_sync(vpd->sc, vpd->sa, v2d, V2D_LOCK_COPY);
@@ -181,7 +182,7 @@ static int view_pan_exec(bContext *C, wmOperator *op)
if (!view_pan_init(C, op))
return OPERATOR_CANCELLED;
- view_pan_apply(op);
+ view_pan_apply(C, op);
view_pan_exit(op);
return OPERATOR_FINISHED;
}
@@ -209,7 +210,7 @@ static int view_pan_invoke(bContext *C, wmOperator *op, const wmEvent *event)
RNA_int_set(op->ptr, "deltax", event->prevx - event->x);
RNA_int_set(op->ptr, "deltay", event->prevy - event->y);
- view_pan_apply(op);
+ view_pan_apply(C, op);
view_pan_exit(op);
return OPERATOR_FINISHED;
}
@@ -218,11 +219,11 @@ static int view_pan_invoke(bContext *C, wmOperator *op, const wmEvent *event)
RNA_int_set(op->ptr, "deltay", 0);
if (v2d->keepofs & V2D_LOCKOFS_X)
- WM_cursor_modal(window, BC_NS_SCROLLCURSOR);
+ WM_cursor_modal_set(window, BC_NS_SCROLLCURSOR);
else if (v2d->keepofs & V2D_LOCKOFS_Y)
- WM_cursor_modal(window, BC_EW_SCROLLCURSOR);
+ WM_cursor_modal_set(window, BC_EW_SCROLLCURSOR);
else
- WM_cursor_modal(window, BC_NSEW_SCROLLCURSOR);
+ WM_cursor_modal_set(window, BC_NSEW_SCROLLCURSOR);
/* add temp handler */
WM_event_add_modal_handler(C, op);
@@ -246,7 +247,7 @@ static int view_pan_modal(bContext *C, wmOperator *op, const wmEvent *event)
vpd->lastx = event->x;
vpd->lasty = event->y;
- view_pan_apply(op);
+ view_pan_apply(C, op);
break;
}
/* XXX - Mode switching isn't implemented. See comments in 36818.
@@ -259,7 +260,7 @@ static int view_pan_modal(bContext *C, wmOperator *op, const wmEvent *event)
RNA_int_set(op->ptr, "deltay", (vpd->starty - vpd->lasty));
view_pan_exit(op);
- WM_cursor_restore(CTX_wm_window(C));
+ WM_cursor_modal_restore(CTX_wm_window(C));
WM_operator_name_call(C, "VIEW2D_OT_zoom", WM_OP_INVOKE_DEFAULT, NULL);
return OPERATOR_FINISHED;
}
@@ -272,7 +273,7 @@ static int view_pan_modal(bContext *C, wmOperator *op, const wmEvent *event)
RNA_int_set(op->ptr, "deltay", (vpd->starty - vpd->lasty));
view_pan_exit(op);
- WM_cursor_restore(CTX_wm_window(C));
+ WM_cursor_modal_restore(CTX_wm_window(C));
return OPERATOR_FINISHED;
}
@@ -333,7 +334,7 @@ static int view_scrollright_exec(bContext *C, wmOperator *op)
RNA_int_set(op->ptr, "deltay", 0);
/* apply movement, then we're done */
- view_pan_apply(op);
+ view_pan_apply(C, op);
view_pan_exit(op);
return OPERATOR_FINISHED;
@@ -377,7 +378,7 @@ static int view_scrollleft_exec(bContext *C, wmOperator *op)
RNA_int_set(op->ptr, "deltay", 0);
/* apply movement, then we're done */
- view_pan_apply(op);
+ view_pan_apply(C, op);
view_pan_exit(op);
return OPERATOR_FINISHED;
@@ -425,7 +426,7 @@ static int view_scrolldown_exec(bContext *C, wmOperator *op)
}
/* apply movement, then we're done */
- view_pan_apply(op);
+ view_pan_apply(C, op);
view_pan_exit(op);
return OPERATOR_FINISHED;
@@ -475,7 +476,7 @@ static int view_scrollup_exec(bContext *C, wmOperator *op)
}
/* apply movement, then we're done */
- view_pan_apply(op);
+ view_pan_apply(C, op);
view_pan_exit(op);
return OPERATOR_FINISHED;
@@ -986,11 +987,11 @@ static int view_zoomdrag_invoke(bContext *C, wmOperator *op, const wmEvent *even
}
if (v2d->keepofs & V2D_LOCKOFS_X)
- WM_cursor_modal(window, BC_NS_SCROLLCURSOR);
+ WM_cursor_modal_set(window, BC_NS_SCROLLCURSOR);
else if (v2d->keepofs & V2D_LOCKOFS_Y)
- WM_cursor_modal(window, BC_EW_SCROLLCURSOR);
+ WM_cursor_modal_set(window, BC_EW_SCROLLCURSOR);
else
- WM_cursor_modal(window, BC_NSEW_SCROLLCURSOR);
+ WM_cursor_modal_set(window, BC_NSEW_SCROLLCURSOR);
/* add temp handler */
WM_event_add_modal_handler(C, op);
@@ -1092,7 +1093,7 @@ static int view_zoomdrag_modal(bContext *C, wmOperator *op, const wmEvent *event
/* free customdata */
view_zoomdrag_exit(C, op);
- WM_cursor_restore(CTX_wm_window(C));
+ WM_cursor_modal_restore(CTX_wm_window(C));
return OPERATOR_FINISHED;
}
@@ -1143,6 +1144,7 @@ static int view_borderzoom_exec(bContext *C, wmOperator *op)
rctf rect;
rctf cur_new = v2d->cur;
int gesture_mode;
+ const int smooth_viewtx = WM_operator_smooth_viewtx_get(op);
/* convert coordinates of rect to 'tot' rect coordinates */
UI_view2d_region_to_view(v2d, RNA_int_get(op->ptr, "xmin"), RNA_int_get(op->ptr, "ymin"), &rect.xmin, &rect.ymin);
@@ -1194,7 +1196,7 @@ static int view_borderzoom_exec(bContext *C, wmOperator *op)
}
}
- UI_view2d_smooth_view(C, ar, &cur_new);
+ UI_view2d_smooth_view(C, ar, &cur_new, smooth_viewtx);
return OPERATOR_FINISHED;
}
@@ -1268,7 +1270,7 @@ static float smooth_view_rect_to_fac(const rctf *rect_a, const rctf *rect_b)
/* will start timer if appropriate */
/* the arguments are the desired situation */
void UI_view2d_smooth_view(bContext *C, ARegion *ar,
- const rctf *cur)
+ const rctf *cur, const int smooth_viewtx)
{
wmWindowManager *wm = CTX_wm_manager(C);
wmWindow *win = CTX_wm_window(C);
@@ -1288,7 +1290,7 @@ void UI_view2d_smooth_view(bContext *C, ARegion *ar,
fac = smooth_view_rect_to_fac(&v2d->cur, cur);
}
- if (U.smooth_viewtx && fac > FLT_EPSILON) {
+ if (smooth_viewtx && fac > FLT_EPSILON) {
int changed = FALSE;
if (BLI_rctf_compare(&sms.new_cur, &v2d->cur, FLT_EPSILON) == FALSE)
@@ -1299,7 +1301,7 @@ void UI_view2d_smooth_view(bContext *C, ARegion *ar,
if (changed) {
sms.orig_cur = v2d->cur;
- sms.time_allowed = (double)U.smooth_viewtx / 1000.0;
+ sms.time_allowed = (double)smooth_viewtx / 1000.0;
/* scale the time allowed the change in view */
sms.time_allowed *= (double)fac;
@@ -1372,14 +1374,16 @@ static void VIEW2D_OT_smoothview(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Smooth View 2D";
- ot->description = "Zoom in the view to the nearest item contained in the border";
+ ot->description = "";
ot->idname = "VIEW2D_OT_smoothview";
/* api callbacks */
ot->invoke = view2d_smoothview_invoke;
-
ot->poll = view2d_poll;
+ /* flags */
+ ot->flag = OPTYPE_INTERNAL;
+
/* rna */
WM_operator_properties_gesture_border(ot, FALSE);
}
diff --git a/source/blender/editors/io/io_collada.c b/source/blender/editors/io/io_collada.c
index a1bb7a8ae88..f50e4400b91 100644
--- a/source/blender/editors/io/io_collada.c
+++ b/source/blender/editors/io/io_collada.c
@@ -96,7 +96,7 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op)
int use_object_instantiation;
int sort_by_name;
int export_transformation_type;
- int second_life;
+ int open_sim;
if (!RNA_struct_property_is_set(op->ptr, "filepath")) {
BKE_report(op->reports, RPT_ERROR, "No filename given");
@@ -106,6 +106,24 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op)
RNA_string_get(op->ptr, "filepath", filepath);
BLI_ensure_extension(filepath, sizeof(filepath), ".dae");
+
+ /* Avoid File write exceptions in Collada */
+ if (!BLI_exists(filepath)) {
+ BLI_make_existing_file(filepath);
+ if (!BLI_file_touch(filepath)) {
+ BKE_report(op->reports, RPT_ERROR, "Can't create export file");
+ fprintf(stdout, "Collada export: Can not create: %s\n", filepath);
+ return OPERATOR_CANCELLED;
+ }
+ }
+ else if (!BLI_file_is_writable(filepath)) {
+ BKE_report(op->reports, RPT_ERROR, "Can't overwrite export file");
+ fprintf(stdout, "Collada export: Can not modify: %s\n", filepath);
+ return OPERATOR_CANCELLED;
+ }
+
+ /* Now the exporter can create and write the export file */
+
/* Options panel */
apply_modifiers = RNA_boolean_get(op->ptr, "apply_modifiers");
export_mesh_type = RNA_enum_get(op->ptr, "export_mesh_type_selection");
@@ -124,11 +142,13 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op)
use_object_instantiation = RNA_boolean_get(op->ptr, "use_object_instantiation");
sort_by_name = RNA_boolean_get(op->ptr, "sort_by_name");
export_transformation_type = RNA_enum_get(op->ptr, "export_transformation_type_selection");
- second_life = RNA_boolean_get(op->ptr, "second_life");
+ open_sim = RNA_boolean_get(op->ptr, "open_sim");
/* get editmode results */
ED_object_editmode_load(CTX_data_edit_object(C));
+
+
if (collada_export(CTX_data_scene(C),
filepath,
apply_modifiers,
@@ -148,7 +168,7 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op)
use_object_instantiation,
sort_by_name,
export_transformation_type,
- second_life))
+ open_sim))
{
return OPERATOR_FINISHED;
}
@@ -216,7 +236,7 @@ static void uiCollada_exportSettings(uiLayout *layout, PointerRNA *imfptr)
row = uiLayoutRow(box, FALSE);
uiItemR(row, imfptr, "deform_bones_only", 0, NULL, ICON_NONE);
row = uiLayoutRow(box, FALSE);
- uiItemR(row, imfptr, "second_life", 0, NULL, ICON_NONE);
+ uiItemR(row, imfptr, "open_sim", 0, NULL, ICON_NONE);
/* Collada options: */
box = uiLayoutBox(layout);
@@ -330,8 +350,8 @@ void WM_OT_collada_export(wmOperatorType *ot)
RNA_def_enum(ot->srna, "export_transformation_type_selection", prop_bc_export_transformation_type, 0,
"Transform", "Transformation type for translation, scale and rotation");
- RNA_def_boolean(ot->srna, "second_life", 0, "Export for Second Life",
- "Compatibility mode for Second Life");
+ RNA_def_boolean(ot->srna, "open_sim", 0, "Export for OpenSim",
+ "Compatibility mode for OpenSim and compatible online worlds");
}
diff --git a/source/blender/editors/mask/SConscript b/source/blender/editors/mask/SConscript
index a80d3317c89..9dd521e3a7c 100644
--- a/source/blender/editors/mask/SConscript
+++ b/source/blender/editors/mask/SConscript
@@ -41,5 +41,8 @@ incs = [
'../../makesrna',
'../../windowmanager',
]
+
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
+ incs.append(env['BF_PTHREADS_INC'])
env.BlenderLib('bf_editors_mask', sources, incs, defs, libtype=['core'], priority=[100])
diff --git a/source/blender/editors/mask/mask_add.c b/source/blender/editors/mask/mask_add.c
index 9c270144a0a..4cc9d3b59b1 100644
--- a/source/blender/editors/mask/mask_add.c
+++ b/source/blender/editors/mask/mask_add.c
@@ -737,3 +737,159 @@ void MASK_OT_add_feather_vertex(wmOperatorType *ot)
RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX,
"Location", "Location of vertex in normalized space", -1.0f, 1.0f);
}
+
+/******************** common primitive functions *********************/
+
+static int create_primitive_from_points(bContext *C, wmOperator *op, const float (*points)[2],
+ int num_points, char handle_type)
+{
+ ScrArea *sa = CTX_wm_area(C);
+ Scene *scene = CTX_data_scene(C);
+ Mask *mask;
+ MaskLayer *mask_layer;
+ MaskSpline *new_spline;
+ float scale, location[2], frame_size[2];
+ int i, width, height;
+ int size = RNA_float_get(op->ptr, "size");
+
+ ED_mask_get_size(sa, &width, &height);
+ scale = (float)size / max_ii(width, height);
+
+ /* Get location in mask space. */
+ frame_size[0] = width;
+ frame_size[1] = height;
+ RNA_float_get_array(op->ptr, "location", location);
+ location[0] /= width;
+ location[1] /= height;
+ BKE_mask_coord_from_frame(location, location, frame_size);
+
+ /* Make it so new primitive is centered to mouse location. */
+ location[0] -= 0.5f * scale;
+ location[1] -= 0.5f * scale;
+
+ mask_layer = ED_mask_layer_ensure(C);
+ mask = CTX_data_edit_mask(C);
+
+ ED_mask_select_toggle_all(mask, SEL_DESELECT);
+
+ new_spline = BKE_mask_spline_add(mask_layer);
+ new_spline->flag = MASK_SPLINE_CYCLIC | SELECT;
+ new_spline->tot_point = num_points;
+ new_spline->points = MEM_recallocN(new_spline->points,
+ sizeof(MaskSplinePoint) * new_spline->tot_point);
+
+ mask_layer->act_spline = new_spline;
+ mask_layer->act_point = NULL;
+
+ for (i = 0; i < num_points; i++) {
+ MaskSplinePoint *new_point = &new_spline->points[i];
+
+ copy_v2_v2(new_point->bezt.vec[1], points[i]);
+ mul_v2_fl(new_point->bezt.vec[1], scale);
+ add_v2_v2(new_point->bezt.vec[1], location);
+
+ new_point->bezt.h1 = handle_type;
+ new_point->bezt.h2 = handle_type;
+ BKE_mask_point_select_set(new_point, true);
+ }
+
+ WM_event_add_notifier(C, NC_MASK | NA_EDITED, mask);
+
+ /* TODO: only update this spline */
+ BKE_mask_update_display(mask, CFRA);
+
+ return OPERATOR_FINISHED;
+}
+
+static int primitive_add_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
+{
+ ScrArea *sa = CTX_wm_area(C);
+ float cursor[2];
+ int width, height;
+
+ ED_mask_get_size(sa, &width, &height);
+ ED_mask_cursor_location_get(sa, cursor);
+
+ cursor[0] *= width;
+ cursor[1] *= height;
+
+ RNA_float_set_array(op->ptr, "location", cursor);
+
+ return op->type->exec(C, op);
+}
+
+static void define_prinitive_add_properties(wmOperatorType *ot)
+{
+ RNA_def_float(ot->srna, "size", 100, -FLT_MAX, FLT_MAX,
+ "Size", "Size of new circle", -FLT_MAX, FLT_MAX);
+ RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX,
+ "Location", "Location of new circle", -FLT_MAX, FLT_MAX);
+}
+
+/******************** primitive add circle *********************/
+
+static int primitive_circle_add_exec(bContext *C, wmOperator *op)
+{
+ const float points[4][2] = {{0.0f, 0.5f},
+ {0.5f, 1.0f},
+ {1.0f, 0.5f},
+ {0.5f, 0.0f}};
+ int num_points = sizeof(points) / (2 * sizeof(float));
+
+ create_primitive_from_points(C, op, points, num_points, HD_AUTO);
+
+ return OPERATOR_FINISHED;
+}
+
+void MASK_OT_primitive_circle_add(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Add Circle";
+ ot->description = "Add new circle-shaped spline";
+ ot->idname = "MASK_OT_primitive_circle_add";
+
+ /* api callbacks */
+ ot->exec = primitive_circle_add_exec;
+ ot->invoke = primitive_add_invoke;
+ ot->poll = ED_operator_mask;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+
+ /* properties */
+ define_prinitive_add_properties(ot);
+}
+
+/******************** primitive add suqare *********************/
+
+static int primitive_square_add_exec(bContext *C, wmOperator *op)
+{
+ const float points[4][2] = {{0.0f, 0.0f},
+ {0.0f, 1.0f},
+ {1.0f, 1.0f},
+ {1.0f, 0.0f}};
+ int num_points = sizeof(points) / (2 * sizeof(float));
+
+ create_primitive_from_points(C, op, points, num_points, HD_VECT);
+
+ return OPERATOR_FINISHED;
+}
+
+void MASK_OT_primitive_square_add(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Add Square";
+ ot->description = "Add new square-shaped spline";
+ ot->idname = "MASK_OT_primitive_square_add";
+
+ /* api callbacks */
+ ot->exec = primitive_square_add_exec;
+ ot->invoke = primitive_add_invoke;
+ ot->poll = ED_operator_mask;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+
+ /* properties */
+ define_prinitive_add_properties(ot);
+}
diff --git a/source/blender/editors/mask/mask_draw.c b/source/blender/editors/mask/mask_draw.c
index fec4ab87996..50d8e653737 100644
--- a/source/blender/editors/mask/mask_draw.c
+++ b/source/blender/editors/mask/mask_draw.c
@@ -35,6 +35,7 @@
#include "BLI_utildefines.h"
#include "BLI_math.h"
#include "BLI_rect.h"
+#include "BLI_task.h"
#include "BKE_context.h"
#include "BKE_mask.h"
@@ -48,6 +49,7 @@
#include "ED_mask.h" /* own include */
#include "ED_space_api.h"
#include "BIF_gl.h"
+#include "BIF_glutil.h"
#include "UI_resources.h"
#include "UI_view2d.h"
@@ -535,10 +537,93 @@ void ED_mask_draw(const bContext *C,
draw_masklays(C, mask, draw_flag, draw_type, width, height);
}
+typedef struct ThreadedMaskRasterizeState {
+ MaskRasterHandle *handle;
+ float *buffer;
+ int width, height;
+} ThreadedMaskRasterizeState;
+
+typedef struct ThreadedMaskRasterizeData {
+ int start_scanline;
+ int num_scanlines;
+} ThreadedMaskRasterizeData;
+
+static void mask_rasterize_func(TaskPool *pool, void *taskdata, int UNUSED(threadid))
+{
+ ThreadedMaskRasterizeState *state = (ThreadedMaskRasterizeState *) BLI_task_pool_userdata(pool);
+ ThreadedMaskRasterizeData *data = (ThreadedMaskRasterizeData *) taskdata;
+ int scanline;
+
+ for (scanline = 0; scanline < data->num_scanlines; scanline++) {
+ int x, y = data->start_scanline + scanline;
+ for (x = 0; x < state->width; x++) {
+ int index = y * state->width + x;
+ float xy[2];
+
+ xy[0] = (float) x / state->width;
+ xy[1] = (float) y / state->height;
+
+ state->buffer[index] = BKE_maskrasterize_handle_sample(state->handle, xy);
+ }
+ }
+}
+
+static float *threaded_mask_rasterize(Mask *mask, const int width, const int height)
+{
+ TaskScheduler *task_scheduler = BLI_task_scheduler_get();
+ TaskPool *task_pool;
+ MaskRasterHandle *handle;
+ ThreadedMaskRasterizeState state;
+ float *buffer;
+ int i, num_threads = BLI_task_scheduler_num_threads(task_scheduler), scanlines_per_thread;
+
+ buffer = MEM_mallocN(sizeof(float) * height * width, "rasterized mask buffer");
+
+ /* Initialize rasterization handle. */
+ handle = BKE_maskrasterize_handle_new();
+ BKE_maskrasterize_handle_init(handle, mask, width, height, TRUE, TRUE, TRUE);
+
+ state.handle = handle;
+ state.buffer = buffer;
+ state.width = width;
+ state.height = height;
+
+ task_pool = BLI_task_pool_create(task_scheduler, &state);
+
+ BLI_begin_threaded_malloc();
+
+ scanlines_per_thread = height / num_threads;
+ for (i = 0; i < num_threads; i++) {
+ ThreadedMaskRasterizeData *data = MEM_mallocN(sizeof(ThreadedMaskRasterizeData),
+ "threaded mask rasterize data");
+
+ data->start_scanline = i * scanlines_per_thread;
+
+ if (i < num_threads - 1) {
+ data->num_scanlines = scanlines_per_thread;
+ }
+ else {
+ data->num_scanlines = height - data->start_scanline;
+ }
+
+ BLI_task_pool_push(task_pool, mask_rasterize_func, data, true, TASK_PRIORITY_LOW);
+ }
+
+ /* work and wait until tasks are done */
+ BLI_task_pool_work_and_wait(task_pool);
+
+ /* Free memory. */
+ BLI_task_pool_free(task_pool);
+ BLI_end_threaded_malloc();
+ BKE_maskrasterize_handle_free(handle);
+
+ return buffer;
+}
+
/* sets up the opengl context.
* width, height are to match the values from ED_mask_get_size() */
void ED_mask_draw_region(Mask *mask, ARegion *ar,
- const char draw_flag, const char draw_type,
+ const char draw_flag, const char draw_type, const char overlay_mode,
const int width_i, const int height_i, /* convert directly into aspect corrected vars */
const float aspx, const float aspy,
const short do_scale_applied, const short do_draw_cb,
@@ -592,6 +677,37 @@ void ED_mask_draw_region(Mask *mask, ARegion *ar,
yofs = ((width - height) / -2.0f) * zoomy;
}
+ if (draw_flag & MASK_DRAWFLAG_OVERLAY) {
+ float *buffer = threaded_mask_rasterize(mask, width, height);
+ int format;
+
+ if (overlay_mode == MASK_OVERLAY_ALPHACHANNEL) {
+ glColor3f(1.0f, 1.0f, 1.0f);
+ format = GL_LUMINANCE;
+ }
+ else {
+ /* More blending types could be supported in the future. */
+ glEnable(GL_BLEND);
+ glBlendFunc(GL_DST_COLOR, GL_SRC_ALPHA);
+ format = GL_ALPHA;
+ }
+
+ glPushMatrix();
+ glTranslatef(x, y, 0);
+ glScalef(zoomx, zoomy, 0);
+ if (stabmat) {
+ glMultMatrixf(stabmat);
+ }
+ glaDrawPixelsTex(0.0f, 0.0f, width, height, format, GL_FLOAT, GL_NEAREST, buffer);
+ glPopMatrix();
+
+ if (overlay_mode != MASK_OVERLAY_ALPHACHANNEL) {
+ glDisable(GL_BLEND);
+ }
+
+ MEM_freeN(buffer);
+ }
+
/* apply transformation so mask editing tools will assume drawing from the origin in normalized space */
glPushMatrix();
glTranslatef(x + xofs, y + yofs, 0);
diff --git a/source/blender/editors/mask/mask_edit.c b/source/blender/editors/mask/mask_edit.c
index ceb5c6c1e0d..dccca4010b6 100644
--- a/source/blender/editors/mask/mask_edit.c
+++ b/source/blender/editors/mask/mask_edit.c
@@ -363,6 +363,40 @@ void ED_mask_pixelspace_factor(ScrArea *sa, ARegion *ar, float *scalex, float *s
}
}
+void ED_mask_cursor_location_get(ScrArea *sa, float cursor[2])
+{
+ if (sa) {
+ switch (sa->spacetype) {
+ case SPACE_CLIP:
+ {
+ SpaceClip *space_clip = sa->spacedata.first;
+ copy_v2_v2(cursor, space_clip->cursor);
+ break;
+ }
+ case SPACE_SEQ:
+ {
+ zero_v2(cursor);
+ break;
+ }
+ case SPACE_IMAGE:
+ {
+ SpaceImage *space_image = sa->spacedata.first;
+ copy_v2_v2(cursor, space_image->cursor);
+ break;
+ }
+ default:
+ /* possible other spaces from which mask editing is available */
+ BLI_assert(0);
+ zero_v2(cursor);
+ break;
+ }
+ }
+ else {
+ BLI_assert(0);
+ zero_v2(cursor);
+ }
+}
+
/********************** registration *********************/
void ED_operatortypes_mask(void)
@@ -376,6 +410,8 @@ void ED_operatortypes_mask(void)
/* add */
WM_operatortype_append(MASK_OT_add_vertex);
WM_operatortype_append(MASK_OT_add_feather_vertex);
+ WM_operatortype_append(MASK_OT_primitive_circle_add);
+ WM_operatortype_append(MASK_OT_primitive_square_add);
/* geometry */
WM_operatortype_append(MASK_OT_switch_direction);
@@ -418,6 +454,9 @@ void ED_operatortypes_mask(void)
/* layers */
WM_operatortype_append(MASK_OT_layer_move);
+
+ /* duplicate */
+ WM_operatortype_append(MASK_OT_duplicate);
}
void ED_keymap_mask(wmKeyConfig *keyconf)
@@ -430,6 +469,9 @@ void ED_keymap_mask(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "MASK_OT_new", NKEY, KM_PRESS, KM_ALT, 0);
+ /* add menu */
+ WM_keymap_add_menu(keymap, "MASK_MT_add", AKEY, KM_PRESS, KM_SHIFT, 0);
+
/* mask mode supports PET now */
ED_keymap_proportional_cycle(keyconf, keymap);
ED_keymap_proportional_maskmode(keyconf, keymap);
@@ -501,6 +543,9 @@ void ED_keymap_mask(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "MASK_OT_shape_key_insert", IKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "MASK_OT_shape_key_clear", IKEY, KM_PRESS, KM_ALT, 0);
+ /* duplicate */
+ WM_keymap_add_item(keymap, "MASK_OT_duplicate_move", DKEY, KM_PRESS, KM_SHIFT, 0);
+
/* for image editor only */
WM_keymap_add_item(keymap, "UV_OT_cursor_set", ACTIONMOUSE, KM_PRESS, 0, 0);
@@ -515,7 +560,6 @@ void ED_keymap_mask(wmKeyConfig *keyconf)
void ED_operatormacros_mask(void)
{
- /* XXX: just for sample */
wmOperatorType *ot;
wmOperatorTypeMacro *otmacro;
@@ -532,4 +576,11 @@ void ED_operatormacros_mask(void)
WM_operatortype_macro_define(ot, "MASK_OT_add_feather_vertex");
otmacro = WM_operatortype_macro_define(ot, "MASK_OT_slide_point");
RNA_boolean_set(otmacro->ptr, "slide_feather", TRUE);
+
+ ot = WM_operatortype_append_macro("MASK_OT_duplicate_move", "Add Duplicate", "Duplicate mask and move",
+ OPTYPE_UNDO | OPTYPE_REGISTER);
+ WM_operatortype_macro_define(ot, "MASK_OT_duplicate");
+ otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+ RNA_enum_set(otmacro->ptr, "proportional", 0);
+ RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
}
diff --git a/source/blender/editors/mask/mask_intern.h b/source/blender/editors/mask/mask_intern.h
index c238da450b1..5fc66659050 100644
--- a/source/blender/editors/mask/mask_intern.h
+++ b/source/blender/editors/mask/mask_intern.h
@@ -42,9 +42,12 @@ struct wmOperatorType;
/* mask_add.c */
void MASK_OT_add_vertex(struct wmOperatorType *ot);
void MASK_OT_add_feather_vertex(struct wmOperatorType *ot);
+void MASK_OT_primitive_circle_add(struct wmOperatorType *ot);
+void MASK_OT_primitive_square_add(struct wmOperatorType *ot);
/* mask_ops.c */
struct Mask *ED_mask_new(struct bContext *C, const char *name);
+struct MaskLayer *ED_mask_layer_ensure(struct bContext *C);
void MASK_OT_new(struct wmOperatorType *ot);
void MASK_OT_layer_new(struct wmOperatorType *ot);
@@ -75,6 +78,8 @@ struct MaskSplinePoint *ED_mask_point_find_nearest(
void MASK_OT_layer_move(struct wmOperatorType *ot);
+void MASK_OT_duplicate(struct wmOperatorType *ot);
+
/* mask_relationships.c */
void MASK_OT_parent_set(struct wmOperatorType *ot);
void MASK_OT_parent_clear(struct wmOperatorType *ot);
diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c
index c9d3bd19941..5ca0d133b0e 100644
--- a/source/blender/editors/mask/mask_ops.c
+++ b/source/blender/editors/mask/mask_ops.c
@@ -292,6 +292,26 @@ Mask *ED_mask_new(bContext *C, const char *name)
return mask;
}
+/* Get ative layer. Will create mask/layer to be sure there's an active layer. */
+MaskLayer *ED_mask_layer_ensure(bContext *C)
+{
+ Mask *mask = CTX_data_edit_mask(C);
+ MaskLayer *mask_layer;
+
+ if (mask == NULL) {
+ /* If there's no active mask, create one. */
+ mask = ED_mask_new(C, NULL);
+ }
+
+ mask_layer = BKE_mask_layer_active(mask);
+ if (mask_layer == NULL) {
+ /* If there's no active mask layer, create one. */
+ mask_layer = BKE_mask_layer_new(mask, "");
+ }
+
+ return mask_layer;
+}
+
static int mask_new_exec(bContext *C, wmOperator *op)
{
char name[MAX_ID_NAME - 2];
@@ -1467,3 +1487,110 @@ void MASK_OT_layer_move(wmOperatorType *ot)
/* properties */
RNA_def_enum(ot->srna, "direction", direction_items, 0, "Direction", "Direction to move the active layer");
}
+
+/******************** duplicate *********************/
+
+static int mask_duplicate_exec(bContext *C, wmOperator *UNUSED(op))
+{
+ Scene *scene = CTX_data_scene(C);
+ Mask *mask = CTX_data_edit_mask(C);
+ MaskLayer *mask_layer = BKE_mask_layer_active(mask);
+ MaskSpline *spline;
+
+ if (mask_layer == NULL) {
+ return OPERATOR_CANCELLED;
+ }
+
+ for (spline = mask_layer->splines.last;
+ spline;
+ spline = spline->prev)
+ {
+ MaskSplinePoint *point = spline->points;
+ int i = 0;
+ while (i < spline->tot_point) {
+ int start = i, end = -1;
+ /* Find next selected segment. */
+ while (MASKPOINT_ISSEL_ANY(point)) {
+ BKE_mask_point_select_set(point, false);
+ end = i;
+ if (i >= spline->tot_point - 1) {
+ break;
+ }
+ i++;
+ point++;
+ }
+ if (end >= start) {
+ MaskSpline *new_spline = BKE_mask_spline_add(mask_layer);
+ MaskSplinePoint *new_point;
+ int b;
+
+ /* BKE_mask_spline_add might allocate the points, need to free them in this case. */
+ if (new_spline->points) {
+ MEM_freeN(new_spline->points);
+ }
+
+ /* Copy options from old spline. */
+ new_spline->flag = spline->flag;
+ new_spline->offset_mode = spline->offset_mode;
+ new_spline->weight_interp = spline->weight_interp;
+ new_spline->parent = spline->parent;
+
+ /* Allocate new points and copy them from old spline. */
+ new_spline->tot_point = end - start + 1;
+ new_spline->points = MEM_mallocN(sizeof(MaskSplinePoint) * new_spline->tot_point,
+ "duplicated mask points");
+
+ memcpy(new_spline->points, spline->points + start,
+ new_spline->tot_point * sizeof(MaskSplinePoint));
+
+ /* Select points and duplicate their UWs (if needed). */
+ for (b = 0, new_point = new_spline->points;
+ b < new_spline->tot_point;
+ b++, new_point++)
+ {
+ if (new_point->uw) {
+ new_point->uw = MEM_dupallocN(new_point->uw);
+ }
+ BKE_mask_point_select_set(new_point, true);
+ }
+
+ /* Clear cyclic flag if we didn't copy the whole spline. */
+ if (new_spline->flag & MASK_SPLINE_CYCLIC) {
+ if (start != 0 || end != spline->tot_point - 1) {
+ new_spline->flag &= ~MASK_SPLINE_CYCLIC;
+ }
+ }
+
+ /* Flush selection to splines. */
+ new_spline->flag |= SELECT;
+ spline->flag &= ~SELECT;
+
+ mask_layer->act_spline = new_spline;
+ }
+ i++;
+ point++;
+ }
+ }
+
+ /* TODO: only update edited splines */
+ BKE_mask_update_display(mask, CFRA);
+
+ WM_event_add_notifier(C, NC_MASK | NA_EDITED, mask);
+
+ return OPERATOR_FINISHED;
+}
+
+void MASK_OT_duplicate(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Duplicate Mask";
+ ot->description = "Duplicate selected control points and segments between them";
+ ot->idname = "MASK_OT_duplicate";
+
+ /* api callbacks */
+ ot->exec = mask_duplicate_exec;
+ ot->poll = ED_maskedit_mask_poll;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+}
diff --git a/source/blender/editors/mask/mask_relationships.c b/source/blender/editors/mask/mask_relationships.c
index 6ced2423074..9cc1702addb 100644
--- a/source/blender/editors/mask/mask_relationships.c
+++ b/source/blender/editors/mask/mask_relationships.c
@@ -137,6 +137,7 @@ static int mask_parent_set_exec(bContext *C, wmOperator *UNUSED(op))
sub_parent_name = track->name;
parent_type = MASK_PARENT_POINT_TRACK;
+ memset(orig_corners, 0, sizeof(orig_corners));
}
else if ((plane_track = BKE_tracking_plane_track_get_active(tracking)) != NULL) {
MovieTrackingPlaneMarker *plane_marker = BKE_tracking_plane_marker_get(plane_track, framenr);
diff --git a/source/blender/editors/mesh/CMakeLists.txt b/source/blender/editors/mesh/CMakeLists.txt
index 69ef4715df6..8d91b300ff3 100644
--- a/source/blender/editors/mesh/CMakeLists.txt
+++ b/source/blender/editors/mesh/CMakeLists.txt
@@ -42,6 +42,7 @@ set(SRC
editface.c
editmesh_add.c
editmesh_bevel.c
+ editmesh_bisect.c
editmesh_extrude.c
editmesh_inset.c
editmesh_knife.c
diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c
index 902906fcf8a..9e1785e27d1 100644
--- a/source/blender/editors/mesh/editface.c
+++ b/source/blender/editors/mesh/editface.c
@@ -691,6 +691,7 @@ void ED_mesh_mirrtopo_init(Mesh *me, const int ob_mode, MirrTopoStore_t *mesh_to
int a, last;
int totvert, totedge;
int tot_unique = -1, tot_unique_prev = -1;
+ int tot_unique_edges = 0, tot_unique_edges_prev;
MirrTopoHash_t *topo_hash = NULL;
MirrTopoHash_t *topo_hash_prev = NULL;
@@ -720,36 +721,45 @@ void ED_mesh_mirrtopo_init(Mesh *me, const int ob_mode, MirrTopoStore_t *mesh_to
totedge = me->edit_btmesh->bm->totedge;
BM_ITER_MESH (eed, &iter, em->bm, BM_EDGES_OF_MESH) {
- topo_hash[BM_elem_index_get(eed->v1)]++;
- topo_hash[BM_elem_index_get(eed->v2)]++;
+ const int i1 = BM_elem_index_get(eed->v1), i2 = BM_elem_index_get(eed->v2);
+ topo_hash[i1]++;
+ topo_hash[i2]++;
}
}
else {
totedge = me->totedge;
for (a = 0, medge = me->medge; a < me->totedge; a++, medge++) {
- topo_hash[medge->v1]++;
- topo_hash[medge->v2]++;
+ const unsigned int i1 = medge->v1, i2 = medge->v2;
+ topo_hash[i1]++;
+ topo_hash[i2]++;
}
}
topo_hash_prev = MEM_dupallocN(topo_hash);
tot_unique_prev = -1;
+ tot_unique_edges_prev = -1;
while (1) {
/* use the number of edges per vert to give verts unique topology IDs */
+ tot_unique_edges = 0;
+
+ /* This can make really big numbers, wrapping around here is fine */
if (em) {
BM_ITER_MESH (eed, &iter, em->bm, BM_EDGES_OF_MESH) {
- topo_hash[BM_elem_index_get(eed->v1)] += topo_hash_prev[BM_elem_index_get(eed->v2)] * topo_pass;
- topo_hash[BM_elem_index_get(eed->v2)] += topo_hash_prev[BM_elem_index_get(eed->v1)] * topo_pass;
+ const int i1 = BM_elem_index_get(eed->v1), i2 = BM_elem_index_get(eed->v2);
+ topo_hash[i1] += topo_hash_prev[i2] * topo_pass;
+ topo_hash[i2] += topo_hash_prev[i1] * topo_pass;
+ tot_unique_edges += (topo_hash[i1] != topo_hash[i2]);
}
}
else {
for (a = 0, medge = me->medge; a < me->totedge; a++, medge++) {
- /* This can make really big numbers, wrapping around here is fine */
- topo_hash[medge->v1] += topo_hash_prev[medge->v2] * topo_pass;
- topo_hash[medge->v2] += topo_hash_prev[medge->v1] * topo_pass;
+ const unsigned int i1 = medge->v1, i2 = medge->v2;
+ topo_hash[i1] += topo_hash_prev[i2] * topo_pass;
+ topo_hash[i2] += topo_hash_prev[i1] * topo_pass;
+ tot_unique_edges += (topo_hash[i1] != topo_hash[i2]);
}
}
memcpy(topo_hash_prev, topo_hash, sizeof(MirrTopoHash_t) * totvert);
@@ -764,13 +774,14 @@ void ED_mesh_mirrtopo_init(Mesh *me, const int ob_mode, MirrTopoStore_t *mesh_to
}
}
- if (tot_unique <= tot_unique_prev) {
+ if ((tot_unique <= tot_unique_prev) && (tot_unique_edges <= tot_unique_edges_prev)) {
/* Finish searching for unique values when 1 loop dosnt give a
* higher number of unique values compared to the previous loop */
break;
}
else {
tot_unique_prev = tot_unique;
+ tot_unique_edges_prev = tot_unique_edges;
}
/* Copy the hash calculated this iter, so we can use them next time */
memcpy(topo_hash_prev, topo_hash, sizeof(MirrTopoHash_t) * totvert);
@@ -786,7 +797,7 @@ void ED_mesh_mirrtopo_init(Mesh *me, const int ob_mode, MirrTopoStore_t *mesh_to
if (em) {
if (skip_em_vert_array_init == false) {
- EDBM_index_arrays_ensure(em, BM_VERT);
+ BM_mesh_elem_table_ensure(em->bm, BM_VERT);
}
}
@@ -811,8 +822,8 @@ void ED_mesh_mirrtopo_init(Mesh *me, const int ob_mode, MirrTopoStore_t *mesh_to
if ((a == totvert) || (topo_pairs[a - 1].hash != topo_pairs[a].hash)) {
if (a - last == 2) {
if (em) {
- index_lookup[topo_pairs[a - 1].v_index] = (intptr_t)EDBM_vert_at_index(em, topo_pairs[a - 2].v_index);
- index_lookup[topo_pairs[a - 2].v_index] = (intptr_t)EDBM_vert_at_index(em, topo_pairs[a - 1].v_index);
+ index_lookup[topo_pairs[a - 1].v_index] = (intptr_t)BM_vert_at_index(em->bm, topo_pairs[a - 2].v_index);
+ index_lookup[topo_pairs[a - 2].v_index] = (intptr_t)BM_vert_at_index(em->bm, topo_pairs[a - 1].v_index);
}
else {
index_lookup[topo_pairs[a - 1].v_index] = topo_pairs[a - 2].v_index;
diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c
index f372053db55..47b9d5e2a9e 100644
--- a/source/blender/editors/mesh/editmesh_add.c
+++ b/source/blender/editors/mesh/editmesh_add.c
@@ -96,15 +96,6 @@ static void make_prim_finish(bContext *C, Object *obedit, bool was_editmode, int
WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, obedit);
}
-static void make_prim_radius_prop(wmOperatorType *ot)
-{
- PropertyRNA *prop;
-
- prop = RNA_def_float(ot->srna, "radius", 1.0f, 0.0, FLT_MAX, "Radius", "", 0.001, 100.00);
- RNA_def_property_subtype(prop, PROP_DISTANCE);
-}
-
-
static int add_primitive_plane_exec(bContext *C, wmOperator *op)
{
Object *obedit;
@@ -114,6 +105,7 @@ static int add_primitive_plane_exec(bContext *C, wmOperator *op)
bool was_editmode;
unsigned int layer;
+ WM_operator_view3d_unit_defaults(C, op);
ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL);
obedit = make_prim_init(C, CTX_DATA_(BLF_I18NCONTEXT_ID_MESH, "Plane"), &dia, mat, &was_editmode, loc, rot, layer);
em = BKE_editmesh_from_object(obedit);
@@ -139,14 +131,13 @@ void MESH_OT_primitive_plane_add(wmOperatorType *ot)
ot->idname = "MESH_OT_primitive_plane_add";
/* api callbacks */
- ot->invoke = WM_operator_view3d_distance_invoke;
ot->exec = add_primitive_plane_exec;
ot->poll = ED_operator_scene_editable;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
- make_prim_radius_prop(ot);
+ ED_object_add_unit_props(ot);
ED_object_add_generic_props(ot, true);
}
@@ -159,6 +150,7 @@ static int add_primitive_cube_exec(bContext *C, wmOperator *op)
bool was_editmode;
unsigned int layer;
+ WM_operator_view3d_unit_defaults(C, op);
ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL);
obedit = make_prim_init(C, CTX_DATA_(BLF_I18NCONTEXT_ID_MESH, "Cube"), &dia, mat, &was_editmode, loc, rot, layer);
em = BKE_editmesh_from_object(obedit);
@@ -185,14 +177,13 @@ void MESH_OT_primitive_cube_add(wmOperatorType *ot)
ot->idname = "MESH_OT_primitive_cube_add";
/* api callbacks */
- ot->invoke = WM_operator_view3d_distance_invoke;
ot->exec = add_primitive_cube_exec;
ot->poll = ED_operator_scene_editable;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
- make_prim_radius_prop(ot);
+ ED_object_add_unit_props(ot);
ED_object_add_generic_props(ot, true);
}
@@ -215,6 +206,7 @@ static int add_primitive_circle_exec(bContext *C, wmOperator *op)
cap_end = RNA_enum_get(op->ptr, "fill_type");
cap_tri = (cap_end == 2);
+ WM_operator_view3d_unit_defaults(C, op);
ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL);
obedit = make_prim_init(C, CTX_DATA_(BLF_I18NCONTEXT_ID_MESH, "Circle"), &dia, mat, &was_editmode, loc, rot, layer);
em = BKE_editmesh_from_object(obedit);
@@ -241,7 +233,6 @@ void MESH_OT_primitive_circle_add(wmOperatorType *ot)
ot->idname = "MESH_OT_primitive_circle_add";
/* api callbacks */
- ot->invoke = WM_operator_view3d_distance_invoke;
ot->exec = add_primitive_circle_exec;
ot->poll = ED_operator_scene_editable;
@@ -250,7 +241,7 @@ void MESH_OT_primitive_circle_add(wmOperatorType *ot)
/* props */
RNA_def_int(ot->srna, "vertices", 32, 3, INT_MAX, "Vertices", "", 3, 500);
- make_prim_radius_prop(ot);
+ ED_object_add_unit_props(ot);
RNA_def_enum(ot->srna, "fill_type", fill_type_items, 0, "Fill Type", "");
ED_object_add_generic_props(ot, true);
@@ -268,6 +259,7 @@ static int add_primitive_cylinder_exec(bContext *C, wmOperator *op)
const bool cap_end = (end_fill_type != 0);
const bool cap_tri = (end_fill_type == 2);
+ WM_operator_view3d_unit_defaults(C, op);
ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL);
obedit = make_prim_init(C, CTX_DATA_(BLF_I18NCONTEXT_ID_MESH, "Cylinder"), &dia, mat, &was_editmode, loc, rot, layer);
em = BKE_editmesh_from_object(obedit);
@@ -299,7 +291,6 @@ void MESH_OT_primitive_cylinder_add(wmOperatorType *ot)
ot->idname = "MESH_OT_primitive_cylinder_add";
/* api callbacks */
- ot->invoke = WM_operator_view3d_distance_invoke;
ot->exec = add_primitive_cylinder_exec;
ot->poll = ED_operator_scene_editable;
@@ -308,7 +299,7 @@ void MESH_OT_primitive_cylinder_add(wmOperatorType *ot)
/* props */
RNA_def_int(ot->srna, "vertices", 32, 3, INT_MAX, "Vertices", "", 3, 500);
- make_prim_radius_prop(ot);
+ ED_object_add_unit_props(ot);
prop = RNA_def_float(ot->srna, "depth", 2.0f, 0.0, FLT_MAX, "Depth", "", 0.001, 100.00);
RNA_def_property_subtype(prop, PROP_DISTANCE);
RNA_def_enum(ot->srna, "end_fill_type", fill_type_items, 1, "Cap Fill Type", "");
@@ -328,6 +319,7 @@ static int add_primitive_cone_exec(bContext *C, wmOperator *op)
const bool cap_end = (end_fill_type != 0);
const bool cap_tri = (end_fill_type == 2);
+ WM_operator_view3d_unit_defaults(C, op);
ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL);
obedit = make_prim_init(C, CTX_DATA_(BLF_I18NCONTEXT_ID_MESH, "Cone"), &dia, mat, &was_editmode, loc, rot, layer);
em = BKE_editmesh_from_object(obedit);
@@ -356,7 +348,6 @@ void MESH_OT_primitive_cone_add(wmOperatorType *ot)
ot->idname = "MESH_OT_primitive_cone_add";
/* api callbacks */
- ot->invoke = WM_operator_view3d_distance_invoke;
ot->exec = add_primitive_cone_exec;
ot->poll = ED_operator_scene_editable;
@@ -385,6 +376,7 @@ static int add_primitive_grid_exec(bContext *C, wmOperator *op)
bool was_editmode;
unsigned int layer;
+ WM_operator_view3d_unit_defaults(C, op);
ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL);
obedit = make_prim_init(C, CTX_DATA_(BLF_I18NCONTEXT_ID_MESH, "Grid"), &dia, mat, &was_editmode, loc, rot, layer);
em = BKE_editmesh_from_object(obedit);
@@ -412,7 +404,6 @@ void MESH_OT_primitive_grid_add(wmOperatorType *ot)
ot->idname = "MESH_OT_primitive_grid_add";
/* api callbacks */
- ot->invoke = WM_operator_view3d_distance_invoke;
ot->exec = add_primitive_grid_exec;
ot->poll = ED_operator_scene_editable;
@@ -422,7 +413,7 @@ void MESH_OT_primitive_grid_add(wmOperatorType *ot)
/* props */
RNA_def_int(ot->srna, "x_subdivisions", 10, 3, INT_MAX, "X Subdivisions", "", 3, 1000);
RNA_def_int(ot->srna, "y_subdivisions", 10, 3, INT_MAX, "Y Subdivisions", "", 3, 1000);
- make_prim_radius_prop(ot);
+ ED_object_add_unit_props(ot);
ED_object_add_generic_props(ot, true);
}
@@ -437,6 +428,7 @@ static int add_primitive_monkey_exec(bContext *C, wmOperator *op)
unsigned int layer;
bool was_editmode;
+ WM_operator_view3d_unit_defaults(C, op);
ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, &is_view_aligned);
if (!is_view_aligned)
rot[0] += (float)M_PI / 2.0f;
@@ -469,12 +461,11 @@ void MESH_OT_primitive_monkey_add(wmOperatorType *ot)
ot->idname = "MESH_OT_primitive_monkey_add";
/* api callbacks */
- ot->invoke = WM_operator_view3d_distance_invoke;
ot->exec = add_primitive_monkey_exec;
ot->poll = ED_operator_scene_editable;
/* flags */
- make_prim_radius_prop(ot);
+ ED_object_add_unit_props(ot);
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
ED_object_add_generic_props(ot, true);
@@ -489,6 +480,7 @@ static int add_primitive_uvsphere_exec(bContext *C, wmOperator *op)
bool was_editmode;
unsigned int layer;
+ WM_operator_view3d_unit_defaults(C, op);
ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL);
obedit = make_prim_init(C, CTX_DATA_(BLF_I18NCONTEXT_ID_MESH, "Sphere"), &dia, mat, &was_editmode, loc, rot, layer);
em = BKE_editmesh_from_object(obedit);
@@ -517,7 +509,6 @@ void MESH_OT_primitive_uv_sphere_add(wmOperatorType *ot)
ot->idname = "MESH_OT_primitive_uv_sphere_add";
/* api callbacks */
- ot->invoke = WM_operator_view3d_distance_invoke;
ot->exec = add_primitive_uvsphere_exec;
ot->poll = ED_operator_scene_editable;
@@ -542,6 +533,7 @@ static int add_primitive_icosphere_exec(bContext *C, wmOperator *op)
bool was_editmode;
unsigned int layer;
+ WM_operator_view3d_unit_defaults(C, op);
ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL);
obedit = make_prim_init(C, CTX_DATA_(BLF_I18NCONTEXT_ID_MESH, "Icosphere"), &dia, mat, &was_editmode, loc, rot, layer);
em = BKE_editmesh_from_object(obedit);
@@ -570,7 +562,6 @@ void MESH_OT_primitive_ico_sphere_add(wmOperatorType *ot)
ot->idname = "MESH_OT_primitive_ico_sphere_add";
/* api callbacks */
- ot->invoke = WM_operator_view3d_distance_invoke;
ot->exec = add_primitive_icosphere_exec;
ot->poll = ED_operator_scene_editable;
diff --git a/source/blender/editors/mesh/editmesh_bevel.c b/source/blender/editors/mesh/editmesh_bevel.c
index 6033e7ee471..97da0047793 100644
--- a/source/blender/editors/mesh/editmesh_bevel.c
+++ b/source/blender/editors/mesh/editmesh_bevel.c
@@ -64,7 +64,7 @@ typedef struct {
float shift_factor; /* The current factor when shift is pressed. Negative when shift not active. */
/* modal only */
- int mcenter[2];
+ float mcenter[2];
BMBackup mesh_backup;
void *draw_handle_pixel;
short twtype;
diff --git a/source/blender/editors/mesh/editmesh_bisect.c b/source/blender/editors/mesh/editmesh_bisect.c
new file mode 100644
index 00000000000..7bc3ff3ab77
--- /dev/null
+++ b/source/blender/editors/mesh/editmesh_bisect.c
@@ -0,0 +1,331 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2013 by Blender Foundation.
+ * All rights reserved.
+ *
+ * Contributor(s): Campbell Barton
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/editors/mesh/editmesh_bisect.c
+ * \ingroup edmesh
+ */
+
+#include "MEM_guardedalloc.h"
+
+#include "DNA_object_types.h"
+
+#include "BLI_math.h"
+
+#include "BKE_global.h"
+#include "BKE_context.h"
+#include "BKE_editmesh.h"
+
+#include "RNA_define.h"
+#include "RNA_access.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
+#include "ED_mesh.h"
+#include "ED_screen.h"
+#include "ED_view3d.h"
+
+
+#include "mesh_intern.h" /* own include */
+
+static int mesh_bisect_exec(bContext *C, wmOperator *op);
+
+/* -------------------------------------------------------------------- */
+/* Model Helpers */
+
+typedef struct {
+ /* modal only */
+ BMBackup mesh_backup;
+ bool is_first;
+ short twtype;
+} BisectData;
+
+static bool mesh_bisect_interactive_calc(
+ bContext *C, wmOperator *op,
+ BMEditMesh *em,
+ float plane_co[3], float plane_no[3])
+{
+ wmGesture *gesture = op->customdata;
+ BisectData *opdata;
+
+ ARegion *ar = CTX_wm_region(C);
+ RegionView3D *rv3d = ar->regiondata;
+
+ int x_start = RNA_int_get(op->ptr, "xstart");
+ int y_start = RNA_int_get(op->ptr, "ystart");
+ int x_end = RNA_int_get(op->ptr, "xend");
+ int y_end = RNA_int_get(op->ptr, "yend");
+
+ /* reference location (some point in front of the view) for finding a point on a plane */
+ const float *co_ref = rv3d->ofs;
+ float co_a_ss[2] = {x_start, y_start}, co_b_ss[2] = {x_end, y_end}, co_delta_ss[2];
+ float co_a[3], co_b[3];
+ const float zfac = ED_view3d_calc_zfac(rv3d, co_ref, NULL);
+
+ opdata = gesture->userdata;
+
+ /* view vector */
+ ED_view3d_win_to_vector(ar, co_a_ss, co_a);
+
+ /* view delta */
+ sub_v2_v2v2(co_delta_ss, co_a_ss, co_b_ss);
+ ED_view3d_win_to_delta(ar, co_delta_ss, co_b, zfac);
+
+ /* cross both to get a normal */
+ cross_v3_v3v3(plane_no, co_a, co_b);
+ normalize_v3(plane_no); /* not needed but nicer for user */
+
+ /* point on plane, can use either start or endpoint */
+ ED_view3d_win_to_3d(ar, co_ref, co_a_ss, plane_co);
+
+ if (opdata->is_first == false)
+ EDBM_redo_state_restore(opdata->mesh_backup, em, false);
+
+ opdata->is_first = false;
+
+ return true;
+}
+
+static int mesh_bisect_invoke(bContext *C, wmOperator *op, const wmEvent *event)
+{
+ int ret;
+
+ /* if the properties are set or there is no rv3d,
+ * skip model and exec immediately */
+
+ if ((CTX_wm_region_view3d(C) == NULL) ||
+ (RNA_struct_property_is_set(op->ptr, "plane_co") &&
+ RNA_struct_property_is_set(op->ptr, "plane_no")))
+ {
+ return mesh_bisect_exec(C, op);
+ }
+
+ ret = WM_gesture_straightline_invoke(C, op, event);
+ if (ret & OPERATOR_RUNNING_MODAL) {
+ View3D *v3d = CTX_wm_view3d(C);
+
+ wmGesture *gesture = op->customdata;
+ BisectData *opdata;
+
+ Object *obedit = CTX_data_edit_object(C);
+ BMEditMesh *em = BKE_editmesh_from_object(obedit);
+
+ opdata = MEM_mallocN(sizeof(BisectData), "inset_operator_data");
+ opdata->mesh_backup = EDBM_redo_state_store(em);
+ opdata->is_first = true;
+ gesture->userdata = opdata;
+
+ /* misc other vars */
+ G.moving = G_TRANSFORM_EDIT;
+ opdata->twtype = v3d->twtype;
+ v3d->twtype = 0;
+ }
+ return ret;
+}
+
+static void edbm_bisect_exit(bContext *C, BisectData *opdata)
+{
+ View3D *v3d = CTX_wm_view3d(C);
+ EDBM_redo_state_free(&opdata->mesh_backup, NULL, false);
+ v3d->twtype = opdata->twtype;
+ G.moving = 0;
+}
+
+static int mesh_bisect_modal(bContext *C, wmOperator *op, const wmEvent *event)
+{
+ wmGesture *gesture = op->customdata;
+ BisectData *opdata = gesture->userdata;
+ BisectData opdata_back = *opdata; /* annoyance, WM_gesture_straightline_modal, frees */
+ int ret;
+
+ ret = WM_gesture_straightline_modal(C, op, event);
+
+ if (ret & (OPERATOR_FINISHED | OPERATOR_CANCELLED)) {
+ edbm_bisect_exit(C, &opdata_back);
+ }
+
+ return ret;
+}
+
+/* End Model Helpers */
+/* -------------------------------------------------------------------- */
+
+
+
+static int mesh_bisect_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene = CTX_data_scene(C);
+
+ /* both can be NULL, fallbacks values are used */
+ View3D *v3d = CTX_wm_view3d(C);
+ RegionView3D *rv3d = ED_view3d_context_rv3d(C);
+
+ Object *obedit = CTX_data_edit_object(C);
+ BMEditMesh *em = BKE_editmesh_from_object(obedit);
+ BMesh *bm;
+ BMOperator bmop;
+ float plane_co[3];
+ float plane_no[3];
+ float imat[4][4];
+
+ const float thresh = RNA_float_get(op->ptr, "threshold");
+ const bool use_fill = RNA_boolean_get(op->ptr, "use_fill");
+ const bool clear_inner = RNA_boolean_get(op->ptr, "clear_inner");
+ const bool clear_outer = RNA_boolean_get(op->ptr, "clear_outer");
+
+ PropertyRNA *prop_plane_co;
+ PropertyRNA *prop_plane_no;
+
+ prop_plane_co = RNA_struct_find_property(op->ptr, "plane_co");
+ if (RNA_property_is_set(op->ptr, prop_plane_co)) {
+ RNA_property_float_get_array(op->ptr, prop_plane_co, plane_co);
+ }
+ else {
+ copy_v3_v3(plane_co, ED_view3d_cursor3d_get(scene, v3d));
+ RNA_property_float_set_array(op->ptr, prop_plane_co, plane_co);
+ }
+
+ prop_plane_no = RNA_struct_find_property(op->ptr, "plane_no");
+ if (RNA_property_is_set(op->ptr, prop_plane_no)) {
+ RNA_property_float_get_array(op->ptr, prop_plane_no, plane_no);
+ }
+ else {
+ if (rv3d) {
+ copy_v3_v3(plane_no, rv3d->viewinv[1]);
+ }
+ else {
+ /* fallback... */
+ plane_no[0] = plane_no[1] = 0.0f; plane_no[2] = 1.0f;
+ }
+ RNA_property_float_set_array(op->ptr, prop_plane_no, plane_no);
+ }
+
+
+
+ /* -------------------------------------------------------------------- */
+ /* Modal support */
+ /* Note: keep this isolated, exec can work wihout this */
+ if ((op->customdata != NULL) &&
+ mesh_bisect_interactive_calc(C, op, em, plane_co, plane_no))
+ {
+ /* write back to the props */
+ RNA_property_float_set_array(op->ptr, prop_plane_no, plane_no);
+ RNA_property_float_set_array(op->ptr, prop_plane_co, plane_co);
+ }
+ /* End Modal */
+ /* -------------------------------------------------------------------- */
+
+
+
+ bm = em->bm;
+
+ invert_m4_m4(imat, obedit->obmat);
+ mul_m4_v3(imat, plane_co);
+ mul_mat3_m4_v3(imat, plane_no);
+
+ EDBM_op_init(em, &bmop, op,
+ "bisect_plane geom=%hvef plane_co=%v plane_no=%v dist=%f clear_inner=%b clear_outer=%b",
+ BM_ELEM_SELECT, plane_co, plane_no, thresh, clear_inner, clear_outer);
+ BMO_op_exec(bm, &bmop);
+
+ EDBM_flag_disable_all(em, BM_ELEM_SELECT);
+
+ if (use_fill) {
+ float normal_fill[3];
+ BMOperator bmop_fill;
+ BMOperator bmop_attr;
+
+ normalize_v3_v3(normal_fill, plane_no);
+ if (clear_outer == true && clear_inner == false) {
+ negate_v3(normal_fill);
+ }
+
+ /* Fill */
+ BMO_op_initf(
+ bm, &bmop_fill, op->flag,
+ "triangle_fill edges=%S normal=%v use_dissolve=%b",
+ &bmop, "geom_cut.out", normal_fill, true);
+ BMO_op_exec(bm, &bmop_fill);
+
+ /* Copy Attributes */
+ BMO_op_initf(bm, &bmop_attr, op->flag,
+ "face_attribute_fill faces=%S use_normals=%b use_data=%b",
+ &bmop_fill, "geom.out", false, true);
+ BMO_op_exec(bm, &bmop_attr);
+
+ BMO_slot_buffer_hflag_enable(bm, bmop_fill.slots_out, "geom.out", BM_FACE, BM_ELEM_SELECT, true);
+
+ BMO_op_finish(bm, &bmop_attr);
+ BMO_op_finish(bm, &bmop_fill);
+ }
+
+ BMO_slot_buffer_hflag_enable(bm, bmop.slots_out, "geom_cut.out", BM_VERT | BM_EDGE, BM_ELEM_SELECT, true);
+
+ if (!EDBM_op_finish(em, &bmop, op, true)) {
+ return OPERATOR_CANCELLED;
+ }
+ else {
+ EDBM_update_generic(em, true, true);
+ EDBM_selectmode_flush(em);
+ return OPERATOR_FINISHED;
+ }
+}
+
+
+void MESH_OT_bisect(struct wmOperatorType *ot)
+{
+ PropertyRNA *prop;
+
+ /* identifiers */
+ ot->name = "Bisect";
+ ot->description = "Cut geometry along a plane (click-drag to define plane)";
+ ot->idname = "MESH_OT_bisect";
+
+ /* api callbacks */
+ ot->exec = mesh_bisect_exec;
+ ot->invoke = mesh_bisect_invoke;
+ ot->modal = mesh_bisect_modal;
+ ot->cancel = WM_gesture_straightline_cancel;
+ ot->poll = ED_operator_editmesh;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+
+
+ prop = RNA_def_float_vector(ot->srna, "plane_co", 3, NULL, -FLT_MAX, FLT_MAX,
+ "Plane Point", "A point on the plane", -FLT_MAX, FLT_MAX);
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
+ prop = RNA_def_float_vector(ot->srna, "plane_no", 3, NULL, -FLT_MAX, FLT_MAX,
+ "Plane Normal", "The direction the plane points", -FLT_MAX, FLT_MAX);
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
+
+ RNA_def_boolean(ot->srna, "use_fill", false, "Fill", "Fill in the cut");
+ RNA_def_boolean(ot->srna, "clear_inner", false, "Clear Inner", "Remove geometry behind the plane");
+ RNA_def_boolean(ot->srna, "clear_outer", false, "Clear Outer", "Remove geometry in front of the plane");
+
+ RNA_def_float(ot->srna, "threshold", 0.0001, 0.0, 10.0, "Axis Threshold", "", 0.00001, 0.1);
+
+ WM_operator_properties_gesture_straightline(ot, CURSOR_EDIT);
+}
diff --git a/source/blender/editors/mesh/editmesh_extrude.c b/source/blender/editors/mesh/editmesh_extrude.c
index b38f09b1dec..ef300fa9db6 100644
--- a/source/blender/editors/mesh/editmesh_extrude.c
+++ b/source/blender/editors/mesh/editmesh_extrude.c
@@ -290,7 +290,7 @@ static int edbm_extrude_repeat_exec(bContext *C, wmOperator *op)
//BMO_op_callf(em->bm, BMO_FLAG_DEFAULTS, "extrude_face_region geom=%hef", BM_ELEM_SELECT);
BMO_op_callf(em->bm, BMO_FLAG_DEFAULTS,
"translate vec=%v verts=%hv",
- (float *)dvec, BM_ELEM_SELECT);
+ dvec, BM_ELEM_SELECT);
//extrudeflag(obedit, em, SELECT, nor);
//translateflag(em, SELECT, dvec);
}
@@ -377,7 +377,6 @@ static int edbm_extrude_mesh(Scene *scene, Object *obedit, BMEditMesh *em, wmOpe
BKE_object_handle_update(scene, obedit);
/* individual faces? */
-// BIF_TransformSetUndo("Extrude");
if (nr == 2) {
// initTransform(TFM_SHRINKFATTEN, CTX_NO_PET|CTX_NO_MIRROR);
// Transform();
@@ -654,7 +653,7 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, const w
BM_ELEM_SELECT, min);
}
else {
- const float *curs = give_cursor(vc.scene, vc.v3d);
+ const float *curs = ED_view3d_cursor3d_get(vc.scene, vc.v3d);
BMOperator bmop;
BMOIter oiter;
@@ -752,7 +751,7 @@ static int edbm_spin_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(e
View3D *v3d = CTX_wm_view3d(C);
RegionView3D *rv3d = ED_view3d_context_rv3d(C);
- RNA_float_set_array(op->ptr, "center", give_cursor(scene, v3d));
+ RNA_float_set_array(op->ptr, "center", ED_view3d_cursor3d_get(scene, v3d));
RNA_float_set_array(op->ptr, "axis", rv3d->viewinv[2]);
return edbm_spin_exec(C, op);
@@ -836,6 +835,8 @@ static int edbm_screw_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
+ copy_v3_v3(nor, obedit->obmat[2]);
+
/* calculate dvec */
mul_v3_m4v3(v1_co_global, obedit->obmat, v1->co);
mul_v3_m4v3(v2_co_global, obedit->obmat, v2->co);
@@ -870,7 +871,7 @@ static int edbm_screw_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(
View3D *v3d = CTX_wm_view3d(C);
RegionView3D *rv3d = ED_view3d_context_rv3d(C);
- RNA_float_set_array(op->ptr, "center", give_cursor(scene, v3d));
+ RNA_float_set_array(op->ptr, "center", ED_view3d_cursor3d_get(scene, v3d));
RNA_float_set_array(op->ptr, "axis", rv3d->viewinv[1]);
return edbm_screw_exec(C, op);
diff --git a/source/blender/editors/mesh/editmesh_inset.c b/source/blender/editors/mesh/editmesh_inset.c
index dba19ee5da6..eb66cf50a1e 100644
--- a/source/blender/editors/mesh/editmesh_inset.c
+++ b/source/blender/editors/mesh/editmesh_inset.c
@@ -68,7 +68,7 @@ typedef struct {
NumInput num_input;
/* modal only */
- int mcenter[2];
+ float mcenter[2];
BMBackup mesh_backup;
void *draw_handle_pixel;
short twtype;
@@ -96,10 +96,10 @@ static void edbm_inset_update_header(wmOperator *op, bContext *C)
BLI_snprintf(msg, HEADER_LENGTH, str,
flts_str,
flts_str + NUM_STR_REP_LEN,
- opdata->modify_depth ? IFACE_("On") : IFACE_("Off"),
- RNA_boolean_get(op->ptr, "use_outset") ? IFACE_("On") : IFACE_("Off"),
- RNA_boolean_get(op->ptr, "use_boundary") ? IFACE_("On") : IFACE_("Off"),
- RNA_boolean_get(op->ptr, "use_individual") ? IFACE_("On") : IFACE_("Off")
+ WM_bool_as_string(opdata->modify_depth),
+ WM_bool_as_string(RNA_boolean_get(op->ptr, "use_outset")),
+ WM_bool_as_string(RNA_boolean_get(op->ptr, "use_boundary")),
+ WM_bool_as_string(RNA_boolean_get(op->ptr, "use_individual"))
);
ED_area_headerprint(sa, msg);
@@ -228,10 +228,8 @@ static bool edbm_inset_calc(wmOperator *op)
BMO_slot_buffer_hflag_enable(em->bm, bmop.slots_out, "faces.out", BM_FACE, BM_ELEM_SELECT, true);
}
else {
- BM_mesh_elem_hflag_disable_all(em->bm, BM_VERT | BM_EDGE, BM_ELEM_SELECT, false);
- BMO_slot_buffer_hflag_disable(em->bm, bmop.slots_out, "faces.out", BM_FACE, BM_ELEM_SELECT, false);
- /* re-select faces so the verts and edges get selected too */
- BM_mesh_elem_hflag_enable_test(em->bm, BM_FACE, BM_ELEM_SELECT, true, BM_ELEM_SELECT);
+ EDBM_flag_disable_all(em, BM_ELEM_SELECT);
+ BMO_slot_buffer_hflag_enable(em->bm, bmop.slots_in, "faces", BM_FACE, BM_ELEM_SELECT, true);
}
if (!EDBM_op_finish(em, &bmop, op, true)) {
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index e1d0a412ce7..5d8851640e0 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -230,10 +230,10 @@ static void knife_update_header(bContext *C, KnifeTool_OpData *kcd)
BLI_snprintf(header, HEADER_LENGTH, IFACE_("LMB: define cut lines, Return/Spacebar: confirm, Esc or RMB: cancel, "
"E: new cut, Ctrl: midpoint snap (%s), Shift: ignore snap (%s), "
"C: angle constrain (%s), Z: cut through (%s)"),
- kcd->snap_midpoints ? IFACE_("On") : IFACE_("Off"),
- kcd->ignore_edge_snapping ? IFACE_("On") : IFACE_("Off"),
- kcd->angle_snapping ? IFACE_("On") : IFACE_("Off"),
- kcd->cut_through ? IFACE_("On") : IFACE_("Off"));
+ WM_bool_as_string(kcd->snap_midpoints),
+ WM_bool_as_string(kcd->ignore_edge_snapping),
+ WM_bool_as_string(kcd->angle_snapping),
+ WM_bool_as_string(kcd->cut_through));
ED_area_headerprint(CTX_wm_area(C), header);
}
@@ -308,7 +308,7 @@ static void knife_add_edge_faces_to_vert(KnifeTool_OpData *kcd, KnifeVert *kfv,
BMIter bmiter;
BMFace *f;
- BM_ITER_ELEM(f, &bmiter, e, BM_FACES_OF_EDGE) {
+ BM_ITER_ELEM (f, &bmiter, e, BM_FACES_OF_EDGE) {
knife_append_list(kcd, &kfv->faces, f);
}
}
@@ -354,7 +354,7 @@ static KnifeVert *get_bm_knife_vert(KnifeTool_OpData *kcd, BMVert *v)
kfv = new_knife_vert(kcd, v->co, kcd->cagecos[BM_elem_index_get(v)]);
kfv->v = v;
BLI_ghash_insert(kcd->origvertmap, v, kfv);
- BM_ITER_ELEM(f, &bmiter, v, BM_FACES_OF_VERT) {
+ BM_ITER_ELEM (f, &bmiter, v, BM_FACES_OF_VERT) {
knife_append_list(kcd, &kfv->faces, f);
}
}
@@ -379,7 +379,7 @@ static KnifeEdge *get_bm_knife_edge(KnifeTool_OpData *kcd, BMEdge *e)
BLI_ghash_insert(kcd->origedgemap, e, kfe);
- BM_ITER_ELEM(f, &bmiter, e, BM_FACES_OF_EDGE) {
+ BM_ITER_ELEM (f, &bmiter, e, BM_FACES_OF_EDGE) {
knife_append_list(kcd, &kfe->faces, f);
}
}
@@ -400,7 +400,7 @@ static void knife_start_cut(KnifeTool_OpData *kcd)
BMVert *v0;
knife_input_ray_segment(kcd, kcd->curr.mval, 1.0f, origin, origin_ofs);
- v0 = BM_vert_at_index(kcd->em->bm, 0);
+ v0 = BM_vert_at_index_find(kcd->em->bm, 0);
if (v0) {
closest_to_line_v3(kcd->prev.cage, v0->co, origin_ofs, origin);
copy_v3_v3(kcd->prev.co, kcd->prev.cage); /*TODO: do we need this? */
@@ -420,7 +420,7 @@ static ListBase *knife_get_face_kedges(KnifeTool_OpData *kcd, BMFace *f)
lst = knife_empty_list(kcd);
- BM_ITER_ELEM(e, &bmiter, f, BM_EDGES_OF_FACE) {
+ BM_ITER_ELEM (e, &bmiter, f, BM_EDGES_OF_FACE) {
knife_append_list(kcd, lst, get_bm_knife_edge(kcd, e));
}
@@ -497,13 +497,16 @@ static KnifeVert *knife_split_edge(KnifeTool_OpData *kcd, KnifeEdge *kfe, float
* and move cur data to prev. */
static void knife_add_single_cut(KnifeTool_OpData *kcd)
{
- KnifeEdge *kfe = new_knife_edge(kcd), *kfe2 = NULL, *kfe3 = NULL;
+ KnifeEdge *kfe, *kfe2 = NULL, *kfe3 = NULL;
- if (kcd->prev.vert && kcd->prev.vert == kcd->curr.vert)
- return;
- if (kcd->prev.edge && kcd->prev.edge == kcd->curr.edge)
+ if ((kcd->prev.vert && kcd->prev.vert == kcd->curr.vert) ||
+ (kcd->prev.edge && kcd->prev.edge == kcd->curr.edge))
+ {
+ kcd->prev = kcd->curr;
return;
+ }
+ kfe = new_knife_edge(kcd);
kfe->draw = true;
if (kcd->prev.vert) {
@@ -573,38 +576,107 @@ static int verge_linehit(const void *vlh1, const void *vlh2)
if (lh1->l < lh2->l) return -1;
else if (lh1->l > lh2->l) return 1;
+ else if (lh1->v && lh2->v) {
+ /* want like verts to sort together; just compare pointers */
+ if (lh1->v < lh2->v) return -1;
+ else if (lh1->v > lh2->v) return 1;
+ else return 0;
+ }
else return 0;
}
/* If there's a linehit connected (same face) as testi in range [firsti, lasti], return the first such, else -1.
+ * It also counts as connected if both linehits are snapped to the same vertex.
* If testi is out of range, look for connection to f instead, if f is non-NULL */
static int find_connected_linehit(KnifeTool_OpData *kcd, int testi, BMFace *f, int firsti, int lasti)
{
int i;
-
- for (i = firsti; i <= lasti; i++) {
- if (testi >= 0 && testi < kcd->totlinehit) {
- if (knife_find_common_face(&kcd->linehits[testi].kfe->faces,
- &kcd->linehits[i].kfe->faces))
- {
- return i;
- }
- }
- else if (f) {
- if (find_ref(&kcd->linehits[i].kfe->faces, f))
- return i;
+ ListBase *testfaces, *ifaces;
+ BMFace *testface, *iface;
+ BMEdgeHit *lh;
+ bool shareface;
+
+ if (testi >= 0 && testi < kcd->totlinehit) {
+ testface = NULL;
+ testfaces = NULL;
+ lh = &kcd->linehits[testi];
+ if (lh->v)
+ testfaces = &lh->v->faces;
+ else if (lh->kfe)
+ testfaces = &lh->kfe->faces;
+ else if (lh->f) {
+ testfaces = NULL;
+ testface = lh->f;
}
}
+ else {
+ testface = f;
+ testfaces = NULL;
+ }
+ for (i = firsti; i <= lasti; i++) {
+ shareface = false;
+ lh = &kcd->linehits[i];
+ iface = NULL;
+ ifaces = NULL;
+ if (lh->v)
+ ifaces = &lh->v->faces;
+ else if (lh->kfe)
+ ifaces = &lh->kfe->faces;
+ else if (lh->f) {
+ ifaces = NULL;
+ iface = lh->f;
+ }
+ if (testfaces) {
+ if (ifaces)
+ shareface = (knife_find_common_face(testfaces, ifaces) != NULL);
+ else if (iface)
+ shareface = (find_ref(testfaces, iface) != NULL);
+ }
+ else if (ifaces) {
+ if (testface)
+ shareface = (find_ref(ifaces, testface) != NULL);
+ }
+ else if (testface && iface) {
+ shareface = (testface == iface);
+ }
+ if (shareface)
+ return i;
+ }
return -1;
}
-/* Sort in order of distance along cut line, but take care when distances are equal */
-static void knife_sort_linehits(KnifeTool_OpData *kcd)
+/* Sort in order of distance along cut line.
+ * Remove any successive linehits that are snapped to the same vertex.
+ * If joinfaces, treat hits at same distance as follows: try to find
+ * ordering so that preceding and succeeding hits will share a face.
+ */
+static void knife_sort_linehits(KnifeTool_OpData *kcd, bool joinfaces)
{
int i, j, k, nexti, nsame;
qsort(kcd->linehits, kcd->totlinehit, sizeof(BMEdgeHit), verge_linehit);
+ /* Remove duplicated linehits snapped to same vertex */
+ i = j = 0; /* loop copies from j to i */
+ while (j < kcd->totlinehit) {
+ nsame = 0;
+ if (kcd->linehits[j].v) {
+ for (k = j + 1; k < kcd->totlinehit; k++) {
+ if (kcd->linehits[k].v != kcd->linehits[j].v)
+ break;
+ nsame++;
+ }
+ }
+ if (i != j)
+ kcd->linehits[i] = kcd->linehits[j];
+ i++;
+ j += 1 + nsame;
+ }
+ kcd->totlinehit = i;
+
+ if (!joinfaces)
+ return;
+
/* for ranges of equal "l", swap if neccesary to make predecessor and
* successor faces connected to the linehits at either end of the range */
for (i = 0; i < kcd->totlinehit - 1; i = nexti) {
@@ -653,6 +725,7 @@ static void knife_add_single_cut_through(KnifeTool_OpData *kcd, KnifeVert *v1, K
knife_edge_append_face(kcd, kfenew, f);
}
+#if 0
static void knife_get_vert_faces(KnifeTool_OpData *kcd, KnifeVert *kfv, BMFace *facef, ListBase *lst)
{
BMIter bmiter;
@@ -685,20 +758,33 @@ static void knife_get_edge_faces(KnifeTool_OpData *kcd, KnifeEdge *kfe, ListBase
}
}
}
+#endif
+
+static void copy_hit_from_posdata(BMEdgeHit *lh, KnifePosData *pos, float lambda)
+{
+ lh->kfe = pos->edge;
+ lh->v = pos->vert;
+ lh->f = pos->bmface;
+ copy_v3_v3(lh->hit, pos->co);
+ copy_v3_v3(lh->cagehit, pos->cage);
+ copy_v3_v3(lh->realhit, pos->co);
+ lh->l = lambda;
+ /* perc and schit not used by callers of this function */
+}
/* BMESH_TODO: add more functionality to cut-through:
* - cutting "in face" (e.g., holes) should cut in all faces, not just visible one
* - perhaps improve O(n^2) algorithm used here */
static void knife_cut_through(KnifeTool_OpData *kcd)
{
- BMEdgeHit *lh, *lh2;
+ BMEdgeHit *lh, *lh2, *linehits;
BMFace *f;
- KnifeEdge *kfe, *kfe2, *kfe3;
- KnifeVert *v1, *v2, *firstv = NULL, *lastv = NULL;
- ListBase firstfaces = {NULL, NULL}, lastfaces = {NULL, NULL};
- Ref *r, *r2;
+ KnifeEdge *kfe, *kfe2;
+ KnifeVert *v1, *v2, *lastv;
+ ListBase *faces1, *faces2;
KnifeEdge **splitkfe;
- int i, j;
+ bool needprev, needcurr;
+ int i, j, n;
if (!kcd->totlinehit) {
/* if no linehits then no interesting back face stuff to do */
@@ -706,93 +792,68 @@ static void knife_cut_through(KnifeTool_OpData *kcd)
return;
}
- /* TODO: probably don't need to sort at all */
- qsort(kcd->linehits, kcd->totlinehit, sizeof(BMEdgeHit), verge_linehit);
- splitkfe = MEM_callocN(kcd->totlinehit * sizeof(KnifeEdge *), "knife_cut_through");
+ /* sort eliminates hits on same vertices */
+ knife_sort_linehits(kcd, false);
- if (kcd->prev.vert) {
- if (kcd->prev.vert == kcd->curr.vert)
- return;
- firstv = kcd->prev.vert;
- knife_get_vert_faces(kcd, firstv, kcd->prev.bmface, &firstfaces);
- }
- else if (kcd->prev.edge) {
- if (kcd->prev.edge == kcd->curr.edge)
- return;
- firstv = knife_split_edge(kcd, kcd->prev.edge, kcd->prev.co, &kfe3);
- knife_get_edge_faces(kcd, kcd->prev.edge, &firstfaces);
+ /* code is cleaner if make prev and curr into hits (if they are on edges or verts) */
+ n = kcd->totlinehit;
+ needprev = ((kcd->prev.vert && kcd->prev.vert != kcd->linehits[0].v) || kcd->prev.edge);
+ needcurr = ((kcd->curr.vert && kcd->curr.vert != kcd->linehits[n - 1].v) || kcd->curr.edge);
+ n += needprev + needcurr;
+ linehits = MEM_callocN(n * sizeof(BMEdgeHit), "knife_cut_through");
+ i = 0;
+ if (needprev) {
+ copy_hit_from_posdata(&linehits[0], &kcd->prev, 0.0f);
+ i++;
}
+ memcpy(linehits + i, kcd->linehits, kcd->totlinehit * sizeof(BMEdgeHit));
+ i += kcd->totlinehit;
+ if (needcurr)
+ copy_hit_from_posdata(&linehits[i], &kcd->curr, 1.0f);
- if (kcd->curr.vert) {
- lastv = kcd->curr.vert;
- knife_get_vert_faces(kcd, lastv, kcd->curr.bmface, &lastfaces);
- }
- else if (kcd->curr.edge) {
- lastv = knife_split_edge(kcd, kcd->curr.edge, kcd->curr.co, &kfe3);
- knife_get_edge_faces(kcd, kcd->curr.edge, &lastfaces);
- }
-
- if (firstv) {
- /* For each face incident to firstv,
- * find the first following linehit (if any) sharing that face and connect */
- for (r = firstfaces.first; r; r = r->next) {
- bool found = false;
- f = r->ref;
- for (j = 0, lh2 = kcd->linehits; j < kcd->totlinehit && !found; j++, lh2++) {
- kfe2 = lh2->kfe;
- for (r2 = kfe2->faces.first; r2; r2 = r2->next) {
- if (r2->ref == f) {
- v2 = splitkfe[j] ? kfe2->v1 : knife_split_edge(kcd, kfe2, lh2->hit, &splitkfe[j]);
- knife_add_single_cut_through(kcd, firstv, v2, f);
- found = true;
- break;
- }
- }
- }
- if (!found && lastv) {
- for (r2 = lastfaces.first; r2; r2 = r2->next) {
- if (r2->ref == f) {
- knife_add_single_cut_through(kcd, firstv, lastv, f);
- break;
- }
- }
- }
- }
- }
- for (i = 0, lh = kcd->linehits; i < kcd->totlinehit; i++, lh++) {
+ splitkfe = MEM_callocN(n * sizeof(KnifeEdge *), "knife_cut_through");
+
+ lastv = NULL;
+ for (i = 0, lh = linehits; i < n; i++, lh++) {
kfe = lh->kfe;
+ v1 = NULL;
- /* For each face attached to edge for this linehit,
- * find the first following linehit (if any) sharing that face and connect */
- for (r = kfe->faces.first; r; r = r->next) {
- bool found = false;
- f = r->ref;
- for (j = i + 1, lh2 = lh + 1; j < kcd->totlinehit && !found; j++, lh2++) {
- kfe2 = lh2->kfe;
- for (r2 = kfe2->faces.first; r2; r2 = r2->next) {
- if (r2->ref == f) {
- v1 = splitkfe[i] ? kfe->v1 : knife_split_edge(kcd, kfe, lh->hit, &splitkfe[i]);
- v2 = splitkfe[j] ? kfe2->v1 : knife_split_edge(kcd, kfe2, lh2->hit, &splitkfe[j]);
- knife_add_single_cut_through(kcd, v1, v2, f);
- found = true;
- break;
- }
- }
+ /* get faces incident on hit lh */
+ if (lh->v) {
+ v1 = lh->v;
+ faces1 = &v1->faces;
+ }
+ else if (kfe) {
+ faces1 = &kfe->faces;
+ }
+
+ /* For each following hit, connect if lh1 an lh2 share a face */
+ for (j = i + 1, lh2 = lh + 1; j < n; j++, lh2++) {
+ kfe2 = lh2->kfe;
+ v2 = NULL;
+ if (lh2->v) {
+ v2 = lh2->v;
+ faces2 = &v2->faces;
}
- if (!found && lastv) {
- for (r2 = lastfaces.first; r2; r2 = r2->next) {
- if (r2->ref == f) {
- v1 = splitkfe[i] ? kfe->v1 : knife_split_edge(kcd, kfe, lh->hit, &splitkfe[i]);
- knife_add_single_cut_through(kcd, v1, lastv, f);
- break;
- }
- }
+ else if (kfe2) {
+ faces2 = &kfe2->faces;
+ }
+
+ f = knife_find_common_face(faces1, faces2);
+ if (f) {
+ if (!v1)
+ v1 = splitkfe[i] ? kfe->v1 : knife_split_edge(kcd, kfe, lh->hit, &splitkfe[i]);
+ if (!v2)
+ v2 = splitkfe[j] ? kfe2->v1 : knife_split_edge(kcd, kfe2, lh2->hit, &splitkfe[j]);
+ knife_add_single_cut_through(kcd, v1, v2, f);
+ lastv = v2;
}
}
}
MEM_freeN(splitkfe);
+ MEM_freeN(linehits);
MEM_freeN(kcd->linehits);
kcd->linehits = NULL;
kcd->totlinehit = 0;
@@ -816,7 +877,7 @@ static void knife_add_cut(KnifeTool_OpData *kcd)
BMEdgeHit *lh, *lastlh, *firstlh;
int i;
- knife_sort_linehits(kcd);
+ knife_sort_linehits(kcd, true);
lh = kcd->linehits;
lastlh = firstlh = NULL;
@@ -848,14 +909,14 @@ static void knife_add_cut(KnifeTool_OpData *kcd)
continue;
/* first linehit may be down face parallel to view */
- if (!lastlh && fabsf(lh->l) < KNIFE_FLT_EPS)
+ if (!lastlh && !lh->v && fabsf(lh->l) < KNIFE_FLT_EPS)
continue;
if (kcd->prev.is_space) {
kcd->prev.is_space = 0;
copy_v3_v3(kcd->prev.co, lh->hit);
copy_v3_v3(kcd->prev.cage, lh->cagehit);
- kcd->prev.vert = NULL;
+ kcd->prev.vert = lh->v;
kcd->prev.edge = lh->kfe;
kcd->prev.bmface = lh->f;
continue;
@@ -1172,6 +1233,69 @@ static float len_v3_tri_side_max(const float v1[3], const float v2[3], const flo
return sqrtf(max_fff(s1, s2, s3));
}
+/**
+ * given a tri, return 3 planes aligned with the tri's normal.
+ *
+ * If the triangle were extruded along its normal,
+ * the planes calculated would be the 3 sides around the extrusion.
+ */
+static void plane_from_tri_clip3_v3(
+ float tri_plane_clip[3][4],
+ const float v0[3], const float v1[3], const float v2[3])
+{
+ float tri_norm[3];
+ float tvec[3], cross[3];
+
+ normal_tri_v3(tri_norm, v0, v1, v2);
+
+ sub_v3_v3v3(tvec, v0, v1);
+ cross_v3_v3v3(cross, tvec, tri_norm);
+ plane_from_point_normal_v3(tri_plane_clip[0], v0, cross);
+
+ sub_v3_v3v3(tvec, v1, v2);
+ cross_v3_v3v3(cross, tvec, tri_norm);
+ plane_from_point_normal_v3(tri_plane_clip[1], v1, cross);
+
+ sub_v3_v3v3(tvec, v2, v0);
+ cross_v3_v3v3(cross, tvec, tri_norm);
+ plane_from_point_normal_v3(tri_plane_clip[2], v2, cross);
+}
+
+/**
+ * Given a line that is planar with a tri, clip the segment by that tri.
+ *
+ * This is needed so we end up with both points in the triangle.
+ */
+static bool isect_line_tri_coplanar_v3(
+ const float p1[3], const float p2[3],
+ const float v0[3], const float v1[3], const float v2[3],
+ float r_isects[2][3],
+
+ /* avoid re-calculating every time */
+ float tri_plane[4], float tri_plane_clip[3][4])
+{
+ float p1_tmp[3] = {UNPACK3(p1)};
+ float p2_tmp[3] = {UNPACK3(p2)};
+
+ (void)v0, (void)v1, (void)v2;
+
+ /* first check if the points are planar with the tri */
+ if ((fabsf(dist_squared_to_plane_v3(p1, tri_plane)) < KNIFE_FLT_EPS_SQUARED) &&
+ (fabsf(dist_squared_to_plane_v3(p2, tri_plane)) < KNIFE_FLT_EPS_SQUARED) &&
+ /* clip the segment by planes around the triangle so we can be sure the points
+ * aren't outside the triangle */
+ (clip_segment_v3_plane_n(p1_tmp, p2_tmp, tri_plane_clip, 3)))
+ {
+ copy_v3_v3(r_isects[0], p1_tmp);
+ copy_v3_v3(r_isects[1], p2_tmp);
+
+ return true;
+ }
+ else {
+ return false;
+ }
+}
+
static BMEdgeHit *knife_edge_tri_isect(KnifeTool_OpData *kcd, BMBVHTree *bmtree,
const float v1[3], const float v2[3], const float v3[3],
SmallHash *ehash, bglMats *mats, int *count)
@@ -1181,9 +1305,11 @@ static BMEdgeHit *knife_edge_tri_isect(KnifeTool_OpData *kcd, BMBVHTree *bmtree,
BLI_array_declare(edges);
BVHTreeOverlap *results, *result;
BMLoop **ls;
- float cos[9], lambda;
+ float cos[9], tri_norm[3], tri_plane[4], isects[2][3], lambda;
+ float tri_plane_clip[3][4];
unsigned int tot = 0;
- int i;
+ int i, j, n_isects;
+
/* for comparing distances, error of intersection depends on triangle scale.
* need to scale down before squaring for accurate comparison */
@@ -1194,6 +1320,11 @@ static BMEdgeHit *knife_edge_tri_isect(KnifeTool_OpData *kcd, BMBVHTree *bmtree,
copy_v3_v3(cos + 3, v2);
copy_v3_v3(cos + 6, v3);
+ /* avoid re-calculation in #isect_line_tri_coplanar_v3 */
+ normal_tri_v3(tri_norm, v1, v2, v3);
+ plane_from_point_normal_v3(tri_plane, v1, tri_norm);
+ plane_from_tri_clip3_v3(tri_plane_clip, v1, v2, v3);
+
BLI_bvhtree_insert(tree2, 0, cos, 3);
BLI_bvhtree_balance(tree2);
@@ -1217,11 +1348,28 @@ static BMEdgeHit *knife_edge_tri_isect(KnifeTool_OpData *kcd, BMBVHTree *bmtree,
continue; /* We already found a hit on this knife edge */
}
- if (isect_line_tri_v3(kfe->v1->cageco, kfe->v2->cageco, v1, v2, v3, &lambda, NULL)) {
- float p[3], no[3], view[3], sp[2];
+ n_isects = 0;
- interp_v3_v3v3(p, kfe->v1->cageco, kfe->v2->cageco, lambda);
+ if (isect_line_tri_coplanar_v3(kfe->v1->cageco, kfe->v2->cageco, v1, v2, v3,
+ isects,
+ /* cached values */
+ tri_plane, tri_plane_clip))
+ {
+ /* both kfe ends are in cutting triangle */
+ n_isects = 2;
+ }
+ else if (isect_line_tri_epsilon_v3(kfe->v1->cageco, kfe->v2->cageco, v1, v2, v3,
+ &lambda, NULL, depsilon))
+ {
+ /* kfe intersects cutting triangle lambda of the way along kfe */
+ interp_v3_v3v3(isects[0], kfe->v1->cageco, kfe->v2->cageco, lambda);
+ n_isects = 1;
+ }
+
+ for (j = 0; j < n_isects; j++) {
+ float p[3];
+ copy_v3_v3(p, isects[j]);
if (kcd->curr.vert && len_squared_v3v3(kcd->curr.vert->cageco, p) < depsilon_sq) {
continue;
}
@@ -1239,16 +1387,18 @@ static BMEdgeHit *knife_edge_tri_isect(KnifeTool_OpData *kcd, BMBVHTree *bmtree,
continue;
}
- knife_project_v2(kcd, p, sp);
- ED_view3d_unproject(mats, view, sp[0], sp[1], 0.0f);
- mul_m4_v3(kcd->ob->imat, view);
-
if (kcd->cut_through) {
f_hit = NULL;
}
else {
/* check if this point is visible in the viewport */
- float p1[3], lambda1;
+ float p1[3], no[3], view[3], sp[2];
+ float lambda1;
+
+ /* screen projection */
+ knife_project_v2(kcd, p, sp);
+ ED_view3d_unproject(mats, view, sp[0], sp[1], 0.0f);
+ mul_m4_v3(kcd->ob->imat, view);
/* if face isn't planer, p may be behind the current tesselated tri,
* so move it onto that and then a little towards eye */
@@ -1268,7 +1418,7 @@ static BMEdgeHit *knife_edge_tri_isect(KnifeTool_OpData *kcd, BMBVHTree *bmtree,
add_v3_v3(p1, no);
/* ray cast */
- f_hit = BKE_bmbvh_ray_cast(bmtree, p1, no, NULL, NULL, NULL);
+ f_hit = BKE_bmbvh_ray_cast(bmtree, p1, no, KNIFE_FLT_EPS, NULL, NULL, NULL);
}
/* ok, if visible add the new point */
@@ -1283,6 +1433,7 @@ static BMEdgeHit *knife_edge_tri_isect(KnifeTool_OpData *kcd, BMBVHTree *bmtree,
hit.kfe = kfe;
hit.v = NULL;
+ hit.l = 0.0f;
knife_find_basef(kfe);
hit.f = kfe->basef;
@@ -1292,7 +1443,6 @@ static BMEdgeHit *knife_edge_tri_isect(KnifeTool_OpData *kcd, BMBVHTree *bmtree,
interp_v3_v3v3(p, kfe->v1->co, kfe->v2->co, hit.perc);
copy_v3_v3(hit.realhit, p);
- /* BMESH_TODO: should also snap to vertices */
if (kcd->snap_midpoints) {
float perc = hit.perc;
@@ -1310,6 +1460,12 @@ static BMEdgeHit *knife_edge_tri_isect(KnifeTool_OpData *kcd, BMBVHTree *bmtree,
interp_v3_v3v3(hit.hit, kfe->v1->co, kfe->v2->co, perc);
interp_v3_v3v3(hit.cagehit, kfe->v1->cageco, kfe->v2->cageco, perc);
}
+ else if (hit.perc < KNIFE_FLT_EPS || hit.perc > 1.0f - KNIFE_FLT_EPS) {
+ /* snap to vert */
+ hit.v = (hit.perc < KNIFE_FLT_EPS) ? kfe->v1 : kfe->v2;
+ copy_v3_v3(hit.hit, hit.v->co);
+ copy_v3_v3(hit.cagehit, hit.v->co);
+ }
else {
copy_v3_v3(hit.hit, p);
}
@@ -1347,7 +1503,7 @@ static void calc_ortho_extent(KnifeTool_OpData *kcd)
float max_xyz = 0.0f;
int i;
- BM_ITER_MESH(v, &iter, bm, BM_VERTS_OF_MESH) {
+ BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) {
for (i = 0; i < 3; i++)
max_xyz = max_ff(max_xyz, fabs(v->co[i]));
}
@@ -1390,8 +1546,16 @@ static void knife_find_line_hits(KnifeTool_OpData *kcd)
knife_project_v2(kcd, v1, s1);
knife_project_v2(kcd, v2, s2);
- if (len_squared_v2v2(s1, s2) < 1)
- return;
+ if (kcd->is_interactive) {
+ if (len_squared_v2v2(s1, s2) < 1.0f) {
+ return;
+ }
+ }
+ else {
+ if (len_squared_v2v2(s1, s2) < KNIFE_FLT_EPS_SQUARED) {
+ return;
+ }
+ }
/* unproject screen line */
ED_view3d_win_to_segment(kcd->ar, kcd->vc.v3d, s1, v1, v3, true);
@@ -1502,7 +1666,7 @@ static BMFace *knife_find_closest_face(KnifeTool_OpData *kcd, float co[3], float
knife_input_ray_segment(kcd, kcd->curr.mval, 1.0f, origin, origin_ofs);
sub_v3_v3v3(ray, origin_ofs, origin);
- f = BKE_bmbvh_ray_cast(kcd->bmbvh, origin, ray, NULL, co, cageco);
+ f = BKE_bmbvh_ray_cast(kcd->bmbvh, origin, ray, 0.0f, NULL, co, cageco);
if (is_space)
*is_space = !f;
@@ -1652,7 +1816,7 @@ static KnifeEdge *knife_find_closest_edge(KnifeTool_OpData *kcd, float p[3], flo
if (fptr)
*fptr = f;
- if (cure && p) {
+ if (cure) {
if (!kcd->ignore_edge_snapping || !(cure->e)) {
KnifeVert *edgesnap = NULL;
@@ -1745,7 +1909,7 @@ static KnifeVert *knife_find_closest_vert(KnifeTool_OpData *kcd, float p[3], flo
if (fptr)
*fptr = f;
- if (curv && p) {
+ if (curv) {
copy_v3_v3(p, curv->co);
copy_v3_v3(cagep, curv->cageco);
@@ -1967,7 +2131,7 @@ static void knifenet_fill_faces(KnifeTool_OpData *kcd)
facenet_entry *entry;
ListBase *face_nets = MEM_callocN(sizeof(ListBase) * bm->totface, "face_nets");
BMFace **faces = MEM_callocN(sizeof(BMFace *) * bm->totface, "faces knife");
- MemArena *arena = BLI_memarena_new(1 << 16, "knifenet_fill_faces");
+ MemArena *arena = BLI_memarena_new(MEM_SIZE_OPTIMAL(1 << 16), "knifenet_fill_faces");
SmallHash shash;
RNG *rng;
int i, j, k = 0, totface = bm->totface;
@@ -1993,7 +2157,7 @@ static void knifenet_fill_faces(KnifeTool_OpData *kcd)
for (kfv = BLI_mempool_iterstep(&iter); kfv; kfv = BLI_mempool_iterstep(&iter)) {
if (!kfv->v) {
/* shouldn't we be at least copying the normal? - if not some comment here should explain why - campbell */
- kfv->v = BM_vert_create(bm, kfv->co, NULL);
+ kfv->v = BM_vert_create(bm, kfv->co, NULL, BM_CREATE_NOP);
kfv->flag = 1;
BMO_elem_flag_enable(bm, kfv->v, DEL);
}
@@ -2656,7 +2820,7 @@ static void knife_make_chain_cut(KnifeTool_OpData *kcd, BMFace *f, ListBase *cha
l_new = NULL;
if (nco == 0) {
/* Want to prevent creating two-sided polygons */
- if (BM_edge_exists(v1, v2)) {
+ if (v1 == v2 || BM_edge_exists(v1, v2)) {
f_new = NULL;
}
else {
@@ -2683,7 +2847,7 @@ static void knife_make_chain_cut(KnifeTool_OpData *kcd, BMFace *f, ListBase *cha
BM_edge_select_set(bm, l_new->e, true);
}
}
- else {
+ else if (f_new) {
BM_elem_select_copy(bm, bm, f_new, f);
}
@@ -2918,7 +3082,7 @@ static void knifetool_exit_ex(bContext *C, KnifeTool_OpData *kcd)
return;
if (kcd->is_interactive) {
- WM_cursor_restore(CTX_wm_window(C));
+ WM_cursor_modal_restore(CTX_wm_window(C));
/* deactivate the extra drawing stuff in 3D-View */
ED_region_draw_cb_exit(kcd->ar->type, kcd->draw_handle);
@@ -2995,7 +3159,7 @@ static void knifetool_init(bContext *C, KnifeTool_OpData *kcd,
(only_select ? BMBVH_RESPECT_SELECT : BMBVH_RESPECT_HIDDEN),
kcd->cagecos, false);
- kcd->arena = BLI_memarena_new(1 << 15, "knife");
+ kcd->arena = BLI_memarena_new(MEM_SIZE_OPTIMAL(1 << 15), "knife");
kcd->vthresh = KMAXDIST - 1;
kcd->ethresh = KMAXDIST;
@@ -3053,7 +3217,7 @@ static int knifetool_invoke(bContext *C, wmOperator *op, const wmEvent *event)
knifetool_init(C, kcd, only_select, cut_through, true);
/* add a modal handler for this operator - handles loop selection */
- WM_cursor_modal(CTX_wm_window(C), BC_KNIFECURSOR);
+ WM_cursor_modal_set(CTX_wm_window(C), BC_KNIFECURSOR);
WM_event_add_modal_handler(C, op);
knifetool_update_mval_i(kcd, event->mval);
@@ -3073,7 +3237,8 @@ enum {
KNF_MODEL_IGNORE_SNAP_OFF,
KNF_MODAL_ADD_CUT,
KNF_MODAL_ANGLE_SNAP_TOGGLE,
- KNF_MODAL_CUT_THROUGH_TOGGLE
+ KNF_MODAL_CUT_THROUGH_TOGGLE,
+ KNF_MODAL_PANNING
};
wmKeyMap *knifetool_modal_keymap(wmKeyConfig *keyconf)
@@ -3089,6 +3254,7 @@ wmKeyMap *knifetool_modal_keymap(wmKeyConfig *keyconf)
{KNF_MODAL_CUT_THROUGH_TOGGLE, "CUT_THROUGH_TOGGLE", 0, "Toggle Cut Through", ""},
{KNF_MODAL_NEW_CUT, "NEW_CUT", 0, "End Current Cut", ""},
{KNF_MODAL_ADD_CUT, "ADD_CUT", 0, "Add Cut", ""},
+ {KNF_MODAL_PANNING, "PANNING", 0, "Panning", ""},
{0, NULL, 0, NULL, NULL}
};
@@ -3102,6 +3268,7 @@ wmKeyMap *knifetool_modal_keymap(wmKeyConfig *keyconf)
/* items for modal map */
WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, KNF_MODAL_CANCEL);
+ WM_modalkeymap_add_item(keymap, MIDDLEMOUSE, KM_ANY, KM_ANY, 0, KNF_MODAL_PANNING);
WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_PRESS, KM_ANY, 0, KNF_MODAL_ADD_CUT);
WM_modalkeymap_add_item(keymap, RIGHTMOUSE, KM_PRESS, KM_ANY, 0, KNF_MODAL_CANCEL);
WM_modalkeymap_add_item(keymap, RETKEY, KM_PRESS, KM_ANY, 0, KNF_MODAL_CONFIRM);
@@ -3227,18 +3394,12 @@ static int knifetool_modal(bContext *C, wmOperator *op, const wmEvent *event)
ED_region_tag_redraw(kcd->ar);
break;
- }
- }
- else { /* non-modal-mapped events */
- switch (event->type) {
- case WHEELUPMOUSE:
- case WHEELDOWNMOUSE:
- return OPERATOR_PASS_THROUGH;
- case MIDDLEMOUSE:
+ case KNF_MODAL_PANNING:
if (event->val != KM_RELEASE) {
- if (kcd->mode != MODE_PANNING)
+ if (kcd->mode != MODE_PANNING) {
kcd->prevmode = kcd->mode;
- kcd->mode = MODE_PANNING;
+ kcd->mode = MODE_PANNING;
+ }
}
else {
kcd->mode = kcd->prevmode;
@@ -3246,7 +3407,17 @@ static int knifetool_modal(bContext *C, wmOperator *op, const wmEvent *event)
ED_region_tag_redraw(kcd->ar);
return OPERATOR_PASS_THROUGH;
-
+ break;
+ }
+ }
+ else { /* non-modal-mapped events */
+ switch (event->type) {
+ case MOUSEPAN:
+ case MOUSEZOOM:
+ case MOUSEROTATE:
+ case WHEELUPMOUSE:
+ case WHEELDOWNMOUSE:
+ return OPERATOR_PASS_THROUGH;
case MOUSEMOVE: /* mouse moved somewhere to select another loop */
if (kcd->mode != MODE_PANNING) {
knifetool_update_mval_i(kcd, event->mval);
@@ -3354,7 +3525,7 @@ static bool edbm_mesh_knife_face_isect(ARegion *ar, LinkNode *polys, BMFace *f,
while (p) {
const float (*mval_fl)[2] = p->link;
const int mval_tot = MEM_allocN_len(mval_fl) / sizeof(*mval_fl);
- isect += (int)isect_point_poly_v2(cent_ss, mval_fl, mval_tot - 1);
+ isect += (int)isect_point_poly_v2(cent_ss, mval_fl, mval_tot - 1, false);
p = p->next;
}
diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c
index 892b773b1ba..3066fb86bf8 100644
--- a/source/blender/editors/mesh/editmesh_loopcut.c
+++ b/source/blender/editors/mesh/editmesh_loopcut.c
@@ -219,7 +219,7 @@ static void edgering_sel(RingSelOpData *lcd, int previewlines, bool select)
}
if (dm) {
- EDBM_index_arrays_ensure(lcd->em, BM_VERT);
+ BM_mesh_elem_table_ensure(lcd->em->bm, BM_VERT);
}
BMW_init(&walker, em->bm, BMW_EDGERING,
@@ -478,8 +478,8 @@ static int loopcut_init(bContext *C, wmOperator *op, const wmEvent *event)
else {
const int e_index = RNA_int_get(op->ptr, "edge_index");
BMEdge *e;
- EDBM_index_arrays_ensure(lcd->em, BM_EDGE);
- e = EDBM_edge_at_index(lcd->em, e_index);
+ BM_mesh_elem_table_ensure(lcd->em->bm, BM_EDGE);
+ e = BM_edge_at_index(lcd->em->bm, e_index);
loopcut_update_edge(lcd, e, 0);
}
@@ -537,7 +537,8 @@ static int loopcut_modal(bContext *C, wmOperator *op, const wmEvent *event)
if (event->val == KM_PRESS) {
/* finish */
ED_region_tag_redraw(lcd->ar);
-
+ ED_area_headerprint(CTX_wm_area(C), NULL);
+
if (lcd->eed) {
/* set for redo */
BM_mesh_elem_index_ensure(lcd->em->bm, BM_EDGE);
@@ -550,9 +551,7 @@ static int loopcut_modal(bContext *C, wmOperator *op, const wmEvent *event)
else {
return ringcut_cancel(C, op);
}
-
- ED_area_headerprint(CTX_wm_area(C), NULL);
-
+
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/mesh/editmesh_path.c b/source/blender/editors/mesh/editmesh_path.c
index e7eaa625843..18db21a8726 100644
--- a/source/blender/editors/mesh/editmesh_path.c
+++ b/source/blender/editors/mesh/editmesh_path.c
@@ -52,6 +52,9 @@
#include "WM_types.h"
+#include "bmesh.h"
+#include "bmesh_tools.h"
+
#include "mesh_intern.h" /* own include */
struct UserData {
diff --git a/source/blender/editors/mesh/editmesh_rip.c b/source/blender/editors/mesh/editmesh_rip.c
index 1360a180b2d..84952297235 100644
--- a/source/blender/editors/mesh/editmesh_rip.c
+++ b/source/blender/editors/mesh/editmesh_rip.c
@@ -50,6 +50,9 @@
#include "ED_transform.h"
#include "ED_view3d.h"
+#include "bmesh.h"
+#include "bmesh_tools.h"
+
#include "mesh_intern.h" /* own include */
/**
@@ -60,23 +63,29 @@
* point and would result in the same distance.
*/
#define INSET_DEFAULT 0.00001f
-static float edbm_rip_edgedist(ARegion *ar, float mat[4][4],
- const float co1[3], const float co2[3], const float mvalf[2],
- const float inset)
+static float edbm_rip_edgedist_squared(ARegion *ar, float mat[4][4],
+ const float co1[3], const float co2[3], const float mvalf[2],
+ const float inset)
{
- float vec1[2], vec2[2];
+ float vec1[2], vec2[2], dist_sq;
ED_view3d_project_float_v2_m4(ar, co1, vec1, mat);
ED_view3d_project_float_v2_m4(ar, co2, vec2, mat);
if (inset != 0.0f) {
- const float dist = inset / len_v2v2(vec1, vec2);
- interp_v2_v2v2(vec1, vec1, vec2, dist);
- interp_v2_v2v2(vec2, vec2, vec1, dist);
+ const float dist_2d = len_v2v2(vec1, vec2);
+ if (dist_2d > FLT_EPSILON) {
+ const float dist = inset / dist_2d;
+ BLI_assert(finite(dist));
+ interp_v2_v2v2(vec1, vec1, vec2, dist);
+ interp_v2_v2v2(vec2, vec2, vec1, dist);
+ }
}
- /* TODO: use dist_squared_to_line_segment_v2() looks like we only ever use for comparison */
- return dist_to_line_segment_v2(mvalf, vec1, vec2);
+ dist_sq = dist_squared_to_line_segment_v2(mvalf, vec1, vec2);
+ BLI_assert(finite(dist_sq));
+
+ return dist_sq;
}
#if 0
@@ -488,7 +497,7 @@ static void edbm_tagged_loop_pairs_do_fill_faces(BMesh *bm, UnorderedLoopPair *u
/* face should never exist */
BLI_assert(BM_face_exists(f_verts, f_verts[3] ? 4 : 3, &f) == false);
- f = BM_face_create_quad_tri_v(bm, f_verts, f_verts[3] ? 4 : 3, f_example, false);
+ f = BM_face_create_verts(bm, f_verts, f_verts[3] ? 4 : 3, f_example, BM_CREATE_NOP, true);
l_iter = BM_FACE_FIRST_LOOP(f);
@@ -525,11 +534,11 @@ static int edbm_rip_invoke__vert(bContext *C, wmOperator *op, const wmEvent *eve
BMIter iter, liter;
BMLoop *l;
BMEdge *e, *e2;
- BMVert *v, *ripvert = NULL;
+ BMVert *v;
const int totvert_orig = bm->totvert;
int i;
float projectMat[4][4], fmval[3] = {event->mval[0], event->mval[1]};
- float dist = FLT_MAX;
+ float dist_sq = FLT_MAX;
float d;
bool is_wire;
@@ -562,15 +571,15 @@ static int edbm_rip_invoke__vert(bContext *C, wmOperator *op, const wmEvent *eve
if (v->e) {
/* find closest edge to mouse cursor */
BM_ITER_ELEM (e, &iter, v, BM_EDGES_OF_VERT) {
- int is_boundary = BM_edge_is_boundary(e);
+ const bool is_boundary = BM_edge_is_boundary(e);
/* consider wire as boundary for this purpose,
* otherwise we can't a face away from a wire edge */
totboundary_edge += (is_boundary != 0 || BM_edge_is_wire(e));
if (!BM_elem_flag_test(e, BM_ELEM_HIDDEN)) {
if (is_boundary == false && BM_edge_is_manifold(e)) {
- d = edbm_rip_edgedist(ar, projectMat, e->v1->co, e->v2->co, fmval, INSET_DEFAULT);
- if (d < dist) {
- dist = d;
+ d = edbm_rip_edgedist_squared(ar, projectMat, e->v1->co, e->v2->co, fmval, INSET_DEFAULT);
+ if ((e2 == NULL) || (d < dist_sq)) {
+ dist_sq = d;
e2 = e;
}
}
@@ -596,10 +605,9 @@ static int edbm_rip_invoke__vert(bContext *C, wmOperator *op, const wmEvent *eve
float l_mid_co[3];
l = l_all[i1];
edbm_calc_loop_co(l, l_mid_co);
- d = edbm_rip_edgedist(ar, projectMat, l->v->co, l_mid_co, fmval, INSET_DEFAULT);
-
- if (d < dist) {
- dist = d;
+ d = edbm_rip_edgedist_squared(ar, projectMat, l->v->co, l_mid_co, fmval, INSET_DEFAULT);
+ if ((e2 == NULL) || (d < dist_sq)) {
+ dist_sq = d;
/* find the edge that is not in this loop */
e2 = NULL;
@@ -647,7 +655,7 @@ static int edbm_rip_invoke__vert(bContext *C, wmOperator *op, const wmEvent *eve
BM_select_history_remove(bm, ese.ele);
}
- dist = FLT_MAX;
+ dist_sq = FLT_MAX;
/* in the loop below we find the best vertex to drag based on its connected geometry,
* either by its face corner, or connected edge (when no faces are attached) */
@@ -658,12 +666,12 @@ static int edbm_rip_invoke__vert(bContext *C, wmOperator *op, const wmEvent *eve
BM_ITER_ELEM (l, &iter, vout[i], BM_LOOPS_OF_VERT) {
if (!BM_elem_flag_test(l->f, BM_ELEM_HIDDEN)) {
float l_mid_co[3];
- edbm_calc_loop_co(l, l_mid_co);
- d = edbm_rip_edgedist(ar, projectMat, v->co, l_mid_co, fmval, INSET_DEFAULT);
+ edbm_calc_loop_co(l, l_mid_co);
+ d = edbm_rip_edgedist_squared(ar, projectMat, v->co, l_mid_co, fmval, INSET_DEFAULT);
- if (d < dist) {
- dist = d;
+ if (d < dist_sq) {
+ dist_sq = d;
vi_best = i;
}
}
@@ -674,12 +682,12 @@ static int edbm_rip_invoke__vert(bContext *C, wmOperator *op, const wmEvent *eve
BM_ITER_ELEM (e, &iter, vout[i], BM_EDGES_OF_VERT) {
if (!BM_elem_flag_test(e, BM_ELEM_HIDDEN)) {
float e_mid_co[3];
- mid_v3_v3v3(e_mid_co, e->v1->co, e->v2->co);
- d = edbm_rip_edgedist(ar, projectMat, v->co, e_mid_co, fmval, INSET_DEFAULT);
+ mid_v3_v3v3(e_mid_co, e->v1->co, e->v2->co);
+ d = edbm_rip_edgedist_squared(ar, projectMat, v->co, e_mid_co, fmval, INSET_DEFAULT);
- if (d < dist) {
- dist = d;
+ if (d < dist_sq) {
+ dist_sq = d;
vi_best = i;
}
}
@@ -730,19 +738,36 @@ static int edbm_rip_invoke__vert(bContext *C, wmOperator *op, const wmEvent *eve
/* rip two adjacent edges */
if (BM_edge_is_boundary(e2) || BM_vert_face_count(v) == 2) {
/* Don't run the edge split operator in this case */
+ BMVert *v_rip;
- BM_elem_flag_enable(e2, BM_ELEM_TAG); /* only for face-fill (we don't call the operator) */
+ l = BM_edge_vert_share_loop(e2->l, v);
+
+ /* only tag for face-fill (we don't call the operator) */
+ if (BM_edge_is_boundary(e2)) {
+ BM_elem_flag_enable(e2, BM_ELEM_TAG);
+ }
+ else {
+ BM_elem_flag_enable(l->e, BM_ELEM_TAG);
+ BM_elem_flag_enable(l->prev->e, BM_ELEM_TAG);
+ }
/* keep directly before edgesplit */
if (do_fill) {
fill_uloop_pairs = edbm_tagged_loop_pairs_to_fill(bm);
}
- l = e2->l;
- ripvert = BM_face_vert_separate(bm, l->f, v);
+#if 0
+ v_rip = BM_face_vert_separate(bm, l->f, v);
+#else
+ v_rip = BM_face_loop_separate(bm, l);
+#endif
+
+ BLI_assert(v_rip);
- BLI_assert(ripvert);
- if (!ripvert) {
+ if (v_rip) {
+ BM_vert_select_set(bm, v_rip, true);
+ }
+ else {
if (fill_uloop_pairs) MEM_freeN(fill_uloop_pairs);
return OPERATOR_CANCELLED;
}
@@ -769,37 +794,28 @@ static int edbm_rip_invoke__vert(bContext *C, wmOperator *op, const wmEvent *eve
BM_mesh_edgesplit(em->bm, true, true, true);
}
- dist = FLT_MAX;
+ dist_sq = FLT_MAX;
{
/* --- select which vert --- */
BMVert *v_best = NULL;
- float l_prev_co[3], l_next_co[3], l_corner_co[3];
- float scale;
+ float l_corner_co[3];
- dist = FLT_MAX;
+ dist_sq = FLT_MAX;
BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) {
if (BM_elem_flag_test(v, BM_ELEM_SELECT)) {
/* disable by default, re-enable winner at end */
BM_vert_select_set(bm, v, false);
+ BM_select_history_remove(bm, v);
BM_ITER_ELEM (l, &liter, v, BM_LOOPS_OF_VERT) {
- /* calculate a point in the face, rather then calculate the middle,
- * make a vector pointing between the 2 edges attached to this loop */
- sub_v3_v3v3(l_prev_co, l->prev->v->co, l->v->co);
- sub_v3_v3v3(l_next_co, l->next->v->co, l->v->co);
-
- scale = normalize_v3(l_prev_co) + normalize_v3(l_next_co);
- mul_v3_fl(l_prev_co, scale);
- mul_v3_fl(l_next_co, scale);
-
- add_v3_v3v3(l_corner_co, l_prev_co, l_next_co);
- add_v3_v3(l_corner_co, l->v->co);
- d = edbm_rip_edgedist(ar, projectMat, l->v->co, l_corner_co, fmval, INSET_DEFAULT);
- if (d < dist) {
+ /* check if v_best is null in the _rare_ case there are numeric issues */
+ edbm_calc_loop_co(l, l_corner_co);
+ d = edbm_rip_edgedist_squared(ar, projectMat, l->v->co, l_corner_co, fmval, INSET_DEFAULT);
+ if ((v_best == NULL) || (d < dist_sq)) {
v_best = v;
- dist = d;
+ dist_sq = d;
}
}
}
@@ -965,7 +981,7 @@ static int edbm_rip_invoke(bContext *C, wmOperator *op, const wmEvent *event)
BMesh *bm = em->bm;
BMIter iter;
BMEdge *e;
- int singlesel = (bm->totvertsel == 1 && bm->totedgesel == 0 && bm->totfacesel == 0);
+ const bool singlesel = (bm->totvertsel == 1 && bm->totedgesel == 0 && bm->totfacesel == 0);
int ret;
/* running in face mode hardly makes sense, so convert to region loop and rip */
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c
index a1f1f6bd83f..92bd71e128a 100644
--- a/source/blender/editors/mesh/editmesh_select.c
+++ b/source/blender/editors/mesh/editmesh_select.c
@@ -31,8 +31,10 @@
#include "MEM_guardedalloc.h"
+#include "BLI_bitmap.h"
#include "BLI_listbase.h"
#include "BLI_linklist.h"
+#include "BLI_linklist_stack.h"
#include "BLI_math.h"
#include "BLI_rand.h"
#include "BLI_array.h"
@@ -183,55 +185,13 @@ void EDBM_automerge(Scene *scene, Object *obedit, bool update, const char hflag)
unsigned int bm_solidoffs = 0, bm_wireoffs = 0, bm_vertoffs = 0; /* set in drawobject.c ... for colorindices */
/* facilities for border select and circle select */
-static char *selbuf = NULL;
+static BLI_bitmap *selbuf = NULL;
-/* opengl doesn't support concave... */
-static void draw_triangulated(const int mcords[][2], const short tot)
+static BLI_bitmap *edbm_backbuf_alloc(const int size)
{
- ListBase lb = {NULL, NULL};
- DispList *dl;
- float *fp;
- int a;
- const float z_up[3] = {0.0f, 0.0f, 1.0f};
-
- /* make displist */
- dl = MEM_callocN(sizeof(DispList), "poly disp");
- dl->type = DL_POLY;
- dl->parts = 1;
- dl->nr = tot;
- dl->verts = fp = MEM_callocN(tot * 3 * sizeof(float), "poly verts");
- BLI_addtail(&lb, dl);
-
- for (a = 0; a < tot; a++, fp += 3) {
- fp[0] = (float)mcords[a][0];
- fp[1] = (float)mcords[a][1];
- }
-
- /* do the fill */
- BKE_displist_fill(&lb, &lb, z_up, false);
-
- /* do the draw */
- dl = lb.first; /* filldisplist adds in head of list */
- if (dl->type == DL_INDEX3) {
- int *index;
-
- a = dl->parts;
- fp = dl->verts;
- index = dl->index;
- glBegin(GL_TRIANGLES);
- while (a--) {
- glVertex3fv(fp + 3 * index[0]);
- glVertex3fv(fp + 3 * index[1]);
- glVertex3fv(fp + 3 * index[2]);
- index += 3;
- }
- glEnd();
- }
-
- BKE_displist_free(&lb);
+ return BLI_BITMAP_NEW(size, "selbuf");
}
-
/* reads rect, and builds selection array for quick lookup */
/* returns if all is OK */
bool EDBM_backbuf_border_init(ViewContext *vc, short xmin, short ymin, short xmax, short ymax)
@@ -251,24 +211,31 @@ bool EDBM_backbuf_border_init(ViewContext *vc, short xmin, short ymin, short xma
dr = buf->rect;
/* build selection lookup */
- selbuf = MEM_callocN(bm_vertoffs + 1, "selbuf");
+ selbuf = edbm_backbuf_alloc(bm_vertoffs + 1);
a = (xmax - xmin + 1) * (ymax - ymin + 1);
while (a--) {
- if (*dr > 0 && *dr <= bm_vertoffs)
- selbuf[*dr] = 1;
+ if (*dr > 0 && *dr <= bm_vertoffs) {
+ BLI_BITMAP_SET(selbuf, *dr);
+ }
dr++;
}
IMB_freeImBuf(buf);
return true;
}
-int EDBM_backbuf_check(unsigned int index)
+bool EDBM_backbuf_check(unsigned int index)
{
- if (selbuf == NULL) return 1;
+ /* odd logic, if selbuf is NULL we assume no zbuf-selection is enabled
+ * and just ignore the depth buffer, this is error prone since its possible
+ * code doesn't set the depth buffer by accident, but leave for now. - Campbell */
+ if (selbuf == NULL)
+ return true;
+
if (index > 0 && index <= bm_vertoffs)
- return selbuf[index];
- return 0;
+ return BLI_BITMAP_GET_BOOL(selbuf, index);
+
+ return false;
}
void EDBM_backbuf_free(void)
@@ -277,6 +244,18 @@ void EDBM_backbuf_free(void)
selbuf = NULL;
}
+struct LassoMaskData {
+ unsigned int *px;
+ int width;
+};
+
+static void edbm_mask_lasso_px_cb(int x, int y, void *user_data)
+{
+ struct LassoMaskData *data = user_data;
+ data->px[(y * data->width) + x] = true;
+}
+
+
/* mcords is a polygon mask
* - grab backbuffer,
* - draw with black in backbuffer,
@@ -285,9 +264,10 @@ void EDBM_backbuf_free(void)
*/
bool EDBM_backbuf_border_mask_init(ViewContext *vc, const int mcords[][2], short tot, short xmin, short ymin, short xmax, short ymax)
{
- unsigned int *dr, *drm;
- struct ImBuf *buf, *bufmask;
+ unsigned int *dr, *dr_mask, *dr_mask_arr;
+ struct ImBuf *buf;
int a;
+ struct LassoMaskData lasso_mask_data;
/* method in use for face selecting too */
if (vc->obedit == NULL) {
@@ -305,49 +285,27 @@ bool EDBM_backbuf_border_mask_init(ViewContext *vc, const int mcords[][2], short
dr = buf->rect;
- if (vc->rv3d->gpuoffscreen)
- GPU_offscreen_bind(vc->rv3d->gpuoffscreen);
-
- /* draw the mask */
- glDisable(GL_DEPTH_TEST);
-
- glColor3ub(0, 0, 0);
-
- /* yah, opengl doesn't do concave... tsk! */
- ED_region_pixelspace(vc->ar);
- draw_triangulated(mcords, tot);
-
- glBegin(GL_LINE_LOOP); /* for zero sized masks, lines */
- for (a = 0; a < tot; a++) {
- glVertex2iv(mcords[a]);
- }
- glEnd();
-
- glFinish(); /* to be sure readpixels sees mask */
-
- if (vc->rv3d->gpuoffscreen)
- GPU_offscreen_unbind(vc->rv3d->gpuoffscreen);
-
- /* grab mask */
- bufmask = view3d_read_backbuf(vc, xmin, ymin, xmax, ymax);
+ dr_mask = dr_mask_arr = MEM_callocN(sizeof(*dr_mask) * buf->x * buf->y, __func__);
+ lasso_mask_data.px = dr_mask;
+ lasso_mask_data.width = (xmax - xmin) + 1;
- if (bufmask == NULL) {
- return false; /* only when mem alloc fails, go crash somewhere else! */
- }
- else {
- drm = bufmask->rect;
- }
+ fill_poly_v2i_n(
+ xmin, ymin, xmax + 1, ymax + 1,
+ mcords, tot,
+ edbm_mask_lasso_px_cb, &lasso_mask_data);
/* build selection lookup */
- selbuf = MEM_callocN(bm_vertoffs + 1, "selbuf");
+ selbuf = edbm_backbuf_alloc(bm_vertoffs + 1);
a = (xmax - xmin + 1) * (ymax - ymin + 1);
while (a--) {
- if (*dr > 0 && *dr <= bm_vertoffs && *drm == 0) selbuf[*dr] = 1;
- dr++; drm++;
+ if (*dr > 0 && *dr <= bm_vertoffs && *dr_mask == true) {
+ BLI_BITMAP_SET(selbuf, *dr);
+ }
+ dr++; dr_mask++;
}
IMB_freeImBuf(buf);
- IMB_freeImBuf(bufmask);
+ MEM_freeN(dr_mask_arr);
return true;
}
@@ -379,12 +337,14 @@ bool EDBM_backbuf_circle_init(ViewContext *vc, short xs, short ys, short rads)
dr = buf->rect;
/* build selection lookup */
- selbuf = MEM_callocN(bm_vertoffs + 1, "selbuf");
+ selbuf = edbm_backbuf_alloc(bm_vertoffs + 1);
radsq = rads * rads;
for (yc = -rads; yc <= rads; yc++) {
for (xc = -rads; xc <= rads; xc++, dr++) {
if (xc * xc + yc * yc < radsq) {
- if (*dr > 0 && *dr <= bm_vertoffs) selbuf[*dr] = 1;
+ if (*dr > 0 && *dr <= bm_vertoffs) {
+ BLI_BITMAP_SET(selbuf, *dr);
+ }
}
}
}
@@ -432,7 +392,7 @@ static void findnearestvert__doClosest(void *userData, BMVert *eve, const float
static bool findnearestvert__backbufIndextest(void *handle, unsigned int index)
{
BMEditMesh *em = (BMEditMesh *)handle;
- BMVert *eve = BM_vert_at_index(em->bm, index - 1);
+ BMVert *eve = BM_vert_at_index_find(em->bm, index - 1);
return !(eve && BM_elem_flag_test(eve, BM_ELEM_SELECT));
}
/**
@@ -460,7 +420,7 @@ BMVert *EDBM_vert_find_nearest(ViewContext *vc, float *r_dist, const bool sel, c
0, NULL, NULL);
}
- eve = index ? BM_vert_at_index(vc->em->bm, index - 1) : NULL;
+ eve = index ? BM_vert_at_index_find(vc->em->bm, index - 1) : NULL;
if (eve && distance < *r_dist) {
*r_dist = distance;
@@ -476,7 +436,7 @@ BMVert *EDBM_vert_find_nearest(ViewContext *vc, float *r_dist, const bool sel, c
static int lastSelectedIndex = 0;
static BMVert *lastSelected = NULL;
- if (lastSelected && BM_vert_at_index(vc->em->bm, lastSelectedIndex) != lastSelected) {
+ if (lastSelected && BM_vert_at_index_find(vc->em->bm, lastSelectedIndex) != lastSelected) {
lastSelectedIndex = 0;
lastSelected = NULL;
}
@@ -552,7 +512,7 @@ BMEdge *EDBM_edge_find_nearest(ViewContext *vc, float *r_dist)
view3d_validate_backbuf(vc);
index = view3d_sample_backbuf_rect(vc, vc->mval, 50, bm_solidoffs, bm_wireoffs, &distance, 0, NULL, NULL);
- eed = index ? BM_edge_at_index(vc->em->bm, index - 1) : NULL;
+ eed = index ? BM_edge_at_index_find(vc->em->bm, index - 1) : NULL;
if (eed && distance < *r_dist) {
*r_dist = distance;
@@ -625,7 +585,7 @@ BMFace *EDBM_face_find_nearest(ViewContext *vc, float *r_dist)
view3d_validate_backbuf(vc);
index = view3d_sample_backbuf(vc, vc->mval[0], vc->mval[1]);
- efa = index ? BM_face_at_index(vc->em->bm, index - 1) : NULL;
+ efa = index ? BM_face_at_index_find(vc->em->bm, index - 1) : NULL;
if (efa) {
struct { float mval_fl[2]; float dist; BMFace *toFace; } data;
@@ -652,7 +612,7 @@ BMFace *EDBM_face_find_nearest(ViewContext *vc, float *r_dist)
static int lastSelectedIndex = 0;
static BMFace *lastSelected = NULL;
- if (lastSelected && BM_face_at_index(vc->em->bm, lastSelectedIndex) != lastSelected) {
+ if (lastSelected && BM_face_at_index_find(vc->em->bm, lastSelectedIndex) != lastSelected) {
lastSelectedIndex = 0;
lastSelected = NULL;
}
@@ -1233,7 +1193,7 @@ static void mouse_mesh_loop(bContext *C, const int mval[2], bool extend, bool de
/* We can't be sure this has already been set... */
ED_view3d_init_mats_rv3d(vc.obedit, vc.rv3d);
- BM_ITER_ELEM(f, &iterf, eed, BM_FACES_OF_EDGE) {
+ BM_ITER_ELEM (f, &iterf, eed, BM_FACES_OF_EDGE) {
if (BM_elem_flag_test(f, BM_ELEM_SELECT)) {
float cent[3];
float co[2], tdist;
@@ -1896,7 +1856,6 @@ static int edbm_select_linked_exec(bContext *C, wmOperator *op)
BMEditMesh *em = BKE_editmesh_from_object(obedit);
BMesh *bm = em->bm;
BMIter iter;
- BMVert *v;
BMEdge *e;
BMWalker walker;
@@ -1910,8 +1869,7 @@ static int edbm_select_linked_exec(bContext *C, wmOperator *op)
BMFace *efa;
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
- BM_elem_flag_set(efa, BM_ELEM_TAG, (BM_elem_flag_test(efa, BM_ELEM_SELECT) &&
- !BM_elem_flag_test(efa, BM_ELEM_HIDDEN)));
+ BM_elem_flag_set(efa, BM_ELEM_TAG, BM_elem_flag_test(efa, BM_ELEM_SELECT));
}
if (limit) {
@@ -1931,6 +1889,7 @@ static int edbm_select_linked_exec(bContext *C, wmOperator *op)
if (BM_elem_flag_test(efa, BM_ELEM_TAG)) {
for (efa = BMW_begin(&walker, efa); efa; efa = BMW_step(&walker)) {
BM_face_select_set(bm, efa, true);
+ BM_elem_flag_disable(efa, BM_ELEM_TAG);
}
}
}
@@ -1941,13 +1900,10 @@ static int edbm_select_linked_exec(bContext *C, wmOperator *op)
}
}
else {
+ BMVert *v;
+
BM_ITER_MESH (v, &iter, em->bm, BM_VERTS_OF_MESH) {
- if (BM_elem_flag_test(v, BM_ELEM_SELECT)) {
- BM_elem_flag_enable(v, BM_ELEM_TAG);
- }
- else {
- BM_elem_flag_disable(v, BM_ELEM_TAG);
- }
+ BM_elem_flag_set(v, BM_ELEM_TAG, BM_elem_flag_test(v, BM_ELEM_SELECT));
}
BMW_init(&walker, em->bm, BMW_SHELL,
@@ -1959,6 +1915,7 @@ static int edbm_select_linked_exec(bContext *C, wmOperator *op)
if (BM_elem_flag_test(v, BM_ELEM_TAG)) {
for (e = BMW_begin(&walker, v); e; e = BMW_step(&walker)) {
BM_edge_select_set(em->bm, e, true);
+ BM_elem_flag_disable(e, BM_ELEM_TAG);
}
}
}
@@ -2509,7 +2466,7 @@ static int edbm_select_nth_exec(bContext *C, wmOperator *op)
int offset = RNA_int_get(op->ptr, "offset");
/* so input of offset zero ends up being (nth - 1) */
- offset = (offset + (nth - 1)) % nth;
+ offset = mod_i(offset, nth);
if (edbm_deselect_nth(em, nth, offset) == false) {
BKE_report(op->reports, RPT_ERROR, "Mesh has no active vert/edge/face");
@@ -2537,7 +2494,7 @@ void MESH_OT_select_nth(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
RNA_def_int(ot->srna, "nth", 2, 2, INT_MAX, "Nth Selection", "", 2, 100);
- RNA_def_int(ot->srna, "offset", 0, 0, INT_MAX, "Offset", "", 0, 100);
+ RNA_def_int(ot->srna, "offset", 0, INT_MIN, INT_MAX, "Offset", "", -100, 100);
}
void em_setup_viewcontext(bContext *C, ViewContext *vc)
@@ -2609,8 +2566,7 @@ static int edbm_select_linked_flat_faces_exec(bContext *C, wmOperator *op)
BMEditMesh *em = BKE_editmesh_from_object(obedit);
BMesh *bm = em->bm;
- BMFace **stack = MEM_mallocN(sizeof(BMFace *) * bm->totface, __func__);
- STACK_DECLARE(stack);
+ BLI_LINKSTACK_DECLARE(stack, BMFace *);
BMIter iter, liter, liter2;
BMFace *f;
@@ -2619,6 +2575,7 @@ static int edbm_select_linked_flat_faces_exec(bContext *C, wmOperator *op)
BM_mesh_elem_hflag_disable_all(bm, BM_FACE, BM_ELEM_TAG, false);
+ BLI_LINKSTACK_INIT(stack);
BM_ITER_MESH (f, &iter, bm, BM_FACES_OF_MESH) {
if ((BM_elem_flag_test(f, BM_ELEM_HIDDEN) != 0) ||
@@ -2628,7 +2585,7 @@ static int edbm_select_linked_flat_faces_exec(bContext *C, wmOperator *op)
continue;
}
- STACK_INIT(stack);
+ BLI_assert(BLI_LINKSTACK_SIZE(stack) == 0);
do {
BM_face_select_set(bm, f, true);
@@ -2648,16 +2605,14 @@ static int edbm_select_linked_flat_faces_exec(bContext *C, wmOperator *op)
angle = angle_normalized_v3v3(f->no, l2->f->no);
if (angle < angle_limit) {
- STACK_PUSH(stack, l2->f);
+ BLI_LINKSTACK_PUSH(stack, l2->f);
}
}
}
- } while ((f = STACK_POP(stack)));
+ } while ((f = BLI_LINKSTACK_POP(stack)));
}
- STACK_FREE(stack);
-
- MEM_freeN(stack);
+ BLI_LINKSTACK_FREE(stack);
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 38ce56b4bc7..e557b07dba2 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -29,6 +29,8 @@
* \ingroup edmesh
*/
+#include <stddef.h>
+
#include "MEM_guardedalloc.h"
#include "DNA_key_types.h"
@@ -43,6 +45,7 @@
#include "BLI_noise.h"
#include "BLI_math.h"
#include "BLI_rand.h"
+#include "BLI_sort_utils.h"
#include "BKE_material.h"
#include "BKE_context.h"
@@ -892,14 +895,30 @@ static int edbm_duplicate_exec(bContext *C, wmOperator *op)
{
Object *ob = CTX_data_edit_object(C);
BMEditMesh *em = BKE_editmesh_from_object(ob);
+ BMesh *bm = em->bm;
BMOperator bmop;
+ ListBase bm_selected_store = {NULL, NULL};
+
+ /* de-select all would clear otherwise */
+ SWAP(ListBase, bm->selected, bm_selected_store);
EDBM_op_init(em, &bmop, op, "duplicate geom=%hvef", BM_ELEM_SELECT);
- BMO_op_exec(em->bm, &bmop);
+ BMO_op_exec(bm, &bmop);
EDBM_flag_disable_all(em, BM_ELEM_SELECT);
- BMO_slot_buffer_hflag_enable(em->bm, bmop.slots_out, "geom.out", BM_ALL_NOLOOP, BM_ELEM_SELECT, true);
+ BMO_slot_buffer_hflag_enable(bm, bmop.slots_out, "geom.out", BM_ALL_NOLOOP, BM_ELEM_SELECT, true);
+
+ /* rebuild editselection */
+ bm->selected = bm_selected_store;
+
+ if (bm->selected.first) {
+ BMOpSlot *slot_vert_map_out = BMO_slot_get(bmop.slots_out, "vert_map.out");
+ BMOpSlot *slot_edge_map_out = BMO_slot_get(bmop.slots_out, "edge_map.out");
+ BMOpSlot *slot_face_map_out = BMO_slot_get(bmop.slots_out, "face_map.out");
+
+ BMO_mesh_selected_remap(bm, slot_vert_map_out, slot_edge_map_out, slot_face_map_out);
+ }
if (!EDBM_op_finish(em, &bmop, op, true)) {
return OPERATOR_CANCELLED;
@@ -964,12 +983,6 @@ void MESH_OT_flip_normals(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
-static const EnumPropertyItem direction_items[] = {
- {false, "CW", 0, "Clockwise", ""},
- {true, "CCW", 0, "Counter Clockwise", ""},
- {0, NULL, 0, NULL, NULL}
-};
-
/* only accepts 1 selected edge, or 2 selected faces */
static int edbm_edge_rotate_selected_exec(bContext *C, wmOperator *op)
{
@@ -1602,7 +1615,7 @@ static bool merge_target(BMEditMesh *em, Scene *scene, View3D *v3d, Object *ob,
const float *vco = NULL;
if (use_cursor) {
- vco = give_cursor(scene, v3d);
+ vco = ED_view3d_cursor3d_get(scene, v3d);
copy_v3_v3(co, vco);
mul_m4_v3(ob->imat, co);
}
@@ -2292,7 +2305,7 @@ static int edbm_knife_cut_exec(bContext *C, wmOperator *op)
mouse_path = MEM_mallocN(len * sizeof(*mouse_path), __func__);
/* get the cut curve */
- RNA_BEGIN(op->ptr, itemptr, "path")
+ RNA_BEGIN (op->ptr, itemptr, "path")
{
RNA_float_get_array(&itemptr, "loc", (float *)&mouse_path[len]);
}
@@ -2816,6 +2829,146 @@ void MESH_OT_fill(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "use_beauty", true, "Beauty", "Use best triangulation division");
}
+
+/* -------------------------------------------------------------------- */
+/* Grid Fill (and helper functions) */
+
+static bool bm_edge_test_fill_grid_cb(BMEdge *e, void *UNUSED(bm_v))
+{
+ return BM_elem_flag_test_bool(e, BM_ELEM_TAG);
+}
+
+static float edbm_fill_grid_vert_tag_angle(BMVert *v)
+{
+ BMIter iter;
+ BMEdge *e_iter;
+ BMVert *v_pair[2];
+ int i = 0;
+ BM_ITER_ELEM (e_iter, &iter, v, BM_EDGES_OF_VERT) {
+ if (BM_elem_flag_test(e_iter, BM_ELEM_TAG)) {
+ v_pair[i++] = BM_edge_other_vert(e_iter, v);
+ }
+ }
+ BLI_assert(i == 2);
+
+ return fabsf((float)M_PI - angle_v3v3v3(v_pair[0]->co, v->co, v_pair[1]->co));
+}
+
+/**
+ * non-essential utility function to select 2 open edge loops from a closed loop.
+ */
+static void edbm_fill_grid_prepare(BMesh *bm, int offset, int *r_span, bool span_calc)
+{
+ BMEdge *e;
+ BMIter iter;
+ int count;
+ int span = *r_span;
+
+ ListBase eloops = {NULL};
+ struct BMEdgeLoopStore *el_store;
+ // LinkData *el_store;
+
+ /* select -> tag */
+ BM_ITER_MESH (e, &iter, bm, BM_EDGES_OF_MESH) {
+ BM_elem_flag_set(e, BM_ELEM_TAG, BM_elem_flag_test(e, BM_ELEM_SELECT));
+ }
+
+ count = BM_mesh_edgeloops_find(bm, &eloops, bm_edge_test_fill_grid_cb, bm);
+ el_store = eloops.first;
+
+ if (count == 1 && BM_edgeloop_is_closed(el_store) && (BM_edgeloop_length_get(el_store) & 1) == 0) {
+ /* be clever! detect 2 edge loops from one closed edge loop */
+ const int verts_len = BM_edgeloop_length_get(el_store);
+ ListBase *verts = BM_edgeloop_verts_get(el_store);
+ BMVert *v_act = BM_mesh_active_vert_get(bm);
+ LinkData *v_act_link;
+ BMEdge **edges = MEM_mallocN(sizeof(*edges) * verts_len, __func__);
+ int i;
+
+ if (v_act && (v_act_link = BLI_findptr(verts, v_act, offsetof(LinkData, data)))) {
+ /* pass */
+ }
+ else {
+ /* find the vertex with the best angle (a corner vertex) */
+ LinkData *v_link, *v_link_best = NULL;
+ float angle_best = -1.0f;
+ for (v_link = verts->first; v_link; v_link = v_link->next) {
+ const float angle = edbm_fill_grid_vert_tag_angle(v_link->data);
+ if ((angle > angle_best) || (v_link_best == NULL)) {
+ angle_best = angle;
+ v_link_best = v_link;
+ }
+ }
+
+ v_act_link = v_link_best;
+ v_act = v_act_link->data;
+ }
+
+ if (offset != 0) {
+ v_act_link = BLI_findlink(verts, offset);
+ v_act = v_act_link->data;
+ }
+
+ /* set this vertex first */
+ BLI_rotatelist_first(verts, v_act_link);
+ BM_edgeloop_edges_get(el_store, edges);
+
+
+ if (span_calc) {
+ /* calculate the span by finding the next corner in 'verts'
+ * we dont know what defines a corner exactly so find the 4 verts
+ * in the loop with the greatest angle.
+ * Tag them and use the first tagged vertex to calculate the span.
+ *
+ * note: we may have already checked 'edbm_fill_grid_vert_tag_angle()' on each
+ * vert, but advantage of de-duplicating is minimal. */
+ struct SortPointerByFloat *ele_sort = MEM_mallocN(sizeof(*ele_sort) * verts_len, __func__);
+ LinkData *v_link;
+ for (v_link = verts->first, i = 0; v_link; v_link = v_link->next, i++) {
+ BMVert *v = v_link->data;
+ const float angle = edbm_fill_grid_vert_tag_angle(v);
+ ele_sort[i].sort_value = angle;
+ ele_sort[i].data = v;
+
+ BM_elem_flag_disable(v, BM_ELEM_TAG);
+ }
+
+ qsort(ele_sort, verts_len, sizeof(*ele_sort), BLI_sortutil_cmp_float_reverse);
+
+ for (i = 0; i < 4; i++) {
+ BMVert *v = ele_sort[i].data;
+ BM_elem_flag_enable(v, BM_ELEM_TAG);
+ }
+
+ /* now find the first... */
+ for (v_link = verts->first, i = 0; i < verts_len / 2; v_link = v_link->next, i++) {
+ BMVert *v = v_link->data;
+ if (BM_elem_flag_test(v, BM_ELEM_TAG)) {
+ if (v != v_act) {
+ span = i;
+ break;
+ }
+ }
+ }
+ MEM_freeN(ele_sort);
+ }
+ /* end span calc */
+
+
+ /* un-flag 'rails' */
+ for (i = 0; i < span; i++) {
+ BM_elem_flag_disable(edges[i], BM_ELEM_TAG);
+ BM_elem_flag_disable(edges[(verts_len / 2) + i], BM_ELEM_TAG);
+ }
+ MEM_freeN(edges);
+ }
+ /* else let the bmesh-operator handle it */
+
+ BM_mesh_edgeloops_free(&eloops);
+
+ *r_span = span;
+}
+
static int edbm_fill_grid_exec(bContext *C, wmOperator *op)
{
BMOperator bmop;
@@ -2824,10 +2977,45 @@ static int edbm_fill_grid_exec(bContext *C, wmOperator *op)
const short use_smooth = edbm_add_edge_face__smooth_get(em->bm);
const int totedge_orig = em->bm->totedge;
const int totface_orig = em->bm->totface;
+ const bool use_interp_simple = RNA_boolean_get(op->ptr, "use_interp_simple");
+ const bool use_prepare = true;
+
+
+ if (use_prepare) {
+ /* use when we have a single loop selected */
+ PropertyRNA *prop_span = RNA_struct_find_property(op->ptr, "span");
+ PropertyRNA *prop_offset = RNA_struct_find_property(op->ptr, "offset");
+ bool calc_span;
+
+ const int clamp = em->bm->totvertsel;
+ int span;
+ int offset;
+
+ if (RNA_property_is_set(op->ptr, prop_span)) {
+ span = RNA_property_int_get(op->ptr, prop_span);
+ span = min_ii(span, (clamp / 2) - 1);
+ calc_span = false;
+ }
+ else {
+ span = clamp / 4;
+ calc_span = true;
+ }
+
+ offset = RNA_property_int_get(op->ptr, prop_offset);
+ offset = clamp ? mod_i(offset, clamp) : 0;
+
+ /* in simple cases, move selection for tags, but also support more advanced cases */
+ edbm_fill_grid_prepare(em->bm, offset, &span, calc_span);
+
+ RNA_property_int_set(op->ptr, prop_span, span);
+ }
+ /* end tricky prepare code */
+
if (!EDBM_op_init(em, &bmop, op,
- "grid_fill edges=%he mat_nr=%i use_smooth=%b",
- BM_ELEM_SELECT, em->mat_nr, use_smooth))
+ "grid_fill edges=%he mat_nr=%i use_smooth=%b use_interp_simple=%b",
+ use_prepare ? BM_ELEM_TAG : BM_ELEM_SELECT,
+ em->mat_nr, use_smooth, use_interp_simple))
{
return OPERATOR_CANCELLED;
}
@@ -2855,6 +3043,8 @@ static int edbm_fill_grid_exec(bContext *C, wmOperator *op)
void MESH_OT_fill_grid(wmOperatorType *ot)
{
+ PropertyRNA *prop;
+
/* identifiers */
ot->name = "Grid Fill";
ot->description = "Fill grid from two loops";
@@ -2866,6 +3056,13 @@ void MESH_OT_fill_grid(wmOperatorType *ot)
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+
+ /* properties */
+ prop = RNA_def_int(ot->srna, "span", 1, 1, INT_MAX, "Span", "Number of sides (zero disables)", 1, 100);
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
+ prop = RNA_def_int(ot->srna, "offset", 0, INT_MIN, INT_MAX, "Offset", "Number of sides (zero disables)", -100, 100);
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
+ RNA_def_boolean(ot->srna, "use_interp_simple", 0, "Simple Blending", "");
}
static int edbm_fill_holes_exec(bContext *C, wmOperator *op)
@@ -2903,7 +3100,7 @@ void MESH_OT_fill_holes(wmOperatorType *ot)
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
- RNA_def_int(ot->srna, "sides", 4, 0, INT_MAX, "Sides", "Number of sides (zero disables)", 0, 100);
+ RNA_def_int(ot->srna, "sides", 4, 0, INT_MAX, "Sides", "Number of sides in hole required to fill (zero fills all holes)", 0, 100);
}
static int edbm_beautify_fill_exec(bContext *C, wmOperator *op)
@@ -2927,7 +3124,7 @@ static int edbm_beautify_fill_exec(bContext *C, wmOperator *op)
void MESH_OT_beautify_fill(wmOperatorType *ot)
{
/* identifiers */
- ot->name = "Beautify Fill";
+ ot->name = "Beautify Faces";
ot->idname = "MESH_OT_beautify_fill";
ot->description = "Rearrange some faces to try to get less degenerated geometry";
@@ -3139,7 +3336,7 @@ void MESH_OT_dissolve_verts(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Dissolve Vertices";
- ot->description = "Dissolve geometry";
+ ot->description = "Dissolve verts, merge edges and faces";
ot->idname = "MESH_OT_dissolve_verts";
/* api callbacks */
@@ -3176,7 +3373,7 @@ void MESH_OT_dissolve_edges(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Dissolve Edges";
- ot->description = "Dissolve geometry";
+ ot->description = "Dissolve edges, merging faces";
ot->idname = "MESH_OT_dissolve_edges";
/* api callbacks */
@@ -3215,7 +3412,7 @@ void MESH_OT_dissolve_faces(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Dissolve Faces";
- ot->description = "Dissolve geometry";
+ ot->description = "Dissolve faces";
ot->idname = "MESH_OT_dissolve_faces";
/* api callbacks */
@@ -4316,7 +4513,7 @@ void MESH_OT_wireframe(wmOperatorType *ot)
/* identifiers */
ot->name = "Wire Frame";
ot->idname = "MESH_OT_wireframe";
- ot->description = "Inset new faces into selected faces";
+ ot->description = "Create a solid wire-frame from faces";
/* api callbacks */
ot->exec = edbm_wireframe_exec;
@@ -4358,7 +4555,8 @@ static int edbm_convex_hull_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
-
+ BMO_slot_buffer_hflag_enable(em->bm, bmop.slots_out, "geom.out", BM_FACE, BM_ELEM_SELECT, true);
+
/* Delete unused vertices, edges, and faces */
if (RNA_boolean_get(op->ptr, "delete_unused")) {
if (!EDBM_op_callf(em, op, "delete geom=%S context=%i",
@@ -4381,9 +4579,11 @@ static int edbm_convex_hull_exec(bContext *C, wmOperator *op)
/* Merge adjacent triangles */
if (RNA_boolean_get(op->ptr, "join_triangles")) {
- if (!EDBM_op_callf(em, op, "join_triangles faces=%S limit=%f",
- &bmop, "geom.out",
- RNA_float_get(op->ptr, "limit")))
+ if (!EDBM_op_call_and_selectf(em, op,
+ "faces.out", true,
+ "join_triangles faces=%S limit=%f",
+ &bmop, "geom.out",
+ RNA_float_get(op->ptr, "limit")))
{
EDBM_op_finish(em, &bmop, op, true);
return OPERATOR_CANCELLED;
@@ -4441,10 +4641,17 @@ static int mesh_symmetrize_exec(bContext *C, wmOperator *op)
BMEditMesh *em = BKE_editmesh_from_object(obedit);
BMOperator bmop;
- EDBM_op_init(em, &bmop, op, "symmetrize input=%hvef direction=%i",
- BM_ELEM_SELECT, RNA_enum_get(op->ptr, "direction"));
+ const float thresh = RNA_float_get(op->ptr, "threshold");
+
+ EDBM_op_init(em, &bmop, op,
+ "symmetrize input=%hvef direction=%i dist=%f",
+ BM_ELEM_SELECT, RNA_enum_get(op->ptr, "direction"), thresh);
BMO_op_exec(em->bm, &bmop);
+ EDBM_flag_disable_all(em, BM_ELEM_SELECT);
+
+ BMO_slot_buffer_hflag_enable(em->bm, bmop.slots_out, "geom.out", BM_ALL_NOLOOP, BM_ELEM_SELECT, true);
+
if (!EDBM_op_finish(em, &bmop, op, true)) {
return OPERATOR_CANCELLED;
}
@@ -4472,6 +4679,7 @@ void MESH_OT_symmetrize(struct wmOperatorType *ot)
ot->prop = RNA_def_enum(ot->srna, "direction", symmetrize_direction_items,
BMO_SYMMETRIZE_NEGATIVE_X,
"Direction", "Which sides to copy from and to");
+ RNA_def_float(ot->srna, "threshold", 0.0001, 0.0, 10.0, "Threshold", "", 0.00001, 0.1);
}
static int mesh_symmetry_snap_exec(bContext *C, wmOperator *op)
@@ -4504,7 +4712,7 @@ static int mesh_symmetry_snap_exec(bContext *C, wmOperator *op)
EDBM_verts_mirror_cache_begin_ex(em, axis, true, true, use_topology, thresh, index);
- EDBM_index_arrays_ensure(em, BM_VERT);
+ BM_mesh_elem_table_ensure(bm, BM_VERT);
BM_mesh_elem_hflag_disable_all(bm, BM_VERT, BM_ELEM_TAG, false);
@@ -4516,7 +4724,7 @@ static int mesh_symmetry_snap_exec(bContext *C, wmOperator *op)
int i_mirr = index[i];
if (i_mirr != -1) {
- BMVert *v_mirr = EDBM_vert_at_index(em, index[i]);
+ BMVert *v_mirr = BM_vert_at_index(bm, index[i]);
if (v != v_mirr) {
float co[3], co_mirr[3];
diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c
index 46cab3b4416..ca8853fd3f5 100644
--- a/source/blender/editors/mesh/editmesh_utils.c
+++ b/source/blender/editors/mesh/editmesh_utils.c
@@ -410,134 +410,6 @@ void EDBM_mesh_free(BMEditMesh *em)
BKE_editmesh_free(em);
}
-
-void EDBM_index_arrays_ensure(BMEditMesh *em, const char htype)
-{
- /* assume if the array is non-null then its valid and no need to recalc */
- const char htype_needed = ((em->vert_index ? 0 : BM_VERT) |
- (em->edge_index ? 0 : BM_EDGE) |
- (em->face_index ? 0 : BM_FACE)) & htype;
-
- BLI_assert((htype & ~BM_ALL_NOLOOP) == 0);
-
- /* in debug mode double check we didn't need to recalculate */
- BLI_assert(EDBM_index_arrays_check(em) == true);
-
- if (htype_needed & BM_VERT) {
- em->vert_index = MEM_mallocN(sizeof(void **) * em->bm->totvert, "em->vert_index");
- }
- if (htype_needed & BM_EDGE) {
- em->edge_index = MEM_mallocN(sizeof(void **) * em->bm->totedge, "em->edge_index");
- }
- if (htype_needed & BM_FACE) {
- em->face_index = MEM_mallocN(sizeof(void **) * em->bm->totface, "em->face_index");
- }
-
-#pragma omp parallel sections if (em->bm->totvert + em->bm->totedge + em->bm->totface >= BM_OMP_LIMIT)
- {
-#pragma omp section
- {
- if (htype_needed & BM_VERT) {
- BM_iter_as_array(em->bm, BM_VERTS_OF_MESH, NULL, (void **)em->vert_index, em->bm->totvert);
- }
- }
-#pragma omp section
- {
- if (htype_needed & BM_EDGE) {
- BM_iter_as_array(em->bm, BM_EDGES_OF_MESH, NULL, (void **)em->edge_index, em->bm->totedge);
- }
- }
-#pragma omp section
- {
- if (htype_needed & BM_FACE) {
- BM_iter_as_array(em->bm, BM_FACES_OF_MESH, NULL, (void **)em->face_index, em->bm->totface);
- }
- }
- }
-}
-
-/* use EDBM_index_arrays_ensure where possible to avoid full rebuild */
-void EDBM_index_arrays_init(BMEditMesh *em, const char htype)
-{
- BLI_assert((htype & ~BM_ALL_NOLOOP) == 0);
-
- /* force recalc */
- EDBM_index_arrays_free(em);
- EDBM_index_arrays_ensure(em, htype);
-}
-
-void EDBM_index_arrays_free(BMEditMesh *em)
-{
- if (em->vert_index) {
- MEM_freeN(em->vert_index);
- em->vert_index = NULL;
- }
-
- if (em->edge_index) {
- MEM_freeN(em->edge_index);
- em->edge_index = NULL;
- }
-
- if (em->face_index) {
- MEM_freeN(em->face_index);
- em->face_index = NULL;
- }
-}
-
-/* debug check only - no need to optimize */
-#ifndef NDEBUG
-bool EDBM_index_arrays_check(BMEditMesh *em)
-{
- BMIter iter;
- BMElem *ele;
- int i;
-
- if (em->vert_index) {
- BM_ITER_MESH_INDEX (ele, &iter, em->bm, BM_VERTS_OF_MESH, i) {
- if (ele != (BMElem *)em->vert_index[i]) {
- return false;
- }
- }
- }
-
- if (em->edge_index) {
- BM_ITER_MESH_INDEX (ele, &iter, em->bm, BM_EDGES_OF_MESH, i) {
- if (ele != (BMElem *)em->edge_index[i]) {
- return false;
- }
- }
- }
-
- if (em->face_index) {
- BM_ITER_MESH_INDEX (ele, &iter, em->bm, BM_FACES_OF_MESH, i) {
- if (ele != (BMElem *)em->face_index[i]) {
- return false;
- }
- }
- }
-
- return true;
-}
-#endif
-
-BMVert *EDBM_vert_at_index(BMEditMesh *em, int index)
-{
- BLI_assert((index >= 0) && (index < em->bm->totvert));
- return em->vert_index[index];
-}
-
-BMEdge *EDBM_edge_at_index(BMEditMesh *em, int index)
-{
- BLI_assert((index >= 0) && (index < em->bm->totedge));
- return em->edge_index[index];
-}
-
-BMFace *EDBM_face_at_index(BMEditMesh *em, int index)
-{
- BLI_assert((index >= 0) && (index < em->bm->totface));
- return em->face_index[index];
-}
-
void EDBM_selectmode_flush_ex(BMEditMesh *em, const short selectmode)
{
BM_mesh_select_mode_flush_ex(em->bm, selectmode);
@@ -662,10 +534,7 @@ static void undoMesh_to_editbtMesh(void *umv, void *em_v, void *UNUSED(obdata))
UndoMesh *um = umv;
BMesh *bm;
- const BMAllocTemplate allocsize = {um->me.totvert,
- um->me.totedge,
- um->me.totloop,
- um->me.totpoly};
+ const BMAllocTemplate allocsize = BMALLOC_TEMPLATE_FROM_ME(&um->me);
ob->shapenr = em->bm->shapenr = um->shapenr;
@@ -713,7 +582,7 @@ void undo_push_mesh(bContext *C, const char *name)
/**
* Return a new UVVertMap from the editmesh
*/
-UvVertMap *EDBM_uv_vert_map_create(BMEditMesh *em, bool use_select, const float limit[2])
+UvVertMap *BM_uv_vert_map_create(BMesh *bm, bool use_select, const float limit[2])
{
BMVert *ev;
BMFace *efa;
@@ -726,15 +595,15 @@ UvVertMap *EDBM_uv_vert_map_create(BMEditMesh *em, bool use_select, const float
MLoopUV *luv;
unsigned int a;
int totverts, i, totuv;
- const int cd_loop_uv_offset = CustomData_get_offset(&em->bm->ldata, CD_MLOOPUV);
+ const int cd_loop_uv_offset = CustomData_get_offset(&bm->ldata, CD_MLOOPUV);
- BM_mesh_elem_index_ensure(em->bm, BM_VERT | BM_FACE);
+ BM_mesh_elem_index_ensure(bm, BM_VERT | BM_FACE);
- totverts = em->bm->totvert;
+ totverts = bm->totvert;
totuv = 0;
/* generate UvMapVert array */
- BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
+ BM_ITER_MESH (efa, &iter, bm, BM_FACES_OF_MESH) {
if ((use_select == false) || BM_elem_flag_test(efa, BM_ELEM_SELECT)) {
totuv += efa->len;
}
@@ -757,7 +626,7 @@ UvVertMap *EDBM_uv_vert_map_create(BMEditMesh *em, bool use_select, const float
}
a = 0;
- BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
+ BM_ITER_MESH (efa, &iter, bm, BM_FACES_OF_MESH) {
if ((use_select == false) || BM_elem_flag_test(efa, BM_ELEM_SELECT)) {
i = 0;
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
@@ -778,7 +647,7 @@ UvVertMap *EDBM_uv_vert_map_create(BMEditMesh *em, bool use_select, const float
/* sort individual uvs for each vert */
a = 0;
- BM_ITER_MESH (ev, &iter, em->bm, BM_VERTS_OF_MESH) {
+ BM_ITER_MESH (ev, &iter, bm, BM_VERTS_OF_MESH) {
UvMapVert *newvlist = NULL, *vlist = vmap->vert[a];
UvMapVert *iterv, *v, *lastv, *next;
float *uv, *uv2, uvdiff[2];
@@ -789,10 +658,10 @@ UvVertMap *EDBM_uv_vert_map_create(BMEditMesh *em, bool use_select, const float
v->next = newvlist;
newvlist = v;
- efa = EDBM_face_at_index(em, v->f);
- /* tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY); */ /* UNUSED */
+ efa = BM_face_at_index(bm, v->f);
+ /* tf = CustomData_bmesh_get(&bm->pdata, efa->head.data, CD_MTEXPOLY); */ /* UNUSED */
- l = BM_iter_at_index(em->bm, BM_LOOPS_OF_FACE, efa, v->tfindex);
+ l = BM_iter_at_index(bm, BM_LOOPS_OF_FACE, efa, v->tfindex);
luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset);
uv = luv->uv;
@@ -801,10 +670,10 @@ UvVertMap *EDBM_uv_vert_map_create(BMEditMesh *em, bool use_select, const float
while (iterv) {
next = iterv->next;
- efa = EDBM_face_at_index(em, iterv->f);
- /* tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY); */ /* UNUSED */
+ efa = BM_face_at_index(bm, iterv->f);
+ /* tf = CustomData_bmesh_get(&bm->pdata, efa->head.data, CD_MTEXPOLY); */ /* UNUSED */
- l = BM_iter_at_index(em->bm, BM_LOOPS_OF_FACE, efa, iterv->tfindex);
+ l = BM_iter_at_index(bm, BM_LOOPS_OF_FACE, efa, iterv->tfindex);
luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset);
uv2 = luv->uv;
@@ -834,7 +703,7 @@ UvVertMap *EDBM_uv_vert_map_create(BMEditMesh *em, bool use_select, const float
}
-UvMapVert *EDBM_uv_vert_map_at_index(UvVertMap *vmap, unsigned int v)
+UvMapVert *BM_uv_vert_map_at_index(UvVertMap *vmap, unsigned int v)
{
return vmap->vert[v];
}
@@ -843,7 +712,7 @@ UvMapVert *EDBM_uv_vert_map_at_index(UvVertMap *vmap, unsigned int v)
/* A specialized vert map used by stitch operator */
-UvElementMap *EDBM_uv_element_map_create(BMEditMesh *em, const bool selected, const bool do_islands)
+UvElementMap *BM_uv_element_map_create(BMesh *bm, const bool selected, const bool do_islands)
{
BMVert *ev;
BMFace *efa;
@@ -863,20 +732,20 @@ UvElementMap *EDBM_uv_element_map_create(BMEditMesh *em, const bool selected, co
BMFace **stack;
int stacksize = 0;
- const int cd_loop_uv_offset = CustomData_get_offset(&em->bm->ldata, CD_MLOOPUV);
+ const int cd_loop_uv_offset = CustomData_get_offset(&bm->ldata, CD_MLOOPUV);
- BM_mesh_elem_index_ensure(em->bm, BM_VERT | BM_FACE);
+ BM_mesh_elem_index_ensure(bm, BM_VERT | BM_FACE);
- totverts = em->bm->totvert;
+ totverts = bm->totvert;
totuv = 0;
- island_number = MEM_mallocN(sizeof(*stack) * em->bm->totface, "uv_island_number_face");
+ island_number = MEM_mallocN(sizeof(*stack) * bm->totface, "uv_island_number_face");
if (!island_number) {
return NULL;
}
/* generate UvElement array */
- BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
+ BM_ITER_MESH (efa, &iter, bm, BM_FACES_OF_MESH) {
if (!selected || BM_elem_flag_test(efa, BM_ELEM_SELECT)) {
totuv += efa->len;
}
@@ -896,13 +765,13 @@ UvElementMap *EDBM_uv_element_map_create(BMEditMesh *em, const bool selected, co
buf = element_map->buf = (UvElement *)MEM_callocN(sizeof(*element_map->buf) * totuv, "UvElement");
if (!element_map->vert || !element_map->buf) {
- EDBM_uv_element_map_free(element_map);
+ BM_uv_element_map_free(element_map);
MEM_freeN(island_number);
return NULL;
}
j = 0;
- BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
+ BM_ITER_MESH (efa, &iter, bm, BM_FACES_OF_MESH) {
island_number[j++] = INVALID_ISLAND;
if (!selected || BM_elem_flag_test(efa, BM_ELEM_SELECT)) {
BM_ITER_ELEM_INDEX (l, &liter, efa, BM_LOOPS_OF_FACE, i) {
@@ -921,7 +790,7 @@ UvElementMap *EDBM_uv_element_map_create(BMEditMesh *em, const bool selected, co
/* sort individual uvs for each vert */
i = 0;
- BM_ITER_MESH (ev, &iter, em->bm, BM_VERTS_OF_MESH) {
+ BM_ITER_MESH (ev, &iter, bm, BM_VERTS_OF_MESH) {
UvElement *newvlist = NULL, *vlist = element_map->vert[i];
UvElement *iterv, *v, *lastv, *next;
float *uv, *uv2, uvdiff[2];
@@ -971,7 +840,7 @@ UvElementMap *EDBM_uv_element_map_create(BMEditMesh *em, const bool selected, co
if (do_islands) {
/* map holds the map from current vmap->buf to the new, sorted map */
map = MEM_mallocN(sizeof(*map) * totuv, "uvelement_remap");
- stack = MEM_mallocN(sizeof(*stack) * em->bm->totface, "uv_island_face_stack");
+ stack = MEM_mallocN(sizeof(*stack) * bm->totface, "uv_island_face_stack");
islandbuf = MEM_callocN(sizeof(*islandbuf) * totuv, "uvelement_island_buffer");
/* at this point, every UvElement in vert points to a UvElement sharing the same vertex. Now we should sort uv's in islands. */
@@ -1022,7 +891,7 @@ UvElementMap *EDBM_uv_element_map_create(BMEditMesh *em, const bool selected, co
}
/* remap */
- for (i = 0; i < em->bm->totvert; i++) {
+ for (i = 0; i < bm->totvert; i++) {
/* important since we may do selection only. Some of these may be NULL */
if (element_map->vert[i])
element_map->vert[i] = &islandbuf[map[element_map->vert[i] - element_map->buf]];
@@ -1033,7 +902,7 @@ UvElementMap *EDBM_uv_element_map_create(BMEditMesh *em, const bool selected, co
MEM_freeN(islandbuf);
MEM_freeN(stack);
MEM_freeN(map);
- EDBM_uv_element_map_free(element_map);
+ BM_uv_element_map_free(element_map);
MEM_freeN(island_number);
}
@@ -1063,7 +932,7 @@ UvElementMap *EDBM_uv_element_map_create(BMEditMesh *em, const bool selected, co
return element_map;
}
-void EDBM_uv_vert_map_free(UvVertMap *vmap)
+void BM_uv_vert_map_free(UvVertMap *vmap)
{
if (vmap) {
if (vmap->vert) MEM_freeN(vmap->vert);
@@ -1072,7 +941,7 @@ void EDBM_uv_vert_map_free(UvVertMap *vmap)
}
}
-void EDBM_uv_element_map_free(UvElementMap *element_map)
+void BM_uv_element_map_free(UvElementMap *element_map)
{
if (element_map) {
if (element_map->vert) MEM_freeN(element_map->vert);
@@ -1082,7 +951,7 @@ void EDBM_uv_element_map_free(UvElementMap *element_map)
}
}
-UvElement *ED_uv_element_get(UvElementMap *map, BMFace *efa, BMLoop *l)
+UvElement *BM_uv_element_get(UvElementMap *map, BMFace *efa, BMLoop *l)
{
UvElement *element;
@@ -1185,7 +1054,7 @@ void EDBM_verts_mirror_cache_begin_ex(BMEditMesh *em, const int axis, const bool
struct BMBVHTree *tree = NULL;
MirrTopoStore_t mesh_topo_store = {NULL, -1, -1, -1};
- EDBM_index_arrays_ensure(em, BM_VERT);
+ BM_mesh_elem_table_ensure(bm, BM_VERT);
if (r_index == NULL) {
const char *layer_id = BM_CD_LAYER_ID;
@@ -1273,13 +1142,13 @@ BMVert *EDBM_verts_mirror_get(BMEditMesh *em, BMVert *v)
BLI_assert(em->mirror_cdlayer != -1); /* invalid use */
if (mirr && *mirr >= 0 && *mirr < em->bm->totvert) {
- if (!em->vert_index) {
+ if (!em->bm->vtable) {
printf("err: should only be called between "
"EDBM_verts_mirror_cache_begin and EDBM_verts_mirror_cache_end");
return NULL;
}
- return em->vert_index[*mirr];
+ return em->bm->vtable[*mirr];
}
return NULL;
@@ -1338,7 +1207,7 @@ void EDBM_verts_mirror_apply(BMEditMesh *em, const int sel_from, const int sel_t
BMIter iter;
BMVert *v;
- BLI_assert(em->vert_index != NULL);
+ BLI_assert((em->bm->vtable != NULL) && ((em->bm->elem_table_dirty & BM_VERT) == 0));
BM_ITER_MESH (v, &iter, em->bm, BM_VERTS_OF_MESH) {
if (BM_elem_flag_test(v, BM_ELEM_SELECT) == sel_from) {
@@ -1450,11 +1319,12 @@ void EDBM_update_generic(BMEditMesh *em, const bool do_tessface, const bool is_d
}
if (is_destructive) {
- EDBM_index_arrays_free(em);
+ /* TODO. we may be able to remove this now! - Campbell */
+ // BM_mesh_elem_table_free(em->bm, BM_ALL_NOLOOP);
}
else {
/* in debug mode double check we didn't need to recalculate */
- BLI_assert(EDBM_index_arrays_check(em) == true);
+ BLI_assert(BM_mesh_elem_table_check(em->bm) == true);
}
}
@@ -1481,7 +1351,7 @@ int BMBVH_VertVisible(BMBVHTree *tree, BMEdge *e, RegionView3D *r3d)
static BMFace *edge_ray_cast(struct BMBVHTree *tree, const float co[3], const float dir[3], float *r_hitout, BMEdge *e)
{
- BMFace *f = BKE_bmbvh_ray_cast(tree, co, dir, NULL, r_hitout, NULL);
+ BMFace *f = BKE_bmbvh_ray_cast(tree, co, dir, 0.0f, NULL, r_hitout, NULL);
if (f && BM_edge_in_face(e, f))
return NULL;
diff --git a/source/blender/editors/mesh/mesh_intern.h b/source/blender/editors/mesh/mesh_intern.h
index 1dcc0e64183..ed026258e4b 100644
--- a/source/blender/editors/mesh/mesh_intern.h
+++ b/source/blender/editors/mesh/mesh_intern.h
@@ -95,6 +95,8 @@ void MESH_OT_primitive_ico_sphere_add(struct wmOperatorType *ot);
/* *** editmesh_bevel.c *** */
void MESH_OT_bevel(struct wmOperatorType *ot);
+/* *** editmesh_bisect.c *** */
+void MESH_OT_bisect(struct wmOperatorType *ot);
/* *** editmesh_extrude.c *** */
void MESH_OT_extrude_repeat(struct wmOperatorType *ot);
diff --git a/source/blender/editors/mesh/mesh_navmesh.c b/source/blender/editors/mesh/mesh_navmesh.c
index 66e577975b6..dc7b30e324c 100644
--- a/source/blender/editors/mesh/mesh_navmesh.c
+++ b/source/blender/editors/mesh/mesh_navmesh.c
@@ -26,6 +26,10 @@
* ***** END GPL LICENSE BLOCK *****
*/
+/** \file blender/editors/mesh/mesh_navmesh.c
+ * \ingroup edmesh
+ */
+
#include "MEM_guardedalloc.h"
#include "DNA_scene_types.h"
@@ -350,7 +354,7 @@ static Object *createRepresentation(bContext *C, struct recast_polyMesh *pmesh,
co[1] = bmin[1] + v[1] * ch;
co[2] = bmin[2] + v[2] * cs;
SWAP(float, co[1], co[2]);
- BM_vert_create(em->bm, co, NULL, 0);
+ BM_vert_create(em->bm, co, NULL, BM_CREATE_NOP);
}
/* create custom data layer to save polygon idx */
@@ -381,11 +385,11 @@ static Object *createRepresentation(bContext *C, struct recast_polyMesh *pmesh,
for (j = nv; j < ndv; j++) {
copy_v3_v3(co, &dverts[3 * (vbase + j)]);
SWAP(float, co[1], co[2]);
- BM_vert_create(em->bm, co, NULL, 0);
+ BM_vert_create(em->bm, co, NULL, BM_CREATE_NOP);
}
/* need to rebuild entirely because array size changes */
- EDBM_index_arrays_init(em, BM_VERT);
+ BM_mesh_elem_table_init(em, BM_VERT);
/* create faces */
for (j = 0; j < trinum; j++) {
@@ -400,9 +404,9 @@ static Object *createRepresentation(bContext *C, struct recast_polyMesh *pmesh,
face[k] = uniquevbase + tri[k] - nv; /* unique vertex */
}
newFace = BM_face_create_quad_tri(em->bm,
- EDBM_vert_at_index(em, face[0]),
- EDBM_vert_at_index(em, face[2]),
- EDBM_vert_at_index(em, face[1]), NULL,
+ BM_vert_at_index(em, face[0]),
+ BM_vert_at_index(em, face[2]),
+ BM_vert_at_index(em, face[1]), NULL,
NULL, false);
/* set navigation polygon idx to the custom layer */
diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c
index b5352fb35f4..86f69ab8538 100644
--- a/source/blender/editors/mesh/mesh_ops.c
+++ b/source/blender/editors/mesh/mesh_ops.c
@@ -175,6 +175,7 @@ void ED_operatortypes_mesh(void)
WM_operatortype_append(MESH_OT_convex_hull);
#endif
+ WM_operatortype_append(MESH_OT_bisect);
WM_operatortype_append(MESH_OT_symmetrize);
WM_operatortype_append(MESH_OT_symmetry_snap);
@@ -243,6 +244,13 @@ void ED_operatormacros_mesh(void)
RNA_enum_set(otmacro->ptr, "proportional", 0);
RNA_boolean_set(otmacro->ptr, "mirror", false);
+ ot = WM_operatortype_append_macro("MESH_OT_extrude_region_shrink_fatten", "Extrude Region and Shrink/Fatten",
+ "Extrude region and move result", OPTYPE_UNDO | OPTYPE_REGISTER);
+ otmacro = WM_operatortype_macro_define(ot, "MESH_OT_extrude_region");
+ otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_shrink_fatten");
+ RNA_enum_set(otmacro->ptr, "proportional", 0);
+ RNA_boolean_set(otmacro->ptr, "mirror", false);
+
ot = WM_operatortype_append_macro("MESH_OT_extrude_faces_move", "Extrude Individual Faces and Move",
"Extrude faces and move result", OPTYPE_UNDO | OPTYPE_REGISTER);
otmacro = WM_operatortype_macro_define(ot, "MESH_OT_extrude_faces_indiv");
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c
index d012a8ac656..11f25da529c 100644
--- a/source/blender/editors/mesh/meshtools.c
+++ b/source/blender/editors/mesh/meshtools.c
@@ -178,7 +178,6 @@ int join_mesh_exec(bContext *C, wmOperator *op)
if (kb->data) MEM_freeN(kb->data);
kb->data = MEM_callocN(sizeof(float) * 3 * totvert, "join_shapekey");
kb->totelem = totvert;
- kb->weights = NULL;
}
}
else if (haskey) {
@@ -315,7 +314,7 @@ int join_mesh_exec(bContext *C, wmOperator *op)
/* standard data */
CustomData_merge(&me->vdata, &vdata, CD_MASK_MESH, CD_DEFAULT, totvert);
- CustomData_copy_data(&me->vdata, &vdata, 0, vertofs, me->totvert);
+ CustomData_copy_data_named(&me->vdata, &vdata, 0, vertofs, me->totvert);
/* vertex groups */
dvert = CustomData_get(&vdata, vertofs, CD_MDEFORMVERT);
@@ -416,7 +415,7 @@ int join_mesh_exec(bContext *C, wmOperator *op)
if (me->totedge) {
CustomData_merge(&me->edata, &edata, CD_MASK_MESH, CD_DEFAULT, totedge);
- CustomData_copy_data(&me->edata, &edata, 0, edgeofs, me->totedge);
+ CustomData_copy_data_named(&me->edata, &edata, 0, edgeofs, me->totedge);
for (a = 0; a < me->totedge; a++, medge++) {
medge->v1 += vertofs;
@@ -438,7 +437,7 @@ int join_mesh_exec(bContext *C, wmOperator *op)
}
CustomData_merge(&me->ldata, &ldata, CD_MASK_MESH, CD_DEFAULT, totloop);
- CustomData_copy_data(&me->ldata, &ldata, 0, loopofs, me->totloop);
+ CustomData_copy_data_named(&me->ldata, &ldata, 0, loopofs, me->totloop);
for (a = 0; a < me->totloop; a++, mloop++) {
mloop->v += vertofs;
@@ -462,7 +461,7 @@ int join_mesh_exec(bContext *C, wmOperator *op)
}
CustomData_merge(&me->pdata, &pdata, CD_MASK_MESH, CD_DEFAULT, totpoly);
- CustomData_copy_data(&me->pdata, &pdata, 0, polyofs, me->totpoly);
+ CustomData_copy_data_named(&me->pdata, &pdata, 0, polyofs, me->totpoly);
for (a = 0; a < me->totpoly; a++, mpoly++) {
mpoly->loopstart += loopofs;
@@ -1012,6 +1011,31 @@ BMVert *editbmesh_get_x_mirror_vert(Object *ob, struct BMEditMesh *em, BMVert *e
}
}
+/**
+ * Wrapper for objectmode/editmode.
+ *
+ * call #BM_mesh_elem_table_ensure first for editmesh.
+ */
+int ED_mesh_mirror_get_vert(Object *ob, int index)
+{
+ Mesh *me = ob->data;
+ BMEditMesh *em = me->edit_btmesh;
+ bool use_topology = (me->editflag & ME_EDIT_MIRROR_TOPO) != 0;
+ int index_mirr;
+
+ if (em) {
+ BMVert *eve, *eve_mirr;
+ eve = BM_vert_at_index(em->bm, index);
+ eve_mirr = editbmesh_get_x_mirror_vert(ob, em, eve, eve->co, index, use_topology);
+ index_mirr = eve_mirr ? BM_elem_index_get(eve_mirr) : -1;
+ }
+ else {
+ index_mirr = mesh_get_x_mirror_vert(ob, index, use_topology);
+ }
+
+ return index_mirr;
+}
+
#if 0
static float *editmesh_get_mirror_uv(BMEditMesh *em, int axis, float *uv, float *mirrCent, float *face_cent)
@@ -1136,7 +1160,7 @@ int *mesh_get_x_mirror_faces(Object *ob, BMEditMesh *em)
mesh_octree_table(ob, em, NULL, 'e');
- fhash = BLI_ghash_new(mirror_facehash, mirror_facecmp, "mirror_facehash gh");
+ fhash = BLI_ghash_new_ex(mirror_facehash, mirror_facecmp, "mirror_facehash gh", me->totface);
for (a = 0, mf = mface; a < me->totface; a++, mf++)
BLI_ghash_insert(fhash, mf, mf);
diff --git a/source/blender/editors/metaball/mball_edit.c b/source/blender/editors/metaball/mball_edit.c
index de0af1d1bb8..7130166ba0e 100644
--- a/source/blender/editors/metaball/mball_edit.c
+++ b/source/blender/editors/metaball/mball_edit.c
@@ -98,7 +98,7 @@ void load_editMball(Object *UNUSED(obedit))
}
/* Add metaelem primitive to metaball object (which is in edit mode) */
-MetaElem *add_metaball_primitive(bContext *UNUSED(C), Object *obedit, float mat[4][4], float dia, int type, int UNUSED(newname))
+MetaElem *add_metaball_primitive(bContext *UNUSED(C), Object *obedit, float mat[4][4], float dia, int type)
{
MetaBall *mball = (MetaBall *)obedit->data;
MetaElem *ml;
@@ -112,6 +112,8 @@ MetaElem *add_metaball_primitive(bContext *UNUSED(C), Object *obedit, float mat[
ml = BKE_mball_element_add(mball, type);
ml->rad *= dia;
+ mball->wiresize *= dia;
+ mball->rendersize *= dia;
copy_v3_v3(&ml->x, mat[3]);
ml->flag |= SELECT;
@@ -176,6 +178,192 @@ void MBALL_OT_select_all(wmOperatorType *ot)
WM_operator_properties_select_all(ot);
}
+
+/* -------------------------------------------------------------------- */
+/* Select Similar */
+
+enum {
+ SIMMBALL_TYPE = 1,
+ SIMMBALL_RADIUS,
+ SIMMBALL_STIFFNESS,
+ SIMMBALL_ROTATION
+};
+
+static EnumPropertyItem prop_similar_types[] = {
+ {SIMMBALL_TYPE, "TYPE", 0, "Type", ""},
+ {SIMMBALL_RADIUS, "RADIUS", 0, "Radius", ""},
+ {SIMMBALL_STIFFNESS, "STIFFNESS", 0, "Stiffness", ""},
+ {SIMMBALL_ROTATION, "ROTATION", 0, "Rotation", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
+static bool mball_select_similar_type(MetaBall *mb)
+{
+ MetaElem *ml;
+ bool change = false;
+
+ for (ml = mb->editelems->first; ml; ml = ml->next) {
+ if (ml->flag & SELECT) {
+ MetaElem *ml_iter;
+
+ for (ml_iter = mb->editelems->first; ml_iter; ml_iter = ml_iter->next) {
+ if ((ml_iter->flag & SELECT) == 0) {
+ if (ml->type == ml_iter->type) {
+ ml_iter->flag |= SELECT;
+ change = true;
+ }
+ }
+ }
+ }
+ }
+
+ return change;
+}
+
+static bool mball_select_similar_radius(MetaBall *mb, const float thresh)
+{
+ MetaElem *ml;
+ bool change = false;
+
+ for (ml = mb->editelems->first; ml; ml = ml->next) {
+ if (ml->flag & SELECT) {
+ MetaElem *ml_iter;
+
+ for (ml_iter = mb->editelems->first; ml_iter; ml_iter = ml_iter->next) {
+ if ((ml_iter->flag & SELECT) == 0) {
+ if (fabsf(ml_iter->rad - ml->rad) <= (thresh * ml->rad)) {
+ ml_iter->flag |= SELECT;
+ change = true;
+ }
+ }
+ }
+ }
+ }
+
+ return change;
+}
+
+static bool mball_select_similar_stiffness(MetaBall *mb, const float thresh)
+{
+ MetaElem *ml;
+ bool change = false;
+
+ for (ml = mb->editelems->first; ml; ml = ml->next) {
+ if (ml->flag & SELECT) {
+ MetaElem *ml_iter;
+
+ for (ml_iter = mb->editelems->first; ml_iter; ml_iter = ml_iter->next) {
+ if ((ml_iter->flag & SELECT) == 0) {
+ if (fabsf(ml_iter->s - ml->s) <= thresh) {
+ ml_iter->flag |= SELECT;
+ change = true;
+ }
+ }
+ }
+ }
+ }
+
+ return change;
+}
+
+static bool mball_select_similar_rotation(MetaBall *mb, const float thresh)
+{
+ const float thresh_rad = thresh * (float)M_PI_2;
+ MetaElem *ml;
+ bool change = false;
+
+ for (ml = mb->editelems->first; ml; ml = ml->next) {
+ if (ml->flag & SELECT) {
+ MetaElem *ml_iter;
+
+ float ml_mat[3][3];
+
+ unit_m3(ml_mat);
+ mul_qt_v3(ml->quat, ml_mat[0]);
+ mul_qt_v3(ml->quat, ml_mat[1]);
+ mul_qt_v3(ml->quat, ml_mat[2]);
+ normalize_m3(ml_mat);
+
+ for (ml_iter = mb->editelems->first; ml_iter; ml_iter = ml_iter->next) {
+ if ((ml_iter->flag & SELECT) == 0) {
+ float ml_iter_mat[3][3];
+
+ unit_m3(ml_iter_mat);
+ mul_qt_v3(ml_iter->quat, ml_iter_mat[0]);
+ mul_qt_v3(ml_iter->quat, ml_iter_mat[1]);
+ mul_qt_v3(ml_iter->quat, ml_iter_mat[2]);
+ normalize_m3(ml_iter_mat);
+
+ if ((angle_normalized_v3v3(ml_mat[0], ml_iter_mat[0]) +
+ angle_normalized_v3v3(ml_mat[1], ml_iter_mat[1]) +
+ angle_normalized_v3v3(ml_mat[2], ml_iter_mat[2])) < thresh_rad)
+ {
+ ml_iter->flag |= SELECT;
+ change = true;
+ }
+ }
+ }
+ }
+ }
+
+ return change;
+}
+
+static int mball_select_similar_exec(bContext *C, wmOperator *op)
+{
+ Object *obedit = CTX_data_edit_object(C);
+ MetaBall *mb = (MetaBall *)obedit->data;
+
+ int type = RNA_enum_get(op->ptr, "type");
+ float thresh = RNA_float_get(op->ptr, "threshold");
+ bool change = false;
+
+ switch (type) {
+ case SIMMBALL_TYPE:
+ change = mball_select_similar_type(mb);
+ break;
+ case SIMMBALL_RADIUS:
+ change = mball_select_similar_radius(mb, thresh);
+ break;
+ case SIMMBALL_STIFFNESS:
+ change = mball_select_similar_stiffness(mb, thresh);
+ break;
+ case SIMMBALL_ROTATION:
+ change = mball_select_similar_rotation(mb, thresh);
+ break;
+ default:
+ BLI_assert(0);
+ }
+
+ if (change) {
+ WM_event_add_notifier(C, NC_GEOM | ND_SELECT, mb);
+ }
+
+ return OPERATOR_FINISHED;
+}
+
+void MBALL_OT_select_similar(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Select Similar";
+ ot->idname = "MBALL_OT_select_similar";
+
+ /* callback functions */
+ ot->invoke = WM_menu_invoke;
+ ot->exec = mball_select_similar_exec;
+ ot->poll = ED_operator_editmball;
+ ot->description = "Select similar metaballs by property types";
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+
+ /* properties */
+ ot->prop = RNA_def_enum(ot->srna, "type", prop_similar_types, 0, "Type", "");
+
+ RNA_def_float(ot->srna, "threshold", 0.1, 0.0, 1.0, "Threshold", "", 0.01, 1.0);
+}
+
+
/***************************** Select random operator *****************************/
/* Random metaball selection */
@@ -253,19 +441,6 @@ static int duplicate_metaelems_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_FINISHED;
}
-static int duplicate_metaelems_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
-{
- int retv = duplicate_metaelems_exec(C, op);
-
- if (retv == OPERATOR_FINISHED) {
- RNA_enum_set(op->ptr, "mode", TFM_TRANSLATION);
- WM_operator_name_call(C, "TRANSFORM_OT_transform", WM_OP_INVOKE_REGION_WIN, op->ptr);
- }
-
- return retv;
-}
-
-
void MBALL_OT_duplicate_metaelems(wmOperatorType *ot)
{
/* identifiers */
@@ -275,14 +450,10 @@ void MBALL_OT_duplicate_metaelems(wmOperatorType *ot)
/* callback functions */
ot->exec = duplicate_metaelems_exec;
- ot->invoke = duplicate_metaelems_invoke;
ot->poll = ED_operator_editmball;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
-
- /* to give to transform */
- RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, "Mode", "");
}
/***************************** Delete operator *****************************/
@@ -499,19 +670,13 @@ bool mouse_mball(bContext *C, const int mval[2], bool extend, bool deselect, boo
/* free all MetaElems from ListBase */
static void freeMetaElemlist(ListBase *lb)
{
- MetaElem *ml, *next;
+ MetaElem *ml;
if (lb == NULL) return;
- ml = lb->first;
- while (ml) {
- next = ml->next;
- BLI_remlink(lb, ml);
+ while ((ml = BLI_pophead(lb))) {
MEM_freeN(ml);
- ml = next;
}
-
- lb->first = lb->last = NULL;
}
diff --git a/source/blender/editors/metaball/mball_intern.h b/source/blender/editors/metaball/mball_intern.h
index 0329f8e5bfa..24a4ea86d87 100644
--- a/source/blender/editors/metaball/mball_intern.h
+++ b/source/blender/editors/metaball/mball_intern.h
@@ -43,6 +43,7 @@ void MBALL_OT_delete_metaelems(struct wmOperatorType *ot);
void MBALL_OT_duplicate_metaelems(struct wmOperatorType *ot);
void MBALL_OT_select_all(struct wmOperatorType *ot);
+void MBALL_OT_select_similar(struct wmOperatorType *ot);
void MBALL_OT_select_random_metaelems(struct wmOperatorType *ot);
#endif
diff --git a/source/blender/editors/metaball/mball_ops.c b/source/blender/editors/metaball/mball_ops.c
index bba0dc5000b..249e7361cc0 100644
--- a/source/blender/editors/metaball/mball_ops.c
+++ b/source/blender/editors/metaball/mball_ops.c
@@ -52,9 +52,23 @@ void ED_operatortypes_metaball(void)
WM_operatortype_append(MBALL_OT_reveal_metaelems);
WM_operatortype_append(MBALL_OT_select_all);
+ WM_operatortype_append(MBALL_OT_select_similar);
WM_operatortype_append(MBALL_OT_select_random_metaelems);
}
+void ED_operatormacros_metaball(void)
+{
+ wmOperatorType *ot;
+ wmOperatorTypeMacro *otmacro;
+
+ ot = WM_operatortype_append_macro("MBALL_OT_duplicate_move", "Duplicate",
+ "Make copies of the selected bones within the same armature and move them",
+ OPTYPE_UNDO | OPTYPE_REGISTER);
+ WM_operatortype_macro_define(ot, "MBALL_OT_duplicate_metaelems");
+ otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+ RNA_enum_set(otmacro->ptr, "proportional", 0);
+}
+
void ED_keymap_metaball(wmKeyConfig *keyconf)
{
wmKeyMap *keymap;
@@ -73,13 +87,15 @@ void ED_keymap_metaball(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "MBALL_OT_delete_metaelems", XKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "MBALL_OT_delete_metaelems", DELKEY, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "MBALL_OT_duplicate_metaelems", DKEY, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "MBALL_OT_duplicate_move", DKEY, KM_PRESS, KM_SHIFT, 0);
kmi = WM_keymap_add_item(keymap, "MBALL_OT_select_all", AKEY, KM_PRESS, 0, 0);
RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE);
kmi = WM_keymap_add_item(keymap, "MBALL_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0);
RNA_enum_set(kmi->ptr, "action", SEL_INVERT);
+ WM_keymap_add_item(keymap, "MBALL_OT_select_similar", GKEY, KM_PRESS, KM_SHIFT, 0);
+
ED_keymap_proportional_cycle(keyconf, keymap);
ED_keymap_proportional_editmode(keyconf, keymap, TRUE);
}
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index ce61b4fce50..0a390da2ae4 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -152,7 +152,7 @@ void ED_object_location_from_view(bContext *C, float loc[3])
Scene *scene = CTX_data_scene(C);
const float *cursor;
- cursor = give_cursor(scene, v3d);
+ cursor = ED_view3d_cursor3d_get(scene, v3d);
copy_v3_v3(loc, cursor);
}
@@ -191,7 +191,7 @@ void ED_object_base_init_transform(bContext *C, Base *base, const float loc[3],
* Returns standard diameter. */
float ED_object_new_primitive_matrix(bContext *C, Object *obedit,
const float loc[3], const float rot[3], float primmat[4][4],
- int apply_diameter)
+ bool apply_diameter)
{
Scene *scene = CTX_data_scene(C);
View3D *v3d = CTX_wm_view3d(C);
@@ -236,7 +236,15 @@ static void view_align_update(struct Main *UNUSED(main), struct Scene *UNUSED(sc
RNA_struct_idprops_unset(ptr, "rotation");
}
-void ED_object_add_generic_props(wmOperatorType *ot, int do_editmode)
+void ED_object_add_unit_props(wmOperatorType *ot)
+{
+ PropertyRNA *prop;
+
+ prop = RNA_def_float(ot->srna, "radius", 1.0f, 0.0, FLT_MAX, "Radius", "", 0.001, 100.00);
+ RNA_def_property_subtype(prop, PROP_DISTANCE);
+}
+
+void ED_object_add_generic_props(wmOperatorType *ot, bool do_editmode)
{
PropertyRNA *prop;
@@ -261,8 +269,8 @@ void ED_object_add_generic_props(wmOperatorType *ot, int do_editmode)
RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
}
-int ED_object_add_generic_get_opts(bContext *C, wmOperator *op, float loc[3], float rot[3],
- bool *enter_editmode, unsigned int *layer, bool *is_view_aligned)
+bool ED_object_add_generic_get_opts(bContext *C, wmOperator *op, float loc[3], float rot[3],
+ bool *enter_editmode, unsigned int *layer, bool *is_view_aligned)
{
View3D *v3d = CTX_wm_view3d(C);
unsigned int _layer;
@@ -356,16 +364,16 @@ int ED_object_add_generic_get_opts(bContext *C, wmOperator *op, float loc[3], fl
if (layer && *layer == 0) {
BKE_report(op->reports, RPT_ERROR, "Property 'layer' has no values set");
- return 0;
+ return false;
}
- return 1;
+ return true;
}
/* For object add primitive operators.
* Do not call undo push in this function (users of this function have to). */
Object *ED_object_add_type(bContext *C, int type, const float loc[3], const float rot[3],
- int enter_editmode, unsigned int layer)
+ bool enter_editmode, unsigned int layer)
{
Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
@@ -570,6 +578,7 @@ static int object_metaball_add_exec(bContext *C, wmOperator *op)
float mat[4][4];
float dia;
+ WM_operator_view3d_unit_defaults(C, op);
if (!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL))
return OPERATOR_CANCELLED;
@@ -577,12 +586,14 @@ static int object_metaball_add_exec(bContext *C, wmOperator *op)
obedit = ED_object_add_type(C, OB_MBALL, loc, rot, TRUE, layer);
newob = true;
}
- else
+ else {
DAG_id_tag_update(&obedit->id, OB_RECALC_DATA);
+ }
- dia = ED_object_new_primitive_matrix(C, obedit, loc, rot, mat, FALSE);
+ ED_object_new_primitive_matrix(C, obedit, loc, rot, mat, false);
+ dia = RNA_float_get(op->ptr, "radius");
- add_metaball_primitive(C, obedit, mat, dia, RNA_enum_get(op->ptr, "type"), newob);
+ add_metaball_primitive(C, obedit, mat, dia, RNA_enum_get(op->ptr, "type"));
/* userdef */
if (newob && !enter_editmode) {
@@ -602,7 +613,7 @@ void OBJECT_OT_metaball_add(wmOperatorType *ot)
ot->idname = "OBJECT_OT_metaball_add";
/* api callbacks */
- ot->invoke = WM_menu_invoke;/* object_metaball_add_invoke; */
+ ot->invoke = WM_menu_invoke;
ot->exec = object_metaball_add_exec;
ot->poll = ED_operator_scene_editable;
@@ -611,6 +622,7 @@ void OBJECT_OT_metaball_add(wmOperatorType *ot)
ot->prop = RNA_def_enum(ot->srna, "type", metaelem_type_items, 0, "Primitive", "");
+ ED_object_add_unit_props(ot);
ED_object_add_generic_props(ot, TRUE);
}
@@ -1208,9 +1220,11 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base,
const short use_base_parent,
const short use_hierarchy)
{
+ Main *bmain = CTX_data_main(C);
ListBase *lb;
DupliObject *dob;
GHash *dupli_gh = NULL, *parent_gh = NULL;
+ Object *object;
if (!(base->object->transflag & OB_DUPLI))
return;
@@ -1225,6 +1239,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base,
for (dob = lb->first; dob; dob = dob->next) {
Base *basen;
Object *ob = BKE_object_copy(dob->ob);
+
/* font duplis can have a totcol without material, we get them from parent
* should be implemented better...
*/
@@ -1243,7 +1258,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base,
ob->parent = NULL;
ob->constraints.first = ob->constraints.last = NULL;
- ob->disp.first = ob->disp.last = NULL;
+ ob->curve_cache = NULL;
ob->transflag &= ~OB_DUPLI;
ob->lay = base->lay;
@@ -1318,6 +1333,17 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base,
}
}
+ /* The same how BKE_object_unlink detects which object proxies to clear. */
+ if (base->object->transflag & OB_DUPLIGROUP && base->object->dup_group) {
+ for (object = bmain->object.first; object; object = object->id.next) {
+ if (object->proxy_group == base->object) {
+ object->proxy = NULL;
+ object->proxy_from = NULL;
+ DAG_id_tag_update(&object->id, OB_RECALC_OB);
+ }
+ }
+ }
+
if (dupli_gh)
BLI_ghash_free(dupli_gh, NULL, NULL);
if (parent_gh)
@@ -1385,7 +1411,7 @@ static EnumPropertyItem convert_target_items[] = {
static void curvetomesh(Scene *scene, Object *ob)
{
- if (ob->disp.first == NULL)
+ if (ELEM(NULL, ob->curve_cache, ob->curve_cache->disp.first))
BKE_displist_make_curveTypes(scene, ob, 0); /* force creation */
BKE_mesh_from_nurbs(ob); /* also does users */
@@ -1553,7 +1579,7 @@ static int convert_exec(bContext *C, wmOperator *op)
cu = newob->data;
- if (!newob->disp.first)
+ if ( !newob->curve_cache || !newob->curve_cache->disp.first)
BKE_displist_make_curveTypes(scene, newob, 0);
newob->type = OB_CURVE;
@@ -1595,7 +1621,7 @@ static int convert_exec(bContext *C, wmOperator *op)
curvetomesh(scene, newob);
/* meshes doesn't use displist */
- BKE_displist_free(&newob->disp);
+ BKE_object_free_curve_cache(newob);
}
}
else if (ELEM(ob->type, OB_CURVE, OB_SURF)) {
@@ -1616,7 +1642,7 @@ static int convert_exec(bContext *C, wmOperator *op)
newob = ob;
/* meshes doesn't use displist */
- BKE_displist_free(&newob->disp);
+ BKE_object_free_curve_cache(newob);
}
curvetomesh(scene, newob);
@@ -1635,7 +1661,7 @@ static int convert_exec(bContext *C, wmOperator *op)
ob->flag |= OB_DONE;
}
- if (!baseob->disp.first) {
+ if (!baseob->curve_cache || !baseob->curve_cache->disp.first) {
BKE_displist_make_mball(scene, baseob);
}
@@ -1658,7 +1684,7 @@ static int convert_exec(bContext *C, wmOperator *op)
for (a = 0; a < newob->totcol; a++) id_us_plus((ID *)me->mat[a]);
}
- BKE_mesh_from_metaball(&baseob->disp, newob->data);
+ BKE_mesh_from_metaball(&baseob->curve_cache->disp, newob->data);
if (obact->type == OB_MBALL) {
basact = basen;
diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c
index 8b674cf1e50..060e48f39bc 100644
--- a/source/blender/editors/object/object_bake.c
+++ b/source/blender/editors/object/object_bake.c
@@ -91,20 +91,24 @@
typedef struct MultiresBakerJobData {
struct MultiresBakerJobData *next, *prev;
DerivedMesh *lores_dm, *hires_dm;
- int simple, lvl, tot_lvl;
+ bool simple;
+ int lvl, tot_lvl;
ListBase images;
} MultiresBakerJobData;
/* data passing to multires-baker job */
typedef struct {
ListBase data;
- int bake_clear, bake_filter;
- short mode, use_lores_mesh;
- int number_of_rays;
- float bias;
- int raytrace_structure;
- int octree_resolution;
- int threads;
+ bool bake_clear; /* Clear the images before baking */
+ int bake_filter; /* Bake-filter, aka margin */
+ short mode; /* mode of baking (displacement, normals, AO) */
+ bool use_lores_mesh; /* Use low-resolution mesh when baking displacement maps */
+ int number_of_rays; /* Number of rays to be cast when doing AO baking */
+ float bias; /* Bias between object and start ray point when doing AO baking */
+ int raytrace_structure; /* Optimization structure to be used for AO baking */
+ int octree_resolution; /* Reslution of octotree when using octotree optimization structure */
+ int threads; /* Number of threads to be used for baking */
+ float user_scale; /* User scale used to scale displacement when baking derivative map. */
} MultiresBakeJob;
static bool multiresbake_check(bContext *C, wmOperator *op)
@@ -236,7 +240,7 @@ static DerivedMesh *multiresbake_create_loresdm(Scene *scene, Object *ob, int *l
return dm;
}
-static DerivedMesh *multiresbake_create_hiresdm(Scene *scene, Object *ob, int *lvl, int *simple)
+static DerivedMesh *multiresbake_create_hiresdm(Scene *scene, Object *ob, int *lvl, bool *simple)
{
Mesh *me = (Mesh *)ob->data;
MultiresModifierData *mmd = get_multires_modifier(scene, ob, 0);
@@ -253,7 +257,7 @@ static DerivedMesh *multiresbake_create_hiresdm(Scene *scene, Object *ob, int *l
CustomData_set_only_copy(&cddm->polyData, CD_MASK_BAREMESH);
*lvl = mmd->totlvl;
- *simple = mmd->simple;
+ *simple = mmd->simple != 0;
tmp_mmd.lvl = mmd->totlvl;
tmp_mmd.sculptlvl = mmd->totlvl;
@@ -264,40 +268,68 @@ static DerivedMesh *multiresbake_create_hiresdm(Scene *scene, Object *ob, int *l
}
typedef enum ClearFlag {
- CLEAR_NORMAL = 1
+ CLEAR_TANGENT_NORMAL = 1,
+ CLEAR_DISPLACEMENT = 2
} ClearFlag;
-static void clear_images(MTFace *mtface, int totface, ClearFlag flag)
+static void clear_single_image(Image *image, ClearFlag flag)
{
- int a;
const float vec_alpha[4] = {0.0f, 0.0f, 0.0f, 0.0f};
const float vec_solid[4] = {0.0f, 0.0f, 0.0f, 1.0f};
const float nor_alpha[4] = {0.5f, 0.5f, 1.0f, 0.0f};
const float nor_solid[4] = {0.5f, 0.5f, 1.0f, 1.0f};
+ const float disp_alpha[4] = {0.5f, 0.5f, 0.5f, 0.0f};
+ const float disp_solid[4] = {0.5f, 0.5f, 0.5f, 1.0f};
+
+ if ((image->id.flag & LIB_DOIT) == 0) {
+ ImBuf *ibuf = BKE_image_acquire_ibuf(image, NULL, NULL);
+
+ if (flag == CLEAR_TANGENT_NORMAL)
+ IMB_rectfill(ibuf, (ibuf->planes == R_IMF_PLANES_RGBA) ? nor_alpha : nor_solid);
+ else if (flag == CLEAR_DISPLACEMENT)
+ IMB_rectfill(ibuf, (ibuf->planes == R_IMF_PLANES_RGBA) ? disp_alpha : disp_solid);
+ else
+ IMB_rectfill(ibuf, (ibuf->planes == R_IMF_PLANES_RGBA) ? vec_alpha : vec_solid);
+
+ image->id.flag |= LIB_DOIT;
- for (a = 0; a < totface; a++)
+ BKE_image_release_ibuf(image, ibuf, NULL);
+ }
+}
+
+static void clear_images(MTFace *mtface, int totface, ClearFlag flag)
+{
+ int a;
+
+ for (a = 0; a < totface; a++) {
mtface[a].tpage->id.flag &= ~LIB_DOIT;
+ }
for (a = 0; a < totface; a++) {
- Image *ima = mtface[a].tpage;
+ clear_single_image(mtface[a].tpage, flag);
+ }
- if ((ima->id.flag & LIB_DOIT) == 0) {
- ImBuf *ibuf = BKE_image_acquire_ibuf(ima, NULL, NULL);
+ for (a = 0; a < totface; a++) {
+ mtface[a].tpage->id.flag &= ~LIB_DOIT;
+ }
+}
- if (flag == CLEAR_NORMAL)
- IMB_rectfill(ibuf, (ibuf->planes == R_IMF_PLANES_RGBA) ? nor_alpha : nor_solid);
- else
- IMB_rectfill(ibuf, (ibuf->planes == R_IMF_PLANES_RGBA) ? vec_alpha : vec_solid);
+static void clear_images_poly(MTexPoly *mtpoly, int totpoly, ClearFlag flag)
+{
+ int a;
- ima->id.flag |= LIB_DOIT;
+ for (a = 0; a < totpoly; a++) {
+ mtpoly[a].tpage->id.flag &= ~LIB_DOIT;
+ }
- BKE_image_release_ibuf(ima, ibuf, NULL);
- }
+ for (a = 0; a < totpoly; a++) {
+ clear_single_image(mtpoly[a].tpage, flag);
}
- for (a = 0; a < totface; a++)
- mtface[a].tpage->id.flag &= ~LIB_DOIT;
+ for (a = 0; a < totpoly; a++) {
+ mtpoly[a].tpage->id.flag &= ~LIB_DOIT;
+ }
}
static int multiresbake_image_exec_locked(bContext *C, wmOperator *op)
@@ -313,14 +345,20 @@ static int multiresbake_image_exec_locked(bContext *C, wmOperator *op)
CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases)
{
Mesh *me;
+ ClearFlag clear_flag = 0;
ob = base->object;
me = (Mesh *)ob->data;
- if (scene->r.bake_mode == RE_BAKE_NORMALS && scene->r.bake_normal_space == R_BAKE_SPACE_TANGENT)
- clear_images(me->mtface, me->totface, CLEAR_NORMAL);
- else
- clear_images(me->mtface, me->totface, 0);
+ if (scene->r.bake_mode == RE_BAKE_NORMALS) {
+ clear_flag = CLEAR_TANGENT_NORMAL;
+ }
+ else if (ELEM(scene->r.bake_mode, RE_BAKE_DISPLACEMENT, RE_BAKE_DERIVATIVE)) {
+ clear_flag = CLEAR_DISPLACEMENT;
+ }
+
+ clear_images(me->mtface, me->totface, clear_flag);
+ clear_images_poly(me->mtpoly, me->totpoly, clear_flag);
}
CTX_DATA_END;
}
@@ -342,6 +380,8 @@ static int multiresbake_image_exec_locked(bContext *C, wmOperator *op)
bkr.raytrace_structure = scene->r.raytrace_structure;
bkr.octree_resolution = scene->r.ocres;
bkr.threads = BKE_scene_num_threads(scene);
+ bkr.user_scale = (scene->r.bake_flag & R_BAKE_USERSCALE) ? scene->r.bake_user_scale : -1.0f;
+ //bkr.reports= op->reports;
/* create low-resolution DM (to bake to) and hi-resolution DM (to bake from) */
bkr.hires_dm = multiresbake_create_hiresdm(scene, ob, &bkr.tot_lvl, &bkr.simple);
@@ -380,6 +420,8 @@ static void init_multiresbake_job(bContext *C, MultiresBakeJob *bkj)
bkj->raytrace_structure = scene->r.raytrace_structure;
bkj->octree_resolution = scene->r.ocres;
bkj->threads = BKE_scene_num_threads(scene);
+ bkj->user_scale = (scene->r.bake_flag & R_BAKE_USERSCALE) ? scene->r.bake_user_scale : -1.0f;
+ //bkj->reports = op->reports;
CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases)
{
@@ -414,11 +456,16 @@ static void multiresbake_startjob(void *bkv, short *stop, short *do_update, floa
for (data = bkj->data.first; data; data = data->next) {
DerivedMesh *dm = data->lores_dm;
MTFace *mtface = CustomData_get_layer(&dm->faceData, CD_MTFACE);
+ ClearFlag clear_flag = 0;
+
+ if (bkj->mode == RE_BAKE_NORMALS) {
+ clear_flag = CLEAR_TANGENT_NORMAL;
+ }
+ else if (ELEM(bkj->mode, RE_BAKE_DISPLACEMENT, RE_BAKE_DERIVATIVE)) {
+ clear_flag = CLEAR_DISPLACEMENT;
+ }
- if (bkj->mode == RE_BAKE_NORMALS)
- clear_images(mtface, dm->getNumTessFaces(dm), CLEAR_NORMAL);
- else
- clear_images(mtface, dm->getNumTessFaces(dm), 0);
+ clear_images(mtface, dm->getNumTessFaces(dm), clear_flag);
}
}
@@ -429,6 +476,8 @@ static void multiresbake_startjob(void *bkv, short *stop, short *do_update, floa
bkr.bake_filter = bkj->bake_filter;
bkr.mode = bkj->mode;
bkr.use_lores_mesh = bkj->use_lores_mesh;
+ bkr.user_scale = bkj->user_scale;
+ //bkr.reports = bkj->reports;
/* create low-resolution DM (to bake to) and hi-resolution DM (to bake from) */
bkr.lores_dm = data->lores_dm;
@@ -507,7 +556,7 @@ static int multiresbake_image_exec(bContext *C, wmOperator *op)
wm_job = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, "Multires Bake",
WM_JOB_EXCL_RENDER | WM_JOB_PRIORITY | WM_JOB_PROGRESS, WM_JOB_TYPE_OBJECT_BAKE_TEXTURE);
WM_jobs_customdata_set(wm_job, bkr, multiresbake_freejob);
- WM_jobs_timer(wm_job, 0.2, NC_IMAGE, 0); /* TODO - only draw bake image, can we enforce this */
+ WM_jobs_timer(wm_job, 0.5, NC_IMAGE, 0); /* TODO - only draw bake image, can we enforce this */
WM_jobs_callbacks(wm_job, multiresbake_startjob, NULL, NULL, NULL);
G.is_break = FALSE;
@@ -734,7 +783,7 @@ static int objects_bake_render_modal(bContext *C, wmOperator *UNUSED(op), const
static int is_multires_bake(Scene *scene)
{
- if (ELEM3(scene->r.bake_mode, RE_BAKE_NORMALS, RE_BAKE_DISPLACEMENT, RE_BAKE_AO))
+ if (ELEM4(scene->r.bake_mode, RE_BAKE_NORMALS, RE_BAKE_DISPLACEMENT, RE_BAKE_DERIVATIVE, RE_BAKE_AO))
return scene->r.bake_flag & R_BAKE_MULTIRES;
return 0;
@@ -767,7 +816,7 @@ static int objects_bake_render_invoke(bContext *C, wmOperator *op, const wmEvent
wm_job = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, "Texture Bake",
WM_JOB_EXCL_RENDER | WM_JOB_PRIORITY | WM_JOB_PROGRESS, WM_JOB_TYPE_OBJECT_BAKE_TEXTURE);
WM_jobs_customdata_set(wm_job, bkr, bake_freejob);
- WM_jobs_timer(wm_job, 0.2, NC_IMAGE, 0); /* TODO - only draw bake image, can we enforce this */
+ WM_jobs_timer(wm_job, 0.5, NC_IMAGE, 0); /* TODO - only draw bake image, can we enforce this */
WM_jobs_callbacks(wm_job, bake_startjob, NULL, bake_update, NULL);
G.is_break = FALSE;
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 7f7a0777bbf..bd4c2e997fe 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -79,6 +79,7 @@
#include "BKE_softbody.h"
#include "BKE_modifier.h"
#include "BKE_editmesh.h"
+#include "BKE_report.h"
#include "ED_armature.h"
#include "ED_curve.h"
@@ -556,11 +557,20 @@ void ED_object_editmode_enter(bContext *C, int flag)
if (flag & EM_WAITCURSOR) waitcursor(0);
}
-static int editmode_toggle_exec(bContext *C, wmOperator *UNUSED(op))
+static int editmode_toggle_exec(bContext *C, wmOperator *op)
{
+ const int mode_flag = OB_MODE_EDIT;
+ const bool is_mode_set = (CTX_data_edit_object(C) != NULL);
ToolSettings *toolsettings = CTX_data_tool_settings(C);
- if (!CTX_data_edit_object(C))
+ if (!is_mode_set) {
+ Scene *scene = CTX_data_scene(C);
+ if (!ED_object_mode_compat_set(C, scene->basact->object, mode_flag, op->reports)) {
+ return OPERATOR_CANCELLED;
+ }
+ }
+
+ if (!is_mode_set)
ED_object_editmode_enter(C, EM_WAITCURSOR);
else
ED_object_editmode_exit(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR); /* had EM_DO_UNDO but op flag calls undo too [#24685] */
@@ -582,10 +592,7 @@ static int editmode_toggle_poll(bContext *C)
if ((ob->restrictflag & OB_RESTRICT_VIEW) && !(ob->mode & OB_MODE_EDIT))
return 0;
- return (ob->type == OB_MESH || ob->type == OB_ARMATURE ||
- ob->type == OB_FONT || ob->type == OB_MBALL ||
- ob->type == OB_LATTICE || ob->type == OB_SURF ||
- ob->type == OB_CURVE);
+ return (ELEM7(ob->type, OB_MESH, OB_ARMATURE, OB_FONT, OB_MBALL, OB_LATTICE, OB_SURF, OB_CURVE));
}
void OBJECT_OT_editmode_toggle(wmOperatorType *ot)
@@ -598,7 +605,6 @@ void OBJECT_OT_editmode_toggle(wmOperatorType *ot)
/* api callbacks */
ot->exec = editmode_toggle_exec;
-
ot->poll = editmode_toggle_poll;
/* flags */
@@ -607,16 +613,25 @@ void OBJECT_OT_editmode_toggle(wmOperatorType *ot)
/* *************************** */
-static int posemode_exec(bContext *C, wmOperator *UNUSED(op))
+static int posemode_exec(bContext *C, wmOperator *op)
{
Base *base = CTX_data_active_base(C);
+ Object *ob = base->object;
+ const int mode_flag = OB_MODE_POSE;
+ const bool is_mode_set = (ob->mode & mode_flag) != 0;
- if (base->object->type == OB_ARMATURE) {
- if (base->object == CTX_data_edit_object(C)) {
+ if (!is_mode_set) {
+ if (!ED_object_mode_compat_set(C, ob, mode_flag, op->reports)) {
+ return OPERATOR_CANCELLED;
+ }
+ }
+
+ if (ob->type == OB_ARMATURE) {
+ if (ob == CTX_data_edit_object(C)) {
ED_object_editmode_exit(C, EM_FREEDATA | EM_DO_UNDO);
ED_armature_enter_posemode(C, base);
}
- else if (base->object->mode & OB_MODE_POSE)
+ else if (is_mode_set)
ED_armature_exit_posemode(C, base);
else
ED_armature_enter_posemode(C, base);
@@ -1417,8 +1432,9 @@ static void UNUSED_FUNCTION(image_aspect) (Scene *scene, View3D *v3d)
space = size[0] / size[1];
}
else if (ELEM3(ob->type, OB_CURVE, OB_FONT, OB_SURF)) {
- Curve *cu = ob->data;
- space = cu->size[0] / cu->size[1];
+ float size[3];
+ BKE_curve_texspace_get(ob->data, NULL, NULL, size);
+ space = size[0] / size[1];
}
x = ibuf->x / space;
@@ -1455,12 +1471,14 @@ static EnumPropertyItem *object_mode_set_itemsf(bContext *C, PointerRNA *UNUSED(
ob = CTX_data_active_object(C);
if (ob) {
+ const bool use_mode_particle_edit = (ob->particlesystem.first != NULL) || (ob->soft != NULL) ||
+ (modifiers_findByType(ob, eModifierType_Cloth) != NULL);
while (input->identifier) {
if ((input->value == OB_MODE_EDIT && OB_TYPE_SUPPORT_EDITMODE(ob->type)) ||
(input->value == OB_MODE_POSE && (ob->type == OB_ARMATURE)) ||
- (input->value == OB_MODE_PARTICLE_EDIT && ob->particlesystem.first) ||
- ((input->value == OB_MODE_SCULPT || input->value == OB_MODE_VERTEX_PAINT ||
- input->value == OB_MODE_WEIGHT_PAINT || input->value == OB_MODE_TEXTURE_PAINT) && (ob->type == OB_MESH)) ||
+ (input->value == OB_MODE_PARTICLE_EDIT && use_mode_particle_edit) ||
+ (ELEM4(input->value, OB_MODE_SCULPT, OB_MODE_VERTEX_PAINT,
+ OB_MODE_WEIGHT_PAINT, OB_MODE_TEXTURE_PAINT) && (ob->type == OB_MESH)) ||
(input->value == OB_MODE_OBJECT))
{
RNA_enum_item_add(&item, &totitem, input);
@@ -1500,19 +1518,21 @@ static const char *object_mode_op_string(int mode)
}
/* checks the mode to be set is compatible with the object
- * should be made into a generic function */
-static bool object_mode_set_compat(bContext *UNUSED(C), wmOperator *op, Object *ob)
+ * should be made into a generic function
+ */
+static bool object_mode_compat_test(Object *ob, ObjectMode mode)
{
- ObjectMode mode = RNA_enum_get(op->ptr, "mode");
-
if (ob) {
if (mode == OB_MODE_OBJECT)
return true;
switch (ob->type) {
case OB_MESH:
- if (mode & (OB_MODE_EDIT | OB_MODE_SCULPT | OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT | OB_MODE_TEXTURE_PAINT | OB_MODE_PARTICLE_EDIT))
+ if (mode & (OB_MODE_EDIT | OB_MODE_SCULPT | OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT |
+ OB_MODE_TEXTURE_PAINT | OB_MODE_PARTICLE_EDIT))
+ {
return true;
+ }
break;
case OB_CURVE:
case OB_SURF:
@@ -1535,6 +1555,30 @@ static bool object_mode_set_compat(bContext *UNUSED(C), wmOperator *op, Object *
return false;
}
+/**
+ * Sets the mode to a compatible state (use before entering the mode).
+ *
+ * This is so each mode's exec function can call
+ */
+bool ED_object_mode_compat_set(bContext *C, Object *ob, int mode, ReportList *reports)
+{
+ bool ok;
+ if (!ELEM(ob->mode, mode, OB_MODE_OBJECT)) {
+ const char *opstring = object_mode_op_string(ob->mode);
+ WM_operator_name_call(C, opstring, WM_OP_EXEC_REGION_WIN, NULL);
+ ok = ELEM(ob->mode, mode, OB_MODE_OBJECT);
+ if (!ok) {
+ wmOperatorType *ot = WM_operatortype_find(opstring, false);
+ BKE_reportf(reports, RPT_ERROR, "Unable to execute '%s', error changing modes", ot->name);
+ }
+ }
+ else {
+ ok = true;
+ }
+
+ return ok;
+}
+
static int object_mode_set_exec(bContext *C, wmOperator *op)
{
Object *ob = CTX_data_active_object(C);
@@ -1542,25 +1586,31 @@ static int object_mode_set_exec(bContext *C, wmOperator *op)
ObjectMode restore_mode = (ob) ? ob->mode : OB_MODE_OBJECT;
int toggle = RNA_boolean_get(op->ptr, "toggle");
- if (!ob || !object_mode_set_compat(C, op, ob))
+ if (!ob || !object_mode_compat_test(ob, mode))
return OPERATOR_PASS_THROUGH;
- /* Exit current mode if it's not the mode we're setting */
- if (ob->mode != OB_MODE_OBJECT && ob->mode != mode)
- WM_operator_name_call(C, object_mode_op_string(ob->mode), WM_OP_EXEC_REGION_WIN, NULL);
+ if (ob->mode != mode) {
+ /* we should be able to remove this call, each operator calls */
+ ED_object_mode_compat_set(C, ob, mode, op->reports);
+ }
- if (mode != OB_MODE_OBJECT) {
+ /* Exit current mode if it's not the mode we're setting */
+ if (mode != OB_MODE_OBJECT && (ob->mode != mode || toggle)) {
/* Enter new mode */
- if (ob->mode != mode || toggle)
- WM_operator_name_call(C, object_mode_op_string(mode), WM_OP_EXEC_REGION_WIN, NULL);
-
- if (toggle) {
- if (ob->mode == mode)
- /* For toggling, store old mode so we know what to go back to */
- ob->restore_mode = restore_mode;
- else if (ob->restore_mode != OB_MODE_OBJECT && ob->restore_mode != mode) {
- WM_operator_name_call(C, object_mode_op_string(ob->restore_mode), WM_OP_EXEC_REGION_WIN, NULL);
- }
+ WM_operator_name_call(C, object_mode_op_string(mode), WM_OP_EXEC_REGION_WIN, NULL);
+ }
+
+ if (toggle) {
+ /* Special case for Object mode! */
+ if (mode == OB_MODE_OBJECT && restore_mode == OB_MODE_OBJECT && ob->restore_mode != OB_MODE_OBJECT) {
+ WM_operator_name_call(C, object_mode_op_string(ob->restore_mode), WM_OP_EXEC_REGION_WIN, NULL);
+ }
+ else if (ob->mode == mode) {
+ /* For toggling, store old mode so we know what to go back to */
+ ob->restore_mode = restore_mode;
+ }
+ else if (ob->restore_mode != OB_MODE_OBJECT && ob->restore_mode != mode) {
+ WM_operator_name_call(C, object_mode_op_string(ob->restore_mode), WM_OP_EXEC_REGION_WIN, NULL);
}
}
@@ -1569,6 +1619,8 @@ static int object_mode_set_exec(bContext *C, wmOperator *op)
void OBJECT_OT_mode_set(wmOperatorType *ot)
{
+ PropertyRNA *prop;
+
/* identifiers */
ot->name = "Set Object Mode";
ot->description = "Sets the object interaction mode";
@@ -1584,14 +1636,20 @@ void OBJECT_OT_mode_set(wmOperatorType *ot)
ot->prop = RNA_def_enum(ot->srna, "mode", object_mode_items, OB_MODE_OBJECT, "Mode", "");
RNA_def_enum_funcs(ot->prop, object_mode_set_itemsf);
+ RNA_def_property_flag(ot->prop, PROP_SKIP_SAVE);
- RNA_def_boolean(ot->srna, "toggle", 0, "Toggle", "");
+ prop = RNA_def_boolean(ot->srna, "toggle", 0, "Toggle", "");
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
void ED_object_toggle_modes(bContext *C, int mode)
{
+ /* Couldn't we use object_mode_op_string() here?
+ * Also, if several bits are set in mode, several toggle ops will be called, is this expected?
+ * If so, would be nice to explain why. ;) --mont29
+ */
if (mode & OB_MODE_SCULPT)
WM_operator_name_call(C, "SCULPT_OT_sculptmode_toggle", WM_OP_EXEC_REGION_WIN, NULL);
if (mode & OB_MODE_VERTEX_PAINT)
diff --git a/source/blender/editors/object/object_group.c b/source/blender/editors/object/object_group.c
index 1f52346222c..a9fd3ce1288 100644
--- a/source/blender/editors/object/object_group.c
+++ b/source/blender/editors/object/object_group.c
@@ -289,7 +289,7 @@ void GROUP_OT_objects_remove_all(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Remove From All Groups";
- ot->description = "Remove selected objects from all groups or a selected group";
+ ot->description = "Remove selected objects from all groups";
ot->idname = "GROUP_OT_objects_remove_all";
/* api callbacks */
@@ -335,7 +335,7 @@ void GROUP_OT_objects_remove(wmOperatorType *ot)
/* identifiers */
ot->name = "Remove From Group";
- ot->description = "Remove selected objects from all groups or a selected group";
+ ot->description = "Remove selected objects from a group";
ot->idname = "GROUP_OT_objects_remove";
/* api callbacks */
diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c
index 5b20489c9cb..7f97aa0b4c1 100644
--- a/source/blender/editors/object/object_hook.c
+++ b/source/blender/editors/object/object_hook.c
@@ -65,6 +65,7 @@
#include "ED_curve.h"
#include "ED_mesh.h"
#include "ED_screen.h"
+#include "ED_object.h"
#include "WM_types.h"
#include "WM_api.h"
@@ -569,7 +570,7 @@ void OBJECT_OT_hook_add_selob(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Hook to Selected Object";
- ot->description = "Hook selected vertices to the first selected Object";
+ ot->description = "Hook selected vertices to the first selected object";
ot->idname = "OBJECT_OT_hook_add_selob";
/* api callbacks */
@@ -603,7 +604,7 @@ void OBJECT_OT_hook_add_newob(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Hook to New Object";
- ot->description = "Hook selected vertices to the first selected Object";
+ ot->description = "Hook selected vertices to a newly created object";
ot->idname = "OBJECT_OT_hook_add_newob";
/* api callbacks */
@@ -701,26 +702,9 @@ static int object_hook_reset_exec(bContext *C, wmOperator *op)
BKE_report(op->reports, RPT_ERROR, "Could not find hook modifier");
return OPERATOR_CANCELLED;
}
-
- /* reset functionality */
- if (hmd->object) {
- bPoseChannel *pchan = BKE_pose_channel_find_name(hmd->object->pose, hmd->subtarget);
-
- if (hmd->subtarget[0] && pchan) {
- float imat[4][4], mat[4][4];
-
- /* calculate the world-space matrix for the pose-channel target first, then carry on as usual */
- mul_m4_m4m4(mat, hmd->object->obmat, pchan->pose_mat);
-
- invert_m4_m4(imat, mat);
- mul_m4_m4m4(hmd->parentinv, imat, ob->obmat);
- }
- else {
- invert_m4_m4(hmd->object->imat, hmd->object->obmat);
- mul_m4_m4m4(hmd->parentinv, hmd->object->imat, ob->obmat);
- }
- }
-
+
+ BKE_object_modifier_hook_reset(ob, hmd);
+
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index 03d51fcbe82..0ba84e27420 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -637,9 +637,9 @@ static int modifier_apply_obdata(ReportList *reports, Scene *scene, Object *ob,
cu = ob->data;
BKE_report(reports, RPT_INFO, "Applied modifier only changed CV points, not tessellated/bevel vertices");
- vertexCos = BKE_curve_vertexCos_get(cu, &cu->nurb, &numVerts);
+ vertexCos = BKE_curve_nurbs_vertexCos_get(&cu->nurb, &numVerts);
mti->deformVerts(md, ob, NULL, vertexCos, numVerts, 0);
- BK_curve_vertexCos_apply(cu, &cu->nurb, vertexCos);
+ BK_curve_nurbs_vertexCos_apply(&cu->nurb, vertexCos);
MEM_freeN(vertexCos);
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 52f51cfcf48..c70a70c47b2 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -55,6 +55,7 @@
#include "BLI_listbase.h"
#include "BLI_linklist.h"
#include "BLI_string.h"
+#include "BLI_kdtree.h"
#include "BLI_utildefines.h"
#include "BLF_translation.h"
@@ -584,12 +585,12 @@ EnumPropertyItem prop_make_parent_types[] = {
{PAR_PATH_CONST, "PATH_CONST", 0, "Path Constraint", ""},
{PAR_LATTICE, "LATTICE", 0, "Lattice Deform", ""},
{PAR_VERTEX, "VERTEX", 0, "Vertex", ""},
- {PAR_TRIA, "TRIA", 0, "Triangle", ""},
+ {PAR_VERTEX_TRI, "VERTEX_TRI", 0, "Vertex (Triangle)", ""},
{0, NULL, 0, NULL, NULL}
};
int ED_object_parent_set(ReportList *reports, Main *bmain, Scene *scene, Object *ob, Object *par,
- int partype, int xmirror, int keep_transform)
+ int partype, bool xmirror, bool keep_transform, const int vert_par[3])
{
bPoseChannel *pchan = NULL;
int pararm = ELEM4(partype, PAR_ARMATURE, PAR_ARMATURE_NAME, PAR_ARMATURE_ENVELOPE, PAR_ARMATURE_AUTO);
@@ -718,8 +719,17 @@ int ED_object_parent_set(ReportList *reports, Main *bmain, Scene *scene, Object
if (pchan->bone)
pchan->bone->flag |= BONE_RELATIVE_PARENTING;
}
- else
+ else if (partype == PAR_VERTEX) {
+ ob->partype = PARVERT1;
+ ob->par1 = vert_par[0];
+ }
+ else if (partype == PAR_VERTEX_TRI) {
+ ob->partype = PARVERT3;
+ copy_v3_v3_int(&ob->par1, vert_par);
+ }
+ else {
ob->partype = PAROBJECT; /* note, dna define, not operator property */
+ }
/* constraint */
if (partype == PAR_PATH_CONST) {
@@ -766,25 +776,83 @@ int ED_object_parent_set(ReportList *reports, Main *bmain, Scene *scene, Object
return 1;
}
+
+
+static void parent_set_vert_find(KDTree *tree, Object *child, int vert_par[3], bool is_tri)
+{
+ const float *co_find = child->obmat[3];
+ if (is_tri) {
+ KDTreeNearest nearest[3];
+ int tot;
+
+ tot = BLI_kdtree_find_nearest_n(tree, co_find, NULL, nearest, 3);
+ BLI_assert(tot == 3);
+
+ vert_par[0] = nearest[0].index;
+ vert_par[1] = nearest[1].index;
+ vert_par[2] = nearest[2].index;
+
+ BLI_assert(min_iii(UNPACK3(vert_par)) >= 0);
+ }
+ else {
+ vert_par[0] = BLI_kdtree_find_nearest(tree, co_find, NULL, NULL);
+ BLI_assert(vert_par[0] >= 0);
+ vert_par[1] = 0;
+ vert_par[2] = 0;
+ }
+}
+
static int parent_set_exec(bContext *C, wmOperator *op)
{
Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
Object *par = ED_object_active_context(C);
int partype = RNA_enum_get(op->ptr, "type");
- int xmirror = RNA_boolean_get(op->ptr, "xmirror");
- int keep_transform = RNA_boolean_get(op->ptr, "keep_transform");
- int ok = 1;
+ bool xmirror = RNA_boolean_get(op->ptr, "xmirror");
+ bool keep_transform = RNA_boolean_get(op->ptr, "keep_transform");
+ bool ok = true;
+
+ /* vertex parent (kdtree) */
+ const bool is_vert_par = ELEM(partype, PAR_VERTEX, PAR_VERTEX_TRI);
+ const bool is_tri = partype == PAR_VERTEX_TRI;
+ int tree_tot;
+ struct KDTree *tree = NULL;
+ int vert_par[3] = {0, 0, 0};
+ int *vert_par_p = is_vert_par ? vert_par : NULL;
+
+
+ if (is_vert_par) {
+ tree = BKE_object_as_kdtree(par, &tree_tot);
+ BLI_assert(tree != NULL);
+
+ if (tree_tot < (is_tri ? 3 : 1)) {
+ BKE_report(op->reports, RPT_ERROR, "Not enough vertices for vertex-parent");
+ ok = false;
+ goto cleanup;
+ }
+ }
+
+ /* Non vertex-parent */
CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
{
- if (!ED_object_parent_set(op->reports, bmain, scene, ob, par, partype, xmirror, keep_transform)) {
- ok = 0;
+ if (is_vert_par) {
+ parent_set_vert_find(tree, ob, vert_par, is_tri);
+ }
+
+ if (!ED_object_parent_set(op->reports, bmain, scene, ob, par, partype, xmirror, keep_transform, vert_par_p)) {
+ ok = false;
break;
}
}
CTX_DATA_END;
+
+cleanup:
+ if (is_vert_par) {
+ BLI_kdtree_free(tree);
+ }
+
if (!ok)
return OPERATOR_CANCELLED;
@@ -835,6 +903,12 @@ static int parent_set_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent
uiItemEnumO_ptr(layout, ot, NULL, 0, "type", PAR_LATTICE);
}
+ /* vertex parenting */
+ if (OB_TYPE_SUPPORT_PARVERT(ob->type)) {
+ uiItemEnumO_ptr(layout, ot, NULL, 0, "type", PAR_VERTEX);
+ uiItemEnumO_ptr(layout, ot, NULL, 0, "type", PAR_VERTEX_TRI);
+ }
+
uiPupMenuEnd(C, pup);
return OPERATOR_CANCELLED;
@@ -2137,6 +2211,8 @@ static int make_single_user_exec(bContext *C, wmOperator *op)
int flag = RNA_enum_get(op->ptr, "type"); /* 0==ALL, SELECTED==selected objecs */
bool copy_groups = false;
+ clear_id_newpoins();
+
if (RNA_boolean_get(op->ptr, "object"))
single_object_users(bmain, scene, v3d, flag, copy_groups);
@@ -2153,6 +2229,11 @@ static int make_single_user_exec(bContext *C, wmOperator *op)
if (RNA_boolean_get(op->ptr, "animation"))
single_object_action_users(scene, flag);
+ /* TODO(sergey): This should not be needed, however some tool still could rely
+ * on the fact, that id->newid is kept NULL by default.
+ * Need to make sure all the guys are learing newid before they're
+ * using it, not after.
+ */
clear_id_newpoins();
WM_event_add_notifier(C, NC_WINDOW, NULL);
diff --git a/source/blender/editors/object/object_shapekey.c b/source/blender/editors/object/object_shapekey.c
index ea96db514b2..6be4a2fed2c 100644
--- a/source/blender/editors/object/object_shapekey.c
+++ b/source/blender/editors/object/object_shapekey.c
@@ -290,6 +290,17 @@ static int shape_key_mode_poll(bContext *C)
return (ob && !ob->id.lib && data && !data->lib && ob->mode != OB_MODE_EDIT);
}
+static int shape_key_mode_exists_poll(bContext *C)
+{
+ Object *ob = ED_object_context(C);
+ ID *data = (ob) ? ob->data : NULL;
+
+ /* same as shape_key_mode_poll */
+ return (ob && !ob->id.lib && data && !data->lib && ob->mode != OB_MODE_EDIT) &&
+ /* check a keyblock exists */
+ (BKE_keyblock_from_object(ob) != NULL);
+}
+
static int shape_key_poll(bContext *C)
{
Object *ob = ED_object_context(C);
@@ -359,6 +370,7 @@ void OBJECT_OT_shape_key_remove(wmOperatorType *ot)
/* api callbacks */
ot->poll = shape_key_mode_poll;
+ ot->poll = shape_key_mode_exists_poll;
ot->exec = shape_key_remove_exec;
/* flags */
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index 366aa72f2b8..fef5ae392ea 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -50,6 +50,7 @@
#include "BKE_curve.h"
#include "BKE_depsgraph.h"
#include "BKE_main.h"
+#include "BKE_idcode.h"
#include "BKE_mball.h"
#include "BKE_mesh.h"
#include "BKE_object.h"
@@ -379,54 +380,45 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
float rsmat[3][3], obmat[3][3], iobmat[3][3], mat[4][4], scale;
- int change = 1;
+ bool change = true;
/* first check if we can execute */
CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
{
-
- if (ob->type == OB_MESH) {
- if (ID_REAL_USERS(ob->data) > 1) {
- BKE_report(reports, RPT_ERROR, "Cannot apply to a multi user mesh, doing nothing");
- change = 0;
- }
- }
- else if (ob->type == OB_ARMATURE) {
- if (ID_REAL_USERS(ob->data) > 1) {
- BKE_report(reports, RPT_ERROR, "Cannot apply to a multi user armature, doing nothing");
- change = 0;
+ if (ELEM6(ob->type, OB_MESH, OB_ARMATURE, OB_LATTICE, OB_MBALL, OB_CURVE, OB_SURF)) {
+ ID *obdata = ob->data;
+ if (ID_REAL_USERS(obdata) > 1) {
+ BKE_reportf(reports, RPT_ERROR,
+ "Cannot apply to a multi user: Object \"%s\", %s \"%s\", aborting",
+ ob->id.name + 2, BKE_idcode_to_name(GS(obdata->name)), obdata->name + 2);
+ change = false;
}
- }
- else if (ob->type == OB_LATTICE) {
- if (ID_REAL_USERS(ob->data) > 1) {
- BKE_report(reports, RPT_ERROR, "Cannot apply to a multi user lattice, doing nothing");
- change = 0;
- }
- }
- else if (ob->type == OB_MBALL) {
- if (ID_REAL_USERS(ob->data) > 1) {
- BKE_report(reports, RPT_ERROR, "Cannot apply to a multi user metaball, doing nothing");
- change = 0;
+
+ if (obdata->lib) {
+ BKE_reportf(reports, RPT_ERROR,
+ "Cannot apply to library data: Object \"%s\", %s \"%s\", aborting",
+ ob->id.name + 2, BKE_idcode_to_name(GS(obdata->name)), obdata->name + 2);
+ change = false;
}
}
- else if (ELEM(ob->type, OB_CURVE, OB_SURF)) {
- Curve *cu;
- if (ID_REAL_USERS(ob->data) > 1) {
- BKE_report(reports, RPT_ERROR, "Cannot apply to a multi user curve, doing nothing");
- change = 0;
- }
+ if (ELEM(ob->type, OB_CURVE, OB_SURF)) {
+ ID *obdata = ob->data;
+ Curve *cu;
cu = ob->data;
if (((ob->type == OB_CURVE) && !(cu->flag & CU_3D)) && (apply_rot || apply_loc)) {
- BKE_report(reports, RPT_ERROR,
- "Neither rotation nor location could be applied to a 2D curve, doing nothing");
- change = 0;
+ BKE_reportf(reports, RPT_ERROR,
+ "Rotation/Location can't apply to a 2D curve: Object \"%s\", %s \"%s\", aborting",
+ ob->id.name + 2, BKE_idcode_to_name(GS(obdata->name)), obdata->name + 2);
+ change = false;
}
if (cu->key) {
- BKE_report(reports, RPT_ERROR, "Cannot apply to a curve with vertex keys, doing nothing");
- change = 0;
+ BKE_reportf(reports, RPT_ERROR,
+ "Can't apply to a curve with shape-keys: Object \"%s\", %s \"%s\", aborting",
+ ob->id.name + 2, BKE_idcode_to_name(GS(obdata->name)), obdata->name + 2);
+ change = false;
}
}
}
@@ -435,7 +427,7 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
if (!change)
return OPERATOR_CANCELLED;
- change = 0;
+ change = false;
/* now execute */
CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
@@ -551,7 +543,7 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
}
}
else if (ob->type == OB_CAMERA) {
- MovieClip *clip = BKE_object_movieclip_get(scene, ob, FALSE);
+ MovieClip *clip = BKE_object_movieclip_get(scene, ob, false);
/* applying scale on camera actually scales clip's reconstruction.
* of there's clip assigned to camera nothing to do actually.
@@ -562,6 +554,21 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
if (apply_scale)
BKE_tracking_reconstruction_scale(&clip->tracking, ob->size);
}
+ else if (ob->type == OB_EMPTY) {
+ /* It's possible for empties too, even though they don't
+ * really have obdata, since we can simply apply the maximum
+ * scaling to the empty's drawsize.
+ *
+ * Core Assumptions:
+ * 1) Most scaled empties have uniform scaling
+ * (i.e. for visibility reasons), AND/OR
+ * 2) Preserving non-uniform scaling is not that important,
+ * and is something that many users would be willing to
+ * sacrifice for having an easy way to do this.
+ */
+ float max_scale = MAX3(ob->size[0], ob->size[1], ob->size[2]);
+ ob->empty_drawsize *= max_scale;
+ }
else {
continue;
}
@@ -585,12 +592,14 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA);
- change = 1;
+ change = true;
}
CTX_DATA_END;
- if (!change)
+ if (!change) {
+ BKE_report(reports, RPT_WARNING, "Objects have no data to transform");
return OPERATOR_CANCELLED;
+ }
WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
return OPERATOR_FINISHED;
@@ -703,7 +712,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
else {
/* get the view settings if 'around' isn't set and the view is available */
View3D *v3d = CTX_wm_view3d(C);
- copy_v3_v3(cursor, give_cursor(scene, v3d));
+ copy_v3_v3(cursor, ED_view3d_cursor3d_get(scene, v3d));
if (v3d && !RNA_struct_property_is_set(op->ptr, "center"))
around = v3d->around;
}
@@ -768,7 +777,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
}
if (ctx_ob_act) {
- BLI_rotatelist(&ctx_data_list, (LinkData *)ctx_ob_act);
+ BLI_rotatelist_first(&ctx_data_list, (LinkData *)ctx_ob_act);
}
for (tob = bmain->object.first; tob; tob = tob->id.next) {
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index 294b0632015..a6f7c4d5383 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -47,10 +47,12 @@
#include "DNA_scene_types.h"
#include "DNA_particle_types.h"
+#include "BLI_alloca.h"
#include "BLI_array.h"
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
+#include "BLI_linklist_stack.h"
#include "BLF_translation.h"
@@ -87,7 +89,6 @@ static void vgroup_remap_update_users(Object *ob, int *map);
static void vgroup_delete_edit_mode(Object *ob, bDeformGroup *defgroup);
static void vgroup_delete_object_mode(Object *ob, bDeformGroup *dg);
static void vgroup_delete_all(Object *ob);
-static bool ED_vgroup_give_parray(ID *id, MDeformVert ***dvert_arr, int *dvert_tot, const bool use_vert_sel);
static bool vertex_group_use_vert_sel(Object *ob)
{
@@ -208,7 +209,7 @@ void ED_vgroup_data_clamp_range(ID *id, const int total)
MDeformVert **dvert_arr;
int dvert_tot;
- if (ED_vgroup_give_parray(id, &dvert_arr, &dvert_tot, false)) {
+ if (ED_vgroup_parray_alloc(id, &dvert_arr, &dvert_tot, false)) {
int i;
for (i = 0; i < dvert_tot; i++) {
MDeformVert *dv = dvert_arr[i];
@@ -223,7 +224,7 @@ void ED_vgroup_data_clamp_range(ID *id, const int total)
}
}
-static bool ED_vgroup_give_parray(ID *id, MDeformVert ***dvert_arr, int *dvert_tot, const bool use_vert_sel)
+bool ED_vgroup_parray_alloc(ID *id, MDeformVert ***dvert_arr, int *dvert_tot, const bool use_vert_sel)
{
*dvert_tot = 0;
*dvert_arr = NULL;
@@ -326,8 +327,121 @@ static bool ED_vgroup_give_parray(ID *id, MDeformVert ***dvert_arr, int *dvert_t
return false;
}
+/**
+ * For use with tools that use ED_vgroup_parray_alloc with \a use_vert_sel == true.
+ * This finds the unselected mirror deform verts and copys the weights to them from the selected.
+ *
+ * \note \a dvert_array has mirrored weights filled in, incase cleanup operations are needed on both.
+ */
+void ED_vgroup_parray_mirror_sync(Object *ob,
+ MDeformVert **dvert_array, const int dvert_tot,
+ const bool *vgroup_validmap, const int vgroup_tot)
+{
+ BMEditMesh *em = BKE_editmesh_from_object(ob);
+ MDeformVert **dvert_array_all = NULL;
+ int dvert_tot_all;
+ int i;
+
+ /* get an array of all verts, not only selected */
+ if (ED_vgroup_parray_alloc(ob->data, &dvert_array_all, &dvert_tot_all, false) == false) {
+ BLI_assert(0);
+ return;
+ }
+ if (em) {
+ BM_mesh_elem_table_ensure(em->bm, BM_VERT);
+ }
+
+ for (i = 0; i < dvert_tot; i++) {
+ if (dvert_array[i] == NULL) {
+ /* its unselected, check if its mirror is */
+ int i_sel = ED_mesh_mirror_get_vert(ob, i);
+ if ((i_sel != -1) && (i_sel != i) && (dvert_array[i_sel])) {
+ /* we found a match! */
+ MDeformVert *dv_src = dvert_array[i_sel];
+ MDeformVert *dv_dst = dvert_array_all[i];
+
+ defvert_copy_subset(dv_dst, dv_src, vgroup_validmap, vgroup_tot);
+
+ dvert_array[i] = dvert_array_all[i];
+ }
+ }
+ }
+
+ MEM_freeN(dvert_array_all);
+}
+
+/**
+ * Fill in the pointers for mirror verts (as if all mirror verts were selected too).
+ *
+ * similar to #ED_vgroup_parray_mirror_sync but only fill in mirror points.
+ */
+void ED_vgroup_parray_mirror_assign(Object *ob,
+ MDeformVert **dvert_array, const int dvert_tot)
+{
+ BMEditMesh *em = BKE_editmesh_from_object(ob);
+ MDeformVert **dvert_array_all = NULL;
+ int dvert_tot_all;
+ int i;
+
+ /* get an array of all verts, not only selected */
+ if (ED_vgroup_parray_alloc(ob->data, &dvert_array_all, &dvert_tot_all, false) == false) {
+ BLI_assert(0);
+ return;
+ }
+ BLI_assert(dvert_tot == dvert_tot_all);
+ if (em) {
+ BM_mesh_elem_table_ensure(em->bm, BM_VERT);
+ }
+
+ for (i = 0; i < dvert_tot; i++) {
+ if (dvert_array[i] == NULL) {
+ /* its unselected, check if its mirror is */
+ int i_sel = ED_mesh_mirror_get_vert(ob, i);
+ if ((i_sel != -1) && (i_sel != i) && (dvert_array[i_sel])) {
+ /* we found a match! */
+ dvert_array[i] = dvert_array_all[i];
+ }
+ }
+ }
+
+ MEM_freeN(dvert_array_all);
+}
+
+void ED_vgroup_parray_remove_zero(MDeformVert **dvert_array, const int dvert_tot,
+ const bool *vgroup_validmap, const int vgroup_tot,
+ const float epsilon, const bool keep_single)
+{
+ MDeformVert *dv;
+ int i;
+
+ for (i = 0; i < dvert_tot; i++) {
+ int j;
+
+ /* in case its not selected */
+ if (!(dv = dvert_array[i])) {
+ continue;
+ }
+
+ j = dv->totweight;
+
+ while (j--) {
+ MDeformWeight *dw;
+
+ if (keep_single && dv->totweight == 1)
+ break;
+
+ dw = dv->dw + j;
+ if ((dw->def_nr < vgroup_tot) && vgroup_validmap[dw->def_nr]) {
+ if (dw->weight <= epsilon) {
+ defvert_remove_group(dv, dw);
+ }
+ }
+ }
+ }
+}
+
/* returns true if the id type supports weights */
-bool ED_vgroup_give_array(ID *id, MDeformVert **dvert_arr, int *dvert_tot)
+bool ED_vgroup_array_get(ID *id, MDeformVert **dvert_arr, int *dvert_tot)
{
if (id) {
switch (GS(id->name)) {
@@ -355,7 +469,7 @@ bool ED_vgroup_give_array(ID *id, MDeformVert **dvert_arr, int *dvert_tot)
}
/* matching index only */
-bool ED_vgroup_copy_array(Object *ob, Object *ob_from)
+bool ED_vgroup_array_copy(Object *ob, Object *ob_from)
{
MDeformVert **dvert_array_from, **dvf;
MDeformVert **dvert_array, **dv;
@@ -366,11 +480,11 @@ bool ED_vgroup_copy_array(Object *ob, Object *ob_from)
int defbase_tot = BLI_countlist(&ob->defbase);
bool new_vgroup = false;
- ED_vgroup_give_parray(ob_from->data, &dvert_array_from, &dvert_tot_from, false);
- ED_vgroup_give_parray(ob->data, &dvert_array, &dvert_tot, false);
+ ED_vgroup_parray_alloc(ob_from->data, &dvert_array_from, &dvert_tot_from, false);
+ ED_vgroup_parray_alloc(ob->data, &dvert_array, &dvert_tot, false);
if ((dvert_array == NULL) && (dvert_array_from != NULL) && ED_vgroup_data_create(ob->data)) {
- ED_vgroup_give_parray(ob->data, &dvert_array, &dvert_tot, false);
+ ED_vgroup_parray_alloc(ob->data, &dvert_array, &dvert_tot, false);
new_vgroup = true;
}
@@ -783,8 +897,8 @@ static bool ed_vgroup_transfer_weight(Object *ob_dst, Object *ob_src, bDeformGro
if (!me_dst->dvert) ED_vgroup_data_create(ob_dst->data);
/* Get vertex group arrays.*/
- ED_vgroup_give_parray(ob_src->data, &dv_array_src, &dv_tot_src, false);
- ED_vgroup_give_parray(ob_dst->data, &dv_array_dst, &dv_tot_dst, use_vert_sel);
+ ED_vgroup_parray_alloc(ob_src->data, &dv_array_src, &dv_tot_src, false);
+ ED_vgroup_parray_alloc(ob_dst->data, &dv_array_dst, &dv_tot_dst, use_vert_sel);
/* Get indexes of vertex groups.*/
index_src = BLI_findindex(&ob_src->defbase, dg_src);
@@ -1031,7 +1145,7 @@ static void ED_vgroup_nr_vert_add(Object *ob,
int tot;
/* get the vert */
- ED_vgroup_give_array(ob->data, &dvert, &tot);
+ ED_vgroup_array_get(ob->data, &dvert, &tot);
if (dvert == NULL)
return;
@@ -1117,7 +1231,7 @@ void ED_vgroup_vert_add(Object *ob, bDeformGroup *dg, int vertnum, float weight,
/* if there's no deform verts then create some,
*/
- if (ED_vgroup_give_array(ob->data, &dv, &tot) && dv == NULL)
+ if (ED_vgroup_array_get(ob->data, &dv, &tot) && dv == NULL)
ED_vgroup_data_create(ob->data);
/* call another function to do the work
@@ -1142,7 +1256,7 @@ void ED_vgroup_vert_remove(Object *ob, bDeformGroup *dg, int vertnum)
/* get the deform vertices corresponding to the
* vertnum
*/
- ED_vgroup_give_array(ob->data, &dvert, &tot);
+ ED_vgroup_array_get(ob->data, &dvert, &tot);
if (dvert) {
MDeformVert *dv = &dvert[vertnum];
@@ -1169,8 +1283,8 @@ static float get_vert_def_nr(Object *ob, const int def_nr, const int vertnum)
if (cd_dvert_offset != -1) {
BMVert *eve;
- EDBM_index_arrays_ensure(em, BM_VERT);
- eve = EDBM_vert_at_index(em, vertnum);
+ BM_mesh_elem_table_ensure(em->bm, BM_VERT);
+ eve = BM_vert_at_index(em->bm, vertnum);
dv = BM_ELEM_CD_GET_VOID_P(eve, cd_dvert_offset);
}
else {
@@ -1335,7 +1449,7 @@ static void vgroup_duplicate(Object *ob)
icdg = (ob->actdef - 1);
/* TODO, we might want to allow only copy selected verts here? - campbell */
- ED_vgroup_give_parray(ob->data, &dvert_array, &dvert_tot, false);
+ ED_vgroup_parray_alloc(ob->data, &dvert_array, &dvert_tot, false);
if (dvert_array) {
for (i = 0; i < dvert_tot; i++) {
@@ -1367,7 +1481,7 @@ bool *ED_vgroup_subset_from_select_type(Object *ob, eVGroupSelect subset_type, i
const int def_nr_active = ob->actdef - 1;
vgroup_validmap = MEM_mallocN(*r_vgroup_tot * sizeof(*vgroup_validmap), __func__);
memset(vgroup_validmap, false, *r_vgroup_tot * sizeof(*vgroup_validmap));
- if (def_nr_active < *r_vgroup_tot) {
+ if ((def_nr_active >= 0) && (def_nr_active < *r_vgroup_tot)) {
*r_subset_count = 1;
vgroup_validmap[def_nr_active] = true;
}
@@ -1419,6 +1533,20 @@ bool *ED_vgroup_subset_from_select_type(Object *ob, eVGroupSelect subset_type, i
return vgroup_validmap;
}
+/**
+ * store indices from the vgroup_validmap (faster lookups in some cases)
+ */
+void ED_vgroup_subset_to_index_array(const bool *vgroup_validmap, const int vgroup_tot,
+ int *r_vgroup_subset_map)
+{
+ int i, j = 0;
+ for (i = 0; i < vgroup_tot; i++) {
+ if (vgroup_validmap[i]) {
+ r_vgroup_subset_map[j++] = i;
+ }
+ }
+}
+
static void vgroup_normalize(Object *ob)
{
MDeformWeight *dw;
@@ -1432,7 +1560,7 @@ static void vgroup_normalize(Object *ob)
return;
}
- ED_vgroup_give_parray(ob->data, &dvert_array, &dvert_tot, use_vert_sel);
+ ED_vgroup_parray_alloc(ob->data, &dvert_array, &dvert_tot, use_vert_sel);
if (dvert_array) {
float weight_max = 0.0f;
@@ -1561,9 +1689,12 @@ static void getVerticalAndHorizontalChange(const float norm[3], float d, const f
/* A = Q - ((Q - P).N)N
* D = (a * x0 + b * y0 +c * z0 + d) */
float projA[3], projB[3];
+ float plane[4];
+
+ plane_from_point_normal_v3(plane, coord, norm);
- closest_to_plane_v3(projA, coord, norm, start);
- closest_to_plane_v3(projB, coord, norm, end);
+ closest_to_plane_v3(projA, plane, start);
+ closest_to_plane_v3(projB, plane, end);
/* (vertical and horizontal refer to the plane's y and xz respectively)
* vertical distance */
dists[index] = dot_v3v3(norm, end) + d;
@@ -1833,9 +1964,10 @@ static void vgroup_levels_subset(Object *ob, const bool *vgroup_validmap, const
MDeformVert *dv, **dvert_array = NULL;
int i, dvert_tot = 0;
- const int use_vert_sel = vertex_group_use_vert_sel(ob);
+ const bool use_vert_sel = vertex_group_use_vert_sel(ob);
+ const bool use_mirror = (ob->type == OB_MESH) ? (((Mesh *)ob->data)->editflag & ME_EDIT_MIRROR_X) != 0 : false;
- ED_vgroup_give_parray(ob->data, &dvert_array, &dvert_tot, use_vert_sel);
+ ED_vgroup_parray_alloc(ob->data, &dvert_array, &dvert_tot, use_vert_sel);
if (dvert_array) {
@@ -1860,11 +1992,20 @@ static void vgroup_levels_subset(Object *ob, const bool *vgroup_validmap, const
}
}
+ if (use_mirror && use_vert_sel) {
+ ED_vgroup_parray_mirror_sync(ob, dvert_array, dvert_tot,
+ vgroup_validmap, vgroup_tot);
+ }
+
MEM_freeN(dvert_array);
}
}
-static void vgroup_normalize_all(Object *ob, const bool lock_active)
+static void vgroup_normalize_all(Object *ob,
+ const bool *vgroup_validmap,
+ const int vgroup_tot,
+ const int subset_count,
+ const bool lock_active)
{
MDeformVert *dv, **dvert_array = NULL;
int i, dvert_tot = 0;
@@ -1872,11 +2013,11 @@ static void vgroup_normalize_all(Object *ob, const bool lock_active)
const int use_vert_sel = vertex_group_use_vert_sel(ob);
- if (lock_active && !BLI_findlink(&ob->defbase, def_nr)) {
+ if ((lock_active && !BLI_findlink(&ob->defbase, def_nr)) || subset_count == 0) {
return;
}
- ED_vgroup_give_parray(ob->data, &dvert_array, &dvert_tot, use_vert_sel);
+ ED_vgroup_parray_alloc(ob->data, &dvert_array, &dvert_tot, use_vert_sel);
if (dvert_array) {
const int defbase_tot = BLI_countlist(&ob->defbase);
@@ -1893,13 +2034,15 @@ static void vgroup_normalize_all(Object *ob, const bool lock_active)
/* in case its not selected */
if ((dv = dvert_array[i])) {
if (lock_flags) {
- defvert_normalize_lock_map(dv, lock_flags, defbase_tot);
+ defvert_normalize_lock_map(dv, vgroup_validmap, vgroup_tot,
+ lock_flags, defbase_tot);
}
else if (lock_active) {
- defvert_normalize_lock_single(dv, def_nr);
+ defvert_normalize_lock_single(dv, vgroup_validmap, vgroup_tot,
+ def_nr);
}
else {
- defvert_normalize(dv);
+ defvert_normalize_subset(dv, vgroup_validmap, vgroup_tot);
}
}
}
@@ -1963,9 +2106,10 @@ static void vgroup_invert_subset(Object *ob,
MDeformWeight *dw;
MDeformVert *dv, **dvert_array = NULL;
int i, dvert_tot = 0;
- const int use_vert_sel = vertex_group_use_vert_sel(ob);
+ const bool use_vert_sel = vertex_group_use_vert_sel(ob);
+ const bool use_mirror = (ob->type == OB_MESH) ? (((Mesh *)ob->data)->editflag & ME_EDIT_MIRROR_X) != 0 : false;
- ED_vgroup_give_parray(ob->data, &dvert_array, &dvert_tot, use_vert_sel);
+ ED_vgroup_parray_alloc(ob->data, &dvert_array, &dvert_tot, use_vert_sel);
if (dvert_array) {
for (i = 0; i < dvert_tot; i++) {
@@ -1989,149 +2133,153 @@ static void vgroup_invert_subset(Object *ob,
if (dw) {
dw->weight = 1.0f - dw->weight;
- if (auto_remove && dw->weight <= 0.0f) {
- defvert_remove_group(dv, dw);
- }
+ CLAMP(dw->weight, 0.0f, 1.0f);
}
}
}
}
+ if (use_mirror && use_vert_sel) {
+ ED_vgroup_parray_mirror_sync(ob, dvert_array, dvert_tot,
+ vgroup_validmap, vgroup_tot);
+
+ if (auto_remove) {
+ ED_vgroup_parray_remove_zero(dvert_array, dvert_tot,
+ vgroup_validmap, vgroup_tot,
+ 0.0f, false);
+ }
+ }
+
MEM_freeN(dvert_array);
}
}
-static void vgroup_blend(Object *ob, const float fac)
+static void vgroup_blend_subset(Object *ob, const bool *vgroup_validmap, const int vgroup_tot,
+ const int subset_count,
+ const float fac)
{
- MDeformVert *dv;
- MDeformWeight *dw;
+ const float ifac = 1.0f - fac;
+ MDeformVert **dvert_array = NULL;
int i, dvert_tot = 0;
- const int def_nr = ob->actdef - 1;
-
- BLI_assert(fac >= 0.0f && fac <= 1.0f);
-
- if (ob->type != OB_MESH) {
- return;
- }
+ int *vgroup_subset_map = BLI_array_alloca(vgroup_subset_map, subset_count);
+ float *vgroup_subset_weights = BLI_array_alloca(vgroup_subset_weights, subset_count);
+ const bool use_mirror = (ob->type == OB_MESH) ? (((Mesh *)ob->data)->editflag & ME_EDIT_MIRROR_X) != 0 : false;
- if (BLI_findlink(&ob->defbase, def_nr)) {
- const float ifac = 1.0f - fac;
+ BMEditMesh *em = BKE_editmesh_from_object(ob);
+ BMesh *bm = em ? em->bm : NULL;
+ Mesh *me = em ? NULL : ob->data;
- BMEditMesh *em = BKE_editmesh_from_object(ob);
- BMesh *bm = em ? em->bm : NULL;
- Mesh *me = em ? NULL : ob->data;
+ MeshElemMap *emap ;
+ int *emap_mem;
- /* bmesh only*/
- BMEdge *eed;
- BMVert *eve;
- BMIter iter;
+ BLI_SMALLSTACK_DECLARE(dv_stack, MDeformVert *);
- /* mesh only */
- MDeformVert *dvert_array = NULL;
+ ED_vgroup_subset_to_index_array(vgroup_validmap, vgroup_tot, vgroup_subset_map);
+ ED_vgroup_parray_alloc(ob->data, &dvert_array, &dvert_tot, false);
+ memset(vgroup_subset_weights, 0, sizeof(*vgroup_subset_weights) * subset_count);
+ if (bm) {
+ BM_mesh_elem_table_ensure(bm, BM_VERT);
- float *vg_weights;
- float *vg_users;
- int sel1, sel2;
+ emap = NULL;
+ emap_mem = NULL;
+ }
+ else {
+ BKE_mesh_vert_edge_map_create(&emap, &emap_mem,
+ me->medge, me->totvert, me->totedge);
+ }
- if (bm) {
- BM_mesh_elem_index_ensure(bm, BM_VERT);
- dvert_tot = bm->totvert;
- }
- else {
- dvert_tot = me->totvert;
- dvert_array = me->dvert;
- }
- vg_weights = MEM_callocN(sizeof(float) * dvert_tot, "vgroup_blend_f");
- vg_users = MEM_callocN(sizeof(int) * dvert_tot, "vgroup_blend_i");
+ for (i = 0; i < dvert_tot; i++) {
+ MDeformVert *dv;
+ int dv_stack_tot = 0;
+ int j;
+ /* in case its not selected */
if (bm) {
- const int cd_dvert_offset = CustomData_get_offset(&bm->vdata, CD_MDEFORMVERT);
-
- BM_ITER_MESH (eed, &iter, bm, BM_EDGES_OF_MESH) {
- sel1 = BM_elem_flag_test(eed->v1, BM_ELEM_SELECT);
- sel2 = BM_elem_flag_test(eed->v2, BM_ELEM_SELECT);
-
- if (sel1 != sel2) {
- int i1 /* , i2 */;
- /* i1 is always the selected one */
- if (sel1) {
- i1 = BM_elem_index_get(eed->v1);
- /* i2 = BM_elem_index_get(eed->v2); */ /* UNUSED */
- eve = eed->v2;
- }
- else {
- /* i2 = BM_elem_index_get(eed->v1); */ /* UNUSED */
- i1 = BM_elem_index_get(eed->v2);
- eve = eed->v1;
- }
-
- dv = BM_ELEM_CD_GET_VOID_P(eve, cd_dvert_offset);
- dw = defvert_find_index(dv, def_nr);
- if (dw) {
- vg_weights[i1] += dw->weight;
+ BMVert *v = BM_vert_at_index(bm, i);
+ if (BM_elem_flag_test(v, BM_ELEM_SELECT)) {
+ BMIter eiter;
+ BMEdge *e;
+ BM_ITER_ELEM (e, &eiter, v, BM_EDGES_OF_VERT) {
+ BMVert *v_other = BM_edge_other_vert(e, v);
+ const int i_other = BM_elem_index_get(v_other);
+
+ if (BM_elem_flag_test(v_other, BM_ELEM_SELECT) == 0) {
+ dv = dvert_array[i_other];
+ BLI_SMALLSTACK_PUSH(dv_stack, dv);
+ dv_stack_tot++;
}
- vg_users[i1]++;
}
}
-
- BM_ITER_MESH_INDEX (eve, &iter, bm, BM_VERTS_OF_MESH, i) {
- if (BM_elem_flag_test(eve, BM_ELEM_SELECT) && vg_users[i] > 0) {
- dv = BM_ELEM_CD_GET_VOID_P(eve, cd_dvert_offset);
-
- dw = defvert_verify_index(dv, def_nr);
- dw->weight = (fac * (vg_weights[i] / (float)vg_users[i])) + (ifac * dw->weight);
- /* in case of division errors */
- CLAMP(dw->weight, 0.0f, 1.0f);
+ }
+ else {
+ MVert *v = &me->mvert[i];
+ if (v->flag & SELECT) {
+ for (j = 0; j < emap[i].count; j++) {
+ MEdge *e = &me->medge[emap[i].indices[j]];
+ const int i_other = (e->v1 == i ? e->v2 : e->v1);
+ MVert *v_other = &me->mvert[i_other];
+
+ if ((v_other->flag & SELECT) == 0) {
+ dv = dvert_array[i_other];
+ BLI_SMALLSTACK_PUSH(dv_stack, dv);
+ dv_stack_tot++;
+ }
}
}
}
- else {
- MEdge *ed = me->medge;
- MVert *mv;
-
- for (i = 0; i < me->totedge; i++, ed++) {
- sel1 = me->mvert[ed->v1].flag & SELECT;
- sel2 = me->mvert[ed->v2].flag & SELECT;
- if (sel1 != sel2) {
- int i1, i2;
- /* i1 is always the selected one */
- if (sel1) {
- i1 = ed->v1;
- i2 = ed->v2;
- }
- else {
- i2 = ed->v1;
- i1 = ed->v2;
- }
+ if (dv_stack_tot) {
+ const float dv_mul = 1.0f / (float)dv_stack_tot;
- dv = &dvert_array[i2];
- dw = defvert_find_index(dv, def_nr);
- if (dw) {
- vg_weights[i1] += dw->weight;
- }
- vg_users[i1]++;
+ /* vgroup_subset_weights is zero'd at this point */
+ while ((dv = BLI_SMALLSTACK_POP(dv_stack))) {
+ for (j = 0; j < subset_count; j++) {
+ vgroup_subset_weights[j] += dv_mul * defvert_find_weight(dv, vgroup_subset_map[j]);
}
}
- mv = me->mvert;
- dv = dvert_array;
-
- for (i = 0; i < dvert_tot; i++, mv++, dv++) {
- if ((mv->flag & SELECT) && (vg_users[i] > 0)) {
- dw = defvert_verify_index(dv, def_nr);
- dw->weight = (fac * (vg_weights[i] / (float)vg_users[i])) + (ifac * dw->weight);
+ dv = dvert_array[i];
+ for (j = 0; j < subset_count; j++) {
+ MDeformWeight *dw;
+ if (vgroup_subset_weights[j] > 0.0f) {
+ dw = defvert_verify_index(dv, vgroup_subset_map[j]);
+ }
+ else {
+ dw = defvert_find_index(dv, vgroup_subset_map[j]);
+ }
- /* in case of division errors */
+ if (dw) {
+ dw->weight = (fac * vgroup_subset_weights[j]) + (ifac * dw->weight);
CLAMP(dw->weight, 0.0f, 1.0f);
}
+
+ /* zero for next iteration */
+ vgroup_subset_weights[j] = 0.0f;
}
}
+ }
- MEM_freeN(vg_weights);
- MEM_freeN(vg_users);
+ if (bm) {
+ /* pass */
+ }
+ else {
+ MEM_freeN(emap);
+ MEM_freeN(emap_mem);
+ }
+
+ if (dvert_array)
+ MEM_freeN(dvert_array);
+ BLI_SMALLSTACK_FREE(dv_stack);
+
+ /* not so efficient to get 'dvert_array' again just so unselected verts are NULL'd */
+ if (use_mirror) {
+ ED_vgroup_parray_alloc(ob->data, &dvert_array, &dvert_tot, true);
+ ED_vgroup_parray_mirror_sync(ob, dvert_array, dvert_tot,
+ vgroup_validmap, vgroup_tot);
+ if (dvert_array)
+ MEM_freeN(dvert_array);
}
}
@@ -2164,7 +2312,7 @@ static int vgroup_limit_total_subset(Object *ob,
const int use_vert_sel = vertex_group_use_vert_sel(ob);
int remove_tot = 0;
- ED_vgroup_give_parray(ob->data, &dvert_array, &dvert_tot, use_vert_sel);
+ ED_vgroup_parray_alloc(ob->data, &dvert_array, &dvert_tot, use_vert_sel);
if (dvert_array) {
int num_to_drop = 0;
@@ -2228,39 +2376,24 @@ static void vgroup_clean_subset(Object *ob, const bool *vgroup_validmap, const i
const float epsilon, const bool keep_single)
{
MDeformVert **dvert_array = NULL;
- int i, dvert_tot = 0;
- const int use_vert_sel = vertex_group_use_vert_sel(ob);
+ int dvert_tot = 0;
+ const bool use_vert_sel = vertex_group_use_vert_sel(ob);
+ const bool use_mirror = (ob->type == OB_MESH) ? (((Mesh *)ob->data)->editflag & ME_EDIT_MIRROR_X) != 0 : false;
- ED_vgroup_give_parray(ob->data, &dvert_array, &dvert_tot, use_vert_sel);
+ ED_vgroup_parray_alloc(ob->data, &dvert_array, &dvert_tot, use_vert_sel);
if (dvert_array) {
- MDeformVert *dv;
- MDeformWeight *dw;
-
- for (i = 0; i < dvert_tot; i++) {
- int j;
-
- /* in case its not selected */
- if (!(dv = dvert_array[i])) {
- continue;
- }
-
- j = dv->totweight;
-
- while (j--) {
-
- if (keep_single && dv->totweight == 1)
- break;
-
- dw = dv->dw + j;
- if ((dw->def_nr < vgroup_tot) && vgroup_validmap[dw->def_nr]) {
- if (dw->weight <= epsilon) {
- defvert_remove_group(dv, dw);
- }
- }
- }
+ if (use_mirror && use_vert_sel) {
+ /* correct behavior in this case isn't well defined
+ * for now assume both sides are mirrored correctly,
+ * so cleaning one side also cleans the other */
+ ED_vgroup_parray_mirror_assign(ob, dvert_array, dvert_tot);
}
+ ED_vgroup_parray_remove_zero(dvert_array, dvert_tot,
+ vgroup_validmap, vgroup_tot,
+ epsilon, keep_single);
+
MEM_freeN(dvert_array);
}
}
@@ -2585,7 +2718,7 @@ static void vgroup_delete_object_mode(Object *ob, bDeformGroup *dg)
assert(def_nr > -1);
- ED_vgroup_give_array(ob->data, &dvert_array, &dvert_tot);
+ ED_vgroup_array_get(ob->data, &dvert_array, &dvert_tot);
if (dvert_array) {
int i, j;
@@ -3347,8 +3480,13 @@ static int vertex_group_normalize_all_exec(bContext *C, wmOperator *op)
{
Object *ob = ED_object_context(C);
bool lock_active = RNA_boolean_get(op->ptr, "lock_active");
+ eVGroupSelect subset_type = RNA_enum_get(op->ptr, "group_select_mode");
- vgroup_normalize_all(ob, lock_active);
+ int subset_count, vgroup_tot;
+
+ const bool *vgroup_validmap = ED_vgroup_subset_from_select_type(ob, subset_type, &vgroup_tot, &subset_count);
+ vgroup_normalize_all(ob, vgroup_validmap, vgroup_tot, subset_count, lock_active);
+ MEM_freeN((void *)vgroup_validmap);
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
@@ -3372,6 +3510,7 @@ void OBJECT_OT_vertex_group_normalize_all(wmOperatorType *ot)
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+ vgroup_operator_subset_select_props(ot, false);
RNA_def_boolean(ot->srna, "lock_active", true, "Lock Active",
"Keep the values of the active group while normalizing others");
}
@@ -3504,8 +3643,13 @@ static int vertex_group_blend_exec(bContext *C, wmOperator *op)
{
Object *ob = ED_object_context(C);
float fac = RNA_float_get(op->ptr, "factor");
+ eVGroupSelect subset_type = RNA_enum_get(op->ptr, "group_select_mode");
+
+ int subset_count, vgroup_tot;
- vgroup_blend(ob, fac);
+ const bool *vgroup_validmap = ED_vgroup_subset_from_select_type(ob, subset_type, &vgroup_tot, &subset_count);
+ vgroup_blend_subset(ob, vgroup_validmap, vgroup_tot, subset_count, fac);
+ MEM_freeN((void *)vgroup_validmap);
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
@@ -3523,10 +3667,14 @@ static int vertex_group_blend_poll(bContext *C)
if (!(ob && !ob->id.lib && data && !data->lib))
return false;
+ if (ob->type != OB_MESH) {
+ return false;
+ }
+
if (BKE_object_is_in_editmode_vgroup(ob)) {
return true;
}
- else if ((ob->type == OB_MESH) && (ob->mode & OB_MODE_WEIGHT_PAINT)) {
+ else if (ob->mode & OB_MODE_WEIGHT_PAINT) {
if (ME_EDIT_PAINT_SEL_MODE(((Mesh *)data)) == SCE_SELECT_VERTEX) {
return true;
}
@@ -3557,6 +3705,7 @@ void OBJECT_OT_vertex_group_blend(wmOperatorType *ot)
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+ vgroup_operator_subset_select_props(ot, true);
prop = RNA_def_property(ot->srna, "factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_ui_text(prop, "Factor", "");
RNA_def_property_range(prop, 0.0f, 1.0f);
@@ -3628,7 +3777,7 @@ static int vertex_group_limit_total_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
else {
- /* note, would normally return cancelled, except we want the redo
+ /* note, would normally return canceled, except we want the redo
* UI to show up for users to change */
return OPERATOR_FINISHED;
}
@@ -3746,7 +3895,7 @@ static int vertex_group_copy_to_selected_exec(bContext *C, wmOperator *op)
CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
{
if (obact != ob) {
- if (ED_vgroup_copy_array(ob, obact)) change++;
+ if (ED_vgroup_array_copy(ob, obact)) change++;
else fail++;
}
}
@@ -4040,7 +4189,7 @@ static int vgroup_do_remap(Object *ob, const char *name_array, wmOperator *op)
else {
int dvert_tot = 0;
- ED_vgroup_give_array(ob->data, &dvert, &dvert_tot);
+ ED_vgroup_array_get(ob->data, &dvert, &dvert_tot);
/*create as necessary*/
if (dvert) {
diff --git a/source/blender/editors/physics/dynamicpaint_ops.c b/source/blender/editors/physics/dynamicpaint_ops.c
index 5cb74e1ca09..568802dd7a0 100644
--- a/source/blender/editors/physics/dynamicpaint_ops.c
+++ b/source/blender/editors/physics/dynamicpaint_ops.c
@@ -18,6 +18,10 @@
* ***** END GPL LICENSE BLOCK *****
*/
+/** \file blender/editors/physics/dynamicpaint_ops.c
+ * \ingroup edphys
+ */
+
#include <math.h>
#include <stdio.h>
#include <string.h>
@@ -384,7 +388,7 @@ static int dynamicPaint_initBake(struct bContext *C, struct wmOperator *op)
/* Clear bake */
canvas->flags &= ~MOD_DPAINT_BAKING;
if (!G.background) {
- WM_cursor_restore(win);
+ WM_cursor_modal_restore(win);
}
dynamicPaint_freeSurfaceData(surface);
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index d6bb394ff79..b0e19d04e35 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -69,6 +69,7 @@
#include "BIF_gl.h"
#include "BIF_glutil.h"
+#include "ED_object.h"
#include "ED_physics.h"
#include "ED_mesh.h"
#include "ED_particle.h"
@@ -2452,7 +2453,7 @@ static int remove_doubles_exec(bContext *C, wmOperator *op)
copy_v3_v3(co, point->keys->co);
mul_m4_v3(mat, co);
- totn= BLI_kdtree_find_n_nearest(tree, 10, co, NULL, nearest);
+ totn = BLI_kdtree_find_nearest_n(tree, co, NULL, nearest, 10);
for (n=0; n<totn; n++) {
/* this needs a custom threshold still */
@@ -3458,7 +3459,7 @@ static int brush_add(PEData *data, short number)
float maxd, totw=0.0, weight[3];
psys_particle_on_dm(psmd->dm, psys->part->from, pa->num, pa->num_dmcache, pa->fuv, pa->foffset, co1, 0, 0, 0, 0, 0);
- maxw= BLI_kdtree_find_n_nearest(tree, 3, co1, NULL, ptn);
+ maxw = BLI_kdtree_find_nearest_n(tree, co1, NULL, ptn, 3);
maxd= ptn[maxw-1].dist;
@@ -4345,23 +4346,36 @@ static void PE_create_particle_edit(Scene *scene, Object *ob, PointCache *cache,
static int particle_edit_toggle_poll(bContext *C)
{
- Scene *scene= CTX_data_scene(C);
- Object *ob= CTX_data_active_object(C);
+ Object *ob = CTX_data_active_object(C);
- if (!scene || !ob || ob->id.lib)
+ if (ob == NULL || ob->type != OB_MESH)
return 0;
-
- return (ob->particlesystem.first || modifiers_findByType(ob, eModifierType_Cloth) || modifiers_findByType(ob, eModifierType_Softbody));
+ if (!ob->data || ((ID *)ob->data)->lib)
+ return 0;
+ if (CTX_data_edit_object(C))
+ return 0;
+
+ return (ob->particlesystem.first ||
+ modifiers_findByType(ob, eModifierType_Cloth) ||
+ modifiers_findByType(ob, eModifierType_Softbody));
}
-static int particle_edit_toggle_exec(bContext *C, wmOperator *UNUSED(op))
+static int particle_edit_toggle_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
- Object *ob= CTX_data_active_object(C);
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = CTX_data_active_object(C);
+ const int mode_flag = OB_MODE_PARTICLE_EDIT;
+ const bool is_mode_set = (ob->mode & mode_flag) != 0;
+
+ if (!is_mode_set) {
+ if (!ED_object_mode_compat_set(C, ob, mode_flag, op->reports)) {
+ return OPERATOR_CANCELLED;
+ }
+ }
- if (!(ob->mode & OB_MODE_PARTICLE_EDIT)) {
+ if (!is_mode_set) {
PTCacheEdit *edit;
- ob->mode |= OB_MODE_PARTICLE_EDIT;
+ ob->mode |= mode_flag;
edit= PE_create_current(scene, ob);
/* mesh may have changed since last entering editmode.
@@ -4373,7 +4387,7 @@ static int particle_edit_toggle_exec(bContext *C, wmOperator *UNUSED(op))
WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_PARTICLE, NULL);
}
else {
- ob->mode &= ~OB_MODE_PARTICLE_EDIT;
+ ob->mode &= ~mode_flag;
toggle_particle_cursor(C, 0);
WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, NULL);
}
@@ -4407,7 +4421,7 @@ static int clear_edited_exec(bContext *C, wmOperator *UNUSED(op))
ParticleSystem *psys = psys_get_current(ob);
if (psys->edit) {
- if (psys->edit->edited || 1) { // XXX okee("Lose changes done in particle mode?"))
+ if (psys->edit->edited || 1) {
PE_free_ptcache_edit(psys->edit);
psys->edit = NULL;
@@ -4433,6 +4447,11 @@ static int clear_edited_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_FINISHED;
}
+static int clear_edited_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
+{
+ return WM_operator_confirm_message(C, op, "Lose changes done in particle mode? (no undo)");
+}
+
void PARTICLE_OT_edited_clear(wmOperatorType *ot)
{
/* identifiers */
@@ -4443,6 +4462,7 @@ void PARTICLE_OT_edited_clear(wmOperatorType *ot)
/* api callbacks */
ot->exec = clear_edited_exec;
ot->poll = particle_edit_toggle_poll;
+ ot->invoke = clear_edited_invoke;
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
diff --git a/source/blender/editors/physics/physics_pointcache.c b/source/blender/editors/physics/physics_pointcache.c
index b9742c9968f..515ac330cc9 100644
--- a/source/blender/editors/physics/physics_pointcache.c
+++ b/source/blender/editors/physics/physics_pointcache.c
@@ -126,7 +126,7 @@ static int ptcache_bake_all_exec(bContext *C, wmOperator *op)
* the job system soon anyways. */
if (win) {
baker.progressbar = (void (*)(void *, int))WM_cursor_time;
- baker.progressend = (void (*)(void *))WM_cursor_restore;
+ baker.progressend = (void (*)(void *))WM_cursor_modal_restore;
baker.progresscontext = win;
}
else {
@@ -230,7 +230,7 @@ static int ptcache_bake_exec(bContext *C, wmOperator *op)
* the job system soon anyways. */
if (win) {
baker.progressbar = (void (*)(void *, int))WM_cursor_time;
- baker.progressend = (void (*)(void *))WM_cursor_restore;
+ baker.progressend = (void (*)(void *))WM_cursor_modal_restore;
baker.progresscontext = win;
}
else {
diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c
index 3a6bd05df0b..df8d5ec4e84 100644
--- a/source/blender/editors/render/render_internal.c
+++ b/source/blender/editors/render/render_internal.c
@@ -164,7 +164,7 @@ void image_buffer_rect_update(Scene *scene, RenderResult *rr, ImBuf *ibuf, volat
IMB_partial_display_buffer_update(ibuf, rectf, NULL, rr->rectx, rxmin, rymin,
&scene->view_settings, &scene->display_settings,
- rxmin, rymin, rxmin + xmax, rymin + ymax, TRUE);
+ rxmin, rymin, rxmin + xmax, rymin + ymax, true);
}
/* ****************************** render invoking ***************** */
@@ -212,7 +212,7 @@ static int screen_render_exec(bContext *C, wmOperator *op)
Image *ima;
View3D *v3d = CTX_wm_view3d(C);
Main *mainp = CTX_data_main(C);
- unsigned int lay;
+ unsigned int lay_override;
const short is_animation = RNA_boolean_get(op->ptr, "animation");
const short is_write_still = RNA_boolean_get(op->ptr, "write_still");
struct Object *camera_override = v3d ? V3D_CAMERA_LOCAL(v3d) : NULL;
@@ -226,7 +226,7 @@ static int screen_render_exec(bContext *C, wmOperator *op)
}
re = RE_NewRender(scene->id.name);
- lay = (v3d) ? v3d->lay : scene->lay;
+ lay_override = (v3d && v3d->lay != scene->lay) ? v3d->lay : 0;
G.is_break = FALSE;
RE_test_break_cb(re, NULL, render_break);
@@ -244,9 +244,9 @@ static int screen_render_exec(bContext *C, wmOperator *op)
RE_SetReports(re, op->reports);
if (is_animation)
- RE_BlenderAnim(re, mainp, scene, camera_override, lay, scene->r.sfra, scene->r.efra, scene->r.frame_step);
+ RE_BlenderAnim(re, mainp, scene, camera_override, lay_override, scene->r.sfra, scene->r.efra, scene->r.frame_step);
else
- RE_BlenderFrame(re, mainp, scene, srl, camera_override, lay, scene->r.cfra, is_write_still);
+ RE_BlenderFrame(re, mainp, scene, srl, camera_override, lay_override, scene->r.cfra, is_write_still);
RE_SetReports(re, NULL);
@@ -265,11 +265,12 @@ typedef struct RenderJob {
wmWindow *win;
SceneRenderLayer *srl;
struct Object *camera_override;
- int lay;
+ int lay_override;
bool v3d_override;
short anim, write_still;
Image *image;
ImageUser iuser;
+ bool image_outdated;
short *stop;
short *do_update;
float *progress;
@@ -409,9 +410,19 @@ static void image_rect_update(void *rjv, RenderResult *rr, volatile rcti *renrec
void *lock;
/* only update if we are displaying the slot being rendered */
- if (ima->render_slot != ima->last_render_slot)
+ if (ima->render_slot != ima->last_render_slot) {
+ rj->image_outdated = true;
return;
+ }
+ else if (rj->image_outdated) {
+ /* update entire render */
+ rj->image_outdated = false;
+ BKE_image_signal(ima, NULL, IMA_SIGNAL_COLORMANAGE);
+ *(rj->do_update) = TRUE;
+ return;
+ }
+ /* update part of render */
ibuf = BKE_image_acquire_ibuf(ima, &rj->iuser, &lock);
if (ibuf) {
image_buffer_rect_update(rj->scene, rr, ibuf, renrect);
@@ -433,9 +444,9 @@ static void render_startjob(void *rjv, short *stop, short *do_update, float *pro
RE_SetReports(rj->re, rj->reports);
if (rj->anim)
- RE_BlenderAnim(rj->re, rj->main, rj->scene, rj->camera_override, rj->lay, rj->scene->r.sfra, rj->scene->r.efra, rj->scene->r.frame_step);
+ RE_BlenderAnim(rj->re, rj->main, rj->scene, rj->camera_override, rj->lay_override, rj->scene->r.sfra, rj->scene->r.efra, rj->scene->r.frame_step);
else
- RE_BlenderFrame(rj->re, rj->main, rj->scene, rj->srl, rj->camera_override, rj->lay, rj->scene->r.cfra, rj->write_still);
+ RE_BlenderFrame(rj->re, rj->main, rj->scene, rj->srl, rj->camera_override, rj->lay_override, rj->scene->r.cfra, rj->write_still);
RE_SetReports(rj->re, NULL);
}
@@ -491,7 +502,9 @@ static void render_endjob(void *rjv)
* engine API, so lets use simple and robust way for now
* - sergey -
*/
- if (rj->scene->r.layers.first != rj->scene->r.layers.last) {
+ if (rj->scene->r.layers.first != rj->scene->r.layers.last ||
+ rj->image_outdated)
+ {
void *lock;
Image *ima = rj->image;
ImBuf *ibuf = BKE_image_acquire_ibuf(ima, &rj->iuser, &lock);
@@ -551,6 +564,17 @@ static int screen_render_modal(bContext *C, wmOperator *op, const wmEvent *event
return OPERATOR_PASS_THROUGH;
}
+static int screen_render_cancel(bContext *C, wmOperator *op)
+{
+ wmWindowManager *wm = CTX_wm_manager(C);
+ Scene *scene = (Scene *) op->customdata;
+
+ /* kill on cancel, because job is using op->reports */
+ WM_jobs_kill_type(wm, scene, WM_JOB_TYPE_RENDER);
+
+ return OPERATOR_CANCELLED;
+}
+
/* using context, starts job */
static int screen_render_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
@@ -558,14 +582,15 @@ static int screen_render_invoke(bContext *C, wmOperator *op, const wmEvent *even
Main *mainp;
Scene *scene = CTX_data_scene(C);
SceneRenderLayer *srl = NULL;
- View3D *v3d = CTX_wm_view3d(C);
Render *re;
wmJob *wm_job;
RenderJob *rj;
Image *ima;
int jobflag;
- const short is_animation = RNA_boolean_get(op->ptr, "animation");
- const short is_write_still = RNA_boolean_get(op->ptr, "write_still");
+ const bool is_animation = RNA_boolean_get(op->ptr, "animation");
+ const bool is_write_still = RNA_boolean_get(op->ptr, "write_still");
+ const bool use_viewport = RNA_boolean_get(op->ptr, "use_viewport");
+ View3D *v3d = use_viewport ? CTX_wm_view3d(C) : NULL;
struct Object *camera_override = v3d ? V3D_CAMERA_LOCAL(v3d) : NULL;
const char *name;
Object *active_object = CTX_data_active_object(C);
@@ -638,7 +663,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, const wmEvent *even
rj->win = CTX_wm_window(C);
rj->srl = srl;
rj->camera_override = camera_override;
- rj->lay = scene->lay;
+ rj->lay_override = 0;
rj->anim = is_animation;
rj->write_still = is_write_still && !is_animation;
rj->iuser.scene = scene;
@@ -646,15 +671,15 @@ static int screen_render_invoke(bContext *C, wmOperator *op, const wmEvent *even
rj->reports = op->reports;
if (v3d) {
- if (rj->lay != v3d->lay) {
- rj->lay = v3d->lay;
+ if (scene->lay != v3d->lay) {
+ rj->lay_override = v3d->lay;
rj->v3d_override = true;
}
else if (camera_override && camera_override != scene->camera)
rj->v3d_override = true;
if (v3d->localvd)
- rj->lay |= v3d->localvd->lay;
+ rj->lay_override = scene->lay | v3d->localvd->lay;
}
/* setup job */
@@ -718,12 +743,14 @@ void RENDER_OT_render(wmOperatorType *ot)
/* api callbacks */
ot->invoke = screen_render_invoke;
ot->modal = screen_render_modal;
+ ot->cancel = screen_render_cancel;
ot->exec = screen_render_exec;
/*ot->poll = ED_operator_screenactive;*/ /* this isn't needed, causes failer in background mode */
RNA_def_boolean(ot->srna, "animation", 0, "Animation", "Render files from the animation range of this scene");
RNA_def_boolean(ot->srna, "write_still", 0, "Write Image", "Save rendered the image to the output path (used only when animation is disabled)");
+ RNA_def_boolean(ot->srna, "use_viewport", 0, "Use 3D Viewport", "When inside a 3D viewport, use layers and camera of the viewport");
prop = RNA_def_string(ot->srna, "layer", "", RE_MAXNAME, "Render Layer", "Single render layer to re-render (used only when animation is disabled)");
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
prop = RNA_def_string(ot->srna, "scene", "", MAX_ID_NAME - 2, "Scene", "Scene to render, current scene if not specified");
@@ -804,6 +831,11 @@ static bool render_view3d_get_rects(ARegion *ar, View3D *v3d, RegionView3D *rv3d
return true;
}
+static bool render_view3d_is_valid(RenderPreview *rp)
+{
+ return (rp->rv3d->render_engine != NULL);
+}
+
/* called by renderer, checks job value */
static int render_view3d_break(void *rpv)
{
@@ -813,8 +845,9 @@ static int render_view3d_break(void *rpv)
return 1;
/* during render, rv3d->engine can get freed */
- if (rp->rv3d->render_engine == NULL)
+ if (render_view3d_is_valid(rp) == false) {
*rp->stop = 1;
+ }
return *(rp->stop);
}
@@ -928,8 +961,11 @@ static void render_view3d_startjob(void *customdata, short *stop, short *do_upda
RE_Database_Preprocess(re);
/* conversion not completed, need to do it again */
- if (!rstats->convertdone)
- rp->engine->job_update_flag |= PR_UPDATE_DATABASE;
+ if (!rstats->convertdone) {
+ if (render_view3d_is_valid(rp)) {
+ rp->engine->job_update_flag |= PR_UPDATE_DATABASE;
+ }
+ }
// printf("dbase update\n");
}
@@ -1116,7 +1152,7 @@ void render_view3d_draw(RenderEngine *engine, const bContext *C)
/* Try using GLSL display transform. */
if (force_fallback == false) {
- if (IMB_colormanagement_setup_glsl_draw(NULL, &scene->display_settings, TRUE)) {
+ if (IMB_colormanagement_setup_glsl_draw(&scene->view_settings, &scene->display_settings, true)) {
glEnable(GL_BLEND);
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
glaDrawPixelsTex(rres.xof, rres.yof, rres.rectx, rres.recty, GL_RGBA, GL_FLOAT,
@@ -1134,7 +1170,7 @@ void render_view3d_draw(RenderEngine *engine, const bContext *C)
"render_view3d_draw");
IMB_colormanagement_buffer_make_display_space(rres.rectf, display_buffer, rres.rectx, rres.recty,
- 4, dither, NULL, &scene->display_settings);
+ 4, dither, &scene->view_settings, &scene->display_settings);
glEnable(GL_BLEND);
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c
index e21e889d99d..21074bdc47c 100644
--- a/source/blender/editors/render/render_opengl.c
+++ b/source/blender/editors/render/render_opengl.c
@@ -469,7 +469,7 @@ static void screen_opengl_render_end(bContext *C, OGLRender *oglrender)
WM_event_remove_timer(oglrender->wm, oglrender->win, oglrender->timer);
}
- WM_cursor_restore(oglrender->win);
+ WM_cursor_modal_restore(oglrender->win);
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_RESULT, oglrender->scene);
@@ -517,7 +517,7 @@ static int screen_opengl_render_anim_initialize(bContext *C, wmOperator *op)
return 1;
}
-static int screen_opengl_render_anim_step(bContext *C, wmOperator *op)
+static bool screen_opengl_render_anim_step(bContext *C, wmOperator *op)
{
Main *bmain = CTX_data_main(C);
OGLRender *oglrender = op->customdata;
@@ -549,12 +549,9 @@ static int screen_opengl_render_anim_step(bContext *C, wmOperator *op)
BKE_makepicstring(name, scene->r.pic, oglrender->bmain->name, scene->r.cfra, &scene->r.im_format, scene->r.scemode & R_EXTENSION, TRUE);
if ((scene->r.mode & R_NO_OVERWRITE) && BLI_exists(name)) {
- printf("skipping existing frame \"%s\"\n", name);
-
- /* go to next frame */
- oglrender->nfra += scene->r.frame_step;
-
- return 1;
+ BKE_reportf(op->reports, RPT_INFO, "Skipping existing frame \"%s\"", name);
+ ok = true;
+ goto finally;
}
}
@@ -591,7 +588,7 @@ static int screen_opengl_render_anim_step(bContext *C, wmOperator *op)
ibuf_save = ibuf;
if (is_movie || !BKE_imtype_requires_linear_float(scene->r.im_format.imtype)) {
- ibuf_save = IMB_colormanagement_imbuf_for_write(ibuf, TRUE, TRUE, &scene->view_settings,
+ ibuf_save = IMB_colormanagement_imbuf_for_write(ibuf, true, true, &scene->view_settings,
&scene->display_settings, &scene->r.im_format);
needs_free = TRUE;
@@ -656,6 +653,9 @@ static int screen_opengl_render_anim_step(bContext *C, wmOperator *op)
/* movie stats prints have no line break */
printf("\n");
+
+finally: /* Step the frame and bail early if needed */
+
/* go to next frame */
oglrender->nfra += scene->r.frame_step;
@@ -673,7 +673,7 @@ static int screen_opengl_render_modal(bContext *C, wmOperator *op, const wmEvent
{
OGLRender *oglrender = op->customdata;
int anim = RNA_boolean_get(op->ptr, "animation");
- int ret;
+ bool ret;
switch (event->type) {
case ESCKEY:
@@ -698,11 +698,12 @@ static int screen_opengl_render_modal(bContext *C, wmOperator *op, const wmEvent
screen_opengl_render_end(C, op->customdata);
return OPERATOR_FINISHED;
}
- else
+ else {
ret = screen_opengl_render_anim_step(C, op);
+ }
/* stop at the end or on error */
- if (ret == 0) {
+ if (ret == false) {
return OPERATOR_FINISHED;
}
@@ -750,7 +751,7 @@ static int screen_opengl_render_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
else {
- int ret = 1;
+ bool ret = true;
if (!screen_opengl_render_anim_initialize(C, op))
return OPERATOR_CANCELLED;
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c
index 4bd8a7d426a..2bf8a48edc4 100644
--- a/source/blender/editors/render/render_preview.c
+++ b/source/blender/editors/render/render_preview.c
@@ -587,6 +587,7 @@ void ED_preview_draw(const bContext *C, void *idp, void *parentp, void *slotp, r
ID *parent = (ID *)parentp;
MTex *slot = (MTex *)slotp;
SpaceButs *sbuts = sa->spacedata.first;
+ ShaderPreview *sp = WM_jobs_customdata(wm, sa);
rcti newrect;
int ok;
int newx = BLI_rcti_size_x(rect);
@@ -608,9 +609,11 @@ void ED_preview_draw(const bContext *C, void *idp, void *parentp, void *slotp, r
*rect = newrect;
/* start a new preview render job if signalled through sbuts->preview,
- * or if no render result was found and no preview render job is running */
+ * if no render result was found and no preview render job is running,
+ * or if the job is running and the size of preview changed */
if ((sbuts->spacetype == SPACE_BUTS && sbuts->preview) ||
- (!ok && !WM_jobs_test(wm, sa, WM_JOB_TYPE_RENDER_PREVIEW)))
+ (!ok && !WM_jobs_test(wm, sa, WM_JOB_TYPE_RENDER_PREVIEW)) ||
+ (sp && (ABS(sp->sizex - newx) >= 2 || ABS(sp->sizey - newy) > 2)))
{
sbuts->preview = 0;
ED_preview_shader_job(C, sa, id, parent, slot, newx, newy, PR_BUTS_RENDER);
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index 58c244228ed..3ef1f0db647 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -588,6 +588,20 @@ void SCENE_OT_render_layer_remove(wmOperatorType *ot)
#ifdef WITH_FREESTYLE
+static bool freestyle_linestyle_check_report(FreestyleLineSet *lineset, ReportList *reports)
+{
+ if (!lineset) {
+ BKE_report(reports, RPT_ERROR, "No active lineset and associated line style to add the modifier to");
+ return false;
+ }
+ if (!lineset->linestyle) {
+ BKE_report(reports, RPT_ERROR, "The active lineset does not have a line style (indicating data corruption)");
+ return false;
+ }
+
+ return true;
+}
+
static int freestyle_active_module_poll(bContext *C)
{
PointerRNA ptr = CTX_data_pointer_get_type(C, "freestyle_module", &RNA_FreestyleModuleSettings);
@@ -725,6 +739,10 @@ static int freestyle_active_lineset_poll(bContext *C)
Scene *scene = CTX_data_scene(C);
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
+ if (!srl) {
+ return FALSE;
+ }
+
return BKE_freestyle_lineset_get_active(&srl->freestyleConfig) != NULL;
}
@@ -860,8 +878,13 @@ static int freestyle_linestyle_new_exec(bContext *C, wmOperator *op)
BKE_report(op->reports, RPT_ERROR, "No active lineset to add a new line style to");
return OPERATOR_CANCELLED;
}
- lineset->linestyle->id.us--;
- lineset->linestyle = BKE_copy_linestyle(lineset->linestyle);
+ if (lineset->linestyle) {
+ lineset->linestyle->id.us--;
+ lineset->linestyle = BKE_copy_linestyle(lineset->linestyle);
+ }
+ else {
+ lineset->linestyle = BKE_new_linestyle("LineStyle", NULL);
+ }
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
@@ -890,10 +913,10 @@ static int freestyle_color_modifier_add_exec(bContext *C, wmOperator *op)
FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(&srl->freestyleConfig);
int type = RNA_enum_get(op->ptr, "type");
- if (!lineset) {
- BKE_report(op->reports, RPT_ERROR, "No active lineset and associated line style to add the modifier to");
+ if (!freestyle_linestyle_check_report(lineset, op->reports)) {
return OPERATOR_CANCELLED;
}
+
if (BKE_add_linestyle_color_modifier(lineset->linestyle, type) == NULL) {
BKE_report(op->reports, RPT_ERROR, "Unknown line color modifier type");
return OPERATOR_CANCELLED;
@@ -929,10 +952,10 @@ static int freestyle_alpha_modifier_add_exec(bContext *C, wmOperator *op)
FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(&srl->freestyleConfig);
int type = RNA_enum_get(op->ptr, "type");
- if (!lineset) {
- BKE_report(op->reports, RPT_ERROR, "No active lineset and associated line style to add the modifier to");
+ if (!freestyle_linestyle_check_report(lineset, op->reports)) {
return OPERATOR_CANCELLED;
}
+
if (BKE_add_linestyle_alpha_modifier(lineset->linestyle, type) == NULL) {
BKE_report(op->reports, RPT_ERROR, "Unknown alpha transparency modifier type");
return OPERATOR_CANCELLED;
@@ -968,10 +991,10 @@ static int freestyle_thickness_modifier_add_exec(bContext *C, wmOperator *op)
FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(&srl->freestyleConfig);
int type = RNA_enum_get(op->ptr, "type");
- if (!lineset) {
- BKE_report(op->reports, RPT_ERROR, "No active lineset and associated line style to add the modifier to");
+ if (!freestyle_linestyle_check_report(lineset, op->reports)) {
return OPERATOR_CANCELLED;
}
+
if (BKE_add_linestyle_thickness_modifier(lineset->linestyle, type) == NULL) {
BKE_report(op->reports, RPT_ERROR, "Unknown line thickness modifier type");
return OPERATOR_CANCELLED;
@@ -1007,10 +1030,10 @@ static int freestyle_geometry_modifier_add_exec(bContext *C, wmOperator *op)
FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(&srl->freestyleConfig);
int type = RNA_enum_get(op->ptr, "type");
- if (!lineset) {
- BKE_report(op->reports, RPT_ERROR, "No active lineset and associated line style to add the modifier to");
+ if (!freestyle_linestyle_check_report(lineset, op->reports)) {
return OPERATOR_CANCELLED;
}
+
if (BKE_add_linestyle_geometry_modifier(lineset->linestyle, type) == NULL) {
BKE_report(op->reports, RPT_ERROR, "Unknown stroke geometry modifier type");
return OPERATOR_CANCELLED;
@@ -1060,8 +1083,7 @@ static int freestyle_modifier_remove_exec(bContext *C, wmOperator *op)
PointerRNA ptr = CTX_data_pointer_get_type(C, "modifier", &RNA_LineStyleModifier);
LineStyleModifier *modifier = ptr.data;
- if (!lineset) {
- BKE_report(op->reports, RPT_ERROR, "No active lineset and associated line style the modifier belongs to");
+ if (!freestyle_linestyle_check_report(lineset, op->reports)) {
return OPERATOR_CANCELLED;
}
@@ -1110,8 +1132,7 @@ static int freestyle_modifier_copy_exec(bContext *C, wmOperator *op)
PointerRNA ptr = CTX_data_pointer_get_type(C, "modifier", &RNA_LineStyleModifier);
LineStyleModifier *modifier = ptr.data;
- if (!lineset) {
- BKE_report(op->reports, RPT_ERROR, "No active lineset and associated line style the modifier belongs to");
+ if (!freestyle_linestyle_check_report(lineset, op->reports)) {
return OPERATOR_CANCELLED;
}
@@ -1161,8 +1182,7 @@ static int freestyle_modifier_move_exec(bContext *C, wmOperator *op)
LineStyleModifier *modifier = ptr.data;
int dir = RNA_enum_get(op->ptr, "direction");
- if (!lineset) {
- BKE_report(op->reports, RPT_ERROR, "No active lineset and associated line style the modifier belongs to");
+ if (!freestyle_linestyle_check_report(lineset, op->reports)) {
return OPERATOR_CANCELLED;
}
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index e805b3f30fc..fccce0357a4 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -1446,7 +1446,6 @@ void ED_area_newspace(bContext *C, ScrArea *sa, int type)
}
if (sl) {
-
/* swap regions */
slold->regionbase = sa->regionbase;
sa->regionbase = sl->regionbase;
@@ -1696,8 +1695,10 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, const char *
/* Note: this code scales fine, but because of rounding differences, positions of elements
* flip +1 or -1 pixel compared to redoing the entire layout again.
* Leaving in commented code for future tests */
- /* uiScalePanels(ar, BLI_rctf_size_x(&v2d->cur));
- break; */
+#if 0
+ uiScalePanels(ar, BLI_rctf_size_x(&v2d->cur));
+ break;
+#endif
}
else {
break;
@@ -1806,7 +1807,7 @@ void ED_region_header_init(ARegion *ar)
/* UI_UNIT_Y is defined as U variable now, depending dpi */
int ED_area_headersize(void)
{
- return (int)(1.3f * UI_UNIT_Y);
+ return (int)(HEADERY * UI_DPI_FAC);
}
void ED_region_info_draw(ARegion *ar, const char *text, int block, float fill_color[4])
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c
index 723dce5e226..d356c3d8de3 100644
--- a/source/blender/editors/screen/glutil.c
+++ b/source/blender/editors/screen/glutil.c
@@ -531,7 +531,7 @@ void glaDrawPixelsTexScaled(float x, float y, int img_w, int img_h, int format,
components = 4;
else if (format == GL_RGB)
components = 3;
- else if (format == GL_LUMINANCE)
+ else if (ELEM(format, GL_LUMINANCE, GL_ALPHA))
components = 1;
else {
BLI_assert(!"Incompatible format passed to glaDrawPixelsTexScaled");
@@ -1091,15 +1091,15 @@ void glaDrawImBuf_glsl(ImBuf *ibuf, float x, float y, int zoomfilter,
if (ibuf->rect_float) {
if (ibuf->float_colorspace) {
ok = IMB_colormanagement_setup_glsl_draw_from_space(view_settings, display_settings,
- ibuf->float_colorspace, TRUE);
+ ibuf->float_colorspace, true);
}
else {
- ok = IMB_colormanagement_setup_glsl_draw(view_settings, display_settings, TRUE);
+ ok = IMB_colormanagement_setup_glsl_draw(view_settings, display_settings, true);
}
}
else {
ok = IMB_colormanagement_setup_glsl_draw_from_space(view_settings, display_settings,
- ibuf->rect_colorspace, FALSE);
+ ibuf->rect_colorspace, false);
}
if (ok) {
@@ -1157,57 +1157,3 @@ void glaDrawImBuf_glsl_ctx(const bContext *C, ImBuf *ibuf, float x, float y, int
glaDrawImBuf_glsl(ibuf, x, y, zoomfilter, view_settings, display_settings);
}
-
-/* Transform buffer from role to scene linear space using GLSL OCIO conversion
- *
- * See IMB_colormanagement_setup_transform_from_role_glsl description for
- * some more details
- *
- * NOTE: this only works for RGBA buffers!
- */
-int glaBufferTransformFromRole_glsl(float *buffer, int width, int height, int role)
-{
- GPUOffScreen *ofs;
- char err_out[256];
- rcti display_rect;
-
- ofs = GPU_offscreen_create(width, height, err_out);
-
- if (!ofs)
- return FALSE;
-
- GPU_offscreen_bind(ofs);
-
- if (!IMB_colormanagement_setup_transform_from_role_glsl(role, TRUE)) {
- GPU_offscreen_unbind(ofs);
- GPU_offscreen_free(ofs);
- return FALSE;
- }
-
- BLI_rcti_init(&display_rect, 0, width, 0, height);
-
- glMatrixMode(GL_PROJECTION);
- glPushMatrix();
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
-
- glaDefine2DArea(&display_rect);
-
- glaDrawPixelsTex(0, 0, width, height, GL_RGBA, GL_FLOAT,
- GL_NEAREST, buffer);
-
- glMatrixMode(GL_PROJECTION);
- glPopMatrix();
- glMatrixMode(GL_MODELVIEW);
- glPopMatrix();
-
- GPU_offscreen_read_pixels(ofs, GL_FLOAT, buffer);
-
- IMB_colormanagement_finish_glsl_transform();
-
- /* unbind */
- GPU_offscreen_unbind(ofs);
- GPU_offscreen_free(ofs);
-
- return TRUE;
-}
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index 498762f1603..356db174c2f 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -327,10 +327,12 @@ static void screen_delarea(bContext *C, bScreen *sc, ScrArea *sa)
static short testsplitpoint(ScrArea *sa, char dir, float fac)
{
short x, y;
+ const short area_min_x = AREAMINX;
+ const short area_min_y = ED_area_headersize();
// area big enough?
- if (dir == 'v' && (sa->v4->vec.x - sa->v1->vec.x <= 2 * AREAMINX)) return 0;
- if (dir == 'h' && (sa->v2->vec.y - sa->v1->vec.y <= 2 * AREAMINY)) return 0;
+ if (dir == 'v' && (sa->v4->vec.x - sa->v1->vec.x <= 2 * area_min_x)) return 0;
+ if (dir == 'h' && (sa->v2->vec.y - sa->v1->vec.y <= 2 * area_min_y)) return 0;
// to be sure
CLAMP(fac, 0.0f, 1.0f);
@@ -338,10 +340,10 @@ static short testsplitpoint(ScrArea *sa, char dir, float fac)
if (dir == 'h') {
y = sa->v1->vec.y + fac * (sa->v2->vec.y - sa->v1->vec.y);
- if (y - sa->v1->vec.y < AREAMINY)
- y = sa->v1->vec.y + AREAMINY;
- else if (sa->v2->vec.y - y < AREAMINY)
- y = sa->v2->vec.y - AREAMINY;
+ if (y - sa->v1->vec.y < area_min_y)
+ y = sa->v1->vec.y + area_min_y;
+ else if (sa->v2->vec.y - y < area_min_y)
+ y = sa->v2->vec.y - area_min_y;
else y -= (y % AREAGRID);
return y;
@@ -349,10 +351,10 @@ static short testsplitpoint(ScrArea *sa, char dir, float fac)
else {
x = sa->v1->vec.x + fac * (sa->v4->vec.x - sa->v1->vec.x);
- if (x - sa->v1->vec.x < AREAMINX)
- x = sa->v1->vec.x + AREAMINX;
- else if (sa->v4->vec.x - x < AREAMINX)
- x = sa->v4->vec.x - AREAMINX;
+ if (x - sa->v1->vec.x < area_min_x)
+ x = sa->v1->vec.x + area_min_x;
+ else if (sa->v4->vec.x - x < area_min_x)
+ x = sa->v4->vec.x - area_min_x;
else x -= (x % AREAGRID);
return x;
@@ -1007,8 +1009,6 @@ void ED_screen_do_listen(bContext *C, wmNotifier *note)
win->screen->do_draw = TRUE;
break;
case NC_SCREEN:
- if (note->data == ND_SUBWINACTIVE)
- uiFreeActiveButtons(C, win->screen);
if (note->action == NA_EDITED)
win->screen->do_draw = win->screen->do_refresh = TRUE;
break;
@@ -1333,7 +1333,11 @@ void ED_screen_set_subwinactive(bContext *C, wmEvent *event)
/* notifier invokes freeing the buttons... causing a bit too much redraws */
if (oldswin != scr->subwinactive) {
region_cursor_set(win, scr->subwinactive, TRUE);
- WM_event_add_notifier(C, NC_SCREEN | ND_SUBWINACTIVE, scr);
+
+ /* this used to be a notifier, but needs to be done immediate
+ * because it can undo setting the right button as active due
+ * to delayed notifier handling */
+ uiFreeActiveButtons(C, win->screen);
}
else
region_cursor_set(win, scr->subwinactive, FALSE);
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 3066b733fc5..3cecbbb767d 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -696,28 +696,39 @@ static int actionzone_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int actionzone_modal(bContext *C, wmOperator *op, const wmEvent *event)
{
sActionzoneData *sad = op->customdata;
- int deltax, deltay;
- int mindelta = sad->az->type == AZONE_REGION ? 1 : 12;
switch (event->type) {
case MOUSEMOVE:
+ {
+ bool is_gesture;
+
+ const int delta_x = (event->x - sad->x);
+ const int delta_y = (event->y - sad->y);
+
/* calculate gesture direction */
- deltax = (event->x - sad->x);
- deltay = (event->y - sad->y);
-
- if (deltay > ABS(deltax))
+ if (delta_y > ABS(delta_x))
sad->gesture_dir = 'n';
- else if (deltax > ABS(deltay))
+ else if (delta_x > ABS(delta_y))
sad->gesture_dir = 'e';
- else if (deltay < -ABS(deltax))
+ else if (delta_y < -ABS(delta_x))
sad->gesture_dir = 's';
else
sad->gesture_dir = 'w';
+ if (sad->az->type == AZONE_AREA) {
+ /* once we drag outside the actionzone, register a gesture
+ * check we're not on an edge so join finds the other area */
+ is_gesture = ((is_in_area_actionzone(sad->sa1, &event->x) != sad->az) &&
+ (screen_find_active_scredge(CTX_wm_screen(C), event->x, event->y) == NULL));
+ }
+ else {
+ const int delta_min = 1;
+ is_gesture = (ABS(delta_x) > delta_min || ABS(delta_y) > delta_min);
+ }
+
/* gesture is large enough? */
- if (ABS(deltax) > mindelta || ABS(deltay) > mindelta) {
-
- /* second area, for join */
+ if (is_gesture) {
+ /* second area, for join when (sa1 != sa2) */
sad->sa2 = screen_areahascursor(CTX_wm_screen(C), event->x, event->y);
/* apply sends event */
actionzone_apply(C, op, sad->az->type);
@@ -726,6 +737,7 @@ static int actionzone_modal(bContext *C, wmOperator *op, const wmEvent *event)
return OPERATOR_FINISHED;
}
break;
+ }
case ESCKEY:
actionzone_exit(op);
return OPERATOR_CANCELLED;
@@ -807,7 +819,7 @@ static int area_swap_init(wmOperator *op, const wmEvent *event)
static void area_swap_exit(bContext *C, wmOperator *op)
{
- WM_cursor_restore(CTX_wm_window(C));
+ WM_cursor_modal_restore(CTX_wm_window(C));
if (op->customdata)
MEM_freeN(op->customdata);
op->customdata = NULL;
@@ -826,7 +838,7 @@ static int area_swap_invoke(bContext *C, wmOperator *op, const wmEvent *event)
return OPERATOR_PASS_THROUGH;
/* add modal handler */
- WM_cursor_modal(CTX_wm_window(C), BC_SWAPAREA_CURSOR);
+ WM_cursor_modal_set(CTX_wm_window(C), BC_SWAPAREA_CURSOR);
WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
@@ -1396,7 +1408,7 @@ static void area_split_exit(bContext *C, wmOperator *op)
op->customdata = NULL;
}
- WM_cursor_restore(CTX_wm_window(C));
+ WM_cursor_modal_restore(CTX_wm_window(C));
WM_event_add_notifier(C, NC_SCREEN | NA_EDITED, NULL);
/* this makes sure aligned edges will result in aligned grabbing */
@@ -2111,6 +2123,66 @@ static void SCREEN_OT_keyframe_jump(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "next", TRUE, "Next Keyframe", "");
}
+/* ************** jump to marker operator ***************************** */
+
+/* function to be called outside UI context, or for redo */
+static int marker_jump_exec(bContext *C, wmOperator *op)
+{
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ TimeMarker *marker;
+ int closest;
+ short next = RNA_boolean_get(op->ptr, "next");
+ bool found = false;
+
+ /* find matching marker in the right direction */
+ for (marker = scene->markers.first; marker; marker = marker->next) {
+ if (next) {
+ if (marker->frame > CFRA && (!found || closest > marker->frame)) {
+ closest = marker->frame;
+ found = true;
+ }
+ }
+ else {
+ if (marker->frame < CFRA && (!found || closest < marker->frame)) {
+ closest = marker->frame;
+ found = true;
+ }
+ }
+ }
+
+ /* any success? */
+ if (!found) {
+ BKE_report(op->reports, RPT_INFO, "No more markers to jump to in this direction");
+
+ return OPERATOR_CANCELLED;
+ }
+ else {
+ CFRA = closest;
+
+ sound_seek_scene(bmain, scene);
+
+ WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene);
+
+ return OPERATOR_FINISHED;
+ }
+}
+
+static void SCREEN_OT_marker_jump(wmOperatorType *ot)
+{
+ ot->name = "Jump to Marker";
+ ot->description = "Jump to previous/next marker";
+ ot->idname = "SCREEN_OT_marker_jump";
+
+ ot->exec = marker_jump_exec;
+
+ ot->poll = ED_operator_screenactive_norender;
+ ot->flag = OPTYPE_UNDO;
+
+ /* properties */
+ RNA_def_boolean(ot->srna, "next", TRUE, "Next Marker", "");
+}
+
/* ************** switch screen operator ***************************** */
static int screen_set_is_ok(bScreen *screen, bScreen *screen_prev)
@@ -3795,6 +3867,7 @@ void ED_operatortypes_screen(void)
WM_operatortype_append(SCREEN_OT_frame_offset);
WM_operatortype_append(SCREEN_OT_frame_jump);
WM_operatortype_append(SCREEN_OT_keyframe_jump);
+ WM_operatortype_append(SCREEN_OT_marker_jump);
WM_operatortype_append(SCREEN_OT_animation_step);
WM_operatortype_append(SCREEN_OT_animation_play);
@@ -3928,9 +4001,11 @@ void ED_keymap_screen(wmKeyConfig *keyconf)
/* render */
- WM_keymap_add_item(keymap, "RENDER_OT_render", F12KEY, KM_PRESS, 0, 0);
+ kmi = WM_keymap_add_item(keymap, "RENDER_OT_render", F12KEY, KM_PRESS, 0, 0);
+ RNA_boolean_set(kmi->ptr, "use_viewport", TRUE);
kmi = WM_keymap_add_item(keymap, "RENDER_OT_render", F12KEY, KM_PRESS, KM_CTRL, 0);
RNA_boolean_set(kmi->ptr, "animation", TRUE);
+ RNA_boolean_set(kmi->ptr, "use_viewport", TRUE);
WM_keymap_add_item(keymap, "RENDER_OT_view_cancel", ESCKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "RENDER_OT_view_show", F11KEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "RENDER_OT_play_rendered_anim", F11KEY, KM_PRESS, KM_CTRL, 0);
@@ -3970,6 +4045,13 @@ void ED_keymap_screen(wmKeyConfig *keyconf)
kmi = WM_keymap_add_item(keymap, "SCREEN_OT_keyframe_jump", MEDIAFIRST, KM_PRESS, 0, 0);
RNA_boolean_set(kmi->ptr, "next", FALSE);
+
+ kmi = WM_keymap_add_item(keymap, "SCREEN_OT_marker_jump", RIGHTARROWKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
+ RNA_boolean_set(kmi->ptr, "next", TRUE);
+
+ kmi = WM_keymap_add_item(keymap, "SCREEN_OT_marker_jump", LEFTARROWKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
+ RNA_boolean_set(kmi->ptr, "next", FALSE);
+
/* play (forward and backwards) */
WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", AKEY, KM_PRESS, KM_ALT, 0);
diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c
index 584d4cef133..06581fb3c11 100644
--- a/source/blender/editors/screen/screendump.c
+++ b/source/blender/editors/screen/screendump.c
@@ -77,6 +77,18 @@ typedef struct ScreenshotData {
ImageFormatData im_format;
} ScreenshotData;
+static void screenshot_read_pixels(int x, int y, int w, int h, unsigned char *rect)
+{
+ int i;
+
+ glReadPixels(x, y, w, h, GL_RGBA, GL_UNSIGNED_BYTE, rect);
+ glFinish();
+
+ /* clear alpha, it is not set to a meaningful value in opengl */
+ for (i = 0, rect += 3; i < w * h; i++, rect += 4)
+ *rect = 255;
+}
+
/* get shot from frontbuffer */
static unsigned int *screenshot(bContext *C, int *dumpsx, int *dumpsy)
{
@@ -93,8 +105,7 @@ static unsigned int *screenshot(bContext *C, int *dumpsx, int *dumpsy)
dumprect = MEM_mallocN(sizeof(int) * (*dumpsx) * (*dumpsy), "dumprect");
glReadBuffer(GL_FRONT);
- glReadPixels(x, y, *dumpsx, *dumpsy, GL_RGBA, GL_UNSIGNED_BYTE, dumprect);
- glFinish();
+ screenshot_read_pixels(x, y, *dumpsx, *dumpsy, (unsigned char *)dumprect);
glReadBuffer(GL_BACK);
}
@@ -316,8 +327,7 @@ static void screenshot_updatejob(void *sjv)
if (sj->dumprect == NULL) {
dumprect = MEM_mallocN(sizeof(int) * sj->dumpsx * sj->dumpsy, "dumprect");
- glReadPixels(sj->x, sj->y, sj->dumpsx, sj->dumpsy, GL_RGBA, GL_UNSIGNED_BYTE, dumprect);
- glFinish();
+ screenshot_read_pixels(sj->x, sj->y, sj->dumpsx, sj->dumpsy, (unsigned char *)dumprect);
sj->dumprect = dumprect;
}
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index 2c1f5b620c4..56143d00afe 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -73,12 +73,38 @@ typedef struct TexSnapshot {
GLuint overlay_texture;
int winx;
int winy;
- bool init;
int old_size;
float old_zoom;
bool old_col;
} TexSnapshot;
+typedef struct CursorSnapshot {
+ GLuint overlay_texture;
+ int size;
+ int zoom;
+} CursorSnapshot;
+
+static TexSnapshot primary_snap = {0};
+static TexSnapshot secondary_snap = {0};
+static CursorSnapshot cursor_snap = {0};
+
+/* delete overlay cursor textures to preserve memory and invalidate all overlay flags */
+void paint_cursor_delete_textures(void)
+{
+ if (primary_snap.overlay_texture)
+ glDeleteTextures(1, &primary_snap.overlay_texture);
+ if (secondary_snap.overlay_texture)
+ glDeleteTextures(1, &secondary_snap.overlay_texture);
+ if (cursor_snap.overlay_texture)
+ glDeleteTextures(1, &cursor_snap.overlay_texture);
+
+ memset(&primary_snap, 0, sizeof(TexSnapshot));
+ memset(&secondary_snap, 0, sizeof(TexSnapshot));
+ memset(&cursor_snap, 0, sizeof(CursorSnapshot));
+
+ BKE_paint_invalidate_overlay_all();
+}
+
static int same_tex_snap(TexSnapshot *snap, MTex *mtex, ViewContext *vc, bool col, float zoom)
{
return (/* make brush smaller shouldn't cause a resample */
@@ -103,9 +129,7 @@ static void make_tex_snap(TexSnapshot *snap, ViewContext *vc, float zoom)
static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col, bool primary)
{
- static int init = 0;
- static TexSnapshot primary_snap = {0};
- static TexSnapshot secondary_snap = {0};
+ bool init;
TexSnapshot *target;
MTex *mtex = (primary) ? &br->mtex : &br->mask_mtex;
@@ -120,12 +144,14 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col, bool prima
(overlay_flags & PAINT_INVALID_OVERLAY_TEXTURE_SECONDARY);
target = (primary) ? &primary_snap : &secondary_snap;
-
+
refresh =
!target->overlay_texture ||
(invalid != 0) ||
!same_tex_snap(target, mtex, vc, col, zoom);
+ init = (target->overlay_texture != 0);
+
if (refresh) {
struct ImagePool *pool = NULL;
/* stencil is rotated later */
@@ -160,7 +186,7 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col, bool prima
target->overlay_texture = 0;
}
- init = 0;
+ init = false;
target->old_size = size;
}
@@ -267,7 +293,6 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col, bool prima
if (refresh) {
if (!init || (target->old_col != col)) {
glTexImage2D(GL_TEXTURE_2D, 0, format, size, size, 0, format, GL_UNSIGNED_BYTE, buffer);
- init = 1;
}
else {
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, size, size, format, GL_UNSIGNED_BYTE, buffer);
@@ -297,10 +322,7 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col, bool prima
static int load_tex_cursor(Brush *br, ViewContext *vc, float zoom)
{
- static GLuint overlay_texture = 0;
- static int init = 0;
- static int old_size = -1;
- static int old_zoom = -1;
+ bool init;
OverlayControlFlags overlay_flags = BKE_paint_get_overlay_flags();
GLubyte *buffer = NULL;
@@ -310,14 +332,16 @@ static int load_tex_cursor(Brush *br, ViewContext *vc, float zoom)
int refresh;
refresh =
- !overlay_texture ||
+ !cursor_snap.overlay_texture ||
(overlay_flags & PAINT_INVALID_OVERLAY_CURVE) ||
- old_zoom != zoom;
+ cursor_snap.zoom != zoom;
+
+ init = (cursor_snap.overlay_texture != 0);
if (refresh) {
int s, r;
- old_zoom = zoom;
+ cursor_snap.zoom = zoom;
s = BKE_brush_size_get(vc->scene, br);
r = 1;
@@ -330,18 +354,18 @@ static int load_tex_cursor(Brush *br, ViewContext *vc, float zoom)
if (size < 256)
size = 256;
- if (size < old_size)
- size = old_size;
+ if (size < cursor_snap.size)
+ size = cursor_snap.size;
- if (old_size != size) {
- if (overlay_texture) {
- glDeleteTextures(1, &overlay_texture);
- overlay_texture = 0;
+ if (cursor_snap.size != size) {
+ if (cursor_snap.overlay_texture) {
+ glDeleteTextures(1, &cursor_snap.overlay_texture);
+ cursor_snap.overlay_texture = 0;
}
- init = 0;
+ init = false;
- old_size = size;
+ cursor_snap.size = size;
}
buffer = MEM_mallocN(sizeof(GLubyte) * size * size, "load_tex");
@@ -383,19 +407,18 @@ static int load_tex_cursor(Brush *br, ViewContext *vc, float zoom)
}
}
- if (!overlay_texture)
- glGenTextures(1, &overlay_texture);
+ if (!cursor_snap.overlay_texture)
+ glGenTextures(1, &cursor_snap.overlay_texture);
}
else {
- size = old_size;
+ size = cursor_snap.size;
}
- glBindTexture(GL_TEXTURE_2D, overlay_texture);
+ glBindTexture(GL_TEXTURE_2D, cursor_snap.overlay_texture);
if (refresh) {
if (!init) {
glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, size, size, 0, GL_ALPHA, GL_UNSIGNED_BYTE, buffer);
- init = 1;
}
else {
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, size, size, GL_ALPHA, GL_UNSIGNED_BYTE, buffer);
@@ -643,21 +666,17 @@ static void paint_draw_cursor_overlay(UnifiedPaintSettings *ups, Brush *brush,
}
if (load_tex_cursor(brush, vc, zoom)) {
+ bool do_pop = false;
+ float center[2];
glEnable(GL_BLEND);
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
glDepthMask(GL_FALSE);
glDepthFunc(GL_ALWAYS);
- /* scale based on tablet pressure */
- if (ups->draw_pressure && BKE_brush_use_size_pressure(vc->scene, brush)) {
- glTranslatef(0.5f, 0.5f, 0);
- glScalef(1.0f / ups->pressure_value, 1.0f / ups->pressure_value, 1);
- glTranslatef(-0.5f, -0.5f, 0);
- }
-
if (ups->draw_anchored) {
const float *aim = ups->anchored_initial_mouse;
+ copy_v2_v2(center, aim);
quad.xmin = aim[0] - ups->anchored_size;
quad.ymin = aim[1] - ups->anchored_size;
quad.xmax = aim[0] + ups->anchored_size;
@@ -665,12 +684,25 @@ static void paint_draw_cursor_overlay(UnifiedPaintSettings *ups, Brush *brush,
}
else {
const int radius = BKE_brush_size_get(vc->scene, brush) * zoom;
+ center[0] = x;
+ center[1] = y;
+
quad.xmin = x - radius;
quad.ymin = y - radius;
quad.xmax = x + radius;
quad.ymax = y + radius;
}
+ /* scale based on tablet pressure */
+ if (ups->draw_pressure && BKE_brush_use_size_pressure(vc->scene, brush)) {
+ do_pop = true;
+ glPushMatrix();
+ glLoadIdentity();
+ glTranslatef(center[0], center[1], 0);
+ glScalef(ups->pressure_value, ups->pressure_value, 1);
+ glTranslatef(-center[0], -center[1], 0);
+ }
+
glColor4f(U.sculpt_paint_overlay_col[0],
U.sculpt_paint_overlay_col[1],
U.sculpt_paint_overlay_col[2],
@@ -687,6 +719,9 @@ static void paint_draw_cursor_overlay(UnifiedPaintSettings *ups, Brush *brush,
glTexCoord2f(0, 1);
glVertex2f(quad.xmin, quad.ymax);
glEnd();
+
+ if (do_pop)
+ glPopMatrix();
}
}
diff --git a/source/blender/editors/sculpt_paint/paint_hide.c b/source/blender/editors/sculpt_paint/paint_hide.c
index db6380e920f..345db7a0ed0 100644
--- a/source/blender/editors/sculpt_paint/paint_hide.c
+++ b/source/blender/editors/sculpt_paint/paint_hide.c
@@ -71,18 +71,6 @@
#include <assert.h>
-static int planes_contain_v3(float (*planes)[4], int totplane, const float p[3])
-{
- int i;
-
- for (i = 0; i < totplane; i++) {
- if (dot_v3v3(planes[i], p) + planes[i][3] > 0)
- return 0;
- }
-
- return 1;
-}
-
/* return true if the element should be hidden/shown */
static int is_effected(PartialVisArea area,
float planes[4][4],
@@ -95,7 +83,7 @@ static int is_effected(PartialVisArea area,
return mask > 0.5f;
}
else {
- int inside = planes_contain_v3(planes, 4, co);
+ bool inside = isect_point_planes_v3(planes, 4, co);
return ((inside && area == PARTIALVIS_INSIDE) ||
(!inside && area == PARTIALVIS_OUTSIDE));
}
@@ -235,20 +223,20 @@ static void partialvis_update_grids(Object *ob,
}
static void partialvis_update_bmesh_verts(BMesh *bm,
- GHash *verts,
- PartialVisAction action,
- PartialVisArea area,
- float planes[4][4],
- int *any_changed,
- int *any_visible)
+ GSet *verts,
+ PartialVisAction action,
+ PartialVisArea area,
+ float planes[4][4],
+ int *any_changed,
+ int *any_visible)
{
- GHashIterator gh_iter;
+ GSetIterator gs_iter;
- GHASH_ITER (gh_iter, verts) {
- BMVert *v = BLI_ghashIterator_getKey(&gh_iter);
+ GSET_ITER (gs_iter, verts) {
+ BMVert *v = BLI_gsetIterator_getKey(&gs_iter);
float *vmask = CustomData_bmesh_get(&bm->vdata,
- v->head.data,
- CD_PAINT_MASK);
+ v->head.data,
+ CD_PAINT_MASK);
/* hide vertex if in the hide volume */
if (is_effected(area, planes, v->co, *vmask)) {
@@ -272,7 +260,7 @@ static void partialvis_update_bmesh(Object *ob,
float planes[4][4])
{
BMesh *bm;
- GHash *unique, *other;
+ GSet *unique, *other;
int any_changed = 0, any_visible = 0;
bm = BKE_pbvh_get_bmesh(pbvh);
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index fcf00d4ab2c..9e8a8fd3ecc 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -82,6 +82,7 @@
#include "UI_view2d.h"
#include "ED_image.h"
+#include "ED_object.h"
#include "ED_screen.h"
#include "ED_sculpt.h"
#include "ED_uvedit.h"
@@ -791,6 +792,7 @@ static void toggle_paint_cursor(bContext *C, int enable)
if (settings->imapaint.paintcursor && !enable) {
WM_paint_cursor_end(wm, settings->imapaint.paintcursor);
settings->imapaint.paintcursor = NULL;
+ paint_cursor_delete_textures();
}
else if (enable)
paint_cursor_start(C, image_paint_poll);
@@ -819,6 +821,9 @@ void ED_space_image_paint_update(wmWindowManager *wm, ToolSettings *settings)
paint_cursor_start_explicit(&imapaint->paint, wm, image_paint_poll);
}
+ else {
+ paint_cursor_delete_textures();
+ }
}
/************************ grab clone operator ************************/
@@ -921,15 +926,33 @@ void PAINT_OT_grab_clone(wmOperatorType *ot)
}
/******************** sample color operator ********************/
+typedef struct {
+ bool show_cursor;
+ short event_type;
+} SampleColorData;
+
static int sample_color_exec(bContext *C, wmOperator *op)
{
- Brush *brush = image_paint_brush(C);
+ Paint *paint = BKE_paint_get_active_from_context(C);
+ Brush *brush = BKE_paint_brush(paint);
ARegion *ar = CTX_wm_region(C);
+ wmWindow *win = CTX_wm_window(C);
+ bool show_cursor = ((paint->flags & PAINT_SHOW_BRUSH) != 0);
int location[2];
+ paint->flags &= ~PAINT_SHOW_BRUSH;
+
+ /* force redraw without cursor */
+ WM_paint_cursor_tag_redraw(win, ar);
+ WM_redraw_windows(C);
+
RNA_int_get_array(op->ptr, "location", location);
paint_sample_color(C, ar, location[0], location[1]);
+ if (show_cursor) {
+ paint->flags |= PAINT_SHOW_BRUSH;
+ }
+
WM_event_add_notifier(C, NC_BRUSH | NA_EDITED, brush);
return OPERATOR_FINISHED;
@@ -937,10 +960,22 @@ static int sample_color_exec(bContext *C, wmOperator *op)
static int sample_color_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
- RNA_int_set_array(op->ptr, "location", event->mval);
- sample_color_exec(C, op);
+ Paint *paint = BKE_paint_get_active_from_context(C);
+ SampleColorData *data = MEM_mallocN(sizeof(SampleColorData), "sample color custom data");
+ ARegion *ar = CTX_wm_region(C);
+ wmWindow *win = CTX_wm_window(C);
+
+ data->event_type = event->type;
+ data->show_cursor = ((paint->flags & PAINT_SHOW_BRUSH) != 0);
+ op->customdata = data;
+ paint->flags &= ~PAINT_SHOW_BRUSH;
+
+ /* force redraw without cursor */
+ WM_paint_cursor_tag_redraw(win, ar);
+ WM_redraw_windows(C);
- op->customdata = SET_INT_IN_POINTER(event->type);
+ RNA_int_set_array(op->ptr, "location", event->mval);
+ paint_sample_color(C, ar, event->mval[0], event->mval[1]);
WM_event_add_modal_handler(C, op);
@@ -949,37 +984,36 @@ static int sample_color_invoke(bContext *C, wmOperator *op, const wmEvent *event
static int sample_color_modal(bContext *C, wmOperator *op, const wmEvent *event)
{
- if (event->type == (intptr_t)(op->customdata) && event->val == KM_RELEASE)
+ SampleColorData *data = op->customdata;
+ Paint *paint = BKE_paint_get_active_from_context(C);
+ Brush *brush = BKE_paint_brush(paint);
+
+ if ((event->type == data->event_type) && (event->val == KM_RELEASE)) {
+ if (data->show_cursor) {
+ paint->flags |= PAINT_SHOW_BRUSH;
+ }
+
+ MEM_freeN(data);
return OPERATOR_FINISHED;
+ }
switch (event->type) {
case MOUSEMOVE:
+ {
+ ARegion *ar = CTX_wm_region(C);
RNA_int_set_array(op->ptr, "location", event->mval);
- sample_color_exec(C, op);
+ paint_sample_color(C, ar, event->mval[0], event->mval[1]);
+ WM_event_add_notifier(C, NC_BRUSH | NA_EDITED, brush);
break;
+ }
}
return OPERATOR_RUNNING_MODAL;
}
-/* same as image_paint_poll but fail when face mask mode is enabled */
-static int image_paint_sample_color_poll(bContext *C)
+static int sample_color_poll(bContext *C)
{
- if (image_paint_poll(C)) {
- if (CTX_wm_view3d(C)) {
- Object *obact = CTX_data_active_object(C);
- if (obact && obact->mode & OB_MODE_TEXTURE_PAINT) {
- Mesh *me = BKE_mesh_from_object(obact);
- if (me) {
- return !(me->editflag & ME_EDIT_PAINT_FACE_SEL);
- }
- }
- }
-
- return 1;
- }
-
- return 0;
+ return (image_paint_poll(C) || vertex_paint_poll(C));
}
void PAINT_OT_sample_color(wmOperatorType *ot)
@@ -993,7 +1027,7 @@ void PAINT_OT_sample_color(wmOperatorType *ot)
ot->exec = sample_color_exec;
ot->invoke = sample_color_invoke;
ot->modal = sample_color_modal;
- ot->poll = image_paint_sample_color_poll;
+ ot->poll = sample_color_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -1006,9 +1040,12 @@ void PAINT_OT_sample_color(wmOperatorType *ot)
static int texture_paint_toggle_poll(bContext *C)
{
- if (CTX_data_edit_object(C))
+ Object *ob = CTX_data_active_object(C);
+ if (ob == NULL || ob->type != OB_MESH)
return 0;
- if (CTX_data_active_object(C) == NULL)
+ if (!ob->data || ((ID *)ob->data)->lib)
+ return 0;
+ if (CTX_data_edit_object(C))
return 0;
return 1;
@@ -1018,25 +1055,20 @@ static int texture_paint_toggle_exec(bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
Object *ob = CTX_data_active_object(C);
- Mesh *me = NULL;
-
- if (ob == NULL)
- return OPERATOR_CANCELLED;
-
- if (BKE_object_obdata_is_libdata(ob)) {
- BKE_report(op->reports, RPT_ERROR, "Cannot edit external libdata");
- return OPERATOR_CANCELLED;
+ const int mode_flag = OB_MODE_TEXTURE_PAINT;
+ const bool is_mode_set = (ob->mode & mode_flag) != 0;
+ Mesh *me;
+
+ if (!is_mode_set) {
+ if (!ED_object_mode_compat_set(C, ob, mode_flag, op->reports)) {
+ return OPERATOR_CANCELLED;
+ }
}
me = BKE_mesh_from_object(ob);
- if (!(ob->mode & OB_MODE_TEXTURE_PAINT) && !me) {
- BKE_report(op->reports, RPT_ERROR, "Can only enter texture paint mode for mesh objects");
- return OPERATOR_CANCELLED;
- }
-
- if (ob->mode & OB_MODE_TEXTURE_PAINT) {
- ob->mode &= ~OB_MODE_TEXTURE_PAINT;
+ if (ob->mode & mode_flag) {
+ ob->mode &= ~mode_flag;
if (U.glreslimit != 0)
GPU_free_images();
@@ -1045,7 +1077,7 @@ static int texture_paint_toggle_exec(bContext *C, wmOperator *op)
toggle_paint_cursor(C, 0);
}
else {
- ob->mode |= OB_MODE_TEXTURE_PAINT;
+ ob->mode |= mode_flag;
if (me->mtface == NULL)
me->mtface = CustomData_add_layer(&me->fdata, CD_MTFACE, CD_DEFAULT,
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index db55dc271f1..88cc954fb17 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -164,6 +164,7 @@ BLI_INLINE unsigned char f_to_char(const float val)
/* used for testing doubles, if a point is on a line etc */
#define PROJ_GEOM_TOLERANCE 0.00075f
+#define PROJ_PIXEL_TOLERANCE 0.01f
/* vert flags */
#define PROJ_VERT_CULL 1
@@ -514,8 +515,8 @@ static void uvco_to_wrapped_pxco(const float uv[2], int ibuf_x, int ibuf_y, floa
}
/* Set the top-most face color that the screen space coord 'pt' touches (or return 0 if none touch) */
-static int project_paint_PickColor(const ProjPaintState *ps, const float pt[2],
- float *rgba_fp, unsigned char *rgba, const int interp)
+static bool project_paint_PickColor(const ProjPaintState *ps, const float pt[2],
+ float *rgba_fp, unsigned char *rgba, const bool interp)
{
float w[3], uv[2];
int side;
@@ -575,11 +576,8 @@ static int project_paint_PickColor(const ProjPaintState *ps, const float pt[2],
//if (xi < 0 || xi >= ibuf->x || yi < 0 || yi >= ibuf->y) return 0;
/* wrap */
- xi = ((int)(uv[0] * ibuf->x)) % ibuf->x;
- if (xi < 0) xi += ibuf->x;
- yi = ((int)(uv[1] * ibuf->y)) % ibuf->y;
- if (yi < 0) yi += ibuf->y;
-
+ xi = mod_i((int)(uv[0] * ibuf->x), ibuf->x);
+ yi = mod_i((int)(uv[1] * ibuf->y), ibuf->y);
if (rgba) {
if (ibuf->rect_float) {
@@ -611,7 +609,9 @@ static int project_paint_PickColor(const ProjPaintState *ps, const float pt[2],
* 1 : occluded
* 2 : occluded with w[3] weights set (need to know in some cases) */
-static int project_paint_occlude_ptv(float pt[3], float v1[4], float v2[4], float v3[4], float w[3], int is_ortho)
+static int project_paint_occlude_ptv(const float pt[3],
+ const float v1[4], const float v2[4], const float v3[4],
+ float w[3], const bool is_ortho)
{
/* if all are behind us, return false */
if (v1[2] > pt[2] && v2[2] > pt[2] && v3[2] > pt[2])
@@ -642,7 +642,7 @@ static int project_paint_occlude_ptv(float pt[3], float v1[4], float v2[4], floa
static int project_paint_occlude_ptv_clip(const ProjPaintState *ps, const MFace *mf,
- float pt[3], float v1[4], float v2[4], float v3[4],
+ const float pt[3], const float v1[4], const float v2[4], const float v3[4],
const int side)
{
float w[3], wco[3];
@@ -671,7 +671,8 @@ static int project_paint_occlude_ptv_clip(const ProjPaintState *ps, const MFace
/* Check if a screenspace location is occluded by any other faces
* check, pixelScreenCo must be in screenspace, its Z-Depth only needs to be used for comparison
* and doesn't need to be correct in relation to X and Y coords (this is the case in perspective view) */
-static int project_bucket_point_occluded(const ProjPaintState *ps, LinkNode *bucketFace, const int orig_face, float pixelScreenCo[4])
+static bool project_bucket_point_occluded(const ProjPaintState *ps, LinkNode *bucketFace,
+ const int orig_face, const float pixelScreenCo[4])
{
MFace *mf;
int face_index;
@@ -702,11 +703,11 @@ static int project_bucket_point_occluded(const ProjPaintState *ps, LinkNode *buc
if (isect_ret >= 1) {
/* TODO - we may want to cache the first hit,
* it is not possible to swap the face order in the list anymore */
- return 1;
+ return true;
}
}
}
- return 0;
+ return false;
}
/* basic line intersection, could move to math_geom.c, 2 points with a horiz line
@@ -785,7 +786,7 @@ static int line_isect_x(const float p1[2], const float p2[2], const float x_leve
* tile, but do not do this for the adjacent face, it could return a false positive.
* This is so unlikely that Id not worry about it. */
#ifndef PROJ_DEBUG_NOSEAMBLEED
-static int cmp_uv(const float vec2a[2], const float vec2b[2])
+static bool cmp_uv(const float vec2a[2], const float vec2b[2])
{
/* if the UV's are not between 0.0 and 1.0 */
float xa = (float)fmodf(vec2a[0], 1.0f);
@@ -807,11 +808,11 @@ static int cmp_uv(const float vec2a[2], const float vec2b[2])
/* set min_px and max_px to the image space bounds of the UV coords
* return zero if there is no area in the returned rectangle */
#ifndef PROJ_DEBUG_NOSEAMBLEED
-static int pixel_bounds_uv(
+static bool pixel_bounds_uv(
const float uv1[2], const float uv2[2], const float uv3[2], const float uv4[2],
rcti *bounds_px,
const int ibuf_x, const int ibuf_y,
- int is_quad
+ const bool is_quad
)
{
float min_uv[2], max_uv[2]; /* UV bounds */
@@ -837,7 +838,7 @@ static int pixel_bounds_uv(
}
#endif
-static int pixel_bounds_array(float (*uv)[2], rcti *bounds_px, const int ibuf_x, const int ibuf_y, int tot)
+static bool pixel_bounds_array(float (*uv)[2], rcti *bounds_px, const int ibuf_x, const int ibuf_y, int tot)
{
float min_uv[2], max_uv[2]; /* UV bounds */
@@ -868,7 +869,9 @@ static int pixel_bounds_array(float (*uv)[2], rcti *bounds_px, const int ibuf_x,
/* This function returns 1 if this face has a seam along the 2 face-vert indices
* 'orig_i1_fidx' and 'orig_i2_fidx' */
-static int check_seam(const ProjPaintState *ps, const int orig_face, const int orig_i1_fidx, const int orig_i2_fidx, int *other_face, int *orig_fidx)
+static bool check_seam(const ProjPaintState *ps,
+ const int orig_face, const int orig_i1_fidx, const int orig_i2_fidx,
+ int *other_face, int *orig_fidx)
{
LinkNode *node;
int face_index;
@@ -941,7 +944,7 @@ static int check_seam(const ProjPaintState *ps, const int orig_face, const int o
* since the outset coords are a margin that keep an even distance from the original UV's,
* note that the image aspect is taken into account */
static void uv_image_outset(float (*orig_uv)[2], float (*outset_uv)[2], const float scaler,
- const int ibuf_x, const int ibuf_y, const int is_quad)
+ const int ibuf_x, const int ibuf_y, const bool is_quad)
{
float a1, a2, a3, a4 = 0.0f;
float puv[4][2]; /* pixelspace uv's */
@@ -1339,7 +1342,7 @@ static ProjPixel *project_paint_uvpixel_init(
const ProjPaintState *ps,
MemArena *arena,
const ImBuf *ibuf,
- short x_px, short y_px,
+ int x_px, int y_px,
const float mask,
const int face_index,
const int image_index,
@@ -1351,10 +1354,9 @@ static ProjPixel *project_paint_uvpixel_init(
ProjPixel *projPixel;
/* wrap pixel location */
- x_px = x_px % ibuf->x;
- if (x_px < 0) x_px += ibuf->x;
- y_px = y_px % ibuf->y;
- if (y_px < 0) y_px += ibuf->y;
+
+ x_px = mod_i(x_px, ibuf->x);
+ y_px = mod_i(y_px, ibuf->y);
BLI_assert(ps->pixel_sizeof == project_paint_pixel_sizeof(ps->tool));
projPixel = (ProjPixel *)BLI_memarena_alloc(arena, ps->pixel_sizeof);
@@ -1465,7 +1467,7 @@ static ProjPixel *project_paint_uvpixel_init(
return projPixel;
}
-static int line_clip_rect2f(
+static bool line_clip_rect2f(
rctf *rect,
const float l1[2], const float l2[2],
float l1_clip[2], float l2_clip[2])
@@ -1681,7 +1683,7 @@ static float len_squared_v2v2_alt(const float *v1, const float v2_1, const float
/* note, use a squared value so we can use len_squared_v2v2
* be sure that you have done a bounds check first or this may fail */
/* only give bucket_bounds as an arg because we need it elsewhere */
-static int project_bucket_isect_circle(const float cent[2], const float radius_squared, rctf *bucket_bounds)
+static bool project_bucket_isect_circle(const float cent[2], const float radius_squared, rctf *bucket_bounds)
{
/* Would normally to a simple intersection test, however we know the bounds of these 2 already intersect
@@ -1823,9 +1825,11 @@ static float angle_2d_clockwise(const float p1[2], const float p2[2], const floa
#define ISECT_ALL4 ((1 << 4) - 1)
/* limit must be a fraction over 1.0f */
-static int IsectPT2Df_limit(float pt[2], float v1[2], float v2[2], float v3[2], float limit)
+static bool IsectPT2Df_limit(float pt[2], float v1[2], float v2[2], float v3[2], float limit)
{
- return ((area_tri_v2(pt, v1, v2) + area_tri_v2(pt, v2, v3) + area_tri_v2(pt, v3, v1)) / (area_tri_v2(v1, v2, v3))) < limit;
+ return ((area_tri_v2(pt, v1, v2) +
+ area_tri_v2(pt, v2, v3) +
+ area_tri_v2(pt, v3, v1)) / (area_tri_v2(v1, v2, v3))) < limit;
}
/* Clip the face by a bucket and set the uv-space bucket_bounds_uv
@@ -2004,8 +2008,8 @@ static void project_bucket_clip_face(
/* remove doubles */
/* first/last check */
- if (fabsf(isectVCosSS[0][0] - isectVCosSS[(*tot) - 1][0]) < PROJ_GEOM_TOLERANCE &&
- fabsf(isectVCosSS[0][1] - isectVCosSS[(*tot) - 1][1]) < PROJ_GEOM_TOLERANCE)
+ if (fabsf(isectVCosSS[0][0] - isectVCosSS[(*tot) - 1][0]) < PROJ_PIXEL_TOLERANCE &&
+ fabsf(isectVCosSS[0][1] - isectVCosSS[(*tot) - 1][1]) < PROJ_PIXEL_TOLERANCE)
{
(*tot)--;
}
@@ -2021,8 +2025,8 @@ static void project_bucket_clip_face(
while (doubles == TRUE) {
doubles = FALSE;
for (i = 1; i < (*tot); i++) {
- if (fabsf(isectVCosSS[i - 1][0] - isectVCosSS[i][0]) < PROJ_GEOM_TOLERANCE &&
- fabsf(isectVCosSS[i - 1][1] - isectVCosSS[i][1]) < PROJ_GEOM_TOLERANCE)
+ if (fabsf(isectVCosSS[i - 1][0] - isectVCosSS[i][0]) < PROJ_PIXEL_TOLERANCE &&
+ fabsf(isectVCosSS[i - 1][1] - isectVCosSS[i][1]) < PROJ_PIXEL_TOLERANCE)
{
int j;
for (j = i + 1; j < (*tot); j++) {
@@ -2136,7 +2140,7 @@ static void project_bucket_clip_face(
/* checks if pt is inside a convex 2D polyline, the polyline must be ordered rotating clockwise
* otherwise it would have to test for mixed (line_point_side_v2 > 0.0f) cases */
-static int IsectPoly2Df(const float pt[2], float uv[][2], const int tot)
+static bool IsectPoly2Df(const float pt[2], float uv[][2], const int tot)
{
int i;
if (line_point_side_v2(uv[tot - 1], uv[0], pt) < 0.0f)
@@ -2150,7 +2154,7 @@ static int IsectPoly2Df(const float pt[2], float uv[][2], const int tot)
return 1;
}
-static int IsectPoly2Df_twoside(const float pt[2], float uv[][2], const int tot)
+static bool IsectPoly2Df_twoside(const float pt[2], float uv[][2], const int tot)
{
int i;
int side = (line_point_side_v2(uv[tot - 1], uv[0], pt) > 0.0f);
@@ -2410,7 +2414,7 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i
if (outset_uv[0][0] == FLT_MAX) /* first time initialize */
- uv_image_outset(tf_uv_pxoffset, outset_uv, ps->seam_bleed_px, ibuf->x, ibuf->y, mf->v4);
+ uv_image_outset(tf_uv_pxoffset, outset_uv, ps->seam_bleed_px, ibuf->x, ibuf->y, mf->v4 != 0);
/* ps->faceSeamUVs cant be modified when threading, now this is done we can unlock */
if (ps->thread_tot > 1)
@@ -2465,7 +2469,7 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i
interp_v3_v3v3(edge_verts_inset_clip[1], insetCos[fidx1], insetCos[fidx2], fac2);
- if (pixel_bounds_uv(seam_subsection[0], seam_subsection[1], seam_subsection[2], seam_subsection[3], &bounds_px, ibuf->x, ibuf->y, 1)) {
+ if (pixel_bounds_uv(seam_subsection[0], seam_subsection[1], seam_subsection[2], seam_subsection[3], &bounds_px, ibuf->x, ibuf->y, true)) {
/* bounds between the seam rect and the uvspace bucket pixels */
has_isect = 0;
@@ -2671,7 +2675,7 @@ static void project_bucket_init(const ProjPaintState *ps, const int thread_index
* calculated when it might not be needed later, (at the moment at least)
* obviously it shouldn't have bugs though */
-static int project_bucket_face_isect(ProjPaintState *ps, int bucket_x, int bucket_y, const MFace *mf)
+static bool project_bucket_face_isect(ProjPaintState *ps, int bucket_x, int bucket_y, const MFace *mf)
{
/* TODO - replace this with a tricker method that uses sideofline for all screenCoords's edges against the closest bucket corner */
rctf bucket_bounds;
@@ -3129,7 +3133,7 @@ static void project_paint_begin(ProjPaintState *ps)
ps->thread_tot = 1;
for (a = 0; a < ps->thread_tot; a++) {
- ps->arena_mt[a] = BLI_memarena_new(1 << 16, "project paint arena");
+ ps->arena_mt[a] = BLI_memarena_new(MEM_SIZE_OPTIMAL(1 << 16), "project paint arena");
}
arena = ps->arena_mt[0];
@@ -3303,7 +3307,7 @@ static void paint_proj_begin_clone(ProjPaintState *ps, const float mouse[2])
/* setup clone offset */
if (ps->tool == PAINT_TOOL_CLONE) {
float projCo[4];
- copy_v3_v3(projCo, give_cursor(ps->scene, ps->v3d));
+ copy_v3_v3(projCo, ED_view3d_cursor3d_get(ps->scene, ps->v3d));
mul_m4_v3(ps->ob->imat, projCo);
projCo[3] = 1.0f;
@@ -3465,9 +3469,9 @@ static void partial_redraw_array_init(ImagePaintPartialRedraw *pr)
}
-static int partial_redraw_array_merge(ImagePaintPartialRedraw *pr, ImagePaintPartialRedraw *pr_other, int tot)
+static bool partial_redraw_array_merge(ImagePaintPartialRedraw *pr, ImagePaintPartialRedraw *pr_other, int tot)
{
- int touch = 0;
+ bool touch = 0;
while (tot--) {
pr->x1 = min_ii(pr->x1, pr_other->x1);
pr->y1 = min_ii(pr->y1, pr_other->y1);
@@ -3485,12 +3489,12 @@ static int partial_redraw_array_merge(ImagePaintPartialRedraw *pr, ImagePaintPar
}
/* Loop over all images on this mesh and update any we have touched */
-static int project_image_refresh_tagged(ProjPaintState *ps)
+static bool project_image_refresh_tagged(ProjPaintState *ps)
{
ImagePaintPartialRedraw *pr;
ProjPaintImage *projIma;
int a, i;
- int redraw = 0;
+ bool redraw = false;
for (a = 0, projIma = ps->projImages; a < ps->image_tot; a++, projIma++) {
@@ -3513,7 +3517,7 @@ static int project_image_refresh_tagged(ProjPaintState *ps)
}
/* run this per painting onto each mouse location */
-static int project_bucket_iter_init(ProjPaintState *ps, const float mval_f[2])
+static bool project_bucket_iter_init(ProjPaintState *ps, const float mval_f[2])
{
if (ps->source == PROJ_SRC_VIEW) {
float min_brush[2], max_brush[2];
@@ -3553,7 +3557,7 @@ static int project_bucket_iter_init(ProjPaintState *ps, const float mval_f[2])
}
-static int project_bucket_iter_next(ProjPaintState *ps, int *bucket_index, rctf *bucket_bounds, const float mval[2])
+static bool project_bucket_iter_next(ProjPaintState *ps, int *bucket_index, rctf *bucket_bounds, const float mval[2])
{
const int diameter = 2 * BKE_brush_size_get(ps->scene, ps->brush);
@@ -3815,7 +3819,7 @@ static void *do_projectpaint_thread(void *ph_v)
float falloff;
int bucket_index;
- int is_floatbuf = 0;
+ bool is_floatbuf = false;
const short tool = ps->tool;
rctf bucket_bounds;
@@ -3841,10 +3845,10 @@ static void *do_projectpaint_thread(void *ph_v)
pos_ofs[0] = pos[0] - lastpos[0];
pos_ofs[1] = pos[1] - lastpos[1];
- smearArena = BLI_memarena_new(1 << 16, "paint smear arena");
+ smearArena = BLI_memarena_new(MEM_SIZE_OPTIMAL(1 << 16), "paint smear arena");
}
else if (tool == PAINT_TOOL_SOFTEN) {
- softenArena = BLI_memarena_new(1 << 16, "paint soften arena");
+ softenArena = BLI_memarena_new(MEM_SIZE_OPTIMAL(1 << 16), "paint soften arena");
}
/* printf("brush bounds %d %d %d %d\n", bucketMin[0], bucketMin[1], bucketMax[0], bucketMax[1]); */
@@ -3870,7 +3874,7 @@ static void *do_projectpaint_thread(void *ph_v)
last_projIma = projImages + last_index;
last_projIma->touch = 1;
- is_floatbuf = last_projIma->ibuf->rect_float ? 1 : 0;
+ is_floatbuf = (last_projIma->ibuf->rect_float != NULL);
}
/* end copy */
@@ -3883,7 +3887,7 @@ static void *do_projectpaint_thread(void *ph_v)
float mask = ((float)projPixel->mask) * (1.0f / 65535.0f);
straight_uchar_to_premul_float(newColor_f, projPixel->newColor.ch);
- IMB_colormanagement_colorspace_to_scene_linear_v4(newColor_f, TRUE, ps->reproject_ibuf->rect_colorspace);
+ IMB_colormanagement_colorspace_to_scene_linear_v4(newColor_f, true, ps->reproject_ibuf->rect_colorspace);
mul_v4_v4fl(newColor_f, newColor_f, mask);
blend_color_mix_float(projPixel->pixel.f_pt, projPixel->origColor.f,
@@ -3996,7 +4000,7 @@ static void *do_projectpaint_thread(void *ph_v)
last_projIma = projImages + last_index;
last_projIma->touch = 1;
- is_floatbuf = last_projIma->ibuf->rect_float ? 1 : 0;
+ is_floatbuf = (last_projIma->ibuf->rect_float != NULL);
}
/* end copy */
@@ -4075,11 +4079,11 @@ static void *do_projectpaint_thread(void *ph_v)
return NULL;
}
-static int project_paint_op(void *state, const float lastpos[2], const float pos[2])
+static bool project_paint_op(void *state, const float lastpos[2], const float pos[2])
{
/* First unpack args from the struct */
ProjPaintState *ps = (ProjPaintState *)state;
- int touch_any = 0;
+ bool touch_any = false;
ProjectHandle handles[BLENDER_MAX_THREADS];
ListBase threads;
@@ -4159,12 +4163,12 @@ void paint_proj_stroke(bContext *C, void *pps, const float prev_pos[2], const fl
if (ps->tool == PAINT_TOOL_CLONE && ps->mode == BRUSH_STROKE_INVERT) {
Scene *scene = ps->scene;
View3D *v3d = ps->v3d;
- float *cursor = give_cursor(scene, v3d);
+ float *cursor = ED_view3d_cursor3d_get(scene, v3d);
int mval_i[2] = {(int)pos[0], (int)pos[1]};
view3d_operator_needs_opengl(C);
- if (!ED_view3d_autodist(scene, ps->ar, v3d, mval_i, cursor, false))
+ if (!ED_view3d_autodist(scene, ps->ar, v3d, mval_i, cursor, false, NULL))
return;
ED_region_tag_redraw(ps->ar);
@@ -4279,9 +4283,6 @@ void *paint_proj_new_stroke(bContext *C, Object *ob, const float mouse[2], int m
return ps;
}
- /* needed so multiple threads don't try to initialize the brush at once (can leak memory) */
- curvemapping_initialize(ps->brush->curve);
-
paint_brush_init_tex(ps->brush);
ps->source = PROJ_SRC_VIEW;
diff --git a/source/blender/editors/sculpt_paint/paint_intern.h b/source/blender/editors/sculpt_paint/paint_intern.h
index 6c13f6efb74..86b223ec2a0 100644
--- a/source/blender/editors/sculpt_paint/paint_intern.h
+++ b/source/blender/editors/sculpt_paint/paint_intern.h
@@ -74,6 +74,7 @@ bool paint_space_stroke_enabled(struct Brush *br, enum PaintMode mode);
bool paint_supports_dynamic_size(struct Brush *br, enum PaintMode mode);
bool paint_supports_dynamic_tex_coords(struct Brush *br, enum PaintMode mode);
bool paint_supports_smooth_stroke(struct Brush *br, enum PaintMode mode);
+bool paint_supports_texture(enum PaintMode mode);
bool paint_supports_jitter(enum PaintMode mode);
struct wmKeyMap *paint_stroke_modal_keymap(struct wmKeyConfig *keyconf);
@@ -86,6 +87,7 @@ void paint_stroke_set_mode_data(struct PaintStroke *stroke, void *mode_data);
int paint_poll(struct bContext *C);
void paint_cursor_start(struct bContext *C, int (*poll)(struct bContext *C));
void paint_cursor_start_explicit(struct Paint *p, struct wmWindowManager *wm, int (*poll)(struct bContext *C));
+void paint_cursor_delete_textures(void);
/* paint_vertex.c */
int weight_paint_poll(struct bContext *C);
@@ -262,5 +264,6 @@ typedef enum {
} PaintMaskFloodMode;
void PAINT_OT_mask_flood_fill(struct wmOperatorType *ot);
+void PAINT_OT_mask_box_fill(struct wmOperatorType *ot);
#endif /* __PAINT_INTERN_H__ */
diff --git a/source/blender/editors/sculpt_paint/paint_mask.c b/source/blender/editors/sculpt_paint/paint_mask.c
index 8767b080355..13f11c8a816 100644
--- a/source/blender/editors/sculpt_paint/paint_mask.c
+++ b/source/blender/editors/sculpt_paint/paint_mask.c
@@ -36,6 +36,10 @@
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
+#include "BIF_glutil.h"
+
+#include "BLI_math_matrix.h"
+#include "BLI_math_geom.h"
#include "BLI_utildefines.h"
#include "BKE_pbvh.h"
#include "BKE_ccg.h"
@@ -53,6 +57,7 @@
#include "ED_screen.h"
#include "ED_sculpt.h"
+#include "ED_view3d.h"
#include "bmesh.h"
@@ -148,3 +153,69 @@ void PAINT_OT_mask_flood_fill(struct wmOperatorType *ot)
RNA_def_float(ot->srna, "value", 0, 0, 1, "Value",
"Mask level to use when mode is 'Value'; zero means no masking and one is fully masked", 0, 1);
}
+
+/* Box select, operator is VIEW3D_OT_select_border, defined in view3d_select.c */
+
+static int is_effected(float planes[4][4], const float co[3])
+{
+ return isect_point_planes_v3(planes, 4, co);
+}
+
+int do_sculpt_mask_box_select(ViewContext *vc, rcti *rect, bool select, bool UNUSED(extend))
+{
+ BoundBox bb;
+ bglMats mats = {{0}};
+ float clip_planes[4][4];
+ ARegion *ar = vc->ar;
+ struct Scene *scene = vc->scene;
+ Object *ob = vc->obact;
+ struct MultiresModifierData *mmd = sculpt_multires_active(scene, ob);
+ PaintMaskFloodMode mode;
+ float value;
+ DerivedMesh *dm;
+ PBVH *pbvh;
+ PBVHNode **nodes;
+ int totnode, i;
+
+ mode = PAINT_MASK_FLOOD_VALUE;
+ value = select ? 1.0 : 0.0;
+
+ /* transform the */
+ view3d_get_transformation(vc->ar, vc->rv3d, vc->obact, &mats);
+ ED_view3d_clipping_calc(&bb, clip_planes, &mats, rect);
+ mul_m4_fl(clip_planes, -1.0f);
+
+ ED_sculpt_mask_layers_ensure(ob, mmd);
+
+ dm = mesh_get_derived_final(scene, ob, CD_MASK_BAREMESH);
+ pbvh = dm->getPBVH(ob, dm);
+ ob->sculpt->pbvh = pbvh;
+
+ BKE_pbvh_search_gather(pbvh, BKE_pbvh_node_planes_contain_AABB, clip_planes, &nodes, &totnode);
+
+ sculpt_undo_push_begin("Mask box fill");
+
+ for (i = 0; i < totnode; i++) {
+ PBVHVertexIter vi;
+
+ sculpt_undo_push_node(ob, nodes[i], SCULPT_UNDO_MASK);
+
+ BKE_pbvh_vertex_iter_begin(pbvh, nodes[i], vi, PBVH_ITER_UNIQUE) {
+ if (is_effected(clip_planes, vi.co))
+ mask_flood_fill_set_elem(vi.mask, mode, value);
+ } BKE_pbvh_vertex_iter_end;
+
+ BKE_pbvh_node_mark_update(nodes[i]);
+ if (BKE_pbvh_type(pbvh) == PBVH_GRIDS)
+ multires_mark_as_modified(ob, MULTIRES_COORDS_MODIFIED);
+ }
+
+ sculpt_undo_push_end();
+
+ if (nodes)
+ MEM_freeN(nodes);
+
+ ED_region_tag_redraw(ar);
+
+ return OPERATOR_FINISHED;
+}
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c
index bdf542526ee..8b038973831 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -728,9 +728,16 @@ static int stencil_control_modal(bContext *C, wmOperator *op, const wmEvent *eve
static int stencil_control_poll(bContext *C)
{
- Paint *paint = BKE_paint_get_active_from_context(C);
- Brush *br = BKE_paint_brush(paint);
+ PaintMode mode = BKE_paintmode_get_active_from_context(C);
+
+ Paint *paint;
+ Brush *br;
+
+ if (!paint_supports_texture(mode))
+ return false;
+ paint = BKE_paint_get_active_from_context(C);
+ br = BKE_paint_brush(paint);
return (br &&
(br->mtex.brush_map_mode == MTEX_MAP_MODE_STENCIL ||
br->mask_mtex.brush_map_mode == MTEX_MAP_MODE_STENCIL));
@@ -1011,7 +1018,8 @@ typedef enum {
RC_COLOR = 1,
RC_ROTATION = 2,
RC_ZOOM = 4,
- RC_WEIGHT = 8
+ RC_WEIGHT = 8,
+ RC_SECONDARY_ROTATION = 16
} RCFlags;
static void set_brush_rc_path(PointerRNA *ptr, const char *brush_path,
@@ -1043,7 +1051,10 @@ static void set_brush_rc_props(PointerRNA *ptr, const char *paint,
RNA_string_set(ptr, "data_path_secondary", "");
}
set_brush_rc_path(ptr, brush_path, "color_path", "cursor_color_add");
- set_brush_rc_path(ptr, brush_path, "rotation_path", "texture_slot.angle");
+ if (flags & RC_SECONDARY_ROTATION)
+ set_brush_rc_path(ptr, brush_path, "rotation_path", "mask_texture_slot.angle");
+ else
+ set_brush_rc_path(ptr, brush_path, "rotation_path", "texture_slot.angle");
RNA_string_set(ptr, "image_id", brush_path);
if (flags & RC_COLOR)
@@ -1055,6 +1066,11 @@ static void set_brush_rc_props(PointerRNA *ptr, const char *paint,
else
RNA_string_set(ptr, "zoom_path", "");
+ if (flags & RC_SECONDARY_ROTATION)
+ RNA_boolean_set(ptr, "secondary_tex", true);
+ else
+ RNA_boolean_set(ptr, "secondary_tex", false);
+
MEM_freeN(brush_path);
}
@@ -1064,6 +1080,7 @@ static void ed_keymap_paint_brush_radial_control(wmKeyMap *keymap, const char *p
wmKeyMapItem *kmi;
/* only size needs to follow zoom, strength shows fixed size circle */
int flags_nozoom = flags & (~RC_ZOOM);
+ int flags_noradial_secondary = flags & (~(RC_SECONDARY_ROTATION | RC_ZOOM));
kmi = WM_keymap_add_item(keymap, "WM_OT_radial_control", FKEY, KM_PRESS, 0, 0);
set_brush_rc_props(kmi->ptr, paint, "size", "use_unified_size", flags);
@@ -1078,7 +1095,12 @@ static void ed_keymap_paint_brush_radial_control(wmKeyMap *keymap, const char *p
if (flags & RC_ROTATION) {
kmi = WM_keymap_add_item(keymap, "WM_OT_radial_control", FKEY, KM_PRESS, KM_CTRL, 0);
- set_brush_rc_props(kmi->ptr, paint, "texture_slot.angle", NULL, flags_nozoom);
+ set_brush_rc_props(kmi->ptr, paint, "texture_slot.angle", NULL, flags_noradial_secondary);
+ }
+
+ if (flags & RC_SECONDARY_ROTATION) {
+ kmi = WM_keymap_add_item(keymap, "WM_OT_radial_control", FKEY, KM_PRESS, KM_CTRL | KM_ALT, 0);
+ set_brush_rc_props(kmi->ptr, paint, "mask_texture_slot.angle", NULL, flags_nozoom);
}
}
@@ -1265,7 +1287,7 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
ed_keymap_paint_brush_switch(keymap, "image_paint");
ed_keymap_paint_brush_size(keymap, "tool_settings.image_paint.brush.size");
- ed_keymap_paint_brush_radial_control(keymap, "image_paint", RC_COLOR | RC_ZOOM | RC_ROTATION);
+ ed_keymap_paint_brush_radial_control(keymap, "image_paint", RC_COLOR | RC_ZOOM | RC_ROTATION | RC_SECONDARY_ROTATION);
ed_keymap_stencil(keymap);
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index 36e1b1feb38..b00b1c3ecff 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -46,6 +46,7 @@
#include "BKE_context.h"
#include "BKE_paint.h"
#include "BKE_brush.h"
+#include "BKE_colortools.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -184,7 +185,8 @@ static void paint_brush_update(bContext *C, Brush *brush, PaintMode mode,
if (paint_supports_dynamic_tex_coords(brush, mode)) {
if (((brush->mtex.brush_map_mode == MTEX_MAP_MODE_VIEW) ||
- (brush->mtex.brush_map_mode == MTEX_MAP_MODE_RANDOM)) &&
+ (brush->mtex.brush_map_mode == MTEX_MAP_MODE_AREA) ||
+ (brush->mtex.brush_map_mode == MTEX_MAP_MODE_RANDOM)) &&
!(brush->flag & BRUSH_RAKE))
{
if (brush->flag & BRUSH_RANDOM_ROTATION)
@@ -477,6 +479,9 @@ PaintStroke *paint_stroke_new(bContext *C,
stroke->redraw = redraw;
stroke->done = done;
stroke->event_type = event_type; /* for modal, return event */
+
+ /* initialize here to avoid initialization conflict with threaded strokes */
+ curvemapping_initialize(br->curve);
BKE_paint_set_overlay_override(br->overlay_flags);
@@ -567,6 +572,12 @@ bool paint_supports_smooth_stroke(Brush *br, PaintMode mode)
return true;
}
+bool paint_supports_texture(PaintMode mode)
+{
+ /* ommit: PAINT_WEIGHT, PAINT_SCULPT_UV, PAINT_INVALID */
+ return ELEM4(mode, PAINT_SCULPT, PAINT_VERTEX, PAINT_TEXTURE_PROJECTIVE, PAINT_TEXTURE_2D);
+}
+
/* return true if the brush size can change during paint (normally used for pressure) */
bool paint_supports_dynamic_tex_coords(Brush *br, PaintMode mode)
{
diff --git a/source/blender/editors/sculpt_paint/paint_undo.c b/source/blender/editors/sculpt_paint/paint_undo.c
index e406d4f5c3b..50a79005ee3 100644
--- a/source/blender/editors/sculpt_paint/paint_undo.c
+++ b/source/blender/editors/sculpt_paint/paint_undo.c
@@ -124,6 +124,30 @@ static void undo_stack_push_end(UndoStack *stack)
{
UndoElem *uel;
uintptr_t totmem, maxmem;
+ int totundo = 0;
+
+ /* first limit to undo steps */
+ uel = stack->elems.last;
+
+ while (uel) {
+ totundo++;
+ if (totundo > U.undosteps) break;
+ uel = uel->prev;
+ }
+
+ if (uel) {
+ UndoElem *first;
+
+ /* in case the undo steps are zero, the current pointer will be invalid */
+ if (uel == stack->current)
+ stack->current = NULL;
+
+ do {
+ first = stack->elems.first;
+ undo_elem_free(stack, first);
+ BLI_freelinkN(&stack->elems, first);
+ } while (first != uel);
+ }
if (U.undomemory != 0) {
/* limit to maximum memory (afterwards, we can't know in advance) */
diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c
index d376bd3180f..bfc431baea5 100644
--- a/source/blender/editors/sculpt_paint/paint_utils.c
+++ b/source/blender/editors/sculpt_paint/paint_utils.c
@@ -441,7 +441,7 @@ static int paint_select_linked_pick_invoke(bContext *C, wmOperator *op, const wm
void PAINT_OT_face_select_linked_pick(wmOperatorType *ot)
{
ot->name = "Select Linked Pick";
- ot->description = "Select linked faces";
+ ot->description = "Select linked faces under the cursor";
ot->idname = "PAINT_OT_face_select_linked_pick";
ot->invoke = paint_select_linked_pick_invoke;
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index 2c654507015..1c3caf5d8bc 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -61,6 +61,7 @@
#include "BKE_object_deform.h"
#include "BKE_paint.h"
#include "BKE_report.h"
+#include "BKE_colortools.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -68,12 +69,14 @@
#include "GPU_buffers.h"
#include "ED_armature.h"
+#include "ED_object.h"
#include "ED_mesh.h"
#include "ED_screen.h"
#include "ED_view3d.h"
#include "paint_intern.h" /* own include */
+
/* check if we can do partial updates and have them draw realtime
* (without rebuilding the 'derivedFinal') */
static int vertex_paint_use_fast_update_check(Object *ob)
@@ -916,15 +919,13 @@ static float calc_vp_strength_col_dl(VPaint *vp, ViewContext *vc, const float co
co, co_ss,
V3D_PROJ_TEST_CLIP_BB | V3D_PROJ_TEST_CLIP_NEAR) == V3D_PROJ_RET_OK)
{
- float delta[2];
- float dist_squared;
- float factor = 1.0;
+ const float dist_squared = len_squared_v2v2(mval, co_ss);
- sub_v2_v2v2(delta, mval, co_ss);
- dist_squared = dot_v2v2(delta, delta); /* len squared */
if (dist_squared <= brush_size_pressure * brush_size_pressure) {
Brush *brush = BKE_paint_brush(&vp->paint);
const float dist = sqrtf(dist_squared);
+ float factor;
+
if (brush->mtex.tex && rgba) {
if (brush->mtex.brush_map_mode == MTEX_MAP_MODE_3D) {
BKE_brush_sample_tex_3D(vc->scene, brush, co, rgba, 0, NULL);
@@ -935,6 +936,9 @@ static float calc_vp_strength_col_dl(VPaint *vp, ViewContext *vc, const float co
}
factor = rgba[3];
}
+ else {
+ factor = 1.0f;
+ }
return factor * BKE_brush_curve_strength_clamp(brush, dist, brush_size_pressure);
}
}
@@ -2025,41 +2029,28 @@ static void do_weight_paint_vertex(
/* *************** set wpaint operator ****************** */
-static int wpaint_mode_toggle_exec(bContext *C, wmOperator *UNUSED(op)) /* toggle */
+/**
+ * \note Keep in sync with #vpaint_mode_toggle_exec
+ */
+static int wpaint_mode_toggle_exec(bContext *C, wmOperator *op)
{
Object *ob = CTX_data_active_object(C);
+ const int mode_flag = OB_MODE_WEIGHT_PAINT;
+ const bool is_mode_set = (ob->mode & mode_flag) != 0;
Scene *scene = CTX_data_scene(C);
VPaint *wp = scene->toolsettings->wpaint;
Mesh *me;
-
- me = BKE_mesh_from_object(ob);
- if (ob->id.lib || me == NULL) return OPERATOR_PASS_THROUGH;
-
- if (ob->mode & OB_MODE_WEIGHT_PAINT) ob->mode &= ~OB_MODE_WEIGHT_PAINT;
- else ob->mode |= OB_MODE_WEIGHT_PAINT;
-
-
- /* Weightpaint works by overriding colors in mesh,
- * so need to make sure we recalc on enter and
- * exit (exit needs doing regardless because we
- * should redeform).
- */
- DAG_id_tag_update(&me->id, 0);
-
- if (ob->mode & OB_MODE_WEIGHT_PAINT) {
- if (wp == NULL)
- wp = scene->toolsettings->wpaint = new_vpaint(1);
- BKE_paint_init(&wp->paint, PAINT_CURSOR_WEIGHT_PAINT);
- paint_cursor_start(C, weight_paint_poll);
-
- mesh_octree_table(ob, NULL, NULL, 's');
-
- ED_vgroup_sync_from_pose(ob);
+ if (!is_mode_set) {
+ if (!ED_object_mode_compat_set(C, ob, mode_flag, op->reports)) {
+ return OPERATOR_CANCELLED;
+ }
}
- else {
- mesh_octree_table(NULL, NULL, NULL, 'e');
- mesh_mirrtopo_table(NULL, 'e');
+
+ me = BKE_mesh_from_object(ob);
+
+ if (ob->mode & mode_flag) {
+ ob->mode &= ~mode_flag;
if (me->editflag & ME_EDIT_PAINT_VERT_SEL) {
BKE_mesh_flush_select_from_verts(me);
@@ -2067,10 +2058,37 @@ static int wpaint_mode_toggle_exec(bContext *C, wmOperator *UNUSED(op)) /* togg
else if (me->editflag & ME_EDIT_PAINT_FACE_SEL) {
BKE_mesh_flush_select_from_polys(me);
}
+
+ /* weight paint spesific */
+ mesh_octree_table(NULL, NULL, NULL, 'e');
+ mesh_mirrtopo_table(NULL, 'e');
+
+ paint_cursor_delete_textures();
+ }
+ else {
+ ob->mode |= mode_flag;
+
+ if (wp == NULL)
+ wp = scene->toolsettings->wpaint = new_vpaint(1);
+
+ paint_cursor_start(C, weight_paint_poll);
+
+ BKE_paint_init(&wp->paint, PAINT_CURSOR_WEIGHT_PAINT);
+
+ /* weight paint spesific */
+ mesh_octree_table(ob, NULL, NULL, 's');
+ ED_vgroup_sync_from_pose(ob);
}
+ /* Weightpaint works by overriding colors in mesh,
+ * so need to make sure we recalc on enter and
+ * exit (exit needs doing regardless because we
+ * should redeform).
+ */
+ DAG_id_tag_update(&me->id, 0);
+
WM_event_add_notifier(C, NC_SCENE | ND_MODE, scene);
-
+
return OPERATOR_FINISHED;
}
@@ -2078,12 +2096,12 @@ static int wpaint_mode_toggle_exec(bContext *C, wmOperator *UNUSED(op)) /* togg
static int paint_poll_test(bContext *C)
{
Object *ob = CTX_data_active_object(C);
- if (CTX_data_edit_object(C))
- return 0;
- if (CTX_data_active_object(C) == NULL)
+ if (ob == NULL || ob->type != OB_MESH)
return 0;
if (!ob->data || ((ID *)ob->data)->lib)
return 0;
+ if (CTX_data_edit_object(C))
+ return 0;
return 1;
}
@@ -2633,7 +2651,7 @@ void PAINT_OT_weight_set(wmOperatorType *ot)
/* api callbacks */
ot->exec = weight_paint_set_exec;
- ot->poll = mask_paint_poll; /* it was facemask_paint_poll */
+ ot->poll = mask_paint_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -2641,40 +2659,43 @@ void PAINT_OT_weight_set(wmOperatorType *ot)
/* ************ set / clear vertex paint mode ********** */
-
-static int vpaint_mode_toggle_exec(bContext *C, wmOperator *op) /* toggle */
+/**
+ * \note Keep in sync with #wpaint_mode_toggle_exec
+ */
+static int vpaint_mode_toggle_exec(bContext *C, wmOperator *op)
{
Object *ob = CTX_data_active_object(C);
+ const int mode_flag = OB_MODE_VERTEX_PAINT;
+ const bool is_mode_set = (ob->mode & mode_flag) != 0;
Scene *scene = CTX_data_scene(C);
VPaint *vp = scene->toolsettings->vpaint;
Mesh *me;
-
- me = BKE_mesh_from_object(ob);
-
- if (me == NULL || BKE_object_obdata_is_libdata(ob)) {
- ob->mode &= ~OB_MODE_VERTEX_PAINT;
- return OPERATOR_PASS_THROUGH;
- }
-
- if (me && me->mloopcol == NULL) {
- make_vertexcol(ob);
+
+ if (!is_mode_set) {
+ if (!ED_object_mode_compat_set(C, ob, mode_flag, op->reports)) {
+ return OPERATOR_CANCELLED;
+ }
}
+
+ me = BKE_mesh_from_object(ob);
/* toggle: end vpaint */
- if (ob->mode & OB_MODE_VERTEX_PAINT) {
-
- ob->mode &= ~OB_MODE_VERTEX_PAINT;
+ if (is_mode_set) {
+ ob->mode &= ~mode_flag;
if (me->editflag & ME_EDIT_PAINT_FACE_SEL) {
BKE_mesh_flush_select_from_polys(me);
}
+
+ paint_cursor_delete_textures();
}
else {
- ob->mode |= OB_MODE_VERTEX_PAINT;
- /* Turn off weight painting */
- if (ob->mode & OB_MODE_WEIGHT_PAINT)
- wpaint_mode_toggle_exec(C, op);
-
+ ob->mode |= mode_flag;
+
+ if (me->mloopcol == NULL) {
+ make_vertexcol(ob);
+ }
+
if (vp == NULL)
vp = scene->toolsettings->vpaint = new_vpaint(0);
@@ -2767,7 +2788,7 @@ static void vpaint_build_poly_facemap(struct VPaintData *vd, Mesh *me)
int *origIndex;
int i;
- vd->polyfacemap_arena = BLI_memarena_new(1 << 13, "vpaint tmp");
+ vd->polyfacemap_arena = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, "vpaint tmp");
BLI_memarena_use_calloc(vd->polyfacemap_arena);
vd->polyfacemap = BLI_memarena_alloc(vd->polyfacemap_arena, sizeof(ListBase) * me->totpoly);
@@ -3407,6 +3428,9 @@ static int paint_weight_gradient_exec(bContext *C, wmOperator *op)
ToolSettings *ts = CTX_data_tool_settings(C);
VPaint *wp = ts->wpaint;
struct Brush *brush = BKE_paint_brush(&wp->paint);
+
+ curvemapping_initialize(brush->curve);
+
data.brush = brush;
data.weightpaint = BKE_brush_weight_get(scene, brush);
}
@@ -3460,7 +3484,7 @@ void PAINT_OT_weight_gradient(wmOperatorType *ot)
/* identifiers */
ot->name = "Weight Gradient";
ot->idname = "PAINT_OT_weight_gradient";
- ot->description = "Sample a line and show it in Scope panels";
+ ot->description = "Draw a line to apply a weight gradient to selected vertices";
/* api callbacks */
ot->invoke = paint_weight_gradient_invoke;
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 2edd00c015d..a7a7b6ab84a 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -70,6 +70,7 @@
#include "BKE_node.h"
#include "BKE_object.h"
#include "BKE_subsurf.h"
+#include "BKE_colortools.h"
#include "BIF_glutil.h"
@@ -77,6 +78,7 @@
#include "WM_types.h"
#include "ED_sculpt.h"
+#include "ED_object.h"
#include "ED_screen.h"
#include "ED_view3d.h"
#include "ED_util.h" /* for crazyspace correction */
@@ -91,6 +93,7 @@
#include "GPU_buffers.h"
#include "bmesh.h"
+#include "bmesh_tools.h"
#include <math.h>
#include <stdlib.h>
@@ -150,6 +153,7 @@ MultiresModifierData *sculpt_multires_active(Scene *scene, Object *ob)
{
Mesh *me = (Mesh *)ob->data;
ModifierData *md;
+ VirtualModifierData virtualModifierData;
if (ob->sculpt && ob->sculpt->bm) {
/* can't combine multires and dynamic topology */
@@ -161,7 +165,7 @@ MultiresModifierData *sculpt_multires_active(Scene *scene, Object *ob)
return NULL;
}
- for (md = modifiers_getVirtualModifierList(ob); md; md = md->next) {
+ for (md = modifiers_getVirtualModifierList(ob, &virtualModifierData); md; md = md->next) {
if (md->type == eModifierType_Multires) {
MultiresModifierData *mmd = (MultiresModifierData *)md;
@@ -180,8 +184,9 @@ MultiresModifierData *sculpt_multires_active(Scene *scene, Object *ob)
static int sculpt_has_active_modifiers(Scene *scene, Object *ob)
{
ModifierData *md;
+ VirtualModifierData virtualModifierData;
- md = modifiers_getVirtualModifierList(ob);
+ md = modifiers_getVirtualModifierList(ob, &virtualModifierData);
/* exception for shape keys because we can edit those */
for (; md; md = md->next) {
@@ -198,6 +203,7 @@ static int sculpt_modifiers_active(Scene *scene, Sculpt *sd, Object *ob)
ModifierData *md;
Mesh *me = (Mesh *)ob->data;
MultiresModifierData *mmd = sculpt_multires_active(scene, ob);
+ VirtualModifierData virtualModifierData;
if (mmd || ob->sculpt->bm)
return 0;
@@ -206,7 +212,7 @@ static int sculpt_modifiers_active(Scene *scene, Sculpt *sd, Object *ob)
if ((ob->shapeflag & OB_SHAPE_LOCK) == 0 && me->key && ob->shapenr)
return 1;
- md = modifiers_getVirtualModifierList(ob);
+ md = modifiers_getVirtualModifierList(ob, &virtualModifierData);
/* exception for shape keys because we can edit those */
for (; md; md = md->next) {
@@ -327,7 +333,7 @@ typedef struct {
/* Original coordinate, normal, and mask */
const float *co;
float mask;
- short no[3];
+ const short *no;
} SculptOrigVertData;
@@ -378,11 +384,10 @@ static void sculpt_orig_vert_data_update(SculptOrigVertData *orig_data,
}
if (orig_data->normals) {
- copy_v3_v3_short(orig_data->no, orig_data->normals[iter->i]);
+ orig_data->no = orig_data->normals[iter->i];
}
else {
- /* TODO: log doesn't store normals yet */
- normal_float_to_short_v3(orig_data->no, iter->bm_vert->no);
+ orig_data->no = BM_log_original_vert_no(orig_data->bm_log, iter->bm_vert);
}
}
else if (orig_data->unode->type == SCULPT_UNDO_MASK) {
@@ -664,10 +669,10 @@ static int sculpt_brush_test_cube(SculptBrushTest *test, float co[3], float loca
}
}
-static float frontface(Brush *brush, const float sculpt_normal[3],
+static float frontface(Brush *br, const float sculpt_normal[3],
const short no[3], const float fno[3])
{
- if (brush->flag & BRUSH_FRONTFACE) {
+ if (br->flag & BRUSH_FRONTFACE) {
float dot;
if (no) {
@@ -944,7 +949,8 @@ static float tex_strength(SculptSession *ss, Brush *br,
const float fno[3],
const float mask)
{
- const Scene *scene = ss->cache->vc->scene;
+ StrokeCache *cache = ss->cache;
+ const Scene *scene = cache->vc->scene;
MTex *mtex = &br->mtex;
float avg = 1;
float rgba[4];
@@ -966,12 +972,12 @@ static float tex_strength(SculptSession *ss, Brush *br,
* position in order to project it. This insures that the
* brush texture will be oriented correctly. */
- flip_v3_v3(symm_point, point, ss->cache->mirror_symmetry_pass);
+ flip_v3_v3(symm_point, point, cache->mirror_symmetry_pass);
- if (ss->cache->radial_symmetry_pass)
- mul_m4_v3(ss->cache->symm_rot_mat_inv, symm_point);
+ if (cache->radial_symmetry_pass)
+ mul_m4_v3(cache->symm_rot_mat_inv, symm_point);
- ED_view3d_project_float_v2_m4(ss->cache->vc->ar, symm_point, point_2d, ss->cache->projection_mat);
+ ED_view3d_project_float_v2_m4(cache->vc->ar, symm_point, point_2d, cache->projection_mat);
/* still no symmetry supported for other paint modes.
* Sculpt does it DIY */
@@ -979,7 +985,7 @@ static float tex_strength(SculptSession *ss, Brush *br,
/* Similar to fixed mode, but projects from brush angle
* rather than view direction */
- mul_m4_v3(ss->cache->brush_local_mat, symm_point);
+ mul_m4_v3(cache->brush_local_mat, symm_point);
x = symm_point[0];
y = symm_point[1];
@@ -1001,7 +1007,7 @@ static float tex_strength(SculptSession *ss, Brush *br,
}
/* Falloff curve */
- avg *= BKE_brush_curve_strength(br, len, ss->cache->radius);
+ avg *= BKE_brush_curve_strength(br, len, cache->radius);
avg *= frontface(br, sculpt_normal, vno, fno);
@@ -1073,8 +1079,10 @@ static void add_norm_if(float view_vec[3], float out[3], float out_flip[3], floa
static void calc_area_normal(Sculpt *sd, Object *ob, float an[3], PBVHNode **nodes, int totnode)
{
- SculptSession *ss = ob->sculpt;
float out_flip[3] = {0.0f, 0.0f, 0.0f};
+
+ SculptSession *ss = ob->sculpt;
+ const Brush *brush = BKE_paint_brush(&sd->paint);
int n, original;
/* Grab brush requires to test on original data (see r33888 and
@@ -1083,8 +1091,14 @@ static void calc_area_normal(Sculpt *sd, Object *ob, float an[3], PBVHNode **nod
TRUE : ss->cache->original);
/* In general the original coords are not available with dynamic
- * topology */
- if (ss->bm)
+ * topology
+ *
+ * Mask tool could not use undo nodes to get coordinates from
+ * since the coordinates are not stored in those odes.
+ * And mask tool is not gonna to modify vertex coordinates,
+ * so we don't actually need to use modified coords.
+ */
+ if (ss->bm || brush->sculpt_tool == SCULPT_TOOL_MASK)
original = FALSE;
(void)sd; /* unused w/o openmp */
@@ -2274,7 +2288,10 @@ static void calc_flatten_center(Sculpt *sd, Object *ob, PBVHNode **nodes, int to
SculptSession *ss = ob->sculpt;
int n;
- float count = 0;
+ int count = 0;
+ int count_flip = 0;
+
+ float fc_flip[3] = {0.0, 0.0, 0.0};
(void)sd; /* unused w/o openmp */
@@ -2286,7 +2303,9 @@ static void calc_flatten_center(Sculpt *sd, Object *ob, PBVHNode **nodes, int to
SculptBrushTest test;
SculptUndoNode *unode;
float private_fc[3] = {0.0f, 0.0f, 0.0f};
+ float private_fc_flip[3] = {0.0f, 0.0f, 0.0f};
int private_count = 0;
+ int private_count_flip = 0;
unode = sculpt_undo_push_node(ob, nodes[n], SCULPT_UNDO_COORDS);
sculpt_brush_test_init(ss, &test);
@@ -2295,8 +2314,17 @@ static void calc_flatten_center(Sculpt *sd, Object *ob, PBVHNode **nodes, int to
BKE_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE)
{
if (sculpt_brush_test_fast(&test, unode->co[vd.i])) {
- add_v3_v3(private_fc, unode->co[vd.i]);
- private_count++;
+ float fno[3];
+
+ normal_short_to_float_v3(fno, unode->no[vd.i]);
+ if (dot_v3v3(ss->cache->view_normal, fno) > 0) {
+ add_v3_v3(private_fc, unode->co[vd.i]);
+ private_count++;
+ }
+ else {
+ add_v3_v3(private_fc_flip, unode->co[vd.i]);
+ private_count_flip++;
+ }
}
}
BKE_pbvh_vertex_iter_end;
@@ -2305,8 +2333,31 @@ static void calc_flatten_center(Sculpt *sd, Object *ob, PBVHNode **nodes, int to
BKE_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE)
{
if (sculpt_brush_test_fast(&test, vd.co)) {
- add_v3_v3(private_fc, vd.co);
- private_count++;
+ /* for area normal */
+ if (vd.no) {
+ float fno[3];
+
+ normal_short_to_float_v3(fno, vd.no);
+
+ if (dot_v3v3(ss->cache->view_normal, fno) > 0) {
+ add_v3_v3(private_fc, vd.co);
+ private_count++;
+ }
+ else {
+ add_v3_v3(private_fc_flip, vd.co);
+ private_count_flip++;
+ }
+ }
+ else {
+ if (dot_v3v3(ss->cache->view_normal, vd.fno) > 0) {
+ add_v3_v3(private_fc, vd.co);
+ private_count++;
+ }
+ else {
+ add_v3_v3(private_fc_flip, vd.co);
+ private_count_flip++;
+ }
+ }
}
}
BKE_pbvh_vertex_iter_end;
@@ -2315,11 +2366,17 @@ static void calc_flatten_center(Sculpt *sd, Object *ob, PBVHNode **nodes, int to
#pragma omp critical
{
add_v3_v3(fc, private_fc);
+ add_v3_v3(fc_flip, private_fc_flip);
count += private_count;
+ count_flip += private_count_flip;
}
}
-
- mul_v3_fl(fc, 1.0f / count);
+ if (count != 0)
+ mul_v3_fl(fc, 1.0f / count);
+ else if (count_flip != 0)
+ mul_v3_v3fl(fc, fc_flip, 1.0f / count_flip);
+ else
+ zero_v3(fc);
}
/* this calculates flatten center and area normal together,
@@ -2333,9 +2390,11 @@ static void calc_area_normal_and_flatten_center(Sculpt *sd, Object *ob,
/* for area normal */
float out_flip[3] = {0.0f, 0.0f, 0.0f};
+ float fc_flip[3] = {0.0f, 0.0f, 0.0f};
/* for flatten center */
- float count = 0;
+ int count = 0;
+ int count_flipped = 0;
(void)sd; /* unused w/o openmp */
@@ -2353,7 +2412,9 @@ static void calc_area_normal_and_flatten_center(Sculpt *sd, Object *ob,
float private_an[3] = {0.0f, 0.0f, 0.0f};
float private_out_flip[3] = {0.0f, 0.0f, 0.0f};
float private_fc[3] = {0.0f, 0.0f, 0.0f};
+ float private_fc_flip[3] = {0.0f, 0.0f, 0.0f};
int private_count = 0;
+ int private_count_flip = 0;
unode = sculpt_undo_push_node(ob, nodes[n], SCULPT_UNDO_COORDS);
sculpt_brush_test_init(ss, &test);
@@ -2366,11 +2427,17 @@ static void calc_area_normal_and_flatten_center(Sculpt *sd, Object *ob,
float fno[3];
normal_short_to_float_v3(fno, unode->no[vd.i]);
- add_norm_if(ss->cache->view_normal, private_an, private_out_flip, fno);
- /* for flatten center */
- add_v3_v3(private_fc, unode->co[vd.i]);
- private_count++;
+ if (dot_v3v3(ss->cache->view_normal, fno) > 0) {
+ add_v3_v3(private_an, fno);
+ add_v3_v3(private_fc, unode->co[vd.i]);
+ private_count++;
+ }
+ else {
+ add_v3_v3(private_out_flip, fno);
+ add_v3_v3(private_fc_flip, unode->co[vd.i]);
+ private_count_flip++;
+ }
}
}
BKE_pbvh_vertex_iter_end;
@@ -2384,15 +2451,30 @@ static void calc_area_normal_and_flatten_center(Sculpt *sd, Object *ob,
float fno[3];
normal_short_to_float_v3(fno, vd.no);
- add_norm_if(ss->cache->view_normal, private_an, private_out_flip, fno);
+
+ if (dot_v3v3(ss->cache->view_normal, fno) > 0) {
+ add_v3_v3(private_an, fno);
+ add_v3_v3(private_fc, vd.co);
+ private_count++;
+ }
+ else {
+ add_v3_v3(private_out_flip, fno);
+ add_v3_v3(private_fc_flip, vd.co);
+ private_count_flip++;
+ }
}
else {
- add_norm_if(ss->cache->view_normal, private_an, private_out_flip, vd.fno);
+ if (dot_v3v3(ss->cache->view_normal, vd.fno) > 0) {
+ add_v3_v3(private_an, vd.fno);
+ add_v3_v3(private_fc, vd.co);
+ private_count++;
+ }
+ else {
+ add_v3_v3(private_out_flip, vd.fno);
+ add_v3_v3(private_fc_flip, vd.co);
+ private_count_flip++;
+ }
}
-
- /* for flatten center */
- add_v3_v3(private_fc, vd.co);
- private_count++;
}
}
BKE_pbvh_vertex_iter_end;
@@ -2406,7 +2488,9 @@ static void calc_area_normal_and_flatten_center(Sculpt *sd, Object *ob,
/* for flatten center */
add_v3_v3(fc, private_fc);
+ add_v3_v3(fc_flip, private_fc_flip);
count += private_count;
+ count_flipped += private_count_flip;
}
}
@@ -2417,12 +2501,12 @@ static void calc_area_normal_and_flatten_center(Sculpt *sd, Object *ob,
normalize_v3(an);
/* for flatten center */
- if (count != 0) {
+ if (count != 0)
mul_v3_fl(fc, 1.0f / count);
- }
- else {
+ else if (count_flipped != 0)
+ mul_v3_v3fl(fc, fc_flip, 1.0f / count_flipped);
+ else
zero_v3(fc);
- }
}
static void calc_sculpt_plane(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode, float an[3], float fc[3])
@@ -3422,7 +3506,7 @@ static void sculpt_update_tex(const Scene *scene, Sculpt *sd, SculptSession *ss)
/* Need to allocate a bigger buffer for bigger brush size */
ss->texcache_side = 2 * radius;
if (!ss->texcache || ss->texcache_side > ss->texcache_actual) {
- ss->texcache = BKE_brush_gen_texture_cache(brush, radius);
+ ss->texcache = BKE_brush_gen_texture_cache(brush, radius, false);
ss->texcache_actual = ss->texcache_side;
ss->tex_pool = BKE_image_pool_new();
}
@@ -3716,16 +3800,28 @@ static void sculpt_update_cache_invariants(bContext *C, Sculpt *sd, SculptSessio
Brush *brush = BKE_paint_brush(&sd->paint);
ViewContext *vc = paint_stroke_view_context(op->customdata);
Object *ob = CTX_data_active_object(C);
- float rot[3][3], scale[3], loc[3];
+ float mat[3][3];
+ float viewDir[3] = {0.0f, 0.0f, 1.0f};
+ float max_scale;
int i;
int mode;
ss->cache = cache;
/* Set scaling adjustment */
- cache->scale[0] = 1.0f / ob->size[0];
- cache->scale[1] = 1.0f / ob->size[1];
- cache->scale[2] = 1.0f / ob->size[2];
+ if (brush->sculpt_tool == SCULPT_TOOL_LAYER) {
+ max_scale = 1.0f;
+ }
+ else {
+ max_scale = 0.0f;
+ for (i = 0; i < 3; i ++) {
+ max_scale = max_ff(max_scale, fabsf(ob->size[i]));
+ }
+ }
+ cache->scale[0] = max_scale / ob->size[0];
+ cache->scale[1] = max_scale / ob->size[1];
+ cache->scale[2] = max_scale / ob->size[2];
+
cache->plane_trim_squared = brush->plane_trim * brush->plane_trim;
@@ -3768,6 +3864,7 @@ static void sculpt_update_cache_invariants(bContext *C, Sculpt *sd, SculptSessio
brush = br;
cache->saved_smooth_size = BKE_brush_size_get(scene, brush);
BKE_brush_size_set(scene, brush, size);
+ curvemapping_initialize(brush->curve);
}
}
}
@@ -3784,12 +3881,13 @@ static void sculpt_update_cache_invariants(bContext *C, Sculpt *sd, SculptSessio
/* cache projection matrix */
ED_view3d_ob_project_mat_get(cache->vc->rv3d, ob, cache->projection_mat);
- mat4_to_loc_rot_size(loc, rot, scale, ob->obmat);
- /* transposing an orthonormal matrix inverts */
- transpose_m3(rot);
- ED_view3d_global_to_vector(cache->vc->rv3d, cache->vc->rv3d->twmat[3], cache->true_view_normal);
- /* This takes care of rotated mesh. Instead of rotating every normal, we inverse rotate view normal. */
- mul_m3_v3(rot, cache->true_view_normal);
+ invert_m4_m4(ob->imat, ob->obmat);
+ copy_m3_m4(mat, cache->vc->rv3d->viewinv);
+ mul_m3_v3(mat, viewDir);
+ copy_m3_m4(mat, ob->imat);
+ mul_m3_v3(mat, viewDir);
+ normalize_v3_v3(cache->true_view_normal, viewDir);
+
/* Initialize layer brush displacements and persistent coords */
if (brush->sculpt_tool == SCULPT_TOOL_LAYER) {
/* not supported yet for multires or dynamic topology */
@@ -3823,10 +3921,10 @@ static void sculpt_update_cache_invariants(bContext *C, Sculpt *sd, SculptSessio
cache->original = 1;
}
- if (ELEM8(brush->sculpt_tool,
+ if (ELEM9(brush->sculpt_tool,
SCULPT_TOOL_DRAW, SCULPT_TOOL_CREASE, SCULPT_TOOL_BLOB,
SCULPT_TOOL_LAYER, SCULPT_TOOL_INFLATE, SCULPT_TOOL_CLAY,
- SCULPT_TOOL_CLAY_STRIPS, SCULPT_TOOL_ROTATE))
+ SCULPT_TOOL_CLAY_STRIPS, SCULPT_TOOL_ROTATE, SCULPT_TOOL_FLATTEN))
{
if (!(brush->flag & BRUSH_ACCUMULATE)) {
cache->original = 1;
@@ -4561,7 +4659,9 @@ static void SCULPT_OT_set_persistent_base(wmOperatorType *ot)
static void sculpt_dynamic_topology_triangulate(BMesh *bm)
{
- BM_mesh_triangulate(bm, false, false, NULL, NULL);
+ if (bm->totloop != bm->totface * 3) {
+ BM_mesh_triangulate(bm, false, false, NULL, NULL);
+ }
}
void sculpt_pbvh_clear(Object *ob)
@@ -4595,10 +4695,7 @@ void sculpt_dynamic_topology_enable(bContext *C)
Object *ob = CTX_data_active_object(C);
SculptSession *ss = ob->sculpt;
Mesh *me = ob->data;
- const BMAllocTemplate allocsize = {me->totvert,
- me->totedge,
- me->totloop,
- me->totpoly};
+ const BMAllocTemplate allocsize = BMALLOC_TEMPLATE_FROM_ME(me);
sculpt_pbvh_clear(ob);
@@ -4800,8 +4897,8 @@ static int sculpt_symmetrize_exec(bContext *C, wmOperator *UNUSED(op))
/* Symmetrize and re-triangulate */
BMO_op_callf(ss->bm, BMO_FLAG_DEFAULTS,
- "symmetrize input=%avef direction=%i",
- sd->symmetrize_direction);
+ "symmetrize input=%avef direction=%i dist=%f",
+ sd->symmetrize_direction, 0.00001f);
sculpt_dynamic_topology_triangulate(ss->bm);
/* Finish undo */
@@ -4849,7 +4946,7 @@ int ED_sculpt_mask_layers_ensure(Object *ob, MultiresModifierData *mmd)
if (mmd && !CustomData_has_layer(&me->ldata, CD_GRID_PAINT_MASK)) {
GridPaintMask *gmask;
int level = max_ii(1, mmd->sculptlvl);
- int gridsize = ccg_gridsize(level);
+ int gridsize = BKE_ccg_gridsize(level);
int gridarea = gridsize * gridsize;
int i, j;
@@ -4907,21 +5004,31 @@ int ED_sculpt_mask_layers_ensure(Object *ob, MultiresModifierData *mmd)
return ret;
}
-static int sculpt_mode_toggle_exec(bContext *C, wmOperator *UNUSED(op))
+static int sculpt_mode_toggle_exec(bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
ToolSettings *ts = CTX_data_tool_settings(C);
Object *ob = CTX_data_active_object(C);
- Mesh *me = ob->data;
+ const int mode_flag = OB_MODE_SCULPT;
+ const bool is_mode_set = (ob->mode & mode_flag) != 0;
+ Mesh *me;
MultiresModifierData *mmd = sculpt_multires_active(scene, ob);
int flush_recalc = 0;
+ if (!is_mode_set) {
+ if (!ED_object_mode_compat_set(C, ob, mode_flag, op->reports)) {
+ return OPERATOR_CANCELLED;
+ }
+ }
+
+ me = BKE_mesh_from_object(ob);
+
/* multires in sculpt mode could have different from object mode subdivision level */
flush_recalc |= mmd && mmd->sculptlvl != mmd->lvl;
/* if object has got active modifiers, it's dm could be different in sculpt mode */
flush_recalc |= sculpt_has_active_modifiers(scene, ob);
- if (ob->mode & OB_MODE_SCULPT) {
+ if (is_mode_set) {
if (mmd)
multires_force_update(ob);
@@ -4936,13 +5043,15 @@ static int sculpt_mode_toggle_exec(bContext *C, wmOperator *UNUSED(op))
}
/* Leave sculptmode */
- ob->mode &= ~OB_MODE_SCULPT;
+ ob->mode &= ~mode_flag;
free_sculptsession(ob);
+
+ paint_cursor_delete_textures();
}
else {
/* Enter sculptmode */
- ob->mode |= OB_MODE_SCULPT;
+ ob->mode |= mode_flag;
/* Remove dynamic-topology flag; this will be enabled if the
* file was saved with dynamic topology on, but we don't
diff --git a/source/blender/editors/sculpt_paint/sculpt_uv.c b/source/blender/editors/sculpt_paint/sculpt_uv.c
index 9c73d4d9477..626df03a5d4 100644
--- a/source/blender/editors/sculpt_paint/sculpt_uv.c
+++ b/source/blender/editors/sculpt_paint/sculpt_uv.c
@@ -45,6 +45,7 @@
#include "BKE_brush.h"
#include "BKE_paint.h"
+#include "BKE_colortools.h"
#include "BKE_context.h"
#include "BKE_main.h"
#include "BKE_depsgraph.h"
@@ -479,7 +480,7 @@ static void uv_sculpt_stroke_exit(bContext *C, wmOperator *op)
WM_event_remove_timer(CTX_wm_manager(C), CTX_wm_window(C), data->timer);
}
if (data->elementMap) {
- EDBM_uv_element_map_free(data->elementMap);
+ BM_uv_element_map_free(data->elementMap);
}
if (data->uv) {
MEM_freeN(data->uv);
@@ -500,7 +501,7 @@ static void uv_sculpt_stroke_exit(bContext *C, wmOperator *op)
static int uv_element_offset_from_face_get(UvElementMap *map, BMFace *efa, BMLoop *l, int island_index, int doIslands)
{
- UvElement *element = ED_uv_element_get(map, efa, l);
+ UvElement *element = BM_uv_element_get(map, efa, l);
if (!element || (doIslands && element->island != island_index)) {
return -1;
}
@@ -538,6 +539,8 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, const wm
op->customdata = data;
+ curvemapping_initialize(ts->uvsculpt->paint.brush->curve);
+
if (data) {
int counter = 0, i;
ARegion *ar = CTX_wm_region(C);
@@ -563,18 +566,18 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, const wm
if (do_island_optimization) {
/* We will need island information */
if (ts->uv_flag & UV_SYNC_SELECTION) {
- data->elementMap = EDBM_uv_element_map_create(em, 0, 1);
+ data->elementMap = BM_uv_element_map_create(bm, false, true);
}
else {
- data->elementMap = EDBM_uv_element_map_create(em, 1, 1);
+ data->elementMap = BM_uv_element_map_create(bm, true, true);
}
}
else {
if (ts->uv_flag & UV_SYNC_SELECTION) {
- data->elementMap = EDBM_uv_element_map_create(em, 0, 0);
+ data->elementMap = BM_uv_element_map_create(bm, false, false);
}
else {
- data->elementMap = EDBM_uv_element_map_create(em, 1, 0);
+ data->elementMap = BM_uv_element_map_create(bm, true, false);
}
}
@@ -593,7 +596,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, const wm
Image *ima = CTX_data_edit_image(C);
uv_find_nearest_vert(scene, ima, em, co, NULL, &hit);
- element = ED_uv_element_get(data->elementMap, hit.efa, hit.l);
+ element = BM_uv_element_get(data->elementMap, hit.efa, hit.l);
island_index = element->island;
}
@@ -662,6 +665,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, const wm
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
int offset1, itmp1 = uv_element_offset_from_face_get(data->elementMap, efa, l, island_index, do_island_optimization);
int offset2, itmp2 = uv_element_offset_from_face_get(data->elementMap, efa, l->next, island_index, do_island_optimization);
+ char *flag;
/* Skip edge if not found(unlikely) or not on valid island */
if (itmp1 == -1 || itmp2 == -1)
@@ -682,8 +686,8 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, const wm
edges[counter].uv2 = offset1;
}
/* Hack! Set the value of the key to its flag. Now we can set the flag when an edge exists twice :) */
- if (BLI_ghash_haskey(edgeHash, &edges[counter])) {
- char *flag = BLI_ghash_lookup(edgeHash, &edges[counter]);
+ flag = BLI_ghash_lookup(edgeHash, &edges[counter]);
+ if (flag) {
*flag = 1;
}
else {
diff --git a/source/blender/editors/space_action/action_ops.c b/source/blender/editors/space_action/action_ops.c
index 7d238bf7887..346ffcbc3e2 100644
--- a/source/blender/editors/space_action/action_ops.c
+++ b/source/blender/editors/space_action/action_ops.c
@@ -97,12 +97,9 @@ void ED_operatormacros_action(void)
ot = WM_operatortype_append_macro("ACTION_OT_duplicate_move", "Duplicate",
"Make a copy of all selected keyframes and move them",
OPTYPE_UNDO | OPTYPE_REGISTER);
- if (ot) {
- WM_operatortype_macro_define(ot, "ACTION_OT_duplicate");
- otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_transform");
- RNA_enum_set(otmacro->ptr, "mode", TFM_TIME_DUPLICATE);
- }
-
+ WM_operatortype_macro_define(ot, "ACTION_OT_duplicate");
+ otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_transform");
+ RNA_enum_set(otmacro->ptr, "mode", TFM_TIME_DUPLICATE);
}
/* ************************** registration - keymaps **********************************/
@@ -112,21 +109,38 @@ static void action_keymap_keyframes(wmKeyConfig *keyconf, wmKeyMap *keymap)
wmKeyMapItem *kmi;
/* action_select.c - selection tools */
- /* click-select */
+ /* click-select: keyframe (replace) */
kmi = WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, 0, 0);
RNA_boolean_set(kmi->ptr, "extend", FALSE);
RNA_boolean_set(kmi->ptr, "column", FALSE);
+ RNA_boolean_set(kmi->ptr, "channel", FALSE);
+ /* click-select: all on same frame (replace) */
kmi = WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT, 0);
RNA_boolean_set(kmi->ptr, "extend", FALSE);
RNA_boolean_set(kmi->ptr, "column", TRUE);
+ RNA_boolean_set(kmi->ptr, "channel", FALSE);
+ /* click-select: keyframe (add) */
kmi = WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
RNA_boolean_set(kmi->ptr, "extend", TRUE);
RNA_boolean_set(kmi->ptr, "column", FALSE);
+ RNA_boolean_set(kmi->ptr, "channel", FALSE);
+ /* click-select: all on same frame (add) */
kmi = WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT | KM_SHIFT, 0);
RNA_boolean_set(kmi->ptr, "extend", TRUE);
RNA_boolean_set(kmi->ptr, "column", TRUE);
+ RNA_boolean_set(kmi->ptr, "channel", FALSE);
+ /* click-select: all on same channel (replace) */
+ kmi = WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_ALT, 0);
+ RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "column", FALSE);
+ RNA_boolean_set(kmi->ptr, "channel", TRUE);
+ /* click-select: all on same channel (add) */
+ kmi = WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_ALT | KM_SHIFT, 0);
+ RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_boolean_set(kmi->ptr, "column", FALSE);
+ RNA_boolean_set(kmi->ptr, "channel", TRUE);
- /* select left/right */
+ /* click-select: left/right */
kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
RNA_boolean_set(kmi->ptr, "extend", FALSE);
RNA_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_TEST);
@@ -163,7 +177,7 @@ static void action_keymap_keyframes(wmKeyConfig *keyconf, wmKeyMap *keymap)
WM_keymap_add_item(keymap, "ACTION_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "ACTION_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0);
- /* select linekd */
+ /* select linked */
WM_keymap_add_item(keymap, "ACTION_OT_select_linked", LKEY, KM_PRESS, 0, 0);
diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c
index 9d124cf08ee..d62dd88418f 100644
--- a/source/blender/editors/space_action/action_select.c
+++ b/source/blender/editors/space_action/action_select.c
@@ -930,6 +930,7 @@ void ACTION_OT_select_leftright(wmOperatorType *ot)
* - 1) keyframe under mouse - no special modifiers
* - 2) all keyframes on the same side of current frame indicator as mouse - ALT modifier
* - 3) column select all keyframes in frame under mouse - CTRL modifier
+ * - 4) all keyframes in channel under mouse - CTRL+ALT modifiers
*
* In addition to these basic options, the SHIFT modifier can be used to toggle the
* selection mode between replacing the selection (without) and inverting the selection (with).
@@ -949,24 +950,31 @@ static void actkeys_mselect_single(bAnimContext *ac, bAnimListElem *ale, short s
ked.f1 = selx;
/* select the nominated keyframe on the given frame */
- if (ale->type == ANIMTYPE_GPLAYER)
+ if (ale->type == ANIMTYPE_GPLAYER) {
ED_gpencil_select_frame(ale->data, selx, select_mode);
- else if (ale->type == ANIMTYPE_MASKLAYER)
+ }
+ else if (ale->type == ANIMTYPE_MASKLAYER) {
ED_mask_select_frame(ale->data, selx, select_mode);
+ }
else {
if (ELEM(ac->datatype, ANIMCONT_GPENCIL, ANIMCONT_MASK) &&
(ale->type == ANIMTYPE_SUMMARY) && (ale->datatype == ALE_ALL))
{
ListBase anim_data = {NULL, NULL};
int filter;
+
filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE /*| ANIMFILTER_CURVESONLY */ | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
+
for (ale = anim_data.first; ale; ale = ale->next) {
- if (ale->type == ANIMTYPE_GPLAYER)
+ if (ale->type == ANIMTYPE_GPLAYER) {
ED_gpencil_select_frame(ale->data, selx, select_mode);
- else if (ale->type == ANIMTYPE_MASKLAYER)
+ }
+ else if (ale->type == ANIMTYPE_MASKLAYER) {
ED_mask_select_frame(ale->data, selx, select_mode);
+ }
}
+
BLI_freelistN(&anim_data);
}
else {
@@ -1023,10 +1031,52 @@ static void actkeys_mselect_column(bAnimContext *ac, short select_mode, float se
BLI_freelistN(&ked.list);
BLI_freelistN(&anim_data);
}
+
+/* option 4) select all keyframes in same channel */
+static void actkeys_mselect_channel_only(bAnimContext *ac, bAnimListElem *ale, short select_mode)
+{
+ KeyframeEditFunc select_cb;
+
+ /* get functions for selecting keyframes */
+ select_cb = ANIM_editkeyframes_select(select_mode);
+
+ /* select all keyframes in this channel */
+ if (ale->type == ANIMTYPE_GPLAYER) {
+ ED_gpencil_select_frames(ale->data, select_mode);
+ }
+ else if (ale->type == ANIMTYPE_MASKLAYER) {
+ ED_mask_select_frames(ale->data, select_mode);
+ }
+ else {
+ if (ELEM(ac->datatype, ANIMCONT_GPENCIL, ANIMCONT_MASK) &&
+ (ale->type == ANIMTYPE_SUMMARY) && (ale->datatype == ALE_ALL))
+ {
+ ListBase anim_data = {NULL, NULL};
+ int filter;
+
+ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE /*| ANIMFILTER_CURVESONLY */ | ANIMFILTER_NODUPLIS);
+ ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
+
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ if (ale->type == ANIMTYPE_GPLAYER) {
+ ED_gpencil_select_frames(ale->data, select_mode);
+ }
+ else if (ale->type == ANIMTYPE_MASKLAYER) {
+ ED_mask_select_frames(ale->data, select_mode);
+ }
+ }
+
+ BLI_freelistN(&anim_data);
+ }
+ else {
+ ANIM_animchannel_keyframes_loop(NULL, ac->ads, ale, NULL, select_cb, NULL);
+ }
+ }
+}
/* ------------------- */
-static void mouse_action_keys(bAnimContext *ac, const int mval[2], short select_mode, short column)
+static void mouse_action_keys(bAnimContext *ac, const int mval[2], short select_mode, bool column, bool same_channel)
{
ListBase anim_data = {NULL, NULL};
DLRBT_Tree anim_keys;
@@ -1211,6 +1261,10 @@ static void mouse_action_keys(bAnimContext *ac, const int mval[2], short select_
/* select all keyframes in the same frame as the one we hit on the active channel */
actkeys_mselect_column(ac, select_mode, selx);
}
+ else if (same_channel) {
+ /* select all keyframes in the active channel */
+ actkeys_mselect_channel_only(ac, ale, select_mode);
+ }
else {
/* select the nominated keyframe on the given frame */
actkeys_mselect_single(ac, ale, select_mode, selx);
@@ -1227,7 +1281,8 @@ static int actkeys_clickselect_invoke(bContext *C, wmOperator *op, const wmEvent
{
bAnimContext ac;
/* ARegion *ar; */ /* UNUSED */
- short selectmode, column;
+ short selectmode;
+ bool column, channel;
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
@@ -1244,9 +1299,10 @@ static int actkeys_clickselect_invoke(bContext *C, wmOperator *op, const wmEvent
/* column selection */
column = RNA_boolean_get(op->ptr, "column");
+ channel = RNA_boolean_get(op->ptr, "channel");
/* select keyframe(s) based upon mouse position*/
- mouse_action_keys(&ac, event->mval, selectmode, column);
+ mouse_action_keys(&ac, event->mval, selectmode, column, channel);
/* set notifier that keyframe selection (and channels too) have changed */
WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | ND_ANIMCHAN | NA_SELECTED, NULL);
@@ -1272,10 +1328,16 @@ void ACTION_OT_clickselect(wmOperatorType *ot)
ot->flag = OPTYPE_UNDO;
/* properties */
- prop = RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY
+ prop = RNA_def_boolean(ot->srna, "extend", 0, "Extend Select",
+ "Toggle keyframe selection instead of leaving newly selected keyframes only"); // SHIFTKEY
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
+
+ prop = RNA_def_boolean(ot->srna, "column", 0, "Column Select",
+ "Select all keyframes that occur on the same frame as the one under the mouse"); // ALTKEY
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
- prop = RNA_def_boolean(ot->srna, "column", 0, "Column Select", ""); // ALTKEY
+ prop = RNA_def_boolean(ot->srna, "channel", 0, "Only Channel",
+ "Select all the keyframes in the channel under the mouse"); // CTRLKEY + ALTKEY
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c
index bb0521d6589..e2262398a52 100644
--- a/source/blender/editors/space_api/spacetypes.c
+++ b/source/blender/editors/space_api/spacetypes.c
@@ -133,6 +133,7 @@ void ED_spacetypes_init(void)
* maybe we'll need to have them go after python operators too? */
ED_operatormacros_armature();
ED_operatormacros_mesh();
+ ED_operatormacros_metaball();
ED_operatormacros_node();
ED_operatormacros_object();
ED_operatormacros_file();
diff --git a/source/blender/editors/space_buttons/buttons_texture.c b/source/blender/editors/space_buttons/buttons_texture.c
index 51e740e539f..8508123f942 100644
--- a/source/blender/editors/space_buttons/buttons_texture.c
+++ b/source/blender/editors/space_buttons/buttons_texture.c
@@ -150,20 +150,31 @@ static void set_texture_context(const bContext *C, SpaceButs *sbuts)
bool valid_particles = ED_texture_context_check_particles(C);
bool valid_others = ED_texture_context_check_others(C);
+ /* this is similar to direct user action, no need to keep "better" ctxt in _prev */
if ((sbuts->mainb == BCONTEXT_WORLD) && valid_world) {
- sbuts->texture_context = SB_TEXC_WORLD;
+ sbuts->texture_context = sbuts->texture_context_prev = SB_TEXC_WORLD;
}
else if ((sbuts->mainb == BCONTEXT_MATERIAL) && valid_material) {
- sbuts->texture_context = SB_TEXC_MATERIAL;
+ sbuts->texture_context = sbuts->texture_context_prev = SB_TEXC_MATERIAL;
}
else if ((sbuts->mainb == BCONTEXT_DATA) && valid_lamp) {
- sbuts->texture_context = SB_TEXC_LAMP;
+ sbuts->texture_context = sbuts->texture_context_prev = SB_TEXC_LAMP;
}
else if ((sbuts->mainb == BCONTEXT_PARTICLE) && valid_particles) {
- sbuts->texture_context = SB_TEXC_PARTICLES;
+ sbuts->texture_context = sbuts->texture_context_prev = SB_TEXC_PARTICLES;
}
else if ((ELEM(sbuts->mainb, BCONTEXT_MODIFIER, BCONTEXT_PHYSICS)) && valid_others) {
- sbuts->texture_context = SB_TEXC_OTHER;
+ sbuts->texture_context = sbuts->texture_context_prev = SB_TEXC_OTHER;
+ }
+ /* Else, try to revive a previous "better" ctxt... */
+ else if ((sbuts->texture_context_prev != sbuts->texture_context) &&
+ (((sbuts->texture_context_prev == SB_TEXC_WORLD) && valid_world) ||
+ ((sbuts->texture_context_prev == SB_TEXC_MATERIAL) && valid_material) ||
+ ((sbuts->texture_context_prev == SB_TEXC_LAMP) && valid_lamp) ||
+ ((sbuts->texture_context_prev == SB_TEXC_PARTICLES) && valid_particles) ||
+ ((sbuts->texture_context_prev == SB_TEXC_OTHER) && valid_others)))
+ {
+ sbuts->texture_context = sbuts->texture_context_prev;
}
/* Else, just be sure that current context is valid! */
else if (((sbuts->texture_context == SB_TEXC_WORLD) && !valid_world) ||
@@ -172,13 +183,9 @@ static void set_texture_context(const bContext *C, SpaceButs *sbuts)
((sbuts->texture_context == SB_TEXC_PARTICLES) && !valid_particles) ||
((sbuts->texture_context == SB_TEXC_OTHER) && !valid_others))
{
- if (valid_others) {
- sbuts->texture_context = SB_TEXC_OTHER;
- }
- else if (valid_world) {
- sbuts->texture_context = SB_TEXC_WORLD;
- }
- else if (valid_material) {
+ /* this is default fallback, do keep "better" ctxt in _prev */
+ sbuts->texture_context_prev = sbuts->texture_context;
+ if (valid_material) {
sbuts->texture_context = SB_TEXC_MATERIAL;
}
else if (valid_lamp) {
@@ -187,6 +194,12 @@ static void set_texture_context(const bContext *C, SpaceButs *sbuts)
else if (valid_particles) {
sbuts->texture_context = SB_TEXC_PARTICLES;
}
+ else if (valid_world) {
+ sbuts->texture_context = SB_TEXC_WORLD;
+ }
+ else if (valid_others) {
+ sbuts->texture_context = SB_TEXC_OTHER;
+ }
}
}
}
diff --git a/source/blender/editors/space_clip/clip_buttons.c b/source/blender/editors/space_clip/clip_buttons.c
index 18248f4775b..50bb8a0e061 100644
--- a/source/blender/editors/space_clip/clip_buttons.c
+++ b/source/blender/editors/space_clip/clip_buttons.c
@@ -238,7 +238,8 @@ static void marker_block_handler(bContext *C, void *arg_cb, int event)
{
MarkerUpdateCb *cb = (MarkerUpdateCb *) arg_cb;
MovieTrackingMarker *marker;
- int width, height, ok = FALSE;
+ int width, height;
+ bool ok = false;
BKE_movieclip_get_size(cb->clip, cb->user, &width, &height);
@@ -252,7 +253,7 @@ static void marker_block_handler(bContext *C, void *arg_cb, int event)
DAG_id_tag_update(&cb->clip->id, 0);
WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, NULL);
- ok = TRUE;
+ ok = true;
}
else if (event == B_MARKER_PAT_DIM) {
float dim[2], pat_dim[2], pat_min[2], pat_max[2];
@@ -276,7 +277,7 @@ static void marker_block_handler(bContext *C, void *arg_cb, int event)
BKE_tracking_marker_clamp(cb->marker, CLAMP_PAT_DIM);
- ok = TRUE;
+ ok = true;
}
else if (event == B_MARKER_SEARCH_POS) {
float delta[2], side[2];
@@ -292,7 +293,7 @@ static void marker_block_handler(bContext *C, void *arg_cb, int event)
BKE_tracking_marker_clamp(cb->marker, CLAMP_SEARCH_POS);
- ok = TRUE;
+ ok = true;
}
else if (event == B_MARKER_SEARCH_DIM) {
float dim[2], search_dim[2];
@@ -313,12 +314,12 @@ static void marker_block_handler(bContext *C, void *arg_cb, int event)
BKE_tracking_marker_clamp(cb->marker, CLAMP_SEARCH_DIM);
- ok = TRUE;
+ ok = true;
}
else if (event == B_MARKER_FLAG) {
marker->flag = cb->marker_flag;
- ok = TRUE;
+ ok = true;
}
else if (event == B_MARKER_OFFSET) {
float offset[2], delta[2];
@@ -337,7 +338,7 @@ static void marker_block_handler(bContext *C, void *arg_cb, int event)
DAG_id_tag_update(&cb->clip->id, 0);
WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, NULL);
- ok = TRUE;
+ ok = true;
}
if (ok)
diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c
index eb58bdc7696..3c9eb1fe79e 100644
--- a/source/blender/editors/space_clip/clip_draw.c
+++ b/source/blender/editors/space_clip/clip_draw.c
@@ -127,9 +127,11 @@ static int generic_track_get_marker_framenr(MovieTrackingTrack *track, MovieTrac
int marker_index)
{
if (track) {
+ BLI_assert(marker_index < track->markersnr);
return track->markers[marker_index].framenr;
}
else if (plane_track) {
+ BLI_assert(marker_index < plane_track->markersnr);
return plane_track->markers[marker_index].framenr;
}
@@ -140,6 +142,7 @@ static bool generic_track_is_marker_enabled(MovieTrackingTrack *track, MovieTrac
int marker_index)
{
if (track) {
+ BLI_assert(marker_index < track->markersnr);
return (track->markers[marker_index].flag & MARKER_DISABLED) == 0;
}
else if (plane_track) {
@@ -153,9 +156,11 @@ static bool generic_track_is_marker_keyframed(MovieTrackingTrack *track, MovieTr
int marker_index)
{
if (track) {
+ BLI_assert(marker_index < track->markersnr);
return (track->markers[marker_index].flag & MARKER_TRACKED) == 0;
}
else if (plane_track) {
+ BLI_assert(marker_index < plane_track->markersnr);
return (plane_track->markers[marker_index].flag & PLANE_MARKER_TRACKED) == 0;
}
@@ -212,6 +217,8 @@ static void draw_movieclip_cache(SpaceClip *sc, ARegion *ar, MovieClip *clip, Sc
a++;
}
+ a = min_ii(a, markersnr - 1);
+
if (generic_track_is_marker_enabled(act_track, act_plane_track, a)) {
framenr = generic_track_get_marker_framenr(act_track, act_plane_track, a);
@@ -235,11 +242,11 @@ static void draw_movieclip_cache(SpaceClip *sc, ARegion *ar, MovieClip *clip, Sc
glColor4ub(255, 0, 0, 96);
for (i = sfra, a = 0; i <= efra; i++) {
- int ok = FALSE;
+ bool ok = false;
while (a < n) {
if (cameras[a].framenr == i) {
- ok = TRUE;
+ ok = true;
break;
}
else if (cameras[a].framenr > i) {
@@ -280,11 +287,11 @@ static void draw_movieclip_notes(SpaceClip *sc, ARegion *ar)
MovieClip *clip = ED_space_clip_get_clip(sc);
MovieTracking *tracking = &clip->tracking;
char str[256] = {0};
- int block = FALSE;
+ bool block = false;
if (tracking->stats) {
BLI_strncpy(str, tracking->stats->message, sizeof(str));
- block = TRUE;
+ block = true;
}
else {
if (sc->flag & SC_LOCK_SELECTION)
@@ -297,48 +304,52 @@ static void draw_movieclip_notes(SpaceClip *sc, ARegion *ar)
}
}
+static void draw_movieclip_muted(ARegion *ar, int width, int height, float zoomx, float zoomy)
+{
+ int x, y;
+
+ /* find window pixel coordinates of origin */
+ UI_view2d_to_region_no_clip(&ar->v2d, 0.0f, 0.0f, &x, &y);
+
+ glColor3f(0.0f, 0.0f, 0.0f);
+ glRectf(x, y, x + zoomx * width, y + zoomy * height);
+}
+
static void draw_movieclip_buffer(const bContext *C, SpaceClip *sc, ARegion *ar, ImBuf *ibuf,
int width, int height, float zoomx, float zoomy)
{
+ MovieClip *clip = ED_space_clip_get_clip(sc);
+ int filter = GL_LINEAR;
int x, y;
/* find window pixel coordinates of origin */
UI_view2d_to_region_no_clip(&ar->v2d, 0.0f, 0.0f, &x, &y);
- if (sc->flag & SC_MUTE_FOOTAGE) {
- glColor3f(0.0f, 0.0f, 0.0f);
- glRectf(x, y, x + zoomx * width, y + zoomy * height);
- }
- else {
- MovieClip *clip = ED_space_clip_get_clip(sc);
- int filter = GL_LINEAR;
-
- /* checkerboard for case alpha */
- if (ibuf->planes == 32) {
- glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ /* checkerboard for case alpha */
+ if (ibuf->planes == 32) {
+ glEnable(GL_BLEND);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- fdrawcheckerboard(x, y, x + zoomx * ibuf->x, y + zoomy * ibuf->y);
- }
+ fdrawcheckerboard(x, y, x + zoomx * ibuf->x, y + zoomy * ibuf->y);
+ }
- /* non-scaled proxy shouldn't use filtering */
- if ((clip->flag & MCLIP_USE_PROXY) == 0 ||
- ELEM(sc->user.render_size, MCLIP_PROXY_RENDER_SIZE_FULL, MCLIP_PROXY_RENDER_SIZE_100))
- {
- filter = GL_NEAREST;
- }
+ /* non-scaled proxy shouldn't use filtering */
+ if ((clip->flag & MCLIP_USE_PROXY) == 0 ||
+ ELEM(sc->user.render_size, MCLIP_PROXY_RENDER_SIZE_FULL, MCLIP_PROXY_RENDER_SIZE_100))
+ {
+ filter = GL_NEAREST;
+ }
- /* set zoom */
- glPixelZoom(zoomx * width / ibuf->x, zoomy * height / ibuf->y);
+ /* set zoom */
+ glPixelZoom(zoomx * width / ibuf->x, zoomy * height / ibuf->y);
- glaDrawImBuf_glsl_ctx(C, ibuf, x, y, filter);
+ glaDrawImBuf_glsl_ctx(C, ibuf, x, y, filter);
- /* reset zoom */
- glPixelZoom(1.0f, 1.0f);
+ /* reset zoom */
+ glPixelZoom(1.0f, 1.0f);
- if (ibuf->planes == 32)
- glDisable(GL_BLEND);
- }
+ if (ibuf->planes == 32)
+ glDisable(GL_BLEND);
}
static void draw_stabilization_border(SpaceClip *sc, ARegion *ar, int width, int height, float zoomx, float zoomy)
@@ -490,7 +501,7 @@ static void draw_marker_outline(SpaceClip *sc, MovieTrackingTrack *track, MovieT
float marker_pos[2], int width, int height)
{
int tiny = sc->flag & SC_SHOW_TINY_MARKER;
- int show_search = FALSE;
+ bool show_search = false;
float px[2];
UI_ThemeColor(TH_MARKER_OUTLINE);
@@ -553,8 +564,8 @@ static void draw_marker_outline(SpaceClip *sc, MovieTrackingTrack *track, MovieT
glEnd();
}
- show_search = TRACK_VIEW_SELECTED(sc, track) &&
- ((marker->flag & MARKER_DISABLED) == 0 || (sc->flag & SC_SHOW_MARKER_PATTERN) == 0);
+ show_search = (TRACK_VIEW_SELECTED(sc, track) &&
+ ((marker->flag & MARKER_DISABLED) == 0 || (sc->flag & SC_SHOW_MARKER_PATTERN) == 0)) != 0;
if (sc->flag & SC_SHOW_MARKER_SEARCH && show_search) {
glBegin(GL_LINE_LOOP);
glVertex2f(marker->search_min[0], marker->search_min[1]);
@@ -593,7 +604,7 @@ static void draw_marker_areas(SpaceClip *sc, MovieTrackingTrack *track, MovieTra
float marker_pos[2], int width, int height, int act, int sel)
{
int tiny = sc->flag & SC_SHOW_TINY_MARKER;
- int show_search = 0;
+ bool show_search = false;
float col[3], scol[3], px[2];
track_colors(track, act, col, scol);
@@ -708,8 +719,8 @@ static void draw_marker_areas(SpaceClip *sc, MovieTrackingTrack *track, MovieTra
}
/* search */
- show_search = TRACK_VIEW_SELECTED(sc, track) &&
- ((marker->flag & MARKER_DISABLED) == 0 || (sc->flag & SC_SHOW_MARKER_PATTERN) == 0);
+ show_search = (TRACK_VIEW_SELECTED(sc, track) &&
+ ((marker->flag & MARKER_DISABLED) == 0 || (sc->flag & SC_SHOW_MARKER_PATTERN) == 0)) != 0;
if ((track->search_flag & SELECT) == sel && (sc->flag & SC_SHOW_MARKER_SEARCH) && show_search) {
if (track->flag & TRACK_LOCKED) {
if (act)
@@ -997,17 +1008,6 @@ static void draw_marker_texts(SpaceClip *sc, MovieTrackingTrack *track, MovieTra
}
}
-static void view2d_to_region_float(View2D *v2d, float x, float y, float *regionx, float *regiony)
-{
- /* express given coordinates as proportional values */
- x = -v2d->cur.xmin / BLI_rctf_size_x(&v2d->cur);
- y = -v2d->cur.ymin / BLI_rctf_size_y(&v2d->cur);
-
- /* convert proportional distances to screen coordinates */
- *regionx = v2d->mask.xmin + x * BLI_rcti_size_x(&v2d->mask);
- *regiony = v2d->mask.ymin + y * BLI_rcti_size_y(&v2d->mask);
-}
-
static void plane_track_colors(bool is_active, float color[3], float selected_color[3])
{
UI_GetThemeColor3fv(TH_MARKER, color);
@@ -1071,8 +1071,6 @@ static void draw_plane_marker_ex(SpaceClip *sc, MovieTrackingPlaneTrack *plane_t
else if (tiny) {
glLineStipple(3, 0xaaaa);
glEnable(GL_LINE_STIPPLE);
- glEnable(GL_COLOR_LOGIC_OP);
- glLogicOp(GL_NOR);
}
/* Draw rectangle itself. */
@@ -1120,10 +1118,7 @@ static void draw_plane_marker_ex(SpaceClip *sc, MovieTrackingPlaneTrack *plane_t
}
}
else if (tiny) {
- glDisable(GL_COLOR_LOGIC_OP);
glDisable(GL_LINE_STIPPLE);
- glLineStipple(3, 0xaaaa);
- glEnable(GL_LINE_STIPPLE);
}
}
@@ -1173,7 +1168,7 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip,
* to avoid this flickering, calculate base point in the same way as it happens
* in UI_view2d_to_region_no_clip, but do it in floats here */
- view2d_to_region_float(&ar->v2d, 0.0f, 0.0f, &x, &y);
+ UI_view2d_to_region_float(&ar->v2d, 0.0f, 0.0f, &x, &y);
glPushMatrix();
glTranslatef(x, y, 0);
@@ -1416,7 +1411,7 @@ static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip,
if ((sc->flag & SC_SHOW_GRID) == 0 && (sc->flag & SC_MANUAL_CALIBRATION) == 0)
return;
- view2d_to_region_float(&ar->v2d, 0.0f, 0.0f, &x, &y);
+ UI_view2d_to_region_float(&ar->v2d, 0.0f, 0.0f, &x, &y);
glPushMatrix();
glTranslatef(x, y, 0);
@@ -1611,7 +1606,7 @@ void clip_draw_main(const bContext *C, SpaceClip *sc, ARegion *ar)
{
MovieClip *clip = ED_space_clip_get_clip(sc);
Scene *scene = CTX_data_scene(C);
- ImBuf *ibuf;
+ ImBuf *ibuf = NULL;
int width, height;
float zoomx, zoomy;
@@ -1649,7 +1644,7 @@ void clip_draw_main(const bContext *C, SpaceClip *sc, ARegion *ar)
mul_serie_m4(sc->unistabmat, smat, sc->stabmat, ismat, NULL, NULL, NULL, NULL, NULL);
}
}
- else {
+ else if ((sc->flag & SC_MUTE_FOOTAGE) == 0) {
ibuf = ED_space_clip_get_buffer(sc);
zero_v2(sc->loc);
@@ -1662,6 +1657,9 @@ void clip_draw_main(const bContext *C, SpaceClip *sc, ARegion *ar)
draw_movieclip_buffer(C, sc, ar, ibuf, width, height, zoomx, zoomy);
IMB_freeImBuf(ibuf);
}
+ else if (sc->flag & SC_MUTE_FOOTAGE) {
+ draw_movieclip_muted(ar, width, height, zoomx, zoomy);
+ }
else {
ED_region_grid_draw(ar, zoomx, zoomy);
}
diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c
index 08d0af817a8..0e1a2f98d40 100644
--- a/source/blender/editors/space_clip/clip_editor.c
+++ b/source/blender/editors/space_clip/clip_editor.c
@@ -262,15 +262,15 @@ ImBuf *ED_space_clip_get_stable_buffer(SpaceClip *sc, float loc[2], float *scale
/* returns color in SRGB */
/* matching ED_space_image_color_sample() */
-int ED_space_clip_color_sample(SpaceClip *sc, ARegion *ar, int mval[2], float r_col[3])
+bool ED_space_clip_color_sample(SpaceClip *sc, ARegion *ar, int mval[2], float r_col[3])
{
ImBuf *ibuf;
float fx, fy, co[2];
- int ret = FALSE;
+ bool ret = false;
ibuf = ED_space_clip_get_buffer(sc);
if (!ibuf) {
- return FALSE;
+ return false;
}
/* map the mouse coords to the backdrop image space */
@@ -290,12 +290,12 @@ int ED_space_clip_color_sample(SpaceClip *sc, ARegion *ar, int mval[2], float r_
if (ibuf->rect_float) {
fp = (ibuf->rect_float + (ibuf->channels) * (y * ibuf->x + x));
linearrgb_to_srgb_v3_v3(r_col, fp);
- ret = TRUE;
+ ret = true;
}
else if (ibuf->rect) {
cp = (unsigned char *)(ibuf->rect + y * ibuf->x + x);
rgb_uchar_to_float(r_col, cp);
- ret = TRUE;
+ ret = true;
}
}
@@ -325,11 +325,12 @@ void ED_clip_update_frame(const Main *mainp, int cfra)
}
}
-static int selected_boundbox(SpaceClip *sc, float min[2], float max[2])
+static bool selected_boundbox(SpaceClip *sc, float min[2], float max[2])
{
MovieClip *clip = ED_space_clip_get_clip(sc);
MovieTrackingTrack *track;
- int width, height, ok = FALSE;
+ int width, height;
+ bool ok = false;
ListBase *tracksbase = BKE_tracking_get_active_tracks(&clip->tracking);
int framenr = ED_space_clip_get_clip_frame_number(sc);
@@ -362,7 +363,7 @@ static int selected_boundbox(SpaceClip *sc, float min[2], float max[2])
minmax_v2v2_v2(min, max, pos);
- ok = TRUE;
+ ok = true;
}
}
@@ -372,7 +373,7 @@ static int selected_boundbox(SpaceClip *sc, float min[2], float max[2])
return ok;
}
-int ED_clip_view_selection(const bContext *C, ARegion *ar, int fit)
+bool ED_clip_view_selection(const bContext *C, ARegion *ar, bool fit)
{
SpaceClip *sc = CTX_wm_space_clip(C);
int w, h, frame_width, frame_height;
@@ -381,10 +382,10 @@ int ED_clip_view_selection(const bContext *C, ARegion *ar, int fit)
ED_space_clip_get_size(sc, &frame_width, &frame_height);
if ((frame_width == 0) || (frame_height == 0) || (sc->clip == NULL))
- return FALSE;
+ return false;
if (!selected_boundbox(sc, min, max))
- return FALSE;
+ return false;
/* center view */
clip_view_center_to_point(sc, (max[0] + min[0]) / (2 * frame_width),
@@ -412,7 +413,7 @@ int ED_clip_view_selection(const bContext *C, ARegion *ar, int fit)
sc->zoom = newzoom;
}
- return TRUE;
+ return true;
}
void ED_clip_point_undistorted_pos(SpaceClip *sc, const float co[2], float r_co[2])
@@ -500,22 +501,22 @@ void ED_clip_mouse_pos(SpaceClip *sc, ARegion *ar, const int mval[2], float co[2
ED_clip_point_stable_pos(sc, ar, mval[0], mval[1], &co[0], &co[1]);
}
-int ED_space_clip_check_show_trackedit(SpaceClip *sc)
+bool ED_space_clip_check_show_trackedit(SpaceClip *sc)
{
if (sc) {
return ELEM3(sc->mode, SC_MODE_TRACKING, SC_MODE_RECONSTRUCTION, SC_MODE_DISTORTION);
}
- return FALSE;
+ return false;
}
-int ED_space_clip_check_show_maskedit(SpaceClip *sc)
+bool ED_space_clip_check_show_maskedit(SpaceClip *sc)
{
if (sc) {
return sc->mode == SC_MODE_MASKEDIT;
}
- return FALSE;
+ return false;
}
/* ******** clip editing functions ******** */
@@ -638,7 +639,7 @@ static unsigned char *prefetch_read_file_to_memory(MovieClip *clip, int current_
BKE_movieclip_filename_for_frame(clip, &user, name);
- file = open(name, O_BINARY | O_RDONLY, 0);
+ file = BLI_open(name, O_BINARY | O_RDONLY, 0);
if (file < 0) {
return NULL;
}
@@ -709,8 +710,14 @@ static unsigned char *prefetch_thread_next_frame(PrefetchQueue *queue, MovieClip
if (queue->direction > 0) {
current_frame = prefetch_find_uncached_frame(clip, queue->current_frame + 1, queue->end_frame,
queue->render_size, queue->render_flag, 1);
+ /* switch direction if read frames from current up to scene end frames */
+ if (current_frame > queue->end_frame) {
+ queue->current_frame = queue->initial_frame;
+ queue->direction = -1;
+ }
}
- else {
+
+ if (queue->direction < 0) {
current_frame = prefetch_find_uncached_frame(clip, queue->current_frame - 1, queue->start_frame,
queue->render_size, queue->render_flag, -1);
}
@@ -735,12 +742,6 @@ static unsigned char *prefetch_thread_next_frame(PrefetchQueue *queue, MovieClip
*queue->do_update = 1;
*queue->progress = (float)frames_processed / (queue->end_frame - queue->start_frame);
-
- /* switch direction if read frames from current up to scene end frames */
- if (current_frame == queue->end_frame) {
- queue->current_frame = queue->initial_frame;
- queue->direction = -1;
- }
}
}
BLI_spin_unlock(&queue->spin);
@@ -751,6 +752,7 @@ static unsigned char *prefetch_thread_next_frame(PrefetchQueue *queue, MovieClip
static void *do_prefetch_thread(void *data_v)
{
PrefetchThread *data = (PrefetchThread *) data_v;
+ MovieClip *clip = data->clip;
unsigned char *mem;
size_t size;
int current_frame;
@@ -765,7 +767,7 @@ static void *do_prefetch_thread(void *data_v)
user.render_size = data->queue->render_size;
user.render_flag = data->queue->render_flag;
- ibuf = IMB_ibImageFromMemory(mem, size, flag, NULL, "prefetch frame");
+ ibuf = IMB_ibImageFromMemory(mem, size, flag, clip->colorspace_settings.name, "prefetch frame");
result = BKE_movieclip_put_frame_if_possible(data->clip, &user, ibuf);
diff --git a/source/blender/editors/space_clip/clip_graph_draw.c b/source/blender/editors/space_clip/clip_graph_draw.c
index 973200dc340..80b844464db 100644
--- a/source/blender/editors/space_clip/clip_graph_draw.c
+++ b/source/blender/editors/space_clip/clip_graph_draw.c
@@ -123,10 +123,16 @@ static void tracking_segment_end_cb(void *UNUSED(userdata))
glLineWidth(1.0f);
}
+typedef struct TrackMotionCurveUserData {
+ MovieTrackingTrack *act_track;
+ bool sel;
+ float xscale, yscale, hsize;
+} TrackMotionCurveUserData;
+
static void tracking_segment_knot_cb(void *userdata, MovieTrackingTrack *track,
MovieTrackingMarker *marker, int coord, int scene_framenr, float val)
{
- struct { MovieTrackingTrack *act_track; int sel; float xscale, yscale, hsize; } *data = userdata;
+ TrackMotionCurveUserData *data = (TrackMotionCurveUserData *) userdata;
int sel = 0, sel_flag;
if (track != data->act_track)
@@ -151,7 +157,7 @@ static void draw_tracks_curves(View2D *v2d, SpaceClip *sc)
MovieTracking *tracking = &clip->tracking;
MovieTrackingTrack *act_track = BKE_tracking_track_get_active(tracking);
int width, height;
- struct { MovieTrackingTrack *act_track; int sel; float xscale, yscale, hsize; } userdata;
+ TrackMotionCurveUserData userdata;
BKE_movieclip_get_size(clip, &sc->user, &width, &height);
@@ -160,22 +166,28 @@ static void draw_tracks_curves(View2D *v2d, SpaceClip *sc)
/* non-selected knot handles */
userdata.hsize = UI_GetThemeValuef(TH_HANDLE_VERTEX_SIZE);
- userdata.sel = FALSE;
+ userdata.sel = false;
userdata.act_track = act_track;
UI_view2d_getscale(v2d, &userdata.xscale, &userdata.yscale);
- clip_graph_tracking_values_iterate(sc, sc->flag & SC_SHOW_GRAPH_SEL_ONLY, sc->flag & SC_SHOW_GRAPH_HIDDEN,
+ clip_graph_tracking_values_iterate(sc,
+ (sc->flag & SC_SHOW_GRAPH_SEL_ONLY) != 0,
+ (sc->flag & SC_SHOW_GRAPH_HIDDEN) != 0,
&userdata, tracking_segment_knot_cb, NULL, NULL);
/* draw graph lines */
glEnable(GL_BLEND);
- clip_graph_tracking_values_iterate(sc, sc->flag & SC_SHOW_GRAPH_SEL_ONLY, sc->flag & SC_SHOW_GRAPH_HIDDEN,
+ clip_graph_tracking_values_iterate(sc,
+ (sc->flag & SC_SHOW_GRAPH_SEL_ONLY) != 0,
+ (sc->flag & SC_SHOW_GRAPH_HIDDEN) != 0,
act_track, tracking_segment_point_cb, tracking_segment_start_cb,
tracking_segment_end_cb);
glDisable(GL_BLEND);
/* selected knot handles on top of curves */
userdata.sel = TRUE;
- clip_graph_tracking_values_iterate(sc, sc->flag & SC_SHOW_GRAPH_SEL_ONLY, sc->flag & SC_SHOW_GRAPH_HIDDEN,
+ clip_graph_tracking_values_iterate(sc,
+ (sc->flag & SC_SHOW_GRAPH_SEL_ONLY) != 0,
+ (sc->flag & SC_SHOW_GRAPH_HIDDEN) != 0,
&userdata, tracking_segment_knot_cb, NULL, NULL);
}
diff --git a/source/blender/editors/space_clip/clip_graph_ops.c b/source/blender/editors/space_clip/clip_graph_ops.c
index cdb0fdadebd..d1c44693995 100644
--- a/source/blender/editors/space_clip/clip_graph_ops.c
+++ b/source/blender/editors/space_clip/clip_graph_ops.c
@@ -96,8 +96,8 @@ static void toggle_selection_cb(void *userdata, MovieTrackingMarker *marker)
/******************** mouse select operator ********************/
typedef struct {
- int coord, /* coordinate index of found entuty (0 = X-axis, 1 = Y-axis) */
- has_prev; /* if there's valid coordinate of previous point of curve segment */
+ int coord; /* coordinate index of found entuty (0 = X-axis, 1 = Y-axis) */
+ bool has_prev; /* if there's valid coordinate of previous point of curve segment */
float min_dist, /* minimal distance between mouse and currently found entuty */
mouse_co[2], /* mouse coordinate */
@@ -134,7 +134,7 @@ static void find_nearest_tracking_segment_end_cb(void *userdata)
{
MouseSelectUserData *data = userdata;
- data->has_prev = FALSE;
+ data->has_prev = false;
}
static void find_nearest_tracking_knot_cb(void *userdata, MovieTrackingTrack *track,
@@ -163,7 +163,7 @@ static void mouse_select_init_data(MouseSelectUserData *userdata, float *co)
copy_v2_v2(userdata->mouse_co, co);
}
-static int mouse_select_knot(bContext *C, float co[2], int extend)
+static bool mouse_select_knot(bContext *C, float co[2], bool extend)
{
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip_get_clip(sc);
@@ -190,8 +190,10 @@ static int mouse_select_knot(bContext *C, float co[2], int extend)
if (!extend) {
SelectUserData selectdata = {SEL_DESELECT};
- clip_graph_tracking_iterate(sc, sc->flag & SC_SHOW_GRAPH_SEL_ONLY,
- sc->flag & SC_SHOW_GRAPH_HIDDEN, &selectdata,
+ clip_graph_tracking_iterate(sc,
+ (sc->flag & SC_SHOW_GRAPH_SEL_ONLY) != 0,
+ (sc->flag & SC_SHOW_GRAPH_HIDDEN) != 0,
+ &selectdata,
toggle_selection_cb);
}
@@ -200,15 +202,15 @@ static int mouse_select_knot(bContext *C, float co[2], int extend)
else
userdata.marker->flag |= MARKER_GRAPH_SEL_Y;
- return TRUE;
+ return true;
}
}
}
- return FALSE;
+ return false;
}
-static int mouse_select_curve(bContext *C, float co[2], int extend)
+static bool mouse_select_curve(bContext *C, float co[2], bool extend)
{
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip_get_clip(sc);
@@ -217,7 +219,9 @@ static int mouse_select_curve(bContext *C, float co[2], int extend)
MouseSelectUserData userdata;
mouse_select_init_data(&userdata, co);
- clip_graph_tracking_values_iterate(sc, sc->flag & SC_SHOW_GRAPH_SEL_ONLY, sc->flag & SC_SHOW_GRAPH_HIDDEN,
+ clip_graph_tracking_values_iterate(sc,
+ (sc->flag & SC_SHOW_GRAPH_SEL_ONLY) != 0,
+ (sc->flag & SC_SHOW_GRAPH_HIDDEN) != 0,
&userdata, find_nearest_tracking_segment_cb,
NULL, find_nearest_tracking_segment_end_cb);
@@ -237,20 +241,21 @@ static int mouse_select_curve(bContext *C, float co[2], int extend)
BKE_tracking_track_select(tracksbase, userdata.track, TRACK_AREA_ALL, TRUE);
/* deselect all knots on newly selected curve */
- clip_graph_tracking_iterate(sc, sc->flag & SC_SHOW_GRAPH_SEL_ONLY,
- sc->flag & SC_SHOW_GRAPH_HIDDEN, &selectdata,
- toggle_selection_cb);
+ clip_graph_tracking_iterate(sc,
+ (sc->flag & SC_SHOW_GRAPH_SEL_ONLY) != 0,
+ (sc->flag & SC_SHOW_GRAPH_HIDDEN) != 0,
+ &selectdata, toggle_selection_cb);
}
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-static int mouse_select(bContext *C, float co[2], int extend)
+static int mouse_select(bContext *C, float co[2], bool extend)
{
- int sel = FALSE;
+ bool sel = false;
/* first try to select knot on selected curves */
sel = mouse_select_knot(C, co, extend);
@@ -269,7 +274,7 @@ static int mouse_select(bContext *C, float co[2], int extend)
static int select_exec(bContext *C, wmOperator *op)
{
float co[2];
- int extend = RNA_boolean_get(op->ptr, "extend");
+ bool extend = RNA_boolean_get(op->ptr, "extend");
RNA_float_get_array(op->ptr, "location", co);
@@ -313,7 +318,8 @@ void CLIP_OT_graph_select(wmOperatorType *ot)
typedef struct BorderSelectuserData {
rctf rect;
- int change, mode, extend;
+ int mode;
+ bool change, extend;
} BorderSelectuserData;
static void border_select_cb(void *userdata, MovieTrackingTrack *UNUSED(track),
@@ -352,13 +358,17 @@ static int border_select_graph_exec(bContext *C, wmOperator *op)
BorderSelectuserData userdata;
rcti rect;
+ if (act_track == NULL) {
+ return OPERATOR_CANCELLED;
+ }
+
/* get rectangle from operator */
WM_operator_properties_border_to_rcti(op, &rect);
UI_view2d_region_to_view(&ar->v2d, rect.xmin, rect.ymin, &userdata.rect.xmin, &userdata.rect.ymin);
UI_view2d_region_to_view(&ar->v2d, rect.xmax, rect.ymax, &userdata.rect.xmax, &userdata.rect.ymax);
- userdata.change = FALSE;
+ userdata.change = false;
userdata.mode = RNA_int_get(op->ptr, "gesture_mode");
userdata.extend = RNA_boolean_get(op->ptr, "extend");
@@ -560,9 +570,10 @@ static int view_all_exec(bContext *C, wmOperator *UNUSED(op))
userdata.max = -FLT_MAX;
userdata.min = FLT_MAX;
- clip_graph_tracking_values_iterate(sc, sc->flag & SC_SHOW_GRAPH_SEL_ONLY,
- sc->flag & SC_SHOW_GRAPH_HIDDEN, &userdata,
- view_all_cb, NULL, NULL);
+ clip_graph_tracking_values_iterate(sc,
+ (sc->flag & SC_SHOW_GRAPH_SEL_ONLY) != 0,
+ (sc->flag & SC_SHOW_GRAPH_HIDDEN) != 0,
+ &userdata, view_all_cb, NULL, NULL);
/* set extents of view to start/end frames */
v2d->cur.xmin = (float) SFRA;
diff --git a/source/blender/editors/space_clip/clip_intern.h b/source/blender/editors/space_clip/clip_intern.h
index d52622a1c2e..24b6de31ddb 100644
--- a/source/blender/editors/space_clip/clip_intern.h
+++ b/source/blender/editors/space_clip/clip_intern.h
@@ -112,6 +112,8 @@ void CLIP_OT_prefetch(struct wmOperatorType *ot);
void CLIP_OT_set_scene_frames(wmOperatorType *ot);
+void CLIP_OT_cursor_set(struct wmOperatorType *ot);
+
/* clip_toolbar.c */
struct ARegion *ED_clip_has_properties_region(struct ScrArea *sa);
void CLIP_OT_tools(struct wmOperatorType *ot);
@@ -124,12 +126,12 @@ void clip_graph_tracking_values_iterate_track(struct SpaceClip *sc, struct Movie
void (*segment_start)(void *userdata, struct MovieTrackingTrack *track, int coord),
void (*segment_end)(void *userdata));
-void clip_graph_tracking_values_iterate(struct SpaceClip *sc, int selected_only, int include_hidden, void *userdata,
+void clip_graph_tracking_values_iterate(struct SpaceClip *sc, bool selected_only, bool include_hidden, void *userdata,
void (*func)(void *userdata, struct MovieTrackingTrack *track, struct MovieTrackingMarker *marker, int coord, int scene_framenr, float val),
void (*segment_start)(void *userdata, struct MovieTrackingTrack *track, int coord),
void (*segment_end)(void *userdata));
-void clip_graph_tracking_iterate(struct SpaceClip *sc, int selected_only, int include_hidden, void *userdata,
+void clip_graph_tracking_iterate(struct SpaceClip *sc, bool selected_only, bool include_hidden, void *userdata,
void (*func)(void *userdata, struct MovieTrackingMarker *marker));
void clip_delete_track(struct bContext *C, struct MovieClip *clip, struct MovieTrackingTrack *track);
@@ -198,6 +200,9 @@ void CLIP_OT_track_mask(struct wmOperatorType *ot);
void CLIP_OT_create_plane_track(struct wmOperatorType *ot);
void CLIP_OT_slide_plane_marker(struct wmOperatorType *ot);
+void CLIP_OT_keyframe_insert(struct wmOperatorType *ot);
+void CLIP_OT_keyframe_delete(struct wmOperatorType *ot);
+
/* tracking_select.c */
void CLIP_OT_select(struct wmOperatorType *ot);
void CLIP_OT_select_all(struct wmOperatorType *ot);
diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c
index de19df9abe2..a76f4364492 100644
--- a/source/blender/editors/space_clip/clip_ops.c
+++ b/source/blender/editors/space_clip/clip_ops.c
@@ -181,7 +181,7 @@ static int open_exec(bContext *C, wmOperator *op)
PointerRNA fileptr;
PropertyRNA *prop;
char dir_only[FILE_MAX], file_only[FILE_MAX];
- int relative = RNA_boolean_get(op->ptr, "relative_path");
+ bool relative = RNA_boolean_get(op->ptr, "relative_path");
RNA_string_get(op->ptr, "directory", dir_only);
if (relative)
@@ -335,7 +335,7 @@ static void view_pan_init(bContext *C, wmOperator *op, const wmEvent *event)
ViewPanData *vpd;
op->customdata = vpd = MEM_callocN(sizeof(ViewPanData), "ClipViewPanData");
- WM_cursor_modal(CTX_wm_window(C), BC_NSEW_SCROLLCURSOR);
+ WM_cursor_modal_set(CTX_wm_window(C), BC_NSEW_SCROLLCURSOR);
vpd->x = event->x;
vpd->y = event->y;
@@ -353,7 +353,7 @@ static void view_pan_init(bContext *C, wmOperator *op, const wmEvent *event)
WM_event_add_modal_handler(C, op);
}
-static void view_pan_exit(bContext *C, wmOperator *op, int cancel)
+static void view_pan_exit(bContext *C, wmOperator *op, bool cancel)
{
ViewPanData *vpd = op->customdata;
@@ -363,7 +363,7 @@ static void view_pan_exit(bContext *C, wmOperator *op, int cancel)
ED_region_tag_redraw(CTX_wm_region(C));
}
- WM_cursor_restore(CTX_wm_window(C));
+ WM_cursor_modal_restore(CTX_wm_window(C));
MEM_freeN(op->customdata);
}
@@ -490,7 +490,7 @@ static void view_zoom_init(bContext *C, wmOperator *op, const wmEvent *event)
ViewZoomData *vpd;
op->customdata = vpd = MEM_callocN(sizeof(ViewZoomData), "ClipViewZoomData");
- WM_cursor_modal(CTX_wm_window(C), BC_NSEW_SCROLLCURSOR);
+ WM_cursor_modal_set(CTX_wm_window(C), BC_NSEW_SCROLLCURSOR);
vpd->x = event->x;
vpd->y = event->y;
@@ -502,7 +502,7 @@ static void view_zoom_init(bContext *C, wmOperator *op, const wmEvent *event)
WM_event_add_modal_handler(C, op);
}
-static void view_zoom_exit(bContext *C, wmOperator *op, int cancel)
+static void view_zoom_exit(bContext *C, wmOperator *op, bool cancel)
{
SpaceClip *sc = CTX_wm_space_clip(C);
ViewZoomData *vpd = op->customdata;
@@ -512,7 +512,7 @@ static void view_zoom_exit(bContext *C, wmOperator *op, int cancel)
ED_region_tag_redraw(CTX_wm_region(C));
}
- WM_cursor_restore(CTX_wm_window(C));
+ WM_cursor_modal_restore(CTX_wm_window(C));
MEM_freeN(op->customdata);
}
@@ -736,7 +736,7 @@ static int view_all_exec(bContext *C, wmOperator *op)
ARegion *ar;
int w, h, width, height;
float aspx, aspy;
- int fit_view = RNA_boolean_get(op->ptr, "fit_view");
+ bool fit_view = RNA_boolean_get(op->ptr, "fit_view");
float zoomx, zoomy;
/* retrieve state */
@@ -782,6 +782,8 @@ static int view_all_exec(bContext *C, wmOperator *op)
void CLIP_OT_view_all(wmOperatorType *ot)
{
+ PropertyRNA *prop;
+
/* identifiers */
ot->name = "View All";
ot->idname = "CLIP_OT_view_all";
@@ -792,7 +794,8 @@ void CLIP_OT_view_all(wmOperatorType *ot)
ot->poll = ED_space_clip_view_clip_poll;
/* properties */
- RNA_def_boolean(ot->srna, "fit_view", 0, "Fit View", "Fit frame to the viewport");
+ prop = RNA_def_boolean(ot->srna, "fit_view", 0, "Fit View", "Fit frame to the viewport");
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
/********************** view selected operator *********************/
@@ -943,7 +946,8 @@ typedef struct ProxyBuildJob {
Scene *scene;
struct Main *main;
MovieClip *clip;
- int clip_flag, stop;
+ int clip_flag;
+ bool stop;
struct IndexBuildContext *index_context;
} ProxyJob;
@@ -1123,10 +1127,10 @@ static void *do_proxy_thread(void *data_v)
ibuf = IMB_ibImageFromMemory(mem, size, IB_rect | IB_multilayer | IB_alphamode_detect, NULL, "proxy frame");
BKE_movieclip_build_proxy_frame_for_ibuf(data->clip, ibuf, NULL, cfra,
- data->build_sizes, data->build_count, FALSE);
+ data->build_sizes, data->build_count, false);
BKE_movieclip_build_proxy_frame_for_ibuf(data->clip, ibuf, data->distortion, cfra,
- data->build_undistort_sizes, data->build_undistort_count, TRUE);
+ data->build_undistort_sizes, data->build_undistort_count, true);
IMB_freeImBuf(ibuf);
@@ -1455,6 +1459,59 @@ void CLIP_OT_set_scene_frames(wmOperatorType *ot)
ot->exec = clip_set_scene_frames_exec;
}
+/******************** set 3d cursor operator ********************/
+
+static int clip_set_2d_cursor_exec(bContext *C, wmOperator *op)
+{
+ SpaceClip *sclip = CTX_wm_space_clip(C);
+ bool show_cursor = false;
+
+ show_cursor |= sclip->mode == SC_MODE_MASKEDIT;
+ show_cursor |= sclip->around == V3D_CURSOR;
+
+ if (!show_cursor) {
+ return OPERATOR_CANCELLED;
+ }
+
+ RNA_float_get_array(op->ptr, "location", sclip->cursor);
+
+ WM_event_add_notifier(C, NC_SPACE | ND_SPACE_CLIP, NULL);
+
+ return OPERATOR_FINISHED;
+}
+
+static int clip_set_2d_cursor_invoke(bContext *C, wmOperator *op, const wmEvent *event)
+{
+ ARegion *ar = CTX_wm_region(C);
+ SpaceClip *sclip = CTX_wm_space_clip(C);
+ float location[2];
+
+ ED_clip_mouse_pos(sclip, ar, event->mval, location);
+ RNA_float_set_array(op->ptr, "location", location);
+
+ return clip_set_2d_cursor_exec(C, op);
+}
+
+void CLIP_OT_cursor_set(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Set 2D Cursor";
+ ot->description = "Set 2D cursor location";
+ ot->idname = "CLIP_OT_cursor_set";
+
+ /* api callbacks */
+ ot->exec = clip_set_2d_cursor_exec;
+ ot->invoke = clip_set_2d_cursor_invoke;
+ ot->poll = ED_space_clip_poll;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+
+ /* properties */
+ RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX, "Location",
+ "Cursor location in normalized clip coordinates", -10.0f, 10.0f);
+}
+
/********************** macroses *********************/
void ED_operatormacros_clip(void)
diff --git a/source/blender/editors/space_clip/clip_utils.c b/source/blender/editors/space_clip/clip_utils.c
index 72a3cb98a6a..060531ae82c 100644
--- a/source/blender/editors/space_clip/clip_utils.c
+++ b/source/blender/editors/space_clip/clip_utils.c
@@ -37,7 +37,9 @@
#include "BLI_utildefines.h"
#include "BLI_math.h"
#include "BLI_listbase.h"
+#include "BLI_string.h"
+#include "BKE_animsys.h"
#include "BKE_context.h"
#include "BKE_movieclip.h"
#include "BKE_tracking.h"
@@ -76,7 +78,8 @@ void clip_graph_tracking_values_iterate_track(
BKE_movieclip_get_size(clip, &sc->user, &width, &height);
for (coord = 0; coord < 2; coord++) {
- int i, open = FALSE, prevfra = 0;
+ int i, prevfra = 0;
+ bool open = false;
float prevval = 0.0f;
for (i = 0; i < track->markersnr; i++) {
@@ -88,7 +91,7 @@ void clip_graph_tracking_values_iterate_track(
if (segment_end)
segment_end(userdata);
- open = FALSE;
+ open = false;
}
continue;
@@ -98,7 +101,7 @@ void clip_graph_tracking_values_iterate_track(
if (segment_start)
segment_start(userdata, track, coord);
- open = TRUE;
+ open = true;
prevval = marker->pos[coord];
}
@@ -124,7 +127,7 @@ void clip_graph_tracking_values_iterate_track(
}
void clip_graph_tracking_values_iterate(
- SpaceClip *sc, int selected_only, int include_hidden, void *userdata,
+ SpaceClip *sc, bool selected_only, bool include_hidden, void *userdata,
void (*func)(void *userdata, MovieTrackingTrack *track, MovieTrackingMarker *marker,
int coord, int scene_framenr, float val),
void (*segment_start)(void *userdata, MovieTrackingTrack *track, int coord),
@@ -146,7 +149,7 @@ void clip_graph_tracking_values_iterate(
}
}
-void clip_graph_tracking_iterate(SpaceClip *sc, int selected_only, int include_hidden, void *userdata,
+void clip_graph_tracking_iterate(SpaceClip *sc, bool selected_only, bool include_hidden, void *userdata,
void (*func)(void *userdata, MovieTrackingMarker *marker))
{
MovieClip *clip = ED_space_clip_get_clip(sc);
@@ -183,8 +186,8 @@ void clip_delete_track(bContext *C, MovieClip *clip, MovieTrackingTrack *track)
MovieTrackingPlaneTrack *plane_track, *next_plane_track;
ListBase *tracksbase = BKE_tracking_get_active_tracks(tracking);
ListBase *plane_tracks_base = BKE_tracking_get_active_plane_tracks(tracking);
-
- int has_bundle = FALSE, update_stab = FALSE;
+ bool has_bundle = false, update_stab = false;
+ char track_name_escaped[MAX_NAME], prefix[MAX_NAME * 2];
if (track == act_track)
tracking->act_track = NULL;
@@ -192,19 +195,19 @@ void clip_delete_track(bContext *C, MovieClip *clip, MovieTrackingTrack *track)
if (track == stab->rot_track) {
stab->rot_track = NULL;
- update_stab = TRUE;
+ update_stab = true;
}
/* handle reconstruction display in 3d viewport */
if (track->flag & TRACK_HAS_BUNDLE)
- has_bundle = TRUE;
+ has_bundle = true;
/* Make sure no plane will use freed track */
for (plane_track = plane_tracks_base->first;
plane_track;
plane_track = next_plane_track)
{
- bool found = false;
+ bool found = false;
int i;
next_plane_track = plane_track->next;
@@ -244,6 +247,11 @@ void clip_delete_track(bContext *C, MovieClip *clip, MovieTrackingTrack *track)
}
}
+ /* Delete f-curves associated with the track (such as weight, i.e.) */
+ BLI_strescape(track_name_escaped, track->name, sizeof(track_name_escaped));
+ BLI_snprintf(prefix, sizeof(prefix), "tracks[\"%s\"]", track_name_escaped);
+ BKE_animdata_fix_paths_remove(&clip->id, prefix);
+
BKE_tracking_track_free(track);
BLI_freelinkN(tracksbase, track);
diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c
index 6a257f69bba..d52098a2857 100644
--- a/source/blender/editors/space_clip/space_clip.c
+++ b/source/blender/editors/space_clip/space_clip.c
@@ -56,6 +56,7 @@
#include "ED_screen.h"
#include "ED_clip.h"
#include "ED_transform.h"
+#include "ED_uvedit.h" /* just for draw_image_cursor */
#include "IMB_imbuf.h"
@@ -442,6 +443,7 @@ static void clip_operatortypes(void)
WM_operatortype_append(CLIP_OT_view_ndof);
WM_operatortype_append(CLIP_OT_prefetch);
WM_operatortype_append(CLIP_OT_set_scene_frames);
+ WM_operatortype_append(CLIP_OT_cursor_set);
/* ** clip_toolbar.c ** */
WM_operatortype_append(CLIP_OT_tools);
@@ -524,6 +526,9 @@ static void clip_operatortypes(void)
WM_operatortype_append(CLIP_OT_create_plane_track);
WM_operatortype_append(CLIP_OT_slide_plane_marker);
+ WM_operatortype_append(CLIP_OT_keyframe_insert);
+ WM_operatortype_append(CLIP_OT_keyframe_delete);
+
/* ** clip_graph_ops.c ** */
/* graph editing */
@@ -709,6 +714,9 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
/* plane tracks */
WM_keymap_add_item(keymap, "CLIP_OT_slide_plane_marker", LEFTMOUSE, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "CLIP_OT_keyframe_insert", IKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "CLIP_OT_keyframe_delete", IKEY, KM_PRESS, KM_ALT, 0);
+
/* clean-up */
WM_keymap_add_item(keymap, "CLIP_OT_join_tracks", JKEY, KM_PRESS, KM_CTRL, 0);
@@ -741,6 +749,26 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
RNA_enum_set(kmi->ptr, "action", TRACK_CLEAR_ALL);
RNA_boolean_set(kmi->ptr, "clear_active", FALSE);
+ /* Cursor */
+ WM_keymap_add_item(keymap, "CLIP_OT_cursor_set", ACTIONMOUSE, KM_PRESS, 0, 0);
+
+ /* pivot point */
+ kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", COMMAKEY, KM_PRESS, 0, 0);
+ RNA_string_set(kmi->ptr, "data_path", "space_data.pivot_point");
+ RNA_string_set(kmi->ptr, "value", "BOUNDING_BOX_CENTER");
+
+ kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", COMMAKEY, KM_PRESS, KM_CTRL, 0); /* 2.4x allowed Comma+Shift too, rather not use both */
+ RNA_string_set(kmi->ptr, "data_path", "space_data.pivot_point");
+ RNA_string_set(kmi->ptr, "value", "MEDIAN_POINT");
+
+ kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", PERIODKEY, KM_PRESS, 0, 0);
+ RNA_string_set(kmi->ptr, "data_path", "space_data.pivot_point");
+ RNA_string_set(kmi->ptr, "value", "CURSOR");
+
+ kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", PERIODKEY, KM_PRESS, KM_CTRL, 0);
+ RNA_string_set(kmi->ptr, "data_path", "space_data.pivot_point");
+ RNA_string_set(kmi->ptr, "value", "INDIVIDUAL_ORIGINS");
+
/* ******** Hotkeys avalaible for preview region only ******** */
keymap = WM_keymap_find(keyconf, "Clip Graph Editor", SPACE_CLIP, 0);
@@ -871,36 +899,36 @@ static void clip_refresh(const bContext *C, ScrArea *sa)
ARegion *ar_preview = ED_clip_has_preview_region(C, sa);
ARegion *ar_properties = ED_clip_has_properties_region(sa);
ARegion *ar_channels = ED_clip_has_channels_region(sa);
- int main_visible = FALSE, preview_visible = FALSE, tools_visible = FALSE;
- int tool_props_visible = FALSE, properties_visible = FALSE, channels_visible = FALSE;
- int view_changed = FALSE;
+ bool main_visible = false, preview_visible = false, tools_visible = false;
+ bool tool_props_visible = false, properties_visible = false, channels_visible = false;
+ bool view_changed = false;
switch (sc->view) {
case SC_VIEW_CLIP:
- main_visible = TRUE;
- preview_visible = FALSE;
- tools_visible = TRUE;
- tool_props_visible = TRUE;
- properties_visible = TRUE;
- channels_visible = FALSE;
+ main_visible = true;
+ preview_visible = false;
+ tools_visible = true;
+ tool_props_visible = true;
+ properties_visible = true;
+ channels_visible = false;
break;
case SC_VIEW_GRAPH:
- main_visible = FALSE;
- preview_visible = TRUE;
- tools_visible = FALSE;
- tool_props_visible = FALSE;
- properties_visible = FALSE;
- channels_visible = FALSE;
+ main_visible = false;
+ preview_visible = true;
+ tools_visible = false;
+ tool_props_visible = false;
+ properties_visible = false;
+ channels_visible = false;
reinit_preview_region(C, ar_preview);
break;
case SC_VIEW_DOPESHEET:
- main_visible = FALSE;
- preview_visible = TRUE;
- tools_visible = FALSE;
- tool_props_visible = FALSE;
- properties_visible = FALSE;
- channels_visible = TRUE;
+ main_visible = false;
+ preview_visible = true;
+ tools_visible = false;
+ tool_props_visible = false;
+ properties_visible = false;
+ channels_visible = true;
reinit_preview_region(C, ar_preview);
break;
@@ -910,12 +938,12 @@ static void clip_refresh(const bContext *C, ScrArea *sa)
if (ar_main && (ar_main->flag & RGN_FLAG_HIDDEN)) {
ar_main->flag &= ~RGN_FLAG_HIDDEN;
ar_main->v2d.flag &= ~V2D_IS_INITIALISED;
- view_changed = TRUE;
+ view_changed = true;
}
if (ar_main && ar_main->alignment != RGN_ALIGN_NONE) {
ar_main->alignment = RGN_ALIGN_NONE;
- view_changed = TRUE;
+ view_changed = true;
}
}
else {
@@ -923,11 +951,11 @@ static void clip_refresh(const bContext *C, ScrArea *sa)
ar_main->flag |= RGN_FLAG_HIDDEN;
ar_main->v2d.flag &= ~V2D_IS_INITIALISED;
WM_event_remove_handlers((bContext *)C, &ar_main->handlers);
- view_changed = TRUE;
+ view_changed = true;
}
if (ar_main && ar_main->alignment != RGN_ALIGN_NONE) {
ar_main->alignment = RGN_ALIGN_NONE;
- view_changed = TRUE;
+ view_changed = true;
}
}
@@ -935,11 +963,11 @@ static void clip_refresh(const bContext *C, ScrArea *sa)
if (ar_properties && (ar_properties->flag & RGN_FLAG_HIDDEN)) {
ar_properties->flag &= ~RGN_FLAG_HIDDEN;
ar_properties->v2d.flag &= ~V2D_IS_INITIALISED;
- view_changed = TRUE;
+ view_changed = true;
}
if (ar_properties && ar_properties->alignment != RGN_ALIGN_RIGHT) {
ar_properties->alignment = RGN_ALIGN_RIGHT;
- view_changed = TRUE;
+ view_changed = true;
}
}
else {
@@ -947,11 +975,11 @@ static void clip_refresh(const bContext *C, ScrArea *sa)
ar_properties->flag |= RGN_FLAG_HIDDEN;
ar_properties->v2d.flag &= ~V2D_IS_INITIALISED;
WM_event_remove_handlers((bContext *)C, &ar_properties->handlers);
- view_changed = TRUE;
+ view_changed = true;
}
if (ar_properties && ar_properties->alignment != RGN_ALIGN_NONE) {
ar_properties->alignment = RGN_ALIGN_NONE;
- view_changed = TRUE;
+ view_changed = true;
}
}
@@ -959,11 +987,11 @@ static void clip_refresh(const bContext *C, ScrArea *sa)
if (ar_tools && (ar_tools->flag & RGN_FLAG_HIDDEN)) {
ar_tools->flag &= ~RGN_FLAG_HIDDEN;
ar_tools->v2d.flag &= ~V2D_IS_INITIALISED;
- view_changed = TRUE;
+ view_changed = true;
}
if (ar_tools && ar_tools->alignment != RGN_ALIGN_LEFT) {
ar_tools->alignment = RGN_ALIGN_LEFT;
- view_changed = TRUE;
+ view_changed = true;
}
}
else {
@@ -971,11 +999,11 @@ static void clip_refresh(const bContext *C, ScrArea *sa)
ar_tools->flag |= RGN_FLAG_HIDDEN;
ar_tools->v2d.flag &= ~V2D_IS_INITIALISED;
WM_event_remove_handlers((bContext *)C, &ar_tools->handlers);
- view_changed = TRUE;
+ view_changed = true;
}
if (ar_tools && ar_tools->alignment != RGN_ALIGN_NONE) {
ar_tools->alignment = RGN_ALIGN_NONE;
- view_changed = TRUE;
+ view_changed = true;
}
}
@@ -983,11 +1011,11 @@ static void clip_refresh(const bContext *C, ScrArea *sa)
if (ar_tool_props && (ar_tool_props->flag & RGN_FLAG_HIDDEN)) {
ar_tool_props->flag &= ~RGN_FLAG_HIDDEN;
ar_tool_props->v2d.flag &= ~V2D_IS_INITIALISED;
- view_changed = TRUE;
+ view_changed = true;
}
if (ar_tool_props && (ar_tool_props->alignment != (RGN_ALIGN_BOTTOM | RGN_SPLIT_PREV))) {
ar_tool_props->alignment = RGN_ALIGN_BOTTOM | RGN_SPLIT_PREV;
- view_changed = TRUE;
+ view_changed = true;
}
}
else {
@@ -995,11 +1023,11 @@ static void clip_refresh(const bContext *C, ScrArea *sa)
ar_tool_props->flag |= RGN_FLAG_HIDDEN;
ar_tool_props->v2d.flag &= ~V2D_IS_INITIALISED;
WM_event_remove_handlers((bContext *)C, &ar_tool_props->handlers);
- view_changed = TRUE;
+ view_changed = true;
}
if (ar_tool_props && ar_tool_props->alignment != RGN_ALIGN_NONE) {
ar_tool_props->alignment = RGN_ALIGN_NONE;
- view_changed = TRUE;
+ view_changed = true;
}
}
@@ -1008,11 +1036,11 @@ static void clip_refresh(const bContext *C, ScrArea *sa)
ar_preview->flag &= ~RGN_FLAG_HIDDEN;
ar_preview->v2d.flag &= ~V2D_IS_INITIALISED;
ar_preview->v2d.cur = ar_preview->v2d.tot;
- view_changed = TRUE;
+ view_changed = true;
}
if (ar_preview && ar_preview->alignment != RGN_ALIGN_NONE) {
ar_preview->alignment = RGN_ALIGN_NONE;
- view_changed = TRUE;
+ view_changed = true;
}
}
else {
@@ -1020,11 +1048,11 @@ static void clip_refresh(const bContext *C, ScrArea *sa)
ar_preview->flag |= RGN_FLAG_HIDDEN;
ar_preview->v2d.flag &= ~V2D_IS_INITIALISED;
WM_event_remove_handlers((bContext *)C, &ar_preview->handlers);
- view_changed = TRUE;
+ view_changed = true;
}
if (ar_preview && ar_preview->alignment != RGN_ALIGN_NONE) {
ar_preview->alignment = RGN_ALIGN_NONE;
- view_changed = TRUE;
+ view_changed = true;
}
}
@@ -1032,11 +1060,11 @@ static void clip_refresh(const bContext *C, ScrArea *sa)
if (ar_channels && (ar_channels->flag & RGN_FLAG_HIDDEN)) {
ar_channels->flag &= ~RGN_FLAG_HIDDEN;
ar_channels->v2d.flag &= ~V2D_IS_INITIALISED;
- view_changed = TRUE;
+ view_changed = true;
}
if (ar_channels && ar_channels->alignment != RGN_ALIGN_LEFT) {
ar_channels->alignment = RGN_ALIGN_LEFT;
- view_changed = TRUE;
+ view_changed = true;
}
}
else {
@@ -1044,11 +1072,11 @@ static void clip_refresh(const bContext *C, ScrArea *sa)
ar_channels->flag |= RGN_FLAG_HIDDEN;
ar_channels->v2d.flag &= ~V2D_IS_INITIALISED;
WM_event_remove_handlers((bContext *)C, &ar_channels->handlers);
- view_changed = TRUE;
+ view_changed = true;
}
if (ar_channels && ar_channels->alignment != RGN_ALIGN_NONE) {
ar_channels->alignment = RGN_ALIGN_NONE;
- view_changed = TRUE;
+ view_changed = true;
}
}
@@ -1133,6 +1161,9 @@ static void clip_main_area_draw(const bContext *C, ARegion *ar)
/* draw entirely, view changes should be handled here */
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip_get_clip(sc);
+ float aspx, aspy, zoomx, zoomy, x, y;
+ int width, height;
+ bool show_cursor = false;
/* if tracking is in progress, we should synchronize framenr from clipuser
* so latest tracked frame would be shown */
@@ -1164,29 +1195,45 @@ static void clip_main_area_draw(const bContext *C, ARegion *ar)
clip_draw_main(C, sc, ar);
- if (sc->mode == SC_MODE_MASKEDIT) {
+ /* TODO(sergey): would be nice to find a way to de-duplicate all this space conversions */
+ UI_view2d_to_region_float(&ar->v2d, 0.0f, 0.0f, &x, &y);
+ ED_space_clip_get_size(sc, &width, &height);
+ ED_space_clip_get_zoom(sc, ar, &zoomx, &zoomy);
+ ED_space_clip_get_aspect(sc, &aspx, &aspy);
+ if (sc->mode == SC_MODE_MASKEDIT) {
Mask *mask = CTX_data_edit_mask(C);
if (mask) {
ScrArea *sa = CTX_wm_area(C);
- int width, height;
- float aspx, aspy;
- ED_mask_get_size(sa, &width, &height);
- ED_space_clip_get_aspect(sc, &aspx, &aspy);
+ int mask_width, mask_height;
+ ED_mask_get_size(sa, &mask_width, &mask_height);
ED_mask_draw_region(mask, ar,
- sc->mask_info.draw_flag, sc->mask_info.draw_type,
- width, height,
+ sc->mask_info.draw_flag,
+ sc->mask_info.draw_type,
+ sc->mask_info.overlay_mode,
+ mask_width, mask_height,
aspx, aspy,
TRUE, TRUE,
sc->stabmat, C);
}
+ }
-
+ show_cursor |= sc->mode == SC_MODE_MASKEDIT;
+ show_cursor |= sc->around == V3D_CURSOR;
+
+ if (show_cursor) {
+ glPushMatrix();
+ glTranslatef(x, y, 0);
+ glScalef(zoomx, zoomy, 0);
+ glMultMatrixf(sc->stabmat);
+ glScalef(width, height, 0);
+ draw_image_cursor(ar, sc->cursor);
+ glPopMatrix();
}
if (sc->flag & SC_SHOW_GPENCIL) {
/* Grease Pencil */
- clip_draw_grease_pencil((bContext *)C, TRUE);
+ clip_draw_grease_pencil((bContext *)C, true);
}
/* reset view matrix */
@@ -1194,7 +1241,7 @@ static void clip_main_area_draw(const bContext *C, ARegion *ar)
if (sc->flag & SC_SHOW_GPENCIL) {
/* draw Grease Pencil - screen space only */
- clip_draw_grease_pencil((bContext *)C, FALSE);
+ clip_draw_grease_pencil((bContext *)C, false);
}
}
diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c
index ebc1e3007a6..64f118b0ff0 100644
--- a/source/blender/editors/space_clip/tracking_ops.c
+++ b/source/blender/editors/space_clip/tracking_ops.c
@@ -593,14 +593,14 @@ static int mouse_on_tilt(SpaceClip *sc, MovieTrackingMarker *marker, float co[2]
return mouse_on_slide_zone(sc, marker, TRACK_AREA_PAT, co, slider, 0.0f, width, height);
}
-static int slide_check_corners(float (*corners)[2])
+static bool slide_check_corners(float (*corners)[2])
{
int i, next, prev;
float cross = 0.0f;
float p[2] = {0.0f, 0.0f};
if (!isect_point_quad_v2(p, corners[0], corners[1], corners[2], corners[3]))
- return FALSE;
+ return false;
for (i = 0; i < 4; i++) {
float v1[2], v2[2], cur_cross;
@@ -618,12 +618,12 @@ static int slide_check_corners(float (*corners)[2])
cross = cur_cross;
}
else if (cross * cur_cross < 0.0f) {
- return FALSE;
+ return false;
}
}
}
- return TRUE;
+ return true;
}
static void hide_cursor(bContext *C)
@@ -664,25 +664,25 @@ MovieTrackingTrack *tracking_marker_check_slide(bContext *C, const wmEvent *even
while (track) {
if (TRACK_VIEW_SELECTED(sc, track) && (track->flag & TRACK_LOCKED) == 0) {
MovieTrackingMarker *marker = BKE_tracking_marker_get(track, framenr);
- int ok = FALSE;
+ bool ok = false;
if ((marker->flag & MARKER_DISABLED) == 0) {
if (mouse_on_offset(sc, track, marker, co, width, height)) {
area = TRACK_AREA_POINT;
action = SLIDE_ACTION_POS;
- ok = TRUE;
+ ok = true;
}
if (!ok && (sc->flag & SC_SHOW_MARKER_SEARCH)) {
if (mouse_on_corner(sc, marker, TRACK_AREA_SEARCH, co, 1, 0.0f, width, height)) {
area = TRACK_AREA_SEARCH;
action = SLIDE_ACTION_OFFSET;
- ok = TRUE;
+ ok = true;
}
else if (mouse_on_corner(sc, marker, TRACK_AREA_SEARCH, co, 0, 0.0f, width, height)) {
area = TRACK_AREA_SEARCH;
action = SLIDE_ACTION_SIZE;
- ok = TRUE;
+ ok = true;
}
}
@@ -693,7 +693,7 @@ MovieTrackingTrack *tracking_marker_check_slide(bContext *C, const wmEvent *even
area = TRACK_AREA_PAT;
action = SLIDE_ACTION_POS;
corner = current_corner;
- ok = TRUE;
+ ok = true;
}
else {
#if 0
@@ -702,18 +702,18 @@ MovieTrackingTrack *tracking_marker_check_slide(bContext *C, const wmEvent *even
if (mouse_on_corner(sc, marker, TRACK_AREA_PAT, co, 1, 12.0f, width, height)) {
area = TRACK_AREA_PAT;
action = SLIDE_ACTION_OFFSET;
- ok = TRUE;
+ ok = true;
}
if (!ok && mouse_on_corner(sc, marker, TRACK_AREA_PAT, co, 0, 12.0f, width, height)) {
area = TRACK_AREA_PAT;
action = SLIDE_ACTION_SIZE;
- ok = TRUE;
+ ok = true;
}
#endif
if (!ok && mouse_on_tilt(sc, marker, co, width, height)) {
area = TRACK_AREA_PAT;
action = SLIDE_ACTION_TILT_SIZE;
- ok = TRUE;
+ ok = true;
}
}
}
@@ -812,6 +812,32 @@ static void cancel_mouse_slide(SlideMarkerData *data)
}
}
+static void apply_mouse_slide(bContext *C, SlideMarkerData *data)
+{
+ if (data->area == TRACK_AREA_POINT) {
+ SpaceClip *sc = CTX_wm_space_clip(C);
+ MovieClip *clip = ED_space_clip_get_clip(sc);
+ MovieTrackingPlaneTrack *plane_track;
+ ListBase *plane_tracks_base = BKE_tracking_get_active_plane_tracks(&clip->tracking);
+ int framenr = ED_space_clip_get_clip_frame_number(sc);
+
+ for (plane_track = plane_tracks_base->first;
+ plane_track;
+ plane_track = plane_track->next)
+ {
+ if ((plane_track->flag & PLANE_TRACK_AUTOKEY) == 0) {
+ int i;
+ for (i = 0; i < plane_track->point_tracksnr; i++) {
+ if (plane_track->point_tracks[i] == data->track) {
+ BKE_tracking_track_plane_from_existing_motion(plane_track, framenr);
+ break;
+ }
+ }
+ }
+ }
+ }
+}
+
static void free_slide_data(SlideMarkerData *data)
{
if (data->old_markers)
@@ -1007,6 +1033,7 @@ static int slide_marker_modal(bContext *C, wmOperator *op, const wmEvent *event)
case LEFTMOUSE:
if (event->val == KM_RELEASE) {
+ apply_mouse_slide(C, op->customdata);
free_slide_data(op->customdata);
show_cursor(C);
@@ -1145,18 +1172,18 @@ static void track_init_markers(SpaceClip *sc, MovieClip *clip, int *frames_limit
*frames_limit_r = frames_limit;
}
-static int track_markers_check_direction(int backwards, int curfra, int efra)
+static bool track_markers_check_direction(int backwards, int curfra, int efra)
{
if (backwards) {
if (curfra < efra)
- return FALSE;
+ return false;
}
else {
if (curfra > efra)
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
static int track_markers_initjob(bContext *C, TrackMarkersJob *tmj, int backwards)
@@ -1267,7 +1294,7 @@ static void track_markers_updatejob(void *tmv)
BKE_tracking_context_sync(tmj->context);
}
-static void track_markers_freejob(void *tmv)
+static void track_markers_endjob(void *tmv)
{
TrackMarkersJob *tmj = (TrackMarkersJob *)tmv;
@@ -1276,10 +1303,15 @@ static void track_markers_freejob(void *tmv)
ED_update_for_newframe(tmj->main, tmj->scene, 0);
BKE_tracking_context_sync(tmj->context);
- BKE_tracking_context_free(tmj->context);
+ BKE_tracking_context_finish(tmj->context);
WM_main_add_notifier(NC_SCENE | ND_FRAME, tmj->scene);
+}
+static void track_markers_freejob(void *tmv)
+{
+ TrackMarkersJob *tmj = (TrackMarkersJob *)tmv;
+ BKE_tracking_context_free(tmj->context);
MEM_freeN(tmj);
}
@@ -1333,6 +1365,7 @@ static int track_markers_exec(bContext *C, wmOperator *op)
}
BKE_tracking_context_sync(context);
+ BKE_tracking_context_finish(context);
BKE_tracking_context_free(context);
/* update scene current frame to the lastes tracked frame */
@@ -1389,7 +1422,7 @@ static int track_markers_invoke(bContext *C, wmOperator *op, const wmEvent *UNUS
else
WM_jobs_timer(wm_job, 0.2, NC_MOVIECLIP | NA_EVALUATED, 0);
- WM_jobs_callbacks(wm_job, track_markers_startjob, NULL, track_markers_updatejob, NULL);
+ WM_jobs_callbacks(wm_job, track_markers_startjob, NULL, track_markers_updatejob, track_markers_endjob);
G.is_break = FALSE;
@@ -1517,7 +1550,7 @@ static int solve_camera_initjob(bContext *C, SolveCameraJob *scj, wmOperator *op
scj->reports = op->reports;
scj->user = sc->user;
- scj->context = BKE_tracking_reconstruction_context_new(tracking, object,
+ scj->context = BKE_tracking_reconstruction_context_new(clip, object,
object->keyframe1, object->keyframe2, width, height);
tracking->stats = MEM_callocN(sizeof(MovieTrackingStats), "solve camera stats");
@@ -1874,13 +1907,13 @@ static Object *get_camera_with_movieclip(Scene *scene, MovieClip *clip)
Object *camera = scene->camera;
Base *base;
- if (camera && BKE_object_movieclip_get(scene, camera, 0) == clip)
+ if (camera && BKE_object_movieclip_get(scene, camera, false) == clip)
return camera;
base = scene->base.first;
while (base) {
if (base->object->type == OB_CAMERA) {
- if (BKE_object_movieclip_get(scene, base->object, 0) == clip) {
+ if (BKE_object_movieclip_get(scene, base->object, false) == clip) {
camera = base->object;
break;
}
@@ -1960,7 +1993,7 @@ static int count_selected_bundles(bContext *C)
static void object_solver_inverted_matrix(Scene *scene, Object *ob, float invmat[4][4])
{
bConstraint *con;
- int found = FALSE;
+ bool found = false;
for (con = ob->constraints.first; con; con = con->next) {
bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(con);
@@ -1979,7 +2012,7 @@ static void object_solver_inverted_matrix(Scene *scene, Object *ob, float invmat
mul_m4_m4m4(invmat, invmat, data->invmat);
- found = TRUE;
+ found = true;
}
}
@@ -2099,7 +2132,7 @@ static void set_axis(Scene *scene, Object *ob, MovieClip *clip, MovieTrackingOb
{
Object *camera = get_camera_with_movieclip(scene, clip);
int is_camera = tracking_object->flag & TRACKING_OBJECT_CAMERA;
- int flip = FALSE;
+ bool flip = false;
float mat[4][4], vec[3], obmat[4][4], dvec[3];
BKE_object_to_mat4(ob, obmat);
@@ -2127,7 +2160,7 @@ static void set_axis(Scene *scene, Object *ob, MovieClip *clip, MovieTrackingOb
if (axis == 'X') {
if (fabsf(dvec[1]) < 1e-3f) {
- flip = TRUE;
+ flip = true;
mat[0][0] = -1.0f; mat[0][1] = 0.0f; mat[0][2] = 0.0f;
mat[1][0] = 0.0f; mat[1][1] = -1.0f; mat[1][2] = 0.0f;
@@ -2151,7 +2184,7 @@ static void set_axis(Scene *scene, Object *ob, MovieClip *clip, MovieTrackingOb
}
else {
if (fabsf(dvec[0]) < 1e-3f) {
- flip = TRUE;
+ flip = true;
mat[0][0] = -1.0f; mat[0][1] = 0.0f; mat[0][2] = 0.0f;
mat[1][0] = 0.0f; mat[1][1] = -1.0f; mat[1][2] = 0.0f;
@@ -2372,7 +2405,7 @@ static int set_axis_exec(bContext *C, wmOperator *op)
track = tracksbase->first;
while (track) {
- if (TRACK_VIEW_SELECTED(sc, track))
+ if (TRACK_VIEW_SELECTED(sc, track) && (track->flag & TRACK_HAS_BUNDLE))
break;
track = track->next;
@@ -4910,3 +4943,99 @@ void CLIP_OT_slide_plane_marker(wmOperatorType *ot)
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_GRAB_POINTER | OPTYPE_BLOCKING;
}
+
+/********************** Insert track keyframe operator *********************/
+
+static void keyframe_set_flag(bContext *C, bool set)
+{
+ SpaceClip *sc = CTX_wm_space_clip(C);
+ MovieClip *clip = ED_space_clip_get_clip(sc);
+ MovieTracking *tracking = &clip->tracking;
+ ListBase *tracks_base = BKE_tracking_get_active_tracks(tracking);
+ ListBase *plane_tracks_base = BKE_tracking_get_active_plane_tracks(tracking);
+ MovieTrackingTrack *track;
+ MovieTrackingPlaneTrack *plane_track;
+ int framenr = ED_space_clip_get_clip_frame_number(sc);
+
+ for (track = tracks_base->first; track; track = track->next) {
+ if (TRACK_VIEW_SELECTED(sc, track)) {
+ if (set) {
+ MovieTrackingMarker *marker = BKE_tracking_marker_ensure(track, framenr);
+ marker->flag &= ~MARKER_TRACKED;
+ }
+ else {
+ MovieTrackingMarker *marker = BKE_tracking_marker_get_exact(track, framenr);
+ if (marker) {
+ marker->flag |= MARKER_TRACKED;
+ }
+ }
+ }
+ }
+
+ for (plane_track = plane_tracks_base->first; plane_track; plane_track = plane_track->next) {
+ if (plane_track->flag & SELECT) {
+ if (set) {
+ MovieTrackingPlaneMarker *plane_marker = BKE_tracking_plane_marker_ensure(plane_track, framenr);
+ if (plane_marker->flag & PLANE_MARKER_TRACKED) {
+ plane_marker->flag &= ~PLANE_MARKER_TRACKED;
+ BKE_tracking_track_plane_from_existing_motion(plane_track, plane_marker->framenr);
+ }
+ }
+ else {
+ MovieTrackingPlaneMarker *plane_marker = BKE_tracking_plane_marker_get_exact(plane_track, framenr);
+ if (plane_marker) {
+ if ((plane_marker->flag & PLANE_MARKER_TRACKED) == 0) {
+ plane_marker->flag |= PLANE_MARKER_TRACKED;
+ BKE_tracking_retrack_plane_from_existing_motion_at_segment(plane_track, plane_marker->framenr);
+ }
+ }
+ }
+ }
+ }
+
+ WM_event_add_notifier(C, NC_MOVIECLIP | NA_EDITED, clip);
+}
+
+static int keyframe_insert_exec(bContext *C, wmOperator *UNUSED(op))
+{
+ keyframe_set_flag(C, true);
+ return OPERATOR_FINISHED;
+}
+
+void CLIP_OT_keyframe_insert(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Insert keyframe";
+ ot->description = "Insert a keyframe to selected tracks at current frame";
+ ot->idname = "CLIP_OT_keyframe_insert";
+
+ /* api callbacks */
+ ot->poll = ED_space_clip_tracking_poll;
+ ot->exec = keyframe_insert_exec;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+}
+
+/********************** Delete track keyframe operator *********************/
+
+static int keyframe_delete_exec(bContext *C, wmOperator *UNUSED(op))
+{
+ keyframe_set_flag(C, false);
+ return OPERATOR_FINISHED;
+}
+
+void CLIP_OT_keyframe_delete(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Delete keyframe";
+ ot->description = "Delete a keyframe from selected tracks at current frame";
+ ot->idname = "CLIP_OT_keyframe_delete";
+
+ /* api callbacks */
+ ot->poll = ED_space_clip_tracking_poll;
+ ot->exec = keyframe_delete_exec;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+}
diff --git a/source/blender/editors/space_clip/tracking_select.c b/source/blender/editors/space_clip/tracking_select.c
index 6e4d10173fb..7cb5f9b5dc0 100644
--- a/source/blender/editors/space_clip/tracking_select.c
+++ b/source/blender/editors/space_clip/tracking_select.c
@@ -461,7 +461,8 @@ static int border_select_exec(bContext *C, wmOperator *op)
ListBase *plane_tracks_base = BKE_tracking_get_active_plane_tracks(tracking);
rcti rect;
rctf rectf;
- int change = FALSE, mode, extend;
+ bool change = false;
+ int mode, extend;
int framenr = ED_space_clip_get_clip_frame_number(sc);
/* get rectangle from operator */
@@ -490,7 +491,7 @@ static int border_select_exec(bContext *C, wmOperator *op)
BKE_tracking_track_flag_clear(track, TRACK_AREA_ALL, SELECT);
}
- change = TRUE;
+ change = true;
}
}
@@ -520,7 +521,7 @@ static int border_select_exec(bContext *C, wmOperator *op)
}
}
- change = TRUE;
+ change = true;
}
}
@@ -569,7 +570,7 @@ static int do_lasso_select_marker(bContext *C, const int mcords[][2], const shor
ListBase *tracksbase = BKE_tracking_get_active_tracks(tracking);
ListBase *plane_tracks_base = BKE_tracking_get_active_plane_tracks(tracking);
rcti rect;
- int change = FALSE;
+ bool change = false;
int framenr = ED_space_clip_get_clip_frame_number(sc);
/* get rectangle from operator */
@@ -596,7 +597,7 @@ static int do_lasso_select_marker(bContext *C, const int mcords[][2], const shor
BKE_tracking_track_flag_clear(track, TRACK_AREA_ALL, SELECT);
}
- change = TRUE;
+ change = true;
}
}
@@ -630,7 +631,7 @@ static int do_lasso_select_marker(bContext *C, const int mcords[][2], const shor
}
}
- change = TRUE;
+ change = true;
}
}
@@ -713,7 +714,8 @@ static int circle_select_exec(bContext *C, wmOperator *op)
MovieTrackingPlaneTrack *plane_track;
ListBase *tracksbase = BKE_tracking_get_active_tracks(tracking);
ListBase *plane_tracks_base = BKE_tracking_get_active_plane_tracks(tracking);
- int x, y, radius, width, height, mode, change = FALSE;
+ int x, y, radius, width, height, mode;
+ bool change = false;
float zoomx, zoomy, offset[2], ellipse[2];
int framenr = ED_space_clip_get_clip_frame_number(sc);
@@ -745,7 +747,7 @@ static int circle_select_exec(bContext *C, wmOperator *op)
else
BKE_tracking_track_flag_clear(track, TRACK_AREA_ALL, SELECT);
- change = TRUE;
+ change = true;
}
}
@@ -772,7 +774,7 @@ static int circle_select_exec(bContext *C, wmOperator *op)
}
}
- change = TRUE;
+ change = true;
}
}
@@ -824,7 +826,7 @@ static int select_all_exec(bContext *C, wmOperator *op)
ListBase *plane_tracks_base = BKE_tracking_get_active_plane_tracks(tracking);
int action = RNA_enum_get(op->ptr, "action");
int framenr = ED_space_clip_get_clip_frame_number(sc);
- int has_selection = FALSE;
+ bool has_selection = false;
if (action == SEL_TOGGLE) {
action = SEL_SELECT;
@@ -877,7 +879,7 @@ static int select_all_exec(bContext *C, wmOperator *op)
}
if (TRACK_VIEW_SELECTED(sc, track))
- has_selection = TRUE;
+ has_selection = true;
}
for (plane_track = plane_tracks_base->first;
@@ -899,7 +901,7 @@ static int select_all_exec(bContext *C, wmOperator *op)
}
if (plane_track->flag & SELECT) {
- has_selection = TRUE;
+ has_selection = true;
}
}
@@ -945,7 +947,7 @@ static int select_groped_exec(bContext *C, wmOperator *op)
track = tracksbase->first;
while (track) {
- int ok = FALSE;
+ bool ok = false;
marker = BKE_tracking_marker_get(track, framenr);
diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c
index c10ea96096f..289986d7fba 100644
--- a/source/blender/editors/space_console/console_ops.c
+++ b/source/blender/editors/space_console/console_ops.c
@@ -681,6 +681,7 @@ static int console_clear_exec(bContext *C, wmOperator *op)
if (history) {
while (sc->history.first)
console_history_free(sc, sc->history.first);
+ console_history_verify(C);
}
console_textview_update_rect(sc, ar);
diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c
index 88a04197847..5c8d1e84fd5 100644
--- a/source/blender/editors/space_console/space_console.c
+++ b/source/blender/editors/space_console/space_console.c
@@ -317,6 +317,7 @@ static void console_keymap(struct wmKeyConfig *keyconf)
RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_delete", BACKSPACEKEY, KM_PRESS, KM_CTRL, 0)->ptr, "type", DEL_PREV_WORD);
WM_keymap_add_item(keymap, "CONSOLE_OT_clear_line", RETKEY, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "CONSOLE_OT_clear_line", PADENTER, KM_PRESS, KM_SHIFT, 0);
#ifdef WITH_PYTHON
kmi = WM_keymap_add_item(keymap, "CONSOLE_OT_execute", RETKEY, KM_PRESS, 0, 0);
diff --git a/source/blender/editors/space_file/CMakeLists.txt b/source/blender/editors/space_file/CMakeLists.txt
index b30f008e1bf..3b2db3ee7bc 100644
--- a/source/blender/editors/space_file/CMakeLists.txt
+++ b/source/blender/editors/space_file/CMakeLists.txt
@@ -58,6 +58,10 @@ if(WITH_IMAGE_OPENEXR)
add_definitions(-DWITH_OPENEXR)
endif()
+if(WITH_OPENIMAGEIO)
+ add_definitions(-DWITH_OPENIMAGEIO)
+endif()
+
if(WITH_IMAGE_TIFF)
add_definitions(-DWITH_TIFF)
endif()
diff --git a/source/blender/editors/space_file/SConscript b/source/blender/editors/space_file/SConscript
index e1eadb66a11..d42394454eb 100644
--- a/source/blender/editors/space_file/SConscript
+++ b/source/blender/editors/space_file/SConscript
@@ -55,6 +55,9 @@ if env['WITH_BF_OPENEXR']:
if env['WITH_BF_TIFF']:
defs.append('WITH_TIFF')
+if env['WITH_BF_OIIO']:
+ defs.append('WITH_OPENIMAGEIO')
+
if env['WITH_BF_INTERNATIONAL']:
defs.append('WITH_INTERNATIONAL')
diff --git a/source/blender/editors/space_file/file_intern.h b/source/blender/editors/space_file/file_intern.h
index 240106d37d5..d01286442be 100644
--- a/source/blender/editors/space_file/file_intern.h
+++ b/source/blender/editors/space_file/file_intern.h
@@ -65,7 +65,7 @@ void FILE_OT_select_all_toggle(struct wmOperatorType *ot);
void FILE_OT_select_border(struct wmOperatorType *ot);
void FILE_OT_select_bookmark(struct wmOperatorType *ot);
void FILE_OT_bookmark_add(struct wmOperatorType *ot);
-void FILE_OT_delete_bookmark(struct wmOperatorType *ot);
+void FILE_OT_bookmark_delete(struct wmOperatorType *ot);
void FILE_OT_reset_recent(wmOperatorType *ot);
void FILE_OT_hidedot(struct wmOperatorType *ot);
void FILE_OT_execute(struct wmOperatorType *ot);
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index e3270d9ce8e..a97b3b1d719 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -503,14 +503,14 @@ static int bookmark_delete_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void FILE_OT_delete_bookmark(wmOperatorType *ot)
+void FILE_OT_bookmark_delete(wmOperatorType *ot)
{
PropertyRNA *prop;
/* identifiers */
ot->name = "Delete Bookmark";
ot->description = "Delete selected bookmark";
- ot->idname = "FILE_OT_delete_bookmark";
+ ot->idname = "FILE_OT_bookmark_delete";
/* api callbacks */
ot->exec = bookmark_delete_exec;
diff --git a/source/blender/editors/space_file/file_panels.c b/source/blender/editors/space_file/file_panels.c
index 0efc7b927a9..f4161c7da1c 100644
--- a/source/blender/editors/space_file/file_panels.c
+++ b/source/blender/editors/space_file/file_panels.c
@@ -121,7 +121,7 @@ static void file_panel_category(const bContext *C, Panel *pa, FSMenuCategory cat
/* create delete button */
if (allow_delete && fsmenu_can_save(fsmenu, category, i)) {
uiBlockSetEmboss(block, UI_EMBOSSN);
- uiItemIntO(layout, "", ICON_X, "FILE_OT_delete_bookmark", "index", i);
+ uiItemIntO(layout, "", ICON_X, "FILE_OT_bookmark_delete", "index", i);
uiBlockSetEmboss(block, UI_EMBOSS);
}
}
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 8f25ac38963..19a6296993d 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -152,17 +152,27 @@ static ImBuf *gSpecialFileImages[SPECIAL_IMG_MAX];
/* ******************* SORT ******************* */
+static bool compare_is_directory(const struct direntry *entry)
+{
+ /* for library browse .blend files may be treated as directories, but
+ * for sorting purposes they should be considered regular files */
+ if (S_ISDIR(entry->type))
+ return !(entry->flags & (BLENDERFILE | BLENDERFILE_BACKUP));
+
+ return false;
+}
+
static int compare_name(const void *a1, const void *a2)
{
const struct direntry *entry1 = a1, *entry2 = a2;
/* type is equal to stat.st_mode */
- if (S_ISDIR(entry1->type)) {
- if (S_ISDIR(entry2->type) == 0) return (-1);
+ if (compare_is_directory(entry1)) {
+ if (compare_is_directory(entry2) == 0) return (-1);
}
else {
- if (S_ISDIR(entry2->type)) return (1);
+ if (compare_is_directory(entry2)) return (1);
}
if (S_ISREG(entry1->type)) {
if (S_ISREG(entry2->type) == 0) return (-1);
@@ -188,11 +198,11 @@ static int compare_date(const void *a1, const void *a2)
/* type is equal to stat.st_mode */
- if (S_ISDIR(entry1->type)) {
- if (S_ISDIR(entry2->type) == 0) return (-1);
+ if (compare_is_directory(entry1)) {
+ if (compare_is_directory(entry2) == 0) return (-1);
}
else {
- if (S_ISDIR(entry2->type)) return (1);
+ if (compare_is_directory(entry2)) return (1);
}
if (S_ISREG(entry1->type)) {
if (S_ISREG(entry2->type) == 0) return (-1);
@@ -221,11 +231,11 @@ static int compare_size(const void *a1, const void *a2)
/* type is equal to stat.st_mode */
- if (S_ISDIR(entry1->type)) {
- if (S_ISDIR(entry2->type) == 0) return (-1);
+ if (compare_is_directory(entry1)) {
+ if (compare_is_directory(entry2) == 0) return (-1);
}
else {
- if (S_ISDIR(entry2->type)) return (1);
+ if (compare_is_directory(entry2)) return (1);
}
if (S_ISREG(entry1->type)) {
if (S_ISREG(entry2->type) == 0) return (-1);
@@ -262,11 +272,11 @@ static int compare_extension(const void *a1, const void *a2)
/* type is equal to stat.st_mode */
- if (S_ISDIR(entry1->type)) {
- if (S_ISDIR(entry2->type) == 0) return (-1);
+ if (compare_is_directory(entry1)) {
+ if (compare_is_directory(entry2) == 0) return (-1);
}
else {
- if (S_ISDIR(entry2->type)) return (1);
+ if (compare_is_directory(entry2)) return (1);
}
if (S_ISREG(entry1->type)) {
if (S_ISREG(entry2->type) == 0) return (-1);
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index 85e4d255603..9d762c80405 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -59,6 +59,7 @@
#include "BLI_dynstr.h"
#include "BLI_utildefines.h"
#include "BLI_fileops_types.h"
+#include "BLI_fnmatch.h"
#include "BKE_context.h"
#include "BKE_global.h"
@@ -81,12 +82,6 @@
#include "file_intern.h"
#include "filelist.h"
-#if defined WIN32 && !defined _LIBC
-# include "BLI_fnmatch.h" /* use fnmatch included in blenlib */
-#else
-# include <fnmatch.h>
-#endif
-
FileSelectParams *ED_fileselect_get_params(struct SpaceFile *sfile)
{
if (!sfile->params) {
@@ -115,6 +110,7 @@ short ED_fileselect_set_params(SpaceFile *sfile)
/* set the parameters from the operator, if it exists */
if (op) {
+ PropertyRNA *prop;
const short is_files = (RNA_struct_find_property(op->ptr, "files") != NULL);
const short is_filepath = (RNA_struct_find_property(op->ptr, "filepath") != NULL);
const short is_filename = (RNA_struct_find_property(op->ptr, "filename") != NULL);
@@ -163,30 +159,30 @@ short ED_fileselect_set_params(SpaceFile *sfile)
}
params->filter = 0;
- if (RNA_struct_find_property(op->ptr, "filter_blender"))
- params->filter |= RNA_boolean_get(op->ptr, "filter_blender") ? BLENDERFILE : 0;
- if (RNA_struct_find_property(op->ptr, "filter_backup"))
- params->filter |= RNA_boolean_get(op->ptr, "filter_backup") ? BLENDERFILE_BACKUP : 0;
- if (RNA_struct_find_property(op->ptr, "filter_image"))
- params->filter |= RNA_boolean_get(op->ptr, "filter_image") ? IMAGEFILE : 0;
- if (RNA_struct_find_property(op->ptr, "filter_movie"))
- params->filter |= RNA_boolean_get(op->ptr, "filter_movie") ? MOVIEFILE : 0;
- if (RNA_struct_find_property(op->ptr, "filter_python"))
- params->filter |= RNA_boolean_get(op->ptr, "filter_python") ? PYSCRIPTFILE : 0;
- if (RNA_struct_find_property(op->ptr, "filter_font"))
- params->filter |= RNA_boolean_get(op->ptr, "filter_font") ? FTFONTFILE : 0;
- if (RNA_struct_find_property(op->ptr, "filter_sound"))
- params->filter |= RNA_boolean_get(op->ptr, "filter_sound") ? SOUNDFILE : 0;
- if (RNA_struct_find_property(op->ptr, "filter_text"))
- params->filter |= RNA_boolean_get(op->ptr, "filter_text") ? TEXTFILE : 0;
- if (RNA_struct_find_property(op->ptr, "filter_folder"))
- params->filter |= RNA_boolean_get(op->ptr, "filter_folder") ? FOLDERFILE : 0;
- if (RNA_struct_find_property(op->ptr, "filter_btx"))
- params->filter |= RNA_boolean_get(op->ptr, "filter_btx") ? BTXFILE : 0;
- if (RNA_struct_find_property(op->ptr, "filter_collada"))
- params->filter |= RNA_boolean_get(op->ptr, "filter_collada") ? COLLADAFILE : 0;
- if (RNA_struct_find_property(op->ptr, "filter_glob")) {
- RNA_string_get(op->ptr, "filter_glob", params->filter_glob);
+ if ((prop = RNA_struct_find_property(op->ptr, "filter_blender")))
+ params->filter |= RNA_property_boolean_get(op->ptr, prop) ? BLENDERFILE : 0;
+ if ((prop = RNA_struct_find_property(op->ptr, "filter_backup")))
+ params->filter |= RNA_property_boolean_get(op->ptr, prop) ? BLENDERFILE_BACKUP : 0;
+ if ((prop = RNA_struct_find_property(op->ptr, "filter_image")))
+ params->filter |= RNA_property_boolean_get(op->ptr, prop) ? IMAGEFILE : 0;
+ if ((prop = RNA_struct_find_property(op->ptr, "filter_movie")))
+ params->filter |= RNA_property_boolean_get(op->ptr, prop) ? MOVIEFILE : 0;
+ if ((prop = RNA_struct_find_property(op->ptr, "filter_python")))
+ params->filter |= RNA_property_boolean_get(op->ptr, prop) ? PYSCRIPTFILE : 0;
+ if ((prop = RNA_struct_find_property(op->ptr, "filter_font")))
+ params->filter |= RNA_property_boolean_get(op->ptr, prop) ? FTFONTFILE : 0;
+ if ((prop = RNA_struct_find_property(op->ptr, "filter_sound")))
+ params->filter |= RNA_property_boolean_get(op->ptr, prop) ? SOUNDFILE : 0;
+ if ((prop = RNA_struct_find_property(op->ptr, "filter_text")))
+ params->filter |= RNA_property_boolean_get(op->ptr, prop) ? TEXTFILE : 0;
+ if ((prop = RNA_struct_find_property(op->ptr, "filter_folder")))
+ params->filter |= RNA_property_boolean_get(op->ptr, prop) ? FOLDERFILE : 0;
+ if ((prop = RNA_struct_find_property(op->ptr, "filter_btx")))
+ params->filter |= RNA_property_boolean_get(op->ptr, prop) ? BTXFILE : 0;
+ if ((prop = RNA_struct_find_property(op->ptr, "filter_collada")))
+ params->filter |= RNA_property_boolean_get(op->ptr, prop) ? COLLADAFILE : 0;
+ if ((prop = RNA_struct_find_property(op->ptr, "filter_glob"))) {
+ RNA_property_string_get(op->ptr, prop, params->filter_glob);
params->filter |= (OPERATORFILE | FOLDERFILE);
}
else {
diff --git a/source/blender/editors/space_file/fsmenu.c b/source/blender/editors/space_file/fsmenu.c
index 04c68e5ea68..0227230fb68 100644
--- a/source/blender/editors/space_file/fsmenu.c
+++ b/source/blender/editors/space_file/fsmenu.c
@@ -350,7 +350,7 @@ void fsmenu_read_system(struct FSMenu *fsmenu, int read_bookmarks)
#else
#ifdef __APPLE__
{
-#if (MAC_OS_X_VERSION_MIN_REQUIRED <= 1040)
+#if (MAC_OS_X_VERSION_MIN_REQUIRED <= 1050)
OSErr err = noErr;
int i;
const char *home;
@@ -399,71 +399,38 @@ void fsmenu_read_system(struct FSMenu *fsmenu, int read_bookmarks)
fsmenu_insert_entry(fsmenu, FS_CATEGORY_SYSTEM_BOOKMARKS, line, FS_INSERT_SORTED);
}
}
-#else
- /* 10.5 provides ability to retrieve Finder favorite places */
- UInt32 seed;
- OSErr err = noErr;
- CFArrayRef pathesArray;
- LSSharedFileListRef list;
- LSSharedFileListItemRef itemRef;
- CFIndex i, pathesCount;
- CFURLRef cfURL = NULL;
- CFStringRef pathString = NULL;
+#else /* OSX 10.6+ */
+ /* Get mounted volumes better method OSX 10.6 and higher, see: */
+ /*https://developer.apple.com/library/mac/#documentation/CoreFOundation/Reference/CFURLRef/Reference/reference.html*/
+ /* we get all volumes sorted including network and do not relay on user-defined finder visibility, less confusing */
- /* First get local mounted volumes */
- list = LSSharedFileListCreate(NULL, kLSSharedFileListFavoriteVolumes, NULL);
- pathesArray = LSSharedFileListCopySnapshot(list, &seed);
- pathesCount = CFArrayGetCount(pathesArray);
+ CFURLRef cfURL = NULL;
+ CFURLEnumeratorResult result = kCFURLEnumeratorSuccess;
+ CFURLEnumeratorRef volEnum = CFURLEnumeratorCreateForMountedVolumes(NULL, kCFURLEnumeratorSkipInvisibles, NULL);
- for (i = 0; i < pathesCount; i++) {
- itemRef = (LSSharedFileListItemRef)CFArrayGetValueAtIndex(pathesArray, i);
-
- err = LSSharedFileListItemResolve(itemRef,
- kLSSharedFileListNoUserInteraction |
- kLSSharedFileListDoNotMountVolumes,
- &cfURL, NULL);
- if (err != noErr)
- continue;
-
- pathString = CFURLCopyFileSystemPath(cfURL, kCFURLPOSIXPathStyle);
-
- if (!CFStringGetCString(pathString, line, sizeof(line), kCFStringEncodingASCII))
+ while (result != kCFURLEnumeratorEnd) {
+ unsigned char defPath[FILE_MAX];
+
+ result = CFURLEnumeratorGetNextURL(volEnum, &cfURL, NULL);
+ if (result != kCFURLEnumeratorSuccess)
continue;
- fsmenu_insert_entry(fsmenu, FS_CATEGORY_SYSTEM, line, FS_INSERT_SORTED);
- CFRelease(pathString);
- CFRelease(cfURL);
+ CFURLGetFileSystemRepresentation(cfURL, false, (UInt8 *)defPath, FILE_MAX);
+ fsmenu_insert_entry(fsmenu, FS_CATEGORY_SYSTEM, (char *)defPath, FS_INSERT_SORTED);
}
- CFRelease(pathesArray);
- CFRelease(list);
-
- /* Then get network volumes */
- err = noErr;
- for (i = 1; err != nsvErr; i++) {
- FSRef dir;
- FSVolumeRefNum volRefNum;
- struct GetVolParmsInfoBuffer volParmsBuffer;
- unsigned char path[FILE_MAX];
-
- err = FSGetVolumeInfo(kFSInvalidVolumeRefNum, i, &volRefNum, kFSVolInfoNone, NULL, NULL, &dir);
- if (err != noErr)
- continue;
-
- err = FSGetVolumeParms(volRefNum, &volParmsBuffer, sizeof(volParmsBuffer));
- if ((err != noErr) || (volParmsBuffer.vMServerAdr == 0)) /* Exclude local devices */
- continue;
-
-
- FSRefMakePath(&dir, path, FILE_MAX);
- if (strcmp((char *)path, "/home") && strcmp((char *)path, "/net")) {
- /* /net and /home are meaningless on OSX, home folders are stored in /Users */
- fsmenu_insert_entry(fsmenu, FS_CATEGORY_SYSTEM, (char *)path, FS_INSERT_SORTED);
- }
- }
+ CFRelease(volEnum);
/* Finally get user favorite places */
if (read_bookmarks) {
+ UInt32 seed;
+ OSErr err = noErr;
+ CFArrayRef pathesArray;
+ LSSharedFileListRef list;
+ LSSharedFileListItemRef itemRef;
+ CFIndex i, pathesCount;
+ CFURLRef cfURL = NULL;
+ CFStringRef pathString = NULL;
list = LSSharedFileListCreate(NULL, kLSSharedFileListFavoriteItems, NULL);
pathesArray = LSSharedFileListCopySnapshot(list, &seed);
pathesCount = CFArrayGetCount(pathesArray);
@@ -491,7 +458,7 @@ void fsmenu_read_system(struct FSMenu *fsmenu, int read_bookmarks)
CFRelease(pathesArray);
CFRelease(list);
}
-#endif /* OSX 10.5+ */
+#endif /* OSX 10.6+ */
}
#else
/* unix */
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index 6f3d0367574..1a8565a58b1 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -148,7 +148,6 @@ static void file_free(SpaceLink *sl)
static void file_init(wmWindowManager *UNUSED(wm), ScrArea *sa)
{
SpaceFile *sfile = (SpaceFile *)sa->spacedata.first;
- //printf("file_init\n");
/* refresh system directory list */
fsmenu_refresh_system_category(fsmenu_get());
@@ -313,7 +312,6 @@ static void file_main_area_draw(const bContext *C, ARegion *ar)
/* draw entirely, view changes should be handled here */
SpaceFile *sfile = CTX_wm_space_file(C);
FileSelectParams *params = ED_fileselect_get_params(sfile);
- FileLayout *layout = NULL;
View2D *v2d = &ar->v2d;
View2DScrollers *scrollers;
@@ -323,15 +321,14 @@ static void file_main_area_draw(const bContext *C, ARegion *ar)
if (!sfile->files || filelist_empty(sfile->files))
file_refresh(C, NULL);
- layout = ED_fileselect_get_layout(sfile, ar);
-
/* clear and setup matrix */
UI_GetThemeColor3fv(TH_BACK, col);
glClearColor(col[0], col[1], col[2], 0.0);
glClear(GL_COLOR_BUFFER_BIT);
/* Allow dynamically sliders to be set, saves notifiers etc. */
- if (layout && (layout->flag == FILE_LAYOUT_VER)) {
+
+ if (params->display == FILE_IMGDISPLAY) {
v2d->scroll = V2D_SCROLL_RIGHT;
v2d->keepofs &= ~V2D_LOCKOFS_Y;
v2d->keepofs |= V2D_LOCKOFS_X;
@@ -390,7 +387,7 @@ static void file_operatortypes(void)
WM_operatortype_append(FILE_OT_refresh);
WM_operatortype_append(FILE_OT_bookmark_toggle);
WM_operatortype_append(FILE_OT_bookmark_add);
- WM_operatortype_append(FILE_OT_delete_bookmark);
+ WM_operatortype_append(FILE_OT_bookmark_delete);
WM_operatortype_append(FILE_OT_reset_recent);
WM_operatortype_append(FILE_OT_hidedot);
WM_operatortype_append(FILE_OT_filenum);
diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c
index 7610f7a9192..23c39a5e99a 100644
--- a/source/blender/editors/space_graph/graph_draw.c
+++ b/source/blender/editors/space_graph/graph_draw.c
@@ -951,7 +951,7 @@ void graph_draw_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGrid
/* 1) draw curve line */
{
/* set color/drawing style for curve itself */
- if (((fcu->grp) && (fcu->grp->flag & AGRP_PROTECTED)) || (fcu->flag & FCURVE_PROTECTED)) {
+ if (BKE_fcurve_is_protected(fcu)) {
/* protected curves (non editable) are drawn with dotted lines */
setlinestyle(2);
}
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index 9d22d6fcc95..274c06bf871 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -214,7 +214,8 @@ void GRAPH_OT_previewrange_set(wmOperatorType *ot)
/* ****************** View-All Operator ****************** */
-static int graphkeys_viewall(bContext *C, const short do_sel_only, const short include_handles)
+static int graphkeys_viewall(bContext *C, const short do_sel_only, const short include_handles,
+ const int smooth_viewtx)
{
bAnimContext ac;
rctf cur_new;
@@ -231,7 +232,7 @@ static int graphkeys_viewall(bContext *C, const short do_sel_only, const short i
BLI_rctf_scale(&cur_new, 1.1f);
- UI_view2d_smooth_view(C, ac.ar, &cur_new);
+ UI_view2d_smooth_view(C, ac.ar, &cur_new, smooth_viewtx);
return OPERATOR_FINISHED;
}
@@ -240,18 +241,20 @@ static int graphkeys_viewall(bContext *C, const short do_sel_only, const short i
static int graphkeys_viewall_exec(bContext *C, wmOperator *op)
{
- short include_handles = RNA_boolean_get(op->ptr, "include_handles");
+ const short include_handles = RNA_boolean_get(op->ptr, "include_handles");
+ const int smooth_viewtx = WM_operator_smooth_viewtx_get(op);
/* whole range */
- return graphkeys_viewall(C, FALSE, include_handles);
+ return graphkeys_viewall(C, false, include_handles, smooth_viewtx);
}
static int graphkeys_view_selected_exec(bContext *C, wmOperator *op)
{
- short include_handles = RNA_boolean_get(op->ptr, "include_handles");
+ const short include_handles = RNA_boolean_get(op->ptr, "include_handles");
+ const int smooth_viewtx = WM_operator_smooth_viewtx_get(op);
/* only selected */
- return graphkeys_viewall(C, TRUE, include_handles);
+ return graphkeys_viewall(C, true, include_handles, smooth_viewtx);
}
void GRAPH_OT_view_all(wmOperatorType *ot)
@@ -882,8 +885,12 @@ static void delete_graph_keys(bAnimContext *ac)
delete_fcurve_keys(fcu);
/* Only delete curve too if it won't be doing anything anymore */
- if ((fcu->totvert == 0) && (list_has_suitable_fmodifier(&fcu->modifiers, 0, FMI_TYPE_GENERATE_CURVE) == 0))
+ if ((fcu->totvert == 0) &&
+ (list_has_suitable_fmodifier(&fcu->modifiers, 0, FMI_TYPE_GENERATE_CURVE) == 0) &&
+ (fcu->driver == NULL))
+ {
ANIM_fcurve_delete_from_animdata(ac, adt, fcu);
+ }
}
/* free filtered list */
@@ -1676,7 +1683,7 @@ static int graphkeys_euler_filter_exec(bContext *C, wmOperator *op)
/* FIXME: there are more complicated methods that will be needed to fix more cases than just some */
for (f = 0; f < 3; f++) {
FCurve *fcu = euf->fcurves[f];
- BezTriple *bezt, *prev = NULL;
+ BezTriple *bezt, *prev;
unsigned int i;
/* skip if not enough vets to do a decent analysis of... */
@@ -1684,29 +1691,19 @@ static int graphkeys_euler_filter_exec(bContext *C, wmOperator *op)
continue;
/* prev follows bezt, bezt = "current" point to be fixed */
- for (i = 0, bezt = fcu->bezt; i < fcu->totvert; i++, prev = bezt, bezt++) {
- /* our method depends on determining a "difference" from the previous vert */
- if (prev == NULL)
- continue;
+ /* our method depends on determining a "difference" from the previous vert */
+ for (i = 1, prev = fcu->bezt, bezt = fcu->bezt + 1; i < fcu->totvert; i++, prev = bezt++) {
+ const float sign = (prev->vec[1][1] > bezt->vec[1][1]) ? 1.0f : -1.0f;
/* > 180 degree flip? */
- if (fabs(prev->vec[1][1] - bezt->vec[1][1]) >= M_PI) {
+ if ((sign * (prev->vec[1][1] - bezt->vec[1][1])) >= (float)M_PI) {
/* 360 degrees to add/subtract frame value until difference is acceptably small that there's no more flip */
- const float fac = 2.0f * (float)M_PI;
+ const float fac = sign * 2.0f * (float)M_PI;
- if (prev->vec[1][1] > bezt->vec[1][1]) {
- while (fabsf(bezt->vec[1][1] - prev->vec[1][1]) >= (float)M_PI) {
- bezt->vec[0][1] += fac;
- bezt->vec[1][1] += fac;
- bezt->vec[2][1] += fac;
- }
- }
- else { /* if (prev->vec[1][1] < bezt->vec[1][1]) */
- while (fabsf(bezt->vec[1][1] - prev->vec[1][1]) >= (float)M_PI) {
- bezt->vec[0][1] -= fac;
- bezt->vec[1][1] -= fac;
- bezt->vec[2][1] -= fac;
- }
+ while ((sign * (prev->vec[1][1] - bezt->vec[1][1])) >= (float)M_PI) {
+ bezt->vec[0][1] += fac;
+ bezt->vec[1][1] += fac;
+ bezt->vec[2][1] += fac;
}
}
}
diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c
index e2bc88cf0eb..74114f8ca9d 100644
--- a/source/blender/editors/space_graph/graph_ops.c
+++ b/source/blender/editors/space_graph/graph_ops.c
@@ -254,11 +254,9 @@ void ED_operatormacros_graph(void)
ot = WM_operatortype_append_macro("GRAPH_OT_duplicate_move", "Duplicate",
"Make a copy of all selected keyframes and move them",
OPTYPE_UNDO | OPTYPE_REGISTER);
- if (ot) {
- WM_operatortype_macro_define(ot, "GRAPH_OT_duplicate");
- otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_transform");
- RNA_enum_set(otmacro->ptr, "mode", TFM_TIME_DUPLICATE);
- }
+ WM_operatortype_macro_define(ot, "GRAPH_OT_duplicate");
+ otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_transform");
+ RNA_enum_set(otmacro->ptr, "mode", TFM_TIME_DUPLICATE);
}
@@ -279,33 +277,38 @@ static void graphedit_keymap_keyframes(wmKeyConfig *keyconf, wmKeyMap *keymap)
/* graph_select.c - selection tools */
- /* click-select */
+ /* click-select: keyframe (replace) */
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, 0, 0);
RNA_boolean_set(kmi->ptr, "extend", FALSE);
RNA_boolean_set(kmi->ptr, "curves", FALSE);
RNA_boolean_set(kmi->ptr, "column", FALSE);
+ /* click-select: all keyframes on same frame (replace) */
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT, 0);
RNA_boolean_set(kmi->ptr, "extend", FALSE);
RNA_boolean_set(kmi->ptr, "curves", FALSE);
RNA_boolean_set(kmi->ptr, "column", TRUE);
+ /* click-select: keyframe (add) */
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
RNA_boolean_set(kmi->ptr, "extend", TRUE);
RNA_boolean_set(kmi->ptr, "curves", FALSE);
RNA_boolean_set(kmi->ptr, "column", FALSE);
+ /* click-select: all keyframes on same frame (add) */
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT | KM_SHIFT, 0);
RNA_boolean_set(kmi->ptr, "extend", TRUE);
RNA_boolean_set(kmi->ptr, "curves", FALSE);
RNA_boolean_set(kmi->ptr, "column", TRUE);
+ /* click-select: all keyframes in same curve (replace) */
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_ALT, 0);
RNA_boolean_set(kmi->ptr, "extend", FALSE);
RNA_boolean_set(kmi->ptr, "curves", TRUE);
RNA_boolean_set(kmi->ptr, "column", FALSE);
+ /* click-select: all keyframes in same curve (add) */
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_ALT | KM_SHIFT, 0);
RNA_boolean_set(kmi->ptr, "extend", TRUE);
RNA_boolean_set(kmi->ptr, "curves", TRUE);
RNA_boolean_set(kmi->ptr, "column", FALSE);
- /* select left/right */
+ /* click-select left/right */
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
RNA_boolean_set(kmi->ptr, "extend", FALSE);
RNA_enum_set(kmi->ptr, "mode", GRAPHKEYS_LRSEL_TEST);
diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c
index cbec3072c44..4bb5e1b11d4 100644
--- a/source/blender/editors/space_graph/graph_select.c
+++ b/source/blender/editors/space_graph/graph_select.c
@@ -149,17 +149,37 @@ static void deselect_graph_keys(bAnimContext *ac, short test, short sel, short d
static int graphkeys_deselectall_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;
+ bAnimListElem *ale_active = NULL;
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
return OPERATOR_CANCELLED;
-
+
+ /* find active F-Curve, and preserve this for later
+ * or else it becomes annoying with the current active
+ * curve keeps fading out even while you're editing it
+ */
+ ale_active = get_active_fcurve_channel(&ac);
+
/* 'standard' behavior - check if selected, then apply relevant selection */
if (RNA_boolean_get(op->ptr, "invert"))
deselect_graph_keys(&ac, 0, SELECT_INVERT, TRUE);
else
deselect_graph_keys(&ac, 1, SELECT_ADD, TRUE);
+ /* restore active F-Curve... */
+ if (ale_active) {
+ FCurve *fcu = (FCurve *)ale_active->data;
+
+ /* all others should not be disabled, so we should be able to just set this directly...
+ * - selection needs to be set too, or else this won't work...
+ */
+ fcu->flag |= (FCURVE_SELECTED | FCURVE_ACTIVE);
+
+ MEM_freeN(ale_active);
+ ale_active = NULL;
+ }
+
/* set notifier that things have changed */
WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_SELECTED, NULL);
@@ -1049,10 +1069,7 @@ static tNearestVertInfo *get_best_nearest_fcurve_vert(ListBase *matches)
/* if list only has 1 item, remove it from the list and return */
if (matches->first == matches->last) {
/* need to remove from the list, otherwise it gets freed and then we can't return it */
- nvi = matches->first;
- BLI_remlink(matches, nvi);
-
- return nvi;
+ return BLI_pophead(matches);
}
/* try to find the first selected F-Curve vert, then take the one after it */
@@ -1075,9 +1092,7 @@ static tNearestVertInfo *get_best_nearest_fcurve_vert(ListBase *matches)
/* if we're still here, this means that we failed to find anything appropriate in the first pass,
* so just take the first item now...
*/
- nvi = matches->first;
- BLI_remlink(matches, nvi);
- return nvi;
+ return BLI_pophead(matches);
}
/* Find the nearest vertices (either a handle or the keyframe) that are nearest to the mouse cursor (in area coordinates)
@@ -1350,7 +1365,8 @@ void GRAPH_OT_clickselect(wmOperatorType *ot)
ot->flag = OPTYPE_UNDO;
/* properties */
- prop = RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY
+ prop = RNA_def_boolean(ot->srna, "extend", 0, "Extend Select",
+ "Toggle keyframe selection instead of leaving newly selected keyframes only"); // SHIFTKEY
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
prop = RNA_def_boolean(ot->srna, "column", 0, "Column Select",
diff --git a/source/blender/editors/space_image/CMakeLists.txt b/source/blender/editors/space_image/CMakeLists.txt
index 6509af179e7..50d8051a73e 100644
--- a/source/blender/editors/space_image/CMakeLists.txt
+++ b/source/blender/editors/space_image/CMakeLists.txt
@@ -50,6 +50,10 @@ if(WITH_INTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()
+if(WITH_OPENIMAGEIO)
+ add_definitions(-DWITH_OPENIMAGEIO)
+endif()
+
if(WITH_IMAGE_OPENJPEG)
add_definitions(-DWITH_OPENJPEG)
endif()
diff --git a/source/blender/editors/space_image/SConscript b/source/blender/editors/space_image/SConscript
index 268172b300d..89def32e70f 100644
--- a/source/blender/editors/space_image/SConscript
+++ b/source/blender/editors/space_image/SConscript
@@ -57,6 +57,8 @@ if env['WITH_BF_TIFF']:
defs.append('WITH_TIFF')
if env['WITH_BF_CINEON']:
defs.append('WITH_CINEON')
+if env['WITH_BF_OIIO']:
+ defs.append('WITH_OPENIMAGEIO')
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
incs += ' ' + env['BF_PTHREADS_INC']
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index 144d2c14e9f..3ff404d38a9 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -640,7 +640,7 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char
else
uiItemO(row, "", ICON_UGLYPACKAGE, "image.pack");
- row = uiLayoutRow(row, FALSE);
+ row = uiLayoutRow(row, TRUE);
uiLayoutSetEnabled(row, ima->packedfile == NULL);
uiItemR(row, &imaptr, "filepath", 0, "", ICON_NONE);
uiItemO(row, "", ICON_FILE_REFRESH, "image.reload");
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c
index 23c85699b00..89e57955339 100644
--- a/source/blender/editors/space_image/image_draw.c
+++ b/source/blender/editors/space_image/image_draw.c
@@ -268,8 +268,6 @@ void ED_image_draw_info(Scene *scene, ARegion *ar, int color_manage, int use_def
else
rgba[3] = linearcol[3];
- (void)color_manage;
-
if (use_default_view)
IMB_colormanagement_pixel_to_display_space_v4(rgba, rgba, NULL, &scene->display_settings);
else
@@ -360,14 +358,8 @@ void ED_image_draw_info(Scene *scene, ARegion *ar, int color_manage, int use_def
dx += BLF_width(blf_mono_font, str);
}
else if (channels >= 3) {
- if (fp) {
- rgb_to_hsv(fp[0], fp[1], fp[2], &hue, &sat, &val);
- rgb_to_yuv(fp[0], fp[1], fp[2], &lum, &u, &v);
- }
- else if (cp) {
- rgb_to_hsv((float)cp[0] / 255.0f, (float)cp[1] / 255.0f, (float)cp[2] / 255.0f, &hue, &sat, &val);
- rgb_to_yuv((float)cp[0] / 255.0f, (float)cp[1] / 255.0f, (float)cp[2] / 255.0f, &lum, &u, &v);
- }
+ rgb_to_hsv(finalcol[0], finalcol[1], finalcol[2], &hue, &sat, &val);
+ rgb_to_yuv(finalcol[0], finalcol[1], finalcol[2], &lum, &u, &v);
BLI_snprintf(str, sizeof(str), "H:%-.4f", hue);
BLF_position(blf_mono_font, dx, 0.3f * UI_UNIT_X, 0);
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 2da3f3adb67..710d5c8cd81 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -245,7 +245,7 @@ static void image_view_pan_init(bContext *C, wmOperator *op, const wmEvent *even
ViewPanData *vpd;
op->customdata = vpd = MEM_callocN(sizeof(ViewPanData), "ImageViewPanData");
- WM_cursor_modal(CTX_wm_window(C), BC_NSEW_SCROLLCURSOR);
+ WM_cursor_modal_set(CTX_wm_window(C), BC_NSEW_SCROLLCURSOR);
vpd->x = event->x;
vpd->y = event->y;
@@ -267,7 +267,7 @@ static void image_view_pan_exit(bContext *C, wmOperator *op, int cancel)
ED_region_tag_redraw(CTX_wm_region(C));
}
- WM_cursor_restore(CTX_wm_window(C));
+ WM_cursor_modal_restore(CTX_wm_window(C));
MEM_freeN(op->customdata);
}
@@ -391,7 +391,7 @@ static void image_view_zoom_init(bContext *C, wmOperator *op, const wmEvent *eve
ViewZoomData *vpd;
op->customdata = vpd = MEM_callocN(sizeof(ViewZoomData), "ImageViewZoomData");
- WM_cursor_modal(CTX_wm_window(C), BC_NSEW_SCROLLCURSOR);
+ WM_cursor_modal_set(CTX_wm_window(C), BC_NSEW_SCROLLCURSOR);
vpd->origx = event->x;
vpd->origy = event->y;
@@ -425,7 +425,7 @@ static void image_view_zoom_exit(bContext *C, wmOperator *op, int cancel)
if (vpd->timer)
WM_event_remove_timer(CTX_wm_manager(C), vpd->timer->win, vpd->timer);
- WM_cursor_restore(CTX_wm_window(C));
+ WM_cursor_modal_restore(CTX_wm_window(C));
MEM_freeN(op->customdata);
}
@@ -646,12 +646,13 @@ void IMAGE_OT_view_ndof(wmOperatorType *ot)
* Default behavior is to reset the position of the image and set the zoom to 1
* If the image will not fit within the window rectangle, the zoom is adjusted */
-static int image_view_all_exec(bContext *C, wmOperator *UNUSED(op))
+static int image_view_all_exec(bContext *C, wmOperator *op)
{
SpaceImage *sima;
ARegion *ar;
float aspx, aspy, zoomx, zoomy, w, h;
int width, height;
+ int fit_view = RNA_boolean_get(op->ptr, "fit_view");
/* retrieve state */
sima = CTX_wm_space_image(C);
@@ -667,14 +668,25 @@ static int image_view_all_exec(bContext *C, wmOperator *UNUSED(op))
width = BLI_rcti_size_x(&ar->winrct) + 1;
height = BLI_rcti_size_y(&ar->winrct) + 1;
- if ((w >= width || h >= height) && (width > 0 && height > 0)) {
- /* find the zoom value that will fit the image in the image space */
- zoomx = width / w;
- zoomy = height / h;
- sima_zoom_set(sima, ar, 1.0f / power_of_2(1.0f / min_ff(zoomx, zoomy)), NULL);
+ if (fit_view) {
+ const int margin = 5; /* margin from border */
+
+ zoomx = (float) width / (w + 2 * margin);
+ zoomy = (float) height / (h + 2 * margin);
+
+ sima_zoom_set(sima, ar, min_ff(zoomx, zoomy), NULL);
+ }
+ else {
+ if ((w >= width || h >= height) && (width > 0 && height > 0)) {
+ zoomx = (float) width / w;
+ zoomy = (float) height / h;
+
+ /* find the zoom value that will fit the image in the image space */
+ sima_zoom_set(sima, ar, 1.0f / power_of_2(1.0f / min_ff(zoomx, zoomy)), NULL);
+ }
+ else
+ sima_zoom_set(sima, ar, 1.0f, NULL);
}
- else
- sima_zoom_set(sima, ar, 1.0f, NULL);
sima->xof = sima->yof = 0.0f;
@@ -685,6 +697,8 @@ static int image_view_all_exec(bContext *C, wmOperator *UNUSED(op))
void IMAGE_OT_view_all(wmOperatorType *ot)
{
+ PropertyRNA *prop;
+
/* identifiers */
ot->name = "View All";
ot->idname = "IMAGE_OT_view_all";
@@ -693,6 +707,10 @@ void IMAGE_OT_view_all(wmOperatorType *ot)
/* api callbacks */
ot->exec = image_view_all_exec;
ot->poll = space_image_main_area_poll;
+
+ /* properties */
+ prop = RNA_def_boolean(ot->srna, "fit_view", 0, "Fit View", "Fit frame to the viewport");
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
/********************** view selected operator *********************/
@@ -1318,7 +1336,7 @@ static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI
const char *relbase = ID_BLEND_PATH(CTX_data_main(C), &ima->id);
const short relative = (RNA_struct_find_property(op->ptr, "relative_path") && RNA_boolean_get(op->ptr, "relative_path"));
const short save_copy = (RNA_struct_find_property(op->ptr, "copy") && RNA_boolean_get(op->ptr, "copy"));
- const short save_as_render = (RNA_struct_find_property(op->ptr, "save_as_render") && RNA_boolean_get(op->ptr, "save_as_render"));
+ const bool save_as_render = (RNA_struct_find_property(op->ptr, "save_as_render") && RNA_boolean_get(op->ptr, "save_as_render"));
ImageFormatData *imf = &simopts->im_format;
short ok = FALSE;
@@ -1344,7 +1362,7 @@ static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI
}
}
- colormanaged_ibuf = IMB_colormanagement_imbuf_for_write(ibuf, save_as_render, TRUE, &imf->view_settings, &imf->display_settings, imf);
+ colormanaged_ibuf = IMB_colormanagement_imbuf_for_write(ibuf, save_as_render, true, &imf->view_settings, &imf->display_settings, imf);
if (simopts->im_format.imtype == R_IMF_IMTYPE_MULTILAYER) {
Scene *scene = CTX_data_scene(C);
@@ -1786,6 +1804,8 @@ static int image_new_exec(bContext *C, wmOperator *op)
BKE_image_signal(ima, (sima) ? &sima->iuser : NULL, IMA_SIGNAL_USER_NEW_IMAGE);
+ WM_event_add_notifier(C, NC_IMAGE | NA_ADDED, ima);
+
return OPERATOR_FINISHED;
}
@@ -2397,6 +2417,9 @@ static int image_sample_line_exec(bContext *C, wmOperator *op)
hist->co[1][0] = x2f;
hist->co[1][1] = y2f;
+ /* enable line drawing */
+ hist->flag |= HISTO_FLAG_SAMPLELINE;
+
BKE_histogram_update_sample_line(hist, ibuf, &scene->view_settings, &scene->display_settings);
/* reset y zoom */
@@ -2539,7 +2562,7 @@ static void image_record_composite_exit(bContext *C, wmOperator *op)
scene->r.cfra = rcd->old_cfra;
- WM_cursor_restore(CTX_wm_window(C));
+ WM_cursor_modal_restore(CTX_wm_window(C));
if (rcd->timer)
WM_event_remove_timer(CTX_wm_manager(C), CTX_wm_window(C), rcd->timer);
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index c0ef59e9e25..7b20af340ae 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -277,6 +277,10 @@ static void image_keymap(struct wmKeyConfig *keyconf)
keymap = WM_keymap_find(keyconf, "Image", SPACE_IMAGE, 0);
WM_keymap_add_item(keymap, "IMAGE_OT_view_all", HOMEKEY, KM_PRESS, 0, 0);
+
+ kmi = WM_keymap_add_item(keymap, "IMAGE_OT_view_all", FKEY, KM_PRESS, 0, 0);
+ RNA_boolean_set(kmi->ptr, "fit_view", TRUE);
+
WM_keymap_add_item(keymap, "IMAGE_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "IMAGE_OT_view_pan", MIDDLEMOUSE, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "IMAGE_OT_view_pan", MIDDLEMOUSE, KM_PRESS, KM_SHIFT, 0);
@@ -670,7 +674,6 @@ static void image_main_area_draw(const bContext *C, ARegion *ar)
}
else if (sima->mode == SI_MODE_MASK) {
mask = ED_space_image_get_mask(sima);
- draw_image_cursor(sima, ar);
}
ED_region_draw_cb_draw(C, ar, REGION_DRAW_POST_VIEW);
@@ -711,7 +714,9 @@ static void image_main_area_draw(const bContext *C, ARegion *ar)
BLI_unlock_thread(LOCK_DRAW_IMAGE);
ED_mask_draw_region(mask, ar,
- sima->mask_info.draw_flag, sima->mask_info.draw_type,
+ sima->mask_info.draw_flag,
+ sima->mask_info.draw_type,
+ sima->mask_info.overlay_mode,
width, height,
aspx, aspy,
TRUE, FALSE,
@@ -719,7 +724,9 @@ static void image_main_area_draw(const bContext *C, ARegion *ar)
ED_mask_draw_frames(mask, ar, CFRA, mask->sfra, mask->efra);
- draw_image_cursor(sima, ar);
+ UI_view2d_view_ortho(v2d);
+ draw_image_cursor(ar, sima->cursor);
+ UI_view2d_view_restore(C);
}
/* scrollers? */
diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c
index 98c9c8d15fe..9686c6dfc29 100644
--- a/source/blender/editors/space_info/info_stats.c
+++ b/source/blender/editors/space_info/info_stats.c
@@ -115,8 +115,8 @@ static void stats_object(Object *ob, int sel, int totob, SceneStats *stats)
{
int totv = 0, totf = 0, tottri = 0;
- if (ob->disp.first)
- BKE_displist_count(&ob->disp, &totv, &totf, &tottri);
+ if (ob->curve_cache && ob->curve_cache->disp.first)
+ BKE_displist_count(&ob->curve_cache->disp, &totv, &totf, &tottri);
totv *= totob;
totf *= totob;
@@ -194,9 +194,9 @@ static void stats_object_edit(Object *obedit, SceneStats *stats)
a = nu->pntsu;
while (a--) {
stats->totvert += 3;
- if (bezt->f1) stats->totvertsel++;
- if (bezt->f2) stats->totvertsel++;
- if (bezt->f3) stats->totvertsel++;
+ if (bezt->f1 & SELECT) stats->totvertsel++;
+ if (bezt->f2 & SELECT) stats->totvertsel++;
+ if (bezt->f3 & SELECT) stats->totvertsel++;
bezt++;
}
}
diff --git a/source/blender/editors/space_info/textview.c b/source/blender/editors/space_info/textview.c
index e53cbdd04af..d4d45af6431 100644
--- a/source/blender/editors/space_info/textview.c
+++ b/source/blender/editors/space_info/textview.c
@@ -57,6 +57,7 @@ static void console_font_begin(TextViewContext *sc)
typedef struct ConsoleDrawContext {
int cwidth;
int lheight;
+ int lofs; /* text vertical offset */
int console_width; /* number of characters that fit into the width of the console (fixed width) */
int winx;
int ymin, ymax;
@@ -122,7 +123,6 @@ static int console_wrap_offsets(const char *str, int len, int width, int *lines,
static int console_draw_string(ConsoleDrawContext *cdc, const char *str, int str_len,
const unsigned char fg[3], const unsigned char bg[3], const unsigned char bg_sel[4])
{
- int rct_ofs = cdc->lheight / 4;
int tot_lines; /* total number of lines for wrapping */
int *offsets; /* offsets of line beginnings for wrapping */
int y_next;
@@ -186,13 +186,13 @@ static int console_draw_string(ConsoleDrawContext *cdc, const char *str, int str
if (bg) {
glColor3ubv(bg);
- glRecti(0, cdc->xy[1] - rct_ofs, cdc->winx, (cdc->xy[1] + (cdc->lheight * tot_lines)) + rct_ofs);
+ glRecti(0, cdc->xy[1], cdc->winx, (cdc->xy[1] + (cdc->lheight * tot_lines)));
}
glColor3ubv(fg);
/* last part needs no clipping */
- BLF_position(mono, cdc->xy[0], cdc->xy[1], 0);
+ BLF_position(mono, cdc->xy[0], cdc->lofs + cdc->xy[1], 0);
BLF_draw_mono(mono, s, len, cdc->cwidth);
if (cdc->sel[0] != cdc->sel[1]) {
@@ -208,7 +208,7 @@ static int console_draw_string(ConsoleDrawContext *cdc, const char *str, int str
len = offsets[i] - offsets[i - 1];
s = str + offsets[i - 1];
- BLF_position(mono, cdc->xy[0], cdc->xy[1], 0);
+ BLF_position(mono, cdc->xy[0], cdc->lofs + cdc->xy[1], 0);
BLF_draw_mono(mono, s, len, cdc->cwidth);
if (cdc->sel[0] != cdc->sel[1]) {
@@ -234,12 +234,12 @@ static int console_draw_string(ConsoleDrawContext *cdc, const char *str, int str
if (bg) {
glColor3ubv(bg);
- glRecti(0, cdc->xy[1] - rct_ofs, cdc->winx, cdc->xy[1] + cdc->lheight - rct_ofs);
+ glRecti(0, cdc->xy[1], cdc->winx, cdc->xy[1] + cdc->lheight);
}
glColor3ubv(fg);
- BLF_position(mono, cdc->xy[0], cdc->xy[1], 0);
+ BLF_position(mono, cdc->xy[0], cdc->lofs + cdc->xy[1], 0);
BLF_draw_mono(mono, str, str_len, cdc->cwidth);
if (cdc->sel[0] != cdc->sel[1]) {
@@ -291,6 +291,7 @@ int textview_draw(TextViewContext *tvc, const int draw, int mval[2], void **mous
cdc.cwidth = (int)BLF_fixed_width(mono);
assert(cdc.cwidth > 0);
cdc.lheight = tvc->lheight;
+ cdc.lofs = -BLF_descender(mono);
/* note, scroll bar must be already subtracted () */
cdc.console_width = (tvc->winx - (CONSOLE_DRAW_MARGIN * 2) ) / cdc.cwidth;
CLAMP(cdc.console_width, 1, INT_MAX); /* avoid divide by zero on small windows */
diff --git a/source/blender/editors/space_info/textview.h b/source/blender/editors/space_info/textview.h
index 653c9b83a50..2f9e518ed47 100644
--- a/source/blender/editors/space_info/textview.h
+++ b/source/blender/editors/space_info/textview.h
@@ -24,6 +24,8 @@
* \ingroup spinfo
*/
+#ifndef __TEXTVIEW_H__
+#define __TEXTVIEW_H__
typedef struct TextViewContext {
int lheight;
@@ -59,3 +61,5 @@ int textview_draw(struct TextViewContext *tvc, const int draw, int mval[2], void
#define TVC_LINE_FG (1<<0)
#define TVC_LINE_BG (1<<1)
+
+#endif /* __TEXTVIEW_H__ */
diff --git a/source/blender/editors/space_logic/logic_ops.c b/source/blender/editors/space_logic/logic_ops.c
index fadf4c0b113..fac564f33fb 100644
--- a/source/blender/editors/space_logic/logic_ops.c
+++ b/source/blender/editors/space_logic/logic_ops.c
@@ -739,16 +739,17 @@ static void LOGIC_OT_texface_convert(wmOperatorType *ot)
/* ************************ view ********************* */
-static int logic_view_all_exec(bContext *C, wmOperator *UNUSED(op))
+static int logic_view_all_exec(bContext *C, wmOperator *op)
{
ARegion *ar = CTX_wm_region(C);
rctf cur_new = ar->v2d.tot;
float aspect = BLI_rctf_size_y(&ar->v2d.cur) / BLI_rctf_size_x(&ar->v2d.cur);
+ const int smooth_viewtx = WM_operator_smooth_viewtx_get(op);
/* force the view2d code to zoom to width, not height */
cur_new.ymin = cur_new.ymax - BLI_rctf_size_x(&cur_new) * aspect;
- UI_view2d_smooth_view(C, ar, &cur_new);
+ UI_view2d_smooth_view(C, ar, &cur_new, smooth_viewtx);
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c
index aed5699a9d7..2c89d6f6448 100644
--- a/source/blender/editors/space_logic/logic_window.c
+++ b/source/blender/editors/space_logic/logic_window.c
@@ -427,8 +427,6 @@ static const char *sensor_name(int type)
switch (type) {
case SENS_ALWAYS:
return "Always";
- case SENS_TOUCH:
- return "Touch";
case SENS_NEAR:
return "Near";
case SENS_KEYBOARD:
@@ -1233,11 +1231,6 @@ static void draw_sensor_ray(uiLayout *layout, PointerRNA *ptr, bContext *C)
uiItemR(row, ptr, "use_x_ray", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
}
-static void draw_sensor_touch(uiLayout *layout, PointerRNA *ptr)
-{
- uiItemR(layout, ptr, "material", 0, NULL, ICON_NONE);
-}
-
static void draw_brick_sensor(uiLayout *layout, PointerRNA *ptr, bContext *C)
{
uiLayout *box;
@@ -1292,9 +1285,6 @@ static void draw_brick_sensor(uiLayout *layout, PointerRNA *ptr, bContext *C)
case SENS_RAY:
draw_sensor_ray(box, ptr, C);
break;
- case SENS_TOUCH:
- draw_sensor_touch(box, ptr);
- break;
}
}
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 5cc22b25f72..ba28f502349 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -86,18 +86,6 @@ static void node_socket_button_label(bContext *UNUSED(C), uiLayout *layout, Poin
uiItemL(layout, text, 0);
}
-static void node_draw_input_default(bContext *C, uiLayout *layout, PointerRNA *ptr, PointerRNA *node_ptr)
-{
- bNodeSocket *sock = (bNodeSocket *)ptr->data;
- sock->typeinfo->draw(C, layout, ptr, node_ptr, IFACE_(sock->name));
-}
-
-static void node_draw_output_default(bContext *C, uiLayout *layout, PointerRNA *ptr, PointerRNA *node_ptr)
-{
- bNodeSocket *sock = ptr->data;
- node_socket_button_label(C, layout, ptr, node_ptr, IFACE_(sock->name));
-}
-
/* ****************** BASE DRAW FUNCTIONS FOR NEW OPERATOR NODES ***************** */
@@ -339,7 +327,7 @@ static int node_resize_area_default(bNode *node, int x, int y)
/* ****************** BUTTON CALLBACKS FOR COMMON NODES ***************** */
-static void node_uifunc_group(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_draw_buttons_group(uiLayout *layout, bContext *C, PointerRNA *ptr)
{
uiTemplateIDBrowse(layout, C, ptr, "node_tree", NULL, NULL, NULL);
}
@@ -348,7 +336,7 @@ static void node_uifunc_group(uiLayout *layout, bContext *C, PointerRNA *ptr)
* Not ideal to do this in every draw call, but doing as transform callback doesn't work,
* since the child node totr rects are not updated properly at that point.
*/
-static void node_update_frame(const bContext *UNUSED(C), bNodeTree *ntree, bNode *node)
+static void node_draw_frame_prepare(const bContext *UNUSED(C), bNodeTree *ntree, bNode *node)
{
const float margin = 1.5f * U.widget_unit;
NodeFrame *data = (NodeFrame *)node->storage;
@@ -511,7 +499,7 @@ static int node_resize_area_frame(bNode *node, int x, int y)
return dir;
}
-static void node_buts_frame_details(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void node_buts_frame_ex(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "label_size", 0, IFACE_("Label Size"), ICON_NONE);
uiItemR(layout, ptr, "shrink", 0, IFACE_("Shrink"), ICON_NONE);
@@ -520,7 +508,7 @@ static void node_buts_frame_details(uiLayout *layout, bContext *UNUSED(C), Point
#define NODE_REROUTE_SIZE 8.0f
-static void node_update_reroute(const bContext *UNUSED(C), bNodeTree *UNUSED(ntree), bNode *node)
+static void node_draw_reroute_prepare(const bContext *UNUSED(C), bNodeTree *UNUSED(ntree), bNode *node)
{
bNodeSocket *nsock;
float locx, locy;
@@ -571,7 +559,7 @@ static void node_draw_reroute(const bContext *C, ARegion *ar, SpaceNode *UNUSED(
*/
#if 0
/* body */
- uiSetRoundBox(15);
+ uiSetRoundBox(UI_CNR_ALL);
UI_ThemeColor4(TH_NODE);
glEnable(GL_BLEND);
uiRoundBox(rct->xmin, rct->ymin, rct->xmax, rct->ymax, size);
@@ -632,17 +620,17 @@ static void node_common_set_butfunc(bNodeType *ntype)
{
switch (ntype->type) {
case NODE_GROUP:
- ntype->uifunc = node_uifunc_group;
+ ntype->draw_buttons = node_draw_buttons_group;
break;
case NODE_FRAME:
- ntype->drawfunc = node_draw_frame;
- ntype->drawupdatefunc = node_update_frame;
- ntype->uifuncbut = node_buts_frame_details;
+ ntype->draw_nodetype = node_draw_frame;
+ ntype->draw_nodetype_prepare = node_draw_frame_prepare;
+ ntype->draw_buttons_ex = node_buts_frame_ex;
ntype->resize_area_func = node_resize_area_frame;
break;
case NODE_REROUTE:
- ntype->drawfunc = node_draw_reroute;
- ntype->drawupdatefunc = node_update_reroute;
+ ntype->draw_nodetype = node_draw_reroute;
+ ntype->draw_nodetype_prepare = node_draw_reroute_prepare;
ntype->tweak_area_func = node_tweak_area_reroute;
break;
}
@@ -709,6 +697,8 @@ static void node_shader_buts_mapping(uiLayout *layout, bContext *UNUSED(C), Poin
{
uiLayout *row;
+ uiItemR(layout, ptr, "vector_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
+
uiItemL(layout, IFACE_("Location:"), ICON_NONE);
row = uiLayoutRow(layout, TRUE);
uiItemR(row, ptr, "translation", 0, "", ICON_NONE);
@@ -737,7 +727,7 @@ static void node_shader_buts_vect_math(uiLayout *layout, bContext *UNUSED(C), Po
static void node_shader_buts_vect_transform(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
- uiItemR(layout, ptr, "type", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
+ uiItemR(layout, ptr, "vector_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
uiItemR(layout, ptr, "convert_from", 0, "", ICON_NONE);
uiItemR(layout, ptr, "convert_to", 0, "", ICON_NONE);
}
@@ -790,7 +780,7 @@ static void node_shader_buts_tex_image(uiLayout *layout, bContext *C, PointerRNA
node_buts_image_user(layout, C, &iuserptr, &imaptr, &iuserptr);
}
-static void node_shader_buts_tex_image_details(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_shader_buts_tex_image_ex(uiLayout *layout, bContext *C, PointerRNA *ptr)
{
PointerRNA iuserptr = RNA_pointer_get(ptr, "image_user");
uiTemplateImage(layout, C, ptr, "image", &iuserptr, 0);
@@ -809,9 +799,13 @@ static void node_shader_buts_tex_environment(uiLayout *layout, bContext *C, Poin
}
static void node_shader_buts_tex_sky(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
-{
+{
+ uiItemR(layout, ptr, "sky_type", 0, "", ICON_NONE);
uiItemR(layout, ptr, "sun_direction", 0, "", ICON_NONE);
uiItemR(layout, ptr, "turbidity", 0, NULL, ICON_NONE);
+
+ if (RNA_enum_get(ptr, "sky_type") == SHD_SKY_NEW)
+ uiItemR(layout, ptr, "ground_albedo", 0, NULL, ICON_NONE);
}
static void node_shader_buts_tex_gradient(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
@@ -907,11 +901,29 @@ static void node_shader_buts_glossy(uiLayout *layout, bContext *UNUSED(C), Point
uiItemR(layout, ptr, "distribution", 0, "", ICON_NONE);
}
+static void node_shader_buts_subsurface(uiLayout *layout, bContext *C, PointerRNA *ptr)
+{
+ /* SSS does not work on GPU yet */
+ PointerRNA scene = CTX_data_pointer_get(C, "scene");
+ if (scene.data) {
+ PointerRNA cscene = RNA_pointer_get(&scene, "cycles");
+ if (cscene.data && RNA_enum_get(&cscene, "device") == 1)
+ uiItemL(layout, IFACE_("SSS not supported on GPU"), ICON_ERROR);
+ }
+
+ uiItemR(layout, ptr, "falloff", 0, "", ICON_NONE);
+}
+
static void node_shader_buts_toon(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "component", 0, "", ICON_NONE);
}
+static void node_shader_buts_hair(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+{
+ uiItemR(layout, ptr, "component", 0, "", ICON_NONE);
+}
+
static void node_shader_buts_script(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *row;
@@ -929,7 +941,7 @@ static void node_shader_buts_script(uiLayout *layout, bContext *UNUSED(C), Point
uiItemO(row, "", ICON_FILE_REFRESH, "node.shader_script_update");
}
-static void node_shader_buts_script_details(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_shader_buts_script_ex(uiLayout *layout, bContext *C, PointerRNA *ptr)
{
uiItemS(layout);
@@ -947,104 +959,110 @@ static void node_shader_set_butfunc(bNodeType *ntype)
switch (ntype->type) {
case SH_NODE_MATERIAL:
case SH_NODE_MATERIAL_EXT:
- ntype->uifunc = node_shader_buts_material;
+ ntype->draw_buttons = node_shader_buts_material;
break;
case SH_NODE_TEXTURE:
- ntype->uifunc = node_buts_texture;
+ ntype->draw_buttons = node_buts_texture;
break;
case SH_NODE_NORMAL:
- ntype->uifunc = node_buts_normal;
+ ntype->draw_buttons = node_buts_normal;
break;
case SH_NODE_CURVE_VEC:
- ntype->uifunc = node_buts_curvevec;
+ ntype->draw_buttons = node_buts_curvevec;
break;
case SH_NODE_CURVE_RGB:
- ntype->uifunc = node_buts_curvecol;
+ ntype->draw_buttons = node_buts_curvecol;
break;
case SH_NODE_MAPPING:
- ntype->uifunc = node_shader_buts_mapping;
+ ntype->draw_buttons = node_shader_buts_mapping;
break;
case SH_NODE_VALUE:
- ntype->uifunc = node_buts_value;
+ ntype->draw_buttons = node_buts_value;
break;
case SH_NODE_RGB:
- ntype->uifunc = node_buts_rgb;
+ ntype->draw_buttons = node_buts_rgb;
break;
case SH_NODE_MIX_RGB:
- ntype->uifunc = node_buts_mix_rgb;
+ ntype->draw_buttons = node_buts_mix_rgb;
break;
case SH_NODE_VALTORGB:
- ntype->uifunc = node_buts_colorramp;
+ ntype->draw_buttons = node_buts_colorramp;
break;
case SH_NODE_MATH:
- ntype->uifunc = node_buts_math;
+ ntype->draw_buttons = node_buts_math;
break;
case SH_NODE_VECT_MATH:
- ntype->uifunc = node_shader_buts_vect_math;
+ ntype->draw_buttons = node_shader_buts_vect_math;
break;
case SH_NODE_VECT_TRANSFORM:
- ntype->uifunc = node_shader_buts_vect_transform;
+ ntype->draw_buttons = node_shader_buts_vect_transform;
break;
case SH_NODE_GEOMETRY:
- ntype->uifunc = node_shader_buts_geometry;
+ ntype->draw_buttons = node_shader_buts_geometry;
break;
case SH_NODE_ATTRIBUTE:
- ntype->uifunc = node_shader_buts_attribute;
+ ntype->draw_buttons = node_shader_buts_attribute;
break;
case SH_NODE_WIREFRAME:
- ntype->uifunc = node_shader_buts_wireframe;
+ ntype->draw_buttons = node_shader_buts_wireframe;
break;
case SH_NODE_TEX_SKY:
- ntype->uifunc = node_shader_buts_tex_sky;
+ ntype->draw_buttons = node_shader_buts_tex_sky;
break;
case SH_NODE_TEX_IMAGE:
- ntype->uifunc = node_shader_buts_tex_image;
- ntype->uifuncbut = node_shader_buts_tex_image_details;
+ ntype->draw_buttons = node_shader_buts_tex_image;
+ ntype->draw_buttons_ex = node_shader_buts_tex_image_ex;
break;
case SH_NODE_TEX_ENVIRONMENT:
- ntype->uifunc = node_shader_buts_tex_environment;
+ ntype->draw_buttons = node_shader_buts_tex_environment;
break;
case SH_NODE_TEX_GRADIENT:
- ntype->uifunc = node_shader_buts_tex_gradient;
+ ntype->draw_buttons = node_shader_buts_tex_gradient;
break;
case SH_NODE_TEX_MAGIC:
- ntype->uifunc = node_shader_buts_tex_magic;
+ ntype->draw_buttons = node_shader_buts_tex_magic;
break;
case SH_NODE_TEX_BRICK:
- ntype->uifunc = node_shader_buts_tex_brick;
+ ntype->draw_buttons = node_shader_buts_tex_brick;
break;
case SH_NODE_TEX_WAVE:
- ntype->uifunc = node_shader_buts_tex_wave;
+ ntype->draw_buttons = node_shader_buts_tex_wave;
break;
case SH_NODE_TEX_MUSGRAVE:
- ntype->uifunc = node_shader_buts_tex_musgrave;
+ ntype->draw_buttons = node_shader_buts_tex_musgrave;
break;
case SH_NODE_TEX_VORONOI:
- ntype->uifunc = node_shader_buts_tex_voronoi;
+ ntype->draw_buttons = node_shader_buts_tex_voronoi;
break;
case SH_NODE_TEX_COORD:
- ntype->uifunc = node_shader_buts_tex_coord;
+ ntype->draw_buttons = node_shader_buts_tex_coord;
break;
case SH_NODE_BUMP:
- ntype->uifunc = node_shader_buts_bump;
+ ntype->draw_buttons = node_shader_buts_bump;
break;
case SH_NODE_NORMAL_MAP:
- ntype->uifunc = node_shader_buts_normal_map;
+ ntype->draw_buttons = node_shader_buts_normal_map;
break;
case SH_NODE_TANGENT:
- ntype->uifunc = node_shader_buts_tangent;
+ ntype->draw_buttons = node_shader_buts_tangent;
break;
case SH_NODE_BSDF_GLOSSY:
case SH_NODE_BSDF_GLASS:
case SH_NODE_BSDF_REFRACTION:
- ntype->uifunc = node_shader_buts_glossy;
+ ntype->draw_buttons = node_shader_buts_glossy;
+ break;
+ case SH_NODE_SUBSURFACE_SCATTERING:
+ ntype->draw_buttons = node_shader_buts_subsurface;
break;
case SH_NODE_BSDF_TOON:
- ntype->uifunc = node_shader_buts_toon;
+ ntype->draw_buttons = node_shader_buts_toon;
+ break;
+ case SH_NODE_BSDF_HAIR:
+ ntype->draw_buttons = node_shader_buts_hair;
break;
case SH_NODE_SCRIPT:
- ntype->uifunc = node_shader_buts_script;
- ntype->uifuncbut = node_shader_buts_script_details;
+ ntype->draw_buttons = node_shader_buts_script;
+ ntype->draw_buttons_ex = node_shader_buts_script_ex;
break;
}
}
@@ -1066,7 +1084,7 @@ static void node_composit_buts_image(uiLayout *layout, bContext *C, PointerRNA *
node_buts_image_user(layout, C, ptr, &imaptr, &iuserptr);
}
-static void node_composit_buts_image_details(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_image_ex(uiLayout *layout, bContext *C, PointerRNA *ptr)
{
bNode *node = ptr->data;
PointerRNA iuserptr;
@@ -1548,46 +1566,6 @@ static void node_composit_buts_id_mask(uiLayout *layout, bContext *UNUSED(C), Po
uiItemR(layout, ptr, "use_antialiasing", 0, NULL, ICON_NONE);
}
-/* draw function for file output node sockets, displays only sub-path and format, no value button */
-static void node_draw_input_file_output(bContext *C, uiLayout *layout, PointerRNA *ptr, PointerRNA *node_ptr)
-{
- bNodeTree *ntree = ptr->id.data;
- bNodeSocket *sock = ptr->data;
- uiLayout *row;
- PointerRNA inputptr, imfptr;
- int imtype;
-
- row = uiLayoutRow(layout, FALSE);
-
- imfptr = RNA_pointer_get(node_ptr, "format");
- imtype = RNA_enum_get(&imfptr, "file_format");
- if (imtype == R_IMF_IMTYPE_MULTILAYER) {
- NodeImageMultiFileSocket *input = sock->storage;
- RNA_pointer_create(&ntree->id, &RNA_NodeOutputFileSlotLayer, input, &inputptr);
-
- uiItemL(row, input->layer, ICON_NONE);
- }
- else {
- NodeImageMultiFileSocket *input = sock->storage;
- PropertyRNA *imtype_prop;
- const char *imtype_name;
- uiBlock *block;
- RNA_pointer_create(&ntree->id, &RNA_NodeOutputFileSlotFile, input, &inputptr);
-
- uiItemL(row, input->path, ICON_NONE);
-
- if (!RNA_boolean_get(&inputptr, "use_node_format"))
- imfptr = RNA_pointer_get(&inputptr, "format");
-
- imtype_prop = RNA_struct_find_property(&imfptr, "file_format");
- RNA_property_enum_name((bContext *)C, &imfptr, imtype_prop,
- RNA_property_enum_get(&imfptr, imtype_prop), &imtype_name);
- block = uiLayoutGetBlock(row);
- uiBlockSetEmboss(block, UI_EMBOSSP);
- uiItemL(row, imtype_name, ICON_NONE);
- uiBlockSetEmboss(block, UI_EMBOSSN);
- }
-}
static void node_composit_buts_file_output(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
PointerRNA imfptr = RNA_pointer_get(ptr, "format");
@@ -1599,7 +1577,7 @@ static void node_composit_buts_file_output(uiLayout *layout, bContext *UNUSED(C)
uiItemL(layout, IFACE_("Base Path:"), ICON_NONE);
uiItemR(layout, ptr, "base_path", 0, "", ICON_NONE);
}
-static void node_composit_buts_file_output_details(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_file_output_ex(uiLayout *layout, bContext *C, PointerRNA *ptr)
{
PointerRNA imfptr = RNA_pointer_get(ptr, "format");
PointerRNA active_input_ptr, op_ptr;
@@ -1620,12 +1598,14 @@ static void node_composit_buts_file_output_details(uiLayout *layout, bContext *C
active_index = RNA_int_get(ptr, "active_input_index");
/* using different collection properties if multilayer format is enabled */
if (multilayer) {
- uiTemplateList(col, C, "UI_UL_list", "file_output_node", ptr, "layer_slots", ptr, "active_input_index", 0, 0, 0);
+ uiTemplateList(col, C, "UI_UL_list", "file_output_node", ptr, "layer_slots", ptr, "active_input_index",
+ 0, 0, 0, 0);
RNA_property_collection_lookup_int(ptr, RNA_struct_find_property(ptr, "layer_slots"),
active_index, &active_input_ptr);
}
else {
- uiTemplateList(col, C, "UI_UL_list", "file_output_node", ptr, "file_slots", ptr, "active_input_index", 0, 0, 0);
+ uiTemplateList(col, C, "UI_UL_list", "file_output_node", ptr, "file_slots", ptr, "active_input_index",
+ 0, 0, 0, 0);
RNA_property_collection_lookup_int(ptr, RNA_struct_find_property(ptr, "file_slots"),
active_index, &active_input_ptr);
}
@@ -1755,7 +1735,7 @@ static void node_composit_buts_colorbalance(uiLayout *layout, bContext *UNUSED(C
}
}
-static void node_composit_buts_colorbalance_but(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void node_composit_buts_colorbalance_ex(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "correction_method", 0, NULL, ICON_NONE);
@@ -1809,7 +1789,7 @@ static void node_composit_buts_movieclip(uiLayout *layout, bContext *C, PointerR
uiTemplateID(layout, C, ptr, "clip", NULL, "CLIP_OT_open", NULL);
}
-static void node_composit_buts_movieclip_details(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_movieclip_ex(uiLayout *layout, bContext *C, PointerRNA *ptr)
{
bNode *node = ptr->data;
PointerRNA clipptr;
@@ -1913,7 +1893,7 @@ static void node_composit_buts_colorcorrection(uiLayout *layout, bContext *UNUSE
uiItemR(row, ptr, "midtones_end", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
}
-static void node_composit_buts_colorcorrection_but(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void node_composit_buts_colorcorrection_ex(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *row;
@@ -2115,7 +2095,7 @@ static void node_composit_buts_viewer(uiLayout *layout, bContext *UNUSED(C), Poi
uiItemR(layout, ptr, "use_alpha", 0, NULL, ICON_NONE);
}
-static void node_composit_buts_viewer_but(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void node_composit_buts_viewer_ex(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -2263,222 +2243,221 @@ static void node_composit_set_butfunc(bNodeType *ntype)
{
switch (ntype->type) {
case CMP_NODE_IMAGE:
- ntype->uifunc = node_composit_buts_image;
- ntype->uifuncbut = node_composit_buts_image_details;
+ ntype->draw_buttons = node_composit_buts_image;
+ ntype->draw_buttons_ex = node_composit_buts_image_ex;
break;
case CMP_NODE_R_LAYERS:
- ntype->uifunc = node_composit_buts_renderlayers;
+ ntype->draw_buttons = node_composit_buts_renderlayers;
break;
case CMP_NODE_NORMAL:
- ntype->uifunc = node_buts_normal;
+ ntype->draw_buttons = node_buts_normal;
break;
case CMP_NODE_CURVE_VEC:
- ntype->uifunc = node_buts_curvevec;
+ ntype->draw_buttons = node_buts_curvevec;
break;
case CMP_NODE_CURVE_RGB:
- ntype->uifunc = node_buts_curvecol;
+ ntype->draw_buttons = node_buts_curvecol;
break;
case CMP_NODE_VALUE:
- ntype->uifunc = node_buts_value;
+ ntype->draw_buttons = node_buts_value;
break;
case CMP_NODE_RGB:
- ntype->uifunc = node_buts_rgb;
+ ntype->draw_buttons = node_buts_rgb;
break;
case CMP_NODE_FLIP:
- ntype->uifunc = node_composit_buts_flip;
+ ntype->draw_buttons = node_composit_buts_flip;
break;
case CMP_NODE_SPLITVIEWER:
- ntype->uifunc = node_composit_buts_splitviewer;
+ ntype->draw_buttons = node_composit_buts_splitviewer;
break;
case CMP_NODE_MIX_RGB:
- ntype->uifunc = node_buts_mix_rgb;
+ ntype->draw_buttons = node_buts_mix_rgb;
break;
case CMP_NODE_VALTORGB:
- ntype->uifunc = node_buts_colorramp;
+ ntype->draw_buttons = node_buts_colorramp;
break;
case CMP_NODE_CROP:
- ntype->uifunc = node_composit_buts_crop;
+ ntype->draw_buttons = node_composit_buts_crop;
break;
case CMP_NODE_BLUR:
- ntype->uifunc = node_composit_buts_blur;
+ ntype->draw_buttons = node_composit_buts_blur;
break;
case CMP_NODE_DBLUR:
- ntype->uifunc = node_composit_buts_dblur;
+ ntype->draw_buttons = node_composit_buts_dblur;
break;
case CMP_NODE_BILATERALBLUR:
- ntype->uifunc = node_composit_buts_bilateralblur;
+ ntype->draw_buttons = node_composit_buts_bilateralblur;
break;
case CMP_NODE_DEFOCUS:
- ntype->uifunc = node_composit_buts_defocus;
+ ntype->draw_buttons = node_composit_buts_defocus;
break;
case CMP_NODE_GLARE:
- ntype->uifunc = node_composit_buts_glare;
+ ntype->draw_buttons = node_composit_buts_glare;
break;
case CMP_NODE_TONEMAP:
- ntype->uifunc = node_composit_buts_tonemap;
+ ntype->draw_buttons = node_composit_buts_tonemap;
break;
case CMP_NODE_LENSDIST:
- ntype->uifunc = node_composit_buts_lensdist;
+ ntype->draw_buttons = node_composit_buts_lensdist;
break;
case CMP_NODE_VECBLUR:
- ntype->uifunc = node_composit_buts_vecblur;
+ ntype->draw_buttons = node_composit_buts_vecblur;
break;
case CMP_NODE_FILTER:
- ntype->uifunc = node_composit_buts_filter;
+ ntype->draw_buttons = node_composit_buts_filter;
break;
case CMP_NODE_MAP_VALUE:
- ntype->uifunc = node_composit_buts_map_value;
+ ntype->draw_buttons = node_composit_buts_map_value;
break;
case CMP_NODE_MAP_RANGE:
- ntype->uifunc = node_composit_buts_map_range;
+ ntype->draw_buttons = node_composit_buts_map_range;
break;
case CMP_NODE_TIME:
- ntype->uifunc = node_buts_time;
+ ntype->draw_buttons = node_buts_time;
break;
case CMP_NODE_ALPHAOVER:
- ntype->uifunc = node_composit_buts_alphaover;
+ ntype->draw_buttons = node_composit_buts_alphaover;
break;
case CMP_NODE_HUE_SAT:
- ntype->uifunc = node_composit_buts_hue_sat;
+ ntype->draw_buttons = node_composit_buts_hue_sat;
break;
case CMP_NODE_TEXTURE:
- ntype->uifunc = node_buts_texture;
+ ntype->draw_buttons = node_buts_texture;
break;
case CMP_NODE_DILATEERODE:
- ntype->uifunc = node_composit_buts_dilateerode;
+ ntype->draw_buttons = node_composit_buts_dilateerode;
break;
case CMP_NODE_INPAINT:
- ntype->uifunc = node_composit_buts_inpaint;
+ ntype->draw_buttons = node_composit_buts_inpaint;
break;
case CMP_NODE_DESPECKLE:
- ntype->uifunc = node_composit_buts_despeckle;
+ ntype->draw_buttons = node_composit_buts_despeckle;
break;
case CMP_NODE_OUTPUT_FILE:
- ntype->uifunc = node_composit_buts_file_output;
- ntype->uifuncbut = node_composit_buts_file_output_details;
- ntype->drawinputfunc = node_draw_input_file_output;
+ ntype->draw_buttons = node_composit_buts_file_output;
+ ntype->draw_buttons_ex = node_composit_buts_file_output_ex;
break;
case CMP_NODE_DIFF_MATTE:
- ntype->uifunc = node_composit_buts_diff_matte;
+ ntype->draw_buttons = node_composit_buts_diff_matte;
break;
case CMP_NODE_DIST_MATTE:
- ntype->uifunc = node_composit_buts_distance_matte;
+ ntype->draw_buttons = node_composit_buts_distance_matte;
break;
case CMP_NODE_COLOR_SPILL:
- ntype->uifunc = node_composit_buts_color_spill;
+ ntype->draw_buttons = node_composit_buts_color_spill;
break;
case CMP_NODE_CHROMA_MATTE:
- ntype->uifunc = node_composit_buts_chroma_matte;
+ ntype->draw_buttons = node_composit_buts_chroma_matte;
break;
case CMP_NODE_COLOR_MATTE:
- ntype->uifunc = node_composit_buts_color_matte;
+ ntype->draw_buttons = node_composit_buts_color_matte;
break;
case CMP_NODE_SCALE:
- ntype->uifunc = node_composit_buts_scale;
+ ntype->draw_buttons = node_composit_buts_scale;
break;
case CMP_NODE_ROTATE:
- ntype->uifunc = node_composit_buts_rotate;
+ ntype->draw_buttons = node_composit_buts_rotate;
break;
case CMP_NODE_CHANNEL_MATTE:
- ntype->uifunc = node_composit_buts_channel_matte;
+ ntype->draw_buttons = node_composit_buts_channel_matte;
break;
case CMP_NODE_LUMA_MATTE:
- ntype->uifunc = node_composit_buts_luma_matte;
+ ntype->draw_buttons = node_composit_buts_luma_matte;
break;
case CMP_NODE_MAP_UV:
- ntype->uifunc = node_composit_buts_map_uv;
+ ntype->draw_buttons = node_composit_buts_map_uv;
break;
case CMP_NODE_ID_MASK:
- ntype->uifunc = node_composit_buts_id_mask;
+ ntype->draw_buttons = node_composit_buts_id_mask;
break;
case CMP_NODE_DOUBLEEDGEMASK:
- ntype->uifunc = node_composit_buts_double_edge_mask;
+ ntype->draw_buttons = node_composit_buts_double_edge_mask;
break;
case CMP_NODE_MATH:
- ntype->uifunc = node_buts_math;
+ ntype->draw_buttons = node_buts_math;
break;
case CMP_NODE_INVERT:
- ntype->uifunc = node_composit_buts_invert;
+ ntype->draw_buttons = node_composit_buts_invert;
break;
case CMP_NODE_PREMULKEY:
- ntype->uifunc = node_composit_buts_premulkey;
+ ntype->draw_buttons = node_composit_buts_premulkey;
break;
case CMP_NODE_VIEW_LEVELS:
- ntype->uifunc = node_composit_buts_view_levels;
+ ntype->draw_buttons = node_composit_buts_view_levels;
break;
case CMP_NODE_COLORBALANCE:
- ntype->uifunc = node_composit_buts_colorbalance;
- ntype->uifuncbut = node_composit_buts_colorbalance_but;
+ ntype->draw_buttons = node_composit_buts_colorbalance;
+ ntype->draw_buttons_ex = node_composit_buts_colorbalance_ex;
break;
case CMP_NODE_HUECORRECT:
- ntype->uifunc = node_composit_buts_huecorrect;
+ ntype->draw_buttons = node_composit_buts_huecorrect;
break;
case CMP_NODE_ZCOMBINE:
- ntype->uifunc = node_composit_buts_zcombine;
+ ntype->draw_buttons = node_composit_buts_zcombine;
break;
case CMP_NODE_COMBYCCA:
case CMP_NODE_SEPYCCA:
- ntype->uifunc = node_composit_buts_ycc;
+ ntype->draw_buttons = node_composit_buts_ycc;
break;
case CMP_NODE_MOVIECLIP:
- ntype->uifunc = node_composit_buts_movieclip;
- ntype->uifuncbut = node_composit_buts_movieclip_details;
+ ntype->draw_buttons = node_composit_buts_movieclip;
+ ntype->draw_buttons_ex = node_composit_buts_movieclip_ex;
break;
case CMP_NODE_STABILIZE2D:
- ntype->uifunc = node_composit_buts_stabilize2d;
+ ntype->draw_buttons = node_composit_buts_stabilize2d;
break;
case CMP_NODE_TRANSFORM:
- ntype->uifunc = node_composit_buts_transform;
+ ntype->draw_buttons = node_composit_buts_transform;
break;
case CMP_NODE_TRANSLATE:
- ntype->uifunc = node_composit_buts_translate;
+ ntype->draw_buttons = node_composit_buts_translate;
break;
case CMP_NODE_MOVIEDISTORTION:
- ntype->uifunc = node_composit_buts_moviedistortion;
+ ntype->draw_buttons = node_composit_buts_moviedistortion;
break;
case CMP_NODE_COLORCORRECTION:
- ntype->uifunc = node_composit_buts_colorcorrection;
- ntype->uifuncbut = node_composit_buts_colorcorrection_but;
+ ntype->draw_buttons = node_composit_buts_colorcorrection;
+ ntype->draw_buttons_ex = node_composit_buts_colorcorrection_ex;
break;
case CMP_NODE_SWITCH:
- ntype->uifunc = node_composit_buts_switch;
+ ntype->draw_buttons = node_composit_buts_switch;
break;
case CMP_NODE_MASK_BOX:
- ntype->uifunc = node_composit_buts_boxmask;
- ntype->uibackdropfunc = node_composit_backdrop_boxmask;
+ ntype->draw_buttons = node_composit_buts_boxmask;
+ ntype->draw_backdrop = node_composit_backdrop_boxmask;
break;
case CMP_NODE_MASK_ELLIPSE:
- ntype->uifunc = node_composit_buts_ellipsemask;
- ntype->uibackdropfunc = node_composit_backdrop_ellipsemask;
+ ntype->draw_buttons = node_composit_buts_ellipsemask;
+ ntype->draw_backdrop = node_composit_backdrop_ellipsemask;
break;
case CMP_NODE_BOKEHIMAGE:
- ntype->uifunc = node_composit_buts_bokehimage;
+ ntype->draw_buttons = node_composit_buts_bokehimage;
break;
case CMP_NODE_BOKEHBLUR:
- ntype->uifunc = node_composit_buts_bokehblur;
+ ntype->draw_buttons = node_composit_buts_bokehblur;
break;
case CMP_NODE_VIEWER:
- ntype->uifunc = node_composit_buts_viewer;
- ntype->uifuncbut = node_composit_buts_viewer_but;
- ntype->uibackdropfunc = node_composit_backdrop_viewer;
+ ntype->draw_buttons = node_composit_buts_viewer;
+ ntype->draw_buttons_ex = node_composit_buts_viewer_ex;
+ ntype->draw_backdrop = node_composit_backdrop_viewer;
break;
case CMP_NODE_COMPOSITE:
- ntype->uifunc = node_composit_buts_composite;
+ ntype->draw_buttons = node_composit_buts_composite;
break;
case CMP_NODE_MASK:
- ntype->uifunc = node_composit_buts_mask;
+ ntype->draw_buttons = node_composit_buts_mask;
break;
case CMP_NODE_KEYINGSCREEN:
- ntype->uifunc = node_composit_buts_keyingscreen;
+ ntype->draw_buttons = node_composit_buts_keyingscreen;
break;
case CMP_NODE_KEYING:
- ntype->uifunc = node_composit_buts_keying;
+ ntype->draw_buttons = node_composit_buts_keying;
break;
case CMP_NODE_TRACKPOS:
- ntype->uifunc = node_composit_buts_trackpos;
+ ntype->draw_buttons = node_composit_buts_trackpos;
break;
case CMP_NODE_PLANETRACKDEFORM:
- ntype->uifunc = node_composit_buts_planetrackdeform;
+ ntype->draw_buttons = node_composit_buts_planetrackdeform;
break;
}
}
@@ -2583,7 +2562,7 @@ static void node_texture_buts_image(uiLayout *layout, bContext *C, PointerRNA *p
uiTemplateID(layout, C, ptr, "image", NULL, "IMAGE_OT_open", NULL);
}
-static void node_texture_buts_image_details(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_texture_buts_image_ex(uiLayout *layout, bContext *C, PointerRNA *ptr)
{
bNode *node = ptr->data;
PointerRNA iuserptr;
@@ -2601,46 +2580,46 @@ static void node_texture_buts_output(uiLayout *layout, bContext *UNUSED(C), Poin
static void node_texture_set_butfunc(bNodeType *ntype)
{
if (ntype->type >= TEX_NODE_PROC && ntype->type < TEX_NODE_PROC_MAX) {
- ntype->uifunc = node_texture_buts_proc;
+ ntype->draw_buttons = node_texture_buts_proc;
}
else {
switch (ntype->type) {
case TEX_NODE_MATH:
- ntype->uifunc = node_buts_math;
+ ntype->draw_buttons = node_buts_math;
break;
case TEX_NODE_MIX_RGB:
- ntype->uifunc = node_buts_mix_rgb;
+ ntype->draw_buttons = node_buts_mix_rgb;
break;
case TEX_NODE_VALTORGB:
- ntype->uifunc = node_buts_colorramp;
+ ntype->draw_buttons = node_buts_colorramp;
break;
case TEX_NODE_CURVE_RGB:
- ntype->uifunc = node_buts_curvecol;
+ ntype->draw_buttons = node_buts_curvecol;
break;
case TEX_NODE_CURVE_TIME:
- ntype->uifunc = node_buts_time;
+ ntype->draw_buttons = node_buts_time;
break;
case TEX_NODE_TEXTURE:
- ntype->uifunc = node_buts_texture;
+ ntype->draw_buttons = node_buts_texture;
break;
case TEX_NODE_BRICKS:
- ntype->uifunc = node_texture_buts_bricks;
+ ntype->draw_buttons = node_texture_buts_bricks;
break;
case TEX_NODE_IMAGE:
- ntype->uifunc = node_texture_buts_image;
- ntype->uifuncbut = node_texture_buts_image_details;
+ ntype->draw_buttons = node_texture_buts_image;
+ ntype->draw_buttons_ex = node_texture_buts_image_ex;
break;
case TEX_NODE_OUTPUT:
- ntype->uifunc = node_texture_buts_output;
+ ntype->draw_buttons = node_texture_buts_output;
break;
}
}
@@ -2714,14 +2693,12 @@ void ED_node_init_butfuncs(void)
extern bNodeSocketType NodeSocketTypeUndefined;
/* default ui functions */
- NodeTypeUndefined.drawfunc = node_draw_default;
- NodeTypeUndefined.drawupdatefunc = node_update_default;
+ NodeTypeUndefined.draw_nodetype = node_draw_default;
+ NodeTypeUndefined.draw_nodetype_prepare = node_update_default;
NodeTypeUndefined.select_area_func = node_select_area_default;
NodeTypeUndefined.tweak_area_func = node_tweak_area_default;
- NodeTypeUndefined.uifunc = NULL;
- NodeTypeUndefined.uifuncbut = NULL;
- NodeTypeUndefined.drawinputfunc = node_draw_input_default;
- NodeTypeUndefined.drawoutputfunc = node_draw_output_default;
+ NodeTypeUndefined.draw_buttons = NULL;
+ NodeTypeUndefined.draw_buttons_ex = NULL;
NodeTypeUndefined.resize_area_func = node_resize_area_default;
NodeSocketTypeUndefined.draw = node_socket_undefined_draw;
@@ -2732,14 +2709,12 @@ void ED_node_init_butfuncs(void)
/* node type ui functions */
NODE_TYPES_BEGIN(ntype)
/* default ui functions */
- ntype->drawfunc = node_draw_default;
- ntype->drawupdatefunc = node_update_default;
+ ntype->draw_nodetype = node_draw_default;
+ ntype->draw_nodetype_prepare = node_update_default;
ntype->select_area_func = node_select_area_default;
ntype->tweak_area_func = node_tweak_area_default;
- ntype->uifunc = NULL;
- ntype->uifuncbut = NULL;
- ntype->drawinputfunc = node_draw_input_default;
- ntype->drawoutputfunc = node_draw_output_default;
+ ntype->draw_buttons = NULL;
+ ntype->draw_buttons_ex = NULL;
ntype->resize_area_func = node_resize_area_default;
node_common_set_butfunc(ntype);
@@ -2761,10 +2736,8 @@ void ED_node_init_butfuncs(void)
void ED_init_custom_node_type(bNodeType *ntype)
{
/* default ui functions */
- ntype->drawfunc = node_draw_default;
- ntype->drawupdatefunc = node_update_default;
- ntype->drawinputfunc = node_draw_input_default;
- ntype->drawoutputfunc = node_draw_output_default;
+ ntype->draw_nodetype = node_draw_default;
+ ntype->draw_nodetype_prepare = node_update_default;
ntype->resize_area_func = node_resize_area_default;
ntype->select_area_func = node_select_area_default;
ntype->tweak_area_func = node_tweak_area_default;
@@ -2802,13 +2775,60 @@ static void std_node_socket_interface_draw_color(bContext *UNUSED(C), PointerRNA
copy_v4_v4(r_color, std_node_socket_colors[type]);
}
+/* draw function for file output node sockets, displays only sub-path and format, no value button */
+static void node_file_output_socket_draw(bContext *C, uiLayout *layout, PointerRNA *ptr, PointerRNA *node_ptr)
+{
+ bNodeTree *ntree = ptr->id.data;
+ bNodeSocket *sock = ptr->data;
+ uiLayout *row;
+ PointerRNA inputptr, imfptr;
+ int imtype;
+
+ row = uiLayoutRow(layout, FALSE);
+
+ imfptr = RNA_pointer_get(node_ptr, "format");
+ imtype = RNA_enum_get(&imfptr, "file_format");
+ if (imtype == R_IMF_IMTYPE_MULTILAYER) {
+ NodeImageMultiFileSocket *input = sock->storage;
+ RNA_pointer_create(&ntree->id, &RNA_NodeOutputFileSlotLayer, input, &inputptr);
+
+ uiItemL(row, input->layer, ICON_NONE);
+ }
+ else {
+ NodeImageMultiFileSocket *input = sock->storage;
+ PropertyRNA *imtype_prop;
+ const char *imtype_name;
+ uiBlock *block;
+ RNA_pointer_create(&ntree->id, &RNA_NodeOutputFileSlotFile, input, &inputptr);
+
+ uiItemL(row, input->path, ICON_NONE);
+
+ if (!RNA_boolean_get(&inputptr, "use_node_format"))
+ imfptr = RNA_pointer_get(&inputptr, "format");
+
+ imtype_prop = RNA_struct_find_property(&imfptr, "file_format");
+ RNA_property_enum_name((bContext *)C, &imfptr, imtype_prop,
+ RNA_property_enum_get(&imfptr, imtype_prop), &imtype_name);
+ block = uiLayoutGetBlock(row);
+ uiBlockSetEmboss(block, UI_EMBOSSP);
+ uiItemL(row, imtype_name, ICON_NONE);
+ uiBlockSetEmboss(block, UI_EMBOSSN);
+ }
+}
+
static void std_node_socket_draw(bContext *C, uiLayout *layout, PointerRNA *ptr, PointerRNA *node_ptr, const char *text)
{
+ bNode *node = node_ptr->data;
bNodeSocket *sock = ptr->data;
int type = sock->typeinfo->type;
/*int subtype = sock->typeinfo->subtype;*/
- if ((sock->flag & SOCK_IN_USE) || (sock->flag & SOCK_HIDE_VALUE)) {
+ /* XXX not nice, eventually give this node its own socket type ... */
+ if (node->type == CMP_NODE_OUTPUT_FILE) {
+ node_file_output_socket_draw(C, layout, ptr, node_ptr);
+ }
+
+ if ((sock->in_out == SOCK_OUT) || (sock->flag & SOCK_IN_USE) || (sock->flag & SOCK_HIDE_VALUE)) {
node_socket_button_label(C, layout, ptr, node_ptr, text);
return;
}
@@ -3021,8 +3041,8 @@ void draw_nodespace_back_pix(const bContext *C, ARegion *ar, SpaceNode *snode, b
rctf *viewer_border = &snode->nodetree->viewer_border;
while (node) {
if (node->flag & NODE_SELECT) {
- if (node->typeinfo->uibackdropfunc) {
- node->typeinfo->uibackdropfunc(snode, ibuf, node, x, y);
+ if (node->typeinfo->draw_backdrop) {
+ node->typeinfo->draw_backdrop(snode, ibuf, node, x, y);
}
}
node = node->next;
@@ -3061,7 +3081,16 @@ int node_link_bezier_points(View2D *v2d, SpaceNode *snode, bNodeLink *link, floa
{
float dist, vec[4][2];
float deltax, deltay;
+ float cursor[2] = {0.0f, 0.0f};
int toreroute, fromreroute;
+
+ /* this function can be called with snode null (via cut_links_intersect) */
+ /* XXX map snode->cursor back to view space */
+ if (snode) {
+ cursor[0] = snode->cursor[0] * UI_DPI_FAC;
+ cursor[1] = snode->cursor[1] * UI_DPI_FAC;
+ }
+
/* in v0 and v3 we put begin/end points */
if (link->fromsock) {
vec[0][0] = link->fromsock->locx;
@@ -3070,7 +3099,7 @@ int node_link_bezier_points(View2D *v2d, SpaceNode *snode, bNodeLink *link, floa
}
else {
if (snode == NULL) return 0;
- copy_v2_v2(vec[0], snode->cursor);
+ copy_v2_v2(vec[0], cursor);
fromreroute = 0;
}
if (link->tosock) {
@@ -3080,7 +3109,7 @@ int node_link_bezier_points(View2D *v2d, SpaceNode *snode, bNodeLink *link, floa
}
else {
if (snode == NULL) return 0;
- copy_v2_v2(vec[3], snode->cursor);
+ copy_v2_v2(vec[3], cursor);
toreroute = 0;
}
diff --git a/source/blender/editors/space_node/node_add.c b/source/blender/editors/space_node/node_add.c
index c9618daa7c5..00769975893 100644
--- a/source/blender/editors/space_node/node_add.c
+++ b/source/blender/editors/space_node/node_add.c
@@ -84,10 +84,6 @@ bNode *node_add_node(const bContext *C, const char *idname, int type, float locx
node->locy = locy + 60.0f; /* arbitrary... so its visible, (0,0) is top of node */
nodeSetSelected(node, TRUE);
- /* node location is mapped */
- locx /= UI_DPI_FAC;
- locy /= UI_DPI_FAC;
-
node->locx = locx;
node->locy = locy + 60.0f;
@@ -215,7 +211,7 @@ static int add_reroute_exec(bContext *C, wmOperator *op)
int i = 0;
/* Get the cut path */
- RNA_BEGIN(op->ptr, itemptr, "path")
+ RNA_BEGIN (op->ptr, itemptr, "path")
{
float loc[2];
@@ -417,9 +413,8 @@ static int node_add_mask_poll(bContext *C)
return ED_operator_node_editable(C) && snode->nodetree->type == NTREE_COMPOSIT;
}
-static int node_add_mask_invoke(bContext *C, wmOperator *op, const wmEvent *event)
+static int node_add_mask_exec(bContext *C, wmOperator *op)
{
- ARegion *ar = CTX_wm_region(C);
SpaceNode *snode = CTX_wm_space_node(C);
bNode *node;
ID *mask = NULL;
@@ -435,9 +430,6 @@ static int node_add_mask_invoke(bContext *C, wmOperator *op, const wmEvent *even
ED_preview_kill_jobs(C);
- /* convert mouse coordinates to v2d space */
- UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1],
- &snode->cursor[0], &snode->cursor[1]);
node = node_add_node(C, NULL, CMP_NODE_MASK, snode->cursor[0], snode->cursor[1]);
if (!node) {
@@ -462,7 +454,7 @@ void NODE_OT_add_mask(wmOperatorType *ot)
ot->idname = "NODE_OT_add_mask";
/* callbacks */
- ot->invoke = node_add_mask_invoke;
+ ot->exec = node_add_mask_exec;
ot->poll = node_add_mask_poll;
/* flags */
diff --git a/source/blender/editors/space_node/node_buttons.c b/source/blender/editors/space_node/node_buttons.c
index f95e895bef2..53b373e728e 100644
--- a/source/blender/editors/space_node/node_buttons.c
+++ b/source/blender/editors/space_node/node_buttons.c
@@ -145,13 +145,15 @@ static void node_tree_interface_panel(const bContext *C, Panel *pa)
split = uiLayoutRow(row, TRUE);
col = uiLayoutColumn(split, TRUE);
uiItemL(col, IFACE_("Inputs:"), ICON_NONE);
- uiTemplateList(col, (bContext *)C, "NODE_UL_interface_sockets", "inputs", &ptr, "inputs", &ptr, "active_input", 0, 0, 0);
+ uiTemplateList(col, (bContext *)C, "NODE_UL_interface_sockets", "inputs", &ptr, "inputs", &ptr, "active_input",
+ 0, 0, 0, 0);
opptr = uiItemFullO(col, "NODE_OT_tree_socket_add", "", ICON_PLUS, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS);
RNA_enum_set(&opptr, "in_out", SOCK_IN);
col = uiLayoutColumn(split, TRUE);
uiItemL(col, IFACE_("Outputs:"), ICON_NONE);
- uiTemplateList(col, (bContext *)C, "NODE_UL_interface_sockets", "outputs", &ptr, "outputs", &ptr, "active_output", 0, 0, 0);
+ uiTemplateList(col, (bContext *)C, "NODE_UL_interface_sockets", "outputs", &ptr, "outputs", &ptr, "active_output",
+ 0, 0, 0, 0);
opptr = uiItemFullO(col, "NODE_OT_tree_socket_add", "", ICON_PLUS, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS);
RNA_enum_set(&opptr, "in_out", SOCK_OUT);
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index dce04bb8c42..65eb75f8523 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -351,7 +351,7 @@ static void node_update_basis(const bContext *C, bNodeTree *ntree, bNode *node)
row = uiLayoutRow(layout, 1);
uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_RIGHT);
- node->typeinfo->drawoutputfunc((bContext *)C, row, &sockptr, &nodeptr);
+ nsock->typeinfo->draw((bContext *)C, row, &sockptr, &nodeptr, IFACE_(nsock->name));
uiBlockEndAlign(node->block);
uiBlockLayoutResolve(node->block, NULL, &buty);
@@ -402,7 +402,7 @@ static void node_update_basis(const bContext *C, bNodeTree *ntree, bNode *node)
}
/* buttons rect? */
- if (node->typeinfo->uifunc && (node->flag & NODE_OPTIONS)) {
+ if (node->typeinfo->draw_buttons && (node->flag & NODE_OPTIONS)) {
dy -= NODE_DYS / 2;
/* set this for uifunc() that don't use layout engine yet */
@@ -416,7 +416,7 @@ static void node_update_basis(const bContext *C, bNodeTree *ntree, bNode *node)
locx + NODE_DYS, dy, node->butr.xmax, 0, UI_GetStyle());
uiLayoutSetContextPointer(layout, "node", &nodeptr);
- node->typeinfo->uifunc(layout, (bContext *)C, &nodeptr);
+ node->typeinfo->draw_buttons(layout, (bContext *)C, &nodeptr);
uiBlockEndAlign(node->block);
uiBlockLayoutResolve(node->block, NULL, &buty);
@@ -437,7 +437,9 @@ static void node_update_basis(const bContext *C, bNodeTree *ntree, bNode *node)
uiLayoutSetContextPointer(layout, "node", &nodeptr);
uiLayoutSetContextPointer(layout, "socket", &sockptr);
- node->typeinfo->drawinputfunc((bContext *)C, layout, &sockptr, &nodeptr);
+ row = uiLayoutRow(layout, 1);
+
+ nsock->typeinfo->draw((bContext *)C, row, &sockptr, &nodeptr, IFACE_(nsock->name));
uiBlockEndAlign(node->block);
uiBlockLayoutResolve(node->block, NULL, &buty);
@@ -923,10 +925,13 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
}
/* preview */
- if (node->flag & NODE_PREVIEW) {
- bNodePreview *preview = previews ? BKE_node_instance_hash_lookup(previews, key) : NULL;
- if (preview && preview->rect && !BLI_rctf_is_empty(&node->prvr))
- node_draw_preview(preview, &node->prvr);
+ if (node->flag & NODE_PREVIEW && previews) {
+ bNodePreview *preview = BKE_node_instance_hash_lookup(previews, key);
+ if (preview && (preview->xsize && preview->ysize)) {
+ if (preview->rect && !BLI_rctf_is_empty(&node->prvr)) {
+ node_draw_preview(preview, &node->prvr);
+ }
+ }
}
UI_ThemeClearColor(color_id);
@@ -1075,31 +1080,31 @@ int node_get_resize_cursor(int directions)
return CURSOR_EDIT;
}
-void node_set_cursor(wmWindow *win, SpaceNode *snode)
+void node_set_cursor(wmWindow *win, SpaceNode *snode, float cursor[2])
{
bNodeTree *ntree = snode->edittree;
bNode *node;
bNodeSocket *sock;
- int cursor = CURSOR_STD;
+ int wmcursor = CURSOR_STD;
if (ntree) {
- if (node_find_indicated_socket(snode, &node, &sock, SOCK_IN | SOCK_OUT)) {
+ if (node_find_indicated_socket(snode, &node, &sock, cursor, SOCK_IN | SOCK_OUT)) {
/* pass */
}
else {
/* check nodes front to back */
for (node = ntree->nodes.last; node; node = node->prev) {
- if (BLI_rctf_isect_pt(&node->totr, snode->cursor[0], snode->cursor[1]))
+ if (BLI_rctf_isect_pt(&node->totr, cursor[0], cursor[1]))
break; /* first hit on node stops */
}
if (node) {
- int dir = node->typeinfo->resize_area_func(node, snode->cursor[0], snode->cursor[1]);
- cursor = node_get_resize_cursor(dir);
+ int dir = node->typeinfo->resize_area_func(node, cursor[0], cursor[1]);
+ wmcursor = node_get_resize_cursor(dir);
}
}
}
- WM_cursor_set(win, cursor);
+ WM_cursor_set(win, wmcursor);
}
void node_draw_default(const bContext *C, ARegion *ar, SpaceNode *snode, bNodeTree *ntree, bNode *node, bNodeInstanceKey key)
@@ -1112,8 +1117,8 @@ void node_draw_default(const bContext *C, ARegion *ar, SpaceNode *snode, bNodeTr
static void node_update(const bContext *C, bNodeTree *ntree, bNode *node)
{
- if (node->typeinfo->drawupdatefunc)
- node->typeinfo->drawupdatefunc(C, ntree, node);
+ if (node->typeinfo->draw_nodetype_prepare)
+ node->typeinfo->draw_nodetype_prepare(C, ntree, node);
}
void node_update_nodetree(const bContext *C, bNodeTree *ntree)
@@ -1128,8 +1133,8 @@ void node_update_nodetree(const bContext *C, bNodeTree *ntree)
static void node_draw(const bContext *C, ARegion *ar, SpaceNode *snode, bNodeTree *ntree, bNode *node, bNodeInstanceKey key)
{
- if (node->typeinfo->drawfunc)
- node->typeinfo->drawfunc(C, ar, snode, ntree, node, key);
+ if (node->typeinfo->draw_nodetype)
+ node->typeinfo->draw_nodetype(C, ar, snode, ntree, node, key);
}
#define USE_DRAW_TOT_UPDATE
@@ -1238,7 +1243,7 @@ static void draw_group_overlay(const bContext *C, ARegion *ar)
/* shade node groups to separate them visually */
UI_ThemeColorShadeAlpha(TH_NODE_GROUP, 0, -70);
glEnable(GL_BLEND);
- uiSetRoundBox(0);
+ uiSetRoundBox(UI_CNR_NONE);
uiDrawBox(GL_POLYGON, rect.xmin, rect.ymin, rect.xmax, rect.ymax, 0);
glDisable(GL_BLEND);
@@ -1251,6 +1256,7 @@ static void draw_group_overlay(const bContext *C, ARegion *ar)
void drawnodespace(const bContext *C, ARegion *ar)
{
+ wmWindow *win = CTX_wm_window(C);
View2DScrollers *scrollers;
SpaceNode *snode = CTX_wm_space_node(C);
View2D *v2d = &ar->v2d;
@@ -1259,7 +1265,13 @@ void drawnodespace(const bContext *C, ARegion *ar)
glClear(GL_COLOR_BUFFER_BIT);
UI_view2d_view_ortho(v2d);
-
+
+ /* XXX snode->cursor set in coordspace for placing new nodes, used for drawing noodles too */
+ UI_view2d_region_to_view(&ar->v2d, win->eventstate->x - ar->winrct.xmin, win->eventstate->y - ar->winrct.ymin,
+ &snode->cursor[0], &snode->cursor[1]);
+ snode->cursor[0] /= UI_DPI_FAC;
+ snode->cursor[1] /= UI_DPI_FAC;
+
ED_region_draw_cb_draw(C, ar, REGION_DRAW_PRE_VIEW);
/* only set once */
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index b7e9cb0268f..1d93fe65c09 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -854,14 +854,14 @@ static void node_resize_init(bContext *C, wmOperator *op, const wmEvent *UNUSED(
nsw->oldminiwidth = node->miniwidth;
nsw->directions = dir;
- WM_cursor_modal(CTX_wm_window(C), node_get_resize_cursor(dir));
+ WM_cursor_modal_set(CTX_wm_window(C), node_get_resize_cursor(dir));
/* add modal handler */
WM_event_add_modal_handler(C, op);
}
static void node_resize_exit(bContext *C, wmOperator *op, int UNUSED(cancel))
{
- WM_cursor_restore(CTX_wm_window(C));
+ WM_cursor_modal_restore(CTX_wm_window(C));
MEM_freeN(op->customdata);
op->customdata = NULL;
@@ -1056,7 +1056,7 @@ void node_set_hidden_sockets(SpaceNode *snode, bNode *node, int set)
/* checks snode->mouse position, and returns found node/socket */
/* type is SOCK_IN and/or SOCK_OUT */
-int node_find_indicated_socket(SpaceNode *snode, bNode **nodep, bNodeSocket **sockp, int in_out)
+int node_find_indicated_socket(SpaceNode *snode, bNode **nodep, bNodeSocket **sockp, float cursor[2], int in_out)
{
bNode *node;
bNodeSocket *sock;
@@ -1068,10 +1068,10 @@ int node_find_indicated_socket(SpaceNode *snode, bNode **nodep, bNodeSocket **so
/* check if we click in a socket */
for (node = snode->edittree->nodes.first; node; node = node->next) {
- rect.xmin = snode->cursor[0] - (NODE_SOCKSIZE + 4);
- rect.ymin = snode->cursor[1] - (NODE_SOCKSIZE + 4);
- rect.xmax = snode->cursor[0] + (NODE_SOCKSIZE + 4);
- rect.ymax = snode->cursor[1] + (NODE_SOCKSIZE + 4);
+ rect.xmin = cursor[0] - (NODE_SOCKSIZE + 4);
+ rect.ymin = cursor[1] - (NODE_SOCKSIZE + 4);
+ rect.xmax = cursor[0] + (NODE_SOCKSIZE + 4);
+ rect.ymax = cursor[1] + (NODE_SOCKSIZE + 4);
if (!(node->flag & NODE_HIDDEN)) {
/* extra padding inside and out - allow dragging on the text areas too */
@@ -1419,7 +1419,7 @@ static void node_flag_toggle_exec(SpaceNode *snode, int toggle_flag)
if (toggle_flag == NODE_PREVIEW && (node->typeinfo->flag & NODE_PREVIEW) == 0)
continue;
- if (toggle_flag == NODE_OPTIONS && !(node->typeinfo->uifunc || node->typeinfo->uifuncbut))
+ if (toggle_flag == NODE_OPTIONS && !(node->typeinfo->draw_buttons || node->typeinfo->draw_buttons_ex))
continue;
if (node->flag & toggle_flag)
@@ -1433,7 +1433,7 @@ static void node_flag_toggle_exec(SpaceNode *snode, int toggle_flag)
if (toggle_flag == NODE_PREVIEW && (node->typeinfo->flag & NODE_PREVIEW) == 0)
continue;
- if (toggle_flag == NODE_OPTIONS && !(node->typeinfo->uifunc || node->typeinfo->uifuncbut))
+ if (toggle_flag == NODE_OPTIONS && !(node->typeinfo->draw_buttons || node->typeinfo->draw_buttons_ex))
continue;
if ((tot_eq && tot_neq) || tot_eq == 0)
@@ -1731,7 +1731,7 @@ static int node_output_file_add_socket_exec(bContext *C, wmOperator *op)
node = nodeGetActive(snode->edittree);
}
- if (!node)
+ if (!node || node->type != CMP_NODE_OUTPUT_FILE)
return OPERATOR_CANCELLED;
RNA_string_get(op->ptr, "file_path", file_path);
@@ -1777,7 +1777,7 @@ static int node_output_file_remove_active_socket_exec(bContext *C, wmOperator *U
node = nodeGetActive(snode->edittree);
}
- if (!node)
+ if (!node || node->type != CMP_NODE_OUTPUT_FILE)
return OPERATOR_CANCELLED;
if (!ntreeCompositOutputFileRemoveActiveSocket(ntree, node))
@@ -1819,7 +1819,7 @@ static int node_output_file_move_active_socket_exec(bContext *C, wmOperator *op)
else if (snode && snode->edittree)
node = nodeGetActive(snode->edittree);
- if (!node)
+ if (!node || node->type != CMP_NODE_OUTPUT_FILE)
return OPERATOR_CANCELLED;
nimf = node->storage;
@@ -2087,17 +2087,6 @@ static int node_clipboard_paste_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int node_clipboard_paste_invoke(bContext *C, wmOperator *op, const wmEvent *event)
-{
- ARegion *ar = CTX_wm_region(C);
- SpaceNode *snode = CTX_wm_space_node(C);
-
- /* convert mouse coordinates to v2d space */
- UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &snode->cursor[0], &snode->cursor[1]);
-
- return node_clipboard_paste_exec(C, op);
-}
-
void NODE_OT_clipboard_paste(wmOperatorType *ot)
{
/* identifiers */
@@ -2107,7 +2096,6 @@ void NODE_OT_clipboard_paste(wmOperatorType *ot)
/* api callbacks */
ot->exec = node_clipboard_paste_exec;
- ot->invoke = node_clipboard_paste_invoke;
ot->poll = ED_operator_node_editable;
/* flags */
diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h
index 1a2e90e5522..176b81f9503 100644
--- a/source/blender/editors/space_node/node_intern.h
+++ b/source/blender/editors/space_node/node_intern.h
@@ -84,7 +84,7 @@ void node_draw_nodetree(const struct bContext *C, struct ARegion *ar, struct Spa
struct bNodeTree *ntree, bNodeInstanceKey parent_key);
void drawnodespace(const bContext *C, ARegion *ar);
-void node_set_cursor(struct wmWindow *win, struct SpaceNode *snode);
+void node_set_cursor(struct wmWindow *win, struct SpaceNode *snode, float cursor[2]);
/* DPI scaled coords */
void node_to_view(struct bNode *node, float x, float y, float *rx, float *ry);
void node_from_view(struct bNode *node, float x, float y, float *rx, float *ry);
@@ -122,13 +122,15 @@ void NODE_OT_select_same_type_step(struct wmOperatorType *ot);
void NODE_OT_find_node(struct wmOperatorType *ot);
/* node_view.c */
-int space_node_view_flag(struct bContext *C, SpaceNode *snode, ARegion *ar, const int node_flag);
+int space_node_view_flag(struct bContext *C, SpaceNode *snode, ARegion *ar,
+ const int node_flag, const int smooth_viewtx);
void NODE_OT_view_all(struct wmOperatorType *ot);
void NODE_OT_view_selected(struct wmOperatorType *ot);
void NODE_OT_backimage_move(struct wmOperatorType *ot);
void NODE_OT_backimage_zoom(struct wmOperatorType *ot);
+void NODE_OT_backimage_fit(struct wmOperatorType *ot);
void NODE_OT_backimage_sample(struct wmOperatorType *ot);
/* drawnode.c */
@@ -182,7 +184,7 @@ int composite_node_editable(struct bContext *C);
int node_has_hidden_sockets(bNode *node);
void node_set_hidden_sockets(SpaceNode *snode, bNode *node, int set);
int node_render_changed_exec(bContext *, struct wmOperator *);
-int node_find_indicated_socket(struct SpaceNode *snode, struct bNode **nodep, struct bNodeSocket **sockp, int in_out);
+int node_find_indicated_socket(struct SpaceNode *snode, struct bNode **nodep, struct bNodeSocket **sockp, float cursor[2], int in_out);
void NODE_OT_duplicate(struct wmOperatorType *ot);
void NODE_OT_delete(struct wmOperatorType *ot);
diff --git a/source/blender/editors/space_node/node_ops.c b/source/blender/editors/space_node/node_ops.c
index 566bb1600cc..f0d3deb24df 100644
--- a/source/blender/editors/space_node/node_ops.c
+++ b/source/blender/editors/space_node/node_ops.c
@@ -98,6 +98,7 @@ void node_operatortypes(void)
WM_operatortype_append(NODE_OT_backimage_move);
WM_operatortype_append(NODE_OT_backimage_zoom);
+ WM_operatortype_append(NODE_OT_backimage_fit);
WM_operatortype_append(NODE_OT_backimage_sample);
WM_operatortype_append(NODE_OT_add_file);
@@ -249,6 +250,7 @@ void node_keymap(struct wmKeyConfig *keyconf)
RNA_float_set(kmi->ptr, "factor", 0.83333f);
kmi = WM_keymap_add_item(keymap, "NODE_OT_backimage_zoom", VKEY, KM_PRESS, KM_ALT, 0);
RNA_float_set(kmi->ptr, "factor", 1.2f);
+ WM_keymap_add_item(keymap, "NODE_OT_backimage_fit", HOMEKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "NODE_OT_backimage_sample", ACTIONMOUSE, KM_PRESS, KM_ALT, 0);
kmi = WM_keymap_add_item(keymap, "NODE_OT_link_make", FKEY, KM_PRESS, 0, 0);
diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c
index 244b222811e..4b5cc9e42b6 100644
--- a/source/blender/editors/space_node/node_relationships.c
+++ b/source/blender/editors/space_node/node_relationships.c
@@ -443,18 +443,19 @@ static int node_link_modal(bContext *C, wmOperator *op, const wmEvent *event)
bNodeSocket *tsock = NULL;
bNodeLink *link;
LinkData *linkdata;
+ float cursor[2];
int in_out;
in_out = nldrag->in_out;
UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1],
- &snode->cursor[0], &snode->cursor[1]);
+ &cursor[0], &cursor[1]);
switch (event->type) {
case MOUSEMOVE:
if (in_out == SOCK_OUT) {
- if (node_find_indicated_socket(snode, &tnode, &tsock, SOCK_IN)) {
+ if (node_find_indicated_socket(snode, &tnode, &tsock, cursor, SOCK_IN)) {
for (linkdata = nldrag->links.first; linkdata; linkdata = linkdata->next) {
link = linkdata->data;
@@ -480,7 +481,7 @@ static int node_link_modal(bContext *C, wmOperator *op, const wmEvent *event)
}
}
else {
- if (node_find_indicated_socket(snode, &tnode, &tsock, SOCK_OUT)) {
+ if (node_find_indicated_socket(snode, &tnode, &tsock, cursor, SOCK_OUT)) {
for (linkdata = nldrag->links.first; linkdata; linkdata = linkdata->next) {
link = linkdata->data;
@@ -550,7 +551,7 @@ static int node_link_modal(bContext *C, wmOperator *op, const wmEvent *event)
}
/* return 1 when socket clicked */
-static bNodeLinkDrag *node_link_init(SpaceNode *snode, int detach)
+static bNodeLinkDrag *node_link_init(SpaceNode *snode, float cursor[2], int detach)
{
bNode *node;
bNodeSocket *sock;
@@ -560,7 +561,7 @@ static bNodeLinkDrag *node_link_init(SpaceNode *snode, int detach)
int num_links;
/* output indicated? */
- if (node_find_indicated_socket(snode, &node, &sock, SOCK_OUT)) {
+ if (node_find_indicated_socket(snode, &node, &sock, cursor, SOCK_OUT)) {
nldrag = MEM_callocN(sizeof(bNodeLinkDrag), "drag link op customdata");
num_links = nodeCountSocketLinks(snode->edittree, sock);
@@ -596,7 +597,7 @@ static bNodeLinkDrag *node_link_init(SpaceNode *snode, int detach)
}
}
/* or an input? */
- else if (node_find_indicated_socket(snode, &node, &sock, SOCK_IN)) {
+ else if (node_find_indicated_socket(snode, &node, &sock, cursor, SOCK_IN)) {
nldrag = MEM_callocN(sizeof(bNodeLinkDrag), "drag link op customdata");
num_links = nodeCountSocketLinks(snode->edittree, sock);
@@ -644,14 +645,16 @@ static int node_link_invoke(bContext *C, wmOperator *op, const wmEvent *event)
SpaceNode *snode = CTX_wm_space_node(C);
ARegion *ar = CTX_wm_region(C);
bNodeLinkDrag *nldrag;
+ float cursor[2];
+
int detach = RNA_boolean_get(op->ptr, "detach");
UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1],
- &snode->cursor[0], &snode->cursor[1]);
+ &cursor[0], &cursor[1]);
ED_preview_kill_jobs(C);
- nldrag = node_link_init(snode, detach);
+ nldrag = node_link_init(snode, cursor, detach);
if (nldrag) {
op->customdata = nldrag;
@@ -762,7 +765,7 @@ static int cut_links_exec(bContext *C, wmOperator *op)
float mcoords[256][2];
int i = 0;
- RNA_BEGIN(op->ptr, itemptr, "path")
+ RNA_BEGIN (op->ptr, itemptr, "path")
{
float loc[2];
@@ -1065,18 +1068,23 @@ void NODE_OT_join(wmOperatorType *ot)
/* ****************** Attach ******************* */
-static int node_attach_exec(bContext *C, wmOperator *UNUSED(op))
+static int node_attach_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *event)
{
+ ARegion *ar = CTX_wm_region(C);
SpaceNode *snode = CTX_wm_space_node(C);
bNodeTree *ntree = snode->edittree;
bNode *frame;
+ float cursor[2];
+
+ /* convert mouse coordinates to v2d space */
+ UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &cursor[0], &cursor[1]);
/* check nodes front to back */
for (frame = ntree->nodes.last; frame; frame = frame->prev) {
/* skip selected, those are the nodes we want to attach */
if ((frame->type != NODE_FRAME) || (frame->flag & NODE_SELECT))
continue;
- if (BLI_rctf_isect_pt(&frame->totr, snode->cursor[0], snode->cursor[1]))
+ if (BLI_rctf_isect_pt(&frame->totr, cursor[0], cursor[1]))
break;
}
if (frame) {
@@ -1116,16 +1124,6 @@ static int node_attach_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_FINISHED;
}
-static int node_attach_invoke(bContext *C, wmOperator *op, const wmEvent *event)
-{
- ARegion *ar = CTX_wm_region(C);
- SpaceNode *snode = CTX_wm_space_node(C);
-
- /* convert mouse coordinates to v2d space */
- UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &snode->cursor[0], &snode->cursor[1]);
-
- return node_attach_exec(C, op);
-}
void NODE_OT_attach(wmOperatorType *ot)
{
@@ -1135,7 +1133,7 @@ void NODE_OT_attach(wmOperatorType *ot)
ot->idname = "NODE_OT_attach";
/* api callbacks */
- ot->exec = node_attach_exec;
+
ot->invoke = node_attach_invoke;
ot->poll = ED_operator_node_editable;
diff --git a/source/blender/editors/space_node/node_select.c b/source/blender/editors/space_node/node_select.c
index e17699309ef..958a3433337 100644
--- a/source/blender/editors/space_node/node_select.c
+++ b/source/blender/editors/space_node/node_select.c
@@ -306,24 +306,21 @@ static int node_mouse_select(Main *bmain, SpaceNode *snode, ARegion *ar, const i
{
bNode *node, *tnode;
bNodeSocket *sock, *tsock;
- float mx, my;
+ float cursor[2];
int selected = 0;
/* get mouse coordinates in view2d space */
- UI_view2d_region_to_view(&ar->v2d, mval[0], mval[1], &mx, &my);
- /* node_find_indicated_socket uses snode->mx/my */
- snode->cursor[0] = mx;
- snode->cursor[1] = my;
+ UI_view2d_region_to_view(&ar->v2d, mval[0], mval[1], &cursor[0], &cursor[1]);
if (extend) {
/* first do socket selection, these generally overlap with nodes.
* socket selection only in extend mode.
*/
- if (node_find_indicated_socket(snode, &node, &sock, SOCK_IN)) {
+ if (node_find_indicated_socket(snode, &node, &sock, cursor, SOCK_IN)) {
node_socket_toggle(node, sock, 1);
selected = 1;
}
- else if (node_find_indicated_socket(snode, &node, &sock, SOCK_OUT)) {
+ else if (node_find_indicated_socket(snode, &node, &sock, cursor, SOCK_OUT)) {
if (sock->flag & SELECT) {
node_socket_deselect(node, sock, 1);
}
@@ -341,7 +338,7 @@ static int node_mouse_select(Main *bmain, SpaceNode *snode, ARegion *ar, const i
}
else {
/* find the closest visible node */
- node = node_under_mouse_select(snode->edittree, mx, my);
+ node = node_under_mouse_select(snode->edittree, cursor[0], cursor[1]);
if (node) {
if ((node->flag & SELECT) && (node->flag & NODE_ACTIVE) == 0) {
@@ -362,7 +359,7 @@ static int node_mouse_select(Main *bmain, SpaceNode *snode, ARegion *ar, const i
else { /* extend == 0 */
/* find the closest visible node */
- node = node_under_mouse_select(snode->edittree, mx, my);
+ node = node_under_mouse_select(snode->edittree, cursor[0], cursor[1]);
if (node) {
for (tnode = snode->edittree->nodes.first; tnode; tnode = tnode->next) {
@@ -834,7 +831,8 @@ static int node_select_same_type_step_exec(bContext *C, wmOperator *op)
if (active->totr.xmax < ar->v2d.cur.xmin || active->totr.xmin > ar->v2d.cur.xmax ||
active->totr.ymax < ar->v2d.cur.ymin || active->totr.ymin > ar->v2d.cur.ymax)
{
- space_node_view_flag(C, snode, CTX_wm_region(C), NODE_SELECT);
+ const int smooth_viewtx = WM_operator_smooth_viewtx_get(op);
+ space_node_view_flag(C, snode, ar, NODE_SELECT, smooth_viewtx);
}
}
@@ -898,7 +896,7 @@ static void node_find_call_cb(struct bContext *C, void *UNUSED(arg1), void *arg2
if (active->totr.xmax < ar->v2d.cur.xmin || active->totr.xmin > ar->v2d.cur.xmax ||
active->totr.ymax < ar->v2d.cur.ymin || active->totr.ymin > ar->v2d.cur.ymax)
{
- space_node_view_flag(C, snode, ar, NODE_SELECT);
+ space_node_view_flag(C, snode, ar, NODE_SELECT, U.smooth_viewtx);
}
}
diff --git a/source/blender/editors/space_node/node_templates.c b/source/blender/editors/space_node/node_templates.c
index 83c11e69d84..a67a8791a64 100644
--- a/source/blender/editors/space_node/node_templates.c
+++ b/source/blender/editors/space_node/node_templates.c
@@ -207,7 +207,7 @@ static void node_socket_add_replace(const bContext *C, bNodeTree *ntree, bNode *
break;
if (node_from)
- if (node_from->inputs.first || node_from->typeinfo->uifunc || node_from->typeinfo->uifuncbut)
+ if (node_from->inputs.first || node_from->typeinfo->draw_buttons || node_from->typeinfo->draw_buttons_ex)
node_from = NULL;
if (node_prev && node_prev->type == type && node_link_item_compare(node_prev, item)) {
@@ -586,13 +586,13 @@ static void ui_node_draw_node(uiLayout *layout, bContext *C, bNodeTree *ntree, b
RNA_pointer_create(&ntree->id, &RNA_Node, node, &nodeptr);
- if (node->typeinfo->uifunc) {
+ if (node->typeinfo->draw_buttons) {
if (node->type != NODE_GROUP) {
split = uiLayoutSplit(layout, 0.35f, FALSE);
col = uiLayoutColumn(split, FALSE);
col = uiLayoutColumn(split, FALSE);
- node->typeinfo->uifunc(col, C, &nodeptr);
+ node->typeinfo->draw_buttons(col, C, &nodeptr);
}
}
@@ -639,7 +639,7 @@ static void ui_node_draw_input(uiLayout *layout, bContext *C, bNodeTree *ntree,
if (depth > 0) {
uiBlockSetEmboss(block, UI_EMBOSSN);
- if (lnode && (lnode->inputs.first || (lnode->typeinfo->uifunc && lnode->type != NODE_GROUP))) {
+ if (lnode && (lnode->inputs.first || (lnode->typeinfo->draw_buttons && lnode->type != NODE_GROUP))) {
int icon = (input->flag & SOCK_COLLAPSED) ? ICON_DISCLOSURE_TRI_RIGHT : ICON_DISCLOSURE_TRI_DOWN;
uiItemR(row, &inputptr, "show_expanded", UI_ITEM_R_ICON_ONLY, "", icon);
}
diff --git a/source/blender/editors/space_node/node_view.c b/source/blender/editors/space_node/node_view.c
index 9e6e1e628f6..f889a8ec97b 100644
--- a/source/blender/editors/space_node/node_view.c
+++ b/source/blender/editors/space_node/node_view.c
@@ -66,7 +66,8 @@
/* **************** View All Operator ************** */
-int space_node_view_flag(bContext *C, SpaceNode *snode, ARegion *ar, const int node_flag)
+int space_node_view_flag(bContext *C, SpaceNode *snode, ARegion *ar,
+ const int node_flag, const int smooth_viewtx)
{
bNode *node;
rctf cur_new;
@@ -125,22 +126,23 @@ int space_node_view_flag(bContext *C, SpaceNode *snode, ARegion *ar, const int n
BLI_rctf_scale(&cur_new, 1.1f);
}
- UI_view2d_smooth_view(C, ar, &cur_new);
+ UI_view2d_smooth_view(C, ar, &cur_new, smooth_viewtx);
}
return (tot != 0);
}
-static int node_view_all_exec(bContext *C, wmOperator *UNUSED(op))
+static int node_view_all_exec(bContext *C, wmOperator *op)
{
ARegion *ar = CTX_wm_region(C);
SpaceNode *snode = CTX_wm_space_node(C);
+ const int smooth_viewtx = WM_operator_smooth_viewtx_get(op);
/* is this really needed? */
snode->xof = 0;
snode->yof = 0;
- if (space_node_view_flag(C, snode, ar, 0)) {
+ if (space_node_view_flag(C, snode, ar, 0, smooth_viewtx)) {
return OPERATOR_FINISHED;
}
else {
@@ -163,12 +165,13 @@ void NODE_OT_view_all(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
-static int node_view_selected_exec(bContext *C, wmOperator *UNUSED(op))
+static int node_view_selected_exec(bContext *C, wmOperator *op)
{
ARegion *ar = CTX_wm_region(C);
SpaceNode *snode = CTX_wm_space_node(C);
+ const int smooth_viewtx = WM_operator_smooth_viewtx_get(op);
- if (space_node_view_flag(C, snode, ar, NODE_SELECT)) {
+ if (space_node_view_flag(C, snode, ar, NODE_SELECT, smooth_viewtx)) {
return OPERATOR_FINISHED;
}
else {
@@ -327,6 +330,60 @@ void NODE_OT_backimage_zoom(wmOperatorType *ot)
RNA_def_float(ot->srna, "factor", 1.2f, 0.0f, 10.0f, "Factor", "", 0.0f, 10.0f);
}
+static int backimage_fit_exec(bContext *C, wmOperator *UNUSED(op))
+{
+ SpaceNode *snode = CTX_wm_space_node(C);
+ ARegion *ar = CTX_wm_region(C);
+
+ Image *ima;
+ ImBuf *ibuf;
+
+ const float pad = 32.0f;
+
+ void *lock;
+
+ float facx, facy;
+
+ ima = BKE_image_verify_viewer(IMA_TYPE_COMPOSITE, "Viewer Node");
+ ibuf = BKE_image_acquire_ibuf(ima, NULL, &lock);
+
+ if (ibuf == NULL) {
+ BKE_image_release_ibuf(ima, ibuf, lock);
+ return OPERATOR_CANCELLED;
+ }
+
+ facx = 1.0f * (ar->sizex - pad) / (ibuf->x * snode->zoom);
+ facy = 1.0f * (ar->sizey - pad) / (ibuf->y * snode->zoom);
+
+ BKE_image_release_ibuf(ima, ibuf, lock);
+
+ snode->zoom *= min_ff(facx, facy);
+
+ snode->xof = 0;
+ snode->yof = 0;
+
+ ED_region_tag_redraw(ar);
+
+ return OPERATOR_FINISHED;
+}
+
+void NODE_OT_backimage_fit(wmOperatorType *ot)
+{
+
+ /* identifiers */
+ ot->name = "Background Image Fit";
+ ot->idname = "NODE_OT_backimage_fit";
+ ot->description = "Fit the background image to the view";
+
+ /* api callbacks */
+ ot->exec = backimage_fit_exec;
+ ot->poll = composite_node_active;
+
+ /* flags */
+ ot->flag = OPTYPE_BLOCKING;
+
+}
+
/******************** sample backdrop operator ********************/
typedef struct ImageSampleInfo {
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index 922912fa540..6ae8a1f94b1 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -307,10 +307,12 @@ static SpaceLink *node_new(const bContext *UNUSED(C))
snode->zoom = 1.0f;
/* select the first tree type for valid type */
- NODE_TREE_TYPES_BEGIN(treetype)
+ NODE_TREE_TYPES_BEGIN (treetype)
+ {
strcpy(snode->tree_idname, treetype->idname);
break;
- NODE_TREE_TYPES_END
+ }
+ NODE_TREE_TYPES_END;
/* header */
ar = MEM_callocN(sizeof(ARegion), "header for node");
@@ -602,8 +604,14 @@ static void node_cursor(wmWindow *win, ScrArea *sa, ARegion *ar)
/* convert mouse coordinates to v2d space */
UI_view2d_region_to_view(&ar->v2d, win->eventstate->x - ar->winrct.xmin, win->eventstate->y - ar->winrct.ymin,
&snode->cursor[0], &snode->cursor[1]);
+
+ /* here snode->cursor is used to detect the node edge for sizing */
+ node_set_cursor(win, snode, snode->cursor);
- node_set_cursor(win, snode);
+ /* XXX snode->cursor is in placing new nodes space */
+ snode->cursor[0] /= UI_DPI_FAC;
+ snode->cursor[1] /= UI_DPI_FAC;
+
}
/* Initialize main area, setting handlers. */
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index 44d5672e7da..fda8c19d21b 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -363,6 +363,9 @@ void restrictbutton_gr_restrict_flag(void *poin, void *poin2, int flag)
if (group_restrict_flag(gr, flag)) {
for (gob = gr->gobject.first; gob; gob = gob->next) {
+ if (gob->ob->id.lib)
+ continue;
+
gob->ob->restrictflag &= ~flag;
if (flag == OB_RESTRICT_VIEW)
@@ -372,6 +375,9 @@ void restrictbutton_gr_restrict_flag(void *poin, void *poin2, int flag)
}
else {
for (gob = gr->gobject.first; gob; gob = gob->next) {
+ if (gob->ob->id.lib)
+ continue;
+
/* not in editmode */
if (scene->obedit != gob->ob) {
gob->ob->restrictflag |= flag;
@@ -565,7 +571,11 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar
}
if (tselem->type == 0 && te->idcode == ID_GR) {
int restrict_bool;
+ int but_flag = UI_BUT_DRAG_LOCK;
gr = (Group *)tselem->id;
+
+ if (gr->id.lib)
+ but_flag |= UI_BUT_DISABLED;
uiBlockSetEmboss(block, UI_EMBOSSN);
@@ -574,21 +584,21 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar
(int)(ar->v2d.cur.xmax - OL_TOG_RESTRICT_VIEWX), te->ys, UI_UNIT_X, UI_UNIT_Y,
NULL, 0, 0, 0, 0, TIP_("Restrict/Allow visibility in the 3D View"));
uiButSetFunc(bt, restrictbutton_gr_restrict_view, scene, gr);
- uiButSetFlag(bt, UI_BUT_DRAG_LOCK);
+ uiButSetFlag(bt, but_flag);
restrict_bool = group_restrict_flag(gr, OB_RESTRICT_SELECT);
bt = uiDefIconBut(block, ICONTOG, 0, restrict_bool ? ICON_RESTRICT_SELECT_ON : ICON_RESTRICT_SELECT_OFF,
(int)(ar->v2d.cur.xmax - OL_TOG_RESTRICT_SELECTX), te->ys, UI_UNIT_X, UI_UNIT_Y,
NULL, 0, 0, 0, 0, TIP_("Restrict/Allow selection in the 3D View"));
uiButSetFunc(bt, restrictbutton_gr_restrict_select, scene, gr);
- uiButSetFlag(bt, UI_BUT_DRAG_LOCK);
+ uiButSetFlag(bt, but_flag);
restrict_bool = group_restrict_flag(gr, OB_RESTRICT_RENDER);
bt = uiDefIconBut(block, ICONTOG, 0, restrict_bool ? ICON_RESTRICT_RENDER_ON : ICON_RESTRICT_RENDER_OFF,
(int)(ar->v2d.cur.xmax - OL_TOG_RESTRICT_RENDERX), te->ys, UI_UNIT_X, UI_UNIT_Y,
NULL, 0, 0, 0, 0, TIP_("Restrict/Allow renderability"));
uiButSetFunc(bt, restrictbutton_gr_restrict_render, scene, gr);
- uiButSetFlag(bt, UI_BUT_DRAG_LOCK);
+ uiButSetFlag(bt, but_flag);
uiBlockSetEmboss(block, UI_EMBOSS);
}
@@ -755,328 +765,37 @@ static void outliner_draw_rnabuts(uiBlock *block, Scene *scene, ARegion *ar, Spa
uiBlockSetEmboss(block, UI_EMBOSS);
}
-static void operator_call_cb(struct bContext *UNUSED(C), void *arg_kmi, void *arg2)
-{
- wmOperatorType *ot = arg2;
- wmKeyMapItem *kmi = arg_kmi;
-
- if (ot)
- BLI_strncpy(kmi->idname, ot->idname, OP_MAX_TYPENAME);
-}
-
-static void operator_search_cb(const struct bContext *UNUSED(C), void *UNUSED(arg_kmi),
- const char *str, uiSearchItems *items)
-{
- GHashIterator *iter = WM_operatortype_iter();
-
- for (; !BLI_ghashIterator_done(iter); BLI_ghashIterator_step(iter)) {
- wmOperatorType *ot = BLI_ghashIterator_getValue(iter);
-
- if (BLI_strcasestr(ot->idname, str)) {
- char name[OP_MAX_TYPENAME];
-
- /* display name for menu */
- WM_operator_py_idname(name, ot->idname);
-
- if (false == uiSearchItemAdd(items, name, ot, 0))
- break;
- }
- }
- BLI_ghashIterator_free(iter);
-}
-
-/* operator Search browse menu, open */
-static uiBlock *operator_search_menu(bContext *C, ARegion *ar, void *arg_kmi)
-{
- static char search[OP_MAX_TYPENAME];
- wmEvent event;
- wmWindow *win = CTX_wm_window(C);
- wmKeyMapItem *kmi = arg_kmi;
- wmOperatorType *ot = WM_operatortype_find(kmi->idname, 0);
- uiBlock *block;
- uiBut *but;
-
- /* clear initial search string, then all items show */
- search[0] = 0;
-
- block = uiBeginBlock(C, ar, "_popup", UI_EMBOSS);
- uiBlockSetFlag(block, UI_BLOCK_LOOP | UI_BLOCK_REDRAW | UI_BLOCK_SEARCH_MENU);
-
- /* fake button, it holds space for search items */
- uiDefBut(block, LABEL, 0, "", 10, 15, uiSearchBoxWidth(), uiSearchBoxHeight(), NULL, 0, 0, 0, 0, NULL);
-
- but = uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 0, 150, UI_UNIT_Y, 0, 0, "");
- uiButSetSearchFunc(but, operator_search_cb, arg_kmi, operator_call_cb, ot);
-
- uiBoundsBlock(block, 6);
- uiBlockSetDirection(block, UI_DOWN);
- uiEndBlock(C, block);
-
- wm_event_init_from_window(win, &event);
- event.type = EVT_BUT_OPEN;
- event.val = KM_PRESS;
- event.customdata = but;
- event.customdatafree = FALSE;
- wm_event_add(win, &event);
-
- return block;
-}
-
-#define OL_KM_KEYBOARD 0
-#define OL_KM_MOUSE 1
-#define OL_KM_TWEAK 2
-#define OL_KM_SPECIALS 3
-
-static short keymap_menu_type(short type)
-{
- if (ISKEYBOARD(type)) return OL_KM_KEYBOARD;
- if (ISTWEAK(type)) return OL_KM_TWEAK;
- if (ISMOUSE(type)) return OL_KM_MOUSE;
-// return OL_KM_SPECIALS;
- return 0;
-}
-
-static const char *keymap_type_menu(void)
-{
- static const char string[] =
- "Event Type%t"
- "|Keyboard%x" STRINGIFY(OL_KM_KEYBOARD)
- "|Mouse%x" STRINGIFY(OL_KM_MOUSE)
- "|Tweak%x" STRINGIFY(OL_KM_TWEAK)
-// "|Specials%x" STRINGIFY(OL_KM_SPECIALS)
- ;
-
- return string;
-}
-
-static const char *keymap_mouse_menu(void)
-{
- static const char string[] =
- "Mouse Event%t"
- "|Left Mouse%x" STRINGIFY(LEFTMOUSE)
- "|Middle Mouse%x" STRINGIFY(MIDDLEMOUSE)
- "|Right Mouse%x" STRINGIFY(RIGHTMOUSE)
- "|Middle Mouse%x" STRINGIFY(MIDDLEMOUSE)
- "|Right Mouse%x" STRINGIFY(RIGHTMOUSE)
- "|Button4 Mouse%x" STRINGIFY(BUTTON4MOUSE)
- "|Button5 Mouse%x" STRINGIFY(BUTTON5MOUSE)
- "|Action Mouse%x" STRINGIFY(ACTIONMOUSE)
- "|Select Mouse%x" STRINGIFY(SELECTMOUSE)
- "|Mouse Move%x" STRINGIFY(MOUSEMOVE)
- "|Wheel Up%x" STRINGIFY(WHEELUPMOUSE)
- "|Wheel Down%x" STRINGIFY(WHEELDOWNMOUSE)
- "|Wheel In%x" STRINGIFY(WHEELINMOUSE)
- "|Wheel Out%x" STRINGIFY(WHEELOUTMOUSE)
- "|Mouse/Trackpad Pan%x" STRINGIFY(MOUSEPAN)
- "|Mouse/Trackpad Zoom%x" STRINGIFY(MOUSEZOOM)
- "|Mouse/Trackpad Rotate%x" STRINGIFY(MOUSEROTATE)
- ;
-
- return string;
-}
-
-static const char *keymap_tweak_menu(void)
-{
- static const char string[] =
- "Tweak Event%t"
- "|Left Mouse%x" STRINGIFY(EVT_TWEAK_L)
- "|Middle Mouse%x" STRINGIFY(EVT_TWEAK_M)
- "|Right Mouse%x" STRINGIFY(EVT_TWEAK_R)
- "|Action Mouse%x" STRINGIFY(EVT_TWEAK_A)
- "|Select Mouse%x" STRINGIFY(EVT_TWEAK_S)
- ;
-
- return string;
-}
-
-static const char *keymap_tweak_dir_menu(void)
-{
- static const char string[] =
- "Tweak Direction%t"
- "|Any%x" STRINGIFY(KM_ANY)
- "|North%x" STRINGIFY(EVT_GESTURE_N)
- "|North-East%x" STRINGIFY(EVT_GESTURE_NE)
- "|East%x" STRINGIFY(EVT_GESTURE_E)
- "|Sout-East%x" STRINGIFY(EVT_GESTURE_SE)
- "|South%x" STRINGIFY(EVT_GESTURE_S)
- "|South-West%x" STRINGIFY(EVT_GESTURE_SW)
- "|West%x" STRINGIFY(EVT_GESTURE_W)
- "|North-West%x" STRINGIFY(EVT_GESTURE_NW)
- ;
-
- return string;
-}
-
-
-static void keymap_type_cb(bContext *C, void *kmi_v, void *UNUSED(arg_v))
-{
- wmKeyMapItem *kmi = kmi_v;
- short maptype = keymap_menu_type(kmi->type);
-
- if (maptype != kmi->maptype) {
- switch (kmi->maptype) {
- case OL_KM_KEYBOARD:
- kmi->type = AKEY;
- kmi->val = KM_PRESS;
- break;
- case OL_KM_MOUSE:
- kmi->type = LEFTMOUSE;
- kmi->val = KM_PRESS;
- break;
- case OL_KM_TWEAK:
- kmi->type = EVT_TWEAK_L;
- kmi->val = KM_ANY;
- break;
- case OL_KM_SPECIALS:
- kmi->type = AKEY;
- kmi->val = KM_PRESS;
- break;
- }
- ED_region_tag_redraw(CTX_wm_region(C));
- }
-}
-
-static void outliner_draw_keymapbuts(uiBlock *block, ARegion *ar, SpaceOops *soops, ListBase *lb)
+static void outliner_buttons(const bContext *C, uiBlock *block, ARegion *ar, TreeElement *te)
{
- TreeElement *te;
+ uiBut *bt;
TreeStoreElem *tselem;
-
- uiBlockSetEmboss(block, UI_EMBOSST);
-
- for (te = lb->first; te; te = te->next) {
- tselem = TREESTORE(te);
- if (te->ys + 2 * UI_UNIT_Y >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) {
- uiBut *but;
- const char *str;
- int xstart = 240;
- int butw1 = UI_UNIT_X; /* operator */
- int butw2 = 90; /* event type, menus */
- int butw3 = 43; /* modifiers */
-
- if (tselem->type == TSE_KEYMAP_ITEM) {
- wmKeyMapItem *kmi = te->directdata;
-
- /* modal map? */
- if (kmi->propvalue) {
- /* pass */
- }
- else {
- uiDefBlockBut(block, operator_search_menu, kmi, "", xstart, te->ys + 1, butw1, UI_UNIT_Y - 1,
- TIP_("Assign new Operator"));
- }
- xstart += butw1 + 10;
-
- /* map type button */
- kmi->maptype = keymap_menu_type(kmi->type);
-
- str = keymap_type_menu();
- but = uiDefButS(block, MENU, 0, str, xstart, te->ys + 1, butw2, UI_UNIT_Y - 1, &kmi->maptype,
- 0, 0, 0, 0, TIP_("Event type"));
- uiButSetFunc(but, keymap_type_cb, kmi, NULL);
- xstart += butw2 + 5;
-
- /* edit actual event */
- switch (kmi->maptype) {
- case OL_KM_KEYBOARD:
- uiDefKeyevtButS(block, 0, "", xstart, te->ys + 1, butw2, UI_UNIT_Y - 1, &kmi->type,
- TIP_("Key code"));
- xstart += butw2 + 5;
- break;
- case OL_KM_MOUSE:
- str = keymap_mouse_menu();
- uiDefButS(block, MENU, 0, str, xstart, te->ys + 1, butw2, UI_UNIT_Y - 1, &kmi->type,
- 0, 0, 0, 0, TIP_("Mouse button"));
- xstart += butw2 + 5;
- break;
- case OL_KM_TWEAK:
- str = keymap_tweak_menu();
- uiDefButS(block, MENU, 0, str, xstart, te->ys + 1, butw2, UI_UNIT_Y - 1, &kmi->type,
- 0, 0, 0, 0, TIP_("Tweak gesture"));
- xstart += butw2 + 5;
- str = keymap_tweak_dir_menu();
- uiDefButS(block, MENU, 0, str, xstart, te->ys + 1, butw2, UI_UNIT_Y - 1, &kmi->val,
- 0, 0, 0, 0, TIP_("Tweak gesture direction"));
- xstart += butw2 + 5;
- break;
- }
-
- /* modifiers */
- uiDefButS(block, OPTION, 0, IFACE_("Shift"), xstart, te->ys + 1, butw3 + 5, UI_UNIT_Y - 1,
- &kmi->shift, 0, 0, 0, 0, TIP_("Modifier"));
- xstart += butw3 + 5;
- uiDefButS(block, OPTION, 0, IFACE_("Ctrl"), xstart, te->ys + 1, butw3, UI_UNIT_Y - 1, &kmi->ctrl,
- 0, 0, 0, 0, TIP_("Modifier"));
- xstart += butw3;
- uiDefButS(block, OPTION, 0, IFACE_("Alt"), xstart, te->ys + 1, butw3, UI_UNIT_Y - 1, &kmi->alt,
- 0, 0, 0, 0, TIP_("Modifier"));
- xstart += butw3;
- uiDefButS(block, OPTION, 0, IFACE_("OS"), xstart, te->ys + 1, butw3, UI_UNIT_Y - 1, &kmi->oskey,
- 0, 0, 0, 0, TIP_("Modifier"));
- xstart += butw3 + 5;
- uiDefKeyevtButS(block, 0, "", xstart, te->ys + 1, butw3, UI_UNIT_Y - 1, &kmi->keymodifier,
- TIP_("Key Modifier code"));
- xstart += butw3 + 5;
-
- /* rna property */
- if (kmi->ptr && kmi->ptr->data) {
- uiDefBut(block, LABEL, 0, IFACE_("(RNA property)"), xstart, te->ys + 1, butw2, UI_UNIT_Y - 1,
- NULL, 0, 0, 0, 0, "");
- xstart += butw2;
- }
+ int spx, dx, len;
- (void)xstart;
- }
- }
-
- if (TSELEM_OPEN(tselem, soops)) outliner_draw_keymapbuts(block, ar, soops, &te->subtree);
- }
+ tselem = TREESTORE(te);
- uiBlockSetEmboss(block, UI_EMBOSS);
-}
+ BLI_assert(tselem->flag & TSE_TEXTBUT);
+ /* If we add support to rename Sequence.
+ * need change this.
+ */
+ if (tselem->type == TSE_EBONE) len = sizeof(((EditBone *) 0)->name);
+ else if (tselem->type == TSE_MODIFIER) len = sizeof(((ModifierData *) 0)->name);
+ else if (tselem->id && GS(tselem->id->name) == ID_LI) len = sizeof(((Library *) 0)->name);
+ else len = MAX_ID_NAME - 2;
-static void outliner_buttons(const bContext *C, uiBlock *block, ARegion *ar, SpaceOops *soops, ListBase *lb)
-{
- uiBut *bt;
- TreeElement *te;
- TreeStoreElem *tselem;
- int spx, dx, len;
-
- for (te = lb->first; te; te = te->next) {
- tselem = TREESTORE(te);
- if (te->ys + 2 * UI_UNIT_Y >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) {
-
- if (tselem->flag & TSE_TEXTBUT) {
-
- /* If we add support to rename Sequence.
- * need change this.
- */
- // prevent crash when trying to rename 'pose' entry of armature
- if (tselem->type == TSE_POSE_BASE) continue;
-
- if (tselem->type == TSE_EBONE) len = sizeof(((EditBone *) 0)->name);
- else if (tselem->type == TSE_MODIFIER) len = sizeof(((ModifierData *) 0)->name);
- else if (tselem->id && GS(tselem->id->name) == ID_LI) len = sizeof(((Library *) 0)->name);
- else len = MAX_ID_NAME - 2;
-
+ spx = te->xs + 1.8f * UI_UNIT_X;
+ dx = ar->v2d.cur.xmax - (spx + 3.2f * UI_UNIT_X);
- dx = (int)UI_GetStringWidth(te->name);
- if (dx < 5 * UI_UNIT_X) dx = 5 * UI_UNIT_X;
- spx = te->xs + 1.8f * UI_UNIT_X;
- if (spx + dx + 0.5f * UI_UNIT_X > ar->v2d.cur.xmax) dx = ar->v2d.cur.xmax - spx - 0.5f * UI_UNIT_X;
+ bt = uiDefBut(block, TEX, OL_NAMEBUTTON, "", spx, te->ys, dx, UI_UNIT_Y - 1, (void *)te->name,
+ 1.0, (float)len, 0, 0, "");
+ uiButSetRenameFunc(bt, namebutton_cb, tselem);
- bt = uiDefBut(block, TEX, OL_NAMEBUTTON, "", spx, te->ys, dx + UI_UNIT_X, UI_UNIT_Y - 1, (void *)te->name,
- 1.0, (float)len, 0, 0, "");
- uiButSetRenameFunc(bt, namebutton_cb, tselem);
-
- /* returns false if button got removed */
- if (false == uiButActiveOnly(C, ar, block, bt)) {
- tselem->flag &= ~TSE_TEXTBUT;
- }
- }
- }
-
- if (TSELEM_OPEN(tselem, soops)) outliner_buttons(C, block, ar, soops, &te->subtree);
+ /* returns false if button got removed */
+ if (false == uiButActiveOnly(C, ar, block, bt)) {
+ tselem->flag &= ~TSE_TEXTBUT;
+
+ /* bad! (notifier within draw) without this, we don't get a refesh */
+ WM_event_add_notifier(C, NC_SPACE | ND_SPACE_OUTLINER, NULL);
}
}
@@ -1389,6 +1108,8 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto
tselem_draw_icon_uibut(&arg, ICON_GROUP); break;
case ID_LI:
tselem_draw_icon_uibut(&arg, ICON_LIBRARY_DATA_DIRECT); break;
+ case ID_LS:
+ tselem_draw_icon_uibut(&arg, ICON_BRUSH_DATA); break; /* FIXME proper icon */
}
}
}
@@ -1472,7 +1193,7 @@ static void outliner_set_coord_tree_element(SpaceOops *soops, TreeElement *te, i
static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene, ARegion *ar, SpaceOops *soops,
- TreeElement *te, int startx, int *starty)
+ TreeElement *te, int startx, int *starty, TreeElement **te_edit)
{
TreeElement *ten;
TreeStoreElem *tselem;
@@ -1485,6 +1206,10 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene
int xmax = ar->v2d.cur.xmax;
unsigned char alpha = 128;
+ if ((tselem->flag & TSE_TEXTBUT) && (*te_edit == NULL)) {
+ *te_edit = te;
+ }
+
/* icons can be ui buts, we don't want it to overlap with restrict */
if ((soops->flag & SO_HIDE_RESTRICTCOLS) == 0)
xmax -= OL_TOGW + UI_UNIT_X;
@@ -1665,7 +1390,7 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene
*starty -= UI_UNIT_Y;
for (ten = te->subtree.first; ten; ten = ten->next)
- outliner_draw_tree_element(C, block, scene, ar, soops, ten, startx + UI_UNIT_X, starty);
+ outliner_draw_tree_element(C, block, scene, ar, soops, ten, startx + UI_UNIT_X, starty, te_edit);
}
else {
for (ten = te->subtree.first; ten; ten = ten->next)
@@ -1749,7 +1474,8 @@ static void outliner_draw_selection(ARegion *ar, SpaceOops *soops, ListBase *lb,
}
-static void outliner_draw_tree(bContext *C, uiBlock *block, Scene *scene, ARegion *ar, SpaceOops *soops)
+static void outliner_draw_tree(bContext *C, uiBlock *block, Scene *scene, ARegion *ar,
+ SpaceOops *soops, TreeElement **te_edit)
{
TreeElement *te;
int starty, startx;
@@ -1781,7 +1507,7 @@ static void outliner_draw_tree(bContext *C, uiBlock *block, Scene *scene, ARegio
starty = (int)ar->v2d.tot.ymax - UI_UNIT_Y - OL_Y_OFFSET;
startx = 0;
for (te = soops->tree.first; te; te = te->next) {
- outliner_draw_tree_element(C, block, scene, ar, soops, te, startx, &starty);
+ outliner_draw_tree_element(C, block, scene, ar, soops, te, startx, &starty, te_edit);
}
}
@@ -1851,13 +1577,14 @@ void draw_outliner(const bContext *C)
SpaceOops *soops = CTX_wm_space_outliner(C);
uiBlock *block;
int sizey = 0, sizex = 0, sizex_rna = 0;
+ TreeElement *te_edit = NULL;
outliner_build_tree(mainvar, scene, soops); // always
/* get extents of data */
outliner_height(soops, &soops->tree, &sizey);
- if (ELEM3(soops->outlinevis, SO_DATABLOCKS, SO_USERDEF, SO_KEYMAP)) {
+ if (ELEM(soops->outlinevis, SO_DATABLOCKS, SO_USERDEF)) {
/* RNA has two columns:
* - column 1 is (max_width + OL_RNA_COL_SPACEX) or
* (OL_RNA_COL_X), whichever is wider...
@@ -1871,11 +1598,7 @@ void draw_outliner(const bContext *C)
sizex_rna = max_ii(OL_RNA_COLX, sizex_rna + OL_RNA_COL_SPACEX);
/* get width of data (for setting 'tot' rect, this is column 1 + column 2 + a bit extra) */
- if (soops->outlinevis == SO_KEYMAP)
- // XXX this is only really a quick hack to make this wide enough...
- sizex = sizex_rna + OL_RNA_COL_SIZEX * 3 + 50;
- else
- sizex = sizex_rna + OL_RNA_COL_SIZEX + 50;
+ sizex = sizex_rna + OL_RNA_COL_SIZEX + 50;
}
else {
/* width must take into account restriction columns (if visible) so that entries will still be visible */
@@ -1904,16 +1627,13 @@ void draw_outliner(const bContext *C)
/* draw outliner stuff (background, hierachy lines and names) */
outliner_back(ar);
block = uiBeginBlock(C, ar, __func__, UI_EMBOSS);
- outliner_draw_tree((bContext *)C, block, scene, ar, soops);
+ outliner_draw_tree((bContext *)C, block, scene, ar, soops, &te_edit);
if (ELEM(soops->outlinevis, SO_DATABLOCKS, SO_USERDEF)) {
/* draw rna buttons */
outliner_draw_rnacols(ar, sizex_rna);
outliner_draw_rnabuts(block, scene, ar, soops, sizex_rna, &soops->tree);
}
- else if (soops->outlinevis == SO_KEYMAP) {
- outliner_draw_keymapbuts(block, ar, soops, &soops->tree);
- }
else if (!(soops->flag & SO_HIDE_RESTRICTCOLS)) {
/* draw restriction columns */
outliner_draw_restrictcols(ar);
@@ -1921,7 +1641,9 @@ void draw_outliner(const bContext *C)
}
/* draw edit buttons if nessecery */
- outliner_buttons(C, block, ar, soops, &soops->tree);
+ if (te_edit) {
+ outliner_buttons(C, block, ar, te_edit);
+ }
uiEndBlock(C, block);
uiDrawBlock(C, block);
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c
index 1e9b681197c..559fb6f932e 100644
--- a/source/blender/editors/space_outliner/outliner_edit.c
+++ b/source/blender/editors/space_outliner/outliner_edit.c
@@ -227,7 +227,7 @@ static void do_item_rename(ARegion *ar, TreeElement *te, TreeStoreElem *tselem,
BKE_report(reports, RPT_WARNING, "Cannot edit sequence name");
}
else if (tselem->id->lib) {
- // XXX error_libdata();
+ BKE_report(reports, RPT_WARNING, "Cannot edit external libdata");
}
else if (te->idcode == ID_LI && te->parent) {
BKE_report(reports, RPT_WARNING, "Cannot edit the path of an indirectly linked library");
@@ -1102,7 +1102,7 @@ static void tree_element_to_path(TreeElement *te, TreeStoreElem *tselem,
/* item is part of an array, so must set the array_index */
*array_index = te->index;
}
- else if (RNA_property_array_length(ptr, prop)) {
+ else if (RNA_property_array_check(prop)) {
/* entire array was selected, so keyframe all */
*flag |= KSP_FLAG_WHOLE_ARRAY;
}
@@ -1469,7 +1469,7 @@ static int parent_drop_exec(bContext *C, wmOperator *op)
RNA_string_get(op->ptr, "child", childname);
ob = (Object *)BKE_libblock_find_name(ID_OB, childname);
- ED_object_parent_set(op->reports, bmain, scene, ob, par, partype, FALSE, FALSE);
+ ED_object_parent_set(op->reports, bmain, scene, ob, par, partype, false, false, NULL);
DAG_relations_tag_update(bmain);
WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
@@ -1525,7 +1525,7 @@ static int parent_drop_invoke(bContext *C, wmOperator *op, const wmEvent *event)
}
if ((par->type != OB_ARMATURE) && (par->type != OB_CURVE) && (par->type != OB_LATTICE)) {
- if (ED_object_parent_set(op->reports, bmain, scene, ob, par, partype, FALSE, FALSE)) {
+ if (ED_object_parent_set(op->reports, bmain, scene, ob, par, partype, false, false, NULL)) {
DAG_relations_tag_update(bmain);
WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
WM_event_add_notifier(C, NC_OBJECT | ND_PARENT, NULL);
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c
index 41ad75bb14f..d1d512409ee 100644
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@ -902,7 +902,7 @@ int outliner_item_do_activate(bContext *C, int x, int y, bool extend, bool recur
UI_view2d_region_to_view(&ar->v2d, x, y, fmval, fmval + 1);
- if (!ELEM3(soops->outlinevis, SO_DATABLOCKS, SO_USERDEF, SO_KEYMAP) &&
+ if (!ELEM(soops->outlinevis, SO_DATABLOCKS, SO_USERDEF) &&
!(soops->flag & SO_HIDE_RESTRICTCOLS) &&
(fmval[0] > ar->v2d.cur.xmax - OL_TOG_RESTRICT_VIEWX))
{
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c
index c1950e62817..a0af9340fe2 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -57,6 +57,7 @@
#include "BKE_report.h"
#include "BKE_scene.h"
#include "BKE_sequencer.h"
+#include "BKE_treehash.h"
#include "ED_armature.h"
#include "ED_object.h"
@@ -113,7 +114,7 @@ static void set_operation_types(SpaceOops *soops, ListBase *lb,
case ID_LA: case ID_AR: case ID_CA: case ID_SPK:
case ID_MA: case ID_TE: case ID_IP: case ID_IM:
case ID_SO: case ID_KE: case ID_WO: case ID_AC:
- case ID_NLA: case ID_TXT: case ID_GR:
+ case ID_NLA: case ID_TXT: case ID_GR: case ID_LS:
if (*idlevel == 0) *idlevel = idcode;
else if (*idlevel != idcode) *idlevel = -1;
break;
@@ -299,17 +300,13 @@ static void object_delete_cb(bContext *C, Scene *scene, TreeElement *te,
if (base == NULL)
base = BKE_scene_base_find(scene, (Object *)tselem->id);
if (base) {
- SpaceOops *soops = CTX_wm_space_outliner(C);
-
// check also library later
if (scene->obedit == base->object)
ED_object_editmode_exit(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR | EM_DO_UNDO);
ED_base_object_free_and_unlink(CTX_data_main(C), scene, base);
te->directdata = NULL;
- BLI_ghash_remove(soops->treehash, tselem, NULL, NULL);
tselem->id = NULL;
- BLI_ghash_insert(soops->treehash, tselem, tselem);
}
}
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index 514bfc43ac7..036db3bae91 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -32,15 +32,6 @@
#include <math.h>
#include <string.h>
-#if defined WIN32 && !defined _LIBC || defined __sun
-# include "BLI_fnmatch.h" /* use fnmatch included in blenlib */
-#else
-# ifndef _GNU_SOURCE
-# define _GNU_SOURCE
-# endif
-# include <fnmatch.h>
-#endif
-
#include "MEM_guardedalloc.h"
#include "DNA_anim_types.h"
@@ -59,12 +50,14 @@
#include "DNA_sequence_types.h"
#include "DNA_speaker_types.h"
#include "DNA_object_types.h"
+#include "DNA_linestyle_types.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "BLI_math.h"
#include "BLI_ghash.h"
#include "BLI_mempool.h"
+#include "BLI_fnmatch.h"
#include "BLF_translation.h"
@@ -74,6 +67,7 @@
#include "BKE_modifier.h"
#include "BKE_sequencer.h"
#include "BKE_idcode.h"
+#include "BKE_treehash.h"
#include "ED_armature.h"
#include "ED_screen.h"
@@ -116,9 +110,8 @@ static void outliner_storage_cleanup(SpaceOops *soops)
if (BLI_mempool_count(ts) == unused) {
BLI_mempool_destroy(ts);
soops->treestore = NULL;
-
if (soops->treehash) {
- BLI_ghash_free(soops->treehash, NULL, NULL);
+ BKE_treehash_free(soops->treehash);
soops->treehash = NULL;
}
}
@@ -135,14 +128,9 @@ static void outliner_storage_cleanup(SpaceOops *soops)
}
BLI_mempool_destroy(ts);
soops->treestore = new_ts;
-
if (soops->treehash) {
/* update hash table to fix broken pointers */
- BLI_ghash_clear(soops->treehash, NULL, NULL);
- BLI_mempool_iternew(soops->treestore, &iter);
- while ((tselem = BLI_mempool_iterstep(&iter))) {
- BLI_ghash_insert(soops->treehash, tselem, tselem);
- }
+ BKE_treehash_rebuild_from_treestore(soops->treehash, soops->treestore);
}
}
}
@@ -150,53 +138,23 @@ static void outliner_storage_cleanup(SpaceOops *soops)
}
}
-static unsigned int tse_hash(const void *ptr)
-{
- const TreeStoreElem *tse = (const TreeStoreElem *)ptr;
- unsigned int hash;
- BLI_assert(tse->type || !tse->nr);
- hash = BLI_ghashutil_inthash(SET_INT_IN_POINTER((tse->nr << 16) + tse->type));
- hash ^= BLI_ghashutil_inthash(tse->id);
- return hash;
-}
-
-static int tse_cmp(const void *a, const void *b)
-{
- const TreeStoreElem *tse_a = (const TreeStoreElem *)a;
- const TreeStoreElem *tse_b = (const TreeStoreElem *)b;
- return tse_a->type != tse_b->type || tse_a->nr != tse_b->nr || tse_a->id != tse_b->id;
-}
-
static void check_persistent(SpaceOops *soops, TreeElement *te, ID *id, short type, short nr)
{
- /* When treestore comes directly from readfile.c, treehash is empty;
- * In this case we don't want to get TSE_CLOSED while adding elements one by one,
- * that is why this function restores treehash */
- bool restore_treehash = (soops->treestore && !soops->treehash);
- TreeStoreElem *tselem, elem_template;
+ TreeStoreElem *tselem;
if (soops->treestore == NULL) {
/* if treestore was not created in readfile.c, create it here */
soops->treestore = BLI_mempool_create(sizeof(TreeStoreElem), 1, 512, BLI_MEMPOOL_ALLOW_ITER);
+
}
if (soops->treehash == NULL) {
- soops->treehash = BLI_ghash_new(tse_hash, tse_cmp, "treehash");
- }
-
- if (restore_treehash) {
- BLI_mempool_iter iter;
- BLI_mempool_iternew(soops->treestore, &iter);
- while ((tselem = BLI_mempool_iterstep(&iter))) {
- BLI_ghash_insert(soops->treehash, tselem, tselem);
- }
+ soops->treehash = BKE_treehash_create_from_treestore(soops->treestore);
}
- /* check if 'te' is in treestore */
- elem_template.type = type;
- elem_template.nr = type ? nr : 0; // we're picky! :)
- elem_template.id = id;
- tselem = BLI_ghash_lookup(soops->treehash, &elem_template);
- if (tselem && !tselem->used) {
+ /* find any unused tree element in treestore and mark it as used
+ * (note that there may be multiple unused elements in case of linked objects) */
+ tselem = BKE_treehash_lookup_unused(soops->treehash, type, nr, id);
+ if (tselem) {
te->store_elem = tselem;
tselem->used = 1;
return;
@@ -210,7 +168,7 @@ static void check_persistent(SpaceOops *soops, TreeElement *te, ID *id, short ty
tselem->used = 0;
tselem->flag = TSE_CLOSED;
te->store_elem = tselem;
- BLI_ghash_insert(soops->treehash, tselem, tselem);
+ BKE_treehash_add_element(soops->treehash, tselem);
}
/* ********************************************************* */
@@ -250,16 +208,12 @@ static TreeElement *outliner_find_tree_element(ListBase *lb, TreeStoreElem *stor
/* tse is not in the treestore, we use its contents to find a match */
TreeElement *outliner_find_tse(SpaceOops *soops, TreeStoreElem *tse)
{
- GHash *th = soops->treehash;
- TreeStoreElem *tselem, tselem_template;
+ TreeStoreElem *tselem;
if (tse->id == NULL) return NULL;
/* check if 'tse' is in treestore */
- tselem_template.id = tse->id;
- tselem_template.type = tse->type;
- tselem_template.nr = tse->type ? tse->nr : 0;
- tselem = BLI_ghash_lookup(th, &tselem_template);
+ tselem = BKE_treehash_lookup_any(soops->treehash, tse->type, tse->nr, tse->id);
if (tselem)
return outliner_find_tree_element(&soops->tree, tselem);
@@ -423,6 +377,32 @@ static bool outliner_animdata_test(AnimData *adt)
return false;
}
+static void outliner_add_line_styles(SpaceOops *soops, ListBase *lb, Scene *sce, TreeElement *te)
+{
+ SceneRenderLayer *srl;
+ FreestyleLineSet *lineset;
+
+ for (srl = sce->r.layers.first; srl; srl = srl->next) {
+ for (lineset = srl->freestyleConfig.linesets.first; lineset; lineset = lineset->next) {
+ FreestyleLineStyle *linestyle = lineset->linestyle;
+ if (linestyle) {
+ linestyle->id.flag |= LIB_DOIT;
+ }
+ }
+ }
+ for (srl = sce->r.layers.first; srl; srl = srl->next) {
+ for (lineset = srl->freestyleConfig.linesets.first; lineset; lineset = lineset->next) {
+ FreestyleLineStyle *linestyle = lineset->linestyle;
+ if (linestyle) {
+ if (!(linestyle->id.flag & LIB_DOIT))
+ continue;
+ linestyle->id.flag &= ~LIB_DOIT;
+ outliner_add_element(soops, lb, linestyle, te, 0, 0);
+ }
+ }
+ }
+}
+
static void outliner_add_scene_contents(SpaceOops *soops, ListBase *lb, Scene *sce, TreeElement *te)
{
SceneRenderLayer *srl;
@@ -448,6 +428,9 @@ static void outliner_add_scene_contents(SpaceOops *soops, ListBase *lb, Scene *s
outliner_add_element(soops, lb, sce, te, TSE_ANIM_DATA, 0);
outliner_add_element(soops, lb, sce->world, te, 0, 0);
+
+ if (STREQ(sce->r.engine, "BLENDER_RENDER") && (sce->r.mode & R_EDGE_FRS))
+ outliner_add_line_styles(soops, lb, sce, te);
}
// can be inlined if necessary
@@ -806,6 +789,14 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor
}
break;
}
+ case ID_LS:
+ {
+ FreestyleLineStyle *linestyle = (FreestyleLineStyle *)id;
+
+ if (outliner_animdata_test(linestyle->adt))
+ outliner_add_element(soops, &te->subtree, linestyle, te, TSE_ANIM_DATA, 0);
+ break;
+ }
}
}
@@ -1685,14 +1676,6 @@ void outliner_build_tree(Main *mainvar, Scene *scene, SpaceOops *soops)
tselem->flag &= ~TSE_CLOSED;
}
}
- else if (soops->outlinevis == SO_KEYMAP) {
- wmWindowManager *wm = mainvar->wm.first;
- wmKeyMap *km;
-
- for (km = wm->defaultconf->keymaps.first; km; km = km->next) {
- /* ten = */ outliner_add_element(soops, &soops->tree, (void *)km, NULL, TSE_KEYMAP, 0);
- }
- }
else {
ten = outliner_add_element(soops, &soops->tree, OBACT, NULL, 0, 0);
if (ten) ten->directdata = BASACT;
diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c
index 874852ee320..d695ffa46d5 100644
--- a/source/blender/editors/space_outliner/space_outliner.c
+++ b/source/blender/editors/space_outliner/space_outliner.c
@@ -43,6 +43,7 @@
#include "BKE_context.h"
#include "BKE_screen.h"
#include "BKE_scene.h"
+#include "BKE_treehash.h"
#include "ED_space_api.h"
#include "ED_screen.h"
@@ -435,7 +436,7 @@ static void outliner_free(SpaceLink *sl)
BLI_mempool_destroy(soutliner->treestore);
}
if (soutliner->treehash) {
- BLI_ghash_free(soutliner->treehash, NULL, NULL);
+ BKE_treehash_free(soutliner->treehash);
}
}
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 68fd09f5fb7..cb69a7fe654 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -926,13 +926,13 @@ void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq
/* stop all running jobs, except screen one. currently previews frustrate Render
* needed to make so sequencer's rendering doesn't conflict with compositor
*/
- WM_jobs_kill_type(CTX_wm_manager(C), WM_JOB_TYPE_COMPOSITE);
+ WM_jobs_kill_type(CTX_wm_manager(C), NULL, WM_JOB_TYPE_COMPOSITE);
if ((scene->r.seq_flag & R_SEQ_GL_PREV) == 0) {
/* in case of final rendering used for preview, kill all previews,
* otherwise threading conflict will happen in rendering module
*/
- WM_jobs_kill_type(CTX_wm_manager(C), WM_JOB_TYPE_RENDER_PREVIEW);
+ WM_jobs_kill_type(CTX_wm_manager(C), NULL, WM_JOB_TYPE_RENDER_PREVIEW);
}
}
@@ -1086,10 +1086,10 @@ void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq
type = GL_FLOAT;
if (ibuf->float_colorspace) {
- glsl_used = IMB_colormanagement_setup_glsl_draw_from_space_ctx(C, ibuf->float_colorspace, TRUE);
+ glsl_used = IMB_colormanagement_setup_glsl_draw_from_space_ctx(C, ibuf->float_colorspace, true);
}
else {
- glsl_used = IMB_colormanagement_setup_glsl_draw_ctx(C, TRUE);
+ glsl_used = IMB_colormanagement_setup_glsl_draw_ctx(C, true);
}
}
else if (ibuf->rect) {
@@ -1097,7 +1097,7 @@ void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq
format = GL_RGBA;
type = GL_UNSIGNED_BYTE;
- glsl_used = IMB_colormanagement_setup_glsl_draw_from_space_ctx(C, ibuf->rect_colorspace, FALSE);
+ glsl_used = IMB_colormanagement_setup_glsl_draw_from_space_ctx(C, ibuf->rect_colorspace, false);
}
else {
format = GL_RGBA;
@@ -1251,7 +1251,7 @@ void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq
height = (scene->r.size * scene->r.ysch) / 100;
ED_mask_draw_region(mask, ar,
- 0, 0, /* TODO */
+ 0, 0, 0, /* TODO */
width, height,
aspx, aspy,
FALSE, TRUE,
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index 955a9c78c56..8b2e7067eb9 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -2155,12 +2155,13 @@ void SEQUENCER_OT_meta_separate(wmOperatorType *ot)
}
/* view_all operator */
-static int sequencer_view_all_exec(bContext *C, wmOperator *UNUSED(op))
+static int sequencer_view_all_exec(bContext *C, wmOperator *op)
{
ARegion *ar = CTX_wm_region(C);
View2D *v2d = UI_view2d_fromcontext(C);
+ const int smooth_viewtx = WM_operator_smooth_viewtx_get(op);
- UI_view2d_smooth_view(C, ar, &v2d->tot);
+ UI_view2d_smooth_view(C, ar, &v2d->tot, smooth_viewtx);
return OPERATOR_FINISHED;
}
@@ -2322,7 +2323,7 @@ void SEQUENCER_OT_view_toggle(wmOperatorType *ot)
/* view_selected operator */
-static int sequencer_view_selected_exec(bContext *C, wmOperator *UNUSED(op))
+static int sequencer_view_selected_exec(bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
View2D *v2d = UI_view2d_fromcontext(C);
@@ -2355,6 +2356,7 @@ static int sequencer_view_selected_exec(bContext *C, wmOperator *UNUSED(op))
}
if (ymax != 0) {
+ const int smooth_viewtx = WM_operator_smooth_viewtx_get(op);
xmax += xmargin;
xmin -= xmargin;
@@ -2377,7 +2379,7 @@ static int sequencer_view_selected_exec(bContext *C, wmOperator *UNUSED(op))
cur_new.ymax = ymid + (orig_height / 2);
}
- UI_view2d_smooth_view(C, ar, &cur_new);
+ UI_view2d_smooth_view(C, ar, &cur_new, smooth_viewtx);
return OPERATOR_FINISHED;
}
@@ -2958,7 +2960,7 @@ void SEQUENCER_OT_view_ghost_border(wmOperatorType *ot)
/* identifiers */
ot->name = "Border Offset View";
ot->idname = "SEQUENCER_OT_view_ghost_border";
- ot->description = "Enable border select mode";
+ ot->description = "Set the boundaries of the border used for offset-view";
/* api callbacks */
ot->invoke = WM_border_select_invoke;
diff --git a/source/blender/editors/space_sequencer/sequencer_modifier.c b/source/blender/editors/space_sequencer/sequencer_modifier.c
index 51df21e509a..c8fd6e4b6ea 100644
--- a/source/blender/editors/space_sequencer/sequencer_modifier.c
+++ b/source/blender/editors/space_sequencer/sequencer_modifier.c
@@ -99,7 +99,7 @@ void SEQUENCER_OT_strip_modifier_add(wmOperatorType *ot)
/* identifiers */
ot->name = "Add Strip Modifier";
ot->idname = "SEQUENCER_OT_strip_modifier_add";
- ot->description = "Add a modifier to strip";
+ ot->description = "Add a modifier to the strip";
/* api callbacks */
ot->exec = strip_modifier_add_exec;
@@ -142,7 +142,7 @@ void SEQUENCER_OT_strip_modifier_remove(wmOperatorType *ot)
/* identifiers */
ot->name = "Remove Strip Modifier";
ot->idname = "SEQUENCER_OT_strip_modifier_remove";
- ot->description = "Add a modifier to strip";
+ ot->description = "Remove a modifier from the strip";
/* api callbacks */
ot->exec = strip_modifier_remove_exec;
diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c
index 254d15341cd..45f05d56076 100644
--- a/source/blender/editors/space_sequencer/sequencer_select.c
+++ b/source/blender/editors/space_sequencer/sequencer_select.c
@@ -892,7 +892,7 @@ void SEQUENCER_OT_select_border(wmOperatorType *ot)
/* identifiers */
ot->name = "Border Select";
ot->idname = "SEQUENCER_OT_select_border";
- ot->description = "Enable border select mode";
+ ot->description = "Select strips using border selection";
/* api callbacks */
ot->invoke = WM_border_select_invoke;
diff --git a/source/blender/editors/space_sequencer/sequencer_view.c b/source/blender/editors/space_sequencer/sequencer_view.c
index 68428cd890f..deb37f8d943 100644
--- a/source/blender/editors/space_sequencer/sequencer_view.c
+++ b/source/blender/editors/space_sequencer/sequencer_view.c
@@ -152,7 +152,8 @@ static void sample_apply(bContext *C, wmOperator *op, const wmEvent *event)
info->colfp = info->colf;
/* sequencer's image buffers are in non-linear space, need to make them linear */
- BKE_sequencer_pixel_from_sequencer_space_v4(scene, info->colf);
+ copy_v4_v4(info->linearcol, info->colf);
+ BKE_sequencer_pixel_from_sequencer_space_v4(scene, info->linearcol);
info->color_manage = TRUE;
}
@@ -219,7 +220,8 @@ static int sample_cancel(bContext *C, wmOperator *op)
static int sample_poll(bContext *C)
{
- return BKE_sequencer_editing_get(CTX_data_scene(C), FALSE) != NULL;
+ SpaceSeq *sseq = CTX_wm_space_seq(C);
+ return sseq && BKE_sequencer_editing_get(CTX_data_scene(C), FALSE) != NULL;
}
void SEQUENCER_OT_sample(wmOperatorType *ot)
diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c
index 04b2a21bf79..4a4754e8adc 100644
--- a/source/blender/editors/space_sequencer/space_sequencer.c
+++ b/source/blender/editors/space_sequencer/space_sequencer.c
@@ -54,6 +54,7 @@
#include "WM_api.h"
#include "WM_types.h"
+#include "UI_interface.h"
#include "UI_resources.h"
#include "UI_view2d.h"
@@ -491,6 +492,7 @@ static void sequencer_main_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa
case ND_MARKERS:
case ND_RENDER_OPTIONS: /* for FPS and FPS Base */
case ND_SEQUENCER:
+ case ND_RENDER_RESULT:
ED_region_tag_redraw(ar);
break;
}
@@ -533,8 +535,9 @@ static void sequencer_preview_area_draw(const bContext *C, ARegion *ar)
ScrArea *sa = CTX_wm_area(C);
SpaceSeq *sseq = sa->spacedata.first;
Scene *scene = CTX_data_scene(C);
+ wmWindowManager *wm = CTX_wm_manager(C);
int show_split = scene->ed && scene->ed->over_flag & SEQ_EDIT_OVERLAY_SHOW && sseq->mainb == SEQ_DRAW_IMG_IMBUF;
-
+
/* XXX temp fix for wrong setting in sseq->mainb */
if (sseq->mainb == SEQ_DRAW_SEQUENCE) sseq->mainb = SEQ_DRAW_IMG_IMBUF;
@@ -553,6 +556,11 @@ static void sequencer_preview_area_draw(const bContext *C, ARegion *ar)
draw_image_seq(C, scene, ar, sseq, scene->r.cfra, over_cfra - scene->r.cfra, TRUE);
}
+ if ((U.uiflag & USER_SHOW_FPS) && ED_screen_animation_playing(wm)) {
+ rcti rect;
+ ED_region_visible_rect(ar, &rect);
+ ED_scene_draw_fps(scene, &rect);
+ }
}
static void sequencer_preview_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn)
diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c
index b04d2b16e8d..ee64d680319 100644
--- a/source/blender/editors/space_text/space_text.c
+++ b/source/blender/editors/space_text/space_text.c
@@ -239,7 +239,11 @@ static void text_keymap(struct wmKeyConfig *keyconf)
#ifdef __APPLE__
WM_keymap_add_item(keymap, "TEXT_OT_start_find", FKEY, KM_PRESS, KM_OSKEY, 0);
#endif
-
+ WM_keymap_add_item(keymap, "TEXT_OT_jump", JKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "TEXT_OT_find", GKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "TEXT_OT_replace", HKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "TEXT_OT_properties", TKEY, KM_PRESS, KM_CTRL, 0);
+
keymap = WM_keymap_find(keyconf, "Text", SPACE_TEXT, 0);
#ifdef __APPLE__
@@ -265,7 +269,6 @@ static void text_keymap(struct wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "TEXT_OT_copy", CKEY, KM_PRESS, KM_OSKEY, 0);
WM_keymap_add_item(keymap, "TEXT_OT_paste", VKEY, KM_PRESS, KM_OSKEY, 0);
WM_keymap_add_item(keymap, "TEXT_OT_find_set_selected", EKEY, KM_PRESS, KM_OSKEY, 0);
- WM_keymap_add_item(keymap, "TEXT_OT_find", GKEY, KM_PRESS, KM_OSKEY, 0);
WM_keymap_add_item(keymap, "TEXT_OT_select_all", AKEY, KM_PRESS, KM_OSKEY, 0);
WM_keymap_add_item(keymap, "TEXT_OT_select_line", AKEY, KM_PRESS, KM_SHIFT | KM_OSKEY, 0);
#endif
@@ -309,11 +312,6 @@ static void text_keymap(struct wmKeyConfig *keyconf)
RNA_boolean_set(kmi->ptr, "selection", TRUE);
}
- WM_keymap_add_item(keymap, "TEXT_OT_jump", JKEY, KM_PRESS, KM_CTRL, 0);
- WM_keymap_add_item(keymap, "TEXT_OT_find", GKEY, KM_PRESS, KM_CTRL, 0);
-
- WM_keymap_add_item(keymap, "TEXT_OT_replace", HKEY, KM_PRESS, KM_CTRL, 0);
-
kmi = WM_keymap_add_item(keymap, "TEXT_OT_to_3d_object", MKEY, KM_PRESS, KM_ALT, 0);
RNA_boolean_set(kmi->ptr, "split_lines", FALSE);
kmi = WM_keymap_add_item(keymap, "TEXT_OT_to_3d_object", MKEY, KM_PRESS, KM_CTRL, 0);
@@ -474,13 +472,26 @@ static void text_drop_copy(wmDrag *drag, wmDropBox *drop)
RNA_string_set(drop->ptr, "filepath", drag->path);
}
+static int text_drop_paste_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
+{
+ if (drag->type == WM_DRAG_ID)
+ return true;
+
+ return false;
+}
+
+static void text_drop_paste(wmDrag *drag, wmDropBox *drop)
+{
+ RNA_string_set(drop->ptr, "text", ((ID *)drag->poin)->name + 2);
+}
+
/* this region dropbox definition */
static void text_dropboxes(void)
{
ListBase *lb = WM_dropboxmap_find("Text", SPACE_TEXT, RGN_TYPE_WINDOW);
WM_dropbox_add(lb, "TEXT_OT_open", text_drop_poll, text_drop_copy);
-
+ WM_dropbox_add(lb, "TEXT_OT_insert", text_drop_paste_poll, text_drop_paste);
}
/* ************* end drop *********** */
diff --git a/source/blender/editors/space_text/text_autocomplete.c b/source/blender/editors/space_text/text_autocomplete.c
index ba61399f6d5..eaba537c0a8 100644
--- a/source/blender/editors/space_text/text_autocomplete.c
+++ b/source/blender/editors/space_text/text_autocomplete.c
@@ -361,6 +361,7 @@ static int text_autocomplete_modal(bContext *C, wmOperator *op, const wmEvent *e
}
break;
case RETKEY:
+ case PADENTER:
if (event->val == KM_PRESS) {
if (tools & TOOL_SUGG_LIST) {
confirm_suggestion(st->text);
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c
index 95fd7fce878..e92cab72042 100644
--- a/source/blender/editors/space_text/text_draw.c
+++ b/source/blender/editors/space_text/text_draw.c
@@ -1133,23 +1133,23 @@ static void draw_cursor(SpaceText *st, ARegion *ar)
wrap_offset_in_line(st, ar, text->sell, text->selc, &offl, &offc);
- y1 = ar->winy - 2 - (vsell - offl) * lheight;
- y2 = y1 - (lheight * visible_lines + TXT_LINE_SPACING);
+ y1 = ar->winy - (vsell - offl) * lheight;
+ y2 = y1 - (lheight * visible_lines);
}
else {
- y1 = ar->winy - 2 - vsell * lheight;
- y2 = y1 - (lheight + TXT_LINE_SPACING);
+ y1 = ar->winy - vsell * lheight;
+ y2 = y1 - (lheight);
}
if (!(y1 < 0 || y2 > ar->winy)) { /* check we need to draw */
- x1 = st->showlinenrs ? TXT_OFFSET + TEXTXLOC : TXT_OFFSET;
+ x1 = 0; // st->showlinenrs ? TXT_OFFSET + TEXTXLOC : TXT_OFFSET;
x2 = x1 + ar->winx;
glColor4ub(255, 255, 255, 32);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
- glRecti(x1 - 4, y1, x2, y2 + TXT_LINE_SPACING);
+ glRecti(x1 - 4, y1, x2, y2);
glDisable(GL_BLEND);
}
}
@@ -1317,15 +1317,13 @@ void draw_text_main(SpaceText *st, ARegion *ar)
int wraplinecount = 0, wrap_skip = 0;
int margin_column_x;
- /* dpi controlled line height and font size */
- st->lheight_dpi = (U.widget_unit * st->lheight) / 20;
-
- if (st->lheight_dpi) st->viewlines = (int)ar->winy / (st->lheight_dpi + TXT_LINE_SPACING);
- else st->viewlines = 0;
-
/* if no text, nothing to do */
if (!text)
return;
+
+ /* dpi controlled line height and font size */
+ st->lheight_dpi = (U.widget_unit * st->lheight) / 20;
+ st->viewlines = (st->lheight_dpi) ? (int)ar->winy / (st->lheight_dpi + TXT_LINE_SPACING) : 0;
text_update_drawcache(st, ar);
diff --git a/source/blender/editors/space_text/text_intern.h b/source/blender/editors/space_text/text_intern.h
index 371ccfd9bd9..5d0c7181e77 100644
--- a/source/blender/editors/space_text/text_intern.h
+++ b/source/blender/editors/space_text/text_intern.h
@@ -53,11 +53,10 @@ void text_update_character_width(struct SpaceText *st);
void text_scroll_to_cursor(struct SpaceText *st, struct ScrArea *sa);
void text_update_cursor_moved(struct bContext *C);
- /* TXT_OFFSET used to be 35 when the scrollbar was on the left... */
-#define TXT_OFFSET ((int)(0.75f * U.widget_unit))
+#define TXT_OFFSET ((int)(0.5f * U.widget_unit))
#define TXT_SCROLL_WIDTH U.widget_unit
#define TXT_SCROLL_SPACE ((int)(0.1f * U.widget_unit))
-#define TXT_LINE_SPACING ((int)(0.2f * U.widget_unit)) /* space between lines */
+#define TXT_LINE_SPACING ((int)(0.3f * st->lheight_dpi)) /* space between lines */
#define TEXTXLOC (st->cwidth * st->linenrs_tot)
#define SUGG_LIST_SIZE 7
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index dec61a0e1ca..4f53d033029 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -174,12 +174,6 @@ static int text_new_exec(bContext *C, wmOperator *UNUSED(op))
uiIDContextProperty(C, &ptr, &prop);
if (prop) {
- /* when creating new ID blocks, use is already 1, but RNA
- * pointer se also increases user, so this compensates it */
- /* doesnt always seem to happen... (ton) */
- if (text->id.us > 1)
- text->id.us--;
-
RNA_id_pointer_create(&text->id, &idptr);
RNA_property_pointer_set(&ptr, prop, idptr);
RNA_property_update(C, &ptr, prop);
@@ -252,10 +246,6 @@ static int text_open_exec(bContext *C, wmOperator *op)
pprop = op->customdata;
if (pprop->prop) {
- /* when creating new ID blocks, use is already 1, but RNA
- * pointer se also increases user, so this compensates it */
- text->id.us--;
-
RNA_id_pointer_create(&text->id, &idptr);
RNA_property_pointer_set(&pprop->ptr, pprop->prop, idptr);
RNA_property_update(C, &pprop->ptr, pprop->prop);
@@ -949,7 +939,7 @@ static int text_indent_exec(bContext *C, wmOperator *UNUSED(op))
text_drawcache_tag_update(CTX_wm_space_text(C), 0);
if (txt_has_sel(text)) {
- txt_order_cursors(text);
+ txt_order_cursors(text, false);
txt_indent(text);
}
else
@@ -983,7 +973,7 @@ static int text_unindent_exec(bContext *C, wmOperator *UNUSED(op))
text_drawcache_tag_update(CTX_wm_space_text(C), 0);
- txt_order_cursors(text);
+ txt_order_cursors(text, false);
txt_unindent(text);
text_update_edited(text);
@@ -1063,7 +1053,7 @@ static int text_comment_exec(bContext *C, wmOperator *UNUSED(op))
if (txt_has_sel(text)) {
text_drawcache_tag_update(CTX_wm_space_text(C), 0);
- txt_order_cursors(text);
+ txt_order_cursors(text, false);
txt_comment(text);
text_update_edited(text);
@@ -1096,7 +1086,7 @@ static int text_uncomment_exec(bContext *C, wmOperator *UNUSED(op))
if (txt_has_sel(text)) {
text_drawcache_tag_update(CTX_wm_space_text(C), 0);
- txt_order_cursors(text);
+ txt_order_cursors(text, false);
txt_uncomment(text);
text_update_edited(text);
@@ -1861,11 +1851,23 @@ static int text_move_cursor(bContext *C, int type, int select)
break;
case PREV_CHAR:
- txt_move_left(text, select);
+ if (txt_has_sel(text) && !select) {
+ txt_order_cursors(text, false);
+ txt_pop_sel(text);
+ }
+ else {
+ txt_move_left(text, select);
+ }
break;
case NEXT_CHAR:
- txt_move_right(text, select);
+ if (txt_has_sel(text) && !select) {
+ txt_order_cursors(text, true);
+ txt_pop_sel(text);
+ }
+ else {
+ txt_move_right(text, select);
+ }
break;
case PREV_LINE:
@@ -1931,7 +1933,7 @@ void TEXT_OT_move_select(wmOperatorType *ot)
/* identifiers */
ot->name = "Move Select";
ot->idname = "TEXT_OT_move_select";
- ot->description = "Make selection from current cursor position to new cursor position type";
+ ot->description = "Move the cursor while selecting";
/* api callbacks */
ot->exec = text_move_select_exec;
@@ -2086,10 +2088,17 @@ void TEXT_OT_overwrite_toggle(wmOperatorType *ot)
static void txt_screen_clamp(SpaceText *st, ARegion *ar)
{
- int last;
- last = text_get_total_lines(st, ar);
- last = last - (st->viewlines / 2);
- CLAMP(st->top, 0, last);
+ if (st->top <= 0) {
+ st->top = 0;
+ }
+ else {
+ int last;
+ last = text_get_total_lines(st, ar);
+ last = last - (st->viewlines / 2);
+ if (last > 0 && st->top > last) {
+ st->top = last;
+ }
+ }
}
/* Moves the view vertically by the specified number of lines */
@@ -2272,7 +2281,7 @@ void TEXT_OT_scroll(wmOperatorType *ot)
* scroll_bar. Both do basically the same thing (aside
* from keymaps).*/
ot->idname = "TEXT_OT_scroll";
- ot->description = "Scroll text screen";
+ ot->description = "";
/* api callbacks */
ot->exec = text_scroll_exec;
@@ -2282,7 +2291,7 @@ void TEXT_OT_scroll(wmOperatorType *ot)
ot->poll = text_scroll_poll;
/* flags */
- ot->flag = OPTYPE_BLOCKING | OPTYPE_GRAB_POINTER;
+ ot->flag = OPTYPE_BLOCKING | OPTYPE_GRAB_POINTER | OPTYPE_INTERNAL;
/* properties */
RNA_def_int(ot->srna, "lines", 1, INT_MIN, INT_MAX, "Lines", "Number of lines to scroll", -100, 100);
@@ -2366,7 +2375,7 @@ void TEXT_OT_scroll_bar(wmOperatorType *ot)
* scroll. Both do basically the same thing (aside
* from keymaps).*/
ot->idname = "TEXT_OT_scroll_bar";
- ot->description = "Scroll text screen";
+ ot->description = "";
/* api callbacks */
ot->invoke = text_scroll_bar_invoke;
@@ -2375,7 +2384,7 @@ void TEXT_OT_scroll_bar(wmOperatorType *ot)
ot->poll = text_region_scroll_poll;
/* flags */
- ot->flag = OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_BLOCKING | OPTYPE_INTERNAL;
/* properties */
RNA_def_int(ot->srna, "lines", 1, INT_MIN, INT_MAX, "Lines", "Number of lines to scroll", -100, 100);
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c
index d3d8868520d..de6fafb2cd8 100644
--- a/source/blender/editors/space_view3d/drawarmature.c
+++ b/source/blender/editors/space_view3d/drawarmature.c
@@ -34,7 +34,6 @@
#include <string.h>
#include <math.h>
-
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
#include "DNA_constraint_types.h"
@@ -305,7 +304,7 @@ static void set_ebone_glColor(const unsigned int boneflag)
/* *************** Armature drawing, helper calls for parts ******************* */
/* half the cube, in Y */
-static float cube[8][3] = {
+static const float cube[8][3] = {
{-1.0, 0.0, -1.0},
{-1.0, 0.0, 1.0},
{-1.0, 1.0, 1.0},
@@ -441,7 +440,7 @@ static void draw_bonevert_solid(void)
glCallList(displist);
}
-static float bone_octahedral_verts[6][3] = {
+static const float bone_octahedral_verts[6][3] = {
{ 0.0f, 0.0f, 0.0f},
{ 0.1f, 0.1f, 0.1f},
{ 0.1f, 0.1f, -0.1f},
@@ -450,10 +449,10 @@ static float bone_octahedral_verts[6][3] = {
{ 0.0f, 1.0f, 0.0f}
};
-static unsigned int bone_octahedral_wire_sides[8] = {0, 1, 5, 3, 0, 4, 5, 2};
-static unsigned int bone_octahedral_wire_square[8] = {1, 2, 3, 4, 1};
+static const unsigned int bone_octahedral_wire_sides[8] = {0, 1, 5, 3, 0, 4, 5, 2};
+static const unsigned int bone_octahedral_wire_square[8] = {1, 2, 3, 4, 1};
-static unsigned int bone_octahedral_solid_tris[8][3] = {
+static const unsigned int bone_octahedral_solid_tris[8][3] = {
{2, 1, 0}, /* bottom */
{3, 2, 0},
{4, 3, 0},
@@ -466,7 +465,7 @@ static unsigned int bone_octahedral_solid_tris[8][3] = {
};
/* aligned with bone_octahedral_solid_tris */
-static float bone_octahedral_solid_normals[8][3] = {
+static const float bone_octahedral_solid_normals[8][3] = {
{ 0.70710683f, -0.70710683f, 0.00000000f},
{-0.00000000f, -0.70710683f, -0.70710683f},
{-0.70710683f, -0.70710683f, 0.00000000f},
@@ -600,7 +599,7 @@ static void draw_bone_points(const short dt, int armflag, unsigned int boneflag,
}
/* 16 values of sin function (still same result!) */
-static float si[16] = {
+static const float si[16] = {
0.00000000f,
0.20129852f, 0.39435585f,
0.57126821f, 0.72479278f,
@@ -612,7 +611,7 @@ static float si[16] = {
0.10116832f
};
/* 16 values of cos function (still same result!) */
-static float co[16] = {
+static const float co[16] = {
1.00000000f,
0.97952994f, 0.91895781f,
0.82076344f, 0.68896691f,
@@ -1099,12 +1098,14 @@ static void draw_b_bone_boxes(const short dt, bPoseChannel *pchan, float xwidth,
if ((segments > 1) && (pchan)) {
float dlen = length / (float)segments;
- Mat4 *bbone = b_bone_spline_setup(pchan, 0);
+ Mat4 bbone[MAX_BBONE_SUBDIV];
int a;
-
- for (a = 0; a < segments; a++, bbone++) {
+
+ b_bone_spline_setup(pchan, 0, bbone);
+
+ for (a = 0; a < segments; a++) {
glPushMatrix();
- glMultMatrixf(bbone->mat);
+ glMultMatrixf(bbone[a].mat);
if (dt == OB_SOLID) drawsolidcube_size(xwidth, dlen, zwidth);
else drawcube_size(xwidth, dlen, zwidth);
glPopMatrix();
@@ -1235,6 +1236,7 @@ static void draw_wire_bone_segments(bPoseChannel *pchan, Mat4 *bbones, float len
static void draw_wire_bone(const short dt, int armflag, int boneflag, short constflag, unsigned int id,
bPoseChannel *pchan, EditBone *ebone)
{
+ Mat4 bbones_array[MAX_BBONE_SUBDIV];
Mat4 *bbones = NULL;
int segments = 0;
float length;
@@ -1243,8 +1245,10 @@ static void draw_wire_bone(const short dt, int armflag, int boneflag, short cons
segments = pchan->bone->segments;
length = pchan->bone->length;
- if (segments > 1)
- bbones = b_bone_spline_setup(pchan, 0);
+ if (segments > 1) {
+ b_bone_spline_setup(pchan, 0, bbones_array);
+ bbones = bbones_array;
+ }
}
else
length = ebone->length;
@@ -1534,7 +1538,7 @@ static void draw_pose_dofs(Object *ob)
if (bone->flag & BONE_SELECTED) {
if (bone->layer & arm->layer) {
if (pchan->ikflag & (BONE_IK_XLIMIT | BONE_IK_ZLIMIT)) {
- if (ED_pose_channel_in_IK_chain(ob, pchan)) {
+ if (BKE_pose_channel_in_IK_chain(ob, pchan)) {
float corner[4][3], posetrans[3], mat[4][4];
float phi = 0.0f, theta = 0.0f, scale;
int a, i;
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c
index 16423c60cac..a08a6cc1478 100644
--- a/source/blender/editors/space_view3d/drawmesh.c
+++ b/source/blender/editors/space_view3d/drawmesh.c
@@ -345,7 +345,10 @@ static void draw_textured_begin(Scene *scene, View3D *v3d, RegionView3D *rv3d, O
else {
/* draw with lights in the scene otherwise */
solidtex = false;
- Gtexdraw.is_lit = GPU_scene_object_lights(scene, ob, v3d->lay, rv3d->viewmat, !rv3d->is_persp);
+ if (v3d->flag2 & V3D_SHADELESS_TEX)
+ Gtexdraw.is_lit = 0;
+ else
+ Gtexdraw.is_lit = GPU_scene_object_lights(scene, ob, v3d->lay, rv3d->viewmat, !rv3d->is_persp);
}
rgba_float_to_uchar(obcol, ob->col);
@@ -571,7 +574,7 @@ static DMDrawOption draw_em_tf_mapped__set_draw(void *userData, int index)
if (UNLIKELY(index >= em->bm->totface))
return DM_DRAW_OPTION_NORMAL;
- efa = EDBM_face_at_index(em, index);
+ efa = BM_face_at_index(em->bm, index);
if (BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) {
return DM_DRAW_OPTION_SKIP;
@@ -933,7 +936,7 @@ static bool tex_mat_set_face_editmesh_cb(void *userData, int index)
if (UNLIKELY(index >= em->bm->totface))
return DM_DRAW_OPTION_NORMAL;
- efa = EDBM_face_at_index(em, index);
+ efa = BM_face_at_index(em->bm, index);
return !BM_elem_flag_test(efa, BM_ELEM_HIDDEN);
}
@@ -955,7 +958,10 @@ void draw_mesh_textured(Scene *scene, View3D *v3d, RegionView3D *rv3d,
if (ob->transflag & OB_NEG_SCALE) glFrontFace(GL_CW);
else glFrontFace(GL_CCW);
- glEnable(GL_LIGHTING);
+ if ((v3d->drawtype == OB_TEXTURE) && (v3d->flag2 & V3D_SHADELESS_TEX))
+ glColor3f(1.0f, 1.0f, 1.0f);
+ else
+ glEnable(GL_LIGHTING);
{
Mesh *me = ob->data;
@@ -977,7 +983,7 @@ void draw_mesh_textured(Scene *scene, View3D *v3d, RegionView3D *rv3d,
GPU_begin_object_materials(v3d, rv3d, scene, ob, glsl, NULL);
if (glsl || picking) {
- /* draw glsl */
+ /* draw glsl or solid */
dm->drawMappedFacesMat(dm,
tex_mat_set_material_cb,
set_face_cb, &data);
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 62e3f8471a3..ac1f4406983 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -103,7 +103,7 @@ typedef enum eWireDrawMode {
} eWireDrawMode;
typedef struct drawDMVerts_userData {
- BMEditMesh *em;
+ BMesh *bm;
BMVert *eve_act;
char sel;
@@ -121,7 +121,7 @@ typedef struct drawDMVerts_userData {
} drawDMVerts_userData;
typedef struct drawDMEdgesSel_userData {
- BMEditMesh *em;
+ BMesh *bm;
unsigned char *baseCol, *selCol, *actCol;
BMEdge *eed_act;
@@ -135,7 +135,7 @@ typedef struct drawDMFacesSel_userData {
#endif
DerivedMesh *dm;
- BMEditMesh *em;
+ BMesh *bm;
BMFace *efa_act;
int *orig_index_mf_to_mpoly;
@@ -143,7 +143,7 @@ typedef struct drawDMFacesSel_userData {
} drawDMFacesSel_userData;
typedef struct drawDMNormal_userData {
- BMEditMesh *em;
+ BMesh *bm;
int uniform_scale;
float normalsize;
float tmat[3][3];
@@ -156,7 +156,7 @@ typedef struct bbsObmodeMeshVerts_userData {
} bbsObmodeMeshVerts_userData;
typedef struct drawDMLayer_userData {
- BMEditMesh *em;
+ BMesh *bm;
int cd_layer_offset;
} drawDMLayer_userData;
@@ -1672,7 +1672,7 @@ static void drawcamera(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base
int i;
float drawsize;
const bool is_view = (rv3d->persp == RV3D_CAMOB && ob == v3d->camera);
- MovieClip *clip = BKE_object_movieclip_get(scene, base->object, 0);
+ MovieClip *clip = BKE_object_movieclip_get(scene, base->object, false);
/* draw data for movie clip set as active for scene */
if (clip) {
@@ -1900,9 +1900,9 @@ static void drawlattice(Scene *scene, View3D *v3d, Object *ob)
const bool is_edit = (lt->editlatt != NULL);
/* now we default make displist, this will modifiers work for non animated case */
- if (ob->disp.first == NULL)
+ if (ELEM(NULL, ob->curve_cache, ob->curve_cache->disp.first))
BKE_lattice_modifiers_calc(scene, ob);
- dl = BKE_displist_find(&ob->disp, DL_VERTS);
+ dl = BKE_displist_find(&ob->curve_cache->disp, DL_VERTS);
if (is_edit) {
lt = lt->editlatt->latt;
@@ -2038,12 +2038,12 @@ static void calcDrawDMNormalScale(Object *ob, drawDMNormal_userData *data)
static void draw_dm_face_normals__mapFunc(void *userData, int index, const float cent[3], const float no[3])
{
drawDMNormal_userData *data = userData;
- BMFace *efa = EDBM_face_at_index(data->em, index);
+ BMFace *efa = BM_face_at_index(data->bm, index);
float n[3];
if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) {
if (!data->uniform_scale) {
- mul_v3_m3v3(n, data->tmat, (float *) no);
+ mul_v3_m3v3(n, data->tmat, no);
normalize_v3(n);
mul_m3_v3(data->imat, n);
}
@@ -2062,7 +2062,7 @@ static void draw_dm_face_normals(BMEditMesh *em, Scene *scene, Object *ob, Deriv
{
drawDMNormal_userData data;
- data.em = em;
+ data.bm = em->bm;
data.normalsize = scene->toolsettings->normalsize;
calcDrawDMNormalScale(ob, &data);
@@ -2074,7 +2074,7 @@ static void draw_dm_face_normals(BMEditMesh *em, Scene *scene, Object *ob, Deriv
static void draw_dm_face_centers__mapFunc(void *userData, int index, const float cent[3], const float UNUSED(no[3]))
{
- BMFace *efa = EDBM_face_at_index(((void **)userData)[0], index);
+ BMFace *efa = BM_face_at_index(((void **)userData)[0], index);
const char sel = *(((char **)userData)[1]);
if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN) &&
@@ -2085,7 +2085,7 @@ static void draw_dm_face_centers__mapFunc(void *userData, int index, const float
}
static void draw_dm_face_centers(BMEditMesh *em, DerivedMesh *dm, char sel)
{
- void *ptrs[2] = {em, &sel};
+ void *ptrs[2] = {em->bm, &sel};
bglBegin(GL_POINTS);
dm->foreachMappedFaceCenter(dm, draw_dm_face_centers__mapFunc, ptrs, DM_FOREACH_NOP);
@@ -2095,7 +2095,7 @@ static void draw_dm_face_centers(BMEditMesh *em, DerivedMesh *dm, char sel)
static void draw_dm_vert_normals__mapFunc(void *userData, int index, const float co[3], const float no_f[3], const short no_s[3])
{
drawDMNormal_userData *data = userData;
- BMVert *eve = EDBM_vert_at_index(data->em, index);
+ BMVert *eve = BM_vert_at_index(data->bm, index);
if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) {
float no[3], n[3];
@@ -2108,7 +2108,7 @@ static void draw_dm_vert_normals__mapFunc(void *userData, int index, const float
}
if (!data->uniform_scale) {
- mul_v3_m3v3(n, data->tmat, (float *) no);
+ mul_v3_m3v3(n, data->tmat, no);
normalize_v3(n);
mul_m3_v3(data->imat, n);
}
@@ -2127,7 +2127,7 @@ static void draw_dm_vert_normals(BMEditMesh *em, Scene *scene, Object *ob, Deriv
{
drawDMNormal_userData data;
- data.em = em;
+ data.bm = em->bm;
data.normalsize = scene->toolsettings->normalsize;
calcDrawDMNormalScale(ob, &data);
@@ -2142,7 +2142,7 @@ static void draw_dm_verts__mapFunc(void *userData, int index, const float co[3],
const float UNUSED(no_f[3]), const short UNUSED(no_s[3]))
{
drawDMVerts_userData *data = userData;
- BMVert *eve = EDBM_vert_at_index(data->em, index);
+ BMVert *eve = BM_vert_at_index(data->bm, index);
if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN) && BM_elem_flag_test(eve, BM_ELEM_SELECT) == data->sel) {
/* skin nodes: draw a red circle around the root
@@ -2188,7 +2188,7 @@ static void draw_dm_verts(BMEditMesh *em, DerivedMesh *dm, const char sel, BMVer
drawDMVerts_userData data;
data.sel = sel;
data.eve_act = eve_act;
- data.em = em;
+ data.bm = em->bm;
/* Cache theme values */
UI_GetThemeColor4ubv(TH_EDITMESH_ACTIVE, data.th_editmesh_active);
@@ -2216,7 +2216,7 @@ static DMDrawOption draw_dm_edges_sel__setDrawOptions(void *userData, int index)
drawDMEdgesSel_userData *data = userData;
unsigned char *col;
- eed = EDBM_edge_at_index(data->em, index);
+ eed = BM_edge_at_index(data->bm, index);
if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN)) {
if (eed == data->eed_act) {
@@ -2249,7 +2249,7 @@ static void draw_dm_edges_sel(BMEditMesh *em, DerivedMesh *dm, unsigned char *ba
data.baseCol = baseCol;
data.selCol = selCol;
data.actCol = actCol;
- data.em = em;
+ data.bm = em->bm;
data.eed_act = eed_act;
dm->drawMappedEdges(dm, draw_dm_edges_sel__setDrawOptions, &data);
}
@@ -2257,7 +2257,7 @@ static void draw_dm_edges_sel(BMEditMesh *em, DerivedMesh *dm, unsigned char *ba
/* Draw edges */
static DMDrawOption draw_dm_edges__setDrawOptions(void *userData, int index)
{
- if (BM_elem_flag_test(EDBM_edge_at_index(userData, index), BM_ELEM_HIDDEN))
+ if (BM_elem_flag_test(BM_edge_at_index(userData, index), BM_ELEM_HIDDEN))
return DM_DRAW_OPTION_SKIP;
else
return DM_DRAW_OPTION_NORMAL;
@@ -2265,20 +2265,20 @@ static DMDrawOption draw_dm_edges__setDrawOptions(void *userData, int index)
static void draw_dm_edges(BMEditMesh *em, DerivedMesh *dm)
{
- dm->drawMappedEdges(dm, draw_dm_edges__setDrawOptions, em);
+ dm->drawMappedEdges(dm, draw_dm_edges__setDrawOptions, em->bm);
}
/* Draw edges with color interpolated based on selection */
static DMDrawOption draw_dm_edges_sel_interp__setDrawOptions(void *userData, int index)
{
- if (BM_elem_flag_test(EDBM_edge_at_index(((void **)userData)[0], index), BM_ELEM_HIDDEN))
+ if (BM_elem_flag_test(BM_edge_at_index(((void **)userData)[0], index), BM_ELEM_HIDDEN))
return DM_DRAW_OPTION_SKIP;
else
return DM_DRAW_OPTION_NORMAL;
}
static void draw_dm_edges_sel_interp__setDrawInterpOptions(void *userData, int index, float t)
{
- BMEdge *eed = EDBM_edge_at_index(((void **)userData)[0], index);
+ BMEdge *eed = BM_edge_at_index(((void **)userData)[0], index);
unsigned char **cols = userData;
unsigned char *col0 = cols[(BM_elem_flag_test(eed->v1, BM_ELEM_SELECT)) ? 2 : 1];
unsigned char *col1 = cols[(BM_elem_flag_test(eed->v2, BM_ELEM_SELECT)) ? 2 : 1];
@@ -2291,7 +2291,7 @@ static void draw_dm_edges_sel_interp__setDrawInterpOptions(void *userData, int i
static void draw_dm_edges_sel_interp(BMEditMesh *em, DerivedMesh *dm, unsigned char *baseCol, unsigned char *selCol)
{
- void *cols[3] = {em, baseCol, selCol};
+ void *cols[3] = {em->bm, baseCol, selCol};
dm->drawMappedEdgesInterp(dm, draw_dm_edges_sel_interp__setDrawOptions, draw_dm_edges_sel_interp__setDrawInterpOptions, cols);
}
@@ -2299,7 +2299,7 @@ static void draw_dm_edges_sel_interp(BMEditMesh *em, DerivedMesh *dm, unsigned c
/* Draw only seam edges */
static DMDrawOption draw_dm_edges_seams__setDrawOptions(void *userData, int index)
{
- BMEdge *eed = EDBM_edge_at_index(userData, index);
+ BMEdge *eed = BM_edge_at_index(userData, index);
if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN) && BM_elem_flag_test(eed, BM_ELEM_SEAM))
return DM_DRAW_OPTION_NORMAL;
@@ -2315,7 +2315,7 @@ static void draw_dm_edges_seams(BMEditMesh *em, DerivedMesh *dm)
/* Draw only sharp edges */
static DMDrawOption draw_dm_edges_sharp__setDrawOptions(void *userData, int index)
{
- BMEdge *eed = EDBM_edge_at_index(userData, index);
+ BMEdge *eed = BM_edge_at_index(userData, index);
if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN) && !BM_elem_flag_test(eed, BM_ELEM_SMOOTH))
return DM_DRAW_OPTION_NORMAL;
@@ -2330,9 +2330,9 @@ static void draw_dm_edges_sharp(BMEditMesh *em, DerivedMesh *dm)
#ifdef WITH_FREESTYLE
-static int draw_dm_test_freestyle_edge_mark(BMEditMesh *em, BMEdge *eed)
+static int draw_dm_test_freestyle_edge_mark(BMesh *bm, BMEdge *eed)
{
- FreestyleEdge *fed = CustomData_bmesh_get(&em->bm->edata, eed->head.data, CD_FREESTYLE_EDGE);
+ FreestyleEdge *fed = CustomData_bmesh_get(&bm->edata, eed->head.data, CD_FREESTYLE_EDGE);
if (!fed)
return 0;
return (fed->flag & FREESTYLE_EDGE_MARK) != 0;
@@ -2341,7 +2341,7 @@ static int draw_dm_test_freestyle_edge_mark(BMEditMesh *em, BMEdge *eed)
/* Draw only Freestyle feature edges */
static DMDrawOption draw_dm_edges_freestyle__setDrawOptions(void *userData, int index)
{
- BMEdge *eed = EDBM_edge_at_index(userData, index);
+ BMEdge *eed = BM_edge_at_index(userData, index);
if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN) && draw_dm_test_freestyle_edge_mark(userData, eed))
return DM_DRAW_OPTION_NORMAL;
@@ -2351,12 +2351,12 @@ static DMDrawOption draw_dm_edges_freestyle__setDrawOptions(void *userData, int
static void draw_dm_edges_freestyle(BMEditMesh *em, DerivedMesh *dm)
{
- dm->drawMappedEdges(dm, draw_dm_edges_freestyle__setDrawOptions, em);
+ dm->drawMappedEdges(dm, draw_dm_edges_freestyle__setDrawOptions, em->bm);
}
-static int draw_dm_test_freestyle_face_mark(BMEditMesh *em, BMFace *efa)
+static int draw_dm_test_freestyle_face_mark(BMesh *bm, BMFace *efa)
{
- FreestyleFace *ffa = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_FREESTYLE_FACE);
+ FreestyleFace *ffa = CustomData_bmesh_get(&bm->pdata, efa->head.data, CD_FREESTYLE_FACE);
if (!ffa)
return 0;
return (ffa->flag & FREESTYLE_FACE_MARK) != 0;
@@ -2369,7 +2369,7 @@ static int draw_dm_test_freestyle_face_mark(BMEditMesh *em, BMFace *efa)
static DMDrawOption draw_dm_faces_sel__setDrawOptions(void *userData, int index)
{
drawDMFacesSel_userData *data = userData;
- BMFace *efa = EDBM_face_at_index(data->em, index);
+ BMFace *efa = BM_face_at_index(data->bm, index);
unsigned char *col;
if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) {
@@ -2379,7 +2379,7 @@ static DMDrawOption draw_dm_faces_sel__setDrawOptions(void *userData, int index)
}
else {
#ifdef WITH_FREESTYLE
- col = data->cols[BM_elem_flag_test(efa, BM_ELEM_SELECT) ? 1 : draw_dm_test_freestyle_face_mark(data->em, efa) ? 3 : 0];
+ col = data->cols[BM_elem_flag_test(efa, BM_ELEM_SELECT) ? 1 : draw_dm_test_freestyle_face_mark(data->bm, efa) ? 3 : 0];
#else
col = data->cols[BM_elem_flag_test(efa, BM_ELEM_SELECT) ? 1 : 0];
#endif
@@ -2406,9 +2406,9 @@ static int draw_dm_faces_sel__compareDrawOptions(void *userData, int index, int
return 0;
i = DM_origindex_mface_mpoly(data->orig_index_mf_to_mpoly, data->orig_index_mp_to_orig, index);
- efa = (i != ORIGINDEX_NONE) ? EDBM_face_at_index(data->em, i) : NULL;
+ efa = (i != ORIGINDEX_NONE) ? BM_face_at_index(data->bm, i) : NULL;
i = DM_origindex_mface_mpoly(data->orig_index_mf_to_mpoly, data->orig_index_mp_to_orig, next_index);
- next_efa = (i != ORIGINDEX_NONE) ? EDBM_face_at_index(data->em, i) : NULL;
+ next_efa = (i != ORIGINDEX_NONE) ? BM_face_at_index(data->bm, i) : NULL;
if (ELEM(NULL, efa, next_efa))
return 0;
@@ -2420,8 +2420,8 @@ static int draw_dm_faces_sel__compareDrawOptions(void *userData, int index, int
return 0;
#ifdef WITH_FREESTYLE
- col = data->cols[BM_elem_flag_test(efa, BM_ELEM_SELECT) ? 1 : draw_dm_test_freestyle_face_mark(data->em, efa) ? 3 : 0];
- next_col = data->cols[BM_elem_flag_test(next_efa, BM_ELEM_SELECT) ? 1 : draw_dm_test_freestyle_face_mark(data->em, efa) ? 3 : 0];
+ col = data->cols[BM_elem_flag_test(efa, BM_ELEM_SELECT) ? 1 : draw_dm_test_freestyle_face_mark(data->bm, efa) ? 3 : 0];
+ next_col = data->cols[BM_elem_flag_test(next_efa, BM_ELEM_SELECT) ? 1 : draw_dm_test_freestyle_face_mark(data->bm, efa) ? 3 : 0];
#else
col = data->cols[BM_elem_flag_test(efa, BM_ELEM_SELECT) ? 1 : 0];
next_col = data->cols[BM_elem_flag_test(next_efa, BM_ELEM_SELECT) ? 1 : 0];
@@ -2445,7 +2445,7 @@ static void draw_dm_faces_sel(BMEditMesh *em, DerivedMesh *dm, unsigned char *ba
drawDMFacesSel_userData data;
data.dm = dm;
data.cols[0] = baseCol;
- data.em = em;
+ data.bm = em->bm;
data.cols[1] = selCol;
data.cols[2] = actCol;
#ifdef WITH_FREESTYLE
@@ -2465,8 +2465,8 @@ static void draw_dm_faces_sel(BMEditMesh *em, DerivedMesh *dm, unsigned char *ba
static DMDrawOption draw_dm_creases__setDrawOptions(void *userData, int index)
{
drawDMLayer_userData *data = userData;
- BMEditMesh *em = data->em;
- BMEdge *eed = EDBM_edge_at_index(em, index);
+ BMesh *bm = data->bm;
+ BMEdge *eed = BM_edge_at_index(bm, index);
if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN)) {
const float crease = BM_ELEM_CD_GET_FLOAT(eed, data->cd_layer_offset);
@@ -2481,7 +2481,7 @@ static void draw_dm_creases(BMEditMesh *em, DerivedMesh *dm)
{
drawDMLayer_userData data;
- data.em = em;
+ data.bm = em->bm;
data.cd_layer_offset = CustomData_get_offset(&em->bm->edata, CD_CREASE);
if (data.cd_layer_offset != -1) {
@@ -2494,8 +2494,8 @@ static void draw_dm_creases(BMEditMesh *em, DerivedMesh *dm)
static DMDrawOption draw_dm_bweights__setDrawOptions(void *userData, int index)
{
drawDMLayer_userData *data = userData;
- BMEditMesh *em = data->em;
- BMEdge *eed = EDBM_edge_at_index(em, index);
+ BMesh *bm = data->bm;
+ BMEdge *eed = BM_edge_at_index(bm, index);
if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN)) {
const float bweight = BM_ELEM_CD_GET_FLOAT(eed, data->cd_layer_offset);
@@ -2510,8 +2510,8 @@ static void draw_dm_bweights__mapFunc(void *userData, int index, const float co[
const float UNUSED(no_f[3]), const short UNUSED(no_s[3]))
{
drawDMLayer_userData *data = userData;
- BMEditMesh *em = data->em;
- BMVert *eve = EDBM_vert_at_index(em, index);
+ BMesh *bm = data->bm;
+ BMVert *eve = BM_vert_at_index(bm, index);
if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) {
const float bweight = BM_ELEM_CD_GET_FLOAT(eve, data->cd_layer_offset);
@@ -2528,7 +2528,7 @@ static void draw_dm_bweights(BMEditMesh *em, Scene *scene, DerivedMesh *dm)
if (ts->selectmode & SCE_SELECT_VERTEX) {
drawDMLayer_userData data;
- data.em = em;
+ data.bm = em->bm;
data.cd_layer_offset = CustomData_get_offset(&em->bm->vdata, CD_BWEIGHT);
if (data.cd_layer_offset != -1) {
@@ -2541,7 +2541,7 @@ static void draw_dm_bweights(BMEditMesh *em, Scene *scene, DerivedMesh *dm)
else {
drawDMLayer_userData data;
- data.em = em;
+ data.bm = em->bm;
data.cd_layer_offset = CustomData_get_offset(&em->bm->edata, CD_BWEIGHT);
if (data.cd_layer_offset != -1) {
@@ -2552,6 +2552,11 @@ static void draw_dm_bweights(BMEditMesh *em, Scene *scene, DerivedMesh *dm)
}
}
+static int draw_dm_override_material_color(int UNUSED(nr), void *UNUSED(attribs))
+{
+ return 1;
+}
+
/* Second section of routines: Combine first sets to form fancy
* drawing routines (for example rendering twice to get overlays).
*
@@ -3055,7 +3060,7 @@ static DMDrawOption draw_em_fancy__setFaceOpts(void *userData, int index)
if (UNLIKELY(index >= em->bm->totface))
return DM_DRAW_OPTION_NORMAL;
- efa = EDBM_face_at_index(em, index);
+ efa = BM_face_at_index(em->bm, index);
if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) {
GPU_enable_material(efa->mat_nr + 1, NULL);
return DM_DRAW_OPTION_NORMAL;
@@ -3073,7 +3078,7 @@ static DMDrawOption draw_em_fancy__setGLSLFaceOpts(void *userData, int index)
if (UNLIKELY(index >= em->bm->totface))
return DM_DRAW_OPTION_NORMAL;
- efa = EDBM_face_at_index(em, index);
+ efa = BM_face_at_index(em->bm, index);
if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) {
return DM_DRAW_OPTION_NORMAL;
@@ -3094,9 +3099,6 @@ static void draw_em_fancy(Scene *scene, ARegion *ar, View3D *v3d,
BMVert *eve_act = NULL;
bool use_occlude_wire = (v3d->flag2 & V3D_OCCLUDE_WIRE) && (dt > OB_WIRE);
- // BLI_assert(!cageDM || !(cageDM->dirty & DM_DIRTY_NORMALS));
- BLI_assert(!finalDM || !(finalDM->dirty & DM_DIRTY_NORMALS));
-
if (em->bm->selected.last) {
BMEditSelection *ese = em->bm->selected.last;
/* face is handeled above */
@@ -3114,7 +3116,7 @@ static void draw_em_fancy(Scene *scene, ARegion *ar, View3D *v3d,
}
}
- EDBM_index_arrays_ensure(em, BM_VERT | BM_EDGE | BM_FACE);
+ BM_mesh_elem_table_ensure(em->bm, BM_VERT | BM_EDGE | BM_FACE);
if (check_object_draw_editweight(me, finalDM)) {
if (dt > OB_WIRE) {
@@ -3126,7 +3128,7 @@ static void draw_em_fancy(Scene *scene, ARegion *ar, View3D *v3d,
else {
glEnable(GL_DEPTH_TEST);
draw_mesh_paint_weight_faces(finalDM, false, draw_em_fancy__setFaceOpts, me->edit_btmesh);
- draw_mesh_paint_weight_edges(rv3d, finalDM, true, draw_dm_edges__setDrawOptions, me->edit_btmesh);
+ draw_mesh_paint_weight_edges(rv3d, finalDM, true, draw_dm_edges__setDrawOptions, me->edit_btmesh->bm);
glDisable(GL_DEPTH_TEST);
}
}
@@ -3369,8 +3371,6 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
if (!dm)
return;
- if (dm) BLI_assert(!(dm->dirty & DM_DIRTY_NORMALS));
-
/* Check to draw dynamic paint colors (or weights from WeightVG modifiers).
* Note: Last "preview-active" modifier in stack will win! */
if (DM_get_tessface_data_layer(dm, CD_PREVIEW_MCOL) && modifiers_isPreview(ob))
@@ -3473,7 +3473,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
glEnable(GL_LIGHTING);
glEnable(GL_COLOR_MATERIAL);
- dm->drawMappedFaces(dm, NULL, GPU_enable_material, NULL, NULL, DM_DRAW_USE_COLORS);
+ dm->drawMappedFaces(dm, NULL, draw_dm_override_material_color, NULL, NULL, DM_DRAW_USE_COLORS);
glDisable(GL_COLOR_MATERIAL);
glDisable(GL_LIGHTING);
@@ -3803,12 +3803,16 @@ static void drawDispListsolid(ListBase *lb, Object *ob, const short dflag,
glEnable(GL_LIGHTING);
glEnableClientState(GL_VERTEX_ARRAY);
- if (ob->transflag & OB_NEG_SCALE) glFrontFace(GL_CW);
- else glFrontFace(GL_CCW);
if (ob->type == OB_MBALL) { /* mball always smooth shaded */
+ if (ob->transflag & OB_NEG_SCALE) glFrontFace(GL_CW);
+ else glFrontFace(GL_CCW);
glShadeModel(GL_SMOOTH);
}
+ else {
+ if (ob->transflag & OB_NEG_SCALE) glFrontFace(GL_CCW);
+ else glFrontFace(GL_CW);
+ }
dl = lb->first;
while (dl) {
@@ -3971,7 +3975,7 @@ static bool drawDispList_nobackface(Scene *scene, View3D *v3d, RegionView3D *rv3
case OB_CURVE:
cu = ob->data;
- lb = &ob->disp;
+ lb = &ob->curve_cache->disp;
if (solid) {
dl = lb->first;
@@ -4021,7 +4025,7 @@ static bool drawDispList_nobackface(Scene *scene, View3D *v3d, RegionView3D *rv3
break;
case OB_SURF:
- lb = &ob->disp;
+ lb = &ob->curve_cache->disp;
if (solid) {
dl = lb->first;
@@ -4049,8 +4053,11 @@ static bool drawDispList_nobackface(Scene *scene, View3D *v3d, RegionView3D *rv3
case OB_MBALL:
if (BKE_mball_is_basis(ob)) {
- lb = &ob->disp;
- if (lb->first == NULL) BKE_displist_make_mball(scene, ob);
+ lb = ob->curve_cache ? &ob->curve_cache->disp : NULL;
+ if (ELEM(lb, lb->first, NULL)) {
+ BKE_displist_make_mball(scene, ob);
+ lb = &ob->curve_cache->disp;
+ }
if (lb->first == NULL) {
return true;
}
@@ -4087,7 +4094,7 @@ static bool drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *ba
if (v3d->flag2 & V3D_BACKFACE_CULLING) {
/* not all displists use same in/out normal direction convention */
glEnable(GL_CULL_FACE);
- glCullFace((base->object->type == OB_MBALL || base->object->derivedFinal) ? GL_BACK : GL_FRONT);
+ glCullFace(GL_BACK);
}
retval = drawDispList_nobackface(scene, v3d, rv3d, base, dt, dflag, ob_wire_col);
@@ -4566,7 +4573,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
pdd->ma_col = ma_col;
}
- psys->lattice = psys_get_lattice(&sim);
+ psys->lattice_deform_data = psys_create_lattice_deform_data(&sim);
/* circles don't use drawdata, so have to add a special case here */
if ((pdd || draw_as == PART_DRAW_CIRC) && draw_as != PART_DRAW_PATH) {
@@ -4892,9 +4899,9 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
pdd->flag &= ~PARTICLE_DRAW_DATA_UPDATED;
}
- if (psys->lattice) {
- end_latt_deform(psys->lattice);
- psys->lattice = NULL;
+ if (psys->lattice_deform_data) {
+ end_latt_deform(psys->lattice_deform_data);
+ psys->lattice_deform_data = NULL;
}
if (pdd) {
@@ -5642,7 +5649,7 @@ static void drawnurb(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
if ((cu->flag & CU_3D) && (ts->normalsize > 0.0015f) && (cu->drawflag & CU_HIDE_NORMALS) == 0) {
UI_ThemeColor(TH_WIRE_EDIT);
- for (bl = cu->bev.first, nu = nurb; nu && bl; bl = bl->next, nu = nu->next) {
+ for (bl = ob->curve_cache->bev.first, nu = nurb; nu && bl; bl = bl->next, nu = nu->next) {
BevPoint *bevp = (BevPoint *)(bl + 1);
int nr = bl->nr;
int skip = nu->resolu / 16;
@@ -6065,7 +6072,7 @@ static void draw_forcefield(Object *ob, RegionView3D *rv3d,
}
else if (pd->forcefield == PFIELD_GUIDE && ob->type == OB_CURVE) {
Curve *cu = ob->data;
- if ((cu->flag & CU_PATH) && cu->path && cu->path->data) {
+ if ((cu->flag & CU_PATH) && ob->curve_cache->path && ob->curve_cache->path->data) {
float mindist, guidevec1[4], guidevec2[3];
//if (has_ipo_code(ob->ipo, OB_PD_FSTR))
@@ -6209,8 +6216,9 @@ static void draw_bb_quadric(BoundBox *bb, char type)
glPushMatrix();
if (type == OB_BOUND_SPHERE) {
+ float scale = MAX3(size[0], size[1], size[2]);
glTranslatef(cent[0], cent[1], cent[2]);
- glScalef(size[0], size[1], size[2]);
+ glScalef(scale, scale, scale);
gluSphere(qobj, 1.0, 8, 5);
}
else if (type == OB_BOUND_CYLINDER) {
@@ -6248,7 +6256,7 @@ static void draw_bounding_volume(Scene *scene, Object *ob, char type)
bb = BKE_mesh_boundbox_get(ob);
}
else if (ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT)) {
- bb = ob->bb ? ob->bb : ( (Curve *)ob->data)->bb;
+ bb = BKE_curve_boundbox_get(ob);
}
else if (ob->type == OB_MBALL) {
if (BKE_mball_is_basis(ob)) {
@@ -6283,9 +6291,7 @@ static void drawtexspace(Object *ob)
BKE_mesh_texspace_get(ob->data, loc, NULL, size);
}
else if (ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT)) {
- Curve *cu = ob->data;
- copy_v3_v3(size, cu->size);
- copy_v3_v3(loc, cu->loc);
+ BKE_curve_texspace_get(ob->data, loc, NULL, size);
}
else if (ob->type == OB_MBALL) {
MetaBall *mb = ob->data;
@@ -6319,11 +6325,10 @@ static void drawObjectSelect(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
RegionView3D *rv3d = ar->regiondata;
Object *ob = base->object;
- glLineWidth(2.0);
+ glLineWidth(UI_GetThemeValuef(TH_OUTLINE_WIDTH) * 2.0f);
glDepthMask(0);
if (ELEM3(ob->type, OB_FONT, OB_CURVE, OB_SURF)) {
- Curve *cu = ob->data;
DerivedMesh *dm = ob->derivedFinal;
bool has_faces = false;
@@ -6331,16 +6336,16 @@ static void drawObjectSelect(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
has_faces = dm->getNumTessFaces(dm);
}
else {
- has_faces = BKE_displist_has_faces(&ob->disp);
+ has_faces = BKE_displist_has_faces(&ob->curve_cache->disp);
}
- if (has_faces && ED_view3d_boundbox_clip(rv3d, ob->obmat, ob->bb ? ob->bb : cu->bb)) {
+ if (has_faces && ED_view3d_boundbox_clip(rv3d, ob->obmat, ob->bb)) {
draw_index_wire = false;
if (dm) {
draw_mesh_object_outline(v3d, ob, dm);
}
else {
- drawDispListwire(&ob->disp);
+ drawDispListwire(&ob->curve_cache->disp);
}
draw_index_wire = true;
}
@@ -6348,7 +6353,7 @@ static void drawObjectSelect(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
else if (ob->type == OB_MBALL) {
if (BKE_mball_is_basis(ob)) {
if ((base->flag & OB_FROMDUPLI) == 0)
- drawDispListwire(&ob->disp);
+ drawDispListwire(&ob->curve_cache->disp);
}
}
else if (ob->type == OB_ARMATURE) {
@@ -6375,8 +6380,7 @@ static void draw_wire_extra(Scene *scene, RegionView3D *rv3d, Object *ob, unsign
glDepthMask(0); /* disable write in zbuffer, selected edge wires show better */
if (ELEM3(ob->type, OB_FONT, OB_CURVE, OB_SURF)) {
- Curve *cu = ob->data;
- if (ED_view3d_boundbox_clip(rv3d, ob->obmat, ob->bb ? ob->bb : cu->bb)) {
+ if (ED_view3d_boundbox_clip(rv3d, ob->obmat, ob->bb)) {
if (ob->type == OB_CURVE)
draw_index_wire = false;
@@ -6384,7 +6388,7 @@ static void draw_wire_extra(Scene *scene, RegionView3D *rv3d, Object *ob, unsign
drawCurveDMWired(ob);
}
else {
- drawDispListwire(&ob->disp);
+ drawDispListwire(&ob->curve_cache->disp);
}
if (ob->type == OB_CURVE)
@@ -6393,7 +6397,7 @@ static void draw_wire_extra(Scene *scene, RegionView3D *rv3d, Object *ob, unsign
}
else if (ob->type == OB_MBALL) {
if (BKE_mball_is_basis(ob)) {
- drawDispListwire(&ob->disp);
+ drawDispListwire(&ob->curve_cache->disp);
}
}
@@ -6578,6 +6582,8 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
char dt;
short zbufoff = 0;
const bool is_obact = (ob == OBACT);
+ const bool render_override = (v3d->flag2 & V3D_RENDER_OVERRIDE) != 0;
+ bool particle_skip_object = false; /* Draw particles but not their emitter object. */
/* only once set now, will be removed too, should become a global standard */
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
@@ -6586,16 +6592,30 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
if (ob->restrictflag & OB_RESTRICT_VIEW) {
return;
}
- else if ((ob->restrictflag & OB_RESTRICT_RENDER) &&
- (v3d->flag2 & V3D_RENDER_OVERRIDE))
- {
+ else if ((ob->restrictflag & OB_RESTRICT_RENDER) && render_override) {
return;
}
}
- /* XXX particles are not safe for simultaneous threaded render */
- if (G.is_rendering && ob->particlesystem.first)
- return;
+ if (ob->particlesystem.first) {
+ /* XXX particles are not safe for simultaneous threaded render */
+ if (G.is_rendering) {
+ return;
+ }
+
+ if (ob->mode == OB_MODE_OBJECT) {
+ ParticleSystem *psys;
+
+ particle_skip_object = render_override;
+ for (psys = ob->particlesystem.first; psys; psys = psys->next) {
+ /* Once we have found a psys which renders its emitter object, we are done. */
+ if (psys->part->draw & PART_DRAW_EMITTER) {
+ particle_skip_object = false;
+ break;
+ }
+ }
+ }
+ }
/* xray delay? */
if ((dflag & DRAW_PICKING) == 0 && (base->flag & OB_FROMDUPLI) == 0 && (v3d->flag2 & V3D_RENDER_SHADOW) == 0) {
@@ -6621,7 +6641,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
view3d_cached_text_draw_begin();
/* draw motion paths (in view space) */
- if (ob->mpath && (v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) {
+ if (ob->mpath && !render_override) {
bAnimVizSettings *avs = &ob->avs;
/* setup drawing environment for paths */
@@ -6663,22 +6683,16 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
/* faceselect exception: also draw solid when (dt == wire), except in editmode */
if (is_obact && (ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT | OB_MODE_TEXTURE_PAINT))) {
if (ob->type == OB_MESH) {
-
- if (ob->mode & OB_MODE_EDIT) {
- /* pass */
+ if (dt < OB_SOLID) {
+ zbufoff = 1;
+ dt = OB_SOLID;
}
- else {
- if (dt < OB_SOLID) {
- zbufoff = 1;
- dt = OB_SOLID;
- }
-
- if (ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT)) {
- dt = OB_PAINT;
- }
- glEnable(GL_DEPTH_TEST);
+ if (ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT)) {
+ dt = OB_PAINT;
}
+
+ glEnable(GL_DEPTH_TEST);
}
else {
if (dt < OB_SOLID) {
@@ -6691,7 +6705,6 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
/* draw-extra supported for boundbox drawmode too */
if (dt >= OB_BOUNDBOX) {
-
dtx = ob->dtx;
if (ob->mode & OB_MODE_EDIT) {
// the only 2 extra drawtypes alowed in editmode
@@ -6700,238 +6713,241 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
}
- /* bad exception, solve this! otherwise outline shows too late */
- if (ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT)) {
- /* still needed for curves hidden in other layers. depgraph doesnt handle that yet */
- if (ob->disp.first == NULL) BKE_displist_make_curveTypes(scene, ob, 0);
- }
-
- /* draw outline for selected objects, mesh does itself */
- if ((v3d->flag & V3D_SELECT_OUTLINE) && ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) && ob->type != OB_MESH) {
- if (dt > OB_WIRE && (ob->mode & OB_MODE_EDIT) == 0 && (dflag & DRAW_SCENESET) == 0) {
- if (!(ob->dtx & OB_DRAWWIRE) && (ob->flag & SELECT) && !(dflag & (DRAW_PICKING | DRAW_CONSTCOLOR))) {
- drawObjectSelect(scene, v3d, ar, base, ob_wire_col);
+ if (!particle_skip_object) {
+ /* bad exception, solve this! otherwise outline shows too late */
+ if (ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT)) {
+ /* still needed for curves hidden in other layers. depgraph doesnt handle that yet */
+ if (ELEM(NULL, ob->curve_cache, ob->curve_cache->disp.first)) {
+ BKE_displist_make_curveTypes(scene, ob, 0);
}
}
- }
-
- switch (ob->type) {
- case OB_MESH:
- empty_object = draw_mesh_object(scene, ar, v3d, rv3d, base, dt, ob_wire_col, dflag);
- if (dflag != DRAW_CONSTCOLOR) dtx &= ~OB_DRAWWIRE; // mesh draws wire itself
-
- break;
- case OB_FONT:
- cu = ob->data;
- if (cu->editfont) {
- draw_textcurs(rv3d, cu->editfont->textcurs);
-
- if (cu->flag & CU_FAST) {
- cpack(0xFFFFFF);
- set_inverted_drawing(1);
- drawDispList(scene, v3d, rv3d, base, OB_WIRE, dflag, ob_wire_col);
- set_inverted_drawing(0);
- }
- else {
- drawDispList(scene, v3d, rv3d, base, dt, dflag, ob_wire_col);
+
+ /* draw outline for selected objects, mesh does itself */
+ if ((v3d->flag & V3D_SELECT_OUTLINE) && !render_override && ob->type != OB_MESH) {
+ if (dt > OB_WIRE && (ob->mode & OB_MODE_EDIT) == 0 && (dflag & DRAW_SCENESET) == 0) {
+ if (!(ob->dtx & OB_DRAWWIRE) && (ob->flag & SELECT) && !(dflag & (DRAW_PICKING | DRAW_CONSTCOLOR))) {
+ drawObjectSelect(scene, v3d, ar, base, ob_wire_col);
}
+ }
+ }
- if (cu->linewidth != 0.0f) {
- UI_ThemeColor(TH_WIRE_EDIT);
- copy_v3_v3(vec1, ob->orig);
- copy_v3_v3(vec2, ob->orig);
- vec1[0] += cu->linewidth;
- vec2[0] += cu->linewidth;
- vec1[1] += cu->linedist * cu->fsize;
- vec2[1] -= cu->lines * cu->linedist * cu->fsize;
- setlinestyle(3);
- glBegin(GL_LINE_STRIP);
- glVertex2fv(vec1);
- glVertex2fv(vec2);
- glEnd();
- setlinestyle(0);
- }
+ switch (ob->type) {
+ case OB_MESH:
+ empty_object = draw_mesh_object(scene, ar, v3d, rv3d, base, dt, ob_wire_col, dflag);
+ if (dflag != DRAW_CONSTCOLOR) dtx &= ~OB_DRAWWIRE; // mesh draws wire itself
- setlinestyle(3);
- for (i = 0; i < cu->totbox; i++) {
- if (cu->tb[i].w != 0.0f) {
- UI_ThemeColor(i == (cu->actbox - 1) ? TH_ACTIVE : TH_WIRE);
- vec1[0] = (cu->xof * cu->fsize) + cu->tb[i].x;
- vec1[1] = (cu->yof * cu->fsize) + cu->tb[i].y + cu->fsize;
- vec1[2] = 0.001;
+ break;
+ case OB_FONT:
+ cu = ob->data;
+ if (cu->editfont) {
+ draw_textcurs(rv3d, cu->editfont->textcurs);
+
+ if (cu->flag & CU_FAST) {
+ cpack(0xFFFFFF);
+ set_inverted_drawing(1);
+ drawDispList(scene, v3d, rv3d, base, OB_WIRE, dflag, ob_wire_col);
+ set_inverted_drawing(0);
+ }
+ else {
+ drawDispList(scene, v3d, rv3d, base, dt, dflag, ob_wire_col);
+ }
+
+ if (cu->linewidth != 0.0f) {
+ UI_ThemeColor(TH_WIRE_EDIT);
+ copy_v3_v3(vec1, ob->orig);
+ copy_v3_v3(vec2, ob->orig);
+ vec1[0] += cu->linewidth;
+ vec2[0] += cu->linewidth;
+ vec1[1] += cu->linedist * cu->fsize;
+ vec2[1] -= cu->lines * cu->linedist * cu->fsize;
+ setlinestyle(3);
glBegin(GL_LINE_STRIP);
- glVertex3fv(vec1);
- vec1[0] += cu->tb[i].w;
- glVertex3fv(vec1);
- vec1[1] -= cu->tb[i].h;
- glVertex3fv(vec1);
- vec1[0] -= cu->tb[i].w;
- glVertex3fv(vec1);
- vec1[1] += cu->tb[i].h;
- glVertex3fv(vec1);
+ glVertex2fv(vec1);
+ glVertex2fv(vec2);
glEnd();
+ setlinestyle(0);
}
- }
- setlinestyle(0);
+ setlinestyle(3);
+ for (i = 0; i < cu->totbox; i++) {
+ if (cu->tb[i].w != 0.0f) {
+ UI_ThemeColor(i == (cu->actbox - 1) ? TH_ACTIVE : TH_WIRE);
+ vec1[0] = (cu->xof * cu->fsize) + cu->tb[i].x;
+ vec1[1] = (cu->yof * cu->fsize) + cu->tb[i].y + cu->fsize;
+ vec1[2] = 0.001;
+ glBegin(GL_LINE_STRIP);
+ glVertex3fv(vec1);
+ vec1[0] += cu->tb[i].w;
+ glVertex3fv(vec1);
+ vec1[1] -= cu->tb[i].h;
+ glVertex3fv(vec1);
+ vec1[0] -= cu->tb[i].w;
+ glVertex3fv(vec1);
+ vec1[1] += cu->tb[i].h;
+ glVertex3fv(vec1);
+ glEnd();
+ }
+ }
+ setlinestyle(0);
- if (BKE_vfont_select_get(ob, &selstart, &selend) && cu->selboxes) {
- float selboxw;
- cpack(0xffffff);
- set_inverted_drawing(1);
- for (i = 0; i <= (selend - selstart); i++) {
- SelBox *sb = &(cu->selboxes[i]);
+ if (BKE_vfont_select_get(ob, &selstart, &selend) && cu->selboxes) {
+ float selboxw;
- if (i < (selend - selstart)) {
- if (cu->selboxes[i + 1].y == sb->y)
- selboxw = cu->selboxes[i + 1].x - sb->x;
- else
+ cpack(0xffffff);
+ set_inverted_drawing(1);
+ for (i = 0; i <= (selend - selstart); i++) {
+ SelBox *sb = &(cu->selboxes[i]);
+
+ if (i < (selend - selstart)) {
+ if (cu->selboxes[i + 1].y == sb->y)
+ selboxw = cu->selboxes[i + 1].x - sb->x;
+ else
+ selboxw = sb->w;
+ }
+ else {
selboxw = sb->w;
+ }
+ glBegin(GL_QUADS);
+ glVertex3f(sb->x, sb->y, 0.001);
+ glVertex3f(sb->x + selboxw, sb->y, 0.001);
+ glVertex3f(sb->x + selboxw, sb->y + sb->h, 0.001);
+ glVertex3f(sb->x, sb->y + sb->h, 0.001);
+ glEnd();
}
- else {
- selboxw = sb->w;
- }
- glBegin(GL_QUADS);
- glVertex3f(sb->x, sb->y, 0.001);
- glVertex3f(sb->x + selboxw, sb->y, 0.001);
- glVertex3f(sb->x + selboxw, sb->y + sb->h, 0.001);
- glVertex3f(sb->x, sb->y + sb->h, 0.001);
- glEnd();
+ set_inverted_drawing(0);
}
- set_inverted_drawing(0);
}
- }
- else if (dt == OB_BOUNDBOX) {
- if (((v3d->flag2 & V3D_RENDER_OVERRIDE) && v3d->drawtype >= OB_WIRE) == 0) {
- draw_bounding_volume(scene, ob, ob->boundtype);
+ else if (dt == OB_BOUNDBOX) {
+ if ((render_override && v3d->drawtype >= OB_WIRE) == 0) {
+ draw_bounding_volume(scene, ob, ob->boundtype);
+ }
+ }
+ else if (ED_view3d_boundbox_clip(rv3d, ob->obmat, ob->bb)) {
+ empty_object = drawDispList(scene, v3d, rv3d, base, dt, dflag, ob_wire_col);
}
- }
- else if (ED_view3d_boundbox_clip(rv3d, ob->obmat, ob->bb ? ob->bb : cu->bb)) {
- empty_object = drawDispList(scene, v3d, rv3d, base, dt, dflag, ob_wire_col);
- }
- break;
- case OB_CURVE:
- case OB_SURF:
- cu = ob->data;
+ break;
+ case OB_CURVE:
+ case OB_SURF:
+ cu = ob->data;
- if (cu->editnurb) {
- ListBase *nurbs = BKE_curve_editNurbs_get(cu);
- drawnurb(scene, v3d, rv3d, base, nurbs->first, dt, dflag, ob_wire_col);
- }
- else if (dt == OB_BOUNDBOX) {
- if (((v3d->flag2 & V3D_RENDER_OVERRIDE) && (v3d->drawtype >= OB_WIRE)) == 0) {
- draw_bounding_volume(scene, ob, ob->boundtype);
+ if (cu->editnurb) {
+ ListBase *nurbs = BKE_curve_editNurbs_get(cu);
+ drawnurb(scene, v3d, rv3d, base, nurbs->first, dt, dflag, ob_wire_col);
}
- }
- else if (ED_view3d_boundbox_clip(rv3d, ob->obmat, ob->bb ? ob->bb : cu->bb)) {
- empty_object = drawDispList(scene, v3d, rv3d, base, dt, dflag, ob_wire_col);
+ else if (dt == OB_BOUNDBOX) {
+ if ((render_override && (v3d->drawtype >= OB_WIRE)) == 0) {
+ draw_bounding_volume(scene, ob, ob->boundtype);
+ }
+ }
+ else if (ED_view3d_boundbox_clip(rv3d, ob->obmat, ob->bb)) {
+ empty_object = drawDispList(scene, v3d, rv3d, base, dt, dflag, ob_wire_col);
//XXX old animsys if (cu->path)
// curve_draw_speed(scene, ob);
- }
- break;
- case OB_MBALL:
- {
- MetaBall *mb = ob->data;
-
- if (mb->editelems)
- drawmball(scene, v3d, rv3d, base, dt, dflag, ob_wire_col);
- else if (dt == OB_BOUNDBOX) {
- if (((v3d->flag2 & V3D_RENDER_OVERRIDE) && (v3d->drawtype >= OB_WIRE)) == 0) {
- draw_bounding_volume(scene, ob, ob->boundtype);
}
+ break;
+ case OB_MBALL:
+ {
+ MetaBall *mb = ob->data;
+
+ if (mb->editelems)
+ drawmball(scene, v3d, rv3d, base, dt, dflag, ob_wire_col);
+ else if (dt == OB_BOUNDBOX) {
+ if ((render_override && (v3d->drawtype >= OB_WIRE)) == 0) {
+ draw_bounding_volume(scene, ob, ob->boundtype);
+ }
+ }
+ else
+ empty_object = drawmball(scene, v3d, rv3d, base, dt, dflag, ob_wire_col);
+ break;
}
- else
- empty_object = drawmball(scene, v3d, rv3d, base, dt, dflag, ob_wire_col);
- break;
- }
- case OB_EMPTY:
- if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) {
- if (ob->empty_drawtype == OB_EMPTY_IMAGE) {
- draw_empty_image(ob, dflag, ob_wire_col);
+ case OB_EMPTY:
+ if (!render_override) {
+ if (ob->empty_drawtype == OB_EMPTY_IMAGE) {
+ draw_empty_image(ob, dflag, ob_wire_col);
+ }
+ else {
+ drawaxes(ob->empty_drawsize, ob->empty_drawtype);
+ }
}
- else {
- drawaxes(ob->empty_drawsize, ob->empty_drawtype);
+ break;
+ case OB_LAMP:
+ if (!render_override) {
+ drawlamp(scene, v3d, rv3d, base, dt, dflag, ob_wire_col);
+ if (dtx || (base->flag & SELECT)) glMultMatrixf(ob->obmat);
}
- }
- break;
- case OB_LAMP:
- if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) {
- drawlamp(scene, v3d, rv3d, base, dt, dflag, ob_wire_col);
- if (dtx || (base->flag & SELECT)) glMultMatrixf(ob->obmat);
- }
- break;
- case OB_CAMERA:
- if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0 ||
- (rv3d->persp == RV3D_CAMOB && v3d->camera == ob)) /* special exception for active camera */
- {
- drawcamera(scene, v3d, rv3d, base, dflag, ob_wire_col);
- }
- break;
- case OB_SPEAKER:
- if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0)
- drawspeaker(scene, v3d, rv3d, ob, dflag);
- break;
- case OB_LATTICE:
- if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) {
- /* Do not allow boundbox in edit nor pose mode! */
- if ((dt == OB_BOUNDBOX) && (ob->mode & OB_MODE_EDIT))
- dt = OB_WIRE;
- if (dt == OB_BOUNDBOX) {
- draw_bounding_volume(scene, ob, ob->boundtype);
+ break;
+ case OB_CAMERA:
+ if (!render_override ||
+ (rv3d->persp == RV3D_CAMOB && v3d->camera == ob)) /* special exception for active camera */
+ {
+ drawcamera(scene, v3d, rv3d, base, dflag, ob_wire_col);
}
- else {
- drawlattice(scene, v3d, ob);
+ break;
+ case OB_SPEAKER:
+ if (!render_override)
+ drawspeaker(scene, v3d, rv3d, ob, dflag);
+ break;
+ case OB_LATTICE:
+ if (!render_override) {
+ /* Do not allow boundbox in edit nor pose mode! */
+ if ((dt == OB_BOUNDBOX) && (ob->mode & OB_MODE_EDIT))
+ dt = OB_WIRE;
+ if (dt == OB_BOUNDBOX) {
+ draw_bounding_volume(scene, ob, ob->boundtype);
+ }
+ else {
+ drawlattice(scene, v3d, ob);
+ }
}
- }
- break;
- case OB_ARMATURE:
- if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) {
- /* Do not allow boundbox in edit nor pose mode! */
- if ((dt == OB_BOUNDBOX) && (ob->mode & (OB_MODE_EDIT | OB_MODE_POSE)))
- dt = OB_WIRE;
- if (dt == OB_BOUNDBOX) {
- draw_bounding_volume(scene, ob, ob->boundtype);
+ break;
+ case OB_ARMATURE:
+ if (!render_override) {
+ /* Do not allow boundbox in edit nor pose mode! */
+ if ((dt == OB_BOUNDBOX) && (ob->mode & (OB_MODE_EDIT | OB_MODE_POSE)))
+ dt = OB_WIRE;
+ if (dt == OB_BOUNDBOX) {
+ draw_bounding_volume(scene, ob, ob->boundtype);
+ }
+ else {
+ if (dt > OB_WIRE)
+ GPU_enable_material(0, NULL); /* we use default material */
+ empty_object = draw_armature(scene, v3d, ar, base, dt, dflag, ob_wire_col, false);
+ if (dt > OB_WIRE)
+ GPU_disable_material();
+ }
}
- else {
- if (dt > OB_WIRE)
- GPU_enable_material(0, NULL); /* we use default material */
- empty_object = draw_armature(scene, v3d, ar, base, dt, dflag, ob_wire_col, false);
- if (dt > OB_WIRE)
- GPU_disable_material();
+ break;
+ default:
+ if (!render_override) {
+ drawaxes(1.0, OB_ARROWS);
}
- }
- break;
- default:
- if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) {
- drawaxes(1.0, OB_ARROWS);
- }
- break;
- }
-
- if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) {
-
- if (ob->soft /*&& dflag & OB_SBMOTION*/) {
- float mrt[3][3], msc[3][3], mtr[3][3];
- SoftBody *sb = NULL;
- float tipw = 0.5f, tiph = 0.5f, drawsize = 4.0f;
- if ((sb = ob->soft)) {
- if (sb->solverflags & SBSO_ESTIMATEIPO) {
+ break;
+ }
- glLoadMatrixf(rv3d->viewmat);
- copy_m3_m3(msc, sb->lscale);
- copy_m3_m3(mrt, sb->lrot);
- mul_m3_m3m3(mtr, mrt, msc);
- ob_draw_RE_motion(sb->lcom, mtr, tipw, tiph, drawsize);
- glMultMatrixf(ob->obmat);
+ if (!render_override) {
+ if (ob->soft /*&& dflag & OB_SBMOTION*/) {
+ float mrt[3][3], msc[3][3], mtr[3][3];
+ SoftBody *sb = NULL;
+ float tipw = 0.5f, tiph = 0.5f, drawsize = 4.0f;
+ if ((sb = ob->soft)) {
+ if (sb->solverflags & SBSO_ESTIMATEIPO) {
+
+ glLoadMatrixf(rv3d->viewmat);
+ copy_m3_m3(msc, sb->lscale);
+ copy_m3_m3(mrt, sb->lrot);
+ mul_m3_m3m3(mtr, mrt, msc);
+ ob_draw_RE_motion(sb->lcom, mtr, tipw, tiph, drawsize);
+ glMultMatrixf(ob->obmat);
+ }
}
}
- }
- if (ob->pd && ob->pd->forcefield) {
- draw_forcefield(ob, rv3d, dflag, ob_wire_col);
+ if (ob->pd && ob->pd->forcefield) {
+ draw_forcefield(ob, rv3d, dflag, ob_wire_col);
+ }
}
}
@@ -7050,6 +7066,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
// get view vector
copy_v3_v3(viewnormal, rv3d->viewinv[2]);
+ invert_m4_m4(ob->imat, ob->obmat);
mul_mat3_m4_v3(ob->imat, viewnormal);
normalize_v3(viewnormal);
@@ -7093,7 +7110,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
}
}
- if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) {
+ if (!render_override) {
bConstraint *con;
for (con = ob->constraints.first; con; con = con->next) {
@@ -7145,9 +7162,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
}
}
- if ((dt <= OB_SOLID) &&
- ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0))
- {
+ if ((dt <= OB_SOLID) && !render_override) {
if (((ob->gameflag & OB_DYNAMIC) &&
!ELEM(ob->collision_boundtype, OB_BOUND_TRIANGLE_MESH, OB_BOUND_CONVEX_HULL)) ||
@@ -7181,9 +7196,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
glDisable(GL_DEPTH_TEST);
}
- if ((base->flag & OB_FROMDUPLI) ||
- (v3d->flag2 & V3D_RENDER_OVERRIDE))
- {
+ if ((base->flag & OB_FROMDUPLI) || render_override) {
ED_view3d_clear_mats_rv3d(rv3d);
return;
}
@@ -7192,7 +7205,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
if (!is_obact || !(ob->mode & OB_MODE_ALL_PAINT)) {
int do_draw_center = -1; /* defines below are zero or positive... */
- if (v3d->flag2 & V3D_RENDER_OVERRIDE) {
+ if (render_override) {
/* don't draw */
}
else if ((scene->basact) == base)
@@ -7220,7 +7233,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
}
/* not for sets, duplicators or picking */
- if (dflag == 0 && (v3d->flag & V3D_HIDE_HELPLINES) == 0 && (v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) {
+ if (dflag == 0 && (v3d->flag & V3D_HIDE_HELPLINES) == 0 && !render_override) {
ListBase *list;
RigidBodyCon *rbc = ob->rigidbody_constraint;
@@ -7369,7 +7382,7 @@ static void bbs_mesh_verts__mapFunc(void *userData, int index, const float co[3]
{
void **ptrs = userData;
int offset = (intptr_t) ptrs[0];
- BMVert *eve = EDBM_vert_at_index(ptrs[1], index);
+ BMVert *eve = BM_vert_at_index(ptrs[1], index);
if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) {
WM_framebuffer_index_set(offset + index);
@@ -7378,7 +7391,7 @@ static void bbs_mesh_verts__mapFunc(void *userData, int index, const float co[3]
}
static void bbs_mesh_verts(BMEditMesh *em, DerivedMesh *dm, int offset)
{
- void *ptrs[2] = {(void *)(intptr_t) offset, em};
+ void *ptrs[2] = {(void *)(intptr_t) offset, em->bm};
glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE));
bglBegin(GL_POINTS);
@@ -7391,7 +7404,7 @@ static DMDrawOption bbs_mesh_wire__setDrawOptions(void *userData, int index)
{
void **ptrs = userData;
int offset = (intptr_t) ptrs[0];
- BMEdge *eed = EDBM_edge_at_index(ptrs[1], index);
+ BMEdge *eed = BM_edge_at_index(ptrs[1], index);
if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN)) {
WM_framebuffer_index_set(offset + index);
@@ -7403,13 +7416,13 @@ static DMDrawOption bbs_mesh_wire__setDrawOptions(void *userData, int index)
}
static void bbs_mesh_wire(BMEditMesh *em, DerivedMesh *dm, int offset)
{
- void *ptrs[2] = {(void *)(intptr_t) offset, em};
+ void *ptrs[2] = {(void *)(intptr_t) offset, em->bm};
dm->drawMappedEdges(dm, bbs_mesh_wire__setDrawOptions, ptrs);
}
static DMDrawOption bbs_mesh_solid__setSolidDrawOptions(void *userData, int index)
{
- BMFace *efa = EDBM_face_at_index(((void **)userData)[0], index);
+ BMFace *efa = BM_face_at_index(((void **)userData)[0], index);
if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) {
if (((void **)userData)[1]) {
@@ -7424,7 +7437,7 @@ static DMDrawOption bbs_mesh_solid__setSolidDrawOptions(void *userData, int inde
static void bbs_mesh_solid__drawCenter(void *userData, int index, const float cent[3], const float UNUSED(no[3]))
{
- BMFace *efa = EDBM_face_at_index(((void **)userData)[0], index);
+ BMFace *efa = BM_face_at_index(((void **)userData)[0], index);
if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) {
WM_framebuffer_index_set(index + 1);
@@ -7437,7 +7450,7 @@ static void bbs_mesh_solid__drawCenter(void *userData, int index, const float ce
static void bbs_mesh_solid_EM(BMEditMesh *em, Scene *scene, View3D *v3d,
Object *ob, DerivedMesh *dm, int facecol)
{
- void *ptrs[2] = {em, NULL}; //second one being null means to draw black
+ void *ptrs[2] = {em->bm, NULL}; //second one being null means to draw black
cpack(0);
if (facecol) {
@@ -7535,7 +7548,7 @@ void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec
DerivedMesh *dm = editbmesh_get_derived_cage(scene, ob, em, CD_MASK_BAREMESH);
- EDBM_index_arrays_ensure(em, BM_VERT | BM_EDGE | BM_FACE);
+ BM_mesh_elem_table_ensure(em->bm, BM_VERT | BM_EDGE | BM_FACE);
bbs_mesh_solid_EM(em, scene, v3d, ob, dm, ts->selectmode & SCE_SELECT_FACE);
if (ts->selectmode & SCE_SELECT_FACE)
diff --git a/source/blender/editors/space_view3d/drawvolume.c b/source/blender/editors/space_view3d/drawvolume.c
index 542ed7af0e6..a7940faa47d 100644
--- a/source/blender/editors/space_view3d/drawvolume.c
+++ b/source/blender/editors/space_view3d/drawvolume.c
@@ -83,6 +83,7 @@ struct GPUTexture;
#ifdef DEBUG_DRAW_TIME
# include "PIL_time.h"
+# include "PIL_time_utildefines.h"
#endif
static int intersect_edges(float *points, float a, float b, float c, float d, float edges[12][2][3])
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 6c61c2af816..58c0df6b6bd 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -44,6 +44,7 @@
#include "BKE_context.h"
#include "BKE_icons.h"
+#include "BKE_main.h"
#include "BKE_object.h"
#include "BKE_screen.h"
@@ -258,6 +259,25 @@ void ED_view3d_check_mats_rv3d(struct RegionView3D *rv3d)
}
#endif
+void ED_view3d_shade_update(Main *bmain, View3D *v3d, ScrArea *sa)
+{
+ wmWindowManager *wm = bmain->wm.first;
+
+ if (v3d->drawtype != OB_RENDER) {
+ ARegion *ar;
+
+ for (ar = sa->regionbase.first; ar; ar = ar->next) {
+ RegionView3D *rv3d = ar->regiondata;
+
+ if (rv3d && rv3d->render_engine) {
+ WM_jobs_kill_type(wm, ar, WM_JOB_TYPE_RENDER_PREVIEW);
+ RE_engine_free(rv3d->render_engine);
+ rv3d->render_engine = NULL;
+ }
+ }
+ }
+}
+
/* ******************** default callbacks for view3d space ***************** */
static SpaceLink *view3d_new(const bContext *C)
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index 75e7605df6b..eea084b4750 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -682,7 +682,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
}
}
BKE_nurb_test2D(nu);
- BKE_nurb_handles_test(nu); /* test for bezier too */
+ BKE_nurb_handles_test(nu, true); /* test for bezier too */
nu = nu->next;
}
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index fa8d43b1756..8b7d5756429 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -113,9 +113,9 @@ static void star_stuff_init_func(void)
glPointSize(1.0);
glBegin(GL_POINTS);
}
-static void star_stuff_vertex_func(float *i)
+static void star_stuff_vertex_func(const float vec[3])
{
- glVertex3fv(i);
+ glVertex3fv(vec);
}
static void star_stuff_term_func(void)
{
@@ -220,10 +220,10 @@ void ED_view3d_clipping_enable(void)
static bool view3d_clipping_test(const float co[3], float clip[6][4])
{
- if (0.0f < clip[0][3] + dot_v3v3(co, clip[0]))
- if (0.0f < clip[1][3] + dot_v3v3(co, clip[1]))
- if (0.0f < clip[2][3] + dot_v3v3(co, clip[2]))
- if (0.0f < clip[3][3] + dot_v3v3(co, clip[3]))
+ if (plane_point_side_v3(clip[0], co) > 0.0f)
+ if (plane_point_side_v3(clip[1], co) > 0.0f)
+ if (plane_point_side_v3(clip[2], co) > 0.0f)
+ if (plane_point_side_v3(clip[3], co) > 0.0f)
return false;
return true;
@@ -567,7 +567,7 @@ static void drawcursor(Scene *scene, ARegion *ar, View3D *v3d)
int co[2];
/* we don't want the clipping for cursor */
- if (ED_view3d_project_int_global(ar, give_cursor(scene, v3d), co, V3D_PROJ_TEST_NOP) == V3D_PROJ_RET_OK) {
+ if (ED_view3d_project_int_global(ar, ED_view3d_cursor3d_get(scene, v3d), co, V3D_PROJ_TEST_NOP) == V3D_PROJ_RET_OK) {
const float f5 = 0.25f * U.widget_unit;
const float f10 = 0.5f * U.widget_unit;
const float f20 = U.widget_unit;
@@ -1662,7 +1662,7 @@ static void view3d_draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d,
if (bgpic->flag & V3D_BGPIC_CAMERACLIP) {
if (scene->camera)
- clip = BKE_object_movieclip_get(scene, scene->camera, 1);
+ clip = BKE_object_movieclip_get(scene, scene->camera, true);
}
else {
clip = bgpic->clip;
@@ -2073,7 +2073,7 @@ static void draw_dupli_objects_color(Scene *scene, ARegion *ar, View3D *v3d, Bas
bb = *bb_tmp; /* must make a copy */
/* disable boundbox check for list creation */
- BKE_object_boundbox_flag(dob->ob, OB_BB_DISABLED, 1);
+ BKE_object_boundbox_flag(dob->ob, BOUNDBOX_DISABLED, 1);
/* need this for next part of code */
unit_m4(dob->ob->obmat); /* obmat gets restored */
@@ -2083,7 +2083,7 @@ static void draw_dupli_objects_color(Scene *scene, ARegion *ar, View3D *v3d, Bas
glEndList();
use_displist = true;
- BKE_object_boundbox_flag(dob->ob, OB_BB_DISABLED, 0);
+ BKE_object_boundbox_flag(dob->ob, BOUNDBOX_DISABLED, 0);
}
}
if (use_displist) {
@@ -2857,7 +2857,7 @@ ImBuf *ED_view3d_draw_offscreen_imbuf_simple(Scene *scene, Object *camera, int w
/* NOTE: the info that this uses is updated in ED_refresh_viewport_fps(),
* which currently gets called during SCREEN_OT_animation_step.
*/
-static void draw_viewport_fps(Scene *scene, rcti *rect)
+void ED_scene_draw_fps(Scene *scene, rcti *rect)
{
ScreenFrameRateInfo *fpsi = scene->fps_info;
float fps;
@@ -3454,7 +3454,7 @@ static void view3d_main_area_draw_info(const bContext *C, ARegion *ar, const cha
if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) {
if ((U.uiflag & USER_SHOW_FPS) && ED_screen_animation_playing(wm)) {
- draw_viewport_fps(scene, &rect);
+ ED_scene_draw_fps(scene, &rect);
}
else if (U.uiflag & USER_SHOW_VIEWPORTNAME) {
draw_viewport_name(ar, v3d, &rect);
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index 7b8c197f3e6..bb41e727d90 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -85,26 +85,23 @@
/* for ndof prints */
// #define DEBUG_NDOF_MOTION
-static void view3d_offset_lock_report(ReportList *reports)
-{
- BKE_report(reports, RPT_WARNING, "View offset is locked");
-}
-
bool ED_view3d_offset_lock_check(struct View3D *v3d, struct RegionView3D *rv3d)
{
return (rv3d->persp != RV3D_CAMOB) && (v3d->ob_centre_cursor || v3d->ob_centre);
}
-#define VIEW3D_OP_OFS_LOCK_TEST(C, op) \
- { \
- View3D *v3d_tmp = CTX_wm_view3d(C); \
- RegionView3D *rv3d_tmp = CTX_wm_region_view3d(C); \
- if (ED_view3d_offset_lock_check(v3d_tmp, rv3d_tmp)) { \
- view3d_offset_lock_report((op)->reports); \
- return OPERATOR_CANCELLED; \
- } \
- } (void)0
-
+static bool view3d_operator_offset_lock_check(bContext *C, wmOperator *op)
+{
+ View3D *v3d = CTX_wm_view3d(C);
+ RegionView3D *rv3d = CTX_wm_region_view3d(C);
+ if (ED_view3d_offset_lock_check(v3d, rv3d)) {
+ BKE_report(op->reports, RPT_WARNING, "View offset is locked");
+ return true;
+ }
+ else {
+ return false;
+ }
+}
/* ********************** view3d_edit: view manipulations ********************* */
@@ -182,6 +179,27 @@ bool ED_view3d_camera_lock_sync(View3D *v3d, RegionView3D *rv3d)
}
}
+/**
+ * For viewport operators that exit camera persp.
+ *
+ * \note This differs from simply setting ``rv3d->persp = persp`` because it
+ * sets the ``ofs`` and ``dist`` values of the viewport so it matches the camera,
+ * otherwise switching out of camera view may jump to a different part of the scene.
+ */
+static void view3d_persp_switch_from_camera(View3D *v3d, RegionView3D *rv3d, const char persp)
+{
+ BLI_assert(rv3d->persp == RV3D_CAMOB);
+ BLI_assert(persp != RV3D_CAMOB);
+
+ if (v3d->camera) {
+ rv3d->dist = ED_view3d_offset_distance(v3d->camera->obmat, rv3d->ofs, VIEW3D_DIST_FALLBACK);
+ ED_view3d_from_object(v3d->camera, rv3d->ofs, rv3d->viewquat, &rv3d->dist, NULL);
+ }
+
+ if (!ED_view3d_camera_lock_check(v3d, rv3d)) {
+ rv3d->persp = persp;
+ }
+}
/* ********************* box view support ***************** */
@@ -378,6 +396,7 @@ void ED_view3d_quadview_update(ScrArea *sa, ARegion *ar, bool do_clip)
/* ************************** init for view ops **********************************/
typedef struct ViewOpsData {
+ /* context pointers (assigned by viewops_data_alloc) */
ScrArea *sa;
ARegion *ar;
View3D *v3d;
@@ -435,10 +454,17 @@ static void calctrackballvec(const rcti *rect, int mx, int my, float vec[3])
}
-static void viewops_data_create(bContext *C, wmOperator *op, const wmEvent *event)
+/* -------------------------------------------------------------------- */
+/* ViewOpsData */
+
+/** \name Generic View Operator Custom-Data.
+ * \{ */
+
+/**
+ * Allocate and fill in context pointers for #ViewOpsData
+ */
+static void viewops_data_alloc(bContext *C, wmOperator *op)
{
- static float lastofs[3] = {0, 0, 0};
- RegionView3D *rv3d;
ViewOpsData *vod = MEM_callocN(sizeof(ViewOpsData), "viewops data");
/* store data */
@@ -446,7 +472,17 @@ static void viewops_data_create(bContext *C, wmOperator *op, const wmEvent *even
vod->sa = CTX_wm_area(C);
vod->ar = CTX_wm_region(C);
vod->v3d = vod->sa->spacedata.first;
- vod->rv3d = rv3d = vod->ar->regiondata;
+ vod->rv3d = vod->ar->regiondata;
+}
+
+/**
+ * Calculate the values for #ViewOpsData
+ */
+static void viewops_data_create(bContext *C, wmOperator *op, const wmEvent *event)
+{
+ ViewOpsData *vod = op->customdata;
+ static float lastofs[3] = {0, 0, 0};
+ RegionView3D *rv3d = vod->rv3d;
/* set the view from the camera, if view locking is enabled.
* we may want to make this optional but for now its needed always */
@@ -489,10 +525,15 @@ static void viewops_data_create(bContext *C, wmOperator *op, const wmEvent *even
}
else if (U.uiflag & USER_ZBUF_ORBIT) {
Scene *scene = CTX_data_scene(C);
+ float fallback_depth_pt[3];
view3d_operator_needs_opengl(C); /* needed for zbuf drawing */
- if ((vod->use_dyn_ofs = ED_view3d_autodist(scene, vod->ar, vod->v3d, event->mval, vod->dyn_ofs, true))) {
+ negate_v3_v3(fallback_depth_pt, rv3d->ofs);
+
+ if ((vod->use_dyn_ofs = ED_view3d_autodist(scene, vod->ar, vod->v3d,
+ event->mval, vod->dyn_ofs, true, fallback_depth_pt)))
+ {
if (rv3d->is_persp) {
float my_origin[3]; /* original G.vd->ofs */
float my_pivot[3]; /* view */
@@ -522,6 +563,14 @@ static void viewops_data_create(bContext *C, wmOperator *op, const wmEvent *even
negate_v3_v3(rv3d->ofs, dvec);
}
+ else {
+ float mval_ar_mid[2] = {
+ (float)vod->ar->winx / 2.0f,
+ (float)vod->ar->winy / 2.0f};
+
+ ED_view3d_win_to_3d(vod->ar, vod->dyn_ofs, mval_ar_mid, rv3d->ofs);
+ negate_v3(rv3d->ofs);
+ }
negate_v3(vod->dyn_ofs);
copy_v3_v3(vod->ofs, rv3d->ofs);
}
@@ -576,6 +625,8 @@ static void viewops_data_free(bContext *C, wmOperator *op)
if (p && (p->flags & PAINT_FAST_NAVIGATE))
ED_region_tag_redraw(ar);
}
+/** \} */
+
/* ************************** viewrotate **********************************/
@@ -928,37 +979,27 @@ static int viewrotate_modal(bContext *C, wmOperator *op, const wmEvent *event)
static int viewrotate_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
ViewOpsData *vod;
- RegionView3D *rv3d;
/* makes op->customdata */
+ viewops_data_alloc(C, op);
viewops_data_create(C, op, event);
vod = op->customdata;
- rv3d = vod->rv3d;
- if (rv3d->viewlock) { /* poll should check but in some cases fails, see poll func for details */
+ if (vod->rv3d->viewlock) { /* poll should check but in some cases fails, see poll func for details */
viewops_data_free(C, op);
return OPERATOR_PASS_THROUGH;
}
/* switch from camera view when: */
- if (rv3d->persp != RV3D_PERSP) {
+ if (vod->rv3d->persp != RV3D_PERSP) {
if (U.uiflag & USER_AUTOPERSP) {
if (!ED_view3d_camera_lock_check(vod->v3d, vod->rv3d)) {
- rv3d->persp = RV3D_PERSP;
+ vod->rv3d->persp = RV3D_PERSP;
}
}
- else if (rv3d->persp == RV3D_CAMOB) {
-
- /* changed since 2.4x, use the camera view */
- if (vod->v3d->camera) {
- rv3d->dist = ED_view3d_offset_distance(vod->v3d->camera->obmat, rv3d->ofs, VIEW3D_DIST_FALLBACK);
- ED_view3d_from_object(vod->v3d->camera, rv3d->ofs, rv3d->viewquat, &rv3d->dist, NULL);
- }
-
- if (!ED_view3d_camera_lock_check(vod->v3d, vod->rv3d)) {
- rv3d->persp = rv3d->lpersp;
- }
+ else if (vod->rv3d->persp == RV3D_CAMOB) {
+ view3d_persp_switch_from_camera(vod->v3d, vod->rv3d, vod->rv3d->lpersp);
}
ED_region_tag_redraw(vod->ar);
}
@@ -970,7 +1011,7 @@ static int viewrotate_invoke(bContext *C, wmOperator *op, const wmEvent *event)
else
viewrotate_apply(vod, event->prevx, event->prevy);
- ED_view3d_depth_tag_update(rv3d);
+ ED_view3d_depth_tag_update(vod->rv3d);
viewops_data_free(C, op);
@@ -979,7 +1020,7 @@ static int viewrotate_invoke(bContext *C, wmOperator *op, const wmEvent *event)
else if (event->type == MOUSEROTATE) {
/* MOUSEROTATE performs orbital rotation, so y axis delta is set to 0 */
viewrotate_apply(vod, event->prevx, event->y);
- ED_view3d_depth_tag_update(rv3d);
+ ED_view3d_depth_tag_update(vod->rv3d);
viewops_data_free(C, op);
@@ -1012,9 +1053,13 @@ static int view3d_camera_user_poll(bContext *C)
static int view3d_lock_poll(bContext *C)
{
View3D *v3d = CTX_wm_view3d(C);
- RegionView3D *rv3d = CTX_wm_region_view3d(C);
-
- return ED_view3d_offset_lock_check(v3d, rv3d);
+ if (v3d) {
+ RegionView3D *rv3d = CTX_wm_region_view3d(C);
+ if (rv3d) {
+ return ED_view3d_offset_lock_check(v3d, rv3d);
+ }
+ }
+ return false;
}
static int viewrotate_cancel(bContext *C, wmOperator *op)
@@ -1143,8 +1188,9 @@ static void view3d_ndof_orbit(const struct wmNDOFMotionData *ndof, RegionView3D
static int ndof_orbit_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
- if (event->type != NDOF_MOTION)
+ if (event->type != NDOF_MOTION) {
return OPERATOR_CANCELLED;
+ }
else {
View3D *v3d = CTX_wm_view3d(C);
ViewOpsData *vod;
@@ -1153,6 +1199,7 @@ static int ndof_orbit_invoke(bContext *C, wmOperator *op, const wmEvent *event)
ED_view3d_camera_lock_init(v3d, rv3d);
+ viewops_data_alloc(C, op);
viewops_data_create(C, op, event);
vod = op->customdata;
@@ -1210,7 +1257,7 @@ void VIEW3D_OT_ndof_orbit(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "NDOF Orbit View";
- ot->description = "Explore every angle of an object using the 3D mouse";
+ ot->description = "Orbit the view using the 3D mouse";
ot->idname = "VIEW3D_OT_ndof_orbit";
/* api callbacks */
@@ -1225,8 +1272,9 @@ void VIEW3D_OT_ndof_orbit(struct wmOperatorType *ot)
static int ndof_orbit_zoom_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
- if (event->type != NDOF_MOTION)
+ if (event->type != NDOF_MOTION) {
return OPERATOR_CANCELLED;
+ }
else {
ViewOpsData *vod;
View3D *v3d = CTX_wm_view3d(C);
@@ -1237,6 +1285,7 @@ static int ndof_orbit_zoom_invoke(bContext *C, wmOperator *op, const wmEvent *ev
rv3d->rot_angle = 0.f; /* off by default, until changed later this function */
+ viewops_data_alloc(C, op);
viewops_data_create(C, op, event);
vod = op->customdata;
@@ -1306,7 +1355,7 @@ void VIEW3D_OT_ndof_orbit_zoom(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "NDOF Orbit View with Zoom";
- ot->description = "Explore every angle of an object using the 3D mouse";
+ ot->description = "Orbit and zoom the view using the 3D mouse";
ot->idname = "VIEW3D_OT_ndof_orbit_zoom";
/* api callbacks */
@@ -1322,14 +1371,16 @@ void VIEW3D_OT_ndof_orbit_zoom(struct wmOperatorType *ot)
*/
static int ndof_pan_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
- if (event->type != NDOF_MOTION)
+ if (event->type != NDOF_MOTION) {
return OPERATOR_CANCELLED;
+ }
else {
View3D *v3d = CTX_wm_view3d(C);
RegionView3D *rv3d = CTX_wm_region_view3d(C);
wmNDOFMotionData *ndof = (wmNDOFMotionData *) event->customdata;
- VIEW3D_OP_OFS_LOCK_TEST(C, op);
+ if (view3d_operator_offset_lock_check(C, op))
+ return OPERATOR_CANCELLED;
ED_view3d_camera_lock_init(v3d, rv3d);
@@ -1401,7 +1452,7 @@ void VIEW3D_OT_ndof_pan(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "NDOF Pan View";
- ot->description = "Position your viewpoint with the 3D mouse";
+ ot->description = "Pan the view with the 3D mouse";
ot->idname = "VIEW3D_OT_ndof_pan";
/* api callbacks */
@@ -1422,13 +1473,13 @@ static int ndof_all_invoke(bContext *C, wmOperator *op, const wmEvent *event)
return OPERATOR_CANCELLED;
}
else {
-
ViewOpsData *vod;
RegionView3D *rv3d;
View3D *v3d = CTX_wm_view3d(C);
wmNDOFMotionData *ndof = (wmNDOFMotionData *) event->customdata;
+ viewops_data_alloc(C, op);
viewops_data_create(C, op, event);
vod = op->customdata;
rv3d = vod->rv3d;
@@ -1492,7 +1543,7 @@ void VIEW3D_OT_ndof_all(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "NDOF Move View";
- ot->description = "Position your viewpoint with the 3D mouse";
+ ot->description = "Pan and rotate the view with the 3D mouse";
ot->idname = "VIEW3D_OT_ndof_all";
/* api callbacks */
@@ -1627,6 +1678,7 @@ static int viewmove_invoke(bContext *C, wmOperator *op, const wmEvent *event)
ViewOpsData *vod;
/* makes op->customdata */
+ viewops_data_alloc(C, op);
viewops_data_create(C, op, event);
vod = op->customdata;
@@ -1993,6 +2045,7 @@ static int viewzoom_invoke(bContext *C, wmOperator *op, const wmEvent *event)
ViewOpsData *vod;
/* makes op->customdata */
+ viewops_data_alloc(C, op);
viewops_data_create(C, op, event);
vod = op->customdata;
@@ -2207,12 +2260,34 @@ static int viewdolly_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
ViewOpsData *vod;
- VIEW3D_OP_OFS_LOCK_TEST(C, op);
+ if (view3d_operator_offset_lock_check(C, op))
+ return OPERATOR_CANCELLED;
/* makes op->customdata */
- viewops_data_create(C, op, event);
+ viewops_data_alloc(C, op);
vod = op->customdata;
+ if (vod->rv3d->viewlock) { /* poll should check but in some cases fails, see poll func for details */
+ viewops_data_free(C, op);
+ return OPERATOR_PASS_THROUGH;
+ }
+
+ /* needs to run before 'viewops_data_create' so the backup 'rv3d->ofs' is correct */
+ /* switch from camera view when: */
+ if (vod->rv3d->persp != RV3D_PERSP) {
+ if (vod->rv3d->persp == RV3D_CAMOB) {
+ /* ignore rv3d->lpersp because dolly only makes sense in perspective mode */
+ view3d_persp_switch_from_camera(vod->v3d, vod->rv3d, RV3D_PERSP);
+ }
+ else {
+ vod->rv3d->persp = RV3D_PERSP;
+ }
+ ED_region_tag_redraw(vod->ar);
+ }
+
+ viewops_data_create(C, op, event);
+
+
/* if one or the other zoom position aren't set, set from event */
if (!RNA_struct_property_is_set(op->ptr, "mx") || !RNA_struct_property_is_set(op->ptr, "my")) {
RNA_int_set(op->ptr, "mx", event->x);
@@ -2257,25 +2332,6 @@ static int viewdolly_invoke(bContext *C, wmOperator *op, const wmEvent *event)
return OPERATOR_FINISHED;
}
-/* like ED_operator_region_view3d_active but check its not in ortho view */
-static int viewdolly_poll(bContext *C)
-{
- RegionView3D *rv3d = CTX_wm_region_view3d(C);
-
- if (rv3d) {
- if (rv3d->persp == RV3D_PERSP) {
- return 1;
- }
- else {
- View3D *v3d = CTX_wm_view3d(C);
- if (ED_view3d_camera_lock_check(v3d, rv3d)) {
- return 1;
- }
- }
- }
- return 0;
-}
-
static int viewdolly_cancel(bContext *C, wmOperator *op)
{
viewops_data_free(C, op);
@@ -2294,7 +2350,7 @@ void VIEW3D_OT_dolly(wmOperatorType *ot)
ot->invoke = viewdolly_invoke;
ot->exec = viewdolly_exec;
ot->modal = viewdolly_modal;
- ot->poll = viewdolly_poll;
+ ot->poll = ED_operator_region_view3d_active;
ot->cancel = viewdolly_cancel;
/* flags */
@@ -2306,8 +2362,8 @@ void VIEW3D_OT_dolly(wmOperatorType *ot)
}
static void view3d_from_minmax(bContext *C, View3D *v3d, ARegion *ar,
- const float min[3], const float max[3],
- bool ok_dist)
+ const float min[3], const float max[3],
+ bool ok_dist, const int smooth_viewtx)
{
RegionView3D *rv3d = ar->regiondata;
float afm[3];
@@ -2369,10 +2425,14 @@ static void view3d_from_minmax(bContext *C, View3D *v3d, ARegion *ar,
if (rv3d->persp == RV3D_CAMOB && !ED_view3d_camera_lock_check(v3d, rv3d)) {
rv3d->persp = RV3D_PERSP;
- view3d_smooth_view(C, v3d, ar, v3d->camera, NULL, new_ofs, NULL, ok_dist ? &new_dist : NULL, NULL);
+ ED_view3d_smooth_view(C, v3d, ar, v3d->camera, NULL,
+ new_ofs, NULL, ok_dist ? &new_dist : NULL, NULL,
+ smooth_viewtx);
}
else {
- view3d_smooth_view(C, v3d, ar, NULL, NULL, new_ofs, NULL, ok_dist ? &new_dist : NULL, NULL);
+ ED_view3d_smooth_view(C, v3d, ar, NULL, NULL,
+ new_ofs, NULL, ok_dist ? &new_dist : NULL, NULL,
+ smooth_viewtx);
}
/* smooth view does viewlock RV3D_BOXVIEW copy */
@@ -2381,7 +2441,7 @@ static void view3d_from_minmax(bContext *C, View3D *v3d, ARegion *ar,
/* same as view3d_from_minmax but for all regions (except cameras) */
static void view3d_from_minmax_multi(bContext *C, View3D *v3d,
const float min[3], const float max[3],
- const bool ok_dist)
+ const bool ok_dist, const int smooth_viewtx)
{
ScrArea *sa = CTX_wm_area(C);
ARegion *ar;
@@ -2391,7 +2451,7 @@ static void view3d_from_minmax_multi(bContext *C, View3D *v3d,
/* when using all regions, don't jump out of camera view,
* but _do_ allow locked cameras to be moved */
if ((rv3d->persp != RV3D_CAMOB) || ED_view3d_camera_lock_check(v3d, rv3d)) {
- view3d_from_minmax(C, v3d, ar, min, max, ok_dist);
+ view3d_from_minmax(C, v3d, ar, min, max, ok_dist, smooth_viewtx);
}
}
}
@@ -2409,13 +2469,14 @@ static int view3d_all_exec(bContext *C, wmOperator *op) /* was view3d_home() in
/* any one of the regions may be locked */
(use_all_regions && v3d->flag2 & V3D_LOCK_CAMERA));
const bool center = RNA_boolean_get(op->ptr, "center");
+ const int smooth_viewtx = WM_operator_smooth_viewtx_get(op);
float min[3], max[3];
bool change = false;
if (center) {
/* in 2.4x this also move the cursor to (0, 0, 0) (with shift+c). */
- curs = give_cursor(scene, v3d);
+ curs = ED_view3d_cursor3d_get(scene, v3d);
zero_v3(min);
zero_v3(max);
zero_v3(curs);
@@ -2448,10 +2509,10 @@ static int view3d_all_exec(bContext *C, wmOperator *op) /* was view3d_home() in
}
if (use_all_regions) {
- view3d_from_minmax_multi(C, v3d, min, max, true);
+ view3d_from_minmax_multi(C, v3d, min, max, true, smooth_viewtx);
}
else {
- view3d_from_minmax(C, v3d, ar, min, max, true);
+ view3d_from_minmax(C, v3d, ar, min, max, true, smooth_viewtx);
}
return OPERATOR_FINISHED;
@@ -2493,6 +2554,7 @@ static int viewselected_exec(bContext *C, wmOperator *op)
const bool skip_camera = (ED_view3d_camera_lock_check(v3d, ar->regiondata) ||
/* any one of the regions may be locked */
(use_all_regions && v3d->flag2 & V3D_LOCK_CAMERA));
+ const int smooth_viewtx = WM_operator_smooth_viewtx_get(op);
INIT_MINMAX(min, max);
@@ -2568,10 +2630,10 @@ static int viewselected_exec(bContext *C, wmOperator *op)
}
if (use_all_regions) {
- view3d_from_minmax_multi(C, v3d, min, max, ok_dist);
+ view3d_from_minmax_multi(C, v3d, min, max, ok_dist, smooth_viewtx);
}
else {
- view3d_from_minmax(C, v3d, ar, min, max, ok_dist);
+ view3d_from_minmax(C, v3d, ar, min, max, ok_dist, smooth_viewtx);
}
// XXX BIF_view3d_previewrender_signal(curarea, PR_DBASE|PR_DISPRECT);
@@ -2683,7 +2745,7 @@ void VIEW3D_OT_view_lock_to_active(wmOperatorType *ot)
ot->flag = 0;
}
-static int viewcenter_cursor_exec(bContext *C, wmOperator *UNUSED(op))
+static int viewcenter_cursor_exec(bContext *C, wmOperator *op)
{
View3D *v3d = CTX_wm_view3d(C);
RegionView3D *rv3d = CTX_wm_region_view3d(C);
@@ -2691,11 +2753,14 @@ static int viewcenter_cursor_exec(bContext *C, wmOperator *UNUSED(op))
if (rv3d) {
ARegion *ar = CTX_wm_region(C);
+ const int smooth_viewtx = WM_operator_smooth_viewtx_get(op);
/* non camera center */
float new_ofs[3];
- negate_v3_v3(new_ofs, give_cursor(scene, v3d));
- view3d_smooth_view(C, v3d, ar, NULL, NULL, new_ofs, NULL, NULL, NULL);
+ negate_v3_v3(new_ofs, ED_view3d_cursor3d_get(scene, v3d));
+ ED_view3d_smooth_view(C, v3d, ar, NULL, NULL,
+ new_ofs, NULL, NULL, NULL,
+ smooth_viewtx);
/* smooth view does viewlock RV3D_BOXVIEW copy */
}
@@ -2718,7 +2783,7 @@ void VIEW3D_OT_view_center_cursor(wmOperatorType *ot)
ot->flag = 0;
}
-static int viewcenter_pick_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *event)
+static int viewcenter_pick_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
View3D *v3d = CTX_wm_view3d(C);
RegionView3D *rv3d = CTX_wm_region_view3d(C);
@@ -2727,10 +2792,11 @@ static int viewcenter_pick_invoke(bContext *C, wmOperator *UNUSED(op), const wmE
if (rv3d) {
float new_ofs[3];
+ const int smooth_viewtx = WM_operator_smooth_viewtx_get(op);
view3d_operator_needs_opengl(C);
- if (ED_view3d_autodist(scene, ar, v3d, event->mval, new_ofs, false)) {
+ if (ED_view3d_autodist(scene, ar, v3d, event->mval, new_ofs, false, NULL)) {
/* pass */
}
else {
@@ -2739,7 +2805,9 @@ static int viewcenter_pick_invoke(bContext *C, wmOperator *UNUSED(op), const wmE
ED_view3d_win_to_3d_int(ar, new_ofs, event->mval, new_ofs);
}
negate_v3(new_ofs);
- view3d_smooth_view(C, v3d, ar, NULL, NULL, new_ofs, NULL, NULL, NULL);
+ ED_view3d_smooth_view(C, v3d, ar, NULL, NULL,
+ new_ofs, NULL, NULL, NULL,
+ smooth_viewtx);
}
return OPERATOR_FINISHED;
@@ -2988,6 +3056,7 @@ static int view3d_zoom_border_exec(bContext *C, wmOperator *op)
RegionView3D *rv3d = CTX_wm_region_view3d(C);
Scene *scene = CTX_data_scene(C);
int gesture_mode;
+ const int smooth_viewtx = WM_operator_smooth_viewtx_get(op);
/* Zooms in on a border drawn by the user */
rcti rect;
@@ -3119,7 +3188,9 @@ static int view3d_zoom_border_exec(bContext *C, wmOperator *op)
new_dist = dist_range_min;
}
- view3d_smooth_view(C, v3d, ar, NULL, NULL, new_ofs, NULL, &new_dist, NULL);
+ ED_view3d_smooth_view(C, v3d, ar, NULL, NULL,
+ new_ofs, NULL, &new_dist, NULL,
+ smooth_viewtx);
if (rv3d->viewlock & RV3D_BOXVIEW)
view3d_boxview_sync(CTX_wm_area(C), ar);
@@ -3224,7 +3295,8 @@ static EnumPropertyItem prop_view_items[] = {
static void axis_set_view(bContext *C, View3D *v3d, ARegion *ar,
float q1, float q2, float q3, float q4,
- short view, int perspo, bool align_active)
+ short view, int perspo, bool align_active,
+ const int smooth_viewtx)
{
RegionView3D *rv3d = ar->regiondata; /* no NULL check is needed, poll checks */
float new_quat[4];
@@ -3285,14 +3357,18 @@ static void axis_set_view(bContext *C, View3D *v3d, ARegion *ar,
if (U.uiflag & USER_AUTOPERSP) rv3d->persp = view ? RV3D_ORTHO : RV3D_PERSP;
else if (rv3d->persp == RV3D_CAMOB) rv3d->persp = perspo;
- view3d_smooth_view(C, v3d, ar, v3d->camera, NULL, rv3d->ofs, new_quat, NULL, NULL);
+ ED_view3d_smooth_view(C, v3d, ar, v3d->camera, NULL,
+ rv3d->ofs, new_quat, NULL, NULL,
+ smooth_viewtx);
}
else {
if (U.uiflag & USER_AUTOPERSP) rv3d->persp = view ? RV3D_ORTHO : RV3D_PERSP;
else if (rv3d->persp == RV3D_CAMOB) rv3d->persp = perspo;
- view3d_smooth_view(C, v3d, ar, NULL, NULL, NULL, new_quat, NULL, NULL);
+ ED_view3d_smooth_view(C, v3d, ar, NULL, NULL,
+ NULL, new_quat, NULL, NULL,
+ smooth_viewtx);
}
}
@@ -3306,6 +3382,7 @@ static int viewnumpad_exec(bContext *C, wmOperator *op)
static int perspo = RV3D_PERSP;
int viewnum, nextperspo;
bool align_active;
+ const int smooth_viewtx = WM_operator_smooth_viewtx_get(op);
/* no NULL check is needed, poll checks */
ED_view3d_context_user_region(C, &v3d, &ar);
@@ -3330,32 +3407,32 @@ static int viewnumpad_exec(bContext *C, wmOperator *op)
switch (viewnum) {
case RV3D_VIEW_BOTTOM:
axis_set_view(C, v3d, ar, 0.0, -1.0, 0.0, 0.0,
- viewnum, nextperspo, align_active);
+ viewnum, nextperspo, align_active, smooth_viewtx);
break;
case RV3D_VIEW_BACK:
axis_set_view(C, v3d, ar, 0.0, 0.0, -M_SQRT1_2, -M_SQRT1_2,
- viewnum, nextperspo, align_active);
+ viewnum, nextperspo, align_active, smooth_viewtx);
break;
case RV3D_VIEW_LEFT:
axis_set_view(C, v3d, ar, 0.5, -0.5, 0.5, 0.5,
- viewnum, nextperspo, align_active);
+ viewnum, nextperspo, align_active, smooth_viewtx);
break;
case RV3D_VIEW_TOP:
axis_set_view(C, v3d, ar, 1.0, 0.0, 0.0, 0.0,
- viewnum, nextperspo, align_active);
+ viewnum, nextperspo, align_active, smooth_viewtx);
break;
case RV3D_VIEW_FRONT:
axis_set_view(C, v3d, ar, M_SQRT1_2, -M_SQRT1_2, 0.0, 0.0,
- viewnum, nextperspo, align_active);
+ viewnum, nextperspo, align_active, smooth_viewtx);
break;
case RV3D_VIEW_RIGHT:
axis_set_view(C, v3d, ar, 0.5, -0.5, -0.5, -0.5,
- viewnum, nextperspo, align_active);
+ viewnum, nextperspo, align_active, smooth_viewtx);
break;
case RV3D_VIEW_CAMERA:
@@ -3411,7 +3488,9 @@ static int viewnumpad_exec(bContext *C, wmOperator *op)
/* finally do snazzy view zooming */
rv3d->persp = RV3D_CAMOB;
- view3d_smooth_view(C, v3d, ar, NULL, v3d->camera, rv3d->ofs, rv3d->viewquat, &rv3d->dist, &v3d->lens);
+ ED_view3d_smooth_view(C, v3d, ar, NULL, v3d->camera,
+ rv3d->ofs, rv3d->viewquat, &rv3d->dist, &v3d->lens,
+ smooth_viewtx);
}
else {
@@ -3419,7 +3498,8 @@ static int viewnumpad_exec(bContext *C, wmOperator *op)
/* does view3d_smooth_view too */
axis_set_view(C, v3d, ar,
rv3d->lviewquat[0], rv3d->lviewquat[1], rv3d->lviewquat[2], rv3d->lviewquat[3],
- rv3d->lview, rv3d->lpersp, 0);
+ rv3d->lview, rv3d->lpersp, 0,
+ smooth_viewtx);
}
}
break;
@@ -3479,6 +3559,7 @@ static int vieworbit_exec(bContext *C, wmOperator *op)
if (rv3d->viewlock == 0) {
if ((rv3d->persp != RV3D_CAMOB) || ED_view3d_camera_lock_check(v3d, rv3d)) {
+ const int smooth_viewtx = WM_operator_smooth_viewtx_get(op);
float angle = DEG2RADF((float)U.pad_rot_angle);
float quat_mul[4];
float quat_new[4];
@@ -3506,7 +3587,9 @@ static int vieworbit_exec(bContext *C, wmOperator *op)
mul_qt_qtqt(quat_new, rv3d->viewquat, quat_mul);
rv3d->view = RV3D_VIEW_USER;
- view3d_smooth_view(C, CTX_wm_view3d(C), ar, NULL, NULL, NULL, quat_new, NULL, NULL);
+ ED_view3d_smooth_view(C, CTX_wm_view3d(C), ar, NULL, NULL,
+ NULL, quat_new, NULL, NULL,
+ smooth_viewtx);
return OPERATOR_FINISHED;
}
@@ -3533,6 +3616,190 @@ void VIEW3D_OT_view_orbit(wmOperatorType *ot)
ot->prop = RNA_def_enum(ot->srna, "type", prop_view_orbit_items, 0, "Orbit", "Direction of View Orbit");
}
+
+/* ************************ viewroll ******************************** */
+
+static void view_roll_angle(ARegion *ar, float quat[4], const float orig_quat[4], const float dvec[3], float angle)
+{
+ RegionView3D *rv3d = ar->regiondata;
+ float quat_mul[4];
+
+ /* camera axis */
+ axis_angle_to_quat(quat_mul, dvec, angle);
+
+ mul_qt_qtqt(quat, orig_quat, quat_mul);
+ rv3d->view = RV3D_VIEW_USER;
+}
+
+static void viewroll_apply(ViewOpsData *vod, int x, int UNUSED(y))
+{
+ float angle = 0.0;
+
+ {
+ float len1, len2, tot;
+
+ tot = vod->ar->winrct.xmax - vod->ar->winrct.xmin;
+ len1 = (vod->ar->winrct.xmax - x) / tot;
+ len2 = (vod->ar->winrct.xmax - vod->origx) / tot;
+ angle = (len1 - len2) * (float)M_PI * 4.0f;
+ }
+
+ if (angle != 0.0f)
+ view_roll_angle(vod->ar, vod->rv3d->viewquat, vod->oldquat, vod->mousevec, angle);
+
+ if (vod->rv3d->viewlock & RV3D_BOXVIEW)
+ view3d_boxview_sync(vod->sa, vod->ar);
+
+ ED_view3d_camera_lock_sync(vod->v3d, vod->rv3d);
+
+ ED_region_tag_redraw(vod->ar);
+}
+
+static int viewroll_modal(bContext *C, wmOperator *op, const wmEvent *event)
+{
+ ViewOpsData *vod = op->customdata;
+ short event_code = VIEW_PASS;
+
+ /* execute the events */
+ if (event->type == MOUSEMOVE) {
+ event_code = VIEW_APPLY;
+ }
+ else if (event->type == EVT_MODAL_MAP) {
+ switch (event->val) {
+ case VIEW_MODAL_CONFIRM:
+ event_code = VIEW_CONFIRM;
+ break;
+ case VIEWROT_MODAL_SWITCH_MOVE:
+ WM_operator_name_call(C, "VIEW3D_OT_move", WM_OP_INVOKE_DEFAULT, NULL);
+ event_code = VIEW_CONFIRM;
+ break;
+ case VIEWROT_MODAL_SWITCH_ROTATE:
+ WM_operator_name_call(C, "VIEW3D_OT_rotate", WM_OP_INVOKE_DEFAULT, NULL);
+ event_code = VIEW_CONFIRM;
+ break;
+ }
+ }
+ else if (event->type == vod->origkey && event->val == KM_RELEASE) {
+ event_code = VIEW_CONFIRM;
+ }
+
+ if (event_code == VIEW_APPLY) {
+ viewroll_apply(vod, event->x, event->y);
+ }
+ else if (event_code == VIEW_CONFIRM) {
+ ED_view3d_depth_tag_update(vod->rv3d);
+ viewops_data_free(C, op);
+
+ return OPERATOR_FINISHED;
+ }
+
+ return OPERATOR_RUNNING_MODAL;
+}
+
+static int viewroll_exec(bContext *C, wmOperator *op)
+{
+ View3D *v3d;
+ RegionView3D *rv3d;
+ ARegion *ar;
+
+ if (op->customdata) {
+ ViewOpsData *vod = op->customdata;
+ ar = vod->ar;
+ v3d = vod->v3d;
+ }
+ else {
+ ar = CTX_wm_region(C);
+ v3d = CTX_wm_view3d(C);
+ }
+
+ rv3d = ar->regiondata;
+ if ((rv3d->persp != RV3D_CAMOB) || ED_view3d_camera_lock_check(v3d, rv3d)) {
+ const float angle = RNA_float_get(op->ptr, "angle");
+ float mousevec[3];
+ float quat_new[4];
+
+ const int smooth_viewtx = WM_operator_smooth_viewtx_get(op);
+
+ normalize_v3_v3(mousevec, rv3d->viewinv[2]);
+ negate_v3(mousevec);
+ view_roll_angle(ar, quat_new, rv3d->viewquat, mousevec, angle);
+
+ ED_view3d_smooth_view(C, v3d, ar, NULL, NULL,
+ NULL, quat_new, NULL, NULL,
+ smooth_viewtx);
+
+ viewops_data_free(C, op);
+ return OPERATOR_FINISHED;
+ }
+ else {
+ viewops_data_free(C, op);
+ return OPERATOR_CANCELLED;
+ }
+}
+
+static int viewroll_invoke(bContext *C, wmOperator *op, const wmEvent *event)
+{
+ ViewOpsData *vod;
+
+ /* makes op->customdata */
+ viewops_data_alloc(C, op);
+ viewops_data_create(C, op, event);
+ vod = op->customdata;
+
+ if (RNA_struct_property_is_set(op->ptr, "angle")) {
+ viewroll_exec(C, op);
+ }
+ else {
+ /* overwrite the mouse vector with the view direction */
+ normalize_v3_v3(vod->mousevec, vod->rv3d->viewinv[2]);
+ negate_v3(vod->mousevec);
+
+ if (event->type == MOUSEROTATE) {
+ vod->origx = vod->oldx = event->x;
+ viewroll_apply(vod, event->prevx, event->prevy);
+ ED_view3d_depth_tag_update(vod->rv3d);
+
+ viewops_data_free(C, op);
+ return OPERATOR_FINISHED;
+ }
+ else {
+ /* add temp handler */
+ WM_event_add_modal_handler(C, op);
+
+ return OPERATOR_RUNNING_MODAL;
+ }
+ }
+ return OPERATOR_FINISHED;
+}
+
+static int viewroll_cancel(bContext *C, wmOperator *op)
+{
+ viewops_data_free(C, op);
+
+ return OPERATOR_CANCELLED;
+}
+
+void VIEW3D_OT_view_roll(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "View Roll";
+ ot->description = "Roll the view";
+ ot->idname = "VIEW3D_OT_view_roll";
+
+ /* api callbacks */
+ ot->invoke = viewroll_invoke;
+ ot->exec = viewroll_exec;
+ ot->modal = viewroll_modal;
+ ot->poll = ED_operator_rv3d_user_region_poll;
+ ot->cancel = viewroll_cancel;
+
+ /* flags */
+ ot->flag = 0;
+
+ /* properties */
+ ot->prop = RNA_def_float(ot->srna, "angle", 0, -FLT_MAX, FLT_MAX, "Roll", "", -FLT_MAX, FLT_MAX);
+}
+
static EnumPropertyItem prop_view_pan_items[] = {
{V3D_VIEW_PANLEFT, "PANLEFT", 0, "Pan Left", "Pan the view to the Left"},
{V3D_VIEW_PANRIGHT, "PANRIGHT", 0, "Pan Right", "Pan the view to the Right"},
@@ -3553,7 +3820,8 @@ static int viewpan_exec(bContext *C, wmOperator *op)
float zfac;
int pandir;
- VIEW3D_OP_OFS_LOCK_TEST(C, op);
+ if (view3d_operator_offset_lock_check(C, op))
+ return OPERATOR_CANCELLED;
pandir = RNA_enum_get(op->ptr, "type");
@@ -3855,6 +4123,11 @@ void ED_view3d_cursor3d_position(bContext *C, float fp[3], const int mval[2])
float zfac;
bool flip;
+ /* normally the caller should ensure this,
+ * but this is called from areas that aren't already dealing with the viewport */
+ if (rv3d == NULL)
+ return;
+
zfac = ED_view3d_calc_zfac(rv3d, fp, &flip);
/* reset the depth based on the view offset (we _know_ the offset is infront of us) */
@@ -3869,7 +4142,7 @@ void ED_view3d_cursor3d_position(bContext *C, float fp[3], const int mval[2])
if (U.uiflag & USER_ZBUF_CURSOR) { /* maybe this should be accessed some other way */
view3d_operator_needs_opengl(C);
- if (ED_view3d_autodist(scene, ar, v3d, mval, fp, true))
+ if (ED_view3d_autodist(scene, ar, v3d, mval, fp, true, NULL))
depth_used = true;
}
@@ -3899,7 +4172,7 @@ static int view3d_cursor3d_invoke(bContext *C, wmOperator *UNUSED(op), const wmE
{
Scene *scene = CTX_data_scene(C);
View3D *v3d = CTX_wm_view3d(C);
- float *fp = give_cursor(scene, v3d);
+ float *fp = ED_view3d_cursor3d_get(scene, v3d);
ED_view3d_cursor3d_position(C, fp, event->mval);
@@ -4041,7 +4314,9 @@ static float view_autodist_depth_margin(ARegion *ar, const int mval[2], int marg
}
/* XXX todo Zooms in on a border drawn by the user */
-bool ED_view3d_autodist(Scene *scene, ARegion *ar, View3D *v3d, const int mval[2], float mouse_worldloc[3], bool alphaoverride)
+bool ED_view3d_autodist(Scene *scene, ARegion *ar, View3D *v3d,
+ const int mval[2], float mouse_worldloc[3],
+ const bool alphaoverride, const float fallback_depth_pt[3])
{
bglMats mats; /* ZBuffer depth vars */
float depth_close;
@@ -4053,22 +4328,27 @@ bool ED_view3d_autodist(Scene *scene, ARegion *ar, View3D *v3d, const int mval[2
depth_close = view_autodist_depth_margin(ar, mval, 4);
- if (depth_close == FLT_MAX)
- return false;
+ if (depth_close != FLT_MAX) {
+ cent[0] = (double)mval[0];
+ cent[1] = (double)mval[1];
- cent[0] = (double)mval[0];
- cent[1] = (double)mval[1];
+ if (gluUnProject(cent[0], cent[1], depth_close,
+ mats.modelview, mats.projection, (GLint *)mats.viewport, &p[0], &p[1], &p[2]))
+ {
+ mouse_worldloc[0] = (float)p[0];
+ mouse_worldloc[1] = (float)p[1];
+ mouse_worldloc[2] = (float)p[2];
+ return true;
+ }
+ }
- if (!gluUnProject(cent[0], cent[1], depth_close,
- mats.modelview, mats.projection, (GLint *)mats.viewport, &p[0], &p[1], &p[2]))
- {
+ if (fallback_depth_pt) {
+ ED_view3d_win_to_3d_int(ar, fallback_depth_pt, mval, mouse_worldloc);
+ return true;
+ }
+ else {
return false;
}
-
- mouse_worldloc[0] = (float)p[0];
- mouse_worldloc[1] = (float)p[1];
- mouse_worldloc[2] = (float)p[2];
- return true;
}
void ED_view3d_autodist_init(Scene *scene, ARegion *ar, View3D *v3d, int mode)
diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c
index a1a13130b27..9341ea9d3e6 100644
--- a/source/blender/editors/space_view3d/view3d_fly.c
+++ b/source/blender/editors/space_view3d/view3d_fly.c
@@ -159,6 +159,11 @@ void fly_modal_keymap(wmKeyConfig *keyconf)
WM_modalkeymap_add_item(keymap, RKEY, KM_PRESS, 0, 0, FLY_MODAL_DIR_UP);
WM_modalkeymap_add_item(keymap, FKEY, KM_PRESS, 0, 0, FLY_MODAL_DIR_DOWN);
+ WM_modalkeymap_add_item(keymap, UPARROWKEY, KM_PRESS, 0, 0, FLY_MODAL_DIR_FORWARD);
+ WM_modalkeymap_add_item(keymap, DOWNARROWKEY, KM_PRESS, 0, 0, FLY_MODAL_DIR_BACKWARD);
+ WM_modalkeymap_add_item(keymap, LEFTARROWKEY, KM_PRESS, 0, 0, FLY_MODAL_DIR_LEFT);
+ WM_modalkeymap_add_item(keymap, RIGHTARROWKEY, KM_PRESS, 0, 0, FLY_MODAL_DIR_RIGHT);
+
WM_modalkeymap_add_item(keymap, XKEY, KM_PRESS, 0, 0, FLY_MODAL_AXIS_LOCK_X);
WM_modalkeymap_add_item(keymap, ZKEY, KM_PRESS, 0, 0, FLY_MODAL_AXIS_LOCK_Z);
@@ -580,6 +585,12 @@ static void flyEvent(FlyInfo *fly, const wmEvent *event)
double time_currwheel;
float time_wheel;
+ /* not quite correct but avoids confusion WASD/arrow keys 'locking up' */
+ if (fly->axis == -1) {
+ fly->axis = 2;
+ fly->speed = fabsf(fly->speed);
+ }
+
time_currwheel = PIL_check_seconds_timer();
time_wheel = (float)(time_currwheel - fly->time_lastwheel);
fly->time_lastwheel = time_currwheel;
@@ -599,6 +610,12 @@ static void flyEvent(FlyInfo *fly, const wmEvent *event)
double time_currwheel;
float time_wheel;
+ /* not quite correct but avoids confusion WASD/arrow keys 'locking up' */
+ if (fly->axis == -1) {
+ fly->axis = 2;
+ fly->speed = -fabsf(fly->speed);
+ }
+
time_currwheel = PIL_check_seconds_timer();
time_wheel = (float)(time_currwheel - fly->time_lastwheel);
fly->time_lastwheel = time_currwheel;
@@ -806,9 +823,10 @@ static void flyMoveCamera(bContext *C, RegionView3D *rv3d, FlyInfo *fly,
static int flyApply(bContext *C, FlyInfo *fly)
{
-#define FLY_ROTATE_FAC 2.5f /* more is faster */
+#define FLY_ROTATE_FAC 10.0f /* more is faster */
#define FLY_ZUP_CORRECT_FAC 0.1f /* amount to correct per step */
#define FLY_ZUP_CORRECT_ACCEL 0.05f /* increase upright momentum each step */
+#define FLY_SMOOTH_FAC 20.0f /* higher value less lag */
/* fly mode - Shift+F
* a fly loop where the user can move move the view as if they are flying
@@ -1052,7 +1070,7 @@ static int flyApply(bContext *C, FlyInfo *fly)
}
/* impose a directional lag */
- interp_v3_v3v3(dvec, dvec_tmp, fly->dvec_prev, (1.0f / (1.0f + (time_redraw * 5.0f))));
+ interp_v3_v3v3(dvec, dvec_tmp, fly->dvec_prev, (1.0f / (1.0f + (time_redraw * FLY_SMOOTH_FAC))));
if (rv3d->persp == RV3D_CAMOB) {
Object *lock_ob = fly->root_parent ? fly->root_parent : fly->v3d->camera;
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c
index 094204f868b..204054b24cd 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -356,7 +356,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
/* masks aren't used for sculpt and particle painting */
PointerRNA meshptr;
- RNA_pointer_create(&ob->id, &RNA_Mesh, ob->data, &meshptr);
+ RNA_pointer_create(ob->data, &RNA_Mesh, ob->data, &meshptr);
if (ob->mode & (OB_MODE_TEXTURE_PAINT | OB_MODE_VERTEX_PAINT)) {
uiItemR(layout, &meshptr, "use_paint_mask", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
}
diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h
index 085af4e5c18..a496bbba72f 100644
--- a/source/blender/editors/space_view3d/view3d_intern.h
+++ b/source/blender/editors/space_view3d/view3d_intern.h
@@ -95,6 +95,7 @@ void VIEW3D_OT_view_persportho(struct wmOperatorType *ot);
void VIEW3D_OT_background_image_add(struct wmOperatorType *ot);
void VIEW3D_OT_background_image_remove(struct wmOperatorType *ot);
void VIEW3D_OT_view_orbit(struct wmOperatorType *ot);
+void VIEW3D_OT_view_roll(struct wmOperatorType *ot);
void VIEW3D_OT_clip_border(struct wmOperatorType *ot);
void VIEW3D_OT_cursor3d(struct wmOperatorType *ot);
void VIEW3D_OT_manipulator(struct wmOperatorType *ot);
@@ -186,8 +187,9 @@ void VIEW3D_OT_game_start(struct wmOperatorType *ot);
bool ED_view3d_boundbox_clip(RegionView3D *rv3d, float obmat[4][4], const struct BoundBox *bb);
-void view3d_smooth_view(struct bContext *C, struct View3D *v3d, struct ARegion *ar, struct Object *, struct Object *,
- float *ofs, float *quat, float *dist, float *lens);
+void ED_view3d_smooth_view(struct bContext *C, struct View3D *v3d, struct ARegion *ar, struct Object *, struct Object *,
+ float *ofs, float *quat, float *dist, float *lens,
+ const int smooth_viewtx);
void setwinmatrixview3d(ARegion *ar, View3D *v3d, rctf *rect);
void setviewmatrixview3d(Scene *scene, View3D *v3d, RegionView3D *rv3d);
diff --git a/source/blender/editors/space_view3d/view3d_iterators.c b/source/blender/editors/space_view3d/view3d_iterators.c
index d13ab15d837..4df8010be9d 100644
--- a/source/blender/editors/space_view3d/view3d_iterators.c
+++ b/source/blender/editors/space_view3d/view3d_iterators.c
@@ -40,6 +40,7 @@
#include "BKE_curve.h"
#include "BKE_DerivedMesh.h"
#include "BKE_displist.h"
+#include "BKE_editmesh.h"
#include "bmesh.h"
@@ -133,7 +134,7 @@ static void mesh_foreachScreenVert__mapFunc(void *userData, int index, const flo
const float UNUSED(no_f[3]), const short UNUSED(no_s[3]))
{
foreachScreenVert_userData *data = userData;
- BMVert *eve = EDBM_vert_at_index(data->vc.em, index);
+ BMVert *eve = BM_vert_at_index(data->vc.em->bm, index);
if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) {
float screen_co[2];
@@ -165,7 +166,7 @@ void mesh_foreachScreenVert(
ED_view3d_clipping_local(vc->rv3d, vc->obedit->obmat); /* for local clipping lookups */
}
- EDBM_index_arrays_ensure(vc->em, BM_VERT);
+ BM_mesh_elem_table_ensure(vc->em->bm, BM_VERT);
dm->foreachMappedVert(dm, mesh_foreachScreenVert__mapFunc, &data, DM_FOREACH_NOP);
dm->release(dm);
@@ -176,7 +177,7 @@ void mesh_foreachScreenVert(
static void mesh_foreachScreenEdge__mapFunc(void *userData, int index, const float v0co[3], const float v1co[3])
{
foreachScreenEdge_userData *data = userData;
- BMEdge *eed = EDBM_edge_at_index(data->vc.em, index);
+ BMEdge *eed = BM_edge_at_index(data->vc.em->bm, index);
if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN)) {
float screen_co_a[2];
@@ -225,7 +226,7 @@ void mesh_foreachScreenEdge(
ED_view3d_clipping_local(vc->rv3d, vc->obedit->obmat); /* for local clipping lookups */
}
- EDBM_index_arrays_ensure(vc->em, BM_EDGE);
+ BM_mesh_elem_table_ensure(vc->em->bm, BM_EDGE);
dm->foreachMappedEdge(dm, mesh_foreachScreenEdge__mapFunc, &data);
dm->release(dm);
@@ -236,7 +237,7 @@ void mesh_foreachScreenEdge(
static void mesh_foreachScreenFace__mapFunc(void *userData, int index, const float cent[3], const float UNUSED(no[3]))
{
foreachScreenFace_userData *data = userData;
- BMFace *efa = EDBM_face_at_index(data->vc.em, index);
+ BMFace *efa = BM_face_at_index(data->vc.em->bm, index);
if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) {
float screen_co[2];
@@ -261,7 +262,7 @@ void mesh_foreachScreenFace(
data.userData = userData;
data.clip_flag = clip_flag;
- EDBM_index_arrays_ensure(vc->em, BM_FACE);
+ BM_mesh_elem_table_ensure(vc->em->bm, BM_FACE);
dm->foreachMappedFaceCenter(dm, mesh_foreachScreenFace__mapFunc, &data, DM_FOREACH_NOP);
dm->release(dm);
@@ -368,7 +369,7 @@ void lattice_foreachScreenVert(
Object *obedit = vc->obedit;
Lattice *lt = obedit->data;
BPoint *bp = lt->editlatt->latt->def;
- DispList *dl = BKE_displist_find(&obedit->disp, DL_VERTS);
+ DispList *dl = obedit->curve_cache ? BKE_displist_find(&obedit->curve_cache->disp, DL_VERTS) : NULL;
float *co = dl ? dl->verts : NULL;
int i, N = lt->editlatt->latt->pntsu * lt->editlatt->latt->pntsv * lt->editlatt->latt->pntsw;
diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c
index 6780b71c906..dec9085baeb 100644
--- a/source/blender/editors/space_view3d/view3d_ops.c
+++ b/source/blender/editors/space_view3d/view3d_ops.c
@@ -138,6 +138,7 @@ void view3d_operatortypes(void)
WM_operatortype_append(VIEW3D_OT_view_all);
WM_operatortype_append(VIEW3D_OT_viewnumpad);
WM_operatortype_append(VIEW3D_OT_view_orbit);
+ WM_operatortype_append(VIEW3D_OT_view_roll);
WM_operatortype_append(VIEW3D_OT_view_pan);
WM_operatortype_append(VIEW3D_OT_view_persportho);
WM_operatortype_append(VIEW3D_OT_background_image_add);
@@ -283,7 +284,9 @@ void view3d_keymap(wmKeyConfig *keyconf)
RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_pan", PAD4, KM_PRESS, KM_CTRL, 0)->ptr, "type", V3D_VIEW_PANLEFT);
RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_pan", PAD6, KM_PRESS, KM_CTRL, 0)->ptr, "type", V3D_VIEW_PANRIGHT);
RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_pan", PAD8, KM_PRESS, KM_CTRL, 0)->ptr, "type", V3D_VIEW_PANUP);
-
+ RNA_float_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_roll", PAD4, KM_PRESS, KM_SHIFT, 0)->ptr, "angle", M_PI / -12);
+ RNA_float_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_roll", PAD6, KM_PRESS, KM_SHIFT, 0)->ptr, "angle", M_PI / 12);
+
RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_pan", WHEELUPMOUSE, KM_PRESS, KM_CTRL, 0)->ptr, "type", V3D_VIEW_PANRIGHT);
RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_pan", WHEELDOWNMOUSE, KM_PRESS, KM_CTRL, 0)->ptr, "type", V3D_VIEW_PANLEFT);
RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_pan", WHEELUPMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "type", V3D_VIEW_PANUP);
@@ -294,6 +297,9 @@ void view3d_keymap(wmKeyConfig *keyconf)
RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_orbit", WHEELUPMOUSE, KM_PRESS, KM_SHIFT | KM_ALT, 0)->ptr, "type", V3D_VIEW_STEPUP);
RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_orbit", WHEELDOWNMOUSE, KM_PRESS, KM_SHIFT | KM_ALT, 0)->ptr, "type", V3D_VIEW_STEPDOWN);
+ RNA_float_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_roll", WHEELUPMOUSE, KM_PRESS, KM_CTRL | KM_SHIFT, 0)->ptr, "angle", M_PI / -12);
+ RNA_float_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_roll", WHEELDOWNMOUSE, KM_PRESS, KM_CTRL | KM_SHIFT, 0)->ptr, "angle", M_PI / 12);
+
/* active aligned, replaces '*' key in 2.4x */
kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD1, KM_PRESS, KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_FRONT);
@@ -371,6 +377,11 @@ void view3d_keymap(wmKeyConfig *keyconf)
RNA_string_set(kmi->ptr, "value_1", "SOLID");
RNA_string_set(kmi->ptr, "value_2", "TEXTURED");
+ kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle_enum", ZKEY, KM_PRESS, KM_SHIFT, 0);
+ RNA_string_set(kmi->ptr, "data_path", "space_data.viewport_shade");
+ RNA_string_set(kmi->ptr, "value_1", "SOLID");
+ RNA_string_set(kmi->ptr, "value_2", "RENDERED");
+
/* selection*/
kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, 0, 0);
RNA_boolean_set(kmi->ptr, "extend", FALSE);
diff --git a/source/blender/editors/space_view3d/view3d_project.c b/source/blender/editors/space_view3d/view3d_project.c
index 5e71913ea4a..28ffdea0e6c 100644
--- a/source/blender/editors/space_view3d/view3d_project.c
+++ b/source/blender/editors/space_view3d/view3d_project.c
@@ -405,15 +405,15 @@ void ED_view3d_win_to_3d(const ARegion *ar, const float depth_pt[3], const float
float line_end[3];
if (rv3d->is_persp) {
- float mousevec[3];
+ float mousevec[3], lambda;
copy_v3_v3(line_sta, rv3d->viewinv[3]);
ED_view3d_win_to_vector(ar, mval, mousevec);
add_v3_v3v3(line_end, line_sta, mousevec);
- if (isect_line_plane_v3(out, line_sta, line_end, depth_pt, rv3d->viewinv[2], true) == 0) {
- /* highly unlikely to ever happen, mouse vector parallel with view plane */
- zero_v3(out);
- }
+ /* note, we could use isect_line_plane_v3() however we want the intersection to be infront of the
+ * view no matter what, so apply the unsigned factor instead */
+ lambda = line_plane_factor_v3(depth_pt, rv3d->viewinv[2], line_sta, line_end);
+ interp_v3_v3v3(out, line_sta, line_end, fabsf(lambda));
}
else {
float dx = (2.0f * mval[0] / (float)ar->winx) - 1.0f;
diff --git a/source/blender/editors/space_view3d/view3d_ruler.c b/source/blender/editors/space_view3d/view3d_ruler.c
index b2f2d5849a4..bca162d156b 100644
--- a/source/blender/editors/space_view3d/view3d_ruler.c
+++ b/source/blender/editors/space_view3d/view3d_ruler.c
@@ -803,7 +803,7 @@ static int view3d_ruler_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSE
view3d_ruler_header_update(sa);
- WM_cursor_modal(win, BC_CROSSCURSOR);
+ WM_cursor_modal_set(win, BC_CROSSCURSOR);
WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
@@ -1029,7 +1029,7 @@ static int view3d_ruler_modal(bContext *C, wmOperator *op, const wmEvent *event)
exit:
if (ELEM(exit_code, OPERATOR_FINISHED, OPERATOR_CANCELLED)) {
- WM_cursor_restore(ruler_info->win);
+ WM_cursor_modal_restore(ruler_info->win);
view3d_ruler_end(C, ruler_info);
view3d_ruler_free(ruler_info);
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index 19426ab2dfa..a6ef70a5e33 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -89,6 +89,7 @@
#include "ED_mesh.h"
#include "ED_object.h"
#include "ED_screen.h"
+#include "ED_sculpt.h"
#include "ED_mball.h"
#include "UI_interface.h"
@@ -160,7 +161,7 @@ static void edbm_backbuf_check_and_select_edges(BMEditMesh *em, const bool selec
{
BMEdge *eed;
BMIter iter;
- int index = bm_solidoffs;
+ unsigned int index = bm_solidoffs;
BM_ITER_MESH (eed, &iter, em->bm, BM_EDGES_OF_MESH) {
if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN)) {
@@ -272,9 +273,6 @@ static int view3d_selectable_data(bContext *C)
}
}
else {
- if (ob->mode & OB_MODE_SCULPT) {
- return 0;
- }
if ((ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT | OB_MODE_TEXTURE_PAINT)) &&
!paint_facesel_test(ob) && !paint_vertsel_test(ob))
{
@@ -288,12 +286,12 @@ static int view3d_selectable_data(bContext *C)
/* helper also for borderselect */
-static int edge_fully_inside_rect(const rctf *rect, const float v1[2], const float v2[2])
+static bool edge_fully_inside_rect(const rctf *rect, const float v1[2], const float v2[2])
{
return BLI_rctf_isect_pt_v(rect, v1) && BLI_rctf_isect_pt_v(rect, v2);
}
-static int edge_inside_rect(const rctf *rect, const float v1[2], const float v2[2])
+static bool edge_inside_rect(const rctf *rect, const float v1[2], const float v2[2])
{
int d1, d2, d3, d4;
@@ -725,7 +723,7 @@ static void do_lasso_select_paintvert(ViewContext *vc, const int mcords[][2], sh
{
const int use_zbuf = (vc->v3d->flag & V3D_ZBUF_SELECT);
Object *ob = vc->obact;
- Mesh *me = ob ? ob->data : NULL;
+ Mesh *me = ob->data;
rcti rect;
if (me == NULL || me->totvert == 0)
@@ -764,7 +762,7 @@ static void do_lasso_select_paintvert(ViewContext *vc, const int mcords[][2], sh
static void do_lasso_select_paintface(ViewContext *vc, const int mcords[][2], short moves, bool extend, bool select)
{
Object *ob = vc->obact;
- Mesh *me = ob ? ob->data : NULL;
+ Mesh *me = ob->data;
rcti rect;
if (me == NULL || me->totpoly == 0)
@@ -1374,13 +1372,15 @@ static void deselect_all_tracks(MovieTracking *tracking)
}
/* mval is region coords */
-static bool mouse_select(bContext *C, const int mval[2], bool extend, bool deselect, bool toggle, bool obcenter, short enumerate)
+static bool mouse_select(bContext *C, const int mval[2],
+ bool extend, bool deselect, bool toggle, bool obcenter, bool enumerate, bool object)
{
ViewContext vc;
ARegion *ar = CTX_wm_region(C);
View3D *v3d = CTX_wm_view3d(C);
Scene *scene = CTX_data_scene(C);
Base *base, *startbase = NULL, *basact = NULL, *oldbasact = NULL;
+ bool is_obedit;
float dist = 100.0f;
int retval = false;
short hits;
@@ -1389,6 +1389,12 @@ static bool mouse_select(bContext *C, const int mval[2], bool extend, bool desel
/* setup view context for argument to callbacks */
view3d_set_viewcontext(C, &vc);
+
+ is_obedit = (vc.obedit != NULL);
+ if (object) {
+ /* signal for view3d_opengl_select to skip editmode objects */
+ vc.obedit = NULL;
+ }
/* always start list from basact in wire mode */
startbase = FIRSTBASE;
@@ -1462,7 +1468,7 @@ static bool mouse_select(bContext *C, const int mval[2], bool extend, bool desel
/* index of bundle is 1<<16-based. if there's no "bone" index
* in height word, this buffer value belongs to camera. not to bundle */
if (buffer[4 * i + 3] & 0xFFFF0000) {
- MovieClip *clip = BKE_object_movieclip_get(scene, basact->object, 0);
+ MovieClip *clip = BKE_object_movieclip_get(scene, basact->object, false);
MovieTracking *tracking = &clip->tracking;
ListBase *tracksbase;
MovieTrackingTrack *track;
@@ -1564,7 +1570,7 @@ static bool mouse_select(bContext *C, const int mval[2], bool extend, bool desel
ED_base_object_select(basact, BA_SELECT);
}
- if (oldbasact != basact) {
+ if ((oldbasact != basact) && (is_obedit == false)) {
ED_base_object_activate(C, basact); /* adds notifier */
}
}
@@ -2117,7 +2123,7 @@ static int view3d_borderselect_exec(bContext *C, wmOperator *op)
}
else { /* no editmode, unified for bones and objects */
if (vc.obact && vc.obact->mode & OB_MODE_SCULPT) {
- /* pass */
+ ret = do_sculpt_mask_box_select(&vc, &rect, select, extend);
}
else if (vc.obact && paint_facesel_test(vc.obact)) {
ret = do_paintface_box_select(&vc, &rect, select, extend);
@@ -2256,7 +2262,7 @@ static int view3d_select_exec(bContext *C, wmOperator *op)
else if (paint_vertsel_test(obact))
retval = mouse_weight_paint_vertex_select(C, location, extend, deselect, toggle, obact);
else
- retval = mouse_select(C, location, extend, deselect, toggle, center, enumerate);
+ retval = mouse_select(C, location, extend, deselect, toggle, center, enumerate, object);
/* passthrough allows tweaks
* FINISHED to signal one operator worked
@@ -2405,13 +2411,13 @@ static void mesh_circle_select(ViewContext *vc, const bool select, const int mva
static void paint_facesel_circle_select(ViewContext *vc, const bool select, const int mval[2], float rad)
{
Object *ob = vc->obact;
- Mesh *me = ob ? ob->data : NULL;
- /* int bbsel; */ /* UNUSED */
+ Mesh *me = ob->data;
+ bool bbsel;
- if (me) {
- bm_vertoffs = me->totpoly + 1; /* max index array */
+ bm_vertoffs = me->totpoly + 1; /* max index array */
- /* bbsel = */ /* UNUSED */ EDBM_backbuf_circle_init(vc, mval[0], mval[1], (short)(rad + 1.0f));
+ bbsel = EDBM_backbuf_circle_init(vc, mval[0], mval[1], (short)(rad + 1.0f));
+ if (bbsel) {
edbm_backbuf_check_and_select_tfaces(me, select);
EDBM_backbuf_free();
paintface_flush_flags(ob);
@@ -2431,15 +2437,17 @@ static void paint_vertsel_circle_select(ViewContext *vc, const bool select, cons
const int use_zbuf = (vc->v3d->flag & V3D_ZBUF_SELECT);
Object *ob = vc->obact;
Mesh *me = ob->data;
- /* int bbsel; */ /* UNUSED */
+ bool bbsel;
/* CircleSelectUserData data = {NULL}; */ /* UNUSED */
if (use_zbuf) {
bm_vertoffs = me->totvert + 1; /* max index array */
- /* bbsel = */ /* UNUSED */ EDBM_backbuf_circle_init(vc, mval[0], mval[1], (short)(rad + 1.0f));
- edbm_backbuf_check_and_select_verts_obmode(me, select);
- EDBM_backbuf_free();
+ bbsel = EDBM_backbuf_circle_init(vc, mval[0], mval[1], (short)(rad + 1.0f));
+ if (bbsel) {
+ edbm_backbuf_check_and_select_verts_obmode(me, select);
+ EDBM_backbuf_free();
+ }
}
else {
CircleSelectUserData data;
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c
index 0f2f07a1053..34896eb19aa 100644
--- a/source/blender/editors/space_view3d/view3d_snap.c
+++ b/source/blender/editors/space_view3d/view3d_snap.c
@@ -143,7 +143,7 @@ static void special_transvert_update(Object *obedit)
}
BKE_nurb_test2D(nu);
- BKE_nurb_handles_test(nu); /* test for bezier too */
+ BKE_nurb_handles_test(nu, true); /* test for bezier too */
nu = nu->next;
}
}
@@ -214,7 +214,7 @@ static void set_mapped_co(void *vuserdata, int index, const float co[3],
void **userdata = vuserdata;
BMEditMesh *em = userdata[0];
TransVert *tv = userdata[1];
- BMVert *eve = EDBM_vert_at_index(em, index);
+ BMVert *eve = BM_vert_at_index(em->bm, index);
if (BM_elem_index_get(eve) != TM_INDEX_SKIP) {
tv = &tv[BM_elem_index_get(eve)];
@@ -342,7 +342,7 @@ static void make_trans_verts(Object *obedit, float min[3], float max[3], int mod
}
if (transvmain && em->derivedCage) {
- EDBM_index_arrays_ensure(em, BM_VERT);
+ BM_mesh_elem_table_ensure(bm, BM_VERT);
em->derivedCage->foreachMappedVert(em->derivedCage, set_mapped_co, userdata, DM_FOREACH_NOP);
}
}
@@ -687,7 +687,7 @@ static int snap_sel_to_curs_exec(bContext *C, wmOperator *op)
const bool use_offset = RNA_boolean_get(op->ptr, "use_offset");
- cursor_global = give_cursor(scene, v3d);
+ cursor_global = ED_view3d_cursor3d_get(scene, v3d);
if (use_offset) {
snap_curs_to_sel_ex(C, center_global);
@@ -852,7 +852,7 @@ static int snap_curs_to_grid_exec(bContext *C, wmOperator *UNUSED(op))
float gridf, *curs;
gridf = rv3d->gridview;
- curs = give_cursor(scene, v3d);
+ curs = ED_view3d_cursor3d_get(scene, v3d);
curs[0] = gridf * floorf(0.5f + curs[0] / gridf);
curs[1] = gridf * floorf(0.5f + curs[1] / gridf);
@@ -882,7 +882,7 @@ void VIEW3D_OT_snap_cursor_to_grid(wmOperatorType *ot)
static void bundle_midpoint(Scene *scene, Object *ob, float vec[3])
{
- MovieClip *clip = BKE_object_movieclip_get(scene, ob, 0);
+ MovieClip *clip = BKE_object_movieclip_get(scene, ob, false);
MovieTracking *tracking;
MovieTrackingObject *object;
int ok = 0;
@@ -1035,7 +1035,7 @@ static int snap_curs_to_sel_exec(bContext *C, wmOperator *UNUSED(op))
View3D *v3d = CTX_wm_view3d(C);
float *curs;
- curs = give_cursor(scene, v3d);
+ curs = ED_view3d_cursor3d_get(scene, v3d);
if (snap_curs_to_sel_ex(C, curs)) {
WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d);
@@ -1072,7 +1072,7 @@ static int snap_curs_to_active_exec(bContext *C, wmOperator *UNUSED(op))
View3D *v3d = CTX_wm_view3d(C);
float *curs;
- curs = give_cursor(scene, v3d);
+ curs = ED_view3d_cursor3d_get(scene, v3d);
if (obedit) {
if (obedit->type == OB_MESH) {
@@ -1127,7 +1127,7 @@ static int snap_curs_to_center_exec(bContext *C, wmOperator *UNUSED(op))
Scene *scene = CTX_data_scene(C);
View3D *v3d = CTX_wm_view3d(C);
float *curs;
- curs = give_cursor(scene, v3d);
+ curs = ED_view3d_cursor3d_get(scene, v3d);
zero_v3(curs);
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index 44c338d22b9..e321e7c9c4b 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -40,6 +40,7 @@
#include "BLI_rect.h"
#include "BLI_listbase.h"
#include "BLI_utildefines.h"
+#include "BLI_callbacks.h"
#include "BKE_anim.h"
#include "BKE_action.h"
@@ -103,7 +104,7 @@ void view3d_region_operator_needs_opengl(wmWindow *win, ARegion *ar)
}
}
-float *give_cursor(Scene *scene, View3D *v3d)
+float *ED_view3d_cursor3d_get(Scene *scene, View3D *v3d)
{
if (v3d && v3d->localvd) return v3d->cursor;
else return scene->cursor;
@@ -152,8 +153,9 @@ static void view3d_smooth_view_state_restore(const struct SmoothView3DState *sms
/* will start timer if appropriate */
/* the arguments are the desired situation */
-void view3d_smooth_view(bContext *C, View3D *v3d, ARegion *ar, Object *oldcamera, Object *camera,
- float *ofs, float *quat, float *dist, float *lens)
+void ED_view3d_smooth_view(bContext *C, View3D *v3d, ARegion *ar, Object *oldcamera, Object *camera,
+ float *ofs, float *quat, float *dist, float *lens,
+ const int smooth_viewtx)
{
wmWindowManager *wm = CTX_wm_manager(C);
wmWindow *win = CTX_wm_window(C);
@@ -202,7 +204,7 @@ void view3d_smooth_view(bContext *C, View3D *v3d, ARegion *ar, Object *oldcamera
}
/* skip smooth viewing for render engine draw */
- if (U.smooth_viewtx && v3d->drawtype != OB_RENDER) {
+ if (smooth_viewtx && v3d->drawtype != OB_RENDER) {
bool changed = false; /* zero means no difference */
if (oldcamera != camera)
@@ -231,7 +233,7 @@ void view3d_smooth_view(bContext *C, View3D *v3d, ARegion *ar, Object *oldcamera
rv3d->view = RV3D_VIEW_USER;
}
- sms.time_allowed = (double)U.smooth_viewtx / 1000.0;
+ sms.time_allowed = (double)smooth_viewtx / 1000.0;
/* if this is view rotation only
* we can decrease the time allowed by
@@ -376,12 +378,15 @@ void VIEW3D_OT_smoothview(wmOperatorType *ot)
/* identifiers */
ot->name = "Smooth View";
+ ot->description = "";
ot->idname = "VIEW3D_OT_smoothview";
- ot->description = "The time to animate the change of view (in milliseconds)";
/* api callbacks */
ot->invoke = view3d_smoothview_invoke;
+ /* flags */
+ ot->flag = OPTYPE_INTERNAL;
+
ot->poll = ED_operator_view3d_active;
}
@@ -505,7 +510,7 @@ void VIEW3D_OT_camera_to_view_selected(wmOperatorType *ot)
}
-static int view3d_setobjectascamera_exec(bContext *C, wmOperator *UNUSED(op))
+static int view3d_setobjectascamera_exec(bContext *C, wmOperator *op)
{
View3D *v3d;
ARegion *ar;
@@ -514,6 +519,8 @@ static int view3d_setobjectascamera_exec(bContext *C, wmOperator *UNUSED(op))
Scene *scene = CTX_data_scene(C);
Object *ob = CTX_data_active_object(C);
+ const int smooth_viewtx = WM_operator_smooth_viewtx_get(op);
+
/* no NULL check is needed, poll checks */
ED_view3d_context_user_region(C, &v3d, &ar);
rv3d = ar->regiondata;
@@ -525,8 +532,11 @@ static int view3d_setobjectascamera_exec(bContext *C, wmOperator *UNUSED(op))
if (v3d->scenelock)
scene->camera = ob;
- if (camera_old != ob) /* unlikely but looks like a glitch when set to the same */
- view3d_smooth_view(C, v3d, ar, camera_old, v3d->camera, rv3d->ofs, rv3d->viewquat, &rv3d->dist, &v3d->lens);
+ if (camera_old != ob) { /* unlikely but looks like a glitch when set to the same */
+ ED_view3d_smooth_view(C, v3d, ar, camera_old, v3d->camera,
+ rv3d->ofs, rv3d->viewquat, &rv3d->dist, &v3d->lens,
+ smooth_viewtx);
+ }
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS | NC_OBJECT | ND_DRAW, CTX_data_scene(C));
}
@@ -617,7 +627,7 @@ bool ED_view3d_boundbox_clip(RegionView3D *rv3d, float obmat[4][4], const BoundB
int a, flag = -1, fl;
if (bb == NULL) return true;
- if (bb->flag & OB_BB_DISABLED) return true;
+ if (bb->flag & BOUNDBOX_DISABLED) return true;
mul_m4_m4m4(mat, rv3d->persmat, obmat);
@@ -764,33 +774,31 @@ static void obmat_to_viewmat(RegionView3D *rv3d, Object *ob)
mat3_to_quat(rv3d->viewquat, tmat);
}
-#define QUATSET(a, b, c, d, e) { a[0] = b; a[1] = c; a[2] = d; a[3] = e; } (void)0
-
bool ED_view3d_lock(RegionView3D *rv3d)
{
switch (rv3d->view) {
case RV3D_VIEW_BOTTOM:
- QUATSET(rv3d->viewquat, 0.0, -1.0, 0.0, 0.0);
+ copy_v4_fl4(rv3d->viewquat, 0.0, -1.0, 0.0, 0.0);
break;
case RV3D_VIEW_BACK:
- QUATSET(rv3d->viewquat, 0.0, 0.0, -M_SQRT1_2, -M_SQRT1_2);
+ copy_v4_fl4(rv3d->viewquat, 0.0, 0.0, -M_SQRT1_2, -M_SQRT1_2);
break;
case RV3D_VIEW_LEFT:
- QUATSET(rv3d->viewquat, 0.5, -0.5, 0.5, 0.5);
+ copy_v4_fl4(rv3d->viewquat, 0.5, -0.5, 0.5, 0.5);
break;
case RV3D_VIEW_TOP:
- QUATSET(rv3d->viewquat, 1.0, 0.0, 0.0, 0.0);
+ copy_v4_fl4(rv3d->viewquat, 1.0, 0.0, 0.0, 0.0);
break;
case RV3D_VIEW_FRONT:
- QUATSET(rv3d->viewquat, M_SQRT1_2, -M_SQRT1_2, 0.0, 0.0);
+ copy_v4_fl4(rv3d->viewquat, M_SQRT1_2, -M_SQRT1_2, 0.0, 0.0);
break;
case RV3D_VIEW_RIGHT:
- QUATSET(rv3d->viewquat, 0.5, -0.5, -0.5, -0.5);
+ copy_v4_fl4(rv3d->viewquat, 0.5, -0.5, -0.5, -0.5);
break;
default:
return false;
@@ -839,7 +847,7 @@ void setviewmatrixview3d(Scene *scene, View3D *v3d, RegionView3D *rv3d)
}
else if (v3d->ob_centre_cursor) {
float vec[3];
- copy_v3_v3(vec, give_cursor(scene, v3d));
+ copy_v3_v3(vec, ED_view3d_cursor3d_get(scene, v3d));
translate_m4(rv3d->viewmat, -vec[0], -vec[1], -vec[2]);
use_lock_ofs = true;
}
@@ -866,10 +874,12 @@ void setviewmatrixview3d(Scene *scene, View3D *v3d, RegionView3D *rv3d)
}
}
-/* IGLuint-> GLuint */
-/* Warning: be sure to account for a negative return value
- * This is an error, "Too many objects in select buffer"
- * and no action should be taken (can crash blender) if this happens
+/**
+ * \warning be sure to account for a negative return value
+ * This is an error, "Too many objects in select buffer"
+ * and no action should be taken (can crash blender) if this happens
+ *
+ * \note (vc->obedit == NULL) can be set to explicitly skip edit-object selection.
*/
short view3d_opengl_select(ViewContext *vc, unsigned int *buffer, unsigned int bufsize, rcti *input)
{
@@ -880,6 +890,7 @@ short view3d_opengl_select(ViewContext *vc, unsigned int *buffer, unsigned int b
short code, hits;
char dt;
short dtx;
+ const bool use_obedit_skip = (scene->obedit != NULL) && (vc->obedit == NULL);
G.f |= G_PICKSEL;
@@ -927,8 +938,11 @@ short view3d_opengl_select(ViewContext *vc, unsigned int *buffer, unsigned int b
for (base = scene->base.first; base; base = base->next) {
if (base->lay & v3d->lay) {
- if (base->object->restrictflag & OB_RESTRICT_SELECT)
+ if ((base->object->restrictflag & OB_RESTRICT_SELECT) ||
+ (use_obedit_skip && (scene->obedit->data == base->object->data)))
+ {
base->selcol = 0;
+ }
else {
base->selcol = code;
glLoadName(code);
@@ -1170,7 +1184,7 @@ static bool view3d_localview_init(Main *bmain, Scene *scene, ScrArea *sa, Report
return ok;
}
-static void restore_localviewdata(ScrArea *sa, int free)
+static void restore_localviewdata(Main *bmain, ScrArea *sa, int free)
{
ARegion *ar;
View3D *v3d = sa->spacedata.first;
@@ -1207,12 +1221,7 @@ static void restore_localviewdata(ScrArea *sa, int free)
}
}
- if (v3d->drawtype != OB_RENDER) {
- if (rv3d->render_engine) {
- RE_engine_free(rv3d->render_engine);
- rv3d->render_engine = NULL;
- }
- }
+ ED_view3d_shade_update(bmain, v3d, sa);
}
}
}
@@ -1227,7 +1236,7 @@ static bool view3d_localview_exit(Main *bmain, Scene *scene, ScrArea *sa)
locallay = v3d->lay & 0xFF000000;
- restore_localviewdata(sa, 1); /* 1 = free */
+ restore_localviewdata(bmain, sa, 1); /* 1 = free */
/* for when in other window the layers have changed */
if (v3d->scenelock) v3d->lay = scene->lay;
@@ -1433,6 +1442,7 @@ static int game_engine_exec(bContext *C, wmOperator *op)
{
#ifdef WITH_GAMEENGINE
Scene *startscene = CTX_data_scene(C);
+ Main *bmain = CTX_data_main(C);
ScrArea /* *sa, */ /* UNUSED */ *prevsa = CTX_wm_area(C);
ARegion *ar, *prevar = CTX_wm_region(C);
wmWindow *prevwin = CTX_wm_window(C);
@@ -1449,6 +1459,8 @@ static int game_engine_exec(bContext *C, wmOperator *op)
* the window manager until after this operator exits */
WM_redraw_windows(C);
+ BLI_callback_exec(bmain, &startscene->id, BLI_CB_EVT_GAME_PRE);
+
rv3d = CTX_wm_region_view3d(C);
/* sa = CTX_wm_area(C); */ /* UNUSED */
ar = CTX_wm_region(C);
@@ -1504,6 +1516,8 @@ static int game_engine_exec(bContext *C, wmOperator *op)
BKE_scene_set_background(CTX_data_main(C), startscene);
//XXX BKE_scene_update_for_newframe(bmain, scene, scene->lay);
+ BLI_callback_exec(bmain, &startscene->id, BLI_CB_EVT_GAME_POST);
+
return OPERATOR_FINISHED;
#else
(void)C; /* unused */
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 6d801b86685..9909f438734 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -105,6 +105,97 @@ static int doVertSlide(TransInfo *t, float perc);
static void drawEdgeSlide(const struct bContext *C, TransInfo *t);
static void drawVertSlide(const struct bContext *C, TransInfo *t);
+static void len_v3_ensure(float v[3], const float length);
+static void postInputRotation(TransInfo *t, float values[3]);
+
+
+/* Transform Callbacks */
+static void initWarp(TransInfo *t);
+static eRedrawFlag handleEventWarp(TransInfo *t, const struct wmEvent *event);
+static void Warp(TransInfo *t, const int mval[2]);
+
+static void initShear(TransInfo *t);
+static eRedrawFlag handleEventShear(TransInfo *t, const struct wmEvent *event);
+static void applyShear(TransInfo *t, const int mval[2]);
+
+static void initResize(TransInfo *t);
+static void applyResize(TransInfo *t, const int mval[2]);
+
+static void initSkinResize(TransInfo *t);
+static void applySkinResize(TransInfo *t, const int mval[2]);
+
+static void initTranslation(TransInfo *t);
+static void applyTranslation(TransInfo *t, const int mval[2]);
+
+static void initToSphere(TransInfo *t);
+static void applyToSphere(TransInfo *t, const int mval[2]);
+
+static void initRotation(TransInfo *t);
+static void applyRotation(TransInfo *t, const int mval[2]);
+
+static void initShrinkFatten(TransInfo *t);
+static void applyShrinkFatten(TransInfo *t, const int mval[2]);
+
+static void initTilt(TransInfo *t);
+static void applyTilt(TransInfo *t, const int mval[2]);
+
+static void initCurveShrinkFatten(TransInfo *t);
+static void applyCurveShrinkFatten(TransInfo *t, const int mval[2]);
+
+static void initMaskShrinkFatten(TransInfo *t);
+static void applyMaskShrinkFatten(TransInfo *t, const int mval[2]);
+
+static void initTrackball(TransInfo *t);
+static void applyTrackball(TransInfo *t, const int mval[2]);
+
+static void initPushPull(TransInfo *t);
+static void applyPushPull(TransInfo *t, const int mval[2]);
+
+static void initBevelWeight(TransInfo *t);
+static void applyBevelWeight(TransInfo *t, const int mval[2]);
+
+static void initCrease(TransInfo *t);
+static void applyCrease(TransInfo *t, const int mval[2]);
+
+static void initBoneSize(TransInfo *t);
+static void applyBoneSize(TransInfo *t, const int mval[2]);
+
+static void initBoneEnvelope(TransInfo *t);
+static void applyBoneEnvelope(TransInfo *t, const int mval[2]);
+
+static void initBoneRoll(TransInfo *t);
+static void applyBoneRoll(TransInfo *t, const int mval[2]);
+
+static void initEdgeSlide(TransInfo *t);
+static eRedrawFlag handleEventEdgeSlide(TransInfo *t, const struct wmEvent *event);
+static void applyEdgeSlide(TransInfo *t, const int mval[2]);
+
+static void initVertSlide(TransInfo *t);
+static eRedrawFlag handleEventVertSlide(TransInfo *t, const struct wmEvent *event);
+static void applyVertSlide(TransInfo *t, const int mval[2]);
+
+static void initTimeTranslate(TransInfo *t);
+static void applyTimeTranslate(TransInfo *t, const int mval[2]);
+
+static void initTimeSlide(TransInfo *t);
+static void applyTimeSlide(TransInfo *t, const int mval[2]);
+
+static void initTimeScale(TransInfo *t);
+static void applyTimeScale(TransInfo *t, const int mval[2]);
+
+static void initBakeTime(TransInfo *t);
+static void applyBakeTime(TransInfo *t, const int mval[2]);
+
+static void initMirror(TransInfo *t);
+static void applyMirror(TransInfo *t, const int mval[2]);
+
+static void initAlign(TransInfo *t);
+static void applyAlign(TransInfo *t, const int mval[2]);
+
+static void initSeqSlide(TransInfo *t);
+static void applySeqSlide(TransInfo *t, const int mval[2]);
+/* end transform callbacks */
+
static bool transdata_check_local_center(TransInfo *t)
{
@@ -1129,8 +1220,10 @@ int transformEvent(TransInfo *t, const wmEvent *event)
break;
}
- // Modal numinput events
- t->redraw |= handleNumInput(&(t->num), event);
+ /* Modal numinput events */
+ if (handleNumInput(&(t->num), event)) {
+ t->redraw |= TREDRAW_HARD;
+ }
}
/* else do non-mapped events */
else if (event->val == KM_PRESS) {
@@ -1234,7 +1327,7 @@ int transformEvent(TransInfo *t, const wmEvent *event)
t->flag ^= T_PROP_CONNECTED;
sort_trans_data_dist(t);
calculatePropRatio(t);
- t->redraw = 1;
+ t->redraw = TREDRAW_HARD;
}
else {
stopConstraint(t);
@@ -1260,7 +1353,7 @@ int transformEvent(TransInfo *t, const wmEvent *event)
t->prop_size = min_ff(t->prop_size, ((View3D *)t->view)->far);
calculatePropRatio(t);
}
- t->redraw = 1;
+ t->redraw = TREDRAW_HARD;
break;
case PAGEUPKEY:
case WHEELDOWNMOUSE:
@@ -1270,14 +1363,14 @@ int transformEvent(TransInfo *t, const wmEvent *event)
else {
view_editmove(event->type);
}
- t->redraw = 1;
+ t->redraw = TREDRAW_HARD;
break;
case PADMINUS:
if (event->alt && t->flag & T_PROP_EDIT) {
t->prop_size *= 0.90909090f;
calculatePropRatio(t);
}
- t->redraw = 1;
+ t->redraw = TREDRAW_HARD;
break;
case PAGEDOWNKEY:
case WHEELUPMOUSE:
@@ -1287,7 +1380,7 @@ int transformEvent(TransInfo *t, const wmEvent *event)
else {
view_editmove(event->type);
}
- t->redraw = 1;
+ t->redraw = TREDRAW_HARD;
break;
case LEFTALTKEY:
case RIGHTALTKEY:
@@ -1302,10 +1395,12 @@ int transformEvent(TransInfo *t, const wmEvent *event)
break;
}
- // Numerical input events
- t->redraw |= handleNumInput(&(t->num), event);
+ /* Numerical input events */
+ if (handleNumInput(&(t->num), event)) {
+ t->redraw |= TREDRAW_HARD;
+ }
- // Snapping key events
+ /* Snapping key events */
t->redraw |= handleSnapping(t, event);
}
@@ -1360,7 +1455,7 @@ int transformEvent(TransInfo *t, const wmEvent *event)
}
}
-int calculateTransformCenter(bContext *C, int centerMode, float cent3d[3], int cent2d[2])
+int calculateTransformCenter(bContext *C, int centerMode, float cent3d[3], float cent2d[2])
{
TransInfo *t = MEM_callocN(sizeof(TransInfo), "TransInfo data");
int success;
@@ -1390,7 +1485,7 @@ int calculateTransformCenter(bContext *C, int centerMode, float cent3d[3], int c
calculateCenter(t);
if (cent2d) {
- copy_v2_v2_int(cent2d, t->center2d);
+ copy_v2_v2(cent2d, t->center2d);
}
if (cent3d) {
@@ -1749,29 +1844,32 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
// If modal, save settings back in scene if not set as operator argument
if (t->flag & T_MODAL) {
-
/* save settings if not set in operator */
- if ((prop = RNA_struct_find_property(op->ptr, "proportional")) &&
- !RNA_property_is_set(op->ptr, prop))
- {
- if (t->obedit)
- ts->proportional = proportional;
- else if (t->options & CTX_MASK)
- ts->proportional_mask = (proportional != PROP_EDIT_OFF);
- else
- ts->proportional_objects = (proportional != PROP_EDIT_OFF);
- }
- if ((prop = RNA_struct_find_property(op->ptr, "proportional_size")) &&
- !RNA_property_is_set(op->ptr, prop))
- {
- ts->proportional_size = t->prop_size;
- }
+ /* skip saving proportional edit if it was not actually used */
+ if (!(t->options & CTX_NO_PET)) {
+ if ((prop = RNA_struct_find_property(op->ptr, "proportional")) &&
+ !RNA_property_is_set(op->ptr, prop))
+ {
+ if (t->obedit)
+ ts->proportional = proportional;
+ else if (t->options & CTX_MASK)
+ ts->proportional_mask = (proportional != PROP_EDIT_OFF);
+ else
+ ts->proportional_objects = (proportional != PROP_EDIT_OFF);
+ }
- if ((prop = RNA_struct_find_property(op->ptr, "proportional_edit_falloff")) &&
- !RNA_property_is_set(op->ptr, prop))
- {
- ts->prop_mode = t->prop_mode;
+ if ((prop = RNA_struct_find_property(op->ptr, "proportional_size")) &&
+ !RNA_property_is_set(op->ptr, prop))
+ {
+ ts->proportional_size = t->prop_size;
+ }
+
+ if ((prop = RNA_struct_find_property(op->ptr, "proportional_edit_falloff")) &&
+ !RNA_property_is_set(op->ptr, prop))
+ {
+ ts->prop_mode = t->prop_mode;
+ }
}
/* do we check for parameter? */
@@ -1851,7 +1949,7 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *even
options |= CTX_TEXTURE;
}
}
-
+
t->options = options;
t->mode = mode;
@@ -1893,6 +1991,7 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *even
else if (t->spacetype == SPACE_CLIP) {
unit_m3(t->spacemtx);
t->draw_handle_view = ED_region_draw_cb_activate(t->ar->type, drawTransformView, t, REGION_DRAW_POST_VIEW);
+ t->draw_handle_cursor = WM_paint_cursor_activate(CTX_wm_manager(C), helpline_poll, drawHelpline, t);
}
else if (t->spacetype == SPACE_NODE) {
unit_m3(t->spacemtx);
@@ -2191,7 +2290,7 @@ int transformEnd(bContext *C, TransInfo *t)
/* ************************** TRANSFORM LOCKS **************************** */
-static void protectedTransBits(short protectflag, float *vec)
+static void protectedTransBits(short protectflag, float vec[3])
{
if (protectflag & OB_LOCK_LOCX)
vec[0] = 0.0f;
@@ -2201,7 +2300,7 @@ static void protectedTransBits(short protectflag, float *vec)
vec[2] = 0.0f;
}
-static void protectedSizeBits(short protectflag, float *size)
+static void protectedSizeBits(short protectflag, float size[3])
{
if (protectflag & OB_LOCK_SCALEX)
size[0] = 1.0f;
@@ -2211,7 +2310,7 @@ static void protectedSizeBits(short protectflag, float *size)
size[2] = 1.0f;
}
-static void protectedRotateBits(short protectflag, float *eul, float *oldeul)
+static void protectedRotateBits(short protectflag, float eul[3], const float oldeul[3])
{
if (protectflag & OB_LOCK_ROTX)
eul[0] = oldeul[0];
@@ -2266,7 +2365,7 @@ static void protectedAxisAngleBits(short protectflag, float axis[3], float *angl
}
/* this function only does the delta rotation */
-static void protectedQuaternionBits(short protectflag, float *quat, float *oldquat)
+static void protectedQuaternionBits(short protectflag, float quat[4], const float oldquat[4])
{
/* check that protection flags are set */
if ((protectflag & (OB_LOCK_ROTX | OB_LOCK_ROTY | OB_LOCK_ROTZ | OB_LOCK_ROTW)) == 0)
@@ -2570,187 +2669,223 @@ static void constraintSizeLim(TransInfo *t, TransData *td)
}
}
-/* ************************** WARP *************************** */
-static void postInputWarp(TransInfo *t, float values[3])
-{
- mul_v3_fl(values, (float)(M_PI * 2));
+/* -------------------------------------------------------------------- */
+/* Transform (Warp) */
- if (t->customData) { /* non-null value indicates reversed input */
- negate_v3(values);
- }
-}
+/** \name Transform Warp
+ * \{ */
-void initWarp(TransInfo *t)
+struct WarpCustomData {
+ float warp_sta[3];
+ float warp_end[3];
+
+ float warp_nor[3];
+ float warp_tan[3];
+
+ /* for applying the mouse distance */
+ float warp_init_dist;
+};
+
+static void initWarp(TransInfo *t)
{
- float max[3], min[3];
- int i;
+ const float mval_fl[2] = {UNPACK2(t->mval)};
+ const float *curs;
+ float tvec[3];
+ struct WarpCustomData *data;
t->mode = TFM_WARP;
t->transform = Warp;
t->handleEvent = handleEventWarp;
- setInputPostFct(&t->mouse, postInputWarp);
- initMouseInputMode(t, &t->mouse, INPUT_HORIZONTAL_RATIO);
+ setInputPostFct(&t->mouse, postInputRotation);
+ initMouseInputMode(t, &t->mouse, INPUT_ANGLE_SPRING);
- t->idx_max = 0;
- t->num.idx_max = 0;
+ t->idx_max = 1;
+ t->num.idx_max = 1;
t->snap[0] = 0.0f;
- t->snap[1] = 5.0f / 180.0f * (float)M_PI;
- t->snap[2] = 1.0f / 180.0f * (float)M_PI;
+ t->snap[1] = DEG2RAD(5.0);
+ t->snap[2] = DEG2RAD(1.0);
t->num.increment = 1.0f;
t->flag |= T_NO_CONSTRAINT;
-
- /* we need min/max in view space */
- for (i = 0; i < t->total; i++) {
- float center[3];
- copy_v3_v3(center, t->data[i].center);
- mul_m3_v3(t->data[i].mtx, center);
- mul_m4_v3(t->viewmat, center);
- sub_v3_v3(center, t->viewmat[3]);
- if (i) {
- minmax_v3v3_v3(min, max, center);
- }
- else {
- copy_v3_v3(max, center);
- copy_v3_v3(min, center);
- }
+
+ //copy_v3_v3(t->center, ED_view3d_cursor3d_get(t->scene, t->view));
+ calculateCenterCursor(t);
+
+ t->val = 0.0f;
+
+ data = MEM_callocN(sizeof(*data), __func__);
+
+ curs = ED_view3d_cursor3d_get(t->scene, t->view);
+ copy_v3_v3(data->warp_sta, curs);
+ ED_view3d_win_to_3d(t->ar, curs, mval_fl, data->warp_end);
+
+ copy_v3_v3(data->warp_nor, t->viewinv[2]);
+ if (t->flag & T_EDIT) {
+ sub_v3_v3(data->warp_sta, t->obedit->obmat[3]);
+ sub_v3_v3(data->warp_end, t->obedit->obmat[3]);
}
+ normalize_v3(data->warp_nor);
+
+ /* tangent */
+ sub_v3_v3v3(tvec, data->warp_end, data->warp_sta);
+ cross_v3_v3v3(data->warp_tan, tvec, data->warp_nor);
+ normalize_v3(data->warp_tan);
- mid_v3_v3v3(t->center, min, max);
+ data->warp_init_dist = len_v3v3(data->warp_end, data->warp_sta);
- if (max[0] == min[0])
- max[0] += 0.1f; /* not optimal, but flipping is better than invalid garbage (i.e. division by zero!) */
- t->val = (max[0] - min[0]) / 2.0f; /* t->val is X dimension projected boundbox */
+ t->customData = data;
}
-int handleEventWarp(TransInfo *t, const wmEvent *event)
+static eRedrawFlag handleEventWarp(TransInfo *UNUSED(t), const wmEvent *event)
{
- int status = 0;
+ eRedrawFlag status = TREDRAW_NOTHING;
if (event->type == MIDDLEMOUSE && event->val == KM_PRESS) {
- // Use customData pointer to signal warp direction
- if (t->customData == NULL)
- t->customData = (void *)1;
- else
- t->customData = NULL;
-
- status = 1;
+ status = TREDRAW_HARD;
}
return status;
}
-int Warp(TransInfo *t, const int UNUSED(mval[2]))
+static void Warp(TransInfo *t, const int UNUSED(mval[2]))
{
TransData *td = t->data;
- float vec[3], circumfac, dist, phi0, co, si, cursor[3], gcursor[3];
- const float *curs;
+ float vec[3];
+ float pivot[3];
+ float warp_end_radius[3];
int i;
char str[MAX_INFO_LEN];
-
- curs = give_cursor(t->scene, t->view);
- /*
- * gcursor is the one used for helpline.
- * It has to be in the same space as the drawing loop
- * (that means it needs to be in the object's space when in edit mode and
- * in global space in object mode)
- *
- * cursor is used for calculations.
- * It needs to be in view space, but we need to take object's offset
- * into account if in Edit mode.
- */
- copy_v3_v3(cursor, curs);
- copy_v3_v3(gcursor, cursor);
- if (t->flag & T_EDIT) {
- sub_v3_v3(cursor, t->obedit->obmat[3]);
- sub_v3_v3(gcursor, t->obedit->obmat[3]);
- mul_m3_v3(t->data->smtx, gcursor);
- }
- mul_m4_v3(t->viewmat, cursor);
- sub_v3_v3(cursor, t->viewmat[3]);
-
+ const struct WarpCustomData *data = t->customData;
+ const bool is_clamp = (t->flag & T_ALT_TRANSFORM) == 0;
+
+ union {
+ struct { float angle, scale; };
+ float vector[2];
+ } values;
+
/* amount of radians for warp */
- circumfac = t->values[0];
-
- snapGrid(t, &circumfac);
- applyNumInput(&t->num, &circumfac);
+ copy_v2_v2(values.vector, t->values);
+
+#if 0
+ snapGrid(t, angle_rad);
+#else
+ /* hrmf, snapping radius is using 'angle' steps, need to convert to something else
+ * this isnt essential but nicer to give reasonable snapping values for radius */
+ if (t->tsnap.mode == SCE_SNAP_MODE_INCREMENT) {
+ const float radius_snap = 0.1f;
+ const float snap_hack = (t->snap[1] * data->warp_init_dist) / radius_snap;
+ values.scale *= snap_hack;
+ snapGrid(t, values.vector);
+ values.scale /= snap_hack;
+ }
+#endif
/* header print for NumInput */
if (hasNumInput(&t->num)) {
- char c[NUM_STR_REP_LEN];
+ char c[NUM_STR_REP_LEN * 2];
+ applyNumInput(&t->num, values.vector);
+
outputNumInput(&(t->num), c);
- BLI_snprintf(str, MAX_INFO_LEN, IFACE_("Warp: %s"), c);
+ BLI_snprintf(str, MAX_INFO_LEN, IFACE_("Warp Angle: %s Radius: %s Alt, Clamp %s"),
+ &c[0], &c[NUM_STR_REP_LEN],
+ WM_bool_as_string(is_clamp));
- circumfac = DEG2RADF(circumfac);
+ values.angle = DEG2RADF(values.angle);
+ values.scale = values.scale / data->warp_init_dist;
}
else {
/* default header print */
- BLI_snprintf(str, MAX_INFO_LEN, IFACE_("Warp: %.3f"), RAD2DEGF(circumfac));
+ BLI_snprintf(str, MAX_INFO_LEN, IFACE_("Warp Angle: %.3f Radius: %.4f, Alt, Clamp %s"),
+ RAD2DEGF(values.angle), values.scale * data->warp_init_dist,
+ WM_bool_as_string(is_clamp));
}
- t->values[0] = circumfac;
+ copy_v2_v2(t->values, values.vector);
- circumfac /= 2; /* only need 180 on each side to make 360 */
+ values.angle *= -1.0f;
+ values.scale *= data->warp_init_dist;
+ /* calc 'data->warp_end' from 'data->warp_end_init' */
+ copy_v3_v3(warp_end_radius, data->warp_end);
+ dist_ensure_v3_v3fl(warp_end_radius, data->warp_sta, values.scale);
+ /* done */
+
+ /* calculate pivot */
+ copy_v3_v3(pivot, data->warp_sta);
+ if (values.angle > 0.0f) {
+ madd_v3_v3fl(pivot, data->warp_tan, -values.scale * shell_angle_to_dist((float)M_PI_2 - values.angle));
+ }
+ else {
+ madd_v3_v3fl(pivot, data->warp_tan, +values.scale * shell_angle_to_dist((float)M_PI_2 + values.angle));
+ }
+
for (i = 0; i < t->total; i++, td++) {
- float loc[3];
+ float mat[3][3];
+ float delta[3];
+ float fac, fac_scaled;
+
if (td->flag & TD_NOACTION)
break;
if (td->flag & TD_SKIP)
continue;
-
- /* translate point to center, rotate in such a way that outline==distance */
+
+ if (UNLIKELY(values.angle == 0.0f)) {
+ copy_v3_v3(td->loc, td->iloc);
+ continue;
+ }
+
copy_v3_v3(vec, td->iloc);
mul_m3_v3(td->mtx, vec);
- mul_m4_v3(t->viewmat, vec);
- sub_v3_v3(vec, t->viewmat[3]);
-
- dist = vec[0] - cursor[0];
-
- /* t->val is X dimension projected boundbox */
- phi0 = (circumfac * dist / t->val);
-
- vec[1] = (vec[1] - cursor[1]);
-
- co = cosf(phi0);
- si = sinf(phi0);
- loc[0] = -si * vec[1] + cursor[0];
- loc[1] = co * vec[1] + cursor[1];
- loc[2] = vec[2];
-
- mul_m4_v3(t->viewinv, loc);
- sub_v3_v3(loc, t->viewinv[3]);
- mul_m3_v3(td->smtx, loc);
-
- sub_v3_v3(loc, td->iloc);
- mul_v3_fl(loc, td->factor);
- add_v3_v3v3(td->loc, td->iloc, loc);
+
+ fac = line_point_factor_v3(vec, data->warp_sta, warp_end_radius);
+ if (is_clamp) {
+ CLAMP(fac, 0.0f, 1.0f);
+ }
+
+ fac_scaled = fac * td->factor;
+ axis_angle_normalized_to_mat3(mat, data->warp_nor, values.angle * fac_scaled);
+ interp_v3_v3v3(delta, data->warp_sta, warp_end_radius, fac_scaled);
+ sub_v3_v3(delta, data->warp_sta);
+
+ /* delta is subtracted, rotation adds back this offset */
+ sub_v3_v3(vec, delta);
+
+ sub_v3_v3(vec, pivot);
+ mul_m3_v3(mat, vec);
+ add_v3_v3(vec, pivot);
+
+ mul_m3_v3(td->smtx, vec);
+ copy_v3_v3(td->loc, vec);
}
recalcData(t);
ED_area_headerprint(t->sa, str);
-
- return 1;
}
+/** \} */
-/* ************************** SHEAR *************************** */
+
+/* -------------------------------------------------------------------- */
+/* Transform (Shear) */
+
+/** \name Transform Shear
+ * \{ */
static void postInputShear(TransInfo *UNUSED(t), float values[3])
{
mul_v3_fl(values, 0.05f);
}
-void initShear(TransInfo *t)
+static void initShear(TransInfo *t)
{
t->mode = TFM_SHEAR;
- t->transform = Shear;
+ t->transform = applyShear;
t->handleEvent = handleEventShear;
setInputPostFct(&t->mouse, postInputShear);
@@ -2767,9 +2902,9 @@ void initShear(TransInfo *t)
t->flag |= T_NO_CONSTRAINT;
}
-int handleEventShear(TransInfo *t, const wmEvent *event)
+static eRedrawFlag handleEventShear(TransInfo *t, const wmEvent *event)
{
- int status = 0;
+ eRedrawFlag status = TREDRAW_NOTHING;
if (event->type == MIDDLEMOUSE && event->val == KM_PRESS) {
// Use customData pointer to signal Shear direction
@@ -2782,26 +2917,26 @@ int handleEventShear(TransInfo *t, const wmEvent *event)
t->customData = NULL;
}
- status = 1;
+ status = TREDRAW_HARD;
}
else if (event->type == XKEY && event->val == KM_PRESS) {
initMouseInputMode(t, &t->mouse, INPUT_HORIZONTAL_ABSOLUTE);
t->customData = NULL;
- status = 1;
+ status = TREDRAW_HARD;
}
else if (event->type == YKEY && event->val == KM_PRESS) {
initMouseInputMode(t, &t->mouse, INPUT_VERTICAL_ABSOLUTE);
t->customData = (void *)1;
- status = 1;
+ status = TREDRAW_HARD;
}
return status;
}
-int Shear(TransInfo *t, const int UNUSED(mval[2]))
+static void applyShear(TransInfo *t, const int UNUSED(mval[2]))
{
TransData *td = t->data;
float vec[3];
@@ -2875,16 +3010,20 @@ int Shear(TransInfo *t, const int UNUSED(mval[2]))
recalcData(t);
ED_area_headerprint(t->sa, str);
-
- return 1;
}
+/** \} */
-/* ************************** RESIZE *************************** */
-void initResize(TransInfo *t)
+/* -------------------------------------------------------------------- */
+/* Transform (Resize) */
+
+/** \name Transform Resize
+ * \{ */
+
+static void initResize(TransInfo *t)
{
t->mode = TFM_RESIZE;
- t->transform = Resize;
+ t->transform = applyResize;
initMouseInputMode(t, &t->mouse, INPUT_SPRING_FLIP);
@@ -2905,8 +3044,7 @@ void initResize(TransInfo *t)
t->num.increment = t->snap[1];
}
-/* We assume str is MAX_INFO_LEN long. */
-static void headerResize(TransInfo *t, float vec[3], char *str)
+static void headerResize(TransInfo *t, float vec[3], char str[MAX_INFO_LEN])
{
char tvec[NUM_STR_REP_LEN * 3];
size_t ofs = 0;
@@ -3082,7 +3220,7 @@ static void ElementResize(TransInfo *t, TransData *td, float mat[3][3])
constraintTransLim(t, td);
}
-int Resize(TransInfo *t, const int mval[2])
+static void applyResize(TransInfo *t, const int mval[2])
{
TransData *td;
float size[3], mat[3][3];
@@ -3157,16 +3295,20 @@ int Resize(TransInfo *t, const int mval[2])
recalcData(t);
ED_area_headerprint(t->sa, str);
-
- return 1;
}
+/** \} */
-/* ************************** SKIN *************************** */
-void initSkinResize(TransInfo *t)
+/* -------------------------------------------------------------------- */
+/* Transform (Skin) */
+
+/** \name Transform Skin
+ * \{ */
+
+static void initSkinResize(TransInfo *t)
{
t->mode = TFM_SKIN_RESIZE;
- t->transform = SkinResize;
+ t->transform = applySkinResize;
initMouseInputMode(t, &t->mouse, INPUT_SPRING_FLIP);
@@ -3187,7 +3329,7 @@ void initSkinResize(TransInfo *t)
t->num.increment = t->snap[1];
}
-int SkinResize(TransInfo *t, const int UNUSED(mval[2]))
+static void applySkinResize(TransInfo *t, const int UNUSED(mval[2]))
{
TransData *td;
float size[3], mat[3][3];
@@ -3247,19 +3389,23 @@ int SkinResize(TransInfo *t, const int UNUSED(mval[2]))
recalcData(t);
ED_area_headerprint(t->sa, str);
-
- return 1;
}
+/** \} */
-/* ************************** TOSPHERE *************************** */
-void initToSphere(TransInfo *t)
+/* -------------------------------------------------------------------- */
+/* Transform (ToSphere) */
+
+/** \name Transform ToSphere
+ * \{ */
+
+static void initToSphere(TransInfo *t)
{
TransData *td = t->data;
int i;
t->mode = TFM_TOSPHERE;
- t->transform = ToSphere;
+ t->transform = applyToSphere;
initMouseInputMode(t, &t->mouse, INPUT_HORIZONTAL_RATIO);
@@ -3282,7 +3428,7 @@ void initToSphere(TransInfo *t)
t->val /= (float)t->total;
}
-int ToSphere(TransInfo *t, const int UNUSED(mval[2]))
+static void applyToSphere(TransInfo *t, const int UNUSED(mval[2]))
{
float vec[3];
float ratio, radius;
@@ -3340,12 +3486,15 @@ int ToSphere(TransInfo *t, const int UNUSED(mval[2]))
recalcData(t);
ED_area_headerprint(t->sa, str);
-
- return 1;
}
+/** \} */
-/* ************************** ROTATION *************************** */
+/* -------------------------------------------------------------------- */
+/* Transform (Rotation) */
+
+/** \name Transform Rotation
+ * \{ */
static void postInputRotation(TransInfo *t, float values[3])
{
@@ -3354,10 +3503,10 @@ static void postInputRotation(TransInfo *t, float values[3])
}
}
-void initRotation(TransInfo *t)
+static void initRotation(TransInfo *t)
{
t->mode = TFM_ROTATION;
- t->transform = Rotation;
+ t->transform = applyRotation;
setInputPostFct(&t->mouse, postInputRotation);
initMouseInputMode(t, &t->mouse, INPUT_ANGLE);
@@ -3365,8 +3514,8 @@ void initRotation(TransInfo *t)
t->idx_max = 0;
t->num.idx_max = 0;
t->snap[0] = 0.0f;
- t->snap[1] = (float)((5.0 / 180) * M_PI);
- t->snap[2] = t->snap[1] * 0.2f;
+ t->snap[1] = DEG2RAD(5.0);
+ t->snap[2] = DEG2RAD(1.0);
t->num.increment = 1.0f;
@@ -3603,7 +3752,7 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
}
}
-static void applyRotation(TransInfo *t, float angle, float axis[3])
+static void applyRotationValue(TransInfo *t, float angle, float axis[3])
{
TransData *td = t->data;
float mat[3][3];
@@ -3631,7 +3780,7 @@ static void applyRotation(TransInfo *t, float angle, float axis[3])
}
}
-int Rotation(TransInfo *t, const int UNUSED(mval[2]))
+static void applyRotation(TransInfo *t, const int UNUSED(mval[2]))
{
char str[MAX_INFO_LEN];
size_t ofs = 0;
@@ -3675,37 +3824,40 @@ int Rotation(TransInfo *t, const int UNUSED(mval[2]))
t->values[0] = final;
- applyRotation(t, final, t->axis);
+ applyRotationValue(t, final, t->axis);
recalcData(t);
ED_area_headerprint(t->sa, str);
-
- return 1;
}
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/* Transform (Rotation - Trackball) */
-/* ************************** TRACKBALL *************************** */
+/** \name Transform Rotation - Trackball
+ * \{ */
-void initTrackball(TransInfo *t)
+static void initTrackball(TransInfo *t)
{
t->mode = TFM_TRACKBALL;
- t->transform = Trackball;
+ t->transform = applyTrackball;
initMouseInputMode(t, &t->mouse, INPUT_TRACKBALL);
t->idx_max = 1;
t->num.idx_max = 1;
t->snap[0] = 0.0f;
- t->snap[1] = (float)((5.0 / 180) * M_PI);
- t->snap[2] = t->snap[1] * 0.2f;
+ t->snap[1] = DEG2RAD(5.0);
+ t->snap[2] = DEG2RAD(1.0);
t->num.increment = 1.0f;
t->flag |= T_NO_CONSTRAINT;
}
-static void applyTrackball(TransInfo *t, const float axis1[3], const float axis2[3], float angles[2])
+static void applyTrackballValue(TransInfo *t, const float axis1[3], const float axis2[3], float angles[2])
{
TransData *td = t->data;
float mat[3][3], smat[3][3], totmat[3][3];
@@ -3734,7 +3886,7 @@ static void applyTrackball(TransInfo *t, const float axis1[3], const float axis2
}
}
-int Trackball(TransInfo *t, const int UNUSED(mval[2]))
+static void applyTrackball(TransInfo *t, const int UNUSED(mval[2]))
{
char str[MAX_INFO_LEN];
size_t ofs = 0;
@@ -3782,18 +3934,22 @@ int Trackball(TransInfo *t, const int UNUSED(mval[2]))
// TRANSFORM_FIX_ME
//copy_m3_m3(t->mat, mat); // used in manipulator
- applyTrackball(t, axis1, axis2, phi);
+ applyTrackballValue(t, axis1, axis2, phi);
recalcData(t);
ED_area_headerprint(t->sa, str);
-
- return 1;
}
+/** \} */
+
+
+/* -------------------------------------------------------------------- */
+/* Transform (Translation) */
-/* ************************** TRANSLATION *************************** */
+/** \name Transform Translation
+ * \{ */
-void initTranslation(TransInfo *t)
+static void initTranslation(TransInfo *t)
{
if (t->spacetype == SPACE_ACTION) {
/* this space uses time translate */
@@ -3801,7 +3957,7 @@ void initTranslation(TransInfo *t)
}
t->mode = TFM_TRANSLATION;
- t->transform = Translation;
+ t->transform = applyTranslation;
initMouseInputMode(t, &t->mouse, INPUT_VECTOR);
@@ -3836,8 +3992,7 @@ void initTranslation(TransInfo *t)
t->num.increment = t->snap[1];
}
-/* We assume str is MAX_INFO_LEN long. */
-static void headerTranslation(TransInfo *t, float vec[3], char *str)
+static void headerTranslation(TransInfo *t, float vec[3], char str[MAX_INFO_LEN])
{
size_t ofs = 0;
char tvec[NUM_STR_REP_LEN * 3];
@@ -3924,7 +4079,7 @@ static void headerTranslation(TransInfo *t, float vec[3], char *str)
}
}
-static void applyTranslation(TransInfo *t, float vec[3])
+static void applyTranslationValue(TransInfo *t, float vec[3])
{
TransData *td = t->data;
float tvec[3];
@@ -3991,7 +4146,7 @@ static void applyTranslation(TransInfo *t, float vec[3])
}
/* uses t->vec to store actual translation in */
-int Translation(TransInfo *t, const int UNUSED(mval[2]))
+static void applyTranslation(TransInfo *t, const int UNUSED(mval[2]))
{
char str[MAX_INFO_LEN];
@@ -4016,11 +4171,11 @@ int Translation(TransInfo *t, const int UNUSED(mval[2]))
headerTranslation(t, t->values, str);
}
- applyTranslation(t, t->values);
+ applyTranslationValue(t, t->values);
/* evil hack - redo translation if clipping needed */
if (t->flag & T_CLIP_UV && clipUVTransform(t, t->values, 0)) {
- applyTranslation(t, t->values);
+ applyTranslationValue(t, t->values);
/* In proportional edit it can happen that */
/* vertices in the radius of the brush end */
@@ -4034,13 +4189,17 @@ int Translation(TransInfo *t, const int UNUSED(mval[2]))
recalcData(t);
ED_area_headerprint(t->sa, str);
-
- return 1;
}
+/** \} */
+
+
+/* -------------------------------------------------------------------- */
+/* Transform (Shrink-Fatten) */
-/* ************************** SHRINK/FATTEN *************************** */
+/** \name Transform Shrink-Fatten
+ * \{ */
-void initShrinkFatten(TransInfo *t)
+static void initShrinkFatten(TransInfo *t)
{
// If not in mesh edit mode, fallback to Resize
if (t->obedit == NULL || t->obedit->type != OB_MESH) {
@@ -4048,7 +4207,7 @@ void initShrinkFatten(TransInfo *t)
}
else {
t->mode = TFM_SHRINKFATTEN;
- t->transform = ShrinkFatten;
+ t->transform = applyShrinkFatten;
initMouseInputMode(t, &t->mouse, INPUT_VERTICAL_ABSOLUTE);
@@ -4065,7 +4224,7 @@ void initShrinkFatten(TransInfo *t)
}
-int ShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
+static void applyShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
{
float distance;
int i;
@@ -4103,7 +4262,7 @@ int ShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
}
}
BLI_snprintf(str + ofs, MAX_INFO_LEN - ofs, IFACE_(" or Alt) Even Thickness %s"),
- (t->flag & T_ALT_TRANSFORM) ? IFACE_("ON") : IFACE_("OFF"));
+ WM_bool_as_string(t->flag & T_ALT_TRANSFORM));
/* done with header string */
@@ -4129,24 +4288,28 @@ int ShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
recalcData(t);
ED_area_headerprint(t->sa, str);
-
- return 1;
}
+/** \} */
+
-/* ************************** TILT *************************** */
+/* -------------------------------------------------------------------- */
+/* Transform (Tilt) */
-void initTilt(TransInfo *t)
+/** \name Transform Tilt
+ * \{ */
+
+static void initTilt(TransInfo *t)
{
t->mode = TFM_TILT;
- t->transform = Tilt;
+ t->transform = applyTilt;
initMouseInputMode(t, &t->mouse, INPUT_ANGLE);
t->idx_max = 0;
t->num.idx_max = 0;
t->snap[0] = 0.0f;
- t->snap[1] = (float)((5.0 / 180) * M_PI);
- t->snap[2] = t->snap[1] * 0.2f;
+ t->snap[1] = DEG2RAD(5.0);
+ t->snap[2] = DEG2RAD(1.0);
t->num.increment = t->snap[1];
@@ -4154,8 +4317,7 @@ void initTilt(TransInfo *t)
}
-
-int Tilt(TransInfo *t, const int UNUSED(mval[2]))
+static void applyTilt(TransInfo *t, const int UNUSED(mval[2]))
{
TransData *td = t->data;
int i;
@@ -4200,17 +4362,20 @@ int Tilt(TransInfo *t, const int UNUSED(mval[2]))
recalcData(t);
ED_area_headerprint(t->sa, str);
-
- return 1;
}
+/** \} */
-/* ******************** Curve Shrink/Fatten *************** */
+/* -------------------------------------------------------------------- */
+/* Transform (Curve Shrink/Fatten) */
-void initCurveShrinkFatten(TransInfo *t)
+/** \name Transform Curve Shrink/Fatten
+ * \{ */
+
+static void initCurveShrinkFatten(TransInfo *t)
{
t->mode = TFM_CURVE_SHRINKFATTEN;
- t->transform = CurveShrinkFatten;
+ t->transform = applyCurveShrinkFatten;
initMouseInputMode(t, &t->mouse, INPUT_SPRING);
@@ -4228,7 +4393,7 @@ void initCurveShrinkFatten(TransInfo *t)
t->flag |= T_NO_CONSTRAINT;
}
-int CurveShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
+static void applyCurveShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
{
TransData *td = t->data;
float ratio;
@@ -4270,15 +4435,20 @@ int CurveShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
recalcData(t);
ED_area_headerprint(t->sa, str);
-
- return 1;
}
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/* Transform (Mask Shrink/Fatten) */
-void initMaskShrinkFatten(TransInfo *t)
+/** \name Transform Mask Shrink/Fatten
+ * \{ */
+
+static void initMaskShrinkFatten(TransInfo *t)
{
t->mode = TFM_MASK_SHRINKFATTEN;
- t->transform = MaskShrinkFatten;
+ t->transform = applyMaskShrinkFatten;
initMouseInputMode(t, &t->mouse, INPUT_SPRING);
@@ -4296,7 +4466,7 @@ void initMaskShrinkFatten(TransInfo *t)
t->flag |= T_NO_CONSTRAINT;
}
-int MaskShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
+static void applyMaskShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
{
TransData *td;
float ratio;
@@ -4359,16 +4529,20 @@ int MaskShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
recalcData(t);
ED_area_headerprint(t->sa, str);
-
- return 1;
}
+/** \} */
+
-/* ************************** PUSH/PULL *************************** */
+/* -------------------------------------------------------------------- */
+/* Transform (Push/Pull) */
-void initPushPull(TransInfo *t)
+/** \name Transform Push/Pull
+ * \{ */
+
+static void initPushPull(TransInfo *t)
{
t->mode = TFM_PUSHPULL;
- t->transform = PushPull;
+ t->transform = applyPushPull;
initMouseInputMode(t, &t->mouse, INPUT_VERTICAL_ABSOLUTE);
@@ -4382,7 +4556,7 @@ void initPushPull(TransInfo *t)
}
-int PushPull(TransInfo *t, const int UNUSED(mval[2]))
+static void applyPushPull(TransInfo *t, const int UNUSED(mval[2]))
{
float vec[3], axis[3];
float distance;
@@ -4444,16 +4618,20 @@ int PushPull(TransInfo *t, const int UNUSED(mval[2]))
recalcData(t);
ED_area_headerprint(t->sa, str);
-
- return 1;
}
+/** \} */
+
-/* ************************** BEVEL WEIGHT *************************** */
+/* -------------------------------------------------------------------- */
+/* Transform (Bevel Weight) */
-void initBevelWeight(TransInfo *t)
+/** \name Transform Bevel Weight
+ * \{ */
+
+static void initBevelWeight(TransInfo *t)
{
t->mode = TFM_BWEIGHT;
- t->transform = BevelWeight;
+ t->transform = applyBevelWeight;
initMouseInputMode(t, &t->mouse, INPUT_SPRING);
@@ -4468,7 +4646,7 @@ void initBevelWeight(TransInfo *t)
t->flag |= T_NO_CONSTRAINT | T_NO_PROJECT;
}
-int BevelWeight(TransInfo *t, const int UNUSED(mval[2]))
+static void applyBevelWeight(TransInfo *t, const int UNUSED(mval[2]))
{
TransData *td = t->data;
float weight;
@@ -4517,16 +4695,20 @@ int BevelWeight(TransInfo *t, const int UNUSED(mval[2]))
recalcData(t);
ED_area_headerprint(t->sa, str);
-
- return 1;
}
+/** \} */
+
-/* ************************** CREASE *************************** */
+/* -------------------------------------------------------------------- */
+/* Transform (Crease) */
-void initCrease(TransInfo *t)
+/** \name Transform Crease
+ * \{ */
+
+static void initCrease(TransInfo *t)
{
t->mode = TFM_CREASE;
- t->transform = Crease;
+ t->transform = applyCrease;
initMouseInputMode(t, &t->mouse, INPUT_SPRING);
@@ -4541,7 +4723,7 @@ void initCrease(TransInfo *t)
t->flag |= T_NO_CONSTRAINT | T_NO_PROJECT;
}
-int Crease(TransInfo *t, const int UNUSED(mval[2]))
+static void applyCrease(TransInfo *t, const int UNUSED(mval[2]))
{
TransData *td = t->data;
float crease;
@@ -4593,16 +4775,20 @@ int Crease(TransInfo *t, const int UNUSED(mval[2]))
recalcData(t);
ED_area_headerprint(t->sa, str);
-
- return 1;
}
+/** \} */
+
-/* ******************** EditBone (B-bone) width scaling *************** */
+/* -------------------------------------------------------------------- */
+/* Transform (EditBone (B-bone) width scaling) */
-void initBoneSize(TransInfo *t)
+/** \name Transform B-bone width scaling
+ * \{ */
+
+static void initBoneSize(TransInfo *t)
{
t->mode = TFM_BONESIZE;
- t->transform = BoneSize;
+ t->transform = applyBoneSize;
initMouseInputMode(t, &t->mouse, INPUT_SPRING_FLIP);
@@ -4617,8 +4803,7 @@ void initBoneSize(TransInfo *t)
t->num.increment = t->snap[1];
}
-/* We assume str is MAX_INFO_LEN long. */
-static void headerBoneSize(TransInfo *t, float vec[3], char *str)
+static void headerBoneSize(TransInfo *t, float vec[3], char str[MAX_INFO_LEN])
{
char tvec[NUM_STR_REP_LEN * 3];
if (hasNumInput(&t->num)) {
@@ -4664,7 +4849,7 @@ static void ElementBoneSize(TransInfo *t, TransData *td, float mat[3][3])
td->loc[1] = oldy;
}
-int BoneSize(TransInfo *t, const int mval[2])
+static void applyBoneSize(TransInfo *t, const int mval[2])
{
TransData *td = t->data;
float size[3], mat[3][3];
@@ -4713,17 +4898,20 @@ int BoneSize(TransInfo *t, const int mval[2])
recalcData(t);
ED_area_headerprint(t->sa, str);
-
- return 1;
}
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/* Transform (Bone Envelope) */
-/* ******************** EditBone envelope *************** */
+/** \name Transform Bone Envelope
+ * \{ */
-void initBoneEnvelope(TransInfo *t)
+static void initBoneEnvelope(TransInfo *t)
{
t->mode = TFM_BONE_ENVELOPE;
- t->transform = BoneEnvelope;
+ t->transform = applyBoneEnvelope;
initMouseInputMode(t, &t->mouse, INPUT_SPRING);
@@ -4738,7 +4926,7 @@ void initBoneEnvelope(TransInfo *t)
t->flag |= T_NO_CONSTRAINT | T_NO_PROJECT;
}
-int BoneEnvelope(TransInfo *t, const int UNUSED(mval[2]))
+static void applyBoneEnvelope(TransInfo *t, const int UNUSED(mval[2]))
{
TransData *td = t->data;
float ratio;
@@ -4781,11 +4969,16 @@ int BoneEnvelope(TransInfo *t, const int UNUSED(mval[2]))
recalcData(t);
ED_area_headerprint(t->sa, str);
-
- return 1;
}
+/** \} */
+
+
+/* -------------------------------------------------------------------- */
+/* Transform (Edge Slide) */
+
+/** \name Transform Edge Slide
+ * \{ */
-/* ******************** Edge Slide *************** */
static BMEdge *get_other_edge(BMVert *v, BMEdge *e)
{
BMIter iter;
@@ -4800,6 +4993,26 @@ static BMEdge *get_other_edge(BMVert *v, BMEdge *e)
return NULL;
}
+/* interpoaltes along a line made up of 2 segments (used for edge slide) */
+static void interp_line_v3_v3v3v3(float p[3], const float v1[3], const float v2[3], const float v3[3], const float t)
+{
+ float t_mid, t_delta;
+
+ /* could be pre-calculated */
+ t_mid = line_point_factor_v3(v2, v1, v3);
+
+ t_delta = t - t_mid;
+ if (fabsf(t_delta) < FLT_EPSILON) {
+ copy_v3_v3(p, v2);
+ }
+ else if (t_delta < 0.0f) {
+ interp_v3_v3v3(p, v1, v2, t / t_mid);
+ }
+ else {
+ interp_v3_v3v3(p, v2, v3, (t - t_mid) / (1.0f - t_mid));
+ }
+}
+
static void len_v3_ensure(float v[3], const float length)
{
normalize_v3(v);
@@ -4825,7 +5038,7 @@ static bool bm_loop_calc_opposite_co(BMLoop *l_tmp,
float tvec[3];
if (isect_line_plane_v3(tvec,
l_iter->v->co, l_iter->next->v->co,
- l_tmp->v->co, plane_no, false))
+ l_tmp->v->co, plane_no))
{
const float fac = line_point_factor_v3(tvec, l_iter->v->co, l_iter->next->v->co);
/* allow some overlap to avoid missing the intersection because of float precision */
@@ -5623,12 +5836,12 @@ void freeEdgeSlideVerts(TransInfo *t)
recalcData(t);
}
-void initEdgeSlide(TransInfo *t)
+static void initEdgeSlide(TransInfo *t)
{
EdgeSlideData *sld;
t->mode = TFM_EDGE_SLIDE;
- t->transform = EdgeSlide;
+ t->transform = applyEdgeSlide;
t->handleEvent = handleEventEdgeSlide;
if (!createEdgeSlideVerts(t)) {
@@ -5658,7 +5871,7 @@ void initEdgeSlide(TransInfo *t)
t->flag |= T_NO_CONSTRAINT | T_NO_PROJECT;
}
-int handleEventEdgeSlide(struct TransInfo *t, const struct wmEvent *event)
+static eRedrawFlag handleEventEdgeSlide(struct TransInfo *t, const struct wmEvent *event)
{
if (t->mode == TFM_EDGE_SLIDE) {
EdgeSlideData *sld = t->customData;
@@ -5668,7 +5881,7 @@ int handleEventEdgeSlide(struct TransInfo *t, const struct wmEvent *event)
case EKEY:
if (event->val == KM_PRESS) {
sld->is_proportional = !sld->is_proportional;
- return 1;
+ return TREDRAW_HARD;
}
break;
case FKEY:
@@ -5677,7 +5890,7 @@ int handleEventEdgeSlide(struct TransInfo *t, const struct wmEvent *event)
if (sld->is_proportional == FALSE) {
sld->flipped_vtx = !sld->flipped_vtx;
}
- return 1;
+ return TREDRAW_HARD;
}
break;
}
@@ -5702,7 +5915,7 @@ int handleEventEdgeSlide(struct TransInfo *t, const struct wmEvent *event)
}
}
}
- return 0;
+ return TREDRAW_NOTHING;
}
static void drawEdgeSlide(const struct bContext *C, TransInfo *t)
@@ -5712,20 +5925,16 @@ static void drawEdgeSlide(const struct bContext *C, TransInfo *t)
/* Non-Prop mode */
if (sld && sld->is_proportional == FALSE) {
View3D *v3d = CTX_wm_view3d(C);
- float marker[3];
- float v1[3], v2[3];
- float interp_v;
+ float co_a[3], co_b[3], co_mark[3];
TransDataEdgeSlideVert *curr_sv = &sld->sv[sld->curr_sv_index];
+ const float fac = (sld->perc + 1.0f) / 2.0f;
const float ctrl_size = UI_GetThemeValuef(TH_FACEDOT_SIZE) + 1.5f;
const float guide_size = ctrl_size - 0.5f;
const float line_size = UI_GetThemeValuef(TH_OUTLINE_WIDTH) + 0.5f;
const int alpha_shade = -30;
- add_v3_v3v3(v1, curr_sv->v_co_orig, curr_sv->dir_a);
- add_v3_v3v3(v2, curr_sv->v_co_orig, curr_sv->dir_b);
-
- interp_v = (sld->perc + 1.0f) / 2.0f;
- interp_v3_v3v3(marker, v2, v1, interp_v);
+ add_v3_v3v3(co_a, curr_sv->v_co_orig, curr_sv->dir_a);
+ add_v3_v3v3(co_b, curr_sv->v_co_orig, curr_sv->dir_b);
if (v3d && v3d->zbuf)
glDisable(GL_DEPTH_TEST);
@@ -5766,7 +5975,12 @@ static void drawEdgeSlide(const struct bContext *C, TransInfo *t)
UI_ThemeColorShadeAlpha(TH_SELECT, 255, alpha_shade);
glPointSize(guide_size);
bglBegin(GL_POINTS);
- bglVertex3fv(marker);
+#if 0
+ interp_v3_v3v3(co_mark, co_b, co_a, fac);
+ bglVertex3fv(co_mark);
+#endif
+ interp_line_v3_v3v3v3(co_mark, co_b, curr_sv->v_co_orig, co_a, fac);
+ bglVertex3fv(co_mark);
bglEnd();
@@ -5828,10 +6042,10 @@ static int doEdgeSlide(TransInfo *t, float perc)
add_v3_v3v3(co_b, sv->v_co_orig, sv->dir_b);
if (sld->flipped_vtx) {
- interp_v3_v3v3(sv->v->co, co_b, co_a, fac);
+ interp_line_v3_v3v3v3(sv->v->co, co_b, sv->v_co_orig, co_a, fac);
}
else {
- interp_v3_v3v3(sv->v->co, co_a, co_b, fac);
+ interp_line_v3_v3v3v3(sv->v->co, co_a, sv->v_co_orig, co_b, fac);
}
}
}
@@ -5842,7 +6056,7 @@ static int doEdgeSlide(TransInfo *t, float perc)
return 1;
}
-int EdgeSlide(TransInfo *t, const int UNUSED(mval[2]))
+static void applyEdgeSlide(TransInfo *t, const int UNUSED(mval[2]))
{
char str[MAX_INFO_LEN];
float final;
@@ -5850,9 +6064,6 @@ int EdgeSlide(TransInfo *t, const int UNUSED(mval[2]))
bool flipped = sld->flipped_vtx;
bool is_proportional = sld->is_proportional;
- const char *on_str = IFACE_("ON");
- const char *off_str = IFACE_("OFF");
-
final = t->values[0];
snapGrid(t, &final);
@@ -5868,11 +6079,11 @@ int EdgeSlide(TransInfo *t, const int UNUSED(mval[2]))
outputNumInput(&(t->num), c);
BLI_snprintf(str, MAX_INFO_LEN, IFACE_("Edge Slide: %s (E)ven: %s, (F)lipped: %s"),
- &c[0], !is_proportional ? on_str : off_str, flipped ? on_str : off_str);
+ &c[0], WM_bool_as_string(!is_proportional), WM_bool_as_string(flipped));
}
else {
BLI_snprintf(str, MAX_INFO_LEN, IFACE_("Edge Slide: %.4f (E)ven: %s, (F)lipped: %s"),
- final, !is_proportional ? on_str : off_str, flipped ? on_str : off_str);
+ final, WM_bool_as_string(!is_proportional), WM_bool_as_string(flipped));
}
CLAMP(final, -1.0f, 1.0f);
@@ -5885,12 +6096,16 @@ int EdgeSlide(TransInfo *t, const int UNUSED(mval[2]))
recalcData(t);
ED_area_headerprint(t->sa, str);
-
- return 1;
}
+/** \} */
+
+
+/* -------------------------------------------------------------------- */
+/* Transform (Vert Slide) */
+/** \name Transform Vert Slide
+ * \{ */
-/* ******************** Vert Slide *************** */
static void calcVertSlideCustomPoints(struct TransInfo *t)
{
VertSlideData *sld = t->customData;
@@ -6127,12 +6342,12 @@ void freeVertSlideVerts(TransInfo *t)
recalcData(t);
}
-void initVertSlide(TransInfo *t)
+static void initVertSlide(TransInfo *t)
{
VertSlideData *sld;
t->mode = TFM_VERT_SLIDE;
- t->transform = VertSlide;
+ t->transform = applyVertSlide;
t->handleEvent = handleEventVertSlide;
if (!createVertSlideVerts(t)) {
@@ -6162,7 +6377,7 @@ void initVertSlide(TransInfo *t)
t->flag |= T_NO_CONSTRAINT | T_NO_PROJECT;
}
-int handleEventVertSlide(struct TransInfo *t, const struct wmEvent *event)
+static eRedrawFlag handleEventVertSlide(struct TransInfo *t, const struct wmEvent *event)
{
if (t->mode == TFM_VERT_SLIDE) {
VertSlideData *sld = t->customData;
@@ -6175,7 +6390,7 @@ int handleEventVertSlide(struct TransInfo *t, const struct wmEvent *event)
if (sld->flipped_vtx) {
calcVertSlideCustomPoints(t);
}
- return 1;
+ return TREDRAW_HARD;
}
break;
case FKEY:
@@ -6183,7 +6398,7 @@ int handleEventVertSlide(struct TransInfo *t, const struct wmEvent *event)
if (event->val == KM_PRESS) {
sld->flipped_vtx = !sld->flipped_vtx;
calcVertSlideCustomPoints(t);
- return 1;
+ return TREDRAW_HARD;
}
break;
}
@@ -6193,7 +6408,7 @@ int handleEventVertSlide(struct TransInfo *t, const struct wmEvent *event)
if (event->val == KM_PRESS) {
t->flag ^= T_ALT_TRANSFORM;
calcVertSlideCustomPoints(t);
- return 1;
+ return TREDRAW_HARD;
}
break;
}
@@ -6229,7 +6444,7 @@ int handleEventVertSlide(struct TransInfo *t, const struct wmEvent *event)
}
}
}
- return 0;
+ return TREDRAW_NOTHING;
}
static void drawVertSlide(const struct bContext *C, TransInfo *t)
@@ -6346,7 +6561,7 @@ static int doVertSlide(TransInfo *t, float perc)
return 1;
}
-int VertSlide(TransInfo *t, const int UNUSED(mval[2]))
+static void applyVertSlide(TransInfo *t, const int UNUSED(mval[2]))
{
char str[MAX_INFO_LEN];
size_t ofs = 0;
@@ -6357,9 +6572,6 @@ int VertSlide(TransInfo *t, const int UNUSED(mval[2]))
const bool is_clamp = !(t->flag & T_ALT_TRANSFORM);
const bool is_constrained = !(is_clamp == false || hasNumInput(&t->num));
- const char *on_str = IFACE_("ON");
- const char *off_str = IFACE_("OFF");
-
final = t->values[0];
snapGrid(t, &final);
@@ -6380,11 +6592,11 @@ int VertSlide(TransInfo *t, const int UNUSED(mval[2]))
else {
ofs += BLI_snprintf(str + ofs, MAX_INFO_LEN - ofs, "%.4f ", final);
}
- ofs += BLI_snprintf(str + ofs, MAX_INFO_LEN - ofs, IFACE_("(E)ven: %s, "), !is_proportional ? on_str : off_str);
+ ofs += BLI_snprintf(str + ofs, MAX_INFO_LEN - ofs, IFACE_("(E)ven: %s, "), WM_bool_as_string(!is_proportional));
if (!is_proportional) {
- ofs += BLI_snprintf(str + ofs, MAX_INFO_LEN - ofs, IFACE_("(F)lipped: %s, "), flipped ? on_str : off_str);
+ ofs += BLI_snprintf(str + ofs, MAX_INFO_LEN - ofs, IFACE_("(F)lipped: %s, "), WM_bool_as_string(flipped));
}
- ofs += BLI_snprintf(str + ofs, MAX_INFO_LEN - ofs, IFACE_("Alt or (C)lamp: %s"), is_clamp ? on_str : off_str);
+ ofs += BLI_snprintf(str + ofs, MAX_INFO_LEN - ofs, IFACE_("Alt or (C)lamp: %s"), WM_bool_as_string(is_clamp));
/* done with header string */
/* do stuff here */
@@ -6393,32 +6605,35 @@ int VertSlide(TransInfo *t, const int UNUSED(mval[2]))
recalcData(t);
ED_area_headerprint(t->sa, str);
-
- return 1;
}
+/** \} */
-/* ******************** EditBone roll *************** */
+/* -------------------------------------------------------------------- */
+/* Transform (EditBone Roll) */
-void initBoneRoll(TransInfo *t)
+/** \name Transform EditBone Roll
+ * \{ */
+
+static void initBoneRoll(TransInfo *t)
{
t->mode = TFM_BONE_ROLL;
- t->transform = BoneRoll;
+ t->transform = applyBoneRoll;
initMouseInputMode(t, &t->mouse, INPUT_ANGLE);
t->idx_max = 0;
t->num.idx_max = 0;
t->snap[0] = 0.0f;
- t->snap[1] = (float)((5.0 / 180) * M_PI);
- t->snap[2] = t->snap[1] * 0.2f;
+ t->snap[1] = DEG2RAD(5.0);
+ t->snap[2] = DEG2RAD(1.0);
t->num.increment = 1.0f;
t->flag |= T_NO_CONSTRAINT | T_NO_PROJECT;
}
-int BoneRoll(TransInfo *t, const int UNUSED(mval[2]))
+static void applyBoneRoll(TransInfo *t, const int UNUSED(mval[2]))
{
TransData *td = t->data;
int i;
@@ -6459,15 +6674,19 @@ int BoneRoll(TransInfo *t, const int UNUSED(mval[2]))
recalcData(t);
ED_area_headerprint(t->sa, str);
-
- return 1;
}
+/** \} */
+
-/* ************************** BAKE TIME ******************* */
+/* -------------------------------------------------------------------- */
+/* Transform (Bake-Time) */
-void initBakeTime(TransInfo *t)
+/** \name Transform Bake-Time
+ * \{ */
+
+static void initBakeTime(TransInfo *t)
{
- t->transform = BakeTime;
+ t->transform = applyBakeTime;
initMouseInputMode(t, &t->mouse, INPUT_NONE);
t->idx_max = 0;
@@ -6479,7 +6698,7 @@ void initBakeTime(TransInfo *t)
t->num.increment = t->snap[1];
}
-int BakeTime(TransInfo *t, const int mval[2])
+static void applyBakeTime(TransInfo *t, const int mval[2])
{
TransData *td = t->data;
float time;
@@ -6537,15 +6756,19 @@ int BakeTime(TransInfo *t, const int mval[2])
recalcData(t);
ED_area_headerprint(t->sa, str);
-
- return 1;
}
+/** \} */
-/* ************************** MIRROR *************************** */
-void initMirror(TransInfo *t)
+/* -------------------------------------------------------------------- */
+/* Transform (Mirror) */
+
+/** \name Transform Mirror
+ * \{ */
+
+static void initMirror(TransInfo *t)
{
- t->transform = Mirror;
+ t->transform = applyMirror;
initMouseInputMode(t, &t->mouse, INPUT_NONE);
t->flag |= T_NULL_ONE;
@@ -6554,7 +6777,7 @@ void initMirror(TransInfo *t)
}
}
-int Mirror(TransInfo *t, const int UNUSED(mval[2]))
+static void applyMirror(TransInfo *t, const int UNUSED(mval[2]))
{
TransData *td;
float size[3], mat[3][3];
@@ -6615,22 +6838,26 @@ int Mirror(TransInfo *t, const int UNUSED(mval[2]))
else
ED_area_headerprint(t->sa, IFACE_("Select a mirror axis (X, Y, Z)"));
}
-
- return 1;
}
+/** \} */
-/* ************************** ALIGN *************************** */
-void initAlign(TransInfo *t)
+/* -------------------------------------------------------------------- */
+/* Transform (Align) */
+
+/** \name Transform Align
+ * \{ */
+
+static void initAlign(TransInfo *t)
{
t->flag |= T_NO_CONSTRAINT;
- t->transform = Align;
+ t->transform = applyAlign;
initMouseInputMode(t, &t->mouse, INPUT_NONE);
}
-int Align(TransInfo *t, const int UNUSED(mval[2]))
+static void applyAlign(TransInfo *t, const int UNUSED(mval[2]))
{
TransData *td = t->data;
float center[3];
@@ -6671,15 +6898,19 @@ int Align(TransInfo *t, const int UNUSED(mval[2]))
recalcData(t);
ED_area_headerprint(t->sa, IFACE_("Align"));
-
- return 1;
}
+/** \} */
-/* ************************** SEQ SLIDE *************************** */
-void initSeqSlide(TransInfo *t)
+/* -------------------------------------------------------------------- */
+/* Transform (Sequencer Slide) */
+
+/** \name Transform Sequencer Slide
+ * \{ */
+
+static void initSeqSlide(TransInfo *t)
{
- t->transform = SeqSlide;
+ t->transform = applySeqSlide;
initMouseInputMode(t, &t->mouse, INPUT_VECTOR);
@@ -6694,8 +6925,7 @@ void initSeqSlide(TransInfo *t)
t->num.increment = t->snap[1];
}
-/* We assume str is MAX_INFO_LEN long. */
-static void headerSeqSlide(TransInfo *t, float val[2], char *str)
+static void headerSeqSlide(TransInfo *t, float val[2], char str[MAX_INFO_LEN])
{
char tvec[NUM_STR_REP_LEN * 3];
size_t ofs = 0;
@@ -6716,10 +6946,10 @@ static void headerSeqSlide(TransInfo *t, float val[2], char *str)
}
}
ofs += BLI_snprintf(str + ofs, MAX_INFO_LEN - ofs, IFACE_(" or Alt) Expand to fit %s"),
- (t->flag & T_ALT_TRANSFORM) ? IFACE_("ON") : IFACE_("OFF"));
+ WM_bool_as_string(t->flag & T_ALT_TRANSFORM));
}
-static void applySeqSlide(TransInfo *t, const float val[2])
+static void applySeqSlideValue(TransInfo *t, const float val[2])
{
TransData *td = t->data;
int i;
@@ -6742,7 +6972,7 @@ static void applySeqSlide(TransInfo *t, const float val[2])
}
}
-int SeqSlide(TransInfo *t, const int UNUSED(mval[2]))
+static void applySeqSlide(TransInfo *t, const int UNUSED(mval[2]))
{
char str[MAX_INFO_LEN];
@@ -6761,19 +6991,23 @@ int SeqSlide(TransInfo *t, const int UNUSED(mval[2]))
t->values[1] = floor(t->values[1] + 0.5f);
headerSeqSlide(t, t->values, str);
- applySeqSlide(t, t->values);
+ applySeqSlideValue(t, t->values);
recalcData(t);
ED_area_headerprint(t->sa, str);
-
- return 1;
}
+/** \} */
-/* ************************** ANIM EDITORS - TRANSFORM TOOLS *************************** */
-/* ---------------- Special Helpers for Various Settings ------------- */
+/* -------------------------------------------------------------------- */
+/* Animation Editors - Transform Utils
+ *
+ * Special Helpers for Various Settings
+ */
+/** \name Animation Editor Utils
+ * \{ */
/* This function returns the snapping 'mode' for Animation Editors only
* We cannot use the standard snapping due to NLA-strip scaling complexities.
@@ -6925,10 +7159,16 @@ static void doAnimEdit_SnapFrame(TransInfo *t, TransData *td, TransData2D *td2d,
td2d->h2[0] = td2d->ih2[0] + *td->val - td->ival;
}
}
+/** \} */
+
+
+/* -------------------------------------------------------------------- */
+/* Transform (Animation Translation) */
-/* ----------------- Translation ----------------------- */
+/** \name Transform Animation Translation
+ * \{ */
-void initTimeTranslate(TransInfo *t)
+static void initTimeTranslate(TransInfo *t)
{
/* this tool is only really available in the Action Editor... */
if (!ELEM(t->spacetype, SPACE_ACTION, SPACE_SEQ)) {
@@ -6936,7 +7176,7 @@ void initTimeTranslate(TransInfo *t)
}
t->mode = TFM_TIME_TRANSLATE;
- t->transform = TimeTranslate;
+ t->transform = applyTimeTranslate;
initMouseInputMode(t, &t->mouse, INPUT_NONE);
@@ -6952,8 +7192,7 @@ void initTimeTranslate(TransInfo *t)
t->num.increment = t->snap[1];
}
-/* We assume str is MAX_INFO_LEN long. */
-static void headerTimeTranslate(TransInfo *t, char *str)
+static void headerTimeTranslate(TransInfo *t, char str[MAX_INFO_LEN])
{
char tvec[NUM_STR_REP_LEN * 3];
@@ -6989,7 +7228,7 @@ static void headerTimeTranslate(TransInfo *t, char *str)
BLI_snprintf(str, MAX_INFO_LEN, IFACE_("DeltaX: %s"), &tvec[0]);
}
-static void applyTimeTranslate(TransInfo *t, float UNUSED(sval))
+static void applyTimeTranslateValue(TransInfo *t, float UNUSED(sval))
{
TransData *td = t->data;
TransData2D *td2d = t->data2d;
@@ -7046,7 +7285,7 @@ static void applyTimeTranslate(TransInfo *t, float UNUSED(sval))
}
}
-int TimeTranslate(TransInfo *t, const int mval[2])
+static void applyTimeTranslate(TransInfo *t, const int mval[2])
{
View2D *v2d = (View2D *)t->view;
float cval[2], sval[2];
@@ -7065,18 +7304,22 @@ int TimeTranslate(TransInfo *t, const int mval[2])
t->values[0] = t->vec[0];
headerTimeTranslate(t, str);
- applyTimeTranslate(t, sval[0]);
+ applyTimeTranslateValue(t, sval[0]);
recalcData(t);
ED_area_headerprint(t->sa, str);
-
- return 1;
}
+/** \} */
+
+
+/* -------------------------------------------------------------------- */
+/* Transform (Animation Time Slide) */
-/* ----------------- Time Slide ----------------------- */
+/** \name Transform Animation Time Slide
+ * \{ */
-void initTimeSlide(TransInfo *t)
+static void initTimeSlide(TransInfo *t)
{
/* this tool is only really available in the Action Editor... */
if (t->spacetype == SPACE_ACTION) {
@@ -7091,7 +7334,7 @@ void initTimeSlide(TransInfo *t)
t->mode = TFM_TIME_SLIDE;
- t->transform = TimeSlide;
+ t->transform = applyTimeSlide;
t->flag |= T_FREE_CUSTOMDATA;
initMouseInputMode(t, &t->mouse, INPUT_NONE);
@@ -7108,8 +7351,7 @@ void initTimeSlide(TransInfo *t)
t->num.increment = t->snap[1];
}
-/* We assume str is MAX_INFO_LEN long. */
-static void headerTimeSlide(TransInfo *t, float sval, char *str)
+static void headerTimeSlide(TransInfo *t, float sval, char str[MAX_INFO_LEN])
{
char tvec[NUM_STR_REP_LEN * 3];
@@ -7131,7 +7373,7 @@ static void headerTimeSlide(TransInfo *t, float sval, char *str)
BLI_snprintf(str, MAX_INFO_LEN, IFACE_("TimeSlide: %s"), &tvec[0]);
}
-static void applyTimeSlide(TransInfo *t, float sval)
+static void applyTimeSlideValue(TransInfo *t, float sval)
{
TransData *td = t->data;
int i;
@@ -7178,7 +7420,7 @@ static void applyTimeSlide(TransInfo *t, float sval)
}
}
-int TimeSlide(TransInfo *t, const int mval[2])
+static void applyTimeSlide(TransInfo *t, const int mval[2])
{
View2D *v2d = (View2D *)t->view;
float cval[2], sval[2];
@@ -7200,20 +7442,24 @@ int TimeSlide(TransInfo *t, const int mval[2])
t->values[0] = (maxx - minx) * t->vec[0] / 2.0f + sval[0];
headerTimeSlide(t, sval[0], str);
- applyTimeSlide(t, sval[0]);
+ applyTimeSlideValue(t, sval[0]);
recalcData(t);
ED_area_headerprint(t->sa, str);
-
- return 1;
}
+/** \} */
+
+
+/* -------------------------------------------------------------------- */
+/* Transform (Animation Time Scale) */
-/* ----------------- Scaling ----------------------- */
+/** \name Transform Animation Time Scale
+ * \{ */
-void initTimeScale(TransInfo *t)
+static void initTimeScale(TransInfo *t)
{
- int center[2];
+ float center[2];
/* this tool is only really available in the Action Editor
* AND NLA Editor (for strip scaling)
@@ -7223,12 +7469,12 @@ void initTimeScale(TransInfo *t)
}
t->mode = TFM_TIME_SCALE;
- t->transform = TimeScale;
+ t->transform = applyTimeScale;
/* recalculate center2d to use CFRA and mouse Y, since that's
* what is used in time scale */
t->center[0] = t->scene->r.cfra;
- projectIntView(t, t->center, center);
+ projectFloatView(t, t->center, center);
center[1] = t->imval[1];
/* force a reinit with the center2d used here */
@@ -7251,8 +7497,7 @@ void initTimeScale(TransInfo *t)
t->num.increment = t->snap[1];
}
-/* We assume str is MAX_INFO_LEN long. */
-static void headerTimeScale(TransInfo *t, char *str)
+static void headerTimeScale(TransInfo *t, char str[MAX_INFO_LEN])
{
char tvec[NUM_STR_REP_LEN * 3];
@@ -7264,7 +7509,7 @@ static void headerTimeScale(TransInfo *t, char *str)
BLI_snprintf(str, MAX_INFO_LEN, IFACE_("ScaleX: %s"), &tvec[0]);
}
-static void applyTimeScale(TransInfo *t)
+static void applyTimeScaleValue(TransInfo *t)
{
Scene *scene = t->scene;
TransData *td = t->data;
@@ -7304,7 +7549,7 @@ static void applyTimeScale(TransInfo *t)
}
}
-int TimeScale(TransInfo *t, const int UNUSED(mval[2]))
+static void applyTimeScale(TransInfo *t, const int UNUSED(mval[2]))
{
char str[MAX_INFO_LEN];
@@ -7314,22 +7559,13 @@ int TimeScale(TransInfo *t, const int UNUSED(mval[2]))
t->values[0] = t->vec[0];
headerTimeScale(t, str);
- applyTimeScale(t);
+ applyTimeScaleValue(t);
recalcData(t);
ED_area_headerprint(t->sa, str);
-
- return 1;
-}
-
-/* ************************************ */
-
-void BIF_TransformSetUndo(const char *UNUSED(str))
-{
- // TRANSFORM_FIX_ME
- //Trans.undostr = str;
}
+/** \} */
/* TODO, move to: transform_queries.c */
diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h
index 4954f861934..73b8c47eb63 100644
--- a/source/blender/editors/transform/transform.h
+++ b/source/blender/editors/transform/transform.h
@@ -62,6 +62,13 @@ struct wmTimer;
struct ARegion;
struct ReportList;
+/* transinfo->redraw */
+typedef enum {
+ TREDRAW_NOTHING = 0,
+ TREDRAW_HARD = 1,
+ TREDRAW_SOFT = 2,
+} eRedrawFlag;
+
typedef struct TransSnapPoint {
struct TransSnapPoint *next, *prev;
float co[3];
@@ -271,7 +278,7 @@ typedef struct MouseInput {
int imval[2]; /* initial mouse position */
char precision;
int precision_mval[2]; /* mouse position when precision key was pressed */
- int center[2];
+ float center[2];
float factor;
void *data; /* additional data, if needed by the particular function */
} MouseInput;
@@ -284,9 +291,9 @@ typedef struct TransInfo {
int options; /* current context/options for transform */
float val; /* init value for some transformations (and rotation angle) */
float fac; /* factor for distance based transform */
- int (*transform)(struct TransInfo *, const int *);
+ void (*transform)(struct TransInfo *, const int[2]);
/* transform function pointer */
- int (*handleEvent)(struct TransInfo *, const struct wmEvent *);
+ eRedrawFlag (*handleEvent)(struct TransInfo *, const struct wmEvent *);
/* event handler function pointer RETURN 1 if redraw is needed */
int total; /* total number of transformed data */
TransData *data; /* transformed data (array) */
@@ -296,11 +303,11 @@ typedef struct TransInfo {
TransSnap tsnap;
NumInput num; /* numerical input */
MouseInput mouse; /* mouse input */
- char redraw; /* redraw flag */
+ eRedrawFlag redraw; /* redraw flag */
float prop_size; /* proportional circle radius */
char proptext[20]; /* proportional falloff text */
float center[3]; /* center of transformation */
- int center2d[2]; /* center in screen coordinates */
+ float center2d[2]; /* center in screen coordinates */
int imval[2]; /* initial mouse position */
short event_type; /* event->type used to invoke transform */
short idx_max; /* maximum index on the input vector */
@@ -341,7 +348,9 @@ typedef struct TransInfo {
float auto_values[4];
float axis[3];
float axis_orig[3]; /* TransCon can change 'axis', store the original value here */
-
+
+ short remove_on_cancel; /* remove elements if operator is canceled */
+
void *view;
struct bContext *context; /* Only valid (non null) during an operator called function. */
struct ScrArea *sa;
@@ -350,6 +359,7 @@ typedef struct TransInfo {
struct ToolSettings *settings;
struct wmTimer *animtimer;
struct wmKeyMap *keymap; /* so we can do lookups for header text */
+ struct ReportList *reports; /* assign from the operator, or can be NULL */
int mval[2]; /* current mouse position */
float zfac; /* use for 3d view */
struct Object *obedit;
@@ -369,12 +379,6 @@ typedef struct TransInfo {
#define TRANS_CONFIRM 2
#define TRANS_CANCEL 3
-/* transinfo->redraw */
-#define TREDRAW_NOTHING 0
-#define TREDRAW_HARD 1
-#define TREDRAW_SOFT 2
-
-
/* transinfo->flag */
#define T_OBJECT (1 << 0)
#define T_EDIT (1 << 1)
@@ -491,91 +495,6 @@ void projectFloatView(TransInfo *t, const float vec[3], float adr[2]);
void applyAspectRatio(TransInfo *t, float *vec);
void removeAspectRatio(TransInfo *t, float *vec);
-void initWarp(TransInfo *t);
-int handleEventWarp(TransInfo *t, const struct wmEvent *event);
-int Warp(TransInfo *t, const int mval[2]);
-
-void initShear(TransInfo *t);
-int handleEventShear(TransInfo *t, const struct wmEvent *event);
-int Shear(TransInfo *t, const int mval[2]);
-
-void initResize(TransInfo *t);
-int Resize(TransInfo *t, const int mval[2]);
-
-void initSkinResize(TransInfo *t);
-int SkinResize(TransInfo *t, const int mval[2]);
-
-void initTranslation(TransInfo *t);
-int Translation(TransInfo *t, const int mval[2]);
-
-void initToSphere(TransInfo *t);
-int ToSphere(TransInfo *t, const int mval[2]);
-
-void initRotation(TransInfo *t);
-int Rotation(TransInfo *t, const int mval[2]);
-
-void initShrinkFatten(TransInfo *t);
-int ShrinkFatten(TransInfo *t, const int mval[2]);
-
-void initTilt(TransInfo *t);
-int Tilt(TransInfo *t, const int mval[2]);
-
-void initCurveShrinkFatten(TransInfo *t);
-int CurveShrinkFatten(TransInfo *t, const int mval[2]);
-
-void initMaskShrinkFatten(TransInfo *t);
-int MaskShrinkFatten(TransInfo *t, const int mval[2]);
-
-void initTrackball(TransInfo *t);
-int Trackball(TransInfo *t, const int mval[2]);
-
-void initPushPull(TransInfo *t);
-int PushPull(TransInfo *t, const int mval[2]);
-
-void initBevelWeight(TransInfo *t);
-int BevelWeight(TransInfo *t, const int mval[2]);
-
-void initCrease(TransInfo *t);
-int Crease(TransInfo *t, const int mval[2]);
-
-void initBoneSize(TransInfo *t);
-int BoneSize(TransInfo *t, const int mval[2]);
-
-void initBoneEnvelope(TransInfo *t);
-int BoneEnvelope(TransInfo *t, const int mval[2]);
-
-void initBoneRoll(TransInfo *t);
-int BoneRoll(TransInfo *t, const int mval[2]);
-
-void initEdgeSlide(TransInfo *t);
-int handleEventEdgeSlide(TransInfo *t, const struct wmEvent *event);
-int EdgeSlide(TransInfo *t, const int mval[2]);
-
-void initVertSlide(TransInfo *t);
-int handleEventVertSlide(TransInfo *t, const struct wmEvent *event);
-int VertSlide(TransInfo *t, const int mval[2]);
-
-void initTimeTranslate(TransInfo *t);
-int TimeTranslate(TransInfo *t, const int mval[2]);
-
-void initTimeSlide(TransInfo *t);
-int TimeSlide(TransInfo *t, const int mval[2]);
-
-void initTimeScale(TransInfo *t);
-int TimeScale(TransInfo *t, const int mval[2]);
-
-void initBakeTime(TransInfo *t);
-int BakeTime(TransInfo *t, const int mval[2]);
-
-void initMirror(TransInfo *t);
-int Mirror(TransInfo *t, const int mval[2]);
-
-void initAlign(TransInfo *t);
-int Align(TransInfo *t, const int mval[2]);
-
-void initSeqSlide(TransInfo *t);
-int SeqSlide(TransInfo *t, const int mval[2]);
-
void drawPropCircle(const struct bContext *C, TransInfo *t);
struct wmKeyMap *transform_modal_keymap(struct wmKeyConfig *keyconf);
@@ -657,14 +576,14 @@ void initSnapping(struct TransInfo *t, struct wmOperator *op);
void applyProject(TransInfo *t);
void applySnapping(TransInfo *t, float *vec);
void resetSnapping(TransInfo *t);
-bool handleSnapping(TransInfo *t, const struct wmEvent *event);
+eRedrawFlag handleSnapping(TransInfo *t, const struct wmEvent *event);
void drawSnapping(const struct bContext *C, TransInfo *t);
bool usingSnappingNormal(TransInfo *t);
bool validSnappingNormal(TransInfo *t);
void getSnapPoint(TransInfo *t, float vec[3]);
void addSnapPoint(TransInfo *t);
-bool updateSelectedSnapPoint(TransInfo *t);
+eRedrawFlag updateSelectedSnapPoint(TransInfo *t);
void removeSnapPoint(TransInfo *t);
/********************** Mouse Input ******************************/
@@ -675,6 +594,7 @@ typedef enum {
INPUT_SPRING,
INPUT_SPRING_FLIP,
INPUT_ANGLE,
+ INPUT_ANGLE_SPRING,
INPUT_TRACKBALL,
INPUT_HORIZONTAL_RATIO,
INPUT_HORIZONTAL_ABSOLUTE,
@@ -684,9 +604,9 @@ typedef enum {
INPUT_CUSTOM_RATIO_FLIP
} MouseInputMode;
-void initMouseInput(TransInfo *t, MouseInput *mi, const int center[2], const int mval[2]);
+void initMouseInput(TransInfo *t, MouseInput *mi, const float center[2], const int mval[2]);
void initMouseInputMode(TransInfo *t, MouseInput *mi, MouseInputMode mode);
-int handleMouseInput(struct TransInfo *t, struct MouseInput *mi, const struct wmEvent *event);
+eRedrawFlag handleMouseInput(struct TransInfo *t, struct MouseInput *mi, const struct wmEvent *event);
void applyMouseInput(struct TransInfo *t, struct MouseInput *mi, const int mval[2], float output[3]);
void setCustomPoints(TransInfo *t, MouseInput *mi, const int start[2], const int end[2]);
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c
index fd8fba91fc9..4497723185f 100644
--- a/source/blender/editors/transform/transform_constraints.c
+++ b/source/blender/editors/transform/transform_constraints.c
@@ -569,7 +569,7 @@ void setConstraint(TransInfo *t, float space[3][3], int mode, const char text[])
t->con.applyVec = applyAxisConstraintVec;
t->con.applySize = applyAxisConstraintSize;
t->con.applyRot = applyAxisConstraintRot;
- t->redraw = 1;
+ t->redraw = TREDRAW_HARD;
}
/* applies individual td->axismtx constraints */
@@ -590,7 +590,7 @@ void setAxisMatrixConstraint(TransInfo *t, int mode, const char text[])
t->con.applyVec = applyObjectConstraintVec;
t->con.applySize = applyObjectConstraintSize;
t->con.applyRot = applyObjectConstraintRot;
- t->redraw = 1;
+ t->redraw = TREDRAW_HARD;
}
}
@@ -727,6 +727,7 @@ void drawPropCircle(const struct bContext *C, TransInfo *t)
RegionView3D *rv3d = CTX_wm_region_view3d(C);
float tmat[4][4], imat[4][4];
float center[3];
+ int depth_test_enabled;
UI_ThemeColor(TH_GRID);
@@ -759,10 +760,17 @@ void drawPropCircle(const struct bContext *C, TransInfo *t)
glScalef(1.0f / aspx, 1.0f / aspy, 1.0);
}
+ depth_test_enabled = glIsEnabled(GL_DEPTH_TEST);
+ if (depth_test_enabled)
+ glDisable(GL_DEPTH_TEST);
+
set_inverted_drawing(1);
drawcircball(GL_LINE_LOOP, center, t->prop_size, imat);
set_inverted_drawing(0);
+ if (depth_test_enabled)
+ glEnable(GL_DEPTH_TEST);
+
glPopMatrix();
}
}
@@ -784,6 +792,13 @@ static void drawObjectConstraint(TransInfo *t)
float co[3];
float (*axismtx)[3];
+ if (t->flag & T_PROP_EDIT) {
+ /* we're sorted, so skip the rest */
+ if (td->factor == 0.0f) {
+ break;
+ }
+ }
+
if (t->flag & T_OBJECT) {
copy_v3_v3(co, td->ob->obmat[3]);
axismtx = td->axismtx;
@@ -896,7 +911,7 @@ void postSelectConstraint(TransInfo *t)
setNearestAxis(t);
startConstraint(t);
- t->redraw = 1;
+ t->redraw = TREDRAW_HARD;
}
static void setNearestAxis2d(TransInfo *t)
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 01605003d7b..28d31b09ad2 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -58,9 +58,12 @@
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
-#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "BLI_smallhash.h"
+#include "BLI_listbase.h"
+#include "BLI_linklist_stack.h"
+#include "BLI_string.h"
+#include "BLI_rect.h"
#include "BKE_DerivedMesh.h"
#include "BKE_action.h"
@@ -120,7 +123,19 @@
#include "transform.h"
#include "bmesh.h"
-#include "BLI_sys_types.h" // for intptr_t support
+/**
+ * Transforming around ourselves is no use, fallback to individual origins,
+ * useful for curve/armatures.
+ */
+static void transform_around_single_fallback(TransInfo *t)
+{
+ if ((t->total == 1) &&
+ (ELEM3(t->around, V3D_CENTER, V3D_CENTROID, V3D_ACTIVE)) &&
+ (ELEM3(t->mode, TFM_RESIZE, TFM_ROTATION, TFM_TRACKBALL)))
+ {
+ t->around = V3D_LOCAL;
+ }
+}
/* when transforming islands */
struct TransIslandData {
@@ -274,6 +289,13 @@ static void createTransTexspace(TransInfo *t)
id = ob->data;
if (id == NULL || !ELEM3(GS(id->name), ID_ME, ID_CU, ID_MB)) {
+ BKE_report(t->reports, RPT_ERROR, "Unsupported object type for text-space transform");
+ t->total = 0;
+ return;
+ }
+
+ if (BKE_object_obdata_is_libdata(ob)) {
+ BKE_report(t->reports, RPT_ERROR, "Linked data can't text-space transform");
t->total = 0;
return;
}
@@ -989,8 +1011,7 @@ static void createTransPose(TransInfo *t, Object *ob)
if (arm->flag & ARM_RESTPOS) {
if (ELEM(t->mode, TFM_DUMMY, TFM_BONESIZE) == 0) {
- // XXX use transform operator reports
- // BKE_report(op->reports, RPT_ERROR, "Cannot select linked when sync selection is enabled");
+ BKE_report(t->reports, RPT_ERROR, "Cannot select linked when sync selection is enabled");
return;
}
}
@@ -1030,8 +1051,7 @@ static void createTransPose(TransInfo *t, Object *ob)
}
if (td != (t->data + t->total)) {
- // XXX use transform operator reports
- // BKE_report(op->reports, RPT_DEBUG, "Bone selection count error");
+ BKE_report(t->reports, RPT_DEBUG, "Bone selection count error");
}
/* initialize initial auto=ik chainlen's? */
@@ -1078,6 +1098,8 @@ static void createTransArmatureVerts(TransInfo *t)
if (!t->total) return;
+ transform_around_single_fallback(t);
+
copy_m3_m4(mtx, t->obedit->obmat);
pseudoinverse_m3_m3(smtx, mtx, PSEUDOINVERSE_EPSILON);
@@ -1402,6 +1424,8 @@ static void createTransCurveVerts(TransInfo *t)
else t->total = countsel;
t->data = MEM_callocN(t->total * sizeof(TransData), "TransObData(Curve EditMode)");
+ transform_around_single_fallback(t);
+
copy_m3_m4(mtx, t->obedit->obmat);
pseudoinverse_m3_m3(smtx, mtx, PSEUDOINVERSE_EPSILON);
@@ -1437,7 +1461,9 @@ static void createTransCurveVerts(TransInfo *t)
{
copy_v3_v3(td->iloc, bezt->vec[0]);
td->loc = bezt->vec[0];
- copy_v3_v3(td->center, bezt->vec[(hide_handles || bezt->f2 & SELECT) ? 1 : 0]);
+ copy_v3_v3(td->center, bezt->vec[(hide_handles ||
+ (t->around == V3D_LOCAL) ||
+ (bezt->f2 & SELECT)) ? 1 : 0]);
if (hide_handles) {
if (bezt->f2 & SELECT) td->flag = TD_SELECTED;
else td->flag = 0;
@@ -1505,7 +1531,9 @@ static void createTransCurveVerts(TransInfo *t)
{
copy_v3_v3(td->iloc, bezt->vec[2]);
td->loc = bezt->vec[2];
- copy_v3_v3(td->center, bezt->vec[(hide_handles || bezt->f2 & SELECT) ? 1 : 2]);
+ copy_v3_v3(td->center, bezt->vec[(hide_handles ||
+ (t->around == V3D_LOCAL) ||
+ (bezt->f2 & SELECT)) ? 1 : 2]);
if (hide_handles) {
if (bezt->f2 & SELECT) td->flag = TD_SELECTED;
else td->flag = 0;
@@ -1546,7 +1574,7 @@ static void createTransCurveVerts(TransInfo *t)
* but for now just don't change handle types */
if (ELEM(t->mode, TFM_CURVE_SHRINKFATTEN, TFM_TILT) == 0) {
/* sets the handles based on their selection, do this after the data is copied to the TransData */
- BKE_nurb_handles_test(nu);
+ BKE_nurb_handles_test(nu, !hide_handles);
}
}
else {
@@ -1848,15 +1876,13 @@ static void editmesh_set_connectivity_distance(BMesh *bm, float mtx[3][3], float
/* need to be very careful of feedback loops here, store previous dist's to avoid feedback */
float *dists_prev = MEM_mallocN(bm->totvert * sizeof(float), __func__);
- BMVert **queue = MEM_mallocN(bm->totvert * sizeof(BMVert *), __func__);
- STACK_DECLARE(queue);
+ BLI_LINKSTACK_DECLARE(queue, BMVert *);
/* any BM_ELEM_TAG'd vertex is in 'queue_next', so we don't add in twice */
- BMVert **queue_next = MEM_mallocN(bm->totvert * sizeof(BMVert *), __func__);
- STACK_DECLARE(queue_next);
+ BLI_LINKSTACK_DECLARE(queue_next, BMVert *);
- STACK_INIT(queue);
- STACK_INIT(queue_next);
+ BLI_LINKSTACK_INIT(queue);
+ BLI_LINKSTACK_INIT(queue_next);
{
BMIter viter;
@@ -1871,7 +1897,7 @@ static void editmesh_set_connectivity_distance(BMesh *bm, float mtx[3][3], float
dists[i] = FLT_MAX;
}
else {
- STACK_PUSH(queue, v);
+ BLI_LINKSTACK_PUSH(queue, v);
dists[i] = 0.0f;
}
@@ -1880,11 +1906,11 @@ static void editmesh_set_connectivity_distance(BMesh *bm, float mtx[3][3], float
do {
BMVert *v;
- unsigned int i;
+ LinkNode *lnk;
memcpy(dists_prev, dists, sizeof(float) * bm->totvert);
- while ((v = STACK_POP(queue))) {
+ while ((v = BLI_LINKSTACK_POP(queue))) {
BMIter iter;
BMEdge *e;
BMLoop *l;
@@ -1896,7 +1922,7 @@ static void editmesh_set_connectivity_distance(BMesh *bm, float mtx[3][3], float
if (bmesh_test_dist_add(v, v_other, dists, dists_prev, mtx)) {
if (BM_elem_flag_test(v_other, BM_ELEM_TAG) == 0) {
BM_elem_flag_enable(v_other, BM_ELEM_TAG);
- STACK_PUSH(queue_next, v_other);
+ BLI_LINKSTACK_PUSH(queue_next, v_other);
}
}
}
@@ -1912,7 +1938,7 @@ static void editmesh_set_connectivity_distance(BMesh *bm, float mtx[3][3], float
if (bmesh_test_dist_add(v, v_other, dists, dists_prev, mtx)) {
if (BM_elem_flag_test(v_other, BM_ELEM_TAG) == 0) {
BM_elem_flag_enable(v_other, BM_ELEM_TAG);
- STACK_PUSH(queue_next, v_other);
+ BLI_LINKSTACK_PUSH(queue_next, v_other);
}
}
} while ((l = l->next) != l_end);
@@ -1921,22 +1947,20 @@ static void editmesh_set_connectivity_distance(BMesh *bm, float mtx[3][3], float
}
/* clear for the next loop */
- for (i = 0; i < STACK_SIZE(queue_next); i++) {
- BM_elem_flag_disable(queue_next[i], BM_ELEM_TAG);
+ for (lnk = queue_next; lnk; lnk = lnk->next) {
+ BM_elem_flag_disable((BMVert *)lnk->link, BM_ELEM_TAG);
}
- STACK_SWAP(queue, queue_next);
+ BLI_LINKSTACK_SWAP(queue, queue_next);
/* none should be tagged now since 'queue_next' is empty */
BLI_assert(BM_iter_mesh_count_flag(BM_VERTS_OF_MESH, bm, BM_ELEM_TAG, true) == 0);
- } while (STACK_SIZE(queue));
+ } while (BLI_LINKSTACK_SIZE(queue));
- STACK_FREE(queue);
- STACK_FREE(queue_next);
+ BLI_LINKSTACK_FREE(queue);
+ BLI_LINKSTACK_FREE(queue_next);
- MEM_freeN(queue);
- MEM_freeN(queue_next);
MEM_freeN(dists_prev);
}
@@ -1984,8 +2008,8 @@ static struct TransIslandData *editmesh_islands_info_calc(BMEditMesh *em, int *r
* its possible we have a selected vertex thats not in a face, for now best not crash in that case. */
fill_vn_i(vert_map, bm->totvert, -1);
- EDBM_index_arrays_ensure(em, htype);
- ele_array = (htype == BM_FACE) ? (void **)em->face_index : (void **)em->edge_index;
+ BM_mesh_elem_table_ensure(bm, htype);
+ ele_array = (htype == BM_FACE) ? (void **)bm->ftable : (void **)bm->etable;
BM_mesh_elem_index_ensure(bm, BM_VERT);
@@ -2074,9 +2098,7 @@ static void VertsToTransData(TransInfo *t, TransData *td, TransDataExtension *tx
}
else if (t->around == V3D_LOCAL) {
copy_v3_v3(td->center, td->loc);
-
- axis_dominant_v3_to_m3(td->axismtx, eve->no);
- invert_m3(td->axismtx);
+ createSpaceNormal(td->axismtx, eve->no);
}
else {
copy_v3_v3(td->center, td->loc);
@@ -2125,7 +2147,7 @@ static void createTransEditVerts(TransInfo *t)
BMVert *eve;
BMIter iter;
BMVert *eve_act = NULL;
- float *mappedcos = NULL, *quats = NULL;
+ float (*mappedcos)[3] = NULL, (*quats)[4] = NULL;
float mtx[3][3], smtx[3][3], (*defmats)[3][3] = NULL, (*defcos)[3] = NULL;
float *dists = NULL;
int a;
@@ -2214,30 +2236,34 @@ static void createTransEditVerts(TransInfo *t)
island_info = editmesh_islands_info_calc(em, &island_info_tot, &island_vert_map);
}
- /* BMESH_TODO, crazy-space writing into the index values is BAD!, means we cant
- * use the values for vertex mirror - campbell */
-
/* detect CrazySpace [tm] */
if (modifiers_getCageIndex(t->scene, t->obedit, NULL, 1) >= 0) {
- if (modifiers_isCorrectableDeformed(t->obedit)) {
- int totleft;
+ int totleft = -1;
+ if (modifiers_isCorrectableDeformed(t->scene, t->obedit)) {
/* check if we can use deform matrices for modifier from the
* start up to stack, they are more accurate than quats */
totleft = editbmesh_get_first_deform_matrices(t->scene, t->obedit, em, &defmats, &defcos);
+ }
- /* if we still have more modifiers, also do crazyspace
- * correction with quats, relative to the coordinates after
- * the modifiers that support deform matrices (defcos) */
- if (totleft > 0) {
- mappedcos = crazyspace_get_mapped_editverts(t->scene, t->obedit);
- quats = MEM_mallocN((t->total) * sizeof(float) * 4, "crazy quats");
- crazyspace_set_quats_editmesh(em, (float *)defcos, mappedcos, quats); /* BMESH_TODO, abuses vertex index, should use an int array */
- if (mappedcos)
- MEM_freeN(mappedcos);
- }
+ /* if we still have more modifiers, also do crazyspace
+ * correction with quats, relative to the coordinates after
+ * the modifiers that support deform matrices (defcos) */
+
+#if 0 /* TODO, fix crazyspace+extrude so it can be enabled for general use - campbell */
+ if ((totleft > 0) || (totleft == -1))
+#else
+ if (totleft > 0)
+#endif
+ {
+ mappedcos = crazyspace_get_mapped_editverts(t->scene, t->obedit);
+ quats = MEM_mallocN(em->bm->totvert * sizeof(*quats), "crazy quats");
+ crazyspace_set_quats_editmesh(em, defcos, mappedcos, quats);
+ if (mappedcos)
+ MEM_freeN(mappedcos);
+ }
- if (defcos)
- MEM_freeN(defcos);
+ if (defcos) {
+ MEM_freeN(defcos);
}
}
@@ -2283,12 +2309,12 @@ static void createTransEditVerts(TransInfo *t)
}
/* CrazySpace */
- if (defmats || (quats && BM_elem_index_get(eve) != -1)) {
+ if (defmats || (quats && BM_elem_flag_test(eve, BM_ELEM_TAG))) {
float mat[3][3], qmat[3][3], imat[3][3];
/* use both or either quat and defmat correction */
- if (quats && BM_elem_index_get(eve) != -1) {
- quat_to_mat3(qmat, quats + 4 * BM_elem_index_get(eve));
+ if (quats && BM_elem_flag_test(eve, BM_ELEM_TAG)) {
+ quat_to_mat3(qmat, quats[BM_elem_index_get(eve)]);
if (defmats)
mul_serie_m3(mat, mtx, qmat, defmats[a],
@@ -2550,10 +2576,10 @@ static void createTransUVs(bContext *C, TransInfo *t)
if (propconnected) {
/* create element map with island information */
if (ts->uv_flag & UV_SYNC_SELECTION) {
- elementmap = EDBM_uv_element_map_create(em, false, true);
+ elementmap = BM_uv_element_map_create(em->bm, false, true);
}
else {
- elementmap = EDBM_uv_element_map_create(em, true, true);
+ elementmap = BM_uv_element_map_create(em->bm, true, true);
}
island_enabled = MEM_callocN(sizeof(*island_enabled) * elementmap->totalIslands, "TransIslandData(UV Editing)");
}
@@ -2572,7 +2598,7 @@ static void createTransUVs(bContext *C, TransInfo *t)
countsel++;
if (propconnected) {
- UvElement *element = ED_uv_element_get(elementmap, efa, l);
+ UvElement *element = BM_uv_element_get(elementmap, efa, l);
island_enabled[element->island] = TRUE;
}
@@ -2608,7 +2634,7 @@ static void createTransUVs(bContext *C, TransInfo *t)
continue;
if (propconnected) {
- UvElement *element = ED_uv_element_get(elementmap, efa, l);
+ UvElement *element = BM_uv_element_get(elementmap, efa, l);
if (!island_enabled[element->island]) {
count_rejected++;
continue;
@@ -2622,7 +2648,7 @@ static void createTransUVs(bContext *C, TransInfo *t)
if (propconnected) {
t->total -= count_rejected;
- EDBM_uv_element_map_free(elementmap);
+ BM_uv_element_map_free(elementmap);
MEM_freeN(island_enabled);
}
@@ -3866,7 +3892,7 @@ static void createTransGraphEditData(bContext *C, TransInfo *t)
}
/* if handles were not selected, store their selection status */
- if (!(sel1) && !(sel3)) {
+ if (!(sel1) || !(sel3)) {
if (hdata == NULL)
hdata = initTransDataCurveHandles(td, bezt);
}
@@ -4563,7 +4589,7 @@ static void freeSeqData(TransInfo *t)
BKE_sequencer_sort(t->scene);
}
else {
- /* Cancelled, need to update the strips display */
+ /* Canceled, need to update the strips display */
for (a = 0; a < t->total; a++, td++) {
seq = ((TransDataSeq *)td->extra)->seq;
if ((seq != seq_prev) && (seq->depth == 0)) {
@@ -5248,6 +5274,48 @@ void autokeyframe_pose_cb_func(bContext *C, Scene *scene, View3D *v3d, Object *o
}
}
+static void special_aftertrans_update__movieclip(bContext *C, TransInfo *t)
+{
+ SpaceClip *sc = t->sa->spacedata.first;
+ MovieClip *clip = ED_space_clip_get_clip(sc);
+ MovieTrackingPlaneTrack *plane_track;
+ ListBase *plane_tracks_base = BKE_tracking_get_active_plane_tracks(&clip->tracking);
+ int framenr = ED_space_clip_get_clip_frame_number(sc);
+
+ for (plane_track = plane_tracks_base->first;
+ plane_track;
+ plane_track = plane_track->next)
+ {
+ bool do_update = false;
+
+ do_update |= (plane_track->flag & SELECT) != 0;
+ if (do_update == false) {
+ if ((plane_track->flag & PLANE_TRACK_AUTOKEY) == 0) {
+ int i;
+ for (i = 0; i < plane_track->point_tracksnr; i++) {
+ MovieTrackingTrack *track = plane_track->point_tracks[i];
+
+ if (TRACK_VIEW_SELECTED(sc, track)) {
+ do_update = true;
+ break;
+ }
+ }
+ }
+ }
+
+ if (do_update) {
+ BKE_tracking_track_plane_from_existing_motion(plane_track, framenr);
+ }
+ }
+
+ if (t->scene->nodetree) {
+ /* tracks can be used for stabilization nodes,
+ * flush update for such nodes */
+ nodeUpdateID(t->scene->nodetree, &clip->id);
+ WM_event_add_notifier(C, NC_SCENE | ND_NODES, NULL);
+ }
+}
+
static void special_aftertrans_update__mask(bContext *C, TransInfo *t)
{
Mask *mask = NULL;
@@ -5281,6 +5349,25 @@ static void special_aftertrans_update__mask(bContext *C, TransInfo *t)
}
}
+static void special_aftertrans_update__node(bContext *UNUSED(C), TransInfo *t)
+{
+ int canceled = (t->state == TRANS_CANCEL);
+
+ if (canceled && t->remove_on_cancel) {
+ /* remove selected nodes on cancel */
+ SpaceNode *snode = (SpaceNode *)t->sa->spacedata.first;
+ bNodeTree *ntree = snode->edittree;
+ if (ntree) {
+ bNode *node, *node_next;
+ for (node = ntree->nodes.first; node; node = node_next) {
+ node_next = node->next;
+ if (node->flag & NODE_SELECT)
+ nodeFreeNode(ntree, node);
+ }
+ }
+ }
+}
+
static void special_aftertrans_update__mesh(bContext *UNUSED(C), TransInfo *t)
{
/* so automerge supports mirror */
@@ -5392,6 +5479,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
}
else if (t->spacetype == SPACE_NODE) {
SpaceNode *snode = (SpaceNode *)t->sa->spacedata.first;
+ special_aftertrans_update__node(C, t);
if (canceled == 0) {
ED_node_post_apply_transform(C, snode->edittree);
@@ -5403,15 +5491,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
}
else if (t->spacetype == SPACE_CLIP) {
if (t->options & CTX_MOVIECLIP) {
- SpaceClip *sc = t->sa->spacedata.first;
- MovieClip *clip = ED_space_clip_get_clip(sc);
-
- if (t->scene->nodetree) {
- /* tracks can be used for stabilization nodes,
- * flush update for such nodes */
- nodeUpdateID(t->scene->nodetree, &clip->id);
- WM_event_add_notifier(C, NC_SCENE | ND_NODES, NULL);
- }
+ special_aftertrans_update__movieclip(C, t);
}
else if (t->options & CTX_MASK) {
special_aftertrans_update__mask(C, t);
@@ -6520,29 +6600,40 @@ typedef struct TransDataMasking {
float handle[2], orig_handle[2];
float vec[3][3];
MaskSplinePoint *point;
+ float parent_matrix[3][3];
+ float parent_inverse_matrix[3][3];
} TransDataMasking;
-static void MaskPointToTransData(MaskSplinePoint *point,
+static void MaskPointToTransData(Scene *scene, MaskSplinePoint *point,
TransData *td, TransData2D *td2d, TransDataMasking *tdm,
const int propmode, const float asp[2])
{
BezTriple *bezt = &point->bezt;
short is_sel_point = MASKPOINT_ISSEL_KNOT(point);
short is_sel_any = MASKPOINT_ISSEL_ANY(point);
+ float parent_matrix[3][3], parent_inverse_matrix[3][3];
tdm->point = point;
copy_m3_m3(tdm->vec, bezt->vec);
+ BKE_mask_point_parent_matrix_get(point, CFRA, parent_matrix);
+ invert_m3_m3(parent_inverse_matrix, parent_matrix);
+
if (propmode || is_sel_point) {
int i;
for (i = 0; i < 3; i++) {
+ copy_m3_m3(tdm->parent_matrix, parent_matrix);
+ copy_m3_m3(tdm->parent_inverse_matrix, parent_inverse_matrix);
+
/* CV coords are scaled by aspects. this is needed for rotations and
* proportional editing to be consistent with the stretched CV coords
* that are displayed. this also means that for display and numinput,
* and when the the CV coords are flushed, these are converted each time */
- td2d->loc[0] = bezt->vec[i][0] * asp[0];
- td2d->loc[1] = bezt->vec[i][1] * asp[1];
+ mul_v2_m3v2(td2d->loc, parent_matrix, bezt->vec[i]);
+ td2d->loc[0] *= asp[0];
+ td2d->loc[1] *= asp[1];
td2d->loc[2] = 0.0f;
+
td2d->loc2d = bezt->vec[i];
td->flag = 0;
@@ -6574,18 +6665,23 @@ static void MaskPointToTransData(MaskSplinePoint *point,
td++;
td2d++;
+ tdm++;
}
}
else {
tdm->is_handle = TRUE;
+ copy_m3_m3(tdm->parent_matrix, parent_matrix);
+ copy_m3_m3(tdm->parent_inverse_matrix, parent_inverse_matrix);
BKE_mask_point_handle(point, tdm->handle);
copy_v2_v2(tdm->orig_handle, tdm->handle);
- td2d->loc[0] = tdm->handle[0] * asp[0];
- td2d->loc[1] = tdm->handle[1] * asp[1];
+ mul_v2_m3v2(td2d->loc, parent_matrix, tdm->handle);
+ td2d->loc[0] *= asp[0];
+ td2d->loc[1] *= asp[1];
td2d->loc[2] = 0.0f;
+
td2d->loc2d = tdm->handle;
td->flag = 0;
@@ -6615,6 +6711,7 @@ static void MaskPointToTransData(MaskSplinePoint *point,
static void createTransMaskingData(bContext *C, TransInfo *t)
{
+ Scene *scene = CTX_data_scene(C);
Mask *mask = CTX_data_edit_mask(C);
MaskLayer *masklay;
TransData *td = NULL;
@@ -6687,7 +6784,7 @@ static void createTransMaskingData(bContext *C, TransInfo *t)
MaskSplinePoint *point = &spline->points[i];
if (propmode || MASKPOINT_ISSEL_ANY(point)) {
- MaskPointToTransData(point, td, td2d, tdm, propmode, asp);
+ MaskPointToTransData(scene, point, td, td2d, tdm, propmode, asp);
if (propmode || MASKPOINT_ISSEL_KNOT(point)) {
td += 3;
@@ -6720,6 +6817,7 @@ void flushTransMasking(TransInfo *t)
for (a = 0, td = t->data2d, tdm = t->customData; a < t->total; a++, td++, tdm++) {
td->loc2d[0] = td->loc[0] * inv[0];
td->loc2d[1] = td->loc[1] * inv[1];
+ mul_m3_v2(tdm->parent_inverse_matrix, td->loc2d);
if (tdm->is_handle)
BKE_mask_point_set_handle(tdm->point, td->loc2d, t->flag & T_ALT_TRANSFORM, tdm->orig_handle, tdm->vec);
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 4c7ac4193b3..33eca0d6b89 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -659,9 +659,7 @@ static void recalcData_spaceclip(TransInfo *t)
if (ED_space_clip_check_show_trackedit(sc)) {
MovieClip *clip = ED_space_clip_get_clip(sc);
ListBase *tracksbase = BKE_tracking_get_active_tracks(&clip->tracking);
- ListBase *plane_tracks_base = BKE_tracking_get_active_plane_tracks(&clip->tracking);
MovieTrackingTrack *track;
- MovieTrackingPlaneTrack *plane_track;
int framenr = ED_space_clip_get_clip_frame_number(sc);
flushTransTracking(t);
@@ -692,15 +690,6 @@ static void recalcData_spaceclip(TransInfo *t)
track = track->next;
}
- for (plane_track = plane_tracks_base->first;
- plane_track;
- plane_track = plane_track->next)
- {
- if (plane_track->flag & SELECT) {
- BKE_tracking_track_plane_from_existing_motion(plane_track, framenr);
- }
- }
-
DAG_id_tag_update(&clip->id, 0);
}
else if (t->options & CTX_MASK) {
@@ -1063,6 +1052,7 @@ int initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *even
t->ar = ar;
t->obedit = obedit;
t->settings = ts;
+ t->reports = op ? op->reports : NULL;
if (obedit) {
copy_m3_m4(t->obedit_mat, obedit->obmat);
@@ -1076,7 +1066,7 @@ int initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *even
t->flag = 0;
- t->redraw = 1; /* redraw first time */
+ t->redraw = TREDRAW_HARD; /* redraw first time */
if (event) {
copy_v2_v2_int(t->imval, event->mval);
@@ -1115,6 +1105,13 @@ int initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *even
t->options |= CTX_EDGE;
}
+ t->remove_on_cancel = false;
+
+ if (op && (prop = RNA_struct_find_property(op->ptr, "remove_on_cancel")) && RNA_property_is_set(op->ptr, prop)) {
+ if (RNA_property_boolean_get(op->ptr, prop)) {
+ t->remove_on_cancel = true;
+ }
+ }
/* Assign the space type, some exceptions for running in different mode */
if (sa == NULL) {
@@ -1148,6 +1145,11 @@ int initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *even
if (v3d->flag & V3D_ALIGN) t->flag |= T_V3D_ALIGN;
t->around = v3d->around;
+ /* warp always uses the cursor */
+ if (t->mode == TFM_WARP) {
+ t->around = V3D_CURSOR;
+ }
+
if (op && ((prop = RNA_struct_find_property(op->ptr, "constraint_orientation")) &&
RNA_property_is_set(op->ptr, prop)))
{
@@ -1487,10 +1489,10 @@ void calculateCenter2D(TransInfo *t)
copy_v3_v3(vec, t->center);
mul_m4_v3(ob->obmat, vec);
- projectIntView(t, vec, t->center2d);
+ projectFloatView(t, vec, t->center2d);
}
else {
- projectIntView(t, t->center, t->center2d);
+ projectFloatView(t, t->center, t->center2d);
}
}
@@ -1498,7 +1500,7 @@ void calculateCenterCursor(TransInfo *t)
{
const float *cursor;
- cursor = give_cursor(t->scene, t->view);
+ cursor = ED_view3d_cursor3d_get(t->scene, t->view);
copy_v3_v3(t->center, cursor);
/* If edit or pose mode, move cursor in local space */
@@ -1522,7 +1524,6 @@ void calculateCenterCursor2D(TransInfo *t)
if (t->spacetype == SPACE_IMAGE) {
SpaceImage *sima = (SpaceImage *)t->sa->spacedata.first;
- /* only space supported right now but may change */
if (t->options & CTX_MASK) {
ED_space_image_get_aspect(sima, &aspx, &aspy);
}
@@ -1531,17 +1532,37 @@ void calculateCenterCursor2D(TransInfo *t)
}
cursor = sima->cursor;
}
+ else if (t->spacetype == SPACE_CLIP) {
+ SpaceClip *space_clip = (SpaceClip *) t->sa->spacedata.first;
+ if (t->options & CTX_MOVIECLIP) {
+ ED_space_clip_get_aspect_dimension_aware(space_clip, &aspx, &aspy);
+ }
+ else {
+ ED_space_clip_get_aspect(space_clip, &aspx, &aspy);
+ }
+ cursor = space_clip->cursor;
+ }
if (cursor) {
if (t->options & CTX_MASK) {
float co[2];
float frame_size[2];
- SpaceImage *sima = (SpaceImage *)t->sa->spacedata.first;
- ED_space_image_get_size_fl(sima, frame_size);
-
- BKE_mask_coord_from_frame(co, cursor, frame_size);
- ED_space_image_get_aspect(sima, &aspx, &aspy);
+ if (t->spacetype == SPACE_IMAGE) {
+ SpaceImage *sima = (SpaceImage *)t->sa->spacedata.first;
+ ED_space_image_get_size_fl(sima, frame_size);
+ BKE_mask_coord_from_frame(co, cursor, frame_size);
+ ED_space_image_get_aspect(sima, &aspx, &aspy);
+ }
+ else if (t->spacetype == SPACE_CLIP) {
+ SpaceClip *space_clip = (SpaceClip *) t->sa->spacedata.first;
+ ED_space_clip_get_size_fl(space_clip, frame_size);
+ BKE_mask_coord_from_frame(co, cursor, frame_size);
+ ED_space_clip_get_aspect(space_clip, &aspx, &aspy);
+ }
+ else {
+ BLI_assert(!"Shall not happen");
+ }
t->center[0] = co[0] * aspx;
t->center[1] = co[1] * aspy;
@@ -1620,7 +1641,7 @@ void calculateCenter(TransInfo *t)
calculateCenterMedian(t);
break;
case V3D_CURSOR:
- if (t->spacetype == SPACE_IMAGE)
+ if (ELEM(t->spacetype, SPACE_IMAGE, SPACE_CLIP))
calculateCenterCursor2D(t);
else if (t->spacetype == SPACE_IPO)
calculateCenterCursorGraph2D(t);
@@ -1675,7 +1696,7 @@ void calculateCenter(TransInfo *t)
Object *ob = OBACT;
if (ob) {
copy_v3_v3(t->center, ob->obmat[3]);
- projectIntView(t, t->center, t->center2d);
+ projectFloatView(t, t->center, t->center2d);
}
}
break;
@@ -1707,7 +1728,7 @@ void calculateCenter(TransInfo *t)
axis[1] = t->center[1] - 6.0f * axis[1];
axis[2] = t->center[2] - 6.0f * axis[2];
- projectIntView(t, axis, t->center2d);
+ projectFloatView(t, axis, t->center2d);
/* rotate only needs correct 2d center, grab needs ED_view3d_calc_zfac() value */
if (t->mode == TFM_TRANSLATION) {
diff --git a/source/blender/editors/transform/transform_input.c b/source/blender/editors/transform/transform_input.c
index c035b6173c8..39c7b4b5c1c 100644
--- a/source/blender/editors/transform/transform_input.c
+++ b/source/blender/editors/transform/transform_input.c
@@ -279,7 +279,17 @@ static void InputAngle(TransInfo *UNUSED(t), MouseInput *mi, const int mval[2],
output[0] = *angle;
}
-void initMouseInput(TransInfo *UNUSED(t), MouseInput *mi, const int center[2], const int mval[2])
+static void InputAngleSpring(TransInfo *t, MouseInput *mi, const int mval[2], float output[3])
+{
+ float toutput[3];
+
+ InputAngle(t, mi, mval, output);
+ InputSpring(t, mi, mval, toutput);
+
+ output[1] = toutput[0];
+}
+
+void initMouseInput(TransInfo *UNUSED(t), MouseInput *mi, const float center[2], const int mval[2])
{
mi->factor = 0;
mi->precision = 0;
@@ -328,6 +338,12 @@ void initMouseInputMode(TransInfo *t, MouseInput *mi, MouseInputMode mode)
mi->apply = InputAngle;
t->helpline = HLP_ANGLE;
break;
+ case INPUT_ANGLE_SPRING:
+ calcSpringFactor(mi);
+ mi->data = MEM_callocN(sizeof(double), "angle accumulator");
+ mi->apply = InputAngleSpring;
+ t->helpline = HLP_ANGLE;
+ break;
case INPUT_TRACKBALL:
/* factor has to become setting or so */
mi->factor = 0.01f;
@@ -391,9 +407,9 @@ void applyMouseInput(TransInfo *t, MouseInput *mi, const int mval[2], float outp
}
}
-int handleMouseInput(TransInfo *t, MouseInput *mi, const wmEvent *event)
+eRedrawFlag handleMouseInput(TransInfo *t, MouseInput *mi, const wmEvent *event)
{
- int redraw = TREDRAW_NOTHING;
+ eRedrawFlag redraw = TREDRAW_NOTHING;
switch (event->type) {
case LEFTSHIFTKEY:
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c
index 6fecf0d6642..132a46441e6 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -428,12 +428,12 @@ int calc_manipulator_stats(const bContext *C)
totsel++;
}
else {
- if (bezt->f1) {
- calc_tw_center(scene, bezt->vec[0]);
+ if (bezt->f1 & SELECT) {
+ calc_tw_center(scene, bezt->vec[(v3d->around == V3D_LOCAL) ? 1 : 0]);
totsel++;
}
- if (bezt->f3) {
- calc_tw_center(scene, bezt->vec[2]);
+ if (bezt->f3 & SELECT) {
+ calc_tw_center(scene, bezt->vec[(v3d->around == V3D_LOCAL) ? 1 : 2]);
totsel++;
}
}
@@ -1635,7 +1635,7 @@ void BIF_draw_manipulator(const bContext *C)
copy_v3_v3(rv3d->twmat[3], scene->twcent);
break;
case V3D_CURSOR:
- copy_v3_v3(rv3d->twmat[3], give_cursor(scene, v3d));
+ copy_v3_v3(rv3d->twmat[3], ED_view3d_cursor3d_get(scene, v3d));
break;
}
@@ -1858,11 +1858,12 @@ int BIF_do_manipulator(bContext *C, const struct wmEvent *event, wmOperator *op)
* See [#34621], it's a miracle it did not cause more problems!!! */
/* However, we need to copy the "release_confirm" property... */
PointerRNA props_ptr;
- WM_operator_properties_create(&props_ptr, "TRANSFORM_OT_trackball");
+ wmOperatorType *ot = WM_operatortype_find("TRANSFORM_OT_trackball", true);
+ WM_operator_properties_create_ptr(&props_ptr, ot);
RNA_boolean_set(&props_ptr, "release_confirm", RNA_boolean_get(op->ptr, "release_confirm"));
-
- WM_operator_name_call(C, "TRANSFORM_OT_trackball", WM_OP_INVOKE_DEFAULT, &props_ptr);
- //wm_operator_invoke(C, WM_operatortype_find("TRANSFORM_OT_trackball", 0), event, NULL, NULL, FALSE);
+ WM_operator_name_call(C, ot->idname, WM_OP_INVOKE_DEFAULT, &props_ptr);
+ //wm_operator_invoke(C, WM_operatortype_find(ot->idname, 0), event, NULL, NULL, FALSE);
+ WM_operator_properties_free(&props_ptr);
}
else if (drawflags & MAN_ROT_C) {
switch (drawflags) {
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c
index eb204be3220..2904b37c2e5 100644
--- a/source/blender/editors/transform/transform_ops.c
+++ b/source/blender/editors/transform/transform_ops.c
@@ -60,7 +60,7 @@ typedef struct TransformModeItem {
void (*opfunc)(wmOperatorType *);
} TransformModeItem;
-static float VecOne[3] = {1, 1, 1};
+static const float VecOne[3] = {1, 1, 1};
static char OP_TRANSLATION[] = "TRANSFORM_OT_translate";
static char OP_ROTATION[] = "TRANSFORM_OT_rotate";
@@ -537,6 +537,8 @@ void Transform_Properties(struct wmOperatorType *ot, int flags)
if (flags & P_OPTIONS) {
RNA_def_boolean(ot->srna, "texture_space", 0, "Edit Texture Space", "Edit Object data texture space");
+ prop = RNA_def_boolean(ot->srna, "remove_on_cancel", 0, "Remove on Cancel", "Remove elements on cancel");
+ RNA_def_property_flag(prop, PROP_HIDDEN);
}
if (flags & P_CORRECT_UV) {
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index 55d80d63234..cd6a2e6712e 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -728,31 +728,46 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
}
}
else {
+ const bool use_handle = (cu->drawflag & CU_HIDE_HANDLES) == 0;
+
for (nu = nurbs->first; nu; nu = nu->next) {
/* only bezier has a normal */
if (nu->type == CU_BEZIER) {
bezt = nu->bezt;
a = nu->pntsu;
while (a--) {
+ short flag = 0;
+
+#define SEL_F1 (1 << 0)
+#define SEL_F2 (1 << 1)
+#define SEL_F3 (1 << 2)
+
+ if (use_handle) {
+ if (bezt->f1 & SELECT) flag |= SEL_F1;
+ if (bezt->f2 & SELECT) flag |= SEL_F2;
+ if (bezt->f3 & SELECT) flag |= SEL_F3;
+ }
+ else {
+ flag = (bezt->f2 & SELECT) ? (SEL_F1 | SEL_F2 | SEL_F3) : 0;
+ }
+
/* exception */
- if ((bezt->f1 | bezt->f2 | bezt->f3) & SELECT) {
+ if (flag) {
float tvec[3];
- if ((bezt->f1 & SELECT) + (bezt->f2 & SELECT) + (bezt->f3 & SELECT) > SELECT) {
+ if ((v3d->around == V3D_LOCAL) ||
+ ELEM3(flag, SEL_F2, SEL_F1 | SEL_F3, SEL_F1 | SEL_F2 | SEL_F3))
+ {
BKE_nurb_bezt_calc_normal(nu, bezt, tvec);
add_v3_v3(normal, tvec);
}
else {
- if (bezt->f1 & SELECT) {
+ /* ignore bezt->f2 in this case */
+ if (flag & SEL_F1) {
sub_v3_v3v3(tvec, bezt->vec[0], bezt->vec[1]);
normalize_v3(tvec);
add_v3_v3(normal, tvec);
}
- if (bezt->f2 & SELECT) {
- sub_v3_v3v3(tvec, bezt->vec[0], bezt->vec[2]);
- normalize_v3(tvec);
- add_v3_v3(normal, tvec);
- }
- if (bezt->f3 & SELECT) {
+ if (flag & SEL_F3) {
sub_v3_v3v3(tvec, bezt->vec[1], bezt->vec[2]);
normalize_v3(tvec);
add_v3_v3(normal, tvec);
@@ -762,6 +777,11 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
BKE_nurb_bezt_calc_plane(nu, bezt, tvec);
add_v3_v3(plane, tvec);
}
+
+#undef SEL_F1
+#undef SEL_F2
+#undef SEL_F3
+
bezt++;
}
}
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c
index 909ca68cc20..48b92dfac7c 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -59,6 +59,7 @@
#include "BKE_context.h"
#include "BKE_editmesh.h"
#include "BKE_mesh.h"
+#include "BKE_tracking.h"
#include "RNA_access.h"
@@ -133,7 +134,8 @@ bool validSnap(TransInfo *t)
bool activeSnap(TransInfo *t)
{
- return (t->modifiers & (MOD_SNAP | MOD_SNAP_INVERT)) == MOD_SNAP || (t->modifiers & (MOD_SNAP | MOD_SNAP_INVERT)) == MOD_SNAP_INVERT;
+ return ((t->modifiers & (MOD_SNAP | MOD_SNAP_INVERT)) == MOD_SNAP) ||
+ ((t->modifiers & (MOD_SNAP | MOD_SNAP_INVERT)) == MOD_SNAP_INVERT);
}
void drawSnapping(const struct bContext *C, TransInfo *t)
@@ -265,16 +267,16 @@ void drawSnapping(const struct bContext *C, TransInfo *t)
}
}
-bool handleSnapping(TransInfo *t, const wmEvent *event)
+eRedrawFlag handleSnapping(TransInfo *t, const wmEvent *event)
{
- bool status = false;
+ eRedrawFlag status = TREDRAW_NOTHING;
#if 0 // XXX need a proper selector for all snap mode
if (BIF_snappingSupported(t->obedit) && event->type == TABKEY && event->shift) {
/* toggle snap and reinit */
t->settings->snap_flag ^= SCE_SNAP;
initSnapping(t, NULL);
- status = 1;
+ status = TREDRAW_HARD;
}
#endif
if (event->type == MOUSEMOVE) {
@@ -604,9 +606,10 @@ void addSnapPoint(TransInfo *t)
}
}
-bool updateSelectedSnapPoint(TransInfo *t)
+eRedrawFlag updateSelectedSnapPoint(TransInfo *t)
{
- bool status = false;
+ eRedrawFlag status = TREDRAW_NOTHING;
+
if (t->tsnap.status & MULTI_POINTS) {
TransSnapPoint *p, *closest_p = NULL;
float closest_dist = TRANSFORM_SNAP_MAX_PX;
@@ -629,7 +632,10 @@ bool updateSelectedSnapPoint(TransInfo *t)
}
if (closest_p) {
- status = (t->tsnap.selectedPoint != closest_p);
+ if (t->tsnap.selectedPoint != closest_p) {
+ status = TREDRAW_HARD;
+ }
+
t->tsnap.selectedPoint = closest_p;
}
}
@@ -1147,7 +1153,7 @@ static void TargetSnapClosest(TransInfo *t)
}
}
-static bool snapEdge(ARegion *ar, float v1co[3], short v1no[3], float v2co[3], short v2no[3], float obmat[4][4], float timat[3][3],
+static bool snapEdge(ARegion *ar, const float v1co[3], const short v1no[3], const float v2co[3], const short v2no[3], float obmat[4][4], float timat[3][3],
const float ray_start[3], const float ray_start_local[3], const float ray_normal_local[3], const float mval_fl[2],
float r_loc[3], float r_no[3], float *r_dist_px, float *r_depth)
{
@@ -1234,7 +1240,7 @@ static bool snapEdge(ARegion *ar, float v1co[3], short v1no[3], float v2co[3], s
return retval;
}
-static bool snapVertex(ARegion *ar, float vco[3], short vno[3], float obmat[4][4], float timat[3][3],
+static bool snapVertex(ARegion *ar, const float vco[3], const short vno[3], float obmat[4][4], float timat[3][3],
const float ray_start[3], const float ray_start_local[3], const float ray_normal_local[3], const float mval_fl[2],
float r_loc[3], float r_no[3], float *r_dist_px, float *r_depth)
{
@@ -1423,7 +1429,7 @@ static bool snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMes
if (em != NULL) {
index_array = dm->getVertDataArray(dm, CD_ORIGINDEX);
- EDBM_index_arrays_ensure(em, BM_VERT);
+ BM_mesh_elem_table_ensure(em->bm, BM_VERT);
}
for (i = 0; i < totvert; i++) {
@@ -1444,7 +1450,7 @@ static bool snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMes
test = 0;
}
else {
- eve = EDBM_vert_at_index(em, index);
+ eve = BM_vert_at_index(em->bm, index);
if ((BM_elem_flag_test(eve, BM_ELEM_HIDDEN) ||
BM_elem_flag_test(eve, BM_ELEM_SELECT)))
@@ -1473,7 +1479,7 @@ static bool snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMes
if (em != NULL) {
index_array = dm->getEdgeDataArray(dm, CD_ORIGINDEX);
- EDBM_index_arrays_ensure(em, BM_EDGE);
+ BM_mesh_elem_table_ensure(em->bm, BM_EDGE);
}
for (i = 0; i < totedge; i++) {
@@ -1493,7 +1499,7 @@ static bool snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMes
test = 0;
}
else {
- BMEdge *eed = EDBM_edge_at_index(em, index);
+ BMEdge *eed = BM_edge_at_index(em->bm, index);
if ((BM_elem_flag_test(eed, BM_ELEM_HIDDEN) ||
BM_elem_flag_test(eed->v1, BM_ELEM_SELECT) ||
@@ -1518,6 +1524,129 @@ static bool snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMes
return retval;
}
+/* may extend later (for now just snaps to empty center) */
+static bool snapEmpty(short snap_mode, ARegion *ar, Object *ob, float obmat[4][4],
+ const float ray_start[3], const float ray_normal[3], const float mval[2],
+ float r_loc[3], float *UNUSED(r_no), float *r_dist_px, float *r_depth)
+{
+ float imat[4][4];
+ float ray_start_local[3], ray_normal_local[3];
+ bool retval = false;
+
+ if (ob->transflag & OB_DUPLI) {
+ return retval;
+ }
+ /* for now only vertex supported */
+ if (snap_mode != SCE_SNAP_MODE_VERTEX) {
+ return retval;
+ }
+
+ invert_m4_m4(imat, obmat);
+
+ copy_v3_v3(ray_start_local, ray_start);
+ copy_v3_v3(ray_normal_local, ray_normal);
+
+ mul_m4_v3(imat, ray_start_local);
+ mul_mat3_m4_v3(imat, ray_normal_local);
+
+ switch (snap_mode) {
+ case SCE_SNAP_MODE_VERTEX:
+ {
+ const float zero_co[3] = {0.0f};
+ retval |= snapVertex(ar, zero_co, NULL, obmat, NULL, ray_start, ray_start_local, ray_normal_local, mval, r_loc, NULL, r_dist_px, r_depth);
+ break;
+ }
+ default:
+ break;
+ }
+
+ return retval;
+}
+
+static bool snapCamera(short snap_mode, ARegion *ar, Scene *scene, Object *object, float obmat[4][4],
+ const float ray_start[3], const float ray_normal[3], const float mval[2],
+ float r_loc[3], float *UNUSED(r_no), float *r_dist_px, float *r_depth)
+{
+ float orig_camera_mat[4][4], orig_camera_imat[4][4], imat[4][4];
+ bool retval = false;
+ MovieClip *clip = BKE_object_movieclip_get(scene, object, false);
+ MovieTracking *tracking;
+ float ray_start_local[3], ray_normal_local[3];
+
+ if (clip == NULL) {
+ return retval;
+ }
+ if (object->transflag & OB_DUPLI) {
+ return retval;
+ }
+
+ tracking = &clip->tracking;
+
+ BKE_tracking_get_camera_object_matrix(scene, object, orig_camera_mat);
+
+ invert_m4_m4(orig_camera_imat, orig_camera_mat);
+ invert_m4_m4(imat, obmat);
+
+ switch (snap_mode) {
+ case SCE_SNAP_MODE_VERTEX:
+ {
+ MovieTrackingObject *tracking_object;
+
+ for (tracking_object = tracking->objects.first;
+ tracking_object;
+ tracking_object = tracking_object->next)
+ {
+ ListBase *tracksbase = BKE_tracking_object_get_tracks(tracking, tracking_object);
+ MovieTrackingTrack *track;
+ float reconstructed_camera_mat[4][4],
+ reconstructed_camera_imat[4][4];
+ float (*vertex_obmat)[4];
+
+ copy_v3_v3(ray_start_local, ray_start);
+ copy_v3_v3(ray_normal_local, ray_normal);
+
+ if ((tracking_object->flag & TRACKING_OBJECT_CAMERA) == 0) {
+ BKE_tracking_camera_get_reconstructed_interpolate(tracking, tracking_object,
+ CFRA, reconstructed_camera_mat);
+
+ invert_m4_m4(reconstructed_camera_imat, reconstructed_camera_mat);
+ }
+
+ for (track = tracksbase->first; track; track = track->next) {
+ float bundle_pos[3];
+
+ if ((track->flag & TRACK_HAS_BUNDLE) == 0) {
+ continue;
+ }
+
+ copy_v3_v3(bundle_pos, track->bundle_pos);
+ if (tracking_object->flag & TRACKING_OBJECT_CAMERA) {
+ mul_m4_v3(orig_camera_imat, ray_start_local);
+ mul_mat3_m4_v3(orig_camera_imat, ray_normal_local);
+ vertex_obmat = orig_camera_mat;
+ }
+ else {
+ mul_m4_v3(reconstructed_camera_imat, bundle_pos);
+ mul_m4_v3(imat, ray_start_local);
+ mul_mat3_m4_v3(imat, ray_normal_local);
+ vertex_obmat = obmat;
+ }
+
+ retval |= snapVertex(ar, bundle_pos, NULL, vertex_obmat, NULL,
+ ray_start, ray_start_local, ray_normal_local, mval,
+ r_loc, NULL, r_dist_px, r_depth);
+ }
+ }
+
+ break;
+ }
+ default:
+ break;
+ }
+
+ return retval;
+}
+
static bool snapObject(Scene *scene, short snap_mode, ARegion *ar, Object *ob, float obmat[4][4], bool use_obedit,
Object **r_ob, float r_obmat[4][4],
const float ray_start[3], const float ray_normal[3], const float mval[2],
@@ -1545,6 +1674,12 @@ static bool snapObject(Scene *scene, short snap_mode, ARegion *ar, Object *ob, f
else if (ob->type == OB_ARMATURE) {
retval = snapArmature(snap_mode, ar, ob, ob->data, obmat, ray_start, ray_normal, mval, r_loc, r_no, r_dist_px, r_depth);
}
+ else if (ob->type == OB_EMPTY) {
+ retval = snapEmpty(snap_mode, ar, ob, obmat, ray_start, ray_normal, mval, r_loc, r_no, r_dist_px, r_depth);
+ }
+ else if (ob->type == OB_CAMERA) {
+ retval = snapCamera(snap_mode, ar, scene, ob, obmat, ray_start, ray_normal, mval, r_loc, r_no, r_dist_px, r_depth);
+ }
if (retval) {
if (r_ob) {
diff --git a/source/blender/editors/util/crazyspace.c b/source/blender/editors/util/crazyspace.c
index bed8aaaddf2..ff65e11f53e 100644
--- a/source/blender/editors/util/crazyspace.c
+++ b/source/blender/editors/util/crazyspace.c
@@ -51,39 +51,46 @@
#include "ED_util.h"
typedef struct {
- float *vertexcos;
+ float (*vertexcos)[3];
BLI_bitmap *vertex_visit;
} MappedUserData;
-#define TAN_MAKE_VEC(a, b, c) a[0] = b[0] + 0.2f * (b[0] - c[0]); a[1] = b[1] + 0.2f * (b[1] - c[1]); a[2] = b[2] + 0.2f * (b[2] - c[2])
-static void set_crazy_vertex_quat(float *quat, float *v1, float *v2, float *v3, float *def1, float *def2, float *def3)
+BLI_INLINE void tan_calc_v3(float a[3], const float b[3], const float c[3])
{
- float vecu[3], vecv[3];
+ a[0] = b[0] + 0.2f * (b[0] - c[0]);
+ a[1] = b[1] + 0.2f * (b[1] - c[1]);
+ a[2] = b[2] + 0.2f * (b[2] - c[2]);
+}
+
+static void set_crazy_vertex_quat(
+ float r_quat[4],
+ const float co_1[3], const float co_2[3], const float co_3[3],
+ const float vd_1[3], const float vd_2[3], const float vd_3[3])
+{
+ float vec_u[3], vec_v[3];
float q1[4], q2[4];
- TAN_MAKE_VEC(vecu, v1, v2);
- TAN_MAKE_VEC(vecv, v1, v3);
- tri_to_quat(q1, v1, vecu, vecv);
+ tan_calc_v3(vec_u, co_1, co_2);
+ tan_calc_v3(vec_v, co_1, co_3);
+ tri_to_quat(q1, co_1, vec_u, vec_v);
- TAN_MAKE_VEC(vecu, def1, def2);
- TAN_MAKE_VEC(vecv, def1, def3);
- tri_to_quat(q2, def1, vecu, vecv);
+ tan_calc_v3(vec_u, vd_1, vd_2);
+ tan_calc_v3(vec_v, vd_1, vd_3);
+ tri_to_quat(q2, vd_1, vec_u, vec_v);
- sub_qt_qtqt(quat, q2, q1);
+ sub_qt_qtqt(r_quat, q2, q1);
}
-#undef TAN_MAKE_VEC
static void make_vertexcos__mapFunc(void *userData, int index, const float co[3],
const float UNUSED(no_f[3]), const short UNUSED(no_s[3]))
{
MappedUserData *mappedData = (MappedUserData *)userData;
- float *vec = mappedData->vertexcos;
- vec += 3 * index;
if (BLI_BITMAP_GET(mappedData->vertex_visit, index) == 0) {
- /* we need coord from prototype vertex, not it clones or images,
- * suppose they stored in the beginning of vertex array stored in DM */
- copy_v3_v3(vec, co);
+ /* we need coord from prototype vertex, not from copies,
+ * assume they stored in the beginning of vertex array stored in DM
+ * (mirror modifier for eg does this) */
+ copy_v3_v3(mappedData->vertexcos[index], co);
BLI_BITMAP_SET(mappedData->vertex_visit, index);
}
}
@@ -104,11 +111,11 @@ static int modifiers_disable_subsurf_temporary(Object *ob)
}
/* disable subsurf temporal, get mapped cos, and enable it */
-float *crazyspace_get_mapped_editverts(Scene *scene, Object *obedit)
+float (*crazyspace_get_mapped_editverts(Scene *scene, Object *obedit))[3]
{
Mesh *me = obedit->data;
DerivedMesh *dm;
- float *vertexcos;
+ float (*vertexcos)[3];
int nverts = me->edit_btmesh->bm->totvert;
BLI_bitmap *vertex_visit;
MappedUserData userData;
@@ -122,7 +129,7 @@ float *crazyspace_get_mapped_editverts(Scene *scene, Object *obedit)
/* now get the cage */
dm = editbmesh_get_derived_cage(scene, obedit, me->edit_btmesh, CD_MASK_BAREMESH);
- vertexcos = MEM_callocN(3 * sizeof(float) * nverts, "vertexcos map");
+ vertexcos = MEM_callocN(sizeof(*vertexcos) * nverts, "vertexcos map");
vertex_visit = BLI_BITMAP_NEW(nverts, "vertexcos flags");
userData.vertexcos = vertexcos;
@@ -139,65 +146,69 @@ float *crazyspace_get_mapped_editverts(Scene *scene, Object *obedit)
return vertexcos;
}
-void crazyspace_set_quats_editmesh(BMEditMesh *em, float *origcos, float *mappedcos, float *quats)
+void crazyspace_set_quats_editmesh(BMEditMesh *em, float (*origcos)[3], float (*mappedcos)[3], float (*quats)[4])
{
- BMVert *v;
- BMIter iter, liter;
- BMLoop *l;
- float *v1, *v2, *v3, *co1, *co2, *co3;
- int *vert_table = MEM_callocN(sizeof(int) * em->bm->totvert, "vert_table");
- int index = 0;
-
- BM_mesh_elem_index_ensure(em->bm, BM_VERT);
-
- BM_ITER_MESH (v, &iter, em->bm, BM_VERTS_OF_MESH) {
- if (!BM_elem_flag_test(v, BM_ELEM_SELECT) || BM_elem_flag_test(v, BM_ELEM_HIDDEN))
- continue;
-
- BM_ITER_ELEM (l, &liter, v, BM_LOOPS_OF_VERT) {
- BMLoop *l2 = BM_loop_other_edge_loop(l, v);
-
- /* retrieve mapped coordinates */
- v1 = mappedcos + 3 * BM_elem_index_get(l->v);
- v2 = mappedcos + 3 * BM_elem_index_get(BM_edge_other_vert(l2->e, l->v));
- v3 = mappedcos + 3 * BM_elem_index_get(BM_edge_other_vert(l->e, l->v));
-
- co1 = (origcos) ? origcos + 3 * BM_elem_index_get(l->v) : l->v->co;
- co2 = (origcos) ? origcos + 3 * BM_elem_index_get(BM_edge_other_vert(l2->e, l->v)) : BM_edge_other_vert(l2->e, l->v)->co;
- co3 = (origcos) ? origcos + 3 * BM_elem_index_get(BM_edge_other_vert(l->e, l->v)) : BM_edge_other_vert(l->e, l->v)->co;
-
- set_crazy_vertex_quat(quats, v1, v2, v3, co1, co2, co3);
- quats += 4;
-
- vert_table[BM_elem_index_get(l->v)] = index + 1;
-
- index++;
- break; /*just do one corner*/
+ BMFace *f;
+ BMIter iter;
+ int index;
+
+ {
+ BMVert *v;
+ BM_ITER_MESH_INDEX (v, &iter, em->bm, BM_VERTS_OF_MESH, index) {
+ BM_elem_flag_disable(v, BM_ELEM_TAG);
+ BM_elem_index_set(v, index); /* set_inline */
}
+ em->bm->elem_index_dirty &= ~BM_VERT;
}
- index = 0;
- BM_ITER_MESH (v, &iter, em->bm, BM_VERTS_OF_MESH) {
- if (vert_table[index] != 0)
- BM_elem_index_set(v, vert_table[index] - 1); /* set_dirty! */
- else
- BM_elem_index_set(v, -1); /* set_dirty! */
-
- index++;
+ BM_ITER_MESH (f, &iter, em->bm, BM_FACES_OF_MESH) {
+ BMLoop *l_iter, *l_first;
+
+ l_iter = l_first = BM_FACE_FIRST_LOOP(f);
+ do {
+ if (!BM_elem_flag_test(l_iter->v, BM_ELEM_SELECT) || BM_elem_flag_test(l_iter->v, BM_ELEM_HIDDEN))
+ continue;
+
+ if (!BM_elem_flag_test(l_iter->v, BM_ELEM_TAG)) {
+ const float *co_prev, *co_curr, *co_next; /* orig */
+ const float *vd_prev, *vd_curr, *vd_next; /* deform */
+
+ const int i_prev = BM_elem_index_get(l_iter->prev->v);
+ const int i_curr = BM_elem_index_get(l_iter->v);
+ const int i_next = BM_elem_index_get(l_iter->next->v);
+
+ /* retrieve mapped coordinates */
+ vd_prev = mappedcos[i_prev];
+ vd_curr = mappedcos[i_curr];
+ vd_next = mappedcos[i_next];
+
+ if (origcos) {
+ co_prev = origcos[i_prev];
+ co_curr = origcos[i_curr];
+ co_next = origcos[i_next];
+ }
+ else {
+ co_prev = l_iter->prev->v->co;
+ co_curr = l_iter->v->co;
+ co_next = l_iter->next->v->co;
+ }
+
+ set_crazy_vertex_quat(quats[i_curr],
+ co_curr, co_next, co_prev,
+ vd_curr, vd_next, vd_prev);
+
+ BM_elem_flag_enable(l_iter->v, BM_ELEM_TAG);
+ }
+ } while ((l_iter = l_iter->next) != l_first);
}
- em->bm->elem_index_dirty |= BM_VERT;
-
- MEM_freeN(vert_table);
}
-/* BMESH_TODO - use MPolys over MFace's */
-
-void crazyspace_set_quats_mesh(Mesh *me, float *origcos, float *mappedcos, float *quats)
+void crazyspace_set_quats_mesh(Mesh *me, float (*origcos)[3], float (*mappedcos)[3], float (*quats)[4])
{
int i;
MVert *mvert;
- MFace *mface;
- float *v1, *v2, *v3, *v4, *co1, *co2, *co3, *co4;
+ MLoop *mloop;
+ MPoly *mp;
mvert = me->mvert;
for (i = 0; i < me->totvert; i++, mvert++)
@@ -205,49 +216,48 @@ void crazyspace_set_quats_mesh(Mesh *me, float *origcos, float *mappedcos, float
/* first store two sets of tangent vectors in vertices, we derive it just from the face-edges */
mvert = me->mvert;
- mface = me->mface;
- for (i = 0; i < me->totface; i++, mface++) {
-
- /* retrieve mapped coordinates */
- v1 = mappedcos + 3 * mface->v1;
- v2 = mappedcos + 3 * mface->v2;
- v3 = mappedcos + 3 * mface->v3;
-
- co1 = (origcos) ? origcos + 3 * mface->v1 : mvert[mface->v1].co;
- co2 = (origcos) ? origcos + 3 * mface->v2 : mvert[mface->v2].co;
- co3 = (origcos) ? origcos + 3 * mface->v3 : mvert[mface->v3].co;
-
- if ((mvert[mface->v2].flag & ME_VERT_TMP_TAG) == 0) {
- set_crazy_vertex_quat(&quats[mface->v2 * 4], co2, co3, co1, v2, v3, v1);
- mvert[mface->v2].flag |= ME_VERT_TMP_TAG;
- }
-
- if (mface->v4) {
- v4 = mappedcos + 3 * mface->v4;
- co4 = (origcos) ? origcos + 3 * mface->v4 : mvert[mface->v4].co;
-
- if ((mvert[mface->v1].flag & ME_VERT_TMP_TAG) == 0) {
- set_crazy_vertex_quat(&quats[mface->v1 * 4], co1, co2, co4, v1, v2, v4);
- mvert[mface->v1].flag |= ME_VERT_TMP_TAG;
- }
- if ((mvert[mface->v3].flag & ME_VERT_TMP_TAG) == 0) {
- set_crazy_vertex_quat(&quats[mface->v3 * 4], co3, co4, co2, v3, v4, v2);
- mvert[mface->v3].flag |= ME_VERT_TMP_TAG;
- }
- if ((mvert[mface->v4].flag & ME_VERT_TMP_TAG) == 0) {
- set_crazy_vertex_quat(&quats[mface->v4 * 4], co4, co1, co3, v4, v1, v3);
- mvert[mface->v4].flag |= ME_VERT_TMP_TAG;
- }
- }
- else {
- if ((mvert[mface->v1].flag & ME_VERT_TMP_TAG) == 0) {
- set_crazy_vertex_quat(&quats[mface->v1 * 4], co1, co2, co3, v1, v2, v3);
- mvert[mface->v1].flag |= ME_VERT_TMP_TAG;
- }
- if ((mvert[mface->v3].flag & ME_VERT_TMP_TAG) == 0) {
- set_crazy_vertex_quat(&quats[mface->v3 * 4], co3, co1, co2, v3, v1, v2);
- mvert[mface->v3].flag |= ME_VERT_TMP_TAG;
+ mp = me->mpoly;
+ mloop = me->mloop;
+
+ for (i = 0; i < me->totpoly; i++, mp++) {
+ MLoop *ml_prev, *ml_curr, *ml_next;
+ int j;
+
+ ml_next = &mloop[mp->loopstart];
+ ml_curr = &ml_next[mp->totloop - 1];
+ ml_prev = &ml_next[mp->totloop - 2];
+
+ for (j = 0; j < mp->totloop; j++) {
+ if ((mvert[ml_curr->v].flag & ME_VERT_TMP_TAG) == 0) {
+ const float *co_prev, *co_curr, *co_next; /* orig */
+ const float *vd_prev, *vd_curr, *vd_next; /* deform */
+
+ /* retrieve mapped coordinates */
+ vd_prev = mappedcos[ml_prev->v];
+ vd_curr = mappedcos[ml_curr->v];
+ vd_next = mappedcos[ml_next->v];
+
+ if (origcos) {
+ co_prev = origcos[ml_prev->v];
+ co_curr = origcos[ml_curr->v];
+ co_next = origcos[ml_next->v];
+ }
+ else {
+ co_prev = mvert[ml_prev->v].co;
+ co_curr = mvert[ml_curr->v].co;
+ co_next = mvert[ml_next->v].co;
+ }
+
+ set_crazy_vertex_quat(quats[ml_curr->v],
+ co_curr, co_next, co_prev,
+ vd_curr, vd_next, vd_prev);
+
+ mvert[ml_curr->v].flag |= ME_VERT_TMP_TAG;
}
+
+ ml_prev = ml_curr;
+ ml_curr = ml_next;
+ ml_next++;
}
}
}
@@ -260,11 +270,12 @@ int editbmesh_get_first_deform_matrices(Scene *scene, Object *ob, BMEditMesh *em
int i, a, numleft = 0, numVerts = 0;
int cageIndex = modifiers_getCageIndex(scene, ob, NULL, 1);
float (*defmats)[3][3] = NULL, (*deformedVerts)[3] = NULL;
+ VirtualModifierData virtualModifierData;
modifiers_clearErrors(ob);
dm = NULL;
- md = modifiers_getVirtualModifierList(ob);
+ md = modifiers_getVirtualModifierList(ob, &virtualModifierData);
/* compute the deformation matrices and coordinates for the first
* modifiers with on cage editing that are enabled and support computing
@@ -314,6 +325,7 @@ int sculpt_get_first_deform_matrices(Scene *scene, Object *ob, float (**deformma
MultiresModifierData *mmd = get_multires_modifier(scene, ob, 0);
int has_multires = mmd != NULL && mmd->sculptlvl > 0;
int numleft = 0;
+ VirtualModifierData virtualModifierData;
if (has_multires) {
*deformmats = NULL;
@@ -322,7 +334,7 @@ int sculpt_get_first_deform_matrices(Scene *scene, Object *ob, float (**deformma
}
dm = NULL;
- md = modifiers_getVirtualModifierList(ob);
+ md = modifiers_getVirtualModifierList(ob, &virtualModifierData);
for (; md; md = md->next) {
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
@@ -373,9 +385,10 @@ void crazyspace_build_sculpt(Scene *scene, Object *ob, float (**deformmats)[3][3
float (*deformedVerts)[3] = *deformcos;
float (*origVerts)[3] = MEM_dupallocN(deformedVerts);
- float *quats = NULL;
+ float (*quats)[4];
int i, deformed = 0;
- ModifierData *md = modifiers_getVirtualModifierList(ob);
+ VirtualModifierData virtualModifierData;
+ ModifierData *md = modifiers_getVirtualModifierList(ob, &virtualModifierData);
Mesh *me = (Mesh *)ob->data;
for (; md; md = md->next) {
@@ -394,14 +407,14 @@ void crazyspace_build_sculpt(Scene *scene, Object *ob, float (**deformmats)[3][3
}
}
- quats = MEM_mallocN(me->totvert * sizeof(float) * 4, "crazy quats");
+ quats = MEM_mallocN(me->totvert * sizeof(*quats), "crazy quats");
- crazyspace_set_quats_mesh(me, (float *)origVerts, (float *)deformedVerts, quats);
+ crazyspace_set_quats_mesh(me, origVerts, deformedVerts, quats);
for (i = 0; i < me->totvert; i++) {
float qmat[3][3], tmat[3][3];
- quat_to_mat3(qmat, &quats[i * 4]);
+ quat_to_mat3(qmat, quats[i]);
mul_m3_m3m3(tmat, qmat, (*deformmats)[i]);
copy_m3_m3((*deformmats)[i], tmat);
}
diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c
index 35e6c40c36b..7424acd752f 100644
--- a/source/blender/editors/util/ed_util.c
+++ b/source/blender/editors/util/ed_util.c
@@ -258,7 +258,7 @@ void unpack_menu(bContext *C, const char *opname, const char *id_name, const cha
void ED_region_draw_mouse_line_cb(const bContext *C, ARegion *ar, void *arg_info)
{
wmWindow *win = CTX_wm_window(C);
- const int *mval_src = (int *)arg_info;
+ const float *mval_src = (float *)arg_info;
const int mval_dst[2] = {win->eventstate->x - ar->winrct.xmin,
win->eventstate->y - ar->winrct.ymin};
@@ -266,7 +266,7 @@ void ED_region_draw_mouse_line_cb(const bContext *C, ARegion *ar, void *arg_info
setlinestyle(3);
glBegin(GL_LINE_STRIP);
glVertex2iv(mval_dst);
- glVertex2iv(mval_src);
+ glVertex2fv(mval_src);
glEnd();
setlinestyle(0);
}
diff --git a/source/blender/editors/util/numinput.c b/source/blender/editors/util/numinput.c
index 3e5f879aa3c..0feaf936172 100644
--- a/source/blender/editors/util/numinput.c
+++ b/source/blender/editors/util/numinput.c
@@ -114,16 +114,16 @@ void outputNumInput(NumInput *n, char *str)
}
}
-short hasNumInput(NumInput *n)
+bool hasNumInput(const NumInput *n)
{
short i;
for (i = 0; i <= n->idx_max; i++) {
if (n->ctrl[i])
- return 1;
+ return true;
}
- return 0;
+ return false;
}
/**
@@ -159,7 +159,7 @@ void applyNumInput(NumInput *n, float *vec)
}
}
-char handleNumInput(NumInput *n, const wmEvent *event)
+bool handleNumInput(NumInput *n, const wmEvent *event)
{
float Val = 0;
short idx = n->idx, idx_max = n->idx_max;
diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c
index a873702b5b8..d20ef0e70e0 100644
--- a/source/blender/editors/uvedit/uvedit_draw.c
+++ b/source/blender/editors/uvedit/uvedit_draw.c
@@ -69,7 +69,7 @@
#define USE_EDBM_LOOPTRIS
-void draw_image_cursor(SpaceImage *sima, ARegion *ar)
+void draw_image_cursor(ARegion *ar, const float cursor[2])
{
float zoom[2], x_fac, y_fac;
@@ -80,7 +80,7 @@ void draw_image_cursor(SpaceImage *sima, ARegion *ar)
y_fac = zoom[1];
cpack(0xFFFFFF);
- glTranslatef(sima->cursor[0], sima->cursor[1], 0.0);
+ glTranslatef(cursor[0], cursor[1], 0.0);
fdrawline(-0.05f * x_fac, 0, 0, 0.05f * y_fac);
fdrawline(0, 0.05f * y_fac, 0.05f * x_fac, 0.0f);
fdrawline(0.05f * x_fac, 0.0f, 0.0f, -0.05f * y_fac);
@@ -108,7 +108,7 @@ void draw_image_cursor(SpaceImage *sima, ARegion *ar)
fdrawline(0.0f, -0.020f * y_fac, 0.0f, -0.1f * y_fac);
fdrawline(0.0f, 0.1f * y_fac, 0.0f, 0.020f * y_fac);
- glTranslatef(-sima->cursor[0], -sima->cursor[1], 0.0);
+ glTranslatef(-cursor[0], -cursor[1], 0.0);
setlinestyle(0);
}
@@ -158,7 +158,7 @@ static int draw_uvs_dm_shadow(DerivedMesh *dm)
/* draw shadow mesh - this is the mesh with the modifier applied */
if (dm && dm->drawUVEdges && CustomData_has_layer(&dm->loopData, CD_MLOOPUV)) {
- glColor3ub(112, 112, 112);
+ UI_ThemeColor(TH_UV_SHADOW);
dm->drawUVEdges(dm);
return 1;
}
@@ -362,7 +362,7 @@ static void draw_uvs_other(Scene *scene, Object *obedit, Image *curimage)
{
Base *base;
- glColor3ub(96, 96, 96);
+ UI_ThemeColor(TH_UV_OTHERS);
for (base = scene->base.first; base; base = base->next) {
Object *ob = base->object;
@@ -404,7 +404,7 @@ static void draw_uvs_texpaint(SpaceImage *sima, Scene *scene, Object *ob)
if (sima->flag & SI_DRAW_OTHER)
draw_uvs_other(scene, ob, curimage);
- glColor3ub(112, 112, 112);
+ UI_ThemeColor(TH_UV_SHADOW);
if (me->mtpoly) {
MPoly *mpoly = me->mpoly;
@@ -884,7 +884,7 @@ void draw_uvedit_main(SpaceImage *sima, ARegion *ar, Scene *scene, Object *obedi
draw_uvs_texpaint(sima, scene, obact);
if (show_uvedit && !(toolsettings->use_uv_sculpt))
- draw_image_cursor(sima, ar);
+ draw_image_cursor(ar, sima->cursor);
}
}
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index 0b514e3f6fd..474348e84bc 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -924,7 +924,7 @@ static void uv_select_edgeloop_vertex_loop_flag(UvMapVert *first)
static UvMapVert *uv_select_edgeloop_vertex_map_get(UvVertMap *vmap, BMFace *efa, BMLoop *l)
{
UvMapVert *iterv, *first;
- first = EDBM_uv_vert_map_at_index(vmap, BM_elem_index_get(l->v));
+ first = BM_uv_vert_map_at_index(vmap, BM_elem_index_get(l->v));
for (iterv = first; iterv; iterv = iterv->next) {
if (iterv->separate)
@@ -953,7 +953,7 @@ static bool uv_select_edgeloop_edge_tag_faces(BMEditMesh *em, UvMapVert *first1,
if (iterv1->f == iterv2->f) {
/* if face already tagged, don't do this edge */
- efa = EDBM_face_at_index(em, iterv1->f);
+ efa = BM_face_at_index(em->bm, iterv1->f);
if (BM_elem_flag_test(efa, BM_ELEM_TAG))
return false;
@@ -978,7 +978,7 @@ static bool uv_select_edgeloop_edge_tag_faces(BMEditMesh *em, UvMapVert *first1,
break;
if (iterv1->f == iterv2->f) {
- efa = EDBM_face_at_index(em, iterv1->f);
+ efa = BM_face_at_index(em->bm, iterv1->f);
BM_elem_flag_enable(efa, BM_ELEM_TAG);
break;
}
@@ -1005,8 +1005,8 @@ static int uv_select_edgeloop(Scene *scene, Image *ima, BMEditMesh *em, NearestH
const int cd_poly_tex_offset = CustomData_get_offset(&em->bm->pdata, CD_MTEXPOLY);
/* setup */
- EDBM_index_arrays_ensure(em, BM_FACE);
- vmap = EDBM_uv_vert_map_create(em, 0, limit);
+ BM_mesh_elem_table_ensure(em->bm, BM_FACE);
+ vmap = BM_uv_vert_map_create(em->bm, 0, limit);
BM_mesh_elem_index_ensure(em->bm, BM_VERT | BM_FACE);
@@ -1085,7 +1085,7 @@ static int uv_select_edgeloop(Scene *scene, Image *ima, BMEditMesh *em, NearestH
}
/* cleanup */
- EDBM_uv_vert_map_free(vmap);
+ BM_uv_vert_map_free(vmap);
return (select) ? 1 : -1;
}
@@ -1108,8 +1108,8 @@ static void uv_select_linked(Scene *scene, Image *ima, BMEditMesh *em, const flo
const int cd_loop_uv_offset = CustomData_get_offset(&em->bm->ldata, CD_MLOOPUV);
const int cd_poly_tex_offset = CustomData_get_offset(&em->bm->pdata, CD_MTEXPOLY);
- EDBM_index_arrays_ensure(em, BM_FACE); /* we can use this too */
- vmap = EDBM_uv_vert_map_create(em, 1, limit);
+ BM_mesh_elem_table_ensure(em->bm, BM_FACE); /* we can use this too */
+ vmap = BM_uv_vert_map_create(em->bm, 1, limit);
if (vmap == NULL)
return;
@@ -1152,12 +1152,12 @@ static void uv_select_linked(Scene *scene, Image *ima, BMEditMesh *em, const flo
stacksize--;
a = stack[stacksize];
- efa = EDBM_face_at_index(em, a);
+ efa = BM_face_at_index(em->bm, a);
BM_ITER_ELEM_INDEX (l, &liter, efa, BM_LOOPS_OF_FACE, i) {
/* make_uv_vert_map_EM sets verts tmp.l to the indices */
- vlist = EDBM_uv_vert_map_at_index(vmap, BM_elem_index_get(l->v));
+ vlist = BM_uv_vert_map_at_index(vmap, BM_elem_index_get(l->v));
startv = vlist;
@@ -1241,7 +1241,7 @@ static void uv_select_linked(Scene *scene, Image *ima, BMEditMesh *em, const flo
MEM_freeN(stack);
MEM_freeN(flag);
- EDBM_uv_vert_map_free(vmap);
+ BM_uv_vert_map_free(vmap);
}
/* WATCH IT: this returns first selected UV,
@@ -2567,7 +2567,7 @@ static void uv_select_flush_from_tag_sticky_loc_internal(Scene *scene, BMEditMes
uvedit_uv_select_set(em, scene, l, select, false, cd_loop_uv_offset);
- vlist_iter = EDBM_uv_vert_map_at_index(vmap, BM_elem_index_get(l->v));
+ vlist_iter = BM_uv_vert_map_at_index(vmap, BM_elem_index_get(l->v));
while (vlist_iter) {
if (vlist_iter->separate)
@@ -2587,7 +2587,7 @@ static void uv_select_flush_from_tag_sticky_loc_internal(Scene *scene, BMEditMes
if (efa_index != vlist_iter->f) {
BMLoop *l_other;
- efa_vlist = EDBM_face_at_index(em, vlist_iter->f);
+ efa_vlist = BM_face_at_index(em->bm, vlist_iter->f);
/* tf_vlist = BM_ELEM_CD_GET_VOID_P(efa_vlist, cd_poly_tex_offset); */ /* UNUSED */
l_other = BM_iter_at_index(em->bm, BM_LOOPS_OF_FACE, efa_vlist, vlist_iter->tfindex);
@@ -2657,8 +2657,8 @@ static void uv_select_flush_from_tag_face(SpaceImage *sima, Scene *scene, Object
uvedit_pixel_to_float(sima, limit, 0.05);
- EDBM_index_arrays_ensure(em, BM_FACE);
- vmap = EDBM_uv_vert_map_create(em, 0, limit);
+ BM_mesh_elem_table_ensure(em->bm, BM_FACE);
+ vmap = BM_uv_vert_map_create(em->bm, 0, limit);
if (vmap == NULL) {
return;
}
@@ -2673,7 +2673,7 @@ static void uv_select_flush_from_tag_face(SpaceImage *sima, Scene *scene, Object
}
}
}
- EDBM_uv_vert_map_free(vmap);
+ BM_uv_vert_map_free(vmap);
}
else { /* SI_STICKY_DISABLE or ts->uv_flag & UV_SYNC_SELECTION */
@@ -2748,8 +2748,8 @@ static void uv_select_flush_from_tag_loop(SpaceImage *sima, Scene *scene, Object
uvedit_pixel_to_float(sima, limit, 0.05);
- EDBM_index_arrays_ensure(em, BM_FACE);
- vmap = EDBM_uv_vert_map_create(em, 0, limit);
+ BM_mesh_elem_table_ensure(em->bm, BM_FACE);
+ vmap = BM_uv_vert_map_create(em->bm, 0, limit);
if (vmap == NULL) {
return;
}
@@ -2764,7 +2764,7 @@ static void uv_select_flush_from_tag_loop(SpaceImage *sima, Scene *scene, Object
}
}
}
- EDBM_uv_vert_map_free(vmap);
+ BM_uv_vert_map_free(vmap);
}
else { /* SI_STICKY_DISABLE or ts->uv_flag & UV_SYNC_SELECTION */
@@ -3823,6 +3823,12 @@ static void UV_OT_reveal(wmOperatorType *ot)
/******************** set 3d cursor operator ********************/
+static int uv_set_2d_cursor_poll(bContext *C)
+{
+ return ED_operator_uvedit_space_image(C) ||
+ ED_space_image_maskedit_poll(C);
+}
+
static int uv_set_2d_cursor_exec(bContext *C, wmOperator *op)
{
SpaceImage *sima = CTX_wm_space_image(C);
@@ -3858,7 +3864,7 @@ static void UV_OT_cursor_set(wmOperatorType *ot)
/* api callbacks */
ot->exec = uv_set_2d_cursor_exec;
ot->invoke = uv_set_2d_cursor_invoke;
- ot->poll = ED_operator_uvedit_space_image;
+ ot->poll = uv_set_2d_cursor_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -3957,8 +3963,8 @@ static int uv_seams_from_islands_exec(bContext *C, wmOperator *op)
}
/* This code sets editvert->tmp.l to the index. This will be useful later on. */
- EDBM_index_arrays_ensure(em, BM_FACE);
- vmap = EDBM_uv_vert_map_create(em, 0, limit);
+ BM_mesh_elem_table_ensure(bm, BM_FACE);
+ vmap = BM_uv_vert_map_create(bm, 0, limit);
BM_ITER_MESH (editedge, &iter, bm, BM_EDGES_OF_MESH) {
/* flags to determine if we uv is separated from first editface match */
@@ -3986,14 +3992,14 @@ static int uv_seams_from_islands_exec(bContext *C, wmOperator *op)
v1coincident = 0;
separated2 = 0;
- efa1 = EDBM_face_at_index(em, mv1->f);
+ efa1 = BM_face_at_index(bm, mv1->f);
mvinit2 = vmap->vert[BM_elem_index_get(editedge->v2)];
for (mv2 = mvinit2; mv2; mv2 = mv2->next) {
if (mv2->separate)
mv2sep = mv2;
- efa2 = EDBM_face_at_index(em, mv2->f);
+ efa2 = BM_face_at_index(bm, mv2->f);
if (efa1 == efa2) {
/* if v1 is not coincident no point in comparing */
if (v1coincident) {
@@ -4036,7 +4042,7 @@ static int uv_seams_from_islands_exec(bContext *C, wmOperator *op)
me->drawflag |= ME_DRAWSEAMS;
- EDBM_uv_vert_map_free(vmap);
+ BM_uv_vert_map_free(vmap);
DAG_id_tag_update(&me->id, 0);
WM_event_add_notifier(C, NC_GEOM | ND_DATA, me);
diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c
index 7851eebe269..2d33a2d3937 100644
--- a/source/blender/editors/uvedit/uvedit_parametrizer.c
+++ b/source/blender/editors/uvedit/uvedit_parametrizer.c
@@ -33,6 +33,7 @@
#include "BLI_rand.h"
#include "BLI_heap.h"
#include "BLI_boxpack2d.h"
+#include "BLI_convexhull2d.h"
#include "ONL_opennl.h"
@@ -485,6 +486,36 @@ static void p_chart_uv_translate(PChart *chart, float trans[2])
}
}
+static void p_chart_uv_transform(PChart *chart, float mat[2][2])
+{
+ PVert *v;
+
+ for (v = chart->verts; v; v = v->nextlink) {
+ mul_v2_m2v2(v->uv, mat, v->uv);
+ }
+}
+
+static void p_chart_uv_to_array(PChart *chart, float (*points)[2])
+{
+ PVert *v;
+ unsigned int i = 0;
+
+ for (v = chart->verts; v; v = v->nextlink) {
+ copy_v2_v2(points[i++], v->uv);
+ }
+}
+
+static void UNUSED_FUNCTION(p_chart_uv_from_array)(PChart *chart, float (*points)[2])
+{
+ PVert *v;
+ unsigned int i = 0;
+
+ for (v = chart->verts; v; v = v->nextlink) {
+ copy_v2_v2(v->uv, points[i++]);
+ }
+}
+
+
static PBool p_intersect_line_2d_dir(float *v1, float *dir1, float *v2, float *dir2, float *isect)
{
float lmbda, div;
@@ -4092,7 +4123,7 @@ static void p_smooth(PChart *chart)
MEM_freeN(nodesx);
MEM_freeN(nodesy);
- arena = BLI_memarena_new(1 << 16, "param smooth arena");
+ arena = BLI_memarena_new(MEM_SIZE_OPTIMAL(1 << 16), "param smooth arena");
root = p_node_new(arena, tri, esize * 2, minv, maxv, 0);
for (v = chart->verts; v; v = v->nextlink)
@@ -4112,7 +4143,7 @@ ParamHandle *param_construct_begin(void)
PHandle *handle = MEM_callocN(sizeof(*handle), "PHandle");
handle->construction_chart = p_chart_new(handle);
handle->state = PHANDLE_STATE_ALLOCATED;
- handle->arena = BLI_memarena_new((1 << 16), "param construct arena");
+ handle->arena = BLI_memarena_new(MEM_SIZE_OPTIMAL(1 << 16), "param construct arena");
handle->aspx = 1.0f;
handle->aspy = 1.0f;
handle->do_aspect = FALSE;
@@ -4441,8 +4472,42 @@ void param_smooth_area(ParamHandle *handle)
p_smooth(chart);
}
}
-
-void param_pack(ParamHandle *handle, float margin)
+
+/* don't pack, just rotate (used for better packing) */
+static void param_pack_rotate(ParamHandle *handle)
+{
+ PChart *chart;
+ int i;
+
+ PHandle *phandle = (PHandle *)handle;
+
+ for (i = 0; i < phandle->ncharts; i++) {
+ float (*points)[2];
+ float angle;
+
+ chart = phandle->charts[i];
+
+ if (chart->flag & PCHART_NOPACK) {
+ continue;
+ }
+
+ points = MEM_mallocN(sizeof(*points) * chart->nverts, __func__);
+
+ p_chart_uv_to_array(chart, points);
+
+ angle = BLI_convexhull_aabb_fit_points_2d((const float (*)[2])points, chart->nverts);
+
+ MEM_freeN(points);
+
+ if (angle != 0.0f) {
+ float mat[2][2];
+ angle_to_mat2(mat, angle);
+ p_chart_uv_transform(chart, mat);
+ }
+ }
+}
+
+void param_pack(ParamHandle *handle, float margin, bool do_rotate)
{
/* box packing variables */
BoxPack *boxarray, *box;
@@ -4461,6 +4526,11 @@ void param_pack(ParamHandle *handle, float margin)
if (phandle->aspx != phandle->aspy)
param_scale(handle, 1.0f / phandle->aspx, 1.0f / phandle->aspy);
+ /* this could be its own function */
+ if (do_rotate) {
+ param_pack_rotate(handle);
+ }
+
/* we may not use all these boxes */
boxarray = MEM_mallocN(phandle->ncharts * sizeof(BoxPack), "BoxPack box");
@@ -4513,7 +4583,7 @@ void param_pack(ParamHandle *handle, float margin)
}
}
- BLI_box_pack_2D(boxarray, phandle->ncharts - unpacked, &tot_width, &tot_height);
+ BLI_box_pack_2d(boxarray, phandle->ncharts - unpacked, &tot_width, &tot_height);
if (tot_height > tot_width)
scale = 1.0f / tot_height;
diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.h b/source/blender/editors/uvedit/uvedit_parametrizer.h
index 7127a436570..265577555a6 100644
--- a/source/blender/editors/uvedit/uvedit_parametrizer.h
+++ b/source/blender/editors/uvedit/uvedit_parametrizer.h
@@ -99,7 +99,7 @@ void param_smooth_area(ParamHandle *handle);
/* Packing */
-void param_pack(ParamHandle *handle, float margin);
+void param_pack(ParamHandle *handle, float margin, bool do_rotate);
/* Average area for all charts */
diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c
index 3318ae72624..4b5d6d55aa0 100644
--- a/source/blender/editors/uvedit/uvedit_smart_stitch.c
+++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c
@@ -600,7 +600,7 @@ static void state_delete(StitchState *state)
{
if (state) {
if (state->element_map) {
- EDBM_uv_element_map_free(state->element_map);
+ BM_uv_element_map_free(state->element_map);
}
if (state->uvs) {
MEM_freeN(state->uvs);
@@ -661,9 +661,9 @@ static void stitch_uv_edge_generate_linked_edges(GHash *edge_hash, StitchState *
/* check to see if other vertex of edge belongs to same vertex as */
if (BM_elem_index_get(iter1->l->next->v) == elemindex2)
- iter2 = ED_uv_element_get(element_map, iter1->l->f, iter1->l->next);
+ iter2 = BM_uv_element_get(element_map, iter1->l->f, iter1->l->next);
else if (BM_elem_index_get(iter1->l->prev->v) == elemindex2)
- iter2 = ED_uv_element_get(element_map, iter1->l->f, iter1->l->prev);
+ iter2 = BM_uv_element_get(element_map, iter1->l->f, iter1->l->prev);
if (iter2) {
int index1 = map[iter1 - first_element];
@@ -1017,7 +1017,7 @@ static int stitch_process_data(StitchState *state, Scene *scene, int final)
/* copy data from MLoopUVs to the preview display buffers */
BM_ITER_MESH (efa, &iter, bm, BM_FACES_OF_MESH) {
/* just to test if face was added for processing. uvs of inselected vertices will return NULL */
- UvElement *element = ED_uv_element_get(state->element_map, efa, BM_FACE_FIRST_LOOP(efa));
+ UvElement *element = BM_uv_element_get(state->element_map, efa, BM_FACE_FIRST_LOOP(efa));
if (element) {
int numoftris = efa->len - 2;
@@ -1568,8 +1568,8 @@ static UvEdge *uv_edge_get(BMLoop *l, StitchState *state)
{
UvEdge tmp_edge;
- UvElement *element1 = ED_uv_element_get(state->element_map, l->f, l);
- UvElement *element2 = ED_uv_element_get(state->element_map, l->f, l->next);
+ UvElement *element1 = BM_uv_element_get(state->element_map, l->f, l);
+ UvElement *element2 = BM_uv_element_get(state->element_map, l->f, l->next);
int uv1 = state->map[element1 - state->element_map->buf];
int uv2 = state->map[element2 - state->element_map->buf];
@@ -1651,10 +1651,10 @@ static int stitch_init(bContext *C, wmOperator *op)
state->draw_handle = ED_region_draw_cb_activate(ar->type, stitch_draw, state, REGION_DRAW_POST_VIEW);
/* in uv synch selection, all uv's are visible */
if (ts->uv_flag & UV_SYNC_SELECTION) {
- state->element_map = EDBM_uv_element_map_create(state->em, FALSE, TRUE);
+ state->element_map = BM_uv_element_map_create(state->em->bm, false, true);
}
else {
- state->element_map = EDBM_uv_element_map_create(state->em, TRUE, TRUE);
+ state->element_map = BM_uv_element_map_create(state->em->bm, true, true);
}
if (!state->element_map) {
state_delete(state);
@@ -1715,9 +1715,10 @@ static int stitch_init(bContext *C, wmOperator *op)
continue;
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
- UvElement *element = ED_uv_element_get(state->element_map, efa, l);
+ UvElement *element = BM_uv_element_get(state->element_map, efa, l);
int offset1, itmp1 = element - state->element_map->buf;
- int offset2, itmp2 = ED_uv_element_get(state->element_map, efa, l->next) - state->element_map->buf;
+ int offset2, itmp2 = BM_uv_element_get(state->element_map, efa, l->next) - state->element_map->buf;
+ UvEdge *edge;
offset1 = map[itmp1];
offset2 = map[itmp2];
@@ -1737,8 +1738,8 @@ static int stitch_init(bContext *C, wmOperator *op)
all_edges[counter].uv2 = offset1;
}
- if (BLI_ghash_haskey(edge_hash, &all_edges[counter])) {
- UvEdge *edge = BLI_ghash_lookup(edge_hash, &all_edges[counter]);
+ edge = BLI_ghash_lookup(edge_hash, &all_edges[counter]);
+ if (edge) {
edge->flag = 0;
}
else {
@@ -1813,7 +1814,7 @@ static int stitch_init(bContext *C, wmOperator *op)
UvElement *element;
enum StitchModes stored_mode = RNA_enum_get(op->ptr, "stored_mode");
- EDBM_index_arrays_ensure(em, BM_FACE);
+ BM_mesh_elem_table_ensure(em->bm, BM_FACE);
if (stored_mode == STITCH_VERT) {
state->selection_stack = MEM_mallocN(sizeof(*state->selection_stack) * state->total_separate_uvs, "uv_stitch_selection_stack");
@@ -1822,8 +1823,8 @@ static int stitch_init(bContext *C, wmOperator *op)
{
faceIndex = RNA_int_get(&itemptr, "face_index");
elementIndex = RNA_int_get(&itemptr, "element_index");
- efa = EDBM_face_at_index(em, faceIndex);
- element = ED_uv_element_get(state->element_map, efa, BM_iter_at_index(NULL, BM_LOOPS_OF_FACE, efa, elementIndex));
+ efa = BM_face_at_index(em->bm, faceIndex);
+ element = BM_uv_element_get(state->element_map, efa, BM_iter_at_index(NULL, BM_LOOPS_OF_FACE, efa, elementIndex));
stitch_select_uv(element, state, 1);
}
RNA_END;
@@ -1837,11 +1838,11 @@ static int stitch_init(bContext *C, wmOperator *op)
int uv1, uv2;
faceIndex = RNA_int_get(&itemptr, "face_index");
elementIndex = RNA_int_get(&itemptr, "element_index");
- efa = EDBM_face_at_index(em, faceIndex);
- element = ED_uv_element_get(state->element_map, efa, BM_iter_at_index(NULL, BM_LOOPS_OF_FACE, efa, elementIndex));
+ efa = BM_face_at_index(em->bm, faceIndex);
+ element = BM_uv_element_get(state->element_map, efa, BM_iter_at_index(NULL, BM_LOOPS_OF_FACE, efa, elementIndex));
uv1 = map[element - state->element_map->buf];
- element = ED_uv_element_get(state->element_map, efa, BM_iter_at_index(NULL, BM_LOOPS_OF_FACE, efa, (elementIndex + 1) % efa->len));
+ element = BM_uv_element_get(state->element_map, efa, BM_iter_at_index(NULL, BM_LOOPS_OF_FACE, efa, (elementIndex + 1) % efa->len));
uv2 = map[element - state->element_map->buf];
if (uv1 < uv2) {
@@ -1876,7 +1877,7 @@ static int stitch_init(bContext *C, wmOperator *op)
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
BM_ITER_ELEM_INDEX (l, &liter, efa, BM_LOOPS_OF_FACE, i) {
if (uvedit_uv_select_test(scene, l, cd_loop_uv_offset)) {
- UvElement *element = ED_uv_element_get(state->element_map, efa, l);
+ UvElement *element = BM_uv_element_get(state->element_map, efa, l);
if (element) {
stitch_select_uv(element, state, 1);
}
@@ -1912,7 +1913,7 @@ static int stitch_init(bContext *C, wmOperator *op)
}
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
- UvElement *element = ED_uv_element_get(state->element_map, efa, BM_FACE_FIRST_LOOP(efa));
+ UvElement *element = BM_uv_element_get(state->element_map, efa, BM_FACE_FIRST_LOOP(efa));
if (element) {
state->tris_per_island[element->island] += (efa->len > 2) ? efa->len - 2 : 0;
@@ -2038,7 +2039,7 @@ static void stitch_select(bContext *C, Scene *scene, const wmEvent *event, Stitc
* you can do stuff like deselect the opposite stitchable vertex and the initial still gets deselected */
/* This works due to setting of tmp in find nearest uv vert */
- UvElement *element = ED_uv_element_get(state->element_map, hit.efa, hit.l);
+ UvElement *element = BM_uv_element_get(state->element_map, hit.efa, hit.l);
stitch_select_uv(element, state, FALSE);
}
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index 49505b03a19..06ffdea96bf 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -421,11 +421,11 @@ static ParamHandle *construct_param_handle_subsurfed(Scene *scene, Object *ob, B
faceMap = MEM_mallocN(numOfFaces * sizeof(BMFace *), "unwrap_edit_face_map");
BM_mesh_elem_index_ensure(em->bm, BM_VERT);
- EDBM_index_arrays_ensure(em, BM_EDGE | BM_FACE);
+ BM_mesh_elem_table_ensure(em->bm, BM_EDGE | BM_FACE);
/* map subsurfed faces to original editFaces */
for (i = 0; i < numOfFaces; i++)
- faceMap[i] = EDBM_face_at_index(em, DM_origindex_mface_mpoly(origFaceIndices, origPolyIndices, i));
+ faceMap[i] = BM_face_at_index(em->bm, DM_origindex_mface_mpoly(origFaceIndices, origPolyIndices, i));
edgeMap = MEM_mallocN(numOfEdges * sizeof(BMEdge *), "unwrap_edit_edge_map");
@@ -433,7 +433,7 @@ static ParamHandle *construct_param_handle_subsurfed(Scene *scene, Object *ob, B
for (i = 0; i < numOfEdges; i++) {
/* not all edges correspond to an old edge */
edgeMap[i] = (origEdgeIndices[i] != ORIGINDEX_NONE) ?
- EDBM_edge_at_index(em, origEdgeIndices[i]) : NULL;
+ BM_edge_at_index(em->bm, origEdgeIndices[i]) : NULL;
}
/* Prepare and feed faces to the solver */
@@ -718,6 +718,7 @@ static int pack_islands_exec(bContext *C, wmOperator *op)
BMEditMesh *em = BKE_editmesh_from_object(obedit);
ParamHandle *handle;
bool implicit = true;
+ bool do_rotate = RNA_boolean_get(op->ptr, "rotate");
if (!uvedit_have_selection(scene, em, implicit)) {
return OPERATOR_CANCELLED;
@@ -729,7 +730,7 @@ static int pack_islands_exec(bContext *C, wmOperator *op)
RNA_float_set(op->ptr, "margin", scene->toolsettings->uvcalc_margin);
handle = construct_param_handle(scene, obedit, em, implicit, 0, 1, 1);
- param_pack(handle, scene->toolsettings->uvcalc_margin);
+ param_pack(handle, scene->toolsettings->uvcalc_margin, do_rotate);
param_flush(handle);
param_delete(handle);
@@ -753,6 +754,7 @@ void UV_OT_pack_islands(wmOperatorType *ot)
ot->poll = ED_operator_uvedit;
/* properties */
+ RNA_def_boolean(ot->srna, "rotate", true, "Rotate", "Rotate islands for best fit");
RNA_def_float_factor(ot->srna, "margin", 0.001f, 0.0f, 1.0f, "Margin", "Space between islands", 0.0f, 1.0f);
}
@@ -888,7 +890,7 @@ static void uv_map_transform_center(Scene *scene, View3D *v3d, float *result,
}
case V3D_CURSOR: /* cursor center */
{
- const float *curs = give_cursor(scene, v3d);
+ const float *curs = ED_view3d_cursor3d_get(scene, v3d);
/* shift to objects world */
sub_v3_v3v3(result, curs, ob->obmat[3]);
break;
@@ -1151,7 +1153,7 @@ void ED_unwrap_lscm(Scene *scene, Object *obedit, const short sel)
param_lscm_end(handle);
param_average(handle);
- param_pack(handle, scene->toolsettings->uvcalc_margin);
+ param_pack(handle, scene->toolsettings->uvcalc_margin, false);
param_flush(handle);
diff --git a/source/blender/freestyle/intern/application/Controller.cpp b/source/blender/freestyle/intern/application/Controller.cpp
index dbf3fa8349e..c61f72295d2 100644
--- a/source/blender/freestyle/intern/application/Controller.cpp
+++ b/source/blender/freestyle/intern/application/Controller.cpp
@@ -290,6 +290,8 @@ int Controller::LoadMesh(Render *re, SceneRenderLayer *srl)
_ListOfModels.push_back("Blender_models");
+ _Scene3dBBox = _RootNode->bbox();
+
_bboxDiag = (_RootNode->bbox().getMax() - _RootNode->bbox().getMin()).norm();
if (G.debug & G_DEBUG_FREESTYLE) {
cout << "Triangles nb : " << _SceneNumFaces << endl;
@@ -339,6 +341,7 @@ void Controller::DeleteWingedEdge()
// clears the grid
_Grid.clear();
+ _Scene3dBBox.clear();
_SceneNumFaces = 0;
_minEdgeSize = DBL_MAX;
}
@@ -540,8 +543,8 @@ void Controller::ComputeViewMap()
}
_Chrono.start();
// Build View Map
- _ViewMap = vmBuilder.BuildViewMap(*_winged_edge, _VisibilityAlgo, _EPSILON, _RootNode->bbox(), _SceneNumFaces);
- _ViewMap->setScene3dBBox(_RootNode->bbox());
+ _ViewMap = vmBuilder.BuildViewMap(*_winged_edge, _VisibilityAlgo, _EPSILON, _Scene3dBBox, _SceneNumFaces);
+ _ViewMap->setScene3dBBox(_Scene3dBBox);
if (G.debug & G_DEBUG_FREESTYLE) {
printf("ViewMap edge count : %i\n", _ViewMap->viewedges_size());
diff --git a/source/blender/freestyle/intern/application/Controller.h b/source/blender/freestyle/intern/application/Controller.h
index d4537f5f987..f5e50347d0f 100644
--- a/source/blender/freestyle/intern/application/Controller.h
+++ b/source/blender/freestyle/intern/application/Controller.h
@@ -211,6 +211,7 @@ private:
FastGrid _Grid;
//HashGrid _Grid;
+ BBox<Vec3r> _Scene3dBBox;
unsigned int _SceneNumFaces;
real _minEdgeSize;
real _EPSILON;
diff --git a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
index 8cb44d05b84..7dc218c74df 100644
--- a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
+++ b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
@@ -369,7 +369,7 @@ static void prepare(Main *bmain, Render *re, SceneRenderLayer *srl)
if (lineset->flags & FREESTYLE_LINESET_ENABLED) {
if (G.debug & G_DEBUG_FREESTYLE) {
cout << " " << layer_count+1 << ": " << lineset->name << " - " <<
- lineset->linestyle->id.name + 2 << endl;
+ (lineset->linestyle ? (lineset->linestyle->id.name + 2) : "<NULL>") << endl;
}
Text *text = create_lineset_handler(bmain, srl->name, lineset->name);
controller->InsertStyleModule(layer_count, lineset->name, text);
@@ -680,9 +680,11 @@ void FRS_paste_active_lineset(FreestyleConfig *config)
FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(config);
if (lineset) {
- lineset->linestyle->id.us--;
+ if (lineset->linestyle)
+ lineset->linestyle->id.us--;
lineset->linestyle = lineset_buffer.linestyle;
- lineset->linestyle->id.us++;
+ if (lineset->linestyle)
+ lineset->linestyle->id.us++;
lineset->flags = lineset_buffer.flags;
lineset->selection = lineset_buffer.selection;
lineset->qi = lineset_buffer.qi;
@@ -711,10 +713,10 @@ void FRS_delete_active_lineset(FreestyleConfig *config)
if (lineset) {
if (lineset->group) {
lineset->group->id.us--;
- lineset->group = NULL;
}
- lineset->linestyle->id.us--;
- lineset->linestyle = NULL;
+ if (lineset->linestyle) {
+ lineset->linestyle->id.us--;
+ }
BLI_remlink(&config->linesets, lineset);
MEM_freeN(lineset);
BKE_freestyle_lineset_set_active_index(config, 0);
diff --git a/source/blender/freestyle/intern/geometry/BBox.h b/source/blender/freestyle/intern/geometry/BBox.h
index 794ceba48e7..c557c2a6368 100644
--- a/source/blender/freestyle/intern/geometry/BBox.h
+++ b/source/blender/freestyle/intern/geometry/BBox.h
@@ -28,6 +28,10 @@
* \date 22/05/2003
*/
+#include <stdlib.h>
+
+#include "BLI_utildefines.h"
+
#ifdef WITH_CXX_GUARDEDALLOC
#include "MEM_guardedalloc.h"
#endif
@@ -95,6 +99,7 @@ public:
inline BBox<Point>& operator=(const BBox<Point>& b)
{
+ BLI_assert(!b.empty());
_min = b.getMin();
_max = b.getMax();
_empty = false;
@@ -103,6 +108,7 @@ public:
inline BBox<Point>& operator+=(const BBox<Point>& b)
{
+ BLI_assert(!b.empty());
if (_empty) {
_min = b.getMin();
_max = b.getMax();
diff --git a/source/blender/freestyle/intern/geometry/Noise.cpp b/source/blender/freestyle/intern/geometry/Noise.cpp
index b21ded9dd95..8ec56e84f95 100644
--- a/source/blender/freestyle/intern/geometry/Noise.cpp
+++ b/source/blender/freestyle/intern/geometry/Noise.cpp
@@ -62,10 +62,10 @@ namespace Freestyle {
#define SETUP(i, b0, b1, r0, r1) \
{ \
(t) = (i) + (N); \
- (b0) = ((int)(t)) & BM; \
- (b1) = ((b0) + 1) & BM; \
- (r0) = (t) - (int)(t); \
+ (r0) = modff((t), &(u)); \
(r1) = (r0) - 1.0; \
+ (b0) = ((int)(u)) & BM; \
+ (b1) = ((b0) + 1) & BM; \
} (void)0
static void normalize2(float v[2])
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp
index 9b915df03d1..869ada0d058 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp
@@ -44,7 +44,7 @@ PyDoc_STRVAR(ViewEdge_doc,
"Class hierarchy: :class:`Interface1D` > :class:`ViewEdge`\n"
"\n"
"Class defining a ViewEdge. A ViewEdge in an edge of the image graph.\n"
-"it connnects two :class:`ViewVertex` objects. It is made by connecting\n"
+"it connects two :class:`ViewVertex` objects. It is made by connecting\n"
"a set of FEdges.\n"
"\n"
".. method:: __init__()\n"
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp
index 18815ab6f62..b54ed48edc3 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp
@@ -48,7 +48,7 @@ static char MaterialF0D___doc__[] =
" evaluation can be ambiguous (in the case of a :class:`TVertex` for\n"
" example. This functor tries to remove this ambiguity using the\n"
" context offered by the 1D element to which the Interface0DIterator\n"
-" belongs to and by arbitrary chosing the material of the face that\n"
+" belongs to and by arbitrary choosing the material of the face that\n"
" lies on its left when following the 1D element if there are two\n"
" different materials on each side of the point. However, there\n"
" still can be problematic cases, and the user willing to deal with\n"
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp
index 8f7fccb5293..b64f6c06e93 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp
@@ -47,7 +47,7 @@ static char ZDiscontinuityF0D___doc__[] =
" :class:`Interface0D` pointed by the Interface0DIterator and the\n"
" shape that lies behind (occludee). This distance is evaluated in\n"
" the camera space and normalized between 0 and 1. Therefore, if no\n"
-" oject is occluded by the shape to which the Interface0D belongs to,\n"
+" object is occluded by the shape to which the Interface0D belongs to,\n"
" 1 is returned.\n"
"\n"
" :arg it: An Interface0DIterator object.\n"
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp
index 5c3dc3eed9f..65fde596e23 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp
@@ -52,7 +52,7 @@ static char ZDiscontinuityF1D___doc__[] =
" Returns a real value giving the distance between an Interface1D\n"
" and the shape that lies behind (occludee). This distance is\n"
" evaluated in the camera space and normalized between 0 and 1.\n"
-" Therefore, if no oject is occluded by the shape to which the\n"
+" Therefore, if no object is occluded by the shape to which the\n"
" Interface1D belongs to, 1 is returned.\n"
"\n"
" :arg inter: An Interface1D object.\n"
diff --git a/source/blender/freestyle/intern/stroke/StrokeRep.cpp b/source/blender/freestyle/intern/stroke/StrokeRep.cpp
index 2615df0a124..fb6da853e02 100644
--- a/source/blender/freestyle/intern/stroke/StrokeRep.cpp
+++ b/source/blender/freestyle/intern/stroke/StrokeRep.cpp
@@ -149,7 +149,8 @@ void Strip::createStrip (const vector<StrokeVertex*>& iStrokeVertices)
if (dp < 0)
userDir = userDir * (-1.0f);
stripDir = userDir;
- } else {
+ }
+ else {
++orientationErrors;
}
}
@@ -207,7 +208,8 @@ void Strip::createStrip (const vector<StrokeVertex*>& iStrokeVertices)
if (dp < 0)
userDir = userDir * (-1.0f);
stripDir = userDir;
- } else {
+ }
+ else {
++orientationErrors;
}
}
@@ -226,7 +228,8 @@ void Strip::createStrip (const vector<StrokeVertex*>& iStrokeVertices)
if (dp < 0)
userDir = userDir * (-1.0f);
stripDirPrev = userDir;
- } else {
+ }
+ else {
++orientationErrors;
}
}
@@ -302,7 +305,8 @@ void Strip::createStrip (const vector<StrokeVertex*>& iStrokeVertices)
if (dp < 0)
userDir = userDir * (-1.0f);
stripDirLast = userDir;
- } else {
+ }
+ else {
++orientationErrors;
}
}
diff --git a/source/blender/freestyle/intern/stroke/StrokeShader.h b/source/blender/freestyle/intern/stroke/StrokeShader.h
index 7986a08e303..4657e98be61 100644
--- a/source/blender/freestyle/intern/stroke/StrokeShader.h
+++ b/source/blender/freestyle/intern/stroke/StrokeShader.h
@@ -63,7 +63,7 @@ class Stroke;
* \endcode
* Here is a C++ code example of such an iteration:
* \code
- * for(StrokeInternal::StrokeVertexIterator v = ioStroke.strokeVerticesBegin(), vend = ioStroke.strokeVerticesEnd();
+ * for (StrokeInternal::StrokeVertexIterator v = ioStroke.strokeVerticesBegin(), vend = ioStroke.strokeVerticesEnd();
* v != vend;
* ++v)
* {
diff --git a/source/blender/freestyle/intern/stroke/TextStrokeRenderer.cpp b/source/blender/freestyle/intern/stroke/TextStrokeRenderer.cpp
index 9d7cb051fdf..ecfb4d4fa25 100644
--- a/source/blender/freestyle/intern/stroke/TextStrokeRenderer.cpp
+++ b/source/blender/freestyle/intern/stroke/TextStrokeRenderer.cpp
@@ -1,23 +1,22 @@
-
-//
-// Copyright (C) : Please refer to the COPYRIGHT file distributed
-// with this source distribution.
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-//
-///////////////////////////////////////////////////////////////////////////////
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
# include "TextStrokeRenderer.h"
# include "Canvas.h"
diff --git a/source/blender/freestyle/intern/stroke/TextStrokeRenderer.h b/source/blender/freestyle/intern/stroke/TextStrokeRenderer.h
index cd56f9d54e3..42402f318ef 100644
--- a/source/blender/freestyle/intern/stroke/TextStrokeRenderer.h
+++ b/source/blender/freestyle/intern/stroke/TextStrokeRenderer.h
@@ -1,3 +1,27 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/freestyle/intern/stroke/TextStrokeRenderer.h
+ * \ingroup freestyle
+ */
+
//
// Filename : TextStrokeRenderer.h
// Author(s) : Stephane Grabli
@@ -11,29 +35,8 @@
//
///////////////////////////////////////////////////////////////////////////////
-
-//
-// Copyright (C) : Please refer to the COPYRIGHT file distributed
-// with this source distribution.
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef TEXTSTROKERENDERER_H
-# define TEXTSTROKERENDERER_H
+#ifndef TEXTSTROKERENDERER_H
+#define TEXTSTROKERENDERER_H
# include "StrokeRenderer.h"
# include "../system/FreestyleConfig.h"
diff --git a/source/blender/freestyle/intern/view_map/Functions0D.h b/source/blender/freestyle/intern/view_map/Functions0D.h
index 69f6f42e022..e9474191319 100644
--- a/source/blender/freestyle/intern/view_map/Functions0D.h
+++ b/source/blender/freestyle/intern/view_map/Functions0D.h
@@ -346,7 +346,7 @@ public:
// ZDiscontinuity
/*! Returns a real giving the distance between and Interface0D and the shape that lies behind (occludee).
- * This distance is evaluated in the camera space and normalized between 0 and 1. Therefore, if no oject is occluded
+ * This distance is evaluated in the camera space and normalized between 0 and 1. Therefore, if no object is occluded
* by the shape to which the Interface0D belongs to, 1 is returned.
*/
class LIB_VIEW_MAP_EXPORT ZDiscontinuityF0D : public UnaryFunction0D<real>
@@ -383,7 +383,7 @@ public:
/*! Returns the material of the object evaluated at the Interface0D.
* This evaluation can be ambiguous (in the case of a TVertex for example.
* This functor tries to remove this ambiguity using the context offered by the 1D element to which the
- * Interface0DIterator& belongs to and by arbitrary chosing the material of the face that lies on its left when
+ * Interface0DIterator& belongs to and by arbitrary choosing the material of the face that lies on its left when
* following the 1D element if there are two different materials on each side of the point.
* However, there still can be problematic cases, and the user willing to deal with this cases in a specific way
* should implement its own getMaterial functor.
diff --git a/source/blender/freestyle/intern/view_map/Functions1D.h b/source/blender/freestyle/intern/view_map/Functions1D.h
index 2d3da151d13..7b10d1b5185 100644
--- a/source/blender/freestyle/intern/view_map/Functions1D.h
+++ b/source/blender/freestyle/intern/view_map/Functions1D.h
@@ -377,7 +377,7 @@ public:
// ZDiscontinuityF1D
/*! Returns a real giving the distance between and Interface1D and the shape that lies behind (occludee).
- * This distance is evaluated in the camera space and normalized between 0 and 1. Therefore, if no oject is occluded
+ * This distance is evaluated in the camera space and normalized between 0 and 1. Therefore, if no object is occluded
* by the shape to which the Interface1D belongs to, 1 is returned.
*/
class LIB_VIEW_MAP_EXPORT ZDiscontinuityF1D : public UnaryFunction1D<real>
diff --git a/source/blender/freestyle/intern/view_map/SteerableViewMap.h b/source/blender/freestyle/intern/view_map/SteerableViewMap.h
index 23681b43c48..581155fa6e8 100644
--- a/source/blender/freestyle/intern/view_map/SteerableViewMap.h
+++ b/source/blender/freestyle/intern/view_map/SteerableViewMap.h
@@ -89,7 +89,7 @@ public:
/*! Returns the number of the SVM to which a FEdge belongs most.
* \param id
- * The First element of the Id struct of the FEdge we're intersted in.
+ * The First element of the Id struct of the FEdge we're interested in.
*/
unsigned getSVMNumber(unsigned id);
diff --git a/source/blender/freestyle/intern/view_map/ViewMap.h b/source/blender/freestyle/intern/view_map/ViewMap.h
index 987a5bda9b3..0ab089b7d7a 100644
--- a/source/blender/freestyle/intern/view_map/ViewMap.h
+++ b/source/blender/freestyle/intern/view_map/ViewMap.h
@@ -888,7 +888,7 @@ template<class Traits> class vertex_iterator_base;
} // end of namespace ViewEdgeInternal
-/*! Class defining a ViewEdge. A ViewEdge in an edge of the image graph. it connnects two ViewVertex.
+/*! Class defining a ViewEdge. A ViewEdge in an edge of the image graph. it connects two ViewVertex.
* It is made by connecting a set of FEdges.
*/
class LIB_VIEW_MAP_EXPORT ViewEdge : public Interface1D
diff --git a/source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h b/source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h
index 01e93ba77c7..a8c046c4dc1 100644
--- a/source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h
+++ b/source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h
@@ -232,7 +232,7 @@ public:
// operator corresponding to i++, i.e. which returns the value *and then* increments it.
// That's why we store the value in a temp.
- virtual Self operator++(int) // opérateur correspondant à i++
+ virtual Self operator++(int)
{
Self tmp = *this;
increment();
diff --git a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp
index 81b0f5f8934..702ee9bfea2 100644
--- a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp
@@ -595,7 +595,7 @@ static void computeCumulativeVisibility(ViewMap *ioViewMap, G& grid, real epsilo
wFaces.clear();
}
- if (iRenderMonitor) {
+ if (iRenderMonitor && vedges.size()) {
stringstream ss;
ss << "Freestyle: Visibility computations " << (100 * cnt / vedges.size()) << "%";
iRenderMonitor->setInfo(ss.str());
diff --git a/source/blender/gpu/GPU_buffers.h b/source/blender/gpu/GPU_buffers.h
index fca8dcc3392..cc22063a83c 100644
--- a/source/blender/gpu/GPU_buffers.h
+++ b/source/blender/gpu/GPU_buffers.h
@@ -46,6 +46,7 @@ struct CustomData;
struct DMFlagMat;
struct DerivedMesh;
struct GHash;
+struct GSet;
struct GPUVertPointLink;
struct PBVH;
@@ -175,10 +176,10 @@ GPU_Buffers *GPU_build_grid_buffers(int *grid_indices, int totgrid,
GPU_Buffers *GPU_build_bmesh_buffers(int smooth_shading);
void GPU_update_bmesh_buffers(GPU_Buffers *buffers,
- struct BMesh *bm,
- struct GHash *bm_faces,
- struct GHash *bm_unique_verts,
- struct GHash *bm_other_verts);
+ struct BMesh *bm,
+ struct GHash *bm_faces,
+ struct GSet *bm_unique_verts,
+ struct GSet *bm_other_verts);
void GPU_update_grid_buffers(GPU_Buffers *buffers, struct CCGElem **grids,
const struct DMFlagMat *grid_flag_mats,
diff --git a/source/blender/gpu/GPU_extensions.h b/source/blender/gpu/GPU_extensions.h
index 8dd28601d34..1db424b514d 100644
--- a/source/blender/gpu/GPU_extensions.h
+++ b/source/blender/gpu/GPU_extensions.h
@@ -61,6 +61,7 @@ int GPU_print_error(const char *str);
int GPU_glsl_support(void);
int GPU_non_power_of_two_support(void);
+int GPU_display_list_support(void);
int GPU_color_depth(void);
void GPU_code_generate_glsl_lib(void);
int GPU_bicubic_bump_support(void);
diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c
index c54f937f4a9..384b7cce2ff 100644
--- a/source/blender/gpu/intern/gpu_buffers.c
+++ b/source/blender/gpu/intern/gpu_buffers.c
@@ -77,6 +77,8 @@ static int useVBOs = -1;
static GPUBufferState GLStates = 0;
static GPUAttrib attribData[MAX_GPU_ATTRIB_DATA] = { { -1, 0, 0 } };
+static ThreadMutex buffer_mutex = BLI_MUTEX_INITIALIZER;
+
/* stores recently-deleted buffers so that new buffers won't have to
* be recreated as often
*
@@ -203,8 +205,11 @@ void GPU_global_buffer_pool_free_unused(void)
}
/* get a GPUBuffer of at least `size' bytes; uses one from the buffer
- * pool if possible, otherwise creates a new one */
-GPUBuffer *GPU_buffer_alloc(int size)
+ * pool if possible, otherwise creates a new one
+ *
+ * Thread-unsafe version for internal usage only.
+ */
+static GPUBuffer *gpu_buffer_alloc_intern(int size)
{
GPUBufferPool *pool;
GPUBuffer *buf;
@@ -284,10 +289,30 @@ GPUBuffer *GPU_buffer_alloc(int size)
return buf;
}
+/* Same as above, but safe for threading. */
+GPUBuffer *GPU_buffer_alloc(int size)
+{
+ GPUBuffer *buffer;
+
+ if (size == 0) {
+ /* Early out, no lock needed in this case. */
+ return NULL;
+ }
+
+ BLI_mutex_lock(&buffer_mutex);
+ buffer = gpu_buffer_alloc_intern(size);
+ BLI_mutex_unlock(&buffer_mutex);
+
+ return buffer;
+}
+
/* release a GPUBuffer; does not free the actual buffer or its data,
* but rather moves it to the pool of recently-freed buffers for
- * possible re-use*/
-void GPU_buffer_free(GPUBuffer *buffer)
+ * possible re-use
+ *
+ * Thread-unsafe version for internal usage only.
+ */
+static void gpu_buffer_free_intern(GPUBuffer *buffer)
{
GPUBufferPool *pool;
int i;
@@ -326,6 +351,19 @@ void GPU_buffer_free(GPUBuffer *buffer)
pool->totbuf++;
}
+/* Same as above, but safe for threading. */
+void GPU_buffer_free(GPUBuffer *buffer)
+{
+ if (!buffer) {
+ /* Early output, no need to lock in this case, */
+ return;
+ }
+
+ BLI_mutex_lock(&buffer_mutex);
+ gpu_buffer_free_intern(buffer);
+ BLI_mutex_unlock(&buffer_mutex);
+}
+
typedef struct GPUVertPointLink {
struct GPUVertPointLink *next;
/* -1 means uninitialized */
@@ -510,13 +548,17 @@ static GPUBuffer *gpu_buffer_setup(DerivedMesh *dm, GPUDrawObject *object,
pool = gpu_get_global_buffer_pool();
+ BLI_mutex_lock(&buffer_mutex);
+
/* alloc a GPUBuffer; fall back to legacy mode on failure */
- if (!(buffer = GPU_buffer_alloc(size)))
+ if (!(buffer = gpu_buffer_alloc_intern(size)))
dm->drawObject->legacy = 1;
/* nothing to do for legacy mode */
- if (dm->drawObject->legacy)
+ if (dm->drawObject->legacy) {
+ BLI_mutex_unlock(&buffer_mutex);
return NULL;
+ }
cur_index_per_mat = MEM_mallocN(sizeof(int) * object->totmaterial,
"GPU_buffer_setup.cur_index_per_mat");
@@ -541,7 +583,7 @@ static GPUBuffer *gpu_buffer_setup(DerivedMesh *dm, GPUDrawObject *object,
/* attempt to map the buffer */
if (!(varray = glMapBufferARB(target, GL_WRITE_ONLY_ARB))) {
/* failed to map the buffer; delete it */
- GPU_buffer_free(buffer);
+ gpu_buffer_free_intern(buffer);
gpu_buffer_pool_delete_last(pool);
buffer = NULL;
@@ -549,7 +591,7 @@ static GPUBuffer *gpu_buffer_setup(DerivedMesh *dm, GPUDrawObject *object,
* and reallocating the buffer */
if (pool->totbuf > 0) {
gpu_buffer_pool_delete_last(pool);
- buffer = GPU_buffer_alloc(size);
+ buffer = gpu_buffer_alloc_intern(size);
}
/* allocation still failed; fall back
@@ -591,6 +633,8 @@ static GPUBuffer *gpu_buffer_setup(DerivedMesh *dm, GPUDrawObject *object,
MEM_freeN(cur_index_per_mat);
+ BLI_mutex_unlock(&buffer_mutex);
+
return buffer;
}
@@ -1911,6 +1955,7 @@ static void gpu_bmesh_vert_to_buffer_copy(BMVert *v,
/* Assign index for use in the triangle index buffer */
+ /* note: caller must set: bm->elem_index_dirty |= BM_VERT; */
BM_elem_index_set(v, (*v_index)); /* set_dirty! */
(*v_index)++;
@@ -1918,19 +1963,19 @@ static void gpu_bmesh_vert_to_buffer_copy(BMVert *v,
}
/* Return the total number of vertices that don't have BM_ELEM_HIDDEN set */
-static int gpu_bmesh_vert_visible_count(GHash *bm_unique_verts,
- GHash *bm_other_verts)
+static int gpu_bmesh_vert_visible_count(GSet *bm_unique_verts,
+ GSet *bm_other_verts)
{
- GHashIterator gh_iter;
+ GSetIterator gs_iter;
int totvert = 0;
- GHASH_ITER (gh_iter, bm_unique_verts) {
- BMVert *v = BLI_ghashIterator_getKey(&gh_iter);
+ GSET_ITER (gs_iter, bm_unique_verts) {
+ BMVert *v = BLI_gsetIterator_getKey(&gs_iter);
if (!BM_elem_flag_test(v, BM_ELEM_HIDDEN))
totvert++;
}
- GHASH_ITER (gh_iter, bm_other_verts) {
- BMVert *v = BLI_ghashIterator_getKey(&gh_iter);
+ GSET_ITER (gs_iter, bm_other_verts) {
+ BMVert *v = BLI_gsetIterator_getKey(&gs_iter);
if (!BM_elem_flag_test(v, BM_ELEM_HIDDEN))
totvert++;
}
@@ -1957,10 +2002,10 @@ static int gpu_bmesh_face_visible_count(GHash *bm_faces)
/* Creates a vertex buffer (coordinate, normal, color) and, if smooth
* shading, an element index buffer. */
void GPU_update_bmesh_buffers(GPU_Buffers *buffers,
- BMesh *bm,
- GHash *bm_faces,
- GHash *bm_unique_verts,
- GHash *bm_other_verts)
+ BMesh *bm,
+ GHash *bm_faces,
+ GSet *bm_unique_verts,
+ GSet *bm_other_verts)
{
VertexBufferFormat *vert_data;
void *tri_data;
@@ -1991,22 +2036,23 @@ void GPU_update_bmesh_buffers(GPU_Buffers *buffers,
/* Fill vertex buffer */
vert_data = glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
if (vert_data) {
- GHashIterator gh_iter;
int v_index = 0;
if (buffers->smooth) {
+ GSetIterator gs_iter;
+
/* Vertices get an index assigned for use in the triangle
* index buffer */
bm->elem_index_dirty |= BM_VERT;
- GHASH_ITER (gh_iter, bm_unique_verts) {
- gpu_bmesh_vert_to_buffer_copy(BLI_ghashIterator_getKey(&gh_iter),
+ GSET_ITER (gs_iter, bm_unique_verts) {
+ gpu_bmesh_vert_to_buffer_copy(BLI_gsetIterator_getKey(&gs_iter),
vert_data, &v_index, NULL, NULL,
cd_vert_mask_offset);
}
- GHASH_ITER (gh_iter, bm_other_verts) {
- gpu_bmesh_vert_to_buffer_copy(BLI_ghashIterator_getKey(&gh_iter),
+ GSET_ITER (gs_iter, bm_other_verts) {
+ gpu_bmesh_vert_to_buffer_copy(BLI_gsetIterator_getKey(&gs_iter),
vert_data, &v_index, NULL, NULL,
cd_vert_mask_offset);
}
@@ -2014,6 +2060,8 @@ void GPU_update_bmesh_buffers(GPU_Buffers *buffers,
maxvert = v_index;
}
else {
+ GHashIterator gh_iter;
+
GHASH_ITER (gh_iter, bm_faces) {
BMFace *f = BLI_ghashIterator_getKey(&gh_iter);
@@ -2045,6 +2093,9 @@ void GPU_update_bmesh_buffers(GPU_Buffers *buffers,
}
glUnmapBufferARB(GL_ARRAY_BUFFER_ARB);
+
+ /* gpu_bmesh_vert_to_buffer_copy sets dirty index values */
+ bm->elem_index_dirty |= BM_VERT;
}
else {
/* Memory map failed */
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c
index e244c7cf57f..8e0d0e55709 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -65,7 +65,7 @@ static char *glsl_material_library = NULL;
/* structs and defines */
-static const char* GPU_DATATYPE_STR[17] = {"", "float", "vec2", "vec3", "vec4",
+static const char *GPU_DATATYPE_STR[17] = {"", "float", "vec2", "vec3", "vec4",
NULL, NULL, NULL, NULL, "mat3", NULL, NULL, NULL, NULL, NULL, NULL, "mat4"};
#define LINK_IMAGE_BLENDER 1
@@ -1039,9 +1039,7 @@ static void GPU_nodes_free(ListBase *nodes)
{
GPUNode *node;
- while (nodes->first) {
- node = nodes->first;
- BLI_remlink(nodes, node);
+ while ((node = BLI_pophead(nodes))) {
GPU_node_free(node);
}
}
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index e9f9d4a3379..0d25d988df9 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -1216,7 +1216,7 @@ static LinkNode *image_free_queue = NULL;
static void gpu_queue_image_for_free(Image *ima)
{
BLI_lock_thread(LOCK_OPENGL);
- BLI_linklist_append(&image_free_queue, ima);
+ BLI_linklist_prepend(&image_free_queue, ima);
BLI_unlock_thread(LOCK_OPENGL);
}
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index ea7b169a882..1d08f1f6ea9 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -86,6 +86,7 @@ static struct GPUGlobal {
int extdisabled;
int colordepth;
int npotdisabled; /* ATI 3xx-5xx (and more) chipsets support NPoT partially (== not enough) */
+ int dlistsdisabled; /* Legacy ATI driver does not support display lists well */
GPUDeviceType device;
GPUOSType os;
GPUDriverType driver;
@@ -190,6 +191,9 @@ void GPU_extensions_init(void)
* Incomplete list http://dri.freedesktop.org/wiki/ATIRadeon
* New IDs from MESA's src/gallium/drivers/r300/r300_screen.c
*/
+ /* This list is close enough to those using the legacy driver which
+ * has a bug with display lists and glVertexAttrib
+ */
if (strstr(renderer, "R3") || strstr(renderer, "RV3") ||
strstr(renderer, "R4") || strstr(renderer, "RV4") ||
strstr(renderer, "RS4") || strstr(renderer, "RC4") ||
@@ -200,6 +204,7 @@ void GPU_extensions_init(void)
strstr(renderer, "RADEON 9"))
{
GG.npotdisabled = 1;
+ GG.dlistsdisabled = 1;
}
}
@@ -238,6 +243,11 @@ int GPU_non_power_of_two_support(void)
return GLEW_ARB_texture_non_power_of_two;
}
+int GPU_display_list_support(void)
+{
+ return !GG.dlistsdisabled;
+}
+
int GPU_color_depth(void)
{
return GG.colordepth;
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index 0ca929da65d..ed7a2f4ede0 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -1127,7 +1127,16 @@ static void do_material_tex(GPUShadeInput *shi)
GPU_link(mat, "mtex_nspace_tangent", GPU_attribute(CD_TANGENT, ""), shi->vn, tnor, &newnor);
}
}
+ else if (mtex->normapspace == MTEX_NSPACE_OBJECT) {
+ /* transform normal by object then view matrix */
+ GPU_link(mat, "mtex_nspace_object", GPU_builtin(GPU_VIEW_MATRIX), GPU_builtin(GPU_OBJECT_MATRIX), tnor, &newnor);
+ }
+ else if (mtex->normapspace == MTEX_NSPACE_WORLD) {
+ /* transform normal by view matrix */
+ GPU_link(mat, "mtex_nspace_world", GPU_builtin(GPU_VIEW_MATRIX), tnor, &newnor);
+ }
else {
+ /* no transform, normal in camera space */
newnor = tnor;
}
diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl
index 2aee5b4846a..633112095a7 100644
--- a/source/blender/gpu/shaders/gpu_shader_material.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_material.glsl
@@ -1415,6 +1415,16 @@ void mtex_nspace_tangent(vec4 tangent, vec3 normal, vec3 texnormal, out vec3 out
outnormal = normalize(outnormal);
}
+void mtex_nspace_world(mat4 viewmat, vec3 texnormal, out vec3 outnormal)
+{
+ outnormal = normalize((viewmat*vec4(texnormal, 0.0)).xyz);
+}
+
+void mtex_nspace_object(mat4 viewmat, mat4 obmat, vec3 texnormal, out vec3 outnormal)
+{
+ outnormal = normalize((viewmat*(obmat*vec4(texnormal, 0.0))).xyz);
+}
+
void mtex_blend_normal(float norfac, vec3 normal, vec3 newnormal, out vec3 outnormal)
{
outnormal = (1.0 - norfac)*normal + norfac*newnormal;
@@ -2087,11 +2097,16 @@ void node_bsdf_velvet(vec4 color, float sigma, vec3 N, out vec4 result)
node_bsdf_diffuse(color, 0.0, N, result);
}
-void node_subsurface_scattering(vec4 color, float roughness, vec3 N, out vec4 result)
+void node_subsurface_scattering(vec4 color, float scale, vec3 radius, float sharpen, float texture_blur, vec3 N, out vec4 result)
{
node_bsdf_diffuse(color, 0.0, N, result);
}
+void node_bsdf_hair(vec4 color, float roughnessu, float roughnessv, out vec4 result)
+{
+ result = color;
+}
+
/* emission */
void node_emission(vec4 color, float strength, vec3 N, out vec4 result)
@@ -2119,6 +2134,20 @@ void node_fresnel(float ior, vec3 N, vec3 I, out float result)
result = fresnel_dielectric(I, N, (gl_FrontFacing)? eta: 1.0/eta);
}
+/* gamma */
+
+void node_gamma(vec4 col, float gamma, out vec4 outcol)
+{
+ outcol = col;
+
+ if(col.r > 0.0)
+ outcol.r = compatible_pow(col.r, gamma);
+ if(col.g > 0.0)
+ outcol.g = compatible_pow(col.g, gamma);
+ if(col.b > 0.0)
+ outcol.b = compatible_pow(col.b, gamma);
+}
+
/* geometry */
void node_attribute(vec3 attr_uv, out vec4 outcol, out vec3 outvec, out float outf)
diff --git a/source/blender/imbuf/CMakeLists.txt b/source/blender/imbuf/CMakeLists.txt
index 29ed8c95fc6..4025a41b6a7 100644
--- a/source/blender/imbuf/CMakeLists.txt
+++ b/source/blender/imbuf/CMakeLists.txt
@@ -105,6 +105,11 @@ if(WITH_IMAGE_TIFF)
add_definitions(-DWITH_TIFF)
endif()
+
+if(WITH_OPENIMAGEIO)
+ add_definitions(-DWITH_OPENIMAGEIO)
+endif()
+
if(WITH_IMAGE_OPENJPEG)
list(APPEND INC_SYS
${OPENJPEG_INCLUDE_DIRS}
diff --git a/source/blender/imbuf/IMB_colormanagement.h b/source/blender/imbuf/IMB_colormanagement.h
index 7399b8554aa..8af86389db3 100644
--- a/source/blender/imbuf/IMB_colormanagement.h
+++ b/source/blender/imbuf/IMB_colormanagement.h
@@ -31,6 +31,12 @@
#ifndef __IMB_COLORMANAGEMENT_H__
#define __IMB_COLORMANAGEMENT_H__
+/** \file blender/imbuf/IMB_colormanagement.h
+ * \ingroup imbuf
+ */
+
+#include "BLI_sys_types.h"
+
#define BCM_CONFIG_FILE "config.ocio"
struct bContext;
@@ -62,19 +68,22 @@ void IMB_colormanagement_check_is_data(struct ImBuf *ibuf, const char *name);
void IMB_colormanagement_assign_float_colorspace(struct ImBuf *ibuf, const char *name);
void IMB_colormanagement_assign_rect_colorspace(struct ImBuf *ibuf, const char *name);
+const char *IMB_colormanagement_get_float_colorspace(struct ImBuf *ibuf);
+const char *IMB_colormanagement_get_rect_colorspace(struct ImBuf *ibuf);
+
/* ** Color space transformation functions ** */
void IMB_colormanagement_transform(float *buffer, int width, int height, int channels,
- const char *from_colorspace, const char *to_colorspace, int predivide);
+ const char *from_colorspace, const char *to_colorspace, bool predivide);
void IMB_colormanagement_transform_threaded(float *buffer, int width, int height, int channels,
- const char *from_colorspace, const char *to_colorspace, int predivide);
+ const char *from_colorspace, const char *to_colorspace, bool predivide);
void IMB_colormanagement_transform_v4(float pixel[4], const char *from_colorspace, const char *to_colorspace);
void IMB_colormanagement_colorspace_to_scene_linear_v3(float pixel[3], struct ColorSpace *colorspace);
-void IMB_colormanagement_colorspace_to_scene_linear_v4(float pixel[4], int predivide, struct ColorSpace *colorspace);
+void IMB_colormanagement_colorspace_to_scene_linear_v4(float pixel[4], bool predivide, struct ColorSpace *colorspace);
void IMB_colormanagement_scene_linear_to_colorspace_v3(float pixel[3], struct ColorSpace *colorspace);
-void IMB_colormanagement_colorspace_to_scene_linear(float *buffer, int width, int height, int channels, struct ColorSpace *colorspace, int predivide);
+void IMB_colormanagement_colorspace_to_scene_linear(float *buffer, int width, int height, int channels, struct ColorSpace *colorspace, bool predivide);
void IMB_colormanagement_scene_linear_to_display_v3(float pixel[3], struct ColorManagedDisplay *display);
void IMB_colormanagement_display_to_scene_linear_v3(float pixel[3], struct ColorManagedDisplay *display);
@@ -88,7 +97,7 @@ void IMB_colormanagement_pixel_to_display_space_v3(float result[3], const float
void IMB_colormanagement_imbuf_make_display_space(struct ImBuf *ibuf, const struct ColorManagedViewSettings *view_settings,
const struct ColorManagedDisplaySettings *display_settings);
-struct ImBuf *IMB_colormanagement_imbuf_for_write(struct ImBuf *ibuf, int save_as_render, int allocate_result,
+struct ImBuf *IMB_colormanagement_imbuf_for_write(struct ImBuf *ibuf, bool save_as_render, bool allocate_result,
const struct ColorManagedViewSettings *view_settings,
const struct ColorManagedDisplaySettings *display_settings,
struct ImageFormatData *image_format_data);
@@ -110,7 +119,7 @@ unsigned char *IMB_display_buffer_acquire_ctx(const struct bContext *C, struct I
void IMB_display_buffer_transform_apply(unsigned char *display_buffer, float *linear_buffer, int width, int height,
int channels, const struct ColorManagedViewSettings *view_settings,
- const struct ColorManagedDisplaySettings *display_settings, int predivide);
+ const struct ColorManagedDisplaySettings *display_settings, bool predivide);
void IMB_display_buffer_release(void *cache_handle);
@@ -125,6 +134,10 @@ const char *IMB_colormanagement_display_get_none_name(void);
int IMB_colormanagement_view_get_named_index(const char *name);
const char *IMB_colormanagement_view_get_indexed_name(int index);
+/* ** Look funcrions ** */
+int IMB_colormanagement_look_get_named_index(const char *name);
+const char *IMB_colormanagement_look_get_indexed_name(int index);
+
/* ** Color space functions ** */
int IMB_colormanagement_colorspace_get_named_index(const char *name);
const char *IMB_colormanagement_colorspace_get_indexed_name(int index);
@@ -135,6 +148,7 @@ void IMB_colormanagment_colorspace_from_ibuf_ftype(struct ColorManagedColorspace
/* ** RNA helper functions ** */
void IMB_colormanagement_display_items_add(struct EnumPropertyItem **items, int *totitem);
void IMB_colormanagement_view_items_add(struct EnumPropertyItem **items, int *totitem, const char *display_name);
+void IMB_colormanagement_look_items_add(struct EnumPropertyItem **items, int *totitem);
void IMB_colormanagement_colorspace_items_add(struct EnumPropertyItem **items, int *totitem);
/* ** Tile-based buffer management ** */
@@ -142,7 +156,7 @@ void IMB_partial_display_buffer_update(struct ImBuf *ibuf, const float *linear_b
int stride, int offset_x, int offset_y, const struct ColorManagedViewSettings *view_settings,
const struct ColorManagedDisplaySettings *display_settings,
int xmin, int ymin, int xmax, int ymax,
- int update_orig_byte_buffer);
+ bool update_orig_byte_buffer);
void IMB_partial_display_buffer_update_delayed(struct ImBuf *ibuf, int xmin, int ymin, int xmax, int ymax);
@@ -154,29 +168,31 @@ void IMB_colormanagement_processor_apply_v4(struct ColormanageProcessor *cm_proc
void IMB_colormanagement_processor_apply_v4_predivide(struct ColormanageProcessor *cm_processor, float pixel[4]);
void IMB_colormanagement_processor_apply_v3(struct ColormanageProcessor *cm_processor, float pixel[3]);
void IMB_colormanagement_processor_apply(struct ColormanageProcessor *cm_processor, float *buffer, int width, int height,
- int channels, int predivide);
+ int channels, bool predivide);
void IMB_colormanagement_processor_free(struct ColormanageProcessor *cm_processor);
/* ** OpenGL drawing routines using GLSL for color space transform ** */
+/* Test if GLSL drawing is supported for combination of graphics card and this configuration */
+bool IMB_colormanagement_support_glsl_draw(const struct ColorManagedViewSettings *view_settings);
/* Configures GLSL shader for conversion from scene linear to display space */
-int IMB_colormanagement_setup_glsl_draw(const struct ColorManagedViewSettings *view_settings,
- const struct ColorManagedDisplaySettings *display_settings,
- int predivide);
+bool IMB_colormanagement_setup_glsl_draw(const struct ColorManagedViewSettings *view_settings,
+ const struct ColorManagedDisplaySettings *display_settings,
+ bool predivide);
/* Same as above, but display space conversion happens from a specified space */
-int IMB_colormanagement_setup_glsl_draw_from_space(const struct ColorManagedViewSettings *view_settings,
- const struct ColorManagedDisplaySettings *display_settings,
- struct ColorSpace *colorspace,
- int predivide);
+bool IMB_colormanagement_setup_glsl_draw_from_space(const struct ColorManagedViewSettings *view_settings,
+ const struct ColorManagedDisplaySettings *display_settings,
+ struct ColorSpace *colorspace,
+ bool predivide);
/* Same as setup_glsl_draw, but color management settings are guessing from a given context */
-int IMB_colormanagement_setup_glsl_draw_ctx(const struct bContext *C, int predivide);
+bool IMB_colormanagement_setup_glsl_draw_ctx(const struct bContext *C, bool predivide);
/* Same as setup_glsl_draw_from_space, but color management settings are guessing from a given context */
-int IMB_colormanagement_setup_glsl_draw_from_space_ctx(const struct bContext *C, struct ColorSpace *colorspace, int predivide);
+bool IMB_colormanagement_setup_glsl_draw_from_space_ctx(const struct bContext *C, struct ColorSpace *colorspace, bool predivide);
/* Finish GLSL-based display space conversion */
void IMB_colormanagement_finish_glsl_draw(void);
/* Configures GLSL shader for conversion from space defined by role to scene linear space */
-int IMB_colormanagement_setup_transform_from_role_glsl(int role, int predivide);
+bool IMB_colormanagement_setup_transform_from_role_glsl(int role, bool predivide);
/* Finish GLSL-based color space conversion */
void IMB_colormanagement_finish_glsl_transform(void);
diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h
index 819026facc6..c70ab5d7189 100644
--- a/source/blender/imbuf/IMB_imbuf.h
+++ b/source/blender/imbuf/IMB_imbuf.h
@@ -51,9 +51,6 @@
* - Endianness issues are dealt with internally.
* - File I/O must be done externally. The module uses FILE*'s to
* direct input/output.
- * - Platform dependency is limited. Some minor patches for
- * amiga and Irix are present. A 'posix-compliance-patch'
- * provides the interface to windows.
*
* \section dependencies Dependencies
*
@@ -72,6 +69,9 @@
#define IM_MAX_SPACE 64
+/* for bool */
+#include "../blenlib/BLI_sys_types.h"
+
/**
*
* \attention defined in ???
@@ -146,8 +146,8 @@ struct ImBuf *IMB_dupImBuf(struct ImBuf *ibuf1);
*
* \attention Defined in allocimbuf.c
*/
-short addzbufImBuf(struct ImBuf *ibuf);
-short addzbuffloatImBuf(struct ImBuf *ibuf);
+bool addzbufImBuf(struct ImBuf *ibuf);
+bool addzbuffloatImBuf(struct ImBuf *ibuf);
/**
*
@@ -429,7 +429,7 @@ void IMB_alpha_under_color_byte(unsigned char *rect, int x, int y, float backcol
*
* \attention defined in readimage.c
*/
-struct ImBuf *IMB_loadifffile(int file, int flags, char colorspace[IM_MAX_SPACE], const char *descr);
+struct ImBuf *IMB_loadifffile(int file, const char *filepath, int flags, char colorspace[IM_MAX_SPACE], const char *descr);
/**
*
@@ -500,17 +500,17 @@ void buf_rectfill_area(unsigned char *rect, float *rectf, int width, int height,
int x1, int y1, int x2, int y2);
/* defined in metadata.c */
-int IMB_metadata_change_field(struct ImBuf *img, const char *key, const char *field);
+bool IMB_metadata_change_field(struct ImBuf *img, const char *key, const char *field);
/* exported for image tools in blender, to quickly allocate 32 bits rect */
-short imb_addrectImBuf(struct ImBuf *ibuf);
+bool imb_addrectImBuf(struct ImBuf *ibuf);
void imb_freerectImBuf(struct ImBuf *ibuf);
-short imb_addrectfloatImBuf(struct ImBuf *ibuf);
+bool imb_addrectfloatImBuf(struct ImBuf *ibuf);
void imb_freerectfloatImBuf(struct ImBuf *ibuf);
void imb_freemipmapImBuf(struct ImBuf *ibuf);
-short imb_addtilesImBuf(struct ImBuf *ibuf);
+bool imb_addtilesImBuf(struct ImBuf *ibuf);
void imb_freetilesImBuf(struct ImBuf *ibuf);
/* threaded processors */
diff --git a/source/blender/imbuf/IMB_imbuf_types.h b/source/blender/imbuf/IMB_imbuf_types.h
index 1734073dd6c..d20130805c0 100644
--- a/source/blender/imbuf/IMB_imbuf_types.h
+++ b/source/blender/imbuf/IMB_imbuf_types.h
@@ -180,6 +180,10 @@ typedef struct ImBuf {
*/
#define IB_CUSTOM_FLAGS_MASK 0x7ff
+#ifdef WITH_OPENIMAGEIO
+#define PSD (1 << 31)
+#endif
+
#define PNG (1 << 30)
#define TGA (1 << 28)
#define JPG (1 << 27)
@@ -273,6 +277,9 @@ extern const char *imb_ext_image_qt[];
extern const char *imb_ext_movie[];
extern const char *imb_ext_audio[];
+/* image formats that can only be loaded via filepath */
+extern const char *imb_ext_image_filepath_only[];
+
enum {
IMB_COLORMANAGE_IS_DATA = (1 << 0)
};
diff --git a/source/blender/imbuf/SConscript b/source/blender/imbuf/SConscript
index 03064df293d..ccee3ebcc85 100644
--- a/source/blender/imbuf/SConscript
+++ b/source/blender/imbuf/SConscript
@@ -55,6 +55,9 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', '
incs += ' ' + env['BF_PTHREADS_INC']
incs += ' ../../../intern/utfconv'
+if env['WITH_BF_OIIO']:
+ defs.append('WITH_OPENIMAGEIO')
+
if env['WITH_BF_OPENEXR']:
defs.append('WITH_OPENEXR')
else:
diff --git a/source/blender/imbuf/intern/IMB_allocimbuf.h b/source/blender/imbuf/intern/IMB_allocimbuf.h
index 047228926ee..02b738cc2cd 100644
--- a/source/blender/imbuf/intern/IMB_allocimbuf.h
+++ b/source/blender/imbuf/intern/IMB_allocimbuf.h
@@ -35,8 +35,8 @@
struct ImBuf;
-short imb_addencodedbufferImBuf(struct ImBuf *ibuf);
-short imb_enlargeencodedbufferImBuf(struct ImBuf *ibuf);
+bool imb_addencodedbufferImBuf(struct ImBuf *ibuf);
+bool imb_enlargeencodedbufferImBuf(struct ImBuf *ibuf);
#endif
diff --git a/source/blender/imbuf/intern/IMB_colormanagement_intern.h b/source/blender/imbuf/intern/IMB_colormanagement_intern.h
index c372e125a66..17eb4bf6db4 100644
--- a/source/blender/imbuf/intern/IMB_colormanagement_intern.h
+++ b/source/blender/imbuf/intern/IMB_colormanagement_intern.h
@@ -28,10 +28,15 @@
*
*/
-#ifndef IMB_COLORMANAGEMENT_INTERN_H
-#define IMB_COLORMANAGEMENT_INTERN_H
+#ifndef __IMB_COLORMANAGEMENT_INTERN_H__
+#define __IMB_COLORMANAGEMENT_INTERN_H__
+
+/** \file IMB_colormanagement_intern.h
+ * \ingroup imbuf
+ */
#include "DNA_listBase.h"
+#include "BLI_sys_types.h"
struct OCIO_ConstProcessorRcPtr;
struct ImBuf;
@@ -48,8 +53,8 @@ typedef struct ColorSpace {
struct OCIO_ConstProcessorRcPtr *to_scene_linear;
struct OCIO_ConstProcessorRcPtr *from_scene_linear;
- int is_invertible;
- int is_data;
+ bool is_invertible;
+ bool is_data;
} ColorSpace;
typedef struct ColorManagedDisplay {
@@ -68,6 +73,14 @@ typedef struct ColorManagedView {
char name[MAX_COLORSPACE_NAME];
} ColorManagedView;
+typedef struct ColorManagedLook {
+ struct ColorManagedLook *next, *prev;
+ int index;
+ char name[MAX_COLORSPACE_NAME];
+ char process_space[MAX_COLORSPACE_NAME];
+ bool is_noop;
+} ColorManagedLook;
+
/* ** Initialization / De-initialization ** */
void colormanagement_init(void);
@@ -87,14 +100,18 @@ struct ColorManagedView *colormanage_view_add(const char *name);
struct ColorManagedView *colormanage_view_get_indexed(int index);
struct ColorManagedView *colormanage_view_get_named(const char *name);
-struct ColorSpace *colormanage_colorspace_add(const char *name, const char *description, int is_invertible, int is_data);
+struct ColorSpace *colormanage_colorspace_add(const char *name, const char *description, bool is_invertible, bool is_data);
struct ColorSpace *colormanage_colorspace_get_named(const char *name);
struct ColorSpace *colormanage_colorspace_get_roled(int role);
struct ColorSpace *colormanage_colorspace_get_indexed(int index);
+struct ColorManagedLook *colormanage_look_add(const char *name, const char *process_space, bool is_noop);
+struct ColorManagedLook *colormanage_look_get_named(const char *name);
+struct ColorManagedLook *colormanage_look_get_indexed(int index);
+
void colorspace_set_default_role(char *colorspace, int size, int role);
void colormanage_imbuf_set_default_spaces(struct ImBuf *ibuf);
void colormanage_imbuf_make_linear(struct ImBuf *ibuf, const char *from_colorspace);
-#endif /* IMB_COLORMANAGEMENT_INTERN_H */
+#endif /* __IMB_COLORMANAGEMENT_INTERN_H__ */
diff --git a/source/blender/imbuf/intern/IMB_filetype.h b/source/blender/imbuf/intern/IMB_filetype.h
index 154941c5c09..9327c15c415 100644
--- a/source/blender/imbuf/intern/IMB_filetype.h
+++ b/source/blender/imbuf/intern/IMB_filetype.h
@@ -39,8 +39,10 @@ typedef struct ImFileType {
void (*exit)(void);
int (*is_a)(unsigned char *buf);
+ int (*is_a_filepath)(const char *name);
int (*ftype)(struct ImFileType *type, struct ImBuf *ibuf);
struct ImBuf *(*load)(unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]);
+ struct ImBuf *(*load_filepath)(const char *name, int flags, char colorspace[IM_MAX_SPACE]);
int (*save)(struct ImBuf *ibuf, const char *name, int flags);
void (*load_tile)(struct ImBuf *ibuf, unsigned char *mem, size_t size, int tx, int ty, unsigned int *rect);
@@ -50,6 +52,7 @@ typedef struct ImFileType {
} ImFileType;
extern ImFileType IMB_FILE_TYPES[];
+extern ImFileType *IMB_FILE_TYPES_LAST;
void imb_filetypes_init(void);
void imb_filetypes_exit(void);
@@ -94,7 +97,6 @@ int imb_savebmp(struct ImBuf *ibuf, const char *name, int flags);
/* cocoa */
struct ImBuf *imb_cocoaLoadImage(unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]);
-short imb_cocoaSaveImage(struct ImBuf *ibuf, const char *name, int flags);
/* cineon */
int imb_save_cineon(struct ImBuf *buf, const char *name, int flags);
diff --git a/source/blender/imbuf/intern/IMB_indexer.h b/source/blender/imbuf/intern/IMB_indexer.h
index 96f7a68d669..6173ffa9b78 100644
--- a/source/blender/imbuf/intern/IMB_indexer.h
+++ b/source/blender/imbuf/intern/IMB_indexer.h
@@ -25,6 +25,10 @@
#ifndef __IMB_INDEXER_H__
#define __IMB_INDEXER_H__
+/** \file IMB_indexer.h
+ * \ingroup imbuf
+ */
+
#ifdef WIN32
# include <io.h>
#endif
diff --git a/source/blender/imbuf/intern/IMB_metadata.h b/source/blender/imbuf/intern/IMB_metadata.h
index f731fd69620..a717764b44f 100644
--- a/source/blender/imbuf/intern/IMB_metadata.h
+++ b/source/blender/imbuf/intern/IMB_metadata.h
@@ -62,7 +62,7 @@ void IMB_metadata_free(struct ImBuf *img);
* \param len - length of value buffer allocated by user.
* \return - 1 (true) if ImageInfo present and value for the key found, 0 (false) otherwise
*/
-int IMB_metadata_get_field(struct ImBuf *img, const char *key, char *value, const size_t len);
+bool IMB_metadata_get_field(struct ImBuf *img, const char *key, char *value, const size_t len);
/** set user data in the ImMetaData struct, which has to be allocated with IMB_metadata_create
* before calling this function.
@@ -71,13 +71,13 @@ int IMB_metadata_get_field(struct ImBuf *img, const char *key, char *value, cons
* \param value - the data to be written to the field. zero terminated string
* \return - 1 (true) if ImageInfo present, 0 (false) otherwise
*/
-int IMB_metadata_add_field(struct ImBuf *img, const char *key, const char *value);
+bool IMB_metadata_add_field(struct ImBuf *img, const char *key, const char *value);
/** delete the key/field par in the ImMetaData struct.
* \param img - the ImBuf that contains the image data
* \param key - the key of the field
* \return - 1 (true) if delete the key/field, 0 (false) otherwise
*/
-int IMB_metadata_del_field(struct ImBuf *img, const char *key);
+bool IMB_metadata_del_field(struct ImBuf *img, const char *key);
#endif /* __IMB_METADATA_H__ */
diff --git a/source/blender/imbuf/intern/allocimbuf.c b/source/blender/imbuf/intern/allocimbuf.c
index ca0b26fa4b7..fb7033e1362 100644
--- a/source/blender/imbuf/intern/allocimbuf.c
+++ b/source/blender/imbuf/intern/allocimbuf.c
@@ -48,6 +48,8 @@
#include "MEM_guardedalloc.h"
#include "MEM_CacheLimiterC-Api.h"
+#include "BLI_utildefines.h"
+
void imb_freemipmapImBuf(ImBuf *ibuf)
{
int a;
@@ -191,46 +193,48 @@ ImBuf *IMB_makeSingleUser(ImBuf *ibuf)
return rval;
}
-short addzbufImBuf(ImBuf *ibuf)
+bool addzbufImBuf(ImBuf *ibuf)
{
- int size;
+ size_t size;
- if (ibuf == NULL) return FALSE;
+ if (ibuf == NULL) return false;
IMB_freezbufImBuf(ibuf);
- size = ibuf->x * ibuf->y * sizeof(unsigned int);
- if ((ibuf->zbuf = MEM_mapallocN(size, "addzbufImBuf"))) {
+ size = (size_t)(ibuf->x * ibuf->y) * sizeof(unsigned int);
+
+ if ((ibuf->zbuf = MEM_mapallocN(size, __func__))) {
ibuf->mall |= IB_zbuf;
ibuf->flags |= IB_zbuf;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-short addzbuffloatImBuf(ImBuf *ibuf)
+bool addzbuffloatImBuf(ImBuf *ibuf)
{
- int size;
+ size_t size;
- if (ibuf == NULL) return FALSE;
+ if (ibuf == NULL) return false;
IMB_freezbuffloatImBuf(ibuf);
- size = ibuf->x * ibuf->y * sizeof(float);
- if ((ibuf->zbuf_float = MEM_mapallocN(size, "addzbuffloatImBuf"))) {
+ size = (size_t)(ibuf->x * ibuf->y) * sizeof(float);
+
+ if ((ibuf->zbuf_float = MEM_mapallocN(size, __func__))) {
ibuf->mall |= IB_zbuffloat;
ibuf->flags |= IB_zbuffloat;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-short imb_addencodedbufferImBuf(ImBuf *ibuf)
+bool imb_addencodedbufferImBuf(ImBuf *ibuf)
{
- if (ibuf == NULL) return FALSE;
+ if (ibuf == NULL) return false;
freeencodedbufferImBuf(ibuf);
@@ -239,33 +243,33 @@ short imb_addencodedbufferImBuf(ImBuf *ibuf)
ibuf->encodedsize = 0;
- if ((ibuf->encodedbuffer = MEM_mallocN(ibuf->encodedbuffersize, "addencodedbufferImBuf"))) {
+ if ((ibuf->encodedbuffer = MEM_mallocN(ibuf->encodedbuffersize, __func__))) {
ibuf->mall |= IB_mem;
ibuf->flags |= IB_mem;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-short imb_enlargeencodedbufferImBuf(ImBuf *ibuf)
+bool imb_enlargeencodedbufferImBuf(ImBuf *ibuf)
{
unsigned int newsize, encodedsize;
void *newbuffer;
- if (ibuf == NULL) return FALSE;
+ if (ibuf == NULL) return false;
if (ibuf->encodedbuffersize < ibuf->encodedsize) {
- printf("imb_enlargeencodedbufferImBuf: error in parameters\n");
- return FALSE;
+ printf("%s: error in parameters\n", __func__);
+ return false;
}
newsize = 2 * ibuf->encodedbuffersize;
if (newsize < 10000) newsize = 10000;
- newbuffer = MEM_mallocN(newsize, "enlargeencodedbufferImBuf");
- if (newbuffer == NULL) return FALSE;
+ newbuffer = MEM_mallocN(newsize, __func__);
+ if (newbuffer == NULL) return false;
if (ibuf->encodedbuffer) {
memcpy(newbuffer, ibuf->encodedbuffer, ibuf->encodedsize);
@@ -284,59 +288,61 @@ short imb_enlargeencodedbufferImBuf(ImBuf *ibuf)
ibuf->mall |= IB_mem;
ibuf->flags |= IB_mem;
- return TRUE;
+ return true;
}
-short imb_addrectfloatImBuf(ImBuf *ibuf)
+bool imb_addrectfloatImBuf(ImBuf *ibuf)
{
- int size;
+ size_t size;
- if (ibuf == NULL) return FALSE;
+ if (ibuf == NULL) return false;
if (ibuf->rect_float)
imb_freerectfloatImBuf(ibuf); /* frees mipmap too, hrm */
- size = ibuf->x * ibuf->y;
- size = size * 4 * sizeof(float);
+ size = (size_t)(ibuf->x * ibuf->y) * sizeof(float[4]);
+
ibuf->channels = 4;
-
- if ((ibuf->rect_float = MEM_mapallocN(size, "imb_addrectfloatImBuf"))) {
+ if ((ibuf->rect_float = MEM_mapallocN(size, __func__))) {
ibuf->mall |= IB_rectfloat;
ibuf->flags |= IB_rectfloat;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
/* question; why also add zbuf? */
-short imb_addrectImBuf(ImBuf *ibuf)
+bool imb_addrectImBuf(ImBuf *ibuf)
{
- int size;
+ size_t size;
- if (ibuf == NULL) return FALSE;
+ if (ibuf == NULL) return false;
/* don't call imb_freerectImBuf, it frees mipmaps, this call is used only too give float buffers display */
if (ibuf->rect && (ibuf->mall & IB_rect))
MEM_freeN(ibuf->rect);
ibuf->rect = NULL;
- size = ibuf->x * ibuf->y;
- size = size * sizeof(unsigned int);
+ size = (size_t)(ibuf->x * ibuf->y) * sizeof(unsigned int);
- if ((ibuf->rect = MEM_mapallocN(size, "imb_addrectImBuf"))) {
+ if ((ibuf->rect = MEM_mapallocN(size, __func__))) {
ibuf->mall |= IB_rect;
ibuf->flags |= IB_rect;
- if (ibuf->planes > 32) return (addzbufImBuf(ibuf));
- else return TRUE;
+ if (ibuf->planes > 32) {
+ return (addzbufImBuf(ibuf));
+ }
+ else {
+ return true;
+ }
}
- return FALSE;
+ return false;
}
-short imb_addtilesImBuf(ImBuf *ibuf)
+bool imb_addtilesImBuf(ImBuf *ibuf)
{
- if (ibuf == NULL) return FALSE;
+ if (ibuf == NULL) return false;
if (!ibuf->tiles)
if ((ibuf->tiles = MEM_callocN(sizeof(unsigned int *) * ibuf->xtiles * ibuf->ytiles, "imb_tiles")))
@@ -360,28 +366,28 @@ ImBuf *IMB_allocImBuf(unsigned int x, unsigned int y, uchar planes, unsigned int
ibuf->ppm[0] = ibuf->ppm[1] = IMB_DPI_DEFAULT / 0.0254f; /* IMB_DPI_DEFAULT -> pixels-per-meter */
if (flags & IB_rect) {
- if (imb_addrectImBuf(ibuf) == FALSE) {
+ if (imb_addrectImBuf(ibuf) == false) {
IMB_freeImBuf(ibuf);
return NULL;
}
}
if (flags & IB_rectfloat) {
- if (imb_addrectfloatImBuf(ibuf) == FALSE) {
+ if (imb_addrectfloatImBuf(ibuf) == false) {
IMB_freeImBuf(ibuf);
return NULL;
}
}
if (flags & IB_zbuf) {
- if (addzbufImBuf(ibuf) == FALSE) {
+ if (addzbufImBuf(ibuf) == false) {
IMB_freeImBuf(ibuf);
return NULL;
}
}
if (flags & IB_zbuffloat) {
- if (addzbuffloatImBuf(ibuf) == FALSE) {
+ if (addzbuffloatImBuf(ibuf) == false) {
IMB_freeImBuf(ibuf);
return NULL;
}
@@ -420,7 +426,7 @@ ImBuf *IMB_dupImBuf(ImBuf *ibuf1)
if (ibuf1->encodedbuffer) {
ibuf2->encodedbuffersize = ibuf1->encodedbuffersize;
- if (imb_addencodedbufferImBuf(ibuf2) == FALSE) {
+ if (imb_addencodedbufferImBuf(ibuf2) == false) {
IMB_freeImBuf(ibuf2);
return NULL;
}
diff --git a/source/blender/imbuf/intern/bmp.c b/source/blender/imbuf/intern/bmp.c
index eb3cfc3ade3..dabeec74a62 100644
--- a/source/blender/imbuf/intern/bmp.c
+++ b/source/blender/imbuf/intern/bmp.c
@@ -273,7 +273,7 @@ int imb_savebmp(struct ImBuf *ibuf, const char *name, int flags)
if (!ofile) return 0;
putShortLSB(19778, ofile); /* "BM" */
- putIntLSB(0, ofile); /* This can be 0 for BI_RGB bitmaps */
+ putIntLSB(bytesize + BMP_FILEHEADER_SIZE + sizeof(infoheader), ofile); /* Total file size */
putShortLSB(0, ofile); /* Res1 */
putShortLSB(0, ofile); /* Res2 */
putIntLSB(BMP_FILEHEADER_SIZE + sizeof(infoheader), ofile);
@@ -284,7 +284,7 @@ int imb_savebmp(struct ImBuf *ibuf, const char *name, int flags)
putShortLSB(1, ofile);
putShortLSB(24, ofile);
putIntLSB(0, ofile);
- putIntLSB(bytesize + BMP_FILEHEADER_SIZE + sizeof(infoheader), ofile);
+ putIntLSB(bytesize, ofile);
putIntLSB((int)(ibuf->ppm[0] + 0.5), ofile);
putIntLSB((int)(ibuf->ppm[1] + 0.5), ofile);
putIntLSB(0, ofile);
diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c
index 0167eaccef0..cf9cc0c2e6f 100644
--- a/source/blender/imbuf/intern/colormanagement.c
+++ b/source/blender/imbuf/intern/colormanagement.c
@@ -28,6 +28,10 @@
*
*/
+/** \file blender/imbuf/intern/colormanagement.c
+ * \ingroup imbuf
+ */
+
#include "IMB_colormanagement.h"
#include "IMB_colormanagement_intern.h"
@@ -81,13 +85,15 @@ static char global_role_default_byte[MAX_COLORSPACE_NAME];
static char global_role_default_float[MAX_COLORSPACE_NAME];
static char global_role_default_sequencer[MAX_COLORSPACE_NAME];
-static ListBase global_colorspaces = {NULL};
-static ListBase global_displays = {NULL};
-static ListBase global_views = {NULL};
+static ListBase global_colorspaces = {NULL, NULL};
+static ListBase global_displays = {NULL, NULL};
+static ListBase global_views = {NULL, NULL};
+static ListBase global_looks = {NULL, NULL};
static int global_tot_colorspace = 0;
static int global_tot_display = 0;
static int global_tot_view = 0;
+static int global_tot_looks = 0;
/* lock used by pre-cached processors getters, so processor wouldn't
* be created several times
@@ -99,7 +105,7 @@ static pthread_mutex_t processor_lock = BLI_MUTEX_INITIALIZER;
typedef struct ColormanageProcessor {
OCIO_ConstProcessorRcPtr *processor;
CurveMapping *curve_mapping;
- int is_data_result;
+ bool is_data_result;
} ColormanageProcessor;
static struct global_glsl_state {
@@ -107,11 +113,17 @@ static struct global_glsl_state {
OCIO_ConstProcessorRcPtr *processor;
/* Settings of processor for comparison. */
+ char look[MAX_COLORSPACE_NAME];
char view[MAX_COLORSPACE_NAME];
char display[MAX_COLORSPACE_NAME];
char input[MAX_COLORSPACE_NAME];
float exposure, gamma;
+ CurveMapping *curve_mapping, *orig_curve_mapping;
+ bool use_curve_mapping;
+ int curve_mapping_timestamp;
+ OCIO_CurveMappingSettings curve_mapping_settings;
+
/* Container for GLSL state needed for OCIO module. */
struct OCIO_GLSLDrawState *ocio_glsl_state;
struct OCIO_GLSLDrawState *transform_ocio_glsl_state;
@@ -185,9 +197,11 @@ static struct global_glsl_state {
*/
typedef struct ColormanageCacheViewSettings {
int flag;
+ int look;
int view;
float exposure;
float gamma;
+ float dither;
CurveMapping *curve_mapping;
} ColormanageCacheViewSettings;
@@ -202,8 +216,10 @@ typedef struct ColormanageCacheKey {
typedef struct ColormnaageCacheData {
int flag; /* view flags of cached buffer */
+ int look; /* Additional artistics transform */
float exposure; /* exposure value cached buffer is calculated with */
float gamma; /* gamma value cached buffer is calculated with */
+ float dither; /* dither value cached buffer is calculated with */
CurveMapping *curve_mapping; /* curve mapping used for cached buffer */
int curve_mapping_timestamp; /* time stamp of curve mapping used for cached buffer */
} ColormnaageCacheData;
@@ -282,14 +298,18 @@ static void colormanage_cachedata_set(ImBuf *ibuf, ColormnaageCacheData *data)
ibuf->colormanage_cache->data = data;
}
-static void colormanage_view_settings_to_cache(ColormanageCacheViewSettings *cache_view_settings,
+static void colormanage_view_settings_to_cache(ImBuf *ibuf,
+ ColormanageCacheViewSettings *cache_view_settings,
const ColorManagedViewSettings *view_settings)
{
+ int look = IMB_colormanagement_look_get_named_index(view_settings->look);
int view = IMB_colormanagement_view_get_named_index(view_settings->view_transform);
+ cache_view_settings->look = look;
cache_view_settings->view = view;
cache_view_settings->exposure = view_settings->exposure;
cache_view_settings->gamma = view_settings->gamma;
+ cache_view_settings->dither = ibuf->dither;
cache_view_settings->flag = view_settings->flag;
cache_view_settings->curve_mapping = view_settings->curve_mapping;
}
@@ -364,8 +384,10 @@ static unsigned char *colormanage_cache_get(ImBuf *ibuf, const ColormanageCacheV
*/
cache_data = colormanage_cachedata_get(cache_ibuf);
- if (cache_data->exposure != view_settings->exposure ||
+ if (cache_data->look != view_settings->look ||
+ cache_data->exposure != view_settings->exposure ||
cache_data->gamma != view_settings->gamma ||
+ cache_data->dither != view_settings->dither ||
cache_data->flag != view_settings->flag ||
cache_data->curve_mapping != curve_mapping ||
cache_data->curve_mapping_timestamp != curve_mapping_timestamp)
@@ -409,8 +431,10 @@ static void colormanage_cache_put(ImBuf *ibuf, const ColormanageCacheViewSetting
/* store data which is needed to check whether cached buffer could be used for color managed display settings */
cache_data = MEM_callocN(sizeof(ColormnaageCacheData), "color manage cache imbuf data");
+ cache_data->look = view_settings->look;
cache_data->exposure = view_settings->exposure;
cache_data->gamma = view_settings->gamma;
+ cache_data->dither = view_settings->dither;
cache_data->flag = view_settings->flag;
cache_data->curve_mapping = curve_mapping;
cache_data->curve_mapping_timestamp = curve_mapping_timestamp;
@@ -454,7 +478,8 @@ static void colormanage_role_color_space_name_get(OCIO_ConstConfigRcPtr *config,
static void colormanage_load_config(OCIO_ConstConfigRcPtr *config)
{
- int tot_colorspace, tot_display, tot_display_view, index, viewindex, viewindex2;
+ int tot_colorspace, tot_display, tot_display_view, tot_looks;
+ int index, viewindex, viewindex2;
const char *name;
/* get roles */
@@ -470,7 +495,7 @@ static void colormanage_load_config(OCIO_ConstConfigRcPtr *config)
for (index = 0 ; index < tot_colorspace; index++) {
OCIO_ConstColorSpaceRcPtr *ocio_colorspace;
const char *description;
- int is_invertible, is_data;
+ bool is_invertible, is_data;
name = OCIO_configGetColorSpaceNameByIndex(config, index);
@@ -519,6 +544,21 @@ static void colormanage_load_config(OCIO_ConstConfigRcPtr *config)
}
global_tot_display = tot_display;
+
+ /* load looks */
+ tot_looks = OCIO_configGetNumLooks(config);
+ colormanage_look_add("None", "", true);
+ for (index = 0; index < tot_looks; index++) {
+ OCIO_ConstLookRcPtr *ocio_look;
+ const char *process_space;
+
+ name = OCIO_configGetLookNameByIndex(config, index);
+ ocio_look = OCIO_configGetLook(config, name);
+ process_space = OCIO_lookGetProcessSpace(ocio_look);
+ OCIO_lookRelease(ocio_look);
+
+ colormanage_look_add(name, process_space, false);
+ }
}
static void colormanage_free_config(void)
@@ -566,6 +606,9 @@ static void colormanage_free_config(void)
/* free views */
BLI_freelistN(&global_views);
+ /* free looks */
+ BLI_freelistN(&global_looks);
+
OCIO_exit();
}
@@ -625,6 +668,12 @@ void colormanagement_exit(void)
if (global_glsl_state.processor)
OCIO_processorRelease(global_glsl_state.processor);
+ if (global_glsl_state.curve_mapping)
+ curvemapping_free(global_glsl_state.curve_mapping);
+
+ if (global_glsl_state.curve_mapping_settings.lut)
+ MEM_freeN(global_glsl_state.curve_mapping_settings.lut);
+
if (global_glsl_state.ocio_glsl_state)
OCIO_freeOGLState(global_glsl_state.ocio_glsl_state);
@@ -705,7 +754,8 @@ static ColorSpace *display_transform_get_colorspace(const ColorManagedViewSettin
return NULL;
}
-static OCIO_ConstProcessorRcPtr *create_display_buffer_processor(const char *view_transform,
+static OCIO_ConstProcessorRcPtr *create_display_buffer_processor(const char *look,
+ const char *view_transform,
const char *display,
float exposure, float gamma,
const char *from_colorspace)
@@ -713,6 +763,7 @@ static OCIO_ConstProcessorRcPtr *create_display_buffer_processor(const char *vie
OCIO_ConstConfigRcPtr *config = OCIO_getCurrentConfig();
OCIO_DisplayTransformRcPtr *dt;
OCIO_ConstProcessorRcPtr *processor;
+ ColorManagedLook *look_descr = colormanage_look_get_named(look);
dt = OCIO_createDisplayTransform();
@@ -720,6 +771,11 @@ static OCIO_ConstProcessorRcPtr *create_display_buffer_processor(const char *vie
OCIO_displayTransformSetView(dt, view_transform);
OCIO_displayTransformSetDisplay(dt, display);
+ if (look_descr->is_noop == false) {
+ OCIO_displayTransformSetLooksOverrideEnabled(dt, true);
+ OCIO_displayTransformSetLooksOverride(dt, look);
+ }
+
/* fstop exposure control */
if (exposure != 0.0f) {
OCIO_MatrixTransformRcPtr *mt;
@@ -871,6 +927,7 @@ static void init_default_view_settings(const ColorManagedDisplaySettings *displa
else
view_settings->view_transform[0] = '\0';
+ BLI_strncpy(view_settings->look, "None", sizeof(view_settings->look));
view_settings->flag = 0;
view_settings->gamma = 1.0f;
view_settings->exposure = 0.0f;
@@ -923,7 +980,7 @@ void colormanage_imbuf_make_linear(ImBuf *ibuf, const char *from_colorspace)
imb_freerectImBuf(ibuf);
IMB_colormanagement_transform(ibuf->rect_float, ibuf->x, ibuf->y, ibuf->channels,
- from_colorspace, to_colorspace, TRUE);
+ from_colorspace, to_colorspace, true);
}
}
@@ -953,6 +1010,7 @@ static void colormanage_check_view_settings(ColorManagedDisplaySettings *display
{
ColorManagedDisplay *display;
ColorManagedView *default_view = NULL;
+ ColorManagedLook *default_look = (ColorManagedLook *) global_looks.first;
if (view_settings->view_transform[0] == '\0') {
display = colormanage_display_get_named(display_settings->display_device);
@@ -981,6 +1039,19 @@ static void colormanage_check_view_settings(ColorManagedDisplaySettings *display
}
}
+ if (view_settings->look[0] == '\0') {
+ BLI_strncpy(view_settings->look, default_look->name, sizeof(view_settings->look));
+ }
+ else {
+ ColorManagedLook *look = colormanage_look_get_named(view_settings->look);
+ if (look == NULL) {
+ printf("Color management: %s look \"%s\" not found, setting default \"%s\".\n",
+ what, view_settings->look, default_look->name);
+
+ BLI_strncpy(view_settings->look, default_look->name, sizeof(view_settings->look));
+ }
+ }
+
/* OCIO_TODO: move to do_versions() */
if (view_settings->exposure == 0.0f && view_settings->gamma == 0.0f) {
view_settings->exposure = 0.0f;
@@ -1134,6 +1205,21 @@ void IMB_colormanagement_assign_rect_colorspace(ImBuf *ibuf, const char *name)
ibuf->colormanage_flag &= ~IMB_COLORMANAGE_IS_DATA;
}
+const char *IMB_colormanagement_get_float_colorspace(ImBuf *ibuf)
+{
+ if (ibuf->float_colorspace) {
+ return ibuf->float_colorspace->name;
+ }
+ else {
+ return IMB_colormanagement_role_colorspace_name_get(COLOR_ROLE_SCENE_LINEAR);
+ }
+}
+
+const char *IMB_colormanagement_get_rect_colorspace(ImBuf *ibuf)
+{
+ return ibuf->rect_colorspace->name;
+}
+
/*********************** Threaded display buffer transform routines *************************/
typedef struct DisplayBufferThread {
@@ -1151,7 +1237,7 @@ typedef struct DisplayBufferThread {
int channels;
float dither;
- int is_data;
+ bool is_data;
const char *byte_colorspace;
const char *float_colorspace;
@@ -1180,7 +1266,7 @@ static void display_buffer_init_handle(void *handle_v, int start_line, int tot_l
int channels = ibuf->channels;
float dither = ibuf->dither;
- int is_data = ibuf->colormanage_flag & IMB_COLORMANAGE_IS_DATA;
+ bool is_data = (ibuf->colormanage_flag & IMB_COLORMANAGE_IS_DATA) != 0;
int offset = channels * start_line * ibuf->x;
int display_buffer_byte_offset = DISPLAY_BUFFER_CHANNELS * start_line * ibuf->x;
@@ -1224,8 +1310,8 @@ static float *display_buffer_apply_get_linear_buffer(DisplayBufferThread *handle
int buffer_size = channels * width * height;
- int is_data = handle->is_data;
- int is_data_display = handle->cm_processor->is_data_result;
+ bool is_data = handle->is_data;
+ bool is_data_display = handle->cm_processor->is_data_result;
linear_buffer = MEM_callocN(buffer_size * sizeof(float), "color conversion linear buffer");
@@ -1258,7 +1344,7 @@ static float *display_buffer_apply_get_linear_buffer(DisplayBufferThread *handle
if (!is_data && !is_data_display) {
/* convert float buffer to scene linear space */
IMB_colormanagement_transform(linear_buffer, width, height, channels,
- from_colorspace, to_colorspace, FALSE);
+ from_colorspace, to_colorspace, false);
}
*is_straight_alpha = true;
@@ -1277,7 +1363,7 @@ static float *display_buffer_apply_get_linear_buffer(DisplayBufferThread *handle
if (!is_data && !is_data_display) {
IMB_colormanagement_transform(linear_buffer, width, height, channels,
- from_colorspace, to_colorspace, TRUE);
+ from_colorspace, to_colorspace, true);
}
*is_straight_alpha = false;
@@ -1310,7 +1396,7 @@ static void *do_display_buffer_apply_thread(void *handle_v)
int width = handle->width;
int height = handle->tot_line;
float dither = handle->dither;
- int is_data = handle->is_data;
+ bool is_data = handle->is_data;
if (cm_processor == NULL) {
if (display_buffer_byte) {
@@ -1403,8 +1489,8 @@ static void display_buffer_apply_threaded(ImBuf *ibuf, float *buffer, unsigned c
display_buffer_init_handle, do_display_buffer_apply_thread);
}
-static int is_ibuf_rect_in_display_space(ImBuf *ibuf, const ColorManagedViewSettings *view_settings,
- const ColorManagedDisplaySettings *display_settings)
+static bool is_ibuf_rect_in_display_space(ImBuf *ibuf, const ColorManagedViewSettings *view_settings,
+ const ColorManagedDisplaySettings *display_settings)
{
if ((view_settings->flag & COLORMANAGE_VIEW_USE_CURVES) == 0 &&
view_settings->exposure == 0.0f &&
@@ -1414,10 +1500,10 @@ static int is_ibuf_rect_in_display_space(ImBuf *ibuf, const ColorManagedViewSett
const char *to_colorspace = display_transform_get_colorspace_name(view_settings, display_settings);
if (to_colorspace && !strcmp(from_colorspace, to_colorspace))
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
static void colormanage_display_buffer_process_ex(ImBuf *ibuf, float *display_buffer, unsigned char *display_buffer_byte,
@@ -1425,7 +1511,7 @@ static void colormanage_display_buffer_process_ex(ImBuf *ibuf, float *display_bu
const ColorManagedDisplaySettings *display_settings)
{
ColormanageProcessor *cm_processor = NULL;
- int skip_transform = FALSE;
+ bool skip_transform = false;
/* if we're going to transform byte buffer, check whether transformation would
* happen to the same color space as byte buffer itself is
@@ -1436,7 +1522,7 @@ static void colormanage_display_buffer_process_ex(ImBuf *ibuf, float *display_bu
skip_transform = is_ibuf_rect_in_display_space(ibuf, view_settings, display_settings);
}
- if (skip_transform == FALSE)
+ if (skip_transform == false)
cm_processor = IMB_colormanagement_display_processor_new(view_settings, display_settings);
display_buffer_apply_threaded(ibuf, ibuf->rect_float, (unsigned char *) ibuf->rect,
@@ -1462,7 +1548,7 @@ typedef struct ProcessorTransformThread {
int start_line;
int tot_line;
int channels;
- int predivide;
+ bool predivide;
} ProcessorTransformThread;
typedef struct ProcessorTransformInit {
@@ -1471,7 +1557,7 @@ typedef struct ProcessorTransformInit {
int width;
int height;
int channels;
- int predivide;
+ bool predivide;
} ProcessorTransformInitData;
static void processor_transform_init_handle(void *handle_v, int start_line, int tot_line, void *init_data_v)
@@ -1481,7 +1567,7 @@ static void processor_transform_init_handle(void *handle_v, int start_line, int
int channels = init_data->channels;
int width = init_data->width;
- int predivide = init_data->predivide;
+ bool predivide = init_data->predivide;
int offset = channels * start_line * width;
@@ -1507,7 +1593,7 @@ static void *do_processor_transform_thread(void *handle_v)
int channels = handle->channels;
int width = handle->width;
int height = handle->tot_line;
- int predivide = handle->predivide;
+ bool predivide = handle->predivide;
IMB_colormanagement_processor_apply(handle->cm_processor, buffer, width, height, channels, predivide);
@@ -1515,7 +1601,7 @@ static void *do_processor_transform_thread(void *handle_v)
}
static void processor_transform_apply_threaded(float *buffer, int width, int height, int channels,
- ColormanageProcessor *cm_processor, int predivide)
+ ColormanageProcessor *cm_processor, bool predivide)
{
ProcessorTransformInitData init_data;
@@ -1534,7 +1620,7 @@ static void processor_transform_apply_threaded(float *buffer, int width, int hei
/* convert the whole buffer from specified by name color space to another - internal implementation */
static void colormanagement_transform_ex(float *buffer, int width, int height, int channels, const char *from_colorspace,
- const char *to_colorspace, int predivide, int do_threaded)
+ const char *to_colorspace, bool predivide, bool do_threaded)
{
ColormanageProcessor *cm_processor;
@@ -1561,18 +1647,18 @@ static void colormanagement_transform_ex(float *buffer, int width, int height, i
/* convert the whole buffer from specified by name color space to another */
void IMB_colormanagement_transform(float *buffer, int width, int height, int channels,
- const char *from_colorspace, const char *to_colorspace, int predivide)
+ const char *from_colorspace, const char *to_colorspace, bool predivide)
{
- colormanagement_transform_ex(buffer, width, height, channels, from_colorspace, to_colorspace, predivide, FALSE);
+ colormanagement_transform_ex(buffer, width, height, channels, from_colorspace, to_colorspace, predivide, false);
}
/* convert the whole buffer from specified by name color space to another
* will do threaded conversion
*/
void IMB_colormanagement_transform_threaded(float *buffer, int width, int height, int channels,
- const char *from_colorspace, const char *to_colorspace, int predivide)
+ const char *from_colorspace, const char *to_colorspace, bool predivide)
{
- colormanagement_transform_ex(buffer, width, height, channels, from_colorspace, to_colorspace, predivide, TRUE);
+ colormanagement_transform_ex(buffer, width, height, channels, from_colorspace, to_colorspace, predivide, true);
}
void IMB_colormanagement_transform_v4(float pixel[4], const char *from_colorspace, const char *to_colorspace)
@@ -1633,7 +1719,7 @@ void IMB_colormanagement_scene_linear_to_colorspace_v3(float pixel[3], ColorSpac
OCIO_processorApplyRGB(processor, pixel);
}
-void IMB_colormanagement_colorspace_to_scene_linear_v4(float pixel[4], int predivide, ColorSpace *colorspace)
+void IMB_colormanagement_colorspace_to_scene_linear_v4(float pixel[4], bool predivide, ColorSpace *colorspace)
{
OCIO_ConstProcessorRcPtr *processor;
@@ -1653,7 +1739,7 @@ void IMB_colormanagement_colorspace_to_scene_linear_v4(float pixel[4], int predi
}
}
-void IMB_colormanagement_colorspace_to_scene_linear(float *buffer, int width, int height, int channels, struct ColorSpace *colorspace, int predivide)
+void IMB_colormanagement_colorspace_to_scene_linear(float *buffer, int width, int height, int channels, struct ColorSpace *colorspace, bool predivide)
{
OCIO_ConstProcessorRcPtr *processor;
@@ -1732,7 +1818,7 @@ void IMB_colormanagement_pixel_to_display_space_v3(float result[3], const float
}
static void colormanagement_imbuf_make_display_space(ImBuf *ibuf, const ColorManagedViewSettings *view_settings,
- const ColorManagedDisplaySettings *display_settings, int make_byte)
+ const ColorManagedDisplaySettings *display_settings, bool make_byte)
{
if (!ibuf->rect && make_byte)
imb_addrectImBuf(ibuf);
@@ -1750,7 +1836,7 @@ static void colormanagement_imbuf_make_display_space(ImBuf *ibuf, const ColorMan
void IMB_colormanagement_imbuf_make_display_space(ImBuf *ibuf, const ColorManagedViewSettings *view_settings,
const ColorManagedDisplaySettings *display_settings)
{
- colormanagement_imbuf_make_display_space(ibuf, view_settings, display_settings, FALSE);
+ colormanagement_imbuf_make_display_space(ibuf, view_settings, display_settings, false);
}
/* prepare image buffer to be saved on disk, applying color management if needed
@@ -1764,14 +1850,14 @@ void IMB_colormanagement_imbuf_make_display_space(ImBuf *ibuf, const ColorManage
* in image format write callback and if float_colorspace is not NULL, no color
* space transformation should be applied on this buffer.
*/
-ImBuf *IMB_colormanagement_imbuf_for_write(ImBuf *ibuf, int save_as_render, int allocate_result, const ColorManagedViewSettings *view_settings,
+ImBuf *IMB_colormanagement_imbuf_for_write(ImBuf *ibuf, bool save_as_render, bool allocate_result, const ColorManagedViewSettings *view_settings,
const ColorManagedDisplaySettings *display_settings, ImageFormatData *image_format_data)
{
ImBuf *colormanaged_ibuf = ibuf;
- int do_colormanagement;
+ bool do_colormanagement;
bool is_movie = BKE_imtype_is_movie(image_format_data->imtype);
- int requires_linear_float = BKE_imtype_requires_linear_float(image_format_data->imtype);
- int do_alpha_under = image_format_data->planes != R_IMF_PLANES_RGBA;
+ bool requires_linear_float = BKE_imtype_requires_linear_float(image_format_data->imtype);
+ bool do_alpha_under = image_format_data->planes != R_IMF_PLANES_RGBA;
do_colormanagement = save_as_render && (is_movie || !requires_linear_float);
@@ -1827,7 +1913,7 @@ ImBuf *IMB_colormanagement_imbuf_for_write(ImBuf *ibuf, int save_as_render, int
}
if (do_colormanagement) {
- int make_byte = FALSE;
+ bool make_byte = false;
ImFileType *type;
/* for proper check whether byte buffer is required by a format or not
@@ -1840,10 +1926,10 @@ ImBuf *IMB_colormanagement_imbuf_for_write(ImBuf *ibuf, int save_as_render, int
* we need to allocate byte buffer and store color managed
* image there
*/
- for (type = IMB_FILE_TYPES; type->is_a; type++) {
+ for (type = IMB_FILE_TYPES; type < IMB_FILE_TYPES_LAST; type++) {
if (type->save && type->ftype(type, colormanaged_ibuf)) {
if ((type->flag & IM_FTYPE_FLOAT) == 0)
- make_byte = TRUE;
+ make_byte = true;
break;
}
@@ -1878,7 +1964,7 @@ void IMB_colormanagement_buffer_make_display_space(float *buffer, unsigned char
cm_processor = IMB_colormanagement_display_processor_new(view_settings, display_settings);
processor_transform_apply_threaded(display_buffer_float, width, height, channels,
- cm_processor, TRUE);
+ cm_processor, true);
IMB_buffer_byte_from_float(display_buffer, display_buffer_float,
channels, dither, IB_PROFILE_SRGB, IB_PROFILE_SRGB,
@@ -1955,7 +2041,7 @@ unsigned char *IMB_display_buffer_acquire(ImBuf *ibuf, const ColorManagedViewSet
return (unsigned char *) ibuf->rect;
}
- colormanage_view_settings_to_cache(&cache_view_settings, applied_view_settings);
+ colormanage_view_settings_to_cache(ibuf, &cache_view_settings, applied_view_settings);
colormanage_display_settings_to_cache(&cache_display_settings, display_settings);
if (ibuf->invalid_rect.xmin != ibuf->invalid_rect.xmax) {
@@ -1964,7 +2050,7 @@ unsigned char *IMB_display_buffer_acquire(ImBuf *ibuf, const ColorManagedViewSet
ibuf->x, 0, 0, applied_view_settings, display_settings,
ibuf->invalid_rect.xmin, ibuf->invalid_rect.ymin,
ibuf->invalid_rect.xmax, ibuf->invalid_rect.ymax,
- FALSE);
+ false);
}
BLI_rcti_init(&ibuf->invalid_rect, 0, 0, 0, 0);
@@ -2019,7 +2105,7 @@ unsigned char *IMB_display_buffer_acquire_ctx(const bContext *C, ImBuf *ibuf, vo
void IMB_display_buffer_transform_apply(unsigned char *display_buffer, float *linear_buffer, int width, int height,
int channels, const ColorManagedViewSettings *view_settings,
- const ColorManagedDisplaySettings *display_settings, int predivide)
+ const ColorManagedDisplaySettings *display_settings, bool predivide)
{
if (global_tot_display == 0 || global_tot_view == 0) {
IMB_buffer_byte_from_float(display_buffer, linear_buffer, channels, 0.0f, IB_PROFILE_SRGB, IB_PROFILE_LINEAR_RGB, FALSE,
@@ -2281,7 +2367,7 @@ static void colormanage_description_strip(char *description)
}
}
-ColorSpace *colormanage_colorspace_add(const char *name, const char *description, int is_invertible, int is_data)
+ColorSpace *colormanage_colorspace_add(const char *name, const char *description, bool is_invertible, bool is_data)
{
ColorSpace *colorspace, *prev_space;
int counter = 1;
@@ -2342,7 +2428,7 @@ ColorSpace *colormanage_colorspace_get_roled(int role)
ColorSpace *colormanage_colorspace_get_indexed(int index)
{
- /* display indices are 1-based */
+ /* color space indices are 1-based */
return BLI_findlink(&global_colorspaces, index - 1);
}
@@ -2376,7 +2462,7 @@ void IMB_colormanagment_colorspace_from_ibuf_ftype(ColorManagedColorspaceSetting
{
ImFileType *type;
- for (type = IMB_FILE_TYPES; type->is_a; type++) {
+ for (type = IMB_FILE_TYPES; type < IMB_FILE_TYPES_LAST; type++) {
if (type->save && type->ftype(type, ibuf)) {
const char *role_colorspace;
@@ -2387,6 +2473,71 @@ void IMB_colormanagment_colorspace_from_ibuf_ftype(ColorManagedColorspaceSetting
}
}
+/*********************** Looks functions *************************/
+
+ColorManagedLook *colormanage_look_add(const char *name, const char *process_space, bool is_noop)
+{
+ ColorManagedLook *look;
+ int index = global_tot_looks;
+
+ look = MEM_callocN(sizeof(ColorManagedLook), "ColorManagedLook");
+ look->index = index + 1;
+ BLI_strncpy(look->name, name, sizeof(look->name));
+ BLI_strncpy(look->process_space, process_space, sizeof(look->process_space));
+ look->is_noop = is_noop;
+
+ BLI_addtail(&global_looks, look);
+
+ global_tot_looks++;
+
+ return look;
+}
+
+ColorManagedLook *colormanage_look_get_named(const char *name)
+{
+ ColorManagedLook *look;
+
+ for (look = global_looks.first; look; look = look->next) {
+ if (!strcmp(look->name, name)) {
+ return look;
+ }
+ }
+
+ return NULL;
+}
+
+ColorManagedLook *colormanage_look_get_indexed(int index)
+{
+ /* look indices are 1-based */
+ return BLI_findlink(&global_looks, index - 1);
+}
+
+int IMB_colormanagement_look_get_named_index(const char *name)
+{
+ ColorManagedLook *look;
+
+ look = colormanage_look_get_named(name);
+
+ if (look) {
+ return look->index;
+ }
+
+ return 0;
+}
+
+const char *IMB_colormanagement_look_get_indexed_name(int index)
+{
+ ColorManagedLook *look;
+
+ look = colormanage_look_get_indexed(index);
+
+ if (look) {
+ return look->name;
+ }
+
+ return NULL;
+}
+
/*********************** RNA helper functions *************************/
void IMB_colormanagement_display_items_add(EnumPropertyItem **items, int *totitem)
@@ -2435,6 +2586,23 @@ void IMB_colormanagement_view_items_add(EnumPropertyItem **items, int *totitem,
}
}
+void IMB_colormanagement_look_items_add(struct EnumPropertyItem **items, int *totitem)
+{
+ ColorManagedLook *look;
+
+ for (look = global_looks.first; look; look = look->next) {
+ EnumPropertyItem item;
+
+ item.value = look->index;
+ item.name = look->name;
+ item.identifier = look->name;
+ item.icon = 0;
+ item.description = "";
+
+ RNA_enum_item_add(items, totitem, &item);
+ }
+}
+
void IMB_colormanagement_colorspace_items_add(EnumPropertyItem **items, int *totitem)
{
ColorSpace *colorspace;
@@ -2480,7 +2648,7 @@ static void partial_buffer_update_rect(ImBuf *ibuf, unsigned char *display_buffe
float *display_buffer_float = NULL;
const int width = xmax - xmin;
const int height = ymax - ymin;
- int is_data = ibuf->colormanage_flag & IMB_COLORMANAGE_IS_DATA;
+ bool is_data = (ibuf->colormanage_flag & IMB_COLORMANAGE_IS_DATA) != 0;
if (dither != 0.0f) {
/* cm_processor is NULL in cases byte_buffer's space matches display
@@ -2561,7 +2729,7 @@ static void partial_buffer_update_rect(ImBuf *ibuf, unsigned char *display_buffe
void IMB_partial_display_buffer_update(ImBuf *ibuf, const float *linear_buffer, const unsigned char *byte_buffer,
int stride, int offset_x, int offset_y, const ColorManagedViewSettings *view_settings,
const ColorManagedDisplaySettings *display_settings,
- int xmin, int ymin, int xmax, int ymax, int update_orig_byte_buffer)
+ int xmin, int ymin, int xmax, int ymax, bool update_orig_byte_buffer)
{
if ((ibuf->rect && ibuf->rect_float) || update_orig_byte_buffer) {
/* update byte buffer created by legacy color management */
@@ -2584,7 +2752,7 @@ void IMB_partial_display_buffer_update(ImBuf *ibuf, const float *linear_buffer,
unsigned char *display_buffer = NULL;
int view_flag, display_index, buffer_width;
- colormanage_view_settings_to_cache(&cache_view_settings, view_settings);
+ colormanage_view_settings_to_cache(ibuf, &cache_view_settings, view_settings);
colormanage_display_settings_to_cache(&cache_display_settings, display_settings);
view_flag = 1 << (cache_view_settings.view - 1);
@@ -2608,7 +2776,7 @@ void IMB_partial_display_buffer_update(ImBuf *ibuf, const float *linear_buffer,
if (display_buffer) {
ColormanageProcessor *cm_processor = NULL;
- int skip_transform = 0;
+ bool skip_transform = false;
/* byte buffer is assumed to be in imbuf's rect space, so if byte buffer
* is known we could skip display->linear->display conversion in case
@@ -2667,13 +2835,16 @@ ColormanageProcessor *IMB_colormanagement_display_processor_new(const ColorManag
if (display_space)
cm_processor->is_data_result = display_space->is_data;
- cm_processor->processor = create_display_buffer_processor(applied_view_settings->view_transform, display_settings->display_device,
- applied_view_settings->exposure, applied_view_settings->gamma,
+ cm_processor->processor = create_display_buffer_processor(applied_view_settings->look,
+ applied_view_settings->view_transform,
+ display_settings->display_device,
+ applied_view_settings->exposure,
+ applied_view_settings->gamma,
global_role_scene_linear);
if (applied_view_settings->flag & COLORMANAGE_VIEW_USE_CURVES) {
cm_processor->curve_mapping = curvemapping_copy(applied_view_settings->curve_mapping);
- curvemapping_premultiply(cm_processor->curve_mapping, FALSE);
+ curvemapping_premultiply(cm_processor->curve_mapping, false);
}
return cm_processor;
@@ -2722,7 +2893,7 @@ void IMB_colormanagement_processor_apply_v3(ColormanageProcessor *cm_processor,
}
void IMB_colormanagement_processor_apply(ColormanageProcessor *cm_processor, float *buffer, int width, int height,
- int channels, int predivide)
+ int channels, bool predivide)
{
/* apply curve mapping */
if (cm_processor->curve_mapping) {
@@ -2771,35 +2942,112 @@ static bool check_glsl_display_processor_changed(const ColorManagedViewSettings
{
return !(global_glsl_state.exposure == view_settings->exposure &&
global_glsl_state.gamma == view_settings->gamma &&
+ STREQ(global_glsl_state.look, view_settings->look) &&
STREQ(global_glsl_state.view, view_settings->view_transform) &&
STREQ(global_glsl_state.display, display_settings->display_device) &&
STREQ(global_glsl_state.input, from_colorspace));
}
+static void curve_mapping_to_ocio_settings(CurveMapping *curve_mapping,
+ OCIO_CurveMappingSettings *curve_mapping_settings)
+{
+ int i;
+
+ curvemapping_initialize(curve_mapping);
+ curvemapping_premultiply(curve_mapping, false);
+ curvemapping_table_RGBA(curve_mapping,
+ &curve_mapping_settings->lut,
+ &curve_mapping_settings->lut_size);
+
+ for (i = 0; i < 4; i++) {
+ CurveMap *cuma = curve_mapping->cm + i;
+ curve_mapping_settings->use_extend_extrapolate[i] = (cuma->flag & CUMA_EXTEND_EXTRAPOLATE) != 0;
+ curve_mapping_settings->range[i] = cuma->range;
+ curve_mapping_settings->mintable[i] = cuma->mintable;
+ curve_mapping_settings->ext_in_x[i] = cuma->ext_in[0];
+ curve_mapping_settings->ext_in_y[i] = cuma->ext_in[1];
+ curve_mapping_settings->ext_out_x[i] = cuma->ext_out[0];
+ curve_mapping_settings->ext_out_y[i] = cuma->ext_out[1];
+ curve_mapping_settings->first_x[i] = cuma->table[0].x;
+ curve_mapping_settings->first_y[i] = cuma->table[0].y;
+ curve_mapping_settings->last_x[i] = cuma->table[CM_TABLE].x;
+ curve_mapping_settings->last_y[i] = cuma->table[CM_TABLE].y;
+ }
+
+ copy_v3_v3(curve_mapping_settings->black, curve_mapping->black);
+ copy_v3_v3(curve_mapping_settings->bwmul, curve_mapping->bwmul);
+
+ curve_mapping_settings->cache_id = (size_t) curve_mapping;
+}
+
static void update_glsl_display_processor(const ColorManagedViewSettings *view_settings,
const ColorManagedDisplaySettings *display_settings,
const char *from_colorspace)
{
+ bool use_curve_mapping = (view_settings->flag & COLORMANAGE_VIEW_USE_CURVES) != 0;
+ bool need_update = false;
+
+ need_update = global_glsl_state.processor == NULL ||
+ check_glsl_display_processor_changed(view_settings, display_settings, from_colorspace) ||
+ use_curve_mapping != global_glsl_state.use_curve_mapping;
+
+ if (use_curve_mapping && need_update == false) {
+ need_update |= view_settings->curve_mapping->changed_timestamp != global_glsl_state.curve_mapping_timestamp ||
+ view_settings->curve_mapping != global_glsl_state.orig_curve_mapping;
+ }
+
/* Update state if there's no processor yet or
* processor settings has been changed.
*/
- if (global_glsl_state.processor == NULL ||
- check_glsl_display_processor_changed(view_settings, display_settings, from_colorspace))
- {
+ if (need_update) {
+ OCIO_CurveMappingSettings *curve_mapping_settings = &global_glsl_state.curve_mapping_settings;
+ CurveMapping *new_curve_mapping = NULL;
+
/* Store settings of processor for further comparison. */
+ BLI_strncpy(global_glsl_state.look, view_settings->look, MAX_COLORSPACE_NAME);
BLI_strncpy(global_glsl_state.view, view_settings->view_transform, MAX_COLORSPACE_NAME);
BLI_strncpy(global_glsl_state.display, display_settings->display_device, MAX_COLORSPACE_NAME);
BLI_strncpy(global_glsl_state.input, from_colorspace, MAX_COLORSPACE_NAME);
global_glsl_state.exposure = view_settings->exposure;
global_glsl_state.gamma = view_settings->gamma;
+ /* We're using curve mapping's address as a acache ID,
+ * so we need to make sure re-allocation gives new address here.
+ * We do this by allocating new curve mapping before freeing ol one.
+ */
+ if (use_curve_mapping) {
+ new_curve_mapping = curvemapping_copy(view_settings->curve_mapping);
+ }
+
+ if (global_glsl_state.curve_mapping) {
+ curvemapping_free(global_glsl_state.curve_mapping);
+ MEM_freeN(curve_mapping_settings->lut);
+ global_glsl_state.curve_mapping = NULL;
+ curve_mapping_settings->lut = NULL;
+ }
+
+ /* Fill in OCIO's curve mapping settings. */
+ if (use_curve_mapping) {
+ curve_mapping_to_ocio_settings(new_curve_mapping, &global_glsl_state.curve_mapping_settings);
+
+ global_glsl_state.curve_mapping = new_curve_mapping;
+ global_glsl_state.curve_mapping_timestamp = view_settings->curve_mapping->changed_timestamp;
+ global_glsl_state.orig_curve_mapping = view_settings->curve_mapping;
+ global_glsl_state.use_curve_mapping = true;
+ }
+ else {
+ global_glsl_state.orig_curve_mapping = NULL;
+ global_glsl_state.use_curve_mapping = false;
+ }
+
/* Free old processor, if any. */
if (global_glsl_state.processor)
OCIO_processorRelease(global_glsl_state.processor);
/* We're using display OCIO processor, no RGB curves yet. */
global_glsl_state.processor =
- create_display_buffer_processor(global_glsl_state.view,
+ create_display_buffer_processor(global_glsl_state.look,
+ global_glsl_state.view,
global_glsl_state.display,
global_glsl_state.exposure,
global_glsl_state.gamma,
@@ -2807,6 +3055,11 @@ static void update_glsl_display_processor(const ColorManagedViewSettings *view_s
}
}
+bool IMB_colormanagement_support_glsl_draw(const ColorManagedViewSettings *UNUSED(view_settings))
+{
+ return OCIO_supportGLSLDraw();
+}
+
/**
* Configures GLSL shader for conversion from specified to
* display color space
@@ -2820,9 +3073,9 @@ static void update_glsl_display_processor(const ColorManagedViewSettings *view_s
* This is low-level function, use glaDrawImBuf_glsl_ctx if you
* only need to display given image buffer
*/
-int IMB_colormanagement_setup_glsl_draw_from_space(const ColorManagedViewSettings *view_settings,
- const ColorManagedDisplaySettings *display_settings,
- struct ColorSpace *from_colorspace, int predivide)
+bool IMB_colormanagement_setup_glsl_draw_from_space(const ColorManagedViewSettings *view_settings,
+ const ColorManagedDisplaySettings *display_settings,
+ struct ColorSpace *from_colorspace, bool predivide)
{
ColorManagedViewSettings default_view_settings;
const ColorManagedViewSettings *applied_view_settings;
@@ -2839,28 +3092,26 @@ int IMB_colormanagement_setup_glsl_draw_from_space(const ColorManagedViewSetting
applied_view_settings = &default_view_settings;
}
- /* RGB curves mapping is not supported on GPU yet. */
- if (applied_view_settings->flag & COLORMANAGE_VIEW_USE_CURVES)
- return FALSE;
-
/* Make sure OCIO processor is up-to-date. */
update_glsl_display_processor(applied_view_settings, display_settings,
from_colorspace ? from_colorspace->name : global_role_scene_linear);
- return OCIO_setupGLSLDraw(&global_glsl_state.ocio_glsl_state, global_glsl_state.processor, predivide);
+ return OCIO_setupGLSLDraw(&global_glsl_state.ocio_glsl_state, global_glsl_state.processor,
+ global_glsl_state.use_curve_mapping ? &global_glsl_state.curve_mapping_settings : NULL,
+ predivide);
}
/* Configures GLSL shader for conversion from scene linear to display space */
-int IMB_colormanagement_setup_glsl_draw(const ColorManagedViewSettings *view_settings,
- const ColorManagedDisplaySettings *display_settings,
- int predivide)
+bool IMB_colormanagement_setup_glsl_draw(const ColorManagedViewSettings *view_settings,
+ const ColorManagedDisplaySettings *display_settings,
+ bool predivide)
{
return IMB_colormanagement_setup_glsl_draw_from_space(view_settings, display_settings,
NULL, predivide);
}
/* Same as setup_glsl_draw_from_space, but color management settings are guessing from a given context */
-int IMB_colormanagement_setup_glsl_draw_from_space_ctx(const struct bContext *C, struct ColorSpace *from_colorspace, int predivide)
+bool IMB_colormanagement_setup_glsl_draw_from_space_ctx(const struct bContext *C, struct ColorSpace *from_colorspace, bool predivide)
{
ColorManagedViewSettings *view_settings;
ColorManagedDisplaySettings *display_settings;
@@ -2871,7 +3122,7 @@ int IMB_colormanagement_setup_glsl_draw_from_space_ctx(const struct bContext *C,
}
/* Same as setup_glsl_draw, but color management settings are guessing from a given context */
-int IMB_colormanagement_setup_glsl_draw_ctx(const bContext *C, int predivide)
+bool IMB_colormanagement_setup_glsl_draw_ctx(const bContext *C, bool predivide)
{
return IMB_colormanagement_setup_glsl_draw_from_space_ctx(C, NULL, predivide);
}
@@ -2897,7 +3148,7 @@ void IMB_colormanagement_finish_glsl_draw(void)
* When there's no need to apply transform on 2D textures, use
* IMB_colormanagement_finish_glsl_transform().
*/
-int IMB_colormanagement_setup_transform_from_role_glsl(int role, int predivide)
+bool IMB_colormanagement_setup_transform_from_role_glsl(int role, bool predivide)
{
OCIO_ConstProcessorRcPtr *processor;
ColorSpace *colorspace;
@@ -2906,7 +3157,7 @@ int IMB_colormanagement_setup_transform_from_role_glsl(int role, int predivide)
processor = colorspace_to_scene_linear_processor(colorspace);
- return OCIO_setupGLSLDraw(&global_glsl_state.transform_ocio_glsl_state, processor, predivide);
+ return OCIO_setupGLSLDraw(&global_glsl_state.transform_ocio_glsl_state, processor, NULL, predivide);
}
/* Finish GLSL-based color space conversion */
diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c
index 76a5e98da7e..af9f7109106 100644
--- a/source/blender/imbuf/intern/divers.c
+++ b/source/blender/imbuf/intern/divers.c
@@ -565,7 +565,7 @@ void IMB_rect_from_float(ImBuf *ibuf)
buffer = MEM_dupallocN(ibuf->rect_float);
/* first make float buffer in byte space */
- IMB_colormanagement_transform(buffer, ibuf->x, ibuf->y, ibuf->channels, from_colorspace, ibuf->rect_colorspace->name, TRUE);
+ IMB_colormanagement_transform(buffer, ibuf->x, ibuf->y, ibuf->channels, from_colorspace, ibuf->rect_colorspace->name, true);
/* convert from float's premul alpha to byte's straight alpha */
IMB_unpremultiply_rect_float(buffer, ibuf->planes, ibuf->x, ibuf->y);
@@ -657,7 +657,7 @@ void IMB_float_from_rect(ImBuf *ibuf)
/* then make float be in linear space */
IMB_colormanagement_colorspace_to_scene_linear(rect_float, ibuf->x, ibuf->y, ibuf->channels,
- ibuf->rect_colorspace, FALSE);
+ ibuf->rect_colorspace, false);
/* byte buffer is straight alpha, float should always be premul */
IMB_premultiply_rect_float(rect_float, ibuf->channels, ibuf->x, ibuf->y);
diff --git a/source/blender/imbuf/intern/filetype.c b/source/blender/imbuf/intern/filetype.c
index 37070c7e2bf..f9e05dbd6d6 100644
--- a/source/blender/imbuf/intern/filetype.c
+++ b/source/blender/imbuf/intern/filetype.c
@@ -35,6 +35,10 @@
#include "IMB_colormanagement.h"
+#ifdef WITH_OPENIMAGEIO
+#include "oiio/openimageio_api.h"
+#endif
+
#ifdef WITH_OPENEXR
#include "openexr/openexr_api.h"
#endif
@@ -71,41 +75,46 @@ void quicktime_exit(void);
#endif
ImFileType IMB_FILE_TYPES[] = {
- {NULL, NULL, imb_is_a_jpeg, imb_ftype_default, imb_load_jpeg, imb_savejpeg, NULL, 0, JPG, COLOR_ROLE_DEFAULT_BYTE},
- {NULL, NULL, imb_is_a_png, imb_ftype_default, imb_loadpng, imb_savepng, NULL, 0, PNG, COLOR_ROLE_DEFAULT_BYTE},
- {NULL, NULL, imb_is_a_bmp, imb_ftype_default, imb_bmp_decode, imb_savebmp, NULL, 0, BMP, COLOR_ROLE_DEFAULT_BYTE},
- {NULL, NULL, imb_is_a_targa, imb_ftype_default, imb_loadtarga, imb_savetarga, NULL, 0, TGA, COLOR_ROLE_DEFAULT_BYTE},
- {NULL, NULL, imb_is_a_iris, imb_ftype_iris, imb_loadiris, imb_saveiris, NULL, 0, IMAGIC, COLOR_ROLE_DEFAULT_BYTE},
+ {NULL, NULL, imb_is_a_jpeg, NULL, imb_ftype_default, imb_load_jpeg, NULL, imb_savejpeg, NULL, 0, JPG, COLOR_ROLE_DEFAULT_BYTE},
+ {NULL, NULL, imb_is_a_png, NULL, imb_ftype_default, imb_loadpng, NULL, imb_savepng, NULL, 0, PNG, COLOR_ROLE_DEFAULT_BYTE},
+ {NULL, NULL, imb_is_a_bmp, NULL, imb_ftype_default, imb_bmp_decode, NULL, imb_savebmp, NULL, 0, BMP, COLOR_ROLE_DEFAULT_BYTE},
+ {NULL, NULL, imb_is_a_targa, NULL, imb_ftype_default, imb_loadtarga, NULL, imb_savetarga, NULL, 0, TGA, COLOR_ROLE_DEFAULT_BYTE},
+ {NULL, NULL, imb_is_a_iris, NULL, imb_ftype_iris, imb_loadiris, NULL, imb_saveiris, NULL, 0, IMAGIC, COLOR_ROLE_DEFAULT_BYTE},
#ifdef WITH_CINEON
- {NULL, NULL, imb_is_dpx, imb_ftype_default, imb_load_dpx, imb_save_dpx, NULL, IM_FTYPE_FLOAT, DPX, COLOR_ROLE_DEFAULT_FLOAT},
- {NULL, NULL, imb_is_cineon, imb_ftype_default, imb_load_cineon, imb_save_cineon, NULL, IM_FTYPE_FLOAT, CINEON, COLOR_ROLE_DEFAULT_FLOAT},
+ {NULL, NULL, imb_is_dpx, NULL, imb_ftype_default, imb_load_dpx, NULL, imb_save_dpx, NULL, IM_FTYPE_FLOAT, DPX, COLOR_ROLE_DEFAULT_FLOAT},
+ {NULL, NULL, imb_is_cineon, NULL, imb_ftype_default, imb_load_cineon, NULL, imb_save_cineon, NULL, IM_FTYPE_FLOAT, CINEON, COLOR_ROLE_DEFAULT_FLOAT},
#endif
#ifdef WITH_TIFF
- {imb_inittiff, NULL, imb_is_a_tiff, imb_ftype_default, imb_loadtiff, imb_savetiff, imb_loadtiletiff, 0, TIF, COLOR_ROLE_DEFAULT_BYTE},
+ {imb_inittiff, NULL, imb_is_a_tiff, NULL, imb_ftype_default, imb_loadtiff, NULL, imb_savetiff, imb_loadtiletiff, 0, TIF, COLOR_ROLE_DEFAULT_BYTE},
#endif
#ifdef WITH_HDR
- {NULL, NULL, imb_is_a_hdr, imb_ftype_default, imb_loadhdr, imb_savehdr, NULL, IM_FTYPE_FLOAT, RADHDR, COLOR_ROLE_DEFAULT_FLOAT},
+ {NULL, NULL, imb_is_a_hdr, NULL, imb_ftype_default, imb_loadhdr, NULL, imb_savehdr, NULL, IM_FTYPE_FLOAT, RADHDR, COLOR_ROLE_DEFAULT_FLOAT},
#endif
#ifdef WITH_OPENEXR
- {imb_initopenexr, NULL, imb_is_a_openexr, imb_ftype_default, imb_load_openexr, imb_save_openexr, NULL, IM_FTYPE_FLOAT, OPENEXR, COLOR_ROLE_DEFAULT_FLOAT},
+ {imb_initopenexr, NULL, imb_is_a_openexr, NULL, imb_ftype_default, imb_load_openexr, NULL, imb_save_openexr, NULL, IM_FTYPE_FLOAT, OPENEXR, COLOR_ROLE_DEFAULT_FLOAT},
#endif
#ifdef WITH_OPENJPEG
- {NULL, NULL, imb_is_a_jp2, imb_ftype_default, imb_jp2_decode, imb_savejp2, NULL, IM_FTYPE_FLOAT, JP2, COLOR_ROLE_DEFAULT_BYTE},
+ {NULL, NULL, imb_is_a_jp2, NULL, imb_ftype_default, imb_jp2_decode, NULL, imb_savejp2, NULL, IM_FTYPE_FLOAT, JP2, COLOR_ROLE_DEFAULT_BYTE},
#endif
#ifdef WITH_DDS
- {NULL, NULL, imb_is_a_dds, imb_ftype_default, imb_load_dds, NULL, NULL, 0, DDS, COLOR_ROLE_DEFAULT_BYTE},
+ {NULL, NULL, imb_is_a_dds, NULL, imb_ftype_default, imb_load_dds, NULL, NULL, NULL, 0, DDS, COLOR_ROLE_DEFAULT_BYTE},
#endif
#ifdef WITH_QUICKTIME
- {quicktime_init, quicktime_exit, imb_is_a_quicktime, imb_ftype_quicktime, imb_quicktime_decode, NULL, NULL, 0, QUICKTIME, COLOR_ROLE_DEFAULT_BYTE},
+ {quicktime_init, quicktime_exit, imb_is_a_quicktime, NULL, imb_ftype_quicktime, imb_quicktime_decode, NULL, NULL, 0, QUICKTIME, COLOR_ROLE_DEFAULT_BYTE},
+#endif
+#ifdef WITH_OPENIMAGEIO
+ {NULL, NULL, NULL, imb_is_a_photoshop, imb_ftype_default, NULL, imb_load_photoshop, NULL, NULL, IM_FTYPE_FLOAT, PSD, COLOR_ROLE_DEFAULT_FLOAT},
#endif
- {NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0}
+ {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0}
};
-
+
+ImFileType *IMB_FILE_TYPES_LAST = &IMB_FILE_TYPES[sizeof(IMB_FILE_TYPES) / sizeof(ImFileType) - 1];
+
void imb_filetypes_init(void)
{
ImFileType *type;
- for (type = IMB_FILE_TYPES; type->is_a; type++)
+ for (type = IMB_FILE_TYPES; type < IMB_FILE_TYPES_LAST; type++)
if (type->init)
type->init();
}
@@ -114,7 +123,7 @@ void imb_filetypes_exit(void)
{
ImFileType *type;
- for (type = IMB_FILE_TYPES; type->is_a; type++)
+ for (type = IMB_FILE_TYPES; type < IMB_FILE_TYPES_LAST; type++)
if (type->exit)
type->exit();
}
diff --git a/source/blender/imbuf/intern/imageprocess.c b/source/blender/imbuf/intern/imageprocess.c
index 26dd0f2977a..bde17e17419 100644
--- a/source/blender/imbuf/intern/imageprocess.c
+++ b/source/blender/imbuf/intern/imageprocess.c
@@ -359,17 +359,21 @@ void IMB_alpha_under_color_byte(unsigned char *rect, int x, int y, float backcol
unsigned char *cp = rect;
while (a--) {
- if (cp[3] == 0) {
+ if (cp[3] == 255) {
+ /* pass */
+ }
+ else if (cp[3] == 0) {
cp[0] = backcol[0] * 255;
cp[1] = backcol[1] * 255;
cp[2] = backcol[2] * 255;
}
else {
- int mul = 255 - cp[3];
+ float alpha = cp[3] / 255.0;
+ float mul = 1.0f - alpha;
- cp[0] = (cp[0] * cp[3] >> 8) + mul * backcol[0] / 255;
- cp[1] = (cp[1] * cp[3] >> 8) + mul * backcol[1] / 255;
- cp[2] = (cp[2] * cp[3] >> 8) + mul * backcol[2] / 255;
+ cp[0] = (cp[0] * alpha) + mul * backcol[0];
+ cp[1] = (cp[1] * alpha) + mul * backcol[1];
+ cp[2] = (cp[2] * alpha) + mul * backcol[2];
}
cp[3] = 255;
diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c
index 7acfe8a9dd1..49a40c461ac 100644
--- a/source/blender/imbuf/intern/indexer.c
+++ b/source/blender/imbuf/intern/indexer.c
@@ -22,6 +22,10 @@
* ***** END GPL LICENSE BLOCK *****
*/
+/** \file blender/imbuf/intern/indexer.c
+ * \ingroup imbuf
+ */
+
#include <stdlib.h>
#include "MEM_guardedalloc.h"
@@ -51,12 +55,12 @@
#endif
-static char magic[] = "BlenMIdx";
-static char temp_ext[] = "_part";
+static const char magic[] = "BlenMIdx";
+static const char temp_ext[] = "_part";
-static int proxy_sizes[] = { IMB_PROXY_25, IMB_PROXY_50, IMB_PROXY_75,
+static const int proxy_sizes[] = { IMB_PROXY_25, IMB_PROXY_50, IMB_PROXY_75,
IMB_PROXY_100 };
-static float proxy_fac[] = { 0.25, 0.50, 0.75, 1.00 };
+static const float proxy_fac[] = { 0.25, 0.50, 0.75, 1.00 };
#ifdef WITH_FFMPEG
static int tc_types[] = {IMB_TC_RECORD_RUN,
@@ -652,7 +656,6 @@ static int add_to_proxy_output_ffmpeg(
static void free_proxy_output_ffmpeg(struct proxy_output_ctx *ctx,
int rollback)
{
- int i;
char fname[FILE_MAX];
char fname_tmp[FILE_MAX];
@@ -670,18 +673,12 @@ static void free_proxy_output_ffmpeg(struct proxy_output_ctx *ctx,
avcodec_close(ctx->c);
- for (i = 0; i < ctx->of->nb_streams; i++) {
- if (&ctx->of->streams[i]) {
- av_freep(&ctx->of->streams[i]);
- }
- }
-
if (ctx->of->oformat) {
if (!(ctx->of->oformat->flags & AVFMT_NOFILE)) {
avio_close(ctx->of->pb);
}
}
- av_free(ctx->of);
+ avformat_free_context(ctx->of);
MEM_freeN(ctx->video_buffer);
@@ -850,6 +847,9 @@ static void index_rebuild_ffmpeg_finish(FFmpegIndexBuilderContext *context, int
}
}
+ avcodec_close(context->iCodecCtx);
+ avformat_close_input(&context->iFormatCtx);
+
MEM_freeN(context);
}
diff --git a/source/blender/imbuf/intern/indexer_dv.c b/source/blender/imbuf/intern/indexer_dv.c
index 7a8f8fcc752..4e8c13d2e99 100644
--- a/source/blender/imbuf/intern/indexer_dv.c
+++ b/source/blender/imbuf/intern/indexer_dv.c
@@ -22,6 +22,10 @@
* ***** END GPL LICENSE BLOCK *****
*/
+/** \file blender/imbuf/intern/indexer_dv.c
+ * \ingroup imbuf
+ */
+
#include "MEM_guardedalloc.h"
#include "BLI_utildefines.h"
diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c
index 38caf224c42..a31ed5e7420 100644
--- a/source/blender/imbuf/intern/jpeg.c
+++ b/source/blender/imbuf/intern/jpeg.c
@@ -59,11 +59,7 @@
#define IS_maxjpg(x) ((x->ftype & JPG_MSK) == JPG_MAX)
/* the types are from the jpeg lib */
-static void jpeg_error(j_common_ptr cinfo)
-#ifdef __GNUC__
-__attribute__((noreturn))
-#endif
-;
+static void jpeg_error(j_common_ptr cinfo) ATTR_NORETURN;
static void init_source(j_decompress_ptr cinfo);
static boolean fill_input_buffer(j_decompress_ptr cinfo);
static void skip_input_data(j_decompress_ptr cinfo, long num_bytes);
diff --git a/source/blender/imbuf/intern/metadata.c b/source/blender/imbuf/intern/metadata.c
index fed55c05eea..2b4367528dd 100644
--- a/source/blender/imbuf/intern/metadata.c
+++ b/source/blender/imbuf/intern/metadata.c
@@ -63,21 +63,21 @@ void IMB_metadata_free(struct ImBuf *img)
}
}
-int IMB_metadata_get_field(struct ImBuf *img, const char *key, char *field, const size_t len)
+bool IMB_metadata_get_field(struct ImBuf *img, const char *key, char *field, const size_t len)
{
ImMetaData *info;
- int retval = 0;
+ bool retval = false;
if (!img)
- return 0;
+ return false;
if (!img->metadata) {
- return 0;
+ return false;
}
info = img->metadata;
while (info) {
if (strcmp(key, info->key) == 0) {
BLI_strncpy(field, info->value, len);
- retval = 1;
+ retval = true;
break;
}
info = info->next;
@@ -85,13 +85,13 @@ int IMB_metadata_get_field(struct ImBuf *img, const char *key, char *field, cons
return retval;
}
-int IMB_metadata_add_field(struct ImBuf *img, const char *key, const char *value)
+bool IMB_metadata_add_field(struct ImBuf *img, const char *key, const char *value)
{
ImMetaData *info;
ImMetaData *last;
if (!img)
- return 0;
+ return false;
if (!img->metadata) {
img->metadata = MEM_callocN(sizeof(ImMetaData), "ImMetaData");
@@ -109,15 +109,15 @@ int IMB_metadata_add_field(struct ImBuf *img, const char *key, const char *value
}
info->key = BLI_strdup(key);
info->value = BLI_strdup(value);
- return 1;
+ return true;
}
-int IMB_metadata_del_field(struct ImBuf *img, const char *key)
+bool IMB_metadata_del_field(struct ImBuf *img, const char *key)
{
ImMetaData *p, *p1;
if ((!img) || (!img->metadata))
- return (0);
+ return false;
p = img->metadata;
p1 = NULL;
@@ -131,20 +131,20 @@ int IMB_metadata_del_field(struct ImBuf *img, const char *key)
MEM_freeN(p->key);
MEM_freeN(p->value);
MEM_freeN(p);
- return (1);
+ return true;
}
p1 = p;
p = p->next;
}
- return (0);
+ return false;
}
-int IMB_metadata_change_field(struct ImBuf *img, const char *key, const char *field)
+bool IMB_metadata_change_field(struct ImBuf *img, const char *key, const char *field)
{
ImMetaData *p;
if (!img)
- return (0);
+ return false;
if (!img->metadata)
return (IMB_metadata_add_field(img, key, field));
@@ -154,7 +154,7 @@ int IMB_metadata_change_field(struct ImBuf *img, const char *key, const char *fi
if (!strcmp(key, p->key)) {
MEM_freeN(p->value);
p->value = BLI_strdup(field);
- return (1);
+ return true;
}
p = p->next;
}
diff --git a/source/blender/imbuf/intern/oiio/CMakeLists.txt b/source/blender/imbuf/intern/oiio/CMakeLists.txt
new file mode 100644
index 00000000000..5fb8f11602e
--- /dev/null
+++ b/source/blender/imbuf/intern/oiio/CMakeLists.txt
@@ -0,0 +1,54 @@
+# ***** BEGIN GPL LICENSE BLOCK *****
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# The Original Code is Copyright (C) 2013, Blender Foundation
+# All rights reserved.
+#
+# The Original Code is: all of this file.
+#
+# Contributor(s):
+#
+# ***** END GPL LICENSE BLOCK *****
+
+set(INC
+ .
+ ..
+ ../..
+ ../../../blenkernel
+ ../../../blenlib
+ ../../../makesdna
+ ../../../../../intern/guardedalloc
+ ../../../../../intern/utfconv
+)
+
+set(INC_SYS
+
+)
+
+set(SRC
+ openimageio_api.h
+
+ openimageio_api.cpp
+)
+
+if(WITH_OPENIMAGEIO)
+ list(APPEND INC_SYS
+ ${OPENIMAGEIO_INCLUDE_DIRS}
+ )
+ add_definitions(-DWITH_OPENIMAGEIO)
+endif()
+
+blender_add_lib(bf_imbuf_openimageio "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/imbuf/intern/oiio/SConscript b/source/blender/imbuf/intern/oiio/SConscript
new file mode 100644
index 00000000000..82b47e9c46b
--- /dev/null
+++ b/source/blender/imbuf/intern/oiio/SConscript
@@ -0,0 +1,49 @@
+#!/usr/bin/env python
+#
+# ***** BEGIN GPL LICENSE BLOCK *****
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# The Original Code is Copyright (C) 2013, Blender Foundation
+# All rights reserved.
+#
+# The Original Code is: all of this file.
+#
+# Contributor(s):
+#
+# ***** END GPL LICENSE BLOCK *****
+
+Import ('env')
+
+source_files = ['openimageio_api.cpp']
+
+incs = ['.',
+ '../../../blenkernel',
+ '../../',
+ '..',
+ '../../../blenlib',
+ 'intern/include',
+ '#/intern/guardedalloc',
+ '../../../makesdna',
+ '#/intern/utfconv']
+
+incs += Split(env['BF_OIIO_INC'])
+
+defs = ['WITH_OPENIMAGEIO']
+
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
+ incs.append(env['BF_PTHREADS_INC'])
+
+env.BlenderLib ('bf_imbuf_openimageio', source_files, incs, defs, libtype=['core','player'], priority = [225,180])
diff --git a/source/blender/imbuf/intern/oiio/openimageio_api.cpp b/source/blender/imbuf/intern/oiio/openimageio_api.cpp
new file mode 100644
index 00000000000..fe74b8f7cce
--- /dev/null
+++ b/source/blender/imbuf/intern/oiio/openimageio_api.cpp
@@ -0,0 +1,280 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2013 Blender Foundation
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Dalai Felinto and Brecht van Lommel
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/imbuf/intern/oiio/openimageio_api.cpp
+ * \ingroup openimageio
+ */
+
+#include <set>
+
+#include <openimageio_api.h>
+#include <OpenImageIO/imageio.h>
+
+OIIO_NAMESPACE_USING
+
+#if defined(WIN32) && !defined(FREE_WINDOWS)
+#include "utfconv.h"
+#endif
+
+extern "C"
+{
+#include "MEM_guardedalloc.h"
+
+#include "BLI_blenlib.h"
+
+#include "IMB_imbuf_types.h"
+#include "IMB_imbuf.h"
+#include "IMB_allocimbuf.h"
+#include "IMB_colormanagement.h"
+#include "IMB_colormanagement_intern.h"
+}
+
+using namespace std;
+
+typedef unsigned char uchar;
+
+template <class T, class Q>
+static void fill_all_channels(T *pixels, int width, int height, int components, Q alpha)
+{
+ if (components == 2) {
+ for (int i = width * height - 1; i >= 0; i--) {
+ pixels[i * 4 + 3] = pixels[i * 2 + 1];
+ pixels[i * 4 + 2] = pixels[i * 2 + 0];
+ pixels[i * 4 + 1] = pixels[i * 2 + 0];
+ pixels[i * 4 + 0] = pixels[i * 2 + 0];
+ }
+ }
+ else if (components == 3) {
+ for (int i = width * height - 1; i >= 0; i--) {
+ pixels[i * 4 + 3] = alpha;
+ pixels[i * 4 + 2] = pixels[i * 3 + 2];
+ pixels[i * 4 + 1] = pixels[i * 3 + 1];
+ pixels[i * 4 + 0] = pixels[i * 3 + 0];
+
+ }
+ }
+ else if (components == 1) {
+ for (int i = width * height - 1; i >= 0; i--) {
+ pixels[i * 4 + 3] = alpha;
+ pixels[i * 4 + 2] = pixels[i];
+ pixels[i * 4 + 1] = pixels[i];
+ pixels[i * 4 + 0] = pixels[i];
+ }
+ }
+
+}
+
+static ImBuf *imb_oiio_load_image(ImageInput *in, int width, int height, int components, int flags, bool is_alpha)
+{
+ ImBuf *ibuf;
+ int scanlinesize = width * components * sizeof(uchar);
+
+ /* allocate the memory for the image */
+ ibuf = IMB_allocImBuf(width, height, is_alpha ? 32 : 24, flags | IB_rect);
+
+ try
+ {
+ if (!in->read_image(TypeDesc::UINT8,
+ (uchar *)ibuf->rect + (height - 1) * scanlinesize,
+ AutoStride,
+ -scanlinesize,
+ AutoStride))
+ {
+ std::cerr << __func__ << ": ImageInput::read_image() failed:" << std::endl
+ << in->geterror() << std::endl;
+
+ if (ibuf)
+ IMB_freeImBuf(ibuf);
+
+ return NULL;
+ }
+ }
+ catch (const std::exception &exc)
+ {
+ std::cerr << exc.what() << std::endl;
+ if (ibuf) IMB_freeImBuf(ibuf);
+
+ return NULL;
+ }
+
+ /* ImBuf always needs 4 channels */
+ fill_all_channels((uchar *)ibuf->rect, width, height, components, 0xFF);
+
+ return ibuf;
+}
+
+static ImBuf *imb_oiio_load_image_float(ImageInput *in, int width, int height, int components, int flags, bool is_alpha)
+{
+ ImBuf *ibuf;
+ int scanlinesize = width * components * sizeof(float);
+
+ /* allocate the memory for the image */
+ ibuf = IMB_allocImBuf(width, height, is_alpha ? 32 : 24, flags | IB_rectfloat);
+
+ try
+ {
+ if (!in->read_image(TypeDesc::FLOAT,
+ (uchar *)ibuf->rect_float + (height - 1) * scanlinesize,
+ AutoStride,
+ -scanlinesize,
+ AutoStride))
+ {
+ std::cerr << __func__ << ": ImageInput::read_image() failed:" << std::endl
+ << in->geterror() << std::endl;
+
+ if (ibuf)
+ IMB_freeImBuf(ibuf);
+
+ return NULL;
+ }
+ }
+ catch (const std::exception &exc)
+ {
+ std::cerr << exc.what() << std::endl;
+ if (ibuf) IMB_freeImBuf(ibuf);
+
+ return NULL;
+ }
+
+ /* ImBuf always needs 4 channels */
+ fill_all_channels((float *)ibuf->rect_float, width, height, components, 1.0f);
+
+ /* note: Photoshop 16 bit files never has alpha with it, so no need to handle associated/unassociated alpha */
+ return ibuf;
+}
+
+extern "C"
+{
+
+int imb_is_a_photoshop(const char *filename)
+{
+ const char *photoshop_extension[] = {
+ ".psd",
+ ".pdd",
+ ".psb",
+ NULL
+ };
+
+ return BLI_testextensie_array(filename, photoshop_extension);
+}
+
+int imb_save_photoshop(struct ImBuf *ibuf, const char *name, int flags)
+{
+ if (flags & IB_mem) {
+ printf("Photoshop PSD-save: Create PSD in memory CURRENTLY NOT SUPPORTED !\n");
+ imb_addencodedbufferImBuf(ibuf);
+ ibuf->encodedsize = 0;
+ return(0);
+ }
+
+ return(0);
+}
+
+struct ImBuf *imb_load_photoshop(const char *filename, int flags, char colorspace[IM_MAX_SPACE])
+{
+ ImageInput *in = NULL;
+ struct ImBuf *ibuf = NULL;
+ int width, height, components;
+ bool is_float, is_alpha;
+ TypeDesc typedesc;
+ int basesize;
+
+ /* load image from file through OIIO */
+ if (imb_is_a_photoshop(filename) == 0) return (NULL);
+
+ colorspace_set_default_role(colorspace, IM_MAX_SPACE, COLOR_ROLE_DEFAULT_BYTE);
+
+ in = ImageInput::create(filename);
+ if (!in) {
+ std::cerr << __func__ << ": ImageInput::create() failed:" << std::endl
+ << OpenImageIO::geterror() << std::endl;
+ return NULL;
+ }
+
+ ImageSpec spec, config;
+ config.attribute("oiio:UnassociatedAlpha", (int) 1);
+
+ if (!in->open(filename, spec, config)) {
+ std::cerr << __func__ << ": ImageInput::open() failed:" << std::endl
+ << in->geterror() << std::endl;
+ delete in;
+ return NULL;
+ }
+
+ string ics = spec.get_string_attribute("oiio:ColorSpace");
+ BLI_strncpy(colorspace, ics.c_str(), IM_MAX_SPACE);
+
+ width = spec.width;
+ height = spec.height;
+ components = spec.nchannels;
+ is_alpha = spec.alpha_channel != -1;
+ basesize = spec.format.basesize();
+ is_float = basesize > 1;
+
+ /* we only handle certain number of components */
+ if (!(components >= 1 && components <= 4)) {
+ if (in) {
+ in->close();
+ delete in;
+ }
+ return NULL;
+ }
+
+ if (is_float)
+ ibuf = imb_oiio_load_image_float(in, width, height, components, flags, is_alpha);
+ else
+ ibuf = imb_oiio_load_image(in, width, height, components, flags, is_alpha);
+
+ if (in) {
+ in->close();
+ delete in;
+ }
+
+ if (!ibuf)
+ return NULL;
+
+ /* ImBuf always needs 4 channels */
+ ibuf->ftype = PSD;
+ ibuf->channels = 4;
+ ibuf->planes = (3 + (is_alpha ? 1 : 0)) * 4 << basesize;
+
+ try
+ {
+ return ibuf;
+ }
+ catch (const std::exception &exc)
+ {
+ std::cerr << exc.what() << std::endl;
+ if (ibuf) IMB_freeImBuf(ibuf);
+
+ return NULL;
+ }
+}
+
+} // export "C"
+
+
diff --git a/source/blender/compositor/operations/COM_ConvertPremulToStraightOperation.h b/source/blender/imbuf/intern/oiio/openimageio_api.h
index 9d3ab156555..ad11f4bcfe3 100644
--- a/source/blender/compositor/operations/COM_ConvertPremulToStraightOperation.h
+++ b/source/blender/imbuf/intern/oiio/openimageio_api.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2012, Blender Foundation.
+ * ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -15,34 +15,39 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * Contributor:
- * Dalai Felinto
+ * The Original Code is Copyright (C) 2013 Blender Foundation
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s):
+ *
+ * ***** END GPL LICENSE BLOCK *****
*/
-#ifndef _COM_ConvertPremulToStraightOperation_h
-#define _COM_ConvertPremulToStraightOperation_h
-#include "COM_NodeOperation.h"
+/** \file blender/imbuf/intern/oiio/openimageio_api.h
+ * \ingroup openimageio
+ */
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class ConvertPremulToStraightOperation : public NodeOperation {
-private:
- SocketReader *m_inputColor;
-public:
- /**
- * Default constructor
- */
- ConvertPremulToStraightOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
- void initExecution();
- void deinitExecution();
-};
+#ifndef __OPENIMAGEIO_API_H__
+#define __OPENIMAGEIO_API_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdio.h>
+
+int imb_is_a_photoshop (const char *name);
+
+int imb_save_photoshop (struct ImBuf *ibuf, const char *name, int flags);
+
+struct ImBuf *imb_load_photoshop (const char *name, int flags, char *colorspace);
+
+#ifdef __cplusplus
+}
+
#endif
+
+#endif /* __OPENIMAGEIO_API_H__ */
diff --git a/source/blender/imbuf/intern/readimage.c b/source/blender/imbuf/intern/readimage.c
index d73fa9a7ab7..6988687e4ed 100644
--- a/source/blender/imbuf/intern/readimage.c
+++ b/source/blender/imbuf/intern/readimage.c
@@ -56,6 +56,53 @@
#include "IMB_colormanagement.h"
#include "IMB_colormanagement_intern.h"
+static void imb_handle_alpha(ImBuf *ibuf, int flags, char colorspace[IM_MAX_SPACE], char effective_colorspace[IM_MAX_SPACE])
+{
+ int alpha_flags;
+
+ if (colorspace) {
+ if (ibuf->rect) {
+ /* byte buffer is never internally converted to some standard space,
+ * store pointer to it's color space descriptor instead
+ */
+ ibuf->rect_colorspace = colormanage_colorspace_get_named(effective_colorspace);
+ }
+
+ BLI_strncpy(colorspace, effective_colorspace, IM_MAX_SPACE);
+ }
+
+ if (flags & IB_alphamode_detect)
+ alpha_flags = ibuf->flags & IB_alphamode_premul;
+ else
+ alpha_flags = flags & IB_alphamode_premul;
+
+ if (flags & IB_ignore_alpha) {
+ IMB_rectfill_alpha(ibuf, 1.0f);
+ }
+ else {
+ if (alpha_flags & IB_alphamode_premul) {
+ if (ibuf->rect) {
+ IMB_unpremultiply_alpha(ibuf);
+ }
+ else {
+ /* pass, floats are expected to be premul */
+ }
+ }
+ else {
+ if (ibuf->rect_float) {
+ IMB_premultiply_alpha(ibuf);
+ }
+ else {
+ /* pass, bytes are expected to be straight */
+ }
+ }
+ }
+
+ /* OCIO_TODO: in some cases it's faster to do threaded conversion,
+ * but how to distinguish such cases */
+ colormanage_imbuf_make_linear(ibuf, effective_colorspace);
+}
+
ImBuf *IMB_ibImageFromMemory(unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE], const char *descr)
{
ImBuf *ibuf;
@@ -70,54 +117,36 @@ ImBuf *IMB_ibImageFromMemory(unsigned char *mem, size_t size, int flags, char co
if (colorspace)
BLI_strncpy(effective_colorspace, colorspace, sizeof(effective_colorspace));
- for (type = IMB_FILE_TYPES; type->is_a; type++) {
+ for (type = IMB_FILE_TYPES; type < IMB_FILE_TYPES_LAST; type++) {
if (type->load) {
ibuf = type->load(mem, size, flags, effective_colorspace);
if (ibuf) {
- int alpha_flags;
-
- if (colorspace) {
- if (ibuf->rect) {
- /* byte buffer is never internally converted to some standard space,
- * store pointer to it's color space descriptor instead
- */
- ibuf->rect_colorspace = colormanage_colorspace_get_named(effective_colorspace);
- }
-
- BLI_strncpy(colorspace, effective_colorspace, IM_MAX_SPACE);
- }
-
- if (flags & IB_alphamode_detect)
- alpha_flags = ibuf->flags & IB_alphamode_premul;
- else
- alpha_flags = flags & IB_alphamode_premul;
-
- if (flags & IB_ignore_alpha) {
- IMB_rectfill_alpha(ibuf, 1.0f);
- }
- else {
- if (alpha_flags & IB_alphamode_premul) {
- if (ibuf->rect) {
- IMB_unpremultiply_alpha(ibuf);
- }
- else {
- /* pass, floats are expected to be premul */
- }
- }
- else {
- if (ibuf->rect_float) {
- IMB_premultiply_alpha(ibuf);
- }
- else {
- /* pass, bytes are expected to be straight */
- }
- }
- }
-
- /* OCIO_TODO: in some cases it's faster to do threaded conversion,
- * but how to distinguish such cases */
- colormanage_imbuf_make_linear(ibuf, effective_colorspace);
+ imb_handle_alpha(ibuf, flags, colorspace, effective_colorspace);
+ return ibuf;
+ }
+ }
+ }
+
+ if ((flags & IB_test) == 0)
+ fprintf(stderr, "%s: unknown fileformat (%s)\n", __func__, descr);
+
+ return NULL;
+}
+
+static ImBuf *IMB_ibImageFromFile(const char *filepath, int flags, char colorspace[IM_MAX_SPACE], const char *descr)
+{
+ ImBuf *ibuf;
+ ImFileType *type;
+ char effective_colorspace[IM_MAX_SPACE] = "";
+
+ if (colorspace)
+ BLI_strncpy(effective_colorspace, colorspace, sizeof(effective_colorspace));
+ for (type = IMB_FILE_TYPES; type < IMB_FILE_TYPES_LAST; type++) {
+ if (type->load_filepath) {
+ ibuf = type->load_filepath(filepath, flags, effective_colorspace);
+ if (ibuf) {
+ imb_handle_alpha(ibuf, flags, colorspace, effective_colorspace);
return ibuf;
}
}
@@ -129,7 +158,13 @@ ImBuf *IMB_ibImageFromMemory(unsigned char *mem, size_t size, int flags, char co
return NULL;
}
-ImBuf *IMB_loadifffile(int file, int flags, char colorspace[IM_MAX_SPACE], const char *descr)
+static bool imb_is_filepath_format(const char *filepath)
+{
+ /* return true if this is one of the formats that can't be loaded from memory */
+ return BLI_testextensie_array(filepath, imb_ext_image_filepath_only);
+}
+
+ImBuf *IMB_loadifffile(int file, const char *filepath, int flags, char colorspace[IM_MAX_SPACE], const char *descr)
{
ImBuf *ibuf;
unsigned char *mem;
@@ -137,6 +172,9 @@ ImBuf *IMB_loadifffile(int file, int flags, char colorspace[IM_MAX_SPACE], const
if (file == -1) return NULL;
+ if (imb_is_filepath_format(filepath))
+ return IMB_ibImageFromFile(filepath, flags, colorspace, descr);
+
size = BLI_file_descriptor_size(file);
mem = mmap(NULL, size, PROT_READ, MAP_SHARED, file, 0);
@@ -179,7 +217,7 @@ ImBuf *IMB_loadiffname(const char *filepath, int flags, char colorspace[IM_MAX_S
file = BLI_open(filepath_tx, O_BINARY | O_RDONLY, 0);
if (file < 0) return NULL;
- ibuf = IMB_loadifffile(file, flags, colorspace, filepath_tx);
+ ibuf = IMB_loadifffile(file, filepath, flags, colorspace, filepath_tx);
if (ibuf) {
BLI_strncpy(ibuf->name, filepath, sizeof(ibuf->name));
@@ -206,7 +244,7 @@ ImBuf *IMB_testiffname(const char *filepath, int flags)
file = BLI_open(filepath_tx, O_BINARY | O_RDONLY, 0);
if (file < 0) return NULL;
- ibuf = IMB_loadifffile(file, flags | IB_test | IB_multilayer, colorspace, filepath_tx);
+ ibuf = IMB_loadifffile(file, filepath, flags | IB_test | IB_multilayer, colorspace, filepath_tx);
if (ibuf) {
BLI_strncpy(ibuf->name, filepath, sizeof(ibuf->name));
@@ -234,7 +272,7 @@ static void imb_loadtilefile(ImBuf *ibuf, int file, int tx, int ty, unsigned int
return;
}
- for (type = IMB_FILE_TYPES; type->is_a; type++)
+ for (type = IMB_FILE_TYPES; type < IMB_FILE_TYPES_LAST; type++)
if (type->load_tile && type->ftype(type, ibuf))
type->load_tile(ibuf, mem, size, tx, ty, rect);
diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c
index eaba04c9310..05e9a4fa134 100644
--- a/source/blender/imbuf/intern/tiff.c
+++ b/source/blender/imbuf/intern/tiff.c
@@ -315,7 +315,7 @@ int imb_is_a_tiff(unsigned char *mem)
(memcmp(lil_endian, mem, IMB_TIFF_NCB) == 0) );
}
-static void scanline_contig_16bit(float *rectf, unsigned short *sbuf, int scanline_w, int spp)
+static void scanline_contig_16bit(float *rectf, const unsigned short *sbuf, int scanline_w, int spp)
{
int i;
for (i = 0; i < scanline_w; i++) {
@@ -326,7 +326,7 @@ static void scanline_contig_16bit(float *rectf, unsigned short *sbuf, int scanli
}
}
-static void scanline_contig_32bit(float *rectf, float *fbuf, int scanline_w, int spp)
+static void scanline_contig_32bit(float *rectf, const float *fbuf, int scanline_w, int spp)
{
int i;
for (i = 0; i < scanline_w; i++) {
@@ -337,14 +337,14 @@ static void scanline_contig_32bit(float *rectf, float *fbuf, int scanline_w, int
}
}
-static void scanline_separate_16bit(float *rectf, unsigned short *sbuf, int scanline_w, int chan)
+static void scanline_separate_16bit(float *rectf, const unsigned short *sbuf, int scanline_w, int chan)
{
int i;
for (i = 0; i < scanline_w; i++)
rectf[i * 4 + chan] = sbuf[i] / 65535.0;
}
-static void scanline_separate_32bit(float *rectf, float *fbuf, int scanline_w, int chan)
+static void scanline_separate_32bit(float *rectf, const float *fbuf, int scanline_w, int chan)
{
int i;
for (i = 0; i < scanline_w; i++)
diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c
index a4b0e61d544..ecf6458ac57 100644
--- a/source/blender/imbuf/intern/util.c
+++ b/source/blender/imbuf/intern/util.c
@@ -98,6 +98,16 @@ const char *imb_ext_image[] = {
#ifdef WITH_OPENEXR
".exr",
#endif
+#ifdef WITH_OPENIMAGEIO
+ ".psd", ".pdd", ".psb",
+#endif
+ NULL
+};
+
+const char *imb_ext_image_filepath_only[] = {
+#ifdef WITH_OPENIMAGEIO
+ ".psd", ".pdd", ".psb",
+#endif
NULL
};
@@ -188,9 +198,16 @@ static int IMB_ispic_name(const char *name)
if ((BIG_LONG(((int *)buf)[0]) & 0xfffffff0) == 0xffd8ffe0)
return JPG;
- for (type = IMB_FILE_TYPES; type->is_a; type++) {
- if (type->is_a(buf)) {
- return type->filetype;
+ for (type = IMB_FILE_TYPES; type < IMB_FILE_TYPES_LAST; type++) {
+ if (type->is_a) {
+ if (type->is_a(buf)) {
+ return type->filetype;
+ }
+ }
+ else if (type->is_a_filepath) {
+ if (type->is_a_filepath(name)) {
+ return type->filetype;
+ }
}
}
diff --git a/source/blender/imbuf/intern/writeimage.c b/source/blender/imbuf/intern/writeimage.c
index 5d785e08212..1519fc1990d 100644
--- a/source/blender/imbuf/intern/writeimage.c
+++ b/source/blender/imbuf/intern/writeimage.c
@@ -67,7 +67,7 @@ short IMB_saveiff(struct ImBuf *ibuf, const char *name, int flags)
if (ibuf == NULL) return (FALSE);
ibuf->flags = flags;
- for (type = IMB_FILE_TYPES; type->is_a; type++) {
+ for (type = IMB_FILE_TYPES; type < IMB_FILE_TYPES_LAST; type++) {
if (type->save && type->ftype(type, ibuf)) {
ImBuf *write_ibuf;
short result = FALSE;
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index 875e01f8037..1e145347bb3 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -235,7 +235,7 @@ typedef struct PreviewImage {
# undef GS
#endif
// #define GS(a) (*((short *)(a)))
-#define GS(a) (CHECK_TYPE_INLINE(a, const char), (*((short *)(a))))
+#define GS(a) (CHECK_TYPE_INLINE(a, const char *), (*((short *)(a))))
#define ID_NEW(a) if ( (a) && (a)->id.newid ) (a) = (void *)(a)->id.newid
#define ID_NEW_US(a) if ( (a)->id.newid) { (a) = (void *)(a)->id.newid; (a)->id.us++; }
diff --git a/source/blender/makesdna/DNA_color_types.h b/source/blender/makesdna/DNA_color_types.h
index 32a0629c338..50bbc04ccb1 100644
--- a/source/blender/makesdna/DNA_color_types.h
+++ b/source/blender/makesdna/DNA_color_types.h
@@ -162,6 +162,7 @@ typedef struct Scopes {
typedef struct ColorManagedViewSettings {
int flag, pad;
+ char look[64]; /* look which is being applied when displaying buffer on the screen (prior to view transform) */
char view_transform[64]; /* view transform which is being applied when displaying buffer on the screen */
float exposure; /* fstop exposure */
float gamma; /* post-display gamma transform */
diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h
index f1b7a7c3cc3..29e49a970d8 100644
--- a/source/blender/makesdna/DNA_constraint_types.h
+++ b/source/blender/makesdna/DNA_constraint_types.h
@@ -407,8 +407,10 @@ typedef struct bShrinkwrapConstraint {
struct Object *target;
float dist; /* distance to kept from target */
short shrinkType; /* shrink type (look on MOD shrinkwrap for values) */
- char projAxis; /* axis to project over UP_X, UP_Y, UP_Z */
- char pad[9];
+ char projAxis; /* axis to project/constrain */
+ char projAxisSpace; /* space to project axis in */
+ float projLimit; /* distance to search */
+ char pad[4];
} bShrinkwrapConstraint;
/* Follow Track constraints */
diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h
index 7ff8667f90e..f1a2cd68f28 100644
--- a/source/blender/makesdna/DNA_curve_types.h
+++ b/source/blender/makesdna/DNA_curve_types.h
@@ -184,12 +184,9 @@ typedef struct Curve {
struct Object *bevobj, *taperobj, *textoncurve;
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
- Path *path;
struct Key *key;
struct Material **mat;
- ListBase bev;
-
/* texture space, copied as one block in editobject.c */
float loc[3];
float size[3];
@@ -367,6 +364,8 @@ typedef enum eBezTriple_KeyframeType {
/* mixed with KEY_LINEAR but define here since only curve supports */
#define KEY_CU_EASE 3
+/* indicates point has been seen during surface duplication */
+#define SURF_SEEN 4
#endif
diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h
index e2863d6e465..f6516492b8f 100644
--- a/source/blender/makesdna/DNA_customdata_types.h
+++ b/source/blender/makesdna/DNA_customdata_types.h
@@ -73,50 +73,52 @@ typedef struct CustomData {
} CustomData;
/* CustomData.type */
-#define CD_MVERT 0
-#define CD_MSTICKY 1 /* DEPRECATED */
-#define CD_MDEFORMVERT 2
-#define CD_MEDGE 3
-#define CD_MFACE 4
-#define CD_MTFACE 5
-#define CD_MCOL 6
-#define CD_ORIGINDEX 7
-#define CD_NORMAL 8
-//#define CD_POLYINDEX 9
-#define CD_PROP_FLT 10
-#define CD_PROP_INT 11
-#define CD_PROP_STR 12
-#define CD_ORIGSPACE 13 /* for modifier stack face location mapping */
-#define CD_ORCO 14
-#define CD_MTEXPOLY 15
-#define CD_MLOOPUV 16
-#define CD_MLOOPCOL 17
-#define CD_TANGENT 18
-#define CD_MDISPS 19
-#define CD_PREVIEW_MCOL 20 /* for displaying weightpaint colors */
-#define CD_ID_MCOL 21
-#define CD_TEXTURE_MCOL 22
-#define CD_CLOTH_ORCO 23
-#define CD_RECAST 24
+enum {
+ CD_MVERT = 0,
+ CD_MSTICKY = 1, /* DEPRECATED */
+ CD_MDEFORMVERT = 2,
+ CD_MEDGE = 3,
+ CD_MFACE = 4,
+ CD_MTFACE = 5,
+ CD_MCOL = 6,
+ CD_ORIGINDEX = 7,
+ CD_NORMAL = 8,
+/* CD_POLYINDEX = 9, */
+ CD_PROP_FLT = 10,
+ CD_PROP_INT = 11,
+ CD_PROP_STR = 12,
+ CD_ORIGSPACE = 13, /* for modifier stack face location mapping */
+ CD_ORCO = 14,
+ CD_MTEXPOLY = 15,
+ CD_MLOOPUV = 16,
+ CD_MLOOPCOL = 17,
+ CD_TANGENT = 18,
+ CD_MDISPS = 19,
+ CD_PREVIEW_MCOL = 20, /* for displaying weightpaint colors */
+ CD_ID_MCOL = 21,
+ CD_TEXTURE_MCOL = 22,
+ CD_CLOTH_ORCO = 23,
+ CD_RECAST = 24,
/* BMESH ONLY START */
-#define CD_MPOLY 25
-#define CD_MLOOP 26
-#define CD_SHAPE_KEYINDEX 27
-#define CD_SHAPEKEY 28
-#define CD_BWEIGHT 29
-#define CD_CREASE 30
-#define CD_ORIGSPACE_MLOOP 31
-#define CD_PREVIEW_MLOOPCOL 32
-#define CD_BM_ELEM_PYPTR 33
+ CD_MPOLY = 25,
+ CD_MLOOP = 26,
+ CD_SHAPE_KEYINDEX = 27,
+ CD_SHAPEKEY = 28,
+ CD_BWEIGHT = 29,
+ CD_CREASE = 30,
+ CD_ORIGSPACE_MLOOP = 31,
+ CD_PREVIEW_MLOOPCOL = 32,
+ CD_BM_ELEM_PYPTR = 33,
/* BMESH ONLY END */
-#define CD_PAINT_MASK 34
-#define CD_GRID_PAINT_MASK 35
-#define CD_MVERT_SKIN 36
-#define CD_FREESTYLE_EDGE 37
-#define CD_FREESTYLE_FACE 38
-#define CD_NUMTYPES 39
+ CD_PAINT_MASK = 34,
+ CD_GRID_PAINT_MASK = 35,
+ CD_MVERT_SKIN = 36,
+ CD_FREESTYLE_EDGE = 37,
+ CD_FREESTYLE_FACE = 38,
+ CD_NUMTYPES = 39,
+};
/* Bits for CustomDataMask */
#define CD_MASK_MVERT (1 << CD_MVERT)
@@ -162,22 +164,22 @@ typedef struct CustomData {
#define CD_MASK_FREESTYLE_FACE (1LL << CD_FREESTYLE_FACE)
/* CustomData.flag */
-
-/* indicates layer should not be copied by CustomData_from_template or
- * CustomData_copy_data */
-#define CD_FLAG_NOCOPY (1<<0)
-/* indicates layer should not be freed (for layers backed by external data) */
-#define CD_FLAG_NOFREE (1<<1)
-/* indicates the layer is only temporary, also implies no copy */
-#define CD_FLAG_TEMPORARY ((1<<2)|CD_FLAG_NOCOPY)
-/* indicates the layer is stored in an external file */
-#define CD_FLAG_EXTERNAL (1<<3)
-/* indicates external data is read into memory */
-#define CD_FLAG_IN_MEMORY (1<<4)
+enum {
+ /* Indicates layer should not be copied by CustomData_from_template or CustomData_copy_data */
+ CD_FLAG_NOCOPY = (1 << 0),
+ /* Indicates layer should not be freed (for layers backed by external data) */
+ CD_FLAG_NOFREE = (1 << 1),
+ /* Indicates the layer is only temporary, also implies no copy */
+ CD_FLAG_TEMPORARY = ((1 << 2) | CD_FLAG_NOCOPY),
+ /* Indicates the layer is stored in an external file */
+ CD_FLAG_EXTERNAL = (1 << 3),
+ /* Indicates external data is read into memory */
+ CD_FLAG_IN_MEMORY = (1 << 4),
+};
/* Limits */
-#define MAX_MTFACE 8
-#define MAX_MCOL 8
+#define MAX_MTFACE 8
+#define MAX_MCOL 8
#ifdef __cplusplus
}
diff --git a/source/blender/makesdna/DNA_freestyle_types.h b/source/blender/makesdna/DNA_freestyle_types.h
index 738377b137e..db16fa37b86 100644
--- a/source/blender/makesdna/DNA_freestyle_types.h
+++ b/source/blender/makesdna/DNA_freestyle_types.h
@@ -28,6 +28,10 @@
#ifndef __DNA_FREESTYLE_TYPES_H__
#define __DNA_FREESTYLE_TYPES_H__
+/** \file DNA_freestyle_types.h
+ * \ingroup DNA
+ */
+
#include "DNA_listBase.h"
#ifdef __cplusplus
diff --git a/source/blender/makesdna/DNA_ipo_types.h b/source/blender/makesdna/DNA_ipo_types.h
index 3e641fba1ac..2699c6e576e 100644
--- a/source/blender/makesdna/DNA_ipo_types.h
+++ b/source/blender/makesdna/DNA_ipo_types.h
@@ -42,6 +42,8 @@
#include "DNA_ID.h"
+#include "BLI_compiler_attrs.h"
+
/* -------------------------- Type Defines --------------------------- */
/* sometimes used - mainly for GE/Ketsji */
diff --git a/source/blender/makesdna/DNA_key_types.h b/source/blender/makesdna/DNA_key_types.h
index 0a09a82b2bb..f5ce3c8d8c1 100644
--- a/source/blender/makesdna/DNA_key_types.h
+++ b/source/blender/makesdna/DNA_key_types.h
@@ -60,7 +60,6 @@ typedef struct KeyBlock {
int uid; /* for meshes only, match the unique number with the customdata layer */
void *data; /* array of shape key values, size is (Key->elemsize * KeyBlock->totelem) */
- float *weights; /* store an aligned array of weights from 'vgroup' */
char name[64]; /* MAX_NAME (unique name, user assigned) */
char vgroup[64]; /* MAX_VGROUP_NAME (optional vertex group), array gets allocated into 'weights' when set */
diff --git a/source/blender/makesdna/DNA_lattice_types.h b/source/blender/makesdna/DNA_lattice_types.h
index 837f0c354e6..242d6f0feeb 100644
--- a/source/blender/makesdna/DNA_lattice_types.h
+++ b/source/blender/makesdna/DNA_lattice_types.h
@@ -68,10 +68,6 @@ typedef struct Lattice {
struct MDeformVert *dvert;
char vgroup[64]; /* multiply the influence, MAX_VGROUP_NAME */
- /* used while deforming, always free and NULL after use */
- float *latticedata;
- float latmat[4][4];
-
struct EditLatt *editlatt;
} Lattice;
diff --git a/source/blender/makesdna/DNA_linestyle_types.h b/source/blender/makesdna/DNA_linestyle_types.h
index f5473d3d84a..19c4e057a96 100644
--- a/source/blender/makesdna/DNA_linestyle_types.h
+++ b/source/blender/makesdna/DNA_linestyle_types.h
@@ -28,6 +28,10 @@
#ifndef __DNA_LINESTYLE_TYPES_H__
#define __DNA_LINESTYLE_TYPES_H__
+/** \file DNA_linestyle_types.h
+ * \ingroup DNA
+ */
+
#include "DNA_listBase.h"
#include "DNA_ID.h"
diff --git a/source/blender/makesdna/DNA_mask_types.h b/source/blender/makesdna/DNA_mask_types.h
index 1b1c912d179..a72e287c16f 100644
--- a/source/blender/makesdna/DNA_mask_types.h
+++ b/source/blender/makesdna/DNA_mask_types.h
@@ -67,7 +67,7 @@ typedef struct MaskParent {
char sub_parent[64]; /* sub-entity of parent to which parenting happened
* in case of parenting to movie tracking data contains name of track */
float parent_orig[2]; /* track location at the moment of parenting,
- stored in mask space*/
+ * stored in mask space*/
float parent_corners_orig[4][2]; /* Original corners of plane track at the moment of parenting */
} MaskParent;
@@ -178,6 +178,7 @@ enum {
/* SpaceClip->mask_draw_flag */
#define MASK_DRAWFLAG_SMOOTH 1
+#define MASK_DRAWFLAG_OVERLAY 2
/* copy of eSpaceImage_UVDT */
/* SpaceClip->mask_draw_type */
@@ -188,6 +189,12 @@ enum {
MASK_DT_WHITE = 3
};
+/* MaskSpaceInfo->overlay_mode */
+enum {
+ MASK_OVERLAY_ALPHACHANNEL = 0,
+ MASK_OVERLAY_COMBINED = 1
+};
+
/* masklay->blend */
enum {
MASK_BLEND_ADD = 0,
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h
index e37d1368892..7cdb79232a9 100644
--- a/source/blender/makesdna/DNA_mesh_types.h
+++ b/source/blender/makesdna/DNA_mesh_types.h
@@ -79,7 +79,7 @@ typedef struct Mesh {
* real faces are now stored in nface.*/
struct MFace *mface; /* array of mesh object mode faces for tessellation */
struct MTFace *mtface; /* store tessellation face UV's and texture here */
- struct TFace *tface; /* depecrated, use mtface */
+ struct TFace *tface DNA_DEPRECATED; /* deprecated, use mtface */
struct MVert *mvert; /* array of verts */
struct MEdge *medge; /* array of edges */
struct MDeformVert *dvert; /* deformgroup vertices */
diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h
index 9f9bc25a61c..1114549f2da 100644
--- a/source/blender/makesdna/DNA_meshdata_types.h
+++ b/source/blender/makesdna/DNA_meshdata_types.h
@@ -42,7 +42,7 @@ struct Image;
typedef struct MFace {
unsigned int v1, v2, v3, v4;
short mat_nr;
- char edcode, flag; /* we keep edcode, for conversion to edges draw flags in old files */
+ char edcode, flag; /* we keep edcode, for conversion to edges draw flags in old files */
} MFace;
typedef struct MEdge {
@@ -52,44 +52,42 @@ typedef struct MEdge {
} MEdge;
typedef struct MDeformWeight {
- int def_nr;
- float weight;
+ int def_nr;
+ float weight;
} MDeformWeight;
typedef struct MDeformVert {
struct MDeformWeight *dw;
int totweight;
- int flag; /* flag only in use for weightpaint now */
+ int flag; /* flag only in use for weightpaint now */
} MDeformVert;
typedef struct MVert {
- float co[3];
- short no[3];
+ float co[3];
+ short no[3];
char flag, bweight;
} MVert;
/* tessellation vertex color data.
- * at the moment alpha is abused for vertex painting
- * and not used for transparency, note that red and blue are swapped */
+ * at the moment alpha is abused for vertex painting and not used for transparency, note that red and blue are swapped
+ */
typedef struct MCol {
char a, r, g, b;
} MCol;
-/* new face structure, replaces MFace, which is now
- * only used for storing tessellations.*/
+/* new face structure, replaces MFace, which is now only used for storing tessellations.*/
typedef struct MPoly {
/* offset into loop array and number of loops in the face */
int loopstart;
- int totloop; /* keep signed since we need to subtract when getting the previous loop */
+ int totloop; /* keep signed since we need to subtract when getting the previous loop */
short mat_nr;
char flag, pad;
} MPoly;
-/* the e here is because we want to move away from
- * relying on edge hashes.*/
+/* the e here is because we want to move away from relying on edge hashes.*/
typedef struct MLoop {
- unsigned int v; /*vertex index*/
- unsigned int e; /*edge index*/
+ unsigned int v; /* vertex index */
+ unsigned int e; /* edge index */
} MLoop;
typedef struct MTexPoly {
@@ -114,9 +112,11 @@ typedef struct MLoopUV {
} MLoopUV;
/*mloopuv->flag*/
-#define MLOOPUV_EDGESEL 1
-#define MLOOPUV_VERTSEL 2
-#define MLOOPUV_PINNED 4
+enum {
+ MLOOPUV_EDGESEL = (1 << 0),
+ MLOOPUV_VERTSEL = (1 << 1),
+ MLOOPUV_PINNED = (1 << 2),
+};
/**
* at the moment alpha is abused for vertex painting,
@@ -166,13 +166,13 @@ typedef struct MTFace {
/*Custom Data Properties*/
typedef struct MFloatProperty {
- float f;
+ float f;
} MFloatProperty;
typedef struct MIntProperty {
- int i;
+ int i;
} MIntProperty;
typedef struct MStringProperty {
- char s[255], s_len;
+ char s[255], s_len;
} MStringProperty;
typedef struct OrigSpaceFace {
@@ -188,11 +188,10 @@ typedef struct MDisps {
int totdisp;
int level;
float (*disps)[3];
-
- /* Used for hiding parts of a multires mesh. Essentially the multires
- * equivalent of MVert.flag's ME_HIDE bit.
- *
- * This is a bitmap, keep in sync with type used in BLI_bitmap.h */
+
+ /* Used for hiding parts of a multires mesh. Essentially the multires equivalent of MVert.flag's ME_HIDE bit.
+ * NOTE: This is a bitmap, keep in sync with type used in BLI_bitmap.h
+ */
unsigned int *hidden;
} MDisps;
@@ -200,15 +199,18 @@ typedef struct MDisps {
typedef struct MultiresCol {
float a, r, g, b;
} MultiresCol;
+
typedef struct MultiresColFace {
/* vertex colors */
MultiresCol col[4];
} MultiresColFace;
+
typedef struct MultiresFace {
unsigned int v[4];
unsigned int mid;
char flag, mat_nr, pad[2];
} MultiresFace;
+
typedef struct MultiresEdge {
unsigned int v[2];
unsigned int mid;
@@ -245,7 +247,7 @@ typedef struct Multires {
/** End Multires **/
typedef struct MRecast {
- int i;
+ int i;
} MRecast;
typedef struct GridPaintMask {
@@ -259,20 +261,19 @@ typedef struct GridPaintMask {
} GridPaintMask;
typedef enum MVertSkinFlag {
- /* Marks a vertex as the edge-graph root, used for calculating
- * rotations for all connected edges (recursively.) Also used to
- * choose a root when generating an armature. */
+ /* Marks a vertex as the edge-graph root, used for calculating rotations for all connected edges (recursively).
+ * Also used to choose a root when generating an armature.
+ */
MVERT_SKIN_ROOT = 1,
- /* Marks a branch vertex (vertex with more than two connected
- * edges) so that it's neighbors are directly hulled together,
- * rather than the default of generating intermediate frames. */
- MVERT_SKIN_LOOSE = 2
+ /* Marks a branch vertex (vertex with more than two connected edges), so that it's neighbors are
+ * directly hulled together, rather than the default of generating intermediate frames.
+ */
+ MVERT_SKIN_LOOSE = 2,
} MVertSkinFlag;
typedef struct MVertSkin {
- /* Radii of the skin, define how big the generated frames
- * are. Currently only the first two elements are used. */
+ /* Radii of the skin, define how big the generated frames are. Currently only the first two elements are used. */
float radius[3];
/* MVertSkinFlag */
@@ -285,7 +286,9 @@ typedef struct FreestyleEdge {
} FreestyleEdge;
/* FreestyleEdge->flag */
-#define FREESTYLE_EDGE_MARK 1
+enum {
+ FREESTYLE_EDGE_MARK = 1,
+};
typedef struct FreestyleFace {
char flag;
@@ -293,96 +296,118 @@ typedef struct FreestyleFace {
} FreestyleFace;
/* FreestyleFace->flag */
-#define FREESTYLE_FACE_MARK 1
-
-/* mvert->flag (1=SELECT) */
-#define ME_SPHERETEST 2
-#define ME_VERT_TMP_TAG 4
-#define ME_HIDE 16
-#define ME_VERT_MERGED (1<<6)
-#define ME_VERT_PBVH_UPDATE (1<<7)
-
-/* medge->flag (1=SELECT)*/
-#define ME_EDGEDRAW (1<<1)
-#define ME_SEAM (1<<2)
-#define ME_FGON (1<<3) /* no longer used (now we have ngons), only defined so we can clear it */
- /* reserve 16 for ME_HIDE */
-#define ME_EDGERENDER (1<<5)
-#define ME_LOOSEEDGE (1<<7)
-#define ME_EDGE_TMP_TAG (1 << 8)
-#define ME_SHARP (1<<9) /* only reason this flag remains a 'short' */
+enum {
+ FREESTYLE_FACE_MARK = 1,
+};
+
+/* mvert->flag */
+enum {
+/* SELECT = (1 << 0), */
+ ME_SPHERETEST = (1 << 1),
+ ME_VERT_TMP_TAG = (1 << 2),
+ ME_HIDE = (1 << 4),
+ ME_VERT_MERGED = (1 << 6),
+ ME_VERT_PBVH_UPDATE = (1 << 7),
+};
+
+/* medge->flag */
+enum {
+/* SELECT = (1 << 0), */
+ ME_EDGEDRAW = (1 << 1),
+ ME_SEAM = (1 << 2),
+ ME_FGON = (1 << 3), /* no longer used (now we have ngons), only defined so we can clear it */
+/* ME_HIDE = (1 << 4), */
+ ME_EDGERENDER = (1 << 5),
+ ME_LOOSEEDGE = (1 << 7),
+ ME_EDGE_TMP_TAG = (1 << 8),
+ ME_SHARP = (1 << 9), /* only reason this flag remains a 'short' */
+};
/* puno = vertexnormal (mface) */
-#define ME_PROJXY 16
-#define ME_PROJXZ 32
-#define ME_PROJYZ 64
+enum {
+ ME_PROJXY = (1 << 4),
+ ME_PROJXZ = (1 << 5),
+ ME_PROJYZ = (1 << 6),
+};
/* edcode (mface) */
-#define ME_V1V2 1
-#define ME_V2V3 2
-#define ME_V3V1 4
-#define ME_V3V4 4
-#define ME_V4V1 8
+enum {
+ ME_V1V2 = (1 << 0),
+ ME_V2V3 = (1 << 1),
+ ME_V3V1 = (1 << 2),
+ ME_V3V4 = ME_V3V1,
+ ME_V4V1 = (1 << 3),
+};
/* flag (mface) */
-#define ME_SMOOTH 1
-#define ME_FACE_SEL 2
-/* flag ME_HIDE==16 is used here too */
+enum {
+ ME_SMOOTH = (1 << 0),
+ ME_FACE_SEL = (1 << 1),
+/* ME_HIDE = (1 << 4), */
+};
#define ME_POLY_LOOP_PREV(mloop, mp, i) (&(mloop)[(mp)->loopstart + (((i) + (mp)->totloop - 1) % (mp)->totloop)])
#define ME_POLY_LOOP_NEXT(mloop, mp, i) (&(mloop)[(mp)->loopstart + (((i) + 1) % (mp)->totloop)])
/* mselect->type */
-#define ME_VSEL 0
-#define ME_ESEL 1
-#define ME_FSEL 2
+enum {
+ ME_VSEL = 0,
+ ME_ESEL = 1,
+ ME_FSEL = 2,
+};
/* mtface->flag */
-#define TF_SELECT 1 /* use MFace hide flag (after 2.43), should be able to reuse after 2.44 */
-#define TF_ACTIVE 2 /* deprecated! */
-#define TF_SEL1 4
-#define TF_SEL2 8
-#define TF_SEL3 16
-#define TF_SEL4 32
+enum {
+ TF_SELECT = (1 << 0), /* use MFace hide flag (after 2.43), should be able to reuse after 2.44 */
+ TF_ACTIVE = (1 << 1), /* deprecated! */
+ TF_SEL1 = (1 << 2),
+ TF_SEL2 = (1 << 3),
+ TF_SEL3 = (1 << 4),
+ TF_SEL4 = (1 << 5),
+};
/* mtface->mode */
-#define TF_DYNAMIC 1
-#define TF_ALPHASORT 2
-#define TF_TEX 4
-#define TF_SHAREDVERT 8
-#define TF_LIGHT 16
-
-#define TF_CONVERTED 32 /* tface converted to material */
-
-#define TF_SHAREDCOL 64
-#define TF_TILES 128 /* deprecated */
-#define TF_BILLBOARD 256
-#define TF_TWOSIDE 512
-#define TF_INVISIBLE 1024
-
-#define TF_OBCOL 2048
-#define TF_BILLBOARD2 4096 /* with Z axis constraint */
-#define TF_SHADOW 8192
-#define TF_BMFONT 16384
+enum {
+ TF_DYNAMIC = (1 << 0),
+ TF_ALPHASORT = (1 << 1),
+ TF_TEX = (1 << 2),
+ TF_SHAREDVERT = (1 << 3),
+ TF_LIGHT = (1 << 4),
+
+ TF_CONVERTED = (1 << 5), /* tface converted to material */
+
+ TF_SHAREDCOL = (1 << 6),
+ TF_TILES = (1 << 7), /* deprecated */
+ TF_BILLBOARD = (1 << 8),
+ TF_TWOSIDE = (1 << 9),
+ TF_INVISIBLE = (1 << 10),
+
+ TF_OBCOL = (1 << 11),
+ TF_BILLBOARD2 = (1 << 12), /* with Z axis constraint */
+ TF_SHADOW = (1 << 13),
+ TF_BMFONT = (1 << 14),
+};
/* mtface->transp, values 1-4 are used as flags in the GL, WARNING, TF_SUB cant work with this */
-#define TF_SOLID 0
-#define TF_ADD 1
-#define TF_ALPHA 2
-#define TF_CLIP 4 /* clipmap alpha/binary alpha all or nothing! */
-
-/* sub is not available in the user interface anymore */
-#define TF_SUB 3
+enum {
+ TF_SOLID = 0,
+ TF_ADD = (1 << 0),
+ TF_ALPHA = (1 << 1),
+ TF_CLIP = (1 << 2), /* clipmap alpha/binary alpha all or nothing! */
+ TF_SUB = 3, /* sub is not available in the user interface anymore */
+};
/* mtface->unwrap */
-#define TF_DEPRECATED1 1
-#define TF_DEPRECATED2 2
-#define TF_DEPRECATED3 4
-#define TF_DEPRECATED4 8
-#define TF_PIN1 16
-#define TF_PIN2 32
-#define TF_PIN3 64
-#define TF_PIN4 128
-
-#endif
+enum {
+ TF_DEPRECATED1 = (1 << 0),
+ TF_DEPRECATED2 = (1 << 1),
+ TF_DEPRECATED3 = (1 << 2),
+ TF_DEPRECATED4 = (1 << 3),
+ TF_PIN1 = (1 << 4),
+ TF_PIN2 = (1 << 5),
+ TF_PIN3 = (1 << 6),
+ TF_PIN4 = (1 << 7),
+};
+
+#endif /* __DNA_MESHDATA_TYPES_H__ */
diff --git a/source/blender/makesdna/DNA_meta_types.h b/source/blender/makesdna/DNA_meta_types.h
index 56683bf4797..8bbe53b33a6 100644
--- a/source/blender/makesdna/DNA_meta_types.h
+++ b/source/blender/makesdna/DNA_meta_types.h
@@ -65,8 +65,6 @@ typedef struct MetaBall {
ID id;
struct AnimData *adt;
- struct BoundBox *bb;
-
ListBase elems;
ListBase disp;
ListBase *editelems; /* not saved in files, note we use pointer for editmode check */
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 65e5c4e347a..799968335b7 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -29,7 +29,8 @@
#include "DNA_listBase.h"
/* WARNING ALERT! TYPEDEF VALUES ARE WRITTEN IN FILES! SO DO NOT CHANGE!
- * (ONLY ADD NEW ITEMS AT THE END) */
+ * (ONLY ADD NEW ITEMS AT THE END)
+ */
typedef enum ModifierType {
eModifierType_None = 0,
@@ -83,14 +84,14 @@ typedef enum ModifierType {
} ModifierType;
typedef enum ModifierMode {
- eModifierMode_Realtime = (1<<0),
- eModifierMode_Render = (1<<1),
- eModifierMode_Editmode = (1<<2),
- eModifierMode_OnCage = (1<<3),
- eModifierMode_Expanded = (1<<4),
- eModifierMode_Virtual = (1<<5),
- eModifierMode_ApplyOnSpline = (1<<6),
- eModifierMode_DisableTemporary = (1 << 31)
+ eModifierMode_Realtime = (1 << 0),
+ eModifierMode_Render = (1 << 1),
+ eModifierMode_Editmode = (1 << 2),
+ eModifierMode_OnCage = (1 << 3),
+ eModifierMode_Expanded = (1 << 4),
+ eModifierMode_Virtual = (1 << 5),
+ eModifierMode_ApplyOnSpline = (1 << 6),
+ eModifierMode_DisableTemporary = (1 << 31)
} ModifierMode;
typedef struct ModifierData {
@@ -98,19 +99,19 @@ typedef struct ModifierData {
int type, mode;
int stackindex, pad;
- char name[64]; /* MAX_NAME */
-
+ char name[64]; /* MAX_NAME */
+
/* XXX for timing info set by caller... solve later? (ton) */
struct Scene *scene;
-
+
char *error;
} ModifierData;
typedef enum {
- eSubsurfModifierFlag_Incremental = (1<<0),
- eSubsurfModifierFlag_DebugIncr = (1<<1),
- eSubsurfModifierFlag_ControlEdges = (1<<2),
- eSubsurfModifierFlag_SubsurfUv = (1<<3)
+ eSubsurfModifierFlag_Incremental = (1 << 0),
+ eSubsurfModifierFlag_DebugIncr = (1 << 1),
+ eSubsurfModifierFlag_ControlEdges = (1 << 2),
+ eSubsurfModifierFlag_SubsurfUv = (1 << 3),
} SubsurfModifierFlag;
/* not a real modifier */
@@ -119,7 +120,7 @@ typedef struct MappingInfoModifierData {
struct Tex *texture;
struct Object *map_object;
- char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
+ char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
int uvlayer_tmp;
int texmapping;
} MappingInfoModifierData;
@@ -136,7 +137,7 @@ typedef struct LatticeModifierData {
ModifierData modifier;
struct Object *object;
- char name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
+ char name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
float strength;
char pad[4];
} LatticeModifierData;
@@ -145,18 +146,20 @@ typedef struct CurveModifierData {
ModifierData modifier;
struct Object *object;
- char name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
- short defaxis; /* axis along which curve deforms */
+ char name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
+ short defaxis; /* axis along which curve deforms */
char pad[6];
} CurveModifierData;
/* CurveModifierData->defaxis */
-#define MOD_CURVE_POSX 1
-#define MOD_CURVE_POSY 2
-#define MOD_CURVE_POSZ 3
-#define MOD_CURVE_NEGX 4
-#define MOD_CURVE_NEGY 5
-#define MOD_CURVE_NEGZ 6
+enum {
+ MOD_CURVE_POSX = 1,
+ MOD_CURVE_POSY = 2,
+ MOD_CURVE_POSZ = 3,
+ MOD_CURVE_NEGX = 4,
+ MOD_CURVE_NEGY = 5,
+ MOD_CURVE_NEGZ = 6,
+};
typedef struct BuildModifierData {
ModifierData modifier;
@@ -168,20 +171,24 @@ typedef struct BuildModifierData {
/* Mask Modifier */
typedef struct MaskModifierData {
ModifierData modifier;
-
- struct Object *ob_arm; /* armature to use to in place of hardcoded vgroup */
- char vgroup[64]; /* name of vertex group to use to mask, MAX_VGROUP_NAME */
-
- int mode; /* using armature or hardcoded vgroup */
- int flag; /* flags for various things */
+
+ struct Object *ob_arm; /* armature to use to in place of hardcoded vgroup */
+ char vgroup[64]; /* name of vertex group to use to mask, MAX_VGROUP_NAME */
+
+ int mode; /* using armature or hardcoded vgroup */
+ int flag; /* flags for various things */
} MaskModifierData;
/* Mask Modifier -> mode */
-#define MOD_MASK_MODE_VGROUP 0
-#define MOD_MASK_MODE_ARM 1
+enum {
+ MOD_MASK_MODE_VGROUP = 0,
+ MOD_MASK_MODE_ARM = 1,
+};
/* Mask Modifier -> flag */
-#define MOD_MASK_INV (1<<0)
+enum {
+ MOD_MASK_INV = (1 << 0),
+};
typedef struct ArrayModifierData {
ModifierData modifier;
@@ -228,18 +235,24 @@ typedef struct ArrayModifierData {
} ArrayModifierData;
/* ArrayModifierData->fit_type */
-#define MOD_ARR_FIXEDCOUNT 0
-#define MOD_ARR_FITLENGTH 1
-#define MOD_ARR_FITCURVE 2
+enum {
+ MOD_ARR_FIXEDCOUNT = 0,
+ MOD_ARR_FITLENGTH = 1,
+ MOD_ARR_FITCURVE = 2,
+};
/* ArrayModifierData->offset_type */
-#define MOD_ARR_OFF_CONST (1<<0)
-#define MOD_ARR_OFF_RELATIVE (1<<1)
-#define MOD_ARR_OFF_OBJ (1<<2)
+enum {
+ MOD_ARR_OFF_CONST = (1 << 0),
+ MOD_ARR_OFF_RELATIVE = (1 << 1),
+ MOD_ARR_OFF_OBJ = (1 << 2),
+};
/* ArrayModifierData->flags */
-#define MOD_ARR_MERGE (1<<0)
-#define MOD_ARR_MERGEFINAL (1<<1)
+enum {
+ MOD_ARR_MERGE = (1 << 0),
+ MOD_ARR_MERGEFINAL = (1 << 1),
+};
typedef struct MirrorModifierData {
ModifierData modifier;
@@ -251,14 +264,16 @@ typedef struct MirrorModifierData {
} MirrorModifierData;
/* MirrorModifierData->flag */
-#define MOD_MIR_CLIPPING (1<<0)
-#define MOD_MIR_MIRROR_U (1<<1)
-#define MOD_MIR_MIRROR_V (1<<2)
-#define MOD_MIR_AXIS_X (1<<3)
-#define MOD_MIR_AXIS_Y (1<<4)
-#define MOD_MIR_AXIS_Z (1<<5)
-#define MOD_MIR_VGROUP (1<<6)
-#define MOD_MIR_NO_MERGE (1<<7)
+enum {
+ MOD_MIR_CLIPPING = (1 << 0),
+ MOD_MIR_MIRROR_U = (1 << 1),
+ MOD_MIR_MIRROR_V = (1 << 2),
+ MOD_MIR_AXIS_X = (1 << 3),
+ MOD_MIR_AXIS_Y = (1 << 4),
+ MOD_MIR_AXIS_Z = (1 << 5),
+ MOD_MIR_VGROUP = (1 << 6),
+ MOD_MIR_NO_MERGE = (1 << 7),
+};
typedef struct EdgeSplitModifierData {
ModifierData modifier;
@@ -268,8 +283,10 @@ typedef struct EdgeSplitModifierData {
} EdgeSplitModifierData;
/* EdgeSplitModifierData->flags */
-#define MOD_EDGESPLIT_FROMANGLE (1<<1)
-#define MOD_EDGESPLIT_FROMFLAG (1<<2)
+enum {
+ MOD_EDGESPLIT_FROMANGLE = (1 << 1),
+ MOD_EDGESPLIT_FROMFLAG = (1 << 2),
+};
typedef struct BevelModifierData {
ModifierData modifier;
@@ -281,29 +298,29 @@ typedef struct BevelModifierData {
short val_flags; /* flags used to interpret the bevel value */
short lim_flags; /* flags to tell the tool how to limit the bevel */
short e_flags; /* flags to direct how edge weights are applied to verts */
- float bevel_angle; /* if the MOD_BEVEL_ANGLE is set, this will be how "sharp" an edge must be before it gets beveled */
- char defgrp_name[64]; /* if the MOD_BEVEL_VWEIGHT option is set, this will be the name of the vert group, MAX_VGROUP_NAME */
+ /* if the MOD_BEVEL_ANGLE is set, this will be how "sharp" an edge must be before it gets beveled */
+ float bevel_angle;
+ /* if the MOD_BEVEL_VWEIGHT option is set, this will be the name of the vert group, MAX_VGROUP_NAME */
+ char defgrp_name[64];
} BevelModifierData;
-#define MOD_BEVEL_VERT (1 << 1)
-// #define MOD_BEVEL_RADIUS (1 << 2)
-#define MOD_BEVEL_ANGLE (1 << 3)
-#define MOD_BEVEL_WEIGHT (1 << 4)
-#define MOD_BEVEL_VGROUP (1 << 5)
-#define MOD_BEVEL_EMIN (1 << 7)
-#define MOD_BEVEL_EMAX (1 << 8)
-// #define MOD_BEVEL_RUNNING (1 << 9)
-// #define MOD_BEVEL_RES (1 << 10)
-// #define MOD_BEVEL_EVEN (1 << 11) /* this is a new setting not related to old (trunk bmesh bevel code) but adding
-// * here because they are mixed - campbell */
-// #define MOD_BEVEL_DIST (1 << 12) /* same as above */
-#define MOD_BEVEL_OVERLAP_OK (1 << 13)
-
-
-/* Smoke modifier flags */
-#define MOD_SMOKE_TYPE_DOMAIN (1 << 0)
-#define MOD_SMOKE_TYPE_FLOW (1 << 1)
-#define MOD_SMOKE_TYPE_COLL (1 << 2)
+enum {
+ MOD_BEVEL_VERT = (1 << 1),
+/* MOD_BEVEL_RADIUS = (1 << 2), */
+ MOD_BEVEL_ANGLE = (1 << 3),
+ MOD_BEVEL_WEIGHT = (1 << 4),
+ MOD_BEVEL_VGROUP = (1 << 5),
+ MOD_BEVEL_EMIN = (1 << 7),
+ MOD_BEVEL_EMAX = (1 << 8),
+/* MOD_BEVEL_RUNNING = (1 << 9), */
+/* MOD_BEVEL_RES = (1 << 10), */
+ /* This is a new setting not related to old (trunk bmesh bevel code)
+ * but adding here because they are mixed - campbell
+ */
+/* MOD_BEVEL_EVEN = (1 << 11), */
+/* MOD_BEVEL_DIST = (1 << 12), */ /* same as above */
+ MOD_BEVEL_OVERLAP_OK = (1 << 13),
+};
typedef struct SmokeModifierData {
ModifierData modifier;
@@ -315,70 +332,79 @@ typedef struct SmokeModifierData {
int type; /* domain, inflow, outflow, ... */
} SmokeModifierData;
+/* Smoke modifier flags */
+enum {
+ MOD_SMOKE_TYPE_DOMAIN = (1 << 0),
+ MOD_SMOKE_TYPE_FLOW = (1 << 1),
+ MOD_SMOKE_TYPE_COLL = (1 << 2),
+};
+
typedef struct DisplaceModifierData {
ModifierData modifier;
/* keep in sync with MappingInfoModifierData */
struct Tex *texture;
struct Object *map_object;
- char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
+ char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
int uvlayer_tmp;
int texmapping;
/* end MappingInfoModifierData */
float strength;
int direction;
- char defgrp_name[64]; /* MAX_VGROUP_NAME */
+ char defgrp_name[64]; /* MAX_VGROUP_NAME */
float midlevel;
int pad;
} DisplaceModifierData;
/* DisplaceModifierData->direction */
enum {
- MOD_DISP_DIR_X = 0,
- MOD_DISP_DIR_Y = 1,
- MOD_DISP_DIR_Z = 2,
- MOD_DISP_DIR_NOR = 3,
+ MOD_DISP_DIR_X = 0,
+ MOD_DISP_DIR_Y = 1,
+ MOD_DISP_DIR_Z = 2,
+ MOD_DISP_DIR_NOR = 3,
MOD_DISP_DIR_RGB_XYZ = 4,
};
/* DisplaceModifierData->texmapping */
enum {
- MOD_DISP_MAP_LOCAL = 0,
+ MOD_DISP_MAP_LOCAL = 0,
MOD_DISP_MAP_GLOBAL = 1,
MOD_DISP_MAP_OBJECT = 2,
- MOD_DISP_MAP_UV = 3
+ MOD_DISP_MAP_UV = 3,
};
typedef struct UVProjectModifierData {
ModifierData modifier;
/* the objects which do the projecting */
- struct Object *projectors[10]; /* MOD_UVPROJECT_MAX */
- struct Image *image; /* the image to project */
+ struct Object *projectors[10]; /* MOD_UVPROJECT_MAXPROJECTORS */
+ struct Image *image; /* the image to project */
int flags;
int num_projectors;
float aspectx, aspecty;
float scalex, scaley;
- char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
+ char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
int uvlayer_tmp, pad;
} UVProjectModifierData;
#define MOD_UVPROJECT_MAXPROJECTORS 10
/* UVProjectModifierData->flags */
-#define MOD_UVPROJECT_OVERRIDEIMAGE (1<<0)
+enum {
+ MOD_UVPROJECT_OVERRIDEIMAGE = (1 << 0),
+};
typedef struct DecimateModifierData {
ModifierData modifier;
float percent; /* (mode == MOD_DECIM_MODE_COLLAPSE) */
- short iter; /* (mode == MOD_DECIM_MODE_UNSUBDIV) */
+ short iter; /* (mode == MOD_DECIM_MODE_UNSUBDIV) */
char delimit; /* (mode == MOD_DECIM_MODE_DISSOLVE) */
char pad;
- float angle; /* (mode == MOD_DECIM_MODE_DISSOLVE) */
+ float angle; /* (mode == MOD_DECIM_MODE_DISSOLVE) */
- char defgrp_name[64]; /* MAX_VGROUP_NAME */
+ char defgrp_name[64]; /* MAX_VGROUP_NAME */
short flag, mode;
/* runtime only */
@@ -388,20 +414,15 @@ typedef struct DecimateModifierData {
enum {
MOD_DECIM_FLAG_INVERT_VGROUP = (1 << 0),
MOD_DECIM_FLAG_TRIANGULATE = (1 << 1), /* for collapse only. dont convert tri pairs back to quads */
- MOD_DECIM_FLAG_ALL_BOUNDARY_VERTS = (1 << 2) /* for dissolve only. collapse all verts between 2 faces */
+ MOD_DECIM_FLAG_ALL_BOUNDARY_VERTS = (1 << 2), /* for dissolve only. collapse all verts between 2 faces */
};
enum {
MOD_DECIM_MODE_COLLAPSE,
MOD_DECIM_MODE_UNSUBDIV,
- MOD_DECIM_MODE_DISSOLVE /* called planar in the UI */
+ MOD_DECIM_MODE_DISSOLVE, /* called planar in the UI */
};
-/* Smooth modifier flags */
-#define MOD_SMOOTH_X (1<<1)
-#define MOD_SMOOTH_Y (1<<2)
-#define MOD_SMOOTH_Z (1<<3)
-
typedef struct SmoothModifierData {
ModifierData modifier;
float fac;
@@ -410,17 +431,12 @@ typedef struct SmoothModifierData {
} SmoothModifierData;
-/* Cast modifier flags */
-#define MOD_CAST_X (1<<1)
-#define MOD_CAST_Y (1<<2)
-#define MOD_CAST_Z (1<<3)
-#define MOD_CAST_USE_OB_TRANSFORM (1<<4)
-#define MOD_CAST_SIZE_FROM_RADIUS (1<<5)
-
-/* Cast modifier projection types */
-#define MOD_CAST_TYPE_SPHERE 0
-#define MOD_CAST_TYPE_CYLINDER 1
-#define MOD_CAST_TYPE_CUBOID 2
+/* Smooth modifier flags */
+enum {
+ MOD_SMOOTH_X = (1 << 1),
+ MOD_SMOOTH_Y = (1 << 2),
+ MOD_SMOOTH_Z = (1 << 3),
+};
typedef struct CastModifierData {
ModifierData modifier;
@@ -429,18 +445,26 @@ typedef struct CastModifierData {
float fac;
float radius;
float size;
- char defgrp_name[64]; /* MAX_VGROUP_NAME */
+ char defgrp_name[64]; /* MAX_VGROUP_NAME */
short flag, type;
} CastModifierData;
-/* WaveModifierData.flag */
-#define MOD_WAVE_X (1<<1)
-#define MOD_WAVE_Y (1<<2)
-#define MOD_WAVE_CYCL (1<<3)
-#define MOD_WAVE_NORM (1<<4)
-#define MOD_WAVE_NORM_X (1<<5)
-#define MOD_WAVE_NORM_Y (1<<6)
-#define MOD_WAVE_NORM_Z (1<<7)
+/* Cast modifier flags */
+enum {
+ /* And what bout (1 << 0) flag? ;) */
+ MOD_CAST_X = (1 << 1),
+ MOD_CAST_Y = (1 << 2),
+ MOD_CAST_Z = (1 << 3),
+ MOD_CAST_USE_OB_TRANSFORM = (1 << 4),
+ MOD_CAST_SIZE_FROM_RADIUS = (1 << 5),
+};
+
+/* Cast modifier projection types */
+enum {
+ MOD_CAST_TYPE_SPHERE = 0,
+ MOD_CAST_TYPE_CYLINDER = 1,
+ MOD_CAST_TYPE_CUBOID = 2,
+};
typedef struct WaveModifierData {
ModifierData modifier;
@@ -448,13 +472,13 @@ typedef struct WaveModifierData {
/* keep in sync with MappingInfoModifierData */
struct Tex *texture;
struct Object *map_object;
- char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
+ char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
int uvlayer_tmp;
int texmapping;
/* end MappingInfoModifierData */
struct Object *objectcenter;
- char defgrp_name[64]; /* MAX_VGROUP_NAME */
+ char defgrp_name[64]; /* MAX_VGROUP_NAME */
short flag, pad;
@@ -465,30 +489,42 @@ typedef struct WaveModifierData {
float pad1;
} WaveModifierData;
+/* WaveModifierData.flag */
+enum {
+ /* And what bout (1 << 0) flag? ;) */
+ MOD_WAVE_X = (1 << 1),
+ MOD_WAVE_Y = (1 << 2),
+ MOD_WAVE_CYCL = (1 << 3),
+ MOD_WAVE_NORM = (1 << 4),
+ MOD_WAVE_NORM_X = (1 << 5),
+ MOD_WAVE_NORM_Y = (1 << 6),
+ MOD_WAVE_NORM_Z = (1 << 7),
+};
+
typedef struct ArmatureModifierData {
ModifierData modifier;
- short deformflag, multi; /* deformflag replaces armature->deformflag */
+ short deformflag, multi; /* deformflag replaces armature->deformflag */
int pad2;
struct Object *object;
- float *prevCos; /* stored input of previous modifier, for vertexgroup blending */
- char defgrp_name[64]; /* MAX_VGROUP_NAME */
+ float *prevCos; /* stored input of previous modifier, for vertexgroup blending */
+ char defgrp_name[64]; /* MAX_VGROUP_NAME */
} ArmatureModifierData;
typedef struct HookModifierData {
ModifierData modifier;
struct Object *object;
- char subtarget[64]; /* optional name of bone target, MAX_ID_NAME-2 */
-
- float parentinv[4][4]; /* matrix making current transform unmodified */
- float cent[3]; /* visualization of hook */
- float falloff; /* if not zero, falloff is distance where influence zero */
-
- int *indexar; /* if NULL, it's using vertexgroup */
+ char subtarget[64]; /* optional name of bone target, MAX_ID_NAME-2 */
+
+ float parentinv[4][4]; /* matrix making current transform unmodified */
+ float cent[3]; /* visualization of hook */
+ float falloff; /* if not zero, falloff is distance where influence zero */
+
+ int *indexar; /* if NULL, it's using vertexgroup */
int totindex;
float force;
- char name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
+ char name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
} HookModifierData;
typedef struct SoftbodyModifierData {
@@ -496,36 +532,36 @@ typedef struct SoftbodyModifierData {
} SoftbodyModifierData;
typedef struct ClothModifierData {
- ModifierData modifier;
+ ModifierData modifier;
- struct Scene *scene; /* the context, time etc is here */
- struct Cloth *clothObject; /* The internal data structure for cloth. */
- struct ClothSimSettings *sim_parms; /* definition is in DNA_cloth_types.h */
+ struct Scene *scene; /* the context, time etc is here */
+ struct Cloth *clothObject; /* The internal data structure for cloth. */
+ struct ClothSimSettings *sim_parms; /* definition is in DNA_cloth_types.h */
struct ClothCollSettings *coll_parms; /* definition is in DNA_cloth_types.h */
- struct PointCache *point_cache; /* definition is in DNA_object_force.h */
+ struct PointCache *point_cache; /* definition is in DNA_object_force.h */
struct ListBase ptcaches;
} ClothModifierData;
typedef struct CollisionModifierData {
- ModifierData modifier;
-
- struct MVert *x; /* position at the beginning of the frame */
- struct MVert *xnew; /* position at the end of the frame */
- struct MVert *xold; /* unsued atm, but was discussed during sprint */
+ ModifierData modifier;
+
+ struct MVert *x; /* position at the beginning of the frame */
+ struct MVert *xnew; /* position at the end of the frame */
+ struct MVert *xold; /* unused atm, but was discussed during sprint */
struct MVert *current_xnew; /* new position at the actual inter-frame step */
- struct MVert *current_x; /* position at the actual inter-frame step */
- struct MVert *current_v; /* (xnew - x) at the actual inter-frame step */
-
- struct MFace *mfaces; /* object face data */
-
+ struct MVert *current_x; /* position at the actual inter-frame step */
+ struct MVert *current_v; /* (xnew - x) at the actual inter-frame step */
+
+ struct MFace *mfaces; /* object face data */
+
unsigned int numverts;
unsigned int numfaces;
- float time_x, time_xnew; /* cfra time of modifier */
- struct BVHTree *bvhtree; /* bounding volume hierarchy for this cloth object */
+ float time_x, time_xnew; /* cfra time of modifier */
+ struct BVHTree *bvhtree; /* bounding volume hierarchy for this cloth object */
} CollisionModifierData;
typedef struct SurfaceModifierData {
- ModifierData modifier;
+ ModifierData modifier;
struct MVert *x; /* old position */
struct MVert *v; /* velocity */
@@ -537,11 +573,6 @@ typedef struct SurfaceModifierData {
int cfra, numverts;
} SurfaceModifierData;
-typedef enum {
- eBooleanModifierOp_Intersect = 0,
- eBooleanModifierOp_Union = 1,
- eBooleanModifierOp_Difference = 2,
-} BooleanModifierOp;
typedef struct BooleanModifierData {
ModifierData modifier;
@@ -549,11 +580,11 @@ typedef struct BooleanModifierData {
int operation, pad;
} BooleanModifierData;
-#define MOD_MDEF_INVERT_VGROUP (1<<0)
-#define MOD_MDEF_DYNAMIC_BIND (1<<1)
-
-#define MOD_MDEF_VOLUME 0
-#define MOD_MDEF_SURFACE 1
+typedef enum {
+ eBooleanModifierOp_Intersect = 0,
+ eBooleanModifierOp_Union = 1,
+ eBooleanModifierOp_Difference = 2,
+} BooleanModifierOp;
typedef struct MDefInfluence {
int vertex;
@@ -568,45 +599,49 @@ typedef struct MDefCell {
typedef struct MeshDeformModifierData {
ModifierData modifier;
- struct Object *object; /* mesh object */
- char defgrp_name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
+ struct Object *object; /* mesh object */
+ char defgrp_name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
short gridsize, flag, mode, pad;
/* result of static binding */
- MDefInfluence *bindinfluences; /* influences */
- int *bindoffsets; /* offsets into influences array */
- float *bindcagecos; /* coordinates that cage was bound with */
- int totvert, totcagevert; /* total vertices in mesh and cage */
+ MDefInfluence *bindinfluences; /* influences */
+ int *bindoffsets; /* offsets into influences array */
+ float *bindcagecos; /* coordinates that cage was bound with */
+ int totvert, totcagevert; /* total vertices in mesh and cage */
/* result of dynamic binding */
- MDefCell *dyngrid; /* grid with dynamic binding cell points */
- MDefInfluence *dyninfluences; /* dynamic binding vertex influences */
- int *dynverts, *pad2; /* is this vertex bound or not? */
- int dyngridsize; /* size of the dynamic bind grid */
- int totinfluence; /* total number of vertex influences */
- float dyncellmin[3]; /* offset of the dynamic bind grid */
- float dyncellwidth; /* width of dynamic bind cell */
- float bindmat[4][4]; /* matrix of cage at binding time */
+ MDefCell *dyngrid; /* grid with dynamic binding cell points */
+ MDefInfluence *dyninfluences; /* dynamic binding vertex influences */
+ int *dynverts, *pad2; /* is this vertex bound or not? */
+ int dyngridsize; /* size of the dynamic bind grid */
+ int totinfluence; /* total number of vertex influences */
+ float dyncellmin[3]; /* offset of the dynamic bind grid */
+ float dyncellwidth; /* width of dynamic bind cell */
+ float bindmat[4][4]; /* matrix of cage at binding time */
/* deprecated storage */
- float *bindweights; /* deprecated inefficient storage */
- float *bindcos; /* deprecated storage of cage coords */
+ float *bindweights; /* deprecated inefficient storage */
+ float *bindcos; /* deprecated storage of cage coords */
/* runtime */
- void (*bindfunc)(struct Scene *scene,
- struct MeshDeformModifierData *mmd,
- float *vertexcos, int totvert, float cagemat[4][4]);
+ void (*bindfunc)(struct Scene *scene, struct MeshDeformModifierData *mmd,
+ float *vertexcos, int totvert, float cagemat[4][4]);
} MeshDeformModifierData;
-typedef enum {
- eParticleSystemFlag_Pars = (1<<0),
- eParticleSystemFlag_psys_updated = (1<<1),
- eParticleSystemFlag_file_loaded = (1<<2),
-} ParticleSystemModifierFlag;
+enum {
+ MOD_MDEF_INVERT_VGROUP = (1 << 0),
+ MOD_MDEF_DYNAMIC_BIND = (1 << 1),
+};
+
+enum {
+ MOD_MDEF_VOLUME = 0,
+ MOD_MDEF_SURFACE = 1,
+};
typedef struct ParticleSystemModifierData {
ModifierData modifier;
+
struct ParticleSystem *psys;
struct DerivedMesh *dm;
int totdmvert, totdmedge, totdmface;
@@ -614,38 +649,46 @@ typedef struct ParticleSystemModifierData {
} ParticleSystemModifierData;
typedef enum {
- eParticleInstanceFlag_Parents = (1<<0),
- eParticleInstanceFlag_Children = (1<<1),
- eParticleInstanceFlag_Path = (1<<2),
- eParticleInstanceFlag_Unborn = (1<<3),
- eParticleInstanceFlag_Alive = (1<<4),
- eParticleInstanceFlag_Dead = (1<<5),
- eParticleInstanceFlag_KeepShape = (1<<6),
- eParticleInstanceFlag_UseSize = (1<<7),
+ eParticleSystemFlag_Pars = (1 << 0),
+ eParticleSystemFlag_psys_updated = (1 << 1),
+ eParticleSystemFlag_file_loaded = (1 << 2),
+} ParticleSystemModifierFlag;
+
+typedef enum {
+ eParticleInstanceFlag_Parents = (1 << 0),
+ eParticleInstanceFlag_Children = (1 << 1),
+ eParticleInstanceFlag_Path = (1 << 2),
+ eParticleInstanceFlag_Unborn = (1 << 3),
+ eParticleInstanceFlag_Alive = (1 << 4),
+ eParticleInstanceFlag_Dead = (1 << 5),
+ eParticleInstanceFlag_KeepShape = (1 << 6),
+ eParticleInstanceFlag_UseSize = (1 << 7),
} ParticleInstanceModifierFlag;
typedef struct ParticleInstanceModifierData {
ModifierData modifier;
+
struct Object *ob;
short psys, flag, axis, rt;
float position, random_position;
} ParticleInstanceModifierData;
typedef enum {
- eExplodeFlag_CalcFaces = (1<<0),
- eExplodeFlag_PaSize = (1<<1),
- eExplodeFlag_EdgeCut = (1<<2),
- eExplodeFlag_Unborn = (1<<3),
- eExplodeFlag_Alive = (1<<4),
- eExplodeFlag_Dead = (1<<5),
+ eExplodeFlag_CalcFaces = (1 << 0),
+ eExplodeFlag_PaSize = (1 << 1),
+ eExplodeFlag_EdgeCut = (1 << 2),
+ eExplodeFlag_Unborn = (1 << 3),
+ eExplodeFlag_Alive = (1 << 4),
+ eExplodeFlag_Dead = (1 << 5),
} ExplodeModifierFlag;
typedef struct ExplodeModifierData {
ModifierData modifier;
+
int *facepa;
short flag, vgroup;
float protect;
- char uvname[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
+ char uvname[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
} ExplodeModifierData;
typedef struct MultiresModifierData {
@@ -656,83 +699,93 @@ typedef struct MultiresModifierData {
} MultiresModifierData;
typedef enum {
- eMultiresModifierFlag_ControlEdges = (1<<0),
- eMultiresModifierFlag_PlainUv = (1<<1),
+ eMultiresModifierFlag_ControlEdges = (1 << 0),
+ eMultiresModifierFlag_PlainUv = (1 << 1),
} MultiresModifierFlag;
typedef struct FluidsimModifierData {
ModifierData modifier;
-
- struct FluidsimSettings *fss; /* definition is in DNA_object_fluidsim.h */
- struct PointCache *point_cache; /* definition is in DNA_object_force.h */
+
+ struct FluidsimSettings *fss; /* definition is in DNA_object_fluidsim.h */
+ struct PointCache *point_cache; /* definition is in DNA_object_force.h */
} FluidsimModifierData;
typedef struct ShrinkwrapModifierData {
ModifierData modifier;
- struct Object *target; /* shrink target */
+ struct Object *target; /* shrink target */
struct Object *auxTarget; /* additional shrink target */
- char vgroup_name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
- float keepDist; /* distance offset to keep from mesh/projection point */
- short shrinkType; /* shrink type projection */
- short shrinkOpts; /* shrink options */
- float projLimit; /* limit the projection ray cast */
- char projAxis; /* axis to project over */
-
- /*
- * if using projection over vertex normal this controls the
- * the level of subsurface that must be done before getting the
- * vertex coordinates and normal
+ char vgroup_name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
+ float keepDist; /* distance offset to keep from mesh/projection point */
+ short shrinkType; /* shrink type projection */
+ short shrinkOpts; /* shrink options */
+ float projLimit; /* limit the projection ray cast */
+ char projAxis; /* axis to project over */
+
+ /* If using projection over vertex normal this controls the level of subsurface that must be done
+ * before getting the vertex coordinates and normal
*/
char subsurfLevels;
char pad[2];
-
} ShrinkwrapModifierData;
/* Shrinkwrap->shrinkType */
-#define MOD_SHRINKWRAP_NEAREST_SURFACE 0
-#define MOD_SHRINKWRAP_PROJECT 1
-#define MOD_SHRINKWRAP_NEAREST_VERTEX 2
+enum {
+ MOD_SHRINKWRAP_NEAREST_SURFACE = 0,
+ MOD_SHRINKWRAP_PROJECT = 1,
+ MOD_SHRINKWRAP_NEAREST_VERTEX = 2,
+};
/* Shrinkwrap->shrinkOpts */
-#define MOD_SHRINKWRAP_PROJECT_ALLOW_POS_DIR (1<<0) /* allow shrinkwrap to move the vertex in the positive direction of axis */
-#define MOD_SHRINKWRAP_PROJECT_ALLOW_NEG_DIR (1<<1) /* allow shrinkwrap to move the vertex in the negative direction of axis */
+enum {
+ /* allow shrinkwrap to move the vertex in the positive direction of axis */
+ MOD_SHRINKWRAP_PROJECT_ALLOW_POS_DIR = (1 << 0),
+ /* allow shrinkwrap to move the vertex in the negative direction of axis */
+ MOD_SHRINKWRAP_PROJECT_ALLOW_NEG_DIR = (1 << 1),
-#define MOD_SHRINKWRAP_CULL_TARGET_FRONTFACE (1<<3) /* ignore vertex moves if a vertex ends projected on a front face of the target */
-#define MOD_SHRINKWRAP_CULL_TARGET_BACKFACE (1<<4) /* ignore vertex moves if a vertex ends projected on a back face of the target */
+ /* ignore vertex moves if a vertex ends projected on a front face of the target */
+ MOD_SHRINKWRAP_CULL_TARGET_FRONTFACE = (1 << 3),
+ /* ignore vertex moves if a vertex ends projected on a back face of the target */
+ MOD_SHRINKWRAP_CULL_TARGET_BACKFACE = (1 << 4),
-#define MOD_SHRINKWRAP_KEEP_ABOVE_SURFACE (1<<5) /* distance is measure to the front face of the target */
+ MOD_SHRINKWRAP_KEEP_ABOVE_SURFACE = (1 << 5), /* distance is measure to the front face of the target */
+};
-#define MOD_SHRINKWRAP_PROJECT_OVER_X_AXIS (1<<0)
-#define MOD_SHRINKWRAP_PROJECT_OVER_Y_AXIS (1<<1)
-#define MOD_SHRINKWRAP_PROJECT_OVER_Z_AXIS (1<<2)
-#define MOD_SHRINKWRAP_PROJECT_OVER_NORMAL 0 /* projection over normal is used if no axis is selected */
+/* Shrinkwrap->projAxis */
+enum {
+ MOD_SHRINKWRAP_PROJECT_OVER_NORMAL = 0, /* projection over normal is used if no axis is selected */
+ MOD_SHRINKWRAP_PROJECT_OVER_X_AXIS = (1 << 0),
+ MOD_SHRINKWRAP_PROJECT_OVER_Y_AXIS = (1 << 1),
+ MOD_SHRINKWRAP_PROJECT_OVER_Z_AXIS = (1 << 2),
+};
typedef struct SimpleDeformModifierData {
ModifierData modifier;
- struct Object *origin; /* object to control the origin of modifier space coordinates */
- char vgroup_name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
- float factor; /* factors to control simple deforms */
- float limit[2]; /* lower and upper limit */
+ struct Object *origin; /* object to control the origin of modifier space coordinates */
+ char vgroup_name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
+ float factor; /* factors to control simple deforms */
+ float limit[2]; /* lower and upper limit */
- char mode; /* deform function */
- char axis; /* lock axis (for taper and strech) */
+ char mode; /* deform function */
+ char axis; /* lock axis (for taper and strech) */
char pad[2];
} SimpleDeformModifierData;
-#define MOD_SIMPLEDEFORM_MODE_TWIST 1
-#define MOD_SIMPLEDEFORM_MODE_BEND 2
-#define MOD_SIMPLEDEFORM_MODE_TAPER 3
-#define MOD_SIMPLEDEFORM_MODE_STRETCH 4
-
-#define MOD_SIMPLEDEFORM_LOCK_AXIS_X (1<<0)
-#define MOD_SIMPLEDEFORM_LOCK_AXIS_Y (1<<1)
+enum {
+ MOD_SIMPLEDEFORM_MODE_TWIST = 1,
+ MOD_SIMPLEDEFORM_MODE_BEND = 2,
+ MOD_SIMPLEDEFORM_MODE_TAPER = 3,
+ MOD_SIMPLEDEFORM_MODE_STRETCH = 4,
+};
-#define MOD_UVPROJECT_MAX 10
+enum {
+ MOD_SIMPLEDEFORM_LOCK_AXIS_X = (1 << 0),
+ MOD_SIMPLEDEFORM_LOCK_AXIS_Y = (1 << 1),
+};
typedef struct ShapeKeyModifierData {
ModifierData modifier;
@@ -741,11 +794,12 @@ typedef struct ShapeKeyModifierData {
typedef struct SolidifyModifierData {
ModifierData modifier;
- char defgrp_name[64]; /* name of vertex group to use, MAX_VGROUP_NAME */
- float offset; /* new surface offset level*/
- float offset_fac; /* midpoint of the offset */
- float offset_fac_vg; /* factor for the minimum weight to use when vgroups are used, avoids 0.0 weights giving duplicate geometry */
- float offset_clamp; /* clamp offset based on surrounding geometry */
+ char defgrp_name[64]; /* name of vertex group to use, MAX_VGROUP_NAME */
+ float offset; /* new surface offset level*/
+ float offset_fac; /* midpoint of the offset */
+ /* factor for the minimum weight to use when vgroups are used, avoids 0.0 weights giving duplicate geometry */
+ float offset_fac_vg;
+ float offset_clamp; /* clamp offset based on surrounding geometry */
float pad;
float crease_inner;
float crease_outer;
@@ -755,98 +809,107 @@ typedef struct SolidifyModifierData {
short mat_ofs_rim;
} SolidifyModifierData;
-#define MOD_SOLIDIFY_RIM (1 << 0)
-#define MOD_SOLIDIFY_EVEN (1 << 1)
-#define MOD_SOLIDIFY_NORMAL_CALC (1 << 2)
-#define MOD_SOLIDIFY_VGROUP_INV (1 << 3)
-#define MOD_SOLIDIFY_RIM_MATERIAL (1 << 4) /* deprecated, used in do_versions */
-#define MOD_SOLIDIFY_FLIP (1 << 5)
+enum {
+ MOD_SOLIDIFY_RIM = (1 << 0),
+ MOD_SOLIDIFY_EVEN = (1 << 1),
+ MOD_SOLIDIFY_NORMAL_CALC = (1 << 2),
+ MOD_SOLIDIFY_VGROUP_INV = (1 << 3),
+ MOD_SOLIDIFY_RIM_MATERIAL = (1 << 4), /* deprecated, used in do_versions */
+ MOD_SOLIDIFY_FLIP = (1 << 5),
+};
typedef struct ScrewModifierData {
ModifierData modifier;
+
struct Object *ob_axis;
- int steps;
- int render_steps;
- int iter;
- float screw_ofs;
- float angle;
- short axis;
- short flag;
+ int steps;
+ int render_steps;
+ int iter;
+ float screw_ofs;
+ float angle;
+ short axis;
+ short flag;
} ScrewModifierData;
-#define MOD_SCREW_NORMAL_FLIP (1 << 0)
-#define MOD_SCREW_NORMAL_CALC (1 << 1)
-#define MOD_SCREW_OBJECT_OFFSET (1 << 2)
-// #define MOD_SCREW_OBJECT_ANGLE (1 << 4)
-#define MOD_SCREW_SMOOTH_SHADING (1 << 5)
+enum {
+ MOD_SCREW_NORMAL_FLIP = (1 << 0),
+ MOD_SCREW_NORMAL_CALC = (1 << 1),
+ MOD_SCREW_OBJECT_OFFSET = (1 << 2),
+/* MOD_SCREW_OBJECT_ANGLE = (1 << 4), */
+ MOD_SCREW_SMOOTH_SHADING = (1 << 5),
+};
typedef struct OceanModifierData {
ModifierData modifier;
-
+
struct Ocean *ocean;
struct OceanCache *oceancache;
- int resolution;
- int spatial_size;
-
- float wind_velocity;
-
- float damp;
- float smallest_wave;
- float depth;
-
- float wave_alignment;
- float wave_direction;
- float wave_scale;
-
- float chop_amount;
- float foam_coverage;
- float time;
-
- int bakestart;
- int bakeend;
-
- char cachepath[1024]; // FILE_MAX
- char foamlayername[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
- char cached;
- char geometry_mode;
+ int resolution;
+ int spatial_size;
- char flag;
- char refresh;
+ float wind_velocity;
- short repeat_x;
- short repeat_y;
+ float damp;
+ float smallest_wave;
+ float depth;
- int seed;
+ float wave_alignment;
+ float wave_direction;
+ float wave_scale;
- float size;
-
- float foam_fade;
+ float chop_amount;
+ float foam_coverage;
+ float time;
- int pad;
+ int bakestart;
+ int bakeend;
-} OceanModifierData;
+ char cachepath[1024]; /* FILE_MAX */
+ char foamlayername[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
+ char cached;
+ char geometry_mode;
-#define MOD_OCEAN_GEOM_GENERATE 0
-#define MOD_OCEAN_GEOM_DISPLACE 1
-#define MOD_OCEAN_GEOM_SIM_ONLY 2
+ char flag;
+ char refresh;
+
+ short repeat_x;
+ short repeat_y;
+
+ int seed;
+
+ float size;
+
+ float foam_fade;
-#define MOD_OCEAN_REFRESH_RESET 1
-#define MOD_OCEAN_REFRESH_SIM 2
-#define MOD_OCEAN_REFRESH_ADD 4
-#define MOD_OCEAN_REFRESH_CLEAR_CACHE 8
-#define MOD_OCEAN_REFRESH_TOPOLOGY 16
+ int pad;
+} OceanModifierData;
-#define MOD_OCEAN_GENERATE_FOAM 1
-#define MOD_OCEAN_GENERATE_NORMALS 2
+enum {
+ MOD_OCEAN_GEOM_GENERATE = 0,
+ MOD_OCEAN_GEOM_DISPLACE = 1,
+ MOD_OCEAN_GEOM_SIM_ONLY = 2,
+};
+enum {
+ MOD_OCEAN_REFRESH_RESET = (1 << 0),
+ MOD_OCEAN_REFRESH_SIM = (1 << 1),
+ MOD_OCEAN_REFRESH_ADD = (1 << 2),
+ MOD_OCEAN_REFRESH_CLEAR_CACHE = (1 << 3),
+ MOD_OCEAN_REFRESH_TOPOLOGY = (1 << 4),
+};
+
+enum {
+ MOD_OCEAN_GENERATE_FOAM = (1 << 0),
+ MOD_OCEAN_GENERATE_NORMALS = (1 << 1),
+};
typedef struct WarpModifierData {
ModifierData modifier;
/* keep in sync with MappingInfoModifierData */
struct Tex *texture;
struct Object *map_object;
- char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
+ char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
int uvlayer_tmp;
int texmapping;
/* end MappingInfoModifierData */
@@ -854,7 +917,7 @@ typedef struct WarpModifierData {
struct Object *object_from;
struct Object *object_to;
struct CurveMapping *curfalloff;
- char defgrp_name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
+ char defgrp_name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
float strength;
float falloff_radius;
char flag; /* not used yet */
@@ -865,189 +928,175 @@ typedef struct WarpModifierData {
#define MOD_WARP_VOLUME_PRESERVE 1
typedef enum {
- eWarp_Falloff_None = 0,
- eWarp_Falloff_Curve = 1,
- eWarp_Falloff_Sharp = 2, /* PROP_SHARP */
- eWarp_Falloff_Smooth = 3, /* PROP_SMOOTH */
- eWarp_Falloff_Root = 4, /* PROP_ROOT */
- eWarp_Falloff_Linear = 5, /* PROP_LIN */
- eWarp_Falloff_Const = 6, /* PROP_CONST */
- eWarp_Falloff_Sphere = 7, /* PROP_SPHERE */
+ eWarp_Falloff_None = 0,
+ eWarp_Falloff_Curve = 1,
+ eWarp_Falloff_Sharp = 2, /* PROP_SHARP */
+ eWarp_Falloff_Smooth = 3, /* PROP_SMOOTH */
+ eWarp_Falloff_Root = 4, /* PROP_ROOT */
+ eWarp_Falloff_Linear = 5, /* PROP_LIN */
+ eWarp_Falloff_Const = 6, /* PROP_CONST */
+ eWarp_Falloff_Sphere = 7, /* PROP_SPHERE */
/* PROP_RANDOM not used */
} WarpModifierFalloff;
typedef struct WeightVGEditModifierData {
ModifierData modifier;
- /* Note: I tried to keep everything logically ordered - provided the
- * alignment constraints... */
-
- char defgrp_name[64]; /* Name of vertex group to edit. MAX_VGROUP_NAME. */
+ char defgrp_name[64]; /* Name of vertex group to edit. MAX_VGROUP_NAME. */
- short edit_flags; /* Using MOD_WVG_EDIT_* flags. */
- short falloff_type; /* Using MOD_WVG_MAPPING_* defines. */
- float default_weight; /* Weight for vertices not in vgroup. */
+ short edit_flags; /* Using MOD_WVG_EDIT_* flags. */
+ short falloff_type; /* Using MOD_WVG_MAPPING_* defines. */
+ float default_weight; /* Weight for vertices not in vgroup. */
/* Mapping stuff. */
struct CurveMapping *cmap_curve; /* The custom mapping curve! */
/* The add/remove vertices weight thresholds. */
- float add_threshold, rem_threshold;
+ float add_threshold, rem_threshold;
/* Masking options. */
- float mask_constant; /* The global "influence", if no vgroup nor tex is used as mask. */
- /* Name of mask vertex group from which to get weight factors. */
- char mask_defgrp_name[64]; /* MAX_VGROUP_NAME */
+ float mask_constant; /* The global "influence", if no vgroup nor tex is used as mask. */
+ char mask_defgrp_name[64]; /* Name of mask vertex group from which to get weight factors. MAX_VGROUP_NAME */
/* Texture masking. */
- int mask_tex_use_channel; /* Which channel to use as weightf. */
+ int mask_tex_use_channel; /* Which channel to use as weightf. */
struct Tex *mask_texture; /* The texture. */
struct Object *mask_tex_map_obj; /* Name of the map object. */
- /* How to map the texture (using MOD_DISP_MAP_* constants). */
- int mask_tex_mapping;
- char mask_tex_uvlayer_name[64]; /* Name of the UV map. MAX_CUSTOMDATA_LAYER_NAME */
+ int mask_tex_mapping; /* How to map the texture (using MOD_DISP_MAP_* enums). */
+ char mask_tex_uvlayer_name[64]; /* Name of the UV map. MAX_CUSTOMDATA_LAYER_NAME */
/* Padding... */
int pad_i1;
} WeightVGEditModifierData;
/* WeightVGEdit flags. */
-/* Use parametric mapping. */
-//#define MOD_WVG_EDIT_MAP (1 << 0)
-/* Use curve mapping. */
-//#define MOD_WVG_EDIT_CMAP (1 << 1)
-/* Reverse weights (in the [0.0, 1.0] standard range). */
-//#define MOD_WVG_EDIT_REVERSE_WEIGHTS (1 << 2)
-/* Add vertices with higher weight than threshold to vgroup. */
-#define MOD_WVG_EDIT_ADD2VG (1 << 3)
-/* Remove vertices with lower weight than threshold from vgroup. */
-#define MOD_WVG_EDIT_REMFVG (1 << 4)
-/* Clamp weights. */
-//#define MOD_WVG_EDIT_CLAMP (1 << 5)
+enum {
+ /* (1 << 0), (1 << 1) and (1 << 2) are free for future use! */
+ MOD_WVG_EDIT_ADD2VG = (1 << 3), /* Add vertices with higher weight than threshold to vgroup. */
+ MOD_WVG_EDIT_REMFVG = (1 << 4), /* Remove vertices with lower weight than threshold from vgroup. */
+};
typedef struct WeightVGMixModifierData {
ModifierData modifier;
- /* XXX Note: I tried to keep everything logically ordered - provided the
- * alignment constraints... */
-
- char defgrp_name_a[64]; /* Name of vertex group to modify/weight. MAX_VGROUP_NAME. */
- char defgrp_name_b[64]; /* Name of other vertex group to mix in. MAX_VGROUP_NAME. */
- float default_weight_a; /* Default weight value for first vgroup. */
- float default_weight_b; /* Default weight value to mix in. */
- char mix_mode; /* How second vgroups weights affect first ones */
- char mix_set; /* What vertices to affect. */
+ char defgrp_name_a[64]; /* Name of vertex group to modify/weight. MAX_VGROUP_NAME. */
+ char defgrp_name_b[64]; /* Name of other vertex group to mix in. MAX_VGROUP_NAME. */
+ float default_weight_a; /* Default weight value for first vgroup. */
+ float default_weight_b; /* Default weight value to mix in. */
+ char mix_mode; /* How second vgroups weights affect first ones */
+ char mix_set; /* What vertices to affect. */
- char pad_c1[6];
+ char pad_c1[6];
/* Masking options. */
- float mask_constant; /* The global "influence", if no vgroup nor tex is used as mask. */
- /* Name of mask vertex group from which to get weight factors. */
- char mask_defgrp_name[64]; /* MAX_VGROUP_NAME */
+ float mask_constant; /* The global "influence", if no vgroup nor tex is used as mask. */
+ char mask_defgrp_name[64]; /* Name of mask vertex group from which to get weight factors. MAX_VGROUP_NAME */
/* Texture masking. */
- int mask_tex_use_channel; /* Which channel to use as weightf. */
- struct Tex *mask_texture; /* The texture. */
- struct Object *mask_tex_map_obj; /* Name of the map object. */
- int mask_tex_mapping; /* How to map the texture! */
- char mask_tex_uvlayer_name[64]; /* Name of the UV map. MAX_CUSTOMDATA_LAYER_NAME. */
+ int mask_tex_use_channel; /* Which channel to use as weightf. */
+ struct Tex *mask_texture; /* The texture. */
+ struct Object *mask_tex_map_obj; /* Name of the map object. */
+ int mask_tex_mapping; /* How to map the texture! */
+ char mask_tex_uvlayer_name[64]; /* Name of the UV map. MAX_CUSTOMDATA_LAYER_NAME. */
/* Padding... */
int pad_i1;
} WeightVGMixModifierData;
/* How second vgroup's weights affect first ones. */
-#define MOD_WVG_MIX_SET 1 /* Second weights replace weights. */
-#define MOD_WVG_MIX_ADD 2 /* Second weights are added to weights. */
-#define MOD_WVG_MIX_SUB 3 /* Second weights are subtracted from weights. */
-#define MOD_WVG_MIX_MUL 4 /* Second weights are multiplied with weights. */
-#define MOD_WVG_MIX_DIV 5 /* Second weights divide weights. */
-#define MOD_WVG_MIX_DIF 6 /* Difference between second weights and weights. */
-#define MOD_WVG_MIX_AVG 7 /* Average of both weights. */
+enum {
+ MOD_WVG_MIX_SET = 1, /* Second weights replace weights. */
+ MOD_WVG_MIX_ADD = 2, /* Second weights are added to weights. */
+ MOD_WVG_MIX_SUB = 3, /* Second weights are subtracted from weights. */
+ MOD_WVG_MIX_MUL = 4, /* Second weights are multiplied with weights. */
+ MOD_WVG_MIX_DIV = 5, /* Second weights divide weights. */
+ MOD_WVG_MIX_DIF = 6, /* Difference between second weights and weights. */
+ MOD_WVG_MIX_AVG = 7, /* Average of both weights. */
+};
/* What vertices to affect. */
-#define MOD_WVG_SET_ALL 1 /* Affect all vertices. */
-#define MOD_WVG_SET_A 2 /* Affect only vertices in first vgroup. */
-#define MOD_WVG_SET_B 3 /* Affect only vertices in second vgroup. */
-#define MOD_WVG_SET_OR 4 /* Affect only vertices in one vgroup or the other. */
-#define MOD_WVG_SET_AND 5 /* Affect only vertices in both vgroups. */
+enum {
+ MOD_WVG_SET_ALL = 1, /* Affect all vertices. */
+ MOD_WVG_SET_A = 2, /* Affect only vertices in first vgroup. */
+ MOD_WVG_SET_B = 3, /* Affect only vertices in second vgroup. */
+ MOD_WVG_SET_OR = 4, /* Affect only vertices in one vgroup or the other. */
+ MOD_WVG_SET_AND = 5, /* Affect only vertices in both vgroups. */
+};
typedef struct WeightVGProximityModifierData {
ModifierData modifier;
- /* Note: I tried to keep everything logically ordered - provided the
- * alignment constraints... */
-
- char defgrp_name[64]; /* Name of vertex group to modify/weight. MAX_VGROUP_NAME. */
+ char defgrp_name[64]; /* Name of vertex group to modify/weight. MAX_VGROUP_NAME. */
/* Proximity modes. */
- int proximity_mode;
- int proximity_flags;
+ int proximity_mode;
+ int proximity_flags;
/* Target object from which to calculate vertices distances. */
struct Object *proximity_ob_target;
/* Masking options. */
- float mask_constant; /* The global "influence", if no vgroup nor tex is used as mask. */
- /* Name of mask vertex group from which to get weight factors. */
- char mask_defgrp_name[64]; /* MAX_VGROUP_NAME */
+ float mask_constant; /* The global "influence", if no vgroup nor tex is used as mask. */
+ char mask_defgrp_name[64]; /* Name of mask vertex group from which to get weight factors. MAX_VGROUP_NAME */
/* Texture masking. */
- int mask_tex_use_channel; /* Which channel to use as weightf. */
- struct Tex *mask_texture; /* The texture. */
- struct Object *mask_tex_map_obj; /* Name of the map object. */
- int mask_tex_mapping; /* How to map the texture! */
- char mask_tex_uvlayer_name[64]; /* Name of the UV Map. MAX_CUSTOMDATA_LAYER_NAME. */
+ int mask_tex_use_channel; /* Which channel to use as weightf. */
+ struct Tex *mask_texture; /* The texture. */
+ struct Object *mask_tex_map_obj; /* Name of the map object. */
+ int mask_tex_mapping; /* How to map the texture! */
+ char mask_tex_uvlayer_name[64]; /* Name of the UV Map. MAX_CUSTOMDATA_LAYER_NAME. */
- float min_dist, max_dist; /* Distances mapping to 0.0/1.0 weights. */
+ float min_dist, max_dist; /* Distances mapping to 0.0/1.0 weights. */
/* Put here to avoid breaking existing struct... */
- short falloff_type; /* Using MOD_WVG_MAPPING_* defines. */
+ short falloff_type; /* Using MOD_WVG_MAPPING_* enums. */
/* Padding... */
short pad_s1;
} WeightVGProximityModifierData;
/* Modes of proximity weighting. */
-/* Dist from target object to affected object. */
-#define MOD_WVG_PROXIMITY_OBJECT 1 /* source vertex to other location */
-/* Dist from target object to vertex. */
-#define MOD_WVG_PROXIMITY_GEOMETRY 2 /* source vertex to other geometry */
+enum {
+ MOD_WVG_PROXIMITY_OBJECT = 1, /* source vertex to other location */
+ MOD_WVG_PROXIMITY_GEOMETRY = 2, /* source vertex to other geometry */
+};
/* Flags options for proximity weighting. */
-/* Use nearest vertices of target obj, in MOD_WVG_PROXIMITY_GEOMETRY mode. */
-#define MOD_WVG_PROXIMITY_GEOM_VERTS (1 << 0)
-/* Use nearest edges of target obj, in MOD_WVG_PROXIMITY_GEOMETRY mode. */
-#define MOD_WVG_PROXIMITY_GEOM_EDGES (1 << 1)
-/* Use nearest faces of target obj, in MOD_WVG_PROXIMITY_GEOMETRY mode. */
-#define MOD_WVG_PROXIMITY_GEOM_FACES (1 << 2)
+enum {
+ /* Use nearest vertices of target obj, in MOD_WVG_PROXIMITY_GEOMETRY mode. */
+ MOD_WVG_PROXIMITY_GEOM_VERTS = (1 << 0),
+ /* Use nearest edges of target obj, in MOD_WVG_PROXIMITY_GEOMETRY mode. */
+ MOD_WVG_PROXIMITY_GEOM_EDGES = (1 << 1),
+ /* Use nearest faces of target obj, in MOD_WVG_PROXIMITY_GEOMETRY mode. */
+ MOD_WVG_PROXIMITY_GEOM_FACES = (1 << 2),
+};
/* Defines common to all WeightVG modifiers. */
/* Mapping modes. */
-#define MOD_WVG_MAPPING_NONE 0
-#define MOD_WVG_MAPPING_CURVE 1
-#define MOD_WVG_MAPPING_SHARP 2 /* PROP_SHARP */
-#define MOD_WVG_MAPPING_SMOOTH 3 /* PROP_SMOOTH */
-#define MOD_WVG_MAPPING_ROOT 4 /* PROP_ROOT */
-/* PROP_LIN not used (same as NONE, here...). */
-/* PROP_CONST not used. */
-#define MOD_WVG_MAPPING_SPHERE 7 /* PROP_SPHERE */
-#define MOD_WVG_MAPPING_RANDOM 8 /* PROP_RANDOM */
-#define MOD_WVG_MAPPING_STEP 9 /* Median Step. */
+enum {
+ MOD_WVG_MAPPING_NONE = 0,
+ MOD_WVG_MAPPING_CURVE = 1,
+ MOD_WVG_MAPPING_SHARP = 2, /* PROP_SHARP */
+ MOD_WVG_MAPPING_SMOOTH = 3, /* PROP_SMOOTH */
+ MOD_WVG_MAPPING_ROOT = 4, /* PROP_ROOT */
+ /* PROP_LIN not used (same as NONE, here...). */
+ /* PROP_CONST not used. */
+ MOD_WVG_MAPPING_SPHERE = 7, /* PROP_SPHERE */
+ MOD_WVG_MAPPING_RANDOM = 8, /* PROP_RANDOM */
+ MOD_WVG_MAPPING_STEP = 9, /* Median Step. */
+};
/* Tex channel to be used as mask. */
-#define MOD_WVG_MASK_TEX_USE_INT 1
-#define MOD_WVG_MASK_TEX_USE_RED 2
-#define MOD_WVG_MASK_TEX_USE_GREEN 3
-#define MOD_WVG_MASK_TEX_USE_BLUE 4
-#define MOD_WVG_MASK_TEX_USE_HUE 5
-#define MOD_WVG_MASK_TEX_USE_SAT 6
-#define MOD_WVG_MASK_TEX_USE_VAL 7
-#define MOD_WVG_MASK_TEX_USE_ALPHA 8
-
-/* Dynamic paint modifier flags */
-#define MOD_DYNAMICPAINT_TYPE_CANVAS (1 << 0)
-#define MOD_DYNAMICPAINT_TYPE_BRUSH (1 << 1)
+enum {
+ MOD_WVG_MASK_TEX_USE_INT = 1,
+ MOD_WVG_MASK_TEX_USE_RED = 2,
+ MOD_WVG_MASK_TEX_USE_GREEN = 3,
+ MOD_WVG_MASK_TEX_USE_BLUE = 4,
+ MOD_WVG_MASK_TEX_USE_HUE = 5,
+ MOD_WVG_MASK_TEX_USE_SAT = 6,
+ MOD_WVG_MASK_TEX_USE_VAL = 7,
+ MOD_WVG_MASK_TEX_USE_ALPHA = 8,
+};
typedef struct DynamicPaintModifierData {
ModifierData modifier;
@@ -1058,18 +1107,23 @@ typedef struct DynamicPaintModifierData {
int pad;
} DynamicPaintModifierData;
-/* Remesh modifier */
+/* Dynamic paint modifier flags */
+enum {
+ MOD_DYNAMICPAINT_TYPE_CANVAS = (1 << 0),
+ MOD_DYNAMICPAINT_TYPE_BRUSH = (1 << 1),
+};
+/* Remesh modifier */
typedef enum RemeshModifierFlags {
- MOD_REMESH_FLOOD_FILL = 1,
+ MOD_REMESH_FLOOD_FILL = 1,
MOD_REMESH_SMOOTH_SHADING = 2,
} RemeshModifierFlags;
typedef enum RemeshModifierMode {
/* blocky */
- MOD_REMESH_CENTROID = 0,
+ MOD_REMESH_CENTROID = 0,
/* smooth */
- MOD_REMESH_MASS_POINT = 1,
+ MOD_REMESH_MASS_POINT = 1,
/* keeps sharp edges */
MOD_REMESH_SHARP_FEATURES = 2,
} RemeshModifierMode;
@@ -1077,8 +1131,7 @@ typedef enum RemeshModifierMode {
typedef struct RemeshModifierData {
ModifierData modifier;
- /* floodfill option, controls how small components can be
- * before they are removed */
+ /* floodfill option, controls how small components can be before they are removed */
float threshold;
/* ratio between size of model and grid */
@@ -1095,14 +1148,13 @@ typedef struct RemeshModifierData {
} RemeshModifierData;
/* Skin modifier */
-
typedef struct SkinModifierData {
ModifierData modifier;
float branch_smoothing;
char flag;
-
+
char symmetry_axes;
char pad[2];
@@ -1110,20 +1162,20 @@ typedef struct SkinModifierData {
/* SkinModifierData.symmetry_axes */
enum {
- MOD_SKIN_SYMM_X = 1,
- MOD_SKIN_SYMM_Y = 2,
- MOD_SKIN_SYMM_Z = 4,
+ MOD_SKIN_SYMM_X = (1 << 0),
+ MOD_SKIN_SYMM_Y = (1 << 1),
+ MOD_SKIN_SYMM_Z = (1 << 2),
};
/* SkinModifierData.flag */
enum {
- MOD_SKIN_SMOOTH_SHADING = 1
+ MOD_SKIN_SMOOTH_SHADING = 1,
};
/* Triangulate modifier */
-
typedef struct TriangulateModifierData {
ModifierData modifier;
+
int flag;
int pad;
} TriangulateModifierData;
@@ -1132,39 +1184,43 @@ enum {
MOD_TRIANGULATE_BEAUTY = (1 << 0),
};
-/* Smooth modifier flags */
-#define MOD_LAPLACIANSMOOTH_X (1<<1)
-#define MOD_LAPLACIANSMOOTH_Y (1<<2)
-#define MOD_LAPLACIANSMOOTH_Z (1<<3)
-#define MOD_LAPLACIANSMOOTH_PRESERVE_VOLUME (1 << 4)
-#define MOD_LAPLACIANSMOOTH_NORMALIZED (1 << 5)
-
typedef struct LaplacianSmoothModifierData {
ModifierData modifier;
+
float lambda, lambda_border, pad1;
- char defgrp_name[64]; /* MAX_VGROUP_NAME */
+ char defgrp_name[64]; /* MAX_VGROUP_NAME */
short flag, repeat;
} LaplacianSmoothModifierData;
+/* Smooth modifier flags */
+enum {
+ MOD_LAPLACIANSMOOTH_X = (1 << 1),
+ MOD_LAPLACIANSMOOTH_Y = (1 << 2),
+ MOD_LAPLACIANSMOOTH_Z = (1 << 3),
+ MOD_LAPLACIANSMOOTH_PRESERVE_VOLUME = (1 << 4),
+ MOD_LAPLACIANSMOOTH_NORMALIZED = (1 << 5),
+};
+
typedef struct UVWarpModifierData {
ModifierData modifier;
char axis_u, axis_v;
char pad[6];
- float center[2]; /* used for rotate/scale */
+ float center[2]; /* used for rotate/scale */
struct Object *object_src; /* source */
- char bone_src[64]; /* optional name of bone target, MAX_ID_NAME-2 */
+ char bone_src[64]; /* optional name of bone target, MAX_ID_NAME-2 */
struct Object *object_dst; /* target */
- char bone_dst[64]; /* optional name of bone target, MAX_ID_NAME-2 */
+ char bone_dst[64]; /* optional name of bone target, MAX_ID_NAME-2 */
- char vgroup_name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
- char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
+ char vgroup_name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
+ char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
} UVWarpModifierData;
/* cache modifier */
typedef struct MeshCacheModifierData {
ModifierData modifier;
+
char flag;
char type; /* file format */
char time_mode;
@@ -1191,29 +1247,29 @@ typedef struct MeshCacheModifierData {
float eval_time;
float eval_factor;
- char filepath[1024]; // FILE_MAX
+ char filepath[1024]; /* FILE_MAX */
} MeshCacheModifierData;
enum {
MOD_MESHCACHE_TYPE_MDD = 1,
- MOD_MESHCACHE_TYPE_PC2 = 2
+ MOD_MESHCACHE_TYPE_PC2 = 2,
};
enum {
MOD_MESHCACHE_DEFORM_OVERWRITE = 0,
- MOD_MESHCACHE_DEFORM_INTEGRATE = 1
+ MOD_MESHCACHE_DEFORM_INTEGRATE = 1,
};
enum {
- MOD_MESHCACHE_INTERP_NONE = 0,
- MOD_MESHCACHE_INTERP_LINEAR = 1,
- // MOD_MESHCACHE_INTERP_CARDINAL = 2
+ MOD_MESHCACHE_INTERP_NONE = 0,
+ MOD_MESHCACHE_INTERP_LINEAR = 1,
+/* MOD_MESHCACHE_INTERP_CARDINAL = 2, */
};
enum {
- MOD_MESHCACHE_TIME_FRAME = 0,
+ MOD_MESHCACHE_TIME_FRAME = 0,
MOD_MESHCACHE_TIME_SECONDS = 1,
- MOD_MESHCACHE_TIME_FACTOR = 2,
+ MOD_MESHCACHE_TIME_FACTOR = 2,
};
enum {
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index 109cdf5f1a1..451dd20daa6 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -149,23 +149,16 @@ typedef enum eNodeSocketInOut {
} eNodeSocketInOut;
/* sock->flag, first bit is select */
- /* hidden is user defined, to hide unused */
-#define SOCK_HIDDEN 2
- /* for quick check if socket is linked */
-#define SOCK_IN_USE 4
- /* unavailable is for dynamic sockets */
-#define SOCK_UNAVAIL 8
- /* DEPRECATED dynamic socket (can be modified by user) */
-#define __SOCK_DYNAMIC 16
- /* DEPRECATED group socket should not be exposed */
-#define __SOCK_INTERNAL 32
- /* socket collapsed in UI */
-#define SOCK_COLLAPSED 64
- /* hide socket value, if it gets auto default */
-#define SOCK_HIDE_VALUE 128
- /* socket hidden automatically, to distinguish from manually hidden */
- /* DEPRECATED, only kept here to avoid reusing the flag */
-#define SOCK_AUTO_HIDDEN__DEPRECATED 256
+typedef enum eNodeSocketFlag {
+ SOCK_HIDDEN = 2, /* hidden is user defined, to hide unused */
+ SOCK_IN_USE = 4, /* for quick check if socket is linked */
+ SOCK_UNAVAIL = 8, /* unavailable is for dynamic sockets */
+ __SOCK_DYNAMIC = 16, /* DEPRECATED dynamic socket (can be modified by user) */
+ __SOCK_INTERNAL = 32, /* DEPRECATED group socket should not be exposed */
+ SOCK_COLLAPSED = 64, /* socket collapsed in UI */
+ SOCK_HIDE_VALUE = 128, /* hide socket value, if it gets auto default */
+ SOCK_AUTO_HIDDEN__DEPRECATED = 256 /* socket hidden automatically, to distinguish from manually hidden */
+} eNodeSocketFlag;
/* limit data in bNode to what we want to see saved? */
typedef struct bNode {
@@ -409,6 +402,7 @@ typedef struct bNodeTree {
#define NTREE_TWO_PASS 4 /* two pass */
#define NTREE_COM_GROUPNODE_BUFFER 8 /* use groupnode buffers */
#define NTREE_VIEWER_BORDER 16 /* use a border for viewer nodes */
+#define NTREE_IS_LOCALIZED 32 /* tree is localized copy, free when deleting node groups */
/* XXX not nice, but needed as a temporary flags
* for group updates after library linking.
@@ -720,8 +714,10 @@ typedef struct NodeTexBase {
typedef struct NodeTexSky {
NodeTexBase base;
+ int sky_model;
float sun_direction[3];
float turbidity;
+ float ground_albedo;
} NodeTexSky;
typedef struct NodeTexImage {
@@ -892,6 +888,10 @@ typedef struct NodeShaderNormalMap {
#define SHD_TOON_DIFFUSE 0
#define SHD_TOON_GLOSSY 1
+/* hair components */
+#define SHD_HAIR_REFLECTION 0
+#define SHD_HAIR_TRANSMISSION 1
+
/* blend texture */
#define SHD_BLEND_LINEAR 0
#define SHD_BLEND_QUADRATIC 1
@@ -937,9 +937,9 @@ typedef struct NodeShaderNormalMap {
#define SHD_WAVE_BANDS 0
#define SHD_WAVE_RINGS 1
-#define SHD_WAVE_SINE 0
-#define SHD_WAVE_SAW 1
-#define SHD_WAVE_TRI 2
+/* sky texture */
+#define SHD_SKY_OLD 0
+#define SHD_SKY_NEW 1
/* image/environment texture */
#define SHD_COLORSPACE_NONE 0
@@ -969,6 +969,11 @@ typedef struct NodeShaderNormalMap {
#define SHD_NORMAL_MAP_BLENDER_OBJECT 3
#define SHD_NORMAL_MAP_BLENDER_WORLD 4
+/* subsurface */
+#define SHD_SUBSURFACE_COMPATIBLE 0 // Deprecated
+#define SHD_SUBSURFACE_CUBIC 1
+#define SHD_SUBSURFACE_GAUSSIAN 2
+
/* blur node */
#define CMP_NODE_BLUR_ASPECT_NONE 0
#define CMP_NODE_BLUR_ASPECT_Y 1
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index de34f101c31..2ff697f513f 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -41,7 +41,7 @@
#ifdef __cplusplus
extern "C" {
#endif
-
+
struct Object;
struct AnimData;
struct Ipo;
@@ -100,7 +100,10 @@ typedef struct BoundBox {
} BoundBox;
/* boundbox flag */
-#define OB_BB_DISABLED 1
+enum {
+ BOUNDBOX_DISABLED = (1 << 0),
+ BOUNDBOX_DIRTY = (1 << 1),
+};
typedef struct Object {
ID id;
@@ -130,7 +133,6 @@ typedef struct Object {
ListBase constraintChannels DNA_DEPRECATED; // XXX deprecated... old animation system
ListBase effect DNA_DEPRECATED; // XXX deprecated... keep for readfile
- ListBase disp; /* list of DispList, used by lattice, metaballs curve & surfaces */
ListBase defbase; /* list of bDeformGroup (vertex groups) names and flag only */
ListBase modifiers; /* list of ModifierData structures */
@@ -140,7 +142,7 @@ typedef struct Object {
/* materials */
struct Material **mat; /* material slots */
char *matbits; /* a boolean field, with each byte 1 if corresponding material is linked to object */
- int totcol; /* copy of mesh or curve or meta */
+ int totcol; /* copy of mesh, curve & meta struct member of same name (keep in sync) */
int actcol; /* currently selected material in the UI */
/* rot en drot have to be together! (transform('r' en 's')) */
@@ -276,6 +278,9 @@ typedef struct Object {
struct RigidBodyCon *rigidbody_constraint; /* settings for Bullet constraint */
float ima_ofs[2]; /* offset for image empties */
+
+ /* Runtime valuated curve-specific data, not stored in the file */
+ struct CurveCache *curve_cache;
} Object;
/* Warning, this is not used anymore because hooks are now modifiers */
@@ -318,26 +323,28 @@ typedef struct DupliObject {
/* **************** OBJECT ********************* */
/* used many places... should be specialized */
-#define SELECT 1
+#define SELECT 1
/* type */
-#define OB_EMPTY 0
-#define OB_MESH 1
-#define OB_CURVE 2
-#define OB_SURF 3
-#define OB_FONT 4
-#define OB_MBALL 5
+enum {
+ OB_EMPTY = 0,
+ OB_MESH = 1,
+ OB_CURVE = 2,
+ OB_SURF = 3,
+ OB_FONT = 4,
+ OB_MBALL = 5,
-#define OB_LAMP 10
-#define OB_CAMERA 11
+ OB_LAMP = 10,
+ OB_CAMERA = 11,
-#define OB_SPEAKER 12
+ OB_SPEAKER = 12,
-// #define OB_WAVE 21
-#define OB_LATTICE 22
+/* OB_WAVE = 21, */
+ OB_LATTICE = 22,
/* 23 and 24 are for life and sector (old file compat.) */
-#define OB_ARMATURE 25
+ OB_ARMATURE = 25,
+};
/* check if the object type supports materials */
#define OB_TYPE_SUPPORT_MATERIAL(_type) \
@@ -346,6 +353,8 @@ typedef struct DupliObject {
(ELEM(_type, OB_MESH, OB_LATTICE))
#define OB_TYPE_SUPPORT_EDITMODE(_type) \
(ELEM7(_type, OB_MESH, OB_FONT, OB_CURVE, OB_SURF, OB_MBALL, OB_LATTICE, OB_ARMATURE))
+#define OB_TYPE_SUPPORT_PARVERT(_type) \
+ (ELEM4(_type, OB_MESH, OB_SURF, OB_CURVE, OB_LATTICE))
/* is this ID type used as object data */
#define OB_DATA_SUPPORT_ID(_id_type) \
@@ -355,263 +364,300 @@ typedef struct DupliObject {
ID_ME: case ID_CU: case ID_MB: case ID_LA: case ID_SPK: case ID_CA: case ID_LT: case ID_AR
/* partype: first 4 bits: type */
-#define PARTYPE 15
-#define PAROBJECT 0
-#define PARCURVE 1
-#define PARKEY 2
+enum {
+ PARTYPE = (1 << 4) - 1,
+ PAROBJECT = 0,
+ PARCURVE = 1,
+ PARKEY = 2,
-#define PARSKEL 4
-#define PARVERT1 5
-#define PARVERT3 6
-#define PARBONE 7
+ PARSKEL = 4,
+ PARVERT1 = 5,
+ PARVERT3 = 6,
+ PARBONE = 7,
/* slow parenting - is not threadsafe and/or may give errors after jumping */
-#define PARSLOW 16
+ PARSLOW = 16,
+};
/* (short) transflag */
/* flags 1 and 2 were unused or relics from past features */
-#define OB_NEG_SCALE 4
-#define OB_DUPLI (8+16+256+512+2048)
-#define OB_DUPLIFRAMES 8
-#define OB_DUPLIVERTS 16
-#define OB_DUPLIROT 32
-#define OB_DUPLINOSPEED 64
-/*#define OB_POWERTRACK 128*/ /*UNUSED*/
-#define OB_DUPLIGROUP 256
-#define OB_DUPLIFACES 512
-#define OB_DUPLIFACES_SCALE 1024
-#define OB_DUPLIPARTS 2048
-#define OB_RENDER_DUPLI 4096
-#define OB_NO_CONSTRAINTS 8192 /* runtime constraints disable */
-#define OB_NO_PSYS_UPDATE 16384 /* hack to work around particle issue */
+enum {
+ OB_NEG_SCALE = 1 << 2,
+ OB_DUPLIFRAMES = 1 << 3,
+ OB_DUPLIVERTS = 1 << 4,
+ OB_DUPLIROT = 1 << 5,
+ OB_DUPLINOSPEED = 1 << 6,
+/* OB_POWERTRACK = 1 << 7,*/ /*UNUSED*/
+ OB_DUPLIGROUP = 1 << 8,
+ OB_DUPLIFACES = 1 << 9,
+ OB_DUPLIFACES_SCALE = 1 << 10,
+ OB_DUPLIPARTS = 1 << 11,
+ OB_RENDER_DUPLI = 1 << 12,
+ OB_NO_CONSTRAINTS = 1 << 13, /* runtime constraints disable */
+ OB_NO_PSYS_UPDATE = 1 << 14, /* hack to work around particle issue */
+
+ OB_DUPLI = OB_DUPLIFRAMES | OB_DUPLIVERTS | OB_DUPLIGROUP | OB_DUPLIFACES | OB_DUPLIPARTS,
+};
/* (short) ipoflag */
/* XXX: many old flags for features removed due to incompatibility
* with new system and/or other design issues were here
*/
/* for stride/path editing (XXX: NEEDS REVIEW) */
-#define OB_DISABLE_PATH 1024
+#define OB_DISABLE_PATH (1 << 10)
/* (short) trackflag / upflag */
-#define OB_POSX 0
-#define OB_POSY 1
-#define OB_POSZ 2
-#define OB_NEGX 3
-#define OB_NEGY 4
-#define OB_NEGZ 5
+enum {
+ OB_POSX = 0,
+ OB_POSY = 1,
+ OB_POSZ = 2,
+ OB_NEGX = 3,
+ OB_NEGY = 4,
+ OB_NEGZ = 5,
+};
/* gameflag in game.h */
/* dt: no flags */
-#define OB_BOUNDBOX 1
-#define OB_WIRE 2
-#define OB_SOLID 3
-#define OB_MATERIAL 4
-#define OB_TEXTURE 5
-#define OB_RENDER 6
+enum {
+ OB_BOUNDBOX = 1,
+ OB_WIRE = 2,
+ OB_SOLID = 3,
+ OB_MATERIAL = 4,
+ OB_TEXTURE = 5,
+ OB_RENDER = 6,
-#define OB_PAINT 100 /* temporary used in draw code */
+ OB_PAINT = 100, /* temporary used in draw code */
+};
/* dtx: flags (short) */
-#define OB_DRAWBOUNDOX (1 << 0)
-#define OB_AXIS (1 << 1)
-#define OB_TEXSPACE (1 << 2)
-#define OB_DRAWNAME (1 << 3)
-#define OB_DRAWIMAGE (1 << 4)
+enum {
+ OB_DRAWBOUNDOX = 1 << 0,
+ OB_AXIS = 1 << 1,
+ OB_TEXSPACE = 1 << 2,
+ OB_DRAWNAME = 1 << 3,
+ OB_DRAWIMAGE = 1 << 4,
/* for solid+wire display */
-#define OB_DRAWWIRE (1 << 5)
+ OB_DRAWWIRE = 1 << 5,
/* for overdraw s*/
-#define OB_DRAWXRAY (1 << 6)
+ OB_DRAWXRAY = 1 << 6,
/* enable transparent draw */
-#define OB_DRAWTRANSP (1 << 7)
-#define OB_DRAW_ALL_EDGES (1 << 8) /* only for meshes currently */
+ OB_DRAWTRANSP = 1 << 7,
+ OB_DRAW_ALL_EDGES = 1 << 8, /* only for meshes currently */
+};
/* empty_drawtype: no flags */
-#define OB_ARROWS 1
-#define OB_PLAINAXES 2
-#define OB_CIRCLE 3
-#define OB_SINGLE_ARROW 4
-#define OB_CUBE 5
-#define OB_EMPTY_SPHERE 6
-#define OB_EMPTY_CONE 7
-#define OB_EMPTY_IMAGE 8
+enum {
+ OB_ARROWS = 1,
+ OB_PLAINAXES = 2,
+ OB_CIRCLE = 3,
+ OB_SINGLE_ARROW = 4,
+ OB_CUBE = 5,
+ OB_EMPTY_SPHERE = 6,
+ OB_EMPTY_CONE = 7,
+ OB_EMPTY_IMAGE = 8,
+};
/* boundtype */
-#define OB_BOUND_BOX 0
-#define OB_BOUND_SPHERE 1
-#define OB_BOUND_CYLINDER 2
-#define OB_BOUND_CONE 3
-#define OB_BOUND_TRIANGLE_MESH 4
-#define OB_BOUND_CONVEX_HULL 5
-/* #define OB_BOUND_DYN_MESH 6 */ /*UNUSED*/
-#define OB_BOUND_CAPSULE 7
+enum {
+ OB_BOUND_BOX = 0,
+ OB_BOUND_SPHERE = 1,
+ OB_BOUND_CYLINDER = 2,
+ OB_BOUND_CONE = 3,
+ OB_BOUND_TRIANGLE_MESH = 4,
+ OB_BOUND_CONVEX_HULL = 5,
+/* OB_BOUND_DYN_MESH = 6, */ /*UNUSED*/
+ OB_BOUND_CAPSULE = 7,
+};
/* **************** BASE ********************* */
-/* also needed for base!!!!! or rather, thy interfere....*/
+/* also needed for base!!!!! or rather, they interfere....*/
/* base->flag and ob->flag */
-#define BA_WAS_SEL 2
-#define BA_HAS_RECALC_OB 4
-#define BA_HAS_RECALC_DATA 8
+#define BA_WAS_SEL (1 << 1)
+#define BA_HAS_RECALC_OB (1 << 2)
+#define BA_HAS_RECALC_DATA (1 << 3)
/* NOTE: this was used as a proper setting in past, so nullify before using */
-#define BA_TEMP_TAG 32
+#define BA_TEMP_TAG (1 << 5)
-/* #define BA_FROMSET 128 */ /*UNUSED*/
+/* #define BA_FROMSET (1 << 7) */ /*UNUSED*/
-#define BA_TRANSFORM_CHILD 256 /* child of a transformed object */
-#define BA_TRANSFORM_PARENT 8192 /* parent of a transformed object */
+#define BA_TRANSFORM_CHILD (1 << 8) /* child of a transformed object */
+#define BA_TRANSFORM_PARENT (1 << 13) /* parent of a transformed object */
/* an initial attempt as making selection more specific! */
-#define BA_DESELECT 0
-#define BA_SELECT 1
+#define BA_DESELECT 0
+#define BA_SELECT 1
-#define OB_FROMDUPLI 512
-#define OB_DONE 1024
-// #define OB_RADIO 2048 /* deprecated */
-#define OB_FROMGROUP 4096
+#define OB_FROMDUPLI (1 << 9)
+#define OB_DONE (1 << 10)
+/* #define OB_RADIO (1 << 11) */ /* deprecated */
+#define OB_FROMGROUP (1 << 12)
/* WARNING - when adding flags check on PSYS_RECALC */
/* ob->recalc (flag bits!) */
-#define OB_RECALC_OB (1 << 0)
-#define OB_RECALC_DATA (1 << 1)
+enum {
+ OB_RECALC_OB = 1 << 0,
+ OB_RECALC_DATA = 1 << 1,
/* time flag is set when time changes need recalc, so baked systems can ignore it */
-#define OB_RECALC_TIME (1 << 2)
+ OB_RECALC_TIME = 1 << 2,
/* only use for matching any flag, NOT as an argument since more flags may be added. */
-#define OB_RECALC_ALL (OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME)
+ OB_RECALC_ALL = OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME,
+};
/* controller state */
-#define OB_MAX_STATES 30
+#define OB_MAX_STATES 30
/* collision masks */
-#define OB_MAX_COL_MASKS 8
+#define OB_MAX_COL_MASKS 8
/* ob->gameflag */
-#define OB_DYNAMIC 1
-#define OB_CHILD 2
-#define OB_ACTOR 4
-#define OB_INERTIA_LOCK_X 8
-#define OB_INERTIA_LOCK_Y 16
-#define OB_INERTIA_LOCK_Z 32
-#define OB_DO_FH 64
-#define OB_ROT_FH 128
-#define OB_ANISOTROPIC_FRICTION 256
-#define OB_GHOST 512
-#define OB_RIGID_BODY 1024
-#define OB_BOUNDS 2048
-
-#define OB_COLLISION_RESPONSE 4096
-#define OB_SECTOR 8192
-#define OB_PROP 16384
-#define OB_MAINACTOR 32768
-
-#define OB_COLLISION 65536
-#define OB_SOFT_BODY 0x20000
-#define OB_OCCLUDER 0x40000
-#define OB_SENSOR 0x80000
-#define OB_NAVMESH 0x100000
-#define OB_HASOBSTACLE 0x200000
-#define OB_CHARACTER 0x400000
+enum {
+ OB_DYNAMIC = 1 << 0,
+ OB_CHILD = 1 << 1,
+ OB_ACTOR = 1 << 2,
+ OB_INERTIA_LOCK_X = 1 << 3,
+ OB_INERTIA_LOCK_Y = 1 << 4,
+ OB_INERTIA_LOCK_Z = 1 << 5,
+ OB_DO_FH = 1 << 6,
+ OB_ROT_FH = 1 << 7,
+ OB_ANISOTROPIC_FRICTION = 1 << 8,
+ OB_GHOST = 1 << 9,
+ OB_RIGID_BODY = 1 << 10,
+ OB_BOUNDS = 1 << 11,
+
+ OB_COLLISION_RESPONSE = 1 << 12,
+ OB_SECTOR = 1 << 13,
+ OB_PROP = 1 << 14,
+ OB_MAINACTOR = 1 << 15,
+
+ OB_COLLISION = 1 << 16,
+ OB_SOFT_BODY = 1 << 17,
+ OB_OCCLUDER = 1 << 18,
+ OB_SENSOR = 1 << 19,
+ OB_NAVMESH = 1 << 20,
+ OB_HASOBSTACLE = 1 << 21,
+ OB_CHARACTER = 1 << 22,
+};
/* ob->gameflag2 */
-#define OB_NEVER_DO_ACTIVITY_CULLING 1
-#define OB_LOCK_RIGID_BODY_X_AXIS 4
-#define OB_LOCK_RIGID_BODY_Y_AXIS 8
-#define OB_LOCK_RIGID_BODY_Z_AXIS 16
-#define OB_LOCK_RIGID_BODY_X_ROT_AXIS 32
-#define OB_LOCK_RIGID_BODY_Y_ROT_AXIS 64
-#define OB_LOCK_RIGID_BODY_Z_ROT_AXIS 128
-
-/* #define OB_LIFE (OB_PROP|OB_DYNAMIC|OB_ACTOR|OB_MAINACTOR|OB_CHILD) */
+enum {
+ OB_NEVER_DO_ACTIVITY_CULLING = 1 << 0,
+ OB_LOCK_RIGID_BODY_X_AXIS = 1 << 2,
+ OB_LOCK_RIGID_BODY_Y_AXIS = 1 << 3,
+ OB_LOCK_RIGID_BODY_Z_AXIS = 1 << 4,
+ OB_LOCK_RIGID_BODY_X_ROT_AXIS = 1 << 5,
+ OB_LOCK_RIGID_BODY_Y_ROT_AXIS = 1 << 6,
+ OB_LOCK_RIGID_BODY_Z_ROT_AXIS = 1 << 7,
+
+/* OB_LIFE = OB_PROP | OB_DYNAMIC | OB_ACTOR | OB_MAINACTOR | OB_CHILD, */
+};
/* ob->body_type */
-#define OB_BODY_TYPE_NO_COLLISION 0
-#define OB_BODY_TYPE_STATIC 1
-#define OB_BODY_TYPE_DYNAMIC 2
-#define OB_BODY_TYPE_RIGID 3
-#define OB_BODY_TYPE_SOFT 4
-#define OB_BODY_TYPE_OCCLUDER 5
-#define OB_BODY_TYPE_SENSOR 6
-#define OB_BODY_TYPE_NAVMESH 7
-#define OB_BODY_TYPE_CHARACTER 8
+enum {
+ OB_BODY_TYPE_NO_COLLISION = 0,
+ OB_BODY_TYPE_STATIC = 1,
+ OB_BODY_TYPE_DYNAMIC = 2,
+ OB_BODY_TYPE_RIGID = 3,
+ OB_BODY_TYPE_SOFT = 4,
+ OB_BODY_TYPE_OCCLUDER = 5,
+ OB_BODY_TYPE_SENSOR = 6,
+ OB_BODY_TYPE_NAVMESH = 7,
+ OB_BODY_TYPE_CHARACTER = 8,
+};
/* ob->depsflag */
-#define OB_DEPS_EXTRA_OB_RECALC 1
-#define OB_DEPS_EXTRA_DATA_RECALC 2
+enum {
+ OB_DEPS_EXTRA_OB_RECALC = 1 << 0,
+ OB_DEPS_EXTRA_DATA_RECALC = 1 << 1,
+};
/* ob->scavisflag */
-#define OB_VIS_SENS 1
-#define OB_VIS_CONT 2
-#define OB_VIS_ACT 4
+enum {
+ OB_VIS_SENS = 1 << 0,
+ OB_VIS_CONT = 1 << 1,
+ OB_VIS_ACT = 1 << 2,
+};
/* ob->scaflag */
-#define OB_SHOWSENS 64
-#define OB_SHOWACT 128
-#define OB_ADDSENS 256
-#define OB_ADDCONT 512
-#define OB_ADDACT 1024
-#define OB_SHOWCONT 2048
-#define OB_ALLSTATE 4096
-#define OB_INITSTBIT 8192
-#define OB_DEBUGSTATE 16384
-#define OB_SHOWSTATE 32768
+enum {
+ OB_SHOWSENS = 1 << 6,
+ OB_SHOWACT = 1 << 7,
+ OB_ADDSENS = 1 << 8,
+ OB_ADDCONT = 1 << 9,
+ OB_ADDACT = 1 << 10,
+ OB_SHOWCONT = 1 << 11,
+ OB_ALLSTATE = 1 << 12,
+ OB_INITSTBIT = 1 << 13,
+ OB_DEBUGSTATE = 1 << 14,
+ OB_SHOWSTATE = 1 << 15,
+};
/* ob->restrictflag */
-#define OB_RESTRICT_VIEW 1
-#define OB_RESTRICT_SELECT 2
-#define OB_RESTRICT_RENDER 4
+enum {
+ OB_RESTRICT_VIEW = 1 << 0,
+ OB_RESTRICT_SELECT = 1 << 1,
+ OB_RESTRICT_RENDER = 1 << 2,
+};
/* ob->shapeflag */
-#define OB_SHAPE_LOCK 1
-#define OB_SHAPE_TEMPLOCK 2 // deprecated
-#define OB_SHAPE_EDIT_MODE 4
+enum {
+ OB_SHAPE_LOCK = 1 << 0,
+ OB_SHAPE_TEMPLOCK = 1 << 1, /* deprecated */
+ OB_SHAPE_EDIT_MODE = 1 << 2,
+};
/* ob->nlaflag */
- /* WARNING: flags (1<<0) and (1<<1) were from old animsys */
+enum {
+ /* WARNING: flags (1 << 0) and (1 << 1) were from old animsys */
/* object-channel expanded status */
-#define OB_ADS_COLLAPSED (1<<10)
+ OB_ADS_COLLAPSED = 1 << 10,
/* object's ipo-block */
-#define OB_ADS_SHOWIPO (1<<11)
+ OB_ADS_SHOWIPO = 1 << 11,
/* object's constraint channels */
-#define OB_ADS_SHOWCONS (1<<12)
+ OB_ADS_SHOWCONS = 1 << 12,
/* object's material channels */
-#define OB_ADS_SHOWMATS (1<<13)
+ OB_ADS_SHOWMATS = 1 << 13,
/* object's marticle channels */
-#define OB_ADS_SHOWPARTS (1<<14)
+ OB_ADS_SHOWPARTS = 1 << 14,
+};
/* ob->protectflag */
-#define OB_LOCK_LOCX 1
-#define OB_LOCK_LOCY 2
-#define OB_LOCK_LOCZ 4
-#define OB_LOCK_LOC 7
-#define OB_LOCK_ROTX 8
-#define OB_LOCK_ROTY 16
-#define OB_LOCK_ROTZ 32
-#define OB_LOCK_ROT 56
-#define OB_LOCK_SCALEX 64
-#define OB_LOCK_SCALEY 128
-#define OB_LOCK_SCALEZ 256
-#define OB_LOCK_SCALE 448
-#define OB_LOCK_ROTW 512
-#define OB_LOCK_ROT4D 1024
+enum {
+ OB_LOCK_LOCX = 1 << 0,
+ OB_LOCK_LOCY = 1 << 1,
+ OB_LOCK_LOCZ = 1 << 2,
+ OB_LOCK_LOC = OB_LOCK_LOCX | OB_LOCK_LOCY | OB_LOCK_LOCZ,
+ OB_LOCK_ROTX = 1 << 3,
+ OB_LOCK_ROTY = 1 << 4,
+ OB_LOCK_ROTZ = 1 << 5,
+ OB_LOCK_ROT = OB_LOCK_ROTX | OB_LOCK_ROTY | OB_LOCK_ROTZ,
+ OB_LOCK_SCALEX = 1 << 6,
+ OB_LOCK_SCALEY = 1 << 7,
+ OB_LOCK_SCALEZ = 1 << 8,
+ OB_LOCK_SCALE = OB_LOCK_SCALEX | OB_LOCK_SCALEY | OB_LOCK_SCALEZ,
+ OB_LOCK_ROTW = 1 << 9,
+ OB_LOCK_ROT4D = 1 << 10,
+};
/* ob->mode */
typedef enum ObjectMode {
- OB_MODE_OBJECT = 0,
- OB_MODE_EDIT = 1,
- OB_MODE_SCULPT = 2,
- OB_MODE_VERTEX_PAINT = 4,
- OB_MODE_WEIGHT_PAINT = 8,
- OB_MODE_TEXTURE_PAINT = 16,
- OB_MODE_PARTICLE_EDIT = 32,
- OB_MODE_POSE = 64
+ OB_MODE_OBJECT = 0,
+ OB_MODE_EDIT = 1 << 0,
+ OB_MODE_SCULPT = 1 << 1,
+ OB_MODE_VERTEX_PAINT = 1 << 2,
+ OB_MODE_WEIGHT_PAINT = 1 << 3,
+ OB_MODE_TEXTURE_PAINT = 1 << 4,
+ OB_MODE_PARTICLE_EDIT = 1 << 5,
+ OB_MODE_POSE = 1 << 6,
} ObjectMode;
/* any mode where the brush system is used */
-#define OB_MODE_ALL_PAINT (OB_MODE_SCULPT|OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT)
+#define OB_MODE_ALL_PAINT (OB_MODE_SCULPT | OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT | OB_MODE_TEXTURE_PAINT)
#define MAX_DUPLI_RECUR 8
diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h
index 29fcaf3bf73..b7ca3066b4f 100644
--- a/source/blender/makesdna/DNA_particle_types.h
+++ b/source/blender/makesdna/DNA_particle_types.h
@@ -272,7 +272,9 @@ typedef struct ParticleSystem {
struct DerivedMesh *hair_in_dm, *hair_out_dm; /* input/output for cloth simulation */
struct Object *target_ob;
- struct Object *lattice;
+
+ struct LatticeDeformData *lattice_deform_data; /* run-time only lattice deformation data */
+
struct Object *parent; /* particles from global space -> parent space */
struct ListBase targets; /* used for keyed and boid physics */
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index ceb745cf90a..6ebc604bc7e 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -316,6 +316,7 @@ typedef struct ImageFormatData {
#define R_IMF_IMTYPE_H264 31
#define R_IMF_IMTYPE_XVID 32
#define R_IMF_IMTYPE_THEORA 33
+#define R_IMF_IMTYPE_PSD 34
#define R_IMF_IMTYPE_INVALID 255
@@ -510,6 +511,7 @@ typedef struct RenderData {
short bake_normal_space, bake_quad_split;
float bake_maxdist, bake_biasdist;
short bake_samples, bake_pad;
+ float bake_user_scale, bake_pad1;
/* path to render output */
char pic[1024]; /* 1024 = FILE_MAX */
@@ -693,8 +695,8 @@ typedef struct GameData {
#define RAS_STORE_VBO 3
/* vsync */
-#define VSYNC_OFF 0
-#define VSYNC_ON 1
+#define VSYNC_ON 0
+#define VSYNC_OFF 1
#define VSYNC_ADAPTIVE 2
/* GameData.flag */
@@ -981,17 +983,6 @@ typedef struct ToolSettings {
* paint */
float vgroup_weight;
- /* Subdivide Settings */
- short cornertype;
- short pad1;
- /*Triangle to Quad conversion threshold*/
- float jointrilimit;
- /* Editmode Tools */
- float degr;
- short step;
- short turn;
-
- float extr_offs; /* extrude offset */
float doublimit; /* remove doubles limit */
float normalsize; /* size of normals */
short automerge;
@@ -999,30 +990,21 @@ typedef struct ToolSettings {
/* Selection Mode for Mesh */
short selectmode;
- /* Primitive Settings */
- /* UV Sphere */
- short segments;
- short rings;
-
- /* Cylinder - Tube - Circle */
- short vertices;
-
/* UV Calculation */
- short unwrapper;
- float uvcalc_radius;
- float uvcalc_cubesize;
+ char unwrapper;
+ char uvcalc_flag;
+ char uv_flag;
+ char uv_selectmode;
+
float uvcalc_margin;
- short uvcalc_mapdir;
- short uvcalc_mapalign;
- short uvcalc_flag;
- short uv_flag, uv_selectmode;
- short pad2;
-
- /* Grease Pencil */
- short gpencil_flags;
-
+
/* Auto-IK */
- short autoik_chainlen;
+ short autoik_chainlen; /* runtime only */
+
+ /* Grease Pencil */
+ char gpencil_flags;
+
+ char pad[5];
/* Image Paint (8 byttse aligned please!) */
struct ImagePaintSettings imapaint;
@@ -1035,16 +1017,13 @@ typedef struct ToolSettings {
/* Select Group Threshold */
float select_thresh;
-
- /* Graph Editor */
- float clean_thresh;
/* Auto-Keying Mode */
short autokey_mode, autokey_flag; /* defines in DNA_userdef_types.h */
/* Multires */
char multires_subdiv_type;
- char pad3[5];
+ char pad3[1];
/* Skeleton generation */
short skgen_resolution;
@@ -1233,6 +1212,7 @@ typedef struct Scene {
/* flag */
/* use preview range */
#define SCER_PRV_RANGE (1<<0)
+#define SCER_LOCK_FRAME_SELECTION (1<<1)
/* mode (int now) */
#define R_OSA 0x0001
@@ -1375,6 +1355,7 @@ typedef struct Scene {
#define R_BAKE_MULTIRES 16
#define R_BAKE_LORES_MESH 32
#define R_BAKE_VCOL 64
+#define R_BAKE_USERSCALE 128
/* bake_normal_space */
#define R_BAKE_SPACE_CAMERA 0
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h
index 9d840ad13e8..ec86a4739c5 100644
--- a/source/blender/makesdna/DNA_screen_types.h
+++ b/source/blender/makesdna/DNA_screen_types.h
@@ -112,22 +112,48 @@ typedef struct Panel { /* the part from uiBlock that needs saved in file */
void *activedata; /* runtime for panel manipulation */
} Panel;
-typedef struct uiList { /* some list UI data need to be saved in file */
+/* uiList dynamic data... */
+/* These two Lines with # tell makesdna this struct can be excluded. */
+#
+#
+typedef struct uiListDyn {
+ int height; /* Number of rows needed to draw all elements. */
+ int visual_height; /* Actual visual height of the list (in rows). */
+ int visual_height_min; /* Minimal visual height of the list (in rows). */
+
+ int items_len; /* Number of items in collection. */
+ int items_shown; /* Number of items actually visible after filtering. */
+
+ /* Filtering data. */
+ int *items_filter_flags; /* items_len length. */
+ int *items_filter_neworder; /* org_idx -> new_idx, items_len length. */
+} uiListDyn;
+
+typedef struct uiList { /* some list UI data need to be saved in file */
struct uiList *next, *prev;
- struct uiListType *type; /* runtime */
- void *padp;
+ struct uiListType *type; /* runtime */
- char list_id[64]; /* defined as UI_MAX_NAME_STR */
+ char list_id[64]; /* defined as UI_MAX_NAME_STR */
- int layout_type; /* How items are layedout in the list */
- int padi;
+ int layout_type; /* How items are layedout in the list */
+ int flag;
int list_scroll;
- int list_size;
+ int list_grip;
int list_last_len;
- int list_grip_size;
-/* char list_search[64]; */
+ int padi1;
+
+ /* Filtering data. */
+ char filter_byname[64]; /* defined as UI_MAX_NAME_STR */
+ int filter_flag;
+ int filter_sort_flag;
+
+ /* Custom sub-classes properties. */
+ IDProperty *properties;
+
+ /* Dynamic data (runtime). */
+ uiListDyn *dyn_data;
} uiList;
typedef struct ScrArea {
@@ -232,13 +258,38 @@ typedef struct ARegion {
#define PNL_DEFAULT_CLOSED 1
#define PNL_NO_HEADER 2
-/* uilist layout_type */
+/* uiList layout_type */
enum {
UILST_LAYOUT_DEFAULT = 0,
UILST_LAYOUT_COMPACT = 1,
UILST_LAYOUT_GRID = 2,
};
+/* uiList flag */
+enum {
+ UILST_SCROLL_TO_ACTIVE_ITEM = 1 << 0, /* Scroll list to make active item visible. */
+ UILST_RESIZING = 1 << 1, /* We are currently resizing, deactivate autosize! */
+};
+
+/* uiList filter flags (dyn_data) */
+enum {
+ UILST_FLT_ITEM = 1 << 31, /* This item has passed the filter process successfully. */
+};
+
+/* uiList filter options */
+enum {
+ UILST_FLT_SHOW = 1 << 0, /* Show filtering UI. */
+ UILST_FLT_EXCLUDE = UILST_FLT_ITEM, /* Exclude filtered items, *must* use this same value. */
+};
+
+/* uiList filter orderby type */
+enum {
+ UILST_FLT_SORT_ALPHA = 1 << 0,
+ UILST_FLT_SORT_REVERSE = 1 << 31 /* Special value, bitflag used to reverse order! */
+};
+
+#define UILST_FLT_SORT_MASK (((unsigned int)UILST_FLT_SORT_REVERSE) - 1)
+
/* regiontype, first two are the default set */
/* Do NOT change order, append on end. Types are hardcoded needed */
enum {
diff --git a/source/blender/makesdna/DNA_sensor_types.h b/source/blender/makesdna/DNA_sensor_types.h
index d8cf80d047b..1b946c829fd 100644
--- a/source/blender/makesdna/DNA_sensor_types.h
+++ b/source/blender/makesdna/DNA_sensor_types.h
@@ -60,6 +60,7 @@ typedef struct bMouseSensor {
short pad2;
} bMouseSensor;
+/* DEPRECATED */
typedef struct bTouchSensor {
char name[64]; /* MAX_NAME */
struct Material *ma;
@@ -235,7 +236,7 @@ typedef struct bJoystickSensor {
/* sensor->type */
#define SENS_ALWAYS 0
-#define SENS_TOUCH 1
+#define SENS_TOUCH 1 /* DEPRECATED */
#define SENS_NEAR 2
#define SENS_KEYBOARD 3
#define SENS_PROPERTY 4
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index c562a1fefae..f71516af5e6 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -132,8 +132,9 @@ typedef struct SpaceButs {
short mainb, mainbo, mainbuser; /* context tabs */
short re_align, align; /* align for panels */
short preview; /* preview is signal to refresh */
- short texture_context; /* texture context selector (material, world, brush)*/
- char flag, pad;
+ /* texture context selector (material, lamp, particles, world, other)*/
+ short texture_context, texture_context_prev;
+ char flag, pad[7];
void *path; /* runtime */
int pathflag, dataicon; /* runtime */
@@ -246,6 +247,13 @@ typedef struct SpaceOops {
View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
ListBase tree;
+
+ /* treestore is an ordered list of TreeStoreElem's from outliner tree;
+ * Note that treestore may contain duplicate elements if element
+ * is used multiple times in outliner tree (e. g. linked objects)
+ * Also note that BLI_mempool can not be read/written in DNA directly,
+ * therefore readfile.c/writefile.c linearize treestore into TreeStore structure
+ */
struct BLI_mempool *treestore;
/* search stuff */
@@ -253,7 +261,9 @@ typedef struct SpaceOops {
struct TreeStoreElem search_tse;
short flag, outlinevis, storeflag, search_flags;
- struct GHash *treehash;
+
+ /* pointers to treestore elements, grouped by (id, type, nr) in hashtable for faster searching */
+ void *treehash;
} SpaceOops;
@@ -276,11 +286,11 @@ typedef enum eSpaceOutliner_Mode {
SO_GROUPS = 6,
SO_LIBRARIES = 7,
/* SO_VERSE_SESSION = 8, */ /* deprecated! */
- /* SO_VERSE_MS = 9, */ /* deprecated!*/
+ /* SO_VERSE_MS = 9, */ /* deprecated! */
SO_SEQUENCE = 10,
SO_DATABLOCKS = 11,
SO_USERDEF = 12,
- SO_KEYMAP = 13,
+ /* SO_KEYMAP = 13, */ /* deprecated! */
} eSpaceOutliner_Mode;
/* SpaceOops->storeflag */
@@ -536,7 +546,8 @@ typedef struct MaskSpaceInfo
/* draw options */
char draw_flag;
char draw_type;
- char pad3[6];
+ char overlay_mode;
+ char pad3[5];
} MaskSpaceInfo;
/* sseq->mainb */
@@ -1083,6 +1094,8 @@ typedef struct SpaceClip {
int around, pad4; /* pivot point for transforms */
+ float cursor[2]; /* Mask editor 2d cursor */
+
MaskSpaceInfo mask_info;
} SpaceClip;
diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h
index 0b6e5f9c7bb..fcd0575f1c5 100644
--- a/source/blender/makesdna/DNA_texture_types.h
+++ b/source/blender/makesdna/DNA_texture_types.h
@@ -263,7 +263,7 @@ typedef struct TexMapping {
float loc[3], rot[3], size[3];
int flag;
char projx, projy, projz, mapping;
- int pad;
+ int type;
float mat[4][4];
float min[3], max[3];
@@ -287,6 +287,12 @@ typedef struct ColorMapping {
#define TEXMAP_CLIP_MAX 2
#define TEXMAP_UNIT_MATRIX 4
+/* texmap->type */
+#define TEXMAP_TYPE_POINT 0
+#define TEXMAP_TYPE_TEXTURE 1
+#define TEXMAP_TYPE_VECTOR 2
+#define TEXMAP_TYPE_NORMAL 3
+
/* colormap->flag */
#define COLORMAP_USE_RAMP 1
diff --git a/source/blender/makesdna/DNA_tracking_types.h b/source/blender/makesdna/DNA_tracking_types.h
index f81ac4dab06..ad9a2ea169c 100644
--- a/source/blender/makesdna/DNA_tracking_types.h
+++ b/source/blender/makesdna/DNA_tracking_types.h
@@ -142,6 +142,17 @@ typedef struct MovieTrackingTrack {
float minimum_correlation; /* minimal correlation which is still treated as successful tracking */
struct bGPdata *gpd; /* grease-pencil data */
+
+ /* Weight of this track.
+ *
+ * Weight defines how much the track affects on the final reconstruction,
+ * usually gets animated in a way so when track has just appeared it's
+ * weight is zero and then it gets faded up.
+ *
+ * Used to prevent jumps of the camera when tracks are appearing or
+ * disappearing.
+ */
+ float weight, pad;
} MovieTrackingTrack;
typedef struct MovieTrackingPlaneMarker {
@@ -170,7 +181,7 @@ typedef struct MovieTrackingPlaneTrack {
char name[64]; /* MAX_NAME */
MovieTrackingTrack **point_tracks; /* Array of point tracks used to define this plane.
- Each element is a pointer to MovieTrackingTrack. */
+ * Each element is a pointer to MovieTrackingTrack. */
int point_tracksnr, pad; /* Number of tracks in point_tracks array. */
MovieTrackingPlaneMarker *markers; /* Markers in the plane track */
@@ -207,8 +218,7 @@ typedef struct MovieTrackingSettings {
* were moved to per-tracking object settings
*/
- float reconstruction_success_threshold;
- int reconstruction_flag;
+ int reconstruction_flag, pad;
/* which camera intrinsics to refine. uses on the REFINE_* flags */
short refine_camera_intrinsics, pad2;
@@ -409,7 +419,7 @@ enum {
/* MovieTrackingSettings->reconstruction_flag */
enum {
- TRACKING_USE_FALLBACK_RECONSTRUCTION = (1 << 0),
+ /* TRACKING_USE_FALLBACK_RECONSTRUCTION = (1 << 0), */ /* DEPRECATED */
TRACKING_USE_KEYFRAME_SELECTION = (1 << 1)
};
@@ -481,8 +491,9 @@ enum {
/* MovieTrackingPlaneTrack->flag */
enum {
- PLANE_TRACK_HIDDEN = (1 << 1),
- PLANE_TRACK_LOCKED = (1 << 2),
+ PLANE_TRACK_HIDDEN = (1 << 1),
+ PLANE_TRACK_LOCKED = (1 << 2),
+ PLANE_TRACK_AUTOKEY = (1 << 3),
};
#endif /* __DNA_TRACKING_TYPES_H__ */
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index e0c5cd5608e..1621f7c6cb6 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -286,6 +286,9 @@ typedef struct ThemeSpace {
char preview_stitch_unstitchable[4];
char preview_stitch_active[4];
+ char uv_shadow[4];
+ char uv_others[4];
+
char match[4]; /* outliner - filter match */
char selected_highlight[4]; /* outliner - selected item */
diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h
index 5436b9debfa..c724340f5ea 100644
--- a/source/blender/makesdna/DNA_view3d_types.h
+++ b/source/blender/makesdna/DNA_view3d_types.h
@@ -280,6 +280,7 @@ typedef struct View3D {
#define V3D_SOLID_MATCAP 4096 /* user flag */
#define V3D_SHOW_SOLID_MATCAP 8192 /* runtime flag */
#define V3D_OCCLUDE_WIRE 16384
+#define V3D_SHADELESS_TEX 32768
/* View3D->around */
diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h
index 27aef3b8ec6..ff43cc31b9a 100644
--- a/source/blender/makesdna/DNA_windowmanager_types.h
+++ b/source/blender/makesdna/DNA_windowmanager_types.h
@@ -60,42 +60,44 @@ struct ReportList;
struct Report;
struct uiLayout;
-#define OP_MAX_TYPENAME 64
-#define KMAP_MAX_NAME 64
+#define OP_MAX_TYPENAME 64
+#define KMAP_MAX_NAME 64
/* keep in sync with 'wm_report_items' in wm_rna.c */
typedef enum ReportType {
- RPT_DEBUG = 1 << 0,
- RPT_INFO = 1 << 1,
- RPT_OPERATOR = 1 << 2,
- RPT_PROPERTY = 1 << 3,
- RPT_WARNING = 1 << 4,
- RPT_ERROR = 1 << 5,
- RPT_ERROR_INVALID_INPUT = 1 << 6,
- RPT_ERROR_INVALID_CONTEXT = 1 << 7,
- RPT_ERROR_OUT_OF_MEMORY = 1 << 8
+ RPT_DEBUG = (1 << 0),
+ RPT_INFO = (1 << 1),
+ RPT_OPERATOR = (1 << 2),
+ RPT_PROPERTY = (1 << 3),
+ RPT_WARNING = (1 << 4),
+ RPT_ERROR = (1 << 5),
+ RPT_ERROR_INVALID_INPUT = (1 << 6),
+ RPT_ERROR_INVALID_CONTEXT = (1 << 7),
+ RPT_ERROR_OUT_OF_MEMORY = (1 << 8),
} ReportType;
-#define RPT_DEBUG_ALL (RPT_DEBUG)
-#define RPT_INFO_ALL (RPT_INFO)
-#define RPT_OPERATOR_ALL (RPT_OPERATOR)
-#define RPT_PROPERTY_ALL (RPT_PROPERTY)
-#define RPT_WARNING_ALL (RPT_WARNING)
-#define RPT_ERROR_ALL (RPT_ERROR|RPT_ERROR_INVALID_INPUT|RPT_ERROR_INVALID_CONTEXT|RPT_ERROR_OUT_OF_MEMORY)
+#define RPT_DEBUG_ALL (RPT_DEBUG)
+#define RPT_INFO_ALL (RPT_INFO)
+#define RPT_OPERATOR_ALL (RPT_OPERATOR)
+#define RPT_PROPERTY_ALL (RPT_PROPERTY)
+#define RPT_WARNING_ALL (RPT_WARNING)
+#define RPT_ERROR_ALL (RPT_ERROR|RPT_ERROR_INVALID_INPUT|RPT_ERROR_INVALID_CONTEXT|RPT_ERROR_OUT_OF_MEMORY)
enum ReportListFlags {
- RPT_PRINT = 1,
- RPT_STORE = 2,
- RPT_FREE = 4,
- RPT_OP_HOLD = 8 /* don't move them into the operator global list (caller will use) */
+ RPT_PRINT = (1 << 0),
+ RPT_STORE = (1 << 1),
+ RPT_FREE = (1 << 2),
+ RPT_OP_HOLD = (1 << 3), /* don't move them into the operator global list (caller will use) */
};
+
+/* These two Lines with # tell makesdna this struct can be excluded. */
#
#
typedef struct Report {
struct Report *next, *prev;
- short type; /* ReportType */
+ short type; /* ReportType */
short flag;
- int len; /* strlen(message), saves some time calculating the word wrap */
+ int len; /* strlen(message), saves some time calculating the word wrap */
const char *typestr;
const char *message;
} Report;
@@ -103,13 +105,14 @@ typedef struct Report {
/* saved in the wm, don't remove */
typedef struct ReportList {
ListBase list;
- int printlevel; /* ReportType */
- int storelevel; /* ReportType */
+ int printlevel; /* ReportType */
+ int storelevel; /* ReportType */
int flag, pad;
struct wmTimer *reporttimer;
} ReportList;
/* timer customdata to control reports display */
+/* These two Lines with # tell makesdna this struct can be excluded. */
#
#
typedef struct ReportTimerInfo {
@@ -124,84 +127,86 @@ typedef struct ReportTimerInfo {
/* windowmanager is saved, tag WMAN */
typedef struct wmWindowManager {
ID id;
-
- struct wmWindow *windrawable, *winactive; /* separate active from drawable */
+
+ struct wmWindow *windrawable, *winactive; /* separate active from drawable */
ListBase windows;
-
- int initialized; /* set on file read */
- short file_saved; /* indicator whether data was saved */
- short op_undo_depth; /* operator stack depth to avoid nested undo pushes */
-
- ListBase operators; /* operator registry */
-
- ListBase queue; /* refresh/redraw wmNotifier structs */
-
- struct ReportList reports; /* information and error reports */
-
- ListBase jobs; /* threaded jobs manager */
-
- ListBase paintcursors; /* extra overlay cursors to draw, like circles */
-
- ListBase drags; /* active dragged items */
-
- ListBase keyconfigs; /* known key configurations */
- struct wmKeyConfig *defaultconf; /* default configuration */
- struct wmKeyConfig *addonconf; /* addon configuration */
- struct wmKeyConfig *userconf; /* user configuration */
-
- ListBase timers; /* active timers */
- struct wmTimer *autosavetimer; /* timer for auto save */
+
+ int initialized; /* set on file read */
+ short file_saved; /* indicator whether data was saved */
+ short op_undo_depth; /* operator stack depth to avoid nested undo pushes */
+
+ ListBase operators; /* operator registry */
+
+ ListBase queue; /* refresh/redraw wmNotifier structs */
+
+ struct ReportList reports; /* information and error reports */
+
+ ListBase jobs; /* threaded jobs manager */
+
+ ListBase paintcursors; /* extra overlay cursors to draw, like circles */
+
+ ListBase drags; /* active dragged items */
+
+ ListBase keyconfigs; /* known key configurations */
+ struct wmKeyConfig *defaultconf; /* default configuration */
+ struct wmKeyConfig *addonconf; /* addon configuration */
+ struct wmKeyConfig *userconf; /* user configuration */
+
+ ListBase timers; /* active timers */
+ struct wmTimer *autosavetimer; /* timer for auto save */
} wmWindowManager;
/* wmWindowManager.initialized */
-#define WM_INIT_WINDOW (1<<0)
-#define WM_INIT_KEYMAP (1<<1)
+enum {
+ WM_INIT_WINDOW = (1<<0),
+ WM_INIT_KEYMAP = (1<<1),
+};
/* the savable part, rest of data is local in ghostwinlay */
typedef struct wmWindow {
struct wmWindow *next, *prev;
-
- void *ghostwin; /* don't want to include ghost.h stuff */
-
- int winid; /* winid also in screens, is for retrieving this window after read */
- short grabcursor; /* cursor grab mode */
+ void *ghostwin; /* don't want to include ghost.h stuff */
+
+ int winid; /* winid also in screens, is for retrieving this window after read */
+
+ short grabcursor; /* cursor grab mode */
short pad;
-
- struct bScreen *screen; /* active screen */
- struct bScreen *newscreen; /* temporary when switching */
- char screenname[64]; /* MAX_ID_NAME for matching window with active screen after file read */
-
- short posx, posy, sizex, sizey; /* window coords */
- short windowstate; /* borderless, full */
- short monitor; /* multiscreen... no idea how to store yet */
- short active; /* set to 1 if an active window, for quick rejects */
- short cursor; /* current mouse cursor type */
- short lastcursor; /* previous cursor when setting modal one */
- short modalcursor; /* the current modal cursor */
- short addmousemove; /* internal: tag this for extra mousemove event, makes cursors/buttons active on UI switching */
+
+ struct bScreen *screen; /* active screen */
+ struct bScreen *newscreen; /* temporary when switching */
+ char screenname[64]; /* MAX_ID_NAME for matching window with active screen after file read */
+
+ short posx, posy, sizex, sizey; /* window coords */
+ short windowstate; /* borderless, full */
+ short monitor; /* multiscreen... no idea how to store yet */
+ short active; /* set to 1 if an active window, for quick rejects */
+ short cursor; /* current mouse cursor type */
+ short lastcursor; /* previous cursor when setting modal one */
+ short modalcursor; /* the current modal cursor */
+ short addmousemove; /* internal: tag this for extra mousemove event, makes cursors/buttons active on UI switching */
short pad2;
- struct wmEvent *eventstate; /* storage for event system */
-
- struct wmSubWindow *curswin; /* internal for wm_subwindow.c only */
-
- struct wmGesture *tweak; /* internal for wm_operators.c */
-
- int drawmethod, drawfail; /* internal for wm_draw.c only */
- void *drawdata; /* internal for wm_draw.c only */
-
- ListBase queue; /* all events (ghost level events were handled) */
- ListBase handlers; /* window+screen handlers, handled last */
- ListBase modalhandlers; /* priority handlers, handled first */
-
- ListBase subwindows; /* opengl stuff for sub windows, see notes in wm_subwindow.c */
- ListBase gesture; /* gesture stuff */
+ struct wmEvent *eventstate; /* storage for event system */
+
+ struct wmSubWindow *curswin; /* internal for wm_subwindow.c only */
+
+ struct wmGesture *tweak; /* internal for wm_operators.c */
+
+ int drawmethod, drawfail; /* internal for wm_draw.c only */
+ void *drawdata; /* internal for wm_draw.c only */
+
+ ListBase queue; /* all events (ghost level events were handled) */
+ ListBase handlers; /* window+screen handlers, handled last */
+ ListBase modalhandlers; /* priority handlers, handled first */
+
+ ListBase subwindows; /* opengl stuff for sub windows, see notes in wm_subwindow.c */
+ ListBase gesture; /* gesture stuff */
} wmWindow;
+/* These two Lines with # tell makesdna this struct can be excluded. */
/* should be something like DNA_EXCLUDE
* but the preprocessor first removes all comments, spaces etc */
-
#
#
typedef struct wmOperatorTypeMacro {
@@ -210,37 +215,36 @@ typedef struct wmOperatorTypeMacro {
/* operator id */
char idname[64];
/* rna pointer to access properties, like keymap */
- struct IDProperty *properties; /* operator properties, assigned to ptr->data and can be written to a file */
+ struct IDProperty *properties; /* operator properties, assigned to ptr->data and can be written to a file */
struct PointerRNA *ptr;
-
} wmOperatorTypeMacro;
/* partial copy of the event, for matching by eventhandler */
typedef struct wmKeyMapItem {
struct wmKeyMapItem *next, *prev;
-
+
/* operator */
- char idname[64]; /* used to retrieve operator type pointer */
- IDProperty *properties; /* operator properties, assigned to ptr->data and can be written to a file */
-
+ char idname[64]; /* used to retrieve operator type pointer */
+ IDProperty *properties; /* operator properties, assigned to ptr->data and can be written to a file */
+
/* modal */
- char propvalue_str[64]; /* runtime temporary storage for loading */
- short propvalue; /* if used, the item is from modal map */
+ char propvalue_str[64]; /* runtime temporary storage for loading */
+ short propvalue; /* if used, the item is from modal map */
/* event */
- short type; /* event code itself */
- short val; /* KM_ANY, KM_PRESS, KM_NOTHING etc */
- short shift, ctrl, alt, oskey; /* oskey is apple or windowskey, value denotes order of pressed */
- short keymodifier; /* rawkey modifier */
-
+ short type; /* event code itself */
+ short val; /* KM_ANY, KM_PRESS, KM_NOTHING etc */
+ short shift, ctrl, alt, oskey; /* oskey is apple or windowskey, value denotes order of pressed */
+ short keymodifier; /* rawkey modifier */
+
/* flag: inactive, expanded */
short flag;
/* runtime */
- short maptype; /* keymap editor */
- short id; /* unique identifier. Positive for kmi that override builtins, negative otherwise */
+ short maptype; /* keymap editor */
+ short id; /* unique identifier. Positive for kmi that override builtins, negative otherwise */
short pad;
- struct PointerRNA *ptr; /* rna pointer to access properties */
+ struct PointerRNA *ptr; /* rna pointer to access properties */
} wmKeyMapItem;
/* used instead of wmKeyMapItem for diff keymaps */
@@ -252,52 +256,68 @@ typedef struct wmKeyMapDiffItem {
} wmKeyMapDiffItem;
/* wmKeyMapItem.flag */
-#define KMI_INACTIVE 1
-#define KMI_EXPANDED 2
-#define KMI_USER_MODIFIED 4
-#define KMI_UPDATE 8
+enum {
+ KMI_INACTIVE = (1 << 0),
+ KMI_EXPANDED = (1 << 1),
+ KMI_USER_MODIFIED = (1 << 2),
+ KMI_UPDATE = (1 << 3),
+};
+
+/* wmKeyMapItem.maptype */
+enum {
+ KMI_TYPE_KEYBOARD = 0,
+ KMI_TYPE_MOUSE = 1,
+ KMI_TYPE_TWEAK = 2,
+ KMI_TYPE_TEXTINPUT = 3,
+ KMI_TYPE_TIMER = 4,
+ KMI_TYPE_NDOF = 5,
+};
/* stored in WM, the actively used keymaps */
typedef struct wmKeyMap {
struct wmKeyMap *next, *prev;
-
+
ListBase items;
ListBase diff_items;
-
- char idname[64]; /* global editor keymaps, or for more per space/region */
- short spaceid; /* same IDs as in DNA_space_types.h */
- short regionid; /* see above */
-
- short flag; /* general flags */
- short kmi_id; /* last kmi id */
-
+
+ char idname[64]; /* global editor keymaps, or for more per space/region */
+ short spaceid; /* same IDs as in DNA_space_types.h */
+ short regionid; /* see above */
+
+ short flag; /* general flags */
+ short kmi_id; /* last kmi id */
+
/* runtime */
- int (*poll)(struct bContext *); /* verify if enabled in the current context */
- void *modal_items; /* for modal, EnumPropertyItem for now */
+ int (*poll)(struct bContext *); /* verify if enabled in the current context */
+ void *modal_items; /* for modal, EnumPropertyItem for now */
} wmKeyMap;
/* wmKeyMap.flag */
-#define KEYMAP_MODAL 1 /* modal map, not using operatornames */
-#define KEYMAP_USER 2 /* user keymap */
-#define KEYMAP_EXPANDED 4
-#define KEYMAP_CHILDREN_EXPANDED 8
-#define KEYMAP_DIFF 16 /* diff keymap for user preferences */
-#define KEYMAP_USER_MODIFIED 32 /* keymap has user modifications */
-#define KEYMAP_UPDATE 64
+enum {
+ KEYMAP_MODAL = (1 << 0), /* modal map, not using operatornames */
+ KEYMAP_USER = (1 << 1), /* user keymap */
+ KEYMAP_EXPANDED = (1 << 2),
+ KEYMAP_CHILDREN_EXPANDED = (1 << 3),
+ KEYMAP_DIFF = (1 << 4), /* diff keymap for user preferences */
+ KEYMAP_USER_MODIFIED = (1 << 5), /* keymap has user modifications */
+ KEYMAP_UPDATE = (1 << 6),
+};
typedef struct wmKeyConfig {
struct wmKeyConfig *next, *prev;
- char idname[64]; /* unique name */
- char basename[64]; /* idname of configuration this is derives from, "" if none */
-
+ char idname[64]; /* unique name */
+ char basename[64]; /* idname of configuration this is derives from, "" if none */
+
ListBase keymaps;
int actkeymap, flag;
} wmKeyConfig;
/* wmKeyConfig.flag */
-#define KEYCONF_USER (1 << 1)
-#define KEYCONF_INIT_DEFAULT (1 << 2)
+enum {
+ KEYCONF_USER = (1 << 1), /* And what about (1 << 0)? */
+ KEYCONF_INIT_DEFAULT = (1 << 2),
+};
/* this one is the operator itself, stored in files for macros etc */
/* operator + operatortype should be able to redo entirely, but for different contextes */
@@ -305,40 +325,46 @@ typedef struct wmOperator {
struct wmOperator *next, *prev;
/* saved */
- char idname[64];/* used to retrieve type pointer */
- IDProperty *properties; /* saved, user-settable properties */
+ char idname[64]; /* used to retrieve type pointer */
+ IDProperty *properties; /* saved, user-settable properties */
/* runtime */
- struct wmOperatorType *type;/* operator type definition from idname */
- void *customdata; /* custom storage, only while operator runs */
- void *py_instance; /* python stores the class instance here */
+ struct wmOperatorType *type; /* operator type definition from idname */
+ void *customdata; /* custom storage, only while operator runs */
+ void *py_instance; /* python stores the class instance here */
- struct PointerRNA *ptr; /* rna pointer to access properties */
- struct ReportList *reports; /* errors and warnings storage */
+ struct PointerRNA *ptr; /* rna pointer to access properties */
+ struct ReportList *reports; /* errors and warnings storage */
- ListBase macro; /* list of operators, can be a tree */
- struct wmOperator *opm; /* current running macro, not saved */
- struct uiLayout *layout; /* runtime for drawing */
+ ListBase macro; /* list of operators, can be a tree */
+ struct wmOperator *opm; /* current running macro, not saved */
+ struct uiLayout *layout; /* runtime for drawing */
short flag, pad[3];
} wmOperator;
-
/* operator type return flags: exec(), invoke() modal(), return values */
-#define OPERATOR_RUNNING_MODAL (1<<0)
-#define OPERATOR_CANCELLED (1<<1)
-#define OPERATOR_FINISHED (1<<2)
+enum {
+ OPERATOR_RUNNING_MODAL = (1 << 0),
+ OPERATOR_CANCELLED = (1 << 1),
+ OPERATOR_FINISHED = (1 << 2),
/* add this flag if the event should pass through */
-#define OPERATOR_PASS_THROUGH (1<<3)
+ OPERATOR_PASS_THROUGH = (1 << 3),
/* in case operator got executed outside WM code... like via fileselect */
-#define OPERATOR_HANDLED (1<<4)
-
-#define OPERATOR_FLAGS_ALL ((1<<5)-1)
+ OPERATOR_HANDLED = (1 << 4),
+};
+#define OPERATOR_FLAGS_ALL (OPERATOR_RUNNING_MODAL | OPERATOR_CANCELLED | OPERATOR_FINISHED | \
+ OPERATOR_PASS_THROUGH | OPERATOR_HANDLED)
/* sanity checks for debug mode only */
#define OPERATOR_RETVAL_CHECK(ret) (void)ret, BLI_assert(ret != 0 && (ret & OPERATOR_FLAGS_ALL) == ret)
/* wmOperator flag */
-#define OP_GRAB_POINTER 1
+enum {
+ OP_GRAB_POINTER = (1 << 0),
+ /* low level flag so exec() operators can tell if they were invoked, use with care.
+ * typically this shouldn't make any difference, but it rare cases its needed (see smooth-view) */
+ OP_IS_INVOKE = (1 << 1),
+};
#endif /* __DNA_WINDOWMANAGER_TYPES_H__ */
diff --git a/source/blender/makesdna/intern/CMakeLists.txt b/source/blender/makesdna/intern/CMakeLists.txt
index 70c79fa393c..317141b14e3 100644
--- a/source/blender/makesdna/intern/CMakeLists.txt
+++ b/source/blender/makesdna/intern/CMakeLists.txt
@@ -29,6 +29,7 @@ add_definitions(-DWITH_DNA_GHASH)
blender_include_dirs(
../../../../intern/guardedalloc
+ ../../../../intern/atomic
../../blenlib
..
)
@@ -39,6 +40,8 @@ blender_include_dirs(
set(SRC
makesdna.c
../../../../intern/guardedalloc/intern/mallocn.c
+ ../../../../intern/guardedalloc/intern/mallocn_guarded_impl.c
+ ../../../../intern/guardedalloc/intern/mallocn_lockfree_impl.c
)
if(WIN32 AND NOT UNIX)
@@ -49,11 +52,6 @@ endif()
# SRC_DNA_INC is defined in the parent dir
-# for mallocn.c
-if (WITH_GUARDEDALLOC)
- add_definitions(-DWITH_GUARDEDALLOC)
-endif()
-
add_executable(makesdna ${SRC} ${SRC_DNA_INC})
# Output dna.c
@@ -80,6 +78,8 @@ set(SRC
${SRC_DNA_INC}
)
+set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/dna.c PROPERTIES GENERATED TRUE)
+
blender_add_lib(bf_dna "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/makesdna/intern/SConscript b/source/blender/makesdna/intern/SConscript
index c0db40dcfd2..35b4ff262ed 100644
--- a/source/blender/makesdna/intern/SConscript
+++ b/source/blender/makesdna/intern/SConscript
@@ -36,8 +36,6 @@ cflags = ''
defines = []
root_build_dir=normpath(env['BF_BUILDDIR'])
-defines.append('WITH_GUARDEDALLOC')
-
source_files = ['makesdna.c']
header_files = env.Glob('../*.h')
@@ -46,7 +44,9 @@ dna = env.Clone()
makesdna_tool.Append(CCFLAGS = '-DBASE_HEADER="\\"source/blender/makesdna/\\"" ')
makesdna_tool.Append (CPPPATH = ['#/intern/guardedalloc',
- '../../makesdna', '../../bmesh'])
+ '#/intern/atomic',
+ '../../makesdna', '../../bmesh',
+ '../../blenlib'])
if env['OURPLATFORM'] == 'linuxcross':
USE_WINE = True # when cross compiling on linux 64bit this is useful
diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c
index 1225821102a..ed7f6f5d765 100644
--- a/source/blender/makesdna/intern/dna_genfile.c
+++ b/source/blender/makesdna/intern/dna_genfile.c
@@ -530,7 +530,7 @@ static void init_structDNA(SDNA *sdna, bool do_endian_swap)
#ifdef WITH_DNA_GHASH
/* create a ghash lookup to speed up */
- sdna->structs_map = BLI_ghash_str_new("init_structDNA gh");
+ sdna->structs_map = BLI_ghash_str_new_ex("init_structDNA gh", sdna->nr_structs);
for (nr = 0; nr < sdna->nr_structs; nr++) {
sp = sdna->structs[nr];
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index b18d3c83342..b4b79059f93 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -31,6 +31,8 @@
#include "RNA_types.h"
+#include "BLI_compiler_attrs.h"
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -620,7 +622,6 @@ extern StructRNA RNA_ThemeWidgetStateColors;
extern StructRNA RNA_TimelineMarker;
extern StructRNA RNA_Timer;
extern StructRNA RNA_ToolSettings;
-extern StructRNA RNA_TouchSensor;
extern StructRNA RNA_TrackToConstraint;
extern StructRNA RNA_TransformConstraint;
extern StructRNA RNA_TransformSequence;
@@ -1034,15 +1035,15 @@ void RNA_struct_property_unset(PointerRNA *ptr, const char *identifier);
/* python compatible string representation of this property, (must be freed!) */
char *RNA_property_as_string(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, int index, int max_prop_length);
char *RNA_pointer_as_string(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop_ptr, PointerRNA *ptr_prop);
-char *RNA_pointer_as_string_keywords_ex(struct bContext *C, PointerRNA *ptr, PointerRNA *ptr_default,
- const short skip_optional_value, const short all_args,
+char *RNA_pointer_as_string_keywords_ex(struct bContext *C, PointerRNA *ptr,
+ const bool skip_optional_value, const bool all_args,
const int max_prop_length,
PropertyRNA *iterprop);
-char *RNA_pointer_as_string_keywords(struct bContext *C, PointerRNA *ptr, PointerRNA *ptr_default,
- const short skip_optional_value, const short all_args,
+char *RNA_pointer_as_string_keywords(struct bContext *C, PointerRNA *ptr,
+ const bool skip_optional_value, const bool all_args,
const int max_prop_length);
-char *RNA_function_as_string_keywords(struct bContext *C, FunctionRNA *func, PointerRNA *ptr_default,
- const short as_function, const short all_args,
+char *RNA_function_as_string_keywords(struct bContext *C, FunctionRNA *func,
+ const bool as_function, const bool all_args,
const int max_prop_length);
/* Function */
@@ -1073,10 +1074,11 @@ void RNA_parameter_get(ParameterList *parms, PropertyRNA *parm, void **value);
void RNA_parameter_get_lookup(ParameterList *parms, const char *identifier, void **value);
void RNA_parameter_set(ParameterList *parms, PropertyRNA *parm, const void *value);
void RNA_parameter_set_lookup(ParameterList *parms, const char *identifier, const void *value);
-int RNA_parameter_length_get(ParameterList *parms, PropertyRNA *parm);
-int RNA_parameter_length_get_data(ParameterList *parms, PropertyRNA *parm, void *data);
-void RNA_parameter_length_set(ParameterList *parms, PropertyRNA *parm, int length);
-void RNA_parameter_length_set_data(ParameterList *parms, PropertyRNA *parm, void *data, int length);
+/* Only for PROP_DYNAMIC properties! */
+int RNA_parameter_dynamic_length_get(ParameterList *parms, PropertyRNA *parm);
+int RNA_parameter_dynamic_length_get_data(ParameterList *parms, PropertyRNA *parm, void *data);
+void RNA_parameter_dynamic_length_set(ParameterList *parms, PropertyRNA *parm, int length);
+void RNA_parameter_dynamic_length_set_data(ParameterList *parms, PropertyRNA *parm, void *data, int length);
int RNA_function_call(struct bContext *C, struct ReportList *reports, PointerRNA *ptr,
FunctionRNA *func, ParameterList *parms);
@@ -1084,17 +1086,9 @@ int RNA_function_call_lookup(struct bContext *C, struct ReportList *reports, Poi
const char *identifier, ParameterList *parms);
int RNA_function_call_direct(struct bContext *C, struct ReportList *reports, PointerRNA *ptr,
- FunctionRNA *func, const char *format, ...)
-#ifdef __GNUC__
-__attribute__ ((format(printf, 5, 6)))
-#endif
-;
+ FunctionRNA *func, const char *format, ...) ATTR_PRINTF_FORMAT(5, 6);
int RNA_function_call_direct_lookup(struct bContext *C, struct ReportList *reports, PointerRNA *ptr,
- const char *identifier, const char *format, ...)
-#ifdef __GNUC__
-__attribute__ ((format(printf, 5, 6)))
-#endif
-;
+ const char *identifier, const char *format, ...) ATTR_PRINTF_FORMAT(5, 6);
int RNA_function_call_direct_va(struct bContext *C, struct ReportList *reports, PointerRNA *ptr,
FunctionRNA *func, const char *format, va_list args);
int RNA_function_call_direct_va_lookup(struct bContext *C, struct ReportList *reports, PointerRNA *ptr,
@@ -1120,17 +1114,19 @@ StructRNA *ID_code_to_RNA_type(short idcode);
# define RNA_warning(format, ...) _RNA_warning("%s: " format "\n", __FUNCTION__, __VA_ARGS__)
#endif
-void _RNA_warning(const char *format, ...)
-#ifdef __GNUC__
-__attribute__ ((format(printf, 1, 2)))
-#endif
-;
+void _RNA_warning(const char *format, ...) ATTR_PRINTF_FORMAT(1, 2);
/* Equals test (skips pointers and collections)
* is_strict false assumes uninitialized properties are equal */
-bool RNA_property_equals(struct PointerRNA *a, struct PointerRNA *b, struct PropertyRNA *prop, bool is_strict);
-bool RNA_struct_equals(struct PointerRNA *a, struct PointerRNA *b, bool is_strict);
+typedef enum eRNAEqualsMode {
+ RNA_EQ_STRICT, /* set/unset ignored */
+ RNA_EQ_UNSET_MATCH_ANY, /* unset property matches anything */
+ RNA_EQ_UNSET_MATCH_NONE /* unset property never matches set property */
+} eRNAEqualsMode;
+
+bool RNA_property_equals(struct PointerRNA *a, struct PointerRNA *b, struct PropertyRNA *prop, eRNAEqualsMode mode);
+bool RNA_struct_equals(struct PointerRNA *a, struct PointerRNA *b, eRNAEqualsMode mode);
#ifdef __cplusplus
}
diff --git a/source/blender/makesrna/RNA_define.h b/source/blender/makesrna/RNA_define.h
index 924fc505fda..2b1a5bc71ff 100644
--- a/source/blender/makesrna/RNA_define.h
+++ b/source/blender/makesrna/RNA_define.h
@@ -42,8 +42,8 @@ extern "C" {
BlenderRNA *RNA_create(void);
void RNA_define_free(BlenderRNA *brna);
void RNA_free(BlenderRNA *brna);
-void RNA_define_verify_sdna(int verify);
-void RNA_define_animate_sdna(int animate);
+void RNA_define_verify_sdna(bool verify);
+void RNA_define_animate_sdna(bool animate);
void RNA_init(void);
void RNA_exit(void);
@@ -164,7 +164,7 @@ void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *update
void RNA_def_property_editable_func(PropertyRNA *prop, const char *editable);
void RNA_def_property_editable_array_func(PropertyRNA *prop, const char *editable);
-void RNA_def_property_update_runtime(PropertyRNA *prop, void *func);
+void RNA_def_property_update_runtime(PropertyRNA *prop, const void *func);
void RNA_def_property_dynamic_array_funcs(PropertyRNA *prop, const char *getlength);
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set);
@@ -225,6 +225,10 @@ const char *RNA_property_typename(PropertyType type);
void RNA_identifier_sanitize(char *identifier, int property);
+extern const int rna_matrix_dimsize_3x3[];
+extern const int rna_matrix_dimsize_4x4[];
+extern const int rna_matrix_dimsize_4x2[];
+
/* max size for dynamic defined type descriptors,
* this value is arbitrary */
#define RNA_DYN_DESCR_MAX 240
diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h
index 86d043b839a..d33d3df8a5e 100644
--- a/source/blender/makesrna/RNA_enum_types.h
+++ b/source/blender/makesrna/RNA_enum_types.h
@@ -169,6 +169,8 @@ extern EnumPropertyItem linestyle_alpha_modifier_type_items[];
extern EnumPropertyItem linestyle_thickness_modifier_type_items[];
extern EnumPropertyItem linestyle_geometry_modifier_type_items[];
+extern EnumPropertyItem window_cursor_items[];
+
struct bContext;
struct PointerRNA;
struct PropertyRNA;
diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h
index 69cb2caf058..43bf1973c33 100644
--- a/source/blender/makesrna/RNA_types.h
+++ b/source/blender/makesrna/RNA_types.h
@@ -69,27 +69,27 @@ typedef struct PropertyPointerRNA {
/* Property */
typedef enum PropertyType {
- PROP_BOOLEAN = 0,
- PROP_INT = 1,
- PROP_FLOAT = 2,
- PROP_STRING = 3,
- PROP_ENUM = 4,
- PROP_POINTER = 5,
- PROP_COLLECTION = 6
+ PROP_BOOLEAN = 0,
+ PROP_INT = 1,
+ PROP_FLOAT = 2,
+ PROP_STRING = 3,
+ PROP_ENUM = 4,
+ PROP_POINTER = 5,
+ PROP_COLLECTION = 6,
} PropertyType;
/* also update rna_property_subtype_unit when you change this */
typedef enum PropertyUnit {
- PROP_UNIT_NONE = (0 << 16),
- PROP_UNIT_LENGTH = (1 << 16), /* m */
- PROP_UNIT_AREA = (2 << 16), /* m^2 */
- PROP_UNIT_VOLUME = (3 << 16), /* m^3 */
- PROP_UNIT_MASS = (4 << 16), /* kg */
- PROP_UNIT_ROTATION = (5 << 16), /* radians */
- PROP_UNIT_TIME = (6 << 16), /* frame */
- PROP_UNIT_VELOCITY = (7 << 16), /* m/s */
+ PROP_UNIT_NONE = (0 << 16),
+ PROP_UNIT_LENGTH = (1 << 16), /* m */
+ PROP_UNIT_AREA = (2 << 16), /* m^2 */
+ PROP_UNIT_VOLUME = (3 << 16), /* m^3 */
+ PROP_UNIT_MASS = (4 << 16), /* kg */
+ PROP_UNIT_ROTATION = (5 << 16), /* radians */
+ PROP_UNIT_TIME = (6 << 16), /* frame */
+ PROP_UNIT_VELOCITY = (7 << 16), /* m/s */
PROP_UNIT_ACCELERATION = (8 << 16), /* m/(s^2) */
- PROP_UNIT_CAMERA = (9 << 16) /* mm */
+ PROP_UNIT_CAMERA = (9 << 16), /* mm */
} PropertyUnit;
#define RNA_SUBTYPE_UNIT(subtype) ((subtype) & 0x00FF0000)
@@ -105,95 +105,101 @@ typedef enum PropertyUnit {
* node socket button subtypes!
*/
typedef enum PropertySubType {
- PROP_NONE = 0,
+ PROP_NONE = 0,
/* strings */
- PROP_FILEPATH = 1,
- PROP_DIRPATH = 2,
- PROP_FILENAME = 3,
- PROP_BYTESTRING = 4, /* a string which should be represented as bytes in python, still NULL terminated though. */
+ PROP_FILEPATH = 1,
+ PROP_DIRPATH = 2,
+ PROP_FILENAME = 3,
+ PROP_BYTESTRING = 4, /* a string which should be represented as bytes in python, NULL terminated though. */
/* 5 was used by "PROP_TRANSLATE" sub-type, which is now a flag. */
- PROP_PASSWORD = 6, /* a string which should not be displayed in UI */
+ PROP_PASSWORD = 6, /* a string which should not be displayed in UI */
/* numbers */
- PROP_UNSIGNED = 13,
- PROP_PERCENTAGE = 14,
- PROP_FACTOR = 15,
- PROP_ANGLE = 16 | PROP_UNIT_ROTATION,
- PROP_TIME = 17 | PROP_UNIT_TIME,
+ PROP_UNSIGNED = 13,
+ PROP_PERCENTAGE = 14,
+ PROP_FACTOR = 15,
+ PROP_ANGLE = 16 | PROP_UNIT_ROTATION,
+ PROP_TIME = 17 | PROP_UNIT_TIME,
/* distance in 3d space, don't use for pixel distance for eg. */
- PROP_DISTANCE = 18 | PROP_UNIT_LENGTH,
- PROP_DISTANCE_CAMERA = 19 | PROP_UNIT_CAMERA,
+ PROP_DISTANCE = 18 | PROP_UNIT_LENGTH,
+ PROP_DISTANCE_CAMERA = 19 | PROP_UNIT_CAMERA,
/* number arrays */
- PROP_COLOR = 20,
- PROP_TRANSLATION = 21 | PROP_UNIT_LENGTH,
- PROP_DIRECTION = 22,
- PROP_VELOCITY = 23 | PROP_UNIT_VELOCITY,
- PROP_ACCELERATION = 24 | PROP_UNIT_ACCELERATION,
- PROP_MATRIX = 25,
- PROP_EULER = 26 | PROP_UNIT_ROTATION,
- PROP_QUATERNION = 27,
- PROP_AXISANGLE = 28,
- PROP_XYZ = 29,
- PROP_XYZ_LENGTH = 29 | PROP_UNIT_LENGTH,
- PROP_COLOR_GAMMA = 30, /* used for colors which would be color managed before display */
- PROP_COORDS = 31, /* generic array, no units applied, only that x/y/z/w are used (python vec) */
+ PROP_COLOR = 20,
+ PROP_TRANSLATION = 21 | PROP_UNIT_LENGTH,
+ PROP_DIRECTION = 22,
+ PROP_VELOCITY = 23 | PROP_UNIT_VELOCITY,
+ PROP_ACCELERATION = 24 | PROP_UNIT_ACCELERATION,
+ PROP_MATRIX = 25,
+ PROP_EULER = 26 | PROP_UNIT_ROTATION,
+ PROP_QUATERNION = 27,
+ PROP_AXISANGLE = 28,
+ PROP_XYZ = 29,
+ PROP_XYZ_LENGTH = 29 | PROP_UNIT_LENGTH,
+ PROP_COLOR_GAMMA = 30, /* used for colors which would be color managed before display */
+ PROP_COORDS = 31, /* generic array, no units applied, only that x/y/z/w are used (python vec) */
/* booleans */
- PROP_LAYER = 40,
- PROP_LAYER_MEMBER = 41
+ PROP_LAYER = 40,
+ PROP_LAYER_MEMBER = 41,
} PropertySubType;
-/* Make sure enums are updated with thses */
-/* HIGHEST FLAG IN USE: 1 << 29 */
+/* Make sure enums are updated with these */
+/* HIGHEST FLAG IN USE: 1 << 30 */
typedef enum PropertyFlag {
/* editable means the property is editable in the user
* interface, properties are editable by default except
* for pointers and collections. */
- PROP_EDITABLE = (1 << 0),
+ PROP_EDITABLE = (1 << 0),
/* this property is editable even if it is lib linked,
* meaning it will get lost on reload, but it's useful
* for editing. */
- PROP_LIB_EXCEPTION = (1 << 16),
+ PROP_LIB_EXCEPTION = (1 << 16),
/* animatable means the property can be driven by some
* other input, be it animation curves, expressions, ..
* properties are animatable by default except for pointers
* and collections */
- PROP_ANIMATABLE = (1 << 1),
+ PROP_ANIMATABLE = (1 << 1),
/* icon */
- PROP_ICONS_CONSECUTIVE = (1 << 12),
+ PROP_ICONS_CONSECUTIVE = (1 << 12),
/* hidden in the user interface */
- PROP_HIDDEN = (1 << 19),
+ PROP_HIDDEN = (1 << 19),
/* do not write in presets */
- PROP_SKIP_SAVE = (1 << 28),
-
- /* function paramater flags */
- PROP_REQUIRED = (1 << 2),
- PROP_OUTPUT = (1 << 3),
- PROP_RNAPTR = (1 << 11),
+ PROP_SKIP_SAVE = (1 << 28),
+
+ /* function parameter flags */
+ PROP_REQUIRED = (1 << 2),
+ PROP_OUTPUT = (1 << 3),
+ PROP_RNAPTR = (1 << 11),
+ /* This allows for non-breaking API updates, when adding non-critical new parameter to a callback function.
+ * This way, old py code defining funcs without that parameter would still work.
+ * WARNING: any parameter after the first PYFUNC_OPTIONAL one will be considered as optional!
+ * NOTE: only for input parameters!
+ */
+ PROP_PYFUNC_OPTIONAL = (1 << 30),
/* registering */
- PROP_REGISTER = (1 << 4),
- PROP_REGISTER_OPTIONAL = (1 << 4) | (1 << 5),
+ PROP_REGISTER = (1 << 4),
+ PROP_REGISTER_OPTIONAL = PROP_REGISTER | (1 << 5),
/* pointers */
- PROP_ID_REFCOUNT = (1 << 6),
+ PROP_ID_REFCOUNT = (1 << 6),
/* disallow assigning a variable to its self, eg an object tracking its self
* only apply this to types that are derived from an ID ()*/
- PROP_ID_SELF_CHECK = (1 << 20),
+ PROP_ID_SELF_CHECK = (1 << 20),
/* use for...
* - pointers: in the UI and python so unsetting or setting to None won't work
* - strings: so our internal generated get/length/set functions know to do NULL checks before access [#30865] */
- PROP_NEVER_NULL = (1 << 18),
+ PROP_NEVER_NULL = (1 << 18),
/* currently only used for UI, this is similar to PROP_NEVER_NULL
* except that the value may be NULL at times, used for ObData, where an Empty's will be NULL
* but setting NULL on a mesh object is not possible. So, if its not NULL, setting NULL cant be done! */
- PROP_NEVER_UNLINK = (1 << 25),
+ PROP_NEVER_UNLINK = (1 << 25),
/* flag contains multiple enums.
* note: not to be confused with prop->enumbitflags
@@ -201,33 +207,33 @@ typedef enum PropertyFlag {
*
* note: these can't be animated so use with care.
*/
- PROP_ENUM_FLAG = (1 << 21),
+ PROP_ENUM_FLAG = (1 << 21),
/* need context for update function */
- PROP_CONTEXT_UPDATE = (1 << 22),
+ PROP_CONTEXT_UPDATE = (1 << 22),
PROP_CONTEXT_PROPERTY_UPDATE = (1 << 22) | (1 << 27),
/* Use for arrays or for any data that should not have a reference kept
* most common case is functions that return arrays where the array */
- PROP_THICK_WRAP = (1 << 23),
+ PROP_THICK_WRAP = (1 << 23),
/* Reject values outside limits, use for python api only so far
* this is for use when silently clamping string length will give
* bad behavior later. Could also enforce this for INT's and other types.
* note: currently no support for function arguments or non utf8 paths (filepaths) */
- PROP_NEVER_CLAMP = (1 << 26),
+ PROP_NEVER_CLAMP = (1 << 26),
/* internal flags */
- PROP_BUILTIN = (1 << 7),
- PROP_EXPORT = (1 << 8),
- PROP_RUNTIME = (1 << 9),
- PROP_IDPROPERTY = (1 << 10),
- PROP_RAW_ACCESS = (1 << 13),
- PROP_RAW_ARRAY = (1 << 14),
- PROP_FREE_POINTERS = (1 << 15),
- PROP_DYNAMIC = (1 << 17), /* for dynamic arrays, and retvals of type string */
- PROP_ENUM_NO_CONTEXT = (1 << 24), /* for enum that shouldn't be contextual */
- PROP_ENUM_NO_TRANSLATE = (1 << 29), /* for enums that shouldn't be translated (e.g. renderlayers' names in nodes) */
+ PROP_BUILTIN = (1 << 7),
+ PROP_EXPORT = (1 << 8),
+ PROP_RUNTIME = (1 << 9),
+ PROP_IDPROPERTY = (1 << 10),
+ PROP_RAW_ACCESS = (1 << 13),
+ PROP_RAW_ARRAY = (1 << 14),
+ PROP_FREE_POINTERS = (1 << 15),
+ PROP_DYNAMIC = (1 << 17), /* for dynamic arrays, and retvals of type string */
+ PROP_ENUM_NO_CONTEXT = (1 << 24), /* for enum that shouldn't be contextual */
+ PROP_ENUM_NO_TRANSLATE = (1 << 29), /* for enums not to be translated (e.g. renderlayers' names in nodes) */
} PropertyFlag;
typedef struct CollectionPropertyIterator {
@@ -332,23 +338,23 @@ typedef struct ParameterDynAlloc {
/* Function */
typedef enum FunctionFlag {
- FUNC_NO_SELF = 1, /* for static functions */
- FUNC_USE_SELF_TYPE = 2, /* for class methods, only used when FUNC_NO_SELF is set */
- FUNC_USE_MAIN = 4,
- FUNC_USE_CONTEXT = 8,
- FUNC_USE_REPORTS = 16,
- FUNC_USE_SELF_ID = 2048,
- FUNC_ALLOW_WRITE = 4096,
+ FUNC_NO_SELF = (1 << 0), /* for static functions */
+ FUNC_USE_SELF_TYPE = (1 << 1), /* for class methods, only used when FUNC_NO_SELF is set */
+ FUNC_USE_MAIN = (1 << 2),
+ FUNC_USE_CONTEXT = (1 << 3),
+ FUNC_USE_REPORTS = (1 << 4),
+ FUNC_USE_SELF_ID = (1 << 11),
+ FUNC_ALLOW_WRITE = (1 << 12),
/* registering */
- FUNC_REGISTER = 32,
- FUNC_REGISTER_OPTIONAL = 32 | 64,
+ FUNC_REGISTER = (1 << 5),
+ FUNC_REGISTER_OPTIONAL = FUNC_REGISTER | (1 << 6),
/* internal flags */
- FUNC_BUILTIN = 128,
- FUNC_EXPORT = 256,
- FUNC_RUNTIME = 512,
- FUNC_FREE_POINTERS = 1024
+ FUNC_BUILTIN = (1 << 7),
+ FUNC_EXPORT = (1 << 8),
+ FUNC_RUNTIME = (1 << 9),
+ FUNC_FREE_POINTERS = (1 << 10),
} FunctionFlag;
typedef void (*CallFunc)(struct bContext *C, struct ReportList *reports, PointerRNA *ptr, ParameterList *parms);
@@ -359,15 +365,15 @@ typedef struct FunctionRNA FunctionRNA;
typedef enum StructFlag {
/* indicates that this struct is an ID struct, and to use refcounting */
- STRUCT_ID = 1,
- STRUCT_ID_REFCOUNT = 2,
- STRUCT_UNDO = 4, /* defaults on, clear for user preferences and similar */
+ STRUCT_ID = (1 << 0),
+ STRUCT_ID_REFCOUNT = (1 << 1),
+ STRUCT_UNDO = (1 << 2), /* defaults on, clear for user preferences and similar */
/* internal flags */
- STRUCT_RUNTIME = 8,
- STRUCT_GENERATED = 16,
- STRUCT_FREE_POINTERS = 32,
- STRUCT_NO_IDPROPERTIES = 64 /* Menu's and Panels don't need properties */
+ STRUCT_RUNTIME = (1 << 3),
+ STRUCT_GENERATED = (1 << 4),
+ STRUCT_FREE_POINTERS = (1 << 5),
+ STRUCT_NO_IDPROPERTIES = (1 << 6), /* Menu's and Panels don't need properties */
} StructFlag;
typedef int (*StructValidateFunc)(struct PointerRNA *ptr, void *data, int *have_function);
diff --git a/source/blender/makesrna/SConscript b/source/blender/makesrna/SConscript
index 2d0c4260c97..5053c8082e9 100644
--- a/source/blender/makesrna/SConscript
+++ b/source/blender/makesrna/SConscript
@@ -36,6 +36,7 @@ incs = [
'.',
'./intern',
'#/intern/guardedalloc',
+ '#/intern/atomic',
'#/intern/memutil',
'#/extern/glew/include',
'#/intern/audaspace/intern',
@@ -65,6 +66,9 @@ if env['WITH_BF_BULLET']:
defs.append('WITH_BULLET')
incs += ' #/intern/rigidbody'
+if env['WITH_BF_OIIO']:
+ defs.append('WITH_OPENIMAGEIO')
+
if env['WITH_BF_OPENEXR']:
defs.append('WITH_OPENEXR')
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt
index 592c518e9c0..9b2fc2c3c4d 100644
--- a/source/blender/makesrna/intern/CMakeLists.txt
+++ b/source/blender/makesrna/intern/CMakeLists.txt
@@ -23,9 +23,6 @@
#
# ***** END GPL LICENSE BLOCK *****
-# Generated code has some unused vars we can ignore.
-remove_strict_flags()
-
if(CMAKE_COMPILER_IS_GNUCC)
# add here so we fail early.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=implicit-function-declaration")
@@ -124,7 +121,7 @@ set(APISRC
)
string(REGEX REPLACE "rna_([a-zA-Z0-9_-]*).c" "${CMAKE_CURRENT_BINARY_DIR}/rna_\\1_gen.c" GENSRC "${DEFSRC}")
-set_source_files_properties(GENSRC PROPERTIES GENERATED true)
+set_source_files_properties(${GENSRC} PROPERTIES GENERATED TRUE)
set(SRC_RNA_INC
../RNA_access.h
@@ -140,6 +137,8 @@ set(SRC
${DEFSRC}
${APISRC}
../../../../intern/guardedalloc/intern/mallocn.c
+ ../../../../intern/guardedalloc/intern/mallocn_guarded_impl.c
+ ../../../../intern/guardedalloc/intern/mallocn_lockfree_impl.c
../../../../intern/guardedalloc/intern/mmap_win.c
)
@@ -167,6 +166,10 @@ if(WITH_IMAGE_OPENEXR)
add_definitions(-DWITH_OPENEXR)
endif()
+if(WITH_OPENIMAGEIO)
+ add_definitions(-DWITH_OPENIMAGEIO)
+endif()
+
if(WITH_IMAGE_TIFF)
add_definitions(-DWITH_TIFF)
endif()
@@ -252,11 +255,6 @@ if(WITH_BULLET)
add_definitions(-DWITH_BULLET)
endif()
-# for mallocn.c
-if (WITH_GUARDEDALLOC)
- add_definitions(-DWITH_GUARDEDALLOC)
-endif()
-
# Build makesrna executable
blender_include_dirs(
.
@@ -276,6 +274,7 @@ blender_include_dirs(
../../../../intern/audaspace/intern
../../../../intern/cycles/blender
../../../../intern/guardedalloc
+ ../../../../intern/atomic
../../../../intern/memutil
../../../../intern/smoke/extern
)
diff --git a/source/blender/makesrna/intern/SConscript b/source/blender/makesrna/intern/SConscript
index 10b6a8c8d10..fe6950e62dd 100644
--- a/source/blender/makesrna/intern/SConscript
+++ b/source/blender/makesrna/intern/SConscript
@@ -82,6 +82,9 @@ if env['WITH_BF_BULLET']:
defs.append('WITH_BULLET')
incs += ' #/intern/rigidbody'
+if env['WITH_BF_OIIO']:
+ defs.append('WITH_OPENIMAGEIO')
+
if env['WITH_BF_OPENEXR']:
defs.append('WITH_OPENEXR')
@@ -150,8 +153,6 @@ if env['WITH_BF_INTERNATIONAL']:
if not env['BF_DEBUG']:
defs.append('NDEBUG')
-defs.append('WITH_GUARDEDALLOC')
-
makesrna_tool.Append(CPPDEFINES=defs)
makesrna_tool.Append (CPPPATH = Split(incs))
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index c158facca7c..1cb9eb8e9ae 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -82,7 +82,7 @@ static void rna_generate_static_parameter_prototypes(FILE *f, StructRNA *srna, F
fprintf(f, param); \
} (void)0
-static int replace_if_different(char *tmpfile, const char *dep_files[])
+static int replace_if_different(const char *tmpfile, const char *dep_files[])
{
/* return 0; *//* use for testing had edited rna */
@@ -1555,7 +1555,7 @@ static void rna_def_property_funcs_header(FILE *f, StructRNA *srna, PropertyDefR
}
else if (prop->arraydimension && prop->totarraylength) {
fprintf(f, "void %sget(PointerRNA *ptr, int values[%u]);\n", func, prop->totarraylength);
- fprintf(f, "void %sset(PointerRNA *ptr, const int values[%d]);\n", func, prop->totarraylength);
+ fprintf(f, "void %sset(PointerRNA *ptr, const int values[%u]);\n", func, prop->totarraylength);
}
else {
fprintf(f, "void %sget(PointerRNA *ptr, int values[]);\n", func);
@@ -1571,7 +1571,7 @@ static void rna_def_property_funcs_header(FILE *f, StructRNA *srna, PropertyDefR
}
else if (prop->arraydimension && prop->totarraylength) {
fprintf(f, "void %sget(PointerRNA *ptr, float values[%u]);\n", func, prop->totarraylength);
- fprintf(f, "void %sset(PointerRNA *ptr, const float values[%d]);\n", func, prop->totarraylength);
+ fprintf(f, "void %sset(PointerRNA *ptr, const float values[%u]);\n", func, prop->totarraylength);
}
else {
fprintf(f, "void %sget(PointerRNA *ptr, float values[]);\n", func);
@@ -2273,11 +2273,12 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
valstr = "*";
}
- /* this must be kept in sync with RNA_parameter_length_get_data,
+ /* this must be kept in sync with RNA_parameter_dynamic_length_get_data and RNA_parameter_get,
* we could just call the function directly, but this is faster */
if (flag & PROP_DYNAMIC) {
- fprintf(f, "\t%s_len = %s((int *)_data);\n", dparm->prop->identifier, pout ? "" : "*");
- data_str = "(&(((char *)_data)[sizeof(void *)]))";
+ fprintf(f, "\t%s_len = %s((ParameterDynAlloc *)_data)->array_tot;\n", dparm->prop->identifier,
+ pout ? "(int *)&" : "(int)");
+ data_str = "(&(((ParameterDynAlloc *)_data)->array))";
}
else {
data_str = "_data";
@@ -2691,7 +2692,11 @@ static void rna_generate_static_parameter_prototypes(FILE *f, StructRNA *srna, F
}
+ /* ensure func(void) if there are no args */
+ if (first) fprintf(f, "void");
+
fprintf(f, ")");
+
if (close_prototype)
fprintf(f, ";\n");
}
@@ -2763,7 +2768,7 @@ static void rna_generate_struct_prototypes(FILE *f)
static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, PropertyRNA *prop)
{
- char *strnest = "", *errnest = "";
+ char *strnest = (char *)"", *errnest = (char *)"";
int len, freenest = 0;
if (nest != NULL) {
@@ -3329,6 +3334,12 @@ static void rna_generate(BlenderRNA *brna, FILE *f, const char *filename, const
fprintf(f, "#include \"%s\"\n", api_filename);
fprintf(f, "\n");
+ /* we want the included C files to have warnings enabled but for the generated code
+ * ignore unused-parameter warnings which are hard to prevent */
+#ifdef __GNUC__
+ fprintf(f, "#pragma GCC diagnostic ignored \"-Wunused-parameter\"\n\n");
+#endif
+
fprintf(f, "/* Autogenerated Functions */\n\n");
for (ds = DefRNA.structs.first; ds; ds = ds->cont.next) {
@@ -3435,7 +3446,7 @@ static const char *cpp_classes = ""
" inline void sname::identifier(int value) { sname##_##identifier##_set(&ptr, value); }\n"
"\n"
"#define BOOLEAN_ARRAY_PROPERTY(sname, size, identifier) \\\n"
-" inline Array<int,size> sname::identifier(void) \\\n"
+" inline Array<int, size> sname::identifier(void) \\\n"
" { Array<int, size> ar; sname##_##identifier##_get(&ptr, ar.data); return ar; } \\\n"
" inline void sname::identifier(int values[size]) \\\n"
" { sname##_##identifier##_set(&ptr, values); } \\\n"
@@ -3455,7 +3466,7 @@ static const char *cpp_classes = ""
" inline void sname::identifier(int value) { sname##_##identifier##_set(&ptr, value); }\n"
"\n"
"#define INT_ARRAY_PROPERTY(sname, size, identifier) \\\n"
-" inline Array<int,size> sname::identifier(void) \\\n"
+" inline Array<int, size> sname::identifier(void) \\\n"
" { Array<int, size> ar; sname##_##identifier##_get(&ptr, ar.data); return ar; } \\\n"
" inline void sname::identifier(int values[size]) \\\n"
" { sname##_##identifier##_set(&ptr, values); } \\\n"
@@ -3475,7 +3486,7 @@ static const char *cpp_classes = ""
" inline void sname::identifier(float value) { sname##_##identifier##_set(&ptr, value); }\n"
"\n"
"#define FLOAT_ARRAY_PROPERTY(sname, size, identifier) \\\n"
-" inline Array<float,size> sname::identifier(void) \\\n"
+" inline Array<float, size> sname::identifier(void) \\\n"
" { Array<float, size> ar; sname##_##identifier##_get(&ptr, ar.data); return ar; } \\\n"
" inline void sname::identifier(float values[size]) \\\n"
" { sname##_##identifier##_set(&ptr, values); } \\\n"
@@ -3544,8 +3555,12 @@ static const char *cpp_classes = ""
" } \n"
"#define COLLECTION_PROPERTY_LOOKUP_INT_TRUE(sname, identifier) \\\n"
" inline static int sname##_##identifier##_lookup_int_wrap(PointerRNA *ptr, int key, PointerRNA *r_ptr) \\\n"
-" { return sname##_##identifier##_lookup_int(ptr, key, r_ptr); } \n"
-"\n"
+" { \\\n"
+" int found = sname##_##identifier##_lookup_int(ptr, key, r_ptr); \\\n"
+" if (!found) \\\n"
+" memset(r_ptr, 0, sizeof(*r_ptr)); \\\n"
+" return found; \\\n"
+" } \n"
"#define COLLECTION_PROPERTY_LOOKUP_STRING_FALSE(sname, identifier) \\\n"
" inline static int sname##_##identifier##_lookup_string_wrap(PointerRNA *ptr, const char *key, PointerRNA *r_ptr) \\\n"
" { \\\n"
@@ -3573,8 +3588,12 @@ static const char *cpp_classes = ""
" } \n"
"#define COLLECTION_PROPERTY_LOOKUP_STRING_TRUE(sname, identifier) \\\n"
" inline static int sname##_##identifier##_lookup_string_wrap(PointerRNA *ptr, const char *key, PointerRNA *r_ptr) \\\n"
-" { return sname##_##identifier##_lookup_string(ptr, key, r_ptr); } \n"
-"\n"
+" { \\\n"
+" int found = sname##_##identifier##_lookup_string(ptr, key, r_ptr); \\\n"
+" if (!found) \\\n"
+" memset(r_ptr, 0, sizeof(*r_ptr)); \\\n"
+" return found; \\\n"
+" } \n"
"#define COLLECTION_PROPERTY(collection_funcs, type, sname, identifier, has_length, has_lookup_int, has_lookup_string) \\\n"
" typedef CollectionIterator<type, sname##_##identifier##_begin, \\\n"
" sname##_##identifier##_next, sname##_##identifier##_end> identifier##_iterator; \\\n"
@@ -3676,7 +3695,7 @@ static const char *cpp_classes = ""
" typename Tcollection_funcs>\n"
"class Collection : public Tcollection_funcs {\n"
"public:\n"
-" Collection(const PointerRNA &p) : Tcollection_funcs(p), ptr(p) {}\n"
+" Collection(const PointerRNA &p) : Tcollection_funcs(p), ptr(p) {}\n"
"\n"
" void begin(CollectionIterator<T, Tbegin, Tnext, Tend>& iter)\n"
" { iter.begin(ptr); }\n"
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index 26febf217a6..075f852a032 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -36,6 +36,7 @@
#include "RNA_access.h"
#include "RNA_define.h"
+#include "RNA_enum_types.h"
#include "WM_types.h"
@@ -57,7 +58,7 @@ EnumPropertyItem id_type_items[] = {
{ID_KE, "KEY", ICON_SHAPEKEY_DATA, "Key", ""},
{ID_LA, "LAMP", ICON_LAMP_DATA, "Lamp", ""},
{ID_LI, "LIBRARY", ICON_LIBRARY_DATA_DIRECT, "Library", ""},
- {ID_LS, "LINESTYLE", ICON_PARTICLE_DATA, "FreestyleLineStyle", ""}, /* FIXME proper icon */
+ {ID_LS, "LINESTYLE", ICON_BRUSH_DATA, "Line Style", ""}, /* FIXME proper icon */
{ID_LT, "LATTICE", ICON_LATTICE_DATA, "Lattice", ""},
{ID_MA, "MATERIAL", ICON_MATERIAL_DATA, "Material", ""},
{ID_MB, "META", ICON_META_DATA, "MetaBall", ""},
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index f3e561cde0a..fe457a14718 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -49,6 +49,7 @@
#include "BKE_context.h"
#include "BKE_idcode.h"
#include "BKE_idprop.h"
+#include "BKE_fcurve.h"
#include "BKE_main.h"
#include "BKE_report.h"
@@ -289,9 +290,7 @@ static void rna_idproperty_free(PointerRNA *ptr, const char *name)
if (group) {
IDProperty *idprop = IDP_GetPropertyFromGroup(group, name);
if (idprop) {
- IDP_RemFromGroup(group, idprop);
- IDP_FreeProperty(idprop);
- MEM_freeN(idprop);
+ IDP_FreeFromGroup(group, idprop);
}
}
}
@@ -422,9 +421,7 @@ IDProperty *rna_idproperty_check(PropertyRNA **prop, PointerRNA *ptr)
if (idprop && !rna_idproperty_verify_valid(ptr, *prop, idprop)) {
IDProperty *group = RNA_struct_idprops(ptr, 0);
- IDP_RemFromGroup(group, idprop);
- IDP_FreeProperty(idprop);
- MEM_freeN(idprop);
+ IDP_FreeFromGroup(group, idprop);
return NULL;
}
@@ -595,9 +592,7 @@ bool RNA_struct_idprops_unset(PointerRNA *ptr, const char *identifier)
if (group) {
IDProperty *idp = IDP_GetPropertyFromGroup(group, identifier);
if (idp) {
- IDP_RemFromGroup(group, idp);
- IDP_FreeProperty(idp);
- MEM_freeN(idp);
+ IDP_FreeFromGroup(group, idp);
return true;
}
@@ -650,7 +645,7 @@ static PropertyRNA *RNA_struct_find_nested(PointerRNA *ptr, StructRNA *srna)
{
PropertyRNA *prop = NULL;
- RNA_STRUCT_BEGIN(ptr, iprop)
+ RNA_STRUCT_BEGIN (ptr, iprop)
{
/* This assumes that there can only be one user of this nested struct */
if (RNA_property_pointer_type(ptr, iprop) == srna) {
@@ -673,7 +668,7 @@ bool RNA_struct_contains_property(PointerRNA *ptr, PropertyRNA *prop_test)
iterprop = RNA_struct_iterator_property(ptr->type);
- RNA_PROP_BEGIN(ptr, itemptr, iterprop)
+ RNA_PROP_BEGIN (ptr, itemptr, iterprop)
{
/* PropertyRNA *prop = itemptr.data; */
if (prop_test == (PropertyRNA *)itemptr.data) {
@@ -721,7 +716,7 @@ FunctionRNA *RNA_struct_find_function(StructRNA *srna, const char *identifier)
func = NULL;
- RNA_PROP_BEGIN(&tptr, funcptr, iterprop)
+ RNA_PROP_BEGIN (&tptr, funcptr, iterprop)
{
if (strcmp(identifier, RNA_function_identifier(funcptr.data)) == 0) {
func = funcptr.data;
@@ -1512,14 +1507,24 @@ bool RNA_property_animateable(PointerRNA *ptr, PropertyRNA *prop)
return (prop->flag & PROP_EDITABLE) != 0;
}
-bool RNA_property_animated(PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop))
+bool RNA_property_animated(PointerRNA *ptr, PropertyRNA *prop)
{
- /* would need to ask animation system */
+ int len = 1, index;
+ bool driven;
+
+ if (!prop)
+ return false;
+
+ if (RNA_property_array_check(prop))
+ len = RNA_property_array_length(ptr, prop);
+
+ for (index = 0; index < len; index++)
+ if (rna_get_fcurve(ptr, prop, index, NULL, &driven))
+ return true;
return false;
}
-
/* this function is to check if its possible to create a valid path from the ID
* its slow so don't call in a loop */
bool RNA_property_path_from_ID_check(PointerRNA *ptr, PropertyRNA *prop)
@@ -2760,9 +2765,7 @@ void RNA_property_pointer_remove(PointerRNA *ptr, PropertyRNA *prop)
group = RNA_struct_idprops(ptr, 0);
if (group) {
- IDP_RemFromGroup(group, idprop);
- IDP_FreeProperty(idprop);
- MEM_freeN(idprop);
+ IDP_FreeFromGroup(group, idprop);
}
}
else
@@ -3329,7 +3332,7 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
}
/* no item property pointer, can still be id property, or
* property of a type derived from the collection pointer type */
- RNA_PROP_BEGIN(ptr, itemptr, prop)
+ RNA_PROP_BEGIN (ptr, itemptr, prop)
{
if (itemptr.data) {
if (itemprop) {
@@ -4164,7 +4167,7 @@ static char *rna_idp_path_create(IDP_Chain *child_link)
{
DynStr *dynstr = BLI_dynstr_new();
char *path;
- short first = TRUE;
+ bool is_first = true;
int tot = 0;
IDP_Chain *link = child_link;
@@ -4183,13 +4186,13 @@ static char *rna_idp_path_create(IDP_Chain *child_link)
for (link = link_prev; link; link = link->up) {
/* pass */
if (link->index >= 0) {
- BLI_dynstr_appendf(dynstr, first ? "%s[%d]" : ".%s[%d]", link->name, link->index);
+ BLI_dynstr_appendf(dynstr, is_first ? "%s[%d]" : ".%s[%d]", link->name, link->index);
}
else {
- BLI_dynstr_appendf(dynstr, first ? "%s" : ".%s", link->name);
+ BLI_dynstr_appendf(dynstr, is_first ? "%s" : ".%s", link->name);
}
- first = FALSE;
+ is_first = false;
}
path = BLI_dynstr_get_cstring(dynstr);
@@ -4408,10 +4411,12 @@ char *RNA_path_full_struct_py(struct PointerRNA *ptr)
data_path = RNA_path_from_ID_to_struct(ptr);
- ret = BLI_sprintfN("%s.%s",
- id_path, data_path);
+ /* XXX data_path may be NULL (see #36788), do we want to get the 'bpy.data.foo["bar"].(null)' stuff? */
+ ret = BLI_sprintfN("%s.%s", id_path, data_path);
- MEM_freeN(data_path);
+ if (data_path) {
+ MEM_freeN(data_path);
+ }
MEM_freeN(id_path);
return ret;
@@ -4888,6 +4893,7 @@ int RNA_collection_length(PointerRNA *ptr, const char *name)
bool RNA_property_is_set_ex(PointerRNA *ptr, PropertyRNA *prop, bool use_ghost)
{
+ prop = rna_ensure_property(prop);
if (prop->flag & PROP_IDPROPERTY) {
IDProperty *idprop = rna_idproperty_find(ptr, prop->identifier);
return ((idprop != NULL) && (use_ghost == false || !(idprop->flag & IDP_FLAG_GHOST)));
@@ -4899,6 +4905,7 @@ bool RNA_property_is_set_ex(PointerRNA *ptr, PropertyRNA *prop, bool use_ghost)
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
{
+ prop = rna_ensure_property(prop);
if (prop->flag & PROP_IDPROPERTY) {
IDProperty *idprop = rna_idproperty_find(ptr, prop->identifier);
return ((idprop != NULL) && !(idprop->flag & IDP_FLAG_GHOST));
@@ -4910,6 +4917,7 @@ bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_unset(PointerRNA *ptr, PropertyRNA *prop)
{
+ prop = rna_ensure_property(prop);
if (prop->flag & PROP_IDPROPERTY) {
rna_idproperty_free(ptr, prop->identifier);
}
@@ -4982,7 +4990,7 @@ static char *rna_pointer_as_string__idprop(bContext *C, PointerRNA *ptr)
BLI_dynstr_append(dynstr, "{");
- RNA_STRUCT_BEGIN(ptr, prop)
+ RNA_STRUCT_BEGIN (ptr, prop)
{
propname = RNA_property_identifier(prop);
@@ -5030,9 +5038,9 @@ char *RNA_pointer_as_string(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *p
}
}
-/* context and ptr_default can be NULL */
-char *RNA_pointer_as_string_keywords_ex(bContext *C, PointerRNA *ptr, PointerRNA *ptr_default,
- const short as_function, const short all_args,
+/* context can be NULL */
+char *RNA_pointer_as_string_keywords_ex(bContext *C, PointerRNA *ptr,
+ const bool as_function, const bool all_args,
const int max_prop_length,
PropertyRNA *iterprop)
{
@@ -5042,14 +5050,10 @@ char *RNA_pointer_as_string_keywords_ex(bContext *C, PointerRNA *ptr, PointerRNA
DynStr *dynstr = BLI_dynstr_new();
char *cstring, *buf;
- int first_iter = TRUE, ok = TRUE;
+ bool first_iter = true;
int flag;
- /* only to get the orginal props for comparisons */
- PropertyRNA *prop_default;
- char *buf_default;
-
- RNA_PROP_BEGIN(ptr, propptr, iterprop)
+ RNA_PROP_BEGIN (ptr, propptr, iterprop)
{
prop = propptr.data;
@@ -5068,45 +5072,37 @@ char *RNA_pointer_as_string_keywords_ex(bContext *C, PointerRNA *ptr, PointerRNA
if (as_function && (flag & PROP_REQUIRED)) {
/* required args don't have useful defaults */
BLI_dynstr_appendf(dynstr, first_iter ? "%s" : ", %s", arg_name);
- first_iter = FALSE;
+ first_iter = false;
}
else {
- if (as_function && RNA_property_type(prop) == PROP_POINTER) {
- /* don't expand pointers for functions */
- if (flag & PROP_NEVER_NULL) {
- /* we cant really do the right thing here. arg=arg?, hrmf! */
- buf = BLI_strdup(arg_name);
- }
- else {
- buf = BLI_strdup("None");
- }
+ bool ok = true;
+
+ if (all_args == true) {
+ /* pass */
}
- else {
- buf = RNA_property_as_string(C, ptr, prop, -1, max_prop_length);
+ else if (RNA_struct_idprops_check(ptr->type)) {
+ ok = RNA_property_is_set(ptr, prop);
}
- ok = TRUE;
-
- if (all_args == FALSE && ptr_default) {
- /* not verbose, so only add in attributes that use non-default values
- * slow but good for tooltips */
- prop_default = RNA_struct_find_property(ptr_default, arg_name);
-
- if (prop_default) {
- buf_default = RNA_property_as_string(C, ptr_default, prop_default, -1, max_prop_length);
-
- if (strcmp(buf, buf_default) == 0)
- ok = FALSE; /* values match, don't bother printing */
-
- MEM_freeN(buf_default);
- }
- }
if (ok) {
+ if (as_function && RNA_property_type(prop) == PROP_POINTER) {
+ /* don't expand pointers for functions */
+ if (flag & PROP_NEVER_NULL) {
+ /* we cant really do the right thing here. arg=arg?, hrmf! */
+ buf = BLI_strdup(arg_name);
+ }
+ else {
+ buf = BLI_strdup("None");
+ }
+ }
+ else {
+ buf = RNA_property_as_string(C, ptr, prop, -1, max_prop_length);
+ }
+
BLI_dynstr_appendf(dynstr, first_iter ? "%s=%s" : ", %s=%s", arg_name, buf);
- first_iter = FALSE;
+ first_iter = false;
+ MEM_freeN(buf);
}
-
- MEM_freeN(buf);
}
}
RNA_PROP_END;
@@ -5116,20 +5112,20 @@ char *RNA_pointer_as_string_keywords_ex(bContext *C, PointerRNA *ptr, PointerRNA
return cstring;
}
-char *RNA_pointer_as_string_keywords(bContext *C, PointerRNA *ptr, PointerRNA *ptr_default,
- const short as_function, const short all_args,
+char *RNA_pointer_as_string_keywords(bContext *C, PointerRNA *ptr,
+ const bool as_function, const bool all_args,
const int max_prop_length)
{
PropertyRNA *iterprop;
iterprop = RNA_struct_iterator_property(ptr->type);
- return RNA_pointer_as_string_keywords_ex(C, ptr, ptr_default, as_function, all_args,
+ return RNA_pointer_as_string_keywords_ex(C, ptr, as_function, all_args,
max_prop_length, iterprop);
}
-char *RNA_function_as_string_keywords(bContext *C, FunctionRNA *func, PointerRNA *ptr_default,
- const short as_function, const short all_args,
+char *RNA_function_as_string_keywords(bContext *C, FunctionRNA *func,
+ const bool as_function, const bool all_args,
const int max_prop_length)
{
PointerRNA funcptr;
@@ -5141,7 +5137,7 @@ char *RNA_function_as_string_keywords(bContext *C, FunctionRNA *func, PointerRNA
RNA_struct_iterator_property(funcptr.type);
- return RNA_pointer_as_string_keywords_ex(C, &funcptr, ptr_default, as_function, all_args,
+ return RNA_pointer_as_string_keywords_ex(C, &funcptr, as_function, all_args,
max_prop_length, iterprop);
}
@@ -5160,7 +5156,7 @@ char *RNA_property_as_string(bContext *C, PointerRNA *ptr, PropertyRNA *prop, in
char *cstring;
- /* see if we can coorce into a python type - PropertyType */
+ /* see if we can coerce into a python type - PropertyType */
switch (type) {
case PROP_BOOLEAN:
if (len == 0) {
@@ -5252,11 +5248,11 @@ char *RNA_property_as_string(bContext *C, PointerRNA *ptr, PropertyRNA *prop, in
RNA_property_enum_items(C, ptr, prop, &item, NULL, &free);
if (item) {
- short is_first = TRUE;
+ bool is_first = false;
for (; item->identifier; item++) {
if (item->identifier[0] && item->value & val) {
BLI_dynstr_appendf(dynstr, is_first ? "'%s'" : ", '%s'", item->identifier);
- is_first = FALSE;
+ is_first = false;
}
}
@@ -5357,7 +5353,14 @@ PropertyRNA *RNA_function_get_parameter(PointerRNA *UNUSED(ptr), FunctionRNA *fu
PropertyRNA *RNA_function_find_parameter(PointerRNA *UNUSED(ptr), FunctionRNA *func, const char *identifier)
{
- return BLI_findstring(&func->cont.properties, identifier, offsetof(PropertyRNA, identifier));
+ PropertyRNA *parm;
+
+ parm = func->cont.properties.first;
+ for (; parm; parm = parm->next)
+ if (strcmp(RNA_property_identifier(parm), identifier) == 0)
+ break;
+
+ return parm;
}
const ListBase *RNA_function_defined_parameters(FunctionRNA *func)
@@ -5529,10 +5532,19 @@ void RNA_parameter_get(ParameterList *parms, PropertyRNA *parm, void **value)
if (iter.parm == parm)
break;
- if (iter.valid)
- *value = iter.data;
- else
+ if (iter.valid) {
+ if (parm->flag & PROP_DYNAMIC) {
+ /* for dynamic arrays and strings, data is a pointer to an array */
+ ParameterDynAlloc *data_alloc = iter.data;
+ *value = data_alloc->array;
+ }
+ else {
+ *value = iter.data;
+ }
+ }
+ else {
*value = NULL;
+ }
RNA_parameter_list_end(&iter);
}
@@ -5560,8 +5572,35 @@ void RNA_parameter_set(ParameterList *parms, PropertyRNA *parm, const void *valu
if (iter.parm == parm)
break;
- if (iter.valid)
- memcpy(iter.data, value, iter.size);
+ if (iter.valid) {
+ if (parm->flag & PROP_DYNAMIC) {
+ /* for dynamic arrays and strings, data is a pointer to an array */
+ ParameterDynAlloc *data_alloc = iter.data;
+ size_t size = 0;
+ switch (parm->type) {
+ case PROP_STRING:
+ size = sizeof(char);
+ break;
+ case PROP_INT:
+ case PROP_BOOLEAN:
+ size = sizeof(int);
+ break;
+ case PROP_FLOAT:
+ size = sizeof(float);
+ break;
+ default:
+ break;
+ }
+ size *= data_alloc->array_tot;
+ if (data_alloc->array)
+ MEM_freeN(data_alloc->array);
+ data_alloc->array = MEM_mallocN(size, AT);
+ memcpy(data_alloc->array, value, size);
+ }
+ else {
+ memcpy(iter.data, value, iter.size);
+ }
+ }
RNA_parameter_list_end(&iter);
}
@@ -5579,7 +5618,7 @@ void RNA_parameter_set_lookup(ParameterList *parms, const char *identifier, cons
RNA_parameter_set(parms, parm, value);
}
-int RNA_parameter_length_get(ParameterList *parms, PropertyRNA *parm)
+int RNA_parameter_dynamic_length_get(ParameterList *parms, PropertyRNA *parm)
{
ParameterIterator iter;
int len = 0;
@@ -5591,14 +5630,14 @@ int RNA_parameter_length_get(ParameterList *parms, PropertyRNA *parm)
break;
if (iter.valid)
- len = RNA_parameter_length_get_data(parms, parm, iter.data);
+ len = RNA_parameter_dynamic_length_get_data(parms, parm, iter.data);
RNA_parameter_list_end(&iter);
return len;
}
-void RNA_parameter_length_set(ParameterList *parms, PropertyRNA *parm, int length)
+void RNA_parameter_dynamic_length_set(ParameterList *parms, PropertyRNA *parm, int length)
{
ParameterIterator iter;
@@ -5609,19 +5648,24 @@ void RNA_parameter_length_set(ParameterList *parms, PropertyRNA *parm, int lengt
break;
if (iter.valid)
- RNA_parameter_length_set_data(parms, parm, iter.data, length);
+ RNA_parameter_dynamic_length_set_data(parms, parm, iter.data, length);
RNA_parameter_list_end(&iter);
}
-int RNA_parameter_length_get_data(ParameterList *UNUSED(parms), PropertyRNA *UNUSED(parm), void *data)
+int RNA_parameter_dynamic_length_get_data(ParameterList *UNUSED(parms), PropertyRNA *parm, void *data)
{
- return *((int *)((char *)data));
+ if (parm->flag & PROP_DYNAMIC) {
+ return (int)((ParameterDynAlloc *)data)->array_tot;
+ }
+ return 0;
}
-void RNA_parameter_length_set_data(ParameterList *UNUSED(parms), PropertyRNA *UNUSED(parm), void *data, int length)
+void RNA_parameter_dynamic_length_set_data(ParameterList *UNUSED(parms), PropertyRNA *parm, void *data, int length)
{
- *((int *)data) = length;
+ if (parm->flag & PROP_DYNAMIC) {
+ ((ParameterDynAlloc *)data)->array_tot = (intptr_t)length;
+ }
}
int RNA_function_call(bContext *C, ReportList *reports, PointerRNA *ptr, FunctionRNA *func, ParameterList *parms)
@@ -6269,14 +6313,20 @@ void _RNA_warning(const char *format, ...)
#endif
}
-bool RNA_property_equals(PointerRNA *a, PointerRNA *b, PropertyRNA *prop, bool is_strict)
+bool RNA_property_equals(PointerRNA *a, PointerRNA *b, PropertyRNA *prop, eRNAEqualsMode mode)
{
int len, fromlen;
- /* if not strict, uninitialized properties are assumed to match */
- if (!is_strict)
- if (!(RNA_property_is_set(a, prop) && RNA_property_is_set(b, prop)))
+ if (mode == RNA_EQ_UNSET_MATCH_ANY) {
+ /* uninitialized properties are assumed to match anything */
+ if (!RNA_property_is_set(a, prop) || !RNA_property_is_set(b, prop))
return true;
+ }
+ else if (mode == RNA_EQ_UNSET_MATCH_NONE) {
+ /* unset properties never match set properties */
+ if (RNA_property_is_set(a, prop) != RNA_property_is_set(b, prop))
+ return false;
+ }
/* get the length of the array to work with */
len = RNA_property_array_length(a, prop);
@@ -6390,7 +6440,7 @@ bool RNA_property_equals(PointerRNA *a, PointerRNA *b, PropertyRNA *prop, bool i
if (!STREQ(RNA_property_identifier(prop), "rna_type")) {
PointerRNA propptr_a = RNA_property_pointer_get(a, prop);
PointerRNA propptr_b = RNA_property_pointer_get(b, prop);
- return RNA_struct_equals(&propptr_a, &propptr_b, is_strict);
+ return RNA_struct_equals(&propptr_a, &propptr_b, mode);
}
break;
}
@@ -6402,7 +6452,7 @@ bool RNA_property_equals(PointerRNA *a, PointerRNA *b, PropertyRNA *prop, bool i
return true;
}
-bool RNA_struct_equals(PointerRNA *a, PointerRNA *b, bool is_strict)
+bool RNA_struct_equals(PointerRNA *a, PointerRNA *b, eRNAEqualsMode mode)
{
CollectionPropertyIterator iter;
// CollectionPropertyRNA *citerprop; /* UNUSED */
@@ -6423,7 +6473,7 @@ bool RNA_struct_equals(PointerRNA *a, PointerRNA *b, bool is_strict)
for (; iter.valid; RNA_property_collection_next(&iter)) {
PropertyRNA *prop = iter.ptr.data;
- if (!RNA_property_equals(a, b, prop, is_strict)) {
+ if (!RNA_property_equals(a, b, prop, mode)) {
equals = false;
break;
}
diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c
index 44ce081f68f..c5b7c88d8fc 100644
--- a/source/blender/makesrna/intern/rna_action.c
+++ b/source/blender/makesrna/intern/rna_action.c
@@ -191,7 +191,8 @@ static void rna_Action_active_pose_marker_index_set(PointerRNA *ptr, int value)
act->active_marker = value + 1;
}
-static void rna_Action_active_pose_marker_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
+static void rna_Action_active_pose_marker_index_range(PointerRNA *ptr, int *min, int *max,
+ int *UNUSED(softmin), int *UNUSED(softmax))
{
bAction *act = (bAction *)ptr->data;
@@ -490,7 +491,7 @@ static void rna_def_action_group(BlenderRNA *brna)
prop = RNA_def_property(srna, "channels", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "channels", NULL);
RNA_def_property_struct_type(prop, "FCurve");
- RNA_def_property_collection_funcs(prop, 0, "rna_ActionGroup_channels_next", NULL, NULL, NULL, NULL, NULL, NULL);
+ RNA_def_property_collection_funcs(prop, NULL, "rna_ActionGroup_channels_next", NULL, NULL, NULL, NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Channels", "F-Curves in this group");
prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c
index 99053714246..a07a000dacb 100644
--- a/source/blender/makesrna/intern/rna_actuator.c
+++ b/source/blender/makesrna/intern/rna_actuator.c
@@ -45,7 +45,7 @@
#include "WM_types.h"
/* Always keep in alphabetical order */
-EnumPropertyItem actuator_type_items[] = {
+static EnumPropertyItem actuator_type_items[] = {
{ACT_ACTION, "ACTION", 0, "Action", ""},
{ACT_ARMATURE, "ARMATURE", 0, "Armature", ""},
{ACT_CAMERA, "CAMERA", 0, "Camera", ""},
@@ -700,7 +700,7 @@ static void rna_def_action_actuator(BlenderRNA *brna)
prop = RNA_def_property(srna, "blend_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "blend_mode");
RNA_def_property_enum_items(prop, prop_blend_items);
- RNA_def_property_ui_text(prop, "Blend Mode", "Determines how this layer is blended with previous layers");
+ RNA_def_property_ui_text(prop, "Blend Mode", "How this layer is blended with previous layers");
RNA_def_property_update(prop, NC_LOGIC, NULL);
#ifdef __NLA_ACTION_BY_MOTION_ACTUATOR
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c
index 7bdaca3c847..31fdd19f169 100644
--- a/source/blender/makesrna/intern/rna_animation.c
+++ b/source/blender/makesrna/intern/rna_animation.c
@@ -408,7 +408,8 @@ static void rna_KeyingSet_active_ksPath_index_set(PointerRNA *ptr, int value)
ks->active_path = value + 1;
}
-static void rna_KeyingSet_active_ksPath_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
+static void rna_KeyingSet_active_ksPath_index_range(PointerRNA *ptr, int *min, int *max,
+ int *UNUSED(softmin), int *UNUSED(softmax))
{
KeyingSet *ks = (KeyingSet *)ptr->data;
diff --git a/source/blender/makesrna/intern/rna_animviz.c b/source/blender/makesrna/intern/rna_animviz.c
index 9f8f30b00a7..ee107fdfe9f 100644
--- a/source/blender/makesrna/intern/rna_animviz.c
+++ b/source/blender/makesrna/intern/rna_animviz.c
@@ -26,8 +26,6 @@
#include <stdlib.h>
-#include "RNA_define.h"
-
#include "DNA_anim_types.h"
#include "DNA_action_types.h"
#include "DNA_scene_types.h"
@@ -36,6 +34,9 @@
#include "MEM_guardedalloc.h"
+#include "RNA_define.h"
+#include "RNA_enum_types.h"
+
#include "rna_internal.h"
#include "WM_types.h"
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index a832a8cdf96..4b9f7ea32f6 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -471,9 +471,6 @@ static int rna_Armature_is_editmode_get(PointerRNA *ptr)
#else
-static int rna_matrix_dimsize_4x4[] = {4, 4};
-static int rna_matrix_dimsize_3x3[] = {3, 3};
-
static void rna_def_bone_common(StructRNA *srna, int editbone)
{
PropertyRNA *prop;
@@ -921,7 +918,7 @@ static void rna_def_armature(BlenderRNA *brna)
/* Collections */
prop = RNA_def_property(srna, "bones", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "bonebase", NULL);
- RNA_def_property_collection_funcs(prop, 0, "rna_Armature_bones_next", NULL, NULL, NULL, NULL, NULL, NULL);
+ RNA_def_property_collection_funcs(prop, NULL, "rna_Armature_bones_next", NULL, NULL, NULL, NULL, NULL, NULL);
RNA_def_property_struct_type(prop, "Bone");
RNA_def_property_ui_text(prop, "Bones", "");
rna_def_armature_bones(brna, prop);
diff --git a/source/blender/makesrna/intern/rna_boid.c b/source/blender/makesrna/intern/rna_boid.c
index 9b2ce863108..6233649fb12 100644
--- a/source/blender/makesrna/intern/rna_boid.c
+++ b/source/blender/makesrna/intern/rna_boid.c
@@ -41,6 +41,7 @@
#include "BLI_utildefines.h"
#include "RNA_define.h"
+#include "RNA_enum_types.h"
#include "rna_internal.h"
@@ -69,7 +70,8 @@ EnumPropertyItem boidrule_type_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem boidruleset_type_items[] = {
+#ifndef RNA_RUNTIME
+static EnumPropertyItem boidruleset_type_items[] = {
{eBoidRulesetType_Fuzzy, "FUZZY", 0, "Fuzzy",
"Rules are gone through top to bottom (only the first rule which effect is above "
"fuzziness threshold is evaluated)"},
@@ -77,6 +79,7 @@ EnumPropertyItem boidruleset_type_items[] = {
{eBoidRulesetType_Average, "AVERAGE", 0, "Average", "All rules are averaged"},
{0, NULL, 0, NULL, NULL}
};
+#endif
#ifdef RNA_RUNTIME
@@ -161,7 +164,8 @@ static PointerRNA rna_BoidState_active_boid_rule_get(PointerRNA *ptr)
}
return rna_pointer_inherit_refine(ptr, &RNA_BoidRule, NULL);
}
-static void rna_BoidState_active_boid_rule_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
+static void rna_BoidState_active_boid_rule_index_range(PointerRNA *ptr, int *min, int *max,
+ int *UNUSED(softmin), int *UNUSED(softmax))
{
BoidState *state = (BoidState *)ptr->data;
*min = 0;
@@ -227,7 +231,7 @@ static PointerRNA rna_BoidSettings_active_boid_state_get(PointerRNA *ptr)
return rna_pointer_inherit_refine(ptr, &RNA_BoidState, NULL);
}
static void rna_BoidSettings_active_boid_state_index_range(PointerRNA *ptr, int *min, int *max,
- int *softmin, int *softmax)
+ int *UNUSED(softmin), int *UNUSED(softmax))
{
BoidSettings *boids = (BoidSettings *)ptr->data;
*min = 0;
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 5d68a6905a3..405d38e9683 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -27,8 +27,6 @@
#include <stdlib.h>
#include <assert.h>
-#include "RNA_define.h"
-
#include "DNA_brush_types.h"
#include "DNA_texture_types.h"
#include "DNA_scene_types.h"
@@ -36,6 +34,9 @@
#include "BLI_math.h"
+#include "RNA_define.h"
+#include "RNA_enum_types.h"
+
#include "rna_internal.h"
#include "IMB_imbuf.h"
diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c
index ebd06475c79..d848acd5971 100644
--- a/source/blender/makesrna/intern/rna_color.c
+++ b/source/blender/makesrna/intern/rna_color.c
@@ -110,7 +110,8 @@ static void rna_CurveMapping_white_level_set(PointerRNA *ptr, const float *value
curvemapping_set_black_white(cumap, NULL, NULL);
}
-static void rna_CurveMapping_clipminx_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
+static void rna_CurveMapping_clipminx_range(PointerRNA *ptr, float *min, float *max,
+ float *UNUSED(softmin), float *UNUSED(softmax))
{
CurveMapping *cumap = (CurveMapping *)ptr->data;
@@ -118,7 +119,8 @@ static void rna_CurveMapping_clipminx_range(PointerRNA *ptr, float *min, float *
*max = cumap->clipr.xmax;
}
-static void rna_CurveMapping_clipminy_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
+static void rna_CurveMapping_clipminy_range(PointerRNA *ptr, float *min, float *max,
+ float *UNUSED(softmin), float *UNUSED(softmax))
{
CurveMapping *cumap = (CurveMapping *)ptr->data;
@@ -126,7 +128,8 @@ static void rna_CurveMapping_clipminy_range(PointerRNA *ptr, float *min, float *
*max = cumap->clipr.ymax;
}
-static void rna_CurveMapping_clipmaxx_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
+static void rna_CurveMapping_clipmaxx_range(PointerRNA *ptr, float *min, float *max,
+ float *UNUSED(softmin), float *UNUSED(softmax))
{
CurveMapping *cumap = (CurveMapping *)ptr->data;
@@ -134,7 +137,8 @@ static void rna_CurveMapping_clipmaxx_range(PointerRNA *ptr, float *min, float *
*max = 100.0f;
}
-static void rna_CurveMapping_clipmaxy_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
+static void rna_CurveMapping_clipmaxy_range(PointerRNA *ptr, float *min, float *max,
+ float *UNUSED(softmin), float *UNUSED(softmax))
{
CurveMapping *cumap = (CurveMapping *)ptr->data;
@@ -407,8 +411,8 @@ static void rna_ColorManagedDisplaySettings_display_device_set(struct PointerRNA
}
}
-static EnumPropertyItem *rna_ColorManagedDisplaySettings_display_device_itemf(bContext *UNUSED(C), PointerRNA *ptr,
- PropertyRNA *UNUSED(prop), int *free)
+static EnumPropertyItem *rna_ColorManagedDisplaySettings_display_device_itemf(
+ bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
{
EnumPropertyItem *items = NULL;
int totitem = 0;
@@ -455,8 +459,8 @@ static void rna_ColorManagedViewSettings_view_transform_set(PointerRNA *ptr, int
}
}
-static EnumPropertyItem *rna_ColorManagedViewSettings_view_transform_itemf(bContext *C, PointerRNA *ptr,
- PropertyRNA *UNUSED(prop), int *free)
+static EnumPropertyItem *rna_ColorManagedViewSettings_view_transform_itemf(
+ bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
{
Scene *scene = CTX_data_scene(C);
EnumPropertyItem *items = NULL;
@@ -470,6 +474,37 @@ static EnumPropertyItem *rna_ColorManagedViewSettings_view_transform_itemf(bCont
return items;
}
+static int rna_ColorManagedViewSettings_look_get(PointerRNA *ptr)
+{
+ ColorManagedViewSettings *view = (ColorManagedViewSettings *) ptr->data;
+
+ return IMB_colormanagement_look_get_named_index(view->look);
+}
+
+static void rna_ColorManagedViewSettings_look_set(PointerRNA *ptr, int value)
+{
+ ColorManagedViewSettings *view = (ColorManagedViewSettings *) ptr->data;
+
+ const char *name = IMB_colormanagement_look_get_indexed_name(value);
+
+ if (name) {
+ BLI_strncpy(view->look, name, sizeof(view->look));
+ }
+}
+
+static EnumPropertyItem *rna_ColorManagedViewSettings_look_itemf(
+ bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
+{
+ EnumPropertyItem *items = NULL;
+ int totitem = 0;
+
+ IMB_colormanagement_look_items_add(&items, &totitem);
+ RNA_enum_item_end(&items, &totitem);
+
+ *free = TRUE;
+ return items;
+}
+
static void rna_ColorManagedViewSettings_use_curves_set(PointerRNA *ptr, int value)
{
ColorManagedViewSettings *view_settings = (ColorManagedViewSettings *) ptr->data;
@@ -503,8 +538,8 @@ static void rna_ColorManagedColorspaceSettings_colorspace_set(struct PointerRNA
}
}
-static EnumPropertyItem *rna_ColorManagedColorspaceSettings_colorspace_itemf(bContext *UNUSED(C), PointerRNA *ptr,
- PropertyRNA *UNUSED(prop), int *free)
+static EnumPropertyItem *rna_ColorManagedColorspaceSettings_colorspace_itemf(
+ bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
{
EnumPropertyItem *items = NULL;
int totitem = 0;
@@ -584,16 +619,25 @@ static void rna_ColorManagement_update(Main *UNUSED(bmain), Scene *UNUSED(scene)
return;
if (GS(id->name) == ID_SCE) {
+ DAG_id_tag_update(id, 0);
WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, NULL);
}
}
/* this function only exists because #curvemap_evaluateF uses a 'const' qualifier */
-static float rna_CurveMap_evaluateF(struct CurveMap *cuma, float value)
+static float rna_CurveMap_evaluateF(struct CurveMap *cuma, ReportList *reports, float value)
{
+ if (!cuma->table) {
+ BKE_reportf(reports, RPT_ERROR, "CurveMap table not initialized, call initialize() on CurveMapping owner of the CurveMap");
+ return 0.0f;
+ }
return curvemap_evaluateF(cuma, value);
}
+static void rna_CurveMap_initialize(struct CurveMapping *cumap)
+{
+ curvemapping_initialize(cumap);
+}
#else
static void rna_def_curvemappoint(BlenderRNA *brna)
@@ -679,6 +723,7 @@ static void rna_def_curvemap(BlenderRNA *brna)
rna_def_curvemap_points_api(brna, prop);
func = RNA_def_function(srna, "evaluate", "rna_CurveMap_evaluateF");
+ RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Evaluate curve at given location");
parm = RNA_def_float(func, "position", 0.0f, -FLT_MAX, FLT_MAX, "Position", "Position to evaluate curve at", -FLT_MAX, FLT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED);
@@ -747,6 +792,9 @@ static void rna_def_curvemapping(BlenderRNA *brna)
func = RNA_def_function(srna, "update", "curvemapping_changed_all");
RNA_def_function_ui_description(func, "Update curve mapping after making changes");
+
+ func = RNA_def_function(srna, "initialize", "rna_CurveMap_initialize");
+ RNA_def_function_ui_description(func, "Initialize curve");
}
static void rna_def_color_ramp_element(BlenderRNA *brna)
@@ -946,6 +994,11 @@ static void rna_def_colormanage(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
+ static EnumPropertyItem look_items[] = {
+ {0, "NONE", 0, "None", "Do not modify image in an artistic manner"},
+ {0, NULL, 0, NULL, NULL}
+ };
+
static EnumPropertyItem view_transform_items[] = {
{0, "NONE", 0, "None", "Do not perform any color transform on display, use old non-color managed technique for display"},
{0, NULL, 0, NULL, NULL}
@@ -972,12 +1025,20 @@ static void rna_def_colormanage(BlenderRNA *brna)
srna = RNA_def_struct(brna, "ColorManagedViewSettings", NULL);
RNA_def_struct_ui_text(srna, "ColorManagedViewSettings", "Color management settings used for displaying images on the display");
+ prop = RNA_def_property(srna, "look", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, look_items);
+ RNA_def_property_enum_funcs(prop, "rna_ColorManagedViewSettings_look_get",
+ "rna_ColorManagedViewSettings_look_set",
+ "rna_ColorManagedViewSettings_look_itemf");
+ RNA_def_property_ui_text(prop, "Look", "Additional transform applied before view transform for an artistic needs");
+ RNA_def_property_update(prop, NC_WINDOW, "rna_ColorManagement_update");
+
prop = RNA_def_property(srna, "view_transform", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, view_transform_items);
RNA_def_property_enum_funcs(prop, "rna_ColorManagedViewSettings_view_transform_get",
"rna_ColorManagedViewSettings_view_transform_set",
"rna_ColorManagedViewSettings_view_transform_itemf");
- RNA_def_property_ui_text(prop, "View Transform", "View used ");
+ RNA_def_property_ui_text(prop, "View Transform", "View used when converting image to a display space");
RNA_def_property_update(prop, NC_WINDOW, "rna_ColorManagement_update");
prop = RNA_def_property(srna, "exposure", PROP_FLOAT, PROP_FACTOR);
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c
index 05d4c5a59d2..0c7c2ea1e49 100644
--- a/source/blender/makesrna/intern/rna_constraint.c
+++ b/source/blender/makesrna/intern/rna_constraint.c
@@ -37,6 +37,7 @@
#include "DNA_scene_types.h"
#include "RNA_define.h"
+#include "RNA_enum_types.h"
#include "rna_internal.h"
@@ -343,7 +344,8 @@ static EnumPropertyItem *rna_Constraint_target_space_itemf(bContext *UNUSED(C),
return space_object_items;
}
-static void rna_ActionConstraint_minmax_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
+static void rna_ActionConstraint_minmax_range(PointerRNA *ptr, float *min, float *max,
+ float *UNUSED(softmin), float *UNUSED(softmax))
{
bConstraint *con = (bConstraint *)ptr->data;
bActionConstraint *acon = (bActionConstraint *)con->data;
@@ -464,7 +466,7 @@ static void rna_Constraint_objectSolver_camera_set(PointerRNA *ptr, PointerRNA v
#else
-EnumPropertyItem constraint_distance_items[] = {
+static EnumPropertyItem constraint_distance_items[] = {
{LIMITDIST_INSIDE, "LIMITDIST_INSIDE", 0, "Inside",
"The object is constrained inside a virtual sphere around the target object, "
"with a radius defined by the limit distance"},
@@ -503,7 +505,6 @@ static void rna_def_constrainttarget(BlenderRNA *brna)
static void rna_def_constraint_childof(BlenderRNA *brna)
{
- static int rna_matrix_dimsize_4x4[] = {4, 4};
StructRNA *srna;
PropertyRNA *prop;
@@ -1083,7 +1084,8 @@ static void rna_def_constraint_minmax(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");
prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_DISTANCE);
- RNA_def_property_range(prop, 0.0, 100.f);
+ RNA_def_property_range(prop, -1000.0, 1000.0f);
+ RNA_def_property_ui_range(prop, -100.0f, 100.0f, 1, -1);
RNA_def_property_ui_text(prop, "Offset", "Offset of floor from object origin");
RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");
}
@@ -2024,20 +2026,23 @@ static void rna_def_constraint_shrinkwrap(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0, 100.f);
RNA_def_property_ui_text(prop, "Distance", "Distance to Target");
RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");
-
- prop = RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "projAxis", MOD_SHRINKWRAP_PROJECT_OVER_X_AXIS);
- RNA_def_property_ui_text(prop, "Axis X", "Projection over X Axis");
- RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");
-
- prop = RNA_def_property(srna, "use_y", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "projAxis", MOD_SHRINKWRAP_PROJECT_OVER_Y_AXIS);
- RNA_def_property_ui_text(prop, "Axis Y", "Projection over Y Axis");
+
+ prop = RNA_def_property(srna, "project_axis", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "projAxis");
+ RNA_def_property_enum_items(prop, object_axis_items);
+ RNA_def_property_ui_text(prop, "Project Axis", "Axis constrain to");
RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");
-
- prop = RNA_def_property(srna, "use_z", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "projAxis", MOD_SHRINKWRAP_PROJECT_OVER_Z_AXIS);
- RNA_def_property_ui_text(prop, "Axis Z", "Projection over Z Axis");
+
+ prop = RNA_def_property(srna, "project_axis_space", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "projAxisSpace");
+ RNA_def_property_enum_items(prop, owner_space_pchan_items);
+ RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Constraint_owner_space_itemf");
+ RNA_def_property_ui_text(prop, "Axis Space", "Space for the projection axis");
+
+ prop = RNA_def_property(srna, "project_limit", PROP_FLOAT, PROP_DISTANCE);
+ RNA_def_property_float_sdna(prop, NULL, "projLimit");
+ RNA_def_property_range(prop, 0.0, 100.f);
+ RNA_def_property_ui_text(prop, "Project Distance", "Limit the distance used for projection (zero disables)");
RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");
}
diff --git a/source/blender/makesrna/intern/rna_controller.c b/source/blender/makesrna/intern/rna_controller.c
index 28a2ca7cb75..3b789b16f52 100644
--- a/source/blender/makesrna/intern/rna_controller.c
+++ b/source/blender/makesrna/intern/rna_controller.c
@@ -34,6 +34,7 @@
#include "BLF_translation.h"
#include "RNA_define.h"
+#include "RNA_enum_types.h"
#include "rna_internal.h"
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index 9773e7a340b..bd4b8dd76b1 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -46,13 +46,15 @@
#include "BKE_curve.h"
#include "ED_curve.h"
-EnumPropertyItem beztriple_handle_type_items[] = {
+#ifndef RNA_RUNTIME
+static EnumPropertyItem beztriple_handle_type_items[] = {
{HD_FREE, "FREE", 0, "Free", ""},
{HD_VECT, "VECTOR", 0, "Vector", ""},
{HD_ALIGN, "ALIGNED", 0, "Aligned", ""},
{HD_AUTO, "AUTO", 0, "Auto", ""},
{0, NULL, 0, NULL, NULL}
};
+#endif
EnumPropertyItem keyframe_handle_type_items[] = {
{HD_FREE, "FREE", 0, "Free", ""},
@@ -70,7 +72,8 @@ EnumPropertyItem beztriple_interpolation_mode_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem curve_type_items[] = {
+#ifndef RNA_RUNTIME
+static EnumPropertyItem curve_type_items[] = {
{CU_POLY, "POLY", 0, "Poly", ""},
{CU_BEZIER, "BEZIER", 0, "Bezier", ""},
{CU_BSPLINE, "BSPLINE", 0, "BSpline", ""},
@@ -78,6 +81,7 @@ EnumPropertyItem curve_type_items[] = {
{CU_NURBS, "NURBS", 0, "Ease", ""},
{0, NULL, 0, NULL, NULL}
};
+#endif
static const EnumPropertyItem curve3d_fill_mode_items[] = {
{0, "FULL", 0, "Full", ""},
@@ -239,14 +243,16 @@ static void rna_Curve_texspace_size_set(PointerRNA *ptr, const float *values)
copy_v3_v3(cu->size, values);
}
-static void rna_Curve_material_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
+static void rna_Curve_material_index_range(PointerRNA *ptr, int *min, int *max,
+ int *UNUSED(softmin), int *UNUSED(softmax))
{
Curve *cu = (Curve *)ptr->id.data;
*min = 0;
*max = max_ii(0, cu->totcol - 1);
}
-static void rna_Curve_active_textbox_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
+static void rna_Curve_active_textbox_index_range(PointerRNA *ptr, int *min, int *max,
+ int *UNUSED(softmin), int *UNUSED(softmax))
{
Curve *cu = (Curve *)ptr->id.data;
*min = 0;
@@ -1488,7 +1494,7 @@ static void rna_def_curve(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_ui_text(prop, "Materials", "");
RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.c */
- RNA_def_property_collection_funcs(prop, 0, NULL, NULL, NULL, NULL, NULL, NULL, "rna_IDMaterials_assign_int");
+ RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "rna_IDMaterials_assign_int");
prop = RNA_def_property(srna, "bevel_factor_start", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "bevfac1");
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 723f158bb50..fe9e9573957 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -574,13 +574,13 @@ void RNA_define_free(BlenderRNA *UNUSED(brna))
DefRNA.error = 0;
}
-void RNA_define_verify_sdna(int verify)
+void RNA_define_verify_sdna(bool verify)
{
DefRNA.verify = verify;
}
#ifndef RNA_RUNTIME
-void RNA_define_animate_sdna(int animate)
+void RNA_define_animate_sdna(bool animate)
{
DefRNA.animate = animate;
}
@@ -1253,6 +1253,11 @@ void RNA_def_property_array(PropertyRNA *prop, int length)
}
}
+/* common args for length */
+const int rna_matrix_dimsize_3x3[] = {3, 3};
+const int rna_matrix_dimsize_4x4[] = {4, 4};
+const int rna_matrix_dimsize_4x2[] = {4, 2};
+
void RNA_def_property_multi_array(PropertyRNA *prop, int dimension, const int length[])
{
StructRNA *srna = DefRNA.laststruct;
@@ -1321,6 +1326,26 @@ void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double
{
StructRNA *srna = DefRNA.laststruct;
+#ifdef DEBUG
+ if (min > max) {
+ fprintf(stderr, "%s: \"%s.%s\", min > max.\n",
+ __func__, srna->identifier, prop->identifier);
+ DefRNA.error = 1;
+ }
+
+ if (step < 0 || step > 100) {
+ fprintf(stderr, "%s: \"%s.%s\", step outside range.\n",
+ __func__, srna->identifier, prop->identifier);
+ DefRNA.error = 1;
+ }
+
+ if (precision < -1 || precision > 10) {
+ fprintf(stderr, "%s: \"%s.%s\", step outside range.\n",
+ __func__, srna->identifier, prop->identifier);
+ DefRNA.error = 1;
+ }
+#endif
+
switch (prop->type) {
case PROP_INT:
{
@@ -1366,6 +1391,14 @@ void RNA_def_property_range(PropertyRNA *prop, double min, double max)
{
StructRNA *srna = DefRNA.laststruct;
+#ifdef DEBUG
+ if (min > max) {
+ fprintf(stderr, "%s: \"%s.%s\", min > max.\n",
+ __func__, srna->identifier, prop->identifier);
+ DefRNA.error = 1;
+ }
+#endif
+
switch (prop->type) {
case PROP_INT:
{
@@ -2096,7 +2129,7 @@ void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
prop->update = (UpdateFunc)func;
}
-void RNA_def_property_update_runtime(PropertyRNA *prop, void *func)
+void RNA_def_property_update_runtime(PropertyRNA *prop, const void *func)
{
prop->update = func;
}
@@ -3207,9 +3240,8 @@ void RNA_def_property_duplicate_pointers(StructOrFunctionRNA *cont_, PropertyRNA
* in the first place */
if (prop->identifier) {
if (cont->prophash) {
- BLI_ghash_remove(cont->prophash, (void *)prop->identifier, NULL, NULL);
prop->identifier = BLI_strdup(prop->identifier);
- BLI_ghash_insert(cont->prophash, (void *)prop->identifier, prop);
+ BLI_ghash_reinsert(cont->prophash, (void *)prop->identifier, prop, NULL, NULL);
}
else {
prop->identifier = BLI_strdup(prop->identifier);
diff --git a/source/blender/makesrna/intern/rna_dynamicpaint.c b/source/blender/makesrna/intern/rna_dynamicpaint.c
index c716c3263d1..e13ec1f09a4 100644
--- a/source/blender/makesrna/intern/rna_dynamicpaint.c
+++ b/source/blender/makesrna/intern/rna_dynamicpaint.c
@@ -39,6 +39,7 @@
#include "DNA_scene_types.h"
#include "RNA_define.h"
+#include "RNA_enum_types.h"
#include "rna_internal.h"
@@ -95,12 +96,12 @@ static char *rna_DynamicPaintSurface_path(PointerRNA *ptr)
* Surfaces
*/
-static void rna_DynamicPaint_redoModifier(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_DynamicPaint_redoModifier(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA);
}
-static void rna_DynamicPaintSurfaces_updateFrames(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_DynamicPaintSurfaces_updateFrames(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
dynamicPaint_cacheUpdateFrames((DynamicPaintSurface *)ptr->data);
}
@@ -134,7 +135,7 @@ static void rna_DynamicPaintSurface_changePreview(Main *bmain, Scene *scene, Poi
rna_DynamicPaint_redoModifier(bmain, scene, ptr);
}
-static void rna_DynamicPaintSurface_uniqueName(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_DynamicPaintSurface_uniqueName(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
dynamicPaintSurface_setUniqueName((DynamicPaintSurface *)ptr->data, ((DynamicPaintSurface *)ptr->data)->name);
}
@@ -196,7 +197,8 @@ static void rna_Surface_active_point_index_set(struct PointerRNA *ptr, int value
return;
}
-static void rna_Surface_active_point_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
+static void rna_Surface_active_point_range(PointerRNA *ptr, int *min, int *max,
+ int *UNUSED(softmin), int *UNUSED(softmax))
{
DynamicPaintCanvasSettings *canvas = (DynamicPaintCanvasSettings *)ptr->data;
@@ -243,8 +245,8 @@ static int rna_DynamicPaint_is_output_exists(DynamicPaintSurface *surface, Objec
}
-static EnumPropertyItem *rna_DynamicPaint_surface_type_itemf(bContext *C, PointerRNA *ptr,
- PropertyRNA *UNUSED(prop), int *free)
+static EnumPropertyItem *rna_DynamicPaint_surface_type_itemf(
+ bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
DynamicPaintSurface *surface = (DynamicPaintSurface *)ptr->data;
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index 2ad8ded4656..4b50127d999 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -459,7 +459,8 @@ static void rna_FModifier_active_set(PointerRNA *ptr, int UNUSED(value))
fm->flag |= FMODIFIER_FLAG_ACTIVE;
}
-static void rna_FModifier_start_frame_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
+static void rna_FModifier_start_frame_range(PointerRNA *ptr, float *min, float *max,
+ float *UNUSED(softmin), float *UNUSED(softmax))
{
FModifier *fcm = (FModifier *)ptr->data;
@@ -467,7 +468,8 @@ static void rna_FModifier_start_frame_range(PointerRNA *ptr, float *min, float *
*max = (fcm->flag & FMODIFIER_FLAG_RANGERESTRICT) ? fcm->efra : MAXFRAMEF;
}
-static void rna_FModifier_end_frame_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
+static void rna_FModifier_end_frame_range(PointerRNA *ptr, float *min, float *max,
+ float *UNUSED(softmin), float *UNUSED(softmax))
{
FModifier *fcm = (FModifier *)ptr->data;
@@ -475,7 +477,8 @@ static void rna_FModifier_end_frame_range(PointerRNA *ptr, float *min, float *ma
*max = MAXFRAMEF;
}
-static void rna_FModifier_blending_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
+static void rna_FModifier_blending_range(PointerRNA *ptr, float *min, float *max,
+ float *UNUSED(softmin), float *UNUSED(softmax))
{
FModifier *fcm = (FModifier *)ptr->data;
@@ -524,7 +527,8 @@ static void rna_FModifierGenerator_coefficients_set(PointerRNA *ptr, const float
memcpy(gen->coefficients, values, gen->arraysize * sizeof(float));
}
-static void rna_FModifierLimits_minx_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
+static void rna_FModifierLimits_minx_range(PointerRNA *ptr, float *min, float *max,
+ float *UNUSED(softmin), float *UNUSED(softmax))
{
FModifier *fcm = (FModifier *)ptr->data;
FMod_Limits *data = fcm->data;
@@ -533,7 +537,8 @@ static void rna_FModifierLimits_minx_range(PointerRNA *ptr, float *min, float *m
*max = (data->flag & FCM_LIMIT_XMAX) ? data->rect.xmax : MAXFRAMEF;
}
-static void rna_FModifierLimits_maxx_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
+static void rna_FModifierLimits_maxx_range(PointerRNA *ptr, float *min, float *max,
+ float *UNUSED(softmin), float *UNUSED(softmax))
{
FModifier *fcm = (FModifier *)ptr->data;
FMod_Limits *data = fcm->data;
@@ -542,7 +547,8 @@ static void rna_FModifierLimits_maxx_range(PointerRNA *ptr, float *min, float *m
*max = MAXFRAMEF;
}
-static void rna_FModifierLimits_miny_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
+static void rna_FModifierLimits_miny_range(PointerRNA *ptr, float *min, float *max,
+ float *UNUSED(softmin), float *UNUSED(softmax))
{
FModifier *fcm = (FModifier *)ptr->data;
FMod_Limits *data = fcm->data;
@@ -551,7 +557,8 @@ static void rna_FModifierLimits_miny_range(PointerRNA *ptr, float *min, float *m
*max = (data->flag & FCM_LIMIT_YMAX) ? data->rect.ymax : FLT_MAX;
}
-static void rna_FModifierLimits_maxy_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
+static void rna_FModifierLimits_maxy_range(PointerRNA *ptr, float *min, float *max,
+ float *UNUSED(softmin), float *UNUSED(softmax))
{
FModifier *fcm = (FModifier *)ptr->data;
FMod_Limits *data = fcm->data;
@@ -562,7 +569,7 @@ static void rna_FModifierLimits_maxy_range(PointerRNA *ptr, float *min, float *m
static void rna_FModifierStepped_start_frame_range(PointerRNA *ptr, float *min, float *max,
- float *softmin, float *softmax)
+ float *UNUSED(softmin), float *UNUSED(softmax))
{
FModifier *fcm = (FModifier *)ptr->data;
FMod_Stepped *data = fcm->data;
@@ -572,7 +579,7 @@ static void rna_FModifierStepped_start_frame_range(PointerRNA *ptr, float *min,
}
static void rna_FModifierStepped_end_frame_range(PointerRNA *ptr, float *min, float *max,
- float *softmin, float *softmax)
+ float *UNUSED(softmin), float *UNUSED(softmax))
{
FModifier *fcm = (FModifier *)ptr->data;
FMod_Stepped *data = fcm->data;
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index 439bc51896f..6423763c49c 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -354,15 +354,15 @@ static void rna_def_gpencil_strokes_api(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_srna(cprop, "GPencilStrokes");
srna = RNA_def_struct(brna, "GPencilStrokes", NULL);
RNA_def_struct_sdna(srna, "bGPDframe");
- RNA_def_struct_ui_text(srna, "Grease Pencil Frames", "Collection of grease pencil frames");
+ RNA_def_struct_ui_text(srna, "Grease Pencil Frames", "Collection of grease pencil stroke");
func = RNA_def_function(srna, "new", "rna_GPencil_stroke_new");
- RNA_def_function_ui_description(func, "Add a new grease pencil frame");
+ RNA_def_function_ui_description(func, "Add a new grease pencil stroke");
parm = RNA_def_pointer(func, "stroke", "GPencilStroke", "", "The newly created stroke");
RNA_def_function_return(func, parm);
func = RNA_def_function(srna, "remove", "rna_GPencil_stroke_remove");
- RNA_def_function_ui_description(func, "Remove a grease pencil frame");
+ RNA_def_function_ui_description(func, "Remove a grease pencil stroke");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
parm = RNA_def_pointer(func, "stroke", "GPencilStroke", "Stroke", "The stroke to remove");
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR);
@@ -390,7 +390,8 @@ static void rna_def_gpencil_frame(BlenderRNA *brna)
/* Frame Number */
prop = RNA_def_property(srna, "frame_number", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "framenum");
- RNA_def_property_range(prop, MINFRAME, MAXFRAME); /* XXX note: this cannot occur on the same frame as another sketch */
+ /* XXX note: this cannot occur on the same frame as another sketch */
+ RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
RNA_def_property_ui_text(prop, "Frame Number", "The frame on which this sketch appears");
/* Flags */
@@ -421,7 +422,8 @@ static void rna_def_gpencil_frames_api(BlenderRNA *brna, PropertyRNA *cprop)
func = RNA_def_function(srna, "new", "rna_GPencil_frame_new");
RNA_def_function_ui_description(func, "Add a new grease pencil frame");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm = RNA_def_int(func, "frame_number", 1, MINFRAME, MAXFRAME, "Frame Number", "The frame on which this sketch appears", MINFRAME, MAXFRAME);
+ parm = RNA_def_int(func, "frame_number", 1, MINAFRAME, MAXFRAME, "Frame Number",
+ "The frame on which this sketch appears", MINAFRAME, MAXFRAME);
RNA_def_property_flag(parm, PROP_REQUIRED);
parm = RNA_def_pointer(func, "frame", "GPencilFrame", "", "The newly created frame");
RNA_def_function_return(func, parm);
diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c
index c1769f02974..f0322bac756 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -87,7 +87,7 @@ static void rna_Image_save_render(Image *image, bContext *C, ReportList *reports
else {
ImBuf *write_ibuf;
- write_ibuf = IMB_colormanagement_imbuf_for_write(ibuf, TRUE, TRUE, &scene->view_settings,
+ write_ibuf = IMB_colormanagement_imbuf_for_write(ibuf, true, true, &scene->view_settings,
&scene->display_settings, &scene->r.im_format);
write_ibuf->planes = scene->r.im_format.planes;
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index 72985f7b6e6..7950ed424ee 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -124,8 +124,9 @@ typedef struct BlenderDefRNA {
extern BlenderDefRNA DefRNA;
/* Define functions for all types */
-
+#ifndef __RNA_ACCESS_H__
extern BlenderRNA BLENDER_RNA;
+#endif
void RNA_def_ID(struct BlenderRNA *brna);
void RNA_def_action(struct BlenderRNA *brna);
@@ -278,6 +279,7 @@ void RNA_api_scene_render(struct StructRNA *srna);
void RNA_api_sequence_strip(StructRNA *srna);
void RNA_api_text(struct StructRNA *srna);
void RNA_api_ui_layout(struct StructRNA *srna);
+void RNA_api_window(struct StructRNA *srna);
void RNA_api_wm(struct StructRNA *srna);
void RNA_api_sensor(struct StructRNA *srna);
void RNA_api_controller(struct StructRNA *srna);
@@ -331,8 +333,10 @@ extern CollectionPropertyRNA rna_PropertyGroupItem_idp_array;
extern FloatPropertyRNA rna_PropertyGroupItem_double;
extern FloatPropertyRNA rna_PropertyGroupItem_double_array;
+#ifndef __RNA_ACCESS_H__
extern StructRNA RNA_PropertyGroupItem;
extern StructRNA RNA_PropertyGroup;
+#endif
struct IDProperty *rna_idproperty_check(struct PropertyRNA **prop, struct PointerRNA *ptr);
@@ -420,4 +424,10 @@ int rna_IDMaterials_assign_int(struct PointerRNA *ptr, int key, const struct Poi
void rna_RenderLayer_rect_set(PointerRNA *ptr, const float *values);
void rna_RenderPass_rect_set(PointerRNA *ptr, const float *values);
+#ifdef RNA_RUNTIME
+# ifdef __GNUC__
+# pragma GCC diagnostic ignored "-Wredundant-decls"
+# endif
+#endif
+
#endif /* __RNA_INTERNAL_H__ */
diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c
index 49d760adb32..6d6f516ecac 100644
--- a/source/blender/makesrna/intern/rna_key.c
+++ b/source/blender/makesrna/intern/rna_key.c
@@ -39,6 +39,7 @@
#include "RNA_access.h"
#include "RNA_define.h"
+#include "RNA_enum_types.h"
#include "rna_internal.h"
@@ -98,7 +99,8 @@ static void rna_ShapeKey_value_set(PointerRNA *ptr, float value)
data->curval = value;
}
-static void rna_ShapeKey_value_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
+static void rna_ShapeKey_value_range(PointerRNA *ptr, float *min, float *max,
+ float *UNUSED(softmin), float *UNUSED(softmax))
{
KeyBlock *data = (KeyBlock *)ptr->data;
@@ -109,7 +111,8 @@ static void rna_ShapeKey_value_range(PointerRNA *ptr, float *min, float *max, fl
/* epsilon for how close one end of shapekey range can get to the other */
#define SHAPEKEY_SLIDER_TOL 0.001f
-static void rna_ShapeKey_slider_min_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
+static void rna_ShapeKey_slider_min_range(PointerRNA *ptr, float *min, float *max,
+ float *UNUSED(softmin), float *UNUSED(softmax))
{
KeyBlock *data = (KeyBlock *)ptr->data;
@@ -127,7 +130,8 @@ static void rna_ShapeKey_slider_min_set(PointerRNA *ptr, float value)
data->slidermin = value;
}
-static void rna_ShapeKey_slider_max_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
+static void rna_ShapeKey_slider_max_range(PointerRNA *ptr, float *min, float *max,
+ float *UNUSED(softmin), float *UNUSED(softmax))
{
KeyBlock *data = (KeyBlock *)ptr->data;
@@ -401,7 +405,7 @@ static KeyBlock *rna_ShapeKeyData_find_keyblock(Key *key, float *point)
}
/* determine where end of array is
- * - elemsize is in bytes, so use char* cast to get array in terms of bytes
+ * - elemsize is in bytes, so use (char *) cast to get array in terms of bytes
*/
end = (float *)((char *)start + (key->elemsize * kb->totelem));
@@ -418,7 +422,7 @@ static KeyBlock *rna_ShapeKeyData_find_keyblock(Key *key, float *point)
static int rna_ShapeKeyPoint_get_index(Key *key, KeyBlock *kb, float *point)
{
- /* if we frame the data array and point pointers as char*, then the difference between
+ /* if we frame the data array and point pointers as (char *), then the difference between
* them will be in bytes. Thus, dividing through by key->elemsize (number of bytes per point)
* gives us the offset of point from start of array.
*/
diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c
index ffc9ac0e52e..63fc5dbdbbd 100644
--- a/source/blender/makesrna/intern/rna_lamp.c
+++ b/source/blender/makesrna/intern/rna_lamp.c
@@ -26,6 +26,7 @@
#include <stdlib.h>
+#include "BLI_sys_types.h"
#include "BLI_math_base.h"
#include "BLI_math_rotation.h"
@@ -131,7 +132,7 @@ static StructRNA *rna_Lamp_refine(struct PointerRNA *ptr)
}
}
-static void rna_Lamp_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
+static void rna_Lamp_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
Lamp *la = ptr->id.data;
diff --git a/source/blender/makesrna/intern/rna_linestyle.c b/source/blender/makesrna/intern/rna_linestyle.c
index 660ef57dbfe..03319a9ccf8 100644
--- a/source/blender/makesrna/intern/rna_linestyle.c
+++ b/source/blender/makesrna/intern/rna_linestyle.c
@@ -254,7 +254,7 @@ static void rna_LineStyleGeometryModifier_name_set(PointerRNA *ptr, const char *
#include "BLI_math.h"
static void rna_def_modifier_type_common(StructRNA *srna, EnumPropertyItem *modifier_type_items,
- char *set_name_func, int blend, int color)
+ const char *set_name_func, const bool blend, const bool color)
{
PropertyRNA *prop;
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index fd931262904..dffe392e6f1 100644
--- a/source/blender/makesrna/intern/rna_main_api.c
+++ b/source/blender/makesrna/intern/rna_main_api.c
@@ -361,8 +361,13 @@ Mesh *rna_Main_meshes_new_from_object(
BKE_mesh_from_metaball(&disp, tmpmesh);
BKE_displist_free(&disp);
}
- else
- BKE_mesh_from_metaball(&ob->disp, tmpmesh);
+ else {
+ ListBase disp = {NULL, NULL};
+ if (ob->curve_cache) {
+ disp = ob->curve_cache->disp;
+ }
+ BKE_mesh_from_metaball(&disp, tmpmesh);
+ }
BKE_mesh_texspace_copy_from_object(tmpmesh, ob);
@@ -827,7 +832,7 @@ static Mask *rna_Main_mask_new(Main *bmain, const char *name)
{
Mask *mask;
- mask = BKE_mask_new(bmain, "Mask");
+ mask = BKE_mask_new(bmain, name);
return mask;
}
diff --git a/source/blender/makesrna/intern/rna_mask.c b/source/blender/makesrna/intern/rna_mask.c
index 6a5fc393269..77d593b67b6 100644
--- a/source/blender/makesrna/intern/rna_mask.c
+++ b/source/blender/makesrna/intern/rna_mask.c
@@ -516,7 +516,7 @@ static void rna_MaskSpline_point_remove(ID *id, MaskSpline *spline, ReportList *
}
#else
- void rna_def_maskParent(BlenderRNA *brna)
+static void rna_def_maskParent(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
@@ -827,7 +827,7 @@ static void rna_def_mask_layer(BlenderRNA *brna)
/* splines */
prop = RNA_def_property(srna, "splines", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_collection_funcs(prop, "rna_MaskLayer_splines_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_MaskLayer_splines_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", NULL, NULL, NULL, NULL);
RNA_def_property_struct_type(prop, "MaskSpline");
RNA_def_property_ui_text(prop, "Splines", "Collection of splines which defines this layer");
RNA_def_property_srna(prop, "MaskSplines");
@@ -937,7 +937,7 @@ static void rna_def_mask(BlenderRNA *brna)
/* mask layers */
prop = RNA_def_property(srna, "layers", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_collection_funcs(prop, "rna_Mask_layers_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_Mask_layers_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", NULL, NULL, NULL, NULL);
RNA_def_property_struct_type(prop, "MaskLayer");
RNA_def_property_ui_text(prop, "Layers", "Collection of layers which defines this mask");
rna_def_masklayers(brna, prop);
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index b30bdaf9009..e9f506b6f0b 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -31,6 +31,7 @@
#include "DNA_texture_types.h"
#include "RNA_define.h"
+#include "RNA_enum_types.h"
#include "rna_internal.h"
@@ -92,7 +93,7 @@ EnumPropertyItem ramp_blend_items[] = {
#include "ED_node.h"
-static void rna_Material_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
+static void rna_Material_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
Material *ma = ptr->id.data;
@@ -100,7 +101,7 @@ static void rna_Material_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *p
WM_main_add_notifier(NC_MATERIAL | ND_SHADING, ma);
}
-static void rna_Material_update_previews(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_Material_update_previews(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
Material *ma = ptr->id.data;
@@ -110,7 +111,7 @@ static void rna_Material_update_previews(Main *bmain, Scene *scene, PointerRNA *
WM_main_add_notifier(NC_MATERIAL | ND_SHADING_PREVIEW, ma);
}
-static void rna_Material_draw_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
+static void rna_Material_draw_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
Material *ma = ptr->id.data;
@@ -201,7 +202,8 @@ static void rna_Material_active_node_material_set(PointerRNA *ptr, PointerRNA va
nodeSetActiveID(ma->nodetree, ID_MA, &ma_act->id);
}
-static void rna_MaterialStrand_start_size_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
+static void rna_MaterialStrand_start_size_range(PointerRNA *ptr, float *min, float *max,
+ float *UNUSED(softmin), float *UNUSED(softmax))
{
Material *ma = (Material *)ptr->id.data;
@@ -215,7 +217,8 @@ static void rna_MaterialStrand_start_size_range(PointerRNA *ptr, float *min, flo
}
}
-static void rna_MaterialStrand_end_size_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
+static void rna_MaterialStrand_end_size_range(PointerRNA *ptr, float *min, float *max,
+ float *UNUSED(softmin), float *UNUSED(softmax))
{
Material *ma = (Material *)ptr->id.data;
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index 35d8a0fb433..fe6f33abc8c 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -184,18 +184,22 @@ static void rna_MeshEdgeLayer_name_set(PointerRNA *ptr, const char *value)
rna_cd_layer_name_set(rna_mesh_edata(ptr), (CustomDataLayer *)ptr->data, value);
}
#endif
+#if 0
static void rna_MeshPolyLayer_name_set(PointerRNA *ptr, const char *value)
{
rna_cd_layer_name_set(rna_mesh_pdata(ptr), (CustomDataLayer *)ptr->data, value);
}
+#endif
static void rna_MeshLoopLayer_name_set(PointerRNA *ptr, const char *value)
{
rna_cd_layer_name_set(rna_mesh_ldata(ptr), (CustomDataLayer *)ptr->data, value);
}
+#if 0
static void rna_MeshTessfaceLayer_name_set(PointerRNA *ptr, const char *value)
{
rna_cd_layer_name_set(rna_mesh_fdata(ptr), (CustomDataLayer *)ptr->data, value);
}
+#endif
/* only for layers shared between types */
static void rna_MeshAnyLayer_name_set(PointerRNA *ptr, const char *value)
{
@@ -207,7 +211,7 @@ static void rna_MeshAnyLayer_name_set(PointerRNA *ptr, const char *value)
/* -------------------------------------------------------------------- */
/* Update Callbacks */
-static void rna_Mesh_update_data(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_Mesh_update_data(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
ID *id = ptr->id.data;
@@ -227,7 +231,7 @@ static void rna_Mesh_update_data_edit_color(Main *bmain, Scene *scene, PointerRN
}
}
-static void rna_Mesh_update_select(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_Mesh_update_select(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
ID *id = ptr->id.data;
/* cheating way for importers to avoid slow updates */
@@ -236,7 +240,7 @@ static void rna_Mesh_update_select(Main *bmain, Scene *scene, PointerRNA *ptr)
}
}
-void rna_Mesh_update_draw(Main *bmain, Scene *scene, PointerRNA *ptr)
+void rna_Mesh_update_draw(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
ID *id = ptr->id.data;
/* cheating way for importers to avoid slow updates */
@@ -320,6 +324,20 @@ static void rna_MEdge_crease_set(PointerRNA *ptr, float value)
medge->crease = (char)(CLAMPIS(value * 255.0f, 0, 255));
}
+static void rna_MeshLoop_normal_get(PointerRNA *ptr, float *values)
+{
+ Mesh *me = rna_mesh(ptr);
+ MLoop *ml = (MLoop *)ptr->data;
+ const float (*vec)[3] = CustomData_get(&me->ldata, (int)(ml - me->mloop), CD_NORMAL);
+
+ if (!vec) {
+ zero_v3(values);
+ }
+ else {
+ copy_v3_v3(values, (const float *)vec);
+ }
+}
+
static void rna_MeshPolygon_normal_get(PointerRNA *ptr, float *values)
{
Mesh *me = rna_mesh(ptr);
@@ -575,8 +593,9 @@ static void rna_Mesh_texspace_size_get(PointerRNA *ptr, float values[3])
{
Mesh *me = (Mesh *)ptr->data;
- if (!me->bb)
+ if (me->bb == NULL || (me->bb->flag & BOUNDBOX_DIRTY)) {
BKE_mesh_texspace_calc(me);
+ }
copy_v3_v3(values, me->size);
}
@@ -585,8 +604,9 @@ static void rna_Mesh_texspace_loc_get(PointerRNA *ptr, float values[3])
{
Mesh *me = (Mesh *)ptr->data;
- if (!me->bb)
+ if (me->bb == NULL || (me->bb->flag & BOUNDBOX_DIRTY)) {
BKE_mesh_texspace_calc(me);
+ }
copy_v3_v3(values, me->loc);
}
@@ -630,7 +650,7 @@ static int rna_CustomDataLayer_active_get(PointerRNA *ptr, CustomData *data, int
else return (n == CustomData_get_active_layer_index(data, type));
}
-static int rna_CustomDataLayer_clone_get(PointerRNA *ptr, CustomData *data, int type, int render)
+static int rna_CustomDataLayer_clone_get(PointerRNA *ptr, CustomData *data, int type)
{
int n = ((CustomDataLayer *)ptr->data) - data->layers;
@@ -658,7 +678,7 @@ static void rna_CustomDataLayer_active_set(PointerRNA *ptr, CustomData *data, in
BKE_mesh_update_customdata_pointers(me, true);
}
-static void rna_CustomDataLayer_clone_set(PointerRNA *ptr, CustomData *data, int value, int type, int render)
+static void rna_CustomDataLayer_clone_set(PointerRNA *ptr, CustomData *data, int value, int type)
{
int n = ((CustomDataLayer *)ptr->data) - data->layers;
@@ -668,6 +688,14 @@ static void rna_CustomDataLayer_clone_set(PointerRNA *ptr, CustomData *data, int
CustomData_set_layer_clone_index(data, type, n);
}
+/* Generic UV rename! */
+static void rna_MeshUVLayer_name_set(PointerRNA *ptr, const char *name)
+{
+ char buf[MAX_CUSTOMDATA_LAYER_NAME];
+ BLI_strncpy_utf8(buf, name, MAX_CUSTOMDATA_LAYER_NAME);
+ BKE_mesh_uv_cdlayer_rename(rna_mesh(ptr), ((CustomDataLayer *)ptr->data)->name, buf, true);
+}
+
/* uv_layers */
DEFINE_CUSTOMDATA_LAYER_COLLECTION(uv_layer, ldata, CD_MLOOPUV)
@@ -732,7 +760,7 @@ static int rna_MeshTextureFaceLayer_active_get(PointerRNA *ptr)
static int rna_MeshTextureFaceLayer_clone_get(PointerRNA *ptr)
{
- return rna_CustomDataLayer_clone_get(ptr, rna_mesh_fdata(ptr), CD_MTFACE, 0);
+ return rna_CustomDataLayer_clone_get(ptr, rna_mesh_fdata(ptr), CD_MTFACE);
}
static void rna_MeshTextureFaceLayer_active_render_set(PointerRNA *ptr, int value)
@@ -747,7 +775,7 @@ static void rna_MeshTextureFaceLayer_active_set(PointerRNA *ptr, int value)
static void rna_MeshTextureFaceLayer_clone_set(PointerRNA *ptr, int value)
{
- rna_CustomDataLayer_clone_set(ptr, rna_mesh_fdata(ptr), value, CD_MTFACE, 0);
+ rna_CustomDataLayer_clone_set(ptr, rna_mesh_fdata(ptr), value, CD_MTFACE);
}
/* poly uv_textures */
@@ -783,7 +811,7 @@ static int rna_MeshTexturePolyLayer_active_get(PointerRNA *ptr)
static int rna_MeshTexturePolyLayer_clone_get(PointerRNA *ptr)
{
- return rna_CustomDataLayer_clone_get(ptr, rna_mesh_pdata(ptr), CD_MTEXPOLY, 0);
+ return rna_CustomDataLayer_clone_get(ptr, rna_mesh_pdata(ptr), CD_MTEXPOLY);
}
static void rna_MeshTexturePolyLayer_active_render_set(PointerRNA *ptr, int value)
@@ -798,7 +826,7 @@ static void rna_MeshTexturePolyLayer_active_set(PointerRNA *ptr, int value)
static void rna_MeshTexturePolyLayer_clone_set(PointerRNA *ptr, int value)
{
- rna_CustomDataLayer_clone_set(ptr, rna_mesh_pdata(ptr), value, CD_MTEXPOLY, 0);
+ rna_CustomDataLayer_clone_set(ptr, rna_mesh_pdata(ptr), value, CD_MTEXPOLY);
}
/* vertex_color_layers */
@@ -890,7 +918,7 @@ static int rna_MeshFloatPropertyLayer_data_length(PointerRNA *ptr)
return me->totpoly;
}
-static int rna_float_layer_check(CollectionPropertyIterator *iter, void *data)
+static int rna_float_layer_check(CollectionPropertyIterator *UNUSED(iter), void *data)
{
CustomDataLayer *layer = (CustomDataLayer *)data;
return (layer->type != CD_PROP_FLT);
@@ -908,7 +936,7 @@ static int rna_Mesh_polygon_float_layers_length(PointerRNA *ptr)
return CustomData_number_of_layers(rna_mesh_pdata(ptr), CD_PROP_FLT);
}
-static int rna_int_layer_check(CollectionPropertyIterator *iter, void *data)
+static int rna_int_layer_check(CollectionPropertyIterator *UNUSED(iter), void *data)
{
CustomDataLayer *layer = (CustomDataLayer *)data;
return (layer->type != CD_PROP_INT);
@@ -939,7 +967,7 @@ static int rna_Mesh_polygon_int_layers_length(PointerRNA *ptr)
return CustomData_number_of_layers(rna_mesh_pdata(ptr), CD_PROP_INT);
}
-static int rna_string_layer_check(CollectionPropertyIterator *iter, void *data)
+static int rna_string_layer_check(CollectionPropertyIterator *UNUSED(iter), void *data)
{
CustomDataLayer *layer = (CustomDataLayer *)data;
return (layer->type != CD_PROP_STR);
@@ -981,7 +1009,7 @@ static char *rna_MeshSkinVertexLayer_path(PointerRNA *ptr)
return BLI_sprintfN("skin_vertices[\"%s\"]", name_esc);
}
-static char *rna_VertCustomData_data_path(PointerRNA *ptr, char *collection, int type);
+static char *rna_VertCustomData_data_path(PointerRNA *ptr, const char *collection, int type);
static char *rna_MeshSkinVertex_path(PointerRNA *ptr)
{
return rna_VertCustomData_data_path(ptr, "skin_vertices", CD_MVERT_SKIN);
@@ -1106,12 +1134,15 @@ static void rna_MeshPoly_vertices_set(PointerRNA *ptr, const int *values)
}
}
+/* disabling, some importers don't know the total material count when assigning materials */
+#if 0
static void rna_MeshPoly_material_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
{
Mesh *me = rna_mesh(ptr);
*min = 0;
*max = max_ii(0, me->totcol - 1);
}
+#endif
static int rna_MeshVertex_index_get(PointerRNA *ptr)
{
@@ -1207,7 +1238,7 @@ static char *rna_MeshTexturePolyLayer_path(PointerRNA *ptr)
return BLI_sprintfN("uv_textures[\"%s\"]", name_esc);
}
-static char *rna_VertCustomData_data_path(PointerRNA *ptr, char *collection, int type)
+static char *rna_VertCustomData_data_path(PointerRNA *ptr, const char *collection, int type)
{
CustomDataLayer *cdl;
Mesh *me = rna_mesh(ptr);
@@ -1228,7 +1259,7 @@ static char *rna_VertCustomData_data_path(PointerRNA *ptr, char *collection, int
return NULL;
}
-static char *rna_PolyCustomData_data_path(PointerRNA *ptr, char *collection, int type)
+static char *rna_PolyCustomData_data_path(PointerRNA *ptr, const char *collection, int type)
{
CustomDataLayer *cdl;
Mesh *me = rna_mesh(ptr);
@@ -1249,7 +1280,7 @@ static char *rna_PolyCustomData_data_path(PointerRNA *ptr, char *collection, int
return NULL;
}
-static char *rna_LoopCustomData_data_path(PointerRNA *ptr, char *collection, int type)
+static char *rna_LoopCustomData_data_path(PointerRNA *ptr, const char *collection, int type)
{
CustomDataLayer *cdl;
Mesh *me = rna_mesh(ptr);
@@ -1270,7 +1301,7 @@ static char *rna_LoopCustomData_data_path(PointerRNA *ptr, char *collection, int
return NULL;
}
-static char *rna_FaceCustomData_data_path(PointerRNA *ptr, char *collection, int type)
+static char *rna_FaceCustomData_data_path(PointerRNA *ptr, const char *collection, int type)
{
CustomDataLayer *cdl;
Mesh *me = rna_mesh(ptr);
@@ -1456,7 +1487,7 @@ static PointerRNA rna_Mesh_tessface_vertex_color_new(struct Mesh *me, ReportList
return ptr;
}
-static PointerRNA rna_Mesh_polygon_int_property_new(struct Mesh *me, struct bContext *C, const char *name)
+static PointerRNA rna_Mesh_polygon_int_property_new(struct Mesh *me, const char *name)
{
PointerRNA ptr;
CustomDataLayer *cdl = NULL;
@@ -1471,7 +1502,7 @@ static PointerRNA rna_Mesh_polygon_int_property_new(struct Mesh *me, struct bCon
return ptr;
}
-static PointerRNA rna_Mesh_polygon_float_property_new(struct Mesh *me, struct bContext *C, const char *name)
+static PointerRNA rna_Mesh_polygon_float_property_new(struct Mesh *me, const char *name)
{
PointerRNA ptr;
CustomDataLayer *cdl = NULL;
@@ -1486,7 +1517,7 @@ static PointerRNA rna_Mesh_polygon_float_property_new(struct Mesh *me, struct bC
return ptr;
}
-static PointerRNA rna_Mesh_polygon_string_property_new(struct Mesh *me, struct bContext *C, const char *name)
+static PointerRNA rna_Mesh_polygon_string_property_new(struct Mesh *me, const char *name)
{
PointerRNA ptr;
CustomDataLayer *cdl = NULL;
@@ -1675,7 +1706,7 @@ static void rna_def_mvert(BlenderRNA *brna)
prop = RNA_def_property(srna, "index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_int_funcs(prop, "rna_MeshVertex_index_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Index", "Index number of the vertex");
+ RNA_def_property_ui_text(prop, "Index", "Index of this vertex");
prop = RNA_def_property(srna, "undeformed_co", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
@@ -1740,7 +1771,7 @@ static void rna_def_medge(BlenderRNA *brna)
prop = RNA_def_property(srna, "index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_int_funcs(prop, "rna_MeshEdge_index_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Index", "Index number of the vertex");
+ RNA_def_property_ui_text(prop, "Index", "Index of this edge");
}
static void rna_def_mface(BlenderRNA *brna)
@@ -1771,7 +1802,9 @@ static void rna_def_mface(BlenderRNA *brna)
prop = RNA_def_property(srna, "material_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "mat_nr");
RNA_def_property_ui_text(prop, "Material Index", "");
+#if 0
RNA_def_property_int_funcs(prop, NULL, NULL, "rna_MeshPoly_material_index_range"); /* reuse for tessface is ok */
+#endif
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
@@ -1794,17 +1827,17 @@ static void rna_def_mface(BlenderRNA *brna)
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_float_funcs(prop, "rna_MeshTessFace_normal_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Face normal", "Local space unit length normal vector for this face");
+ RNA_def_property_ui_text(prop, "Face Normal", "Local space unit length normal vector for this face");
prop = RNA_def_property(srna, "area", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_float_funcs(prop, "rna_MeshTessFace_area_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Face area", "Read only area of the face");
+ RNA_def_property_ui_text(prop, "Face Area", "Read only area of this face");
prop = RNA_def_property(srna, "index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_int_funcs(prop, "rna_MeshTessFace_index_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Index", "Index number of the vertex");
+ RNA_def_property_ui_text(prop, "Index", "Index of this face");
}
@@ -1830,7 +1863,17 @@ static void rna_def_mloop(BlenderRNA *brna)
prop = RNA_def_property(srna, "index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_int_funcs(prop, "rna_MeshLoop_index_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Index", "Index number of the loop");
+ RNA_def_property_ui_text(prop, "Index", "Index of this loop");
+
+ prop = RNA_def_property(srna, "normal", PROP_FLOAT, PROP_DIRECTION);
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_range(prop, -1.0f, 1.0f);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_float_funcs(prop, "rna_MeshLoop_normal_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Loop Normal",
+ "Local space unit length split normal vector of this vertex for this polygon "
+ "(only computed on demand!)");
+
}
static void rna_def_mpolygon(BlenderRNA *brna)
@@ -1859,16 +1902,18 @@ static void rna_def_mpolygon(BlenderRNA *brna)
/* these are both very low level access */
prop = RNA_def_property(srna, "loop_start", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "loopstart");
- RNA_def_property_ui_text(prop, "Loop Start", "");
+ RNA_def_property_ui_text(prop, "Loop Start", "Index of the first loop of this polygon");
/* also low level */
prop = RNA_def_property(srna, "loop_total", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "totloop");
- RNA_def_property_ui_text(prop, "Loop Total", "");
+ RNA_def_property_ui_text(prop, "Loop Total", "Number of loops used by this polygon");
prop = RNA_def_property(srna, "material_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "mat_nr");
RNA_def_property_ui_text(prop, "Material Index", "");
+#if 0
RNA_def_property_int_funcs(prop, NULL, NULL, "rna_MeshPoly_material_index_range");
+#endif
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
@@ -1891,23 +1936,23 @@ static void rna_def_mpolygon(BlenderRNA *brna)
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_float_funcs(prop, "rna_MeshPolygon_normal_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Face normal", "Local space unit length normal vector for this polygon");
+ RNA_def_property_ui_text(prop, "Polygon Normal", "Local space unit length normal vector for this polygon");
prop = RNA_def_property(srna, "center", PROP_FLOAT, PROP_NONE);
RNA_def_property_array(prop, 3);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_float_funcs(prop, "rna_MeshPolygon_center_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Face center", "Center of the polygon");
+ RNA_def_property_ui_text(prop, "Polygon Center", "Center of this polygon");
prop = RNA_def_property(srna, "area", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_float_funcs(prop, "rna_MeshPolygon_area_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Face area", "Read only area of the face");
+ RNA_def_property_ui_text(prop, "Polygon Area", "Read only area of this polygon");
prop = RNA_def_property(srna, "index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_int_funcs(prop, "rna_MeshPolygon_index_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Index", "Index number of the vertex");
+ RNA_def_property_ui_text(prop, "Index", "Index of this polygon");
}
/* mesh.loop_uvs */
@@ -1928,7 +1973,7 @@ static void rna_def_mloopuv(BlenderRNA *brna)
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_struct_name_property(srna, prop);
- RNA_def_property_string_funcs(prop, NULL, NULL, "rna_MeshLoopLayer_name_set");
+ RNA_def_property_string_funcs(prop, NULL, NULL, "rna_MeshUVLayer_name_set");
RNA_def_property_ui_text(prop, "Name", "Name of UV map");
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
@@ -1966,7 +2011,7 @@ static void rna_def_mtface(BlenderRNA *brna)
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_struct_name_property(srna, prop);
- RNA_def_property_string_funcs(prop, NULL, NULL, "rna_MeshTessfaceLayer_name_set");
+ RNA_def_property_string_funcs(prop, NULL, NULL, "rna_MeshUVLayer_name_set");
RNA_def_property_ui_text(prop, "Name", "Name of UV map");
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
@@ -2058,7 +2103,7 @@ static void rna_def_mtface(BlenderRNA *brna)
prop = RNA_def_property(srna, "uv_raw", PROP_FLOAT, PROP_NONE);
RNA_def_property_multi_array(prop, 2, uv_dim);
RNA_def_property_float_sdna(prop, NULL, "uv");
- RNA_def_property_ui_text(prop, "UV", "Fixed size UV coordinates array");
+ RNA_def_property_ui_text(prop, "UV Raw", "Fixed size UV coordinates array");
}
@@ -2078,7 +2123,7 @@ static void rna_def_mtexpoly(BlenderRNA *brna)
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_struct_name_property(srna, prop);
- RNA_def_property_string_funcs(prop, NULL, NULL, "rna_MeshPolyLayer_name_set");
+ RNA_def_property_string_funcs(prop, NULL, NULL, "rna_MeshUVLayer_name_set");
RNA_def_property_ui_text(prop, "Name", "Name of UV map");
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
@@ -2397,7 +2442,7 @@ void rna_def_texmat_common(StructRNA *srna, const char *texspace_editable)
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_ui_text(prop, "Materials", "");
RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.c */
- RNA_def_property_collection_funcs(prop, 0, NULL, NULL, NULL, NULL, NULL, NULL, "rna_IDMaterials_assign_int");
+ RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "rna_IDMaterials_assign_int");
}
@@ -2644,7 +2689,6 @@ static void rna_def_polygon_int_layers(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_struct_ui_text(srna, "Int Properties", "Collection of int properties");
func = RNA_def_function(srna, "new", "rna_Mesh_polygon_int_property_new");
- RNA_def_function_flag(func, FUNC_USE_CONTEXT);
RNA_def_function_ui_description(func, "Add a integer property layer to Mesh");
RNA_def_string(func, "name", "Int Prop", 0, "", "Int property name");
parm = RNA_def_pointer(func, "layer", "MeshIntPropertyLayer", "", "The newly created layer");
@@ -2666,7 +2710,6 @@ static void rna_def_polygon_float_layers(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_struct_ui_text(srna, "Float Properties", "Collection of float properties");
func = RNA_def_function(srna, "new", "rna_Mesh_polygon_float_property_new");
- RNA_def_function_flag(func, FUNC_USE_CONTEXT);
RNA_def_function_ui_description(func, "Add a float property layer to Mesh");
RNA_def_string(func, "name", "Float Prop", 0, "", "Float property name");
parm = RNA_def_pointer(func, "layer", "MeshFloatPropertyLayer", "", "The newly created layer");
@@ -2688,7 +2731,6 @@ static void rna_def_polygon_string_layers(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_struct_ui_text(srna, "String Properties", "Collection of string properties");
func = RNA_def_function(srna, "new", "rna_Mesh_polygon_string_property_new");
- RNA_def_function_flag(func, FUNC_USE_CONTEXT);
RNA_def_function_ui_description(func, "Add a string property layer to Mesh");
RNA_def_string(func, "name", "String Prop", 0, "", "String property name");
parm = RNA_def_pointer(func, "layer", "MeshStringPropertyLayer", "", "The newly created layer");
@@ -2848,7 +2890,7 @@ static void rna_def_mesh(BlenderRNA *brna)
prop = RNA_def_property(srna, "tessfaces", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "mface", "totface");
RNA_def_property_struct_type(prop, "MeshTessFace");
- RNA_def_property_ui_text(prop, "TessFaces", "Tessellation faces of the mesh (derived from polygons)");
+ RNA_def_property_ui_text(prop, "TessFaces", "Tessellated faces of the mesh (derived from polygons)");
rna_def_mesh_tessfaces(brna, prop);
prop = RNA_def_property(srna, "loops", PROP_COLLECTION, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_mesh_api.c b/source/blender/makesrna/intern/rna_mesh_api.c
index ad9977fef50..a25f56f2259 100644
--- a/source/blender/makesrna/intern/rna_mesh_api.c
+++ b/source/blender/makesrna/intern/rna_mesh_api.c
@@ -37,6 +37,7 @@
#include "BLI_sys_types.h"
#include "BLI_utildefines.h"
+#include "BLI_math.h"
#include "BKE_mesh.h"
#include "ED_mesh.h"
@@ -47,7 +48,7 @@
#include "DNA_mesh_types.h"
-static const char *rna_Mesh_unit_test_compare(struct Mesh *mesh, bContext *C, struct Mesh *mesh2)
+static const char *rna_Mesh_unit_test_compare(struct Mesh *mesh, struct Mesh *mesh2)
{
const char *ret = BKE_mesh_cmp(mesh, mesh2, FLT_EPSILON * 60);
@@ -57,14 +58,56 @@ static const char *rna_Mesh_unit_test_compare(struct Mesh *mesh, bContext *C, st
return ret;
}
-void rna_Mesh_calc_smooth_groups(struct Mesh *mesh, int *r_poly_group_len, int **r_poly_group, int *r_group_total)
+static void rna_Mesh_calc_normals_split(Mesh *mesh, float min_angle)
+{
+ float (*r_loopnors)[3];
+ float (*polynors)[3];
+ bool free_polynors = false;
+
+ if (CustomData_has_layer(&mesh->ldata, CD_NORMAL)) {
+ r_loopnors = CustomData_get_layer(&mesh->ldata, CD_NORMAL);
+ memset(r_loopnors, 0, sizeof(float[3]) * mesh->totloop);
+ }
+ else {
+ r_loopnors = CustomData_add_layer(&mesh->ldata, CD_NORMAL, CD_CALLOC, NULL, mesh->totloop);
+ CustomData_set_layer_flag(&mesh->ldata, CD_NORMAL, CD_FLAG_TEMPORARY);
+ }
+
+ if (CustomData_has_layer(&mesh->pdata, CD_NORMAL)) {
+ /* This assume that layer is always up to date, not sure this is the case (esp. in Edit mode?)... */
+ polynors = CustomData_get_layer(&mesh->pdata, CD_NORMAL);
+ free_polynors = false;
+ }
+ else {
+ polynors = MEM_mallocN(sizeof(float[3]) * mesh->totpoly, __func__);
+ BKE_mesh_calc_normals_poly(mesh->mvert, mesh->totvert, mesh->mloop, mesh->mpoly, mesh->totloop, mesh->totpoly,
+ polynors, false);
+ free_polynors = true;
+ }
+
+ BKE_mesh_normals_loop_split(mesh->mvert, mesh->totvert, mesh->medge, mesh->totedge,
+ mesh->mloop, r_loopnors, mesh->totloop, mesh->mpoly, polynors, mesh->totpoly,
+ min_angle);
+
+ if (free_polynors) {
+ MEM_freeN(polynors);
+ }
+}
+
+static void rna_Mesh_free_normals_split(Mesh *mesh)
+{
+ CustomData_free_layers(&mesh->ldata, CD_NORMAL, mesh->totloop);
+}
+
+static void rna_Mesh_calc_smooth_groups(Mesh *mesh, int use_bitflags, int *r_poly_group_len,
+ int **r_poly_group, int *r_group_total)
{
*r_poly_group_len = mesh->totpoly;
*r_poly_group = BKE_mesh_calc_smoothgroups(
mesh->medge, mesh->totedge,
mesh->mpoly, mesh->totpoly,
mesh->mloop, mesh->totloop,
- r_group_total);
+ r_group_total, use_bitflags);
}
#else
@@ -82,11 +125,22 @@ void RNA_api_mesh(StructRNA *srna)
func = RNA_def_function(srna, "calc_normals", "BKE_mesh_calc_normals");
RNA_def_function_ui_description(func, "Calculate vertex normals");
+ func = RNA_def_function(srna, "calc_normals_split", "rna_Mesh_calc_normals_split");
+ RNA_def_function_ui_description(func, "Calculate split vertex normals, which preserve sharp edges");
+ parm = RNA_def_float(func, "split_angle", M_PI, 0.0f, M_PI, "",
+ "Angle between polys' normals above which an edge is always sharp (180° to disable)",
+ 0.0f, M_PI);
+ RNA_def_property_subtype(parm, (PropertySubType)PROP_UNIT_ROTATION);
+
+ func = RNA_def_function(srna, "free_normals_split", "rna_Mesh_free_normals_split");
+ RNA_def_function_ui_description(func, "Free split vertex normals");
+
func = RNA_def_function(srna, "calc_tessface", "ED_mesh_calc_tessface");
RNA_def_function_ui_description(func, "Calculate face tessellation (supports editmode too)");
func = RNA_def_function(srna, "calc_smooth_groups", "rna_Mesh_calc_smooth_groups");
RNA_def_function_ui_description(func, "Calculate smooth groups from sharp edges");
+ RNA_def_boolean(func, "use_bitflags", false, "", "Produce bitflags groups instead of simple numeric values");
/* return values */
parm = RNA_def_int_array(func, "poly_groups", 1, NULL, 0, 0, "", "Smooth Groups", 0, 0);
RNA_def_property_flag(parm, PROP_DYNAMIC | PROP_OUTPUT);
@@ -101,7 +155,6 @@ void RNA_api_mesh(StructRNA *srna)
func = RNA_def_function(srna, "unit_test_compare", "rna_Mesh_unit_test_compare");
RNA_def_pointer(func, "mesh", "Mesh", "", "Mesh to compare to");
- RNA_def_function_flag(func, FUNC_USE_CONTEXT);
/* return value */
parm = RNA_def_string(func, "result", "nothing", 64, "Return value", "String description of result of comparison");
RNA_def_function_return(func, parm);
diff --git a/source/blender/makesrna/intern/rna_mesh_utils.h b/source/blender/makesrna/intern/rna_mesh_utils.h
index dfe36da033b..c0ea1a153ff 100644
--- a/source/blender/makesrna/intern/rna_mesh_utils.h
+++ b/source/blender/makesrna/intern/rna_mesh_utils.h
@@ -32,7 +32,8 @@
/* Define the accessors for a basic CustomDataLayer collection */
#define DEFINE_CUSTOMDATA_LAYER_COLLECTION(collection_name, customdata_type, layer_type) \
/* check */ \
- static int rna_##collection_name##_check(CollectionPropertyIterator *iter, void *data) \
+ static int rna_##collection_name##_check( \
+ CollectionPropertyIterator *UNUSED(iter), void *data) \
{ \
CustomDataLayer *layer = (CustomDataLayer *)data; \
return (layer->type != layer_type); \
@@ -59,8 +60,9 @@
return data ? CustomData_number_of_layers(data, layer_type) : 0; \
} \
/* index range */ \
- static void rna_Mesh_##collection_name##_index_range(PointerRNA *ptr, int *min, int *max, \
- int *softmin, int *softmax) \
+ static void rna_Mesh_##collection_name##_index_range( \
+ PointerRNA *ptr, int *min, int *max, \
+ int *UNUSED(softmin), int *UNUSED(softmax)) \
{ \
CustomData *data = rna_mesh_##customdata_type(ptr); \
*min = 0; \
diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c
index 11f0e48012b..6bf7c8926e8 100644
--- a/source/blender/makesrna/intern/rna_meta.c
+++ b/source/blender/makesrna/intern/rna_meta.c
@@ -320,13 +320,15 @@ static void rna_def_metaball(BlenderRNA *brna)
/* number values */
prop = RNA_def_property(srna, "resolution", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "wiresize");
- RNA_def_property_range(prop, 0.050f, 1.0f);
+ RNA_def_property_range(prop, 0.005f, 10000.0f);
+ RNA_def_property_ui_range(prop, 0.05f, 1000.0f, 2.5f, 3);
RNA_def_property_ui_text(prop, "Wire Size", "Polygonization resolution in the 3D viewport");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
prop = RNA_def_property(srna, "render_resolution", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "rendersize");
- RNA_def_property_range(prop, 0.050f, 1.0f);
+ RNA_def_property_range(prop, 0.005f, 10000.0f);
+ RNA_def_property_ui_range(prop, 0.025f, 1000.0f, 2.5f, 3);
RNA_def_property_ui_text(prop, "Render Size", "Polygonization resolution in rendering");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
@@ -371,7 +373,7 @@ static void rna_def_metaball(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_ui_text(prop, "Materials", "");
RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.c */
- RNA_def_property_collection_funcs(prop, 0, NULL, NULL, NULL, NULL, NULL, NULL, "rna_IDMaterials_assign_int");
+ RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "rna_IDMaterials_assign_int");
prop = RNA_def_property(srna, "is_editmode", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_Meta_is_editmode_get", NULL);
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index cd6067fb7e8..57eeba61a73 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -118,6 +118,7 @@ EnumPropertyItem modifier_type_items[] = {
#include "BKE_depsgraph.h"
#include "BKE_library.h"
#include "BKE_modifier.h"
+#include "BKE_object.h"
#include "BKE_particle.h"
static void rna_UVProject_projectors_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
@@ -492,7 +493,8 @@ static void rna_MultiresModifier_type_set(PointerRNA *ptr, int value)
mmd->simple = value;
}
-static void rna_MultiresModifier_level_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
+static void rna_MultiresModifier_level_range(PointerRNA *ptr, int *min, int *max,
+ int *UNUSED(softmin), int *UNUSED(softmax))
{
MultiresModifierData *mmd = (MultiresModifierData *)ptr->data;
@@ -535,6 +537,14 @@ static int rna_MultiresModifier_filepath_length(PointerRNA *ptr)
return strlen((external) ? external->filename : "");
}
+static void rna_HookModifier_object_set(PointerRNA *ptr, PointerRNA value)
+{
+ HookModifierData *hmd = ptr->data;
+
+ hmd->object = (Object *)value.data;
+ BKE_object_modifier_hook_reset((Object *)ptr->id.data, hmd);
+}
+
static void modifier_object_set(Object *self, Object **ob_p, int type, PointerRNA value)
{
Object *ob = value.data;
@@ -667,8 +677,8 @@ static void rna_UVProjectModifier_num_projectors_set(PointerRNA *ptr, int value)
UVProjectModifierData *md = (UVProjectModifierData *)ptr->data;
int a;
- md->num_projectors = CLAMPIS(value, 1, MOD_UVPROJECT_MAX);
- for (a = md->num_projectors; a < MOD_UVPROJECT_MAX; a++)
+ md->num_projectors = CLAMPIS(value, 1, MOD_UVPROJECT_MAXPROJECTORS);
+ for (a = md->num_projectors; a < MOD_UVPROJECT_MAXPROJECTORS; a++)
md->projectors[a] = NULL;
}
@@ -1433,6 +1443,7 @@ static void rna_def_modifier_hook(BlenderRNA *brna)
prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Object", "Parent Object for hook, also recalculates and clears offset");
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK);
+ RNA_def_property_pointer_funcs(prop, NULL, "rna_HookModifier_object_set", NULL, NULL);
RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
prop = RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
@@ -1720,7 +1731,7 @@ static void rna_def_modifier_uvproject(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "num_projectors");
RNA_def_property_ui_text(prop, "Number of Projectors", "Number of projectors to use");
RNA_def_property_int_funcs(prop, NULL, "rna_UVProjectModifier_num_projectors_set", NULL);
- RNA_def_property_range(prop, 1, MOD_UVPROJECT_MAX);
+ RNA_def_property_range(prop, 1, MOD_UVPROJECT_MAXPROJECTORS);
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop = RNA_def_property(srna, "projectors", PROP_COLLECTION, PROP_NONE);
@@ -2781,7 +2792,7 @@ static void rna_def_modifier_screw(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
- RNA_def_property_ui_range(prop, 0, -M_PI * 2, M_PI * 2, 2);
+ RNA_def_property_ui_range(prop, -M_PI * 2, M_PI * 2, 2, -1);
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_text(prop, "Angle", "Angle of revolution");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c
index 399131bbd61..d905e6a014a 100644
--- a/source/blender/makesrna/intern/rna_nla.c
+++ b/source/blender/makesrna/intern/rna_nla.c
@@ -36,6 +36,7 @@
#include "RNA_access.h"
#include "RNA_define.h"
+#include "RNA_enum_types.h"
#include "rna_internal.h"
@@ -97,7 +98,7 @@ static char *rna_NlaStrip_path(PointerRNA *ptr)
}
/* no path */
- return "";
+ return BLI_strdup("");
}
static void rna_NlaStrip_transform_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
@@ -415,7 +416,9 @@ EnumPropertyItem nla_mode_blend_items[] = {
"Weighted result of strip is removed from the accumulated results"},
{NLASTRIP_MODE_MULTIPLY, "MULITPLY", 0, "Multiply",
"Weighted result of strip is multiplied with the accumulated results"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+};
+
EnumPropertyItem nla_mode_extend_items[] = {
{NLASTRIP_EXTEND_NOTHING, "NOTHING", 0, "Nothing", "Strip has no influence past its extents"},
{NLASTRIP_EXTEND_HOLD, "HOLD", 0, "Hold",
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 3b594ab0961..7fc53395e61 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -70,7 +70,8 @@ EnumPropertyItem node_socket_in_out_items[] = {
{ 0, NULL, 0, NULL, NULL }
};
-EnumPropertyItem node_socket_type_items[] = {
+#ifndef RNA_RUNTIME
+static EnumPropertyItem node_socket_type_items[] = {
{SOCK_CUSTOM, "CUSTOM", 0, "Custom", ""},
{SOCK_FLOAT, "VALUE", 0, "Value", ""},
{SOCK_INT, "INT", 0, "Int", ""},
@@ -82,14 +83,14 @@ EnumPropertyItem node_socket_type_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem node_quality_items[] = {
+static EnumPropertyItem node_quality_items[] = {
{NTREE_QUALITY_HIGH, "HIGH", 0, "High", "High quality"},
{NTREE_QUALITY_MEDIUM, "MEDIUM", 0, "Medium", "Medium quality"},
{NTREE_QUALITY_LOW, "LOW", 0, "Low", "Low quality"},
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem node_chunksize_items[] = {
+static EnumPropertyItem node_chunksize_items[] = {
{NTREE_CHUNCKSIZE_32, "32", 0, "32x32", "Chunksize of 32x32"},
{NTREE_CHUNCKSIZE_64, "64", 0, "64x64", "Chunksize of 64x64"},
{NTREE_CHUNCKSIZE_128, "128", 0, "128x128", "Chunksize of 128x128"},
@@ -98,6 +99,7 @@ EnumPropertyItem node_chunksize_items[] = {
{NTREE_CHUNCKSIZE_1024, "1024", 0, "1024x1024", "Chunksize of 1024x1024"},
{0, NULL, 0, NULL, NULL}
};
+#endif
#define DEF_ICON_BLANK_SKIP
#define DEF_ICON(name) {ICON_##name, (#name), 0, (#name), ""},
@@ -152,39 +154,13 @@ EnumPropertyItem node_filter_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem node_sampler_type_items[] = {
+#ifndef RNA_RUNTIME
+static EnumPropertyItem node_sampler_type_items[] = {
{0, "NEAREST", 0, "Nearest", ""},
{1, "BILINEAR", 0, "Bilinear", ""},
{2, "BICUBIC", 0, "Bicubic", ""},
{0, NULL, 0, NULL, NULL}
};
-
-
-EnumPropertyItem prop_noise_basis_items[] = {
- {SHD_NOISE_PERLIN, "PERLIN", 0, "Perlin", ""},
- {SHD_NOISE_VORONOI_F1, "VORONOI_F1", 0, "Voronoi F1", ""},
- {SHD_NOISE_VORONOI_F2, "VORONOI_F2", 0, "Voronoi F2", ""},
- {SHD_NOISE_VORONOI_F3, "VORONOI_F3", 0, "Voronoi F3", ""},
- {SHD_NOISE_VORONOI_F4, "VORONOI_F4", 0, "Voronoi F4", ""},
- {SHD_NOISE_VORONOI_F2_F1, "VORONOI_F2_F1", 0, "Voronoi F2-F1", ""},
- {SHD_NOISE_VORONOI_CRACKLE, "VORONOI_CRACKLE", 0, "Voronoi Crackle", ""},
- {SHD_NOISE_CELL_NOISE, "CELL_NOISE", 0, "Cell Noise", ""},
- {0, NULL, 0, NULL, NULL}
-};
-
-EnumPropertyItem prop_noise_type_items[] = {
- {SHD_NOISE_SOFT, "SOFT", 0, "Soft", ""},
- {SHD_NOISE_HARD, "HARD", 0, "Hard", ""},
- {0, NULL, 0, NULL, NULL}
-};
-
-#if 0
-EnumPropertyItem prop_wave_items[] = {
- {SHD_WAVE_SINE, "SINE", 0, "Sine", "Use a sine wave to produce bands"},
- {SHD_WAVE_SAW, "SAW", 0, "Saw", "Use a saw wave to produce bands"},
- {SHD_WAVE_TRI, "TRI", 0, "Tri", "Use a triangle wave to produce bands"},
- {0, NULL, 0, NULL, NULL}
-};
#endif
#ifdef RNA_RUNTIME
@@ -214,26 +190,30 @@ EnumPropertyItem prop_wave_items[] = {
int rna_node_tree_type_to_enum(bNodeTreeType *typeinfo)
{
int i = 0, result = -1;
- NODE_TREE_TYPES_BEGIN(nt)
+ NODE_TREE_TYPES_BEGIN (nt)
+ {
if (nt == typeinfo) {
result = i;
break;
}
++i;
- NODE_TREE_TYPES_END
+ }
+ NODE_TREE_TYPES_END;
return result;
}
int rna_node_tree_idname_to_enum(const char *idname)
{
int i = 0, result = -1;
- NODE_TREE_TYPES_BEGIN(nt)
+ NODE_TREE_TYPES_BEGIN (nt)
+ {
if (STREQ(nt->idname, idname)) {
result = i;
break;
}
++i;
- NODE_TREE_TYPES_END
+ }
+ NODE_TREE_TYPES_END;
return result;
}
@@ -241,13 +221,15 @@ bNodeTreeType *rna_node_tree_type_from_enum(int value)
{
int i = 0;
bNodeTreeType *result = NULL;
- NODE_TREE_TYPES_BEGIN(nt)
+ NODE_TREE_TYPES_BEGIN (nt)
+ {
if (i == value) {
result = nt;
break;
}
++i;
- NODE_TREE_TYPES_END
+ }
+ NODE_TREE_TYPES_END;
return result;
}
@@ -257,7 +239,8 @@ EnumPropertyItem *rna_node_tree_type_itemf(void *data, int (*poll)(void *data, b
EnumPropertyItem *item = NULL;
int totitem = 0, i = 0;
- NODE_TREE_TYPES_BEGIN(nt)
+ NODE_TREE_TYPES_BEGIN (nt)
+ {
if (poll && !poll(data, nt)) {
++i;
continue;
@@ -272,7 +255,8 @@ EnumPropertyItem *rna_node_tree_type_itemf(void *data, int (*poll)(void *data, b
RNA_enum_item_add(&item, &totitem, &tmp);
++i;
- NODE_TREE_TYPES_END
+ }
+ NODE_TREE_TYPES_END;
RNA_enum_item_end(&item, &totitem);
*free = 1;
@@ -600,8 +584,9 @@ static void rna_NodeTree_unregister(Main *UNUSED(bmain), StructRNA *type)
WM_main_add_notifier(NC_NODE | NA_EDITED, NULL);
}
-static StructRNA *rna_NodeTree_register(Main *bmain, ReportList *reports, void *data, const char *identifier,
- StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
+static StructRNA *rna_NodeTree_register(
+ Main *bmain, ReportList *reports, void *data, const char *identifier,
+ StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
{
bNodeTreeType *nt, dummynt;
bNodeTree dummyntree;
@@ -668,7 +653,7 @@ static bool rna_NodeTree_check(bNodeTree *ntree, ReportList *reports)
return true;
}
-static void rna_NodeTree_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_NodeTree_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
{
bNodeTree *ntree = (bNodeTree *)ptr->id.data;
@@ -931,22 +916,6 @@ static void rna_NodeTree_active_output_set(PointerRNA *ptr, int value)
}
}
-static int rna_NodeTree_inputs_lookupstring(PointerRNA *ptr, const char *key, PointerRNA *r_ptr)
-{
- bNodeTree *ntree = (bNodeTree *)ptr->data;
- bNodeSocket *sock = ntreeFindSocketInterface(ntree, SOCK_IN, key);
- RNA_pointer_create(ptr->id.data, &RNA_NodeSocketInterface, sock, r_ptr);
- return (sock != NULL);
-}
-
-static int rna_NodeTree_outputs_lookupstring(PointerRNA *ptr, const char *key, PointerRNA *r_ptr)
-{
- bNodeTree *ntree = (bNodeTree *)ptr->data;
- bNodeSocket *sock = ntreeFindSocketInterface(ntree, SOCK_OUT, key);
- RNA_pointer_create(ptr->id.data, &RNA_NodeSocketInterface, sock, r_ptr);
- return (sock != NULL);
-}
-
static bNodeSocket *rna_NodeTree_inputs_new(bNodeTree *ntree, ReportList *reports, const char *type, const char *name)
{
bNodeSocket *sock;
@@ -1408,8 +1377,8 @@ static bNodeType *rna_Node_register_base(Main *bmain, ReportList *reports, Struc
nt->initfunc_api = (have_function[3]) ? rna_Node_init : NULL;
nt->copyfunc_api = (have_function[4]) ? rna_Node_copy : NULL;
nt->freefunc_api = (have_function[5]) ? rna_Node_free : NULL;
- nt->uifunc = (have_function[6]) ? rna_Node_draw_buttons : NULL;
- nt->uifuncbut = (have_function[7]) ? rna_Node_draw_buttons_ext : NULL;
+ nt->draw_buttons = (have_function[6]) ? rna_Node_draw_buttons : NULL;
+ nt->draw_buttons_ex = (have_function[7]) ? rna_Node_draw_buttons_ext : NULL;
/* sanitize size values in case not all have been registered */
if (nt->maxwidth < nt->minwidth)
@@ -1422,9 +1391,10 @@ static bNodeType *rna_Node_register_base(Main *bmain, ReportList *reports, Struc
return nt;
}
-static StructRNA *rna_Node_register(Main *bmain, ReportList *reports,
- void *data, const char *identifier,
- StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
+static StructRNA *rna_Node_register(
+ Main *bmain, ReportList *reports,
+ void *data, const char *identifier,
+ StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
{
bNodeType *nt = rna_Node_register_base(bmain, reports, &RNA_Node, data, identifier, validate, call, free);
if (!nt)
@@ -1438,9 +1408,10 @@ static StructRNA *rna_Node_register(Main *bmain, ReportList *reports,
return nt->ext.srna;
}
-static StructRNA *rna_ShaderNode_register(Main *bmain, ReportList *reports,
- void *data, const char *identifier,
- StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
+static StructRNA *rna_ShaderNode_register(
+ Main *bmain, ReportList *reports,
+ void *data, const char *identifier,
+ StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
{
bNodeType *nt = rna_Node_register_base(bmain, reports, &RNA_ShaderNode, data, identifier, validate, call, free);
if (!nt)
@@ -1454,9 +1425,10 @@ static StructRNA *rna_ShaderNode_register(Main *bmain, ReportList *reports,
return nt->ext.srna;
}
-static StructRNA *rna_CompositorNode_register(Main *bmain, ReportList *reports,
- void *data, const char *identifier,
- StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
+static StructRNA *rna_CompositorNode_register(
+ Main *bmain, ReportList *reports,
+ void *data, const char *identifier,
+ StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
{
bNodeType *nt = rna_Node_register_base(bmain, reports, &RNA_CompositorNode, data, identifier, validate, call, free);
if (!nt)
@@ -1470,9 +1442,10 @@ static StructRNA *rna_CompositorNode_register(Main *bmain, ReportList *reports,
return nt->ext.srna;
}
-static StructRNA *rna_TextureNode_register(Main *bmain, ReportList *reports,
- void *data, const char *identifier,
- StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
+static StructRNA *rna_TextureNode_register(
+ Main *bmain, ReportList *reports,
+ void *data, const char *identifier,
+ StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
{
bNodeType *nt = rna_Node_register_base(bmain, reports, &RNA_TextureNode, data, identifier, validate, call, free);
if (!nt)
@@ -1573,22 +1546,6 @@ static void rna_Node_name_set(PointerRNA *ptr, const char *value)
BKE_all_animdata_fix_paths_rename(NULL, "nodes", oldname, node->name);
}
-static int rna_Node_inputs_lookupstring(PointerRNA *ptr, const char *key, PointerRNA *r_ptr)
-{
- bNode *node = (bNode *)ptr->data;
- bNodeSocket *sock = nodeFindSocket(node, SOCK_IN, key);
- RNA_pointer_create(ptr->id.data, &RNA_NodeSocket, sock, r_ptr);
- return (sock != NULL);
-}
-
-static int rna_Node_outputs_lookupstring(PointerRNA *ptr, const char *key, PointerRNA *r_ptr)
-{
- bNode *node = (bNode *)ptr->data;
- bNodeSocket *sock = nodeFindSocket(node, SOCK_OUT, key);
- RNA_pointer_create(ptr->id.data, &RNA_NodeSocket, sock, r_ptr);
- return (sock != NULL);
-}
-
static bNodeSocket *rna_Node_inputs_new(ID *id, bNode *node, ReportList *reports, const char *type, const char *name, const char *identifier)
{
bNodeTree *ntree = (bNodeTree *)id;
@@ -1810,8 +1767,9 @@ static void rna_NodeSocket_unregister(Main *UNUSED(bmain), StructRNA *type)
WM_main_add_notifier(NC_NODE | NA_EDITED, NULL);
}
-static StructRNA *rna_NodeSocket_register(Main *bmain, ReportList *reports, void *data, const char *identifier,
- StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
+static StructRNA *rna_NodeSocket_register(
+ Main *UNUSED(bmain), ReportList *reports, void *data, const char *identifier,
+ StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
{
bNodeSocketType *st, dummyst;
bNodeSocket dummysock;
@@ -1931,6 +1889,12 @@ static void rna_NodeSocket_update(Main *bmain, Scene *UNUSED(scene), PointerRNA
ED_node_tag_update_nodetree(bmain, ntree);
}
+static int rna_NodeSocket_is_output_get(PointerRNA *ptr)
+{
+ bNodeSocket *sock = ptr->data;
+ return sock->in_out == SOCK_OUT;
+}
+
static void rna_NodeSocket_link_limit_set(PointerRNA *ptr, int value)
{
bNodeSocket *sock = ptr->data;
@@ -2081,8 +2045,9 @@ static void rna_NodeSocketInterface_unregister(Main *UNUSED(bmain), StructRNA *t
WM_main_add_notifier(NC_NODE | NA_EDITED, NULL);
}
-static StructRNA *rna_NodeSocketInterface_register(Main *bmain, ReportList *reports, void *data, const char *identifier,
- StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
+static StructRNA *rna_NodeSocketInterface_register(
+ Main *UNUSED(bmain), ReportList *UNUSED(reports), void *data, const char *identifier,
+ StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
{
bNodeSocketType *st, dummyst;
bNodeSocket dummysock;
@@ -2377,30 +2342,31 @@ static void rna_NodeInternal_update(ID *id, bNode *node)
static void rna_NodeInternal_draw_buttons(ID *id, bNode *node, struct bContext *C, struct uiLayout *layout)
{
- if (node->typeinfo->uifunc) {
+ if (node->typeinfo->draw_buttons) {
PointerRNA ptr;
RNA_pointer_create(id, &RNA_Node, node, &ptr);
- node->typeinfo->uifunc(layout, C, &ptr);
+ node->typeinfo->draw_buttons(layout, C, &ptr);
}
}
static void rna_NodeInternal_draw_buttons_ext(ID *id, bNode *node, struct bContext *C, struct uiLayout *layout)
{
- if (node->typeinfo->uifuncbut) {
+ if (node->typeinfo->draw_buttons_ex) {
PointerRNA ptr;
RNA_pointer_create(id, &RNA_Node, node, &ptr);
- node->typeinfo->uifuncbut(layout, C, &ptr);
+ node->typeinfo->draw_buttons_ex(layout, C, &ptr);
}
- else if (node->typeinfo->uifunc) {
+ else if (node->typeinfo->draw_buttons) {
PointerRNA ptr;
RNA_pointer_create(id, &RNA_Node, node, &ptr);
- node->typeinfo->uifunc(layout, C, &ptr);
+ node->typeinfo->draw_buttons(layout, C, &ptr);
}
}
-static StructRNA *rna_NodeCustomGroup_register(Main *bmain, ReportList *reports,
- void *data, const char *identifier,
- StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
+static StructRNA *rna_NodeCustomGroup_register(
+ Main *bmain, ReportList *reports,
+ void *data, const char *identifier,
+ StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
{
bNodeType *nt = rna_Node_register_base(bmain, reports, &RNA_NodeCustomGroup, data, identifier, validate, call, free);
if (!nt)
@@ -2782,6 +2748,23 @@ static void rna_NodeOutputFileSlotLayer_name_set(PointerRNA *ptr, const char *va
}
}
+static bNodeSocket *rna_NodeOutputFile_slots_new(ID *id, bNode *node, bContext *C, ReportList *UNUSED(reports), const char *name)
+{
+ bNodeTree *ntree = (bNodeTree *)id;
+ Scene *scene = CTX_data_scene(C);
+ ImageFormatData *im_format = NULL;
+ bNodeSocket *sock;
+ if (scene)
+ im_format = &scene->r.im_format;
+
+ sock = ntreeCompositOutputFileAddSocket(ntree, node, name, im_format);
+
+ ntreeUpdateTree(CTX_data_main(C), ntree);
+ WM_main_add_notifier(NC_NODE | NA_EDITED, ntree);
+
+ return sock;
+}
+
static void rna_ShaderNodeScript_mode_set(PointerRNA *ptr, int value)
{
bNode *node = (bNode *)ptr->data;
@@ -2861,6 +2844,24 @@ static void rna_ShaderNodeScript_update(Main *bmain, Scene *scene, PointerRNA *p
ED_node_tag_update_nodetree(bmain, ntree);
}
+static void rna_ShaderNodeSubsurface_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+{
+ bNodeTree *ntree = (bNodeTree *)ptr->id.data;
+ bNode *node = (bNode *)ptr->data;
+
+ nodeUpdate(ntree, node);
+ rna_Node_update(bmain, scene, ptr);
+}
+
+static void rna_CompositorNodeScale_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+{
+ bNodeTree *ntree = (bNodeTree *)ptr->id.data;
+ bNode *node = (bNode *)ptr->data;
+
+ nodeUpdate(ntree, node);
+ rna_Node_update(bmain, scene, ptr);
+}
+
#else
static EnumPropertyItem prop_image_layer_items[] = {
@@ -2907,6 +2908,12 @@ static EnumPropertyItem node_toon_items[] = {
{0, NULL, 0, NULL, NULL}
};
+static EnumPropertyItem node_hair_items[] = {
+ {SHD_HAIR_REFLECTION, "Reflection", 0, "Reflection", ""},
+ {SHD_HAIR_TRANSMISSION, "Transmission", 0, "Transmission", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
static EnumPropertyItem node_script_mode_items[] = {
{NODE_SCRIPT_INTERNAL, "INTERNAL", 0, "Internal", "Use internal text datablock"},
{NODE_SCRIPT_EXTERNAL, "EXTERNAL", 0, "External", "Use external .osl or .oso file"},
@@ -3143,10 +3150,24 @@ static void def_sh_material(StructRNA *srna)
static void def_sh_mapping(StructRNA *srna)
{
+ static EnumPropertyItem prop_vect_type_items[] = {
+ {TEXMAP_TYPE_TEXTURE, "TEXTURE", 0, "Texture", "Transform a texture by inverse mapping the texture coordinate"},
+ {TEXMAP_TYPE_POINT, "POINT", 0, "Point", "Transform a point"},
+ {TEXMAP_TYPE_VECTOR, "VECTOR", 0, "Vector", "Transform a direction vector"},
+ {TEXMAP_TYPE_NORMAL, "NORMAL", 0, "Normal", "Transform a normal vector with unit length"},
+ {0, NULL, 0, NULL, NULL}
+ };
+
PropertyRNA *prop;
RNA_def_struct_sdna_from(srna, "TexMapping", "storage");
+ prop = RNA_def_property(srna, "vector_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "type");
+ RNA_def_property_enum_items(prop, prop_vect_type_items);
+ RNA_def_property_ui_text(prop, "Type", "Type of vector that the mapping transforms");
+ RNA_def_property_update(prop, 0, "rna_Mapping_Node_update");
+
prop = RNA_def_property(srna, "translation", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "loc");
RNA_def_property_ui_text(prop, "Location", "");
@@ -3230,19 +3251,40 @@ static void def_sh_tex(StructRNA *srna)
static void def_sh_tex_sky(StructRNA *srna)
{
+ static EnumPropertyItem prop_sky_type[] = {
+ {SHD_SKY_OLD, "PREETHAM", 0, "Preetham", ""},
+ {SHD_SKY_NEW, "HOSEK_WILKIE", 0, "Hosek / Wilkie", ""},
+ {0, NULL, 0, NULL, NULL}
+ };
+ static float default_dir[3] = {0.0f, 0.0f, 1.0f};
+
PropertyRNA *prop;
RNA_def_struct_sdna_from(srna, "NodeTexSky", "storage");
def_sh_tex(srna);
+
+ prop = RNA_def_property(srna, "sky_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "sky_model");
+ RNA_def_property_enum_items(prop, prop_sky_type);
+ RNA_def_property_ui_text(prop, "Sky Type", "");
+ RNA_def_property_update(prop, 0, "rna_Node_update");
prop = RNA_def_property(srna, "sun_direction", PROP_FLOAT, PROP_DIRECTION);
RNA_def_property_ui_text(prop, "Sun Direction", "Direction from where the sun is shining");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_float_array_default(prop, default_dir);
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "turbidity", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 1.0f, 30.0f);
+ RNA_def_property_range(prop, 1.0f, 10.0f);
+ RNA_def_property_ui_range(prop, 1.0f, 10.0f, 10, 3);
RNA_def_property_ui_text(prop, "Turbidity", "Atmospheric turbidity");
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
+
+ prop = RNA_def_property(srna, "ground_albedo", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_text(prop, "Ground Albedo", "Ground color that is subtly reflected in the sky");
+ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
}
static void def_sh_tex_environment(StructRNA *srna)
@@ -3512,9 +3554,9 @@ static void def_sh_tex_coord(StructRNA *srna)
static void def_sh_vect_transform(StructRNA *srna)
{
static EnumPropertyItem prop_vect_type_items[] = {
- {SHD_VECT_TRANSFORM_TYPE_VECTOR, "VECTOR", 0, "Vector", ""},
- {SHD_VECT_TRANSFORM_TYPE_POINT, "POINT", 0, "Point", ""},
- {SHD_VECT_TRANSFORM_TYPE_NORMAL, "NORMAL", 0, "Normal", ""},
+ {SHD_VECT_TRANSFORM_TYPE_POINT, "POINT", 0, "Point", "Transform a point"},
+ {SHD_VECT_TRANSFORM_TYPE_VECTOR, "VECTOR", 0, "Vector", "Transform a direction vector"},
+ {SHD_VECT_TRANSFORM_TYPE_NORMAL, "NORMAL", 0, "Normal", "Transform a normal vector with unit length"},
{0, NULL, 0, NULL, NULL}
};
@@ -3529,7 +3571,8 @@ static void def_sh_vect_transform(StructRNA *srna)
RNA_def_struct_sdna_from(srna, "NodeShaderVectTransform", "storage");
- prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "vector_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_vect_type_items);
RNA_def_property_ui_text(prop, "Type", "");
RNA_def_property_update(prop, 0, "rna_Node_update");
@@ -3587,6 +3630,17 @@ static void def_sh_bump(StructRNA *srna)
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
}
+static void def_hair(StructRNA *srna)
+{
+ PropertyRNA *prop;
+
+ prop = RNA_def_property(srna, "component", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "custom1");
+ RNA_def_property_enum_items(prop, node_hair_items);
+ RNA_def_property_ui_text(prop, "Component", "");
+ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
+}
+
static void def_sh_normal_map(StructRNA *srna)
{
static EnumPropertyItem prop_space_items[] = {
@@ -3650,6 +3704,24 @@ static void def_sh_tangent(StructRNA *srna)
RNA_def_struct_sdna_from(srna, "bNode", NULL);
}
+
+static void def_sh_subsurface(StructRNA *srna)
+{
+ static EnumPropertyItem prop_subsurface_falloff_items[] = {
+ {SHD_SUBSURFACE_CUBIC, "CUBIC", 0, "Cubic", "Simple cubic falloff function"},
+ {SHD_SUBSURFACE_GAUSSIAN, "GAUSSIAN", 0, "Gaussian", "Normal distribution, multiple can be combined to fit more complex profiles"},
+ {0, NULL, 0, NULL, NULL}
+ };
+
+ PropertyRNA *prop;
+
+ prop = RNA_def_property(srna, "falloff", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "custom1");
+ RNA_def_property_enum_items(prop, prop_subsurface_falloff_items);
+ RNA_def_property_ui_text(prop, "Falloff", "Function to determine how much light nearby points contribute based on their distance to the shading point");
+ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_ShaderNodeSubsurface_update");
+}
+
static void def_sh_script(StructRNA *srna)
{
PropertyRNA *prop;
@@ -4121,7 +4193,49 @@ static void rna_def_cmp_output_file_slot_layer(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Name", "OpenEXR layer name used for this slot");
RNA_def_property_update(prop, NC_NODE | NA_EDITED, NULL);
}
-static void def_cmp_output_file(StructRNA *srna)
+static void rna_def_cmp_output_file_slots_api(BlenderRNA *brna, PropertyRNA *cprop, const char *struct_name)
+{
+ StructRNA *srna;
+ PropertyRNA *parm;
+ FunctionRNA *func;
+
+ RNA_def_property_srna(cprop, struct_name);
+ srna = RNA_def_struct(brna, struct_name, NULL);
+ RNA_def_struct_sdna(srna, "bNode");
+ RNA_def_struct_ui_text(srna, "File Output Slots", "Collection of File Output node slots");
+
+ func = RNA_def_function(srna, "new", "rna_NodeOutputFile_slots_new");
+ RNA_def_function_ui_description(func, "Add a file slot to this node");
+ RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_REPORTS | FUNC_USE_CONTEXT);
+ parm = RNA_def_string(func, "name", "", MAX_NAME, "Name", "");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ /* return value */
+ parm = RNA_def_pointer(func, "socket", "NodeSocket", "", "New socket");
+ RNA_def_function_return(func, parm);
+
+ /* NB: methods below can use the standard node socket API functions,
+ * included here for completeness.
+ */
+
+ func = RNA_def_function(srna, "remove", "rna_Node_socket_remove");
+ RNA_def_function_ui_description(func, "Remove a file slot from this node");
+ RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_REPORTS);
+ parm = RNA_def_pointer(func, "socket", "NodeSocket", "", "The socket to remove");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+
+ func = RNA_def_function(srna, "clear", "rna_Node_inputs_clear");
+ RNA_def_function_ui_description(func, "Remove all file slots from this node");
+ RNA_def_function_flag(func, FUNC_USE_SELF_ID);
+
+ func = RNA_def_function(srna, "move", "rna_Node_inputs_move");
+ RNA_def_function_ui_description(func, "Move a file slot to another position");
+ RNA_def_function_flag(func, FUNC_USE_SELF_ID);
+ parm = RNA_def_int(func, "from_index", -1, 0, INT_MAX, "From Index", "Index of the socket to move", 0, 10000);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm = RNA_def_int(func, "to_index", -1, 0, INT_MAX, "To Index", "Target index for the socket", 0, 10000);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+}
+static void def_cmp_output_file(BlenderRNA *brna, StructRNA *srna)
{
PropertyRNA *prop;
@@ -4149,12 +4263,14 @@ static void def_cmp_output_file(StructRNA *srna)
"rna_NodeOutputFile_slot_file_get", NULL, NULL, NULL, NULL);
RNA_def_property_struct_type(prop, "NodeOutputFileSlotFile");
RNA_def_property_ui_text(prop, "File Slots", "");
+ rna_def_cmp_output_file_slots_api(brna, prop, "CompositorNodeOutputFileFileSlots");
prop = RNA_def_property(srna, "layer_slots", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_funcs(prop, "rna_NodeOutputFile_slots_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end",
"rna_NodeOutputFile_slot_layer_get", NULL, NULL, NULL, NULL);
RNA_def_property_struct_type(prop, "NodeOutputFileSlotLayer");
RNA_def_property_ui_text(prop, "EXR Layer Slots", "");
+ rna_def_cmp_output_file_slots_api(brna, prop, "CompositorNodeOutputFileLayerSlots");
}
static void def_cmp_dilate_erode(StructRNA *srna)
@@ -4261,7 +4377,7 @@ static void def_cmp_scale(StructRNA *srna)
RNA_def_property_enum_sdna(prop, NULL, "custom1");
RNA_def_property_enum_items(prop, space_items);
RNA_def_property_ui_text(prop, "Space", "Coordinate space to scale relative to");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_CompositorNodeScale_update");
/* expose 2 flags as a enum of 3 items */
prop = RNA_def_property(srna, "frame_method", PROP_ENUM, PROP_NONE);
@@ -5336,7 +5452,7 @@ static void dev_cmd_transform(StructRNA *srna)
/* -- Compositor Nodes ------------------------------------------------------ */
-EnumPropertyItem node_masktype_items[] = {
+static EnumPropertyItem node_masktype_items[] = {
{0, "ADD", 0, "Add", ""},
{1, "SUBTRACT", 0, "Subtract", ""},
{2, "MULTIPLY", 0, "Multiply", ""},
@@ -6074,12 +6190,10 @@ static void rna_def_node_socket(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Identifier", "Unique identifier for mapping sockets");
- prop = RNA_def_property(srna, "in_out", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "in_out");
- RNA_def_property_enum_items(prop, node_socket_in_out_items);
- RNA_def_property_enum_default(prop, SOCK_IN);
+ prop = RNA_def_property(srna, "is_output", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_funcs(prop, "rna_NodeSocket_is_output_get", NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Input or Output", "Input or Output type");
+ RNA_def_property_ui_text(prop, "Is Output", "True if the socket is an output, otherwise input");
prop = RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SOCK_HIDDEN);
@@ -6201,12 +6315,10 @@ static void rna_def_node_socket_interface(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Identifier", "Unique identifier for mapping sockets");
- prop = RNA_def_property(srna, "in_out", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "in_out");
- RNA_def_property_enum_items(prop, node_socket_in_out_items);
- RNA_def_property_enum_default(prop, SOCK_IN);
+ prop = RNA_def_property(srna, "is_output", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_funcs(prop, "rna_NodeSocket_is_output_get", NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Input or Output", "Input or Output type");
+ RNA_def_property_ui_text(prop, "Is Output", "True if the socket is an output, otherwise input");
/* registration */
prop = RNA_def_property(srna, "bl_socket_idname", PROP_STRING, PROP_NONE);
@@ -6832,16 +6944,12 @@ static void rna_def_node(BlenderRNA *brna)
prop = RNA_def_property(srna, "inputs", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "inputs", NULL);
- RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, NULL, NULL, NULL,
- "rna_Node_inputs_lookupstring", NULL);
RNA_def_property_struct_type(prop, "NodeSocket");
RNA_def_property_ui_text(prop, "Inputs", "");
rna_def_node_sockets_api(brna, prop, SOCK_IN);
prop = RNA_def_property(srna, "outputs", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "outputs", NULL);
- RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, NULL, NULL, NULL,
- "rna_Node_outputs_lookupstring", NULL);
RNA_def_property_struct_type(prop, "NodeSocket");
RNA_def_property_ui_text(prop, "Outputs", "");
rna_def_node_sockets_api(brna, prop, SOCK_OUT);
@@ -7257,8 +7365,6 @@ static void rna_def_nodetree(BlenderRNA *brna)
prop = RNA_def_property(srna, "inputs", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "inputs", NULL);
- RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, NULL, NULL, NULL,
- "rna_NodeTree_inputs_lookupstring", NULL);
RNA_def_property_struct_type(prop, "NodeSocketInterface");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Inputs", "Node tree inputs");
@@ -7271,8 +7377,6 @@ static void rna_def_nodetree(BlenderRNA *brna)
prop = RNA_def_property(srna, "outputs", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "outputs", NULL);
- RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, NULL, NULL, NULL,
- "rna_NodeTree_outputs_lookupstring", NULL);
RNA_def_property_struct_type(prop, "NodeSocketInterface");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Outputs", "Node tree outputs");
@@ -7404,8 +7508,8 @@ static void rna_def_texture_nodetree(BlenderRNA *brna)
RNA_def_struct_ui_icon(srna, ICON_TEXTURE);
}
-static void define_specific_node(BlenderRNA *brna, const char *struct_name, const char *base_name,
- const char *ui_name, const char *ui_desc, void (*def_func)(StructRNA *))
+static StructRNA *define_specific_node(BlenderRNA *brna, const char *struct_name, const char *base_name,
+ const char *ui_name, const char *ui_desc, void (*def_func)(StructRNA *))
{
StructRNA *srna;
FunctionRNA *func;
@@ -7452,6 +7556,8 @@ static void define_specific_node(BlenderRNA *brna, const char *struct_name, cons
if (def_func)
def_func(srna);
+
+ return srna;
}
static void rna_def_node_instance_hash(BlenderRNA *brna)
@@ -7469,6 +7575,8 @@ static void rna_def_node_instance_hash(BlenderRNA *brna)
void RNA_def_nodetree(BlenderRNA *brna)
{
+ StructRNA *srna;
+
rna_def_node_socket(brna);
rna_def_node_socket_interface(brna);
@@ -7489,7 +7597,13 @@ void RNA_def_nodetree(BlenderRNA *brna)
rna_def_texture_nodetree(brna);
#define DefNode(Category, ID, DefFunc, EnumName, StructName, UIName, UIDesc) \
- define_specific_node(brna, #Category #StructName, #Category, UIName, UIDesc, DefFunc);
+ { \
+ srna = define_specific_node(brna, #Category #StructName, #Category, UIName, UIDesc, DefFunc); \
+ if (ID == CMP_NODE_OUTPUT_FILE) { \
+ /* needs brna argument, can't use NOD_static_types.h */ \
+ def_cmp_output_file(brna, srna); \
+ } \
+ }
/* hack, don't want to add include path to RNA just for this, since in the future RNA types
* for nodes should be defined locally at runtime anyway ...
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index e71d1d22c4b..3f366dfbcfa 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -465,7 +465,7 @@ static EnumPropertyItem *rna_Object_parent_type_itemf(bContext *UNUSED(C), Point
RNA_enum_items_add_value(&item, &totitem, parent_type_items, PARBONE);
}
- if (ELEM4(par->type, OB_MESH, OB_CURVE, OB_SURF, OB_LATTICE)) {
+ if (OB_TYPE_SUPPORT_PARVERT(par->type)) {
RNA_enum_items_add_value(&item, &totitem, parent_type_items, PARVERT1);
RNA_enum_items_add_value(&item, &totitem, parent_type_items, PARVERT3);
}
@@ -556,7 +556,8 @@ static void rna_Object_active_vertex_group_index_set(PointerRNA *ptr, int value)
ob->actdef = value + 1;
}
-static void rna_Object_active_vertex_group_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
+static void rna_Object_active_vertex_group_index_range(PointerRNA *ptr, int *min, int *max,
+ int *UNUSED(softmin), int *UNUSED(softmax))
{
Object *ob = (Object *)ptr->id.data;
@@ -667,7 +668,8 @@ static void rna_Object_active_material_index_set(PointerRNA *ptr, int value)
}
}
-static void rna_Object_active_material_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
+static void rna_Object_active_material_index_range(PointerRNA *ptr, int *min, int *max,
+ int *UNUSED(softmin), int *UNUSED(softmax))
{
Object *ob = (Object *)ptr->id.data;
*min = 0;
@@ -693,7 +695,7 @@ static void rna_Object_active_material_set(PointerRNA *ptr, PointerRNA value)
}
static void rna_Object_active_particle_system_index_range(PointerRNA *ptr, int *min, int *max,
- int *softmin, int *softmax)
+ int *UNUSED(softmin), int *UNUSED(softmax))
{
Object *ob = (Object *)ptr->id.data;
*min = 0;
@@ -903,6 +905,16 @@ static void rna_MaterialSlot_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
rna_Object_internal_update(bmain, scene, ptr);
WM_main_add_notifier(NC_OBJECT | ND_OB_SHADING, ptr->id.data);
+ WM_main_add_notifier(NC_MATERIAL | ND_SHADING_LINKS, NULL);
+}
+
+static char *rna_MaterialSlot_path(PointerRNA *ptr)
+{
+ Object *ob = (Object *)ptr->id.data;
+ int index = (Material **)ptr->data - ob->mat;
+
+ /* from armature... */
+ return BLI_sprintfN("material_slots[%d]", index);
}
/* why does this have to be so complicated?, can't all this crap be
@@ -1183,7 +1195,8 @@ static void rna_GameObjectSettings_col_mask_set(PointerRNA *ptr, const int *valu
}
-static void rna_Object_active_shape_key_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
+static void rna_Object_active_shape_key_index_range(PointerRNA *ptr, int *min, int *max,
+ int *UNUSED(softmin), int *UNUSED(softmax))
{
Object *ob = (Object *)ptr->id.data;
Key *key = BKE_key_from_object(ob);
@@ -1447,8 +1460,6 @@ int rna_Object_use_dynamic_topology_sculpting_get(PointerRNA *ptr)
#else
-static int rna_matrix_dimsize_4x4[] = {4, 4};
-
static void rna_def_vertex_group(BlenderRNA *brna)
{
StructRNA *srna;
@@ -1549,6 +1560,8 @@ static void rna_def_material_slot(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Name", "Material slot name");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_struct_name_property(srna, prop);
+
+ RNA_def_struct_path_func(srna, "rna_MaterialSlot_path");
}
static void rna_def_object_game_settings(BlenderRNA *brna)
@@ -2349,7 +2362,7 @@ static void rna_def_object(BlenderRNA *brna)
prop = RNA_def_property(srna, "constraints", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "Constraint");
RNA_def_property_ui_text(prop, "Constraints", "Constraints affecting the transformation of the object");
-/* RNA_def_property_collection_funcs(prop, 0, 0, 0, 0, 0, 0, 0, "constraints__add", "constraints__remove"); */
+/* RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "constraints__add", "constraints__remove"); */
rna_def_object_constraints(brna, prop);
/* game engine */
@@ -2762,11 +2775,14 @@ static void rna_def_object_base(BlenderRNA *brna)
void RNA_def_object(BlenderRNA *brna)
{
rna_def_object(brna);
+
+ RNA_define_animate_sdna(false);
rna_def_object_game_settings(brna);
rna_def_object_base(brna);
rna_def_vertex_group(brna);
rna_def_material_slot(brna);
rna_def_dupli_object(brna);
+ RNA_define_animate_sdna(true);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index 25ca231e58d..0f71e26b687 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -430,8 +430,6 @@ void RNA_api_object(StructRNA *srna)
{0, NULL, 0, NULL, NULL}
};
- static int rna_matrix_dimsize_4x4[] = {4, 4};
-
#ifndef NDEBUG
static EnumPropertyItem mesh_dm_info_items[] = {
{0, "SOURCE", 0, "Source", "Source mesh"},
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index 1d2aa08e7cd..33ae256c042 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -228,7 +228,8 @@ static void rna_Cache_list_begin(CollectionPropertyIterator *iter, PointerRNA *p
rna_iterator_listbase_begin(iter, &lb, NULL);
}
-static void rna_Cache_active_point_cache_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
+static void rna_Cache_active_point_cache_index_range(PointerRNA *ptr, int *min, int *max,
+ int *UNUSED(softmin), int *UNUSED(softmax))
{
Object *ob = ptr->id.data;
PointCache *cache = ptr->data;
@@ -291,7 +292,8 @@ static void rna_Cache_active_point_cache_index_set(struct PointerRNA *ptr, int v
BLI_freelistN(&pidlist);
}
-static void rna_PointCache_frame_step_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
+static void rna_PointCache_frame_step_range(PointerRNA *ptr, int *min, int *max,
+ int *UNUSED(softmin), int *UNUSED(softmax))
{
Object *ob = ptr->id.data;
PointCache *cache = ptr->data;
@@ -861,7 +863,9 @@ static void rna_def_pointcache(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_library_path", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", PTCACHE_IGNORE_LIBPATH);
- RNA_def_property_ui_text(prop, "Library Path", "Use this files path when library linked into another file");
+ RNA_def_property_ui_text(prop, "Library Path",
+ "Use this file's path for the disk cache when library linked into another file "
+ "(for local bakes per scene file, disable this option)");
RNA_def_property_update(prop, NC_OBJECT, "rna_Cache_idname_change");
prop = RNA_def_property(srna, "point_caches", PROP_COLLECTION, PROP_NONE);
@@ -1536,8 +1540,6 @@ static void rna_def_softbody(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- const int matrix_dimsize[] = {3, 3};
-
static EnumPropertyItem collision_type_items[] = {
{SBC_MODE_MANUAL, "MANUAL", 0, "Manual", "Manual adjust"},
@@ -1780,12 +1782,12 @@ static void rna_def_softbody(BlenderRNA *brna)
/* matrix */
prop = RNA_def_property(srna, "rotation_estimate", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "lrot");
- RNA_def_property_multi_array(prop, 2, matrix_dimsize);
+ RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_3x3);
RNA_def_property_ui_text(prop, "Rot Matrix", "Estimated rotation matrix");
prop = RNA_def_property(srna, "scale_estimate", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "lscale");
- RNA_def_property_multi_array(prop, 2, matrix_dimsize);
+ RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_3x3);
RNA_def_property_ui_text(prop, "Scale Matrix", "Estimated scale matrix");
/***********************************************************************************/
diff --git a/source/blender/makesrna/intern/rna_packedfile.c b/source/blender/makesrna/intern/rna_packedfile.c
index a72188591a1..365ad5fdb9a 100644
--- a/source/blender/makesrna/intern/rna_packedfile.c
+++ b/source/blender/makesrna/intern/rna_packedfile.c
@@ -31,6 +31,7 @@
#include "DNA_packedFile_types.h"
#include "RNA_define.h"
+#include "RNA_enum_types.h"
#include "rna_internal.h"
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index b966a7d7f2c..5151310cd64 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -52,34 +52,40 @@
#include "WM_types.h"
#include "WM_api.h"
-EnumPropertyItem part_from_items[] = {
+#ifdef RNA_RUNTIME
+static EnumPropertyItem part_from_items[] = {
{PART_FROM_VERT, "VERT", 0, "Verts", ""},
{PART_FROM_FACE, "FACE", 0, "Faces", ""},
{PART_FROM_VOLUME, "VOLUME", 0, "Volume", ""},
{0, NULL, 0, NULL, NULL}
};
+#endif
-EnumPropertyItem part_reactor_from_items[] = {
+#ifndef RNA_RUNTIME
+static EnumPropertyItem part_reactor_from_items[] = {
{PART_FROM_VERT, "VERT", 0, "Verts", ""},
{PART_FROM_FACE, "FACE", 0, "Faces", ""},
{PART_FROM_VOLUME, "VOLUME", 0, "Volume", ""},
{0, NULL, 0, NULL, NULL}
};
+#endif
-EnumPropertyItem part_dist_items[] = {
+static EnumPropertyItem part_dist_items[] = {
{PART_DISTR_JIT, "JIT", 0, "Jittered", ""},
{PART_DISTR_RAND, "RAND", 0, "Random", ""},
{PART_DISTR_GRID, "GRID", 0, "Grid", ""},
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem part_hair_dist_items[] = {
+#ifdef RNA_RUNTIME
+static EnumPropertyItem part_hair_dist_items[] = {
{PART_DISTR_JIT, "JIT", 0, "Jittered", ""},
{PART_DISTR_RAND, "RAND", 0, "Random", ""},
{0, NULL, 0, NULL, NULL}
};
+#endif
-EnumPropertyItem part_draw_as_items[] = {
+static EnumPropertyItem part_draw_as_items[] = {
{PART_DRAW_NOT, "NONE", 0, "None", ""},
{PART_DRAW_REND, "RENDER", 0, "Rendered", ""},
{PART_DRAW_DOT, "DOT", 0, "Point", ""},
@@ -89,14 +95,16 @@ EnumPropertyItem part_draw_as_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem part_hair_draw_as_items[] = {
+#ifdef RNA_RUNTIME
+static EnumPropertyItem part_hair_draw_as_items[] = {
{PART_DRAW_NOT, "NONE", 0, "None", ""},
{PART_DRAW_REND, "RENDER", 0, "Rendered", ""},
{PART_DRAW_PATH, "PATH", 0, "Path", ""},
{0, NULL, 0, NULL, NULL}
};
+#endif
-EnumPropertyItem part_ren_as_items[] = {
+static EnumPropertyItem part_ren_as_items[] = {
{PART_DRAW_NOT, "NONE", 0, "None", ""},
{PART_DRAW_HALO, "HALO", 0, "Halo", ""},
{PART_DRAW_LINE, "LINE", 0, "Line", ""},
@@ -107,13 +115,15 @@ EnumPropertyItem part_ren_as_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem part_hair_ren_as_items[] = {
+#ifdef RNA_RUNTIME
+static EnumPropertyItem part_hair_ren_as_items[] = {
{PART_DRAW_NOT, "NONE", 0, "None", ""},
{PART_DRAW_PATH, "PATH", 0, "Path", ""},
{PART_DRAW_OB, "OBJECT", 0, "Object", ""},
{PART_DRAW_GR, "GROUP", 0, "Group", ""},
{0, NULL, 0, NULL, NULL}
};
+#endif
#ifdef RNA_RUNTIME
@@ -261,7 +271,8 @@ static void rna_ParticleHairKey_co_object(HairKey *hairkey, Object *object, Part
}
}
-static void rna_Particle_uv_on_emitter(ParticleData *particle, ParticleSystemModifierData *modifier, float n_uv[2])
+static void rna_Particle_uv_on_emitter(ParticleData *particle, ReportList *reports,
+ ParticleSystemModifierData *modifier, float r_uv[2])
{
/*psys_particle_on_emitter(psmd, part->from, pa->num, pa->num_dmcache, pa->fuv, pa->foffset, co, nor, 0, 0, sd.orco, 0);*/
@@ -269,28 +280,39 @@ static void rna_Particle_uv_on_emitter(ParticleData *particle, ParticleSystemMod
int num = particle->num_dmcache;
int from = modifier->psys->part->from;
+ if (!CustomData_has_layer(&modifier->dm->loopData, CD_MLOOPUV)) {
+ BKE_report(reports, RPT_ERROR, "Mesh has no UV data");
+ return;
+ }
+ DM_ensure_tessface(modifier->dm); /* BMESH - UNTIL MODIFIER IS UPDATED FOR MPoly */
+
if (num == DMCACHE_NOTFOUND)
if (particle->num < modifier->dm->getNumTessFaces(modifier->dm))
num = particle->num;
/* get uvco */
- if (n_uv && ELEM(from, PART_FROM_FACE, PART_FROM_VOLUME)) {
+ if (r_uv && ELEM(from, PART_FROM_FACE, PART_FROM_VOLUME)) {
if (num != DMCACHE_NOTFOUND) {
- MFace *mface = modifier->dm->getTessFaceData(modifier->dm, num, CD_MFACE);
- MTFace *mtface = (MTFace *)CustomData_get_layer_n(&modifier->dm->faceData, CD_MTFACE, 0);
- mtface += num;
-
- psys_interpolate_uvs(mtface, mface->v4, particle->fuv, n_uv);
- }
- else {
- n_uv[0] = 0.0f;
- n_uv[1] = 0.0f;
+ MFace *mface;
+ MTFace *mtface;
+
+ mface = modifier->dm->getTessFaceData(modifier->dm, num, CD_MFACE);
+ mtface = (MTFace *)CustomData_get_layer_n(&modifier->dm->faceData, CD_MTFACE, 0);
+
+ if (mface && mtface) {
+ mtface += num;
+ psys_interpolate_uvs(mtface, mface->v4, particle->fuv, r_uv);
+ return;
+ }
}
}
+
+ r_uv[0] = 0.0f;
+ r_uv[1] = 0.0f;
}
-static void rna_ParticleSystem_co_hair(ParticleSystem *particlesystem, Object *object, ParticleSystemModifierData *modifier,
+static void rna_ParticleSystem_co_hair(ParticleSystem *particlesystem, Object *object,
int particle_no, int step, float n_co[3])
{
ParticleSettings *part = 0;
@@ -368,14 +390,22 @@ static void rna_ParticleSystem_co_hair(ParticleSystem *particlesystem, Object *o
}
-static void rna_ParticleSystem_uv_on_emitter(ParticleSystem *particlesystem, ParticleSystemModifierData *modifier, ParticleData *particle, int particle_no, int uv_no,
- float n_uv[2])
+static void rna_ParticleSystem_uv_on_emitter(ParticleSystem *particlesystem, ReportList *reports,
+ ParticleSystemModifierData *modifier, ParticleData *particle,
+ int particle_no, int uv_no,
+ float r_uv[2])
{
ParticleSettings *part = 0;
int totpart;
int totchild = 0;
int num;
+ if (!CustomData_has_layer(&modifier->dm->loopData, CD_MLOOPUV)) {
+ BKE_report(reports, RPT_ERROR, "Mesh has no UV data");
+ return;
+ }
+ DM_ensure_tessface(modifier->dm); /* BMESH - UNTIL MODIFIER IS UPDATED FOR MPoly */
+
/* 1. check that everything is ok & updated */
if (particlesystem == NULL)
return;
@@ -409,17 +439,17 @@ static void rna_ParticleSystem_uv_on_emitter(ParticleSystem *particlesystem, Par
if (particle->num < modifier->dm->getNumTessFaces(modifier->dm))
num = particle->num;
- if (n_uv && ELEM(part->from, PART_FROM_FACE, PART_FROM_VOLUME)) {
+ if (r_uv && ELEM(part->from, PART_FROM_FACE, PART_FROM_VOLUME)) {
if (num != DMCACHE_NOTFOUND) {
MFace *mface = modifier->dm->getTessFaceData(modifier->dm, num, CD_MFACE);
MTFace *mtface = (MTFace *)CustomData_get_layer_n(&modifier->dm->faceData, CD_MTFACE, uv_no);
mtface += num;
- psys_interpolate_uvs(mtface, mface->v4, particle->fuv, n_uv);
+ psys_interpolate_uvs(mtface, mface->v4, particle->fuv, r_uv);
}
else {
- n_uv[0] = 0.0f;
- n_uv[1] = 0.0f;
+ r_uv[0] = 0.0f;
+ r_uv[1] = 0.0f;
}
}
}
@@ -430,17 +460,17 @@ static void rna_ParticleSystem_uv_on_emitter(ParticleSystem *particlesystem, Par
/* get uvco & mcol */
if (part->childtype == PART_CHILD_FACES) {
- if (n_uv && ELEM(PART_FROM_FACE, PART_FROM_FACE, PART_FROM_VOLUME)) {
+ if (r_uv && ELEM(PART_FROM_FACE, PART_FROM_FACE, PART_FROM_VOLUME)) {
if (cpa->num != DMCACHE_NOTFOUND) {
MFace *mface = modifier->dm->getTessFaceData(modifier->dm, cpa->num, CD_MFACE);
MTFace *mtface = (MTFace *)CustomData_get_layer_n(&modifier->dm->faceData, CD_MTFACE, uv_no);
mtface += cpa->num;
- psys_interpolate_uvs(mtface, mface->v4, cpa->fuv, n_uv);
+ psys_interpolate_uvs(mtface, mface->v4, cpa->fuv, r_uv);
}
else {
- n_uv[0] = 0.0f;
- n_uv[1] = 0.0f;
+ r_uv[0] = 0.0f;
+ r_uv[1] = 0.0f;
}
}
}
@@ -452,17 +482,17 @@ static void rna_ParticleSystem_uv_on_emitter(ParticleSystem *particlesystem, Par
if (parent->num < modifier->dm->getNumTessFaces(modifier->dm))
num = parent->num;
- if (n_uv && ELEM(part->from, PART_FROM_FACE, PART_FROM_VOLUME)) {
+ if (r_uv && ELEM(part->from, PART_FROM_FACE, PART_FROM_VOLUME)) {
if (num != DMCACHE_NOTFOUND) {
MFace *mface = modifier->dm->getTessFaceData(modifier->dm, num, CD_MFACE);
MTFace *mtface = (MTFace *)CustomData_get_layer_n(&modifier->dm->faceData, CD_MTFACE, uv_no);
mtface += num;
- psys_interpolate_uvs(mtface, mface->v4, parent->fuv, n_uv);
+ psys_interpolate_uvs(mtface, mface->v4, parent->fuv, r_uv);
}
else {
- n_uv[0] = 0.0f;
- n_uv[1] = 0.0f;
+ r_uv[0] = 0.0f;
+ r_uv[1] = 0.0f;
}
}
}
@@ -832,7 +862,8 @@ static float rna_PartSetting_linelentail_get(struct PointerRNA *ptr)
ParticleSettings *settings = (ParticleSettings *)ptr->data;
return settings->draw_line[0];
}
-static void rna_PartSetting_pathstartend_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
+static void rna_PartSetting_pathstartend_range(PointerRNA *ptr, float *min, float *max,
+ float *UNUSED(softmin), float *UNUSED(softmax))
{
ParticleSettings *settings = (ParticleSettings *)ptr->data;
@@ -889,7 +920,7 @@ static PointerRNA rna_ParticleSystem_active_particle_target_get(PointerRNA *ptr)
return rna_pointer_inherit_refine(ptr, &RNA_ParticleTarget, NULL);
}
static void rna_ParticleSystem_active_particle_target_index_range(PointerRNA *ptr, int *min, int *max,
- int *softmin, int *softmax)
+ int *UNUSED(softmin), int *UNUSED(softmax))
{
ParticleSystem *psys = (ParticleSystem *)ptr->data;
*min = 0;
@@ -1011,7 +1042,8 @@ static PointerRNA rna_ParticleDupliWeight_active_get(PointerRNA *ptr)
}
return rna_pointer_inherit_refine(ptr, &RNA_ParticleTarget, NULL);
}
-static void rna_ParticleDupliWeight_active_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
+static void rna_ParticleDupliWeight_active_index_range(PointerRNA *ptr, int *min, int *max,
+ int *UNUSED(softmin), int *UNUSED(softmax))
{
ParticleSettings *part = (ParticleSettings *)ptr->id.data;
*min = 0;
@@ -1284,8 +1316,11 @@ static void rna_def_particle_hair_key(BlenderRNA *brna)
RNA_def_function_ui_description(func, "Obtain hairkey location with particle and modifier data");
prop = RNA_def_pointer(func, "object", "Object", "", "Object");
+ RNA_def_property_flag(prop, PROP_REQUIRED | PROP_NEVER_NULL);
prop = RNA_def_pointer(func, "modifier", "ParticleSystemModifier", "", "Particle modifier");
+ RNA_def_property_flag(prop, PROP_REQUIRED | PROP_NEVER_NULL);
prop = RNA_def_pointer(func, "particle", "Particle", "", "hair particle");
+ RNA_def_property_flag(prop, PROP_REQUIRED | PROP_NEVER_NULL);
prop = RNA_def_float_vector(func, "co", 3, NULL, -FLT_MAX, FLT_MAX, "Co",
"Exported hairkey location", -1e4, 1e4);
@@ -1451,7 +1486,9 @@ static void rna_def_particle(BlenderRNA *brna)
/* UVs */
func = RNA_def_function(srna, "uv_on_emitter", "rna_Particle_uv_on_emitter");
RNA_def_function_ui_description(func, "Obtain uv for particle on derived mesh");
+ RNA_def_function_flag(func, FUNC_USE_REPORTS);
prop = RNA_def_pointer(func, "modifier", "ParticleSystemModifier", "", "Particle modifier");
+ RNA_def_property_flag(prop, PROP_REQUIRED | PROP_NEVER_NULL);
prop = RNA_def_property(func, "uv", PROP_FLOAT, PROP_COORDS);
RNA_def_property_array(prop, 2);
RNA_def_property_flag(prop, PROP_THICK_WRAP);
@@ -2681,7 +2718,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "brownfac");
RNA_def_property_range(prop, 0.0f, 200.0f);
RNA_def_property_ui_range(prop, 0, 20, 1, 3);
- RNA_def_property_ui_text(prop, "Brownian", "Amount of Brownian motion");
+ RNA_def_property_ui_text(prop, "Brownian", "Amount of random, erratic particle movement");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop = RNA_def_property(srna, "damping", PROP_FLOAT, PROP_NONE);
@@ -3378,7 +3415,7 @@ static void rna_def_particle_system(BlenderRNA *brna)
RNA_def_function_ui_description(func, "Obtain cache hair data");
prop = RNA_def_pointer(func, "object", "Object", "", "Object");
- prop = RNA_def_pointer(func, "modifier", "ParticleSystemModifier", "", "Particle modifier");
+ RNA_def_property_flag(prop, PROP_REQUIRED | PROP_NEVER_NULL);
prop = RNA_def_int(func, "particle_no", 0, INT_MIN, INT_MAX, "Particle no", "", INT_MIN, INT_MAX);
prop = RNA_def_int(func, "step", 0, INT_MIN, INT_MAX, "step no", "", INT_MIN, INT_MAX);
@@ -3390,8 +3427,11 @@ static void rna_def_particle_system(BlenderRNA *brna)
/* extract hair UVs */
func = RNA_def_function(srna, "uv_on_emitter", "rna_ParticleSystem_uv_on_emitter");
RNA_def_function_ui_description(func, "Obtain uv for all particles");
+ RNA_def_function_flag(func, FUNC_USE_REPORTS);
prop = RNA_def_pointer(func, "modifier", "ParticleSystemModifier", "", "Particle modifier");
+ RNA_def_property_flag(prop, PROP_REQUIRED | PROP_NEVER_NULL);
prop = RNA_def_pointer(func, "particle", "Particle", "", "Particle");
+ RNA_def_property_flag(prop, PROP_REQUIRED | PROP_NEVER_NULL);
prop = RNA_def_int(func, "particle_no", 0, INT_MIN, INT_MAX, "Particle no", "", INT_MIN, INT_MAX);
prop = RNA_def_int(func, "uv_no", 0, INT_MIN, INT_MAX, "UV no", "", INT_MIN, INT_MAX);
prop = RNA_def_property(func, "uv", PROP_FLOAT, PROP_COORDS);
@@ -3403,7 +3443,9 @@ static void rna_def_particle_system(BlenderRNA *brna)
func = RNA_def_function(srna, "mcol_on_emitter", "rna_ParticleSystem_mcol_on_emitter");
RNA_def_function_ui_description(func, "Obtain mcol for all particles");
prop = RNA_def_pointer(func, "modifier", "ParticleSystemModifier", "", "Particle modifier");
+ RNA_def_property_flag(prop, PROP_REQUIRED | PROP_NEVER_NULL);
prop = RNA_def_pointer(func, "particle", "Particle", "", "Particle");
+ RNA_def_property_flag(prop, PROP_REQUIRED | PROP_NEVER_NULL);
prop = RNA_def_int(func, "particle_no", 0, INT_MIN, INT_MAX, "Particle no", "", INT_MIN, INT_MAX);
prop = RNA_def_int(func, "vcol_no", 0, INT_MIN, INT_MAX, "vcol no", "", INT_MIN, INT_MAX);
prop = RNA_def_property(func, "mcol", PROP_FLOAT, PROP_COLOR);
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index 8c73aacc724..9c4e7f034cb 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -261,7 +261,7 @@ static int rna_PoseChannel_has_ik_get(PointerRNA *ptr)
Object *ob = (Object *)ptr->id.data;
bPoseChannel *pchan = (bPoseChannel *)ptr->data;
- return ED_pose_channel_in_IK_chain(ob, pchan);
+ return BKE_pose_channel_in_IK_chain(ob, pchan);
}
static StructRNA *rna_IKParam_refine(PointerRNA *ptr)
@@ -382,7 +382,8 @@ static void rna_PoseChannel_bone_group_index_set(PointerRNA *ptr, int value)
pchan->agrp_index = value + 1;
}
-static void rna_PoseChannel_bone_group_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
+static void rna_PoseChannel_bone_group_index_range(PointerRNA *ptr, int *min, int *max,
+ int *UNUSED(softmin), int *UNUSED(softmax))
{
Object *ob = (Object *)ptr->id.data;
bPose *pose = (ob) ? ob->pose : NULL;
@@ -415,7 +416,8 @@ static void rna_Pose_active_bone_group_index_set(PointerRNA *ptr, int value)
pose->active_group = value + 1;
}
-static void rna_Pose_active_bone_group_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
+static void rna_Pose_active_bone_group_index_range(PointerRNA *ptr, int *min, int *max,
+ int *UNUSED(softmin), int *UNUSED(softmax))
{
bPose *pose = (bPose *)ptr->data;
@@ -740,9 +742,7 @@ static void rna_def_pose_channel(BlenderRNA *brna)
static float default_quat[4] = {1, 0, 0, 0}; /* default quaternion values */
static float default_axisAngle[4] = {0, 0, 1, 0}; /* default axis-angle rotation values */
static float default_scale[3] = {1, 1, 1}; /* default scale values */
-
- const int matrix_dimsize[] = {4, 4};
-
+
StructRNA *srna;
PropertyRNA *prop;
@@ -839,13 +839,13 @@ static void rna_def_pose_channel(BlenderRNA *brna)
/* transform matrices - should be read-only since these are set directly by AnimSys evaluation */
prop = RNA_def_property(srna, "matrix_channel", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "chan_mat");
- RNA_def_property_multi_array(prop, 2, matrix_dimsize);
+ RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Channel Matrix", "4x4 matrix, before constraints");
/* writable because it touches loc/scale/rot directly */
prop = RNA_def_property(srna, "matrix_basis", PROP_FLOAT, PROP_MATRIX);
- RNA_def_property_multi_array(prop, 2, matrix_dimsize);
+ RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4);
RNA_def_property_ui_text(prop, "Basis Matrix",
"Alternative access to location/scale/rotation relative to the parent and own rest bone");
RNA_def_property_float_funcs(prop, "rna_PoseChannel_matrix_basis_get", "rna_PoseChannel_matrix_basis_set", NULL);
@@ -855,7 +855,7 @@ static void rna_def_pose_channel(BlenderRNA *brna)
/* final matrix */
prop = RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "pose_mat");
- RNA_def_property_multi_array(prop, 2, matrix_dimsize);
+ RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4);
RNA_def_property_float_funcs(prop, NULL, "rna_PoseChannel_matrix_set", NULL);
RNA_def_property_ui_text(prop, "Pose Matrix",
"Final 4x4 matrix after constraints and drivers are applied (object space)");
diff --git a/source/blender/makesrna/intern/rna_property.c b/source/blender/makesrna/intern/rna_property.c
index fc3697633a4..c6b8e89c282 100644
--- a/source/blender/makesrna/intern/rna_property.c
+++ b/source/blender/makesrna/intern/rna_property.c
@@ -27,11 +27,13 @@
#include <stdlib.h>
+#include "DNA_property_types.h"
+
#include "RNA_define.h"
+#include "RNA_enum_types.h"
#include "rna_internal.h"
-#include "DNA_property_types.h"
#include "WM_types.h"
diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c
index 82cdfcdd631..1cd27e27f01 100644
--- a/source/blender/makesrna/intern/rna_render.c
+++ b/source/blender/makesrna/intern/rna_render.c
@@ -49,6 +49,9 @@
#include "BKE_context.h"
#include "BKE_report.h"
+#include "IMB_colormanagement.h"
+#include "GPU_extensions.h"
+
/* RenderEngine Callbacks */
static void engine_tag_redraw(RenderEngine *engine)
@@ -61,6 +64,23 @@ static void engine_tag_update(RenderEngine *engine)
engine->flag |= RE_ENGINE_DO_UPDATE;
}
+static int engine_support_display_space_shader(RenderEngine *UNUSED(engine), Scene *scene)
+{
+ return IMB_colormanagement_support_glsl_draw(&scene->view_settings);
+}
+
+static void engine_bind_display_space_shader(RenderEngine *UNUSED(engine), Scene *scene)
+{
+ IMB_colormanagement_setup_glsl_draw(&scene->view_settings,
+ &scene->display_settings,
+ false);
+}
+
+static void engine_unbind_display_space_shader(RenderEngine *UNUSED(engine))
+{
+ IMB_colormanagement_finish_glsl_draw();
+}
+
static void engine_update(RenderEngine *engine, Main *bmain, Scene *scene)
{
extern FunctionRNA rna_RenderEngine_update_func;
@@ -342,14 +362,15 @@ static void rna_def_render_engine(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_RNAPTR);
/* tag for redraw */
- RNA_def_function(srna, "tag_redraw", "engine_tag_redraw");
+ func = RNA_def_function(srna, "tag_redraw", "engine_tag_redraw");
RNA_def_function_ui_description(func, "Request redraw for viewport rendering");
/* tag for update */
- RNA_def_function(srna, "tag_update", "engine_tag_update");
+ func = RNA_def_function(srna, "tag_update", "engine_tag_update");
RNA_def_function_ui_description(func, "Request update call for viewport rendering");
func = RNA_def_function(srna, "begin_result", "RE_engine_begin_result");
+ RNA_def_function_ui_description(func, "Create render result to write linear floating point render layers and passes");
prop = RNA_def_int(func, "x", 0, 0, INT_MAX, "X", "", 0, INT_MAX);
RNA_def_property_flag(prop, PROP_REQUIRED);
prop = RNA_def_int(func, "y", 0, 0, INT_MAX, "Y", "", 0, INT_MAX);
@@ -363,39 +384,61 @@ static void rna_def_render_engine(BlenderRNA *brna)
RNA_def_function_return(func, prop);
func = RNA_def_function(srna, "update_result", "RE_engine_update_result");
+ RNA_def_function_ui_description(func, "Signal that pixels have been updated and can be redrawn in the user interface");
prop = RNA_def_pointer(func, "result", "RenderResult", "Result", "");
RNA_def_property_flag(prop, PROP_REQUIRED);
func = RNA_def_function(srna, "end_result", "RE_engine_end_result");
+ RNA_def_function_ui_description(func, "All pixels in the render result have been set and are final");
prop = RNA_def_pointer(func, "result", "RenderResult", "Result", "");
RNA_def_property_flag(prop, PROP_REQUIRED);
RNA_def_boolean(func, "cancel", 0, "Cancel", "Don't merge back results");
func = RNA_def_function(srna, "test_break", "RE_engine_test_break");
+ RNA_def_function_ui_description(func, "Test if the render operation should been canceled, this is a fast call that should be used regularly for responsiveness");
prop = RNA_def_boolean(func, "do_break", 0, "Break", "");
RNA_def_function_return(func, prop);
func = RNA_def_function(srna, "update_stats", "RE_engine_update_stats");
+ RNA_def_function_ui_description(func, "Update and signal to redraw render status text");
prop = RNA_def_string(func, "stats", "", 0, "Stats", "");
RNA_def_property_flag(prop, PROP_REQUIRED);
prop = RNA_def_string(func, "info", "", 0, "Info", "");
RNA_def_property_flag(prop, PROP_REQUIRED);
func = RNA_def_function(srna, "update_progress", "RE_engine_update_progress");
+ RNA_def_function_ui_description(func, "Update progress percentage of render");
prop = RNA_def_float(func, "progress", 0, 0.0f, 1.0f, "", "Percentage of render that's done", 0.0f, 1.0f);
RNA_def_property_flag(prop, PROP_REQUIRED);
func = RNA_def_function(srna, "update_memory_stats", "RE_engine_update_memory_stats");
+ RNA_def_function_ui_description(func, "Update memory usage statistics");
RNA_def_float(func, "memory_used", 0, 0.0f, FLT_MAX, "", "Current memory usage in megabytes", 0.0f, FLT_MAX);
RNA_def_float(func, "memory_peak", 0, 0.0f, FLT_MAX, "", "Peak memory usage in megabytes", 0.0f, FLT_MAX);
RNA_def_property_flag(prop, PROP_REQUIRED);
func = RNA_def_function(srna, "report", "RE_engine_report");
+ RNA_def_function_ui_description(func, "Report info, warning or error messages");
prop = RNA_def_enum_flag(func, "type", wm_report_items, 0, "Type", "");
RNA_def_property_flag(prop, PROP_REQUIRED);
prop = RNA_def_string(func, "message", "", 0, "Report Message", "");
RNA_def_property_flag(prop, PROP_REQUIRED);
+ func = RNA_def_function(srna, "bind_display_space_shader", "engine_bind_display_space_shader");
+ RNA_def_function_ui_description(func, "Bind GLSL fragment shader that converts linear colors to display space colors using scene color management settings");
+ prop = RNA_def_pointer(func, "scene", "Scene", "", "");
+ RNA_def_property_flag(prop, PROP_REQUIRED);
+
+ func = RNA_def_function(srna, "unbind_display_space_shader", "engine_unbind_display_space_shader");
+ RNA_def_function_ui_description(func, "Unbind GLSL display space shader, must always be called after binding the shader");
+
+ func = RNA_def_function(srna, "support_display_space_shader", "engine_support_display_space_shader");
+ RNA_def_function_ui_description(func, "Test if GLSL display space shader is supported for the combination of graphics card and scene settings");
+ prop = RNA_def_pointer(func, "scene", "Scene", "", "");
+ RNA_def_property_flag(prop, PROP_REQUIRED);
+ prop = RNA_def_boolean(func, "supported", 0, "Supported", "");
+ RNA_def_function_return(func, prop);
+
RNA_define_verify_sdna(0);
prop = RNA_def_property(srna, "is_animation", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_rigidbody.c b/source/blender/makesrna/intern/rna_rigidbody.c
index a4e02d6e835..cc14e60f45a 100644
--- a/source/blender/makesrna/intern/rna_rigidbody.c
+++ b/source/blender/makesrna/intern/rna_rigidbody.c
@@ -29,6 +29,7 @@
#include <string.h>
#include "RNA_define.h"
+#include "RNA_enum_types.h"
#include "rna_internal.h"
@@ -95,14 +96,14 @@ EnumPropertyItem rigidbody_constraint_type_items[] = {
/* ******************************** */
-static void rna_RigidBodyWorld_reset(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_RigidBodyWorld_reset(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
RigidBodyWorld *rbw = (RigidBodyWorld *)ptr->data;
BKE_rigidbody_cache_reset(rbw);
}
-static char *rna_RigidBodyWorld_path(PointerRNA *ptr)
+static char *rna_RigidBodyWorld_path(PointerRNA *UNUSED(ptr))
{
return BLI_sprintfN("rigidbody_world");
}
@@ -135,14 +136,14 @@ static void rna_RigidBodyWorld_split_impulse_set(PointerRNA *ptr, int value)
/* ******************************** */
-static void rna_RigidBodyOb_reset(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_RigidBodyOb_reset(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
{
RigidBodyWorld *rbw = scene->rigidbody_world;
BKE_rigidbody_cache_reset(rbw);
}
-static void rna_RigidBodyOb_shape_reset(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_RigidBodyOb_shape_reset(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
{
RigidBodyWorld *rbw = scene->rigidbody_world;
RigidBodyOb *rbo = (RigidBodyOb *)ptr->data;
@@ -152,7 +153,7 @@ static void rna_RigidBodyOb_shape_reset(Main *bmain, Scene *scene, PointerRNA *p
rbo->flag |= RBO_FLAG_NEEDS_RESHAPE;
}
-static char *rna_RigidBodyOb_path(PointerRNA *ptr)
+static char *rna_RigidBodyOb_path(PointerRNA *UNUSED(ptr))
{
/* NOTE: this hardcoded path should work as long as only Objects have this */
return BLI_sprintfN("rigid_body");
@@ -166,6 +167,14 @@ static void rna_RigidBodyOb_type_set(PointerRNA *ptr, int value)
rbo->flag |= RBO_FLAG_NEEDS_VALIDATE;
}
+static void rna_RigidBodyOb_shape_set(PointerRNA *ptr, int value)
+{
+ RigidBodyOb *rbo = (RigidBodyOb *)ptr->data;
+
+ rbo->shape = value;
+ rbo->flag |= RBO_FLAG_NEEDS_VALIDATE;
+}
+
static void rna_RigidBodyOb_disabled_set(PointerRNA *ptr, int value)
{
RigidBodyOb *rbo = (RigidBodyOb *)ptr->data;
@@ -334,7 +343,7 @@ static void rna_RigidBodyOb_angular_damping_set(PointerRNA *ptr, float value)
#endif
}
-static char *rna_RigidBodyCon_path(PointerRNA *ptr)
+static char *rna_RigidBodyCon_path(PointerRNA *UNUSED(ptr))
{
/* NOTE: this hardcoded path should work as long as only Objects have this */
return BLI_sprintfN("rigid_body_constraint");
@@ -595,13 +604,17 @@ static void rna_RigidBodyCon_motor_ang_target_velocity_set(PointerRNA *ptr, floa
}
/* Sweep test */
-static void rna_RigidBodyWorld_convex_sweep_test(RigidBodyWorld *rbw, ReportList *reports, Object *object, float ray_start[3], float ray_end[3], float r_location[3], float r_hitpoint[3], float r_normal[3], int *r_hit)
+static void rna_RigidBodyWorld_convex_sweep_test(
+ RigidBodyWorld *rbw, ReportList *reports,
+ Object *object, float ray_start[3], float ray_end[3],
+ float r_location[3], float r_hitpoint[3], float r_normal[3], int *r_hit)
{
#ifdef WITH_BULLET
RigidBodyOb *rob = object->rigidbody_object;
if (rbw->physics_world != NULL && rob->physics_object != NULL) {
- RB_world_convex_sweep_test(rbw->physics_world, rob->physics_object, ray_start, ray_end, r_location, r_hitpoint, r_normal, r_hit);
+ RB_world_convex_sweep_test(rbw->physics_world, rob->physics_object, ray_start, ray_end,
+ r_location, r_hitpoint, r_normal, r_hit);
if (*r_hit == -2) {
BKE_report(reports, RPT_ERROR,
"A non convex collision shape was passed to the function, use only convex collision shapes");
@@ -611,6 +624,9 @@ static void rna_RigidBodyWorld_convex_sweep_test(RigidBodyWorld *rbw, ReportList
*r_hit = -1;
BKE_report(reports, RPT_ERROR, "Rigidbody world was not properly initialized, need to step the simulation first");
}
+#else
+ (void)rbw, (void)reports, (void)object, (void)ray_start, (void)ray_end;
+ (void)r_location, (void)r_hitpoint, (void)r_normal, (void)r_hit;
#endif
}
@@ -763,6 +779,7 @@ static void rna_def_rigidbody_object(BlenderRNA *brna)
prop = RNA_def_property(srna, "collision_shape", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "shape");
RNA_def_property_enum_items(prop, rigidbody_object_shape_items);
+ RNA_def_property_enum_funcs(prop, NULL, "rna_RigidBodyOb_shape_set", NULL);
RNA_def_property_ui_text(prop, "Collision Shape", "Collision Shape of object in Rigid Body Simulations");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, NC_OBJECT | ND_POINTCACHE, "rna_RigidBodyOb_reset");
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index 67fc3056485..380bde90ff9 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -566,6 +566,12 @@ static int rna_Property_is_required_get(PointerRNA *ptr)
return prop->flag & PROP_REQUIRED ? 1 : 0;
}
+static int rna_Property_is_argument_optional_get(PointerRNA *ptr)
+{
+ PropertyRNA *prop = (PropertyRNA *)ptr->data;
+ return prop->flag & PROP_PYFUNC_OPTIONAL ? 1 : 0;
+}
+
static int rna_Property_is_never_none_get(PointerRNA *ptr)
{
PropertyRNA *prop = (PropertyRNA *)ptr->data;
@@ -1171,6 +1177,12 @@ static void rna_def_property(BlenderRNA *brna)
RNA_def_property_boolean_funcs(prop, "rna_Property_is_required_get", NULL);
RNA_def_property_ui_text(prop, "Required", "False when this property is an optional argument in an RNA function");
+ prop = RNA_def_property(srna, "is_argument_optional", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_boolean_funcs(prop, "rna_Property_is_argument_optional_get", NULL);
+ RNA_def_property_ui_text(prop, "Optional Argument",
+ "True when the property is optional in a Python function implementing an RNA function");
+
prop = RNA_def_property(srna, "is_never_none", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Property_is_never_none_get", NULL);
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 83dbd79024e..476f92b77da 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -219,7 +219,6 @@ EnumPropertyItem snap_uv_element_items[] = {
# define R_IMF_ENUM_TIFF
#endif
-
#define IMAGE_TYPE_ITEMS_IMAGE_ONLY \
R_IMF_ENUM_BMP \
/* DDS save not supported yet R_IMF_ENUM_DDS */ \
@@ -487,7 +486,11 @@ static void rna_Scene_view3d_update(Main *bmain, Scene *UNUSED(scene_unused), Po
static void rna_Scene_layer_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
rna_Scene_view3d_update(bmain, scene, ptr);
- DAG_on_visible_update(bmain, FALSE);
+ /* XXX We would need do_time=true here, else we can have update issues like [#36289]...
+ * However, this has too much drawbacks (like slower layer switch, undesired updates...).
+ * That's TODO for future DAG updates.
+ */
+ DAG_on_visible_update(bmain, false);
}
static void rna_Scene_fps_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
@@ -777,7 +780,7 @@ static void rna_ImageFormatSettings_file_format_set(PointerRNA *ptr, int value)
}
}
-static EnumPropertyItem *rna_ImageFormatSettings_file_format_itemf(bContext *C, PointerRNA *ptr,
+static EnumPropertyItem *rna_ImageFormatSettings_file_format_itemf(bContext *UNUSED(C), PointerRNA *ptr,
PropertyRNA *UNUSED(prop), int *UNUSED(free))
{
ID *id = ptr->id.data;
@@ -789,7 +792,7 @@ static EnumPropertyItem *rna_ImageFormatSettings_file_format_itemf(bContext *C,
}
}
-static EnumPropertyItem *rna_ImageFormatSettings_color_mode_itemf(bContext *C, PointerRNA *ptr,
+static EnumPropertyItem *rna_ImageFormatSettings_color_mode_itemf(bContext *UNUSED(C), PointerRNA *ptr,
PropertyRNA *UNUSED(prop), int *free)
{
ImageFormatData *imf = (ImageFormatData *)ptr->data;
@@ -834,7 +837,7 @@ static EnumPropertyItem *rna_ImageFormatSettings_color_mode_itemf(bContext *C, P
}
}
-static EnumPropertyItem *rna_ImageFormatSettings_color_depth_itemf(bContext *C, PointerRNA *ptr,
+static EnumPropertyItem *rna_ImageFormatSettings_color_depth_itemf(bContext *UNUSED(C), PointerRNA *ptr,
PropertyRNA *UNUSED(prop), int *free)
{
ImageFormatData *imf = (ImageFormatData *)ptr->data;
@@ -928,7 +931,7 @@ static void rna_RenderSettings_qtcodecsettings_codecType_set(PointerRNA *ptr, in
settings->codecType = quicktime_videocodecType_from_rnatmpvalue(value);
}
-static EnumPropertyItem *rna_RenderSettings_qtcodecsettings_codecType_itemf(bContext *C, PointerRNA *ptr,
+static EnumPropertyItem *rna_RenderSettings_qtcodecsettings_codecType_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr),
PropertyRNA *UNUSED(prop), int *free)
{
EnumPropertyItem *item = NULL;
@@ -967,7 +970,7 @@ static void rna_RenderSettings_qtcodecsettings_audiocodecType_set(PointerRNA *pt
settings->audiocodecType = quicktime_audiocodecType_from_rnatmpvalue(value);
}
-static EnumPropertyItem *rna_RenderSettings_qtcodecsettings_audiocodecType_itemf(bContext *C, PointerRNA *ptr,
+static EnumPropertyItem *rna_RenderSettings_qtcodecsettings_audiocodecType_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr),
PropertyRNA *UNUSED(prop), int *free)
{
EnumPropertyItem *item = NULL;
@@ -1028,7 +1031,8 @@ static void rna_RenderSettings_active_layer_index_set(PointerRNA *ptr, int value
rd->actlay = value;
}
-static void rna_RenderSettings_active_layer_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
+static void rna_RenderSettings_active_layer_index_range(PointerRNA *ptr, int *min, int *max,
+ int *UNUSED(softmin), int *UNUSED(softmax))
{
RenderData *rd = (RenderData *)ptr->data;
@@ -1309,7 +1313,7 @@ static void rna_Scene_simplify_update(Main *bmain, Scene *UNUSED(scene), Pointer
rna_Scene_use_simplify_update(bmain, sce, ptr);
}
-static void rna_Scene_use_persistent_data_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
+static void rna_Scene_use_persistent_data_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
Scene *sce = ptr->id.data;
@@ -1439,6 +1443,12 @@ static KeyingSet *rna_Scene_keying_set_new(Scene *sce, ReportList *reports, cons
}
}
+static void rna_UnifiedPaintSettings_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
+{
+ Brush *br = BKE_paint_brush(BKE_paint_get_active(scene));
+ WM_main_add_notifier(NC_BRUSH | NA_EDITED, br);
+}
+
static void rna_UnifiedPaintSettings_size_set(PointerRNA *ptr, int value)
{
UnifiedPaintSettings *ups = ptr->data;
@@ -1460,11 +1470,12 @@ static void rna_UnifiedPaintSettings_unprojected_radius_set(PointerRNA *ptr, flo
static void rna_UnifiedPaintSettings_radius_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- /* changing the unified size should invalidate */
+ /* changing the unified size should invalidate the overlay but also update the brush */
BKE_paint_invalidate_overlay_all();
+ rna_UnifiedPaintSettings_update(bmain, scene, ptr);
}
-static char *rna_UnifiedPaintSettings_path(PointerRNA *ptr)
+static char *rna_UnifiedPaintSettings_path(PointerRNA *UNUSED(ptr))
{
return BLI_strdup("tool_settings.unified_paint_settings");
}
@@ -1486,7 +1497,7 @@ static void rna_EditMesh_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *U
}
}
-static char *rna_MeshStatVis_path(PointerRNA *ptr)
+static char *rna_MeshStatVis_path(PointerRNA *UNUSED(ptr))
{
return BLI_strdup("tool_settings.statvis");
}
@@ -1520,7 +1531,7 @@ static void rna_SceneSequencer_update(Main *UNUSED(bmain), Scene *UNUSED(scene),
BKE_sequencer_preprocessed_cache_cleanup();
}
-static char *rna_ToolSettings_path(PointerRNA *ptr)
+static char *rna_ToolSettings_path(PointerRNA *UNUSED(ptr))
{
return BLI_strdup("tool_settings");
}
@@ -1536,7 +1547,8 @@ static void rna_FreestyleLineSet_linestyle_set(PointerRNA *ptr, PointerRNA value
{
FreestyleLineSet *lineset = (FreestyleLineSet *)ptr->data;
- lineset->linestyle->id.us--;
+ if (lineset->linestyle)
+ lineset->linestyle->id.us--;
lineset->linestyle = (FreestyleLineStyle *)value.data;
lineset->linestyle->id.us++;
}
@@ -1549,7 +1561,7 @@ static PointerRNA rna_FreestyleSettings_active_lineset_get(PointerRNA *ptr)
}
static void rna_FreestyleSettings_active_lineset_index_range(PointerRNA *ptr, int *min, int *max,
- int *softmin, int *softmax)
+ int *UNUSED(softmin), int *UNUSED(softmax))
{
FreestyleConfig *config = (FreestyleConfig *)ptr->data;
@@ -1575,14 +1587,12 @@ static void rna_def_transform_orientation(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
-
- const int matrix_dimsize[] = {3, 3};
srna = RNA_def_struct(brna, "TransformOrientation", NULL);
prop = RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "mat");
- RNA_def_property_multi_array(prop, 2, matrix_dimsize);
+ RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_3x3);
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
@@ -2033,6 +2043,7 @@ static void rna_def_unified_paint_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3);
RNA_def_property_ui_text(prop, "Strength", "How powerful the effect of the brush is when applied");
+ RNA_def_property_update(prop, 0, "rna_UnifiedPaintSettings_update");
prop = RNA_def_property(srna, "weight", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "weight");
@@ -2040,6 +2051,7 @@ static void rna_def_unified_paint_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3);
RNA_def_property_ui_text(prop, "Weight", "Weight to assign in vertex groups");
+ RNA_def_property_update(prop, 0, "rna_UnifiedPaintSettings_update");
prop = RNA_def_property(srna, "use_pressure_size", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_BRUSH_SIZE_PRESSURE);
@@ -2067,8 +2079,8 @@ static void rna_def_statvis(BlenderRNA *brna)
{SCE_STATVIS_OVERHANG, "OVERHANG", 0, "Overhang", ""},
{SCE_STATVIS_THICKNESS, "THICKNESS", 0, "Thickness", ""},
{SCE_STATVIS_INTERSECT, "INTERSECT", 0, "Intersect", ""},
- {SCE_STATVIS_DISTORT, "DISTORT", 0, "Distort", ""},
- {SCE_STATVIS_SHARP, "SHARP", 0, "Sharp", ""},
+ {SCE_STATVIS_DISTORT, "DISTORT", 0, "Distortion", ""},
+ {SCE_STATVIS_SHARP, "SHARP", 0, "Sharp", ""},
{0, NULL, 0, NULL, NULL}};
srna = RNA_def_struct(brna, "MeshStatVis", NULL);
@@ -2690,202 +2702,202 @@ static void rna_def_freestyle_settings(BlenderRNA *brna)
RNA_def_property_pointer_funcs(prop, "rna_FreestyleLineSet_linestyle_get",
"rna_FreestyleLineSet_linestyle_set", NULL, NULL);
RNA_def_property_ui_text(prop, "Line Style", "Line style settings");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Line Set Name", "Line set name");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
RNA_def_struct_name_property(srna, prop);
prop = RNA_def_property(srna, "show_render", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_LINESET_ENABLED);
RNA_def_property_ui_text(prop, "Render", "Enable or disable this line set during stroke rendering");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "select_by_visibility", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "selection", FREESTYLE_SEL_VISIBILITY);
RNA_def_property_ui_text(prop, "Selection by Visibility", "Select feature edges based on visibility");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "select_by_edge_types", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "selection", FREESTYLE_SEL_EDGE_TYPES);
RNA_def_property_ui_text(prop, "Selection by Edge Types", "Select feature edges based on edge types");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "select_by_group", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "selection", FREESTYLE_SEL_GROUP);
RNA_def_property_ui_text(prop, "Selection by Group", "Select feature edges based on a group of objects");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "select_by_image_border", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "selection", FREESTYLE_SEL_IMAGE_BORDER);
RNA_def_property_ui_text(prop, "Selection by Image Border",
"Select feature edges by image border (less memory consumption)");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "select_by_face_marks", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "selection", FREESTYLE_SEL_FACE_MARK);
RNA_def_property_ui_text(prop, "Selection by Face Marks", "Select feature edges by face marks");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "edge_type_negation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags");
RNA_def_property_enum_items(prop, edge_type_negation_items);
RNA_def_property_ui_text(prop, "Edge Type Negation",
"Set the negation operation for conditions on feature edge types");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "edge_type_combination", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags");
RNA_def_property_enum_items(prop, edge_type_combination_items);
RNA_def_property_ui_text(prop, "Edge Type Combination",
"Set the combination operation for conditions on feature edge types");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "group", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "group");
RNA_def_property_struct_type(prop, "Group");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Group", "A group of objects based on which feature edges are selected");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "group_negation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags");
RNA_def_property_enum_items(prop, group_negation_items);
RNA_def_property_ui_text(prop, "Group Negation",
"Set the negation operation for conditions on feature edge types");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "face_mark_negation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags");
RNA_def_property_enum_items(prop, face_mark_negation_items);
RNA_def_property_ui_text(prop, "Face Mark Negation",
"Set the negation operation for the condition on face marks");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "face_mark_condition", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags");
RNA_def_property_enum_items(prop, face_mark_condition_items);
RNA_def_property_ui_text(prop, "Face Mark Condition", "Set a feature edge selection condition on face marks");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "select_silhouette", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_SILHOUETTE);
RNA_def_property_ui_text(prop, "Silhouette", "Select silhouette edges");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "select_border", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_BORDER);
RNA_def_property_ui_text(prop, "Border", "Select border edges");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "select_crease", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_CREASE);
RNA_def_property_ui_text(prop, "Crease", "Select crease edges");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "select_ridge_valley", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_RIDGE_VALLEY);
RNA_def_property_ui_text(prop, "Ridge & Valley", "Select ridges and valleys");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "select_suggestive_contour", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_SUGGESTIVE_CONTOUR);
RNA_def_property_ui_text(prop, "Suggestive Contour", "Select suggestive contours");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "select_material_boundary", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_MATERIAL_BOUNDARY);
RNA_def_property_ui_text(prop, "Material Boundary", "Select edges at material boundaries");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "select_contour", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_CONTOUR);
RNA_def_property_ui_text(prop, "Contour", "Select contours");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "select_external_contour", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_EXTERNAL_CONTOUR);
RNA_def_property_ui_text(prop, "External Contour", "Select external contours");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "select_edge_mark", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_EDGE_MARK);
RNA_def_property_ui_text(prop, "Edge Mark", "Select edge marks");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "exclude_silhouette", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_SILHOUETTE);
RNA_def_property_ui_text(prop, "Silhouette", "Exclude silhouette edges");
RNA_def_property_ui_icon(prop, ICON_X, 0);
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "exclude_border", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_BORDER);
RNA_def_property_ui_text(prop, "Border", "Exclude border edges");
RNA_def_property_ui_icon(prop, ICON_X, 0);
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "exclude_crease", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_CREASE);
RNA_def_property_ui_text(prop, "Crease", "Exclude crease edges");
RNA_def_property_ui_icon(prop, ICON_X, 0);
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "exclude_ridge_valley", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_RIDGE_VALLEY);
RNA_def_property_ui_text(prop, "Ridge & Valley", "Exclude ridges and valleys");
RNA_def_property_ui_icon(prop, ICON_X, 0);
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "exclude_suggestive_contour", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_SUGGESTIVE_CONTOUR);
RNA_def_property_ui_text(prop, "Suggestive Contour", "Exclude suggestive contours");
RNA_def_property_ui_icon(prop, ICON_X, 0);
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "exclude_material_boundary", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_MATERIAL_BOUNDARY);
RNA_def_property_ui_text(prop, "Material Boundary", "Exclude edges at material boundaries");
RNA_def_property_ui_icon(prop, ICON_X, 0);
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "exclude_contour", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_CONTOUR);
RNA_def_property_ui_text(prop, "Contour", "Exclude contours");
RNA_def_property_ui_icon(prop, ICON_X, 0);
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "exclude_external_contour", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_EXTERNAL_CONTOUR);
RNA_def_property_ui_text(prop, "External Contour", "Exclude external contours");
RNA_def_property_ui_icon(prop, ICON_X, 0);
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "exclude_edge_mark", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_EDGE_MARK);
RNA_def_property_ui_text(prop, "Edge Mark", "Exclude edge marks");
RNA_def_property_ui_icon(prop, ICON_X, 0);
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "visibility", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "qi");
RNA_def_property_enum_items(prop, visibility_items);
RNA_def_property_ui_text(prop, "Visibility", "Determine how to use visibility for feature edge selection");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "qi_start", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "qi_start");
RNA_def_property_range(prop, 0, INT_MAX);
RNA_def_property_ui_text(prop, "Start", "First QI value of the QI range");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "qi_end", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "qi_end");
RNA_def_property_range(prop, 0, INT_MAX);
RNA_def_property_ui_text(prop, "End", "Last QI value of the QI range");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
/* FreestyleModuleSettings */
@@ -2897,12 +2909,12 @@ static void rna_def_freestyle_settings(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "Text");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Style Module", "Python script to define a style module");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "is_displayed", 1);
RNA_def_property_ui_text(prop, "Use", "Enable or disable this style module during stroke rendering");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
/* FreestyleSettings */
@@ -2920,62 +2932,62 @@ static void rna_def_freestyle_settings(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, freestyle_ui_mode_items);
RNA_def_property_ui_text(prop, "Control Mode", "Select the Freestyle control mode");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "raycasting_algorithm", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "raycasting_algorithm");
RNA_def_property_enum_items(prop, freestyle_raycasting_algorithm_items);
RNA_def_property_ui_text(prop, "Raycasting Algorithm", "Select the Freestyle raycasting algorithm");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_culling", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_CULLING);
RNA_def_property_ui_text(prop, "Culling", "If enabled, out-of-view edges are ignored");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_suggestive_contours", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_SUGGESTIVE_CONTOURS_FLAG);
RNA_def_property_ui_text(prop, "Suggestive Contours", "Enable suggestive contours");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_ridges_and_valleys", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_RIDGES_AND_VALLEYS_FLAG);
RNA_def_property_ui_text(prop, "Ridges and Valleys", "Enable ridges and valleys");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_material_boundaries", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_MATERIAL_BOUNDARIES_FLAG);
RNA_def_property_ui_text(prop, "Material Boundaries", "Enable material boundaries");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_smoothness", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_FACE_SMOOTHNESS_FLAG);
RNA_def_property_ui_text(prop, "Face Smoothness", "Take face smoothness into account in view map calculation");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_advanced_options", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_ADVANCED_OPTIONS_FLAG);
RNA_def_property_ui_text(prop, "Advanced Options",
"Enable advanced edge detection options (sphere radius and Kr derivative epsilon)");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "sphere_radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sphere_radius");
RNA_def_property_range(prop, 0.0, 1000.0);
RNA_def_property_ui_text(prop, "Sphere Radius", "Sphere radius for computing curvatures");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "kr_derivative_epsilon", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dkr_epsilon");
RNA_def_property_range(prop, -1000.0, 1000.0);
RNA_def_property_ui_text(prop, "Kr Derivative Epsilon", "Kr derivative epsilon for computing suggestive contours");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "crease_angle", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "crease_angle");
RNA_def_property_range(prop, 0.0, DEG2RAD(180.0));
RNA_def_property_ui_text(prop, "Crease Angle", "Angular threshold for detecting crease edges");
- RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "linesets", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "linesets", NULL);
@@ -4074,6 +4086,8 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{RE_BAKE_NORMALS, "NORMALS", 0, "Normals", "Bake normals"},
{RE_BAKE_TEXTURE, "TEXTURE", 0, "Textures", "Bake textures"},
{RE_BAKE_DISPLACEMENT, "DISPLACEMENT", 0, "Displacement", "Bake displacement"},
+ {RE_BAKE_DERIVATIVE, "DERIVATIVE", 0, "Derivative", "Bake derivative map"},
+ {RE_BAKE_VERTEX_COLORS, "VERTEX_COLORS", 0, "Vertex Colors", "Bake vertex colors"},
{RE_BAKE_EMIT, "EMIT", 0, "Emission", "Bake Emit values (glow)"},
{RE_BAKE_ALPHA, "ALPHA", 0, "Alpha", "Bake Alpha values (transparency)"},
{RE_BAKE_MIRROR_INTENSITY, "MIRROR_INTENSITY", 0, "Mirror Intensity", "Bake Mirror values"},
@@ -4190,12 +4204,14 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
prop = RNA_def_property(srna, "tile_x", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tilex");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 8, 65536);
RNA_def_property_ui_text(prop, "Tile X", "Horizontal tile size to use while rendering");
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "tile_y", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tiley");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 8, 65536);
RNA_def_property_ui_text(prop, "Tile Y", "Vertical tile size to use while rendering");
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
@@ -4658,6 +4674,17 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
"Bake to vertex colors instead of to a UV-mapped image");
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
+ prop = RNA_def_property(srna, "use_bake_user_scale", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_USERSCALE);
+ RNA_def_property_ui_text(prop, "User scale", "Use a user scale for the derivative map");
+
+ prop = RNA_def_property(srna, "bake_user_scale", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "bake_user_scale");
+ RNA_def_property_range(prop, 0.0, 1000.0);
+ RNA_def_property_ui_text(prop, "Scale",
+ "Instead of automatically normalizing to 0..1, "
+ "apply a user scale to the derivative map");
+
/* stamp */
prop = RNA_def_property(srna, "use_stamp_time", PROP_BOOLEAN, PROP_NONE);
@@ -5193,6 +5220,14 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Current Frame Final",
"Current frame with subframe and time remapping applied");
+ prop = RNA_def_property(srna, "lock_frame_selection_to_range", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_boolean_sdna(prop, NULL, "r.flag", SCER_LOCK_FRAME_SELECTION);
+ RNA_def_property_ui_text(prop, "Lock Frame Selection",
+ "Don't allow frame to be selected with mouse outside of frame range");
+ RNA_def_property_update(prop, NC_SCENE | ND_FRAME, NULL);
+ RNA_def_property_ui_icon(prop, ICON_LOCKED, 0);
+
/* Preview Range (frame-range for UI playback) */
prop = RNA_def_property(srna, "use_preview_range", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c
index 375b31e0586..ae6c5e71e6e 100644
--- a/source/blender/makesrna/intern/rna_scene_api.c
+++ b/source/blender/makesrna/intern/rna_scene_api.c
@@ -142,12 +142,12 @@ static void rna_Scene_collada_export(
int use_object_instantiation,
int sort_by_name,
int export_transformation_type,
- int second_life)
+ int open_sim)
{
collada_export(scene, filepath, apply_modifiers, export_mesh_type, selected,
include_children, include_armatures, include_shapekeys, deform_bones_only,
active_uv_only, include_uv_textures, include_material_textures,
- use_texture_copies, use_ngons, use_object_instantiation, sort_by_name, export_transformation_type, second_life);
+ use_texture_copies, use_ngons, use_object_instantiation, sort_by_name, export_transformation_type, open_sim);
}
#endif
@@ -218,7 +218,7 @@ void RNA_api_scene(StructRNA *srna)
parm = RNA_def_boolean(func, "use_ngons", 1, "Use NGons", "Keep NGons in Export");
parm = RNA_def_boolean(func, "use_object_instantiation", 1, "Use Object Instances", "Instantiate multiple Objects from same Data");
parm = RNA_def_boolean(func, "sort_by_name", 0, "Sort by Object name", "Sort exported data by Object name");
- parm = RNA_def_boolean(func, "second_life", 0, "Export for Second Life", "Compatibility mode for Second Life");
+ parm = RNA_def_boolean(func, "open_sim", 0, "Export for SL/OpenSim", "Compatibility mode for SL, OpenSim and similar online worlds");
parm = RNA_def_int(func, "export_transformation_type", 0, INT_MIN, INT_MAX,
"Transformation", "Transformation type for translation, scale and rotation", INT_MIN, INT_MAX);
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index f9171887bfb..b8269c428a1 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -94,7 +94,7 @@ static void rna_Screen_redraw_update(Main *UNUSED(bmain), Scene *UNUSED(scene),
}
-static int rna_Screen_is_animation_playing_get(PointerRNA *ptr)
+static int rna_Screen_is_animation_playing_get(PointerRNA *UNUSED(ptr))
{
return (ED_screen_animation_playing(G.main->wm.first) != NULL);
}
@@ -213,6 +213,7 @@ static void rna_def_area(BlenderRNA *brna)
prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "spacetype");
RNA_def_property_enum_items(prop, space_type_items);
+ RNA_def_property_enum_default(prop, SPACE_VIEW3D);
RNA_def_property_enum_funcs(prop, NULL, "rna_Area_type_set", "rna_Area_type_itemf");
RNA_def_property_ui_text(prop, "Editor Type", "Current editor type for this area");
RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index 11b3f94a446..89714e49ebf 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -190,7 +190,7 @@ static int rna_ParticleEdit_hair_get(PointerRNA *ptr)
return 0;
}
-static char *rna_ParticleEdit_path(PointerRNA *ptr)
+static char *rna_ParticleEdit_path(PointerRNA *UNUSED(ptr))
{
return BLI_strdup("tool_settings.particle_edit");
}
@@ -247,7 +247,7 @@ static void rna_Sculpt_ShowDiffuseColor_update(Main *UNUSED(bmain), Scene *scene
}
}
-static char *rna_Sculpt_path(PointerRNA *ptr)
+static char *rna_Sculpt_path(PointerRNA *UNUSED(ptr))
{
return BLI_strdup("tool_settings.sculpt");
}
@@ -264,17 +264,17 @@ static char *rna_VertexPaint_path(PointerRNA *ptr)
}
}
-static char *rna_ImagePaintSettings_path(PointerRNA *ptr)
+static char *rna_ImagePaintSettings_path(PointerRNA *UNUSED(ptr))
{
return BLI_strdup("tool_settings.image_paint");
}
-static char *rna_UvSculpt_path(PointerRNA *ptr)
+static char *rna_UvSculpt_path(PointerRNA *UNUSED(ptr))
{
return BLI_strdup("tool_settings.uv_sculpt");
}
-static char *rna_ParticleBrush_path(PointerRNA *ptr)
+static char *rna_ParticleBrush_path(PointerRNA *UNUSED(ptr))
{
return BLI_strdup("tool_settings.particle_edit.brush");
}
diff --git a/source/blender/makesrna/intern/rna_sensor.c b/source/blender/makesrna/intern/rna_sensor.c
index 278dc074c50..71546c7fad4 100644
--- a/source/blender/makesrna/intern/rna_sensor.c
+++ b/source/blender/makesrna/intern/rna_sensor.c
@@ -43,7 +43,7 @@
#include "WM_types.h"
/* Always keep in alphabetical order */
-EnumPropertyItem sensor_type_items[] = {
+static EnumPropertyItem sensor_type_items[] = {
{SENS_ACTUATOR, "ACTUATOR", 0, "Actuator", ""},
{SENS_ALWAYS, "ALWAYS", 0, "Always", ""},
{SENS_ARMATURE, "ARMATURE", 0, "Armature", ""},
@@ -58,7 +58,6 @@ EnumPropertyItem sensor_type_items[] = {
{SENS_RADAR, "RADAR", 0, "Radar", ""},
{SENS_RANDOM, "RANDOM", 0, "Random", ""},
{SENS_RAY, "RAY", 0, "Ray", ""},
- {SENS_TOUCH, "TOUCH", 0, "Touch", ""},
{0, NULL, 0, NULL, NULL}
};
@@ -74,8 +73,6 @@ static StructRNA *rna_Sensor_refine(struct PointerRNA *ptr)
switch (sensor->type) {
case SENS_ALWAYS:
return &RNA_AlwaysSensor;
- case SENS_TOUCH:
- return &RNA_TouchSensor;
case SENS_NEAR:
return &RNA_NearSensor;
case SENS_KEYBOARD:
@@ -267,15 +264,6 @@ static void rna_Sensor_Armature_update(Main *UNUSED(bmain), Scene *UNUSED(scene)
posechannel[0] = 0;
constraint[0] = 0;
}
-
-/* note: the following set functions exists only to avoid id refcounting */
-static void rna_Sensor_touch_material_set(PointerRNA *ptr, PointerRNA value)
-{
- bSensor *sens = (bSensor *)ptr->data;
- bTouchSensor *ts = (bTouchSensor *) sens->data;
-
- ts->ma = value.data;
-}
#else
static void rna_def_sensor(BlenderRNA *brna)
@@ -427,25 +415,6 @@ static void rna_def_mouse_sensor(BlenderRNA *brna)
RNA_def_property_update(prop, NC_LOGIC, NULL);
}
-static void rna_def_touch_sensor(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- srna = RNA_def_struct(brna, "TouchSensor", "Sensor");
- RNA_def_struct_ui_text(srna, "Touch Sensor", "Sensor to detect objects colliding with the current object");
- RNA_def_struct_sdna_from(srna, "bTouchSensor", "data");
-
- prop = RNA_def_property(srna, "material", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "Material");
- RNA_def_property_pointer_sdna(prop, NULL, "ma");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Material", "Only look for objects with this material (blank = all objects)");
- /* note: custom set function is ONLY to avoid rna setting a user for this. */
- RNA_def_property_pointer_funcs(prop, NULL, "rna_Sensor_touch_material_set", NULL, NULL);
- RNA_def_property_update(prop, NC_LOGIC, NULL);
-}
-
static void rna_def_keyboard_sensor(BlenderRNA *brna)
{
StructRNA *srna;
@@ -917,7 +886,6 @@ void RNA_def_sensor(BlenderRNA *brna)
rna_def_always_sensor(brna);
rna_def_near_sensor(brna);
rna_def_mouse_sensor(brna);
- rna_def_touch_sensor(brna);
rna_def_keyboard_sensor(brna);
rna_def_property_sensor(brna);
rna_def_armature_sensor(brna);
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index 650453ebc69..342d94c7667 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -93,6 +93,23 @@ static void meta_tmp_ref(Sequence *seq_par, Sequence *seq)
}
}
+static void rna_SequenceElement_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
+{
+ Scene *scene = (Scene *) ptr->id.data;
+ Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
+
+ if (ed) {
+ StripElem *se = (StripElem *)ptr->data;
+ Sequence *seq;
+
+ /* slow but we can't avoid! */
+ seq = BKE_sequencer_from_elem(&ed->seqbase, se);
+ if (seq) {
+ BKE_sequence_invalidate_cache(scene, seq);
+ }
+ }
+}
+
static void rna_Sequence_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
Scene *scene = (Scene *) ptr->id.data;
@@ -703,7 +720,7 @@ static Sequence *sequence_get_by_proxy(Editing *ed, StripProxy *proxy)
return data.seq;
}
-static void rna_Sequence_tcindex_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
+static void rna_Sequence_tcindex_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
Scene *scene = (Scene *) ptr->id.data;
Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
@@ -1063,7 +1080,7 @@ static void rna_def_strip_element(BlenderRNA *brna)
prop = RNA_def_property(srna, "filename", PROP_STRING, PROP_FILENAME);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Filename", "");
- RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceElement_update");
prop = RNA_def_property(srna, "orig_width", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "orig_width");
@@ -1281,7 +1298,7 @@ static void rna_def_strip_color_balance(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "StripColorBalance");
}
-EnumPropertyItem blend_mode_items[] = {
+static EnumPropertyItem blend_mode_items[] = {
{SEQ_BLEND_REPLACE, "REPLACE", 0, "Replace", ""},
{SEQ_TYPE_CROSS, "CROSS", 0, "Cross", ""},
{SEQ_TYPE_ADD, "ADD", 0, "Add", ""},
diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c
index 8b01a785f1e..ba90e3b1e4a 100644
--- a/source/blender/makesrna/intern/rna_smoke.c
+++ b/source/blender/makesrna/intern/rna_smoke.c
@@ -65,7 +65,7 @@ static void rna_Smoke_dependency_update(Main *bmain, Scene *scene, PointerRNA *p
DAG_relations_tag_update(bmain);
}
-static void rna_Smoke_resetCache(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_Smoke_resetCache(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
SmokeDomainSettings *settings = (SmokeDomainSettings *)ptr->data;
if (settings->smd && settings->smd->domain)
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index f7a0d865274..5daeb4ae612 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -109,13 +109,15 @@ static EnumPropertyItem transform_orientation_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem autosnap_items[] = {
+#ifndef RNA_RUNTIME
+static EnumPropertyItem autosnap_items[] = {
{SACTSNAP_OFF, "NONE", 0, "No Auto-Snap", ""},
{SACTSNAP_STEP, "STEP", 0, "Time Step", "Snap to 1.0 frame/second intervals"},
{SACTSNAP_FRAME, "FRAME", 0, "Nearest Frame", "Snap to actual frames/seconds (nla-action time)"},
{SACTSNAP_MARKER, "MARKER", 0, "Nearest Marker", "Snap to nearest marker"},
{0, NULL, 0, NULL, NULL}
};
+#endif
EnumPropertyItem viewport_shade_items[] = {
{OB_BOUNDBOX, "BOUNDBOX", ICON_BBOX, "Bounding Box", "Display the object's local bounding boxes only"},
@@ -172,6 +174,7 @@ static EnumPropertyItem buttons_texture_context_items[] = {
#include "DNA_mask_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
+#include "DNA_userdef_types.h"
#include "BLI_math.h"
@@ -197,6 +200,9 @@ static EnumPropertyItem buttons_texture_context_items[] = {
#include "IMB_imbuf_types.h"
+#include "UI_interface.h"
+#include "UI_view2d.h"
+
static StructRNA *rna_Space_refine(struct PointerRNA *ptr)
{
SpaceLink *space = (SpaceLink *)ptr->data;
@@ -364,7 +370,7 @@ static void rna_View3D_CursorLocation_get(PointerRNA *ptr, float *values)
View3D *v3d = (View3D *)(ptr->data);
bScreen *sc = (bScreen *)ptr->id.data;
Scene *scene = (Scene *)sc->scene;
- const float *loc = give_cursor(scene, v3d);
+ const float *loc = ED_view3d_cursor3d_get(scene, v3d);
copy_v3_v3(values, loc);
}
@@ -374,7 +380,7 @@ static void rna_View3D_CursorLocation_set(PointerRNA *ptr, const float *values)
View3D *v3d = (View3D *)(ptr->data);
bScreen *sc = (bScreen *)ptr->id.data;
Scene *scene = (Scene *)sc->scene;
- float *cursor = give_cursor(scene, v3d);
+ float *cursor = ED_view3d_cursor3d_get(scene, v3d);
copy_v3_v3(cursor, values);
}
@@ -400,23 +406,12 @@ static void rna_SpaceView3D_layer_update(Main *bmain, Scene *UNUSED(scene), Poin
DAG_on_visible_update(bmain, FALSE);
}
-static void rna_SpaceView3D_viewport_shade_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
+static void rna_SpaceView3D_viewport_shade_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
{
View3D *v3d = (View3D *)(ptr->data);
ScrArea *sa = rna_area_from_space(ptr);
- if (v3d->drawtype != OB_RENDER) {
- ARegion *ar;
-
- for (ar = sa->regionbase.first; ar; ar = ar->next) {
- RegionView3D *rv3d = ar->regiondata;
-
- if (rv3d && rv3d->render_engine) {
- RE_engine_free(rv3d->render_engine);
- rv3d->render_engine = NULL;
- }
- }
- }
+ ED_view3d_shade_update(bmain, v3d, sa);
}
static void rna_SpaceView3D_matcap_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
@@ -622,7 +617,7 @@ static PointerRNA rna_SpaceImageEditor_uvedit_get(PointerRNA *ptr)
return rna_pointer_inherit_refine(ptr, &RNA_SpaceUVEditor, ptr->data);
}
-static void rna_SpaceImageEditor_mode_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_SpaceImageEditor_mode_update(Main *bmain, Scene *scene, PointerRNA *UNUSED(ptr))
{
ED_space_image_paint_update(bmain->wm.first, scene->toolsettings);
}
@@ -850,8 +845,8 @@ static void rna_SpaceProperties_context_set(PointerRNA *ptr, int value)
sbuts->mainbuser = value;
}
-static EnumPropertyItem *rna_SpaceProperties_context_itemf(bContext *C, PointerRNA *ptr,
- PropertyRNA *UNUSED(prop), int *free)
+static EnumPropertyItem *rna_SpaceProperties_context_itemf(bContext *UNUSED(C), PointerRNA *ptr,
+ PropertyRNA *UNUSED(prop), int *free)
{
SpaceButs *sbuts = (SpaceButs *)(ptr->data);
EnumPropertyItem *item = NULL;
@@ -959,6 +954,14 @@ static EnumPropertyItem *rna_SpaceProperties_texture_context_itemf(bContext *C,
return item;
}
+static void rna_SpaceProperties_texture_context_set(PointerRNA *ptr, int value)
+{
+ SpaceButs *sbuts = (SpaceButs *)(ptr->data);
+
+ /* User action, no need to keep "better" value in prev here! */
+ sbuts->texture_context = sbuts->texture_context_prev = value;
+}
+
/* Space Console */
static void rna_ConsoleLine_body_get(PointerRNA *ptr, char *value)
{
@@ -989,7 +992,8 @@ static void rna_ConsoleLine_body_set(PointerRNA *ptr, const char *value)
ci->cursor = len;
}
-static void rna_ConsoleLine_cursor_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
+static void rna_ConsoleLine_cursor_index_range(PointerRNA *ptr, int *min, int *max,
+ int *UNUSED(softmin), int *UNUSED(softmax))
{
ConsoleLine *ci = (ConsoleLine *)ptr->data;
@@ -1255,6 +1259,15 @@ static void rna_SpaceNodeEditor_show_backdrop_update(Main *UNUSED(bmain), Scene
WM_main_add_notifier(NC_SCENE | ND_NODES, NULL);
}
+static void rna_SpaceNodeEditor_cursor_location_from_region(SpaceNode *snode, bContext *C, int x, int y)
+{
+ ARegion *ar = CTX_wm_region(C);
+
+ UI_view2d_region_to_view(&ar->v2d, x, y, &snode->cursor[0], &snode->cursor[1]);
+ snode->cursor[0] /= UI_DPI_FAC;
+ snode->cursor[1] /= UI_DPI_FAC;
+}
+
static void rna_SpaceClipEditor_clip_set(PointerRNA *ptr, PointerRNA value)
{
SpaceClip *sc = (SpaceClip *)(ptr->data);
@@ -1323,6 +1336,12 @@ static void rna_def_space_mask_info(StructRNA *srna, int noteflag, const char *m
{
PropertyRNA *prop;
+ static EnumPropertyItem overlay_mode_items[] = {
+ {MASK_OVERLAY_ALPHACHANNEL, "ALPHACHANNEL", ICON_NONE, "Alpha Channel", "Show alpha channel of the mask"},
+ {MASK_OVERLAY_COMBINED, "COMBINED", ICON_NONE, "Combined", "Combine space background image with the mask"},
+ {0, NULL, 0, NULL, NULL}
+ };
+
prop = RNA_def_property(srna, "mask", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "mask_info.mask");
RNA_def_property_flag(prop, PROP_EDITABLE);
@@ -1341,6 +1360,17 @@ static void rna_def_space_mask_info(StructRNA *srna, int noteflag, const char *m
RNA_def_property_boolean_sdna(prop, NULL, "mask_info.draw_flag", MASK_DRAWFLAG_SMOOTH);
RNA_def_property_ui_text(prop, "Draw Smooth Splines", "");
RNA_def_property_update(prop, noteflag, NULL);
+
+ prop = RNA_def_property(srna, "show_mask_overlay", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mask_info.draw_flag", MASK_DRAWFLAG_OVERLAY);
+ RNA_def_property_ui_text(prop, "Show Mask Overlay", "");
+ RNA_def_property_update(prop, noteflag, NULL);
+
+ prop = RNA_def_property(srna, "mask_overlay_mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "mask_info.overlay_mode");
+ RNA_def_property_enum_items(prop, overlay_mode_items);
+ RNA_def_property_ui_text(prop, "Overlay Mode", "Overlay mode of rasterized mask");
+ RNA_def_property_update(prop, noteflag, NULL);
}
static void rna_def_space_image_uv(BlenderRNA *brna)
@@ -1460,7 +1490,6 @@ static void rna_def_space_outliner(BlenderRNA *brna)
{SO_LIBRARIES, "LIBRARIES", 0, "Blender File", "Display data of current file and linked libraries"},
{SO_DATABLOCKS, "DATABLOCKS", 0, "Datablocks", "Display all raw datablocks"},
{SO_USERDEF, "USER_PREFERENCES", 0, "User Preferences", "Display the user preference datablocks"},
- {SO_KEYMAP, "KEYMAPS", 0, "Key Maps", "Display keymap datablocks"},
{0, NULL, 0, NULL, NULL}
};
@@ -1671,7 +1700,6 @@ static void rna_def_space_view3d(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- const int matrix_dimsize[] = {4, 4};
static EnumPropertyItem pivot_items[] = {
{V3D_CENTER, "BOUNDING_BOX_CENTER", ICON_ROTATE, "Bounding Box Center",
@@ -1921,6 +1949,11 @@ static void rna_def_space_view3d(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Backface Culling", "Use back face culling to hide the back side of faces");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
+ prop = RNA_def_property(srna, "show_textured_shadeless", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_SHADELESS_TEX);
+ RNA_def_property_ui_text(prop, "Shadeless", "Show shadeless texture without lighting in textured draw mode");
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
+
prop = RNA_def_property(srna, "show_occlude_wire", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_OCCLUDE_WIRE);
RNA_def_property_ui_text(prop, "Hidden Wire", "Use hidden wireframe display");
@@ -2091,12 +2124,12 @@ static void rna_def_space_view3d(BlenderRNA *brna)
prop = RNA_def_property(srna, "perspective_matrix", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "persmat");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* XXX: for now, it's too risky for users to do this */
- RNA_def_property_multi_array(prop, 2, matrix_dimsize);
+ RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4);
RNA_def_property_ui_text(prop, "Perspective Matrix", "Current perspective matrix of the 3D region");
prop = RNA_def_property(srna, "view_matrix", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "viewmat");
- RNA_def_property_multi_array(prop, 2, matrix_dimsize);
+ RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4);
RNA_def_property_float_funcs(prop, NULL, "rna_RegionView3D_view_matrix_set", NULL);
RNA_def_property_ui_text(prop, "View Matrix", "Current view matrix of the 3D region");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
@@ -2194,7 +2227,8 @@ static void rna_def_space_buttons(BlenderRNA *brna)
prop = RNA_def_property(srna, "texture_context", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, buttons_texture_context_items);
- RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_SpaceProperties_texture_context_itemf");
+ RNA_def_property_enum_funcs(prop, NULL, "rna_SpaceProperties_texture_context_set",
+ "rna_SpaceProperties_texture_context_itemf");
RNA_def_property_ui_text(prop, "Texture Context", "Type of texture data to display and edit");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
@@ -2573,6 +2607,16 @@ static void rna_def_space_text(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Margin Column", "Column number to show right margin at");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_TEXT, NULL);
+ prop = RNA_def_property(srna, "top", PROP_INT, PROP_NONE);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_int_sdna(prop, NULL, "top");
+ RNA_def_property_ui_text(prop, "Top Line", "Top line visible");
+
+ prop = RNA_def_property(srna, "visible_lines", PROP_INT, PROP_NONE);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_int_sdna(prop, NULL, "viewlines");
+ RNA_def_property_ui_text(prop, "Top Line", "Amount of lines that can be visible in current editor");
+
/* functionality options */
prop = RNA_def_property(srna, "use_overwrite", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "overwrite", 1);
@@ -3292,7 +3336,8 @@ static void rna_def_space_node_path_api(BlenderRNA *brna, PropertyRNA *cprop)
static void rna_def_space_node(BlenderRNA *brna)
{
StructRNA *srna;
- PropertyRNA *prop;
+ PropertyRNA *prop, *parm;
+ FunctionRNA *func;
static EnumPropertyItem texture_type_items[] = {
{SNODE_TEX_OBJECT, "OBJECT", ICON_OBJECT_DATA, "Object", "Edit texture nodes from Object"},
@@ -3433,6 +3478,14 @@ static void rna_def_space_node(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "cursor");
RNA_def_property_ui_text(prop, "Cursor Location", "Location for adding new nodes");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE_VIEW, NULL);
+
+ func = RNA_def_function(srna, "cursor_location_from_region", "rna_SpaceNodeEditor_cursor_location_from_region");
+ RNA_def_function_ui_description(func, "Set the cursor location using region coordinates");
+ RNA_def_function_flag(func, FUNC_USE_CONTEXT);
+ parm = RNA_def_int(func, "x", 0, INT_MIN, INT_MAX, "x", "Region x coordinate", -10000, 10000);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm = RNA_def_int(func, "y", 0, INT_MIN, INT_MAX, "y", "Region y coordinate", -10000, 10000);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
}
static void rna_def_space_logic(BlenderRNA *brna)
@@ -3525,6 +3578,7 @@ static void rna_def_space_clip(BlenderRNA *brna)
static EnumPropertyItem pivot_items[] = {
{V3D_CENTER, "BOUNDING_BOX_CENTER", ICON_ROTATE, "Bounding Box Center",
"Pivot around bounding box center of selected object(s)"},
+ {V3D_CURSOR, "CURSOR", ICON_CURSOR, "2D Cursor", "Pivot around the 2D cursor"},
{V3D_LOCAL, "INDIVIDUAL_ORIGINS", ICON_ROTATECOLLECTION,
"Individual Origins", "Pivot around each object's own origin"},
{V3D_CENTROID, "MEDIAN_POINT", ICON_ROTATECENTER, "Median Point",
diff --git a/source/blender/makesrna/intern/rna_test.c b/source/blender/makesrna/intern/rna_test.c
index 22b6f323647..cf0dc5e332d 100644
--- a/source/blender/makesrna/intern/rna_test.c
+++ b/source/blender/makesrna/intern/rna_test.c
@@ -34,6 +34,8 @@
#include "rna_internal.h"
+#ifdef RNA_RUNTIME
+
#define ARRAY_SIZE 3
#define DYNAMIC_ARRAY_SIZE 64
#define MARRAY_DIM [3][4][5]
@@ -43,8 +45,6 @@
#define DYNAMIC_MARRAY_DIM [3][4][5]
#define DYNAMIC_MARRAY_SIZE(type) (sizeof(type DYNAMIC_MARRAY_DIM) / sizeof(type))
-#ifdef RNA_RUNTIME
-
#ifdef UNIT_TEST
#define DEF_VARS(type, prefix) \
@@ -185,7 +185,8 @@ void RNA_def_test(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_DYNAMIC);
RNA_def_property_dynamic_array_funcs(prop, "rna_Test_bdmarr_get_length", "rna_Test_bdmarr_set_length");
RNA_def_property_boolean_funcs(prop, "rna_Test_bdmarr_get", "rna_Test_bdmarr_set");
-
+#else
+ (void)brna;
#endif
}
diff --git a/source/blender/makesrna/intern/rna_text.c b/source/blender/makesrna/intern/rna_text.c
index df6181af4b2..24695928679 100644
--- a/source/blender/makesrna/intern/rna_text.c
+++ b/source/blender/makesrna/intern/rna_text.c
@@ -81,6 +81,12 @@ static int rna_Text_modified_get(PointerRNA *ptr)
return text_file_modified(text);
}
+static int rna_Text_current_line_index_get(PointerRNA *ptr)
+{
+ Text *text = (Text *)ptr->data;
+ return BLI_findindex(&text->lines, text->curl);
+}
+
static void rna_TextLine_body_get(PointerRNA *ptr, char *value)
{
TextLine *line = (TextLine *)ptr->data;
@@ -141,6 +147,11 @@ static void rna_def_text(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Text", "Text datablock referencing an external or packed text file");
RNA_def_struct_ui_icon(srna, ICON_TEXT);
RNA_def_struct_clear_flag(srna, STRUCT_ID_REFCOUNT);
+
+ prop = RNA_def_property(srna, "current_line_index", PROP_INT, PROP_NONE);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_int_funcs(prop, "rna_Text_current_line_index_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Current Line Index", "Index of current TextLine in TextLine collection");
prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_Text_filename_get", "rna_Text_filename_length", "rna_Text_filename_set");
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index be6defa11d7..a26272b34ce 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -51,13 +51,15 @@
#include "WM_api.h"
#include "WM_types.h"
-EnumPropertyItem texture_filter_items[] = {
+#ifndef RNA_RUNTIME
+static EnumPropertyItem texture_filter_items[] = {
{TXF_BOX, "BOX", 0, "Box", ""},
{TXF_EWA, "EWA", 0, "EWA", ""},
{TXF_FELINE, "FELINE", 0, "FELINE", ""},
{TXF_AREA, "AREA", 0, "Area", ""},
{0, NULL, 0, NULL, NULL}
};
+#endif
EnumPropertyItem texture_type_items[] = {
{0, "NONE", 0, "None", ""},
@@ -82,7 +84,8 @@ EnumPropertyItem texture_type_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem blend_type_items[] = {
+#ifndef RNA_RUNTIME
+static EnumPropertyItem blend_type_items[] = {
{MTEX_BLEND, "MIX", 0, "Mix", ""},
{MTEX_ADD, "ADD", 0, "Add", ""},
{MTEX_SUB, "SUBTRACT", 0, "Subtract", ""},
@@ -101,6 +104,7 @@ EnumPropertyItem blend_type_items[] = {
{MTEX_LIN_LIGHT, "LINEAR_LIGHT", 0, "Linear Light", ""},
{0, NULL, 0, NULL, NULL}
};
+#endif
#ifdef RNA_RUNTIME
@@ -180,7 +184,7 @@ static void rna_Texture_mapping_update(Main *bmain, Scene *scene, PointerRNA *pt
rna_Texture_update(bmain, scene, ptr);
}
-static void rna_Color_mapping_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_Color_mapping_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
{
/* nothing to do */
}
@@ -362,7 +366,7 @@ static int rna_TextureSlot_output_node_get(PointerRNA *ptr)
}
-static EnumPropertyItem *rna_TextureSlot_output_node_itemf(bContext *C, PointerRNA *ptr,
+static EnumPropertyItem *rna_TextureSlot_output_node_itemf(bContext *UNUSED(C), PointerRNA *ptr,
PropertyRNA *UNUSED(prop), int *free)
{
MTex *mtex = ptr->data;
@@ -474,7 +478,7 @@ static char *rna_VoxelData_path(PointerRNA *UNUSED(ptr))
return BLI_sprintfN("voxel_data");
}
-static char *rna_OceanTex_path(PointerRNA *ptr)
+static char *rna_OceanTex_path(PointerRNA *UNUSED(ptr))
{
return BLI_sprintfN("ocean");
}
@@ -491,6 +495,14 @@ static void rna_def_texmapping(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
+ static EnumPropertyItem prop_vect_type_items[] = {
+ {TEXMAP_TYPE_TEXTURE, "TEXTURE", 0, "Texture", "Transform a texture by inverse mapping the texture coordinate"},
+ {TEXMAP_TYPE_POINT, "POINT", 0, "Point", "Transform a point"},
+ {TEXMAP_TYPE_VECTOR, "VECTOR", 0, "Vector", "Transform a direction vector"},
+ {TEXMAP_TYPE_NORMAL, "NORMAL", 0, "Normal", "Transform a normal vector with unit length"},
+ {0, NULL, 0, NULL, NULL}
+ };
+
static EnumPropertyItem prop_xyz_mapping_items[] = {
{0, "NONE", 0, "None", ""},
{1, "X", 0, "X", ""},
@@ -505,6 +517,12 @@ static void rna_def_texmapping(BlenderRNA *brna)
srna = RNA_def_struct(brna, "TexMapping", NULL);
RNA_def_struct_ui_text(srna, "Texture Mapping", "Texture coordinate mapping settings");
+ prop = RNA_def_property(srna, "vector_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "type");
+ RNA_def_property_enum_items(prop, prop_vect_type_items);
+ RNA_def_property_ui_text(prop, "Type", "Type of vector that the mapping transforms");
+ RNA_def_property_update(prop, 0, "rna_Texture_mapping_update");
+
prop = RNA_def_property(srna, "translation", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "loc");
RNA_def_property_ui_text(prop, "Location", "");
diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c
index 1026a2c7772..f62778a5c1e 100644
--- a/source/blender/makesrna/intern/rna_tracking.c
+++ b/source/blender/makesrna/intern/rna_tracking.c
@@ -124,7 +124,8 @@ static void rna_tracking_active_object_index_set(PointerRNA *ptr, int value)
BKE_tracking_dopesheet_tag_update(&clip->tracking);
}
-static void rna_tracking_active_object_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
+static void rna_tracking_active_object_index_range(PointerRNA *ptr, int *min, int *max,
+ int *UNUSED(softmin), int *UNUSED(softmax))
{
MovieClip *clip = (MovieClip *)ptr->id.data;
@@ -229,23 +230,33 @@ static void rna_trackingPlaneMarker_frame_set(PointerRNA *ptr, int value)
{
MovieClip *clip = (MovieClip *) ptr->id.data;
MovieTracking *tracking = &clip->tracking;
- MovieTrackingPlaneTrack *plane_track;
MovieTrackingPlaneMarker *plane_marker = (MovieTrackingPlaneMarker *) ptr->data;
-
- /* TODO(sergey): Need to support editing markers from object's tracks */
-
- plane_track = tracking->plane_tracks.first;
- while (plane_track) {
- if (plane_marker >= plane_track->markers &&
- plane_marker < plane_track->markers + plane_track->markersnr)
+ MovieTrackingObject *tracking_object;
+ bool found = false;
+ MovieTrackingPlaneTrack *plane_track = NULL;
+
+ for (tracking_object = tracking->objects.first;
+ tracking_object;
+ tracking_object = tracking_object->next)
+ {
+ ListBase *tracksbase = BKE_tracking_object_get_plane_tracks(tracking, tracking_object);
+
+ for (plane_track = tracksbase->first;
+ plane_track;
+ plane_track = plane_track->next)
{
- break;
+ if (plane_marker >= plane_track->markers && plane_marker < plane_track->markers + plane_track->markersnr) {
+ found = true;
+ break;
+ }
}
- plane_track = plane_track->next;
+ if (found) {
+ break;
+ }
}
- if (plane_track) {
+ if (found) {
MovieTrackingPlaneMarker new_plane_marker = *plane_marker;
new_plane_marker.framenr = value;
@@ -352,7 +363,8 @@ static void rna_tracking_stabTracks_active_index_set(PointerRNA *ptr, int value)
clip->tracking.stabilization.act_track = value;
}
-static void rna_tracking_stabTracks_active_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
+static void rna_tracking_stabTracks_active_index_range(PointerRNA *ptr, int *min, int *max,
+ int *UNUSED(softmin), int *UNUSED(softmax))
{
MovieClip *clip = (MovieClip *)ptr->id.data;
@@ -455,19 +467,33 @@ static void rna_trackingMarker_frame_set(PointerRNA *ptr, int value)
{
MovieClip *clip = (MovieClip *) ptr->id.data;
MovieTracking *tracking = &clip->tracking;
- MovieTrackingTrack *track;
MovieTrackingMarker *marker = (MovieTrackingMarker *) ptr->data;
+ MovieTrackingObject *tracking_object;
+ bool found = false;
+ MovieTrackingTrack *track = NULL;
+
+ for (tracking_object = tracking->objects.first;
+ tracking_object;
+ tracking_object = tracking_object->next)
+ {
+ ListBase *tracksbase = BKE_tracking_object_get_tracks(tracking, tracking_object);
+
+ for (track = tracksbase->first;
+ track;
+ track = track->next)
+ {
+ if (marker >= track->markers && marker < track->markers + track->markersnr) {
+ found = true;
+ break;
+ }
+ }
- track = tracking->tracks.first;
- while (track) {
- if (marker >= track->markers && marker < track->markers + track->markersnr) {
+ if (found) {
break;
}
-
- track = track->next;
}
- if (track) {
+ if (found) {
MovieTrackingMarker new_marker = *marker;
new_marker.framenr = value;
@@ -501,7 +527,7 @@ static void rna_tracking_markerPattern_boundbox_get(PointerRNA *ptr, float *valu
copy_v2_v2(values + 2, max);
}
-static void rna_trackingDopesheet_tagUpdate(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
+static void rna_trackingDopesheet_tagUpdate(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
MovieClip *clip = (MovieClip *)ptr->id.data;
MovieTrackingDopesheet *dopesheet = &clip->tracking.dopesheet;
@@ -511,7 +537,8 @@ static void rna_trackingDopesheet_tagUpdate(Main *UNUSED(bmain), Scene *scene, P
/* API */
-static MovieTrackingTrack *add_track_to_base(MovieClip *clip, MovieTracking *tracking, ListBase *tracksbase, const char *name, int frame)
+static MovieTrackingTrack *add_track_to_base(MovieClip *clip, MovieTracking *tracking, ListBase *tracksbase,
+ const char *name, int frame)
{
int width, height;
MovieClipUser user = {0};
@@ -622,6 +649,44 @@ static void rna_trackingMarkers_delete_frame(MovieTrackingTrack *track, int fram
WM_main_add_notifier(NC_MOVIECLIP | NA_EDITED, NULL);
}
+static MovieTrackingPlaneMarker *rna_trackingPlaneMarkers_find_frame(MovieTrackingPlaneTrack *plane_track, int framenr, int exact)
+{
+ if (exact)
+ return BKE_tracking_plane_marker_get_exact(plane_track, framenr);
+ else
+ return BKE_tracking_plane_marker_get(plane_track, framenr);
+}
+
+static MovieTrackingPlaneMarker *rna_trackingPlaneMarkers_insert_frame(MovieTrackingPlaneTrack *plane_track, int framenr)
+{
+ MovieTrackingPlaneMarker plane_marker, *new_plane_marker;
+
+ memset(&plane_marker, 0, sizeof(plane_marker));
+ plane_marker.framenr = framenr;
+
+ /* a bit arbitrary, but better than creating zero markers */
+ copy_v2_v2(plane_marker.corners[0], plane_track->markers[0].corners[0]);
+ copy_v2_v2(plane_marker.corners[1], plane_track->markers[0].corners[1]);
+ copy_v2_v2(plane_marker.corners[2], plane_track->markers[0].corners[2]);
+ copy_v2_v2(plane_marker.corners[3], plane_track->markers[0].corners[3]);
+
+ new_plane_marker = BKE_tracking_plane_marker_insert(plane_track, &plane_marker);
+
+ WM_main_add_notifier(NC_MOVIECLIP | NA_EDITED, NULL);
+
+ return new_plane_marker;
+}
+
+static void rna_trackingPlaneMarkers_delete_frame(MovieTrackingPlaneTrack *plane_track, int framenr)
+{
+ if (plane_track->markersnr == 1)
+ return;
+
+ BKE_tracking_plane_marker_delete(plane_track, framenr);
+
+ WM_main_add_notifier(NC_MOVIECLIP | NA_EDITED, NULL);
+}
+
#else
static EnumPropertyItem tracker_motion_model[] = {
@@ -646,9 +711,6 @@ static EnumPropertyItem pattern_match_items[] = {
{0, NULL, 0, NULL, NULL}
};
-static int rna_matrix_dimsize_4x4[] = {4, 4};
-static int rna_matrix_dimsize_4x2[] = {4, 2};
-
static void rna_def_trackingSettings(BlenderRNA *brna)
{
StructRNA *srna;
@@ -705,22 +767,6 @@ static void rna_def_trackingSettings(BlenderRNA *brna)
"Limit speed of tracking to make visual feedback easier "
"(this does not affect the tracking quality)");
- /* reconstruction success_threshold */
- prop = RNA_def_property(srna, "reconstruction_success_threshold", PROP_FLOAT, PROP_NONE);
- RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_float_default(prop, 0.001f);
- RNA_def_property_range(prop, 0, FLT_MAX);
- RNA_def_property_ui_text(prop, "Success Threshold",
- "Threshold value of reconstruction error which is still considered successful");
-
- /* use fallback reconstruction */
- prop = RNA_def_property(srna, "use_fallback_reconstruction", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_boolean_sdna(prop, NULL, "reconstruction_flag", TRACKING_USE_FALLBACK_RECONSTRUCTION);
- RNA_def_property_ui_text(prop, "Use Fallback",
- "Use fallback reconstruction algorithm in cases main reconstruction algorithm failed "
- "(could give better solution with bad tracks)");
-
/* use keyframe selection */
prop = RNA_def_property(srna, "use_keyframe_selection", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
@@ -998,7 +1044,7 @@ static void rna_def_trackingMarker(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "framenr");
RNA_def_property_ui_text(prop, "Frame", "Frame number marker is keyframed on");
RNA_def_property_int_funcs(prop, NULL, "rna_trackingMarker_frame_set", NULL);
- RNA_def_property_update(prop, NC_MOVIECLIP | NA_EDITED, 0);
+ RNA_def_property_update(prop, NC_MOVIECLIP | NA_EDITED, NULL);
/* enable */
prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
@@ -1067,11 +1113,11 @@ static void rna_def_trackingMarkers(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_return(func, parm);
func = RNA_def_function(srna, "insert_frame", "rna_trackingMarkers_insert_frame");
- RNA_def_function_ui_description(func, "Add a number of tracks to this movie clip");
+ RNA_def_function_ui_description(func, "Insert a new marker at the specified frame");
parm = RNA_def_int(func, "frame", 1, MINFRAME, MAXFRAME, "Frame",
"Frame number to insert marker to", MINFRAME, MAXFRAME);
RNA_def_property_flag(parm, PROP_REQUIRED);
- RNA_def_float_vector(func, "co", 2, 0, -1.0, 1.0, "Coordinate",
+ RNA_def_float_vector(func, "co", 2, NULL, -1.0, 1.0, "Coordinate",
"Place new marker at the given frame using specified in normalized space coordinates",
-1.0, 1.0);
RNA_def_property_flag(parm, PROP_REQUIRED);
@@ -1293,6 +1339,12 @@ static void rna_def_trackingTrack(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "GreasePencil");
RNA_def_property_ui_text(prop, "Grease Pencil", "Grease pencil data for this track");
RNA_def_property_update(prop, NC_MOVIECLIP | ND_DISPLAY, NULL);
+
+ /* weight */
+ prop = RNA_def_property(srna, "weight", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "weight");
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_text(prop, "Weight", "How much this track affects on a final solution");
}
static void rna_def_trackingPlaneMarker(BlenderRNA *brna)
@@ -1308,7 +1360,7 @@ static void rna_def_trackingPlaneMarker(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "framenr");
RNA_def_property_ui_text(prop, "Frame", "Frame number marker is keyframed on");
RNA_def_property_int_funcs(prop, NULL, "rna_trackingPlaneMarker_frame_set", NULL);
- RNA_def_property_update(prop, NC_MOVIECLIP | NA_EDITED, 0);
+ RNA_def_property_update(prop, NC_MOVIECLIP | NA_EDITED, NULL);
/* Corners */
prop = RNA_def_property(srna, "corners", PROP_FLOAT, PROP_MATRIX);
@@ -1317,7 +1369,7 @@ static void rna_def_trackingPlaneMarker(BlenderRNA *brna)
RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x2);
RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, RNA_TRANSLATION_PREC_DEFAULT);
RNA_def_property_ui_text(prop, "Corners",
- "Array of coordinates which represents UI rectange corners in "
+ "Array of coordinates which represents UI rectangle corners in "
"frame normalized coordinates");
RNA_def_property_update(prop, NC_MOVIECLIP | NA_EDITED, NULL);
@@ -1331,11 +1383,38 @@ static void rna_def_trackingPlaneMarker(BlenderRNA *brna)
static void rna_def_trackingPlaneMarkers(BlenderRNA *brna, PropertyRNA *cprop)
{
StructRNA *srna;
+ FunctionRNA *func;
+ PropertyRNA *parm;
RNA_def_property_srna(cprop, "MovieTrackingPlaneMarkers");
srna = RNA_def_struct(brna, "MovieTrackingPlaneMarkers", NULL);
RNA_def_struct_sdna(srna, "MovieTrackingPlaneTrack");
- RNA_def_struct_ui_text(srna, "Movie Tracking Plane Markers", "Collection of markers for movie tracking plane track");
+ RNA_def_struct_ui_text(srna, "Movie Tracking Plane Markers",
+ "Collection of markers for movie tracking plane track");
+
+ func = RNA_def_function(srna, "find_frame", "rna_trackingPlaneMarkers_find_frame");
+ RNA_def_function_ui_description(func, "Get plane marker for specified frame");
+ parm = RNA_def_int(func, "frame", 1, MINFRAME, MAXFRAME, "Frame",
+ "Frame number to find marker for", MINFRAME, MAXFRAME);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_boolean(func, "exact", TRUE, "Exact",
+ "Get plane marker at exact frame number rather than get estimated marker");
+ parm = RNA_def_pointer(func, "plane_marker", "MovieTrackingPlaneMarker", "", "Plane marker for specified frame");
+ RNA_def_function_return(func, parm);
+
+ func = RNA_def_function(srna, "insert_frame", "rna_trackingPlaneMarkers_insert_frame");
+ RNA_def_function_ui_description(func, "Insert a new plane marker at the specified frame");
+ parm = RNA_def_int(func, "frame", 1, MINFRAME, MAXFRAME, "Frame",
+ "Frame number to insert marker to", MINFRAME, MAXFRAME);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm = RNA_def_pointer(func, "plane_marker", "MovieTrackingPlaneMarker", "", "Newly created plane marker");
+ RNA_def_function_return(func, parm);
+
+ func = RNA_def_function(srna, "delete_frame", "rna_trackingPlaneMarkers_delete_frame");
+ RNA_def_function_ui_description(func, "Delete plane marker at specified frame");
+ parm = RNA_def_int(func, "frame", 1, MINFRAME, MAXFRAME, "Frame",
+ "Frame number to delete plane marker from", MINFRAME, MAXFRAME);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
}
static void rna_def_trackingPlaneTrack(BlenderRNA *brna)
@@ -1370,6 +1449,12 @@ static void rna_def_trackingPlaneTrack(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", SELECT);
RNA_def_property_ui_text(prop, "Select", "Plane track is selected");
RNA_def_property_update(prop, NC_MOVIECLIP | ND_DISPLAY, NULL);
+
+ /* auto keyframing */
+ prop = RNA_def_property(srna, "use_auto_keying", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", PLANE_TRACK_AUTOKEY);
+ RNA_def_property_ui_text(prop, "Auto Keyframe", "Automatic keyframe insertion when moving plane corners");
+ RNA_def_property_ui_icon(prop, ICON_REC, 0);
}
static void rna_def_trackingStabilization(BlenderRNA *brna)
@@ -1566,10 +1651,13 @@ static void rna_def_trackingPlaneTracks(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "MovieTracking");
RNA_def_struct_ui_text(srna, "Movie Plane Tracks", "Collection of movie tracking plane tracks");
+ /* TODO(sergey): Add API to create new plane tracks */
+
/* active plane track */
prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "MovieTrackingPlaneTrack");
- RNA_def_property_pointer_funcs(prop, "rna_tracking_active_plane_track_get", "rna_tracking_active_plane_track_set", NULL, NULL);
+ RNA_def_property_pointer_funcs(prop, "rna_tracking_active_plane_track_get", "rna_tracking_active_plane_track_set",
+ NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK);
RNA_def_property_ui_text(prop, "Active Plane Track", "Active plane track in this tracking data object");
}
@@ -1613,7 +1701,8 @@ static void rna_def_trackingObjectPlaneTracks(BlenderRNA *brna)
/* active track */
prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "MovieTrackingTrack");
- RNA_def_property_pointer_funcs(prop, "rna_tracking_active_plane_track_get", "rna_tracking_active_plane_track_set", NULL, NULL);
+ RNA_def_property_pointer_funcs(prop, "rna_tracking_active_plane_track_get", "rna_tracking_active_plane_track_set",
+ NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK);
RNA_def_property_ui_text(prop, "Active Track", "Active track in this tracking data object");
}
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c
index 9efe3d9f1d6..39f305f7d47 100644
--- a/source/blender/makesrna/intern/rna_ui.c
+++ b/source/blender/makesrna/intern/rna_ui.c
@@ -31,6 +31,8 @@
#include "BLF_translation.h"
+#include "BKE_idprop.h"
+
#include "RNA_define.h"
#include "rna_internal.h"
@@ -58,12 +60,9 @@ EnumPropertyItem operator_context_items[] = {
};
EnumPropertyItem uilist_layout_type_items[] = {
- {UILST_LAYOUT_DEFAULT, "DEFAULT", 0, "Default Layout",
- "Use the default, multi-rows layout"},
- {UILST_LAYOUT_COMPACT, "COMPACT", 0, "Compact Layout",
- "Use the compact, single-row layout"},
- {UILST_LAYOUT_GRID, "GRID", 0, "Grid Layout",
- "Use the grid-based layout"},
+ {UILST_LAYOUT_DEFAULT, "DEFAULT", 0, "Default Layout", "Use the default, multi-rows layout"},
+ {UILST_LAYOUT_COMPACT, "COMPACT", 0, "Compact Layout", "Use the compact, single-row layout"},
+ {UILST_LAYOUT_GRID, "GRID", 0, "Grid Layout", "Use the grid-based layout"},
{0, NULL, 0, NULL, NULL}
};
@@ -167,7 +166,7 @@ static void panel_draw_header(const bContext *C, Panel *pnl)
RNA_parameter_list_free(&list);
}
-static void rna_Panel_unregister(Main *bmain, StructRNA *type)
+static void rna_Panel_unregister(Main *UNUSED(bmain), StructRNA *type)
{
ARegionType *art;
PanelType *pt = RNA_struct_blender_type_get(type);
@@ -269,8 +268,24 @@ static StructRNA *rna_Panel_refine(PointerRNA *ptr)
}
/* UIList */
+static unsigned int rna_UIList_filter_const_FILTER_ITEM_get(PointerRNA *UNUSED(ptr))
+{
+ return UILST_FLT_ITEM;
+}
+
+static IDProperty *rna_UIList_idprops(PointerRNA *ptr, bool create)
+{
+ uiList *ui_list = (uiList *)ptr->data;
+ if (create && !ui_list->properties) {
+ IDPropertyTemplate val = {0};
+ ui_list->properties = IDP_New(IDP_GROUP, &val, "RNA_UIList IDproperties group");
+ }
+
+ return ui_list->properties;
+}
+
static void uilist_draw_item(uiList *ui_list, bContext *C, uiLayout *layout, PointerRNA *dataptr, PointerRNA *itemptr,
- int icon, PointerRNA *active_dataptr, const char *active_propname, int index)
+ int icon, PointerRNA *active_dataptr, const char *active_propname, int index, int flt_flag)
{
extern FunctionRNA rna_UIList_draw_item_func;
@@ -290,11 +305,139 @@ static void uilist_draw_item(uiList *ui_list, bContext *C, uiLayout *layout, Poi
RNA_parameter_set_lookup(&list, "active_data", active_dataptr);
RNA_parameter_set_lookup(&list, "active_property", &active_propname);
RNA_parameter_set_lookup(&list, "index", &index);
+ RNA_parameter_set_lookup(&list, "flt_flag", &flt_flag);
+ ui_list->type->ext.call((bContext *)C, &ul_ptr, func, &list);
+
+ RNA_parameter_list_free(&list);
+}
+
+static void uilist_draw_filter(uiList *ui_list, bContext *C, uiLayout *layout)
+{
+ extern FunctionRNA rna_UIList_draw_filter_func;
+
+ PointerRNA ul_ptr;
+ ParameterList list;
+ FunctionRNA *func;
+
+ RNA_pointer_create(&CTX_wm_screen(C)->id, ui_list->type->ext.srna, ui_list, &ul_ptr);
+ func = &rna_UIList_draw_filter_func; /* RNA_struct_find_function(&ul_ptr, "draw_filter"); */
+
+ RNA_parameter_list_create(&list, &ul_ptr, func);
+ RNA_parameter_set_lookup(&list, "context", &C);
+ RNA_parameter_set_lookup(&list, "layout", &layout);
ui_list->type->ext.call((bContext *)C, &ul_ptr, func, &list);
RNA_parameter_list_free(&list);
}
+static void uilist_filter_items(uiList *ui_list, bContext *C, PointerRNA *dataptr, const char *propname)
+{
+ extern FunctionRNA rna_UIList_filter_items_func;
+
+ PointerRNA ul_ptr;
+ ParameterList list;
+ FunctionRNA *func;
+ PropertyRNA *parm;
+
+ uiListDyn *flt_data = ui_list->dyn_data;
+ int *filter_flags, *filter_neworder;
+ void *ret1, *ret2;
+ int ret_len;
+ int len = flt_data->items_len = RNA_collection_length(dataptr, propname);
+
+ RNA_pointer_create(&CTX_wm_screen(C)->id, ui_list->type->ext.srna, ui_list, &ul_ptr);
+ func = &rna_UIList_filter_items_func; /* RNA_struct_find_function(&ul_ptr, "filter_items"); */
+
+ RNA_parameter_list_create(&list, &ul_ptr, func);
+ RNA_parameter_set_lookup(&list, "context", &C);
+ RNA_parameter_set_lookup(&list, "data", dataptr);
+ RNA_parameter_set_lookup(&list, "property", &propname);
+
+ ui_list->type->ext.call((bContext *)C, &ul_ptr, func, &list);
+
+ parm = RNA_function_find_parameter(NULL, func, "filter_flags");
+ ret_len = RNA_parameter_dynamic_length_get(&list, parm);
+ if (ret_len != len && ret_len != 0) {
+ printf("%s: Error, py func returned %d items in %s, %d or none were expected.\n", AT,
+ RNA_parameter_dynamic_length_get(&list, parm), "filter_flags", len);
+ RNA_parameter_list_free(&list);
+ return;
+ }
+ RNA_parameter_get(&list, parm, &ret1);
+ filter_flags = (int *)ret1;
+
+ parm = RNA_function_find_parameter(NULL, func, "filter_neworder");
+ ret_len = RNA_parameter_dynamic_length_get(&list, parm);
+ if (ret_len != len && ret_len != 0) {
+ printf("%s: Error, py func returned %d items in %s, %d or none were expected.\n", AT,
+ RNA_parameter_dynamic_length_get(&list, parm), "filter_neworder", len);
+ RNA_parameter_list_free(&list);
+ return;
+ }
+ RNA_parameter_get(&list, parm, &ret2);
+ filter_neworder = (int *)ret2;
+
+ /* We have to do some final checks and transforms... */
+ {
+ int i, filter_exclude = ui_list->filter_flag & UILST_FLT_EXCLUDE;
+ if (filter_flags) {
+ flt_data->items_filter_flags = MEM_mallocN(sizeof(int) * len, AT);
+ memcpy(flt_data->items_filter_flags, filter_flags, sizeof(int) * len);
+
+ if (filter_neworder) {
+ /* For sake of simplicity, py filtering is expected to filter all items, but we actually only want
+ * reordering data for shown items!
+ */
+ int items_shown, shown_idx;
+ int t_idx, t_ni, prev_ni;
+ flt_data->items_shown = 0;
+ for (i = 0, shown_idx = 0; i < len; i++) {
+ if ((filter_flags[i] & UILST_FLT_ITEM) ^ filter_exclude) {
+ filter_neworder[shown_idx++] = filter_neworder[i];
+ }
+ }
+ items_shown = flt_data->items_shown = shown_idx;
+ flt_data->items_filter_neworder = MEM_mallocN(sizeof(int) * items_shown, AT);
+ /* And now, bring back new indices into the [0, items_shown[ range!
+ * XXX This is O(N²)... :/
+ */
+ for (shown_idx = 0, prev_ni = -1; shown_idx < items_shown; shown_idx++) {
+ for (i = 0, t_ni = len, t_idx = -1; i < items_shown; i++) {
+ int ni = filter_neworder[i];
+ if (ni > prev_ni && ni < t_ni) {
+ t_idx = i;
+ t_ni = ni;
+ }
+ }
+ if (t_idx >= 0) {
+ prev_ni = t_ni;
+ flt_data->items_filter_neworder[t_idx] = shown_idx;
+ }
+ }
+ }
+ else {
+ /* we still have to set flt_data->items_shown... */
+ flt_data->items_shown = 0;
+ for (i = 0; i < len; i++) {
+ if ((filter_flags[i] & UILST_FLT_ITEM) ^ filter_exclude) {
+ flt_data->items_shown++;
+ }
+ }
+ }
+ }
+ else {
+ flt_data->items_shown = len;
+
+ if (filter_neworder) {
+ flt_data->items_filter_neworder = MEM_mallocN(sizeof(int) * len, AT);
+ memcpy(flt_data->items_filter_neworder, filter_neworder, sizeof(int) * len);
+ }
+ }
+ }
+
+ RNA_parameter_list_free(&list);
+}
+
static void rna_UIList_unregister(Main *UNUSED(bmain), StructRNA *type)
{
uiListType *ult = RNA_struct_blender_type_get(type);
@@ -318,7 +461,7 @@ static StructRNA *rna_UIList_register(Main *bmain, ReportList *reports, void *da
uiListType *ult, dummyult = {NULL};
uiList dummyuilist = {NULL};
PointerRNA dummyul_ptr;
- int have_function[1];
+ int have_function[3];
size_t over_alloc = 0; /* warning, if this becomes a bess, we better do another alloc */
/* setup dummy menu & menu type to store static properties in */
@@ -349,9 +492,10 @@ static StructRNA *rna_UIList_register(Main *bmain, ReportList *reports, void *da
ult->ext.call = call;
ult->ext.free = free;
RNA_struct_blender_type_set(ult->ext.srna, ult);
- RNA_def_struct_flag(ult->ext.srna, STRUCT_NO_IDPROPERTIES);
ult->draw_item = (have_function[0]) ? uilist_draw_item : NULL;
+ ult->draw_filter = (have_function[1]) ? uilist_draw_filter : NULL;
+ ult->filter_items = (have_function[2]) ? uilist_filter_items : NULL;
WM_uilisttype_add(ult);
@@ -874,8 +1018,46 @@ static void rna_def_uilist(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "uiList");
RNA_def_struct_refine_func(srna, "rna_UIList_refine");
RNA_def_struct_register_funcs(srna, "rna_UIList_register", "rna_UIList_unregister", NULL);
+ RNA_def_struct_idprops_func(srna, "rna_UIList_idprops");
- /* draw */
+ /* Registration */
+ prop = RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "type->idname");
+ RNA_def_property_flag(prop, PROP_REGISTER | PROP_NEVER_CLAMP);
+ RNA_def_property_ui_text(prop, "ID Name",
+ "If this is set, the uilist gets a custom ID, otherwise it takes the "
+ "name of the class used to define the uilist (for example, if the "
+ "class name is \"OBJECT_UL_vgroups\", and bl_idname is not set by the "
+ "script, then bl_idname = \"OBJECT_UL_vgroups\")");
+
+ /* Data */
+ prop = RNA_def_property(srna, "layout_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, uilist_layout_type_items);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+
+ /* Filter options */
+ prop = RNA_def_property(srna, "use_filter_show", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "filter_flag", UILST_FLT_SHOW);
+ RNA_def_property_ui_text(prop, "Show Filter", "Show filtering options");
+
+ prop = RNA_def_property(srna, "filter_name", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "filter_byname");
+ RNA_def_property_ui_text(prop, "Filter by Name", "Only show items matching this name (use '*' as wildcard)");
+
+ prop = RNA_def_property(srna, "use_filter_invert", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "filter_flag", UILST_FLT_EXCLUDE);
+ RNA_def_property_ui_text(prop, "Invert", "Invert filtering (show hidden items, and vice-versa)");
+
+ prop = RNA_def_property(srna, "use_filter_sort_alpha", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "filter_sort_flag", UILST_FLT_SORT_ALPHA);
+ RNA_def_property_ui_icon(prop, ICON_SORTALPHA, 0);
+ RNA_def_property_ui_text(prop, "Sort by Name", "Sort items by their name");
+
+ prop = RNA_def_property(srna, "use_filter_sort_reverse", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "filter_sort_flag", UILST_FLT_SORT_REVERSE);
+ RNA_def_property_ui_text(prop, "Invert", "Invert the order of shown items");
+
+ /* draw_item */
func = RNA_def_function(srna, "draw_item", NULL);
RNA_def_function_ui_description(func, "Draw an item in the list (NOTE: when you define your own draw_item "
"function, you may want to check given 'item' is of the right type...)");
@@ -897,21 +1079,52 @@ static void rna_def_uilist(BlenderRNA *brna)
"Identifier of property in active_data, for the active element");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_int(func, "index", 0, 0, INT_MAX, "", "Index of the item in the collection", 0, INT_MAX);
+ RNA_def_property_flag(parm, PROP_REQUIRED | PROP_PYFUNC_OPTIONAL);
+ prop = RNA_def_property(func, "flt_flag", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_ui_text(prop, "", "The filter-flag result for this item");
+ RNA_def_property_flag(parm, PROP_REQUIRED | PROP_PYFUNC_OPTIONAL);
+
+ /* draw_filter */
+ func = RNA_def_function(srna, "draw_filter", NULL);
+ RNA_def_function_ui_description(func, "Draw filtering options");
+ RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
+ parm = RNA_def_pointer(func, "context", "Context", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm = RNA_def_pointer(func, "layout", "UILayout", "", "Layout to draw the item");
+ RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
- prop = RNA_def_property(srna, "layout_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, uilist_layout_type_items);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ /* filter */
+ func = RNA_def_function(srna, "filter_items", NULL);
+ RNA_def_function_ui_description(func, "Filter and/or re-order items of the collection (output filter results in "
+ "filter_flags, and reorder results in filter_neworder arrays)");
+ RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
+ parm = RNA_def_pointer(func, "context", "Context", "", "");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm = RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take Collection property");
+ RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR);
+ parm = RNA_def_string(func, "property", "", 0, "", "Identifier of property in data, for the collection");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ prop = RNA_def_property(func, "filter_flags", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_flag(prop, PROP_REQUIRED | PROP_DYNAMIC);
+ RNA_def_property_array(prop, 1); /* XXX Dummy value, default 0 does not work */
+ RNA_def_property_ui_text(prop, "", "An array of filter flags, one for each item in the collection (NOTE: "
+ "FILTER_ITEM bit is reserved, it defines whether the item is shown or not)");
+ RNA_def_function_output(func, prop);
+ prop = RNA_def_property(func, "filter_neworder", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_flag(prop, PROP_REQUIRED | PROP_DYNAMIC);
+ RNA_def_property_array(prop, 1); /* XXX Dummy value, default 0 does not work */
+ RNA_def_property_ui_text(prop, "", "An array of indices, one for each item in the collection, mapping the org "
+ "index to the new one");
+ RNA_def_function_output(func, prop);
+
+ /* "Constants"! */
+ RNA_define_verify_sdna(0); /* not in sdna */
- /* registration */
- prop = RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
- RNA_def_property_string_sdna(prop, NULL, "type->idname");
- RNA_def_property_flag(prop, PROP_REGISTER | PROP_NEVER_CLAMP);
- RNA_def_property_ui_text(prop, "ID Name",
- "If this is set, the uilist gets a custom ID, otherwise it takes the "
- "name of the class used to define the uilist (for example, if the "
- "class name is \"OBJECT_UL_vgroups\", and bl_idname is not set by the "
- "script, then bl_idname = \"OBJECT_UL_vgroups\")");
+ prop = RNA_def_property(srna, "bitflag_filter_item", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_ui_text(prop, "FILTER_ITEM",
+ "The value of the reserved bitflag 'FILTER_ITEM' (in filter_flags values)");
+ RNA_def_property_int_funcs(prop, "rna_UIList_filter_const_FILTER_ITEM_get", NULL, NULL);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
}
static void rna_def_header(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index 2d89317b4ae..d79a40aa615 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -428,7 +428,7 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_function_ui_description(func,
"Sub-layout. Items placed in this sublayout are placed next to each other "
"in a row");
- RNA_def_boolean(func, "align", 0, "", "Align buttons to each other");
+ RNA_def_boolean(func, "align", false, "", "Align buttons to each other");
func = RNA_def_function(srna, "column", "uiLayoutColumn");
parm = RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in");
@@ -436,13 +436,13 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_function_ui_description(func,
"Sub-layout. Items placed in this sublayout are placed under each other "
"in a column");
- RNA_def_boolean(func, "align", 0, "", "Align buttons to each other");
+ RNA_def_boolean(func, "align", false, "", "Align buttons to each other");
func = RNA_def_function(srna, "column_flow", "uiLayoutColumnFlow");
RNA_def_int(func, "columns", 0, 0, INT_MAX, "", "Number of columns, 0 is automatic", 0, INT_MAX);
parm = RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in");
RNA_def_function_return(func, parm);
- RNA_def_boolean(func, "align", 0, "", "Align buttons to each other");
+ RNA_def_boolean(func, "align", false, "", "Align buttons to each other");
/* box layout */
func = RNA_def_function(srna, "box", "uiLayoutBox");
@@ -456,7 +456,7 @@ void RNA_api_ui_layout(StructRNA *srna)
parm = RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in");
RNA_def_function_return(func, parm);
RNA_def_float(func, "percentage", 0.0f, 0.0f, 1.0f, "Percentage", "Percentage of width to split at", 0.0f, 1.0f);
- RNA_def_boolean(func, "align", 0, "", "Align buttons to each other");
+ RNA_def_boolean(func, "align", false, "", "Align buttons to each other");
/* Icon of a rna pointer */
func = RNA_def_function(srna, "icon", "rna_ui_get_rnaptr_icon");
@@ -501,13 +501,13 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_function_ui_description(func, "Item. Exposes an RNA item and places it into the layout");
api_ui_item_rna_common(func);
api_ui_item_common(func);
- RNA_def_boolean(func, "expand", 0, "", "Expand button to show more detail");
- RNA_def_boolean(func, "slider", 0, "", "Use slider widget for numeric values");
- RNA_def_boolean(func, "toggle", 0, "", "Use toggle widget for boolean values");
- RNA_def_boolean(func, "icon_only", 0, "", "Draw only icons in buttons, no text");
- RNA_def_boolean(func, "event", 0, "", "Use button to input key events");
- RNA_def_boolean(func, "full_event", 0, "", "Use button to input full events including modifiers");
- RNA_def_boolean(func, "emboss", 1, "", "Draw the button itself, just the icon/text");
+ RNA_def_boolean(func, "expand", false, "", "Expand button to show more detail");
+ RNA_def_boolean(func, "slider", false, "", "Use slider widget for numeric values");
+ RNA_def_boolean(func, "toggle", false, "", "Use toggle widget for boolean values");
+ RNA_def_boolean(func, "icon_only", false, "", "Draw only icons in buttons, no text");
+ RNA_def_boolean(func, "event", false, "", "Use button to input key events");
+ RNA_def_boolean(func, "full_event", false, "", "Use button to input full events including modifiers");
+ RNA_def_boolean(func, "emboss", true, "", "Draw the button itself, just the icon/text");
RNA_def_int(func, "index", -1, -2, INT_MAX, "",
"The index of this button, when set a single member of an array can be accessed, "
"when set to -1 all array members are used", -2, INT_MAX); /* RNA_NO_INDEX == -1 */
@@ -535,7 +535,7 @@ void RNA_api_ui_layout(StructRNA *srna)
func = RNA_def_function(srna, "operator", "rna_uiItemO");
api_ui_item_op_common(func);
- RNA_def_boolean(func, "emboss", 1, "", "Draw the button itself, just the icon/text");
+ RNA_def_boolean(func, "emboss", true, "", "Draw the button itself, just the icon/text");
parm = RNA_def_pointer(func, "properties", "OperatorProperties", "",
"Operator properties to fill in, return when 'properties' is set to true");
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR);
@@ -569,7 +569,7 @@ void RNA_api_ui_layout(StructRNA *srna)
api_ui_item_op_common(func);
parm = RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm = RNA_def_boolean(func, "value", 0, "", "Value of the property to call the operator with");
+ parm = RNA_def_boolean(func, "value", false, "", "Value of the property to call the operator with");
RNA_def_property_flag(parm, PROP_REQUIRED); */
func = RNA_def_function(srna, "operator_int", "uiItemIntO");
@@ -623,7 +623,7 @@ void RNA_api_ui_layout(StructRNA *srna)
/* templates */
func = RNA_def_function(srna, "template_header", "uiTemplateHeader");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
- RNA_def_boolean(func, "menus", 1, "", "The header has menus, and should show menu expander");
+ RNA_def_boolean(func, "menus", true, "", "The header has menus, and should show menu expander");
func = RNA_def_function(srna, "template_ID", "uiTemplateID");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
@@ -679,7 +679,7 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_function_ui_description(func, "Item. A preview window for materials, textures, lamps, etc");
parm = RNA_def_pointer(func, "id", "ID", "", "ID datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
- RNA_def_boolean(func, "show_buttons", 1, "", "Show preview buttons?");
+ RNA_def_boolean(func, "show_buttons", true, "", "Show preview buttons?");
RNA_def_pointer(func, "parent", "ID", "", "ID datablock");
RNA_def_pointer(func, "slot", "TextureSlot", "", "Texture slot");
@@ -687,13 +687,13 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_function_ui_description(func, "Item. A curve mapping widget used for e.g falloff curves for lamps");
api_ui_item_rna_common(func);
RNA_def_enum(func, "type", curve_type_items, 0, "Type", "Type of curves to display");
- RNA_def_boolean(func, "levels", 0, "", "Show black/white levels");
- RNA_def_boolean(func, "brush", 0, "", "Show brush options");
+ RNA_def_boolean(func, "levels", false, "", "Show black/white levels");
+ RNA_def_boolean(func, "brush", false, "", "Show brush options");
func = RNA_def_function(srna, "template_color_ramp", "uiTemplateColorRamp");
RNA_def_function_ui_description(func, "Item. A color ramp widget");
api_ui_item_rna_common(func);
- RNA_def_boolean(func, "expand", 0, "", "Expand button to show more detail");
+ RNA_def_boolean(func, "expand", false, "", "Expand button to show more detail");
func = RNA_def_function(srna, "template_icon_view", "uiTemplateIconView");
RNA_def_function_ui_description(func, "Enum. Large widget showing Icon previews");
@@ -723,10 +723,10 @@ void RNA_api_ui_layout(StructRNA *srna)
func = RNA_def_function(srna, "template_color_picker", "uiTemplateColorPicker");
RNA_def_function_ui_description(func, "Item. A color wheel widget to pick colors");
api_ui_item_rna_common(func);
- RNA_def_boolean(func, "value_slider", 0, "", "Display the value slider to the right of the color wheel");
- RNA_def_boolean(func, "lock", 0, "", "Lock the color wheel display to value 1.0 regardless of actual color");
- RNA_def_boolean(func, "lock_luminosity", 0, "", "Keep the color at its original vector length");
- RNA_def_boolean(func, "cubic", 1, "", "Cubic saturation for picking values close to white");
+ RNA_def_boolean(func, "value_slider", false, "", "Display the value slider to the right of the color wheel");
+ RNA_def_boolean(func, "lock", false, "", "Lock the color wheel display to value 1.0 regardless of actual color");
+ RNA_def_boolean(func, "lock_luminosity", false, "", "Keep the color at its original vector length");
+ RNA_def_boolean(func, "cubic", true, "", "Cubic saturation for picking values close to white");
func = RNA_def_function(srna, "template_image_layers", "uiTemplateImageLayers");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
@@ -741,19 +741,19 @@ void RNA_api_ui_layout(StructRNA *srna)
api_ui_item_rna_common(func);
parm = RNA_def_pointer(func, "image_user", "ImageUser", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR | PROP_NEVER_NULL);
- RNA_def_boolean(func, "compact", 0, "", "Use more compact layout");
+ RNA_def_boolean(func, "compact", false, "", "Use more compact layout");
func = RNA_def_function(srna, "template_image_settings", "uiTemplateImageSettings");
RNA_def_function_ui_description(func, "User interface for setting image format options");
parm = RNA_def_pointer(func, "image_settings", "ImageFormatSettings", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR | PROP_NEVER_NULL);
- RNA_def_boolean(func, "color_management", 0, "", "Show color management settings");
+ RNA_def_boolean(func, "color_management", false, "", "Show color management settings");
func = RNA_def_function(srna, "template_movieclip", "uiTemplateMovieClip");
RNA_def_function_ui_description(func, "Item(s). User interface for selecting movie clips and their source paths");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
api_ui_item_rna_common(func);
- RNA_def_boolean(func, "compact", 0, "", "Use more compact layout");
+ RNA_def_boolean(func, "compact", false, "", "Use more compact layout");
func = RNA_def_function(srna, "template_track", "uiTemplateTrack");
RNA_def_function_ui_description(func, "Item. A movie-track widget to preview tracking image.");
@@ -766,7 +766,7 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR | PROP_NEVER_NULL);
parm = RNA_def_pointer(func, "track", "MovieTrackingTrack", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR | PROP_NEVER_NULL);
- RNA_def_boolean(func, "compact", 0, "", "Use more compact layout");
+ RNA_def_boolean(func, "compact", false, "", "Use more compact layout");
func = RNA_def_function(srna, "template_movieclip_information", "uiTemplateMovieclipInformation");
RNA_def_function_ui_description(func, "Item. Movie clip information data.");
@@ -796,9 +796,10 @@ void RNA_api_ui_layout(StructRNA *srna)
parm = RNA_def_string(func, "active_propname", "", 0, "",
"Identifier of the integer property in active_data, index of the active item");
RNA_def_property_flag(parm, PROP_REQUIRED);
- RNA_def_int(func, "rows", 5, 0, INT_MAX, "", "Number of rows to display", 0, INT_MAX);
- RNA_def_int(func, "maxrows", 5, 0, INT_MAX, "", "Maximum number of rows to display", 0, INT_MAX);
+ RNA_def_int(func, "rows", 5, 0, INT_MAX, "", "Default and minimum number of rows to display", 0, INT_MAX);
+ RNA_def_int(func, "maxrows", 5, 0, INT_MAX, "", "Default maximum number of rows to display", 0, INT_MAX);
RNA_def_enum(func, "type", uilist_layout_type_items, UILST_LAYOUT_DEFAULT, "Type", "Type of layout to use");
+ RNA_def_int(func, "columns", 9, 0, INT_MAX, "", "Number of items to display per row, for GRID layout", 0, INT_MAX);
func = RNA_def_function(srna, "template_running_jobs", "uiTemplateRunningJobs");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
@@ -859,7 +860,7 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_function_ui_description(func, "Item. A widget to control color managed view settings settings.");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
api_ui_item_rna_common(func);
- /* RNA_def_boolean(func, "show_global_settings", 0, "", "Show widgets to control global color management settings"); */
+ /* RNA_def_boolean(func, "show_global_settings", false, "", "Show widgets to control global color management settings"); */
/* node socket icon */
func = RNA_def_function(srna, "template_node_socket", "uiTemplateNodeSocket");
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index f34366a23c7..2a12194dfa1 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -505,6 +505,7 @@ static EnumPropertyItem *rna_userdef_audio_device_itemf(bContext *UNUSED(C), Poi
return item;
}
#else
+ (void)free;
return audio_device_items;
#endif
}
@@ -2134,6 +2135,18 @@ static void rna_def_userdef_theme_space_image(BlenderRNA *brna)
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Stitch preview active island", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
+
+ prop = RNA_def_property(srna, "uv_shadow", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_float_sdna(prop, NULL, "uv_shadow");
+ RNA_def_property_array(prop, 4);
+ RNA_def_property_ui_text(prop, "Texture paint/Modifier UVs", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
+
+ prop = RNA_def_property(srna, "uv_others", PROP_FLOAT, PROP_COLOR_GAMMA);
+ RNA_def_property_float_sdna(prop, NULL, "uv_others");
+ RNA_def_property_array(prop, 4);
+ RNA_def_property_ui_text(prop, "Other Object UVs", "");
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_theme_space_seq(BlenderRNA *brna)
@@ -2896,7 +2909,7 @@ static void rna_def_userdef_view(BlenderRNA *brna)
prop = RNA_def_property(srna, "show_tooltips_python", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_TOOLTIPS_PYTHON);
- RNA_def_property_ui_text(prop, "Show Python Tooltips", "Show Python references in tooltips");
+ RNA_def_property_ui_text(prop, "Python Tooltips", "Show Python references in tooltips");
prop = RNA_def_property(srna, "show_object_info", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_DRAWVIEWINFO);
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index 0d1c684e6a1..dd338713d3e 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -43,7 +43,8 @@
#include "WM_types.h"
-EnumPropertyItem event_keymouse_value_items[] = {
+#ifdef RNA_RUNTIME
+static EnumPropertyItem event_keymouse_value_items[] = {
{KM_ANY, "ANY", 0, "Any", ""},
{KM_PRESS, "PRESS", 0, "Press", ""},
{KM_RELEASE, "RELEASE", 0, "Release", ""},
@@ -52,7 +53,7 @@ EnumPropertyItem event_keymouse_value_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem event_tweak_value_items[] = {
+static EnumPropertyItem event_tweak_value_items[] = {
{KM_ANY, "ANY", 0, "Any", ""},
{EVT_GESTURE_N, "NORTH", 0, "North", ""},
{EVT_GESTURE_NE, "NORTH_EAST", 0, "North-East", ""},
@@ -65,25 +66,7 @@ EnumPropertyItem event_tweak_value_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem event_value_items[] = {
- {KM_ANY, "ANY", 0, "Any", ""},
- {KM_NOTHING, "NOTHING", 0, "Nothing", ""},
- {KM_PRESS, "PRESS", 0, "Press", ""},
- {KM_RELEASE, "RELEASE", 0, "Release", ""},
- {KM_CLICK, "CLICK", 0, "Click", ""},
- {KM_DBL_CLICK, "DOUBLE_CLICK", 0, "Double Click", ""},
- {EVT_GESTURE_N, "NORTH", 0, "North", ""},
- {EVT_GESTURE_NE, "NORTH_EAST", 0, "North-East", ""},
- {EVT_GESTURE_E, "EAST", 0, "East", ""},
- {EVT_GESTURE_SE, "SOUTH_EAST", 0, "South-East", ""},
- {EVT_GESTURE_S, "SOUTH", 0, "South", ""},
- {EVT_GESTURE_SW, "SOUTH_WEST", 0, "South-West", ""},
- {EVT_GESTURE_W, "WEST", 0, "West", ""},
- {EVT_GESTURE_NW, "NORTH_WEST", 0, "North-West", ""},
- {0, NULL, 0, NULL, NULL}
-};
-
-EnumPropertyItem event_tweak_type_items[] = {
+static EnumPropertyItem event_tweak_type_items[] = {
{EVT_TWEAK_L, "EVT_TWEAK_L", 0, "Left", ""},
{EVT_TWEAK_M, "EVT_TWEAK_M", 0, "Middle", ""},
{EVT_TWEAK_R, "EVT_TWEAK_R", 0, "Right", ""},
@@ -92,7 +75,7 @@ EnumPropertyItem event_tweak_type_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem event_mouse_type_items[] = {
+static EnumPropertyItem event_mouse_type_items[] = {
{LEFTMOUSE, "LEFTMOUSE", 0, "Left", ""},
{MIDDLEMOUSE, "MIDDLEMOUSE", 0, "Middle", ""},
{RIGHTMOUSE, "RIGHTMOUSE", 0, "Right", ""},
@@ -113,7 +96,7 @@ EnumPropertyItem event_mouse_type_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem event_timer_type_items[] = {
+static EnumPropertyItem event_timer_type_items[] = {
{TIMER, "TIMER", 0, "Timer", ""},
{TIMER0, "TIMER0", 0, "Timer 0", ""},
{TIMER1, "TIMER1", 0, "Timer 1", ""},
@@ -125,12 +108,12 @@ EnumPropertyItem event_timer_type_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem event_textinput_type_items[] = {
+static EnumPropertyItem event_textinput_type_items[] = {
{KM_TEXTINPUT, "TEXTINPUT", 0, "Text Input", ""},
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem event_ndof_type_items[] = {
+static EnumPropertyItem event_ndof_type_items[] = {
{NDOF_MOTION, "NDOF_MOTION", 0, "Motion", ""},
/* buttons on all 3dconnexion devices */
{NDOF_BUTTON_MENU, "NDOF_BUTTON_MENU", 0, "Menu", ""},
@@ -179,6 +162,7 @@ EnumPropertyItem event_ndof_type_items[] = {
{NDOF_BUTTON_C, "NDOF_BUTTON_C", 0, "Button C", ""},
{0, NULL, 0, NULL, NULL}
};
+#endif
/* not returned: CAPSLOCKKEY, UNKNOWNKEY */
EnumPropertyItem event_type_items[] = {
@@ -386,6 +370,24 @@ EnumPropertyItem event_type_items[] = {
{0, NULL, 0, NULL, NULL}
};
+EnumPropertyItem event_value_items[] = {
+ {KM_ANY, "ANY", 0, "Any", ""},
+ {KM_NOTHING, "NOTHING", 0, "Nothing", ""},
+ {KM_PRESS, "PRESS", 0, "Press", ""},
+ {KM_RELEASE, "RELEASE", 0, "Release", ""},
+ {KM_CLICK, "CLICK", 0, "Click", ""},
+ {KM_DBL_CLICK, "DOUBLE_CLICK", 0, "Double Click", ""},
+ {EVT_GESTURE_N, "NORTH", 0, "North", ""},
+ {EVT_GESTURE_NE, "NORTH_EAST", 0, "North-East", ""},
+ {EVT_GESTURE_E, "EAST", 0, "East", ""},
+ {EVT_GESTURE_SE, "SOUTH_EAST", 0, "South-East", ""},
+ {EVT_GESTURE_S, "SOUTH", 0, "South", ""},
+ {EVT_GESTURE_SW, "SOUTH_WEST", 0, "South-West", ""},
+ {EVT_GESTURE_W, "WEST", 0, "West", ""},
+ {EVT_GESTURE_NW, "NORTH_WEST", 0, "North-West", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
EnumPropertyItem keymap_propvalue_items[] = {
{0, "NONE", 0, "", ""},
{0, NULL, 0, NULL, NULL}
@@ -401,7 +403,9 @@ static EnumPropertyItem keymap_modifiers_items[] = {
};
#endif
-EnumPropertyItem operator_flag_items[] = {
+
+#ifndef RNA_RUNTIME
+static EnumPropertyItem operator_flag_items[] = {
{OPTYPE_REGISTER, "REGISTER", 0, "Register", "Display in the info window and support the redo toolbar panel"},
{OPTYPE_UNDO, "UNDO", 0, "Undo", "Push an undo event (needed for operator redo)"},
{OPTYPE_BLOCKING, "BLOCKING", 0, "Blocking", "Block anything else from using the cursor"},
@@ -413,6 +417,7 @@ EnumPropertyItem operator_flag_items[] = {
{OPTYPE_INTERNAL, "INTERNAL", 0, "Internal", "Removes the operator from search results"},
{0, NULL, 0, NULL, NULL}
};
+#endif
EnumPropertyItem operator_return_items[] = {
{OPERATOR_RUNNING_MODAL, "RUNNING_MODAL", 0, "Running Modal", "Keep the operator running with blender"},
@@ -437,13 +442,6 @@ EnumPropertyItem wm_report_items[] = {
{0, NULL, 0, NULL, NULL}
};
-#define KMI_TYPE_KEYBOARD 0
-#define KMI_TYPE_MOUSE 1
-#define KMI_TYPE_TWEAK 2
-#define KMI_TYPE_TEXTINPUT 3
-#define KMI_TYPE_TIMER 4
-#define KMI_TYPE_NDOF 5
-
#ifdef RNA_RUNTIME
#include <assert.h>
@@ -585,7 +583,7 @@ static void rna_Window_screen_set(PointerRNA *ptr, PointerRNA value)
win->newscreen = value.data;
}
-int rna_Window_screen_assign_poll(PointerRNA *ptr, PointerRNA value)
+int rna_Window_screen_assign_poll(PointerRNA *UNUSED(ptr), PointerRNA value)
{
bScreen *screen = (bScreen *)value.id.data;
@@ -620,13 +618,7 @@ static int rna_wmKeyMapItem_map_type_get(PointerRNA *ptr)
{
wmKeyMapItem *kmi = ptr->data;
- if (ISTIMER(kmi->type)) return KMI_TYPE_TIMER;
- if (ISKEYBOARD(kmi->type)) return KMI_TYPE_KEYBOARD;
- if (ISTWEAK(kmi->type)) return KMI_TYPE_TWEAK;
- if (ISMOUSE(kmi->type)) return KMI_TYPE_MOUSE;
- if (ISNDOF(kmi->type)) return KMI_TYPE_NDOF;
- if (kmi->type == KM_TEXTINPUT) return KMI_TYPE_TEXTINPUT;
- return KMI_TYPE_KEYBOARD;
+ return WM_keymap_map_type_get(kmi);
}
static void rna_wmKeyMapItem_map_type_set(PointerRNA *ptr, int value)
@@ -1735,6 +1727,8 @@ static void rna_def_window(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "sizey");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Height", "Window height");
+
+ RNA_api_window(srna);
}
/* curve.splines */
diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c
index c822378e76e..eb84bb61e1f 100644
--- a/source/blender/makesrna/intern/rna_wm_api.c
+++ b/source/blender/makesrna/intern/rna_wm_api.c
@@ -41,8 +41,31 @@
#include "DNA_space_types.h"
#include "DNA_windowmanager_types.h"
+#include "wm_cursors.h"
+
#include "rna_internal.h" /* own include */
+/* confusingm 2 enums mixed up here */
+EnumPropertyItem window_cursor_items[] = {
+ {CURSOR_STD, "DEFAULT", 0, "Default", ""},
+ {CURSOR_NONE, "NONE", 0, "None", ""},
+ {CURSOR_WAIT, "WAIT", 0, "Wait", ""},
+ {CURSOR_EDIT, "CROSSHAIR", 0, "Crosshair", ""},
+ {CURSOR_X_MOVE, "MOVE_X", 0, "Move-X", ""},
+ {CURSOR_Y_MOVE, "MOVE_Y", 0, "Move-Y", ""},
+
+ /* new */
+ {BC_KNIFECURSOR, "KNIFE", 0, "Knife", ""},
+ {BC_TEXTEDITCURSOR, "TEXT", 0, "Text", ""},
+ {BC_PAINTBRUSHCURSOR, "PAINT_BRUSH", 0, "Paint Brush", ""},
+ {BC_HANDCURSOR, "HAND", 0, "Hand", ""},
+ {BC_EW_SCROLLCURSOR, "SCROLL_X", 0, "Scroll-X", ""},
+ {BC_NS_SCROLLCURSOR, "SCROLL_Y", 0, "Scroll-Y", ""},
+ {BC_NSEW_SCROLLCURSOR, "SCROLL_XY", 0, "Scroll-XY", ""},
+ {BC_EYEDROPPER_CURSOR, "EYEDROPPER", 0, "Eyedropper", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
#ifdef RNA_RUNTIME
#include "UI_interface.h"
@@ -95,7 +118,7 @@ struct wmStaticProgress {
} wm_progress_state = {0, 0, false};
-static void rna_progress_begin(struct wmWindowManager *wm, float min, float max)
+static void rna_progress_begin(struct wmWindowManager *UNUSED(wm), float min, float max)
{
float range = max - min;
if (range != 0) {
@@ -120,7 +143,7 @@ static void rna_progress_update(struct wmWindowManager *wm, float value)
static void rna_progress_end(struct wmWindowManager *wm)
{
if (wm_progress_state.is_valid) {
- WM_cursor_restore(wm->winactive);
+ WM_cursor_modal_restore(wm->winactive);
wm_progress_state.is_valid = false;
}
}
@@ -239,6 +262,18 @@ static wmKeyMap *rna_keymap_find_modal(wmKeyConfig *UNUSED(keyconf), const char
return ot->modalkeymap;
}
+static void rna_KeyMap_remove(wmKeyConfig *keyconfig, ReportList *reports, PointerRNA *keymap_ptr)
+{
+ wmKeyMap *keymap = keymap_ptr->data;
+
+ if (WM_keymap_remove(keyconfig, keymap) == FALSE) {
+ BKE_reportf(reports, RPT_ERROR, "KeyConfig '%s' cannot be removed", keymap->idname);
+ return;
+ }
+
+ RNA_POINTER_INVALIDATE(keymap_ptr);
+}
+
static void rna_KeyConfig_remove(wmWindowManager *wm, ReportList *reports, PointerRNA *keyconf_ptr)
{
wmKeyConfig *keyconf = keyconf_ptr->data;
@@ -299,6 +334,34 @@ static void rna_generic_op_invoke(FunctionRNA *func, int flag)
}
}
+void RNA_api_window(StructRNA *srna)
+{
+ FunctionRNA *func;
+ PropertyRNA *parm;
+
+ func = RNA_def_function(srna, "cursor_warp", "WM_cursor_warp");
+ parm = RNA_def_int(func, "x", 0, INT_MIN, INT_MAX, "", "", INT_MIN, INT_MAX);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm = RNA_def_int(func, "y", 0, INT_MIN, INT_MAX, "", "", INT_MIN, INT_MAX);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_function_ui_description(func, "Set the cursor position");
+
+ func = RNA_def_function(srna, "cursor_set", "WM_cursor_set");
+ parm = RNA_def_property(func, "cursor", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(parm, window_cursor_items);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_function_ui_description(func, "Set the cursor");
+
+ func = RNA_def_function(srna, "cursor_modal_set", "WM_cursor_modal_set");
+ parm = RNA_def_property(func, "cursor", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(parm, window_cursor_items);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_function_ui_description(func, "Set the cursor, so the previous cursor can be restored");
+
+ RNA_def_function(srna, "cursor_modal_restore", "WM_cursor_modal_restore");
+ RNA_def_function_ui_description(func, "Restore the previous cursor after calling ``cursor_modal_set``");
+}
+
void RNA_api_wm(StructRNA *srna)
{
FunctionRNA *func;
@@ -620,6 +683,12 @@ void RNA_api_keymaps(StructRNA *srna)
parm = RNA_def_pointer(func, "keymap", "KeyMap", "Key Map", "Added key map");
RNA_def_function_return(func, parm);
+ func = RNA_def_function(srna, "remove", "rna_KeyMap_remove"); /* remove_keymap */
+ RNA_def_function_flag(func, FUNC_USE_REPORTS);
+ parm = RNA_def_pointer(func, "keymap", "KeyMap", "Key Map", "Removed key map");
+ RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR);
+ RNA_def_property_clear_flag(parm, PROP_THICK_WRAP);
+
func = RNA_def_function(srna, "find", "rna_keymap_find"); /* find_keymap */
parm = RNA_def_string(func, "name", "", 0, "Name", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c
index e09fa18ffc5..7c47fd5862e 100644
--- a/source/blender/modifiers/intern/MOD_array.c
+++ b/source/blender/modifiers/intern/MOD_array.c
@@ -50,6 +50,7 @@
#include "BKE_cdderivedmesh.h"
#include "BKE_displist.h"
+#include "BKE_curve.h"
#include "BKE_mesh.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
@@ -198,7 +199,7 @@ static int *find_doubles_index_map(BMesh *bm, BMOperator *dupe_op,
/*element type argument doesn't do anything here*/
BMO_ITER (v, &oiter, find_op.slots_out, "targetmap.out", 0) {
- v2 = BMO_iter_map_value_p(&oiter);
+ v2 = BMO_iter_map_value_ptr(&oiter);
index_map[BM_elem_index_get(v)] = BM_elem_index_get(v2) + 1;
}
@@ -271,7 +272,7 @@ static void bm_merge_dm_transform(BMesh *bm, DerivedMesh *dm, float mat[4][4],
/* add new merge targets to weld operator */
BMO_ITER (v, &oiter, find_op.slots_out, "targetmap.out", 0) {
- v2 = BMO_iter_map_value_p(&oiter);
+ v2 = BMO_iter_map_value_ptr(&oiter);
/* check in case the target vertex (v2) is already marked
* for merging */
while ((v3 = BMO_slot_map_elem_get(slot_targetmap, v2))) {
@@ -318,8 +319,10 @@ static void merge_first_last(BMesh *bm,
/* add new merge targets to weld operator */
slot_targetmap = BMO_slot_get(weld_op->slots_in, "targetmap");
BMO_ITER (v, &oiter, find_op.slots_out, "targetmap.out", 0) {
- v2 = BMO_iter_map_value_p(&oiter);
- BMO_slot_map_elem_insert(weld_op, slot_targetmap, v, v2);
+ if (!BMO_slot_map_contains(slot_targetmap, v)) {
+ v2 = BMO_iter_map_value_ptr(&oiter);
+ BMO_slot_map_elem_insert(weld_op, slot_targetmap, v, v2);
+ }
}
BMO_op_finish(bm, &find_op);
@@ -343,7 +346,7 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
int *indexMap = NULL;
DerivedMesh *start_cap = NULL, *end_cap = NULL;
MVert *src_mvert;
- BMOpSlot *slot_targetmap = NULL; /* for weldop */
+ BMOpSlot *slot_targetmap = NULL; /* for weld_op */
/* need to avoid infinite recursion here */
if (amd->start_cap && amd->start_cap != ob && amd->start_cap->type == OB_MESH)
@@ -387,19 +390,19 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
BKE_object_to_mat3(amd->curve_ob, tmp_mat);
scale = mat3_to_scale(tmp_mat);
- if (!cu->path) {
+ if (!amd->curve_ob->curve_cache || !amd->curve_ob->curve_cache->path) {
cu->flag |= CU_PATH; // needed for path & bevlist
BKE_displist_make_curveTypes(scene, amd->curve_ob, 0);
}
- if (cu->path)
- length = scale * cu->path->totdist;
+ if (amd->curve_ob->curve_cache->path)
+ length = scale * amd->curve_ob->curve_cache->path->totdist;
}
}
/* calculate the maximum number of copies which will fit within the
* prescribed length */
if (amd->fit_type == MOD_ARR_FITLENGTH || amd->fit_type == MOD_ARR_FITCURVE) {
- float dist = sqrt(dot_v3v3(offset[3], offset[3]));
+ float dist = len_v3(offset[3]);
if (dist > 1e-6f)
/* this gives length = first copy start to last copy end
diff --git a/source/blender/modifiers/intern/MOD_bevel.c b/source/blender/modifiers/intern/MOD_bevel.c
index b48f434abe9..326ffba3e2e 100644
--- a/source/blender/modifiers/intern/MOD_bevel.c
+++ b/source/blender/modifiers/intern/MOD_bevel.c
@@ -46,6 +46,7 @@
#include "MOD_util.h"
#include "bmesh.h"
+#include "bmesh_tools.h"
#include "MEM_guardedalloc.h"
@@ -116,7 +117,7 @@ static DerivedMesh *applyModifier(ModifierData *md, struct Object *ob,
if ((bmd->lim_flags & MOD_BEVEL_VGROUP) && bmd->defgrp_name[0]) {
modifier_get_vgroup(ob, dm, bmd->defgrp_name, &dvert, &vgroup);
}
- BM_ITER_MESH(v, &iter, bm, BM_VERTS_OF_MESH) {
+ BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) {
if (!BM_vert_is_manifold(v))
continue;
if (vgroup != -1) {
diff --git a/source/blender/modifiers/intern/MOD_boolean_util.c b/source/blender/modifiers/intern/MOD_boolean_util.c
index 98fab9c06ff..9c8109c7856 100644
--- a/source/blender/modifiers/intern/MOD_boolean_util.c
+++ b/source/blender/modifiers/intern/MOD_boolean_util.c
@@ -266,44 +266,6 @@ static void FaceIt_Construct(
output->it = it;
}
-static Object *AddNewBlenderMesh(Scene *scene, Base *base)
-{
- /* This little function adds a new mesh object to the blender object list
- * It uses ob to duplicate data as this seems to be easier than creating
- * a new one. This new oject contains no faces nor vertices. */
- Mesh *old_me;
- Base *basen;
- Object *ob_new;
-
- /* now create a new blender object.
- * duplicating all the settings from the previous object
- * to the new one. */
- ob_new = BKE_object_copy(base->object);
-
- /* Ok we don't want to use the actual data from the
- * last object, the above function incremented the
- * number of users, so decrement it here. */
- old_me = ob_new->data;
- old_me->id.us--;
-
- /* Now create a new base to add into the linked list of
- * vase objects. */
-
- basen = MEM_mallocN(sizeof(Base), "duplibase");
- *basen = *base;
- BLI_addhead(&scene->base, basen); /* addhead: anders oneindige lus */
- basen->object = ob_new;
- basen->flag &= ~SELECT;
-
- /* Initialize the mesh data associated with this object. */
- ob_new->data = BKE_mesh_add(G.main, "Mesh");
-
- /* Finally assign the object type. */
- ob_new->type = OB_MESH;
-
- return ob_new;
-}
-
static void InterpCSGFace(
DerivedMesh *dm, DerivedMesh *orig_dm, int index, int orig_index, int nr,
float mapmat[4][4])
@@ -509,9 +471,9 @@ static void FreeMeshDescriptors(
FaceIt_Destruct(face_it);
}
-static DerivedMesh *NewBooleanDerivedMesh_intern(
+DerivedMesh *NewBooleanDerivedMesh(
DerivedMesh *dm, struct Object *ob, DerivedMesh *dm_select, struct Object *ob_select,
- int int_op_type, Material **mat, int *totmat)
+ int int_op_type)
{
float inv_mat[4][4];
@@ -567,7 +529,7 @@ static DerivedMesh *NewBooleanDerivedMesh_intern(
/* iterate through results of operation and insert
* into new object */
result = ConvertCSGDescriptorsToDerivedMesh(
- &fd_o, &vd_o, inv_mat, map_mat, mat, totmat, dm_select, ob_select, dm, ob);
+ &fd_o, &vd_o, inv_mat, map_mat, NULL, NULL, dm_select, ob_select, dm, ob);
/* free up the memory */
CSG_FreeVertexDescriptor(&vd_o);
@@ -584,67 +546,3 @@ static DerivedMesh *NewBooleanDerivedMesh_intern(
return result;
}
-
-int NewBooleanMesh(Scene *scene, Base *base, Base *base_select, int int_op_type)
-{
- Mesh *me_new;
- int a, maxmat, totmat = 0;
- Object *ob_new, *ob, *ob_select;
- Material **mat;
- DerivedMesh *result;
- DerivedMesh *dm_select;
- DerivedMesh *dm;
-
- ob = base->object;
- ob_select = base_select->object;
-
- dm = mesh_get_derived_final(scene, ob, CD_MASK_BAREMESH);
- dm_select = mesh_create_derived_view(scene, ob_select, 0); // no modifiers in editmode ??
-
- maxmat = ob->totcol + ob_select->totcol;
- mat = (Material **)MEM_mallocN(sizeof(Material *) * maxmat, "NewBooleanMeshMat");
-
- /* put some checks in for nice user feedback */
- if (dm == NULL || dm_select == NULL) {
- return 0;
- }
-
- if (!dm->getNumTessFaces(dm) || !dm_select->getNumTessFaces(dm_select)) {
- MEM_freeN(mat);
- return -1;
- }
-
- result = NewBooleanDerivedMesh_intern(dm, ob, dm_select, ob_select, int_op_type, mat, &totmat);
-
- if (result == NULL) {
- MEM_freeN(mat);
- return 0;
- }
-
- /* create a new blender mesh object - using 'base' as a template */
- ob_new = AddNewBlenderMesh(scene, base_select);
- me_new = ob_new->data;
-
- DM_to_mesh(result, me_new, ob_new, CD_MASK_MESH);
- result->release(result);
-
- dm->release(dm);
- dm_select->release(dm_select);
-
- /* add materials to object */
- for (a = 0; a < totmat; a++)
- assign_material(ob_new, mat[a], a + 1, BKE_MAT_ASSIGN_USERPREF);
-
- MEM_freeN(mat);
-
- /* update dag */
- DAG_id_tag_update(&ob_new->id, OB_RECALC_DATA);
-
- return 1;
-}
-
-DerivedMesh *NewBooleanDerivedMesh(DerivedMesh *dm, struct Object *ob, DerivedMesh *dm_select, struct Object *ob_select,
- int int_op_type)
-{
- return NewBooleanDerivedMesh_intern(dm, ob, dm_select, ob_select, int_op_type, NULL, NULL);
-}
diff --git a/source/blender/modifiers/intern/MOD_boolean_util.h b/source/blender/modifiers/intern/MOD_boolean_util.h
index 209db60f0c9..04d76d45652 100644
--- a/source/blender/modifiers/intern/MOD_boolean_util.h
+++ b/source/blender/modifiers/intern/MOD_boolean_util.h
@@ -39,12 +39,6 @@ struct Base;
struct DerivedMesh;
/* Performs a boolean between two mesh objects, it is assumed that both objects
- * are in fact a mesh object. On success returns 1 and creates a new mesh object
- * into blender data structures. On failure returns 0 and reports an error. */
-int NewBooleanMesh(struct Scene *scene, struct Base *base, struct Base *base_select, int op);
-
-
-/* Performs a boolean between two mesh objects, it is assumed that both objects
* are in fact mesh object. On success returns a DerivedMesh. On failure
* returns NULL and reports an error. */
diff --git a/source/blender/modifiers/intern/MOD_build.c b/source/blender/modifiers/intern/MOD_build.c
index 9e375b07972..a54cc80839b 100644
--- a/source/blender/modifiers/intern/MOD_build.c
+++ b/source/blender/modifiers/intern/MOD_build.c
@@ -109,7 +109,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
edgeMap = MEM_mallocN(sizeof(*edgeMap) * numEdge_src, "build modifier edgeMap");
faceMap = MEM_mallocN(sizeof(*faceMap) * numPoly_src, "build modifier faceMap");
-#pragma omp parallel sections if (numVert_src + numEdge_src + numPoly_src >= DM_OMP_LIMIT)
+#pragma omp parallel sections if (numVert_src + numEdge_src + numPoly_src >= BKE_MESH_OMP_LIMIT)
{
#pragma omp section
{ range_vn_i(vertMap, numVert_src, 0); }
diff --git a/source/blender/modifiers/intern/MOD_decimate.c b/source/blender/modifiers/intern/MOD_decimate.c
index 9fdb40e71dc..e4399d1e416 100644
--- a/source/blender/modifiers/intern/MOD_decimate.c
+++ b/source/blender/modifiers/intern/MOD_decimate.c
@@ -49,11 +49,13 @@
#include "BKE_cdderivedmesh.h"
#include "bmesh.h"
+#include "bmesh_tools.h"
// #define USE_TIMEIT
#ifdef USE_TIMEIT
# include "PIL_time.h"
+# include "PIL_time_utildefines.h"
#endif
#include "MOD_util.h"
@@ -194,9 +196,13 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
/* update for display only */
dmd->face_count = bm->totface;
result = CDDM_from_bmesh(bm, FALSE);
- BLI_assert(bm->vtoolflagpool == NULL); /* make sure we never alloc'd this */
- BLI_assert(bm->etoolflagpool == NULL);
- BLI_assert(bm->ftoolflagpool == NULL);
+ BLI_assert(bm->vtoolflagpool == NULL &&
+ bm->etoolflagpool == NULL &&
+ bm->ftoolflagpool == NULL); /* make sure we never alloc'd these */
+ BLI_assert(bm->vtable == NULL &&
+ bm->etable == NULL &&
+ bm->ftable == NULL);
+
BM_mesh_free(bm);
#ifdef USE_TIMEIT
diff --git a/source/blender/modifiers/intern/MOD_displace.c b/source/blender/modifiers/intern/MOD_displace.c
index 25254c7a30e..61f5495bee8 100644
--- a/source/blender/modifiers/intern/MOD_displace.c
+++ b/source/blender/modifiers/intern/MOD_displace.c
@@ -219,7 +219,7 @@ static void displaceModifier_do(
if (dmd->texture) {
texres.nor = NULL;
- get_texture_value(dmd->modifier.scene, dmd->texture, tex_co[i], &texres, false);
+ BKE_texture_get_value(dmd->modifier.scene, dmd->texture, tex_co[i], &texres, false);
delta = texres.tin - dmd->midlevel;
}
else {
diff --git a/source/blender/modifiers/intern/MOD_edgesplit.c b/source/blender/modifiers/intern/MOD_edgesplit.c
index b3d3e65e120..d55ebdad939 100644
--- a/source/blender/modifiers/intern/MOD_edgesplit.c
+++ b/source/blender/modifiers/intern/MOD_edgesplit.c
@@ -44,6 +44,7 @@
#include "BKE_modifier.h"
#include "bmesh.h"
+#include "bmesh_tools.h"
#include "DNA_object_types.h"
diff --git a/source/blender/modifiers/intern/MOD_explode.c b/source/blender/modifiers/intern/MOD_explode.c
index fe680041197..9fd11f78ea0 100644
--- a/source/blender/modifiers/intern/MOD_explode.c
+++ b/source/blender/modifiers/intern/MOD_explode.c
@@ -568,7 +568,7 @@ static DerivedMesh *cutEdges(ExplodeModifierData *emd, DerivedMesh *dm)
int numlayer;
unsigned int ed_v1, ed_v2;
- edgehash = BLI_edgehash_new();
+ edgehash = BLI_edgehash_new(__func__);
/* recreate vertpa from facepa calculation */
for (i = 0, mf = mface; i < totface; i++, mf++) {
@@ -586,12 +586,12 @@ static DerivedMesh *cutEdges(ExplodeModifierData *emd, DerivedMesh *dm)
v3 = vertpa[mf->v3];
if (v1 != v2) {
- BLI_edgehash_insert(edgehash, mf->v1, mf->v2, NULL);
+ BLI_edgehash_reinsert(edgehash, mf->v1, mf->v2, NULL);
(*fs) |= 1;
}
if (v2 != v3) {
- BLI_edgehash_insert(edgehash, mf->v2, mf->v3, NULL);
+ BLI_edgehash_reinsert(edgehash, mf->v2, mf->v3, NULL);
(*fs) |= 2;
}
@@ -599,24 +599,24 @@ static DerivedMesh *cutEdges(ExplodeModifierData *emd, DerivedMesh *dm)
v4 = vertpa[mf->v4];
if (v3 != v4) {
- BLI_edgehash_insert(edgehash, mf->v3, mf->v4, NULL);
+ BLI_edgehash_reinsert(edgehash, mf->v3, mf->v4, NULL);
(*fs) |= 4;
}
if (v1 != v4) {
- BLI_edgehash_insert(edgehash, mf->v1, mf->v4, NULL);
+ BLI_edgehash_reinsert(edgehash, mf->v1, mf->v4, NULL);
(*fs) |= 8;
}
/* mark center vertex as a fake edge split */
if (*fs == 15)
- BLI_edgehash_insert(edgehash, mf->v1, mf->v3, NULL);
+ BLI_edgehash_reinsert(edgehash, mf->v1, mf->v3, NULL);
}
else {
(*fs) |= 16; /* mark face as tri */
if (v1 != v3) {
- BLI_edgehash_insert(edgehash, mf->v1, mf->v3, NULL);
+ BLI_edgehash_reinsert(edgehash, mf->v1, mf->v3, NULL);
(*fs) |= 4;
}
}
@@ -821,7 +821,7 @@ static DerivedMesh *explodeMesh(ExplodeModifierData *emd,
cfra = BKE_scene_frame_get(scene);
/* hash table for vertice <-> particle relations */
- vertpahash = BLI_edgehash_new();
+ vertpahash = BLI_edgehash_new(__func__);
for (i = 0; i < totface; i++) {
if (facepa[i] != totpart) {
@@ -846,11 +846,11 @@ static DerivedMesh *explodeMesh(ExplodeModifierData *emd,
mf = &mface[i];
/* set face vertices to exist in particle group */
- BLI_edgehash_insert(vertpahash, mf->v1, mindex, NULL);
- BLI_edgehash_insert(vertpahash, mf->v2, mindex, NULL);
- BLI_edgehash_insert(vertpahash, mf->v3, mindex, NULL);
+ BLI_edgehash_reinsert(vertpahash, mf->v1, mindex, NULL);
+ BLI_edgehash_reinsert(vertpahash, mf->v2, mindex, NULL);
+ BLI_edgehash_reinsert(vertpahash, mf->v3, mindex, NULL);
if (mf->v4)
- BLI_edgehash_insert(vertpahash, mf->v4, mindex, NULL);
+ BLI_edgehash_reinsert(vertpahash, mf->v4, mindex, NULL);
}
/* make new vertice indexes & count total vertices after duplication */
@@ -869,7 +869,7 @@ static DerivedMesh *explodeMesh(ExplodeModifierData *emd,
/* getting back to object space */
invert_m4_m4(imat, ob->obmat);
- psmd->psys->lattice = psys_get_lattice(&sim);
+ psmd->psys->lattice_deform_data = psys_create_lattice_deform_data(&sim);
/* duplicate & displace vertices */
ehi = BLI_edgehashIterator_new(vertpahash);
@@ -973,9 +973,9 @@ static DerivedMesh *explodeMesh(ExplodeModifierData *emd,
CDDM_tessfaces_to_faces(explode);
explode->dirty |= DM_DIRTY_NORMALS;
- if (psmd->psys->lattice) {
- end_latt_deform(psmd->psys->lattice);
- psmd->psys->lattice = NULL;
+ if (psmd->psys->lattice_deform_data) {
+ end_latt_deform(psmd->psys->lattice_deform_data);
+ psmd->psys->lattice_deform_data = NULL;
}
return explode;
diff --git a/source/blender/modifiers/intern/MOD_meshcache_util.c b/source/blender/modifiers/intern/MOD_meshcache_util.c
index 679a79322c3..404d0538a29 100644
--- a/source/blender/modifiers/intern/MOD_meshcache_util.c
+++ b/source/blender/modifiers/intern/MOD_meshcache_util.c
@@ -20,6 +20,10 @@
* ***** END GPL LICENSE BLOCK *****
*/
+/** \file blender/modifiers/intern/MOD_meshcache_util.c
+ * \ingroup modifiers
+ */
+
#include "BLI_utildefines.h"
#include "BLI_math.h"
diff --git a/source/blender/modifiers/intern/MOD_meshcache_util.h b/source/blender/modifiers/intern/MOD_meshcache_util.h
index d7e71518f77..f3b5f43009d 100644
--- a/source/blender/modifiers/intern/MOD_meshcache_util.h
+++ b/source/blender/modifiers/intern/MOD_meshcache_util.h
@@ -25,6 +25,7 @@
*/
#ifndef __MOD_MESHCACHE_UTIL_H__
+#define __MOD_MESHCACHE_UTIL_H__
struct MPoly;
struct MLoop;
@@ -64,4 +65,4 @@ void MOD_meshcache_calc_range(const float frame, const char interp,
#define FRAME_SNAP_EPS 0.0001f
-#endif /* __MOD_MESHCACHE_UTIL_H__ */
+#endif /* __MOD_MESHCACHE_UTIL_H__ */
diff --git a/source/blender/modifiers/intern/MOD_particleinstance.c b/source/blender/modifiers/intern/MOD_particleinstance.c
index e846ce11262..c51fa329df2 100644
--- a/source/blender/modifiers/intern/MOD_particleinstance.c
+++ b/source/blender/modifiers/intern/MOD_particleinstance.c
@@ -261,7 +261,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
maxloop += totloop;
}
- psys->lattice = psys_get_lattice(&sim);
+ psys->lattice_deform_data = psys_create_lattice_deform_data(&sim);
if (psys->flag & (PSYS_HAIR_DONE | PSYS_KEYED) || psys->pointcache->flag & PTCACHE_BAKED) {
float min_r[3], max_r[3];
@@ -378,9 +378,9 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
CDDM_calc_edges(result);
- if (psys->lattice) {
- end_latt_deform(psys->lattice);
- psys->lattice = NULL;
+ if (psys->lattice_deform_data) {
+ end_latt_deform(psys->lattice_deform_data);
+ psys->lattice_deform_data = NULL;
}
if (size)
diff --git a/source/blender/modifiers/intern/MOD_skin.c b/source/blender/modifiers/intern/MOD_skin.c
index 83ac9f34df3..09e0ac966d0 100644
--- a/source/blender/modifiers/intern/MOD_skin.c
+++ b/source/blender/modifiers/intern/MOD_skin.c
@@ -933,7 +933,6 @@ static void add_poly(SkinOutput *so,
BMVert *v4)
{
BMVert *verts[4] = {v1, v2, v3, v4};
- BMEdge *edges[4];
BMFace *f;
BLI_assert(v1 != v2 && v1 != v3 && v1 != v4);
@@ -941,18 +940,7 @@ static void add_poly(SkinOutput *so,
BLI_assert(v3 != v4);
BLI_assert(v1 && v2 && v3);
- edges[0] = BM_edge_create(so->bm, v1, v2, NULL, BM_CREATE_NO_DOUBLE);
- edges[1] = BM_edge_create(so->bm, v2, v3, NULL, BM_CREATE_NO_DOUBLE);
- if (v4) {
- edges[2] = BM_edge_create(so->bm, v3, v4, NULL, BM_CREATE_NO_DOUBLE);
- edges[3] = BM_edge_create(so->bm, v4, v1, NULL, BM_CREATE_NO_DOUBLE);
- }
- else {
- edges[2] = BM_edge_create(so->bm, v3, v1, NULL, BM_CREATE_NO_DOUBLE);
- edges[3] = NULL;
- }
-
- f = BM_face_create(so->bm, verts, edges, v4 ? 4 : 3, BM_CREATE_NO_DOUBLE);
+ f = BM_face_create_verts(so->bm, verts, v4 ? 4 : 3, NULL, BM_CREATE_NO_DOUBLE, true);
if (so->smd->flag & MOD_SKIN_SMOOTH_SHADING)
BM_elem_flag_enable(f, BM_ELEM_SMOOTH);
f->mat_nr = so->mat_nr;
@@ -996,7 +984,7 @@ static void output_frames(BMesh *bm,
f = &sn->frames[i];
for (j = 0; j < 4; j++) {
if (!f->merge[j].frame) {
- BMVert *v = f->verts[j] = BM_vert_create(bm, f->co[j], NULL, 0);
+ BMVert *v = f->verts[j] = BM_vert_create(bm, f->co[j], NULL, BM_CREATE_NOP);
if (input_dvert) {
MDeformVert *dv;
@@ -1310,7 +1298,7 @@ static void skin_hole_detach_partially_attached_frame(BMesh *bm, Frame *frame)
/* Detach everything */
for (i = 0; i < totattached; i++) {
BMVert **av = &frame->verts[attached[i]];
- (*av) = BM_vert_create(bm, (*av)->co, *av, 0);
+ (*av) = BM_vert_create(bm, (*av)->co, *av, BM_CREATE_NOP);
}
}
diff --git a/source/blender/modifiers/intern/MOD_subsurf.c b/source/blender/modifiers/intern/MOD_subsurf.c
index 98cea62a2ff..4e2656bbf00 100644
--- a/source/blender/modifiers/intern/MOD_subsurf.c
+++ b/source/blender/modifiers/intern/MOD_subsurf.c
@@ -121,14 +121,14 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
static DerivedMesh *applyModifierEM(ModifierData *md, Object *UNUSED(ob),
struct BMEditMesh *UNUSED(editData),
DerivedMesh *derivedData,
- ModifierApplyFlag UNUSED(flag))
+ ModifierApplyFlag flag)
{
SubsurfModifierData *smd = (SubsurfModifierData *) md;
DerivedMesh *result;
+ /* 'orco' using editmode flags would cause cache to be used twice in editbmesh_calc_modifiers */
+ SubsurfFlags ss_flags = (flag & MOD_APPLY_ORCO) ? 0 : (SUBSURF_FOR_EDIT_MODE | SUBSURF_IN_EDIT_MODE);
- result = subsurf_make_derived_from_derived(derivedData, smd,
- NULL, (SUBSURF_FOR_EDIT_MODE |
- SUBSURF_IN_EDIT_MODE));
+ result = subsurf_make_derived_from_derived(derivedData, smd, NULL, ss_flags);
return result;
}
diff --git a/source/blender/modifiers/intern/MOD_triangulate.c b/source/blender/modifiers/intern/MOD_triangulate.c
index 9155aa0044b..ffc813068b8 100644
--- a/source/blender/modifiers/intern/MOD_triangulate.c
+++ b/source/blender/modifiers/intern/MOD_triangulate.c
@@ -33,6 +33,9 @@
#include "BKE_modifier.h"
#include "BKE_editmesh.h"
+#include "bmesh.h"
+#include "bmesh_tools.h"
+
static DerivedMesh *triangulate_dm(DerivedMesh *dm, const int flag)
{
DerivedMesh *result;
diff --git a/source/blender/modifiers/intern/MOD_util.c b/source/blender/modifiers/intern/MOD_util.c
index 230931a1a33..e9fabcd1fd0 100644
--- a/source/blender/modifiers/intern/MOD_util.c
+++ b/source/blender/modifiers/intern/MOD_util.c
@@ -70,30 +70,6 @@ void modifier_init_texture(Scene *scene, Tex *tex)
BKE_image_user_frame_calc(&tex->iuser, scene->r.cfra, 0);
}
-void get_texture_value(Scene *scene, Tex *texture, float *tex_co, TexResult *texres, bool use_color_management)
-{
- int result_type;
- bool do_color_manage = false;
-
- if (use_color_management) {
- do_color_manage = BKE_scene_check_color_management_enabled(scene);
- }
-
- /* no node textures for now */
- result_type = multitex_ext_safe(texture, tex_co, texres, NULL, do_color_manage);
-
- /* if the texture gave an RGB value, we assume it didn't give a valid
- * intensity, since this is in the context of modifiers don't use perceptual color conversion.
- * if the texture didn't give an RGB value, copy the intensity across
- */
- if (result_type & TEX_RGB) {
- texres->tin = (1.0f / 3.0f) * (texres->tr + texres->tg + texres->tb);
- }
- else {
- copy_v3_fl(&texres->tr, texres->tin);
- }
-}
-
void get_texture_coords(MappingInfoModifierData *dmd, Object *ob,
DerivedMesh *dm,
float (*co)[3], float (*texco)[3],
diff --git a/source/blender/modifiers/intern/MOD_util.h b/source/blender/modifiers/intern/MOD_util.h
index 25632eb5b80..b4dcdc1721a 100644
--- a/source/blender/modifiers/intern/MOD_util.h
+++ b/source/blender/modifiers/intern/MOD_util.h
@@ -41,7 +41,6 @@ struct Tex;
struct TexResult;
void modifier_init_texture(struct Scene *scene, struct Tex *texture);
-void get_texture_value(struct Scene *scene, struct Tex *texture, float *tex_co, struct TexResult *texres, bool do_color_manage);
void get_texture_coords(struct MappingInfoModifierData *dmd, struct Object *ob, struct DerivedMesh *dm,
float (*co)[3], float (*texco)[3], int numVerts);
void modifier_vgroup_cache(struct ModifierData *md, float (*vertexCos)[3]);
diff --git a/source/blender/modifiers/intern/MOD_uvproject.c b/source/blender/modifiers/intern/MOD_uvproject.c
index b6539f4b028..ad1e2a464a8 100644
--- a/source/blender/modifiers/intern/MOD_uvproject.c
+++ b/source/blender/modifiers/intern/MOD_uvproject.c
@@ -93,7 +93,7 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *UNUSED(
CustomDataMask dataMask = 0;
/* ask for UV coordinates */
- dataMask |= CD_MASK_MTFACE;
+ dataMask |= CD_MLOOPUV | CD_MTEXPOLY;
return dataMask;
}
diff --git a/source/blender/modifiers/intern/MOD_warp.c b/source/blender/modifiers/intern/MOD_warp.c
index 4fac201377a..83b05ae708a 100644
--- a/source/blender/modifiers/intern/MOD_warp.c
+++ b/source/blender/modifiers/intern/MOD_warp.c
@@ -282,7 +282,7 @@ static void warpModifier_do(WarpModifierData *wmd, Object *ob,
if (tex_co) {
TexResult texres;
texres.nor = NULL;
- get_texture_value(wmd->modifier.scene, wmd->texture, tex_co[i], &texres, false);
+ BKE_texture_get_value(wmd->modifier.scene, wmd->texture, tex_co[i], &texres, false);
fac *= texres.tin;
}
diff --git a/source/blender/modifiers/intern/MOD_wave.c b/source/blender/modifiers/intern/MOD_wave.c
index 43dc1ba4eb9..168907e293c 100644
--- a/source/blender/modifiers/intern/MOD_wave.c
+++ b/source/blender/modifiers/intern/MOD_wave.c
@@ -48,6 +48,7 @@
#include "BKE_library.h"
#include "BKE_object.h"
#include "BKE_scene.h"
+#include "BKE_texture.h"
#include "depsgraph_private.h"
@@ -306,7 +307,7 @@ static void waveModifier_do(WaveModifierData *md,
if (wmd->texture) {
TexResult texres;
texres.nor = NULL;
- get_texture_value(wmd->modifier.scene, wmd->texture, tex_co[i], &texres, false);
+ BKE_texture_get_value(wmd->modifier.scene, wmd->texture, tex_co[i], &texres, false);
amplit *= texres.tin;
}
diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.c b/source/blender/modifiers/intern/MOD_weightvg_util.c
index e2267addd53..5c3b87bd92c 100644
--- a/source/blender/modifiers/intern/MOD_weightvg_util.c
+++ b/source/blender/modifiers/intern/MOD_weightvg_util.c
@@ -164,7 +164,7 @@ void weightvg_do_mask(int num, const int *indices, float *org_w, const float *ne
do_color_manage = tex_use_channel != MOD_WVG_MASK_TEX_USE_INT;
texres.nor = NULL;
- get_texture_value(scene, texture, tex_co[idx], &texres, do_color_manage);
+ BKE_texture_get_value(scene, texture, tex_co[idx], &texres, do_color_manage);
/* Get the good channel value... */
switch (tex_use_channel) {
case MOD_WVG_MASK_TEX_USE_INT:
diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c
index 63267538528..67168e52949 100644
--- a/source/blender/modifiers/intern/MOD_weightvgproximity.c
+++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c
@@ -28,18 +28,12 @@
* \ingroup modifiers
*/
-#define DO_PROFILE 0
-
#include "BLI_utildefines.h"
#include "BLI_ghash.h"
#include "BLI_math.h"
#include "BLI_string.h"
#include "BLI_rand.h"
-#if DO_PROFILE
- #include "PIL_time.h"
-#endif
-
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
@@ -58,6 +52,13 @@
#include "MOD_util.h"
#include "MOD_weightvg_util.h"
+// #define USE_TIMEIT
+
+#ifdef USE_TIMEIT
+# include "PIL_time.h"
+# include "PIL_time_utildefines.h"
+#endif
+
/**************************************
* Util functions. *
**************************************/
@@ -382,8 +383,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der
int do_prev = (wmd->modifier.mode & eModifierMode_DoWeightPreview);
#endif
-#if DO_PROFILE
- TIMEIT_START(perf)
+#ifdef USE_TIMEIT
+ TIMEIT_START(perf);
#endif
/* Get number of verts. */
@@ -548,8 +549,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der
MEM_freeN(indices);
MEM_freeN(v_cos);
-#if DO_PROFILE
- TIMEIT_END(perf)
+#ifdef USE_TIMEIT
+ TIMEIT_END(perf);
#endif
/* Return the vgroup-modified mesh. */
diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt
index 4ac75c15efe..61c8cb5655d 100644
--- a/source/blender/nodes/CMakeLists.txt
+++ b/source/blender/nodes/CMakeLists.txt
@@ -164,6 +164,7 @@ set(SRC
shader/nodes/node_shader_bsdf_translucent.c
shader/nodes/node_shader_bsdf_transparent.c
shader/nodes/node_shader_bsdf_velvet.c
+ shader/nodes/node_shader_bsdf_hair.c
shader/nodes/node_shader_bump.c
shader/nodes/node_shader_emission.c
shader/nodes/node_shader_fresnel.c
diff --git a/source/blender/nodes/NOD_common.h b/source/blender/nodes/NOD_common.h
index ac0ceab36d4..a8279b4c66a 100644
--- a/source/blender/nodes/NOD_common.h
+++ b/source/blender/nodes/NOD_common.h
@@ -29,8 +29,8 @@
* \ingroup nodes
*/
-#ifndef NOD_COMMON_H
-#define NOD_COMMON_H
+#ifndef __NOD_COMMON_H__
+#define __NOD_COMMON_H__
#include "BKE_node.h"
@@ -51,4 +51,4 @@ struct bNodeSocket *node_group_output_find_socket(struct bNode *node, const char
void node_group_input_verify(struct bNodeTree *ntree, struct bNode *node, struct ID *id);
void node_group_output_verify(struct bNodeTree *ntree, struct bNode *node, struct ID *id);
-#endif
+#endif /* __NOD_COMMON_H__ */
diff --git a/source/blender/nodes/NOD_composite.h b/source/blender/nodes/NOD_composite.h
index 4320e0436ce..78265154125 100644
--- a/source/blender/nodes/NOD_composite.h
+++ b/source/blender/nodes/NOD_composite.h
@@ -42,8 +42,6 @@ extern struct bNodeTreeType *ntreeType_Composite;
void register_node_tree_type_cmp(void);
void register_node_type_cmp_group(void);
-void register_node_type_cmp_forloop(void);
-void register_node_type_cmp_whileloop(void);
void register_node_type_cmp_rlayers(void);
void register_node_type_cmp_image(void);
diff --git a/source/blender/nodes/NOD_shader.h b/source/blender/nodes/NOD_shader.h
index ec39d81618d..853046a2a23 100644
--- a/source/blender/nodes/NOD_shader.h
+++ b/source/blender/nodes/NOD_shader.h
@@ -43,8 +43,6 @@ extern struct bNodeTreeType *ntreeType_Shader;
void register_node_tree_type_sh(void);
void register_node_type_sh_group(void);
-void register_node_type_sh_forloop(void);
-void register_node_type_sh_whileloop(void);
void register_node_type_sh_output(void);
void register_node_type_sh_material(void);
@@ -108,6 +106,7 @@ void register_node_type_sh_emission(void);
void register_node_type_sh_holdout(void);
void register_node_type_sh_volume_transparent(void);
void register_node_type_sh_volume_isotropic(void);
+void register_node_type_sh_bsdf_hair(void);
void register_node_type_sh_subsurface_scattering(void);
void register_node_type_sh_mix_shader(void);
void register_node_type_sh_add_shader(void);
diff --git a/source/blender/nodes/NOD_static_types.h b/source/blender/nodes/NOD_static_types.h
index eeec40c911f..db9f710b6cf 100644
--- a/source/blender/nodes/NOD_static_types.h
+++ b/source/blender/nodes/NOD_static_types.h
@@ -1,4 +1,3 @@
-
/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -86,7 +85,8 @@ DefNode( ShaderNode, SH_NODE_BSDF_TRANSLUCENT, 0, "BS
DefNode( ShaderNode, SH_NODE_BSDF_TRANSPARENT, 0, "BSDF_TRANSPARENT", BsdfTransparent, "Transparent BSDF", "" )
DefNode( ShaderNode, SH_NODE_BSDF_VELVET, 0, "BSDF_VELVET", BsdfVelvet, "Velvet BSDF", "" )
DefNode( ShaderNode, SH_NODE_BSDF_TOON, def_toon, "BSDF_TOON", BsdfToon, "Toon BSDF", "" )
-DefNode( ShaderNode, SH_NODE_SUBSURFACE_SCATTERING, 0, "SUBSURFACE_SCATTERING",SubsurfaceScattering,"Subsurface Scattering","")
+DefNode( ShaderNode, SH_NODE_BSDF_HAIR, def_hair, "BSDF_HAIR", BsdfHair, "Hair BSDF", "" )
+DefNode( ShaderNode, SH_NODE_SUBSURFACE_SCATTERING, def_sh_subsurface, "SUBSURFACE_SCATTERING",SubsurfaceScattering,"Subsurface Scattering","")
DefNode( ShaderNode, SH_NODE_VOLUME_TRANSPARENT, 0, "VOLUME_TRANSPARENT", VolumeTransparent,"Transparent Volume","" )
DefNode( ShaderNode, SH_NODE_VOLUME_ISOTROPIC, 0, "VOLUME_ISOTROPIC", VolumeIsotropic, "Isotropic Volume", "" )
DefNode( ShaderNode, SH_NODE_EMISSION, 0, "EMISSION", Emission, "Emission", "" )
@@ -142,7 +142,8 @@ DefNode( CompositorNode, CMP_NODE_HUE_SAT, def_cmp_hue_saturation, "HUE_S
DefNode( CompositorNode, CMP_NODE_IMAGE, def_cmp_image, "IMAGE", Image, "Image", "" )
DefNode( CompositorNode, CMP_NODE_R_LAYERS, def_cmp_render_layers, "R_LAYERS", RLayers, "Render Layers", "" )
DefNode( CompositorNode, CMP_NODE_COMPOSITE, def_cmp_composite, "COMPOSITE", Composite, "Composite", "" )
-DefNode( CompositorNode, CMP_NODE_OUTPUT_FILE, def_cmp_output_file, "OUTPUT_FILE", OutputFile, "File Output", "" )
+/* NB: OutputFile node has special rna setup function called in rna_nodetree.c */
+DefNode( CompositorNode, CMP_NODE_OUTPUT_FILE, 0, "OUTPUT_FILE", OutputFile, "File Output", "" )
DefNode( CompositorNode, CMP_NODE_TEXTURE, def_texture, "TEXTURE", Texture, "Texture", "" )
DefNode( CompositorNode, CMP_NODE_TRANSLATE, def_cmp_translate, "TRANSLATE", Translate, "Translate", "" )
DefNode( CompositorNode, CMP_NODE_ZCOMBINE, def_cmp_zcombine, "ZCOMBINE", Zcombine, "Z Combine", "" )
diff --git a/source/blender/nodes/NOD_texture.h b/source/blender/nodes/NOD_texture.h
index ea003f23960..378c96d5882 100644
--- a/source/blender/nodes/NOD_texture.h
+++ b/source/blender/nodes/NOD_texture.h
@@ -42,8 +42,6 @@ extern struct bNodeTreeType *ntreeType_Texture;
void register_node_tree_type_tex(void);
void register_node_type_tex_group(void);
-void register_node_type_tex_forloop(void);
-void register_node_type_tex_whileloop(void);
void register_node_type_tex_math(void);
void register_node_type_tex_mix_rgb(void);
diff --git a/source/blender/nodes/composite/node_composite_tree.c b/source/blender/nodes/composite/node_composite_tree.c
index 0b62481b2f7..31ae46468c3 100644
--- a/source/blender/nodes/composite/node_composite_tree.c
+++ b/source/blender/nodes/composite/node_composite_tree.c
@@ -318,38 +318,22 @@ static int node_animation_properties(bNodeTree *ntree, bNode *node)
lb = RNA_struct_type_properties(ptr.type);
for (link = lb->first; link; link = link->next) {
- int len = 1, index;
- bool driven;
prop = (PropertyRNA *)link;
- if (RNA_property_array_check(prop))
- len = RNA_property_array_length(&ptr, prop);
-
- for (index = 0; index < len; index++) {
- if (rna_get_fcurve(&ptr, prop, index, NULL, &driven)) {
- nodeUpdate(ntree, node);
- return 1;
- }
+ if (RNA_property_animated(&ptr, prop)) {
+ nodeUpdate(ntree, node);
+ return 1;
}
}
/* now check node sockets */
for (sock = node->inputs.first; sock; sock = sock->next) {
- int len = 1, index;
- bool driven;
-
RNA_pointer_create((ID *)ntree, &RNA_NodeSocket, sock, &ptr);
prop = RNA_struct_find_property(&ptr, "default_value");
- if (prop) {
- if (RNA_property_array_check(prop))
- len = RNA_property_array_length(&ptr, prop);
-
- for (index = 0; index < len; index++) {
- if (rna_get_fcurve(&ptr, prop, index, NULL, &driven)) {
- nodeUpdate(ntree, node);
- return 1;
- }
- }
+
+ if (RNA_property_animated(&ptr, prop)) {
+ nodeUpdate(ntree, node);
+ return 1;
}
}
diff --git a/source/blender/nodes/composite/nodes/node_composite_mapValue.c b/source/blender/nodes/composite/nodes/node_composite_mapValue.c
index 316e5b344ce..22d16e93879 100644
--- a/source/blender/nodes/composite/nodes/node_composite_mapValue.c
+++ b/source/blender/nodes/composite/nodes/node_composite_mapValue.c
@@ -44,7 +44,7 @@ static bNodeSocketTemplate cmp_node_map_value_out[] = {
static void node_composit_init_map_value(bNodeTree *UNUSED(ntree), bNode *node)
{
- node->storage = add_tex_mapping();
+ node->storage = add_tex_mapping(TEXMAP_TYPE_POINT);
}
void register_node_type_cmp_map_value(void)
diff --git a/source/blender/nodes/composite/nodes/node_composite_outputFile.c b/source/blender/nodes/composite/nodes/node_composite_outputFile.c
index 90b21f1bab0..89c6fbe4590 100644
--- a/source/blender/nodes/composite/nodes/node_composite_outputFile.c
+++ b/source/blender/nodes/composite/nodes/node_composite_outputFile.c
@@ -225,9 +225,24 @@ static void copy_output_file(bNodeTree *UNUSED(dest_ntree), bNode *dest_node, bN
static void update_output_file(bNodeTree *ntree, bNode *node)
{
- bNodeSocket *sock;
+ bNodeSocket *sock, *sock_next;
PointerRNA ptr;
+ /* XXX fix for #36706: remove invalid sockets added with bpy API.
+ * This is not ideal, but prevents crashes from missing storage.
+ * FileOutput node needs a redesign to support this properly.
+ */
+ for (sock = node->inputs.first; sock; sock = sock_next) {
+ sock_next = sock->next;
+ if (sock->storage == NULL) {
+ nodeRemoveSocket(ntree, node, sock);
+ }
+ }
+ for (sock = node->outputs.first; sock; sock = sock_next) {
+ sock_next = sock->next;
+ nodeRemoveSocket(ntree, node, sock);
+ }
+
cmp_node_update_default(ntree, node);
/* automatically update the socket type based on linked input */
diff --git a/source/blender/nodes/composite/nodes/node_composite_scale.c b/source/blender/nodes/composite/nodes/node_composite_scale.c
index 134402c00e1..8041a2e56e9 100644
--- a/source/blender/nodes/composite/nodes/node_composite_scale.c
+++ b/source/blender/nodes/composite/nodes/node_composite_scale.c
@@ -45,12 +45,31 @@ static bNodeSocketTemplate cmp_node_scale_out[] = {
{ -1, 0, "" }
};
+static void node_composite_update_scale(bNodeTree *UNUSED(ntree), bNode *node)
+{
+ bNodeSocket *sock;
+ bool use_xy_scale = ELEM(node->custom1, CMP_SCALE_RELATIVE, CMP_SCALE_ABSOLUTE);
+
+ /* Only show X/Y scale factor inputs for modes using them! */
+ for (sock = node->inputs.first; sock; sock = sock->next) {
+ if (STREQ(sock->name, "X") || STREQ(sock->name, "Y")) {
+ if (use_xy_scale) {
+ sock->flag &= ~SOCK_UNAVAIL;
+ }
+ else {
+ sock->flag |= SOCK_UNAVAIL;
+ }
+ }
+ }
+}
+
void register_node_type_cmp_scale(void)
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_SCALE, "Scale", NODE_CLASS_DISTORT, 0);
node_type_socket_templates(&ntype, cmp_node_scale_in, cmp_node_scale_out);
+ node_type_update(&ntype, node_composite_update_scale, NULL);
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/intern/node_exec.c b/source/blender/nodes/intern/node_exec.c
index 2b6318679e0..812fe5b4ae7 100644
--- a/source/blender/nodes/intern/node_exec.c
+++ b/source/blender/nodes/intern/node_exec.c
@@ -287,8 +287,8 @@ void ntreeReleaseThreadStack(bNodeThreadStack *nts)
bool ntreeExecThreadNodes(bNodeTreeExec *exec, bNodeThreadStack *nts, void *callerdata, int thread)
{
- bNodeStack *nsin[MAX_SOCKET]; /* arbitrary... watch this */
- bNodeStack *nsout[MAX_SOCKET]; /* arbitrary... watch this */
+ bNodeStack *nsin[MAX_SOCKET] = {NULL}; /* arbitrary... watch this */
+ bNodeStack *nsout[MAX_SOCKET] = {NULL}; /* arbitrary... watch this */
bNodeExec *nodeexec;
bNode *node;
int n;
diff --git a/source/blender/nodes/intern/node_util.c b/source/blender/nodes/intern/node_util.c
index f9a450174a3..e77f0a08331 100644
--- a/source/blender/nodes/intern/node_util.c
+++ b/source/blender/nodes/intern/node_util.c
@@ -112,86 +112,54 @@ const char *node_filter_label(bNode *node)
void node_update_internal_links_default(bNodeTree *ntree, bNode *node)
{
- bNodeSocket *fromsock_first = NULL, *tosock_first = NULL; /* used for fallback link if no other reconnections are found */
- int datatype;
- int num_links_in = 0, num_links_out = 0, num_reconnect = 0;
+ bNodeLink *link;
+ bNodeSocket *output, *input, *selected;
- /* Security check! */
+ /* sanity check */
if (!ntree)
return;
- for (datatype = 0; datatype < NUM_SOCKET_TYPES; ++datatype) {
- bNodeSocket *fromsock, *tosock;
- int fromindex, toindex;
- bNodeLink *link;
-
- /* Connect the first input of each type with outputs of the same type. */
+ /* use link pointer as a tag for handled sockets (for outputs is unused anyway) */
+ for (output = node->outputs.first; output; output = output->next)
+ output->link = NULL;
+
+ for (link = ntree->links.first; link; link = link->next) {
+ output = link->fromsock;
+ if (link->fromnode != node || output->link)
+ continue;
+ output->link = link; /* not really used, just for tagging handled sockets */
- fromindex = INT_MAX;
- fromsock = NULL;
- for (link = ntree->links.first; link; link = link->next) {
- if (nodeLinkIsHidden(link))
- continue;
- if (link->tonode == node && link->tosock->type == datatype) {
- int index = BLI_findindex(&node->inputs, link->tosock);
- if (index < fromindex) {
- fromindex = index;
- fromsock = link->tosock;
+ /* look for suitable input */
+ selected = NULL;
+ for (input = node->inputs.first; input; input = input->next) {
+ /* only use if same type */
+ if (input->type == output->type) {
+ if (!selected) {
+ selected = input;
}
- }
- }
- if (fromsock) {
- ++num_links_in;
- if (!fromsock_first)
- fromsock_first = fromsock;
- }
-
- toindex = INT_MAX;
- tosock = NULL;
- for (link = ntree->links.first; link; link = link->next) {
- if (nodeLinkIsHidden(link))
- continue;
- if (link->fromnode == node && link->fromsock->type == datatype) {
- int index = BLI_findindex(&node->outputs, link->fromsock);
- if (index < toindex) {
- toindex = index;
- tosock = link->fromsock;
+ else {
+ /* linked inputs preferred */
+ if (input->link && !selected->link)
+ selected = input;
}
}
}
- if (tosock) {
- ++num_links_out;
- if (!tosock_first)
- tosock_first = tosock;
-
- if (fromsock) {
- bNodeLink *ilink = MEM_callocN(sizeof(bNodeLink), "internal node link");
- ilink->fromnode = node;
- ilink->fromsock = fromsock;
- ilink->tonode = node;
- ilink->tosock = tosock;
- /* internal link is always valid */
- ilink->flag |= NODE_LINK_VALID;
- BLI_addtail(&node->internal_links, ilink);
-
- ++num_reconnect;
- }
+
+ if (selected) {
+ bNodeLink *ilink = MEM_callocN(sizeof(bNodeLink), "internal node link");
+ ilink->fromnode = node;
+ ilink->fromsock = selected;
+ ilink->tonode = node;
+ ilink->tosock = output;
+ /* internal link is always valid */
+ ilink->flag |= NODE_LINK_VALID;
+ BLI_addtail(&node->internal_links, ilink);
}
}
- /* if there is one input and one output link, but no reconnections by type,
- * simply connect those two sockets.
- */
- if ((num_reconnect == 0) && (num_links_in == 1) && (num_links_out == 1)) {
- bNodeLink *ilink = MEM_callocN(sizeof(bNodeLink), "internal node link");
- ilink->fromnode = node;
- ilink->fromsock = fromsock_first;
- ilink->tonode = node;
- ilink->tosock = tosock_first;
- /* internal link is always valid */
- ilink->flag |= NODE_LINK_VALID;
- BLI_addtail(&node->internal_links, ilink);
- }
+ /* clean up */
+ for (output = node->outputs.first; output; output = output->next)
+ output->link = NULL;
}
float node_socket_get_float(bNodeTree *ntree, bNode *UNUSED(node), bNodeSocket *sock)
diff --git a/source/blender/nodes/shader/node_shader_tree.c b/source/blender/nodes/shader/node_shader_tree.c
index 134a5c9575f..1e828ea321c 100644
--- a/source/blender/nodes/shader/node_shader_tree.c
+++ b/source/blender/nodes/shader/node_shader_tree.c
@@ -189,13 +189,16 @@ void register_node_tree_type_sh(void)
void ntreeGPUMaterialNodes(bNodeTree *ntree, GPUMaterial *mat)
{
+ /* localize tree to create links for reroute and mute */
+ bNodeTree *localtree = ntreeLocalize(ntree);
bNodeTreeExec *exec;
- exec = ntreeShaderBeginExecTree(ntree);
-
+ exec = ntreeShaderBeginExecTree(localtree);
ntreeExecGPUNodes(exec, mat, 1);
-
ntreeShaderEndExecTree(exec);
+
+ ntreeFreeTree_ex(localtree, false);
+ MEM_freeN(localtree);
}
/* **************** call to switch lamploop for material node ************ */
diff --git a/source/blender/nodes/shader/node_shader_util.c b/source/blender/nodes/shader/node_shader_util.c
index f6ecb3e0b72..86e59cd779a 100644
--- a/source/blender/nodes/shader/node_shader_util.c
+++ b/source/blender/nodes/shader/node_shader_util.c
@@ -195,25 +195,28 @@ static void data_from_gpu_stack_list(ListBase *sockets, bNodeStack **ns, GPUNode
bNode *nodeGetActiveTexture(bNodeTree *ntree)
{
/* this is the node we texture paint and draw in textured draw */
- bNode *node, *tnode;
+ bNode *node, *tnode, *inactivenode = NULL;
if (!ntree)
return NULL;
- for (node = ntree->nodes.first; node; node = node->next)
+ for (node = ntree->nodes.first; node; node = node->next) {
if (node->flag & NODE_ACTIVE_TEXTURE)
return node;
+ else if (!inactivenode && node->typeinfo->nclass == NODE_CLASS_TEXTURE)
+ inactivenode = node;
+ }
/* node active texture node in this tree, look inside groups */
for (node = ntree->nodes.first; node; node = node->next) {
if (node->type == NODE_GROUP) {
tnode = nodeGetActiveTexture((bNodeTree *)node->id);
- if (tnode)
+ if (tnode && ((tnode->flag & NODE_ACTIVE_TEXTURE) || !inactivenode))
return tnode;
}
}
- return NULL;
+ return inactivenode;
}
void ntreeExecGPUNodes(bNodeTreeExec *exec, GPUMaterial *mat, int do_outputs)
@@ -268,6 +271,9 @@ void node_shader_gpu_tex_mapping(GPUMaterial *mat, bNode *node, GPUNodeStack *in
GPUNodeLink *tdomax = GPU_uniform(&domax);
GPU_link(mat, "mapping", in[0].link, tmat, tmin, tmax, tdomin, tdomax, &in[0].link);
+
+ if (texmap->type == TEXMAP_TYPE_NORMAL)
+ GPU_link(mat, "texco_norm", in[0].link, &in[0].link);
}
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_bsdf_hair.c b/source/blender/nodes/shader/nodes/node_shader_bsdf_hair.c
new file mode 100644
index 00000000000..ba33a262548
--- /dev/null
+++ b/source/blender/nodes/shader/nodes/node_shader_bsdf_hair.c
@@ -0,0 +1,66 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2005 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include "../node_shader_util.h"
+
+/* **************** OUTPUT ******************** */
+
+static bNodeSocketTemplate sh_node_bsdf_hair_in[] = {
+ { SOCK_RGBA, 1, N_("Color"), 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+ { SOCK_FLOAT, 1, N_("Offset"), 0.0f, 0.0f, 0.0f, 0.0f, -M_PI_2, M_PI_2, PROP_ANGLE},
+ { SOCK_FLOAT, 1, N_("RoughnessU"), 0.1f, 0.1f, 0.1f, 0.0f, 0.0f, 1.0f},
+ { SOCK_FLOAT, 1, N_("RoughnessV"), 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f}, { -1, 0, "" }
+};
+
+static bNodeSocketTemplate sh_node_bsdf_hair_out[] = {
+ { SOCK_SHADER, 0, N_("BSDF")},
+ { -1, 0, "" }
+};
+
+static int node_shader_gpu_bsdf_hair(GPUMaterial *mat, bNode *UNUSED(node), bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
+{
+ if (!in[2].link)
+ in[2].link = GPU_builtin(GPU_VIEW_NORMAL);
+
+ return GPU_stack_link(mat, "node_bsdf_hair", in, out);
+}
+
+/* node type definition */
+void register_node_type_sh_bsdf_hair(void)
+{
+ static bNodeType ntype;
+
+ sh_node_type_base(&ntype, SH_NODE_BSDF_HAIR, "Hair BSDF", NODE_CLASS_SHADER, 0);
+ node_type_compatibility(&ntype, NODE_NEW_SHADING);
+ node_type_socket_templates(&ntype, sh_node_bsdf_hair_in, sh_node_bsdf_hair_out);
+ node_type_size(&ntype, 150, 60, 200);
+ node_type_init(&ntype, NULL);
+ node_type_storage(&ntype, "", NULL, NULL);
+ node_type_gpu(&ntype, node_shader_gpu_bsdf_hair);
+
+ nodeRegisterType(&ntype);
+}
diff --git a/source/blender/nodes/shader/nodes/node_shader_gamma.c b/source/blender/nodes/shader/nodes/node_shader_gamma.c
index fad1a69d364..9956fd712c8 100644
--- a/source/blender/nodes/shader/nodes/node_shader_gamma.c
+++ b/source/blender/nodes/shader/nodes/node_shader_gamma.c
@@ -41,6 +41,11 @@ static bNodeSocketTemplate sh_node_gamma_out[] = {
{ -1, 0, "" }
};
+static int node_shader_gpu_gamma(GPUMaterial *mat, bNode *UNUSED(node), bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
+{
+ return GPU_stack_link(mat, "node_gamma", in, out);
+}
+
void register_node_type_sh_gamma(void)
{
static bNodeType ntype;
@@ -50,6 +55,7 @@ void register_node_type_sh_gamma(void)
node_type_socket_templates(&ntype, sh_node_gamma_in, sh_node_gamma_out);
node_type_init(&ntype, NULL);
node_type_storage(&ntype, "", NULL, NULL);
+ node_type_gpu(&ntype, node_shader_gpu_gamma);
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_mapping.c b/source/blender/nodes/shader/nodes/node_shader_mapping.c
index 05936e22775..cff4a039602 100644
--- a/source/blender/nodes/shader/nodes/node_shader_mapping.c
+++ b/source/blender/nodes/shader/nodes/node_shader_mapping.c
@@ -29,7 +29,6 @@
* \ingroup shdnodes
*/
-
#include "node_shader_util.h"
/* **************** MAPPING ******************** */
@@ -53,7 +52,7 @@ static void node_shader_exec_mapping(void *UNUSED(data), int UNUSED(thread), bNo
/* stack order output: vector */
nodestack_get_vec(vec, SOCK_VECTOR, in[0]);
mul_m4_v3(texmap->mat, vec);
-
+
if (texmap->flag & TEXMAP_CLIP_MIN) {
if (vec[0] < texmap->min[0]) vec[0] = texmap->min[0];
if (vec[1] < texmap->min[1]) vec[1] = texmap->min[1];
@@ -64,12 +63,15 @@ static void node_shader_exec_mapping(void *UNUSED(data), int UNUSED(thread), bNo
if (vec[1] > texmap->max[1]) vec[1] = texmap->max[1];
if (vec[2] > texmap->max[2]) vec[2] = texmap->max[2];
}
+
+ if (texmap->type == TEXMAP_TYPE_NORMAL)
+ normalize_v3(vec);
}
static void node_shader_init_mapping(bNodeTree *UNUSED(ntree), bNode *node)
{
- node->storage = add_tex_mapping();
+ node->storage = add_tex_mapping(TEXMAP_TYPE_POINT);
}
static int gpu_shader_mapping(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
@@ -83,7 +85,12 @@ static int gpu_shader_mapping(GPUMaterial *mat, bNode *node, bNodeExecData *UNUS
GPUNodeLink *tdomin = GPU_uniform(&domin);
GPUNodeLink *tdomax = GPU_uniform(&domax);
- return GPU_stack_link(mat, "mapping", in, out, tmat, tmin, tmax, tdomin, tdomax);
+ int result = GPU_stack_link(mat, "mapping", in, out, tmat, tmin, tmax, tdomin, tdomax);
+
+ if (result && texmap->type == TEXMAP_TYPE_NORMAL)
+ GPU_link(mat, "texco_norm", out[0].link, &out[0].link);
+
+ return result;
}
void register_node_type_sh_mapping(void)
diff --git a/source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.c b/source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.c
index 3bdc3813fd7..fd864f1c7c6 100644
--- a/source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.c
+++ b/source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.c
@@ -30,11 +30,12 @@
/* **************** OUTPUT ******************** */
static bNodeSocketTemplate sh_node_subsurface_scattering_in[] = {
- { SOCK_RGBA, 1, N_("Color"), 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
- { SOCK_FLOAT, 1, N_("Scale"), 1.0, 0.0f, 0.0f, 0.0f, 0.0f, 1000.0f},
- { SOCK_VECTOR, 1, N_("Radius"), 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 100.0f},
- //{ SOCK_FLOAT, 1, N_("IOR"), 1.3f, 0.0f, 0.0f, 0.0f, 1.0f, 1000.0f},
- { SOCK_VECTOR, 1, N_("Normal"), 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_NONE, SOCK_HIDE_VALUE},
+ { SOCK_RGBA, 1, N_("Color"), 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+ { SOCK_FLOAT, 1, N_("Scale"), 1.0, 0.0f, 0.0f, 0.0f, 0.0f, 1000.0f},
+ { SOCK_VECTOR, 1, N_("Radius"), 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 100.0f},
+ { SOCK_FLOAT, 1, N_("Sharpness"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR},
+ { SOCK_FLOAT, 1, N_("Texture Blur"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR},
+ { SOCK_VECTOR, 1, N_("Normal"), 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_NONE, SOCK_HIDE_VALUE},
{ -1, 0, "" }
};
@@ -43,6 +44,20 @@ static bNodeSocketTemplate sh_node_subsurface_scattering_out[] = {
{ -1, 0, "" }
};
+static void node_shader_init_subsurface_scattering(bNodeTree *UNUSED(ntree), bNode *node)
+{
+ /*bNodeSocket *sock;*/
+
+ node->custom1 = SHD_SUBSURFACE_CUBIC;
+
+ /*for (sock = node->inputs.first; sock; sock = sock->next) {
+ if (strcmp(sock->name, "Sharpness") == 0) {
+ bNodeSocketValueFloat *dval = sock->default_value;
+ dval->value = 0.0f;
+ }
+ }*/
+}
+
static int node_shader_gpu_subsurface_scattering(GPUMaterial *mat, bNode *UNUSED(node), bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
{
if (!in[1].link)
@@ -51,6 +66,22 @@ static int node_shader_gpu_subsurface_scattering(GPUMaterial *mat, bNode *UNUSED
return GPU_stack_link(mat, "node_subsurface_scattering", in, out);
}
+static void node_shader_update_subsurface_scattering(bNodeTree *UNUSED(ntree), bNode *node)
+{
+ bNodeSocket *sock;
+ int falloff = node->custom1;
+
+ for (sock = node->inputs.first; sock; sock = sock->next) {
+ if (strcmp(sock->name, "Sharpness") == 0) {
+ if (falloff == SHD_SUBSURFACE_CUBIC)
+ sock->flag &= ~SOCK_UNAVAIL;
+ else
+ sock->flag |= SOCK_UNAVAIL;
+
+ }
+ }
+}
+
/* node type definition */
void register_node_type_sh_subsurface_scattering(void)
{
@@ -60,9 +91,10 @@ void register_node_type_sh_subsurface_scattering(void)
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_subsurface_scattering_in, sh_node_subsurface_scattering_out);
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
- node_type_init(&ntype, NULL);
+ node_type_init(&ntype, node_shader_init_subsurface_scattering);
node_type_storage(&ntype, "", NULL, NULL);
node_type_gpu(&ntype, node_shader_gpu_subsurface_scattering);
+ node_type_update(&ntype, node_shader_update_subsurface_scattering, NULL);
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_brick.c b/source/blender/nodes/shader/nodes/node_shader_tex_brick.c
index 826b7d9337d..12da301d090 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_brick.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_brick.c
@@ -51,7 +51,7 @@ static bNodeSocketTemplate sh_node_tex_brick_out[] = {
static void node_shader_init_tex_brick(bNodeTree *UNUSED(ntree), bNode *node)
{
NodeTexBrick *tex = MEM_callocN(sizeof(NodeTexBrick), "NodeTexBrick");
- default_tex_mapping(&tex->base.tex_mapping);
+ default_tex_mapping(&tex->base.tex_mapping, TEXMAP_TYPE_POINT);
default_color_mapping(&tex->base.color_mapping);
tex->offset = 0.5f;
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_checker.c b/source/blender/nodes/shader/nodes/node_shader_tex_checker.c
index ceb3911f429..725b5654523 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_checker.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_checker.c
@@ -46,7 +46,7 @@ static bNodeSocketTemplate sh_node_tex_checker_out[] = {
static void node_shader_init_tex_checker(bNodeTree *UNUSED(ntree), bNode *node)
{
NodeTexChecker *tex = MEM_callocN(sizeof(NodeTexChecker), "NodeTexChecker");
- default_tex_mapping(&tex->base.tex_mapping);
+ default_tex_mapping(&tex->base.tex_mapping, TEXMAP_TYPE_POINT);
default_color_mapping(&tex->base.color_mapping);
node->storage = tex;
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_environment.c b/source/blender/nodes/shader/nodes/node_shader_tex_environment.c
index 2fbf5b6faf9..5e6471eab77 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_environment.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_environment.c
@@ -44,7 +44,7 @@ static bNodeSocketTemplate sh_node_tex_environment_out[] = {
static void node_shader_init_tex_environment(bNodeTree *UNUSED(ntree), bNode *node)
{
NodeTexEnvironment *tex = MEM_callocN(sizeof(NodeTexEnvironment), "NodeTexEnvironment");
- default_tex_mapping(&tex->base.tex_mapping);
+ default_tex_mapping(&tex->base.tex_mapping, TEXMAP_TYPE_POINT);
default_color_mapping(&tex->base.color_mapping);
tex->color_space = SHD_COLORSPACE_COLOR;
tex->projection = SHD_PROJ_EQUIRECTANGULAR;
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_gradient.c b/source/blender/nodes/shader/nodes/node_shader_tex_gradient.c
index 5ee3b1f6176..c3ef897b1ad 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_gradient.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_gradient.c
@@ -43,7 +43,7 @@ static bNodeSocketTemplate sh_node_tex_gradient_out[] = {
static void node_shader_init_tex_gradient(bNodeTree *UNUSED(ntree), bNode *node)
{
NodeTexGradient *tex = MEM_callocN(sizeof(NodeTexGradient), "NodeTexGradient");
- default_tex_mapping(&tex->base.tex_mapping);
+ default_tex_mapping(&tex->base.tex_mapping, TEXMAP_TYPE_POINT);
default_color_mapping(&tex->base.color_mapping);
tex->gradient_type = SHD_BLEND_LINEAR;
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_image.c b/source/blender/nodes/shader/nodes/node_shader_tex_image.c
index 53c44ebd715..1b705e12daf 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_image.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_image.c
@@ -45,7 +45,7 @@ static bNodeSocketTemplate sh_node_tex_image_out[] = {
static void node_shader_init_tex_image(bNodeTree *UNUSED(ntree), bNode *node)
{
NodeTexImage *tex = MEM_callocN(sizeof(NodeTexImage), "NodeTexImage");
- default_tex_mapping(&tex->base.tex_mapping);
+ default_tex_mapping(&tex->base.tex_mapping, TEXMAP_TYPE_POINT);
default_color_mapping(&tex->base.color_mapping);
tex->color_space = SHD_COLORSPACE_COLOR;
tex->iuser.frames = 1;
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_magic.c b/source/blender/nodes/shader/nodes/node_shader_tex_magic.c
index 38292939a3c..b9339bc483f 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_magic.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_magic.c
@@ -45,7 +45,7 @@ static bNodeSocketTemplate sh_node_tex_magic_out[] = {
static void node_shader_init_tex_magic(bNodeTree *UNUSED(ntree), bNode *node)
{
NodeTexMagic *tex = MEM_callocN(sizeof(NodeTexMagic), "NodeTexMagic");
- default_tex_mapping(&tex->base.tex_mapping);
+ default_tex_mapping(&tex->base.tex_mapping, TEXMAP_TYPE_POINT);
default_color_mapping(&tex->base.color_mapping);
tex->depth = 2;
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_musgrave.c b/source/blender/nodes/shader/nodes/node_shader_tex_musgrave.c
index b41cc7d8812..2b5d5e12420 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_musgrave.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_musgrave.c
@@ -49,7 +49,7 @@ static bNodeSocketTemplate sh_node_tex_musgrave_out[] = {
static void node_shader_init_tex_musgrave(bNodeTree *UNUSED(ntree), bNode *node)
{
NodeTexMusgrave *tex = MEM_callocN(sizeof(NodeTexMusgrave), "NodeTexMusgrave");
- default_tex_mapping(&tex->base.tex_mapping);
+ default_tex_mapping(&tex->base.tex_mapping, TEXMAP_TYPE_POINT);
default_color_mapping(&tex->base.color_mapping);
tex->musgrave_type = SHD_MUSGRAVE_FBM;
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_noise.c b/source/blender/nodes/shader/nodes/node_shader_tex_noise.c
index a7009b81e9a..36e26925501 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_noise.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_noise.c
@@ -46,7 +46,7 @@ static bNodeSocketTemplate sh_node_tex_noise_out[] = {
static void node_shader_init_tex_noise(bNodeTree *UNUSED(ntree), bNode *node)
{
NodeTexNoise *tex = MEM_callocN(sizeof(NodeTexNoise), "NodeTexNoise");
- default_tex_mapping(&tex->base.tex_mapping);
+ default_tex_mapping(&tex->base.tex_mapping, TEXMAP_TYPE_POINT);
default_color_mapping(&tex->base.color_mapping);
node->storage = tex;
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_sky.c b/source/blender/nodes/shader/nodes/node_shader_tex_sky.c
index f9cd4b72912..22061979b12 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_sky.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_sky.c
@@ -42,12 +42,14 @@ static bNodeSocketTemplate sh_node_tex_sky_out[] = {
static void node_shader_init_tex_sky(bNodeTree *UNUSED(ntree), bNode *node)
{
NodeTexSky *tex = MEM_callocN(sizeof(NodeTexSky), "NodeTexSky");
- default_tex_mapping(&tex->base.tex_mapping);
+ default_tex_mapping(&tex->base.tex_mapping, TEXMAP_TYPE_POINT);
default_color_mapping(&tex->base.color_mapping);
tex->sun_direction[0] = 0.0f;
tex->sun_direction[1] = 0.0f;
tex->sun_direction[2] = 1.0f;
tex->turbidity = 2.2f;
+ tex->ground_albedo = 0.3f;
+ tex->sky_model = SHD_SKY_NEW;
node->storage = tex;
}
@@ -70,6 +72,7 @@ void register_node_type_sh_tex_sky(void)
sh_node_type_base(&ntype, SH_NODE_TEX_SKY, "Sky Texture", NODE_CLASS_TEXTURE, 0);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_tex_sky_in, sh_node_tex_sky_out);
+ node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
node_type_init(&ntype, node_shader_init_tex_sky);
node_type_storage(&ntype, "NodeTexSky", node_free_standard_storage, node_copy_standard_storage);
node_type_gpu(&ntype, node_shader_gpu_tex_sky);
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_voronoi.c b/source/blender/nodes/shader/nodes/node_shader_tex_voronoi.c
index 3f1b0638b99..f75c05601aa 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_voronoi.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_voronoi.c
@@ -44,7 +44,7 @@ static bNodeSocketTemplate sh_node_tex_voronoi_out[] = {
static void node_shader_init_tex_voronoi(bNodeTree *UNUSED(ntree), bNode *node)
{
NodeTexVoronoi *tex = MEM_callocN(sizeof(NodeTexVoronoi), "NodeTexVoronoi");
- default_tex_mapping(&tex->base.tex_mapping);
+ default_tex_mapping(&tex->base.tex_mapping, TEXMAP_TYPE_POINT);
default_color_mapping(&tex->base.color_mapping);
tex->coloring = SHD_VORONOI_INTENSITY;
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_wave.c b/source/blender/nodes/shader/nodes/node_shader_tex_wave.c
index a424265c94a..be7df85fbee 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_wave.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_wave.c
@@ -47,7 +47,7 @@ static bNodeSocketTemplate sh_node_tex_wave_out[] = {
static void node_shader_init_tex_wave(bNodeTree *UNUSED(ntree), bNode *node)
{
NodeTexWave *tex = MEM_callocN(sizeof(NodeTexWave), "NodeTexWave");
- default_tex_mapping(&tex->base.tex_mapping);
+ default_tex_mapping(&tex->base.tex_mapping, TEXMAP_TYPE_POINT);
default_color_mapping(&tex->base.color_mapping);
tex->wave_type = SHD_WAVE_BANDS;
diff --git a/source/blender/nodes/texture/nodes/node_texture_common.c b/source/blender/nodes/texture/nodes/node_texture_common.c
index 6ab8d27f6e6..fec6abbf062 100644
--- a/source/blender/nodes/texture/nodes/node_texture_common.c
+++ b/source/blender/nodes/texture/nodes/node_texture_common.c
@@ -93,9 +93,12 @@ static void group_copy_inputs(bNode *gnode, bNodeStack **in, bNodeStack *gstack)
for (node = ngroup->nodes.first; node; node = node->next) {
if (node->type == NODE_GROUP_INPUT) {
for (sock = node->outputs.first, a = 0; sock; sock = sock->next, ++a) {
- ns = node_get_socket_stack(gstack, sock);
- if (ns)
- copy_stack(ns, in[a]);
+ if (in[a]) { /* shouldn't need to check this [#36694] */
+ ns = node_get_socket_stack(gstack, sock);
+ if (ns) {
+ copy_stack(ns, in[a]);
+ }
+ }
}
}
}
@@ -114,9 +117,12 @@ static void group_copy_outputs(bNode *gnode, bNodeStack **out, bNodeStack *gstac
for (node = ngroup->nodes.first; node; node = node->next) {
if (node->type == NODE_GROUP_OUTPUT && (node->flag & NODE_DO_OUTPUT)) {
for (sock = node->inputs.first, a = 0; sock; sock = sock->next, ++a) {
- ns = node_get_socket_stack(gstack, sock);
- if (ns)
- copy_stack(out[a], ns);
+ if (out[a]) { /* shouldn't need to check this [#36694] */
+ ns = node_get_socket_stack(gstack, sock);
+ if (ns) {
+ copy_stack(out[a], ns);
+ }
+ }
}
break; /* only one active output node */
}
diff --git a/source/blender/python/bmesh/bmesh_py_ops_call.c b/source/blender/python/bmesh/bmesh_py_ops_call.c
index 6c7fc686cc0..ec9f2865582 100644
--- a/source/blender/python/bmesh/bmesh_py_ops_call.c
+++ b/source/blender/python/bmesh/bmesh_py_ops_call.c
@@ -581,11 +581,11 @@ static PyObject *bpy_slot_to_py(BMesh *bm, BMOpSlot *slot)
item = PyDict_New();
if (slot_hash) {
GHASH_ITER (hash_iter, slot_hash) {
- BMHeader *ele_key = BLI_ghashIterator_getKey(&hash_iter);
- BMOElemMapping *ele_val = BLI_ghashIterator_getValue(&hash_iter);
+ BMHeader *ele_key = BLI_ghashIterator_getKey(&hash_iter);
+ void *ele_val = BLI_ghashIterator_getValue(&hash_iter);
- PyObject *py_key = BPy_BMElem_CreatePyObject(bm, ele_key);
- PyObject *py_val = BPy_BMElem_CreatePyObject(bm, *(void **)BMO_OP_SLOT_MAPPING_DATA(ele_val));
+ PyObject *py_key = BPy_BMElem_CreatePyObject(bm, ele_key);
+ PyObject *py_val = BPy_BMElem_CreatePyObject(bm, ele_val);
PyDict_SetItem(item, py_key, py_val);
Py_DECREF(py_key);
@@ -599,11 +599,11 @@ static PyObject *bpy_slot_to_py(BMesh *bm, BMOpSlot *slot)
item = PyDict_New();
if (slot_hash) {
GHASH_ITER (hash_iter, slot_hash) {
- BMHeader *ele_key = BLI_ghashIterator_getKey(&hash_iter);
- BMOElemMapping *ele_val = BLI_ghashIterator_getValue(&hash_iter);
+ BMHeader *ele_key = BLI_ghashIterator_getKey(&hash_iter);
+ void *ele_val = BLI_ghashIterator_getValue(&hash_iter);
PyObject *py_key = BPy_BMElem_CreatePyObject(bm, ele_key);
- PyObject *py_val = PyFloat_FromDouble(*(float *)BMO_OP_SLOT_MAPPING_DATA(ele_val));
+ PyObject *py_val = PyFloat_FromDouble(*(float *)&ele_val);
PyDict_SetItem(item, py_key, py_val);
Py_DECREF(py_key);
@@ -617,11 +617,11 @@ static PyObject *bpy_slot_to_py(BMesh *bm, BMOpSlot *slot)
item = PyDict_New();
if (slot_hash) {
GHASH_ITER (hash_iter, slot_hash) {
- BMHeader *ele_key = BLI_ghashIterator_getKey(&hash_iter);
- BMOElemMapping *ele_val = BLI_ghashIterator_getValue(&hash_iter);
+ BMHeader *ele_key = BLI_ghashIterator_getKey(&hash_iter);
+ void *ele_val = BLI_ghashIterator_getValue(&hash_iter);
PyObject *py_key = BPy_BMElem_CreatePyObject(bm, ele_key);
- PyObject *py_val = PyLong_FromLong(*(int *)BMO_OP_SLOT_MAPPING_DATA(ele_val));
+ PyObject *py_val = PyLong_FromLong(*(int *)&ele_val);
PyDict_SetItem(item, py_key, py_val);
Py_DECREF(py_key);
@@ -635,11 +635,11 @@ static PyObject *bpy_slot_to_py(BMesh *bm, BMOpSlot *slot)
item = PyDict_New();
if (slot_hash) {
GHASH_ITER (hash_iter, slot_hash) {
- BMHeader *ele_key = BLI_ghashIterator_getKey(&hash_iter);
- BMOElemMapping *ele_val = BLI_ghashIterator_getValue(&hash_iter);
+ BMHeader *ele_key = BLI_ghashIterator_getKey(&hash_iter);
+ void *ele_val = BLI_ghashIterator_getValue(&hash_iter);
PyObject *py_key = BPy_BMElem_CreatePyObject(bm, ele_key);
- PyObject *py_val = PyBool_FromLong(*(int *)BMO_OP_SLOT_MAPPING_DATA(ele_val));
+ PyObject *py_val = PyBool_FromLong(*(int *)&ele_val);
PyDict_SetItem(item, py_key, py_val);
Py_DECREF(py_key);
diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c
index 0e2fbe8a526..448f02a3772 100644
--- a/source/blender/python/bmesh/bmesh_py_types.c
+++ b/source/blender/python/bmesh/bmesh_py_types.c
@@ -122,12 +122,12 @@ static int bpy_bm_elem_hflag_set(BPy_BMElem *self, PyObject *value, void *flag)
param = PyLong_AsLong(value);
- if (param == true) {
- BM_elem_flag_enable(self->ele, hflag);
- return 0;
- }
- else if (param == false) {
- BM_elem_flag_disable(self->ele, hflag);
+ if ((unsigned int)param <= 1) {
+ if (hflag == BM_ELEM_SELECT)
+ BM_elem_select_set(self->bm, self->ele, param);
+ else
+ BM_elem_flag_set(self->ele, hflag, param);
+
return 0;
}
else {
@@ -1047,6 +1047,8 @@ static PyObject *bpy_bmesh_from_mesh(BPy_BMesh *self, PyObject *args, PyObject *
int use_shape_key = false;
int shape_key_index = 0;
+ BPY_BM_CHECK_OBJ(self);
+
if (!PyArg_ParseTupleAndKeywords(args, kw, "O|iii:from_mesh", (char **)kwlist,
&py_mesh, &use_fnorm, &use_shape_key, &shape_key_index) ||
!(me = PyC_RNA_AsPointer(py_mesh, "Mesh")))
@@ -1871,7 +1873,7 @@ static PyObject *bpy_bmvertseq_new(BPy_BMElemSeq *self, PyObject *args)
return NULL;
}
- v = BM_vert_create(bm, co, NULL, 0);
+ v = BM_vert_create(bm, co, NULL, BM_CREATE_NOP);
if (v == NULL) {
PyErr_SetString(PyExc_ValueError,
@@ -1940,7 +1942,7 @@ static PyObject *bpy_bmedgeseq_new(BPy_BMElemSeq *self, PyObject *args)
goto cleanup;
}
- e = BM_edge_create(bm, vert_array[0], vert_array[1], NULL, 0);
+ e = BM_edge_create(bm, vert_array[0], vert_array[1], NULL, BM_CREATE_NOP);
if (e == NULL) {
PyErr_SetString(PyExc_ValueError,
@@ -2020,7 +2022,8 @@ static PyObject *bpy_bmfaceseq_new(BPy_BMElemSeq *self, PyObject *args)
/* Go ahead and make the face!
* --------------------------- */
- f_new = BM_face_create_ngon_verts(bm, vert_array, vert_seq_len, 0, false, true);
+ f_new = BM_face_create_verts(bm, vert_array, vert_seq_len,
+ py_face_example ? py_face_example->f : NULL, BM_CREATE_NOP, true);
if (UNLIKELY(f_new == NULL)) {
PyErr_SetString(PyExc_ValueError,
@@ -2028,10 +2031,6 @@ static PyObject *bpy_bmfaceseq_new(BPy_BMElemSeq *self, PyObject *args)
goto cleanup;
}
- if (py_face_example) {
- BM_elem_attrs_copy(py_face_example->bm, bm, py_face_example->f, f_new);
- }
-
ret = BPy_BMFace_CreatePyObject(bm, f_new);
/* pass through */
@@ -2921,7 +2920,8 @@ static void bpy_bmvert_dealloc(BPy_BMElem *self)
BMesh *bm = self->bm;
if (bm) {
void **ptr = CustomData_bmesh_get(&bm->vdata, self->ele->head.data, CD_BM_ELEM_PYPTR);
- *ptr = NULL;
+ if (ptr)
+ *ptr = NULL;
}
PyObject_DEL(self);
}
@@ -2931,7 +2931,8 @@ static void bpy_bmedge_dealloc(BPy_BMElem *self)
BMesh *bm = self->bm;
if (bm) {
void **ptr = CustomData_bmesh_get(&bm->edata, self->ele->head.data, CD_BM_ELEM_PYPTR);
- *ptr = NULL;
+ if (ptr)
+ *ptr = NULL;
}
PyObject_DEL(self);
}
@@ -2941,7 +2942,8 @@ static void bpy_bmface_dealloc(BPy_BMElem *self)
BMesh *bm = self->bm;
if (bm) {
void **ptr = CustomData_bmesh_get(&bm->pdata, self->ele->head.data, CD_BM_ELEM_PYPTR);
- *ptr = NULL;
+ if (ptr)
+ *ptr = NULL;
}
PyObject_DEL(self);
}
@@ -2951,7 +2953,8 @@ static void bpy_bmloop_dealloc(BPy_BMElem *self)
BMesh *bm = self->bm;
if (bm) {
void **ptr = CustomData_bmesh_get(&bm->ldata, self->ele->head.data, CD_BM_ELEM_PYPTR);
- *ptr = NULL;
+ if (ptr)
+ *ptr = NULL;
}
PyObject_DEL(self);
}
@@ -3719,47 +3722,11 @@ char *BPy_BMElem_StringFromHType(const char htype)
/* -------------------------------------------------------------------- */
/* keep at bottom */
-/* BAD INCLUDES */
-
-#include "BKE_global.h"
-#include "BKE_main.h"
-#include "BKE_editmesh.h"
-#include "DNA_scene_types.h"
-#include "DNA_object_types.h"
-#include "DNA_mesh_types.h"
-#include "MEM_guardedalloc.h"
-
-/* there are cases where this warning isnt needed, otherwise it could be made into an error */
-static void bm_dealloc_warn(const char *mesh_name)
-{
- PySys_WriteStdout("Modified BMesh '%.200s' from a wrapped editmesh is freed without a call "
- "to bmesh.update_edit_mesh(mesh, destructive=True), this is will likely cause a crash\n",
- mesh_name);
-}
/* this function is called on free, it should stay quite fast */
static void bm_dealloc_editmode_warn(BPy_BMesh *self)
{
if (self->flag & BPY_BMFLAG_IS_WRAPPED) {
- /* likely editmesh */
- BMesh *bm = self->bm;
- Scene *scene;
- for (scene = G.main->scene.first; scene; scene = scene->id.next) {
- Base *base = scene->basact;
- if (base && base->object->type == OB_MESH) {
- Mesh *me = base->object->data;
- BMEditMesh *em = me->edit_btmesh;
- if (em && em->bm == bm) {
- /* not foolproof, scripter may have added/removed verts */
- if (((em->vert_index && (MEM_allocN_len(em->vert_index) / sizeof(*em->vert_index)) != bm->totvert)) ||
- ((em->edge_index && (MEM_allocN_len(em->edge_index) / sizeof(*em->edge_index)) != bm->totedge)) ||
- ((em->face_index && (MEM_allocN_len(em->face_index) / sizeof(*em->face_index)) != bm->totface)))
- {
- bm_dealloc_warn(me->id.name + 2);
- break;
- }
- }
- }
- }
+ /* currently nop - this works without warnings now */
}
}
diff --git a/source/blender/python/bmesh/bmesh_py_types.h b/source/blender/python/bmesh/bmesh_py_types.h
index f02b94be526..0909ce0d26a 100644
--- a/source/blender/python/bmesh/bmesh_py_types.h
+++ b/source/blender/python/bmesh/bmesh_py_types.h
@@ -27,8 +27,8 @@
* \ingroup pybmesh
*/
-#ifndef __BMESH_TYPES_H__
-#define __BMESH_TYPES_H__
+#ifndef __BMESH_PY_TYPES_H__
+#define __BMESH_PY_TYPES_H__
extern PyTypeObject BPy_BMesh_Type;
extern PyTypeObject BPy_BMVert_Type;
@@ -205,4 +205,4 @@ extern struct PyC_FlagSet bpy_bm_htype_all_flags[];
extern struct PyC_FlagSet bpy_bm_hflag_all_flags[];
#endif
-#endif /* __BMESH_TYPES_H__ */
+#endif /* __BMESH_PY_TYPES_H__ */
diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.c b/source/blender/python/bmesh/bmesh_py_types_customdata.c
index b0604fa2dbc..0ba08f3e8d0 100644
--- a/source/blender/python/bmesh/bmesh_py_types_customdata.c
+++ b/source/blender/python/bmesh/bmesh_py_types_customdata.c
@@ -32,6 +32,7 @@
#include <Python.h>
+#include "BLI_utildefines.h"
#include "BLI_string.h"
#include "BLI_math_vector.h"
@@ -112,6 +113,9 @@ PyDoc_STRVAR(bpy_bmlayeraccess_collection__uv_doc,
PyDoc_STRVAR(bpy_bmlayeraccess_collection__color_doc,
"Accessor for vertex color layer.\n\ntype: :class:`BMLayerCollection`"
);
+PyDoc_STRVAR(bpy_bmlayeraccess_collection__skin_doc,
+"Accessor for skin layer.\n\ntype: :class:`BMLayerCollection`"
+);
#ifdef WITH_FREESTYLE
PyDoc_STRVAR(bpy_bmlayeraccess_collection__freestyle_edge_doc,
"Accessor for Freestyle edge layer.\n\ntype: :class:`BMLayerCollection`"
@@ -191,6 +195,7 @@ static PyGetSetDef bpy_bmlayeraccess_vert_getseters[] = {
{(char *)"shape", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__shape_doc, (void *)CD_SHAPEKEY},
{(char *)"bevel_weight", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__bevel_weight_doc, (void *)CD_BWEIGHT},
+ {(char *)"skin", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__skin_doc, (void *)CD_MVERT_SKIN},
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
};
@@ -1029,6 +1034,11 @@ PyObject *BPy_BMLayerItem_GetItem(BPy_BMElem *py_ele, BPy_BMLayerItem *py_layer)
ret = PyFloat_FromDouble(*(float *)value);
break;
}
+ case CD_MVERT_SKIN:
+ {
+ ret = BPy_BMVertSkin_CreatePyObject(value);
+ break;
+ }
default:
{
ret = Py_NotImplemented; /* TODO */
@@ -1146,6 +1156,11 @@ int BPy_BMLayerItem_SetItem(BPy_BMElem *py_ele, BPy_BMLayerItem *py_layer, PyObj
}
break;
}
+ case CD_MVERT_SKIN:
+ {
+ ret = BPy_BMVertSkin_AssignPyObject(value, py_value);
+ break;
+ }
default:
{
PyErr_SetString(PyExc_AttributeError, "readonly / unsupported type");
diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.c b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
index 06b11f02b2a..d554f33a77e 100644
--- a/source/blender/python/bmesh/bmesh_py_types_meshdata.c
+++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
@@ -248,6 +248,115 @@ PyObject *BPy_BMLoopUV_CreatePyObject(struct MLoopUV *mloopuv)
/* --- End Mesh Loop UV --- */
+/* Mesh Vert Skin
+ * ************ */
+
+#define BPy_BMVertSkin_Check(v) (Py_TYPE(v) == &BPy_BMVertSkin_Type)
+
+typedef struct BPy_BMVertSkin {
+ PyObject_VAR_HEAD
+ MVertSkin *data;
+} BPy_BMVertSkin;
+
+PyDoc_STRVAR(bpy_bmvertskin_radius_doc,
+"Vert skin radii (as a 2D Vector).\n\n:type: :class:`mathutils.Vector`"
+);
+static PyObject *bpy_bmvertskin_radius_get(BPy_BMVertSkin *self, void *UNUSED(closure))
+{
+ return Vector_CreatePyObject(self->data->radius, 2, Py_WRAP, NULL);
+}
+
+static int bpy_bmvertskin_radius_set(BPy_BMVertSkin *self, PyObject *value, void *UNUSED(closure))
+{
+ float tvec[2];
+ if (mathutils_array_parse(tvec, 2, 2, value, "BMVertSkin.radius") != -1) {
+ copy_v2_v2(self->data->radius, tvec);
+ return 0;
+ }
+ else {
+ return -1;
+ }
+}
+
+PyDoc_STRVAR(bpy_bmvertskin_flag__use_root_doc,
+"Use as root vertex.\n\n:type: boolean"
+);
+PyDoc_STRVAR(bpy_bmvertskin_flag__use_loose_doc,
+"Use loose vertex.\n\n:type: boolean"
+);
+
+static PyObject *bpy_bmvertskin_flag_get(BPy_BMVertSkin *self, void *flag_p)
+{
+ const int flag = GET_INT_FROM_POINTER(flag_p);
+ return PyBool_FromLong(self->data->flag & flag);
+}
+
+static int bpy_bmvertskin_flag_set(BPy_BMVertSkin *self, PyObject *value, void *flag_p)
+{
+ const int flag = GET_INT_FROM_POINTER(flag_p);
+
+ switch (PyLong_AsLong(value)) {
+ case true:
+ self->data->flag |= flag;
+ return 0;
+ case false:
+ self->data->flag &= ~flag;
+ return 0;
+ default:
+ PyErr_SetString(PyExc_TypeError,
+ "expected a boolean type 0/1");
+ return -1;
+ }
+}
+
+/* XXX Todo: Make root settable, currently the code to disable all other verts as roots sits within the modifier */
+static PyGetSetDef bpy_bmvertskin_getseters[] = {
+ /* attributes match rna_mesh_gen */
+ {(char *)"radius", (getter)bpy_bmvertskin_radius_get, (setter)bpy_bmvertskin_radius_set, (char *)bpy_bmvertskin_radius_doc, NULL},
+ {(char *)"use_root", (getter)bpy_bmvertskin_flag_get, (setter)NULL, (char *)bpy_bmvertskin_flag__use_root_doc, (void *)MVERT_SKIN_ROOT},
+ {(char *)"use_loose", (getter)bpy_bmvertskin_flag_get, (setter)bpy_bmvertskin_flag_set, (char *)bpy_bmvertskin_flag__use_loose_doc, (void *)MVERT_SKIN_LOOSE},
+
+ {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+};
+
+PyTypeObject BPy_BMVertSkin_Type = {{{0}}}; /* bm.loops.layers.uv.active */
+
+static void bm_init_types_bmvertskin(void)
+{
+ BPy_BMVertSkin_Type.tp_basicsize = sizeof(BPy_BMVertSkin);
+
+ BPy_BMVertSkin_Type.tp_name = "BMVertSkin";
+
+ BPy_BMVertSkin_Type.tp_doc = NULL; // todo
+
+ BPy_BMVertSkin_Type.tp_getset = bpy_bmvertskin_getseters;
+
+ BPy_BMVertSkin_Type.tp_flags = Py_TPFLAGS_DEFAULT;
+
+ PyType_Ready(&BPy_BMVertSkin_Type);
+}
+
+int BPy_BMVertSkin_AssignPyObject(struct MVertSkin *mvertskin, PyObject *value)
+{
+ if (UNLIKELY(!BPy_BMVertSkin_Check(value))) {
+ PyErr_Format(PyExc_TypeError, "expected BMVertSkin, not a %.200s", Py_TYPE(value)->tp_name);
+ return -1;
+ }
+ else {
+ *((MVertSkin *)mvertskin) = *(((BPy_BMVertSkin *)value)->data);
+ return 0;
+ }
+}
+
+PyObject *BPy_BMVertSkin_CreatePyObject(struct MVertSkin *mvertskin)
+{
+ BPy_BMVertSkin *self = PyObject_New(BPy_BMVertSkin, &BPy_BMVertSkin_Type);
+ self->data = mvertskin;
+ return (PyObject *)self;
+}
+
+/* --- End Mesh Vert Skin --- */
+
/* Mesh Loop Color
* *************** */
@@ -692,5 +801,6 @@ void BPy_BM_init_types_meshdata(void)
bm_init_types_bmloopuv();
bm_init_types_bmloopcol();
bm_init_types_bmdvert();
+ bm_init_types_bmvertskin();
}
diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.h b/source/blender/python/bmesh/bmesh_py_types_meshdata.h
index 8280e5c3bc5..07d8a46cc65 100644
--- a/source/blender/python/bmesh/bmesh_py_types_meshdata.h
+++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.h
@@ -44,6 +44,7 @@ struct MTexPoly;
struct MLoopUV;
struct MLoopCol;
struct MDeformVert;
+struct MVertSkin;
int BPy_BMTexPoly_AssignPyObject(struct MTexPoly *mloopuv, PyObject *value);
PyObject *BPy_BMTexPoly_CreatePyObject(struct MTexPoly *mloopuv);
@@ -51,6 +52,9 @@ PyObject *BPy_BMTexPoly_CreatePyObject(struct MTexPoly *mloopuv);
int BPy_BMLoopUV_AssignPyObject(struct MLoopUV *data, PyObject *value);
PyObject *BPy_BMLoopUV_CreatePyObject(struct MLoopUV *data);
+int BPy_BMVertSkin_AssignPyObject(struct MVertSkin *data, PyObject *value);
+PyObject *BPy_BMVertSkin_CreatePyObject(struct MVertSkin *data);
+
int BPy_BMLoopColor_AssignPyObject(struct MLoopCol *data, PyObject *value);
PyObject *BPy_BMLoopColor_CreatePyObject(struct MLoopCol *data);
diff --git a/source/blender/python/generic/blf_py_api.h b/source/blender/python/generic/blf_py_api.h
index 12bd9bcf019..d856e68faee 100644
--- a/source/blender/python/generic/blf_py_api.h
+++ b/source/blender/python/generic/blf_py_api.h
@@ -20,9 +20,13 @@
* ***** END GPL LICENSE BLOCK *****
*/
+#ifndef __BLF_PY_API_H__
+#define __BLF_PY_API_H__
+
/** \file blender/python/generic/blf_py_api.h
* \ingroup pygen
*/
-
PyObject *BPyInit_blf(void);
+
+#endif /* __BLF_PY_API_H__ */
diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c
index fc4b78b5c05..88a56fac93b 100644
--- a/source/blender/python/generic/idprop_py_api.c
+++ b/source/blender/python/generic/idprop_py_api.c
@@ -25,15 +25,16 @@
* \ingroup pygen
*/
-
#include <Python.h>
-#include "idprop_py_api.h"
#include "MEM_guardedalloc.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
+#include "idprop_py_api.h"
+
+
#include "BKE_idprop.h"
@@ -329,29 +330,48 @@ static int idp_sequence_type(PyObject *seq_fast)
return type;
}
-/* note: group can be a pointer array or a group.
- * assume we already checked key is a string. */
-const char *BPy_IDProperty_Map_ValidateAndCreate(PyObject *name_obj, IDProperty *group, PyObject *ob)
+/**
+ * \note group can be a pointer array or a group.
+ * assume we already checked key is a string.
+ *
+ * \return success.
+ */
+bool BPy_IDProperty_Map_ValidateAndCreate(PyObject *name_obj, IDProperty *group, PyObject *ob)
{
IDProperty *prop = NULL;
IDPropertyTemplate val = {0};
- const char *name = "";
+ const char *name;
if (name_obj) {
Py_ssize_t name_size;
name = _PyUnicode_AsStringAndSize(name_obj, &name_size);
+
+ if (name == NULL) {
+ PyErr_Format(PyExc_KeyError,
+ "invalid id-property key, expected a string, not a %.200s",
+ Py_TYPE(name_obj)->tp_name);
+ return false;
+ }
+
if (name_size > MAX_IDPROP_NAME) {
- return "the length of IDProperty names is limited to 63 characters";
+ PyErr_SetString(PyExc_KeyError, "the length of IDProperty names is limited to 63 characters");
+ return false;
}
}
+ else {
+ name = "";
+ }
if (PyFloat_Check(ob)) {
val.d = PyFloat_AsDouble(ob);
prop = IDP_New(IDP_DOUBLE, &val, name);
}
else if (PyLong_Check(ob)) {
- val.i = (int)PyLong_AsLong(ob);
+ val.i = _PyLong_AsInt(ob);
+ if (val.i == -1 && PyErr_Occurred()) {
+ return false;
+ }
prop = IDP_New(IDP_INT, &val, name);
}
else if (PyUnicode_Check(ob)) {
@@ -381,14 +401,13 @@ const char *BPy_IDProperty_Map_ValidateAndCreate(PyObject *name_obj, IDProperty
int i;
if (ob_seq_fast == NULL) {
- PyErr_Print();
- PyErr_Clear();
- return "error converting the sequence";
+ return false;
}
if ((val.array.type = idp_sequence_type(ob_seq_fast)) == -1) {
Py_DECREF(ob_seq_fast);
- return "only floats, ints and dicts are allowed in ID property arrays";
+ PyErr_SetString(PyExc_TypeError, "only floats, ints and dicts are allowed in ID property arrays");
+ return false;
}
/* validate sequence and derive type.
@@ -399,35 +418,52 @@ const char *BPy_IDProperty_Map_ValidateAndCreate(PyObject *name_obj, IDProperty
switch (val.array.type) {
case IDP_DOUBLE:
+ {
+ double *prop_data;
+
prop = IDP_New(IDP_ARRAY, &val, name);
+ prop_data = IDP_Array(prop);
for (i = 0; i < val.array.len; i++) {
item = PySequence_Fast_GET_ITEM(ob_seq_fast, i);
- ((double *)IDP_Array(prop))[i] = (float)PyFloat_AsDouble(item);
+ if (((prop_data[i] = PyFloat_AsDouble(item)) == -1.0) && PyErr_Occurred()) {
+ Py_DECREF(ob_seq_fast);
+ return false;
+ }
}
break;
+ }
case IDP_INT:
+ {
+ int *prop_data;
prop = IDP_New(IDP_ARRAY, &val, name);
+ prop_data = IDP_Array(prop);
for (i = 0; i < val.array.len; i++) {
item = PySequence_Fast_GET_ITEM(ob_seq_fast, i);
- ((int *)IDP_Array(prop))[i] = (int)PyLong_AsLong(item);
+ if (((prop_data[i] = _PyLong_AsInt(item)) == -1) && PyErr_Occurred()) {
+ Py_DECREF(ob_seq_fast);
+ return false;
+ }
}
break;
+ }
case IDP_IDPARRAY:
+ {
prop = IDP_NewIDPArray(name);
for (i = 0; i < val.array.len; i++) {
- const char *error;
item = PySequence_Fast_GET_ITEM(ob_seq_fast, i);
- error = BPy_IDProperty_Map_ValidateAndCreate(NULL, prop, item);
- if (error) {
+ if (BPy_IDProperty_Map_ValidateAndCreate(NULL, prop, item) == false) {
Py_DECREF(ob_seq_fast);
- return error;
+ return false;
}
}
break;
+ }
default:
+ /* should never happen */
Py_DECREF(ob_seq_fast);
- return "internal error with idp array.type";
+ PyErr_SetString(PyExc_RuntimeError, "internal error with idp array.type");
+ return false;
}
Py_DECREF(ob_seq_fast);
@@ -446,23 +482,15 @@ const char *BPy_IDProperty_Map_ValidateAndCreate(PyObject *name_obj, IDProperty
for (i = 0; i < len; i++) {
key = PySequence_GetItem(keys, i);
pval = PySequence_GetItem(vals, i);
- if (!PyUnicode_Check(key)) {
- IDP_FreeProperty(prop);
- MEM_freeN(prop);
- Py_XDECREF(keys);
- Py_XDECREF(vals);
- Py_XDECREF(key);
- Py_XDECREF(pval);
- return "invalid element in subgroup dict template!";
- }
- if (BPy_IDProperty_Map_ValidateAndCreate(key, prop, pval)) {
+ if (BPy_IDProperty_Map_ValidateAndCreate(key, prop, pval) == false) {
IDP_FreeProperty(prop);
MEM_freeN(prop);
Py_XDECREF(keys);
Py_XDECREF(vals);
Py_XDECREF(key);
Py_XDECREF(pval);
- return "invalid element in subgroup dict template!";
+ /* error is already set */
+ return false;
}
Py_XDECREF(key);
Py_XDECREF(pval);
@@ -471,7 +499,10 @@ const char *BPy_IDProperty_Map_ValidateAndCreate(PyObject *name_obj, IDProperty
Py_XDECREF(vals);
}
else {
- return "invalid property value";
+ PyErr_Format(PyExc_TypeError,
+ "invalid id-property type %.200s not supported",
+ Py_TYPE(ob)->tp_name);
+ return false;
}
if (group->type == IDP_IDPARRAY) {
@@ -483,7 +514,7 @@ const char *BPy_IDProperty_Map_ValidateAndCreate(PyObject *name_obj, IDProperty
IDP_ReplaceInGroup(group, prop);
}
- return NULL;
+ return true;
}
int BPy_Wrap_SetMapItem(IDProperty *prop, PyObject *key, PyObject *val)
@@ -496,9 +527,7 @@ int BPy_Wrap_SetMapItem(IDProperty *prop, PyObject *key, PyObject *val)
if (val == NULL) { /* del idprop[key] */
IDProperty *pkey = IDP_GetPropertyFromGroup(prop, _PyUnicode_AsString(key));
if (pkey) {
- IDP_RemFromGroup(prop, pkey);
- IDP_FreeProperty(pkey);
- MEM_freeN(pkey);
+ IDP_FreeFromGroup(prop, pkey);
return 0;
}
else {
@@ -507,16 +536,10 @@ int BPy_Wrap_SetMapItem(IDProperty *prop, PyObject *key, PyObject *val)
}
}
else {
- const char *err;
-
- if (!PyUnicode_Check(key)) {
- PyErr_SetString(PyExc_TypeError, "only strings are allowed as subgroup keys");
- return -1;
- }
+ bool ok;
- err = BPy_IDProperty_Map_ValidateAndCreate(key, prop, val);
- if (err) {
- PyErr_SetString(PyExc_KeyError, err);
+ ok = BPy_IDProperty_Map_ValidateAndCreate(key, prop, val);
+ if (ok == false) {
return -1;
}
@@ -670,7 +693,7 @@ static PyObject *BPy_IDGroup_Pop(BPy_IDProperty *self, PyObject *value)
return NULL;
}
- IDP_RemFromGroup(self->prop, idprop);
+ IDP_RemoveFromGroup(self->prop, idprop);
return pyform;
}
@@ -1054,10 +1077,6 @@ static PyObject *BPy_IDArray_GetItem(BPy_IDArray *self, int index)
static int BPy_IDArray_SetItem(BPy_IDArray *self, int index, PyObject *value)
{
- int i;
- float f;
- double d;
-
if (index < 0 || index >= self->prop->len) {
PyErr_SetString(PyExc_RuntimeError, "index out of range!");
return -1;
@@ -1065,30 +1084,33 @@ static int BPy_IDArray_SetItem(BPy_IDArray *self, int index, PyObject *value)
switch (self->prop->subtype) {
case IDP_FLOAT:
- f = (float)PyFloat_AsDouble(value);
+ {
+ const float f = (float)PyFloat_AsDouble(value);
if (f == -1 && PyErr_Occurred()) {
- PyErr_SetString(PyExc_TypeError, "expected a float");
return -1;
}
((float *)IDP_Array(self->prop))[index] = f;
break;
+ }
case IDP_DOUBLE:
- d = PyFloat_AsDouble(value);
+ {
+ const double d = PyFloat_AsDouble(value);
if (d == -1 && PyErr_Occurred()) {
- PyErr_SetString(PyExc_TypeError, "expected a float");
return -1;
}
((double *)IDP_Array(self->prop))[index] = d;
break;
+ }
case IDP_INT:
- i = PyLong_AsLong(value);
+ {
+ const int i = _PyLong_AsInt(value);
if (i == -1 && PyErr_Occurred()) {
- PyErr_SetString(PyExc_TypeError, "expected an int type");
return -1;
}
((int *)IDP_Array(self->prop))[index] = i;
break;
+ }
}
return 0;
}
@@ -1518,7 +1540,7 @@ void IDP_spit(IDProperty *prop)
{
if (prop) {
PyGILState_STATE gilstate;
- int use_gil = TRUE; /* !PYC_INTERPRETER_ACTIVE; */
+ int use_gil = TRUE; /* !PyC_IsInterpreterActive(); */
PyObject *ret_dict;
PyObject *ret_str;
diff --git a/source/blender/python/generic/idprop_py_api.h b/source/blender/python/generic/idprop_py_api.h
index cb82676c4d9..279dad40456 100644
--- a/source/blender/python/generic/idprop_py_api.h
+++ b/source/blender/python/generic/idprop_py_api.h
@@ -71,7 +71,7 @@ int BPy_Wrap_SetMapItem(struct IDProperty *prop, PyObject *key, PyObject *val);
PyObject *BPy_IDGroup_WrapData(struct ID *id, struct IDProperty *prop, struct IDProperty *parent);
-const char *BPy_IDProperty_Map_ValidateAndCreate(PyObject *key, struct IDProperty *group, PyObject *ob);
+bool BPy_IDProperty_Map_ValidateAndCreate(PyObject *key, struct IDProperty *group, PyObject *ob);
void IDProp_Init_Types(void);
diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c
index 2876d7666f4..8e90d484a9d 100644
--- a/source/blender/python/generic/py_capi_utils.c
+++ b/source/blender/python/generic/py_capi_utils.c
@@ -191,7 +191,7 @@ void PyC_LineSpit(void)
int lineno;
/* Note, allow calling from outside python (RNA) */
- if (!PYC_INTERPRETER_ACTIVE) {
+ if (!PyC_IsInterpreterActive()) {
fprintf(stderr, "python line lookup failed, interpreter inactive\n");
return;
}
@@ -205,7 +205,7 @@ void PyC_LineSpit(void)
void PyC_StackSpit(void)
{
/* Note, allow calling from outside python (RNA) */
- if (!PYC_INTERPRETER_ACTIVE) {
+ if (!PyC_IsInterpreterActive()) {
fprintf(stderr, "python line lookup failed, interpreter inactive\n");
return;
}
@@ -258,7 +258,7 @@ void PyC_FileAndNum(const char **filename, int *lineno)
void PyC_FileAndNum_Safe(const char **filename, int *lineno)
{
- if (!PYC_INTERPRETER_ACTIVE) {
+ if (!PyC_IsInterpreterActive()) {
return;
}
@@ -599,6 +599,11 @@ void PyC_SetHomePath(const char *py_path_bundle)
}
}
+bool PyC_IsInterpreterActive(void)
+{
+ return (((PyThreadState *)_Py_atomic_load_relaxed(&_PyThreadState_Current)) != NULL);
+}
+
/* Would be nice if python had this built in
* See: http://wiki.blender.org/index.php/Dev:Doc/Tools/Debugging/PyFromC
*/
@@ -882,3 +887,19 @@ PyObject *PyC_FlagSet_FromBitfield(PyC_FlagSet *items, int flag)
return ret;
}
+
+/* compat only */
+#if PY_VERSION_HEX < 0x03030200
+int
+_PyLong_AsInt(PyObject *obj)
+{
+ int overflow;
+ long result = PyLong_AsLongAndOverflow(obj, &overflow);
+ if (overflow || result > INT_MAX || result < INT_MIN) {
+ PyErr_SetString(PyExc_OverflowError,
+ "Python int too large to convert to C int");
+ return -1;
+ }
+ return (int)result;
+}
+#endif
diff --git a/source/blender/python/generic/py_capi_utils.h b/source/blender/python/generic/py_capi_utils.h
index 239858032de..c6792ddfc79 100644
--- a/source/blender/python/generic/py_capi_utils.h
+++ b/source/blender/python/generic/py_capi_utils.h
@@ -56,7 +56,7 @@ void PyC_MainModule_Restore(PyObject *main_mod);
void PyC_SetHomePath(const char *py_path_bundle);
-#define PYC_INTERPRETER_ACTIVE (((PyThreadState *)_Py_atomic_load_relaxed(&_PyThreadState_Current)) != NULL)
+bool PyC_IsInterpreterActive(void);
void *PyC_RNA_AsPointer(PyObject *value, const char *type_name);
@@ -72,4 +72,8 @@ int PyC_FlagSet_ValueFromID(PyC_FlagSet *item, const char *identifier, int
int PyC_FlagSet_ToBitfield(PyC_FlagSet *items, PyObject *value, int *r_value, const char *error_prefix);
PyObject *PyC_FlagSet_FromBitfield(PyC_FlagSet *items, int flag);
+#if PY_VERSION_HEX < 0x03030200
+int _PyLong_AsInt(PyObject *obj);
+#endif
+
#endif /* __PY_CAPI_UTILS_H__ */
diff --git a/source/blender/python/intern/CMakeLists.txt b/source/blender/python/intern/CMakeLists.txt
index aae0f926e81..ef5d26dccdc 100644
--- a/source/blender/python/intern/CMakeLists.txt
+++ b/source/blender/python/intern/CMakeLists.txt
@@ -174,6 +174,10 @@ if(WITH_IMAGE_OPENEXR)
add_definitions(-DWITH_OPENEXR)
endif()
+if(WITH_OPENIMAGEIO)
+ add_definitions(-DWITH_OPENIMAGEIO)
+endif()
+
if(WITH_IMAGE_OPENJPEG)
add_definitions(-DWITH_OPENJPEG)
endif()
diff --git a/source/blender/python/intern/bpy.h b/source/blender/python/intern/bpy.h
index fe877d161ff..b647d0d450c 100644
--- a/source/blender/python/intern/bpy.h
+++ b/source/blender/python/intern/bpy.h
@@ -24,6 +24,7 @@
*/
#ifndef __BPY_H__
+#define __BPY_H__
void BPy_init_modules(void);
extern PyObject *bpy_package_py;
diff --git a/source/blender/python/intern/bpy_app_ffmpeg.c b/source/blender/python/intern/bpy_app_ffmpeg.c
index 61e12c1cea0..2f7577928c5 100644
--- a/source/blender/python/intern/bpy_app_ffmpeg.c
+++ b/source/blender/python/intern/bpy_app_ffmpeg.c
@@ -89,7 +89,7 @@ static PyObject *make_ffmpeg_info(void)
PyStructSequence_SET_ITEM(ffmpeg_info, pos++, obj)
#ifdef WITH_FFMPEG
-# define FFMPEG_LIB_VERSION(lib) { \
+# define FFMPEG_LIB_VERSION(lib) { \
curversion = lib ## _version(); \
SetObjItem(Py_BuildValue("(iii)", \
curversion >> 16, (curversion >> 8) % 256, curversion % 256)); \
@@ -97,7 +97,7 @@ static PyObject *make_ffmpeg_info(void)
curversion >> 16, (curversion >> 8) % 256, curversion % 256)); \
} (void)0
#else
-# define FFMPEG_LIB_VERSION(lib) { \
+# define FFMPEG_LIB_VERSION(lib) { \
SetStrItem("Unknown"); \
SetStrItem("Unknown"); \
} (void)0
diff --git a/source/blender/python/intern/bpy_app_handlers.c b/source/blender/python/intern/bpy_app_handlers.c
index 90a0444ceae..959e4a788dd 100644
--- a/source/blender/python/intern/bpy_app_handlers.c
+++ b/source/blender/python/intern/bpy_app_handlers.c
@@ -57,6 +57,8 @@ static PyStructSequence_Field app_cb_info_fields[] = {
{(char *)"save_post", (char *)"Callback list - on saving a blend file (after)"},
{(char *)"scene_update_pre", (char *)"Callback list - on updating the scenes data (before)"},
{(char *)"scene_update_post", (char *)"Callback list - on updating the scenes data (after)"},
+ {(char *)"game_pre", (char *)"Callback list - on starting the game engine"},
+ {(char *)"game_post", (char *)"Callback list - on ending the game engine"},
/* sets the permanent tag */
# define APP_CB_OTHER_FIELDS 1
diff --git a/source/blender/python/intern/bpy_driver.c b/source/blender/python/intern/bpy_driver.c
index 481758db252..7141db7352a 100644
--- a/source/blender/python/intern/bpy_driver.c
+++ b/source/blender/python/intern/bpy_driver.c
@@ -123,7 +123,7 @@ static void bpy_pydriver_update_dict(const float evaltime)
void BPY_driver_reset(void)
{
PyGILState_STATE gilstate;
- bool use_gil = true; /* !PYC_INTERPRETER_ACTIVE; */
+ bool use_gil = true; /* !PyC_IsInterpreterActive(); */
if (use_gil)
gilstate = PyGILState_Ensure();
@@ -162,7 +162,7 @@ static void pydriver_error(ChannelDriver *driver)
*
* (old)note: PyGILState_Ensure() isn't always called because python can call
* the bake operator which intern starts a thread which calls scene update
- * which does a driver update. to avoid a deadlock check PYC_INTERPRETER_ACTIVE
+ * which does a driver update. to avoid a deadlock check PyC_IsInterpreterActive()
* if PyGILState_Ensure() is needed - see [#27683]
*
* (new)note: checking if python is running is not threadsafe [#28114]
@@ -199,7 +199,7 @@ float BPY_driver_exec(ChannelDriver *driver, const float evaltime)
return 0.0f;
}
- use_gil = true; /* !PYC_INTERPRETER_ACTIVE; */
+ use_gil = true; /* !PyC_IsInterpreterActive(); */
if (use_gil)
gilstate = PyGILState_Ensure();
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index feffea20553..cc1dd369f8b 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -166,7 +166,7 @@ void BPY_text_free_code(Text *text)
{
if (text->compiled) {
PyGILState_STATE gilstate;
- bool use_gil = !PYC_INTERPRETER_ACTIVE;
+ bool use_gil = !PyC_IsInterpreterActive();
if (use_gil)
gilstate = PyGILState_Ensure();
@@ -760,7 +760,7 @@ void BPY_modules_load_user(bContext *C)
int BPY_context_member_get(bContext *C, const char *member, bContextDataResult *result)
{
PyGILState_STATE gilstate;
- bool use_gil = !PYC_INTERPRETER_ACTIVE;
+ bool use_gil = !PyC_IsInterpreterActive();
PyObject *pyctx;
PyObject *item;
@@ -821,8 +821,12 @@ int BPY_context_member_get(bContext *C, const char *member, bContextDataResult *
}
if (done == false) {
- if (item) printf("PyContext '%s' not a valid type\n", member);
- else printf("PyContext '%s' not found\n", member);
+ if (item) {
+ printf("PyContext '%s' not a valid type\n", member);
+ }
+ else {
+ printf("PyContext '%s' not found\n", member);
+ }
}
else {
if (G.debug & G_DEBUG_PYTHON) {
diff --git a/source/blender/python/intern/bpy_intern_string.h b/source/blender/python/intern/bpy_intern_string.h
index 2e0d18d8b7f..41b7303bf8d 100644
--- a/source/blender/python/intern/bpy_intern_string.h
+++ b/source/blender/python/intern/bpy_intern_string.h
@@ -20,6 +20,9 @@
* ***** END GPL LICENSE BLOCK *****
*/
+#ifndef __BPY_INTERN_STRING_H__
+#define __BPY_INTERN_STRING_H__
+
/** \file blender/python/intern/bpy_intern_string.h
* \ingroup pythonintern
*/
@@ -36,3 +39,5 @@ extern PyObject *bpy_intern_str_attr;
extern PyObject *bpy_intern_str___slots__;
extern PyObject *bpy_intern_str___name__;
extern PyObject *bpy_intern_str___doc__;
+
+#endif /* __BPY_INTERN_STRING_H__ */
diff --git a/source/blender/python/intern/bpy_operator_wrap.c b/source/blender/python/intern/bpy_operator_wrap.c
index 65b7bf62032..efee9b13d58 100644
--- a/source/blender/python/intern/bpy_operator_wrap.c
+++ b/source/blender/python/intern/bpy_operator_wrap.c
@@ -177,14 +177,17 @@ PyObject *PYOP_wrap_macro_define(PyObject *UNUSED(self), PyObject *args)
}
/* identifiers */
- srna = srna_from_self(macro, "Macro Define:");
- macroname = RNA_struct_identifier(srna);
+ srna = pyrna_struct_as_srna((PyObject *)macro, false, "Macro Define:");
+ if (srna == NULL) {
+ return NULL;
+ }
+ macroname = RNA_struct_identifier(srna);
ot = WM_operatortype_find(macroname, true);
if (!ot) {
PyErr_Format(PyExc_ValueError,
- "Macro Define: '%s' is not a valid macro or hasn't been registered yet",
+ "Macro Define: '%s' is not a valid macro",
macroname);
return NULL;
}
diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c
index 9bd9d33a36c..bfa4954d4bc 100644
--- a/source/blender/python/intern/bpy_props.c
+++ b/source/blender/python/intern/bpy_props.c
@@ -256,7 +256,7 @@ static int bpy_prop_boolean_get_cb(struct PointerRNA *ptr, struct PropertyRNA *p
pyrna_write_set(true);
}
- use_gil = true; /* !PYC_INTERPRETER_ACTIVE; */
+ use_gil = true; /* !PyC_IsInterpreterActive(); */
if (use_gil)
gilstate = PyGILState_Ensure();
@@ -313,7 +313,7 @@ static void bpy_prop_boolean_set_cb(struct PointerRNA *ptr, struct PropertyRNA *
pyrna_write_set(true);
}
- use_gil = true; /* !PYC_INTERPRETER_ACTIVE; */
+ use_gil = true; /* !PyC_IsInterpreterActive(); */
if (use_gil)
gilstate = PyGILState_Ensure();
@@ -368,7 +368,7 @@ static void bpy_prop_boolean_array_get_cb(struct PointerRNA *ptr, struct Propert
pyrna_write_set(true);
}
- use_gil = true; /* !PYC_INTERPRETER_ACTIVE; */
+ use_gil = true; /* !PyC_IsInterpreterActive(); */
if (use_gil)
gilstate = PyGILState_Ensure();
@@ -430,7 +430,7 @@ static void bpy_prop_boolean_array_set_cb(struct PointerRNA *ptr, struct Propert
pyrna_write_set(true);
}
- use_gil = true; /* !PYC_INTERPRETER_ACTIVE; */
+ use_gil = true; /* !PyC_IsInterpreterActive(); */
if (use_gil)
gilstate = PyGILState_Ensure();
@@ -490,7 +490,7 @@ static int bpy_prop_int_get_cb(struct PointerRNA *ptr, struct PropertyRNA *prop)
pyrna_write_set(true);
}
- use_gil = true; /* !PYC_INTERPRETER_ACTIVE; */
+ use_gil = true; /* !PyC_IsInterpreterActive(); */
if (use_gil)
gilstate = PyGILState_Ensure();
@@ -547,7 +547,7 @@ static void bpy_prop_int_set_cb(struct PointerRNA *ptr, struct PropertyRNA *prop
pyrna_write_set(true);
}
- use_gil = true; /* !PYC_INTERPRETER_ACTIVE; */
+ use_gil = true; /* !PyC_IsInterpreterActive(); */
if (use_gil)
gilstate = PyGILState_Ensure();
@@ -602,7 +602,7 @@ static void bpy_prop_int_array_get_cb(struct PointerRNA *ptr, struct PropertyRNA
pyrna_write_set(true);
}
- use_gil = true; /* !PYC_INTERPRETER_ACTIVE; */
+ use_gil = true; /* !PyC_IsInterpreterActive(); */
if (use_gil)
gilstate = PyGILState_Ensure();
@@ -664,7 +664,7 @@ static void bpy_prop_int_array_set_cb(struct PointerRNA *ptr, struct PropertyRNA
pyrna_write_set(true);
}
- use_gil = true; /* !PYC_INTERPRETER_ACTIVE; */
+ use_gil = true; /* !PyC_IsInterpreterActive(); */
if (use_gil)
gilstate = PyGILState_Ensure();
@@ -724,7 +724,7 @@ static float bpy_prop_float_get_cb(struct PointerRNA *ptr, struct PropertyRNA *p
pyrna_write_set(true);
}
- use_gil = true; /* !PYC_INTERPRETER_ACTIVE; */
+ use_gil = true; /* !PyC_IsInterpreterActive(); */
if (use_gil)
gilstate = PyGILState_Ensure();
@@ -781,7 +781,7 @@ static void bpy_prop_float_set_cb(struct PointerRNA *ptr, struct PropertyRNA *pr
pyrna_write_set(true);
}
- use_gil = true; /* !PYC_INTERPRETER_ACTIVE; */
+ use_gil = true; /* !PyC_IsInterpreterActive(); */
if (use_gil)
gilstate = PyGILState_Ensure();
@@ -836,7 +836,7 @@ static void bpy_prop_float_array_get_cb(struct PointerRNA *ptr, struct PropertyR
pyrna_write_set(true);
}
- use_gil = true; /* !PYC_INTERPRETER_ACTIVE; */
+ use_gil = true; /* !PyC_IsInterpreterActive(); */
if (use_gil)
gilstate = PyGILState_Ensure();
@@ -898,7 +898,7 @@ static void bpy_prop_float_array_set_cb(struct PointerRNA *ptr, struct PropertyR
pyrna_write_set(true);
}
- use_gil = true; /* !PYC_INTERPRETER_ACTIVE; */
+ use_gil = true; /* !PyC_IsInterpreterActive(); */
if (use_gil)
gilstate = PyGILState_Ensure();
@@ -957,7 +957,7 @@ static void bpy_prop_string_get_cb(struct PointerRNA *ptr, struct PropertyRNA *p
pyrna_write_set(true);
}
- use_gil = true; /* !PYC_INTERPRETER_ACTIVE; */
+ use_gil = true; /* !PyC_IsInterpreterActive(); */
if (use_gil)
gilstate = PyGILState_Ensure();
@@ -1017,7 +1017,7 @@ static int bpy_prop_string_length_cb(struct PointerRNA *ptr, struct PropertyRNA
pyrna_write_set(true);
}
- use_gil = true; /* !PYC_INTERPRETER_ACTIVE; */
+ use_gil = true; /* !PyC_IsInterpreterActive(); */
if (use_gil)
gilstate = PyGILState_Ensure();
@@ -1079,7 +1079,7 @@ static void bpy_prop_string_set_cb(struct PointerRNA *ptr, struct PropertyRNA *p
pyrna_write_set(true);
}
- use_gil = true; /* !PYC_INTERPRETER_ACTIVE; */
+ use_gil = true; /* !PyC_IsInterpreterActive(); */
if (use_gil)
gilstate = PyGILState_Ensure();
@@ -1140,7 +1140,7 @@ static int bpy_prop_enum_get_cb(struct PointerRNA *ptr, struct PropertyRNA *prop
pyrna_write_set(true);
}
- use_gil = true; /* !PYC_INTERPRETER_ACTIVE; */
+ use_gil = true; /* !PyC_IsInterpreterActive(); */
if (use_gil)
gilstate = PyGILState_Ensure();
@@ -1197,7 +1197,7 @@ static void bpy_prop_enum_set_cb(struct PointerRNA *ptr, struct PropertyRNA *pro
pyrna_write_set(true);
}
- use_gil = true; /* !PYC_INTERPRETER_ACTIVE; */
+ use_gil = true; /* !PyC_IsInterpreterActive(); */
if (use_gil)
gilstate = PyGILState_Ensure();
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index 3cd030e9b08..4d4d4873390 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -1341,7 +1341,7 @@ PyObject *pyrna_prop_to_py(PointerRNA *ptr, PropertyRNA *prop)
return pyrna_py_from_array(ptr, prop);
}
- /* see if we can coorce into a python type - PropertyType */
+ /* see if we can coerce into a python type - PropertyType */
switch (type) {
case PROP_BOOLEAN:
ret = PyBool_FromLong(RNA_property_boolean_get(ptr, prop));
@@ -1507,7 +1507,7 @@ static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyOb
else {
/* Normal Property (not an array) */
- /* see if we can coorce into a python type - PropertyType */
+ /* see if we can coerce into a python type - PropertyType */
switch (type) {
case PROP_BOOLEAN:
{
@@ -4600,14 +4600,6 @@ PyDoc_STRVAR(pyrna_prop_collection_foreach_get_doc,
".. method:: foreach_get(attr, seq)\n"
"\n"
" This is a function to give fast access to attributes within a collection.\n"
-"\n"
-" .. code-block:: python\n"
-"\n"
-" collection.foreach_get(attr, someseq)\n"
-"\n"
-" # Python equivalent\n"
-" for i in range(len(seq)): someseq[i] = getattr(collection, attr)\n"
-"\n"
);
static PyObject *pyrna_prop_collection_foreach_get(BPy_PropertyRNA *self, PyObject *args)
{
@@ -4620,14 +4612,6 @@ PyDoc_STRVAR(pyrna_prop_collection_foreach_set_doc,
".. method:: foreach_set(attr, seq)\n"
"\n"
" This is a function to give fast access to attributes within a collection.\n"
-"\n"
-" .. code-block:: python\n"
-"\n"
-" collection.foreach_set(attr, seq)\n"
-"\n"
-" # Python equivalent\n"
-" for i in range(len(seq)): setattr(collection[i], attr, seq[i])\n"
-"\n"
);
static PyObject *pyrna_prop_collection_foreach_set(BPy_PropertyRNA *self, PyObject *args)
{
@@ -4887,7 +4871,7 @@ static PyObject *pyrna_param_to_py(PointerRNA *ptr, PropertyRNA *prop, void *dat
}
}
else {
- /* see if we can coorce into a python type - PropertyType */
+ /* see if we can coerce into a python type - PropertyType */
switch (type) {
case PROP_BOOLEAN:
ret = PyBool_FromLong(*(int *)data);
@@ -5327,7 +5311,7 @@ static PyObject *pyrna_func_doc_get(BPy_FunctionRNA *self, void *UNUSED(closure)
PyObject *ret;
char *args;
- args = RNA_function_as_string_keywords(NULL, self->func, NULL, true, true, INT_MAX);
+ args = RNA_function_as_string_keywords(NULL, self->func, true, true, INT_MAX);
ret = PyUnicode_FromFormat("%.200s.%.200s(%.200s)\n%s",
RNA_struct_identifier(self->ptr.type),
@@ -6875,7 +6859,7 @@ int pyrna_deferred_register_class(StructRNA *srna, PyTypeObject *py_class)
/*-------------------- Type Registration ------------------------*/
-static int rna_function_arg_count(FunctionRNA *func)
+static int rna_function_arg_count(FunctionRNA *func, int *min_count)
{
const ListBase *lb = RNA_function_defined_parameters(func);
PropertyRNA *parm;
@@ -6883,13 +6867,23 @@ static int rna_function_arg_count(FunctionRNA *func)
int flag = RNA_function_flag(func);
int is_staticmethod = (flag & FUNC_NO_SELF) && !(flag & FUNC_USE_SELF_TYPE);
int count = is_staticmethod ? 0 : 1;
+ bool done_min_count = false;
for (link = lb->first; link; link = link->next) {
parm = (PropertyRNA *)link;
- if (!(RNA_property_flag(parm) & PROP_OUTPUT))
+ if (!(RNA_property_flag(parm) & PROP_OUTPUT)) {
+ if (!done_min_count && (RNA_property_flag(parm) & PROP_PYFUNC_OPTIONAL)) {
+ /* From now on, following parameters are optional in py func */
+ if (min_count)
+ *min_count = count;
+ done_min_count = true;
+ }
count++;
+ }
}
+ if (!done_min_count && min_count)
+ *min_count = count;
return count;
}
@@ -6904,7 +6898,7 @@ static int bpy_class_validate_recursive(PointerRNA *dummyptr, StructRNA *srna, v
PyObject *py_class = (PyObject *)py_data;
PyObject *base_class = RNA_struct_py_type_get(srna);
PyObject *item;
- int i, flag, is_staticmethod, arg_count, func_arg_count;
+ int i, flag, is_staticmethod, arg_count, func_arg_count, func_arg_min_count = 0;
const char *py_class_name = ((PyTypeObject *)py_class)->tp_name; /* __name__ */
if (srna_base) {
@@ -6968,7 +6962,7 @@ static int bpy_class_validate_recursive(PointerRNA *dummyptr, StructRNA *srna, v
}
}
- func_arg_count = rna_function_arg_count(func);
+ func_arg_count = rna_function_arg_count(func, &func_arg_min_count);
if (func_arg_count >= 0) { /* -1 if we don't care*/
arg_count = ((PyCodeObject *)PyFunction_GET_CODE(item))->co_argcount;
@@ -6976,14 +6970,25 @@ static int bpy_class_validate_recursive(PointerRNA *dummyptr, StructRNA *srna, v
/* note, the number of args we check for and the number of args we give to
* @staticmethods are different (quirk of python),
* this is why rna_function_arg_count() doesn't return the value -1*/
- if (is_staticmethod)
+ if (is_staticmethod) {
func_arg_count++;
+ func_arg_min_count++;
+ }
- if (arg_count != func_arg_count) {
- PyErr_Format(PyExc_ValueError,
- "expected %.200s, %.200s class \"%.200s\" function to have %d args, found %d",
- class_type, py_class_name, RNA_function_identifier(func),
- func_arg_count, arg_count);
+ if (arg_count < func_arg_min_count || arg_count > func_arg_count) {
+ if (func_arg_min_count != func_arg_count) {
+ PyErr_Format(PyExc_ValueError,
+ "expected %.200s, %.200s class \"%.200s\" function to have between %d and %d "
+ "args, found %d",
+ class_type, py_class_name, RNA_function_identifier(func),
+ func_arg_count, func_arg_min_count, arg_count);
+ }
+ else {
+ PyErr_Format(PyExc_ValueError,
+ "expected %.200s, %.200s class \"%.200s\" function to have %d args, found %d",
+ class_type, py_class_name, RNA_function_identifier(func),
+ func_arg_count, arg_count);
+ }
return -1;
}
}
@@ -7063,7 +7068,7 @@ static int bpy_class_call(bContext *C, PointerRNA *ptr, FunctionRNA *func, Param
PropertyRNA *parm;
ParameterIterator iter;
PointerRNA funcptr;
- int err = 0, i, ret_len = 0;
+ int err = 0, i, ret_len = 0, arg_count;
int flag = RNA_function_flag(func);
const char is_staticmethod = (flag & FUNC_NO_SELF) && !(flag & FUNC_USE_SELF_TYPE);
const char is_classmethod = (flag & FUNC_NO_SELF) && (flag & FUNC_USE_SELF_TYPE);
@@ -7198,7 +7203,15 @@ static int bpy_class_call(bContext *C, PointerRNA *ptr, FunctionRNA *func, Param
if (item) {
RNA_pointer_create(NULL, &RNA_Function, func, &funcptr);
- args = PyTuple_New(rna_function_arg_count(func)); /* first arg is included in 'item' */
+ if (is_staticmethod) {
+ arg_count = ((PyCodeObject *)PyFunction_GET_CODE(((PyMethodObject *)item)->im_func))->co_argcount - 1;
+ }
+ else {
+ arg_count = ((PyCodeObject *)PyFunction_GET_CODE(item))->co_argcount;
+ }
+// args = PyTuple_New(rna_function_arg_count(func)); /* first arg is included in 'item' */
+ args = PyTuple_New(arg_count); /* first arg is included in 'item' */
+
if (is_staticmethod) {
i = 0;
@@ -7230,9 +7243,11 @@ static int bpy_class_call(bContext *C, PointerRNA *ptr, FunctionRNA *func, Param
continue;
}
- parmitem = pyrna_param_to_py(&funcptr, parm, iter.data);
- PyTuple_SET_ITEM(args, i, parmitem);
- i++;
+ if (i < arg_count) {
+ parmitem = pyrna_param_to_py(&funcptr, parm, iter.data);
+ PyTuple_SET_ITEM(args, i, parmitem);
+ i++;
+ }
}
#ifdef USE_PEDANTIC_WRITE
diff --git a/source/blender/python/intern/bpy_rna_anim.c b/source/blender/python/intern/bpy_rna_anim.c
index 6e78a543481..e473af9fac8 100644
--- a/source/blender/python/intern/bpy_rna_anim.c
+++ b/source/blender/python/intern/bpy_rna_anim.c
@@ -312,7 +312,8 @@ PyObject *pyrna_struct_driver_add(BPy_StructRNA *self, PyObject *args)
BKE_reports_init(&reports, RPT_STORE);
- result = ANIM_add_driver(&reports, (ID *)self->ptr.id.data, path_full, index, 0, DRIVER_TYPE_PYTHON);
+ result = ANIM_add_driver(&reports, (ID *)self->ptr.id.data, path_full, index,
+ CREATEDRIVER_WITH_FMODIFIER, DRIVER_TYPE_PYTHON);
if (BPy_reports_to_error(&reports, PyExc_RuntimeError, true) == -1)
return NULL;
diff --git a/source/blender/python/intern/bpy_rna_anim.h b/source/blender/python/intern/bpy_rna_anim.h
index 005e8f3e1a4..8ef976b8cb4 100644
--- a/source/blender/python/intern/bpy_rna_anim.h
+++ b/source/blender/python/intern/bpy_rna_anim.h
@@ -20,6 +20,9 @@
* ***** END GPL LICENSE BLOCK *****
*/
+#ifndef __BPY_RNA_ANIM_H__
+#define __BPY_RNA_ANIM_H__
+
/** \file blender/python/intern/bpy_rna_anim.h
* \ingroup pythonintern
*/
@@ -33,3 +36,5 @@ PyObject *pyrna_struct_keyframe_insert(BPy_StructRNA *self, PyObject *args, PyOb
PyObject *pyrna_struct_keyframe_delete(BPy_StructRNA *self, PyObject *args, PyObject *kw);
PyObject *pyrna_struct_driver_add(BPy_StructRNA *self, PyObject *args);
PyObject *pyrna_struct_driver_remove(BPy_StructRNA *self, PyObject *args);
+
+#endif /* __BPY_RNA_ANIM_H__ */
diff --git a/source/blender/python/intern/bpy_rna_callback.h b/source/blender/python/intern/bpy_rna_callback.h
index 4b801f35654..6ef98790b4e 100644
--- a/source/blender/python/intern/bpy_rna_callback.h
+++ b/source/blender/python/intern/bpy_rna_callback.h
@@ -20,11 +20,13 @@
* ***** END GPL LICENSE BLOCK *****
*/
+#ifndef __BPY_RNA_CALLBACK_H__
+#define __BPY_RNA_CALLBACK_H__
+
/** \file blender/python/intern/bpy_rna_callback.h
* \ingroup pythonintern
*/
-
struct BPy_StructRNA;
struct PyObject;
@@ -35,3 +37,5 @@ PyObject *pyrna_callback_remove(BPy_StructRNA *self, PyObject *args);
PyObject *pyrna_callback_classmethod_add(PyObject *cls, PyObject *args);
PyObject *pyrna_callback_classmethod_remove(PyObject *cls, PyObject *args);
+
+#endif /* __BPY_RNA_CALLBACK_H__ */
diff --git a/source/blender/python/intern/gpu.h b/source/blender/python/intern/gpu.h
index f8c751f7f94..82338869b9d 100644
--- a/source/blender/python/intern/gpu.h
+++ b/source/blender/python/intern/gpu.h
@@ -27,10 +27,13 @@
/** \file blender/python/intern/gpu.h
* \ingroup pythonintern
- */
-
-/**
+ *
* Initializes the gpu Python module.
*/
+
+#ifndef __GPU_H__
+#define __GPU_H__
+
PyObject *GPU_initPython(void);
+#endif /* __GPU_H__ */
diff --git a/source/blender/python/mathutils/mathutils.c b/source/blender/python/mathutils/mathutils.c
index 90e9565f05f..8f94fc8b467 100644
--- a/source/blender/python/mathutils/mathutils.c
+++ b/source/blender/python/mathutils/mathutils.c
@@ -510,10 +510,12 @@ PyMODINIT_FUNC PyInit_mathutils(void)
PyDict_SetItemString(sys_modules, PyModule_GetName(submodule), submodule);
Py_INCREF(submodule);
+#ifndef MATH_STANDALONE
/* Noise submodule */
PyModule_AddObject(mod, "noise", (submodule = PyInit_mathutils_noise()));
PyDict_SetItemString(sys_modules, PyModule_GetName(submodule), submodule);
Py_INCREF(submodule);
+#endif
mathutils_matrix_row_cb_index = Mathutils_RegisterCallback(&mathutils_matrix_row_cb);
mathutils_matrix_col_cb_index = Mathutils_RegisterCallback(&mathutils_matrix_col_cb);
diff --git a/source/blender/python/mathutils/mathutils_Euler.c b/source/blender/python/mathutils/mathutils_Euler.c
index 6bb3031f0a3..2a874f51fd4 100644
--- a/source/blender/python/mathutils/mathutils_Euler.c
+++ b/source/blender/python/mathutils/mathutils_Euler.c
@@ -707,7 +707,7 @@ PyTypeObject euler_Type = {
* (i.e. it was allocated elsewhere by MEM_mallocN())
* pass Py_NEW - if vector is not a WRAPPER and managed by PYTHON
* (i.e. it must be created here with PyMEM_malloc())*/
-PyObject *Euler_CreatePyObject(float *eul, const short order, int type, PyTypeObject *base_type)
+PyObject *Euler_CreatePyObject(float eul[3], const short order, int type, PyTypeObject *base_type)
{
EulerObject *self;
diff --git a/source/blender/python/mathutils/mathutils_Euler.h b/source/blender/python/mathutils/mathutils_Euler.h
index 355d0ed1810..62fb83ef234 100644
--- a/source/blender/python/mathutils/mathutils_Euler.h
+++ b/source/blender/python/mathutils/mathutils_Euler.h
@@ -43,7 +43,7 @@ typedef struct {
* blender (stored in blend_data). This is an either/or struct not both */
/* prototypes */
-PyObject *Euler_CreatePyObject(float *eul, const short order, int type, PyTypeObject *base_type);
+PyObject *Euler_CreatePyObject(float eul[3], const short order, int type, PyTypeObject *base_type);
PyObject *Euler_CreatePyObject_cb(PyObject *cb_user, const short order,
unsigned char cb_type, unsigned char cb_subtype);
diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c
index d471cd05a2b..3e5dcc28903 100644
--- a/source/blender/python/mathutils/mathutils_Matrix.c
+++ b/source/blender/python/mathutils/mathutils_Matrix.c
@@ -522,18 +522,12 @@ static PyObject *C_Matrix_Rotation(PyObject *cls, PyObject *args)
axis_angle_to_mat3((float (*)[3])mat, tvec, angle);
}
else if (matSize == 2) {
- const float angle_cos = cosf(angle);
- const float angle_sin = sinf(angle);
+ angle_to_mat2((float (*)[2])mat, angle);
- /* 2D rotation matrix */
- mat[0] = angle_cos;
- mat[1] = angle_sin;
- mat[2] = -angle_sin;
- mat[3] = angle_cos;
}
else {
/* valid axis checked above */
- single_axis_angle_to_mat3((float (*)[3])mat, axis[0], angle);
+ axis_angle_to_mat3_single((float (*)[3])mat, axis[0], angle);
}
if (matSize == 4) {
diff --git a/source/blender/python/mathutils/mathutils_Quaternion.c b/source/blender/python/mathutils/mathutils_Quaternion.c
index b0b818faaa0..e13136057c8 100644
--- a/source/blender/python/mathutils/mathutils_Quaternion.c
+++ b/source/blender/python/mathutils/mathutils_Quaternion.c
@@ -1246,7 +1246,7 @@ PyTypeObject quaternion_Type = {
* (i.e. it was allocated elsewhere by MEM_mallocN())
* pass Py_NEW - if vector is not a WRAPPER and managed by PYTHON
* (i.e. it must be created here with PyMEM_malloc())*/
-PyObject *Quaternion_CreatePyObject(float *quat, int type, PyTypeObject *base_type)
+PyObject *Quaternion_CreatePyObject(float quat[4], int type, PyTypeObject *base_type)
{
QuaternionObject *self;
diff --git a/source/blender/python/mathutils/mathutils_Quaternion.h b/source/blender/python/mathutils/mathutils_Quaternion.h
index be3566934a4..36036c6d3fa 100644
--- a/source/blender/python/mathutils/mathutils_Quaternion.h
+++ b/source/blender/python/mathutils/mathutils_Quaternion.h
@@ -40,7 +40,7 @@ typedef struct {
* blender (stored in blend_data). This is an either/or struct not both */
/* prototypes */
-PyObject *Quaternion_CreatePyObject(float *quat, int type, PyTypeObject *base_type);
+PyObject *Quaternion_CreatePyObject(float quat[4], int type, PyTypeObject *base_type);
PyObject *Quaternion_CreatePyObject_cb(PyObject *cb_user,
unsigned char cb_type, unsigned char cb_subtype);
diff --git a/source/blender/python/mathutils/mathutils_Vector.c b/source/blender/python/mathutils/mathutils_Vector.c
index d44bce502ca..6b2da9ca593 100644
--- a/source/blender/python/mathutils/mathutils_Vector.c
+++ b/source/blender/python/mathutils/mathutils_Vector.c
@@ -1165,7 +1165,7 @@ static PyObject *Vector_lerp(VectorObject *self, PyObject *args)
PyDoc_STRVAR(Vector_rotate_doc,
".. function:: rotate(other)\n"
"\n"
-" Return vector by a rotation value.\n"
+" Rotate the vector by a rotation value.\n"
"\n"
" :arg other: rotation component of mathutils value\n"
" :type other: :class:`Euler`, :class:`Quaternion` or :class:`Matrix`\n"
@@ -1286,7 +1286,7 @@ static PyObject *vector_item_internal(VectorObject *self, int i, const int is_at
static PyObject *Vector_item(VectorObject *self, int i)
{
- return vector_item_internal(self, i, FALSE);
+ return vector_item_internal(self, i, false);
}
/* sequence accessor (set): vector[index] = value */
static int vector_ass_item_internal(VectorObject *self, int i, PyObject *value, const int is_attr)
@@ -1323,7 +1323,7 @@ static int vector_ass_item_internal(VectorObject *self, int i, PyObject *value,
static int Vector_ass_item(VectorObject *self, int i, PyObject *value)
{
- return vector_ass_item_internal(self, i, value, FALSE);
+ return vector_ass_item_internal(self, i, value, false);
}
/* sequence slice (get): vector[a:b] */
@@ -1853,7 +1853,7 @@ static PyObject *Vector_neg(VectorObject *self)
}
/*------------------------vec_magnitude_nosqrt (internal) - for comparing only */
-static double vec_magnitude_nosqrt(float *data, int size)
+static double vec_magnitude_nosqrt(const float *data, int size)
{
/* return (double)sqrt(dot);*/
/* warning, line above removed because we are not using the length,
@@ -2086,12 +2086,12 @@ PyDoc_STRVAR(Vector_axis_w_doc, "Vector W axis (4D Vectors only).\n\n:type: floa
static PyObject *Vector_axis_get(VectorObject *self, void *type)
{
- return vector_item_internal(self, GET_INT_FROM_POINTER(type), TRUE);
+ return vector_item_internal(self, GET_INT_FROM_POINTER(type), true);
}
static int Vector_axis_set(VectorObject *self, PyObject *value, void *type)
{
- return vector_ass_item_internal(self, GET_INT_FROM_POINTER(type), value, TRUE);
+ return vector_ass_item_internal(self, GET_INT_FROM_POINTER(type), value, true);
}
/* vector.length */
@@ -2940,10 +2940,10 @@ PyObject *Vector_CreatePyObject_cb(PyObject *cb_user, int size, unsigned char cb
return (PyObject *)self;
}
-PyObject *Vector_CreatePyObject_alloc(float *vec, const int size, PyTypeObject *base_type)
+PyObject *Vector_CreatePyObject_alloc(const float *vec, const int size, PyTypeObject *base_type)
{
VectorObject *vect_ob;
- vect_ob = (VectorObject *)Vector_CreatePyObject(vec, size, Py_WRAP, base_type);
+ vect_ob = (VectorObject *)Vector_CreatePyObject((float *)vec, size, Py_WRAP, base_type);
vect_ob->wrapped = Py_NEW;
return (PyObject *)vect_ob;
diff --git a/source/blender/python/mathutils/mathutils_Vector.h b/source/blender/python/mathutils/mathutils_Vector.h
index 18d89e73734..2074270670a 100644
--- a/source/blender/python/mathutils/mathutils_Vector.h
+++ b/source/blender/python/mathutils/mathutils_Vector.h
@@ -41,6 +41,6 @@ typedef struct {
PyObject *Vector_CreatePyObject(float *vec, const int size, const int type, PyTypeObject *base_type);
PyObject *Vector_CreatePyObject_cb(PyObject *user, int size,
unsigned char cb_type, unsigned char subtype);
-PyObject *Vector_CreatePyObject_alloc(float *vec, const int size, PyTypeObject *base_type);
+PyObject *Vector_CreatePyObject_alloc(const float *vec, const int size, PyTypeObject *base_type);
-#endif /* __MATHUTILS_VECTOR_H__ */
+#endif /* __MATHUTILS_VECTOR_H__ */
diff --git a/source/blender/python/mathutils/mathutils_geometry.c b/source/blender/python/mathutils/mathutils_geometry.c
index 8509c46b395..8b5b74c480a 100644
--- a/source/blender/python/mathutils/mathutils_geometry.c
+++ b/source/blender/python/mathutils/mathutils_geometry.c
@@ -34,6 +34,7 @@
# include "MEM_guardedalloc.h"
# include "BLI_blenlib.h"
# include "BLI_boxpack2d.h"
+# include "BLI_convexhull2d.h"
# include "BKE_displist.h"
# include "BKE_curve.h"
#endif
@@ -568,22 +569,19 @@ PyDoc_STRVAR(M_Geometry_intersect_line_plane_doc,
" :type plane_co: :class:`mathutils.Vector`\n"
" :arg plane_no: The direction the plane is facing\n"
" :type plane_no: :class:`mathutils.Vector`\n"
-" :arg no_flip: Always return an intersection on the directon defined bt line_a -> line_b\n"
-" :type no_flip: :boolean\n"
" :return: The point of intersection or None when not found\n"
" :rtype: :class:`mathutils.Vector` or None\n"
);
static PyObject *M_Geometry_intersect_line_plane(PyObject *UNUSED(self), PyObject *args)
{
VectorObject *line_a, *line_b, *plane_co, *plane_no;
- int no_flip = 0;
float isect[3];
+
if (!PyArg_ParseTuple(args, "O!O!O!O!|i:intersect_line_plane",
&vector_Type, &line_a,
&vector_Type, &line_b,
&vector_Type, &plane_co,
- &vector_Type, &plane_no,
- &no_flip))
+ &vector_Type, &plane_no))
{
return NULL;
}
@@ -603,7 +601,7 @@ static PyObject *M_Geometry_intersect_line_plane(PyObject *UNUSED(self), PyObjec
return NULL;
}
- if (isect_line_plane_v3(isect, line_a->vec, line_b->vec, plane_co->vec, plane_no->vec, no_flip) == 1) {
+ if (isect_line_plane_v3(isect, line_a->vec, line_b->vec, plane_co->vec, plane_no->vec) == 1) {
return Vector_CreatePyObject(isect, 3, Py_NEW, NULL);
}
else {
@@ -692,7 +690,7 @@ static PyObject *M_Geometry_intersect_line_sphere(PyObject *UNUSED(self), PyObje
{
VectorObject *line_a, *line_b, *sphere_co;
float sphere_radius;
- int clip = TRUE;
+ int clip = true;
float isect_a[3];
float isect_b[3];
@@ -728,12 +726,12 @@ static PyObject *M_Geometry_intersect_line_sphere(PyObject *UNUSED(self), PyObje
switch (isect_line_sphere_v3(line_a->vec, line_b->vec, sphere_co->vec, sphere_radius, isect_a, isect_b)) {
case 1:
- if (!(!clip || (((lambda = line_point_factor_v3(isect_a, line_a->vec, line_b->vec)) >= 0.0f) && (lambda <= 1.0f)))) use_a = FALSE;
+ if (!(!clip || (((lambda = line_point_factor_v3(isect_a, line_a->vec, line_b->vec)) >= 0.0f) && (lambda <= 1.0f)))) use_a = false;
use_b = false;
break;
case 2:
- if (!(!clip || (((lambda = line_point_factor_v3(isect_a, line_a->vec, line_b->vec)) >= 0.0f) && (lambda <= 1.0f)))) use_a = FALSE;
- if (!(!clip || (((lambda = line_point_factor_v3(isect_b, line_a->vec, line_b->vec)) >= 0.0f) && (lambda <= 1.0f)))) use_b = FALSE;
+ if (!(!clip || (((lambda = line_point_factor_v3(isect_a, line_a->vec, line_b->vec)) >= 0.0f) && (lambda <= 1.0f)))) use_a = false;
+ if (!(!clip || (((lambda = line_point_factor_v3(isect_b, line_a->vec, line_b->vec)) >= 0.0f) && (lambda <= 1.0f)))) use_b = false;
break;
default:
use_a = false;
@@ -773,7 +771,7 @@ static PyObject *M_Geometry_intersect_line_sphere_2d(PyObject *UNUSED(self), PyO
{
VectorObject *line_a, *line_b, *sphere_co;
float sphere_radius;
- int clip = TRUE;
+ int clip = true;
float isect_a[2];
float isect_b[2];
@@ -803,7 +801,7 @@ static PyObject *M_Geometry_intersect_line_sphere_2d(PyObject *UNUSED(self), PyO
switch (isect_line_sphere_v2(line_a->vec, line_b->vec, sphere_co->vec, sphere_radius, isect_a, isect_b)) {
case 1:
if (!(!clip || (((lambda = line_point_factor_v2(isect_a, line_a->vec, line_b->vec)) >= 0.0f) && (lambda <= 1.0f)))) use_a = false;
- use_b = FALSE;
+ use_b = false;
break;
case 2:
if (!(!clip || (((lambda = line_point_factor_v2(isect_a, line_a->vec, line_b->vec)) >= 0.0f) && (lambda <= 1.0f)))) use_a = false;
@@ -980,24 +978,35 @@ PyDoc_STRVAR(M_Geometry_distance_point_to_plane_doc,
);
static PyObject *M_Geometry_distance_point_to_plane(PyObject *UNUSED(self), PyObject *args)
{
- VectorObject *pt, *plene_co, *plane_no;
+ VectorObject *pt, *plane_co, *plane_no;
+ float plane[4];
if (!PyArg_ParseTuple(args, "O!O!O!:distance_point_to_plane",
&vector_Type, &pt,
- &vector_Type, &plene_co,
+ &vector_Type, &plane_co,
&vector_Type, &plane_no))
{
return NULL;
}
+ if (pt->size != 3 ||
+ plane_co->size != 3 ||
+ plane_no->size != 3)
+ {
+ PyErr_SetString(PyExc_ValueError,
+ "One of more of the vector arguments wasn't a 3D vector");
+ return NULL;
+ }
+
if (BaseMath_ReadCallback(pt) == -1 ||
- BaseMath_ReadCallback(plene_co) == -1 ||
+ BaseMath_ReadCallback(plane_co) == -1 ||
BaseMath_ReadCallback(plane_no) == -1)
{
return NULL;
}
- return PyFloat_FromDouble(dist_to_plane_v3(pt->vec, plene_co->vec, plane_no->vec));
+ plane_from_point_normal_v3(plane, plane_co->vec, plane_no->vec);
+ return PyFloat_FromDouble(dist_to_plane_v3(pt->vec, plane));
}
PyDoc_STRVAR(M_Geometry_barycentric_transform_doc,
@@ -1054,6 +1063,17 @@ static PyObject *M_Geometry_barycentric_transform(PyObject *UNUSED(self), PyObje
return NULL;
}
+ if (BaseMath_ReadCallback(vec_pt) == -1 ||
+ BaseMath_ReadCallback(vec_t1_src) == -1 ||
+ BaseMath_ReadCallback(vec_t2_src) == -1 ||
+ BaseMath_ReadCallback(vec_t3_src) == -1 ||
+ BaseMath_ReadCallback(vec_t1_tar) == -1 ||
+ BaseMath_ReadCallback(vec_t2_tar) == -1 ||
+ BaseMath_ReadCallback(vec_t3_tar) == -1)
+ {
+ return NULL;
+ }
+
barycentric_transform(vec, vec_pt->vec,
vec_t1_tar->vec, vec_t2_tar->vec, vec_t3_tar->vec,
vec_t1_src->vec, vec_t2_src->vec, vec_t3_src->vec);
@@ -1099,7 +1119,7 @@ static PyObject *M_Geometry_points_in_planes(PyObject *UNUSED(self), PyObject *a
/* python */
PyObject *py_verts = PyList_New(0);
- PyObject *py_plene_index = PyList_New(0);
+ PyObject *py_plane_index = PyList_New(0);
memset(planes_used, 0, sizeof(char) * len);
@@ -1135,7 +1155,7 @@ static PyObject *M_Geometry_points_in_planes(PyObject *UNUSED(self), PyObject *a
PyList_Append(py_verts, item);
Py_DECREF(item);
- planes_used[i] = planes_used[j] = planes_used[k] = TRUE;
+ planes_used[i] = planes_used[j] = planes_used[k] = true;
}
}
}
@@ -1151,7 +1171,7 @@ static PyObject *M_Geometry_points_in_planes(PyObject *UNUSED(self), PyObject *a
for (i = 0; i < len; i++) {
if (planes_used[i]) {
PyObject *item = PyLong_FromLong(i);
- PyList_Append(py_plene_index, item);
+ PyList_Append(py_plane_index, item);
Py_DECREF(item);
}
}
@@ -1160,7 +1180,7 @@ static PyObject *M_Geometry_points_in_planes(PyObject *UNUSED(self), PyObject *a
{
PyObject *ret = PyTuple_New(2);
PyTuple_SET_ITEM(ret, 0, py_verts);
- PyTuple_SET_ITEM(ret, 1, py_plene_index);
+ PyTuple_SET_ITEM(ret, 1, py_plane_index);
return ret;
}
}
@@ -1473,7 +1493,7 @@ static PyObject *M_Geometry_box_pack_2d(PyObject *UNUSED(self), PyObject *boxlis
}
/* Non Python function */
- BLI_box_pack_2D(boxarray, len, &tot_width, &tot_height);
+ BLI_box_pack_2d(boxarray, len, &tot_width, &tot_height);
boxPack_ToPyObject(boxlist, &boxarray);
}
@@ -1484,6 +1504,87 @@ static PyObject *M_Geometry_box_pack_2d(PyObject *UNUSED(self), PyObject *boxlis
return ret;
}
+PyDoc_STRVAR(M_Geometry_box_fit_2d_doc,
+".. function:: box_fit_2d(points)\n"
+"\n"
+" Returns an angle that best fits the points to an axis aligned rectangle\n"
+"\n"
+" :arg points: list of 2d points.\n"
+" :type points: list\n"
+" :return: angle\n"
+" :rtype: float\n"
+);
+static PyObject *M_Geometry_box_fit_2d(PyObject *UNUSED(self), PyObject *pointlist)
+{
+ float (*points)[2];
+ Py_ssize_t len;
+
+ float angle = 0.0f;
+
+ len = mathutils_array_parse_alloc_v(((float **)&points), 2, pointlist, "box_fit_2d");
+ if (len == -1) {
+ return NULL;
+ }
+
+ if (len) {
+ /* Non Python function */
+ angle = BLI_convexhull_aabb_fit_points_2d((const float (*)[2])points, len);
+
+ PyMem_Free(points);
+ }
+
+
+ return PyFloat_FromDouble(angle);
+}
+
+PyDoc_STRVAR(M_Geometry_convex_hull_2d_doc,
+".. function:: convex_hull_2d(points)\n"
+"\n"
+" Returns a list of indices into the list given\n"
+"\n"
+" :arg points: list of 2d points.\n"
+" :type points: list\n"
+" :return: a list of indices\n"
+" :rtype: list of ints\n"
+);
+static PyObject *M_Geometry_convex_hull_2d(PyObject *UNUSED(self), PyObject *pointlist)
+{
+ float (*points)[2];
+ Py_ssize_t len;
+
+ PyObject *ret;
+
+ len = mathutils_array_parse_alloc_v(((float **)&points), 2, pointlist, "convex_hull_2d");
+ if (len == -1) {
+ return NULL;
+ }
+
+ if (len) {
+ int *index_map;
+ Py_ssize_t len_ret, i;
+
+ index_map = MEM_mallocN(sizeof(*index_map) * len, __func__);
+
+ /* Non Python function */
+ len_ret = BLI_convexhull_2d((const float (*)[2])points, len, index_map);
+
+ ret = PyList_New(len_ret);
+ for (i = 0; i < len_ret; i++) {
+ PyList_SET_ITEM(ret, i, PyLong_FromLong(index_map[i]));
+ }
+
+ MEM_freeN(index_map);
+
+ PyMem_Free(points);
+ }
+ else {
+ ret = PyList_New(0);
+ }
+
+
+ return ret;
+}
+
#endif /* MATH_STANDALONE */
@@ -1508,6 +1609,8 @@ static PyMethodDef M_Geometry_methods[] = {
#ifndef MATH_STANDALONE
{"interpolate_bezier", (PyCFunction) M_Geometry_interpolate_bezier, METH_VARARGS, M_Geometry_interpolate_bezier_doc},
{"tessellate_polygon", (PyCFunction) M_Geometry_tessellate_polygon, METH_O, M_Geometry_tessellate_polygon_doc},
+ {"convex_hull_2d", (PyCFunction) M_Geometry_convex_hull_2d, METH_O, M_Geometry_convex_hull_2d_doc},
+ {"box_fit_2d", (PyCFunction) M_Geometry_box_fit_2d, METH_O, M_Geometry_box_fit_2d_doc},
{"box_pack_2d", (PyCFunction) M_Geometry_box_pack_2d, METH_O, M_Geometry_box_pack_2d_doc},
#endif
{NULL, NULL, 0, NULL}
diff --git a/source/blender/quicktime/apple/qtkit_export.m b/source/blender/quicktime/apple/qtkit_export.m
index 7b42c89d936..8cf91e44c77 100644
--- a/source/blender/quicktime/apple/qtkit_export.m
+++ b/source/blender/quicktime/apple/qtkit_export.m
@@ -317,7 +317,7 @@ int start_qt(struct Scene *scene, struct RenderData *rd, int rectx, int recty, R
int success = 1;
OSStatus err = noErr;
- if(qtexport == NULL) qtexport = MEM_callocN(sizeof(QuicktimeExport), "QuicktimeExport");
+ if (qtexport == NULL) qtexport = MEM_callocN(sizeof(QuicktimeExport), "QuicktimeExport");
[QTMovie enterQTKitOnThread];
@@ -476,7 +476,7 @@ int start_qt(struct Scene *scene, struct RenderData *rd, int rectx, int recty, R
err = AudioFileCreateWithURL(outputFileURL, audioFileType, &qtexport->audioOutputFormat, kAudioFileFlags_EraseFile, &qtexport->audioFile);
CFRelease(outputFileURL);
- if(err)
+ if (err)
BKE_report(reports, RPT_ERROR, "\nQuicktime: unable to create temporary audio file. Format error ?");
else {
err = AudioConverterNew(&qtexport->audioInputFormat, &qtexport->audioOutputFormat, &qtexport->audioConverter);
@@ -542,7 +542,7 @@ int start_qt(struct Scene *scene, struct RenderData *rd, int rectx, int recty, R
else
qtexport->movie = [[QTMovie alloc] initToWritableFile:qtexport->filename error:&error];
- if(qtexport->movie == nil) {
+ if (qtexport->movie == nil) {
BKE_report(reports, RPT_ERROR, "Unable to create quicktime movie.");
success = 0;
if (qtexport->filename) [qtexport->filename release];
@@ -749,13 +749,11 @@ void end_qt(void)
if (audioTmpMovie) {
NSArray *audioTracks = [audioTmpMovie tracksOfMediaType:QTMediaTypeSound];
QTTrack *audioTrack = nil;
- if( [audioTracks count] > 0 )
- {
+ if ( [audioTracks count] > 0 ) {
audioTrack = [audioTracks objectAtIndex:0];
}
- if( audioTrack )
- {
+ if (audioTrack) {
QTTimeRange totalRange;
totalRange.time = QTZeroTime;
totalRange.duration = [[audioTmpMovie attributeForKey:QTMovieDurationAttribute] QTTimeValue];
@@ -798,7 +796,7 @@ void end_qt(void)
[QTMovie exitQTKitOnThread];
- if(qtexport) {
+ if (qtexport) {
MEM_freeN(qtexport);
qtexport = NULL;
}
diff --git a/source/blender/quicktime/apple/qtkit_import.m b/source/blender/quicktime/apple/qtkit_import.m
index bee26c5348e..fbe4733c3b1 100644
--- a/source/blender/quicktime/apple/qtkit_import.m
+++ b/source/blender/quicktime/apple/qtkit_import.m
@@ -128,7 +128,7 @@ void free_anim_quicktime(struct anim *anim)
if (anim == NULL) return;
if (anim->qtime == NULL) return;
- if(anim->qtime->ibuf)
+ if (anim->qtime->ibuf)
IMB_freeImBuf(anim->qtime->ibuf);
[anim->qtime->media release];
@@ -136,7 +136,7 @@ void free_anim_quicktime(struct anim *anim)
[QTMovie exitQTKitOnThread];
- if(anim->qtime) MEM_freeN (anim->qtime);
+ if (anim->qtime) MEM_freeN (anim->qtime);
anim->qtime = NULL;
@@ -289,7 +289,7 @@ ImBuf *qtime_fetchibuf (struct anim *anim, int position)
}
if (frameImage == nil) {
- if(QTIME_DEBUG) printf ("Error reading frame from Quicktime");
+ if (QTIME_DEBUG) printf ("Error reading frame from Quicktime");
[pool drain];
return NULL;
}
@@ -312,7 +312,7 @@ int startquicktime(struct anim *anim)
anim->qtime = MEM_callocN(sizeof(QuicktimeMovie),"animqt");
if (anim->qtime == NULL) {
- if(QTIME_DEBUG) printf("Can't alloc qtime: %s\n", anim->name);
+ if (QTIME_DEBUG) printf("Can't alloc qtime: %s\n", anim->name);
return -1;
}
@@ -329,9 +329,9 @@ int startquicktime(struct anim *anim)
anim->qtime->movie = [QTMovie movieWithAttributes:attributes error:NULL];
if (!anim->qtime->movie) {
- if(QTIME_DEBUG) printf("qt: bad movie %s\n", anim->name);
+ if (QTIME_DEBUG) printf("qt: bad movie %s\n", anim->name);
MEM_freeN(anim->qtime);
- if(QTIME_DEBUG) printf("qt: can't load %s\n", anim->name);
+ if (QTIME_DEBUG) printf("qt: can't load %s\n", anim->name);
[QTMovie exitQTKitOnThread];
[pool drain];
return -1;
@@ -342,11 +342,11 @@ int startquicktime(struct anim *anim)
videoTracks = [anim->qtime->movie tracksOfMediaType:QTMediaTypeVideo];
- if([videoTracks count] == 0) {
- if(QTIME_DEBUG) printf("qt: no video tracks for movie %s\n", anim->name);
+ if ([videoTracks count] == 0) {
+ if (QTIME_DEBUG) printf("qt: no video tracks for movie %s\n", anim->name);
[anim->qtime->movie release];
MEM_freeN(anim->qtime);
- if(QTIME_DEBUG) printf("qt: can't load %s\n", anim->name);
+ if (QTIME_DEBUG) printf("qt: can't load %s\n", anim->name);
[QTMovie exitQTKitOnThread];
[pool drain];
return -1;
@@ -360,8 +360,8 @@ int startquicktime(struct anim *anim)
anim->x = frameSize.width;
anim->y = frameSize.height;
- if(anim->x == 0 && anim->y == 0) {
- if(QTIME_DEBUG) printf("qt: error, no dimensions\n");
+ if (anim->x == 0 && anim->y == 0) {
+ if (QTIME_DEBUG) printf("qt: error, no dimensions\n");
free_anim_quicktime(anim);
[pool drain];
return -1;
@@ -398,12 +398,12 @@ int imb_is_a_quicktime(char *name)
int result;
NSAutoreleasePool *pool;
- if(!G.have_quicktime) return 0;
+ if (!G.have_quicktime) return 0;
pool = [[NSAutoreleasePool alloc] init];
// don't let quicktime image import handle these
- if( BLI_testextensie(name, ".swf") ||
+ if (BLI_testextensie(name, ".swf") ||
BLI_testextensie(name, ".txt") ||
BLI_testextensie(name, ".mpg") ||
BLI_testextensie(name, ".wav") ||
@@ -437,7 +437,7 @@ ImBuf *imb_quicktime_decode(unsigned char *mem, int size, int flags)
NSBitmapImageRep *blBitmapFormatImageRGB,*blBitmapFormatImageRGBA;
NSAutoreleasePool *pool;
- if(!G.have_quicktime)
+ if (!G.have_quicktime)
return NULL;
pool = [[NSAutoreleasePool alloc] init];
diff --git a/source/blender/render/CMakeLists.txt b/source/blender/render/CMakeLists.txt
index 94a95974009..db23cd97b74 100644
--- a/source/blender/render/CMakeLists.txt
+++ b/source/blender/render/CMakeLists.txt
@@ -98,7 +98,6 @@ set(SRC
intern/include/raycounter.h
intern/include/rayobject.h
intern/include/rayintersection.h
- intern/include/raycounter.h
intern/include/render_types.h
intern/include/render_result.h
intern/include/rendercore.h
diff --git a/source/blender/render/extern/include/RE_multires_bake.h b/source/blender/render/extern/include/RE_multires_bake.h
index 04cfe55e3a3..c1c5fc4a04d 100644
--- a/source/blender/render/extern/include/RE_multires_bake.h
+++ b/source/blender/render/extern/include/RE_multires_bake.h
@@ -37,21 +37,26 @@ struct MultiresBakeRender;
typedef struct MultiresBakeRender {
DerivedMesh *lores_dm, *hires_dm;
- int simple, lvl, tot_lvl, bake_filter;
- short mode, use_lores_mesh;
+ bool simple;
+ int bake_filter; /* Bake-filter, aka margin */
+ int lvl, tot_lvl;
+ short mode;
+ bool use_lores_mesh; /* Use low-resolution mesh when baking displacement maps */
- int number_of_rays;
- float bias;
+ int number_of_rays; /* Number of rays to be cast when doing AO baking */
+ float bias; /* Bias between object and start ray point when doing AO baking */
int tot_obj, tot_image;
ListBase image;
int baked_objects, baked_faces;
- int raytrace_structure;
- int octree_resolution;
- int threads;
-
+ int raytrace_structure; /* Optimization structure to be used for AO baking */
+ int octree_resolution; /* Reslution of octotree when using octotree optimization structure */
+ int threads; /* Number of threads to be used for baking */
+
+ float user_scale; /* User scale used to scale displacement when baking derivative map. */
+
short *stop;
short *do_update;
float *progress;
diff --git a/source/blender/render/extern/include/RE_pipeline.h b/source/blender/render/extern/include/RE_pipeline.h
index e154fd42119..79826a63690 100644
--- a/source/blender/render/extern/include/RE_pipeline.h
+++ b/source/blender/render/extern/include/RE_pipeline.h
@@ -225,8 +225,8 @@ void RE_init_threadcount(Render *re);
void RE_TileProcessor(struct Render *re);
/* only RE_NewRender() needed, main Blender render calls */
-void RE_BlenderFrame(struct Render *re, struct Main *bmain, struct Scene *scene, struct SceneRenderLayer *srl, struct Object *camera_override, unsigned int lay, int frame, const short write_still);
-void RE_BlenderAnim(struct Render *re, struct Main *bmain, struct Scene *scene, struct Object *camera_override, unsigned int lay, int sfra, int efra, int tfra);
+void RE_BlenderFrame(struct Render *re, struct Main *bmain, struct Scene *scene, struct SceneRenderLayer *srl, struct Object *camera_override, unsigned int lay_override, int frame, const short write_still);
+void RE_BlenderAnim(struct Render *re, struct Main *bmain, struct Scene *scene, struct Object *camera_override, unsigned int lay_override, int sfra, int efra, int tfra);
#ifdef WITH_FREESTYLE
void RE_RenderFreestyleStrokes(struct Render *re, struct Main *bmain, struct Scene *scene, int render);
#endif
@@ -249,7 +249,7 @@ void RE_MergeFullSample(struct Render *re, struct Main *bmain, struct Scene *sce
/* ancient stars function... go away! */
void RE_make_stars(struct Render *re, struct Scene *scenev3d, void (*initfunc)(void),
- void (*vertexfunc)(float *), void (*termfunc)(void));
+ void (*vertexfunc)(const float *), void (*termfunc)(void));
/* display and event callbacks */
void RE_display_init_cb (struct Render *re, void *handle, void (*f)(void *handle, RenderResult *rr));
@@ -281,6 +281,8 @@ int RE_seq_render_active(struct Scene *scene, struct RenderData *rd);
#define RE_BAKE_MIRROR_INTENSITY 10
#define RE_BAKE_ALPHA 11
#define RE_BAKE_EMIT 12
+#define RE_BAKE_DERIVATIVE 13
+#define RE_BAKE_VERTEX_COLORS 14
void RE_Database_Baking(struct Render *re, struct Main *bmain, struct Scene *scene, unsigned int lay, const int type, struct Object *actob);
diff --git a/source/blender/render/extern/include/RE_shader_ext.h b/source/blender/render/extern/include/RE_shader_ext.h
index 19ddfb7a13d..baec1a74721 100644
--- a/source/blender/render/extern/include/RE_shader_ext.h
+++ b/source/blender/render/extern/include/RE_shader_ext.h
@@ -213,6 +213,9 @@ int RE_bake_shade_all_selected(struct Render *re, int type, struct Object *actob
struct Image *RE_bake_shade_get_image(void);
void RE_bake_ibuf_filter(struct ImBuf *ibuf, char *mask, const int filter);
void RE_bake_ibuf_normalize_displacement(struct ImBuf *ibuf, float *displacement, char *mask, float displacement_min, float displacement_max);
+float RE_bake_make_derivative(struct ImBuf *ibuf, float *heights_buffer, const char *mask,
+ const float height_min, const float height_max,
+ const float fmult);
#define BAKE_RESULT_OK 0
#define BAKE_RESULT_NO_OBJECTS 1
diff --git a/source/blender/render/intern/include/render_types.h b/source/blender/render/intern/include/render_types.h
index 42dc9bcdfb2..3d97eda50d9 100644
--- a/source/blender/render/intern/include/render_types.h
+++ b/source/blender/render/intern/include/render_types.h
@@ -236,7 +236,6 @@ struct Render
struct Object *excludeob;
ListBase render_volumes_inside;
ListBase volumes;
- ListBase volume_precache_parts;
#ifdef WITH_FREESTYLE
struct Main freestyle_bmain;
@@ -621,6 +620,7 @@ typedef struct LampRen {
#define R_BAKE_TRACE 32
#define R_BAKING 64
#define R_ANIMATION 128
+#define R_NEED_VCOL 256
/* vlakren->flag (vlak = face in dutch) char!!! */
#define R_SMOOTH 1
diff --git a/source/blender/render/intern/include/texture.h b/source/blender/render/intern/include/texture.h
index 2dc12f39db7..b23d6b09524 100644
--- a/source/blender/render/intern/include/texture.h
+++ b/source/blender/render/intern/include/texture.h
@@ -35,17 +35,17 @@
#define BRICONT \
texres->tin= (texres->tin-0.5f) * tex->contrast+tex->bright-0.5f; \
- if(texres->tin < 0.0f) texres->tin= 0.0f; \
- else if(texres->tin > 1.0f) texres->tin= 1.0f; \
+ if (texres->tin < 0.0f) texres->tin= 0.0f; \
+ else if (texres->tin > 1.0f) texres->tin= 1.0f; \
#define BRICONTRGB \
texres->tr= tex->rfac*((texres->tr-0.5f)*tex->contrast+tex->bright-0.5f); \
- if(texres->tr<0.0f) texres->tr= 0.0f; \
+ if (texres->tr<0.0f) texres->tr= 0.0f; \
texres->tg= tex->gfac*((texres->tg-0.5f)*tex->contrast+tex->bright-0.5f); \
- if(texres->tg<0.0f) texres->tg= 0.0f; \
+ if (texres->tg<0.0f) texres->tg= 0.0f; \
texres->tb= tex->bfac*((texres->tb-0.5f)*tex->contrast+tex->bright-0.5f); \
- if(texres->tb<0.0f) texres->tb= 0.0f; \
- if(tex->saturation != 1.0f) { \
+ if (texres->tb<0.0f) texres->tb= 0.0f; \
+ if (tex->saturation != 1.0f) { \
float _hsv[3]; \
rgb_to_hsv(texres->tr, texres->tg, texres->tb, \
_hsv, _hsv+1, _hsv+2); \
diff --git a/source/blender/render/intern/include/texture_ocean.h b/source/blender/render/intern/include/texture_ocean.h
index 121142aa0b0..4a71aff930a 100644
--- a/source/blender/render/intern/include/texture_ocean.h
+++ b/source/blender/render/intern/include/texture_ocean.h
@@ -26,6 +26,10 @@
#ifndef __TEXTURE_OCEAN_H__
#define __TEXTURE_OCEAN_H__
+/** \file blender/render/intern/include/texture_ocean.h
+ * \ingroup render
+ */
+
int ocean_texture(struct Tex *tex, const float texvec[2], struct TexResult *texres);
#endif /* __TEXTURE_OCEAN_H__ */
diff --git a/source/blender/render/intern/source/bake.c b/source/blender/render/intern/source/bake.c
index 564cca09834..c150133b276 100644
--- a/source/blender/render/intern/source/bake.c
+++ b/source/blender/render/intern/source/bake.c
@@ -168,7 +168,7 @@ static void bake_shade(void *handle, Object *ob, ShadeInput *shi, int UNUSED(qua
else {
if (bs->type == RE_BAKE_SHADOW) /* Why do shadows set the color anyhow?, ignore material color for baking */
shi->r = shi->g = shi->b = 1.0f;
-
+
shade_input_set_shade_texco(shi);
/* only do AO for a full bake (and obviously AO bakes)
@@ -260,12 +260,16 @@ static void bake_shade(void *handle, Object *ob, ShadeInput *shi, int UNUSED(qua
copy_v3_fl(shr.combined, shi->emit);
shr.alpha = 1.0f;
}
+ else if (bs->type == RE_BAKE_VERTEX_COLORS) {
+ copy_v3_v3(shr.combined, shi->vcol);
+ shr.alpha = shi->vcol[3];
+ }
}
if (bs->rect_float && !bs->vcol) {
float *col = bs->rect_float + 4 * (bs->rectx * y + x);
copy_v3_v3(col, shr.combined);
- if (bs->type == RE_BAKE_ALL || bs->type == RE_BAKE_TEXTURE) {
+ if (bs->type == RE_BAKE_ALL || bs->type == RE_BAKE_TEXTURE || bs->type == RE_BAKE_VERTEX_COLORS) {
col[3] = shr.alpha;
}
else {
@@ -294,7 +298,7 @@ static void bake_shade(void *handle, Object *ob, ShadeInput *shi, int UNUSED(qua
rgb_float_to_uchar(col, shr.combined);
}
- if (ELEM(bs->type, RE_BAKE_ALL, RE_BAKE_TEXTURE)) {
+ if (ELEM3(bs->type, RE_BAKE_ALL, RE_BAKE_TEXTURE, RE_BAKE_VERTEX_COLORS)) {
col[3] = FTOCHAR(shr.alpha);
}
else {
@@ -318,6 +322,10 @@ static void bake_shade(void *handle, Object *ob, ShadeInput *shi, int UNUSED(qua
if (bs->rect_mask) {
bs->rect_mask[bs->rectx * y + x] = FILTER_MASK_USED;
}
+
+ if (bs->do_update) {
+ *bs->do_update = true;
+ }
}
static void bake_displacement(void *handle, ShadeInput *UNUSED(shi), float dist, int x, int y)
@@ -553,7 +561,7 @@ static void do_bake_shade(void *handle, int x, int y, float u, float v)
}
}
- if (bs->type == RE_BAKE_DISPLACEMENT) {
+ if (ELEM(bs->type, RE_BAKE_DISPLACEMENT, RE_BAKE_DERIVATIVE)) {
if (hit)
bake_displacement(handle, shi, (dir == -1) ? mindist : -mindist, x, y);
else
@@ -647,6 +655,8 @@ static int get_next_bake_face(BakeShade *bs)
const float vec_solid[4] = {0.0f, 0.0f, 0.0f, 1.0f};
const float nor_alpha[4] = {0.5f, 0.5f, 1.0f, 0.0f};
const float nor_solid[4] = {0.5f, 0.5f, 1.0f, 1.0f};
+ const float disp_alpha[4] = {0.5f, 0.5f, 0.5f, 0.0f};
+ const float disp_solid[4] = {0.5f, 0.5f, 0.5f, 1.0f};
tface = RE_vlakren_get_tface(obr, vlr, obr->bakemtface, NULL, 0);
@@ -686,6 +696,8 @@ static int get_next_bake_face(BakeShade *bs)
if (R.r.bake_flag & R_BAKE_CLEAR) {
if (R.r.bake_mode == RE_BAKE_NORMALS && R.r.bake_normal_space == R_BAKE_SPACE_TANGENT)
IMB_rectfill(ibuf, (ibuf->planes == R_IMF_PLANES_RGBA) ? nor_alpha : nor_solid);
+ else if (ELEM(R.r.bake_mode, RE_BAKE_DISPLACEMENT, RE_BAKE_DERIVATIVE))
+ IMB_rectfill(ibuf, (ibuf->planes == R_IMF_PLANES_RGBA) ? disp_alpha : disp_solid);
else
IMB_rectfill(ibuf, (ibuf->planes == R_IMF_PLANES_RGBA) ? vec_alpha : vec_solid);
}
@@ -828,8 +840,11 @@ static void shade_tface(BakeShade *bs)
}
}
- if (bs->use_displacement_buffer)
- userdata->displacement_buffer = MEM_callocN(sizeof(float) * bs->rectx * bs->recty, "BakeDisp");
+ if (bs->use_displacement_buffer) {
+ if (userdata->displacement_buffer == NULL) {
+ userdata->displacement_buffer = MEM_callocN(sizeof(float) * bs->rectx * bs->recty, "BakeDisp");
+ }
+ }
bs->ibuf->userdata = userdata;
@@ -977,8 +992,10 @@ int RE_bake_shade_all_selected(Render *re, int type, Object *actob, short *do_up
use_mask = true;
/* do we need buffer to store displacements */
- if (type == RE_BAKE_DISPLACEMENT) {
- if ((R.r.bake_flag & R_BAKE_NORMALIZE) && R.r.bake_maxdist == 0.0f) {
+ if (ELEM(type, RE_BAKE_DISPLACEMENT, RE_BAKE_DERIVATIVE)) {
+ if (((R.r.bake_flag & R_BAKE_NORMALIZE) && R.r.bake_maxdist == 0.0f) ||
+ (type == RE_BAKE_DERIVATIVE))
+ {
use_displacement_buffer = true;
use_mask = true;
}
@@ -1081,12 +1098,19 @@ int RE_bake_shade_all_selected(Render *re, int type, Object *actob, short *do_up
userdata = (BakeImBufuserData *)ibuf->userdata;
if (userdata) {
- RE_bake_ibuf_filter(ibuf, userdata->mask_buffer, re->r.bake_filter);
-
if (use_displacement_buffer) {
- RE_bake_ibuf_normalize_displacement(ibuf, userdata->displacement_buffer, userdata->mask_buffer,
- displacement_min, displacement_max);
+ if (type == RE_BAKE_DERIVATIVE) {
+ float user_scale = (R.r.bake_flag & R_BAKE_USERSCALE) ? R.r.bake_user_scale : -1.0f;
+ RE_bake_make_derivative(ibuf, userdata->displacement_buffer, userdata->mask_buffer,
+ displacement_min, displacement_max, user_scale);
+ }
+ else {
+ RE_bake_ibuf_normalize_displacement(ibuf, userdata->displacement_buffer, userdata->mask_buffer,
+ displacement_min, displacement_max);
+ }
}
+
+ RE_bake_ibuf_filter(ibuf, userdata->mask_buffer, re->r.bake_filter);
}
ibuf->userflags |= IB_BITMAPDIRTY;
@@ -1117,3 +1141,178 @@ struct Image *RE_bake_shade_get_image(void)
return R.bakebuf;
}
+/* **************** Derivative Maps Baker **************** */
+
+static void add_single_heights_margin(const ImBuf *ibuf, const char *mask, float *heights_buffer)
+{
+ int x, y;
+
+ for (y = 0; y < ibuf->y; y++) {
+ for (x = 0; x < ibuf->x; x++) {
+ int index = ibuf->x * y + x;
+
+ /* If unassigned pixel, look for neighbors. */
+ if (mask[index] != FILTER_MASK_USED) {
+ float height_acc = 0;
+ int denom = 0;
+ int i, j;
+
+ for (j = -1; j <= 1; j++)
+ for (i = -1; i <= 1; i++) {
+ int w = (i == 0 ? 1 : 0) + (j == 0 ? 1 : 0) + 1;
+
+ if (i != 0 || j != 0) {
+ int index2 = 0;
+ int x0 = x + i;
+ int y0 = y + j;
+
+ CLAMP(x0, 0, ibuf->x - 1);
+ CLAMP(y0, 0, ibuf->y - 1);
+
+ index2 = ibuf->x * y0 + x0;
+
+ if (mask[index2] == FILTER_MASK_USED) {
+ height_acc += w * heights_buffer[index2];
+ denom += w;
+ }
+ }
+ }
+
+ /* Insert final value. */
+ if (denom > 0) {
+ heights_buffer[index] = height_acc / denom;
+ }
+ }
+ }
+ }
+}
+
+/* returns user-scale */
+float RE_bake_make_derivative(ImBuf *ibuf, float *heights_buffer, const char *mask,
+ const float height_min, const float height_max,
+ const float fmult)
+{
+ const float delta_height = height_max - height_min;
+ const float denom = delta_height > 0.0f ? (8 * delta_height) : 1.0f;
+ bool auto_range_fit = fmult <= 0.0f;
+ float max_num_deriv = -1.0f;
+ int x, y, index;
+
+ /* Need a single margin to calculate good derivatives. */
+ add_single_heights_margin(ibuf, mask, heights_buffer);
+
+ if (auto_range_fit) {
+ /* If automatic range fitting is enabled. */
+ for (y = 0; y < ibuf->y; y++) {
+ const int Yu = y == (ibuf->y - 1) ? (ibuf->y - 1) : (y + 1);
+ const int Yc = y;
+ const int Yd = y == 0 ? 0 : (y - 1);
+
+ for (x = 0; x < ibuf->x; x++) {
+ const int Xl = x == 0 ? 0 : (x - 1);
+ const int Xc = x;
+ const int Xr = x == (ibuf->x - 1) ? (ibuf->x - 1) : (x + 1);
+
+ const float Hcy = heights_buffer[Yc * ibuf->x + Xr] - heights_buffer[Yc * ibuf->x + Xl];
+ const float Hu = heights_buffer[Yu * ibuf->x + Xr] - heights_buffer[Yu * ibuf->x + Xl];
+ const float Hd = heights_buffer[Yd * ibuf->x + Xr] - heights_buffer[Yd * ibuf->x + Xl];
+
+ const float Hl = heights_buffer[Yu * ibuf->x + Xl] - heights_buffer[Yd * ibuf->x + Xl];
+ const float Hcx = heights_buffer[Yu * ibuf->x + Xc] - heights_buffer[Yd * ibuf->x + Xc];
+ const float Hr = heights_buffer[Yu * ibuf->x + Xr] - heights_buffer[Yd * ibuf->x + Xr];
+
+ /* This corresponds to using the sobel kernel on the heights buffer
+ * to obtain the derivative multiplied by 8.
+ */
+ const float deriv_x = Hu + 2 * Hcy + Hd;
+ const float deriv_y = Hr + 2 * Hcx + Hl;
+
+ /* early out */
+ index = ibuf->x * y + x;
+ if (mask[index] != FILTER_MASK_USED) {
+ continue;
+ }
+
+ /* Widen bound. */
+ if (fabsf(deriv_x) > max_num_deriv) {
+ max_num_deriv = fabsf(deriv_x);
+ }
+
+ if (fabsf(deriv_y) > max_num_deriv) {
+ max_num_deriv = fabsf(deriv_y);
+ }
+ }
+ }
+ }
+
+ /* Output derivatives. */
+ auto_range_fit &= (max_num_deriv > 0);
+ for (y = 0; y < ibuf->y; y++) {
+ const int Yu = y == (ibuf->y - 1) ? (ibuf->y - 1) : (y + 1);
+ const int Yc = y;
+ const int Yd = y == 0 ? 0 : (y - 1);
+
+ for (x = 0; x < ibuf->x; x++) {
+ const int Xl = x == 0 ? 0 : (x - 1);
+ const int Xc = x;
+ const int Xr = x == (ibuf->x - 1) ? (ibuf->x - 1) : (x + 1);
+
+ const float Hcy = heights_buffer[Yc * ibuf->x + Xr] - heights_buffer[Yc * ibuf->x + Xl];
+ const float Hu = heights_buffer[Yu * ibuf->x + Xr] - heights_buffer[Yu * ibuf->x + Xl];
+ const float Hd = heights_buffer[Yd * ibuf->x + Xr] - heights_buffer[Yd * ibuf->x + Xl];
+
+ const float Hl = heights_buffer[Yu * ibuf->x + Xl] - heights_buffer[Yd * ibuf->x + Xl];
+ const float Hcx = heights_buffer[Yu * ibuf->x + Xc] - heights_buffer[Yd * ibuf->x + Xc];
+ const float Hr = heights_buffer[Yu * ibuf->x + Xr] - heights_buffer[Yd * ibuf->x + Xr];
+
+ /* This corresponds to using the sobel kernel on the heights buffer
+ * to obtain the derivative multiplied by 8.
+ */
+ float deriv_x = Hu + 2 * Hcy + Hd;
+ float deriv_y = Hr + 2 * Hcx + Hl;
+
+ /* Early out. */
+ index = ibuf->x * y + x;
+ if (mask[index] != FILTER_MASK_USED) {
+ continue;
+ }
+
+ if (auto_range_fit) {
+ deriv_x /= max_num_deriv;
+ deriv_y /= max_num_deriv;
+ }
+ else {
+ deriv_x *= (fmult / denom);
+ deriv_y *= (fmult / denom);
+ }
+
+ deriv_x = deriv_x * 0.5f + 0.5f;
+ deriv_y = deriv_y * 0.5f + 0.5f;
+
+ /* Clamp. */
+ CLAMP(deriv_x, 0.0f, 1.0f);
+ CLAMP(deriv_y, 0.0f, 1.0f);
+
+ /* Write out derivatives. */
+ if (ibuf->rect_float) {
+ float *rrgbf = ibuf->rect_float + index * 4;
+
+ rrgbf[0] = deriv_x;
+ rrgbf[1] = deriv_y;
+ rrgbf[2] = 0.0f;
+ rrgbf[3] = 1.0f;
+ }
+ else {
+ char *rrgb = (char *)ibuf->rect + index * 4;
+
+ rrgb[0] = FTOCHAR(deriv_x);
+ rrgb[1] = FTOCHAR(deriv_y);
+ rrgb[2] = 0;
+ rrgb[3] = 255;
+ }
+ }
+ }
+
+ /* Eeturn user-scale (for rendering). */
+ return auto_range_fit ? (max_num_deriv / denom) : (fmult > 0.0f ? (1.0f / fmult) : 0.0f);
+}
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index ab888ba198b..b4873e7d310 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -167,7 +167,7 @@ static HaloRen *initstar(Render *re, ObjectRen *obr, const float vec[3], float h
*/
void RE_make_stars(Render *re, Scene *scenev3d, void (*initfunc)(void),
- void (*vertexfunc)(float *), void (*termfunc)(void))
+ void (*vertexfunc)(const float *), void (*termfunc)(void))
{
extern unsigned char hash[512];
ObjectRen *obr= NULL;
@@ -334,7 +334,7 @@ void RE_make_stars(Render *re, Scene *scenev3d, void (*initfunc)(void),
* cleanup */
/* ------------------------------------------------------------------------- */
-#define UVTOINDEX(u,v) (startvlak + (u) * sizev + (v))
+#define UVTOINDEX(u, v) (startvlak + (u) * sizev + (v))
/*
*
* NOTE THAT U/V COORDINATES ARE SOMETIMES SWAPPED !!
@@ -860,28 +860,13 @@ static void autosmooth(Render *UNUSED(re), ObjectRen *obr, float mat[4][4], int
/* Orco hash and Materials */
/* ------------------------------------------------------------------------- */
-static float *get_object_orco(Render *re, Object *ob)
+static float *get_object_orco(Render *re, void *ob)
{
- float *orco;
-
- if (!re->orco_hash)
- re->orco_hash = BLI_ghash_ptr_new("get_object_orco gh");
-
- orco = BLI_ghash_lookup(re->orco_hash, ob);
-
- if (!orco) {
- if (ELEM(ob->type, OB_CURVE, OB_FONT)) {
- orco = BKE_curve_make_orco(re->scene, ob, NULL);
- }
- else if (ob->type==OB_SURF) {
- orco = BKE_curve_surf_make_orco(ob);
- }
-
- if (orco)
- BLI_ghash_insert(re->orco_hash, ob, orco);
+ if (!re->orco_hash) {
+ return NULL;
}
- return orco;
+ return BLI_ghash_lookup(re->orco_hash, ob);
}
static void set_object_orco(Render *re, void *ob, float *orco)
@@ -1676,8 +1661,11 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
if (path_nbr) {
if (!ELEM(ma->material_type, MA_TYPE_HALO, MA_TYPE_WIRE)) {
- sd.orco = MEM_mallocN(3*sizeof(float)*(totpart+totchild), "particle orcos");
- set_object_orco(re, psys, sd.orco);
+ sd.orco = get_object_orco(re, psys);
+ if (!sd.orco) {
+ sd.orco = MEM_mallocN(3*sizeof(float)*(totpart+totchild), "particle orcos");
+ set_object_orco(re, psys, sd.orco);
+ }
}
}
@@ -1741,7 +1729,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
}
if (path_nbr == 0)
- psys->lattice = psys_get_lattice(&sim);
+ psys->lattice_deform_data = psys_create_lattice_deform_data(&sim);
/* 3. start creating renderable things */
for (a=0, pa=pars; a<totpart+totchild; a++, pa++, seed++) {
@@ -1848,9 +1836,11 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
if (strandbuf) {
int orignum = (index_mf_to_mpoly) ? DM_origindex_mface_mpoly(index_mf_to_mpoly, index_mp_to_orig, cpa->num) : cpa->num;
- if (orignum > sbound - strandbuf->bound) {
- sbound= strandbuf->bound + orignum;
- sbound->start= sbound->end= obr->totstrand;
+ if ((orignum > sbound - strandbuf->bound) &&
+ (orignum < strandbuf->totbound))
+ {
+ sbound = &strandbuf->bound[orignum];
+ sbound->start = sbound->end = obr->totstrand;
}
}
}
@@ -2094,9 +2084,9 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
psys->flag &= ~PSYS_DRAWING;
- if (psys->lattice) {
- end_latt_deform(psys->lattice);
- psys->lattice= NULL;
+ if (psys->lattice_deform_data) {
+ end_latt_deform(psys->lattice_deform_data);
+ psys->lattice_deform_data = NULL;
}
if (path_nbr && (ma->mode_l & MA_TANGENT_STR)==0)
@@ -2829,9 +2819,12 @@ static void init_render_surf(Render *re, ObjectRen *obr, int timeoffset)
if (dm) {
if (need_orco) {
- orco= BKE_displist_make_orco(re->scene, ob, dm, 1, 1);
- if (orco) {
- set_object_orco(re, ob, orco);
+ orco = get_object_orco(re, ob);
+ if (!orco) {
+ orco= BKE_displist_make_orco(re->scene, ob, dm, 1, 1);
+ if (orco) {
+ set_object_orco(re, ob, orco);
+ }
}
}
@@ -2840,7 +2833,11 @@ static void init_render_surf(Render *re, ObjectRen *obr, int timeoffset)
}
else {
if (need_orco) {
- orco= get_object_orco(re, ob);
+ orco = get_object_orco(re, ob);
+ if (!orco) {
+ orco = BKE_curve_surf_make_orco(ob);
+ set_object_orco(re, ob, orco);
+ }
}
/* walk along displaylist and create rendervertices/-faces */
@@ -2900,9 +2897,12 @@ static void init_render_curve(Render *re, ObjectRen *obr, int timeoffset)
if (dm) {
if (need_orco) {
- orco= BKE_displist_make_orco(re->scene, ob, dm, 1, 1);
- if (orco) {
- set_object_orco(re, ob, orco);
+ orco = get_object_orco(re, ob);
+ if (!orco) {
+ orco = BKE_displist_make_orco(re->scene, ob, dm, 1, 1);
+ if (orco) {
+ set_object_orco(re, ob, orco);
+ }
}
}
@@ -2912,6 +2912,10 @@ static void init_render_curve(Render *re, ObjectRen *obr, int timeoffset)
else {
if (need_orco) {
orco = get_object_orco(re, ob);
+ if (!orco) {
+ orco = BKE_curve_make_orco(re->scene, ob, NULL);
+ set_object_orco(re, ob, orco);
+ }
}
while (dl) {
@@ -3279,7 +3283,7 @@ static EdgeHash *make_freestyle_edge_mark_hash(Mesh *me, DerivedMesh *dm)
index = dm->getEdgeDataArray(dm, CD_ORIGINDEX);
fed = CustomData_get_layer(&me->edata, CD_FREESTYLE_EDGE);
if (fed) {
- edge_hash = BLI_edgehash_new();
+ edge_hash = BLI_edgehash_new(__func__);
if (!index) {
if (me->totedge == totedge) {
for (a = 0; a < me->totedge; a++) {
@@ -3401,10 +3405,13 @@ static void init_render_mesh(Render *re, ObjectRen *obr, int timeoffset)
if (dm==NULL) return; /* in case duplicated object fails? */
if (mask & CD_MASK_ORCO) {
- orco= dm->getVertDataArray(dm, CD_ORCO);
- if (orco) {
- orco= MEM_dupallocN(orco);
- set_object_orco(re, ob, orco);
+ orco = get_object_orco(re, ob);
+ if (!orco) {
+ orco= dm->getVertDataArray(dm, CD_ORCO);
+ if (orco) {
+ orco= MEM_dupallocN(orco);
+ set_object_orco(re, ob, orco);
+ }
}
}
@@ -5982,7 +5989,9 @@ void RE_Database_FromScene_Vectors(Render *re, Main *bmain, Scene *sce, unsigned
* RE_BAKE_NORMALS:for baking, no lamps and only selected objects
* RE_BAKE_AO: for baking, no lamps, but all objects
* RE_BAKE_TEXTURE:for baking, no lamps, only selected objects
+ * RE_BAKE_VERTEX_COLORS:for baking, no lamps, only selected objects
* RE_BAKE_DISPLACEMENT:for baking, no lamps, only selected objects
+ * RE_BAKE_DERIVATIVE:for baking, no lamps, only selected objects
* RE_BAKE_SHADOW: for baking, only shadows, but all objects
*/
void RE_Database_Baking(Render *re, Main *bmain, Scene *scene, unsigned int lay, const int type, Object *actob)
@@ -5990,8 +5999,8 @@ void RE_Database_Baking(Render *re, Main *bmain, Scene *scene, unsigned int lay,
Object *camera;
float mat[4][4];
float amb[3];
- const short onlyselected= !ELEM4(type, RE_BAKE_LIGHT, RE_BAKE_ALL, RE_BAKE_SHADOW, RE_BAKE_AO);
- const short nolamps= ELEM3(type, RE_BAKE_NORMALS, RE_BAKE_TEXTURE, RE_BAKE_DISPLACEMENT);
+ const short onlyselected= !ELEM5(type, RE_BAKE_LIGHT, RE_BAKE_ALL, RE_BAKE_SHADOW, RE_BAKE_AO, RE_BAKE_VERTEX_COLORS);
+ const short nolamps= ELEM5(type, RE_BAKE_NORMALS, RE_BAKE_TEXTURE, RE_BAKE_DISPLACEMENT, RE_BAKE_DERIVATIVE, RE_BAKE_VERTEX_COLORS);
re->main= bmain;
re->scene= scene;
@@ -6009,8 +6018,11 @@ void RE_Database_Baking(Render *re, Main *bmain, Scene *scene, unsigned int lay,
if (type==RE_BAKE_NORMALS && re->r.bake_normal_space==R_BAKE_SPACE_TANGENT)
re->flag |= R_NEED_TANGENT;
-
- if (!actob && ELEM4(type, RE_BAKE_LIGHT, RE_BAKE_NORMALS, RE_BAKE_TEXTURE, RE_BAKE_DISPLACEMENT)) {
+
+ if (type==RE_BAKE_VERTEX_COLORS)
+ re->flag |= R_NEED_VCOL;
+
+ if (!actob && ELEM6(type, RE_BAKE_LIGHT, RE_BAKE_NORMALS, RE_BAKE_TEXTURE, RE_BAKE_DISPLACEMENT, RE_BAKE_DERIVATIVE, RE_BAKE_VERTEX_COLORS)) {
re->r.mode &= ~R_SHADOW;
re->r.mode &= ~R_RAYTRACE;
}
diff --git a/source/blender/render/intern/source/external_engine.c b/source/blender/render/intern/source/external_engine.c
index ea22423985b..827a1f8f113 100644
--- a/source/blender/render/intern/source/external_engine.c
+++ b/source/blender/render/intern/source/external_engine.c
@@ -49,6 +49,8 @@
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
+#include "RNA_access.h"
+
#ifdef WITH_PYTHON
#include "BPY_extern.h"
#endif
@@ -392,6 +394,17 @@ RenderData *RE_engine_get_render_data(Render *re)
/* Render */
+static bool render_layer_exclude_animated(Scene *scene, SceneRenderLayer *srl)
+{
+ PointerRNA ptr;
+ PropertyRNA *prop;
+
+ RNA_pointer_create(&scene->id, &RNA_SceneRenderLayer, srl, &ptr);
+ prop = RNA_struct_find_property(&ptr, "layers_exclude");
+
+ return RNA_property_animated(&ptr, prop);
+}
+
int RE_engine_render(Render *re, int do_all)
{
RenderEngineType *type = RE_engines_find(re->r.engine);
@@ -420,13 +433,25 @@ int RE_engine_render(Render *re, int do_all)
if (re->r.scemode & R_SINGLE_LAYER) {
srl = BLI_findlink(&re->r.layers, re->r.actlay);
- if (srl)
+ if (srl) {
non_excluded_lay |= ~srl->lay_exclude;
+
+ /* in this case we must update all because animation for
+ * the scene has not been updated yet, and so may not be
+ * up to date until after BKE_scene_update_for_newframe */
+ if (render_layer_exclude_animated(re->scene, srl))
+ non_excluded_lay |= ~0;
+ }
}
else {
- for (srl = re->r.layers.first; srl; srl = srl->next)
- if (!(srl->layflag & SCE_LAY_DISABLE))
+ for (srl = re->r.layers.first; srl; srl = srl->next) {
+ if (!(srl->layflag & SCE_LAY_DISABLE)) {
non_excluded_lay |= ~srl->lay_exclude;
+
+ if (render_layer_exclude_animated(re->scene, srl))
+ non_excluded_lay |= ~0;
+ }
+ }
}
lay &= non_excluded_lay;
diff --git a/source/blender/render/intern/source/imagetexture.c b/source/blender/render/intern/source/imagetexture.c
index c5e4f97c6bc..bfc13bf6151 100644
--- a/source/blender/render/intern/source/imagetexture.c
+++ b/source/blender/render/intern/source/imagetexture.c
@@ -799,7 +799,7 @@ static void area_sample(TexResult *texr, ImBuf *ibuf, float fx, float fy, afdata
/* table of (exp(ar) - exp(a)) / (1 - exp(a)) for r in range [0, 1] and a = -2
* used instead of actual gaussian, otherwise at high texture magnifications circular artifacts are visible */
#define EWA_MAXIDX 255
-static float EWA_WTS[EWA_MAXIDX + 1] = {
+static const float EWA_WTS[EWA_MAXIDX + 1] = {
1.f, 0.990965f, 0.982f, 0.973105f, 0.96428f, 0.955524f, 0.946836f, 0.938216f, 0.929664f,
0.921178f, 0.912759f, 0.904405f, 0.896117f, 0.887893f, 0.879734f, 0.871638f, 0.863605f,
0.855636f, 0.847728f, 0.839883f, 0.832098f, 0.824375f, 0.816712f, 0.809108f, 0.801564f,
diff --git a/source/blender/render/intern/source/multires_bake.c b/source/blender/render/intern/source/multires_bake.c
index a2fa37fd7ea..3ae075b4936 100644
--- a/source/blender/render/intern/source/multires_bake.c
+++ b/source/blender/render/intern/source/multires_bake.c
@@ -95,6 +95,7 @@ typedef struct {
char *texels;
const MResolvePixelData *data;
MFlushPixel flush_pixel;
+ short *do_update;
} MBakeRast;
typedef struct {
@@ -124,7 +125,7 @@ typedef struct {
const int *orig_index_mp_to_orig;
} MAOBakeData;
-static void multiresbake_get_normal(const MResolvePixelData *data, float norm[], const int face_num, const int vert_index)
+static void multiresbake_get_normal(const MResolvePixelData *data, float norm[],const int face_num, const int vert_index)
{
unsigned int indices[] = {data->mface[face_num].v1, data->mface[face_num].v2,
data->mface[face_num].v3, data->mface[face_num].v4};
@@ -162,7 +163,8 @@ static void multiresbake_get_normal(const MResolvePixelData *data, float norm[],
}
}
-static void init_bake_rast(MBakeRast *bake_rast, const ImBuf *ibuf, const MResolvePixelData *data, MFlushPixel flush_pixel)
+static void init_bake_rast(MBakeRast *bake_rast, const ImBuf *ibuf, const MResolvePixelData *data,
+ MFlushPixel flush_pixel, short *do_update)
{
BakeImBufuserData *userdata = (BakeImBufuserData *) ibuf->userdata;
@@ -173,6 +175,7 @@ static void init_bake_rast(MBakeRast *bake_rast, const ImBuf *ibuf, const MResol
bake_rast->h = ibuf->y;
bake_rast->data = data;
bake_rast->flush_pixel = flush_pixel;
+ bake_rast->do_update = do_update;
}
static void flush_pixel(const MResolvePixelData *data, const int x, const int y)
@@ -240,6 +243,9 @@ static void set_rast_triangle(const MBakeRast *bake_rast, const int x, const int
if ((bake_rast->texels[y * w + x]) == 0) {
bake_rast->texels[y * w + x] = FILTER_MASK_USED;
flush_pixel(bake_rast->data, x, y);
+ if (bake_rast->do_update) {
+ *bake_rast->do_update = true;
+ }
}
}
}
@@ -529,7 +535,7 @@ static void do_multires_bake(MultiresBakeRender *bkr, Image *ima, int require_ta
handle->height_min = FLT_MAX;
handle->height_max = -FLT_MAX;
- init_bake_rast(&handle->bake_rast, ibuf, &handle->data, flush_pixel);
+ init_bake_rast(&handle->bake_rast, ibuf, &handle->data, flush_pixel, bkr->do_update);
if (tot_thread > 1)
BLI_insert_thread(&threads, handle);
@@ -1231,6 +1237,7 @@ static void bake_images(MultiresBakeRender *bkr, MultiresBakeResult *result)
do_multires_bake(bkr, ima, TRUE, apply_tangmat_callback, init_normal_data, free_normal_data, result);
break;
case RE_BAKE_DISPLACEMENT:
+ case RE_BAKE_DERIVATIVE:
do_multires_bake(bkr, ima, FALSE, apply_heights_callback, init_heights_data, free_heights_data, result);
break;
case RE_BAKE_AO:
@@ -1248,7 +1255,7 @@ static void bake_images(MultiresBakeRender *bkr, MultiresBakeResult *result)
static void finish_images(MultiresBakeRender *bkr, MultiresBakeResult *result)
{
LinkData *link;
- int use_displacement_buffer = bkr->mode == RE_BAKE_DISPLACEMENT;
+ bool use_displacement_buffer = ELEM(bkr->mode, RE_BAKE_DISPLACEMENT, RE_BAKE_DERIVATIVE);
for (link = bkr->image.first; link; link = link->next) {
Image *ima = (Image *)link->data;
@@ -1259,8 +1266,14 @@ static void finish_images(MultiresBakeRender *bkr, MultiresBakeResult *result)
continue;
if (use_displacement_buffer) {
- RE_bake_ibuf_normalize_displacement(ibuf, userdata->displacement_buffer, userdata->mask_buffer,
- result->height_min, result->height_max);
+ if (bkr->mode == RE_BAKE_DERIVATIVE) {
+ RE_bake_make_derivative(ibuf, userdata->displacement_buffer, userdata->mask_buffer,
+ result->height_min, result->height_max, bkr->user_scale);
+ }
+ else {
+ RE_bake_ibuf_normalize_displacement(ibuf, userdata->displacement_buffer, userdata->mask_buffer,
+ result->height_min, result->height_max);
+ }
}
RE_bake_ibuf_filter(ibuf, userdata->mask_buffer, bkr->bake_filter);
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index 899c9b335be..9930a8f7f61 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -630,6 +630,22 @@ void RE_InitState(Render *re, Render *source, RenderData *rd, SceneRenderLayer *
RE_init_threadcount(re);
}
+/* update some variables that can be animated, and otherwise wouldn't be due to
+ * RenderData getting copied once at the start of animation render */
+static void render_update_anim_renderdata(Render *re, RenderData *rd)
+{
+ /* filter */
+ re->r.gauss = rd->gauss;
+
+ /* motion blur */
+ re->r.mblur_samples = rd->mblur_samples;
+ re->r.blurfac = rd->blurfac;
+
+ /* freestyle */
+ re->r.line_thickness_mode = rd->line_thickness_mode;
+ re->r.unit_line_thickness = rd->unit_line_thickness;
+}
+
void RE_SetWindow(Render *re, rctf *viewplane, float clipsta, float clipend)
{
/* re->ok flag? */
@@ -1293,6 +1309,10 @@ static void do_render_blur_3d(Render *re)
re->mblur_offs = 0.0f;
re->i.curblur = 0; /* stats */
+ /* make sure motion blur changes get reset to current frame */
+ if ((re->r.scemode & (R_NO_FRAME_UPDATE|R_BUTS_PREVIEW|R_VIEWPORT_PREVIEW))==0)
+ BKE_scene_update_for_newframe(re->main, re->scene, re->lay);
+
/* weak... the display callback wants an active renderlayer pointer... */
re->result->renlay = render_get_active_layer(re, re->result);
re->display_draw(re->ddh, re->result, NULL);
@@ -1580,6 +1600,7 @@ static void tag_scenes_for_render(Render *re)
/* check for render-layers nodes using other scenes, we tag them LIB_DOIT */
for (node = re->scene->nodetree->nodes.first; node; node = node->next) {
+ node->flag &= ~NODE_TEST;
if (node->type == CMP_NODE_R_LAYERS) {
if (node->id) {
if (!MAIN_VERSION_ATLEAST(re->main, 265, 5)) {
@@ -1597,8 +1618,12 @@ static void tag_scenes_for_render(Render *re)
}
}
- if (node->id != (ID *)re->scene)
- node->id->flag |= LIB_DOIT;
+ if (node->id != (ID *)re->scene) {
+ if ((node->id->flag & LIB_DOIT) == 0) {
+ node->flag |= NODE_TEST;
+ node->id->flag |= LIB_DOIT;
+ }
+ }
}
}
}
@@ -1620,12 +1645,12 @@ static void ntree_render_scenes(Render *re)
for (node = re->scene->nodetree->nodes.first; node; node = node->next) {
if (node->type == CMP_NODE_R_LAYERS) {
if (node->id && node->id != (ID *)re->scene) {
- if (node->id->flag & LIB_DOIT) {
+ if (node->flag & NODE_TEST) {
Scene *scene = (Scene *)node->id;
render_scene(re, scene, cfra);
restore_scene = (scene != re->scene);
- node->id->flag &= ~LIB_DOIT;
+ node->flag &= ~NODE_TEST;
nodeUpdate(re->scene->nodetree, node);
}
@@ -1697,12 +1722,17 @@ static void composite_freestyle_renders(Render *re, int sample)
for (srl= (SceneRenderLayer *)re->r.layers.first; srl; srl= srl->next) {
if ((re->r.scemode & R_SINGLE_LAYER) && srl != actsrl)
continue;
+
if (FRS_is_freestyle_enabled(srl)) {
freestyle_render = (Render *)link->data;
- render_result_exr_file_read(freestyle_render, sample);
- FRS_composite_result(re, srl, freestyle_render);
- RE_FreeRenderResult(freestyle_render->result);
- freestyle_render->result = NULL;
+
+ /* may be NULL in case of empty render layer */
+ if (freestyle_render) {
+ render_result_exr_file_read(freestyle_render, sample);
+ FRS_composite_result(re, srl, freestyle_render);
+ RE_FreeRenderResult(freestyle_render->result);
+ freestyle_render->result = NULL;
+ }
}
link = link->next;
}
@@ -1717,8 +1747,9 @@ static void free_all_freestyle_renders(void)
for (re1= RenderGlobal.renderlist.first; re1; re1= re1->next) {
for (link = (LinkData *)re1->freestyle_renders.first; link; link = link->next) {
- if (link->data) {
- freestyle_render = (Render *)link->data;
+ freestyle_render = (Render *)link->data;
+
+ if (freestyle_render) {
freestyle_scene = freestyle_render->scene;
RE_FreeRender(freestyle_render);
BKE_scene_unlink(&re1->freestyle_bmain, freestyle_scene, NULL);
@@ -1752,6 +1783,7 @@ static void do_merge_fullsample(Render *re, bNodeTree *ntree)
rectf = MEM_mapallocN(re->rectx * re->recty * sizeof(float) * 4, "fullsample rgba");
for (sample = 0; sample < re->r.osa; sample++) {
+ Scene *sce;
Render *re1;
RenderResult rres;
int mask;
@@ -1763,9 +1795,11 @@ static void do_merge_fullsample(Render *re, bNodeTree *ntree)
/* also function below assumes this */
tag_scenes_for_render(re);
- for (re1 = RenderGlobal.renderlist.first; re1; re1 = re1->next) {
- if (re1->scene->id.flag & LIB_DOIT) {
- if (re1->r.scemode & R_FULL_SAMPLE) {
+ for (sce = re->main->scene.first; sce; sce = sce->id.next) {
+ if (sce->id.flag & LIB_DOIT) {
+ re1 = RE_GetRender(sce->id.name);
+
+ if (re1 && (re1->r.scemode & R_FULL_SAMPLE)) {
if (sample) {
BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE);
render_result_exr_file_read(re1, sample);
@@ -2364,7 +2398,7 @@ static void update_physics_cache(Render *re, Scene *scene, int UNUSED(anim_init)
BKE_ptcache_bake(&baker);
}
/* evaluating scene options for general Blender render */
-static int render_initialize_from_main(Render *re, Main *bmain, Scene *scene, SceneRenderLayer *srl, Object *camera_override, unsigned int lay, int anim, int anim_init)
+static int render_initialize_from_main(Render *re, Main *bmain, Scene *scene, SceneRenderLayer *srl, Object *camera_override, unsigned int lay_override, int anim, int anim_init)
{
int winx, winy;
rcti disprect;
@@ -2394,11 +2428,12 @@ static int render_initialize_from_main(Render *re, Main *bmain, Scene *scene, Sc
re->scene = scene;
re->scene_color_manage = BKE_scene_check_color_management_enabled(scene);
re->camera_override = camera_override;
- re->lay = lay;
- re->i.localview = (lay & 0xFF000000) != 0;
+ re->lay = lay_override ? lay_override : scene->lay;
+ re->i.localview = (re->lay & 0xFF000000) != 0;
/* not too nice, but it survives anim-border render */
if (anim) {
+ render_update_anim_renderdata(re, &scene->r);
re->disprect = disprect;
return 1;
}
@@ -2443,14 +2478,14 @@ void RE_SetReports(Render *re, ReportList *reports)
}
/* general Blender frame render call */
-void RE_BlenderFrame(Render *re, Main *bmain, Scene *scene, SceneRenderLayer *srl, Object *camera_override, unsigned int lay, int frame, const short write_still)
+void RE_BlenderFrame(Render *re, Main *bmain, Scene *scene, SceneRenderLayer *srl, Object *camera_override, unsigned int lay_override, int frame, const short write_still)
{
/* ugly global still... is to prevent preview events and signal subsurfs etc to make full resol */
G.is_rendering = TRUE;
scene->r.cfra = frame;
- if (render_initialize_from_main(re, bmain, scene, srl, camera_override, lay, 0, 0)) {
+ if (render_initialize_from_main(re, bmain, scene, srl, camera_override, lay_override, 0, 0)) {
MEM_reset_peak_memory();
BLI_callback_exec(re->main, (ID *)scene, BLI_CB_EVT_RENDER_PRE);
@@ -2516,7 +2551,7 @@ static int do_write_image_or_movie(Render *re, Main *bmain, Scene *scene, bMovie
}
- IMB_colormanagement_imbuf_for_write(ibuf, TRUE, FALSE, &scene->view_settings,
+ IMB_colormanagement_imbuf_for_write(ibuf, true, false, &scene->view_settings,
&scene->display_settings, &scene->r.im_format);
ok = mh->append_movie(&re->r, scene->r.sfra, scene->r.cfra, (int *) ibuf->rect,
@@ -2547,7 +2582,7 @@ static int do_write_image_or_movie(Render *re, Main *bmain, Scene *scene, bMovie
else {
ImBuf *ibuf = render_result_rect_to_ibuf(&rres, &scene->r);
- IMB_colormanagement_imbuf_for_write(ibuf, TRUE, FALSE, &scene->view_settings,
+ IMB_colormanagement_imbuf_for_write(ibuf, true, false, &scene->view_settings,
&scene->display_settings, &scene->r.im_format);
ok = BKE_imbuf_write_stamp(scene, camera, ibuf, name, &scene->r.im_format);
@@ -2567,7 +2602,7 @@ static int do_write_image_or_movie(Render *re, Main *bmain, Scene *scene, bMovie
BKE_add_image_extension(name, &imf);
ibuf->planes = 24;
- IMB_colormanagement_imbuf_for_write(ibuf, TRUE, FALSE, &scene->view_settings,
+ IMB_colormanagement_imbuf_for_write(ibuf, true, false, &scene->view_settings,
&scene->display_settings, &imf);
BKE_imbuf_write_stamp(scene, camera, ibuf, name, &imf);
@@ -2599,14 +2634,14 @@ static int do_write_image_or_movie(Render *re, Main *bmain, Scene *scene, bMovie
}
/* saves images to disk */
-void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_override, unsigned int lay, int sfra, int efra, int tfra)
+void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_override, unsigned int lay_override, int sfra, int efra, int tfra)
{
bMovieHandle *mh = BKE_movie_handle_get(scene->r.im_format.imtype);
int cfrao = scene->r.cfra;
int nfra, totrendered = 0, totskipped = 0;
/* do not fully call for each frame, it initializes & pops output window */
- if (!render_initialize_from_main(re, bmain, scene, NULL, camera_override, lay, 0, 1))
+ if (!render_initialize_from_main(re, bmain, scene, NULL, camera_override, lay_override, 0, 1))
return;
/* ugly global still... is to prevent renderwin events and signal subsurfs etc to make full resol */
@@ -2651,7 +2686,7 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri
char name[FILE_MAX];
/* only border now, todo: camera lens. (ton) */
- render_initialize_from_main(re, bmain, scene, NULL, camera_override, lay, 1, 0);
+ render_initialize_from_main(re, bmain, scene, NULL, camera_override, lay_override, 1, 0);
if (nfra != scene->r.cfra) {
/*
@@ -2909,7 +2944,7 @@ int RE_WriteEnvmapResult(struct ReportList *reports, Scene *scene, EnvMap *env,
return 0;
}
- IMB_colormanagement_imbuf_for_write(ibuf, TRUE, FALSE, &scene->view_settings, &scene->display_settings, &imf);
+ IMB_colormanagement_imbuf_for_write(ibuf, true, false, &scene->view_settings, &scene->display_settings, &imf);
/* to save, we first get absolute path */
BLI_strncpy(filepath, relpath, sizeof(filepath));
diff --git a/source/blender/render/intern/source/pixelshading.c b/source/blender/render/intern/source/pixelshading.c
index 8a023a2c009..43e052a6efc 100644
--- a/source/blender/render/intern/source/pixelshading.c
+++ b/source/blender/render/intern/source/pixelshading.c
@@ -73,7 +73,7 @@ extern struct Render R;
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
-extern float hashvectf[];
+extern const float hashvectf[];
static void render_lighting_halo(HaloRen *har, float col_r[3])
{
@@ -341,7 +341,8 @@ int shadeHaloFloat(HaloRen *har, float col[4], int zz,
if (flarec) har->pixels+= (int)(har->rad-radist);
if (har->ringc) {
- float *rc, fac;
+ const float *rc;
+ float fac;
int ofs;
/* per ring an antialised circle */
@@ -393,7 +394,8 @@ int shadeHaloFloat(HaloRen *har, float col[4], int zz,
dist= 0.0f;
if (har->linec) {
- float *rc, fac;
+ const float *rc;
+ float fac;
int ofs;
/* per starpoint an antialiased line */
diff --git a/source/blender/render/intern/source/pointdensity.c b/source/blender/render/intern/source/pointdensity.c
index d4d6bfa5b7f..ce87888b6a0 100644
--- a/source/blender/render/intern/source/pointdensity.c
+++ b/source/blender/render/intern/source/pointdensity.c
@@ -140,7 +140,7 @@ static void pointdensity_cache_psys(Render *re, PointDensity *pd, Object *ob, Pa
invert_m4_m4(ob->imat, ob->obmat);
total_particles = psys->totpart+psys->totchild;
- psys->lattice=psys_get_lattice(&sim);
+ psys->lattice_deform_data = psys_create_lattice_deform_data(&sim);
pd->point_tree = BLI_bvhtree_new(total_particles, 0.0, 4, 6);
alloc_point_data(pd, total_particles, data_used);
@@ -215,9 +215,9 @@ static void pointdensity_cache_psys(Render *re, PointDensity *pd, Object *ob, Pa
BLI_bvhtree_balance(pd->point_tree);
dm->release(dm);
- if (psys->lattice) {
- end_latt_deform(psys->lattice);
- psys->lattice = NULL;
+ if (psys->lattice_deform_data) {
+ end_latt_deform(psys->lattice_deform_data);
+ psys->lattice_deform_data = NULL;
}
psys_render_restore(ob, psys);
diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c
index 7ae64d499fa..90ae39ee767 100644
--- a/source/blender/render/intern/source/rayshade.c
+++ b/source/blender/render/intern/source/rayshade.c
@@ -734,6 +734,15 @@ static void traceray(ShadeInput *origshi, ShadeResult *origshr, short depth, con
ShadeInput shi = {NULL};
Isect isec;
float dist_mir = origshi->mat->dist_mir;
+
+ /* with high depth the number of rays can explode due to the path splitting
+ * in two each time, giving 2^depth rays. we need to be able to cancel such
+ * a render to avoid hanging, a better solution would be random picking
+ * between directions and russian roulette termination */
+ if (R.test_break(R.tbh)) {
+ zero_v4(col);
+ return;
+ }
copy_v3_v3(isec.start, start);
copy_v3_v3(isec.dir, dir);
@@ -2308,9 +2317,7 @@ static void ray_shadow_qmc(ShadeInput *shi, LampRen *lar, const float lampco[3],
}
copy_v3_v3(isec->start, start);
- isec->dir[0] = end[0]-isec->start[0];
- isec->dir[1] = end[1]-isec->start[1];
- isec->dir[2] = end[2]-isec->start[2];
+ sub_v3_v3v3(isec->dir, end, start);
isec->dist = normalize_v3(isec->dir);
if (shi->obi->flag & R_ENV_TRANSFORMED)
diff --git a/source/blender/render/intern/source/render_result.c b/source/blender/render/intern/source/render_result.c
index 1f740e3f483..37587d89ce0 100644
--- a/source/blender/render/intern/source/render_result.c
+++ b/source/blender/render/intern/source/render_result.c
@@ -1191,7 +1191,7 @@ void render_result_rect_get_pixels(RenderResult *rr, unsigned int *rect, int rec
}
else if (rr->rectf) {
IMB_display_buffer_transform_apply((unsigned char *) rect, rr->rectf, rr->rectx, rr->recty, 4,
- view_settings, display_settings, TRUE);
+ view_settings, display_settings, true);
}
else
/* else fill with black */
diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c
index 49052150fe3..e8127b0e6b9 100644
--- a/source/blender/render/intern/source/render_texture.c
+++ b/source/blender/render/intern/source/render_texture.c
@@ -1724,7 +1724,7 @@ static int compatible_bump_compute(CompatibleBump *compat_bump, ShadeInput *shi,
const float bf = -0.04f*Tnor*mtex->norfac;
int rgbnor;
/* disable internal bump eval */
- float* nvec = texres->nor;
+ float *nvec = texres->nor;
texres->nor = NULL;
/* du & dv estimates, constant value defaults */
du = dv = 0.01f;
diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c
index fa3cf1cef87..89d8345a0d7 100644
--- a/source/blender/render/intern/source/rendercore.c
+++ b/source/blender/render/intern/source/rendercore.c
@@ -1875,10 +1875,11 @@ static void renderhalo_post(RenderResult *rr, float *rectf, HaloRen *har) /* pos
static void renderflare(RenderResult *rr, float *rectf, HaloRen *har)
{
- extern float hashvectf[];
+ extern const float hashvectf[];
HaloRen fla;
Material *ma;
- float *rc, rad, alfa, visifac, vec[3];
+ const float *rc;
+ float rad, alfa, visifac, vec[3];
int b, type;
fla= *har;
@@ -1957,36 +1958,38 @@ void add_halo_flare(Render *re)
RenderResult *rr= re->result;
RenderLayer *rl;
HaloRen *har;
- int a, mode, do_draw = FALSE;
+ int a, mode;
/* for now, we get the first renderlayer in list with halos set */
- for (rl= rr->layers.first; rl; rl= rl->next)
- if (rl->layflag & SCE_LAY_HALO)
- break;
-
- if (rl==NULL || rl->rectf==NULL)
- return;
-
- mode= R.r.mode;
- R.r.mode &= ~R_PANORAMA;
-
- project_renderdata(&R, projectverto, 0, 0, 0);
-
- for (a=0; a<R.tothalo; a++) {
- har= R.sortedhalos[a];
+ for (rl= rr->layers.first; rl; rl= rl->next) {
+ int do_draw = FALSE;
+
+ if ((rl->layflag & SCE_LAY_HALO) == 0)
+ continue;
+ if (rl->rectf==NULL)
+ continue;
- if (har->flarec) {
- do_draw = TRUE;
- renderflare(rr, rl->rectf, har);
+ mode= R.r.mode;
+ R.r.mode &= ~R_PANORAMA;
+
+ project_renderdata(&R, projectverto, 0, 0, 0);
+
+ for (a=0; a<R.tothalo; a++) {
+ har= R.sortedhalos[a];
+
+ if (har->flarec && (har->lay & rl->lay)) {
+ do_draw = TRUE;
+ renderflare(rr, rl->rectf, har);
+ }
+ }
+
+ if (do_draw) {
+ /* weak... the display callback wants an active renderlayer pointer... */
+ rr->renlay= rl;
+ re->display_draw(re->ddh, rr, NULL);
}
- }
- if (do_draw) {
- /* weak... the display callback wants an active renderlayer pointer... */
- rr->renlay= rl;
- re->display_draw(re->ddh, rr, NULL);
+ R.r.mode= mode;
}
-
- R.r.mode= mode;
}
diff --git a/source/blender/render/intern/source/shadbuf.c b/source/blender/render/intern/source/shadbuf.c
index 0d85cfe78b7..0c3bf85cd24 100644
--- a/source/blender/render/intern/source/shadbuf.c
+++ b/source/blender/render/intern/source/shadbuf.c
@@ -1373,7 +1373,7 @@ float shadow_halo(LampRen *lar, const float p1[3], const float p2[3])
/* printf("start %x %x \n", (int)(0x7FFFFFFF*zf1), (int)(0x7FFFFFFF*zf2)); */
- while (1) {
+ do {
lambda_o= lambda;
if (lambda_x==lambda_y) {
@@ -1394,7 +1394,13 @@ float shadow_halo(LampRen *lar, const float p1[3], const float p2[3])
}
lambda = min_ff(lambda_x, lambda_y);
-
+
+ /* not making any progress? */
+ if (lambda==lambda_o) break;
+
+ /* clip to end of volume */
+ lambda = min_ff(lambda, 1.0f);
+
zf= zf1 + lambda*(zf2-zf1);
count+= (float)shb->totbuf;
@@ -1409,10 +1415,9 @@ float shadow_halo(LampRen *lar, const float p1[3], const float p2[3])
lightcount+= readshadowbuf_halo(shb, shsample, x, y, z);
}
- /* break after sample, so it takes at least one */
- if (lambda==lambda_o || lambda>=1.0f) break;
}
-
+ while (lambda < 1.0f);
+
if (count!=0.0f) return (lightcount/count);
return 0.0f;
diff --git a/source/blender/render/intern/source/shadeinput.c b/source/blender/render/intern/source/shadeinput.c
index 2dcb55f1f5d..bc9ba348c62 100644
--- a/source/blender/render/intern/source/shadeinput.c
+++ b/source/blender/render/intern/source/shadeinput.c
@@ -1002,7 +1002,7 @@ void shade_input_set_shade_texco(ShadeInput *shi)
}
/* pass option forces UV calc */
- if (shi->passflag & SCE_PASS_UV)
+ if ((shi->passflag & SCE_PASS_UV) || (R.flag & R_NEED_VCOL))
texco |= (NEED_UV | TEXCO_UV);
/* texture coordinates. shi->dxuv shi->dyuv have been set */
@@ -1056,7 +1056,7 @@ void shade_input_set_shade_texco(ShadeInput *shi)
}
}
- if ((texco & TEXCO_UV) || (mode & (MA_VERTEXCOL | MA_VERTEXCOLP | MA_FACETEXTURE))) {
+ if ((texco & TEXCO_UV) || (mode & (MA_VERTEXCOL | MA_VERTEXCOLP | MA_FACETEXTURE)) || (R.flag & R_NEED_VCOL)) {
VlakRen *vlr = shi->vlr;
MTFace *tface;
MCol *mcol;
@@ -1071,7 +1071,7 @@ void shade_input_set_shade_texco(ShadeInput *shi)
shi->actuv = obr->actmtface;
shi->actcol = obr->actmcol;
- if (mode & (MA_VERTEXCOL | MA_VERTEXCOLP)) {
+ if ((mode & (MA_VERTEXCOL | MA_VERTEXCOLP)) || (R.flag & R_NEED_VCOL)) {
for (i = 0; (mcol = RE_vlakren_get_mcol(obr, vlr, i, &name, 0)); i++) {
ShadeInputCol *scol = &shi->col[i];
char *cp1, *cp2, *cp3;
@@ -1213,7 +1213,7 @@ void shade_input_set_shade_texco(ShadeInput *shi)
}
if ((mode & MA_FACETEXTURE) && i == obr->actmtface) {
- if ((mode & (MA_VERTEXCOL | MA_VERTEXCOLP)) == 0) {
+ if (((mode & (MA_VERTEXCOL | MA_VERTEXCOLP)) == 0) && ((R.flag & R_NEED_VCOL) == 0)) {
shi->vcol[0] = 1.0f;
shi->vcol[1] = 1.0f;
shi->vcol[2] = 1.0f;
@@ -1299,7 +1299,7 @@ void shade_input_set_shade_texco(ShadeInput *shi)
* else un-initialized values are used
*/
if (shi->do_manage) {
- if (mode & (MA_VERTEXCOL | MA_VERTEXCOLP | MA_FACETEXTURE)) {
+ if ((mode & (MA_VERTEXCOL | MA_VERTEXCOLP | MA_FACETEXTURE)) || (R.flag & R_NEED_VCOL)) {
srgb_to_linearrgb_v3_v3(shi->vcol, shi->vcol);
}
}
diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c
index 178d304eca2..114961394c4 100644
--- a/source/blender/render/intern/source/shadeoutput.c
+++ b/source/blender/render/intern/source/shadeoutput.c
@@ -1191,8 +1191,8 @@ float lamp_get_visibility(LampRen *lar, const float co[3], float lv[3], float *d
float visifac= 1.0f, t;
sub_v3_v3v3(lv, co, lar->co);
- *dist= sqrtf(dot_v3v3(lv, lv));
- t= 1.0f/dist[0];
+ *dist = len_v3(lv);
+ t = 1.0f / (*dist);
mul_v3_fl(lv, t);
/* area type has no quad or sphere option */
diff --git a/source/blender/render/intern/source/sss.c b/source/blender/render/intern/source/sss.c
index f86942f7918..732892ed357 100644
--- a/source/blender/render/intern/source/sss.c
+++ b/source/blender/render/intern/source/sss.c
@@ -309,7 +309,7 @@ ScatterSettings *scatter_settings_new(float refl, float radius, float ior, float
ss->Fdr= -1.440f/ior*ior + 0.710f/ior + 0.668f + 0.0636f*ior;
ss->A= (1.0f + ss->Fdr)/(1.0f - ss->Fdr);
ss->ld= radius;
- ss->ro= min_ff(refl, 0.999f);
+ ss->ro= min_ff(refl, 0.99f);
ss->color= ss->ro*reflfac + (1.0f-reflfac);
ss->alpha_= compute_reduced_albedo(ss);
diff --git a/source/blender/render/intern/source/texture_ocean.c b/source/blender/render/intern/source/texture_ocean.c
index a7547479093..0d68c40be0f 100644
--- a/source/blender/render/intern/source/texture_ocean.c
+++ b/source/blender/render/intern/source/texture_ocean.c
@@ -23,6 +23,10 @@
* ***** END GPL LICENSE BLOCK *****
*/
+/** \file blender/blenkernel/intern/texture_ocean.c
+ * \ingroup bke
+ */
+
#include <stddef.h>
#include "BLI_math.h"
diff --git a/source/blender/render/intern/source/volume_precache.c b/source/blender/render/intern/source/volume_precache.c
index 028217b8609..e5e3aff573d 100644
--- a/source/blender/render/intern/source/volume_precache.c
+++ b/source/blender/render/intern/source/volume_precache.c
@@ -39,6 +39,7 @@
#include "BLI_blenlib.h"
#include "BLI_math.h"
+#include "BLI_task.h"
#include "BLI_threads.h"
#include "BLI_voxel.h"
#include "BLI_utildefines.h"
@@ -483,82 +484,96 @@ static void *vol_precache_part_test(void *data)
}
#endif
-typedef struct VolPrecacheQueue {
- ThreadQueue *work;
- ThreadQueue *done;
-} VolPrecacheQueue;
-
/* Iterate over the 3d voxel grid, and fill the voxels with scattering information
*
* It's stored in memory as 3 big float grids next to each other, one for each RGB channel.
* I'm guessing the memory alignment may work out better this way for the purposes
* of doing linear interpolation, but I haven't actually tested this theory! :)
*/
-static void *vol_precache_part(void *data)
+typedef struct VolPrecacheState {
+ double lasttime;
+ int totparts;
+} VolPrecacheState;
+
+static void vol_precache_part(TaskPool *pool, void *taskdata, int UNUSED(threadid))
{
- VolPrecacheQueue *queue = (VolPrecacheQueue *)data;
- VolPrecachePart *pa;
-
- while ((pa = BLI_thread_queue_pop(queue->work))) {
- ObjectInstanceRen *obi = pa->obi;
- RayObject *tree = pa->tree;
- ShadeInput *shi = pa->shi;
- float scatter_col[3] = {0.f, 0.f, 0.f};
- float co[3], cco[3], view[3];
- int x, y, z, i;
- int res[3];
-
- if (pa->re->test_break && pa->re->test_break(pa->re->tbh))
- break;
-
- res[0]= pa->res[0];
- res[1]= pa->res[1];
- res[2]= pa->res[2];
-
- for (z= pa->minz; z < pa->maxz; z++) {
- co[2] = pa->bbmin[2] + (pa->voxel[2] * (z + 0.5f));
+ VolPrecacheState *state = (VolPrecacheState *)BLI_task_pool_userdata(pool);
+ VolPrecachePart *pa = (VolPrecachePart *)taskdata;
+ Render *re = pa->re;
+
+ ObjectInstanceRen *obi = pa->obi;
+ RayObject *tree = pa->tree;
+ ShadeInput *shi = pa->shi;
+ float scatter_col[3] = {0.f, 0.f, 0.f};
+ float co[3], cco[3], view[3];
+ int x, y, z, i;
+ int res[3];
+ double time;
+
+ if (re->test_break && re->test_break(re->tbh))
+ return;
+
+ //printf("thread id %d\n", threadid);
+
+ res[0]= pa->res[0];
+ res[1]= pa->res[1];
+ res[2]= pa->res[2];
+
+ for (z= pa->minz; z < pa->maxz; z++) {
+ co[2] = pa->bbmin[2] + (pa->voxel[2] * (z + 0.5f));
+
+ for (y= pa->miny; y < pa->maxy; y++) {
+ co[1] = pa->bbmin[1] + (pa->voxel[1] * (y + 0.5f));
- for (y= pa->miny; y < pa->maxy; y++) {
- co[1] = pa->bbmin[1] + (pa->voxel[1] * (y + 0.5f));
+ for (x=pa->minx; x < pa->maxx; x++) {
+ co[0] = pa->bbmin[0] + (pa->voxel[0] * (x + 0.5f));
- for (x=pa->minx; x < pa->maxx; x++) {
- co[0] = pa->bbmin[0] + (pa->voxel[0] * (x + 0.5f));
-
- if (pa->re->test_break && pa->re->test_break(pa->re->tbh))
- break;
-
- /* convert from world->camera space for shading */
- mul_v3_m4v3(cco, pa->viewmat, co);
+ if (re->test_break && re->test_break(re->tbh))
+ break;
+
+ /* convert from world->camera space for shading */
+ mul_v3_m4v3(cco, pa->viewmat, co);
- i = BLI_VOXEL_INDEX(x, y, z, res);
+ i = BLI_VOXEL_INDEX(x, y, z, res);
- /* don't bother if the point is not inside the volume mesh */
- if (!point_inside_obi(tree, obi, cco)) {
- obi->volume_precache->data_r[i] = -1.0f;
- obi->volume_precache->data_g[i] = -1.0f;
- obi->volume_precache->data_b[i] = -1.0f;
- continue;
- }
-
- copy_v3_v3(view, cco);
- normalize_v3(view);
- vol_get_scattering(shi, scatter_col, cco, view);
-
- obi->volume_precache->data_r[i] = scatter_col[0];
- obi->volume_precache->data_g[i] = scatter_col[1];
- obi->volume_precache->data_b[i] = scatter_col[2];
-
+ /* don't bother if the point is not inside the volume mesh */
+ if (!point_inside_obi(tree, obi, cco)) {
+ obi->volume_precache->data_r[i] = -1.0f;
+ obi->volume_precache->data_g[i] = -1.0f;
+ obi->volume_precache->data_b[i] = -1.0f;
+ continue;
}
+
+ copy_v3_v3(view, cco);
+ normalize_v3(view);
+ vol_get_scattering(shi, scatter_col, cco, view);
+
+ obi->volume_precache->data_r[i] = scatter_col[0];
+ obi->volume_precache->data_g[i] = scatter_col[1];
+ obi->volume_precache->data_b[i] = scatter_col[2];
+
}
}
+ }
+
+ time = PIL_check_seconds_timer();
+ if (time - state->lasttime > 1.0) {
+ ThreadMutex *mutex = BLI_task_pool_user_mutex(pool);
- BLI_thread_queue_push(queue->done, pa);
+ if (BLI_mutex_trylock(mutex)) {
+ char str[64];
+ float ratio = (float)BLI_task_pool_tasks_done(pool)/(float)state->totparts;
+ BLI_snprintf(str, sizeof(str), IFACE_("Precaching volume: %d%%"), (int)(100.0f * ratio));
+ re->i.infostr = str;
+ re->stats_draw(re->sdh, &re->i);
+ re->i.infostr = NULL;
+ state->lasttime = time;
+
+ BLI_mutex_unlock(mutex);
+ }
}
-
- return NULL;
}
-
static void precache_setup_shadeinput(Render *re, ObjectInstanceRen *obi, Material *ma, ShadeInput *shi)
{
memset(shi, 0, sizeof(ShadeInput));
@@ -573,9 +588,12 @@ static void precache_setup_shadeinput(Render *re, ObjectInstanceRen *obi, Materi
shi->lay = re->lay;
}
-static void precache_init_parts(Render *re, RayObject *tree, ShadeInput *shi, ObjectInstanceRen *obi, int totthread, int *parts)
+static void precache_launch_parts(Render *re, RayObject *tree, ShadeInput *shi, ObjectInstanceRen *obi)
{
+ TaskScheduler *task_scheduler;
+ TaskPool *task_pool;
VolumePrecache *vp = obi->volume_precache;
+ VolPrecacheState state;
int i=0, x, y, z;
float voxel[3];
int sizex, sizey, sizez;
@@ -584,15 +602,23 @@ static void precache_init_parts(Render *re, RayObject *tree, ShadeInput *shi, Ob
int minx, maxx;
int miny, maxy;
int minz, maxz;
+ int totthread = re->r.threads;
+ int parts[3];
if (!vp) return;
- BLI_freelistN(&re->volume_precache_parts);
-
/* currently we just subdivide the box, number of threads per side */
parts[0] = parts[1] = parts[2] = totthread;
res = vp->res;
+ /* setup task scheduler */
+ memset(&state, 0, sizeof(state));
+ state.totparts = parts[0]*parts[1]*parts[2];
+ state.lasttime = PIL_check_seconds_timer();
+
+ task_scheduler = BLI_task_scheduler_create(totthread);
+ task_pool = BLI_task_pool_create(task_scheduler, &state);
+
/* using boundbox in worldspace */
global_bounds_obi(re, obi, bbmin, bbmax);
sub_v3_v3v3(voxel, bbmax, bbmin);
@@ -636,13 +662,19 @@ static void precache_init_parts(Render *re, RayObject *tree, ShadeInput *shi, Ob
pa->miny = miny; pa->maxy = maxy;
pa->minz = minz; pa->maxz = maxz;
-
- BLI_addtail(&re->volume_precache_parts, pa);
+ BLI_task_pool_push(task_pool, vol_precache_part, pa, true, TASK_PRIORITY_HIGH);
i++;
}
}
}
+
+ /* work and wait until tasks are done */
+ BLI_task_pool_work_and_wait(task_pool);
+
+ /* free */
+ BLI_task_pool_free(task_pool);
+ BLI_task_scheduler_free(task_scheduler);
}
/* calculate resolution from bounding box in world space */
@@ -678,17 +710,8 @@ static int precache_resolution(Render *re, VolumePrecache *vp, ObjectInstanceRen
static void vol_precache_objectinstance_threads(Render *re, ObjectInstanceRen *obi, Material *ma)
{
VolumePrecache *vp;
- VolPrecachePart *pa;
RayObject *tree;
ShadeInput shi;
- ListBase threads;
- VolPrecacheQueue queue;
- int parts[3] = {1, 1, 1}, totparts;
-
- int counter=0;
- int totthread = re->r.threads, thread;
-
- double time, lasttime= PIL_check_seconds_timer();
R = *re;
@@ -717,49 +740,8 @@ static void vol_precache_objectinstance_threads(Render *re, ObjectInstanceRen *o
/* Need a shadeinput to calculate scattering */
precache_setup_shadeinput(re, obi, ma, &shi);
- precache_init_parts(re, tree, &shi, obi, totthread, parts);
- totparts = parts[0] * parts[1] * parts[2];
-
- /* setup work and done queues */
- queue.work = BLI_thread_queue_init();
- queue.done = BLI_thread_queue_init();
- BLI_thread_queue_nowait(queue.work);
+ precache_launch_parts(re, tree, &shi, obi);
- for (pa= re->volume_precache_parts.first; pa; pa= pa->next)
- BLI_thread_queue_push(queue.work, pa);
-
- /* launch threads */
- BLI_init_threads(&threads, vol_precache_part, totthread);
-
- for (thread= 0; thread<totthread; thread++)
- BLI_insert_thread(&threads, &queue);
-
- /* loop waiting for work to be done */
- while (counter < totparts) {
- if (re->test_break && re->test_break(re->tbh))
- break;
-
- if (BLI_thread_queue_pop_timeout(queue.done, 50))
- counter++;
-
- time= PIL_check_seconds_timer();
- if (time-lasttime>1.0) {
- char str[64];
- BLI_snprintf(str, sizeof(str), IFACE_("Precaching volume: %d%%"),
- (int)(100.0f * ((float)counter / (float)totparts)));
- re->i.infostr = str;
- re->stats_draw(re->sdh, &re->i);
- re->i.infostr = NULL;
- lasttime = time;
- }
- }
-
- /* free */
- BLI_end_threads(&threads);
- BLI_thread_queue_free(queue.work);
- BLI_thread_queue_free(queue.done);
- BLI_freelistN(&re->volume_precache_parts);
-
if (tree) {
/* TODO: makeraytree_object creates a tree and saves it on OBI,
* if we free this tree we should also clear other pointers to it */
diff --git a/source/blender/render/intern/source/voxeldata.c b/source/blender/render/intern/source/voxeldata.c
index 3f19e77946c..0936d5fcef9 100644
--- a/source/blender/render/intern/source/voxeldata.c
+++ b/source/blender/render/intern/source/voxeldata.c
@@ -109,8 +109,8 @@ static int load_frame_blendervoxel(VoxelData *vd, FILE *fp, int frame)
static int load_frame_raw8(VoxelData *vd, FILE *fp, int frame)
{
const size_t size = vd_resol_size(vd);
+ size_t i;
char *data_c;
- int i;
if (is_vd_res_ok(vd) == FALSE)
return 0;
diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c
index d65db9d47f8..a8ccd1f362f 100644
--- a/source/blender/render/intern/source/zbuf.c
+++ b/source/blender/render/intern/source/zbuf.c
@@ -911,7 +911,7 @@ void hoco_to_zco(ZSpan *zspan, float zco[3], const float hoco[4])
void zbufclipwire(ZSpan *zspan, int obi, int zvlnr, int ec,
const float ho1[4], const float ho2[4], const float ho3[4], const float ho4[4],
- int c1, int c2, int c3, int c4)
+ const int c1, const int c2, const int c3, const int c4)
{
float vez[20];
int and, or;
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index 8894be111e7..c338d49fe17 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -40,6 +40,7 @@
/* dna-savable wmStructs here */
#include "DNA_windowmanager_types.h"
#include "WM_keymap.h"
+#include "BLI_compiler_attrs.h"
#ifdef __cplusplus
extern "C" {
@@ -76,17 +77,9 @@ void WM_init_native_pixels(bool do_it);
void WM_init (struct bContext *C, int argc, const char **argv);
void WM_exit_ext (struct bContext *C, const short do_python);
-void WM_exit (struct bContext *C)
-#if defined(__GNUC__) || defined(__clang__)
-__attribute__((noreturn))
-#endif
-;
+void WM_exit (struct bContext *C) ATTR_NORETURN;
-void WM_main (struct bContext *C)
-#if defined(__GNUC__) || defined(__clang__)
-__attribute__((noreturn))
-#endif
-;
+void WM_main (struct bContext *C) ATTR_NORETURN;
bool WM_init_game (struct bContext *C);
void WM_init_splash (struct bContext *C);
@@ -118,9 +111,9 @@ void WM_autosave_init(struct wmWindowManager *wm);
void WM_recover_last_session(struct bContext *C, struct ReportList *reports);
/* mouse cursors */
-void WM_cursor_set (struct wmWindow *win, int curs);
-void WM_cursor_modal (struct wmWindow *win, int curs);
-void WM_cursor_restore (struct wmWindow *win);
+void WM_cursor_set(struct wmWindow *win, int curs);
+void WM_cursor_modal_set(struct wmWindow *win, int curs);
+void WM_cursor_modal_restore(struct wmWindow *win);
void WM_cursor_wait (bool val);
void WM_cursor_grab_enable(struct wmWindow *win, bool wrap, bool hide, int bounds[4]);
void WM_cursor_grab_disable(struct wmWindow *win, int mouse_ungrab_xy[2]);
@@ -151,9 +144,9 @@ struct wmEventHandler *WM_event_add_keymap_handler_priority(ListBase *handlers,
void WM_event_remove_keymap_handler(ListBase *handlers, wmKeyMap *keymap);
struct wmEventHandler *WM_event_add_ui_handler(
- const struct bContext *C, ListBase *handlers,
- int (*func)(struct bContext *C, const struct wmEvent *event, void *userdata),
- void (*remove)(struct bContext *C, void *userdata), void *userdata);
+ const struct bContext *C, ListBase *handlers,
+ int (*func)(struct bContext *C, const struct wmEvent *event, void *userdata),
+ void (*remove)(struct bContext *C, void *userdata), void *userdata);
void WM_event_remove_ui_handler(ListBase *handlers,
int (*func)(struct bContext *C, const struct wmEvent *event, void *userdata),
@@ -180,11 +173,7 @@ void WM_main_remove_notifier_reference(const void *reference);
/* reports */
void WM_report(const struct bContext *C, ReportType type, const char *message);
-void WM_reportf(const struct bContext *C, ReportType type, const char *format, ...)
-#ifdef __GNUC__
-__attribute__ ((format(printf, 3, 4)))
-#endif
-;
+void WM_reportf(const struct bContext *C, ReportType type, const char *format, ...) ATTR_PRINTF_FORMAT(3, 4);
void wm_event_add(struct wmWindow *win, const struct wmEvent *event_to_add);
void wm_event_init_from_window(struct wmWindow *win, struct wmEvent *event);
@@ -197,7 +186,8 @@ void WM_event_timer_sleep(struct wmWindowManager *wm, struct wmWindow *win, str
/* operator api, default callbacks */
/* invoke callback, uses enum property named "type" */
-int WM_operator_view3d_distance_invoke(struct bContext *C, struct wmOperator *op, const struct wmEvent *event);
+void WM_operator_view3d_unit_defaults(struct bContext *C, struct wmOperator *op);
+int WM_operator_smooth_viewtx_get(const struct wmOperator *op);
int WM_menu_invoke (struct bContext *C, struct wmOperator *op, const struct wmEvent *event);
int WM_enum_search_invoke(struct bContext *C, struct wmOperator *op, const struct wmEvent *event);
/* invoke callback, confirm menu + exec */
@@ -208,6 +198,7 @@ bool WM_operator_filesel_ensure_ext_imtype(wmOperator *op, const struct I
/* poll callback, context checks */
int WM_operator_winactive (struct bContext *C);
/* invoke callback, exec + redo popup */
+int WM_operator_props_popup_confirm(struct bContext *C, struct wmOperator *op, const struct wmEvent *event);
int WM_operator_props_popup_call(struct bContext *C, struct wmOperator *op, const struct wmEvent *event);
int WM_operator_props_popup (struct bContext *C, struct wmOperator *op, const struct wmEvent *event);
int WM_operator_props_dialog_popup(struct bContext *C, struct wmOperator *op, int width, int height);
@@ -386,6 +377,7 @@ struct wmJob *WM_jobs_get(struct wmWindowManager *wm, struct wmWindow *win, void
int WM_jobs_test(struct wmWindowManager *wm, void *owner, int job_type);
float WM_jobs_progress(struct wmWindowManager *wm, void *owner);
char *WM_jobs_name(struct wmWindowManager *wm, void *owner);
+void *WM_jobs_customdata(struct wmWindowManager *wm, void *owner);
int WM_jobs_is_running(struct wmJob *);
void *WM_jobs_customdata_get(struct wmJob *);
@@ -402,7 +394,7 @@ void WM_jobs_stop(struct wmWindowManager *wm, void *owner, void *startjob);
void WM_jobs_kill(struct wmWindowManager *wm, void *owner, void (*)(void *, short int *, short int *, float *));
void WM_jobs_kill_all(struct wmWindowManager *wm);
void WM_jobs_kill_all_except(struct wmWindowManager *wm, void *owner);
-void WM_jobs_kill_type(struct wmWindowManager *wm, int job_type);
+void WM_jobs_kill_type(struct wmWindowManager *wm, void *owner, int job_type);
int WM_jobs_has_running(struct wmWindowManager *wm);
diff --git a/source/blender/windowmanager/WM_keymap.h b/source/blender/windowmanager/WM_keymap.h
index cebafcea12d..ce6481c8929 100644
--- a/source/blender/windowmanager/WM_keymap.h
+++ b/source/blender/windowmanager/WM_keymap.h
@@ -44,7 +44,7 @@ struct EnumPropertyItem;
wmKeyConfig *WM_keyconfig_new (struct wmWindowManager *wm, const char *idname);
wmKeyConfig *WM_keyconfig_new_user(struct wmWindowManager *wm, const char *idname);
-int WM_keyconfig_remove (struct wmWindowManager *wm, struct wmKeyConfig *keyconf);
+bool WM_keyconfig_remove (struct wmWindowManager *wm, struct wmKeyConfig *keyconf);
void WM_keyconfig_free (struct wmKeyConfig *keyconf);
void WM_keyconfig_set_active(struct wmWindowManager *wm, const char *idname);
@@ -64,7 +64,7 @@ wmKeyMapItem *WM_keymap_add_item(struct wmKeyMap *keymap, const char *idname, in
wmKeyMapItem *WM_keymap_add_menu(struct wmKeyMap *keymap, const char *idname, int type,
int val, int modifier, int keymodifier);
-int WM_keymap_remove_item(struct wmKeyMap *keymap, struct wmKeyMapItem *kmi);
+bool WM_keymap_remove_item(struct wmKeyMap *keymap, struct wmKeyMapItem *kmi);
int WM_keymap_item_to_string(wmKeyMapItem *kmi, char *str, const int len);
wmKeyMap *WM_keymap_list_find(ListBase *lb, const char *idname, int spaceid, int regionid);
@@ -72,6 +72,7 @@ wmKeyMap *WM_keymap_find(struct wmKeyConfig *keyconf, const char *idname, int sp
wmKeyMap *WM_keymap_find_all(const struct bContext *C, const char *idname, int spaceid, int regionid);
wmKeyMap *WM_keymap_active(struct wmWindowManager *wm, struct wmKeyMap *keymap);
wmKeyMap *WM_keymap_guess_opname(const struct bContext *C, const char *opname);
+bool WM_keymap_remove(struct wmKeyConfig *keyconfig, struct wmKeyMap *keymap);
wmKeyMapItem *WM_keymap_item_find_id(struct wmKeyMap *keymap, int id);
int WM_keymap_item_compare(struct wmKeyMapItem *k1, struct wmKeyMapItem *k2);
@@ -90,6 +91,7 @@ void WM_modalkeymap_assign(struct wmKeyMap *km, const char *opname);
void WM_keymap_restore_to_default(struct wmKeyMap *keymap, struct bContext *C);
void WM_keymap_properties_reset(struct wmKeyMapItem *kmi, struct IDProperty *properties);
void WM_keymap_restore_item_to_default(struct bContext *C, struct wmKeyMap *keymap, struct wmKeyMapItem *kmi);
+int WM_keymap_map_type_get(struct wmKeyMapItem *kmi);
/* Key Event */
@@ -97,6 +99,8 @@ const char *WM_key_event_string(short type);
int WM_key_event_operator_id(const struct bContext *C, const char *opname, int opcontext, struct IDProperty *properties, int hotkey, struct wmKeyMap **keymap_r);
char *WM_key_event_operator_string(const struct bContext *C, const char *opname, int opcontext, struct IDProperty *properties, const bool strict, char *str, int len);
+const char *WM_bool_as_string(bool test);
+
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index f1932c8aa97..ac9af832671 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -115,6 +115,7 @@ struct ImBuf;
#include "RNA_types.h"
#include "DNA_listBase.h"
+#include "BLI_compiler_attrs.h"
/* exported types for WM */
#include "wm_cursors.h"
@@ -260,7 +261,6 @@ typedef struct wmNotifier {
#define ND_EDITOR_CHANGED (6<<16) /*sent to new editors after switching to them*/
#define ND_SCREENSET (7<<16)
#define ND_SKETCH (8<<16)
-#define ND_SUBWINACTIVE (9<<16)
/* NC_SCENE Scene */
#define ND_SCENEBROWSE (1<<16)
@@ -522,12 +522,8 @@ typedef struct wmOperatorType {
* parameters may be provided through operator properties. cannot use
* any interface code or input device state.
* - see defines below for return values */
- int (*exec)(struct bContext *, struct wmOperator *)
-#ifdef __GNUC__
- __attribute__((warn_unused_result))
-#endif
- ;
-
+ int (*exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT;
+
/* this callback executes on a running operator whenever as property
* is changed. It can correct its own properties or report errors for
* invalid settings in exceptional cases.
@@ -538,25 +534,13 @@ typedef struct wmOperatorType {
* any further events are handled in modal. if the operation is
* canceled due to some external reason, cancel is called
* - see defines below for return values */
- int (*invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *)
-#ifdef __GNUC__
- __attribute__((warn_unused_result))
-#endif
- ;
+ int (*invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT;
int (*cancel)(struct bContext *, struct wmOperator *);
- int (*modal)(struct bContext *, struct wmOperator *, const struct wmEvent *)
-#ifdef __GNUC__
- __attribute__((warn_unused_result))
-#endif
- ;
+ int (*modal)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT;
/* verify if the operator can be executed in the current context, note
* that the operator might still fail to execute even if this return true */
- int (*poll)(struct bContext *)
-#ifdef __GNUC__
- __attribute__((warn_unused_result))
-#endif
- ;
+ int (*poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT;
/* optional panel for redo and repeat, autogenerated if not set */
void (*ui)(struct bContext *, struct wmOperator *);
@@ -580,11 +564,7 @@ typedef struct wmOperatorType {
/* only used for operators defined with python
* use to store pointers to python functions */
void *pyop_data;
- int (*pyop_poll)(struct bContext *, struct wmOperatorType *ot)
-#ifdef __GNUC__
- __attribute__((warn_unused_result))
-#endif
- ;
+ int (*pyop_poll)(struct bContext *, struct wmOperatorType *ot) ATTR_WARN_UNUSED_RESULT;
/* RNA integration */
ExtensionRNA ext;
diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c
index 89c0cde2e88..74c066d1d86 100644
--- a/source/blender/windowmanager/intern/wm.c
+++ b/source/blender/windowmanager/intern/wm.c
@@ -156,8 +156,7 @@ void WM_operator_stack_clear(wmWindowManager *wm)
{
wmOperator *op;
- while ((op = wm->operators.first)) {
- BLI_remlink(&wm->operators, op);
+ while ((op = BLI_pophead(&wm->operators))) {
WM_operator_free(op);
}
@@ -226,7 +225,7 @@ void WM_uilisttype_freelink(uiListType *ult)
/* called on initialize WM_init() */
void WM_uilisttype_init(void)
{
- uilisttypes_hash = BLI_ghash_str_new("uilisttypes_hash gh");
+ uilisttypes_hash = BLI_ghash_str_new_ex("uilisttypes_hash gh", 16);
}
void WM_uilisttype_free(void)
@@ -279,7 +278,8 @@ void WM_menutype_freelink(MenuType *mt)
/* called on initialize WM_init() */
void WM_menutype_init(void)
{
- menutypes_hash = BLI_ghash_str_new("menutypes_hash gh");
+ /* reserve size is set based on blender default setup */
+ menutypes_hash = BLI_ghash_str_new_ex("menutypes_hash gh", 512);
}
void WM_menutype_free(void)
@@ -413,20 +413,17 @@ void wm_close_and_free(bContext *C, wmWindowManager *wm)
if (wm->autosavetimer)
wm_autosave_timer_ended(wm);
- while ((win = wm->windows.first)) {
- BLI_remlink(&wm->windows, win);
+ while ((win = BLI_pophead(&wm->windows))) {
win->screen = NULL; /* prevent draw clear to use screen */
wm_draw_window_clear(win);
wm_window_free(C, wm, win);
}
- while ((op = wm->operators.first)) {
- BLI_remlink(&wm->operators, op);
+ while ((op = BLI_pophead(&wm->operators))) {
WM_operator_free(op);
}
- while ((keyconf = wm->keyconfigs.first)) {
- BLI_remlink(&wm->keyconfigs, keyconf);
+ while ((keyconf = BLI_pophead(&wm->keyconfigs))) {
WM_keyconfig_free(keyconf);
}
diff --git a/source/blender/windowmanager/intern/wm_cursors.c b/source/blender/windowmanager/intern/wm_cursors.c
index 515f80b0ade..9b308553006 100644
--- a/source/blender/windowmanager/intern/wm_cursors.c
+++ b/source/blender/windowmanager/intern/wm_cursors.c
@@ -49,6 +49,7 @@
#include "WM_types.h"
#include "WM_api.h"
#include "wm_cursors.h"
+#include "wm_window.h"
/* XXX this still is mess from old code */
@@ -149,7 +150,7 @@ void WM_cursor_set(wmWindow *win, int curs)
}
}
-void WM_cursor_modal(wmWindow *win, int val)
+void WM_cursor_modal_set(wmWindow *win, int val)
{
if (win->lastcursor == 0)
win->lastcursor = win->cursor;
@@ -157,7 +158,7 @@ void WM_cursor_modal(wmWindow *win, int val)
WM_cursor_set(win, val);
}
-void WM_cursor_restore(wmWindow *win)
+void WM_cursor_modal_restore(wmWindow *win)
{
win->modalcursor = 0;
if (win->lastcursor)
@@ -174,10 +175,10 @@ void WM_cursor_wait(bool val)
for (; win; win = win->next) {
if (val) {
- WM_cursor_modal(win, BC_WAITCURSOR);
+ WM_cursor_modal_set(win, BC_WAITCURSOR);
}
else {
- WM_cursor_restore(win);
+ WM_cursor_modal_restore(win);
}
}
}
@@ -233,25 +234,32 @@ void WM_cursor_grab_disable(wmWindow *win, int mouse_ungrab_xy[2])
}
}
+static void wm_cursor_warp_relative(wmWindow *win, int x, int y)
+{
+ /* note: don't use wmEvent coords because of continuous grab [#36409] */
+ int cx, cy;
+ wm_get_cursor_position(win, &cx, &cy);
+ WM_cursor_warp(win, cx + x, cy + y);
+}
+
/* give it a modal keymap one day? */
int wm_cursor_arrow_move(wmWindow *win, wmEvent *event)
{
if (win && event->val == KM_PRESS) {
-
if (event->type == UPARROWKEY) {
- WM_cursor_warp(win, event->x, event->y + 1);
+ wm_cursor_warp_relative(win, 0, 1);
return 1;
}
else if (event->type == DOWNARROWKEY) {
- WM_cursor_warp(win, event->x, event->y - 1);
+ wm_cursor_warp_relative(win, 0, -1);
return 1;
}
else if (event->type == LEFTARROWKEY) {
- WM_cursor_warp(win, event->x - 1, event->y);
+ wm_cursor_warp_relative(win, -1, 0);
return 1;
}
else if (event->type == RIGHTARROWKEY) {
- WM_cursor_warp(win, event->x + 1, event->y);
+ wm_cursor_warp_relative(win, 1, 0);
return 1;
}
}
diff --git a/source/blender/windowmanager/intern/wm_dragdrop.c b/source/blender/windowmanager/intern/wm_dragdrop.c
index 0c78338c18a..4c58089f4e7 100644
--- a/source/blender/windowmanager/intern/wm_dragdrop.c
+++ b/source/blender/windowmanager/intern/wm_dragdrop.c
@@ -226,17 +226,17 @@ static void wm_drop_operator_options(bContext *C, wmDrag *drag, wmEvent *event)
/* check buttons (XXX todo rna and value) */
if (UI_but_active_drop_name(C) ) {
- strcpy(drag->opname, IFACE_("Paste name"));
+ BLI_strncpy(drag->opname, IFACE_("Paste name"), sizeof(drag->opname));
}
else {
const char *opname = wm_dropbox_active(C, drag, event);
if (opname) {
- BLI_strncpy(drag->opname, opname, FILE_MAX);
- // WM_cursor_modal(win, CURSOR_COPY);
+ BLI_strncpy(drag->opname, opname, sizeof(drag->opname));
+ // WM_cursor_modal_set(win, CURSOR_COPY);
}
// else
- // WM_cursor_restore(win);
+ // WM_cursor_modal_restore(win);
/* unsure about cursor type, feels to be too much */
}
}
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index b4f193bdbe6..825c1ca9252 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -85,10 +85,11 @@
# include "RNA_enum_types.h"
#endif
+static void wm_notifier_clear(wmNotifier *note);
static void update_tablet_data(wmWindow *win, wmEvent *event);
static int wm_operator_call_internal(bContext *C, wmOperatorType *ot, PointerRNA *properties, ReportList *reports,
- short context, short poll_only);
+ const short context, const bool poll_only);
/* ************ event management ************** */
@@ -126,8 +127,7 @@ void wm_event_free_all(wmWindow *win)
{
wmEvent *event;
- while ((event = win->queue.first)) {
- BLI_remlink(&win->queue, event);
+ while ((event = BLI_pophead(&win->queue))) {
wm_event_free(event);
}
}
@@ -218,19 +218,18 @@ void WM_main_remove_notifier_reference(const void *reference)
note_next = note->next;
if (note->reference == reference) {
- BLI_remlink(&wm->queue, note);
- MEM_freeN(note);
+ /* don't remove because this causes problems for #wm_event_do_notifiers
+ * which may be looping on the data (deleting screens) */
+ wm_notifier_clear(note);
}
}
}
}
-static wmNotifier *wm_notifier_next(wmWindowManager *wm)
+static void wm_notifier_clear(wmNotifier *note)
{
- wmNotifier *note = wm->queue.first;
-
- if (note) BLI_remlink(&wm->queue, note);
- return note;
+ /* NULL the entire notifier, only leaving (next, prev) members intact */
+ memset(((char *)note) + sizeof(Link), 0, sizeof(*note) - sizeof(Link));
}
/* called in mainloop */
@@ -265,7 +264,6 @@ void wm_event_do_notifiers(bContext *C)
if (note->category == NC_SCREEN) {
if (note->data == ND_SCREENBROWSE) {
/* free popup handlers only [#35434] */
- wmWindow *win = CTX_wm_window(C);
UI_remove_popup_handlers_all(C, &win->modalhandlers);
@@ -308,7 +306,7 @@ void wm_event_do_notifiers(bContext *C)
}
/* the notifiers are sent without context, to keep it clean */
- while ( (note = wm_notifier_next(wm)) ) {
+ while ((note = BLI_pophead(&wm->queue))) {
for (win = wm->windows.first; win; win = win->next) {
/* filter out notifiers */
@@ -493,7 +491,7 @@ int WM_operator_poll_context(bContext *C, wmOperatorType *ot, short context)
static void wm_operator_print(bContext *C, wmOperator *op)
{
/* context is needed for enum function */
- char *buf = WM_operator_pystring(C, op->type, op->ptr, 1);
+ char *buf = WM_operator_pystring(C, op->type, op->ptr, false);
printf("%s\n", buf);
MEM_freeN(buf);
}
@@ -628,7 +626,7 @@ static void wm_operator_reports(bContext *C, wmOperator *op, int retval, int cal
if (op->type->flag & OPTYPE_REGISTER) {
if (G.background == 0) { /* ends up printing these in the terminal, gets annoying */
/* Report the python string representation of the operator */
- char *buf = WM_operator_pystring(C, op->type, op->ptr, 1);
+ char *buf = WM_operator_pystring(C, op->type, op->ptr, false);
BKE_report(CTX_wm_reports(C), RPT_OPERATOR, buf);
MEM_freeN(buf);
}
@@ -662,7 +660,7 @@ static void wm_operator_finished(bContext *C, wmOperator *op, int repeat)
if (repeat == 0) {
if (G.debug & G_DEBUG_WM) {
- char *buf = WM_operator_pystring(C, op->type, op->ptr, 1);
+ char *buf = WM_operator_pystring(C, op->type, op->ptr, false);
BKE_report(CTX_wm_reports(C), RPT_OPERATOR, buf);
MEM_freeN(buf);
}
@@ -964,9 +962,8 @@ int WM_operator_last_properties_store(wmOperator *UNUSED(op))
#endif
static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event,
- PointerRNA *properties, ReportList *reports, short poll_only)
+ PointerRNA *properties, ReportList *reports, const bool poll_only)
{
- wmWindowManager *wm = CTX_wm_manager(C);
int retval = OPERATOR_PASS_THROUGH;
/* this is done because complicated setup is done to call this function that is better not duplicated */
@@ -974,9 +971,12 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event,
return WM_operator_poll(C, ot);
if (WM_operator_poll(C, ot)) {
+ wmWindowManager *wm = CTX_wm_manager(C);
wmOperator *op = wm_operator_create(wm, ot, properties, reports); /* if reports == NULL, they'll be initialized */
const short is_nested_call = (wm->op_undo_depth != 0);
+ op->flag |= OP_IS_INVOKE;
+
/* initialize setting from previous run */
if (!is_nested_call) { /* not called by py script */
WM_operator_last_properties_init(op);
@@ -1102,9 +1102,8 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event,
*
* invokes operator in context */
static int wm_operator_call_internal(bContext *C, wmOperatorType *ot, PointerRNA *properties, ReportList *reports,
- short context, short poll_only)
+ const short context, const bool poll_only)
{
- wmWindow *window = CTX_wm_window(C);
wmEvent *event;
int retval;
@@ -1113,16 +1112,23 @@ static int wm_operator_call_internal(bContext *C, wmOperatorType *ot, PointerRNA
/* dummie test */
if (ot && C) {
+ wmWindow *window = CTX_wm_window(C);
+
switch (context) {
case WM_OP_INVOKE_DEFAULT:
case WM_OP_INVOKE_REGION_WIN:
case WM_OP_INVOKE_AREA:
case WM_OP_INVOKE_SCREEN:
/* window is needed for invoke, cancel operator */
- if (window == NULL)
+ if (window == NULL) {
+ if (poll_only) {
+ CTX_wm_operator_poll_msg_set(C, "Missing 'window' in context");
+ }
return 0;
- else
+ }
+ else {
event = window->eventstate;
+ }
break;
default:
event = NULL;
@@ -1323,9 +1329,7 @@ void WM_event_remove_handlers(bContext *C, ListBase *handlers)
wmWindowManager *wm = CTX_wm_manager(C);
/* C is zero on freeing database, modal handlers then already were freed */
- while ((handler = handlers->first)) {
- BLI_remlink(handlers, handler);
-
+ while ((handler = BLI_pophead(handlers))) {
if (handler->op) {
if (handler->op->type->cancel) {
ScrArea *area = CTX_wm_area(C);
@@ -2100,7 +2104,7 @@ static void wm_event_drag_test(wmWindowManager *wm, wmWindow *win, wmEvent *even
win->screen->do_draw_drag = TRUE;
/* restore cursor (disabled, see wm_dragdrop.c) */
- // WM_cursor_restore(win);
+ // WM_cursor_modal_restore(win);
}
/* overlap fails otherwise */
@@ -2167,7 +2171,7 @@ void wm_event_do_handlers(bContext *C)
while ( (event = win->queue.first) ) {
int action = WM_HANDLER_CONTINUE;
-#ifdef DEBUG
+#ifndef NDEBUG
if (G.debug & (G_DEBUG_HANDLERS | G_DEBUG_EVENTS) && !ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE)) {
printf("\n%s: Handling event\n", __func__);
WM_event_print(event);
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index f4b50667b2f..f7bbb84facc 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -554,7 +554,7 @@ int wm_homefile_read(bContext *C, ReportList *UNUSED(reports), short from_memory
}
if (success == 0) {
- success = BKE_read_file_from_memory(C, datatoc_startup_blend, datatoc_startup_blend_size, NULL);
+ success = BKE_read_file_from_memory(C, datatoc_startup_blend, datatoc_startup_blend_size, NULL, true);
if (wmbase.first == NULL) wm_clear_default_size(C);
BLI_init_temporary_dir(U.tempdir);
@@ -810,15 +810,14 @@ int write_crash_blend(void)
}
}
-int wm_file_write(bContext *C, const char *target, int fileflags, ReportList *reports)
+int wm_file_write(bContext *C, const char *filepath, int fileflags, ReportList *reports)
{
Library *li;
int len;
- char filepath[FILE_MAX];
int *thumb = NULL;
ImBuf *ibuf_thumb = NULL;
- len = strlen(target);
+ len = strlen(filepath);
if (len == 0) {
BKE_report(reports, RPT_ERROR, "Path is empty, cannot save");
@@ -830,9 +829,9 @@ int wm_file_write(bContext *C, const char *target, int fileflags, ReportList *re
return -1;
}
- BLI_strncpy(filepath, target, FILE_MAX);
- BLI_replace_extension(filepath, FILE_MAX, ".blend");
- /* don't use 'target' anymore */
+ /* note: used to replace the file extension (to ensure '.blend'),
+ * no need to now because the operator ensures,
+ * its handy for scripts to save to a predefined name without blender editing it */
/* send the OnSave event */
for (li = G.main->library.first; li; li = li->id.next) {
@@ -866,9 +865,10 @@ int wm_file_write(bContext *C, const char *target, int fileflags, ReportList *re
/* first time saving */
/* XXX temp solution to solve bug, real fix coming (ton) */
- if (G.main->name[0] == 0)
+ if ((G.main->name[0] == '\0') && !(fileflags & G_FILE_SAVE_COPY)) {
BLI_strncpy(G.main->name, filepath, sizeof(G.main->name));
-
+ }
+
/* XXX temp solution to solve bug, real fix coming (ton) */
G.main->recovered = 0;
diff --git a/source/blender/windowmanager/intern/wm_gesture.c b/source/blender/windowmanager/intern/wm_gesture.c
index adf159bcfee..05ee23e2361 100644
--- a/source/blender/windowmanager/intern/wm_gesture.c
+++ b/source/blender/windowmanager/intern/wm_gesture.c
@@ -40,6 +40,7 @@
#include "BLI_math.h"
#include "BLI_scanfill.h" /* lasso tessellation */
#include "BLI_utildefines.h"
+#include "BLI_lasso.h"
#include "BKE_context.h"
@@ -231,56 +232,73 @@ static void wm_gesture_draw_circle(wmGesture *gt)
}
-static void draw_filled_lasso(wmGesture *gt)
+struct LassoFillData {
+ unsigned int *px;
+ int width;
+};
+
+static void draw_filled_lasso_px_cb(int x, int y, void *user_data)
+{
+ struct LassoFillData *data = user_data;
+ unsigned char *col = (unsigned char *)&(data->px[(y * data->width) + x]);
+ col[0] = col[1] = col[2] = 0xff;
+ col[3] = 0x10;
+}
+
+static void draw_filled_lasso(wmWindow *win, wmGesture *gt)
{
- ScanFillContext sf_ctx;
- ScanFillVert *sf_vert = NULL, *sf_vert_last = NULL, *sf_vert_first = NULL;
- ScanFillFace *sf_tri;
short *lasso = (short *)gt->customdata;
+ const int tot = gt->points;
+ int (*moves)[2] = MEM_mallocN(sizeof(*moves) * (tot + 1), __func__);
int i;
-
- BLI_scanfill_begin(&sf_ctx);
- for (i = 0; i < gt->points; i++, lasso += 2) {
- float co[3];
-
- co[0] = (float)lasso[0];
- co[1] = (float)lasso[1];
- co[2] = 0.0f;
-
- sf_vert = BLI_scanfill_vert_add(&sf_ctx, co);
- if (sf_vert_last)
- /* e = */ /* UNUSED */ BLI_scanfill_edge_add(&sf_ctx, sf_vert_last, sf_vert);
- sf_vert_last = sf_vert;
- if (sf_vert_first == NULL) sf_vert_first = sf_vert;
+ rcti rect;
+ rcti rect_win;
+
+ for (i = 0; i < tot; i++, lasso += 2) {
+ moves[i][0] = lasso[0];
+ moves[i][1] = lasso[1];
}
-
- /* highly unlikely this will fail, but could crash if (gt->points == 0) */
- if (sf_vert_first) {
- const float zvec[3] = {0.0f, 0.0f, 1.0f};
- BLI_scanfill_edge_add(&sf_ctx, sf_vert_first, sf_vert);
- BLI_scanfill_calc_ex(&sf_ctx, BLI_SCANFILL_CALC_REMOVE_DOUBLES | BLI_SCANFILL_CALC_HOLES, zvec);
-
+
+ BLI_lasso_boundbox(&rect, (const int (*)[2])moves, tot);
+
+ wm_subwindow_getrect(win, gt->swinid, &rect_win);
+ BLI_rcti_translate(&rect, rect_win.xmin, rect_win.ymin);
+ BLI_rcti_isect(&rect_win, &rect, &rect);
+ BLI_rcti_translate(&rect, -rect_win.xmin, -rect_win.ymin);
+
+ /* highly unlikely this will fail, but could crash if (tot == 0) */
+ if (BLI_rcti_is_empty(&rect) == false) {
+ const int w = BLI_rcti_size_x(&rect);
+ const int h = BLI_rcti_size_y(&rect);
+ unsigned int *pixel_buf = MEM_callocN(sizeof(*pixel_buf) * w * h, __func__);
+ struct LassoFillData lasso_fill_data = {pixel_buf, w};
+
+ fill_poly_v2i_n(
+ rect.xmin, rect.ymin, rect.xmax, rect.ymax,
+ (const int (*)[2])moves, tot,
+ draw_filled_lasso_px_cb, &lasso_fill_data);
+
glEnable(GL_BLEND);
- glColor4f(1.0, 1.0, 1.0, 0.05);
- glBegin(GL_TRIANGLES);
- for (sf_tri = sf_ctx.fillfacebase.first; sf_tri; sf_tri = sf_tri->next) {
- glVertex2fv(sf_tri->v1->co);
- glVertex2fv(sf_tri->v2->co);
- glVertex2fv(sf_tri->v3->co);
- }
- glEnd();
+ // glColor4f(1.0, 1.0, 1.0, 0.05);
+
+ glRasterPos2f(rect.xmin, rect.ymin);
+
+ glDrawPixels(w, h, GL_RGBA, GL_UNSIGNED_BYTE, pixel_buf);
+
glDisable(GL_BLEND);
-
- BLI_scanfill_end(&sf_ctx);
+ MEM_freeN(pixel_buf);
}
+
+ MEM_freeN(moves);
}
-static void wm_gesture_draw_lasso(wmGesture *gt)
+
+static void wm_gesture_draw_lasso(wmWindow *win, wmGesture *gt)
{
short *lasso = (short *)gt->customdata;
int i;
- draw_filled_lasso(gt);
+ draw_filled_lasso(win, gt);
glEnable(GL_LINE_STIPPLE);
glColor3ub(96, 96, 96);
@@ -347,9 +365,9 @@ void wm_gesture_draw(wmWindow *win)
wm_gesture_draw_cross(win, gt);
}
else if (gt->type == WM_GESTURE_LINES)
- wm_gesture_draw_lasso(gt);
+ wm_gesture_draw_lasso(win, gt);
else if (gt->type == WM_GESTURE_LASSO)
- wm_gesture_draw_lasso(gt);
+ wm_gesture_draw_lasso(win, gt);
else if (gt->type == WM_GESTURE_STRAIGHTLINE)
wm_gesture_draw_line(gt);
}
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index 63cf1eeb40d..4e9b849af40 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -51,6 +51,7 @@
#include "BLI_listbase.h"
#include "BLI_path_util.h"
#include "BLI_string.h"
+#include "BLI_threads.h"
#include "BLI_utildefines.h"
#include "BKE_blender.h"
@@ -510,6 +511,8 @@ void WM_exit_ext(bContext *C, const short do_python)
GHOST_DisposeSystemPaths();
+ BLI_threadapi_exit();
+
if (MEM_get_memory_blocks_in_use() != 0) {
printf("Error: Not freed memory blocks: %d\n", MEM_get_memory_blocks_in_use());
MEM_printmemlist();
diff --git a/source/blender/windowmanager/intern/wm_jobs.c b/source/blender/windowmanager/intern/wm_jobs.c
index c6e067dc2f9..c9c3d2df788 100644
--- a/source/blender/windowmanager/intern/wm_jobs.c
+++ b/source/blender/windowmanager/intern/wm_jobs.c
@@ -255,6 +255,17 @@ char *WM_jobs_name(wmWindowManager *wm, void *owner)
return NULL;
}
+void *WM_jobs_customdata(wmWindowManager *wm, void *owner)
+{
+ wmJob *wm_job = wm_job_find(wm, owner, WM_JOB_TYPE_ANY);
+
+ if (wm_job)
+ return WM_jobs_customdata_get(wm_job);
+
+ return NULL;
+
+}
+
int WM_jobs_is_running(wmJob *wm_job)
{
return wm_job->running;
@@ -463,15 +474,16 @@ void WM_jobs_kill_all_except(wmWindowManager *wm, void *owner)
}
-void WM_jobs_kill_type(struct wmWindowManager *wm, int job_type)
+void WM_jobs_kill_type(struct wmWindowManager *wm, void *owner, int job_type)
{
wmJob *wm_job, *next_job;
for (wm_job = wm->jobs.first; wm_job; wm_job = next_job) {
next_job = wm_job->next;
- if (wm_job->job_type == job_type)
- wm_jobs_kill_job(wm, wm_job);
+ if (!owner || wm_job->owner == owner)
+ if (wm_job->job_type == job_type)
+ wm_jobs_kill_job(wm, wm_job);
}
}
diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c
index ff805579b44..ed27228f107 100644
--- a/source/blender/windowmanager/intern/wm_keymap.c
+++ b/source/blender/windowmanager/intern/wm_keymap.c
@@ -50,6 +50,7 @@
#include "BKE_main.h"
#include "BKE_screen.h"
+#include "BLF_translation.h"
#include "RNA_access.h"
#include "RNA_enum_types.h"
@@ -101,7 +102,7 @@ static int wm_keymap_item_equals_result(wmKeyMapItem *a, wmKeyMapItem *b)
if (strcmp(a->idname, b->idname) != 0)
return 0;
- if (!RNA_struct_equals(a->ptr, b->ptr, true))
+ if (!RNA_struct_equals(a->ptr, b->ptr, RNA_EQ_UNSET_MATCH_NONE))
return 0;
if ((a->flag & KMI_INACTIVE) != (b->flag & KMI_INACTIVE))
@@ -138,6 +139,30 @@ void WM_keymap_properties_reset(wmKeyMapItem *kmi, struct IDProperty *properties
wm_keymap_item_properties_set(kmi);
}
+int WM_keymap_map_type_get(wmKeyMapItem *kmi)
+{
+ if (ISTIMER(kmi->type)) {
+ return KMI_TYPE_TIMER;
+ }
+ if (ISKEYBOARD(kmi->type)) {
+ return KMI_TYPE_KEYBOARD;
+ }
+ if (ISTWEAK(kmi->type)) {
+ return KMI_TYPE_TWEAK;
+ }
+ if (ISMOUSE(kmi->type)) {
+ return KMI_TYPE_MOUSE;
+ }
+ if (ISNDOF(kmi->type)) {
+ return KMI_TYPE_NDOF;
+ }
+ if (kmi->type == KM_TEXTINPUT) {
+ return KMI_TYPE_TEXTINPUT;
+ }
+ return KMI_TYPE_KEYBOARD;
+}
+
+
/**************************** Keymap Diff Item *********************************
* Item in a diff keymap, used for saving diff of keymaps in user preferences */
@@ -190,7 +215,7 @@ wmKeyConfig *WM_keyconfig_new_user(wmWindowManager *wm, const char *idname)
return keyconf;
}
-int WM_keyconfig_remove(wmWindowManager *wm, wmKeyConfig *keyconf)
+bool WM_keyconfig_remove(wmWindowManager *wm, wmKeyConfig *keyconf)
{
if (BLI_findindex(&wm->keyconfigs, keyconf) != -1) {
if (strncmp(U.keyconfigstr, keyconf->idname, sizeof(U.keyconfigstr)) == 0) {
@@ -201,10 +226,10 @@ int WM_keyconfig_remove(wmWindowManager *wm, wmKeyConfig *keyconf)
BLI_remlink(&wm->keyconfigs, keyconf);
WM_keyconfig_free(keyconf);
- return TRUE;
+ return true;
}
else {
- return FALSE;
+ return false;
}
}
@@ -299,6 +324,21 @@ void WM_keymap_free(wmKeyMap *keymap)
BLI_freelistN(&keymap->items);
}
+bool WM_keymap_remove(wmKeyConfig *keyconf, wmKeyMap *keymap)
+{
+ if (BLI_findindex(&keyconf->keymaps, keymap) != -1) {
+
+ WM_keymap_free(keymap);
+ BLI_remlink(&keyconf->keymaps, keymap);
+ MEM_freeN(keymap);
+
+ return true;
+ }
+ else {
+ return false;
+ }
+}
+
static void keymap_event_set(wmKeyMapItem *kmi, short type, short val, int modifier, short keymodifier)
{
kmi->type = type;
@@ -375,7 +415,7 @@ wmKeyMapItem *WM_keymap_add_menu(wmKeyMap *keymap, const char *idname, int type,
return kmi;
}
-int WM_keymap_remove_item(wmKeyMap *keymap, wmKeyMapItem *kmi)
+bool WM_keymap_remove_item(wmKeyMap *keymap, wmKeyMapItem *kmi)
{
if (BLI_findindex(&keymap->items, kmi) != -1) {
if (kmi->ptr) {
@@ -385,10 +425,10 @@ int WM_keymap_remove_item(wmKeyMap *keymap, wmKeyMapItem *kmi)
BLI_freelinkN(&keymap->items, kmi);
WM_keyconfig_update_tag(keymap, NULL);
- return TRUE;
+ return true;
}
else {
- return FALSE;
+ return false;
}
}
@@ -1464,3 +1504,7 @@ wmKeyMap *WM_keymap_guess_opname(const bContext *C, const char *opname)
return km;
}
+const char *WM_bool_as_string(bool test)
+{
+ return test ? IFACE_("ON") : IFACE_("OFF");
+}
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index f1a9f6dc007..6091ec4a371 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -542,22 +542,20 @@ char *WM_operator_pystring(bContext *C, wmOperatorType *ot, PointerRNA *opptr, i
/* only to get the orginal props for comparisons */
PointerRNA opptr_default;
- if (all_args == 0 || opptr == NULL) {
+ if (opptr == NULL) {
WM_operator_properties_create_ptr(&opptr_default, ot);
-
- if (opptr == NULL)
- opptr = &opptr_default;
+ opptr = &opptr_default;
}
WM_operator_py_idname(idname_py, ot->idname);
BLI_dynstr_appendf(dynstr, "bpy.ops.%s(", idname_py);
- cstring_args = RNA_pointer_as_string_keywords(C, opptr, &opptr_default, FALSE,
+ cstring_args = RNA_pointer_as_string_keywords(C, opptr, false,
all_args, max_prop_length);
BLI_dynstr_append(dynstr, cstring_args);
MEM_freeN(cstring_args);
- if (all_args == 0 || opptr == &opptr_default)
+ if (opptr == &opptr_default)
WM_operator_properties_free(&opptr_default);
BLI_dynstr_append(dynstr, ")");
@@ -796,7 +794,7 @@ void WM_operator_properties_alloc(PointerRNA **ptr, IDProperty **properties, con
void WM_operator_properties_sanitize(PointerRNA *ptr, const bool no_context)
{
- RNA_STRUCT_BEGIN(ptr, prop)
+ RNA_STRUCT_BEGIN (ptr, prop)
{
switch (RNA_property_type(prop)) {
case PROP_ENUM:
@@ -833,7 +831,7 @@ void WM_operator_properties_sanitize(PointerRNA *ptr, const bool no_context)
int WM_operator_properties_default(PointerRNA *ptr, const bool do_update)
{
int is_change = FALSE;
- RNA_STRUCT_BEGIN(ptr, prop)
+ RNA_STRUCT_BEGIN (ptr, prop)
{
switch (RNA_property_type(prop)) {
case PROP_POINTER:
@@ -866,7 +864,7 @@ void WM_operator_properties_reset(wmOperator *op)
PropertyRNA *iterprop;
iterprop = RNA_struct_iterator_property(op->type->srna);
- RNA_PROP_BEGIN(op->ptr, itemptr, iterprop)
+ RNA_PROP_BEGIN (op->ptr, itemptr, iterprop)
{
PropertyRNA *prop = itemptr.data;
@@ -892,33 +890,38 @@ void WM_operator_properties_free(PointerRNA *ptr)
/* ************ default op callbacks, exported *********** */
-int WM_operator_view3d_distance_invoke(struct bContext *C, struct wmOperator *op, const struct wmEvent *UNUSED(event))
+void WM_operator_view3d_unit_defaults(struct bContext *C, struct wmOperator *op)
{
- Scene *scene = CTX_data_scene(C);
- View3D *v3d = CTX_wm_view3d(C);
+ if (op->flag & OP_IS_INVOKE) {
+ Scene *scene = CTX_data_scene(C);
+ View3D *v3d = CTX_wm_view3d(C);
- const float dia = v3d ? ED_view3d_grid_scale(scene, v3d, NULL) : ED_scene_grid_scale(scene, NULL);
+ const float dia = v3d ? ED_view3d_grid_scale(scene, v3d, NULL) : ED_scene_grid_scale(scene, NULL);
- /* always run, so the values are initialized,
- * otherwise we may get differ behavior when (dia != 1.0) */
- RNA_STRUCT_BEGIN(op->ptr, prop)
- {
- if (RNA_property_type(prop) == PROP_FLOAT) {
- PropertySubType pstype = RNA_property_subtype(prop);
- if (pstype == PROP_DISTANCE) {
- /* we don't support arrays yet */
- BLI_assert(RNA_property_array_check(prop) == FALSE);
- /* initialize */
- if (!RNA_property_is_set_ex(op->ptr, prop, FALSE)) {
- const float value = RNA_property_float_get_default(op->ptr, prop) * dia;
- RNA_property_float_set(op->ptr, prop, value);
+ /* always run, so the values are initialized,
+ * otherwise we may get differ behavior when (dia != 1.0) */
+ RNA_STRUCT_BEGIN (op->ptr, prop)
+ {
+ if (RNA_property_type(prop) == PROP_FLOAT) {
+ PropertySubType pstype = RNA_property_subtype(prop);
+ if (pstype == PROP_DISTANCE) {
+ /* we don't support arrays yet */
+ BLI_assert(RNA_property_array_check(prop) == FALSE);
+ /* initialize */
+ if (!RNA_property_is_set_ex(op->ptr, prop, FALSE)) {
+ const float value = RNA_property_float_get_default(op->ptr, prop) * dia;
+ RNA_property_float_set(op->ptr, prop, value);
+ }
}
}
}
+ RNA_STRUCT_END;
}
- RNA_STRUCT_END;
+}
- return op->type->exec(C, op);
+int WM_operator_smooth_viewtx_get(const wmOperator *op)
+{
+ return (op->flag & OP_IS_INVOKE) ? U.smooth_viewtx : 0;
}
/* invoke callback, uses enum property named "type" */
@@ -1137,10 +1140,16 @@ void WM_operator_properties_select_all(wmOperatorType *ot)
void WM_operator_properties_border(wmOperatorType *ot)
{
- RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX);
- RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, "X Max", "", INT_MIN, INT_MAX);
- RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, "Y Min", "", INT_MIN, INT_MAX);
- RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, "Y Max", "", INT_MIN, INT_MAX);
+ PropertyRNA *prop;
+
+ prop = RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX);
+ RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
+ prop = RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, "X Max", "", INT_MIN, INT_MAX);
+ RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
+ prop = RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, "Y Min", "", INT_MIN, INT_MAX);
+ RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
+ prop = RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, "Y Max", "", INT_MIN, INT_MAX);
+ RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
}
void WM_operator_properties_border_to_rcti(struct wmOperator *op, rcti *rect)
@@ -1171,14 +1180,18 @@ void WM_operator_properties_mouse_select(wmOperatorType *ot)
void WM_operator_properties_gesture_straightline(wmOperatorType *ot, int cursor)
{
- RNA_def_int(ot->srna, "xstart", 0, INT_MIN, INT_MAX, "X Start", "", INT_MIN, INT_MAX);
- RNA_def_int(ot->srna, "xend", 0, INT_MIN, INT_MAX, "X End", "", INT_MIN, INT_MAX);
- RNA_def_int(ot->srna, "ystart", 0, INT_MIN, INT_MAX, "Y Start", "", INT_MIN, INT_MAX);
- RNA_def_int(ot->srna, "yend", 0, INT_MIN, INT_MAX, "Y End", "", INT_MIN, INT_MAX);
+ PropertyRNA *prop;
+
+ prop = RNA_def_int(ot->srna, "xstart", 0, INT_MIN, INT_MAX, "X Start", "", INT_MIN, INT_MAX);
+ RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
+ prop = RNA_def_int(ot->srna, "xend", 0, INT_MIN, INT_MAX, "X End", "", INT_MIN, INT_MAX);
+ RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
+ prop = RNA_def_int(ot->srna, "ystart", 0, INT_MIN, INT_MAX, "Y Start", "", INT_MIN, INT_MAX);
+ RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
+ prop = RNA_def_int(ot->srna, "yend", 0, INT_MIN, INT_MAX, "Y End", "", INT_MIN, INT_MAX);
+ RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
if (cursor) {
- PropertyRNA *prop;
-
prop = RNA_def_int(ot->srna, "cursor", cursor, 0, INT_MAX,
"Cursor", "Mouse cursor style to use during the modal operator", 0, INT_MAX);
RNA_def_property_flag(prop, PROP_HIDDEN);
@@ -1420,7 +1433,8 @@ int WM_operator_ui_popup(bContext *C, wmOperator *op, int width, int height)
* For use by #WM_operator_props_popup_call, #WM_operator_props_popup only.
*
* \note operator menu needs undo flag enabled , for redo callback */
-static int wm_operator_props_popup_ex(bContext *C, wmOperator *op, const int do_call)
+static int wm_operator_props_popup_ex(bContext *C, wmOperator *op,
+ const bool do_call, const bool do_redo)
{
if ((op->type->flag & OPTYPE_REGISTER) == 0) {
BKE_reportf(op->reports, RPT_ERROR,
@@ -1430,7 +1444,7 @@ static int wm_operator_props_popup_ex(bContext *C, wmOperator *op, const int do_
/* if we don't have global undo, we can't do undo push for automatic redo,
* so we require manual OK clicking in this popup */
- if (!(U.uiflag & USER_GLOBALUNDO))
+ if (!do_redo || !(U.uiflag & USER_GLOBALUNDO))
return WM_operator_props_dialog_popup(C, op, 15 * UI_UNIT_X, UI_UNIT_Y);
uiPupBlockEx(C, wm_block_create_redo, NULL, wm_block_redo_cancel_cb, op);
@@ -1441,18 +1455,26 @@ static int wm_operator_props_popup_ex(bContext *C, wmOperator *op, const int do_
return OPERATOR_RUNNING_MODAL;
}
+/* Same as WM_operator_props_popup but don't use operator redo.
+ * just wraps WM_operator_props_dialog_popup.
+ */
+int WM_operator_props_popup_confirm(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
+{
+ return wm_operator_props_popup_ex(C, op, false, false);
+}
+
/* Same as WM_operator_props_popup but call the operator first,
* This way - the button values correspond to the result of the operator.
* Without this, first access to a button will make the result jump,
* see [#32452] */
int WM_operator_props_popup_call(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
{
- return wm_operator_props_popup_ex(C, op, TRUE);
+ return wm_operator_props_popup_ex(C, op, true, true);
}
int WM_operator_props_popup(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
{
- return wm_operator_props_popup_ex(C, op, FALSE);
+ return wm_operator_props_popup_ex(C, op, false, true);
}
int WM_operator_props_dialog_popup(bContext *C, wmOperator *op, int width, int height)
@@ -1553,7 +1575,7 @@ static void wm_block_splash_close(bContext *C, void *arg_block, void *UNUSED(arg
static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *arg_unused);
-/* XXX: hack to refresh splash screen with updated prest menu name,
+/* XXX: hack to refresh splash screen with updated preset menu name,
* since popup blocks don't get regenerated like panels do */
static void wm_block_splash_refreshmenu(bContext *UNUSED(C), void *UNUSED(arg_block), void *UNUSED(arg))
{
@@ -1668,7 +1690,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
uiItemStringO(col, IFACE_("Credits"), ICON_URL, "WM_OT_url_open", "url",
"http://www.blender.org/development/credits");
uiItemStringO(col, IFACE_("Release Log"), ICON_URL, "WM_OT_url_open", "url",
- "http://www.blender.org/development/release-logs/blender-268");
+ "http://www.blender.org/development/release-logs/blender-269");
uiItemStringO(col, IFACE_("Manual"), ICON_URL, "WM_OT_url_open", "url",
"http://wiki.blender.org/index.php/Doc:2.6/Manual");
uiItemStringO(col, IFACE_("Blender Website"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org");
@@ -2253,7 +2275,7 @@ static int wm_link_append_exec(bContext *C, wmOperator *op)
BLO_library_append_named_part_ex(C, mainl, &bh, name, idcode, flag);
}
else {
- RNA_BEGIN(op->ptr, itemptr, "files")
+ RNA_BEGIN (op->ptr, itemptr, "files")
{
RNA_string_get(&itemptr, "name", name);
BLO_library_append_named_part_ex(C, mainl, &bh, name, idcode, flag);
@@ -2419,15 +2441,10 @@ static void WM_OT_recover_auto_save(wmOperatorType *ot)
/* *************** save file as **************** */
-static void untitled(char *filepath)
+static void wm_filepath_default(char *filepath)
{
- if (G.save_over == 0 && strlen(filepath) < FILE_MAX - 16) {
- char *c = (char *)BLI_last_slash(filepath);
-
- if (c)
- strcpy(&c[1], "untitled.blend");
- else
- strcpy(filepath, "untitled.blend");
+ if (G.save_over == false) {
+ BLI_ensure_filename(filepath, FILE_MAX, "untitled.blend");
}
}
@@ -2455,7 +2472,7 @@ static int wm_save_as_mainfile_invoke(bContext *C, wmOperator *op, const wmEvent
else
BLI_strncpy(name, G.main->name, FILE_MAX);
- untitled(name);
+ wm_filepath_default(name);
RNA_string_set(op->ptr, "filepath", name);
WM_event_add_fileselect(C, op);
@@ -2471,11 +2488,12 @@ static int wm_save_as_mainfile_exec(bContext *C, wmOperator *op)
save_set_compress(op);
- if (RNA_struct_property_is_set(op->ptr, "filepath"))
+ if (RNA_struct_property_is_set(op->ptr, "filepath")) {
RNA_string_get(op->ptr, "filepath", path);
+ }
else {
BLI_strncpy(path, G.main->name, FILE_MAX);
- untitled(path);
+ wm_filepath_default(path);
}
fileflags = G.fileflags & ~G_FILE_USERPREFS;
@@ -2522,6 +2540,8 @@ static bool blend_save_check(bContext *UNUSED(C), wmOperator *op)
static void WM_OT_save_as_mainfile(wmOperatorType *ot)
{
+ PropertyRNA *prop;
+
ot->name = "Save As Blender File";
ot->idname = "WM_OT_save_as_mainfile";
ot->description = "Save the current file in the desired location";
@@ -2536,8 +2556,9 @@ static void WM_OT_save_as_mainfile(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "compress", 0, "Compress", "Write compressed .blend file");
RNA_def_boolean(ot->srna, "relative_remap", 1, "Remap Relative",
"Remap relative paths when saving in a different directory");
- RNA_def_boolean(ot->srna, "copy", 0, "Save Copy",
+ prop = RNA_def_boolean(ot->srna, "copy", 0, "Save Copy",
"Save a copy of the actual working state but does not make saved file active");
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
#ifdef USE_BMESH_SAVE_AS_COMPAT
RNA_def_boolean(ot->srna, "use_mesh_compat", 0, "Legacy Mesh Format",
"Save using legacy mesh format (no ngons) - WARNING: only saves tris and quads, other ngons will "
@@ -2566,7 +2587,7 @@ static int wm_save_mainfile_invoke(bContext *C, wmOperator *op, const wmEvent *U
else
BLI_strncpy(name, G.main->name, FILE_MAX);
- untitled(name);
+ wm_filepath_default(name);
RNA_string_set(op->ptr, "filepath", name);
@@ -2750,7 +2771,7 @@ static void wm_gesture_end(bContext *C, wmOperator *op)
ED_area_tag_redraw(CTX_wm_area(C));
if (RNA_struct_find_property(op->ptr, "cursor") )
- WM_cursor_restore(CTX_wm_window(C));
+ WM_cursor_modal_restore(CTX_wm_window(C));
}
int WM_border_select_invoke(bContext *C, wmOperator *op, const wmEvent *event)
@@ -3059,7 +3080,7 @@ int WM_gesture_lasso_invoke(bContext *C, wmOperator *op, const wmEvent *event)
wm_gesture_tag_redraw(C);
if (RNA_struct_find_property(op->ptr, "cursor") )
- WM_cursor_modal(CTX_wm_window(C), RNA_int_get(op->ptr, "cursor"));
+ WM_cursor_modal_set(CTX_wm_window(C), RNA_int_get(op->ptr, "cursor"));
return OPERATOR_RUNNING_MODAL;
}
@@ -3074,7 +3095,7 @@ int WM_gesture_lines_invoke(bContext *C, wmOperator *op, const wmEvent *event)
wm_gesture_tag_redraw(C);
if (RNA_struct_find_property(op->ptr, "cursor") )
- WM_cursor_modal(CTX_wm_window(C), RNA_int_get(op->ptr, "cursor"));
+ WM_cursor_modal_set(CTX_wm_window(C), RNA_int_get(op->ptr, "cursor"));
return OPERATOR_RUNNING_MODAL;
}
@@ -3199,7 +3220,7 @@ const int (*WM_gesture_lasso_path_to_array(bContext *UNUSED(C), wmOperator *op,
int i = 0;
mcords = MEM_mallocN(sizeof(int) * 2 * len, __func__);
- RNA_PROP_BEGIN(op->ptr, itemptr, prop)
+ RNA_PROP_BEGIN (op->ptr, itemptr, prop)
{
float loc[2];
@@ -3225,7 +3246,7 @@ const int (*WM_gesture_lasso_path_to_array(bContext *UNUSED(C), wmOperator *op,
static int gesture_lasso_exec(bContext *C, wmOperator *op)
{
- RNA_BEGIN(op->ptr, itemptr, "path")
+ RNA_BEGIN (op->ptr, itemptr, "path")
{
float loc[2];
@@ -3291,7 +3312,7 @@ int WM_gesture_straightline_invoke(bContext *C, wmOperator *op, const wmEvent *e
wm_gesture_tag_redraw(C);
if (RNA_struct_find_property(op->ptr, "cursor") )
- WM_cursor_modal(CTX_wm_window(C), RNA_int_get(op->ptr, "cursor"));
+ WM_cursor_modal_set(CTX_wm_window(C), RNA_int_get(op->ptr, "cursor"));
return OPERATOR_RUNNING_MODAL;
}
@@ -3385,6 +3406,7 @@ typedef struct {
int initial_mouse[2];
unsigned int gltex;
ListBase orig_paintcursors;
+ bool use_secondary_tex;
void *cursor;
} RadialControl;
@@ -3428,7 +3450,7 @@ static void radial_control_set_tex(RadialControl *rc)
switch (RNA_type_to_ID_code(rc->image_id_ptr.type)) {
case ID_BR:
- if ((ibuf = BKE_brush_gen_radial_control_imbuf(rc->image_id_ptr.data))) {
+ if ((ibuf = BKE_brush_gen_radial_control_imbuf(rc->image_id_ptr.data, rc->use_secondary_tex))) {
glGenTextures(1, &rc->gltex);
glBindTexture(GL_TEXTURE_2D, rc->gltex);
glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, ibuf->x, ibuf->y, 0,
@@ -3701,6 +3723,8 @@ static int radial_control_get_properties(bContext *C, wmOperator *op)
}
}
+ rc->use_secondary_tex = RNA_boolean_get(op->ptr, "secondary_tex");
+
return 1;
}
@@ -3894,6 +3918,7 @@ static void WM_OT_radial_control(wmOperatorType *ot)
RNA_def_string(ot->srna, "fill_color_path", "", 0, "Fill Color Path", "Path of property used to set the fill color of the control");
RNA_def_string(ot->srna, "zoom_path", "", 0, "Zoom Path", "Path of property used to set the zoom level for the control");
RNA_def_string(ot->srna, "image_id", "", 0, "Image ID", "Path of ID that is used to generate an image for the control");
+ RNA_def_boolean(ot->srna, "secondary_tex", 0, "Secondary Texture", "Tweak brush secondary/mask texture");
}
/* ************************** timer for testing ***************** */
@@ -4142,7 +4167,8 @@ void wm_operatortype_free(void)
/* called on initialize WM_init() */
void wm_operatortype_init(void)
{
- global_ops_hash = BLI_ghash_str_new("wm_operatortype_init gh");
+ /* reserve size is set based on blender default setup */
+ global_ops_hash = BLI_ghash_str_new_ex("wm_operatortype_init gh", 2048);
WM_operatortype_append(WM_OT_window_duplicate);
WM_operatortype_append(WM_OT_read_history);
@@ -4259,6 +4285,7 @@ static void gesture_straightline_modal_keymap(wmKeyConfig *keyconf)
/* assign map to operators */
WM_modalkeymap_assign(keymap, "IMAGE_OT_sample_line");
WM_modalkeymap_assign(keymap, "PAINT_OT_weight_gradient");
+ WM_modalkeymap_assign(keymap, "MESH_OT_bisect");
}
diff --git a/source/blender/windowmanager/intern/wm_playanim.c b/source/blender/windowmanager/intern/wm_playanim.c
index e8ab1fef8b7..a02fc75a3fb 100644
--- a/source/blender/windowmanager/intern/wm_playanim.c
+++ b/source/blender/windowmanager/intern/wm_playanim.c
@@ -13,7 +13,7 @@
*
* 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.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
* All rights reserved.
diff --git a/source/blender/windowmanager/intern/wm_subwindow.c b/source/blender/windowmanager/intern/wm_subwindow.c
index 4ad4286b657..ae535ed45e8 100644
--- a/source/blender/windowmanager/intern/wm_subwindow.c
+++ b/source/blender/windowmanager/intern/wm_subwindow.c
@@ -148,6 +148,15 @@ void wm_subwindow_getmatrix(wmWindow *win, int swinid, float mat[4][4])
}
}
+void wm_subwindow_getrect(wmWindow *win, int swinid, rcti *r_rect)
+{
+ wmSubWindow *swin = swin_from_swinid(win, swinid);
+
+ if (swin) {
+ *r_rect = swin->winrct;
+ }
+}
+
/* always sets pixel-precise 2D window/view matrices */
/* coords is in whole pixels. xmin = 15, xmax = 16: means window is 2 pix big */
int wm_subwindow_open(wmWindow *win, rcti *winrct)
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 062107f834e..9e89c17e024 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -114,8 +114,8 @@ void wm_get_screensize(int *width_r, int *height_r)
*height_r = uiheight;
}
-/* size of all screens, useful since the mouse is bound by this */
-void wm_get_screensize_all(int *width_r, int *height_r)
+/* size of all screens (desktop), useful since the mouse is bound by this */
+void wm_get_desktopsize(int *width_r, int *height_r)
{
unsigned int uiwidth;
unsigned int uiheight;
@@ -375,15 +375,15 @@ static void wm_window_add_ghostwindow(const char *title, wmWindow *win)
/* needed so we can detect the graphics card below */
GPU_extensions_init();
- /* set the state*/
- GHOST_SetWindowState(ghostwin, (GHOST_TWindowState)win->windowstate);
-
win->ghostwin = ghostwin;
GHOST_SetWindowUserData(ghostwin, win); /* pointer back */
if (win->eventstate == NULL)
win->eventstate = MEM_callocN(sizeof(wmEvent), "window event state");
+ /* set the state */
+ GHOST_SetWindowState(ghostwin, (GHOST_TWindowState)win->windowstate);
+
/* until screens get drawn, make it nice gray */
glClearColor(0.55, 0.55, 0.55, 0.0);
/* Crash on OSS ATI: bugs.launchpad.net/ubuntu/+source/mesa/+bug/656100 */
@@ -856,7 +856,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr
GHOST_DisposeRectangle(client_rect);
- wm_get_screensize_all(&scr_w, &scr_h);
+ wm_get_desktopsize(&scr_w, &scr_h);
sizex = r - l;
sizey = b - t;
posx = l;
diff --git a/source/blender/windowmanager/wm_subwindow.h b/source/blender/windowmanager/wm_subwindow.h
index 064d00b0723..a70e7765ecf 100644
--- a/source/blender/windowmanager/wm_subwindow.h
+++ b/source/blender/windowmanager/wm_subwindow.h
@@ -45,6 +45,7 @@ void wm_subwindow_position(wmWindow *win, int swinid, rcti *winrct);
void wm_subwindow_getsize(wmWindow *win, int swinid, int *x, int *y);
void wm_subwindow_getorigin(wmWindow *win, int swinid, int *x, int *y);
void wm_subwindow_getmatrix(wmWindow *win, int swinid, float mat[4][4]);
+void wm_subwindow_getrect(wmWindow *win, int swinid, struct rcti *r_rect);
unsigned int index_to_framebuffer(int index);
diff --git a/source/blender/windowmanager/wm_window.h b/source/blender/windowmanager/wm_window.h
index d7e938fec7c..e0639b098a8 100644
--- a/source/blender/windowmanager/wm_window.h
+++ b/source/blender/windowmanager/wm_window.h
@@ -40,7 +40,7 @@ void wm_ghost_init (bContext *C);
void wm_ghost_exit(void);
void wm_get_screensize(int *width_r, int *height_r);
-void wm_get_screensize_all(int *width_r, int *height_r);
+void wm_get_desktopsize(int *width_r, int *height_r);
wmWindow *wm_window_new (bContext *C);
void wm_window_free (bContext *C, wmWindowManager *wm, wmWindow *win);
diff --git a/source/blenderplayer/CMakeLists.txt b/source/blenderplayer/CMakeLists.txt
index d91319d7477..67009bf2c8b 100644
--- a/source/blenderplayer/CMakeLists.txt
+++ b/source/blenderplayer/CMakeLists.txt
@@ -129,6 +129,7 @@ endif()
bf_intern_utfconv
bf_imbuf_cineon
bf_imbuf_openexr
+ bf_imbuf_openimageio
extern_openjpeg
extern_redcode
bf_imbuf_dds
diff --git a/source/blenderplayer/bad_level_call_stubs/stubs.c b/source/blenderplayer/bad_level_call_stubs/stubs.c
index 21502492c05..2af65c763b5 100644
--- a/source/blenderplayer/bad_level_call_stubs/stubs.c
+++ b/source/blenderplayer/bad_level_call_stubs/stubs.c
@@ -85,6 +85,7 @@ struct MetaBall;
struct ModifierData;
struct MovieClip;
struct MultiresModifierData;
+struct HookModifierData;
struct NodeBlurData;
struct Nurb;
struct Object;
@@ -191,7 +192,7 @@ void RE_BlenderFrame(struct Render *re, struct Scene *scene, int frame) {STUB_AS
int RE_WriteEnvmapResult(struct ReportList *reports, struct Scene *scene, struct EnvMap *env, const char *relpath, const char imtype, float layout[12]) {STUB_ASSERT(0); return 0; }
/* rna */
-float *give_cursor(struct Scene *scene, struct View3D *v3d) {STUB_ASSERT(0); return (float *) NULL;}
+float *ED_view3d_cursor3d_get(struct Scene *scene, struct View3D *v3d) {STUB_ASSERT(0); return (float *) NULL;}
void WM_menutype_free(void) {STUB_ASSERT(0);}
void WM_menutype_freelink(struct MenuType *mt) {STUB_ASSERT(0);}
int WM_menutype_add(struct MenuType *mt) {STUB_ASSERT(0); return 0;}
@@ -207,8 +208,11 @@ void WM_jobs_kill_all_except(struct wmWindowManager *wm) {STUB_ASSERT(0);}
char *WM_clipboard_text_get(int selection) {STUB_ASSERT(0); return (char *)0;}
void WM_clipboard_text_set(char *buf, int selection) {STUB_ASSERT(0);}
-void WM_cursor_restore(struct wmWindow *win) {STUB_ASSERT(0);}
-void WM_cursor_time(struct wmWindow *win, int nr) {STUB_ASSERT(0);}
+void WM_cursor_set(struct wmWindow *win, int curor) {STUB_ASSERT(0);}
+void WM_cursor_modal_set(struct wmWindow *win, int curor) {STUB_ASSERT(0);}
+void WM_cursor_modal_restore(struct wmWindow *win) {STUB_ASSERT(0);}
+void WM_cursor_time(struct wmWindow *win, int nr) {STUB_ASSERT(0);}
+void WM_cursor_warp(struct wmWindow *win, int x, int y) {STUB_ASSERT(0);}
void WM_uilisttype_init(void) {STUB_ASSERT(0);}
struct uiListType *WM_uilisttype_find(const char *idname, int quiet) {STUB_ASSERT(0); return (struct uiListType *)NULL;}
@@ -273,6 +277,7 @@ struct wmKeyMap *WM_keymap_list_find(struct ListBase *lb, char *idname, int spac
struct wmKeyConfig *WM_keyconfig_new(struct wmWindowManager *wm, char *idname) {STUB_ASSERT(0); return (struct wmKeyConfig *) NULL;}
struct wmKeyConfig *WM_keyconfig_new_user(struct wmWindowManager *wm, char *idname) {STUB_ASSERT(0); return (struct wmKeyConfig *) NULL;}
void WM_keyconfig_remove(struct wmWindowManager *wm, char *idname) {STUB_ASSERT(0);}
+void WM_keymap_remove(struct wmKeyConfig *keyconf, char *idname) {STUB_ASSERT(0);}
void WM_keyconfig_set_active(struct wmWindowManager *wm, const char *idname) {STUB_ASSERT(0);}
void WM_keymap_remove_item(struct wmKeyMap *keymap, struct wmKeyMapItem *kmi) {STUB_ASSERT(0);}
void WM_keymap_restore_to_default(struct wmKeyMap *keymap) {STUB_ASSERT(0);}
@@ -280,6 +285,7 @@ void WM_keymap_restore_item_to_default(struct bContext *C, struct wmKeyMap *keym
void WM_keymap_properties_reset(struct wmKeyMapItem *kmi) {STUB_ASSERT(0);}
void WM_keyconfig_update_tag(struct wmKeyMap *keymap, struct wmKeyMapItem *kmi) {STUB_ASSERT(0);}
int WM_keymap_item_compare(struct wmKeyMapItem *k1, struct wmKeyMapItem *k2) {STUB_ASSERT(0); return 0;}
+int WM_keymap_map_type_get(struct wmKeyMapItem *kmi) {STUB_ASSERT(0); return 0;}
/* rna editors */
@@ -331,6 +337,7 @@ void ED_view3D_background_image_remove(struct View3D *v3d, struct BGpic *bgpic)
void ED_view3D_background_image_clear(struct View3D *v3d) {STUB_ASSERT(0);}
void ED_view3d_update_viewmat(struct Scene *scene, struct View3D *v3d, struct ARegion *ar, float viewmat[4][4], float winmat[4][4]) {STUB_ASSERT(0);}
float ED_view3d_grid_scale(struct Scene *scene, struct View3D *v3d, const char **grid_unit) {STUB_ASSERT(0); return 0.0f;}
+void ED_view3d_shade_update(struct Main *bmain, struct View3D *v3d, struct ScrArea *sa) {STUB_ASSERT(0);}
void view3d_apply_mat4(float mat[4][4], float *ofs, float *quat, float *dist) {STUB_ASSERT(0);}
int text_file_modified(struct Text *text) {STUB_ASSERT(0); return 0;}
void ED_node_shader_default(struct bContext *C, struct ID *id) {STUB_ASSERT(0);}
@@ -458,7 +465,7 @@ void uiTemplateLayers(struct uiLayout *layout, struct PointerRNA *ptr, char *pro
void uiTemplateImageLayers(struct uiLayout *layout, struct bContext *C, struct Image *ima, struct ImageUser *iuser) {STUB_ASSERT(0);}
void uiTemplateList(struct uiLayout *layout, struct bContext *C, const char *listtype_name, const char *list_id,
PointerRNA *dataptr, const char *propname, PointerRNA *active_dataptr,
- const char *active_propname, int rows, int maxrows, int layout_type) {STUB_ASSERT(0);}
+ const char *active_propname, int rows, int maxrows, int layout_type, int columns) {STUB_ASSERT(0);}
void uiTemplateRunningJobs(struct uiLayout *layout, struct bContext *C) {STUB_ASSERT(0);}
void uiTemplateOperatorSearch(struct uiLayout *layout) {STUB_ASSERT(0);}
void uiTemplateHeader3D(struct uiLayout *layout, struct bContext *C) {STUB_ASSERT(0);}
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 8ff4ec445ea..8e0ba6684ab 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -234,8 +234,16 @@ set(BLENDER_TEXT_FILES
${CMAKE_SOURCE_DIR}/release/text/Python-license.txt
${CMAKE_SOURCE_DIR}/release/text/copyright.txt
${CMAKE_SOURCE_DIR}/release/text/readme.html
+ ${CMAKE_SOURCE_DIR}/release/datafiles/LICENSE-bfont.ttf.txt
)
+if(WITH_INTERNATIONAL)
+ list(APPEND BLENDER_TEXT_FILES
+ ${CMAKE_SOURCE_DIR}/release/datafiles/LICENSE-droidsans.ttf.txt
+ ${CMAKE_SOURCE_DIR}/release/datafiles/LICENSE-bmonofont-i18n.ttf.txt
+ )
+endif()
+
# -----------------------------------------------------------------------------
# Platform Specific Var: TARGETDIR_VER
@@ -904,6 +912,7 @@ endif()
bf_avi
bf_imbuf_cineon
bf_imbuf_openexr
+ bf_imbuf_openimageio
bf_imbuf_dds
bf_collada
bf_intern_bsp
@@ -992,6 +1001,10 @@ endif()
list(APPEND BLENDER_SORTED_LIBS bf_quicktime)
endif()
+ if(WITH_INPUT_NDOF)
+ list(APPEND BLENDER_SORTED_LIBS bf_intern_ghostndof3dconnexion)
+ endif()
+
if(WITH_MOD_BOOLEAN)
list(APPEND BLENDER_SORTED_LIBS extern_carve)
endif()
diff --git a/source/creator/creator.c b/source/creator/creator.c
index a710c07f34b..1596fe5359c 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -76,13 +76,13 @@
#include "BLI_threads.h"
#include "BLI_utildefines.h"
#include "BLI_callbacks.h"
+#include "BLI_blenlib.h"
+#include "BLI_mempool.h"
#include "DNA_ID.h"
#include "DNA_scene_types.h"
#include "DNA_userdef_types.h"
-#include "BLI_blenlib.h"
-
#include "BKE_blender.h"
#include "BKE_brush.h"
#include "BKE_context.h"
@@ -92,6 +92,7 @@
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_material.h"
+#include "BKE_modifier.h"
#include "BKE_packedFile.h"
#include "BKE_scene.h"
#include "BKE_node.h"
@@ -117,8 +118,6 @@
#include "GPU_draw.h"
#include "GPU_extensions.h"
-#include "BLI_scanfill.h" /* for BLI_setErrorCallBack, TODO, move elsewhere */
-
#ifdef WITH_FREESTYLE
# include "FRS_freestyle.h"
#endif
@@ -173,11 +172,12 @@ static int print_version(int argc, const char **argv, void *data);
#endif
/* for the callbacks: */
-
+#ifndef WITH_PYTHON_MODULE
#define BLEND_VERSION_FMT "Blender %d.%02d (sub %d)"
#define BLEND_VERSION_ARG BLENDER_VERSION / 100, BLENDER_VERSION % 100, BLENDER_SUBVERSION
/* pass directly to printf */
#define BLEND_VERSION_STRING_FMT BLEND_VERSION_FMT "\n", BLEND_VERSION_ARG
+#endif
/* Initialize callbacks for the modules that need them */
static void setCallbacks(void);
@@ -300,6 +300,7 @@ static int print_help(int UNUSED(argc), const char **UNUSED(argv), void *data)
#ifdef WITH_LIBMV
BLI_argsPrintArgDoc(ba, "--debug-libmv");
#endif
+ BLI_argsPrintArgDoc(ba, "--debug-memory");
BLI_argsPrintArgDoc(ba, "--debug-jobs");
BLI_argsPrintArgDoc(ba, "--debug-python");
@@ -412,10 +413,13 @@ static int debug_mode(int UNUSED(argc), const char **UNUSED(argv), void *data)
G.debug |= G_DEBUG; /* std output printf's */
printf(BLEND_VERSION_STRING_FMT);
MEM_set_memory_debug();
+#ifdef DEBUG
+ BLI_mempool_set_memory_debug();
+#endif
#ifdef WITH_BUILDINFO
printf("Build: %s %s %s %s\n", build_date, build_time, build_platform, build_type);
-#endif // WITH_BUILDINFO
+#endif
BLI_argsPrint(data);
return 0;
@@ -436,6 +440,12 @@ static int debug_mode_libmv(int UNUSED(argc), const char **UNUSED(argv), void *U
}
#endif
+static int debug_mode_memory(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
+{
+ MEM_set_memory_debug();
+ return 0;
+}
+
static int set_debug_value(int argc, const char **argv, void *UNUSED(data))
{
if (argc > 1) {
@@ -1381,6 +1391,7 @@ static void setupArguments(bContext *C, bArgs *ba, SYS_SystemHandle *syshandle)
#ifdef WITH_LIBMV
BLI_argsAdd(ba, 1, NULL, "--debug-libmv", "\n\tEnable debug messages from libmv library", debug_mode_libmv, NULL);
#endif
+ BLI_argsAdd(ba, 1, NULL, "--debug-memory", "\n\tEnable fully guarded memory allocation and debugging", debug_mode_memory, NULL);
BLI_argsAdd(ba, 1, NULL, "--debug-value", "<value>\n\tSet debug value of <value> on startup\n", set_debug_value, NULL);
BLI_argsAdd(ba, 1, NULL, "--debug-jobs", "\n\tEnable time profiling for background jobs.", debug_mode_generic, (void *)G_DEBUG_JOBS);
@@ -1451,23 +1462,50 @@ int main(int argc, const char **UNUSED(argv_c)) /* Do not mess with const */
int main(int argc, const char **argv)
#endif
{
- bContext *C = CTX_create();
+ bContext *C;
SYS_SystemHandle syshandle;
#ifndef WITH_PYTHON_MODULE
bArgs *ba;
#endif
-#ifdef WIN32
+#ifdef WIN32 /* Win32 Unicode Args */
+ /* NOTE: cannot use guardedalloc malloc here, as it's not yet initialised
+ * (it depends on the args passed in, which is what we're getting here!)
+ */
wchar_t **argv_16 = CommandLineToArgvW(GetCommandLineW(), &argc);
+ char **argv = malloc(argc * sizeof(char *));
int argci = 0;
- char **argv = MEM_mallocN(argc * sizeof(char *), "argv array");
+
for (argci = 0; argci < argc; argci++) {
argv[argci] = alloc_utf_8_from_16(argv_16[argci], 0);
}
+
LocalFree(argv_16);
#endif
+ /* NOTE: Special exception for guarded allocator type switch:
+ * we need to perform switch from lock-free to fully
+ * guarded allocator before any allocation happened.
+ */
+ {
+ int i;
+ for (i = 0; i < argc; i++) {
+ if (STREQ(argv[i], "--debug") || STREQ(argv[i], "-d") ||
+ STREQ(argv[i], "--debug-memory"))
+ {
+ printf("Switching to fully guarded memory allocator.\n");
+ MEM_use_guarded_allocator();
+ break;
+ }
+ else if (STREQ(argv[i], "--")) {
+ break;
+ }
+ }
+ }
+
+ C = CTX_create();
+
#ifdef WITH_PYTHON_MODULE
#ifdef __APPLE__
environ = *_NSGetEnviron();
@@ -1517,6 +1555,7 @@ int main(int argc, const char **argv)
IMB_init();
BKE_images_init();
+ BKE_modifier_init();
BKE_brush_system_init();
@@ -1637,7 +1676,7 @@ int main(int argc, const char **argv)
while (argci) {
free(argv[--argci]);
}
- MEM_freeN(argv);
+ free(argv);
argv = NULL;
#endif
@@ -1682,12 +1721,6 @@ void main_python_exit(void)
}
#endif
-static void error_cb(const char *err)
-{
-
- printf("%s\n", err); /* XXX do this in WM too */
-}
-
static void mem_error_cb(const char *errorStr)
{
fputs(errorStr, stderr);
@@ -1698,9 +1731,4 @@ static void setCallbacks(void)
{
/* Error output from the alloc routines: */
MEM_set_error_callback(mem_error_cb);
-
-
- /* BLI_blenlib: */
-
- BLI_setErrorCallBack(error_cb); /* */
}
diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
index 7b5f5a7096a..484e51c4ed1 100644
--- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
+++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
@@ -266,7 +266,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
bool profile = (SYS_GetCommandLineInt(syshandle, "show_profile", 0) != 0);
bool frameRate = (SYS_GetCommandLineInt(syshandle, "show_framerate", 0) != 0);
bool animation_record = (SYS_GetCommandLineInt(syshandle, "animation_record", 0) != 0);
- bool displaylists = (SYS_GetCommandLineInt(syshandle, "displaylists", 0) != 0);
+ bool displaylists = (SYS_GetCommandLineInt(syshandle, "displaylists", 0) != 0) && GPU_display_list_support();
#ifdef WITH_PYTHON
bool nodepwarnings = (SYS_GetCommandLineInt(syshandle, "ignore_deprecation_warnings", 0) != 0);
#endif
@@ -290,7 +290,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
if (startscene->gm.vsync == VSYNC_ADAPTIVE)
canvas->SetSwapInterval(-1);
else
- canvas->SetSwapInterval(startscene->gm.vsync); // VSYNC_OFF == 0, VSYNC_ON == 1, so this works
+ canvas->SetSwapInterval((startscene->gm.vsync == VSYNC_ON) ? 1 : 0);
RAS_IRenderTools* rendertools = new KX_BlenderRenderTools();
RAS_IRasterizer* rasterizer = NULL;
diff --git a/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp b/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp
index a6b71e0bc43..bcc62a341f8 100644
--- a/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp
+++ b/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp
@@ -211,7 +211,7 @@ void KX_BlenderRenderTools::applyTransform(RAS_IRasterizer* rasty,double* oglmat
MT_Vector3 dir = (campos - objpos).safe_normalized();
MT_Vector3 up(0,0,1.0);
- KX_GameObject* gameobj = (KX_GameObject*)m_clientobject;
+ KX_GameObject* gameobj = (KX_GameObject *)this->m_clientobject;
// get scaling of halo object
MT_Vector3 size = gameobj->GetSGNode()->GetWorldScaling();
@@ -225,7 +225,7 @@ void KX_BlenderRenderTools::applyTransform(RAS_IRasterizer* rasty,double* oglmat
}
MT_Vector3 left = dir.normalized();
- dir = (up.cross(left)).normalized();
+ dir = (left.cross(up)).normalized();
// we have calculated the row vectors, now we keep
// local scaling into account:
@@ -241,14 +241,13 @@ void KX_BlenderRenderTools::applyTransform(RAS_IRasterizer* rasty,double* oglmat
glTranslated(objpos[0],objpos[1],objpos[2]);
glMultMatrixd(maat);
-
}
else {
if (objectdrawmode & RAS_IPolyMaterial::SHADOW)
{
// shadow must be cast to the ground, physics system needed here!
MT_Point3 frompoint(oglmatrix[12],oglmatrix[13],oglmatrix[14]);
- KX_GameObject *gameobj = (KX_GameObject*)m_clientobject;
+ KX_GameObject *gameobj = (KX_GameObject *)this->m_clientobject;
MT_Vector3 direction = MT_Vector3(0,0,-1);
direction.normalize();
@@ -328,7 +327,7 @@ void KX_BlenderRenderTools::RenderText(
RAS_IPolyMaterial* polymat,
float v1[3], float v2[3], float v3[3], float v4[3], int glattrib)
{
- const STR_String& mytext = ((CValue*)m_clientobject)->GetPropertyText("Text");
+ const STR_String &mytext = ((CValue *)m_clientobject)->GetPropertyText("Text");
const unsigned int flag = polymat->GetFlag();
struct MTFace* tface = 0;
@@ -408,3 +407,4 @@ void KX_BlenderRenderTools::MotionBlur(RAS_IRasterizer* rasterizer)
}
}
}
+
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
index 99613f8bd99..b0555abbea4 100644
--- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp
+++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
@@ -2665,7 +2665,8 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
case PARBONE:
{
// parent this to a bone
- Bone *parent_bone = BKE_armature_find_bone_name( (bArmature *)(blenderchild->parent)->data, blenderchild->parsubstr);
+ Bone *parent_bone = BKE_armature_find_bone_name(BKE_armature_from_object(blenderchild->parent),
+ blenderchild->parsubstr);
if (parent_bone) {
KX_BoneParentRelation *bone_parent_relation = KX_BoneParentRelation::New(parent_bone);
@@ -2950,7 +2951,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
struct Object* blenderobj = gameobj->GetBlenderObject();
int layerMask = (groupobj.find(blenderobj) == groupobj.end()) ? activeLayerBitInfo : 0;
bool isInActiveLayer = (blenderobj->lay & layerMask)!=0;
- BL_ConvertActuators(maggie->name, blenderobj,gameobj,logicmgr,kxscene,ketsjiEngine,layerMask,isInActiveLayer,rendertools,converter);
+ BL_ConvertActuators(maggie->name, blenderobj,gameobj,logicmgr,kxscene,ketsjiEngine,layerMask,isInActiveLayer,converter);
}
for ( i=0;i<logicbrick_conversionlist->GetCount();i++)
{
diff --git a/source/gameengine/Converter/BL_ShapeDeformer.cpp b/source/gameengine/Converter/BL_ShapeDeformer.cpp
index 59cf10d326a..5aec3c9e965 100644
--- a/source/gameengine/Converter/BL_ShapeDeformer.cpp
+++ b/source/gameengine/Converter/BL_ShapeDeformer.cpp
@@ -159,16 +159,20 @@ bool BL_ShapeDeformer::Update(void)
/* the key coefficient have been set already, we just need to blend the keys */
Object* blendobj = m_gameobj->GetBlendObject();
- // make sure the vertex weight cache is in line with this object
- m_pMeshObject->CheckWeightCache(blendobj);
-
/* we will blend the key directly in m_transverts array: it is used by armature as the start position */
/* m_key can be NULL in case of Modifier deformer */
if (m_key) {
+ WeightsArrayCache cache = {0, NULL};
+ float **per_keyblock_weights;
+
/* store verts locally */
VerifyStorage();
- BKE_key_evaluate_relative(0, m_bmesh->totvert, m_bmesh->totvert, (char *)(float *)m_transverts, m_key, NULL, 0); /* last arg is ignored */
+ per_keyblock_weights = BKE_keyblock_get_per_block_weights(blendobj, m_key, &cache);
+ BKE_key_evaluate_relative(0, m_bmesh->totvert, m_bmesh->totvert, (char *)(float *)m_transverts,
+ m_key, NULL, per_keyblock_weights, 0); /* last arg is ignored */
+ BKE_keyblock_free_per_block_weights(m_key, per_keyblock_weights, &cache);
+
m_bDynamic = true;
}
diff --git a/source/gameengine/Converter/CMakeLists.txt b/source/gameengine/Converter/CMakeLists.txt
index 084a85c8a1f..9c0d25e56ff 100644
--- a/source/gameengine/Converter/CMakeLists.txt
+++ b/source/gameengine/Converter/CMakeLists.txt
@@ -37,7 +37,6 @@ set(INC
../Physics/common
../Rasterizer
../Rasterizer/RAS_OpenGLRasterizer
- ../Rasterizer/RAS_OpenGLRasterizer
../SceneGraph
../../blender
../../blender/blenkernel
diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp
index 27989983326..e9461a15578 100644
--- a/source/gameengine/Converter/KX_ConvertActuators.cpp
+++ b/source/gameengine/Converter/KX_ConvertActuators.cpp
@@ -120,7 +120,6 @@ void BL_ConvertActuators(const char* maggiename,
KX_KetsjiEngine* ketsjiEngine,
int activeLayerBitInfo,
bool isInActiveLayer,
- RAS_IRenderTools* rendertools,
KX_BlenderSceneConverter* converter
)
{
@@ -206,8 +205,8 @@ void BL_ConvertActuators(const char* maggiename,
case ACT_ACTION:
{
bActionActuator* actact = (bActionActuator*) bact->data;
- STR_String propname = (actact->name ? actact->name : "");
- STR_String propframe = (actact->frameProp ? actact->frameProp : "");
+ STR_String propname = actact->name;
+ STR_String propframe = actact->frameProp;
short ipo_flags = 0;
@@ -242,8 +241,8 @@ void BL_ConvertActuators(const char* maggiename,
{
if (blenderobject->type==OB_MESH) {
bActionActuator* actact = (bActionActuator*) bact->data;
- STR_String propname = (actact->name ? actact->name : "");
- STR_String propframe = (actact->frameProp ? actact->frameProp : "");
+ STR_String propname = actact->name;
+ STR_String propframe = actact->frameProp;
BL_ShapeActionActuator* tmpbaseact = new BL_ShapeActionActuator(
gameobj,
@@ -749,9 +748,8 @@ void BL_ConvertActuators(const char* maggiename,
break;
};
- if (sceneact->scene)
- {
- nextSceneName = sceneact->scene->id.name + 2; // this '2' is necessary to remove prefix 'SC'
+ if (sceneact->scene) {
+ nextSceneName = sceneact->scene->id.name + 2;
}
break;
diff --git a/source/gameengine/Converter/KX_ConvertActuators.h b/source/gameengine/Converter/KX_ConvertActuators.h
index 385d274bf89..688b5db50ce 100644
--- a/source/gameengine/Converter/KX_ConvertActuators.h
+++ b/source/gameengine/Converter/KX_ConvertActuators.h
@@ -40,7 +40,6 @@ void BL_ConvertActuators(const char* maggiename,
class KX_KetsjiEngine* ketsjiEngine,
int activeLayerBitInfo,
bool isInActiveLayer,
- class RAS_IRenderTools* rendertools,
class KX_BlenderSceneConverter* converter);
#endif /* __KX_CONVERTACTUATORS_H__ */
diff --git a/source/gameengine/Converter/KX_ConvertSensors.cpp b/source/gameengine/Converter/KX_ConvertSensors.cpp
index 1aae2738311..3bb12c12cd1 100644
--- a/source/gameengine/Converter/KX_ConvertSensors.cpp
+++ b/source/gameengine/Converter/KX_ConvertSensors.cpp
@@ -194,30 +194,6 @@ void BL_ConvertSensors(struct Object* blenderobject,
break;
}
- case SENS_TOUCH:
- {
- SCA_EventManager* eventmgr = logicmgr->FindEventManager(SCA_EventManager::TOUCH_EVENTMGR);
- if (eventmgr)
- {
- STR_String touchpropertyname;
- bTouchSensor* blendertouchsensor = (bTouchSensor*)sens->data;
-
- if (blendertouchsensor->ma)
- {
- touchpropertyname = (char*) (blendertouchsensor->ma->id.name+2);
- }
- bool bFindMaterial = true;
- if (gameobj->GetPhysicsController())
- {
- gamesensor = new KX_TouchSensor(eventmgr,
- gameobj,
- bFindMaterial,
- false,
- touchpropertyname);
- }
- }
- break;
- }
case SENS_MESSAGE:
{
KX_NetworkEventManager* eventmgr = (KX_NetworkEventManager*)
diff --git a/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp b/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
index 8e729ffd7ae..793ce6a7b83 100644
--- a/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
+++ b/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
@@ -39,6 +39,8 @@
#include "SCA_Joystick.h"
#include "SCA_JoystickPrivate.h"
+#include "BLI_path_util.h"
+
SCA_Joystick::SCA_Joystick(short int index)
:
m_joyindex(index),
@@ -88,14 +90,26 @@ SCA_Joystick *SCA_Joystick::GetInstance( short int joyindex )
if (m_refCount == 0)
{
int i;
+
/* The video subsystem is required for joystick input to work. However,
- * when GHOST is running under SDL, video is initialized elsewhere.
- * Do this once only. */
+ * when GHOST is running under SDL, video is initialized elsewhere. We
+ * also need to set the videodriver to dummy, and do it here to avoid
+ * interfering with addons that may use SDL too.
+ *
+ * We also init SDL once only. */
# ifdef WITH_GHOST_SDL
- if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) == -1 ) {
+ int success = (SDL_InitSubSystem(SDL_INIT_JOYSTICK) != -1 );
# else
- if (SDL_InitSubSystem(SDL_INIT_JOYSTICK | SDL_INIT_VIDEO) == -1 ) {
+ /* set and restore environment variable */
+ char *videodriver = getenv("SDL_VIDEODRIVER");
+ BLI_setenv("SDL_VIDEODRIVER", "dummy");
+
+ int success = (SDL_InitSubSystem(SDL_INIT_JOYSTICK | SDL_INIT_VIDEO) != -1 );
+
+ BLI_setenv("SDL_VIDEODRIVER", videodriver);
# endif
+
+ if (!success) {
JOYSTICK_ECHO("Error-Initializing-SDL: " << SDL_GetError());
return NULL;
}
@@ -278,7 +292,11 @@ void SCA_Joystick::DestroyJoystickDevice(void)
{
#ifdef WITH_SDL
if (m_isinit) {
+#if SDL_VERSION_ATLEAST(2, 0, 0)
+ if (SDL_JoystickGetAttached(m_private->m_joystick)) {
+#else
if (SDL_JoystickOpened(m_joyindex)) {
+#endif
JOYSTICK_ECHO("Closing-joystick " << m_joyindex);
SDL_JoystickClose(m_private->m_joystick);
}
@@ -290,7 +308,12 @@ void SCA_Joystick::DestroyJoystickDevice(void)
int SCA_Joystick::Connected(void)
{
#ifdef WITH_SDL
- if (m_isinit && SDL_JoystickOpened(m_joyindex))
+ if (m_isinit
+#if SDL_VERSION_ATLEAST(2, 0, 0)
+ && SDL_JoystickGetAttached(m_private->m_joystick))
+#else
+ && SDL_JoystickOpened(m_joyindex))
+#endif
return 1;
#endif
return 0;
@@ -328,7 +351,11 @@ int SCA_Joystick::pAxisTest(int axisnum)
const char *SCA_Joystick::GetName()
{
#ifdef WITH_SDL
+#if SDL_VERSION_ATLEAST(2, 0, 0)
+ return SDL_JoystickName(m_private->m_joystick);
+#else
return SDL_JoystickName(m_joyindex);
+#endif
#else /* WITH_SDL */
return "";
#endif /* WITH_SDL */
diff --git a/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp b/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp
index f50137cfcf6..2911b3b1a14 100644
--- a/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp
+++ b/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp
@@ -118,7 +118,7 @@ void SCA_Joystick::HandleEvents(void)
break;
#endif
default:
- printf("SCA_Joystick::HandleEvents, Unknown SDL event, this should not happen\n");
+ printf("SCA_Joystick::HandleEvents, Unknown SDL event (%d), this should not happen\n", sdl_event.type);
break;
}
}
diff --git a/source/gameengine/GameLogic/SCA_IScene.cpp b/source/gameengine/GameLogic/SCA_IScene.cpp
index 60b4d19e155..c98c86639d3 100644
--- a/source/gameengine/GameLogic/SCA_IScene.cpp
+++ b/source/gameengine/GameLogic/SCA_IScene.cpp
@@ -87,7 +87,7 @@ void SCA_IScene::AddDebugProperty(class CValue* debugprop,
void SCA_IScene::RemoveObjectDebugProperties(class CValue* gameobj)
{
vector<SCA_DebugProp*>::iterator it = m_debugList.begin();
- while(it != m_debugList.end()) {
+ while (it != m_debugList.end()) {
CValue* debugobj = (*it)->m_obj;
if (debugobj == gameobj) {
diff --git a/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp b/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp
index e8c29d5aa4f..0d851c4f10d 100644
--- a/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp
+++ b/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp
@@ -66,9 +66,7 @@ unsigned int GPC_RenderTools::m_numgllights;
GPC_RenderTools::GPC_RenderTools()
{
-// XXX m_font = BMF_GetFont(BMF_kHelvetica10);
-
- glGetIntegerv(GL_MAX_LIGHTS, (GLint*) &m_numgllights);
+ glGetIntegerv(GL_MAX_LIGHTS, (GLint *) &m_numgllights);
if (m_numgllights < 8)
m_numgllights = 8;
}
@@ -220,7 +218,7 @@ void GPC_RenderTools::applyTransform(RAS_IRasterizer* rasty,double* oglmatrix,in
MT_Vector3 dir = (campos - objpos).safe_normalized();
MT_Vector3 up(0,0,1.0);
- KX_GameObject* gameobj = (KX_GameObject*) this->m_clientobject;
+ KX_GameObject* gameobj = (KX_GameObject *)this->m_clientobject;
// get scaling of halo object
MT_Vector3 size = gameobj->GetSGNode()->GetWorldScaling();
@@ -256,7 +254,7 @@ void GPC_RenderTools::applyTransform(RAS_IRasterizer* rasty,double* oglmatrix,in
{
// shadow must be cast to the ground, physics system needed here!
MT_Point3 frompoint(oglmatrix[12],oglmatrix[13],oglmatrix[14]);
- KX_GameObject *gameobj = (KX_GameObject*) this->m_clientobject;
+ KX_GameObject *gameobj = (KX_GameObject *)this->m_clientobject;
MT_Vector3 direction = MT_Vector3(0,0,-1);
direction.normalize();
@@ -280,6 +278,12 @@ void GPC_RenderTools::applyTransform(RAS_IRasterizer* rasty,double* oglmatrix,in
// couldn't find something to cast the shadow on...
glMultMatrixd(oglmatrix);
}
+ else
+ { // we found the "ground", but the cast matrix doesn't take
+ // scaling in consideration, so we must apply the object scale
+ MT_Vector3 size = gameobj->GetSGNode()->GetLocalScale();
+ glScalef(size[0], size[1], size[2]);
+ }
} else
{
@@ -490,7 +494,7 @@ void GPC_RenderTools::RenderText(
RAS_IPolyMaterial* polymat,
float v1[3], float v2[3], float v3[3], float v4[3], int glattrib)
{
- STR_String mytext = ((CValue*)m_clientobject)->GetPropertyText("Text");
+ const STR_String &mytext = ((CValue *)m_clientobject)->GetPropertyText("Text");
const unsigned int flag = polymat->GetFlag();
struct MTFace* tface = 0;
@@ -562,8 +566,7 @@ void GPC_RenderTools::MotionBlur(RAS_IRasterizer* rasterizer)
glAccum(GL_LOAD, 1.0);
rasterizer->SetMotionBlurState(2);
}
- else if (motionblurvalue>=0.0 && motionblurvalue<=1.0)
- {
+ else if (motionblurvalue >= 0.0f && motionblurvalue <= 1.0f) {
glAccum(GL_MULT, motionblurvalue);
glAccum(GL_ACCUM, 1-motionblurvalue);
glAccum(GL_RETURN, 1.0);
diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
index c3cbf381af4..c74e3daf7b2 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
@@ -566,7 +566,7 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode)
bool fixed_framerate= (SYS_GetCommandLineInt(syshandle, "fixedtime", (gm->flag & GAME_ENABLE_ALL_FRAMES)) != 0);
bool frameRate = (SYS_GetCommandLineInt(syshandle, "show_framerate", 0) != 0);
- bool useLists = (SYS_GetCommandLineInt(syshandle, "displaylists", gm->flag & GAME_DISPLAY_LISTS) != 0);
+ bool useLists = (SYS_GetCommandLineInt(syshandle, "displaylists", gm->flag & GAME_DISPLAY_LISTS) != 0) && GPU_display_list_support();
bool nodepwarnings = (SYS_GetCommandLineInt(syshandle, "ignore_deprecation_warnings", 1) != 0);
bool restrictAnimFPS = gm->flag & GAME_RESTRICT_ANIM_UPDATES;
@@ -586,7 +586,7 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode)
if (gm->vsync == VSYNC_ADAPTIVE)
m_canvas->SetSwapInterval(-1);
else
- m_canvas->SetSwapInterval(gm->vsync); // VSYNC_OFF == 0, VSYNC_ON == 1, so this works
+ m_canvas->SetSwapInterval((gm->vsync == VSYNC_ON) ? 1 : 0);
m_canvas->Init();
if (gm->flag & GAME_SHOW_MOUSE)
diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
index ccbcdd25639..5bed4fa40b6 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
@@ -57,22 +57,29 @@ extern "C"
{
#endif // __cplusplus
#include "MEM_guardedalloc.h"
+#include "BLI_threads.h"
+#include "BLI_mempool.h"
+#include "BLI_blenlib.h"
+
+#include "DNA_scene_types.h"
+#include "DNA_userdef_types.h"
+
+#include "BLO_readfile.h"
+#include "BLO_runtime.h"
+
#include "BKE_blender.h"
+#include "BKE_depsgraph.h"
#include "BKE_global.h"
#include "BKE_icons.h"
#include "BKE_image.h"
#include "BKE_node.h"
#include "BKE_report.h"
#include "BKE_library.h"
-#include "BLI_threads.h"
-#include "BLI_blenlib.h"
-#include "DNA_scene_types.h"
-#include "DNA_userdef_types.h"
-#include "BLO_readfile.h"
-#include "BLO_runtime.h"
-#include "IMB_imbuf.h"
+#include "BKE_modifier.h"
#include "BKE_text.h"
#include "BKE_sound.h"
+
+#include "IMB_imbuf.h"
int GHOST_HACK_getFirstFile(char buf[]);
@@ -456,6 +463,7 @@ int main(int argc, char** argv)
IMB_init();
BKE_images_init();
+ BKE_modifier_init();
#ifdef WITH_FFMPEG
IMB_ffmpeg_init();
@@ -577,8 +585,11 @@ int main(int argc, char** argv)
case 'd':
i++;
- G.debug |= G_DEBUG; /* std output printf's */
+ G.debug |= G_DEBUG;
MEM_set_memory_debug();
+#ifdef DEBUG
+ BLI_mempool_set_memory_debug();
+#endif
break;
case 'f':
diff --git a/source/gameengine/Ketsji/BL_ActionManager.h b/source/gameengine/Ketsji/BL_ActionManager.h
index 88aa241b6ce..8c5b8e909da 100644
--- a/source/gameengine/Ketsji/BL_ActionManager.h
+++ b/source/gameengine/Ketsji/BL_ActionManager.h
@@ -27,6 +27,10 @@
#ifndef __BL_ACTIONMANAGER_H__
#define __BL_ACTIONMANAGER_H__
+#ifdef WITH_CXX_GUARDEDALLOC
+ #include "MEM_guardedalloc.h"
+#endif
+
#define MAX_ACTION_LAYERS 8
class BL_Action;
diff --git a/source/gameengine/Ketsji/BL_BlenderShader.cpp b/source/gameengine/Ketsji/BL_BlenderShader.cpp
index 97dc8f72aec..6f6925dcf76 100644
--- a/source/gameengine/Ketsji/BL_BlenderShader.cpp
+++ b/source/gameengine/Ketsji/BL_BlenderShader.cpp
@@ -44,7 +44,6 @@
BL_BlenderShader::BL_BlenderShader(KX_Scene *scene, struct Material *ma, int lightlayer)
:
- mScene(scene),
mMat(ma),
mLightLayer(lightlayer),
mGPUMat(NULL)
diff --git a/source/gameengine/Ketsji/BL_BlenderShader.h b/source/gameengine/Ketsji/BL_BlenderShader.h
index 71f66c2a49d..e03bb5a11d9 100644
--- a/source/gameengine/Ketsji/BL_BlenderShader.h
+++ b/source/gameengine/Ketsji/BL_BlenderShader.h
@@ -57,7 +57,6 @@ class BL_Material;
class BL_BlenderShader
{
private:
- KX_Scene *mScene;
struct Scene *mBlenderScene;
struct Material *mMat;
int mLightLayer;
@@ -86,13 +85,6 @@ public:
void ReloadMaterial();
int GetAlphaBlend();
- void SetScene(KX_Scene *scene)
- {
- mScene = scene;
- mBlenderScene = scene->GetBlenderScene();
- ReloadMaterial();
- }
-
bool Equals(BL_BlenderShader *blshader);
diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
index 28abdc898ae..e5b8159753b 100644
--- a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
+++ b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
@@ -808,9 +808,7 @@ void KX_BlenderMaterial::UpdateIPO(
void KX_BlenderMaterial::Replace_IScene(SCA_IScene *val)
{
mScene= static_cast<KX_Scene *>(val);
- if (mBlenderShader)
- mBlenderShader->SetScene(mScene);
-
+
OnConstruction();
}
@@ -970,7 +968,7 @@ KX_PYMETHODDEF_DOC( KX_BlenderMaterial, setTexture , "setTexture( index, tex)")
return NULL;
}
-static unsigned int GL_array[11] = {
+static const unsigned int GL_array[11] = {
GL_ZERO,
GL_ONE,
GL_SRC_COLOR,
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp
index e0ec4983739..e06f7ab6633 100644
--- a/source/gameengine/Ketsji/KX_GameObject.cpp
+++ b/source/gameengine/Ketsji/KX_GameObject.cpp
@@ -114,8 +114,10 @@ KX_GameObject::KX_GameObject(
m_pDupliGroupObject(NULL),
m_actionManager(NULL),
m_isDeformable(false)
+
#ifdef WITH_PYTHON
- , m_attr_dict(NULL)
+ , m_attr_dict(NULL),
+ m_collisionCallbacks(NULL)
#endif
{
m_ignore_activity_culling = false;
@@ -133,6 +135,20 @@ KX_GameObject::KX_GameObject(
KX_GameObject::~KX_GameObject()
{
+#ifdef WITH_PYTHON
+ if (m_attr_dict) {
+ PyDict_Clear(m_attr_dict); /* in case of circular refs or other weird cases */
+ /* Py_CLEAR: Py_DECREF's and NULL's */
+ Py_CLEAR(m_attr_dict);
+ }
+ // Unregister collision callbacks
+ // Do this before we start freeing physics information like m_pClient_info
+ if (m_collisionCallbacks){
+ UnregisterCollisionCallbacks();
+ Py_CLEAR(m_collisionCallbacks);
+ }
+#endif // WITH_PYTHON
+
RemoveMeshes();
// is this delete somewhere ?
@@ -180,13 +196,6 @@ KX_GameObject::~KX_GameObject()
{
m_pInstanceObjects->Release();
}
-#ifdef WITH_PYTHON
- if (m_attr_dict) {
- PyDict_Clear(m_attr_dict); /* in case of circular refs or other weird cases */
- /* Py_CLEAR: Py_DECREF's and NULL's */
- Py_CLEAR(m_attr_dict);
- }
-#endif // WITH_PYTHON
}
KX_GameObject* KX_GameObject::GetClientObject(KX_ClientObjectInfo *info)
@@ -1336,6 +1345,77 @@ const MT_Point3& KX_GameObject::NodeGetLocalPosition() const
}
+void KX_GameObject::UnregisterCollisionCallbacks()
+{
+ if (!GetPhysicsController()) {
+ printf("Warning, trying to unregister collision callbacks for object without collisions: %s!\n", GetName().ReadPtr());
+ return;
+ }
+
+ // Unregister from callbacks
+ KX_Scene* scene = GetScene();
+ PHY_IPhysicsEnvironment* pe = scene->GetPhysicsEnvironment();
+ PHY_IPhysicsController* spc = static_cast<PHY_IPhysicsController*> (GetPhysicsController()->GetUserData());
+ // If we are the last to unregister on this physics controller
+ if (pe->removeCollisionCallback(spc)){
+ // If we are a sensor object
+ if (m_pClient_info->isSensor())
+ // Remove sensor body from physics world
+ pe->removeSensor(spc);
+ }
+}
+
+void KX_GameObject::RegisterCollisionCallbacks()
+{
+ if (!GetPhysicsController()) {
+ printf("Warning, trying to register collision callbacks for object without collisions: %s!\n", GetName().ReadPtr());
+ return;
+ }
+
+ // Register from callbacks
+ KX_Scene* scene = GetScene();
+ PHY_IPhysicsEnvironment* pe = scene->GetPhysicsEnvironment();
+ PHY_IPhysicsController* spc = static_cast<PHY_IPhysicsController*> (GetPhysicsController()->GetUserData());
+ // If we are the first to register on this physics controller
+ if (pe->requestCollisionCallback(spc)){
+ // If we are a sensor object
+ if (m_pClient_info->isSensor())
+ // Add sensor body to physics world
+ pe->addSensor(spc);
+ }
+}
+void KX_GameObject::RunCollisionCallbacks(KX_GameObject *collider)
+{
+ #ifdef WITH_PYTHON
+ Py_ssize_t len;
+ PyObject* collision_callbacks = m_collisionCallbacks;
+
+ if (collision_callbacks && (len=PyList_GET_SIZE(collision_callbacks)))
+ {
+ PyObject* args = Py_BuildValue("(O)", collider->GetProxy()); // save python creating each call
+ PyObject *func;
+ PyObject *ret;
+
+ // Iterate the list and run the callbacks
+ for (Py_ssize_t pos=0; pos < len; pos++)
+ {
+ func = PyList_GET_ITEM(collision_callbacks, pos);
+ ret = PyObject_Call(func, args, NULL);
+
+ if (ret == NULL) {
+ PyErr_Print();
+ PyErr_Clear();
+ }
+ else {
+ Py_DECREF(ret);
+ }
+ }
+
+ Py_DECREF(args);
+ }
+ #endif
+}
+
/* Suspend/ resume: for the dynamic behavior, there is a simple
* method. For the residual motion, there is not. I wonder what the
* correct solution is for Sumo. Remove from the motion-update tree?
@@ -1716,6 +1796,7 @@ PyAttributeDef KX_GameObject::Attributes[] = {
KX_PYATTRIBUTE_RW_FUNCTION("orientation",KX_GameObject,pyattr_get_worldOrientation,pyattr_set_localOrientation),
KX_PYATTRIBUTE_RW_FUNCTION("scaling", KX_GameObject, pyattr_get_worldScaling, pyattr_set_localScaling),
KX_PYATTRIBUTE_RW_FUNCTION("timeOffset",KX_GameObject, pyattr_get_timeOffset,pyattr_set_timeOffset),
+ KX_PYATTRIBUTE_RW_FUNCTION("collisionCallbacks", KX_GameObject, pyattr_get_collisionCallbacks, pyattr_set_collisionCallbacks),
KX_PYATTRIBUTE_RW_FUNCTION("state", KX_GameObject, pyattr_get_state, pyattr_set_state),
KX_PYATTRIBUTE_RO_FUNCTION("meshes", KX_GameObject, pyattr_get_meshes),
KX_PYATTRIBUTE_RW_FUNCTION("localOrientation",KX_GameObject,pyattr_get_localOrientation,pyattr_set_localOrientation),
@@ -2008,6 +2089,51 @@ PyObject *KX_GameObject::pyattr_get_group_members(void *self_v, const KX_PYATTRI
Py_RETURN_NONE;
}
+PyObject* KX_GameObject::pyattr_get_collisionCallbacks(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
+{
+ KX_GameObject* self = static_cast<KX_GameObject*>(self_v);
+
+ // Only objects with a physics controller should have collision callbacks
+ if (!self->GetPhysicsController()) {
+ PyErr_SetString(PyExc_AttributeError, "KX_GameObject.collisionCallbacks: attribute only available for objects with collisions enabled");
+ return NULL;
+ }
+
+ // Return the existing callbacks
+ if (self->m_collisionCallbacks == NULL)
+ {
+ self->m_collisionCallbacks = PyList_New(0);
+ // Subscribe to collision update from KX_TouchManager
+ self->RegisterCollisionCallbacks();
+ }
+ Py_INCREF(self->m_collisionCallbacks);
+ return self->m_collisionCallbacks;
+}
+
+int KX_GameObject::pyattr_set_collisionCallbacks(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value)
+{
+ KX_GameObject* self = static_cast<KX_GameObject*>(self_v);
+
+ // Only objects with a physics controller should have collision callbacks
+ if (!self->GetPhysicsController()) {
+ PyErr_SetString(PyExc_AttributeError, "KX_GameObject.collisionCallbacks: attribute only available for objects with collisions enabled");
+ return PY_SET_ATTR_FAIL;
+ }
+
+ if (!PyList_CheckExact(value))
+ {
+ PyErr_SetString(PyExc_ValueError, "Expected a list");
+ return PY_SET_ATTR_FAIL;
+ }
+
+ Py_XDECREF(self->m_collisionCallbacks);
+ Py_INCREF(value);
+
+ self->m_collisionCallbacks = value;
+
+ return PY_SET_ATTR_SUCCESS;
+}
+
PyObject* KX_GameObject::pyattr_get_scene(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
KX_GameObject *self = static_cast<KX_GameObject*>(self_v);
diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h
index 5a3b9df74ee..dde3ff53299 100644
--- a/source/gameengine/Ketsji/KX_GameObject.h
+++ b/source/gameengine/Ketsji/KX_GameObject.h
@@ -137,21 +137,22 @@ public:
#ifdef WITH_PYTHON
// Python attributes that wont convert into CValue
- //
+ //
// there are 2 places attributes can be stored, in the CValue,
// where attributes are converted into BGE's CValue types
// these can be used with property actuators
//
// For the python API, For types that cannot be converted into CValues (lists, dicts, GameObjects)
// these will be put into "m_attr_dict", logic bricks cannot access them.
- //
+ //
// rules for setting attributes.
- //
+ //
// * there should NEVER be a CValue and a m_attr_dict attribute with matching names. get/sets make sure of this.
// * if CValue conversion fails, use a PyObject in "m_attr_dict"
// * when assigning a value, first see if it can be a CValue, if it can remove the "m_attr_dict" and set the CValue
- //
- PyObject* m_attr_dict;
+ //
+ PyObject* m_attr_dict;
+ PyObject* m_collisionCallbacks;
#endif
virtual void /* This function should be virtual - derived classed override it */
@@ -872,6 +873,9 @@ public:
* \section Logic bubbling methods.
*/
+ void RegisterCollisionCallbacks();
+ void UnregisterCollisionCallbacks();
+ void RunCollisionCallbacks(KX_GameObject *collider);
/**
* Stop making progress
*/
@@ -1040,6 +1044,8 @@ public:
static PyObject* pyattr_get_attrDict(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static PyObject* pyattr_get_obcolor(void *selv_v, const KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_set_obcolor(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
+ static PyObject* pyattr_get_collisionCallbacks(void *selv_v, const KX_PYATTRIBUTE_DEF *attrdef);
+ static int pyattr_set_collisionCallbacks(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
/* Experimental! */
static PyObject* pyattr_get_sensors(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
index 32666ec0792..c685dcfe068 100644
--- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
+++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
@@ -1201,6 +1201,7 @@ void KX_KetsjiEngine::RenderShadowBuffers(KX_Scene *scene)
/* render */
m_rasterizer->ClearDepthBuffer();
+ m_rasterizer->ClearColorBuffer();
scene->RenderBuckets(camtrans, m_rasterizer, m_rendertools);
/* unbind framebuffer object, restore drawmode, free camera */
diff --git a/source/gameengine/Ketsji/KX_Light.cpp b/source/gameengine/Ketsji/KX_Light.cpp
index a8f309cc592..0e4db0d351e 100644
--- a/source/gameengine/Ketsji/KX_Light.cpp
+++ b/source/gameengine/Ketsji/KX_Light.cpp
@@ -48,6 +48,9 @@
#include "DNA_scene_types.h"
#include "DNA_lamp_types.h"
#include "GPU_material.h"
+
+#include "BKE_scene.h"
+#include "MEM_guardedalloc.h"
KX_LightObject::KX_LightObject(void* sgReplicationInfo,SG_Callbacks callbacks,
class RAS_IRenderTools* rendertools,
@@ -62,6 +65,7 @@ KX_LightObject::KX_LightObject(void* sgReplicationInfo,SG_Callbacks callbacks,
m_rendertools->AddLight(&m_lightobj);
m_glsl = glsl;
m_blenderscene = ((KX_Scene*)sgReplicationInfo)->GetBlenderScene();
+ m_base = NULL;
};
@@ -78,6 +82,11 @@ KX_LightObject::~KX_LightObject()
}
m_rendertools->RemoveLight(&m_lightobj);
+
+ if (m_base) {
+ BKE_scene_base_unlink(m_blenderscene, m_base);
+ MEM_freeN(m_base);
+ }
}
@@ -216,6 +225,13 @@ void KX_LightObject::Update()
}
}
+void KX_LightObject::UpdateScene(KX_Scene *kxscene)
+{
+ m_lightobj.m_scene = (void*)kxscene;
+ m_blenderscene = kxscene->GetBlenderScene();
+ m_base = BKE_scene_base_add(m_blenderscene, GetBlenderObject());
+}
+
bool KX_LightObject::HasShadowBuffer()
{
GPULamp *lamp;
diff --git a/source/gameengine/Ketsji/KX_Light.h b/source/gameengine/Ketsji/KX_Light.h
index f88fc7f6a1b..43421a3faf3 100644
--- a/source/gameengine/Ketsji/KX_Light.h
+++ b/source/gameengine/Ketsji/KX_Light.h
@@ -37,6 +37,7 @@
struct GPULamp;
struct Scene;
+struct Base;
class KX_Camera;
class RAS_IRasterizer;
class RAS_IRenderTools;
@@ -50,6 +51,7 @@ protected:
class RAS_IRenderTools* m_rendertools; //needed for registering and replication of lightobj
bool m_glsl;
Scene* m_blenderscene;
+ Base* m_base;
public:
KX_LightObject(void* sgReplicationInfo,SG_Callbacks callbacks,class RAS_IRenderTools* rendertools,const struct RAS_LightObject& lightobj, bool glsl);
@@ -69,7 +71,7 @@ public:
struct Image *GetTextureImage(short texslot);
void Update();
- void UpdateScene(class KX_Scene *kxscene) {m_lightobj.m_scene = (void*)kxscene;}
+ void UpdateScene(class KX_Scene *kxscene);
virtual int GetGameObjectType() { return OBJ_LIGHT; }
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp
index ae9cbbb2656..29f28b7cc24 100644
--- a/source/gameengine/Ketsji/KX_PythonInit.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInit.cpp
@@ -1378,14 +1378,14 @@ static PyObject *gPySetVsync(PyObject *, PyObject *args)
if (!PyArg_ParseTuple(args, "i:setVsync", &interval))
return NULL;
- if (interval < VSYNC_OFF || interval > VSYNC_ADAPTIVE) {
+ if (interval < 0 || interval > VSYNC_ADAPTIVE) {
PyErr_SetString(PyExc_ValueError, "Rasterizer.setVsync(value): value must be VSYNC_OFF, VSYNC_ON, or VSYNC_ADAPTIVE");
return NULL;
}
if (interval == VSYNC_ADAPTIVE)
interval = -1;
- gp_Canvas->SetSwapInterval(interval);
+ gp_Canvas->SetSwapInterval((interval == VSYNC_ON) ? 1 : 0);
Py_RETURN_NONE;
}
@@ -1675,16 +1675,16 @@ PyObject *initGameLogic(KX_KetsjiEngine *engine, KX_Scene* scene) // quick hack
KX_MACRO_addTypesToDict(d, KX_RADAR_AXIS_POS_X, KX_RadarSensor::KX_RADAR_AXIS_POS_X);
KX_MACRO_addTypesToDict(d, KX_RADAR_AXIS_POS_Y, KX_RadarSensor::KX_RADAR_AXIS_POS_Y);
KX_MACRO_addTypesToDict(d, KX_RADAR_AXIS_POS_Z, KX_RadarSensor::KX_RADAR_AXIS_POS_Z);
- KX_MACRO_addTypesToDict(d, KX_RADAR_AXIS_NEG_X, KX_RadarSensor::KX_RADAR_AXIS_NEG_Y);
- KX_MACRO_addTypesToDict(d, KX_RADAR_AXIS_NEG_Y, KX_RadarSensor::KX_RADAR_AXIS_NEG_X);
+ KX_MACRO_addTypesToDict(d, KX_RADAR_AXIS_NEG_X, KX_RadarSensor::KX_RADAR_AXIS_NEG_X);
+ KX_MACRO_addTypesToDict(d, KX_RADAR_AXIS_NEG_Y, KX_RadarSensor::KX_RADAR_AXIS_NEG_Y);
KX_MACRO_addTypesToDict(d, KX_RADAR_AXIS_NEG_Z, KX_RadarSensor::KX_RADAR_AXIS_NEG_Z);
/* Ray Sensor */
KX_MACRO_addTypesToDict(d, KX_RAY_AXIS_POS_X, KX_RaySensor::KX_RAY_AXIS_POS_X);
KX_MACRO_addTypesToDict(d, KX_RAY_AXIS_POS_Y, KX_RaySensor::KX_RAY_AXIS_POS_Y);
KX_MACRO_addTypesToDict(d, KX_RAY_AXIS_POS_Z, KX_RaySensor::KX_RAY_AXIS_POS_Z);
- KX_MACRO_addTypesToDict(d, KX_RAY_AXIS_NEG_X, KX_RaySensor::KX_RAY_AXIS_NEG_Y);
- KX_MACRO_addTypesToDict(d, KX_RAY_AXIS_NEG_Y, KX_RaySensor::KX_RAY_AXIS_NEG_X);
+ KX_MACRO_addTypesToDict(d, KX_RAY_AXIS_NEG_X, KX_RaySensor::KX_RAY_AXIS_NEG_X);
+ KX_MACRO_addTypesToDict(d, KX_RAY_AXIS_NEG_Y, KX_RaySensor::KX_RAY_AXIS_NEG_Y);
KX_MACRO_addTypesToDict(d, KX_RAY_AXIS_NEG_Z, KX_RaySensor::KX_RAY_AXIS_NEG_Z);
/* Dynamic actuator */
diff --git a/source/gameengine/Ketsji/KX_RaySensor.h b/source/gameengine/Ketsji/KX_RaySensor.h
index 9d40fb55747..ca14867e892 100644
--- a/source/gameengine/Ketsji/KX_RaySensor.h
+++ b/source/gameengine/Ketsji/KX_RaySensor.h
@@ -83,8 +83,8 @@ public:
//Python Interface
enum RayAxis {
- KX_RAY_AXIS_POS_Y = 0,
- KX_RAY_AXIS_POS_X,
+ KX_RAY_AXIS_POS_X = 0,
+ KX_RAY_AXIS_POS_Y,
KX_RAY_AXIS_POS_Z,
KX_RAY_AXIS_NEG_X,
KX_RAY_AXIS_NEG_Y,
diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp
index 35084061ab0..4fa51b48ab8 100644
--- a/source/gameengine/Ketsji/KX_Scene.cpp
+++ b/source/gameengine/Ketsji/KX_Scene.cpp
@@ -445,7 +445,7 @@ void KX_Scene::AddObjectDebugProperties(class KX_GameObject* gameobj)
Object* blenderobject = gameobj->GetBlenderObject();
bProperty* prop = (bProperty*)blenderobject->prop.first;
- while(prop) {
+ while (prop) {
if (prop->flag & PROP_DEBUG)
AddDebugProperty(gameobj,STR_String(prop->name));
prop = prop->next;
@@ -1953,8 +1953,6 @@ bool KX_Scene::MergeScene(KX_Scene *other)
GetBucketManager()->MergeBucketManager(other->GetBucketManager(), this);
- /* move materials across, assume they both use the same scene-converters */
- GetSceneConverter()->MergeScene(this, other);
/* active + inactive == all ??? - lets hope so */
for (int i = 0; i < other->GetObjectList()->GetCount(); i++)
@@ -1991,7 +1989,12 @@ bool KX_Scene::MergeScene(KX_Scene *other)
if (env) /* bullet scene? - dummy scenes don't need touching */
env->MergeEnvironment(env_other);
#endif
-
+
+ /* move materials across, assume they both use the same scene-converters
+ * Do this after lights are merged so materials can use the lights in shaders
+ */
+ GetSceneConverter()->MergeScene(this, other);
+
/* merge logic */
{
SCA_LogicManager *logicmgr= GetLogicManager();
diff --git a/source/gameengine/Ketsji/KX_TouchEventManager.cpp b/source/gameengine/Ketsji/KX_TouchEventManager.cpp
index 96872f4e6fd..1a9e1442cc8 100644
--- a/source/gameengine/Ketsji/KX_TouchEventManager.cpp
+++ b/source/gameengine/Ketsji/KX_TouchEventManager.cpp
@@ -81,28 +81,42 @@ bool KX_TouchEventManager::newBroadphaseResponse(void *client_data,
void *object2,
const PHY_CollData *coll_data)
{
- PHY_IPhysicsController* ctrl = static_cast<PHY_IPhysicsController*>(object1);
- KX_ClientObjectInfo *info = (ctrl) ? static_cast<KX_ClientObjectInfo*>(ctrl->getNewClientInfo()) : NULL;
+ PHY_IPhysicsController* ctrl1 = static_cast<PHY_IPhysicsController*>(object1);
+ PHY_IPhysicsController* ctrl2 = static_cast<PHY_IPhysicsController*>(object2);
+
+ KX_ClientObjectInfo *info1 = (ctrl1) ? static_cast<KX_ClientObjectInfo*>(ctrl1->getNewClientInfo()) : NULL;
+ KX_ClientObjectInfo *info2 = (ctrl1) ? static_cast<KX_ClientObjectInfo*>(ctrl2->getNewClientInfo()) : NULL;
+
// This call back should only be called for controllers of Near and Radar sensor
- if (!info)
+ if (!info1)
return true;
- switch (info->m_type)
+ // Get KX_GameObjects for callbacks
+ KX_GameObject* gobj1 = info1->m_gameobject;
+ KX_GameObject* gobj2 = (info2) ? info2->m_gameobject : NULL;
+
+ bool has_py_callbacks = false;
+
+ // Consider callbacks for broadphase inclusion if it's a sensor object type
+ if (gobj1 && gobj2)
+ has_py_callbacks = gobj1->m_collisionCallbacks || gobj2->m_collisionCallbacks;
+
+ switch (info1->m_type)
{
case KX_ClientObjectInfo::SENSOR:
- if (info->m_sensors.size() == 1)
+ if (info1->m_sensors.size() == 1)
{
// only one sensor for this type of object
- KX_TouchSensor* touchsensor = static_cast<KX_TouchSensor*>(*info->m_sensors.begin());
- return touchsensor->BroadPhaseFilterCollision(object1,object2);
+ KX_TouchSensor* touchsensor = static_cast<KX_TouchSensor*>(*info1->m_sensors.begin());
+ return touchsensor->BroadPhaseFilterCollision(object1, object2);
}
break;
case KX_ClientObjectInfo::OBSENSOR:
case KX_ClientObjectInfo::OBACTORSENSOR:
// this object may have multiple collision sensors,
// check is any of them is interested in this object
- for (std::list<SCA_ISensor*>::iterator it = info->m_sensors.begin();
- it != info->m_sensors.end();
+ for (std::list<SCA_ISensor*>::iterator it = info1->m_sensors.begin();
+ it != info1->m_sensors.end();
++it)
{
if ((*it)->GetSensorType() == SCA_ISensor::ST_TOUCH)
@@ -112,7 +126,8 @@ bool KX_TouchEventManager::newBroadphaseResponse(void *client_data,
return true;
}
}
- return false;
+
+ return has_py_callbacks;
// quiet the compiler
case KX_ClientObjectInfo::STATIC:
@@ -155,32 +170,43 @@ void KX_TouchEventManager::EndFrame()
void KX_TouchEventManager::NextFrame()
{
- if (!m_sensors.Empty())
- {
SG_DList::iterator<KX_TouchSensor> it(m_sensors);
for (it.begin();!it.end();++it)
(*it)->SynchronizeTransform();
for (std::set<NewCollision>::iterator cit = m_newCollisions.begin(); cit != m_newCollisions.end(); ++cit)
{
+ // Controllers
PHY_IPhysicsController* ctrl1 = (*cit).first;
-// PHY_IPhysicsController* ctrl2 = (*cit).second;
-// KX_GameObject* gameOb1 = ctrl1->getClientInfo();
-// KX_GameObject* gameOb1 = ctrl1->getClientInfo();
+ PHY_IPhysicsController* ctrl2 = (*cit).second;
- KX_ClientObjectInfo *client_info = static_cast<KX_ClientObjectInfo *>(ctrl1->getNewClientInfo());
+ // Sensor iterator
list<SCA_ISensor*>::iterator sit;
+
+ // First client info
+ KX_ClientObjectInfo *client_info = static_cast<KX_ClientObjectInfo*>(ctrl1->getNewClientInfo());
+ // First gameobject
+ KX_GameObject *kxObj1 = KX_GameObject::GetClientObject(client_info);
+ // Invoke sensor response for each object
if (client_info) {
for ( sit = client_info->m_sensors.begin(); sit != client_info->m_sensors.end(); ++sit) {
- static_cast<KX_TouchSensor*>(*sit)->NewHandleCollision((*cit).first, (*cit).second, NULL);
+ static_cast<KX_TouchSensor*>(*sit)->NewHandleCollision(ctrl1, ctrl2, NULL);
}
}
- client_info = static_cast<KX_ClientObjectInfo *>((*cit).second->getNewClientInfo());
+
+ // Second client info
+ client_info = static_cast<KX_ClientObjectInfo *>(ctrl2->getNewClientInfo());
+ // Second gameobject
+ KX_GameObject *kxObj2 = KX_GameObject::GetClientObject(client_info);
if (client_info) {
for ( sit = client_info->m_sensors.begin(); sit != client_info->m_sensors.end(); ++sit) {
- static_cast<KX_TouchSensor*>(*sit)->NewHandleCollision((*cit).second, (*cit).first, NULL);
+ static_cast<KX_TouchSensor*>(*sit)->NewHandleCollision(ctrl2, ctrl1, NULL);
}
}
+ // Run python callbacks
+ kxObj1->RunCollisionCallbacks(kxObj2);
+ kxObj2->RunCollisionCallbacks(kxObj1);
+
}
m_newCollisions.clear();
@@ -188,4 +214,3 @@ void KX_TouchEventManager::NextFrame()
for (it.begin();!it.end();++it)
(*it)->Activate(m_logicmgr);
}
-}
diff --git a/source/gameengine/Rasterizer/RAS_BucketManager.cpp b/source/gameengine/Rasterizer/RAS_BucketManager.cpp
index 7d1190bef5c..713d324bf17 100644
--- a/source/gameengine/Rasterizer/RAS_BucketManager.cpp
+++ b/source/gameengine/Rasterizer/RAS_BucketManager.cpp
@@ -378,17 +378,10 @@ void RAS_BucketManager::MergeBucketManager(RAS_BucketManager *other, SCA_IScene
{
/* concatinate lists */
// printf("BEFORE %d %d\n", GetSolidBuckets().size(), GetAlphaBuckets().size());
- BucketList::iterator it;
-
- for (it = other->GetSolidBuckets().begin(); it != other->GetSolidBuckets().end(); ++it)
- (*it)->GetPolyMaterial()->Replace_IScene(scene);
GetSolidBuckets().insert( GetSolidBuckets().end(), other->GetSolidBuckets().begin(), other->GetSolidBuckets().end() );
other->GetSolidBuckets().clear();
- for (it = other->GetAlphaBuckets().begin(); it != other->GetAlphaBuckets().end(); ++it)
- (*it)->GetPolyMaterial()->Replace_IScene(scene);
-
GetAlphaBuckets().insert( GetAlphaBuckets().end(), other->GetAlphaBuckets().begin(), other->GetAlphaBuckets().end() );
other->GetAlphaBuckets().clear();
//printf("AFTER %d %d\n", GetSolidBuckets().size(), GetAlphaBuckets().size());
diff --git a/source/gameengine/Rasterizer/RAS_MeshObject.cpp b/source/gameengine/Rasterizer/RAS_MeshObject.cpp
index 2af71c5efa9..8a9672f0092 100644
--- a/source/gameengine/Rasterizer/RAS_MeshObject.cpp
+++ b/source/gameengine/Rasterizer/RAS_MeshObject.cpp
@@ -125,17 +125,6 @@ RAS_MeshObject::~RAS_MeshObject()
{
vector<RAS_Polygon*>::iterator it;
- if (m_mesh && m_mesh->key)
- {
- KeyBlock *kb;
- // remove the weight cache to avoid memory leak
- for (kb = (KeyBlock *)m_mesh->key->block.first; kb; kb = (KeyBlock *)kb->next) {
- if (kb->weights)
- MEM_freeN(kb->weights);
- kb->weights= NULL;
- }
- }
-
for (it=m_Polygons.begin(); it!=m_Polygons.end(); it++)
delete (*it);
@@ -559,61 +548,3 @@ void RAS_MeshObject::SchedulePolygons(int drawingmode)
m_bMeshModified = true;
}
}
-
-static int get_def_index(Object* ob, const char* vgroup)
-{
- bDeformGroup *curdef;
- int index = 0;
-
- for (curdef = (bDeformGroup*)ob->defbase.first; curdef; curdef=(bDeformGroup*)curdef->next, index++)
- if (!strcmp(curdef->name, vgroup))
- return index;
-
- return -1;
-}
-
-void RAS_MeshObject::CheckWeightCache(Object* obj)
-{
- KeyBlock *kb;
- int kbindex, defindex;
- MDeformVert *dv= NULL;
- int totvert, i;
- float *weights;
-
- if (!m_mesh->key)
- return;
-
- for (kbindex = 0, kb = (KeyBlock *)m_mesh->key->block.first; kb; kb = kb->next, kbindex++)
- {
- // first check the cases where the weight must be cleared
- if (kb->vgroup[0] == 0 ||
- m_mesh->dvert == NULL ||
- (defindex = get_def_index(obj, kb->vgroup)) == -1) {
- if (kb->weights) {
- MEM_freeN(kb->weights);
- kb->weights = NULL;
- }
- m_cacheWeightIndex[kbindex] = -1;
- } else if (m_cacheWeightIndex[kbindex] != defindex) {
- // a weight array is required but the cache is not matching
- if (kb->weights) {
- MEM_freeN(kb->weights);
- kb->weights = NULL;
- }
-
- dv= m_mesh->dvert;
- totvert= m_mesh->totvert;
-
- weights= (float*)MEM_mallocN(totvert*sizeof(float), "weights");
-
- for (i=0; i < totvert; i++, dv++) {
- weights[i] = defvert_find_weight(dv, defindex);
- }
-
- kb->weights = weights;
- m_cacheWeightIndex[kbindex] = defindex;
- }
- }
-}
-
-
diff --git a/source/gameengine/Rasterizer/RAS_MeshObject.h b/source/gameengine/Rasterizer/RAS_MeshObject.h
index d77d0483024..e5ae78d006e 100644
--- a/source/gameengine/Rasterizer/RAS_MeshObject.h
+++ b/source/gameengine/Rasterizer/RAS_MeshObject.h
@@ -83,9 +83,6 @@ public:
virtual ~RAS_MeshObject();
- // for shape keys,
- void CheckWeightCache(struct Object* obj);
-
/* materials */
int NumMaterials();
const STR_String& GetMaterialName(unsigned int matid);
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp
index a1c0836417a..e1dbd6f0a7f 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp
@@ -127,11 +127,8 @@ bool RAS_ListSlot::End()
RAS_ListRasterizer::RAS_ListRasterizer(RAS_ICanvas* canvas, bool lock, int storage)
-: RAS_OpenGLRasterizer(canvas, storage),
- mATI(false)
+: RAS_OpenGLRasterizer(canvas, storage)
{
- if (!strcmp((const char*)glGetString(GL_VENDOR), "ATI Technologies Inc."))
- mATI = true;
}
RAS_ListRasterizer::~RAS_ListRasterizer()
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.h b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.h
index 558850a9173..d394c72b2a2 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.h
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.h
@@ -51,7 +51,6 @@ typedef std::map<DerivedMesh*, RAS_ListSlots*> RAS_DerivedMeshLists;
class RAS_ListRasterizer : public RAS_OpenGLRasterizer
{
- bool mATI;
RAS_ArrayLists mArrayLists;
RAS_DerivedMeshLists mDerivedMeshLists;
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
index c24cfdb4ef0..bfc74e0c6dc 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
@@ -1010,7 +1010,11 @@ void RAS_OpenGLRasterizer::DisableMotionBlur()
void RAS_OpenGLRasterizer::SetAlphaBlend(int alphablend)
{
- GPU_set_material_alpha_blend(alphablend);
+ /* Variance shadow maps don't handle alpha well, best to not allow it for now */
+ if (m_drawingmode == KX_SHADOW && m_usingoverrideshader)
+ GPU_set_material_alpha_blend(GPU_BLEND_SOLID);
+ else
+ GPU_set_material_alpha_blend(alphablend);
/*
if (alphablend == m_last_alphablend)
return;
diff --git a/source/tests/bl_run_operators.py b/source/tests/bl_run_operators.py
index effc06cd15f..ad8a6919c91 100644
--- a/source/tests/bl_run_operators.py
+++ b/source/tests/bl_run_operators.py
@@ -342,7 +342,8 @@ def ctx_editmode_curves():
def ctx_editmode_curves_empty():
bpy.ops.curve.primitive_nurbs_circle_add()
bpy.ops.object.mode_set(mode='EDIT')
- bpy.ops.curve.delete(type='ALL')
+ bpy.ops.curve.select_all(action='SELECT')
+ bpy.ops.curve.delete(type='VERT')
def ctx_editmode_surface():